[
  {
    "path": ".cirrus.yml",
    "content": "---\n\n# Main collection of env. vars to set for all tasks and scripts.\nenv:\n    ####\n    #### Global variables used for all tasks\n    ####\n    # Name of the ultimate destination branch for this CI run, PR or post-merge.\n    DEST_BRANCH: \"main\"\n    # Overrides default location (/tmp/cirrus) for repo clone\n    GOPATH: &gopath \"/var/tmp/go\"\n    GOBIN: \"${GOPATH}/bin\"\n    GOCACHE: \"${GOPATH}/cache\"\n    GOSRC: &gosrc \"/var/tmp/go/src/github.com/containers/skopeo\"\n    # Required for consistency with containers/image CI\n    SKOPEO_PATH: *gosrc\n    CIRRUS_WORKING_DIR: *gosrc\n    # The default is 'sh' if unspecified\n    CIRRUS_SHELL: \"/bin/bash\"\n    # Save a little typing (path relative to $CIRRUS_WORKING_DIR)\n    SCRIPT_BASE: \"./contrib/cirrus\"\n\n    # Google-cloud VM Images\n    # If you are updating IMAGE_SUFFIX: We are currently using rawhide for\n    # the containers_image_sequoia tests because the rust-podman-sequoia\n    # package is not available in earlier releases; once we update to a future\n    # Fedora release (or if the package is backported), switch back from Rawhide\n    # to the latest Fedora release.\n    IMAGE_SUFFIX: \"c20260310t170224z-f43f42d14\"\n    FEDORA_CACHE_IMAGE_NAME: \"fedora-${IMAGE_SUFFIX}\"\n    RAWHIDE_CACHE_IMAGE_NAME: \"rawhide-${IMAGE_SUFFIX}\"\n\n    # Container FQIN's\n    FEDORA_CONTAINER_FQIN: \"quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}\"\n\n    # Built along with the standard PR-based workflow in c/automation_images\n    SKOPEO_CIDEV_CONTAINER_FQIN: \"quay.io/libpod/skopeo_cidev:${IMAGE_SUFFIX}\"\n\n\n# Default timeout for each task\ntimeout_in: 45m\n\n\ngcp_credentials: ENCRYPTED[52d9e807b531b37ab14e958cb5a72499460663f04c8d73e22ad608c027a31118420f1c80f0be0882fbdf96f49d8f9ac0]\n\n\nvalidate_task:\n    # The git-validation tool doesn't work well on branch or tag push,\n    # under Cirrus-CI, due to challenges obtaining the starting commit ID.\n    # Only do validation for PRs.\n    only_if: &is_pr $CIRRUS_PR != ''\n    container:\n        image: '${SKOPEO_CIDEV_CONTAINER_FQIN}'\n        cpu: 4\n        memory: 8\n    setup_script: |\n        make tools\n    test_script: |\n        make validate-local\n        make vendor && hack/tree_status.sh\n\ndoccheck_task:\n    only_if: *is_pr\n    depends_on:\n      - validate\n    container:\n        image: \"${FEDORA_CONTAINER_FQIN}\"\n        cpu: 4\n        memory: 8\n    env:\n        BUILDTAGS: &withopengpg 'containers_image_openpgp'\n    script: |\n      # TODO: Can't use 'runner.sh setup' inside container.  However,\n      # removing the pre-installed package is the only necessary step\n      # at the time of this comment.\n      dnf remove -y skopeo  # Guarantee non-interference\n      \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" build\n      \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" doccheck\n\nosx_task:\n    # Don't run for docs-only builds.\n    # Also don't run on release-branches or their PRs,\n    # since base container-image is not version-constrained.\n    only_if: &not_docs_or_release_branch >-\n        ($CIRRUS_BASE_BRANCH == $CIRRUS_DEFAULT_BRANCH ||\n         $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH ) &&\n        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'\n    depends_on:\n        - validate\n    persistent_worker: &mac_pw\n        labels:\n            os: darwin\n            arch: arm64\n            purpose: prod\n    env:\n        CIRRUS_WORKING_DIR: \"$HOME/ci/task-${CIRRUS_TASK_ID}\"\n        # Prevent cache-pollution fron one task to the next.\n        GOPATH: \"$CIRRUS_WORKING_DIR/.go\"\n        GOCACHE: \"$CIRRUS_WORKING_DIR/.go/cache\"\n        GOENV: \"$CIRRUS_WORKING_DIR/.go/support\"\n        GOSRC: \"$HOME/ci/task-${CIRRUS_TASK_ID}\"\n        TMPDIR: \"/private/tmp/ci\"\n    # This host is/was shared with potentially many other CI tasks.\n    # The previous task may have been canceled or aborted.\n    prep_script: &mac_cleanup \"contrib/cirrus/mac_cleanup.sh\"\n    test_script:\n        - export PATH=$GOPATH/bin:$PATH\n        - go version\n        - go env\n        - make tools\n        - make validate-local test-unit-local bin/skopeo\n        - bin/skopeo -v\n    # This host is/was shared with potentially many other CI tasks.\n    # Ensure nothing is left running while waiting for the next task.\n    always:\n        task_cleanup_script: *mac_cleanup\n\n\ncross_task:\n    alias: cross\n    only_if: >-\n        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'\n    depends_on:\n        - validate\n    gce_instance: &standardvm\n        image_project: libpod-218412\n        zone: \"us-central1-f\"\n        cpu: 2\n        memory: \"4Gb\"\n        # Required to be 200gig, do not modify - has i/o performance impact\n        # according to gcloud CLI tool warning messages.\n        disk: 200\n        image_name: ${FEDORA_CACHE_IMAGE_NAME}\n    env:\n        BUILDTAGS: *withopengpg\n    setup_script: >-\n        \"${GOSRC}/${SCRIPT_BASE}/runner.sh\" setup\n    cross_script: >-\n        \"${GOSRC}/${SCRIPT_BASE}/runner.sh\" cross\n\n\nostree-rs-ext_task:\n    alias: proxy_ostree_ext\n    only_if: *not_docs_or_release_branch\n    # WARNING: This task potentially performs a container image\n    # build (on change) with runtime package installs.  Therefore,\n    # its behavior can be unpredictable and potentially flake-prone.\n    # In case of emergency, uncomment the next statement to bypass.\n    #\n    # skip: $CI == \"true\"\n    #\n    depends_on:\n        - validate\n    # Ref: https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment\n    container:\n        # The runtime image will be rebuilt on change\n        dockerfile: contrib/cirrus/ostree_ext.dockerfile\n        docker_arguments:  # required build-args\n            BASE_FQIN: quay.io/coreos-assembler/fcos-buildroot:testing-devel\n            CIRRUS_IMAGE_VERSION: 4\n    env:\n        EXT_REPO_NAME: ostree-rs-ext\n        EXT_REPO_HOME: $CIRRUS_WORKING_DIR/../$EXT_REPO_NAME\n        EXT_REPO: https://github.com/ostreedev/${EXT_REPO_NAME}.git\n    skopeo_build_script:\n        - dnf builddep -y skopeo\n        - make\n        - make install\n    proxy_ostree_ext_build_script:\n        - git clone --depth 1 $EXT_REPO $EXT_REPO_HOME\n        - cd $EXT_REPO_HOME\n        - cargo test --no-run\n    proxy_ostree_ext_test_script:\n        - cd $EXT_REPO_HOME\n        - cargo test -- --nocapture --quiet\n\n\n#####\n##### NOTE: This task is subtantially duplicated in the containers/image\n##### repository's `.cirrus.yml`.  Changes made here should be fully merged\n##### prior to being manually duplicated and maintained in containers/image.\n#####\ntest_skopeo_task:\n    alias: test_skopeo\n    # Don't test for [CI:DOCS], [CI:BUILD].\n    only_if: >-\n        $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&\n        $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'\n    depends_on:\n        - validate\n    gce_instance:\n        image_project: libpod-218412\n        zone: \"us-central1-f\"\n        cpu: 2\n        memory: \"4Gb\"\n        # Required to be 200gig, do not modify - has i/o performance impact\n        # according to gcloud CLI tool warning messages.\n        disk: 200\n        image_name: ${VM_IMAGE_NAME}\n    matrix:\n        - name: \"Skopeo Test\"  # N/B: Name ref. by hack/get_fqin.sh\n          env:\n              BUILDTAGS: ''\n              VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}\n        - name: \"Skopeo Test w/ opengpg\"\n          env:\n              BUILDTAGS: *withopengpg\n              VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}\n        - name: \"Skopeo test w/ Sequoia (currently Rawhide)\"\n          env:\n              BUILDTAGS: 'containers_image_sequoia'\n              # If you are removing the use of rawhide, also remove the VM_IMAGE_NAME condition from runner.sh .\n              VM_IMAGE_NAME: ${RAWHIDE_CACHE_IMAGE_NAME}\n    setup_script: >-\n        \"${GOSRC}/${SCRIPT_BASE}/runner.sh\" setup\n    vendor_script: >-\n        \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" vendor\n    build_script: >-\n        \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" build\n    unit_script: >-\n        \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" unit\n    integration_script: >-\n        \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" integration\n    system_script: >\n        \"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh\" system\n\n\n# This task is critical.  It updates the \"last-used by\" timestamp stored\n# in metadata for all VM images.  This mechanism functions in tandem with\n# an out-of-band pruning operation to remove disused VM images.\nmeta_task:\n    name: \"VM img. keepalive\"\n    alias: meta\n    container: &smallcontainer\n        cpu: 2\n        memory: 2\n        image: quay.io/libpod/imgts:latest\n    env:\n        # Space-separated list of images used by this repository state\n        IMGNAMES: |\n            ${FEDORA_CACHE_IMAGE_NAME}\n            ${RAWHIDE_CACHE_IMAGE_NAME}\n            build-push-${IMAGE_SUFFIX}\n        BUILDID: \"${CIRRUS_BUILD_ID}\"\n        REPOREF: \"${CIRRUS_REPO_NAME}\"\n        GCPJSON: ENCRYPTED[6867b5a83e960e7c159a98fe6c8360064567a071c6f4b5e7d532283ecd870aa65c94ccd74bdaa9bf7aadac9d42e20a67]\n        GCPNAME: ENCRYPTED[1cf558ae125e3c39ec401e443ad76452b25d790c45eb73d77c83eb059a0f7fd5085ef7e2f7e410b04ea6e83b0aab2eb1]\n        GCPPROJECT: libpod-218412\n    clone_script: &noop mkdir -p \"$CIRRUS_WORKING_DIR\"\n    script: /usr/local/bin/entrypoint.sh\n\n\n# Status aggregator for all tests.  This task simply ensures a defined\n# set of tasks all passed, and allows confirming that based on the status\n# of this task.\nsuccess_task:\n    name: \"Total Success\"\n    alias: success\n    # N/B: ALL tasks must be listed here, minus their '_task' suffix.\n    depends_on:\n        - validate\n        - doccheck\n        - osx\n        - cross\n        - proxy_ostree_ext\n        - test_skopeo\n        - meta\n    container: *smallcontainer\n    env:\n        CTR_FQIN: ${FEDORA_CONTAINER_FQIN}\n        TEST_ENVIRON: container\n    clone_script: *noop\n    script: /bin/true\n"
  },
  {
    "path": ".fmf/version",
    "content": "1\n"
  },
  {
    "path": ".github/renovate.json5",
    "content": "/*\n   Renovate is a service similar to GitHub Dependabot, but with\n   (fantastically) more configuration options.  So many options\n   in fact, if you're new I recommend glossing over this cheat-sheet\n   prior to the official documentation:\n\n   https://www.augmentedmind.de/2021/07/25/renovate-bot-cheat-sheet\n\n   Configuration Update/Change Procedure:\n     1. Make changes\n     2. Manually validate changes (from repo-root):\n\n        podman run -it \\\n            -v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \\\n            docker.io/renovate/renovate:latest \\\n            renovate-config-validator\n     3. Commit.\n\n   Configuration Reference:\n   https://docs.renovatebot.com/configuration-options/\n\n   Monitoring Dashboard:\n   https://app.renovatebot.com/dashboard#github/containers\n\n   Note: The Renovate bot will create/manage it's business on\n         branches named 'renovate/*'.  Otherwise, and by\n         default, the only the copy of this file that matters\n         is the one on the `main` branch.  No other branches\n         will be monitored or touched in any way.\n*/\n\n{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n\n  /*************************************************\n   ****** Global/general configuration options *****\n   *************************************************/\n\n  // Re-use predefined sets of configuration options to DRY\n  \"extends\": [\n    // https://github.com/containers/automation/blob/main/renovate/defaults.json5\n    \"github>containers/automation//renovate/defaults.json5\"\n  ],\n\n  // Permit automatic rebasing when base-branch changes by more than\n  // one commit.\n  \"rebaseWhen\": \"behind-base-branch\",\n\n  /*************************************************\n   *** Repository-specific configuration options ***\n   *************************************************/\n}\n"
  },
  {
    "path": ".github/workflows/check_cirrus_cron.yml",
    "content": "---\n\n# See also:\n# https://github.com/containers/podman/blob/main/.github/workflows/check_cirrus_cron.yml\n\non:\n  # Note: This only applies to the default branch.\n  schedule:\n    # N/B: This should correspond to a period slightly after\n    # the last job finishes running.  See job defs. at:\n    # https://cirrus-ci.com/settings/repository/6706677464432640\n    - cron:  '03 03 * * 1-5'\n  # Debug: Allow triggering job manually in github-actions WebUI\n  workflow_dispatch: {}\n\njobs:\n  # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows\n  call_cron_failures:\n    uses: containers/podman/.github/workflows/check_cirrus_cron.yml@main\n    secrets:\n      SECRET_CIRRUS_API_KEY: ${{secrets.SECRET_CIRRUS_API_KEY}}\n      ACTION_MAIL_SERVER: ${{secrets.ACTION_MAIL_SERVER}}\n      ACTION_MAIL_USERNAME: ${{secrets.ACTION_MAIL_USERNAME}}\n      ACTION_MAIL_PASSWORD: ${{secrets.ACTION_MAIL_PASSWORD}}\n      ACTION_MAIL_SENDER: ${{secrets.ACTION_MAIL_SENDER}}\n"
  },
  {
    "path": ".github/workflows/issue_pr_lock.yml",
    "content": "---\n\n# See also:\n# https://github.com/containers/podman/blob/main/.github/workflows/issue_pr_lock.yml\n\non:\n  schedule:\n    - cron:  '0 0 * * *'\n  # Debug: Allow triggering job manually in github-actions WebUI\n  workflow_dispatch: {}\n\njobs:\n  # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows\n  closed_issue_discussion_lock:\n    uses: containers/podman/.github/workflows/issue_pr_lock.yml@main\n    secrets: inherit\n    permissions:\n      contents: read\n      issues: write\n      pull-requests: write\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "name: Mark stale issues and pull requests\n\n# Please refer to https://github.com/actions/stale/blob/master/action.yml\n# to see all config knobs of the stale action.\n\non:\n  schedule:\n  - cron: \"0 0 * * *\"\n\npermissions:\n  contents: read\n\njobs:\n  stale:\n    permissions:\n      issues: write  # for actions/stale to close stale issues\n      pull-requests: write  # for actions/stale to close stale PRs\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/stale@v10\n      with:\n        repo-token: ${{ secrets.GITHUB_TOKEN }}\n        stale-issue-message: 'A friendly reminder that this issue had no activity for 30 days.'\n        stale-pr-message: 'A friendly reminder that this PR had no activity for 30 days.'\n        stale-issue-label: 'stale-issue'\n        stale-pr-label: 'stale-pr'\n        days-before-stale: 30\n        days-before-close: 365\n        remove-stale-when-updated: true\n"
  },
  {
    "path": ".gitignore",
    "content": "*.1\n/layers-*\n/skopeo\nresult\n/completions/\n# ignore JetBrains IDEs (GoLand) config folder\n.idea\n\n# Ignore the bin directory\nbin\n"
  },
  {
    "path": ".golangci.yml",
    "content": "version: \"2\"\n\nformatters:\n  enable:\n    - gofumpt\n\nlinters:\n  settings:\n    staticcheck:\n      checks:\n        # Compared to golangci-lint v2.0.2 defaults, we don’t exclude\n        # ST1003, ST1016, ST1020, ST1021, ST1022 as we don't hit those.\n        - all\n        - -ST1000 # Incorrect or missing package comment.\n        - -ST1005 # Incorrectly formatted error string.\n  exclusions:\n    presets:\n      - std-error-handling\n"
  },
  {
    "path": ".packit.yaml",
    "content": "---\n# See the documentation for more information:\n# https://packit.dev/docs/configuration/\n\n# NOTE: The Packit copr_build tasks help to check if every commit builds on\n# supported Fedora and CentOS Stream arches.\n# They do not block the current Cirrus-based workflow.\n\ndownstream_package_name: skopeo\nupstream_tag_template: v{version}\n\npackages:\n  skopeo-fedora:\n    pkg_tool: fedpkg\n    specfile_path: rpm/skopeo.spec\n  skopeo-centos:\n    pkg_tool: centpkg\n    specfile_path: rpm/skopeo.spec\n  skopeo-eln:\n    specfile_path: rpm/skopeo.spec\n\n# https://packit.dev/docs/configuration/actions\nactions:\n  get-current-version: bash -c 'grep \"^const Version\" version/version.go | cut -f2 -d\\\" | tr \\- \\~'\n\nsrpm_build_deps:\n  - make\n\njobs:\n  - job: copr_build\n    trigger: pull_request\n    packages: [skopeo-fedora]\n    notifications: &copr_build_failure_notification\n      failure_comment:\n        message: \"Ephemeral COPR build failed. @containers/packit-build please check.\"\n    targets: &fedora_copr_targets\n      - fedora-all-x86_64\n      - fedora-all-aarch64\n    enable_net: true\n    # Re-enable these scans if OpenScanHub starts scanning go packages\n    # https://packit.dev/posts/openscanhub-prototype\n    osh_diff_scan_after_copr_build: false\n\n  - job: copr_build\n    trigger: pull_request\n    packages: [skopeo-eln]\n    notifications: *copr_build_failure_notification\n    targets: &eln_copr_targets\n      fedora-eln-x86_64:\n        additional_repos:\n          - \"https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/\"\n      fedora-eln-aarch64:\n        additional_repos:\n          - \"https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/\"\n    enable_net: true\n\n  - job: copr_build\n    trigger: pull_request\n    packages: [skopeo-centos]\n    notifications: *copr_build_failure_notification\n    targets: &centos_copr_targets\n      - centos-stream-9-x86_64\n      - centos-stream-9-aarch64\n      - centos-stream-10-x86_64\n      - centos-stream-10-aarch64\n    enable_net: true\n\n  # Run on commit to main branch\n  - job: copr_build\n    trigger: commit\n    packages: [skopeo-fedora]\n    branch: main\n    owner: rhcontainerbot\n    project: podman-next\n    enable_net: true\n\n  # Tests on Fedora for main branch\n  - job: tests\n    trigger: pull_request\n    packages: [skopeo-fedora]\n    notifications: &test_failure_notification\n      failure_comment:\n        message: \"Tests failed. @containers/packit-build please check.\"\n    targets: *fedora_copr_targets\n    tf_extra_params:\n      environments:\n        - artifacts:\n          - type: repository-file\n            id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo\n\n  # Tests on ELN for main branch\n  - job: tests\n    trigger: pull_request\n    packages: [skopeo-eln]\n    notifications: *test_failure_notification\n    targets: *eln_copr_targets\n    tf_extra_params:\n      environments:\n        - artifacts:\n          - type: repository-file\n            id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-eln/rhcontainerbot-podman-next-fedora-eln.repo\n\n  # Tests on CentOS Stream for main branch\n  - job: tests\n    trigger: pull_request\n    packages: [skopeo-centos]\n    notifications: *test_failure_notification\n    targets: *centos_copr_targets\n    tf_extra_params:\n      environments:\n        - artifacts:\n          - type: repository-file\n            id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo\n\n  # Sync to Fedora\n  - job: propose_downstream\n    trigger: release\n    packages: [skopeo-fedora]\n    update_release: false\n    dist_git_branches: &fedora_targets\n      - fedora-all\n    actions:\n        post-modifications: >-\n          bash -c 'sed -i \"s/^\\(\\s*\\)ref: .*/\\1ref: v${PACKIT_PROJECT_VERSION}/\" ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf'\n\n  # Sync to CentOS Stream\n  # FIXME: Switch trigger whenever we're ready to update CentOS Stream via\n  # Packit\n  - job: propose_downstream\n    trigger: ignore\n    packages: [skopeo-centos]\n    update_release: false\n    dist_git_branches:\n      - c10s\n\n  # Fedora Koji build\n  - job: koji_build\n    trigger: commit\n    packages: [skopeo-fedora]\n    sidetag_group: podman-releases\n    # Dependents are not rpm dependencies, but the package whose bodhi update\n    # should include this package.\n    # Ref: https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages\n    dependents:\n      - podman\n    dist_git_branches: *fedora_targets\n"
  },
  {
    "path": "CODE-OF-CONDUCT.md",
    "content": "## The skopeo Project Community Code of Conduct\n\nThe skopeo project, as part of Podman Container Tools, follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Skopeo\n\nWe'd love to have you join the community! Below summarizes the processes\nthat we follow.\n\n## Topics\n\n* [LLM (\"AI\") Policy](#llm-ai-policy)\n* [Reporting Issues](#reporting-issues)\n* [Submitting Pull Requests](#submitting-pull-requests)\n* [Communications](#communications)\n<!--\n* [Becoming a Maintainer](#becoming-a-maintainer)\n-->\n\n## LLM (\"AI\") Policy\n\nIf your contribution is aided by LLMs or other AI tools, please read the [LLM Policy in the Podman project](https://github.com/containers/podman/blob/main/LLM_POLICY.md).\nThis project also follows this LLM policy, which includes comments, issues, PRs, and any other interactions with the team.\n\n## Reporting Issues\n\nBefore reporting an issue, check our backlog of \n[open issues](https://github.com/containers/skopeo/issues)\nto see if someone else has already reported it. If so, feel free to add\nyour scenario, or additional information, to the discussion. Or simply \n\"subscribe\" to it to be notified when it is updated.\n\nIf you find a new issue with the project we'd love to hear about it! The most\nimportant aspect of a bug report is that it includes enough information for\nus to reproduce it. So, please include as much detail as possible and try\nto remove the extra stuff that doesn't really relate to the issue itself.\nThe easier it is for us to reproduce it, the faster it'll be fixed!\n\nPlease don't include any private/sensitive information in your issue!\n\n## Submitting Pull Requests\n\nNo Pull Request (PR) is too small! Typos, additional comments in the code,\nnew testcases, bug fixes, new features, more documentation, ... it's all \nwelcome!\n\nWhile bug fixes can first be identified via an \"issue\", that is not required.\nIt's ok to just open up a PR with the fix, but make sure you include the same\ninformation you would have included in an issue - like how to reproduce it.\n\nPRs for new features should include some background on what use cases the\nnew code is trying to address. When possible and when it makes sense, try to break-up\nlarger PRs into smaller ones - it's easier to review smaller\ncode changes. But only if those smaller ones make sense as stand-alone PRs.\n\nRegardless of the type of PR, all PRs should include:\n* well documented code changes\n* additional testcases. Ideally, they should fail w/o your code change applied\n* documentation changes\n\nSquash your commits into logical pieces of work that might want to be reviewed\nseparate from the rest of the PRs. Ideally, each commit should implement a single\nidea, and the PR branch should pass the tests at every commit.  GitHub makes it easy\nto review the cumulative effect of many commits; so, when in doubt, use smaller commits.\n\nPRs that fix issues should include a reference like `Closes #XXXX` in the\ncommit message so that github will automatically close the referenced issue\nwhen the PR is merged.\n\n<!--\nAll PRs require at least two LGTMs (Looks Good To Me) from maintainers.\n-->\n\n### Sign your PRs\n\nThe sign-off is a line at the end of the explanation for the patch. Your\nsignature certifies that you wrote the patch or otherwise have the right to pass\nit on as an open-source patch. The rules are simple: if you can certify\nthe below (from [developercertificate.org](http://developercertificate.org/)):\n\n```\nDeveloper Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n660 York Street, Suite 102,\nSan Francisco, CA 94110 USA\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n    have the right to submit it under the open source license\n    indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n    of my knowledge, is covered under an appropriate open source\n    license and I have the right under that license to submit that\n    work with modifications, whether created in whole or in part\n    by me, under the same open source license (unless I am\n    permitted to submit under a different license), as indicated\n    in the file; or\n\n(c) The contribution was provided directly to me by some other\n    person who certified (a), (b) or (c) and I have not modified\n    it.\n\n(d) I understand and agree that this project and the contribution\n    are public and that a record of the contribution (including all\n    personal information I submit with it, including my sign-off) is\n    maintained indefinitely and may be redistributed consistent with\n    this project or the open source license(s) involved.\n```\n\nThen you just add a line to every git commit message:\n\n    Signed-off-by: Joe Smith <joe.smith@email.com>\n\nUse your real name (sorry, no pseudonyms or anonymous contributions.)\n\nIf you set your `user.name` and `user.email` git configs, you can sign your\ncommit automatically with `git commit -s`.\n\n### Dependencies management\n\nDependencies are managed via [standard go modules](https://golang.org/ref/mod).\n\nIn order to add a new dependency to this project:\n\n- use `go get -d path/to/dep@version` to add a new line to `go.mod`\n- run `make vendor`\n\nIn order to update an existing dependency:\n\n- use `go get -d -u path/to/dep@version` to update the relevant dependency line in `go.mod`\n- run `make vendor`\n\nWhen new PRs for [containers/container-libs](https://github.com/containers/container-libs) break `skopeo` (i.e. `containers/container-libs` tests fail in `make test-skopeo`):\n\n- create out a new branch in your `skopeo` checkout and switch to it\n- find out the version of `containers/container-libs` you want to use and note its commit ID. You might also want to use a fork of `containers/container-libs`, in that case note its repo\n- use `go get -d github.com/$REPO/container-libs/image/v5@$COMMIT_ID` to download the right version. The command will fetch the dependency and then fail because of a conflict in `go.mod`, this is expected. Note the pseudo-version (eg. `v5.13.1-0.20210707123201-50afbf0a326`)\n- use `go mod edit -replace=go.podman.io/image/v5=github.com/$REPO/container-libs/image/v5@$PSEUDO_VERSION` to add a replacement line to `go.mod` (e.g. `replace go.podman.io/image/v5 => github.com/moio/container-libs/image/v5 v5.13.1-0.20210707123201-50afbf0a3262`)\n- run `make vendor`\n- make any other necessary changes in the skopeo repo (e.g. add other dependencies now required by `containers/container-libs`, or update skopeo for changed `containers/container-libs` API)\n- optionally add new integration tests to the skopeo repo\n- submit the resulting branch as a skopeo PR, marked “DO NOT MERGE”\n- iterate until tests pass and the PR is reviewed\n- then the original `containers/container-libs` PR can be merged, disregarding its `make test-skopeo` failure\n- as soon as possible after that, in the skopeo PR, use `go mod edit -dropreplace=go.podman.io/image/v5` to remove the `replace` line in `go.mod`\n- run `make vendor`\n- update the skopeo PR with the result, drop the “DO NOT MERGE” marking\n- after tests complete successfully again, merge the skopeo PR\n\n## Communications\n\nFor general questions, or discussions, please use the\n[#podman](https://app.slack.com/client/T08PSQ7BQ/C08MXJLCFCN) channel on the [CNCF\nSlack](https://cloud-native.slack.com).\n\nFor development related discussions, please use the\n[#podman-dev](https://app.slack.com/client/T08PSQ7BQ/C08NTKCDC1W) channel on the CNCF\nSlack.\n\nFor discussions around issues/bugs and features, you can use the github\n[issues](https://github.com/containers/skopeo/issues)\nand\n[PRs](https://github.com/containers/skopeo/pulls)\ntracking system.\n\n<!--\n## Becoming a Maintainer\n\nTo become a maintainer you must first be nominated by an existing maintainer.\nIf a majority (>50%) of maintainers agree then the proposal is adopted and\nyou will be added to the list.\n\nRemoving a maintainer requires at least 75% of the remaining maintainers\napproval, or if the person requests to be removed then it is automatic.\nNormally, a maintainer will only be removed if they are considered to be\ninactive for a long period of time or are viewed as disruptive to the community.\n\nThe current list of maintainers can be found in the \n[MAINTAINERS](MAINTAINERS) file.\n-->\n"
  },
  {
    "path": "GOVERNANCE.md",
    "content": "## The Skopeo Project Community Governance\n\nThe Skopeo project, as part of Podman Container Tools, follows the [Podman Project Governance](https://github.com/containers/podman/blob/main/GOVERNANCE.md)\nexcept sections found in this document, which override those found in Podman's Governance.\n\n---\n\n# Maintainers File\n\nThe definitive source of truth for maintainers of this repository is the local [MAINTAINERS.md](./MAINTAINERS.md) file. The [MAINTAINERS.md](https://github.com/containers/podman/blob/main/MAINTAINERS.md) file in the main Podman repository is used for project-spanning roles, including Core Maintainer and Community Manager. Some repositories in the project will also have a local [OWNERS](./OWNERS) file, which the CI system uses to map users to roles. Any changes to the [OWNERS](./OWNERS) file must make a corresponding change to the [MAINTAINERS.md](./MAINTAINERS.md) file to ensure that the file remains up to date. Most changes to [MAINTAINERS.md](./MAINTAINERS.md) will require a change to the repository’s [OWNERS](.OWNERS) file (e.g., adding a Reviewer), but some will not (e.g., promoting a Maintainer to a Core Maintainer, which comes with no additional CI-related privileges).\n\nAny Core Maintainers listed in Podman’s [MAINTAINERS.md](https://github.com/containers/podman/blob/main/MAINTAINERS.md) file should also be added to the list of “approvers” in the local [OWNERS](./OWNERS) file and as a Core Maintainer in the list of “Maintainers” in the local [MAINTAINERS.md](./MAINTAINERS.md) file.\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "MAINTAINERS.md",
    "content": "# Skopeo Maintainers\n\n[GOVERNANCE.md](https://github.com/containers/podman/blob/main/GOVERNANCE.md)\ndescribes the project's governance and the Project Roles used below.\n\n## Maintainers\n\n| Maintainer        | GitHub ID                                                | Project Roles                    | Affiliation                                  |\n|-------------------|----------------------------------------------------------|----------------------------------|----------------------------------------------|\n| Brent Baude       | [baude](https://github.com/baude)                        | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Nalin Dahyabhai   | [nalind](https://github.com/nalind)                      | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Matthew Heon      | [mheon](https://github.com/mheon)                        | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Paul Holzinger    | [Luap99](https://github.com/Luap99)                      | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Giuseppe Scrivano | [giuseppe](https://github.com/giuseppe)                  | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Miloslav Trmač    | [mtrmac](https://github.com/mtrmac)                      | Core Maintainer                  | [Red Hat](https://github.com/RedHatOfficial) |\n| Mohan Boddu       | [mohanboddu](https://github.com/mohanboddu)              | Community Manager                | [Red Hat](https://github.com/RedHatOfficial) |\n| Neil Smith        | [actionmancan](https://github.com/actionmancan)          | Community Manager                | [Red Hat](https://github.com/RedHatOfficial) |\n| Tom Sweeney       | [TomSweeneyRedHat](https://github.com/TomSweeneyRedHat/) | Maintainer and Community Manager | [Red Hat](https://github.com/RedHatOfficial) |\n| Lokesh Mandvekar  | [lsm5](https://github.com/lsm5)                          | Maintainer                       | [Red Hat](https://github.com/RedHatOfficial) |\n| Dan Walsh         | [rhatdan](https://github.com/rhatdan)                    | Maintainer                       | [Red Hat](https://github.com/RedHatOfficial) |\n| Ashley Cui        | [ashley-cui](https://github.com/ashley-cui)              | Reviewer                         | [Red Hat](https://github.com/RedHatOfficial) |\n| Valentin Rothberg | [vrothberg](https://github.com/vrothberg)                | Reviewer                         | [Red Hat](https://github.com/RedHatOfficial) |\n| Colin Walters     | [cgwalters](https://github.com/cgwalters)                | Reviewer                         | [Red Hat](https://github.com/RedHatOfficial) |\n\n## Alumni\n\nNone at present\n\n## Credits\n\nThe structure of this document was based off of the equivalent one in the [CRI-O Project](https://github.com/cri-o/cri-o/blob/main/MAINTAINERS.md).\n\n## Note\n\nIf there is a discrepancy between the [MAINTAINERS.md](https://github.com/containers/podman/blob/main/MAINTAINERS.md) file in the main Podman repository and this file regarding Core Maintainers or Community Managers, the file in the Podman Repository is considered the source of truth.\n"
  },
  {
    "path": "Makefile",
    "content": ".PHONY: all binary docs docs-in-container build-local clean install install-binary install-completions shell test-integration .install.vndr vendor vendor-in-container\n\nexport GOPROXY=https://proxy.golang.org\n\n# The following variables very roughly follow https://www.gnu.org/prep/standards/standards.html#Makefile-Conventions .\nDESTDIR ?=\nPREFIX ?= /usr/local\nifeq ($(shell uname -s),FreeBSD)\nCONTAINERSCONFDIR ?= /usr/local/etc/containers\nelse\nCONTAINERSCONFDIR ?= /etc/containers\nendif\nREGISTRIESDDIR ?= ${CONTAINERSCONFDIR}/registries.d\nLOOKASIDEDIR ?= /var/lib/containers/sigstore\nBINDIR ?= ${PREFIX}/bin\nMANDIR ?= ${PREFIX}/share/man\n\nBASHINSTALLDIR=${PREFIX}/share/bash-completion/completions\nZSHINSTALLDIR=${PREFIX}/share/zsh/site-functions\nFISHINSTALLDIR=${PREFIX}/share/fish/vendor_completions.d\n\nGO ?= go\nGOBIN := $(shell $(GO) env GOBIN)\nGOOS ?= $(shell go env GOOS)\nGOARCH ?= $(shell go env GOARCH)\n\nSEQUOIA_SONAME_DIR =\n\n# N/B: This value is managed by Renovate, manual changes are\n# possible, as long as they don't disturb the formatting\n# (i.e. DO NOT ADD A 'v' prefix!)\nGOLANGCI_LINT_VERSION := 2.11.3\n\nifeq ($(GOBIN),)\nGOBIN := $(GOPATH)/bin\nendif\n\n# Scripts may also use CONTAINER_RUNTIME, so we need to export it.\n# Note possibly non-obvious aspects of this:\n# - We need to use 'command -v' here, not 'which', for compatibility with MacOS.\n# - GNU Make 4.2.1 (included in Ubuntu 20.04) incorrectly tries to avoid invoking\n#   a shell, and fails because there is no /usr/bin/command. The trailing ';' in\n#   $(shell … ;) defeats that heuristic (recommended in\n#   https://savannah.gnu.org/bugs/index.php?57625 ).\nexport CONTAINER_RUNTIME ?= $(if $(shell command -v podman ;),podman,docker)\nGOMD2MAN ?= $(if $(shell command -v go-md2man ;),go-md2man,$(GOBIN)/go-md2man)\n\nifeq ($(DEBUG), 1)\n  override GOGCFLAGS += -N -l\nendif\n\nifeq ($(GOOS), linux)\n  ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64 riscv64))\n    GO_DYN_FLAGS=\"-buildmode=pie\"\n  endif\nendif\n\n# If $TESTFLAGS is set, it is passed as extra arguments to 'go test' on integration tests.\n# You can select certain tests to run, with `-run <regex>` for example:\n#\n#     make test-integration TESTFLAGS='-run copySuite.TestCopy.*'\nexport TESTFLAGS ?= -timeout=15m\n\n# This is assumed to be set non-empty when operating inside a CI/automation environment\nCI ?=\n\n# This env. var. is interpreted by some tests as a permission to\n# modify local configuration files and services.\nexport SKOPEO_CONTAINER_TESTS ?= $(if $(CI),1,0)\n\n# This is a compromise, we either use a container for this or require\n# the local user to have a compatible python3 development environment.\n# Define it as a \"resolve on use\" variable to avoid calling out when possible\nSKOPEO_CIDEV_CONTAINER_FQIN ?= $(shell hack/get_fqin.sh)\nCONTAINER_CMD ?= ${CONTAINER_RUNTIME} run --rm -i -e TESTFLAGS=\"$(TESTFLAGS)\" -e CI=$(CI) -e SKOPEO_CONTAINER_TESTS=1\n# if this session isn't interactive, then we don't want to allocate a\n# TTY, which would fail, but if it is interactive, we do want to attach\n# so that the user can send e.g. ^C through.\nINTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)\nifeq ($(INTERACTIVE), 1)\n\tCONTAINER_CMD += -t\nendif\nCONTAINER_GOSRC = /src/github.com/containers/skopeo\nCONTAINER_RUN ?= $(CONTAINER_CMD) --security-opt label=disable -v $(CURDIR):$(CONTAINER_GOSRC) -w $(CONTAINER_GOSRC) $(SKOPEO_CIDEV_CONTAINER_FQIN)\n\nEXTRA_LDFLAGS ?=\nSKOPEO_LDFLAGS := -ldflags '-X go.podman.io/image/v5/signature/internal/sequoia.sequoiaLibraryDir=$(SEQUOIA_SONAME_DIR) $(EXTRA_LDFLAGS)'\n\nMANPAGES_MD = $(wildcard docs/*.md)\nMANPAGES ?= $(MANPAGES_MD:%.md=%)\n\nBTRFS_BUILD_TAG = $(shell hack/btrfs_installed_tag.sh)\nLIBSUBID_BUILD_TAG = $(shell hack/libsubid_tag.sh)\nSQLITE_BUILD_TAG = $(shell hack/sqlite_tag.sh)\nLOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBSUBID_BUILD_TAG) $(SQLITE_BUILD_TAG)\nBUILDTAGS += $(LOCAL_BUILD_TAGS)\n\nifeq ($(DISABLE_CGO), 1)\n\toverride BUILDTAGS = exclude_graphdriver_btrfs containers_image_openpgp\nendif\n\n#   make all DEBUG=1\n#     Note: Uses the -N -l go compiler options to disable compiler optimizations\n#           and inlining. Using these build options allows you to subsequently\n#           use source debugging tools like delve.\nall: bin/skopeo docs\n\ncodespell:\n\tcodespell -S Makefile,build,buildah,buildah.spec,imgtype,copy,AUTHORS,bin,vendor,.git,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,\"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej\" -L fpr,uint,iff,od,ERRO -w\n\nhelp:\n\t@echo \"Usage: make <target>\"\n\t@echo\n\t@echo \"Defaults to building bin/skopeo and docs\"\n\t@echo\n\t@echo \" * 'install' - Install binaries and documents to system locations\"\n\t@echo \" * 'binary' - Build skopeo with a container\"\n\t@echo \" * 'bin/skopeo' - Build skopeo locally\"\n\t@echo \" * 'bin/skopeo.OS.ARCH' - Build skopeo for specific OS and ARCH\"\n\t@echo \" * 'test-unit' - Execute unit tests\"\n\t@echo \" * 'test-integration' - Execute integration tests\"\n\t@echo \" * 'validate' - Verify whether there is no conflict and all Go source files have been formatted, linted and vetted\"\n\t@echo \" * 'check' - Including above validate, test-integration and test-unit\"\n\t@echo \" * 'shell' - Run the built image and attach to a shell\"\n\t@echo \" * 'clean' - Clean artifacts\"\n\n# Do the build and the output (skopeo) should appear in current dir\nbinary: cmd/skopeo\n\t$(CONTAINER_RUN) make bin/skopeo $(if $(DEBUG),DEBUG=$(DEBUG)) BUILDTAGS='$(BUILDTAGS)'\n\n# Build w/o using containers\n.PHONY: bin/skopeo\nbin/skopeo:\n\t$(GO) build ${GO_DYN_FLAGS} ${SKOPEO_LDFLAGS} -gcflags \"$(GOGCFLAGS)\" -tags \"$(BUILDTAGS)\" -o $@ ./cmd/skopeo\nbin/skopeo.%:\n\tGOOS=$(word 2,$(subst ., ,$@)) GOARCH=$(word 3,$(subst ., ,$@)) $(GO) build ${SKOPEO_LDFLAGS} -tags \"containers_image_openpgp $(BUILDTAGS)\" -o $@ ./cmd/skopeo\nlocal-cross: bin/skopeo.darwin.amd64 bin/skopeo.linux.arm bin/skopeo.linux.arm64 bin/skopeo.windows.386.exe bin/skopeo.windows.amd64.exe\n\n$(MANPAGES): %: %.md\nifneq ($(DISABLE_DOCS), 1)\n\tsed -e 's/\\((skopeo.*\\.md)\\)//' -e 's/\\[\\(skopeo.*\\)\\]/\\1/' $<  | $(GOMD2MAN) -in /dev/stdin -out $@\nendif\n\ndocs: $(MANPAGES)\n\ndocs-in-container:\n\t${CONTAINER_RUN} $(MAKE) docs $(if $(DEBUG),DEBUG=$(DEBUG))\n\n.PHONY: completions\ncompletions: bin/skopeo\n\tinstall -d -m 755 completions/bash completions/zsh completions/fish completions/powershell\n\t./bin/skopeo completion bash >| completions/bash/skopeo\n\t./bin/skopeo completion zsh >| completions/zsh/_skopeo\n\t./bin/skopeo completion fish >| completions/fish/skopeo.fish\n\t./bin/skopeo completion powershell >| completions/powershell/skopeo.ps1\n\nclean:\n\trm -rf bin docs/*.1 completions/\n\ninstall: install-binary install-docs install-completions\n\tinstall -d -m 755 ${DESTDIR}${LOOKASIDEDIR}\n\tinstall -d -m 755 ${DESTDIR}${CONTAINERSCONFDIR}\n\tinstall -m 644 default-policy.json ${DESTDIR}${CONTAINERSCONFDIR}/policy.json\n\tinstall -d -m 755 ${DESTDIR}${REGISTRIESDDIR}\n\tinstall -m 644 default.yaml ${DESTDIR}${REGISTRIESDDIR}/default.yaml\n\ninstall-binary: bin/skopeo\n\tinstall -d -m 755 ${DESTDIR}${BINDIR}\n\tinstall -m 755 bin/skopeo ${DESTDIR}${BINDIR}/skopeo\n\ninstall-docs: docs\nifneq ($(DISABLE_DOCS), 1)\n\tinstall -d -m 755 ${DESTDIR}${MANDIR}/man1\n\tinstall -m 644 docs/*.1 ${DESTDIR}${MANDIR}/man1\nendif\n\ninstall-completions: completions\n\tinstall -d -m 755 ${DESTDIR}${BASHINSTALLDIR}\n\tinstall -m 644 completions/bash/skopeo ${DESTDIR}${BASHINSTALLDIR}\n\tinstall -d -m 755 ${DESTDIR}${ZSHINSTALLDIR}\n\tinstall -m 644 completions/zsh/_skopeo ${DESTDIR}${ZSHINSTALLDIR}\n\tinstall -d -m 755 ${DESTDIR}${FISHINSTALLDIR}\n\tinstall -m 644 completions/fish/skopeo.fish ${DESTDIR}${FISHINSTALLDIR}\n\t# There is no common location for powershell files so do not install them. Users have to source the file from their powershell profile.\n\nshell:\n\t$(CONTAINER_RUN) bash\n\ntools:\n\tif [ ! -x \"$(GOBIN)/golangci-lint\" ]; then \\\n\t\tcurl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v$(GOLANGCI_LINT_VERSION) ; \\\n\tfi\n\ncheck: validate test-unit test-integration test-system\n\ntest-integration:\n# This is intended to be equal to $(CONTAINER_RUN), but with --cap-add=cap_mknod.\n# --cap-add=cap_mknod is important to allow skopeo to use containers-storage: directly as it exists in the callers’ environment, without\n# creating a nested user namespace (which requires /etc/subuid and /etc/subgid to be set up)\n\t$(CONTAINER_CMD) --security-opt label=disable --cap-add=cap_mknod -v $(CURDIR):$(CONTAINER_GOSRC) -w $(CONTAINER_GOSRC) $(SKOPEO_CIDEV_CONTAINER_FQIN) \\\n\t\t$(MAKE) test-integration-local\n\n\n# Helper target to set up SKOPEO_BINARY variable for local test targets\n# SKOPEO_BINARY only takes effect on `test-integration-local` and\n# `test-system-local` targets. It's not propagated into the container used for `test-integration` and\n# `test-system`. These targets will (build and) use skopeo binary at\n# ./bin/skopeo.\n.eval-skopeo-binary: $(if $(SKOPEO_BINARY),,bin/skopeo)\n\t$(eval SKOPEO_BINARY := $(or $(SKOPEO_BINARY),./bin/skopeo))\n\t@echo \"Testing with $(SKOPEO_BINARY) ...\"\n\n# Primarily intended for CI.\ntest-integration-local: .eval-skopeo-binary\n\thack/warn-destructive-tests.sh\n\tcd ./integration && SKOPEO_BINARY=\"$(abspath $(SKOPEO_BINARY))\" $(GO) test $(SKOPEO_LDFLAGS) $(TESTFLAGS) $(if $(BUILDTAGS),-tags \"$(BUILDTAGS)\")\n\n# complicated set of options needed to run podman-in-podman\ntest-system:\n\tDTEMP=$(shell mktemp -d --tmpdir=/var/tmp podman-tmp.XXXXXX); \\\n\t$(CONTAINER_CMD) --privileged \\\n\t\t-v $(CURDIR):$(CONTAINER_GOSRC) -w $(CONTAINER_GOSRC) \\\n\t\t-v $$DTEMP:/var/lib/containers:Z -v /run/systemd/journal/socket:/run/systemd/journal/socket \\\n\t\t\"$(SKOPEO_CIDEV_CONTAINER_FQIN)\" \\\n\t\t\t$(MAKE) test-system-local; \\\n\trc=$$?; \\\n\t$(CONTAINER_RUNTIME) unshare rm -rf $$DTEMP; # This probably doesn't work with Docker, oh well, better than nothing... \\\n\texit $$rc\n\n# Primarily intended for CI.\ntest-system-local: .eval-skopeo-binary\n\thack/warn-destructive-tests.sh\n\thack/test-system.sh\n\ntest-unit:\n\t# Just call (make test unit-local) here instead of worrying about environment differences\n\t$(CONTAINER_RUN) $(MAKE) test-unit-local\n\nvalidate:\n\t$(CONTAINER_RUN) $(MAKE) validate-local\n\n# This target is only intended for development, e.g. executing it from an IDE. Use (make test) for CI or pre-release testing.\ntest-all-local: validate-local validate-docs test-unit-local\n\n.PHONY: fmt\nfmt: tools\n\t$(GOBIN)/golangci-lint fmt\n\n.PHONY: validate-local\nvalidate-local: tools\n\thack/validate-git-marks.sh\n\t$(GOBIN)/golangci-lint run --build-tags \"${BUILDTAGS}\"\n\t# An extra run with --tests=false allows detecting code unused outside of tests;\n\t# ideally the linter should be able to find this automatically.\n\t# Since everything is already cached, this additional run doesn't take much time.\n\t$(GOBIN)/golangci-lint run --build-tags \"${BUILDTAGS}\" --tests=false\n\tBUILDTAGS=\"${BUILDTAGS}\" hack/validate-vet.sh\n\n# This invokes bin/skopeo, hence cannot be run as part of validate-local\n.PHONY: validate-docs\nvalidate-docs: bin/skopeo\n\thack/man-page-checker\n\thack/xref-helpmsgs-manpages\n\ntest-unit-local:\n\t$(GO) test $(SKOPEO_LDFLAGS) -tags \"$(BUILDTAGS)\" $$($(GO) list -tags \"$(BUILDTAGS)\" -e ./... | grep -v '^github\\.com/containers/skopeo/\\(integration\\|vendor/.*\\)$$')\n\nvendor:\n\t$(GO) mod tidy\n\t$(GO) mod vendor\n\t$(GO) mod verify\n\nvendor-in-container:\n\tpodman run --privileged --rm --env HOME=/root -v $(CURDIR):/src -w /src golang $(MAKE) vendor\n"
  },
  {
    "path": "OWNERS",
    "content": "approvers:\n  - baude\n  - giuseppe\n  - lsm5\n  - Luap99\n  - mheon\n  - mtrmac\n  - nalind\n  - rhatdan\n  - TomSweeneyRedHat\nreviewers:\n  - ashley-cui\n  - baude\n  - cgwalters\n  - giuseppe\n  - lsm5\n  - Luap99\n  - mheon\n  - mtrmac\n  - nalind\n  - rhatdan\n  - TomSweeneyRedHat\n  - vrothberg\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n   <img src=\"https://cdn.rawgit.com/containers/skopeo/main/docs/skopeo.svg\" width=\"250\" alt=\"Skopeo\">\n</p>\n\n----\n![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/containers/skopeo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/containers/skopeo)](https://goreportcard.com/report/github.com/containers/skopeo)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10516/badge)](https://www.bestpractices.dev/projects/10516)\n\n`skopeo` is a command line utility that performs various operations on container images and image repositories.\n\n`skopeo` does not require the user to be running as root to do most of its operations.\n\n`skopeo` does not require a daemon to be running to perform its operations.\n\n`skopeo` can work with [OCI images](https://github.com/opencontainers/image-spec) as well as the original Docker v2 images.\n\nSkopeo works with API V2 container image registries such as [docker.io](https://docker.io) and [quay.io](https://quay.io) registries, private registries, local directories and local OCI-layout directories. Skopeo can perform operations which consist of:\n\n * Copying an image from and to various storage mechanisms.\n   For example you can copy images from one registry to another, without requiring privilege.\n * Inspecting a remote image showing its properties including its layers, without requiring you to pull the image to the host.\n * Deleting an image from an image repository.\n * Syncing an external image repository to an internal registry for air-gapped deployments.\n * When required by the repository, skopeo can pass the appropriate credentials and certificates for authentication.\n\n Skopeo operates on the following image and repository types:\n\n * containers-storage:docker-reference\n         An image located in a local containers/storage image store.  Both the location and image store are specified in /etc/containers/storage.conf. (This is  the backend for [Podman](https://podman.io), [CRI-O](https://cri-o.io), [Buildah](https://buildah.io) and friends)\n\n * dir:path\n         An existing local directory path storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.\n\n * docker://docker-reference\n         An image in a registry implementing the \"Docker Registry HTTP API V2\". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `skopeo login`.\n\n * docker-archive:path[:docker-reference]\n         An image is stored in a `docker save`-formatted file.  docker-reference is only used when creating such a file, and it must not contain a digest.\n\n * docker-daemon:docker-reference\n         An image docker-reference stored in the docker daemon internal storage.  docker-reference must contain either a tag or a digest.  Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID).\n\n * oci:path:tag\n         An image tag in a directory compliant with \"Open Container Image Layout Specification\" at path.\n\n[Obtaining skopeo](./install.md)\n-\n\nFor a detailed description how to install or build skopeo, see\n[install.md](./install.md).\n\nSkopeo is also available as a Container Image on [quay.io](https://quay.io/skopeo/stable).  For more information, see the [Skopeo Image](https://github.com/containers/image_build/blob/main/skopeo/README.md) page.\n\n## Inspecting a repository\n`skopeo` is able to _inspect_ a repository on a container registry and fetch images layers.\nThe _inspect_ command fetches the repository's manifest and it is able to show you a `docker inspect`-like\njson output about a whole repository or a tag. This tool, in contrast to `docker inspect`, helps you gather useful information about\na repository or a tag before pulling it (using disk space).  The inspect command can show you which tags are available for the given \nrepository, the labels the image has, the creation date and operating system of the image and more.  \n\nExamples:\n\n#### Show properties of fedora:latest\n```console\n$ skopeo inspect docker://registry.fedoraproject.org/fedora:latest\n{\n    \"Name\": \"registry.fedoraproject.org/fedora\",\n    \"Digest\": \"sha256:0f65bee641e821f8118acafb44c2f8fe30c2fc6b9a2b3729c0660376391aa117\",\n    \"RepoTags\": [\n        \"34-aarch64\",\n        \"34\",\n        \"latest\",\n        ...\n    ],\n    \"Created\": \"2022-11-24T13:54:18Z\",\n    \"DockerVersion\": \"1.10.1\",\n    \"Labels\": {\n        \"license\": \"MIT\",\n        \"name\": \"fedora\",\n        \"vendor\": \"Fedora Project\",\n        \"version\": \"37\"\n    },\n    \"Architecture\": \"amd64\",\n    \"Os\": \"linux\",\n    \"Layers\": [\n        \"sha256:2a0fc6bf62e155737f0ace6142ee686f3c471c1aab4241dc3128904db46288f0\"\n    ],\n    \"LayersData\": [\n        {\n            \"MIMEType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"Digest\": \"sha256:2a0fc6bf62e155737f0ace6142ee686f3c471c1aab4241dc3128904db46288f0\",\n            \"Size\": 71355009,\n            \"Annotations\": null\n        }\n    ],\n    \"Env\": [\n        \"DISTTAG=f37container\",\n        \"FGC=f37\",\n        \"container=oci\"\n    ]\n}\n```\n\n#### Show container configuration from `fedora:latest`\n\n```console\n$ skopeo inspect --config docker://registry.fedoraproject.org/fedora:latest  | jq\n{\n  \"created\": \"2020-04-29T06:48:16Z\",\n  \"architecture\": \"amd64\",\n  \"os\": \"linux\",\n  \"config\": {\n    \"Env\": [\n      \"DISTTAG=f32container\",\n      \"FGC=f32\",\n      \"container=oci\"\n    ],\n    \"Cmd\": [\n      \"/bin/bash\"\n    ],\n    \"Labels\": {\n      \"license\": \"MIT\",\n      \"name\": \"fedora\",\n      \"vendor\": \"Fedora Project\",\n      \"version\": \"32\"\n    }\n  },\n  \"rootfs\": {\n    \"type\": \"layers\",\n    \"diff_ids\": [\n      \"sha256:a4c0fa2b217d3fd63d51e55a6fd59432e543d499c0df2b1acd48fbe424f2ddd1\"\n    ]\n  },\n  \"history\": [\n    {\n      \"created\": \"2020-04-29T06:48:16Z\",\n      \"comment\": \"Created by Image Factory\"\n    }\n  ]\n}\n```\n#### Show unverified image's digest\n```console\n$ skopeo inspect docker://registry.fedoraproject.org/fedora:latest | jq '.Digest'\n\"sha256:655721ff613ee766a4126cb5e0d5ae81598e1b0c3bcf7017c36c4d72cb092fe9\"\n```\n\n## Copying images\n\n`skopeo` can copy container images between various storage mechanisms, including:\n* Container registries\n\n  -  The Quay, Docker Hub, OpenShift, GCR, Artifactory ...\n\n* Container Storage backends\n\n  -  [github.com/containers/storage](https://github.com/containers/storage) (Backend for [Podman](https://podman.io), [CRI-O](https://cri-o.io), [Buildah](https://buildah.io) and friends)\n\n  -  Docker daemon storage\n\n* Local directories\n\n* Local OCI-layout directories\n\n```console\n$ skopeo copy docker://quay.io/buildah/stable docker://registry.internal.company.com/buildah\n$ skopeo copy oci:busybox_ocilayout:latest dir:existingemptydirectory\n```\n\n## Deleting images\n```console\n$ skopeo delete docker://localhost:5000/imagename:latest\n```\n\n## Syncing registries\n```console\n$ skopeo sync --src docker --dest dir registry.example.com/busybox /media/usb\n```\n\n## Authenticating to a registry\n\n#### Private registries with authentication\nskopeo uses credentials from the --creds (for skopeo inspect|delete) or --src-creds|--dest-creds (for skopeo copy) flags, if set; otherwise it uses configuration set by skopeo login, podman login, buildah login, or docker login.\n\n```console\n$ skopeo login --username USER myregistrydomain.com:5000\nPassword:\n$ skopeo inspect docker://myregistrydomain.com:5000/busybox\n{\"Tag\":\"latest\",\"Digest\":\"sha256:473bb2189d7b913ed7187a33d11e743fdc2f88931122a44d91a301b64419f092\",\"RepoTags\":[\"latest\"],\"Comment\":\"\",\"Created\":\"2016-01-15T18:06:41.282540103Z\",\"ContainerConfig\":{\"Hostname\":\"aded96b43f48\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":null,\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) CMD [\\\"sh\\\"]\"],\"Image\":\"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"DockerVersion\":\"1.8.3\",\"Author\":\"\",\"Config\":{\"Hostname\":\"aded96b43f48\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":null,\"Cmd\":[\"sh\"],\"Image\":\"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"Architecture\":\"amd64\",\"Os\":\"linux\"}\n$ skopeo logout myregistrydomain.com:5000\n```\n\n#### Using --creds directly\n\n```console\n$ skopeo inspect --creds=testuser:testpassword docker://myregistrydomain.com:5000/busybox\n{\"Tag\":\"latest\",\"Digest\":\"sha256:473bb2189d7b913ed7187a33d11e743fdc2f88931122a44d91a301b64419f092\",\"RepoTags\":[\"latest\"],\"Comment\":\"\",\"Created\":\"2016-01-15T18:06:41.282540103Z\",\"ContainerConfig\":{\"Hostname\":\"aded96b43f48\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":null,\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) CMD [\\\"sh\\\"]\"],\"Image\":\"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"DockerVersion\":\"1.8.3\",\"Author\":\"\",\"Config\":{\"Hostname\":\"aded96b43f48\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":null,\"Cmd\":[\"sh\"],\"Image\":\"9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"Architecture\":\"amd64\",\"Os\":\"linux\"}\n```\n\n```console\n$ skopeo copy --src-creds=testuser:testpassword docker://myregistrydomain.com:5000/private oci:local_oci_image\n```\n\nContributing\n-\n\nPlease read the [contribution guide](CONTRIBUTING.md) if you want to collaborate in the project.\n\n## Commands\n| Command                                            | Description                                                                                  |\n| -------------------------------------------------- | ---------------------------------------------------------------------------------------------|\n| [skopeo-copy(1)](/docs/skopeo-copy.1.md)           | Copy an image (manifest, filesystem layers, signatures) from one location to another.        |\n| [skopeo-delete(1)](/docs/skopeo-delete.1.md)       | Mark the image-name for later deletion by the registry's garbage collector.                                                                |\n| [skopeo-generate-sigstore-key(1)](/docs/skopeo-generate-sigstore-key.1.md)    | Generate a sigstore public/private key pair.  |\n| [skopeo-inspect(1)](/docs/skopeo-inspect.1.md)     | Return  low-level  information about image-name in a registry.                                |\n| [skopeo-list-tags(1)](/docs/skopeo-list-tags.1.md) | Return a list of tags for the transport-specific image repository.                               |\n| [skopeo-login(1)](/docs/skopeo-login.1.md)         | Login to a container registry.                                                               |\n| [skopeo-logout(1)](/docs/skopeo-logout.1.md)       | Logout of a container registry.                                                              |\n| [skopeo-manifest-digest(1)](/docs/skopeo-manifest-digest.1.md)    | Compute a manifest digest for a manifest-file and write it to standard output.   |\n| [skopeo-standalone-sign(1)](/docs/skopeo-standalone-sign.1.md)    | Debugging tool - Sign an image locally without uploading.                     |\n| [skopeo-standalone-verify(1)](/docs/skopeo-standalone-verify.1.md)| Debugging tool - Verify an image signature from local files.                  |\n| [skopeo-sync(1)](/docs/skopeo-sync.1.md)           | Synchronize images between registry repositories and local directories.                      |\n\nLicense\n-\nskopeo is licensed under the Apache License, Version 2.0. See\n[LICENSE](LICENSE) for the full license text.\n"
  },
  {
    "path": "ROADMAP.md",
    "content": "# Skopeo Roadmap\n\nSkopeo intends to mostly continue to be a very thin CLI wrapper over the [https://github.com/containers/image](containers/image) library, with most features being added there, not to this repo. A typical new Skopeo feature would only add a CLI for a recent containers/image feature.\n\n## Future feature focus (most of the work must be done in the containers/image library)\n\n* OCI artifact support.\n* Integration of composefs.\n* Partial pull support (zstd:chunked).\n* Performance and stability improvements.\n* Reductions to the size of the Skopeo binary.\n* `skopeo sync` exists, and bugs in it should be fixed, but we don’t have much of an ambition to compete with much larger projects like [https://github.com/openshift/oc-mirror](oc-mirror).\n"
  },
  {
    "path": "SECURITY.md",
    "content": "## Security and Disclosure Information Policy for the skopeo Project\n\nThe skopeo Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.\n"
  },
  {
    "path": "cmd/skopeo/completions.go",
    "content": "package main\n\nimport (\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/image/v5/directory\"\n\t\"go.podman.io/image/v5/docker\"\n\tdockerArchive \"go.podman.io/image/v5/docker/archive\"\n\tociArchive \"go.podman.io/image/v5/oci/archive\"\n\toci \"go.podman.io/image/v5/oci/layout\"\n\t\"go.podman.io/image/v5/sif\"\n\t\"go.podman.io/image/v5/tarball\"\n\t\"go.podman.io/image/v5/transports\"\n)\n\nfunc autocompleteImageNames(cmd *cobra.Command, args []string, toComplete string) ([]cobra.Completion, cobra.ShellCompDirective) {\n\ttransport, details, haveTransport := strings.Cut(toComplete, \":\")\n\tif !haveTransport {\n\t\ttransports := supportedTransportSuggestions()\n\t\treturn transports, cobra.ShellCompDirectiveNoSpace | cobra.ShellCompDirectiveNoFileComp\n\t}\n\tswitch transport {\n\tcase ociArchive.Transport.Name(), dockerArchive.Transport.Name():\n\t\t// Can have [:{*reference|@source-index}]\n\t\t// FIXME: `oci-archive:/path/to/a.oci:<TAB>` completes paths\n\t\treturn nil, cobra.ShellCompDirectiveNoSpace\n\tcase sif.Transport.Name():\n\t\treturn nil, cobra.ShellCompDirectiveDefault\n\n\t// Both directory and oci should have ShellCompDirectiveFilterDirs to complete only directories, but it doesn't currently work in bash: https://github.com/spf13/cobra/issues/2242\n\tcase oci.Transport.Name():\n\t\t// Can have '[:{reference|@source-index}]'\n\t\t// FIXME: `oci:/path/to/dir/:<TAB>` completes paths\n\t\treturn nil, cobra.ShellCompDirectiveDefault | cobra.ShellCompDirectiveNoSpace\n\tcase directory.Transport.Name():\n\t\treturn nil, cobra.ShellCompDirectiveDefault\n\n\tcase docker.Transport.Name():\n\t\tif details == \"\" {\n\t\t\treturn []cobra.Completion{transport + \"://\"}, cobra.ShellCompDirectiveNoSpace | cobra.ShellCompDirectiveNoFileComp\n\t\t}\n\t}\n\treturn nil, cobra.ShellCompDirectiveNoSpace | cobra.ShellCompDirectiveNoFileComp\n}\n\n// supportedTransportSuggestions list all supported transports with the colon suffix.\nfunc supportedTransportSuggestions() []string {\n\ttps := transports.ListNames()\n\tsuggestions := make([]cobra.Completion, 0, len(tps))\n\tfor _, tp := range tps {\n\t\t// ListNames is generally expected to filter out deprecated transports.\n\t\t// tarball: is not deprecated, but it is only usable from a Go caller (using tarball.ConfigUpdater),\n\t\t// so don’t offer it on the CLI.\n\t\tif tp != tarball.Transport.Name() {\n\t\t\tsuggestions = append(suggestions, tp+\":\")\n\t\t}\n\t}\n\treturn suggestions\n}\n"
  },
  {
    "path": "cmd/skopeo/copy.go",
    "content": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\tencconfig \"github.com/containers/ocicrypt/config\"\n\tenchelpers \"github.com/containers/ocicrypt/helpers\"\n\t\"github.com/spf13/cobra\"\n\tcommonFlag \"go.podman.io/common/pkg/flag\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/copy\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n)\n\ntype copyOptions struct {\n\tglobal              *globalOptions\n\tdeprecatedTLSVerify *deprecatedTLSVerifyOption\n\tsrcImage            *imageOptions\n\tdestImage           *imageDestOptions\n\tretryOpts           *retry.Options\n\tcopy                *sharedCopyOptions\n\tadditionalTags      []string                  // For docker-archive: destinations, in addition to the name:tag specified as destination, also add these\n\tsignIdentity        string                    // Identity of the signed image, must be a fully specified docker reference\n\tdigestFile          string                    // Write digest to this file\n\tquiet               bool                      // Suppress output information when copying images\n\tall                 bool                      // Copy all of the images if the source is a list\n\tmultiArch           commonFlag.OptionalString // How to handle multi architecture images\n\tencryptLayer        []int                     // The list of layers to encrypt\n\tencryptionKeys      []string                  // Keys needed to encrypt the image\n\tdecryptionKeys      []string                  // Keys needed to decrypt the image\n\timageParallelCopies uint                      // Maximum number of parallel requests when copying images\n}\n\nfunc copyCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\tdeprecatedTLSVerifyFlags, deprecatedTLSVerifyOpt := deprecatedTLSVerifyFlags()\n\tsrcFlags, srcOpts := imageFlags(global, sharedOpts, deprecatedTLSVerifyOpt, \"src-\", \"screds\")\n\tdestFlags, destOpts := imageDestFlags(global, sharedOpts, deprecatedTLSVerifyOpt, \"dest-\", \"dcreds\")\n\tretryFlags, retryOpts := retryFlags()\n\tcopyFlags, copyOpts := sharedCopyFlags()\n\topts := copyOptions{\n\t\tglobal:              global,\n\t\tdeprecatedTLSVerify: deprecatedTLSVerifyOpt,\n\t\tsrcImage:            srcOpts,\n\t\tdestImage:           destOpts,\n\t\tretryOpts:           retryOpts,\n\t\tcopy:                copyOpts,\n\t}\n\tcmd := &cobra.Command{\n\t\tUse:   \"copy [command options] SOURCE-IMAGE DESTINATION-IMAGE\",\n\t\tShort: \"Copy an IMAGE-NAME from one location to another\",\n\t\tLong: fmt.Sprintf(`Container \"IMAGE-NAME\" uses a \"transport\":\"details\" format.\n\nSupported transports:\n%s\n\nSee skopeo(1) section \"IMAGE NAMES\" for the expected format\n`, strings.Join(transports.ListNames(), \", \")),\n\t\tRunE:              commandAction(opts.run),\n\t\tExample:           `skopeo copy docker://quay.io/skopeo/stable:latest docker://registry.example.com/skopeo:latest`,\n\t\tValidArgsFunction: autocompleteImageNames,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&deprecatedTLSVerifyFlags)\n\tflags.AddFlagSet(&srcFlags)\n\tflags.AddFlagSet(&destFlags)\n\tflags.AddFlagSet(&retryFlags)\n\tflags.AddFlagSet(&copyFlags)\n\tflags.StringSliceVar(&opts.additionalTags, \"additional-tag\", []string{}, \"additional tags (supports docker-archive)\")\n\tflags.BoolVarP(&opts.quiet, \"quiet\", \"q\", false, \"Suppress output information when copying images\")\n\tflags.BoolVarP(&opts.all, \"all\", \"a\", false, \"Copy all images if SOURCE-IMAGE is a list\")\n\tflags.Var(commonFlag.NewOptionalStringValue(&opts.multiArch), \"multi-arch\", `How to handle multi-architecture images (system, all, or index-only)`)\n\tflags.StringVar(&opts.signIdentity, \"sign-identity\", \"\", \"Identity of signed image, must be a fully specified docker reference. Defaults to the target docker reference.\")\n\tflags.StringVar(&opts.digestFile, \"digestfile\", \"\", \"Write the digest of the pushed image to the specified file\")\n\tflags.StringSliceVar(&opts.encryptionKeys, \"encryption-key\", []string{}, \"*Experimental* key with the encryption protocol to use needed to encrypt the image (e.g. jwe:/path/to/key.pem)\")\n\tflags.IntSliceVar(&opts.encryptLayer, \"encrypt-layer\", []int{}, \"*Experimental* the 0-indexed layer indices, with support for negative indexing (e.g. 0 is the first layer, -1 is the last layer)\")\n\tflags.StringSliceVar(&opts.decryptionKeys, \"decryption-key\", []string{}, \"*Experimental* key needed to decrypt the image\")\n\tflags.UintVar(&opts.imageParallelCopies, \"image-parallel-copies\", 0, \"Maximum number of image layers to be copied (pulled/pushed) simultaneously. Not setting this field will fall back to containers/image defaults.\")\n\treturn cmd\n}\n\n// parseMultiArch parses the list processing selection\n// It returns the copy.ImageListSelection to use with image.Copy option\nfunc parseMultiArch(multiArch string) (copy.ImageListSelection, error) {\n\tswitch multiArch {\n\tcase \"system\":\n\t\treturn copy.CopySystemImage, nil\n\tcase \"all\":\n\t\treturn copy.CopyAllImages, nil\n\t// There is no CopyNoImages value in copy.ImageListSelection, but because we\n\t// don't provide an option to select a set of images to copy, we can use\n\t// CopySpecificImages.\n\tcase \"index-only\":\n\t\treturn copy.CopySpecificImages, nil\n\t// We don't expose CopySpecificImages other than index-only above, because\n\t// we currently don't provide an option to choose the images to copy. That\n\t// could be added in the future.\n\tdefault:\n\t\treturn copy.CopySystemImage, fmt.Errorf(\"unknown multi-arch option %q. Choose one of the supported options: 'system', 'all', or 'index-only'\", multiArch)\n\t}\n}\n\nfunc (opts *copyOptions) run(args []string, stdout io.Writer) (retErr error) {\n\tif len(args) != 2 {\n\t\treturn errorShouldDisplayUsage{errors.New(\"Exactly two arguments expected\")}\n\t}\n\topts.deprecatedTLSVerify.warnIfUsed([]string{\"--src-tls-verify\", \"--dest-tls-verify\"})\n\timageNames := args\n\n\tif err := reexecIfNecessaryForImages(imageNames...); err != nil {\n\t\treturn err\n\t}\n\n\tpolicyContext, err := opts.global.getPolicyContext()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error loading trust policy: %v\", err)\n\t}\n\tdefer func() {\n\t\tif err := policyContext.Destroy(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"tearing down policy context\", err)\n\t\t}\n\t}()\n\n\tsrcRef, err := alltransports.ParseImageName(imageNames[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Invalid source name %s: %v\", imageNames[0], err)\n\t}\n\tdestRef, err := alltransports.ParseImageName(imageNames[1])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Invalid destination name %s: %v\", imageNames[1], err)\n\t}\n\n\tsourceCtx, err := opts.srcImage.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdestinationCtx, err := opts.destImage.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, image := range opts.additionalTags {\n\t\tref, err := reference.ParseNormalizedNamed(image)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing additional-tag '%s': %v\", image, err)\n\t\t}\n\t\tnamedTagged, isNamedTagged := ref.(reference.NamedTagged)\n\t\tif !isNamedTagged {\n\t\t\treturn fmt.Errorf(\"additional-tag '%s' must be a tagged reference\", image)\n\t\t}\n\t\tdestinationCtx.DockerArchiveAdditionalTags = append(destinationCtx.DockerArchiveAdditionalTags, namedTagged)\n\t}\n\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\tif opts.quiet {\n\t\tstdout = nil\n\t}\n\n\timageListSelection := copy.CopySystemImage\n\tif opts.multiArch.Present() && opts.all {\n\t\treturn fmt.Errorf(\"Cannot use --all and --multi-arch flags together\")\n\t}\n\tif opts.multiArch.Present() {\n\t\timageListSelection, err = parseMultiArch(opts.multiArch.Value())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif opts.all {\n\t\timageListSelection = copy.CopyAllImages\n\t}\n\n\tif len(opts.encryptionKeys) > 0 && len(opts.decryptionKeys) > 0 {\n\t\treturn fmt.Errorf(\"--encryption-key and --decryption-key cannot be specified together\")\n\t}\n\n\tvar encLayers *[]int\n\tvar encConfig *encconfig.EncryptConfig\n\tvar decConfig *encconfig.DecryptConfig\n\n\tif len(opts.encryptLayer) > 0 && len(opts.encryptionKeys) == 0 {\n\t\treturn fmt.Errorf(\"--encrypt-layer can only be used with --encryption-key\")\n\t}\n\n\tif len(opts.encryptionKeys) > 0 {\n\t\t// encryption\n\t\tp := opts.encryptLayer\n\t\tencLayers = &p\n\t\tencryptionKeys := opts.encryptionKeys\n\t\tecc, err := enchelpers.CreateCryptoConfig(encryptionKeys, []string{})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Invalid encryption keys: %v\", err)\n\t\t}\n\t\tcc := encconfig.CombineCryptoConfigs([]encconfig.CryptoConfig{ecc})\n\t\tencConfig = cc.EncryptConfig\n\t}\n\n\tif len(opts.decryptionKeys) > 0 {\n\t\t// decryption\n\t\tdecryptionKeys := opts.decryptionKeys\n\t\tdcc, err := enchelpers.CreateCryptoConfig([]string{}, decryptionKeys)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Invalid decryption keys: %v\", err)\n\t\t}\n\t\tcc := encconfig.CombineCryptoConfigs([]encconfig.CryptoConfig{dcc})\n\t\tdecConfig = cc.DecryptConfig\n\t}\n\n\tvar signIdentity reference.Named = nil\n\tif opts.signIdentity != \"\" {\n\t\tsignIdentity, err = reference.ParseNamed(opts.signIdentity)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Could not parse --sign-identity: %v\", err)\n\t\t}\n\t}\n\n\topts.destImage.warnAboutIneffectiveOptions(destRef.Transport())\n\n\tcopyOpts, cleanupOptions, err := opts.copy.copyOptions(stdout)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer cleanupOptions()\n\tcopyOpts.SignIdentity = signIdentity\n\tcopyOpts.SourceCtx = sourceCtx\n\tcopyOpts.DestinationCtx = destinationCtx\n\tcopyOpts.ImageListSelection = imageListSelection\n\tcopyOpts.OciDecryptConfig = decConfig\n\tcopyOpts.OciEncryptLayers = encLayers\n\tcopyOpts.OciEncryptConfig = encConfig\n\tcopyOpts.MaxParallelDownloads = opts.imageParallelCopies\n\tcopyOpts.ForceCompressionFormat = opts.destImage.forceCompressionFormat\n\n\treturn retry.IfNecessary(ctx, func() error {\n\t\tmanifestBytes, err := copy.Image(ctx, policyContext, destRef, srcRef, copyOpts)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif opts.digestFile != \"\" {\n\t\t\tmanifestDigest, err := manifest.Digest(manifestBytes)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err = os.WriteFile(opts.digestFile, []byte(manifestDigest.String()), 0o644); err != nil {\n\t\t\t\treturn fmt.Errorf(\"Failed to write digest to file %q: %w\", opts.digestFile, err)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}, opts.retryOpts)\n}\n"
  },
  {
    "path": "cmd/skopeo/copy_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestCopy(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\"},\n\t\t{\"a1\", \"a2\", \"a3\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"--insecure-policy\", \"copy\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Exactly two arguments expected\")\n\t}\n\n\t// FIXME: Much more test coverage\n\t// Actual feature tests exist in integration and systemtest\n}\n"
  },
  {
    "path": "cmd/skopeo/delete.go",
    "content": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n)\n\ntype deleteOptions struct {\n\tglobal    *globalOptions\n\timage     *imageOptions\n\tretryOpts *retry.Options\n}\n\nfunc deleteCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\timageFlags, imageOpts := imageFlags(global, sharedOpts, nil, \"\", \"\")\n\tretryFlags, retryOpts := retryFlags()\n\topts := deleteOptions{\n\t\tglobal:    global,\n\t\timage:     imageOpts,\n\t\tretryOpts: retryOpts,\n\t}\n\tcmd := &cobra.Command{\n\t\tUse:   \"delete [command options] IMAGE-NAME\",\n\t\tShort: \"Delete image IMAGE-NAME\",\n\t\tLong: fmt.Sprintf(`Delete an \"IMAGE_NAME\" from a transport\nSupported transports:\n%s\nSee skopeo(1) section \"IMAGE NAMES\" for the expected format\n`, strings.Join(transports.ListNames(), \", \")),\n\t\tRunE:              commandAction(opts.run),\n\t\tExample:           `skopeo delete docker://registry.example.com/example/pause:latest`,\n\t\tValidArgsFunction: autocompleteImageNames,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&imageFlags)\n\tflags.AddFlagSet(&retryFlags)\n\treturn cmd\n}\n\nfunc (opts *deleteOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 1 {\n\t\treturn errors.New(\"Usage: delete imageReference\")\n\t}\n\timageName := args[0]\n\n\tif err := reexecIfNecessaryForImages(imageName); err != nil {\n\t\treturn err\n\t}\n\n\tref, err := alltransports.ParseImageName(imageName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Invalid source name %s: %v\", imageName, err)\n\t}\n\n\tsys, err := opts.image.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\treturn retry.IfNecessary(ctx, func() error {\n\t\treturn ref.DeleteImage(ctx, sys)\n\t}, opts.retryOpts)\n}\n"
  },
  {
    "path": "cmd/skopeo/fixtures/.gitignore",
    "content": "/*.gpg~\n/.gpg-v21-migrated\n/private-keys-v1.d\n/random_seed\n"
  },
  {
    "path": "cmd/skopeo/fixtures/empty.passphrase",
    "content": ""
  },
  {
    "path": "cmd/skopeo/fixtures/image.manifest.json",
    "content": "{\n    \"schemaVersion\": 2,\n    \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n    \"config\": {\n        \"mediaType\": \"application/vnd.docker.container.image.v1+json\",\n        \"size\": 7023,\n        \"digest\": \"sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7\"\n    },\n    \"layers\": [\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 32654,\n            \"digest\": \"sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f\"\n        },\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 16724,\n            \"digest\": \"sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b\"\n        },\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 73109,\n            \"digest\": \"sha256:ec4b8955958665577945c89419d1af06b5f7636b4ac3da7f12184802ad867736\"\n        }\n    ]\n}"
  },
  {
    "path": "cmd/skopeo/fixtures/v2s1-invalid-signatures.manifest.json",
    "content": "{\n   \"schemaVersion\": 1,\n   \"name\": \"mitr/buxybox\",\n   \"tag\": \"latest\",\n   \"architecture\": \"amd64\",\n   \"fsLayers\": [\n   ],\n   \"history\": [\n   ],\n   \"signatures\": 1\n}\n"
  },
  {
    "path": "cmd/skopeo/generate_sigstore_key.go",
    "content": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/image/v5/pkg/cli\"\n\t\"go.podman.io/image/v5/signature/sigstore\"\n)\n\ntype generateSigstoreKeyOptions struct {\n\toutputPrefix   string\n\tpassphraseFile string\n}\n\nfunc generateSigstoreKeyCmd() *cobra.Command {\n\tvar opts generateSigstoreKeyOptions\n\tcmd := &cobra.Command{\n\t\tUse:     \"generate-sigstore-key [command options] --output-prefix PREFIX\",\n\t\tShort:   \"Generate a sigstore public/private key pair\",\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: \"skopeo generate-sigstore-key --output-prefix my-key\",\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.StringVar(&opts.outputPrefix, \"output-prefix\", \"\", \"Write the keys to `PREFIX`.pub and `PREFIX`.private\")\n\tflags.StringVar(&opts.passphraseFile, \"passphrase-file\", \"\", \"Read a passphrase for the private key from `PATH`\")\n\treturn cmd\n}\n\n// ensurePathDoesNotExist verifies that path does not refer to an existing file,\n// and returns an error if so.\nfunc ensurePathDoesNotExist(path string) error {\n\tswitch _, err := os.Stat(path); {\n\tcase err == nil:\n\t\treturn fmt.Errorf(\"Refusing to overwrite existing %q\", path)\n\tcase errors.Is(err, fs.ErrNotExist):\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"Error checking existence of %q: %w\", path, err)\n\t}\n}\n\nfunc (opts *generateSigstoreKeyOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 0 || opts.outputPrefix == \"\" {\n\t\treturn errors.New(\"Usage: generate-sigstore-key --output-prefix PREFIX\")\n\t}\n\n\tpubKeyPath := opts.outputPrefix + \".pub\"\n\tprivateKeyPath := opts.outputPrefix + \".private\"\n\tif err := ensurePathDoesNotExist(pubKeyPath); err != nil {\n\t\treturn err\n\t}\n\tif err := ensurePathDoesNotExist(privateKeyPath); err != nil {\n\t\treturn err\n\t}\n\n\tvar passphrase string\n\tif opts.passphraseFile != \"\" {\n\t\tp, err := cli.ReadPassphraseFile(opts.passphraseFile)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpassphrase = p\n\t} else {\n\t\tp, err := promptForPassphrase(privateKeyPath, os.Stdin, os.Stdout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpassphrase = p\n\t}\n\n\tkeys, err := sigstore.GenerateKeyPair([]byte(passphrase))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error generating key pair: %w\", err)\n\t}\n\n\tif err := os.WriteFile(privateKeyPath, keys.PrivateKey, 0o600); err != nil {\n\t\treturn fmt.Errorf(\"Error writing private key to %q: %w\", privateKeyPath, err)\n\t}\n\tif err := os.WriteFile(pubKeyPath, keys.PublicKey, 0o644); err != nil {\n\t\treturn fmt.Errorf(\"Error writing private key to %q: %w\", pubKeyPath, err)\n\t}\n\tfmt.Fprintf(stdout, \"Key written to %q and %q\\n\", privateKeyPath, pubKeyPath)\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/skopeo/generate_sigstore_key_test.go",
    "content": "package main\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestGenerateSigstoreKey(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"--output-prefix\", \"foo\", \"a1\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"generate-sigstore-key\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Usage\")\n\t}\n\n\t// One of the destination files already exists\n\toutputSuffixes := []string{\".pub\", \".private\"}\n\tfor _, suffix := range outputSuffixes {\n\t\tdir := t.TempDir()\n\t\tprefix := filepath.Join(dir, \"prefix\")\n\t\terr := os.WriteFile(prefix+suffix, []byte{}, 0o600)\n\t\trequire.NoError(t, err)\n\t\tout, err := runSkopeo(\"generate-sigstore-key\",\n\t\t\t\"--output-prefix\", prefix, \"--passphrase-file\", \"/dev/null\",\n\t\t)\n\t\tassertTestFailed(t, out, err, \"Refusing to overwrite\")\n\t}\n\n\t// One of the destinations is inaccessible (simulate by a symlink that tries to\n\t// traverse a non-directory)\n\tfor _, suffix := range outputSuffixes {\n\t\tdir := t.TempDir()\n\t\tnonDirectory := filepath.Join(dir, \"nondirectory\")\n\t\terr := os.WriteFile(nonDirectory, []byte{}, 0o600)\n\t\trequire.NoError(t, err)\n\t\tprefix := filepath.Join(dir, \"prefix\")\n\t\terr = os.Symlink(filepath.Join(nonDirectory, \"unaccessible\"), prefix+suffix)\n\t\trequire.NoError(t, err)\n\t\tout, err := runSkopeo(\"generate-sigstore-key\",\n\t\t\t\"--output-prefix\", prefix, \"--passphrase-file\", \"/dev/null\",\n\t\t)\n\t\tassertTestFailed(t, out, err, prefix+suffix) // + an OS-specific error message\n\t}\n\tdestDir := t.TempDir()\n\t// Error reading passphrase\n\tout, err := runSkopeo(\"generate-sigstore-key\",\n\t\t\"--output-prefix\", filepath.Join(destDir, \"prefix\"),\n\t\t\"--passphrase-file\", filepath.Join(destDir, \"this-does-not-exist\"),\n\t)\n\tassertTestFailed(t, out, err, \"this-does-not-exist\")\n\n\t// (The interactive passphrase prompting is not yet tested)\n\n\t// Error writing outputs is untested: when unit tests run as root, we can’t use permissions on a directory to cause write failures,\n\t// with the --output-prefix mechanism, and refusing to even start writing to pre-exisiting files, directories are the only mechanism\n\t// we have to trigger a write failure.\n\n\t// Success\n\t// Just a smoke-test, usability of the keys is tested in the generate implementation.\n\tdir := t.TempDir()\n\tprefix := filepath.Join(dir, \"prefix\")\n\tpassphraseFile := filepath.Join(dir, \"passphrase\")\n\terr = os.WriteFile(passphraseFile, []byte(\"some passphrase\"), 0o600)\n\trequire.NoError(t, err)\n\tout, err = runSkopeo(\"generate-sigstore-key\",\n\t\t\"--output-prefix\", prefix, \"--passphrase-file\", passphraseFile,\n\t)\n\tassert.NoError(t, err)\n\tfor _, suffix := range outputSuffixes {\n\t\tassert.Contains(t, out, prefix+suffix)\n\t}\n}\n"
  },
  {
    "path": "cmd/skopeo/inspect/output.go",
    "content": "package inspect\n\nimport (\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Output is the output format of (skopeo inspect),\n// primarily so that we can format it with a simple json.MarshalIndent.\ntype Output struct {\n\tName          string `json:\",omitempty\"`\n\tTag           string `json:\",omitempty\"`\n\tDigest        digest.Digest\n\tRepoTags      []string\n\tCreated       *time.Time\n\tDockerVersion string\n\tLabels        map[string]string\n\tArchitecture  string\n\tOs            string\n\tLayers        []string\n\tLayersData    []types.ImageInspectLayer\n\tEnv           []string\n}\n"
  },
  {
    "path": "cmd/skopeo/inspect.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/containers/skopeo/cmd/skopeo/inspect\"\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\t\"github.com/opencontainers/go-digest\"\n\tv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/report\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/image\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype inspectOptions struct {\n\tglobal         *globalOptions\n\timage          *imageOptions\n\tretryOpts      *retry.Options\n\tformat         string\n\traw            bool             // Output the raw manifest instead of parsing information about the image\n\tconfig         bool             // Output the raw config blob instead of parsing information about the image\n\tdoNotListTags  bool             // Do not list all tags available in the same repository\n\tmanifestDigest digest.Algorithm // Algorithm to use for computing manifest digest\n}\n\nfunc inspectCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\timageFlags, imageOpts := imageFlags(global, sharedOpts, nil, \"\", \"\")\n\tretryFlags, retryOpts := retryFlags()\n\topts := inspectOptions{\n\t\tglobal:    global,\n\t\timage:     imageOpts,\n\t\tretryOpts: retryOpts,\n\t}\n\tcmd := &cobra.Command{\n\t\tUse:   \"inspect [command options] IMAGE-NAME\",\n\t\tShort: \"Inspect image IMAGE-NAME\",\n\t\tLong: fmt.Sprintf(`Return low-level information about \"IMAGE-NAME\" in a registry/transport\nSupported transports:\n%s\n\nSee skopeo(1) section \"IMAGE NAMES\" for the expected format\n`, strings.Join(transports.ListNames(), \", \")),\n\t\tRunE: commandAction(opts.run),\n\t\tExample: `skopeo inspect docker://registry.fedoraproject.org/fedora\nskopeo inspect --config docker://docker.io/alpine\nskopeo inspect --format \"Name: {{.Name}} Digest: {{.Digest}}\" docker://registry.access.redhat.com/ubi8`,\n\t\tValidArgsFunction: autocompleteImageNames,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&imageFlags)\n\tflags.AddFlagSet(&retryFlags)\n\tflags.BoolVar(&opts.raw, \"raw\", false, \"output raw manifest or configuration\")\n\tflags.BoolVar(&opts.config, \"config\", false, \"output configuration\")\n\tflags.StringVarP(&opts.format, \"format\", \"f\", \"\", \"Format the output to a Go template\")\n\tflags.BoolVarP(&opts.doNotListTags, \"no-tags\", \"n\", false, \"Do not list the available tags from the repository in the output\")\n\tflags.Var(newAlgorithmValue(&opts.manifestDigest), \"manifest-digest\", \"Algorithm to use for computing manifest digest (sha256, sha512); defaults to algorithm used in config digest\")\n\treturn cmd\n}\n\nfunc (opts *inspectOptions) run(args []string, stdout io.Writer) (retErr error) {\n\tvar (\n\t\trawManifest []byte\n\t\tsrc         types.ImageSource\n\t\timgInspect  *types.ImageInspectInfo\n\t)\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\tif len(args) != 1 {\n\t\treturn errors.New(\"Exactly one argument expected\")\n\t}\n\tif opts.raw && opts.format != \"\" {\n\t\treturn errors.New(\"raw output does not support format option\")\n\t}\n\timageName := args[0]\n\n\tif err := reexecIfNecessaryForImages(imageName); err != nil {\n\t\treturn err\n\t}\n\n\tsys, err := opts.image.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := retry.IfNecessary(ctx, func() error {\n\t\tsrc, err = parseImageSource(ctx, opts.image, imageName)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn fmt.Errorf(\"Error parsing image name %q: %w\", imageName, err)\n\t}\n\n\tdefer func() {\n\t\tif err := src.Close(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"closing image\", err)\n\t\t}\n\t}()\n\n\tunparsedInstance := image.UnparsedInstance(src, nil)\n\tif err := retry.IfNecessary(ctx, func() error {\n\t\trawManifest, _, err = unparsedInstance.Manifest(ctx)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn fmt.Errorf(\"Error retrieving manifest for image: %w\", err)\n\t}\n\n\tif opts.raw && !opts.config {\n\t\t_, err := stdout.Write(rawManifest)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error writing manifest to standard output: %w\", err)\n\t\t}\n\n\t\treturn nil\n\t}\n\n\timg, err := image.FromUnparsedImage(ctx, sys, unparsedInstance)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error parsing manifest for image: %w\", err)\n\t}\n\n\tif opts.config && opts.raw {\n\t\tvar configBlob []byte\n\t\tif err := retry.IfNecessary(ctx, func() error {\n\t\t\tconfigBlob, err = img.ConfigBlob(ctx)\n\t\t\treturn err\n\t\t}, opts.retryOpts); err != nil {\n\t\t\treturn fmt.Errorf(\"Error reading configuration blob: %w\", err)\n\t\t}\n\t\t_, err = stdout.Write(configBlob)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error writing configuration blob to standard output: %w\", err)\n\t\t}\n\t\treturn nil\n\t} else if opts.config {\n\t\tvar config *v1.Image\n\t\tif err := retry.IfNecessary(ctx, func() error {\n\t\t\tconfig, err = img.OCIConfig(ctx)\n\t\t\treturn err\n\t\t}, opts.retryOpts); err != nil {\n\t\t\treturn fmt.Errorf(\"Error reading OCI-formatted configuration data: %w\", err)\n\t\t}\n\t\tif err := opts.writeOutput(stdout, config); err != nil {\n\t\t\treturn fmt.Errorf(\"Error writing OCI-formatted configuration data to standard output: %w\", err)\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := retry.IfNecessary(ctx, func() error {\n\t\timgInspect, err = img.Inspect(ctx)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn err\n\t}\n\n\toutputData := inspect.Output{\n\t\tName: \"\", // Set below if DockerReference() is known\n\t\tTag:  imgInspect.Tag,\n\t\t// Digest is set below.\n\t\tRepoTags:      []string{}, // Possibly overridden for docker.Transport.\n\t\tCreated:       imgInspect.Created,\n\t\tDockerVersion: imgInspect.DockerVersion,\n\t\tLabels:        imgInspect.Labels,\n\t\tArchitecture:  imgInspect.Architecture,\n\t\tOs:            imgInspect.Os,\n\t\tLayers:        imgInspect.Layers,\n\t\tLayersData:    imgInspect.LayersData,\n\t\tEnv:           imgInspect.Env,\n\t}\n\toutputData.Digest, err = manifestDigestFromManifest(rawManifest, img, opts.manifestDigest)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error computing manifest digest: %w\", err)\n\t}\n\tif dockerRef := img.Reference().DockerReference(); dockerRef != nil {\n\t\toutputData.Name = dockerRef.Name()\n\t}\n\tif !opts.doNotListTags && img.Reference().Transport() == docker.Transport {\n\t\tsys, err := opts.image.newSystemContext()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\toutputData.RepoTags, err = docker.GetRepositoryTags(ctx, sys, img.Reference())\n\t\tif err != nil {\n\t\t\t// Some registries may decide to block the \"list all tags\" endpoint;\n\t\t\t// gracefully allow the inspect to continue in this case:\n\t\t\tfatalFailure := true\n\t\t\t// - AWS ECR rejects it if the \"ecr:ListImages\" action is not allowed.\n\t\t\t//   https://github.com/containers/skopeo/issues/726\n\t\t\tvar ec errcode.ErrorCoder\n\t\t\tif ok := errors.As(err, &ec); ok && ec.ErrorCode() == errcode.ErrorCodeDenied {\n\t\t\t\tfatalFailure = false\n\t\t\t}\n\t\t\t// - public.ecr.aws does not implement the endpoint at all, and fails with 404:\n\t\t\t//   https://github.com/containers/skopeo/issues/1230\n\t\t\t//   This is actually \"code\":\"NOT_FOUND\", and the parser doesn’t preserve that.\n\t\t\t//   So, also check the error text.\n\t\t\tif ok := errors.As(err, &ec); ok && ec.ErrorCode() == errcode.ErrorCodeUnknown {\n\t\t\t\tvar e errcode.Error\n\t\t\t\tif ok := errors.As(err, &e); ok && e.Code == errcode.ErrorCodeUnknown && e.Message == \"404 page not found\" {\n\t\t\t\t\tfatalFailure = false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif fatalFailure {\n\t\t\t\treturn fmt.Errorf(\"Error determining repository tags: %w\", err)\n\t\t\t}\n\t\t\tlogrus.Warnf(\"Registry disallows tag list retrieval; skipping\")\n\t\t}\n\t}\n\treturn opts.writeOutput(stdout, outputData)\n}\n\n// writeOutput writes data depending on opts.format to stdout\nfunc (opts *inspectOptions) writeOutput(stdout io.Writer, data any) error {\n\tif report.IsJSON(opts.format) || opts.format == \"\" {\n\t\tout, err := json.MarshalIndent(data, \"\", \"    \")\n\t\tif err == nil {\n\t\t\tfmt.Fprintf(stdout, \"%s\\n\", string(out))\n\t\t}\n\t\treturn err\n\t}\n\n\trpt, err := report.New(stdout, \"skopeo inspect\").Parse(report.OriginUser, opts.format)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer rpt.Flush()\n\treturn rpt.Execute([]any{data})\n}\n\nfunc manifestDigestFromManifest(manifestBlob []byte, img types.Image, userAlgorithm digest.Algorithm) (digest.Digest, error) {\n\tif userAlgorithm != \"\" {\n\t\tif !userAlgorithm.Available() {\n\t\t\treturn \"\", fmt.Errorf(\"digest algorithm %q is not available\", userAlgorithm)\n\t\t}\n\t\treturn manifest.DigestWithAlgorithm(manifestBlob, userAlgorithm)\n\t}\n\n\tconfigInfo := img.ConfigInfo()\n\tif configInfo.Digest != \"\" {\n\t\talg := configInfo.Digest.Algorithm()\n\t\tif !alg.Available() {\n\t\t\treturn \"\", fmt.Errorf(\"config digest algorithm %q is not available\", alg)\n\t\t}\n\t\treturn manifest.DigestWithAlgorithm(manifestBlob, alg)\n\t}\n\n\treturn manifest.Digest(manifestBlob)\n}\n\ntype algorithmValue digest.Algorithm\n\nfunc newAlgorithmValue(alg *digest.Algorithm) *algorithmValue {\n\treturn (*algorithmValue)(alg)\n}\n\nfunc (a *algorithmValue) Set(value string) error {\n\talgorithm := digest.Algorithm(value)\n\n\t*a = algorithmValue(algorithm)\n\tif algorithm == \"\" {\n\t\t*a = algorithmValue(digest.Canonical)\n\t}\n\n\treturn nil\n}\n\nfunc (a *algorithmValue) String() string {\n\treturn digest.Algorithm(*a).String()\n}\n\nfunc (a *algorithmValue) Type() string {\n\treturn \"algorithm\"\n}\n"
  },
  {
    "path": "cmd/skopeo/layers.go",
    "content": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/directory\"\n\t\"go.podman.io/image/v5/image\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype layersOptions struct {\n\tglobal    *globalOptions\n\timage     *imageOptions\n\tretryOpts *retry.Options\n}\n\nfunc layersCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\timageFlags, imageOpts := imageFlags(global, sharedOpts, nil, \"\", \"\")\n\tretryFlags, retryOpts := retryFlags()\n\topts := layersOptions{\n\t\tglobal:    global,\n\t\timage:     imageOpts,\n\t\tretryOpts: retryOpts,\n\t}\n\tcmd := &cobra.Command{\n\t\tHidden: true,\n\t\tUse:    \"layers [command options] IMAGE-NAME [LAYER...]\",\n\t\tShort:  \"Get layers of IMAGE-NAME\",\n\t\tRunE:   commandAction(opts.run),\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&imageFlags)\n\tflags.AddFlagSet(&retryFlags)\n\treturn cmd\n}\n\nfunc (opts *layersOptions) run(args []string, stdout io.Writer) (retErr error) {\n\tfmt.Fprintln(os.Stderr, `DEPRECATED: skopeo layers is deprecated in favor of skopeo copy`)\n\tif len(args) == 0 {\n\t\treturn errors.New(\"Usage: layers imageReference [layer...]\")\n\t}\n\timageName := args[0]\n\n\tif err := reexecIfNecessaryForImages(imageName); err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\tsys, err := opts.image.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\tcache := blobinfocache.DefaultCache(sys)\n\tvar (\n\t\trawSource types.ImageSource\n\t\tsrc       types.ImageCloser\n\t)\n\tif err = retry.IfNecessary(ctx, func() error {\n\t\trawSource, err = parseImageSource(ctx, opts.image, imageName)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn err\n\t}\n\tif err = retry.IfNecessary(ctx, func() error {\n\t\tsrc, err = image.FromSource(ctx, sys, rawSource)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\tif closeErr := rawSource.Close(); closeErr != nil {\n\t\t\treturn fmt.Errorf(\"%w (closing image source: %v)\", err, closeErr)\n\t\t}\n\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err := src.Close(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"closing image\", err)\n\t\t}\n\t}()\n\n\ttype blobDigest struct {\n\t\tdigest   digest.Digest\n\t\tisConfig bool\n\t}\n\tvar blobDigests []blobDigest\n\tfor _, dString := range args[1:] {\n\t\tif !strings.HasPrefix(dString, \"sha256:\") {\n\t\t\tdString = \"sha256:\" + dString\n\t\t}\n\t\td, err := digest.Parse(dString)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tblobDigests = append(blobDigests, blobDigest{digest: d, isConfig: false})\n\t}\n\n\tif len(blobDigests) == 0 {\n\t\tlayers := src.LayerInfos()\n\t\tseenLayers := map[digest.Digest]struct{}{}\n\t\tfor _, info := range layers {\n\t\t\tif _, ok := seenLayers[info.Digest]; !ok {\n\t\t\t\tblobDigests = append(blobDigests, blobDigest{digest: info.Digest, isConfig: false})\n\t\t\t\tseenLayers[info.Digest] = struct{}{}\n\t\t\t}\n\t\t}\n\t\tconfigInfo := src.ConfigInfo()\n\t\tif configInfo.Digest != \"\" {\n\t\t\tblobDigests = append(blobDigests, blobDigest{digest: configInfo.Digest, isConfig: true})\n\t\t}\n\t}\n\n\ttmpDir, err := os.MkdirTemp(\".\", \"layers-\")\n\tif err != nil {\n\t\treturn err\n\t}\n\ttmpDirRef, err := directory.NewReference(tmpDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdest, err := tmpDirRef.NewImageDestination(ctx, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\tif err := dest.Close(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"closing destination\", err)\n\t\t}\n\t}()\n\n\tfor _, bd := range blobDigests {\n\t\tvar (\n\t\t\tr        io.ReadCloser\n\t\t\tblobSize int64\n\t\t)\n\t\tif err = retry.IfNecessary(ctx, func() error {\n\t\t\tr, blobSize, err = rawSource.GetBlob(ctx, types.BlobInfo{Digest: bd.digest, Size: -1}, cache)\n\t\t\treturn err\n\t\t}, opts.retryOpts); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer func() {\n\t\t\tif err := r.Close(); err != nil {\n\t\t\t\tretErr = noteCloseFailure(retErr, fmt.Sprintf(\"closing blob %q\", bd.digest.String()), err)\n\t\t\t}\n\t\t}()\n\t\tverifier := bd.digest.Verifier()\n\t\ttr := io.TeeReader(r, verifier)\n\t\tif _, err := dest.PutBlob(ctx, tr, types.BlobInfo{Digest: bd.digest, Size: blobSize}, cache, bd.isConfig); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err := io.Copy(io.Discard, tr); err != nil { // Ensure we process all of tr, so that we can validate the digest.\n\t\t\treturn err\n\t\t}\n\t\tif !verifier.Verified() {\n\t\t\treturn fmt.Errorf(\"corrupt blob %q\", bd.digest.String())\n\t\t}\n\t}\n\n\tvar manifest []byte\n\tif err = retry.IfNecessary(ctx, func() error {\n\t\tmanifest, _, err = src.Manifest(ctx)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn err\n\t}\n\tif err := dest.PutManifest(ctx, manifest, nil); err != nil {\n\t\treturn err\n\t}\n\n\treturn dest.Commit(ctx, image.UnparsedInstance(rawSource, nil))\n}\n"
  },
  {
    "path": "cmd/skopeo/list_tags.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/docker/archive\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// tagListOutput is the output format of (skopeo list-tags), primarily so that we can format it with a simple json.MarshalIndent.\ntype tagListOutput struct {\n\tRepository string `json:\",omitempty\"`\n\tTags       []string\n}\n\ntype tagsOptions struct {\n\tglobal    *globalOptions\n\timage     *imageOptions\n\tretryOpts *retry.Options\n}\n\nvar transportHandlers = map[string]func(ctx context.Context, sys *types.SystemContext, opts *tagsOptions, userInput string) (repositoryName string, tagListing []string, err error){\n\tdocker.Transport.Name():  listDockerRepoTags,\n\tarchive.Transport.Name(): listDockerArchiveTags,\n}\n\n// supportedTransports returns all the supported transports\nfunc supportedTransports(joinStr string) string {\n\tres := slices.Sorted(maps.Keys(transportHandlers))\n\treturn strings.Join(res, joinStr)\n}\n\nfunc tagsCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\timageFlags, imageOpts := dockerImageFlags(global, sharedOpts, nil, \"\", \"\")\n\tretryFlags, retryOpts := retryFlags()\n\n\topts := tagsOptions{\n\t\tglobal:    global,\n\t\timage:     imageOpts,\n\t\tretryOpts: retryOpts,\n\t}\n\n\tcmd := &cobra.Command{\n\t\tUse:   \"list-tags [command options] SOURCE-IMAGE\",\n\t\tShort: \"List tags in the transport/repository specified by the SOURCE-IMAGE\",\n\t\tLong: `Return the list of tags from the transport/repository \"SOURCE-IMAGE\"\n\nSupported transports:\n` + supportedTransports(\" \") + `\n\nSee skopeo-list-tags(1) section \"REPOSITORY NAMES\" for the expected format\n`,\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: `skopeo list-tags docker://docker.io/fedora`,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&imageFlags)\n\tflags.AddFlagSet(&retryFlags)\n\treturn cmd\n}\n\n// Customized version of the alltransports.ParseImageName and docker.ParseReference that does not place a default tag in the reference\n// Would really love to not have this, but needed to enforce tag-less and digest-less names\nfunc parseDockerRepositoryReference(refString string) (types.ImageReference, error) {\n\tdockerRefString, ok := strings.CutPrefix(refString, docker.Transport.Name()+\"://\")\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"docker: image reference %s does not start with %s://\", refString, docker.Transport.Name())\n\t}\n\n\tref, err := reference.ParseNormalizedNamed(dockerRefString)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !reference.IsNameOnly(ref) {\n\t\treturn nil, errors.New(`No tag or digest allowed in reference`)\n\t}\n\n\t// Checks ok, now return a reference. This is a hack because the tag listing code expects a full image reference even though the tag is ignored\n\treturn docker.NewReference(reference.TagNameOnly(ref))\n}\n\n// List the tags from a repository contained in the imgRef reference. Any tag value in the reference is ignored\nfunc listDockerTags(ctx context.Context, sys *types.SystemContext, imgRef types.ImageReference) (string, []string, error) {\n\trepositoryName := imgRef.DockerReference().Name()\n\n\ttags, err := docker.GetRepositoryTags(ctx, sys, imgRef)\n\tif err != nil {\n\t\treturn ``, nil, fmt.Errorf(\"Error listing repository tags: %w\", err)\n\t}\n\treturn repositoryName, tags, nil\n}\n\n// return the tagLists from a docker repo\nfunc listDockerRepoTags(ctx context.Context, sys *types.SystemContext, opts *tagsOptions, userInput string) (repositoryName string, tagListing []string, err error) {\n\t// Do transport-specific parsing and validation to get an image reference\n\timgRef, err := parseDockerRepositoryReference(userInput)\n\tif err != nil {\n\t\treturn\n\t}\n\tif err = retry.IfNecessary(ctx, func() error {\n\t\trepositoryName, tagListing, err = listDockerTags(ctx, sys, imgRef)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn\n\t}\n\treturn\n}\n\n// return the tagLists from a docker archive file\nfunc listDockerArchiveTags(_ context.Context, sys *types.SystemContext, _ *tagsOptions, userInput string) (repositoryName string, tagListing []string, err error) {\n\tref, err := alltransports.ParseImageName(userInput)\n\tif err != nil {\n\t\treturn\n\t}\n\n\ttarReader, _, err := archive.NewReaderForReference(sys, ref)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer tarReader.Close()\n\n\timageRefs, err := tarReader.List()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar repoTags []string\n\tfor imageIndex, items := range imageRefs {\n\t\tfor _, ref := range items {\n\t\t\trepoTags, err = tarReader.ManifestTagsForReference(ref)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// handle for each untagged image\n\t\t\tif len(repoTags) == 0 {\n\t\t\t\trepoTags = []string{fmt.Sprintf(\"@%d\", imageIndex)}\n\t\t\t}\n\t\t\ttagListing = append(tagListing, repoTags...)\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc (opts *tagsOptions) run(args []string, stdout io.Writer) (retErr error) {\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\tif len(args) != 1 {\n\t\treturn errorShouldDisplayUsage{errors.New(\"Exactly one non-option argument expected\")}\n\t}\n\n\tsys, err := opts.image.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttransport := alltransports.TransportFromImageName(args[0])\n\tif transport == nil {\n\t\treturn fmt.Errorf(\"Invalid %q: does not specify a transport\", args[0])\n\t}\n\n\tvar repositoryName string\n\tvar tagListing []string\n\n\tif val, ok := transportHandlers[transport.Name()]; ok {\n\t\trepositoryName, tagListing, err = val(ctx, sys, opts, args[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\treturn fmt.Errorf(\"Unsupported transport '%s' for tag listing. Only supported: %s\",\n\t\t\ttransport.Name(), supportedTransports(\", \"))\n\t}\n\n\toutputData := tagListOutput{\n\t\tRepository: repositoryName,\n\t\tTags:       tagListing,\n\t}\n\n\tout, err := json.MarshalIndent(outputData, \"\", \"    \")\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = fmt.Fprintf(stdout, \"%s\\n\", string(out))\n\n\treturn err\n}\n"
  },
  {
    "path": "cmd/skopeo/list_tags_test.go",
    "content": "package main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n)\n\n// Tests the kinds of inputs allowed and expected to the command\nfunc TestDockerRepositoryReferenceParser(t *testing.T) {\n\tfor _, test := range [][]string{\n\t\t{\"docker://myhost.com:1000/nginx\"}, // no tag\n\t\t{\"docker://myhost.com/nginx\"},      // no port or tag\n\t\t{\"docker://somehost.com\"},          // Valid default expansion\n\t\t{\"docker://nginx\"},                 // Valid default expansion\n\t} {\n\t\tref, err := parseDockerRepositoryReference(test[0])\n\t\trequire.NoError(t, err)\n\t\texpected, err := alltransports.ParseImageName(test[0])\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, expected.DockerReference().Name(), ref.DockerReference().Name(), \"Mismatched parse result for input %v\", test[0])\n\t}\n\n\tfor _, test := range [][]string{\n\t\t{\"oci://somedir\"},\n\t\t{\"dir:/somepath\"},\n\t\t{\"docker-archive:/tmp/dir\"},\n\t\t{\"container-storage:myhost.com/someimage\"},\n\t\t{\"docker-daemon:myhost.com/someimage\"},\n\t\t{\"docker://myhost.com:1000/nginx:foobar:foobar\"},           // Invalid repository ref\n\t\t{\"docker://somehost.com:5000/\"},                            // no repo\n\t\t{\"docker://myhost.com:1000/nginx:latest\"},                  // tag not allowed\n\t\t{\"docker://myhost.com:1000/nginx@sha256:abcdef1234567890\"}, // digest not allowed\n\t} {\n\t\t_, err := parseDockerRepositoryReference(test[0])\n\t\tassert.Error(t, err, test[0])\n\t}\n}\n\nfunc TestDockerRepositoryReferenceParserDrift(t *testing.T) {\n\tfor _, test := range [][]string{\n\t\t{\"docker://myhost.com:1000/nginx\", \"myhost.com:1000/nginx\"}, // no tag\n\t\t{\"docker://myhost.com/nginx\", \"myhost.com/nginx\"},           // no port or tag\n\t\t{\"docker://somehost.com\", \"docker.io/library/somehost.com\"}, // Valid default expansion\n\t\t{\"docker://nginx\", \"docker.io/library/nginx\"},               // Valid default expansion\n\t} {\n\t\tref, err := parseDockerRepositoryReference(test[0])\n\t\tref2, err2 := alltransports.ParseImageName(test[0])\n\n\t\tif assert.NoError(t, err, \"Could not parse, got error on %v\", test[0]) && assert.NoError(t, err2, \"Could not parse with regular parser, got error on %v\", test[0]) {\n\t\t\tassert.Equal(t, ref.DockerReference().String(), ref2.DockerReference().String(), \"Different parsing output for input %v. Repo parse = %v, regular parser = %v\", test[0], ref, ref2)\n\t\t}\n\t}\n}\n\nfunc TestListTags(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\", \"a2\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"list-tags\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Exactly one non-option argument expected\")\n\t}\n\n\t// FIXME: Much more test coverage\n\t// Actual feature tests exist in systemtest\n}\n"
  },
  {
    "path": "cmd/skopeo/login.go",
    "content": "package main\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/auth\"\n\tcommonFlag \"go.podman.io/common/pkg/flag\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype loginOptions struct {\n\tglobal    *globalOptions\n\tloginOpts auth.LoginOptions\n\ttlsVerify commonFlag.OptionalBool\n}\n\nfunc loginCmd(global *globalOptions) *cobra.Command {\n\topts := loginOptions{\n\t\tglobal: global,\n\t}\n\tcmd := &cobra.Command{\n\t\tUse:     \"login [command options] REGISTRY\",\n\t\tShort:   \"Login to a container registry\",\n\t\tLong:    \"Login to a container registry on a specified server.\",\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: `skopeo login quay.io`,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(auth.GetLoginFlags(&opts.loginOpts))\n\tcommonFlag.OptionalBoolFlag(flags, &opts.tlsVerify, \"tls-verify\", \"require HTTPS and verify certificates when accessing the registry\")\n\treturn cmd\n}\n\nfunc (opts *loginOptions) run(args []string, stdout io.Writer) error {\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\topts.loginOpts.Stdout = stdout\n\topts.loginOpts.Stdin = os.Stdin\n\topts.loginOpts.AcceptRepositories = true\n\tsys, err := opts.global.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif opts.tlsVerify.Present() {\n\t\tsys.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!opts.tlsVerify.Value())\n\t}\n\treturn auth.Login(ctx, sys, &opts.loginOpts, args)\n}\n"
  },
  {
    "path": "cmd/skopeo/login_test.go",
    "content": "package main\n\nimport (\n\t\"path/filepath\"\n\t\"testing\"\n)\n\nfunc TestLogin(t *testing.T) {\n\tdir := t.TempDir()\n\tauthFile := filepath.Join(dir, \"auth.json\")\n\tcompatAuthFile := filepath.Join(dir, \"config.json\")\n\n\t// Just a trivial smoke-test exercising one error-handling path.\n\t// We can’t test full operation without a registry, unit tests should mostly\n\t// exist in c/common/pkg/auth, not here.\n\tout, err := runSkopeo(\"login\", \"--authfile\", authFile, \"--compat-auth-file\", compatAuthFile, \"example.com\")\n\tassertTestFailed(t, out, err, \"options for paths to the credential file and to the Docker-compatible credential file can not be set simultaneously\")\n}\n"
  },
  {
    "path": "cmd/skopeo/logout.go",
    "content": "package main\n\nimport (\n\t\"io\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/auth\"\n\tcommonFlag \"go.podman.io/common/pkg/flag\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype logoutOptions struct {\n\tglobal     *globalOptions\n\tlogoutOpts auth.LogoutOptions\n\ttlsVerify  commonFlag.OptionalBool\n}\n\nfunc logoutCmd(global *globalOptions) *cobra.Command {\n\topts := logoutOptions{\n\t\tglobal: global,\n\t}\n\tcmd := &cobra.Command{\n\t\tUse:     \"logout [command options] REGISTRY\",\n\t\tShort:   \"Logout of a container registry\",\n\t\tLong:    \"Logout of a container registry on a specified server.\",\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: `skopeo logout quay.io`,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(auth.GetLogoutFlags(&opts.logoutOpts))\n\tcommonFlag.OptionalBoolFlag(flags, &opts.tlsVerify, \"tls-verify\", \"require HTTPS and verify certificates when accessing the registry\")\n\treturn cmd\n}\n\nfunc (opts *logoutOptions) run(args []string, stdout io.Writer) error {\n\topts.logoutOpts.Stdout = stdout\n\topts.logoutOpts.AcceptRepositories = true\n\tsys, err := opts.global.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif opts.tlsVerify.Present() {\n\t\tsys.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!opts.tlsVerify.Value())\n\t}\n\treturn auth.Logout(sys, &opts.logoutOpts, args)\n}\n"
  },
  {
    "path": "cmd/skopeo/logout_test.go",
    "content": "package main\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestLogout(t *testing.T) {\n\tdir := t.TempDir()\n\tauthFile := filepath.Join(dir, \"auth.json\")\n\tcompatAuthFile := filepath.Join(dir, \"config.json\")\n\n\t// Just a trivial smoke-test exercising one error-handling path.\n\t// We can’t test full operation without a registry, unit tests should mostly\n\t// exist in c/common/pkg/auth, not here.\n\terr := os.WriteFile(authFile, []byte(\"{}\"), 0o700)\n\trequire.NoError(t, err)\n\terr = os.WriteFile(compatAuthFile, []byte(\"{}\"), 0o700)\n\trequire.NoError(t, err)\n\tout, err := runSkopeo(\"logout\", \"--authfile\", authFile, \"--compat-auth-file\", compatAuthFile, \"example.com\")\n\tassertTestFailed(t, out, err, \"options for paths to the credential file and to the Docker-compatible credential file can not be set simultaneously\")\n}\n"
  },
  {
    "path": "cmd/skopeo/main.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"runtime/debug\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/containers/skopeo/version\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/spf13/cobra\"\n\tcommonFlag \"go.podman.io/common/pkg/flag\"\n\t\"go.podman.io/image/v5/pkg/cli/basetls/tlsdetails\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\nvar defaultUserAgent = \"skopeo/\" + version.Version\n\ntype globalOptions struct {\n\tdebug              bool                    // Enable debug output\n\ttlsVerify          commonFlag.OptionalBool // Require HTTPS and verify certificates (for docker: and docker-daemon:)\n\ttlsDetailsPath     string                  // Path to a containers-tls-details.yaml(5) file\n\tpolicyPath         string                  // Path to a signature verification policy file\n\tinsecurePolicy     bool                    // Use an \"allow everything\" signature verification policy\n\tregistriesDirPath  string                  // Path to a \"registries.d\" registry configuration directory\n\toverrideArch       string                  // Architecture to use for choosing images, instead of the runtime one\n\toverrideOS         string                  // OS to use for choosing images, instead of the runtime one\n\toverrideVariant    string                  // Architecture variant to use for choosing images, instead of the runtime one\n\tcommandTimeout     time.Duration           // Timeout for the command execution\n\tregistriesConfPath string                  // Path to the \"registries.conf\" file\n\ttmpDir             string                  // Path to use for big temporary files\n\tuserAgentPrefix    string                  // Prefix to add to the user agent string\n\trequireSigned      bool                    // Require any pulled image to be signed\n}\n\n// requireSubcommand returns an error if no sub command is provided\n// This was copied from podman: `github.com/containers/podman/cmd/podman/validate/args.go\n// Some small style changes to match skopeo were applied, but try to apply any\n// bugfixes there first.\nfunc requireSubcommand(cmd *cobra.Command, args []string) error {\n\tif len(args) > 0 {\n\t\tsuggestions := cmd.SuggestionsFor(args[0])\n\t\tif len(suggestions) == 0 {\n\t\t\treturn fmt.Errorf(\"Unrecognized command `%[1]s %[2]s`\\nTry '%[1]s --help' for more information\", cmd.CommandPath(), args[0])\n\t\t}\n\t\treturn fmt.Errorf(\"Unrecognized command `%[1]s %[2]s`\\n\\nDid you mean this?\\n\\t%[3]s\\n\\nTry '%[1]s --help' for more information\", cmd.CommandPath(), args[0], strings.Join(suggestions, \"\\n\\t\"))\n\t}\n\treturn fmt.Errorf(\"Missing command '%[1]s COMMAND'\\nTry '%[1]s --help' for more information\", cmd.CommandPath())\n}\n\n// createApp returns a cobra.Command, and the underlying globalOptions object, to be run or tested.\nfunc createApp() (*cobra.Command, *globalOptions) {\n\topts := globalOptions{}\n\n\trootCommand := &cobra.Command{\n\t\tUse:               \"skopeo\",\n\t\tLong:              \"Various operations with container images and container image registries\",\n\t\tRunE:              requireSubcommand,\n\t\tPersistentPreRunE: opts.before,\n\t\tSilenceUsage:      true,\n\t\tSilenceErrors:     true,\n\t\t// Hide the completion command which is provided by cobra\n\t\tCompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true},\n\t\t// This is documented to parse \"local\" (non-PersistentFlags) flags of parent commands before\n\t\t// running subcommands and handling their options. We don't really run into such cases,\n\t\t// because all of our flags on rootCommand are in PersistentFlags, except for the deprecated --tls-verify;\n\t\t// in that case we need TraverseChildren so that we can distinguish between\n\t\t// (skopeo --tls-verify inspect) (causes a warning) and (skopeo inspect --tls-verify) (no warning).\n\t\tTraverseChildren: true,\n\t}\n\t// We don’t use debug.ReadBuildInfo to automate version.Version, because that would not work well for builds from\n\t// a released tarball (e.g. RPM builds).\n\tif commit := gitCommit(); commit != \"\" {\n\t\trootCommand.Version = fmt.Sprintf(\"%s commit: %s\", version.Version, commit)\n\t} else {\n\t\trootCommand.Version = version.Version\n\t}\n\t// Override default `--version` global flag to enable `-v` shorthand\n\tvar dummyVersion bool\n\trootCommand.Flags().BoolVarP(&dummyVersion, \"version\", \"v\", false, \"Version for Skopeo\")\n\trootCommand.PersistentFlags().BoolVar(&opts.debug, \"debug\", false, \"enable debug output\")\n\trootCommand.PersistentFlags().StringVar(&opts.tlsDetailsPath, \"tls-details\", \"\", \"path to a containers-tls-details.yaml(5) file\")\n\trootCommand.PersistentFlags().StringVar(&opts.policyPath, \"policy\", \"\", \"Path to a trust policy file\")\n\trootCommand.PersistentFlags().BoolVar(&opts.insecurePolicy, \"insecure-policy\", false, \"run the tool without any policy check\")\n\trootCommand.PersistentFlags().BoolVar(&opts.requireSigned, \"require-signed\", false, \"require any pulled image to be signed\")\n\trootCommand.PersistentFlags().StringVar(&opts.registriesDirPath, \"registries.d\", \"\", \"use registry configuration files in `DIR` (e.g. for container signature storage)\")\n\trootCommand.PersistentFlags().StringVar(&opts.overrideArch, \"override-arch\", \"\", \"use `ARCH` instead of the architecture of the machine for choosing images\")\n\trootCommand.PersistentFlags().StringVar(&opts.overrideOS, \"override-os\", \"\", \"use `OS` instead of the running OS for choosing images\")\n\trootCommand.PersistentFlags().StringVar(&opts.overrideVariant, \"override-variant\", \"\", \"use `VARIANT` instead of the running architecture variant for choosing images\")\n\trootCommand.PersistentFlags().DurationVar(&opts.commandTimeout, \"command-timeout\", 0, \"timeout for the command execution\")\n\trootCommand.PersistentFlags().StringVar(&opts.registriesConfPath, \"registries-conf\", \"\", \"path to the registries.conf file\")\n\tif err := rootCommand.PersistentFlags().MarkHidden(\"registries-conf\"); err != nil {\n\t\tlogrus.Fatal(\"unable to mark registries-conf flag as hidden\")\n\t}\n\trootCommand.PersistentFlags().StringVar(&opts.tmpDir, \"tmpdir\", \"\", \"directory used to store temporary files\")\n\trootCommand.PersistentFlags().StringVar(&opts.userAgentPrefix, \"user-agent-prefix\", \"\", \"prefix to add to the user agent string\")\n\tflag := commonFlag.OptionalBoolFlag(rootCommand.Flags(), &opts.tlsVerify, \"tls-verify\", \"Require HTTPS and verify certificates when accessing the registry\")\n\tflag.Hidden = true\n\trootCommand.AddCommand(\n\t\tcopyCmd(&opts),\n\t\tdeleteCmd(&opts),\n\t\tgenerateSigstoreKeyCmd(),\n\t\tinspectCmd(&opts),\n\t\tlayersCmd(&opts),\n\t\tloginCmd(&opts),\n\t\tlogoutCmd(&opts),\n\t\tmanifestDigestCmd(),\n\t\tproxyCmd(&opts),\n\t\tsyncCmd(&opts),\n\t\tstandaloneSignCmd(),\n\t\tstandaloneVerifyCmd(),\n\t\ttagsCmd(&opts),\n\t\tuntrustedSignatureDumpCmd(),\n\t)\n\treturn rootCommand, &opts\n}\n\n// gitCommit returns the git commit for this codebase, if we are built from a git repo; \"\" otherwise.\nfunc gitCommit() string {\n\tbi, ok := debug.ReadBuildInfo()\n\tif !ok {\n\t\tlogrus.Fatal(\"runtime.ReadBuildInfo failed\")\n\t}\n\tfor _, e := range bi.Settings {\n\t\tif e.Key == \"vcs.revision\" {\n\t\t\treturn e.Value\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// before is run by the cli package for any command, before running the command-specific handler.\nfunc (opts *globalOptions) before(cmd *cobra.Command, args []string) error {\n\tif opts.debug {\n\t\tlogrus.SetLevel(logrus.DebugLevel)\n\t}\n\tif opts.tlsVerify.Present() {\n\t\tlogrus.Warn(\"'--tls-verify' is deprecated, please set this on the specific subcommand\")\n\t}\n\tif opts.insecurePolicy && opts.requireSigned {\n\t\treturn fmt.Errorf(\"--insecure-policy and --require-signed are mutually exclusive\")\n\t}\n\treturn nil\n}\n\nfunc main() {\n\tif reexec.Init() {\n\t\treturn\n\t}\n\trootCmd, _ := createApp()\n\tif err := rootCmd.Execute(); err != nil {\n\t\tif isNotFoundImageError(err) {\n\t\t\tlogrus.StandardLogger().Log(logrus.FatalLevel, err)\n\t\t\tlogrus.Exit(2)\n\t\t}\n\t\tlogrus.Fatal(err)\n\t}\n}\n\n// getPolicyContext returns a *signature.PolicyContext based on opts.\nfunc (opts *globalOptions) getPolicyContext() (*signature.PolicyContext, error) {\n\tvar policy *signature.Policy // This could be cached across calls in opts.\n\tif opts.insecurePolicy {\n\t\tpolicy = &signature.Policy{Default: []signature.PolicyRequirement{signature.NewPRInsecureAcceptAnything()}}\n\t} else if opts.policyPath == \"\" {\n\t\tsys, err := opts.newSystemContext()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tp, err := signature.DefaultPolicy(sys)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpolicy = p\n\t} else {\n\t\tp, err := signature.NewPolicyFromFile(opts.policyPath)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpolicy = p\n\t}\n\n\tpc, err := signature.NewPolicyContext(policy)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif opts.requireSigned {\n\t\tpc.RequireSignatureVerification(true)\n\t}\n\treturn pc, nil\n}\n\n// commandTimeoutContext returns a context.Context and a cancellation callback based on opts.\n// The caller should usually \"defer cancel()\" immediately after calling this.\nfunc (opts *globalOptions) commandTimeoutContext() (context.Context, context.CancelFunc) {\n\tctx := context.Background()\n\tvar cancel context.CancelFunc = func() {}\n\tif opts.commandTimeout > 0 {\n\t\tctx, cancel = context.WithTimeout(ctx, opts.commandTimeout)\n\t}\n\treturn ctx, cancel\n}\n\n// newSystemContext returns a *types.SystemContext corresponding to opts.\n// It is guaranteed to return a fresh instance, so it is safe to make additional updates to it.\nfunc (opts *globalOptions) newSystemContext() (*types.SystemContext, error) {\n\tuserAgent := defaultUserAgent\n\tif opts.userAgentPrefix != \"\" {\n\t\tuserAgent = opts.userAgentPrefix + \" \" + defaultUserAgent\n\t}\n\tbaseTLSConfig, err := tlsdetails.BaseTLSFromOptionalFile(opts.tlsDetailsPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tctx := &types.SystemContext{\n\t\tRegistriesDirPath:        opts.registriesDirPath,\n\t\tArchitectureChoice:       opts.overrideArch,\n\t\tOSChoice:                 opts.overrideOS,\n\t\tVariantChoice:            opts.overrideVariant,\n\t\tSystemRegistriesConfPath: opts.registriesConfPath,\n\t\tBigFilesTemporaryDir:     opts.tmpDir,\n\t\tBaseTLSConfig:            baseTLSConfig.TLSConfig(),\n\t\tDockerRegistryUserAgent:  userAgent,\n\t}\n\t// DEPRECATED: We support this for backward compatibility, but override it if a per-image flag is provided.\n\tif opts.tlsVerify.Present() {\n\t\tctx.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!opts.tlsVerify.Value())\n\t}\n\treturn ctx, nil\n}\n"
  },
  {
    "path": "cmd/skopeo/main_test.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"crypto/tls\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// runSkopeo creates an app object and runs it with args, with an implied first \"skopeo\".\n// Returns output intended for stdout and the returned error, if any.\nfunc runSkopeo(args ...string) (string, error) {\n\tapp, _ := createApp()\n\tstdout := bytes.Buffer{}\n\tapp.SetOut(&stdout)\n\tapp.SetArgs(args)\n\terr := app.Execute()\n\treturn stdout.String(), err\n}\n\nfunc TestGlobalOptionsNewSystemContext(t *testing.T) {\n\t// Default state\n\topts, _ := fakeGlobalOptions(t, []string{})\n\tres, err := opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\t// User-Agent is set by default.\n\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t}, res)\n\t// Set everything to non-default values.\n\topts, _ = fakeGlobalOptions(t, []string{\n\t\t\"--registries.d\", \"/srv/registries.d\",\n\t\t\"--override-arch\", \"overridden-arch\",\n\t\t\"--override-os\", \"overridden-os\",\n\t\t\"--override-variant\", \"overridden-variant\",\n\t\t\"--tls-details\", \"../../integration/fixtures/tls-details-pqc-only.yaml\",\n\t\t\"--tmpdir\", \"/srv\",\n\t\t\"--registries-conf\", \"/srv/registries.conf\",\n\t\t\"--tls-verify=false\",\n\t})\n\tres, err = opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tRegistriesDirPath:  \"/srv/registries.d\",\n\t\tArchitectureChoice: \"overridden-arch\",\n\t\tOSChoice:           \"overridden-os\",\n\t\tVariantChoice:      \"overridden-variant\",\n\t\tBaseTLSConfig: &tls.Config{\n\t\t\tMinVersion:       tls.VersionTLS13,\n\t\t\tCurvePreferences: []tls.CurveID{tls.X25519MLKEM768},\n\t\t},\n\t\tBigFilesTemporaryDir:        \"/srv\",\n\t\tSystemRegistriesConfPath:    \"/srv/registries.conf\",\n\t\tDockerInsecureSkipTLSVerify: types.OptionalBoolTrue,\n\t\tDockerRegistryUserAgent:     defaultUserAgent,\n\t}, res)\n}\n"
  },
  {
    "path": "cmd/skopeo/manifest.go",
    "content": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/image/v5/manifest\"\n)\n\ntype manifestDigestOptions struct{}\n\nfunc manifestDigestCmd() *cobra.Command {\n\tvar opts manifestDigestOptions\n\tcmd := &cobra.Command{\n\t\tUse:     \"manifest-digest MANIFEST-FILE\",\n\t\tShort:   \"Compute a manifest digest of a file\",\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: \"skopeo manifest-digest manifest.json\",\n\t}\n\tadjustUsage(cmd)\n\treturn cmd\n}\n\nfunc (opts *manifestDigestOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 1 {\n\t\treturn errors.New(\"Usage: skopeo manifest-digest manifest\")\n\t}\n\tmanifestPath := args[0]\n\n\tman, err := os.ReadFile(manifestPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error reading manifest from %s: %v\", manifestPath, err)\n\t}\n\tdigest, err := manifest.Digest(man)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error computing digest: %v\", err)\n\t}\n\tfmt.Fprintf(stdout, \"%s\\n\", digest)\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/skopeo/manifest_test.go",
    "content": "package main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestManifestDigest(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\", \"a2\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"manifest-digest\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Usage\")\n\t}\n\n\t// Error reading manifest\n\tout, err := runSkopeo(\"manifest-digest\", \"/this/does/not/exist\")\n\tassertTestFailed(t, out, err, \"/this/does/not/exist\")\n\n\t// Error computing manifest\n\tout, err = runSkopeo(\"manifest-digest\", \"fixtures/v2s1-invalid-signatures.manifest.json\")\n\tassertTestFailed(t, out, err, \"computing digest\")\n\n\t// Success\n\tout, err = runSkopeo(\"manifest-digest\", \"fixtures/image.manifest.json\")\n\tassert.NoError(t, err)\n\tassert.Equal(t, fixturesTestImageManifestDigest.String()+\"\\n\", out)\n}\n"
  },
  {
    "path": "cmd/skopeo/proxy.go",
    "content": "//go:build !windows\n\npackage main\n\n/*\n This command is still experimental. Documentation\n is available in\n docs-experimental/skopeo-experimental-image-proxy.1.md\n*/\n\nimport (\n\t\"context\"\n\t\"io\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/json-proxy\"\n)\n\ntype proxyOptions struct {\n\tglobal    *globalOptions\n\timageOpts *imageOptions\n\tsockFd    int\n}\n\nfunc proxyCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\timageFlags, imageOpts := imageFlags(global, sharedOpts, nil, \"\", \"\")\n\topts := proxyOptions{global: global, imageOpts: imageOpts}\n\tcmd := &cobra.Command{\n\t\tUse:   \"experimental-image-proxy [command options] IMAGE\",\n\t\tShort: \"Interactive proxy for fetching container images (EXPERIMENTAL)\",\n\t\tLong:  `Run skopeo as a proxy, supporting HTTP requests to fetch manifests and blobs.`,\n\t\tRunE:  commandAction(opts.run),\n\t\tArgs:  cobra.ExactArgs(0),\n\t\t// Not stabilized yet\n\t\tHidden:  true,\n\t\tExample: `skopeo experimental-image-proxy --sockfd 3`,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&imageFlags)\n\tflags.IntVar(&opts.sockFd, \"sockfd\", 0, \"Serve on opened socket pair (default 0/stdin)\")\n\treturn cmd\n}\n\n// Implementation of podman experimental-image-proxy using the library\nfunc (opts *proxyOptions) run(args []string, stdout io.Writer) error {\n\tmanager, err := jsonproxy.NewManager(\n\t\tjsonproxy.WithSystemContext(opts.imageOpts.newSystemContext),\n\t\tjsonproxy.WithPolicyContext(opts.global.getPolicyContext),\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer manager.Close()\n\treturn manager.Serve(context.Background(), opts.sockFd)\n}\n"
  },
  {
    "path": "cmd/skopeo/proxy_windows.go",
    "content": "//go:build windows\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/spf13/cobra\"\n)\n\ntype proxyOptions struct {\n\tglobal *globalOptions\n}\n\nfunc proxyCmd(global *globalOptions) *cobra.Command {\n\topts := proxyOptions{global: global}\n\tcmd := &cobra.Command{\n\t\tRunE: commandAction(opts.run),\n\t\tArgs: cobra.ExactArgs(0),\n\t\t// Not stabilized yet\n\t\tHidden: true,\n\t}\n\treturn cmd\n}\n\nfunc (opts *proxyOptions) run(args []string, stdout io.Writer) error {\n\treturn fmt.Errorf(\"This command is not supported on Windows\")\n}\n"
  },
  {
    "path": "cmd/skopeo/signing.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/image/v5/pkg/cli\"\n\t\"go.podman.io/image/v5/signature\"\n)\n\ntype standaloneSignOptions struct {\n\toutput         string // Output file path\n\tpassphraseFile string // Path pointing to a passphrase file when signing\n}\n\nfunc standaloneSignCmd() *cobra.Command {\n\topts := standaloneSignOptions{}\n\tcmd := &cobra.Command{\n\t\tUse:   \"standalone-sign [command options] MANIFEST DOCKER-REFERENCE KEY-FINGERPRINT --output|-o SIGNATURE\",\n\t\tShort: \"Create a signature using local files\",\n\t\tRunE:  commandAction(opts.run),\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.StringVarP(&opts.output, \"output\", \"o\", \"\", \"output the signature to `SIGNATURE`\")\n\tflags.StringVarP(&opts.passphraseFile, \"passphrase-file\", \"\", \"\", \"file that contains a passphrase for the --sign-by key\")\n\treturn cmd\n}\n\nfunc (opts *standaloneSignOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 3 || opts.output == \"\" {\n\t\treturn errors.New(\"Usage: skopeo standalone-sign manifest docker-reference key-fingerprint -o signature\")\n\t}\n\tmanifestPath := args[0]\n\tdockerReference := args[1]\n\tfingerprint := args[2]\n\n\tmanifest, err := os.ReadFile(manifestPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error reading %s: %w\", manifestPath, err)\n\t}\n\n\tmech, err := signature.NewGPGSigningMechanism()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error initializing GPG: %w\", err)\n\t}\n\tdefer mech.Close()\n\n\tpassphrase, err := cli.ReadPassphraseFile(opts.passphraseFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsignature, err := signature.SignDockerManifestWithOptions(manifest, dockerReference, mech, fingerprint, &signature.SignOptions{Passphrase: passphrase})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error creating signature: %w\", err)\n\t}\n\n\tif err := os.WriteFile(opts.output, signature, 0o644); err != nil {\n\t\treturn fmt.Errorf(\"Error writing signature to %s: %w\", opts.output, err)\n\t}\n\treturn nil\n}\n\ntype standaloneVerifyOptions struct {\n\tpublicKeyFile string\n}\n\nfunc standaloneVerifyCmd() *cobra.Command {\n\topts := standaloneVerifyOptions{}\n\tcmd := &cobra.Command{\n\t\tUse:   \"standalone-verify MANIFEST DOCKER-REFERENCE KEY-FINGERPRINTS SIGNATURE\",\n\t\tShort: \"Verify a signature using local files\",\n\t\tLong: `Verify a signature using local files\n\nKEY-FINGERPRINTS can be a comma separated list of fingerprints, or \"any\" if you trust all the keys in the public key file.`,\n\t\tRunE: commandAction(opts.run),\n\t}\n\tflags := cmd.Flags()\n\tflags.StringVar(&opts.publicKeyFile, \"public-key-file\", \"\", `File containing public keys. If not specified, will use local GPG keys.`)\n\tadjustUsage(cmd)\n\treturn cmd\n}\n\nfunc (opts *standaloneVerifyOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 4 {\n\t\treturn errors.New(\"Usage: skopeo standalone-verify manifest docker-reference key-fingerprint signature\")\n\t}\n\tmanifestPath := args[0]\n\texpectedDockerReference := args[1]\n\texpectedFingerprints := strings.Split(args[2], \",\")\n\tsignaturePath := args[3]\n\n\tif opts.publicKeyFile == \"\" && len(expectedFingerprints) == 1 && expectedFingerprints[0] == \"any\" {\n\t\treturn fmt.Errorf(\"Cannot use any fingerprint without a public key file\")\n\t}\n\tunverifiedManifest, err := os.ReadFile(manifestPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error reading manifest from %s: %w\", manifestPath, err)\n\t}\n\tunverifiedSignature, err := os.ReadFile(signaturePath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error reading signature from %s: %w\", signaturePath, err)\n\t}\n\n\tvar mech signature.SigningMechanism\n\tvar publicKeyfingerprints []string\n\tif opts.publicKeyFile != \"\" {\n\t\tpublicKeys, err := os.ReadFile(opts.publicKeyFile)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error reading public keys from %s: %w\", opts.publicKeyFile, err)\n\t\t}\n\t\tmech, publicKeyfingerprints, err = signature.NewEphemeralGPGSigningMechanism(publicKeys)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error initializing GPG: %w\", err)\n\t\t}\n\t} else {\n\t\tmech, err = signature.NewGPGSigningMechanism()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error initializing GPG: %w\", err)\n\t\t}\n\t}\n\tdefer mech.Close()\n\n\tif len(expectedFingerprints) == 1 && expectedFingerprints[0] == \"any\" {\n\t\texpectedFingerprints = publicKeyfingerprints\n\t}\n\n\tsig, verificationFingerprint, err := signature.VerifyImageManifestSignatureUsingKeyIdentityList(unverifiedSignature, unverifiedManifest, expectedDockerReference, mech, expectedFingerprints)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error verifying signature: %w\", err)\n\t}\n\n\tfmt.Fprintf(stdout, \"Signature verified using fingerprint %s, digest %s\\n\", verificationFingerprint, sig.DockerManifestDigest)\n\treturn nil\n}\n\n// WARNING: Do not use the contents of this for ANY security decisions,\n// and be VERY CAREFUL about showing this information to humans in any way which suggest that these values “are probably” reliable.\n// There is NO REASON to expect the values to be correct, or not intentionally misleading\n// (including things like “✅ Verified by $authority”)\n//\n// The subcommand is undocumented, and it may be renamed or entirely disappear in the future.\ntype untrustedSignatureDumpOptions struct{}\n\nfunc untrustedSignatureDumpCmd() *cobra.Command {\n\topts := untrustedSignatureDumpOptions{}\n\tcmd := &cobra.Command{\n\t\tUse:    \"untrusted-signature-dump-without-verification SIGNATURE\",\n\t\tShort:  \"Dump contents of a signature WITHOUT VERIFYING IT\",\n\t\tRunE:   commandAction(opts.run),\n\t\tHidden: true,\n\t}\n\tadjustUsage(cmd)\n\treturn cmd\n}\n\nfunc (opts *untrustedSignatureDumpOptions) run(args []string, stdout io.Writer) error {\n\tif len(args) != 1 {\n\t\treturn errors.New(\"Usage: skopeo untrusted-signature-dump-without-verification signature\")\n\t}\n\tuntrustedSignaturePath := args[0]\n\n\tuntrustedSignature, err := os.ReadFile(untrustedSignaturePath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error reading untrusted signature from %s: %w\", untrustedSignaturePath, err)\n\t}\n\n\tuntrustedInfo, err := signature.GetUntrustedSignatureInformationWithoutVerifying(untrustedSignature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error decoding untrusted signature: %v\", err)\n\t}\n\tuntrustedOut, err := json.MarshalIndent(untrustedInfo, \"\", \"    \")\n\tif err != nil {\n\t\treturn err\n\t}\n\tfmt.Fprintln(stdout, string(untrustedOut))\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/skopeo/signing_test.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/signature\"\n)\n\nconst (\n\t// fixturesTestImageManifestDigest is the Docker manifest digest of \"image.manifest.json\"\n\tfixturesTestImageManifestDigest = digest.Digest(\"sha256:20bf21ed457b390829cdbeec8795a7bea1626991fda603e0d01b4e7f60427e55\")\n\t// fixturesTestKeyFingerprint is the fingerprint of the private key.\n\tfixturesTestKeyFingerprint = \"08CD26E446E2E95249B7A405E932F44B23E8DD43\"\n\t// fixturesTestKeyFingerprint is the key ID of the private key.\n\tfixturesTestKeyShortID = \"E932F44B23E8DD43\"\n)\n\n// Test that results of runSkopeo failed with nothing on stdout, and substring\n// within the error message.\nfunc assertTestFailed(t *testing.T, stdout string, err error, substring string) {\n\tassert.ErrorContains(t, err, substring)\n\tassert.Empty(t, stdout)\n}\n\nfunc TestStandaloneSign(t *testing.T) {\n\tt.Setenv(\"GNUPGHOME\", \"fixtures\")\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil {\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\tmanifestPath := \"fixtures/image.manifest.json\"\n\tdockerReference := \"testing/manifest\"\n\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\", \"a2\"},\n\t\t{\"a1\", \"a2\", \"a3\"},\n\t\t{\"a1\", \"a2\", \"a3\", \"a4\"},\n\t\t{\"-o\", \"o\", \"a1\", \"a2\"},\n\t\t{\"-o\", \"o\", \"a1\", \"a2\", \"a3\", \"a4\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"standalone-sign\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Usage\")\n\t}\n\n\t// Error reading manifest\n\tout, err := runSkopeo(\"standalone-sign\", \"-o\", \"/dev/null\",\n\t\t\"/this/does/not/exist\", dockerReference, fixturesTestKeyFingerprint)\n\tassertTestFailed(t, out, err, \"/this/does/not/exist\")\n\n\t// Invalid Docker reference\n\tout, err = runSkopeo(\"standalone-sign\", \"-o\", \"/dev/null\",\n\t\tmanifestPath, \"\" /* empty reference */, fixturesTestKeyFingerprint)\n\tassertTestFailed(t, out, err, \"empty signature content\")\n\n\t// Unknown key.\n\tout, err = runSkopeo(\"standalone-sign\", \"-o\", \"/dev/null\",\n\t\tmanifestPath, dockerReference, \"UNKNOWN GPG FINGERPRINT\")\n\tassert.Error(t, err)\n\tassert.Empty(t, out)\n\n\t// Error writing output\n\tout, err = runSkopeo(\"standalone-sign\", \"-o\", \"/dev/full\",\n\t\tmanifestPath, dockerReference, fixturesTestKeyFingerprint)\n\tassertTestFailed(t, out, err, \"/dev/full\")\n\n\t// Success\n\tsigOutput := filepath.Join(t.TempDir(), \"sig\")\n\tout, err = runSkopeo(\"standalone-sign\", \"-o\", sigOutput,\n\t\tmanifestPath, dockerReference, fixturesTestKeyFingerprint)\n\trequire.NoError(t, err)\n\tassert.Empty(t, out)\n\n\tsig, err := os.ReadFile(sigOutput)\n\trequire.NoError(t, err)\n\tmanifest, err := os.ReadFile(manifestPath)\n\trequire.NoError(t, err)\n\tverified, err := signature.VerifyDockerManifestSignature(sig, manifest, dockerReference, mech, fixturesTestKeyFingerprint)\n\trequire.NoError(t, err)\n\tassert.Equal(t, dockerReference, verified.DockerReference)\n\tassert.Equal(t, fixturesTestImageManifestDigest, verified.DockerManifestDigest)\n}\n\nfunc TestStandaloneVerify(t *testing.T) {\n\tmanifestPath := \"fixtures/image.manifest.json\"\n\tsignaturePath := \"fixtures/image.signature\"\n\tdockerReference := \"testing/manifest\"\n\tt.Setenv(\"GNUPGHOME\", \"fixtures\")\n\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\", \"a2\", \"a3\"},\n\t\t{\"a1\", \"a2\", \"a3\", \"a4\", \"a5\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"standalone-verify\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Usage\")\n\t}\n\n\t// Error reading manifest\n\tout, err := runSkopeo(\"standalone-verify\", \"/this/does/not/exist\",\n\t\tdockerReference, fixturesTestKeyFingerprint, signaturePath)\n\tassertTestFailed(t, out, err, \"/this/does/not/exist\")\n\n\t// Error reading signature\n\tout, err = runSkopeo(\"standalone-verify\", manifestPath,\n\t\tdockerReference, fixturesTestKeyFingerprint, \"/this/does/not/exist\")\n\tassertTestFailed(t, out, err, \"/this/does/not/exist\")\n\n\t// Error verifying signature\n\tout, err = runSkopeo(\"standalone-verify\", manifestPath,\n\t\tdockerReference, fixturesTestKeyFingerprint, \"fixtures/corrupt.signature\")\n\tassertTestFailed(t, out, err, \"Error verifying signature\")\n\n\t// Error using any without a public key file\n\tout, err = runSkopeo(\"standalone-verify\", manifestPath,\n\t\tdockerReference, \"any\", signaturePath)\n\tassertTestFailed(t, out, err, \"Cannot use any fingerprint without a public key file\")\n\n\t// Success\n\tout, err = runSkopeo(\"standalone-verify\", manifestPath,\n\t\tdockerReference, fixturesTestKeyFingerprint, signaturePath)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Signature verified using fingerprint \"+fixturesTestKeyFingerprint+\", digest \"+fixturesTestImageManifestDigest.String()+\"\\n\", out)\n\n\t// Using multiple fingerprints\n\tout, err = runSkopeo(\"standalone-verify\", manifestPath,\n\t\tdockerReference, \"0123456789ABCDEF0123456789ABCDEF01234567,\"+fixturesTestKeyFingerprint+\",DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF\", signaturePath)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Signature verified using fingerprint \"+fixturesTestKeyFingerprint+\", digest \"+fixturesTestImageManifestDigest.String()+\"\\n\", out)\n\n\t// Using a public key file\n\tt.Setenv(\"GNUPGHOME\", \"\")\n\tout, err = runSkopeo(\"standalone-verify\", \"--public-key-file\", \"fixtures/pubring.gpg\", manifestPath,\n\t\tdockerReference, fixturesTestKeyFingerprint, signaturePath)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Signature verified using fingerprint \"+fixturesTestKeyFingerprint+\", digest \"+fixturesTestImageManifestDigest.String()+\"\\n\", out)\n\n\t// Using a public key file matching any public key\n\tt.Setenv(\"GNUPGHOME\", \"\")\n\tout, err = runSkopeo(\"standalone-verify\", \"--public-key-file\", \"fixtures/pubring.gpg\", manifestPath,\n\t\tdockerReference, \"any\", signaturePath)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Signature verified using fingerprint \"+fixturesTestKeyFingerprint+\", digest \"+fixturesTestImageManifestDigest.String()+\"\\n\", out)\n}\n\nfunc TestUntrustedSignatureDump(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\", \"a2\"},\n\t\t{\"a1\", \"a2\", \"a3\", \"a4\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"untrusted-signature-dump-without-verification\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Usage\")\n\t}\n\n\t// Error reading manifest\n\tout, err := runSkopeo(\"untrusted-signature-dump-without-verification\",\n\t\t\"/this/does/not/exist\")\n\tassertTestFailed(t, out, err, \"/this/does/not/exist\")\n\n\t// Error reading signature (input is not a signature)\n\tout, err = runSkopeo(\"untrusted-signature-dump-without-verification\", \"fixtures/image.manifest.json\")\n\tassertTestFailed(t, out, err, \"Error decoding untrusted signature\")\n\n\t// Success\n\tfor _, path := range []string{\"fixtures/image.signature\", \"fixtures/corrupt.signature\"} {\n\t\t// Success\n\t\tout, err = runSkopeo(\"untrusted-signature-dump-without-verification\", path)\n\t\trequire.NoError(t, err)\n\n\t\tvar info signature.UntrustedSignatureInformation\n\t\terr := json.Unmarshal([]byte(out), &info)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, fixturesTestImageManifestDigest, info.UntrustedDockerManifestDigest)\n\t\tassert.Equal(t, \"testing/manifest\", info.UntrustedDockerReference)\n\t\tassert.NotNil(t, info.UntrustedCreatorID)\n\t\tassert.Equal(t, \"atomic \", *info.UntrustedCreatorID)\n\t\tassert.NotNil(t, info.UntrustedTimestamp)\n\t\tassert.True(t, time.Unix(1458239713, 0).Equal(*info.UntrustedTimestamp))\n\t\tassert.Equal(t, fixturesTestKeyShortID, info.UntrustedShortKeyIdentifier)\n\t}\n}\n"
  },
  {
    "path": "cmd/skopeo/sync.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/copy\"\n\t\"go.podman.io/image/v5/directory\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// syncOptions contains information retrieved from the skopeo sync command line.\ntype syncOptions struct {\n\tglobal              *globalOptions // Global (not command dependent) skopeo options\n\tdeprecatedTLSVerify *deprecatedTLSVerifyOption\n\tsrcImage            *imageOptions     // Source image options\n\tdestImage           *imageDestOptions // Destination image options\n\tretryOpts           *retry.Options\n\tcopy                *sharedCopyOptions\n\tsource              string // Source repository name\n\tdestination         string // Destination registry name\n\tdigestFile          string // Write digest to this file\n\tscoped              bool   // When true, namespace copied images at destination using the source repository name\n\tall                 bool   // Copy all of the images if an image in the source is a list\n\tdryRun              bool   // Don't actually copy anything, just output what it would have done\n\tkeepGoing           bool   // Whether or not to abort the sync if there are any errors during syncing the images\n\tappendSuffix        string // Suffix to append to destination image tag\n}\n\n// repoDescriptor contains information of a single repository used as a sync source.\ntype repoDescriptor struct {\n\tDirBasePath string                 // base path when source is 'dir'\n\tImageRefs   []types.ImageReference // List of tagged image found for the repository\n\tContext     *types.SystemContext   // SystemContext for the sync command\n}\n\n// tlsVerifyConfig is an implementation of the Unmarshaler interface, used to\n// customize the unmarshaling behaviour of the tls-verify YAML key.\ntype tlsVerifyConfig struct {\n\tskip types.OptionalBool // skip TLS verification check (false by default)\n}\n\n// registrySyncConfig contains information about a single registry, read from\n// the source YAML file\ntype registrySyncConfig struct {\n\tImages           map[string][]string    // Images map images name to slices with the images' references (tags, digests)\n\tImagesByTagRegex map[string]string      `yaml:\"images-by-tag-regex\"` // Images map images name to regular expression with the images' tags\n\tImagesBySemver   map[string]string      `yaml:\"images-by-semver\"`    // ImagesBySemver maps a repository to a semver constraint (e.g. '>=3.14') to match images' tags to\n\tCredentials      types.DockerAuthConfig // Username and password used to authenticate with the registry\n\tTLSVerify        tlsVerifyConfig        `yaml:\"tls-verify\"` // TLS verification mode (enabled by default)\n\tCertDir          string                 `yaml:\"cert-dir\"`   // Path to the TLS certificates of the registry\n}\n\n// sourceConfig contains all registries information read from the source YAML file\ntype sourceConfig map[string]registrySyncConfig\n\nfunc syncCmd(global *globalOptions) *cobra.Command {\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\tdeprecatedTLSVerifyFlags, deprecatedTLSVerifyOpt := deprecatedTLSVerifyFlags()\n\tsrcFlags, srcOpts := dockerImageFlags(global, sharedOpts, deprecatedTLSVerifyOpt, \"src-\", \"screds\")\n\tdestFlags, destOpts := dockerImageFlags(global, sharedOpts, deprecatedTLSVerifyOpt, \"dest-\", \"dcreds\")\n\tretryFlags, retryOpts := retryFlags()\n\tcopyFlags, copyOpts := sharedCopyFlags()\n\n\topts := syncOptions{\n\t\tglobal:              global,\n\t\tdeprecatedTLSVerify: deprecatedTLSVerifyOpt,\n\t\tsrcImage:            srcOpts,\n\t\tdestImage:           &imageDestOptions{imageOptions: destOpts},\n\t\tretryOpts:           retryOpts,\n\t\tcopy:                copyOpts,\n\t}\n\n\tcmd := &cobra.Command{\n\t\tUse:   \"sync [command options] --src TRANSPORT --dest TRANSPORT SOURCE DESTINATION\",\n\t\tShort: \"Synchronize one or more images from one location to another\",\n\t\tLong: `Copy all the images from a SOURCE to a DESTINATION.\n\nAllowed SOURCE transports (specified with --src): docker, dir, yaml.\nAllowed DESTINATION transports (specified with --dest): docker, dir.\n\nSee skopeo-sync(1) for details.\n`,\n\t\tRunE:    commandAction(opts.run),\n\t\tExample: `skopeo sync --src docker --dest dir --scoped registry.example.com/busybox /media/usb`,\n\t}\n\tadjustUsage(cmd)\n\tflags := cmd.Flags()\n\tflags.AddFlagSet(&sharedFlags)\n\tflags.AddFlagSet(&deprecatedTLSVerifyFlags)\n\tflags.AddFlagSet(&srcFlags)\n\tflags.AddFlagSet(&destFlags)\n\tflags.AddFlagSet(&retryFlags)\n\tflags.AddFlagSet(&copyFlags)\n\tflags.StringVarP(&opts.source, \"src\", \"s\", \"\", \"SOURCE transport type\")\n\tflags.StringVarP(&opts.destination, \"dest\", \"d\", \"\", \"DESTINATION transport type\")\n\tflags.BoolVar(&opts.scoped, \"scoped\", false, \"Images at DESTINATION are prefix using the full source image path as scope\")\n\tflags.StringVar(&opts.appendSuffix, \"append-suffix\", \"\", \"String to append to DESTINATION tags\")\n\tflags.StringVar(&opts.digestFile, \"digestfile\", \"\", \"Write the digests and Image References of the resulting images to the specified file, separated by newlines\")\n\tflags.BoolVarP(&opts.all, \"all\", \"a\", false, \"Copy all images if SOURCE-IMAGE is a list\")\n\tflags.BoolVar(&opts.dryRun, \"dry-run\", false, \"Run without actually copying data\")\n\tflags.BoolVarP(&opts.keepGoing, \"keep-going\", \"\", false, \"Do not abort the sync if any image copy fails\")\n\treturn cmd\n}\n\n// UnmarshalYAML is the implementation of the Unmarshaler interface method\n// for the tlsVerifyConfig type.\n// It unmarshals the 'tls-verify' YAML key so that, when they key is not\n// specified, tls verification is enforced.\nfunc (tls *tlsVerifyConfig) UnmarshalYAML(value *yaml.Node) error {\n\tvar verify bool\n\tif err := value.Decode(&verify); err != nil {\n\t\treturn err\n\t}\n\n\ttls.skip = types.NewOptionalBool(!verify)\n\treturn nil\n}\n\n// newSourceConfig unmarshals the provided YAML file path to the sourceConfig type.\n// It returns a new unmarshaled sourceConfig object and any error encountered.\nfunc newSourceConfig(yamlFile string) (sourceConfig, error) {\n\tvar cfg sourceConfig\n\tsource, err := os.ReadFile(yamlFile)\n\tif err != nil {\n\t\treturn cfg, err\n\t}\n\terr = yaml.Unmarshal(source, &cfg)\n\tif err != nil {\n\t\treturn cfg, fmt.Errorf(\"Failed to unmarshal %q: %w\", yamlFile, err)\n\t}\n\treturn cfg, nil\n}\n\n// parseRepositoryReference parses input into a reference.Named, and verifies that it names a repository, not an image.\nfunc parseRepositoryReference(input string) (reference.Named, error) {\n\tref, err := reference.ParseNormalizedNamed(input)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !reference.IsNameOnly(ref) {\n\t\treturn nil, errors.New(\"input names a reference, not a repository\")\n\t}\n\treturn ref, nil\n}\n\n// destinationReference creates an image reference using the provided transport.\n// It returns a image reference to be used as destination of an image copy and\n// any error encountered.\nfunc destinationReference(destination string, transport string) (types.ImageReference, error) {\n\tvar imageTransport types.ImageTransport\n\n\tswitch transport {\n\tcase docker.Transport.Name():\n\t\tdestination = fmt.Sprintf(\"//%s\", destination)\n\t\timageTransport = docker.Transport\n\tcase directory.Transport.Name():\n\t\t_, err := os.Stat(destination)\n\t\tif err == nil {\n\t\t\treturn nil, fmt.Errorf(\"Refusing to overwrite destination directory %q\", destination)\n\t\t}\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, fmt.Errorf(\"Destination directory could not be used: %w\", err)\n\t\t}\n\t\t// the directory holding the image must be created here\n\t\tif err = os.MkdirAll(destination, 0o755); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error creating directory for image %s: %w\", destination, err)\n\t\t}\n\t\timageTransport = directory.Transport\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"%q is not a valid destination transport\", transport)\n\t}\n\tlogrus.Debugf(\"Destination for transport %q: %s\", transport, destination)\n\n\tdestRef, err := imageTransport.ParseReference(destination)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Cannot obtain a valid image reference for transport %q and reference %q: %w\", imageTransport.Name(), destination, err)\n\t}\n\n\treturn destRef, nil\n}\n\n// getImageTags lists all tags in a repository.\n// It returns a string slice of tags and any error encountered.\nfunc getImageTags(ctx context.Context, sysCtx *types.SystemContext, repoRef reference.Named) ([]string, error) {\n\tname := repoRef.Name()\n\tlogrus.WithFields(logrus.Fields{\n\t\t\"image\": name,\n\t}).Info(\"Getting tags\")\n\t// Ugly: NewReference rejects IsNameOnly references, and GetRepositoryTags ignores the tag/digest.\n\t// So, we use TagNameOnly here only to shut up NewReference\n\tdockerRef, err := docker.NewReference(reference.TagNameOnly(repoRef))\n\tif err != nil {\n\t\treturn nil, err // Should never happen for a reference with tag and no digest\n\t}\n\ttags, err := docker.GetRepositoryTags(ctx, sysCtx, dockerRef)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error determining repository tags for repo %s: %w\", name, err)\n\t}\n\n\treturn tags, nil\n}\n\n// imagesToCopyFromRepo builds a list of image references from the tags\n// found in a source repository.\n// It returns an image reference slice with as many elements as the tags found\n// and any error encountered.\nfunc imagesToCopyFromRepo(sys *types.SystemContext, repoRef reference.Named) ([]types.ImageReference, error) {\n\ttags, err := getImageTags(context.Background(), sys, repoRef)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar sourceReferences []types.ImageReference\n\tfor _, tag := range tags {\n\t\ttaggedRef, err := reference.WithTag(repoRef, tag)\n\t\tif err != nil {\n\t\t\tlogrus.WithFields(logrus.Fields{\n\t\t\t\t\"repo\": repoRef.Name(),\n\t\t\t\t\"tag\":  tag,\n\t\t\t}).Errorf(\"Error creating a tagged reference from registry tag list: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tref, err := docker.NewReference(taggedRef)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Cannot obtain a valid image reference for transport %q and reference %s: %w\", docker.Transport.Name(), taggedRef.String(), err)\n\t\t}\n\t\tsourceReferences = append(sourceReferences, ref)\n\t}\n\treturn sourceReferences, nil\n}\n\n// imagesToCopyFromDir builds a list of image references from the images found\n// in the source directory.\n// It returns an image reference slice with as many elements as the images found\n// and any error encountered.\nfunc imagesToCopyFromDir(dirPath string) ([]types.ImageReference, error) {\n\tvar sourceReferences []types.ImageReference\n\terr := filepath.WalkDir(dirPath, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !d.IsDir() && d.Name() == \"manifest.json\" {\n\t\t\tdirname := filepath.Dir(path)\n\t\t\tref, err := directory.Transport.ParseReference(dirname)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"Cannot obtain a valid image reference for transport %q and reference %q: %w\", directory.Transport.Name(), dirname, err)\n\t\t\t}\n\t\t\tsourceReferences = append(sourceReferences, ref)\n\t\t\treturn filepath.SkipDir\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn sourceReferences,\n\t\t\tfmt.Errorf(\"Error walking the path %q: %w\", dirPath, err)\n\t}\n\n\treturn sourceReferences, nil\n}\n\n// imagesToCopyFromRegistry builds a list of repository descriptors from the images\n// in a registry configuration.\n// It returns a repository descriptors slice with as many elements as the images\n// found and any error encountered. Each element of the slice is a list of\n// image references, to be used as sync source.\nfunc imagesToCopyFromRegistry(registryName string, cfg registrySyncConfig, sourceCtx types.SystemContext) ([]repoDescriptor, error) {\n\tserverCtx := &sourceCtx\n\t// override ctx with per-registryName options\n\tserverCtx.DockerCertPath = cfg.CertDir\n\tserverCtx.DockerDaemonCertPath = cfg.CertDir\n\t// Only override TLS verification if explicitly specified in YAML; otherwise, keep CLI/global settings.\n\tif cfg.TLSVerify.skip != types.OptionalBoolUndefined {\n\t\tserverCtx.DockerDaemonInsecureSkipTLSVerify = (cfg.TLSVerify.skip == types.OptionalBoolTrue)\n\t\tserverCtx.DockerInsecureSkipTLSVerify = cfg.TLSVerify.skip\n\t}\n\tif cfg.Credentials != (types.DockerAuthConfig{}) {\n\t\tserverCtx.DockerAuthConfig = &cfg.Credentials\n\t}\n\tvar repoDescList []repoDescriptor\n\n\tif len(cfg.Images) == 0 && len(cfg.ImagesByTagRegex) == 0 && len(cfg.ImagesBySemver) == 0 {\n\t\tlogrus.WithFields(logrus.Fields{\n\t\t\t\"registry\": registryName,\n\t\t}).Warn(\"No images specified for registry\")\n\t\treturn repoDescList, nil\n\t}\n\n\tfor imageName, refs := range cfg.Images {\n\t\trepoLogger := logrus.WithFields(logrus.Fields{\n\t\t\t\"repo\":     imageName,\n\t\t\t\"registry\": registryName,\n\t\t})\n\t\trepoRef, err := parseRepositoryReference(fmt.Sprintf(\"%s/%s\", registryName, imageName))\n\t\tif err != nil {\n\t\t\trepoLogger.Error(\"Error parsing repository name, skipping\")\n\t\t\tlogrus.Error(err)\n\t\t\tcontinue\n\t\t}\n\n\t\trepoLogger.Info(\"Processing repo\")\n\n\t\tvar sourceReferences []types.ImageReference\n\t\tif len(refs) != 0 {\n\t\t\tfor _, ref := range refs {\n\t\t\t\ttagLogger := logrus.WithFields(logrus.Fields{\"ref\": ref})\n\t\t\t\tvar named reference.Named\n\t\t\t\t// first try as digest\n\t\t\t\tif d, err := digest.Parse(ref); err == nil {\n\t\t\t\t\tnamed, err = reference.WithDigest(repoRef, d)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\ttagLogger.Error(\"Error processing ref, skipping\")\n\t\t\t\t\t\tlogrus.Error(err)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttagLogger.Debugf(\"Ref was not a digest, trying as a tag: %s\", err)\n\t\t\t\t\tnamed, err = reference.WithTag(repoRef, ref)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\ttagLogger.Error(\"Error parsing ref, skipping\")\n\t\t\t\t\t\tlogrus.Error(err)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timageRef, err := docker.NewReference(named)\n\t\t\t\tif err != nil {\n\t\t\t\t\ttagLogger.Error(\"Error processing ref, skipping\")\n\t\t\t\t\tlogrus.Errorf(\"Error getting image reference: %s\", err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tsourceReferences = append(sourceReferences, imageRef)\n\t\t\t}\n\t\t} else { // len(refs) == 0\n\t\t\trepoLogger.Info(\"Querying registry for image tags\")\n\t\t\tsourceReferences, err = imagesToCopyFromRepo(serverCtx, repoRef)\n\t\t\tif err != nil {\n\t\t\t\trepoLogger.Error(\"Error processing repo, skipping\")\n\t\t\t\tlogrus.Error(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tif len(sourceReferences) == 0 {\n\t\t\trepoLogger.Warnf(\"No refs to sync found\")\n\t\t\tcontinue\n\t\t}\n\t\trepoDescList = append(repoDescList, repoDescriptor{\n\t\t\tImageRefs: sourceReferences,\n\t\t\tContext:   serverCtx,\n\t\t})\n\t}\n\n\t// include repository descriptors for cfg.ImagesByTagRegex\n\t{\n\t\tfilterCollection, err := tagRegexFilterCollection(cfg.ImagesByTagRegex)\n\t\tif err != nil {\n\t\t\tlogrus.Error(err)\n\t\t} else {\n\t\t\tadditionalRepoDescList := filterSourceReferences(serverCtx, registryName, filterCollection)\n\t\t\trepoDescList = append(repoDescList, additionalRepoDescList...)\n\t\t}\n\t}\n\n\t// include repository descriptors for cfg.ImagesBySemver\n\t{\n\t\tfilterCollection, err := semverFilterCollection(cfg.ImagesBySemver)\n\t\tif err != nil {\n\t\t\tlogrus.Error(err)\n\t\t} else {\n\t\t\tadditionalRepoDescList := filterSourceReferences(serverCtx, registryName, filterCollection)\n\t\t\trepoDescList = append(repoDescList, additionalRepoDescList...)\n\t\t}\n\t}\n\n\treturn repoDescList, nil\n}\n\n// filterFunc is a function used to limit the initial set of image references\n// using tags, patterns, semver, etc.\ntype filterFunc func(*logrus.Entry, types.ImageReference) bool\n\n// filterCollection is a map of repository names to filter functions.\ntype filterCollection map[string]filterFunc\n\n// filterSourceReferences lists tags for images specified in the collection and\n// filters them using assigned filter functions.\n// It returns a list of repoDescriptors.\nfunc filterSourceReferences(sys *types.SystemContext, registryName string, collection filterCollection) []repoDescriptor {\n\tvar repoDescList []repoDescriptor\n\tfor repoName, filter := range collection {\n\t\tlogger := logrus.WithFields(logrus.Fields{\n\t\t\t\"repo\":     repoName,\n\t\t\t\"registry\": registryName,\n\t\t})\n\n\t\trepoRef, err := parseRepositoryReference(fmt.Sprintf(\"%s/%s\", registryName, repoName))\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Error parsing repository name, skipping\")\n\t\t\tlogrus.Error(err)\n\t\t\tcontinue\n\t\t}\n\n\t\tlogger.Info(\"Processing repo\")\n\n\t\tvar sourceReferences []types.ImageReference\n\n\t\tlogger.Info(\"Querying registry for image tags\")\n\t\tsourceReferences, err = imagesToCopyFromRepo(sys, repoRef)\n\t\tif err != nil {\n\t\t\tlogger.Error(\"Error processing repo, skipping\")\n\t\t\tlogrus.Error(err)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar filteredSourceReferences []types.ImageReference\n\t\tfor _, ref := range sourceReferences {\n\t\t\tif filter(logger, ref) {\n\t\t\t\tfilteredSourceReferences = append(filteredSourceReferences, ref)\n\t\t\t}\n\t\t}\n\n\t\tif len(filteredSourceReferences) == 0 {\n\t\t\tlogger.Warnf(\"No refs to sync found\")\n\t\t\tcontinue\n\t\t}\n\n\t\trepoDescList = append(repoDescList, repoDescriptor{\n\t\t\tImageRefs: filteredSourceReferences,\n\t\t\tContext:   sys,\n\t\t})\n\t}\n\treturn repoDescList\n}\n\n// tagRegexFilterCollection converts a map of (repository name, tag regex) pairs\n// into a filterCollection, which is a map of (repository name, filter function)\n// pairs.\nfunc tagRegexFilterCollection(collection map[string]string) (filterCollection, error) {\n\tfilters := filterCollection{}\n\n\tfor repoName, tagRegex := range collection {\n\t\tpattern, err := regexp.Compile(tagRegex)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tf := func(logger *logrus.Entry, sourceReference types.ImageReference) bool {\n\t\t\ttagged, isTagged := sourceReference.DockerReference().(reference.Tagged)\n\t\t\tif !isTagged {\n\t\t\t\tlogger.Errorf(\"Internal error, reference %s does not have a tag, skipping\", sourceReference.DockerReference())\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn pattern.MatchString(tagged.Tag())\n\t\t}\n\t\tfilters[repoName] = f\n\t}\n\n\treturn filters, nil\n}\n\n// semverFilterCollection converts a map of (repository name, array of semver constraints) pairs\n// into a filterCollection, which is a map of (repository name, filter function)\n// pairs.\nfunc semverFilterCollection(collection map[string]string) (filterCollection, error) {\n\tfilters := filterCollection{}\n\n\tfor repoName, constraintString := range collection {\n\t\tconstraint, err := semver.NewConstraint(constraintString)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tf := func(logger *logrus.Entry, sourceReference types.ImageReference) bool {\n\t\t\ttagged, isTagged := sourceReference.DockerReference().(reference.Tagged)\n\t\t\tif !isTagged {\n\t\t\t\tlogger.Errorf(\"Internal error, reference %s does not have a tag, skipping\", sourceReference.DockerReference())\n\t\t\t\treturn false\n\t\t\t}\n\t\t\ttagVersion, err := semver.NewVersion(tagged.Tag())\n\t\t\tif err != nil {\n\t\t\t\tlogger.Tracef(\"Tag %q cannot be parsed as semver, skipping\", tagged.Tag())\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn constraint.Check(tagVersion)\n\t\t}\n\n\t\tfilters[repoName] = f\n\t}\n\n\treturn filters, nil\n}\n\n// imagesToCopy retrieves all the images to copy from a specified sync source\n// and transport.\n// It returns a slice of repository descriptors, where each descriptor is a\n// list of tagged image references to be used as sync source, and any error\n// encountered.\nfunc imagesToCopy(source string, transport string, sourceCtx *types.SystemContext) ([]repoDescriptor, error) {\n\tvar descriptors []repoDescriptor\n\n\tswitch transport {\n\tcase docker.Transport.Name():\n\t\tdesc := repoDescriptor{\n\t\t\tContext: sourceCtx,\n\t\t}\n\t\tnamed, err := reference.ParseNormalizedNamed(source) // May be a repository or an image.\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Cannot obtain a valid image reference for transport %q and reference %q: %w\", docker.Transport.Name(), source, err)\n\t\t}\n\t\timageTagged := !reference.IsNameOnly(named)\n\t\tlogrus.WithFields(logrus.Fields{\n\t\t\t\"imagename\": source,\n\t\t\t\"tagged\":    imageTagged,\n\t\t}).Info(\"Tag presence check\")\n\t\tif imageTagged {\n\t\t\tsrcRef, err := docker.NewReference(named)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Cannot obtain a valid image reference for transport %q and reference %q: %w\", docker.Transport.Name(), named.String(), err)\n\t\t\t}\n\t\t\tdesc.ImageRefs = []types.ImageReference{srcRef}\n\t\t} else {\n\t\t\tdesc.ImageRefs, err = imagesToCopyFromRepo(sourceCtx, named)\n\t\t\tif err != nil {\n\t\t\t\treturn descriptors, err\n\t\t\t}\n\t\t\tif len(desc.ImageRefs) == 0 {\n\t\t\t\treturn descriptors, fmt.Errorf(\"No images to sync found in %q\", source)\n\t\t\t}\n\t\t}\n\t\tdescriptors = append(descriptors, desc)\n\n\tcase directory.Transport.Name():\n\t\tdesc := repoDescriptor{\n\t\t\tContext: sourceCtx,\n\t\t}\n\n\t\tif _, err := os.Stat(source); err != nil {\n\t\t\treturn descriptors, fmt.Errorf(\"Invalid source directory specified: %w\", err)\n\t\t}\n\t\tdesc.DirBasePath = source\n\t\tvar err error\n\t\tdesc.ImageRefs, err = imagesToCopyFromDir(source)\n\t\tif err != nil {\n\t\t\treturn descriptors, err\n\t\t}\n\t\tif len(desc.ImageRefs) == 0 {\n\t\t\treturn descriptors, fmt.Errorf(\"No images to sync found in %q\", source)\n\t\t}\n\t\tdescriptors = append(descriptors, desc)\n\n\tcase \"yaml\":\n\t\tcfg, err := newSourceConfig(source)\n\t\tif err != nil {\n\t\t\treturn descriptors, err\n\t\t}\n\t\tfor registryName, registryConfig := range cfg {\n\t\t\tdescs, err := imagesToCopyFromRegistry(registryName, registryConfig, *sourceCtx)\n\t\t\tif err != nil {\n\t\t\t\treturn descriptors, fmt.Errorf(\"Failed to retrieve list of images from registry %q: %w\", registryName, err)\n\t\t\t}\n\t\t\tdescriptors = append(descriptors, descs...)\n\t\t}\n\t}\n\n\treturn descriptors, nil\n}\n\nfunc (opts *syncOptions) run(args []string, stdout io.Writer) (retErr error) {\n\tif len(args) != 2 {\n\t\treturn errorShouldDisplayUsage{errors.New(\"Exactly two arguments expected\")}\n\t}\n\topts.deprecatedTLSVerify.warnIfUsed([]string{\"--src-tls-verify\", \"--dest-tls-verify\"})\n\n\tpolicyContext, err := opts.global.getPolicyContext()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error loading trust policy: %w\", err)\n\t}\n\tdefer func() {\n\t\tif err := policyContext.Destroy(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"tearing down policy context\", err)\n\t\t}\n\t}()\n\n\t// validate source and destination options\n\tif len(opts.source) == 0 {\n\t\treturn errors.New(\"A source transport must be specified\")\n\t}\n\tif !slices.Contains([]string{docker.Transport.Name(), directory.Transport.Name(), \"yaml\"}, opts.source) {\n\t\treturn fmt.Errorf(\"%q is not a valid source transport\", opts.source)\n\t}\n\n\tif len(opts.destination) == 0 {\n\t\treturn errors.New(\"A destination transport must be specified\")\n\t}\n\tif !slices.Contains([]string{docker.Transport.Name(), directory.Transport.Name()}, opts.destination) {\n\t\treturn fmt.Errorf(\"%q is not a valid destination transport\", opts.destination)\n\t}\n\n\tif opts.source == opts.destination && opts.source == directory.Transport.Name() {\n\t\treturn errors.New(\"sync from 'dir' to 'dir' not implemented, consider using rsync instead\")\n\t}\n\n\topts.destImage.warnAboutIneffectiveOptions(transports.Get(opts.destination))\n\n\timageListSelection := copy.CopySystemImage\n\tif opts.all {\n\t\timageListSelection = copy.CopyAllImages\n\t}\n\n\tsourceCtx, err := opts.srcImage.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := opts.global.commandTimeoutContext()\n\tdefer cancel()\n\n\tsourceArg := args[0]\n\tvar srcRepoList []repoDescriptor\n\tif err = retry.IfNecessary(ctx, func() error {\n\t\tsrcRepoList, err = imagesToCopy(sourceArg, opts.source, sourceCtx)\n\t\treturn err\n\t}, opts.retryOpts); err != nil {\n\t\treturn err\n\t}\n\n\tdestination := args[1]\n\tdestinationCtx, err := opts.destImage.newSystemContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\toptions, cleanupOptions, err := opts.copy.copyOptions(stdout)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer cleanupOptions()\n\toptions.DestinationCtx = destinationCtx\n\toptions.ImageListSelection = imageListSelection\n\toptions.OptimizeDestinationImageAlreadyExists = true\n\n\terrorsPresent := false\n\timagesNumber := 0\n\tif opts.dryRun {\n\t\tlogrus.Warn(\"Running in dry-run mode\")\n\t}\n\n\tvar digestFile *os.File\n\tif opts.digestFile != \"\" && !opts.dryRun {\n\t\tdigestFile, err = os.OpenFile(opts.digestFile, os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0o644)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error creating digest file: %w\", err)\n\t\t}\n\t\tdefer func() {\n\t\t\tif err := digestFile.Close(); err != nil {\n\t\t\t\tretErr = noteCloseFailure(retErr, \"closing digest file\", err)\n\t\t\t}\n\t\t}()\n\t}\n\n\tfor _, srcRepo := range srcRepoList {\n\t\toptions.SourceCtx = srcRepo.Context\n\t\tfor counter, ref := range srcRepo.ImageRefs {\n\t\t\tvar destSuffix string\n\t\t\tvar manifestBytes []byte\n\t\t\tswitch ref.Transport() {\n\t\t\tcase docker.Transport:\n\t\t\t\t// docker -> dir or docker -> docker\n\t\t\t\tdestSuffix = ref.DockerReference().String()\n\t\t\tcase directory.Transport:\n\t\t\t\t// dir -> docker (we don't allow `dir` -> `dir` sync operations)\n\t\t\t\tdestSuffix = strings.TrimPrefix(ref.StringWithinTransport(), srcRepo.DirBasePath)\n\t\t\t\tif destSuffix == \"\" {\n\t\t\t\t\t// if source is a full path to an image, have destPath scoped to repo:tag\n\t\t\t\t\tdestSuffix = path.Base(srcRepo.DirBasePath)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif !opts.scoped {\n\t\t\t\tdestSuffix = path.Base(destSuffix)\n\t\t\t}\n\n\t\t\tdestRef, err := destinationReference(path.Join(destination, destSuffix)+opts.appendSuffix, opts.destination)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tfromToFields := logrus.Fields{\n\t\t\t\t\"from\": transports.ImageName(ref),\n\t\t\t\t\"to\":   transports.ImageName(destRef),\n\t\t\t}\n\t\t\tif opts.dryRun {\n\t\t\t\tlogrus.WithFields(fromToFields).Infof(\"Would have copied image ref %d/%d\", counter+1, len(srcRepo.ImageRefs))\n\t\t\t} else {\n\t\t\t\tlogrus.WithFields(fromToFields).Infof(\"Copying image ref %d/%d\", counter+1, len(srcRepo.ImageRefs))\n\t\t\t\tif err = retry.IfNecessary(ctx, func() error {\n\t\t\t\t\tmanifestBytes, err = copy.Image(ctx, policyContext, destRef, ref, options)\n\t\t\t\t\treturn err\n\t\t\t\t}, opts.retryOpts); err != nil {\n\t\t\t\t\tif !opts.keepGoing {\n\t\t\t\t\t\treturn fmt.Errorf(\"Error copying ref %q: %w\", transports.ImageName(ref), err)\n\t\t\t\t\t}\n\t\t\t\t\t// log the error, keep a note that there was a failure and move on to the next\n\t\t\t\t\t// image ref\n\t\t\t\t\terrorsPresent = true\n\t\t\t\t\tlogrus.WithError(err).Errorf(\"Error copying ref %q\", transports.ImageName(ref))\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Ensure that we log the manifest digest to a file only if the copy operation was successful\n\t\t\t\tif opts.digestFile != \"\" {\n\t\t\t\t\tmanifestDigest, err := manifest.Digest(manifestBytes)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\toutputStr := fmt.Sprintf(\"%s %s\", manifestDigest.String(), transports.ImageName(destRef))\n\t\t\t\t\tif _, err = digestFile.WriteString(outputStr + \"\\n\"); err != nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"Failed to write digest to file %q: %w\", opts.digestFile, err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\timagesNumber++\n\t\t}\n\t}\n\n\tif opts.dryRun {\n\t\tlogrus.Infof(\"Would have synced %d images from %d sources\", imagesNumber, len(srcRepoList))\n\t} else {\n\t\tlogrus.Infof(\"Synced %d images from %d sources\", imagesNumber, len(srcRepoList))\n\t}\n\tif !errorsPresent {\n\t\treturn nil\n\t}\n\treturn errors.New(\"Sync failed due to previous reported error(s) for one or more images\")\n}\n"
  },
  {
    "path": "cmd/skopeo/sync_test.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/types\"\n\t\"gopkg.in/yaml.v3\"\n)\n\nvar _ yaml.Unmarshaler = (*tlsVerifyConfig)(nil)\n\nfunc TestTLSVerifyConfig(t *testing.T) {\n\ttype container struct { // An example of a larger config file\n\t\tTLSVerify tlsVerifyConfig `yaml:\"tls-verify\"`\n\t}\n\n\tfor _, c := range []struct {\n\t\tinput    string\n\t\texpected tlsVerifyConfig\n\t}{\n\t\t{\n\t\t\tinput:    `tls-verify: true`,\n\t\t\texpected: tlsVerifyConfig{skip: types.OptionalBoolFalse},\n\t\t},\n\t\t{\n\t\t\tinput:    `tls-verify: false`,\n\t\t\texpected: tlsVerifyConfig{skip: types.OptionalBoolTrue},\n\t\t},\n\t\t{\n\t\t\tinput:    ``, // No value\n\t\t\texpected: tlsVerifyConfig{skip: types.OptionalBoolUndefined},\n\t\t},\n\t} {\n\t\tconfig := container{}\n\t\terr := yaml.Unmarshal([]byte(c.input), &config)\n\t\trequire.NoError(t, err, c.input)\n\t\tassert.Equal(t, c.expected, config.TLSVerify, c.input)\n\t}\n\n\t// Invalid input\n\tconfig := container{}\n\terr := yaml.Unmarshal([]byte(`tls-verify: \"not a valid bool\"`), &config)\n\tassert.Error(t, err)\n}\n\nfunc TestSync(t *testing.T) {\n\t// Invalid command-line arguments\n\tfor _, args := range [][]string{\n\t\t{},\n\t\t{\"a1\"},\n\t\t{\"a1\", \"a2\", \"a3\"},\n\t} {\n\t\tout, err := runSkopeo(append([]string{\"sync\"}, args...)...)\n\t\tassertTestFailed(t, out, err, \"Exactly two arguments expected\")\n\t}\n\n\t// FIXME: Much more test coverage\n\t// Actual feature tests exist in integration and systemtest\n}\n\n// TestSyncTLSPrecedence validates the interactions of tls-verify in YAML and --src-tls-verify in the CLI.\nfunc TestSyncTLSPrecedence(t *testing.T) {\n\tfor _, tt := range []struct {\n\t\tcli            string\n\t\tyaml           string\n\t\twantSkip       types.OptionalBool\n\t\twantDaemonSkip bool\n\t}{\n\t\t{\"--src-tls-verify=false\", `# nothing`, types.OptionalBoolTrue, true},\n\t\t{\"--src-tls-verify=true\", `# nothing`, types.OptionalBoolFalse, false},\n\t\t{\"\", `# nothing`, types.OptionalBoolUndefined, false},\n\t\t{\"--src-tls-verify=false\", \"tls-verify: true\", types.OptionalBoolFalse, false},\n\t\t{\"--src-tls-verify=true\", \"tls-verify: false\", types.OptionalBoolTrue, true},\n\t} {\n\t\tt.Run(fmt.Sprintf(\"%#v + %q\", tt.cli, tt.yaml), func(t *testing.T) {\n\t\t\topts := fakeImageOptions(t, \"src-\", true, []string{}, []string{tt.cli})\n\t\t\tsourceCtx, err := opts.newSystemContext()\n\t\t\trequire.NoError(t, err)\n\t\t\tvar cfg registrySyncConfig\n\t\t\terr = yaml.Unmarshal(fmt.Appendf(nil, `\n%s\nimages:\n  repo: # Specifying an explicit repo+tag avoids imagesToCopyFromRegistry trying to contact the registry.\n    - latest\n`, tt.yaml,\n\t\t\t), &cfg)\n\t\t\trequire.NoError(t, err)\n\n\t\t\tdescs, err := imagesToCopyFromRegistry(\"example.com\", cfg, *sourceCtx)\n\t\t\trequire.NoError(t, err)\n\t\t\trequire.NotEmpty(t, descs)\n\t\t\tctx := descs[0].Context\n\t\t\trequire.NotNil(t, ctx)\n\t\t\tassert.Equal(t, tt.wantSkip, ctx.DockerInsecureSkipTLSVerify)\n\t\t\tassert.Equal(t, tt.wantDaemonSkip, ctx.DockerDaemonInsecureSkipTLSVerify)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "cmd/skopeo/unshare.go",
    "content": "//go:build !linux\n\npackage main\n\nfunc reexecIfNecessaryForImages(_ ...string) error {\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/skopeo/unshare_linux.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/moby/sys/capability\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\nvar neededCapabilities = []capability.Cap{\n\tcapability.CAP_CHOWN,\n\tcapability.CAP_DAC_OVERRIDE,\n\tcapability.CAP_FOWNER,\n\tcapability.CAP_FSETID,\n\tcapability.CAP_MKNOD,\n\tcapability.CAP_SETFCAP,\n\tcapability.CAP_SYS_ADMIN,\n}\n\nfunc maybeReexec() error {\n\t// With Skopeo we need only the subset of the root capabilities necessary\n\t// for pulling an image to the storage.  Do not attempt to create a namespace\n\t// if we already have the capabilities we need.\n\tcapabilities, err := capability.NewPid2(0)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading the current capabilities sets: %w\", err)\n\t}\n\tif err := capabilities.Load(); err != nil {\n\t\treturn fmt.Errorf(\"error loading the current capabilities sets: %w\", err)\n\t}\n\tif slices.ContainsFunc(neededCapabilities, func(cap capability.Cap) bool {\n\t\treturn !capabilities.Get(capability.EFFECTIVE, cap)\n\t}) {\n\t\t// We miss a capability we need, create a user namespaces\n\t\tunshare.MaybeReexecUsingUserNamespace(true)\n\t\treturn nil\n\t}\n\treturn nil\n}\n\nfunc reexecIfNecessaryForImages(imageNames ...string) error {\n\t// Check if container-storage is used before doing unshare\n\tif slices.ContainsFunc(imageNames, func(imageName string) bool {\n\t\ttransport := alltransports.TransportFromImageName(imageName)\n\t\t// Hard-code the storage name to avoid a reference on c/image/storage.\n\t\t// See https://github.com/containers/skopeo/issues/771#issuecomment-563125006.\n\t\treturn transport != nil && transport.Name() == \"containers-storage\"\n\t}) {\n\t\treturn maybeReexec()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/skopeo/utils.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\tdockerdistributionerrcode \"github.com/docker/distribution/registry/api/errcode\"\n\tdockerdistributionapi \"github.com/docker/distribution/registry/api/v2\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n\tcommonFlag \"go.podman.io/common/pkg/flag\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/copy\"\n\t\"go.podman.io/image/v5/directory\"\n\t\"go.podman.io/image/v5/manifest\"\n\tociarchive \"go.podman.io/image/v5/oci/archive\"\n\tocilayout \"go.podman.io/image/v5/oci/layout\"\n\t\"go.podman.io/image/v5/pkg/cli\"\n\t\"go.podman.io/image/v5/pkg/cli/sigstore\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\t\"go.podman.io/image/v5/signature/signer\"\n\t\"go.podman.io/image/v5/signature/simplesequoia\"\n\t\"go.podman.io/image/v5/storage\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"golang.org/x/term\"\n)\n\n// errorShouldDisplayUsage is a subtype of error used by command handlers to indicate that the command’s help should be included.\ntype errorShouldDisplayUsage struct {\n\terror\n}\n\n// noteCloseFailure returns (possibly-nil) err modified to account for (non-nil) closeErr.\n// The error for closeErr is annotated with description (which is not a format string)\n// Typical usage:\n//\n//\tdefer func() {\n//\t\tif err := something.Close(); err != nil {\n//\t\t\treturnedErr = noteCloseFailure(returnedErr, \"closing something\", err)\n//\t\t}\n//\t}\nfunc noteCloseFailure(err error, description string, closeErr error) error {\n\t// We don’t accept a Closer() and close it ourselves because signature.PolicyContext has .Destroy(), not .Close().\n\t// This also makes it harder for a caller to do\n\t//     defer noteCloseFailure(returnedErr, …)\n\t// which doesn’t use the right value of returnedErr, and doesn’t update it.\n\tif err == nil {\n\t\treturn fmt.Errorf(\"%s: %w\", description, closeErr)\n\t}\n\t// In this case we prioritize the primary error for use with %w; closeErr is usually less relevant, or might be a consequence of the primary error.\n\treturn fmt.Errorf(\"%w (%s: %v)\", err, description, closeErr)\n}\n\n// commandAction intermediates between the RunE interface and the real handler,\n// primarily to ensure that cobra.Command is not available to the handler, which in turn\n// makes sure that the cmd.Flags() etc. flag access functions are not used,\n// and everything is done using the *Options structures and the *Var() methods of cmd.Flag().\n// handler may return errorShouldDisplayUsage to cause c.Help to be called.\nfunc commandAction(handler func(args []string, stdout io.Writer) error) func(cmd *cobra.Command, args []string) error {\n\treturn func(c *cobra.Command, args []string) error {\n\t\terr := handler(args, c.OutOrStdout())\n\t\tvar shouldDisplayUsage errorShouldDisplayUsage\n\t\tif errors.As(err, &shouldDisplayUsage) {\n\t\t\tc.SetOut(c.ErrOrStderr()) // This mutates c, but we are failing anyway.\n\t\t\t_ = c.Help()              // Even if this failed, we prefer to report the original error\n\t\t}\n\t\treturn err\n\t}\n}\n\n// deprecatedTLSVerifyOption represents a deprecated --tls-verify option,\n// which was accepted for all subcommands, for a time.\n// Every user should call deprecatedTLSVerifyOption.warnIfUsed() as part of handling the CLI,\n// whether or not the value actually ends up being used.\n// DO NOT ADD ANY NEW USES OF THIS; just call dockerImageFlags with an appropriate, possibly empty, flagPrefix.\ntype deprecatedTLSVerifyOption struct {\n\ttlsVerify commonFlag.OptionalBool // FIXME FIXME: Warn if this is used, or even if it is ignored.\n}\n\n// warnIfUsed warns if tlsVerify was set by the user, and suggests alternatives (which should\n// start with \"--\").\n// Every user should call this as part of handling the CLI, whether or not the value actually\n// ends up being used.\nfunc (opts *deprecatedTLSVerifyOption) warnIfUsed(alternatives []string) {\n\tif opts.tlsVerify.Present() {\n\t\tlogrus.Warnf(\"'--tls-verify' is deprecated, instead use: %s\", strings.Join(alternatives, \", \"))\n\t}\n}\n\n// deprecatedTLSVerifyFlags prepares the CLI flag writing into deprecatedTLSVerifyOption, and the managed deprecatedTLSVerifyOption structure.\n// DO NOT ADD ANY NEW USES OF THIS; just call dockerImageFlags with an appropriate, possibly empty, flagPrefix.\nfunc deprecatedTLSVerifyFlags() (pflag.FlagSet, *deprecatedTLSVerifyOption) {\n\topts := deprecatedTLSVerifyOption{}\n\tfs := pflag.FlagSet{}\n\tflag := commonFlag.OptionalBoolFlag(&fs, &opts.tlsVerify, \"tls-verify\", \"require HTTPS and verify certificates when accessing the container registry\")\n\tflag.Hidden = true\n\treturn fs, &opts\n}\n\n// sharedImageOptions collects CLI flags which are image-related, but do not change across images.\n// This really should be a part of globalOptions, but that would break existing users of (skopeo copy --authfile=).\ntype sharedImageOptions struct {\n\tauthFilePath string // Path to a */containers/auth.json\n}\n\n// sharedImageFlags prepares a collection of CLI flags writing into sharedImageOptions, and the managed sharedImageOptions structure.\nfunc sharedImageFlags() (pflag.FlagSet, *sharedImageOptions) {\n\topts := sharedImageOptions{}\n\tfs := pflag.FlagSet{}\n\tfs.StringVar(&opts.authFilePath, \"authfile\", os.Getenv(\"REGISTRY_AUTH_FILE\"), \"path of the registry credentials file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json\")\n\treturn fs, &opts\n}\n\n// dockerImageOptions collects CLI flags specific to the \"docker\" transport, which are\n// the same across subcommands, but may be different for each image\n// (e.g. may differ between the source and destination of a copy)\ntype dockerImageOptions struct {\n\tglobal              *globalOptions             // May be shared across several imageOptions instances.\n\tshared              *sharedImageOptions        // May be shared across several imageOptions instances.\n\tdeprecatedTLSVerify *deprecatedTLSVerifyOption // May be shared across several imageOptions instances, or nil.\n\tauthFilePath        commonFlag.OptionalString  // Path to a */containers/auth.json (prefixed version to override shared image option).\n\tcredsOption         commonFlag.OptionalString  // username[:password] for accessing a registry\n\tuserName            commonFlag.OptionalString  // username for accessing a registry\n\tpassword            commonFlag.OptionalString  // password for accessing a registry\n\tregistryToken       commonFlag.OptionalString  // token to be used directly as a Bearer token when accessing the registry\n\tdockerCertPath      string                     // A directory using Docker-like *.{crt,cert,key} files for connecting to a registry or a daemon\n\ttlsVerify           commonFlag.OptionalBool    // Require HTTPS and verify certificates (for docker: and docker-daemon:)\n\tnoCreds             bool                       // Access the registry anonymously\n}\n\n// imageOptions collects CLI flags which are the same across subcommands, but may be different for each image\n// (e.g. may differ between the source and destination of a copy)\ntype imageOptions struct {\n\tdockerImageOptions\n\tsharedBlobDir    string // A directory to use for OCI blobs, shared across repositories\n\tdockerDaemonHost string // docker-daemon: host to connect to\n}\n\n// dockerImageFlags prepares a collection of docker-transport specific CLI flags\n// writing into imageOptions, and the managed imageOptions structure.\nfunc dockerImageFlags(global *globalOptions, shared *sharedImageOptions, deprecatedTLSVerify *deprecatedTLSVerifyOption, flagPrefix, credsOptionAlias string) (pflag.FlagSet, *imageOptions) {\n\tflags := imageOptions{\n\t\tdockerImageOptions: dockerImageOptions{\n\t\t\tglobal:              global,\n\t\t\tshared:              shared,\n\t\t\tdeprecatedTLSVerify: deprecatedTLSVerify,\n\t\t},\n\t}\n\n\tfs := pflag.FlagSet{}\n\tif flagPrefix != \"\" {\n\t\t// the non-prefixed flag is handled by a shared flag.\n\t\tfs.Var(commonFlag.NewOptionalStringValue(&flags.authFilePath), flagPrefix+\"authfile\", \"path of the registry credentials file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json\")\n\t}\n\tfs.Var(commonFlag.NewOptionalStringValue(&flags.credsOption), flagPrefix+\"creds\", \"Use `USERNAME[:PASSWORD]` for accessing the registry\")\n\tfs.Var(commonFlag.NewOptionalStringValue(&flags.userName), flagPrefix+\"username\", \"Username for accessing the registry\")\n\tfs.Var(commonFlag.NewOptionalStringValue(&flags.password), flagPrefix+\"password\", \"Password for accessing the registry\")\n\tif credsOptionAlias != \"\" {\n\t\t// This is horribly ugly, but we need to support the old option forms of (skopeo copy) for compatibility.\n\t\t// Don't add any more cases like this.\n\t\tf := fs.VarPF(commonFlag.NewOptionalStringValue(&flags.credsOption), credsOptionAlias, \"\", \"Use `USERNAME[:PASSWORD]` for accessing the registry\")\n\t\tf.Hidden = true\n\t}\n\tfs.Var(commonFlag.NewOptionalStringValue(&flags.registryToken), flagPrefix+\"registry-token\", \"Provide a Bearer token for accessing the registry\")\n\tfs.StringVar(&flags.dockerCertPath, flagPrefix+\"cert-dir\", \"\", \"use certificates at `PATH` (*.crt, *.cert, *.key) to connect to the registry or daemon\")\n\tcommonFlag.OptionalBoolFlag(&fs, &flags.tlsVerify, flagPrefix+\"tls-verify\", \"require HTTPS and verify certificates when talking to the container registry or daemon\")\n\tfs.BoolVar(&flags.noCreds, flagPrefix+\"no-creds\", false, \"Access the registry anonymously\")\n\treturn fs, &flags\n}\n\n// imageFlags prepares a collection of CLI flags writing into imageOptions, and the managed imageOptions structure.\nfunc imageFlags(global *globalOptions, shared *sharedImageOptions, deprecatedTLSVerify *deprecatedTLSVerifyOption, flagPrefix, credsOptionAlias string) (pflag.FlagSet, *imageOptions) {\n\tdockerFlags, opts := dockerImageFlags(global, shared, deprecatedTLSVerify, flagPrefix, credsOptionAlias)\n\n\tfs := pflag.FlagSet{}\n\tfs.AddFlagSet(&dockerFlags)\n\tfs.StringVar(&opts.sharedBlobDir, flagPrefix+\"shared-blob-dir\", \"\", \"`DIRECTORY` to use to share blobs across OCI repositories\")\n\tfs.StringVar(&opts.dockerDaemonHost, flagPrefix+\"daemon-host\", \"\", \"use docker daemon host at `HOST` (docker-daemon: only)\")\n\treturn fs, opts\n}\n\nfunc retryFlags() (pflag.FlagSet, *retry.Options) {\n\topts := retry.Options{}\n\tfs := pflag.FlagSet{}\n\tfs.IntVar(&opts.MaxRetry, \"retry-times\", 0, \"the number of times to possibly retry\")\n\tfs.DurationVar(&opts.Delay, \"retry-delay\", 0*time.Second, \"Fixed delay between retries. If not set, retry uses an exponential backoff delay.\")\n\treturn fs, &opts\n}\n\n// newSystemContext returns a *types.SystemContext corresponding to opts.\n// It is guaranteed to return a fresh instance, so it is safe to make additional updates to it.\nfunc (opts *imageOptions) newSystemContext() (*types.SystemContext, error) {\n\t// *types.SystemContext instance from globalOptions\n\t//  imageOptions option overrides the instance if both are present.\n\tctx, err := opts.global.newSystemContext()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tctx.DockerCertPath = opts.dockerCertPath\n\tctx.OCISharedBlobDirPath = opts.sharedBlobDir\n\tctx.AuthFilePath = opts.shared.authFilePath\n\tctx.DockerDaemonHost = opts.dockerDaemonHost\n\tctx.DockerDaemonCertPath = opts.dockerCertPath\n\tif opts.authFilePath.Present() {\n\t\tctx.AuthFilePath = opts.authFilePath.Value()\n\t}\n\tif opts.deprecatedTLSVerify != nil && opts.deprecatedTLSVerify.tlsVerify.Present() {\n\t\t// If both this deprecated option and a non-deprecated option is present, we use the latter value.\n\t\tctx.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!opts.deprecatedTLSVerify.tlsVerify.Value())\n\t}\n\tif opts.tlsVerify.Present() {\n\t\tctx.DockerDaemonInsecureSkipTLSVerify = !opts.tlsVerify.Value()\n\t}\n\tif opts.tlsVerify.Present() {\n\t\tctx.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!opts.tlsVerify.Value())\n\t}\n\tif opts.credsOption.Present() && opts.noCreds {\n\t\treturn nil, errors.New(\"creds and no-creds cannot be specified at the same time\")\n\t}\n\tif opts.userName.Present() && opts.noCreds {\n\t\treturn nil, errors.New(\"username and no-creds cannot be specified at the same time\")\n\t}\n\tif opts.credsOption.Present() && opts.userName.Present() {\n\t\treturn nil, errors.New(\"creds and username cannot be specified at the same time\")\n\t}\n\t// if any of username or password is present, then both are expected to be present\n\tif opts.userName.Present() != opts.password.Present() {\n\t\tif opts.userName.Present() {\n\t\t\treturn nil, errors.New(\"password must be specified when username is specified\")\n\t\t}\n\t\treturn nil, errors.New(\"username must be specified when password is specified\")\n\t}\n\tif opts.credsOption.Present() {\n\t\tvar err error\n\t\tctx.DockerAuthConfig, err = getDockerAuth(opts.credsOption.Value())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else if opts.userName.Present() {\n\t\tctx.DockerAuthConfig = &types.DockerAuthConfig{\n\t\t\tUsername: opts.userName.Value(),\n\t\t\tPassword: opts.password.Value(),\n\t\t}\n\t}\n\tif opts.registryToken.Present() {\n\t\tctx.DockerBearerRegistryToken = opts.registryToken.Value()\n\t}\n\tif opts.noCreds {\n\t\tctx.DockerAuthConfig = &types.DockerAuthConfig{}\n\t}\n\n\treturn ctx, nil\n}\n\n// imageDestOptions is a superset of imageOptions specialized for image destinations.\n// Every user should call imageDestOptions.warnAboutIneffectiveOptions() as part of handling the CLI\ntype imageDestOptions struct {\n\t*imageOptions\n\tdirForceCompression         bool                   // Compress layers when saving to the dir: transport\n\tdirForceDecompression       bool                   // Decompress layers when saving to the dir: transport\n\tociAcceptUncompressedLayers bool                   // Whether to accept uncompressed layers in the oci: transport\n\tcompressionFormat           string                 // Format to use for the compression\n\tcompressionLevel            commonFlag.OptionalInt // Level to use for the compression\n\tprecomputeDigests           bool                   // Precompute digests to dedup layers when saving to the docker: transport\n\tforceCompressionFormat      bool                   // Ensures that the compression algorithm set in compressionFormat is used exclusively\n\timageDestFlagPrefix         string\n}\n\n// imageDestFlags prepares a collection of CLI flags writing into imageDestOptions, and the managed imageDestOptions structure.\nfunc imageDestFlags(global *globalOptions, shared *sharedImageOptions, deprecatedTLSVerify *deprecatedTLSVerifyOption, flagPrefix, credsOptionAlias string) (pflag.FlagSet, *imageDestOptions) {\n\tgenericFlags, genericOptions := imageFlags(global, shared, deprecatedTLSVerify, flagPrefix, credsOptionAlias)\n\topts := imageDestOptions{imageOptions: genericOptions, imageDestFlagPrefix: flagPrefix}\n\tfs := pflag.FlagSet{}\n\tfs.AddFlagSet(&genericFlags)\n\tfs.BoolVar(&opts.dirForceCompression, flagPrefix+\"compress\", false, \"Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)\")\n\tfs.BoolVar(&opts.dirForceDecompression, flagPrefix+\"decompress\", false, \"Decompress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)\")\n\tfs.BoolVar(&opts.ociAcceptUncompressedLayers, flagPrefix+\"oci-accept-uncompressed-layers\", false, \"Allow uncompressed image layers when saving to an OCI image using the 'oci' transport. (default is to compress things that aren't compressed)\")\n\tfs.StringVar(&opts.compressionFormat, flagPrefix+\"compress-format\", \"\", \"`FORMAT` to use for the compression\")\n\tfs.Var(commonFlag.NewOptionalIntValue(&opts.compressionLevel), flagPrefix+\"compress-level\", \"`LEVEL` to use for the compression\")\n\tfs.BoolVar(&opts.precomputeDigests, flagPrefix+\"precompute-digests\", false, \"Precompute digests to prevent uploading layers already on the registry using the 'docker' transport.\")\n\tfs.BoolVar(&opts.forceCompressionFormat, flagPrefix+\"force-compress-format\", false, \"Force exclusive use of the compression algorithm set in --dest-compress-format\")\n\treturn fs, &opts\n}\n\n// newSystemContext returns a *types.SystemContext corresponding to opts.\n// It is guaranteed to return a fresh instance, so it is safe to make additional updates to it.\nfunc (opts *imageDestOptions) newSystemContext() (*types.SystemContext, error) {\n\tctx, err := opts.imageOptions.newSystemContext()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx.DirForceCompress = opts.dirForceCompression\n\tctx.DirForceDecompress = opts.dirForceDecompression\n\tctx.OCIAcceptUncompressedLayers = opts.ociAcceptUncompressedLayers\n\tif opts.compressionFormat != \"\" {\n\t\tcf, err := compression.AlgorithmByName(opts.compressionFormat)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tctx.CompressionFormat = &cf\n\t}\n\tif opts.compressionLevel.Present() {\n\t\tvalue := opts.compressionLevel.Value()\n\t\tctx.CompressionLevel = &value\n\t}\n\tctx.DockerRegistryPushPrecomputeDigests = opts.precomputeDigests\n\treturn ctx, err\n}\n\n// warnAboutIneffectiveOptions warns if any ineffective option was set by the user\n// Every user should call this as part of handling the CLI\nfunc (opts *imageDestOptions) warnAboutIneffectiveOptions(destTransport types.ImageTransport) {\n\tif destTransport.Name() != directory.Transport.Name() {\n\t\tif opts.dirForceCompression {\n\t\t\tlogrus.Warnf(\"--%s can only be used if the destination transport is 'dir'\", opts.imageDestFlagPrefix+\"compress\")\n\t\t}\n\t\tif opts.dirForceDecompression {\n\t\t\tlogrus.Warnf(\"--%s can only be used if the destination transport is 'dir'\", opts.imageDestFlagPrefix+\"decompress\")\n\t\t}\n\t}\n}\n\n// sharedCopyOptions collects CLI flags that affect copying images, currently shared between the copy and sync commands.\ntype sharedCopyOptions struct {\n\tremoveSignatures         bool                      // Do not copy signatures from the source image\n\tsignByFingerprint        string                    // Sign the image using a GPG key with the specified fingerprint\n\tsignBySequoiaFingerprint string                    // Sign the image using a Sequoia-PGP key with the specified fingerprint\n\tsignBySigstoreParamFile  string                    // Sign the image using a sigstore signature per configuration in a param file\n\tsignBySigstorePrivateKey string                    // Sign the image using a sigstore private key\n\tsignPassphraseFile       string                    // Path pointing to a passphrase file when signing\n\tpreserveDigests          bool                      // Preserve digests during copy\n\tformat                   commonFlag.OptionalString // Force conversion of the image to a specified format\n}\n\n// sharedCopyFlags prepares a collection of CLI flags writing into sharedCopyoptions.\nfunc sharedCopyFlags() (pflag.FlagSet, *sharedCopyOptions) {\n\topts := sharedCopyOptions{}\n\tfs := pflag.FlagSet{}\n\tfs.BoolVar(&opts.removeSignatures, \"remove-signatures\", false, \"Do not copy signatures from source\")\n\tfs.StringVar(&opts.signByFingerprint, \"sign-by\", \"\", \"Sign the image using a GPG key with the specified `FINGERPRINT`\")\n\tfs.StringVar(&opts.signBySequoiaFingerprint, \"sign-by-sq-fingerprint\", \"\", \"Sign the image using a Sequoia-PGP key with the specified `FINGERPRINT`\")\n\tfs.StringVar(&opts.signBySigstoreParamFile, \"sign-by-sigstore\", \"\", \"Sign the image using a sigstore parameter file at `PATH`\")\n\tfs.StringVar(&opts.signBySigstorePrivateKey, \"sign-by-sigstore-private-key\", \"\", \"Sign the image using a sigstore private key at `PATH`\")\n\tfs.StringVar(&opts.signPassphraseFile, \"sign-passphrase-file\", \"\", \"Read a passphrase for signing an image from `PATH`\")\n\tfs.VarP(commonFlag.NewOptionalStringValue(&opts.format), \"format\", \"f\", `MANIFEST TYPE (oci, v2s1, or v2s2) to use in the destination (default is manifest type of source, with fallbacks)`)\n\tfs.BoolVar(&opts.preserveDigests, \"preserve-digests\", false, \"Preserve digests of images and lists\")\n\treturn fs, &opts\n}\n\n// copyOptions interprets opts, returns a partially-filled *copy.Options,\n// and a function that should be called to clean up.\nfunc (opts *sharedCopyOptions) copyOptions(stdout io.Writer) (*copy.Options, func(), error) {\n\tvar manifestType string\n\tif opts.format.Present() {\n\t\tmt, err := parseManifestFormat(opts.format.Value())\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tmanifestType = mt\n\t}\n\n\t// c/image/copy.Image does allow creating both simple signing and sigstore signatures simultaneously,\n\t// with independent passphrases, but that would make the CLI probably too confusing.\n\t// For now, use the passphrase with either, but only one of them.\n\tif opts.signPassphraseFile != \"\" {\n\t\tcount := 0\n\t\tif opts.signByFingerprint != \"\" {\n\t\t\tcount++\n\t\t}\n\t\tif opts.signBySequoiaFingerprint != \"\" {\n\t\t\tcount++\n\t\t}\n\t\tif opts.signBySigstorePrivateKey != \"\" {\n\t\t\tcount++\n\t\t}\n\t\tif count > 1 {\n\t\t\treturn nil, nil, fmt.Errorf(\"Only one of --sign-by, --sign-by-sq-fingerprint and --sign-by-sigstore-private-key can be used with --sign-passphrase-file\")\n\t\t}\n\t}\n\t// Simple signing does not really allow empty but present passphrases — but for sigstore, cosign does support creating keys encrypted with an empty passphrase;\n\t// so, at least for that case, we must track the distinction between an empty and a missing passphrase precisely.\n\tvar passphrase string\n\tpassphraseSet := false\n\tif opts.signPassphraseFile != \"\" {\n\t\tp, err := cli.ReadPassphraseFile(opts.signPassphraseFile)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tpassphrase = p\n\t\tpassphraseSet = true\n\t} else if opts.signBySigstorePrivateKey != \"\" {\n\t\tp, err := promptForPassphrase(opts.signBySigstorePrivateKey, os.Stdin, os.Stdout)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tpassphrase = p\n\t\tpassphraseSet = true\n\t} // opts.signByFingerprint triggers a GPG-agent passphrase prompt, possibly using a more secure channel, so we usually shouldn’t prompt ourselves if no passphrase was explicitly provided.\n\t// With opts.signBySequoiaFingerprint, we don’t prompt for a passphrase (for now??): We don’t know whether the key requires a passphrase.\n\tvar passphraseBytes []byte\n\tif passphraseSet {\n\t\tpassphraseBytes = []byte(passphrase)\n\t}\n\n\tvar signers []*signer.Signer\n\tcloseSigners := func() {\n\t\tfor _, signer := range signers {\n\t\t\tsigner.Close()\n\t\t}\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tcloseSigners()\n\t\t}\n\t}()\n\tif opts.signBySigstoreParamFile != \"\" {\n\t\tsigner, err := sigstore.NewSignerFromParameterFile(opts.signBySigstoreParamFile, &sigstore.Options{\n\t\t\tPrivateKeyPassphrasePrompt: func(keyFile string) (string, error) {\n\t\t\t\treturn promptForPassphrase(keyFile, os.Stdin, os.Stdout)\n\t\t\t},\n\t\t\tStdin:  os.Stdin,\n\t\t\tStdout: stdout,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"Error using --sign-by-sigstore: %w\", err)\n\t\t}\n\t\tsigners = append(signers, signer)\n\t}\n\tif opts.signBySequoiaFingerprint != \"\" {\n\t\tsqOpts := []simplesequoia.Option{\n\t\t\tsimplesequoia.WithKeyFingerprint(opts.signBySequoiaFingerprint),\n\t\t}\n\t\tif passphraseSet {\n\t\t\tsqOpts = append(sqOpts, simplesequoia.WithPassphrase(passphrase))\n\t\t}\n\t\tsigner, err := simplesequoia.NewSigner(sqOpts...)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"Error using --sign-by-sq-fingerprint: %w\", err)\n\t\t}\n\t\tsigners = append(signers, signer)\n\t}\n\n\tsucceeded = true\n\treturn &copy.Options{\n\t\tRemoveSignatures:                 opts.removeSignatures,\n\t\tSigners:                          signers,\n\t\tSignBy:                           opts.signByFingerprint,\n\t\tSignPassphrase:                   passphrase,\n\t\tSignBySigstorePrivateKeyFile:     opts.signBySigstorePrivateKey,\n\t\tSignSigstorePrivateKeyPassphrase: passphraseBytes,\n\n\t\tReportWriter: stdout,\n\n\t\tPreserveDigests:       opts.preserveDigests,\n\t\tForceManifestMIMEType: manifestType,\n\t}, closeSigners, nil\n}\n\nfunc parseCreds(creds string) (string, string, error) {\n\tif creds == \"\" {\n\t\treturn \"\", \"\", errors.New(\"credentials can't be empty\")\n\t}\n\tusername, password, _ := strings.Cut(creds, \":\") // Sets password to \"\" if there is no \":\"\n\tif username == \"\" {\n\t\treturn \"\", \"\", errors.New(\"username can't be empty\")\n\t}\n\treturn username, password, nil\n}\n\nfunc getDockerAuth(creds string) (*types.DockerAuthConfig, error) {\n\tusername, password, err := parseCreds(creds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &types.DockerAuthConfig{\n\t\tUsername: username,\n\t\tPassword: password,\n\t}, nil\n}\n\n// parseImageSource converts image URL-like string to an ImageSource.\n// The caller must call .Close() on the returned ImageSource.\nfunc parseImageSource(ctx context.Context, opts *imageOptions, name string) (types.ImageSource, error) {\n\tref, err := alltransports.ParseImageName(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsys, err := opts.newSystemContext()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn ref.NewImageSource(ctx, sys)\n}\n\n// parseManifestFormat parses format parameter for copy and sync command.\n// It returns string value to use as manifest MIME type\nfunc parseManifestFormat(manifestFormat string) (string, error) {\n\tswitch manifestFormat {\n\tcase \"oci\":\n\t\treturn imgspecv1.MediaTypeImageManifest, nil\n\tcase \"v2s1\":\n\t\treturn manifest.DockerV2Schema1SignedMediaType, nil\n\tcase \"v2s2\":\n\t\treturn manifest.DockerV2Schema2MediaType, nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unknown format %q. Choose one of the supported formats: 'oci', 'v2s1', or 'v2s2'\", manifestFormat)\n\t}\n}\n\n// usageTemplate returns the usage template for skopeo commands\n// This blocks the displaying of the global options. The main skopeo\n// command should not use this.\nconst usageTemplate = `Usage:{{if .Runnable}}\n{{.UseLine}}{{end}}{{if .HasAvailableSubCommands}}\n\n{{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}}\n\nAliases:\n{{.NameAndAliases}}{{end}}{{if .HasExample}}\n\nExamples:\n{{.Example}}{{end}}{{if .HasAvailableSubCommands}}\n\nAvailable Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name \"help\"))}}\n{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}\n\nFlags:\n{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}\n{{end}}\n`\n\n// adjustUsage uses usageTemplate template to get rid the GlobalOption from usage\n// and disable [flag] at the end of command usage\nfunc adjustUsage(c *cobra.Command) {\n\tc.SetUsageTemplate(usageTemplate)\n\tc.DisableFlagsInUseLine = true\n}\n\n// promptForPassphrase interactively prompts for a passphrase related to privateKeyFile\nfunc promptForPassphrase(privateKeyFile string, stdin, stdout *os.File) (string, error) {\n\tstdinFd := int(stdin.Fd())\n\tif !term.IsTerminal(stdinFd) {\n\t\treturn \"\", fmt.Errorf(\"Cannot prompt for a passphrase for key %s, standard input is not a TTY\", privateKeyFile)\n\t}\n\n\tfmt.Fprintf(stdout, \"Passphrase for key %s: \", privateKeyFile)\n\tpassphrase, err := term.ReadPassword(stdinFd)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"Error reading password: %w\", err)\n\t}\n\tfmt.Fprintf(stdout, \"\\n\")\n\treturn string(passphrase), nil\n}\n\n// isNotFoundImageError heuristically attempts to determine whether an error\n// is saying the remote source couldn't find the image (as opposed to an\n// authentication error, an I/O error etc.)\n// TODO drive this into containers/image properly\nfunc isNotFoundImageError(err error) bool {\n\tvar layoutImageNotFoundError ocilayout.ImageNotFoundError\n\tvar archiveImageNotFoundError ociarchive.ImageNotFoundError\n\treturn isDockerManifestUnknownError(err) ||\n\t\terrors.Is(err, storage.ErrNoSuchImage) ||\n\t\terrors.As(err, &layoutImageNotFoundError) ||\n\t\terrors.As(err, &archiveImageNotFoundError)\n}\n\n// isDockerManifestUnknownError is a copy of code from containers/image,\n// please update there first.\nfunc isDockerManifestUnknownError(err error) bool {\n\tvar ec dockerdistributionerrcode.ErrorCoder\n\tif !errors.As(err, &ec) {\n\t\treturn false\n\t}\n\treturn ec.ErrorCode() == dockerdistributionapi.ErrorCodeManifestUnknown\n}\n"
  },
  {
    "path": "cmd/skopeo/utils_nosequoia_test.go",
    "content": "//go:build !containers_image_sequoia\n\npackage main\n\nconst buildWithSequoia = false\n"
  },
  {
    "path": "cmd/skopeo/utils_sequoia_test.go",
    "content": "//go:build containers_image_sequoia\n\npackage main\n\nconst buildWithSequoia = true\n"
  },
  {
    "path": "cmd/skopeo/utils_test.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/copy\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc TestNoteCloseFailure(t *testing.T) {\n\tconst description = \"description\"\n\n\tmainErr := errors.New(\"main\")\n\tcloseErr := errors.New(\"closing\")\n\n\t// Main success, closing failed\n\tres := noteCloseFailure(nil, description, closeErr)\n\trequire.NotNil(t, res)\n\tassert.Contains(t, res.Error(), description)\n\tassert.Contains(t, res.Error(), closeErr.Error())\n\n\t// Both main and closing failed\n\tres = noteCloseFailure(mainErr, description, closeErr)\n\trequire.NotNil(t, res)\n\tassert.Contains(t, res.Error(), mainErr.Error())\n\tassert.Contains(t, res.Error(), description)\n\tassert.Contains(t, res.Error(), closeErr.Error())\n\tassert.ErrorIs(t, res, mainErr)\n}\n\n// fakeGlobalOptions creates globalOptions and sets it according to flags.\nfunc fakeGlobalOptions(t *testing.T, flags []string) (*globalOptions, *cobra.Command) {\n\tapp, opts := createApp()\n\tcmd := &cobra.Command{}\n\tapp.AddCommand(cmd)\n\terr := app.ParseFlags(flags)\n\trequire.NoError(t, err)\n\treturn opts, cmd\n}\n\n// fakeImageOptions creates imageOptions and sets it according to globalFlags/cmdFlags.\nfunc fakeImageOptions(t *testing.T, flagPrefix string, useDeprecatedTLSVerify bool,\n\tglobalFlags []string, cmdFlags []string,\n) *imageOptions {\n\tglobalOpts, cmd := fakeGlobalOptions(t, globalFlags)\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\tvar deprecatedTLSVerifyFlag pflag.FlagSet\n\tvar deprecatedTLSVerifyOpt *deprecatedTLSVerifyOption\n\tif useDeprecatedTLSVerify {\n\t\tdeprecatedTLSVerifyFlag, deprecatedTLSVerifyOpt = deprecatedTLSVerifyFlags()\n\t}\n\timageFlags, imageOpts := imageFlags(globalOpts, sharedOpts, deprecatedTLSVerifyOpt, flagPrefix, \"\")\n\tcmd.Flags().AddFlagSet(&sharedFlags)\n\tif useDeprecatedTLSVerify {\n\t\tcmd.Flags().AddFlagSet(&deprecatedTLSVerifyFlag)\n\t}\n\tcmd.Flags().AddFlagSet(&imageFlags)\n\terr := cmd.ParseFlags(cmdFlags)\n\trequire.NoError(t, err)\n\treturn imageOpts\n}\n\nfunc TestImageOptionsNewSystemContext(t *testing.T) {\n\t// Default state\n\topts := fakeImageOptions(t, \"dest-\", true, []string{}, []string{})\n\tres, err := opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t}, res)\n\n\t// Set everything to non-default values.\n\topts = fakeImageOptions(t, \"dest-\", true, []string{\n\t\t\"--registries.d\", \"/srv/registries.d\",\n\t\t\"--override-arch\", \"overridden-arch\",\n\t\t\"--override-os\", \"overridden-os\",\n\t\t\"--override-variant\", \"overridden-variant\",\n\t\t\"--tmpdir\", \"/srv\",\n\t}, []string{\n\t\t\"--authfile\", \"/srv/authfile\",\n\t\t\"--dest-authfile\", \"/srv/dest-authfile\",\n\t\t\"--dest-cert-dir\", \"/srv/cert-dir\",\n\t\t\"--dest-shared-blob-dir\", \"/srv/shared-blob-dir\",\n\t\t\"--dest-daemon-host\", \"daemon-host.example.com\",\n\t\t\"--dest-tls-verify=false\",\n\t\t\"--dest-creds\", \"creds-user:creds-password\",\n\t\t\"--dest-registry-token\", \"faketoken\",\n\t})\n\tres, err = opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tRegistriesDirPath:                 \"/srv/registries.d\",\n\t\tAuthFilePath:                      \"/srv/dest-authfile\",\n\t\tArchitectureChoice:                \"overridden-arch\",\n\t\tOSChoice:                          \"overridden-os\",\n\t\tVariantChoice:                     \"overridden-variant\",\n\t\tOCISharedBlobDirPath:              \"/srv/shared-blob-dir\",\n\t\tDockerCertPath:                    \"/srv/cert-dir\",\n\t\tDockerInsecureSkipTLSVerify:       types.OptionalBoolTrue,\n\t\tDockerAuthConfig:                  &types.DockerAuthConfig{Username: \"creds-user\", Password: \"creds-password\"},\n\t\tDockerBearerRegistryToken:         \"faketoken\",\n\t\tDockerDaemonCertPath:              \"/srv/cert-dir\",\n\t\tDockerDaemonHost:                  \"daemon-host.example.com\",\n\t\tDockerDaemonInsecureSkipTLSVerify: true,\n\t\tDockerRegistryUserAgent:           defaultUserAgent,\n\t\tBigFilesTemporaryDir:              \"/srv\",\n\t}, res)\n\n\t// Global/per-command tlsVerify behavior is tested in TestTLSVerifyFlags.\n\n\t// Invalid option values\n\topts = fakeImageOptions(t, \"dest-\", true, []string{}, []string{\"--dest-creds\", \"\"})\n\t_, err = opts.newSystemContext()\n\tassert.Error(t, err)\n}\n\n// fakeImageDestOptions creates imageDestOptions and sets it according to globalFlags/cmdFlags.\nfunc fakeImageDestOptions(t *testing.T, flagPrefix string, useDeprecatedTLSVerify bool,\n\tglobalFlags []string, cmdFlags []string,\n) *imageDestOptions {\n\tglobalOpts, cmd := fakeGlobalOptions(t, globalFlags)\n\tsharedFlags, sharedOpts := sharedImageFlags()\n\tvar deprecatedTLSVerifyFlag pflag.FlagSet\n\tvar deprecatedTLSVerifyOpt *deprecatedTLSVerifyOption\n\tif useDeprecatedTLSVerify {\n\t\tdeprecatedTLSVerifyFlag, deprecatedTLSVerifyOpt = deprecatedTLSVerifyFlags()\n\t}\n\timageFlags, imageOpts := imageDestFlags(globalOpts, sharedOpts, deprecatedTLSVerifyOpt, flagPrefix, \"\")\n\tcmd.Flags().AddFlagSet(&sharedFlags)\n\tif useDeprecatedTLSVerify {\n\t\tcmd.Flags().AddFlagSet(&deprecatedTLSVerifyFlag)\n\t}\n\tcmd.Flags().AddFlagSet(&imageFlags)\n\terr := cmd.ParseFlags(cmdFlags)\n\trequire.NoError(t, err)\n\treturn imageOpts\n}\n\nfunc TestImageDestOptionsNewSystemContext(t *testing.T) {\n\t// Default state\n\topts := fakeImageDestOptions(t, \"dest-\", true, []string{}, []string{})\n\tres, err := opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t}, res)\n\n\tauthFile := \"/tmp/auth.json\"\n\t// Make sure when REGISTRY_AUTH_FILE is set the auth file is used\n\tt.Setenv(\"REGISTRY_AUTH_FILE\", authFile)\n\n\t// Explicitly set everything to default, except for when the default is “not present”\n\topts = fakeImageDestOptions(t, \"dest-\", true, []string{}, []string{\n\t\t\"--dest-compress=false\",\n\t})\n\tres, err = opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tAuthFilePath:            authFile,\n\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t}, res)\n\n\t// Set everything to non-default values.\n\topts = fakeImageDestOptions(t, \"dest-\", true, []string{\n\t\t\"--registries.d\", \"/srv/registries.d\",\n\t\t\"--override-arch\", \"overridden-arch\",\n\t\t\"--override-os\", \"overridden-os\",\n\t\t\"--override-variant\", \"overridden-variant\",\n\t\t\"--tmpdir\", \"/srv\",\n\t}, []string{\n\t\t\"--authfile\", \"/srv/authfile\",\n\t\t\"--dest-cert-dir\", \"/srv/cert-dir\",\n\t\t\"--dest-shared-blob-dir\", \"/srv/shared-blob-dir\",\n\t\t\"--dest-compress=true\",\n\t\t\"--dest-daemon-host\", \"daemon-host.example.com\",\n\t\t\"--dest-tls-verify=false\",\n\t\t\"--dest-creds\", \"creds-user:creds-password\",\n\t\t\"--dest-registry-token\", \"faketoken\",\n\t\t\"--dest-precompute-digests=true\",\n\t})\n\tres, err = opts.newSystemContext()\n\trequire.NoError(t, err)\n\tassert.Equal(t, &types.SystemContext{\n\t\tRegistriesDirPath:                   \"/srv/registries.d\",\n\t\tAuthFilePath:                        \"/srv/authfile\",\n\t\tArchitectureChoice:                  \"overridden-arch\",\n\t\tOSChoice:                            \"overridden-os\",\n\t\tVariantChoice:                       \"overridden-variant\",\n\t\tOCISharedBlobDirPath:                \"/srv/shared-blob-dir\",\n\t\tDockerCertPath:                      \"/srv/cert-dir\",\n\t\tDockerInsecureSkipTLSVerify:         types.OptionalBoolTrue,\n\t\tDockerAuthConfig:                    &types.DockerAuthConfig{Username: \"creds-user\", Password: \"creds-password\"},\n\t\tDockerBearerRegistryToken:           \"faketoken\",\n\t\tDockerDaemonCertPath:                \"/srv/cert-dir\",\n\t\tDockerDaemonHost:                    \"daemon-host.example.com\",\n\t\tDockerDaemonInsecureSkipTLSVerify:   true,\n\t\tDockerRegistryUserAgent:             defaultUserAgent,\n\t\tDirForceCompress:                    true,\n\t\tBigFilesTemporaryDir:                \"/srv\",\n\t\tDockerRegistryPushPrecomputeDigests: true,\n\t}, res)\n\n\t// Global/per-command tlsVerify behavior is tested in TestTLSVerifyFlags.\n\n\t// Invalid option values in imageOptions\n\topts = fakeImageDestOptions(t, \"dest-\", true, []string{}, []string{\"--dest-creds\", \"\"})\n\t_, err = opts.newSystemContext()\n\tassert.Error(t, err)\n}\n\n// TestImageOptionsUsernamePassword verifies that using the username and password\n// options works as expected\nfunc TestImageOptionsUsernamePassword(t *testing.T) {\n\tfor _, command := range []struct {\n\t\tcommandArgs        []string\n\t\texpectedAuthConfig *types.DockerAuthConfig // data to expect, or nil if an error is expected\n\t}{\n\t\t// Set only username/password (without --creds), expected to pass\n\t\t{\n\t\t\tcommandArgs:        []string{\"--dest-username\", \"foo\", \"--dest-password\", \"bar\"},\n\t\t\texpectedAuthConfig: &types.DockerAuthConfig{Username: \"foo\", Password: \"bar\"},\n\t\t},\n\t\t// no username but set password, expect error\n\t\t{\n\t\t\tcommandArgs:        []string{\"--dest-password\", \"foo\"},\n\t\t\texpectedAuthConfig: nil,\n\t\t},\n\t\t// set username but no password. expected to fail (we currently don't allow a user without password)\n\t\t{\n\t\t\tcommandArgs:        []string{\"--dest-username\", \"bar\"},\n\t\t\texpectedAuthConfig: nil,\n\t\t},\n\t\t// set username with --creds, expected to fail\n\t\t{\n\t\t\tcommandArgs:        []string{\"--dest-username\", \"bar\", \"--dest-creds\", \"hello:world\", \"--dest-password\", \"foo\"},\n\t\t\texpectedAuthConfig: nil,\n\t\t},\n\t\t// set username with --no-creds, expected to fail\n\t\t{\n\t\t\tcommandArgs:        []string{\"--dest-username\", \"bar\", \"--dest-no-creds\", \"--dest-password\", \"foo\"},\n\t\t\texpectedAuthConfig: nil,\n\t\t},\n\t} {\n\t\topts := fakeImageDestOptions(t, \"dest-\", true, []string{}, command.commandArgs)\n\t\t// parse the command options\n\t\tres, err := opts.newSystemContext()\n\t\tif command.expectedAuthConfig == nil {\n\t\t\tassert.Error(t, err)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, &types.SystemContext{\n\t\t\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t\t\t\tDockerAuthConfig:        command.expectedAuthConfig,\n\t\t\t}, res)\n\t\t}\n\t}\n}\n\nfunc TestTLSVerifyFlags(t *testing.T) {\n\ttype systemContextOpts interface { // Either *imageOptions or *imageDestOptions\n\t\tnewSystemContext() (*types.SystemContext, error)\n\t}\n\n\tfor _, creator := range []struct {\n\t\tname    string\n\t\tnewOpts func(useDeprecatedTLSVerify bool, globalFlags, cmdFlags []string) systemContextOpts\n\t}{\n\t\t{\n\t\t\t\"imageFlags\",\n\t\t\tfunc(useDeprecatedTLSVerify bool, globalFlags, cmdFlags []string) systemContextOpts {\n\t\t\t\treturn fakeImageOptions(t, \"dest-\", useDeprecatedTLSVerify, globalFlags, cmdFlags)\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"imageDestFlags\",\n\t\t\tfunc(useDeprecatedTLSVerify bool, globalFlags, cmdFlags []string) systemContextOpts {\n\t\t\t\treturn fakeImageDestOptions(t, \"dest-\", useDeprecatedTLSVerify, globalFlags, cmdFlags)\n\t\t\t},\n\t\t},\n\t} {\n\t\tt.Run(creator.name, func(t *testing.T) {\n\t\t\tfor _, c := range []struct {\n\t\t\t\tglobal, deprecatedCmd, cmd string\n\t\t\t\texpectedDocker             types.OptionalBool\n\t\t\t\texpectedDockerDaemon       bool\n\t\t\t}{\n\t\t\t\t{\"\", \"\", \"\", types.OptionalBoolUndefined, false},\n\t\t\t\t{\"\", \"\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"\", \"\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"\", \"false\", \"\", types.OptionalBoolTrue, false},\n\t\t\t\t{\"\", \"false\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"\", \"false\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"\", \"true\", \"\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"\", \"true\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"\", \"true\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"false\", \"\", \"\", types.OptionalBoolTrue, false},\n\t\t\t\t{\"false\", \"\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"false\", \"\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"false\", \"false\", \"\", types.OptionalBoolTrue, false},\n\t\t\t\t{\"false\", \"false\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"false\", \"false\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"false\", \"true\", \"\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"false\", \"true\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"false\", \"true\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"true\", \"\", \"\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"true\", \"\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"true\", \"\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"true\", \"false\", \"\", types.OptionalBoolTrue, false},\n\t\t\t\t{\"true\", \"false\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"true\", \"false\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"true\", \"true\", \"\", types.OptionalBoolFalse, false},\n\t\t\t\t{\"true\", \"true\", \"false\", types.OptionalBoolTrue, true},\n\t\t\t\t{\"true\", \"true\", \"true\", types.OptionalBoolFalse, false},\n\t\t\t} {\n\t\t\t\tglobalFlags := []string{}\n\t\t\t\tif c.global != \"\" {\n\t\t\t\t\tglobalFlags = append(globalFlags, \"--tls-verify=\"+c.global)\n\t\t\t\t}\n\t\t\t\tcmdFlags := []string{}\n\t\t\t\tif c.deprecatedCmd != \"\" {\n\t\t\t\t\tcmdFlags = append(cmdFlags, \"--tls-verify=\"+c.deprecatedCmd)\n\t\t\t\t}\n\t\t\t\tif c.cmd != \"\" {\n\t\t\t\t\tcmdFlags = append(cmdFlags, \"--dest-tls-verify=\"+c.cmd)\n\t\t\t\t}\n\t\t\t\topts := creator.newOpts(true, globalFlags, cmdFlags)\n\t\t\t\tres, err := opts.newSystemContext()\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, c.expectedDocker, res.DockerInsecureSkipTLSVerify, \"%#v\", c)\n\t\t\t\tassert.Equal(t, c.expectedDockerDaemon, res.DockerDaemonInsecureSkipTLSVerify, \"%#v\", c)\n\n\t\t\t\tif c.deprecatedCmd == \"\" { // Test also the behavior when deprecatedTLSFlag is not recognized\n\t\t\t\t\t// Use globalFlags from the previous test\n\t\t\t\t\tcmdFlags := []string{}\n\t\t\t\t\tif c.cmd != \"\" {\n\t\t\t\t\t\tcmdFlags = append(cmdFlags, \"--dest-tls-verify=\"+c.cmd)\n\t\t\t\t\t}\n\t\t\t\t\topts := creator.newOpts(false, globalFlags, cmdFlags)\n\t\t\t\t\tres, err = opts.newSystemContext()\n\t\t\t\t\trequire.NoError(t, err)\n\t\t\t\t\tassert.Equal(t, c.expectedDocker, res.DockerInsecureSkipTLSVerify, \"%#v\", c)\n\t\t\t\t\tassert.Equal(t, c.expectedDockerDaemon, res.DockerDaemonInsecureSkipTLSVerify, \"%#v\", c)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\n// fakeSharedCopyOptions creates sharedCopyOptions and sets it according to cmdFlags.\nfunc fakeSharedCopyOptions(t *testing.T, cmdFlags []string) *sharedCopyOptions {\n\t_, cmd := fakeGlobalOptions(t, []string{})\n\tsharedCopyFlags, sharedCopyOpts := sharedCopyFlags()\n\tcmd.Flags().AddFlagSet(&sharedCopyFlags)\n\terr := cmd.ParseFlags(cmdFlags)\n\trequire.NoError(t, err)\n\treturn sharedCopyOpts\n}\n\nfunc TestSharedCopyOptionsCopyOptions(t *testing.T) {\n\tsomeStdout := bytes.Buffer{}\n\n\tpassphraseFile := filepath.Join(t.TempDir(), \"passphrase\") // Eventually we could refer to a passphrase fixture instead\n\terr := os.WriteFile(passphraseFile, []byte(\"test-passphrase\"), 0o600)\n\trequire.NoError(t, err)\n\n\ttype tc struct {\n\t\toptions        []string\n\t\texpected       copy.Options\n\t\texpectedSigner bool\n\t}\n\tc := []tc{\n\t\t{ // Default state\n\t\t\toptions: []string{},\n\t\t\texpected: copy.Options{\n\t\t\t\tReportWriter: &someStdout,\n\t\t\t},\n\t\t},\n\t\t// Set most flags to non-default values\n\t\t// This should also test --sign-by-sigstore and --sign-by-sigstore-private-key; we would have\n\t\t// to create test keys for that.\n\t\t// This does not test --sign-by-sq-fingerprint, because that needs to be conditional based on buildWithSequoia.\n\t\t{\n\t\t\toptions: []string{\n\t\t\t\t\"--remove-signatures\",\n\t\t\t\t\"--sign-by\", \"gpgFingerprint\",\n\t\t\t\t\"--format\", \"oci\",\n\t\t\t\t\"--preserve-digests\",\n\t\t\t},\n\t\t\texpected: copy.Options{\n\t\t\t\tRemoveSignatures:      true,\n\t\t\t\tSignBy:                \"gpgFingerprint\",\n\t\t\t\tReportWriter:          &someStdout,\n\t\t\t\tPreserveDigests:       true,\n\t\t\t\tForceManifestMIMEType: imgspecv1.MediaTypeImageManifest,\n\t\t\t},\n\t\t},\n\t\t{ // --sign-passphrase-file + --sign-by work\n\t\t\toptions: []string{\n\t\t\t\t\"--sign-by\", \"gpgFingerprint\",\n\t\t\t\t\"--sign-passphrase-file\", passphraseFile,\n\t\t\t},\n\t\t\texpected: copy.Options{\n\t\t\t\tSignBy:                           \"gpgFingerprint\",\n\t\t\t\tSignPassphrase:                   \"test-passphrase\",\n\t\t\t\tSignSigstorePrivateKeyPassphrase: []byte(\"test-passphrase\"),\n\t\t\t\tReportWriter:                     &someStdout,\n\t\t\t},\n\t\t},\n\t\t{ // --sign-passphrase-file + --sign-by-sigstore-private-key work\n\t\t\toptions: []string{\n\t\t\t\t\"--sign-by-sigstore-private-key\", \"/some/key/path.private\",\n\t\t\t\t\"--sign-passphrase-file\", passphraseFile,\n\t\t\t},\n\t\t\texpected: copy.Options{\n\t\t\t\tSignPassphrase:                   \"test-passphrase\",\n\t\t\t\tSignBySigstorePrivateKeyFile:     \"/some/key/path.private\",\n\t\t\t\tSignSigstorePrivateKeyPassphrase: []byte(\"test-passphrase\"),\n\t\t\t\tReportWriter:                     &someStdout,\n\t\t\t},\n\t\t},\n\t\t{ // --sign-passphrase-file + --sign-by-sigstore-private-key work with an empty passphrase\n\t\t\toptions: []string{\n\t\t\t\t\"--sign-by-sigstore-private-key\", \"/some/key/path.private\",\n\t\t\t\t\"--sign-passphrase-file\", \"./fixtures/empty.passphrase\",\n\t\t\t},\n\t\t\texpected: copy.Options{\n\t\t\t\tSignPassphrase:                   \"\",\n\t\t\t\tSignBySigstorePrivateKeyFile:     \"/some/key/path.private\",\n\t\t\t\tSignSigstorePrivateKeyPassphrase: []byte(\"\"),\n\t\t\t\tReportWriter:                     &someStdout,\n\t\t\t},\n\t\t},\n\t}\n\t// If Sequoia is supported, --sign-passphrase-file + --sign-by-sq-fingerprint work\n\tif buildWithSequoia {\n\t\tc = append(c, tc{\n\t\t\toptions: []string{\n\t\t\t\t\"--sign-by-sq-fingerprint\", \"sqFingerprint\",\n\t\t\t\t\"--sign-passphrase-file\", passphraseFile,\n\t\t\t},\n\t\t\texpected: copy.Options{\n\t\t\t\tSignPassphrase:                   \"test-passphrase\",\n\t\t\t\tSignSigstorePrivateKeyPassphrase: []byte(\"test-passphrase\"),\n\t\t\t\tReportWriter:                     &someStdout,\n\t\t\t},\n\t\t\texpectedSigner: true,\n\t\t})\n\t}\n\tfor _, c := range c {\n\t\topts := fakeSharedCopyOptions(t, c.options)\n\t\tres, cleanup, err := opts.copyOptions(&someStdout)\n\t\trequire.NoError(t, err)\n\t\tdefer cleanup()\n\t\tif c.expectedSigner {\n\t\t\tassert.NotNil(t, res.Signers)\n\t\t\tres.Signers = nil // To allow the comparison below\n\t\t}\n\t\tassert.Equal(t, &c.expected, res)\n\t}\n\n\tfor _, opts := range [][]string{\n\t\t{\"--format\", \"invalid\"}, // Invalid --format\n\t\t// More --sign-by-sigstore-private-key, --sign-by-sigstore failure cases should be tested here.\n\t\t// --sign-passphrase-file + more than one key option\n\t\t{\"--sign-by\", \"gpgFingerprint\", \"--sign-by-sq-fingerprint\", \"sqFingerprint\", \"--sign-passphrase-file\", passphraseFile},\n\t\t{\"--sign-by\", \"gpgFingerprint\", \"--sign-by-sigstore-private-key\", \"sigstorePrivateKey\", \"--sign-passphrase-file\", passphraseFile},\n\t\t{\"--sign-by-sq-fingerprint\", \"sqFingerprint\", \"--sign-by-sigstore-private-key\", \"sigstorePrivateKey\", \"--sign-passphrase-file\", passphraseFile},\n\t\t{\"--sign-by\", \"gpgFingerprint\", \"--sign-passphrase-file\", \"/dev/null/this/does/not/exist\"}, // --sign-passphrase-file not found\n\t\t{\"--sign-by-sigstore\", \"/dev/null/this/does/not/exist\"},                                    // --sign-by-sigstore file not found\n\t} {\n\t\topts := fakeSharedCopyOptions(t, opts)\n\t\t_, _, err = opts.copyOptions(&someStdout)\n\t\tassert.Error(t, err)\n\t}\n}\n\nfunc TestParseManifestFormat(t *testing.T) {\n\tfor _, testCase := range []struct {\n\t\tformatParam          string\n\t\texpectedManifestType string\n\t\texpectErr            bool\n\t}{\n\t\t{\n\t\t\t\"oci\",\n\t\t\timgspecv1.MediaTypeImageManifest,\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"v2s1\",\n\t\t\tmanifest.DockerV2Schema1SignedMediaType,\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"v2s2\",\n\t\t\tmanifest.DockerV2Schema2MediaType,\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\ttrue,\n\t\t},\n\t\t{\n\t\t\t\"badValue\",\n\t\t\t\"\",\n\t\t\ttrue,\n\t\t},\n\t} {\n\t\tmanifestType, err := parseManifestFormat(testCase.formatParam)\n\t\tif testCase.expectErr {\n\t\t\trequire.Error(t, err)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\t\t}\n\t\tassert.Equal(t, manifestType, testCase.expectedManifestType)\n\t}\n}\n\n// since there is a shared authfile image option and a non-shared (prefixed) one, make sure the override logic\n// works correctly.\nfunc TestImageOptionsAuthfileOverride(t *testing.T) {\n\tfor _, testCase := range []struct {\n\t\tflagPrefix           string\n\t\tcmdFlags             []string\n\t\texpectedAuthfilePath string\n\t}{\n\t\t// if there is no prefix, only authfile is allowed.\n\t\t{\n\t\t\t\"\",\n\t\t\t[]string{\n\t\t\t\t\"--authfile\", \"/srv/authfile\",\n\t\t\t},\n\t\t\t\"/srv/authfile\",\n\t\t},\n\t\t// if authfile and dest-authfile is provided, dest-authfile wins\n\t\t{\n\t\t\t\"dest-\",\n\t\t\t[]string{\n\t\t\t\t\"--authfile\", \"/srv/authfile\",\n\t\t\t\t\"--dest-authfile\", \"/srv/dest-authfile\",\n\t\t\t},\n\t\t\t\"/srv/dest-authfile\",\n\t\t},\n\t\t// if only the shared authfile is provided, authfile must be present in system context\n\t\t{\n\t\t\t\"dest-\",\n\t\t\t[]string{\n\t\t\t\t\"--authfile\", \"/srv/authfile\",\n\t\t\t},\n\t\t\t\"/srv/authfile\",\n\t\t},\n\t\t// if only the dest authfile is provided, dest-authfile must be present in system context\n\t\t{\n\t\t\t\"dest-\",\n\t\t\t[]string{\n\t\t\t\t\"--dest-authfile\", \"/srv/dest-authfile\",\n\t\t\t},\n\t\t\t\"/srv/dest-authfile\",\n\t\t},\n\t} {\n\t\topts := fakeImageOptions(t, testCase.flagPrefix, false, []string{}, testCase.cmdFlags)\n\t\tres, err := opts.newSystemContext()\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, &types.SystemContext{\n\t\t\tAuthFilePath:            testCase.expectedAuthfilePath,\n\t\t\tDockerRegistryUserAgent: defaultUserAgent,\n\t\t}, res)\n\t}\n}\n"
  },
  {
    "path": "contrib/cirrus/mac_cleanup.sh",
    "content": "#!/bin/bash\n\n# This script is intended to be called by Cirrus-CI on a Mac M1 persistent worker.\n# It performs a best-effort attempt at cleaning up from one task execution to the next.\n# Since it run both before and after tasks, it must exit cleanly if there was a cleanup\n# failure (i.e. file or directory not found).\n\n# Help anybody debugging side-effects, since failures are ignored (by necessity).\nset +e -x\n\n# These are the main processes which could leak out of testing.\nkillall podman vfkit gvproxy make go ginkgo\n\nmkdir -p $TMPDIR\n\n# Golang will leave behind lots of read-only bits, ref:\n# https://go.dev/ref/mod#module-cache\n# However other tools/scripts could also set things read-only.\n# At this point in CI, we really want all this stuff gone-gone,\n# so there's actually zero-chance it can interfere.\nchmod -R u+w $TMPDIR/* $TMPDIR/.??*\n\n# This is defined as $TMPDIR during setup.  Name must be kept\n# \"short\" as sockets may reside here.  Darwin suffers from\n# the same limited socket-pathname character-length restriction\n# as Linux.\nrm -rf $TMPDIR/* $TMPDIR/.??*\n\n# Don't change or clobber anything under $CIRRUS_WORKING_DIR for\n# the currently running task.  But make sure we have write permission\n# (go get sets dependencies ro) for everything else, before removing it.\n# First make everything writeable - see the \"Golang will...\" comment above.\n# shellcheck disable=SC2154\nfind \"$HOME/ci\" -mindepth 1 -maxdepth 1 \\\n    -not -name \"*task-${CIRRUS_TASK_ID}*\" -prune -exec chmod -R u+w '{}' +\nfind \"$HOME/ci\" -mindepth 1 -maxdepth 1 \\\n    -not -name \"*task-${CIRRUS_TASK_ID}*\" -prune -exec rm -rf '{}' +\n\n# Bash scripts exit with the status of the last command.\ntrue\n"
  },
  {
    "path": "contrib/cirrus/ostree_ext.dockerfile",
    "content": "ARG BASE_FQIN=quay.io/coreos-assembler/fcos-buildroot:testing-devel\nFROM $BASE_FQIN\n\n# See 'Danger of using COPY and ADD instructions'\n# at https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment\n# Provide easy way to force-invalidate image cache by .cirrus.yml change\nARG CIRRUS_IMAGE_VERSION\nENV CIRRUS_IMAGE_VERSION=$CIRRUS_IMAGE_VERSION\nADD https://sh.rustup.rs /var/tmp/rustup_installer.sh\n\nRUN dnf remove -y rust && \\\n    chmod +x /var/tmp/rustup_installer.sh && \\\n    /var/tmp/rustup_installer.sh -y --default-toolchain stable --profile minimal\n\nENV PATH=/root/.cargo/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n"
  },
  {
    "path": "contrib/cirrus/runner.sh",
    "content": "#!/bin/bash\n\n# This script is intended to be executed by automation or humans\n# under a hack/get_ci_vm.sh context.  Use under any other circumstances\n# is unlikely to function.\n\nset -e\n\n# BEGIN Global export of all variables\nset -a\n\n# Due to differences across platforms and runtime execution environments,\n# handling of the (otherwise) default shell setup is non-uniform.  Rather\n# than attempt to workaround differences, simply force-load/set required\n# items every time this library is utilized.\nUSER=\"$(whoami)\"\nHOME=\"$(getent passwd $USER | cut -d : -f 6)\"\n# Some platforms set and make this read-only\n[[ -n \"$UID\" ]] || \\\n    UID=$(getent passwd $USER | cut -d : -f 3)\n\nif [[ -r \"/etc/automation_environment\" ]]; then\n    source /etc/automation_environment\n    source $AUTOMATION_LIB_PATH/common_lib.sh\nelse\n    (\n    echo \"WARNING: It does not appear that containers/automation was installed.\"\n    echo \"         Functionality of most of ${BASH_SOURCE[0]} will be negatively\"\n    echo \"         impacted.\"\n    ) > /dev/stderr\nfi\n\n# This is the magic interpreted by the tests to allow modifying local config/services.\nSKOPEO_CONTAINER_TESTS=1\n\nPATH=$PATH:$GOPATH/bin\n\n# END Global export of all variables\nset +a\n\n\n_run_setup() {\n    local mnt\n    local errmsg\n    req_env_vars SKOPEO_CIDEV_CONTAINER_FQIN\n    if [[ \"$OS_RELEASE_ID\" != \"fedora\" ]]; then\n        die \"Unknown/unsupported distro. $OS_REL_VER\"\n    fi\n\n    if [[ -r \"/.ci_setup_complete\" ]]; then\n        warn \"Thwarted an attempt to execute setup more than once.\"\n        return\n    fi\n\n    # VM's come with the distro. skopeo package pre-installed\n    dnf remove -y skopeo\n\n    msg \"Removing systemd-resolved from nsswitch.conf\"\n    # /etc/resolv.conf is already set to bypass systemd-resolvd\n    sed -i -r -e 's/^(hosts.+)resolve.+dns/\\1dns/' /etc/nsswitch.conf\n\n    # A slew of compiled binaries are pre-built and distributed\n    # within the CI/Dev container image, but we want to run\n    # things directly on the host VM.  Fortunately they're all\n    # located in the container under /usr/local/bin\n    msg \"Accessing contents of $SKOPEO_CIDEV_CONTAINER_FQIN\"\n    podman pull --retry 3 --quiet $SKOPEO_CIDEV_CONTAINER_FQIN\n    mnt=$(podman mount $(podman create $SKOPEO_CIDEV_CONTAINER_FQIN))\n\n    # The container and VM images are built in tandem in the same repo.\n    # automation, but the sources are in different directories.  It's\n    # possible for a mismatch to happen, but should (hopefully) be unlikely.\n    # Double-check to make sure.\n    # Temporarily, allow running on Rawhide VMs and consuming older binaries:\n    # that should be compatible enough. Eventually, we’ll stop using Rawhide again.\n    if ! grep -Fqx \"ID=$OS_RELEASE_ID\" $mnt/etc/os-release || \\\n       { ! [[ \"$VM_IMAGE_NAME\" =~ \"rawhide\" ]] && ! grep -Fqx \"VERSION_ID=$OS_RELEASE_VER\" $mnt/etc/os-release; } then\n            die \"Somehow $SKOPEO_CIDEV_CONTAINER_FQIN is not based on $OS_REL_VER.\"\n    fi\n    msg \"Copying test binaries from $SKOPEO_CIDEV_CONTAINER_FQIN /usr/local/bin/\"\n    cp -a \"$mnt/usr/local/bin/\"* \"/usr/local/bin/\"\n    msg \"Configuring the openshift registry\"\n\n    # TODO: Put directory & yaml into more sensible place + update integration tests\n    mkdir -vp /registry\n    cp -a \"$mnt/atomic-registry-config.yml\" /\n\n    msg \"Cleaning up\"\n    podman umount --latest\n    podman rm --latest\n\n    # Ensure setup can only run once\n    touch \"/.ci_setup_complete\"\n}\n\n_run_vendor() {\n    make vendor BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_run_build() {\n    make bin/skopeo BUILDTAGS=\"$BUILDTAGS\"\n    make install PREFIX=/usr/local BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_run_cross() {\n    make local-cross BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_run_doccheck() {\n    make validate-docs BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_run_unit() {\n    make test-unit-local BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_podman_reset() {\n    # Ensure we start with a clean-slate\n    showrun podman system reset --force\n}\n\n_run_integration() {\n    _podman_reset\n    make test-integration-local BUILDTAGS=\"$BUILDTAGS\"\n}\n\n_run_system() {\n    _podman_reset\n    ##### Note: Test MODIFIES THE HOST SETUP #####\n    make test-system-local BUILDTAGS=\"$BUILDTAGS\"\n}\n\nreq_env_vars SKOPEO_PATH\n\nhandler=\"_run_${1}\"\nif [ \"$(type -t $handler)\" != \"function\" ]; then\n    die \"Unknown/Unsupported command-line argument '$1'\"\nfi\n\nmsg \"************************************************************\"\nmsg \"Runner executing $1 on $OS_REL_VER\"\nmsg \"************************************************************\"\n\ncd \"$SKOPEO_PATH\"\n$handler\n"
  },
  {
    "path": "contrib/skopeoimage/README.md",
    "content": "The skopeo container image build context and automation have been\nmoved to [https://github.com/containers/image_build/tree/main/skopeo](https://github.com/containers/image_build/tree/main/skopeo)\n"
  },
  {
    "path": "default-policy.json",
    "content": "{\n    \"default\": [\n        {\n            \"type\": \"insecureAcceptAnything\"\n        }\n    ],\n    \"transports\":\n        {\n            \"docker-daemon\":\n                {\n                    \"\": [{\"type\":\"insecureAcceptAnything\"}]\n                }\n        }\n}\n"
  },
  {
    "path": "default.yaml",
    "content": "# This is a default registries.d configuration file.  You may\n# add to this file or create additional files in registries.d/.\n#\n# lookaside: for reading/writing simple signing signatures\n# lookaside-staging: for writing simple signing signatures, preferred over lookaside\n#\n# lookaside and lookaside-staging take a value of the following:\n#   lookaside:  {schema}://location\n#\n# For reading signatures, schema may be http, https, or file.\n# For writing signatures, schema may only be file.\n\n# The default locations are built-in, for both reading and writing:\n# /var/lib/containers/sigstore for root, or\n# ~/.local/share/containers/sigstore for non-root users.\ndefault-docker:\n#  lookaside: https://…\n#  lookaside-staging: file:///…\n\n# The 'docker' indicator here is the start of the configuration\n# for docker registries.\n#\n# docker:\n#\n#   privateregistry.com:\n#    lookaside: https://privateregistry.com/sigstore/\n#    lookaside-staging: /mnt/nfs/privateregistry/sigstore\n\n"
  },
  {
    "path": "docs/skopeo-copy.1.md",
    "content": "% skopeo-copy(1)\n\n## NAME\nskopeo\\-copy - Copy an image (manifest, filesystem layers, signatures) from one location to another.\n\n## SYNOPSIS\n**skopeo copy** [*options*] _source-image_ _destination-image_\n\n## DESCRIPTION\nCopy an image (manifest, filesystem layers, signatures) from one location to another.\n\nUses the system's trust policy to validate images, rejects images not trusted by the policy.\n\n  _source-image_ use the \"image name\" format described above\n\n  _destination-image_ use the \"image name\" format described above\n\n_source-image_ and _destination-image_ are interpreted completely independently; e.g. the destination name does not\nautomatically inherit any parts of the source name.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--additional-tag**=_strings_\n\nAdditional tags (supports docker-archive).\n\n**--all**, **-a**\n\nIf _source-image_ refers to a list of images, instead of copying just the image which matches the current OS and\narchitecture (subject to the use of the global --override-os, --override-arch and --override-variant options), attempt to copy all of\nthe images in the list, and the list itself.\n\n**--authfile** _path_\n\nPath of the primary registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--src-authfile** _path_\n\nPath of the primary registry credentials file for the source registry. Uses path given by `--authfile`, if not provided.\n\n**--dest-authfile** _path_\n\nPath of the primary registry credentials file for the destination registry. Uses path given by `--authfile`, if not provided.\n\n**--dest-shared-blob-dir** _directory_\n\nDirectory to use to share blobs across OCI repositories.\n\n**--digestfile** _path_\n\nAfter copying the image, write the digest of the resulting image to the file.\n\n**--preserve-digests**\n\nPreserve the digests during copying. Fail if the digest cannot be preserved.\n\nThis option does not change what will be copied; consider using `--all` at the same time.\n\n**--encrypt-layer** _ints_\n\n*Experimental* the 0-indexed layer indices, with support for negative indexing (e.g. 0 is the first layer, -1 is the last layer)\n\n**--format**, **-f** _manifest-type_\n\nMANIFEST TYPE (oci, v2s1, or v2s2) to use in the destination (default is manifest type of source, with fallbacks)\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--multi-arch** _option_\n\nControl what is copied if _source-image_ refers to a multi-architecture image. Default is system.\n\nOptions:\n- system: Copy only the image that matches the system architecture\n- all: Copy the full multi-architecture image\n- index-only: Copy only the index\n\nThe index-only option usually fails unless the referenced per-architecture images are already present in the destination, or the target registry supports sparse indexes.\n\n**--quiet**, **-q**\n\nSuppress output information when copying images.\n\n**--remove-signatures**\n\nDo not copy signatures, if any, from _source-image_. Necessary when copying a signed image to a destination which does not support signatures.\n\n**--sign-by** _key-id_\n\nAdd a “simple signing” signature using that key ID for an image name corresponding to _destination-image_\n\n**--sign-by-sigstore** _param-file_\n\nAdd a sigstore signature based on the options in the specified containers sigstore signing parameter file, _param-file_.\nSee containers-sigstore-signing-params.yaml(5) for details about the file format.\n\n**--sign-by-sigstore-private-key** _path_\n\nAdd a sigstore signature using a private key at _path_ for an image name corresponding to _destination-image_\n\n**--sign-by-sq-fingerprint** _fingerprint_\n\nAdd a “simple signing” signature using a Sequoia-PGP key with the specified _fingerprint_.\n\n**--sign-passphrase-file** _path_\n\nThe passphrase to use when signing with `--sign-by`, `--sign-by-sigstore-private-key` or `--sign-by-sq-fingerprint`.\nOnly the first line will be read. A passphrase stored in a file is of questionable security if other users can read this file. Do not use this option if at all avoidable.\n\n**--sign-identity** _reference_\n\nThe identity to use when signing the image. The identity must be a fully specified docker reference. If the identity is not specified, the target docker reference will be used.\n\n**--src-shared-blob-dir** _directory_\n\nDirectory to use to share blobs across OCI repositories.\n\n**--encryption-key** _protocol:keyfile_\n\nSpecifies the encryption protocol, which can be JWE (RFC7516), PGP (RFC4880), and PKCS7 (RFC2315) and the key material required for image encryption. For instance, jwe:/path/to/key.pem or pgp:admin@example.com or pkcs7:/path/to/x509-file.\n\n**--decryption-key** _key[:passphrase]_\n\nKey to be used for decryption of images. Key can point to keys and/or certificates. Decryption will be tried with all keys. If the key is protected by a passphrase, it is required to be passed in the argument and omitted otherwise.\n\n**--src-creds** _username[:password]_\n\nCredentials for accessing the source registry.\n\n**--dest-compress**\n\nCompress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source).\n\n**--dest-decompress**\n\nDecompress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source).\n\n**--dest-oci-accept-uncompressed-layers**\n\nAllow uncompressed image layers when saving to an OCI image using the 'oci' transport. (default is to compress things that aren't compressed).\n\n**--dest-creds** _username[:password]_\n\nCredentials for accessing the destination registry.\n\n**--src-cert-dir** _path_\n\nUse certificates at _path_ (*.crt, *.cert, *.key) to connect to the source registry or daemon.\n\n**--src-no-creds**\n\nAccess the registry anonymously.\n\n**--src-tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to container source registry or daemon. Default to source registry setting.\n\n**--dest-cert-dir** _path_\n\nUse certificates at _path_ (*.crt, *.cert, *.key) to connect to the destination registry or daemon.\n\n**--dest-no-creds**\n\nAccess the registry anonymously.\n\n**--dest-tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to container destination registry or daemon. Default to destination registry setting.\n\n**--src-daemon-host** _host_\n\nCopy from docker daemon at _host_. If _host_ starts with `tcp://`, HTTPS is enabled by default. To use plain HTTP, use the form `http://` (default is `unix:///var/run/docker.sock`).\n\n**--dest-daemon-host** _host_\n\nCopy to docker daemon at _host_. If _host_ starts with `tcp://`, HTTPS is enabled by default. To use plain HTTP, use the form `http://` (default is `unix:///var/run/docker.sock`).\n\nExisting signatures, if any, are preserved as well.\n\n**--dest-compress-format** _format_\n\nSpecifies the compression format to use.  Supported values are: `gzip`, `zstd` and `zstd:chunked`.\n`zstd:chunked` is incompatible with encrypting images,\nand will be treated as `zstd` with a warning in that case.\n\n**--dest-compress-level** _format_\n\nSpecifies the compression level to use.  The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive).\n\n**--dest-force-compress-format**\n\nEnsures that the compression algorithm set in --dest-compress-format is used exclusively.\n\n**--src-registry-token** _token_\n\nBearer token for accessing the source registry.\n\n**--dest-registry-token** _token_\n\nBearer token for accessing the destination registry.\n\n**--dest-precompute-digests**\n\nPrecompute digests to ensure layers are not uploaded that already exist on the destination registry. Layers with initially unknown digests (ex. compressing \"on the fly\") will be temporarily streamed to disk.\n\n**--retry-times**\n\nThe number of times to retry. By default, no retries are attempted.\n\n**--retry-delay**\n\nFixed delay between retries. If not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts.\n\n**--src-username**\n\nThe username to access the source registry.\n\n**--src-password**\n\nThe password to access the source registry.\n\n**--dest-username**\n\nThe username to access the destination registry.\n\n**--dest-password**\n\nThe password to access the destination registry.\n\n**--image-parallel-copies** _n_\n\nMaximum number of image layers to be copied (pulled/pushed) simultaneously. Not setting this field will fall back to containers/image defaults.\n\n## EXAMPLES\n\nTo just copy an image from one registry to another:\n```console\n$ skopeo copy docker://quay.io/skopeo/stable:latest docker://registry.example.com/skopeo:latest\n```\n\nTo copy the layers of the docker.io busybox image to a local directory:\n```console\n$ mkdir -p /var/lib/images/busybox\n$ skopeo copy docker://busybox:latest dir:/var/lib/images/busybox\n$ ls /var/lib/images/busybox/*\n  /tmp/busybox/2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749.tar\n  /tmp/busybox/manifest.json\n  /tmp/busybox/8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f.tar\n```\n\nTo create an archive consumable by `docker load` (but note that using a registry is almost always more efficient):\n```console\n$ skopeo copy docker://busybox:latest docker-archive:archive-file.tar:busybox:latest\n```\n\nTo copy and sign an image:\n```console\n$ skopeo copy --sign-by dev@example.com containers-storage:example/busybox:streaming docker://example/busybox:gold\n```\n\nTo encrypt an image:\n```console\n$ skopeo copy docker://docker.io/library/nginx:1.17.8 oci:local_nginx:1.17.8\n\n$ openssl genrsa -out private.key 1024\n$ openssl rsa -in private.key -pubout > public.key\n\n$ skopeo copy --encryption-key jwe:./public.key oci:local_nginx:1.17.8 oci:try-encrypt:encrypted\n```\n\nTo decrypt an image:\n```console\n$ skopeo copy --decryption-key ./private.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted\n```\n\nTo copy encrypted image without decryption:\n```console\n$ skopeo copy oci:try-encrypt:encrypted oci:try-encrypt-copy:encrypted\n```\n\nTo decrypt an image that requires more than one key:\n```console\n$ skopeo copy --decryption-key ./private1.key --decryption-key ./private2.key --decryption-key ./private3.key oci:try-encrypt:encrypted oci:try-decrypt:decrypted\n```\n\nContainer images can also be partially encrypted by specifying the index of the layer. Layers are 0-indexed indices, with support for negative indexing. i.e. 0 is the first layer, -1 is the last layer.\n\nLet's say out of 3 layers that the image `docker.io/library/nginx:1.17.8` is made up of, we only want to encrypt the 2nd layer,\n```console\n$ skopeo copy --encryption-key jwe:./public.key --encrypt-layer 1 oci:local_nginx:1.17.8 oci:try-encrypt:encrypted\n```\n\n## SEE ALSO\nskopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5), containers-policy.json(5), containers-transports(5), containers-signature(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-delete.1.md",
    "content": "% skopeo-delete(1)\n\n## NAME\nskopeo\\-delete - Mark the _image-name_ for later deletion by the registry's garbage collector.\n\n## SYNOPSIS\n**skopeo delete** [*options*] _image-name_\n\n## DESCRIPTION\n\nMark _image-name_ for deletion.\nThe effect of this is registry-specific; many registries don’t support this operation, or don’t allow it in some circumstances / configurations.\n\n**WARNING**: If _image-name_ contains a digest, this affects the referenced manifest, and may delete all tags (within the current repository?) pointing to that manifest.\n\n**WARNING**: If _image-name_ contains a tag (but not a digest), in the current version of Skopeo this resolves the tag into a digest, and then deletes the manifest by digest, as described above (possibly deleting all tags pointing to that manifest, not just the provided tag). This behavior may change in the future.\n\n\nWhen using the github.com/distribution/distribution registry server:\nTo release the allocated disk space, you must login to the container registry server and execute the container registry garbage collector. E.g.,\n\n```\n/usr/bin/registry garbage-collect /etc/docker-distribution/registry/config.yml\n```\nNote: sometimes the config.yml is stored in /etc/docker/registry/config.yml\n\nIf you are running the container registry inside of a container you would execute something like:\n```\n$ docker exec -it registry /usr/bin/registry garbage-collect /etc/docker-distribution/registry/config.yml\n```\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--authfile** _path_\n\nPath of the primary registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--creds** _username[:password]_\n\nCredentials for accessing the registry.\n\n**--cert-dir** _path_\n\nUse certificates at _path_ (*.crt, *.cert, *.key) to connect to the registry.\n\n**--daemon-host** _host_\n\nUse docker daemon host at _host_ (`docker-daemon:` transport only)\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--no-creds**\n\nAccess the registry anonymously.\n\nAdditionally, the registry must allow deletions by setting `REGISTRY_STORAGE_DELETE_ENABLED=true` for the registry daemon.\n\n**--registry-token** _token_\n\nBearer token for accessing the registry.\n\n**--retry-times**\n\nThe number of times to retry. By default, no retries are attempted.\n\n**--retry-delay**\n\nFixed delay between retries. If not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts.\n\n**--shared-blob-dir** _directory_\n\nDirectory to use to share blobs across OCI repositories.\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n**--username**\n\nThe username to access the registry.\n\n**--password**\n\nThe password to access the registry.\n\n## EXAMPLES\n\nMark image example/pause for deletion from the registry.example.com registry:\n```console\n$ skopeo delete docker://registry.example.com/example/pause:latest\n```\nSee above for additional details on using the command **delete**.\n\n\n## SEE ALSO\nskopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-generate-sigstore-key.1.md",
    "content": "% skopeo-generate-sigstore-key(1)\n\n## NAME\nskopeo\\-generate-sigstore-key - Generate a sigstore public/private key pair.\n\n## SYNOPSIS\n**skopeo generate-sigstore-key** [*options*] **--output-prefix** _prefix_\n\n## DESCRIPTION\n\nGenerates a public/private key pair suitable for creating sigstore image signatures.\nThe private key is encrypted with a passphrase;\nif one is not provided using an option, this command prompts for it interactively.\n\nThe private key is written to _prefix_**.private** .\nThe public key is written to _prefix_**.pub** .\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--output-prefix** _prefix_\n\nMandatory.\nPath prefix for the output keys (_prefix_**.private** and _prefix_**.pub**).\n\n**--passphrase-file** _path_\n\nThe passphare to use to encrypt the private key.\nOnly the first line will be read.\nA passphrase stored in a file is of questionable security if other users can read this file.\nDo not use this option if at all avoidable.\n\n## EXAMPLES\n\n```console\n$ skopeo generate-sigstore-key --output-prefix mykey\n```\n\n# SEE ALSO\nskopeo(1), skopeo-copy(1), containers-policy.json(5)\n\n## AUTHORS\n\nMiloslav Trmač <mitr@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-inspect.1.md",
    "content": "% skopeo-inspect(1)\n\n## NAME\nskopeo\\-inspect - Return low-level information about _image-name_ in a registry.\n\n## SYNOPSIS\n**skopeo inspect** [*options*] _image-name_\n\n## DESCRIPTION\n\nReturn low-level information about _image-name_ in a registry.\nSee [skopeo(1)](skopeo.1.md) for the format of _image-name_.\n\nThe default output includes data from various sources: user input (**Name**), the remote repository, if any (**RepoTags**), the top-level manifest (**Digest**),\nand a per-architecture/OS image matching the current run-time environment (most other values).\nTo see values for a different architecture/OS, use the **--override-os** / **--override-arch** options documented in [skopeo(1)](skopeo.1.md).\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--authfile** _path_\n\nPath of the primary registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--cert-dir** _path_\n\nUse certificates at _path_ (\\*.crt, \\*.cert, \\*.key) to connect to the registry.\n\n**--config**\n\nOutput configuration in OCI format, default is to format in JSON format.\n\n**--creds** _username[:password]_\n\nUsername and password for accessing the registry.\n\n**--daemon-host** _host_\n\nUse docker daemon host at _host_ (`docker-daemon:` transport only)\n\n**--format**, **-f**=*format*\n\nFormat the output using the given Go template.\nThe keys of the returned JSON can be used as the values for the --format flag (see examples below).\nSupports the Go templating functions available at https://pkg.go.dev/github.com/containers/common/pkg/report#hdr-Template_Functions\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--no-creds**\n\nAccess the registry anonymously.\n\n**--raw**\n\nOutput raw manifest or config data depending on --config option.\nThe --format option is not supported with --raw option.\n\n**--registry-token** _Bearer token_\n\nRegistry token for accessing the registry.\n\n**--retry-times**\n\nThe number of times to retry. By default, no retries are attempted.\n\n**--retry-delay**\n\nFixed delay between retries. If not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts.\n\n**--shared-blob-dir** _directory_\n\nDirectory to use to share blobs across OCI repositories.\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n**--username**\n\nThe username to access the registry.\n\n**--password**\n\nThe password to access the registry.\n\n**--no-tags**, **-n**\n\nDo not list the available tags from the repository in the output. When `true`, the `RepoTags` array will be empty.  Defaults to `false`, which includes all available tags.\n\n**--manifest-digest**=_algorithm_ **EXPERIMENTAL**\n\nAlgorithm to use for computing manifest digest (sha256, sha512); defaults to algorithm used in config digest.\n\n**Note:** This flag is experimental and its behavior may change in future releases.\n\n## EXAMPLES\n\nTo review information for the image fedora from the docker.io registry:\n```console\n$ skopeo inspect docker://docker.io/fedora\n\n{\n    \"Name\": \"docker.io/library/fedora\",\n    \"Digest\": \"sha256:f99efcddc4dd6736d8a88cc1ab6722098ec1d77dbf7aed9a7a514fc997ca08e0\",\n    \"RepoTags\": [\n        \"20\",\n        \"21\",\n        \"...\"\n    ],\n    \"Created\": \"2022-11-16T07:26:42.618327645Z\",\n    \"DockerVersion\": \"20.10.12\",\n    \"Labels\": {\n        \"maintainer\": \"Clement Verna \\u003ccverna@fedoraproject.org\\u003e\"\n    },\n    \"Architecture\": \"amd64\",\n    \"Os\": \"linux\",\n    \"Layers\": [\n        \"sha256:cb8b1ed77979b894115a983f391465651aa7eb3edd036be4b508eea47271eb93\"\n    ],\n    \"LayersData\": [\n        {\n            \"MIMEType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"Digest\": \"sha256:cb8b1ed77979b894115a983f391465651aa7eb3edd036be4b508eea47271eb93\",\n            \"Size\": 65990920,\n            \"Annotations\": null\n        }\n    ],\n    \"Env\": [\n        \"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\n        \"DISTTAG=f37container\",\n        \"FGC=f37\",\n        \"FBR=f37\"\n    ]\n}\n```\n\nTo inspect python from the docker.io registry and not show the available tags:\n```console\n$ skopeo inspect --no-tags docker://docker.io/library/python\n{\n    \"Name\": \"docker.io/library/python\",\n    \"Digest\": \"sha256:10fc14aa6ae69f69e4c953cffd9b0964843d8c163950491d2138af891377bc1d\",\n    \"RepoTags\": [],\n    \"Created\": \"2022-11-16T06:55:28.566254104Z\",\n    \"DockerVersion\": \"20.10.12\",\n    \"Labels\": null,\n    \"Architecture\": \"amd64\",\n    \"Os\": \"linux\",\n    \"Layers\": [\n        \"sha256:a8ca11554fce00d9177da2d76307bdc06df7faeb84529755c648ac4886192ed1\",\n        \"sha256:e4e46864aba2e62ba7c75965e4aa33ec856ee1b1074dda6b478101c577b63abd\",\n        \"...\"\n    ],\n    \"LayersData\": [\n        {\n            \"MIMEType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"Digest\": \"sha256:a8ca11554fce00d9177da2d76307bdc06df7faeb84529755c648ac4886192ed1\",\n            \"Size\": 55038615,\n            \"Annotations\": null\n        },\n        {\n            \"MIMEType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"Digest\": \"sha256:e4e46864aba2e62ba7c75965e4aa33ec856ee1b1074dda6b478101c577b63abd\",\n            \"Size\": 5164893,\n            \"Annotations\": null\n        },\n        \"...\"\n    ],\n    \"Env\": [\n        \"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\n        \"LANG=C.UTF-8\",\n        \"...\",\n    ]\n}\n```\n\n```console\n$ /bin/skopeo inspect --config docker://registry.fedoraproject.org/fedora --format \"{{ .Architecture }}\"\namd64\n```\n\n```console\n$ /bin/skopeo inspect --format '{{ .Env }}' docker://registry.access.redhat.com/ubi8\n[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci]\n```\n\nTo get the digest using a specific algorithm:\n```console\n$ skopeo inspect --manifest-digest=sha512 docker://docker.io/library/alpine:latest --format \"Digest: {{.Digest}}\"\nDigest: sha512:5acb33fb56a7791bf0c69d5b19a1c70272148e4107be5261d57305d14e9509792bbca53e5277c456181ecfa1c20ad8427f9b8ba46868020584a819de1128dbd2\n```\n\n# SEE ALSO\nskopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-list-tags.1.md",
    "content": "% skopeo-list-tags(1)\n\n## NAME\nskopeo\\-list\\-tags - List image names in a transport-specific collection of images.\n\n## SYNOPSIS\n**skopeo list-tags** [*options*] _source-image_\n\nReturn a list of tags from _source-image_ in a registry or a local docker-archive file.\n\n  _source-image_ name of the repository to retrieve a tag listing from or a local docker-archive file.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--authfile** _path_\n\nPath of the updated registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--creds** _username[:password]_ for accessing the registry.\n\n**--cert-dir** _path_\n\nUse certificates at _path_ (\\*.crt, \\*.cert, \\*.key) to connect to the registry.\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--no-creds**\n\nAccess the registry anonymously.\n\n**--registry-token** _Bearer token_\n\nBearer token for accessing the registry.\n\n**--retry-times**\n\nThe number of times to retry. By default, no retries are attempted.\n\n**--retry-delay**\n\nFixed delay between retries. If not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts.\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n**--username**\n\nThe username to access the registry.\n\n**--password**\n\nThe password to access the registry.\n\n## REPOSITORY NAMES\n\nRepository names are transport-specific references as each transport may have its own concept of a \"repository\" and \"tags\".\n\nThis commands refers to repositories using a _transport_`:`_details_ format. The following formats are supported:\n\n  **docker://**_docker-repository-reference_\n  A repository in a registry implementing the \"Docker Registry HTTP API V2\".\n  A _docker-repository-reference_ is of the form: **registryhost:port/repositoryname** which is similar to an _image-reference_ but with no tag or digest allowed as the last component (e.g no `:latest` or `@sha256:xyz`)\n\n      Examples of valid docker-repository-references:\n        \"docker.io/myuser/myrepo\"\n        \"docker.io/nginx\"\n        \"docker.io/library/fedora\"\n        \"localhost:5000/myrepository\"\n\n      Examples of invalid references:\n        \"docker.io/nginx:latest\"\n        \"docker.io/myuser/myimage:v1.0\"\n        \"docker.io/myuser/myimage@sha256:f48c4cc192f4c3c6a069cb5cca6d0a9e34d6076ba7c214fd0cc3ca60e0af76bb\"\n\n  **docker-archive:path[:docker-reference]\n  more than one images were stored in a docker save-formatted file. \n\n## EXAMPLES\n\n### Docker Transport\nTo get the list of tags in the \"fedora\" repository from the docker.io registry (the repository name expands to \"library/fedora\" per docker transport canonical form):\n```console\n$ skopeo list-tags docker://docker.io/fedora\n{\n    \"Repository\": \"docker.io/library/fedora\",\n    \"Tags\": [\n        \"20\",\n        \"21\",\n        \"22\",\n        \"23\",\n        \"24\",\n        \"25\",\n        \"26-modular\",\n        \"26\",\n        \"27\",\n        \"28\",\n        \"29\",\n        \"30\",\n        \"31\",\n        \"32\",\n        \"branched\",\n        \"heisenbug\",\n        \"latest\",\n        \"modular\",\n        \"rawhide\"\n    ]\n}\n\n```\n\nTo list the tags in a local host docker/distribution registry on port 5000, in this case for the \"fedora\" repository:\n\n```console\n$ skopeo list-tags docker://localhost:5000/fedora\n{\n    \"Repository\": \"localhost:5000/fedora\",\n    \"Tags\": [\n        \"latest\",\n        \"30\",\n        \"31\"\n    ]\n}\n\n```\n\n### Docker-archive Transport\n\nTo list the tags in a local docker-archive file:\n\n```console\n$ skopeo list-tags docker-archive:/tmp/busybox.tar.gz\n{\n    \"Tags\": [\n        \"busybox:1.28.3\"\n    ]\n}\n```\n\nAlso supports more than one tags in an archive:\n\n```console\n$ skopeo list-tags docker-archive:/tmp/docker-two-images.tar.gz\n{\n    \"Tags\": [\n        \"example.com/empty:latest\",\n        \"example.com/empty/but:different\"\n    ]\n}\n```\n\nWill include a source-index entry for each untagged image:\n\n```console\n$ skopeo list-tags docker-archive:/tmp/four-tags-with-an-untag.tar\n{\n    \"Tags\": [\n        \"image1:tag1\",\n        \"image2:tag2\",\n        \"@2\",\n        \"image4:tag4\"\n    ]\n}\n```\n\n\n# SEE ALSO\nskopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5), containers-transports(1)\n\n## AUTHORS\n\nZach Hill <zach@anchore.com>\n"
  },
  {
    "path": "docs/skopeo-login.1.md",
    "content": "% skopeo-login(1)\n\n## NAME\nskopeo\\-login - Login to a container registry.\n\n## SYNOPSIS\n**skopeo login** [*options*] _registry_\n\n## DESCRIPTION\n**skopeo login** logs into a specified registry server with the correct username\nand password. **skopeo login** reads in the username and password from STDIN.\nThe username and password can also be set using the **username** and **password** flags.\nThe path of the credentials file can be specified by the user by setting the **authfile**\nflag.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--password**, **-p**=*password*\n\nPassword for registry\n\n**--password-stdin**\n\nTake the password from stdin\n\n**--username**, **-u**=*username*\n\nUsername for registry\n\n**--authfile**=*path*\n\nPath of the managed registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the default on other platforms.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--compat-auth-file**=*path*\n\nInstead of updating the default credentials file, update the one at *path*, and use a Docker-compatible format.\n\n**--get-login**\n\nReturn the logged-in user for the registry. Return error if no login is found.\n\n**--cert-dir**=*path*\n\nUse certificates at *path* (\\*.crt, \\*.cert, \\*.key) to connect to the registry.\nDefault certificates directory is _/etc/containers/certs.d_.\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n**--verbose**, **-v**\n\nWrite more detailed information to stdout\n\n## EXAMPLES\n\n```console\n$ skopeo login docker.io\nUsername: testuser\nPassword:\nLogin Succeeded!\n```\n\n```console\n$ skopeo login -u testuser -p testpassword localhost:5000\nLogin Succeeded!\n```\n\n```console\n$ skopeo login --authfile authdir/myauths.json docker.io\nUsername: testuser\nPassword:\nLogin Succeeded!\n```\n\n```console\n$ skopeo login --tls-verify=false -u test -p test localhost:5000\nLogin Succeeded!\n```\n\n```console\n$ skopeo login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000\nLogin Succeeded!\n```\n\n```console\n$ skopeo login -u testuser  --password-stdin < testpassword.txt docker.io\nLogin Succeeded!\n```\n\n```console\n$ echo $testpassword | skopeo login -u testuser --password-stdin docker.io\nLogin Succeeded!\n```\n\n## SEE ALSO\nskopeo(1), skopeo-logout(1), containers-auth.json(5), containers-registries.conf(5), containers-certs.d.5.md\n\n## HISTORY\nMay 2020, Originally compiled by Qi Wang <qiwan@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-logout.1.md",
    "content": "% skopeo-logout(1)\n\n## NAME\nskopeo\\-logout - Logout of a container registry.\n\n## SYNOPSIS\n**skopeo logout** [*options*] _registry_\n\n## DESCRIPTION\n**skopeo logout** logs out of a specified registry server by deleting the cached credentials\nstored in the **auth.json** file. The path of the credentials file can be overridden by the user by setting the **authfile** flag.\nAll the cached credentials can be removed by setting the **all** flag.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--authfile**=*path*\n\nPath of the managed registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the default on other platforms.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--compat-auth-file**=*path*\n\nInstead of updating the default credentials file, update the one at *path*, and use a Docker-compatible format.\n\n**--all**, **-a**\n\nRemove the cached credentials for all registries in the auth file\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n## EXAMPLES\n\n```console\n$ skopeo logout docker.io\nRemove login credentials for docker.io\n```\n\n```console\n$ skopeo logout --authfile authdir/myauths.json docker.io\nRemove login credentials for docker.io\n```\n\n```console\n$ skopeo logout --all\nRemove login credentials for all registries\n```\n\n## SEE ALSO\nskopeo(1), skopeo-login(1), containers-auth.json(5)\n\n## HISTORY\nMay 2020, Originally compiled by Qi Wang <qiwan@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-manifest-digest.1.md",
    "content": "% skopeo-manifest-digest(1)\n\n## NAME\nskopeo\\-manifest\\-digest - Compute a manifest digest for a manifest-file and write it to standard output.\n\n## SYNOPSIS\n**skopeo manifest-digest** _manifest-file_\n\n## DESCRIPTION\n\nCompute a manifest digest of _manifest-file_ and write it to standard output.\n\n## OPTIONS\n\n**--help**, **-h**\n\nPrint usage statement\n\n## EXAMPLES\n\n```console\n$ skopeo manifest-digest manifest.json\nsha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6\n```\n\n## SEE ALSO\nskopeo(1)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-standalone-sign.1.md",
    "content": "% skopeo-standalone-sign(1)\n\n## NAME\nskopeo\\-standalone-sign - Debugging tool - Sign an image locally without uploading.\n\n## SYNOPSIS\n**skopeo standalone-sign** [*options*] _manifest_ _docker-reference_ _key-fingerprint_ **--output**|**-o** _signature_\n\n## DESCRIPTION\nThis is primarily a debugging tool, useful for special cases, and usually should not be a part of your normal operational workflow; use `skopeo copy --sign-by` instead to publish and sign an image in one step.\n\n  _manifest_ Path to a file containing the image manifest\n\n  _docker-reference_ A docker reference to identify the image with\n\n  _key-fingerprint_ Key identity to use for signing\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--output**, **-o** _output file_\n\nWrite signature to _output file_.\n\n**--passphrase-file**=_path_\n\nThe passphare to use when signing with the key ID from `--sign-by`. Only the first line will be read. A passphrase stored in a file is of questionable security if other users can read this file. Do not use this option if at all avoidable.\n\n## EXAMPLES\n\n```console\n$ skopeo standalone-sign busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8 --output busybox.signature\n$\n```\n\n## NOTES\n\nThis command is intended for use with local signatures e.g. OpenPGP ( other signature formats may be added in the future ), as per containers-signature(5). Furthermore, this command does **not** interact with the artifacts generated by Docker Content Trust (DCT). For more information, please see [containers-signature(5)](https://github.com/containers/image/blob/main/docs/containers-signature.5.md).\n\n## SEE ALSO\nskopeo(1), skopeo-copy(1), containers-signature(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-standalone-verify.1.md",
    "content": "% skopeo-standalone-verify(1)\n\n## NAME\nskopeo\\-standalone\\-verify - Debugging tool - Verify an image signature from local files.\n\n## SYNOPSIS\n**skopeo standalone-verify** _manifest_ _docker-reference_ _key-fingerprints_ _signature_\n\n## DESCRIPTION\n\nVerify a signature using local files; the digest will be printed on success. This is primarily a debugging tool, useful for special cases,\nand usually should not be a part of your normal operational workflow. Additionally, consider configuring a signature verification policy file,\nas per containers-policy.json(5).\n\n  _manifest_ Path to a file containing the image manifest\n\n  _docker-reference_ A docker reference expected to identify the image in the signature\n\n  _key-fingerprints_ Identities of trusted signing keys (comma separated), or \"any\" to trust any known key when using a public key file\n\n  _signature_ Path to signature file\n\n**Note:** If you do use this, make sure that the image can not be changed at the source location between the times of its verification and use.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--help**, **-h**\n\nPrint usage statement\n\n**--public-key-file** _public key file_\n\nFile containing the public keys to use when verifying signatures. If this is not specified, keys from the GPG homedir are used.\n\n## EXAMPLES\n\n```console\n$ skopeo standalone-verify busybox-manifest.json registry.example.com/example/busybox 1D8230F6CDB6A06716E414C1DB72F2188BB46CC8  busybox.signature\nSignature verified, digest sha256:20bf21ed457b390829cdbeec8795a7bea1626991fda603e0d01b4e7f60427e55\n```\n\n## NOTES\n\nThis command is intended for use with local signatures e.g. OpenPGP ( other signature formats may be added in the future ), as per containers-signature(5). Furthermore, this command does **not** interact with the artifacts generated by Docker Content Trust (DCT). For more information, please see [containers-signature(5)](https://github.com/containers/image/blob/main/docs/containers-signature.5.md).\n\n## SEE ALSO\nskopeo(1), containers-signature(5), containers-policy.json(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs/skopeo-sync.1.md",
    "content": "% skopeo-sync(1)\n\n## NAME\nskopeo\\-sync - Synchronize images between registry repositories and local directories.\n\n\n## SYNOPSIS\n**skopeo sync** [*options*] --src _transport_ --dest _transport_ _source_ _destination_\n\n## DESCRIPTION\nSynchronize images between registry repositories and local directories. Synchronization is achieved by copying all the images found at _source_ to _destination_ - useful when synchronizing a local container registry mirror or for populating registries running inside of air-gapped environments.\n\nDifferently from other skopeo commands, skopeo sync requires both source and destination transports to be specified separately from _source_ and _destination_.\nOne of the problems of prefixing a destination with its transport is that, the registry `docker://hostname:port` would be wrongly interpreted as an image reference at a non-fully qualified registry, with `hostname` and `port` the image name and tag.\n\nAvailable _source_ transports:\n - _docker_ (i.e. `--src docker`): _source_ is a repository hosted on a container registry (e.g.: `registry.example.com/busybox`).\n If no image tag is specified, skopeo sync copies all the tags found in that repository.\n - _dir_ (i.e. `--src dir`): _source_ is a local directory path (e.g.: `/media/usb/`). Refer to skopeo(1) **dir:**_path_ for the local image format.\n - _yaml_ (i.e. `--src yaml`): _source_ is local YAML file path.\n The YAML file should specify the list of images copied from different container registries (local directories are not supported). Refer to EXAMPLES for the file format.\n\nAvailable _destination_ transports:\n - _docker_ (i.e. `--dest docker`): _destination_ is a container registry (e.g.: `my-registry.local.lan`).\n - _dir_ (i.e. `--dest dir`): _destination_ is a local directory path (e.g.: `/media/usb/`).\n One directory per source 'image:tag' is created for each copied image.\n\nWhen the `--scoped` option is specified, images are prefixed with the source image path so that multiple images with the same\nname can be stored at _destination_.\n\n## OPTIONS\n\nSee also [skopeo(1)](skopeo.1.md) for options placed before the subcommand name.\n\n**--all**, **-a**\nIf one of the images in __src__ refers to a list of images, instead of copying just the image which matches the current OS and\narchitecture (subject to the use of the global --override-os, --override-arch and --override-variant options), attempt to copy all of\nthe images in the list, and the list itself.\n\n**--authfile** _path_\n\nPath of the primary registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--src-authfile** _path_\n\nPath of the primary registry credentials file for the source registry. Uses path given by `--authfile`, if not provided.\n\n**--dest-authfile** _path_\n\nPath of the primary registry credentials file for the destination registry. Uses path given by `--authfile`, if not provided.\n\n**--dry-run**\n\nRun the sync without actually copying data to the destination.\n\n**--src**, **-s** _transport_ Transport for the source repository.\n\n**--dest**, **-d** _transport_ Destination transport.\n\n**--format**, **-f** _manifest-type_ Manifest Type (oci, v2s1, or v2s2) to use when syncing image(s) to a destination (default is manifest type of source, with fallbacks).\n\n**--help**, **-h**\n\nPrint usage statement.\n\n**--scoped** Prefix images with the source image path, so that multiple images with the same name can be stored at _destination_.\n\n**--append-suffix** _tag-suffix_ String to append to destination tags.\n\n**--digestfile** _path_\n\nAfter copying the images from source, write the digest of the resulting images along with Image Reference.\n\n```\nsha256:bf91f90823248017a4f920fb541727fa8368dc6cf377a7debbd271cf6a31c8a7 docker://myhost.com/alpine:edge\nsha256:31603596830fc7e56753139f9c2c6bd3759e48a850659506ebfb885d1cf3aef5 docker://myhost.com/postgres:14.3\n\n```\n\n**--preserve-digests**\n\nPreserve the digests during copying. Fail if the digest cannot be preserved.\n\nThis option does not change what will be copied; consider using `--all` at the same time.\n\n**--remove-signatures** Do not copy signatures, if any, from _source-image_. This is necessary when copying a signed image to a destination which does not support signatures.\n\n**--sign-by** _key-id_\n\nAdd a “simple signing” signature using that key ID for an image name corresponding to _destination-image_\n\n**--sign-by-sigstore** _param-file_\n\nAdd a sigstore signature based on the options in the specified containers sigstore signing parameter file, _param-file_.\nSee containers-sigstore-signing-params.yaml(5) for details about the file format.\n\n**--sign-by-sigstore-private-key** _path_\n\nAdd a sigstore signature using a private key at _path_ for an image name corresponding to _destination-image_\n\n**--sign-by-sq-fingerprint** _fingerprint_\n\nAdd a “simple signing” signature using a Sequoia-PGP key with the specified _fingerprint_.\n\n**--sign-passphrase-file** _path_\n\nThe passphrase to use when signing with `--sign-by`, `--sign-by-sigstore-private-key` or `--sign-by-sq-fingerprint`.\nOnly the first line will be read. A passphrase stored in a file is of questionable security if other users can read this file. Do not use this option if at all avoidable.\n\n**--src-creds** _username[:password]_ for accessing the source registry.\n\n**--dest-creds** _username[:password]_ for accessing the destination registry.\n\n**--src-cert-dir** _path_ Use certificates (*.crt, *.cert, *.key) at _path_ to connect to the source registry or daemon.\n\n**--src-no-creds** Access the registry anonymously.\n\n**--src-tls-verify**=_bool_ Require HTTPS and verify certificates when talking to a container source registry or daemon. Default to source registry entry in registry.conf setting.\n\n**--dest-cert-dir** _path_ Use certificates (*.crt, *.cert, *.key) at _path_ to connect to the destination registry or daemon.\n\n**--dest-no-creds** Access the registry anonymously.\n\n**--dest-tls-verify**=_bool_ Require HTTPS and verify certificates when talking to a container destination registry or daemon. Default to destination registry entry in registry.conf setting.\n\n**--src-registry-token** _Bearer token_ for accessing the source registry.\n\n**--dest-registry-token** _Bearer token_ for accessing the destination registry.\n\n**--retry-times**\n\nThe number of times to retry. By default, no retries are attempted.\n\n**--retry-delay**\n\nFixed delay between retries. If not set (or set to 0s), retry wait time will be exponentially increased based on the number of failed attempts.\n\n**--keep-going**\nIf any errors occur during copying of images, those errors are logged and the process continues syncing rest of the images and finally fails at the end.\n\n**--src-username**\n\nThe username to access the source registry.\n\n**--src-password**\n\nThe password to access the source registry.\n\n**--dest-username**\n\nThe username to access the destination registry.\n\n**--dest-password**\n\nThe password to access the destination registry.\n\n## EXAMPLES\n\n### Synchronizing to a local directory\n```console\n$ skopeo sync --src docker --dest dir registry.example.com/busybox /media/usb\n```\nImages are located at:\n```\n/media/usb/busybox:1-glibc\n/media/usb/busybox:1-musl\n/media/usb/busybox:1-ubuntu\n...\n/media/usb/busybox:latest\n```\n\n### Synchronizing to a container registry from local\nImages are located at:\n```\n/media/usb/busybox:1-glibc\n```\nSync run\n```console\n$ skopeo sync --src dir --dest docker /media/usb/busybox:1-glibc my-registry.local.lan/test/\n```\nDestination registry content:\n```\nREPO                                 TAGS\nmy-registry.local.lan/test/busybox   1-glibc\n```\n\n### Synchronizing to a local directory, scoped\n```console\n$ skopeo sync --src docker --dest dir --scoped registry.example.com/busybox /media/usb\n```\nImages are located at:\n```\n/media/usb/registry.example.com/busybox:1-glibc\n/media/usb/registry.example.com/busybox:1-musl\n/media/usb/registry.example.com/busybox:1-ubuntu\n...\n/media/usb/registry.example.com/busybox:latest\n```\n\n### Synchronizing to a container registry\n```console\n$ skopeo sync --src docker --dest docker registry.example.com/busybox my-registry.local.lan\n```\nDestination registry content:\n```\nREPO                         TAGS\nregistry.local.lan/busybox   1-glibc, 1-musl, 1-ubuntu, ..., latest\n```\n\n### Synchronizing to a container registry keeping the repository\n```console\n$ skopeo sync --src docker --dest docker registry.example.com/repo/busybox my-registry.local.lan/repo\n```\nDestination registry content:\n```\nREPO                              TAGS\nregistry.local.lan/repo/busybox   1-glibc, 1-musl, 1-ubuntu, ..., latest\n```\n\n### Synchronizing to a container registry with tag suffix\n```console\n$ skopeo sync --src docker --dest docker --append-suffix '-mirror' registry.example.com/busybox my-registry.local.lan\n```\nDestination registry content:\n```\nREPO                         TAGS\nregistry.local.lan/busybox   1-glibc-mirror, 1-musl-mirror, 1-ubuntu-mirror, ..., latest-mirror\n```\n\n### YAML file content (used _source_ for `**--src yaml**`)\n\n```yaml\nregistry.example.com:\n    images:\n        busybox: []\n        redis:\n            - \"1.0\"\n            - \"2.0\"\n            - \"sha256:0000000000000000000000000000000011111111111111111111111111111111\"\n    images-by-tag-regex:\n        nginx: ^1\\.13\\.[12]-alpine-perl$\n    images-by-semver:\n        alpine: \">= 3.12.0\"\n    credentials:\n        username: john\n        password: this is a secret\n    tls-verify: true\n    cert-dir: /home/john/certs\nquay.io:\n    tls-verify: false\n    images:\n        coreos/etcd:\n            - latest\n```\nIf the yaml filename is `sync.yml`, sync run:\n```console\n$ skopeo sync --src yaml --dest docker sync.yml my-registry.local.lan/repo/\n```\nThis will copy the following images:\n- Repository `registry.example.com/busybox`: all images, as no tags are specified.\n- Repository `registry.example.com/redis`: images tagged \"1.0\" and \"2.0\" along with image with digest \"sha256:0000000000000000000000000000000011111111111111111111111111111111\".\n- Repository `registry.example.com/nginx`: images tagged \"1.13.1-alpine-perl\" and \"1.13.2-alpine-perl\".\n- Repository `quay.io/coreos/etcd`: images tagged \"latest\".\n- Repository `registry.example.com/alpine`: all images with tags match the semantic version constraint \">= 3.12.0\" (\"3.12.0, \"3.12.1\", ... ,\"4.0.0\", ...)\n\nThe full list of possible semantic version comparisons can be found in the\nupstream library's documentation:\nhttps://github.com/Masterminds/semver/tree/v3.2.0#basic-comparisons.\n\nVersion ordering and precedence is understood as defined here:\nhttps://semver.org/#spec-item-11.\n\nFor the registry `registry.example.com`, the \"john\"/\"this is a secret\" credentials are used, with server TLS certificates located at `/home/john/certs`.\n\nTLS verification is normally enabled, and it can be disabled setting `tls-verify` to `false`.\nIn the above example, TLS verification is enabled for `registry.example.com`, while is\ndisabled for `quay.io`.\n\n## SEE ALSO\nskopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5), containers-policy.json(5), containers-transports(5)\n\n## AUTHORS\n\nFlavio Castelli <fcastelli@suse.com>, Marco Vedovati <mvedovati@suse.com>\n"
  },
  {
    "path": "docs/skopeo.1.md",
    "content": "% SKOPEO(1) Skopeo Man Pages\n% Jhon Honce\n% August 2016\n## NAME\nskopeo -- Command line utility used to interact with local and remote container images and container image registries\n\n## SYNOPSIS\n**skopeo** [_global options_] _command_ [_command options_]\n\n## DESCRIPTION\n`skopeo` is a command line utility providing various operations with container images and container image registries.\n\n`skopeo` can copy container images between various containers image stores, converting them as necessary.  For example you can use `skopeo` to copy container images from one container registry to another.\n\n`skopeo` can convert a Docker schema 2 or schema 1 container image to an OCI image.\n\n`skopeo` can inspect a repository on a container registry without needlessly pulling the image. Pulling an image from a repository, especially a remote repository, is an expensive network and storage operation. Skopeo fetches the repository's manifest and displays a `docker inspect`-like json output about the repository or a tag. `skopeo`, in contrast to `docker inspect`, helps you gather useful information about a repository or a tag without requiring you to run `docker pull` - e.g. - Which tags are available for the given repository? Which labels does the image have?\n\n`skopeo` can sign and verify container images.\n\n`skopeo` can delete container images from a remote container registry.\n\nNote: `skopeo` does not require any container runtimes to be running, to do most of\nits functionality.  It also does not require root, unless you are copying images into a container runtime storage backend, like the docker daemon or github.com/containers/storage.\n\n## IMAGE NAMES\nMost commands refer to container images, using a _transport_`:`_details_ format. The following formats are supported:\n\n  **containers-storage:**_docker-reference_\n  An image located in a local containers/storage image store.  Both the location and image store are specified in /etc/containers/storage.conf. (Backend for Podman, CRI-O, Buildah and friends)\n\n  **dir:**_path_\n  An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.\n\n  **docker://**_docker-reference_\n  An image in a registry implementing the \"Docker Registry HTTP API V2\".\n  Credentials are typically managed using `(skopeo login)`;\n  see **containers-auth.json**(5) for more details about the credential search mechanism.\n\n  **docker-archive:**_path_[**:**_docker-reference_]\n  An image is stored in the `docker save` formatted file.  _docker-reference_ is only used when creating such a file, and it must not contain a digest.\n\n  **docker-daemon:**_docker-reference_\n  An image _docker-reference_ stored in the docker daemon internal storage.  _docker-reference_ must contain either a tag or a digest.  Alternatively, when reading images, the format can be docker-daemon:algo:digest (an image ID).\n\n  **oci:**_path_**:**_tag_\n  An image _tag_ in a directory compliant with \"Open Container Image Layout Specification\" at _path_.\n\n  **oci-archive:**_path_**:**_tag_\n  An image _tag_ in a tar archive compliant with \"Open Container Image Layout Specification\" at _path_.\n\nSee [containers-transports(5)](https://github.com/containers/image/blob/main/docs/containers-transports.5.md) for details.\n\n## OPTIONS\n\nThese options should be placed before the subcommand name.\nIndividual subcommands have their own options.\n\n**--command-timeout** _duration_\n\nTimeout for the command execution.\n\n**--debug**\n\nenable debug output\n\n**--help**, **-h**\n\nShow help\n\n**--insecure-policy**\n\nAdopt an insecure, permissive policy that allows anything. This obviates the need for a policy file.\n\n**--override-arch** _arch_\n\nUse _arch_ instead of the architecture of the machine for choosing images.\n\n**--override-os** _os_\n\nUse _OS_ instead of the running OS for choosing images.\n\n**--override-variant** _variant_\n\nUse _variant_ instead of the running architecture variant for choosing images.\n\n**--policy** _path-to-policy_\n\nPath to a policy.json file to use for verifying signatures and deciding whether an image is trusted, overriding the default trust policy file.\n\n**--registries.d** _dir_\n\nUse registry configuration files in _dir_ (e.g. for container signature storage), overriding the default path.\n\n**--require-signed**\n\nRequire that any pulled image must be signed regardless of what the default or provided trust policy file says.\n\n**--tls-details** _path_\n\nPath to a containers-tls-details(5) file, affecting TLS behavior throughout the program.\n\nIf not set, defaults to a reasonable default that may change over time (depending on system’s global policy,\nversion of the program, version of the Go language, and the like).\n\nUsers should generally not use this option unless they have a process to ensure that the configuration will be kept up to date.\n\n**--tmpdir** _dir_\n\nDirectory used to store temporary files. Defaults to /var/tmp.\n\n**--user-agent-prefix** _prefix_\n\nPrefix to add to the user agent string. The resulting user agent will be in the format \"_prefix_ skopeo/_version_\".\n\n**--version**, **-v**\n\nPrint the version number\n\n## COMMANDS\n\n| Command                                   | Description                                                                    |\n| ----------------------------------------- | ------------------------------------------------------------------------------ |\n| [skopeo-copy(1)](skopeo-copy.1.md)        | Copy an image (manifest, filesystem layers, signatures) from one location to another. |\n| [skopeo-delete(1)](skopeo-delete.1.md)    | Mark the _image-name_ for later deletion by the registry's garbage collector.  |\n| [skopeo-generate-sigstore-key(1)](skopeo-generate-sigstore-key.1.md)    | Generate a sigstore public/private key pair.  |\n| [skopeo-inspect(1)](skopeo-inspect.1.md)  | Return low-level information about _image-name_ in a registry.                 |\n| [skopeo-list-tags(1)](skopeo-list-tags.1.md)  | List image names in a transport-specific collection of images.|\n| [skopeo-login(1)](skopeo-login.1.md)  | Login to a container registry. |\n| [skopeo-logout(1)](skopeo-logout.1.md)  | Logout of a container registry. |\n| [skopeo-manifest-digest(1)](skopeo-manifest-digest.1.md)    | Compute a manifest digest for a manifest-file and write it to standard output. |\n| [skopeo-standalone-sign(1)](skopeo-standalone-sign.1.md)    | Debugging tool - Sign an image locally without uploading.    |\n| [skopeo-standalone-verify(1)](skopeo-standalone-verify.1.md)| Debugging tool - Verify an image signature from local files. |\n| [skopeo-sync(1)](skopeo-sync.1.md)| Synchronize images between registry repositories and local directories.                |\n\n## EXIT STATUS\n`skopeo` exits with status 0 on success, non-zero on error.\n\nDetails about the exit statuses:\n\n**1** Generic error, details can be found in the error message.\n\n**2** The input image cannot be found. Note that this is best effort and for remote registries the status often cannot be reliably reported.\n\n## FILES\n  **/etc/containers/policy.json**\n  Default trust policy file, if **--policy** is not specified.\n  The policy format is documented in [containers-policy.json(5)](https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md) .\n\n  **/etc/containers/registries.d**\n  Default directory containing registry configuration, if **--registries.d** is not specified.\n  The contents of this directory are documented in [containers-registries.d(5)](https://github.com/containers/image/blob/main/docs/containers-registries.d.5.md).\n\n## SEE ALSO\nskopeo-login(1), docker-login(1), containers-auth.json(5), containers-storage.conf(5), containers-policy.json(5), containers-transports(5)\n\n## AUTHORS\n\nAntonio Murdaca <runcom@redhat.com>, Miloslav Trmac <mitr@redhat.com>, Jhon Honce <jhonce@redhat.com>\n"
  },
  {
    "path": "docs-experimental/skopeo-experimental-image-proxy.1.md",
    "content": "% skopeo-experimental-image-proxy(1)\n\n# NAME\nskopeo-experimental-image-proxy - API server for fetching container images (EXPERIMENTAL)\n\n# SYNOPSIS\n**skopeo experimental-image-proxy** [*options*]\n\n# DESCRIPTION\n**EXPERIMENTAL COMMAND**: This command is experimental, and its API is subject to change. It is currently hidden from the main help output and not supported on Windows.\n\n`skopeo experimental-image-proxy` exposes core container image fetching APIs via custom JSON+fd-passing protocol. This provides a lightweight way to fetch container image content (manifests and blobs). This command is primarily intended for programs that want to operate on a storage type that skopeo doesn't natively handle. For example, the bootc project currently has a custom ostree-based container storage backend.\n\nThe client process that invokes `skopeo experimental-image-proxy` is responsible for creating a socket pair and passing one of the file descriptors to the proxy. By default, the proxy expects this file descriptor to be its standard input (fd 0), but a different fd can be specified using the **--sockfd** option.\n\n**Protocol Overview**\n\nThe protocol requires a `socketpair(2)` of type `SOCK_SEQPACKET`, over which a single JSON message is sent per packet. Large data payloads, such as image manifests and blobs, are transferred over separate pipes (`pipe(2)`), with the read-ends of these pipes passed to the client via file descriptor (FD) passing.\n\n*   **Request Format**: A JSON object: `{ \"method\": \"MethodName\", \"args\": [arguments] }`\n*   **Reply Format**: A JSON object: `{ \"success\": boolean, \"value\": JSONValue, \"pipeid\": number, \"error_code\": string, \"error\": string }`\n    *   `success`: `true` if the call succeeded, `false` otherwise.\n    *   `value`: The return value of the method, if any.\n    *   `pipeid`: An integer identifying a pipe for data transfer. This ID is used with the `FinishPipe` method.\n    *   `error_code`: A string indicating the type of error if `success` is `false` (e.g., \"EPIPE\", \"retryable\", \"other\"). (Introduced in protocol version 0.2.8)\n    *   `error`: A string describing the error if `success` is `false`.\n\nThe current protocol version is `0.2.8`.\n\n**Supported Protocol Methods**\n\nThe server supports the following methods:\n\n*   **Initialize**: Initializes the proxy. This method must be called before any other method.\n    *   Args: `[]` (empty array)\n    *   Returns: `string` (the protocol version, e.g., \"0.2.8\")\n*   **OpenImage**: Opens an image reference (e.g., `docker://quay.io/example/image:latest`).\n    *   Args: `[string imageName]`\n    *   Returns: `uint64` (an opaque image ID to be used in subsequent calls)\n*   **OpenImageOptional**: Similar to `OpenImage`, but if the image is not found, it returns `0` (a sentinel image ID) instead of an error.\n    *   Args: `[string imageName]`\n    *   Returns: `uint64` (opaque image ID, or `0` if the image is not found)\n*   **CloseImage**: Closes a previously opened image, releasing associated resources.\n    *   Args: `[uint64 imageID]`\n    *   Returns: `null`\n*   **GetManifest**: Retrieves the image manifest. If the image is a manifest list, it is resolved to an image matching the proxy's current OS and architecture. The manifest is converted to OCI format if it isn't already. The `value` field in the reply contains the original digest of the manifest (if the image is a manifest list, this is the digest of the list, not the per-platform instance). The manifest content is streamed over a pipe.\n    *   Args: `[uint64 imageID]`\n    *   Returns: `string` (manifest digest in `value`), manifest data via pipe.\n*   **GetFullConfig**: Retrieves the full image configuration, conforming to the OCI Image Format Specification. Configuration data is streamed over a pipe.\n    *   Args: `[uint64 imageID]`\n    *   Returns: `null`, configuration data via pipe.\n*   **GetBlob**: Fetches an image blob (e.g., a layer) by its digest and expected size. The proxy performs digest verification on the blob data. The `value` field in the reply contains the blob size. Blob data is streamed over a pipe.\n    *   Args: `[uint64 imageID, string digest, uint64 size]`\n    *   Returns: `int64` (blob size in `value`, `-1` if unknown), blob data via pipe.\n*   **GetRawBlob**: Fetches an image blob by its digest. Unlike `GetBlob`, this method does not perform server-side digest verification. It returns two file descriptors to the client: one for the blob data and another for reporting errors that occur during the streaming. This method does not use the `FinishPipe` mechanism. The `value` field in the reply contains the blob size. (Introduced in protocol version 0.2.8)\n    *   Args: `[uint64 imageID, string digest]`\n    *   Returns: `int64` (blob size in `value`, `-1` if unknown), and *two* file descriptors: one for the blob data, one for errors. The error is a `ProxyError` type, see below.\n*   **GetLayerInfoPiped**: Retrieves information about image layers. This replaces `GetLayerInfo`.  Layer information data is streamed over a pipe, which makes it more reliable for images with many layers that would exceed message size limits with `GetLayerInfo`. The returned data is a JSON array of `{digest: string, size: int64, media_type: string}`. (Introduced in protocol version 0.2.7)\n    *   Args: `[uint64 imageID]`\n    *   Returns: `null`, layer information data via pipe.\n*   **FinishPipe**: Signals that the client has finished reading all data from a pipe associated with a `pipeid` (obtained from methods like `GetManifest` or `GetBlob`). This allows the server to close its end of the pipe and report any pending errors (e.g., digest verification failure for `GetBlob`). This method **must** be called by the client after consuming data from a pipe, except for pipes from `GetRawBlob`.\n    *   Args: `[uint32 pipeID]`\n    *   Returns: `null`\n*   **Shutdown**: Instructs the proxy server to terminate gracefully.\n    *   Args: `[]` (empty array)\n    *   Returns: `null`\n\nThe following methods are deprecated:\n\n*   **GetConfig**: (deprecated) Retrieves the container runtime configuration part of the image (the OCI `config` field). **Note**: This method returns only a part of the full image configuration due to a historical oversight. Use `GetFullConfig` for the complete image configuration. Configuration data is streamed over a pipe.\n    *   Args: `[uint64 imageID]`\n    *   Returns: `null`, configuration data via pipe.\n*   **GetLayerInfo**: (deprecated) Retrieves an array of objects, each describing an image layer (digest, size, mediaType). **Note**: This method returns data inline and may fail for images with many layers due to message size limits. Use `GetLayerInfoPiped` for a more robust solution.\n    *   Args: `[uint64 imageID]`\n    *   Returns: `array` of `{digest: string, size: int64, media_type: string}`.\n\n**Data Transfer for Pipes**\n\nWhen a method returns a `pipeid`, the server also passes the read-end of a pipe via file descriptor (FD) passing. The client reads the data (e.g., manifest content, blob content) from this FD. After successfully reading all data, the client **must** call `FinishPipe` with the corresponding `pipeid`. This signals to the server that the transfer is complete, allows the server to clean up resources, and enables the client to check for any errors that might have occurred during the data streaming process (e.g., a digest mismatch during `GetBlob`). The `GetRawBlob` method is an exception; it uses a dedicated error pipe instead of the `FinishPipe` mechanism.\n\n**ProxyError**\n\n`GetBlobRaw` returns a JSON object of the following form in the error pipe where:\n```\n{\n    \"code\": \"EPIPE\" | \"retryable\" | \"other\",\n    \"message\": \"error message\"\n}\n```\n\n- EPIPE: The client closed the pipe before reading all data.\n- retryable: The operation failed but might succeed if retried.\n- other: A generic error occurred.\n\n# OPTIONS\n**--sockfd**=*fd*\nServe on the opened socket passed as file descriptor *fd*. Defaults to 0 (standard input).\n\nThe command also supports common skopeo options for interacting with image registries and local storage. These include:\n\n**--authfile**=*path*\n\nPath of the primary registry credentials file. On Linux, the default is ${XDG\\_RUNTIME\\_DIR}/containers/auth.json.\nSee **containers-auth.json**(5) for more details about the credential search mechanism and defaults on other platforms.\n\nUse `skopeo login` to manage the credentials.\n\nThe default value of this option is read from the `REGISTRY\\_AUTH\\_FILE` environment variable.\n\n**--cert-dir**=*path*\n\nUse certificates at *path* (\\*.crt, \\*.cert, \\*.key) to connect to the registry.\n\n**--creds** _username[:password]_\n\nUsername and password for accessing the registry.\n\n**--daemon-host** _host_\n\nUse docker daemon host at _host_ (`docker-daemon:` transport only)\n\n**--no-creds**\n\nAccess the registry anonymously.\n\n**--password**=*password*\n\nPassword for accessing the registry. Use with **--username**.\n\n**--registry-token**=*token*\n\nProvide a Bearer *token* for accessing the registry.\n\n**--shared-blob-dir** _directory_\n\nDirectory to use to share blobs across OCI repositories.\n\n**--tls-verify**=_bool_\n\nRequire HTTPS and verify certificates when talking to the container registry or daemon. Default to registry.conf setting.\n\n**--username**=*username*\nUsername for accessing the registry. Use with **--password**.\n\n# REFERENCE CLIENT LIBRARIES\n\n- Rust: The [containers-image-proxy-rs project](https://github.com/containers/containers-image-proxy-rs) serves\nas the reference Rust client.\n\n# PROTOCOL HISTORY\n\n- 0.2.1: Initial version\n- 0.2.2: Added support for fetching image configuration as OCI\n- 0.2.3: Added GetFullConfig\n- 0.2.4: Added OpenImageOptional\n- 0.2.5: Added LayerInfoJSON\n- 0.2.6: Policy Verification before pulling OCI\n- 0.2.7: Added GetLayerInfoPiped\n- 0.2.8: Added GetRawBlob and error_code to replies\n\n## SEE ALSO\nskopeo(1), containers-auth.json(5)\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/containers/skopeo\n\n// Minimum required golang version\ngo 1.25.0\n\n// Warning: Ensure the \"go\" and \"toolchain\" versions match exactly to prevent unwanted auto-updates\n\nrequire (\n\tgithub.com/Masterminds/semver/v3 v3.4.0\n\tgithub.com/containers/ocicrypt v1.2.1\n\tgithub.com/docker/distribution v2.8.3+incompatible\n\tgithub.com/moby/sys/capability v0.4.0\n\tgithub.com/opencontainers/go-digest v1.0.0\n\tgithub.com/opencontainers/image-spec v1.1.2-0.20260226102121-a4c6ade7bb82\n\tgithub.com/opencontainers/image-tools v1.0.0-rc3\n\tgithub.com/sirupsen/logrus v1.9.4\n\tgithub.com/spf13/cobra v1.10.2\n\tgithub.com/spf13/pflag v1.0.10\n\tgithub.com/stretchr/testify v1.11.1\n\tgo.podman.io/common v0.67.1-0.20260319154331-44a8de38c431\n\tgo.podman.io/image/v5 v5.39.2-0.20260313202710-ddaabae34a06\n\tgo.podman.io/storage v1.62.1-0.20260316152041-ebc34488c338\n\tgolang.org/x/term v0.41.0\n\tgopkg.in/yaml.v3 v3.0.1\n)\n\nrequire (\n\tcyphar.com/go-pathrs v0.2.4 // indirect\n\tdario.cat/mergo v1.0.2 // indirect\n\tgithub.com/BurntSushi/toml v1.6.0 // indirect\n\tgithub.com/Microsoft/go-winio v0.6.2 // indirect\n\tgithub.com/VividCortex/ewma v1.2.0 // indirect\n\tgithub.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/clipperhouse/uax29/v2 v2.7.0 // indirect\n\tgithub.com/containerd/errdefs v1.0.0 // indirect\n\tgithub.com/containerd/errdefs/pkg v0.3.0 // indirect\n\tgithub.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect\n\tgithub.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect\n\tgithub.com/coreos/go-oidc/v3 v3.17.0 // indirect\n\tgithub.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.6.1 // indirect\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/distribution/reference v0.6.0 // indirect\n\tgithub.com/docker/docker-credential-helpers v0.9.5 // indirect\n\tgithub.com/docker/go-connections v0.6.0 // indirect\n\tgithub.com/docker/go-units v0.5.0 // indirect\n\tgithub.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect\n\tgithub.com/felixge/httpsnoop v1.0.4 // indirect\n\tgithub.com/go-jose/go-jose/v4 v4.1.3 // indirect\n\tgithub.com/go-logr/logr v1.4.3 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/golang/protobuf v1.5.4 // indirect\n\tgithub.com/google/go-containerregistry v0.20.7 // indirect\n\tgithub.com/google/go-intervals v0.0.2 // indirect\n\tgithub.com/google/uuid v1.6.0 // indirect\n\tgithub.com/gorilla/mux v1.8.1 // indirect\n\tgithub.com/hashicorp/go-cleanhttp v0.5.2 // indirect\n\tgithub.com/hashicorp/go-multierror v1.1.2-0.20250313123807-1ee6e1a1957a // indirect\n\tgithub.com/hashicorp/go-retryablehttp v0.7.8 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.1.0 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/klauspost/compress v1.18.4 // indirect\n\tgithub.com/klauspost/pgzip v1.2.6 // indirect\n\tgithub.com/mattn/go-runewidth v0.0.20 // indirect\n\tgithub.com/mattn/go-sqlite3 v1.14.34 // indirect\n\tgithub.com/miekg/pkcs11 v1.1.1 // indirect\n\tgithub.com/mistifyio/go-zfs/v4 v4.0.0 // indirect\n\tgithub.com/moby/docker-image-spec v1.3.1 // indirect\n\tgithub.com/moby/moby/api v1.54.0 // indirect\n\tgithub.com/moby/moby/client v0.3.0 // indirect\n\tgithub.com/moby/sys/mountinfo v0.7.2 // indirect\n\tgithub.com/moby/sys/user v0.4.0 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect\n\tgithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect\n\tgithub.com/opencontainers/image-spec/schema v0.0.0-20250717171153-ab80ff15c2dd // indirect\n\tgithub.com/opencontainers/runtime-spec v1.3.0 // indirect\n\tgithub.com/opencontainers/selinux v1.13.1 // indirect\n\tgithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/proglottis/gpgme v0.1.6 // indirect\n\tgithub.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect\n\tgithub.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect\n\tgithub.com/sigstore/fulcio v1.8.5 // indirect\n\tgithub.com/sigstore/protobuf-specs v0.5.0 // indirect\n\tgithub.com/sigstore/sigstore v1.10.4 // indirect\n\tgithub.com/smallstep/pkcs7 v0.1.1 // indirect\n\tgithub.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect\n\tgithub.com/sylabs/sif/v2 v2.22.0 // indirect\n\tgithub.com/tchap/go-patricia/v2 v2.3.3 // indirect\n\tgithub.com/ulikunitz/xz v0.5.15 // indirect\n\tgithub.com/vbatts/tar-split v0.12.2 // indirect\n\tgithub.com/vbauerster/mpb/v8 v8.12.0 // indirect\n\tgo.opentelemetry.io/auto/sdk v1.2.1 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect\n\tgo.opentelemetry.io/otel v1.40.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.40.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.40.0 // indirect\n\tgolang.org/x/crypto v0.49.0 // indirect\n\tgolang.org/x/net v0.51.0 // indirect\n\tgolang.org/x/oauth2 v0.36.0 // indirect\n\tgolang.org/x/sync v0.20.0 // indirect\n\tgolang.org/x/sys v0.42.0 // indirect\n\tgolang.org/x/text v0.35.0 // indirect\n\tgoogle.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect\n\tgoogle.golang.org/grpc v1.78.0 // indirect\n\tgoogle.golang.org/protobuf v1.36.11 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "cyphar.com/go-pathrs v0.2.4 h1:iD/mge36swa1UFKdINkr1Frkpp6wZsy3YYEildj9cLY=\ncyphar.com/go-pathrs v0.2.4/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=\ndario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=\ndario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=\ngithub.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=\ngithub.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=\ngithub.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=\ngithub.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=\ngithub.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=\ngithub.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=\ngithub.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=\ngithub.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=\ngithub.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=\ngithub.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=\ngithub.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=\ngithub.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=\ngithub.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=\ngithub.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=\ngithub.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=\ngithub.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw=\ngithub.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY=\ngithub.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=\ngithub.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=\ngithub.com/containers/ocicrypt v1.2.1 h1:0qIOTT9DoYwcKmxSt8QJt+VzMY18onl9jUXsxpVhSmM=\ngithub.com/containers/ocicrypt v1.2.1/go.mod h1:aD0AAqfMp0MtwqWgHM1bUwe1anx0VazI108CRrSKINQ=\ngithub.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc=\ngithub.com/coreos/go-oidc/v3 v3.17.0/go.mod h1:wqPbKFrVnE90vty060SB40FCJ8fTHTxSwyXJqZH+sI8=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=\ngithub.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 h1:uX1JmpONuD549D73r6cgnxyUu18Zb7yHAy5AYU0Pm4Q=\ngithub.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467/go.mod h1:uzvlm1mxhHkdfqitSA92i7Se+S9ksOn3a3qmv/kyOCw=\ngithub.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE=\ngithub.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=\ngithub.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=\ngithub.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=\ngithub.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=\ngithub.com/docker/cli v29.3.0+incompatible h1:z3iWveU7h19Pqx7alZES8j+IeFQZ1lhTwb2F+V9SVvk=\ngithub.com/docker/cli v29.3.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=\ngithub.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=\ngithub.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=\ngithub.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY=\ngithub.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=\ngithub.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94=\ngithub.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE=\ngithub.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=\ngithub.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=\ngithub.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4=\ngithub.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=\ngithub.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=\ngithub.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=\ngithub.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=\ngithub.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=\ngithub.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=\ngithub.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=\ngithub.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=\ngithub.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=\ngithub.com/go-rod/rod v0.116.2 h1:A5t2Ky2A+5eD/ZJQr1EfsQSe5rms5Xof/qj296e+ZqA=\ngithub.com/go-rod/rod v0.116.2/go.mod h1:H+CMO9SCNc2TJ2WfrG+pKhITz57uGNYU43qYHh438Mg=\ngithub.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=\ngithub.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/go-containerregistry v0.20.7 h1:24VGNpS0IwrOZ2ms2P1QE3Xa5X9p4phx0aUgzYzHW6I=\ngithub.com/google/go-containerregistry v0.20.7/go.mod h1:Lx5LCZQjLH1QBaMPeGwsME9biPeo1lPx6lbGj/UmzgM=\ngithub.com/google/go-intervals v0.0.2 h1:FGrVEiUnTRKR8yE04qzXYaJMtnIYqobR5QbblK3ixcM=\ngithub.com/google/go-intervals v0.0.2/go.mod h1:MkaR3LNRfeKLPmqgJYs4E66z5InYjmCjbbr4TQlcT6Y=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc=\ngithub.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=\ngithub.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=\ngithub.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=\ngithub.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=\ngithub.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=\ngithub.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=\ngithub.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=\ngithub.com/hashicorp/go-multierror v1.1.2-0.20250313123807-1ee6e1a1957a h1:zTI4FFCOXw14aUC78fxMh4tS7jJI7Fm51sH4smjl+Fc=\ngithub.com/hashicorp/go-multierror v1.1.2-0.20250313123807-1ee6e1a1957a/go.mod h1:RYOtqYU2MvOrqUMooJlQoFFuqR6sazGdm1ubZTL++r8=\ngithub.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=\ngithub.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=\ngithub.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=\ngithub.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=\ngithub.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=\ngithub.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=\ngithub.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=\ngithub.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=\ngithub.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=\ngithub.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=\ngithub.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=\ngithub.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=\ngithub.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ=\ngithub.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=\ngithub.com/mattn/go-sqlite3 v1.14.34 h1:3NtcvcUnFBPsuRcno8pUtupspG/GM+9nZ88zgJcp6Zk=\ngithub.com/mattn/go-sqlite3 v1.14.34/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=\ngithub.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU=\ngithub.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=\ngithub.com/mistifyio/go-zfs/v4 v4.0.0 h1:sU0+5dX45tdDK5xNZ3HBi95nxUc48FS92qbIZEvpAg4=\ngithub.com/mistifyio/go-zfs/v4 v4.0.0/go.mod h1:weotFtXTHvBwhr9Mv96KYnDkTPBOHFUbm9cBmQpesL0=\ngithub.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=\ngithub.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=\ngithub.com/moby/moby/api v1.54.0 h1:7kbUgyiKcoBhm0UrWbdrMs7RX8dnwzURKVbZGy2GnL0=\ngithub.com/moby/moby/api v1.54.0/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc=\ngithub.com/moby/moby/client v0.3.0 h1:UUGL5okry+Aomj3WhGt9Aigl3ZOxZGqR7XPo+RLPlKs=\ngithub.com/moby/moby/client v0.3.0/go.mod h1:HJgFbJRvogDQjbM8fqc1MCEm4mIAGMLjXbgwoZp6jCQ=\ngithub.com/moby/sys/capability v0.4.0 h1:4D4mI6KlNtWMCM1Z/K0i7RV1FkX+DBDHKVJpCndZoHk=\ngithub.com/moby/sys/capability v0.4.0/go.mod h1:4g9IK291rVkms3LKCDOoYlnV8xKwoDTpIrNEE35Wq0I=\ngithub.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg=\ngithub.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4=\ngithub.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs=\ngithub.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=\ngithub.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI=\ngithub.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=\ngithub.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=\ngithub.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg=\ngithub.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=\ngithub.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=\ngithub.com/opencontainers/image-spec v1.1.2-0.20260226102121-a4c6ade7bb82 h1:E+Fkd2gXu1H0wGsF/81ghtqacuzl+OkuS4rEnGOsTCw=\ngithub.com/opencontainers/image-spec v1.1.2-0.20260226102121-a4c6ade7bb82/go.mod h1:GRy5q9c6/vsqXmQ1I6TL1PkhA64F6eXG9fUOQ9tFvm8=\ngithub.com/opencontainers/image-spec/schema v0.0.0-20250717171153-ab80ff15c2dd h1:demTtfPH+DsqagnumQZv8nQrFoUqCJDNVrw+6LsGpm4=\ngithub.com/opencontainers/image-spec/schema v0.0.0-20250717171153-ab80ff15c2dd/go.mod h1:vPOv9cXqxB6ycHY5iVwqL4rkYbwRh46GZj13CfkZ6As=\ngithub.com/opencontainers/image-tools v1.0.0-rc3 h1:ZR837lBIxq6mmwEqfYrbLMuf75eBSHhccVHy6lsBeM4=\ngithub.com/opencontainers/image-tools v1.0.0-rc3/go.mod h1:A9btVpZLzttF4iFaKNychhPyrhfOjJ1OF5KrA8GcLj4=\ngithub.com/opencontainers/runtime-spec v1.3.0 h1:YZupQUdctfhpZy3TM39nN9Ika5CBWT5diQ8ibYCRkxg=\ngithub.com/opencontainers/runtime-spec v1.3.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=\ngithub.com/opencontainers/selinux v1.13.1 h1:A8nNeceYngH9Ow++M+VVEwJVpdFmrlxsN22F+ISDCJE=\ngithub.com/opencontainers/selinux v1.13.1/go.mod h1:S10WXZ/osk2kWOYKy1x2f/eXF5ZHJoUs8UU/2caNRbg=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=\ngithub.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/proglottis/gpgme v0.1.6 h1:8WpQ8VWggLdxkuTnW+sZ1r1t92XBNd8GZNDhQ4Rz+98=\ngithub.com/proglottis/gpgme v0.1.6/go.mod h1:5LoXMgpE4bttgwwdv9bLs/vwqv3qV7F4glEEZ7mRKrM=\ngithub.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=\ngithub.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=\ngithub.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=\ngithub.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=\ngithub.com/sebdah/goldie/v2 v2.7.1 h1:PkBHymaYdtvEkZV7TmyqKxdmn5/Vcj+8TpATWZjnG5E=\ngithub.com/sebdah/goldie/v2 v2.7.1/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=\ngithub.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14=\ngithub.com/secure-systems-lab/go-securesystemslib v0.10.0/go.mod h1:MRKONWmRoFzPNQ9USRF9i1mc7MvAVvF1LlW8X5VWDvk=\ngithub.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=\ngithub.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=\ngithub.com/sigstore/fulcio v1.8.5 h1:HYTD1/L5wlBp8JxsWxUf8hmfaNBBF/x3r3p5l6tZwbA=\ngithub.com/sigstore/fulcio v1.8.5/go.mod h1:tSLYK3JsKvJpDW1BsIsVHZgHj+f8TjXARzqIUWSsSPQ=\ngithub.com/sigstore/protobuf-specs v0.5.0 h1:F8YTI65xOHw70NrvPwJ5PhAzsvTnuJMGLkA4FIkofAY=\ngithub.com/sigstore/protobuf-specs v0.5.0/go.mod h1:+gXR+38nIa2oEupqDdzg4qSBT0Os+sP7oYv6alWewWc=\ngithub.com/sigstore/sigstore v1.10.4 h1:ytOmxMgLdcUed3w1SbbZOgcxqwMG61lh1TmZLN+WeZE=\ngithub.com/sigstore/sigstore v1.10.4/go.mod h1:tDiyrdOref3q6qJxm2G+JHghqfmvifB7hw+EReAfnbI=\ngithub.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=\ngithub.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=\ngithub.com/smallstep/pkcs7 v0.1.1 h1:x+rPdt2W088V9Vkjho4KtoggyktZJlMduZAtRHm68LU=\ngithub.com/smallstep/pkcs7 v0.1.1/go.mod h1:dL6j5AIz9GHjVEBTXtW+QliALcgM19RtXaTeyxI+AfA=\ngithub.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=\ngithub.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=\ngithub.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=\ngithub.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 h1:pnnLyeX7o/5aX8qUQ69P/mLojDqwda8hFOCBTmP/6hw=\ngithub.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6/go.mod h1:39R/xuhNgVhi+K0/zst4TLrJrVmbm6LVgl4A0+ZFS5M=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/sylabs/sif/v2 v2.22.0 h1:Y+xXufp4RdgZe02SR3nWEg7S6q4tPWN237WHYzkDSKA=\ngithub.com/sylabs/sif/v2 v2.22.0/go.mod h1:W1XhWTmG1KcG7j5a3KSYdMcUIFvbs240w/MMVW627hs=\ngithub.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhgwZDDc=\ngithub.com/tchap/go-patricia/v2 v2.3.3/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=\ngithub.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=\ngithub.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=\ngithub.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=\ngithub.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4=\ngithub.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=\ngithub.com/vbauerster/mpb/v8 v8.12.0 h1:+gneY3ifzc88tKDzOtfG8k8gfngCx615S2ZmFM4liWg=\ngithub.com/vbauerster/mpb/v8 v8.12.0/go.mod h1:V02YIuMVo301Y1VE9VtZlD8s84OMsk+EKN6mwvf/588=\ngithub.com/ysmood/fetchup v0.2.3 h1:ulX+SonA0Vma5zUFXtv52Kzip/xe7aj4vqT5AJwQ+ZQ=\ngithub.com/ysmood/fetchup v0.2.3/go.mod h1:xhibcRKziSvol0H1/pj33dnKrYyI2ebIvz5cOOkYGns=\ngithub.com/ysmood/goob v0.4.0 h1:HsxXhyLBeGzWXnqVKtmT9qM7EuVs/XOgkX7T6r1o1AQ=\ngithub.com/ysmood/goob v0.4.0/go.mod h1:u6yx7ZhS4Exf2MwciFr6nIM8knHQIE22lFpWHnfql18=\ngithub.com/ysmood/got v0.40.0 h1:ZQk1B55zIvS7zflRrkGfPDrPG3d7+JOza1ZkNxcc74Q=\ngithub.com/ysmood/got v0.40.0/go.mod h1:W7DdpuX6skL3NszLmAsC5hT7JAhuLZhByVzHTq874Qg=\ngithub.com/ysmood/gson v0.7.3 h1:QFkWbTH8MxyUTKPkVWAENJhxqdBa4lYTQWqZCiLG6kE=\ngithub.com/ysmood/gson v0.7.3/go.mod h1:3Kzs5zDl21g5F/BlLTNcuAGAYLKt2lV5G8D1zF3RNmg=\ngithub.com/ysmood/leakless v0.9.0 h1:qxCG5VirSBvmi3uynXFkcnLMzkphdh3xx5FtrORwDCU=\ngithub.com/ysmood/leakless v0.9.0/go.mod h1:R8iAXPRaG97QJwqxs74RdwzcRHT1SWCGTNqY8q0JvMQ=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngo.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=\ngo.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0=\ngo.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=\ngo.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=\ngo.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=\ngo.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=\ngo.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8=\ngo.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE=\ngo.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw=\ngo.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg=\ngo.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=\ngo.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=\ngo.podman.io/common v0.67.1-0.20260319154331-44a8de38c431 h1:tG3+wYtVCBg6/liqIX6al82gBAzm1GtSPo+rQBRDuAI=\ngo.podman.io/common v0.67.1-0.20260319154331-44a8de38c431/go.mod h1:sugHfpSU9btZ6KRTruHrfbzTO8HbOCX9s++p7kmdbOQ=\ngo.podman.io/image/v5 v5.39.2-0.20260313202710-ddaabae34a06 h1:Al947Qn6b4o516JBCH/GuZOZM/6sEkAiZYXhvq4VWPk=\ngo.podman.io/image/v5 v5.39.2-0.20260313202710-ddaabae34a06/go.mod h1:iHfw/1S1llpOEh3P5P9nU8ZZAY9Jv8QmjV7u567Y5BE=\ngo.podman.io/storage v1.62.1-0.20260316152041-ebc34488c338 h1:UPjZRS9elc2XH/xAZkhLJvLc7j8s1XCO3sxkGA7khzs=\ngo.podman.io/storage v1.62.1-0.20260316152041-ebc34488c338/go.mod h1:k8lWBDknm4IJEfY9Gy3P/wRFT8aWvtk+rPtD8FKxIBE=\ngo.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=\ngo.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=\ngolang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=\ngolang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=\ngolang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=\ngolang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4=\ngolang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=\ngolang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=\ngolang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=\ngolang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=\ngolang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=\ngolang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=\ngolang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=\ngolang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=\ngolang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=\ngolang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=\ngolang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=\ngolang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=\ngolang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=\ngolang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=\ngolang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=\ngolang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU=\ngolang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=\ngolang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8=\ngolang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=\ngolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=\ngolang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=\ngolang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=\ngonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=\ngoogle.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=\ngoogle.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=\ngoogle.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=\ngoogle.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=\ngotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=\npgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=\npgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=\n"
  },
  {
    "path": "hack/btrfs_installed_tag.sh",
    "content": "#!/usr/bin/env bash\n${CPP:-${CC:-cc} -E} ${CPPFLAGS} - > /dev/null 2> /dev/null << EOF\n#include <btrfs/ioctl.h>\nEOF\nif test $? -ne 0 ; then\n\techo exclude_graphdriver_btrfs\nfi\n"
  },
  {
    "path": "hack/get_ci_vm.sh",
    "content": "#!/usr/bin/env bash\n\n#\n# For help and usage information, simply execute the script w/o any arguments.\n#\n# This script is intended to be run by Red Hat skopeo developers who need\n# to debug problems specifically related to Cirrus-CI automated testing.\n# It requires that you have been granted prior access to create VMs in\n# google-cloud.  For non-Red Hat contributors, VMs are available as-needed,\n# with supervision upon request.\n\nset -e\n\nSCRIPT_FILEPATH=$(realpath \"${BASH_SOURCE[0]}\")\nSCRIPT_DIRPATH=$(dirname \"$SCRIPT_FILEPATH\")\nREPO_DIRPATH=$(realpath \"$SCRIPT_DIRPATH/../\")\n\n# Help detect if we were called by get_ci_vm container\nGET_CI_VM=\"${GET_CI_VM:-0}\"\nin_get_ci_vm() {\n    if ((GET_CI_VM==0)); then\n        echo \"Error: $1 is not intended for use in this context\"\n        exit 2\n    fi\n}\n\n# get_ci_vm APIv1 container entrypoint calls into this script\n# to obtain required repo. specific configuration options.\nif [[ \"$1\" == \"--config\" ]]; then\n    in_get_ci_vm \"$1\"\n    cat <<EOF\nDESTDIR=\"/var/tmp/go/src/github.com/containers/skopeo\"\nUPSTREAM_REPO=\"https://github.com/containers/skopeo.git\"\nGCLOUD_PROJECT=\"skopeo\"\nGCLOUD_IMGPROJECT=\"libpod-218412\"\nGCLOUD_CFG=\"skopeo\"\nGCLOUD_ZONE=\"${GCLOUD_ZONE:-us-central1-f}\"\nGCLOUD_CPUS=\"2\"\nGCLOUD_MEMORY=\"4Gb\"\nGCLOUD_DISK=\"200\"\nEOF\nelif [[ \"$1\" == \"--setup\" ]]; then\n    in_get_ci_vm \"$1\"\n    # get_ci_vm container entrypoint calls us with this option on the\n    # Cirrus-CI environment instance, to perform repo.-specific setup.\n    echo \"+ Executing setup\" > /dev/stderr\n    ${GOSRC}/${SCRIPT_BASE}/runner.sh setup\nelse\n    # Create and access VM for specified Cirrus-CI task\n    mkdir -p $HOME/.config/gcloud/ssh\n    podman run -it --rm \\\n        --tz=local \\\n        -e NAME=\"$USER\" \\\n        -e SRCDIR=/src \\\n        -e GCLOUD_ZONE=\"$GCLOUD_ZONE\" \\\n        -e DEBUG=\"${DEBUG:-0}\" \\\n        -v $REPO_DIRPATH:/src:O \\\n        -v $HOME/.config/gcloud:/root/.config/gcloud:z \\\n        -v $HOME/.config/gcloud/ssh:/root/.ssh:z \\\n        quay.io/libpod/get_ci_vm:latest \"$@\"\nfi\n"
  },
  {
    "path": "hack/get_fqin.sh",
    "content": "#!/usr/bin/env bash\n\n# This script is intended to be called from the Makefile.  It's purpose\n# is to automation correspondence between the environment used for local\n# development and CI.\n\nset -e\n\nSCRIPT_FILEPATH=$(realpath \"${BASH_SOURCE[0]}\")\nSCRIPT_DIRPATH=$(dirname \"$SCRIPT_FILEPATH\")\nREPO_DIRPATH=$(realpath \"$SCRIPT_DIRPATH/../\")\n\n# When running under CI, we already have the necessary information,\n# simply provide it to the Makefile.\nif [[ -n \"$SKOPEO_CIDEV_CONTAINER_FQIN\" ]]; then\n    echo \"$SKOPEO_CIDEV_CONTAINER_FQIN\"\n    exit 0\nfi\n\nif [[ -n $(command -v podman) ]]; then CONTAINER_RUNTIME=podman; fi\nCONTAINER_RUNTIME=${CONTAINER_RUNTIME:-docker}\n\n# Borrow the get_ci_vm container image since it's small, and\n# by necessity contains a script that can accurately interpret\n# env. var. values from any .cirrus.yml runtime context.\n$CONTAINER_RUNTIME run --rm \\\n    --security-opt label=disable \\\n    -v $REPO_DIRPATH:/src:ro \\\n    --entrypoint=/usr/share/automation/bin/cirrus-ci_env.py \\\n    quay.io/libpod/get_ci_vm:latest \\\n    --envs=\"Skopeo Test\" /src/.cirrus.yml | \\\n    grep -E -m1 '^SKOPEO_CIDEV_CONTAINER_FQIN' | \\\n    awk -F \"=\" -e '{print $2}' | \\\n    tr -d \\'\\\"\n"
  },
  {
    "path": "hack/libsubid_tag.sh",
    "content": "#!/usr/bin/env bash\nif test $(${GO:-go} env GOOS) != \"linux\" ; then\n\texit 0\nfi\ntmpdir=\"$PWD/tmp.$RANDOM\"\nmkdir -p \"$tmpdir\"\ntrap 'rm -fr \"$tmpdir\"' EXIT\n${CC:-cc} ${CPPFLAGS} ${CFLAGS} -o \"$tmpdir\"/libsubid_tag -x c - -l subid \\\n\t  > /dev/null 2> /dev/null << EOF\n#include <shadow/subid.h>\n#include <stdlib.h>\nint main() {\n\tstruct subid_range *ranges = NULL;\n#if SUBID_ABI_MAJOR >= 4\n\tsubid_get_uid_ranges(\"root\", &ranges);\n#else\n\tget_subuid_ranges(\"root\", &ranges);\n#endif\n\tfree(ranges);\n\treturn 0;\n}\nEOF\nif test $? -eq 0 ; then\n\techo libsubid\nfi\n"
  },
  {
    "path": "hack/man-page-checker",
    "content": "#!/usr/bin/env bash\n#\n# man-page-checker - validate and cross-reference man page names\n#\n# This is the script that cross-checks BETWEEN MAN PAGES. It is not the\n# script that cross-checks that each option in skopeo foo --help is listed\n# in skopeo-foo.1.md and vice-versa; that one is xref-helpmsgs-manpages.\n#\n\nverbose=\nfor i; do\n    case \"$i\" in\n        -v|--verbose)   verbose=verbose ;;\n    esac\ndone\n\n\ndie() {\n    echo \"$(basename $0): $*\" >&2\n    exit 1\n}\n\ncd $(dirname $0)/../docs || die \"Please run me from top-level skopeo dir\"\n\nrc=0\n\n# Pass 1: cross-check file names with NAME section\n#\n# for a given skopeo-foo.1.md, the NAME should be 'skopeo-foo'\nfor md in *.1.md;do\n    # Read the first line after '## NAME'\n    name=$(grep -E -A1 '^## NAME' $md|tail -1|awk '{print $1}' | tr -d \\\\\\\\)\n\n    expect=$(basename $md .1.md)\n    if [ \"$name\" != \"$expect\" ]; then\n        echo\n        printf \"Inconsistent program NAME in %s:\\n\" $md\n        printf \"  NAME= %s  (expected: %s)\\n\" $name $expect\n        rc=1\n    fi\ndone\n\n# Pass 2: compare descriptions.\n#\n# Make sure the descriptive text in skopeo-foo.1.md matches the one\n# in the table in skopeo.1.md.\nfor md in $(ls -1 *-*.1.md);do\n    desc=$(grep -E -A1 '^## NAME' $md|tail -1|sed -E -e 's/^skopeo[^[:space:]]+ - //')\n\n    # Find the descriptive text in the main skopeo man page.\n    parent=skopeo.1.md\n    parent_desc=$(grep $md $parent | awk -F'|' '{print $3}' | sed -E -e 's/^[[:space:]]+//' -e 's/[[:space:]]+$//')\n\n    if [ \"$desc\" != \"$parent_desc\" ]; then\n        echo\n        printf \"Inconsistent subcommand descriptions:\\n\"\n        printf \"  %-32s = '%s'\\n\" $md \"$desc\"\n        printf \"  %-32s = '%s'\\n\" $parent \"$parent_desc\"\n        printf \"Please ensure that the NAME section of $md\\n\"\n        printf \"matches the subcommand description in $parent\\n\"\n        rc=1\n    fi\ndone\n\n# Helper function: compares man page synopsis vs --help usage message\nfunction compare_usage() {\n    local cmd=\"$1\"\n    local from_man=\"$2\"\n\n    # Run 'cmd --help', grab the line immediately after 'Usage:'\n    local help_output=$(../bin/$cmd --help)\n    local from_help=$(echo \"$help_output\" | grep -A1 '^Usage:' | tail -1)\n\n    # strip off command name from both\n    from_man=$(sed -E -e \"s/\\*\\*$cmd\\*\\*[[:space:]]*//\" <<<\"$from_man\")\n    from_help=$(sed -E -e \"s/^[[:space:]]*$cmd[[:space:]]*//\" <<<\"$from_help\")\n\n    # man page lists 'foo [*options*]', help msg shows 'foo [command options]'.\n    # Make sure if one has it, the other does too.\n    if expr \"$from_man\" : \"\\[\\*options\\*\\]\" >/dev/null; then\n        if expr \"$from_help\" : \"\\[command options\\]\" >/dev/null; then\n            :\n        else\n            echo \"WARNING: $cmd: man page shows '[*options*]', help does not show [command options]\"\n            rc=1\n       fi\n    elif expr \"$from_help\" : \"\\[command options\\]\" >/dev/null; then\n        echo \"WARNING: $cmd: --help shows [command options], man page does not show [*options*]\"\n        rc=1\n    fi\n\n    # Strip off options and flags; start comparing arguments\n    from_man=$(sed  -E -e 's/^\\[\\*options\\*\\][[:space:]]*//' <<<\"$from_man\")\n    from_help=$(sed -E -e 's/^\\[command options\\][[:space:]]*//'      <<<\"$from_help\")\n\n    # Constant strings in man page are '**foo**', in --help are 'foo'.\n    from_man=$(sed -E -e 's/\\*\\*([^*]+)\\*\\*/\\1/g' <<<\"$from_man\")\n\n    # Args in man page are '_foo_', in --help are 'FOO'. Convert all to\n    # UPCASE simply because it stands out better to the eye.\n    from_man=$(sed -E -e 's/_([a-z-]+)_/\\U\\1/g' <<<\"$from_man\")\n\n    # Compare man-page and --help usage strings. Skip 'skopeo' itself,\n    # because the man page includes '[global options]' which we don't grok.\n    if [[ \"$from_man\" != \"$from_help\" && \"$cmd\" != \"skopeo\" ]]; then\n        printf \"%-25s man='%s' help='%s'\\n\" \"$cmd:\" \"$from_man\" \"$from_help\"\n        rc=1\n    fi\n}\n\n# Pass 3: compare synopses.\n#\n# Make sure the SYNOPSIS line in skopeo-foo.1.md reads '**skopeo foo** ...'\nfor md in *.1.md;do\n    synopsis=$(grep -E -A1 '^#* SYNOPSIS' $md|tail -1)\n\n    # Command name must be bracketed by double asterisks; options and\n    # arguments are bracketed by single ones.\n    #   E.g. '**skopeo copy** [*options*] _..._'\n    # Get the command name, and confirm that it matches the md file name.\n    cmd=$(echo \"$synopsis\" | sed -E -e 's/^\\*\\*([^*]+)\\*\\*.*/\\1/' | tr -d \\*)\n    # Use sed, not tr, so we only replace the first dash: we want\n    # skopeo-list-tags -> \"skopeo list-tags\", not \"skopeo list tags\"\n    md_nodash=$(basename \"$md\" .1.md | sed -e 's/-/ /')\n    if [ \"$cmd\" != \"$md_nodash\" ]; then\n        echo\n        printf \"Inconsistent program name in SYNOPSIS in %s:\\n\" $md\n        printf \"  SYNOPSIS = %s (expected: '%s')\\n\" \"$cmd\" \"$md_nodash\"\n        rc=1\n    fi\n\n    # The convention is to use UPPER CASE in 'skopeo foo --help',\n    # but *lower case bracketed by asterisks* in the man page\n    if expr \"$synopsis\" : \".*[A-Z]\" >/dev/null; then\n        echo\n        printf \"Inconsistent capitalization in SYNOPSIS in %s\\n\" $md\n        printf \"  '%s' should not contain upper-case characters\\n\" \"$synopsis\"\n        rc=1\n    fi\n\n    # (for debugging, and getting a sense of standard conventions)\n    #printf \"  %-32s ------ '%s'\\n\" $md \"$synopsis\"\n\n    # If bin/skopeo is available, run \"cmd --help\" and compare Usage\n    # messages. This is complicated, so do it in a helper function.\n    compare_usage \"$md_nodash\" \"$synopsis\"\ndone\n\n\nexit $rc\n"
  },
  {
    "path": "hack/sqlite_tag.sh",
    "content": "#!/usr/bin/env bash\n${CPP:-${CC:-cc} -E} ${CPPFLAGS} - &> /dev/null << EOF\n#include <sqlite3.h>\nEOF\nif test $? -eq 0 ; then\n\techo libsqlite3\nfi\n"
  },
  {
    "path": "hack/test-system.sh",
    "content": "#!/bin/bash\nset -e\n\n# These tests can run in/outside of a container.  However,\n# not all storage drivers are supported in a container\n# environment.  Detect this and setup storage when\n# running in a container.\n#\n# Paradoxically (FIXME: clean this up), SKOPEO_CONTAINER_TESTS is set\n# both inside a container and without a container (in a CI VM); it actually means\n# \"it is safe to destructively modify the system for tests\".\n#\n# On a CI VM, we can just use Podman as it is already configured; the changes below,\n# to use VFS, are necessary only inside a container, because overlay-inside-overlay\n# does not work. So, make these changes conditional on both\n# SKOPEO_CONTAINER_TESTS (for acceptability to do destructive modification) and !CI\n# (for necessity to adjust for in-container operation)\nif ((SKOPEO_CONTAINER_TESTS)) && [[ \"$CI\" != true ]]; then\n    if [[ -r /etc/containers/storage.conf ]]; then\n        echo \"MODIFYING existing storage.conf\"\n        sed -i \\\n            -e 's/^driver\\s*=.*/driver = \"vfs\"/' \\\n            -e 's/^mountopt/#mountopt/' \\\n            /etc/containers/storage.conf\n    else\n        echo \"CREATING NEW storage.conf\"\n        cat >> /etc/containers/storage.conf << EOF\n[storage]\ndriver = \"vfs\"\nrunroot = \"/run/containers/storage\"\ngraphroot = \"/var/lib/containers/storage\"\nEOF\n    fi\n    # The logic of finding the relevant storage.conf file is convoluted\n    # and in effect differs between Skopeo and Podman, at least in some versions;\n    # explicitly point at the file we want to use to hopefully avoid that.\n    export CONTAINERS_STORAGE_CONF=/etc/containers/storage.conf\nfi\n\nbats --tap systemtest\n"
  },
  {
    "path": "hack/tree_status.sh",
    "content": "#!/usr/bin/env bash\nset -e\n\nSTATUS=$(git status --porcelain)\nif [[ -z $STATUS ]]\nthen\n\techo \"tree is clean\"\nelse\n\techo \"tree is dirty, please commit all changes and sync the vendor.conf\"\n\techo \"\"\n\techo \"$STATUS\"\n\texit 1\nfi\n"
  },
  {
    "path": "hack/validate-git-marks.sh",
    "content": "#!/usr/bin/env bash\n\nIFS=$'\\n'\nfiles=( $(git ls-tree -r HEAD --name-only | grep -v '^vendor/' || true) )\nunset IFS\n\nbadFiles=()\nfor f in \"${files[@]}\"; do\n    if [ $(grep -r \"^\\(<<<<<<<\\|>>>>>>>\\|^=======$\\)\" $f) ]; then\n        badFiles+=( \"$f\" )\n        continue\n    fi\n    set -e\ndone\n\n\nif [ ${#badFiles[@]} -eq 0 ]; then\n\techo 'Congratulations!  There is no conflict.'\nelse\n\t{\n\t\techo \"There is trace of conflict(s) in the following files :\"\n\t\tfor f in \"${badFiles[@]}\"; do\n\t\t\techo \" - $f\"\n\t\tdone\n\t\techo\n\t\techo 'Please fix the conflict(s) commit the result.'\n\t\techo\n\t} >&2\n\texit 1\nfi\n"
  },
  {
    "path": "hack/validate-vet.sh",
    "content": "#!/bin/bash\n\nerrors=$(go vet -tags=\"${BUILDTAGS}\" ./... 2>&1)\n\nif [ -z \"$errors\" ]; then\n\techo 'Congratulations!  All Go source files have been vetted.'\nelse\n\t{\n\t\techo \"Errors from go vet:\"\n\t\techo \"$errors\"\n\t\techo\n\t\techo 'Please fix the above errors. You can test via \"go vet\" and commit the result.'\n\t\techo\n\t} >&2\n\texit 1\nfi\n"
  },
  {
    "path": "hack/warn-destructive-tests.sh",
    "content": "#!/usr/bin/env bash\nset -e\n\n# Set this to 1 to enable installation/modification of environment/services\nexport SKOPEO_CONTAINER_TESTS=${SKOPEO_CONTAINER_TESTS:-0}\n\nif [[ \"$SKOPEO_CONTAINER_TESTS\" == \"0\" ]] && [[ \"$CI\" != \"true\" ]]; then\n    (\n    echo \"***************************************************************\"\n    echo \"WARNING: Executing tests directly on the local development\"\n    echo \"         host is highly discouraged.  Many important items\"\n    echo \"         will be skipped.  For manual execution, please utilize\"\n    echo \"         the Makefile targets WITHOUT the '-local' suffix.\"\n    echo \"***************************************************************\"\n    ) > /dev/stderr\n    sleep 5\nfi\n"
  },
  {
    "path": "hack/xref-helpmsgs-manpages",
    "content": "#!/usr/bin/perl\n#\n# xref-helpmsgs-manpages - cross-reference --help options against man pages\n#\npackage LibPod::CI::XrefHelpmsgsManpages;\n\nuse v5.14;\nuse utf8;\n\nuse strict;\nuse warnings;\n\n(our $ME = $0) =~ s|.*/||;\nour $VERSION = '0.1';\n\n# For debugging, show data structures using DumpTree($var)\n#use Data::TreeDumper; $Data::TreeDumper::Displayaddress = 0;\n\n# unbuffer output\n$| = 1;\n\n###############################################################################\n# BEGIN user-customizable section\n\n# Path to skopeo executable\nmy $Default_Skopeo = './bin/skopeo';\nmy $SKOPEO = $ENV{SKOPEO} || $Default_Skopeo;\n\n# Path to all doc files (markdown)\nmy $Docs_Path = 'docs';\n\n# Global error count\nmy $Errs = 0;\n\n# END   user-customizable section\n###############################################################################\n\n###############################################################################\n# BEGIN boilerplate args checking, usage messages\n\nsub usage {\n    print  <<\"END_USAGE\";\nUsage: $ME [OPTIONS]\n\n$ME recursively runs 'skopeo --help' against\nall subcommands; and recursively reads skopeo-*.1.md files\nin $Docs_Path, then cross-references that each --help\noption is listed in the appropriate man page and vice-versa.\n\n$ME invokes '\\$SKOPEO' (default: $Default_Skopeo).\n\nExit status is zero if no inconsistencies found, one otherwise\n\nOPTIONS:\n\n  -v, --verbose  show verbose progress indicators\n  -n, --dry-run  make no actual changes\n\n  --help         display this message\n  --version      display program name and version\nEND_USAGE\n\n    exit;\n}\n\n# Command-line options.  Note that this operates directly on @ARGV !\nour $debug   = 0;\nour $verbose = 0;\nsub handle_opts {\n    use Getopt::Long;\n    GetOptions(\n        'debug!'     => \\$debug,\n        'verbose|v'  => \\$verbose,\n\n        help         => \\&usage,\n        version      => sub { print \"$ME version $VERSION\\n\"; exit 0 },\n    ) or die \"Try `$ME --help' for help\\n\";\n}\n\n# END   boilerplate args checking, usage messages\n###############################################################################\n\n############################## CODE BEGINS HERE ###############################\n\n# The term is \"modulino\".\n__PACKAGE__->main()                                     unless caller();\n\n# Main code.\nsub main {\n    # Note that we operate directly on @ARGV, not on function parameters.\n    # This is deliberate: it's because Getopt::Long only operates on @ARGV\n    # and there's no clean way to make it use @_.\n    handle_opts();                      # will set package globals\n\n    # Fetch command-line arguments.  Barf if too many.\n    die \"$ME: Too many arguments; try $ME --help\\n\"                 if @ARGV;\n\n    my $help = skopeo_help();\n    my $man  = skopeo_man('skopeo');\n\n    xref_by_help($help, $man);\n    xref_by_man($help, $man);\n\n    exit !!$Errs;\n}\n\n###############################################################################\n# BEGIN cross-referencing\n\n##################\n#  xref_by_help  #  Find keys in '--help' but not in man\n##################\nsub xref_by_help {\n    my ($help, $man, @subcommand) = @_;\n\n    for my $k (sort keys %$help) {\n        if (exists $man->{$k}) {\n            if (ref $help->{$k}) {\n                xref_by_help($help->{$k}, $man->{$k}, @subcommand, $k);\n            }\n            # Otherwise, non-ref is leaf node such as a --option\n        }\n        else {\n            my $man = $man->{_path} || 'man';\n            warn \"$ME: skopeo @subcommand --help lists $k, but $k not in $man\\n\";\n            ++$Errs;\n        }\n    }\n}\n\n#################\n#  xref_by_man  #  Find keys in man pages but not in --help\n#################\n#\n# In an ideal world we could share the functionality in one function; but\n# there are just too many special cases in man pages.\n#\nsub xref_by_man {\n    my ($help, $man, @subcommand) = @_;\n\n    # FIXME: this generates way too much output\n    for my $k (grep { $_ ne '_path' } sort keys %$man) {\n        if (exists $help->{$k}) {\n            if (ref $man->{$k}) {\n                xref_by_man($help->{$k}, $man->{$k}, @subcommand, $k);\n            }\n        }\n        elsif ($k ne '--help' && $k ne '-h') {\n            my $man = $man->{_path} || 'man';\n\n            warn \"$ME: skopeo @subcommand: $k in $man, but not --help\\n\";\n            ++$Errs;\n        }\n    }\n}\n\n# END   cross-referencing\n###############################################################################\n# BEGIN data gathering\n\n#################\n#  skopeo_help  #  Parse output of 'skopeo [subcommand] --help'\n#################\nsub skopeo_help {\n    my %help;\n    open my $fh, '-|', $SKOPEO, @_, '--help'\n        or die \"$ME: Cannot fork: $!\\n\";\n    my $section = '';\n    while (my $line = <$fh>) {\n        # Cobra is blessedly consistent in its output:\n        #    Usage: ...\n        #    Available Commands:\n        #       ....\n        #    Options:\n        #       ....\n        #\n        # Start by identifying the section we're in...\n        if ($line =~ /^Available\\s+(Commands):/) {\n            $section = lc $1;\n        }\n        elsif ($line =~ /^(Flags):/) {\n            $section = lc $1;\n        }\n\n        # ...then track commands and options. For subcommands, recurse.\n        elsif ($section eq 'commands') {\n            if ($line =~ /^\\s{1,4}(\\S+)\\s/) {\n                my $subcommand = $1;\n                print \"> skopeo @_ $subcommand\\n\"               if $debug;\n                $help{$subcommand} = skopeo_help(@_, $subcommand)\n                    unless $subcommand eq 'help';       # 'help' not in man\n            }\n        }\n        elsif ($section eq 'flags') {\n            # Handle '--foo' or '-f, --foo'\n            if ($line =~ /^\\s{1,10}(--\\S+)\\s/) {\n                print \"> skopeo @_ $1\\n\"                        if $debug;\n                $help{$1} = 1;\n            }\n            elsif ($line =~ /^\\s{1,10}(-\\S),\\s+(--\\S+)\\s/) {\n                print \"> skopeo @_ $1, $2\\n\"                    if $debug;\n                $help{$1} = $help{$2} = 1;\n            }\n        }\n    }\n    close $fh\n        or die \"$ME: Error running 'skopeo @_ --help'\\n\";\n\n    return \\%help;\n}\n\n\n################\n#  skopeo_man  #  Parse contents of skopeo-*.1.md\n################\nsub skopeo_man {\n    my $command = shift;\n    my $manpath = \"$Docs_Path/$command.1.md\";\n    print \"** $manpath \\n\"                              if $debug;\n\n    my %man = (_path => $manpath);\n    open my $fh, '<', $manpath\n        or die \"$ME: Cannot read $manpath: $!\\n\";\n    my $section = '';\n    my @most_recent_flags;\n    my $previous_subcmd = '';\n    while (my $line = <$fh>) {\n        chomp $line;\n        next unless $line;\t\t# skip empty lines\n\n        # .md files designate sections with leading double hash\n        if ($line =~ /^##\\s*OPTIONS/) {\n            $section = 'flags';\n        }\n        elsif ($line =~ /^\\#\\#\\s+(SUB)?COMMANDS/) {\n            $section = 'commands';\n        }\n        elsif ($line =~ /^\\#\\#[^#]/) {\n            $section = '';\n        }\n\n        # This will be a table containing subcommand names, links to man pages.\n        elsif ($section eq 'commands') {\n            # In skopeo.1.md\n            if ($line =~ /^\\|\\s*\\[skopeo-(\\S+?)\\(\\d\\)\\]/) {\n                # $1 will be changed by recursion _*BEFORE*_ left-hand assignment\n                my $subcmd = $1;\n                $man{$subcmd} = skopeo_man(\"skopeo-$1\");\n            }\n        }\n\n        # Options should always be of the form '**-f**' or '**\\-\\-flag**',\n        # possibly separated by comma-space.\n        elsif ($section eq 'flags') {\n            # If option has long and short form, long must come first.\n            # This is a while-loop because there may be multiple long\n            # option names (not in skopeo ATM, but leave the possibility open)\n            while ($line =~ s/^\\*\\*(--[a-z0-9.-]+)\\*\\*(=\\*[a-zA-Z0-9-]+\\*)?(,\\s+)?//g) {\n                $man{$1} = 1;\n            }\n            # Short form\n            if ($line =~ s/^\\*\\*(-[a-zA-Z0-9.])\\*\\*(=\\*[a-zA-Z0-9-]+\\*)?//g) {\n                $man{$1} = 1;\n            }\n        }\n    }\n    close $fh;\n\n    return \\%man;\n}\n\n\n\n# END   data gathering\n###############################################################################\n\n1;\n"
  },
  {
    "path": "install.md",
    "content": "# Installing Skopeo\n\n## Distribution Packages\n`skopeo` may already be packaged in your distribution. This document lists the\ninstallation steps for many distros, along with their information and support links.\n\n### Fedora\n\n```sh\nsudo dnf -y install skopeo\n```\n\n[Package Info](https://src.fedoraproject.org/rpms/skopeo) and\n[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Fedora&component=skopeo&product=Fedora)\n\nFedora bugs can be reported on the Skopeo GitHub [Issues](https://github.com/containers/skopeo/issues) page.\n\n### RHEL / CentOS Stream ≥ 8\n\n```sh\nsudo dnf -y install skopeo\n```\n\nIf you are a RHEL customer, please reach out through the official RHEL support\nchannels for any issues.\n\nCentOS Stream 9: [Package Info](https://gitlab.com/redhat/centos-stream/rpms/skopeo/-/tree/c9s) and\n[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Red%20Hat&component=skopeo&product=Red%20Hat%20Enterprise%20Linux%209&version=CentOS%20Stream)\n\nCentOS Stream 8: [Package Info](https://git.centos.org/rpms/skopeo/tree/c8s-stream-rhel8) and\n[Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=__open__&classification=Red%20Hat&component=skopeo&product=Red%20Hat%20Enterprise%20Linux%208&version=CentOS%20Stream)\n\n\n### RHEL/CentOS ≤ 7.x\n\n```sh\nsudo yum -y install skopeo\n```\n\nCentOS 7: [Package Repo](https://git.centos.org/rpms/skopeo/tree/c7-extras)\n\n### openSUSE\n\n```sh\nsudo zypper install skopeo\n```\n\n[Package Info](https://software.opensuse.org/package/skopeo)\n\n### Alpine\n\n```sh\nsudo apk add skopeo\n```\n\n[Package Info](https://pkgs.alpinelinux.org/packages?name=skopeo)\n\n### Gentoo\n\n```sh\nsudo emerge app-containers/skopeo\n```\n\n[Package Info](https://packages.gentoo.org/packages/app-containers/skopeo)\n\n### Arch Linux\n\n```sh\nsudo pacman -S skopeo\n```\n\n[Package Info](https://archlinux.org/packages/extra/x86_64/skopeo/)\n\n### macOS\n\n```sh\nbrew install skopeo\n```\n\n### Nix / NixOS\n```sh\n$ nix-env -i skopeo\n```\n\n[Package Info](https://search.nixos.org/packages?&show=skopeo&query=skopeo)\n\n### Debian\n\nThe skopeo package is available on [Bullseye](https://packages.debian.org/bullseye/skopeo),\nand Debian Testing and Unstable.\n\n```bash\n# Debian Bullseye, Testing or Unstable/Sid\nsudo apt-get update\nsudo apt-get -y install skopeo\n```\n\n[Package Info](https://packages.debian.org/stable/skopeo)\n\n### Raspberry Pi OS arm64 (beta)\n\nRaspberry Pi OS uses the standard Debian's repositories,\nso it is fully compatible with Debian's arm64 repository.\nYou can simply follow the [steps for Debian](#debian) to install Skopeo.\n\n\n### Ubuntu\n\nThe skopeo package is available in the official repositories for Ubuntu 20.10\nand newer.\n\n```bash\n# Ubuntu 20.10 and newer\nsudo apt-get -y update\nsudo apt-get -y install skopeo\n```\n\n[Package Info](https://packages.ubuntu.com/jammy/skopeo)\n\n### Windows\nSkopeo has not yet been packaged for Windows. There is an [open feature\nrequest](https://github.com/containers/skopeo/issues/715) and contributions are\nalways welcome.\n\n## Container Images\n\nSkopeo container images are available at `quay.io/skopeo/stable:latest`.\nFor example,\n\n```bash\npodman run docker://quay.io/skopeo/stable:latest copy --help\n```\n\nThe skopeo container image build context and automation are\nlocated at [https://github.com/containers/image_build/tree/main/skopeo](https://github.com/containers/image_build/tree/main/skopeo)\n\n\n## Building from Source\n\nOtherwise, read on for building and installing it from source:\n\nTo build the `skopeo` binary you need at least Go 1.23.\n\nThere are two ways to build skopeo: in a container, or locally without a\ncontainer. Choose the one which better matches your needs and environment.\n\n### Building without a container\n\nBuilding without a container requires a bit more manual work and setup in your\nenvironment, but it is more flexible:\n\n- It should work in more environments (e.g. for native macOS builds)\n- It does not require root privileges (after dependencies are installed)\n- It is faster, therefore more convenient for developing `skopeo`.\n\nInstall the necessary dependencies:\n\n```bash\n# Fedora:\nsudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel\n```\n\n```bash\n# Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above):\nsudo apt install libgpgme-dev libassuan-dev libbtrfs-dev pkg-config\n```\n\n```bash\n# macOS:\nbrew install gpgme\n```\n\n```bash\n# openSUSE:\nsudo zypper install libgpgme-devel libbtrfs-devel glib2-devel\n```\n\n```bash\n# Arch Linux:\nsudo pacman -S base-devel gpgme btrfs-progs\n```\n\nMake sure to clone this repository in your `GOPATH` - otherwise compilation fails.\n\n```bash\ngit clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo\ncd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo\n```\n\nBy default the `make` command (make all) will build bin/skopeo and the documentation locally.\n\nBuilding of documentation requires `go-md2man`. On systems that do not have this tool, the\ndocument generation can be skipped by passing `DISABLE_DOCS=1`:\n```\nDISABLE_DOCS=1 make\n```\n\n#### Additional prerequisites\n\nIn order to dynamically link against system libraries and avoid compilation errors the ```CGO_ENABLED='1'``` flag must be enabled. You can easily check by ```go env | grep CGO_ENABLED```.\n\nAn alternative would be to set the `BUILDTAGS=containers_image_openpgp` (this removes the dependency on `libgpgme` and its companion libraries).\n\n### Cross-compilation\n\nFor cross-building skopeo, use the command `make bin/skopeo.OS.ARCH`, where OS represents\nthe target operating system and ARCH stands for the desired architecture. For instance,\nto build skopeo for RISC-V 64-bit Linux, execute:\n\n```bash\nmake bin/skopeo.linux.riscv64\n```\n\n### Building documentation\n\nTo build the manual you will need go-md2man.\n\n```bash\n# Debian:\nsudo apt-get install go-md2man\n```\n\n```\n# Fedora:\nsudo dnf install go-md2man\n```\n\n```\n# MacOS:\nbrew install go-md2man\n```\n\nThen\n\n```bash\nmake docs\n```\n\n### Building in a container\n\nBuilding in a container is simpler, but more restrictive:\n\n- It requires the `podman` command and the ability to run Linux containers.\n- The created executable is a Linux executable, and depends on dynamic libraries\n  which may only be available only in a container of a similar Linux\n  distribution.\n\n```bash\n$ make binary\n```\n\n### Shell completion scripts\n\nSkopeo has shell completion scripts for bash, zsh, fish and powershell. They are installed as part of `make install`.\nYou may have to restart your shell in order for them to take effect.\n\nFor instructions to manually generate and load the scripts please see `skopeo completion --help`.\n\n### Installation\n\nFinally, after the binary and documentation is built:\n\n```bash\nsudo make install\n```\n\n### Building a static binary\n\nThere have been efforts in the past to produce and maintain static builds, but the maintainers prefer to run Skopeo using distro packages or within containers. This is because static builds of Skopeo tend to be unreliable and functionally restricted. Specifically:\n- Some features of Skopeo depend on non-Go libraries like `libgpgme`.\n- Generating static Go binaries uses native Go libraries, which don't support e.g. `.local` or LDAP-based name resolution.\n\nThat being said, if you would like to build Skopeo statically, you might be able to do it by combining all the following steps.\n- Export environment variable `CGO_ENABLED=0` (disabling CGO causes Go to prefer native libraries when possible, instead of dynamically linking against system libraries).\n- Set the `BUILDTAGS=containers_image_openpgp` Make variable (this removes the dependency on `libgpgme` and its companion libraries).\n- Clear the `GO_DYN_FLAGS` Make variable if even a dependency on the ELF interpreter is undesirable.\n\nKeep in mind that the resulting binary is unsupported and might crash randomly. Only use if you know what you're doing!\n\nFor more information, history, and context about static builds, check the following issues:\n\n- [#391] - Consider distributing statically built binaries as part of release\n- [#669] - Static build fails with segmentation violation\n- [#670] - Fixing static binary build using container\n- [#755] - Remove static and in-container targets from Makefile\n- [#932] - Add nix derivation for static builds\n- [#1336] - Unable to run skopeo on Fedora 30 (due to dyn lib dependency)\n- [#1478] - Publish binary releases to GitHub (request+discussion)\n\n[#391]: https://github.com/containers/skopeo/issues/391\n[#669]: https://github.com/containers/skopeo/issues/669\n[#670]: https://github.com/containers/skopeo/issues/670\n[#755]: https://github.com/containers/skopeo/issues/755\n[#932]: https://github.com/containers/skopeo/issues/932\n[#1336]: https://github.com/containers/skopeo/issues/1336\n[#1478]: https://github.com/containers/skopeo/issues/1478\n"
  },
  {
    "path": "integration/blocked_test.go",
    "content": "package main\n\nconst (\n\tblockedRegistriesConf = \"./fixtures/blocked-registries.conf\"\n\tblockedErrorRegex     = `.*registry registry-blocked.com is blocked in .*`\n)\n\nfunc (s *skopeoSuite) TestCopyBlockedSource() {\n\tt := s.T()\n\tassertSkopeoFails(t, blockedErrorRegex,\n\t\t\"--registries-conf\", blockedRegistriesConf, \"copy\",\n\t\t\"docker://registry-blocked.com/image:test\",\n\t\t\"docker://registry-unblocked.com/image:test\")\n}\n\nfunc (s *skopeoSuite) TestCopyBlockedDestination() {\n\tt := s.T()\n\tassertSkopeoFails(t, blockedErrorRegex,\n\t\t\"--registries-conf\", blockedRegistriesConf, \"copy\",\n\t\t\"docker://registry-unblocked.com/image:test\",\n\t\t\"docker://registry-blocked.com/image:test\")\n}\n\nfunc (s *skopeoSuite) TestInspectBlocked() {\n\tt := s.T()\n\tassertSkopeoFails(t, blockedErrorRegex,\n\t\t\"--registries-conf\", blockedRegistriesConf, \"inspect\",\n\t\t\"docker://registry-blocked.com/image:test\")\n}\n\nfunc (s *skopeoSuite) TestDeleteBlocked() {\n\tt := s.T()\n\tassertSkopeoFails(t, blockedErrorRegex,\n\t\t\"--registries-conf\", blockedRegistriesConf, \"delete\",\n\t\t\"docker://registry-blocked.com/image:test\")\n}\n"
  },
  {
    "path": "integration/check_test.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"testing\"\n\n\t\"github.com/containers/skopeo/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\nconst (\n\tprivateRegistryURL0 = \"127.0.0.1:5000\"\n\tprivateRegistryURL1 = \"127.0.0.1:5001\"\n)\n\nfunc TestSkopeo(t *testing.T) {\n\tsuite.Run(t, &skopeoSuite{})\n}\n\ntype skopeoSuite struct {\n\tsuite.Suite\n\tregV2         *testRegistryV2\n\tregV2WithAuth *testRegistryV2\n}\n\nvar (\n\t_ = suite.SetupAllSuite(&skopeoSuite{})\n\t_ = suite.TearDownAllSuite(&skopeoSuite{})\n)\n\nfunc (s *skopeoSuite) SetupSuite() {\n\tt := s.T()\n\t_, err := exec.LookPath(skopeoBinary)\n\trequire.NoError(t, err)\n\ts.regV2 = setupRegistryV2At(t, privateRegistryURL0, false, registryVersionModern)\n\ts.regV2WithAuth = setupRegistryV2At(t, privateRegistryURL1, true, registryVersionModern)\n}\n\nfunc (s *skopeoSuite) TearDownSuite() {\n\tif s.regV2 != nil {\n\t\ts.regV2.tearDown()\n\t}\n\tif s.regV2WithAuth != nil {\n\t\t// cmd := exec.Command(\"docker\", \"logout\", s.regV2WithAuth)\n\t\t// require.Noerror(t, cmd.Run())\n\t\ts.regV2WithAuth.tearDown()\n\t}\n}\n\nfunc (s *skopeoSuite) TestVersion() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, fmt.Sprintf(\".*skopeo version %s.*\", version.Version),\n\t\t\"--version\")\n}\n\nfunc (s *skopeoSuite) TestCanAuthToPrivateRegistryV2WithoutDockerCfg() {\n\tt := s.T()\n\tassertSkopeoFails(t, \".*manifest unknown.*\",\n\t\t\"--tls-verify=false\", \"inspect\", \"--creds=\"+s.regV2WithAuth.username+\":\"+s.regV2WithAuth.password, fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url))\n}\n\nfunc (s *skopeoSuite) TestNeedAuthToPrivateRegistryV2WithoutDockerCfg() {\n\tt := s.T()\n\tassertSkopeoFails(t, \".*authentication required.*\",\n\t\t\"--tls-verify=false\", \"inspect\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url))\n}\n\nfunc (s *skopeoSuite) TestCertDirInsteadOfCertPath() {\n\tt := s.T()\n\tassertSkopeoFails(t, \".*unknown flag: --cert-path.*\",\n\t\t\"--tls-verify=false\", \"inspect\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url), \"--cert-path=/\")\n\tassertSkopeoFails(t, \".*authentication required.*\",\n\t\t\"--tls-verify=false\", \"inspect\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url), \"--cert-dir=/etc/docker/certs.d/\")\n}\n\n// TODO(runcom): as soon as we can push to registries ensure you can inspect here\n// not just get image not found :)\nfunc (s *skopeoSuite) TestNoNeedAuthToPrivateRegistryV2ImageNotFound() {\n\tt := s.T()\n\tout, err := exec.Command(skopeoBinary, \"--tls-verify=false\", \"inspect\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2.url)).CombinedOutput()\n\tassert.Error(t, err, \"%s\", string(out))\n\tassert.Regexp(t, \"(?s).*manifest unknown.*\", string(out))                         // (?s) : '.' will also match newlines\n\tassert.NotRegexp(t, \"(?s).*unauthorized: authentication required.*\", string(out)) // (?s) : '.' will also match newlines\n}\n\nfunc (s *skopeoSuite) TestInspectFailsWhenReferenceIsInvalid() {\n\tt := s.T()\n\tassertSkopeoFails(t, `.*Invalid image name.*`, \"inspect\", \"unknown\")\n}\n\nfunc (s *skopeoSuite) TestLoginLogout() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, \"^Login Succeeded!\\n$\",\n\t\t\"login\", \"--tls-verify=false\", \"--username=\"+s.regV2WithAuth.username, \"--password=\"+s.regV2WithAuth.password, s.regV2WithAuth.url)\n\t// test --get-login returns username\n\tassertSkopeoSucceeds(t, fmt.Sprintf(\"^%s\\n$\", s.regV2WithAuth.username),\n\t\t\"login\", \"--tls-verify=false\", \"--get-login\", s.regV2WithAuth.url)\n\t// test logout\n\tassertSkopeoSucceeds(t, fmt.Sprintf(\"^Removed login credentials for %s\\n$\", s.regV2WithAuth.url),\n\t\t\"logout\", s.regV2WithAuth.url)\n}\n\nfunc (s *skopeoSuite) TestCopyWithLocalAuth() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, \"^Login Succeeded!\\n$\",\n\t\t\"login\", \"--tls-verify=false\", \"--username=\"+s.regV2WithAuth.username, \"--password=\"+s.regV2WithAuth.password, s.regV2WithAuth.url)\n\t// copy to private registry using local authentication\n\timageName := fmt.Sprintf(\"docker://%s/busybox:mine\", s.regV2WithAuth.url)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--dest-tls-verify=false\", \"--retry-times\", \"3\",\n\t\ttestFQIN+\":latest\", imageName)\n\t// inspect from private registry\n\tassertSkopeoSucceeds(t, \"\", \"inspect\", \"--tls-verify=false\", imageName)\n\t// logout from the registry\n\tassertSkopeoSucceeds(t, fmt.Sprintf(\"^Removed login credentials for %s\\n$\", s.regV2WithAuth.url),\n\t\t\"logout\", s.regV2WithAuth.url)\n\t// inspect from private registry should fail after logout\n\tassertSkopeoFails(t, \".*authentication required.*\",\n\t\t\"inspect\", \"--tls-verify=false\", imageName)\n}\n"
  },
  {
    "path": "integration/copy_test.go",
    "content": "package main\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"log\"\n\t\"maps\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/opencontainers/image-tools/image\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/signature/simplesequoia\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\tv2DockerRegistryURL            = \"localhost:5555\" // Update also policy.json\n\tv2s1OnlyDockerRegistryURL      = \"localhost:5556\"\n\tv2s1SupportedDockerRegistryURL = \"localhost:5557\"\n\tknownWindowsOnlyImage          = \"docker://mcr.microsoft.com/windows/nanoserver:1909\"\n\tknownListImageRepo             = \"docker://registry.fedoraproject.org/fedora-minimal\"\n\tknownListImage                 = knownListImageRepo + \":38\"\n)\n\nfunc TestCopy(t *testing.T) {\n\tsuite.Run(t, &copySuite{})\n}\n\ntype copySuite struct {\n\tsuite.Suite\n\tcluster             *openshiftCluster\n\tregistry            *testRegistryV2\n\ts1OnlyRegistry      *testRegistryV2\n\ts1SupportedRegistry *testRegistryV2\n\tgpgHome             string\n\tfingerprint         string\n}\n\nvar (\n\t_ = suite.SetupAllSuite(&copySuite{})\n\t_ = suite.TearDownAllSuite(&copySuite{})\n)\n\nfunc (s *copySuite) SetupSuite() {\n\tt := s.T()\n\tif os.Getenv(\"SKOPEO_CONTAINER_TESTS\") != \"1\" {\n\t\tt.Skip(\"Not running in a container, refusing to affect user state\")\n\t}\n\n\ts.cluster = startOpenshiftCluster(t) // FIXME: Set up TLS for the docker registry port instead of using \"--tls-verify=false\" all over the place.\n\n\tfor _, stream := range []string{\"unsigned\", \"personal\", \"official\", \"naming\", \"cosigned\", \"compression\", \"schema1\", \"schema2\"} {\n\t\tisJSON := fmt.Sprintf(`{\n\t\t\t\"kind\": \"ImageStream\",\n\t\t\t\"apiVersion\": \"v1\",\n\t\t\t\"metadata\": {\n\t\t\t    \"name\": \"%s\"\n\t\t\t},\n\t\t\t\"spec\": {}\n\t\t}`, stream)\n\t\trunCommandWithInput(t, isJSON, \"oc\", \"create\", \"-f\", \"-\")\n\t}\n\n\t// FIXME: Set up TLS for the docker registry port instead of using \"--tls-verify=false\" all over the place.\n\ts.registry = setupRegistryV2At(t, v2DockerRegistryURL, false, registryVersionModern)\n\ts.s1OnlyRegistry = setupRegistryV2At(t, v2s1OnlyDockerRegistryURL, false, registryVersionSchema1Only)\n\ts.s1SupportedRegistry = setupRegistryV2At(t, v2s1SupportedDockerRegistryURL, false, registryVersionSchema1Supported)\n\n\ts.gpgHome = t.TempDir()\n\tt.Setenv(\"GNUPGHOME\", s.gpgHome)\n\n\tfor _, key := range []string{\"personal\", \"official\"} {\n\t\tbatchInput := fmt.Sprintf(\"Key-Type: RSA\\nName-Real: Test key - %s\\nName-email: %s@example.com\\n%%no-protection\\n%%commit\\n\",\n\t\t\tkey, key)\n\t\trunCommandWithInput(t, batchInput, gpgBinary, \"--batch\", \"--gen-key\")\n\n\t\tout := combinedOutputOfCommand(t, gpgBinary, \"--armor\", \"--export\", fmt.Sprintf(\"%s@example.com\", key))\n\t\terr := os.WriteFile(filepath.Join(s.gpgHome, fmt.Sprintf(\"%s-pubkey.gpg\", key)),\n\t\t\t[]byte(out), 0o600)\n\t\trequire.NoError(t, err)\n\t}\n\n\t// Get fingerprint for the personal key (used by some tests)\n\tlines, err := exec.Command(gpgBinary, \"--homedir\", s.gpgHome, \"--with-colons\", \"--no-permission-warning\", \"--fingerprint\", \"personal@example.com\").Output()\n\trequire.NoError(t, err)\n\ts.fingerprint, err = findFingerprint(lines)\n\trequire.NoError(t, err)\n}\n\nfunc (s *copySuite) TearDownSuite() {\n\tt := s.T()\n\tif s.registry != nil {\n\t\ts.registry.tearDown()\n\t}\n\tif s.s1OnlyRegistry != nil {\n\t\ts.s1OnlyRegistry.tearDown()\n\t}\n\tif s.s1SupportedRegistry != nil {\n\t\ts.s1SupportedRegistry.tearDown()\n\t}\n\tif s.cluster != nil {\n\t\ts.cluster.tearDown(t)\n\t}\n}\n\n// policyFixture applies the general edits, as well as extraSubstitutions, to the policy.json fixture,\n// and returns a path to a policy, which will be automatically removed when the test completes.\nfunc (s *copySuite) policyFixture(extraSubstitutions map[string]string) string {\n\tt := s.T()\n\tfixtureDir, err := filepath.Abs(\"fixtures\")\n\trequire.NoError(t, err)\n\tedits := map[string]string{\"@keydir@\": s.gpgHome, \"@fixturedir@\": fixtureDir}\n\tmaps.Copy(edits, extraSubstitutions)\n\tpolicyPath := fileFromFixture(t, \"fixtures/policy.json\", edits)\n\treturn policyPath\n}\n\nfunc (s *copySuite) TestCopyWithManifestList() {\n\tt := s.T()\n\tdir := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"dir:\"+dir)\n}\n\nfunc (s *copySuite) TestCopyAllWithManifestList() {\n\tt := s.T()\n\tdir := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--all\", knownListImage, \"dir:\"+dir)\n}\n\nfunc (s *copySuite) TestCopyAllWithManifestListRoundTrip() {\n\tt := s.T()\n\toci1 := t.TempDir()\n\toci2 := t.TempDir()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--multi-arch=all\", knownListImage, \"oci:\"+oci1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"oci:\"+oci1, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"dir:\"+dir1, \"oci:\"+oci2)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"oci:\"+oci2, \"dir:\"+dir2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1, oci2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *copySuite) TestCopyAllWithManifestListConverge() {\n\tt := s.T()\n\toci1 := t.TempDir()\n\toci2 := t.TempDir()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--multi-arch=all\", knownListImage, \"oci:\"+oci1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"oci:\"+oci1, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--multi-arch=all\", \"--format\", \"oci\", knownListImage, \"dir:\"+dir2)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"dir:\"+dir2, \"oci:\"+oci2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1, oci2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *copySuite) TestCopyNoneWithManifestList() {\n\tt := s.T()\n\tdir1 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--multi-arch=index-only\", knownListImage, \"dir:\"+dir1)\n\n\tmanifestPath := filepath.Join(dir1, \"manifest.json\")\n\treadManifest, err := os.ReadFile(manifestPath)\n\trequire.NoError(t, err)\n\tmimeType := manifest.GuessMIMEType(readManifest)\n\tassert.Equal(t, \"application/vnd.docker.distribution.manifest.list.v2+json\", mimeType)\n\tout := combinedOutputOfCommand(t, \"ls\", \"-1\", dir1)\n\tassert.Equal(t, \"manifest.json\\nversion\\n\", out)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListConverge() {\n\tt := s.T()\n\toci1 := t.TempDir()\n\toci2 := t.TempDir()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"oci:\"+oci1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"oci:\"+oci1, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--format\", \"oci\", knownListImage, \"dir:\"+dir2)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--multi-arch=all\", \"dir:\"+dir2, \"oci:\"+oci2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1, oci2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *copySuite) TestCopyAllWithManifestListStorageFails() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tassertSkopeoFails(t, `.*destination transport .* does not support copying multiple images as a group.*`,\n\t\t\"copy\", \"--retry-times\", \"3\", \"--multi-arch=all\", knownListImage, \"containers-storage:\"+storage+\"test\")\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorage() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"containers-storage:\"+storage+\"test\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"containers-storage:\"+storage+\"test\", \"dir:\"+dir2)\n\tdecompressDirs(t, dir1, dir2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageMultiple() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch\", \"amd64\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"containers-storage:\"+storage+\"test\")\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch\", \"arm64\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"containers-storage:\"+storage+\"test\")\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch\", \"arm64\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"containers-storage:\"+storage+\"test\", \"dir:\"+dir2)\n\tdecompressDirs(t, dir1, dir2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListDigest() {\n\tt := s.T()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\toci1 := t.TempDir()\n\toci2 := t.TempDir()\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--multi-arch=all\", knownListImageRepo+\"@\"+digest, \"dir:\"+dir2)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"dir:\"+dir1, \"oci:\"+oci1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"dir:\"+dir2, \"oci:\"+oci2)\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1, oci2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *copySuite) TestCopyWithDigestfileOutput() {\n\tt := s.T()\n\ttempdir := t.TempDir()\n\tdir1 := t.TempDir()\n\tdigestOutPath := filepath.Join(tempdir, \"digest.txt\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--digestfile=\"+digestOutPath, knownListImage, \"dir:\"+dir1)\n\treadDigest, err := os.ReadFile(digestOutPath)\n\trequire.NoError(t, err)\n\t_, err = digest.Parse(string(readDigest))\n\trequire.NoError(t, err)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"containers-storage:\"+storage+\"test@\"+digest, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"dir:\"+dir2)\n\tdecompressDirs(t, dir1, dir2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArches() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"containers-storage:\"+storage+\"test@\"+digest, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"dir:\"+dir2)\n\tdecompressDirs(t, dir1, dir2)\n\tassertDirImagesAreEqual(t, dir1, dir2)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArchesBothUseListDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\t_, err = manifest.ListFromBlob([]byte(m), manifest.GuessMIMEType([]byte(m)))\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=arm64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\ti2 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tvar image2 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i2), &image2)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image2.Architecture)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArchesFirstUsesListDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tlist, err := manifest.ListFromBlob([]byte(m), manifest.GuessMIMEType([]byte(m)))\n\trequire.NoError(t, err)\n\tamd64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"amd64\"})\n\trequire.NoError(t, err)\n\tarm64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"arm64\"})\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=arm64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+arm64Instance.String(), \"containers-storage:\"+storage+\"test@\"+arm64Instance.String())\n\ti1 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tvar image1 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i1), &image1)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image1.Architecture)\n\ti2 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tvar image2 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i2), &image2)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image2.Architecture)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=arm64\", \"inspect\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\ti3 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+arm64Instance.String())\n\tvar image3 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i3), &image3)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image3.Architecture)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArchesSecondUsesListDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tlist, err := manifest.ListFromBlob([]byte(m), manifest.GuessMIMEType([]byte(m)))\n\trequire.NoError(t, err)\n\tamd64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"amd64\"})\n\trequire.NoError(t, err)\n\tarm64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"arm64\"})\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+amd64Instance.String(), \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=arm64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\ti1 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tvar image1 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i1), &image1)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image1.Architecture)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\ti2 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tvar image2 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i2), &image2)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image2.Architecture)\n\ti3 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+arm64Instance.String())\n\tvar image3 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i3), &image3)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image3.Architecture)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArchesThirdUsesListDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tlist, err := manifest.ListFromBlob([]byte(m), manifest.GuessMIMEType([]byte(m)))\n\trequire.NoError(t, err)\n\tamd64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"amd64\"})\n\trequire.NoError(t, err)\n\tarm64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"arm64\"})\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+amd64Instance.String(), \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=arm64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\ti1 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tvar image1 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i1), &image1)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image1.Architecture)\n\ti2 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tvar image2 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i2), &image2)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image2.Architecture)\n\ti3 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+arm64Instance.String())\n\tvar image3 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i3), &image3)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image3.Architecture)\n}\n\nfunc (s *copySuite) TestCopyWithManifestListStorageDigestMultipleArchesTagAndDigest() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tm := combinedOutputOfCommand(t, skopeoBinary, \"inspect\", \"--retry-times\", \"3\", \"--raw\", knownListImage)\n\tmanifestDigest, err := manifest.Digest([]byte(m))\n\trequire.NoError(t, err)\n\tdigest := manifestDigest.String()\n\tlist, err := manifest.ListFromBlob([]byte(m), manifest.GuessMIMEType([]byte(m)))\n\trequire.NoError(t, err)\n\tamd64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"amd64\"})\n\trequire.NoError(t, err)\n\tarm64Instance, err := list.ChooseInstance(&types.SystemContext{ArchitectureChoice: \"arm64\"})\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"containers-storage:\"+storage+\"test:latest\")\n\tassertSkopeoSucceeds(t, \"\", \"--override-arch=arm64\", \"copy\", \"--retry-times\", \"3\", knownListImageRepo+\"@\"+digest, \"containers-storage:\"+storage+\"test@\"+digest)\n\tassertSkopeoFails(t, `.*reading manifest for image instance.*does not exist.*`, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\ti1 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test:latest\")\n\tvar image1 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i1), &image1)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image1.Architecture)\n\ti2 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+amd64Instance.String())\n\tvar image2 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i2), &image2)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image2.Architecture)\n\ti3 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=amd64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test:latest\")\n\tvar image3 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i3), &image3)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"amd64\", image3.Architecture)\n\ti4 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+arm64Instance.String())\n\tvar image4 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i4), &image4)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image4.Architecture)\n\ti5 := combinedOutputOfCommand(t, skopeoBinary, \"--override-arch=arm64\", \"inspect\", \"--config\", \"containers-storage:\"+storage+\"test@\"+digest)\n\tvar image5 imgspecv1.Image\n\terr = json.Unmarshal([]byte(i5), &image5)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"arm64\", image5.Architecture)\n}\n\nfunc (s *copySuite) TestCopyFailsWhenImageOSDoesNotMatchRuntimeOS() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tassertSkopeoFails(t, `.*no image found in manifest list for architecture .*, variant .*, OS .*`, \"copy\", \"--retry-times\", \"3\", knownWindowsOnlyImage, \"containers-storage:\"+storage+\"test\")\n}\n\nfunc (s *copySuite) TestCopySucceedsWhenImageDoesNotMatchRuntimeButWeOverride() {\n\tt := s.T()\n\tstorage := t.TempDir()\n\tstorage = fmt.Sprintf(\"[vfs@%s/root+%s/runroot]\", storage, storage)\n\tassertSkopeoSucceeds(t, \"\", \"--override-os=windows\", \"--override-arch=amd64\", \"copy\", \"--retry-times\", \"3\", knownWindowsOnlyImage,\n\t\t\"containers-storage:\"+storage+\"test\")\n}\n\nfunc (s *copySuite) TestCopySimpleAtomicRegistry() {\n\tt := s.T()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\t// \"pull\": docker: → dir:\n\tassertSkopeoSucceeds(t, \"\", \"copy\", testFQIN64, \"--retry-times\", \"3\", \"dir:\"+dir1)\n\t// \"push\": dir: → atomic:\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"dir:\"+dir1, \"atomic:localhost:5000/myns/unsigned:unsigned\")\n\t// The result of pushing and pulling is an equivalent image, except for schema1 embedded names.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5000/myns/unsigned:unsigned\", \"dir:\"+dir2)\n\tassertSchema1DirImagesAreEqualExceptNames(t, dir1, \"libpod/busybox:amd64\", dir2, \"myns/unsigned:unsigned\")\n}\n\n// The most basic (skopeo copy) use:\nfunc (s *copySuite) TestCopySimple() {\n\tt := s.T()\n\tconst ourRegistry = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\t// \"pull\": docker: → dir:\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://registry.k8s.io/pause\", \"dir:\"+dir1)\n\t// \"push\": dir: → docker(v2s2):\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"dir:\"+dir1, ourRegistry+\"pause:unsigned\")\n\t// The result of pushing and pulling is an unmodified image.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", ourRegistry+\"pause:unsigned\", \"dir:\"+dir2)\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", dir1, dir2)\n\tassert.Equal(t, \"\", out)\n\n\t// docker v2s2 -> OCI image layout with image name\n\t// ociDest will be created by oci: if it doesn't exist\n\t// so don't create it here to exercise auto-creation\n\tociDest := \"pause-latest-image\"\n\tociImgName := \"pause\"\n\tdefer os.RemoveAll(ociDest)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://registry.k8s.io/pause:latest\", \"oci:\"+ociDest+\":\"+ociImgName)\n\t_, err := os.Stat(ociDest)\n\trequire.NoError(t, err)\n\t// copy exits with status 2 if the image is not found within the container, in some transports.\n\tassertSkopeoFailsWithStatus(t, 2, \"copy\", \"oci:\"+ociDest+\":thisdoesnotexist\", \"dir:\"+t.TempDir())\n\n\t// docker v2s2 -> OCI image layout without image name\n\tociDest = \"pause-latest-noimage\"\n\tdefer os.RemoveAll(ociDest)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://registry.k8s.io/pause:latest\", \"oci:\"+ociDest)\n\t_, err = os.Stat(ociDest)\n\trequire.NoError(t, err)\n}\n\nfunc (s *copySuite) TestCopyEncryption() {\n\tt := s.T()\n\toriginalImageDir := t.TempDir()\n\tencryptedImgDir := t.TempDir()\n\tdecryptedImgDir := t.TempDir()\n\tkeysDir := t.TempDir()\n\tundecryptedImgDir := t.TempDir()\n\tmultiLayerImageDir := t.TempDir()\n\tpartiallyEncryptedImgDir := t.TempDir()\n\tpartiallyDecryptedImgDir := t.TempDir()\n\n\t// Create RSA key pair\n\tprivateKey, err := rsa.GenerateKey(rand.Reader, 4096)\n\trequire.NoError(t, err)\n\tpublicKey := &privateKey.PublicKey\n\tprivateKeyBytes := x509.MarshalPKCS1PrivateKey(privateKey)\n\tpublicKeyBytes, err := x509.MarshalPKIXPublicKey(publicKey)\n\trequire.NoError(t, err)\n\terr = os.WriteFile(keysDir+\"/private.key\", privateKeyBytes, 0o644)\n\trequire.NoError(t, err)\n\terr = os.WriteFile(keysDir+\"/public.key\", publicKeyBytes, 0o644)\n\trequire.NoError(t, err)\n\n\t// We can either perform encryption or decryption on the image.\n\t// This is why use should not be able to specify both encryption and decryption\n\t// during copy at the same time.\n\tassertSkopeoFails(t, \".*--encryption-key and --decryption-key cannot be specified together.*\",\n\t\t\"copy\", \"--encryption-key\", \"jwe:\"+keysDir+\"/public.key\", \"--decryption-key\", keysDir+\"/private.key\",\n\t\t\"oci:\"+encryptedImgDir+\":encrypted\", \"oci:\"+decryptedImgDir+\":decrypted\")\n\tassertSkopeoFails(t, \".*--encryption-key and --decryption-key cannot be specified together.*\",\n\t\t\"copy\", \"--decryption-key\", keysDir+\"/private.key\", \"--encryption-key\", \"jwe:\"+keysDir+\"/public.key\",\n\t\t\"oci:\"+encryptedImgDir+\":encrypted\", \"oci:\"+decryptedImgDir+\":decrypted\")\n\n\t// Copy a standard busybox image locally\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN+\":1.30.1\", \"oci:\"+originalImageDir+\":latest\")\n\n\t// Encrypt the image\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--encryption-key\",\n\t\t\"jwe:\"+keysDir+\"/public.key\", \"oci:\"+originalImageDir+\":latest\", \"oci:\"+encryptedImgDir+\":encrypted\")\n\n\t// An attempt to decrypt an encrypted image without a valid private key should fail\n\tinvalidPrivateKey, err := rsa.GenerateKey(rand.Reader, 4096)\n\trequire.NoError(t, err)\n\tinvalidPrivateKeyBytes := x509.MarshalPKCS1PrivateKey(invalidPrivateKey)\n\terr = os.WriteFile(keysDir+\"/invalid_private.key\", invalidPrivateKeyBytes, 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoFails(t, \".*no suitable key unwrapper found or none of the private keys could be used for decryption.*\",\n\t\t\"copy\", \"--decryption-key\", keysDir+\"/invalid_private.key\",\n\t\t\"oci:\"+encryptedImgDir+\":encrypted\", \"oci:\"+decryptedImgDir+\":decrypted\")\n\n\t// Copy encrypted image without decrypting it\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"oci:\"+encryptedImgDir+\":encrypted\", \"oci:\"+undecryptedImgDir+\":encrypted\")\n\t// Original busybox image has gzipped layers. But encrypted busybox layers should\n\t// not be of gzip type\n\tmatchLayerBlobBinaryType(t, undecryptedImgDir+\"/blobs/sha256\", \"application/x-gzip\", 0)\n\n\t// Decrypt the image\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--decryption-key\", keysDir+\"/private.key\",\n\t\t\"oci:\"+undecryptedImgDir+\":encrypted\", \"oci:\"+decryptedImgDir+\":decrypted\")\n\n\t// After successful decryption we should find the gzipped layer from the\n\t// busybox image\n\tmatchLayerBlobBinaryType(t, decryptedImgDir+\"/blobs/sha256\", \"application/x-gzip\", 1)\n\n\t// Copy a standard multi layer nginx image locally\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQINMultiLayer, \"oci:\"+multiLayerImageDir+\":latest\")\n\n\t// Partially encrypt the image\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--encryption-key\", \"jwe:\"+keysDir+\"/public.key\",\n\t\t\"--encrypt-layer\", \"1\", \"oci:\"+multiLayerImageDir+\":latest\", \"oci:\"+partiallyEncryptedImgDir+\":encrypted\")\n\n\t// Since the image is partially encrypted we should find layers that aren't encrypted\n\tmatchLayerBlobBinaryType(t, partiallyEncryptedImgDir+\"/blobs/sha256\", \"application/x-gzip\", 2)\n\n\t// Decrypt the partially encrypted image\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--decryption-key\", keysDir+\"/private.key\",\n\t\t\"oci:\"+partiallyEncryptedImgDir+\":encrypted\", \"oci:\"+partiallyDecryptedImgDir+\":decrypted\")\n\n\t// After successful decryption we should find the gzipped layers from the nginx image\n\tmatchLayerBlobBinaryType(t, partiallyDecryptedImgDir+\"/blobs/sha256\", \"application/x-gzip\", 3)\n}\n\nfunc matchLayerBlobBinaryType(t *testing.T, ociImageDirPath string, contentType string, matchCount int) {\n\tfiles, err := os.ReadDir(ociImageDirPath)\n\trequire.NoError(t, err)\n\n\tfoundCount := 0\n\tfor _, f := range files {\n\t\tfileContent, err := os.Open(ociImageDirPath + \"/\" + f.Name())\n\t\trequire.NoError(t, err)\n\t\tlayerContentType, err := getFileContentType(fileContent)\n\t\trequire.NoError(t, err)\n\n\t\tif layerContentType == contentType {\n\t\t\tfoundCount++\n\t\t}\n\t}\n\n\tassert.Equal(t, matchCount, foundCount)\n}\n\nfunc getFileContentType(out *os.File) (string, error) {\n\tbuffer := make([]byte, 512)\n\tif _, err := out.Read(buffer); err != nil {\n\t\treturn \"\", err\n\t}\n\tcontentType := http.DetectContentType(buffer)\n\n\treturn contentType, nil\n}\n\n// Check whether dir: images in dir1 and dir2 are equal, ignoring schema1 signatures.\nfunc assertDirImagesAreEqual(t *testing.T, dir1, dir2 string) {\n\t// The manifests may have different JWS signatures; so, compare the manifests by digests, which\n\t// strips the signatures.\n\tdigests := []digest.Digest{}\n\tfor _, dir := range []string{dir1, dir2} {\n\t\tmanifestPath := filepath.Join(dir, \"manifest.json\")\n\t\tm, err := os.ReadFile(manifestPath)\n\t\trequire.NoError(t, err)\n\t\tdigest, err := manifest.Digest(m)\n\t\trequire.NoError(t, err)\n\t\tdigests = append(digests, digest)\n\t}\n\tassert.Equal(t, digests[1], digests[0])\n\t// Then compare the rest file by file.\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", \"-x\", \"manifest.json\", dir1, dir2)\n\tassert.Equal(t, \"\", out)\n}\n\n// Check whether schema1 dir: images in dir1 and dir2 are equal, ignoring schema1 signatures and the embedded path/tag values, which should have the expected values.\nfunc assertSchema1DirImagesAreEqualExceptNames(t *testing.T, dir1, ref1, dir2, ref2 string) {\n\t// The manifests may have different JWS signatures and names; so, unmarshal and delete these elements.\n\tmanifests := []map[string]any{}\n\tfor dir, ref := range map[string]string{dir1: ref1, dir2: ref2} {\n\t\tmanifestPath := filepath.Join(dir, \"manifest.json\")\n\t\tm, err := os.ReadFile(manifestPath)\n\t\trequire.NoError(t, err)\n\t\tdata := map[string]any{}\n\t\terr = json.Unmarshal(m, &data)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, float64(1), data[\"schemaVersion\"])\n\t\tcolon := strings.LastIndex(ref, \":\")\n\t\trequire.NotEqual(t, -1, colon)\n\t\tassert.Equal(t, ref[:colon], data[\"name\"])\n\t\tassert.Equal(t, ref[colon+1:], data[\"tag\"])\n\t\tfor _, key := range []string{\"signatures\", \"name\", \"tag\"} {\n\t\t\tdelete(data, key)\n\t\t}\n\t\tmanifests = append(manifests, data)\n\t}\n\tassert.Equal(t, manifests[0], manifests[1])\n\t// Then compare the rest file by file.\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", \"-x\", \"manifest.json\", dir1, dir2)\n\tassert.Equal(t, \"\", out)\n}\n\n// Streaming (skopeo copy)\nfunc (s *copySuite) TestCopyStreaming() {\n\tt := s.T()\n\tdir1 := t.TempDir()\n\tdir2 := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\t// streaming: docker: → atomic:\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN64, \"atomic:localhost:5000/myns/unsigned:streaming\")\n\t// Compare (copies of) the original and the copy:\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQIN64, \"dir:\"+dir1)\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5000/myns/unsigned:streaming\", \"dir:\"+dir2)\n\tassertSchema1DirImagesAreEqualExceptNames(t, dir1, \"libpod/busybox:amd64\", dir2, \"myns/unsigned:streaming\")\n\t// FIXME: Also check pushing to docker://\n}\n\n// OCI round-trip testing. It's very important to make sure that OCI <-> Docker\n// conversion works (while skopeo handles many things, one of the most obvious\n// benefits of a tool like skopeo is that you can use OCI tooling to create an\n// image and then as the final step convert the image to a non-standard format\n// like Docker). But this only works if we _test_ it.\nfunc (s *copySuite) TestCopyOCIRoundTrip() {\n\tt := s.T()\n\tconst ourRegistry = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\toci1 := t.TempDir()\n\toci2 := t.TempDir()\n\n\t// Docker -> OCI\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN, \"oci:\"+oci1+\":latest\")\n\t// OCI -> Docker\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"oci:\"+oci1+\":latest\", ourRegistry+\"original/busybox:oci_copy\")\n\t// Docker -> OCI\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", ourRegistry+\"original/busybox:oci_copy\", \"oci:\"+oci2+\":latest\")\n\t// OCI -> Docker\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--debug\", \"copy\", \"oci:\"+oci2+\":latest\", ourRegistry+\"original/busybox:oci_copy2\")\n\n\t// TODO: Add some more tags to output to and check those work properly.\n\n\t// First, make sure the OCI blobs are the same. This should _always_ be true.\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1+\"/blobs\", oci2+\"/blobs\")\n\tassert.Equal(t, \"\", out)\n\n\t// For some silly reason we pass a logger to the OCI library here...\n\tlogger := log.New(os.Stderr, \"\", 0)\n\n\t// Verify using the upstream OCI image validator, this should catch most\n\t// non-compliance errors. DO NOT REMOVE THIS TEST UNLESS IT'S ABSOLUTELY\n\t// NECESSARY.\n\terr := image.ValidateLayout(oci1, nil, logger)\n\trequire.NoError(t, err)\n\terr = image.ValidateLayout(oci2, nil, logger)\n\trequire.NoError(t, err)\n\n\t// Now verify that everything is identical. Currently this is true, but\n\t// because we recompute the manifests on-the-fly this doesn't necessarily\n\t// always have to be true (but if this breaks in the future __PLEASE__ make\n\t// sure that the breakage actually makes sense before removing this check).\n\tout = combinedOutputOfCommand(t, \"diff\", \"-urN\", oci1, oci2)\n\tassert.Equal(t, \"\", out)\n}\n\n// --sign-by and --policy copy, primarily using atomic:\nfunc (s *copySuite) TestCopySignatures() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that verification and policy enforcement works, using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\tdir := t.TempDir()\n\tdirDest := \"dir:\" + dir\n\n\tpolicy := s.policyFixture(nil)\n\n\t// type: reject\n\tassertSkopeoFails(t, fmt.Sprintf(\".*Source image rejected: Running image %s:latest is rejected by policy.*\", testFQIN),\n\t\t\"--policy\", policy, \"copy\", \"--retry-times\", \"3\", testFQIN+\":latest\", dirDest)\n\n\t// type: insecureAcceptAnything\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"copy\", \"--retry-times\", \"3\", \"docker://quay.io/openshift/origin-hello-openshift\", dirDest)\n\n\t// type: signedBy\n\t// Sign the images\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--retry-times\", \"3\", \"--sign-by\", \"personal@example.com\",\n\t\ttestFQIN+\":1.26\", \"atomic:localhost:5006/myns/personal:personal\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--retry-times\", \"3\", \"--sign-by\", \"official@example.com\",\n\t\ttestFQIN+\":1.26.1\", \"atomic:localhost:5006/myns/official:official\")\n\t// Verify that we can pull them\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/personal:personal\", dirDest)\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/official:official\", dirDest)\n\t// Verify that mis-signed images are rejected\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5006/myns/personal:personal\", \"atomic:localhost:5006/myns/official:attack\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5006/myns/official:official\", \"atomic:localhost:5006/myns/personal:attack\")\n\t// \"Invalid GPG signature\" is reported by the gpgme mechanism; \"Missing key: $fingerprint\" or \"Missing key $fingerprint\" by Sequoia.\n\tassertSkopeoFails(t, \".*Source image rejected: (Invalid GPG signature|Missing key).*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/personal:attack\", dirDest)\n\tassertSkopeoFails(t, \".*Source image rejected: (Invalid GPG signature|Missing key).*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/official:attack\", dirDest)\n\n\t// Verify that signed identity is verified.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5006/myns/official:official\", \"atomic:localhost:5006/myns/naming:test1\")\n\tassertSkopeoFails(t, `.*Source image rejected: Signature for identity \\\\\"localhost:5006/myns/official:official\\\\\" is not accepted.*`,\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/naming:test1\", dirDest)\n\t// signedIdentity works\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5006/myns/official:official\", \"atomic:localhost:5006/myns/naming:naming\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/naming:naming\", dirDest)\n\n\t// Verify that cosigning requirements are enforced\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5006/myns/official:official\", \"atomic:localhost:5006/myns/cosigned:cosigned\")\n\t// \"Invalid GPG signature\" is reported by the gpgme mechanism; \"Missing key: $fingerprint\" or \"Missing key $fingerprint\" by Sequoia.\n\tassertSkopeoFails(t, \".*Source image rejected: (Invalid GPG signature|Missing key).*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/cosigned:cosigned\", dirDest)\n\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--sign-by\", \"personal@example.com\", \"atomic:localhost:5006/myns/official:official\", \"atomic:localhost:5006/myns/cosigned:cosigned\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"atomic:localhost:5006/myns/cosigned:cosigned\", dirDest)\n}\n\n// --policy copy for dir: sources\nfunc (s *copySuite) TestCopyDirSignatures() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that verification and policy enforcement works, using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\ttopDir := t.TempDir()\n\ttopDirDest := \"dir:\" + topDir\n\n\tfor _, suffix := range []string{\"/dir1\", \"/dir2\", \"/restricted/personal\", \"/restricted/official\", \"/restricted/badidentity\", \"/dest\"} {\n\t\terr := os.MkdirAll(topDir+suffix, 0o755)\n\t\trequire.NoError(t, err)\n\t}\n\n\t// Note the \"/@dirpath@\": The value starts with a slash so that it is not rejected in other tests which do not replace it,\n\t// but we must ensure that the result is a canonical path, not something starting with a \"//\".\n\tpolicy := s.policyFixture(map[string]string{\"/@dirpath@\": topDir + \"/restricted\"})\n\n\t// Get some images.\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQIN+\":armfh\", topDirDest+\"/dir1\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQIN+\":s390x\", topDirDest+\"/dir2\")\n\n\t// Sign the images. By coping from a topDirDest/dirN, also test that non-/restricted paths\n\t// use the dir:\"\" default of insecureAcceptAnything.\n\t// (For signing, we must push to atomic: to get a Docker identity to use in the signature.)\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"--sign-by\", \"personal@example.com\", topDirDest+\"/dir1\", \"atomic:localhost:5000/myns/personal:dirstaging\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"--sign-by\", \"official@example.com\", topDirDest+\"/dir2\", \"atomic:localhost:5000/myns/official:dirstaging\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5000/myns/personal:dirstaging\", topDirDest+\"/restricted/personal\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5000/myns/official:dirstaging\", topDirDest+\"/restricted/official\")\n\n\t// type: signedBy, with a signedIdentity override (necessary because dir: identities can't be signed)\n\t// Verify that correct images are accepted\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"copy\", topDirDest+\"/restricted/official\", topDirDest+\"/dest\")\n\t// ... and that mis-signed images are rejected.\n\t// \"Invalid GPG signature\" is reported by the gpgme mechanism; \"Missing key: $fingerprint\" or \"Missing key $fingerprint\" by Sequoia.\n\tassertSkopeoFails(t, \".*Source image rejected: (Invalid GPG signature|Missing key).*\",\n\t\t\"--policy\", policy, \"copy\", topDirDest+\"/restricted/personal\", topDirDest+\"/dest\")\n\n\t// Verify that the signed identity is verified.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"copy\", \"--sign-by\", \"official@example.com\", topDirDest+\"/dir1\", \"atomic:localhost:5000/myns/personal:dirstaging2\")\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"atomic:localhost:5000/myns/personal:dirstaging2\", topDirDest+\"/restricted/badidentity\")\n\tassertSkopeoFails(t, `.*Source image rejected: .*Signature for identity \\\\\"localhost:5000/myns/personal:dirstaging2\\\\\" is not accepted.*`,\n\t\t\"--policy\", policy, \"copy\", topDirDest+\"/restricted/badidentity\", topDirDest+\"/dest\")\n}\n\nfunc (s *copySuite) TestCopySequoiaSignatures() {\n\tt := s.T()\n\tsigner, err := simplesequoia.NewSigner(simplesequoia.WithSequoiaHome(testSequoiaHome), simplesequoia.WithKeyFingerprint(testSequoiaKeyFingerprint))\n\tif err != nil {\n\t\tt.Skipf(\"Sequoia not supported: %v\", err)\n\t}\n\tsigner.Close()\n\n\tconst ourRegistry = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\tdirDest := \"dir:\" + t.TempDir()\n\n\tpolicy := s.policyFixture(nil)\n\tregistriesDir := t.TempDir()\n\tregistriesFile := fileFromFixture(t, \"fixtures/registries.yaml\",\n\t\tmap[string]string{\"@lookaside@\": t.TempDir(), \"@split-staging@\": \"/var/empty\", \"@split-read@\": \"file://var/empty\"})\n\terr = os.Symlink(registriesFile, filepath.Join(registriesDir, \"registries.yaml\"))\n\trequire.NoError(t, err)\n\n\t// Sign the images\n\tabsSequoiaHome, err := filepath.Abs(testSequoiaHome)\n\trequire.NoError(t, err)\n\tt.Setenv(\"SEQUOIA_HOME\", absSequoiaHome)\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--dest-tls-verify=false\", \"--sign-by-sq-fingerprint\", testSequoiaKeyFingerprint,\n\t\ttestFQIN+\":1.26\", ourRegistry+\"sequoia-no-passphrase\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--dest-tls-verify=false\", \"--sign-by-sq-fingerprint\", testSequoiaKeyFingerprintWithPassphrase,\n\t\t\"--sign-passphrase-file\", filepath.Join(absSequoiaHome, \"with-passphrase.passphrase\"),\n\t\ttestFQIN+\":1.26.1\", ourRegistry+\"sequoia-with-passphrase\")\n\t// Verify that we can pull them\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"copy\", \"--src-tls-verify=false\", ourRegistry+\"sequoia-no-passphrase\", dirDest)\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"copy\", \"--src-tls-verify=false\", ourRegistry+\"sequoia-with-passphrase\", dirDest)\n}\n\n// Compression during copy\nfunc (s *copySuite) TestCopyCompression() {\n\tt := s.T()\n\tconst uncompresssedLayerFile = \"160d823fdc48e62f97ba62df31e55424f8f5eb6b679c865eec6e59adfe304710\"\n\n\ttopDir := t.TempDir()\n\n\tfor i, c := range []struct{ fixture, remote string }{\n\t\t{\"uncompressed-image-s1\", \"docker://\" + v2s1SupportedDockerRegistryURL + \"/compression/compression:s1\"},\n\t\t{\"uncompressed-image-s2\", \"docker://\" + v2DockerRegistryURL + \"/compression/compression:s2\"},\n\t\t{\"uncompressed-image-s1\", \"atomic:localhost:5000/myns/compression:s1\"},\n\t\t{\"uncompressed-image-s2\", \"atomic:localhost:5000/myns/compression:s2\"},\n\t} {\n\t\tdir := filepath.Join(topDir, fmt.Sprintf(\"case%d\", i))\n\t\terr := os.MkdirAll(dir, 0o755)\n\t\trequire.NoError(t, err)\n\n\t\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"dir:fixtures/\"+c.fixture, c.remote)\n\t\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", c.remote, \"dir:\"+dir)\n\n\t\t// The original directory contained an uncompressed file, the copy after pushing and pulling doesn't (we use a different name for the compressed file).\n\t\t_, err = os.Lstat(filepath.Join(\"fixtures\", c.fixture, uncompresssedLayerFile))\n\t\trequire.NoError(t, err)\n\t\t_, err = os.Lstat(filepath.Join(dir, uncompresssedLayerFile))\n\t\trequire.Error(t, err)\n\t\tassert.True(t, os.IsNotExist(err))\n\n\t\t// All pulled layers are smaller than the uncompressed size of uncompresssedLayerFile. (Note that this includes the manifest in s2, but that works out OK).\n\t\tdirf, err := os.Open(dir)\n\t\trequire.NoError(t, err)\n\t\tfis, err := dirf.Readdir(-1)\n\t\trequire.NoError(t, err)\n\t\tfor _, fi := range fis {\n\t\t\tassert.Less(t, fi.Size(), int64(2048))\n\t\t}\n\t}\n}\n\nfunc findRegularFiles(t *testing.T, root string) []string {\n\tresult := []string{}\n\terr := filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif d.Type().IsRegular() {\n\t\t\tresult = append(result, path)\n\t\t}\n\t\treturn nil\n\t})\n\trequire.NoError(t, err)\n\treturn result\n}\n\n// --sign-by and policy use for docker: with lookaside\nfunc (s *copySuite) TestCopyDockerLookaside() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that verification and policy enforcement works, using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\tconst ourRegistry = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\ttmpDir := t.TempDir()\n\tcopyDest := filepath.Join(tmpDir, \"dest\")\n\terr = os.Mkdir(copyDest, 0o755)\n\trequire.NoError(t, err)\n\tdirDest := \"dir:\" + copyDest\n\tplainLookaside := filepath.Join(tmpDir, \"lookaside\")\n\tsplitLookasideStaging := filepath.Join(tmpDir, \"lookaside-staging\")\n\n\tsplitLookasideReadServerHandler := http.NotFoundHandler()\n\tsplitLookasideReadServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tsplitLookasideReadServerHandler.ServeHTTP(w, r)\n\t}))\n\tdefer splitLookasideReadServer.Close()\n\n\tpolicy := s.policyFixture(nil)\n\tregistriesDir := filepath.Join(tmpDir, \"registries.d\")\n\terr = os.Mkdir(registriesDir, 0o755)\n\trequire.NoError(t, err)\n\tregistriesFile := fileFromFixture(t, \"fixtures/registries.yaml\",\n\t\tmap[string]string{\"@lookaside@\": plainLookaside, \"@split-staging@\": splitLookasideStaging, \"@split-read@\": splitLookasideReadServer.URL})\n\terr = os.Symlink(registriesFile, filepath.Join(registriesDir, \"registries.yaml\"))\n\trequire.NoError(t, err)\n\n\t// Get an image to work with.  Also verifies that we can use Docker repositories with no lookaside configured.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir, \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN, ourRegistry+\"original/busybox\")\n\t// Pulling an unsigned image fails.\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir, \"copy\", ourRegistry+\"original/busybox\", dirDest)\n\n\t// Signing with lookaside defined succeeds,\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir, \"copy\", \"--sign-by\", \"personal@example.com\", ourRegistry+\"original/busybox\", ourRegistry+\"signed/busybox\")\n\t// a signature file has been created,\n\tfoundFiles := findRegularFiles(t, plainLookaside)\n\tassert.Len(t, foundFiles, 1)\n\t// and pulling a signed image succeeds.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir, \"copy\", ourRegistry+\"signed/busybox\", dirDest)\n\n\t// Deleting the image succeeds,\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir, \"delete\", ourRegistry+\"signed/busybox\")\n\t// and the signature file has been deleted (but we leave the directories around).\n\tfoundFiles = findRegularFiles(t, plainLookaside)\n\tassert.Len(t, foundFiles, 0)\n\n\t// Signing with a read/write lookaside split succeeds,\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir, \"copy\", \"--sign-by\", \"personal@example.com\", ourRegistry+\"original/busybox\", ourRegistry+\"public/busybox\")\n\t// and a signature file has been created.\n\tfoundFiles = findRegularFiles(t, splitLookasideStaging)\n\tassert.Len(t, foundFiles, 1)\n\t// Pulling the image fails because the read lookaside URL has not been populated:\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir, \"copy\", ourRegistry+\"public/busybox\", dirDest)\n\t// Pulling the image succeeds after the read lookaside URL is available:\n\tsplitLookasideReadServerHandler = http.FileServer(http.Dir(splitLookasideStaging))\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir, \"copy\", ourRegistry+\"public/busybox\", dirDest)\n}\n\n// atomic: and docker: X-Registry-Supports-Signatures works and interoperates\nfunc (s *copySuite) TestCopyAtomicExtension() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that the reading/writing works using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\ttopDir := t.TempDir()\n\tfor _, subdir := range []string{\"dirAA\", \"dirAD\", \"dirDA\", \"dirDD\", \"registries.d\"} {\n\t\terr := os.MkdirAll(filepath.Join(topDir, subdir), 0o755)\n\t\trequire.NoError(t, err)\n\t}\n\tregistriesDir := filepath.Join(topDir, \"registries.d\")\n\tdirDest := \"dir:\" + topDir\n\tpolicy := s.policyFixture(nil)\n\n\t// Get an image to work with to an atomic: destination.  Also verifies that we can use Docker repositories without X-Registry-Supports-Signatures\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir, \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN, \"atomic:localhost:5000/myns/extension:unsigned\")\n\t// Pulling an unsigned image using atomic: fails.\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy,\n\t\t\"copy\", \"atomic:localhost:5000/myns/extension:unsigned\", dirDest+\"/dirAA\")\n\t// The same when pulling using docker:\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir,\n\t\t\"copy\", \"docker://localhost:5000/myns/extension:unsigned\", dirDest+\"/dirAD\")\n\n\t// Sign the image using atomic:\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\",\n\t\t\"copy\", \"--sign-by\", \"personal@example.com\", \"atomic:localhost:5000/myns/extension:unsigned\", \"atomic:localhost:5000/myns/extension:atomic\")\n\t// Pulling the image using atomic: now succeeds.\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy,\n\t\t\"copy\", \"atomic:localhost:5000/myns/extension:atomic\", dirDest+\"/dirAA\")\n\t// The same when pulling using docker:\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir,\n\t\t\"copy\", \"docker://localhost:5000/myns/extension:atomic\", dirDest+\"/dirAD\")\n\t// Both access methods result in the same data.\n\tassertDirImagesAreEqual(t, filepath.Join(topDir, \"dirAA\"), filepath.Join(topDir, \"dirAD\"))\n\n\t// Get another image (different so that they don't share signatures, and sign it using docker://)\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"--registries.d\", registriesDir,\n\t\t\"copy\", \"--retry-times\", \"3\", \"--sign-by\", \"personal@example.com\",\n\t\ttestFQIN+\":ppc64le\", \"docker://localhost:5000/myns/extension:extension\")\n\tt.Logf(\"%s\", combinedOutputOfCommand(t, \"oc\", \"get\", \"istag\", \"extension:extension\", \"-o\", \"json\"))\n\t// Pulling the image using atomic: succeeds.\n\tassertSkopeoSucceeds(t, \"\", \"--debug\", \"--tls-verify=false\", \"--policy\", policy,\n\t\t\"copy\", \"atomic:localhost:5000/myns/extension:extension\", dirDest+\"/dirDA\")\n\t// The same when pulling using docker:\n\tassertSkopeoSucceeds(t, \"\", \"--debug\", \"--tls-verify=false\", \"--policy\", policy, \"--registries.d\", registriesDir,\n\t\t\"copy\", \"docker://localhost:5000/myns/extension:extension\", dirDest+\"/dirDD\")\n\t// Both access methods result in the same data.\n\tassertDirImagesAreEqual(t, filepath.Join(topDir, \"dirDA\"), filepath.Join(topDir, \"dirDD\"))\n}\n\n// Both mirroring support in registries.conf, and mirrored remapIdentity support in policy.json\nfunc (s *copySuite) TestCopyVerifyingMirroredSignatures() {\n\tt := s.T()\n\tconst regPrefix = \"docker://localhost:5006/myns/mirroring-\"\n\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that verification and policy enforcement works, using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\ttopDir := t.TempDir()\n\tregistriesDir := filepath.Join(topDir, \"registries.d\") // An empty directory to disable lookaside use\n\tdirDest := \"dir:\" + filepath.Join(topDir, \"unused-dest\")\n\n\tpolicy := s.policyFixture(nil)\n\n\t// We use X-R-S-S for this testing to avoid having to deal with the lookasides.\n\t// A downside is that OpenShift records signatures per image, so the error messages below\n\t// list all signatures for other tags used for the same image as well.\n\t// So, make sure to never create a signature that could be considered valid in a different part of the test (i.e. don't reuse tags).\n\n\t// Get an image to work with.\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--dest-tls-verify=false\",\n\t\ttestFQIN, regPrefix+\"primary:unsigned\")\n\t// Verify that unsigned images are rejected\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:unsigned\", dirDest)\n\t// Sign the image for the primary location\n\tassertSkopeoSucceeds(t, \"\", \"--registries.d\", registriesDir, \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", \"--sign-by\", \"personal@example.com\", regPrefix+\"primary:unsigned\", regPrefix+\"primary:direct\")\n\t// Verify that a correctly signed image in the primary location is usable.\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:direct\", dirDest)\n\n\t// Sign the image for the mirror\n\tassertSkopeoSucceeds(t, \"\", \"--registries.d\", registriesDir, \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", \"--sign-by\", \"personal@example.com\", regPrefix+\"primary:unsigned\", regPrefix+\"mirror:mirror-signed\")\n\t// Verify that a correctly signed image for the mirror is accessible using the mirror's reference\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"mirror:mirror-signed\", dirDest)\n\t// … but verify that while it is accessible using the primary location redirecting to the mirror, …\n\tassertSkopeoSucceeds(t, \"\" /* no --policy */, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:mirror-signed\", dirDest)\n\t// … verify it is NOT accessible when requiring a signature.\n\tassertSkopeoFails(t, `.*Source image rejected: None of the signatures were accepted, reasons: Signature for identity \\\\\"localhost:5006/myns/mirroring-primary:direct\\\\\" is not accepted; Signature for identity \\\\\"localhost:5006/myns/mirroring-mirror:mirror-signed\\\\\" is not accepted.*`,\n\t\t\"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:mirror-signed\", dirDest)\n\n\t// Fail if we specify an unqualified identity\n\tassertSkopeoFails(t, \".*Could not parse --sign-identity: repository name must be canonical.*\",\n\t\t\"--registries.d\", registriesDir, \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", \"--sign-by=personal@example.com\", \"--sign-identity=this-is-not-fully-specified\", regPrefix+\"primary:unsigned\", regPrefix+\"mirror:primary-signed\")\n\n\t// Create a signature for mirroring-primary:primary-signed without pushing there.\n\tassertSkopeoSucceeds(t, \"\", \"--registries.d\", registriesDir, \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", \"--sign-by=personal@example.com\", \"--sign-identity=localhost:5006/myns/mirroring-primary:primary-signed\", regPrefix+\"primary:unsigned\", regPrefix+\"mirror:primary-signed\")\n\t// Verify that a correctly signed image for the primary is accessible using the primary's reference\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:primary-signed\", dirDest)\n\t// … but verify that while it is accessible using the mirror location\n\tassertSkopeoSucceeds(t, \"\" /* no --policy */, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"mirror:primary-signed\", dirDest)\n\t// … verify it is NOT accessible when requiring a signature.\n\tassertSkopeoFails(t, `.*Source image rejected: None of the signatures were accepted, reasons: Signature for identity \\\\\"localhost:5006/myns/mirroring-primary:direct\\\\\" is not accepted; Signature for identity \\\\\"localhost:5006/myns/mirroring-mirror:mirror-signed\\\\\" is not accepted; Signature for identity \\\\\"localhost:5006/myns/mirroring-primary:primary-signed\\\\\" is not accepted.*`,\n\t\t\"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"mirror:primary-signed\", dirDest)\n\n\tassertSkopeoSucceeds(t, \"\", \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", regPrefix+\"primary:unsigned\", regPrefix+\"remap:remapped\")\n\t// Verify that while a remapIdentity image is accessible using the remapped (mirror) location\n\tassertSkopeoSucceeds(t, \"\" /* no --policy */, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"remap:remapped\", dirDest)\n\t// … it is NOT accessible when requiring a signature …\n\tassertSkopeoFails(t, `.*Source image rejected: None of the signatures were accepted, reasons: Signature for identity \\\\\"localhost:5006/myns/mirroring-primary:direct\\\\\" is not accepted; Signature for identity \\\\\"localhost:5006/myns/mirroring-mirror:mirror-signed\\\\\" is not accepted; Signature for identity \\\\\"localhost:5006/myns/mirroring-primary:primary-signed\\\\\" is not accepted.*`, \"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"remap:remapped\", dirDest)\n\t// … until signed.\n\tassertSkopeoSucceeds(t, \"\", \"--registries.d\", registriesDir, \"copy\", \"--src-tls-verify=false\", \"--dest-tls-verify=false\", \"--sign-by=personal@example.com\", \"--sign-identity=localhost:5006/myns/mirroring-primary:remapped\", regPrefix+\"remap:remapped\", regPrefix+\"remap:remapped\")\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"remap:remapped\", dirDest)\n\t// To be extra clear about the semantics, verify that the signedPrefix (primary) location never exists\n\t// and only the remapped prefix (mirror) is accessed.\n\tassertSkopeoFails(t, \".*initializing source docker://localhost:5006/myns/mirroring-primary:remapped:.*manifest unknown.*\",\n\t\t\"--policy\", policy, \"--registries.d\", registriesDir, \"--registries-conf\", \"fixtures/registries.conf\", \"copy\", \"--src-tls-verify=false\", regPrefix+\"primary:remapped\", dirDest)\n}\n\nfunc (s *skopeoSuite) TestCopySrcWithAuth() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--retry-times\", \"3\", \"--dest-creds=testuser:testpassword\",\n\t\ttestFQIN, fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url))\n\tdir1 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--src-creds=testuser:testpassword\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url), \"dir:\"+dir1)\n}\n\nfunc (s *skopeoSuite) TestCopyDestWithAuth() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--retry-times\", \"3\", \"--dest-creds=testuser:testpassword\",\n\t\ttestFQIN, fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url))\n}\n\nfunc (s *skopeoSuite) TestCopySrcAndDestWithAuth() {\n\tt := s.T()\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--retry-times\", \"3\", \"--dest-creds=testuser:testpassword\",\n\t\ttestFQIN, fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url))\n\tassertSkopeoSucceeds(t, \"\", \"--tls-verify=false\", \"copy\", \"--src-creds=testuser:testpassword\", \"--dest-creds=testuser:testpassword\", fmt.Sprintf(\"docker://%s/busybox:latest\", s.regV2WithAuth.url), fmt.Sprintf(\"docker://%s/test:auth\", s.regV2WithAuth.url))\n}\n\nfunc (s *copySuite) TestCopyNoPanicOnHTTPResponseWithoutTLSVerifyFalse() {\n\tt := s.T()\n\ttopDir := t.TempDir()\n\n\tconst ourRegistry = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\tassertSkopeoFails(t, \".*server gave HTTP response to HTTPS client.*\",\n\t\t\"copy\", ourRegistry+\"foobar\", \"dir:\"+topDir)\n}\n\nfunc (s *copySuite) TestCopySchemaConversion() {\n\tt := s.T()\n\t// Test conversion / schema autodetection both for the OpenShift embedded registry…\n\ts.testCopySchemaConversionRegistries(t, \"docker://localhost:5005/myns/schema1\", \"docker://localhost:5006/myns/schema2\")\n\t// … and for various docker/distribution registry versions.\n\ts.testCopySchemaConversionRegistries(t, \"docker://\"+v2s1OnlyDockerRegistryURL+\"/schema1\", \"docker://\"+v2s1SupportedDockerRegistryURL+\"/schema2\")\n}\n\nfunc (s *copySuite) TestCopyManifestConversion() {\n\tt := s.T()\n\ttopDir := t.TempDir()\n\tsrcDir := filepath.Join(topDir, \"source\")\n\tdestDir1 := filepath.Join(topDir, \"dest1\")\n\tdestDir2 := filepath.Join(topDir, \"dest2\")\n\n\t// oci to v2s1 and vice-versa not supported yet\n\t// get v2s2 manifest type\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQIN, \"dir:\"+srcDir)\n\tverifyManifestMIMEType(t, srcDir, manifest.DockerV2Schema2MediaType)\n\t// convert from v2s2 to oci\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--format=oci\", \"dir:\"+srcDir, \"dir:\"+destDir1)\n\tverifyManifestMIMEType(t, destDir1, imgspecv1.MediaTypeImageManifest)\n\t// convert from oci to v2s2\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--format=v2s2\", \"dir:\"+destDir1, \"dir:\"+destDir2)\n\tverifyManifestMIMEType(t, destDir2, manifest.DockerV2Schema2MediaType)\n\t// convert from v2s2 to v2s1\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--format=v2s1\", \"dir:\"+srcDir, \"dir:\"+destDir1)\n\tverifyManifestMIMEType(t, destDir1, manifest.DockerV2Schema1SignedMediaType)\n\t// convert from v2s1 to v2s2\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--format=v2s2\", \"dir:\"+destDir1, \"dir:\"+destDir2)\n\tverifyManifestMIMEType(t, destDir2, manifest.DockerV2Schema2MediaType)\n}\n\nfunc (s *copySuite) TestCopyPreserveDigests() {\n\tt := s.T()\n\ttopDir := t.TempDir()\n\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"--multi-arch=all\", \"--preserve-digests\", \"dir:\"+topDir)\n\tassertSkopeoFails(t, \".*Instructed to preserve digests.*\", \"copy\", \"--retry-times\", \"3\", knownListImage, \"--multi-arch=all\", \"--preserve-digests\", \"--format=oci\", \"dir:\"+topDir)\n}\n\nfunc (s *copySuite) testCopySchemaConversionRegistries(t *testing.T, schema1Registry, schema2Registry string) {\n\ttopDir := t.TempDir()\n\tfor _, subdir := range []string{\"input1\", \"input2\", \"dest2\"} {\n\t\terr := os.MkdirAll(filepath.Join(topDir, subdir), 0o755)\n\t\trequire.NoError(t, err)\n\t}\n\tinput1Dir := filepath.Join(topDir, \"input1\")\n\tinput2Dir := filepath.Join(topDir, \"input2\")\n\tdestDir := filepath.Join(topDir, \"dest2\")\n\n\t// Ensure we are working with a schema2 image.\n\t// dir: accepts any manifest format, i.e. this makes …/input2 a schema2 source which cannot be asked to produce schema1 like ordinary docker: registries can.\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", testFQIN, \"dir:\"+input2Dir)\n\tverifyManifestMIMEType(t, input2Dir, manifest.DockerV2Schema2MediaType)\n\t// 2→2 (the \"f2t2\" in tag means \"from 2 to 2\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--dest-tls-verify=false\", \"dir:\"+input2Dir, schema2Registry+\":f2t2\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", schema2Registry+\":f2t2\", \"dir:\"+destDir)\n\tverifyManifestMIMEType(t, destDir, manifest.DockerV2Schema2MediaType)\n\t// 2→1; we will use the result as a schema1 image for further tests.\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--dest-tls-verify=false\", \"dir:\"+input2Dir, schema1Registry+\":f2t1\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", schema1Registry+\":f2t1\", \"dir:\"+input1Dir)\n\tverifyManifestMIMEType(t, input1Dir, manifest.DockerV2Schema1SignedMediaType)\n\t// 1→1\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--dest-tls-verify=false\", \"dir:\"+input1Dir, schema1Registry+\":f1t1\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", schema1Registry+\":f1t1\", \"dir:\"+destDir)\n\tverifyManifestMIMEType(t, destDir, manifest.DockerV2Schema1SignedMediaType)\n\t// 1→2: image stays unmodified schema1\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--dest-tls-verify=false\", \"dir:\"+input1Dir, schema2Registry+\":f1t2\")\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", schema2Registry+\":f1t2\", \"dir:\"+destDir)\n\tverifyManifestMIMEType(t, destDir, manifest.DockerV2Schema1SignedMediaType)\n}\n\nconst regConfFixture = \"./fixtures/registries.conf\"\n\nfunc (s *skopeoSuite) TestSuccessCopySrcWithMirror() {\n\tt := s.T()\n\tdir := t.TempDir()\n\n\tassertSkopeoSucceeds(t, \"\", \"--registries-conf=\"+regConfFixture, \"copy\",\n\t\t\"docker://mirror.invalid/busybox\", \"dir:\"+dir)\n}\n\nfunc (s *skopeoSuite) TestFailureCopySrcWithMirrorsUnavailable() {\n\tt := s.T()\n\tdir := t.TempDir()\n\n\t// .invalid domains are, per RFC 6761, supposed to result in NXDOMAIN.\n\t// With systemd-resolved (used only via NSS?), we instead seem to get “Temporary failure in name resolution”\n\tassertSkopeoFails(t, \".*(no such host|Temporary failure in name resolution).*\",\n\t\t\"--registries-conf=\"+regConfFixture, \"copy\", \"docker://invalid.invalid/busybox\", \"dir:\"+dir)\n}\n\nfunc (s *skopeoSuite) TestSuccessCopySrcWithMirrorAndPrefix() {\n\tt := s.T()\n\tdir := t.TempDir()\n\n\tassertSkopeoSucceeds(t, \"\", \"--registries-conf=\"+regConfFixture, \"copy\",\n\t\t\"docker://gcr.invalid/foo/bar/busybox\", \"dir:\"+dir)\n}\n\nfunc (s *skopeoSuite) TestFailureCopySrcWithMirrorAndPrefixUnavailable() {\n\tt := s.T()\n\tdir := t.TempDir()\n\n\t// .invalid domains are, per RFC 6761, supposed to result in NXDOMAIN.\n\t// With systemd-resolved (used only via NSS?), we instead seem to get “Temporary failure in name resolution”\n\tassertSkopeoFails(t, \".*(no such host|Temporary failure in name resolution).*\",\n\t\t\"--registries-conf=\"+regConfFixture, \"copy\", \"docker://gcr.invalid/wrong/prefix/busybox\", \"dir:\"+dir)\n}\n\nfunc (s *copySuite) TestCopyFailsWhenReferenceIsInvalid() {\n\tt := s.T()\n\tassertSkopeoFails(t, `.*Invalid image name.*`, \"copy\", \"unknown:transport\", \"unknown:test\")\n}\n\nfunc (s *copySuite) TestInsecurePolicyAndRequireSignedConflict() {\n\tt := s.T()\n\tassertSkopeoFails(t, \".*--insecure-policy and --require-signed are mutually exclusive.*\",\n\t\t\"--insecure-policy\", \"--require-signed\", \"inspect\", \"dir:/nonexistent\")\n}\n\nfunc (s *copySuite) TestRequireSignedAcceptsSignedImage() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil {\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\tsrcDir := t.TempDir()\n\n\t// get an image to work with\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\",\n\t\ttestFQIN64, \"dir:\"+srcDir)\n\n\t// first, sanity-check that without --require-signed, we can copy it since by default, `dir:` is insecureAcceptAnything\n\tdestDir1 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"dir:\"+srcDir, \"dir:\"+destDir1)\n\n\t// now verify that copying fails with --require-signed\n\tdestDir2 := t.TempDir()\n\tassertSkopeoFails(t, \".*Source image rejected: No signature verification policy found for image.*\",\n\t\t\"--require-signed\", \"copy\",\n\t\t\"dir:\"+srcDir, \"dir:\"+destDir2)\n\n\t// sign the image\n\tmanifestPath := filepath.Join(srcDir, \"manifest.json\")\n\tsignaturePath := filepath.Join(srcDir, \"signature-1\")\n\tdockerReference := \"localhost/test:latest\"\n\n\tassertSkopeoSucceeds(t, \"\", \"standalone-sign\",\n\t\t\"-o\", signaturePath,\n\t\tmanifestPath, dockerReference, s.fingerprint)\n\n\t// sanity-check signature file is there\n\t_, err = os.Stat(signaturePath)\n\trequire.NoError(t, err)\n\n\t// create a basic policy that requires signatures\n\tpolicy := map[string]any{\n\t\t\"default\": []map[string]any{{\n\t\t\t\"type\":    \"signedBy\",\n\t\t\t\"keyType\": \"GPGKeys\",\n\t\t\t\"keyPath\": filepath.Join(s.gpgHome, \"personal-pubkey.gpg\"),\n\t\t\t\"signedIdentity\": map[string]any{\n\t\t\t\t\"type\":             \"exactRepository\",\n\t\t\t\t\"dockerRepository\": dockerReference,\n\t\t\t},\n\t\t}},\n\t}\n\tpolicyJSON, err := json.Marshal(policy)\n\trequire.NoError(t, err)\n\n\tpolicyFile := filepath.Join(t.TempDir(), \"policy.json\")\n\terr = os.WriteFile(policyFile, policyJSON, 0o600)\n\trequire.NoError(t, err)\n\n\t// now copying with --require-signed should pass\n\tdestDir3 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"--policy\", policyFile, \"--require-signed\", \"copy\",\n\t\t\"dir:\"+srcDir, \"dir:\"+destDir3)\n\n\t// Delete the signature and sanity-check that copying fails. This doesn't\n\t// strictly test --require-signed, but rather the PolicyRequirements logic, but\n\t// it makes the test feel complete.\n\terr = os.Remove(signaturePath)\n\trequire.NoError(t, err)\n\n\tdestDir4 := t.TempDir()\n\tassertSkopeoFails(t, \".*Source image rejected: A signature was required, but no signature exists.*\",\n\t\t\"--policy\", policyFile, \"--require-signed\", \"copy\",\n\t\t\"dir:\"+srcDir, \"dir:\"+destDir4)\n}\n"
  },
  {
    "path": "integration/fixtures/.gitignore",
    "content": "/data/pgp.cert.d/_sequoia*\n"
  },
  {
    "path": "integration/fixtures/blocked-registries.conf",
    "content": "[[registry]]\nlocation = \"registry-unblocked.com\"\n\n[[registry]]\nlocation = \"registry-blocked.com\"\nblocked = true\n"
  },
  {
    "path": "integration/fixtures/data/keystore/keystore.cookie",
    "content": ""
  },
  {
    "path": "integration/fixtures/data/pgp.cert.d/writelock",
    "content": ""
  },
  {
    "path": "integration/fixtures/image.manifest.json",
    "content": "{\n    \"schemaVersion\": 2,\n    \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n    \"config\": {\n        \"mediaType\": \"application/vnd.docker.container.image.v1+json\",\n        \"size\": 7023,\n        \"digest\": \"sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7\"\n    },\n    \"layers\": [\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 32654,\n            \"digest\": \"sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f\"\n        },\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 16724,\n            \"digest\": \"sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b\"\n        },\n        {\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n            \"size\": 73109,\n            \"digest\": \"sha256:ec4b8955958665577945c89419d1af06b5f7636b4ac3da7f12184802ad867736\"\n        }\n    ]\n}"
  },
  {
    "path": "integration/fixtures/no-passphrase.pub",
    "content": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxjMEaGwFVhYJKwYBBAHaRw8BAQdAZzfnqEAgvE3RoCtPWEOc3Xp8oMURR0qjq+Ru\nPHJrc6TCwAsEHxYKAH0FgmhsBVYDCwkHCRD2+Qi2+kiiKUcUAAAAAAAeACBzYWx0\nQG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmcEjRQtILaFnIhczxeUkcfW0KMHEZ30\nwTdJ1v1iHB7NKQMVCggCmwECHgkWIQRQ3eiY305IdVyMK3r2+Qi2+kiiKQAA86gA\n/1ZkXWPHUxh3nQu/EL72ZeP9k/SLWkEuNKs6dJrmRud9AQCHbWwSUwKyt12EFVt/\nQvMFSQ95brUxsWLHgFMPpNfWAc0aU2tvcGVvIFNlcXVvaWEgdGVzdGluZyBrZXnC\nwA4EExYKAIAFgmhsBVYDCwkHCRD2+Qi2+kiiKUcUAAAAAAAeACBzYWx0QG5vdGF0\naW9ucy5zZXF1b2lhLXBncC5vcmctF7xuY06GUyedOGjd2iNKwab85gV64zEAGKgi\nExHRxgMVCggCmQECmwECHgkWIQRQ3eiY305IdVyMK3r2+Qi2+kiiKQAA3SEBAMe1\ny6rWaPjDpkeiDthLV1Umr6NsXVBv/IJTcP9RM4quAQCwmlsdQMddCsc+K3Y5KH88\nsaIG0/MRZaPJdsd8vRGUCs4zBGhsBVYWCSsGAQQB2kcPAQEHQLN8yt/21QDMzcB4\n2bzFRg1LpkFZWECjkb2ty7Iju/aOwsC/BBgWCgExBYJobAVWCRD2+Qi2+kiiKUcU\nAAAAAAAeACBzYWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmce9QEurrtI24ys\nvXssO/40rI5rlsNokEEFr7CVwVgWvAKbAr6gBBkWCgBvBYJobAVWCRB63Ra9Qdgp\ntkcUAAAAAAAeACBzYWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmcBWCJsdUfj\noYpld4qcYBqjxsyScwpID2vkNlYMLmS+IhYhBKyZqvZ6WI3zgaapXHrdFr1B2Cm2\nAAAEZwEA/UhpNN1XElYx6Xq+JMKlXywoIgButkQy1+H2EcRBeHsBAM7lq8BXvRKz\nbDjRlgxiIAYl77p7ihVQ5NYcuZcAlH0CFiEEUN3omN9OSHVcjCt69vkItvpIoikA\nAJcwAP9D4spfb28k16w2cemrWAtAE1WUgV8V+OEpE7+gpV+17gEA+0Kzf7jBHgd3\npBAWwttuRd8OHlZZzKs3f26z28I6mgLOMwRobAVWFgkrBgEEAdpHDwEBB0DPyS14\njQk1mSWNmuYR4P9M5zOfU2mkhwaqx1l3OWTZD8LAvwQYFgoBMQWCaGwFVgkQ9vkI\ntvpIoilHFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3Jn+wfK\nFmPmtrsi0sY5zIq9KFmbrQyhXz/VZIw6K8D1zdECmyC+oAQZFgoAbwWCaGwFVgkQ\nbwujLUxU69BHFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3Jn\nxF3KXB4+dN9suOhCD2XkYlAWUJ4GVBVV2wAmdQAueyEWIQTv1sMw2eUTIMQmb7Zv\nC6MtTFTr0AAA/LYA/iBkRh6dGbp76VzuuHVNUNgTqvXgz9FjizZGJKnVZctXAPwL\nTlHxcH6XX96AuiCy9QAMUpm8ZvMu8TAgjgOrlFPKCBYhBFDd6JjfTkh1XIwrevb5\nCLb6SKIpAAA0rQD9HWbBeSoshjH6/k5ntZjOfIAha4/TLlBrMq2w+t4LWD0A/2q5\nDEbYh6PwMidDxXteyHWf4Qnr0vH8vip9d+WHbDYEzjgEaGwFVhIKKwYBBAGXVQEF\nAQEHQLxXHw9STOAhb2PLEjrl3uQDwpaXIdigg67vId0jSstVAwEIB8LAAAQYFgoA\ncgWCaGwFVgkQ9vkItvpIoilHFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9p\nYS1wZ3Aub3Jn8bvuQCv3uEYJtK6h5y5e4AY9lJtVXx3brexR5bmFCwcCmwwWIQRQ\n3eiY305IdVyMK3r2+Qi2+kiiKQAAEzkA/Az97rdlp3hf97S6a5AxU8pTry4gKI63\nlwKtBAT+uF/pAP9lAziQRlNEa1sX6qCXrQqeA/aQ0nj9gRJ1Wvi1PMxWBA==\n=7jmE\n-----END PGP PUBLIC KEY BLOCK-----\n"
  },
  {
    "path": "integration/fixtures/policy.json",
    "content": "{\n    \"default\": [\n        {\n            \"type\": \"reject\"\n        }\n    ],\n    \"transports\": {\n        \"docker\": {\n            \"localhost:5555\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5555/sequoia-no-passphrase\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@fixturedir@/no-passphrase.pub\"\n                }\n            ],\n            \"localhost:5555/sequoia-with-passphrase\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@fixturedir@/with-passphrase.pub\"\n                }\n            ],\n            \"localhost:5000/myns/extension\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/mirroring-primary\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/mirroring-mirror\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/mirroring-remap\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\",\n                    \"signedIdentity\": {\n                        \"type\": \"remapIdentity\",\n                        \"prefix\": \"localhost:5006/myns/mirroring-remap\",\n                        \"signedPrefix\": \"localhost:5006/myns/mirroring-primary\"\n                    }\n                }\n            ],\n            \"docker.io/openshift\": [\n                {\n                    \"type\": \"insecureAcceptAnything\"\n                }\n            ],\n            \"quay.io/openshift\": [\n                {\n                    \"type\": \"insecureAcceptAnything\"\n                }\n            ]\n        },\n        \"dir\": {\n            \"/@dirpath@\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/official-pubkey.gpg\",\n                    \"signedIdentity\": {\n                        \"type\": \"exactRepository\",\n                        \"dockerRepository\": \"localhost:5000/myns/official\"\n                    }\n                }\n            ],\n            \"\": [\n                {\n                    \"type\": \"insecureAcceptAnything\"\n                }\n            ]\n        },\n        \"atomic\": {\n            \"localhost:5006/myns/personal\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/official\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/official-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/naming:test1\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/official-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5006/myns/naming:naming\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/official-pubkey.gpg\",\n                    \"signedIdentity\": {\n                        \"type\": \"exactRepository\",\n                        \"dockerRepository\": \"localhost:5006/myns/official\"\n                    }\n                }\n            ],\n            \"localhost:5006/myns/cosigned:cosigned\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/official-pubkey.gpg\",\n                    \"signedIdentity\": {\n                        \"type\": \"exactRepository\",\n                        \"dockerRepository\": \"localhost:5006/myns/official\"\n                    }\n                },\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ],\n            \"localhost:5000/myns/extension\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"@keydir@/personal-pubkey.gpg\"\n                }\n            ]\n        }\n    }\n}\n"
  },
  {
    "path": "integration/fixtures/registries.conf",
    "content": "[[registry]]\nlocation = \"mirror.invalid\"\nmirror = [\n    { location = \"mirror-0.invalid\" },\n    { location = \"mirror-1.invalid\" },\n    { location = \"gcr.io/google-containers\" },\n]\n\n# This entry is currently unused and exists only to ensure\n# that the mirror.invalid/busybox is not rewritten twice.\n[[registry]]\nlocation = \"gcr.io\"\nprefix = \"gcr.io/google-containers\"\n\n[[registry]]\nlocation = \"invalid.invalid\"\nmirror = [\n    { location = \"invalid-mirror-0.invalid\" },\n    { location = \"invalid-mirror-1.invalid\" },\n]\n\n[[registry]]\nlocation = \"gcr.invalid\"\nprefix = \"gcr.invalid/foo/bar\"\nmirror = [\n    { location = \"wrong-mirror-0.invalid\" },\n    { location = \"gcr.io/google-containers\" },\n]\n\n[[registry]]\nlocation = \"localhost:5006/myns/mirroring-primary\"\nmirror = [\n    { location = \"localhost:5006/myns/mirroring-mirror\"},\n]\n"
  },
  {
    "path": "integration/fixtures/registries.yaml",
    "content": "docker:\n   localhost:5555:\n        lookaside: file://@lookaside@\n   localhost:5555/public:\n        lookaside-staging: file://@split-staging@\n        lookaside: @split-read@\n"
  },
  {
    "path": "integration/fixtures/tls-details-1.3.yaml",
    "content": "minVersion: \"1.3\"\n"
  },
  {
    "path": "integration/fixtures/tls-details-anything.yaml",
    "content": "{} # No fields\n"
  },
  {
    "path": "integration/fixtures/tls-details-pqc-only.yaml",
    "content": "minVersion: \"1.3\"\nnamedGroups:\n  - \"X25519MLKEM768\"\n"
  },
  {
    "path": "integration/fixtures/uncompressed-image-s1/manifest.json",
    "content": "{\n   \"schemaVersion\": 1,\n   \"name\": \"nonempty\",\n   \"tag\": \"nonempty\",\n   \"architecture\": \"amd64\",\n   \"fsLayers\": [\n      {\n         \"blobSum\": \"sha256:160d823fdc48e62f97ba62df31e55424f8f5eb6b679c865eec6e59adfe304710\"\n      }\n   ],\n   \"history\": [\n      {\n         \"v1Compatibility\": \"{\\\"architecture\\\":\\\"amd64\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"59c20544b2f4\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":null,\\\"Image\\\":\\\"\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"OnBuild\\\":null,\\\"Labels\\\":null},\\\"container\\\":\\\"59c20544b2f4ad7a8639433bacb1ec215b7dad4a7bf1a83b5ab4679329a46c1d\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"59c20544b2f4\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) ADD file:14f49faade3db5e596826746d9ed3dfd658490c16c4d61d4886726153ad0591a in /\\\"],\\\"Image\\\":\\\"\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"OnBuild\\\":null,\\\"Labels\\\":null},\\\"created\\\":\\\"2016-09-19T18:23:54.9949213Z\\\",\\\"docker_version\\\":\\\"1.10.3\\\",\\\"id\\\":\\\"4c224eac5061bb85f523ca4e3316618fd7921a80fe94286979667b1edb8e1bdd\\\",\\\"os\\\":\\\"linux\\\"}\"\n      }\n   ],\n   \"signatures\": [\n      {\n         \"header\": {\n            \"jwk\": {\n               \"crv\": \"P-256\",\n               \"kid\": \"DGWZ:GAUM:WCOC:IMDL:D67M:CEI6:YTVH:M2CM:5HX4:FYDD:77OD:D3F7\",\n               \"kty\": \"EC\",\n               \"x\": \"eprZNqLO9mHZ4Z4GxefucEgov_1gwEi9lehpJR2suRo\",\n               \"y\": \"wIr2ucNg32ROfVCkR_8A5VbBJ-mFmsoIUVa6vt8lIxM\"\n            },\n            \"alg\": \"ES256\"\n         },\n         \"signature\": \"bvTLWW4YVFRjAanN1EJqwQw60fWSWJPxcGO3UZGFI_gyV6ucGdW4x7jyYL6g06sg925s9cy0wN1lw91CCFv4BA\",\n         \"protected\": \"eyJmb3JtYXRMZW5ndGgiOjE0ODcsImZvcm1hdFRhaWwiOiJDbjBLIiwidGltZSI6IjIwMTYtMDktMTlUMTg6NDM6MzNaIn0\"\n      }\n   ]\n}"
  },
  {
    "path": "integration/fixtures/uncompressed-image-s2/86ce150e65c72b30f885c261449d18b7c6832596916e7f654e08377b5a67b4ff",
    "content": "{\"architecture\":\"amd64\",\"config\":{\"Hostname\":\"59c20544b2f4\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":null,\"Image\":\"\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"container\":\"59c20544b2f4ad7a8639433bacb1ec215b7dad4a7bf1a83b5ab4679329a46c1d\",\"container_config\":{\"Hostname\":\"59c20544b2f4\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) ADD file:14f49faade3db5e596826746d9ed3dfd658490c16c4d61d4886726153ad0591a in /\"],\"Image\":\"\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"created\":\"2016-09-19T18:23:54.9949213Z\",\"docker_version\":\"1.10.3\",\"history\":[{\"created\":\"2016-09-19T18:23:54.9949213Z\",\"created_by\":\"/bin/sh -c #(nop) ADD file:14f49faade3db5e596826746d9ed3dfd658490c16c4d61d4886726153ad0591a in /\"}],\"os\":\"linux\",\"rootfs\":{\"type\":\"layers\",\"diff_ids\":[\"sha256:160d823fdc48e62f97ba62df31e55424f8f5eb6b679c865eec6e59adfe304710\"]}}"
  },
  {
    "path": "integration/fixtures/uncompressed-image-s2/manifest.json",
    "content": "{\n   \"schemaVersion\": 2,\n   \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n   \"config\": {\n      \"mediaType\": \"application/octet-stream\",\n      \"size\": 1272,\n      \"digest\": \"sha256:86ce150e65c72b30f885c261449d18b7c6832596916e7f654e08377b5a67b4ff\"\n   },\n   \"layers\": [\n      {\n         \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n         \"size\": 2048,\n         \"digest\": \"sha256:160d823fdc48e62f97ba62df31e55424f8f5eb6b679c865eec6e59adfe304710\"\n      }\n   ]\n}\n"
  },
  {
    "path": "integration/fixtures/with-passphrase.passphrase",
    "content": "WithPassphrase123\n"
  },
  {
    "path": "integration/fixtures/with-passphrase.pub",
    "content": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxjMEaGwF3RYJKwYBBAHaRw8BAQdAouHF6y7foOScub78AINlTzXnEQrYrAJyH8fr\n3biwuMzCwAsEHxYKAH0FgmhsBd0DCwkHCRAtEaGaukHGrkcUAAAAAAAeACBzYWx0\nQG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmdRHdDbkndmp7Q96YisL7ezwrLxSfQj\n46zFb8wob+6yvgMVCggCmwECHgkWIQQfWCUoW3heHbE7820tEaGaukHGrgAAbd8A\n/3iwAF7qTVgqqCqLVIj8oJxrZr/jWbHbjO1DzFafQQjMAQDwwOuL9dhy9Q7N5UkW\nx3kq3WLEIuogh+0meAwfMrJMAM0qU2tvcGVvIFNlcXVvaWEgdGVzdGluZyBrZXkg\nd2l0aCBwYXNzcGhyYXNlwsAOBBMWCgCABYJobAXdAwsJBwkQLRGhmrpBxq5HFAAA\nAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnwGFwQkw9BWc963pG\nlBgz8D9CbfsqoDS58GXyd24W8g4DFQoIApkBApsBAh4JFiEEH1glKFt4Xh2xO/Nt\nLRGhmrpBxq4AAKTpAPsHMyzeL+fT/EdPbU/+fi/+RbGuRQH5QHtzaDfAu+ZGUwD+\nOeoi7OOy8+bgvnEdj31TohAGEexTvhMIILglL9ymTgfOMwRobAXdFgkrBgEEAdpH\nDwEBB0DNeYLgt7VaYbdJ3TyTqiYp7pEuXYVYjeqRtt055Hs60cLAvwQYFgoBMQWC\naGwF3QkQLRGhmrpBxq5HFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1w\nZ3Aub3Jnr08xd/fCttifQZ/b+oVq2huO6HT9zpTITLIzPLLBI6cCmwK+oAQZFgoA\nbwWCaGwF3QkQVNJA3Fgs7h9HFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9p\nYS1wZ3Aub3JnN1Kokqv7bIxnM7EODP0bX7yuAV8OP+kCivD84d8TrkEWIQQemi42\nPEh1us0v16FU0kDcWCzuHwAAUisBAKBMLjhkVO+KCFNKxYoak/Hj7VAHwiqnEAXB\naMstWEE1AP9rVWwZ85IdlSejb475H9HGl+Nl0a5BOioR/Y+Kl15UBxYhBB9YJShb\neF4dsTvzbS0RoZq6QcauAAAKnAEAvgb1r2cteb+9wd9U5vYZ7/xXKEljojjA7CQT\nQFmecoYBAO3/rNK3xYcKleni3lknNhzQap+Ed6ri2WVQCKujRgIAzjMEaGwF3RYJ\nKwYBBAHaRw8BAQdA1JYMc2I192WwvCI/qFcLrwmFPwDDkHvNDDt4Kc2ziHjCwL8E\nGBYKATEFgmhsBd0JEC0RoZq6QcauRxQAAAAAAB4AIHNhbHRAbm90YXRpb25zLnNl\ncXVvaWEtcGdwLm9yZxDKeHct4SrN5lJ3oAkhIfwcJpCTVv9Sux05J7Pn0U6TApsg\nvqAEGRYKAG8FgmhsBd0JEMb35fxT9XmfRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z\nLnNlcXVvaWEtcGdwLm9yZ9MZe54S5aYMdKLQmZiNN7Q1tot0zCuRp0DOMrZIsWQg\nFiEEzXeihzhK/PSlCtVwxvfl/FP1eZ8AAFpUAQC1WlWjrTCL+ZiG3X9ThPO8418f\nwu+p3l9jJAF1SK15QQEA6Go0+bbWOHMpkMNckSwlXhbBKVp53y2IhQnwLAfbZwoW\nIQQfWCUoW3heHbE7820tEaGaukHGrgAAhYMA/iuXYUHqeXNpFCmoDFWmvwHDoPIs\n8ZrgBJOfSnzg+x5wAQCFIWANcwYD/rCHTN6KQY70VI/x7SmkqKJZVrIBCB7DB844\nBGhsBd0SCisGAQQBl1UBBQEBB0CYZYh5OKFAiuKOx4MIk6pocGCdfpL/XrJVoWjT\n9aDSNAMBCAfCwAAEGBYKAHIFgmhsBd0JEC0RoZq6QcauRxQAAAAAAB4AIHNhbHRA\nbm90YXRpb25zLnNlcXVvaWEtcGdwLm9yZ0oyJPZxXWc2dSxHpS1UAuvCfc80DaDy\nmr1nRs5/QO0aApsMFiEEH1glKFt4Xh2xO/NtLRGhmrpBxq4AANKZAP0T00LyderN\nQsdk2UgpeeoZhN4wKtlUGocUs7I90P3AhgD/WuDXAlF6b9IXyTUoG9VkLrnlemCx\nDii+5qsdk0HFcgA=\n=YS7U\n-----END PGP PUBLIC KEY BLOCK-----\n"
  },
  {
    "path": "integration/fixtures_info_test.go",
    "content": "package main\n\nconst (\n\t// TestImageManifestDigest is the Docker manifest digest of \"fixtures/image.manifest.json\"\n\tTestImageManifestDigest = \"sha256:20bf21ed457b390829cdbeec8795a7bea1626991fda603e0d01b4e7f60427e55\"\n\n\ttestSequoiaHome = \"./fixtures\"\n\t// testSequoiaKeyFingerprint is a fingerprint of a test key in testSequoiaHome, generated using\n\t// > sq --home $(pwd)/signature/simplesequoia/testdata key generate --name 'Skopeo Sequoia testing key' --own-key --expiration=never\n\ttestSequoiaKeyFingerprint = \"50DDE898DF4E48755C8C2B7AF6F908B6FA48A229\"\n\t// testSequoiaKeyFingerprintWithPassphrase is a fingerprint of a test key in testSequoiaHome, generated using\n\t// > sq --home $(pwd)/signature/simplesequoia/testdata key generate --name 'Skopeo Sequoia testing key with passphrase' --own-key --expiration=never\n\ttestSequoiaKeyFingerprintWithPassphrase = \"1F5825285B785E1DB13BF36D2D11A19ABA41C6AE\"\n)\n"
  },
  {
    "path": "integration/openshift_shell_test.go",
    "content": "//go:build openshift_shell\n\npackage main\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n/*\nTestRunShell is not really a test; it is a convenient way to use the registry setup code\nin openshift.go and CopySuite to get an interactive environment for experimentation.\n\nTo use it, run:\n\n\tsudo make shell\n\nto start a container, then within the container:\n\n\tSKOPEO_CONTAINER_TESTS=1 PS1='nested> ' go test -tags openshift_shell -timeout=24h ./integration -v -run='copySuite.TestRunShell'\n\nAn example of what can be done within the container:\n\n\tcd ..; make bin/skopeo PREFIX=/usr install\n\t./skopeo --tls-verify=false  copy --sign-by=personal@example.com docker://quay.io/libpod/busybox:latest atomic:localhost:5000/myns/personal:personal\n\toc get istag personal:personal -o json\n\tcurl -L -v 'http://localhost:5000/v2/'\n\tcat ~/.docker/config.json\n\tcurl -L -v 'http://localhost:5000/openshift/token&scope=repository:myns/personal:pull' --header 'Authorization: Basic $auth_from_docker'\n\tcurl -L -v 'http://localhost:5000/v2/myns/personal/manifests/personal' --header 'Authorization: Bearer $token_from_oauth'\n\tcurl -L -v 'http://localhost:5000/extensions/v2/myns/personal/signatures/$manifest_digest' --header 'Authorization: Bearer $token_from_oauth'\n*/\nfunc (s *copySuite) TestRunShell() {\n\tt := s.T()\n\tcmd := exec.Command(\"bash\", \"-i\")\n\ttty, err := os.OpenFile(\"/dev/tty\", os.O_RDWR, 0)\n\trequire.NoError(t, err)\n\tcmd.Stdin = tty\n\tcmd.Stdout = tty\n\tcmd.Stderr = tty\n\terr = cmd.Run()\n\tassert.NoError(t, err)\n}\n"
  },
  {
    "path": "integration/openshift_test.go",
    "content": "package main\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/storage/pkg/homedir\"\n)\n\nvar adminKUBECONFIG = map[string]string{\n\t\"KUBECONFIG\": \"openshift.local.config/master/admin.kubeconfig\",\n}\n\n// openshiftCluster is an OpenShift API master and integrated registry\n// running on localhost.\ntype openshiftCluster struct {\n\tworkingDir string\n\tdockerDir  string\n\tprocesses  []*exec.Cmd // Processes to terminate on teardown; append to the end, terminate from end to the start.\n}\n\n// startOpenshiftCluster creates a new openshiftCluster.\n// WARNING: This affects state in users' home directory! Only run\n// in isolated test environment.\nfunc startOpenshiftCluster(t *testing.T) *openshiftCluster {\n\tcluster := &openshiftCluster{}\n\tcluster.workingDir = t.TempDir()\n\n\tcluster.startMaster(t)\n\tcluster.prepareRegistryConfig(t)\n\tcluster.startRegistry(t)\n\tcluster.ocLoginToProject(t)\n\tcluster.dockerLogin(t)\n\tcluster.relaxImageSignerPermissions(t)\n\n\treturn cluster\n}\n\n// clusterCmd creates an exec.Cmd in cluster.workingDir with current environment modified by environment.\nfunc (cluster *openshiftCluster) clusterCmd(env map[string]string, name string, args ...string) *exec.Cmd {\n\tcmd := exec.Command(name, args...)\n\tcmd.Dir = cluster.workingDir\n\tcmd.Env = os.Environ()\n\tfor key, value := range env {\n\t\tcmd.Env = modifyEnviron(cmd.Env, key, value)\n\t}\n\treturn cmd\n}\n\n// startMaster starts the OpenShift master (etcd+API server) and waits for it to be ready, or terminates on failure.\nfunc (cluster *openshiftCluster) startMaster(t *testing.T) {\n\tcmd := cluster.clusterCmd(nil, \"openshift\", \"start\", \"master\")\n\tcluster.processes = append(cluster.processes, cmd)\n\tstdout, err := cmd.StdoutPipe()\n\trequire.NoError(t, err)\n\t// but logging actually goes only to stderr - this primarily ensure we log any\n\t// unexpected output to stdout.\n\tcmd.Stderr = cmd.Stdout\n\terr = cmd.Start()\n\trequire.NoError(t, err)\n\n\tportOpen, terminatePortCheck := newPortChecker(t, 8443)\n\tdefer func() {\n\t\tt.Logf(\"Terminating port check\")\n\t\tterminatePortCheck <- true\n\t}()\n\n\tterminateLogCheck := make(chan bool, 1)\n\tlogCheckFound := make(chan bool)\n\tgo func() {\n\t\tdefer func() {\n\t\t\tt.Logf(\"Log checker exiting\")\n\t\t}()\n\t\tscanner := bufio.NewScanner(stdout)\n\t\tfor scanner.Scan() {\n\t\t\tline := scanner.Text()\n\t\t\tt.Logf(\"Log line: %s\", line)\n\t\t\tif strings.Contains(line, \"Started Origin Controllers\") {\n\t\t\t\tlogCheckFound <- true\n\t\t\t\treturn\n\t\t\t\t// FIXME? We stop reading from stdout; could this block the master?\n\t\t\t}\n\t\t\t// Note: we can block before we get here.\n\t\t\tselect {\n\t\t\tcase <-terminateLogCheck:\n\t\t\t\tt.Logf(\"terminated\")\n\t\t\t\treturn\n\t\t\tdefault:\n\t\t\t\t// Do not block here and read the next line.\n\t\t\t}\n\t\t}\n\t\tlogCheckFound <- false\n\t}()\n\tdefer func() {\n\t\tt.Logf(\"Terminating log check\")\n\t\tterminateLogCheck <- true\n\t}()\n\n\tgotPortCheck := false\n\tgotLogCheck := false\n\tctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)\n\tdefer cancel()\n\tfor !gotPortCheck || !gotLogCheck {\n\t\tt.Logf(\"Waiting for master\")\n\t\tselect {\n\t\tcase <-portOpen:\n\t\t\tt.Logf(\"port check done\")\n\t\t\tgotPortCheck = true\n\t\tcase found := <-logCheckFound:\n\t\t\tt.Logf(\"log check done, found: %t\", found)\n\t\t\tif !found {\n\t\t\t\tt.Fatal(\"log check done, success message not found\")\n\t\t\t}\n\t\t\tgotLogCheck = true\n\t\tcase <-ctx.Done():\n\t\t\tt.Fatalf(\"Timed out waiting for master: %v\", ctx.Err())\n\t\t}\n\t}\n\tt.Logf(\"OK, master started!\")\n}\n\n// prepareRegistryConfig creates a registry service account and a related k8s client configuration in ${cluster.workingDir}/openshift.local.registry.\nfunc (cluster *openshiftCluster) prepareRegistryConfig(t *testing.T) {\n\t// This partially mimics the objects created by (oadm registry), except that we run the\n\t// server directly as an ordinary process instead of a pod with an implicitly attached service account.\n\tsaJSON := `{\n\t\t\"apiVersion\": \"v1\",\n\t\t\"kind\": \"ServiceAccount\",\n\t\t\"metadata\": {\n\t\t\t\"name\": \"registry\"\n\t\t}\n\t}`\n\tcmd := cluster.clusterCmd(adminKUBECONFIG, \"oc\", \"create\", \"-f\", \"-\")\n\trunExecCmdWithInput(t, cmd, saJSON)\n\n\tcmd = cluster.clusterCmd(adminKUBECONFIG, \"oadm\", \"policy\", \"add-cluster-role-to-user\", \"system:registry\", \"-z\", \"registry\")\n\tout, err := cmd.CombinedOutput()\n\trequire.NoError(t, err, \"%s\", string(out))\n\trequire.Equal(t, \"cluster role \\\"system:registry\\\" added: \\\"registry\\\"\\n\", string(out))\n\n\tcmd = cluster.clusterCmd(adminKUBECONFIG, \"oadm\", \"create-api-client-config\", \"--client-dir=openshift.local.registry\", \"--basename=openshift-registry\", \"--user=system:serviceaccount:default:registry\")\n\tout, err = cmd.CombinedOutput()\n\trequire.NoError(t, err, \"%s\", string(out))\n\trequire.Equal(t, \"\", string(out))\n}\n\n// startRegistryProcess starts the OpenShift registry with configPart on port, waits for it to be ready, and returns the process object, or terminates on failure.\nfunc (cluster *openshiftCluster) startRegistryProcess(t *testing.T, port uint16, configPath string) *exec.Cmd {\n\tcmd := cluster.clusterCmd(map[string]string{\n\t\t\"KUBECONFIG\":          \"openshift.local.registry/openshift-registry.kubeconfig\",\n\t\t\"DOCKER_REGISTRY_URL\": fmt.Sprintf(\"127.0.0.1:%d\", port),\n\t}, \"dockerregistry\", configPath)\n\tconsumeAndLogOutputs(t, fmt.Sprintf(\"registry-%d\", port), cmd)\n\terr := cmd.Start()\n\trequire.NoError(t, err, \"%s\")\n\n\tportOpen, terminatePortCheck := newPortChecker(t, port)\n\tdefer func() {\n\t\tterminatePortCheck <- true\n\t}()\n\tt.Logf(\"Waiting for registry to start\")\n\tctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)\n\tdefer cancel()\n\tselect {\n\tcase <-portOpen:\n\t\tt.Logf(\"OK, Registry port open\")\n\tcase <-ctx.Done():\n\t\tt.Fatalf(\"Timed out waiting for registry to start: %v\", ctx.Err())\n\t}\n\n\treturn cmd\n}\n\n// startRegistry starts the OpenShift registry and waits for it to be ready, or terminates on failure.\nfunc (cluster *openshiftCluster) startRegistry(t *testing.T) {\n\t// Our “primary” registry\n\tcluster.processes = append(cluster.processes, cluster.startRegistryProcess(t, 5000, \"/atomic-registry-config.yml\"))\n\n\t// A registry configured with acceptschema2:false\n\tschema1Config := fileFromFixture(t, \"/atomic-registry-config.yml\", map[string]string{\n\t\t\"addr: :5000\":              \"addr: :5005\",\n\t\t\"rootdirectory: /registry\": \"rootdirectory: /registry-schema1\",\n\t\t// The default configuration currently already contains acceptschema2: false\n\t})\n\t// Make sure the configuration contains \"acceptschema2: false\", because eventually it will be enabled upstream and this function will need to be updated.\n\tconfigContents, err := os.ReadFile(schema1Config)\n\trequire.NoError(t, err)\n\trequire.Regexp(t, \"(?s).*acceptschema2: false.*\", string(configContents))\n\tcluster.processes = append(cluster.processes, cluster.startRegistryProcess(t, 5005, schema1Config))\n\n\t// A registry configured with acceptschema2:true\n\tschema2Config := fileFromFixture(t, \"/atomic-registry-config.yml\", map[string]string{\n\t\t\"addr: :5000\":              \"addr: :5006\",\n\t\t\"rootdirectory: /registry\": \"rootdirectory: /registry-schema2\",\n\t\t\"acceptschema2: false\":     \"acceptschema2: true\",\n\t})\n\tcluster.processes = append(cluster.processes, cluster.startRegistryProcess(t, 5006, schema2Config))\n}\n\n// ocLoginToProject runs (oc login) and (oc new-project) on the cluster, or terminates on failure.\nfunc (cluster *openshiftCluster) ocLoginToProject(t *testing.T) {\n\tt.Logf(\"oc login\")\n\tcmd := cluster.clusterCmd(nil, \"oc\", \"login\", \"--certificate-authority=openshift.local.config/master/ca.crt\", \"-u\", \"myuser\", \"-p\", \"mypw\", \"https://localhost:8443\")\n\tout, err := cmd.CombinedOutput()\n\trequire.NoError(t, err, \"%s\", out)\n\trequire.Regexp(t, \"(?s).*Login successful.*\", string(out)) // (?s) : '.' will also match newlines\n\n\toutString := combinedOutputOfCommand(t, \"oc\", \"new-project\", \"myns\")\n\trequire.Regexp(t, `(?s).*Now using project \"myns\".*`, outString) // (?s) : '.' will also match newlines\n}\n\n// dockerLogin simulates (docker login) to the cluster, or terminates on failure.\n// We do not run (docker login) directly, because that requires a running daemon and a docker package.\nfunc (cluster *openshiftCluster) dockerLogin(t *testing.T) {\n\tcluster.dockerDir = filepath.Join(homedir.Get(), \".docker\")\n\terr := os.MkdirAll(cluster.dockerDir, 0o700)\n\trequire.NoError(t, err)\n\n\tout := combinedOutputOfCommand(t, \"oc\", \"config\", \"view\", \"-o\", \"json\", \"-o\", \"jsonpath={.users[*].user.token}\")\n\tt.Logf(\"oc config value: %s\", out)\n\tauthValue := base64.StdEncoding.EncodeToString([]byte(\"unused:\" + out))\n\tauths := []string{}\n\tfor _, port := range []int{5000, 5005, 5006} {\n\t\tauths = append(auths, fmt.Sprintf(`\"localhost:%d\": {\n\t\t\t\t\"auth\": \"%s\",\n\t\t\t\t\"email\": \"unused\"\n\t\t\t}`, port, authValue))\n\t}\n\tconfigJSON := `{\"auths\": {` + strings.Join(auths, \",\") + `}}`\n\terr = os.WriteFile(filepath.Join(cluster.dockerDir, \"config.json\"), []byte(configJSON), 0o600)\n\trequire.NoError(t, err)\n}\n\n// relaxImageSignerPermissions opens up the system:image-signer permissions so that\n// anyone can work with signatures\n// FIXME: This also allows anyone to DoS anyone else; this design is really not all\n// that workable, but it is the best we can do for now.\nfunc (cluster *openshiftCluster) relaxImageSignerPermissions(t *testing.T) {\n\tcmd := cluster.clusterCmd(adminKUBECONFIG, \"oadm\", \"policy\", \"add-cluster-role-to-group\", \"system:image-signer\", \"system:authenticated\")\n\tout, err := cmd.CombinedOutput()\n\trequire.NoError(t, err, \"%s\", string(out))\n\trequire.Equal(t, \"cluster role \\\"system:image-signer\\\" added: \\\"system:authenticated\\\"\\n\", string(out))\n}\n\n// tearDown stops the cluster services and deletes (only some!) of the state.\nfunc (cluster *openshiftCluster) tearDown(t *testing.T) {\n\tfor _, process := range slices.Backward(cluster.processes) {\n\t\t// It’s undocumented what Kill() returns if the process has terminated,\n\t\t// so we couldn’t check just for that. This is running in a container anyway…\n\t\t_ = process.Process.Kill()\n\t}\n\tif cluster.dockerDir != \"\" {\n\t\terr := os.RemoveAll(cluster.dockerDir)\n\t\trequire.NoError(t, err)\n\t}\n}\n"
  },
  {
    "path": "integration/procutils_linux_test.go",
    "content": "package main\n\nimport (\n\t\"os/exec\"\n\t\"syscall\"\n)\n\n// cmdLifecycleToParentIfPossible is a thin wrapper around prctl(PR_SET_PDEATHSIG)\n// on Linux.\nfunc cmdLifecycleToParentIfPossible(c *exec.Cmd) {\n\tc.SysProcAttr = &syscall.SysProcAttr{\n\t\tPdeathsig: syscall.SIGTERM,\n\t}\n}\n"
  },
  {
    "path": "integration/procutils_test.go",
    "content": "//go:build unix && !linux\n\npackage main\n\nimport (\n\t\"os/exec\"\n)\n\n// cmdLifecycleToParentIfPossible tries to exit if the parent process exits (only works on Linux).\nfunc cmdLifecycleToParentIfPossible(c *exec.Cmd) {\n}\n"
  },
  {
    "path": "integration/proxy_test.go",
    "content": "//go:build unix\n\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"testing\"\n\t\"time\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n\t\"go.podman.io/image/v5/manifest\"\n)\n\n// This image is known to be x86_64 only right now\nconst knownNotManifestListedImageX8664 = \"docker://quay.io/coreos/11bot\"\n\n// knownNotExtantImage would be very surprising if it did exist\nconst knownNotExtantImage = \"docker://quay.io/centos/centos:opensusewindowsubuntu\"\n\nconst expectedProxySemverMajor = \"0.2\"\n\n// request is copied from proxy.go\n// We intentionally copy to ensure that we catch any unexpected \"API\" changes\n// in the JSON.\ntype request struct {\n\t// Method is the name of the function\n\tMethod string `json:\"method\"`\n\t// Args is the arguments (parsed inside the function)\n\tArgs []any `json:\"args\"`\n}\n\n// reply is copied from proxy.go\ntype reply struct {\n\t// Success is true if and only if the call succeeded.\n\tSuccess bool `json:\"success\"`\n\t// Value is an arbitrary value (or values, as array/map) returned from the call.\n\tValue any `json:\"value\"`\n\t// PipeID is an index into open pipes, and should be passed to FinishPipe\n\tPipeID uint32 `json:\"pipeid\"`\n\t// Error should be non-empty if Success == false\n\tError string `json:\"error\"`\n}\n\n// maxMsgSize is also copied from proxy.go\nconst maxMsgSize = 32 * 1024\n\ntype proxy struct {\n\tc *net.UnixConn\n}\n\ntype pipefd struct {\n\t// id is the remote identifier \"pipeid\"\n\tid     uint\n\tdatafd *os.File\n\terrfd  *os.File\n}\n\nfunc (p *proxy) call(method string, args []any) (rval any, fd *pipefd, err error) {\n\treq := request{\n\t\tMethod: method,\n\t\tArgs:   args,\n\t}\n\treqbuf, err := json.Marshal(&req)\n\tif err != nil {\n\t\treturn\n\t}\n\tn, err := p.c.Write(reqbuf)\n\tif err != nil {\n\t\treturn\n\t}\n\tif n != len(reqbuf) {\n\t\terr = fmt.Errorf(\"short write during call of %d bytes\", n)\n\t\treturn\n\t}\n\toob := make([]byte, syscall.CmsgSpace(1))\n\treplybuf := make([]byte, maxMsgSize)\n\tn, oobn, _, _, err := p.c.ReadMsgUnix(replybuf, oob)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"reading reply: %w\", err)\n\t\treturn\n\t}\n\tvar reply reply\n\terr = json.Unmarshal(replybuf[0:n], &reply)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Failed to parse reply: %w\", err)\n\t\treturn\n\t}\n\tif !reply.Success {\n\t\terr = fmt.Errorf(\"remote error: %s\", reply.Error)\n\t\treturn\n\t}\n\n\tvar scms []syscall.SocketControlMessage\n\tscms, err = syscall.ParseSocketControlMessage(oob[:oobn])\n\tif err != nil {\n\t\terr = fmt.Errorf(\"failed to parse control message: %w\", err)\n\t\treturn\n\t}\n\tif reply.PipeID > 0 {\n\t\tif len(scms) != 1 {\n\t\t\terr = fmt.Errorf(\"Expected 1 socket control message, found %d\", len(scms))\n\t\t\treturn\n\t\t}\n\t}\n\tif len(scms) > 2 {\n\t\terr = fmt.Errorf(\"Expected 1 or 2 socket control message, found %d\", len(scms))\n\t\treturn\n\t}\n\tif len(scms) != 0 {\n\t\tvar fds []int\n\t\tfds, err = syscall.ParseUnixRights(&scms[0])\n\t\tif err != nil {\n\t\t\terr = fmt.Errorf(\"failed to parse unix rights: %w\", err)\n\t\t\treturn\n\t\t}\n\t\tif len(fds) < 1 || len(fds) > 2 {\n\t\t\terr = fmt.Errorf(\"expected 1 or 2 fds, found %d\", len(fds))\n\t\t\treturn\n\t\t}\n\t\tvar errfd *os.File\n\t\tif len(fds) == 2 {\n\t\t\terrfd = os.NewFile(uintptr(fds[1]), \"errfd\")\n\t\t}\n\t\tfd = &pipefd{\n\t\t\tdatafd: os.NewFile(uintptr(fds[0]), \"replyfd\"),\n\t\t\tid:     uint(reply.PipeID),\n\t\t\terrfd:  errfd,\n\t\t}\n\t}\n\n\trval = reply.Value\n\treturn\n}\n\nfunc (p *proxy) callNoFd(method string, args []any) (rval any, err error) {\n\tvar fd *pipefd\n\trval, fd, err = p.call(method, args)\n\tif err != nil {\n\t\treturn\n\t}\n\tif fd != nil {\n\t\terr = fmt.Errorf(\"Unexpected fd from method %s\", method)\n\t\treturn\n\t}\n\treturn rval, nil\n}\n\nfunc (p *proxy) callReadAllBytes(method string, args []any) (rval any, buf []byte, err error) {\n\tvar fd *pipefd\n\trval, fd, err = p.call(method, args)\n\tif err != nil {\n\t\treturn\n\t}\n\tif fd == nil {\n\t\terr = fmt.Errorf(\"Expected fd from method %s\", method)\n\t\treturn\n\t}\n\tfetchchan := make(chan byteFetch)\n\tgo func() {\n\t\tmanifestBytes, err := io.ReadAll(fd.datafd)\n\t\tfetchchan <- byteFetch{\n\t\t\tcontent: manifestBytes,\n\t\t\terr:     err,\n\t\t}\n\t}()\n\t_, err = p.callNoFd(\"FinishPipe\", []any{fd.id})\n\tif err != nil {\n\t\treturn\n\t}\n\tselect {\n\tcase fetchRes := <-fetchchan:\n\t\terr = fetchRes.err\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\n\t\tbuf = fetchRes.content\n\tcase <-time.After(5 * time.Minute):\n\t\terr = fmt.Errorf(\"timed out during proxy fetch\")\n\t}\n\treturn\n}\n\ntype proxyError struct {\n\tCode    string `json:\"code\"`\n\tMessage string `json:\"message\"`\n}\n\nfunc (p *proxy) callGetRawBlob(args []any) (rval any, buf []byte, err error) {\n\tvar fd *pipefd\n\trval, fd, err = p.call(\"GetRawBlob\", args)\n\tif err != nil {\n\t\treturn\n\t}\n\tif fd == nil {\n\t\terr = fmt.Errorf(\"Expected fds from method GetRawBlob\")\n\t\treturn\n\t}\n\tif fd.errfd == nil {\n\t\terr = fmt.Errorf(\"Expected errfd from method GetRawBlob\")\n\t\treturn\n\t}\n\tvar wg sync.WaitGroup\n\tfetchchan := make(chan byteFetch, 1)\n\terrchan := make(chan proxyError, 1)\n\twg.Go(func() {\n\t\tdefer close(fetchchan)\n\t\tdefer fd.datafd.Close()\n\t\tbuf, err := io.ReadAll(fd.datafd)\n\t\tfetchchan <- byteFetch{\n\t\t\tcontent: buf,\n\t\t\terr:     err,\n\t\t}\n\t})\n\twg.Go(func() {\n\t\tdefer fd.errfd.Close()\n\t\tdefer close(errchan)\n\t\tbuf, err := io.ReadAll(fd.errfd)\n\t\tvar proxyErr proxyError\n\t\tif err != nil {\n\t\t\tproxyErr.Code = \"read-from-proxy\"\n\t\t\tproxyErr.Message = err.Error()\n\t\t\terrchan <- proxyErr\n\t\t\treturn\n\t\t}\n\t\t// No error, leave code+message unset\n\t\tif len(buf) == 0 {\n\t\t\treturn\n\t\t}\n\t\tunmarshalErr := json.Unmarshal(buf, &proxyErr)\n\t\t// Shouldn't happen\n\t\tif unmarshalErr != nil {\n\t\t\tpanic(unmarshalErr)\n\t\t}\n\t\terrchan <- proxyErr\n\t})\n\twg.Wait()\n\n\terrMsg := <-errchan\n\tif errMsg.Code != \"\" {\n\t\treturn nil, nil, fmt.Errorf(\"(%s) %s\", errMsg.Code, errMsg.Message)\n\t}\n\tfetchRes := <-fetchchan\n\terr = fetchRes.err\n\tif err != nil {\n\t\treturn\n\t}\n\n\tbuf = fetchRes.content\n\treturn\n}\n\nfunc newProxy() (*proxy, error) {\n\tfds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_SEQPACKET, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmyfd := os.NewFile(uintptr(fds[0]), \"myfd\")\n\tdefer myfd.Close()\n\ttheirfd := os.NewFile(uintptr(fds[1]), \"theirfd\")\n\tdefer theirfd.Close()\n\n\tmysock, err := net.FileConn(myfd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Note ExtraFiles starts at 3\n\tproc := exec.Command(skopeoBinary, \"experimental-image-proxy\", \"--sockfd\", \"3\")\n\tproc.Stderr = os.Stderr\n\tcmdLifecycleToParentIfPossible(proc)\n\tproc.ExtraFiles = append(proc.ExtraFiles, theirfd)\n\n\tif err = proc.Start(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tp := &proxy{\n\t\tc: mysock.(*net.UnixConn),\n\t}\n\n\tv, err := p.callNoFd(\"Initialize\", nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsemver, ok := v.(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"proxy Initialize: Unexpected value %T\", v)\n\t}\n\tif !strings.HasPrefix(semver, expectedProxySemverMajor) {\n\t\treturn nil, fmt.Errorf(\"Unexpected semver %s\", semver)\n\t}\n\treturn p, nil\n}\n\nfunc TestProxy(t *testing.T) {\n\tsuite.Run(t, &proxySuite{})\n}\n\ntype proxySuite struct {\n\tsuite.Suite\n}\n\ntype byteFetch struct {\n\tcontent []byte\n\terr     error\n}\n\n// This exercises all the metadata fetching APIs.\nfunc runTestMetadataAPIs(p *proxy, img string) error {\n\tv, err := p.callNoFd(\"OpenImage\", []any{img})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\timgidv, ok := v.(float64)\n\tif !ok {\n\t\treturn fmt.Errorf(\"OpenImage return value is %T\", v)\n\t}\n\timgid := uint64(imgidv)\n\tif imgid == 0 {\n\t\treturn fmt.Errorf(\"got zero from expected image\")\n\t}\n\n\t// Also verify the optional path\n\tv, err = p.callNoFd(\"OpenImageOptional\", []any{img})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\timgidv, ok = v.(float64)\n\tif !ok {\n\t\treturn fmt.Errorf(\"OpenImageOptional return value is %T\", v)\n\t}\n\timgid2 := uint64(imgidv)\n\tif imgid2 == 0 {\n\t\treturn fmt.Errorf(\"got zero from expected image\")\n\t}\n\n\t_, err = p.callNoFd(\"CloseImage\", []any{imgid2})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, manifestBytes, err := p.callReadAllBytes(\"GetManifest\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = manifest.OCI1FromManifest(manifestBytes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, configBytes, err := p.callReadAllBytes(\"GetFullConfig\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar config imgspecv1.Image\n\terr = json.Unmarshal(configBytes, &config)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Validate that the image config seems sane\n\tif config.Architecture == \"\" {\n\t\treturn fmt.Errorf(\"No architecture found\")\n\t}\n\tif len(config.Config.Cmd) == 0 && len(config.Config.Entrypoint) == 0 {\n\t\treturn fmt.Errorf(\"No CMD or ENTRYPOINT set\")\n\t}\n\n\t_, layerInfoBytes, err := p.callReadAllBytes(\"GetLayerInfoPiped\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar layerInfoBytesData []any\n\terr = json.Unmarshal(layerInfoBytes, &layerInfoBytesData)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(layerInfoBytesData) == 0 {\n\t\treturn fmt.Errorf(\"expected layer info data\")\n\t}\n\n\t// Also test this legacy interface\n\t_, ctrconfigBytes, err := p.callReadAllBytes(\"GetConfig\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar ctrconfig imgspecv1.ImageConfig\n\terr = json.Unmarshal(ctrconfigBytes, &ctrconfig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Validate that the config seems sane\n\tif len(ctrconfig.Cmd) == 0 && len(ctrconfig.Entrypoint) == 0 {\n\t\treturn fmt.Errorf(\"No CMD or ENTRYPOINT set\")\n\t}\n\n\t_, err = p.callNoFd(\"CloseImage\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc runTestOpenImageOptionalNotFound(p *proxy, img string) error {\n\tv, err := p.callNoFd(\"OpenImageOptional\", []any{img})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\timgidv, ok := v.(float64)\n\tif !ok {\n\t\treturn fmt.Errorf(\"OpenImageOptional return value is %T\", v)\n\t}\n\timgid := uint64(imgidv)\n\tif imgid != 0 {\n\t\treturn fmt.Errorf(\"Unexpected optional image id %v\", imgid)\n\t}\n\treturn nil\n}\n\nfunc runTestGetBlob(p *proxy, img string) error {\n\timgid, err := p.callNoFd(\"OpenImage\", []any{img})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, manifestBytes, err := p.callReadAllBytes(\"GetManifest\", []any{imgid})\n\tif err != nil {\n\t\treturn err\n\t}\n\tmfest, err := manifest.OCI1FromManifest(manifestBytes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, layer := range mfest.Layers {\n\t\t_, blobBytes, err := p.callGetRawBlob([]any{imgid, layer.Digest})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(blobBytes) != int(layer.Size) {\n\t\t\tpanic(fmt.Sprintf(\"Expected %d bytes, got %d\", layer.Size, len(blobBytes)))\n\t\t}\n\t}\n\n\t// echo \"not a valid layer\" | sha256sum\n\tinvalidDigest := \"sha256:21a9aab5a3494674d2b4d8e7381c236a799384dd10545531014606cf652c119f\"\n\n\t_, blobBytes, err := p.callGetRawBlob([]any{imgid, invalidDigest})\n\tif err == nil {\n\t\tpanic(\"Expected error fetching invalid blob\")\n\t}\n\tif blobBytes != nil {\n\t\tpanic(\"Expected no bytes fetching invalid blob\")\n\t}\n\n\treturn nil\n}\n\nfunc (s *proxySuite) TestProxyMetadata() {\n\tt := s.T()\n\tp, err := newProxy()\n\trequire.NoError(t, err)\n\n\terr = runTestMetadataAPIs(p, knownNotManifestListedImageX8664)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Testing image %s: %v\", knownNotManifestListedImageX8664, err)\n\t}\n\tassert.NoError(t, err)\n\n\terr = runTestMetadataAPIs(p, knownListImage)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Testing image %s: %v\", knownListImage, err)\n\t}\n\tassert.NoError(t, err)\n\n\terr = runTestOpenImageOptionalNotFound(p, knownNotExtantImage)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Testing optional image %s: %v\", knownNotExtantImage, err)\n\t}\n\tassert.NoError(t, err)\n}\n\nfunc (s *proxySuite) TestProxyGetBlob() {\n\tt := s.T()\n\tp, err := newProxy()\n\trequire.NoError(t, err)\n\n\terr = runTestGetBlob(p, knownListImage)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Testing GetBLob for %s: %v\", knownListImage, err)\n\t}\n\tassert.NoError(t, err)\n}\n"
  },
  {
    "path": "integration/registry_test.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nconst (\n\tbinaryV2                 = \"registry\"\n\tbinaryV2Schema1Only      = \"registry-v2-schema1-only\"\n\tbinaryV2Schema1Supported = \"registry-v2-schema1-supported\"\n)\n\ntype registryVersion int\n\nconst (\n\tregistryVersionInvalid          registryVersion = iota\n\tregistryVersionModern                           // Whatever comes from a packaged docker-distribution; as of 2026-03 supports schema2, not schema1.\n\tregistryVersionSchema1Only                      // Supports only schema1\n\tregistryVersionSchema1Supported                 // Supports both schema1 and schema2\n)\n\ntype testRegistryV2 struct {\n\tcmd      *exec.Cmd\n\turl      string\n\tusername string\n\tpassword string\n\temail    string\n}\n\nfunc setupRegistryV2At(t *testing.T, url string, auth bool, version registryVersion) *testRegistryV2 {\n\treg, err := newTestRegistryV2At(t, url, auth, version)\n\trequire.NoError(t, err)\n\n\t// Wait for registry to be ready to serve requests.\n\tfor range 50 {\n\t\tif err = reg.Ping(); err == nil {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(100 * time.Millisecond)\n\t}\n\n\tif err != nil {\n\t\tt.Fatal(\"Timeout waiting for test registry to become available\")\n\t}\n\treturn reg\n}\n\nfunc newTestRegistryV2At(t *testing.T, url string, auth bool, version registryVersion) (*testRegistryV2, error) {\n\ttmp := t.TempDir()\n\ttemplate := `version: 0.1\nloglevel: debug\nstorage:\n    filesystem:\n        rootdirectory: %s\n    delete:\n        enabled: true\nhttp:\n    addr: %s\ncompatibility:\n    schema1:\n        enabled: true\n%s`\n\tvar (\n\t\thtpasswd string\n\t\tusername string\n\t\tpassword string\n\t\temail    string\n\t)\n\tif auth {\n\t\thtpasswdPath := filepath.Join(tmp, \"htpasswd\")\n\t\tuserpasswd := \"testuser:$2y$05$sBsSqk0OpSD1uTZkHXc4FeJ0Z70wLQdAX/82UiHuQOKbNbBrzs63m\"\n\t\tusername = \"testuser\"\n\t\tpassword = \"testpassword\"\n\t\temail = \"test@test.org\"\n\t\tif err := os.WriteFile(htpasswdPath, []byte(userpasswd), os.FileMode(0o644)); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thtpasswd = fmt.Sprintf(`auth:\n    htpasswd:\n        realm: basic-realm\n        path: %s\n`, htpasswdPath)\n\t}\n\tconfPath := filepath.Join(tmp, \"config.yaml\")\n\tconfig, err := os.Create(confPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := fmt.Fprintf(config, template, tmp, url, htpasswd); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar cmd *exec.Cmd\n\tswitch version {\n\tcase registryVersionModern:\n\t\tcmd = exec.Command(binaryV2, \"serve\", confPath)\n\tcase registryVersionSchema1Only:\n\t\tcmd = exec.Command(binaryV2Schema1Only, confPath)\n\tcase registryVersionSchema1Supported:\n\t\tcmd = exec.Command(binaryV2Schema1Supported, \"serve\", confPath)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"invalid registry version: %v\", version)\n\t}\n\n\tconsumeAndLogOutputs(t, fmt.Sprintf(\"registry-%s\", url), cmd)\n\tif err := cmd.Start(); err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tt.Skip(err.Error())\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn &testRegistryV2{\n\t\tcmd:      cmd,\n\t\turl:      url,\n\t\tusername: username,\n\t\tpassword: password,\n\t\temail:    email,\n\t}, nil\n}\n\nfunc (r *testRegistryV2) Ping() error {\n\t// We always ping through HTTP for our test registry.\n\tresp, err := http.Get(fmt.Sprintf(\"http://%s/v2/\", r.url))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized {\n\t\treturn fmt.Errorf(\"registry ping replied with an unexpected status code %d\", resp.StatusCode)\n\t}\n\treturn nil\n}\n\nfunc (r *testRegistryV2) tearDown() {\n\t// It’s undocumented what Kill() returns if the process has terminated,\n\t// so we couldn’t check just for that. This is running in a container anyway…\n\t_ = r.cmd.Process.Kill()\n}\n"
  },
  {
    "path": "integration/signing_test.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n\t\"go.podman.io/image/v5/signature\"\n)\n\nconst (\n\tgpgBinary = \"gpg\"\n)\n\nfunc TestSigning(t *testing.T) {\n\tsuite.Run(t, &signingSuite{})\n}\n\ntype signingSuite struct {\n\tsuite.Suite\n\tfingerprint string\n}\n\nvar _ = suite.SetupAllSuite(&signingSuite{})\n\nfunc (s *signingSuite) SetupSuite() {\n\tt := s.T()\n\t_, err := exec.LookPath(skopeoBinary)\n\trequire.NoError(t, err)\n\n\tgpgHome := t.TempDir()\n\tt.Setenv(\"GNUPGHOME\", gpgHome)\n\n\trunCommandWithInput(t, \"Key-Type: RSA\\nName-Real: Testing user\\n%no-protection\\n%commit\\n\", gpgBinary, \"--homedir\", gpgHome, \"--batch\", \"--gen-key\")\n\n\tlines, err := exec.Command(gpgBinary, \"--homedir\", gpgHome, \"--with-colons\", \"--no-permission-warning\", \"--fingerprint\").Output()\n\trequire.NoError(t, err)\n\ts.fingerprint, err = findFingerprint(lines)\n\trequire.NoError(t, err)\n}\n\nfunc (s *signingSuite) TestSignVerifySmoke() {\n\tt := s.T()\n\tmech, err := signature.NewGPGSigningMechanism()\n\trequire.NoError(t, err)\n\tdefer mech.Close()\n\tif err := mech.SupportsSigning(); err != nil { // FIXME? Test that verification and policy enforcement works, using signatures from fixtures\n\t\tt.Skipf(\"Signing not supported: %v\", err)\n\t}\n\n\tmanifestPath := \"fixtures/image.manifest.json\"\n\tdockerReference := \"testing/smoketest\"\n\n\tsigOutput := filepath.Join(t.TempDir(), \"sig\")\n\tassertSkopeoSucceeds(t, \"^$\", \"standalone-sign\", \"-o\", sigOutput,\n\t\tmanifestPath, dockerReference, s.fingerprint)\n\n\texpected := fmt.Sprintf(\"^Signature verified using fingerprint %s, digest %s\\n$\", s.fingerprint, TestImageManifestDigest)\n\tassertSkopeoSucceeds(t, expected, \"standalone-verify\", manifestPath,\n\t\tdockerReference, s.fingerprint, sigOutput)\n}\n"
  },
  {
    "path": "integration/sync_test.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"testing\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\t// A repository with a path with multiple components in it which\n\t// contains multiple tags, preferably with some tags pointing to\n\t// manifest lists, and with some tags that don't.\n\tpullableRepo = \"registry.k8s.io/coredns/coredns\"\n\t// A tagged image in the repository that we can inspect and copy.\n\tpullableTaggedImage = \"registry.k8s.io/coredns/coredns:v1.6.6\"\n\t// A tagged manifest list in the repository that we can inspect and copy.\n\tpullableTaggedManifestList = \"registry.k8s.io/coredns/coredns:v1.8.0\"\n\t// A repository containing multiple tags, some of which are for\n\t// manifest lists, and which includes a \"latest\" tag.  We specify the\n\t// name here without a tag.\n\tpullableRepoWithLatestTag = \"registry.k8s.io/pause\"\n)\n\nfunc TestSync(t *testing.T) {\n\tsuite.Run(t, &syncSuite{})\n}\n\ntype syncSuite struct {\n\tsuite.Suite\n\tcluster  *openshiftCluster\n\tregistry *testRegistryV2\n}\n\nvar (\n\t_ = suite.SetupAllSuite(&syncSuite{})\n\t_ = suite.TearDownAllSuite(&syncSuite{})\n)\n\nfunc (s *syncSuite) SetupSuite() {\n\tt := s.T()\n\n\tif os.Getenv(\"SKOPEO_LOCAL_TESTS\") == \"1\" {\n\t\tt.Log(\"Running tests without a container\")\n\t\tfmt.Printf(\"NOTE: tests requires a V2 registry at url=%s\\n\", v2DockerRegistryURL)\n\t\treturn\n\t}\n\n\tif os.Getenv(\"SKOPEO_CONTAINER_TESTS\") != \"1\" {\n\t\tt.Skip(\"Not running in a container, refusing to affect user state\")\n\t}\n\n\ts.cluster = startOpenshiftCluster(t) // FIXME: Set up TLS for the docker registry port instead of using \"--tls-verify=false\" all over the place.\n\n\tfor _, stream := range []string{\"unsigned\", \"personal\", \"official\", \"naming\", \"cosigned\", \"compression\", \"schema1\", \"schema2\"} {\n\t\tisJSON := fmt.Sprintf(`{\n\t\t\t\"kind\": \"ImageStream\",\n\t\t\t\"apiVersion\": \"v1\",\n\t\t\t\"metadata\": {\n\t\t\t    \"name\": \"%s\"\n\t\t\t},\n\t\t\t\"spec\": {}\n\t\t}`, stream)\n\t\trunCommandWithInput(t, isJSON, \"oc\", \"create\", \"-f\", \"-\")\n\t}\n\n\t// FIXME: Set up TLS for the docker registry port instead of using \"--tls-verify=false\" all over the place.\n\ts.registry = setupRegistryV2At(t, v2DockerRegistryURL, false, registryVersionModern)\n\n\tgpgHome := t.TempDir()\n\tt.Setenv(\"GNUPGHOME\", gpgHome)\n\n\tfor _, key := range []string{\"personal\", \"official\"} {\n\t\tbatchInput := fmt.Sprintf(\"Key-Type: RSA\\nName-Real: Test key - %s\\nName-email: %s@example.com\\n%%no-protection\\n%%commit\\n\",\n\t\t\tkey, key)\n\t\trunCommandWithInput(t, batchInput, gpgBinary, \"--batch\", \"--gen-key\")\n\n\t\tout := combinedOutputOfCommand(t, gpgBinary, \"--armor\", \"--export\", fmt.Sprintf(\"%s@example.com\", key))\n\t\terr := os.WriteFile(filepath.Join(gpgHome, fmt.Sprintf(\"%s-pubkey.gpg\", key)),\n\t\t\t[]byte(out), 0o600)\n\t\trequire.NoError(t, err)\n\t}\n}\n\nfunc (s *syncSuite) TearDownSuite() {\n\tt := s.T()\n\tif os.Getenv(\"SKOPEO_LOCAL_TESTS\") == \"1\" {\n\t\treturn\n\t}\n\n\tif s.registry != nil {\n\t\ts.registry.tearDown()\n\t}\n\tif s.cluster != nil {\n\t\ts.cluster.tearDown(t)\n\t}\n}\n\nfunc assertNumberOfManifestsInSubdirs(t *testing.T, dir string, expectedCount int) {\n\tnManifests := 0\n\terr := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !d.IsDir() && d.Name() == \"manifest.json\" {\n\t\t\tnManifests++\n\t\t\treturn filepath.SkipDir\n\t\t}\n\t\treturn nil\n\t})\n\trequire.NoError(t, err)\n\tassert.Equal(t, expectedCount, nManifests)\n}\n\nfunc (s *syncSuite) TestDocker2DirTagged() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableTaggedImage\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\tdir2 := path.Join(tmpDir, \"dir2\")\n\n\t// sync docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\t_, err = os.Stat(path.Join(dir1, imagePath, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://\"+image, \"dir:\"+dir2)\n\t_, err = os.Stat(path.Join(dir2, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", path.Join(dir1, imagePath), dir2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *syncSuite) TestDocker2DirTaggedAll() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableTaggedManifestList\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\tdir2 := path.Join(tmpDir, \"dir2\")\n\n\t// sync docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--all\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\t_, err = os.Stat(path.Join(dir1, imagePath, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--all\", \"docker://\"+image, \"dir:\"+dir2)\n\t_, err = os.Stat(path.Join(dir2, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", path.Join(dir1, imagePath), dir2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *syncSuite) TestPreserveDigests() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableTaggedManifestList\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--all\", \"--preserve-digests\", \"docker://\"+image, \"dir:\"+tmpDir)\n\t_, err := os.Stat(path.Join(tmpDir, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tassertSkopeoFails(t, \".*Instructed to preserve digests.*\",\n\t\t\"copy\", \"--retry-times\", \"3\", \"--all\", \"--preserve-digests\", \"--format=oci\", \"docker://\"+image, \"dir:\"+tmpDir)\n}\n\nfunc (s *syncSuite) TestScoped() {\n\tt := s.T()\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableTaggedImage\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\tdir1 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\t_, err = os.Stat(path.Join(dir1, path.Base(imagePath), \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\t_, err = os.Stat(path.Join(dir1, imagePath, \"manifest.json\"))\n\trequire.NoError(t, err)\n}\n\nfunc (s *syncSuite) TestDirIsNotOverwritten() {\n\tt := s.T()\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableRepoWithLatestTag\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\t// make a copy of the image in the local registry\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--dest-tls-verify=false\", \"docker://\"+image, \"docker://\"+path.Join(v2DockerRegistryURL, reference.Path(imageRef.DockerReference())))\n\n\t// sync upstream image to dir, not scoped\n\tdir1 := t.TempDir()\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\t_, err = os.Stat(path.Join(dir1, path.Base(imagePath), \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\t// sync local registry image to dir, not scoped\n\tassertSkopeoFails(t, \".*Refusing to overwrite destination directory.*\", \"sync\", \"--src-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"dir\", path.Join(v2DockerRegistryURL, reference.Path(imageRef.DockerReference())), dir1)\n\n\t// sync local registry image to dir, scoped\n\timageRef, err = docker.ParseReference(fmt.Sprintf(\"//%s\", path.Join(v2DockerRegistryURL, reference.Path(imageRef.DockerReference()))))\n\trequire.NoError(t, err)\n\timagePath = imageRef.DockerReference().String()\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--scoped\", \"--src-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"dir\", path.Join(v2DockerRegistryURL, reference.Path(imageRef.DockerReference())), dir1)\n\t_, err = os.Stat(path.Join(dir1, imagePath, \"manifest.json\"))\n\trequire.NoError(t, err)\n}\n\nfunc (s *syncSuite) TestDocker2DirUntagged() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableRepo\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", image, dir1)\n\n\tsysCtx := types.SystemContext{}\n\ttags, err := docker.GetRepositoryTags(context.Background(), &sysCtx, imageRef)\n\trequire.NoError(t, err)\n\tassert.NotZero(t, len(tags))\n\n\tnManifests, err := filepath.Glob(path.Join(dir1, path.Dir(imagePath), \"*\", \"manifest.json\"))\n\trequire.NoError(t, err)\n\tassert.Len(t, nManifests, len(tags))\n}\n\nfunc (s *syncSuite) TestYamlUntagged() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\n\timage := pullableRepo\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().Name()\n\n\tsysCtx := types.SystemContext{}\n\ttags, err := docker.GetRepositoryTags(context.Background(), &sysCtx, imageRef)\n\trequire.NoError(t, err)\n\tassert.NotZero(t, len(tags))\n\n\tyamlConfig := fmt.Sprintf(`\n%s:\n  images:\n    %s: []\n`, reference.Domain(imageRef.DockerReference()), reference.Path(imageRef.DockerReference()))\n\n\t// sync to the local registry\n\tyamlFile := path.Join(tmpDir, \"registries.yaml\")\n\terr = os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"docker\", \"--dest-tls-verify=false\", yamlFile, v2DockerRegistryURL)\n\t// sync back from local registry to a folder\n\tos.Remove(yamlFile)\n\tyamlConfig = fmt.Sprintf(`\n%s:\n  tls-verify: false\n  images:\n    %s: []\n`, v2DockerRegistryURL, imagePath)\n\n\terr = os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"dir\", yamlFile, dir1)\n\n\tsysCtx = types.SystemContext{\n\t\tDockerInsecureSkipTLSVerify: types.NewOptionalBool(true),\n\t}\n\tlocalImageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s/%s\", v2DockerRegistryURL, imagePath))\n\trequire.NoError(t, err)\n\tlocalTags, err := docker.GetRepositoryTags(context.Background(), &sysCtx, localImageRef)\n\trequire.NoError(t, err)\n\tassert.NotZero(t, len(localTags))\n\tassert.Len(t, localTags, len(tags))\n\tassertNumberOfManifestsInSubdirs(t, dir1, len(tags))\n}\n\nfunc (s *syncSuite) TestYamlRegex2Dir() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\n\tyamlConfig := `\nregistry.k8s.io:\n  images-by-tag-regex:\n    pause: ^[12]\\.0$  # regex string test\n`\n\t// the       ↑    regex strings always matches only 2 images\n\tnTags := 2\n\tassert.NotZero(t, nTags)\n\n\tyamlFile := path.Join(tmpDir, \"registries.yaml\")\n\terr := os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"dir\", yamlFile, dir1)\n\tassertNumberOfManifestsInSubdirs(t, dir1, nTags)\n}\n\nfunc (s *syncSuite) TestYamlDigest2Dir() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\n\tyamlConfig := `\nregistry.k8s.io:\n  images:\n    pause:\n    - sha256:59eec8837a4d942cc19a52b8c09ea75121acc38114a2c68b98983ce9356b8610\n`\n\tyamlFile := path.Join(tmpDir, \"registries.yaml\")\n\terr := os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"dir\", yamlFile, dir1)\n\tassertNumberOfManifestsInSubdirs(t, dir1, 1)\n}\n\nfunc (s *syncSuite) TestYaml2Dir() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\n\tyamlConfig := `\nregistry.k8s.io:\n  images:\n    coredns/coredns:\n      - v1.8.0\n      - v1.7.1\n    k8s-dns-kube-dns:\n      - 1.14.12\n      - 1.14.13\n    pause:\n      - latest\n\nquay.io:\n  images:\n    quay/busybox:\n      - latest`\n\n\t// get the number of tags\n\tre := regexp.MustCompile(`^ +- +[^:/ ]+`)\n\tvar nTags int\n\tfor l := range strings.SplitSeq(yamlConfig, \"\\n\") {\n\t\tif re.MatchString(l) {\n\t\t\tnTags++\n\t\t}\n\t}\n\tassert.NotZero(t, nTags)\n\n\tyamlFile := path.Join(tmpDir, \"registries.yaml\")\n\terr := os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\trequire.NoError(t, err)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"dir\", yamlFile, dir1)\n\tassertNumberOfManifestsInSubdirs(t, dir1, nTags)\n}\n\nfunc (s *syncSuite) TestYamlTLSVerify() {\n\tt := s.T()\n\tconst localRegURL = \"docker://\" + v2DockerRegistryURL + \"/\"\n\ttmpDir := t.TempDir()\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\timage := pullableRepoWithLatestTag\n\ttag := \"latest\"\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\t// copy docker => docker\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"--dest-tls-verify=false\", \"docker://\"+image+\":\"+tag, localRegURL+image+\":\"+tag)\n\n\tyamlTemplate := `\n%s:\n  %s\n  images:\n    %s:\n      - %s`\n\n\ttestCfg := []struct {\n\t\ttlsVerify string\n\t\tmsg       string\n\t\tchecker   func(t *testing.T, regexp string, args ...string)\n\t}{\n\t\t{\n\t\t\ttlsVerify: \"tls-verify: false\",\n\t\t\tmsg:       \"\",\n\t\t\tchecker:   assertSkopeoSucceeds,\n\t\t},\n\t\t{\n\t\t\ttlsVerify: \"tls-verify: true\",\n\t\t\tmsg:       \".*server gave HTTP response to HTTPS client.*\",\n\t\t\tchecker:   assertSkopeoFails,\n\t\t},\n\t\t// no \"tls-verify\" line means default TLS verify must be ON\n\t\t{\n\t\t\ttlsVerify: \"\",\n\t\t\tmsg:       \".*server gave HTTP response to HTTPS client.*\",\n\t\t\tchecker:   assertSkopeoFails,\n\t\t},\n\t}\n\n\tfor _, cfg := range testCfg {\n\t\tyamlConfig := fmt.Sprintf(yamlTemplate, v2DockerRegistryURL, cfg.tlsVerify, image, tag)\n\t\tyamlFile := path.Join(tmpDir, \"registries.yaml\")\n\t\terr := os.WriteFile(yamlFile, []byte(yamlConfig), 0o644)\n\t\trequire.NoError(t, err)\n\n\t\tcfg.checker(t, cfg.msg, \"sync\", \"--scoped\", \"--src\", \"yaml\", \"--dest\", \"dir\", yamlFile, dir1)\n\t\tos.Remove(yamlFile)\n\t\tos.RemoveAll(dir1)\n\t}\n}\n\nfunc (s *syncSuite) TestSyncManifestOutput() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\tdestDir1 := filepath.Join(tmpDir, \"dest1\")\n\tdestDir2 := filepath.Join(tmpDir, \"dest2\")\n\tdestDir3 := filepath.Join(tmpDir, \"dest3\")\n\n\t// Split image:tag path from image URI for manifest comparison\n\timageDir := pullableTaggedImage[strings.LastIndex(pullableTaggedImage, \"/\")+1:]\n\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--format=oci\", \"--all\", \"--src\", \"docker\", \"--dest\", \"dir\", pullableTaggedImage, destDir1)\n\tverifyManifestMIMEType(t, filepath.Join(destDir1, imageDir), imgspecv1.MediaTypeImageManifest)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--format=v2s2\", \"--all\", \"--src\", \"docker\", \"--dest\", \"dir\", pullableTaggedImage, destDir2)\n\tverifyManifestMIMEType(t, filepath.Join(destDir2, imageDir), manifest.DockerV2Schema2MediaType)\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--format=v2s1\", \"--all\", \"--src\", \"docker\", \"--dest\", \"dir\", pullableTaggedImage, destDir3)\n\tverifyManifestMIMEType(t, filepath.Join(destDir3, imageDir), manifest.DockerV2Schema1SignedMediaType)\n}\n\nfunc (s *syncSuite) TestDocker2DockerTagged() {\n\tt := s.T()\n\tconst localRegURL = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableTaggedImage\n\timageRef, err := docker.ParseReference(fmt.Sprintf(\"//%s\", image))\n\trequire.NoError(t, err)\n\timagePath := imageRef.DockerReference().String()\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\tdir2 := path.Join(tmpDir, \"dir2\")\n\n\t// sync docker => docker\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--retry-times\", \"3\", \"--scoped\", \"--dest-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"docker\", image, v2DockerRegistryURL)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://\"+image, \"dir:\"+dir1)\n\t_, err = os.Stat(path.Join(dir1, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", localRegURL+imagePath, \"dir:\"+dir2)\n\t_, err = os.Stat(path.Join(dir2, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", dir1, dir2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *syncSuite) TestDir2DockerTagged() {\n\tt := s.T()\n\tconst localRegURL = \"docker://\" + v2DockerRegistryURL + \"/\"\n\n\ttmpDir := t.TempDir()\n\n\t// FIXME: It would be nice to use one of the local Docker registries instead of needing an Internet connection.\n\timage := pullableRepoWithLatestTag\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\terr := os.Mkdir(dir1, 0o755)\n\trequire.NoError(t, err)\n\tdir2 := path.Join(tmpDir, \"dir2\")\n\terr = os.Mkdir(dir2, 0o755)\n\trequire.NoError(t, err)\n\n\t// create leading dirs\n\terr = os.MkdirAll(path.Dir(path.Join(dir1, image)), 0o755)\n\trequire.NoError(t, err)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--retry-times\", \"3\", \"docker://\"+image, \"dir:\"+path.Join(dir1, image))\n\t_, err = os.Stat(path.Join(dir1, image, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\t// sync dir => docker\n\tassertSkopeoSucceeds(t, \"\", \"sync\", \"--scoped\", \"--dest-tls-verify=false\", \"--src\", \"dir\", \"--dest\", \"docker\", dir1, v2DockerRegistryURL)\n\n\t// create leading dirs\n\terr = os.MkdirAll(path.Dir(path.Join(dir2, image)), 0o755)\n\trequire.NoError(t, err)\n\n\t// copy docker => dir\n\tassertSkopeoSucceeds(t, \"\", \"copy\", \"--src-tls-verify=false\", localRegURL+image, \"dir:\"+path.Join(dir2, image))\n\t_, err = os.Stat(path.Join(dir2, image, \"manifest.json\"))\n\trequire.NoError(t, err)\n\n\tout := combinedOutputOfCommand(t, \"diff\", \"-urN\", dir1, dir2)\n\tassert.Equal(t, \"\", out)\n}\n\nfunc (s *syncSuite) TestFailsWithDir2Dir() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\tdir1 := path.Join(tmpDir, \"dir1\")\n\tdir2 := path.Join(tmpDir, \"dir2\")\n\n\t// sync dir => dir is not allowed\n\tassertSkopeoFails(t, \".*sync from 'dir' to 'dir' not implemented.*\", \"sync\", \"--scoped\", \"--src\", \"dir\", \"--dest\", \"dir\", dir1, dir2)\n}\n\nfunc (s *syncSuite) TestFailsNoSourceImages() {\n\tt := s.T()\n\ttmpDir := t.TempDir()\n\n\tassertSkopeoFails(t, \".*No images to sync found in .*\",\n\t\t\"sync\", \"--scoped\", \"--dest-tls-verify=false\", \"--src\", \"dir\", \"--dest\", \"docker\", tmpDir, v2DockerRegistryURL)\n\n\tassertSkopeoFails(t, \".*Error determining repository tags for repo docker.io/library/hopefully_no_images_will_ever_be_called_like_this: fetching tags list: requested access to the resource is denied.*\",\n\t\t\"sync\", \"--scoped\", \"--dest-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"docker\", \"hopefully_no_images_will_ever_be_called_like_this\", v2DockerRegistryURL)\n}\n\nfunc (s *syncSuite) TestFailsWithDockerSourceNoRegistry() {\n\tt := s.T()\n\tconst regURL = \"google.com/namespace/imagename\"\n\n\ttmpDir := t.TempDir()\n\n\t// untagged\n\tassertSkopeoFails(t, \".*StatusCode: 404.*\",\n\t\t\"sync\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", regURL, tmpDir)\n\n\t// tagged\n\tassertSkopeoFails(t, \".*StatusCode: 404.*\",\n\t\t\"sync\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", regURL+\":thetag\", tmpDir)\n}\n\nfunc (s *syncSuite) TestFailsWithDockerSourceUnauthorized() {\n\tt := s.T()\n\tconst repo = \"privateimagenamethatshouldnotbepublic\"\n\ttmpDir := t.TempDir()\n\n\t// untagged\n\tassertSkopeoFails(t, \".*requested access to the resource is denied.*\",\n\t\t\"sync\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", repo, tmpDir)\n\n\t// tagged\n\tassertSkopeoFails(t, \".*requested access to the resource is denied.*\",\n\t\t\"sync\", \"--scoped\", \"--src\", \"docker\", \"--dest\", \"dir\", repo+\":thetag\", tmpDir)\n}\n\nfunc (s *syncSuite) TestFailsWithDockerSourceNotExisting() {\n\tt := s.T()\n\trepo := path.Join(v2DockerRegistryURL, \"imagedoesnotexist\")\n\ttmpDir := t.TempDir()\n\n\t// untagged\n\tassertSkopeoFails(t, \".*repository name not known to registry.*\",\n\t\t\"sync\", \"--scoped\", \"--src-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"dir\", repo, tmpDir)\n\n\t// tagged\n\tassertSkopeoFails(t, \".*reading manifest.*\",\n\t\t\"sync\", \"--scoped\", \"--src-tls-verify=false\", \"--src\", \"docker\", \"--dest\", \"dir\", repo+\":thetag\", tmpDir)\n}\n\nfunc (s *syncSuite) TestFailsWithDirSourceNotExisting() {\n\tt := s.T()\n\t// Make sure the dir does not exist!\n\ttmpDir := t.TempDir()\n\ttmpDir = filepath.Join(tmpDir, \"this-does-not-exist\")\n\terr := os.RemoveAll(tmpDir)\n\trequire.NoError(t, err)\n\t_, err = os.Stat(path.Join(tmpDir))\n\tassert.True(t, os.IsNotExist(err))\n\n\tassertSkopeoFails(t, \".*no such file or directory.*\",\n\t\t\"sync\", \"--scoped\", \"--dest-tls-verify=false\", \"--src\", \"dir\", \"--dest\", \"docker\", tmpDir, v2DockerRegistryURL)\n}\n"
  },
  {
    "path": "integration/tls_test.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n\t\"go.podman.io/image/v5/oci/layout\"\n)\n\nfunc TestTLS(t *testing.T) {\n\tsuite.Run(t, &tlsSuite{})\n}\n\ntype tlsSuite struct {\n\tsuite.Suite\n\tdefaultServer *tlsConfigServer\n\ttls12Server   *tlsConfigServer\n\tnonPQCserver  *tlsConfigServer\n\tpqcServer     *tlsConfigServer\n\n\texpected []expectedBehavior\n}\n\nvar (\n\t_ = suite.SetupAllSuite(&tlsSuite{})\n\t_ = suite.TearDownAllSuite(&tlsSuite{})\n)\n\ntype expectedBehavior struct {\n\tserver     *tlsConfigServer\n\ttlsDetails string\n\texpected   string\n}\n\nfunc (s *tlsSuite) SetupSuite() {\n\tt := s.T()\n\n\ts.defaultServer = newServer(t, &tls.Config{})\n\ts.tls12Server = newServer(t, &tls.Config{\n\t\tMaxVersion: tls.VersionTLS12,\n\t})\n\ts.nonPQCserver = newServer(t, &tls.Config{\n\t\tMinVersion:       tls.VersionTLS13,\n\t\tCurvePreferences: []tls.CurveID{tls.X25519, tls.CurveP256, tls.CurveP384, tls.CurveP521},\n\t})\n\ts.pqcServer = newServer(t, &tls.Config{\n\t\tMinVersion:       tls.VersionTLS13,\n\t\tCurvePreferences: []tls.CurveID{tls.X25519MLKEM768},\n\t})\n\n\ts.expected = []expectedBehavior{\n\t\t{\n\t\t\tserver:     s.defaultServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-anything.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.tls12Server,\n\t\t\ttlsDetails: \"fixtures/tls-details-anything.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.nonPQCserver,\n\t\t\ttlsDetails: \"fixtures/tls-details-anything.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.pqcServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-anything.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\n\t\t{\n\t\t\tserver:     s.defaultServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-1.3.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.tls12Server,\n\t\t\ttlsDetails: \"fixtures/tls-details-1.3.yaml\",\n\t\t\texpected:   `protocol version not supported`,\n\t\t},\n\t\t{\n\t\t\tserver:     s.nonPQCserver,\n\t\t\ttlsDetails: \"fixtures/tls-details-1.3.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.pqcServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-1.3.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\n\t\t{\n\t\t\tserver:     s.defaultServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-pqc-only.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t\t{\n\t\t\tserver:     s.tls12Server,\n\t\t\ttlsDetails: \"fixtures/tls-details-pqc-only.yaml\",\n\t\t\texpected:   `protocol version not supported`,\n\t\t},\n\t\t{\n\t\t\tserver:     s.nonPQCserver,\n\t\t\ttlsDetails: \"fixtures/tls-details-pqc-only.yaml\",\n\t\t\texpected:   `handshake failure`,\n\t\t},\n\t\t{\n\t\t\tserver:     s.pqcServer,\n\t\t\ttlsDetails: \"fixtures/tls-details-pqc-only.yaml\",\n\t\t\texpected:   `\\b418\\b`, // \"I'm a teapot\"\n\t\t},\n\t}\n}\n\nfunc (s *tlsSuite) TearDownSuite() {\n}\n\nfunc (s *tlsSuite) TestDockerDaemon() {\n\tt := s.T()\n\n\t// Our server doesn’t perform client authentication, but the docker-daemon: option semantics\n\t// requires us to provide a certificate if we want to specify a CA.\n\tdockerCertPath := t.TempDir()\n\tcaPath := filepath.Join(dockerCertPath, \"ca.pem\")\n\n\tprivateKey, err := rsa.GenerateKey(rand.Reader, 4096)\n\trequire.NoError(t, err)\n\tpublicKey := &privateKey.PublicKey\n\n\terr = os.WriteFile(filepath.Join(dockerCertPath, \"key.pem\"), pem.EncodeToMemory(&pem.Block{\n\t\tType:  \"RSA PRIVATE KEY\",\n\t\tBytes: x509.MarshalPKCS1PrivateKey(privateKey),\n\t}), 0o644)\n\trequire.NoError(t, err)\n\n\treferenceTime := time.Now()\n\ttemplate := &x509.Certificate{\n\t\tSubject: pkix.Name{\n\t\t\tCommonName: \"client\",\n\t\t},\n\t\tNotBefore: referenceTime.Add(-1 * time.Minute),\n\t\tNotAfter:  referenceTime.Add(1 * time.Hour),\n\t}\n\tcertDER, err := x509.CreateCertificate(rand.Reader, template, template, publicKey, privateKey)\n\trequire.NoError(t, err)\n\terr = os.WriteFile(filepath.Join(dockerCertPath, \"cert.pem\"), pem.EncodeToMemory(&pem.Block{\n\t\tType:  \"CERTIFICATE\",\n\t\tBytes: certDER,\n\t}), 0o644)\n\trequire.NoError(t, err)\n\n\tfor _, e := range s.expected {\n\t\terr := os.WriteFile(caPath, e.server.certBytes, 0o644)\n\t\trequire.NoError(t, err)\n\t\tassertSkopeoFails(t, e.expected, \"--tls-details\", e.tlsDetails, \"inspect\", \"--daemon-host\", e.server.server.URL, \"--cert-dir\", dockerCertPath, \"docker-daemon:repo:tag\")\n\t}\n}\n\nfunc (s *tlsSuite) TestRegistry() {\n\tt := s.T()\n\n\tcaDir := t.TempDir()\n\tcaPath := filepath.Join(caDir, \"ca.crt\")\n\n\tfor _, e := range s.expected {\n\t\terr := os.WriteFile(caPath, e.server.certBytes, 0o644)\n\t\trequire.NoError(t, err)\n\t\tassertSkopeoFails(t, e.expected, \"--tls-details\", e.tlsDetails, \"inspect\", \"--cert-dir\", caDir, \"docker://\"+e.server.hostPort+\"/repo\")\n\t}\n}\n\nfunc (s *tlsSuite) TestOCILayout() {\n\tt := s.T()\n\n\tcaDir := t.TempDir()\n\tcaPath := filepath.Join(caDir, \"ca.crt\")\n\n\tfor _, e := range s.expected {\n\t\terr := os.WriteFile(caPath, e.server.certBytes, 0o644)\n\t\trequire.NoError(t, err)\n\n\t\tociLayoutDir := t.TempDir()\n\t\tdestRef, err := layout.NewReference(ociLayoutDir, \"repo:tag\")\n\t\trequire.NoError(t, err)\n\t\tdest, err := destRef.NewImageDestination(context.Background(), nil)\n\t\trequire.NoError(t, err)\n\t\tmanifestBytes, err := json.Marshal(imgspecv1.Manifest{\n\t\t\tVersioned: specs.Versioned{SchemaVersion: 2},\n\t\t\tMediaType: imgspecv1.MediaTypeImageManifest,\n\t\t\tConfig: imgspecv1.Descriptor{\n\t\t\t\tMediaType: imgspecv1.MediaTypeImageConfig,\n\t\t\t\tDigest:    \"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n\t\t\t\tSize:      42,\n\t\t\t\tURLs:      []string{e.server.server.URL + \"/config.json\"},\n\t\t\t},\n\t\t\tLayers:       []imgspecv1.Descriptor{},\n\t\t\tArtifactType: \"\",\n\t\t\tSubject:      &imgspecv1.Descriptor{},\n\t\t\tAnnotations:  map[string]string{},\n\t\t})\n\t\trequire.NoError(t, err)\n\t\terr = dest.PutManifest(context.Background(), manifestBytes, nil)\n\t\trequire.NoError(t, err)\n\t\terr = dest.Commit(context.Background(), nil) // nil is technically invalid, but works here\n\t\trequire.NoError(t, err)\n\t\terr = dest.Close()\n\t\trequire.NoError(t, err)\n\n\t\t// We don’t expose types.OCICertPath in the CLI. But if we get far enough to be worrying about certificates,\n\t\t// we already negotiated the TLS version and named group.\n\t\texpected := e.expected\n\t\tif expected == `\\b418\\b` {\n\t\t\texpected = `certificate signed by unknown authority`\n\t\t}\n\t\tassertSkopeoFails(t, expected, \"--tls-details\", e.tlsDetails, \"inspect\", \"oci:\"+ociLayoutDir)\n\t}\n}\n\nfunc (s *tlsSuite) TestOpenShift() {\n\tt := s.T()\n\n\tconfigDir := t.TempDir()\n\tconfigPath := filepath.Join(configDir, \"kubeconfig\")\n\tt.Setenv(\"KUBECONFIG\", configPath)\n\n\tfor _, e := range s.expected {\n\t\terr := os.WriteFile(configPath, fmt.Appendf(nil,\n\t\t\t`apiVersion: v1\nclusters:\n- cluster:\n    certificate-authority: \"%s\"\n    server: \"%s\"\n  name: our-cluster\ncontexts:\n- context:\n    cluster: our-cluster\n    namespace: default\n  name: our-context\ncurrent-context: our-context\nkind: Config\n`, e.server.certPath, e.server.server.URL), 0o644)\n\t\trequire.NoError(t, err)\n\t\t// The atomic: image access starts with resolving the tag in a k8s API (and that will always fail, one way or another),\n\t\t// so we never actually contact registry.example.\n\t\tassertSkopeoFails(t, e.expected, \"--tls-details\", e.tlsDetails, \"inspect\", \"atomic:registry.example/namespace/repo:tag\")\n\t}\n}\n\n// tlsConfigServer serves TLS with a specific configuration.\n// It returns StatusTeapot on all requests; we use that to detect that the TLS negotiation succeeded,\n// without bothering to actually implement any of the protocols.\ntype tlsConfigServer struct {\n\tserver    *httptest.Server\n\thostPort  string\n\tcertBytes []byte\n\tcertPath  string\n}\n\nfunc newServer(t *testing.T, config *tls.Config) *tlsConfigServer {\n\tserver := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tw.WriteHeader(http.StatusTeapot)\n\t}))\n\tt.Cleanup(server.Close)\n\n\tserver.TLS = config.Clone()\n\tserver.StartTLS()\n\n\tcertBytes := pem.EncodeToMemory(&pem.Block{\n\t\tType:  \"CERTIFICATE\",\n\t\tBytes: server.Certificate().Raw,\n\t})\n\tcertDir := t.TempDir()\n\tcertPath := filepath.Join(certDir, \"cert.pem\")\n\terr := os.WriteFile(certPath, certBytes, 0o644)\n\trequire.NoError(t, err)\n\n\treturn &tlsConfigServer{\n\t\tserver:    server,\n\t\thostPort:  server.Listener.Addr().String(),\n\t\tcertBytes: certBytes,\n\t\tcertPath:  certPath,\n\t}\n}\n"
  },
  {
    "path": "integration/user_agent_test.go",
    "content": "package main\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\n// mockRegistryHandler implements a minimal Docker Registry V2 API that captures User-Agent headers\ntype mockRegistryHandler struct {\n\tmu         sync.Mutex\n\tuserAgents []string\n}\n\nfunc (h *mockRegistryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\t// Capture the User-Agent header\n\th.mu.Lock()\n\th.userAgents = append(h.userAgents, r.Header.Get(\"User-Agent\"))\n\th.mu.Unlock()\n\n\t// Implement minimal Docker Registry V2 API endpoints for inspect --raw\n\tswitch {\n\tcase r.URL.Path == \"/v2/\":\n\t\t// Registry version check endpoint\n\t\tw.Header().Set(\"Docker-Distribution-API-Version\", \"registry/2.0\")\n\t\tw.WriteHeader(http.StatusOK)\n\n\tcase strings.HasSuffix(r.URL.Path, \"/manifests/latest\"):\n\t\t// Return a minimal OCI manifest as raw string\n\t\t// The digest matches this exact content\n\t\tmanifest := `{\"schemaVersion\":2,\"mediaType\":\"application/vnd.oci.image.manifest.v1+json\",\"config\":{\"mediaType\":\"application/vnd.oci.image.config.v1+json\",\"digest\":\"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a\",\"size\":2},\"layers\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":0}]}`\n\t\tw.Header().Set(\"Content-Type\", \"application/vnd.oci.image.manifest.v1+json\")\n\t\tw.WriteHeader(http.StatusOK)\n\t\tif _, err := w.Write([]byte(manifest)); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\tdefault:\n\t\tw.WriteHeader(http.StatusNotFound)\n\t}\n}\n\nfunc (h *mockRegistryHandler) getUserAgents() []string {\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\treturn slices.Clone(h.userAgents)\n}\n\nfunc TestUserAgent(t *testing.T) {\n\ttestCases := []struct {\n\t\tname               string\n\t\textraArgs          []string\n\t\tuserAgentValidator func(string) bool\n\t\tdescription        string\n\t}{\n\t\t{\n\t\t\tname:      \"default user agent\",\n\t\t\textraArgs: []string{},\n\t\t\tuserAgentValidator: func(ua string) bool {\n\t\t\t\treturn strings.HasPrefix(ua, \"skopeo/\")\n\t\t\t},\n\t\t\tdescription: \"Default user agent should start with 'skopeo/'\",\n\t\t},\n\t\t{\n\t\t\tname:      \"custom user agent prefix\",\n\t\t\textraArgs: []string{\"--user-agent-prefix\", \"bootc/1.0\"},\n\t\t\tuserAgentValidator: func(ua string) bool {\n\t\t\t\treturn strings.HasPrefix(ua, \"bootc/1.0 skopeo/\")\n\t\t\t},\n\t\t\tdescription: \"Custom user agent should be in format 'prefix skopeo/version'\",\n\t\t},\n\t\t{\n\t\t\tname:      \"prefix with spaces\",\n\t\t\textraArgs: []string{\"--user-agent-prefix\", \"my cool app\"},\n\t\t\tuserAgentValidator: func(ua string) bool {\n\t\t\t\treturn strings.HasPrefix(ua, \"my cool app skopeo/\")\n\t\t\t},\n\t\t\tdescription: \"User agent with spaces should work correctly\",\n\t\t},\n\t}\n\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.name, func(t *testing.T) {\n\t\t\thandler := &mockRegistryHandler{}\n\t\t\tserver := httptest.NewServer(handler)\n\t\t\tdefer server.Close()\n\n\t\t\t// Extract host:port from the test server URL\n\t\t\tregistryAddr := strings.TrimPrefix(server.URL, \"http://\")\n\t\t\timageRef := \"docker://\" + registryAddr + \"/test/image:latest\"\n\n\t\t\t// Build arguments: base args + test-specific args + image ref\n\t\t\targs := append([]string{\"--tls-verify=false\"}, tc.extraArgs...)\n\t\t\targs = append(args, \"inspect\", \"--raw\", imageRef)\n\n\t\t\t// Run skopeo inspect --raw\n\t\t\tassertSkopeoSucceeds(t, \"\", args...)\n\n\t\t\t// Verify that at least one request was made with the expected User-Agent\n\t\t\tuserAgents := handler.getUserAgents()\n\t\t\trequire.NotEmpty(t, userAgents, \"Expected at least one request to be made\")\n\n\t\t\t// Check that at least one User-Agent matches the validator\n\t\t\trequire.True(t,\n\t\t\t\tslices.ContainsFunc(userAgents, tc.userAgentValidator),\n\t\t\t\t\"%s, got: %v\", tc.description, userAgents)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "integration/utils_test.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n\t\"net\"\n\t\"net/netip\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.podman.io/image/v5/manifest\"\n)\n\n// FIXME: Move to SetupSuite\n// https://github.com/containers/skopeo/pull/2703#discussion_r2331374730\nvar skopeoBinary = func() string {\n\tif binary := os.Getenv(\"SKOPEO_BINARY\"); binary != \"\" {\n\t\treturn binary\n\t}\n\treturn \"skopeo\"\n}()\n\n// findFingerprint extracts the GPG key fingerprint from gpg --with-colons output.\nfunc findFingerprint(lineBytes []byte) (string, error) {\n\tfor line := range bytes.SplitSeq(lineBytes, []byte{'\\n'}) {\n\t\tfields := strings.Split(string(line), \":\")\n\t\tif len(fields) >= 10 && fields[0] == \"fpr\" {\n\t\t\treturn fields[9], nil\n\t\t}\n\t}\n\treturn \"\", errors.New(\"No fingerprint found\")\n}\n\nconst (\n\ttestFQIN           = \"docker://quay.io/libpod/busybox\" // tag left off on purpose, some tests need to add a special one\n\ttestFQIN64         = \"docker://quay.io/libpod/busybox:amd64\"\n\ttestFQINMultiLayer = \"docker://quay.io/libpod/alpine_nginx:latest\" // multi-layer\n)\n\n// consumeAndLogOutputStream takes (f, err) from an exec.*Pipe(), and causes all output to it to be logged to t.\nfunc consumeAndLogOutputStream(t *testing.T, id string, f io.ReadCloser, err error) {\n\trequire.NoError(t, err)\n\tgo func() {\n\t\tdefer func() {\n\t\t\tf.Close()\n\t\t\tt.Logf(\"Output %s: Closed\", id)\n\t\t}()\n\t\tbuf := make([]byte, 1024)\n\t\tfor {\n\t\t\tt.Logf(\"Output %s: waiting\", id)\n\t\t\tn, err := f.Read(buf)\n\t\t\tt.Logf(\"Output %s: got %d,%#v: %s\", id, n, err, strings.TrimSuffix(string(buf[:n]), \"\\n\"))\n\t\t\tif n <= 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}()\n}\n\n// consumeAndLogOutputs causes all output to stdout and stderr from an *exec.Cmd to be logged to c.\nfunc consumeAndLogOutputs(t *testing.T, id string, cmd *exec.Cmd) {\n\tstdout, err := cmd.StdoutPipe()\n\tconsumeAndLogOutputStream(t, id+\" stdout\", stdout, err)\n\tstderr, err := cmd.StderrPipe()\n\tconsumeAndLogOutputStream(t, id+\" stderr\", stderr, err)\n}\n\n// combinedOutputOfCommand runs a command as if exec.Command().CombinedOutput(), verifies that the exit status is 0, and returns the output,\n// or terminates t on failure.\nfunc combinedOutputOfCommand(t *testing.T, name string, args ...string) string {\n\tt.Logf(\"Running %s %s\", name, strings.Join(args, \" \"))\n\tout, err := exec.Command(name, args...).CombinedOutput()\n\trequire.NoError(t, err, \"%s\", out)\n\treturn string(out)\n}\n\n// assertSkopeoSucceeds runs a skopeo command as if exec.Command().CombinedOutput, verifies that the exit status is 0,\n// and optionally that the output matches a multi-line regexp if it is nonempty\nfunc assertSkopeoSucceeds(t *testing.T, regexp string, args ...string) {\n\tt.Logf(\"Running %s %s\", skopeoBinary, strings.Join(args, \" \"))\n\tout, err := exec.Command(skopeoBinary, args...).CombinedOutput()\n\tassert.NoError(t, err, \"%s\", out)\n\tif regexp != \"\" {\n\t\tassert.Regexp(t, \"(?s)\"+regexp, string(out)) // (?s) : '.' will also match newlines\n\t}\n}\n\n// assertSkopeoFails runs a skopeo command as if exec.Command().CombinedOutput, verifies that the exit status is not 0,\n// and that the output matches a multi-line regexp\nfunc assertSkopeoFails(t *testing.T, regexp string, args ...string) {\n\tt.Logf(\"Running %s %s\", skopeoBinary, strings.Join(args, \" \"))\n\tout, err := exec.Command(skopeoBinary, args...).CombinedOutput()\n\tassert.Error(t, err, \"%s\", out)\n\tassert.Regexp(t, \"(?s)\"+regexp, string(out)) // (?s) : '.' will also match newlines\n}\n\n// assertSkopeoFailsWithStatus runs a skopeo command as if exec.Command().CombinedOutput,\n// and verifies that it fails with a specific exit status.\nfunc assertSkopeoFailsWithStatus(t *testing.T, status int, args ...string) {\n\tt.Logf(\"Running %s %s\", skopeoBinary, strings.Join(args, \" \"))\n\t_, err := exec.Command(skopeoBinary, args...).CombinedOutput()\n\tvar exitErr *exec.ExitError\n\trequire.ErrorAs(t, err, &exitErr)\n\tassert.Equal(t, status, exitErr.ExitCode())\n}\n\n// runCommandWithInput runs a command as if exec.Command(), sending it the input to stdin,\n// and verifies that the exit status is 0, or terminates t on failure.\nfunc runCommandWithInput(t *testing.T, input string, name string, args ...string) {\n\tcmd := exec.Command(name, args...)\n\trunExecCmdWithInput(t, cmd, input)\n}\n\n// runExecCmdWithInput runs an exec.Cmd, sending it the input to stdin,\n// and verifies that the exit status is 0, or terminates t on failure.\nfunc runExecCmdWithInput(t *testing.T, cmd *exec.Cmd, input string) {\n\tt.Logf(\"Running %s %s\", cmd.Path, strings.Join(cmd.Args, \" \"))\n\tconsumeAndLogOutputs(t, cmd.Path+\" \"+strings.Join(cmd.Args, \" \"), cmd)\n\tstdin, err := cmd.StdinPipe()\n\trequire.NoError(t, err)\n\terr = cmd.Start()\n\trequire.NoError(t, err)\n\t_, err = io.WriteString(stdin, input)\n\trequire.NoError(t, err)\n\terr = stdin.Close()\n\trequire.NoError(t, err)\n\terr = cmd.Wait()\n\tassert.NoError(t, err)\n}\n\n// isPortOpen returns true iff the specified port on localhost is open.\nfunc isPortOpen(port uint16) bool {\n\tap := netip.AddrPortFrom(netip.AddrFrom4([4]byte{127, 0, 0, 1}), port)\n\tconn, err := net.DialTCP(\"tcp\", nil, net.TCPAddrFromAddrPort(ap))\n\tif err != nil {\n\t\treturn false\n\t}\n\tconn.Close()\n\treturn true\n}\n\n// newPortChecker sets up a portOpen channel which will receive true after the specified port is open.\n// The checking can be aborted by sending a value to the terminate channel, which the caller should\n// always do using\n// defer func() {terminate <- true}()\nfunc newPortChecker(t *testing.T, port uint16) (portOpen <-chan bool, terminate chan<- bool) {\n\tportOpenBidi := make(chan bool)\n\t// Buffered, so that sending a terminate request after the goroutine has exited does not block.\n\tterminateBidi := make(chan bool, 1)\n\n\tgo func() {\n\t\tdefer func() {\n\t\t\tt.Logf(\"Port checker for port %d exiting\", port)\n\t\t}()\n\t\tfor {\n\t\t\tt.Logf(\"Checking for port %d...\", port)\n\t\t\tif isPortOpen(port) {\n\t\t\t\tt.Logf(\"Port %d open\", port)\n\t\t\t\tportOpenBidi <- true\n\t\t\t\treturn\n\t\t\t}\n\t\t\tt.Logf(\"Sleeping for port %d\", port)\n\t\t\tsleepChan := time.After(100 * time.Millisecond)\n\t\t\tselect {\n\t\t\tcase <-sleepChan: // Try again\n\t\t\t\tt.Logf(\"Sleeping for port %d done, will retry\", port)\n\t\t\tcase <-terminateBidi:\n\t\t\t\tt.Logf(\"Check for port %d terminated\", port)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\treturn portOpenBidi, terminateBidi\n}\n\n// modifyEnviron modifies os.Environ()-like list of name=value assignments to set name to value.\nfunc modifyEnviron(env []string, name, value string) []string {\n\tprefix := name + \"=\"\n\tres := []string{}\n\tfor _, e := range env {\n\t\tif !strings.HasPrefix(e, prefix) {\n\t\t\tres = append(res, e)\n\t\t}\n\t}\n\treturn append(res, prefix+value)\n}\n\n// fileFromFixture applies edits to inputPath and returns a path to the temporary file with the edits,\n// which will be automatically removed when the test completes.\nfunc fileFromFixture(t *testing.T, inputPath string, edits map[string]string) string {\n\tcontents, err := os.ReadFile(inputPath)\n\trequire.NoError(t, err)\n\tfor template, value := range edits {\n\t\tupdated := bytes.ReplaceAll(contents, []byte(template), []byte(value))\n\t\trequire.NotEqual(t, contents, updated, \"Replacing %s in %#v failed\", template, string(contents)) // Verify that the template has matched something and we are not silently ignoring it.\n\t\tcontents = updated\n\t}\n\n\tpath := filepath.Join(t.TempDir(), \"policy.json\")\n\n\terr = os.WriteFile(path, contents, 0o600)\n\trequire.NoError(t, err)\n\treturn path\n}\n\n// decompressDirs decompresses specified dir:-formatted directories\nfunc decompressDirs(t *testing.T, dirs ...string) {\n\tt.Logf(\"Decompressing %s\", strings.Join(dirs, \" \"))\n\tfor i, dir := range dirs {\n\t\tm, err := os.ReadFile(filepath.Join(dir, \"manifest.json\"))\n\t\trequire.NoError(t, err)\n\t\tt.Logf(\"manifest %d before: %s\", i+1, string(m))\n\n\t\tdecompressDir(t, dir)\n\n\t\tm, err = os.ReadFile(filepath.Join(dir, \"manifest.json\"))\n\t\trequire.NoError(t, err)\n\t\tt.Logf(\"manifest %d after: %s\", i+1, string(m))\n\t}\n}\n\n// getRawMapField assigns a value of rawMap[key] to dest,\n// failing if it does not exist or if it doesn’t have the expected type\nfunc getRawMapField[T any](t *testing.T, rawMap map[string]any, key string, dest *T) {\n\trawValue, ok := rawMap[key]\n\trequire.True(t, ok, key)\n\tvalue, ok := rawValue.(T)\n\trequire.True(t, ok, key, \"%#v\", value)\n\t*dest = value\n}\n\n// decompressDir modifies a dir:-formatted directory to replace gzip-compressed layers with uncompressed variants,\n// and to use a ~canonical formatting of manifest.json.\nfunc decompressDir(t *testing.T, dir string) {\n\t// This is, overall, very dumb; the “obvious” way would be to invoke skopeo to decompress,\n\t// or at least to use c/image to parse/format the manifest.\n\t//\n\t// But this is used to test (aspects of) those code paths… so, it’s acceptable for this to be\n\t// dumb and to make assumptions about the data, but it should not share code.\n\n\tmanifestBlob, err := os.ReadFile(filepath.Join(dir, \"manifest.json\"))\n\trequire.NoError(t, err)\n\tvar rawManifest map[string]any\n\terr = json.Unmarshal(manifestBlob, &rawManifest)\n\trequire.NoError(t, err)\n\tvar rawLayers []any\n\tgetRawMapField(t, rawManifest, \"layers\", &rawLayers)\n\tfor i, rawLayerValue := range rawLayers {\n\t\trawLayer, ok := rawLayerValue.(map[string]any)\n\t\trequire.True(t, ok)\n\t\tvar digestString string\n\t\tgetRawMapField(t, rawLayer, \"digest\", &digestString)\n\t\tcompressedDigest, err := digest.Parse(digestString)\n\t\trequire.NoError(t, err)\n\t\tif compressedDigest.String() == \"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\" { // An empty file\n\t\t\tcontinue\n\t\t}\n\n\t\tcompressedPath := filepath.Join(dir, compressedDigest.Encoded())\n\t\tcompressedStream, err := os.Open(compressedPath)\n\t\trequire.NoError(t, err)\n\t\tdefer compressedStream.Close()\n\n\t\tuncompressedStream, err := gzip.NewReader(compressedStream)\n\t\tif err != nil {\n\t\t\tcontinue // Silently assume the layer is not gzip-compressed\n\t\t}\n\t\ttempDest, err := os.CreateTemp(dir, \"decompressing\")\n\t\trequire.NoError(t, err)\n\t\tdigester := digest.Canonical.Digester()\n\t\tuncompressedSize, err := io.Copy(tempDest, io.TeeReader(uncompressedStream, digester.Hash()))\n\t\trequire.NoError(t, err)\n\t\terr = uncompressedStream.Close()\n\t\trequire.NoError(t, err)\n\t\tuncompressedDigest := digester.Digest()\n\t\tuncompressedPath := filepath.Join(dir, uncompressedDigest.Encoded())\n\t\terr = os.Rename(tempDest.Name(), uncompressedPath)\n\t\trequire.NoError(t, err)\n\t\terr = os.Remove(compressedPath)\n\t\trequire.NoError(t, err)\n\n\t\trawLayer[\"digest\"] = uncompressedDigest.String()\n\t\trawLayer[\"size\"] = uncompressedSize\n\t\tvar mimeType string\n\t\tgetRawMapField(t, rawLayer, \"mediaType\", &mimeType)\n\t\tif uncompressedMIMEType, ok := strings.CutSuffix(mimeType, \".gzip\"); ok {\n\t\t\trawLayer[\"mediaType\"] = uncompressedMIMEType\n\t\t}\n\n\t\trawLayers[i] = rawLayer\n\t}\n\trawManifest[\"layers\"] = rawLayers\n\n\tmanifestBlob, err = json.Marshal(rawManifest)\n\trequire.NoError(t, err)\n\terr = os.WriteFile(filepath.Join(dir, \"manifest.json\"), manifestBlob, 0o600)\n\trequire.NoError(t, err)\n}\n\n// Verify manifest in a dir: image at dir is expectedMIMEType.\nfunc verifyManifestMIMEType(t *testing.T, dir string, expectedMIMEType string) {\n\tmanifestBlob, err := os.ReadFile(filepath.Join(dir, \"manifest.json\"))\n\trequire.NoError(t, err)\n\tmimeType := manifest.GuessMIMEType(manifestBlob)\n\tassert.Equal(t, expectedMIMEType, mimeType)\n}\n"
  },
  {
    "path": "plans/main.fmf",
    "content": "discover:\n    how: fmf\nexecute:\n    how: tmt\nprepare:\n    - when: distro == centos-stream or distro == rhel\n      how: shell\n      script: |\n        # Install bats\n        # https://bats-core.readthedocs.io/en/stable/installation.html\n        BATS_VERSION=1.12.0\n        curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v\"$BATS_VERSION\".tar.gz | tar -xz\n        pushd bats-core-\"$BATS_VERSION\"\n        ./install.sh /usr\n        popd\n        rm -rf bats-core-\"$BATS_VERSION\"\n      order: 10\n    - when: initiator == packit\n      how: shell\n      script: |\n        COPR_REPO_FILE=\"/etc/yum.repos.d/*podman-next*.repo\"\n        if compgen -G $COPR_REPO_FILE > /dev/null; then\n            sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE\n        fi\n        dnf -y upgrade --allowerasing\n      order: 20\n    - name: Disable installing everything from srpm\n      how: install\n      exclude:\n        - \".*\"\n    - name: Install the main package\n      how: install\n      package:\n        - skopeo-tests\n"
  },
  {
    "path": "rpm/skopeo.spec",
    "content": "%global with_debug 1\n\n%if 0%{?with_debug}\n%global _find_debuginfo_dwz_opts %{nil}\n%global _dwz_low_mem_die_limit 0\n%else\n%global debug_package %{nil}\n%endif\n\n%global gomodulesmode GO111MODULE=on\n\n# Distro and environment conditionals\n%if %{defined fedora}\n# Fedora conditionals\n%define build_with_btrfs 1\n%define conditional_epoch 1\n%if %{?fedora} >= 43\n%define sequoia 1\n%endif\n%else\n# RHEL conditionals\n%define conditional_epoch 2\n%define fips 1\n%endif\n\n# set higher Epoch only for podman-next builds\n%if %{defined copr_username} && \"%{copr_username}\" == \"rhcontainerbot\" && \"%{copr_projectname}\" == \"podman-next\"\n%define next_build 1\n%endif\n\nName: skopeo\n%if %{defined next_build}\nEpoch: 102\n%else\nEpoch: %{conditional_epoch}\n%endif\n# DO NOT TOUCH the Version string!\n# The TRUE source of this specfile is:\n# https://github.com/containers/skopeo/blob/main/rpm/skopeo.spec\n# If that's what you're reading, Version must be 0, and will be updated by Packit for\n# copr and koji builds.\n# If you're reading this on dist-git, the version is automatically filled in by Packit.\nVersion: 0\n# The `AND` needs to be uppercase in the License for SPDX compatibility\nLicense: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0\nRelease: %autorelease\n%if %{defined golang_arches_future}\nExclusiveArch: %{golang_arches_future}\n%else\nExclusiveArch: aarch64 ppc64le s390x x86_64\n%endif\nSummary: Inspect container images and repositories on registries\nURL: https://github.com/containers/%{name}\n# Tarball fetched from upstream\nSource0: %{url}/archive/v%{version}.tar.gz\nBuildRequires: %{_bindir}/go-md2man\n%if %{defined build_with_btrfs}\nBuildRequires: btrfs-progs-devel\n%endif\nBuildRequires: git-core\nBuildRequires: golang\n%if !%{defined gobuild}\nBuildRequires: go-rpm-macros\n%endif\nBuildRequires: gpgme-devel\nBuildRequires: libassuan-devel\nBuildRequires: glib2-devel\nBuildRequires: make\nBuildRequires: shadow-utils-subid-devel\nBuildRequires: sqlite-devel\nRequires: containers-common >= 4:1-21\n%if %{defined sequoia}\nRequires: podman-sequoia\n%endif\n\n%description\nCommand line utility to inspect images and repositories directly on Docker\nregistries without the need to pull them.\n\n# NOTE: The tests subpackage is only intended for testing and will not be supported\n# for end-users and/or customers.\n%package tests\nSummary: Test dependencies for %{name}\n\nRequires: %{name} = %{epoch}:%{version}-%{release}\nRequires: gnupg\nRequires: jq\nRequires: golang\nRequires: podman\nRequires: crun\nRequires: httpd-tools\nRequires: openssl\nRequires: squashfs-tools\n# bats and fakeroot are not present on RHEL and ELN so they shouldn't be strong deps\nRecommends: bats\nRecommends: fakeroot\n\n%description tests\nThis package installs system test dependencies for %{name}\n\n%prep\n%autosetup -Sgit %{name}-%{version}\n# The %%install stage should not rebuild anything but only install what's\n# built in the %%build stage. So, remove any dependency on build targets.\nsed -i 's/^install-binary: bin\\/%{name}.*/install-binary:/' Makefile\nsed -i 's/^completions: bin\\/%{name}.*/completions:/' Makefile\nsed -i 's/^install-docs: docs.*/install-docs:/' Makefile\n\n%build\n%set_build_flags\nexport CGO_CFLAGS=$CFLAGS\n\n# These extra flags present in $CFLAGS have been skipped for now as they break the build\nCGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')\nCGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')\nCGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\\/usr\\/lib\\/rpm\\/redhat\\/redhat-annobin-cc1//g')\n\n%ifarch x86_64\nexport CGO_CFLAGS=\"$CGO_CFLAGS -m64 -mtune=generic -fcf-protection=full\"\n%endif\n\nBASEBUILDTAGS=\"$(hack/libsubid_tag.sh) libsqlite3\"\n%if %{defined build_with_btrfs}\nexport BUILDTAGS=\"$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh)\"\n%else\nexport BUILDTAGS=\"$BASEBUILDTAGS exclude_graphdriver_btrfs\"\n%endif\n\n%if %{defined fips}\nexport BUILDTAGS=\"$BUILDTAGS libtrust_openssl\"\n%endif\n\n%if %{defined sequoia}\nexport BUILDTAGS=\"$BUILDTAGS containers_image_sequoia\"\n%endif\n\n# unset LDFLAGS earlier set from set_build_flags\nLDFLAGS=''\n\n%gobuild -o bin/%{name} ./cmd/%{name}\n%{__make} docs\n\n%install\nmake \\\n    DESTDIR=%{buildroot} \\\n    PREFIX=%{_prefix} \\\n    install-binary install-docs install-completions\n\n#define license tag if not already defined\n%{!?_licensedir:%global license %doc}\n\n# Include this to silence rpmlint.\n# Especially annoying if you use syntastic vim plugin.\n%check\n\n%files\n%license LICENSE\n%doc README.md\n%{_bindir}/%{name}\n%{_mandir}/man1/%{name}*\n%dir %{_datadir}/bash-completion\n%dir %{_datadir}/bash-completion/completions\n%{_datadir}/bash-completion/completions/%{name}\n%dir %{_datadir}/fish/vendor_completions.d\n%{_datadir}/fish/vendor_completions.d/%{name}.fish\n%dir %{_datadir}/zsh/site-functions\n%{_datadir}/zsh/site-functions/_%{name}\n\n# Only test dependencies installed, no files.\n%files tests\n\n%changelog\n%autochangelog\n"
  },
  {
    "path": "systemtest/001-basic.bats",
    "content": "#!/usr/bin/env bats\n#\n# Simplest set of skopeo tests. If any of these fail, we have serious problems.\n#\n\nload helpers\n\n# Override standard setup! We don't yet trust anything\nfunction setup() {\n    :\n}\n\n@test \"skopeo version emits reasonable output\" {\n    run_skopeo --version\n\n    expect_output --substring \"skopeo version [0-9.]+\"\n}\n\n@test \"skopeo release isn't a development version\" {\n    [[ \"${RELEASE_TESTING:-false}\" == \"true\" ]] || \\\n      skip \"Release testing may be enabled by setting \\$RELEASE_TESTING = 'true'.\"\n\n    run_skopeo --version\n\n    # expect_output() doesn't support negative matching\n    if [[ \"$output\" =~ \"dev\" ]]; then\n        # This is a multi-line message, which may in turn contain multi-line\n        # output, so let's format it ourselves, readably\n        local -a output_split\n        readarray -t output_split <<<\"$output\"\n        printf \"#/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\\n\"  >&2\n        printf \"#|       FAIL: $BATS_TEST_NAME\\n\"                   >&2\n        printf \"#| unexpected: 'dev'\\n\"                             >&2\n        printf \"#|     actual: '%s'\\n\" \"${output_split[0]}\"         >&2\n        local line\n        for line in \"${output_split[@]:1}\"; do\n            printf \"#|           > '%s'\\n\" \"$line\"                  >&2\n        done\n        printf \"#\\\\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\" >&2\n        false\n    fi\n}\n\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/010-inspect.bats",
    "content": "#!/usr/bin/env bats\n#\n# Simplest test for skopeo inspect\n#\n\nload helpers\n\n@test \"inspect: basic\" {\n    workdir=$TESTDIR/inspect\n\n    remote_image=docker://quay.io/libpod/alpine_labels:latest\n    # Inspect remote source, then pull it. There's a small race condition\n    # in which the remote image can get updated between the inspect and\n    # the copy; let's just not worry about it.\n    run_skopeo inspect $remote_image\n    inspect_remote=$output\n\n    # Now pull it into a directory\n    run_skopeo copy $remote_image dir:$workdir\n    expect_output --substring \"Getting image source signatures\"\n    expect_output --substring \"Writing manifest to image destination\"\n\n    # Unpacked contents must include a manifest and version\n    [ -e $workdir/manifest.json ]\n    [ -e $workdir/version ]\n\n    # Now run inspect locally\n    run_skopeo inspect dir:$workdir\n    inspect_local=$output\n    run_skopeo inspect --raw dir:$workdir\n    inspect_local_raw=$output\n    config_digest=$(jq -r '.config.digest' <<<\"$inspect_local_raw\")\n\n    # Each SHA-named layer file (but not the config) must be listed in the output of 'inspect'.\n    # In all existing versions of Skopeo (with 1.6 being the current as of this comment),\n    # the output of 'inspect' lists layer digests,\n    # but not the digest of the config blob ($config_digest), if any.\n    layers=$(jq -r '.Layers' <<<\"$inspect_local\")\n    for sha in $(find $workdir -type f | xargs -l1 basename | grep -E '^[0-9a-f]{64}$'); do\n        if [ \"sha256:$sha\" != \"$config_digest\" ]; then\n            expect_output --from=\"$layers\" --substring \"sha256:$sha\" \\\n                        \"Locally-extracted SHA file is present in 'inspect'\"\n        fi\n    done\n\n    # Simple sanity check on 'inspect' output.\n    # For each of the given keys (LHS of the table below):\n    #    1) Get local and remote values\n    #    2) Sanity-check local value using simple expression\n    #    3) Confirm that local and remote values match.\n    #\n    # The reason for (2) is to make sure that we don't compare bad results\n    #\n    # The reason for a hardcoded list, instead of 'jq keys', is that RepoTags\n    # is always empty locally, but a list remotely.\n    while read key expect; do\n        local=$(echo \"$inspect_local\" | jq -r \".$key\")\n        remote=$(echo \"$inspect_remote\" | jq -r \".$key\")\n\n        expect_output --from=\"$local\" --substring \"$expect\" \\\n                  \"local $key is sane\"\n\n        expect_output --from=\"$remote\" \"$local\" \\\n                      \"local $key matches remote\"\n    done <<END_EXPECT\nArchitecture       amd64\nCreated            [0-9-]+T[0-9:]+\\.[0-9]+Z\nDigest             sha256:[0-9a-f]{64}\nDockerVersion      [0-9]+\\.[0-9][0-9.-]+\nLabels             \\\\\\{.*PODMAN.*podman.*\\\\\\}\nLayers             \\\\\\[.*sha256:.*\\\\\\]\nOs                 linux\nEND_EXPECT\n}\n\n@test \"inspect: env\" {\n    remote_image=docker://quay.io/libpod/fedora:31\n    run_skopeo inspect $remote_image\n    inspect_remote=$output\n\n    # Simple check on 'inspect' output with environment variables.\n    #    1) Get remote image values of environment variables (the value of 'Env')\n    #    2) Confirm substring in check_array and the value of 'Env' match.\n    check_array=(FGC=f31 DISTTAG=f31container)\n    remote=$(jq '.Env[]' <<<\"$inspect_remote\")\n    for substr in ${check_array[@]}; do\n        expect_output --from=\"$remote\" --substring \"$substr\"\n    done\n}\n\n# Tests https://github.com/containers/skopeo/pull/708\n@test \"inspect: image manifest list w/ diff platform\" {\n    # This image's manifest is for an os + arch that is... um, unlikely\n    # to support skopeo in the foreseeable future. Or past. The image\n    # is created by the make-noarch-manifest script in this directory.\n    img=docker://quay.io/libpod/notmyarch:20210121\n\n    # Get our host golang arch (what we're running on, according to golang).\n    # This assumes that skopeo arch matches host arch (which it always should).\n    # Buildah is used here because it depends less on the exact system config\n    # than podman - and all we're really after is the golang-flavored arch name.\n    arch=$(go env GOARCH)\n\n    # By default, 'inspect' tries to match our host os+arch. This should fail.\n    run_skopeo 1 inspect $img\n    expect_output --substring \"parsing manifest for image: choosing image instance: no image found in manifest list for architecture \\\\\\\\\\\"$arch\\\\\\\\\\\", variant \" \\\n                  \"skopeo inspect, without --raw, fails\"\n\n    # With --raw, we can inspect\n    run_skopeo inspect --raw $img\n    expect_output --substring \"manifests.*platform.*architecture\" \\\n                  \"skopeo inspect --raw returns reasonable output\"\n\n    # ...and what we get should be consistent with what our script created.\n    archinfo=$(jq -r '.manifests[0].platform | {os,variant,architecture} | join(\"-\")' <<<\"$output\")\n\n    expect_output --from=\"$archinfo\" \"amigaos-1000-mc68000\" \\\n                  \"os - variant - architecture of $img\"\n}\n\n@test \"inspect: don't list tags\" {\n    remote_image=docker://quay.io/fedora/fedora\n    # use --no-tags to not list any tags\n    run_skopeo inspect --no-tags $remote_image\n    inspect_output=$output\n    # extract the content of \"RepoTags\" property from the JSON output\n    repo_tags=$(jq '.RepoTags[]' <<<\"$inspect_output\")\n    # verify that the RepoTags was empty\n    expect_output --from=\"$repo_tags\" \"\" \"inspect --no-tags was expected to return empty RepoTags[]\"\n}\n\n@test \"inspect: image unknown\" {\n    # non existing image\n    run_skopeo 2 inspect containers-storage:non-existing-tag\n    expect_output --substring \"does not resolve to an image ID\" \\\n\t\t  \"skopeo inspect containers-storage:010101010101\"\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/020-copy.bats",
    "content": "#!/usr/bin/env bats\n#\n# Copy tests\n#\n\nload helpers\n\nfunction setup() {\n    standard_setup\n\n    start_registry reg\n}\n\n# From remote, to dir1, to local, to dir2;\n# compare dir1 and dir2, expect no changes\n@test \"copy: dir, round trip\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n    local localimg=docker://localhost:5000/busybox:unsigned\n\n    local dir1=$TESTDIR/dir1\n    local dir2=$TESTDIR/dir2\n\n    run_skopeo copy          $remote_image  dir:$dir1\n    run_skopeo copy --dest-tls-verify=false dir:$dir1  $localimg\n    run_skopeo copy  --src-tls-verify=false            $localimg  dir:$dir2\n\n    # Both extracted copies must be identical\n    diff -urN $dir1 $dir2\n}\n\n# Same as above, but using 'oci:' instead of 'dir:' and with a :latest tag\n@test \"copy: oci, round trip\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n    local localimg=docker://localhost:5000/busybox:unsigned\n\n    local dir1=$TESTDIR/oci1\n    local dir2=$TESTDIR/oci2\n\n    run_skopeo copy          $remote_image  oci:$dir1:latest\n    run_skopeo copy --dest-tls-verify=false oci:$dir1:latest  $localimg\n    run_skopeo copy  --src-tls-verify=false                   $localimg  oci:$dir2:latest\n\n    # Both extracted copies must be identical\n    diff -urN $dir1 $dir2\n}\n\n# Compression zstd\n@test \"copy: oci, zstd\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n\n    local dir=$TESTDIR/dir\n\n    run_skopeo copy --dest-compress-format=zstd $remote_image oci:$dir:latest\n\n    # zstd magic number\n    local magic=$(printf \"\\x28\\xb5\\x2f\\xfd\")\n\n    # Check there is at least one file that has the zstd magic number as the first 4 bytes\n    (for i in $dir/blobs/sha256/*; do test \"$(head -c 4 $i)\" = $magic && exit 0; done; exit 1)\n\n    # Check that the manifest's description of the image's first layer is the zstd layer type\n    instance=$(jq -r '.manifests[0].digest' $dir/index.json)\n    [[ \"$instance\" != null ]]\n    mediatype=$(jq -r '.layers[0].mediaType' < $dir/blobs/${instance/://})\n    [[ \"$mediatype\" == \"application/vnd.oci.image.layer.v1.tar+zstd\" ]]\n}\n\n# Same image, extracted once with :tag and once without\n@test \"copy: oci w/ and w/o tags\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n\n    local dir1=$TESTDIR/dir1\n    local dir2=$TESTDIR/dir2\n\n    run_skopeo copy $remote_image oci:$dir1\n    run_skopeo copy $remote_image oci:$dir2:withtag\n\n    # Both extracted copies must be identical, except for index.json\n    diff -urN --exclude=index.json $dir1 $dir2\n\n    # ...which should differ only in the tag. (But that's too hard to check)\n    grep '\"org.opencontainers.image.ref.name\":\"withtag\"' $dir2/index.json\n}\n\n# Registry -> storage -> oci-archive\n@test \"copy: registry -> storage -> oci-archive\" {\n    local alpine=quay.io/libpod/alpine:latest\n    local tmp=$TESTDIR/oci\n\n    run_skopeo copy docker://$alpine containers-storage:$alpine\n    run_skopeo copy containers-storage:$alpine oci-archive:$tmp\n}\n\n# This one seems unlikely to get fixed\n@test \"copy: bug 651\" {\n    skip \"Enable this once skopeo issue #651 has been fixed\"\n\n    run_skopeo copy --dest-tls-verify=false \\\n               docker://quay.io/libpod/alpine_labels:latest \\\n               docker://localhost:5000/foo\n}\n\n# manifest format\n@test \"copy: manifest format\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n\n    local dir1=$TESTDIR/dir1\n    local dir2=$TESTDIR/dir2\n\n    run_skopeo copy --format v2s2 $remote_image dir:$dir1\n    run_skopeo copy --format oci $remote_image dir:$dir2\n    grep 'application/vnd.docker.distribution.manifest.v2' $dir1/manifest.json\n    grep 'application/vnd.oci.image' $dir2/manifest.json\n}\n\n# additional tag\n@test \"copy: additional tag\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n\n    # additional-tag is supported only for docker-archive\n    run_skopeo copy --additional-tag busybox:mine $remote_image \\\n               docker-archive:$TESTDIR/mybusybox.tar:busybox:latest\n    mkdir -p $TESTDIR/podmanroot\n    run podman --root $TESTDIR/podmanroot load -i $TESTDIR/mybusybox.tar\n    run podman --root $TESTDIR/podmanroot images\n    expect_output --substring \"mine\"\n\n    # rootless cleanup needs to be done with unshare due to subuids\n    if [[ \"$(id -u)\" != \"0\" ]]; then\n        run podman unshare rm -rf $TESTDIR/podmanroot\n    fi\n}\n\n# shared blob directory\n@test \"copy: shared blob directory\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n\n    local shareddir=$TESTDIR/shareddir\n    local dir1=$TESTDIR/dir1\n    local dir2=$TESTDIR/dir2\n\n    run_skopeo copy --dest-shared-blob-dir $shareddir \\\n               $remote_image oci:$dir1\n    [ -n \"$(ls $shareddir)\" ]\n    [ -z \"$(ls $dir1/blobs)\" ]\n    run_skopeo copy --src-shared-blob-dir $shareddir \\\n               oci:$dir1 oci:$dir2\n    diff -urN $shareddir $dir2/blobs\n}\n\n@test \"copy: sif image\" {\n    type -path fakeroot || skip \"'fakeroot' tool not available\"\n\n    local localimg=dir:$TESTDIR/dir\n\n    run_skopeo copy sif:${TEST_SOURCE_DIR}/testdata/busybox_latest.sif $localimg\n    run_skopeo inspect $localimg --format \"{{.Architecture}}\"\n    expect_output \"amd64\"\n}\n\nteardown() {\n    podman rm -f reg\n\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/030-local-registry-tls.bats",
    "content": "#!/usr/bin/env bats\n#\n# Confirm that skopeo will push to and pull from a local\n# registry with locally-created TLS certificates.\n#\nload helpers\n\nfunction setup() {\n    standard_setup\n\n    start_registry --with-cert --enable-delete=true reg\n}\n\n@test \"local registry, with cert\" {\n    # Push to local registry...\n    run_skopeo copy --dest-cert-dir=$TESTDIR/client-auth \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:unsigned\n\n    # ...and pull it back out\n    run_skopeo copy --src-cert-dir=$TESTDIR/client-auth \\\n               docker://localhost:5000/busybox:unsigned \\\n               dir:$TESTDIR/extracted\n\n    # inspect with cert\n    run_skopeo inspect --cert-dir=$TESTDIR/client-auth \\\n               docker://localhost:5000/busybox:unsigned\n    expect_output --substring \"localhost:5000/busybox\"\n\n    # delete with cert\n    run_skopeo delete --cert-dir=$TESTDIR/client-auth \\\n               docker://localhost:5000/busybox:unsigned\n}\n\nteardown() {\n    podman rm -f reg\n\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/040-local-registry-auth.bats",
    "content": "#!/usr/bin/env bats\n#\n# Tests with a local registry with auth\n#\n\nload helpers\n\nfunction setup() {\n    standard_setup\n\n    # Start authenticated registry with random password\n    testuser=testuser\n    testpassword=$(random_string 15)\n\n    start_registry --testuser=$testuser --testpassword=$testpassword --enable-delete=true reg\n\n    _cred_dir=$TESTDIR/credentials\n    # It is important to change XDG_RUNTIME_DIR only after we start the registry, otherwise it affects the path of $XDG_RUNTIME_DIR/netns maintained by Podman,\n    # making it impossible to clean up after ourselves.\n    export XDG_RUNTIME_DIR_OLD=$XDG_RUNTIME_DIR\n    export XDG_RUNTIME_DIR=$_cred_dir\n    mkdir -p $_cred_dir/containers\n    # Remove old/stale cred file\n    rm -f $_cred_dir/containers/auth.json\n}\n\n@test \"auth: credentials on command line\" {\n    # No creds\n    run_skopeo 1 inspect --tls-verify=false docker://localhost:5000/nonesuch\n    expect_output --substring \"authentication required\"\n\n    # Wrong user\n    run_skopeo 1 inspect --tls-verify=false --creds=baduser:badpassword \\\n               docker://localhost:5000/nonesuch\n    expect_output --substring \"authentication required\"\n\n    # Wrong password\n    run_skopeo 1 inspect --tls-verify=false --creds=$testuser:badpassword \\\n               docker://localhost:5000/nonesuch\n    expect_output --substring \"authentication required\"\n\n    # Correct creds, but no such image\n    run_skopeo 2 inspect --tls-verify=false --creds=$testuser:$testpassword \\\n               docker://localhost:5000/nonesuch\n    expect_output --substring \"manifest unknown\"\n\n    # These should pass\n    run_skopeo copy --dest-tls-verify=false --dcreds=$testuser:$testpassword \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:mine\n    run_skopeo inspect --tls-verify=false --creds=$testuser:$testpassword \\\n               docker://localhost:5000/busybox:mine\n    expect_output --substring \"localhost:5000/busybox\"\n}\n\n@test \"auth: credentials via podman login\" {\n    # Logged in: skopeo should work\n    podman login --tls-verify=false -u $testuser -p $testpassword localhost:5000\n\n    run_skopeo copy --dest-tls-verify=false \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:mine\n    run_skopeo inspect --tls-verify=false docker://localhost:5000/busybox:mine\n    expect_output --substring \"localhost:5000/busybox\"\n\n    # Logged out: should fail\n    podman logout localhost:5000\n\n    run_skopeo 1 inspect --tls-verify=false docker://localhost:5000/busybox:mine\n    expect_output --substring \"authentication required\"\n}\n\n@test \"auth: copy with --src-creds and --dest-creds\" {\n    run_skopeo copy --dest-tls-verify=false --dest-creds=$testuser:$testpassword \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:mine\n    run_skopeo copy --src-tls-verify=false --src-creds=$testuser:$testpassword \\\n               docker://localhost:5000/busybox:mine \\\n               dir:$TESTDIR/dir1\n    run ls $TESTDIR/dir1\n    expect_output --substring \"manifest.json\"\n}\n\n@test \"auth: credentials via authfile\" {\n    podman login --tls-verify=false --authfile $TESTDIR/test.auth -u $testuser -p $testpassword localhost:5000\n\n    # copy without authfile: should fail\n    run_skopeo 1 copy --dest-tls-verify=false \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:mine\n\n    # copy with authfile: should work\n    run_skopeo copy --dest-tls-verify=false \\\n               --authfile $TESTDIR/test.auth \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:mine\n\n    # inspect without authfile: should fail\n    run_skopeo 1 inspect --tls-verify=false docker://localhost:5000/busybox:mine\n    expect_output --substring \"authentication required\"\n\n    # inspect with authfile: should work\n    run_skopeo inspect --tls-verify=false --authfile $TESTDIR/test.auth docker://localhost:5000/busybox:mine\n    expect_output --substring \"localhost:5000/busybox\"\n\n    # delete without authfile: should fail\n    run_skopeo 1 delete --tls-verify=false docker://localhost:5000/busybox:mine\n    expect_output --substring \"authentication required\"\n\n    # delete with authfile: should work\n    run_skopeo delete --tls-verify=false --authfile $TESTDIR/test.auth docker://localhost:5000/busybox:mine\n}\n\nteardown() {\n    # Need to restore XDG_RUNTIME_DIR.\n    XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR_OLD\n\n    podman rm -f reg\n\n    if [[ -n $_cred_dir ]]; then\n        rm -rf $_cred_dir\n    fi\n\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/050-signing.bats",
    "content": "#!/usr/bin/env bats\n#\n# Tests with gpg signing\n#\n\nload helpers\n\nfunction setup() {\n    standard_setup\n\n    # Create dummy gpg keys\n    export GNUPGHOME=$TESTDIR/skopeo-gpg\n    mkdir --mode=0700 $GNUPGHOME\n\n    PASSPHRASE_FILE=$TESTDIR/passphrase-file\n    passphrase=$(random_string 20)\n    echo $passphrase > $PASSPHRASE_FILE\n\n    PASSPHRASE_FILE_WRONG=$TESTDIR/passphrase-file-wrong\n    echo $(random_string 10) > $PASSPHRASE_FILE_WRONG\n\n    # gpg on f30 needs this, otherwise:\n    #   gpg: agent_genkey failed: Inappropriate ioctl for device\n    # ...but gpg on f29 (and, probably, Ubuntu) doesn't grok this\n    GPGOPTS='--pinentry-mode loopback'\n    if gpg --pinentry-mode asdf 2>&1 | grep -qi 'Invalid option'; then\n        GPGOPTS=\n    fi\n\n    for k in alice bob;do\n        gpg --batch $GPGOPTS --gen-key --passphrase $passphrase <<END_GPG\nKey-Type: RSA\nName-Real: Test key - $k\nName-email: $k@test.redhat.com\n%commit\nEND_GPG\n\n        gpg --armor --export $k@test.redhat.com >$GNUPGHOME/pubkey-$k.gpg\n    done\n\n    # Registries. The important part here seems to be sigstore,\n    # because (I guess?) the registry itself has no mechanism\n    # for storing or validating signatures.\n    REGISTRIES_D=$TESTDIR/registries.d\n    mkdir $REGISTRIES_D $TESTDIR/sigstore\n    cat >$REGISTRIES_D/registries.yaml <<EOF\ndocker:\n   localhost:5000:\n        sigstore: file://$TESTDIR/sigstore\nEOF\n\n    # Policy file. Basically, require /myns/alice and /myns/bob\n    # to be signed; allow /open; and reject anything else.\n    POLICY_JSON=$TESTDIR/policy.json\n    cat >$POLICY_JSON <<END_POLICY_JSON\n{\n    \"default\": [\n        {\n            \"type\": \"reject\"\n        }\n    ],\n    \"transports\": {\n        \"docker\": {\n            \"localhost:5000/myns/alice\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"$GNUPGHOME/pubkey-alice.gpg\"\n                }\n            ],\n            \"localhost:5000/myns/bob\": [\n                {\n                    \"type\": \"signedBy\",\n                    \"keyType\": \"GPGKeys\",\n                    \"keyPath\": \"$GNUPGHOME/pubkey-bob.gpg\"\n                }\n            ],\n            \"localhost:5000/open\": [\n                {\n                    \"type\": \"insecureAcceptAnything\"\n                }\n            ]\n        }\n    }\n}\nEND_POLICY_JSON\n\n    start_registry reg\n}\n\nfunction kill_gpg_agent {\n    # Kill the running gpg-agent to drop unlocked keys. This allows for testing\n    # handling of invalid passphrases.\n    run gpgconf --kill gpg-agent\n    if [ \"$status\" -ne 0 ]; then\n        die \"could not restart gpg-agent: $output\"\n    fi\n}\n\n@test \"signing\" {\n    kill_gpg_agent\n    run_skopeo '?' standalone-sign /dev/null busybox alice@test.redhat.com -o /dev/null --passphrase-file $PASSPHRASE_FILE\n    if [[ \"$output\" =~ 'signing is not supported' ]]; then\n        skip \"skopeo built without support for creating signatures\"\n        return 1\n    fi\n    if [ \"$status\" -ne 0 ]; then\n        die \"exit code is $status; expected $expected_rc\"\n    fi\n\n    # Cache local copy\n    run_skopeo copy docker://quay.io/libpod/busybox:latest \\\n               dir:$TESTDIR/busybox\n\n    # Push a bunch of images. Do so *without* --policy flag; this lets us\n    # sign or not, creating images that will or won't conform to policy.\n    while read path sig comments; do\n        local sign_opt=\n        if [[ $sig != '-' ]]; then\n            kill_gpg_agent\n            sign_opt=\" --sign-passphrase-file=$PASSPHRASE_FILE --sign-by=${sig}@test.redhat.com\"\n        fi\n        run_skopeo --registries.d $REGISTRIES_D \\\n                   copy --dest-tls-verify=false \\\n                   $sign_opt \\\n                   dir:$TESTDIR/busybox \\\n                   docker://localhost:5000$path\n    done <<END_PUSH\n/myns/alice:signed        alice    # Properly-signed image\n/myns/alice:unsigned      -        # Unsigned image to path that requires signature\n/myns/bob:signedbyalice   alice    # Bad signature: image under /bob\n/myns/carol:latest        -        # No signature\n/open/forall:latest       -        # No signature, but none needed\nEND_PUSH\n\n    # Done pushing. Now try to fetch. From here on we use the --policy option.\n    # The table below lists the paths to fetch, and the expected errors (or\n    # none, if we expect them to pass).\n    #\n    # \"Invalid GPG signature\" is reported by the gpgme mechanism; \"Missing key: $fingerprint\" or \"Missing key $fingerprint\" by Sequoia.\n    while read path expected_error; do\n        expected_rc=\n        if [[ -n $expected_error ]]; then\n            expected_rc=1\n        fi\n\n        rm -rf $TESTDIR/d\n        run_skopeo $expected_rc \\\n                   --registries.d $REGISTRIES_D \\\n                   --policy $POLICY_JSON \\\n                   copy --src-tls-verify=false \\\n                   docker://localhost:5000$path \\\n                   dir:$TESTDIR/d\n        if [[ -n $expected_error ]]; then\n            expect_output --substring \"Source image rejected: $expected_error\"\n        fi\n    done <<END_TESTS\n/myns/alice:signed\n/myns/bob:signedbyalice    (Invalid GPG signature|Missing key)\n/myns/alice:unsigned       Signature for identity \\\\\\\\\\\\\\\\\"localhost:5000/myns/alice:signed\\\\\\\\\\\\\\\\\" is not accepted\n/myns/carol:latest         Running image docker://localhost:5000/myns/carol:latest is rejected by policy.\n/open/forall:latest\nEND_TESTS\n}\n\n@test \"signing: remove signature\" {\n    kill_gpg_agent\n    run_skopeo '?' standalone-sign /dev/null busybox alice@test.redhat.com -o /dev/null --passphrase-file $PASSPHRASE_FILE\n    if [[ \"$output\" =~ 'signing is not supported' ]]; then\n        skip \"skopeo built without support for creating signatures\"\n        return 1\n    fi\n    if [ \"$status\" -ne 0 ]; then\n        die \"exit code is $status; expected 0\"\n    fi\n\n    # Cache local copy\n    run_skopeo copy docker://quay.io/libpod/busybox:latest \\\n               dir:$TESTDIR/busybox\n    # Push a signed image\n    kill_gpg_agent\n    run_skopeo --registries.d $REGISTRIES_D \\\n               copy --dest-tls-verify=false \\\n               --sign-by=alice@test.redhat.com \\\n               --sign-passphrase-file $PASSPHRASE_FILE \\\n               dir:$TESTDIR/busybox \\\n               docker://localhost:5000/myns/alice:signed\n\n    # Wrong passphrase file\n    kill_gpg_agent\n    run_skopeo 1 --registries.d $REGISTRIES_D \\\n               copy --dest-tls-verify=false \\\n               --sign-by=alice@test.redhat.com \\\n               --sign-passphrase-file $PASSPHRASE_FILE_WRONG \\\n               dir:$TESTDIR/busybox \\\n               docker://localhost:5000/myns/alice:signed\n    expect_output --substring \"Bad passphrase\"\n\n    # Fetch the image with signature\n    run_skopeo  --registries.d $REGISTRIES_D \\\n                --policy $POLICY_JSON \\\n                copy --src-tls-verify=false \\\n                docker://localhost:5000/myns/alice:signed \\\n                dir:$TESTDIR/busybox-signed\n    # Fetch the image with removing signature\n    run_skopeo  --registries.d $REGISTRIES_D \\\n                --policy $POLICY_JSON \\\n                copy --src-tls-verify=false \\\n                --remove-signatures \\\n                docker://localhost:5000/myns/alice:signed \\\n                dir:$TESTDIR/busybox-unsigned\n    ls $TESTDIR/busybox-signed | grep \"signature\"\n    [ -z \"$(ls $TESTDIR/busybox-unsigned | grep \"signature\")\" ]\n}\n\n@test \"signing: standalone\" {\n    kill_gpg_agent\n    run_skopeo '?' standalone-sign /dev/null busybox alice@test.redhat.com -o /dev/null --passphrase-file $PASSPHRASE_FILE\n    if [[ \"$output\" =~ 'signing is not supported' ]]; then\n        skip \"skopeo built without support for creating signatures\"\n        return 1\n    fi\n    if [ \"$status\" -ne 0 ]; then\n        die \"exit code is $status; expected 0\"\n    fi\n\n    run_skopeo copy --dest-tls-verify=false \\\n               docker://quay.io/libpod/busybox:latest \\\n               docker://localhost:5000/busybox:latest\n    run_skopeo copy --src-tls-verify=false \\\n               docker://localhost:5000/busybox:latest \\\n               dir:$TESTDIR/busybox\n    # Standalone sign\n    kill_gpg_agent\n    run_skopeo standalone-sign -o $TESTDIR/busybox.signature \\\n               --passphrase-file $PASSPHRASE_FILE \\\n               $TESTDIR/busybox/manifest.json \\\n               localhost:5000/busybox:latest \\\n               alice@test.redhat.com\n    # Standalone verify\n    fingerprint=$(gpg --list-keys | grep -B1 alice.test.redhat.com | head -n 1)\n    run_skopeo standalone-verify $TESTDIR/busybox/manifest.json \\\n               localhost:5000/busybox:latest \\\n               $fingerprint \\\n               $TESTDIR/busybox.signature\n    # manifest digest\n    digest=$(echo \"$output\" | awk '{print $NF;}')\n    run_skopeo manifest-digest $TESTDIR/busybox/manifest.json\n    expect_output $digest\n}\n\nteardown() {\n    podman rm -f reg\n\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/060-delete.bats",
    "content": "#!/usr/bin/env bats\n#\n# Copy tests\n#\n\nload helpers\n\nfunction setup() {\n    standard_setup\n\n    start_registry --enable-delete=true reg\n}\n\n# delete image from registry\n@test \"delete: remove image from registry\" {\n    local remote_image=docker://quay.io/libpod/busybox:latest\n    local localimg=docker://localhost:5000/busybox:unsigned\n    local output=\n\n    run_skopeo copy --dest-tls-verify=false $remote_image $localimg\n    output=$(run_skopeo inspect --tls-verify=false --raw $localimg)\n    echo $output | grep \"vnd.docker.distribution.manifest.v2+json\"\n\n    run_skopeo delete --tls-verify=false $localimg\n\n    # make sure image is removed from registry\n    expected_rc=2\n    run_skopeo $expected_rc inspect --tls-verify=false $localimg\n}\n\nteardown() {\n    podman rm -f reg\n\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/070-list-tags.bats",
    "content": "#!/usr/bin/env bats\n#\n# list-tags tests\n#\n\nload helpers\n\n# list from registry\n@test \"list-tags: remote repository on a registry\" {\n    local remote_image=quay.io/libpod/alpine_labels\n\n    run_skopeo list-tags \"docker://${remote_image}\"\n    expect_output --substring \"quay.io/libpod/alpine_labels\"\n    expect_output --substring \"latest\"\n}\n\n# list from a local docker-archive file\n@test \"list-tags: from a docker-archive file\" {\n    local file_name=${TEST_SOURCE_DIR}/testdata/docker-two-images.tar.xz\n\n    run_skopeo list-tags docker-archive:$file_name\n    expect_output --substring \"example.com/empty:latest\"\n    expect_output --substring \"example.com/empty/but:different\"\n\n}\n\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/080-sync.bats",
    "content": "#!/usr/bin/env bats\n#\n# Sync tests\n#\n\nload helpers\n\nfunction setup() {\n    standard_setup\n}\n\n@test \"sync: --dry-run\" {\n    local remote_image=quay.io/libpod/busybox:latest\n    local dir=$TESTDIR/dir\n\n    run_skopeo sync --dry-run --src docker --dest dir --scoped $remote_image $dir\n    expect_output --substring \"Would have copied image\"\n    expect_output --substring \"from=\\\"docker://${remote_image}\\\" to=\\\"dir:${dir}/${remote_image}\\\"\"\n    expect_output --substring \"Would have synced 1 images from 1 sources\"\n}\n\nteardown() {\n    standard_teardown\n}\n\n# vim: filetype=sh\n"
  },
  {
    "path": "systemtest/helpers.bash",
    "content": "#!/bin/bash\n\n# Directory containing system test sources\nTEST_SOURCE_DIR=${TEST_SOURCE_DIR:-$(dirname ${BASH_SOURCE})}\n\n# Skopeo executable\nSKOPEO_BINARY=${SKOPEO_BINARY:-${TEST_SOURCE_DIR}/../bin/skopeo}\n\n# Default timeout for a skopeo command.\nSKOPEO_TIMEOUT=${SKOPEO_TIMEOUT:-300}\n\n# Default image to run as a local registry\nREGISTRY_FQIN=${SKOPEO_TEST_REGISTRY_FQIN:-quay.io/libpod/registry:2.8.2}\n\n###############################################################################\n# BEGIN setup/teardown\n\n# Provide common setup and teardown functions, but do not name them such!\n# That way individual tests can override with their own setup/teardown,\n# while retaining the ability to include these if they so desire.\n\nfunction standard_setup() {\n    # Argh. Although BATS provides $BATS_TMPDIR, it's just /tmp!\n    # That's bloody worthless. Let's make our own, in which subtests\n    # can write whatever they like and trust that it'll be deleted\n    # on cleanup.\n    TESTDIR=$(mktemp -d --tmpdir=${BATS_TMPDIR:-/tmp} skopeo_bats.XXXXXX)\n}\n\nfunction standard_teardown() {\n    if [[ -n $TESTDIR ]]; then\n        rm -rf $TESTDIR\n    fi\n}\n\n# Individual .bats files may override or extend these\nfunction setup() {\n    standard_setup\n}\n\nfunction teardown() {\n    standard_teardown\n}\n\n# END   setup/teardown\n###############################################################################\n# BEGIN standard helpers for running skopeo and testing results\n\n#################\n#  run_skopeo  #  Invoke skopeo, with timeout, using BATS 'run'\n#################\n#\n# This is the preferred mechanism for invoking skopeo:\n#\n#  * we use 'timeout' to abort (with a diagnostic) if something\n#    takes too long; this is preferable to a CI hang.\n#  * we log the command run and its output. This doesn't normally\n#    appear in BATS output, but it will if there's an error.\n#  * we check exit status. Since the normal desired code is 0,\n#    that's the default; but the first argument can override:\n#\n#     run_skopeo 125  nonexistent-subcommand\n#     run_skopeo '?'  some-other-command       # let our caller check status\n#\n# Since we use the BATS 'run' mechanism, $output and $status will be\n# defined for our caller.\n#\nfunction run_skopeo() {\n    # Number as first argument = expected exit code; default 0\n    expected_rc=0\n    case \"$1\" in\n        [0-9])           expected_rc=$1; shift;;\n        [1-9][0-9])      expected_rc=$1; shift;;\n        [12][0-9][0-9])  expected_rc=$1; shift;;\n        '?')             expected_rc=  ; shift;;  # ignore exit code\n    esac\n\n    # Remember command args, for possible use in later diagnostic messages\n    MOST_RECENT_SKOPEO_COMMAND=\"skopeo $*\"\n\n    # stdout is only emitted upon error; this echo is to help a debugger\n    echo \"\\$ $SKOPEO_BINARY $*\"\n    run timeout --foreground --kill=10 $SKOPEO_TIMEOUT ${SKOPEO_BINARY} \"$@\"\n    # without \"quotes\", multiple lines are glommed together into one\n    if [ -n \"$output\" ]; then\n        echo \"$output\"\n    fi\n    if [ \"$status\" -ne 0 ]; then\n        echo -n \"[ rc=$status \";\n        if [ -n \"$expected_rc\" ]; then\n            if [ \"$status\" -eq \"$expected_rc\" ]; then\n                echo -n \"(expected) \";\n            else\n                echo -n \"(** EXPECTED $expected_rc **) \";\n            fi\n        fi\n        echo \"]\"\n    fi\n\n    if [ \"$status\" -eq 124 -o \"$status\" -eq 137 ]; then\n        # FIXME: 'timeout -v' requires coreutils-8.29; travis seems to have\n        #        an older version. If/when travis updates, please add -v\n        #        to the 'timeout' command above, and un-comment this out:\n        # if expr \"$output\" : \".*timeout: sending\" >/dev/null; then\n        echo \"*** TIMED OUT ***\"\n        false\n    fi\n\n    if [ -n \"$expected_rc\" ]; then\n        if [ \"$status\" -ne \"$expected_rc\" ]; then\n            die \"exit code is $status; expected $expected_rc\"\n        fi\n    fi\n}\n\n#################\n#  log_and_run  #  log a command for later debugging, then run it\n#################\n#\n# When diagnosing a test failure,  it can be really nice to see the\n# more important commands that have been run in test setup: openssl,\n# podman registry, other complex commands that can give one a boost\n# when trying to reproduce problems. This simple wrapper takes a\n# command as its arg, echoes it to stdout (with a '$' prefix),\n# then runs the command. BATS does not show stdout unless there's\n# an error. Use this judiciously.\n#\nfunction log_and_run() {\n    echo \"\\$ $*\"\n    \"$@\"\n}\n\n#########\n#  die  #  Abort with helpful message\n#########\nfunction die() {\n    echo \"#/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\"  >&2\n    echo \"#| FAIL: $*\"                                           >&2\n    echo \"#\\\\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\" >&2\n    false\n}\n\n###################\n#  expect_output  #  Compare actual vs expected string; fail if mismatch\n###################\n#\n# Compares $output against the given string argument. Optional second\n# argument is descriptive text to show as the error message (default:\n# the command most recently run by 'run_skopeo'). This text can be\n# useful to isolate a failure when there are multiple identical\n# run_skopeo invocations, and the difference is solely in the\n# config or setup; see, e.g., run.bats:run-cmd().\n#\n# By default we run an exact string comparison; use --substring to\n# look for the given string anywhere in $output.\n#\n# By default we look in \"$output\", which is set in run_skopeo().\n# To override, use --from=\"some-other-string\" (e.g. \"${lines[0]}\")\n#\n# Examples:\n#\n#   expect_output \"this is exactly what we expect\"\n#   expect_output \"foo=bar\"  \"description of this particular test\"\n#   expect_output --from=\"${lines[0]}\"  \"expected first line\"\n#\nfunction expect_output() {\n    # By default we examine $output, the result of run_skopeo\n    local actual=\"$output\"\n    local check_substring=\n\n    # option processing: recognize --from=\"...\", --substring\n    local opt\n    for opt; do\n        local value=$(expr \"$opt\" : '[^=]*=\\(.*\\)')\n        case \"$opt\" in\n            --from=*)       actual=\"$value\";   shift;;\n            --substring)    check_substring=1; shift;;\n            --)             shift; break;;\n            -*)             die \"Invalid option '$opt'\" ;;\n            *)              break;;\n        esac\n    done\n\n    local expect=\"$1\"\n    local testname=\"${2:-${MOST_RECENT_SKOPEO_COMMAND:-[no test name given]}}\"\n\n    if [ -z \"$expect\" ]; then\n        if [ -z \"$actual\" ]; then\n            return\n        fi\n        expect='[no output]'\n    elif [ \"$actual\" = \"$expect\" ]; then\n\treturn\n    elif [ -n \"$check_substring\" ]; then\n        if [[ \"$actual\" =~ $expect ]]; then\n            return\n        fi\n    fi\n\n    # This is a multi-line message, which may in turn contain multi-line\n    # output, so let's format it ourselves, readably\n    local -a actual_split\n    readarray -t actual_split <<<\"$actual\"\n    printf \"#/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\\n\" >&2\n    printf \"#|     FAIL: $testname\\n\"                          >&2\n    printf \"#| expected: '%s'\\n\" \"$expect\"                     >&2\n    printf \"#|   actual: '%s'\\n\" \"${actual_split[0]}\"          >&2\n    local line\n    for line in \"${actual_split[@]:1}\"; do\n        printf \"#|         > '%s'\\n\" \"$line\"                   >&2\n    done\n    printf \"#\\\\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\" >&2\n    false\n}\n\n#######################\n#  expect_line_count  #  Check the expected number of output lines\n#######################\n#\n# ...from the most recent run_skopeo command\n#\nfunction expect_line_count() {\n    local expect=\"$1\"\n    local testname=\"${2:-${MOST_RECENT_SKOPEO_COMMAND:-[no test name given]}}\"\n\n    local actual=\"${#lines[@]}\"\n    if [ \"$actual\" -eq \"$expect\" ]; then\n        return\n    fi\n\n    printf \"#/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\\n\"          >&2\n    printf \"#| FAIL: $testname\\n\"                                       >&2\n    printf \"#| Expected %d lines of output, got %d\\n\" $expect $actual   >&2\n    printf \"#| Output was:\\n\"                                           >&2\n    local line\n    for line in \"${lines[@]}\"; do\n        printf \"#| >%s\\n\" \"$line\"                                       >&2\n    done\n    printf \"#\\\\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\"         >&2\n    false\n}\n\n# END   standard helpers for running skopeo and testing results\n###############################################################################\n# BEGIN helpers for starting/stopping registries\n\n####################\n#  start_registry  #  Run a local registry container\n####################\n#\n# Usage:  start_registry [OPTIONS] NAME\n#\n#   OPTIONS\n#       --port=NNNN         Port to listen on (default: 5000)\n#       --testuser=XXX      Require authentication; this is the username\n#       --testpassword=XXX  ...and the password (these two go together)\n#       --with-cert         Create a cert for running with TLS (not working)\n#       --enable-delete     Set allowing registry deletions (default: false)\n#\n#   NAME is the container name to assign.\n#\nstart_registry() {\n    local port=5000\n    local testuser=\n    local testpassword=\n    local create_cert=\n    local enable_delete=false\n\n    # option processing: recognize options for running the registry\n    # in different modes.\n    local opt\n    for opt; do\n        local value=$(expr \"$opt\" : '[^=]*=\\(.*\\)')\n        case \"$opt\" in\n            --port=*)           port=\"$value\";          shift;;\n            --testuser=*)       testuser=\"$value\";      shift;;\n            --testpassword=*)   testpassword=\"$value\";  shift;;\n            --with-cert)        create_cert=1;          shift;;\n            --enable-delete=*)  enable_delete=\"$value\"; shift;;\n            -*)                 die \"Invalid option '$opt'\" ;;\n            *)                  break;;\n        esac\n    done\n\n    local name=${1?start_registry() invoked without a NAME}\n\n    # Temp directory must be defined and must exist\n    [[ -n $TESTDIR && -d $TESTDIR ]]\n\n    AUTHDIR=$TESTDIR/auth\n    mkdir -p $AUTHDIR\n\n    local -a reg_args=(-v $AUTHDIR:/auth:Z -p $port:5000)\n    if [[ \"$enable_delete\" == \"true\" ]]; then\n        reg_args+=( -e REGISTRY_STORAGE_DELETE_ENABLED=true)\n    fi\n\n    # TODO: This is TEMPORARY (as of 2020-03-30); remove once crun is fixed.\n    # Skopeo PR #836 claims there's a \"regression\" in crun with cgroupsv1,\n    # but offers no details about what it is (crun issue nor PR) nor when/if\n    # it's fixed. It's simply a workaround, forcing podman to use runc,\n    # which might work great for skopeo CI but breaks Fedora gating tests.\n    # Instead of always forcing runc, do so only when under cgroups v1:\n    local runtime=\n    cgroup_type=$(stat -f -c %T /sys/fs/cgroup)\n    if [[ $cgroup_type == \"tmpfs\" ]]; then\n        runtime=\"--runtime runc\"\n    fi\n\n    # cgroup option necessary under podman-in-podman (CI tests),\n    # and doesn't seem to do any harm otherwise.\n    PODMAN=\"podman $runtime --cgroup-manager=cgroupfs\"\n\n    # Called with --testuser? Create an htpasswd file\n    if [[ -n $testuser ]]; then\n        if [[ -z $testpassword ]]; then\n            die \"start_registry() invoked with testuser but no testpassword\"\n        fi\n\n        if ! grep -E -q \"^$testuser:\" $AUTHDIR/htpasswd; then\n            htpasswd -Bbn $testuser $testpassword >> $AUTHDIR/htpasswd\n        fi\n\n        reg_args+=(\n            -e REGISTRY_AUTH=htpasswd\n            -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd\n            -e REGISTRY_AUTH_HTPASSWD_REALM=\"Registry Realm\"\n        )\n    fi\n\n    # Called with --with-cert? Create certificates.\n    if [[ -n $create_cert ]]; then\n        CERT=$AUTHDIR/domain.crt\n        if [ ! -e $CERT ]; then\n            log_and_run openssl req -newkey rsa:4096 -nodes -sha256 \\\n                    -keyout $AUTHDIR/domain.key -x509 -days 2 \\\n                    -out $CERT \\\n                    -subj \"/C=US/ST=Foo/L=Bar/O=Red Hat, Inc./CN=registry host certificate\" \\\n                    -addext subjectAltName=DNS:localhost\n        fi\n\n        reg_args+=(\n            -e REGISTRY_HTTP_TLS_CERTIFICATE=/auth/domain.crt\n            -e REGISTRY_HTTP_TLS_KEY=/auth/domain.key\n        )\n\n        # Copy .crt file to a directory *without* the .key one, so we can\n        # test the client. (If client sees a matching .key file, it fails)\n        # Thanks to Miloslav Trmac for this hint.\n        mkdir -p $TESTDIR/client-auth\n        log_and_run cp $CERT $TESTDIR/client-auth/\n    fi\n\n    log_and_run $PODMAN run -d --name $name \"${reg_args[@]}\" $REGISTRY_FQIN\n\n    # Wait for registry to actually come up\n    timeout=10\n    while [[ $timeout -ge 1 ]]; do\n        if echo -n >/dev/tcp/127.0.0.1/$port; then\n            return\n        fi\n\n        timeout=$(( timeout - 1 ))\n        sleep 1\n    done\n    log_and_run $PODMAN logs $name\n    die \"Timed out waiting for registry container to respond on :$port\"\n}\n\n# END   helpers for starting/stopping registries\n###############################################################################\n# BEGIN miscellaneous tools\n\n###################\n#  random_string  #  Returns a pseudorandom human-readable string\n###################\n#\n# Numeric argument, if present, is desired length of string\n#\nfunction random_string() {\n    local length=${1:-10}\n\n    head /dev/urandom | tr -dc a-zA-Z0-9 | head -c$length\n}\n\n# END   miscellaneous tools\n###############################################################################\n"
  },
  {
    "path": "systemtest/make-noarch-manifest",
    "content": "#!/bin/sh\n#\n# Tool for creating an image whose OS and arch will (probably) never\n# match a system on which skopeo will run. This image will be used\n# in the 'inspect' test.\n#\nset -ex\n\n# Name and tag of the image we create\nimgname=notmyarch\nimgtag=$(date +%Y%m%d)\n\n# (In case older image exists from a prior run)\nbuildah rmi $imgname:$imgtag &>/dev/null || true\n\n#\n# Step 1: create an image containing only a README and a copy of this script\n#\nid=$(buildah from scratch)\n\nnow=$(date --rfc-3339=seconds)\nreadme=$(mktemp -t README.XXXXXXXX)\nME=$(basename $0)\n\ncat >| $readme <<EOF\nThis is a dummy image intended solely for skopeo testing.\n\nThis image was created $now\n\nThe script used to create this image is available as $ME\nEOF\n\nbuildah copy $id $readme /README\nbuildah copy $id $0      /$ME\n\nbuildah commit $id my_tmp_image\nbuildah rm     $id\n\n#\n# Step 2: create a manifest list, then add the above image but with\n# an os+arch override.\n#\nbuildah manifest create $imgname:$imgtag\n\nbuildah manifest add \\\n        --os amigaos \\\n        --arch mc68000 \\\n        --variant 1000 \\\n        $imgname:$imgtag my_tmp_image\n\n# Done. Show instructions.\ncat <<EOF\nDONE!\n\nYou can inspect the created image with:\n\n    skopeo inspect --raw containers-storage:localhost/$imgname:$imgtag | jq .\n\n(FIXME: is there a way to, like, mount the image and verify the files?)\n\nIf you're happy with this image, you can now:\n\n    buildah manifest push --all $imgname:$imgtag docker://quay.io/libpod/$imgname:$imgtag\n\nOnce done, you urgently need to:\n\n    buildah rmi $imgname:$imgtag  my_tmp_image\n\nIf you don't do this, 'podman images' will barf catastrophically!\nEOF\n"
  },
  {
    "path": "systemtest/run-tests",
    "content": "#!/bin/bash\n#\n# run-tests - simple wrapper allowing shortcuts on invocation\n#\n\nTEST_DIR=$(dirname $0)\nTESTS=$TEST_DIR\n\nfor i; do\n    case \"$i\" in\n        *.bats)    TESTS=$i ;;\n        *)         TESTS=$(echo $TEST_DIR/*$i*.bats) ;;\n    esac\ndone\n\nbats $TESTS\n"
  },
  {
    "path": "systemtest/tmt/main.fmf",
    "content": "environment:\n    SKOPEO_BINARY: /usr/bin/skopeo\n\nadjust:\n    - when: initiator != \"packit\"\n      environment+:\n        RELEASE_TESTING: true\n\nsummary: System test\ntest: |\n    rpm -q containers-common skopeo-tests\n    # If these tests are to be run anywhere else, TMT can fetch\n    # them using the URL and git ref, so git commands should work.\n    make -C $(git rev-parse --show-toplevel) test-system-local\nrequire:\n    - git-core\n    - make\n    - skopeo-tests\nduration: 60m\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/.golangci.yml",
    "content": "# SPDX-License-Identifier: MPL-2.0\n#\n# libpathrs: safe path resolution on Linux\n# Copyright (C) 2019-2025 SUSE LLC\n# Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\nversion: \"2\"\nlinters:\n  enable:\n    - bidichk\n    - cyclop\n    - errname\n    - errorlint\n    - exhaustive\n    - goconst\n    - godot\n    - gomoddirectives\n    - gosec\n    - mirror\n    - misspell\n    - mnd\n    - nilerr\n    - nilnil\n    - perfsprint\n    - prealloc\n    - reassign\n    - revive\n    - unconvert\n    - unparam\n    - usestdlibvars\n    - wastedassign\nformatters:\n  enable:\n    - gofumpt\n    - goimports\n  settings:\n    goimports:\n      local-prefixes:\n        - cyphar.com/go-pathrs\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/COPYING",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in\n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/doc.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\n// Package pathrs provides bindings for libpathrs, a library for safe path\n// resolution on Linux.\npackage pathrs\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/handle_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\npackage pathrs\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"cyphar.com/go-pathrs/internal/fdutils\"\n\t\"cyphar.com/go-pathrs/internal/libpathrs\"\n)\n\n// Handle is a handle for a path within a given [Root]. This handle references\n// an already-resolved path which can be used for only one purpose -- to\n// \"re-open\" the handle and get an actual [os.File] which can be used for\n// ordinary operations.\n//\n// If you wish to open a file without having an intermediate [Handle] object,\n// you can try to use [Root.Open] or [Root.OpenFile].\n//\n// It is critical that perform all relevant operations through this [Handle]\n// (rather than fetching the underlying [os.File] yourself with [Handle.IntoFile]),\n// because the security properties of libpathrs depend on users doing all\n// relevant filesystem operations through libpathrs.\ntype Handle struct {\n\tinner *os.File\n}\n\n// HandleFromFile creates a new [Handle] from an existing file handle. The\n// handle will be copied by this method, so the original handle should still be\n// freed by the caller.\n//\n// This is effectively the inverse operation of [Handle.IntoFile], and is used\n// for \"deserialising\" pathrs root handles.\nfunc HandleFromFile(file *os.File) (*Handle, error) {\n\tnewFile, err := fdutils.DupFile(file)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"duplicate handle fd: %w\", err)\n\t}\n\treturn &Handle{inner: newFile}, nil\n}\n\n// Open creates an \"upgraded\" file handle to the file referenced by the\n// [Handle]. Note that the original [Handle] is not consumed by this operation,\n// and can be opened multiple times.\n//\n// The handle returned is only usable for reading, and this is method is\n// shorthand for [Handle.OpenFile] with os.O_RDONLY.\n//\n// TODO: Rename these to \"Reopen\" or something.\nfunc (h *Handle) Open() (*os.File, error) {\n\treturn h.OpenFile(os.O_RDONLY)\n}\n\n// OpenFile creates an \"upgraded\" file handle to the file referenced by the\n// [Handle]. Note that the original [Handle] is not consumed by this operation,\n// and can be opened multiple times.\n//\n// The provided flags indicate which open(2) flags are used to create the new\n// handle.\n//\n// TODO: Rename these to \"Reopen\" or something.\nfunc (h *Handle) OpenFile(flags int) (*os.File, error) {\n\treturn fdutils.WithFileFd(h.inner, func(fd uintptr) (*os.File, error) {\n\t\tnewFd, err := libpathrs.Reopen(fd, flags)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn os.NewFile(newFd, h.inner.Name()), nil\n\t})\n}\n\n// IntoFile unwraps the [Handle] into its underlying [os.File].\n//\n// You almost certainly want to use [Handle.OpenFile] to get a non-O_PATH\n// version of this [Handle].\n//\n// This operation returns the internal [os.File] of the [Handle] directly, so\n// calling [Handle.Close] will also close any copies of the returned [os.File].\n// If you want to get an independent copy, use [Handle.Clone] followed by\n// [Handle.IntoFile] on the cloned [Handle].\nfunc (h *Handle) IntoFile() *os.File {\n\t// TODO: Figure out if we really don't want to make a copy.\n\t// TODO: We almost certainly want to clear r.inner here, but we can't do\n\t//       that easily atomically (we could use atomic.Value but that'll make\n\t//       things quite a bit uglier).\n\treturn h.inner\n}\n\n// Clone creates a copy of a [Handle], such that it has a separate lifetime to\n// the original (while referring to the same underlying file).\nfunc (h *Handle) Clone() (*Handle, error) {\n\treturn HandleFromFile(h.inner)\n}\n\n// Close frees all of the resources used by the [Handle].\nfunc (h *Handle) Close() error {\n\treturn h.inner.Close()\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/internal/fdutils/fd_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\n// Package fdutils contains a few helper methods when dealing with *os.File and\n// file descriptors.\npackage fdutils\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"cyphar.com/go-pathrs/internal/libpathrs\"\n)\n\n// DupFd makes a duplicate of the given fd.\nfunc DupFd(fd uintptr, name string) (*os.File, error) {\n\tnewFd, err := unix.FcntlInt(fd, unix.F_DUPFD_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fcntl(F_DUPFD_CLOEXEC): %w\", err)\n\t}\n\treturn os.NewFile(uintptr(newFd), name), nil\n}\n\n// WithFileFd is a more ergonomic wrapper around file.SyscallConn().Control().\nfunc WithFileFd[T any](file *os.File, fn func(fd uintptr) (T, error)) (T, error) {\n\tconn, err := file.SyscallConn()\n\tif err != nil {\n\t\treturn *new(T), err\n\t}\n\tvar (\n\t\tret      T\n\t\tinnerErr error\n\t)\n\tif err := conn.Control(func(fd uintptr) {\n\t\tret, innerErr = fn(fd)\n\t}); err != nil {\n\t\treturn *new(T), err\n\t}\n\treturn ret, innerErr\n}\n\n// DupFile makes a duplicate of the given file.\nfunc DupFile(file *os.File) (*os.File, error) {\n\treturn WithFileFd(file, func(fd uintptr) (*os.File, error) {\n\t\treturn DupFd(fd, file.Name())\n\t})\n}\n\n// MkFile creates a new *os.File from the provided file descriptor. However,\n// unlike os.NewFile, the file's Name is based on the real path (provided by\n// /proc/self/fd/$n).\nfunc MkFile(fd uintptr) (*os.File, error) {\n\tfdPath := fmt.Sprintf(\"fd/%d\", fd)\n\tfdName, err := libpathrs.ProcReadlinkat(libpathrs.ProcDefaultRootFd, libpathrs.ProcThreadSelf, fdPath)\n\tif err != nil {\n\t\t_ = unix.Close(int(fd))\n\t\treturn nil, fmt.Errorf(\"failed to fetch real name of fd %d: %w\", fd, err)\n\t}\n\t// TODO: Maybe we should prefix this name with something to indicate to\n\t// users that they must not use this path as a \"safe\" path. Something like\n\t// \"//pathrs-handle:/foo/bar\"?\n\treturn os.NewFile(fd, fdName), nil\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/internal/libpathrs/error_unix.go",
    "content": "//go:build linux\n\n// TODO: Use \"go:build unix\" once we bump the minimum Go version 1.19.\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\npackage libpathrs\n\nimport (\n\t\"syscall\"\n)\n\n// Error represents an underlying libpathrs error.\ntype Error struct {\n\tdescription string\n\terrno       syscall.Errno\n}\n\n// Error returns a textual description of the error.\nfunc (err *Error) Error() string {\n\treturn err.description\n}\n\n// Unwrap returns the underlying error which was wrapped by this error (if\n// applicable).\nfunc (err *Error) Unwrap() error {\n\tif err.errno != 0 {\n\t\treturn err.errno\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/internal/libpathrs/libpathrs_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\n// Package libpathrs is an internal thin wrapper around the libpathrs C API.\npackage libpathrs\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n/*\n// TODO: Figure out if we need to add support for linking against libpathrs\n//       statically even if in dynamically linked builds in order to make\n//       packaging a bit easier (using \"-Wl,-Bstatic -lpathrs -Wl,-Bdynamic\" or\n//       \"-l:pathrs.a\").\n#cgo pkg-config: pathrs\n#include <pathrs.h>\n\n// This is a workaround for unsafe.Pointer() not working for non-void pointers.\nchar *cast_ptr(void *ptr) { return ptr; }\n*/\nimport \"C\"\n\nfunc fetchError(errID C.int) error {\n\tif errID >= C.__PATHRS_MAX_ERR_VALUE {\n\t\treturn nil\n\t}\n\tcErr := C.pathrs_errorinfo(errID)\n\tdefer C.pathrs_errorinfo_free(cErr)\n\n\tvar err error\n\tif cErr != nil {\n\t\terr = &Error{\n\t\t\terrno:       syscall.Errno(cErr.saved_errno),\n\t\t\tdescription: C.GoString(cErr.description),\n\t\t}\n\t}\n\treturn err\n}\n\n// OpenRoot wraps pathrs_open_root.\nfunc OpenRoot(path string) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_open_root(cPath)\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// Reopen wraps pathrs_reopen.\nfunc Reopen(fd uintptr, flags int) (uintptr, error) {\n\tnewFd := C.pathrs_reopen(C.int(fd), C.int(flags))\n\treturn uintptr(newFd), fetchError(newFd)\n}\n\n// InRootResolve wraps pathrs_inroot_resolve.\nfunc InRootResolve(rootFd uintptr, path string) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_inroot_resolve(C.int(rootFd), cPath)\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// InRootResolveNoFollow wraps pathrs_inroot_resolve_nofollow.\nfunc InRootResolveNoFollow(rootFd uintptr, path string) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_inroot_resolve_nofollow(C.int(rootFd), cPath)\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// InRootOpen wraps pathrs_inroot_open.\nfunc InRootOpen(rootFd uintptr, path string, flags int) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_inroot_open(C.int(rootFd), cPath, C.int(flags))\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// InRootReadlink wraps pathrs_inroot_readlink.\nfunc InRootReadlink(rootFd uintptr, path string) (string, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tsize := 128\n\tfor {\n\t\tlinkBuf := make([]byte, size)\n\t\tn := C.pathrs_inroot_readlink(C.int(rootFd), cPath, C.cast_ptr(unsafe.Pointer(&linkBuf[0])), C.size_t(len(linkBuf)))\n\t\tswitch {\n\t\tcase int(n) < C.__PATHRS_MAX_ERR_VALUE:\n\t\t\treturn \"\", fetchError(n)\n\t\tcase int(n) <= len(linkBuf):\n\t\t\treturn string(linkBuf[:int(n)]), nil\n\t\tdefault:\n\t\t\t// The contents were truncated. Unlike readlinkat, pathrs returns\n\t\t\t// the size of the link when it checked. So use the returned size\n\t\t\t// as a basis for the reallocated size (but in order to avoid a DoS\n\t\t\t// where a magic-link is growing by a single byte each iteration,\n\t\t\t// make sure we are a fair bit larger).\n\t\t\tsize += int(n)\n\t\t}\n\t}\n}\n\n// InRootRmdir wraps pathrs_inroot_rmdir.\nfunc InRootRmdir(rootFd uintptr, path string) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\terr := C.pathrs_inroot_rmdir(C.int(rootFd), cPath)\n\treturn fetchError(err)\n}\n\n// InRootUnlink wraps pathrs_inroot_unlink.\nfunc InRootUnlink(rootFd uintptr, path string) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\terr := C.pathrs_inroot_unlink(C.int(rootFd), cPath)\n\treturn fetchError(err)\n}\n\n// InRootRemoveAll wraps pathrs_inroot_remove_all.\nfunc InRootRemoveAll(rootFd uintptr, path string) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\terr := C.pathrs_inroot_remove_all(C.int(rootFd), cPath)\n\treturn fetchError(err)\n}\n\n// InRootCreat wraps pathrs_inroot_creat.\nfunc InRootCreat(rootFd uintptr, path string, flags int, mode uint32) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_inroot_creat(C.int(rootFd), cPath, C.int(flags), C.uint(mode))\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// InRootRename wraps pathrs_inroot_rename.\nfunc InRootRename(rootFd uintptr, src, dst string, flags uint) error {\n\tcSrc := C.CString(src)\n\tdefer C.free(unsafe.Pointer(cSrc))\n\n\tcDst := C.CString(dst)\n\tdefer C.free(unsafe.Pointer(cDst))\n\n\terr := C.pathrs_inroot_rename(C.int(rootFd), cSrc, cDst, C.uint(flags))\n\treturn fetchError(err)\n}\n\n// InRootMkdir wraps pathrs_inroot_mkdir.\nfunc InRootMkdir(rootFd uintptr, path string, mode uint32) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\terr := C.pathrs_inroot_mkdir(C.int(rootFd), cPath, C.uint(mode))\n\treturn fetchError(err)\n}\n\n// InRootMkdirAll wraps pathrs_inroot_mkdir_all.\nfunc InRootMkdirAll(rootFd uintptr, path string, mode uint32) (uintptr, error) {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_inroot_mkdir_all(C.int(rootFd), cPath, C.uint(mode))\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// InRootMknod wraps pathrs_inroot_mknod.\nfunc InRootMknod(rootFd uintptr, path string, mode uint32, dev uint64) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\terr := C.pathrs_inroot_mknod(C.int(rootFd), cPath, C.uint(mode), C.dev_t(dev))\n\treturn fetchError(err)\n}\n\n// InRootSymlink wraps pathrs_inroot_symlink.\nfunc InRootSymlink(rootFd uintptr, path, target string) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tcTarget := C.CString(target)\n\tdefer C.free(unsafe.Pointer(cTarget))\n\n\terr := C.pathrs_inroot_symlink(C.int(rootFd), cPath, cTarget)\n\treturn fetchError(err)\n}\n\n// InRootHardlink wraps pathrs_inroot_hardlink.\nfunc InRootHardlink(rootFd uintptr, path, target string) error {\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tcTarget := C.CString(target)\n\tdefer C.free(unsafe.Pointer(cTarget))\n\n\terr := C.pathrs_inroot_hardlink(C.int(rootFd), cPath, cTarget)\n\treturn fetchError(err)\n}\n\n// ProcBase is pathrs_proc_base_t (uint64_t).\ntype ProcBase C.pathrs_proc_base_t\n\n// FIXME: We need to open-code the constants because CGo unfortunately will\n// implicitly convert any non-literal constants (i.e. those resolved using gcc)\n// to signed integers. See <https://github.com/golang/go/issues/39136> for some\n// more information on the underlying issue (though.\nconst (\n\t// ProcRoot is PATHRS_PROC_ROOT.\n\tProcRoot ProcBase = 0xFFFF_FFFE_7072_6F63 // C.PATHRS_PROC_ROOT\n\t// ProcSelf is PATHRS_PROC_SELF.\n\tProcSelf ProcBase = 0xFFFF_FFFE_091D_5E1F // C.PATHRS_PROC_SELF\n\t// ProcThreadSelf is PATHRS_PROC_THREAD_SELF.\n\tProcThreadSelf ProcBase = 0xFFFF_FFFE_3EAD_5E1F // C.PATHRS_PROC_THREAD_SELF\n\n\t// ProcBaseTypeMask is __PATHRS_PROC_TYPE_MASK.\n\tProcBaseTypeMask ProcBase = 0xFFFF_FFFF_0000_0000 // C.__PATHRS_PROC_TYPE_MASK\n\t// ProcBaseTypePid is __PATHRS_PROC_TYPE_PID.\n\tProcBaseTypePid ProcBase = 0x8000_0000_0000_0000 // C.__PATHRS_PROC_TYPE_PID\n\n\t// ProcDefaultRootFd is PATHRS_PROC_DEFAULT_ROOTFD.\n\tProcDefaultRootFd = -int(syscall.EBADF) // C.PATHRS_PROC_DEFAULT_ROOTFD\n)\n\nfunc assertEqual[T comparable](a, b T, msg string) {\n\tif a != b {\n\t\tpanic(fmt.Sprintf(\"%s ((%T) %#v != (%T) %#v)\", msg, a, a, b, b))\n\t}\n}\n\n// Verify that the values above match the actual C values. Unfortunately, Go\n// only allows us to forcefully cast int64 to uint64 if you use a temporary\n// variable, which means we cannot do it in a const context and thus need to do\n// it at runtime (even though it is a check that fundamentally could be done at\n// compile-time)...\nfunc init() {\n\tvar (\n\t\tactualProcRoot       int64 = C.PATHRS_PROC_ROOT\n\t\tactualProcSelf       int64 = C.PATHRS_PROC_SELF\n\t\tactualProcThreadSelf int64 = C.PATHRS_PROC_THREAD_SELF\n\t)\n\n\tassertEqual(ProcRoot, ProcBase(actualProcRoot), \"PATHRS_PROC_ROOT\")\n\tassertEqual(ProcSelf, ProcBase(actualProcSelf), \"PATHRS_PROC_SELF\")\n\tassertEqual(ProcThreadSelf, ProcBase(actualProcThreadSelf), \"PATHRS_PROC_THREAD_SELF\")\n\n\tvar (\n\t\tactualProcBaseTypeMask uint64 = C.__PATHRS_PROC_TYPE_MASK\n\t\tactualProcBaseTypePid  uint64 = C.__PATHRS_PROC_TYPE_PID\n\t)\n\n\tassertEqual(ProcBaseTypeMask, ProcBase(actualProcBaseTypeMask), \"__PATHRS_PROC_TYPE_MASK\")\n\tassertEqual(ProcBaseTypePid, ProcBase(actualProcBaseTypePid), \"__PATHRS_PROC_TYPE_PID\")\n\n\tassertEqual(ProcDefaultRootFd, int(C.PATHRS_PROC_DEFAULT_ROOTFD), \"PATHRS_PROC_DEFAULT_ROOTFD\")\n}\n\n// ProcPid reimplements the PROC_PID(x) conversion.\nfunc ProcPid(pid uint32) ProcBase { return ProcBaseTypePid | ProcBase(pid) }\n\n// ProcOpenat wraps pathrs_proc_openat.\nfunc ProcOpenat(procRootFd int, base ProcBase, path string, flags int) (uintptr, error) {\n\tcBase := C.pathrs_proc_base_t(base)\n\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tfd := C.pathrs_proc_openat(C.int(procRootFd), cBase, cPath, C.int(flags))\n\treturn uintptr(fd), fetchError(fd)\n}\n\n// ProcReadlinkat wraps pathrs_proc_readlinkat.\nfunc ProcReadlinkat(procRootFd int, base ProcBase, path string) (string, error) {\n\t// TODO: See if we can unify this code with InRootReadlink.\n\n\tcBase := C.pathrs_proc_base_t(base)\n\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\tsize := 128\n\tfor {\n\t\tlinkBuf := make([]byte, size)\n\t\tn := C.pathrs_proc_readlinkat(\n\t\t\tC.int(procRootFd), cBase, cPath,\n\t\t\tC.cast_ptr(unsafe.Pointer(&linkBuf[0])), C.size_t(len(linkBuf)))\n\t\tswitch {\n\t\tcase int(n) < C.__PATHRS_MAX_ERR_VALUE:\n\t\t\treturn \"\", fetchError(n)\n\t\tcase int(n) <= len(linkBuf):\n\t\t\treturn string(linkBuf[:int(n)]), nil\n\t\tdefault:\n\t\t\t// The contents were truncated. Unlike readlinkat, pathrs returns\n\t\t\t// the size of the link when it checked. So use the returned size\n\t\t\t// as a basis for the reallocated size (but in order to avoid a DoS\n\t\t\t// where a magic-link is growing by a single byte each iteration,\n\t\t\t// make sure we are a fair bit larger).\n\t\t\tsize += int(n)\n\t\t}\n\t}\n}\n\n// ProcfsOpenHow is pathrs_procfs_open_how (struct).\ntype ProcfsOpenHow C.pathrs_procfs_open_how\n\nconst (\n\t// ProcfsNewUnmasked is PATHRS_PROCFS_NEW_UNMASKED.\n\tProcfsNewUnmasked = C.PATHRS_PROCFS_NEW_UNMASKED\n)\n\n// Flags returns a pointer to the internal flags field to allow other packages\n// to modify structure fields that are internal due to Go's visibility model.\nfunc (how *ProcfsOpenHow) Flags() *C.uint64_t { return &how.flags }\n\n// ProcfsOpen is pathrs_procfs_open (sizeof(*how) is passed automatically).\nfunc ProcfsOpen(how *ProcfsOpenHow) (uintptr, error) {\n\tfd := C.pathrs_procfs_open((*C.pathrs_procfs_open_how)(how), C.size_t(unsafe.Sizeof(*how)))\n\treturn uintptr(fd), fetchError(fd)\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/procfs/procfs_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\n// Package procfs provides a safe API for operating on /proc on Linux.\npackage procfs\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\n\t\"cyphar.com/go-pathrs/internal/fdutils\"\n\t\"cyphar.com/go-pathrs/internal/libpathrs\"\n)\n\n// ProcBase is used with [ProcReadlink] and related functions to indicate what\n// /proc subpath path operations should be done relative to.\ntype ProcBase struct {\n\tinner libpathrs.ProcBase\n}\n\nvar (\n\t// ProcRoot indicates to use /proc. Note that this mode may be more\n\t// expensive because we have to take steps to try to avoid leaking unmasked\n\t// procfs handles, so you should use [ProcBaseSelf] if you can.\n\tProcRoot = ProcBase{inner: libpathrs.ProcRoot}\n\t// ProcSelf indicates to use /proc/self. For most programs, this is the\n\t// standard choice.\n\tProcSelf = ProcBase{inner: libpathrs.ProcSelf}\n\t// ProcThreadSelf indicates to use /proc/thread-self. In multi-threaded\n\t// programs where one thread has a different CLONE_FS, it is possible for\n\t// /proc/self to point the wrong thread and so /proc/thread-self may be\n\t// necessary.\n\tProcThreadSelf = ProcBase{inner: libpathrs.ProcThreadSelf}\n)\n\n// ProcPid returns a ProcBase which indicates to use /proc/$pid for the given\n// PID (or TID). Be aware that due to PID recycling, using this is generally\n// not safe except in certain circumstances. Namely:\n//\n//   - PID 1 (the init process), as that PID cannot ever get recycled.\n//   - Your current PID (though you should just use [ProcBaseSelf]).\n//   - Your current TID if you have used [runtime.LockOSThread] (though you\n//     should just use [ProcBaseThreadSelf]).\n//   - PIDs of child processes (as long as you are sure that no other part of\n//     your program incorrectly catches or ignores SIGCHLD, and that you do it\n//     *before* you call wait(2)or any equivalent method that could reap\n//     zombies).\nfunc ProcPid(pid int) ProcBase {\n\tif pid < 0 || uint64(pid) >= 1<<31 {\n\t\tpanic(\"invalid ProcBasePid value\") // TODO: should this be an error?\n\t}\n\tpid32 := uint32(pid) //nolint:gosec // G115 false positive <https://github.com/securego/gosec/issues/1212>\n\treturn ProcBase{inner: libpathrs.ProcPid(pid32)}\n}\n\n// ThreadCloser is a callback that needs to be called when you are done\n// operating on an [os.File] fetched using [Handle.OpenThreadSelf].\ntype ThreadCloser func()\n\n// Handle is a wrapper around an *os.File handle to \"/proc\", which can be\n// used to do further procfs-related operations in a safe way.\ntype Handle struct {\n\tinner *os.File\n}\n\n// Close releases all internal resources for this [Handle].\n//\n// Note that if the handle is actually the global cached handle, this operation\n// is a no-op.\nfunc (proc *Handle) Close() error {\n\tvar err error\n\tif proc.inner != nil {\n\t\terr = proc.inner.Close()\n\t}\n\treturn err\n}\n\n// OpenOption is a configuration function passed as an argument to [Open].\ntype OpenOption func(*libpathrs.ProcfsOpenHow) error\n\n// UnmaskedProcRoot can be passed to [Open] to request an unmasked procfs\n// handle be created.\n//\n//\tprocfs, err := procfs.OpenRoot(procfs.UnmaskedProcRoot)\nfunc UnmaskedProcRoot(how *libpathrs.ProcfsOpenHow) error {\n\t*how.Flags() |= libpathrs.ProcfsNewUnmasked\n\treturn nil\n}\n\n// Open creates a new [Handle] to a safe \"/proc\", based on the passed\n// configuration options (in the form of a series of [OpenOption]s).\nfunc Open(opts ...OpenOption) (*Handle, error) {\n\tvar how libpathrs.ProcfsOpenHow\n\tfor _, opt := range opts {\n\t\tif err := opt(&how); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tfd, err := libpathrs.ProcfsOpen(&how)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar procFile *os.File\n\tif int(fd) >= 0 {\n\t\tprocFile = os.NewFile(fd, \"/proc\")\n\t}\n\t// TODO: Check that fd == PATHRS_PROC_DEFAULT_ROOTFD in the <0 case?\n\treturn &Handle{inner: procFile}, nil\n}\n\n// TODO: Switch to something fdutils.WithFileFd-like.\nfunc (proc *Handle) fd() int {\n\tif proc.inner != nil {\n\t\treturn int(proc.inner.Fd())\n\t}\n\treturn libpathrs.ProcDefaultRootFd\n}\n\n// TODO: Should we expose open?\nfunc (proc *Handle) open(base ProcBase, path string, flags int) (_ *os.File, Closer ThreadCloser, Err error) {\n\tvar closer ThreadCloser\n\tif base == ProcThreadSelf {\n\t\truntime.LockOSThread()\n\t\tcloser = runtime.UnlockOSThread\n\t}\n\tdefer func() {\n\t\tif closer != nil && Err != nil {\n\t\t\tcloser()\n\t\t\tCloser = nil\n\t\t}\n\t}()\n\n\tfd, err := libpathrs.ProcOpenat(proc.fd(), base.inner, path, flags)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tfile, err := fdutils.MkFile(fd)\n\treturn file, closer, err\n}\n\n// OpenRoot safely opens a given path from inside /proc/.\n//\n// This function must only be used for accessing global information from procfs\n// (such as /proc/cpuinfo) or information about other processes (such as\n// /proc/1). Accessing your own process information should be done using\n// [Handle.OpenSelf] or [Handle.OpenThreadSelf].\nfunc (proc *Handle) OpenRoot(path string, flags int) (*os.File, error) {\n\tfile, closer, err := proc.open(ProcRoot, path, flags)\n\tif closer != nil {\n\t\t// should not happen\n\t\tpanic(\"non-zero closer returned from procOpen(ProcRoot)\")\n\t}\n\treturn file, err\n}\n\n// OpenSelf safely opens a given path from inside /proc/self/.\n//\n// This method is recommend for getting process information about the current\n// process for almost all Go processes *except* for cases where there are\n// [runtime.LockOSThread] threads that have changed some aspect of their state\n// (such as through unshare(CLONE_FS) or changing namespaces).\n//\n// For such non-heterogeneous processes, /proc/self may reference to a task\n// that has different state from the current goroutine and so it may be\n// preferable to use [Handle.OpenThreadSelf]. The same is true if a user\n// really wants to inspect the current OS thread's information (such as\n// /proc/thread-self/stack or /proc/thread-self/status which is always uniquely\n// per-thread).\n//\n// Unlike [Handle.OpenThreadSelf], this method does not involve locking\n// the goroutine to the current OS thread and so is simpler to use and\n// theoretically has slightly less overhead.\nfunc (proc *Handle) OpenSelf(path string, flags int) (*os.File, error) {\n\tfile, closer, err := proc.open(ProcSelf, path, flags)\n\tif closer != nil {\n\t\t// should not happen\n\t\tpanic(\"non-zero closer returned from procOpen(ProcSelf)\")\n\t}\n\treturn file, err\n}\n\n// OpenPid safely opens a given path from inside /proc/$pid/, where pid can be\n// either a PID or TID.\n//\n// This is effectively equivalent to calling [Handle.OpenRoot] with the\n// pid prefixed to the subpath.\n//\n// Be aware that due to PID recycling, using this is generally not safe except\n// in certain circumstances. See the documentation of [ProcPid] for more\n// details.\nfunc (proc *Handle) OpenPid(pid int, path string, flags int) (*os.File, error) {\n\tfile, closer, err := proc.open(ProcPid(pid), path, flags)\n\tif closer != nil {\n\t\t// should not happen\n\t\tpanic(\"non-zero closer returned from procOpen(ProcPidOpen)\")\n\t}\n\treturn file, err\n}\n\n// OpenThreadSelf safely opens a given path from inside /proc/thread-self/.\n//\n// Most Go processes have heterogeneous threads (all threads have most of the\n// same kernel state such as CLONE_FS) and so [Handle.OpenSelf] is\n// preferable for most users.\n//\n// For non-heterogeneous threads, or users that actually want thread-specific\n// information (such as /proc/thread-self/stack or /proc/thread-self/status),\n// this method is necessary.\n//\n// Because Go can change the running OS thread of your goroutine without notice\n// (and then subsequently kill the old thread), this method will lock the\n// current goroutine to the OS thread (with [runtime.LockOSThread]) and the\n// caller is responsible for unlocking the the OS thread with the\n// [ThreadCloser] callback once they are done using the returned file. This\n// callback MUST be called AFTER you have finished using the returned\n// [os.File]. This callback is completely separate to [os.File.Close], so it\n// must be called regardless of how you close the handle.\nfunc (proc *Handle) OpenThreadSelf(path string, flags int) (*os.File, ThreadCloser, error) {\n\treturn proc.open(ProcThreadSelf, path, flags)\n}\n\n// Readlink safely reads the contents of a symlink from the given procfs base.\n//\n// This is effectively equivalent to doing an Open*(O_PATH|O_NOFOLLOW) of the\n// path and then doing unix.Readlinkat(fd, \"\"), but with the benefit that\n// thread locking is not necessary for [ProcThreadSelf].\nfunc (proc *Handle) Readlink(base ProcBase, path string) (string, error) {\n\treturn libpathrs.ProcReadlinkat(proc.fd(), base.inner, path)\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/root_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\npackage pathrs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"cyphar.com/go-pathrs/internal/fdutils\"\n\t\"cyphar.com/go-pathrs/internal/libpathrs\"\n)\n\n// Root is a handle to the root of a directory tree to resolve within. The only\n// purpose of this \"root handle\" is to perform operations within the directory\n// tree, or to get a [Handle] to inodes within the directory tree.\n//\n// At time of writing, it is considered a *VERY BAD IDEA* to open a [Root]\n// inside a possibly-attacker-controlled directory tree. While we do have\n// protections that should defend against it, it's far more dangerous than just\n// opening a directory tree which is not inside a potentially-untrusted\n// directory.\ntype Root struct {\n\tinner *os.File\n}\n\n// OpenRoot creates a new [Root] handle to the directory at the given path.\nfunc OpenRoot(path string) (*Root, error) {\n\tfd, err := libpathrs.OpenRoot(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfile, err := fdutils.MkFile(fd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Root{inner: file}, nil\n}\n\n// RootFromFile creates a new [Root] handle from an [os.File] referencing a\n// directory. The provided file will be duplicated, so the original file should\n// still be closed by the caller.\n//\n// This is effectively the inverse operation of [Root.IntoFile].\nfunc RootFromFile(file *os.File) (*Root, error) {\n\tnewFile, err := fdutils.DupFile(file)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"duplicate root fd: %w\", err)\n\t}\n\treturn &Root{inner: newFile}, nil\n}\n\n// Resolve resolves the given path within the [Root]'s directory tree, and\n// returns a [Handle] to the resolved path. The path must already exist,\n// otherwise an error will occur.\n//\n// All symlinks (including trailing symlinks) are followed, but they are\n// resolved within the rootfs. If you wish to open a handle to the symlink\n// itself, use [ResolveNoFollow].\nfunc (r *Root) Resolve(path string) (*Handle, error) {\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (*Handle, error) {\n\t\thandleFd, err := libpathrs.InRootResolve(rootFd, path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thandleFile, err := fdutils.MkFile(handleFd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &Handle{inner: handleFile}, nil\n\t})\n}\n\n// ResolveNoFollow is effectively an O_NOFOLLOW version of [Resolve]. Their\n// behaviour is identical, except that *trailing* symlinks will not be\n// followed. If the final component is a trailing symlink, an O_PATH|O_NOFOLLOW\n// handle to the symlink itself is returned.\nfunc (r *Root) ResolveNoFollow(path string) (*Handle, error) {\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (*Handle, error) {\n\t\thandleFd, err := libpathrs.InRootResolveNoFollow(rootFd, path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thandleFile, err := fdutils.MkFile(handleFd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &Handle{inner: handleFile}, nil\n\t})\n}\n\n// Open is effectively shorthand for [Resolve] followed by [Handle.Open], but\n// can be slightly more efficient (it reduces CGo overhead and the number of\n// syscalls used when using the openat2-based resolver) and is arguably more\n// ergonomic to use.\n//\n// This is effectively equivalent to [os.Open].\nfunc (r *Root) Open(path string) (*os.File, error) {\n\treturn r.OpenFile(path, os.O_RDONLY)\n}\n\n// OpenFile is effectively shorthand for [Resolve] followed by\n// [Handle.OpenFile], but can be slightly more efficient (it reduces CGo\n// overhead and the number of syscalls used when using the openat2-based\n// resolver) and is arguably more ergonomic to use.\n//\n// However, if flags contains os.O_NOFOLLOW and the path is a symlink, then\n// OpenFile's behaviour will match that of openat2. In most cases an error will\n// be returned, but if os.O_PATH is provided along with os.O_NOFOLLOW then a\n// file equivalent to [ResolveNoFollow] will be returned instead.\n//\n// This is effectively equivalent to [os.OpenFile], except that os.O_CREAT is\n// not supported.\nfunc (r *Root) OpenFile(path string, flags int) (*os.File, error) {\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (*os.File, error) {\n\t\tfd, err := libpathrs.InRootOpen(rootFd, path, flags)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn fdutils.MkFile(fd)\n\t})\n}\n\n// Create creates a file within the [Root]'s directory tree at the given path,\n// and returns a handle to the file. The provided mode is used for the new file\n// (the process's umask applies).\n//\n// Unlike [os.Create], if the file already exists an error is created rather\n// than the file being opened and truncated.\nfunc (r *Root) Create(path string, flags int, mode os.FileMode) (*os.File, error) {\n\tunixMode, err := toUnixMode(mode, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (*os.File, error) {\n\t\thandleFd, err := libpathrs.InRootCreat(rootFd, path, flags, unixMode)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn fdutils.MkFile(handleFd)\n\t})\n}\n\n// Rename two paths within a [Root]'s directory tree. The flags argument is\n// identical to the RENAME_* flags to the renameat2(2) system call.\nfunc (r *Root) Rename(src, dst string, flags uint) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootRename(rootFd, src, dst, flags)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// RemoveDir removes the named empty directory within a [Root]'s directory\n// tree.\nfunc (r *Root) RemoveDir(path string) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootRmdir(rootFd, path)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// RemoveFile removes the named file within a [Root]'s directory tree.\nfunc (r *Root) RemoveFile(path string) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootUnlink(rootFd, path)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// Remove removes the named file or (empty) directory within a [Root]'s\n// directory tree.\n//\n// This is effectively equivalent to [os.Remove].\nfunc (r *Root) Remove(path string) error {\n\t// In order to match os.Remove's implementation we need to also do both\n\t// syscalls unconditionally and adjust the error based on whether\n\t// pathrs_inroot_rmdir() returned ENOTDIR.\n\tunlinkErr := r.RemoveFile(path)\n\tif unlinkErr == nil {\n\t\treturn nil\n\t}\n\trmdirErr := r.RemoveDir(path)\n\tif rmdirErr == nil {\n\t\treturn nil\n\t}\n\t// Both failed, adjust the error in the same way that os.Remove does.\n\terr := rmdirErr\n\tif errors.Is(err, syscall.ENOTDIR) {\n\t\terr = unlinkErr\n\t}\n\treturn err\n}\n\n// RemoveAll recursively deletes a path and all of its children.\n//\n// This is effectively equivalent to [os.RemoveAll].\nfunc (r *Root) RemoveAll(path string) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootRemoveAll(rootFd, path)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// Mkdir creates a directory within a [Root]'s directory tree. The provided\n// mode is used for the new directory (the process's umask applies).\n//\n// This is effectively equivalent to [os.Mkdir].\nfunc (r *Root) Mkdir(path string, mode os.FileMode) error {\n\tunixMode, err := toUnixMode(mode, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootMkdir(rootFd, path, unixMode)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// MkdirAll creates a directory (and any parent path components if they don't\n// exist) within a [Root]'s directory tree. The provided mode is used for any\n// directories created by this function (the process's umask applies).\n//\n// This is effectively equivalent to [os.MkdirAll].\nfunc (r *Root) MkdirAll(path string, mode os.FileMode) (*Handle, error) {\n\tunixMode, err := toUnixMode(mode, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (*Handle, error) {\n\t\thandleFd, err := libpathrs.InRootMkdirAll(rootFd, path, unixMode)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thandleFile, err := fdutils.MkFile(handleFd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &Handle{inner: handleFile}, err\n\t})\n}\n\n// Mknod creates a new device inode of the given type within a [Root]'s\n// directory tree. The provided mode is used for the new directory (the\n// process's umask applies).\n//\n// This is effectively equivalent to [golang.org/x/sys/unix.Mknod].\nfunc (r *Root) Mknod(path string, mode os.FileMode, dev uint64) error {\n\tunixMode, err := toUnixMode(mode, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootMknod(rootFd, path, unixMode, dev)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// Symlink creates a symlink within a [Root]'s directory tree. The symlink is\n// created at path and is a link to target.\n//\n// This is effectively equivalent to [os.Symlink].\nfunc (r *Root) Symlink(path, target string) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootSymlink(rootFd, path, target)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// Hardlink creates a hardlink within a [Root]'s directory tree. The hardlink\n// is created at path and is a link to target. Both paths are within the\n// [Root]'s directory tree (you cannot hardlink to a different [Root] or the\n// host).\n//\n// This is effectively equivalent to [os.Link].\nfunc (r *Root) Hardlink(path, target string) error {\n\t_, err := fdutils.WithFileFd(r.inner, func(rootFd uintptr) (struct{}, error) {\n\t\terr := libpathrs.InRootHardlink(rootFd, path, target)\n\t\treturn struct{}{}, err\n\t})\n\treturn err\n}\n\n// Readlink returns the target of a symlink with a [Root]'s directory tree.\n//\n// This is effectively equivalent to [os.Readlink].\nfunc (r *Root) Readlink(path string) (string, error) {\n\treturn fdutils.WithFileFd(r.inner, func(rootFd uintptr) (string, error) {\n\t\treturn libpathrs.InRootReadlink(rootFd, path)\n\t})\n}\n\n// IntoFile unwraps the [Root] into its underlying [os.File].\n//\n// It is critical that you do not operate on this file descriptor yourself,\n// because the security properties of libpathrs depend on users doing all\n// relevant filesystem operations through libpathrs.\n//\n// This operation returns the internal [os.File] of the [Root] directly, so\n// calling [Root.Close] will also close any copies of the returned [os.File].\n// If you want to get an independent copy, use [Root.Clone] followed by\n// [Root.IntoFile] on the cloned [Root].\nfunc (r *Root) IntoFile() *os.File {\n\t// TODO: Figure out if we really don't want to make a copy.\n\t// TODO: We almost certainly want to clear r.inner here, but we can't do\n\t//       that easily atomically (we could use atomic.Value but that'll make\n\t//       things quite a bit uglier).\n\treturn r.inner\n}\n\n// Clone creates a copy of a [Root] handle, such that it has a separate\n// lifetime to the original (while referring to the same underlying directory).\nfunc (r *Root) Clone() (*Root, error) {\n\treturn RootFromFile(r.inner)\n}\n\n// Close frees all of the resources used by the [Root] handle.\nfunc (r *Root) Close() error {\n\treturn r.inner.Close()\n}\n"
  },
  {
    "path": "vendor/cyphar.com/go-pathrs/utils_linux.go",
    "content": "//go:build linux\n\n// SPDX-License-Identifier: MPL-2.0\n/*\n * libpathrs: safe path resolution on Linux\n * Copyright (C) 2019-2025 SUSE LLC\n * Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com>\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n\npackage pathrs\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n//nolint:cyclop // this function needs to handle a lot of cases\nfunc toUnixMode(mode os.FileMode, needsType bool) (uint32, error) {\n\tsysMode := uint32(mode.Perm())\n\tswitch mode & os.ModeType { //nolint:exhaustive // we only care about ModeType bits\n\tcase 0:\n\t\tif needsType {\n\t\t\tsysMode |= unix.S_IFREG\n\t\t}\n\tcase os.ModeDir:\n\t\tsysMode |= unix.S_IFDIR\n\tcase os.ModeSymlink:\n\t\tsysMode |= unix.S_IFLNK\n\tcase os.ModeCharDevice | os.ModeDevice:\n\t\tsysMode |= unix.S_IFCHR\n\tcase os.ModeDevice:\n\t\tsysMode |= unix.S_IFBLK\n\tcase os.ModeNamedPipe:\n\t\tsysMode |= unix.S_IFIFO\n\tcase os.ModeSocket:\n\t\tsysMode |= unix.S_IFSOCK\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"invalid mode filetype %+o\", mode)\n\t}\n\tif mode&os.ModeSetuid != 0 {\n\t\tsysMode |= unix.S_ISUID\n\t}\n\tif mode&os.ModeSetgid != 0 {\n\t\tsysMode |= unix.S_ISGID\n\t}\n\tif mode&os.ModeSticky != 0 {\n\t\tsysMode |= unix.S_ISVTX\n\t}\n\treturn sysMode, nil\n}\n"
  },
  {
    "path": "vendor/dario.cat/mergo/.deepsource.toml",
    "content": "version = 1\n\ntest_patterns = [\n  \"*_test.go\"\n]\n\n[[analyzers]]\nname = \"go\"\nenabled = true\n\n  [analyzers.meta]\n  import_path = \"dario.cat/mergo\""
  },
  {
    "path": "vendor/dario.cat/mergo/.gitignore",
    "content": "#### joe made this: http://goel.io/joe\n\n#### go ####\n# Binaries for programs and plugins\n*.exe\n*.dll\n*.so\n*.dylib\n\n# Test binary, build with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n\n# Golang/Intellij\n.idea\n\n# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736\n.glide/\n\n#### vim ####\n# Swap\n[._]*.s[a-v][a-z]\n[._]*.sw[a-p]\n[._]s[a-v][a-z]\n[._]sw[a-p]\n\n# Session\nSession.vim\n\n# Temporary\n.netrwhist\n*~\n# Auto-generated tag files\ntags\n"
  },
  {
    "path": "vendor/dario.cat/mergo/.travis.yml",
    "content": "language: go\narch:\n    - amd64\n    - ppc64le\ninstall:\n  - go get -t\n  - go get golang.org/x/tools/cmd/cover\n  - go get github.com/mattn/goveralls\nscript:\n  - go test -race -v ./...\nafter_script:\n  - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN\n"
  },
  {
    "path": "vendor/dario.cat/mergo/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": "vendor/dario.cat/mergo/CONTRIBUTING.md",
    "content": "<!-- omit in toc -->\n# Contributing to mergo\n\nFirst off, thanks for taking the time to contribute! ❤️\n\nAll types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉\n\n> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:\n> - Star the project\n> - Tweet about it\n> - Refer this project in your project's readme\n> - Mention the project at local meetups and tell your friends/colleagues\n\n<!-- omit in toc -->\n## Table of Contents\n\n- [Code of Conduct](#code-of-conduct)\n- [I Have a Question](#i-have-a-question)\n- [I Want To Contribute](#i-want-to-contribute)\n- [Reporting Bugs](#reporting-bugs)\n- [Suggesting Enhancements](#suggesting-enhancements)\n\n## Code of Conduct\n\nThis project and everyone participating in it is governed by the\n[mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code. Please report unacceptable behavior\nto <>.\n\n\n## I Have a Question\n\n> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo).\n\nBefore you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.\n\nIf you then still feel the need to ask a question and need clarification, we recommend the following:\n\n- Open an [Issue](https://github.com/imdario/mergo/issues/new).\n- Provide as much context as you can about what you're running into.\n- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.\n\nWe will then take care of the issue as soon as possible.\n\n## I Want To Contribute\n\n> ### Legal Notice <!-- omit in toc -->\n> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.\n\n### Reporting Bugs\n\n<!-- omit in toc -->\n#### Before Submitting a Bug Report\n\nA good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.\n\n- Make sure that you are using the latest version.\n- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)).\n- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug).\n- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.\n- Collect information about the bug:\n- Stack trace (Traceback)\n- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)\n- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.\n- Possibly your input and the output\n- Can you reliably reproduce the issue? And can you also reproduce it with older versions?\n\n<!-- omit in toc -->\n#### How Do I Submit a Good Bug Report?\n\n> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .\n<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->\n\nWe use GitHub issues to track bugs and errors. If you run into an issue with the project:\n\n- Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)\n- Explain the behavior you would expect and the actual behavior.\n- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.\n- Provide the information you collected in the previous section.\n\nOnce it's filed:\n\n- The project team will label the issue accordingly.\n- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.\n- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone.\n\n### Suggesting Enhancements\n\nThis section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.\n\n<!-- omit in toc -->\n#### Before Submitting an Enhancement\n\n- Make sure that you are using the latest version.\n- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration.\n- Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.\n- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.\n\n<!-- omit in toc -->\n#### How Do I Submit a Good Enhancement Suggestion?\n\nEnhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues).\n\n- Use a **clear and descriptive title** for the issue to identify the suggestion.\n- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.\n- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.\n- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->\n- **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration.\n\n<!-- omit in toc -->\n## Attribution\nThis guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!\n"
  },
  {
    "path": "vendor/dario.cat/mergo/FUNDING.json",
    "content": "{\n  \"drips\": {\n    \"ethereum\": {\n      \"ownedBy\": \"0x6160020e7102237aC41bdb156e94401692D76930\"\n    }\n  }\n}\n"
  },
  {
    "path": "vendor/dario.cat/mergo/LICENSE",
    "content": "Copyright (c) 2013 Dario Castañé. All rights reserved.\nCopyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/dario.cat/mergo/README.md",
    "content": "# Mergo\n\n[![GitHub release][5]][6]\n[![GoCard][7]][8]\n[![Test status][1]][2]\n[![OpenSSF Scorecard][21]][22]\n[![OpenSSF Best Practices][19]][20]\n[![Coverage status][9]][10]\n[![Sourcegraph][11]][12]\n[![FOSSA status][13]][14]\n\n[![GoDoc][3]][4]\n[![Become my sponsor][15]][16]\n[![Tidelift][17]][18]\n\n[1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master\n[2]: https://github.com/imdario/mergo/actions/workflows/tests.yml\n[3]: https://godoc.org/github.com/imdario/mergo?status.svg\n[4]: https://godoc.org/github.com/imdario/mergo\n[5]: https://img.shields.io/github/release/imdario/mergo.svg\n[6]: https://github.com/imdario/mergo/releases\n[7]: https://goreportcard.com/badge/imdario/mergo\n[8]: https://goreportcard.com/report/github.com/imdario/mergo\n[9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master\n[10]: https://coveralls.io/github/imdario/mergo?branch=master\n[11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg\n[12]: https://sourcegraph.com/github.com/imdario/mergo?badge\n[13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield\n[14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield\n[15]: https://img.shields.io/github/sponsors/imdario\n[16]: https://github.com/sponsors/imdario\n[17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo\n[18]: https://tidelift.com/subscription/pkg/go-github.com-imdario-mergo\n[19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge\n[20]: https://bestpractices.coreinfrastructure.org/projects/7177\n[21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge\n[22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo\n\nA helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.\n\nMergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).\n\nAlso a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche.\n\n## Status\n\nMergo is stable and frozen, ready for production. Check a short list of the projects using at large scale it [here](https://github.com/imdario/mergo#mergo-in-the-wild).\n\nNo new features are accepted. They will be considered for a future v2 that improves the implementation and fixes bugs for corner cases.\n\n### Important notes\n\n#### 1.0.0\n\nIn [1.0.0](//github.com/imdario/mergo/releases/tag/1.0.0) Mergo moves to a vanity URL `dario.cat/mergo`. No more v1 versions will be released.\n\nIf the vanity URL is causing issues in your project due to a dependency pulling Mergo - it isn't a direct dependency in your project - it is recommended to use [replace](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) to pin the version to the last one with the old import URL:\n\n```\nreplace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16\n```\n\n#### 0.3.9\n\nPlease keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules.\n\nKeep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code.\n\nIf you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u dario.cat/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).\n\n### Donations\n\nIf Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes:\n\n<a href=\"https://liberapay.com/dario/donate\"><img alt=\"Donate using Liberapay\" src=\"https://liberapay.com/assets/widgets/donate.svg\"></a>\n<a href='https://github.com/sponsors/imdario' target='_blank'><img alt=\"Become my sponsor\" src=\"https://img.shields.io/github/sponsors/imdario?style=for-the-badge\" /></a>\n\n### Mergo in the wild\n\nMergo is used by [thousands](https://deps.dev/go/dario.cat%2Fmergo/v1.0.0/dependents) [of](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.16/dependents) [projects](https://deps.dev/go/github.com%2Fimdario%2Fmergo/v0.3.12), including:\n\n* [containerd/containerd](https://github.com/containerd/containerd)\n* [datadog/datadog-agent](https://github.com/datadog/datadog-agent)\n* [docker/cli/](https://github.com/docker/cli/)\n* [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)\n* [go-micro/go-micro](https://github.com/go-micro/go-micro)\n* [grafana/loki](https://github.com/grafana/loki)\n* [masterminds/sprig](github.com/Masterminds/sprig)\n* [moby/moby](https://github.com/moby/moby)\n* [slackhq/nebula](https://github.com/slackhq/nebula)\n* [volcano-sh/volcano](https://github.com/volcano-sh/volcano)\n\n## Install\n\n    go get dario.cat/mergo\n\n    // use in your .go code\n    import (\n        \"dario.cat/mergo\"\n    )\n\n## Usage\n\nYou can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).\n\n```go\nif err := mergo.Merge(&dst, src); err != nil {\n    // ...\n}\n```\n\nAlso, you can merge overwriting values using the transformer `WithOverride`.\n\n```go\nif err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {\n    // ...\n}\n```\n\nIf you need to override pointers, so the source pointer's value is assigned to the destination's pointer, you must use `WithoutDereference`:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"dario.cat/mergo\"\n)\n\ntype Foo struct {\n\tA *string\n\tB int64\n}\n\nfunc main() {\n\tfirst := \"first\"\n\tsecond := \"second\"\n\tsrc := Foo{\n\t\tA: &first,\n\t\tB: 2,\n\t}\n\n\tdest := Foo{\n\t\tA: &second,\n\t\tB: 1,\n\t}\n\n\tmergo.Merge(&dest, src, mergo.WithOverride, mergo.WithoutDereference)\n}\n```\n\nAdditionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field.\n\n```go\nif err := mergo.Map(&dst, srcMap); err != nil {\n    // ...\n}\n```\n\nWarning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values.\n\nHere is a nice example:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"dario.cat/mergo\"\n)\n\ntype Foo struct {\n\tA string\n\tB int64\n}\n\nfunc main() {\n\tsrc := Foo{\n\t\tA: \"one\",\n\t\tB: 2,\n\t}\n\tdest := Foo{\n\t\tA: \"two\",\n\t}\n\tmergo.Merge(&dest, src)\n\tfmt.Println(dest)\n\t// Will print\n\t// {two 2}\n}\n```\n\n### Transformers\n\nTransformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`?\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"dario.cat/mergo\"\n    \"reflect\"\n    \"time\"\n)\n\ntype timeTransformer struct {\n}\n\nfunc (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {\n\tif typ == reflect.TypeOf(time.Time{}) {\n\t\treturn func(dst, src reflect.Value) error {\n\t\t\tif dst.CanSet() {\n\t\t\t\tisZero := dst.MethodByName(\"IsZero\")\n\t\t\t\tresult := isZero.Call([]reflect.Value{})\n\t\t\t\tif result[0].Bool() {\n\t\t\t\t\tdst.Set(src)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn nil\n}\n\ntype Snapshot struct {\n\tTime time.Time\n\t// ...\n}\n\nfunc main() {\n\tsrc := Snapshot{time.Now()}\n\tdest := Snapshot{}\n\tmergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{}))\n\tfmt.Println(dest)\n\t// Will print\n\t// { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }\n}\n```\n\n## Contact me\n\nIf I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario)\n\n## About\n\nWritten by [Dario Castañé](http://dario.im).\n\n## License\n\n[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE).\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large)\n"
  },
  {
    "path": "vendor/dario.cat/mergo/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 1.x.x   | :white_check_mark: |\n| < 1.0   | :x:                |\n\n## Security contact information\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n"
  },
  {
    "path": "vendor/dario.cat/mergo/doc.go",
    "content": "// Copyright 2013 Dario Castañé. All rights reserved.\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nA helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.\n\nMergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).\n\n# Status\n\nIt is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc.\n\n# Important notes\n\n1.0.0\n\nIn 1.0.0 Mergo moves to a vanity URL `dario.cat/mergo`.\n\n0.3.9\n\nPlease keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules.\n\nKeep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code.\n\nIf you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u dario.cat/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).\n\n# Install\n\nDo your usual installation procedure:\n\n\tgo get dario.cat/mergo\n\n\t// use in your .go code\n\timport (\n\t    \"dario.cat/mergo\"\n\t)\n\n# Usage\n\nYou can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).\n\n\tif err := mergo.Merge(&dst, src); err != nil {\n\t\t// ...\n\t}\n\nAlso, you can merge overwriting values using the transformer WithOverride.\n\n\tif err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {\n\t\t// ...\n\t}\n\nAdditionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field.\n\n\tif err := mergo.Map(&dst, srcMap); err != nil {\n\t\t// ...\n\t}\n\nWarning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values.\n\nHere is a nice example:\n\n\tpackage main\n\n\timport (\n\t\t\"fmt\"\n\t\t\"dario.cat/mergo\"\n\t)\n\n\ttype Foo struct {\n\t\tA string\n\t\tB int64\n\t}\n\n\tfunc main() {\n\t\tsrc := Foo{\n\t\t\tA: \"one\",\n\t\t\tB: 2,\n\t\t}\n\t\tdest := Foo{\n\t\t\tA: \"two\",\n\t\t}\n\t\tmergo.Merge(&dest, src)\n\t\tfmt.Println(dest)\n\t\t// Will print\n\t\t// {two 2}\n\t}\n\n# Transformers\n\nTransformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time?\n\n\tpackage main\n\n\timport (\n\t\t\"fmt\"\n\t\t\"dario.cat/mergo\"\n\t\t\"reflect\"\n\t\t\"time\"\n\t)\n\n\ttype timeTransformer struct {\n\t}\n\n\tfunc (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {\n\t\tif typ == reflect.TypeOf(time.Time{}) {\n\t\t\treturn func(dst, src reflect.Value) error {\n\t\t\t\tif dst.CanSet() {\n\t\t\t\t\tisZero := dst.MethodByName(\"IsZero\")\n\t\t\t\t\tresult := isZero.Call([]reflect.Value{})\n\t\t\t\t\tif result[0].Bool() {\n\t\t\t\t\t\tdst.Set(src)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\ttype Snapshot struct {\n\t\tTime time.Time\n\t\t// ...\n\t}\n\n\tfunc main() {\n\t\tsrc := Snapshot{time.Now()}\n\t\tdest := Snapshot{}\n\t\tmergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{}))\n\t\tfmt.Println(dest)\n\t\t// Will print\n\t\t// { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }\n\t}\n\n# Contact me\n\nIf I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario\n\n# About\n\nWritten by Dario Castañé: https://da.rio.hn\n\n# License\n\nBSD 3-Clause license, as Go language.\n*/\npackage mergo\n"
  },
  {
    "path": "vendor/dario.cat/mergo/map.go",
    "content": "// Copyright 2014 Dario Castañé. All rights reserved.\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Based on src/pkg/reflect/deepequal.go from official\n// golang's stdlib.\n\npackage mergo\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\nfunc changeInitialCase(s string, mapper func(rune) rune) string {\n\tif s == \"\" {\n\t\treturn s\n\t}\n\tr, n := utf8.DecodeRuneInString(s)\n\treturn string(mapper(r)) + s[n:]\n}\n\nfunc isExported(field reflect.StructField) bool {\n\tr, _ := utf8.DecodeRuneInString(field.Name)\n\treturn r >= 'A' && r <= 'Z'\n}\n\n// Traverses recursively both values, assigning src's fields values to dst.\n// The map argument tracks comparisons that have already been seen, which allows\n// short circuiting on recursive types.\nfunc deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) {\n\toverwrite := config.Overwrite\n\tif dst.CanAddr() {\n\t\taddr := dst.UnsafeAddr()\n\t\th := 17 * addr\n\t\tseen := visited[h]\n\t\ttyp := dst.Type()\n\t\tfor p := seen; p != nil; p = p.next {\n\t\t\tif p.ptr == addr && p.typ == typ {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\t// Remember, remember...\n\t\tvisited[h] = &visit{typ, seen, addr}\n\t}\n\tzeroValue := reflect.Value{}\n\tswitch dst.Kind() {\n\tcase reflect.Map:\n\t\tdstMap := dst.Interface().(map[string]interface{})\n\t\tfor i, n := 0, src.NumField(); i < n; i++ {\n\t\t\tsrcType := src.Type()\n\t\t\tfield := srcType.Field(i)\n\t\t\tif !isExported(field) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfieldName := field.Name\n\t\t\tfieldName = changeInitialCase(fieldName, unicode.ToLower)\n\t\t\tif _, ok := dstMap[fieldName]; !ok || (!isEmptyValue(reflect.ValueOf(src.Field(i).Interface()), !config.ShouldNotDereference) && overwrite) || config.overwriteWithEmptyValue {\n\t\t\t\tdstMap[fieldName] = src.Field(i).Interface()\n\t\t\t}\n\t\t}\n\tcase reflect.Ptr:\n\t\tif dst.IsNil() {\n\t\t\tv := reflect.New(dst.Type().Elem())\n\t\t\tdst.Set(v)\n\t\t}\n\t\tdst = dst.Elem()\n\t\tfallthrough\n\tcase reflect.Struct:\n\t\tsrcMap := src.Interface().(map[string]interface{})\n\t\tfor key := range srcMap {\n\t\t\tconfig.overwriteWithEmptyValue = true\n\t\t\tsrcValue := srcMap[key]\n\t\t\tfieldName := changeInitialCase(key, unicode.ToUpper)\n\t\t\tdstElement := dst.FieldByName(fieldName)\n\t\t\tif dstElement == zeroValue {\n\t\t\t\t// We discard it because the field doesn't exist.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tsrcElement := reflect.ValueOf(srcValue)\n\t\t\tdstKind := dstElement.Kind()\n\t\t\tsrcKind := srcElement.Kind()\n\t\t\tif srcKind == reflect.Ptr && dstKind != reflect.Ptr {\n\t\t\t\tsrcElement = srcElement.Elem()\n\t\t\t\tsrcKind = reflect.TypeOf(srcElement.Interface()).Kind()\n\t\t\t} else if dstKind == reflect.Ptr {\n\t\t\t\t// Can this work? I guess it can't.\n\t\t\t\tif srcKind != reflect.Ptr && srcElement.CanAddr() {\n\t\t\t\t\tsrcPtr := srcElement.Addr()\n\t\t\t\t\tsrcElement = reflect.ValueOf(srcPtr)\n\t\t\t\t\tsrcKind = reflect.Ptr\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif !srcElement.IsValid() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif srcKind == dstKind {\n\t\t\t\tif err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t} else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface {\n\t\t\t\tif err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t} else if srcKind == reflect.Map {\n\t\t\t\tif err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"type mismatch on %s field: found %v, expected %v\", fieldName, srcKind, dstKind)\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// Map sets fields' values in dst from src.\n// src can be a map with string keys or a struct. dst must be the opposite:\n// if src is a map, dst must be a valid pointer to struct. If src is a struct,\n// dst must be map[string]interface{}.\n// It won't merge unexported (private) fields and will do recursively\n// any exported field.\n// If dst is a map, keys will be src fields' names in lower camel case.\n// Missing key in src that doesn't match a field in dst will be skipped. This\n// doesn't apply if dst is a map.\n// This is separated method from Merge because it is cleaner and it keeps sane\n// semantics: merging equal types, mapping different (restricted) types.\nfunc Map(dst, src interface{}, opts ...func(*Config)) error {\n\treturn _map(dst, src, opts...)\n}\n\n// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by\n// non-empty src attribute values.\n// Deprecated: Use Map(…) with WithOverride\nfunc MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {\n\treturn _map(dst, src, append(opts, WithOverride)...)\n}\n\nfunc _map(dst, src interface{}, opts ...func(*Config)) error {\n\tif dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {\n\t\treturn ErrNonPointerArgument\n\t}\n\tvar (\n\t\tvDst, vSrc reflect.Value\n\t\terr        error\n\t)\n\tconfig := &Config{}\n\n\tfor _, opt := range opts {\n\t\topt(config)\n\t}\n\n\tif vDst, vSrc, err = resolveValues(dst, src); err != nil {\n\t\treturn err\n\t}\n\t// To be friction-less, we redirect equal-type arguments\n\t// to deepMerge. Only because arguments can be anything.\n\tif vSrc.Kind() == vDst.Kind() {\n\t\treturn deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)\n\t}\n\tswitch vSrc.Kind() {\n\tcase reflect.Struct:\n\t\tif vDst.Kind() != reflect.Map {\n\t\t\treturn ErrExpectedMapAsDestination\n\t\t}\n\tcase reflect.Map:\n\t\tif vDst.Kind() != reflect.Struct {\n\t\t\treturn ErrExpectedStructAsDestination\n\t\t}\n\tdefault:\n\t\treturn ErrNotSupported\n\t}\n\treturn deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config)\n}\n"
  },
  {
    "path": "vendor/dario.cat/mergo/merge.go",
    "content": "// Copyright 2013 Dario Castañé. All rights reserved.\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Based on src/pkg/reflect/deepequal.go from official\n// golang's stdlib.\n\npackage mergo\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n)\n\nfunc hasMergeableFields(dst reflect.Value) (exported bool) {\n\tfor i, n := 0, dst.NumField(); i < n; i++ {\n\t\tfield := dst.Type().Field(i)\n\t\tif field.Anonymous && dst.Field(i).Kind() == reflect.Struct {\n\t\t\texported = exported || hasMergeableFields(dst.Field(i))\n\t\t} else if isExportedComponent(&field) {\n\t\t\texported = exported || len(field.PkgPath) == 0\n\t\t}\n\t}\n\treturn\n}\n\nfunc isExportedComponent(field *reflect.StructField) bool {\n\tpkgPath := field.PkgPath\n\tif len(pkgPath) > 0 {\n\t\treturn false\n\t}\n\tc := field.Name[0]\n\tif 'a' <= c && c <= 'z' || c == '_' {\n\t\treturn false\n\t}\n\treturn true\n}\n\ntype Config struct {\n\tTransformers                 Transformers\n\tOverwrite                    bool\n\tShouldNotDereference         bool\n\tAppendSlice                  bool\n\tTypeCheck                    bool\n\toverwriteWithEmptyValue      bool\n\toverwriteSliceWithEmptyValue bool\n\tsliceDeepCopy                bool\n\tdebug                        bool\n}\n\ntype Transformers interface {\n\tTransformer(reflect.Type) func(dst, src reflect.Value) error\n}\n\n// Traverses recursively both values, assigning src's fields values to dst.\n// The map argument tracks comparisons that have already been seen, which allows\n// short circuiting on recursive types.\nfunc deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) {\n\toverwrite := config.Overwrite\n\ttypeCheck := config.TypeCheck\n\toverwriteWithEmptySrc := config.overwriteWithEmptyValue\n\toverwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue\n\tsliceDeepCopy := config.sliceDeepCopy\n\n\tif !src.IsValid() {\n\t\treturn\n\t}\n\tif dst.CanAddr() {\n\t\taddr := dst.UnsafeAddr()\n\t\th := 17 * addr\n\t\tseen := visited[h]\n\t\ttyp := dst.Type()\n\t\tfor p := seen; p != nil; p = p.next {\n\t\t\tif p.ptr == addr && p.typ == typ {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\t// Remember, remember...\n\t\tvisited[h] = &visit{typ, seen, addr}\n\t}\n\n\tif config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() {\n\t\tif fn := config.Transformers.Transformer(dst.Type()); fn != nil {\n\t\t\terr = fn(dst, src)\n\t\t\treturn\n\t\t}\n\t}\n\n\tswitch dst.Kind() {\n\tcase reflect.Struct:\n\t\tif hasMergeableFields(dst) {\n\t\t\tfor i, n := 0, dst.NumField(); i < n; i++ {\n\t\t\t\tif err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) {\n\t\t\t\tdst.Set(src)\n\t\t\t}\n\t\t}\n\tcase reflect.Map:\n\t\tif dst.IsNil() && !src.IsNil() {\n\t\t\tif dst.CanSet() {\n\t\t\t\tdst.Set(reflect.MakeMap(dst.Type()))\n\t\t\t} else {\n\t\t\t\tdst = src\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tif src.Kind() != reflect.Map {\n\t\t\tif overwrite && dst.CanSet() {\n\t\t\t\tdst.Set(src)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tfor _, key := range src.MapKeys() {\n\t\t\tsrcElement := src.MapIndex(key)\n\t\t\tif !srcElement.IsValid() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdstElement := dst.MapIndex(key)\n\t\t\tswitch srcElement.Kind() {\n\t\t\tcase reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice:\n\t\t\t\tif srcElement.IsNil() {\n\t\t\t\t\tif overwrite {\n\t\t\t\t\t\tdst.SetMapIndex(key, srcElement)\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfallthrough\n\t\t\tdefault:\n\t\t\t\tif !srcElement.CanInterface() {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch reflect.TypeOf(srcElement.Interface()).Kind() {\n\t\t\t\tcase reflect.Struct:\n\t\t\t\t\tfallthrough\n\t\t\t\tcase reflect.Ptr:\n\t\t\t\t\tfallthrough\n\t\t\t\tcase reflect.Map:\n\t\t\t\t\tsrcMapElm := srcElement\n\t\t\t\t\tdstMapElm := dstElement\n\t\t\t\t\tif srcMapElm.CanInterface() {\n\t\t\t\t\t\tsrcMapElm = reflect.ValueOf(srcMapElm.Interface())\n\t\t\t\t\t\tif dstMapElm.IsValid() {\n\t\t\t\t\t\t\tdstMapElm = reflect.ValueOf(dstMapElm.Interface())\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\tcase reflect.Slice:\n\t\t\t\t\tsrcSlice := reflect.ValueOf(srcElement.Interface())\n\n\t\t\t\t\tvar dstSlice reflect.Value\n\t\t\t\t\tif !dstElement.IsValid() || dstElement.IsNil() {\n\t\t\t\t\t\tdstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len())\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdstSlice = reflect.ValueOf(dstElement.Interface())\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {\n\t\t\t\t\t\tif typeCheck && srcSlice.Type() != dstSlice.Type() {\n\t\t\t\t\t\t\treturn fmt.Errorf(\"cannot override two slices with different type (%s, %s)\", srcSlice.Type(), dstSlice.Type())\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdstSlice = srcSlice\n\t\t\t\t\t} else if config.AppendSlice {\n\t\t\t\t\t\tif srcSlice.Type() != dstSlice.Type() {\n\t\t\t\t\t\t\treturn fmt.Errorf(\"cannot append two slices with different type (%s, %s)\", srcSlice.Type(), dstSlice.Type())\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdstSlice = reflect.AppendSlice(dstSlice, srcSlice)\n\t\t\t\t\t} else if sliceDeepCopy {\n\t\t\t\t\t\ti := 0\n\t\t\t\t\t\tfor ; i < srcSlice.Len() && i < dstSlice.Len(); i++ {\n\t\t\t\t\t\t\tsrcElement := srcSlice.Index(i)\n\t\t\t\t\t\t\tdstElement := dstSlice.Index(i)\n\n\t\t\t\t\t\t\tif srcElement.CanInterface() {\n\t\t\t\t\t\t\t\tsrcElement = reflect.ValueOf(srcElement.Interface())\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif dstElement.CanInterface() {\n\t\t\t\t\t\t\t\tdstElement = reflect.ValueOf(dstElement.Interface())\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tdst.SetMapIndex(key, dstSlice)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) {\n\t\t\t\tif reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) {\n\t\t\t\tif dst.IsNil() {\n\t\t\t\t\tdst.Set(reflect.MakeMap(dst.Type()))\n\t\t\t\t}\n\t\t\t\tdst.SetMapIndex(key, srcElement)\n\t\t\t}\n\t\t}\n\n\t\t// Ensure that all keys in dst are deleted if they are not in src.\n\t\tif overwriteWithEmptySrc {\n\t\t\tfor _, key := range dst.MapKeys() {\n\t\t\t\tsrcElement := src.MapIndex(key)\n\t\t\t\tif !srcElement.IsValid() {\n\t\t\t\t\tdst.SetMapIndex(key, reflect.Value{})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tcase reflect.Slice:\n\t\tif !dst.CanSet() {\n\t\t\tbreak\n\t\t}\n\t\tif (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {\n\t\t\tdst.Set(src)\n\t\t} else if config.AppendSlice {\n\t\t\tif src.Type() != dst.Type() {\n\t\t\t\treturn fmt.Errorf(\"cannot append two slice with different type (%s, %s)\", src.Type(), dst.Type())\n\t\t\t}\n\t\t\tdst.Set(reflect.AppendSlice(dst, src))\n\t\t} else if sliceDeepCopy {\n\t\t\tfor i := 0; i < src.Len() && i < dst.Len(); i++ {\n\t\t\t\tsrcElement := src.Index(i)\n\t\t\t\tdstElement := dst.Index(i)\n\t\t\t\tif srcElement.CanInterface() {\n\t\t\t\t\tsrcElement = reflect.ValueOf(srcElement.Interface())\n\t\t\t\t}\n\t\t\t\tif dstElement.CanInterface() {\n\t\t\t\t\tdstElement = reflect.ValueOf(dstElement.Interface())\n\t\t\t\t}\n\n\t\t\t\tif err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tcase reflect.Ptr:\n\t\tfallthrough\n\tcase reflect.Interface:\n\t\tif isReflectNil(src) {\n\t\t\tif overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) {\n\t\t\t\tdst.Set(src)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t\tif src.Kind() != reflect.Interface {\n\t\t\tif dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) {\n\t\t\t\tif dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {\n\t\t\t\t\tdst.Set(src)\n\t\t\t\t}\n\t\t\t} else if src.Kind() == reflect.Ptr {\n\t\t\t\tif !config.ShouldNotDereference {\n\t\t\t\t\tif err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t} else if src.Elem().Kind() != reflect.Struct {\n\t\t\t\t\tif overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() {\n\t\t\t\t\t\tdst.Set(src)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if dst.Elem().Type() == src.Type() {\n\t\t\t\tif err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn ErrDifferentArgumentsTypes\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t\tif dst.IsNil() || overwrite {\n\t\t\tif dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {\n\t\t\t\tdst.Set(src)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t\tif dst.Elem().Kind() == src.Elem().Kind() {\n\t\t\tif err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\tdefault:\n\t\tmustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc)\n\t\tif mustSet {\n\t\t\tif dst.CanSet() {\n\t\t\t\tdst.Set(src)\n\t\t\t} else {\n\t\t\t\tdst = src\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n\n// Merge will fill any empty for value type attributes on the dst struct using corresponding\n// src attributes if they themselves are not empty. dst and src must be valid same-type structs\n// and dst must be a pointer to struct.\n// It won't merge unexported (private) fields and will do recursively any exported field.\nfunc Merge(dst, src interface{}, opts ...func(*Config)) error {\n\treturn merge(dst, src, opts...)\n}\n\n// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by\n// non-empty src attribute values.\n// Deprecated: use Merge(…) with WithOverride\nfunc MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {\n\treturn merge(dst, src, append(opts, WithOverride)...)\n}\n\n// WithTransformers adds transformers to merge, allowing to customize the merging of some types.\nfunc WithTransformers(transformers Transformers) func(*Config) {\n\treturn func(config *Config) {\n\t\tconfig.Transformers = transformers\n\t}\n}\n\n// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values.\nfunc WithOverride(config *Config) {\n\tconfig.Overwrite = true\n}\n\n// WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values.\nfunc WithOverwriteWithEmptyValue(config *Config) {\n\tconfig.Overwrite = true\n\tconfig.overwriteWithEmptyValue = true\n}\n\n// WithOverrideEmptySlice will make merge override empty dst slice with empty src slice.\nfunc WithOverrideEmptySlice(config *Config) {\n\tconfig.overwriteSliceWithEmptyValue = true\n}\n\n// WithoutDereference prevents dereferencing pointers when evaluating whether they are empty\n// (i.e. a non-nil pointer is never considered empty).\nfunc WithoutDereference(config *Config) {\n\tconfig.ShouldNotDereference = true\n}\n\n// WithAppendSlice will make merge append slices instead of overwriting it.\nfunc WithAppendSlice(config *Config) {\n\tconfig.AppendSlice = true\n}\n\n// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride).\nfunc WithTypeCheck(config *Config) {\n\tconfig.TypeCheck = true\n}\n\n// WithSliceDeepCopy will merge slice element one by one with Overwrite flag.\nfunc WithSliceDeepCopy(config *Config) {\n\tconfig.sliceDeepCopy = true\n\tconfig.Overwrite = true\n}\n\nfunc merge(dst, src interface{}, opts ...func(*Config)) error {\n\tif dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {\n\t\treturn ErrNonPointerArgument\n\t}\n\tvar (\n\t\tvDst, vSrc reflect.Value\n\t\terr        error\n\t)\n\n\tconfig := &Config{}\n\n\tfor _, opt := range opts {\n\t\topt(config)\n\t}\n\n\tif vDst, vSrc, err = resolveValues(dst, src); err != nil {\n\t\treturn err\n\t}\n\tif vDst.Type() != vSrc.Type() {\n\t\treturn ErrDifferentArgumentsTypes\n\t}\n\treturn deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)\n}\n\n// IsReflectNil is the reflect value provided nil\nfunc isReflectNil(v reflect.Value) bool {\n\tk := v.Kind()\n\tswitch k {\n\tcase reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr:\n\t\t// Both interface and slice are nil if first word is 0.\n\t\t// Both are always bigger than a word; assume flagIndir.\n\t\treturn v.IsNil()\n\tdefault:\n\t\treturn false\n\t}\n}\n"
  },
  {
    "path": "vendor/dario.cat/mergo/mergo.go",
    "content": "// Copyright 2013 Dario Castañé. All rights reserved.\n// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Based on src/pkg/reflect/deepequal.go from official\n// golang's stdlib.\n\npackage mergo\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n)\n\n// Errors reported by Mergo when it finds invalid arguments.\nvar (\n\tErrNilArguments                = errors.New(\"src and dst must not be nil\")\n\tErrDifferentArgumentsTypes     = errors.New(\"src and dst must be of same type\")\n\tErrNotSupported                = errors.New(\"only structs, maps, and slices are supported\")\n\tErrExpectedMapAsDestination    = errors.New(\"dst was expected to be a map\")\n\tErrExpectedStructAsDestination = errors.New(\"dst was expected to be a struct\")\n\tErrNonPointerArgument          = errors.New(\"dst must be a pointer\")\n)\n\n// During deepMerge, must keep track of checks that are\n// in progress.  The comparison algorithm assumes that all\n// checks in progress are true when it reencounters them.\n// Visited are stored in a map indexed by 17 * a1 + a2;\ntype visit struct {\n\ttyp  reflect.Type\n\tnext *visit\n\tptr  uintptr\n}\n\n// From src/pkg/encoding/json/encode.go.\nfunc isEmptyValue(v reflect.Value, shouldDereference bool) bool {\n\tswitch v.Kind() {\n\tcase reflect.Array, reflect.Map, reflect.Slice, reflect.String:\n\t\treturn v.Len() == 0\n\tcase reflect.Bool:\n\t\treturn !v.Bool()\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn v.Int() == 0\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn v.Uint() == 0\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn v.Float() == 0\n\tcase reflect.Interface, reflect.Ptr:\n\t\tif v.IsNil() {\n\t\t\treturn true\n\t\t}\n\t\tif shouldDereference {\n\t\t\treturn isEmptyValue(v.Elem(), shouldDereference)\n\t\t}\n\t\treturn false\n\tcase reflect.Func:\n\t\treturn v.IsNil()\n\tcase reflect.Invalid:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) {\n\tif dst == nil || src == nil {\n\t\terr = ErrNilArguments\n\t\treturn\n\t}\n\tvDst = reflect.ValueOf(dst).Elem()\n\tif vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice {\n\t\terr = ErrNotSupported\n\t\treturn\n\t}\n\tvSrc = reflect.ValueOf(src)\n\t// We check if vSrc is a pointer to dereference it.\n\tif vSrc.Kind() == reflect.Ptr {\n\t\tvSrc = vSrc.Elem()\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/.gitignore",
    "content": "/toml.test\n/toml-test\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/COPYING",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2013 TOML authors\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\nall copies 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\nTHE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/README.md",
    "content": "TOML stands for Tom's Obvious, Minimal Language. This Go package provides a\nreflection interface similar to Go's standard library `json` and `xml` packages.\n\nCompatible with TOML version [v1.1.0](https://toml.io/en/v1.1.0).\n\nDocumentation: https://pkg.go.dev/github.com/BurntSushi/toml\n\nSee the [releases page](https://github.com/BurntSushi/toml/releases) for a\nchangelog; this information is also in the git tag annotations (e.g. `git show\nv0.4.0`).\n\nThis library requires Go 1.18 or newer; add it to your go.mod with:\n\n    % go get github.com/BurntSushi/toml@latest\n\nIt also comes with a TOML validator CLI tool:\n\n    % go install github.com/BurntSushi/toml/cmd/tomlv@latest\n    % tomlv some-toml-file.toml\n\n### Examples\nFor the simplest example, consider some TOML file as just a list of keys and\nvalues:\n\n```toml\nAge = 25\nCats = [ \"Cauchy\", \"Plato\" ]\nPi = 3.14\nPerfection = [ 6, 28, 496, 8128 ]\nDOB = 1987-07-05T05:45:00Z\n```\n\nWhich can be decoded with:\n\n```go\ntype Config struct {\n\tAge        int\n\tCats       []string\n\tPi         float64\n\tPerfection []int\n\tDOB        time.Time\n}\n\nvar conf Config\n_, err := toml.Decode(tomlData, &conf)\n```\n\nYou can also use struct tags if your struct field name doesn't map to a TOML key\nvalue directly:\n\n```toml\nsome_key_NAME = \"wat\"\n```\n\n```go\ntype TOML struct {\n    ObscureKey string `toml:\"some_key_NAME\"`\n}\n```\n\nBeware that like other decoders **only exported fields** are considered when\nencoding and decoding; private fields are silently ignored.\n\n### Using the `Marshaler` and `encoding.TextUnmarshaler` interfaces\nHere's an example that automatically parses values in a `mail.Address`:\n\n```toml\ncontacts = [\n    \"Donald Duck <donald@duckburg.com>\",\n    \"Scrooge McDuck <scrooge@duckburg.com>\",\n]\n```\n\nCan be decoded with:\n\n```go\n// Create address type which satisfies the encoding.TextUnmarshaler interface.\ntype address struct {\n\t*mail.Address\n}\n\nfunc (a *address) UnmarshalText(text []byte) error {\n\tvar err error\n\ta.Address, err = mail.ParseAddress(string(text))\n\treturn err\n}\n\n// Decode it.\nfunc decode() {\n\tblob := `\n\t\tcontacts = [\n\t\t\t\"Donald Duck <donald@duckburg.com>\",\n\t\t\t\"Scrooge McDuck <scrooge@duckburg.com>\",\n\t\t]\n\t`\n\n\tvar contacts struct {\n\t\tContacts []address\n\t}\n\n\t_, err := toml.Decode(blob, &contacts)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfor _, c := range contacts.Contacts {\n\t\tfmt.Printf(\"%#v\\n\", c.Address)\n\t}\n\n\t// Output:\n\t// &mail.Address{Name:\"Donald Duck\", Address:\"donald@duckburg.com\"}\n\t// &mail.Address{Name:\"Scrooge McDuck\", Address:\"scrooge@duckburg.com\"}\n}\n```\n\nTo target TOML specifically you can implement `UnmarshalTOML` TOML interface in\na similar way.\n\n### More complex usage\nSee the [`_example/`](/_example) directory for a more complex example.\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/decode.go",
    "content": "package toml\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"math\"\n\t\"os\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Unmarshaler is the interface implemented by objects that can unmarshal a\n// TOML description of themselves.\ntype Unmarshaler interface {\n\tUnmarshalTOML(any) error\n}\n\n// Unmarshal decodes the contents of data in TOML format into a pointer v.\n//\n// See [Decoder] for a description of the decoding process.\nfunc Unmarshal(data []byte, v any) error {\n\t_, err := NewDecoder(bytes.NewReader(data)).Decode(v)\n\treturn err\n}\n\n// Decode the TOML data in to the pointer v.\n//\n// See [Decoder] for a description of the decoding process.\nfunc Decode(data string, v any) (MetaData, error) {\n\treturn NewDecoder(strings.NewReader(data)).Decode(v)\n}\n\n// DecodeFile reads the contents of a file and decodes it with [Decode].\nfunc DecodeFile(path string, v any) (MetaData, error) {\n\tfp, err := os.Open(path)\n\tif err != nil {\n\t\treturn MetaData{}, err\n\t}\n\tdefer fp.Close()\n\treturn NewDecoder(fp).Decode(v)\n}\n\n// DecodeFS reads the contents of a file from [fs.FS] and decodes it with\n// [Decode].\nfunc DecodeFS(fsys fs.FS, path string, v any) (MetaData, error) {\n\tfp, err := fsys.Open(path)\n\tif err != nil {\n\t\treturn MetaData{}, err\n\t}\n\tdefer fp.Close()\n\treturn NewDecoder(fp).Decode(v)\n}\n\n// Primitive is a TOML value that hasn't been decoded into a Go value.\n//\n// This type can be used for any value, which will cause decoding to be delayed.\n// You can use [PrimitiveDecode] to \"manually\" decode these values.\n//\n// NOTE: The underlying representation of a `Primitive` value is subject to\n// change. Do not rely on it.\n//\n// NOTE: Primitive values are still parsed, so using them will only avoid the\n// overhead of reflection. They can be useful when you don't know the exact type\n// of TOML data until runtime.\ntype Primitive struct {\n\tundecoded any\n\tcontext   Key\n}\n\n// The significand precision for float32 and float64 is 24 and 53 bits; this is\n// the range a natural number can be stored in a float without loss of data.\nconst (\n\tmaxSafeFloat32Int = 16777215                // 2^24-1\n\tmaxSafeFloat64Int = int64(9007199254740991) // 2^53-1\n)\n\n// Decoder decodes TOML data.\n//\n// TOML tables correspond to Go structs or maps; they can be used\n// interchangeably, but structs offer better type safety.\n//\n// TOML table arrays correspond to either a slice of structs or a slice of maps.\n//\n// TOML datetimes correspond to [time.Time]. Local datetimes are parsed in the\n// local timezone.\n//\n// [time.Duration] types are treated as nanoseconds if the TOML value is an\n// integer, or they're parsed with time.ParseDuration() if they're strings.\n//\n// All other TOML types (float, string, int, bool and array) correspond to the\n// obvious Go types.\n//\n// An exception to the above rules is if a type implements the TextUnmarshaler\n// interface, in which case any primitive TOML value (floats, strings, integers,\n// booleans, datetimes) will be converted to a []byte and given to the value's\n// UnmarshalText method. See the Unmarshaler example for a demonstration with\n// email addresses.\n//\n// # Key mapping\n//\n// TOML keys can map to either keys in a Go map or field names in a Go struct.\n// The special `toml` struct tag can be used to map TOML keys to struct fields\n// that don't match the key name exactly (see the example). A case insensitive\n// match to struct names will be tried if an exact match can't be found.\n//\n// The mapping between TOML values and Go values is loose. That is, there may\n// exist TOML values that cannot be placed into your representation, and there\n// may be parts of your representation that do not correspond to TOML values.\n// This loose mapping can be made stricter by using the IsDefined and/or\n// Undecoded methods on the MetaData returned.\n//\n// This decoder does not handle cyclic types. Decode will not terminate if a\n// cyclic type is passed.\ntype Decoder struct {\n\tr io.Reader\n}\n\n// NewDecoder creates a new Decoder.\nfunc NewDecoder(r io.Reader) *Decoder {\n\treturn &Decoder{r: r}\n}\n\nvar (\n\tunmarshalToml = reflect.TypeOf((*Unmarshaler)(nil)).Elem()\n\tunmarshalText = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()\n\tprimitiveType = reflect.TypeOf((*Primitive)(nil)).Elem()\n)\n\n// Decode TOML data in to the pointer `v`.\nfunc (dec *Decoder) Decode(v any) (MetaData, error) {\n\trv := reflect.ValueOf(v)\n\tif rv.Kind() != reflect.Ptr {\n\t\ts := \"%q\"\n\t\tif reflect.TypeOf(v) == nil {\n\t\t\ts = \"%v\"\n\t\t}\n\n\t\treturn MetaData{}, fmt.Errorf(\"toml: cannot decode to non-pointer \"+s, reflect.TypeOf(v))\n\t}\n\tif rv.IsNil() {\n\t\treturn MetaData{}, fmt.Errorf(\"toml: cannot decode to nil value of %q\", reflect.TypeOf(v))\n\t}\n\n\t// Check if this is a supported type: struct, map, any, or something that\n\t// implements UnmarshalTOML or UnmarshalText.\n\trv = indirect(rv)\n\trt := rv.Type()\n\tif rv.Kind() != reflect.Struct && rv.Kind() != reflect.Map &&\n\t\t!(rv.Kind() == reflect.Interface && rv.NumMethod() == 0) &&\n\t\t!rt.Implements(unmarshalToml) && !rt.Implements(unmarshalText) {\n\t\treturn MetaData{}, fmt.Errorf(\"toml: cannot decode to type %s\", rt)\n\t}\n\n\t// TODO: parser should read from io.Reader? Or at the very least, make it\n\t// read from []byte rather than string\n\tdata, err := io.ReadAll(dec.r)\n\tif err != nil {\n\t\treturn MetaData{}, err\n\t}\n\n\tp, err := parse(string(data))\n\tif err != nil {\n\t\treturn MetaData{}, err\n\t}\n\n\tmd := MetaData{\n\t\tmapping: p.mapping,\n\t\tkeyInfo: p.keyInfo,\n\t\tkeys:    p.ordered,\n\t\tdecoded: make(map[string]struct{}, len(p.ordered)),\n\t\tcontext: nil,\n\t\tdata:    data,\n\t}\n\treturn md, md.unify(p.mapping, rv)\n}\n\n// PrimitiveDecode is just like the other Decode* functions, except it decodes a\n// TOML value that has already been parsed. Valid primitive values can *only* be\n// obtained from values filled by the decoder functions, including this method.\n// (i.e., v may contain more [Primitive] values.)\n//\n// Meta data for primitive values is included in the meta data returned by the\n// Decode* functions with one exception: keys returned by the Undecoded method\n// will only reflect keys that were decoded. Namely, any keys hidden behind a\n// Primitive will be considered undecoded. Executing this method will update the\n// undecoded keys in the meta data. (See the example.)\nfunc (md *MetaData) PrimitiveDecode(primValue Primitive, v any) error {\n\tmd.context = primValue.context\n\tdefer func() { md.context = nil }()\n\treturn md.unify(primValue.undecoded, rvalue(v))\n}\n\n// markDecodedRecursive is a helper to mark any key under the given tmap as\n// decoded, recursing as needed\nfunc markDecodedRecursive(md *MetaData, tmap map[string]any) {\n\tfor key := range tmap {\n\t\tmd.decoded[md.context.add(key).String()] = struct{}{}\n\t\tif tmap, ok := tmap[key].(map[string]any); ok {\n\t\t\tmd.context = append(md.context, key)\n\t\t\tmarkDecodedRecursive(md, tmap)\n\t\t\tmd.context = md.context[0 : len(md.context)-1]\n\t\t}\n\t\tif tarr, ok := tmap[key].([]map[string]any); ok {\n\t\t\tfor _, elm := range tarr {\n\t\t\t\tmd.context = append(md.context, key)\n\t\t\t\tmarkDecodedRecursive(md, elm)\n\t\t\t\tmd.context = md.context[0 : len(md.context)-1]\n\t\t\t}\n\t\t}\n\t}\n}\n\n// unify performs a sort of type unification based on the structure of `rv`,\n// which is the client representation.\n//\n// Any type mismatch produces an error. Finding a type that we don't know\n// how to handle produces an unsupported type error.\nfunc (md *MetaData) unify(data any, rv reflect.Value) error {\n\t// Special case. Look for a `Primitive` value.\n\t// TODO: #76 would make this superfluous after implemented.\n\tif rv.Type() == primitiveType {\n\t\t// Save the undecoded data and the key context into the primitive\n\t\t// value.\n\t\tcontext := make(Key, len(md.context))\n\t\tcopy(context, md.context)\n\t\trv.Set(reflect.ValueOf(Primitive{\n\t\t\tundecoded: data,\n\t\t\tcontext:   context,\n\t\t}))\n\t\treturn nil\n\t}\n\n\trvi := rv.Interface()\n\tif v, ok := rvi.(Unmarshaler); ok {\n\t\terr := v.UnmarshalTOML(data)\n\t\tif err != nil {\n\t\t\treturn md.parseErr(err)\n\t\t}\n\t\t// Assume the Unmarshaler decoded everything, so mark all keys under\n\t\t// this table as decoded.\n\t\tif tmap, ok := data.(map[string]any); ok {\n\t\t\tmarkDecodedRecursive(md, tmap)\n\t\t}\n\t\tif aot, ok := data.([]map[string]any); ok {\n\t\t\tfor _, tmap := range aot {\n\t\t\t\tmarkDecodedRecursive(md, tmap)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\tif v, ok := rvi.(encoding.TextUnmarshaler); ok {\n\t\treturn md.unifyText(data, v)\n\t}\n\n\t// TODO:\n\t// The behavior here is incorrect whenever a Go type satisfies the\n\t// encoding.TextUnmarshaler interface but also corresponds to a TOML hash or\n\t// array. In particular, the unmarshaler should only be applied to primitive\n\t// TOML values. But at this point, it will be applied to all kinds of values\n\t// and produce an incorrect error whenever those values are hashes or arrays\n\t// (including arrays of tables).\n\n\tk := rv.Kind()\n\n\tif k >= reflect.Int && k <= reflect.Uint64 {\n\t\treturn md.unifyInt(data, rv)\n\t}\n\tswitch k {\n\tcase reflect.Struct:\n\t\treturn md.unifyStruct(data, rv)\n\tcase reflect.Map:\n\t\treturn md.unifyMap(data, rv)\n\tcase reflect.Array:\n\t\treturn md.unifyArray(data, rv)\n\tcase reflect.Slice:\n\t\treturn md.unifySlice(data, rv)\n\tcase reflect.String:\n\t\treturn md.unifyString(data, rv)\n\tcase reflect.Bool:\n\t\treturn md.unifyBool(data, rv)\n\tcase reflect.Interface:\n\t\tif rv.NumMethod() > 0 { /// Only empty interfaces are supported.\n\t\t\treturn md.e(\"unsupported type %s\", rv.Type())\n\t\t}\n\t\treturn md.unifyAnything(data, rv)\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn md.unifyFloat64(data, rv)\n\t}\n\treturn md.e(\"unsupported type %s\", rv.Kind())\n}\n\nfunc (md *MetaData) unifyStruct(mapping any, rv reflect.Value) error {\n\ttmap, ok := mapping.(map[string]any)\n\tif !ok {\n\t\tif mapping == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn md.e(\"type mismatch for %s: expected table but found %s\", rv.Type().String(), fmtType(mapping))\n\t}\n\n\tfor key, datum := range tmap {\n\t\tvar f *field\n\t\tfields := cachedTypeFields(rv.Type())\n\t\tfor i := range fields {\n\t\t\tff := &fields[i]\n\t\t\tif ff.name == key {\n\t\t\t\tf = ff\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif f == nil && strings.EqualFold(ff.name, key) {\n\t\t\t\tf = ff\n\t\t\t}\n\t\t}\n\t\tif f != nil {\n\t\t\tsubv := rv\n\t\t\tfor _, i := range f.index {\n\t\t\t\tsubv = indirect(subv.Field(i))\n\t\t\t}\n\n\t\t\tif isUnifiable(subv) {\n\t\t\t\tmd.decoded[md.context.add(key).String()] = struct{}{}\n\t\t\t\tmd.context = append(md.context, key)\n\n\t\t\t\terr := md.unify(datum, subv)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tmd.context = md.context[0 : len(md.context)-1]\n\t\t\t} else if f.name != \"\" {\n\t\t\t\treturn md.e(\"cannot write unexported field %s.%s\", rv.Type().String(), f.name)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (md *MetaData) unifyMap(mapping any, rv reflect.Value) error {\n\tkeyType := rv.Type().Key().Kind()\n\tif keyType != reflect.String && keyType != reflect.Interface {\n\t\treturn fmt.Errorf(\"toml: cannot decode to a map with non-string key type (%s in %q)\",\n\t\t\tkeyType, rv.Type())\n\t}\n\n\ttmap, ok := mapping.(map[string]any)\n\tif !ok {\n\t\tif tmap == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn md.badtype(\"map\", mapping)\n\t}\n\tif rv.IsNil() {\n\t\trv.Set(reflect.MakeMap(rv.Type()))\n\t}\n\tfor k, v := range tmap {\n\t\tmd.decoded[md.context.add(k).String()] = struct{}{}\n\t\tmd.context = append(md.context, k)\n\n\t\trvval := reflect.Indirect(reflect.New(rv.Type().Elem()))\n\n\t\terr := md.unify(v, indirect(rvval))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmd.context = md.context[0 : len(md.context)-1]\n\n\t\trvkey := indirect(reflect.New(rv.Type().Key()))\n\n\t\tswitch keyType {\n\t\tcase reflect.Interface:\n\t\t\trvkey.Set(reflect.ValueOf(k))\n\t\tcase reflect.String:\n\t\t\trvkey.SetString(k)\n\t\t}\n\n\t\trv.SetMapIndex(rvkey, rvval)\n\t}\n\treturn nil\n}\n\nfunc (md *MetaData) unifyArray(data any, rv reflect.Value) error {\n\tdatav := reflect.ValueOf(data)\n\tif datav.Kind() != reflect.Slice {\n\t\tif !datav.IsValid() {\n\t\t\treturn nil\n\t\t}\n\t\treturn md.badtype(\"slice\", data)\n\t}\n\tif l := datav.Len(); l != rv.Len() {\n\t\treturn md.e(\"expected array length %d; got TOML array of length %d\", rv.Len(), l)\n\t}\n\treturn md.unifySliceArray(datav, rv)\n}\n\nfunc (md *MetaData) unifySlice(data any, rv reflect.Value) error {\n\tdatav := reflect.ValueOf(data)\n\tif datav.Kind() != reflect.Slice {\n\t\tif !datav.IsValid() {\n\t\t\treturn nil\n\t\t}\n\t\treturn md.badtype(\"slice\", data)\n\t}\n\tn := datav.Len()\n\tif rv.IsNil() || rv.Cap() < n {\n\t\trv.Set(reflect.MakeSlice(rv.Type(), n, n))\n\t}\n\trv.SetLen(n)\n\treturn md.unifySliceArray(datav, rv)\n}\n\nfunc (md *MetaData) unifySliceArray(data, rv reflect.Value) error {\n\tl := data.Len()\n\tfor i := 0; i < l; i++ {\n\t\terr := md.unify(data.Index(i).Interface(), indirect(rv.Index(i)))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (md *MetaData) unifyString(data any, rv reflect.Value) error {\n\t_, ok := rv.Interface().(json.Number)\n\tif ok {\n\t\tif i, ok := data.(int64); ok {\n\t\t\trv.SetString(strconv.FormatInt(i, 10))\n\t\t} else if f, ok := data.(float64); ok {\n\t\t\trv.SetString(strconv.FormatFloat(f, 'g', -1, 64))\n\t\t} else {\n\t\t\treturn md.badtype(\"string\", data)\n\t\t}\n\t\treturn nil\n\t}\n\n\tif s, ok := data.(string); ok {\n\t\trv.SetString(s)\n\t\treturn nil\n\t}\n\treturn md.badtype(\"string\", data)\n}\n\nfunc (md *MetaData) unifyFloat64(data any, rv reflect.Value) error {\n\trvk := rv.Kind()\n\n\tif num, ok := data.(float64); ok {\n\t\tswitch rvk {\n\t\tcase reflect.Float32:\n\t\t\tif num < -math.MaxFloat32 || num > math.MaxFloat32 {\n\t\t\t\treturn md.parseErr(errParseRange{i: num, size: rvk.String()})\n\t\t\t}\n\t\t\tfallthrough\n\t\tcase reflect.Float64:\n\t\t\trv.SetFloat(num)\n\t\tdefault:\n\t\t\tpanic(\"bug\")\n\t\t}\n\t\treturn nil\n\t}\n\n\tif num, ok := data.(int64); ok {\n\t\tif (rvk == reflect.Float32 && (num < -maxSafeFloat32Int || num > maxSafeFloat32Int)) ||\n\t\t\t(rvk == reflect.Float64 && (num < -maxSafeFloat64Int || num > maxSafeFloat64Int)) {\n\t\t\treturn md.parseErr(errUnsafeFloat{i: num, size: rvk.String()})\n\t\t}\n\t\trv.SetFloat(float64(num))\n\t\treturn nil\n\t}\n\n\treturn md.badtype(\"float\", data)\n}\n\nfunc (md *MetaData) unifyInt(data any, rv reflect.Value) error {\n\t_, ok := rv.Interface().(time.Duration)\n\tif ok {\n\t\t// Parse as string duration, and fall back to regular integer parsing\n\t\t// (as nanosecond) if this is not a string.\n\t\tif s, ok := data.(string); ok {\n\t\t\tdur, err := time.ParseDuration(s)\n\t\t\tif err != nil {\n\t\t\t\treturn md.parseErr(errParseDuration{s})\n\t\t\t}\n\t\t\trv.SetInt(int64(dur))\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tnum, ok := data.(int64)\n\tif !ok {\n\t\treturn md.badtype(\"integer\", data)\n\t}\n\n\trvk := rv.Kind()\n\tswitch {\n\tcase rvk >= reflect.Int && rvk <= reflect.Int64:\n\t\tif (rvk == reflect.Int8 && (num < math.MinInt8 || num > math.MaxInt8)) ||\n\t\t\t(rvk == reflect.Int16 && (num < math.MinInt16 || num > math.MaxInt16)) ||\n\t\t\t(rvk == reflect.Int32 && (num < math.MinInt32 || num > math.MaxInt32)) {\n\t\t\treturn md.parseErr(errParseRange{i: num, size: rvk.String()})\n\t\t}\n\t\trv.SetInt(num)\n\tcase rvk >= reflect.Uint && rvk <= reflect.Uint64:\n\t\tunum := uint64(num)\n\t\tif rvk == reflect.Uint8 && (num < 0 || unum > math.MaxUint8) ||\n\t\t\trvk == reflect.Uint16 && (num < 0 || unum > math.MaxUint16) ||\n\t\t\trvk == reflect.Uint32 && (num < 0 || unum > math.MaxUint32) {\n\t\t\treturn md.parseErr(errParseRange{i: num, size: rvk.String()})\n\t\t}\n\t\trv.SetUint(unum)\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n\treturn nil\n}\n\nfunc (md *MetaData) unifyBool(data any, rv reflect.Value) error {\n\tif b, ok := data.(bool); ok {\n\t\trv.SetBool(b)\n\t\treturn nil\n\t}\n\treturn md.badtype(\"boolean\", data)\n}\n\nfunc (md *MetaData) unifyAnything(data any, rv reflect.Value) error {\n\trv.Set(reflect.ValueOf(data))\n\treturn nil\n}\n\nfunc (md *MetaData) unifyText(data any, v encoding.TextUnmarshaler) error {\n\tvar s string\n\tswitch sdata := data.(type) {\n\tcase Marshaler:\n\t\ttext, err := sdata.MarshalTOML()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts = string(text)\n\tcase encoding.TextMarshaler:\n\t\ttext, err := sdata.MarshalText()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts = string(text)\n\tcase fmt.Stringer:\n\t\ts = sdata.String()\n\tcase string:\n\t\ts = sdata\n\tcase bool:\n\t\ts = fmt.Sprintf(\"%v\", sdata)\n\tcase int64:\n\t\ts = fmt.Sprintf(\"%d\", sdata)\n\tcase float64:\n\t\ts = fmt.Sprintf(\"%f\", sdata)\n\tdefault:\n\t\treturn md.badtype(\"primitive (string-like)\", data)\n\t}\n\tif err := v.UnmarshalText([]byte(s)); err != nil {\n\t\treturn md.parseErr(err)\n\t}\n\treturn nil\n}\n\nfunc (md *MetaData) badtype(dst string, data any) error {\n\treturn md.e(\"incompatible types: TOML value has type %s; destination has type %s\", fmtType(data), dst)\n}\n\nfunc (md *MetaData) parseErr(err error) error {\n\tk := md.context.String()\n\td := string(md.data)\n\treturn ParseError{\n\t\tMessage:  err.Error(),\n\t\terr:      err,\n\t\tLastKey:  k,\n\t\tPosition: md.keyInfo[k].pos.withCol(d),\n\t\tLine:     md.keyInfo[k].pos.Line,\n\t\tinput:    d,\n\t}\n}\n\nfunc (md *MetaData) e(format string, args ...any) error {\n\tf := \"toml: \"\n\tif len(md.context) > 0 {\n\t\tf = fmt.Sprintf(\"toml: (last key %q): \", md.context)\n\t\tp := md.keyInfo[md.context.String()].pos\n\t\tif p.Line > 0 {\n\t\t\tf = fmt.Sprintf(\"toml: line %d (last key %q): \", p.Line, md.context)\n\t\t}\n\t}\n\treturn fmt.Errorf(f+format, args...)\n}\n\n// rvalue returns a reflect.Value of `v`. All pointers are resolved.\nfunc rvalue(v any) reflect.Value {\n\treturn indirect(reflect.ValueOf(v))\n}\n\n// indirect returns the value pointed to by a pointer.\n//\n// Pointers are followed until the value is not a pointer. New values are\n// allocated for each nil pointer.\n//\n// An exception to this rule is if the value satisfies an interface of interest\n// to us (like encoding.TextUnmarshaler).\nfunc indirect(v reflect.Value) reflect.Value {\n\tif v.Kind() != reflect.Ptr {\n\t\tif v.CanSet() {\n\t\t\tpv := v.Addr()\n\t\t\tpvi := pv.Interface()\n\t\t\tif _, ok := pvi.(encoding.TextUnmarshaler); ok {\n\t\t\t\treturn pv\n\t\t\t}\n\t\t\tif _, ok := pvi.(Unmarshaler); ok {\n\t\t\t\treturn pv\n\t\t\t}\n\t\t}\n\t\treturn v\n\t}\n\tif v.IsNil() {\n\t\tv.Set(reflect.New(v.Type().Elem()))\n\t}\n\treturn indirect(reflect.Indirect(v))\n}\n\nfunc isUnifiable(rv reflect.Value) bool {\n\tif rv.CanSet() {\n\t\treturn true\n\t}\n\trvi := rv.Interface()\n\tif _, ok := rvi.(encoding.TextUnmarshaler); ok {\n\t\treturn true\n\t}\n\tif _, ok := rvi.(Unmarshaler); ok {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// fmt %T with \"interface {}\" replaced with \"any\", which is far more readable.\nfunc fmtType(t any) string {\n\treturn strings.ReplaceAll(fmt.Sprintf(\"%T\", t), \"interface {}\", \"any\")\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/deprecated.go",
    "content": "package toml\n\nimport (\n\t\"encoding\"\n\t\"io\"\n)\n\n// TextMarshaler is an alias for encoding.TextMarshaler.\n//\n// Deprecated: use encoding.TextMarshaler\ntype TextMarshaler encoding.TextMarshaler\n\n// TextUnmarshaler is an alias for encoding.TextUnmarshaler.\n//\n// Deprecated: use encoding.TextUnmarshaler\ntype TextUnmarshaler encoding.TextUnmarshaler\n\n// DecodeReader is an alias for NewDecoder(r).Decode(v).\n//\n// Deprecated: use NewDecoder(reader).Decode(&value).\nfunc DecodeReader(r io.Reader, v any) (MetaData, error) { return NewDecoder(r).Decode(v) }\n\n// PrimitiveDecode is an alias for MetaData.PrimitiveDecode().\n//\n// Deprecated: use MetaData.PrimitiveDecode.\nfunc PrimitiveDecode(primValue Primitive, v any) error {\n\tmd := MetaData{decoded: make(map[string]struct{})}\n\treturn md.unify(primValue.undecoded, rvalue(v))\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/doc.go",
    "content": "// Package toml implements decoding and encoding of TOML files.\n//\n// This package supports TOML v1.0.0, as specified at https://toml.io\n//\n// The github.com/BurntSushi/toml/cmd/tomlv package implements a TOML validator,\n// and can be used to verify if TOML document is valid. It can also be used to\n// print the type of each key.\npackage toml\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/encode.go",
    "content": "package toml\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/BurntSushi/toml/internal\"\n)\n\ntype tomlEncodeError struct{ error }\n\nvar (\n\terrArrayNilElement = errors.New(\"toml: cannot encode array with nil element\")\n\terrNonString       = errors.New(\"toml: cannot encode a map with non-string key type\")\n\terrNoKey           = errors.New(\"toml: top-level values must be Go maps or structs\")\n\terrAnything        = errors.New(\"\") // used in testing\n)\n\nvar dblQuotedReplacer = strings.NewReplacer(\n\t\"\\\"\", \"\\\\\\\"\",\n\t\"\\\\\", \"\\\\\\\\\",\n\t\"\\x00\", `\\u0000`,\n\t\"\\x01\", `\\u0001`,\n\t\"\\x02\", `\\u0002`,\n\t\"\\x03\", `\\u0003`,\n\t\"\\x04\", `\\u0004`,\n\t\"\\x05\", `\\u0005`,\n\t\"\\x06\", `\\u0006`,\n\t\"\\x07\", `\\u0007`,\n\t\"\\b\", `\\b`,\n\t\"\\t\", `\\t`,\n\t\"\\n\", `\\n`,\n\t\"\\x0b\", `\\u000b`,\n\t\"\\f\", `\\f`,\n\t\"\\r\", `\\r`,\n\t\"\\x0e\", `\\u000e`,\n\t\"\\x0f\", `\\u000f`,\n\t\"\\x10\", `\\u0010`,\n\t\"\\x11\", `\\u0011`,\n\t\"\\x12\", `\\u0012`,\n\t\"\\x13\", `\\u0013`,\n\t\"\\x14\", `\\u0014`,\n\t\"\\x15\", `\\u0015`,\n\t\"\\x16\", `\\u0016`,\n\t\"\\x17\", `\\u0017`,\n\t\"\\x18\", `\\u0018`,\n\t\"\\x19\", `\\u0019`,\n\t\"\\x1a\", `\\u001a`,\n\t\"\\x1b\", `\\u001b`,\n\t\"\\x1c\", `\\u001c`,\n\t\"\\x1d\", `\\u001d`,\n\t\"\\x1e\", `\\u001e`,\n\t\"\\x1f\", `\\u001f`,\n\t\"\\x7f\", `\\u007f`,\n)\n\nvar (\n\tmarshalToml = reflect.TypeOf((*Marshaler)(nil)).Elem()\n\tmarshalText = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()\n\ttimeType    = reflect.TypeOf((*time.Time)(nil)).Elem()\n)\n\n// Marshaler is the interface implemented by types that can marshal themselves\n// into valid TOML.\ntype Marshaler interface {\n\tMarshalTOML() ([]byte, error)\n}\n\n// Marshal returns a TOML representation of the Go value.\n//\n// See [Encoder] for a description of the encoding process.\nfunc Marshal(v any) ([]byte, error) {\n\tbuff := new(bytes.Buffer)\n\tif err := NewEncoder(buff).Encode(v); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buff.Bytes(), nil\n}\n\n// Encoder encodes a Go to a TOML document.\n//\n// The mapping between Go values and TOML values should be precisely the same as\n// for [Decode].\n//\n// time.Time is encoded as a RFC 3339 string, and time.Duration as its string\n// representation.\n//\n// The [Marshaler] and [encoding.TextMarshaler] interfaces are supported to\n// encoding the value as custom TOML.\n//\n// If you want to write arbitrary binary data then you will need to use\n// something like base64 since TOML does not have any binary types.\n//\n// When encoding TOML hashes (Go maps or structs), keys without any sub-hashes\n// are encoded first.\n//\n// Go maps will be sorted alphabetically by key for deterministic output.\n//\n// The toml struct tag can be used to provide the key name; if omitted the\n// struct field name will be used. If the \"omitempty\" option is present the\n// following value will be skipped:\n//\n//   - arrays, slices, maps, and string with len of 0\n//   - struct with all zero values\n//   - bool false\n//\n// If omitzero is given all int and float types with a value of 0 will be\n// skipped.\n//\n// Encoding Go values without a corresponding TOML representation will return an\n// error. Examples of this includes maps with non-string keys, slices with nil\n// elements, embedded non-struct types, and nested slices containing maps or\n// structs. (e.g. [][]map[string]string is not allowed but []map[string]string\n// is okay, as is []map[string][]string).\n//\n// NOTE: only exported keys are encoded due to the use of reflection. Unexported\n// keys are silently discarded.\ntype Encoder struct {\n\tIndent     string // string for a single indentation level; default is two spaces.\n\thasWritten bool   // written any output to w yet?\n\tw          *bufio.Writer\n}\n\n// NewEncoder create a new Encoder.\nfunc NewEncoder(w io.Writer) *Encoder {\n\treturn &Encoder{w: bufio.NewWriter(w), Indent: \"  \"}\n}\n\n// Encode writes a TOML representation of the Go value to the [Encoder]'s writer.\n//\n// An error is returned if the value given cannot be encoded to a valid TOML\n// document.\nfunc (enc *Encoder) Encode(v any) error {\n\trv := eindirect(reflect.ValueOf(v))\n\terr := enc.safeEncode(Key([]string{}), rv)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn enc.w.Flush()\n}\n\nfunc (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tif terr, ok := r.(tomlEncodeError); ok {\n\t\t\t\terr = terr.error\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpanic(r)\n\t\t}\n\t}()\n\tenc.encode(key, rv)\n\treturn nil\n}\n\nfunc (enc *Encoder) encode(key Key, rv reflect.Value) {\n\t// If we can marshal the type to text, then we use that. This prevents the\n\t// encoder for handling these types as generic structs (or whatever the\n\t// underlying type of a TextMarshaler is).\n\tswitch {\n\tcase isMarshaler(rv):\n\t\tenc.writeKeyValue(key, rv, false)\n\t\treturn\n\tcase rv.Type() == primitiveType: // TODO: #76 would make this superfluous after implemented.\n\t\tenc.encode(key, reflect.ValueOf(rv.Interface().(Primitive).undecoded))\n\t\treturn\n\t}\n\n\tk := rv.Kind()\n\tswitch k {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,\n\t\treflect.Int64,\n\t\treflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,\n\t\treflect.Uint64,\n\t\treflect.Float32, reflect.Float64, reflect.String, reflect.Bool:\n\t\tenc.writeKeyValue(key, rv, false)\n\tcase reflect.Array, reflect.Slice:\n\t\tif typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) {\n\t\t\tenc.eArrayOfTables(key, rv)\n\t\t} else {\n\t\t\tenc.writeKeyValue(key, rv, false)\n\t\t}\n\tcase reflect.Interface:\n\t\tif rv.IsNil() {\n\t\t\treturn\n\t\t}\n\t\tenc.encode(key, rv.Elem())\n\tcase reflect.Map:\n\t\tif rv.IsNil() {\n\t\t\treturn\n\t\t}\n\t\tenc.eTable(key, rv)\n\tcase reflect.Ptr:\n\t\tif rv.IsNil() {\n\t\t\treturn\n\t\t}\n\t\tenc.encode(key, rv.Elem())\n\tcase reflect.Struct:\n\t\tenc.eTable(key, rv)\n\tdefault:\n\t\tencPanic(fmt.Errorf(\"unsupported type for key '%s': %s\", key, k))\n\t}\n}\n\n// eElement encodes any value that can be an array element.\nfunc (enc *Encoder) eElement(rv reflect.Value) {\n\tswitch v := rv.Interface().(type) {\n\tcase time.Time: // Using TextMarshaler adds extra quotes, which we don't want.\n\t\tformat := time.RFC3339Nano\n\t\tswitch v.Location() {\n\t\tcase internal.LocalDatetime:\n\t\t\tformat = \"2006-01-02T15:04:05.999999999\"\n\t\tcase internal.LocalDate:\n\t\t\tformat = \"2006-01-02\"\n\t\tcase internal.LocalTime:\n\t\t\tformat = \"15:04:05.999999999\"\n\t\t}\n\t\tswitch v.Location() {\n\t\tdefault:\n\t\t\tenc.write(v.Format(format))\n\t\tcase internal.LocalDatetime, internal.LocalDate, internal.LocalTime:\n\t\t\tenc.write(v.In(time.UTC).Format(format))\n\t\t}\n\t\treturn\n\tcase Marshaler:\n\t\ts, err := v.MarshalTOML()\n\t\tif err != nil {\n\t\t\tencPanic(err)\n\t\t}\n\t\tif s == nil {\n\t\t\tencPanic(errors.New(\"MarshalTOML returned nil and no error\"))\n\t\t}\n\t\tenc.w.Write(s)\n\t\treturn\n\tcase encoding.TextMarshaler:\n\t\ts, err := v.MarshalText()\n\t\tif err != nil {\n\t\t\tencPanic(err)\n\t\t}\n\t\tif s == nil {\n\t\t\tencPanic(errors.New(\"MarshalText returned nil and no error\"))\n\t\t}\n\t\tenc.writeQuoted(string(s))\n\t\treturn\n\tcase time.Duration:\n\t\tenc.writeQuoted(v.String())\n\t\treturn\n\tcase json.Number:\n\t\tn, _ := rv.Interface().(json.Number)\n\n\t\tif n == \"\" { /// Useful zero value.\n\t\t\tenc.w.WriteByte('0')\n\t\t\treturn\n\t\t} else if v, err := n.Int64(); err == nil {\n\t\t\tenc.eElement(reflect.ValueOf(v))\n\t\t\treturn\n\t\t} else if v, err := n.Float64(); err == nil {\n\t\t\tenc.eElement(reflect.ValueOf(v))\n\t\t\treturn\n\t\t}\n\t\tencPanic(fmt.Errorf(\"unable to convert %q to int64 or float64\", n))\n\t}\n\n\tswitch rv.Kind() {\n\tcase reflect.Ptr:\n\t\tenc.eElement(rv.Elem())\n\t\treturn\n\tcase reflect.String:\n\t\tenc.writeQuoted(rv.String())\n\tcase reflect.Bool:\n\t\tenc.write(strconv.FormatBool(rv.Bool()))\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tenc.write(strconv.FormatInt(rv.Int(), 10))\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\tenc.write(strconv.FormatUint(rv.Uint(), 10))\n\tcase reflect.Float32:\n\t\tf := rv.Float()\n\t\tif math.IsNaN(f) {\n\t\t\tif math.Signbit(f) {\n\t\t\t\tenc.write(\"-\")\n\t\t\t}\n\t\t\tenc.write(\"nan\")\n\t\t} else if math.IsInf(f, 0) {\n\t\t\tif math.Signbit(f) {\n\t\t\t\tenc.write(\"-\")\n\t\t\t}\n\t\t\tenc.write(\"inf\")\n\t\t} else {\n\t\t\tenc.write(floatAddDecimal(strconv.FormatFloat(f, 'g', -1, 32)))\n\t\t}\n\tcase reflect.Float64:\n\t\tf := rv.Float()\n\t\tif math.IsNaN(f) {\n\t\t\tif math.Signbit(f) {\n\t\t\t\tenc.write(\"-\")\n\t\t\t}\n\t\t\tenc.write(\"nan\")\n\t\t} else if math.IsInf(f, 0) {\n\t\t\tif math.Signbit(f) {\n\t\t\t\tenc.write(\"-\")\n\t\t\t}\n\t\t\tenc.write(\"inf\")\n\t\t} else {\n\t\t\tenc.write(floatAddDecimal(strconv.FormatFloat(f, 'g', -1, 64)))\n\t\t}\n\tcase reflect.Array, reflect.Slice:\n\t\tenc.eArrayOrSliceElement(rv)\n\tcase reflect.Struct:\n\t\tenc.eStruct(nil, rv, true)\n\tcase reflect.Map:\n\t\tenc.eMap(nil, rv, true)\n\tcase reflect.Interface:\n\t\tenc.eElement(rv.Elem())\n\tdefault:\n\t\tencPanic(fmt.Errorf(\"unexpected type: %s\", fmtType(rv.Interface())))\n\t}\n}\n\n// By the TOML spec, all floats must have a decimal with at least one number on\n// either side.\nfunc floatAddDecimal(fstr string) string {\n\tfor _, c := range fstr {\n\t\tif c == 'e' { // Exponent syntax\n\t\t\treturn fstr\n\t\t}\n\t\tif c == '.' {\n\t\t\treturn fstr\n\t\t}\n\t}\n\treturn fstr + \".0\"\n}\n\nfunc (enc *Encoder) writeQuoted(s string) {\n\tenc.write(`\"` + dblQuotedReplacer.Replace(s) + `\"`)\n}\n\nfunc (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) {\n\tlength := rv.Len()\n\tenc.write(\"[\")\n\tfor i := 0; i < length; i++ {\n\t\telem := eindirect(rv.Index(i))\n\t\tenc.eElement(elem)\n\t\tif i != length-1 {\n\t\t\tenc.write(\", \")\n\t\t}\n\t}\n\tenc.write(\"]\")\n}\n\nfunc (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) {\n\tif len(key) == 0 {\n\t\tencPanic(errNoKey)\n\t}\n\tfor i := 0; i < rv.Len(); i++ {\n\t\ttrv := eindirect(rv.Index(i))\n\t\tif isNil(trv) {\n\t\t\tcontinue\n\t\t}\n\t\tenc.newline()\n\t\tenc.writef(\"%s[[%s]]\", enc.indentStr(key), key)\n\t\tenc.newline()\n\t\tenc.eMapOrStruct(key, trv, false)\n\t}\n}\n\nfunc (enc *Encoder) eTable(key Key, rv reflect.Value) {\n\tif len(key) == 1 {\n\t\t// Output an extra newline between top-level tables.\n\t\t// (The newline isn't written if nothing else has been written though.)\n\t\tenc.newline()\n\t}\n\tif len(key) > 0 {\n\t\tenc.writef(\"%s[%s]\", enc.indentStr(key), key)\n\t\tenc.newline()\n\t}\n\tenc.eMapOrStruct(key, rv, false)\n}\n\nfunc (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value, inline bool) {\n\tswitch rv.Kind() {\n\tcase reflect.Map:\n\t\tenc.eMap(key, rv, inline)\n\tcase reflect.Struct:\n\t\tenc.eStruct(key, rv, inline)\n\tdefault:\n\t\t// Should never happen?\n\t\tpanic(\"eTable: unhandled reflect.Value Kind: \" + rv.Kind().String())\n\t}\n}\n\nfunc (enc *Encoder) eMap(key Key, rv reflect.Value, inline bool) {\n\trt := rv.Type()\n\tif rt.Key().Kind() != reflect.String {\n\t\tencPanic(errNonString)\n\t}\n\n\t// Sort keys so that we have deterministic output. And write keys directly\n\t// underneath this key first, before writing sub-structs or sub-maps.\n\tvar mapKeysDirect, mapKeysSub []reflect.Value\n\tfor _, mapKey := range rv.MapKeys() {\n\t\tif typeIsTable(tomlTypeOfGo(eindirect(rv.MapIndex(mapKey)))) {\n\t\t\tmapKeysSub = append(mapKeysSub, mapKey)\n\t\t} else {\n\t\t\tmapKeysDirect = append(mapKeysDirect, mapKey)\n\t\t}\n\t}\n\n\twriteMapKeys := func(mapKeys []reflect.Value, trailC bool) {\n\t\tsort.Slice(mapKeys, func(i, j int) bool { return mapKeys[i].String() < mapKeys[j].String() })\n\t\tfor i, mapKey := range mapKeys {\n\t\t\tval := eindirect(rv.MapIndex(mapKey))\n\t\t\tif isNil(val) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif inline {\n\t\t\t\tenc.writeKeyValue(Key{mapKey.String()}, val, true)\n\t\t\t\tif trailC || i != len(mapKeys)-1 {\n\t\t\t\t\tenc.write(\", \")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tenc.encode(key.add(mapKey.String()), val)\n\t\t\t}\n\t\t}\n\t}\n\n\tif inline {\n\t\tenc.write(\"{\")\n\t}\n\twriteMapKeys(mapKeysDirect, len(mapKeysSub) > 0)\n\twriteMapKeys(mapKeysSub, false)\n\tif inline {\n\t\tenc.write(\"}\")\n\t}\n}\n\nfunc pointerTo(t reflect.Type) reflect.Type {\n\tif t.Kind() == reflect.Ptr {\n\t\treturn pointerTo(t.Elem())\n\t}\n\treturn t\n}\n\nfunc (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) {\n\t// Write keys for fields directly under this key first, because if we write\n\t// a field that creates a new table then all keys under it will be in that\n\t// table (not the one we're writing here).\n\t//\n\t// Fields is a [][]int: for fieldsDirect this always has one entry (the\n\t// struct index). For fieldsSub it contains two entries: the parent field\n\t// index from tv, and the field indexes for the fields of the sub.\n\tvar (\n\t\trt                      = rv.Type()\n\t\tfieldsDirect, fieldsSub [][]int\n\t\taddFields               func(rt reflect.Type, rv reflect.Value, start []int)\n\t)\n\taddFields = func(rt reflect.Type, rv reflect.Value, start []int) {\n\t\tfor i := 0; i < rt.NumField(); i++ {\n\t\t\tf := rt.Field(i)\n\t\t\tisEmbed := f.Anonymous && pointerTo(f.Type).Kind() == reflect.Struct\n\t\t\tif f.PkgPath != \"\" && !isEmbed { /// Skip unexported fields.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\topts := getOptions(f.Tag)\n\t\t\tif opts.skip {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tfrv := eindirect(rv.Field(i))\n\n\t\t\t// Need to make a copy because ... ehm, I don't know why... I guess\n\t\t\t// allocating a new array can cause it to fail(?)\n\t\t\t//\n\t\t\t// Done for: https://github.com/BurntSushi/toml/issues/430\n\t\t\t// Previously only on 32bit for: https://github.com/BurntSushi/toml/issues/314\n\t\t\tcopyStart := make([]int, len(start))\n\t\t\tcopy(copyStart, start)\n\t\t\tstart = copyStart\n\n\t\t\t// Treat anonymous struct fields with tag names as though they are\n\t\t\t// not anonymous, like encoding/json does.\n\t\t\t//\n\t\t\t// Non-struct anonymous fields use the normal encoding logic.\n\t\t\tif isEmbed {\n\t\t\t\tif getOptions(f.Tag).name == \"\" && frv.Kind() == reflect.Struct {\n\t\t\t\t\taddFields(frv.Type(), frv, append(start, f.Index...))\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif typeIsTable(tomlTypeOfGo(frv)) {\n\t\t\t\tfieldsSub = append(fieldsSub, append(start, f.Index...))\n\t\t\t} else {\n\t\t\t\tfieldsDirect = append(fieldsDirect, append(start, f.Index...))\n\t\t\t}\n\t\t}\n\t}\n\taddFields(rt, rv, nil)\n\n\twriteFields := func(fields [][]int, totalFields int) {\n\t\tfor _, fieldIndex := range fields {\n\t\t\tfieldType := rt.FieldByIndex(fieldIndex)\n\t\t\tfieldVal := rv.FieldByIndex(fieldIndex)\n\n\t\t\topts := getOptions(fieldType.Tag)\n\t\t\tif opts.skip {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif opts.omitempty && isEmpty(fieldVal) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tfieldVal = eindirect(fieldVal)\n\n\t\t\tif isNil(fieldVal) { /// Don't write anything for nil fields.\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tkeyName := fieldType.Name\n\t\t\tif opts.name != \"\" {\n\t\t\t\tkeyName = opts.name\n\t\t\t}\n\n\t\t\tif opts.omitzero && isZero(fieldVal) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif inline {\n\t\t\t\tenc.writeKeyValue(Key{keyName}, fieldVal, true)\n\t\t\t\tif fieldIndex[0] != totalFields-1 {\n\t\t\t\t\tenc.write(\", \")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tenc.encode(key.add(keyName), fieldVal)\n\t\t\t}\n\t\t}\n\t}\n\n\tif inline {\n\t\tenc.write(\"{\")\n\t}\n\n\tl := len(fieldsDirect) + len(fieldsSub)\n\twriteFields(fieldsDirect, l)\n\twriteFields(fieldsSub, l)\n\tif inline {\n\t\tenc.write(\"}\")\n\t}\n}\n\n// tomlTypeOfGo returns the TOML type name of the Go value's type.\n//\n// It is used to determine whether the types of array elements are mixed (which\n// is forbidden). If the Go value is nil, then it is illegal for it to be an\n// array element, and valueIsNil is returned as true.\n//\n// The type may be `nil`, which means no concrete TOML type could be found.\nfunc tomlTypeOfGo(rv reflect.Value) tomlType {\n\tif isNil(rv) || !rv.IsValid() {\n\t\treturn nil\n\t}\n\n\tif rv.Kind() == reflect.Struct {\n\t\tif rv.Type() == timeType {\n\t\t\treturn tomlDatetime\n\t\t}\n\t\tif isMarshaler(rv) {\n\t\t\treturn tomlString\n\t\t}\n\t\treturn tomlHash\n\t}\n\n\tif isMarshaler(rv) {\n\t\treturn tomlString\n\t}\n\n\tswitch rv.Kind() {\n\tcase reflect.Bool:\n\t\treturn tomlBool\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,\n\t\treflect.Int64,\n\t\treflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,\n\t\treflect.Uint64:\n\t\treturn tomlInteger\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn tomlFloat\n\tcase reflect.Array, reflect.Slice:\n\t\tif isTableArray(rv) {\n\t\t\treturn tomlArrayHash\n\t\t}\n\t\treturn tomlArray\n\tcase reflect.Ptr, reflect.Interface:\n\t\treturn tomlTypeOfGo(rv.Elem())\n\tcase reflect.String:\n\t\treturn tomlString\n\tcase reflect.Map:\n\t\treturn tomlHash\n\tdefault:\n\t\tencPanic(errors.New(\"unsupported type: \" + rv.Kind().String()))\n\t\tpanic(\"unreachable\")\n\t}\n}\n\nfunc isMarshaler(rv reflect.Value) bool {\n\treturn rv.Type().Implements(marshalText) || rv.Type().Implements(marshalToml)\n}\n\n// isTableArray reports if all entries in the array or slice are a table.\nfunc isTableArray(arr reflect.Value) bool {\n\tif isNil(arr) || !arr.IsValid() || arr.Len() == 0 {\n\t\treturn false\n\t}\n\n\tret := true\n\tfor i := 0; i < arr.Len(); i++ {\n\t\ttt := tomlTypeOfGo(eindirect(arr.Index(i)))\n\t\t// Don't allow nil.\n\t\tif tt == nil {\n\t\t\tencPanic(errArrayNilElement)\n\t\t}\n\n\t\tif ret && !typeEqual(tomlHash, tt) {\n\t\t\tret = false\n\t\t}\n\t}\n\treturn ret\n}\n\ntype tagOptions struct {\n\tskip      bool // \"-\"\n\tname      string\n\tomitempty bool\n\tomitzero  bool\n}\n\nfunc getOptions(tag reflect.StructTag) tagOptions {\n\tt := tag.Get(\"toml\")\n\tif t == \"-\" {\n\t\treturn tagOptions{skip: true}\n\t}\n\tvar opts tagOptions\n\tparts := strings.Split(t, \",\")\n\topts.name = parts[0]\n\tfor _, s := range parts[1:] {\n\t\tswitch s {\n\t\tcase \"omitempty\":\n\t\t\topts.omitempty = true\n\t\tcase \"omitzero\":\n\t\t\topts.omitzero = true\n\t\t}\n\t}\n\treturn opts\n}\n\nfunc isZero(rv reflect.Value) bool {\n\tswitch rv.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn rv.Int() == 0\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\treturn rv.Uint() == 0\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn rv.Float() == 0.0\n\t}\n\treturn false\n}\n\nfunc isEmpty(rv reflect.Value) bool {\n\tswitch rv.Kind() {\n\tcase reflect.Array, reflect.Slice, reflect.Map, reflect.String:\n\t\treturn rv.Len() == 0\n\tcase reflect.Struct:\n\t\tif rv.Type().Comparable() {\n\t\t\treturn reflect.Zero(rv.Type()).Interface() == rv.Interface()\n\t\t}\n\t\t// Need to also check if all the fields are empty, otherwise something\n\t\t// like this with uncomparable types will always return true:\n\t\t//\n\t\t//   type a struct{ field b }\n\t\t//   type b struct{ s []string }\n\t\t//   s := a{field: b{s: []string{\"AAA\"}}}\n\t\tfor i := 0; i < rv.NumField(); i++ {\n\t\t\tif !isEmpty(rv.Field(i)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\tcase reflect.Bool:\n\t\treturn !rv.Bool()\n\tcase reflect.Ptr:\n\t\treturn rv.IsNil()\n\t}\n\treturn false\n}\n\nfunc (enc *Encoder) newline() {\n\tif enc.hasWritten {\n\t\tenc.write(\"\\n\")\n\t}\n}\n\n// Write a key/value pair:\n//\n//\tkey = <any value>\n//\n// This is also used for \"k = v\" in inline tables; so something like this will\n// be written in three calls:\n//\n//\t┌───────────────────┐\n//\t│      ┌───┐  ┌────┐│\n//\tv      v   v  v    vv\n//\tkey = {k = 1, k2 = 2}\nfunc (enc *Encoder) writeKeyValue(key Key, val reflect.Value, inline bool) {\n\t/// Marshaler used on top-level document; call eElement() to just call\n\t/// Marshal{TOML,Text}.\n\tif len(key) == 0 {\n\t\tenc.eElement(val)\n\t\treturn\n\t}\n\tenc.writef(\"%s%s = \", enc.indentStr(key), key.maybeQuoted(len(key)-1))\n\tenc.eElement(val)\n\tif !inline {\n\t\tenc.newline()\n\t}\n}\n\nfunc (enc *Encoder) write(s string) {\n\t_, err := enc.w.WriteString(s)\n\tif err != nil {\n\t\tencPanic(err)\n\t}\n\tenc.hasWritten = true\n}\n\nfunc (enc *Encoder) writef(format string, v ...any) {\n\t_, err := fmt.Fprintf(enc.w, format, v...)\n\tif err != nil {\n\t\tencPanic(err)\n\t}\n\tenc.hasWritten = true\n}\n\nfunc (enc *Encoder) indentStr(key Key) string {\n\treturn strings.Repeat(enc.Indent, len(key)-1)\n}\n\nfunc encPanic(err error) {\n\tpanic(tomlEncodeError{err})\n}\n\n// Resolve any level of pointers to the actual value (e.g. **string → string).\nfunc eindirect(v reflect.Value) reflect.Value {\n\tif v.Kind() != reflect.Ptr && v.Kind() != reflect.Interface {\n\t\tif isMarshaler(v) {\n\t\t\treturn v\n\t\t}\n\t\tif v.CanAddr() { /// Special case for marshalers; see #358.\n\t\t\tif pv := v.Addr(); isMarshaler(pv) {\n\t\t\t\treturn pv\n\t\t\t}\n\t\t}\n\t\treturn v\n\t}\n\n\tif v.IsNil() {\n\t\treturn v\n\t}\n\n\treturn eindirect(v.Elem())\n}\n\nfunc isNil(rv reflect.Value) bool {\n\tswitch rv.Kind() {\n\tcase reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:\n\t\treturn rv.IsNil()\n\tdefault:\n\t\treturn false\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/error.go",
    "content": "package toml\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// ParseError is returned when there is an error parsing the TOML syntax such as\n// invalid syntax, duplicate keys, etc.\n//\n// In addition to the error message itself, you can also print detailed location\n// information with context by using [ErrorWithPosition]:\n//\n//\ttoml: error: Key 'fruit' was already created and cannot be used as an array.\n//\n//\tAt line 4, column 2-7:\n//\n//\t      2 | fruit = []\n//\t      3 |\n//\t      4 | [[fruit]] # Not allowed\n//\t            ^^^^^\n//\n// [ErrorWithUsage] can be used to print the above with some more detailed usage\n// guidance:\n//\n//\ttoml: error: newlines not allowed within inline tables\n//\n//\tAt line 1, column 18:\n//\n//\t      1 | x = [{ key = 42 #\n//\t                           ^\n//\n//\tError help:\n//\n//\t  Inline tables must always be on a single line:\n//\n//\t      table = {key = 42, second = 43}\n//\n//\t  It is invalid to split them over multiple lines like so:\n//\n//\t      # INVALID\n//\t      table = {\n//\t          key    = 42,\n//\t          second = 43\n//\t      }\n//\n//\t  Use regular for this:\n//\n//\t      [table]\n//\t      key    = 42\n//\t      second = 43\ntype ParseError struct {\n\tMessage  string   // Short technical message.\n\tUsage    string   // Longer message with usage guidance; may be blank.\n\tPosition Position // Position of the error\n\tLastKey  string   // Last parsed key, may be blank.\n\n\t// Line the error occurred.\n\t//\n\t// Deprecated: use [Position].\n\tLine int\n\n\terr   error\n\tinput string\n}\n\n// Position of an error.\ntype Position struct {\n\tLine  int // Line number, starting at 1.\n\tCol   int // Error column, starting at 1.\n\tStart int // Start of error, as byte offset starting at 0.\n\tLen   int // Length of the error in bytes.\n}\n\nfunc (p Position) withCol(tomlFile string) Position {\n\tvar (\n\t\tpos   int\n\t\tlines = strings.Split(tomlFile, \"\\n\")\n\t)\n\tfor i := range lines {\n\t\tll := len(lines[i]) + 1 // +1 for the removed newline\n\t\tif pos+ll >= p.Start {\n\t\t\tp.Col = p.Start - pos + 1\n\t\t\tif p.Col < 1 { // Should never happen, but just in case.\n\t\t\t\tp.Col = 1\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tpos += ll\n\t}\n\treturn p\n}\n\nfunc (pe ParseError) Error() string {\n\tif pe.LastKey == \"\" {\n\t\treturn fmt.Sprintf(\"toml: line %d: %s\", pe.Position.Line, pe.Message)\n\t}\n\treturn fmt.Sprintf(\"toml: line %d (last key %q): %s\",\n\t\tpe.Position.Line, pe.LastKey, pe.Message)\n}\n\n// ErrorWithPosition returns the error with detailed location context.\n//\n// See the documentation on [ParseError].\nfunc (pe ParseError) ErrorWithPosition() string {\n\tif pe.input == \"\" { // Should never happen, but just in case.\n\t\treturn pe.Error()\n\t}\n\n\t// TODO: don't show control characters as literals? This may not show up\n\t// well everywhere.\n\n\tvar (\n\t\tlines = strings.Split(pe.input, \"\\n\")\n\t\tb     = new(strings.Builder)\n\t)\n\tif pe.Position.Len == 1 {\n\t\tfmt.Fprintf(b, \"toml: error: %s\\n\\nAt line %d, column %d:\\n\\n\",\n\t\t\tpe.Message, pe.Position.Line, pe.Position.Col)\n\t} else {\n\t\tfmt.Fprintf(b, \"toml: error: %s\\n\\nAt line %d, column %d-%d:\\n\\n\",\n\t\t\tpe.Message, pe.Position.Line, pe.Position.Col, pe.Position.Col+pe.Position.Len-1)\n\t}\n\tif pe.Position.Line > 2 {\n\t\tfmt.Fprintf(b, \"% 7d | %s\\n\", pe.Position.Line-2, expandTab(lines[pe.Position.Line-3]))\n\t}\n\tif pe.Position.Line > 1 {\n\t\tfmt.Fprintf(b, \"% 7d | %s\\n\", pe.Position.Line-1, expandTab(lines[pe.Position.Line-2]))\n\t}\n\n\t/// Expand tabs, so that the ^^^s are at the correct position, but leave\n\t/// \"column 10-13\" intact. Adjusting this to the visual column would be\n\t/// better, but we don't know the tabsize of the user in their editor, which\n\t/// can be 8, 4, 2, or something else. We can't know. So leaving it as the\n\t/// character index is probably the \"most correct\".\n\texpanded := expandTab(lines[pe.Position.Line-1])\n\tdiff := len(expanded) - len(lines[pe.Position.Line-1])\n\n\tfmt.Fprintf(b, \"% 7d | %s\\n\", pe.Position.Line, expanded)\n\tfmt.Fprintf(b, \"% 10s%s%s\\n\", \"\", strings.Repeat(\" \", pe.Position.Col-1+diff), strings.Repeat(\"^\", pe.Position.Len))\n\treturn b.String()\n}\n\n// ErrorWithUsage returns the error with detailed location context and usage\n// guidance.\n//\n// See the documentation on [ParseError].\nfunc (pe ParseError) ErrorWithUsage() string {\n\tm := pe.ErrorWithPosition()\n\tif u, ok := pe.err.(interface{ Usage() string }); ok && u.Usage() != \"\" {\n\t\tlines := strings.Split(strings.TrimSpace(u.Usage()), \"\\n\")\n\t\tfor i := range lines {\n\t\t\tif lines[i] != \"\" {\n\t\t\t\tlines[i] = \"    \" + lines[i]\n\t\t\t}\n\t\t}\n\t\treturn m + \"Error help:\\n\\n\" + strings.Join(lines, \"\\n\") + \"\\n\"\n\t}\n\treturn m\n}\n\nfunc expandTab(s string) string {\n\tvar (\n\t\tb    strings.Builder\n\t\tl    int\n\t\tfill = func(n int) string {\n\t\t\tb := make([]byte, n)\n\t\t\tfor i := range b {\n\t\t\t\tb[i] = ' '\n\t\t\t}\n\t\t\treturn string(b)\n\t\t}\n\t)\n\tb.Grow(len(s))\n\tfor _, r := range s {\n\t\tswitch r {\n\t\tcase '\\t':\n\t\t\ttw := 8 - l%8\n\t\t\tb.WriteString(fill(tw))\n\t\t\tl += tw\n\t\tdefault:\n\t\t\tb.WriteRune(r)\n\t\t\tl += 1\n\t\t}\n\t}\n\treturn b.String()\n}\n\ntype (\n\terrLexControl       struct{ r rune }\n\terrLexEscape        struct{ r rune }\n\terrLexUTF8          struct{ b byte }\n\terrParseDate        struct{ v string }\n\terrLexInlineTableNL struct{}\n\terrLexStringNL      struct{}\n\terrParseRange       struct {\n\t\ti    any    // int or float\n\t\tsize string // \"int64\", \"uint16\", etc.\n\t}\n\terrUnsafeFloat struct {\n\t\ti    interface{} // float32 or float64\n\t\tsize string      // \"float32\" or \"float64\"\n\t}\n\terrParseDuration struct{ d string }\n)\n\nfunc (e errLexControl) Error() string {\n\treturn fmt.Sprintf(\"TOML files cannot contain control characters: '0x%02x'\", e.r)\n}\nfunc (e errLexControl) Usage() string { return \"\" }\n\nfunc (e errLexEscape) Error() string        { return fmt.Sprintf(`invalid escape in string '\\%c'`, e.r) }\nfunc (e errLexEscape) Usage() string        { return usageEscape }\nfunc (e errLexUTF8) Error() string          { return fmt.Sprintf(\"invalid UTF-8 byte: 0x%02x\", e.b) }\nfunc (e errLexUTF8) Usage() string          { return \"\" }\nfunc (e errParseDate) Error() string        { return fmt.Sprintf(\"invalid datetime: %q\", e.v) }\nfunc (e errParseDate) Usage() string        { return usageDate }\nfunc (e errLexInlineTableNL) Error() string { return \"newlines not allowed within inline tables\" }\nfunc (e errLexInlineTableNL) Usage() string { return usageInlineNewline }\nfunc (e errLexStringNL) Error() string      { return \"strings cannot contain newlines\" }\nfunc (e errLexStringNL) Usage() string      { return usageStringNewline }\nfunc (e errParseRange) Error() string       { return fmt.Sprintf(\"%v is out of range for %s\", e.i, e.size) }\nfunc (e errParseRange) Usage() string       { return usageIntOverflow }\nfunc (e errUnsafeFloat) Error() string {\n\treturn fmt.Sprintf(\"%v is out of the safe %s range\", e.i, e.size)\n}\nfunc (e errUnsafeFloat) Usage() string   { return usageUnsafeFloat }\nfunc (e errParseDuration) Error() string { return fmt.Sprintf(\"invalid duration: %q\", e.d) }\nfunc (e errParseDuration) Usage() string { return usageDuration }\n\nconst usageEscape = `\nA '\\' inside a \"-delimited string is interpreted as an escape character.\n\nThe following escape sequences are supported:\n\\b, \\t, \\n, \\f, \\r, \\\", \\\\, \\uXXXX, and \\UXXXXXXXX\n\nTo prevent a '\\' from being recognized as an escape character, use either:\n\n- a ' or '''-delimited string; escape characters aren't processed in them; or\n- write two backslashes to get a single backslash: '\\\\'.\n\nIf you're trying to add a Windows path (e.g. \"C:\\Users\\martin\") then using '/'\ninstead of '\\' will usually also work: \"C:/Users/martin\".\n`\n\nconst usageInlineNewline = `\nInline tables must always be on a single line:\n\n    table = {key = 42, second = 43}\n\nIt is invalid to split them over multiple lines like so:\n\n    # INVALID\n    table = {\n        key    = 42,\n        second = 43\n    }\n\nUse regular for this:\n\n    [table]\n    key    = 42\n    second = 43\n`\n\nconst usageStringNewline = `\nStrings must always be on a single line, and cannot span more than one line:\n\n    # INVALID\n    string = \"Hello,\n    world!\"\n\nInstead use \"\"\" or ''' to split strings over multiple lines:\n\n    string = \"\"\"Hello,\n    world!\"\"\"\n`\n\nconst usageIntOverflow = `\nThis number is too large; this may be an error in the TOML, but it can also be a\nbug in the program that uses too small of an integer.\n\nThe maximum and minimum values are:\n\n    size   │ lowest         │ highest\n    ───────┼────────────────┼──────────────\n    int8   │ -128           │ 127\n    int16  │ -32,768        │ 32,767\n    int32  │ -2,147,483,648 │ 2,147,483,647\n    int64  │ -9.2 × 10¹⁷    │ 9.2 × 10¹⁷\n    uint8  │ 0              │ 255\n    uint16 │ 0              │ 65,535\n    uint32 │ 0              │ 4,294,967,295\n    uint64 │ 0              │ 1.8 × 10¹⁸\n\nint refers to int32 on 32-bit systems and int64 on 64-bit systems.\n`\n\nconst usageUnsafeFloat = `\nThis number is outside of the \"safe\" range for floating point numbers; whole\n(non-fractional) numbers outside the below range can not always be represented\naccurately in a float, leading to some loss of accuracy.\n\nExplicitly mark a number as a fractional unit by adding \".0\", which will incur\nsome loss of accuracy; for example:\n\n\tf = 2_000_000_000.0\n\nAccuracy ranges:\n\n\tfloat32 =            16,777,215\n\tfloat64 = 9,007,199,254,740,991\n`\n\nconst usageDuration = `\nA duration must be as \"number<unit>\", without any spaces. Valid units are:\n\n    ns         nanoseconds (billionth of a second)\n    us, µs     microseconds (millionth of a second)\n    ms         milliseconds (thousands of a second)\n    s          seconds\n    m          minutes\n    h          hours\n\nYou can combine multiple units; for example \"5m10s\" for 5 minutes and 10\nseconds.\n`\n\nconst usageDate = `\nA TOML datetime must be in one of the following formats:\n\n    2006-01-02T15:04:05Z07:00   Date and time, with timezone.\n    2006-01-02T15:04:05         Date and time, but without timezone.\n    2006-01-02                  Date without a time or timezone.\n    15:04:05                    Just a time, without any timezone.\n\nSeconds may optionally have a fraction, up to nanosecond precision:\n\n    15:04:05.123\n    15:04:05.856018510\n`\n\n// TOML 1.1:\n// The seconds part in times is optional, and may be omitted:\n//     2006-01-02T15:04Z07:00\n//     2006-01-02T15:04\n//     15:04\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/internal/tz.go",
    "content": "package internal\n\nimport \"time\"\n\n// Timezones used for local datetime, date, and time TOML types.\n//\n// The exact way times and dates without a timezone should be interpreted is not\n// well-defined in the TOML specification and left to the implementation. These\n// defaults to current local timezone offset of the computer, but this can be\n// changed by changing these variables before decoding.\n//\n// TODO:\n// Ideally we'd like to offer people the ability to configure the used timezone\n// by setting Decoder.Timezone and Encoder.Timezone; however, this is a bit\n// tricky: the reason we use three different variables for this is to support\n// round-tripping – without these specific TZ names we wouldn't know which\n// format to use.\n//\n// There isn't a good way to encode this right now though, and passing this sort\n// of information also ties in to various related issues such as string format\n// encoding, encoding of comments, etc.\n//\n// So, for the time being, just put this in internal until we can write a good\n// comprehensive API for doing all of this.\n//\n// The reason they're exported is because they're referred from in e.g.\n// internal/tag.\n//\n// Note that this behaviour is valid according to the TOML spec as the exact\n// behaviour is left up to implementations.\nvar (\n\tlocalOffset   = func() int { _, o := time.Now().Zone(); return o }()\n\tLocalDatetime = time.FixedZone(\"datetime-local\", localOffset)\n\tLocalDate     = time.FixedZone(\"date-local\", localOffset)\n\tLocalTime     = time.FixedZone(\"time-local\", localOffset)\n)\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/lex.go",
    "content": "package toml\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\ntype itemType int\n\nconst (\n\titemError itemType = iota\n\titemEOF\n\titemText\n\titemString\n\titemStringEsc\n\titemRawString\n\titemMultilineString\n\titemRawMultilineString\n\titemBool\n\titemInteger\n\titemFloat\n\titemDatetime\n\titemArray // the start of an array\n\titemArrayEnd\n\titemTableStart\n\titemTableEnd\n\titemArrayTableStart\n\titemArrayTableEnd\n\titemKeyStart\n\titemKeyEnd\n\titemCommentStart\n\titemInlineTableStart\n\titemInlineTableEnd\n)\n\nconst eof = 0\n\ntype stateFn func(lx *lexer) stateFn\n\nfunc (p Position) String() string {\n\treturn fmt.Sprintf(\"at line %d; start %d; length %d\", p.Line, p.Start, p.Len)\n}\n\ntype lexer struct {\n\tinput string\n\tstart int\n\tpos   int\n\tline  int\n\tstate stateFn\n\titems chan item\n\tesc   bool\n\n\t// Allow for backing up up to 4 runes. This is necessary because TOML\n\t// contains 3-rune tokens (\"\"\" and ''').\n\tprevWidths [4]int\n\tnprev      int  // how many of prevWidths are in use\n\tatEOF      bool // If we emit an eof, we can still back up, but it is not OK to call next again.\n\n\t// A stack of state functions used to maintain context.\n\t//\n\t// The idea is to reuse parts of the state machine in various places. For\n\t// example, values can appear at the top level or within arbitrarily nested\n\t// arrays. The last state on the stack is used after a value has been lexed.\n\t// Similarly for comments.\n\tstack []stateFn\n}\n\ntype item struct {\n\ttyp itemType\n\tval string\n\terr error\n\tpos Position\n}\n\nfunc (lx *lexer) nextItem() item {\n\tfor {\n\t\tselect {\n\t\tcase item := <-lx.items:\n\t\t\treturn item\n\t\tdefault:\n\t\t\tlx.state = lx.state(lx)\n\t\t\t//fmt.Printf(\"     STATE %-24s  current: %-10s\tstack: %s\\n\", lx.state, lx.current(), lx.stack)\n\t\t}\n\t}\n}\n\nfunc lex(input string) *lexer {\n\tlx := &lexer{\n\t\tinput: input,\n\t\tstate: lexTop,\n\t\titems: make(chan item, 10),\n\t\tstack: make([]stateFn, 0, 10),\n\t\tline:  1,\n\t}\n\treturn lx\n}\n\nfunc (lx *lexer) push(state stateFn) {\n\tlx.stack = append(lx.stack, state)\n}\n\nfunc (lx *lexer) pop() stateFn {\n\tif len(lx.stack) == 0 {\n\t\tpanic(\"BUG in lexer: no states to pop\")\n\t}\n\tlast := lx.stack[len(lx.stack)-1]\n\tlx.stack = lx.stack[0 : len(lx.stack)-1]\n\treturn last\n}\n\nfunc (lx *lexer) current() string {\n\treturn lx.input[lx.start:lx.pos]\n}\n\nfunc (lx lexer) getPos() Position {\n\tp := Position{\n\t\tLine:  lx.line,\n\t\tStart: lx.start,\n\t\tLen:   lx.pos - lx.start,\n\t}\n\tif p.Len <= 0 {\n\t\tp.Len = 1\n\t}\n\treturn p\n}\n\nfunc (lx *lexer) emit(typ itemType) {\n\t// Needed for multiline strings ending with an incomplete UTF-8 sequence.\n\tif lx.start > lx.pos {\n\t\tlx.error(errLexUTF8{lx.input[lx.pos]})\n\t\treturn\n\t}\n\tlx.items <- item{typ: typ, pos: lx.getPos(), val: lx.current()}\n\tlx.start = lx.pos\n}\n\nfunc (lx *lexer) emitTrim(typ itemType) {\n\tlx.items <- item{typ: typ, pos: lx.getPos(), val: strings.TrimSpace(lx.current())}\n\tlx.start = lx.pos\n}\n\nfunc (lx *lexer) next() (r rune) {\n\tif lx.atEOF {\n\t\tpanic(\"BUG in lexer: next called after EOF\")\n\t}\n\tif lx.pos >= len(lx.input) {\n\t\tlx.atEOF = true\n\t\treturn eof\n\t}\n\n\tif lx.input[lx.pos] == '\\n' {\n\t\tlx.line++\n\t}\n\tlx.prevWidths[3] = lx.prevWidths[2]\n\tlx.prevWidths[2] = lx.prevWidths[1]\n\tlx.prevWidths[1] = lx.prevWidths[0]\n\tif lx.nprev < 4 {\n\t\tlx.nprev++\n\t}\n\n\tr, w := utf8.DecodeRuneInString(lx.input[lx.pos:])\n\tif r == utf8.RuneError && w == 1 {\n\t\tlx.error(errLexUTF8{lx.input[lx.pos]})\n\t\treturn utf8.RuneError\n\t}\n\n\t// Note: don't use peek() here, as this calls next().\n\tif isControl(r) || (r == '\\r' && (len(lx.input)-1 == lx.pos || lx.input[lx.pos+1] != '\\n')) {\n\t\tlx.errorControlChar(r)\n\t\treturn utf8.RuneError\n\t}\n\n\tlx.prevWidths[0] = w\n\tlx.pos += w\n\treturn r\n}\n\n// ignore skips over the pending input before this point.\nfunc (lx *lexer) ignore() {\n\tlx.start = lx.pos\n}\n\n// backup steps back one rune. Can be called 4 times between calls to next.\nfunc (lx *lexer) backup() {\n\tif lx.atEOF {\n\t\tlx.atEOF = false\n\t\treturn\n\t}\n\tif lx.nprev < 1 {\n\t\tpanic(\"BUG in lexer: backed up too far\")\n\t}\n\tw := lx.prevWidths[0]\n\tlx.prevWidths[0] = lx.prevWidths[1]\n\tlx.prevWidths[1] = lx.prevWidths[2]\n\tlx.prevWidths[2] = lx.prevWidths[3]\n\tlx.nprev--\n\n\tlx.pos -= w\n\tif lx.pos < len(lx.input) && lx.input[lx.pos] == '\\n' {\n\t\tlx.line--\n\t}\n}\n\n// accept consumes the next rune if it's equal to `valid`.\nfunc (lx *lexer) accept(valid rune) bool {\n\tif lx.next() == valid {\n\t\treturn true\n\t}\n\tlx.backup()\n\treturn false\n}\n\n// peek returns but does not consume the next rune in the input.\nfunc (lx *lexer) peek() rune {\n\tr := lx.next()\n\tlx.backup()\n\treturn r\n}\n\n// skip ignores all input that matches the given predicate.\nfunc (lx *lexer) skip(pred func(rune) bool) {\n\tfor {\n\t\tr := lx.next()\n\t\tif pred(r) {\n\t\t\tcontinue\n\t\t}\n\t\tlx.backup()\n\t\tlx.ignore()\n\t\treturn\n\t}\n}\n\n// error stops all lexing by emitting an error and returning `nil`.\n//\n// Note that any value that is a character is escaped if it's a special\n// character (newlines, tabs, etc.).\nfunc (lx *lexer) error(err error) stateFn {\n\tif lx.atEOF {\n\t\treturn lx.errorPrevLine(err)\n\t}\n\tlx.items <- item{typ: itemError, pos: lx.getPos(), err: err}\n\treturn nil\n}\n\n// errorfPrevline is like error(), but sets the position to the last column of\n// the previous line.\n//\n// This is so that unexpected EOF or NL errors don't show on a new blank line.\nfunc (lx *lexer) errorPrevLine(err error) stateFn {\n\tpos := lx.getPos()\n\tpos.Line--\n\tpos.Len = 1\n\tpos.Start = lx.pos - 1\n\tlx.items <- item{typ: itemError, pos: pos, err: err}\n\treturn nil\n}\n\n// errorPos is like error(), but allows explicitly setting the position.\nfunc (lx *lexer) errorPos(start, length int, err error) stateFn {\n\tpos := lx.getPos()\n\tpos.Start = start\n\tpos.Len = length\n\tlx.items <- item{typ: itemError, pos: pos, err: err}\n\treturn nil\n}\n\n// errorf is like error, and creates a new error.\nfunc (lx *lexer) errorf(format string, values ...any) stateFn {\n\tif lx.atEOF {\n\t\tpos := lx.getPos()\n\t\tif lx.pos >= 1 && lx.input[lx.pos-1] == '\\n' {\n\t\t\tpos.Line--\n\t\t}\n\t\tpos.Len = 1\n\t\tpos.Start = lx.pos - 1\n\t\tlx.items <- item{typ: itemError, pos: pos, err: fmt.Errorf(format, values...)}\n\t\treturn nil\n\t}\n\tlx.items <- item{typ: itemError, pos: lx.getPos(), err: fmt.Errorf(format, values...)}\n\treturn nil\n}\n\nfunc (lx *lexer) errorControlChar(cc rune) stateFn {\n\treturn lx.errorPos(lx.pos-1, 1, errLexControl{cc})\n}\n\n// lexTop consumes elements at the top level of TOML data.\nfunc lexTop(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isWhitespace(r) || isNL(r) {\n\t\treturn lexSkip(lx, lexTop)\n\t}\n\tswitch r {\n\tcase '#':\n\t\tlx.push(lexTop)\n\t\treturn lexCommentStart\n\tcase '[':\n\t\treturn lexTableStart\n\tcase eof:\n\t\tif lx.pos > lx.start {\n\t\t\t// TODO: never reached? I think this can only occur on a bug in the\n\t\t\t// lexer(?)\n\t\t\treturn lx.errorf(\"unexpected EOF\")\n\t\t}\n\t\tlx.emit(itemEOF)\n\t\treturn nil\n\t}\n\n\t// At this point, the only valid item can be a key, so we back up\n\t// and let the key lexer do the rest.\n\tlx.backup()\n\tlx.push(lexTopEnd)\n\treturn lexKeyStart\n}\n\n// lexTopEnd is entered whenever a top-level item has been consumed. (A value\n// or a table.) It must see only whitespace, and will turn back to lexTop\n// upon a newline. If it sees EOF, it will quit the lexer successfully.\nfunc lexTopEnd(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tcase r == '#':\n\t\t// a comment will read to a newline for us.\n\t\tlx.push(lexTop)\n\t\treturn lexCommentStart\n\tcase isWhitespace(r):\n\t\treturn lexTopEnd\n\tcase isNL(r):\n\t\tlx.ignore()\n\t\treturn lexTop\n\tcase r == eof:\n\t\tlx.emit(itemEOF)\n\t\treturn nil\n\t}\n\treturn lx.errorf(\"expected a top-level item to end with a newline, comment, or EOF, but got %q instead\", r)\n}\n\n// lexTable lexes the beginning of a table. Namely, it makes sure that\n// it starts with a character other than '.' and ']'.\n// It assumes that '[' has already been consumed.\n// It also handles the case that this is an item in an array of tables.\n// e.g., '[[name]]'.\nfunc lexTableStart(lx *lexer) stateFn {\n\tif lx.peek() == '[' {\n\t\tlx.next()\n\t\tlx.emit(itemArrayTableStart)\n\t\tlx.push(lexArrayTableEnd)\n\t} else {\n\t\tlx.emit(itemTableStart)\n\t\tlx.push(lexTableEnd)\n\t}\n\treturn lexTableNameStart\n}\n\nfunc lexTableEnd(lx *lexer) stateFn {\n\tlx.emit(itemTableEnd)\n\treturn lexTopEnd\n}\n\nfunc lexArrayTableEnd(lx *lexer) stateFn {\n\tif r := lx.next(); r != ']' {\n\t\treturn lx.errorf(\"expected end of table array name delimiter ']', but got %q instead\", r)\n\t}\n\tlx.emit(itemArrayTableEnd)\n\treturn lexTopEnd\n}\n\nfunc lexTableNameStart(lx *lexer) stateFn {\n\tlx.skip(isWhitespace)\n\tswitch r := lx.peek(); {\n\tcase r == ']' || r == eof:\n\t\treturn lx.errorf(\"unexpected end of table name (table names cannot be empty)\")\n\tcase r == '.':\n\t\treturn lx.errorf(\"unexpected table separator (table names cannot be empty)\")\n\tcase r == '\"' || r == '\\'':\n\t\tlx.ignore()\n\t\tlx.push(lexTableNameEnd)\n\t\treturn lexQuotedName\n\tdefault:\n\t\tlx.push(lexTableNameEnd)\n\t\treturn lexBareName\n\t}\n}\n\n// lexTableNameEnd reads the end of a piece of a table name, optionally\n// consuming whitespace.\nfunc lexTableNameEnd(lx *lexer) stateFn {\n\tlx.skip(isWhitespace)\n\tswitch r := lx.next(); {\n\tcase r == '.':\n\t\tlx.ignore()\n\t\treturn lexTableNameStart\n\tcase r == ']':\n\t\treturn lx.pop()\n\tdefault:\n\t\treturn lx.errorf(\"expected '.' or ']' to end table name, but got %q instead\", r)\n\t}\n}\n\n// lexBareName lexes one part of a key or table.\n//\n// It assumes that at least one valid character for the table has already been\n// read.\n//\n// Lexes only one part, e.g. only 'a' inside 'a.b'.\nfunc lexBareName(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isBareKeyChar(r) {\n\t\treturn lexBareName\n\t}\n\tlx.backup()\n\tlx.emit(itemText)\n\treturn lx.pop()\n}\n\n// lexQuotedName lexes one part of a quoted key or table name. It assumes that\n// it starts lexing at the quote itself (\" or ').\n//\n// Lexes only one part, e.g. only '\"a\"' inside '\"a\".b'.\nfunc lexQuotedName(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tcase r == '\"':\n\t\tlx.ignore() // ignore the '\"'\n\t\treturn lexString\n\tcase r == '\\'':\n\t\tlx.ignore() // ignore the \"'\"\n\t\treturn lexRawString\n\n\t// TODO: I don't think any of the below conditions can ever be reached?\n\tcase isWhitespace(r):\n\t\treturn lexSkip(lx, lexValue)\n\tcase r == eof:\n\t\treturn lx.errorf(\"unexpected EOF; expected value\")\n\tdefault:\n\t\treturn lx.errorf(\"expected value but found %q instead\", r)\n\t}\n}\n\n// lexKeyStart consumes all key parts until a '='.\nfunc lexKeyStart(lx *lexer) stateFn {\n\tlx.skip(isWhitespace)\n\tswitch r := lx.peek(); {\n\tcase r == '=' || r == eof:\n\t\treturn lx.errorf(\"unexpected '=': key name appears blank\")\n\tcase r == '.':\n\t\treturn lx.errorf(\"unexpected '.': keys cannot start with a '.'\")\n\tcase r == '\"' || r == '\\'':\n\t\tlx.ignore()\n\t\tfallthrough\n\tdefault: // Bare key\n\t\tlx.emit(itemKeyStart)\n\t\treturn lexKeyNameStart\n\t}\n}\n\nfunc lexKeyNameStart(lx *lexer) stateFn {\n\tlx.skip(isWhitespace)\n\tswitch r := lx.peek(); {\n\tdefault:\n\t\tlx.push(lexKeyEnd)\n\t\treturn lexBareName\n\tcase r == '\"' || r == '\\'':\n\t\tlx.ignore()\n\t\tlx.push(lexKeyEnd)\n\t\treturn lexQuotedName\n\n\t// TODO: I think these can never be reached?\n\tcase r == '=' || r == eof:\n\t\treturn lx.errorf(\"unexpected '='\")\n\tcase r == '.':\n\t\treturn lx.errorf(\"unexpected '.'\")\n\t}\n}\n\n// lexKeyEnd consumes the end of a key and trims whitespace (up to the key\n// separator).\nfunc lexKeyEnd(lx *lexer) stateFn {\n\tlx.skip(isWhitespace)\n\tswitch r := lx.next(); {\n\tcase isWhitespace(r):\n\t\treturn lexSkip(lx, lexKeyEnd)\n\tcase r == eof: // TODO: never reached\n\t\treturn lx.errorf(\"unexpected EOF; expected key separator '='\")\n\tcase r == '.':\n\t\tlx.ignore()\n\t\treturn lexKeyNameStart\n\tcase r == '=':\n\t\tlx.emit(itemKeyEnd)\n\t\treturn lexSkip(lx, lexValue)\n\tdefault:\n\t\tif r == '\\n' {\n\t\t\treturn lx.errorPrevLine(fmt.Errorf(\"expected '.' or '=', but got %q instead\", r))\n\t\t}\n\t\treturn lx.errorf(\"expected '.' or '=', but got %q instead\", r)\n\t}\n}\n\n// lexValue starts the consumption of a value anywhere a value is expected.\n// lexValue will ignore whitespace.\n// After a value is lexed, the last state on the next is popped and returned.\nfunc lexValue(lx *lexer) stateFn {\n\t// We allow whitespace to precede a value, but NOT newlines.\n\t// In array syntax, the array states are responsible for ignoring newlines.\n\tr := lx.next()\n\tswitch {\n\tcase isWhitespace(r):\n\t\treturn lexSkip(lx, lexValue)\n\tcase isDigit(r):\n\t\tlx.backup() // avoid an extra state and use the same as above\n\t\treturn lexNumberOrDateStart\n\t}\n\tswitch r {\n\tcase '[':\n\t\tlx.ignore()\n\t\tlx.emit(itemArray)\n\t\treturn lexArrayValue\n\tcase '{':\n\t\tlx.ignore()\n\t\tlx.emit(itemInlineTableStart)\n\t\treturn lexInlineTableValue\n\tcase '\"':\n\t\tif lx.accept('\"') {\n\t\t\tif lx.accept('\"') {\n\t\t\t\tlx.ignore() // Ignore \"\"\"\n\t\t\t\treturn lexMultilineString\n\t\t\t}\n\t\t\tlx.backup()\n\t\t}\n\t\tlx.ignore() // ignore the '\"'\n\t\treturn lexString\n\tcase '\\'':\n\t\tif lx.accept('\\'') {\n\t\t\tif lx.accept('\\'') {\n\t\t\t\tlx.ignore() // Ignore \"\"\"\n\t\t\t\treturn lexMultilineRawString\n\t\t\t}\n\t\t\tlx.backup()\n\t\t}\n\t\tlx.ignore() // ignore the \"'\"\n\t\treturn lexRawString\n\tcase '.': // special error case, be kind to users\n\t\treturn lx.errorf(\"floats must start with a digit, not '.'\")\n\tcase 'i', 'n':\n\t\tif (lx.accept('n') && lx.accept('f')) || (lx.accept('a') && lx.accept('n')) {\n\t\t\tlx.emit(itemFloat)\n\t\t\treturn lx.pop()\n\t\t}\n\tcase '-', '+':\n\t\treturn lexDecimalNumberStart\n\t}\n\tif unicode.IsLetter(r) {\n\t\t// Be permissive here; lexBool will give a nice error if the\n\t\t// user wrote something like\n\t\t//   x = foo\n\t\t// (i.e. not 'true' or 'false' but is something else word-like.)\n\t\tlx.backup()\n\t\treturn lexBool\n\t}\n\tif r == eof {\n\t\treturn lx.errorf(\"unexpected EOF; expected value\")\n\t}\n\tif r == '\\n' {\n\t\treturn lx.errorPrevLine(fmt.Errorf(\"expected value but found %q instead\", r))\n\t}\n\treturn lx.errorf(\"expected value but found %q instead\", r)\n}\n\n// lexArrayValue consumes one value in an array. It assumes that '[' or ','\n// have already been consumed. All whitespace and newlines are ignored.\nfunc lexArrayValue(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tcase isWhitespace(r) || isNL(r):\n\t\treturn lexSkip(lx, lexArrayValue)\n\tcase r == '#':\n\t\tlx.push(lexArrayValue)\n\t\treturn lexCommentStart\n\tcase r == ',':\n\t\treturn lx.errorf(\"unexpected comma\")\n\tcase r == ']':\n\t\treturn lexArrayEnd\n\t}\n\n\tlx.backup()\n\tlx.push(lexArrayValueEnd)\n\treturn lexValue\n}\n\n// lexArrayValueEnd consumes everything between the end of an array value and\n// the next value (or the end of the array): it ignores whitespace and newlines\n// and expects either a ',' or a ']'.\nfunc lexArrayValueEnd(lx *lexer) stateFn {\n\tswitch r := lx.next(); {\n\tcase isWhitespace(r) || isNL(r):\n\t\treturn lexSkip(lx, lexArrayValueEnd)\n\tcase r == '#':\n\t\tlx.push(lexArrayValueEnd)\n\t\treturn lexCommentStart\n\tcase r == ',':\n\t\tlx.ignore()\n\t\treturn lexArrayValue // move on to the next value\n\tcase r == ']':\n\t\treturn lexArrayEnd\n\tdefault:\n\t\treturn lx.errorf(\"expected a comma (',') or array terminator (']'), but got %s\", runeOrEOF(r))\n\t}\n}\n\n// lexArrayEnd finishes the lexing of an array.\n// It assumes that a ']' has just been consumed.\nfunc lexArrayEnd(lx *lexer) stateFn {\n\tlx.ignore()\n\tlx.emit(itemArrayEnd)\n\treturn lx.pop()\n}\n\n// lexInlineTableValue consumes one key/value pair in an inline table.\n// It assumes that '{' or ',' have already been consumed. Whitespace is ignored.\nfunc lexInlineTableValue(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tcase isWhitespace(r):\n\t\treturn lexSkip(lx, lexInlineTableValue)\n\tcase isNL(r):\n\t\treturn lexSkip(lx, lexInlineTableValue)\n\tcase r == '#':\n\t\tlx.push(lexInlineTableValue)\n\t\treturn lexCommentStart\n\tcase r == ',':\n\t\treturn lx.errorf(\"unexpected comma\")\n\tcase r == '}':\n\t\treturn lexInlineTableEnd\n\t}\n\tlx.backup()\n\tlx.push(lexInlineTableValueEnd)\n\treturn lexKeyStart\n}\n\n// lexInlineTableValueEnd consumes everything between the end of an inline table\n// key/value pair and the next pair (or the end of the table):\n// it ignores whitespace and expects either a ',' or a '}'.\nfunc lexInlineTableValueEnd(lx *lexer) stateFn {\n\tswitch r := lx.next(); {\n\tcase isWhitespace(r):\n\t\treturn lexSkip(lx, lexInlineTableValueEnd)\n\tcase isNL(r):\n\t\treturn lexSkip(lx, lexInlineTableValueEnd)\n\tcase r == '#':\n\t\tlx.push(lexInlineTableValueEnd)\n\t\treturn lexCommentStart\n\tcase r == ',':\n\t\tlx.ignore()\n\t\tlx.skip(isWhitespace)\n\t\tif lx.peek() == '}' {\n\t\t\treturn lexInlineTableValueEnd\n\t\t}\n\t\treturn lexInlineTableValue\n\tcase r == '}':\n\t\treturn lexInlineTableEnd\n\tdefault:\n\t\treturn lx.errorf(\"expected a comma or an inline table terminator '}', but got %s instead\", runeOrEOF(r))\n\t}\n}\n\nfunc runeOrEOF(r rune) string {\n\tif r == eof {\n\t\treturn \"end of file\"\n\t}\n\treturn \"'\" + string(r) + \"'\"\n}\n\n// lexInlineTableEnd finishes the lexing of an inline table.\n// It assumes that a '}' has just been consumed.\nfunc lexInlineTableEnd(lx *lexer) stateFn {\n\tlx.ignore()\n\tlx.emit(itemInlineTableEnd)\n\treturn lx.pop()\n}\n\n// lexString consumes the inner contents of a string. It assumes that the\n// beginning '\"' has already been consumed and ignored.\nfunc lexString(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tcase r == eof:\n\t\treturn lx.errorf(`unexpected EOF; expected '\"'`)\n\tcase isNL(r):\n\t\treturn lx.errorPrevLine(errLexStringNL{})\n\tcase r == '\\\\':\n\t\tlx.push(lexString)\n\t\treturn lexStringEscape\n\tcase r == '\"':\n\t\tlx.backup()\n\t\tif lx.esc {\n\t\t\tlx.esc = false\n\t\t\tlx.emit(itemStringEsc)\n\t\t} else {\n\t\t\tlx.emit(itemString)\n\t\t}\n\t\tlx.next()\n\t\tlx.ignore()\n\t\treturn lx.pop()\n\t}\n\treturn lexString\n}\n\n// lexMultilineString consumes the inner contents of a string. It assumes that\n// the beginning '\"\"\"' has already been consumed and ignored.\nfunc lexMultilineString(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch r {\n\tdefault:\n\t\treturn lexMultilineString\n\tcase eof:\n\t\treturn lx.errorf(`unexpected EOF; expected '\"\"\"'`)\n\tcase '\\\\':\n\t\treturn lexMultilineStringEscape\n\tcase '\"':\n\t\t/// Found \" → try to read two more \"\".\n\t\tif lx.accept('\"') {\n\t\t\tif lx.accept('\"') {\n\t\t\t\t/// Peek ahead: the string can contain \" and \"\", including at the\n\t\t\t\t/// end: \"\"\"str\"\"\"\"\"\n\t\t\t\t/// 6 or more at the end, however, is an error.\n\t\t\t\tif lx.peek() == '\"' {\n\t\t\t\t\t/// Check if we already lexed 5 's; if so we have 6 now, and\n\t\t\t\t\t/// that's just too many man!\n\t\t\t\t\t///\n\t\t\t\t\t/// Second check is for the edge case:\n\t\t\t\t\t///\n\t\t\t\t\t///            two quotes allowed.\n\t\t\t\t\t///            vv\n\t\t\t\t\t///   \"\"\"lol \\\"\"\"\"\"\"\n\t\t\t\t\t///          ^^  ^^^---- closing three\n\t\t\t\t\t///     escaped\n\t\t\t\t\t///\n\t\t\t\t\t/// But ugly, but it works\n\t\t\t\t\tif strings.HasSuffix(lx.current(), `\"\"\"\"\"`) && !strings.HasSuffix(lx.current(), `\\\"\"\"\"\"`) {\n\t\t\t\t\t\treturn lx.errorf(`unexpected '\"\"\"\"\"\"'`)\n\t\t\t\t\t}\n\t\t\t\t\tlx.backup()\n\t\t\t\t\tlx.backup()\n\t\t\t\t\treturn lexMultilineString\n\t\t\t\t}\n\n\t\t\t\tlx.backup() /// backup: don't include the \"\"\" in the item.\n\t\t\t\tlx.backup()\n\t\t\t\tlx.backup()\n\t\t\t\tlx.esc = false\n\t\t\t\tlx.emit(itemMultilineString)\n\t\t\t\tlx.next() /// Read over ''' again and discard it.\n\t\t\t\tlx.next()\n\t\t\t\tlx.next()\n\t\t\t\tlx.ignore()\n\t\t\t\treturn lx.pop()\n\t\t\t}\n\t\t\tlx.backup()\n\t\t}\n\t\treturn lexMultilineString\n\t}\n}\n\n// lexRawString consumes a raw string. Nothing can be escaped in such a string.\n// It assumes that the beginning \"'\" has already been consumed and ignored.\nfunc lexRawString(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch {\n\tdefault:\n\t\treturn lexRawString\n\tcase r == eof:\n\t\treturn lx.errorf(`unexpected EOF; expected \"'\"`)\n\tcase isNL(r):\n\t\treturn lx.errorPrevLine(errLexStringNL{})\n\tcase r == '\\'':\n\t\tlx.backup()\n\t\tlx.emit(itemRawString)\n\t\tlx.next()\n\t\tlx.ignore()\n\t\treturn lx.pop()\n\t}\n}\n\n// lexMultilineRawString consumes a raw string. Nothing can be escaped in such a\n// string. It assumes that the beginning triple-' has already been consumed and\n// ignored.\nfunc lexMultilineRawString(lx *lexer) stateFn {\n\tr := lx.next()\n\tswitch r {\n\tdefault:\n\t\treturn lexMultilineRawString\n\tcase eof:\n\t\treturn lx.errorf(`unexpected EOF; expected \"'''\"`)\n\tcase '\\'':\n\t\t/// Found ' → try to read two more ''.\n\t\tif lx.accept('\\'') {\n\t\t\tif lx.accept('\\'') {\n\t\t\t\t/// Peek ahead: the string can contain ' and '', including at the\n\t\t\t\t/// end: '''str'''''\n\t\t\t\t/// 6 or more at the end, however, is an error.\n\t\t\t\tif lx.peek() == '\\'' {\n\t\t\t\t\t/// Check if we already lexed 5 's; if so we have 6 now, and\n\t\t\t\t\t/// that's just too many man!\n\t\t\t\t\tif strings.HasSuffix(lx.current(), \"'''''\") {\n\t\t\t\t\t\treturn lx.errorf(`unexpected \"''''''\"`)\n\t\t\t\t\t}\n\t\t\t\t\tlx.backup()\n\t\t\t\t\tlx.backup()\n\t\t\t\t\treturn lexMultilineRawString\n\t\t\t\t}\n\n\t\t\t\tlx.backup() /// backup: don't include the ''' in the item.\n\t\t\t\tlx.backup()\n\t\t\t\tlx.backup()\n\t\t\t\tlx.emit(itemRawMultilineString)\n\t\t\t\tlx.next() /// Read over ''' again and discard it.\n\t\t\t\tlx.next()\n\t\t\t\tlx.next()\n\t\t\t\tlx.ignore()\n\t\t\t\treturn lx.pop()\n\t\t\t}\n\t\t\tlx.backup()\n\t\t}\n\t\treturn lexMultilineRawString\n\t}\n}\n\n// lexMultilineStringEscape consumes an escaped character. It assumes that the\n// preceding '\\\\' has already been consumed.\nfunc lexMultilineStringEscape(lx *lexer) stateFn {\n\tif isNL(lx.next()) { /// \\ escaping newline.\n\t\treturn lexMultilineString\n\t}\n\tlx.backup()\n\tlx.push(lexMultilineString)\n\treturn lexStringEscape(lx)\n}\n\nfunc lexStringEscape(lx *lexer) stateFn {\n\tlx.esc = true\n\tr := lx.next()\n\tswitch r {\n\tcase 'e':\n\t\tfallthrough\n\tcase 'b':\n\t\tfallthrough\n\tcase 't':\n\t\tfallthrough\n\tcase 'n':\n\t\tfallthrough\n\tcase 'f':\n\t\tfallthrough\n\tcase 'r':\n\t\tfallthrough\n\tcase '\"':\n\t\tfallthrough\n\tcase ' ', '\\t':\n\t\t// Inside \"\"\" .. \"\"\" strings you can use \\ to escape newlines, and any\n\t\t// amount of whitespace can be between the \\ and \\n.\n\t\tfallthrough\n\tcase '\\\\':\n\t\treturn lx.pop()\n\tcase 'x':\n\t\treturn lexHexEscape\n\tcase 'u':\n\t\treturn lexShortUnicodeEscape\n\tcase 'U':\n\t\treturn lexLongUnicodeEscape\n\t}\n\treturn lx.error(errLexEscape{r})\n}\n\nfunc lexHexEscape(lx *lexer) stateFn {\n\tvar r rune\n\tfor i := 0; i < 2; i++ {\n\t\tr = lx.next()\n\t\tif !isHex(r) {\n\t\t\treturn lx.errorf(`expected two hexadecimal digits after '\\x', but got %q instead`, lx.current())\n\t\t}\n\t}\n\treturn lx.pop()\n}\n\nfunc lexShortUnicodeEscape(lx *lexer) stateFn {\n\tvar r rune\n\tfor i := 0; i < 4; i++ {\n\t\tr = lx.next()\n\t\tif !isHex(r) {\n\t\t\treturn lx.errorf(`expected four hexadecimal digits after '\\u', but got %q instead`, lx.current())\n\t\t}\n\t}\n\treturn lx.pop()\n}\n\nfunc lexLongUnicodeEscape(lx *lexer) stateFn {\n\tvar r rune\n\tfor i := 0; i < 8; i++ {\n\t\tr = lx.next()\n\t\tif !isHex(r) {\n\t\t\treturn lx.errorf(`expected eight hexadecimal digits after '\\U', but got %q instead`, lx.current())\n\t\t}\n\t}\n\treturn lx.pop()\n}\n\n// lexNumberOrDateStart processes the first character of a value which begins\n// with a digit. It exists to catch values starting with '0', so that\n// lexBaseNumberOrDate can differentiate base prefixed integers from other\n// types.\nfunc lexNumberOrDateStart(lx *lexer) stateFn {\n\tif lx.next() == '0' {\n\t\treturn lexBaseNumberOrDate\n\t}\n\treturn lexNumberOrDate\n}\n\n// lexNumberOrDate consumes either an integer, float or datetime.\nfunc lexNumberOrDate(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isDigit(r) {\n\t\treturn lexNumberOrDate\n\t}\n\tswitch r {\n\tcase '-', ':':\n\t\treturn lexDatetime\n\tcase '_':\n\t\treturn lexDecimalNumber\n\tcase '.', 'e', 'E':\n\t\treturn lexFloat\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexDatetime consumes a Datetime, to a first approximation.\n// The parser validates that it matches one of the accepted formats.\nfunc lexDatetime(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isDigit(r) {\n\t\treturn lexDatetime\n\t}\n\tswitch r {\n\tcase '-', ':', 'T', 't', ' ', '.', 'Z', 'z', '+':\n\t\treturn lexDatetime\n\t}\n\n\tlx.backup()\n\tlx.emitTrim(itemDatetime)\n\treturn lx.pop()\n}\n\n// lexHexInteger consumes a hexadecimal integer after seeing the '0x' prefix.\nfunc lexHexInteger(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isHex(r) {\n\t\treturn lexHexInteger\n\t}\n\tswitch r {\n\tcase '_':\n\t\treturn lexHexInteger\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexOctalInteger consumes an octal integer after seeing the '0o' prefix.\nfunc lexOctalInteger(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isOctal(r) {\n\t\treturn lexOctalInteger\n\t}\n\tswitch r {\n\tcase '_':\n\t\treturn lexOctalInteger\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexBinaryInteger consumes a binary integer after seeing the '0b' prefix.\nfunc lexBinaryInteger(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isBinary(r) {\n\t\treturn lexBinaryInteger\n\t}\n\tswitch r {\n\tcase '_':\n\t\treturn lexBinaryInteger\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexDecimalNumber consumes a decimal float or integer.\nfunc lexDecimalNumber(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isDigit(r) {\n\t\treturn lexDecimalNumber\n\t}\n\tswitch r {\n\tcase '.', 'e', 'E':\n\t\treturn lexFloat\n\tcase '_':\n\t\treturn lexDecimalNumber\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexDecimalNumber consumes the first digit of a number beginning with a sign.\n// It assumes the sign has already been consumed. Values which start with a sign\n// are only allowed to be decimal integers or floats.\n//\n// The special \"nan\" and \"inf\" values are also recognized.\nfunc lexDecimalNumberStart(lx *lexer) stateFn {\n\tr := lx.next()\n\n\t// Special error cases to give users better error messages\n\tswitch r {\n\tcase 'i':\n\t\tif !lx.accept('n') || !lx.accept('f') {\n\t\t\treturn lx.errorf(\"invalid float: '%s'\", lx.current())\n\t\t}\n\t\tlx.emit(itemFloat)\n\t\treturn lx.pop()\n\tcase 'n':\n\t\tif !lx.accept('a') || !lx.accept('n') {\n\t\t\treturn lx.errorf(\"invalid float: '%s'\", lx.current())\n\t\t}\n\t\tlx.emit(itemFloat)\n\t\treturn lx.pop()\n\tcase '0':\n\t\tp := lx.peek()\n\t\tswitch p {\n\t\tcase 'b', 'o', 'x':\n\t\t\treturn lx.errorf(\"cannot use sign with non-decimal numbers: '%s%c'\", lx.current(), p)\n\t\t}\n\tcase '.':\n\t\treturn lx.errorf(\"floats must start with a digit, not '.'\")\n\t}\n\n\tif isDigit(r) {\n\t\treturn lexDecimalNumber\n\t}\n\n\treturn lx.errorf(\"expected a digit but got %q\", r)\n}\n\n// lexBaseNumberOrDate differentiates between the possible values which\n// start with '0'. It assumes that before reaching this state, the initial '0'\n// has been consumed.\nfunc lexBaseNumberOrDate(lx *lexer) stateFn {\n\tr := lx.next()\n\t// Note: All datetimes start with at least two digits, so we don't\n\t// handle date characters (':', '-', etc.) here.\n\tif isDigit(r) {\n\t\treturn lexNumberOrDate\n\t}\n\tswitch r {\n\tcase '_':\n\t\t// Can only be decimal, because there can't be an underscore\n\t\t// between the '0' and the base designator, and dates can't\n\t\t// contain underscores.\n\t\treturn lexDecimalNumber\n\tcase '.', 'e', 'E':\n\t\treturn lexFloat\n\tcase 'b':\n\t\tr = lx.peek()\n\t\tif !isBinary(r) {\n\t\t\tlx.errorf(\"not a binary number: '%s%c'\", lx.current(), r)\n\t\t}\n\t\treturn lexBinaryInteger\n\tcase 'o':\n\t\tr = lx.peek()\n\t\tif !isOctal(r) {\n\t\t\tlx.errorf(\"not an octal number: '%s%c'\", lx.current(), r)\n\t\t}\n\t\treturn lexOctalInteger\n\tcase 'x':\n\t\tr = lx.peek()\n\t\tif !isHex(r) {\n\t\t\tlx.errorf(\"not a hexadecimal number: '%s%c'\", lx.current(), r)\n\t\t}\n\t\treturn lexHexInteger\n\t}\n\n\tlx.backup()\n\tlx.emit(itemInteger)\n\treturn lx.pop()\n}\n\n// lexFloat consumes the elements of a float. It allows any sequence of\n// float-like characters, so floats emitted by the lexer are only a first\n// approximation and must be validated by the parser.\nfunc lexFloat(lx *lexer) stateFn {\n\tr := lx.next()\n\tif isDigit(r) {\n\t\treturn lexFloat\n\t}\n\tswitch r {\n\tcase '_', '.', '-', '+', 'e', 'E':\n\t\treturn lexFloat\n\t}\n\n\tlx.backup()\n\tlx.emit(itemFloat)\n\treturn lx.pop()\n}\n\n// lexBool consumes a bool string: 'true' or 'false.\nfunc lexBool(lx *lexer) stateFn {\n\tvar rs []rune\n\tfor {\n\t\tr := lx.next()\n\t\tif !unicode.IsLetter(r) {\n\t\t\tlx.backup()\n\t\t\tbreak\n\t\t}\n\t\trs = append(rs, r)\n\t}\n\ts := string(rs)\n\tswitch s {\n\tcase \"true\", \"false\":\n\t\tlx.emit(itemBool)\n\t\treturn lx.pop()\n\t}\n\treturn lx.errorf(\"expected value but found %q instead\", s)\n}\n\n// lexCommentStart begins the lexing of a comment. It will emit\n// itemCommentStart and consume no characters, passing control to lexComment.\nfunc lexCommentStart(lx *lexer) stateFn {\n\tlx.ignore()\n\tlx.emit(itemCommentStart)\n\treturn lexComment\n}\n\n// lexComment lexes an entire comment. It assumes that '#' has been consumed.\n// It will consume *up to* the first newline character, and pass control\n// back to the last state on the stack.\nfunc lexComment(lx *lexer) stateFn {\n\tswitch r := lx.next(); {\n\tcase isNL(r) || r == eof:\n\t\tlx.backup()\n\t\tlx.emit(itemText)\n\t\treturn lx.pop()\n\tdefault:\n\t\treturn lexComment\n\t}\n}\n\n// lexSkip ignores all slurped input and moves on to the next state.\nfunc lexSkip(lx *lexer, nextState stateFn) stateFn {\n\tlx.ignore()\n\treturn nextState\n}\n\nfunc (s stateFn) String() string {\n\tif s == nil {\n\t\treturn \"<nil>\"\n\t}\n\tname := runtime.FuncForPC(reflect.ValueOf(s).Pointer()).Name()\n\tif i := strings.LastIndexByte(name, '.'); i > -1 {\n\t\tname = name[i+1:]\n\t}\n\treturn name + \"()\"\n}\n\nfunc (itype itemType) String() string {\n\tswitch itype {\n\tcase itemError:\n\t\treturn \"Error\"\n\tcase itemEOF:\n\t\treturn \"EOF\"\n\tcase itemText:\n\t\treturn \"Text\"\n\tcase itemString, itemStringEsc, itemRawString, itemMultilineString, itemRawMultilineString:\n\t\treturn \"String\"\n\tcase itemBool:\n\t\treturn \"Bool\"\n\tcase itemInteger:\n\t\treturn \"Integer\"\n\tcase itemFloat:\n\t\treturn \"Float\"\n\tcase itemDatetime:\n\t\treturn \"DateTime\"\n\tcase itemArray:\n\t\treturn \"Array\"\n\tcase itemArrayEnd:\n\t\treturn \"ArrayEnd\"\n\tcase itemTableStart:\n\t\treturn \"TableStart\"\n\tcase itemTableEnd:\n\t\treturn \"TableEnd\"\n\tcase itemArrayTableStart:\n\t\treturn \"ArrayTableStart\"\n\tcase itemArrayTableEnd:\n\t\treturn \"ArrayTableEnd\"\n\tcase itemKeyStart:\n\t\treturn \"KeyStart\"\n\tcase itemKeyEnd:\n\t\treturn \"KeyEnd\"\n\tcase itemCommentStart:\n\t\treturn \"CommentStart\"\n\tcase itemInlineTableStart:\n\t\treturn \"InlineTableStart\"\n\tcase itemInlineTableEnd:\n\t\treturn \"InlineTableEnd\"\n\t}\n\tpanic(fmt.Sprintf(\"BUG: Unknown type '%d'.\", int(itype)))\n}\n\nfunc (item item) String() string {\n\treturn fmt.Sprintf(\"(%s, %s)\", item.typ, item.val)\n}\n\nfunc isWhitespace(r rune) bool { return r == '\\t' || r == ' ' }\nfunc isNL(r rune) bool         { return r == '\\n' || r == '\\r' }\nfunc isControl(r rune) bool { // Control characters except \\t, \\r, \\n\n\tswitch r {\n\tcase '\\t', '\\r', '\\n':\n\t\treturn false\n\tdefault:\n\t\treturn (r >= 0x00 && r <= 0x1f) || r == 0x7f\n\t}\n}\nfunc isDigit(r rune) bool  { return r >= '0' && r <= '9' }\nfunc isBinary(r rune) bool { return r == '0' || r == '1' }\nfunc isOctal(r rune) bool  { return r >= '0' && r <= '7' }\nfunc isHex(r rune) bool    { return (r >= '0' && r <= '9') || (r|0x20 >= 'a' && r|0x20 <= 'f') }\nfunc isBareKeyChar(r rune) bool {\n\treturn (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') ||\n\t\t(r >= '0' && r <= '9') || r == '_' || r == '-'\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/meta.go",
    "content": "package toml\n\nimport (\n\t\"strings\"\n)\n\n// MetaData allows access to meta information about TOML data that's not\n// accessible otherwise.\n//\n// It allows checking if a key is defined in the TOML data, whether any keys\n// were undecoded, and the TOML type of a key.\ntype MetaData struct {\n\tcontext Key // Used only during decoding.\n\n\tkeyInfo map[string]keyInfo\n\tmapping map[string]any\n\tkeys    []Key\n\tdecoded map[string]struct{}\n\tdata    []byte // Input file; for errors.\n}\n\n// IsDefined reports if the key exists in the TOML data.\n//\n// The key should be specified hierarchically, for example to access the TOML\n// key \"a.b.c\" you would use IsDefined(\"a\", \"b\", \"c\"). Keys are case sensitive.\n//\n// Returns false for an empty key.\nfunc (md *MetaData) IsDefined(key ...string) bool {\n\tif len(key) == 0 {\n\t\treturn false\n\t}\n\n\tvar (\n\t\thash      map[string]any\n\t\tok        bool\n\t\thashOrVal any = md.mapping\n\t)\n\tfor _, k := range key {\n\t\tif hash, ok = hashOrVal.(map[string]any); !ok {\n\t\t\treturn false\n\t\t}\n\t\tif hashOrVal, ok = hash[k]; !ok {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// Type returns a string representation of the type of the key specified.\n//\n// Type will return the empty string if given an empty key or a key that does\n// not exist. Keys are case sensitive.\nfunc (md *MetaData) Type(key ...string) string {\n\tif ki, ok := md.keyInfo[Key(key).String()]; ok {\n\t\treturn ki.tomlType.typeString()\n\t}\n\treturn \"\"\n}\n\n// Keys returns a slice of every key in the TOML data, including key groups.\n//\n// Each key is itself a slice, where the first element is the top of the\n// hierarchy and the last is the most specific. The list will have the same\n// order as the keys appeared in the TOML data.\n//\n// All keys returned are non-empty.\nfunc (md *MetaData) Keys() []Key {\n\treturn md.keys\n}\n\n// Undecoded returns all keys that have not been decoded in the order in which\n// they appear in the original TOML document.\n//\n// This includes keys that haven't been decoded because of a [Primitive] value.\n// Once the Primitive value is decoded, the keys will be considered decoded.\n//\n// Also note that decoding into an empty interface will result in no decoding,\n// and so no keys will be considered decoded.\n//\n// In this sense, the Undecoded keys correspond to keys in the TOML document\n// that do not have a concrete type in your representation.\nfunc (md *MetaData) Undecoded() []Key {\n\tundecoded := make([]Key, 0, len(md.keys))\n\tfor _, key := range md.keys {\n\t\tif _, ok := md.decoded[key.String()]; !ok {\n\t\t\tundecoded = append(undecoded, key)\n\t\t}\n\t}\n\treturn undecoded\n}\n\n// Key represents any TOML key, including key groups. Use [MetaData.Keys] to get\n// values of this type.\ntype Key []string\n\nfunc (k Key) String() string {\n\t// This is called quite often, so it's a bit funky to make it faster.\n\tvar b strings.Builder\n\tb.Grow(len(k) * 25)\nouter:\n\tfor i, kk := range k {\n\t\tif i > 0 {\n\t\t\tb.WriteByte('.')\n\t\t}\n\t\tif kk == \"\" {\n\t\t\tb.WriteString(`\"\"`)\n\t\t} else {\n\t\t\tfor _, r := range kk {\n\t\t\t\t// \"Inline\" isBareKeyChar\n\t\t\t\tif !((r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r == '-') {\n\t\t\t\t\tb.WriteByte('\"')\n\t\t\t\t\tb.WriteString(dblQuotedReplacer.Replace(kk))\n\t\t\t\t\tb.WriteByte('\"')\n\t\t\t\t\tcontinue outer\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.WriteString(kk)\n\t\t}\n\t}\n\treturn b.String()\n}\n\nfunc (k Key) maybeQuoted(i int) string {\n\tif k[i] == \"\" {\n\t\treturn `\"\"`\n\t}\n\tfor _, r := range k[i] {\n\t\tif (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r == '-' {\n\t\t\tcontinue\n\t\t}\n\t\treturn `\"` + dblQuotedReplacer.Replace(k[i]) + `\"`\n\t}\n\treturn k[i]\n}\n\n// Like append(), but only increase the cap by 1.\nfunc (k Key) add(piece string) Key {\n\tnewKey := make(Key, len(k)+1)\n\tcopy(newKey, k)\n\tnewKey[len(k)] = piece\n\treturn newKey\n}\n\nfunc (k Key) parent() Key  { return k[:len(k)-1] } // all except the last piece.\nfunc (k Key) last() string { return k[len(k)-1] }  // last piece of this key.\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/parse.go",
    "content": "package toml\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t\"github.com/BurntSushi/toml/internal\"\n)\n\ntype parser struct {\n\tlx         *lexer\n\tcontext    Key      // Full key for the current hash in scope.\n\tcurrentKey string   // Base key name for everything except hashes.\n\tpos        Position // Current position in the TOML file.\n\n\tordered []Key // List of keys in the order that they appear in the TOML data.\n\n\tkeyInfo   map[string]keyInfo  // Map keyname → info about the TOML key.\n\tmapping   map[string]any      // Map keyname → key value.\n\timplicits map[string]struct{} // Record implicit keys (e.g. \"key.group.names\").\n}\n\ntype keyInfo struct {\n\tpos      Position\n\ttomlType tomlType\n}\n\nfunc parse(data string) (p *parser, err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tif pErr, ok := r.(ParseError); ok {\n\t\t\t\tpErr.input = data\n\t\t\t\terr = pErr\n\t\t\t\treturn\n\t\t\t}\n\t\t\tpanic(r)\n\t\t}\n\t}()\n\n\t// Read over BOM; do this here as the lexer calls utf8.DecodeRuneInString()\n\t// which mangles stuff. UTF-16 BOM isn't strictly valid, but some tools add\n\t// it anyway.\n\tif strings.HasPrefix(data, \"\\xff\\xfe\") || strings.HasPrefix(data, \"\\xfe\\xff\") { // UTF-16\n\t\tdata = data[2:]\n\t} else if strings.HasPrefix(data, \"\\xef\\xbb\\xbf\") { // UTF-8\n\t\tdata = data[3:]\n\t}\n\n\t// Examine first few bytes for NULL bytes; this probably means it's a UTF-16\n\t// file (second byte in surrogate pair being NULL). Again, do this here to\n\t// avoid having to deal with UTF-8/16 stuff in the lexer.\n\tex := 6\n\tif len(data) < 6 {\n\t\tex = len(data)\n\t}\n\tif i := strings.IndexRune(data[:ex], 0); i > -1 {\n\t\treturn nil, ParseError{\n\t\t\tMessage:  \"files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8\",\n\t\t\tPosition: Position{Line: 1, Col: 1, Start: i, Len: 1},\n\t\t\tLine:     1,\n\t\t\tinput:    data,\n\t\t}\n\t}\n\n\tp = &parser{\n\t\tkeyInfo:   make(map[string]keyInfo),\n\t\tmapping:   make(map[string]any),\n\t\tlx:        lex(data),\n\t\tordered:   make([]Key, 0),\n\t\timplicits: make(map[string]struct{}),\n\t}\n\tfor {\n\t\titem := p.next()\n\t\tif item.typ == itemEOF {\n\t\t\tbreak\n\t\t}\n\t\tp.topLevel(item)\n\t}\n\n\treturn p, nil\n}\n\nfunc (p *parser) panicErr(it item, err error) {\n\tpanic(ParseError{\n\t\tMessage:  err.Error(),\n\t\terr:      err,\n\t\tPosition: it.pos.withCol(p.lx.input),\n\t\tLine:     it.pos.Len,\n\t\tLastKey:  p.current(),\n\t})\n}\n\nfunc (p *parser) panicItemf(it item, format string, v ...any) {\n\tpanic(ParseError{\n\t\tMessage:  fmt.Sprintf(format, v...),\n\t\tPosition: it.pos.withCol(p.lx.input),\n\t\tLine:     it.pos.Len,\n\t\tLastKey:  p.current(),\n\t})\n}\n\nfunc (p *parser) panicf(format string, v ...any) {\n\tpanic(ParseError{\n\t\tMessage:  fmt.Sprintf(format, v...),\n\t\tPosition: p.pos.withCol(p.lx.input),\n\t\tLine:     p.pos.Line,\n\t\tLastKey:  p.current(),\n\t})\n}\n\nfunc (p *parser) next() item {\n\tit := p.lx.nextItem()\n\t//fmt.Printf(\"ITEM %-18s line %-3d │ %q\\n\", it.typ, it.pos.Line, it.val)\n\tif it.typ == itemError {\n\t\tif it.err != nil {\n\t\t\tpanic(ParseError{\n\t\t\t\tMessage:  it.err.Error(),\n\t\t\t\terr:      it.err,\n\t\t\t\tPosition: it.pos.withCol(p.lx.input),\n\t\t\t\tLine:     it.pos.Line,\n\t\t\t\tLastKey:  p.current(),\n\t\t\t})\n\t\t}\n\n\t\tp.panicItemf(it, \"%s\", it.val)\n\t}\n\treturn it\n}\n\nfunc (p *parser) nextPos() item {\n\tit := p.next()\n\tp.pos = it.pos\n\treturn it\n}\n\nfunc (p *parser) bug(format string, v ...any) {\n\tpanic(fmt.Sprintf(\"BUG: \"+format+\"\\n\\n\", v...))\n}\n\nfunc (p *parser) expect(typ itemType) item {\n\tit := p.next()\n\tp.assertEqual(typ, it.typ)\n\treturn it\n}\n\nfunc (p *parser) assertEqual(expected, got itemType) {\n\tif expected != got {\n\t\tp.bug(\"Expected '%s' but got '%s'.\", expected, got)\n\t}\n}\n\nfunc (p *parser) topLevel(item item) {\n\tswitch item.typ {\n\tcase itemCommentStart: // # ..\n\t\tp.expect(itemText)\n\tcase itemTableStart: // [ .. ]\n\t\tname := p.nextPos()\n\n\t\tvar key Key\n\t\tfor ; name.typ != itemTableEnd && name.typ != itemEOF; name = p.next() {\n\t\t\tkey = append(key, p.keyString(name))\n\t\t}\n\t\tp.assertEqual(itemTableEnd, name.typ)\n\n\t\tp.addContext(key, false)\n\t\tp.setType(\"\", tomlHash, item.pos)\n\t\tp.ordered = append(p.ordered, key)\n\tcase itemArrayTableStart: // [[ .. ]]\n\t\tname := p.nextPos()\n\n\t\tvar key Key\n\t\tfor ; name.typ != itemArrayTableEnd && name.typ != itemEOF; name = p.next() {\n\t\t\tkey = append(key, p.keyString(name))\n\t\t}\n\t\tp.assertEqual(itemArrayTableEnd, name.typ)\n\n\t\tp.addContext(key, true)\n\t\tp.setType(\"\", tomlArrayHash, item.pos)\n\t\tp.ordered = append(p.ordered, key)\n\tcase itemKeyStart: // key = ..\n\t\touterContext := p.context\n\t\t/// Read all the key parts (e.g. 'a' and 'b' in 'a.b')\n\t\tk := p.nextPos()\n\t\tvar key Key\n\t\tfor ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() {\n\t\t\tkey = append(key, p.keyString(k))\n\t\t}\n\t\tp.assertEqual(itemKeyEnd, k.typ)\n\n\t\t/// The current key is the last part.\n\t\tp.currentKey = key.last()\n\n\t\t/// All the other parts (if any) are the context; need to set each part\n\t\t/// as implicit.\n\t\tcontext := key.parent()\n\t\tfor i := range context {\n\t\t\tp.addImplicitContext(append(p.context, context[i:i+1]...))\n\t\t}\n\t\tp.ordered = append(p.ordered, p.context.add(p.currentKey))\n\n\t\t/// Set value.\n\t\tvItem := p.next()\n\t\tval, typ := p.value(vItem, false)\n\t\tp.setValue(p.currentKey, val)\n\t\tp.setType(p.currentKey, typ, vItem.pos)\n\n\t\t/// Remove the context we added (preserving any context from [tbl] lines).\n\t\tp.context = outerContext\n\t\tp.currentKey = \"\"\n\tdefault:\n\t\tp.bug(\"Unexpected type at top level: %s\", item.typ)\n\t}\n}\n\n// Gets a string for a key (or part of a key in a table name).\nfunc (p *parser) keyString(it item) string {\n\tswitch it.typ {\n\tcase itemText:\n\t\treturn it.val\n\tcase itemString, itemStringEsc, itemMultilineString,\n\t\titemRawString, itemRawMultilineString:\n\t\ts, _ := p.value(it, false)\n\t\treturn s.(string)\n\tdefault:\n\t\tp.bug(\"Unexpected key type: %s\", it.typ)\n\t}\n\tpanic(\"unreachable\")\n}\n\nvar datetimeRepl = strings.NewReplacer(\n\t\"z\", \"Z\",\n\t\"t\", \"T\",\n\t\" \", \"T\")\n\n// value translates an expected value from the lexer into a Go value wrapped\n// as an empty interface.\nfunc (p *parser) value(it item, parentIsArray bool) (any, tomlType) {\n\tswitch it.typ {\n\tcase itemString:\n\t\treturn it.val, p.typeOfPrimitive(it)\n\tcase itemStringEsc:\n\t\treturn p.replaceEscapes(it, it.val), p.typeOfPrimitive(it)\n\tcase itemMultilineString:\n\t\treturn p.replaceEscapes(it, p.stripEscapedNewlines(stripFirstNewline(it.val))), p.typeOfPrimitive(it)\n\tcase itemRawString:\n\t\treturn it.val, p.typeOfPrimitive(it)\n\tcase itemRawMultilineString:\n\t\treturn stripFirstNewline(it.val), p.typeOfPrimitive(it)\n\tcase itemInteger:\n\t\treturn p.valueInteger(it)\n\tcase itemFloat:\n\t\treturn p.valueFloat(it)\n\tcase itemBool:\n\t\tswitch it.val {\n\t\tcase \"true\":\n\t\t\treturn true, p.typeOfPrimitive(it)\n\t\tcase \"false\":\n\t\t\treturn false, p.typeOfPrimitive(it)\n\t\tdefault:\n\t\t\tp.bug(\"Expected boolean value, but got '%s'.\", it.val)\n\t\t}\n\tcase itemDatetime:\n\t\treturn p.valueDatetime(it)\n\tcase itemArray:\n\t\treturn p.valueArray(it)\n\tcase itemInlineTableStart:\n\t\treturn p.valueInlineTable(it, parentIsArray)\n\tdefault:\n\t\tp.bug(\"Unexpected value type: %s\", it.typ)\n\t}\n\tpanic(\"unreachable\")\n}\n\nfunc (p *parser) valueInteger(it item) (any, tomlType) {\n\tif !numUnderscoresOK(it.val) {\n\t\tp.panicItemf(it, \"Invalid integer %q: underscores must be surrounded by digits\", it.val)\n\t}\n\tif numHasLeadingZero(it.val) {\n\t\tp.panicItemf(it, \"Invalid integer %q: cannot have leading zeroes\", it.val)\n\t}\n\n\tnum, err := strconv.ParseInt(it.val, 0, 64)\n\tif err != nil {\n\t\t// Distinguish integer values. Normally, it'd be a bug if the lexer\n\t\t// provides an invalid integer, but it's possible that the number is\n\t\t// out of range of valid values (which the lexer cannot determine).\n\t\t// So mark the former as a bug but the latter as a legitimate user\n\t\t// error.\n\t\tif e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange {\n\t\t\tp.panicErr(it, errParseRange{i: it.val, size: \"int64\"})\n\t\t} else {\n\t\t\tp.bug(\"Expected integer value, but got '%s'.\", it.val)\n\t\t}\n\t}\n\treturn num, p.typeOfPrimitive(it)\n}\n\nfunc (p *parser) valueFloat(it item) (any, tomlType) {\n\tparts := strings.FieldsFunc(it.val, func(r rune) bool {\n\t\tswitch r {\n\t\tcase '.', 'e', 'E':\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t})\n\tfor _, part := range parts {\n\t\tif !numUnderscoresOK(part) {\n\t\t\tp.panicItemf(it, \"Invalid float %q: underscores must be surrounded by digits\", it.val)\n\t\t}\n\t}\n\tif len(parts) > 0 && numHasLeadingZero(parts[0]) {\n\t\tp.panicItemf(it, \"Invalid float %q: cannot have leading zeroes\", it.val)\n\t}\n\tif !numPeriodsOK(it.val) {\n\t\t// As a special case, numbers like '123.' or '1.e2',\n\t\t// which are valid as far as Go/strconv are concerned,\n\t\t// must be rejected because TOML says that a fractional\n\t\t// part consists of '.' followed by 1+ digits.\n\t\tp.panicItemf(it, \"Invalid float %q: '.' must be followed by one or more digits\", it.val)\n\t}\n\tval := strings.Replace(it.val, \"_\", \"\", -1)\n\tsignbit := false\n\tif val == \"+nan\" || val == \"-nan\" {\n\t\tsignbit = val == \"-nan\"\n\t\tval = \"nan\"\n\t}\n\tnum, err := strconv.ParseFloat(val, 64)\n\tif err != nil {\n\t\tif e, ok := err.(*strconv.NumError); ok && e.Err == strconv.ErrRange {\n\t\t\tp.panicErr(it, errParseRange{i: it.val, size: \"float64\"})\n\t\t} else {\n\t\t\tp.panicItemf(it, \"Invalid float value: %q\", it.val)\n\t\t}\n\t}\n\tif signbit {\n\t\tnum = math.Copysign(num, -1)\n\t}\n\treturn num, p.typeOfPrimitive(it)\n}\n\nvar dtTypes = []struct {\n\tfmt  string\n\tzone *time.Location\n}{\n\t{time.RFC3339Nano, time.Local},\n\t{\"2006-01-02T15:04:05.999999999\", internal.LocalDatetime},\n\t{\"2006-01-02\", internal.LocalDate},\n\t{\"15:04:05.999999999\", internal.LocalTime},\n\t{\"2006-01-02T15:04Z07:00\", time.Local},\n\t{\"2006-01-02T15:04\", internal.LocalDatetime},\n\t{\"15:04\", internal.LocalTime},\n}\n\nfunc (p *parser) valueDatetime(it item) (any, tomlType) {\n\tit.val = datetimeRepl.Replace(it.val)\n\tvar (\n\t\tt   time.Time\n\t\tok  bool\n\t\terr error\n\t)\n\tfor _, dt := range dtTypes {\n\t\tt, err = time.ParseInLocation(dt.fmt, it.val, dt.zone)\n\t\tif err == nil {\n\t\t\tif missingLeadingZero(it.val, dt.fmt) {\n\t\t\t\tp.panicErr(it, errParseDate{it.val})\n\t\t\t}\n\t\t\tok = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !ok {\n\t\tp.panicErr(it, errParseDate{it.val})\n\t}\n\treturn t, p.typeOfPrimitive(it)\n}\n\n// Go's time.Parse() will accept numbers without a leading zero; there isn't any\n// way to require it. https://github.com/golang/go/issues/29911\n//\n// Depend on the fact that the separators (- and :) should always be at the same\n// location.\nfunc missingLeadingZero(d, l string) bool {\n\tfor i, c := range []byte(l) {\n\t\tif c == '.' || c == 'Z' {\n\t\t\treturn false\n\t\t}\n\t\tif (c < '0' || c > '9') && d[i] != c {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (p *parser) valueArray(it item) (any, tomlType) {\n\tp.setType(p.currentKey, tomlArray, it.pos)\n\n\tvar (\n\t\t// Initialize to a non-nil slice to make it consistent with how S = []\n\t\t// decodes into a non-nil slice inside something like struct { S\n\t\t// []string }. See #338\n\t\tarray = make([]any, 0, 2)\n\t)\n\tfor it = p.next(); it.typ != itemArrayEnd; it = p.next() {\n\t\tif it.typ == itemCommentStart {\n\t\t\tp.expect(itemText)\n\t\t\tcontinue\n\t\t}\n\n\t\tval, typ := p.value(it, true)\n\t\tarray = append(array, val)\n\n\t\t// XXX: type isn't used here, we need it to record the accurate type\n\t\t// information.\n\t\t//\n\t\t// Not entirely sure how to best store this; could use \"key[0]\",\n\t\t// \"key[1]\" notation, or maybe store it on the Array type?\n\t\t_ = typ\n\t}\n\treturn array, tomlArray\n}\n\nfunc (p *parser) valueInlineTable(it item, parentIsArray bool) (any, tomlType) {\n\tvar (\n\t\ttopHash      = make(map[string]any)\n\t\touterContext = p.context\n\t\touterKey     = p.currentKey\n\t)\n\n\tp.context = append(p.context, p.currentKey)\n\tprevContext := p.context\n\tp.currentKey = \"\"\n\n\tp.addImplicit(p.context)\n\tp.addContext(p.context, parentIsArray)\n\n\t/// Loop over all table key/value pairs.\n\tfor it := p.next(); it.typ != itemInlineTableEnd; it = p.next() {\n\t\tif it.typ == itemCommentStart {\n\t\t\tp.expect(itemText)\n\t\t\tcontinue\n\t\t}\n\n\t\t/// Read all key parts.\n\t\tk := p.nextPos()\n\t\tvar key Key\n\t\tfor ; k.typ != itemKeyEnd && k.typ != itemEOF; k = p.next() {\n\t\t\tkey = append(key, p.keyString(k))\n\t\t}\n\t\tp.assertEqual(itemKeyEnd, k.typ)\n\n\t\t/// The current key is the last part.\n\t\tp.currentKey = key.last()\n\n\t\t/// All the other parts (if any) are the context; need to set each part\n\t\t/// as implicit.\n\t\tcontext := key.parent()\n\t\tfor i := range context {\n\t\t\tp.addImplicitContext(append(p.context, context[i:i+1]...))\n\t\t}\n\t\tp.ordered = append(p.ordered, p.context.add(p.currentKey))\n\n\t\t/// Set the value.\n\t\tval, typ := p.value(p.next(), false)\n\t\tp.setValue(p.currentKey, val)\n\t\tp.setType(p.currentKey, typ, it.pos)\n\n\t\thash := topHash\n\t\tfor _, c := range context {\n\t\t\th, ok := hash[c]\n\t\t\tif !ok {\n\t\t\t\th = make(map[string]any)\n\t\t\t\thash[c] = h\n\t\t\t}\n\t\t\thash, ok = h.(map[string]any)\n\t\t\tif !ok {\n\t\t\t\tp.panicf(\"%q is not a table\", p.context)\n\t\t\t}\n\t\t}\n\t\thash[p.currentKey] = val\n\n\t\t/// Restore context.\n\t\tp.context = prevContext\n\t}\n\tp.context = outerContext\n\tp.currentKey = outerKey\n\treturn topHash, tomlHash\n}\n\n// numHasLeadingZero checks if this number has leading zeroes, allowing for '0',\n// +/- signs, and base prefixes.\nfunc numHasLeadingZero(s string) bool {\n\tif len(s) > 1 && s[0] == '0' && !(s[1] == 'b' || s[1] == 'o' || s[1] == 'x') { // Allow 0b, 0o, 0x\n\t\treturn true\n\t}\n\tif len(s) > 2 && (s[0] == '-' || s[0] == '+') && s[1] == '0' {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// numUnderscoresOK checks whether each underscore in s is surrounded by\n// characters that are not underscores.\nfunc numUnderscoresOK(s string) bool {\n\tswitch s {\n\tcase \"nan\", \"+nan\", \"-nan\", \"inf\", \"-inf\", \"+inf\":\n\t\treturn true\n\t}\n\taccept := false\n\tfor _, r := range s {\n\t\tif r == '_' {\n\t\t\tif !accept {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// isHex is a superset of all the permissible characters surrounding an\n\t\t// underscore.\n\t\taccept = isHex(r)\n\t}\n\treturn accept\n}\n\n// numPeriodsOK checks whether every period in s is followed by a digit.\nfunc numPeriodsOK(s string) bool {\n\tperiod := false\n\tfor _, r := range s {\n\t\tif period && !isDigit(r) {\n\t\t\treturn false\n\t\t}\n\t\tperiod = r == '.'\n\t}\n\treturn !period\n}\n\n// Set the current context of the parser, where the context is either a hash or\n// an array of hashes, depending on the value of the `array` parameter.\n//\n// Establishing the context also makes sure that the key isn't a duplicate, and\n// will create implicit hashes automatically.\nfunc (p *parser) addContext(key Key, array bool) {\n\t/// Always start at the top level and drill down for our context.\n\thashContext := p.mapping\n\tkeyContext := make(Key, 0, len(key)-1)\n\n\t/// We only need implicit hashes for the parents.\n\tfor _, k := range key.parent() {\n\t\t_, ok := hashContext[k]\n\t\tkeyContext = append(keyContext, k)\n\n\t\t// No key? Make an implicit hash and move on.\n\t\tif !ok {\n\t\t\tp.addImplicit(keyContext)\n\t\t\thashContext[k] = make(map[string]any)\n\t\t}\n\n\t\t// If the hash context is actually an array of tables, then set\n\t\t// the hash context to the last element in that array.\n\t\t//\n\t\t// Otherwise, it better be a table, since this MUST be a key group (by\n\t\t// virtue of it not being the last element in a key).\n\t\tswitch t := hashContext[k].(type) {\n\t\tcase []map[string]any:\n\t\t\thashContext = t[len(t)-1]\n\t\tcase map[string]any:\n\t\t\thashContext = t\n\t\tdefault:\n\t\t\tp.panicf(\"Key '%s' was already created as a hash.\", keyContext)\n\t\t}\n\t}\n\n\tp.context = keyContext\n\tif array {\n\t\t// If this is the first element for this array, then allocate a new\n\t\t// list of tables for it.\n\t\tk := key.last()\n\t\tif _, ok := hashContext[k]; !ok {\n\t\t\thashContext[k] = make([]map[string]any, 0, 4)\n\t\t}\n\n\t\t// Add a new table. But make sure the key hasn't already been used\n\t\t// for something else.\n\t\tif hash, ok := hashContext[k].([]map[string]any); ok {\n\t\t\thashContext[k] = append(hash, make(map[string]any))\n\t\t} else {\n\t\t\tp.panicf(\"Key '%s' was already created and cannot be used as an array.\", key)\n\t\t}\n\t} else {\n\t\tp.setValue(key.last(), make(map[string]any))\n\t}\n\tp.context = append(p.context, key.last())\n}\n\n// setValue sets the given key to the given value in the current context.\n// It will make sure that the key hasn't already been defined, account for\n// implicit key groups.\nfunc (p *parser) setValue(key string, value any) {\n\tvar (\n\t\ttmpHash    any\n\t\tok         bool\n\t\thash       = p.mapping\n\t\tkeyContext = make(Key, 0, len(p.context)+1)\n\t)\n\tfor _, k := range p.context {\n\t\tkeyContext = append(keyContext, k)\n\t\tif tmpHash, ok = hash[k]; !ok {\n\t\t\tp.bug(\"Context for key '%s' has not been established.\", keyContext)\n\t\t}\n\t\tswitch t := tmpHash.(type) {\n\t\tcase []map[string]any:\n\t\t\t// The context is a table of hashes. Pick the most recent table\n\t\t\t// defined as the current hash.\n\t\t\thash = t[len(t)-1]\n\t\tcase map[string]any:\n\t\t\thash = t\n\t\tdefault:\n\t\t\tp.panicf(\"Key '%s' has already been defined.\", keyContext)\n\t\t}\n\t}\n\tkeyContext = append(keyContext, key)\n\n\tif _, ok := hash[key]; ok {\n\t\t// Normally redefining keys isn't allowed, but the key could have been\n\t\t// defined implicitly and it's allowed to be redefined concretely. (See\n\t\t// the `valid/implicit-and-explicit-after.toml` in toml-test)\n\t\t//\n\t\t// But we have to make sure to stop marking it as an implicit. (So that\n\t\t// another redefinition provokes an error.)\n\t\t//\n\t\t// Note that since it has already been defined (as a hash), we don't\n\t\t// want to overwrite it. So our business is done.\n\t\tif p.isArray(keyContext) {\n\t\t\tif !p.isImplicit(keyContext) {\n\t\t\t\tif _, ok := hash[key]; ok {\n\t\t\t\t\tp.panicf(\"Key '%s' has already been defined.\", keyContext)\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.removeImplicit(keyContext)\n\t\t\thash[key] = value\n\t\t\treturn\n\t\t}\n\t\tif p.isImplicit(keyContext) {\n\t\t\tp.removeImplicit(keyContext)\n\t\t\treturn\n\t\t}\n\t\t// Otherwise, we have a concrete key trying to override a previous key,\n\t\t// which is *always* wrong.\n\t\tp.panicf(\"Key '%s' has already been defined.\", keyContext)\n\t}\n\n\thash[key] = value\n}\n\n// setType sets the type of a particular value at a given key. It should be\n// called immediately AFTER setValue.\n//\n// Note that if `key` is empty, then the type given will be applied to the\n// current context (which is either a table or an array of tables).\nfunc (p *parser) setType(key string, typ tomlType, pos Position) {\n\tkeyContext := make(Key, 0, len(p.context)+1)\n\tkeyContext = append(keyContext, p.context...)\n\tif len(key) > 0 { // allow type setting for hashes\n\t\tkeyContext = append(keyContext, key)\n\t}\n\t// Special case to make empty keys (\"\" = 1) work.\n\t// Without it it will set \"\" rather than `\"\"`.\n\t// TODO: why is this needed? And why is this only needed here?\n\tif len(keyContext) == 0 {\n\t\tkeyContext = Key{\"\"}\n\t}\n\tp.keyInfo[keyContext.String()] = keyInfo{tomlType: typ, pos: pos}\n}\n\n// Implicit keys need to be created when tables are implied in \"a.b.c.d = 1\" and\n// \"[a.b.c]\" (the \"a\", \"b\", and \"c\" hashes are never created explicitly).\nfunc (p *parser) addImplicit(key Key)        { p.implicits[key.String()] = struct{}{} }\nfunc (p *parser) removeImplicit(key Key)     { delete(p.implicits, key.String()) }\nfunc (p *parser) isImplicit(key Key) bool    { _, ok := p.implicits[key.String()]; return ok }\nfunc (p *parser) isArray(key Key) bool       { return p.keyInfo[key.String()].tomlType == tomlArray }\nfunc (p *parser) addImplicitContext(key Key) { p.addImplicit(key); p.addContext(key, false) }\n\n// current returns the full key name of the current context.\nfunc (p *parser) current() string {\n\tif len(p.currentKey) == 0 {\n\t\treturn p.context.String()\n\t}\n\tif len(p.context) == 0 {\n\t\treturn p.currentKey\n\t}\n\treturn fmt.Sprintf(\"%s.%s\", p.context, p.currentKey)\n}\n\nfunc stripFirstNewline(s string) string {\n\tif len(s) > 0 && s[0] == '\\n' {\n\t\treturn s[1:]\n\t}\n\tif len(s) > 1 && s[0] == '\\r' && s[1] == '\\n' {\n\t\treturn s[2:]\n\t}\n\treturn s\n}\n\n// stripEscapedNewlines removes whitespace after line-ending backslashes in\n// multiline strings.\n//\n// A line-ending backslash is an unescaped \\ followed only by whitespace until\n// the next newline. After a line-ending backslash, all whitespace is removed\n// until the next non-whitespace character.\nfunc (p *parser) stripEscapedNewlines(s string) string {\n\tvar (\n\t\tb strings.Builder\n\t\ti int\n\t)\n\tb.Grow(len(s))\n\tfor {\n\t\tix := strings.Index(s[i:], `\\`)\n\t\tif ix < 0 {\n\t\t\tb.WriteString(s)\n\t\t\treturn b.String()\n\t\t}\n\t\ti += ix\n\n\t\tif len(s) > i+1 && s[i+1] == '\\\\' {\n\t\t\t// Escaped backslash.\n\t\t\ti += 2\n\t\t\tcontinue\n\t\t}\n\t\t// Scan until the next non-whitespace.\n\t\tj := i + 1\n\twhitespaceLoop:\n\t\tfor ; j < len(s); j++ {\n\t\t\tswitch s[j] {\n\t\t\tcase ' ', '\\t', '\\r', '\\n':\n\t\t\tdefault:\n\t\t\t\tbreak whitespaceLoop\n\t\t\t}\n\t\t}\n\t\tif j == i+1 {\n\t\t\t// Not a whitespace escape.\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\tif !strings.Contains(s[i:j], \"\\n\") {\n\t\t\t// This is not a line-ending backslash. (It's a bad escape sequence,\n\t\t\t// but we can let replaceEscapes catch it.)\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\tb.WriteString(s[:i])\n\t\ts = s[j:]\n\t\ti = 0\n\t}\n}\n\nfunc (p *parser) replaceEscapes(it item, str string) string {\n\tvar (\n\t\tb    strings.Builder\n\t\tskip = 0\n\t)\n\tb.Grow(len(str))\n\tfor i, c := range str {\n\t\tif skip > 0 {\n\t\t\tskip--\n\t\t\tcontinue\n\t\t}\n\t\tif c != '\\\\' {\n\t\t\tb.WriteRune(c)\n\t\t\tcontinue\n\t\t}\n\n\t\tif i >= len(str) {\n\t\t\tp.bug(\"Escape sequence at end of string.\")\n\t\t\treturn \"\"\n\t\t}\n\t\tswitch str[i+1] {\n\t\tdefault:\n\t\t\tp.bug(\"Expected valid escape code after \\\\, but got %q.\", str[i+1])\n\t\tcase ' ', '\\t':\n\t\t\tp.panicItemf(it, \"invalid escape: '\\\\%c'\", str[i+1])\n\t\tcase 'b':\n\t\t\tb.WriteByte(0x08)\n\t\t\tskip = 1\n\t\tcase 't':\n\t\t\tb.WriteByte(0x09)\n\t\t\tskip = 1\n\t\tcase 'n':\n\t\t\tb.WriteByte(0x0a)\n\t\t\tskip = 1\n\t\tcase 'f':\n\t\t\tb.WriteByte(0x0c)\n\t\t\tskip = 1\n\t\tcase 'r':\n\t\t\tb.WriteByte(0x0d)\n\t\t\tskip = 1\n\t\tcase 'e':\n\t\t\tb.WriteByte(0x1b)\n\t\t\tskip = 1\n\t\tcase '\"':\n\t\t\tb.WriteByte(0x22)\n\t\t\tskip = 1\n\t\tcase '\\\\':\n\t\t\tb.WriteByte(0x5c)\n\t\t\tskip = 1\n\t\t// The lexer guarantees the correct number of characters are present;\n\t\t// don't need to check here.\n\t\tcase 'x':\n\t\t\tescaped := p.asciiEscapeToUnicode(it, str[i+2:i+4])\n\t\t\tb.WriteRune(escaped)\n\t\t\tskip = 3\n\t\tcase 'u':\n\t\t\tescaped := p.asciiEscapeToUnicode(it, str[i+2:i+6])\n\t\t\tb.WriteRune(escaped)\n\t\t\tskip = 5\n\t\tcase 'U':\n\t\t\tescaped := p.asciiEscapeToUnicode(it, str[i+2:i+10])\n\t\t\tb.WriteRune(escaped)\n\t\t\tskip = 9\n\t\t}\n\t}\n\treturn b.String()\n}\n\nfunc (p *parser) asciiEscapeToUnicode(it item, s string) rune {\n\thex, err := strconv.ParseUint(strings.ToLower(s), 16, 32)\n\tif err != nil {\n\t\tp.bug(\"Could not parse '%s' as a hexadecimal number, but the lexer claims it's OK: %s\", s, err)\n\t}\n\tif !utf8.ValidRune(rune(hex)) {\n\t\tp.panicItemf(it, \"Escaped character '\\\\u%s' is not valid UTF-8.\", s)\n\t}\n\treturn rune(hex)\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/type_fields.go",
    "content": "package toml\n\n// Struct field handling is adapted from code in encoding/json:\n//\n// Copyright 2010 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the Go distribution.\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\t\"sync\"\n)\n\n// A field represents a single field found in a struct.\ntype field struct {\n\tname  string       // the name of the field (`toml` tag included)\n\ttag   bool         // whether field has a `toml` tag\n\tindex []int        // represents the depth of an anonymous field\n\ttyp   reflect.Type // the type of the field\n}\n\n// byName sorts field by name, breaking ties with depth,\n// then breaking ties with \"name came from toml tag\", then\n// breaking ties with index sequence.\ntype byName []field\n\nfunc (x byName) Len() int      { return len(x) }\nfunc (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }\nfunc (x byName) Less(i, j int) bool {\n\tif x[i].name != x[j].name {\n\t\treturn x[i].name < x[j].name\n\t}\n\tif len(x[i].index) != len(x[j].index) {\n\t\treturn len(x[i].index) < len(x[j].index)\n\t}\n\tif x[i].tag != x[j].tag {\n\t\treturn x[i].tag\n\t}\n\treturn byIndex(x).Less(i, j)\n}\n\n// byIndex sorts field by index sequence.\ntype byIndex []field\n\nfunc (x byIndex) Len() int      { return len(x) }\nfunc (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }\nfunc (x byIndex) Less(i, j int) bool {\n\tfor k, xik := range x[i].index {\n\t\tif k >= len(x[j].index) {\n\t\t\treturn false\n\t\t}\n\t\tif xik != x[j].index[k] {\n\t\t\treturn xik < x[j].index[k]\n\t\t}\n\t}\n\treturn len(x[i].index) < len(x[j].index)\n}\n\n// typeFields returns a list of fields that TOML should recognize for the given\n// type. The algorithm is breadth-first search over the set of structs to\n// include - the top struct and then any reachable anonymous structs.\nfunc typeFields(t reflect.Type) []field {\n\t// Anonymous fields to explore at the current level and the next.\n\tcurrent := []field{}\n\tnext := []field{{typ: t}}\n\n\t// Count of queued names for current level and the next.\n\tvar count map[reflect.Type]int\n\tvar nextCount map[reflect.Type]int\n\n\t// Types already visited at an earlier level.\n\tvisited := map[reflect.Type]bool{}\n\n\t// Fields found.\n\tvar fields []field\n\n\tfor len(next) > 0 {\n\t\tcurrent, next = next, current[:0]\n\t\tcount, nextCount = nextCount, map[reflect.Type]int{}\n\n\t\tfor _, f := range current {\n\t\t\tif visited[f.typ] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvisited[f.typ] = true\n\n\t\t\t// Scan f.typ for fields to include.\n\t\t\tfor i := 0; i < f.typ.NumField(); i++ {\n\t\t\t\tsf := f.typ.Field(i)\n\t\t\t\tif sf.PkgPath != \"\" && !sf.Anonymous { // unexported\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\topts := getOptions(sf.Tag)\n\t\t\t\tif opts.skip {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tindex := make([]int, len(f.index)+1)\n\t\t\t\tcopy(index, f.index)\n\t\t\t\tindex[len(f.index)] = i\n\n\t\t\t\tft := sf.Type\n\t\t\t\tif ft.Name() == \"\" && ft.Kind() == reflect.Ptr {\n\t\t\t\t\t// Follow pointer.\n\t\t\t\t\tft = ft.Elem()\n\t\t\t\t}\n\n\t\t\t\t// Record found field and index sequence.\n\t\t\t\tif opts.name != \"\" || !sf.Anonymous || ft.Kind() != reflect.Struct {\n\t\t\t\t\ttagged := opts.name != \"\"\n\t\t\t\t\tname := opts.name\n\t\t\t\t\tif name == \"\" {\n\t\t\t\t\t\tname = sf.Name\n\t\t\t\t\t}\n\t\t\t\t\tfields = append(fields, field{name, tagged, index, ft})\n\t\t\t\t\tif count[f.typ] > 1 {\n\t\t\t\t\t\t// If there were multiple instances, add a second,\n\t\t\t\t\t\t// so that the annihilation code will see a duplicate.\n\t\t\t\t\t\t// It only cares about the distinction between 1 or 2,\n\t\t\t\t\t\t// so don't bother generating any more copies.\n\t\t\t\t\t\tfields = append(fields, fields[len(fields)-1])\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Record new anonymous struct to explore in next round.\n\t\t\t\tnextCount[ft]++\n\t\t\t\tif nextCount[ft] == 1 {\n\t\t\t\t\tf := field{name: ft.Name(), index: index, typ: ft}\n\t\t\t\t\tnext = append(next, f)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsort.Sort(byName(fields))\n\n\t// Delete all fields that are hidden by the Go rules for embedded fields,\n\t// except that fields with TOML tags are promoted.\n\n\t// The fields are sorted in primary order of name, secondary order\n\t// of field index length. Loop over names; for each name, delete\n\t// hidden fields by choosing the one dominant field that survives.\n\tout := fields[:0]\n\tfor advance, i := 0, 0; i < len(fields); i += advance {\n\t\t// One iteration per name.\n\t\t// Find the sequence of fields with the name of this first field.\n\t\tfi := fields[i]\n\t\tname := fi.name\n\t\tfor advance = 1; i+advance < len(fields); advance++ {\n\t\t\tfj := fields[i+advance]\n\t\t\tif fj.name != name {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif advance == 1 { // Only one field with this name\n\t\t\tout = append(out, fi)\n\t\t\tcontinue\n\t\t}\n\t\tdominant, ok := dominantField(fields[i : i+advance])\n\t\tif ok {\n\t\t\tout = append(out, dominant)\n\t\t}\n\t}\n\n\tfields = out\n\tsort.Sort(byIndex(fields))\n\n\treturn fields\n}\n\n// dominantField looks through the fields, all of which are known to\n// have the same name, to find the single field that dominates the\n// others using Go's embedding rules, modified by the presence of\n// TOML tags. If there are multiple top-level fields, the boolean\n// will be false: This condition is an error in Go and we skip all\n// the fields.\nfunc dominantField(fields []field) (field, bool) {\n\t// The fields are sorted in increasing index-length order. The winner\n\t// must therefore be one with the shortest index length. Drop all\n\t// longer entries, which is easy: just truncate the slice.\n\tlength := len(fields[0].index)\n\ttagged := -1 // Index of first tagged field.\n\tfor i, f := range fields {\n\t\tif len(f.index) > length {\n\t\t\tfields = fields[:i]\n\t\t\tbreak\n\t\t}\n\t\tif f.tag {\n\t\t\tif tagged >= 0 {\n\t\t\t\t// Multiple tagged fields at the same level: conflict.\n\t\t\t\t// Return no field.\n\t\t\t\treturn field{}, false\n\t\t\t}\n\t\t\ttagged = i\n\t\t}\n\t}\n\tif tagged >= 0 {\n\t\treturn fields[tagged], true\n\t}\n\t// All remaining fields have the same length. If there's more than one,\n\t// we have a conflict (two fields named \"X\" at the same level) and we\n\t// return no field.\n\tif len(fields) > 1 {\n\t\treturn field{}, false\n\t}\n\treturn fields[0], true\n}\n\nvar fieldCache struct {\n\tsync.RWMutex\n\tm map[reflect.Type][]field\n}\n\n// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.\nfunc cachedTypeFields(t reflect.Type) []field {\n\tfieldCache.RLock()\n\tf := fieldCache.m[t]\n\tfieldCache.RUnlock()\n\tif f != nil {\n\t\treturn f\n\t}\n\n\t// Compute fields without lock.\n\t// Might duplicate effort but won't hold other computations back.\n\tf = typeFields(t)\n\tif f == nil {\n\t\tf = []field{}\n\t}\n\n\tfieldCache.Lock()\n\tif fieldCache.m == nil {\n\t\tfieldCache.m = map[reflect.Type][]field{}\n\t}\n\tfieldCache.m[t] = f\n\tfieldCache.Unlock()\n\treturn f\n}\n"
  },
  {
    "path": "vendor/github.com/BurntSushi/toml/type_toml.go",
    "content": "package toml\n\n// tomlType represents any Go type that corresponds to a TOML type.\n// While the first draft of the TOML spec has a simplistic type system that\n// probably doesn't need this level of sophistication, we seem to be militating\n// toward adding real composite types.\ntype tomlType interface {\n\ttypeString() string\n}\n\n// typeEqual accepts any two types and returns true if they are equal.\nfunc typeEqual(t1, t2 tomlType) bool {\n\tif t1 == nil || t2 == nil {\n\t\treturn false\n\t}\n\treturn t1.typeString() == t2.typeString()\n}\n\nfunc typeIsTable(t tomlType) bool {\n\treturn typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash)\n}\n\ntype tomlBaseType string\n\nfunc (btype tomlBaseType) typeString() string { return string(btype) }\nfunc (btype tomlBaseType) String() string     { return btype.typeString() }\n\nvar (\n\ttomlInteger   tomlBaseType = \"Integer\"\n\ttomlFloat     tomlBaseType = \"Float\"\n\ttomlDatetime  tomlBaseType = \"Datetime\"\n\ttomlString    tomlBaseType = \"String\"\n\ttomlBool      tomlBaseType = \"Bool\"\n\ttomlArray     tomlBaseType = \"Array\"\n\ttomlHash      tomlBaseType = \"Hash\"\n\ttomlArrayHash tomlBaseType = \"ArrayHash\"\n)\n\n// typeOfPrimitive returns a tomlType of any primitive value in TOML.\n// Primitive values are: Integer, Float, Datetime, String and Bool.\n//\n// Passing a lexer item other than the following will cause a BUG message\n// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime.\nfunc (p *parser) typeOfPrimitive(lexItem item) tomlType {\n\tswitch lexItem.typ {\n\tcase itemInteger:\n\t\treturn tomlInteger\n\tcase itemFloat:\n\t\treturn tomlFloat\n\tcase itemDatetime:\n\t\treturn tomlDatetime\n\tcase itemString, itemStringEsc:\n\t\treturn tomlString\n\tcase itemMultilineString:\n\t\treturn tomlString\n\tcase itemRawString:\n\t\treturn tomlString\n\tcase itemRawMultilineString:\n\t\treturn tomlString\n\tcase itemBool:\n\t\treturn tomlBool\n\t}\n\tp.bug(\"Cannot infer primitive type of lex item '%s'.\", lexItem)\n\tpanic(\"unreachable\")\n}\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/.gitignore",
    "content": "_fuzz/"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/.golangci.yml",
    "content": "run:\n  deadline: 2m\n\nlinters:\n  disable-all: true\n  enable:\n    - misspell\n    - govet\n    - staticcheck\n    - errcheck\n    - unparam\n    - ineffassign\n    - nakedret\n    - gocyclo\n    - dupl\n    - goimports\n    - revive\n    - gosec\n    - gosimple\n    - typecheck\n    - unused\n\nlinters-settings:\n  gofmt:\n    simplify: true\n  dupl:\n    threshold: 600\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/CHANGELOG.md",
    "content": "# Changelog\n\n## 3.4.0 (2025-06-27)\n\n### Added\n\n- #268: Added property to Constraints to include prereleases for Check and Validate\n\n### Changed\n\n- #263: Updated Go testing for 1.24, 1.23, and 1.22\n- #269: Updated the error message handling for message case and wrapping errors\n- #266: Restore the ability to have leading 0's when parsing with NewVersion.\n  Opt-out of this by setting CoerceNewVersion to false.\n\n### Fixed\n\n- #257: Fixed the CodeQL link (thanks @dmitris)\n- #262: Restored detailed errors when failed to parse with NewVersion. Opt-out\n  of this by setting DetailedNewVersionErrors to false for faster performance.\n- #267: Handle pre-releases for an \"and\" group if one constraint includes them\n\n## 3.3.1 (2024-11-19)\n\n### Fixed\n\n- #253: Fix for allowing some version that were invalid\n\n## 3.3.0 (2024-08-27)\n\n### Added\n\n- #238: Add LessThanEqual and GreaterThanEqual functions (thanks @grosser)\n- #213: nil version equality checking (thanks @KnutZuidema)\n\n### Changed\n\n- #241: Simplify StrictNewVersion parsing (thanks @grosser)\n- Testing support up through Go 1.23\n- Minimum version set to 1.21 as this is what's tested now\n- Fuzz testing now supports caching\n\n## 3.2.1 (2023-04-10)\n\n### Changed\n\n- #198: Improved testing around pre-release names\n- #200: Improved code scanning with addition of CodeQL\n- #201: Testing now includes Go 1.20. Go 1.17 has been dropped\n- #202: Migrated Fuzz testing to Go built-in Fuzzing. CI runs daily\n- #203: Docs updated for security details\n\n### Fixed\n\n- #199: Fixed issue with range transformations\n\n## 3.2.0 (2022-11-28)\n\n### Added\n\n- #190: Added text marshaling and unmarshaling\n- #167: Added JSON marshalling for constraints (thanks @SimonTheLeg)\n- #173: Implement encoding.TextMarshaler and encoding.TextUnmarshaler on Version (thanks @MarkRosemaker)\n- #179: Added New() version constructor (thanks @kazhuravlev)\n\n### Changed\n\n- #182/#183: Updated CI testing setup\n\n### Fixed\n\n- #186: Fixing issue where validation of constraint section gave false positives\n- #176: Fix constraints check with *-0 (thanks @mtt0)\n- #181: Fixed Caret operator (^) gives unexpected results when the minor version in constraint is 0 (thanks @arshchimni)\n- #161: Fixed godoc (thanks @afirth)\n\n## 3.1.1 (2020-11-23)\n\n### Fixed\n\n- #158: Fixed issue with generated regex operation order that could cause problem\n\n## 3.1.0 (2020-04-15)\n\n### Added\n\n- #131: Add support for serializing/deserializing SQL (thanks @ryancurrah)\n\n### Changed\n\n- #148: More accurate validation messages on constraints\n\n## 3.0.3 (2019-12-13)\n\n### Fixed\n\n- #141: Fixed issue with <= comparison\n\n## 3.0.2 (2019-11-14)\n\n### Fixed\n\n- #134: Fixed broken constraint checking with ^0.0 (thanks @krmichelos)\n\n## 3.0.1 (2019-09-13)\n\n### Fixed\n\n- #125: Fixes issue with module path for v3\n\n## 3.0.0 (2019-09-12)\n\nThis is a major release of the semver package which includes API changes. The Go\nAPI is compatible with ^1. The Go API was not changed because many people are using\n`go get` without Go modules for their applications and API breaking changes cause\nerrors which we have or would need to support.\n\nThe changes in this release are the handling based on the data passed into the\nfunctions. These are described in the added and changed sections below.\n\n### Added\n\n- StrictNewVersion function. This is similar to NewVersion but will return an\n  error if the version passed in is not a strict semantic version. For example,\n  1.2.3 would pass but v1.2.3 or 1.2 would fail because they are not strictly\n  speaking semantic versions. This function is faster, performs fewer operations,\n  and uses fewer allocations than NewVersion.\n- Fuzzing has been performed on NewVersion, StrictNewVersion, and NewConstraint.\n  The Makefile contains the operations used. For more information on you can start\n  on Wikipedia at https://en.wikipedia.org/wiki/Fuzzing\n- Now using Go modules\n\n### Changed\n\n- NewVersion has proper prerelease and metadata validation with error messages\n  to signal an issue with either of them\n- ^ now operates using a similar set of rules to npm/js and Rust/Cargo. If the\n  version is >=1 the ^ ranges works the same as v1. For major versions of 0 the\n  rules have changed. The minor version is treated as the stable version unless\n  a patch is specified and then it is equivalent to =. One difference from npm/js\n  is that prereleases there are only to a specific version (e.g. 1.2.3).\n  Prereleases here look over multiple versions and follow semantic version\n  ordering rules. This pattern now follows along with the expected and requested\n  handling of this packaged by numerous users.\n\n## 1.5.0 (2019-09-11)\n\n### Added\n\n- #103: Add basic fuzzing for `NewVersion()` (thanks @jesse-c)\n\n### Changed\n\n- #82: Clarify wildcard meaning in range constraints and update tests for it (thanks @greysteil)\n- #83: Clarify caret operator range for pre-1.0.0 dependencies (thanks @greysteil)\n- #72: Adding docs comment pointing to vert for a cli\n- #71: Update the docs on pre-release comparator handling\n- #89: Test with new go versions (thanks @thedevsaddam)\n- #87: Added $ to ValidPrerelease for better validation (thanks @jeremycarroll)\n\n### Fixed\n\n- #78: Fix unchecked error in example code (thanks @ravron)\n- #70: Fix the handling of pre-releases and the 0.0.0 release edge case\n- #97: Fixed copyright file for proper display on GitHub\n- #107: Fix handling prerelease when sorting alphanum and num\n- #109: Fixed where Validate sometimes returns wrong message on error\n\n## 1.4.2 (2018-04-10)\n\n### Changed\n\n- #72: Updated the docs to point to vert for a console appliaction\n- #71: Update the docs on pre-release comparator handling\n\n### Fixed\n\n- #70: Fix the handling of pre-releases and the 0.0.0 release edge case\n\n## 1.4.1 (2018-04-02)\n\n### Fixed\n\n- Fixed #64: Fix pre-release precedence issue (thanks @uudashr)\n\n## 1.4.0 (2017-10-04)\n\n### Changed\n\n- #61: Update NewVersion to parse ints with a 64bit int size (thanks @zknill)\n\n## 1.3.1 (2017-07-10)\n\n### Fixed\n\n- Fixed #57: number comparisons in prerelease sometimes inaccurate\n\n## 1.3.0 (2017-05-02)\n\n### Added\n\n- #45: Added json (un)marshaling support (thanks @mh-cbon)\n- Stability marker. See https://masterminds.github.io/stability/\n\n### Fixed\n\n- #51: Fix handling of single digit tilde constraint (thanks @dgodd)\n\n### Changed\n\n- #55: The godoc icon moved from png to svg\n\n## 1.2.3 (2017-04-03)\n\n### Fixed\n\n- #46: Fixed 0.x.x and 0.0.x in constraints being treated as *\n\n## Release 1.2.2 (2016-12-13)\n\n### Fixed\n\n- #34: Fixed issue where hyphen range was not working with pre-release parsing.\n\n## Release 1.2.1 (2016-11-28)\n\n### Fixed\n\n- #24: Fixed edge case issue where constraint \"> 0\" does not handle \"0.0.1-alpha\"\n  properly.\n\n## Release 1.2.0 (2016-11-04)\n\n### Added\n\n- #20: Added MustParse function for versions (thanks @adamreese)\n- #15: Added increment methods on versions (thanks @mh-cbon)\n\n### Fixed\n\n- Issue #21: Per the SemVer spec (section 9) a pre-release is unstable and\n  might not satisfy the intended compatibility. The change here ignores pre-releases\n  on constraint checks (e.g., ~ or ^) when a pre-release is not part of the\n  constraint. For example, `^1.2.3` will ignore pre-releases while\n  `^1.2.3-alpha` will include them.\n\n## Release 1.1.1 (2016-06-30)\n\n### Changed\n\n- Issue #9: Speed up version comparison performance (thanks @sdboyer)\n- Issue #8: Added benchmarks (thanks @sdboyer)\n- Updated Go Report Card URL to new location\n- Updated Readme to add code snippet formatting (thanks @mh-cbon)\n- Updating tagging to v[SemVer] structure for compatibility with other tools.\n\n## Release 1.1.0 (2016-03-11)\n\n- Issue #2: Implemented validation to provide reasons a versions failed a\n  constraint.\n\n## Release 1.0.1 (2015-12-31)\n\n- Fixed #1: * constraint failing on valid versions.\n\n## Release 1.0.0 (2015-10-20)\n\n- Initial release\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/LICENSE.txt",
    "content": "Copyright (C) 2014-2019, Matt Butcher and Matt Farina\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\nall copies 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\nTHE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/Makefile",
    "content": "GOPATH=$(shell go env GOPATH)\nGOLANGCI_LINT=$(GOPATH)/bin/golangci-lint\n\n.PHONY: lint\nlint: $(GOLANGCI_LINT)\n\t@echo \"==> Linting codebase\"\n\t@$(GOLANGCI_LINT) run\n\n.PHONY: test\ntest:\n\t@echo \"==> Running tests\"\n\tGO111MODULE=on go test -v\n\n.PHONY: test-cover\ntest-cover:\n\t@echo \"==> Running Tests with coverage\"\n\tGO111MODULE=on go test -cover .\n\n.PHONY: fuzz\nfuzz:\n\t@echo \"==> Running Fuzz Tests\"\n\tgo env GOCACHE\n\tgo test -fuzz=FuzzNewVersion -fuzztime=15s .\n\tgo test -fuzz=FuzzStrictNewVersion -fuzztime=15s .\n\tgo test -fuzz=FuzzNewConstraint -fuzztime=15s .\n\n$(GOLANGCI_LINT):\n\t# Install golangci-lint. The configuration for it is in the .golangci.yml\n\t# file in the root of the repository\n\techo ${GOPATH}\n\tcurl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.56.2\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/README.md",
    "content": "# SemVer\n\nThe `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifically it provides the ability to:\n\n* Parse semantic versions\n* Sort semantic versions\n* Check if a semantic version fits within a set of constraints\n* Optionally work with a `v` prefix\n\n[![Stability:\nActive](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html)\n[![](https://github.com/Masterminds/semver/workflows/Tests/badge.svg)](https://github.com/Masterminds/semver/actions)\n[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/semver/v3)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver)\n\n## Package Versions\n\nNote, import `github.com/Masterminds/semver/v3` to use the latest version.\n\nThere are three major versions fo the `semver` package.\n\n* 3.x.x is the stable and active version. This version is focused on constraint\n  compatibility for range handling in other tools from other languages. It has\n  a similar API to the v1 releases. The development of this version is on the master\n  branch. The documentation for this version is below.\n* 2.x was developed primarily for [dep](https://github.com/golang/dep). There are\n  no tagged releases and the development was performed by [@sdboyer](https://github.com/sdboyer).\n  There are API breaking changes from v1. This version lives on the [2.x branch](https://github.com/Masterminds/semver/tree/2.x).\n* 1.x.x is the original release. It is no longer maintained. You should use the\n  v3 release instead. You can read the documentation for the 1.x.x release\n  [here](https://github.com/Masterminds/semver/blob/release-1/README.md).\n\n## Parsing Semantic Versions\n\nThere are two functions that can parse semantic versions. The `StrictNewVersion`\nfunction only parses valid version 2 semantic versions as outlined in the\nspecification. The `NewVersion` function attempts to coerce a version into a\nsemantic version and parse it. For example, if there is a leading v or a version\nlisted without all 3 parts (e.g. `v1.2`) it will attempt to coerce it into a valid\nsemantic version (e.g., 1.2.0). In both cases a `Version` object is returned\nthat can be sorted, compared, and used in constraints.\n\nWhen parsing a version an error is returned if there is an issue parsing the\nversion. For example,\n\n    v, err := semver.NewVersion(\"1.2.3-beta.1+build345\")\n\nThe version object has methods to get the parts of the version, compare it to\nother versions, convert the version back into a string, and get the original\nstring. Getting the original string is useful if the semantic version was coerced\ninto a valid form.\n\nThere are package level variables that affect how `NewVersion` handles parsing.\n\n- `CoerceNewVersion` is `true` by default. When set to `true` it coerces non-compliant\n  versions into SemVer. For example, allowing a leading 0 in a major, minor, or patch\n  part. This enables the use of CalVer in versions even when not compliant with SemVer.\n  When set to `false` less coercion work is done.\n- `DetailedNewVersionErrors` provides more detailed errors. It only has an affect when\n  `CoerceNewVersion` is set to `false`. When `DetailedNewVersionErrors` is set to `true`\n  it can provide some more insight into why a version is invalid. Setting\n  `DetailedNewVersionErrors` to `false` is faster on performance but provides less\n  detailed error messages if a version fails to parse.\n\n## Sorting Semantic Versions\n\nA set of versions can be sorted using the `sort` package from the standard library.\nFor example,\n\n```go\nraw := []string{\"1.2.3\", \"1.0\", \"1.3\", \"2\", \"0.4.2\",}\nvs := make([]*semver.Version, len(raw))\nfor i, r := range raw {\n    v, err := semver.NewVersion(r)\n    if err != nil {\n        t.Errorf(\"Error parsing version: %s\", err)\n    }\n\n    vs[i] = v\n}\n\nsort.Sort(semver.Collection(vs))\n```\n\n## Checking Version Constraints\n\nThere are two methods for comparing versions. One uses comparison methods on\n`Version` instances and the other uses `Constraints`. There are some important\ndifferences to notes between these two methods of comparison.\n\n1. When two versions are compared using functions such as `Compare`, `LessThan`,\n   and others it will follow the specification and always include pre-releases\n   within the comparison. It will provide an answer that is valid with the\n   comparison section of the spec at https://semver.org/#spec-item-11\n2. When constraint checking is used for checks or validation it will follow a\n   different set of rules that are common for ranges with tools like npm/js\n   and Rust/Cargo. This includes considering pre-releases to be invalid if the\n   ranges does not include one. If you want to have it include pre-releases a\n   simple solution is to include `-0` in your range.\n3. Constraint ranges can have some complex rules including the shorthand use of\n   ~ and ^. For more details on those see the options below.\n\nThere are differences between the two methods or checking versions because the\ncomparison methods on `Version` follow the specification while comparison ranges\nare not part of the specification. Different packages and tools have taken it\nupon themselves to come up with range rules. This has resulted in differences.\nFor example, npm/js and Cargo/Rust follow similar patterns while PHP has a\ndifferent pattern for ^. The comparison features in this package follow the\nnpm/js and Cargo/Rust lead because applications using it have followed similar\npatters with their versions.\n\nChecking a version against version constraints is one of the most featureful\nparts of the package.\n\n```go\nc, err := semver.NewConstraint(\">= 1.2.3\")\nif err != nil {\n    // Handle constraint not being parsable.\n}\n\nv, err := semver.NewVersion(\"1.3\")\nif err != nil {\n    // Handle version not being parsable.\n}\n// Check if the version meets the constraints. The variable a will be true.\na := c.Check(v)\n```\n\n### Basic Comparisons\n\nThere are two elements to the comparisons. First, a comparison string is a list\nof space or comma separated AND comparisons. These are then separated by || (OR)\ncomparisons. For example, `\">= 1.2 < 3.0.0 || >= 4.2.3\"` is looking for a\ncomparison that's greater than or equal to 1.2 and less than 3.0.0 or is\ngreater than or equal to 4.2.3.\n\nThe basic comparisons are:\n\n* `=`: equal (aliased to no operator)\n* `!=`: not equal\n* `>`: greater than\n* `<`: less than\n* `>=`: greater than or equal to\n* `<=`: less than or equal to\n\n### Working With Prerelease Versions\n\nPre-releases, for those not familiar with them, are used for software releases\nprior to stable or generally available releases. Examples of pre-releases include\ndevelopment, alpha, beta, and release candidate releases. A pre-release may be\na version such as `1.2.3-beta.1` while the stable release would be `1.2.3`. In the\norder of precedence, pre-releases come before their associated releases. In this\nexample `1.2.3-beta.1 < 1.2.3`.\n\nAccording to the Semantic Version specification, pre-releases may not be\nAPI compliant with their release counterpart. It says,\n\n> A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.\n\nSemVer's comparisons using constraints without a pre-release comparator will skip\npre-release versions. For example, `>=1.2.3` will skip pre-releases when looking\nat a list of releases while `>=1.2.3-0` will evaluate and find pre-releases.\n\nThe reason for the `0` as a pre-release version in the example comparison is\nbecause pre-releases can only contain ASCII alphanumerics and hyphens (along with\n`.` separators), per the spec. Sorting happens in ASCII sort order, again per the\nspec. The lowest character is a `0` in ASCII sort order\n(see an [ASCII Table](http://www.asciitable.com/))\n\nUnderstanding ASCII sort ordering is important because A-Z comes before a-z. That\nmeans `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case\nsensitivity doesn't apply here. This is due to ASCII sort ordering which is what\nthe spec specifies.\n\nThe `Constraints` instance returned from `semver.NewConstraint()` has a property\n`IncludePrerelease` that, when set to true, will return prerelease versions when calls\nto `Check()` and `Validate()` are made.\n\n### Hyphen Range Comparisons\n\nThere are multiple methods to handle ranges and the first is hyphens ranges.\nThese look like:\n\n* `1.2 - 1.4.5` which is equivalent to `>= 1.2 <= 1.4.5`\n* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5`\n\nNote that `1.2-1.4.5` without whitespace is parsed completely differently; it's\nparsed as a single constraint `1.2.0` with _prerelease_ `1.4.5`.\n\n### Wildcards In Comparisons\n\nThe `x`, `X`, and `*` characters can be used as a wildcard character. This works\nfor all comparison operators. When used on the `=` operator it falls\nback to the patch level comparison (see tilde below). For example,\n\n* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`\n* `>= 1.2.x` is equivalent to `>= 1.2.0`\n* `<= 2.x` is equivalent to `< 3`\n* `*` is equivalent to `>= 0.0.0`\n\n### Tilde Range Comparisons (Patch)\n\nThe tilde (`~`) comparison operator is for patch level ranges when a minor\nversion is specified and major level changes when the minor number is missing.\nFor example,\n\n* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0`\n* `~1` is equivalent to `>= 1, < 2`\n* `~2.3` is equivalent to `>= 2.3, < 2.4`\n* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0`\n* `~1.x` is equivalent to `>= 1, < 2`\n\n### Caret Range Comparisons (Major)\n\nThe caret (`^`) comparison operator is for major level changes once a stable\n(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts\nas the API stability level. This is useful when comparisons of API versions as a\nmajor change is API breaking. For example,\n\n* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0`\n* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0`\n* `^2.3` is equivalent to `>= 2.3, < 3`\n* `^2.x` is equivalent to `>= 2.0.0, < 3`\n* `^0.2.3` is equivalent to `>=0.2.3 <0.3.0`\n* `^0.2` is equivalent to `>=0.2.0 <0.3.0`\n* `^0.0.3` is equivalent to `>=0.0.3 <0.0.4`\n* `^0.0` is equivalent to `>=0.0.0 <0.1.0`\n* `^0` is equivalent to `>=0.0.0 <1.0.0`\n\n## Validation\n\nIn addition to testing a version against a constraint, a version can be validated\nagainst a constraint. When validation fails a slice of errors containing why a\nversion didn't meet the constraint is returned. For example,\n\n```go\nc, err := semver.NewConstraint(\"<= 1.2.3, >= 1.4\")\nif err != nil {\n    // Handle constraint not being parseable.\n}\n\nv, err := semver.NewVersion(\"1.3\")\nif err != nil {\n    // Handle version not being parseable.\n}\n\n// Validate a version against a constraint.\na, msgs := c.Validate(v)\n// a is false\nfor _, m := range msgs {\n    fmt.Println(m)\n\n    // Loops over the errors which would read\n    // \"1.3 is greater than 1.2.3\"\n    // \"1.3 is less than 1.4\"\n}\n```\n\n## Contribute\n\nIf you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues)\nor [create a pull request](https://github.com/Masterminds/semver/pulls).\n\n## Security\n\nSecurity is an important consideration for this project. The project currently\nuses the following tools to help discover security issues:\n\n* [CodeQL](https://codeql.github.com)\n* [gosec](https://github.com/securego/gosec)\n* Daily Fuzz testing\n\nIf you believe you have found a security vulnerability you can privately disclose\nit through the [GitHub security page](https://github.com/Masterminds/semver/security).\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nThe following versions of semver are currently supported:\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 3.x     | :white_check_mark: |\n| 2.x     | :x:                |\n| 1.x     | :x:                |\n\nFixes are only released for the latest minor version in the form of a patch release.\n\n## Reporting a Vulnerability\n\nYou can privately disclose a vulnerability through GitHubs\n[private vulnerability reporting](https://github.com/Masterminds/semver/security/advisories)\nmechanism.\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/collection.go",
    "content": "package semver\n\n// Collection is a collection of Version instances and implements the sort\n// interface. See the sort package for more details.\n// https://golang.org/pkg/sort/\ntype Collection []*Version\n\n// Len returns the length of a collection. The number of Version instances\n// on the slice.\nfunc (c Collection) Len() int {\n\treturn len(c)\n}\n\n// Less is needed for the sort interface to compare two Version objects on the\n// slice. If checks if one is less than the other.\nfunc (c Collection) Less(i, j int) bool {\n\treturn c[i].LessThan(c[j])\n}\n\n// Swap is needed for the sort interface to replace the Version objects\n// at two different positions in the slice.\nfunc (c Collection) Swap(i, j int) {\n\tc[i], c[j] = c[j], c[i]\n}\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/constraints.go",
    "content": "package semver\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Constraints is one or more constraint that a semantic version can be\n// checked against.\ntype Constraints struct {\n\tconstraints [][]*constraint\n\tcontainsPre []bool\n\n\t// IncludePrerelease specifies if pre-releases should be included in\n\t// the results. Note, if a constraint range has a prerelease than\n\t// prereleases will be included for that AND group even if this is\n\t// set to false.\n\tIncludePrerelease bool\n}\n\n// NewConstraint returns a Constraints instance that a Version instance can\n// be checked against. If there is a parse error it will be returned.\nfunc NewConstraint(c string) (*Constraints, error) {\n\n\t// Rewrite - ranges into a comparison operation.\n\tc = rewriteRange(c)\n\n\tors := strings.Split(c, \"||\")\n\tlenors := len(ors)\n\tor := make([][]*constraint, lenors)\n\thasPre := make([]bool, lenors)\n\tfor k, v := range ors {\n\t\t// Validate the segment\n\t\tif !validConstraintRegex.MatchString(v) {\n\t\t\treturn nil, fmt.Errorf(\"improper constraint: %s\", v)\n\t\t}\n\n\t\tcs := findConstraintRegex.FindAllString(v, -1)\n\t\tif cs == nil {\n\t\t\tcs = append(cs, v)\n\t\t}\n\t\tresult := make([]*constraint, len(cs))\n\t\tfor i, s := range cs {\n\t\t\tpc, err := parseConstraint(s)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// If one of the constraints has a prerelease record this.\n\t\t\t// This information is used when checking all in an \"and\"\n\t\t\t// group to ensure they all check for prereleases.\n\t\t\tif pc.con.pre != \"\" {\n\t\t\t\thasPre[k] = true\n\t\t\t}\n\n\t\t\tresult[i] = pc\n\t\t}\n\t\tor[k] = result\n\t}\n\n\to := &Constraints{\n\t\tconstraints: or,\n\t\tcontainsPre: hasPre,\n\t}\n\treturn o, nil\n}\n\n// Check tests if a version satisfies the constraints.\nfunc (cs Constraints) Check(v *Version) bool {\n\t// TODO(mattfarina): For v4 of this library consolidate the Check and Validate\n\t// functions as the underlying functions make that possible now.\n\t// loop over the ORs and check the inner ANDs\n\tfor i, o := range cs.constraints {\n\t\tjoy := true\n\t\tfor _, c := range o {\n\t\t\tif check, _ := c.check(v, (cs.IncludePrerelease || cs.containsPre[i])); !check {\n\t\t\t\tjoy = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif joy {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\n// Validate checks if a version satisfies a constraint. If not a slice of\n// reasons for the failure are returned in addition to a bool.\nfunc (cs Constraints) Validate(v *Version) (bool, []error) {\n\t// loop over the ORs and check the inner ANDs\n\tvar e []error\n\n\t// Capture the prerelease message only once. When it happens the first time\n\t// this var is marked\n\tvar prerelesase bool\n\tfor i, o := range cs.constraints {\n\t\tjoy := true\n\t\tfor _, c := range o {\n\t\t\t// Before running the check handle the case there the version is\n\t\t\t// a prerelease and the check is not searching for prereleases.\n\t\t\tif !(cs.IncludePrerelease || cs.containsPre[i]) && v.pre != \"\" {\n\t\t\t\tif !prerelesase {\n\t\t\t\t\tem := fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t\t\t\t\te = append(e, em)\n\t\t\t\t\tprerelesase = true\n\t\t\t\t}\n\t\t\t\tjoy = false\n\n\t\t\t} else {\n\n\t\t\t\tif _, err := c.check(v, (cs.IncludePrerelease || cs.containsPre[i])); err != nil {\n\t\t\t\t\te = append(e, err)\n\t\t\t\t\tjoy = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif joy {\n\t\t\treturn true, []error{}\n\t\t}\n\t}\n\n\treturn false, e\n}\n\nfunc (cs Constraints) String() string {\n\tbuf := make([]string, len(cs.constraints))\n\tvar tmp bytes.Buffer\n\n\tfor k, v := range cs.constraints {\n\t\ttmp.Reset()\n\t\tvlen := len(v)\n\t\tfor kk, c := range v {\n\t\t\ttmp.WriteString(c.string())\n\n\t\t\t// Space separate the AND conditions\n\t\t\tif vlen > 1 && kk < vlen-1 {\n\t\t\t\ttmp.WriteString(\" \")\n\t\t\t}\n\t\t}\n\t\tbuf[k] = tmp.String()\n\t}\n\n\treturn strings.Join(buf, \" || \")\n}\n\n// UnmarshalText implements the encoding.TextUnmarshaler interface.\nfunc (cs *Constraints) UnmarshalText(text []byte) error {\n\ttemp, err := NewConstraint(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*cs = *temp\n\n\treturn nil\n}\n\n// MarshalText implements the encoding.TextMarshaler interface.\nfunc (cs Constraints) MarshalText() ([]byte, error) {\n\treturn []byte(cs.String()), nil\n}\n\nvar constraintOps map[string]cfunc\nvar constraintRegex *regexp.Regexp\nvar constraintRangeRegex *regexp.Regexp\n\n// Used to find individual constraints within a multi-constraint string\nvar findConstraintRegex *regexp.Regexp\n\n// Used to validate an segment of ANDs is valid\nvar validConstraintRegex *regexp.Regexp\n\nconst cvRegex string = `v?([0-9|x|X|\\*]+)(\\.[0-9|x|X|\\*]+)?(\\.[0-9|x|X|\\*]+)?` +\n\t`(-([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?` +\n\t`(\\+([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?`\n\nfunc init() {\n\tconstraintOps = map[string]cfunc{\n\t\t\"\":   constraintTildeOrEqual,\n\t\t\"=\":  constraintTildeOrEqual,\n\t\t\"!=\": constraintNotEqual,\n\t\t\">\":  constraintGreaterThan,\n\t\t\"<\":  constraintLessThan,\n\t\t\">=\": constraintGreaterThanEqual,\n\t\t\"=>\": constraintGreaterThanEqual,\n\t\t\"<=\": constraintLessThanEqual,\n\t\t\"=<\": constraintLessThanEqual,\n\t\t\"~\":  constraintTilde,\n\t\t\"~>\": constraintTilde,\n\t\t\"^\":  constraintCaret,\n\t}\n\n\tops := `=||!=|>|<|>=|=>|<=|=<|~|~>|\\^`\n\n\tconstraintRegex = regexp.MustCompile(fmt.Sprintf(\n\t\t`^\\s*(%s)\\s*(%s)\\s*$`,\n\t\tops,\n\t\tcvRegex))\n\n\tconstraintRangeRegex = regexp.MustCompile(fmt.Sprintf(\n\t\t`\\s*(%s)\\s+-\\s+(%s)\\s*`,\n\t\tcvRegex, cvRegex))\n\n\tfindConstraintRegex = regexp.MustCompile(fmt.Sprintf(\n\t\t`(%s)\\s*(%s)`,\n\t\tops,\n\t\tcvRegex))\n\n\t// The first time a constraint shows up will look slightly different from\n\t// future times it shows up due to a leading space or comma in a given\n\t// string.\n\tvalidConstraintRegex = regexp.MustCompile(fmt.Sprintf(\n\t\t`^(\\s*(%s)\\s*(%s)\\s*)((?:\\s+|,\\s*)(%s)\\s*(%s)\\s*)*$`,\n\t\tops,\n\t\tcvRegex,\n\t\tops,\n\t\tcvRegex))\n}\n\n// An individual constraint\ntype constraint struct {\n\t// The version used in the constraint check. For example, if a constraint\n\t// is '<= 2.0.0' the con a version instance representing 2.0.0.\n\tcon *Version\n\n\t// The original parsed version (e.g., 4.x from != 4.x)\n\torig string\n\n\t// The original operator for the constraint\n\torigfunc string\n\n\t// When an x is used as part of the version (e.g., 1.x)\n\tminorDirty bool\n\tdirty      bool\n\tpatchDirty bool\n}\n\n// Check if a version meets the constraint\nfunc (c *constraint) check(v *Version, includePre bool) (bool, error) {\n\treturn constraintOps[c.origfunc](v, c, includePre)\n}\n\n// String prints an individual constraint into a string\nfunc (c *constraint) string() string {\n\treturn c.origfunc + c.orig\n}\n\ntype cfunc func(v *Version, c *constraint, includePre bool) (bool, error)\n\nfunc parseConstraint(c string) (*constraint, error) {\n\tif len(c) > 0 {\n\t\tm := constraintRegex.FindStringSubmatch(c)\n\t\tif m == nil {\n\t\t\treturn nil, fmt.Errorf(\"improper constraint: %s\", c)\n\t\t}\n\n\t\tcs := &constraint{\n\t\t\torig:     m[2],\n\t\t\torigfunc: m[1],\n\t\t}\n\n\t\tver := m[2]\n\t\tminorDirty := false\n\t\tpatchDirty := false\n\t\tdirty := false\n\t\tif isX(m[3]) || m[3] == \"\" {\n\t\t\tver = fmt.Sprintf(\"0.0.0%s\", m[6])\n\t\t\tdirty = true\n\t\t} else if isX(strings.TrimPrefix(m[4], \".\")) || m[4] == \"\" {\n\t\t\tminorDirty = true\n\t\t\tdirty = true\n\t\t\tver = fmt.Sprintf(\"%s.0.0%s\", m[3], m[6])\n\t\t} else if isX(strings.TrimPrefix(m[5], \".\")) || m[5] == \"\" {\n\t\t\tdirty = true\n\t\t\tpatchDirty = true\n\t\t\tver = fmt.Sprintf(\"%s%s.0%s\", m[3], m[4], m[6])\n\t\t}\n\n\t\tcon, err := NewVersion(ver)\n\t\tif err != nil {\n\n\t\t\t// The constraintRegex should catch any regex parsing errors. So,\n\t\t\t// we should never get here.\n\t\t\treturn nil, errors.New(\"constraint parser error\")\n\t\t}\n\n\t\tcs.con = con\n\t\tcs.minorDirty = minorDirty\n\t\tcs.patchDirty = patchDirty\n\t\tcs.dirty = dirty\n\n\t\treturn cs, nil\n\t}\n\n\t// The rest is the special case where an empty string was passed in which\n\t// is equivalent to * or >=0.0.0\n\tcon, err := StrictNewVersion(\"0.0.0\")\n\tif err != nil {\n\n\t\t// The constraintRegex should catch any regex parsing errors. So,\n\t\t// we should never get here.\n\t\treturn nil, errors.New(\"constraint parser error\")\n\t}\n\n\tcs := &constraint{\n\t\tcon:        con,\n\t\torig:       c,\n\t\torigfunc:   \"\",\n\t\tminorDirty: false,\n\t\tpatchDirty: false,\n\t\tdirty:      true,\n\t}\n\treturn cs, nil\n}\n\n// Constraint functions\nfunc constraintNotEqual(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\tif c.dirty {\n\t\tif c.con.Major() != v.Major() {\n\t\t\treturn true, nil\n\t\t}\n\t\tif c.con.Minor() != v.Minor() && !c.minorDirty {\n\t\t\treturn true, nil\n\t\t} else if c.minorDirty {\n\t\t\treturn false, fmt.Errorf(\"%s is equal to %s\", v, c.orig)\n\t\t} else if c.con.Patch() != v.Patch() && !c.patchDirty {\n\t\t\treturn true, nil\n\t\t} else if c.patchDirty {\n\t\t\t// Need to handle prereleases if present\n\t\t\tif v.Prerelease() != \"\" || c.con.Prerelease() != \"\" {\n\t\t\t\teq := comparePrerelease(v.Prerelease(), c.con.Prerelease()) != 0\n\t\t\t\tif eq {\n\t\t\t\t\treturn true, nil\n\t\t\t\t}\n\t\t\t\treturn false, fmt.Errorf(\"%s is equal to %s\", v, c.orig)\n\t\t\t}\n\t\t\treturn false, fmt.Errorf(\"%s is equal to %s\", v, c.orig)\n\t\t}\n\t}\n\n\teq := v.Equal(c.con)\n\tif eq {\n\t\treturn false, fmt.Errorf(\"%s is equal to %s\", v, c.orig)\n\t}\n\n\treturn true, nil\n}\n\nfunc constraintGreaterThan(v *Version, c *constraint, includePre bool) (bool, error) {\n\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\tvar eq bool\n\n\tif !c.dirty {\n\t\teq = v.Compare(c.con) == 1\n\t\tif eq {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s is less than or equal to %s\", v, c.orig)\n\t}\n\n\tif v.Major() > c.con.Major() {\n\t\treturn true, nil\n\t} else if v.Major() < c.con.Major() {\n\t\treturn false, fmt.Errorf(\"%s is less than or equal to %s\", v, c.orig)\n\t} else if c.minorDirty {\n\t\t// This is a range case such as >11. When the version is something like\n\t\t// 11.1.0 is it not > 11. For that we would need 12 or higher\n\t\treturn false, fmt.Errorf(\"%s is less than or equal to %s\", v, c.orig)\n\t} else if c.patchDirty {\n\t\t// This is for ranges such as >11.1. A version of 11.1.1 is not greater\n\t\t// which one of 11.2.1 is greater\n\t\teq = v.Minor() > c.con.Minor()\n\t\tif eq {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s is less than or equal to %s\", v, c.orig)\n\t}\n\n\t// If we have gotten here we are not comparing pre-preleases and can use the\n\t// Compare function to accomplish that.\n\teq = v.Compare(c.con) == 1\n\tif eq {\n\t\treturn true, nil\n\t}\n\treturn false, fmt.Errorf(\"%s is less than or equal to %s\", v, c.orig)\n}\n\nfunc constraintLessThan(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\teq := v.Compare(c.con) < 0\n\tif eq {\n\t\treturn true, nil\n\t}\n\treturn false, fmt.Errorf(\"%s is greater than or equal to %s\", v, c.orig)\n}\n\nfunc constraintGreaterThanEqual(v *Version, c *constraint, includePre bool) (bool, error) {\n\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\teq := v.Compare(c.con) >= 0\n\tif eq {\n\t\treturn true, nil\n\t}\n\treturn false, fmt.Errorf(\"%s is less than %s\", v, c.orig)\n}\n\nfunc constraintLessThanEqual(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\tvar eq bool\n\n\tif !c.dirty {\n\t\teq = v.Compare(c.con) <= 0\n\t\tif eq {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s is greater than %s\", v, c.orig)\n\t}\n\n\tif v.Major() > c.con.Major() {\n\t\treturn false, fmt.Errorf(\"%s is greater than %s\", v, c.orig)\n\t} else if v.Major() == c.con.Major() && v.Minor() > c.con.Minor() && !c.minorDirty {\n\t\treturn false, fmt.Errorf(\"%s is greater than %s\", v, c.orig)\n\t}\n\n\treturn true, nil\n}\n\n// ~*, ~>* --> >= 0.0.0 (any)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0, <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0, <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0, <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3, <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0, <1.3.0\nfunc constraintTilde(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\tif v.LessThan(c.con) {\n\t\treturn false, fmt.Errorf(\"%s is less than %s\", v, c.orig)\n\t}\n\n\t// ~0.0.0 is a special case where all constraints are accepted. It's\n\t// equivalent to >= 0.0.0.\n\tif c.con.Major() == 0 && c.con.Minor() == 0 && c.con.Patch() == 0 &&\n\t\t!c.minorDirty && !c.patchDirty {\n\t\treturn true, nil\n\t}\n\n\tif v.Major() != c.con.Major() {\n\t\treturn false, fmt.Errorf(\"%s does not have same major version as %s\", v, c.orig)\n\t}\n\n\tif v.Minor() != c.con.Minor() && !c.minorDirty {\n\t\treturn false, fmt.Errorf(\"%s does not have same major and minor version as %s\", v, c.orig)\n\t}\n\n\treturn true, nil\n}\n\n// When there is a .x (dirty) status it automatically opts in to ~. Otherwise\n// it's a straight =\nfunc constraintTildeOrEqual(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\tif c.dirty {\n\t\treturn constraintTilde(v, c, includePre)\n\t}\n\n\teq := v.Equal(c.con)\n\tif eq {\n\t\treturn true, nil\n\t}\n\n\treturn false, fmt.Errorf(\"%s is not equal to %s\", v, c.orig)\n}\n\n// ^*      -->  (any)\n// ^1.2.3  -->  >=1.2.3 <2.0.0\n// ^1.2    -->  >=1.2.0 <2.0.0\n// ^1      -->  >=1.0.0 <2.0.0\n// ^0.2.3  -->  >=0.2.3 <0.3.0\n// ^0.2    -->  >=0.2.0 <0.3.0\n// ^0.0.3  -->  >=0.0.3 <0.0.4\n// ^0.0    -->  >=0.0.0 <0.1.0\n// ^0      -->  >=0.0.0 <1.0.0\nfunc constraintCaret(v *Version, c *constraint, includePre bool) (bool, error) {\n\t// The existence of prereleases is checked at the group level and passed in.\n\t// Exit early if the version has a prerelease but those are to be ignored.\n\tif v.Prerelease() != \"\" && !includePre {\n\t\treturn false, fmt.Errorf(\"%s is a prerelease version and the constraint is only looking for release versions\", v)\n\t}\n\n\t// This less than handles prereleases\n\tif v.LessThan(c.con) {\n\t\treturn false, fmt.Errorf(\"%s is less than %s\", v, c.orig)\n\t}\n\n\tvar eq bool\n\n\t// ^ when the major > 0 is >=x.y.z < x+1\n\tif c.con.Major() > 0 || c.minorDirty {\n\n\t\t// ^ has to be within a major range for > 0. Everything less than was\n\t\t// filtered out with the LessThan call above. This filters out those\n\t\t// that greater but not within the same major range.\n\t\teq = v.Major() == c.con.Major()\n\t\tif eq {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s does not have same major version as %s\", v, c.orig)\n\t}\n\n\t// ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1\n\tif c.con.Major() == 0 && v.Major() > 0 {\n\t\treturn false, fmt.Errorf(\"%s does not have same major version as %s\", v, c.orig)\n\t}\n\t// If the con Minor is > 0 it is not dirty\n\tif c.con.Minor() > 0 || c.patchDirty {\n\t\teq = v.Minor() == c.con.Minor()\n\t\tif eq {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s does not have same minor version as %s. Expected minor versions to match when constraint major version is 0\", v, c.orig)\n\t}\n\t// ^ when the minor is 0 and minor > 0 is =0.0.z\n\tif c.con.Minor() == 0 && v.Minor() > 0 {\n\t\treturn false, fmt.Errorf(\"%s does not have same minor version as %s\", v, c.orig)\n\t}\n\n\t// At this point the major is 0 and the minor is 0 and not dirty. The patch\n\t// is not dirty so we need to check if they are equal. If they are not equal\n\teq = c.con.Patch() == v.Patch()\n\tif eq {\n\t\treturn true, nil\n\t}\n\treturn false, fmt.Errorf(\"%s does not equal %s. Expect version and constraint to equal when major and minor versions are 0\", v, c.orig)\n}\n\nfunc isX(x string) bool {\n\tswitch x {\n\tcase \"x\", \"*\", \"X\":\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc rewriteRange(i string) string {\n\tm := constraintRangeRegex.FindAllStringSubmatch(i, -1)\n\tif m == nil {\n\t\treturn i\n\t}\n\to := i\n\tfor _, v := range m {\n\t\tt := fmt.Sprintf(\">= %s, <= %s \", v[1], v[11])\n\t\to = strings.Replace(o, v[0], t, 1)\n\t}\n\n\treturn o\n}\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/doc.go",
    "content": "/*\nPackage semver provides the ability to work with Semantic Versions (http://semver.org) in Go.\n\nSpecifically it provides the ability to:\n\n  - Parse semantic versions\n  - Sort semantic versions\n  - Check if a semantic version fits within a set of constraints\n  - Optionally work with a `v` prefix\n\n# Parsing Semantic Versions\n\nThere are two functions that can parse semantic versions. The `StrictNewVersion`\nfunction only parses valid version 2 semantic versions as outlined in the\nspecification. The `NewVersion` function attempts to coerce a version into a\nsemantic version and parse it. For example, if there is a leading v or a version\nlisted without all 3 parts (e.g. 1.2) it will attempt to coerce it into a valid\nsemantic version (e.g., 1.2.0). In both cases a `Version` object is returned\nthat can be sorted, compared, and used in constraints.\n\nWhen parsing a version an optional error can be returned if there is an issue\nparsing the version. For example,\n\n\tv, err := semver.NewVersion(\"1.2.3-beta.1+b345\")\n\nThe version object has methods to get the parts of the version, compare it to\nother versions, convert the version back into a string, and get the original\nstring. For more details please see the documentation\nat https://godoc.org/github.com/Masterminds/semver.\n\n# Sorting Semantic Versions\n\nA set of versions can be sorted using the `sort` package from the standard library.\nFor example,\n\n\t    raw := []string{\"1.2.3\", \"1.0\", \"1.3\", \"2\", \"0.4.2\",}\n\t    vs := make([]*semver.Version, len(raw))\n\t\tfor i, r := range raw {\n\t\t\tv, err := semver.NewVersion(r)\n\t\t\tif err != nil {\n\t\t\t\tt.Errorf(\"Error parsing version: %s\", err)\n\t\t\t}\n\n\t\t\tvs[i] = v\n\t\t}\n\n\t\tsort.Sort(semver.Collection(vs))\n\n# Checking Version Constraints and Comparing Versions\n\nThere are two methods for comparing versions. One uses comparison methods on\n`Version` instances and the other is using Constraints. There are some important\ndifferences to notes between these two methods of comparison.\n\n 1. When two versions are compared using functions such as `Compare`, `LessThan`,\n    and others it will follow the specification and always include prereleases\n    within the comparison. It will provide an answer valid with the comparison\n    spec section at https://semver.org/#spec-item-11\n 2. When constraint checking is used for checks or validation it will follow a\n    different set of rules that are common for ranges with tools like npm/js\n    and Rust/Cargo. This includes considering prereleases to be invalid if the\n    ranges does not include on. If you want to have it include pre-releases a\n    simple solution is to include `-0` in your range.\n 3. Constraint ranges can have some complex rules including the shorthard use of\n    ~ and ^. For more details on those see the options below.\n\nThere are differences between the two methods or checking versions because the\ncomparison methods on `Version` follow the specification while comparison ranges\nare not part of the specification. Different packages and tools have taken it\nupon themselves to come up with range rules. This has resulted in differences.\nFor example, npm/js and Cargo/Rust follow similar patterns which PHP has a\ndifferent pattern for ^. The comparison features in this package follow the\nnpm/js and Cargo/Rust lead because applications using it have followed similar\npatters with their versions.\n\nChecking a version against version constraints is one of the most featureful\nparts of the package.\n\n\tc, err := semver.NewConstraint(\">= 1.2.3\")\n\tif err != nil {\n\t    // Handle constraint not being parsable.\n\t}\n\n\tv, err := semver.NewVersion(\"1.3\")\n\tif err != nil {\n\t    // Handle version not being parsable.\n\t}\n\t// Check if the version meets the constraints. The a variable will be true.\n\ta := c.Check(v)\n\n# Basic Comparisons\n\nThere are two elements to the comparisons. First, a comparison string is a list\nof comma or space separated AND comparisons. These are then separated by || (OR)\ncomparisons. For example, `\">= 1.2 < 3.0.0 || >= 4.2.3\"` is looking for a\ncomparison that's greater than or equal to 1.2 and less than 3.0.0 or is\ngreater than or equal to 4.2.3. This can also be written as\n`\">= 1.2, < 3.0.0 || >= 4.2.3\"`\n\nThe basic comparisons are:\n\n  - `=`: equal (aliased to no operator)\n  - `!=`: not equal\n  - `>`: greater than\n  - `<`: less than\n  - `>=`: greater than or equal to\n  - `<=`: less than or equal to\n\n# Hyphen Range Comparisons\n\nThere are multiple methods to handle ranges and the first is hyphens ranges.\nThese look like:\n\n  - `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5`\n  - `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5`\n\n# Wildcards In Comparisons\n\nThe `x`, `X`, and `*` characters can be used as a wildcard character. This works\nfor all comparison operators. When used on the `=` operator it falls\nback to the tilde operation. For example,\n\n  - `1.2.x` is equivalent to `>= 1.2.0 < 1.3.0`\n  - `>= 1.2.x` is equivalent to `>= 1.2.0`\n  - `<= 2.x` is equivalent to `<= 3`\n  - `*` is equivalent to `>= 0.0.0`\n\nTilde Range Comparisons (Patch)\n\nThe tilde (`~`) comparison operator is for patch level ranges when a minor\nversion is specified and major level changes when the minor number is missing.\nFor example,\n\n  - `~1.2.3` is equivalent to `>= 1.2.3 < 1.3.0`\n  - `~1` is equivalent to `>= 1, < 2`\n  - `~2.3` is equivalent to `>= 2.3 < 2.4`\n  - `~1.2.x` is equivalent to `>= 1.2.0 < 1.3.0`\n  - `~1.x` is equivalent to `>= 1 < 2`\n\nCaret Range Comparisons (Major)\n\nThe caret (`^`) comparison operator is for major level changes once a stable\n(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts\nas the API stability level. This is useful when comparisons of API versions as a\nmajor change is API breaking. For example,\n\n  - `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0`\n  - `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0`\n  - `^2.3` is equivalent to `>= 2.3, < 3`\n  - `^2.x` is equivalent to `>= 2.0.0, < 3`\n  - `^0.2.3` is equivalent to `>=0.2.3 <0.3.0`\n  - `^0.2` is equivalent to `>=0.2.0 <0.3.0`\n  - `^0.0.3` is equivalent to `>=0.0.3 <0.0.4`\n  - `^0.0` is equivalent to `>=0.0.0 <0.1.0`\n  - `^0` is equivalent to `>=0.0.0 <1.0.0`\n\n# Validation\n\nIn addition to testing a version against a constraint, a version can be validated\nagainst a constraint. When validation fails a slice of errors containing why a\nversion didn't meet the constraint is returned. For example,\n\n\tc, err := semver.NewConstraint(\"<= 1.2.3, >= 1.4\")\n\tif err != nil {\n\t    // Handle constraint not being parseable.\n\t}\n\n\tv, _ := semver.NewVersion(\"1.3\")\n\tif err != nil {\n\t    // Handle version not being parseable.\n\t}\n\n\t// Validate a version against a constraint.\n\ta, msgs := c.Validate(v)\n\t// a is false\n\tfor _, m := range msgs {\n\t    fmt.Println(m)\n\n\t    // Loops over the errors which would read\n\t    // \"1.3 is greater than 1.2.3\"\n\t    // \"1.3 is less than 1.4\"\n\t}\n*/\npackage semver\n"
  },
  {
    "path": "vendor/github.com/Masterminds/semver/v3/version.go",
    "content": "package semver\n\nimport (\n\t\"bytes\"\n\t\"database/sql/driver\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// The compiled version of the regex created at init() is cached here so it\n// only needs to be created once.\nvar versionRegex *regexp.Regexp\nvar looseVersionRegex *regexp.Regexp\n\n// CoerceNewVersion sets if leading 0's are allowd in the version part. Leading 0's are\n// not allowed in a valid semantic version. When set to true, NewVersion will coerce\n// leading 0's into a valid version.\nvar CoerceNewVersion = true\n\n// DetailedNewVersionErrors specifies if detailed errors are returned from the NewVersion\n// function. This is used when CoerceNewVersion is set to false. If set to false\n// ErrInvalidSemVer is returned for an invalid version. This does not apply to\n// StrictNewVersion. Setting this function to false returns errors more quickly.\nvar DetailedNewVersionErrors = true\n\nvar (\n\t// ErrInvalidSemVer is returned a version is found to be invalid when\n\t// being parsed.\n\tErrInvalidSemVer = errors.New(\"invalid semantic version\")\n\n\t// ErrEmptyString is returned when an empty string is passed in for parsing.\n\tErrEmptyString = errors.New(\"version string empty\")\n\n\t// ErrInvalidCharacters is returned when invalid characters are found as\n\t// part of a version\n\tErrInvalidCharacters = errors.New(\"invalid characters in version\")\n\n\t// ErrSegmentStartsZero is returned when a version segment starts with 0.\n\t// This is invalid in SemVer.\n\tErrSegmentStartsZero = errors.New(\"version segment starts with 0\")\n\n\t// ErrInvalidMetadata is returned when the metadata is an invalid format\n\tErrInvalidMetadata = errors.New(\"invalid metadata string\")\n\n\t// ErrInvalidPrerelease is returned when the pre-release is an invalid format\n\tErrInvalidPrerelease = errors.New(\"invalid prerelease string\")\n)\n\n// semVerRegex is the regular expression used to parse a semantic version.\n// This is not the official regex from the semver spec. It has been modified to allow for loose handling\n// where versions like 2.1 are detected.\nconst semVerRegex string = `v?(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*))?(?:\\.(0|[1-9]\\d*))?` +\n\t`(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?` +\n\t`(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?`\n\n// looseSemVerRegex is a regular expression that lets invalid semver expressions through\n// with enough detail that certain errors can be checked for.\nconst looseSemVerRegex string = `v?([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?` +\n\t`(-([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?` +\n\t`(\\+([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?`\n\n// Version represents a single semantic version.\ntype Version struct {\n\tmajor, minor, patch uint64\n\tpre                 string\n\tmetadata            string\n\toriginal            string\n}\n\nfunc init() {\n\tversionRegex = regexp.MustCompile(\"^\" + semVerRegex + \"$\")\n\tlooseVersionRegex = regexp.MustCompile(\"^\" + looseSemVerRegex + \"$\")\n}\n\nconst (\n\tnum     string = \"0123456789\"\n\tallowed string = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-\" + num\n)\n\n// StrictNewVersion parses a given version and returns an instance of Version or\n// an error if unable to parse the version. Only parses valid semantic versions.\n// Performs checking that can find errors within the version.\n// If you want to coerce a version such as 1 or 1.2 and parse it as the 1.x\n// releases of semver did, use the NewVersion() function.\nfunc StrictNewVersion(v string) (*Version, error) {\n\t// Parsing here does not use RegEx in order to increase performance and reduce\n\t// allocations.\n\n\tif len(v) == 0 {\n\t\treturn nil, ErrEmptyString\n\t}\n\n\t// Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build\n\tparts := strings.SplitN(v, \".\", 3)\n\tif len(parts) != 3 {\n\t\treturn nil, ErrInvalidSemVer\n\t}\n\n\tsv := &Version{\n\t\toriginal: v,\n\t}\n\n\t// Extract build metadata\n\tif strings.Contains(parts[2], \"+\") {\n\t\textra := strings.SplitN(parts[2], \"+\", 2)\n\t\tsv.metadata = extra[1]\n\t\tparts[2] = extra[0]\n\t\tif err := validateMetadata(sv.metadata); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Extract build prerelease\n\tif strings.Contains(parts[2], \"-\") {\n\t\textra := strings.SplitN(parts[2], \"-\", 2)\n\t\tsv.pre = extra[1]\n\t\tparts[2] = extra[0]\n\t\tif err := validatePrerelease(sv.pre); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Validate the number segments are valid. This includes only having positive\n\t// numbers and no leading 0's.\n\tfor _, p := range parts {\n\t\tif !containsOnly(p, num) {\n\t\t\treturn nil, ErrInvalidCharacters\n\t\t}\n\n\t\tif len(p) > 1 && p[0] == '0' {\n\t\t\treturn nil, ErrSegmentStartsZero\n\t\t}\n\t}\n\n\t// Extract major, minor, and patch\n\tvar err error\n\tsv.major, err = strconv.ParseUint(parts[0], 10, 64)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsv.minor, err = strconv.ParseUint(parts[1], 10, 64)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsv.patch, err = strconv.ParseUint(parts[2], 10, 64)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn sv, nil\n}\n\n// NewVersion parses a given version and returns an instance of Version or\n// an error if unable to parse the version. If the version is SemVer-ish it\n// attempts to convert it to SemVer. If you want  to validate it was a strict\n// semantic version at parse time see StrictNewVersion().\nfunc NewVersion(v string) (*Version, error) {\n\tif CoerceNewVersion {\n\t\treturn coerceNewVersion(v)\n\t}\n\tm := versionRegex.FindStringSubmatch(v)\n\tif m == nil {\n\n\t\t// Disabling detailed errors is first so that it is in the fast path.\n\t\tif !DetailedNewVersionErrors {\n\t\t\treturn nil, ErrInvalidSemVer\n\t\t}\n\n\t\t// Check for specific errors with the semver string and return a more detailed\n\t\t// error.\n\t\tm = looseVersionRegex.FindStringSubmatch(v)\n\t\tif m == nil {\n\t\t\treturn nil, ErrInvalidSemVer\n\t\t}\n\t\terr := validateVersion(m)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, ErrInvalidSemVer\n\t}\n\n\tsv := &Version{\n\t\tmetadata: m[5],\n\t\tpre:      m[4],\n\t\toriginal: v,\n\t}\n\n\tvar err error\n\tsv.major, err = strconv.ParseUint(m[1], 10, 64)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t}\n\n\tif m[2] != \"\" {\n\t\tsv.minor, err = strconv.ParseUint(m[2], 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t} else {\n\t\tsv.minor = 0\n\t}\n\n\tif m[3] != \"\" {\n\t\tsv.patch, err = strconv.ParseUint(m[3], 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t} else {\n\t\tsv.patch = 0\n\t}\n\n\t// Perform some basic due diligence on the extra parts to ensure they are\n\t// valid.\n\n\tif sv.pre != \"\" {\n\t\tif err = validatePrerelease(sv.pre); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif sv.metadata != \"\" {\n\t\tif err = validateMetadata(sv.metadata); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn sv, nil\n}\n\nfunc coerceNewVersion(v string) (*Version, error) {\n\tm := looseVersionRegex.FindStringSubmatch(v)\n\tif m == nil {\n\t\treturn nil, ErrInvalidSemVer\n\t}\n\n\tsv := &Version{\n\t\tmetadata: m[8],\n\t\tpre:      m[5],\n\t\toriginal: v,\n\t}\n\n\tvar err error\n\tsv.major, err = strconv.ParseUint(m[1], 10, 64)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t}\n\n\tif m[2] != \"\" {\n\t\tsv.minor, err = strconv.ParseUint(strings.TrimPrefix(m[2], \".\"), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t} else {\n\t\tsv.minor = 0\n\t}\n\n\tif m[3] != \"\" {\n\t\tsv.patch, err = strconv.ParseUint(strings.TrimPrefix(m[3], \".\"), 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t} else {\n\t\tsv.patch = 0\n\t}\n\n\t// Perform some basic due diligence on the extra parts to ensure they are\n\t// valid.\n\n\tif sv.pre != \"\" {\n\t\tif err = validatePrerelease(sv.pre); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif sv.metadata != \"\" {\n\t\tif err = validateMetadata(sv.metadata); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn sv, nil\n}\n\n// New creates a new instance of Version with each of the parts passed in as\n// arguments instead of parsing a version string.\nfunc New(major, minor, patch uint64, pre, metadata string) *Version {\n\tv := Version{\n\t\tmajor:    major,\n\t\tminor:    minor,\n\t\tpatch:    patch,\n\t\tpre:      pre,\n\t\tmetadata: metadata,\n\t\toriginal: \"\",\n\t}\n\n\tv.original = v.String()\n\n\treturn &v\n}\n\n// MustParse parses a given version and panics on error.\nfunc MustParse(v string) *Version {\n\tsv, err := NewVersion(v)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn sv\n}\n\n// String converts a Version object to a string.\n// Note, if the original version contained a leading v this version will not.\n// See the Original() method to retrieve the original value. Semantic Versions\n// don't contain a leading v per the spec. Instead it's optional on\n// implementation.\nfunc (v Version) String() string {\n\tvar buf bytes.Buffer\n\n\tfmt.Fprintf(&buf, \"%d.%d.%d\", v.major, v.minor, v.patch)\n\tif v.pre != \"\" {\n\t\tfmt.Fprintf(&buf, \"-%s\", v.pre)\n\t}\n\tif v.metadata != \"\" {\n\t\tfmt.Fprintf(&buf, \"+%s\", v.metadata)\n\t}\n\n\treturn buf.String()\n}\n\n// Original returns the original value passed in to be parsed.\nfunc (v *Version) Original() string {\n\treturn v.original\n}\n\n// Major returns the major version.\nfunc (v Version) Major() uint64 {\n\treturn v.major\n}\n\n// Minor returns the minor version.\nfunc (v Version) Minor() uint64 {\n\treturn v.minor\n}\n\n// Patch returns the patch version.\nfunc (v Version) Patch() uint64 {\n\treturn v.patch\n}\n\n// Prerelease returns the pre-release version.\nfunc (v Version) Prerelease() string {\n\treturn v.pre\n}\n\n// Metadata returns the metadata on the version.\nfunc (v Version) Metadata() string {\n\treturn v.metadata\n}\n\n// originalVPrefix returns the original 'v' prefix if any.\nfunc (v Version) originalVPrefix() string {\n\t// Note, only lowercase v is supported as a prefix by the parser.\n\tif v.original != \"\" && v.original[:1] == \"v\" {\n\t\treturn v.original[:1]\n\t}\n\treturn \"\"\n}\n\n// IncPatch produces the next patch version.\n// If the current version does not have prerelease/metadata information,\n// it unsets metadata and prerelease values, increments patch number.\n// If the current version has any of prerelease or metadata information,\n// it unsets both values and keeps current patch value\nfunc (v Version) IncPatch() Version {\n\tvNext := v\n\t// according to http://semver.org/#spec-item-9\n\t// Pre-release versions have a lower precedence than the associated normal version.\n\t// according to http://semver.org/#spec-item-10\n\t// Build metadata SHOULD be ignored when determining version precedence.\n\tif v.pre != \"\" {\n\t\tvNext.metadata = \"\"\n\t\tvNext.pre = \"\"\n\t} else {\n\t\tvNext.metadata = \"\"\n\t\tvNext.pre = \"\"\n\t\tvNext.patch = v.patch + 1\n\t}\n\tvNext.original = v.originalVPrefix() + \"\" + vNext.String()\n\treturn vNext\n}\n\n// IncMinor produces the next minor version.\n// Sets patch to 0.\n// Increments minor number.\n// Unsets metadata.\n// Unsets prerelease status.\nfunc (v Version) IncMinor() Version {\n\tvNext := v\n\tvNext.metadata = \"\"\n\tvNext.pre = \"\"\n\tvNext.patch = 0\n\tvNext.minor = v.minor + 1\n\tvNext.original = v.originalVPrefix() + \"\" + vNext.String()\n\treturn vNext\n}\n\n// IncMajor produces the next major version.\n// Sets patch to 0.\n// Sets minor to 0.\n// Increments major number.\n// Unsets metadata.\n// Unsets prerelease status.\nfunc (v Version) IncMajor() Version {\n\tvNext := v\n\tvNext.metadata = \"\"\n\tvNext.pre = \"\"\n\tvNext.patch = 0\n\tvNext.minor = 0\n\tvNext.major = v.major + 1\n\tvNext.original = v.originalVPrefix() + \"\" + vNext.String()\n\treturn vNext\n}\n\n// SetPrerelease defines the prerelease value.\n// Value must not include the required 'hyphen' prefix.\nfunc (v Version) SetPrerelease(prerelease string) (Version, error) {\n\tvNext := v\n\tif len(prerelease) > 0 {\n\t\tif err := validatePrerelease(prerelease); err != nil {\n\t\t\treturn vNext, err\n\t\t}\n\t}\n\tvNext.pre = prerelease\n\tvNext.original = v.originalVPrefix() + \"\" + vNext.String()\n\treturn vNext, nil\n}\n\n// SetMetadata defines metadata value.\n// Value must not include the required 'plus' prefix.\nfunc (v Version) SetMetadata(metadata string) (Version, error) {\n\tvNext := v\n\tif len(metadata) > 0 {\n\t\tif err := validateMetadata(metadata); err != nil {\n\t\t\treturn vNext, err\n\t\t}\n\t}\n\tvNext.metadata = metadata\n\tvNext.original = v.originalVPrefix() + \"\" + vNext.String()\n\treturn vNext, nil\n}\n\n// LessThan tests if one version is less than another one.\nfunc (v *Version) LessThan(o *Version) bool {\n\treturn v.Compare(o) < 0\n}\n\n// LessThanEqual tests if one version is less or equal than another one.\nfunc (v *Version) LessThanEqual(o *Version) bool {\n\treturn v.Compare(o) <= 0\n}\n\n// GreaterThan tests if one version is greater than another one.\nfunc (v *Version) GreaterThan(o *Version) bool {\n\treturn v.Compare(o) > 0\n}\n\n// GreaterThanEqual tests if one version is greater or equal than another one.\nfunc (v *Version) GreaterThanEqual(o *Version) bool {\n\treturn v.Compare(o) >= 0\n}\n\n// Equal tests if two versions are equal to each other.\n// Note, versions can be equal with different metadata since metadata\n// is not considered part of the comparable version.\nfunc (v *Version) Equal(o *Version) bool {\n\tif v == o {\n\t\treturn true\n\t}\n\tif v == nil || o == nil {\n\t\treturn false\n\t}\n\treturn v.Compare(o) == 0\n}\n\n// Compare compares this version to another one. It returns -1, 0, or 1 if\n// the version smaller, equal, or larger than the other version.\n//\n// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is\n// lower than the version without a prerelease. Compare always takes into account\n// prereleases. If you want to work with ranges using typical range syntaxes that\n// skip prereleases if the range is not looking for them use constraints.\nfunc (v *Version) Compare(o *Version) int {\n\t// Compare the major, minor, and patch version for differences. If a\n\t// difference is found return the comparison.\n\tif d := compareSegment(v.Major(), o.Major()); d != 0 {\n\t\treturn d\n\t}\n\tif d := compareSegment(v.Minor(), o.Minor()); d != 0 {\n\t\treturn d\n\t}\n\tif d := compareSegment(v.Patch(), o.Patch()); d != 0 {\n\t\treturn d\n\t}\n\n\t// At this point the major, minor, and patch versions are the same.\n\tps := v.pre\n\tpo := o.Prerelease()\n\n\tif ps == \"\" && po == \"\" {\n\t\treturn 0\n\t}\n\tif ps == \"\" {\n\t\treturn 1\n\t}\n\tif po == \"\" {\n\t\treturn -1\n\t}\n\n\treturn comparePrerelease(ps, po)\n}\n\n// UnmarshalJSON implements JSON.Unmarshaler interface.\nfunc (v *Version) UnmarshalJSON(b []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(b, &s); err != nil {\n\t\treturn err\n\t}\n\ttemp, err := NewVersion(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tv.major = temp.major\n\tv.minor = temp.minor\n\tv.patch = temp.patch\n\tv.pre = temp.pre\n\tv.metadata = temp.metadata\n\tv.original = temp.original\n\treturn nil\n}\n\n// MarshalJSON implements JSON.Marshaler interface.\nfunc (v Version) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(v.String())\n}\n\n// UnmarshalText implements the encoding.TextUnmarshaler interface.\nfunc (v *Version) UnmarshalText(text []byte) error {\n\ttemp, err := NewVersion(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*v = *temp\n\n\treturn nil\n}\n\n// MarshalText implements the encoding.TextMarshaler interface.\nfunc (v Version) MarshalText() ([]byte, error) {\n\treturn []byte(v.String()), nil\n}\n\n// Scan implements the SQL.Scanner interface.\nfunc (v *Version) Scan(value interface{}) error {\n\tvar s string\n\ts, _ = value.(string)\n\ttemp, err := NewVersion(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tv.major = temp.major\n\tv.minor = temp.minor\n\tv.patch = temp.patch\n\tv.pre = temp.pre\n\tv.metadata = temp.metadata\n\tv.original = temp.original\n\treturn nil\n}\n\n// Value implements the Driver.Valuer interface.\nfunc (v Version) Value() (driver.Value, error) {\n\treturn v.String(), nil\n}\n\nfunc compareSegment(v, o uint64) int {\n\tif v < o {\n\t\treturn -1\n\t}\n\tif v > o {\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n\nfunc comparePrerelease(v, o string) int {\n\t// split the prelease versions by their part. The separator, per the spec,\n\t// is a .\n\tsparts := strings.Split(v, \".\")\n\toparts := strings.Split(o, \".\")\n\n\t// Find the longer length of the parts to know how many loop iterations to\n\t// go through.\n\tslen := len(sparts)\n\tolen := len(oparts)\n\n\tl := slen\n\tif olen > slen {\n\t\tl = olen\n\t}\n\n\t// Iterate over each part of the prereleases to compare the differences.\n\tfor i := 0; i < l; i++ {\n\t\t// Since the lentgh of the parts can be different we need to create\n\t\t// a placeholder. This is to avoid out of bounds issues.\n\t\tstemp := \"\"\n\t\tif i < slen {\n\t\t\tstemp = sparts[i]\n\t\t}\n\n\t\totemp := \"\"\n\t\tif i < olen {\n\t\t\totemp = oparts[i]\n\t\t}\n\n\t\td := comparePrePart(stemp, otemp)\n\t\tif d != 0 {\n\t\t\treturn d\n\t\t}\n\t}\n\n\t// Reaching here means two versions are of equal value but have different\n\t// metadata (the part following a +). They are not identical in string form\n\t// but the version comparison finds them to be equal.\n\treturn 0\n}\n\nfunc comparePrePart(s, o string) int {\n\t// Fastpath if they are equal\n\tif s == o {\n\t\treturn 0\n\t}\n\n\t// When s or o are empty we can use the other in an attempt to determine\n\t// the response.\n\tif s == \"\" {\n\t\tif o != \"\" {\n\t\t\treturn -1\n\t\t}\n\t\treturn 1\n\t}\n\n\tif o == \"\" {\n\t\tif s != \"\" {\n\t\t\treturn 1\n\t\t}\n\t\treturn -1\n\t}\n\n\t// When comparing strings \"99\" is greater than \"103\". To handle\n\t// cases like this we need to detect numbers and compare them. According\n\t// to the semver spec, numbers are always positive. If there is a - at the\n\t// start like -99 this is to be evaluated as an alphanum. numbers always\n\t// have precedence over alphanum. Parsing as Uints because negative numbers\n\t// are ignored.\n\n\toi, n1 := strconv.ParseUint(o, 10, 64)\n\tsi, n2 := strconv.ParseUint(s, 10, 64)\n\n\t// The case where both are strings compare the strings\n\tif n1 != nil && n2 != nil {\n\t\tif s > o {\n\t\t\treturn 1\n\t\t}\n\t\treturn -1\n\t} else if n1 != nil {\n\t\t// o is a string and s is a number\n\t\treturn -1\n\t} else if n2 != nil {\n\t\t// s is a string and o is a number\n\t\treturn 1\n\t}\n\t// Both are numbers\n\tif si > oi {\n\t\treturn 1\n\t}\n\treturn -1\n}\n\n// Like strings.ContainsAny but does an only instead of any.\nfunc containsOnly(s string, comp string) bool {\n\treturn strings.IndexFunc(s, func(r rune) bool {\n\t\treturn !strings.ContainsRune(comp, r)\n\t}) == -1\n}\n\n// From the spec, \"Identifiers MUST comprise only\n// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.\n// Numeric identifiers MUST NOT include leading zeroes.\". These segments can\n// be dot separated.\nfunc validatePrerelease(p string) error {\n\teparts := strings.Split(p, \".\")\n\tfor _, p := range eparts {\n\t\tif p == \"\" {\n\t\t\treturn ErrInvalidPrerelease\n\t\t} else if containsOnly(p, num) {\n\t\t\tif len(p) > 1 && p[0] == '0' {\n\t\t\t\treturn ErrSegmentStartsZero\n\t\t\t}\n\t\t} else if !containsOnly(p, allowed) {\n\t\t\treturn ErrInvalidPrerelease\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// From the spec, \"Build metadata MAY be denoted by\n// appending a plus sign and a series of dot separated identifiers immediately\n// following the patch or pre-release version. Identifiers MUST comprise only\n// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty.\"\nfunc validateMetadata(m string) error {\n\teparts := strings.Split(m, \".\")\n\tfor _, p := range eparts {\n\t\tif p == \"\" {\n\t\t\treturn ErrInvalidMetadata\n\t\t} else if !containsOnly(p, allowed) {\n\t\t\treturn ErrInvalidMetadata\n\t\t}\n\t}\n\treturn nil\n}\n\n// validateVersion checks for common validation issues but may not catch all errors\nfunc validateVersion(m []string) error {\n\tvar err error\n\tvar v string\n\tif m[1] != \"\" {\n\t\tif len(m[1]) > 1 && m[1][0] == '0' {\n\t\t\treturn ErrSegmentStartsZero\n\t\t}\n\t\t_, err = strconv.ParseUint(m[1], 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t}\n\n\tif m[2] != \"\" {\n\t\tv = strings.TrimPrefix(m[2], \".\")\n\t\tif len(v) > 1 && v[0] == '0' {\n\t\t\treturn ErrSegmentStartsZero\n\t\t}\n\t\t_, err = strconv.ParseUint(v, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t}\n\n\tif m[3] != \"\" {\n\t\tv = strings.TrimPrefix(m[3], \".\")\n\t\tif len(v) > 1 && v[0] == '0' {\n\t\t\treturn ErrSegmentStartsZero\n\t\t}\n\t\t_, err = strconv.ParseUint(v, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing version segment: %w\", err)\n\t\t}\n\t}\n\n\tif m[5] != \"\" {\n\t\tif err = validatePrerelease(m[5]); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif m[8] != \"\" {\n\t\tif err = validateMetadata(m[8]); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/.gitattributes",
    "content": "* text=auto eol=lf"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/.gitignore",
    "content": ".vscode/\n\n*.exe\n\n# testing\ntestdata\n\n# go workspaces\ngo.work\ngo.work.sum\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/.golangci.yml",
    "content": "linters:\n  enable:\n    # style\n    - containedctx # struct contains a context\n    - dupl # duplicate code\n    - errname # erorrs are named correctly\n    - nolintlint # \"//nolint\" directives are properly explained\n    - revive # golint replacement\n    - unconvert # unnecessary conversions\n    - wastedassign\n\n    # bugs, performance, unused, etc ...\n    - contextcheck # function uses a non-inherited context\n    - errorlint # errors not wrapped for 1.13\n    - exhaustive # check exhaustiveness of enum switch statements\n    - gofmt # files are gofmt'ed\n    - gosec # security\n    - nilerr # returns nil even with non-nil error\n    - thelper #  test helpers without t.Helper()\n    - unparam # unused function params\n\nissues:\n  exclude-dirs:\n    - pkg/etw/sample\n\n  exclude-rules:\n    # err is very often shadowed in nested scopes\n    - linters:\n        - govet\n      text: '^shadow: declaration of \"err\" shadows declaration'\n\n    # ignore long lines for skip autogen directives\n    - linters:\n        - revive\n      text: \"^line-length-limit: \"\n      source: \"^//(go:generate|sys) \"\n\n    #TODO: remove after upgrading to go1.18\n    # ignore comment spacing for nolint and sys directives\n    - linters:\n        - revive\n      text: \"^comment-spacings: no space between comment delimiter and comment text\"\n      source: \"//(cspell:|nolint:|sys |todo)\"\n\n    # not on go 1.18 yet, so no any\n    - linters:\n        - revive\n      text: \"^use-any: since GO 1.18 'interface{}' can be replaced by 'any'\"\n\n    # allow unjustified ignores of error checks in defer statements\n    - linters:\n        - nolintlint\n      text: \"^directive `//nolint:errcheck` should provide explanation\"\n      source: '^\\s*defer '\n\n    # allow unjustified ignores of error lints for io.EOF\n    - linters:\n        - nolintlint\n      text: \"^directive `//nolint:errorlint` should provide explanation\"\n      source: '[=|!]= io.EOF'\n\n\nlinters-settings:\n  exhaustive:\n    default-signifies-exhaustive: true\n  govet:\n    enable-all: true\n    disable:\n      # struct order is often for Win32 compat\n      # also, ignore pointer bytes/GC issues for now until performance becomes an issue\n      - fieldalignment\n  nolintlint:\n    require-explanation: true\n    require-specific: true\n  revive:\n    # revive is more configurable than static check, so likely the preferred alternative to static-check\n    # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997)\n    enable-all-rules:\n      true\n      # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md\n    rules:\n      # rules with required arguments\n      - name: argument-limit\n        disabled: true\n      - name: banned-characters\n        disabled: true\n      - name: cognitive-complexity\n        disabled: true\n      - name: cyclomatic\n        disabled: true\n      - name: file-header\n        disabled: true\n      - name: function-length\n        disabled: true\n      - name: function-result-limit\n        disabled: true\n      - name: max-public-structs\n        disabled: true\n      # geneally annoying rules\n      - name: add-constant # complains about any and all strings and integers\n        disabled: true\n      - name: confusing-naming # we frequently use \"Foo()\" and \"foo()\" together\n        disabled: true\n      - name: flag-parameter # excessive, and a common idiom we use\n        disabled: true\n      - name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead\n        disabled: true\n      # general config\n      - name: line-length-limit\n        arguments:\n          - 140\n      - name: var-naming\n        arguments:\n          - []\n          - - CID\n            - CRI\n            - CTRD\n            - DACL\n            - DLL\n            - DOS\n            - ETW\n            - FSCTL\n            - GCS\n            - GMSA\n            - HCS\n            - HV\n            - IO\n            - LCOW\n            - LDAP\n            - LPAC\n            - LTSC\n            - MMIO\n            - NT\n            - OCI\n            - PMEM\n            - PWSH\n            - RX\n            - SACl\n            - SID\n            - SMB\n            - TX\n            - VHD\n            - VHDX\n            - VMID\n            - VPCI\n            - WCOW\n            - WIM\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/CODEOWNERS",
    "content": "  * @microsoft/containerplat\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Microsoft\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\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/README.md",
    "content": "# go-winio [![Build Status](https://github.com/microsoft/go-winio/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/go-winio/actions/workflows/ci.yml)\n\nThis repository contains utilities for efficiently performing Win32 IO operations in\nGo. Currently, this is focused on accessing named pipes and other file handles, and\nfor using named pipes as a net transport.\n\nThis code relies on IO completion ports to avoid blocking IO on system threads, allowing Go\nto reuse the thread to schedule another goroutine. This limits support to Windows Vista and\nnewer operating systems. This is similar to the implementation of network sockets in Go's net\npackage.\n\nPlease see the LICENSE file for licensing information.\n\n## Contributing\n\nThis project welcomes contributions and suggestions.\nMost contributions require you to agree to a Contributor License Agreement (CLA) declaring that\nyou have the right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [Microsoft CLA](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to\nprovide a CLA and decorate the PR appropriately (e.g., label, comment).\nSimply follow the instructions provided by the bot.\nYou will only need to do this once across all repos using our CLA.\n\nAdditionally, the pull request pipeline requires the following steps to be performed before\nmergining.\n\n### Code Sign-Off\n\nWe require that contributors sign their commits using [`git commit --signoff`][git-commit-s]\nto certify they either authored the work themselves or otherwise have permission to use it in this project.\n\nA range of commits can be signed off using [`git rebase --signoff`][git-rebase-s].\n\nPlease see [the developer certificate](https://developercertificate.org) for more info,\nas well as to make sure that you can attest to the rules listed.\nOur CI uses the DCO Github app to ensure that all commits in a given PR are signed-off.\n\n### Linting\n\nCode must pass a linting stage, which uses [`golangci-lint`][lint].\nThe linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run\nautomatically with VSCode by adding the following to your workspace or folder settings:\n\n```json\n    \"go.lintTool\": \"golangci-lint\",\n    \"go.lintOnSave\": \"package\",\n```\n\nAdditional editor [integrations options are also available][lint-ide].\n\nAlternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root:\n\n```shell\n# use . or specify a path to only lint a package\n# to show all lint errors, use flags \"--max-issues-per-linter=0 --max-same-issues=0\"\n> golangci-lint run ./...\n```\n\n### Go Generate\n\nThe pipeline checks that auto-generated code, via `go generate`, are up to date.\n\nThis can be done for the entire repo:\n\n```shell\n> go generate ./...\n```\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Special Thanks\n\nThanks to [natefinch][natefinch] for the inspiration for this library.\nSee [npipe](https://github.com/natefinch/npipe) for another named pipe implementation.\n\n[lint]: https://golangci-lint.run/\n[lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration\n[lint-install]: https://golangci-lint.run/usage/install/#local-installation\n\n[git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s\n[git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff\n\n[natefinch]: https://github.com/natefinch\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/SECURITY.md",
    "content": "<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 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), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).\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/opensource/security/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/opensource/security/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/opensource/security/pgpkey).\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://aka.ms/opensource/security/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/opensource/security/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/opensource/security/cvd).\n\n<!-- END MICROSOFT SECURITY.MD BLOCK -->\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/backup.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"unicode/utf16\"\n\n\t\"github.com/Microsoft/go-winio/internal/fs\"\n\t\"golang.org/x/sys/windows\"\n)\n\n//sys backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead\n//sys backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite\n\nconst (\n\tBackupData = uint32(iota + 1)\n\tBackupEaData\n\tBackupSecurity\n\tBackupAlternateData\n\tBackupLink\n\tBackupPropertyData\n\tBackupObjectId //revive:disable-line:var-naming ID, not Id\n\tBackupReparseData\n\tBackupSparseBlock\n\tBackupTxfsData\n)\n\nconst (\n\tStreamSparseAttributes = uint32(8)\n)\n\n//nolint:revive // var-naming: ALL_CAPS\nconst (\n\tWRITE_DAC              = windows.WRITE_DAC\n\tWRITE_OWNER            = windows.WRITE_OWNER\n\tACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY\n)\n\n// BackupHeader represents a backup stream of a file.\ntype BackupHeader struct {\n\t//revive:disable-next-line:var-naming ID, not Id\n\tId         uint32 // The backup stream ID\n\tAttributes uint32 // Stream attributes\n\tSize       int64  // The size of the stream in bytes\n\tName       string // The name of the stream (for BackupAlternateData only).\n\tOffset     int64  // The offset of the stream in the file (for BackupSparseBlock only).\n}\n\ntype win32StreamID struct {\n\tStreamID   uint32\n\tAttributes uint32\n\tSize       uint64\n\tNameSize   uint32\n}\n\n// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series\n// of BackupHeader values.\ntype BackupStreamReader struct {\n\tr         io.Reader\n\tbytesLeft int64\n}\n\n// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.\nfunc NewBackupStreamReader(r io.Reader) *BackupStreamReader {\n\treturn &BackupStreamReader{r, 0}\n}\n\n// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if\n// it was not completely read.\nfunc (r *BackupStreamReader) Next() (*BackupHeader, error) {\n\tif r.bytesLeft > 0 { //nolint:nestif // todo: flatten this\n\t\tif s, ok := r.r.(io.Seeker); ok {\n\t\t\t// Make sure Seek on io.SeekCurrent sometimes succeeds\n\t\t\t// before trying the actual seek.\n\t\t\tif _, err := s.Seek(0, io.SeekCurrent); err == nil {\n\t\t\t\tif _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tr.bytesLeft = 0\n\t\t\t}\n\t\t}\n\t\tif _, err := io.Copy(io.Discard, r); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tvar wsi win32StreamID\n\tif err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {\n\t\treturn nil, err\n\t}\n\thdr := &BackupHeader{\n\t\tId:         wsi.StreamID,\n\t\tAttributes: wsi.Attributes,\n\t\tSize:       int64(wsi.Size),\n\t}\n\tif wsi.NameSize != 0 {\n\t\tname := make([]uint16, int(wsi.NameSize/2))\n\t\tif err := binary.Read(r.r, binary.LittleEndian, name); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thdr.Name = windows.UTF16ToString(name)\n\t}\n\tif wsi.StreamID == BackupSparseBlock {\n\t\tif err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thdr.Size -= 8\n\t}\n\tr.bytesLeft = hdr.Size\n\treturn hdr, nil\n}\n\n// Read reads from the current backup stream.\nfunc (r *BackupStreamReader) Read(b []byte) (int, error) {\n\tif r.bytesLeft == 0 {\n\t\treturn 0, io.EOF\n\t}\n\tif int64(len(b)) > r.bytesLeft {\n\t\tb = b[:r.bytesLeft]\n\t}\n\tn, err := r.r.Read(b)\n\tr.bytesLeft -= int64(n)\n\tif err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t} else if r.bytesLeft == 0 && err == nil {\n\t\terr = io.EOF\n\t}\n\treturn n, err\n}\n\n// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.\ntype BackupStreamWriter struct {\n\tw         io.Writer\n\tbytesLeft int64\n}\n\n// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.\nfunc NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {\n\treturn &BackupStreamWriter{w, 0}\n}\n\n// WriteHeader writes the next backup stream header and prepares for calls to Write().\nfunc (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {\n\tif w.bytesLeft != 0 {\n\t\treturn fmt.Errorf(\"missing %d bytes\", w.bytesLeft)\n\t}\n\tname := utf16.Encode([]rune(hdr.Name))\n\twsi := win32StreamID{\n\t\tStreamID:   hdr.Id,\n\t\tAttributes: hdr.Attributes,\n\t\tSize:       uint64(hdr.Size),\n\t\tNameSize:   uint32(len(name) * 2),\n\t}\n\tif hdr.Id == BackupSparseBlock {\n\t\t// Include space for the int64 block offset\n\t\twsi.Size += 8\n\t}\n\tif err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {\n\t\treturn err\n\t}\n\tif len(name) != 0 {\n\t\tif err := binary.Write(w.w, binary.LittleEndian, name); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif hdr.Id == BackupSparseBlock {\n\t\tif err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tw.bytesLeft = hdr.Size\n\treturn nil\n}\n\n// Write writes to the current backup stream.\nfunc (w *BackupStreamWriter) Write(b []byte) (int, error) {\n\tif w.bytesLeft < int64(len(b)) {\n\t\treturn 0, fmt.Errorf(\"too many bytes by %d\", int64(len(b))-w.bytesLeft)\n\t}\n\tn, err := w.w.Write(b)\n\tw.bytesLeft -= int64(n)\n\treturn n, err\n}\n\n// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.\ntype BackupFileReader struct {\n\tf               *os.File\n\tincludeSecurity bool\n\tctx             uintptr\n}\n\n// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,\n// Read will attempt to read the security descriptor of the file.\nfunc NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {\n\tr := &BackupFileReader{f, includeSecurity, 0}\n\treturn r\n}\n\n// Read reads a backup stream from the file by calling the Win32 API BackupRead().\nfunc (r *BackupFileReader) Read(b []byte) (int, error) {\n\tvar bytesRead uint32\n\terr := backupRead(windows.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)\n\tif err != nil {\n\t\treturn 0, &os.PathError{Op: \"BackupRead\", Path: r.f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(r.f)\n\tif bytesRead == 0 {\n\t\treturn 0, io.EOF\n\t}\n\treturn int(bytesRead), nil\n}\n\n// Close frees Win32 resources associated with the BackupFileReader. It does not close\n// the underlying file.\nfunc (r *BackupFileReader) Close() error {\n\tif r.ctx != 0 {\n\t\t_ = backupRead(windows.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)\n\t\truntime.KeepAlive(r.f)\n\t\tr.ctx = 0\n\t}\n\treturn nil\n}\n\n// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.\ntype BackupFileWriter struct {\n\tf               *os.File\n\tincludeSecurity bool\n\tctx             uintptr\n}\n\n// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true,\n// Write() will attempt to restore the security descriptor from the stream.\nfunc NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {\n\tw := &BackupFileWriter{f, includeSecurity, 0}\n\treturn w\n}\n\n// Write restores a portion of the file using the provided backup stream.\nfunc (w *BackupFileWriter) Write(b []byte) (int, error) {\n\tvar bytesWritten uint32\n\terr := backupWrite(windows.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)\n\tif err != nil {\n\t\treturn 0, &os.PathError{Op: \"BackupWrite\", Path: w.f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(w.f)\n\tif int(bytesWritten) != len(b) {\n\t\treturn int(bytesWritten), errors.New(\"not all bytes could be written\")\n\t}\n\treturn len(b), nil\n}\n\n// Close frees Win32 resources associated with the BackupFileWriter. It does not\n// close the underlying file.\nfunc (w *BackupFileWriter) Close() error {\n\tif w.ctx != 0 {\n\t\t_ = backupWrite(windows.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)\n\t\truntime.KeepAlive(w.f)\n\t\tw.ctx = 0\n\t}\n\treturn nil\n}\n\n// OpenForBackup opens a file or directory, potentially skipping access checks if the backup\n// or restore privileges have been acquired.\n//\n// If the file opened was a directory, it cannot be used with Readdir().\nfunc OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {\n\th, err := fs.CreateFile(path,\n\t\tfs.AccessMask(access),\n\t\tfs.FileShareMode(share),\n\t\tnil,\n\t\tfs.FileCreationDisposition(createmode),\n\t\tfs.FILE_FLAG_BACKUP_SEMANTICS|fs.FILE_FLAG_OPEN_REPARSE_POINT,\n\t\t0,\n\t)\n\tif err != nil {\n\t\terr = &os.PathError{Op: \"open\", Path: path, Err: err}\n\t\treturn nil, err\n\t}\n\treturn os.NewFile(uintptr(h), path), nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/doc.go",
    "content": "// This package provides utilities for efficiently performing Win32 IO operations in Go.\n// Currently, this package is provides support for genreal IO and management of\n//   - named pipes\n//   - files\n//   - [Hyper-V sockets]\n//\n// This code is similar to Go's [net] package, and uses IO completion ports to avoid\n// blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines.\n//\n// This limits support to Windows Vista and newer operating systems.\n//\n// Additionally, this package provides support for:\n//   - creating and managing GUIDs\n//   - writing to [ETW]\n//   - opening and manageing VHDs\n//   - parsing [Windows Image files]\n//   - auto-generating Win32 API code\n//\n// [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service\n// [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-\n// [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images\npackage winio\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/ea.go",
    "content": "package winio\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n)\n\ntype fileFullEaInformation struct {\n\tNextEntryOffset uint32\n\tFlags           uint8\n\tNameLength      uint8\n\tValueLength     uint16\n}\n\nvar (\n\tfileFullEaInformationSize = binary.Size(&fileFullEaInformation{})\n\n\terrInvalidEaBuffer = errors.New(\"invalid extended attribute buffer\")\n\terrEaNameTooLarge  = errors.New(\"extended attribute name too large\")\n\terrEaValueTooLarge = errors.New(\"extended attribute value too large\")\n)\n\n// ExtendedAttribute represents a single Windows EA.\ntype ExtendedAttribute struct {\n\tName  string\n\tValue []byte\n\tFlags uint8\n}\n\nfunc parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) {\n\tvar info fileFullEaInformation\n\terr = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info)\n\tif err != nil {\n\t\terr = errInvalidEaBuffer\n\t\treturn ea, nb, err\n\t}\n\n\tnameOffset := fileFullEaInformationSize\n\tnameLen := int(info.NameLength)\n\tvalueOffset := nameOffset + int(info.NameLength) + 1\n\tvalueLen := int(info.ValueLength)\n\tnextOffset := int(info.NextEntryOffset)\n\tif valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) {\n\t\terr = errInvalidEaBuffer\n\t\treturn ea, nb, err\n\t}\n\n\tea.Name = string(b[nameOffset : nameOffset+nameLen])\n\tea.Value = b[valueOffset : valueOffset+valueLen]\n\tea.Flags = info.Flags\n\tif info.NextEntryOffset != 0 {\n\t\tnb = b[info.NextEntryOffset:]\n\t}\n\treturn ea, nb, err\n}\n\n// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION\n// buffer retrieved from BackupRead, ZwQueryEaFile, etc.\nfunc DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) {\n\tfor len(b) != 0 {\n\t\tea, nb, err := parseEa(b)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\teas = append(eas, ea)\n\t\tb = nb\n\t}\n\treturn eas, err\n}\n\nfunc writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error {\n\tif int(uint8(len(ea.Name))) != len(ea.Name) {\n\t\treturn errEaNameTooLarge\n\t}\n\tif int(uint16(len(ea.Value))) != len(ea.Value) {\n\t\treturn errEaValueTooLarge\n\t}\n\tentrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value))\n\twithPadding := (entrySize + 3) &^ 3\n\tnextOffset := uint32(0)\n\tif !last {\n\t\tnextOffset = withPadding\n\t}\n\tinfo := fileFullEaInformation{\n\t\tNextEntryOffset: nextOffset,\n\t\tFlags:           ea.Flags,\n\t\tNameLength:      uint8(len(ea.Name)),\n\t\tValueLength:     uint16(len(ea.Value)),\n\t}\n\n\terr := binary.Write(buf, binary.LittleEndian, &info)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = buf.Write([]byte(ea.Name))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = buf.WriteByte(0)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = buf.Write(ea.Value)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize])\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION\n// buffer for use with BackupWrite, ZwSetEaFile, etc.\nfunc EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) {\n\tvar buf bytes.Buffer\n\tfor i := range eas {\n\t\tlast := false\n\t\tif i == len(eas)-1 {\n\t\t\tlast = true\n\t\t}\n\n\t\terr := writeEa(&buf, &eas[i], last)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn buf.Bytes(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/file.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"runtime\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n//sys cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) = CancelIoEx\n//sys createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) = CreateIoCompletionPort\n//sys getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus\n//sys setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes\n//sys wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult\n\nvar (\n\tErrFileClosed = errors.New(\"file has already been closed\")\n\tErrTimeout    = &timeoutError{}\n)\n\ntype timeoutError struct{}\n\nfunc (*timeoutError) Error() string   { return \"i/o timeout\" }\nfunc (*timeoutError) Timeout() bool   { return true }\nfunc (*timeoutError) Temporary() bool { return true }\n\ntype timeoutChan chan struct{}\n\nvar ioInitOnce sync.Once\nvar ioCompletionPort windows.Handle\n\n// ioResult contains the result of an asynchronous IO operation.\ntype ioResult struct {\n\tbytes uint32\n\terr   error\n}\n\n// ioOperation represents an outstanding asynchronous Win32 IO.\ntype ioOperation struct {\n\to  windows.Overlapped\n\tch chan ioResult\n}\n\nfunc initIO() {\n\th, err := createIoCompletionPort(windows.InvalidHandle, 0, 0, 0xffffffff)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tioCompletionPort = h\n\tgo ioCompletionProcessor(h)\n}\n\n// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.\n// It takes ownership of this handle and will close it if it is garbage collected.\ntype win32File struct {\n\thandle        windows.Handle\n\twg            sync.WaitGroup\n\twgLock        sync.RWMutex\n\tclosing       atomic.Bool\n\tsocket        bool\n\treadDeadline  deadlineHandler\n\twriteDeadline deadlineHandler\n}\n\ntype deadlineHandler struct {\n\tsetLock     sync.Mutex\n\tchannel     timeoutChan\n\tchannelLock sync.RWMutex\n\ttimer       *time.Timer\n\ttimedout    atomic.Bool\n}\n\n// makeWin32File makes a new win32File from an existing file handle.\nfunc makeWin32File(h windows.Handle) (*win32File, error) {\n\tf := &win32File{handle: h}\n\tioInitOnce.Do(initIO)\n\t_, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tf.readDeadline.channel = make(timeoutChan)\n\tf.writeDeadline.channel = make(timeoutChan)\n\treturn f, nil\n}\n\n// Deprecated: use NewOpenFile instead.\nfunc MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {\n\treturn NewOpenFile(windows.Handle(h))\n}\n\nfunc NewOpenFile(h windows.Handle) (io.ReadWriteCloser, error) {\n\t// If we return the result of makeWin32File directly, it can result in an\n\t// interface-wrapped nil, rather than a nil interface value.\n\tf, err := makeWin32File(h)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn f, nil\n}\n\n// closeHandle closes the resources associated with a Win32 handle.\nfunc (f *win32File) closeHandle() {\n\tf.wgLock.Lock()\n\t// Atomically set that we are closing, releasing the resources only once.\n\tif !f.closing.Swap(true) {\n\t\tf.wgLock.Unlock()\n\t\t// cancel all IO and wait for it to complete\n\t\t_ = cancelIoEx(f.handle, nil)\n\t\tf.wg.Wait()\n\t\t// at this point, no new IO can start\n\t\twindows.Close(f.handle)\n\t\tf.handle = 0\n\t} else {\n\t\tf.wgLock.Unlock()\n\t}\n}\n\n// Close closes a win32File.\nfunc (f *win32File) Close() error {\n\tf.closeHandle()\n\treturn nil\n}\n\n// IsClosed checks if the file has been closed.\nfunc (f *win32File) IsClosed() bool {\n\treturn f.closing.Load()\n}\n\n// prepareIO prepares for a new IO operation.\n// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.\nfunc (f *win32File) prepareIO() (*ioOperation, error) {\n\tf.wgLock.RLock()\n\tif f.closing.Load() {\n\t\tf.wgLock.RUnlock()\n\t\treturn nil, ErrFileClosed\n\t}\n\tf.wg.Add(1)\n\tf.wgLock.RUnlock()\n\tc := &ioOperation{}\n\tc.ch = make(chan ioResult)\n\treturn c, nil\n}\n\n// ioCompletionProcessor processes completed async IOs forever.\nfunc ioCompletionProcessor(h windows.Handle) {\n\tfor {\n\t\tvar bytes uint32\n\t\tvar key uintptr\n\t\tvar op *ioOperation\n\t\terr := getQueuedCompletionStatus(h, &bytes, &key, &op, windows.INFINITE)\n\t\tif op == nil {\n\t\t\tpanic(err)\n\t\t}\n\t\top.ch <- ioResult{bytes, err}\n\t}\n}\n\n// todo: helsaawy - create an asyncIO version that takes a context\n\n// asyncIO processes the return value from ReadFile or WriteFile, blocking until\n// the operation has actually completed.\nfunc (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) {\n\tif err != windows.ERROR_IO_PENDING { //nolint:errorlint // err is Errno\n\t\treturn int(bytes), err\n\t}\n\n\tif f.closing.Load() {\n\t\t_ = cancelIoEx(f.handle, &c.o)\n\t}\n\n\tvar timeout timeoutChan\n\tif d != nil {\n\t\td.channelLock.Lock()\n\t\ttimeout = d.channel\n\t\td.channelLock.Unlock()\n\t}\n\n\tvar r ioResult\n\tselect {\n\tcase r = <-c.ch:\n\t\terr = r.err\n\t\tif err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno\n\t\t\tif f.closing.Load() {\n\t\t\t\terr = ErrFileClosed\n\t\t\t}\n\t\t} else if err != nil && f.socket {\n\t\t\t// err is from Win32. Query the overlapped structure to get the winsock error.\n\t\t\tvar bytes, flags uint32\n\t\t\terr = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags)\n\t\t}\n\tcase <-timeout:\n\t\t_ = cancelIoEx(f.handle, &c.o)\n\t\tr = <-c.ch\n\t\terr = r.err\n\t\tif err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno\n\t\t\terr = ErrTimeout\n\t\t}\n\t}\n\n\t// runtime.KeepAlive is needed, as c is passed via native\n\t// code to ioCompletionProcessor, c must remain alive\n\t// until the channel read is complete.\n\t// todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive?\n\truntime.KeepAlive(c)\n\treturn int(r.bytes), err\n}\n\n// Read reads from a file handle.\nfunc (f *win32File) Read(b []byte) (int, error) {\n\tc, err := f.prepareIO()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer f.wg.Done()\n\n\tif f.readDeadline.timedout.Load() {\n\t\treturn 0, ErrTimeout\n\t}\n\n\tvar bytes uint32\n\terr = windows.ReadFile(f.handle, b, &bytes, &c.o)\n\tn, err := f.asyncIO(c, &f.readDeadline, bytes, err)\n\truntime.KeepAlive(b)\n\n\t// Handle EOF conditions.\n\tif err == nil && n == 0 && len(b) != 0 {\n\t\treturn 0, io.EOF\n\t} else if err == windows.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno\n\t\treturn 0, io.EOF\n\t}\n\treturn n, err\n}\n\n// Write writes to a file handle.\nfunc (f *win32File) Write(b []byte) (int, error) {\n\tc, err := f.prepareIO()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer f.wg.Done()\n\n\tif f.writeDeadline.timedout.Load() {\n\t\treturn 0, ErrTimeout\n\t}\n\n\tvar bytes uint32\n\terr = windows.WriteFile(f.handle, b, &bytes, &c.o)\n\tn, err := f.asyncIO(c, &f.writeDeadline, bytes, err)\n\truntime.KeepAlive(b)\n\treturn n, err\n}\n\nfunc (f *win32File) SetReadDeadline(deadline time.Time) error {\n\treturn f.readDeadline.set(deadline)\n}\n\nfunc (f *win32File) SetWriteDeadline(deadline time.Time) error {\n\treturn f.writeDeadline.set(deadline)\n}\n\nfunc (f *win32File) Flush() error {\n\treturn windows.FlushFileBuffers(f.handle)\n}\n\nfunc (f *win32File) Fd() uintptr {\n\treturn uintptr(f.handle)\n}\n\nfunc (d *deadlineHandler) set(deadline time.Time) error {\n\td.setLock.Lock()\n\tdefer d.setLock.Unlock()\n\n\tif d.timer != nil {\n\t\tif !d.timer.Stop() {\n\t\t\t<-d.channel\n\t\t}\n\t\td.timer = nil\n\t}\n\td.timedout.Store(false)\n\n\tselect {\n\tcase <-d.channel:\n\t\td.channelLock.Lock()\n\t\td.channel = make(chan struct{})\n\t\td.channelLock.Unlock()\n\tdefault:\n\t}\n\n\tif deadline.IsZero() {\n\t\treturn nil\n\t}\n\n\ttimeoutIO := func() {\n\t\td.timedout.Store(true)\n\t\tclose(d.channel)\n\t}\n\n\tnow := time.Now()\n\tduration := deadline.Sub(now)\n\tif deadline.After(now) {\n\t\t// Deadline is in the future, set a timer to wait\n\t\td.timer = time.AfterFunc(duration, timeoutIO)\n\t} else {\n\t\t// Deadline is in the past. Cancel all pending IO now.\n\t\ttimeoutIO()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/fileinfo.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n// FileBasicInfo contains file access time and file attributes information.\ntype FileBasicInfo struct {\n\tCreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime\n\tFileAttributes                                          uint32\n\t_                                                       uint32 // padding\n}\n\n// alignedFileBasicInfo is a FileBasicInfo, but aligned to uint64 by containing\n// uint64 rather than windows.Filetime. Filetime contains two uint32s. uint64\n// alignment is necessary to pass this as FILE_BASIC_INFO.\ntype alignedFileBasicInfo struct {\n\tCreationTime, LastAccessTime, LastWriteTime, ChangeTime uint64\n\tFileAttributes                                          uint32\n\t_                                                       uint32 // padding\n}\n\n// GetFileBasicInfo retrieves times and attributes for a file.\nfunc GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {\n\tbi := &alignedFileBasicInfo{}\n\tif err := windows.GetFileInformationByHandleEx(\n\t\twindows.Handle(f.Fd()),\n\t\twindows.FileBasicInfo,\n\t\t(*byte)(unsafe.Pointer(bi)),\n\t\tuint32(unsafe.Sizeof(*bi)),\n\t); err != nil {\n\t\treturn nil, &os.PathError{Op: \"GetFileInformationByHandleEx\", Path: f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(f)\n\t// Reinterpret the alignedFileBasicInfo as a FileBasicInfo so it matches the\n\t// public API of this module. The data may be unnecessarily aligned.\n\treturn (*FileBasicInfo)(unsafe.Pointer(bi)), nil\n}\n\n// SetFileBasicInfo sets times and attributes for a file.\nfunc SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {\n\t// Create an alignedFileBasicInfo based on a FileBasicInfo. The copy is\n\t// suitable to pass to GetFileInformationByHandleEx.\n\tbiAligned := *(*alignedFileBasicInfo)(unsafe.Pointer(bi))\n\tif err := windows.SetFileInformationByHandle(\n\t\twindows.Handle(f.Fd()),\n\t\twindows.FileBasicInfo,\n\t\t(*byte)(unsafe.Pointer(&biAligned)),\n\t\tuint32(unsafe.Sizeof(biAligned)),\n\t); err != nil {\n\t\treturn &os.PathError{Op: \"SetFileInformationByHandle\", Path: f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(f)\n\treturn nil\n}\n\n// FileStandardInfo contains extended information for the file.\n// FILE_STANDARD_INFO in WinBase.h\n// https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info\ntype FileStandardInfo struct {\n\tAllocationSize, EndOfFile int64\n\tNumberOfLinks             uint32\n\tDeletePending, Directory  bool\n}\n\n// GetFileStandardInfo retrieves ended information for the file.\nfunc GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) {\n\tsi := &FileStandardInfo{}\n\tif err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()),\n\t\twindows.FileStandardInfo,\n\t\t(*byte)(unsafe.Pointer(si)),\n\t\tuint32(unsafe.Sizeof(*si))); err != nil {\n\t\treturn nil, &os.PathError{Op: \"GetFileInformationByHandleEx\", Path: f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(f)\n\treturn si, nil\n}\n\n// FileIDInfo contains the volume serial number and file ID for a file. This pair should be\n// unique on a system.\ntype FileIDInfo struct {\n\tVolumeSerialNumber uint64\n\tFileID             [16]byte\n}\n\n// GetFileID retrieves the unique (volume, file ID) pair for a file.\nfunc GetFileID(f *os.File) (*FileIDInfo, error) {\n\tfileID := &FileIDInfo{}\n\tif err := windows.GetFileInformationByHandleEx(\n\t\twindows.Handle(f.Fd()),\n\t\twindows.FileIdInfo,\n\t\t(*byte)(unsafe.Pointer(fileID)),\n\t\tuint32(unsafe.Sizeof(*fileID)),\n\t); err != nil {\n\t\treturn nil, &os.PathError{Op: \"GetFileInformationByHandleEx\", Path: f.Name(), Err: err}\n\t}\n\truntime.KeepAlive(f)\n\treturn fileID, nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/hvsock.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\t\"time\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n\n\t\"github.com/Microsoft/go-winio/internal/socket\"\n\t\"github.com/Microsoft/go-winio/pkg/guid\"\n)\n\nconst afHVSock = 34 // AF_HYPERV\n\n// Well known Service and VM IDs\n// https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards\n\n// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.\nfunc HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000\n\treturn guid.GUID{}\n}\n\n// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.\nfunc HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff\n\treturn guid.GUID{\n\t\tData1: 0xffffffff,\n\t\tData2: 0xffff,\n\t\tData3: 0xffff,\n\t\tData4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},\n\t}\n}\n\n// HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector.\nfunc HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838\n\treturn guid.GUID{\n\t\tData1: 0xe0e16197,\n\t\tData2: 0xdd56,\n\t\tData3: 0x4a10,\n\t\tData4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38},\n\t}\n}\n\n// HvsockGUIDSiloHost is the address of a silo's host partition:\n//   - The silo host of a hosted silo is the utility VM.\n//   - The silo host of a silo on a physical host is the physical host.\nfunc HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568\n\treturn guid.GUID{\n\t\tData1: 0x36bd0c5c,\n\t\tData2: 0x7276,\n\t\tData3: 0x4223,\n\t\tData4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68},\n\t}\n}\n\n// HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions.\nfunc HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd\n\treturn guid.GUID{\n\t\tData1: 0x90db8b89,\n\t\tData2: 0xd35,\n\t\tData3: 0x4f79,\n\t\tData4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd},\n\t}\n}\n\n// HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition.\n// Listening on this VmId accepts connection from:\n//   - Inside silos: silo host partition.\n//   - Inside hosted silo: host of the VM.\n//   - Inside VM: VM host.\n//   - Physical host: Not supported.\nfunc HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878\n\treturn guid.GUID{\n\t\tData1: 0xa42e7cda,\n\t\tData2: 0xd03f,\n\t\tData3: 0x480c,\n\t\tData4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78},\n\t}\n}\n\n// hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol.\nfunc hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3\n\treturn guid.GUID{\n\t\tData2: 0xfacb,\n\t\tData3: 0x11e6,\n\t\tData4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3},\n\t}\n}\n\n// An HvsockAddr is an address for a AF_HYPERV socket.\ntype HvsockAddr struct {\n\tVMID      guid.GUID\n\tServiceID guid.GUID\n}\n\ntype rawHvsockAddr struct {\n\tFamily    uint16\n\t_         uint16\n\tVMID      guid.GUID\n\tServiceID guid.GUID\n}\n\nvar _ socket.RawSockaddr = &rawHvsockAddr{}\n\n// Network returns the address's network name, \"hvsock\".\nfunc (*HvsockAddr) Network() string {\n\treturn \"hvsock\"\n}\n\nfunc (addr *HvsockAddr) String() string {\n\treturn fmt.Sprintf(\"%s:%s\", &addr.VMID, &addr.ServiceID)\n}\n\n// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port.\nfunc VsockServiceID(port uint32) guid.GUID {\n\tg := hvsockVsockServiceTemplate() // make a copy\n\tg.Data1 = port\n\treturn g\n}\n\nfunc (addr *HvsockAddr) raw() rawHvsockAddr {\n\treturn rawHvsockAddr{\n\t\tFamily:    afHVSock,\n\t\tVMID:      addr.VMID,\n\t\tServiceID: addr.ServiceID,\n\t}\n}\n\nfunc (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) {\n\taddr.VMID = raw.VMID\n\taddr.ServiceID = raw.ServiceID\n}\n\n// Sockaddr returns a pointer to and the size of this struct.\n//\n// Implements the [socket.RawSockaddr] interface, and allows use in\n// [socket.Bind] and [socket.ConnectEx].\nfunc (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) {\n\treturn unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil\n}\n\n// Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`.\nfunc (r *rawHvsockAddr) FromBytes(b []byte) error {\n\tn := int(unsafe.Sizeof(rawHvsockAddr{}))\n\n\tif len(b) < n {\n\t\treturn fmt.Errorf(\"got %d, want %d: %w\", len(b), n, socket.ErrBufferSize)\n\t}\n\n\tcopy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n])\n\tif r.Family != afHVSock {\n\t\treturn fmt.Errorf(\"got %d, want %d: %w\", r.Family, afHVSock, socket.ErrAddrFamily)\n\t}\n\n\treturn nil\n}\n\n// HvsockListener is a socket listener for the AF_HYPERV address family.\ntype HvsockListener struct {\n\tsock *win32File\n\taddr HvsockAddr\n}\n\nvar _ net.Listener = &HvsockListener{}\n\n// HvsockConn is a connected socket of the AF_HYPERV address family.\ntype HvsockConn struct {\n\tsock          *win32File\n\tlocal, remote HvsockAddr\n}\n\nvar _ net.Conn = &HvsockConn{}\n\nfunc newHVSocket() (*win32File, error) {\n\tfd, err := windows.Socket(afHVSock, windows.SOCK_STREAM, 1)\n\tif err != nil {\n\t\treturn nil, os.NewSyscallError(\"socket\", err)\n\t}\n\tf, err := makeWin32File(fd)\n\tif err != nil {\n\t\twindows.Close(fd)\n\t\treturn nil, err\n\t}\n\tf.socket = true\n\treturn f, nil\n}\n\n// ListenHvsock listens for connections on the specified hvsock address.\nfunc ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) {\n\tl := &HvsockListener{addr: *addr}\n\n\tvar sock *win32File\n\tsock, err = newHVSocket()\n\tif err != nil {\n\t\treturn nil, l.opErr(\"listen\", err)\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t_ = sock.Close()\n\t\t}\n\t}()\n\n\tsa := addr.raw()\n\terr = socket.Bind(sock.handle, &sa)\n\tif err != nil {\n\t\treturn nil, l.opErr(\"listen\", os.NewSyscallError(\"socket\", err))\n\t}\n\terr = windows.Listen(sock.handle, 16)\n\tif err != nil {\n\t\treturn nil, l.opErr(\"listen\", os.NewSyscallError(\"listen\", err))\n\t}\n\treturn &HvsockListener{sock: sock, addr: *addr}, nil\n}\n\nfunc (l *HvsockListener) opErr(op string, err error) error {\n\treturn &net.OpError{Op: op, Net: \"hvsock\", Addr: &l.addr, Err: err}\n}\n\n// Addr returns the listener's network address.\nfunc (l *HvsockListener) Addr() net.Addr {\n\treturn &l.addr\n}\n\n// Accept waits for the next connection and returns it.\nfunc (l *HvsockListener) Accept() (_ net.Conn, err error) {\n\tsock, err := newHVSocket()\n\tif err != nil {\n\t\treturn nil, l.opErr(\"accept\", err)\n\t}\n\tdefer func() {\n\t\tif sock != nil {\n\t\t\tsock.Close()\n\t\t}\n\t}()\n\tc, err := l.sock.prepareIO()\n\tif err != nil {\n\t\treturn nil, l.opErr(\"accept\", err)\n\t}\n\tdefer l.sock.wg.Done()\n\n\t// AcceptEx, per documentation, requires an extra 16 bytes per address.\n\t//\n\t// https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex\n\tconst addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{}))\n\tvar addrbuf [addrlen * 2]byte\n\n\tvar bytes uint32\n\terr = windows.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o)\n\tif _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {\n\t\treturn nil, l.opErr(\"accept\", os.NewSyscallError(\"acceptex\", err))\n\t}\n\n\tconn := &HvsockConn{\n\t\tsock: sock,\n\t}\n\t// The local address returned in the AcceptEx buffer is the same as the Listener socket's\n\t// address. However, the service GUID reported by GetSockName is different from the Listeners\n\t// socket, and is sometimes the same as the local address of the socket that dialed the\n\t// address, with the service GUID.Data1 incremented, but othertimes is different.\n\t// todo: does the local address matter? is the listener's address or the actual address appropriate?\n\tconn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0])))\n\tconn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen])))\n\n\t// initialize the accepted socket and update its properties with those of the listening socket\n\tif err = windows.Setsockopt(sock.handle,\n\t\twindows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT,\n\t\t(*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil {\n\t\treturn nil, conn.opErr(\"accept\", os.NewSyscallError(\"setsockopt\", err))\n\t}\n\n\tsock = nil\n\treturn conn, nil\n}\n\n// Close closes the listener, causing any pending Accept calls to fail.\nfunc (l *HvsockListener) Close() error {\n\treturn l.sock.Close()\n}\n\n// HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]).\ntype HvsockDialer struct {\n\t// Deadline is the time the Dial operation must connect before erroring.\n\tDeadline time.Time\n\n\t// Retries is the number of additional connects to try if the connection times out, is refused,\n\t// or the host is unreachable\n\tRetries uint\n\n\t// RetryWait is the time to wait after a connection error to retry\n\tRetryWait time.Duration\n\n\trt *time.Timer // redial wait timer\n}\n\n// Dial the Hyper-V socket at addr.\n//\n// See [HvsockDialer.Dial] for more information.\nfunc Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {\n\treturn (&HvsockDialer{}).Dial(ctx, addr)\n}\n\n// Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful.\n// Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between\n// retries.\n//\n// Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx.\nfunc (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {\n\top := \"dial\"\n\t// create the conn early to use opErr()\n\tconn = &HvsockConn{\n\t\tremote: *addr,\n\t}\n\n\tif !d.Deadline.IsZero() {\n\t\tvar cancel context.CancelFunc\n\t\tctx, cancel = context.WithDeadline(ctx, d.Deadline)\n\t\tdefer cancel()\n\t}\n\n\t// preemptive timeout/cancellation check\n\tif err = ctx.Err(); err != nil {\n\t\treturn nil, conn.opErr(op, err)\n\t}\n\n\tsock, err := newHVSocket()\n\tif err != nil {\n\t\treturn nil, conn.opErr(op, err)\n\t}\n\tdefer func() {\n\t\tif sock != nil {\n\t\t\tsock.Close()\n\t\t}\n\t}()\n\n\tsa := addr.raw()\n\terr = socket.Bind(sock.handle, &sa)\n\tif err != nil {\n\t\treturn nil, conn.opErr(op, os.NewSyscallError(\"bind\", err))\n\t}\n\n\tc, err := sock.prepareIO()\n\tif err != nil {\n\t\treturn nil, conn.opErr(op, err)\n\t}\n\tdefer sock.wg.Done()\n\tvar bytes uint32\n\tfor i := uint(0); i <= d.Retries; i++ {\n\t\terr = socket.ConnectEx(\n\t\t\tsock.handle,\n\t\t\t&sa,\n\t\t\tnil, // sendBuf\n\t\t\t0,   // sendDataLen\n\t\t\t&bytes,\n\t\t\t(*windows.Overlapped)(unsafe.Pointer(&c.o)))\n\t\t_, err = sock.asyncIO(c, nil, bytes, err)\n\t\tif i < d.Retries && canRedial(err) {\n\t\t\tif err = d.redialWait(ctx); err == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tbreak\n\t}\n\tif err != nil {\n\t\treturn nil, conn.opErr(op, os.NewSyscallError(\"connectex\", err))\n\t}\n\n\t// update the connection properties, so shutdown can be used\n\tif err = windows.Setsockopt(\n\t\tsock.handle,\n\t\twindows.SOL_SOCKET,\n\t\twindows.SO_UPDATE_CONNECT_CONTEXT,\n\t\tnil, // optvalue\n\t\t0,   // optlen\n\t); err != nil {\n\t\treturn nil, conn.opErr(op, os.NewSyscallError(\"setsockopt\", err))\n\t}\n\n\t// get the local name\n\tvar sal rawHvsockAddr\n\terr = socket.GetSockName(sock.handle, &sal)\n\tif err != nil {\n\t\treturn nil, conn.opErr(op, os.NewSyscallError(\"getsockname\", err))\n\t}\n\tconn.local.fromRaw(&sal)\n\n\t// one last check for timeout, since asyncIO doesn't check the context\n\tif err = ctx.Err(); err != nil {\n\t\treturn nil, conn.opErr(op, err)\n\t}\n\n\tconn.sock = sock\n\tsock = nil\n\n\treturn conn, nil\n}\n\n// redialWait waits before attempting to redial, resetting the timer as appropriate.\nfunc (d *HvsockDialer) redialWait(ctx context.Context) (err error) {\n\tif d.RetryWait == 0 {\n\t\treturn nil\n\t}\n\n\tif d.rt == nil {\n\t\td.rt = time.NewTimer(d.RetryWait)\n\t} else {\n\t\t// should already be stopped and drained\n\t\td.rt.Reset(d.RetryWait)\n\t}\n\n\tselect {\n\tcase <-ctx.Done():\n\tcase <-d.rt.C:\n\t\treturn nil\n\t}\n\n\t// stop and drain the timer\n\tif !d.rt.Stop() {\n\t\t<-d.rt.C\n\t}\n\treturn ctx.Err()\n}\n\n// assumes error is a plain, unwrapped windows.Errno provided by direct syscall.\nfunc canRedial(err error) bool {\n\t//nolint:errorlint // guaranteed to be an Errno\n\tswitch err {\n\tcase windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT,\n\t\twindows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc (conn *HvsockConn) opErr(op string, err error) error {\n\t// translate from \"file closed\" to \"socket closed\"\n\tif errors.Is(err, ErrFileClosed) {\n\t\terr = socket.ErrSocketClosed\n\t}\n\treturn &net.OpError{Op: op, Net: \"hvsock\", Source: &conn.local, Addr: &conn.remote, Err: err}\n}\n\nfunc (conn *HvsockConn) Read(b []byte) (int, error) {\n\tc, err := conn.sock.prepareIO()\n\tif err != nil {\n\t\treturn 0, conn.opErr(\"read\", err)\n\t}\n\tdefer conn.sock.wg.Done()\n\tbuf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))}\n\tvar flags, bytes uint32\n\terr = windows.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil)\n\tn, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err)\n\tif err != nil {\n\t\tvar eno windows.Errno\n\t\tif errors.As(err, &eno) {\n\t\t\terr = os.NewSyscallError(\"wsarecv\", eno)\n\t\t}\n\t\treturn 0, conn.opErr(\"read\", err)\n\t} else if n == 0 {\n\t\terr = io.EOF\n\t}\n\treturn n, err\n}\n\nfunc (conn *HvsockConn) Write(b []byte) (int, error) {\n\tt := 0\n\tfor len(b) != 0 {\n\t\tn, err := conn.write(b)\n\t\tif err != nil {\n\t\t\treturn t + n, err\n\t\t}\n\t\tt += n\n\t\tb = b[n:]\n\t}\n\treturn t, nil\n}\n\nfunc (conn *HvsockConn) write(b []byte) (int, error) {\n\tc, err := conn.sock.prepareIO()\n\tif err != nil {\n\t\treturn 0, conn.opErr(\"write\", err)\n\t}\n\tdefer conn.sock.wg.Done()\n\tbuf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))}\n\tvar bytes uint32\n\terr = windows.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil)\n\tn, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err)\n\tif err != nil {\n\t\tvar eno windows.Errno\n\t\tif errors.As(err, &eno) {\n\t\t\terr = os.NewSyscallError(\"wsasend\", eno)\n\t\t}\n\t\treturn 0, conn.opErr(\"write\", err)\n\t}\n\treturn n, err\n}\n\n// Close closes the socket connection, failing any pending read or write calls.\nfunc (conn *HvsockConn) Close() error {\n\treturn conn.sock.Close()\n}\n\nfunc (conn *HvsockConn) IsClosed() bool {\n\treturn conn.sock.IsClosed()\n}\n\n// shutdown disables sending or receiving on a socket.\nfunc (conn *HvsockConn) shutdown(how int) error {\n\tif conn.IsClosed() {\n\t\treturn socket.ErrSocketClosed\n\t}\n\n\terr := windows.Shutdown(conn.sock.handle, how)\n\tif err != nil {\n\t\t// If the connection was closed, shutdowns fail with \"not connected\"\n\t\tif errors.Is(err, windows.WSAENOTCONN) ||\n\t\t\terrors.Is(err, windows.WSAESHUTDOWN) {\n\t\t\terr = socket.ErrSocketClosed\n\t\t}\n\t\treturn os.NewSyscallError(\"shutdown\", err)\n\t}\n\treturn nil\n}\n\n// CloseRead shuts down the read end of the socket, preventing future read operations.\nfunc (conn *HvsockConn) CloseRead() error {\n\terr := conn.shutdown(windows.SHUT_RD)\n\tif err != nil {\n\t\treturn conn.opErr(\"closeread\", err)\n\t}\n\treturn nil\n}\n\n// CloseWrite shuts down the write end of the socket, preventing future write operations and\n// notifying the other endpoint that no more data will be written.\nfunc (conn *HvsockConn) CloseWrite() error {\n\terr := conn.shutdown(windows.SHUT_WR)\n\tif err != nil {\n\t\treturn conn.opErr(\"closewrite\", err)\n\t}\n\treturn nil\n}\n\n// LocalAddr returns the local address of the connection.\nfunc (conn *HvsockConn) LocalAddr() net.Addr {\n\treturn &conn.local\n}\n\n// RemoteAddr returns the remote address of the connection.\nfunc (conn *HvsockConn) RemoteAddr() net.Addr {\n\treturn &conn.remote\n}\n\n// SetDeadline implements the net.Conn SetDeadline method.\nfunc (conn *HvsockConn) SetDeadline(t time.Time) error {\n\t// todo: implement `SetDeadline` for `win32File`\n\tif err := conn.SetReadDeadline(t); err != nil {\n\t\treturn fmt.Errorf(\"set read deadline: %w\", err)\n\t}\n\tif err := conn.SetWriteDeadline(t); err != nil {\n\t\treturn fmt.Errorf(\"set write deadline: %w\", err)\n\t}\n\treturn nil\n}\n\n// SetReadDeadline implements the net.Conn SetReadDeadline method.\nfunc (conn *HvsockConn) SetReadDeadline(t time.Time) error {\n\treturn conn.sock.SetReadDeadline(t)\n}\n\n// SetWriteDeadline implements the net.Conn SetWriteDeadline method.\nfunc (conn *HvsockConn) SetWriteDeadline(t time.Time) error {\n\treturn conn.sock.SetWriteDeadline(t)\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/fs/doc.go",
    "content": "// This package contains Win32 filesystem functionality.\npackage fs\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/fs/fs.go",
    "content": "//go:build windows\n\npackage fs\n\nimport (\n\t\"golang.org/x/sys/windows\"\n\n\t\"github.com/Microsoft/go-winio/internal/stringbuffer\"\n)\n\n//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go\n\n// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew\n//sys CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateFileW\n\nconst NullHandle windows.Handle = 0\n\n// AccessMask defines standard, specific, and generic rights.\n//\n// Used with CreateFile and NtCreateFile (and co.).\n//\n//\tBitmask:\n//\t 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1\n//\t 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0\n//\t+---------------+---------------+-------------------------------+\n//\t|G|G|G|G|Resvd|A| StandardRights|         SpecificRights        |\n//\t|R|W|E|A|     |S|               |                               |\n//\t+-+-------------+---------------+-------------------------------+\n//\n//\tGR     Generic Read\n//\tGW     Generic Write\n//\tGE     Generic Exectue\n//\tGA     Generic All\n//\tResvd  Reserved\n//\tAS     Access Security System\n//\n// https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask\n//\n// https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights\n//\n// https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants\ntype AccessMask = windows.ACCESS_MASK\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// Not actually any.\n\t//\n\t// For CreateFile: \"query certain metadata such as file, directory, or device attributes without accessing that file or device\"\n\t// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters\n\tFILE_ANY_ACCESS AccessMask = 0\n\n\tGENERIC_READ           AccessMask = 0x8000_0000\n\tGENERIC_WRITE          AccessMask = 0x4000_0000\n\tGENERIC_EXECUTE        AccessMask = 0x2000_0000\n\tGENERIC_ALL            AccessMask = 0x1000_0000\n\tACCESS_SYSTEM_SECURITY AccessMask = 0x0100_0000\n\n\t// Specific Object Access\n\t// from ntioapi.h\n\n\tFILE_READ_DATA      AccessMask = (0x0001) // file & pipe\n\tFILE_LIST_DIRECTORY AccessMask = (0x0001) // directory\n\n\tFILE_WRITE_DATA AccessMask = (0x0002) // file & pipe\n\tFILE_ADD_FILE   AccessMask = (0x0002) // directory\n\n\tFILE_APPEND_DATA          AccessMask = (0x0004) // file\n\tFILE_ADD_SUBDIRECTORY     AccessMask = (0x0004) // directory\n\tFILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe\n\n\tFILE_READ_EA         AccessMask = (0x0008) // file & directory\n\tFILE_READ_PROPERTIES AccessMask = FILE_READ_EA\n\n\tFILE_WRITE_EA         AccessMask = (0x0010) // file & directory\n\tFILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA\n\n\tFILE_EXECUTE  AccessMask = (0x0020) // file\n\tFILE_TRAVERSE AccessMask = (0x0020) // directory\n\n\tFILE_DELETE_CHILD AccessMask = (0x0040) // directory\n\n\tFILE_READ_ATTRIBUTES AccessMask = (0x0080) // all\n\n\tFILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all\n\n\tFILE_ALL_ACCESS      AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)\n\tFILE_GENERIC_READ    AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)\n\tFILE_GENERIC_WRITE   AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)\n\tFILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)\n\n\tSPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF\n\n\t// Standard Access\n\t// from ntseapi.h\n\n\tDELETE       AccessMask = 0x0001_0000\n\tREAD_CONTROL AccessMask = 0x0002_0000\n\tWRITE_DAC    AccessMask = 0x0004_0000\n\tWRITE_OWNER  AccessMask = 0x0008_0000\n\tSYNCHRONIZE  AccessMask = 0x0010_0000\n\n\tSTANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000\n\n\tSTANDARD_RIGHTS_READ    AccessMask = READ_CONTROL\n\tSTANDARD_RIGHTS_WRITE   AccessMask = READ_CONTROL\n\tSTANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL\n\n\tSTANDARD_RIGHTS_ALL AccessMask = 0x001F_0000\n)\n\ntype FileShareMode uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\tFILE_SHARE_NONE        FileShareMode = 0x00\n\tFILE_SHARE_READ        FileShareMode = 0x01\n\tFILE_SHARE_WRITE       FileShareMode = 0x02\n\tFILE_SHARE_DELETE      FileShareMode = 0x04\n\tFILE_SHARE_VALID_FLAGS FileShareMode = 0x07\n)\n\ntype FileCreationDisposition uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// from winbase.h\n\n\tCREATE_NEW        FileCreationDisposition = 0x01\n\tCREATE_ALWAYS     FileCreationDisposition = 0x02\n\tOPEN_EXISTING     FileCreationDisposition = 0x03\n\tOPEN_ALWAYS       FileCreationDisposition = 0x04\n\tTRUNCATE_EXISTING FileCreationDisposition = 0x05\n)\n\n// Create disposition values for NtCreate*\ntype NTFileCreationDisposition uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// From ntioapi.h\n\n\tFILE_SUPERSEDE           NTFileCreationDisposition = 0x00\n\tFILE_OPEN                NTFileCreationDisposition = 0x01\n\tFILE_CREATE              NTFileCreationDisposition = 0x02\n\tFILE_OPEN_IF             NTFileCreationDisposition = 0x03\n\tFILE_OVERWRITE           NTFileCreationDisposition = 0x04\n\tFILE_OVERWRITE_IF        NTFileCreationDisposition = 0x05\n\tFILE_MAXIMUM_DISPOSITION NTFileCreationDisposition = 0x05\n)\n\n// CreateFile and co. take flags or attributes together as one parameter.\n// Define alias until we can use generics to allow both\n//\n// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants\ntype FileFlagOrAttribute uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// from winnt.h\n\n\tFILE_FLAG_WRITE_THROUGH       FileFlagOrAttribute = 0x8000_0000\n\tFILE_FLAG_OVERLAPPED          FileFlagOrAttribute = 0x4000_0000\n\tFILE_FLAG_NO_BUFFERING        FileFlagOrAttribute = 0x2000_0000\n\tFILE_FLAG_RANDOM_ACCESS       FileFlagOrAttribute = 0x1000_0000\n\tFILE_FLAG_SEQUENTIAL_SCAN     FileFlagOrAttribute = 0x0800_0000\n\tFILE_FLAG_DELETE_ON_CLOSE     FileFlagOrAttribute = 0x0400_0000\n\tFILE_FLAG_BACKUP_SEMANTICS    FileFlagOrAttribute = 0x0200_0000\n\tFILE_FLAG_POSIX_SEMANTICS     FileFlagOrAttribute = 0x0100_0000\n\tFILE_FLAG_OPEN_REPARSE_POINT  FileFlagOrAttribute = 0x0020_0000\n\tFILE_FLAG_OPEN_NO_RECALL      FileFlagOrAttribute = 0x0010_0000\n\tFILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000\n)\n\n// NtCreate* functions take a dedicated CreateOptions parameter.\n//\n// https://learn.microsoft.com/en-us/windows/win32/api/Winternl/nf-winternl-ntcreatefile\n//\n// https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file\ntype NTCreateOptions uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// From ntioapi.h\n\n\tFILE_DIRECTORY_FILE            NTCreateOptions = 0x0000_0001\n\tFILE_WRITE_THROUGH             NTCreateOptions = 0x0000_0002\n\tFILE_SEQUENTIAL_ONLY           NTCreateOptions = 0x0000_0004\n\tFILE_NO_INTERMEDIATE_BUFFERING NTCreateOptions = 0x0000_0008\n\n\tFILE_SYNCHRONOUS_IO_ALERT    NTCreateOptions = 0x0000_0010\n\tFILE_SYNCHRONOUS_IO_NONALERT NTCreateOptions = 0x0000_0020\n\tFILE_NON_DIRECTORY_FILE      NTCreateOptions = 0x0000_0040\n\tFILE_CREATE_TREE_CONNECTION  NTCreateOptions = 0x0000_0080\n\n\tFILE_COMPLETE_IF_OPLOCKED NTCreateOptions = 0x0000_0100\n\tFILE_NO_EA_KNOWLEDGE      NTCreateOptions = 0x0000_0200\n\tFILE_DISABLE_TUNNELING    NTCreateOptions = 0x0000_0400\n\tFILE_RANDOM_ACCESS        NTCreateOptions = 0x0000_0800\n\n\tFILE_DELETE_ON_CLOSE        NTCreateOptions = 0x0000_1000\n\tFILE_OPEN_BY_FILE_ID        NTCreateOptions = 0x0000_2000\n\tFILE_OPEN_FOR_BACKUP_INTENT NTCreateOptions = 0x0000_4000\n\tFILE_NO_COMPRESSION         NTCreateOptions = 0x0000_8000\n)\n\ntype FileSQSFlag = FileFlagOrAttribute\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\t// from winbase.h\n\n\tSECURITY_ANONYMOUS      FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16)\n\tSECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16)\n\tSECURITY_IMPERSONATION  FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16)\n\tSECURITY_DELEGATION     FileSQSFlag = FileSQSFlag(SecurityDelegation << 16)\n\n\tSECURITY_SQOS_PRESENT     FileSQSFlag = 0x0010_0000\n\tSECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F_0000\n)\n\n// GetFinalPathNameByHandle flags\n//\n// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters\ntype GetFinalPathFlag uint32\n\n//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.\nconst (\n\tGetFinalPathDefaultFlag GetFinalPathFlag = 0x0\n\n\tFILE_NAME_NORMALIZED GetFinalPathFlag = 0x0\n\tFILE_NAME_OPENED     GetFinalPathFlag = 0x8\n\n\tVOLUME_NAME_DOS  GetFinalPathFlag = 0x0\n\tVOLUME_NAME_GUID GetFinalPathFlag = 0x1\n\tVOLUME_NAME_NT   GetFinalPathFlag = 0x2\n\tVOLUME_NAME_NONE GetFinalPathFlag = 0x4\n)\n\n// getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle\n// with the given handle and flags. It transparently takes care of creating a buffer of the\n// correct size for the call.\n//\n// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew\nfunc GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) {\n\tb := stringbuffer.NewWString()\n\t//TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n?\n\tfor {\n\t\tn, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\t// If the buffer wasn't large enough, n will be the total size needed (including null terminator).\n\t\t// Resize and try again.\n\t\tif n > b.Cap() {\n\t\t\tb.ResizeTo(n)\n\t\t\tcontinue\n\t\t}\n\t\t// If the buffer is large enough, n will be the size not including the null terminator.\n\t\t// Convert to a Go string and return.\n\t\treturn b.String(), nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/fs/security.go",
    "content": "package fs\n\n// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level\ntype SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32`\n\n// Impersonation levels\nconst (\n\tSecurityAnonymous      SecurityImpersonationLevel = 0\n\tSecurityIdentification SecurityImpersonationLevel = 1\n\tSecurityImpersonation  SecurityImpersonationLevel = 2\n\tSecurityDelegation     SecurityImpersonationLevel = 3\n)\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go",
    "content": "//go:build windows\n\n// Code generated by 'go generate' using \"github.com/Microsoft/go-winio/tools/mkwinsyscall\"; DO NOT EDIT.\n\npackage fs\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nvar _ unsafe.Pointer\n\n// Do the interface allocations only once for common\n// Errno values.\nconst (\n\terrnoERROR_IO_PENDING = 997\n)\n\nvar (\n\terrERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)\n\terrERROR_EINVAL     error = syscall.EINVAL\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn errERROR_EINVAL\n\tcase errnoERROR_IO_PENDING:\n\t\treturn errERROR_IO_PENDING\n\t}\n\treturn e\n}\n\nvar (\n\tmodkernel32 = windows.NewLazySystemDLL(\"kernel32.dll\")\n\n\tprocCreateFileW = modkernel32.NewProc(\"CreateFileW\")\n)\n\nfunc CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile)\n}\n\nfunc _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile))\n\thandle = windows.Handle(r0)\n\tif handle == windows.InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go",
    "content": "package socket\n\nimport (\n\t\"unsafe\"\n)\n\n// RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The\n// struct must meet the Win32 sockaddr requirements specified here:\n// https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2\n//\n// Specifically, the struct size must be least larger than an int16 (unsigned short)\n// for the address family.\ntype RawSockaddr interface {\n\t// Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing\n\t// for the RawSockaddr's data to be overwritten by syscalls (if necessary).\n\t//\n\t// It is the callers responsibility to validate that the values are valid; invalid\n\t// pointers or size can cause a panic.\n\tSockaddr() (unsafe.Pointer, int32, error)\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/socket/socket.go",
    "content": "//go:build windows\n\npackage socket\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"github.com/Microsoft/go-winio/pkg/guid\"\n\t\"golang.org/x/sys/windows\"\n)\n\n//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go\n\n//sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname\n//sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername\n//sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind\n\nconst socketError = uintptr(^uint32(0))\n\nvar (\n\t// todo(helsaawy): create custom error types to store the desired vs actual size and addr family?\n\n\tErrBufferSize     = errors.New(\"buffer size\")\n\tErrAddrFamily     = errors.New(\"address family\")\n\tErrInvalidPointer = errors.New(\"invalid pointer\")\n\tErrSocketClosed   = fmt.Errorf(\"socket closed: %w\", net.ErrClosed)\n)\n\n// todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error)\n\n// GetSockName writes the local address of socket s to the [RawSockaddr] rsa.\n// If rsa is not large enough, the [windows.WSAEFAULT] is returned.\nfunc GetSockName(s windows.Handle, rsa RawSockaddr) error {\n\tptr, l, err := rsa.Sockaddr()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not retrieve socket pointer and size: %w\", err)\n\t}\n\n\t// although getsockname returns WSAEFAULT if the buffer is too small, it does not set\n\t// &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy\n\treturn getsockname(s, ptr, &l)\n}\n\n// GetPeerName returns the remote address the socket is connected to.\n//\n// See [GetSockName] for more information.\nfunc GetPeerName(s windows.Handle, rsa RawSockaddr) error {\n\tptr, l, err := rsa.Sockaddr()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not retrieve socket pointer and size: %w\", err)\n\t}\n\n\treturn getpeername(s, ptr, &l)\n}\n\nfunc Bind(s windows.Handle, rsa RawSockaddr) (err error) {\n\tptr, l, err := rsa.Sockaddr()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not retrieve socket pointer and size: %w\", err)\n\t}\n\n\treturn bind(s, ptr, l)\n}\n\n// \"golang.org/x/sys/windows\".ConnectEx and .Bind only accept internal implementations of the\n// their sockaddr interface, so they cannot be used with HvsockAddr\n// Replicate functionality here from\n// https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go\n\n// The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at\n// runtime via a WSAIoctl call:\n// https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks\n\ntype runtimeFunc struct {\n\tid   guid.GUID\n\tonce sync.Once\n\taddr uintptr\n\terr  error\n}\n\nfunc (f *runtimeFunc) Load() error {\n\tf.once.Do(func() {\n\t\tvar s windows.Handle\n\t\ts, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP)\n\t\tif f.err != nil {\n\t\t\treturn\n\t\t}\n\t\tdefer windows.CloseHandle(s) //nolint:errcheck\n\n\t\tvar n uint32\n\t\tf.err = windows.WSAIoctl(s,\n\t\t\twindows.SIO_GET_EXTENSION_FUNCTION_POINTER,\n\t\t\t(*byte)(unsafe.Pointer(&f.id)),\n\t\t\tuint32(unsafe.Sizeof(f.id)),\n\t\t\t(*byte)(unsafe.Pointer(&f.addr)),\n\t\t\tuint32(unsafe.Sizeof(f.addr)),\n\t\t\t&n,\n\t\t\tnil, // overlapped\n\t\t\t0,   // completionRoutine\n\t\t)\n\t})\n\treturn f.err\n}\n\nvar (\n\t// todo: add `AcceptEx` and `GetAcceptExSockaddrs`\n\tWSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS\n\t\tData1: 0x25a207b9,\n\t\tData2: 0xddf3,\n\t\tData3: 0x4660,\n\t\tData4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},\n\t}\n\n\tconnectExFunc = runtimeFunc{id: WSAID_CONNECTEX}\n)\n\nfunc ConnectEx(\n\tfd windows.Handle,\n\trsa RawSockaddr,\n\tsendBuf *byte,\n\tsendDataLen uint32,\n\tbytesSent *uint32,\n\toverlapped *windows.Overlapped,\n) error {\n\tif err := connectExFunc.Load(); err != nil {\n\t\treturn fmt.Errorf(\"failed to load ConnectEx function pointer: %w\", err)\n\t}\n\tptr, n, err := rsa.Sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)\n}\n\n// BOOL LpfnConnectex(\n//   [in]           SOCKET s,\n//   [in]           const sockaddr *name,\n//   [in]           int namelen,\n//   [in, optional] PVOID lpSendBuffer,\n//   [in]           DWORD dwSendDataLength,\n//   [out]          LPDWORD lpdwBytesSent,\n//   [in]           LPOVERLAPPED lpOverlapped\n// )\n\nfunc connectEx(\n\ts windows.Handle,\n\tname unsafe.Pointer,\n\tnamelen int32,\n\tsendBuf *byte,\n\tsendDataLen uint32,\n\tbytesSent *uint32,\n\toverlapped *windows.Overlapped,\n) (err error) {\n\tr1, _, e1 := syscall.SyscallN(connectExFunc.addr,\n\t\tuintptr(s),\n\t\tuintptr(name),\n\t\tuintptr(namelen),\n\t\tuintptr(unsafe.Pointer(sendBuf)),\n\t\tuintptr(sendDataLen),\n\t\tuintptr(unsafe.Pointer(bytesSent)),\n\t\tuintptr(unsafe.Pointer(overlapped)),\n\t)\n\n\tif r1 == 0 {\n\t\tif e1 != 0 {\n\t\t\terr = error(e1)\n\t\t} else {\n\t\t\terr = syscall.EINVAL\n\t\t}\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go",
    "content": "//go:build windows\n\n// Code generated by 'go generate' using \"github.com/Microsoft/go-winio/tools/mkwinsyscall\"; DO NOT EDIT.\n\npackage socket\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nvar _ unsafe.Pointer\n\n// Do the interface allocations only once for common\n// Errno values.\nconst (\n\terrnoERROR_IO_PENDING = 997\n)\n\nvar (\n\terrERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)\n\terrERROR_EINVAL     error = syscall.EINVAL\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn errERROR_EINVAL\n\tcase errnoERROR_IO_PENDING:\n\t\treturn errERROR_IO_PENDING\n\t}\n\treturn e\n}\n\nvar (\n\tmodws2_32 = windows.NewLazySystemDLL(\"ws2_32.dll\")\n\n\tprocbind        = modws2_32.NewProc(\"bind\")\n\tprocgetpeername = modws2_32.NewProc(\"getpeername\")\n\tprocgetsockname = modws2_32.NewProc(\"getsockname\")\n)\n\nfunc bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen))\n\tif r1 == socketError {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))\n\tif r1 == socketError {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))\n\tif r1 == socketError {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go",
    "content": "package stringbuffer\n\nimport (\n\t\"sync\"\n\t\"unicode/utf16\"\n)\n\n// TODO: worth exporting and using in mkwinsyscall?\n\n// Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate\n// large path strings:\n// MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310.\nconst MinWStringCap = 310\n\n// use *[]uint16 since []uint16 creates an extra allocation where the slice header\n// is copied to heap and then referenced via pointer in the interface header that sync.Pool\n// stores.\nvar pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly\n\tNew: func() interface{} {\n\t\tb := make([]uint16, MinWStringCap)\n\t\treturn &b\n\t},\n}\n\nfunc newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) }\n\n// freeBuffer copies the slice header data, and puts a pointer to that in the pool.\n// This avoids taking a pointer to the slice header in WString, which can be set to nil.\nfunc freeBuffer(b []uint16) { pathPool.Put(&b) }\n\n// WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings\n// for interacting with Win32 APIs.\n// Sizes are specified as uint32 and not int.\n//\n// It is not thread safe.\ntype WString struct {\n\t// type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future.\n\n\t// raw buffer\n\tb []uint16\n}\n\n// NewWString returns a [WString] allocated from a shared pool with an\n// initial capacity of at least [MinWStringCap].\n// Since the buffer may have been previously used, its contents are not guaranteed to be empty.\n//\n// The buffer should be freed via [WString.Free]\nfunc NewWString() *WString {\n\treturn &WString{\n\t\tb: newBuffer(),\n\t}\n}\n\nfunc (b *WString) Free() {\n\tif b.empty() {\n\t\treturn\n\t}\n\tfreeBuffer(b.b)\n\tb.b = nil\n}\n\n// ResizeTo grows the buffer to at least c and returns the new capacity, freeing the\n// previous buffer back into pool.\nfunc (b *WString) ResizeTo(c uint32) uint32 {\n\t// already sufficient (or n is 0)\n\tif c <= b.Cap() {\n\t\treturn b.Cap()\n\t}\n\n\tif c <= MinWStringCap {\n\t\tc = MinWStringCap\n\t}\n\t// allocate at-least double buffer size, as is done in [bytes.Buffer] and other places\n\tif c <= 2*b.Cap() {\n\t\tc = 2 * b.Cap()\n\t}\n\n\tb2 := make([]uint16, c)\n\tif !b.empty() {\n\t\tcopy(b2, b.b)\n\t\tfreeBuffer(b.b)\n\t}\n\tb.b = b2\n\treturn c\n}\n\n// Buffer returns the underlying []uint16 buffer.\nfunc (b *WString) Buffer() []uint16 {\n\tif b.empty() {\n\t\treturn nil\n\t}\n\treturn b.b\n}\n\n// Pointer returns a pointer to the first uint16 in the buffer.\n// If the [WString.Free] has already been called, the pointer will be nil.\nfunc (b *WString) Pointer() *uint16 {\n\tif b.empty() {\n\t\treturn nil\n\t}\n\treturn &b.b[0]\n}\n\n// String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer.\n//\n// It assumes that the data is null-terminated.\nfunc (b *WString) String() string {\n\t// Using [windows.UTF16ToString] would require importing \"golang.org/x/sys/windows\"\n\t// and would make this code Windows-only, which makes no sense.\n\t// So copy UTF16ToString code into here.\n\t// If other windows-specific code is added, switch to [windows.UTF16ToString]\n\n\ts := b.b\n\tfor i, v := range s {\n\t\tif v == 0 {\n\t\t\ts = s[:i]\n\t\t\tbreak\n\t\t}\n\t}\n\treturn string(utf16.Decode(s))\n}\n\n// Cap returns the underlying buffer capacity.\nfunc (b *WString) Cap() uint32 {\n\tif b.empty() {\n\t\treturn 0\n\t}\n\treturn b.cap()\n}\n\nfunc (b *WString) cap() uint32 { return uint32(cap(b.b)) }\nfunc (b *WString) empty() bool { return b == nil || b.cap() == 0 }\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/pipe.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\t\"runtime\"\n\t\"time\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n\n\t\"github.com/Microsoft/go-winio/internal/fs\"\n)\n\n//sys connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) = ConnectNamedPipe\n//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error)  [failretval==windows.InvalidHandle] = CreateNamedPipeW\n//sys disconnectNamedPipe(pipe windows.Handle) (err error) = DisconnectNamedPipe\n//sys getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo\n//sys getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW\n//sys ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) = ntdll.NtCreateNamedPipeFile\n//sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb\n//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U\n//sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl\n\ntype PipeConn interface {\n\tnet.Conn\n\tDisconnect() error\n\tFlush() error\n}\n\n// type aliases for mkwinsyscall code\ntype (\n\tntAccessMask              = fs.AccessMask\n\tntFileShareMode           = fs.FileShareMode\n\tntFileCreationDisposition = fs.NTFileCreationDisposition\n\tntFileOptions             = fs.NTCreateOptions\n)\n\ntype ioStatusBlock struct {\n\tStatus, Information uintptr\n}\n\n//\ttypedef struct _OBJECT_ATTRIBUTES {\n//\t  ULONG           Length;\n//\t  HANDLE          RootDirectory;\n//\t  PUNICODE_STRING ObjectName;\n//\t  ULONG           Attributes;\n//\t  PVOID           SecurityDescriptor;\n//\t  PVOID           SecurityQualityOfService;\n//\t} OBJECT_ATTRIBUTES;\n//\n// https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes\ntype objectAttributes struct {\n\tLength             uintptr\n\tRootDirectory      uintptr\n\tObjectName         *unicodeString\n\tAttributes         uintptr\n\tSecurityDescriptor *securityDescriptor\n\tSecurityQoS        uintptr\n}\n\ntype unicodeString struct {\n\tLength        uint16\n\tMaximumLength uint16\n\tBuffer        uintptr\n}\n\n//\ttypedef struct _SECURITY_DESCRIPTOR {\n//\t  BYTE                        Revision;\n//\t  BYTE                        Sbz1;\n//\t  SECURITY_DESCRIPTOR_CONTROL Control;\n//\t  PSID                        Owner;\n//\t  PSID                        Group;\n//\t  PACL                        Sacl;\n//\t  PACL                        Dacl;\n//\t} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;\n//\n// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-security_descriptor\ntype securityDescriptor struct {\n\tRevision byte\n\tSbz1     byte\n\tControl  uint16\n\tOwner    uintptr\n\tGroup    uintptr\n\tSacl     uintptr //revive:disable-line:var-naming SACL, not Sacl\n\tDacl     uintptr //revive:disable-line:var-naming DACL, not Dacl\n}\n\ntype ntStatus int32\n\nfunc (status ntStatus) Err() error {\n\tif status >= 0 {\n\t\treturn nil\n\t}\n\treturn rtlNtStatusToDosError(status)\n}\n\nvar (\n\t// ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed.\n\tErrPipeListenerClosed = net.ErrClosed\n\n\terrPipeWriteClosed = errors.New(\"pipe has been closed for write\")\n)\n\ntype win32Pipe struct {\n\t*win32File\n\tpath string\n}\n\nvar _ PipeConn = (*win32Pipe)(nil)\n\ntype win32MessageBytePipe struct {\n\twin32Pipe\n\twriteClosed bool\n\treadEOF     bool\n}\n\ntype pipeAddress string\n\nfunc (f *win32Pipe) LocalAddr() net.Addr {\n\treturn pipeAddress(f.path)\n}\n\nfunc (f *win32Pipe) RemoteAddr() net.Addr {\n\treturn pipeAddress(f.path)\n}\n\nfunc (f *win32Pipe) SetDeadline(t time.Time) error {\n\tif err := f.SetReadDeadline(t); err != nil {\n\t\treturn err\n\t}\n\treturn f.SetWriteDeadline(t)\n}\n\nfunc (f *win32Pipe) Disconnect() error {\n\treturn disconnectNamedPipe(f.win32File.handle)\n}\n\n// CloseWrite closes the write side of a message pipe in byte mode.\nfunc (f *win32MessageBytePipe) CloseWrite() error {\n\tif f.writeClosed {\n\t\treturn errPipeWriteClosed\n\t}\n\terr := f.win32File.Flush()\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = f.win32File.Write(nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tf.writeClosed = true\n\treturn nil\n}\n\n// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since\n// they are used to implement CloseWrite().\nfunc (f *win32MessageBytePipe) Write(b []byte) (int, error) {\n\tif f.writeClosed {\n\t\treturn 0, errPipeWriteClosed\n\t}\n\tif len(b) == 0 {\n\t\treturn 0, nil\n\t}\n\treturn f.win32File.Write(b)\n}\n\n// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message\n// mode pipe will return io.EOF, as will all subsequent reads.\nfunc (f *win32MessageBytePipe) Read(b []byte) (int, error) {\n\tif f.readEOF {\n\t\treturn 0, io.EOF\n\t}\n\tn, err := f.win32File.Read(b)\n\tif err == io.EOF { //nolint:errorlint\n\t\t// If this was the result of a zero-byte read, then\n\t\t// it is possible that the read was due to a zero-size\n\t\t// message. Since we are simulating CloseWrite with a\n\t\t// zero-byte message, ensure that all future Read() calls\n\t\t// also return EOF.\n\t\tf.readEOF = true\n\t} else if err == windows.ERROR_MORE_DATA { //nolint:errorlint // err is Errno\n\t\t// ERROR_MORE_DATA indicates that the pipe's read mode is message mode\n\t\t// and the message still has more bytes. Treat this as a success, since\n\t\t// this package presents all named pipes as byte streams.\n\t\terr = nil\n\t}\n\treturn n, err\n}\n\nfunc (pipeAddress) Network() string {\n\treturn \"pipe\"\n}\n\nfunc (s pipeAddress) String() string {\n\treturn string(s)\n}\n\n// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.\nfunc tryDialPipe(ctx context.Context, path *string, access fs.AccessMask, impLevel PipeImpLevel) (windows.Handle, error) {\n\tfor {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn windows.Handle(0), ctx.Err()\n\t\tdefault:\n\t\t\th, err := fs.CreateFile(*path,\n\t\t\t\taccess,\n\t\t\t\t0,   // mode\n\t\t\t\tnil, // security attributes\n\t\t\t\tfs.OPEN_EXISTING,\n\t\t\t\tfs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.FileSQSFlag(impLevel),\n\t\t\t\t0, // template file handle\n\t\t\t)\n\t\t\tif err == nil {\n\t\t\t\treturn h, nil\n\t\t\t}\n\t\t\tif err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno\n\t\t\t\treturn h, &os.PathError{Err: err, Op: \"open\", Path: *path}\n\t\t\t}\n\t\t\t// Wait 10 msec and try again. This is a rather simplistic\n\t\t\t// view, as we always try each 10 milliseconds.\n\t\t\ttime.Sleep(10 * time.Millisecond)\n\t\t}\n\t}\n}\n\n// DialPipe connects to a named pipe by path, timing out if the connection\n// takes longer than the specified duration. If timeout is nil, then we use\n// a default timeout of 2 seconds.  (We do not use WaitNamedPipe.)\nfunc DialPipe(path string, timeout *time.Duration) (net.Conn, error) {\n\tvar absTimeout time.Time\n\tif timeout != nil {\n\t\tabsTimeout = time.Now().Add(*timeout)\n\t} else {\n\t\tabsTimeout = time.Now().Add(2 * time.Second)\n\t}\n\tctx, cancel := context.WithDeadline(context.Background(), absTimeout)\n\tdefer cancel()\n\tconn, err := DialPipeContext(ctx, path)\n\tif errors.Is(err, context.DeadlineExceeded) {\n\t\treturn nil, ErrTimeout\n\t}\n\treturn conn, err\n}\n\n// DialPipeContext attempts to connect to a named pipe by `path` until `ctx`\n// cancellation or timeout.\nfunc DialPipeContext(ctx context.Context, path string) (net.Conn, error) {\n\treturn DialPipeAccess(ctx, path, uint32(fs.GENERIC_READ|fs.GENERIC_WRITE))\n}\n\n// PipeImpLevel is an enumeration of impersonation levels that may be set\n// when calling DialPipeAccessImpersonation.\ntype PipeImpLevel uint32\n\nconst (\n\tPipeImpLevelAnonymous      = PipeImpLevel(fs.SECURITY_ANONYMOUS)\n\tPipeImpLevelIdentification = PipeImpLevel(fs.SECURITY_IDENTIFICATION)\n\tPipeImpLevelImpersonation  = PipeImpLevel(fs.SECURITY_IMPERSONATION)\n\tPipeImpLevelDelegation     = PipeImpLevel(fs.SECURITY_DELEGATION)\n)\n\n// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx`\n// cancellation or timeout.\nfunc DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {\n\treturn DialPipeAccessImpLevel(ctx, path, access, PipeImpLevelAnonymous)\n}\n\n// DialPipeAccessImpLevel attempts to connect to a named pipe by `path` with\n// `access` at `impLevel` until `ctx` cancellation or timeout. The other\n// DialPipe* implementations use PipeImpLevelAnonymous.\nfunc DialPipeAccessImpLevel(ctx context.Context, path string, access uint32, impLevel PipeImpLevel) (net.Conn, error) {\n\tvar err error\n\tvar h windows.Handle\n\th, err = tryDialPipe(ctx, &path, fs.AccessMask(access), impLevel)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar flags uint32\n\terr = getNamedPipeInfo(h, &flags, nil, nil, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tf, err := makeWin32File(h)\n\tif err != nil {\n\t\twindows.Close(h)\n\t\treturn nil, err\n\t}\n\n\t// If the pipe is in message mode, return a message byte pipe, which\n\t// supports CloseWrite().\n\tif flags&windows.PIPE_TYPE_MESSAGE != 0 {\n\t\treturn &win32MessageBytePipe{\n\t\t\twin32Pipe: win32Pipe{win32File: f, path: path},\n\t\t}, nil\n\t}\n\treturn &win32Pipe{win32File: f, path: path}, nil\n}\n\ntype acceptResponse struct {\n\tf   *win32File\n\terr error\n}\n\ntype win32PipeListener struct {\n\tfirstHandle windows.Handle\n\tpath        string\n\tconfig      PipeConfig\n\tacceptCh    chan (chan acceptResponse)\n\tcloseCh     chan int\n\tdoneCh      chan int\n}\n\nfunc makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (windows.Handle, error) {\n\tpath16, err := windows.UTF16FromString(path)\n\tif err != nil {\n\t\treturn 0, &os.PathError{Op: \"open\", Path: path, Err: err}\n\t}\n\n\tvar oa objectAttributes\n\toa.Length = unsafe.Sizeof(oa)\n\n\tvar ntPath unicodeString\n\tif err := rtlDosPathNameToNtPathName(&path16[0],\n\t\t&ntPath,\n\t\t0,\n\t\t0,\n\t).Err(); err != nil {\n\t\treturn 0, &os.PathError{Op: \"open\", Path: path, Err: err}\n\t}\n\tdefer windows.LocalFree(windows.Handle(ntPath.Buffer)) //nolint:errcheck\n\toa.ObjectName = &ntPath\n\toa.Attributes = windows.OBJ_CASE_INSENSITIVE\n\n\t// The security descriptor is only needed for the first pipe.\n\tif first {\n\t\tif sd != nil {\n\t\t\t//todo: does `sdb` need to be allocated on the heap, or can go allocate it?\n\t\t\tl := uint32(len(sd))\n\t\t\tsdb, err := windows.LocalAlloc(0, l)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, fmt.Errorf(\"LocalAlloc for security descriptor with of length %d: %w\", l, err)\n\t\t\t}\n\t\t\tdefer windows.LocalFree(windows.Handle(sdb)) //nolint:errcheck\n\t\t\tcopy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd)\n\t\t\toa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb))\n\t\t} else {\n\t\t\t// Construct the default named pipe security descriptor.\n\t\t\tvar dacl uintptr\n\t\t\tif err := rtlDefaultNpAcl(&dacl).Err(); err != nil {\n\t\t\t\treturn 0, fmt.Errorf(\"getting default named pipe ACL: %w\", err)\n\t\t\t}\n\t\t\tdefer windows.LocalFree(windows.Handle(dacl)) //nolint:errcheck\n\n\t\t\tsdb := &securityDescriptor{\n\t\t\t\tRevision: 1,\n\t\t\t\tControl:  windows.SE_DACL_PRESENT,\n\t\t\t\tDacl:     dacl,\n\t\t\t}\n\t\t\toa.SecurityDescriptor = sdb\n\t\t}\n\t}\n\n\ttyp := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS)\n\tif c.MessageMode {\n\t\ttyp |= windows.FILE_PIPE_MESSAGE_TYPE\n\t}\n\n\tdisposition := fs.FILE_OPEN\n\taccess := fs.GENERIC_READ | fs.GENERIC_WRITE | fs.SYNCHRONIZE\n\tif first {\n\t\tdisposition = fs.FILE_CREATE\n\t\t// By not asking for read or write access, the named pipe file system\n\t\t// will put this pipe into an initially disconnected state, blocking\n\t\t// client connections until the next call with first == false.\n\t\taccess = fs.SYNCHRONIZE\n\t}\n\n\ttimeout := int64(-50 * 10000) // 50ms\n\n\tvar (\n\t\th    windows.Handle\n\t\tiosb ioStatusBlock\n\t)\n\terr = ntCreateNamedPipeFile(&h,\n\t\taccess,\n\t\t&oa,\n\t\t&iosb,\n\t\tfs.FILE_SHARE_READ|fs.FILE_SHARE_WRITE,\n\t\tdisposition,\n\t\t0,\n\t\ttyp,\n\t\t0,\n\t\t0,\n\t\t0xffffffff,\n\t\tuint32(c.InputBufferSize),\n\t\tuint32(c.OutputBufferSize),\n\t\t&timeout).Err()\n\tif err != nil {\n\t\treturn 0, &os.PathError{Op: \"open\", Path: path, Err: err}\n\t}\n\n\truntime.KeepAlive(ntPath)\n\treturn h, nil\n}\n\nfunc (l *win32PipeListener) makeServerPipe() (*win32File, error) {\n\th, err := makeServerPipeHandle(l.path, nil, &l.config, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tf, err := makeWin32File(h)\n\tif err != nil {\n\t\twindows.Close(h)\n\t\treturn nil, err\n\t}\n\treturn f, nil\n}\n\nfunc (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) {\n\tp, err := l.makeServerPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Wait for the client to connect.\n\tch := make(chan error)\n\tgo func(p *win32File) {\n\t\tch <- connectPipe(p)\n\t}(p)\n\n\tselect {\n\tcase err = <-ch:\n\t\tif err != nil {\n\t\t\tp.Close()\n\t\t\tp = nil\n\t\t}\n\tcase <-l.closeCh:\n\t\t// Abort the connect request by closing the handle.\n\t\tp.Close()\n\t\tp = nil\n\t\terr = <-ch\n\t\tif err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno\n\t\t\terr = ErrPipeListenerClosed\n\t\t}\n\t}\n\treturn p, err\n}\n\nfunc (l *win32PipeListener) listenerRoutine() {\n\tclosed := false\n\tfor !closed {\n\t\tselect {\n\t\tcase <-l.closeCh:\n\t\t\tclosed = true\n\t\tcase responseCh := <-l.acceptCh:\n\t\t\tvar (\n\t\t\t\tp   *win32File\n\t\t\t\terr error\n\t\t\t)\n\t\t\tfor {\n\t\t\t\tp, err = l.makeConnectedServerPipe()\n\t\t\t\t// If the connection was immediately closed by the client, try\n\t\t\t\t// again.\n\t\t\t\tif err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tresponseCh <- acceptResponse{p, err}\n\t\t\tclosed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno\n\t\t}\n\t}\n\twindows.Close(l.firstHandle)\n\tl.firstHandle = 0\n\t// Notify Close() and Accept() callers that the handle has been closed.\n\tclose(l.doneCh)\n}\n\n// PipeConfig contain configuration for the pipe listener.\ntype PipeConfig struct {\n\t// SecurityDescriptor contains a Windows security descriptor in SDDL format.\n\tSecurityDescriptor string\n\n\t// MessageMode determines whether the pipe is in byte or message mode. In either\n\t// case the pipe is read in byte mode by default. The only practical difference in\n\t// this implementation is that CloseWrite() is only supported for message mode pipes;\n\t// CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only\n\t// transferred to the reader (and returned as io.EOF in this implementation)\n\t// when the pipe is in message mode.\n\tMessageMode bool\n\n\t// InputBufferSize specifies the size of the input buffer, in bytes.\n\tInputBufferSize int32\n\n\t// OutputBufferSize specifies the size of the output buffer, in bytes.\n\tOutputBufferSize int32\n}\n\n// ListenPipe creates a listener on a Windows named pipe path, e.g. \\\\.\\pipe\\mypipe.\n// The pipe must not already exist.\nfunc ListenPipe(path string, c *PipeConfig) (net.Listener, error) {\n\tvar (\n\t\tsd  []byte\n\t\terr error\n\t)\n\tif c == nil {\n\t\tc = &PipeConfig{}\n\t}\n\tif c.SecurityDescriptor != \"\" {\n\t\tsd, err = SddlToSecurityDescriptor(c.SecurityDescriptor)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\th, err := makeServerPipeHandle(path, sd, c, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tl := &win32PipeListener{\n\t\tfirstHandle: h,\n\t\tpath:        path,\n\t\tconfig:      *c,\n\t\tacceptCh:    make(chan (chan acceptResponse)),\n\t\tcloseCh:     make(chan int),\n\t\tdoneCh:      make(chan int),\n\t}\n\tgo l.listenerRoutine()\n\treturn l, nil\n}\n\nfunc connectPipe(p *win32File) error {\n\tc, err := p.prepareIO()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer p.wg.Done()\n\n\terr = connectNamedPipe(p.handle, &c.o)\n\t_, err = p.asyncIO(c, nil, 0, err)\n\tif err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (l *win32PipeListener) Accept() (net.Conn, error) {\n\tch := make(chan acceptResponse)\n\tselect {\n\tcase l.acceptCh <- ch:\n\t\tresponse := <-ch\n\t\terr := response.err\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif l.config.MessageMode {\n\t\t\treturn &win32MessageBytePipe{\n\t\t\t\twin32Pipe: win32Pipe{win32File: response.f, path: l.path},\n\t\t\t}, nil\n\t\t}\n\t\treturn &win32Pipe{win32File: response.f, path: l.path}, nil\n\tcase <-l.doneCh:\n\t\treturn nil, ErrPipeListenerClosed\n\t}\n}\n\nfunc (l *win32PipeListener) Close() error {\n\tselect {\n\tcase l.closeCh <- 1:\n\t\t<-l.doneCh\n\tcase <-l.doneCh:\n\t}\n\treturn nil\n}\n\nfunc (l *win32PipeListener) Addr() net.Addr {\n\treturn pipeAddress(l.path)\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go",
    "content": "// Package guid provides a GUID type. The backing structure for a GUID is\n// identical to that used by the golang.org/x/sys/windows GUID type.\n// There are two main binary encodings used for a GUID, the big-endian encoding,\n// and the Windows (mixed-endian) encoding. See here for details:\n// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding\npackage guid\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/sha1\" //nolint:gosec // not used for secure application\n\t\"encoding\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"strconv\"\n)\n\n//go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment\n\n// Variant specifies which GUID variant (or \"type\") of the GUID. It determines\n// how the entirety of the rest of the GUID is interpreted.\ntype Variant uint8\n\n// The variants specified by RFC 4122 section 4.1.1.\nconst (\n\t// VariantUnknown specifies a GUID variant which does not conform to one of\n\t// the variant encodings specified in RFC 4122.\n\tVariantUnknown Variant = iota\n\tVariantNCS\n\tVariantRFC4122 // RFC 4122\n\tVariantMicrosoft\n\tVariantFuture\n)\n\n// Version specifies how the bits in the GUID were generated. For instance, a\n// version 4 GUID is randomly generated, and a version 5 is generated from the\n// hash of an input string.\ntype Version uint8\n\nfunc (v Version) String() string {\n\treturn strconv.FormatUint(uint64(v), 10)\n}\n\nvar _ = (encoding.TextMarshaler)(GUID{})\nvar _ = (encoding.TextUnmarshaler)(&GUID{})\n\n// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122.\nfunc NewV4() (GUID, error) {\n\tvar b [16]byte\n\tif _, err := rand.Read(b[:]); err != nil {\n\t\treturn GUID{}, err\n\t}\n\n\tg := FromArray(b)\n\tg.setVersion(4) // Version 4 means randomly generated.\n\tg.setVariant(VariantRFC4122)\n\n\treturn g, nil\n}\n\n// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing)\n// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name,\n// and the sample code treats it as a series of bytes, so we do the same here.\n//\n// Some implementations, such as those found on Windows, treat the name as a\n// big-endian UTF16 stream of bytes. If that is desired, the string can be\n// encoded as such before being passed to this function.\nfunc NewV5(namespace GUID, name []byte) (GUID, error) {\n\tb := sha1.New() //nolint:gosec // not used for secure application\n\tnamespaceBytes := namespace.ToArray()\n\tb.Write(namespaceBytes[:])\n\tb.Write(name)\n\n\ta := [16]byte{}\n\tcopy(a[:], b.Sum(nil))\n\n\tg := FromArray(a)\n\tg.setVersion(5) // Version 5 means generated from a string.\n\tg.setVariant(VariantRFC4122)\n\n\treturn g, nil\n}\n\nfunc fromArray(b [16]byte, order binary.ByteOrder) GUID {\n\tvar g GUID\n\tg.Data1 = order.Uint32(b[0:4])\n\tg.Data2 = order.Uint16(b[4:6])\n\tg.Data3 = order.Uint16(b[6:8])\n\tcopy(g.Data4[:], b[8:16])\n\treturn g\n}\n\nfunc (g GUID) toArray(order binary.ByteOrder) [16]byte {\n\tb := [16]byte{}\n\torder.PutUint32(b[0:4], g.Data1)\n\torder.PutUint16(b[4:6], g.Data2)\n\torder.PutUint16(b[6:8], g.Data3)\n\tcopy(b[8:16], g.Data4[:])\n\treturn b\n}\n\n// FromArray constructs a GUID from a big-endian encoding array of 16 bytes.\nfunc FromArray(b [16]byte) GUID {\n\treturn fromArray(b, binary.BigEndian)\n}\n\n// ToArray returns an array of 16 bytes representing the GUID in big-endian\n// encoding.\nfunc (g GUID) ToArray() [16]byte {\n\treturn g.toArray(binary.BigEndian)\n}\n\n// FromWindowsArray constructs a GUID from a Windows encoding array of bytes.\nfunc FromWindowsArray(b [16]byte) GUID {\n\treturn fromArray(b, binary.LittleEndian)\n}\n\n// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows\n// encoding.\nfunc (g GUID) ToWindowsArray() [16]byte {\n\treturn g.toArray(binary.LittleEndian)\n}\n\nfunc (g GUID) String() string {\n\treturn fmt.Sprintf(\n\t\t\"%08x-%04x-%04x-%04x-%012x\",\n\t\tg.Data1,\n\t\tg.Data2,\n\t\tg.Data3,\n\t\tg.Data4[:2],\n\t\tg.Data4[2:])\n}\n\n// FromString parses a string containing a GUID and returns the GUID. The only\n// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n// format.\nfunc FromString(s string) (GUID, error) {\n\tif len(s) != 36 {\n\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t}\n\tif s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {\n\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t}\n\n\tvar g GUID\n\n\tdata1, err := strconv.ParseUint(s[0:8], 16, 32)\n\tif err != nil {\n\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t}\n\tg.Data1 = uint32(data1)\n\n\tdata2, err := strconv.ParseUint(s[9:13], 16, 16)\n\tif err != nil {\n\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t}\n\tg.Data2 = uint16(data2)\n\n\tdata3, err := strconv.ParseUint(s[14:18], 16, 16)\n\tif err != nil {\n\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t}\n\tg.Data3 = uint16(data3)\n\n\tfor i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} {\n\t\tv, err := strconv.ParseUint(s[x:x+2], 16, 8)\n\t\tif err != nil {\n\t\t\treturn GUID{}, fmt.Errorf(\"invalid GUID %q\", s)\n\t\t}\n\t\tg.Data4[i] = uint8(v)\n\t}\n\n\treturn g, nil\n}\n\nfunc (g *GUID) setVariant(v Variant) {\n\td := g.Data4[0]\n\tswitch v {\n\tcase VariantNCS:\n\t\td = (d & 0x7f)\n\tcase VariantRFC4122:\n\t\td = (d & 0x3f) | 0x80\n\tcase VariantMicrosoft:\n\t\td = (d & 0x1f) | 0xc0\n\tcase VariantFuture:\n\t\td = (d & 0x0f) | 0xe0\n\tcase VariantUnknown:\n\t\tfallthrough\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"invalid variant: %d\", v))\n\t}\n\tg.Data4[0] = d\n}\n\n// Variant returns the GUID variant, as defined in RFC 4122.\nfunc (g GUID) Variant() Variant {\n\tb := g.Data4[0]\n\tif b&0x80 == 0 {\n\t\treturn VariantNCS\n\t} else if b&0xc0 == 0x80 {\n\t\treturn VariantRFC4122\n\t} else if b&0xe0 == 0xc0 {\n\t\treturn VariantMicrosoft\n\t} else if b&0xe0 == 0xe0 {\n\t\treturn VariantFuture\n\t}\n\treturn VariantUnknown\n}\n\nfunc (g *GUID) setVersion(v Version) {\n\tg.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12)\n}\n\n// Version returns the GUID version, as defined in RFC 4122.\nfunc (g GUID) Version() Version {\n\treturn Version((g.Data3 & 0xF000) >> 12)\n}\n\n// MarshalText returns the textual representation of the GUID.\nfunc (g GUID) MarshalText() ([]byte, error) {\n\treturn []byte(g.String()), nil\n}\n\n// UnmarshalText takes the textual representation of a GUID, and unmarhals it\n// into this GUID.\nfunc (g *GUID) UnmarshalText(text []byte) error {\n\tg2, err := FromString(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*g = g2\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go",
    "content": "//go:build !windows\n// +build !windows\n\npackage guid\n\n// GUID represents a GUID/UUID. It has the same structure as\n// golang.org/x/sys/windows.GUID so that it can be used with functions expecting\n// that type. It is defined as its own type as that is only available to builds\n// targeted at `windows`. The representation matches that used by native Windows\n// code.\ntype GUID struct {\n\tData1 uint32\n\tData2 uint16\n\tData3 uint16\n\tData4 [8]byte\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go",
    "content": "//go:build windows\n// +build windows\n\npackage guid\n\nimport \"golang.org/x/sys/windows\"\n\n// GUID represents a GUID/UUID. It has the same structure as\n// golang.org/x/sys/windows.GUID so that it can be used with functions expecting\n// that type. It is defined as its own type so that stringification and\n// marshaling can be supported. The representation matches that used by native\n// Windows code.\ntype GUID windows.GUID\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go",
    "content": "// Code generated by \"stringer -type=Variant -trimprefix=Variant -linecomment\"; DO NOT EDIT.\n\npackage guid\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[VariantUnknown-0]\n\t_ = x[VariantNCS-1]\n\t_ = x[VariantRFC4122-2]\n\t_ = x[VariantMicrosoft-3]\n\t_ = x[VariantFuture-4]\n}\n\nconst _Variant_name = \"UnknownNCSRFC 4122MicrosoftFuture\"\n\nvar _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33}\n\nfunc (i Variant) String() string {\n\tif i >= Variant(len(_Variant_index)-1) {\n\t\treturn \"Variant(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _Variant_name[_Variant_index[i]:_Variant_index[i+1]]\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/privilege.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"unicode/utf16\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges\n//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf\n//sys revertToSelf() (err error) = advapi32.RevertToSelf\n//sys openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken\n//sys getCurrentThread() (h windows.Handle) = GetCurrentThread\n//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW\n//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW\n//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW\n\nconst (\n\t//revive:disable-next-line:var-naming ALL_CAPS\n\tSE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED\n\n\t//revive:disable-next-line:var-naming ALL_CAPS\n\tERROR_NOT_ALL_ASSIGNED windows.Errno = windows.ERROR_NOT_ALL_ASSIGNED\n\n\tSeBackupPrivilege   = \"SeBackupPrivilege\"\n\tSeRestorePrivilege  = \"SeRestorePrivilege\"\n\tSeSecurityPrivilege = \"SeSecurityPrivilege\"\n)\n\nvar (\n\tprivNames     = make(map[string]uint64)\n\tprivNameMutex sync.Mutex\n)\n\n// PrivilegeError represents an error enabling privileges.\ntype PrivilegeError struct {\n\tprivileges []uint64\n}\n\nfunc (e *PrivilegeError) Error() string {\n\ts := \"Could not enable privilege \"\n\tif len(e.privileges) > 1 {\n\t\ts = \"Could not enable privileges \"\n\t}\n\tfor i, p := range e.privileges {\n\t\tif i != 0 {\n\t\t\ts += \", \"\n\t\t}\n\t\ts += `\"`\n\t\ts += getPrivilegeName(p)\n\t\ts += `\"`\n\t}\n\treturn s\n}\n\n// RunWithPrivilege enables a single privilege for a function call.\nfunc RunWithPrivilege(name string, fn func() error) error {\n\treturn RunWithPrivileges([]string{name}, fn)\n}\n\n// RunWithPrivileges enables privileges for a function call.\nfunc RunWithPrivileges(names []string, fn func() error) error {\n\tprivileges, err := mapPrivileges(names)\n\tif err != nil {\n\t\treturn err\n\t}\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\ttoken, err := newThreadToken()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer releaseThreadToken(token)\n\terr = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn fn()\n}\n\nfunc mapPrivileges(names []string) ([]uint64, error) {\n\tprivileges := make([]uint64, 0, len(names))\n\tprivNameMutex.Lock()\n\tdefer privNameMutex.Unlock()\n\tfor _, name := range names {\n\t\tp, ok := privNames[name]\n\t\tif !ok {\n\t\t\terr := lookupPrivilegeValue(\"\", name, &p)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tprivNames[name] = p\n\t\t}\n\t\tprivileges = append(privileges, p)\n\t}\n\treturn privileges, nil\n}\n\n// EnableProcessPrivileges enables privileges globally for the process.\nfunc EnableProcessPrivileges(names []string) error {\n\treturn enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)\n}\n\n// DisableProcessPrivileges disables privileges globally for the process.\nfunc DisableProcessPrivileges(names []string) error {\n\treturn enableDisableProcessPrivilege(names, 0)\n}\n\nfunc enableDisableProcessPrivilege(names []string, action uint32) error {\n\tprivileges, err := mapPrivileges(names)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tp := windows.CurrentProcess()\n\tvar token windows.Token\n\terr = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer token.Close()\n\treturn adjustPrivileges(token, privileges, action)\n}\n\nfunc adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {\n\tvar b bytes.Buffer\n\t_ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))\n\tfor _, p := range privileges {\n\t\t_ = binary.Write(&b, binary.LittleEndian, p)\n\t\t_ = binary.Write(&b, binary.LittleEndian, action)\n\t}\n\tprevState := make([]byte, b.Len())\n\treqSize := uint32(0)\n\tsuccess, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)\n\tif !success {\n\t\treturn err\n\t}\n\tif err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno\n\t\treturn &PrivilegeError{privileges}\n\t}\n\treturn nil\n}\n\nfunc getPrivilegeName(luid uint64) string {\n\tvar nameBuffer [256]uint16\n\tbufSize := uint32(len(nameBuffer))\n\terr := lookupPrivilegeName(\"\", &luid, &nameBuffer[0], &bufSize)\n\tif err != nil {\n\t\treturn fmt.Sprintf(\"<unknown privilege %d>\", luid)\n\t}\n\n\tvar displayNameBuffer [256]uint16\n\tdisplayBufSize := uint32(len(displayNameBuffer))\n\tvar langID uint32\n\terr = lookupPrivilegeDisplayName(\"\", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)\n\tif err != nil {\n\t\treturn fmt.Sprintf(\"<unknown privilege %s>\", string(utf16.Decode(nameBuffer[:bufSize])))\n\t}\n\n\treturn string(utf16.Decode(displayNameBuffer[:displayBufSize]))\n}\n\nfunc newThreadToken() (windows.Token, error) {\n\terr := impersonateSelf(windows.SecurityImpersonation)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tvar token windows.Token\n\terr = openThreadToken(getCurrentThread(), windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, false, &token)\n\tif err != nil {\n\t\trerr := revertToSelf()\n\t\tif rerr != nil {\n\t\t\tpanic(rerr)\n\t\t}\n\t\treturn 0, err\n\t}\n\treturn token, nil\n}\n\nfunc releaseThreadToken(h windows.Token) {\n\terr := revertToSelf()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\th.Close()\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/reparse.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode/utf16\"\n\t\"unsafe\"\n)\n\nconst (\n\treparseTagMountPoint = 0xA0000003\n\treparseTagSymlink    = 0xA000000C\n)\n\ntype reparseDataBuffer struct {\n\tReparseTag           uint32\n\tReparseDataLength    uint16\n\tReserved             uint16\n\tSubstituteNameOffset uint16\n\tSubstituteNameLength uint16\n\tPrintNameOffset      uint16\n\tPrintNameLength      uint16\n}\n\n// ReparsePoint describes a Win32 symlink or mount point.\ntype ReparsePoint struct {\n\tTarget       string\n\tIsMountPoint bool\n}\n\n// UnsupportedReparsePointError is returned when trying to decode a non-symlink or\n// mount point reparse point.\ntype UnsupportedReparsePointError struct {\n\tTag uint32\n}\n\nfunc (e *UnsupportedReparsePointError) Error() string {\n\treturn fmt.Sprintf(\"unsupported reparse point %x\", e.Tag)\n}\n\n// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink\n// or a mount point.\nfunc DecodeReparsePoint(b []byte) (*ReparsePoint, error) {\n\ttag := binary.LittleEndian.Uint32(b[0:4])\n\treturn DecodeReparsePointData(tag, b[8:])\n}\n\nfunc DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {\n\tisMountPoint := false\n\tswitch tag {\n\tcase reparseTagMountPoint:\n\t\tisMountPoint = true\n\tcase reparseTagSymlink:\n\tdefault:\n\t\treturn nil, &UnsupportedReparsePointError{tag}\n\t}\n\tnameOffset := 8 + binary.LittleEndian.Uint16(b[4:6])\n\tif !isMountPoint {\n\t\tnameOffset += 4\n\t}\n\tnameLength := binary.LittleEndian.Uint16(b[6:8])\n\tname := make([]uint16, nameLength/2)\n\terr := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil\n}\n\nfunc isDriveLetter(c byte) bool {\n\treturn (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')\n}\n\n// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or\n// mount point.\nfunc EncodeReparsePoint(rp *ReparsePoint) []byte {\n\t// Generate an NT path and determine if this is a relative path.\n\tvar ntTarget string\n\trelative := false\n\tif strings.HasPrefix(rp.Target, `\\\\?\\`) {\n\t\tntTarget = `\\??\\` + rp.Target[4:]\n\t} else if strings.HasPrefix(rp.Target, `\\\\`) {\n\t\tntTarget = `\\??\\UNC\\` + rp.Target[2:]\n\t} else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {\n\t\tntTarget = `\\??\\` + rp.Target\n\t} else {\n\t\tntTarget = rp.Target\n\t\trelative = true\n\t}\n\n\t// The paths must be NUL-terminated even though they are counted strings.\n\ttarget16 := utf16.Encode([]rune(rp.Target + \"\\x00\"))\n\tntTarget16 := utf16.Encode([]rune(ntTarget + \"\\x00\"))\n\n\tsize := int(unsafe.Sizeof(reparseDataBuffer{})) - 8\n\tsize += len(ntTarget16)*2 + len(target16)*2\n\n\ttag := uint32(reparseTagMountPoint)\n\tif !rp.IsMountPoint {\n\t\ttag = reparseTagSymlink\n\t\tsize += 4 // Add room for symlink flags\n\t}\n\n\tdata := reparseDataBuffer{\n\t\tReparseTag:           tag,\n\t\tReparseDataLength:    uint16(size),\n\t\tSubstituteNameOffset: 0,\n\t\tSubstituteNameLength: uint16((len(ntTarget16) - 1) * 2),\n\t\tPrintNameOffset:      uint16(len(ntTarget16) * 2),\n\t\tPrintNameLength:      uint16((len(target16) - 1) * 2),\n\t}\n\n\tvar b bytes.Buffer\n\t_ = binary.Write(&b, binary.LittleEndian, &data)\n\tif !rp.IsMountPoint {\n\t\tflags := uint32(0)\n\t\tif relative {\n\t\t\tflags |= 1\n\t\t}\n\t\t_ = binary.Write(&b, binary.LittleEndian, flags)\n\t}\n\n\t_ = binary.Write(&b, binary.LittleEndian, ntTarget16)\n\t_ = binary.Write(&b, binary.LittleEndian, target16)\n\treturn b.Bytes()\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/sd.go",
    "content": "//go:build windows\n// +build windows\n\npackage winio\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW\n//sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW\n//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW\n//sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW\n\ntype AccountLookupError struct {\n\tName string\n\tErr  error\n}\n\nfunc (e *AccountLookupError) Error() string {\n\tif e.Name == \"\" {\n\t\treturn \"lookup account: empty account name specified\"\n\t}\n\tvar s string\n\tswitch {\n\tcase errors.Is(e.Err, windows.ERROR_INVALID_SID):\n\t\ts = \"the security ID structure is invalid\"\n\tcase errors.Is(e.Err, windows.ERROR_NONE_MAPPED):\n\t\ts = \"not found\"\n\tdefault:\n\t\ts = e.Err.Error()\n\t}\n\treturn \"lookup account \" + e.Name + \": \" + s\n}\n\nfunc (e *AccountLookupError) Unwrap() error { return e.Err }\n\ntype SddlConversionError struct {\n\tSddl string\n\tErr  error\n}\n\nfunc (e *SddlConversionError) Error() string {\n\treturn \"convert \" + e.Sddl + \": \" + e.Err.Error()\n}\n\nfunc (e *SddlConversionError) Unwrap() error { return e.Err }\n\n// LookupSidByName looks up the SID of an account by name\n//\n//revive:disable-next-line:var-naming SID, not Sid\nfunc LookupSidByName(name string) (sid string, err error) {\n\tif name == \"\" {\n\t\treturn \"\", &AccountLookupError{name, windows.ERROR_NONE_MAPPED}\n\t}\n\n\tvar sidSize, sidNameUse, refDomainSize uint32\n\terr = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse)\n\tif err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno\n\t\treturn \"\", &AccountLookupError{name, err}\n\t}\n\tsidBuffer := make([]byte, sidSize)\n\trefDomainBuffer := make([]uint16, refDomainSize)\n\terr = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)\n\tif err != nil {\n\t\treturn \"\", &AccountLookupError{name, err}\n\t}\n\tvar strBuffer *uint16\n\terr = convertSidToStringSid(&sidBuffer[0], &strBuffer)\n\tif err != nil {\n\t\treturn \"\", &AccountLookupError{name, err}\n\t}\n\tsid = windows.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:])\n\t_, _ = windows.LocalFree(windows.Handle(unsafe.Pointer(strBuffer)))\n\treturn sid, nil\n}\n\n// LookupNameBySid looks up the name of an account by SID\n//\n//revive:disable-next-line:var-naming SID, not Sid\nfunc LookupNameBySid(sid string) (name string, err error) {\n\tif sid == \"\" {\n\t\treturn \"\", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED}\n\t}\n\n\tsidBuffer, err := windows.UTF16PtrFromString(sid)\n\tif err != nil {\n\t\treturn \"\", &AccountLookupError{sid, err}\n\t}\n\n\tvar sidPtr *byte\n\tif err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil {\n\t\treturn \"\", &AccountLookupError{sid, err}\n\t}\n\tdefer windows.LocalFree(windows.Handle(unsafe.Pointer(sidPtr))) //nolint:errcheck\n\n\tvar nameSize, refDomainSize, sidNameUse uint32\n\terr = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse)\n\tif err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno\n\t\treturn \"\", &AccountLookupError{sid, err}\n\t}\n\n\tnameBuffer := make([]uint16, nameSize)\n\trefDomainBuffer := make([]uint16, refDomainSize)\n\terr = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)\n\tif err != nil {\n\t\treturn \"\", &AccountLookupError{sid, err}\n\t}\n\n\tname = windows.UTF16ToString(nameBuffer)\n\treturn name, nil\n}\n\nfunc SddlToSecurityDescriptor(sddl string) ([]byte, error) {\n\tsd, err := windows.SecurityDescriptorFromString(sddl)\n\tif err != nil {\n\t\treturn nil, &SddlConversionError{Sddl: sddl, Err: err}\n\t}\n\tb := unsafe.Slice((*byte)(unsafe.Pointer(sd)), sd.Length())\n\treturn b, nil\n}\n\nfunc SecurityDescriptorToSddl(sd []byte) (string, error) {\n\tif l := int(unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{})); len(sd) < l {\n\t\treturn \"\", fmt.Errorf(\"SecurityDescriptor (%d) smaller than expected (%d): %w\", len(sd), l, windows.ERROR_INCORRECT_SIZE)\n\t}\n\ts := (*windows.SECURITY_DESCRIPTOR)(unsafe.Pointer(&sd[0]))\n\treturn s.String(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/syscall.go",
    "content": "//go:build windows\n\npackage winio\n\n//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go\n"
  },
  {
    "path": "vendor/github.com/Microsoft/go-winio/zsyscall_windows.go",
    "content": "//go:build windows\n\n// Code generated by 'go generate' using \"github.com/Microsoft/go-winio/tools/mkwinsyscall\"; DO NOT EDIT.\n\npackage winio\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nvar _ unsafe.Pointer\n\n// Do the interface allocations only once for common\n// Errno values.\nconst (\n\terrnoERROR_IO_PENDING = 997\n)\n\nvar (\n\terrERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)\n\terrERROR_EINVAL     error = syscall.EINVAL\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn errERROR_EINVAL\n\tcase errnoERROR_IO_PENDING:\n\t\treturn errERROR_IO_PENDING\n\t}\n\treturn e\n}\n\nvar (\n\tmodadvapi32 = windows.NewLazySystemDLL(\"advapi32.dll\")\n\tmodkernel32 = windows.NewLazySystemDLL(\"kernel32.dll\")\n\tmodntdll    = windows.NewLazySystemDLL(\"ntdll.dll\")\n\tmodws2_32   = windows.NewLazySystemDLL(\"ws2_32.dll\")\n\n\tprocAdjustTokenPrivileges              = modadvapi32.NewProc(\"AdjustTokenPrivileges\")\n\tprocConvertSidToStringSidW             = modadvapi32.NewProc(\"ConvertSidToStringSidW\")\n\tprocConvertStringSidToSidW             = modadvapi32.NewProc(\"ConvertStringSidToSidW\")\n\tprocImpersonateSelf                    = modadvapi32.NewProc(\"ImpersonateSelf\")\n\tprocLookupAccountNameW                 = modadvapi32.NewProc(\"LookupAccountNameW\")\n\tprocLookupAccountSidW                  = modadvapi32.NewProc(\"LookupAccountSidW\")\n\tprocLookupPrivilegeDisplayNameW        = modadvapi32.NewProc(\"LookupPrivilegeDisplayNameW\")\n\tprocLookupPrivilegeNameW               = modadvapi32.NewProc(\"LookupPrivilegeNameW\")\n\tprocLookupPrivilegeValueW              = modadvapi32.NewProc(\"LookupPrivilegeValueW\")\n\tprocOpenThreadToken                    = modadvapi32.NewProc(\"OpenThreadToken\")\n\tprocRevertToSelf                       = modadvapi32.NewProc(\"RevertToSelf\")\n\tprocBackupRead                         = modkernel32.NewProc(\"BackupRead\")\n\tprocBackupWrite                        = modkernel32.NewProc(\"BackupWrite\")\n\tprocCancelIoEx                         = modkernel32.NewProc(\"CancelIoEx\")\n\tprocConnectNamedPipe                   = modkernel32.NewProc(\"ConnectNamedPipe\")\n\tprocCreateIoCompletionPort             = modkernel32.NewProc(\"CreateIoCompletionPort\")\n\tprocCreateNamedPipeW                   = modkernel32.NewProc(\"CreateNamedPipeW\")\n\tprocDisconnectNamedPipe                = modkernel32.NewProc(\"DisconnectNamedPipe\")\n\tprocGetCurrentThread                   = modkernel32.NewProc(\"GetCurrentThread\")\n\tprocGetNamedPipeHandleStateW           = modkernel32.NewProc(\"GetNamedPipeHandleStateW\")\n\tprocGetNamedPipeInfo                   = modkernel32.NewProc(\"GetNamedPipeInfo\")\n\tprocGetQueuedCompletionStatus          = modkernel32.NewProc(\"GetQueuedCompletionStatus\")\n\tprocSetFileCompletionNotificationModes = modkernel32.NewProc(\"SetFileCompletionNotificationModes\")\n\tprocNtCreateNamedPipeFile              = modntdll.NewProc(\"NtCreateNamedPipeFile\")\n\tprocRtlDefaultNpAcl                    = modntdll.NewProc(\"RtlDefaultNpAcl\")\n\tprocRtlDosPathNameToNtPathName_U       = modntdll.NewProc(\"RtlDosPathNameToNtPathName_U\")\n\tprocRtlNtStatusToDosErrorNoTeb         = modntdll.NewProc(\"RtlNtStatusToDosErrorNoTeb\")\n\tprocWSAGetOverlappedResult             = modws2_32.NewProc(\"WSAGetOverlappedResult\")\n)\n\nfunc adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) {\n\tvar _p0 uint32\n\tif releaseAll {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize)))\n\tsuccess = r0 != 0\n\tif true {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc convertSidToStringSid(sid *byte, str **uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc convertStringSidToSid(str *uint16, sid **byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc impersonateSelf(level uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(level))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(accountName)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse)\n}\n\nfunc _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(systemName)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId)\n}\n\nfunc _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupPrivilegeDisplayNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(systemName)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _lookupPrivilegeName(_p0, luid, buffer, size)\n}\n\nfunc _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupPrivilegeNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(systemName)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *uint16\n\t_p1, err = syscall.UTF16PtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _lookupPrivilegeValue(_p0, _p1, luid)\n}\n\nfunc _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) {\n\tvar _p0 uint32\n\tif openAsSelf {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc revertToSelf() (err error) {\n\tr1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr())\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 uint32\n\tif abort {\n\t\t_p1 = 1\n\t}\n\tvar _p2 uint32\n\tif processSecurity {\n\t\t_p2 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procBackupRead.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 uint32\n\tif abort {\n\t\t_p1 = 1\n\t}\n\tvar _p2 uint32\n\tif processSecurity {\n\t\t_p2 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procBackupWrite.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(file), uintptr(unsafe.Pointer(o)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(o)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount))\n\tnewport = windows.Handle(r0)\n\tif newport == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa)\n}\n\nfunc _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)))\n\thandle = windows.Handle(r0)\n\tif handle == windows.InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc disconnectNamedPipe(pipe windows.Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getCurrentThread() (h windows.Handle) {\n\tr0, _, _ := syscall.SyscallN(procGetCurrentThread.Addr())\n\th = windows.Handle(r0)\n\treturn\n}\n\nfunc getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(h), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) {\n\tr0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)))\n\tstatus = ntStatus(r0)\n\treturn\n}\n\nfunc rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) {\n\tr0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(dacl)))\n\tstatus = ntStatus(r0)\n\treturn\n}\n\nfunc rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) {\n\tr0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved))\n\tstatus = ntStatus(r0)\n\treturn\n}\n\nfunc rtlNtStatusToDosError(status ntStatus) (winerr error) {\n\tr0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(status))\n\tif r0 != 0 {\n\t\twinerr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {\n\tvar _p0 uint32\n\tif wait {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/.gitignore",
    "content": ".DS_Store\n.*.sw?\n/coverage.txt"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/.whitesource",
    "content": "{\n  \"settingsInheritedFrom\": \"VividCortex/whitesource-config@master\"\n}"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/LICENSE",
    "content": "The MIT License\n\nCopyright (c) 2013 VividCortex\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\nall copies 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\nTHE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/README.md",
    "content": "# EWMA\n\n[![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma)\n![build](https://github.com/VividCortex/ewma/workflows/build/badge.svg)\n[![codecov](https://codecov.io/gh/VividCortex/ewma/branch/master/graph/badge.svg)](https://codecov.io/gh/VividCortex/ewma)\n\nThis repo provides Exponentially Weighted Moving Average algorithms, or EWMAs for short, [based on our\nQuantifying Abnormal Behavior talk](https://vividcortex.com/blog/2013/07/23/a-fast-go-library-for-exponential-moving-averages/).\n\n### Exponentially Weighted Moving Average\n\nAn exponentially weighted moving average is a way to continuously compute a type of\naverage for a series of numbers, as the numbers arrive. After a value in the series is\nadded to the average, its weight in the average decreases exponentially over time. This\nbiases the average towards more recent data. EWMAs are useful for several reasons, chiefly\ntheir inexpensive computational and memory cost, as well as the fact that they represent\nthe recent central tendency of the series of values.\n\nThe EWMA algorithm requires a decay factor, alpha. The larger the alpha, the more the average\nis biased towards recent history. The alpha must be between 0 and 1, and is typically\na fairly small number, such as 0.04. We will discuss the choice of alpha later.\n\nThe algorithm works thus, in pseudocode:\n\n1. Multiply the next number in the series by alpha.\n2. Multiply the current value of the average by 1 minus alpha.\n3. Add the result of steps 1 and 2, and store it as the new current value of the average.\n4. Repeat for each number in the series.\n\nThere are special-case behaviors for how to initialize the current value, and these vary\nbetween implementations. One approach is to start with the first value in the series;\nanother is to average the first 10 or so values in the series using an arithmetic average,\nand then begin the incremental updating of the average. Each method has pros and cons.\n\nIt may help to look at it pictorially. Suppose the series has five numbers, and we choose\nalpha to be 0.50 for simplicity. Here's the series, with numbers in the neighborhood of 300.\n\n![Data Series](https://user-images.githubusercontent.com/279875/28242350-463289a2-6977-11e7-88ca-fd778ccef1f0.png)\n\nNow let's take the moving average of those numbers. First we set the average to the value\nof the first number.\n\n![EWMA Step 1](https://user-images.githubusercontent.com/279875/28242353-464c96bc-6977-11e7-9981-dc4e0789c7ba.png)\n\nNext we multiply the next number by alpha, multiply the current value by 1-alpha, and add\nthem to generate a new value.\n\n![EWMA Step 2](https://user-images.githubusercontent.com/279875/28242351-464abefa-6977-11e7-95d0-43900f29bef2.png)\n\nThis continues until we are done.\n\n![EWMA Step N](https://user-images.githubusercontent.com/279875/28242352-464c58f0-6977-11e7-8cd0-e01e4efaac7f.png)\n\nNotice how each of the values in the series decays by half each time a new value\nis added, and the top of the bars in the lower portion of the image represents the\nsize of the moving average. It is a smoothed, or low-pass, average of the original\nseries.\n\nFor further reading, see [Exponentially weighted moving average](http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average) on wikipedia.\n\n### Choosing Alpha\n\nConsider a fixed-size sliding-window moving average (not an exponentially weighted moving average)\nthat averages over the previous N samples. What is the average age of each sample? It is N/2.\n\nNow suppose that you wish to construct a EWMA whose samples have the same average age. The formula\nto compute the alpha required for this is: alpha = 2/(N+1). Proof is in the book\n\"Production and Operations Analysis\" by Steven Nahmias.\n\nSo, for example, if you have a time-series with samples once per second, and you want to get the\nmoving average over the previous minute, you should use an alpha of .032786885. This, by the way,\nis the constant alpha used for this repository's SimpleEWMA.\n\n### Implementations\n\nThis repository contains two implementations of the EWMA algorithm, with different properties.\n\nThe implementations all conform to the MovingAverage interface, and the constructor returns\nthat type.\n\nCurrent implementations assume an implicit time interval of 1.0 between every sample added.\nThat is, the passage of time is treated as though it's the same as the arrival of samples.\nIf you need time-based decay when samples are not arriving precisely at set intervals, then\nthis package will not support your needs at present.\n\n#### SimpleEWMA\n\nA SimpleEWMA is designed for low CPU and memory consumption. It **will** have different behavior than the VariableEWMA\nfor multiple reasons. It has no warm-up period and it uses a constant\ndecay.  These properties let it use less memory.  It will also behave\ndifferently when it's equal to zero, which is assumed to mean\nuninitialized, so if a value is likely to actually become zero over time,\nthen any non-zero value will cause a sharp jump instead of a small change.\n\n#### VariableEWMA\n\nUnlike SimpleEWMA, this supports a custom age which must be stored, and thus uses more memory.\nIt also has a \"warmup\" time when you start adding values to it. It will report a value of 0.0\nuntil you have added the required number of samples to it. It uses some memory to store the\nnumber of samples added to it. As a result it uses a little over twice the memory of SimpleEWMA.\n\n## Usage\n\n### API Documentation\n\nView the GoDoc generated documentation [here](http://godoc.org/github.com/VividCortex/ewma).\n\n```go\npackage main\n\nimport \"github.com/VividCortex/ewma\"\n\nfunc main() {\n\tsamples := [100]float64{\n\t\t4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,\n\t}\n\n\te := ewma.NewMovingAverage()  //=> Returns a SimpleEWMA if called without params\n\ta := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)\n\n\tfor _, f := range samples {\n\t\te.Add(f)\n\t\ta.Add(f)\n\t}\n\n\te.Value() //=> 13.577404704631077\n\ta.Value() //=> 1.5806140565521463e-12\n}\n```\n\n## Contributing\n\nWe only accept pull requests for minor fixes or improvements. This includes:\n\n* Small bug fixes\n* Typos\n* Documentation or comments\n\nPlease open issues to discuss new features. Pull requests for new features will be rejected,\nso we recommend forking the repository and making changes in your fork for your use case.\n\n## License\n\nThis repository is Copyright (c) 2013 VividCortex, Inc. All rights reserved.\nIt is licensed under the MIT license. Please see the LICENSE file for applicable license terms.\n"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/codecov.yml",
    "content": "coverage:\n  status:\n    project:\n      default:\n        threshold: 15%\n    patch: off\n"
  },
  {
    "path": "vendor/github.com/VividCortex/ewma/ewma.go",
    "content": "// Package ewma implements exponentially weighted moving averages.\npackage ewma\n\n// Copyright (c) 2013 VividCortex, Inc. All rights reserved.\n// Please see the LICENSE file for applicable license terms.\n\nconst (\n\t// By default, we average over a one-minute period, which means the average\n\t// age of the metrics in the period is 30 seconds.\n\tAVG_METRIC_AGE float64 = 30.0\n\n\t// The formula for computing the decay factor from the average age comes\n\t// from \"Production and Operations Analysis\" by Steven Nahmias.\n\tDECAY float64 = 2 / (float64(AVG_METRIC_AGE) + 1)\n\n\t// For best results, the moving average should not be initialized to the\n\t// samples it sees immediately. The book \"Production and Operations\n\t// Analysis\" by Steven Nahmias suggests initializing the moving average to\n\t// the mean of the first 10 samples. Until the VariableEwma has seen this\n\t// many samples, it is not \"ready\" to be queried for the value of the\n\t// moving average. This adds some memory cost.\n\tWARMUP_SAMPLES uint8 = 10\n)\n\n// MovingAverage is the interface that computes a moving average over a time-\n// series stream of numbers. The average may be over a window or exponentially\n// decaying.\ntype MovingAverage interface {\n\tAdd(float64)\n\tValue() float64\n\tSet(float64)\n}\n\n// NewMovingAverage constructs a MovingAverage that computes an average with the\n// desired characteristics in the moving window or exponential decay. If no\n// age is given, it constructs a default exponentially weighted implementation\n// that consumes minimal memory. The age is related to the decay factor alpha\n// by the formula given for the DECAY constant. It signifies the average age\n// of the samples as time goes to infinity.\nfunc NewMovingAverage(age ...float64) MovingAverage {\n\tif len(age) == 0 || age[0] == AVG_METRIC_AGE {\n\t\treturn new(SimpleEWMA)\n\t}\n\treturn &VariableEWMA{\n\t\tdecay: 2 / (age[0] + 1),\n\t}\n}\n\n// A SimpleEWMA represents the exponentially weighted moving average of a\n// series of numbers. It WILL have different behavior than the VariableEWMA\n// for multiple reasons. It has no warm-up period and it uses a constant\n// decay.  These properties let it use less memory.  It will also behave\n// differently when it's equal to zero, which is assumed to mean\n// uninitialized, so if a value is likely to actually become zero over time,\n// then any non-zero value will cause a sharp jump instead of a small change.\n// However, note that this takes a long time, and the value may just\n// decays to a stable value that's close to zero, but which won't be mistaken\n// for uninitialized. See http://play.golang.org/p/litxBDr_RC for example.\ntype SimpleEWMA struct {\n\t// The current value of the average. After adding with Add(), this is\n\t// updated to reflect the average of all values seen thus far.\n\tvalue float64\n}\n\n// Add adds a value to the series and updates the moving average.\nfunc (e *SimpleEWMA) Add(value float64) {\n\tif e.value == 0 { // this is a proxy for \"uninitialized\"\n\t\te.value = value\n\t} else {\n\t\te.value = (value * DECAY) + (e.value * (1 - DECAY))\n\t}\n}\n\n// Value returns the current value of the moving average.\nfunc (e *SimpleEWMA) Value() float64 {\n\treturn e.value\n}\n\n// Set sets the EWMA's value.\nfunc (e *SimpleEWMA) Set(value float64) {\n\te.value = value\n}\n\n// VariableEWMA represents the exponentially weighted moving average of a series of\n// numbers. Unlike SimpleEWMA, it supports a custom age, and thus uses more memory.\ntype VariableEWMA struct {\n\t// The multiplier factor by which the previous samples decay.\n\tdecay float64\n\t// The current value of the average.\n\tvalue float64\n\t// The number of samples added to this instance.\n\tcount uint8\n}\n\n// Add adds a value to the series and updates the moving average.\nfunc (e *VariableEWMA) Add(value float64) {\n\tswitch {\n\tcase e.count < WARMUP_SAMPLES:\n\t\te.count++\n\t\te.value += value\n\tcase e.count == WARMUP_SAMPLES:\n\t\te.count++\n\t\te.value = e.value / float64(WARMUP_SAMPLES)\n\t\te.value = (value * e.decay) + (e.value * (1 - e.decay))\n\tdefault:\n\t\te.value = (value * e.decay) + (e.value * (1 - e.decay))\n\t}\n}\n\n// Value returns the current value of the average, or 0.0 if the series hasn't\n// warmed up yet.\nfunc (e *VariableEWMA) Value() float64 {\n\tif e.count <= WARMUP_SAMPLES {\n\t\treturn 0.0\n\t}\n\n\treturn e.value\n}\n\n// Set sets the EWMA's value.\nfunc (e *VariableEWMA) Set(value float64) {\n\te.value = value\n\tif e.count <= WARMUP_SAMPLES {\n\t\te.count = WARMUP_SAMPLES + 1\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/acarl005/stripansi/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Andrew Carlson\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": "vendor/github.com/acarl005/stripansi/README.md",
    "content": "Strip ANSI\n==========\n\nThis Go package removes ANSI escape codes from strings.\n\nIdeally, we would prevent these from appearing in any text we want to process.\nHowever, sometimes this can't be helped, and we need to be able to deal with that noise.\nThis will use a regexp to remove those unwanted escape codes.\n\n\n## Install\n\n```sh\n$ go get -u github.com/acarl005/stripansi\n```\n\n## Usage\n\n```go\nimport (\n\t\"fmt\"\n\t\"github.com/acarl005/stripansi\"\n)\n\nfunc main() {\n\tmsg := \"\\x1b[38;5;140m foo\\x1b[0m bar\"\n\tcleanMsg := stripansi.Strip(msg)\n\tfmt.Println(cleanMsg) // \" foo bar\"\n}\n```\n"
  },
  {
    "path": "vendor/github.com/acarl005/stripansi/stripansi.go",
    "content": "package stripansi\n\nimport (\n\t\"regexp\"\n)\n\nconst ansi = \"[\\u001B\\u009B][[\\\\]()#;?]*(?:(?:(?:[a-zA-Z\\\\d]*(?:;[a-zA-Z\\\\d]*)*)?\\u0007)|(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PRZcf-ntqry=><~]))\"\n\nvar re = regexp.MustCompile(ansi)\n\nfunc Strip(str string) string {\n\treturn re.ReplaceAllString(str, \"\")\n}\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/LICENSE.txt",
    "content": "Copyright (c) 2016 Caleb Spare\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/README.md",
    "content": "# xxhash\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2)\n[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml)\n\nxxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a\nhigh-quality hashing algorithm that is much faster than anything in the Go\nstandard library.\n\nThis package provides a straightforward API:\n\n```\nfunc Sum64(b []byte) uint64\nfunc Sum64String(s string) uint64\ntype Digest struct{ ... }\n    func New() *Digest\n```\n\nThe `Digest` type implements hash.Hash64. Its key methods are:\n\n```\nfunc (*Digest) Write([]byte) (int, error)\nfunc (*Digest) WriteString(string) (int, error)\nfunc (*Digest) Sum64() uint64\n```\n\nThe package is written with optimized pure Go and also contains even faster\nassembly implementations for amd64 and arm64. If desired, the `purego` build tag\nopts into using the Go code even on those architectures.\n\n[xxHash]: http://cyan4973.github.io/xxHash/\n\n## Compatibility\n\nThis package is in a module and the latest code is in version 2 of the module.\nYou need a version of Go with at least \"minimal module compatibility\" to use\ngithub.com/cespare/xxhash/v2:\n\n* 1.9.7+ for Go 1.9\n* 1.10.3+ for Go 1.10\n* Go 1.11 or later\n\nI recommend using the latest release of Go.\n\n## Benchmarks\n\nHere are some quick benchmarks comparing the pure-Go and assembly\nimplementations of Sum64.\n\n| input size | purego    | asm       |\n| ---------- | --------- | --------- |\n| 4 B        |  1.3 GB/s |  1.2 GB/s |\n| 16 B       |  2.9 GB/s |  3.5 GB/s |\n| 100 B      |  6.9 GB/s |  8.1 GB/s |\n| 4 KB       | 11.7 GB/s | 16.7 GB/s |\n| 10 MB      | 12.0 GB/s | 17.3 GB/s |\n\nThese numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C\nCPU using the following commands under Go 1.19.2:\n\n```\nbenchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$')\nbenchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$')\n```\n\n## Projects using this package\n\n- [InfluxDB](https://github.com/influxdata/influxdb)\n- [Prometheus](https://github.com/prometheus/prometheus)\n- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)\n- [FreeCache](https://github.com/coocood/freecache)\n- [FastCache](https://github.com/VictoriaMetrics/fastcache)\n- [Ristretto](https://github.com/dgraph-io/ristretto)\n- [Badger](https://github.com/dgraph-io/badger)\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/testall.sh",
    "content": "#!/bin/bash\nset -eu -o pipefail\n\n# Small convenience script for running the tests with various combinations of\n# arch/tags. This assumes we're running on amd64 and have qemu available.\n\ngo test ./...\ngo test -tags purego ./...\nGOARCH=arm64 go test\nGOARCH=arm64 go test -tags purego\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash.go",
    "content": "// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described\n// at http://cyan4973.github.io/xxHash/.\npackage xxhash\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"math/bits\"\n)\n\nconst (\n\tprime1 uint64 = 11400714785074694791\n\tprime2 uint64 = 14029467366897019727\n\tprime3 uint64 = 1609587929392839161\n\tprime4 uint64 = 9650029242287828579\n\tprime5 uint64 = 2870177450012600261\n)\n\n// Store the primes in an array as well.\n//\n// The consts are used when possible in Go code to avoid MOVs but we need a\n// contiguous array for the assembly code.\nvar primes = [...]uint64{prime1, prime2, prime3, prime4, prime5}\n\n// Digest implements hash.Hash64.\n//\n// Note that a zero-valued Digest is not ready to receive writes.\n// Call Reset or create a Digest using New before calling other methods.\ntype Digest struct {\n\tv1    uint64\n\tv2    uint64\n\tv3    uint64\n\tv4    uint64\n\ttotal uint64\n\tmem   [32]byte\n\tn     int // how much of mem is used\n}\n\n// New creates a new Digest with a zero seed.\nfunc New() *Digest {\n\treturn NewWithSeed(0)\n}\n\n// NewWithSeed creates a new Digest with the given seed.\nfunc NewWithSeed(seed uint64) *Digest {\n\tvar d Digest\n\td.ResetWithSeed(seed)\n\treturn &d\n}\n\n// Reset clears the Digest's state so that it can be reused.\n// It uses a seed value of zero.\nfunc (d *Digest) Reset() {\n\td.ResetWithSeed(0)\n}\n\n// ResetWithSeed clears the Digest's state so that it can be reused.\n// It uses the given seed to initialize the state.\nfunc (d *Digest) ResetWithSeed(seed uint64) {\n\td.v1 = seed + prime1 + prime2\n\td.v2 = seed + prime2\n\td.v3 = seed\n\td.v4 = seed - prime1\n\td.total = 0\n\td.n = 0\n}\n\n// Size always returns 8 bytes.\nfunc (d *Digest) Size() int { return 8 }\n\n// BlockSize always returns 32 bytes.\nfunc (d *Digest) BlockSize() int { return 32 }\n\n// Write adds more data to d. It always returns len(b), nil.\nfunc (d *Digest) Write(b []byte) (n int, err error) {\n\tn = len(b)\n\td.total += uint64(n)\n\n\tmemleft := d.mem[d.n&(len(d.mem)-1):]\n\n\tif d.n+n < 32 {\n\t\t// This new data doesn't even fill the current block.\n\t\tcopy(memleft, b)\n\t\td.n += n\n\t\treturn\n\t}\n\n\tif d.n > 0 {\n\t\t// Finish off the partial block.\n\t\tc := copy(memleft, b)\n\t\td.v1 = round(d.v1, u64(d.mem[0:8]))\n\t\td.v2 = round(d.v2, u64(d.mem[8:16]))\n\t\td.v3 = round(d.v3, u64(d.mem[16:24]))\n\t\td.v4 = round(d.v4, u64(d.mem[24:32]))\n\t\tb = b[c:]\n\t\td.n = 0\n\t}\n\n\tif len(b) >= 32 {\n\t\t// One or more full blocks left.\n\t\tnw := writeBlocks(d, b)\n\t\tb = b[nw:]\n\t}\n\n\t// Store any remaining partial block.\n\tcopy(d.mem[:], b)\n\td.n = len(b)\n\n\treturn\n}\n\n// Sum appends the current hash to b and returns the resulting slice.\nfunc (d *Digest) Sum(b []byte) []byte {\n\ts := d.Sum64()\n\treturn append(\n\t\tb,\n\t\tbyte(s>>56),\n\t\tbyte(s>>48),\n\t\tbyte(s>>40),\n\t\tbyte(s>>32),\n\t\tbyte(s>>24),\n\t\tbyte(s>>16),\n\t\tbyte(s>>8),\n\t\tbyte(s),\n\t)\n}\n\n// Sum64 returns the current hash.\nfunc (d *Digest) Sum64() uint64 {\n\tvar h uint64\n\n\tif d.total >= 32 {\n\t\tv1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4\n\t\th = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)\n\t\th = mergeRound(h, v1)\n\t\th = mergeRound(h, v2)\n\t\th = mergeRound(h, v3)\n\t\th = mergeRound(h, v4)\n\t} else {\n\t\th = d.v3 + prime5\n\t}\n\n\th += d.total\n\n\tb := d.mem[:d.n&(len(d.mem)-1)]\n\tfor ; len(b) >= 8; b = b[8:] {\n\t\tk1 := round(0, u64(b[:8]))\n\t\th ^= k1\n\t\th = rol27(h)*prime1 + prime4\n\t}\n\tif len(b) >= 4 {\n\t\th ^= uint64(u32(b[:4])) * prime1\n\t\th = rol23(h)*prime2 + prime3\n\t\tb = b[4:]\n\t}\n\tfor ; len(b) > 0; b = b[1:] {\n\t\th ^= uint64(b[0]) * prime5\n\t\th = rol11(h) * prime1\n\t}\n\n\th ^= h >> 33\n\th *= prime2\n\th ^= h >> 29\n\th *= prime3\n\th ^= h >> 32\n\n\treturn h\n}\n\nconst (\n\tmagic         = \"xxh\\x06\"\n\tmarshaledSize = len(magic) + 8*5 + 32\n)\n\n// MarshalBinary implements the encoding.BinaryMarshaler interface.\nfunc (d *Digest) MarshalBinary() ([]byte, error) {\n\tb := make([]byte, 0, marshaledSize)\n\tb = append(b, magic...)\n\tb = appendUint64(b, d.v1)\n\tb = appendUint64(b, d.v2)\n\tb = appendUint64(b, d.v3)\n\tb = appendUint64(b, d.v4)\n\tb = appendUint64(b, d.total)\n\tb = append(b, d.mem[:d.n]...)\n\tb = b[:len(b)+len(d.mem)-d.n]\n\treturn b, nil\n}\n\n// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.\nfunc (d *Digest) UnmarshalBinary(b []byte) error {\n\tif len(b) < len(magic) || string(b[:len(magic)]) != magic {\n\t\treturn errors.New(\"xxhash: invalid hash state identifier\")\n\t}\n\tif len(b) != marshaledSize {\n\t\treturn errors.New(\"xxhash: invalid hash state size\")\n\t}\n\tb = b[len(magic):]\n\tb, d.v1 = consumeUint64(b)\n\tb, d.v2 = consumeUint64(b)\n\tb, d.v3 = consumeUint64(b)\n\tb, d.v4 = consumeUint64(b)\n\tb, d.total = consumeUint64(b)\n\tcopy(d.mem[:], b)\n\td.n = int(d.total % uint64(len(d.mem)))\n\treturn nil\n}\n\nfunc appendUint64(b []byte, x uint64) []byte {\n\tvar a [8]byte\n\tbinary.LittleEndian.PutUint64(a[:], x)\n\treturn append(b, a[:]...)\n}\n\nfunc consumeUint64(b []byte) ([]byte, uint64) {\n\tx := u64(b)\n\treturn b[8:], x\n}\n\nfunc u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }\nfunc u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }\n\nfunc round(acc, input uint64) uint64 {\n\tacc += input * prime2\n\tacc = rol31(acc)\n\tacc *= prime1\n\treturn acc\n}\n\nfunc mergeRound(acc, val uint64) uint64 {\n\tval = round(0, val)\n\tacc ^= val\n\tacc = acc*prime1 + prime4\n\treturn acc\n}\n\nfunc rol1(x uint64) uint64  { return bits.RotateLeft64(x, 1) }\nfunc rol7(x uint64) uint64  { return bits.RotateLeft64(x, 7) }\nfunc rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }\nfunc rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }\nfunc rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }\nfunc rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }\nfunc rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }\nfunc rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s",
    "content": "//go:build !appengine && gc && !purego\n// +build !appengine\n// +build gc\n// +build !purego\n\n#include \"textflag.h\"\n\n// Registers:\n#define h      AX\n#define d      AX\n#define p      SI // pointer to advance through b\n#define n      DX\n#define end    BX // loop end\n#define v1     R8\n#define v2     R9\n#define v3     R10\n#define v4     R11\n#define x      R12\n#define prime1 R13\n#define prime2 R14\n#define prime4 DI\n\n#define round(acc, x) \\\n\tIMULQ prime2, x   \\\n\tADDQ  x, acc      \\\n\tROLQ  $31, acc    \\\n\tIMULQ prime1, acc\n\n// round0 performs the operation x = round(0, x).\n#define round0(x) \\\n\tIMULQ prime2, x \\\n\tROLQ  $31, x    \\\n\tIMULQ prime1, x\n\n// mergeRound applies a merge round on the two registers acc and x.\n// It assumes that prime1, prime2, and prime4 have been loaded.\n#define mergeRound(acc, x) \\\n\tround0(x)         \\\n\tXORQ  x, acc      \\\n\tIMULQ prime1, acc \\\n\tADDQ  prime4, acc\n\n// blockLoop processes as many 32-byte blocks as possible,\n// updating v1, v2, v3, and v4. It assumes that there is at least one block\n// to process.\n#define blockLoop() \\\nloop:  \\\n\tMOVQ +0(p), x  \\\n\tround(v1, x)   \\\n\tMOVQ +8(p), x  \\\n\tround(v2, x)   \\\n\tMOVQ +16(p), x \\\n\tround(v3, x)   \\\n\tMOVQ +24(p), x \\\n\tround(v4, x)   \\\n\tADDQ $32, p    \\\n\tCMPQ p, end    \\\n\tJLE  loop\n\n// func Sum64(b []byte) uint64\nTEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32\n\t// Load fixed primes.\n\tMOVQ ·primes+0(SB), prime1\n\tMOVQ ·primes+8(SB), prime2\n\tMOVQ ·primes+24(SB), prime4\n\n\t// Load slice.\n\tMOVQ b_base+0(FP), p\n\tMOVQ b_len+8(FP), n\n\tLEAQ (p)(n*1), end\n\n\t// The first loop limit will be len(b)-32.\n\tSUBQ $32, end\n\n\t// Check whether we have at least one block.\n\tCMPQ n, $32\n\tJLT  noBlocks\n\n\t// Set up initial state (v1, v2, v3, v4).\n\tMOVQ prime1, v1\n\tADDQ prime2, v1\n\tMOVQ prime2, v2\n\tXORQ v3, v3\n\tXORQ v4, v4\n\tSUBQ prime1, v4\n\n\tblockLoop()\n\n\tMOVQ v1, h\n\tROLQ $1, h\n\tMOVQ v2, x\n\tROLQ $7, x\n\tADDQ x, h\n\tMOVQ v3, x\n\tROLQ $12, x\n\tADDQ x, h\n\tMOVQ v4, x\n\tROLQ $18, x\n\tADDQ x, h\n\n\tmergeRound(h, v1)\n\tmergeRound(h, v2)\n\tmergeRound(h, v3)\n\tmergeRound(h, v4)\n\n\tJMP afterBlocks\n\nnoBlocks:\n\tMOVQ ·primes+32(SB), h\n\nafterBlocks:\n\tADDQ n, h\n\n\tADDQ $24, end\n\tCMPQ p, end\n\tJG   try4\n\nloop8:\n\tMOVQ  (p), x\n\tADDQ  $8, p\n\tround0(x)\n\tXORQ  x, h\n\tROLQ  $27, h\n\tIMULQ prime1, h\n\tADDQ  prime4, h\n\n\tCMPQ p, end\n\tJLE  loop8\n\ntry4:\n\tADDQ $4, end\n\tCMPQ p, end\n\tJG   try1\n\n\tMOVL  (p), x\n\tADDQ  $4, p\n\tIMULQ prime1, x\n\tXORQ  x, h\n\n\tROLQ  $23, h\n\tIMULQ prime2, h\n\tADDQ  ·primes+16(SB), h\n\ntry1:\n\tADDQ $4, end\n\tCMPQ p, end\n\tJGE  finalize\n\nloop1:\n\tMOVBQZX (p), x\n\tADDQ    $1, p\n\tIMULQ   ·primes+32(SB), x\n\tXORQ    x, h\n\tROLQ    $11, h\n\tIMULQ   prime1, h\n\n\tCMPQ p, end\n\tJL   loop1\n\nfinalize:\n\tMOVQ  h, x\n\tSHRQ  $33, x\n\tXORQ  x, h\n\tIMULQ prime2, h\n\tMOVQ  h, x\n\tSHRQ  $29, x\n\tXORQ  x, h\n\tIMULQ ·primes+16(SB), h\n\tMOVQ  h, x\n\tSHRQ  $32, x\n\tXORQ  x, h\n\n\tMOVQ h, ret+24(FP)\n\tRET\n\n// func writeBlocks(d *Digest, b []byte) int\nTEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40\n\t// Load fixed primes needed for round.\n\tMOVQ ·primes+0(SB), prime1\n\tMOVQ ·primes+8(SB), prime2\n\n\t// Load slice.\n\tMOVQ b_base+8(FP), p\n\tMOVQ b_len+16(FP), n\n\tLEAQ (p)(n*1), end\n\tSUBQ $32, end\n\n\t// Load vN from d.\n\tMOVQ s+0(FP), d\n\tMOVQ 0(d), v1\n\tMOVQ 8(d), v2\n\tMOVQ 16(d), v3\n\tMOVQ 24(d), v4\n\n\t// We don't need to check the loop condition here; this function is\n\t// always called with at least one block of data to process.\n\tblockLoop()\n\n\t// Copy vN back to d.\n\tMOVQ v1, 0(d)\n\tMOVQ v2, 8(d)\n\tMOVQ v3, 16(d)\n\tMOVQ v4, 24(d)\n\n\t// The number of bytes written is p minus the old base pointer.\n\tSUBQ b_base+8(FP), p\n\tMOVQ p, ret+32(FP)\n\n\tRET\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s",
    "content": "//go:build !appengine && gc && !purego\n// +build !appengine\n// +build gc\n// +build !purego\n\n#include \"textflag.h\"\n\n// Registers:\n#define digest\tR1\n#define h\tR2 // return value\n#define p\tR3 // input pointer\n#define n\tR4 // input length\n#define nblocks\tR5 // n / 32\n#define prime1\tR7\n#define prime2\tR8\n#define prime3\tR9\n#define prime4\tR10\n#define prime5\tR11\n#define v1\tR12\n#define v2\tR13\n#define v3\tR14\n#define v4\tR15\n#define x1\tR20\n#define x2\tR21\n#define x3\tR22\n#define x4\tR23\n\n#define round(acc, x) \\\n\tMADD prime2, acc, x, acc \\\n\tROR  $64-31, acc         \\\n\tMUL  prime1, acc\n\n// round0 performs the operation x = round(0, x).\n#define round0(x) \\\n\tMUL prime2, x \\\n\tROR $64-31, x \\\n\tMUL prime1, x\n\n#define mergeRound(acc, x) \\\n\tround0(x)                     \\\n\tEOR  x, acc                   \\\n\tMADD acc, prime4, prime1, acc\n\n// blockLoop processes as many 32-byte blocks as possible,\n// updating v1, v2, v3, and v4. It assumes that n >= 32.\n#define blockLoop() \\\n\tLSR     $5, n, nblocks  \\\n\tPCALIGN $16             \\\n\tloop:                   \\\n\tLDP.P   16(p), (x1, x2) \\\n\tLDP.P   16(p), (x3, x4) \\\n\tround(v1, x1)           \\\n\tround(v2, x2)           \\\n\tround(v3, x3)           \\\n\tround(v4, x4)           \\\n\tSUB     $1, nblocks     \\\n\tCBNZ    nblocks, loop\n\n// func Sum64(b []byte) uint64\nTEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32\n\tLDP b_base+0(FP), (p, n)\n\n\tLDP  ·primes+0(SB), (prime1, prime2)\n\tLDP  ·primes+16(SB), (prime3, prime4)\n\tMOVD ·primes+32(SB), prime5\n\n\tCMP  $32, n\n\tCSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 }\n\tBLT  afterLoop\n\n\tADD  prime1, prime2, v1\n\tMOVD prime2, v2\n\tMOVD $0, v3\n\tNEG  prime1, v4\n\n\tblockLoop()\n\n\tROR $64-1, v1, x1\n\tROR $64-7, v2, x2\n\tADD x1, x2\n\tROR $64-12, v3, x3\n\tROR $64-18, v4, x4\n\tADD x3, x4\n\tADD x2, x4, h\n\n\tmergeRound(h, v1)\n\tmergeRound(h, v2)\n\tmergeRound(h, v3)\n\tmergeRound(h, v4)\n\nafterLoop:\n\tADD n, h\n\n\tTBZ   $4, n, try8\n\tLDP.P 16(p), (x1, x2)\n\n\tround0(x1)\n\n\t// NOTE: here and below, sequencing the EOR after the ROR (using a\n\t// rotated register) is worth a small but measurable speedup for small\n\t// inputs.\n\tROR  $64-27, h\n\tEOR  x1 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\n\tround0(x2)\n\tROR  $64-27, h\n\tEOR  x2 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\ntry8:\n\tTBZ    $3, n, try4\n\tMOVD.P 8(p), x1\n\n\tround0(x1)\n\tROR  $64-27, h\n\tEOR  x1 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\ntry4:\n\tTBZ     $2, n, try2\n\tMOVWU.P 4(p), x2\n\n\tMUL  prime1, x2\n\tROR  $64-23, h\n\tEOR  x2 @> 64-23, h, h\n\tMADD h, prime3, prime2, h\n\ntry2:\n\tTBZ     $1, n, try1\n\tMOVHU.P 2(p), x3\n\tAND     $255, x3, x1\n\tLSR     $8, x3, x2\n\n\tMUL prime5, x1\n\tROR $64-11, h\n\tEOR x1 @> 64-11, h, h\n\tMUL prime1, h\n\n\tMUL prime5, x2\n\tROR $64-11, h\n\tEOR x2 @> 64-11, h, h\n\tMUL prime1, h\n\ntry1:\n\tTBZ   $0, n, finalize\n\tMOVBU (p), x4\n\n\tMUL prime5, x4\n\tROR $64-11, h\n\tEOR x4 @> 64-11, h, h\n\tMUL prime1, h\n\nfinalize:\n\tEOR h >> 33, h\n\tMUL prime2, h\n\tEOR h >> 29, h\n\tMUL prime3, h\n\tEOR h >> 32, h\n\n\tMOVD h, ret+24(FP)\n\tRET\n\n// func writeBlocks(d *Digest, b []byte) int\nTEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40\n\tLDP ·primes+0(SB), (prime1, prime2)\n\n\t// Load state. Assume v[1-4] are stored contiguously.\n\tMOVD d+0(FP), digest\n\tLDP  0(digest), (v1, v2)\n\tLDP  16(digest), (v3, v4)\n\n\tLDP b_base+8(FP), (p, n)\n\n\tblockLoop()\n\n\t// Store updated state.\n\tSTP (v1, v2), 0(digest)\n\tSTP (v3, v4), 16(digest)\n\n\tBIC  $31, n\n\tMOVD n, ret+32(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_asm.go",
    "content": "//go:build (amd64 || arm64) && !appengine && gc && !purego\n// +build amd64 arm64\n// +build !appengine\n// +build gc\n// +build !purego\n\npackage xxhash\n\n// Sum64 computes the 64-bit xxHash digest of b with a zero seed.\n//\n//go:noescape\nfunc Sum64(b []byte) uint64\n\n//go:noescape\nfunc writeBlocks(d *Digest, b []byte) int\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_other.go",
    "content": "//go:build (!amd64 && !arm64) || appengine || !gc || purego\n// +build !amd64,!arm64 appengine !gc purego\n\npackage xxhash\n\n// Sum64 computes the 64-bit xxHash digest of b with a zero seed.\nfunc Sum64(b []byte) uint64 {\n\t// A simpler version would be\n\t//   d := New()\n\t//   d.Write(b)\n\t//   return d.Sum64()\n\t// but this is faster, particularly for small inputs.\n\n\tn := len(b)\n\tvar h uint64\n\n\tif n >= 32 {\n\t\tv1 := primes[0] + prime2\n\t\tv2 := prime2\n\t\tv3 := uint64(0)\n\t\tv4 := -primes[0]\n\t\tfor len(b) >= 32 {\n\t\t\tv1 = round(v1, u64(b[0:8:len(b)]))\n\t\t\tv2 = round(v2, u64(b[8:16:len(b)]))\n\t\t\tv3 = round(v3, u64(b[16:24:len(b)]))\n\t\t\tv4 = round(v4, u64(b[24:32:len(b)]))\n\t\t\tb = b[32:len(b):len(b)]\n\t\t}\n\t\th = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)\n\t\th = mergeRound(h, v1)\n\t\th = mergeRound(h, v2)\n\t\th = mergeRound(h, v3)\n\t\th = mergeRound(h, v4)\n\t} else {\n\t\th = prime5\n\t}\n\n\th += uint64(n)\n\n\tfor ; len(b) >= 8; b = b[8:] {\n\t\tk1 := round(0, u64(b[:8]))\n\t\th ^= k1\n\t\th = rol27(h)*prime1 + prime4\n\t}\n\tif len(b) >= 4 {\n\t\th ^= uint64(u32(b[:4])) * prime1\n\t\th = rol23(h)*prime2 + prime3\n\t\tb = b[4:]\n\t}\n\tfor ; len(b) > 0; b = b[1:] {\n\t\th ^= uint64(b[0]) * prime5\n\t\th = rol11(h) * prime1\n\t}\n\n\th ^= h >> 33\n\th *= prime2\n\th ^= h >> 29\n\th *= prime3\n\th ^= h >> 32\n\n\treturn h\n}\n\nfunc writeBlocks(d *Digest, b []byte) int {\n\tv1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4\n\tn := len(b)\n\tfor len(b) >= 32 {\n\t\tv1 = round(v1, u64(b[0:8:len(b)]))\n\t\tv2 = round(v2, u64(b[8:16:len(b)]))\n\t\tv3 = round(v3, u64(b[16:24:len(b)]))\n\t\tv4 = round(v4, u64(b[24:32:len(b)]))\n\t\tb = b[32:len(b):len(b)]\n\t}\n\td.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4\n\treturn n - len(b)\n}\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_safe.go",
    "content": "//go:build appengine\n// +build appengine\n\n// This file contains the safe implementations of otherwise unsafe-using code.\n\npackage xxhash\n\n// Sum64String computes the 64-bit xxHash digest of s with a zero seed.\nfunc Sum64String(s string) uint64 {\n\treturn Sum64([]byte(s))\n}\n\n// WriteString adds more data to d. It always returns len(s), nil.\nfunc (d *Digest) WriteString(s string) (n int, err error) {\n\treturn d.Write([]byte(s))\n}\n"
  },
  {
    "path": "vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go",
    "content": "//go:build !appengine\n// +build !appengine\n\n// This file encapsulates usage of unsafe.\n// xxhash_safe.go contains the safe implementations.\n\npackage xxhash\n\nimport (\n\t\"unsafe\"\n)\n\n// In the future it's possible that compiler optimizations will make these\n// XxxString functions unnecessary by realizing that calls such as\n// Sum64([]byte(s)) don't need to copy s. See https://go.dev/issue/2205.\n// If that happens, even if we keep these functions they can be replaced with\n// the trivial safe code.\n\n// NOTE: The usual way of doing an unsafe string-to-[]byte conversion is:\n//\n//   var b []byte\n//   bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))\n//   bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data\n//   bh.Len = len(s)\n//   bh.Cap = len(s)\n//\n// Unfortunately, as of Go 1.15.3 the inliner's cost model assigns a high enough\n// weight to this sequence of expressions that any function that uses it will\n// not be inlined. Instead, the functions below use a different unsafe\n// conversion designed to minimize the inliner weight and allow both to be\n// inlined. There is also a test (TestInlining) which verifies that these are\n// inlined.\n//\n// See https://github.com/golang/go/issues/42739 for discussion.\n\n// Sum64String computes the 64-bit xxHash digest of s with a zero seed.\n// It may be faster than Sum64([]byte(s)) by avoiding a copy.\nfunc Sum64String(s string) uint64 {\n\tb := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))\n\treturn Sum64(b)\n}\n\n// WriteString adds more data to d. It always returns len(s), nil.\n// It may be faster than Write([]byte(s)) by avoiding a copy.\nfunc (d *Digest) WriteString(s string) (n int, err error) {\n\td.Write(*(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})))\n\t// d.Write always returns len(s), nil.\n\t// Ignoring the return output and returning these fixed values buys a\n\t// savings of 6 in the inliner's cost model.\n\treturn len(s), nil\n}\n\n// sliceHeader is similar to reflect.SliceHeader, but it assumes that the layout\n// of the first two words is the same as the layout of a string.\ntype sliceHeader struct {\n\ts   string\n\tcap int\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Matt Sherman\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": "vendor/github.com/clipperhouse/uax29/v2/graphemes/README.md",
    "content": "An implementation of grapheme cluster boundaries from [Unicode text segmentation](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries) (UAX 29), for Unicode 17.\n\n[![Documentation](https://pkg.go.dev/badge/github.com/clipperhouse/uax29/v2/graphemes.svg)](https://pkg.go.dev/github.com/clipperhouse/uax29/v2/graphemes)\n![Tests](https://github.com/clipperhouse/uax29/actions/workflows/gotest.yml/badge.svg)\n![Fuzz](https://github.com/clipperhouse/uax29/actions/workflows/gofuzz.yml/badge.svg)\n\n## Quick start\n\n```\ngo get github.com/clipperhouse/uax29/v2/graphemes\n```\n\n```go\nimport \"github.com/clipperhouse/uax29/v2/graphemes\"\n\ntext := \"Hello, 世界. Nice dog! 👍🐶\"\ng := graphemes.FromString(text)\n\nfor g.Next() {                     // Next() returns true until end of data\n\tfmt.Println(g.Value())         // Do something with the current grapheme\n}\n```\n\n_A grapheme is a “single visible character”, which might be a simple as a single letter, or a complex emoji that consists of several Unicode code points._\n\n## Conformance\n\nWe use the Unicode [test suite](https://unicode.org/reports/tr41/tr41-36.html#Tests29).\n\n![Tests](https://github.com/clipperhouse/uax29/actions/workflows/gotest.yml/badge.svg)\n![Fuzz](https://github.com/clipperhouse/uax29/actions/workflows/gofuzz.yml/badge.svg)\n\n## APIs\n\n### If you have a `string`\n\n```go\ntext := \"Hello, 世界. Nice dog! 👍🐶\"\ng := graphemes.FromString(text)\n\nfor g.Next() {                     // Next() returns true until end of data\n\tfmt.Println(g.Value())         // Do something with the current grapheme\n}\n```\n\n### If you have an `io.Reader`\n\n`FromReader` embeds a [`bufio.Scanner`](https://pkg.go.dev/bufio#Scanner), so just use those methods.\n\n```go\nr := getYourReader()                    // from a file or network maybe\ng := graphemes.FromReader(r)\n\nfor g.Scan() {                         // Scan() returns true until error or EOF\n\tfmt.Println(g.Text())              // Do something with the current grapheme\n}\n\nif g.Err() != nil {                    // Check the error\n\tlog.Fatal(g.Err())\n}\n```\n\n### If you have a `[]byte`\n\n```go\nb := []byte(\"Hello, 世界. Nice dog! 👍🐶\")\n\ng := graphemes.FromBytes(b)\n\nfor g.Next() {                     // Next() returns true until end of data\n\tfmt.Println(g.Value())         // Do something with the current grapheme\n}\n```\n\n### ANSI escape sequences\n\nBy the UAX 29 specification, ANSI escape sequences are not grapheme clusters. To treat 7-bit ANSI escape sequences as a single cluster, set `AnsiEscapeSequences` to true.\n\n```go\ntext := \"Hello, \\x1b[31mworld\\x1b[0m!\"\ng := graphemes.FromString(text)\ng.AnsiEscapeSequences = true\n\nfor g.Next() {\n\tfmt.Println(g.Value())\n}\n```\n\nTo also parse 8-bit C1 controls (non-UTF-8 bytes), set `AnsiEscapeSequences8Bit` to true.\n\n```go\ng.AnsiEscapeSequences = true     // 7-bit forms (ESC ...)\ng.AnsiEscapeSequences8Bit = true // 8-bit C1 forms (0x80-0x9F), not valid UTF-8\n```\n\nFor ESC-initiated (7-bit) control strings, only 7-bit terminators are recognized.\nFor C1-initiated (8-bit) control strings, only C1 ST (`0x9C`) is recognized as ST.\n\nWe implement [ECMA-48](https://ecma-international.org/publications-and-standards/standards/ecma-48/) control codes in both 7-bit and 8-bit representations. 8-bit control codes are not UTF-8 encoded and are not valid UTF-8, caveat emptor.\n\n### Benchmarks\n\n```\ngoos: darwin\ngoarch: arm64\npkg: github.com/clipperhouse/uax29/graphemes/comparative\ncpu: Apple M2\n\nBenchmarkGraphemesMixed/clipperhouse/uax29-8  \t    142635 ns/op\t 245.12 MB/s    0 B/op\t   0 allocs/op\nBenchmarkGraphemesMixed/rivo/uniseg-8         \t   2018284 ns/op\t  17.32 MB/s    0 B/op\t   0 allocs/op\n\nBenchmarkGraphemesASCII/clipperhouse/uax29-8  \t      8846 ns/op\t 508.73 MB/s    0 B/op\t   0 allocs/op\nBenchmarkGraphemesASCII/rivo/uniseg-8         \t    366760 ns/op\t  12.27 MB/s    0 B/op\t   0 allocs/op\n```\n\n### Invalid inputs\n\nInvalid UTF-8 input is considered undefined behavior. We test to ensure that bad inputs will not cause pathological outcomes, such as a panic or infinite loop. Callers should expect “garbage-in, garbage-out”.\n\nYour pipeline should probably include a call to [`utf8.Valid()`](https://pkg.go.dev/unicode/utf8#Valid).\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/ansi.go",
    "content": "package graphemes\n\n// ansiEscapeLength returns the byte length of a valid 7-bit ANSI escape\n// sequence at the start of data, or 0 if none.\n//\n// Recognized forms (ECMA-48 / ISO 6429):\n//   - CSI: ESC [ then parameter bytes (0x30-0x3F), intermediate (0x20-0x2F), final (0x40-0x7E)\n//   - OSC: ESC ] then payload until BEL (0x07), 7-bit ST (ESC \\), CAN (0x18), or SUB (0x1A)\n//   - DCS, SOS, PM, APC: ESC P/X/^/_ then payload until 7-bit ST (ESC \\), CAN, or SUB\n//   - Two-byte: ESC + Fe/Fs (0x40-0x7E excluding above), or Fp (0x30-0x3F), or nF (0x20-0x2F then final)\nfunc ansiEscapeLength[T ~string | ~[]byte](data T) int {\n\tn := len(data)\n\tif n < 2 || data[0] != esc {\n\t\treturn 0\n\t}\n\n\tb1 := data[1]\n\tswitch b1 {\n\tcase '[': // CSI\n\t\tbody := csiBodyLength(data[2:])\n\t\tif body == 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 2 + body\n\tcase ']': // OSC - allows BEL or 7-bit ST terminator\n\t\tbody := oscLength(data[2:])\n\t\tif body < 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 2 + body\n\tcase 'P', 'X', '^', '_': // DCS, SOS, PM, APC\n\t\tbody := stSequenceLength(data[2:])\n\t\tif body < 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 2 + body\n\t}\n\n\tif b1 >= 0x40 && b1 <= 0x7E {\n\t\t// Fe/Fs two-byte; [ ] P X ^ _ handled above\n\t\treturn 2\n\t}\n\tif b1 >= 0x30 && b1 <= 0x3F {\n\t\t// Fp (private) two-byte\n\t\treturn 2\n\t}\n\tif b1 >= 0x20 && b1 <= 0x2F {\n\t\t// nF: intermediates then one final (0x30-0x7E)\n\t\ti := 2\n\t\tfor i < n && data[i] >= 0x20 && data[i] <= 0x2F {\n\t\t\ti++\n\t\t}\n\t\tif i < n && data[i] >= 0x30 && data[i] <= 0x7E {\n\t\t\treturn i + 1\n\t\t}\n\t\treturn 0\n\t}\n\n\treturn 0\n}\n\n// csiBodyLength returns the length of the CSI body (param/intermediate/final bytes).\n// data is the slice after \"ESC [\".\n// Per ECMA-48, the CSI body has the form:\n//\n//\tparameters (0x30–0x3F)*, intermediates (0x20–0x2F)*, final (0x40–0x7E)\n//\n// Once an intermediate byte is seen, subsequent parameter bytes are invalid.\nfunc csiBodyLength[T ~string | ~[]byte](data T) int {\n\tseenIntermediate := false\n\tfor i := 0; i < len(data); i++ {\n\t\tb := data[i]\n\t\tif b >= 0x30 && b <= 0x3F {\n\t\t\tif seenIntermediate {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif b >= 0x20 && b <= 0x2F {\n\t\t\tseenIntermediate = true\n\t\t\tcontinue\n\t\t}\n\t\tif b >= 0x40 && b <= 0x7E {\n\t\t\treturn i + 1\n\t\t}\n\t\treturn 0\n\t}\n\treturn 0\n}\n\n// oscLength returns the length of the OSC body.\n// data is the slice after \"ESC ]\".\n//\n// Returns:\n//   - n >= 0: consumed body length (includes BEL/ST terminator when present)\n//   - -1: not terminated in the provided data\n//\n// OSC accepts BEL (0x07) or 7-bit ST (ESC \\) as terminators by widespread convention.\n// Per ECMA-48, CAN (0x18) and SUB (0x1A) cancel the control string; in that\n// case they are not part of the OSC sequence length.\nfunc oscLength[T ~string | ~[]byte](data T) int {\n\tfor i := 0; i < len(data); i++ {\n\t\tb := data[i]\n\t\tif b == bel {\n\t\t\treturn i + 1\n\t\t}\n\t\tif b == can || b == sub {\n\t\t\treturn i\n\t\t}\n\t\tif b == esc && i+1 < len(data) && data[i+1] == '\\\\' {\n\t\t\treturn i + 2\n\t\t}\n\t}\n\treturn -1\n}\n\n// stSequenceLength returns the length of a control-string body.\n// data is the slice after \"ESC x\".\n//\n// Returns:\n//   - n >= 0: consumed body length (includes ST terminator when present)\n//   - -1: not terminated in the provided data\n//\n// Used for DCS, SOS, PM, and APC, which per ECMA-48 terminate with ST.\n// ST here is the 7-bit form (ESC \\).\n// CAN (0x18) and SUB (0x1A) cancel the control string; in that case they are\n// not part of the sequence length.\nfunc stSequenceLength[T ~string | ~[]byte](data T) int {\n\tfor i := 0; i < len(data); i++ {\n\t\tif data[i] == can || data[i] == sub {\n\t\t\treturn i\n\t\t}\n\t\tif data[i] == esc && i+1 < len(data) && data[i+1] == '\\\\' {\n\t\t\treturn i + 2\n\t\t}\n\t}\n\treturn -1\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/ansi8.go",
    "content": "package graphemes\n\n// ansiEscapeLength8Bit returns the byte length of a valid 8-bit C1 ANSI\n// sequence at the start of data, or 0 if none.\n//\n// Recognized forms (ECMA-48 / ISO 6429):\n//   - C1 CSI (0x9B) body as parameter/intermediate/final bytes\n//   - C1 OSC (0x9D) body terminated by BEL, C1 ST, CAN, or SUB\n//   - C1 DCS/SOS/PM/APC (0x90/0x98/0x9E/0x9F) body terminated by C1 ST, CAN, or SUB\n//   - Standalone C1 controls (0x80..0x9F not listed above): single byte\nfunc ansiEscapeLength8Bit[T ~string | ~[]byte](data T) int {\n\tif len(data) == 0 {\n\t\treturn 0\n\t}\n\n\tswitch data[0] {\n\tcase 0x9B: // C1 CSI\n\t\tbody := csiBodyLength(data[1:])\n\t\tif body == 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 1 + body\n\tcase 0x9D: // C1 OSC\n\t\tbody := oscLengthC1(data[1:])\n\t\tif body < 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 1 + body\n\tcase 0x90, 0x98, 0x9E, 0x9F: // C1 DCS, SOS, PM, APC\n\t\tbody := stSequenceLengthC1(data[1:])\n\t\tif body < 0 {\n\t\t\treturn 0\n\t\t}\n\t\treturn 1 + body\n\tdefault:\n\t\tif data[0] >= 0x80 && data[0] <= 0x9F {\n\t\t\treturn 1\n\t\t}\n\t}\n\n\treturn 0\n}\n\n// oscLengthC1 returns the length of a C1 OSC body.\n// data is the slice after the C1 OSC initiator (0x9D).\n//\n// Returns:\n//   - n >= 0: consumed body length (includes BEL/ST terminator when present)\n//   - -1: not terminated in the provided data\n//\n// Terminators: BEL (0x07) or C1 ST (0x9C).\n// CAN (0x18) and SUB (0x1A) cancel the control string.\nfunc oscLengthC1[T ~string | ~[]byte](data T) int {\n\tfor i := 0; i < len(data); i++ {\n\t\tb := data[i]\n\t\tif b == bel || b == st {\n\t\t\treturn i + 1\n\t\t}\n\t\tif b == can || b == sub {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\n// stSequenceLengthC1 parses DCS/SOS/PM/APC bodies that terminate with C1 ST\n// (0x9C), or are canceled by CAN/SUB.\nfunc stSequenceLengthC1[T ~string | ~[]byte](data T) int {\n\tfor i := 0; i < len(data); i++ {\n\t\tb := data[i]\n\t\tif b == can || b == sub {\n\t\t\treturn i\n\t\t}\n\t\tif b == st {\n\t\t\treturn i + 1\n\t\t}\n\t}\n\treturn -1\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/iterator.go",
    "content": "package graphemes\n\nimport \"unicode/utf8\"\n\n// FromString returns an iterator for the grapheme clusters in the input string.\n// Iterate while Next() is true, and access the grapheme via Value().\nfunc FromString(s string) *Iterator[string] {\n\treturn &Iterator[string]{\n\t\tsplit: splitFuncString,\n\t\tdata:  s,\n\t}\n}\n\n// FromBytes returns an iterator for the grapheme clusters in the input bytes.\n// Iterate while Next() is true, and access the grapheme via Value().\nfunc FromBytes(b []byte) *Iterator[[]byte] {\n\treturn &Iterator[[]byte]{\n\t\tsplit: splitFuncBytes,\n\t\tdata:  b,\n\t}\n}\n\n// Iterator is a generic iterator for grapheme clusters in strings or byte slices,\n// with an ASCII hot path optimization.\ntype Iterator[T ~string | ~[]byte] struct {\n\tsplit func(T, bool) (int, T, error)\n\tdata  T\n\tpos   int\n\tstart int\n\t// AnsiEscapeSequences treats 7-bit ANSI escape sequences (ECMA-48) as\n\t// single grapheme clusters when true. The default is false.\n\t//\n\t// 8-bit controls are not enabled by this option. See [AnsiEscapeSequences8Bit].\n\tAnsiEscapeSequences bool\n\t// AnsiEscapeSequences8Bit treats 8-bit C1 ANSI escape sequences (ECMA-48) as single\n\t// grapheme clusters when true. The default is false.\n\t//\n\t// 8-bit control bytes are not UTF-8 encoded, i.e. not valid UTF-8. If you\n\t// choose this option, you are choosing to interpret non-UTF-8 data, caveat\n\t// emptor.\n\tAnsiEscapeSequences8Bit bool\n}\n\nvar (\n\tsplitFuncString = splitFunc[string]\n\tsplitFuncBytes  = splitFunc[[]byte]\n)\n\nconst (\n\tesc = 0x1B\n\tcr  = 0x0D\n\tbel = 0x07\n\tcan = 0x18\n\tsub = 0x1A\n\tst  = 0x9C\n)\n\n// Next advances the iterator to the next grapheme cluster.\n// Returns false when there are no more grapheme clusters.\nfunc (iter *Iterator[T]) Next() bool {\n\tif iter.pos >= len(iter.data) {\n\t\treturn false\n\t}\n\titer.start = iter.pos\n\n\tb := iter.data[iter.pos]\n\tif iter.AnsiEscapeSequences && b == esc {\n\t\tif a := ansiEscapeLength(iter.data[iter.pos:]); a > 0 {\n\t\t\titer.pos += a\n\t\t\treturn true\n\t\t}\n\t}\n\tif iter.AnsiEscapeSequences8Bit && b >= 0x80 && b <= 0x9F {\n\t\tif a := ansiEscapeLength8Bit(iter.data[iter.pos:]); a > 0 {\n\t\t\titer.pos += a\n\t\t\treturn true\n\t\t}\n\t}\n\n\t// ASCII hot path: any ASCII is one grapheme when next byte is ASCII or end.\n\tif b < utf8.RuneSelf && b != cr {\n\t\tif iter.pos+1 >= len(iter.data) || iter.data[iter.pos+1] < utf8.RuneSelf {\n\t\t\titer.pos++\n\t\t\treturn true\n\t\t}\n\t}\n\n\t// Fall back to UAX29 grapheme parsing\n\tremaining := iter.data[iter.pos:]\n\tadvance, _, err := iter.split(remaining, true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tif advance <= 0 {\n\t\tpanic(\"splitFunc returned a zero or negative advance\")\n\t}\n\titer.pos += advance\n\tif iter.pos > len(iter.data) {\n\t\tpanic(\"splitFunc advanced beyond end of data\")\n\t}\n\treturn true\n}\n\n// Value returns the current grapheme cluster.\nfunc (iter *Iterator[T]) Value() T {\n\treturn iter.data[iter.start:iter.pos]\n}\n\n// Start returns the byte position of the current grapheme in the original data.\nfunc (iter *Iterator[T]) Start() int {\n\treturn iter.start\n}\n\n// End returns the byte position after the current grapheme in the original data.\nfunc (iter *Iterator[T]) End() int {\n\treturn iter.pos\n}\n\n// Reset resets the iterator to the beginning of the data.\nfunc (iter *Iterator[T]) Reset() {\n\titer.start = 0\n\titer.pos = 0\n}\n\n// SetText sets the data for the iterator to operate on, and resets all state.\nfunc (iter *Iterator[T]) SetText(data T) {\n\titer.data = data\n\titer.start = 0\n\titer.pos = 0\n}\n\n// First returns the first grapheme cluster without advancing the iterator.\nfunc (iter *Iterator[T]) First() T {\n\tif len(iter.data) == 0 {\n\t\treturn iter.data\n\t}\n\n\t// Use a copy to leverage Next()'s ASCII optimization\n\tcp := *iter\n\tcp.pos = 0\n\tcp.start = 0\n\tcp.Next()\n\treturn cp.Value()\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/reader.go",
    "content": "// Package graphemes implements Unicode grapheme cluster boundaries: https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries\npackage graphemes\n\nimport (\n\t\"bufio\"\n\t\"io\"\n)\n\ntype Scanner struct {\n\t*bufio.Scanner\n}\n\n// FromReader returns a Scanner, to split graphemes per\n// https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries.\n//\n// It embeds a [bufio.Scanner], so you can use its methods.\n//\n// Iterate through graphemes by calling Scan() until false, then check Err().\nfunc FromReader(r io.Reader) *Scanner {\n\tsc := bufio.NewScanner(r)\n\tsc.Split(SplitFunc)\n\treturn &Scanner{\n\t\tScanner: sc,\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/splitfunc.go",
    "content": "package graphemes\n\nimport (\n\t\"bufio\"\n)\n\n// is determines if lookup intersects propert(ies)\nfunc (lookup property) is(properties property) bool {\n\treturn (lookup & properties) != 0\n}\n\nconst _Ignore = _Extend\n\n// incbState tracks state for GB9c rule (Indic conjunct clusters)\n// Pattern: Consonant (Extend|Linker)* Linker (Extend|Linker)* × Consonant\ntype incbState int\n\nconst (\n\tincbNone      incbState = iota // initial/reset\n\tincbConsonant                  // seen Consonant, awaiting Linker\n\tincbLinker                     // seen Consonant and Linker (conjunct ready)\n)\n\n// SplitFunc is a bufio.SplitFunc implementation of Unicode grapheme cluster segmentation, for use with bufio.Scanner.\n//\n// See https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries.\nvar SplitFunc bufio.SplitFunc = splitFunc[[]byte]\n\nfunc splitFunc[T ~string | ~[]byte](data T, atEOF bool) (advance int, token T, err error) {\n\tvar empty T\n\tif len(data) == 0 {\n\t\treturn 0, empty, nil\n\t}\n\n\t// These vars are stateful across loop iterations\n\tvar pos int\n\tvar lastExIgnore property = 0     // \"last excluding ignored categories\"\n\tvar lastLastExIgnore property = 0 // \"last one before that\"\n\tvar regionalIndicatorCount int\n\n\t// GB9c state: tracking Indic conjunct clusters\n\tvar incb incbState\n\n\t// Rules are usually of the form Cat1 × Cat2; \"current\" refers to the first property\n\t// to the right of the ×, from which we look back or forward\n\n\tcurrent, w := lookup(data[pos:])\n\tif w == 0 {\n\t\tif !atEOF {\n\t\t\t// Rune extends past current data, request more\n\t\t\treturn 0, empty, nil\n\t\t}\n\t\tpos = len(data)\n\t\treturn pos, data[:pos], nil\n\t}\n\n\t// https://unicode.org/reports/tr29/#GB1\n\t// Start of text always advances\n\tpos += w\n\n\tfor {\n\t\teot := pos == len(data) // \"end of text\"\n\n\t\tif eot {\n\t\t\tif !atEOF {\n\t\t\t\t// Token extends past current data, request more\n\t\t\t\treturn 0, empty, nil\n\t\t\t}\n\n\t\t\t// https://unicode.org/reports/tr29/#GB2\n\t\t\tbreak\n\t\t}\n\n\t\t/*\n\t\t\tWe've switched the evaluation order of GB1↓ and GB2↑. It's ok:\n\t\t\tbecause we've checked for len(data) at the top of this function,\n\t\t\tsot and eot are mutually exclusive, order doesn't matter.\n\t\t*/\n\n\t\t// Rules are usually of the form Cat1 × Cat2; \"current\" refers to the first property\n\t\t// to the right of the ×, from which we look back or forward\n\n\t\t// Remember previous properties to avoid lookups/lookbacks\n\t\tlast := current\n\t\tif !last.is(_Ignore) {\n\t\t\tlastLastExIgnore = lastExIgnore\n\t\t\tlastExIgnore = last\n\t\t}\n\n\t\t// Update GB9c state based on what we just advanced past\n\t\tif last.is(_InCBConsonant | _InCBLinker | _InCBExtend) {\n\t\t\tswitch {\n\t\t\tcase last.is(_InCBConsonant):\n\t\t\t\tif incb != incbLinker {\n\t\t\t\t\tincb = incbConsonant\n\t\t\t\t}\n\t\t\tcase last.is(_InCBLinker):\n\t\t\t\tif incb >= incbConsonant {\n\t\t\t\t\tincb = incbLinker\n\t\t\t\t}\n\t\t\t\t// case last.is(_InCBExtend): stay in current state\n\t\t\t}\n\t\t} else {\n\t\t\tincb = incbNone\n\t\t}\n\n\t\tcurrent, w = lookup(data[pos:])\n\t\tif w == 0 {\n\t\t\tif atEOF {\n\t\t\t\t// Just return the bytes, we can't do anything with them\n\t\t\t\tpos = len(data)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Rune extends past current data, request more\n\t\t\treturn 0, empty, nil\n\t\t}\n\n\t\t// Optimization: no rule can possibly apply\n\t\tif current|last == 0 { // i.e. both are zero\n\t\t\tbreak\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB3\n\t\tif current.is(_LF) && last.is(_CR) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB4\n\t\t// https://unicode.org/reports/tr29/#GB5\n\t\tif (current | last).is(_Control | _CR | _LF) {\n\t\t\tbreak\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB6\n\t\tif current.is(_L|_V|_LV|_LVT) && last.is(_L) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB7\n\t\tif current.is(_V|_T) && last.is(_LV|_V) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB8\n\t\tif current.is(_T) && last.is(_LVT|_T) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB9\n\t\tif current.is(_Extend | _ZWJ) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB9a\n\t\tif current.is(_SpacingMark) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB9b\n\t\tif last.is(_Prepend) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB9c\n\t\t// Do not break within certain combinations with Indic_Conjunct_Break (InCB)=Linker.\n\t\tif incb == incbLinker && current.is(_InCBConsonant) {\n\t\t\t// After matching the pattern, reset state to start tracking a new pattern\n\t\t\t// The current Consonant becomes the start of the new pattern\n\t\t\tincb = incbConsonant\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB11\n\t\tif current.is(_ExtendedPictographic) && last.is(_ZWJ) && lastLastExIgnore.is(_ExtendedPictographic) {\n\t\t\tpos += w\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://unicode.org/reports/tr29/#GB12\n\t\t// https://unicode.org/reports/tr29/#GB13\n\t\tif (current & last).is(_RegionalIndicator) {\n\t\t\tregionalIndicatorCount++\n\n\t\t\todd := regionalIndicatorCount%2 == 1\n\t\t\tif odd {\n\t\t\t\tpos += w\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// If we fall through all the above rules, it's a grapheme cluster break\n\t\tbreak\n\t}\n\n\t// Return token\n\treturn pos, data[:pos], nil\n}\n"
  },
  {
    "path": "vendor/github.com/clipperhouse/uax29/v2/graphemes/trie.go",
    "content": "package graphemes\n\n// generated by github.com/clipperhouse/uax29/v2\n// from https://www.unicode.org/Public/17.0.0/ucd/auxiliary/GraphemeBreakProperty.txt\n\ntype property uint32\n\nconst (\n\t_CR property = 1 << iota\n\t_Control\n\t_Extend\n\t_ExtendedPictographic\n\t_InCBConsonant\n\t_InCBExtend\n\t_InCBLinker\n\t_L\n\t_LF\n\t_LV\n\t_LVT\n\t_Prepend\n\t_RegionalIndicator\n\t_SpacingMark\n\t_T\n\t_V\n\t_ZWJ\n)\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc lookup[T ~string | ~[]byte](s T) (v property, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn graphemesValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := graphemesIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := graphemesIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = graphemesIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := graphemesIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = graphemesIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = graphemesIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// graphemesTrie. Total size: 61760 bytes (60.31 KiB). Checksum: af733ba94cd94ba6.\n// type graphemesTrie struct { }\n\n// func newGraphemesTrie(i int) *graphemesTrie {\n// \treturn &graphemesTrie{}\n// }\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc lookupValue(n uint32, b byte) property {\n\tswitch {\n\tdefault:\n\t\treturn property(graphemesValues[n<<6+uint32(b)])\n\t}\n}\n\n// graphemesValues: 235 blocks, 15040 entries, 60160 bytes\n// The third block is the zero block.\nvar graphemesValues = [15040]property{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0002, 0x01: 0x0002, 0x02: 0x0002, 0x03: 0x0002, 0x04: 0x0002, 0x05: 0x0002,\n\t0x06: 0x0002, 0x07: 0x0002, 0x08: 0x0002, 0x09: 0x0002, 0x0a: 0x0100, 0x0b: 0x0002,\n\t0x0c: 0x0002, 0x0d: 0x0001, 0x0e: 0x0002, 0x0f: 0x0002, 0x10: 0x0002, 0x11: 0x0002,\n\t0x12: 0x0002, 0x13: 0x0002, 0x14: 0x0002, 0x15: 0x0002, 0x16: 0x0002, 0x17: 0x0002,\n\t0x18: 0x0002, 0x19: 0x0002, 0x1a: 0x0002, 0x1b: 0x0002, 0x1c: 0x0002, 0x1d: 0x0002,\n\t0x1e: 0x0002, 0x1f: 0x0002,\n\t// Block 0x1, offset 0x40\n\t0x7f: 0x0002,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0002, 0xc1: 0x0002, 0xc2: 0x0002, 0xc3: 0x0002, 0xc4: 0x0002, 0xc5: 0x0002,\n\t0xc6: 0x0002, 0xc7: 0x0002, 0xc8: 0x0002, 0xc9: 0x0002, 0xca: 0x0002, 0xcb: 0x0002,\n\t0xcc: 0x0002, 0xcd: 0x0002, 0xce: 0x0002, 0xcf: 0x0002, 0xd0: 0x0002, 0xd1: 0x0002,\n\t0xd2: 0x0002, 0xd3: 0x0002, 0xd4: 0x0002, 0xd5: 0x0002, 0xd6: 0x0002, 0xd7: 0x0002,\n\t0xd8: 0x0002, 0xd9: 0x0002, 0xda: 0x0002, 0xdb: 0x0002, 0xdc: 0x0002, 0xdd: 0x0002,\n\t0xde: 0x0002, 0xdf: 0x0002,\n\t0xe9: 0x0008,\n\t0xed: 0x0002, 0xee: 0x0008,\n\t// Block 0x4, offset 0x100\n\t0x100: 0x0024, 0x101: 0x0024, 0x102: 0x0024, 0x103: 0x0024, 0x104: 0x0024, 0x105: 0x0024,\n\t0x106: 0x0024, 0x107: 0x0024, 0x108: 0x0024, 0x109: 0x0024, 0x10a: 0x0024, 0x10b: 0x0024,\n\t0x10c: 0x0024, 0x10d: 0x0024, 0x10e: 0x0024, 0x10f: 0x0024, 0x110: 0x0024, 0x111: 0x0024,\n\t0x112: 0x0024, 0x113: 0x0024, 0x114: 0x0024, 0x115: 0x0024, 0x116: 0x0024, 0x117: 0x0024,\n\t0x118: 0x0024, 0x119: 0x0024, 0x11a: 0x0024, 0x11b: 0x0024, 0x11c: 0x0024, 0x11d: 0x0024,\n\t0x11e: 0x0024, 0x11f: 0x0024, 0x120: 0x0024, 0x121: 0x0024, 0x122: 0x0024, 0x123: 0x0024,\n\t0x124: 0x0024, 0x125: 0x0024, 0x126: 0x0024, 0x127: 0x0024, 0x128: 0x0024, 0x129: 0x0024,\n\t0x12a: 0x0024, 0x12b: 0x0024, 0x12c: 0x0024, 0x12d: 0x0024, 0x12e: 0x0024, 0x12f: 0x0024,\n\t0x130: 0x0024, 0x131: 0x0024, 0x132: 0x0024, 0x133: 0x0024, 0x134: 0x0024, 0x135: 0x0024,\n\t0x136: 0x0024, 0x137: 0x0024, 0x138: 0x0024, 0x139: 0x0024, 0x13a: 0x0024, 0x13b: 0x0024,\n\t0x13c: 0x0024, 0x13d: 0x0024, 0x13e: 0x0024, 0x13f: 0x0024,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0024, 0x141: 0x0024, 0x142: 0x0024, 0x143: 0x0024, 0x144: 0x0024, 0x145: 0x0024,\n\t0x146: 0x0024, 0x147: 0x0024, 0x148: 0x0024, 0x149: 0x0024, 0x14a: 0x0024, 0x14b: 0x0024,\n\t0x14c: 0x0024, 0x14d: 0x0024, 0x14e: 0x0024, 0x14f: 0x0024, 0x150: 0x0024, 0x151: 0x0024,\n\t0x152: 0x0024, 0x153: 0x0024, 0x154: 0x0024, 0x155: 0x0024, 0x156: 0x0024, 0x157: 0x0024,\n\t0x158: 0x0024, 0x159: 0x0024, 0x15a: 0x0024, 0x15b: 0x0024, 0x15c: 0x0024, 0x15d: 0x0024,\n\t0x15e: 0x0024, 0x15f: 0x0024, 0x160: 0x0024, 0x161: 0x0024, 0x162: 0x0024, 0x163: 0x0024,\n\t0x164: 0x0024, 0x165: 0x0024, 0x166: 0x0024, 0x167: 0x0024, 0x168: 0x0024, 0x169: 0x0024,\n\t0x16a: 0x0024, 0x16b: 0x0024, 0x16c: 0x0024, 0x16d: 0x0024, 0x16e: 0x0024, 0x16f: 0x0024,\n\t// Block 0x6, offset 0x180\n\t0x183: 0x0024, 0x184: 0x0024, 0x185: 0x0024,\n\t0x186: 0x0024, 0x187: 0x0024, 0x188: 0x0024, 0x189: 0x0024,\n\t// Block 0x7, offset 0x1c0\n\t0x1d1: 0x0024,\n\t0x1d2: 0x0024, 0x1d3: 0x0024, 0x1d4: 0x0024, 0x1d5: 0x0024, 0x1d6: 0x0024, 0x1d7: 0x0024,\n\t0x1d8: 0x0024, 0x1d9: 0x0024, 0x1da: 0x0024, 0x1db: 0x0024, 0x1dc: 0x0024, 0x1dd: 0x0024,\n\t0x1de: 0x0024, 0x1df: 0x0024, 0x1e0: 0x0024, 0x1e1: 0x0024, 0x1e2: 0x0024, 0x1e3: 0x0024,\n\t0x1e4: 0x0024, 0x1e5: 0x0024, 0x1e6: 0x0024, 0x1e7: 0x0024, 0x1e8: 0x0024, 0x1e9: 0x0024,\n\t0x1ea: 0x0024, 0x1eb: 0x0024, 0x1ec: 0x0024, 0x1ed: 0x0024, 0x1ee: 0x0024, 0x1ef: 0x0024,\n\t0x1f0: 0x0024, 0x1f1: 0x0024, 0x1f2: 0x0024, 0x1f3: 0x0024, 0x1f4: 0x0024, 0x1f5: 0x0024,\n\t0x1f6: 0x0024, 0x1f7: 0x0024, 0x1f8: 0x0024, 0x1f9: 0x0024, 0x1fa: 0x0024, 0x1fb: 0x0024,\n\t0x1fc: 0x0024, 0x1fd: 0x0024, 0x1ff: 0x0024,\n\t// Block 0x8, offset 0x200\n\t0x201: 0x0024, 0x202: 0x0024, 0x204: 0x0024, 0x205: 0x0024,\n\t0x207: 0x0024,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0800, 0x241: 0x0800, 0x242: 0x0800, 0x243: 0x0800, 0x244: 0x0800, 0x245: 0x0800,\n\t0x250: 0x0024, 0x251: 0x0024,\n\t0x252: 0x0024, 0x253: 0x0024, 0x254: 0x0024, 0x255: 0x0024, 0x256: 0x0024, 0x257: 0x0024,\n\t0x258: 0x0024, 0x259: 0x0024, 0x25a: 0x0024, 0x25c: 0x0002,\n\t// Block 0xa, offset 0x280\n\t0x28b: 0x0024,\n\t0x28c: 0x0024, 0x28d: 0x0024, 0x28e: 0x0024, 0x28f: 0x0024, 0x290: 0x0024, 0x291: 0x0024,\n\t0x292: 0x0024, 0x293: 0x0024, 0x294: 0x0024, 0x295: 0x0024, 0x296: 0x0024, 0x297: 0x0024,\n\t0x298: 0x0024, 0x299: 0x0024, 0x29a: 0x0024, 0x29b: 0x0024, 0x29c: 0x0024, 0x29d: 0x0024,\n\t0x29e: 0x0024, 0x29f: 0x0024,\n\t0x2b0: 0x0024,\n\t// Block 0xb, offset 0x2c0\n\t0x2d6: 0x0024, 0x2d7: 0x0024,\n\t0x2d8: 0x0024, 0x2d9: 0x0024, 0x2da: 0x0024, 0x2db: 0x0024, 0x2dc: 0x0024, 0x2dd: 0x0800,\n\t0x2df: 0x0024, 0x2e0: 0x0024, 0x2e1: 0x0024, 0x2e2: 0x0024, 0x2e3: 0x0024,\n\t0x2e4: 0x0024, 0x2e7: 0x0024, 0x2e8: 0x0024,\n\t0x2ea: 0x0024, 0x2eb: 0x0024, 0x2ec: 0x0024, 0x2ed: 0x0024,\n\t// Block 0xc, offset 0x300\n\t0x30f: 0x0800, 0x311: 0x0024,\n\t0x330: 0x0024, 0x331: 0x0024, 0x332: 0x0024, 0x333: 0x0024, 0x334: 0x0024, 0x335: 0x0024,\n\t0x336: 0x0024, 0x337: 0x0024, 0x338: 0x0024, 0x339: 0x0024, 0x33a: 0x0024, 0x33b: 0x0024,\n\t0x33c: 0x0024, 0x33d: 0x0024, 0x33e: 0x0024, 0x33f: 0x0024,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0024, 0x341: 0x0024, 0x342: 0x0024, 0x343: 0x0024, 0x344: 0x0024, 0x345: 0x0024,\n\t0x346: 0x0024, 0x347: 0x0024, 0x348: 0x0024, 0x349: 0x0024, 0x34a: 0x0024,\n\t// Block 0xe, offset 0x380\n\t0x3a6: 0x0024, 0x3a7: 0x0024, 0x3a8: 0x0024, 0x3a9: 0x0024,\n\t0x3aa: 0x0024, 0x3ab: 0x0024, 0x3ac: 0x0024, 0x3ad: 0x0024, 0x3ae: 0x0024, 0x3af: 0x0024,\n\t0x3b0: 0x0024,\n\t// Block 0xf, offset 0x3c0\n\t0x3eb: 0x0024, 0x3ec: 0x0024, 0x3ed: 0x0024, 0x3ee: 0x0024, 0x3ef: 0x0024,\n\t0x3f0: 0x0024, 0x3f1: 0x0024, 0x3f2: 0x0024, 0x3f3: 0x0024,\n\t0x3fd: 0x0024,\n\t// Block 0x10, offset 0x400\n\t0x416: 0x0024, 0x417: 0x0024,\n\t0x418: 0x0024, 0x419: 0x0024, 0x41b: 0x0024, 0x41c: 0x0024, 0x41d: 0x0024,\n\t0x41e: 0x0024, 0x41f: 0x0024, 0x420: 0x0024, 0x421: 0x0024, 0x422: 0x0024, 0x423: 0x0024,\n\t0x425: 0x0024, 0x426: 0x0024, 0x427: 0x0024, 0x429: 0x0024,\n\t0x42a: 0x0024, 0x42b: 0x0024, 0x42c: 0x0024, 0x42d: 0x0024,\n\t// Block 0x11, offset 0x440\n\t0x459: 0x0024, 0x45a: 0x0024, 0x45b: 0x0024,\n\t// Block 0x12, offset 0x480\n\t0x490: 0x0800, 0x491: 0x0800,\n\t0x497: 0x0024,\n\t0x498: 0x0024, 0x499: 0x0024, 0x49a: 0x0024, 0x49b: 0x0024, 0x49c: 0x0024, 0x49d: 0x0024,\n\t0x49e: 0x0024, 0x49f: 0x0024,\n\t// Block 0x13, offset 0x4c0\n\t0x4ca: 0x0024, 0x4cb: 0x0024,\n\t0x4cc: 0x0024, 0x4cd: 0x0024, 0x4ce: 0x0024, 0x4cf: 0x0024, 0x4d0: 0x0024, 0x4d1: 0x0024,\n\t0x4d2: 0x0024, 0x4d3: 0x0024, 0x4d4: 0x0024, 0x4d5: 0x0024, 0x4d6: 0x0024, 0x4d7: 0x0024,\n\t0x4d8: 0x0024, 0x4d9: 0x0024, 0x4da: 0x0024, 0x4db: 0x0024, 0x4dc: 0x0024, 0x4dd: 0x0024,\n\t0x4de: 0x0024, 0x4df: 0x0024, 0x4e0: 0x0024, 0x4e1: 0x0024, 0x4e2: 0x0800, 0x4e3: 0x0024,\n\t0x4e4: 0x0024, 0x4e5: 0x0024, 0x4e6: 0x0024, 0x4e7: 0x0024, 0x4e8: 0x0024, 0x4e9: 0x0024,\n\t0x4ea: 0x0024, 0x4eb: 0x0024, 0x4ec: 0x0024, 0x4ed: 0x0024, 0x4ee: 0x0024, 0x4ef: 0x0024,\n\t0x4f0: 0x0024, 0x4f1: 0x0024, 0x4f2: 0x0024, 0x4f3: 0x0024, 0x4f4: 0x0024, 0x4f5: 0x0024,\n\t0x4f6: 0x0024, 0x4f7: 0x0024, 0x4f8: 0x0024, 0x4f9: 0x0024, 0x4fa: 0x0024, 0x4fb: 0x0024,\n\t0x4fc: 0x0024, 0x4fd: 0x0024, 0x4fe: 0x0024, 0x4ff: 0x0024,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0024, 0x501: 0x0024, 0x502: 0x0024, 0x503: 0x2000,\n\t0x515: 0x0010, 0x516: 0x0010, 0x517: 0x0010,\n\t0x518: 0x0010, 0x519: 0x0010, 0x51a: 0x0010, 0x51b: 0x0010, 0x51c: 0x0010, 0x51d: 0x0010,\n\t0x51e: 0x0010, 0x51f: 0x0010, 0x520: 0x0010, 0x521: 0x0010, 0x522: 0x0010, 0x523: 0x0010,\n\t0x524: 0x0010, 0x525: 0x0010, 0x526: 0x0010, 0x527: 0x0010, 0x528: 0x0010, 0x529: 0x0010,\n\t0x52a: 0x0010, 0x52b: 0x0010, 0x52c: 0x0010, 0x52d: 0x0010, 0x52e: 0x0010, 0x52f: 0x0010,\n\t0x530: 0x0010, 0x531: 0x0010, 0x532: 0x0010, 0x533: 0x0010, 0x534: 0x0010, 0x535: 0x0010,\n\t0x536: 0x0010, 0x537: 0x0010, 0x538: 0x0010, 0x539: 0x0010, 0x53a: 0x0024, 0x53b: 0x2000,\n\t0x53c: 0x0024, 0x53e: 0x2000, 0x53f: 0x2000,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x2000, 0x541: 0x0024, 0x542: 0x0024, 0x543: 0x0024, 0x544: 0x0024, 0x545: 0x0024,\n\t0x546: 0x0024, 0x547: 0x0024, 0x548: 0x0024, 0x549: 0x2000, 0x54a: 0x2000, 0x54b: 0x2000,\n\t0x54c: 0x2000, 0x54d: 0x0044, 0x54e: 0x2000, 0x54f: 0x2000, 0x551: 0x0024,\n\t0x552: 0x0024, 0x553: 0x0024, 0x554: 0x0024, 0x555: 0x0024, 0x556: 0x0024, 0x557: 0x0024,\n\t0x558: 0x0010, 0x559: 0x0010, 0x55a: 0x0010, 0x55b: 0x0010, 0x55c: 0x0010, 0x55d: 0x0010,\n\t0x55e: 0x0010, 0x55f: 0x0010, 0x562: 0x0024, 0x563: 0x0024,\n\t0x578: 0x0010, 0x579: 0x0010, 0x57a: 0x0010, 0x57b: 0x0010,\n\t0x57c: 0x0010, 0x57d: 0x0010, 0x57e: 0x0010, 0x57f: 0x0010,\n\t// Block 0x16, offset 0x580\n\t0x581: 0x0024, 0x582: 0x2000, 0x583: 0x2000,\n\t0x595: 0x0010, 0x596: 0x0010, 0x597: 0x0010,\n\t0x598: 0x0010, 0x599: 0x0010, 0x59a: 0x0010, 0x59b: 0x0010, 0x59c: 0x0010, 0x59d: 0x0010,\n\t0x59e: 0x0010, 0x59f: 0x0010, 0x5a0: 0x0010, 0x5a1: 0x0010, 0x5a2: 0x0010, 0x5a3: 0x0010,\n\t0x5a4: 0x0010, 0x5a5: 0x0010, 0x5a6: 0x0010, 0x5a7: 0x0010, 0x5a8: 0x0010,\n\t0x5aa: 0x0010, 0x5ab: 0x0010, 0x5ac: 0x0010, 0x5ad: 0x0010, 0x5ae: 0x0010, 0x5af: 0x0010,\n\t0x5b0: 0x0010, 0x5b2: 0x0010,\n\t0x5b6: 0x0010, 0x5b7: 0x0010, 0x5b8: 0x0010, 0x5b9: 0x0010,\n\t0x5bc: 0x0024, 0x5be: 0x0024, 0x5bf: 0x2000,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x2000, 0x5c1: 0x0024, 0x5c2: 0x0024, 0x5c3: 0x0024, 0x5c4: 0x0024,\n\t0x5c7: 0x2000, 0x5c8: 0x2000, 0x5cb: 0x2000,\n\t0x5cc: 0x2000, 0x5cd: 0x0044,\n\t0x5d7: 0x0024,\n\t0x5dc: 0x0010, 0x5dd: 0x0010,\n\t0x5df: 0x0010, 0x5e2: 0x0024, 0x5e3: 0x0024,\n\t0x5f0: 0x0010, 0x5f1: 0x0010,\n\t0x5fe: 0x0024,\n\t// Block 0x18, offset 0x600\n\t0x601: 0x0024, 0x602: 0x0024, 0x603: 0x2000,\n\t0x63c: 0x0024, 0x63e: 0x2000, 0x63f: 0x2000,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x2000, 0x641: 0x0024, 0x642: 0x0024,\n\t0x647: 0x0024, 0x648: 0x0024, 0x64b: 0x0024,\n\t0x64c: 0x0024, 0x64d: 0x0024, 0x651: 0x0024,\n\t0x670: 0x0024, 0x671: 0x0024, 0x675: 0x0024,\n\t// Block 0x1a, offset 0x680\n\t0x681: 0x0024, 0x682: 0x0024, 0x683: 0x2000,\n\t0x695: 0x0010, 0x696: 0x0010, 0x697: 0x0010,\n\t0x698: 0x0010, 0x699: 0x0010, 0x69a: 0x0010, 0x69b: 0x0010, 0x69c: 0x0010, 0x69d: 0x0010,\n\t0x69e: 0x0010, 0x69f: 0x0010, 0x6a0: 0x0010, 0x6a1: 0x0010, 0x6a2: 0x0010, 0x6a3: 0x0010,\n\t0x6a4: 0x0010, 0x6a5: 0x0010, 0x6a6: 0x0010, 0x6a7: 0x0010, 0x6a8: 0x0010,\n\t0x6aa: 0x0010, 0x6ab: 0x0010, 0x6ac: 0x0010, 0x6ad: 0x0010, 0x6ae: 0x0010, 0x6af: 0x0010,\n\t0x6b0: 0x0010, 0x6b2: 0x0010, 0x6b3: 0x0010, 0x6b5: 0x0010,\n\t0x6b6: 0x0010, 0x6b7: 0x0010, 0x6b8: 0x0010, 0x6b9: 0x0010,\n\t0x6bc: 0x0024, 0x6be: 0x2000, 0x6bf: 0x2000,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x2000, 0x6c1: 0x0024, 0x6c2: 0x0024, 0x6c3: 0x0024, 0x6c4: 0x0024, 0x6c5: 0x0024,\n\t0x6c7: 0x0024, 0x6c8: 0x0024, 0x6c9: 0x2000, 0x6cb: 0x2000,\n\t0x6cc: 0x2000, 0x6cd: 0x0044,\n\t0x6e2: 0x0024, 0x6e3: 0x0024,\n\t0x6f9: 0x0010, 0x6fa: 0x0024, 0x6fb: 0x0024,\n\t0x6fc: 0x0024, 0x6fd: 0x0024, 0x6fe: 0x0024, 0x6ff: 0x0024,\n\t// Block 0x1c, offset 0x700\n\t0x701: 0x0024, 0x702: 0x2000, 0x703: 0x2000,\n\t0x715: 0x0010, 0x716: 0x0010, 0x717: 0x0010,\n\t0x718: 0x0010, 0x719: 0x0010, 0x71a: 0x0010, 0x71b: 0x0010, 0x71c: 0x0010, 0x71d: 0x0010,\n\t0x71e: 0x0010, 0x71f: 0x0010, 0x720: 0x0010, 0x721: 0x0010, 0x722: 0x0010, 0x723: 0x0010,\n\t0x724: 0x0010, 0x725: 0x0010, 0x726: 0x0010, 0x727: 0x0010, 0x728: 0x0010,\n\t0x72a: 0x0010, 0x72b: 0x0010, 0x72c: 0x0010, 0x72d: 0x0010, 0x72e: 0x0010, 0x72f: 0x0010,\n\t0x730: 0x0010, 0x732: 0x0010, 0x733: 0x0010, 0x735: 0x0010,\n\t0x736: 0x0010, 0x737: 0x0010, 0x738: 0x0010, 0x739: 0x0010,\n\t0x73c: 0x0024, 0x73e: 0x0024, 0x73f: 0x0024,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x2000, 0x741: 0x0024, 0x742: 0x0024, 0x743: 0x0024, 0x744: 0x0024,\n\t0x747: 0x2000, 0x748: 0x2000, 0x74b: 0x2000,\n\t0x74c: 0x2000, 0x74d: 0x0044,\n\t0x755: 0x0024, 0x756: 0x0024, 0x757: 0x0024,\n\t0x75c: 0x0010, 0x75d: 0x0010,\n\t0x75f: 0x0010, 0x762: 0x0024, 0x763: 0x0024,\n\t0x771: 0x0010,\n\t// Block 0x1e, offset 0x780\n\t0x782: 0x0024,\n\t0x7be: 0x0024, 0x7bf: 0x2000,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0024, 0x7c1: 0x2000, 0x7c2: 0x2000,\n\t0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,\n\t0x7cc: 0x2000, 0x7cd: 0x0024,\n\t0x7d7: 0x0024,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0024, 0x801: 0x2000, 0x802: 0x2000, 0x803: 0x2000, 0x804: 0x0024,\n\t0x815: 0x0010, 0x816: 0x0010, 0x817: 0x0010,\n\t0x818: 0x0010, 0x819: 0x0010, 0x81a: 0x0010, 0x81b: 0x0010, 0x81c: 0x0010, 0x81d: 0x0010,\n\t0x81e: 0x0010, 0x81f: 0x0010, 0x820: 0x0010, 0x821: 0x0010, 0x822: 0x0010, 0x823: 0x0010,\n\t0x824: 0x0010, 0x825: 0x0010, 0x826: 0x0010, 0x827: 0x0010, 0x828: 0x0010,\n\t0x82a: 0x0010, 0x82b: 0x0010, 0x82c: 0x0010, 0x82d: 0x0010, 0x82e: 0x0010, 0x82f: 0x0010,\n\t0x830: 0x0010, 0x831: 0x0010, 0x832: 0x0010, 0x833: 0x0010, 0x834: 0x0010, 0x835: 0x0010,\n\t0x836: 0x0010, 0x837: 0x0010, 0x838: 0x0010, 0x839: 0x0010,\n\t0x83c: 0x0024, 0x83e: 0x0024, 0x83f: 0x0024,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0024, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000,\n\t0x846: 0x0024, 0x847: 0x0024, 0x848: 0x0024, 0x84a: 0x0024, 0x84b: 0x0024,\n\t0x84c: 0x0024, 0x84d: 0x0044,\n\t0x855: 0x0024, 0x856: 0x0024,\n\t0x858: 0x0010, 0x859: 0x0010, 0x85a: 0x0010,\n\t0x862: 0x0024, 0x863: 0x0024,\n\t// Block 0x22, offset 0x880\n\t0x881: 0x0024, 0x882: 0x2000, 0x883: 0x2000,\n\t0x8bc: 0x0024, 0x8be: 0x2000, 0x8bf: 0x0024,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0024, 0x8c1: 0x2000, 0x8c2: 0x0024, 0x8c3: 0x2000, 0x8c4: 0x2000,\n\t0x8c6: 0x0024, 0x8c7: 0x0024, 0x8c8: 0x0024, 0x8ca: 0x0024, 0x8cb: 0x0024,\n\t0x8cc: 0x0024, 0x8cd: 0x0024,\n\t0x8d5: 0x0024, 0x8d6: 0x0024,\n\t0x8e2: 0x0024, 0x8e3: 0x0024,\n\t0x8f3: 0x2000,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0024, 0x901: 0x0024, 0x902: 0x2000, 0x903: 0x2000,\n\t0x915: 0x0010, 0x916: 0x0010, 0x917: 0x0010,\n\t0x918: 0x0010, 0x919: 0x0010, 0x91a: 0x0010, 0x91b: 0x0010, 0x91c: 0x0010, 0x91d: 0x0010,\n\t0x91e: 0x0010, 0x91f: 0x0010, 0x920: 0x0010, 0x921: 0x0010, 0x922: 0x0010, 0x923: 0x0010,\n\t0x924: 0x0010, 0x925: 0x0010, 0x926: 0x0010, 0x927: 0x0010, 0x928: 0x0010, 0x929: 0x0010,\n\t0x92a: 0x0010, 0x92b: 0x0010, 0x92c: 0x0010, 0x92d: 0x0010, 0x92e: 0x0010, 0x92f: 0x0010,\n\t0x930: 0x0010, 0x931: 0x0010, 0x932: 0x0010, 0x933: 0x0010, 0x934: 0x0010, 0x935: 0x0010,\n\t0x936: 0x0010, 0x937: 0x0010, 0x938: 0x0010, 0x939: 0x0010, 0x93a: 0x0010, 0x93b: 0x0024,\n\t0x93c: 0x0024, 0x93e: 0x0024, 0x93f: 0x2000,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x2000, 0x941: 0x0024, 0x942: 0x0024, 0x943: 0x0024, 0x944: 0x0024,\n\t0x946: 0x2000, 0x947: 0x2000, 0x948: 0x2000, 0x94a: 0x2000, 0x94b: 0x2000,\n\t0x94c: 0x2000, 0x94d: 0x0044, 0x94e: 0x0800,\n\t0x957: 0x0024,\n\t0x962: 0x0024, 0x963: 0x0024,\n\t// Block 0x26, offset 0x980\n\t0x981: 0x0024, 0x982: 0x2000, 0x983: 0x2000,\n\t// Block 0x27, offset 0x9c0\n\t0x9ca: 0x0024,\n\t0x9cf: 0x0024, 0x9d0: 0x2000, 0x9d1: 0x2000,\n\t0x9d2: 0x0024, 0x9d3: 0x0024, 0x9d4: 0x0024, 0x9d6: 0x0024,\n\t0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,\n\t0x9de: 0x2000, 0x9df: 0x0024,\n\t0x9f2: 0x2000, 0x9f3: 0x2000,\n\t// Block 0x28, offset 0xa00\n\t0xa31: 0x0024, 0xa33: 0x2000, 0xa34: 0x0024, 0xa35: 0x0024,\n\t0xa36: 0x0024, 0xa37: 0x0024, 0xa38: 0x0024, 0xa39: 0x0024, 0xa3a: 0x0024,\n\t// Block 0x29, offset 0xa40\n\t0xa47: 0x0024, 0xa48: 0x0024, 0xa49: 0x0024, 0xa4a: 0x0024, 0xa4b: 0x0024,\n\t0xa4c: 0x0024, 0xa4d: 0x0024, 0xa4e: 0x0024,\n\t// Block 0x2a, offset 0xa80\n\t0xab1: 0x0024, 0xab3: 0x2000, 0xab4: 0x0024, 0xab5: 0x0024,\n\t0xab6: 0x0024, 0xab7: 0x0024, 0xab8: 0x0024, 0xab9: 0x0024, 0xaba: 0x0024, 0xabb: 0x0024,\n\t0xabc: 0x0024,\n\t// Block 0x2b, offset 0xac0\n\t0xac8: 0x0024, 0xac9: 0x0024, 0xaca: 0x0024, 0xacb: 0x0024,\n\t0xacc: 0x0024, 0xacd: 0x0024, 0xace: 0x0024,\n\t// Block 0x2c, offset 0xb00\n\t0xb18: 0x0024, 0xb19: 0x0024,\n\t0xb35: 0x0024,\n\t0xb37: 0x0024, 0xb39: 0x0024,\n\t0xb3e: 0x2000, 0xb3f: 0x2000,\n\t// Block 0x2d, offset 0xb40\n\t0xb71: 0x0024, 0xb72: 0x0024, 0xb73: 0x0024, 0xb74: 0x0024, 0xb75: 0x0024,\n\t0xb76: 0x0024, 0xb77: 0x0024, 0xb78: 0x0024, 0xb79: 0x0024, 0xb7a: 0x0024, 0xb7b: 0x0024,\n\t0xb7c: 0x0024, 0xb7d: 0x0024, 0xb7e: 0x0024, 0xb7f: 0x2000,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x0024, 0xb81: 0x0024, 0xb82: 0x0024, 0xb83: 0x0024, 0xb84: 0x0024,\n\t0xb86: 0x0024, 0xb87: 0x0024,\n\t0xb8d: 0x0024, 0xb8e: 0x0024, 0xb8f: 0x0024, 0xb90: 0x0024, 0xb91: 0x0024,\n\t0xb92: 0x0024, 0xb93: 0x0024, 0xb94: 0x0024, 0xb95: 0x0024, 0xb96: 0x0024, 0xb97: 0x0024,\n\t0xb99: 0x0024, 0xb9a: 0x0024, 0xb9b: 0x0024, 0xb9c: 0x0024, 0xb9d: 0x0024,\n\t0xb9e: 0x0024, 0xb9f: 0x0024, 0xba0: 0x0024, 0xba1: 0x0024, 0xba2: 0x0024, 0xba3: 0x0024,\n\t0xba4: 0x0024, 0xba5: 0x0024, 0xba6: 0x0024, 0xba7: 0x0024, 0xba8: 0x0024, 0xba9: 0x0024,\n\t0xbaa: 0x0024, 0xbab: 0x0024, 0xbac: 0x0024, 0xbad: 0x0024, 0xbae: 0x0024, 0xbaf: 0x0024,\n\t0xbb0: 0x0024, 0xbb1: 0x0024, 0xbb2: 0x0024, 0xbb3: 0x0024, 0xbb4: 0x0024, 0xbb5: 0x0024,\n\t0xbb6: 0x0024, 0xbb7: 0x0024, 0xbb8: 0x0024, 0xbb9: 0x0024, 0xbba: 0x0024, 0xbbb: 0x0024,\n\t0xbbc: 0x0024,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc6: 0x0024,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x0010, 0xc01: 0x0010, 0xc02: 0x0010, 0xc03: 0x0010, 0xc04: 0x0010, 0xc05: 0x0010,\n\t0xc06: 0x0010, 0xc07: 0x0010, 0xc08: 0x0010, 0xc09: 0x0010, 0xc0a: 0x0010, 0xc0b: 0x0010,\n\t0xc0c: 0x0010, 0xc0d: 0x0010, 0xc0e: 0x0010, 0xc0f: 0x0010, 0xc10: 0x0010, 0xc11: 0x0010,\n\t0xc12: 0x0010, 0xc13: 0x0010, 0xc14: 0x0010, 0xc15: 0x0010, 0xc16: 0x0010, 0xc17: 0x0010,\n\t0xc18: 0x0010, 0xc19: 0x0010, 0xc1a: 0x0010, 0xc1b: 0x0010, 0xc1c: 0x0010, 0xc1d: 0x0010,\n\t0xc1e: 0x0010, 0xc1f: 0x0010, 0xc20: 0x0010, 0xc21: 0x0010, 0xc22: 0x0010, 0xc23: 0x0010,\n\t0xc24: 0x0010, 0xc25: 0x0010, 0xc26: 0x0010, 0xc27: 0x0010, 0xc28: 0x0010, 0xc29: 0x0010,\n\t0xc2a: 0x0010, 0xc2d: 0x0024, 0xc2e: 0x0024, 0xc2f: 0x0024,\n\t0xc30: 0x0024, 0xc31: 0x2000, 0xc32: 0x0024, 0xc33: 0x0024, 0xc34: 0x0024, 0xc35: 0x0024,\n\t0xc36: 0x0024, 0xc37: 0x0024, 0xc39: 0x0044, 0xc3a: 0x0024, 0xc3b: 0x2000,\n\t0xc3c: 0x2000, 0xc3d: 0x0024, 0xc3e: 0x0024, 0xc3f: 0x0010,\n\t// Block 0x31, offset 0xc40\n\t0xc50: 0x0010, 0xc51: 0x0010,\n\t0xc52: 0x0010, 0xc53: 0x0010, 0xc54: 0x0010, 0xc55: 0x0010, 0xc56: 0x2000, 0xc57: 0x2000,\n\t0xc58: 0x0024, 0xc59: 0x0024, 0xc5a: 0x0010, 0xc5b: 0x0010, 0xc5c: 0x0010, 0xc5d: 0x0010,\n\t0xc5e: 0x0024, 0xc5f: 0x0024, 0xc60: 0x0024, 0xc61: 0x0010,\n\t0xc65: 0x0010, 0xc66: 0x0010,\n\t0xc6e: 0x0010, 0xc6f: 0x0010,\n\t0xc70: 0x0010, 0xc71: 0x0024, 0xc72: 0x0024, 0xc73: 0x0024, 0xc74: 0x0024, 0xc75: 0x0010,\n\t0xc76: 0x0010, 0xc77: 0x0010, 0xc78: 0x0010, 0xc79: 0x0010, 0xc7a: 0x0010, 0xc7b: 0x0010,\n\t0xc7c: 0x0010, 0xc7d: 0x0010, 0xc7e: 0x0010, 0xc7f: 0x0010,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x0010, 0xc81: 0x0010, 0xc82: 0x0024, 0xc84: 0x2000, 0xc85: 0x0024,\n\t0xc86: 0x0024,\n\t0xc8d: 0x0024, 0xc8e: 0x0010,\n\t0xc9d: 0x0024,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x0080, 0xcc1: 0x0080, 0xcc2: 0x0080, 0xcc3: 0x0080, 0xcc4: 0x0080, 0xcc5: 0x0080,\n\t0xcc6: 0x0080, 0xcc7: 0x0080, 0xcc8: 0x0080, 0xcc9: 0x0080, 0xcca: 0x0080, 0xccb: 0x0080,\n\t0xccc: 0x0080, 0xccd: 0x0080, 0xcce: 0x0080, 0xccf: 0x0080, 0xcd0: 0x0080, 0xcd1: 0x0080,\n\t0xcd2: 0x0080, 0xcd3: 0x0080, 0xcd4: 0x0080, 0xcd5: 0x0080, 0xcd6: 0x0080, 0xcd7: 0x0080,\n\t0xcd8: 0x0080, 0xcd9: 0x0080, 0xcda: 0x0080, 0xcdb: 0x0080, 0xcdc: 0x0080, 0xcdd: 0x0080,\n\t0xcde: 0x0080, 0xcdf: 0x0080, 0xce0: 0x0080, 0xce1: 0x0080, 0xce2: 0x0080, 0xce3: 0x0080,\n\t0xce4: 0x0080, 0xce5: 0x0080, 0xce6: 0x0080, 0xce7: 0x0080, 0xce8: 0x0080, 0xce9: 0x0080,\n\t0xcea: 0x0080, 0xceb: 0x0080, 0xcec: 0x0080, 0xced: 0x0080, 0xcee: 0x0080, 0xcef: 0x0080,\n\t0xcf0: 0x0080, 0xcf1: 0x0080, 0xcf2: 0x0080, 0xcf3: 0x0080, 0xcf4: 0x0080, 0xcf5: 0x0080,\n\t0xcf6: 0x0080, 0xcf7: 0x0080, 0xcf8: 0x0080, 0xcf9: 0x0080, 0xcfa: 0x0080, 0xcfb: 0x0080,\n\t0xcfc: 0x0080, 0xcfd: 0x0080, 0xcfe: 0x0080, 0xcff: 0x0080,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0080, 0xd01: 0x0080, 0xd02: 0x0080, 0xd03: 0x0080, 0xd04: 0x0080, 0xd05: 0x0080,\n\t0xd06: 0x0080, 0xd07: 0x0080, 0xd08: 0x0080, 0xd09: 0x0080, 0xd0a: 0x0080, 0xd0b: 0x0080,\n\t0xd0c: 0x0080, 0xd0d: 0x0080, 0xd0e: 0x0080, 0xd0f: 0x0080, 0xd10: 0x0080, 0xd11: 0x0080,\n\t0xd12: 0x0080, 0xd13: 0x0080, 0xd14: 0x0080, 0xd15: 0x0080, 0xd16: 0x0080, 0xd17: 0x0080,\n\t0xd18: 0x0080, 0xd19: 0x0080, 0xd1a: 0x0080, 0xd1b: 0x0080, 0xd1c: 0x0080, 0xd1d: 0x0080,\n\t0xd1e: 0x0080, 0xd1f: 0x0080, 0xd20: 0x8000, 0xd21: 0x8000, 0xd22: 0x8000, 0xd23: 0x8000,\n\t0xd24: 0x8000, 0xd25: 0x8000, 0xd26: 0x8000, 0xd27: 0x8000, 0xd28: 0x8000, 0xd29: 0x8000,\n\t0xd2a: 0x8000, 0xd2b: 0x8000, 0xd2c: 0x8000, 0xd2d: 0x8000, 0xd2e: 0x8000, 0xd2f: 0x8000,\n\t0xd30: 0x8000, 0xd31: 0x8000, 0xd32: 0x8000, 0xd33: 0x8000, 0xd34: 0x8000, 0xd35: 0x8000,\n\t0xd36: 0x8000, 0xd37: 0x8000, 0xd38: 0x8000, 0xd39: 0x8000, 0xd3a: 0x8000, 0xd3b: 0x8000,\n\t0xd3c: 0x8000, 0xd3d: 0x8000, 0xd3e: 0x8000, 0xd3f: 0x8000,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x8000, 0xd41: 0x8000, 0xd42: 0x8000, 0xd43: 0x8000, 0xd44: 0x8000, 0xd45: 0x8000,\n\t0xd46: 0x8000, 0xd47: 0x8000, 0xd48: 0x8000, 0xd49: 0x8000, 0xd4a: 0x8000, 0xd4b: 0x8000,\n\t0xd4c: 0x8000, 0xd4d: 0x8000, 0xd4e: 0x8000, 0xd4f: 0x8000, 0xd50: 0x8000, 0xd51: 0x8000,\n\t0xd52: 0x8000, 0xd53: 0x8000, 0xd54: 0x8000, 0xd55: 0x8000, 0xd56: 0x8000, 0xd57: 0x8000,\n\t0xd58: 0x8000, 0xd59: 0x8000, 0xd5a: 0x8000, 0xd5b: 0x8000, 0xd5c: 0x8000, 0xd5d: 0x8000,\n\t0xd5e: 0x8000, 0xd5f: 0x8000, 0xd60: 0x8000, 0xd61: 0x8000, 0xd62: 0x8000, 0xd63: 0x8000,\n\t0xd64: 0x8000, 0xd65: 0x8000, 0xd66: 0x8000, 0xd67: 0x8000, 0xd68: 0x4000, 0xd69: 0x4000,\n\t0xd6a: 0x4000, 0xd6b: 0x4000, 0xd6c: 0x4000, 0xd6d: 0x4000, 0xd6e: 0x4000, 0xd6f: 0x4000,\n\t0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x4000, 0xd73: 0x4000, 0xd74: 0x4000, 0xd75: 0x4000,\n\t0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x4000,\n\t0xd7c: 0x4000, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x4000, 0xd81: 0x4000, 0xd82: 0x4000, 0xd83: 0x4000, 0xd84: 0x4000, 0xd85: 0x4000,\n\t0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,\n\t0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,\n\t0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,\n\t0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,\n\t0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,\n\t0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,\n\t0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdaf: 0x4000,\n\t0xdb0: 0x4000, 0xdb1: 0x4000, 0xdb2: 0x4000, 0xdb3: 0x4000, 0xdb4: 0x4000, 0xdb5: 0x4000,\n\t0xdb6: 0x4000, 0xdb7: 0x4000, 0xdb8: 0x4000, 0xdb9: 0x4000, 0xdba: 0x4000, 0xdbb: 0x4000,\n\t0xdbc: 0x4000, 0xdbd: 0x4000, 0xdbe: 0x4000, 0xdbf: 0x4000,\n\t// Block 0x37, offset 0xdc0\n\t0xddd: 0x0024,\n\t0xdde: 0x0024, 0xddf: 0x0024,\n\t// Block 0x38, offset 0xe00\n\t0xe12: 0x0024, 0xe13: 0x0024, 0xe14: 0x0024, 0xe15: 0x0024,\n\t0xe32: 0x0024, 0xe33: 0x0024, 0xe34: 0x0024,\n\t// Block 0x39, offset 0xe40\n\t0xe52: 0x0024, 0xe53: 0x0024,\n\t0xe72: 0x0024, 0xe73: 0x0024,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x0010, 0xe81: 0x0010, 0xe82: 0x0010, 0xe83: 0x0010, 0xe84: 0x0010, 0xe85: 0x0010,\n\t0xe86: 0x0010, 0xe87: 0x0010, 0xe88: 0x0010, 0xe89: 0x0010, 0xe8a: 0x0010, 0xe8b: 0x0010,\n\t0xe8c: 0x0010, 0xe8d: 0x0010, 0xe8e: 0x0010, 0xe8f: 0x0010, 0xe90: 0x0010, 0xe91: 0x0010,\n\t0xe92: 0x0010, 0xe93: 0x0010, 0xe94: 0x0010, 0xe95: 0x0010, 0xe96: 0x0010, 0xe97: 0x0010,\n\t0xe98: 0x0010, 0xe99: 0x0010, 0xe9a: 0x0010, 0xe9b: 0x0010, 0xe9c: 0x0010, 0xe9d: 0x0010,\n\t0xe9e: 0x0010, 0xe9f: 0x0010, 0xea0: 0x0010, 0xea1: 0x0010, 0xea2: 0x0010, 0xea3: 0x0010,\n\t0xea4: 0x0010, 0xea5: 0x0010, 0xea6: 0x0010, 0xea7: 0x0010, 0xea8: 0x0010, 0xea9: 0x0010,\n\t0xeaa: 0x0010, 0xeab: 0x0010, 0xeac: 0x0010, 0xead: 0x0010, 0xeae: 0x0010, 0xeaf: 0x0010,\n\t0xeb0: 0x0010, 0xeb1: 0x0010, 0xeb2: 0x0010, 0xeb3: 0x0010, 0xeb4: 0x0024, 0xeb5: 0x0024,\n\t0xeb6: 0x2000, 0xeb7: 0x0024, 0xeb8: 0x0024, 0xeb9: 0x0024, 0xeba: 0x0024, 0xebb: 0x0024,\n\t0xebc: 0x0024, 0xebd: 0x0024, 0xebe: 0x2000, 0xebf: 0x2000,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2000, 0xec1: 0x2000, 0xec2: 0x2000, 0xec3: 0x2000, 0xec4: 0x2000, 0xec5: 0x2000,\n\t0xec6: 0x0024, 0xec7: 0x2000, 0xec8: 0x2000, 0xec9: 0x0024, 0xeca: 0x0024, 0xecb: 0x0024,\n\t0xecc: 0x0024, 0xecd: 0x0024, 0xece: 0x0024, 0xecf: 0x0024, 0xed0: 0x0024, 0xed1: 0x0024,\n\t0xed2: 0x0044, 0xed3: 0x0024,\n\t0xedd: 0x0024,\n\t// Block 0x3c, offset 0xf00\n\t0xf0b: 0x0024,\n\t0xf0c: 0x0024, 0xf0d: 0x0024, 0xf0e: 0x0002, 0xf0f: 0x0024,\n\t// Block 0x3d, offset 0xf40\n\t0xf45: 0x0024,\n\t0xf46: 0x0024,\n\t0xf69: 0x0024,\n\t// Block 0x3e, offset 0xf80\n\t0xfa0: 0x0024, 0xfa1: 0x0024, 0xfa2: 0x0024, 0xfa3: 0x2000,\n\t0xfa4: 0x2000, 0xfa5: 0x2000, 0xfa6: 0x2000, 0xfa7: 0x0024, 0xfa8: 0x0024, 0xfa9: 0x2000,\n\t0xfaa: 0x2000, 0xfab: 0x2000,\n\t0xfb0: 0x2000, 0xfb1: 0x2000, 0xfb2: 0x0024, 0xfb3: 0x2000, 0xfb4: 0x2000, 0xfb5: 0x2000,\n\t0xfb6: 0x2000, 0xfb7: 0x2000, 0xfb8: 0x2000, 0xfb9: 0x0024, 0xfba: 0x0024, 0xfbb: 0x0024,\n\t// Block 0x3f, offset 0xfc0\n\t0xfd7: 0x0024,\n\t0xfd8: 0x0024, 0xfd9: 0x2000, 0xfda: 0x2000, 0xfdb: 0x0024,\n\t0xfe0: 0x0010, 0xfe1: 0x0010, 0xfe2: 0x0010, 0xfe3: 0x0010,\n\t0xfe4: 0x0010, 0xfe5: 0x0010, 0xfe6: 0x0010, 0xfe7: 0x0010, 0xfe8: 0x0010, 0xfe9: 0x0010,\n\t0xfea: 0x0010, 0xfeb: 0x0010, 0xfec: 0x0010, 0xfed: 0x0010, 0xfee: 0x0010, 0xfef: 0x0010,\n\t0xff0: 0x0010, 0xff1: 0x0010, 0xff2: 0x0010, 0xff3: 0x0010, 0xff4: 0x0010, 0xff5: 0x0010,\n\t0xff6: 0x0010, 0xff7: 0x0010, 0xff8: 0x0010, 0xff9: 0x0010, 0xffa: 0x0010, 0xffb: 0x0010,\n\t0xffc: 0x0010, 0xffd: 0x0010, 0xffe: 0x0010, 0xfff: 0x0010,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x0010, 0x1001: 0x0010, 0x1002: 0x0010, 0x1003: 0x0010, 0x1004: 0x0010, 0x1005: 0x0010,\n\t0x1006: 0x0010, 0x1007: 0x0010, 0x1008: 0x0010, 0x1009: 0x0010, 0x100a: 0x0010, 0x100b: 0x0010,\n\t0x100c: 0x0010, 0x100d: 0x0010, 0x100e: 0x0010, 0x100f: 0x0010, 0x1010: 0x0010, 0x1011: 0x0010,\n\t0x1012: 0x0010, 0x1013: 0x0010, 0x1014: 0x0010, 0x1015: 0x2000, 0x1016: 0x0024, 0x1017: 0x2000,\n\t0x1018: 0x0024, 0x1019: 0x0024, 0x101a: 0x0024, 0x101b: 0x0024, 0x101c: 0x0024, 0x101d: 0x0024,\n\t0x101e: 0x0024, 0x1020: 0x0044, 0x1022: 0x0024,\n\t0x1025: 0x0024, 0x1026: 0x0024, 0x1027: 0x0024, 0x1028: 0x0024, 0x1029: 0x0024,\n\t0x102a: 0x0024, 0x102b: 0x0024, 0x102c: 0x0024, 0x102d: 0x2000, 0x102e: 0x2000, 0x102f: 0x2000,\n\t0x1030: 0x2000, 0x1031: 0x2000, 0x1032: 0x2000, 0x1033: 0x0024, 0x1034: 0x0024, 0x1035: 0x0024,\n\t0x1036: 0x0024, 0x1037: 0x0024, 0x1038: 0x0024, 0x1039: 0x0024, 0x103a: 0x0024, 0x103b: 0x0024,\n\t0x103c: 0x0024, 0x103f: 0x0024,\n\t// Block 0x41, offset 0x1040\n\t0x1070: 0x0024, 0x1071: 0x0024, 0x1072: 0x0024, 0x1073: 0x0024, 0x1074: 0x0024, 0x1075: 0x0024,\n\t0x1076: 0x0024, 0x1077: 0x0024, 0x1078: 0x0024, 0x1079: 0x0024, 0x107a: 0x0024, 0x107b: 0x0024,\n\t0x107c: 0x0024, 0x107d: 0x0024, 0x107e: 0x0024, 0x107f: 0x0024,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x0024, 0x1081: 0x0024, 0x1082: 0x0024, 0x1083: 0x0024, 0x1084: 0x0024, 0x1085: 0x0024,\n\t0x1086: 0x0024, 0x1087: 0x0024, 0x1088: 0x0024, 0x1089: 0x0024, 0x108a: 0x0024, 0x108b: 0x0024,\n\t0x108c: 0x0024, 0x108d: 0x0024, 0x108e: 0x0024, 0x108f: 0x0024, 0x1090: 0x0024, 0x1091: 0x0024,\n\t0x1092: 0x0024, 0x1093: 0x0024, 0x1094: 0x0024, 0x1095: 0x0024, 0x1096: 0x0024, 0x1097: 0x0024,\n\t0x1098: 0x0024, 0x1099: 0x0024, 0x109a: 0x0024, 0x109b: 0x0024, 0x109c: 0x0024, 0x109d: 0x0024,\n\t0x10a0: 0x0024, 0x10a1: 0x0024, 0x10a2: 0x0024, 0x10a3: 0x0024,\n\t0x10a4: 0x0024, 0x10a5: 0x0024, 0x10a6: 0x0024, 0x10a7: 0x0024, 0x10a8: 0x0024, 0x10a9: 0x0024,\n\t0x10aa: 0x0024, 0x10ab: 0x0024,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x0024, 0x10c1: 0x0024, 0x10c2: 0x0024, 0x10c3: 0x0024, 0x10c4: 0x2000,\n\t0x10cb: 0x0010,\n\t0x10cc: 0x0010,\n\t0x10d3: 0x0010, 0x10d4: 0x0010, 0x10d5: 0x0010, 0x10d6: 0x0010, 0x10d7: 0x0010,\n\t0x10d8: 0x0010, 0x10d9: 0x0010, 0x10da: 0x0010, 0x10db: 0x0010, 0x10dc: 0x0010, 0x10dd: 0x0010,\n\t0x10de: 0x0010, 0x10df: 0x0010, 0x10e0: 0x0010, 0x10e1: 0x0010, 0x10e2: 0x0010, 0x10e3: 0x0010,\n\t0x10e4: 0x0010, 0x10e5: 0x0010, 0x10e6: 0x0010, 0x10e7: 0x0010, 0x10e8: 0x0010, 0x10e9: 0x0010,\n\t0x10ea: 0x0010, 0x10eb: 0x0010, 0x10ec: 0x0010, 0x10ed: 0x0010, 0x10ee: 0x0010, 0x10ef: 0x0010,\n\t0x10f0: 0x0010, 0x10f1: 0x0010, 0x10f2: 0x0010, 0x10f3: 0x0010, 0x10f4: 0x0024, 0x10f5: 0x0024,\n\t0x10f6: 0x0024, 0x10f7: 0x0024, 0x10f8: 0x0024, 0x10f9: 0x0024, 0x10fa: 0x0024, 0x10fb: 0x0024,\n\t0x10fc: 0x0024, 0x10fd: 0x0024, 0x10fe: 0x2000, 0x10ff: 0x2000,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0x2000, 0x1101: 0x2000, 0x1102: 0x0024, 0x1103: 0x0024, 0x1104: 0x0044, 0x1105: 0x0010,\n\t0x1106: 0x0010, 0x1107: 0x0010, 0x1108: 0x0010, 0x1109: 0x0010, 0x110a: 0x0010, 0x110b: 0x0010,\n\t0x110c: 0x0010,\n\t0x112b: 0x0024, 0x112c: 0x0024, 0x112d: 0x0024, 0x112e: 0x0024, 0x112f: 0x0024,\n\t0x1130: 0x0024, 0x1131: 0x0024, 0x1132: 0x0024, 0x1133: 0x0024,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0x0024, 0x1141: 0x0024, 0x1142: 0x2000, 0x1143: 0x0010, 0x1144: 0x0010, 0x1145: 0x0010,\n\t0x1146: 0x0010, 0x1147: 0x0010, 0x1148: 0x0010, 0x1149: 0x0010, 0x114a: 0x0010, 0x114b: 0x0010,\n\t0x114c: 0x0010, 0x114d: 0x0010, 0x114e: 0x0010, 0x114f: 0x0010, 0x1150: 0x0010, 0x1151: 0x0010,\n\t0x1152: 0x0010, 0x1153: 0x0010, 0x1154: 0x0010, 0x1155: 0x0010, 0x1156: 0x0010, 0x1157: 0x0010,\n\t0x1158: 0x0010, 0x1159: 0x0010, 0x115a: 0x0010, 0x115b: 0x0010, 0x115c: 0x0010, 0x115d: 0x0010,\n\t0x115e: 0x0010, 0x115f: 0x0010, 0x1160: 0x0010, 0x1161: 0x2000, 0x1162: 0x0024, 0x1163: 0x0024,\n\t0x1164: 0x0024, 0x1165: 0x0024, 0x1166: 0x2000, 0x1167: 0x2000, 0x1168: 0x0024, 0x1169: 0x0024,\n\t0x116a: 0x0024, 0x116b: 0x0044, 0x116c: 0x0024, 0x116d: 0x0024, 0x116e: 0x0010, 0x116f: 0x0010,\n\t0x117b: 0x0010,\n\t0x117c: 0x0010, 0x117d: 0x0010,\n\t// Block 0x46, offset 0x1180\n\t0x11a6: 0x0024, 0x11a7: 0x2000, 0x11a8: 0x0024, 0x11a9: 0x0024,\n\t0x11aa: 0x2000, 0x11ab: 0x2000, 0x11ac: 0x2000, 0x11ad: 0x0024, 0x11ae: 0x2000, 0x11af: 0x0024,\n\t0x11b0: 0x0024, 0x11b1: 0x0024, 0x11b2: 0x0024, 0x11b3: 0x0024,\n\t// Block 0x47, offset 0x11c0\n\t0x11e4: 0x2000, 0x11e5: 0x2000, 0x11e6: 0x2000, 0x11e7: 0x2000, 0x11e8: 0x2000, 0x11e9: 0x2000,\n\t0x11ea: 0x2000, 0x11eb: 0x2000, 0x11ec: 0x0024, 0x11ed: 0x0024, 0x11ee: 0x0024, 0x11ef: 0x0024,\n\t0x11f0: 0x0024, 0x11f1: 0x0024, 0x11f2: 0x0024, 0x11f3: 0x0024, 0x11f4: 0x2000, 0x11f5: 0x2000,\n\t0x11f6: 0x0024, 0x11f7: 0x0024,\n\t// Block 0x48, offset 0x1200\n\t0x1210: 0x0024, 0x1211: 0x0024,\n\t0x1212: 0x0024, 0x1214: 0x0024, 0x1215: 0x0024, 0x1216: 0x0024, 0x1217: 0x0024,\n\t0x1218: 0x0024, 0x1219: 0x0024, 0x121a: 0x0024, 0x121b: 0x0024, 0x121c: 0x0024, 0x121d: 0x0024,\n\t0x121e: 0x0024, 0x121f: 0x0024, 0x1220: 0x0024, 0x1221: 0x2000, 0x1222: 0x0024, 0x1223: 0x0024,\n\t0x1224: 0x0024, 0x1225: 0x0024, 0x1226: 0x0024, 0x1227: 0x0024, 0x1228: 0x0024,\n\t0x122d: 0x0024,\n\t0x1234: 0x0024,\n\t0x1237: 0x2000, 0x1238: 0x0024, 0x1239: 0x0024,\n\t// Block 0x49, offset 0x1240\n\t0x124b: 0x0002,\n\t0x124c: 0x0004, 0x124d: 0x10020, 0x124e: 0x0002, 0x124f: 0x0002,\n\t0x1268: 0x0002, 0x1269: 0x0002,\n\t0x126a: 0x0002, 0x126b: 0x0002, 0x126c: 0x0002, 0x126d: 0x0002, 0x126e: 0x0002,\n\t0x127c: 0x0008,\n\t// Block 0x4a, offset 0x1280\n\t0x1289: 0x0008,\n\t0x12a0: 0x0002, 0x12a1: 0x0002, 0x12a2: 0x0002, 0x12a3: 0x0002,\n\t0x12a4: 0x0002, 0x12a5: 0x0002, 0x12a6: 0x0002, 0x12a7: 0x0002, 0x12a8: 0x0002, 0x12a9: 0x0002,\n\t0x12aa: 0x0002, 0x12ab: 0x0002, 0x12ac: 0x0002, 0x12ad: 0x0002, 0x12ae: 0x0002, 0x12af: 0x0002,\n\t// Block 0x4b, offset 0x12c0\n\t0x12d0: 0x0024, 0x12d1: 0x0024,\n\t0x12d2: 0x0024, 0x12d3: 0x0024, 0x12d4: 0x0024, 0x12d5: 0x0024, 0x12d6: 0x0024, 0x12d7: 0x0024,\n\t0x12d8: 0x0024, 0x12d9: 0x0024, 0x12da: 0x0024, 0x12db: 0x0024, 0x12dc: 0x0024, 0x12dd: 0x0024,\n\t0x12de: 0x0024, 0x12df: 0x0024, 0x12e0: 0x0024, 0x12e1: 0x0024, 0x12e2: 0x0024, 0x12e3: 0x0024,\n\t0x12e4: 0x0024, 0x12e5: 0x0024, 0x12e6: 0x0024, 0x12e7: 0x0024, 0x12e8: 0x0024, 0x12e9: 0x0024,\n\t0x12ea: 0x0024, 0x12eb: 0x0024, 0x12ec: 0x0024, 0x12ed: 0x0024, 0x12ee: 0x0024, 0x12ef: 0x0024,\n\t0x12f0: 0x0024,\n\t// Block 0x4c, offset 0x1300\n\t0x1322: 0x0008,\n\t0x1339: 0x0008,\n\t// Block 0x4d, offset 0x1340\n\t0x1354: 0x0008, 0x1355: 0x0008, 0x1356: 0x0008, 0x1357: 0x0008,\n\t0x1358: 0x0008, 0x1359: 0x0008,\n\t0x1369: 0x0008,\n\t0x136a: 0x0008,\n\t// Block 0x4e, offset 0x1380\n\t0x139a: 0x0008, 0x139b: 0x0008,\n\t0x13a8: 0x0008,\n\t// Block 0x4f, offset 0x13c0\n\t0x13cf: 0x0008,\n\t0x13e9: 0x0008,\n\t0x13ea: 0x0008, 0x13eb: 0x0008, 0x13ec: 0x0008, 0x13ed: 0x0008, 0x13ee: 0x0008, 0x13ef: 0x0008,\n\t0x13f0: 0x0008, 0x13f1: 0x0008, 0x13f2: 0x0008, 0x13f3: 0x0008,\n\t0x13f8: 0x0008, 0x13f9: 0x0008, 0x13fa: 0x0008,\n\t// Block 0x50, offset 0x1400\n\t0x1402: 0x0008,\n\t// Block 0x51, offset 0x1440\n\t0x146a: 0x0008, 0x146b: 0x0008,\n\t0x1476: 0x0008,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x0008,\n\t0x14bb: 0x0008,\n\t0x14bc: 0x0008, 0x14bd: 0x0008, 0x14be: 0x0008,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0008, 0x14c1: 0x0008, 0x14c2: 0x0008, 0x14c3: 0x0008, 0x14c4: 0x0008,\n\t0x14ce: 0x0008, 0x14d1: 0x0008,\n\t0x14d4: 0x0008, 0x14d5: 0x0008,\n\t0x14d8: 0x0008, 0x14dd: 0x0008,\n\t0x14e0: 0x0008, 0x14e2: 0x0008, 0x14e3: 0x0008,\n\t0x14e6: 0x0008,\n\t0x14ea: 0x0008, 0x14ee: 0x0008, 0x14ef: 0x0008,\n\t0x14f8: 0x0008, 0x14f9: 0x0008, 0x14fa: 0x0008,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x0008, 0x1502: 0x0008,\n\t0x1508: 0x0008, 0x1509: 0x0008, 0x150a: 0x0008, 0x150b: 0x0008,\n\t0x150c: 0x0008, 0x150d: 0x0008, 0x150e: 0x0008, 0x150f: 0x0008, 0x1510: 0x0008, 0x1511: 0x0008,\n\t0x1512: 0x0008, 0x1513: 0x0008,\n\t0x151f: 0x0008, 0x1520: 0x0008, 0x1523: 0x0008,\n\t0x1525: 0x0008, 0x1526: 0x0008, 0x1528: 0x0008,\n\t0x153b: 0x0008,\n\t0x153e: 0x0008, 0x153f: 0x0008,\n\t// Block 0x55, offset 0x1540\n\t0x1552: 0x0008, 0x1553: 0x0008, 0x1554: 0x0008, 0x1555: 0x0008, 0x1556: 0x0008, 0x1557: 0x0008,\n\t0x1559: 0x0008, 0x155b: 0x0008, 0x155c: 0x0008,\n\t0x1560: 0x0008, 0x1561: 0x0008,\n\t0x1567: 0x0008,\n\t0x156a: 0x0008, 0x156b: 0x0008,\n\t0x1570: 0x0008, 0x1571: 0x0008,\n\t0x157d: 0x0008, 0x157e: 0x0008,\n\t// Block 0x56, offset 0x1580\n\t0x1584: 0x0008, 0x1585: 0x0008,\n\t0x1588: 0x0008,\n\t0x158e: 0x0008, 0x158f: 0x0008, 0x1591: 0x0008,\n\t0x1593: 0x0008, 0x1594: 0x0008,\n\t0x15a9: 0x0008,\n\t0x15aa: 0x0008,\n\t0x15b0: 0x0008, 0x15b1: 0x0008, 0x15b2: 0x0008, 0x15b3: 0x0008, 0x15b4: 0x0008, 0x15b5: 0x0008,\n\t0x15b7: 0x0008, 0x15b8: 0x0008, 0x15b9: 0x0008, 0x15ba: 0x0008,\n\t0x15bd: 0x0008,\n\t// Block 0x57, offset 0x15c0\n\t0x15c2: 0x0008, 0x15c5: 0x0008,\n\t0x15c8: 0x0008, 0x15c9: 0x0008, 0x15ca: 0x0008, 0x15cb: 0x0008,\n\t0x15cc: 0x0008, 0x15cd: 0x0008, 0x15cf: 0x0008,\n\t0x15d2: 0x0008, 0x15d4: 0x0008, 0x15d6: 0x0008,\n\t0x15dd: 0x0008,\n\t0x15e1: 0x0008,\n\t0x15e8: 0x0008,\n\t0x15f3: 0x0008, 0x15f4: 0x0008,\n\t// Block 0x58, offset 0x1600\n\t0x1604: 0x0008,\n\t0x1607: 0x0008,\n\t0x160c: 0x0008, 0x160e: 0x0008,\n\t0x1613: 0x0008, 0x1614: 0x0008, 0x1615: 0x0008, 0x1617: 0x0008,\n\t0x1623: 0x0008,\n\t0x1624: 0x0008,\n\t// Block 0x59, offset 0x1640\n\t0x1655: 0x0008, 0x1656: 0x0008, 0x1657: 0x0008,\n\t0x1661: 0x0008,\n\t0x1670: 0x0008,\n\t0x167f: 0x0008,\n\t// Block 0x5a, offset 0x1680\n\t0x16b4: 0x0008, 0x16b5: 0x0008,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c5: 0x0008,\n\t0x16c6: 0x0008, 0x16c7: 0x0008,\n\t0x16db: 0x0008, 0x16dc: 0x0008,\n\t// Block 0x5c, offset 0x1700\n\t0x1710: 0x0008,\n\t0x1715: 0x0008,\n\t// Block 0x5d, offset 0x1740\n\t0x176f: 0x0024,\n\t0x1770: 0x0024, 0x1771: 0x0024,\n\t// Block 0x5e, offset 0x1780\n\t0x17bf: 0x0024,\n\t// Block 0x5f, offset 0x17c0\n\t0x17e0: 0x0024, 0x17e1: 0x0024, 0x17e2: 0x0024, 0x17e3: 0x0024,\n\t0x17e4: 0x0024, 0x17e5: 0x0024, 0x17e6: 0x0024, 0x17e7: 0x0024, 0x17e8: 0x0024, 0x17e9: 0x0024,\n\t0x17ea: 0x0024, 0x17eb: 0x0024, 0x17ec: 0x0024, 0x17ed: 0x0024, 0x17ee: 0x0024, 0x17ef: 0x0024,\n\t0x17f0: 0x0024, 0x17f1: 0x0024, 0x17f2: 0x0024, 0x17f3: 0x0024, 0x17f4: 0x0024, 0x17f5: 0x0024,\n\t0x17f6: 0x0024, 0x17f7: 0x0024, 0x17f8: 0x0024, 0x17f9: 0x0024, 0x17fa: 0x0024, 0x17fb: 0x0024,\n\t0x17fc: 0x0024, 0x17fd: 0x0024, 0x17fe: 0x0024, 0x17ff: 0x0024,\n\t// Block 0x60, offset 0x1800\n\t0x182a: 0x0024, 0x182b: 0x0024, 0x182c: 0x0024, 0x182d: 0x0024, 0x182e: 0x0024, 0x182f: 0x0024,\n\t0x1830: 0x0008,\n\t0x183d: 0x0008,\n\t// Block 0x61, offset 0x1840\n\t0x1859: 0x0024, 0x185a: 0x0024,\n\t// Block 0x62, offset 0x1880\n\t0x1897: 0x0008,\n\t0x1899: 0x0008,\n\t// Block 0x63, offset 0x18c0\n\t0x18ef: 0x0024,\n\t0x18f0: 0x0024, 0x18f1: 0x0024, 0x18f2: 0x0024, 0x18f4: 0x0024, 0x18f5: 0x0024,\n\t0x18f6: 0x0024, 0x18f7: 0x0024, 0x18f8: 0x0024, 0x18f9: 0x0024, 0x18fa: 0x0024, 0x18fb: 0x0024,\n\t0x18fc: 0x0024, 0x18fd: 0x0024,\n\t// Block 0x64, offset 0x1900\n\t0x191e: 0x0024, 0x191f: 0x0024,\n\t// Block 0x65, offset 0x1940\n\t0x1970: 0x0024, 0x1971: 0x0024,\n\t// Block 0x66, offset 0x1980\n\t0x1982: 0x0024,\n\t0x1986: 0x0024, 0x198b: 0x0024,\n\t0x19a3: 0x2000,\n\t0x19a4: 0x2000, 0x19a5: 0x0024, 0x19a6: 0x0024, 0x19a7: 0x2000,\n\t0x19ac: 0x0024,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x2000, 0x19c1: 0x2000,\n\t0x19f4: 0x2000, 0x19f5: 0x2000,\n\t0x19f6: 0x2000, 0x19f7: 0x2000, 0x19f8: 0x2000, 0x19f9: 0x2000, 0x19fa: 0x2000, 0x19fb: 0x2000,\n\t0x19fc: 0x2000, 0x19fd: 0x2000, 0x19fe: 0x2000, 0x19ff: 0x2000,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x2000, 0x1a01: 0x2000, 0x1a02: 0x2000, 0x1a03: 0x2000, 0x1a04: 0x0024, 0x1a05: 0x0024,\n\t0x1a20: 0x0024, 0x1a21: 0x0024, 0x1a22: 0x0024, 0x1a23: 0x0024,\n\t0x1a24: 0x0024, 0x1a25: 0x0024, 0x1a26: 0x0024, 0x1a27: 0x0024, 0x1a28: 0x0024, 0x1a29: 0x0024,\n\t0x1a2a: 0x0024, 0x1a2b: 0x0024, 0x1a2c: 0x0024, 0x1a2d: 0x0024, 0x1a2e: 0x0024, 0x1a2f: 0x0024,\n\t0x1a30: 0x0024, 0x1a31: 0x0024,\n\t0x1a3f: 0x0024,\n\t// Block 0x69, offset 0x1a40\n\t0x1a66: 0x0024, 0x1a67: 0x0024, 0x1a68: 0x0024, 0x1a69: 0x0024,\n\t0x1a6a: 0x0024, 0x1a6b: 0x0024, 0x1a6c: 0x0024, 0x1a6d: 0x0024,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a87: 0x0024, 0x1a88: 0x0024, 0x1a89: 0x0024, 0x1a8a: 0x0024, 0x1a8b: 0x0024,\n\t0x1a8c: 0x0024, 0x1a8d: 0x0024, 0x1a8e: 0x0024, 0x1a8f: 0x0024, 0x1a90: 0x0024, 0x1a91: 0x0024,\n\t0x1a92: 0x2000, 0x1a93: 0x0024,\n\t0x1aa0: 0x0080, 0x1aa1: 0x0080, 0x1aa2: 0x0080, 0x1aa3: 0x0080,\n\t0x1aa4: 0x0080, 0x1aa5: 0x0080, 0x1aa6: 0x0080, 0x1aa7: 0x0080, 0x1aa8: 0x0080, 0x1aa9: 0x0080,\n\t0x1aaa: 0x0080, 0x1aab: 0x0080, 0x1aac: 0x0080, 0x1aad: 0x0080, 0x1aae: 0x0080, 0x1aaf: 0x0080,\n\t0x1ab0: 0x0080, 0x1ab1: 0x0080, 0x1ab2: 0x0080, 0x1ab3: 0x0080, 0x1ab4: 0x0080, 0x1ab5: 0x0080,\n\t0x1ab6: 0x0080, 0x1ab7: 0x0080, 0x1ab8: 0x0080, 0x1ab9: 0x0080, 0x1aba: 0x0080, 0x1abb: 0x0080,\n\t0x1abc: 0x0080,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x0024, 0x1ac1: 0x0024, 0x1ac2: 0x0024, 0x1ac3: 0x2000,\n\t0x1ac9: 0x0010, 0x1aca: 0x0010, 0x1acb: 0x0010,\n\t0x1acf: 0x0010, 0x1ad0: 0x0010, 0x1ad1: 0x0010,\n\t0x1ad2: 0x0010, 0x1ad3: 0x0010, 0x1ad4: 0x0010, 0x1ad5: 0x0010, 0x1ad6: 0x0010, 0x1ad7: 0x0010,\n\t0x1ad8: 0x0010, 0x1ad9: 0x0010, 0x1ada: 0x0010, 0x1adb: 0x0010, 0x1adc: 0x0010, 0x1add: 0x0010,\n\t0x1ade: 0x0010, 0x1adf: 0x0010, 0x1ae0: 0x0010, 0x1ae1: 0x0010, 0x1ae2: 0x0010, 0x1ae3: 0x0010,\n\t0x1ae4: 0x0010, 0x1ae5: 0x0010, 0x1ae6: 0x0010, 0x1ae7: 0x0010, 0x1ae8: 0x0010, 0x1ae9: 0x0010,\n\t0x1aea: 0x0010, 0x1aeb: 0x0010, 0x1aec: 0x0010, 0x1aed: 0x0010, 0x1aee: 0x0010, 0x1aef: 0x0010,\n\t0x1af0: 0x0010, 0x1af1: 0x0010, 0x1af2: 0x0010, 0x1af3: 0x0024, 0x1af4: 0x2000, 0x1af5: 0x2000,\n\t0x1af6: 0x0024, 0x1af7: 0x0024, 0x1af8: 0x0024, 0x1af9: 0x0024, 0x1afa: 0x2000, 0x1afb: 0x2000,\n\t0x1afc: 0x0024, 0x1afd: 0x0024, 0x1afe: 0x2000, 0x1aff: 0x2000,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x0044,\n\t0x1b20: 0x0010, 0x1b21: 0x0010, 0x1b22: 0x0010, 0x1b23: 0x0010,\n\t0x1b24: 0x0010, 0x1b25: 0x0024, 0x1b27: 0x0010, 0x1b28: 0x0010, 0x1b29: 0x0010,\n\t0x1b2a: 0x0010, 0x1b2b: 0x0010, 0x1b2c: 0x0010, 0x1b2d: 0x0010, 0x1b2e: 0x0010, 0x1b2f: 0x0010,\n\t0x1b3a: 0x0010, 0x1b3b: 0x0010,\n\t0x1b3c: 0x0010, 0x1b3d: 0x0010, 0x1b3e: 0x0010,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b69: 0x0024,\n\t0x1b6a: 0x0024, 0x1b6b: 0x0024, 0x1b6c: 0x0024, 0x1b6d: 0x0024, 0x1b6e: 0x0024, 0x1b6f: 0x2000,\n\t0x1b70: 0x2000, 0x1b71: 0x0024, 0x1b72: 0x0024, 0x1b73: 0x2000, 0x1b74: 0x2000, 0x1b75: 0x0024,\n\t0x1b76: 0x0024,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b83: 0x0024,\n\t0x1b8c: 0x0024, 0x1b8d: 0x2000,\n\t0x1ba0: 0x0010, 0x1ba1: 0x0010, 0x1ba2: 0x0010, 0x1ba3: 0x0010,\n\t0x1ba4: 0x0010, 0x1ba5: 0x0010, 0x1ba6: 0x0010, 0x1ba7: 0x0010, 0x1ba8: 0x0010, 0x1ba9: 0x0010,\n\t0x1baa: 0x0010, 0x1bab: 0x0010, 0x1bac: 0x0010, 0x1bad: 0x0010, 0x1bae: 0x0010, 0x1baf: 0x0010,\n\t0x1bb1: 0x0010, 0x1bb2: 0x0010, 0x1bb3: 0x0010,\n\t0x1bba: 0x0010,\n\t0x1bbc: 0x0024, 0x1bbe: 0x0010, 0x1bbf: 0x0010,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bf0: 0x0024, 0x1bf2: 0x0024, 0x1bf3: 0x0024, 0x1bf4: 0x0024,\n\t0x1bf7: 0x0024, 0x1bf8: 0x0024,\n\t0x1bfe: 0x0024, 0x1bff: 0x0024,\n\t// Block 0x70, offset 0x1c00\n\t0x1c01: 0x0024,\n\t0x1c20: 0x0010, 0x1c21: 0x0010, 0x1c22: 0x0010, 0x1c23: 0x0010,\n\t0x1c24: 0x0010, 0x1c25: 0x0010, 0x1c26: 0x0010, 0x1c27: 0x0010, 0x1c28: 0x0010, 0x1c29: 0x0010,\n\t0x1c2a: 0x0010, 0x1c2b: 0x2000, 0x1c2c: 0x0024, 0x1c2d: 0x0024, 0x1c2e: 0x2000, 0x1c2f: 0x2000,\n\t0x1c35: 0x2000,\n\t0x1c36: 0x0044,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0x0010, 0x1c41: 0x0010, 0x1c42: 0x0010, 0x1c43: 0x0010, 0x1c44: 0x0010, 0x1c45: 0x0010,\n\t0x1c46: 0x0010, 0x1c47: 0x0010, 0x1c48: 0x0010, 0x1c49: 0x0010, 0x1c4a: 0x0010, 0x1c4b: 0x0010,\n\t0x1c4c: 0x0010, 0x1c4d: 0x0010, 0x1c4e: 0x0010, 0x1c4f: 0x0010, 0x1c50: 0x0010, 0x1c51: 0x0010,\n\t0x1c52: 0x0010, 0x1c53: 0x0010, 0x1c54: 0x0010, 0x1c55: 0x0010, 0x1c56: 0x0010, 0x1c57: 0x0010,\n\t0x1c58: 0x0010, 0x1c59: 0x0010, 0x1c5a: 0x0010,\n\t0x1c63: 0x2000,\n\t0x1c64: 0x2000, 0x1c65: 0x0024, 0x1c66: 0x2000, 0x1c67: 0x2000, 0x1c68: 0x0024, 0x1c69: 0x2000,\n\t0x1c6a: 0x2000, 0x1c6c: 0x2000, 0x1c6d: 0x0024,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0x0200, 0x1c81: 0x0400, 0x1c82: 0x0400, 0x1c83: 0x0400, 0x1c84: 0x0400, 0x1c85: 0x0400,\n\t0x1c86: 0x0400, 0x1c87: 0x0400, 0x1c88: 0x0400, 0x1c89: 0x0400, 0x1c8a: 0x0400, 0x1c8b: 0x0400,\n\t0x1c8c: 0x0400, 0x1c8d: 0x0400, 0x1c8e: 0x0400, 0x1c8f: 0x0400, 0x1c90: 0x0400, 0x1c91: 0x0400,\n\t0x1c92: 0x0400, 0x1c93: 0x0400, 0x1c94: 0x0400, 0x1c95: 0x0400, 0x1c96: 0x0400, 0x1c97: 0x0400,\n\t0x1c98: 0x0400, 0x1c99: 0x0400, 0x1c9a: 0x0400, 0x1c9b: 0x0400, 0x1c9c: 0x0200, 0x1c9d: 0x0400,\n\t0x1c9e: 0x0400, 0x1c9f: 0x0400, 0x1ca0: 0x0400, 0x1ca1: 0x0400, 0x1ca2: 0x0400, 0x1ca3: 0x0400,\n\t0x1ca4: 0x0400, 0x1ca5: 0x0400, 0x1ca6: 0x0400, 0x1ca7: 0x0400, 0x1ca8: 0x0400, 0x1ca9: 0x0400,\n\t0x1caa: 0x0400, 0x1cab: 0x0400, 0x1cac: 0x0400, 0x1cad: 0x0400, 0x1cae: 0x0400, 0x1caf: 0x0400,\n\t0x1cb0: 0x0400, 0x1cb1: 0x0400, 0x1cb2: 0x0400, 0x1cb3: 0x0400, 0x1cb4: 0x0400, 0x1cb5: 0x0400,\n\t0x1cb6: 0x0400, 0x1cb7: 0x0400, 0x1cb8: 0x0200, 0x1cb9: 0x0400, 0x1cba: 0x0400, 0x1cbb: 0x0400,\n\t0x1cbc: 0x0400, 0x1cbd: 0x0400, 0x1cbe: 0x0400, 0x1cbf: 0x0400,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x0400, 0x1cc1: 0x0400, 0x1cc2: 0x0400, 0x1cc3: 0x0400, 0x1cc4: 0x0400, 0x1cc5: 0x0400,\n\t0x1cc6: 0x0400, 0x1cc7: 0x0400, 0x1cc8: 0x0400, 0x1cc9: 0x0400, 0x1cca: 0x0400, 0x1ccb: 0x0400,\n\t0x1ccc: 0x0400, 0x1ccd: 0x0400, 0x1cce: 0x0400, 0x1ccf: 0x0400, 0x1cd0: 0x0400, 0x1cd1: 0x0400,\n\t0x1cd2: 0x0400, 0x1cd3: 0x0400, 0x1cd4: 0x0200, 0x1cd5: 0x0400, 0x1cd6: 0x0400, 0x1cd7: 0x0400,\n\t0x1cd8: 0x0400, 0x1cd9: 0x0400, 0x1cda: 0x0400, 0x1cdb: 0x0400, 0x1cdc: 0x0400, 0x1cdd: 0x0400,\n\t0x1cde: 0x0400, 0x1cdf: 0x0400, 0x1ce0: 0x0400, 0x1ce1: 0x0400, 0x1ce2: 0x0400, 0x1ce3: 0x0400,\n\t0x1ce4: 0x0400, 0x1ce5: 0x0400, 0x1ce6: 0x0400, 0x1ce7: 0x0400, 0x1ce8: 0x0400, 0x1ce9: 0x0400,\n\t0x1cea: 0x0400, 0x1ceb: 0x0400, 0x1cec: 0x0400, 0x1ced: 0x0400, 0x1cee: 0x0400, 0x1cef: 0x0400,\n\t0x1cf0: 0x0200, 0x1cf1: 0x0400, 0x1cf2: 0x0400, 0x1cf3: 0x0400, 0x1cf4: 0x0400, 0x1cf5: 0x0400,\n\t0x1cf6: 0x0400, 0x1cf7: 0x0400, 0x1cf8: 0x0400, 0x1cf9: 0x0400, 0x1cfa: 0x0400, 0x1cfb: 0x0400,\n\t0x1cfc: 0x0400, 0x1cfd: 0x0400, 0x1cfe: 0x0400, 0x1cff: 0x0400,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0x0400, 0x1d01: 0x0400, 0x1d02: 0x0400, 0x1d03: 0x0400, 0x1d04: 0x0400, 0x1d05: 0x0400,\n\t0x1d06: 0x0400, 0x1d07: 0x0400, 0x1d08: 0x0400, 0x1d09: 0x0400, 0x1d0a: 0x0400, 0x1d0b: 0x0400,\n\t0x1d0c: 0x0200, 0x1d0d: 0x0400, 0x1d0e: 0x0400, 0x1d0f: 0x0400, 0x1d10: 0x0400, 0x1d11: 0x0400,\n\t0x1d12: 0x0400, 0x1d13: 0x0400, 0x1d14: 0x0400, 0x1d15: 0x0400, 0x1d16: 0x0400, 0x1d17: 0x0400,\n\t0x1d18: 0x0400, 0x1d19: 0x0400, 0x1d1a: 0x0400, 0x1d1b: 0x0400, 0x1d1c: 0x0400, 0x1d1d: 0x0400,\n\t0x1d1e: 0x0400, 0x1d1f: 0x0400, 0x1d20: 0x0400, 0x1d21: 0x0400, 0x1d22: 0x0400, 0x1d23: 0x0400,\n\t0x1d24: 0x0400, 0x1d25: 0x0400, 0x1d26: 0x0400, 0x1d27: 0x0400, 0x1d28: 0x0200, 0x1d29: 0x0400,\n\t0x1d2a: 0x0400, 0x1d2b: 0x0400, 0x1d2c: 0x0400, 0x1d2d: 0x0400, 0x1d2e: 0x0400, 0x1d2f: 0x0400,\n\t0x1d30: 0x0400, 0x1d31: 0x0400, 0x1d32: 0x0400, 0x1d33: 0x0400, 0x1d34: 0x0400, 0x1d35: 0x0400,\n\t0x1d36: 0x0400, 0x1d37: 0x0400, 0x1d38: 0x0400, 0x1d39: 0x0400, 0x1d3a: 0x0400, 0x1d3b: 0x0400,\n\t0x1d3c: 0x0400, 0x1d3d: 0x0400, 0x1d3e: 0x0400, 0x1d3f: 0x0400,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x0400, 0x1d41: 0x0400, 0x1d42: 0x0400, 0x1d43: 0x0400, 0x1d44: 0x0200, 0x1d45: 0x0400,\n\t0x1d46: 0x0400, 0x1d47: 0x0400, 0x1d48: 0x0400, 0x1d49: 0x0400, 0x1d4a: 0x0400, 0x1d4b: 0x0400,\n\t0x1d4c: 0x0400, 0x1d4d: 0x0400, 0x1d4e: 0x0400, 0x1d4f: 0x0400, 0x1d50: 0x0400, 0x1d51: 0x0400,\n\t0x1d52: 0x0400, 0x1d53: 0x0400, 0x1d54: 0x0400, 0x1d55: 0x0400, 0x1d56: 0x0400, 0x1d57: 0x0400,\n\t0x1d58: 0x0400, 0x1d59: 0x0400, 0x1d5a: 0x0400, 0x1d5b: 0x0400, 0x1d5c: 0x0400, 0x1d5d: 0x0400,\n\t0x1d5e: 0x0400, 0x1d5f: 0x0400, 0x1d60: 0x0200, 0x1d61: 0x0400, 0x1d62: 0x0400, 0x1d63: 0x0400,\n\t0x1d64: 0x0400, 0x1d65: 0x0400, 0x1d66: 0x0400, 0x1d67: 0x0400, 0x1d68: 0x0400, 0x1d69: 0x0400,\n\t0x1d6a: 0x0400, 0x1d6b: 0x0400, 0x1d6c: 0x0400, 0x1d6d: 0x0400, 0x1d6e: 0x0400, 0x1d6f: 0x0400,\n\t0x1d70: 0x0400, 0x1d71: 0x0400, 0x1d72: 0x0400, 0x1d73: 0x0400, 0x1d74: 0x0400, 0x1d75: 0x0400,\n\t0x1d76: 0x0400, 0x1d77: 0x0400, 0x1d78: 0x0400, 0x1d79: 0x0400, 0x1d7a: 0x0400, 0x1d7b: 0x0400,\n\t0x1d7c: 0x0200, 0x1d7d: 0x0400, 0x1d7e: 0x0400, 0x1d7f: 0x0400,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x0400, 0x1d81: 0x0400, 0x1d82: 0x0400, 0x1d83: 0x0400, 0x1d84: 0x0400, 0x1d85: 0x0400,\n\t0x1d86: 0x0400, 0x1d87: 0x0400, 0x1d88: 0x0400, 0x1d89: 0x0400, 0x1d8a: 0x0400, 0x1d8b: 0x0400,\n\t0x1d8c: 0x0400, 0x1d8d: 0x0400, 0x1d8e: 0x0400, 0x1d8f: 0x0400, 0x1d90: 0x0400, 0x1d91: 0x0400,\n\t0x1d92: 0x0400, 0x1d93: 0x0400, 0x1d94: 0x0400, 0x1d95: 0x0400, 0x1d96: 0x0400, 0x1d97: 0x0400,\n\t0x1d98: 0x0200, 0x1d99: 0x0400, 0x1d9a: 0x0400, 0x1d9b: 0x0400, 0x1d9c: 0x0400, 0x1d9d: 0x0400,\n\t0x1d9e: 0x0400, 0x1d9f: 0x0400, 0x1da0: 0x0400, 0x1da1: 0x0400, 0x1da2: 0x0400, 0x1da3: 0x0400,\n\t0x1da4: 0x0400, 0x1da5: 0x0400, 0x1da6: 0x0400, 0x1da7: 0x0400, 0x1da8: 0x0400, 0x1da9: 0x0400,\n\t0x1daa: 0x0400, 0x1dab: 0x0400, 0x1dac: 0x0400, 0x1dad: 0x0400, 0x1dae: 0x0400, 0x1daf: 0x0400,\n\t0x1db0: 0x0400, 0x1db1: 0x0400, 0x1db2: 0x0400, 0x1db3: 0x0400, 0x1db4: 0x0200, 0x1db5: 0x0400,\n\t0x1db6: 0x0400, 0x1db7: 0x0400, 0x1db8: 0x0400, 0x1db9: 0x0400, 0x1dba: 0x0400, 0x1dbb: 0x0400,\n\t0x1dbc: 0x0400, 0x1dbd: 0x0400, 0x1dbe: 0x0400, 0x1dbf: 0x0400,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0x0400, 0x1dc1: 0x0400, 0x1dc2: 0x0400, 0x1dc3: 0x0400, 0x1dc4: 0x0400, 0x1dc5: 0x0400,\n\t0x1dc6: 0x0400, 0x1dc7: 0x0400, 0x1dc8: 0x0400, 0x1dc9: 0x0400, 0x1dca: 0x0400, 0x1dcb: 0x0400,\n\t0x1dcc: 0x0400, 0x1dcd: 0x0400, 0x1dce: 0x0400, 0x1dcf: 0x0400, 0x1dd0: 0x0200, 0x1dd1: 0x0400,\n\t0x1dd2: 0x0400, 0x1dd3: 0x0400, 0x1dd4: 0x0400, 0x1dd5: 0x0400, 0x1dd6: 0x0400, 0x1dd7: 0x0400,\n\t0x1dd8: 0x0400, 0x1dd9: 0x0400, 0x1dda: 0x0400, 0x1ddb: 0x0400, 0x1ddc: 0x0400, 0x1ddd: 0x0400,\n\t0x1dde: 0x0400, 0x1ddf: 0x0400, 0x1de0: 0x0400, 0x1de1: 0x0400, 0x1de2: 0x0400, 0x1de3: 0x0400,\n\t0x1de4: 0x0400, 0x1de5: 0x0400, 0x1de6: 0x0400, 0x1de7: 0x0400, 0x1de8: 0x0400, 0x1de9: 0x0400,\n\t0x1dea: 0x0400, 0x1deb: 0x0400, 0x1dec: 0x0200, 0x1ded: 0x0400, 0x1dee: 0x0400, 0x1def: 0x0400,\n\t0x1df0: 0x0400, 0x1df1: 0x0400, 0x1df2: 0x0400, 0x1df3: 0x0400, 0x1df4: 0x0400, 0x1df5: 0x0400,\n\t0x1df6: 0x0400, 0x1df7: 0x0400, 0x1df8: 0x0400, 0x1df9: 0x0400, 0x1dfa: 0x0400, 0x1dfb: 0x0400,\n\t0x1dfc: 0x0400, 0x1dfd: 0x0400, 0x1dfe: 0x0400, 0x1dff: 0x0400,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0x0400, 0x1e01: 0x0400, 0x1e02: 0x0400, 0x1e03: 0x0400, 0x1e04: 0x0400, 0x1e05: 0x0400,\n\t0x1e06: 0x0400, 0x1e07: 0x0400, 0x1e08: 0x0200, 0x1e09: 0x0400, 0x1e0a: 0x0400, 0x1e0b: 0x0400,\n\t0x1e0c: 0x0400, 0x1e0d: 0x0400, 0x1e0e: 0x0400, 0x1e0f: 0x0400, 0x1e10: 0x0400, 0x1e11: 0x0400,\n\t0x1e12: 0x0400, 0x1e13: 0x0400, 0x1e14: 0x0400, 0x1e15: 0x0400, 0x1e16: 0x0400, 0x1e17: 0x0400,\n\t0x1e18: 0x0400, 0x1e19: 0x0400, 0x1e1a: 0x0400, 0x1e1b: 0x0400, 0x1e1c: 0x0400, 0x1e1d: 0x0400,\n\t0x1e1e: 0x0400, 0x1e1f: 0x0400, 0x1e20: 0x0400, 0x1e21: 0x0400, 0x1e22: 0x0400, 0x1e23: 0x0400,\n\t0x1e24: 0x0200, 0x1e25: 0x0400, 0x1e26: 0x0400, 0x1e27: 0x0400, 0x1e28: 0x0400, 0x1e29: 0x0400,\n\t0x1e2a: 0x0400, 0x1e2b: 0x0400, 0x1e2c: 0x0400, 0x1e2d: 0x0400, 0x1e2e: 0x0400, 0x1e2f: 0x0400,\n\t0x1e30: 0x0400, 0x1e31: 0x0400, 0x1e32: 0x0400, 0x1e33: 0x0400, 0x1e34: 0x0400, 0x1e35: 0x0400,\n\t0x1e36: 0x0400, 0x1e37: 0x0400, 0x1e38: 0x0400, 0x1e39: 0x0400, 0x1e3a: 0x0400, 0x1e3b: 0x0400,\n\t0x1e3c: 0x0400, 0x1e3d: 0x0400, 0x1e3e: 0x0400, 0x1e3f: 0x0400,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0x0400, 0x1e41: 0x0400, 0x1e42: 0x0400, 0x1e43: 0x0400, 0x1e44: 0x0400, 0x1e45: 0x0400,\n\t0x1e46: 0x0400, 0x1e47: 0x0400, 0x1e48: 0x0200, 0x1e49: 0x0400, 0x1e4a: 0x0400, 0x1e4b: 0x0400,\n\t0x1e4c: 0x0400, 0x1e4d: 0x0400, 0x1e4e: 0x0400, 0x1e4f: 0x0400, 0x1e50: 0x0400, 0x1e51: 0x0400,\n\t0x1e52: 0x0400, 0x1e53: 0x0400, 0x1e54: 0x0400, 0x1e55: 0x0400, 0x1e56: 0x0400, 0x1e57: 0x0400,\n\t0x1e58: 0x0400, 0x1e59: 0x0400, 0x1e5a: 0x0400, 0x1e5b: 0x0400, 0x1e5c: 0x0400, 0x1e5d: 0x0400,\n\t0x1e5e: 0x0400, 0x1e5f: 0x0400, 0x1e60: 0x0400, 0x1e61: 0x0400, 0x1e62: 0x0400, 0x1e63: 0x0400,\n\t0x1e70: 0x8000, 0x1e71: 0x8000, 0x1e72: 0x8000, 0x1e73: 0x8000, 0x1e74: 0x8000, 0x1e75: 0x8000,\n\t0x1e76: 0x8000, 0x1e77: 0x8000, 0x1e78: 0x8000, 0x1e79: 0x8000, 0x1e7a: 0x8000, 0x1e7b: 0x8000,\n\t0x1e7c: 0x8000, 0x1e7d: 0x8000, 0x1e7e: 0x8000, 0x1e7f: 0x8000,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0x8000, 0x1e81: 0x8000, 0x1e82: 0x8000, 0x1e83: 0x8000, 0x1e84: 0x8000, 0x1e85: 0x8000,\n\t0x1e86: 0x8000, 0x1e8b: 0x4000,\n\t0x1e8c: 0x4000, 0x1e8d: 0x4000, 0x1e8e: 0x4000, 0x1e8f: 0x4000, 0x1e90: 0x4000, 0x1e91: 0x4000,\n\t0x1e92: 0x4000, 0x1e93: 0x4000, 0x1e94: 0x4000, 0x1e95: 0x4000, 0x1e96: 0x4000, 0x1e97: 0x4000,\n\t0x1e98: 0x4000, 0x1e99: 0x4000, 0x1e9a: 0x4000, 0x1e9b: 0x4000, 0x1e9c: 0x4000, 0x1e9d: 0x4000,\n\t0x1e9e: 0x4000, 0x1e9f: 0x4000, 0x1ea0: 0x4000, 0x1ea1: 0x4000, 0x1ea2: 0x4000, 0x1ea3: 0x4000,\n\t0x1ea4: 0x4000, 0x1ea5: 0x4000, 0x1ea6: 0x4000, 0x1ea7: 0x4000, 0x1ea8: 0x4000, 0x1ea9: 0x4000,\n\t0x1eaa: 0x4000, 0x1eab: 0x4000, 0x1eac: 0x4000, 0x1ead: 0x4000, 0x1eae: 0x4000, 0x1eaf: 0x4000,\n\t0x1eb0: 0x4000, 0x1eb1: 0x4000, 0x1eb2: 0x4000, 0x1eb3: 0x4000, 0x1eb4: 0x4000, 0x1eb5: 0x4000,\n\t0x1eb6: 0x4000, 0x1eb7: 0x4000, 0x1eb8: 0x4000, 0x1eb9: 0x4000, 0x1eba: 0x4000, 0x1ebb: 0x4000,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ede: 0x0024,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0x0024, 0x1f01: 0x0024, 0x1f02: 0x0024, 0x1f03: 0x0024, 0x1f04: 0x0024, 0x1f05: 0x0024,\n\t0x1f06: 0x0024, 0x1f07: 0x0024, 0x1f08: 0x0024, 0x1f09: 0x0024, 0x1f0a: 0x0024, 0x1f0b: 0x0024,\n\t0x1f0c: 0x0024, 0x1f0d: 0x0024, 0x1f0e: 0x0024, 0x1f0f: 0x0024,\n\t0x1f20: 0x0024, 0x1f21: 0x0024, 0x1f22: 0x0024, 0x1f23: 0x0024,\n\t0x1f24: 0x0024, 0x1f25: 0x0024, 0x1f26: 0x0024, 0x1f27: 0x0024, 0x1f28: 0x0024, 0x1f29: 0x0024,\n\t0x1f2a: 0x0024, 0x1f2b: 0x0024, 0x1f2c: 0x0024, 0x1f2d: 0x0024, 0x1f2e: 0x0024, 0x1f2f: 0x0024,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f7f: 0x0002,\n\t// Block 0x7e, offset 0x1f80\n\t0x1fb0: 0x0002, 0x1fb1: 0x0002, 0x1fb2: 0x0002, 0x1fb3: 0x0002, 0x1fb4: 0x0002, 0x1fb5: 0x0002,\n\t0x1fb6: 0x0002, 0x1fb7: 0x0002, 0x1fb8: 0x0002, 0x1fb9: 0x0002, 0x1fba: 0x0002, 0x1fbb: 0x0002,\n\t// Block 0x7f, offset 0x1fc0\n\t0x1ffd: 0x0024,\n\t// Block 0x80, offset 0x2000\n\t0x2020: 0x0024,\n\t// Block 0x81, offset 0x2040\n\t0x2076: 0x0024, 0x2077: 0x0024, 0x2078: 0x0024, 0x2079: 0x0024, 0x207a: 0x0024,\n\t// Block 0x82, offset 0x2080\n\t0x2080: 0x0010, 0x2081: 0x0024, 0x2082: 0x0024, 0x2083: 0x0024, 0x2085: 0x0024,\n\t0x2086: 0x0024,\n\t0x208c: 0x0024, 0x208d: 0x0024, 0x208e: 0x0024, 0x208f: 0x0024, 0x2090: 0x0010, 0x2091: 0x0010,\n\t0x2092: 0x0010, 0x2093: 0x0010, 0x2095: 0x0010, 0x2096: 0x0010, 0x2097: 0x0010,\n\t0x2099: 0x0010, 0x209a: 0x0010, 0x209b: 0x0010, 0x209c: 0x0010, 0x209d: 0x0010,\n\t0x209e: 0x0010, 0x209f: 0x0010, 0x20a0: 0x0010, 0x20a1: 0x0010, 0x20a2: 0x0010, 0x20a3: 0x0010,\n\t0x20a4: 0x0010, 0x20a5: 0x0010, 0x20a6: 0x0010, 0x20a7: 0x0010, 0x20a8: 0x0010, 0x20a9: 0x0010,\n\t0x20aa: 0x0010, 0x20ab: 0x0010, 0x20ac: 0x0010, 0x20ad: 0x0010, 0x20ae: 0x0010, 0x20af: 0x0010,\n\t0x20b0: 0x0010, 0x20b1: 0x0010, 0x20b2: 0x0010, 0x20b3: 0x0010, 0x20b4: 0x0010, 0x20b5: 0x0010,\n\t0x20b8: 0x0024, 0x20b9: 0x0024, 0x20ba: 0x0024,\n\t0x20bf: 0x0044,\n\t// Block 0x83, offset 0x20c0\n\t0x20e5: 0x0024, 0x20e6: 0x0024,\n\t// Block 0x84, offset 0x2100\n\t0x2124: 0x0024, 0x2125: 0x0024, 0x2126: 0x0024, 0x2127: 0x0024,\n\t// Block 0x85, offset 0x2140\n\t0x2169: 0x0024,\n\t0x216a: 0x0024, 0x216b: 0x0024, 0x216c: 0x0024, 0x216d: 0x0024,\n\t// Block 0x86, offset 0x2180\n\t0x21ab: 0x0024, 0x21ac: 0x0024,\n\t// Block 0x87, offset 0x21c0\n\t0x21fa: 0x0024, 0x21fb: 0x0024,\n\t0x21fc: 0x0024, 0x21fd: 0x0024, 0x21fe: 0x0024, 0x21ff: 0x0024,\n\t// Block 0x88, offset 0x2200\n\t0x2206: 0x0024, 0x2207: 0x0024, 0x2208: 0x0024, 0x2209: 0x0024, 0x220a: 0x0024, 0x220b: 0x0024,\n\t0x220c: 0x0024, 0x220d: 0x0024, 0x220e: 0x0024, 0x220f: 0x0024, 0x2210: 0x0024,\n\t// Block 0x89, offset 0x2240\n\t0x2242: 0x0024, 0x2243: 0x0024, 0x2244: 0x0024, 0x2245: 0x0024,\n\t// Block 0x8a, offset 0x2280\n\t0x2280: 0x2000, 0x2281: 0x0024, 0x2282: 0x2000,\n\t0x22b8: 0x0024, 0x22b9: 0x0024, 0x22ba: 0x0024, 0x22bb: 0x0024,\n\t0x22bc: 0x0024, 0x22bd: 0x0024, 0x22be: 0x0024, 0x22bf: 0x0024,\n\t// Block 0x8b, offset 0x22c0\n\t0x22c0: 0x0024, 0x22c1: 0x0024, 0x22c2: 0x0024, 0x22c3: 0x0024, 0x22c4: 0x0024, 0x22c5: 0x0024,\n\t0x22c6: 0x0024,\n\t0x22f0: 0x0024, 0x22f3: 0x0024, 0x22f4: 0x0024,\n\t0x22ff: 0x0024,\n\t// Block 0x8c, offset 0x2300\n\t0x2300: 0x0024, 0x2301: 0x0024, 0x2302: 0x2000,\n\t0x2330: 0x2000, 0x2331: 0x2000, 0x2332: 0x2000, 0x2333: 0x0024, 0x2334: 0x0024, 0x2335: 0x0024,\n\t0x2336: 0x0024, 0x2337: 0x2000, 0x2338: 0x2000, 0x2339: 0x0024, 0x233a: 0x0024,\n\t0x233d: 0x0800,\n\t// Block 0x8d, offset 0x2340\n\t0x2342: 0x0024,\n\t0x234d: 0x0800,\n\t// Block 0x8e, offset 0x2380\n\t0x2380: 0x0024, 0x2381: 0x0024, 0x2382: 0x0024, 0x2383: 0x0010, 0x2384: 0x0010, 0x2385: 0x0010,\n\t0x2386: 0x0010, 0x2387: 0x0010, 0x2388: 0x0010, 0x2389: 0x0010, 0x238a: 0x0010, 0x238b: 0x0010,\n\t0x238c: 0x0010, 0x238d: 0x0010, 0x238e: 0x0010, 0x238f: 0x0010, 0x2390: 0x0010, 0x2391: 0x0010,\n\t0x2392: 0x0010, 0x2393: 0x0010, 0x2394: 0x0010, 0x2395: 0x0010, 0x2396: 0x0010, 0x2397: 0x0010,\n\t0x2398: 0x0010, 0x2399: 0x0010, 0x239a: 0x0010, 0x239b: 0x0010, 0x239c: 0x0010, 0x239d: 0x0010,\n\t0x239e: 0x0010, 0x239f: 0x0010, 0x23a0: 0x0010, 0x23a1: 0x0010, 0x23a2: 0x0010, 0x23a3: 0x0010,\n\t0x23a4: 0x0010, 0x23a5: 0x0010, 0x23a6: 0x0010, 0x23a7: 0x0024, 0x23a8: 0x0024, 0x23a9: 0x0024,\n\t0x23aa: 0x0024, 0x23ab: 0x0024, 0x23ac: 0x2000, 0x23ad: 0x0024, 0x23ae: 0x0024, 0x23af: 0x0024,\n\t0x23b0: 0x0024, 0x23b1: 0x0024, 0x23b2: 0x0024, 0x23b3: 0x0044, 0x23b4: 0x0024,\n\t// Block 0x8f, offset 0x23c0\n\t0x23c4: 0x0010, 0x23c5: 0x2000,\n\t0x23c6: 0x2000, 0x23c7: 0x0010,\n\t0x23f3: 0x0024,\n\t// Block 0x90, offset 0x2400\n\t0x2400: 0x0024, 0x2401: 0x0024, 0x2402: 0x2000,\n\t0x2433: 0x2000, 0x2434: 0x2000, 0x2435: 0x2000,\n\t0x2436: 0x0024, 0x2437: 0x0024, 0x2438: 0x0024, 0x2439: 0x0024, 0x243a: 0x0024, 0x243b: 0x0024,\n\t0x243c: 0x0024, 0x243d: 0x0024, 0x243e: 0x0024, 0x243f: 0x2000,\n\t// Block 0x91, offset 0x2440\n\t0x2440: 0x0024, 0x2442: 0x0800, 0x2443: 0x0800,\n\t0x2449: 0x0024, 0x244a: 0x0024, 0x244b: 0x0024,\n\t0x244c: 0x0024, 0x244e: 0x2000, 0x244f: 0x0024,\n\t// Block 0x92, offset 0x2480\n\t0x24ac: 0x2000, 0x24ad: 0x2000, 0x24ae: 0x2000, 0x24af: 0x0024,\n\t0x24b0: 0x0024, 0x24b1: 0x0024, 0x24b2: 0x2000, 0x24b3: 0x2000, 0x24b4: 0x0024, 0x24b5: 0x0024,\n\t0x24b6: 0x0024, 0x24b7: 0x0024,\n\t0x24be: 0x0024,\n\t// Block 0x93, offset 0x24c0\n\t0x24c1: 0x0024,\n\t// Block 0x94, offset 0x2500\n\t0x251f: 0x0024, 0x2520: 0x2000, 0x2521: 0x2000, 0x2522: 0x2000, 0x2523: 0x0024,\n\t0x2524: 0x0024, 0x2525: 0x0024, 0x2526: 0x0024, 0x2527: 0x0024, 0x2528: 0x0024, 0x2529: 0x0024,\n\t0x252a: 0x0024,\n\t// Block 0x95, offset 0x2540\n\t0x2540: 0x0024, 0x2541: 0x0024, 0x2542: 0x2000, 0x2543: 0x2000,\n\t0x257b: 0x0024,\n\t0x257c: 0x0024, 0x257e: 0x0024, 0x257f: 0x2000,\n\t// Block 0x96, offset 0x2580\n\t0x2580: 0x0024, 0x2581: 0x2000, 0x2582: 0x2000, 0x2583: 0x2000, 0x2584: 0x2000,\n\t0x2587: 0x2000, 0x2588: 0x2000, 0x258b: 0x2000,\n\t0x258c: 0x2000, 0x258d: 0x0024,\n\t0x2597: 0x0024,\n\t0x25a2: 0x2000, 0x25a3: 0x2000,\n\t0x25a6: 0x0024, 0x25a7: 0x0024, 0x25a8: 0x0024, 0x25a9: 0x0024,\n\t0x25aa: 0x0024, 0x25ab: 0x0024, 0x25ac: 0x0024,\n\t0x25b0: 0x0024, 0x25b1: 0x0024, 0x25b2: 0x0024, 0x25b3: 0x0024, 0x25b4: 0x0024,\n\t// Block 0x97, offset 0x25c0\n\t0x25c0: 0x0010, 0x25c1: 0x0010, 0x25c2: 0x0010, 0x25c3: 0x0010, 0x25c4: 0x0010, 0x25c5: 0x0010,\n\t0x25c6: 0x0010, 0x25c7: 0x0010, 0x25c8: 0x0010, 0x25c9: 0x0010, 0x25cb: 0x0010,\n\t0x25ce: 0x0010, 0x25d0: 0x0010, 0x25d1: 0x0010,\n\t0x25d2: 0x0010, 0x25d3: 0x0010, 0x25d4: 0x0010, 0x25d5: 0x0010, 0x25d6: 0x0010, 0x25d7: 0x0010,\n\t0x25d8: 0x0010, 0x25d9: 0x0010, 0x25da: 0x0010, 0x25db: 0x0010, 0x25dc: 0x0010, 0x25dd: 0x0010,\n\t0x25de: 0x0010, 0x25df: 0x0010, 0x25e0: 0x0010, 0x25e1: 0x0010, 0x25e2: 0x0010, 0x25e3: 0x0010,\n\t0x25e4: 0x0010, 0x25e5: 0x0010, 0x25e6: 0x0010, 0x25e7: 0x0010, 0x25e8: 0x0010, 0x25e9: 0x0010,\n\t0x25ea: 0x0010, 0x25eb: 0x0010, 0x25ec: 0x0010, 0x25ed: 0x0010, 0x25ee: 0x0010, 0x25ef: 0x0010,\n\t0x25f0: 0x0010, 0x25f1: 0x0010, 0x25f2: 0x0010, 0x25f3: 0x0010, 0x25f4: 0x0010, 0x25f5: 0x0010,\n\t0x25f8: 0x0024, 0x25f9: 0x2000, 0x25fa: 0x2000, 0x25fb: 0x0024,\n\t0x25fc: 0x0024, 0x25fd: 0x0024, 0x25fe: 0x0024, 0x25ff: 0x0024,\n\t// Block 0x98, offset 0x2600\n\t0x2600: 0x0024, 0x2602: 0x0024, 0x2605: 0x0024,\n\t0x2607: 0x0024, 0x2608: 0x0024, 0x2609: 0x0024, 0x260a: 0x2000,\n\t0x260c: 0x2000, 0x260d: 0x2000, 0x260e: 0x0024, 0x260f: 0x0024, 0x2610: 0x0044, 0x2611: 0x0800,\n\t0x2612: 0x0024,\n\t0x2621: 0x0024, 0x2622: 0x0024,\n\t// Block 0x99, offset 0x2640\n\t0x2675: 0x2000,\n\t0x2676: 0x2000, 0x2677: 0x2000, 0x2678: 0x0024, 0x2679: 0x0024, 0x267a: 0x0024, 0x267b: 0x0024,\n\t0x267c: 0x0024, 0x267d: 0x0024, 0x267e: 0x0024, 0x267f: 0x0024,\n\t// Block 0x9a, offset 0x2680\n\t0x2680: 0x2000, 0x2681: 0x2000, 0x2682: 0x0024, 0x2683: 0x0024, 0x2684: 0x0024, 0x2685: 0x2000,\n\t0x2686: 0x0024,\n\t0x269e: 0x0024,\n\t// Block 0x9b, offset 0x26c0\n\t0x26f0: 0x0024, 0x26f1: 0x2000, 0x26f2: 0x2000, 0x26f3: 0x0024, 0x26f4: 0x0024, 0x26f5: 0x0024,\n\t0x26f6: 0x0024, 0x26f7: 0x0024, 0x26f8: 0x0024, 0x26f9: 0x2000, 0x26fa: 0x0024, 0x26fb: 0x2000,\n\t0x26fc: 0x2000, 0x26fd: 0x0024, 0x26fe: 0x2000, 0x26ff: 0x0024,\n\t// Block 0x9c, offset 0x2700\n\t0x2700: 0x0024, 0x2701: 0x2000, 0x2702: 0x0024, 0x2703: 0x0024,\n\t// Block 0x9d, offset 0x2740\n\t0x276f: 0x0024,\n\t0x2770: 0x2000, 0x2771: 0x2000, 0x2772: 0x0024, 0x2773: 0x0024, 0x2774: 0x0024, 0x2775: 0x0024,\n\t0x2778: 0x2000, 0x2779: 0x2000, 0x277a: 0x2000, 0x277b: 0x2000,\n\t0x277c: 0x0024, 0x277d: 0x0024, 0x277e: 0x2000, 0x277f: 0x0024,\n\t// Block 0x9e, offset 0x2780\n\t0x2780: 0x0024,\n\t0x279c: 0x0024, 0x279d: 0x0024,\n\t// Block 0x9f, offset 0x27c0\n\t0x27f0: 0x2000, 0x27f1: 0x2000, 0x27f2: 0x2000, 0x27f3: 0x0024, 0x27f4: 0x0024, 0x27f5: 0x0024,\n\t0x27f6: 0x0024, 0x27f7: 0x0024, 0x27f8: 0x0024, 0x27f9: 0x0024, 0x27fa: 0x0024, 0x27fb: 0x2000,\n\t0x27fc: 0x2000, 0x27fd: 0x0024, 0x27fe: 0x2000, 0x27ff: 0x0024,\n\t// Block 0xa0, offset 0x2800\n\t0x2800: 0x0024,\n\t// Block 0xa1, offset 0x2840\n\t0x286b: 0x0024, 0x286c: 0x2000, 0x286d: 0x0024, 0x286e: 0x2000, 0x286f: 0x2000,\n\t0x2870: 0x0024, 0x2871: 0x0024, 0x2872: 0x0024, 0x2873: 0x0024, 0x2874: 0x0024, 0x2875: 0x0024,\n\t0x2876: 0x0024, 0x2877: 0x0024,\n\t// Block 0xa2, offset 0x2880\n\t0x289d: 0x0024,\n\t0x289e: 0x2000, 0x289f: 0x0024, 0x28a2: 0x0024, 0x28a3: 0x0024,\n\t0x28a4: 0x0024, 0x28a5: 0x0024, 0x28a6: 0x2000, 0x28a7: 0x0024, 0x28a8: 0x0024, 0x28a9: 0x0024,\n\t0x28aa: 0x0024, 0x28ab: 0x0024,\n\t// Block 0xa3, offset 0x28c0\n\t0x28ec: 0x2000, 0x28ed: 0x2000, 0x28ee: 0x2000, 0x28ef: 0x0024,\n\t0x28f0: 0x0024, 0x28f1: 0x0024, 0x28f2: 0x0024, 0x28f3: 0x0024, 0x28f4: 0x0024, 0x28f5: 0x0024,\n\t0x28f6: 0x0024, 0x28f7: 0x0024, 0x28f8: 0x2000, 0x28f9: 0x0024, 0x28fa: 0x0024,\n\t// Block 0xa4, offset 0x2900\n\t0x2900: 0x0010, 0x2901: 0x0010, 0x2902: 0x0010, 0x2903: 0x0010, 0x2904: 0x0010, 0x2905: 0x0010,\n\t0x2906: 0x0010, 0x2909: 0x0010,\n\t0x290c: 0x0010, 0x290d: 0x0010, 0x290e: 0x0010, 0x290f: 0x0010, 0x2910: 0x0010, 0x2911: 0x0010,\n\t0x2912: 0x0010, 0x2913: 0x0010, 0x2915: 0x0010, 0x2916: 0x0010,\n\t0x2918: 0x0010, 0x2919: 0x0010, 0x291a: 0x0010, 0x291b: 0x0010, 0x291c: 0x0010, 0x291d: 0x0010,\n\t0x291e: 0x0010, 0x291f: 0x0010, 0x2920: 0x0010, 0x2921: 0x0010, 0x2922: 0x0010, 0x2923: 0x0010,\n\t0x2924: 0x0010, 0x2925: 0x0010, 0x2926: 0x0010, 0x2927: 0x0010, 0x2928: 0x0010, 0x2929: 0x0010,\n\t0x292a: 0x0010, 0x292b: 0x0010, 0x292c: 0x0010, 0x292d: 0x0010, 0x292e: 0x0010, 0x292f: 0x0010,\n\t0x2930: 0x0024, 0x2931: 0x2000, 0x2932: 0x2000, 0x2933: 0x2000, 0x2934: 0x2000, 0x2935: 0x2000,\n\t0x2937: 0x2000, 0x2938: 0x2000, 0x293b: 0x0024,\n\t0x293c: 0x0024, 0x293d: 0x0024, 0x293e: 0x0044, 0x293f: 0x0800,\n\t// Block 0xa5, offset 0x2940\n\t0x2940: 0x2000, 0x2941: 0x0800, 0x2942: 0x2000, 0x2943: 0x0024,\n\t// Block 0xa6, offset 0x2980\n\t0x2991: 0x2000,\n\t0x2992: 0x2000, 0x2993: 0x2000, 0x2994: 0x0024, 0x2995: 0x0024, 0x2996: 0x0024, 0x2997: 0x0024,\n\t0x299a: 0x0024, 0x299b: 0x0024, 0x299c: 0x2000, 0x299d: 0x2000,\n\t0x299e: 0x2000, 0x299f: 0x2000, 0x29a0: 0x0024,\n\t0x29a4: 0x2000,\n\t// Block 0xa7, offset 0x29c0\n\t0x29c0: 0x0010, 0x29c1: 0x0024, 0x29c2: 0x0024, 0x29c3: 0x0024, 0x29c4: 0x0024, 0x29c5: 0x0024,\n\t0x29c6: 0x0024, 0x29c7: 0x0024, 0x29c8: 0x0024, 0x29c9: 0x0024, 0x29ca: 0x0024, 0x29cb: 0x0010,\n\t0x29cc: 0x0010, 0x29cd: 0x0010, 0x29ce: 0x0010, 0x29cf: 0x0010, 0x29d0: 0x0010, 0x29d1: 0x0010,\n\t0x29d2: 0x0010, 0x29d3: 0x0010, 0x29d4: 0x0010, 0x29d5: 0x0010, 0x29d6: 0x0010, 0x29d7: 0x0010,\n\t0x29d8: 0x0010, 0x29d9: 0x0010, 0x29da: 0x0010, 0x29db: 0x0010, 0x29dc: 0x0010, 0x29dd: 0x0010,\n\t0x29de: 0x0010, 0x29df: 0x0010, 0x29e0: 0x0010, 0x29e1: 0x0010, 0x29e2: 0x0010, 0x29e3: 0x0010,\n\t0x29e4: 0x0010, 0x29e5: 0x0010, 0x29e6: 0x0010, 0x29e7: 0x0010, 0x29e8: 0x0010, 0x29e9: 0x0010,\n\t0x29ea: 0x0010, 0x29eb: 0x0010, 0x29ec: 0x0010, 0x29ed: 0x0010, 0x29ee: 0x0010, 0x29ef: 0x0010,\n\t0x29f0: 0x0010, 0x29f1: 0x0010, 0x29f2: 0x0010, 0x29f3: 0x0024, 0x29f4: 0x0024, 0x29f5: 0x0024,\n\t0x29f6: 0x0024, 0x29f7: 0x0024, 0x29f8: 0x0024, 0x29f9: 0x2000, 0x29fb: 0x0024,\n\t0x29fc: 0x0024, 0x29fd: 0x0024, 0x29fe: 0x0024,\n\t// Block 0xa8, offset 0x2a00\n\t0x2a07: 0x0044,\n\t0x2a10: 0x0010, 0x2a11: 0x0024,\n\t0x2a12: 0x0024, 0x2a13: 0x0024, 0x2a14: 0x0024, 0x2a15: 0x0024, 0x2a16: 0x0024, 0x2a17: 0x2000,\n\t0x2a18: 0x2000, 0x2a19: 0x0024, 0x2a1a: 0x0024, 0x2a1b: 0x0024, 0x2a1c: 0x0010, 0x2a1d: 0x0010,\n\t0x2a1e: 0x0010, 0x2a1f: 0x0010, 0x2a20: 0x0010, 0x2a21: 0x0010, 0x2a22: 0x0010, 0x2a23: 0x0010,\n\t0x2a24: 0x0010, 0x2a25: 0x0010, 0x2a26: 0x0010, 0x2a27: 0x0010, 0x2a28: 0x0010, 0x2a29: 0x0010,\n\t0x2a2a: 0x0010, 0x2a2b: 0x0010, 0x2a2c: 0x0010, 0x2a2d: 0x0010, 0x2a2e: 0x0010, 0x2a2f: 0x0010,\n\t0x2a30: 0x0010, 0x2a31: 0x0010, 0x2a32: 0x0010, 0x2a33: 0x0010, 0x2a34: 0x0010, 0x2a35: 0x0010,\n\t0x2a36: 0x0010, 0x2a37: 0x0010, 0x2a38: 0x0010, 0x2a39: 0x0010, 0x2a3a: 0x0010, 0x2a3b: 0x0010,\n\t0x2a3c: 0x0010, 0x2a3d: 0x0010, 0x2a3e: 0x0010, 0x2a3f: 0x0010,\n\t// Block 0xa9, offset 0x2a40\n\t0x2a40: 0x0010, 0x2a41: 0x0010, 0x2a42: 0x0010, 0x2a43: 0x0010, 0x2a44: 0x0800, 0x2a45: 0x0800,\n\t0x2a46: 0x0800, 0x2a47: 0x0800, 0x2a48: 0x0800, 0x2a49: 0x0800, 0x2a4a: 0x0024, 0x2a4b: 0x0024,\n\t0x2a4c: 0x0024, 0x2a4d: 0x0024, 0x2a4e: 0x0024, 0x2a4f: 0x0024, 0x2a50: 0x0024, 0x2a51: 0x0024,\n\t0x2a52: 0x0024, 0x2a53: 0x0024, 0x2a54: 0x0024, 0x2a55: 0x0024, 0x2a56: 0x0024, 0x2a57: 0x2000,\n\t0x2a58: 0x0024, 0x2a59: 0x0044,\n\t// Block 0xaa, offset 0x2a80\n\t0x2aa0: 0x0024, 0x2aa1: 0x2000, 0x2aa2: 0x0024, 0x2aa3: 0x0024,\n\t0x2aa4: 0x0024, 0x2aa5: 0x2000, 0x2aa6: 0x0024, 0x2aa7: 0x2000,\n\t// Block 0xab, offset 0x2ac0\n\t0x2aef: 0x2000,\n\t0x2af0: 0x0024, 0x2af1: 0x0024, 0x2af2: 0x0024, 0x2af3: 0x0024, 0x2af4: 0x0024, 0x2af5: 0x0024,\n\t0x2af6: 0x0024, 0x2af8: 0x0024, 0x2af9: 0x0024, 0x2afa: 0x0024, 0x2afb: 0x0024,\n\t0x2afc: 0x0024, 0x2afd: 0x0024, 0x2afe: 0x2000, 0x2aff: 0x0024,\n\t// Block 0xac, offset 0x2b00\n\t0x2b12: 0x0024, 0x2b13: 0x0024, 0x2b14: 0x0024, 0x2b15: 0x0024, 0x2b16: 0x0024, 0x2b17: 0x0024,\n\t0x2b18: 0x0024, 0x2b19: 0x0024, 0x2b1a: 0x0024, 0x2b1b: 0x0024, 0x2b1c: 0x0024, 0x2b1d: 0x0024,\n\t0x2b1e: 0x0024, 0x2b1f: 0x0024, 0x2b20: 0x0024, 0x2b21: 0x0024, 0x2b22: 0x0024, 0x2b23: 0x0024,\n\t0x2b24: 0x0024, 0x2b25: 0x0024, 0x2b26: 0x0024, 0x2b27: 0x0024, 0x2b29: 0x2000,\n\t0x2b2a: 0x0024, 0x2b2b: 0x0024, 0x2b2c: 0x0024, 0x2b2d: 0x0024, 0x2b2e: 0x0024, 0x2b2f: 0x0024,\n\t0x2b30: 0x0024, 0x2b31: 0x2000, 0x2b32: 0x0024, 0x2b33: 0x0024, 0x2b34: 0x2000, 0x2b35: 0x0024,\n\t0x2b36: 0x0024,\n\t// Block 0xad, offset 0x2b40\n\t0x2b71: 0x0024, 0x2b72: 0x0024, 0x2b73: 0x0024, 0x2b74: 0x0024, 0x2b75: 0x0024,\n\t0x2b76: 0x0024, 0x2b7a: 0x0024,\n\t0x2b7c: 0x0024, 0x2b7d: 0x0024, 0x2b7f: 0x0024,\n\t// Block 0xae, offset 0x2b80\n\t0x2b80: 0x0024, 0x2b81: 0x0024, 0x2b82: 0x0024, 0x2b83: 0x0024, 0x2b84: 0x0024, 0x2b85: 0x0024,\n\t0x2b86: 0x0800, 0x2b87: 0x0024,\n\t// Block 0xaf, offset 0x2bc0\n\t0x2bca: 0x2000, 0x2bcb: 0x2000,\n\t0x2bcc: 0x2000, 0x2bcd: 0x2000, 0x2bce: 0x2000, 0x2bd0: 0x0024, 0x2bd1: 0x0024,\n\t0x2bd3: 0x2000, 0x2bd4: 0x2000, 0x2bd5: 0x0024, 0x2bd6: 0x2000, 0x2bd7: 0x0024,\n\t// Block 0xb0, offset 0x2c00\n\t0x2c33: 0x0024, 0x2c34: 0x0024, 0x2c35: 0x2000,\n\t0x2c36: 0x2000,\n\t// Block 0xb1, offset 0x2c40\n\t0x2c40: 0x0024, 0x2c41: 0x0024, 0x2c42: 0x0800, 0x2c43: 0x2000, 0x2c44: 0x0010, 0x2c45: 0x0010,\n\t0x2c46: 0x0010, 0x2c47: 0x0010, 0x2c48: 0x0010, 0x2c49: 0x0010, 0x2c4a: 0x0010, 0x2c4b: 0x0010,\n\t0x2c4c: 0x0010, 0x2c4d: 0x0010, 0x2c4e: 0x0010, 0x2c4f: 0x0010, 0x2c50: 0x0010,\n\t0x2c52: 0x0010, 0x2c53: 0x0010, 0x2c54: 0x0010, 0x2c55: 0x0010, 0x2c56: 0x0010, 0x2c57: 0x0010,\n\t0x2c58: 0x0010, 0x2c59: 0x0010, 0x2c5a: 0x0010, 0x2c5b: 0x0010, 0x2c5c: 0x0010, 0x2c5d: 0x0010,\n\t0x2c5e: 0x0010, 0x2c5f: 0x0010, 0x2c60: 0x0010, 0x2c61: 0x0010, 0x2c62: 0x0010, 0x2c63: 0x0010,\n\t0x2c64: 0x0010, 0x2c65: 0x0010, 0x2c66: 0x0010, 0x2c67: 0x0010, 0x2c68: 0x0010, 0x2c69: 0x0010,\n\t0x2c6a: 0x0010, 0x2c6b: 0x0010, 0x2c6c: 0x0010, 0x2c6d: 0x0010, 0x2c6e: 0x0010, 0x2c6f: 0x0010,\n\t0x2c70: 0x0010, 0x2c71: 0x0010, 0x2c72: 0x0010, 0x2c73: 0x0010, 0x2c74: 0x2000, 0x2c75: 0x2000,\n\t0x2c76: 0x0024, 0x2c77: 0x0024, 0x2c78: 0x0024, 0x2c79: 0x0024, 0x2c7a: 0x0024,\n\t0x2c7e: 0x2000, 0x2c7f: 0x2000,\n\t// Block 0xb2, offset 0x2c80\n\t0x2c80: 0x0024, 0x2c81: 0x0024, 0x2c82: 0x0044,\n\t0x2c9a: 0x0024,\n\t// Block 0xb3, offset 0x2cc0\n\t0x2cf0: 0x0002, 0x2cf1: 0x0002, 0x2cf2: 0x0002, 0x2cf3: 0x0002, 0x2cf4: 0x0002, 0x2cf5: 0x0002,\n\t0x2cf6: 0x0002, 0x2cf7: 0x0002, 0x2cf8: 0x0002, 0x2cf9: 0x0002, 0x2cfa: 0x0002, 0x2cfb: 0x0002,\n\t0x2cfc: 0x0002, 0x2cfd: 0x0002, 0x2cfe: 0x0002, 0x2cff: 0x0002,\n\t// Block 0xb4, offset 0x2d00\n\t0x2d00: 0x0024,\n\t0x2d07: 0x0024, 0x2d08: 0x0024, 0x2d09: 0x0024, 0x2d0a: 0x0024, 0x2d0b: 0x0024,\n\t0x2d0c: 0x0024, 0x2d0d: 0x0024, 0x2d0e: 0x0024, 0x2d0f: 0x0024, 0x2d10: 0x0024, 0x2d11: 0x0024,\n\t0x2d12: 0x0024, 0x2d13: 0x0024, 0x2d14: 0x0024, 0x2d15: 0x0024,\n\t// Block 0xb5, offset 0x2d40\n\t0x2d5e: 0x0024, 0x2d5f: 0x0024, 0x2d60: 0x0024, 0x2d61: 0x0024, 0x2d62: 0x0024, 0x2d63: 0x0024,\n\t0x2d64: 0x0024, 0x2d65: 0x0024, 0x2d66: 0x0024, 0x2d67: 0x0024, 0x2d68: 0x0024, 0x2d69: 0x0024,\n\t0x2d6a: 0x2000, 0x2d6b: 0x2000, 0x2d6c: 0x2000, 0x2d6d: 0x0024, 0x2d6e: 0x0024, 0x2d6f: 0x0024,\n\t// Block 0xb6, offset 0x2d80\n\t0x2db0: 0x0024, 0x2db1: 0x0024, 0x2db2: 0x0024, 0x2db3: 0x0024, 0x2db4: 0x0024,\n\t// Block 0xb7, offset 0x2dc0\n\t0x2df0: 0x0024, 0x2df1: 0x0024, 0x2df2: 0x0024, 0x2df3: 0x0024, 0x2df4: 0x0024, 0x2df5: 0x0024,\n\t0x2df6: 0x0024,\n\t// Block 0xb8, offset 0x2e00\n\t0x2e23: 0x8000,\n\t0x2e27: 0x8000, 0x2e28: 0x8000, 0x2e29: 0x8000,\n\t0x2e2a: 0x8000,\n\t// Block 0xb9, offset 0x2e40\n\t0x2e4f: 0x0024, 0x2e51: 0x2000,\n\t0x2e52: 0x2000, 0x2e53: 0x2000, 0x2e54: 0x2000, 0x2e55: 0x2000, 0x2e56: 0x2000, 0x2e57: 0x2000,\n\t0x2e58: 0x2000, 0x2e59: 0x2000, 0x2e5a: 0x2000, 0x2e5b: 0x2000, 0x2e5c: 0x2000, 0x2e5d: 0x2000,\n\t0x2e5e: 0x2000, 0x2e5f: 0x2000, 0x2e60: 0x2000, 0x2e61: 0x2000, 0x2e62: 0x2000, 0x2e63: 0x2000,\n\t0x2e64: 0x2000, 0x2e65: 0x2000, 0x2e66: 0x2000, 0x2e67: 0x2000, 0x2e68: 0x2000, 0x2e69: 0x2000,\n\t0x2e6a: 0x2000, 0x2e6b: 0x2000, 0x2e6c: 0x2000, 0x2e6d: 0x2000, 0x2e6e: 0x2000, 0x2e6f: 0x2000,\n\t0x2e70: 0x2000, 0x2e71: 0x2000, 0x2e72: 0x2000, 0x2e73: 0x2000, 0x2e74: 0x2000, 0x2e75: 0x2000,\n\t0x2e76: 0x2000, 0x2e77: 0x2000, 0x2e78: 0x2000, 0x2e79: 0x2000, 0x2e7a: 0x2000, 0x2e7b: 0x2000,\n\t0x2e7c: 0x2000, 0x2e7d: 0x2000, 0x2e7e: 0x2000, 0x2e7f: 0x2000,\n\t// Block 0xba, offset 0x2e80\n\t0x2e80: 0x2000, 0x2e81: 0x2000, 0x2e82: 0x2000, 0x2e83: 0x2000, 0x2e84: 0x2000, 0x2e85: 0x2000,\n\t0x2e86: 0x2000, 0x2e87: 0x2000,\n\t0x2e8f: 0x0024, 0x2e90: 0x0024, 0x2e91: 0x0024,\n\t0x2e92: 0x0024,\n\t// Block 0xbb, offset 0x2ec0\n\t0x2ee4: 0x0024,\n\t0x2ef0: 0x0024, 0x2ef1: 0x0024,\n\t// Block 0xbc, offset 0x2f00\n\t0x2f1d: 0x0024,\n\t0x2f1e: 0x0024, 0x2f20: 0x0002, 0x2f21: 0x0002, 0x2f22: 0x0002, 0x2f23: 0x0002,\n\t// Block 0xbd, offset 0x2f40\n\t0x2f40: 0x0024, 0x2f41: 0x0024, 0x2f42: 0x0024, 0x2f43: 0x0024, 0x2f44: 0x0024, 0x2f45: 0x0024,\n\t0x2f46: 0x0024, 0x2f47: 0x0024, 0x2f48: 0x0024, 0x2f49: 0x0024, 0x2f4a: 0x0024, 0x2f4b: 0x0024,\n\t0x2f4c: 0x0024, 0x2f4d: 0x0024, 0x2f4e: 0x0024, 0x2f4f: 0x0024, 0x2f50: 0x0024, 0x2f51: 0x0024,\n\t0x2f52: 0x0024, 0x2f53: 0x0024, 0x2f54: 0x0024, 0x2f55: 0x0024, 0x2f56: 0x0024, 0x2f57: 0x0024,\n\t0x2f58: 0x0024, 0x2f59: 0x0024, 0x2f5a: 0x0024, 0x2f5b: 0x0024, 0x2f5c: 0x0024, 0x2f5d: 0x0024,\n\t0x2f5e: 0x0024, 0x2f5f: 0x0024, 0x2f60: 0x0024, 0x2f61: 0x0024, 0x2f62: 0x0024, 0x2f63: 0x0024,\n\t0x2f64: 0x0024, 0x2f65: 0x0024, 0x2f66: 0x0024, 0x2f67: 0x0024, 0x2f68: 0x0024, 0x2f69: 0x0024,\n\t0x2f6a: 0x0024, 0x2f6b: 0x0024, 0x2f6c: 0x0024, 0x2f6d: 0x0024,\n\t0x2f70: 0x0024, 0x2f71: 0x0024, 0x2f72: 0x0024, 0x2f73: 0x0024, 0x2f74: 0x0024, 0x2f75: 0x0024,\n\t0x2f76: 0x0024, 0x2f77: 0x0024, 0x2f78: 0x0024, 0x2f79: 0x0024, 0x2f7a: 0x0024, 0x2f7b: 0x0024,\n\t0x2f7c: 0x0024, 0x2f7d: 0x0024, 0x2f7e: 0x0024, 0x2f7f: 0x0024,\n\t// Block 0xbe, offset 0x2f80\n\t0x2f80: 0x0024, 0x2f81: 0x0024, 0x2f82: 0x0024, 0x2f83: 0x0024, 0x2f84: 0x0024, 0x2f85: 0x0024,\n\t0x2f86: 0x0024,\n\t// Block 0xbf, offset 0x2fc0\n\t0x2fe5: 0x0024, 0x2fe6: 0x0024, 0x2fe7: 0x0024, 0x2fe8: 0x0024, 0x2fe9: 0x0024,\n\t0x2fed: 0x0024, 0x2fee: 0x0024, 0x2fef: 0x0024,\n\t0x2ff0: 0x0024, 0x2ff1: 0x0024, 0x2ff2: 0x0024, 0x2ff3: 0x0002, 0x2ff4: 0x0002, 0x2ff5: 0x0002,\n\t0x2ff6: 0x0002, 0x2ff7: 0x0002, 0x2ff8: 0x0002, 0x2ff9: 0x0002, 0x2ffa: 0x0002, 0x2ffb: 0x0024,\n\t0x2ffc: 0x0024, 0x2ffd: 0x0024, 0x2ffe: 0x0024, 0x2fff: 0x0024,\n\t// Block 0xc0, offset 0x3000\n\t0x3000: 0x0024, 0x3001: 0x0024, 0x3002: 0x0024, 0x3005: 0x0024,\n\t0x3006: 0x0024, 0x3007: 0x0024, 0x3008: 0x0024, 0x3009: 0x0024, 0x300a: 0x0024, 0x300b: 0x0024,\n\t0x302a: 0x0024, 0x302b: 0x0024, 0x302c: 0x0024, 0x302d: 0x0024,\n\t// Block 0xc1, offset 0x3040\n\t0x3042: 0x0024, 0x3043: 0x0024, 0x3044: 0x0024,\n\t// Block 0xc2, offset 0x3080\n\t0x3080: 0x0024, 0x3081: 0x0024, 0x3082: 0x0024, 0x3083: 0x0024, 0x3084: 0x0024, 0x3085: 0x0024,\n\t0x3086: 0x0024, 0x3087: 0x0024, 0x3088: 0x0024, 0x3089: 0x0024, 0x308a: 0x0024, 0x308b: 0x0024,\n\t0x308c: 0x0024, 0x308d: 0x0024, 0x308e: 0x0024, 0x308f: 0x0024, 0x3090: 0x0024, 0x3091: 0x0024,\n\t0x3092: 0x0024, 0x3093: 0x0024, 0x3094: 0x0024, 0x3095: 0x0024, 0x3096: 0x0024, 0x3097: 0x0024,\n\t0x3098: 0x0024, 0x3099: 0x0024, 0x309a: 0x0024, 0x309b: 0x0024, 0x309c: 0x0024, 0x309d: 0x0024,\n\t0x309e: 0x0024, 0x309f: 0x0024, 0x30a0: 0x0024, 0x30a1: 0x0024, 0x30a2: 0x0024, 0x30a3: 0x0024,\n\t0x30a4: 0x0024, 0x30a5: 0x0024, 0x30a6: 0x0024, 0x30a7: 0x0024, 0x30a8: 0x0024, 0x30a9: 0x0024,\n\t0x30aa: 0x0024, 0x30ab: 0x0024, 0x30ac: 0x0024, 0x30ad: 0x0024, 0x30ae: 0x0024, 0x30af: 0x0024,\n\t0x30b0: 0x0024, 0x30b1: 0x0024, 0x30b2: 0x0024, 0x30b3: 0x0024, 0x30b4: 0x0024, 0x30b5: 0x0024,\n\t0x30b6: 0x0024, 0x30bb: 0x0024,\n\t0x30bc: 0x0024, 0x30bd: 0x0024, 0x30be: 0x0024, 0x30bf: 0x0024,\n\t// Block 0xc3, offset 0x30c0\n\t0x30c0: 0x0024, 0x30c1: 0x0024, 0x30c2: 0x0024, 0x30c3: 0x0024, 0x30c4: 0x0024, 0x30c5: 0x0024,\n\t0x30c6: 0x0024, 0x30c7: 0x0024, 0x30c8: 0x0024, 0x30c9: 0x0024, 0x30ca: 0x0024, 0x30cb: 0x0024,\n\t0x30cc: 0x0024, 0x30cd: 0x0024, 0x30ce: 0x0024, 0x30cf: 0x0024, 0x30d0: 0x0024, 0x30d1: 0x0024,\n\t0x30d2: 0x0024, 0x30d3: 0x0024, 0x30d4: 0x0024, 0x30d5: 0x0024, 0x30d6: 0x0024, 0x30d7: 0x0024,\n\t0x30d8: 0x0024, 0x30d9: 0x0024, 0x30da: 0x0024, 0x30db: 0x0024, 0x30dc: 0x0024, 0x30dd: 0x0024,\n\t0x30de: 0x0024, 0x30df: 0x0024, 0x30e0: 0x0024, 0x30e1: 0x0024, 0x30e2: 0x0024, 0x30e3: 0x0024,\n\t0x30e4: 0x0024, 0x30e5: 0x0024, 0x30e6: 0x0024, 0x30e7: 0x0024, 0x30e8: 0x0024, 0x30e9: 0x0024,\n\t0x30ea: 0x0024, 0x30eb: 0x0024, 0x30ec: 0x0024,\n\t0x30f5: 0x0024,\n\t// Block 0xc4, offset 0x3100\n\t0x3104: 0x0024,\n\t0x311b: 0x0024, 0x311c: 0x0024, 0x311d: 0x0024,\n\t0x311e: 0x0024, 0x311f: 0x0024, 0x3121: 0x0024, 0x3122: 0x0024, 0x3123: 0x0024,\n\t0x3124: 0x0024, 0x3125: 0x0024, 0x3126: 0x0024, 0x3127: 0x0024, 0x3128: 0x0024, 0x3129: 0x0024,\n\t0x312a: 0x0024, 0x312b: 0x0024, 0x312c: 0x0024, 0x312d: 0x0024, 0x312e: 0x0024, 0x312f: 0x0024,\n\t// Block 0xc5, offset 0x3140\n\t0x3140: 0x0024, 0x3141: 0x0024, 0x3142: 0x0024, 0x3143: 0x0024, 0x3144: 0x0024, 0x3145: 0x0024,\n\t0x3146: 0x0024, 0x3148: 0x0024, 0x3149: 0x0024, 0x314a: 0x0024, 0x314b: 0x0024,\n\t0x314c: 0x0024, 0x314d: 0x0024, 0x314e: 0x0024, 0x314f: 0x0024, 0x3150: 0x0024, 0x3151: 0x0024,\n\t0x3152: 0x0024, 0x3153: 0x0024, 0x3154: 0x0024, 0x3155: 0x0024, 0x3156: 0x0024, 0x3157: 0x0024,\n\t0x3158: 0x0024, 0x315b: 0x0024, 0x315c: 0x0024, 0x315d: 0x0024,\n\t0x315e: 0x0024, 0x315f: 0x0024, 0x3160: 0x0024, 0x3161: 0x0024, 0x3163: 0x0024,\n\t0x3164: 0x0024, 0x3166: 0x0024, 0x3167: 0x0024, 0x3168: 0x0024, 0x3169: 0x0024,\n\t0x316a: 0x0024,\n\t// Block 0xc6, offset 0x3180\n\t0x318f: 0x0024,\n\t// Block 0xc7, offset 0x31c0\n\t0x31ee: 0x0024,\n\t// Block 0xc8, offset 0x3200\n\t0x322c: 0x0024, 0x322d: 0x0024, 0x322e: 0x0024, 0x322f: 0x0024,\n\t// Block 0xc9, offset 0x3240\n\t0x326e: 0x0024, 0x326f: 0x0024,\n\t// Block 0xca, offset 0x3280\n\t0x32a3: 0x0024,\n\t0x32a6: 0x0024,\n\t0x32ae: 0x0024, 0x32af: 0x0024,\n\t0x32b5: 0x0024,\n\t// Block 0xcb, offset 0x32c0\n\t0x32d0: 0x0024, 0x32d1: 0x0024,\n\t0x32d2: 0x0024, 0x32d3: 0x0024, 0x32d4: 0x0024, 0x32d5: 0x0024, 0x32d6: 0x0024,\n\t// Block 0xcc, offset 0x3300\n\t0x3304: 0x0024, 0x3305: 0x0024,\n\t0x3306: 0x0024, 0x3307: 0x0024, 0x3308: 0x0024, 0x3309: 0x0024, 0x330a: 0x0024,\n\t// Block 0xcd, offset 0x3340\n\t0x3344: 0x0008,\n\t0x336c: 0x0008, 0x336d: 0x0008, 0x336e: 0x0008, 0x336f: 0x0008,\n\t// Block 0xce, offset 0x3380\n\t0x3394: 0x0008, 0x3395: 0x0008, 0x3396: 0x0008, 0x3397: 0x0008,\n\t0x3398: 0x0008, 0x3399: 0x0008, 0x339a: 0x0008, 0x339b: 0x0008, 0x339c: 0x0008, 0x339d: 0x0008,\n\t0x339e: 0x0008, 0x339f: 0x0008,\n\t0x33af: 0x0008,\n\t0x33b0: 0x0008,\n\t// Block 0xcf, offset 0x33c0\n\t0x33c0: 0x0008,\n\t0x33cf: 0x0008, 0x33d0: 0x0008,\n\t0x33f6: 0x0008, 0x33f7: 0x0008, 0x33f8: 0x0008, 0x33f9: 0x0008, 0x33fa: 0x0008, 0x33fb: 0x0008,\n\t0x33fc: 0x0008, 0x33fd: 0x0008, 0x33fe: 0x0008, 0x33ff: 0x0008,\n\t// Block 0xd0, offset 0x3400\n\t0x3430: 0x0008, 0x3431: 0x0008,\n\t0x343e: 0x0008, 0x343f: 0x0008,\n\t// Block 0xd1, offset 0x3440\n\t0x344e: 0x0008, 0x3451: 0x0008,\n\t0x3452: 0x0008, 0x3453: 0x0008, 0x3454: 0x0008, 0x3455: 0x0008, 0x3456: 0x0008, 0x3457: 0x0008,\n\t0x3458: 0x0008, 0x3459: 0x0008, 0x345a: 0x0008,\n\t0x346e: 0x0008, 0x346f: 0x0008,\n\t0x3470: 0x0008, 0x3471: 0x0008, 0x3472: 0x0008, 0x3473: 0x0008, 0x3474: 0x0008, 0x3475: 0x0008,\n\t0x3476: 0x0008, 0x3477: 0x0008, 0x3478: 0x0008, 0x3479: 0x0008, 0x347a: 0x0008, 0x347b: 0x0008,\n\t0x347c: 0x0008, 0x347d: 0x0008, 0x347e: 0x0008, 0x347f: 0x0008,\n\t// Block 0xd2, offset 0x3480\n\t0x3480: 0x0008, 0x3481: 0x0008, 0x3482: 0x0008, 0x3483: 0x0008, 0x3484: 0x0008, 0x3485: 0x0008,\n\t0x3486: 0x0008, 0x3487: 0x0008, 0x3488: 0x0008, 0x3489: 0x0008, 0x348a: 0x0008, 0x348b: 0x0008,\n\t0x348c: 0x0008, 0x348d: 0x0008, 0x348e: 0x0008, 0x348f: 0x0008, 0x3490: 0x0008, 0x3491: 0x0008,\n\t0x3492: 0x0008, 0x3493: 0x0008, 0x3494: 0x0008, 0x3495: 0x0008, 0x3496: 0x0008, 0x3497: 0x0008,\n\t0x3498: 0x0008, 0x3499: 0x0008, 0x349a: 0x0008, 0x349b: 0x0008, 0x349c: 0x0008, 0x349d: 0x0008,\n\t0x349e: 0x0008, 0x349f: 0x0008, 0x34a0: 0x0008, 0x34a1: 0x0008, 0x34a2: 0x0008, 0x34a3: 0x0008,\n\t0x34a4: 0x0008, 0x34a5: 0x0008, 0x34a6: 0x1000, 0x34a7: 0x1000, 0x34a8: 0x1000, 0x34a9: 0x1000,\n\t0x34aa: 0x1000, 0x34ab: 0x1000, 0x34ac: 0x1000, 0x34ad: 0x1000, 0x34ae: 0x1000, 0x34af: 0x1000,\n\t0x34b0: 0x1000, 0x34b1: 0x1000, 0x34b2: 0x1000, 0x34b3: 0x1000, 0x34b4: 0x1000, 0x34b5: 0x1000,\n\t0x34b6: 0x1000, 0x34b7: 0x1000, 0x34b8: 0x1000, 0x34b9: 0x1000, 0x34ba: 0x1000, 0x34bb: 0x1000,\n\t0x34bc: 0x1000, 0x34bd: 0x1000, 0x34be: 0x1000, 0x34bf: 0x1000,\n\t// Block 0xd3, offset 0x34c0\n\t0x34c1: 0x0008, 0x34c2: 0x0008, 0x34c3: 0x0008, 0x34c4: 0x0008, 0x34c5: 0x0008,\n\t0x34c6: 0x0008, 0x34c7: 0x0008, 0x34c8: 0x0008, 0x34c9: 0x0008, 0x34ca: 0x0008, 0x34cb: 0x0008,\n\t0x34cc: 0x0008, 0x34cd: 0x0008, 0x34ce: 0x0008, 0x34cf: 0x0008,\n\t0x34da: 0x0008,\n\t0x34ef: 0x0008,\n\t0x34f2: 0x0008, 0x34f3: 0x0008, 0x34f4: 0x0008, 0x34f5: 0x0008,\n\t0x34f6: 0x0008, 0x34f7: 0x0008, 0x34f8: 0x0008, 0x34f9: 0x0008, 0x34fa: 0x0008,\n\t0x34fc: 0x0008, 0x34fd: 0x0008, 0x34fe: 0x0008, 0x34ff: 0x0008,\n\t// Block 0xd4, offset 0x3500\n\t0x3509: 0x0008, 0x350a: 0x0008, 0x350b: 0x0008,\n\t0x350c: 0x0008, 0x350d: 0x0008, 0x350e: 0x0008, 0x350f: 0x0008, 0x3510: 0x0008, 0x3511: 0x0008,\n\t0x3512: 0x0008, 0x3513: 0x0008, 0x3514: 0x0008, 0x3515: 0x0008, 0x3516: 0x0008, 0x3517: 0x0008,\n\t0x3518: 0x0008, 0x3519: 0x0008, 0x351a: 0x0008, 0x351b: 0x0008, 0x351c: 0x0008, 0x351d: 0x0008,\n\t0x351e: 0x0008, 0x351f: 0x0008,\n\t0x3526: 0x0008, 0x3527: 0x0008, 0x3528: 0x0008, 0x3529: 0x0008,\n\t0x352a: 0x0008, 0x352b: 0x0008, 0x352c: 0x0008, 0x352d: 0x0008, 0x352e: 0x0008, 0x352f: 0x0008,\n\t0x3530: 0x0008, 0x3531: 0x0008, 0x3532: 0x0008, 0x3533: 0x0008, 0x3534: 0x0008, 0x3535: 0x0008,\n\t0x3536: 0x0008, 0x3537: 0x0008, 0x3538: 0x0008, 0x3539: 0x0008, 0x353a: 0x0008, 0x353b: 0x0008,\n\t0x353c: 0x0008, 0x353d: 0x0008, 0x353e: 0x0008, 0x353f: 0x0008,\n\t// Block 0xd5, offset 0x3540\n\t0x3540: 0x0008, 0x3541: 0x0008, 0x3542: 0x0008, 0x3543: 0x0008, 0x3544: 0x0008, 0x3545: 0x0008,\n\t0x3546: 0x0008, 0x3547: 0x0008, 0x3548: 0x0008, 0x3549: 0x0008, 0x354a: 0x0008, 0x354b: 0x0008,\n\t0x354c: 0x0008, 0x354d: 0x0008, 0x354e: 0x0008, 0x354f: 0x0008, 0x3550: 0x0008, 0x3551: 0x0008,\n\t0x3552: 0x0008, 0x3553: 0x0008, 0x3554: 0x0008, 0x3555: 0x0008, 0x3556: 0x0008, 0x3557: 0x0008,\n\t0x3558: 0x0008, 0x3559: 0x0008, 0x355a: 0x0008, 0x355b: 0x0008, 0x355c: 0x0008, 0x355d: 0x0008,\n\t0x355e: 0x0008, 0x355f: 0x0008, 0x3560: 0x0008, 0x3561: 0x0008, 0x3562: 0x0008, 0x3563: 0x0008,\n\t0x3564: 0x0008, 0x3565: 0x0008, 0x3566: 0x0008, 0x3567: 0x0008, 0x3568: 0x0008, 0x3569: 0x0008,\n\t0x356a: 0x0008, 0x356b: 0x0008, 0x356c: 0x0008, 0x356d: 0x0008, 0x356e: 0x0008, 0x356f: 0x0008,\n\t0x3570: 0x0008, 0x3571: 0x0008, 0x3572: 0x0008, 0x3573: 0x0008, 0x3574: 0x0008, 0x3575: 0x0008,\n\t0x3576: 0x0008, 0x3577: 0x0008, 0x3578: 0x0008, 0x3579: 0x0008, 0x357a: 0x0008, 0x357b: 0x0008,\n\t0x357c: 0x0008, 0x357d: 0x0008, 0x357e: 0x0008, 0x357f: 0x0008,\n\t// Block 0xd6, offset 0x3580\n\t0x3580: 0x0008, 0x3581: 0x0008, 0x3582: 0x0008, 0x3583: 0x0008, 0x3584: 0x0008, 0x3585: 0x0008,\n\t0x3586: 0x0008, 0x3587: 0x0008, 0x3588: 0x0008, 0x3589: 0x0008, 0x358a: 0x0008, 0x358b: 0x0008,\n\t0x358c: 0x0008, 0x358d: 0x0008, 0x358e: 0x0008, 0x358f: 0x0008, 0x3590: 0x0008, 0x3591: 0x0008,\n\t0x3592: 0x0008, 0x3593: 0x0008, 0x3594: 0x0008, 0x3595: 0x0008, 0x3596: 0x0008, 0x3597: 0x0008,\n\t0x3598: 0x0008, 0x3599: 0x0008, 0x359a: 0x0008, 0x359b: 0x0008, 0x359c: 0x0008, 0x359d: 0x0008,\n\t0x359e: 0x0008, 0x359f: 0x0008, 0x35a0: 0x0008, 0x35a1: 0x0008,\n\t0x35a4: 0x0008, 0x35a5: 0x0008, 0x35a6: 0x0008, 0x35a7: 0x0008, 0x35a8: 0x0008, 0x35a9: 0x0008,\n\t0x35aa: 0x0008, 0x35ab: 0x0008, 0x35ac: 0x0008, 0x35ad: 0x0008, 0x35ae: 0x0008, 0x35af: 0x0008,\n\t0x35b0: 0x0008, 0x35b1: 0x0008, 0x35b2: 0x0008, 0x35b3: 0x0008, 0x35b4: 0x0008, 0x35b5: 0x0008,\n\t0x35b6: 0x0008, 0x35b7: 0x0008, 0x35b8: 0x0008, 0x35b9: 0x0008, 0x35ba: 0x0008, 0x35bb: 0x0008,\n\t0x35bc: 0x0008, 0x35bd: 0x0008, 0x35be: 0x0008, 0x35bf: 0x0008,\n\t// Block 0xd7, offset 0x35c0\n\t0x35c0: 0x0008, 0x35c1: 0x0008, 0x35c2: 0x0008, 0x35c3: 0x0008, 0x35c4: 0x0008, 0x35c5: 0x0008,\n\t0x35c6: 0x0008, 0x35c7: 0x0008, 0x35c8: 0x0008, 0x35c9: 0x0008, 0x35ca: 0x0008, 0x35cb: 0x0008,\n\t0x35cc: 0x0008, 0x35cd: 0x0008, 0x35ce: 0x0008, 0x35cf: 0x0008, 0x35d0: 0x0008, 0x35d1: 0x0008,\n\t0x35d2: 0x0008, 0x35d3: 0x0008, 0x35d6: 0x0008, 0x35d7: 0x0008,\n\t0x35d9: 0x0008, 0x35da: 0x0008, 0x35db: 0x0008,\n\t0x35de: 0x0008, 0x35df: 0x0008, 0x35e0: 0x0008, 0x35e1: 0x0008, 0x35e2: 0x0008, 0x35e3: 0x0008,\n\t0x35e4: 0x0008, 0x35e5: 0x0008, 0x35e6: 0x0008, 0x35e7: 0x0008, 0x35e8: 0x0008, 0x35e9: 0x0008,\n\t0x35ea: 0x0008, 0x35eb: 0x0008, 0x35ec: 0x0008, 0x35ed: 0x0008, 0x35ee: 0x0008, 0x35ef: 0x0008,\n\t0x35f0: 0x0008, 0x35f1: 0x0008, 0x35f2: 0x0008, 0x35f3: 0x0008, 0x35f4: 0x0008, 0x35f5: 0x0008,\n\t0x35f6: 0x0008, 0x35f7: 0x0008, 0x35f8: 0x0008, 0x35f9: 0x0008, 0x35fa: 0x0008, 0x35fb: 0x0008,\n\t0x35fc: 0x0008, 0x35fd: 0x0008, 0x35fe: 0x0008, 0x35ff: 0x0008,\n\t// Block 0xd8, offset 0x3600\n\t0x3600: 0x0008, 0x3601: 0x0008, 0x3602: 0x0008, 0x3603: 0x0008, 0x3604: 0x0008, 0x3605: 0x0008,\n\t0x3606: 0x0008, 0x3607: 0x0008, 0x3608: 0x0008, 0x3609: 0x0008, 0x360a: 0x0008, 0x360b: 0x0008,\n\t0x360c: 0x0008, 0x360d: 0x0008, 0x360e: 0x0008, 0x360f: 0x0008, 0x3610: 0x0008, 0x3611: 0x0008,\n\t0x3612: 0x0008, 0x3613: 0x0008, 0x3614: 0x0008, 0x3615: 0x0008, 0x3616: 0x0008, 0x3617: 0x0008,\n\t0x3618: 0x0008, 0x3619: 0x0008, 0x361a: 0x0008, 0x361b: 0x0008, 0x361c: 0x0008, 0x361d: 0x0008,\n\t0x361e: 0x0008, 0x361f: 0x0008, 0x3620: 0x0008, 0x3621: 0x0008, 0x3622: 0x0008, 0x3623: 0x0008,\n\t0x3624: 0x0008, 0x3625: 0x0008, 0x3626: 0x0008, 0x3627: 0x0008, 0x3628: 0x0008, 0x3629: 0x0008,\n\t0x362a: 0x0008, 0x362b: 0x0008, 0x362c: 0x0008, 0x362d: 0x0008, 0x362e: 0x0008, 0x362f: 0x0008,\n\t0x3630: 0x0008, 0x3633: 0x0008, 0x3634: 0x0008, 0x3635: 0x0008,\n\t0x3637: 0x0008, 0x3638: 0x0008, 0x3639: 0x0008, 0x363a: 0x0008, 0x363b: 0x0024,\n\t0x363c: 0x0024, 0x363d: 0x0024, 0x363e: 0x0024, 0x363f: 0x0024,\n\t// Block 0xd9, offset 0x3640\n\t0x3640: 0x0008, 0x3641: 0x0008, 0x3642: 0x0008, 0x3643: 0x0008, 0x3644: 0x0008, 0x3645: 0x0008,\n\t0x3646: 0x0008, 0x3647: 0x0008, 0x3648: 0x0008, 0x3649: 0x0008, 0x364a: 0x0008, 0x364b: 0x0008,\n\t0x364c: 0x0008, 0x364d: 0x0008, 0x364e: 0x0008, 0x364f: 0x0008, 0x3650: 0x0008, 0x3651: 0x0008,\n\t0x3652: 0x0008, 0x3653: 0x0008, 0x3654: 0x0008, 0x3655: 0x0008, 0x3656: 0x0008, 0x3657: 0x0008,\n\t0x3658: 0x0008, 0x3659: 0x0008, 0x365a: 0x0008, 0x365b: 0x0008, 0x365c: 0x0008, 0x365d: 0x0008,\n\t0x365e: 0x0008, 0x365f: 0x0008, 0x3660: 0x0008, 0x3661: 0x0008, 0x3662: 0x0008, 0x3663: 0x0008,\n\t0x3664: 0x0008, 0x3665: 0x0008, 0x3666: 0x0008, 0x3667: 0x0008, 0x3668: 0x0008, 0x3669: 0x0008,\n\t0x366a: 0x0008, 0x366b: 0x0008, 0x366c: 0x0008, 0x366d: 0x0008, 0x366e: 0x0008, 0x366f: 0x0008,\n\t0x3670: 0x0008, 0x3671: 0x0008, 0x3672: 0x0008, 0x3673: 0x0008, 0x3674: 0x0008, 0x3675: 0x0008,\n\t0x3676: 0x0008, 0x3677: 0x0008, 0x3678: 0x0008, 0x3679: 0x0008, 0x367a: 0x0008, 0x367b: 0x0008,\n\t0x367c: 0x0008, 0x367d: 0x0008, 0x367f: 0x0008,\n\t// Block 0xda, offset 0x3680\n\t0x3680: 0x0008, 0x3681: 0x0008, 0x3682: 0x0008, 0x3683: 0x0008, 0x3684: 0x0008, 0x3685: 0x0008,\n\t0x3686: 0x0008, 0x3687: 0x0008, 0x3688: 0x0008, 0x3689: 0x0008, 0x368a: 0x0008, 0x368b: 0x0008,\n\t0x368c: 0x0008, 0x368d: 0x0008, 0x368e: 0x0008, 0x368f: 0x0008, 0x3690: 0x0008, 0x3691: 0x0008,\n\t0x3692: 0x0008, 0x3693: 0x0008, 0x3694: 0x0008, 0x3695: 0x0008, 0x3696: 0x0008, 0x3697: 0x0008,\n\t0x3698: 0x0008, 0x3699: 0x0008, 0x369a: 0x0008, 0x369b: 0x0008, 0x369c: 0x0008, 0x369d: 0x0008,\n\t0x369e: 0x0008, 0x369f: 0x0008, 0x36a0: 0x0008, 0x36a1: 0x0008, 0x36a2: 0x0008, 0x36a3: 0x0008,\n\t0x36a4: 0x0008, 0x36a5: 0x0008, 0x36a6: 0x0008, 0x36a7: 0x0008, 0x36a8: 0x0008, 0x36a9: 0x0008,\n\t0x36aa: 0x0008, 0x36ab: 0x0008, 0x36ac: 0x0008, 0x36ad: 0x0008, 0x36ae: 0x0008, 0x36af: 0x0008,\n\t0x36b0: 0x0008, 0x36b1: 0x0008, 0x36b2: 0x0008, 0x36b3: 0x0008, 0x36b4: 0x0008, 0x36b5: 0x0008,\n\t0x36b6: 0x0008, 0x36b7: 0x0008, 0x36b8: 0x0008, 0x36b9: 0x0008, 0x36ba: 0x0008, 0x36bb: 0x0008,\n\t0x36bc: 0x0008, 0x36bd: 0x0008,\n\t// Block 0xdb, offset 0x36c0\n\t0x36c9: 0x0008, 0x36ca: 0x0008, 0x36cb: 0x0008,\n\t0x36cc: 0x0008, 0x36cd: 0x0008, 0x36ce: 0x0008, 0x36d0: 0x0008, 0x36d1: 0x0008,\n\t0x36d2: 0x0008, 0x36d3: 0x0008, 0x36d4: 0x0008, 0x36d5: 0x0008, 0x36d6: 0x0008, 0x36d7: 0x0008,\n\t0x36d8: 0x0008, 0x36d9: 0x0008, 0x36da: 0x0008, 0x36db: 0x0008, 0x36dc: 0x0008, 0x36dd: 0x0008,\n\t0x36de: 0x0008, 0x36df: 0x0008, 0x36e0: 0x0008, 0x36e1: 0x0008, 0x36e2: 0x0008, 0x36e3: 0x0008,\n\t0x36e4: 0x0008, 0x36e5: 0x0008, 0x36e6: 0x0008, 0x36e7: 0x0008,\n\t0x36ef: 0x0008,\n\t0x36f0: 0x0008, 0x36f3: 0x0008, 0x36f4: 0x0008, 0x36f5: 0x0008,\n\t0x36f6: 0x0008, 0x36f7: 0x0008, 0x36f8: 0x0008, 0x36f9: 0x0008, 0x36fa: 0x0008,\n\t// Block 0xdc, offset 0x3700\n\t0x3707: 0x0008, 0x370a: 0x0008, 0x370b: 0x0008,\n\t0x370c: 0x0008, 0x370d: 0x0008, 0x3710: 0x0008,\n\t0x3715: 0x0008, 0x3716: 0x0008,\n\t0x3724: 0x0008, 0x3725: 0x0008, 0x3728: 0x0008,\n\t0x3731: 0x0008, 0x3732: 0x0008,\n\t0x373c: 0x0008,\n\t// Block 0xdd, offset 0x3740\n\t0x3742: 0x0008, 0x3743: 0x0008, 0x3744: 0x0008,\n\t0x3751: 0x0008,\n\t0x3752: 0x0008, 0x3753: 0x0008,\n\t0x375c: 0x0008, 0x375d: 0x0008,\n\t0x375e: 0x0008, 0x3761: 0x0008, 0x3763: 0x0008,\n\t0x3768: 0x0008,\n\t0x376f: 0x0008,\n\t0x3773: 0x0008,\n\t0x377a: 0x0008, 0x377b: 0x0008,\n\t0x377c: 0x0008, 0x377d: 0x0008, 0x377e: 0x0008, 0x377f: 0x0008,\n\t// Block 0xde, offset 0x3780\n\t0x3780: 0x0008, 0x3781: 0x0008, 0x3782: 0x0008, 0x3783: 0x0008, 0x3784: 0x0008, 0x3785: 0x0008,\n\t0x3786: 0x0008, 0x3787: 0x0008, 0x3788: 0x0008, 0x3789: 0x0008, 0x378a: 0x0008, 0x378b: 0x0008,\n\t0x378c: 0x0008, 0x378d: 0x0008, 0x378e: 0x0008, 0x378f: 0x0008,\n\t// Block 0xdf, offset 0x37c0\n\t0x37c0: 0x0008, 0x37c1: 0x0008, 0x37c2: 0x0008, 0x37c3: 0x0008, 0x37c4: 0x0008, 0x37c5: 0x0008,\n\t0x37cb: 0x0008,\n\t0x37cc: 0x0008, 0x37cd: 0x0008, 0x37ce: 0x0008, 0x37cf: 0x0008, 0x37d0: 0x0008, 0x37d1: 0x0008,\n\t0x37d2: 0x0008, 0x37d5: 0x0008, 0x37d6: 0x0008, 0x37d7: 0x0008,\n\t0x37d8: 0x0008, 0x37d9: 0x0008, 0x37da: 0x0008, 0x37db: 0x0008, 0x37dc: 0x0008, 0x37dd: 0x0008,\n\t0x37de: 0x0008, 0x37df: 0x0008, 0x37e0: 0x0008, 0x37e1: 0x0008, 0x37e2: 0x0008, 0x37e3: 0x0008,\n\t0x37e4: 0x0008, 0x37e5: 0x0008, 0x37e9: 0x0008,\n\t0x37eb: 0x0008, 0x37ec: 0x0008, 0x37ed: 0x0008, 0x37ee: 0x0008, 0x37ef: 0x0008,\n\t0x37f0: 0x0008, 0x37f3: 0x0008, 0x37f4: 0x0008, 0x37f5: 0x0008,\n\t0x37f6: 0x0008, 0x37f7: 0x0008, 0x37f8: 0x0008, 0x37f9: 0x0008, 0x37fa: 0x0008, 0x37fb: 0x0008,\n\t0x37fc: 0x0008, 0x37fd: 0x0008, 0x37fe: 0x0008, 0x37ff: 0x0008,\n\t// Block 0xe0, offset 0x3800\n\t0x381a: 0x0008, 0x381b: 0x0008, 0x381c: 0x0008, 0x381d: 0x0008,\n\t0x381e: 0x0008, 0x381f: 0x0008, 0x3820: 0x0008, 0x3821: 0x0008, 0x3822: 0x0008, 0x3823: 0x0008,\n\t0x3824: 0x0008, 0x3825: 0x0008, 0x3826: 0x0008, 0x3827: 0x0008, 0x3828: 0x0008, 0x3829: 0x0008,\n\t0x382a: 0x0008, 0x382b: 0x0008, 0x382c: 0x0008, 0x382d: 0x0008, 0x382e: 0x0008, 0x382f: 0x0008,\n\t0x3830: 0x0008, 0x3831: 0x0008, 0x3832: 0x0008, 0x3833: 0x0008, 0x3834: 0x0008, 0x3835: 0x0008,\n\t0x3836: 0x0008, 0x3837: 0x0008, 0x3838: 0x0008, 0x3839: 0x0008, 0x383a: 0x0008, 0x383b: 0x0008,\n\t0x383c: 0x0008, 0x383d: 0x0008, 0x383e: 0x0008, 0x383f: 0x0008,\n\t// Block 0xe1, offset 0x3840\n\t0x384c: 0x0008, 0x384d: 0x0008, 0x384e: 0x0008, 0x384f: 0x0008,\n\t// Block 0xe2, offset 0x3880\n\t0x3888: 0x0008, 0x3889: 0x0008, 0x388a: 0x0008, 0x388b: 0x0008,\n\t0x388c: 0x0008, 0x388d: 0x0008, 0x388e: 0x0008, 0x388f: 0x0008,\n\t0x389a: 0x0008, 0x389b: 0x0008, 0x389c: 0x0008, 0x389d: 0x0008,\n\t0x389e: 0x0008, 0x389f: 0x0008,\n\t// Block 0xe3, offset 0x38c0\n\t0x38c8: 0x0008, 0x38c9: 0x0008, 0x38ca: 0x0008, 0x38cb: 0x0008,\n\t0x38cc: 0x0008, 0x38cd: 0x0008, 0x38ce: 0x0008, 0x38cf: 0x0008,\n\t0x38ee: 0x0008, 0x38ef: 0x0008,\n\t0x38fc: 0x0008, 0x38fd: 0x0008, 0x38fe: 0x0008, 0x38ff: 0x0008,\n\t// Block 0xe4, offset 0x3900\n\t0x3902: 0x0008, 0x3903: 0x0008, 0x3904: 0x0008, 0x3905: 0x0008,\n\t0x3906: 0x0008, 0x3907: 0x0008, 0x3908: 0x0008, 0x3909: 0x0008, 0x390a: 0x0008, 0x390b: 0x0008,\n\t0x390c: 0x0008, 0x390d: 0x0008, 0x390e: 0x0008, 0x390f: 0x0008,\n\t0x3919: 0x0008, 0x391a: 0x0008, 0x391b: 0x0008, 0x391c: 0x0008, 0x391d: 0x0008,\n\t0x391e: 0x0008, 0x391f: 0x0008, 0x3920: 0x0008, 0x3921: 0x0008, 0x3922: 0x0008, 0x3923: 0x0008,\n\t0x3924: 0x0008, 0x3925: 0x0008, 0x3926: 0x0008, 0x3927: 0x0008, 0x3928: 0x0008, 0x3929: 0x0008,\n\t0x392a: 0x0008, 0x392b: 0x0008, 0x392c: 0x0008, 0x392d: 0x0008, 0x392e: 0x0008, 0x392f: 0x0008,\n\t0x3930: 0x0008, 0x3931: 0x0008, 0x3932: 0x0008, 0x3933: 0x0008, 0x3934: 0x0008, 0x3935: 0x0008,\n\t0x3936: 0x0008, 0x3937: 0x0008, 0x3938: 0x0008, 0x3939: 0x0008, 0x393a: 0x0008, 0x393b: 0x0008,\n\t0x393c: 0x0008, 0x393d: 0x0008, 0x393e: 0x0008, 0x393f: 0x0008,\n\t// Block 0xe5, offset 0x3940\n\t0x394c: 0x0008, 0x394d: 0x0008, 0x394e: 0x0008, 0x394f: 0x0008, 0x3950: 0x0008, 0x3951: 0x0008,\n\t0x3952: 0x0008, 0x3953: 0x0008, 0x3954: 0x0008, 0x3955: 0x0008, 0x3956: 0x0008, 0x3957: 0x0008,\n\t0x3958: 0x0008, 0x3959: 0x0008, 0x395a: 0x0008, 0x395b: 0x0008, 0x395c: 0x0008, 0x395d: 0x0008,\n\t0x395e: 0x0008, 0x395f: 0x0008, 0x3960: 0x0008, 0x3961: 0x0008, 0x3962: 0x0008, 0x3963: 0x0008,\n\t0x3964: 0x0008, 0x3965: 0x0008, 0x3966: 0x0008, 0x3967: 0x0008, 0x3968: 0x0008, 0x3969: 0x0008,\n\t0x396a: 0x0008, 0x396b: 0x0008, 0x396c: 0x0008, 0x396d: 0x0008, 0x396e: 0x0008, 0x396f: 0x0008,\n\t0x3970: 0x0008, 0x3971: 0x0008, 0x3972: 0x0008, 0x3973: 0x0008, 0x3974: 0x0008, 0x3975: 0x0008,\n\t0x3976: 0x0008, 0x3977: 0x0008, 0x3978: 0x0008, 0x3979: 0x0008, 0x397a: 0x0008,\n\t0x397c: 0x0008, 0x397d: 0x0008, 0x397e: 0x0008, 0x397f: 0x0008,\n\t// Block 0xe6, offset 0x3980\n\t0x3980: 0x0008, 0x3981: 0x0008, 0x3982: 0x0008, 0x3983: 0x0008, 0x3984: 0x0008, 0x3985: 0x0008,\n\t0x3987: 0x0008, 0x3988: 0x0008, 0x3989: 0x0008, 0x398a: 0x0008, 0x398b: 0x0008,\n\t0x398c: 0x0008, 0x398d: 0x0008, 0x398e: 0x0008, 0x398f: 0x0008, 0x3990: 0x0008, 0x3991: 0x0008,\n\t0x3992: 0x0008, 0x3993: 0x0008, 0x3994: 0x0008, 0x3995: 0x0008, 0x3996: 0x0008, 0x3997: 0x0008,\n\t0x3998: 0x0008, 0x3999: 0x0008, 0x399a: 0x0008, 0x399b: 0x0008, 0x399c: 0x0008, 0x399d: 0x0008,\n\t0x399e: 0x0008, 0x399f: 0x0008, 0x39a0: 0x0008, 0x39a1: 0x0008, 0x39a2: 0x0008, 0x39a3: 0x0008,\n\t0x39a4: 0x0008, 0x39a5: 0x0008, 0x39a6: 0x0008, 0x39a7: 0x0008, 0x39a8: 0x0008, 0x39a9: 0x0008,\n\t0x39aa: 0x0008, 0x39ab: 0x0008, 0x39ac: 0x0008, 0x39ad: 0x0008, 0x39ae: 0x0008, 0x39af: 0x0008,\n\t0x39b0: 0x0008, 0x39b1: 0x0008, 0x39b2: 0x0008, 0x39b3: 0x0008, 0x39b4: 0x0008, 0x39b5: 0x0008,\n\t0x39b6: 0x0008, 0x39b7: 0x0008, 0x39b8: 0x0008, 0x39b9: 0x0008, 0x39ba: 0x0008, 0x39bb: 0x0008,\n\t0x39bc: 0x0008, 0x39bd: 0x0008, 0x39be: 0x0008, 0x39bf: 0x0008,\n\t// Block 0xe7, offset 0x39c0\n\t0x39d8: 0x0008, 0x39d9: 0x0008, 0x39da: 0x0008, 0x39db: 0x0008, 0x39dc: 0x0008, 0x39dd: 0x0008,\n\t0x39de: 0x0008, 0x39df: 0x0008,\n\t0x39ee: 0x0008, 0x39ef: 0x0008,\n\t0x39f0: 0x0008, 0x39f1: 0x0008, 0x39f2: 0x0008, 0x39f3: 0x0008, 0x39f4: 0x0008, 0x39f5: 0x0008,\n\t0x39f6: 0x0008, 0x39f7: 0x0008, 0x39f8: 0x0008, 0x39f9: 0x0008, 0x39fa: 0x0008, 0x39fb: 0x0008,\n\t0x39fc: 0x0008, 0x39fd: 0x0008, 0x39fe: 0x0008, 0x39ff: 0x0008,\n\t// Block 0xe8, offset 0x3a00\n\t0x3a00: 0x0002, 0x3a01: 0x0002, 0x3a02: 0x0002, 0x3a03: 0x0002, 0x3a04: 0x0002, 0x3a05: 0x0002,\n\t0x3a06: 0x0002, 0x3a07: 0x0002, 0x3a08: 0x0002, 0x3a09: 0x0002, 0x3a0a: 0x0002, 0x3a0b: 0x0002,\n\t0x3a0c: 0x0002, 0x3a0d: 0x0002, 0x3a0e: 0x0002, 0x3a0f: 0x0002, 0x3a10: 0x0002, 0x3a11: 0x0002,\n\t0x3a12: 0x0002, 0x3a13: 0x0002, 0x3a14: 0x0002, 0x3a15: 0x0002, 0x3a16: 0x0002, 0x3a17: 0x0002,\n\t0x3a18: 0x0002, 0x3a19: 0x0002, 0x3a1a: 0x0002, 0x3a1b: 0x0002, 0x3a1c: 0x0002, 0x3a1d: 0x0002,\n\t0x3a1e: 0x0002, 0x3a1f: 0x0002, 0x3a20: 0x0024, 0x3a21: 0x0024, 0x3a22: 0x0024, 0x3a23: 0x0024,\n\t0x3a24: 0x0024, 0x3a25: 0x0024, 0x3a26: 0x0024, 0x3a27: 0x0024, 0x3a28: 0x0024, 0x3a29: 0x0024,\n\t0x3a2a: 0x0024, 0x3a2b: 0x0024, 0x3a2c: 0x0024, 0x3a2d: 0x0024, 0x3a2e: 0x0024, 0x3a2f: 0x0024,\n\t0x3a30: 0x0024, 0x3a31: 0x0024, 0x3a32: 0x0024, 0x3a33: 0x0024, 0x3a34: 0x0024, 0x3a35: 0x0024,\n\t0x3a36: 0x0024, 0x3a37: 0x0024, 0x3a38: 0x0024, 0x3a39: 0x0024, 0x3a3a: 0x0024, 0x3a3b: 0x0024,\n\t0x3a3c: 0x0024, 0x3a3d: 0x0024, 0x3a3e: 0x0024, 0x3a3f: 0x0024,\n\t// Block 0xe9, offset 0x3a40\n\t0x3a40: 0x0002, 0x3a41: 0x0002, 0x3a42: 0x0002, 0x3a43: 0x0002, 0x3a44: 0x0002, 0x3a45: 0x0002,\n\t0x3a46: 0x0002, 0x3a47: 0x0002, 0x3a48: 0x0002, 0x3a49: 0x0002, 0x3a4a: 0x0002, 0x3a4b: 0x0002,\n\t0x3a4c: 0x0002, 0x3a4d: 0x0002, 0x3a4e: 0x0002, 0x3a4f: 0x0002, 0x3a50: 0x0002, 0x3a51: 0x0002,\n\t0x3a52: 0x0002, 0x3a53: 0x0002, 0x3a54: 0x0002, 0x3a55: 0x0002, 0x3a56: 0x0002, 0x3a57: 0x0002,\n\t0x3a58: 0x0002, 0x3a59: 0x0002, 0x3a5a: 0x0002, 0x3a5b: 0x0002, 0x3a5c: 0x0002, 0x3a5d: 0x0002,\n\t0x3a5e: 0x0002, 0x3a5f: 0x0002, 0x3a60: 0x0002, 0x3a61: 0x0002, 0x3a62: 0x0002, 0x3a63: 0x0002,\n\t0x3a64: 0x0002, 0x3a65: 0x0002, 0x3a66: 0x0002, 0x3a67: 0x0002, 0x3a68: 0x0002, 0x3a69: 0x0002,\n\t0x3a6a: 0x0002, 0x3a6b: 0x0002, 0x3a6c: 0x0002, 0x3a6d: 0x0002, 0x3a6e: 0x0002, 0x3a6f: 0x0002,\n\t0x3a70: 0x0002, 0x3a71: 0x0002, 0x3a72: 0x0002, 0x3a73: 0x0002, 0x3a74: 0x0002, 0x3a75: 0x0002,\n\t0x3a76: 0x0002, 0x3a77: 0x0002, 0x3a78: 0x0002, 0x3a79: 0x0002, 0x3a7a: 0x0002, 0x3a7b: 0x0002,\n\t0x3a7c: 0x0002, 0x3a7d: 0x0002, 0x3a7e: 0x0002, 0x3a7f: 0x0002,\n\t// Block 0xea, offset 0x3a80\n\t0x3a80: 0x0024, 0x3a81: 0x0024, 0x3a82: 0x0024, 0x3a83: 0x0024, 0x3a84: 0x0024, 0x3a85: 0x0024,\n\t0x3a86: 0x0024, 0x3a87: 0x0024, 0x3a88: 0x0024, 0x3a89: 0x0024, 0x3a8a: 0x0024, 0x3a8b: 0x0024,\n\t0x3a8c: 0x0024, 0x3a8d: 0x0024, 0x3a8e: 0x0024, 0x3a8f: 0x0024, 0x3a90: 0x0024, 0x3a91: 0x0024,\n\t0x3a92: 0x0024, 0x3a93: 0x0024, 0x3a94: 0x0024, 0x3a95: 0x0024, 0x3a96: 0x0024, 0x3a97: 0x0024,\n\t0x3a98: 0x0024, 0x3a99: 0x0024, 0x3a9a: 0x0024, 0x3a9b: 0x0024, 0x3a9c: 0x0024, 0x3a9d: 0x0024,\n\t0x3a9e: 0x0024, 0x3a9f: 0x0024, 0x3aa0: 0x0024, 0x3aa1: 0x0024, 0x3aa2: 0x0024, 0x3aa3: 0x0024,\n\t0x3aa4: 0x0024, 0x3aa5: 0x0024, 0x3aa6: 0x0024, 0x3aa7: 0x0024, 0x3aa8: 0x0024, 0x3aa9: 0x0024,\n\t0x3aaa: 0x0024, 0x3aab: 0x0024, 0x3aac: 0x0024, 0x3aad: 0x0024, 0x3aae: 0x0024, 0x3aaf: 0x0024,\n\t0x3ab0: 0x0002, 0x3ab1: 0x0002, 0x3ab2: 0x0002, 0x3ab3: 0x0002, 0x3ab4: 0x0002, 0x3ab5: 0x0002,\n\t0x3ab6: 0x0002, 0x3ab7: 0x0002, 0x3ab8: 0x0002, 0x3ab9: 0x0002, 0x3aba: 0x0002, 0x3abb: 0x0002,\n\t0x3abc: 0x0002, 0x3abd: 0x0002, 0x3abe: 0x0002, 0x3abf: 0x0002,\n}\n\n// graphemesIndex: 25 blocks, 1600 entries, 1600 bytes\n// Block 0 is the zero block.\nvar graphemesIndex = [1600]property{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01,\n\t0xcc: 0x02, 0xcd: 0x03,\n\t0xd2: 0x04, 0xd6: 0x05, 0xd7: 0x06,\n\t0xd8: 0x07, 0xd9: 0x08, 0xdb: 0x09, 0xdc: 0x0a, 0xdd: 0x0b, 0xde: 0x0c, 0xdf: 0x0d,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,\n\t0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,\n\t0xf0: 0x14, 0xf3: 0x16,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x0e, 0x121: 0x0f, 0x122: 0x10, 0x123: 0x11, 0x124: 0x12, 0x125: 0x13, 0x126: 0x14, 0x127: 0x15,\n\t0x128: 0x16, 0x129: 0x17, 0x12a: 0x18, 0x12b: 0x19, 0x12c: 0x1a, 0x12d: 0x1b, 0x12e: 0x1c, 0x12f: 0x1d,\n\t0x130: 0x1e, 0x131: 0x1f, 0x132: 0x20, 0x133: 0x21, 0x134: 0x22, 0x135: 0x23, 0x136: 0x24, 0x137: 0x25,\n\t0x138: 0x26, 0x139: 0x27, 0x13a: 0x28, 0x13b: 0x29, 0x13c: 0x2a, 0x13d: 0x2b, 0x13e: 0x2c, 0x13f: 0x2d,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x2e, 0x141: 0x2f, 0x142: 0x30, 0x144: 0x31, 0x145: 0x32, 0x146: 0x33, 0x147: 0x34,\n\t0x14d: 0x35,\n\t0x15c: 0x36, 0x15d: 0x37, 0x15e: 0x38, 0x15f: 0x39,\n\t0x160: 0x3a, 0x162: 0x3b, 0x164: 0x3c,\n\t0x168: 0x3d, 0x169: 0x3e, 0x16a: 0x3f, 0x16b: 0x40, 0x16c: 0x41, 0x16d: 0x42, 0x16e: 0x43, 0x16f: 0x44,\n\t0x170: 0x45, 0x173: 0x46, 0x177: 0x02,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x47, 0x181: 0x48, 0x183: 0x49, 0x184: 0x4a, 0x186: 0x4b,\n\t0x18c: 0x4c, 0x18f: 0x4d,\n\t0x193: 0x4e, 0x196: 0x4f, 0x197: 0x50,\n\t0x198: 0x51, 0x199: 0x52, 0x19a: 0x53, 0x19b: 0x54, 0x19c: 0x55, 0x19d: 0x56, 0x19e: 0x57,\n\t0x1a4: 0x58,\n\t0x1ac: 0x59, 0x1ad: 0x5a,\n\t0x1b3: 0x5b, 0x1b5: 0x5c, 0x1b7: 0x5d,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x5e, 0x1c2: 0x5f,\n\t0x1ca: 0x60,\n\t// Block 0x8, offset 0x200\n\t0x219: 0x61, 0x21a: 0x62, 0x21b: 0x63,\n\t0x220: 0x64, 0x222: 0x65, 0x223: 0x66, 0x224: 0x67, 0x225: 0x68, 0x226: 0x69, 0x227: 0x6a,\n\t0x228: 0x6b, 0x229: 0x6c, 0x22a: 0x6d, 0x22b: 0x6e, 0x22f: 0x6f,\n\t0x230: 0x70, 0x231: 0x71, 0x232: 0x72, 0x233: 0x73, 0x234: 0x74, 0x235: 0x75, 0x236: 0x76, 0x237: 0x70,\n\t0x238: 0x71, 0x239: 0x72, 0x23a: 0x73, 0x23b: 0x74, 0x23c: 0x75, 0x23d: 0x76, 0x23e: 0x70, 0x23f: 0x71,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x72, 0x241: 0x73, 0x242: 0x74, 0x243: 0x75, 0x244: 0x76, 0x245: 0x70, 0x246: 0x71, 0x247: 0x72,\n\t0x248: 0x73, 0x249: 0x74, 0x24a: 0x75, 0x24b: 0x76, 0x24c: 0x70, 0x24d: 0x71, 0x24e: 0x72, 0x24f: 0x73,\n\t0x250: 0x74, 0x251: 0x75, 0x252: 0x76, 0x253: 0x70, 0x254: 0x71, 0x255: 0x72, 0x256: 0x73, 0x257: 0x74,\n\t0x258: 0x75, 0x259: 0x76, 0x25a: 0x70, 0x25b: 0x71, 0x25c: 0x72, 0x25d: 0x73, 0x25e: 0x74, 0x25f: 0x75,\n\t0x260: 0x76, 0x261: 0x70, 0x262: 0x71, 0x263: 0x72, 0x264: 0x73, 0x265: 0x74, 0x266: 0x75, 0x267: 0x76,\n\t0x268: 0x70, 0x269: 0x71, 0x26a: 0x72, 0x26b: 0x73, 0x26c: 0x74, 0x26d: 0x75, 0x26e: 0x76, 0x26f: 0x70,\n\t0x270: 0x71, 0x271: 0x72, 0x272: 0x73, 0x273: 0x74, 0x274: 0x75, 0x275: 0x76, 0x276: 0x70, 0x277: 0x71,\n\t0x278: 0x72, 0x279: 0x73, 0x27a: 0x74, 0x27b: 0x75, 0x27c: 0x76, 0x27d: 0x70, 0x27e: 0x71, 0x27f: 0x72,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x73, 0x281: 0x74, 0x282: 0x75, 0x283: 0x76, 0x284: 0x70, 0x285: 0x71, 0x286: 0x72, 0x287: 0x73,\n\t0x288: 0x74, 0x289: 0x75, 0x28a: 0x76, 0x28b: 0x70, 0x28c: 0x71, 0x28d: 0x72, 0x28e: 0x73, 0x28f: 0x74,\n\t0x290: 0x75, 0x291: 0x76, 0x292: 0x70, 0x293: 0x71, 0x294: 0x72, 0x295: 0x73, 0x296: 0x74, 0x297: 0x75,\n\t0x298: 0x76, 0x299: 0x70, 0x29a: 0x71, 0x29b: 0x72, 0x29c: 0x73, 0x29d: 0x74, 0x29e: 0x75, 0x29f: 0x76,\n\t0x2a0: 0x70, 0x2a1: 0x71, 0x2a2: 0x72, 0x2a3: 0x73, 0x2a4: 0x74, 0x2a5: 0x75, 0x2a6: 0x76, 0x2a7: 0x70,\n\t0x2a8: 0x71, 0x2a9: 0x72, 0x2aa: 0x73, 0x2ab: 0x74, 0x2ac: 0x75, 0x2ad: 0x76, 0x2ae: 0x70, 0x2af: 0x71,\n\t0x2b0: 0x72, 0x2b1: 0x73, 0x2b2: 0x74, 0x2b3: 0x75, 0x2b4: 0x76, 0x2b5: 0x70, 0x2b6: 0x71, 0x2b7: 0x72,\n\t0x2b8: 0x73, 0x2b9: 0x74, 0x2ba: 0x75, 0x2bb: 0x76, 0x2bc: 0x70, 0x2bd: 0x71, 0x2be: 0x72, 0x2bf: 0x73,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x74, 0x2c1: 0x75, 0x2c2: 0x76, 0x2c3: 0x70, 0x2c4: 0x71, 0x2c5: 0x72, 0x2c6: 0x73, 0x2c7: 0x74,\n\t0x2c8: 0x75, 0x2c9: 0x76, 0x2ca: 0x70, 0x2cb: 0x71, 0x2cc: 0x72, 0x2cd: 0x73, 0x2ce: 0x74, 0x2cf: 0x75,\n\t0x2d0: 0x76, 0x2d1: 0x70, 0x2d2: 0x71, 0x2d3: 0x72, 0x2d4: 0x73, 0x2d5: 0x74, 0x2d6: 0x75, 0x2d7: 0x76,\n\t0x2d8: 0x70, 0x2d9: 0x71, 0x2da: 0x72, 0x2db: 0x73, 0x2dc: 0x74, 0x2dd: 0x75, 0x2de: 0x77, 0x2df: 0x78,\n\t// Block 0xc, offset 0x300\n\t0x32c: 0x79,\n\t0x338: 0x7a, 0x33b: 0x7b, 0x33e: 0x62, 0x33f: 0x7c,\n\t// Block 0xd, offset 0x340\n\t0x347: 0x7d,\n\t0x34b: 0x7e, 0x34d: 0x7f,\n\t0x368: 0x80, 0x36b: 0x81,\n\t0x374: 0x82, 0x375: 0x83,\n\t0x37a: 0x84, 0x37b: 0x85, 0x37d: 0x86, 0x37e: 0x87,\n\t// Block 0xe, offset 0x380\n\t0x380: 0x88, 0x381: 0x89, 0x382: 0x8a, 0x383: 0x8b, 0x384: 0x8c, 0x385: 0x8d, 0x386: 0x8e, 0x387: 0x8f,\n\t0x388: 0x90, 0x389: 0x91, 0x38b: 0x92, 0x38c: 0x93, 0x38d: 0x94, 0x38e: 0x95, 0x38f: 0x96,\n\t0x390: 0x97, 0x391: 0x98, 0x392: 0x99, 0x393: 0x9a, 0x396: 0x9b, 0x397: 0x9c,\n\t0x398: 0x9d, 0x399: 0x9e, 0x39a: 0x9f, 0x39c: 0xa0,\n\t0x3a0: 0xa1, 0x3a4: 0xa2, 0x3a5: 0xa3, 0x3a7: 0xa4,\n\t0x3a8: 0xa5, 0x3a9: 0xa6, 0x3aa: 0xa7, 0x3ad: 0xa8,\n\t0x3b0: 0xa9, 0x3b2: 0xaa, 0x3b4: 0xab, 0x3b5: 0xac, 0x3b6: 0xad,\n\t0x3bb: 0xae, 0x3bc: 0xaf, 0x3bd: 0xb0,\n\t// Block 0xf, offset 0x3c0\n\t0x3d0: 0xb1, 0x3d1: 0xb2,\n\t// Block 0x10, offset 0x400\n\t0x404: 0xb3,\n\t0x42b: 0xb4, 0x42c: 0xb5,\n\t0x435: 0xb6,\n\t0x43d: 0xb7, 0x43e: 0xb8, 0x43f: 0xb9,\n\t// Block 0x11, offset 0x440\n\t0x472: 0xba,\n\t// Block 0x12, offset 0x480\n\t0x4bc: 0xbb, 0x4bd: 0xbc,\n\t// Block 0x13, offset 0x4c0\n\t0x4c5: 0xbd, 0x4c6: 0xbe,\n\t0x4c9: 0xbf,\n\t0x4e8: 0xc0, 0x4e9: 0xc1, 0x4ea: 0xc2,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xc3, 0x502: 0xc4, 0x504: 0xb5,\n\t0x50a: 0xc5, 0x50b: 0xc6,\n\t0x513: 0xc6, 0x517: 0xc7,\n\t0x51b: 0xc8,\n\t0x523: 0xc9, 0x525: 0xca,\n\t// Block 0x15, offset 0x540\n\t0x540: 0xcb, 0x542: 0xcc, 0x543: 0xcd, 0x545: 0xce, 0x546: 0xcf, 0x547: 0xd0,\n\t0x548: 0xd1, 0x549: 0xd2, 0x54a: 0xd3, 0x54b: 0xd3, 0x54c: 0xd4, 0x54d: 0xd3, 0x54e: 0xd5, 0x54f: 0xd6,\n\t0x550: 0xd3, 0x551: 0xd3, 0x552: 0xd3, 0x553: 0xd7, 0x554: 0xd8, 0x555: 0xd9, 0x556: 0xda, 0x557: 0xdb,\n\t0x558: 0xd3, 0x559: 0xdc, 0x55a: 0xd3, 0x55b: 0xdd, 0x55f: 0xde,\n\t0x560: 0xdf, 0x561: 0xe0, 0x562: 0xe1, 0x563: 0xe2, 0x564: 0xe3, 0x565: 0xe4, 0x566: 0xd3, 0x567: 0xd3,\n\t0x569: 0xe5, 0x56a: 0xd3, 0x56b: 0xd3,\n\t0x570: 0xd3, 0x571: 0xd3, 0x572: 0xd3, 0x573: 0xd3, 0x574: 0xd3, 0x575: 0xd3, 0x576: 0xd3, 0x577: 0xd3,\n\t0x578: 0xd3, 0x579: 0xd3, 0x57a: 0xd3, 0x57b: 0xd3, 0x57c: 0xd3, 0x57d: 0xd3, 0x57e: 0xd3, 0x57f: 0xd8,\n\t// Block 0x16, offset 0x580\n\t0x590: 0x0b, 0x591: 0x0c, 0x593: 0x0d, 0x596: 0x0e,\n\t0x59b: 0x0f, 0x59c: 0x10, 0x59d: 0x11, 0x59e: 0x12, 0x59f: 0x13,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0xe6, 0x5c1: 0x02, 0x5c2: 0xe7, 0x5c3: 0xe7, 0x5c4: 0x02, 0x5c5: 0x02, 0x5c6: 0x02, 0x5c7: 0xe8,\n\t0x5c8: 0xe7, 0x5c9: 0xe7, 0x5ca: 0xe7, 0x5cb: 0xe7, 0x5cc: 0xe7, 0x5cd: 0xe7, 0x5ce: 0xe7, 0x5cf: 0xe7,\n\t0x5d0: 0xe7, 0x5d1: 0xe7, 0x5d2: 0xe7, 0x5d3: 0xe7, 0x5d4: 0xe7, 0x5d5: 0xe7, 0x5d6: 0xe7, 0x5d7: 0xe7,\n\t0x5d8: 0xe7, 0x5d9: 0xe7, 0x5da: 0xe7, 0x5db: 0xe7, 0x5dc: 0xe7, 0x5dd: 0xe7, 0x5de: 0xe7, 0x5df: 0xe7,\n\t0x5e0: 0xe7, 0x5e1: 0xe7, 0x5e2: 0xe7, 0x5e3: 0xe7, 0x5e4: 0xe7, 0x5e5: 0xe7, 0x5e6: 0xe7, 0x5e7: 0xe7,\n\t0x5e8: 0xe7, 0x5e9: 0xe7, 0x5ea: 0xe7, 0x5eb: 0xe7, 0x5ec: 0xe7, 0x5ed: 0xe7, 0x5ee: 0xe7, 0x5ef: 0xe7,\n\t0x5f0: 0xe7, 0x5f1: 0xe7, 0x5f2: 0xe7, 0x5f3: 0xe7, 0x5f4: 0xe7, 0x5f5: 0xe7, 0x5f6: 0xe7, 0x5f7: 0xe7,\n\t0x5f8: 0xe7, 0x5f9: 0xe7, 0x5fa: 0xe7, 0x5fb: 0xe7, 0x5fc: 0xe7, 0x5fd: 0xe7, 0x5fe: 0xe7, 0x5ff: 0xe7,\n\t// Block 0x18, offset 0x600\n\t0x620: 0x15,\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/errdefs/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright The containerd Authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/containerd/errdefs/README.md",
    "content": "# errdefs\n\nA Go package for defining and checking common containerd errors.\n\n## Project details\n\n**errdefs** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).\nAs a containerd sub-project, you will find the:\n * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md),\n * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS),\n * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md)\n\ninformation in our [`containerd/project`](https://github.com/containerd/project) repository.\n"
  },
  {
    "path": "vendor/github.com/containerd/errdefs/errors.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n// Package errdefs defines the common errors used throughout containerd\n// packages.\n//\n// Use with fmt.Errorf to add context to an error.\n//\n// To detect an error class, use the IsXXX functions to tell whether an error\n// is of a certain type.\npackage errdefs\n\nimport (\n\t\"context\"\n\t\"errors\"\n)\n\n// Definitions of common error types used throughout containerd. All containerd\n// errors returned by most packages will map into one of these errors classes.\n// Packages should return errors of these types when they want to instruct a\n// client to take a particular action.\n//\n// These errors map closely to grpc errors.\nvar (\n\tErrUnknown            = errUnknown{}\n\tErrInvalidArgument    = errInvalidArgument{}\n\tErrNotFound           = errNotFound{}\n\tErrAlreadyExists      = errAlreadyExists{}\n\tErrPermissionDenied   = errPermissionDenied{}\n\tErrResourceExhausted  = errResourceExhausted{}\n\tErrFailedPrecondition = errFailedPrecondition{}\n\tErrConflict           = errConflict{}\n\tErrNotModified        = errNotModified{}\n\tErrAborted            = errAborted{}\n\tErrOutOfRange         = errOutOfRange{}\n\tErrNotImplemented     = errNotImplemented{}\n\tErrInternal           = errInternal{}\n\tErrUnavailable        = errUnavailable{}\n\tErrDataLoss           = errDataLoss{}\n\tErrUnauthenticated    = errUnauthorized{}\n)\n\n// cancelled maps to Moby's \"ErrCancelled\"\ntype cancelled interface {\n\tCancelled()\n}\n\n// IsCanceled returns true if the error is due to `context.Canceled`.\nfunc IsCanceled(err error) bool {\n\treturn errors.Is(err, context.Canceled) || isInterface[cancelled](err)\n}\n\ntype errUnknown struct{}\n\nfunc (errUnknown) Error() string { return \"unknown\" }\n\nfunc (errUnknown) Unknown() {}\n\nfunc (e errUnknown) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// unknown maps to Moby's \"ErrUnknown\"\ntype unknown interface {\n\tUnknown()\n}\n\n// IsUnknown returns true if the error is due to an unknown error,\n// unhandled condition or unexpected response.\nfunc IsUnknown(err error) bool {\n\treturn errors.Is(err, errUnknown{}) || isInterface[unknown](err)\n}\n\ntype errInvalidArgument struct{}\n\nfunc (errInvalidArgument) Error() string { return \"invalid argument\" }\n\nfunc (errInvalidArgument) InvalidParameter() {}\n\nfunc (e errInvalidArgument) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// invalidParameter maps to Moby's \"ErrInvalidParameter\"\ntype invalidParameter interface {\n\tInvalidParameter()\n}\n\n// IsInvalidArgument returns true if the error is due to an invalid argument\nfunc IsInvalidArgument(err error) bool {\n\treturn errors.Is(err, ErrInvalidArgument) || isInterface[invalidParameter](err)\n}\n\n// deadlineExceed maps to Moby's \"ErrDeadline\"\ntype deadlineExceeded interface {\n\tDeadlineExceeded()\n}\n\n// IsDeadlineExceeded returns true if the error is due to\n// `context.DeadlineExceeded`.\nfunc IsDeadlineExceeded(err error) bool {\n\treturn errors.Is(err, context.DeadlineExceeded) || isInterface[deadlineExceeded](err)\n}\n\ntype errNotFound struct{}\n\nfunc (errNotFound) Error() string { return \"not found\" }\n\nfunc (errNotFound) NotFound() {}\n\nfunc (e errNotFound) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// notFound maps to Moby's \"ErrNotFound\"\ntype notFound interface {\n\tNotFound()\n}\n\n// IsNotFound returns true if the error is due to a missing object\nfunc IsNotFound(err error) bool {\n\treturn errors.Is(err, ErrNotFound) || isInterface[notFound](err)\n}\n\ntype errAlreadyExists struct{}\n\nfunc (errAlreadyExists) Error() string { return \"already exists\" }\n\nfunc (errAlreadyExists) AlreadyExists() {}\n\nfunc (e errAlreadyExists) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\ntype alreadyExists interface {\n\tAlreadyExists()\n}\n\n// IsAlreadyExists returns true if the error is due to an already existing\n// metadata item\nfunc IsAlreadyExists(err error) bool {\n\treturn errors.Is(err, ErrAlreadyExists) || isInterface[alreadyExists](err)\n}\n\ntype errPermissionDenied struct{}\n\nfunc (errPermissionDenied) Error() string { return \"permission denied\" }\n\nfunc (errPermissionDenied) Forbidden() {}\n\nfunc (e errPermissionDenied) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// forbidden maps to Moby's \"ErrForbidden\"\ntype forbidden interface {\n\tForbidden()\n}\n\n// IsPermissionDenied returns true if the error is due to permission denied\n// or forbidden (403) response\nfunc IsPermissionDenied(err error) bool {\n\treturn errors.Is(err, ErrPermissionDenied) || isInterface[forbidden](err)\n}\n\ntype errResourceExhausted struct{}\n\nfunc (errResourceExhausted) Error() string { return \"resource exhausted\" }\n\nfunc (errResourceExhausted) ResourceExhausted() {}\n\nfunc (e errResourceExhausted) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\ntype resourceExhausted interface {\n\tResourceExhausted()\n}\n\n// IsResourceExhausted returns true if the error is due to\n// a lack of resources or too many attempts.\nfunc IsResourceExhausted(err error) bool {\n\treturn errors.Is(err, errResourceExhausted{}) || isInterface[resourceExhausted](err)\n}\n\ntype errFailedPrecondition struct{}\n\nfunc (e errFailedPrecondition) Error() string { return \"failed precondition\" }\n\nfunc (errFailedPrecondition) FailedPrecondition() {}\n\nfunc (e errFailedPrecondition) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\ntype failedPrecondition interface {\n\tFailedPrecondition()\n}\n\n// IsFailedPrecondition returns true if an operation could not proceed due to\n// the lack of a particular condition\nfunc IsFailedPrecondition(err error) bool {\n\treturn errors.Is(err, errFailedPrecondition{}) || isInterface[failedPrecondition](err)\n}\n\ntype errConflict struct{}\n\nfunc (errConflict) Error() string { return \"conflict\" }\n\nfunc (errConflict) Conflict() {}\n\nfunc (e errConflict) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// conflict maps to Moby's \"ErrConflict\"\ntype conflict interface {\n\tConflict()\n}\n\n// IsConflict returns true if an operation could not proceed due to\n// a conflict.\nfunc IsConflict(err error) bool {\n\treturn errors.Is(err, errConflict{}) || isInterface[conflict](err)\n}\n\ntype errNotModified struct{}\n\nfunc (errNotModified) Error() string { return \"not modified\" }\n\nfunc (errNotModified) NotModified() {}\n\nfunc (e errNotModified) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// notModified maps to Moby's \"ErrNotModified\"\ntype notModified interface {\n\tNotModified()\n}\n\n// IsNotModified returns true if an operation could not proceed due\n// to an object not modified from a previous state.\nfunc IsNotModified(err error) bool {\n\treturn errors.Is(err, errNotModified{}) || isInterface[notModified](err)\n}\n\ntype errAborted struct{}\n\nfunc (errAborted) Error() string { return \"aborted\" }\n\nfunc (errAborted) Aborted() {}\n\nfunc (e errAborted) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\ntype aborted interface {\n\tAborted()\n}\n\n// IsAborted returns true if an operation was aborted.\nfunc IsAborted(err error) bool {\n\treturn errors.Is(err, errAborted{}) || isInterface[aborted](err)\n}\n\ntype errOutOfRange struct{}\n\nfunc (errOutOfRange) Error() string { return \"out of range\" }\n\nfunc (errOutOfRange) OutOfRange() {}\n\nfunc (e errOutOfRange) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\ntype outOfRange interface {\n\tOutOfRange()\n}\n\n// IsOutOfRange returns true if an operation could not proceed due\n// to data being out of the expected range.\nfunc IsOutOfRange(err error) bool {\n\treturn errors.Is(err, errOutOfRange{}) || isInterface[outOfRange](err)\n}\n\ntype errNotImplemented struct{}\n\nfunc (errNotImplemented) Error() string { return \"not implemented\" }\n\nfunc (errNotImplemented) NotImplemented() {}\n\nfunc (e errNotImplemented) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// notImplemented maps to Moby's \"ErrNotImplemented\"\ntype notImplemented interface {\n\tNotImplemented()\n}\n\n// IsNotImplemented returns true if the error is due to not being implemented\nfunc IsNotImplemented(err error) bool {\n\treturn errors.Is(err, errNotImplemented{}) || isInterface[notImplemented](err)\n}\n\ntype errInternal struct{}\n\nfunc (errInternal) Error() string { return \"internal\" }\n\nfunc (errInternal) System() {}\n\nfunc (e errInternal) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// system maps to Moby's \"ErrSystem\"\ntype system interface {\n\tSystem()\n}\n\n// IsInternal returns true if the error returns to an internal or system error\nfunc IsInternal(err error) bool {\n\treturn errors.Is(err, errInternal{}) || isInterface[system](err)\n}\n\ntype errUnavailable struct{}\n\nfunc (errUnavailable) Error() string { return \"unavailable\" }\n\nfunc (errUnavailable) Unavailable() {}\n\nfunc (e errUnavailable) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// unavailable maps to Moby's \"ErrUnavailable\"\ntype unavailable interface {\n\tUnavailable()\n}\n\n// IsUnavailable returns true if the error is due to a resource being unavailable\nfunc IsUnavailable(err error) bool {\n\treturn errors.Is(err, errUnavailable{}) || isInterface[unavailable](err)\n}\n\ntype errDataLoss struct{}\n\nfunc (errDataLoss) Error() string { return \"data loss\" }\n\nfunc (errDataLoss) DataLoss() {}\n\nfunc (e errDataLoss) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// dataLoss maps to Moby's \"ErrDataLoss\"\ntype dataLoss interface {\n\tDataLoss()\n}\n\n// IsDataLoss returns true if data during an operation was lost or corrupted\nfunc IsDataLoss(err error) bool {\n\treturn errors.Is(err, errDataLoss{}) || isInterface[dataLoss](err)\n}\n\ntype errUnauthorized struct{}\n\nfunc (errUnauthorized) Error() string { return \"unauthorized\" }\n\nfunc (errUnauthorized) Unauthorized() {}\n\nfunc (e errUnauthorized) WithMessage(msg string) error {\n\treturn customMessage{e, msg}\n}\n\n// unauthorized maps to Moby's \"ErrUnauthorized\"\ntype unauthorized interface {\n\tUnauthorized()\n}\n\n// IsUnauthorized returns true if the error indicates that the user was\n// unauthenticated or unauthorized.\nfunc IsUnauthorized(err error) bool {\n\treturn errors.Is(err, errUnauthorized{}) || isInterface[unauthorized](err)\n}\n\nfunc isInterface[T any](err error) bool {\n\tfor {\n\t\tswitch x := err.(type) {\n\t\tcase T:\n\t\t\treturn true\n\t\tcase customMessage:\n\t\t\terr = x.err\n\t\tcase interface{ Unwrap() error }:\n\t\t\terr = x.Unwrap()\n\t\t\tif err == nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\tcase interface{ Unwrap() []error }:\n\t\t\tfor _, err := range x.Unwrap() {\n\t\t\t\tif isInterface[T](err) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n}\n\n// customMessage is used to provide a defined error with a custom message.\n// The message is not wrapped but can be compared by the `Is(error) bool` interface.\ntype customMessage struct {\n\terr error\n\tmsg string\n}\n\nfunc (c customMessage) Is(err error) bool {\n\treturn c.err == err\n}\n\nfunc (c customMessage) As(target any) bool {\n\treturn errors.As(c.err, target)\n}\n\nfunc (c customMessage) Error() string {\n\treturn c.msg\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/errdefs/pkg/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright The containerd Authors\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/containerd/errdefs/pkg/errhttp/http.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n// Package errhttp provides utility functions for translating errors to\n// and from a HTTP context.\n//\n// The functions ToHTTP and ToNative can be used to map server-side and\n// client-side errors to the correct types.\npackage errhttp\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\n\t\"github.com/containerd/errdefs\"\n\t\"github.com/containerd/errdefs/pkg/internal/cause\"\n)\n\n// ToHTTP returns the best status code for the given error\nfunc ToHTTP(err error) int {\n\tswitch {\n\tcase errdefs.IsNotFound(err):\n\t\treturn http.StatusNotFound\n\tcase errdefs.IsInvalidArgument(err):\n\t\treturn http.StatusBadRequest\n\tcase errdefs.IsConflict(err):\n\t\treturn http.StatusConflict\n\tcase errdefs.IsNotModified(err):\n\t\treturn http.StatusNotModified\n\tcase errdefs.IsFailedPrecondition(err):\n\t\treturn http.StatusPreconditionFailed\n\tcase errdefs.IsUnauthorized(err):\n\t\treturn http.StatusUnauthorized\n\tcase errdefs.IsPermissionDenied(err):\n\t\treturn http.StatusForbidden\n\tcase errdefs.IsResourceExhausted(err):\n\t\treturn http.StatusTooManyRequests\n\tcase errdefs.IsInternal(err):\n\t\treturn http.StatusInternalServerError\n\tcase errdefs.IsNotImplemented(err):\n\t\treturn http.StatusNotImplemented\n\tcase errdefs.IsUnavailable(err):\n\t\treturn http.StatusServiceUnavailable\n\tcase errdefs.IsUnknown(err):\n\t\tvar unexpected cause.ErrUnexpectedStatus\n\t\tif errors.As(err, &unexpected) && unexpected.Status >= 200 && unexpected.Status < 600 {\n\t\t\treturn unexpected.Status\n\t\t}\n\t\treturn http.StatusInternalServerError\n\tdefault:\n\t\treturn http.StatusInternalServerError\n\t}\n}\n\n// ToNative returns the error best matching the HTTP status code\nfunc ToNative(statusCode int) error {\n\tswitch statusCode {\n\tcase http.StatusNotFound:\n\t\treturn errdefs.ErrNotFound\n\tcase http.StatusBadRequest:\n\t\treturn errdefs.ErrInvalidArgument\n\tcase http.StatusConflict:\n\t\treturn errdefs.ErrConflict\n\tcase http.StatusPreconditionFailed:\n\t\treturn errdefs.ErrFailedPrecondition\n\tcase http.StatusUnauthorized:\n\t\treturn errdefs.ErrUnauthenticated\n\tcase http.StatusForbidden:\n\t\treturn errdefs.ErrPermissionDenied\n\tcase http.StatusNotModified:\n\t\treturn errdefs.ErrNotModified\n\tcase http.StatusTooManyRequests:\n\t\treturn errdefs.ErrResourceExhausted\n\tcase http.StatusInternalServerError:\n\t\treturn errdefs.ErrInternal\n\tcase http.StatusNotImplemented:\n\t\treturn errdefs.ErrNotImplemented\n\tcase http.StatusServiceUnavailable:\n\t\treturn errdefs.ErrUnavailable\n\tdefault:\n\t\treturn cause.ErrUnexpectedStatus{Status: statusCode}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n// Package cause is used to define root causes for errors\n// common to errors packages like grpc and http.\npackage cause\n\nimport \"fmt\"\n\ntype ErrUnexpectedStatus struct {\n\tStatus int\n}\n\nconst UnexpectedStatusPrefix = \"unexpected status \"\n\nfunc (e ErrUnexpectedStatus) Error() string {\n\treturn fmt.Sprintf(\"%s%d\", UnexpectedStatusPrefix, e.Status)\n}\n\nfunc (ErrUnexpectedStatus) Unknown() {}\n"
  },
  {
    "path": "vendor/github.com/containerd/errdefs/resolve.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage errdefs\n\nimport \"context\"\n\n// Resolve returns the first error found in the error chain which matches an\n// error defined in this package or context error. A raw, unwrapped error is\n// returned or ErrUnknown if no matching error is found.\n//\n// This is useful for determining a response code based on the outermost wrapped\n// error rather than the original cause. For example, a not found error deep\n// in the code may be wrapped as an invalid argument. When determining status\n// code from Is* functions, the depth or ordering of the error is not\n// considered.\n//\n// The search order is depth first, a wrapped error returned from any part of\n// the chain from `Unwrap() error` will be returned before any joined errors\n// as returned by `Unwrap() []error`.\nfunc Resolve(err error) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\terr = firstError(err)\n\tif err == nil {\n\t\terr = ErrUnknown\n\t}\n\treturn err\n}\n\nfunc firstError(err error) error {\n\tfor {\n\t\tswitch err {\n\t\tcase ErrUnknown,\n\t\t\tErrInvalidArgument,\n\t\t\tErrNotFound,\n\t\t\tErrAlreadyExists,\n\t\t\tErrPermissionDenied,\n\t\t\tErrResourceExhausted,\n\t\t\tErrFailedPrecondition,\n\t\t\tErrConflict,\n\t\t\tErrNotModified,\n\t\t\tErrAborted,\n\t\t\tErrOutOfRange,\n\t\t\tErrNotImplemented,\n\t\t\tErrInternal,\n\t\t\tErrUnavailable,\n\t\t\tErrDataLoss,\n\t\t\tErrUnauthenticated,\n\t\t\tcontext.DeadlineExceeded,\n\t\t\tcontext.Canceled:\n\t\t\treturn err\n\t\t}\n\t\tswitch e := err.(type) {\n\t\tcase customMessage:\n\t\t\terr = e.err\n\t\tcase unknown:\n\t\t\treturn ErrUnknown\n\t\tcase invalidParameter:\n\t\t\treturn ErrInvalidArgument\n\t\tcase notFound:\n\t\t\treturn ErrNotFound\n\t\tcase alreadyExists:\n\t\t\treturn ErrAlreadyExists\n\t\tcase forbidden:\n\t\t\treturn ErrPermissionDenied\n\t\tcase resourceExhausted:\n\t\t\treturn ErrResourceExhausted\n\t\tcase failedPrecondition:\n\t\t\treturn ErrFailedPrecondition\n\t\tcase conflict:\n\t\t\treturn ErrConflict\n\t\tcase notModified:\n\t\t\treturn ErrNotModified\n\t\tcase aborted:\n\t\t\treturn ErrAborted\n\t\tcase errOutOfRange:\n\t\t\treturn ErrOutOfRange\n\t\tcase notImplemented:\n\t\t\treturn ErrNotImplemented\n\t\tcase system:\n\t\t\treturn ErrInternal\n\t\tcase unavailable:\n\t\t\treturn ErrUnavailable\n\t\tcase dataLoss:\n\t\t\treturn ErrDataLoss\n\t\tcase unauthorized:\n\t\t\treturn ErrUnauthenticated\n\t\tcase deadlineExceeded:\n\t\t\treturn context.DeadlineExceeded\n\t\tcase cancelled:\n\t\t\treturn context.Canceled\n\t\tcase interface{ Unwrap() error }:\n\t\t\terr = e.Unwrap()\n\t\t\tif err == nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\tcase interface{ Unwrap() []error }:\n\t\t\tfor _, ue := range e.Unwrap() {\n\t\t\t\tif fe := firstError(ue); fe != nil {\n\t\t\t\t\treturn fe\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\tcase interface{ Is(error) bool }:\n\t\t\tfor _, target := range []error{ErrUnknown,\n\t\t\t\tErrInvalidArgument,\n\t\t\t\tErrNotFound,\n\t\t\t\tErrAlreadyExists,\n\t\t\t\tErrPermissionDenied,\n\t\t\t\tErrResourceExhausted,\n\t\t\t\tErrFailedPrecondition,\n\t\t\t\tErrConflict,\n\t\t\t\tErrNotModified,\n\t\t\t\tErrAborted,\n\t\t\t\tErrOutOfRange,\n\t\t\t\tErrNotImplemented,\n\t\t\t\tErrInternal,\n\t\t\t\tErrUnavailable,\n\t\t\t\tErrDataLoss,\n\t\t\t\tErrUnauthenticated,\n\t\t\t\tcontext.DeadlineExceeded,\n\t\t\t\tcontext.Canceled} {\n\t\t\t\tif e.Is(target) {\n\t\t\t\t\treturn target\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE",
    "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 [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": "vendor/github.com/containerd/stargz-snapshotter/estargz/build.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY 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   Copyright 2019 The Go Authors. All rights reserved.\n   Use of this source code is governed by a BSD-style\n   license that can be found in the LICENSE file.\n*/\n\npackage estargz\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"github.com/containerd/stargz-snapshotter/estargz/errorutil\"\n\t\"github.com/klauspost/compress/zstd\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"golang.org/x/sync/errgroup\"\n)\n\ntype GzipHelperFunc func(io.Reader) (io.ReadCloser, error)\n\ntype options struct {\n\tchunkSize              int\n\tcompressionLevel       int\n\tprioritizedFiles       []string\n\tmissedPrioritizedFiles *[]string\n\tcompression            Compression\n\tctx                    context.Context\n\tminChunkSize           int\n\tgzipHelperFunc         GzipHelperFunc\n}\n\ntype Option func(o *options) error\n\n// WithChunkSize option specifies the chunk size of eStargz blob to build.\nfunc WithChunkSize(chunkSize int) Option {\n\treturn func(o *options) error {\n\t\to.chunkSize = chunkSize\n\t\treturn nil\n\t}\n}\n\n// WithCompressionLevel option specifies the gzip compression level.\n// The default is gzip.BestCompression.\n// This option will be ignored if WithCompression option is used.\n// See also: https://godoc.org/compress/gzip#pkg-constants\nfunc WithCompressionLevel(level int) Option {\n\treturn func(o *options) error {\n\t\to.compressionLevel = level\n\t\treturn nil\n\t}\n}\n\n// WithPrioritizedFiles option specifies the list of prioritized files.\n// These files must be complete paths that are absolute or relative to \"/\"\n// For example, all of \"foo/bar\", \"/foo/bar\", \"./foo/bar\" and \"../foo/bar\"\n// are treated as \"/foo/bar\".\nfunc WithPrioritizedFiles(files []string) Option {\n\treturn func(o *options) error {\n\t\to.prioritizedFiles = files\n\t\treturn nil\n\t}\n}\n\n// WithAllowPrioritizeNotFound makes Build continue the execution even if some\n// of prioritized files specified by WithPrioritizedFiles option aren't found\n// in the input tar. Instead, this records all missed file names to the passed\n// slice.\nfunc WithAllowPrioritizeNotFound(missedFiles *[]string) Option {\n\treturn func(o *options) error {\n\t\tif missedFiles == nil {\n\t\t\treturn fmt.Errorf(\"WithAllowPrioritizeNotFound: slice must be passed\")\n\t\t}\n\t\to.missedPrioritizedFiles = missedFiles\n\t\treturn nil\n\t}\n}\n\n// WithCompression specifies compression algorithm to be used.\n// Default is gzip.\nfunc WithCompression(compression Compression) Option {\n\treturn func(o *options) error {\n\t\to.compression = compression\n\t\treturn nil\n\t}\n}\n\n// WithContext specifies a context that can be used for clean canceleration.\nfunc WithContext(ctx context.Context) Option {\n\treturn func(o *options) error {\n\t\to.ctx = ctx\n\t\treturn nil\n\t}\n}\n\n// WithMinChunkSize option specifies the minimal number of bytes of data\n// must be written in one gzip stream.\n// By increasing this number, one gzip stream can contain multiple files\n// and it hopefully leads to smaller result blob.\n// NOTE: This adds a TOC property that old reader doesn't understand.\nfunc WithMinChunkSize(minChunkSize int) Option {\n\treturn func(o *options) error {\n\t\to.minChunkSize = minChunkSize\n\t\treturn nil\n\t}\n}\n\n// WithGzipHelperFunc option specifies a custom function to decompress gzip-compressed layers.\n// When a gzip-compressed layer is detected, this function will be used instead of the\n// Go standard library gzip decompression for better performance.\n// The function should take an io.Reader as input and return an io.ReadCloser.\n// If nil, the Go standard library gzip.NewReader will be used.\nfunc WithGzipHelperFunc(gzipHelperFunc GzipHelperFunc) Option {\n\treturn func(o *options) error {\n\t\to.gzipHelperFunc = gzipHelperFunc\n\t\treturn nil\n\t}\n}\n\n// Blob is an eStargz blob.\ntype Blob struct {\n\tio.ReadCloser\n\tdiffID           digest.Digester\n\ttocDigest        digest.Digest\n\treadCompleted    *atomic.Bool\n\tuncompressedSize *atomic.Int64\n}\n\n// DiffID returns the digest of uncompressed blob.\n// It is only valid to call DiffID after Close.\nfunc (b *Blob) DiffID() digest.Digest {\n\treturn b.diffID.Digest()\n}\n\n// TOCDigest returns the digest of uncompressed TOC JSON.\nfunc (b *Blob) TOCDigest() digest.Digest {\n\treturn b.tocDigest\n}\n\n// UncompressedSize returns the size of uncompressed blob.\n// UncompressedSize should only be called after the blob has been fully read.\nfunc (b *Blob) UncompressedSize() (int64, error) {\n\tswitch {\n\tcase b.uncompressedSize == nil || b.readCompleted == nil:\n\t\treturn -1, fmt.Errorf(\"readCompleted or uncompressedSize is not initialized\")\n\tcase !b.readCompleted.Load():\n\t\treturn -1, fmt.Errorf(\"called UncompressedSize before the blob has been fully read\")\n\tdefault:\n\t\treturn b.uncompressedSize.Load(), nil\n\t}\n}\n\n// Build builds an eStargz blob which is an extended version of stargz, from a blob (gzip, zstd\n// or plain tar) passed through the argument. If there are some prioritized files are listed in\n// the option, these files are grouped as \"prioritized\" and can be used for runtime optimization\n// (e.g. prefetch). This function builds a blob in parallel, with dividing that blob into several\n// (at least the number of runtime.GOMAXPROCS(0)) sub-blobs.\nfunc Build(tarBlob *io.SectionReader, opt ...Option) (_ *Blob, rErr error) {\n\tvar opts options\n\topts.compressionLevel = gzip.BestCompression // BestCompression by default\n\tfor _, o := range opt {\n\t\tif err := o(&opts); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif opts.compression == nil {\n\t\topts.compression = newGzipCompressionWithLevel(opts.compressionLevel)\n\t}\n\tlayerFiles := newTempFiles()\n\tctx := opts.ctx\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\tdone := make(chan struct{})\n\tdefer close(done)\n\tgo func() {\n\t\tselect {\n\t\tcase <-done:\n\t\t\t// nop\n\t\tcase <-ctx.Done():\n\t\t\tlayerFiles.CleanupAll()\n\t\t}\n\t}()\n\tdefer func() {\n\t\tif rErr != nil {\n\t\t\tif err := layerFiles.CleanupAll(); err != nil {\n\t\t\t\trErr = fmt.Errorf(\"failed to cleanup tmp files: %v: %w\", err, rErr)\n\t\t\t}\n\t\t}\n\t\tif cErr := ctx.Err(); cErr != nil {\n\t\t\trErr = fmt.Errorf(\"error from context %q: %w\", cErr, rErr)\n\t\t}\n\t}()\n\ttarBlob, err := decompressBlob(tarBlob, layerFiles, opts.gzipHelperFunc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tentries, err := sortEntries(tarBlob, opts.prioritizedFiles, opts.missedPrioritizedFiles)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar tarParts [][]*entry\n\tif opts.minChunkSize > 0 {\n\t\t// Each entry needs to know the size of the current gzip stream so they\n\t\t// cannot be processed in parallel.\n\t\ttarParts = [][]*entry{entries}\n\t} else {\n\t\ttarParts = divideEntries(entries, runtime.GOMAXPROCS(0))\n\t}\n\twriters := make([]*Writer, len(tarParts))\n\tpayloads := make([]*os.File, len(tarParts))\n\tvar mu sync.Mutex\n\tvar eg errgroup.Group\n\tfor i, parts := range tarParts {\n\t\ti, parts := i, parts\n\t\t// builds verifiable stargz sub-blobs\n\t\teg.Go(func() error {\n\t\t\tesgzFile, err := layerFiles.TempFile(\"\", \"esgzdata\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tsw := NewWriterWithCompressor(esgzFile, opts.compression)\n\t\t\tsw.ChunkSize = opts.chunkSize\n\t\t\tsw.MinChunkSize = opts.minChunkSize\n\t\t\tif sw.needsOpenGzEntries == nil {\n\t\t\t\tsw.needsOpenGzEntries = make(map[string]struct{})\n\t\t\t}\n\t\t\tfor _, f := range []string{PrefetchLandmark, NoPrefetchLandmark} {\n\t\t\t\tsw.needsOpenGzEntries[f] = struct{}{}\n\t\t\t}\n\t\t\tif err := sw.AppendTar(readerFromEntries(parts...)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tmu.Lock()\n\t\t\twriters[i] = sw\n\t\t\tpayloads[i] = esgzFile\n\t\t\tmu.Unlock()\n\t\t\treturn nil\n\t\t})\n\t}\n\tif err := eg.Wait(); err != nil {\n\t\trErr = err\n\t\treturn nil, err\n\t}\n\ttocAndFooter, tocDgst, err := closeWithCombine(writers...)\n\tif err != nil {\n\t\trErr = err\n\t\treturn nil, err\n\t}\n\tvar rs []io.Reader\n\tfor _, p := range payloads {\n\t\tfs, err := fileSectionReader(p)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trs = append(rs, fs)\n\t}\n\tdiffID := digest.Canonical.Digester()\n\tpr, pw := io.Pipe()\n\treadCompleted := new(atomic.Bool)\n\tuncompressedSize := new(atomic.Int64)\n\tgo func() {\n\t\tvar size int64\n\t\tvar decompressFunc func(io.Reader) (io.ReadCloser, error)\n\t\tif _, ok := opts.compression.(*gzipCompression); ok && opts.gzipHelperFunc != nil {\n\t\t\tdecompressFunc = opts.gzipHelperFunc\n\t\t} else {\n\t\t\tdecompressFunc = opts.compression.Reader\n\t\t}\n\t\tdecompressR, err := decompressFunc(io.TeeReader(io.MultiReader(append(rs, tocAndFooter)...), pw))\n\t\tif err != nil {\n\t\t\tpw.CloseWithError(err)\n\t\t\treturn\n\t\t}\n\t\tdefer decompressR.Close()\n\t\tif size, err = io.Copy(diffID.Hash(), decompressR); err != nil {\n\t\t\tpw.CloseWithError(err)\n\t\t\treturn\n\t\t}\n\t\tuncompressedSize.Store(size)\n\t\treadCompleted.Store(true)\n\t\tpw.Close()\n\t}()\n\treturn &Blob{\n\t\tReadCloser: readCloser{\n\t\t\tReader:    pr,\n\t\t\tcloseFunc: layerFiles.CleanupAll,\n\t\t},\n\t\ttocDigest:        tocDgst,\n\t\tdiffID:           diffID,\n\t\treadCompleted:    readCompleted,\n\t\tuncompressedSize: uncompressedSize,\n\t}, nil\n}\n\n// closeWithCombine takes unclosed Writers and close them. This also returns the\n// toc that combined all Writers into.\n// Writers doesn't write TOC and footer to the underlying writers so they can be\n// combined into a single eStargz and tocAndFooter returned by this function can\n// be appended at the tail of that combined blob.\nfunc closeWithCombine(ws ...*Writer) (tocAndFooterR io.Reader, tocDgst digest.Digest, err error) {\n\tif len(ws) == 0 {\n\t\treturn nil, \"\", fmt.Errorf(\"at least one writer must be passed\")\n\t}\n\tfor _, w := range ws {\n\t\tif w.closed {\n\t\t\treturn nil, \"\", fmt.Errorf(\"writer must be unclosed\")\n\t\t}\n\t\tdefer func(w *Writer) { w.closed = true }(w)\n\t\tif err := w.closeGz(); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tif err := w.bw.Flush(); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t}\n\tvar (\n\t\tmtoc          = new(JTOC)\n\t\tcurrentOffset int64\n\t)\n\tmtoc.Version = ws[0].toc.Version\n\tfor _, w := range ws {\n\t\tfor _, e := range w.toc.Entries {\n\t\t\t// Recalculate Offset of non-empty files/chunks\n\t\t\tif (e.Type == \"reg\" && e.Size > 0) || e.Type == \"chunk\" {\n\t\t\t\te.Offset += currentOffset\n\t\t\t}\n\t\t\tmtoc.Entries = append(mtoc.Entries, e)\n\t\t}\n\t\tif w.toc.Version > mtoc.Version {\n\t\t\tmtoc.Version = w.toc.Version\n\t\t}\n\t\tcurrentOffset += w.cw.n\n\t}\n\n\treturn tocAndFooter(ws[0].compressor, mtoc, currentOffset)\n}\n\nfunc tocAndFooter(compressor Compressor, toc *JTOC, offset int64) (io.Reader, digest.Digest, error) {\n\tbuf := new(bytes.Buffer)\n\ttocDigest, err := compressor.WriteTOCAndFooter(buf, offset, toc, nil)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn buf, tocDigest, nil\n}\n\n// divideEntries divides passed entries to the parts at least the number specified by the\n// argument.\nfunc divideEntries(entries []*entry, minPartsNum int) (set [][]*entry) {\n\tvar estimatedSize int64\n\tfor _, e := range entries {\n\t\testimatedSize += e.header.Size\n\t}\n\tunitSize := estimatedSize / int64(minPartsNum)\n\tvar (\n\t\tnextEnd = unitSize\n\t\toffset  int64\n\t)\n\tset = append(set, []*entry{})\n\tfor _, e := range entries {\n\t\tset[len(set)-1] = append(set[len(set)-1], e)\n\t\toffset += e.header.Size\n\t\tif offset > nextEnd {\n\t\t\tset = append(set, []*entry{})\n\t\t\tnextEnd += unitSize\n\t\t}\n\t}\n\treturn\n}\n\nvar errNotFound = errors.New(\"not found\")\n\n// sortEntries reads the specified tar blob and returns a list of tar entries.\n// If some of prioritized files are specified, the list starts from these\n// files with keeping the order specified by the argument.\nfunc sortEntries(in io.ReaderAt, prioritized []string, missedPrioritized *[]string) ([]*entry, error) {\n\n\t// Import tar file.\n\tintar, err := importTar(in)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to sort: %w\", err)\n\t}\n\n\t// Sort the tar file respecting to the prioritized files list.\n\tsorted := &tarFile{}\n\tpicked := make(map[string]struct{})\n\tfor _, l := range prioritized {\n\t\tif err := moveRec(l, intar, sorted, picked); err != nil {\n\t\t\tif errors.Is(err, errNotFound) && missedPrioritized != nil {\n\t\t\t\t*missedPrioritized = append(*missedPrioritized, l)\n\t\t\t\tcontinue // allow not found\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"failed to sort tar entries: %w\", err)\n\t\t}\n\t}\n\tif len(prioritized) == 0 {\n\t\tsorted.add(&entry{\n\t\t\theader: &tar.Header{\n\t\t\t\tName:     NoPrefetchLandmark,\n\t\t\t\tTypeflag: tar.TypeReg,\n\t\t\t\tSize:     int64(len([]byte{landmarkContents})),\n\t\t\t},\n\t\t\tpayload: bytes.NewReader([]byte{landmarkContents}),\n\t\t})\n\t} else {\n\t\tsorted.add(&entry{\n\t\t\theader: &tar.Header{\n\t\t\t\tName:     PrefetchLandmark,\n\t\t\t\tTypeflag: tar.TypeReg,\n\t\t\t\tSize:     int64(len([]byte{landmarkContents})),\n\t\t\t},\n\t\t\tpayload: bytes.NewReader([]byte{landmarkContents}),\n\t\t})\n\t}\n\n\t// Dump prioritized entries followed by the rest entries while skipping picked ones.\n\treturn append(sorted.dump(nil), intar.dump(picked)...), nil\n}\n\n// readerFromEntries returns a reader of tar archive that contains entries passed\n// through the arguments.\nfunc readerFromEntries(entries ...*entry) io.Reader {\n\tpr, pw := io.Pipe()\n\tgo func() {\n\t\ttw := tar.NewWriter(pw)\n\t\tdefer tw.Close()\n\t\tfor _, entry := range entries {\n\t\t\tif err := tw.WriteHeader(entry.header); err != nil {\n\t\t\t\tpw.CloseWithError(fmt.Errorf(\"failed to write tar header: %v\", err))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif _, err := io.Copy(tw, entry.payload); err != nil {\n\t\t\t\tpw.CloseWithError(fmt.Errorf(\"failed to write tar payload: %v\", err))\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tpw.Close()\n\t}()\n\treturn pr\n}\n\nfunc importTar(in io.ReaderAt) (*tarFile, error) {\n\ttf := &tarFile{}\n\tpw, err := newCountReadSeeker(in)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to make position watcher: %w\", err)\n\t}\n\ttr := tar.NewReader(pw)\n\n\t// Walk through all nodes.\n\tfor {\n\t\t// Fetch and parse next header.\n\t\th, err := tr.Next()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"failed to parse tar file, %w\", err)\n\t\t}\n\t\tswitch cleanEntryName(h.Name) {\n\t\tcase PrefetchLandmark, NoPrefetchLandmark:\n\t\t\t// Ignore existing landmark\n\t\t\tcontinue\n\t\t}\n\n\t\t// Add entry. If it already exists, replace it.\n\t\tif _, ok := tf.get(h.Name); ok {\n\t\t\ttf.remove(h.Name)\n\t\t}\n\t\ttf.add(&entry{\n\t\t\theader:  h,\n\t\t\tpayload: io.NewSectionReader(in, pw.currentPos(), h.Size),\n\t\t})\n\t}\n\n\treturn tf, nil\n}\n\nfunc moveRec(name string, in *tarFile, out *tarFile, picked map[string]struct{}) error {\n\tname = cleanEntryName(name)\n\tif name == \"\" { // root directory. stop recursion.\n\t\tif e, ok := in.get(name); ok {\n\t\t\t// entry of the root directory exists. we should move it as well.\n\t\t\t// this case will occur if tar entries are prefixed with \"./\", \"/\", etc.\n\t\t\tif _, done := picked[name]; !done {\n\t\t\t\tout.add(e)\n\t\t\t\tpicked[name] = struct{}{}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\t_, okIn := in.get(name)\n\t_, okOut := out.get(name)\n\t_, okPicked := picked[name]\n\tif !okIn && !okOut && !okPicked {\n\t\treturn fmt.Errorf(\"file: %q: %w\", name, errNotFound)\n\t}\n\n\tparent, _ := path.Split(strings.TrimSuffix(name, \"/\"))\n\tif err := moveRec(parent, in, out, picked); err != nil {\n\t\treturn err\n\t}\n\tif e, ok := in.get(name); ok && e.header.Typeflag == tar.TypeLink {\n\t\tif err := moveRec(e.header.Linkname, in, out, picked); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif _, done := picked[name]; done {\n\t\treturn nil\n\t}\n\tif e, ok := in.get(name); ok {\n\t\tout.add(e)\n\t\tpicked[name] = struct{}{}\n\t}\n\treturn nil\n}\n\ntype entry struct {\n\theader  *tar.Header\n\tpayload io.ReadSeeker\n}\n\ntype tarFile struct {\n\tindex  map[string]*entry\n\tstream []*entry\n}\n\nfunc (f *tarFile) add(e *entry) {\n\tif f.index == nil {\n\t\tf.index = make(map[string]*entry)\n\t}\n\tf.index[cleanEntryName(e.header.Name)] = e\n\tf.stream = append(f.stream, e)\n}\n\nfunc (f *tarFile) remove(name string) {\n\tname = cleanEntryName(name)\n\tif f.index != nil {\n\t\tdelete(f.index, name)\n\t}\n\tvar filtered []*entry\n\tfor _, e := range f.stream {\n\t\tif cleanEntryName(e.header.Name) == name {\n\t\t\tcontinue\n\t\t}\n\t\tfiltered = append(filtered, e)\n\t}\n\tf.stream = filtered\n}\n\nfunc (f *tarFile) get(name string) (e *entry, ok bool) {\n\tif f.index == nil {\n\t\treturn nil, false\n\t}\n\te, ok = f.index[cleanEntryName(name)]\n\treturn\n}\n\nfunc (f *tarFile) dump(skip map[string]struct{}) []*entry {\n\tif len(skip) == 0 {\n\t\treturn f.stream\n\t}\n\tvar out []*entry\n\tfor _, e := range f.stream {\n\t\tif _, ok := skip[cleanEntryName(e.header.Name)]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tout = append(out, e)\n\t}\n\treturn out\n}\n\ntype readCloser struct {\n\tio.Reader\n\tcloseFunc func() error\n}\n\nfunc (rc readCloser) Close() error {\n\treturn rc.closeFunc()\n}\n\nfunc fileSectionReader(file *os.File) (*io.SectionReader, error) {\n\tinfo, err := file.Stat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn io.NewSectionReader(file, 0, info.Size()), nil\n}\n\nfunc newTempFiles() *tempFiles {\n\treturn &tempFiles{}\n}\n\ntype tempFiles struct {\n\tfiles       []*os.File\n\tfilesMu     sync.Mutex\n\tcleanupOnce sync.Once\n}\n\nfunc (tf *tempFiles) TempFile(dir, pattern string) (*os.File, error) {\n\tf, err := os.CreateTemp(dir, pattern)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttf.filesMu.Lock()\n\ttf.files = append(tf.files, f)\n\ttf.filesMu.Unlock()\n\treturn f, nil\n}\n\nfunc (tf *tempFiles) CleanupAll() (err error) {\n\ttf.cleanupOnce.Do(func() {\n\t\terr = tf.cleanupAll()\n\t})\n\treturn\n}\n\nfunc (tf *tempFiles) cleanupAll() error {\n\ttf.filesMu.Lock()\n\tdefer tf.filesMu.Unlock()\n\tvar allErr []error\n\tfor _, f := range tf.files {\n\t\tif err := f.Close(); err != nil {\n\t\t\tallErr = append(allErr, err)\n\t\t}\n\t\tif err := os.Remove(f.Name()); err != nil {\n\t\t\tallErr = append(allErr, err)\n\t\t}\n\t}\n\ttf.files = nil\n\treturn errorutil.Aggregate(allErr)\n}\n\nfunc newCountReadSeeker(r io.ReaderAt) (*countReadSeeker, error) {\n\tpos := int64(0)\n\treturn &countReadSeeker{r: r, cPos: &pos}, nil\n}\n\ntype countReadSeeker struct {\n\tr    io.ReaderAt\n\tcPos *int64\n\n\tmu sync.Mutex\n}\n\nfunc (cr *countReadSeeker) Read(p []byte) (int, error) {\n\tcr.mu.Lock()\n\tdefer cr.mu.Unlock()\n\n\tn, err := cr.r.ReadAt(p, *cr.cPos)\n\tif err == nil {\n\t\t*cr.cPos += int64(n)\n\t}\n\treturn n, err\n}\n\nfunc (cr *countReadSeeker) Seek(offset int64, whence int) (int64, error) {\n\tcr.mu.Lock()\n\tdefer cr.mu.Unlock()\n\n\tswitch whence {\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"unknown whence: %v\", whence)\n\tcase io.SeekStart:\n\tcase io.SeekCurrent:\n\t\toffset += *cr.cPos\n\tcase io.SeekEnd:\n\t\treturn 0, fmt.Errorf(\"unsupported whence: %v\", whence)\n\t}\n\n\tif offset < 0 {\n\t\treturn 0, fmt.Errorf(\"invalid offset\")\n\t}\n\t*cr.cPos = offset\n\treturn offset, nil\n}\n\nfunc (cr *countReadSeeker) currentPos() int64 {\n\tcr.mu.Lock()\n\tdefer cr.mu.Unlock()\n\n\treturn *cr.cPos\n}\n\nfunc decompressBlob(org *io.SectionReader, tmp *tempFiles, gzipHelperFunc GzipHelperFunc) (*io.SectionReader, error) {\n\tif org.Size() < 4 {\n\t\treturn org, nil\n\t}\n\tsrc := make([]byte, 4)\n\tif _, err := org.Read(src); err != nil && err != io.EOF {\n\t\treturn nil, err\n\t}\n\tvar dR io.Reader\n\tif bytes.Equal([]byte{0x1F, 0x8B, 0x08}, src[:3]) {\n\t\t// gzip\n\t\tvar dgR io.ReadCloser\n\t\tvar err error\n\t\tif gzipHelperFunc != nil {\n\t\t\tdgR, err = gzipHelperFunc(io.NewSectionReader(org, 0, org.Size()))\n\t\t} else {\n\t\t\tdgR, err = gzip.NewReader(io.NewSectionReader(org, 0, org.Size()))\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer dgR.Close()\n\t\tdR = io.Reader(dgR)\n\t} else if bytes.Equal([]byte{0x28, 0xb5, 0x2f, 0xfd}, src[:4]) {\n\t\t// zstd\n\t\tdzR, err := zstd.NewReader(io.NewSectionReader(org, 0, org.Size()))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer dzR.Close()\n\t\tdR = io.Reader(dzR)\n\t} else {\n\t\t// uncompressed\n\t\treturn io.NewSectionReader(org, 0, org.Size()), nil\n\t}\n\tb, err := tmp.TempFile(\"\", \"uncompresseddata\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := io.Copy(b, dR); err != nil {\n\t\treturn nil, err\n\t}\n\treturn fileSectionReader(b)\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage errorutil\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Aggregate combines a list of errors into a single new error.\nfunc Aggregate(errs []error) error {\n\tswitch len(errs) {\n\tcase 0:\n\t\treturn nil\n\tcase 1:\n\t\treturn errs[0]\n\tdefault:\n\t\tpoints := make([]string, len(errs)+1)\n\t\tpoints[0] = fmt.Sprintf(\"%d error(s) occurred:\", len(errs))\n\t\tfor i, err := range errs {\n\t\t\tpoints[i+1] = fmt.Sprintf(\"* %s\", err)\n\t\t}\n\t\treturn errors.New(strings.Join(points, \"\\n\\t\"))\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY 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   Copyright 2019 The Go Authors. All rights reserved.\n   Use of this source code is governed by a BSD-style\n   license that can be found in the LICENSE file.\n*/\n\npackage estargz\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"crypto/sha256\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/containerd/stargz-snapshotter/estargz/errorutil\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n)\n\n// A Reader permits random access reads from a stargz file.\ntype Reader struct {\n\tsr        *io.SectionReader\n\ttoc       *JTOC\n\ttocDigest digest.Digest\n\n\t// m stores all non-chunk entries, keyed by name.\n\tm map[string]*TOCEntry\n\n\t// chunks stores all TOCEntry values for regular files that\n\t// are split up. For a file with a single chunk, it's only\n\t// stored in m.\n\tchunks map[string][]*TOCEntry\n\n\tdecompressor Decompressor\n}\n\ntype openOpts struct {\n\ttocOffset     int64\n\tdecompressors []Decompressor\n\ttelemetry     *Telemetry\n}\n\n// OpenOption is an option used during opening the layer\ntype OpenOption func(o *openOpts) error\n\n// WithTOCOffset option specifies the offset of TOC\nfunc WithTOCOffset(tocOffset int64) OpenOption {\n\treturn func(o *openOpts) error {\n\t\to.tocOffset = tocOffset\n\t\treturn nil\n\t}\n}\n\n// WithDecompressors option specifies decompressors to use.\n// Default is gzip-based decompressor.\nfunc WithDecompressors(decompressors ...Decompressor) OpenOption {\n\treturn func(o *openOpts) error {\n\t\to.decompressors = decompressors\n\t\treturn nil\n\t}\n}\n\n// WithTelemetry option specifies the telemetry hooks\nfunc WithTelemetry(telemetry *Telemetry) OpenOption {\n\treturn func(o *openOpts) error {\n\t\to.telemetry = telemetry\n\t\treturn nil\n\t}\n}\n\n// MeasureLatencyHook is a func which takes start time and records the diff\ntype MeasureLatencyHook func(time.Time)\n\n// Telemetry is a struct which defines telemetry hooks. By implementing these hooks you should be able to record\n// the latency metrics of the respective steps of estargz open operation. To be used with estargz.OpenWithTelemetry(...)\ntype Telemetry struct {\n\tGetFooterLatency      MeasureLatencyHook // measure time to get stargz footer (in milliseconds)\n\tGetTocLatency         MeasureLatencyHook // measure time to GET TOC JSON (in milliseconds)\n\tDeserializeTocLatency MeasureLatencyHook // measure time to deserialize TOC JSON (in milliseconds)\n}\n\n// Open opens a stargz file for reading.\n// The behavior is configurable using options.\n//\n// Note that each entry name is normalized as the path that is relative to root.\nfunc Open(sr *io.SectionReader, opt ...OpenOption) (*Reader, error) {\n\tvar opts openOpts\n\tfor _, o := range opt {\n\t\tif err := o(&opts); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tgzipCompressors := []Decompressor{new(GzipDecompressor), new(LegacyGzipDecompressor)}\n\tdecompressors := append(gzipCompressors, opts.decompressors...)\n\n\t// Determine the size to fetch. Try to fetch as many bytes as possible.\n\tfetchSize := maxFooterSize(sr.Size(), decompressors...)\n\tif maybeTocOffset := opts.tocOffset; maybeTocOffset > fetchSize {\n\t\tif maybeTocOffset > sr.Size() {\n\t\t\treturn nil, fmt.Errorf(\"blob size %d is smaller than the toc offset\", sr.Size())\n\t\t}\n\t\tfetchSize = sr.Size() - maybeTocOffset\n\t}\n\n\tstart := time.Now() // before getting layer footer\n\tfooter := make([]byte, fetchSize)\n\tif _, err := sr.ReadAt(footer, sr.Size()-fetchSize); err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading footer: %v\", err)\n\t}\n\tif opts.telemetry != nil && opts.telemetry.GetFooterLatency != nil {\n\t\topts.telemetry.GetFooterLatency(start)\n\t}\n\n\tvar allErr []error\n\tvar found bool\n\tvar r *Reader\n\tfor _, d := range decompressors {\n\t\tfSize := d.FooterSize()\n\t\tfOffset := positive(int64(len(footer)) - fSize)\n\t\tmaybeTocBytes := footer[:fOffset]\n\t\t_, tocOffset, tocSize, err := d.ParseFooter(footer[fOffset:])\n\t\tif err != nil {\n\t\t\tallErr = append(allErr, err)\n\t\t\tcontinue\n\t\t}\n\t\tif tocOffset >= 0 && tocSize <= 0 {\n\t\t\ttocSize = sr.Size() - tocOffset - fSize\n\t\t}\n\t\tif tocOffset >= 0 && tocSize < int64(len(maybeTocBytes)) {\n\t\t\tmaybeTocBytes = maybeTocBytes[:tocSize]\n\t\t}\n\t\tr, err = parseTOC(d, sr, tocOffset, tocSize, maybeTocBytes, opts)\n\t\tif err == nil {\n\t\t\tfound = true\n\t\t\tbreak\n\t\t}\n\t\tallErr = append(allErr, err)\n\t}\n\tif !found {\n\t\treturn nil, errorutil.Aggregate(allErr)\n\t}\n\tif err := r.initFields(); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to initialize fields of entries: %v\", err)\n\t}\n\treturn r, nil\n}\n\n// OpenFooter extracts and parses footer from the given blob.\n// only supports gzip-based eStargz.\nfunc OpenFooter(sr *io.SectionReader) (tocOffset int64, footerSize int64, rErr error) {\n\tif sr.Size() < FooterSize && sr.Size() < legacyFooterSize {\n\t\treturn 0, 0, fmt.Errorf(\"blob size %d is smaller than the footer size\", sr.Size())\n\t}\n\tvar footer [FooterSize]byte\n\tif _, err := sr.ReadAt(footer[:], sr.Size()-FooterSize); err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"error reading footer: %v\", err)\n\t}\n\tvar allErr []error\n\tfor _, d := range []Decompressor{new(GzipDecompressor), new(LegacyGzipDecompressor)} {\n\t\tfSize := d.FooterSize()\n\t\tfOffset := positive(int64(len(footer)) - fSize)\n\t\t_, tocOffset, _, err := d.ParseFooter(footer[fOffset:])\n\t\tif err == nil {\n\t\t\treturn tocOffset, fSize, err\n\t\t}\n\t\tallErr = append(allErr, err)\n\t}\n\treturn 0, 0, errorutil.Aggregate(allErr)\n}\n\n// initFields populates the Reader from r.toc after decoding it from\n// JSON.\n//\n// Unexported fields are populated and TOCEntry fields that were\n// implicit in the JSON are populated.\nfunc (r *Reader) initFields() error {\n\tr.m = make(map[string]*TOCEntry, len(r.toc.Entries))\n\tr.chunks = make(map[string][]*TOCEntry)\n\tvar lastPath string\n\tuname := map[int]string{}\n\tgname := map[int]string{}\n\tvar lastRegEnt *TOCEntry\n\tvar chunkTopIndex int\n\tfor i, ent := range r.toc.Entries {\n\t\tent.Name = cleanEntryName(ent.Name)\n\t\tswitch ent.Type {\n\t\tcase \"reg\", \"chunk\":\n\t\t\tif ent.Offset != r.toc.Entries[chunkTopIndex].Offset {\n\t\t\t\tchunkTopIndex = i\n\t\t\t}\n\t\t\tent.chunkTopIndex = chunkTopIndex\n\t\t}\n\t\tif ent.Type == \"reg\" {\n\t\t\tlastRegEnt = ent\n\t\t}\n\t\tif ent.Type == \"chunk\" {\n\t\t\tent.Name = lastPath\n\t\t\tr.chunks[ent.Name] = append(r.chunks[ent.Name], ent)\n\t\t\tif ent.ChunkSize == 0 && lastRegEnt != nil {\n\t\t\t\tent.ChunkSize = lastRegEnt.Size - ent.ChunkOffset\n\t\t\t}\n\t\t} else {\n\t\t\tlastPath = ent.Name\n\n\t\t\tif ent.Uname != \"\" {\n\t\t\t\tuname[ent.UID] = ent.Uname\n\t\t\t} else {\n\t\t\t\tent.Uname = uname[ent.UID]\n\t\t\t}\n\t\t\tif ent.Gname != \"\" {\n\t\t\t\tgname[ent.GID] = ent.Gname\n\t\t\t} else {\n\t\t\t\tent.Gname = gname[ent.GID]\n\t\t\t}\n\n\t\t\tent.modTime, _ = time.Parse(time.RFC3339, ent.ModTime3339)\n\n\t\t\tif ent.Type == \"dir\" {\n\t\t\t\tent.NumLink++ // Parent dir links to this directory\n\t\t\t}\n\t\t\tr.m[ent.Name] = ent\n\t\t}\n\t\tif ent.Type == \"reg\" && ent.ChunkSize > 0 && ent.ChunkSize < ent.Size {\n\t\t\tr.chunks[ent.Name] = make([]*TOCEntry, 0, ent.Size/ent.ChunkSize+1)\n\t\t\tr.chunks[ent.Name] = append(r.chunks[ent.Name], ent)\n\t\t}\n\t\tif ent.ChunkSize == 0 && ent.Size != 0 {\n\t\t\tent.ChunkSize = ent.Size\n\t\t}\n\t}\n\n\t// Populate children, add implicit directories:\n\tfor _, ent := range r.toc.Entries {\n\t\tif ent.Type == \"chunk\" {\n\t\t\tcontinue\n\t\t}\n\t\t// add \"foo/\":\n\t\t//    add \"foo\" child to \"\" (creating \"\" if necessary)\n\t\t//\n\t\t// add \"foo/bar/\":\n\t\t//    add \"bar\" child to \"foo\" (creating \"foo\" if necessary)\n\t\t//\n\t\t// add \"foo/bar.txt\":\n\t\t//    add \"bar.txt\" child to \"foo\" (creating \"foo\" if necessary)\n\t\t//\n\t\t// add \"a/b/c/d/e/f.txt\":\n\t\t//    create \"a/b/c/d/e\" node\n\t\t//    add \"f.txt\" child to \"e\"\n\n\t\tname := ent.Name\n\t\tpdirName := parentDir(name)\n\t\tif name == pdirName {\n\t\t\t// This entry and its parent are the same.\n\t\t\t// Ignore this for avoiding infinite loop of the reference.\n\t\t\t// The example case where this can occur is when tar contains the root\n\t\t\t// directory itself (e.g. \"./\", \"/\").\n\t\t\tcontinue\n\t\t}\n\t\tpdir := r.getOrCreateDir(pdirName)\n\t\tent.NumLink++ // at least one name(ent.Name) references this entry.\n\t\tif ent.Type == \"hardlink\" {\n\t\t\torg, err := r.getSource(ent)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\torg.NumLink++ // original entry is referenced by this ent.Name.\n\t\t\tent = org\n\t\t}\n\t\tpdir.addChild(path.Base(name), ent)\n\t}\n\n\tlastOffset := r.sr.Size()\n\tfor i := len(r.toc.Entries) - 1; i >= 0; i-- {\n\t\te := r.toc.Entries[i]\n\t\tif e.isDataType() {\n\t\t\te.nextOffset = lastOffset\n\t\t}\n\t\tif e.Offset != 0 && e.InnerOffset == 0 {\n\t\t\tlastOffset = e.Offset\n\t\t}\n\t}\n\n\tif len(r.m) == 0 {\n\t\tr.m[\"\"] = &TOCEntry{\n\t\t\tName:    \"\",\n\t\t\tType:    \"dir\",\n\t\t\tMode:    0755,\n\t\t\tNumLink: 1,\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (r *Reader) getSource(ent *TOCEntry) (_ *TOCEntry, err error) {\n\tif ent.Type == \"hardlink\" {\n\t\torg, ok := r.m[cleanEntryName(ent.LinkName)]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"%q is a hardlink but the linkname %q isn't found\", ent.Name, ent.LinkName)\n\t\t}\n\t\tent, err = r.getSource(org)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn ent, nil\n}\n\nfunc parentDir(p string) string {\n\tdir, _ := path.Split(p)\n\treturn strings.TrimSuffix(dir, \"/\")\n}\n\nfunc (r *Reader) getOrCreateDir(d string) *TOCEntry {\n\te, ok := r.m[d]\n\tif !ok {\n\t\te = &TOCEntry{\n\t\t\tName:    d,\n\t\t\tType:    \"dir\",\n\t\t\tMode:    0755,\n\t\t\tNumLink: 2, // The directory itself(.) and the parent link to this directory.\n\t\t}\n\t\tr.m[d] = e\n\t\tif d != \"\" {\n\t\t\tpdir := r.getOrCreateDir(parentDir(d))\n\t\t\tpdir.addChild(path.Base(d), e)\n\t\t}\n\t}\n\treturn e\n}\n\nfunc (r *Reader) TOCDigest() digest.Digest {\n\treturn r.tocDigest\n}\n\n// VerifyTOC checks that the TOC JSON in the passed blob matches the\n// passed digests and that the TOC JSON contains digests for all chunks\n// contained in the blob. If the verification succceeds, this function\n// returns TOCEntryVerifier which holds all chunk digests in the stargz blob.\nfunc (r *Reader) VerifyTOC(tocDigest digest.Digest) (TOCEntryVerifier, error) {\n\t// Verify the digest of TOC JSON\n\tif r.tocDigest != tocDigest {\n\t\treturn nil, fmt.Errorf(\"invalid TOC JSON %q; want %q\", r.tocDigest, tocDigest)\n\t}\n\treturn r.Verifiers()\n}\n\n// Verifiers returns TOCEntryVerifier of this chunk. Use VerifyTOC instead in most cases\n// because this doesn't verify TOC.\nfunc (r *Reader) Verifiers() (TOCEntryVerifier, error) {\n\tchunkDigestMap := make(map[int64]digest.Digest) // map from chunk offset to the chunk digest\n\tregDigestMap := make(map[int64]digest.Digest)   // map from chunk offset to the reg file digest\n\tvar chunkDigestMapIncomplete bool\n\tvar regDigestMapIncomplete bool\n\tvar containsChunk bool\n\tfor _, e := range r.toc.Entries {\n\t\tif e.Type != \"reg\" && e.Type != \"chunk\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// offset must be unique in stargz blob\n\t\t_, dOK := chunkDigestMap[e.Offset]\n\t\t_, rOK := regDigestMap[e.Offset]\n\t\tif dOK || rOK {\n\t\t\treturn nil, fmt.Errorf(\"offset %d found twice\", e.Offset)\n\t\t}\n\n\t\tif e.Type == \"reg\" {\n\t\t\tif e.Size == 0 {\n\t\t\t\tcontinue // ignores empty file\n\t\t\t}\n\n\t\t\t// record the digest of regular file payload\n\t\t\tif e.Digest != \"\" {\n\t\t\t\td, err := digest.Parse(e.Digest)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to parse regular file digest %q: %w\", e.Digest, err)\n\t\t\t\t}\n\t\t\t\tregDigestMap[e.Offset] = d\n\t\t\t} else {\n\t\t\t\tregDigestMapIncomplete = true\n\t\t\t}\n\t\t} else {\n\t\t\tcontainsChunk = true // this layer contains \"chunk\" entries.\n\t\t}\n\n\t\t// \"reg\" also can contain ChunkDigest (e.g. when \"reg\" is the first entry of\n\t\t// chunked file)\n\t\tif e.ChunkDigest != \"\" {\n\t\t\td, err := digest.Parse(e.ChunkDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to parse chunk digest %q: %w\", e.ChunkDigest, err)\n\t\t\t}\n\t\t\tchunkDigestMap[e.Offset] = d\n\t\t} else {\n\t\t\tchunkDigestMapIncomplete = true\n\t\t}\n\t}\n\n\tif chunkDigestMapIncomplete {\n\t\t// Though some chunk digests are not found, if this layer doesn't contain\n\t\t// \"chunk\"s and all digest of \"reg\" files are recorded, we can use them instead.\n\t\tif !containsChunk && !regDigestMapIncomplete {\n\t\t\treturn &verifier{digestMap: regDigestMap}, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"some ChunkDigest not found in TOC JSON\")\n\t}\n\n\treturn &verifier{digestMap: chunkDigestMap}, nil\n}\n\n// verifier is an implementation of TOCEntryVerifier which holds verifiers keyed by\n// offset of the chunk.\ntype verifier struct {\n\tdigestMap   map[int64]digest.Digest\n\tdigestMapMu sync.Mutex\n}\n\n// Verifier returns a content verifier specified by TOCEntry.\nfunc (v *verifier) Verifier(ce *TOCEntry) (digest.Verifier, error) {\n\tv.digestMapMu.Lock()\n\tdefer v.digestMapMu.Unlock()\n\td, ok := v.digestMap[ce.Offset]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"verifier for offset=%d,size=%d hasn't been registered\",\n\t\t\tce.Offset, ce.ChunkSize)\n\t}\n\treturn d.Verifier(), nil\n}\n\n// ChunkEntryForOffset returns the TOCEntry containing the byte of the\n// named file at the given offset within the file.\n// Name must be absolute path or one that is relative to root.\nfunc (r *Reader) ChunkEntryForOffset(name string, offset int64) (e *TOCEntry, ok bool) {\n\tname = cleanEntryName(name)\n\te, ok = r.Lookup(name)\n\tif !ok || !e.isDataType() {\n\t\treturn nil, false\n\t}\n\tents := r.chunks[name]\n\tif len(ents) < 2 {\n\t\tif offset >= e.ChunkSize {\n\t\t\treturn nil, false\n\t\t}\n\t\treturn e, true\n\t}\n\ti := sort.Search(len(ents), func(i int) bool {\n\t\te := ents[i]\n\t\treturn e.ChunkOffset >= offset || (offset > e.ChunkOffset && offset < e.ChunkOffset+e.ChunkSize)\n\t})\n\tif i == len(ents) {\n\t\treturn nil, false\n\t}\n\treturn ents[i], true\n}\n\n// Lookup returns the Table of Contents entry for the given path.\n//\n// To get the root directory, use the empty string.\n// Path must be absolute path or one that is relative to root.\nfunc (r *Reader) Lookup(path string) (e *TOCEntry, ok bool) {\n\tpath = cleanEntryName(path)\n\tif r == nil {\n\t\treturn\n\t}\n\te, ok = r.m[path]\n\tif ok && e.Type == \"hardlink\" {\n\t\tvar err error\n\t\te, err = r.getSource(e)\n\t\tif err != nil {\n\t\t\treturn nil, false\n\t\t}\n\t}\n\treturn\n}\n\n// OpenFile returns the reader of the specified file payload.\n//\n// Name must be absolute path or one that is relative to root.\nfunc (r *Reader) OpenFile(name string) (*io.SectionReader, error) {\n\tfr, err := r.newFileReader(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn io.NewSectionReader(fr, 0, fr.size), nil\n}\n\nfunc (r *Reader) newFileReader(name string) (*fileReader, error) {\n\tname = cleanEntryName(name)\n\tent, ok := r.Lookup(name)\n\tif !ok {\n\t\t// TODO: come up with some error plan. This is lazy:\n\t\treturn nil, &os.PathError{\n\t\t\tPath: name,\n\t\t\tOp:   \"OpenFile\",\n\t\t\tErr:  os.ErrNotExist,\n\t\t}\n\t}\n\tif ent.Type != \"reg\" {\n\t\treturn nil, &os.PathError{\n\t\t\tPath: name,\n\t\t\tOp:   \"OpenFile\",\n\t\t\tErr:  errors.New(\"not a regular file\"),\n\t\t}\n\t}\n\treturn &fileReader{\n\t\tr:    r,\n\t\tsize: ent.Size,\n\t\tents: r.getChunks(ent),\n\t}, nil\n}\n\nfunc (r *Reader) OpenFileWithPreReader(name string, preRead func(*TOCEntry, io.Reader) error) (*io.SectionReader, error) {\n\tfr, err := r.newFileReader(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfr.preRead = preRead\n\treturn io.NewSectionReader(fr, 0, fr.size), nil\n}\n\nfunc (r *Reader) getChunks(ent *TOCEntry) []*TOCEntry {\n\tif ents, ok := r.chunks[ent.Name]; ok {\n\t\treturn ents\n\t}\n\treturn []*TOCEntry{ent}\n}\n\ntype fileReader struct {\n\tr       *Reader\n\tsize    int64\n\tents    []*TOCEntry // 1 or more reg/chunk entries\n\tpreRead func(*TOCEntry, io.Reader) error\n}\n\nfunc (fr *fileReader) ReadAt(p []byte, off int64) (n int, err error) {\n\tif off >= fr.size {\n\t\treturn 0, io.EOF\n\t}\n\tif off < 0 {\n\t\treturn 0, errors.New(\"invalid offset\")\n\t}\n\tvar i int\n\tif len(fr.ents) > 1 {\n\t\ti = sort.Search(len(fr.ents), func(i int) bool {\n\t\t\treturn fr.ents[i].ChunkOffset >= off\n\t\t})\n\t\tif i == len(fr.ents) {\n\t\t\ti = len(fr.ents) - 1\n\t\t}\n\t}\n\tent := fr.ents[i]\n\tif ent.ChunkOffset > off {\n\t\tif i == 0 {\n\t\t\treturn 0, errors.New(\"internal error; first chunk offset is non-zero\")\n\t\t}\n\t\tent = fr.ents[i-1]\n\t}\n\n\t//  If ent is a chunk of a large file, adjust the ReadAt\n\t//  offset by the chunk's offset.\n\toff -= ent.ChunkOffset\n\n\tfinalEnt := fr.ents[len(fr.ents)-1]\n\tcompressedOff := ent.Offset\n\t// compressedBytesRemain is the number of compressed bytes in this\n\t// file remaining, over 1+ chunks.\n\tcompressedBytesRemain := finalEnt.NextOffset() - compressedOff\n\n\tsr := io.NewSectionReader(fr.r.sr, compressedOff, compressedBytesRemain)\n\n\tconst maxRead = 2 << 20\n\tvar bufSize = maxRead\n\tif compressedBytesRemain < maxRead {\n\t\tbufSize = int(compressedBytesRemain)\n\t}\n\n\tbr := bufio.NewReaderSize(sr, bufSize)\n\tif _, err := br.Peek(bufSize); err != nil {\n\t\treturn 0, fmt.Errorf(\"fileReader.ReadAt.peek: %v\", err)\n\t}\n\n\tdr, err := fr.r.decompressor.Reader(br)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"fileReader.ReadAt.decompressor.Reader: %v\", err)\n\t}\n\tdefer dr.Close()\n\n\tif fr.preRead == nil {\n\t\tif n, err := io.CopyN(io.Discard, dr, ent.InnerOffset+off); n != ent.InnerOffset+off || err != nil {\n\t\t\treturn 0, fmt.Errorf(\"discard of %d bytes != %v, %v\", ent.InnerOffset+off, n, err)\n\t\t}\n\t\treturn io.ReadFull(dr, p)\n\t}\n\n\tvar retN int\n\tvar retErr error\n\tvar found bool\n\tvar nr int64\n\tfor _, e := range fr.r.toc.Entries[ent.chunkTopIndex:] {\n\t\tif !e.isDataType() {\n\t\t\tcontinue\n\t\t}\n\t\tif e.Offset != fr.r.toc.Entries[ent.chunkTopIndex].Offset {\n\t\t\tbreak\n\t\t}\n\t\tif in, err := io.CopyN(io.Discard, dr, e.InnerOffset-nr); err != nil || in != e.InnerOffset-nr {\n\t\t\treturn 0, fmt.Errorf(\"discard of remaining %d bytes != %v, %v\", e.InnerOffset-nr, in, err)\n\t\t}\n\t\tnr = e.InnerOffset\n\t\tif e == ent {\n\t\t\tfound = true\n\t\t\tif n, err := io.CopyN(io.Discard, dr, off); n != off || err != nil {\n\t\t\t\treturn 0, fmt.Errorf(\"discard of offset %d bytes != %v, %v\", off, n, err)\n\t\t\t}\n\t\t\tretN, retErr = io.ReadFull(dr, p)\n\t\t\tnr += off + int64(retN)\n\t\t\tcontinue\n\t\t}\n\t\tcr := &countReader{r: io.LimitReader(dr, e.ChunkSize)}\n\t\tif err := fr.preRead(e, cr); err != nil {\n\t\t\treturn 0, fmt.Errorf(\"failed to pre read: %w\", err)\n\t\t}\n\t\tnr += cr.n\n\t}\n\tif !found {\n\t\treturn 0, fmt.Errorf(\"fileReader.ReadAt: target entry not found\")\n\t}\n\treturn retN, retErr\n}\n\n// A Writer writes stargz files.\n//\n// Use NewWriter to create a new Writer.\ntype Writer struct {\n\tbw       *bufio.Writer\n\tcw       *countWriter\n\ttoc      *JTOC\n\tdiffHash hash.Hash // SHA-256 of uncompressed tar\n\n\tclosed        bool\n\tgz            io.WriteCloser\n\tlastUsername  map[int]string\n\tlastGroupname map[int]string\n\tcompressor    Compressor\n\n\tuncompressedCounter *countWriteFlusher\n\n\t// ChunkSize optionally controls the maximum number of bytes\n\t// of data of a regular file that can be written in one gzip\n\t// stream before a new gzip stream is started.\n\t// Zero means to use a default, currently 4 MiB.\n\tChunkSize int\n\n\t// MinChunkSize optionally controls the minimum number of bytes\n\t// of data must be written in one gzip stream before a new gzip\n\t// NOTE: This adds a TOC property that stargz snapshotter < v0.13.0 doesn't understand.\n\tMinChunkSize int\n\n\tneedsOpenGzEntries map[string]struct{}\n}\n\n// currentCompressionWriter writes to the current w.gz field, which can\n// change throughout writing a tar entry.\n//\n// Additionally, it updates w's SHA-256 of the uncompressed bytes\n// of the tar file.\ntype currentCompressionWriter struct{ w *Writer }\n\nfunc (ccw currentCompressionWriter) Write(p []byte) (int, error) {\n\tccw.w.diffHash.Write(p)\n\tif ccw.w.gz == nil {\n\t\tif err := ccw.w.condOpenGz(); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\treturn ccw.w.gz.Write(p)\n}\n\nfunc (w *Writer) chunkSize() int {\n\tif w.ChunkSize <= 0 {\n\t\treturn 4 << 20\n\t}\n\treturn w.ChunkSize\n}\n\n// Unpack decompresses the given estargz blob and returns a ReadCloser of the tar blob.\n// TOC JSON and footer are removed.\nfunc Unpack(sr *io.SectionReader, c Decompressor) (io.ReadCloser, error) {\n\tfooterSize := c.FooterSize()\n\tif sr.Size() < footerSize {\n\t\treturn nil, fmt.Errorf(\"blob is too small; %d < %d\", sr.Size(), footerSize)\n\t}\n\tfooterOffset := sr.Size() - footerSize\n\tfooter := make([]byte, footerSize)\n\tif _, err := sr.ReadAt(footer, footerOffset); err != nil {\n\t\treturn nil, err\n\t}\n\tblobPayloadSize, _, _, err := c.ParseFooter(footer)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse footer: %w\", err)\n\t}\n\tif blobPayloadSize < 0 {\n\t\tblobPayloadSize = sr.Size()\n\t}\n\treturn c.Reader(io.LimitReader(sr, blobPayloadSize))\n}\n\n// NewWriter returns a new stargz writer (gzip-based) writing to w.\n//\n// The writer must be closed to write its trailing table of contents.\nfunc NewWriter(w io.Writer) *Writer {\n\treturn NewWriterLevel(w, gzip.BestCompression)\n}\n\n// NewWriterLevel returns a new stargz writer (gzip-based) writing to w.\n// The compression level is configurable.\n//\n// The writer must be closed to write its trailing table of contents.\nfunc NewWriterLevel(w io.Writer, compressionLevel int) *Writer {\n\treturn NewWriterWithCompressor(w, NewGzipCompressorWithLevel(compressionLevel))\n}\n\n// NewWriterWithCompressor returns a new stargz writer writing to w.\n// The compression method is configurable.\n//\n// The writer must be closed to write its trailing table of contents.\nfunc NewWriterWithCompressor(w io.Writer, c Compressor) *Writer {\n\tbw := bufio.NewWriter(w)\n\tcw := &countWriter{w: bw}\n\treturn &Writer{\n\t\tbw:                  bw,\n\t\tcw:                  cw,\n\t\ttoc:                 &JTOC{Version: 1},\n\t\tdiffHash:            sha256.New(),\n\t\tcompressor:          c,\n\t\tuncompressedCounter: &countWriteFlusher{},\n\t}\n}\n\n// Close writes the stargz's table of contents and flushes all the\n// buffers, returning any error.\nfunc (w *Writer) Close() (digest.Digest, error) {\n\tif w.closed {\n\t\treturn \"\", nil\n\t}\n\tdefer func() { w.closed = true }()\n\n\tif err := w.closeGz(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Write the TOC index and footer.\n\ttocDigest, err := w.compressor.WriteTOCAndFooter(w.cw, w.cw.n, w.toc, w.diffHash)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif err := w.bw.Flush(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn tocDigest, nil\n}\n\nfunc (w *Writer) closeGz() error {\n\tif w.closed {\n\t\treturn errors.New(\"write on closed Writer\")\n\t}\n\tif w.gz != nil {\n\t\tif err := w.gz.Close(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tw.gz = nil\n\t}\n\treturn nil\n}\n\nfunc (w *Writer) flushGz() error {\n\tif w.closed {\n\t\treturn errors.New(\"flush on closed Writer\")\n\t}\n\tif w.gz != nil {\n\t\tif f, ok := w.gz.(interface {\n\t\t\tFlush() error\n\t\t}); ok {\n\t\t\treturn f.Flush()\n\t\t}\n\t}\n\treturn nil\n}\n\n// nameIfChanged returns name, unless it was the already the value of (*mp)[id],\n// in which case it returns the empty string.\nfunc (w *Writer) nameIfChanged(mp *map[int]string, id int, name string) string {\n\tif name == \"\" {\n\t\treturn \"\"\n\t}\n\tif *mp == nil {\n\t\t*mp = make(map[int]string)\n\t}\n\tif (*mp)[id] == name {\n\t\treturn \"\"\n\t}\n\t(*mp)[id] = name\n\treturn name\n}\n\nfunc (w *Writer) condOpenGz() (err error) {\n\tif w.gz == nil {\n\t\tw.gz, err = w.compressor.Writer(w.cw)\n\t\tif w.gz != nil {\n\t\t\tw.gz = w.uncompressedCounter.register(w.gz)\n\t\t}\n\t}\n\treturn\n}\n\n// AppendTar reads the tar or tar.gz file from r and appends\n// each of its contents to w.\n//\n// The input r can optionally be gzip compressed but the output will\n// always be compressed by the specified compressor.\nfunc (w *Writer) AppendTar(r io.Reader) error {\n\treturn w.appendTar(r, false)\n}\n\n// AppendTarLossLess reads the tar or tar.gz file from r and appends\n// each of its contents to w.\n//\n// The input r can optionally be gzip compressed but the output will\n// always be compressed by the specified compressor.\n//\n// The difference of this func with AppendTar is that this writes\n// the input tar stream into w without any modification (e.g. to header bytes).\n//\n// Note that if the input tar stream already contains TOC JSON, this returns\n// error because w cannot overwrite the TOC JSON to the one generated by w without\n// lossy modification. To avoid this error, if the input stream is known to be stargz/estargz,\n// you shoud decompress it and remove TOC JSON in advance.\nfunc (w *Writer) AppendTarLossLess(r io.Reader) error {\n\treturn w.appendTar(r, true)\n}\n\nfunc (w *Writer) appendTar(r io.Reader, lossless bool) error {\n\tvar src io.Reader\n\tbr := bufio.NewReader(r)\n\tif isGzip(br) {\n\t\tzr, _ := gzip.NewReader(br)\n\t\tsrc = zr\n\t} else {\n\t\tsrc = io.Reader(br)\n\t}\n\tdst := currentCompressionWriter{w}\n\tvar tw *tar.Writer\n\tif !lossless {\n\t\ttw = tar.NewWriter(dst) // use tar writer only when this isn't lossless mode.\n\t}\n\ttr := tar.NewReader(src)\n\tif lossless {\n\t\ttr.RawAccounting = true\n\t}\n\tprevOffset := w.cw.n\n\tvar prevOffsetUncompressed int64\n\tfor {\n\t\th, err := tr.Next()\n\t\tif err == io.EOF {\n\t\t\tif lossless {\n\t\t\t\tif remain := tr.RawBytes(); len(remain) > 0 {\n\t\t\t\t\t// Collect the remaining null bytes.\n\t\t\t\t\t// https://github.com/vbatts/tar-split/blob/80a436fd6164c557b131f7c59ed69bd81af69761/concept/main.go#L49-L53\n\t\t\t\t\tif _, err := dst.Write(remain); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error reading from source tar: tar.Reader.Next: %v\", err)\n\t\t}\n\t\tif cleanEntryName(h.Name) == TOCTarName {\n\t\t\t// It is possible for a layer to be \"stargzified\" twice during the\n\t\t\t// distribution lifecycle. So we reserve \"TOCTarName\" here to avoid\n\t\t\t// duplicated entries in the resulting layer.\n\t\t\tif lossless {\n\t\t\t\t// We cannot handle this in lossless way.\n\t\t\t\treturn fmt.Errorf(\"existing TOC JSON is not allowed; decompress layer before append\")\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\txattrs := make(map[string][]byte)\n\t\tconst xattrPAXRecordsPrefix = \"SCHILY.xattr.\"\n\t\tif h.PAXRecords != nil {\n\t\t\tfor k, v := range h.PAXRecords {\n\t\t\t\tif strings.HasPrefix(k, xattrPAXRecordsPrefix) {\n\t\t\t\t\txattrs[k[len(xattrPAXRecordsPrefix):]] = []byte(v)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tent := &TOCEntry{\n\t\t\tName:        h.Name,\n\t\t\tMode:        h.Mode,\n\t\t\tUID:         h.Uid,\n\t\t\tGID:         h.Gid,\n\t\t\tUname:       w.nameIfChanged(&w.lastUsername, h.Uid, h.Uname),\n\t\t\tGname:       w.nameIfChanged(&w.lastGroupname, h.Gid, h.Gname),\n\t\t\tModTime3339: formatModtime(h.ModTime),\n\t\t\tXattrs:      xattrs,\n\t\t}\n\t\tif err := w.condOpenGz(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif tw != nil {\n\t\t\tif err := tw.WriteHeader(h); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tif _, err := dst.Write(tr.RawBytes()); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tswitch h.Typeflag {\n\t\tcase tar.TypeLink:\n\t\t\tent.Type = \"hardlink\"\n\t\t\tent.LinkName = h.Linkname\n\t\tcase tar.TypeSymlink:\n\t\t\tent.Type = \"symlink\"\n\t\t\tent.LinkName = h.Linkname\n\t\tcase tar.TypeDir:\n\t\t\tent.Type = \"dir\"\n\t\tcase tar.TypeReg:\n\t\t\tent.Type = \"reg\"\n\t\t\tent.Size = h.Size\n\t\tcase tar.TypeChar:\n\t\t\tent.Type = \"char\"\n\t\t\tent.DevMajor = int(h.Devmajor)\n\t\t\tent.DevMinor = int(h.Devminor)\n\t\tcase tar.TypeBlock:\n\t\t\tent.Type = \"block\"\n\t\t\tent.DevMajor = int(h.Devmajor)\n\t\t\tent.DevMinor = int(h.Devminor)\n\t\tcase tar.TypeFifo:\n\t\t\tent.Type = \"fifo\"\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported input tar entry %q\", h.Typeflag)\n\t\t}\n\n\t\t// We need to keep a reference to the TOC entry for regular files, so that we\n\t\t// can fill the digest later.\n\t\tvar regFileEntry *TOCEntry\n\t\tvar payloadDigest digest.Digester\n\t\tif h.Typeflag == tar.TypeReg {\n\t\t\tregFileEntry = ent\n\t\t\tpayloadDigest = digest.Canonical.Digester()\n\t\t}\n\n\t\tif h.Typeflag == tar.TypeReg && ent.Size > 0 {\n\t\t\tvar written int64\n\t\t\ttotalSize := ent.Size // save it before we destroy ent\n\t\t\ttee := io.TeeReader(tr, payloadDigest.Hash())\n\t\t\tfor written < totalSize {\n\t\t\t\tchunkSize := int64(w.chunkSize())\n\t\t\t\tremain := totalSize - written\n\t\t\t\tif remain < chunkSize {\n\t\t\t\t\tchunkSize = remain\n\t\t\t\t} else {\n\t\t\t\t\tent.ChunkSize = chunkSize\n\t\t\t\t}\n\n\t\t\t\t// We flush the underlying compression writer here to correctly calculate \"w.cw.n\".\n\t\t\t\tif err := w.flushGz(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif w.needsOpenGz(ent) || w.cw.n-prevOffset >= int64(w.MinChunkSize) {\n\t\t\t\t\tif err := w.closeGz(); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tent.Offset = w.cw.n\n\t\t\t\t\tprevOffset = ent.Offset\n\t\t\t\t\tprevOffsetUncompressed = w.uncompressedCounter.n\n\t\t\t\t} else {\n\t\t\t\t\tent.Offset = prevOffset\n\t\t\t\t\tent.InnerOffset = w.uncompressedCounter.n - prevOffsetUncompressed\n\t\t\t\t}\n\n\t\t\t\tent.ChunkOffset = written\n\t\t\t\tchunkDigest := digest.Canonical.Digester()\n\n\t\t\t\tif err := w.condOpenGz(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tteeChunk := io.TeeReader(tee, chunkDigest.Hash())\n\t\t\t\tvar out io.Writer\n\t\t\t\tif tw != nil {\n\t\t\t\t\tout = tw\n\t\t\t\t} else {\n\t\t\t\t\tout = dst\n\t\t\t\t}\n\t\t\t\tif _, err := io.CopyN(out, teeChunk, chunkSize); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"error copying %q: %v\", h.Name, err)\n\t\t\t\t}\n\t\t\t\tent.ChunkDigest = chunkDigest.Digest().String()\n\t\t\t\tw.toc.Entries = append(w.toc.Entries, ent)\n\t\t\t\twritten += chunkSize\n\t\t\t\tent = &TOCEntry{\n\t\t\t\t\tName: h.Name,\n\t\t\t\t\tType: \"chunk\",\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tw.toc.Entries = append(w.toc.Entries, ent)\n\t\t}\n\t\tif payloadDigest != nil {\n\t\t\tregFileEntry.Digest = payloadDigest.Digest().String()\n\t\t}\n\t\tif tw != nil {\n\t\t\tif err := tw.Flush(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tremainDest := io.Discard\n\tif lossless {\n\t\tremainDest = dst // Preserve the remaining bytes in lossless mode\n\t}\n\t_, err := io.Copy(remainDest, src)\n\treturn err\n}\n\nfunc (w *Writer) needsOpenGz(ent *TOCEntry) bool {\n\tif ent.Type != \"reg\" {\n\t\treturn false\n\t}\n\tif w.needsOpenGzEntries == nil {\n\t\treturn false\n\t}\n\t_, ok := w.needsOpenGzEntries[ent.Name]\n\treturn ok\n}\n\n// DiffID returns the SHA-256 of the uncompressed tar bytes.\n// It is only valid to call DiffID after Close.\nfunc (w *Writer) DiffID() string {\n\treturn fmt.Sprintf(\"sha256:%x\", w.diffHash.Sum(nil))\n}\n\nfunc maxFooterSize(blobSize int64, decompressors ...Decompressor) (res int64) {\n\tfor _, d := range decompressors {\n\t\tif s := d.FooterSize(); res < s && s <= blobSize {\n\t\t\tres = s\n\t\t}\n\t}\n\treturn\n}\n\nfunc parseTOC(d Decompressor, sr *io.SectionReader, tocOff, tocSize int64, tocBytes []byte, opts openOpts) (*Reader, error) {\n\tif tocOff < 0 {\n\t\t// This means that TOC isn't contained in the blob.\n\t\t// We pass nil reader to ParseTOC and expect that ParseTOC acquire TOC from\n\t\t// the external location.\n\t\tstart := time.Now()\n\t\ttoc, tocDgst, err := d.ParseTOC(nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif opts.telemetry != nil && opts.telemetry.GetTocLatency != nil {\n\t\t\topts.telemetry.GetTocLatency(start)\n\t\t}\n\t\tif opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil {\n\t\t\topts.telemetry.DeserializeTocLatency(start)\n\t\t}\n\t\treturn &Reader{\n\t\t\tsr:           sr,\n\t\t\ttoc:          toc,\n\t\t\ttocDigest:    tocDgst,\n\t\t\tdecompressor: d,\n\t\t}, nil\n\t}\n\tif len(tocBytes) > 0 {\n\t\tstart := time.Now()\n\t\ttoc, tocDgst, err := d.ParseTOC(bytes.NewReader(tocBytes))\n\t\tif err == nil {\n\t\t\tif opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil {\n\t\t\t\topts.telemetry.DeserializeTocLatency(start)\n\t\t\t}\n\t\t\treturn &Reader{\n\t\t\t\tsr:           sr,\n\t\t\t\ttoc:          toc,\n\t\t\t\ttocDigest:    tocDgst,\n\t\t\t\tdecompressor: d,\n\t\t\t}, nil\n\t\t}\n\t}\n\n\tstart := time.Now()\n\ttocBytes = make([]byte, tocSize)\n\tif _, err := sr.ReadAt(tocBytes, tocOff); err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading %d byte TOC targz: %v\", len(tocBytes), err)\n\t}\n\tif opts.telemetry != nil && opts.telemetry.GetTocLatency != nil {\n\t\topts.telemetry.GetTocLatency(start)\n\t}\n\tstart = time.Now()\n\ttoc, tocDgst, err := d.ParseTOC(bytes.NewReader(tocBytes))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil {\n\t\topts.telemetry.DeserializeTocLatency(start)\n\t}\n\treturn &Reader{\n\t\tsr:           sr,\n\t\ttoc:          toc,\n\t\ttocDigest:    tocDgst,\n\t\tdecompressor: d,\n\t}, nil\n}\n\nfunc formatModtime(t time.Time) string {\n\tif t.IsZero() || t.Unix() == 0 {\n\t\treturn \"\"\n\t}\n\treturn t.UTC().Round(time.Second).Format(time.RFC3339)\n}\n\nfunc cleanEntryName(name string) string {\n\t// Use path.Clean to consistently deal with path separators across platforms.\n\treturn strings.TrimPrefix(path.Clean(\"/\"+name), \"/\")\n}\n\n// countWriter counts how many bytes have been written to its wrapped\n// io.Writer.\ntype countWriter struct {\n\tw io.Writer\n\tn int64\n}\n\nfunc (cw *countWriter) Write(p []byte) (n int, err error) {\n\tn, err = cw.w.Write(p)\n\tcw.n += int64(n)\n\treturn\n}\n\ntype countWriteFlusher struct {\n\tio.WriteCloser\n\tn int64\n}\n\nfunc (wc *countWriteFlusher) register(w io.WriteCloser) io.WriteCloser {\n\twc.WriteCloser = w\n\treturn wc\n}\n\nfunc (wc *countWriteFlusher) Write(p []byte) (n int, err error) {\n\tn, err = wc.WriteCloser.Write(p)\n\twc.n += int64(n)\n\treturn\n}\n\nfunc (wc *countWriteFlusher) Flush() error {\n\tif f, ok := wc.WriteCloser.(interface {\n\t\tFlush() error\n\t}); ok {\n\t\treturn f.Flush()\n\t}\n\treturn nil\n}\n\nfunc (wc *countWriteFlusher) Close() error {\n\terr := wc.WriteCloser.Close()\n\twc.WriteCloser = nil\n\treturn err\n}\n\n// isGzip reports whether br is positioned right before an upcoming gzip stream.\n// It does not consume any bytes from br.\nfunc isGzip(br *bufio.Reader) bool {\n\tconst (\n\t\tgzipID1     = 0x1f\n\t\tgzipID2     = 0x8b\n\t\tgzipDeflate = 8\n\t)\n\tpeek, _ := br.Peek(3)\n\treturn len(peek) >= 3 && peek[0] == gzipID1 && peek[1] == gzipID2 && peek[2] == gzipDeflate\n}\n\nfunc positive(n int64) int64 {\n\tif n < 0 {\n\t\treturn 0\n\t}\n\treturn n\n}\n\ntype countReader struct {\n\tr io.Reader\n\tn int64\n}\n\nfunc (cr *countReader) Read(p []byte) (n int, err error) {\n\tn, err = cr.r.Read(p)\n\tcr.n += int64(n)\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY 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   Copyright 2019 The Go Authors. All rights reserved.\n   Use of this source code is governed by a BSD-style\n   license that can be found in the LICENSE file.\n*/\n\npackage estargz\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"encoding/binary\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"strconv\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\ntype gzipCompression struct {\n\t*GzipCompressor\n\t*GzipDecompressor\n}\n\nfunc newGzipCompressionWithLevel(level int) Compression {\n\treturn &gzipCompression{\n\t\t&GzipCompressor{level},\n\t\t&GzipDecompressor{},\n\t}\n}\n\nfunc NewGzipCompressor() *GzipCompressor {\n\treturn &GzipCompressor{gzip.BestCompression}\n}\n\nfunc NewGzipCompressorWithLevel(level int) *GzipCompressor {\n\treturn &GzipCompressor{level}\n}\n\ntype GzipCompressor struct {\n\tcompressionLevel int\n}\n\nfunc (gc *GzipCompressor) Writer(w io.Writer) (WriteFlushCloser, error) {\n\treturn gzip.NewWriterLevel(w, gc.compressionLevel)\n}\n\nfunc (gc *GzipCompressor) WriteTOCAndFooter(w io.Writer, off int64, toc *JTOC, diffHash hash.Hash) (digest.Digest, error) {\n\ttocJSON, err := json.MarshalIndent(toc, \"\", \"\\t\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tgz, _ := gzip.NewWriterLevel(w, gc.compressionLevel)\n\tgw := io.Writer(gz)\n\tif diffHash != nil {\n\t\tgw = io.MultiWriter(gz, diffHash)\n\t}\n\ttw := tar.NewWriter(gw)\n\tif err := tw.WriteHeader(&tar.Header{\n\t\tTypeflag: tar.TypeReg,\n\t\tName:     TOCTarName,\n\t\tSize:     int64(len(tocJSON)),\n\t}); err != nil {\n\t\treturn \"\", err\n\t}\n\tif _, err := tw.Write(tocJSON); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif err := tw.Close(); err != nil {\n\t\treturn \"\", err\n\t}\n\tif err := gz.Close(); err != nil {\n\t\treturn \"\", err\n\t}\n\tif _, err := w.Write(gzipFooterBytes(off)); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn digest.FromBytes(tocJSON), nil\n}\n\n// gzipFooterBytes returns the 51 bytes footer.\nfunc gzipFooterBytes(tocOff int64) []byte {\n\tbuf := bytes.NewBuffer(make([]byte, 0, FooterSize))\n\tgz, _ := gzip.NewWriterLevel(buf, gzip.NoCompression) // MUST be NoCompression to keep 51 bytes\n\n\t// Extra header indicating the offset of TOCJSON\n\t// https://tools.ietf.org/html/rfc1952#section-2.3.1.1\n\theader := make([]byte, 4)\n\theader[0], header[1] = 'S', 'G'\n\tsubfield := fmt.Sprintf(\"%016xSTARGZ\", tocOff)\n\tbinary.LittleEndian.PutUint16(header[2:4], uint16(len(subfield))) // little-endian per RFC1952\n\tgz.Extra = append(header, []byte(subfield)...)\n\tgz.Close()\n\tif buf.Len() != FooterSize {\n\t\tpanic(fmt.Sprintf(\"footer buffer = %d, not %d\", buf.Len(), FooterSize))\n\t}\n\treturn buf.Bytes()\n}\n\ntype GzipDecompressor struct{}\n\nfunc (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error) {\n\treturn gzip.NewReader(r)\n}\n\nfunc (gz *GzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) {\n\treturn parseTOCEStargz(r)\n}\n\nfunc (gz *GzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error) {\n\tif len(p) != FooterSize {\n\t\treturn 0, 0, 0, fmt.Errorf(\"invalid length %d cannot be parsed\", len(p))\n\t}\n\tzr, err := gzip.NewReader(bytes.NewReader(p))\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\tdefer zr.Close()\n\textra := zr.Extra\n\tsi1, si2, subfieldlen, subfield := extra[0], extra[1], extra[2:4], extra[4:]\n\tif si1 != 'S' || si2 != 'G' {\n\t\treturn 0, 0, 0, fmt.Errorf(\"invalid subfield IDs: %q, %q; want E, S\", si1, si2)\n\t}\n\tif slen := binary.LittleEndian.Uint16(subfieldlen); slen != uint16(16+len(\"STARGZ\")) {\n\t\treturn 0, 0, 0, fmt.Errorf(\"invalid length of subfield %d; want %d\", slen, 16+len(\"STARGZ\"))\n\t}\n\tif string(subfield[16:]) != \"STARGZ\" {\n\t\treturn 0, 0, 0, fmt.Errorf(\"STARGZ magic string must be included in the footer subfield\")\n\t}\n\ttocOffset, err = strconv.ParseInt(string(subfield[:16]), 16, 64)\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: failed to parse toc offset: %w\", err)\n\t}\n\treturn tocOffset, tocOffset, 0, nil\n}\n\nfunc (gz *GzipDecompressor) FooterSize() int64 {\n\treturn FooterSize\n}\n\nfunc (gz *GzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error) {\n\treturn decompressTOCEStargz(r)\n}\n\ntype LegacyGzipDecompressor struct{}\n\nfunc (gz *LegacyGzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error) {\n\treturn gzip.NewReader(r)\n}\n\nfunc (gz *LegacyGzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) {\n\treturn parseTOCEStargz(r)\n}\n\nfunc (gz *LegacyGzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error) {\n\tif len(p) != legacyFooterSize {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: invalid length %d cannot be parsed\", len(p))\n\t}\n\tzr, err := gzip.NewReader(bytes.NewReader(p))\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: failed to get footer gzip reader: %w\", err)\n\t}\n\tdefer zr.Close()\n\textra := zr.Extra\n\tif len(extra) != 16+len(\"STARGZ\") {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: invalid stargz's extra field size\")\n\t}\n\tif string(extra[16:]) != \"STARGZ\" {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: magic string STARGZ not found\")\n\t}\n\ttocOffset, err = strconv.ParseInt(string(extra[:16]), 16, 64)\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"legacy: failed to parse toc offset: %w\", err)\n\t}\n\treturn tocOffset, tocOffset, 0, nil\n}\n\nfunc (gz *LegacyGzipDecompressor) FooterSize() int64 {\n\treturn legacyFooterSize\n}\n\nfunc (gz *LegacyGzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error) {\n\treturn decompressTOCEStargz(r)\n}\n\nfunc parseTOCEStargz(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) {\n\ttr, err := decompressTOCEStargz(r)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tdgstr := digest.Canonical.Digester()\n\ttoc = new(JTOC)\n\tif err := json.NewDecoder(io.TeeReader(tr, dgstr.Hash())).Decode(&toc); err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"error decoding TOC JSON: %v\", err)\n\t}\n\tif err := tr.Close(); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn toc, dgstr.Digest(), nil\n}\n\nfunc decompressTOCEStargz(r io.Reader) (tocJSON io.ReadCloser, err error) {\n\tzr, err := gzip.NewReader(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"malformed TOC gzip header: %v\", err)\n\t}\n\tzr.Multistream(false)\n\ttr := tar.NewReader(zr)\n\th, err := tr.Next()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to find tar header in TOC gzip stream: %v\", err)\n\t}\n\tif h.Name != TOCTarName {\n\t\treturn nil, fmt.Errorf(\"TOC tar entry had name %q; expected %q\", h.Name, TOCTarName)\n\t}\n\treturn readCloser{tr, zr.Close}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY 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   Copyright 2019 The Go Authors. All rights reserved.\n   Use of this source code is governed by a BSD-style\n   license that can be found in the LICENSE file.\n*/\n\npackage estargz\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/containerd/stargz-snapshotter/estargz/errorutil\"\n\t\"github.com/klauspost/compress/zstd\"\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\n// TestingController is Compression with some helper methods necessary for testing.\ntype TestingController interface {\n\tCompression\n\tTestStreams(t TestingT, b []byte, streams []int64)\n\tDiffIDOf(TestingT, []byte) string\n\tString() string\n}\n\n// TestingT is the minimal set of testing.T required to run the\n// tests defined in CompressionTestSuite. This interface exists to prevent\n// leaking the testing package from being exposed outside tests.\ntype TestingT interface {\n\tErrorf(format string, args ...any)\n\tFailNow()\n\tFailed() bool\n\tFatal(args ...any)\n\tFatalf(format string, args ...any)\n\tLogf(format string, args ...any)\n\tParallel()\n}\n\n// Runner allows running subtests of TestingT. This exists instead of adding\n// a Run method to TestingT interface because the Run implementation of\n// testing.T would not satisfy the interface.\ntype Runner func(t TestingT, name string, fn func(t TestingT))\n\ntype TestRunner struct {\n\tTestingT\n\tRunner Runner\n}\n\nfunc (r *TestRunner) Run(name string, run func(*TestRunner)) {\n\tr.Runner(r.TestingT, name, func(t TestingT) {\n\t\trun(&TestRunner{TestingT: t, Runner: r.Runner})\n\t})\n}\n\n// CompressionTestSuite tests this pkg with controllers can build valid eStargz blobs and parse them.\nfunc CompressionTestSuite(t *TestRunner, controllers ...TestingControllerFactory) {\n\tt.Run(\"testBuild\", func(t *TestRunner) { t.Parallel(); testBuild(t, controllers...) })\n\tt.Run(\"testDigestAndVerify\", func(t *TestRunner) {\n\t\tt.Parallel()\n\t\ttestDigestAndVerify(t, controllers...)\n\t})\n\tt.Run(\"testWriteAndOpen\", func(t *TestRunner) { t.Parallel(); testWriteAndOpen(t, controllers...) })\n}\n\ntype TestingControllerFactory func() TestingController\n\nconst (\n\tuncompressedType int = iota\n\tgzipType\n\tzstdType\n)\n\nvar srcCompressions = []int{\n\tuncompressedType,\n\tgzipType,\n\tzstdType,\n}\n\nvar allowedPrefix = [4]string{\"\", \"./\", \"/\", \"../\"}\n\n// testBuild tests the resulting stargz blob built by this pkg has the same\n// contents as the normal stargz blob.\nfunc testBuild(t *TestRunner, controllers ...TestingControllerFactory) {\n\ttests := []struct {\n\t\tname         string\n\t\tchunkSize    int\n\t\tminChunkSize []int\n\t\tin           []tarEntry\n\t}{\n\t\t{\n\t\t\tname:      \"regfiles and directories\",\n\t\t\tchunkSize: 4,\n\t\t\tin: tarOf(\n\t\t\t\tfile(\"foo\", \"test1\"),\n\t\t\t\tdir(\"foo2/\"),\n\t\t\t\tfile(\"foo2/bar\", \"test2\", xAttr(map[string]string{\"test\": \"sample\"})),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:      \"empty files\",\n\t\t\tchunkSize: 4,\n\t\t\tin: tarOf(\n\t\t\t\tfile(\"foo\", \"tttttt\"),\n\t\t\t\tfile(\"foo_empty\", \"\"),\n\t\t\t\tfile(\"foo2\", \"tttttt\"),\n\t\t\t\tfile(\"foo_empty2\", \"\"),\n\t\t\t\tfile(\"foo3\", \"tttttt\"),\n\t\t\t\tfile(\"foo_empty3\", \"\"),\n\t\t\t\tfile(\"foo4\", \"tttttt\"),\n\t\t\t\tfile(\"foo_empty4\", \"\"),\n\t\t\t\tfile(\"foo5\", \"tttttt\"),\n\t\t\t\tfile(\"foo_empty5\", \"\"),\n\t\t\t\tfile(\"foo6\", \"tttttt\"),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:         \"various files\",\n\t\t\tchunkSize:    4,\n\t\t\tminChunkSize: []int{0, 64000},\n\t\t\tin: tarOf(\n\t\t\t\tfile(\"baz.txt\", \"bazbazbazbazbazbazbaz\"),\n\t\t\t\tfile(\"foo1.txt\", \"a\"),\n\t\t\t\tfile(\"bar/foo2.txt\", \"b\"),\n\t\t\t\tfile(\"foo3.txt\", \"c\"),\n\t\t\t\tsymlink(\"barlink\", \"test/bar.txt\"),\n\t\t\t\tdir(\"test/\"),\n\t\t\t\tdir(\"dev/\"),\n\t\t\t\tblockdev(\"dev/testblock\", 3, 4),\n\t\t\t\tfifo(\"dev/testfifo\"),\n\t\t\t\tchardev(\"dev/testchar1\", 5, 6),\n\t\t\t\tfile(\"test/bar.txt\", \"testbartestbar\", xAttr(map[string]string{\"test2\": \"sample2\"})),\n\t\t\t\tdir(\"test2/\"),\n\t\t\t\tlink(\"test2/bazlink\", \"baz.txt\"),\n\t\t\t\tchardev(\"dev/testchar2\", 1, 2),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:      \"no contents\",\n\t\t\tchunkSize: 4,\n\t\t\tin: tarOf(\n\t\t\t\tfile(\"baz.txt\", \"\"),\n\t\t\t\tsymlink(\"barlink\", \"test/bar.txt\"),\n\t\t\t\tdir(\"test/\"),\n\t\t\t\tdir(\"dev/\"),\n\t\t\t\tblockdev(\"dev/testblock\", 3, 4),\n\t\t\t\tfifo(\"dev/testfifo\"),\n\t\t\t\tchardev(\"dev/testchar1\", 5, 6),\n\t\t\t\tfile(\"test/bar.txt\", \"\", xAttr(map[string]string{\"test2\": \"sample2\"})),\n\t\t\t\tdir(\"test2/\"),\n\t\t\t\tlink(\"test2/bazlink\", \"baz.txt\"),\n\t\t\t\tchardev(\"dev/testchar2\", 1, 2),\n\t\t\t),\n\t\t},\n\t}\n\tfor _, tt := range tests {\n\t\tif len(tt.minChunkSize) == 0 {\n\t\t\ttt.minChunkSize = []int{0}\n\t\t}\n\t\tfor _, srcCompression := range srcCompressions {\n\t\t\tsrcCompression := srcCompression\n\t\t\tfor _, newCL := range controllers {\n\t\t\t\tnewCL := newCL\n\t\t\t\tfor _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} {\n\t\t\t\t\tsrcTarFormat := srcTarFormat\n\t\t\t\t\tfor _, prefix := range allowedPrefix {\n\t\t\t\t\t\tprefix := prefix\n\t\t\t\t\t\tfor _, minChunkSize := range tt.minChunkSize {\n\t\t\t\t\t\t\tminChunkSize := minChunkSize\n\t\t\t\t\t\t\tt.Run(tt.name+\"-\"+fmt.Sprintf(\"compression=%v,prefix=%q,src=%d,format=%s,minChunkSize=%d\", newCL(), prefix, srcCompression, srcTarFormat, minChunkSize), func(t *TestRunner) {\n\t\t\t\t\t\t\t\ttarBlob := buildTar(t, tt.in, prefix, srcTarFormat)\n\t\t\t\t\t\t\t\t// Test divideEntries()\n\t\t\t\t\t\t\t\tentries, err := sortEntries(tarBlob, nil, nil) // identical order\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to parse tar: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvar merged []*entry\n\t\t\t\t\t\t\t\tfor _, part := range divideEntries(entries, 4) {\n\t\t\t\t\t\t\t\t\tmerged = append(merged, part...)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif !reflect.DeepEqual(entries, merged) {\n\t\t\t\t\t\t\t\t\tfor _, e := range entries {\n\t\t\t\t\t\t\t\t\t\tt.Logf(\"Original: %v\", e.header)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor _, e := range merged {\n\t\t\t\t\t\t\t\t\t\tt.Logf(\"Merged: %v\", e.header)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tt.Errorf(\"divided entries couldn't be merged\")\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Prepare sample data\n\t\t\t\t\t\t\t\tcl1 := newCL()\n\t\t\t\t\t\t\t\twantBuf := new(bytes.Buffer)\n\t\t\t\t\t\t\t\tsw := NewWriterWithCompressor(wantBuf, cl1)\n\t\t\t\t\t\t\t\tsw.MinChunkSize = minChunkSize\n\t\t\t\t\t\t\t\tsw.ChunkSize = tt.chunkSize\n\t\t\t\t\t\t\t\tif err := sw.AppendTar(tarBlob); err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to append tar to want stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif _, err := sw.Close(); err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to prepare want stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twantData := wantBuf.Bytes()\n\t\t\t\t\t\t\t\twant, err := Open(io.NewSectionReader(\n\t\t\t\t\t\t\t\t\tbytes.NewReader(wantData), 0, int64(len(wantData))),\n\t\t\t\t\t\t\t\t\tWithDecompressors(cl1),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to parse the want stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Prepare testing data\n\t\t\t\t\t\t\t\tvar opts []Option\n\t\t\t\t\t\t\t\tif minChunkSize > 0 {\n\t\t\t\t\t\t\t\t\topts = append(opts, WithMinChunkSize(minChunkSize))\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcl2 := newCL()\n\t\t\t\t\t\t\t\trc, err := Build(compressBlob(t, tarBlob, srcCompression),\n\t\t\t\t\t\t\t\t\tappend(opts, WithChunkSize(tt.chunkSize), WithCompression(cl2))...)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to build stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefer rc.Close()\n\t\t\t\t\t\t\t\tgotBuf := new(bytes.Buffer)\n\t\t\t\t\t\t\t\tif _, err := io.Copy(gotBuf, rc); err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to copy built stargz blob: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tgotData := gotBuf.Bytes()\n\t\t\t\t\t\t\t\tgot, err := Open(io.NewSectionReader(\n\t\t\t\t\t\t\t\t\tbytes.NewReader(gotBuf.Bytes()), 0, int64(len(gotData))),\n\t\t\t\t\t\t\t\t\tWithDecompressors(cl2),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to parse the got stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Check DiffID is properly calculated\n\t\t\t\t\t\t\t\trc.Close()\n\t\t\t\t\t\t\t\tdiffID := rc.DiffID()\n\t\t\t\t\t\t\t\twantDiffID := cl2.DiffIDOf(t, gotData)\n\t\t\t\t\t\t\t\tif diffID.String() != wantDiffID {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"DiffID = %q; want %q\", diffID, wantDiffID)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Compare as stargz\n\t\t\t\t\t\t\t\tif !isSameVersion(t, cl1, wantData, cl2, gotData) {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"built stargz hasn't same json\")\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif !isSameEntries(t, want, got) {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"built stargz isn't same as the original\")\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Compare as tar.gz\n\t\t\t\t\t\t\t\tif !isSameTarGz(t, cl1, wantData, cl2, gotData) {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"built stargz isn't same tar.gz\")\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc isSameTarGz(t TestingT, cla TestingController, a []byte, clb TestingController, b []byte) bool {\n\taGz, err := cla.Reader(bytes.NewReader(a))\n\tif err != nil {\n\t\tt.Fatalf(\"failed to read A\")\n\t}\n\tdefer aGz.Close()\n\tbGz, err := clb.Reader(bytes.NewReader(b))\n\tif err != nil {\n\t\tt.Fatalf(\"failed to read B\")\n\t}\n\tdefer bGz.Close()\n\n\t// Same as tar's Next() method but ignores landmarks and TOCJSON file\n\tnext := func(r *tar.Reader) (h *tar.Header, err error) {\n\t\tfor {\n\t\t\tif h, err = r.Next(); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif h.Name != PrefetchLandmark &&\n\t\t\t\th.Name != NoPrefetchLandmark &&\n\t\t\t\th.Name != TOCTarName {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\taTar := tar.NewReader(aGz)\n\tbTar := tar.NewReader(bGz)\n\tfor {\n\t\t// Fetch and parse next header.\n\t\taH, aErr := next(aTar)\n\t\tbH, bErr := next(bTar)\n\t\tif aErr != nil || bErr != nil {\n\t\t\tif aErr == io.EOF && bErr == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tt.Fatalf(\"Failed to parse tar file: A: %v, B: %v\", aErr, bErr)\n\t\t}\n\t\tif !reflect.DeepEqual(aH, bH) {\n\t\t\tt.Logf(\"different header (A = %v; B = %v)\", aH, bH)\n\t\t\treturn false\n\n\t\t}\n\t\taFile, err := io.ReadAll(aTar)\n\t\tif err != nil {\n\t\t\tt.Fatal(\"failed to read tar payload of A\")\n\t\t}\n\t\tbFile, err := io.ReadAll(bTar)\n\t\tif err != nil {\n\t\t\tt.Fatal(\"failed to read tar payload of B\")\n\t\t}\n\t\tif !bytes.Equal(aFile, bFile) {\n\t\t\tt.Logf(\"different tar payload (A = %q; B = %q)\", string(a), string(b))\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc isSameVersion(t TestingT, cla TestingController, a []byte, clb TestingController, b []byte) bool {\n\taJTOC, _, err := parseStargz(io.NewSectionReader(bytes.NewReader(a), 0, int64(len(a))), cla)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to parse A: %v\", err)\n\t}\n\tbJTOC, _, err := parseStargz(io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b))), clb)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to parse B: %v\", err)\n\t}\n\tt.Logf(\"A: TOCJSON: %v\", dumpTOCJSON(t, aJTOC))\n\tt.Logf(\"B: TOCJSON: %v\", dumpTOCJSON(t, bJTOC))\n\treturn aJTOC.Version == bJTOC.Version\n}\n\nfunc isSameEntries(t TestingT, a, b *Reader) bool {\n\taroot, ok := a.Lookup(\"\")\n\tif !ok {\n\t\tt.Fatalf(\"failed to get root of A\")\n\t}\n\tbroot, ok := b.Lookup(\"\")\n\tif !ok {\n\t\tt.Fatalf(\"failed to get root of B\")\n\t}\n\taEntry := stargzEntry{aroot, a}\n\tbEntry := stargzEntry{broot, b}\n\treturn contains(t, aEntry, bEntry) && contains(t, bEntry, aEntry)\n}\n\nfunc compressBlob(t TestingT, src *io.SectionReader, srcCompression int) *io.SectionReader {\n\tbuf := new(bytes.Buffer)\n\tvar w io.WriteCloser\n\tvar err error\n\tswitch srcCompression {\n\tcase gzipType:\n\t\tw = gzip.NewWriter(buf)\n\tcase zstdType:\n\t\tw, err = zstd.NewWriter(buf)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to init zstd writer: %v\", err)\n\t\t}\n\tdefault:\n\t\treturn src\n\t}\n\tsrc.Seek(0, io.SeekStart)\n\tif _, err := io.Copy(w, src); err != nil {\n\t\tt.Fatalf(\"failed to compress source\")\n\t}\n\tif err := w.Close(); err != nil {\n\t\tt.Fatalf(\"failed to finalize compress source\")\n\t}\n\tdata := buf.Bytes()\n\treturn io.NewSectionReader(bytes.NewReader(data), 0, int64(len(data)))\n\n}\n\ntype stargzEntry struct {\n\te *TOCEntry\n\tr *Reader\n}\n\n// contains checks if all child entries in \"b\" are also contained in \"a\".\n// This function also checks if the files/chunks contain the same contents among \"a\" and \"b\".\nfunc contains(t TestingT, a, b stargzEntry) bool {\n\tae, ar := a.e, a.r\n\tbe, br := b.e, b.r\n\tt.Logf(\"Comparing: %q vs %q\", ae.Name, be.Name)\n\tif !equalEntry(ae, be) {\n\t\tt.Logf(\"%q != %q: entry: a: %v, b: %v\", ae.Name, be.Name, ae, be)\n\t\treturn false\n\t}\n\tif ae.Type == \"dir\" {\n\t\tt.Logf(\"Directory: %q vs %q: %v vs %v\", ae.Name, be.Name,\n\t\t\tallChildrenName(ae), allChildrenName(be))\n\t\tiscontain := true\n\t\tae.ForeachChild(func(aBaseName string, aChild *TOCEntry) bool {\n\t\t\t// Walk through all files on this stargz file.\n\n\t\t\tif aChild.Name == PrefetchLandmark ||\n\t\t\t\taChild.Name == NoPrefetchLandmark {\n\t\t\t\treturn true // Ignore landmarks\n\t\t\t}\n\n\t\t\t// Ignore a TOCEntry of \"./\" (formated as \"\" by stargz lib) on root directory\n\t\t\t// because this points to the root directory itself.\n\t\t\tif aChild.Name == \"\" && ae.Name == \"\" {\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tbChild, ok := be.LookupChild(aBaseName)\n\t\t\tif !ok {\n\t\t\t\tt.Logf(\"%q (base: %q): not found in b: %v\",\n\t\t\t\t\tae.Name, aBaseName, allChildrenName(be))\n\t\t\t\tiscontain = false\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tchildcontain := contains(t, stargzEntry{aChild, a.r}, stargzEntry{bChild, b.r})\n\t\t\tif !childcontain {\n\t\t\t\tt.Logf(\"%q != %q: non-equal dir\", ae.Name, be.Name)\n\t\t\t\tiscontain = false\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t})\n\t\treturn iscontain\n\t} else if ae.Type == \"reg\" {\n\t\taf, err := ar.OpenFile(ae.Name)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to open file %q on A: %v\", ae.Name, err)\n\t\t}\n\t\tbf, err := br.OpenFile(be.Name)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to open file %q on B: %v\", be.Name, err)\n\t\t}\n\n\t\tvar nr int64\n\t\tfor nr < ae.Size {\n\t\t\tabytes, anext, aok := readOffset(t, af, nr, a)\n\t\t\tbbytes, bnext, bok := readOffset(t, bf, nr, b)\n\t\t\tif !aok && !bok {\n\t\t\t\tbreak\n\t\t\t} else if !aok || !bok || anext != bnext {\n\t\t\t\tt.Logf(\"%q != %q (offset=%d): chunk existence a=%v vs b=%v, anext=%v vs bnext=%v\",\n\t\t\t\t\tae.Name, be.Name, nr, aok, bok, anext, bnext)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tnr = anext\n\t\t\tif !bytes.Equal(abytes, bbytes) {\n\t\t\t\tt.Logf(\"%q != %q: different contents %v vs %v\",\n\t\t\t\t\tae.Name, be.Name, string(abytes), string(bbytes))\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\n\treturn true\n}\n\nfunc allChildrenName(e *TOCEntry) (children []string) {\n\te.ForeachChild(func(baseName string, _ *TOCEntry) bool {\n\t\tchildren = append(children, baseName)\n\t\treturn true\n\t})\n\treturn\n}\n\nfunc equalEntry(a, b *TOCEntry) bool {\n\t// Here, we selectively compare fileds that we are interested in.\n\treturn a.Name == b.Name &&\n\t\ta.Type == b.Type &&\n\t\ta.Size == b.Size &&\n\t\ta.ModTime3339 == b.ModTime3339 &&\n\t\ta.Stat().ModTime().Equal(b.Stat().ModTime()) && // modTime     time.Time\n\t\ta.LinkName == b.LinkName &&\n\t\ta.Mode == b.Mode &&\n\t\ta.UID == b.UID &&\n\t\ta.GID == b.GID &&\n\t\ta.Uname == b.Uname &&\n\t\ta.Gname == b.Gname &&\n\t\t(a.Offset >= 0) == (b.Offset >= 0) &&\n\t\t(a.NextOffset() > 0) == (b.NextOffset() > 0) &&\n\t\ta.DevMajor == b.DevMajor &&\n\t\ta.DevMinor == b.DevMinor &&\n\t\ta.NumLink == b.NumLink &&\n\t\treflect.DeepEqual(a.Xattrs, b.Xattrs) &&\n\t\t// chunk-related infomations aren't compared in this function.\n\t\t// ChunkOffset int64 `json:\"chunkOffset,omitempty\"`\n\t\t// ChunkSize   int64 `json:\"chunkSize,omitempty\"`\n\t\t// children map[string]*TOCEntry\n\t\ta.Digest == b.Digest\n}\n\nfunc readOffset(t TestingT, r *io.SectionReader, offset int64, e stargzEntry) ([]byte, int64, bool) {\n\tce, ok := e.r.ChunkEntryForOffset(e.e.Name, offset)\n\tif !ok {\n\t\treturn nil, 0, false\n\t}\n\tdata := make([]byte, ce.ChunkSize)\n\tt.Logf(\"Offset: %v, NextOffset: %v\", ce.Offset, ce.NextOffset())\n\tn, err := r.ReadAt(data, ce.ChunkOffset)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to read file payload of %q (offset:%d,size:%d): %v\",\n\t\t\te.e.Name, ce.ChunkOffset, ce.ChunkSize, err)\n\t}\n\tif int64(n) != ce.ChunkSize {\n\t\tt.Fatalf(\"unexpected copied data size %d; want %d\",\n\t\t\tn, ce.ChunkSize)\n\t}\n\treturn data[:n], offset + ce.ChunkSize, true\n}\n\nfunc dumpTOCJSON(t TestingT, tocJSON *JTOC) string {\n\tjtocData, err := json.Marshal(*tocJSON)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to marshal TOC JSON: %v\", err)\n\t}\n\tbuf := new(bytes.Buffer)\n\tif _, err := io.Copy(buf, bytes.NewReader(jtocData)); err != nil {\n\t\tt.Fatalf(\"failed to read toc json blob: %v\", err)\n\t}\n\treturn buf.String()\n}\n\nconst chunkSize = 3\n\ntype check func(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory)\n\n// testDigestAndVerify runs specified checks against sample stargz blobs.\nfunc testDigestAndVerify(t *TestRunner, controllers ...TestingControllerFactory) {\n\ttests := []struct {\n\t\tname         string\n\t\ttarInit      func(t TestingT, dgstMap map[string]digest.Digest) (blob []tarEntry)\n\t\tchecks       []check\n\t\tminChunkSize []int\n\t}{\n\t\t{\n\t\t\tname: \"no-regfile\",\n\t\t\ttarInit: func(t TestingT, dgstMap map[string]digest.Digest) (blob []tarEntry) {\n\t\t\t\treturn tarOf(\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t)\n\t\t\t},\n\t\t\tchecks: []check{\n\t\t\t\tcheckStargzTOC,\n\t\t\t\tcheckVerifyTOC,\n\t\t\t\tcheckVerifyInvalidStargzFail(buildTar(t, tarOf(\n\t\t\t\t\tdir(\"test2/\"), // modified\n\t\t\t\t), allowedPrefix[0])),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"small-files\",\n\t\t\ttarInit: func(t TestingT, dgstMap map[string]digest.Digest) (blob []tarEntry) {\n\t\t\t\treturn tarOf(\n\t\t\t\t\tregDigest(t, \"baz.txt\", \"\", dgstMap),\n\t\t\t\t\tregDigest(t, \"foo.txt\", \"a\", dgstMap),\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tregDigest(t, \"test/bar.txt\", \"bbb\", dgstMap),\n\t\t\t\t)\n\t\t\t},\n\t\t\tminChunkSize: []int{0, 64000},\n\t\t\tchecks: []check{\n\t\t\t\tcheckStargzTOC,\n\t\t\t\tcheckVerifyTOC,\n\t\t\t\tcheckVerifyInvalidStargzFail(buildTar(t, tarOf(\n\t\t\t\t\tfile(\"baz.txt\", \"\"),\n\t\t\t\t\tfile(\"foo.txt\", \"M\"), // modified\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tfile(\"test/bar.txt\", \"bbb\"),\n\t\t\t\t), allowedPrefix[0])),\n\t\t\t\t// checkVerifyInvalidTOCEntryFail(\"foo.txt\"), // TODO\n\t\t\t\tcheckVerifyBrokenContentFail(\"foo.txt\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"big-files\",\n\t\t\ttarInit: func(t TestingT, dgstMap map[string]digest.Digest) (blob []tarEntry) {\n\t\t\t\treturn tarOf(\n\t\t\t\t\tregDigest(t, \"baz.txt\", \"bazbazbazbazbazbazbaz\", dgstMap),\n\t\t\t\t\tregDigest(t, \"foo.txt\", \"a\", dgstMap),\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tregDigest(t, \"test/bar.txt\", \"testbartestbar\", dgstMap),\n\t\t\t\t)\n\t\t\t},\n\t\t\tchecks: []check{\n\t\t\t\tcheckStargzTOC,\n\t\t\t\tcheckVerifyTOC,\n\t\t\t\tcheckVerifyInvalidStargzFail(buildTar(t, tarOf(\n\t\t\t\t\tfile(\"baz.txt\", \"bazbazbazMMMbazbazbaz\"), // modified\n\t\t\t\t\tfile(\"foo.txt\", \"a\"),\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tfile(\"test/bar.txt\", \"testbartestbar\"),\n\t\t\t\t), allowedPrefix[0])),\n\t\t\t\tcheckVerifyInvalidTOCEntryFail(\"test/bar.txt\"),\n\t\t\t\tcheckVerifyBrokenContentFail(\"test/bar.txt\"),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:         \"with-non-regfiles\",\n\t\t\tminChunkSize: []int{0, 64000},\n\t\t\ttarInit: func(t TestingT, dgstMap map[string]digest.Digest) (blob []tarEntry) {\n\t\t\t\treturn tarOf(\n\t\t\t\t\tregDigest(t, \"baz.txt\", \"bazbazbazbazbazbazbaz\", dgstMap),\n\t\t\t\t\tregDigest(t, \"foo.txt\", \"a\", dgstMap),\n\t\t\t\t\tregDigest(t, \"bar/foo2.txt\", \"b\", dgstMap),\n\t\t\t\t\tregDigest(t, \"foo3.txt\", \"c\", dgstMap),\n\t\t\t\t\tsymlink(\"barlink\", \"test/bar.txt\"),\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tregDigest(t, \"test/bar.txt\", \"testbartestbar\", dgstMap),\n\t\t\t\t\tdir(\"test2/\"),\n\t\t\t\t\tlink(\"test2/bazlink\", \"baz.txt\"),\n\t\t\t\t)\n\t\t\t},\n\t\t\tchecks: []check{\n\t\t\t\tcheckStargzTOC,\n\t\t\t\tcheckVerifyTOC,\n\t\t\t\tcheckVerifyInvalidStargzFail(buildTar(t, tarOf(\n\t\t\t\t\tfile(\"baz.txt\", \"bazbazbazbazbazbazbaz\"),\n\t\t\t\t\tfile(\"foo.txt\", \"a\"),\n\t\t\t\t\tfile(\"bar/foo2.txt\", \"b\"),\n\t\t\t\t\tfile(\"foo3.txt\", \"c\"),\n\t\t\t\t\tsymlink(\"barlink\", \"test/bar.txt\"),\n\t\t\t\t\tdir(\"test/\"),\n\t\t\t\t\tfile(\"test/bar.txt\", \"testbartestbar\"),\n\t\t\t\t\tdir(\"test2/\"),\n\t\t\t\t\tlink(\"test2/bazlink\", \"foo.txt\"), // modified\n\t\t\t\t), allowedPrefix[0])),\n\t\t\t\tcheckVerifyInvalidTOCEntryFail(\"test/bar.txt\"),\n\t\t\t\tcheckVerifyBrokenContentFail(\"test/bar.txt\"),\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tif len(tt.minChunkSize) == 0 {\n\t\t\ttt.minChunkSize = []int{0}\n\t\t}\n\t\tfor _, srcCompression := range srcCompressions {\n\t\t\tsrcCompression := srcCompression\n\t\t\tfor _, newCL := range controllers {\n\t\t\t\tnewCL := newCL\n\t\t\t\tfor _, prefix := range allowedPrefix {\n\t\t\t\t\tprefix := prefix\n\t\t\t\t\tfor _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} {\n\t\t\t\t\t\tsrcTarFormat := srcTarFormat\n\t\t\t\t\t\tfor _, minChunkSize := range tt.minChunkSize {\n\t\t\t\t\t\t\tminChunkSize := minChunkSize\n\t\t\t\t\t\t\tt.Run(tt.name+\"-\"+fmt.Sprintf(\"compression=%v,prefix=%q,format=%s,minChunkSize=%d\", newCL(), prefix, srcTarFormat, minChunkSize), func(t *TestRunner) {\n\t\t\t\t\t\t\t\t// Get original tar file and chunk digests\n\t\t\t\t\t\t\t\tdgstMap := make(map[string]digest.Digest)\n\t\t\t\t\t\t\t\ttarBlob := buildTar(t, tt.tarInit(t, dgstMap), prefix, srcTarFormat)\n\n\t\t\t\t\t\t\t\tcl := newCL()\n\t\t\t\t\t\t\t\trc, err := Build(compressBlob(t, tarBlob, srcCompression),\n\t\t\t\t\t\t\t\t\tWithChunkSize(chunkSize), WithCompression(cl))\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to convert stargz: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttocDigest := rc.TOCDigest()\n\t\t\t\t\t\t\t\tdefer rc.Close()\n\t\t\t\t\t\t\t\tbuf := new(bytes.Buffer)\n\t\t\t\t\t\t\t\tif _, err := io.Copy(buf, rc); err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"failed to copy built stargz blob: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnewStargz := buf.Bytes()\n\t\t\t\t\t\t\t\t// NoPrefetchLandmark is added during `Bulid`, which is expected behaviour.\n\t\t\t\t\t\t\t\tdgstMap[chunkID(NoPrefetchLandmark, 0, int64(len([]byte{landmarkContents})))] = digest.FromBytes([]byte{landmarkContents})\n\n\t\t\t\t\t\t\t\tfor _, check := range tt.checks {\n\t\t\t\t\t\t\t\t\tcheck(t, newStargz, tocDigest, dgstMap, cl, newCL)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// checkStargzTOC checks the TOC JSON of the passed stargz has the expected\n// digest and contains valid chunks. It walks all entries in the stargz and\n// checks all chunk digests stored to the TOC JSON match the actual contents.\nfunc checkStargzTOC(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) {\n\tsgz, err := Open(\n\t\tio.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))),\n\t\tWithDecompressors(controller),\n\t)\n\tif err != nil {\n\t\tt.Errorf(\"failed to parse converted stargz: %v\", err)\n\t\treturn\n\t}\n\tdigestMapTOC, err := listDigests(io.NewSectionReader(\n\t\tbytes.NewReader(sgzData), 0, int64(len(sgzData))),\n\t\tcontroller,\n\t)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to list digest: %v\", err)\n\t}\n\tfound := make(map[string]bool)\n\tfor id := range dgstMap {\n\t\tfound[id] = false\n\t}\n\tzr, err := controller.Reader(bytes.NewReader(sgzData))\n\tif err != nil {\n\t\tt.Fatalf(\"failed to decompress converted stargz: %v\", err)\n\t}\n\tdefer zr.Close()\n\ttr := tar.NewReader(zr)\n\tfor {\n\t\th, err := tr.Next()\n\t\tif err != nil {\n\t\t\tif err != io.EOF {\n\t\t\t\tt.Errorf(\"failed to read tar entry: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif h.Name == TOCTarName {\n\t\t\t// Check the digest of TOC JSON based on the actual contents\n\t\t\t// It's sure that TOC JSON exists in this archive because\n\t\t\t// Open succeeded.\n\t\t\tdgstr := digest.Canonical.Digester()\n\t\t\tif _, err := io.Copy(dgstr.Hash(), tr); err != nil {\n\t\t\t\tt.Fatalf(\"failed to calculate digest of TOC JSON: %v\",\n\t\t\t\t\terr)\n\t\t\t}\n\t\t\tif dgstr.Digest() != tocDigest {\n\t\t\t\tt.Errorf(\"invalid TOC JSON %q; want %q\", tocDigest, dgstr.Digest())\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif _, ok := sgz.Lookup(h.Name); !ok {\n\t\t\tt.Errorf(\"lost stargz entry %q in the converted TOC\", h.Name)\n\t\t\treturn\n\t\t}\n\t\tvar n int64\n\t\tfor n < h.Size {\n\t\t\tce, ok := sgz.ChunkEntryForOffset(h.Name, n)\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"lost chunk %q(offset=%d) in the converted TOC\",\n\t\t\t\t\th.Name, n)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Get the original digest to make sure the file contents are kept unchanged\n\t\t\t// from the original tar, during the whole conversion steps.\n\t\t\tid := chunkID(h.Name, n, ce.ChunkSize)\n\t\t\twant, ok := dgstMap[id]\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"Unexpected chunk %q(offset=%d,size=%d): %v\",\n\t\t\t\t\th.Name, n, ce.ChunkSize, dgstMap)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfound[id] = true\n\n\t\t\t// Check the file contents\n\t\t\tdgstr := digest.Canonical.Digester()\n\t\t\tif _, err := io.CopyN(dgstr.Hash(), tr, ce.ChunkSize); err != nil {\n\t\t\t\tt.Fatalf(\"failed to calculate digest of %q (offset=%d,size=%d)\",\n\t\t\t\t\th.Name, n, ce.ChunkSize)\n\t\t\t}\n\t\t\tif want != dgstr.Digest() {\n\t\t\t\tt.Errorf(\"Invalid contents in converted stargz %q: %q; want %q\",\n\t\t\t\t\th.Name, dgstr.Digest(), want)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Check the digest stored in TOC JSON\n\t\t\tdgstTOC, ok := digestMapTOC[ce.Offset]\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"digest of %q(offset=%d,size=%d,chunkOffset=%d) isn't registered\",\n\t\t\t\t\th.Name, ce.Offset, ce.ChunkSize, ce.ChunkOffset)\n\t\t\t}\n\t\t\tif want != dgstTOC {\n\t\t\t\tt.Errorf(\"Invalid digest in TOCEntry %q: %q; want %q\",\n\t\t\t\t\th.Name, dgstTOC, want)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tn += ce.ChunkSize\n\t\t}\n\t}\n\n\tfor id, ok := range found {\n\t\tif !ok {\n\t\t\tt.Errorf(\"required chunk %q not found in the converted stargz: %v\", id, found)\n\t\t}\n\t}\n}\n\n// checkVerifyTOC checks the verification works for the TOC JSON of the passed\n// stargz. It walks all entries in the stargz and checks the verifications for\n// all chunks work.\nfunc checkVerifyTOC(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) {\n\tsgz, err := Open(\n\t\tio.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))),\n\t\tWithDecompressors(controller),\n\t)\n\tif err != nil {\n\t\tt.Errorf(\"failed to parse converted stargz: %v\", err)\n\t\treturn\n\t}\n\tev, err := sgz.VerifyTOC(tocDigest)\n\tif err != nil {\n\t\tt.Errorf(\"failed to verify stargz: %v\", err)\n\t\treturn\n\t}\n\n\tfound := make(map[string]bool)\n\tfor id := range dgstMap {\n\t\tfound[id] = false\n\t}\n\tzr, err := controller.Reader(bytes.NewReader(sgzData))\n\tif err != nil {\n\t\tt.Fatalf(\"failed to decompress converted stargz: %v\", err)\n\t}\n\tdefer zr.Close()\n\ttr := tar.NewReader(zr)\n\tfor {\n\t\th, err := tr.Next()\n\t\tif err != nil {\n\t\t\tif err != io.EOF {\n\t\t\t\tt.Errorf(\"failed to read tar entry: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif h.Name == TOCTarName {\n\t\t\tcontinue\n\t\t}\n\t\tif _, ok := sgz.Lookup(h.Name); !ok {\n\t\t\tt.Errorf(\"lost stargz entry %q in the converted TOC\", h.Name)\n\t\t\treturn\n\t\t}\n\t\tvar n int64\n\t\tfor n < h.Size {\n\t\t\tce, ok := sgz.ChunkEntryForOffset(h.Name, n)\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"lost chunk %q(offset=%d) in the converted TOC\",\n\t\t\t\t\th.Name, n)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tv, err := ev.Verifier(ce)\n\t\t\tif err != nil {\n\t\t\t\tt.Errorf(\"failed to get verifier for %q(offset=%d)\", h.Name, n)\n\t\t\t}\n\n\t\t\tfound[chunkID(h.Name, n, ce.ChunkSize)] = true\n\n\t\t\t// Check the file contents\n\t\t\tif _, err := io.CopyN(v, tr, ce.ChunkSize); err != nil {\n\t\t\t\tt.Fatalf(\"failed to get chunk of %q (offset=%d,size=%d)\",\n\t\t\t\t\th.Name, n, ce.ChunkSize)\n\t\t\t}\n\t\t\tif !v.Verified() {\n\t\t\t\tt.Errorf(\"Invalid contents in converted stargz %q (should be succeeded)\",\n\t\t\t\t\th.Name)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tn += ce.ChunkSize\n\t\t}\n\t}\n\n\tfor id, ok := range found {\n\t\tif !ok {\n\t\t\tt.Errorf(\"required chunk %q not found in the converted stargz: %v\", id, found)\n\t\t}\n\t}\n}\n\n// checkVerifyInvalidTOCEntryFail checks if misconfigured TOC JSON can be\n// detected during the verification and the verification returns an error.\nfunc checkVerifyInvalidTOCEntryFail(filename string) check {\n\treturn func(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) {\n\t\tfuncs := map[string]rewriteFunc{\n\t\t\t\"lost digest in a entry\": func(t TestingT, toc *JTOC, sgz *io.SectionReader) {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range toc.Entries {\n\t\t\t\t\tif cleanEntryName(e.Name) == filename {\n\t\t\t\t\t\tif e.Type != \"reg\" && e.Type != \"chunk\" {\n\t\t\t\t\t\t\tt.Fatalf(\"entry %q to break must be regfile or chunk\", filename)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif e.ChunkDigest == \"\" {\n\t\t\t\t\t\t\tt.Fatalf(\"entry %q is already invalid\", filename)\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.ChunkDigest = \"\"\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif !found {\n\t\t\t\t\tt.Fatalf(\"rewrite target not found\")\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"duplicated entry offset\": func(t TestingT, toc *JTOC, sgz *io.SectionReader) {\n\t\t\t\tvar (\n\t\t\t\t\tsampleEntry *TOCEntry\n\t\t\t\t\ttargetEntry *TOCEntry\n\t\t\t\t)\n\t\t\t\tfor _, e := range toc.Entries {\n\t\t\t\t\tif e.Type == \"reg\" || e.Type == \"chunk\" {\n\t\t\t\t\t\tif cleanEntryName(e.Name) == filename {\n\t\t\t\t\t\t\ttargetEntry = e\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsampleEntry = e\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif sampleEntry == nil {\n\t\t\t\t\tt.Fatalf(\"TOC must contain at least one regfile or chunk entry other than the rewrite target\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif targetEntry == nil {\n\t\t\t\t\tt.Fatalf(\"rewrite target not found\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\ttargetEntry.Offset = sampleEntry.Offset\n\t\t\t},\n\t\t}\n\n\t\tfor name, rFunc := range funcs {\n\t\t\tt.Run(name, func(t *TestRunner) {\n\t\t\t\tnewSgz, newTocDigest := rewriteTOCJSON(t, io.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))), rFunc, controller)\n\t\t\t\tbuf := new(bytes.Buffer)\n\t\t\t\tif _, err := io.Copy(buf, newSgz); err != nil {\n\t\t\t\t\tt.Fatalf(\"failed to get converted stargz\")\n\t\t\t\t}\n\t\t\t\tisgz := buf.Bytes()\n\n\t\t\t\tsgz, err := Open(\n\t\t\t\t\tio.NewSectionReader(bytes.NewReader(isgz), 0, int64(len(isgz))),\n\t\t\t\t\tWithDecompressors(controller),\n\t\t\t\t)\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Fatalf(\"failed to parse converted stargz: %v\", err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t_, err = sgz.VerifyTOC(newTocDigest)\n\t\t\t\tif err == nil {\n\t\t\t\t\tt.Errorf(\"must fail for invalid TOC\")\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n\n// checkVerifyInvalidStargzFail checks if the verification detects that the\n// given stargz file doesn't match to the expected digest and returns error.\nfunc checkVerifyInvalidStargzFail(invalid *io.SectionReader) check {\n\treturn func(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) {\n\t\tcl := newController()\n\t\trc, err := Build(invalid, WithChunkSize(chunkSize), WithCompression(cl))\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to convert stargz: %v\", err)\n\t\t}\n\t\tdefer rc.Close()\n\t\tbuf := new(bytes.Buffer)\n\t\tif _, err := io.Copy(buf, rc); err != nil {\n\t\t\tt.Fatalf(\"failed to copy built stargz blob: %v\", err)\n\t\t}\n\t\tmStargz := buf.Bytes()\n\n\t\tsgz, err := Open(\n\t\t\tio.NewSectionReader(bytes.NewReader(mStargz), 0, int64(len(mStargz))),\n\t\t\tWithDecompressors(cl),\n\t\t)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to parse converted stargz: %v\", err)\n\t\t\treturn\n\t\t}\n\t\t_, err = sgz.VerifyTOC(tocDigest)\n\t\tif err == nil {\n\t\t\tt.Errorf(\"must fail for invalid TOC\")\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// checkVerifyBrokenContentFail checks if the verifier detects broken contents\n// that doesn't match to the expected digest and returns error.\nfunc checkVerifyBrokenContentFail(filename string) check {\n\treturn func(t *TestRunner, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) {\n\t\t// Parse stargz file\n\t\tsgz, err := Open(\n\t\t\tio.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))),\n\t\t\tWithDecompressors(controller),\n\t\t)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to parse converted stargz: %v\", err)\n\t\t\treturn\n\t\t}\n\t\tev, err := sgz.VerifyTOC(tocDigest)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to verify stargz: %v\", err)\n\t\t\treturn\n\t\t}\n\n\t\t// Open the target file\n\t\tsr, err := sgz.OpenFile(filename)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to open file %q\", filename)\n\t\t}\n\t\tce, ok := sgz.ChunkEntryForOffset(filename, 0)\n\t\tif !ok {\n\t\t\tt.Fatalf(\"lost chunk %q(offset=%d) in the converted TOC\", filename, 0)\n\t\t\treturn\n\t\t}\n\t\tif ce.ChunkSize == 0 {\n\t\t\tt.Fatalf(\"file mustn't be empty\")\n\t\t\treturn\n\t\t}\n\t\tdata := make([]byte, ce.ChunkSize)\n\t\tif _, err := sr.ReadAt(data, ce.ChunkOffset); err != nil {\n\t\t\tt.Errorf(\"failed to get data of a chunk of %q(offset=%q)\",\n\t\t\t\tfilename, ce.ChunkOffset)\n\t\t}\n\n\t\t// Check the broken chunk (must fail)\n\t\tv, err := ev.Verifier(ce)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"failed to get verifier for %q\", filename)\n\t\t}\n\t\tbroken := append([]byte{^data[0]}, data[1:]...)\n\t\tif _, err := io.CopyN(v, bytes.NewReader(broken), ce.ChunkSize); err != nil {\n\t\t\tt.Fatalf(\"failed to get chunk of %q (offset=%d,size=%d)\",\n\t\t\t\tfilename, ce.ChunkOffset, ce.ChunkSize)\n\t\t}\n\t\tif v.Verified() {\n\t\t\tt.Errorf(\"verification must fail for broken file chunk %q(org:%q,broken:%q)\",\n\t\t\t\tfilename, data, broken)\n\t\t}\n\t}\n}\n\nfunc chunkID(name string, offset, size int64) string {\n\treturn fmt.Sprintf(\"%s-%d-%d\", cleanEntryName(name), offset, size)\n}\n\ntype rewriteFunc func(t TestingT, toc *JTOC, sgz *io.SectionReader)\n\nfunc rewriteTOCJSON(t TestingT, sgz *io.SectionReader, rewrite rewriteFunc, controller TestingController) (newSgz io.Reader, tocDigest digest.Digest) {\n\tdecodedJTOC, jtocOffset, err := parseStargz(sgz, controller)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to extract TOC JSON: %v\", err)\n\t}\n\n\trewrite(t, decodedJTOC, sgz)\n\n\ttocFooter, tocDigest, err := tocAndFooter(controller, decodedJTOC, jtocOffset)\n\tif err != nil {\n\t\tt.Fatalf(\"failed to create toc and footer: %v\", err)\n\t}\n\n\t// Reconstruct stargz file with the modified TOC JSON\n\tif _, err := sgz.Seek(0, io.SeekStart); err != nil {\n\t\tt.Fatalf(\"failed to reset the seek position of stargz: %v\", err)\n\t}\n\treturn io.MultiReader(\n\t\tio.LimitReader(sgz, jtocOffset), // Original stargz (before TOC JSON)\n\t\ttocFooter,                       // Rewritten TOC and footer\n\t), tocDigest\n}\n\nfunc listDigests(sgz *io.SectionReader, controller TestingController) (map[int64]digest.Digest, error) {\n\tdecodedJTOC, _, err := parseStargz(sgz, controller)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdigestMap := make(map[int64]digest.Digest)\n\tfor _, e := range decodedJTOC.Entries {\n\t\tif e.Type == \"reg\" || e.Type == \"chunk\" {\n\t\t\tif e.Type == \"reg\" && e.Size == 0 {\n\t\t\t\tcontinue // ignores empty file\n\t\t\t}\n\t\t\tif e.ChunkDigest == \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"ChunkDigest of %q(off=%d) not found in TOC JSON\",\n\t\t\t\t\te.Name, e.Offset)\n\t\t\t}\n\t\t\td, err := digest.Parse(e.ChunkDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdigestMap[e.Offset] = d\n\t\t}\n\t}\n\treturn digestMap, nil\n}\n\nfunc parseStargz(sgz *io.SectionReader, controller TestingController) (decodedJTOC *JTOC, jtocOffset int64, err error) {\n\tfSize := controller.FooterSize()\n\tfooter := make([]byte, fSize)\n\tif _, err := sgz.ReadAt(footer, sgz.Size()-fSize); err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"error reading footer: %w\", err)\n\t}\n\t_, tocOffset, _, err := controller.ParseFooter(footer[positive(int64(len(footer))-fSize):])\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"failed to parse footer: %w\", err)\n\t}\n\n\t// Decode the TOC JSON\n\tvar tocReader io.Reader\n\tif tocOffset >= 0 {\n\t\ttocReader = io.NewSectionReader(sgz, tocOffset, sgz.Size()-tocOffset-fSize)\n\t}\n\tdecodedJTOC, _, err = controller.ParseTOC(tocReader)\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"failed to parse TOC: %w\", err)\n\t}\n\treturn decodedJTOC, tocOffset, nil\n}\n\nfunc testWriteAndOpen(t *TestRunner, controllers ...TestingControllerFactory) {\n\tconst content = \"Some contents\"\n\tinvalidUtf8 := \"\\xff\\xfe\\xfd\"\n\n\txAttrFile := xAttr{\"foo\": \"bar\", \"invalid-utf8\": invalidUtf8}\n\tsampleOwner := owner{uid: 50, gid: 100}\n\n\tdata64KB := randomContents(64000)\n\n\ttests := []struct {\n\t\tname         string\n\t\tchunkSize    int\n\t\tminChunkSize int\n\t\tin           []tarEntry\n\t\twant         []stargzCheck\n\t\twantNumGz    int // expected number of streams\n\n\t\twantNumGzLossLess  int // expected number of streams (> 0) in lossless mode if it's different from wantNumGz\n\t\twantFailOnLossLess bool\n\t\twantTOCVersion     int // default = 1\n\t}{\n\t\t{\n\t\t\tname:      \"empty\",\n\t\t\tin:        tarOf(),\n\t\t\twantNumGz: 2, // (empty tar) + TOC + footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(0),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"1dir_1empty_file\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/bar.txt\", \"\"),\n\t\t\t),\n\t\t\twantNumGz: 3, // dir, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(2),\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasFileLen(\"foo/bar.txt\", 0),\n\t\t\t\tentryHasChildren(\"foo\", \"bar.txt\"),\n\t\t\t\thasFileDigest(\"foo/bar.txt\", digestFor(\"\")),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"1dir_1file\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/bar.txt\", content, xAttrFile),\n\t\t\t),\n\t\t\twantNumGz: 4, // var dir, foo.txt alone, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(2),\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasFileLen(\"foo/bar.txt\", len(content)),\n\t\t\t\thasFileDigest(\"foo/bar.txt\", digestFor(content)),\n\t\t\t\thasFileContentsRange(\"foo/bar.txt\", 0, content),\n\t\t\t\thasFileContentsRange(\"foo/bar.txt\", 1, content[1:]),\n\t\t\t\tentryHasChildren(\"\", \"foo\"),\n\t\t\t\tentryHasChildren(\"foo\", \"bar.txt\"),\n\t\t\t\thasFileXattrs(\"foo/bar.txt\", \"foo\", \"bar\"),\n\t\t\t\thasFileXattrs(\"foo/bar.txt\", \"invalid-utf8\", invalidUtf8),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"2meta_2file\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"bar/\", sampleOwner),\n\t\t\t\tdir(\"foo/\", sampleOwner),\n\t\t\t\tfile(\"foo/bar.txt\", content, sampleOwner),\n\t\t\t),\n\t\t\twantNumGz: 4, // both dirs, foo.txt alone, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(3),\n\t\t\t\thasDir(\"bar/\"),\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasFileLen(\"foo/bar.txt\", len(content)),\n\t\t\t\tentryHasChildren(\"\", \"bar\", \"foo\"),\n\t\t\t\tentryHasChildren(\"foo\", \"bar.txt\"),\n\t\t\t\thasChunkEntries(\"foo/bar.txt\", 1),\n\t\t\t\thasEntryOwner(\"bar/\", sampleOwner),\n\t\t\t\thasEntryOwner(\"foo/\", sampleOwner),\n\t\t\t\thasEntryOwner(\"foo/bar.txt\", sampleOwner),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"3dir\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"bar/\"),\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tdir(\"foo/bar/\"),\n\t\t\t),\n\t\t\twantNumGz: 3, // 3 dirs, TOC, footer\n\t\t\twant: checks(\n\t\t\t\thasDirLinkCount(\"bar/\", 2),\n\t\t\t\thasDirLinkCount(\"foo/\", 3),\n\t\t\t\thasDirLinkCount(\"foo/bar/\", 2),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"symlink\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tsymlink(\"foo/bar\", \"../../x\"),\n\t\t\t),\n\t\t\twantNumGz: 3, // metas + TOC + footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(2),\n\t\t\t\thasSymlink(\"foo/bar\", \"../../x\"),\n\t\t\t\tentryHasChildren(\"\", \"foo\"),\n\t\t\t\tentryHasChildren(\"foo\", \"bar\"),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:      \"chunked_file\",\n\t\t\tchunkSize: 4,\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/big.txt\", \"This \"+\"is s\"+\"uch \"+\"a bi\"+\"g fi\"+\"le\"),\n\t\t\t),\n\t\t\twantNumGz: 9, // dir + big.txt(6 chunks) + TOC + footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(7), // 1 for foo dir, 6 for the foo/big.txt file\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasFileLen(\"foo/big.txt\", len(\"This is such a big file\")),\n\t\t\t\thasFileDigest(\"foo/big.txt\", digestFor(\"This is such a big file\")),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 0, \"This is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 1, \"his is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 2, \"is is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 3, \"s is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 4, \" is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 5, \"is such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 6, \"s such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 7, \" such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 8, \"such a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 9, \"uch a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 10, \"ch a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 11, \"h a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", 12, \" a big file\"),\n\t\t\t\thasFileContentsRange(\"foo/big.txt\", len(\"This is such a big file\")-1, \"\"),\n\t\t\t\thasChunkEntries(\"foo/big.txt\", 6),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"recursive\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"/\", sampleOwner),\n\t\t\t\tdir(\"bar/\", sampleOwner),\n\t\t\t\tdir(\"foo/\", sampleOwner),\n\t\t\t\tfile(\"foo/bar.txt\", content, sampleOwner),\n\t\t\t),\n\t\t\twantNumGz: 4, // dirs, bar.txt alone, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tmaxDepth(2), // 0: root directory, 1: \"foo/\", 2: \"bar.txt\"\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"block_char_fifo\",\n\t\t\tin: tarOf(\n\t\t\t\ttarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\t\t\t\treturn w.WriteHeader(&tar.Header{\n\t\t\t\t\t\tName:     prefix + \"b\",\n\t\t\t\t\t\tTypeflag: tar.TypeBlock,\n\t\t\t\t\t\tDevmajor: 123,\n\t\t\t\t\t\tDevminor: 456,\n\t\t\t\t\t\tFormat:   format,\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\t\t\t\treturn w.WriteHeader(&tar.Header{\n\t\t\t\t\t\tName:     prefix + \"c\",\n\t\t\t\t\t\tTypeflag: tar.TypeChar,\n\t\t\t\t\t\tDevmajor: 111,\n\t\t\t\t\t\tDevminor: 222,\n\t\t\t\t\t\tFormat:   format,\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\t\t\t\treturn w.WriteHeader(&tar.Header{\n\t\t\t\t\t\tName:     prefix + \"f\",\n\t\t\t\t\t\tTypeflag: tar.TypeFifo,\n\t\t\t\t\t\tFormat:   format,\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t),\n\t\t\twantNumGz: 3,\n\t\t\twant: checks(\n\t\t\t\tlookupMatch(\"b\", &TOCEntry{Name: \"b\", Type: \"block\", DevMajor: 123, DevMinor: 456, NumLink: 1}),\n\t\t\t\tlookupMatch(\"c\", &TOCEntry{Name: \"c\", Type: \"char\", DevMajor: 111, DevMinor: 222, NumLink: 1}),\n\t\t\t\tlookupMatch(\"f\", &TOCEntry{Name: \"f\", Type: \"fifo\", NumLink: 1}),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"modes\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo1/\", 0755|os.ModeDir|os.ModeSetgid),\n\t\t\t\tfile(\"foo1/bar1\", content, 0700|os.ModeSetuid),\n\t\t\t\tfile(\"foo1/bar2\", content, 0755|os.ModeSetgid),\n\t\t\t\tdir(\"foo2/\", 0755|os.ModeDir|os.ModeSticky),\n\t\t\t\tfile(\"foo2/bar3\", content, 0755|os.ModeSticky),\n\t\t\t\tdir(\"foo3/\", 0755|os.ModeDir),\n\t\t\t\tfile(\"foo3/bar4\", content, os.FileMode(0700)),\n\t\t\t\tfile(\"foo3/bar5\", content, os.FileMode(0755)),\n\t\t\t),\n\t\t\twantNumGz: 8, // dir, bar1 alone, bar2 alone + dir, bar3 alone + dir, bar4 alone, bar5 alone, TOC, footer\n\t\t\twant: checks(\n\t\t\t\thasMode(\"foo1/\", 0755|os.ModeDir|os.ModeSetgid),\n\t\t\t\thasMode(\"foo1/bar1\", 0700|os.ModeSetuid),\n\t\t\t\thasMode(\"foo1/bar2\", 0755|os.ModeSetgid),\n\t\t\t\thasMode(\"foo2/\", 0755|os.ModeDir|os.ModeSticky),\n\t\t\t\thasMode(\"foo2/bar3\", 0755|os.ModeSticky),\n\t\t\t\thasMode(\"foo3/\", 0755|os.ModeDir),\n\t\t\t\thasMode(\"foo3/bar4\", os.FileMode(0700)),\n\t\t\t\thasMode(\"foo3/bar5\", os.FileMode(0755)),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: \"lossy\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"bar/\", sampleOwner),\n\t\t\t\tdir(\"foo/\", sampleOwner),\n\t\t\t\tfile(\"foo/bar.txt\", content, sampleOwner),\n\t\t\t\tfile(TOCTarName, \"dummy\"), // ignored by the writer. (lossless write returns error)\n\t\t\t),\n\t\t\twantNumGz: 4, // both dirs, foo.txt alone, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(3),\n\t\t\t\thasDir(\"bar/\"),\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasFileLen(\"foo/bar.txt\", len(content)),\n\t\t\t\tentryHasChildren(\"\", \"bar\", \"foo\"),\n\t\t\t\tentryHasChildren(\"foo\", \"bar.txt\"),\n\t\t\t\thasChunkEntries(\"foo/bar.txt\", 1),\n\t\t\t\thasEntryOwner(\"bar/\", sampleOwner),\n\t\t\t\thasEntryOwner(\"foo/\", sampleOwner),\n\t\t\t\thasEntryOwner(\"foo/bar.txt\", sampleOwner),\n\t\t\t),\n\t\t\twantFailOnLossLess: true,\n\t\t},\n\t\t{\n\t\t\tname: \"hardlink should be replaced to the destination entry\",\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/foo1\", \"test\"),\n\t\t\t\tlink(\"foolink\", \"foo/foo1\"),\n\t\t\t),\n\t\t\twantNumGz: 4, // dir, foo1 + link, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tmustSameEntry(\"foo/foo1\", \"foolink\"),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:         \"several_files_in_chunk\",\n\t\t\tminChunkSize: 8000,\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/foo1\", data64KB),\n\t\t\t\tfile(\"foo2\", \"bb\"),\n\t\t\t\tfile(\"foo22\", \"ccc\"),\n\t\t\t\tdir(\"bar/\"),\n\t\t\t\tfile(\"bar/bar.txt\", \"aaa\"),\n\t\t\t\tfile(\"foo3\", data64KB),\n\t\t\t),\n\t\t\t// NOTE: we assume that the compressed \"data64KB\" is still larger than 8KB\n\t\t\twantNumGz: 4, // dir+foo1, foo2+foo22+dir+bar.txt+foo3, TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(7), // dir, foo1, foo2, foo22, dir, bar.txt, foo3\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasDir(\"bar/\"),\n\t\t\t\thasFileLen(\"foo/foo1\", len(data64KB)),\n\t\t\t\thasFileLen(\"foo2\", len(\"bb\")),\n\t\t\t\thasFileLen(\"foo22\", len(\"ccc\")),\n\t\t\t\thasFileLen(\"bar/bar.txt\", len(\"aaa\")),\n\t\t\t\thasFileLen(\"foo3\", len(data64KB)),\n\t\t\t\thasFileDigest(\"foo/foo1\", digestFor(data64KB)),\n\t\t\t\thasFileDigest(\"foo2\", digestFor(\"bb\")),\n\t\t\t\thasFileDigest(\"foo22\", digestFor(\"ccc\")),\n\t\t\t\thasFileDigest(\"bar/bar.txt\", digestFor(\"aaa\")),\n\t\t\t\thasFileDigest(\"foo3\", digestFor(data64KB)),\n\t\t\t\thasFileContentsWithPreRead(\"foo22\", 0, \"ccc\", chunkInfo{\"foo2\", \"bb\"}, chunkInfo{\"bar/bar.txt\", \"aaa\"}, chunkInfo{\"foo3\", data64KB}),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", 0, data64KB),\n\t\t\t\thasFileContentsRange(\"foo2\", 0, \"bb\"),\n\t\t\t\thasFileContentsRange(\"foo2\", 1, \"b\"),\n\t\t\t\thasFileContentsRange(\"foo22\", 0, \"ccc\"),\n\t\t\t\thasFileContentsRange(\"foo22\", 1, \"cc\"),\n\t\t\t\thasFileContentsRange(\"foo22\", 2, \"c\"),\n\t\t\t\thasFileContentsRange(\"bar/bar.txt\", 0, \"aaa\"),\n\t\t\t\thasFileContentsRange(\"bar/bar.txt\", 1, \"aa\"),\n\t\t\t\thasFileContentsRange(\"bar/bar.txt\", 2, \"a\"),\n\t\t\t\thasFileContentsRange(\"foo3\", 0, data64KB),\n\t\t\t\thasFileContentsRange(\"foo3\", 1, data64KB[1:]),\n\t\t\t\thasFileContentsRange(\"foo3\", 2, data64KB[2:]),\n\t\t\t\thasFileContentsRange(\"foo3\", len(data64KB)/2, data64KB[len(data64KB)/2:]),\n\t\t\t\thasFileContentsRange(\"foo3\", len(data64KB)-1, data64KB[len(data64KB)-1:]),\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname:         \"several_files_in_chunk_chunked\",\n\t\t\tminChunkSize: 8000,\n\t\t\tchunkSize:    32000,\n\t\t\tin: tarOf(\n\t\t\t\tdir(\"foo/\"),\n\t\t\t\tfile(\"foo/foo1\", data64KB),\n\t\t\t\tfile(\"foo2\", \"bb\"),\n\t\t\t\tdir(\"bar/\"),\n\t\t\t\tfile(\"foo3\", data64KB),\n\t\t\t),\n\t\t\t// NOTE: we assume that the compressed chunk of \"data64KB\" is still larger than 8KB\n\t\t\twantNumGz: 6, // dir+foo1(1), foo1(2), foo2+dir+foo3(1), foo3(2), TOC, footer\n\t\t\twant: checks(\n\t\t\t\tnumTOCEntries(7), // dir, foo1(2 chunks), foo2, dir, foo3(2 chunks)\n\t\t\t\thasDir(\"foo/\"),\n\t\t\t\thasDir(\"bar/\"),\n\t\t\t\thasFileLen(\"foo/foo1\", len(data64KB)),\n\t\t\t\thasFileLen(\"foo2\", len(\"bb\")),\n\t\t\t\thasFileLen(\"foo3\", len(data64KB)),\n\t\t\t\thasFileDigest(\"foo/foo1\", digestFor(data64KB)),\n\t\t\t\thasFileDigest(\"foo2\", digestFor(\"bb\")),\n\t\t\t\thasFileDigest(\"foo3\", digestFor(data64KB)),\n\t\t\t\thasFileContentsWithPreRead(\"foo2\", 0, \"bb\", chunkInfo{\"foo3\", data64KB[:32000]}),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", 0, data64KB),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", 1, data64KB[1:]),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", 2, data64KB[2:]),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", len(data64KB)/2, data64KB[len(data64KB)/2:]),\n\t\t\t\thasFileContentsRange(\"foo/foo1\", len(data64KB)-1, data64KB[len(data64KB)-1:]),\n\t\t\t\thasFileContentsRange(\"foo2\", 0, \"bb\"),\n\t\t\t\thasFileContentsRange(\"foo2\", 1, \"b\"),\n\t\t\t\thasFileContentsRange(\"foo3\", 0, data64KB),\n\t\t\t\thasFileContentsRange(\"foo3\", 1, data64KB[1:]),\n\t\t\t\thasFileContentsRange(\"foo3\", 2, data64KB[2:]),\n\t\t\t\thasFileContentsRange(\"foo3\", len(data64KB)/2, data64KB[len(data64KB)/2:]),\n\t\t\t\thasFileContentsRange(\"foo3\", len(data64KB)-1, data64KB[len(data64KB)-1:]),\n\t\t\t),\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tfor _, newCL := range controllers {\n\t\t\tnewCL := newCL\n\t\t\tfor _, prefix := range allowedPrefix {\n\t\t\t\tprefix := prefix\n\t\t\t\tfor _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} {\n\t\t\t\t\tsrcTarFormat := srcTarFormat\n\t\t\t\t\tfor _, lossless := range []bool{true, false} {\n\t\t\t\t\t\tt.Run(tt.name+\"-\"+fmt.Sprintf(\"compression=%v,prefix=%q,lossless=%v,format=%s\", newCL(), prefix, lossless, srcTarFormat), func(t *TestRunner) {\n\t\t\t\t\t\t\tvar tr io.Reader = buildTar(t, tt.in, prefix, srcTarFormat)\n\t\t\t\t\t\t\torigTarDgstr := digest.Canonical.Digester()\n\t\t\t\t\t\t\ttr = io.TeeReader(tr, origTarDgstr.Hash())\n\t\t\t\t\t\t\tvar stargzBuf bytes.Buffer\n\t\t\t\t\t\t\tcl1 := newCL()\n\t\t\t\t\t\t\tw := NewWriterWithCompressor(&stargzBuf, cl1)\n\t\t\t\t\t\t\tw.ChunkSize = tt.chunkSize\n\t\t\t\t\t\t\tw.MinChunkSize = tt.minChunkSize\n\t\t\t\t\t\t\tif lossless {\n\t\t\t\t\t\t\t\terr := w.AppendTarLossLess(tr)\n\t\t\t\t\t\t\t\tif tt.wantFailOnLossLess {\n\t\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\t\treturn // expected to fail\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"Append wanted to fail on lossless\")\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"Append(lossless): %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif err := w.AppendTar(tr); err != nil {\n\t\t\t\t\t\t\t\t\tt.Fatalf(\"Append: %v\", err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif _, err := w.Close(); err != nil {\n\t\t\t\t\t\t\t\tt.Fatalf(\"Writer.Close: %v\", err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tb := stargzBuf.Bytes()\n\n\t\t\t\t\t\t\tif lossless {\n\t\t\t\t\t\t\t\t// Check if the result blob reserves original tar metadata\n\t\t\t\t\t\t\t\trc, err := Unpack(io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b))), cl1)\n\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"failed to decompress blob: %v\", err)\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefer rc.Close()\n\t\t\t\t\t\t\t\tresultDgstr := digest.Canonical.Digester()\n\t\t\t\t\t\t\t\tif _, err := io.Copy(resultDgstr.Hash(), rc); err != nil {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"failed to read result decompressed blob: %v\", err)\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif resultDgstr.Digest() != origTarDgstr.Digest() {\n\t\t\t\t\t\t\t\t\tt.Errorf(\"lossy compression occurred: digest=%v; want %v\",\n\t\t\t\t\t\t\t\t\t\tresultDgstr.Digest(), origTarDgstr.Digest())\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdiffID := w.DiffID()\n\t\t\t\t\t\t\twantDiffID := cl1.DiffIDOf(t, b)\n\t\t\t\t\t\t\tif diffID != wantDiffID {\n\t\t\t\t\t\t\t\tt.Errorf(\"DiffID = %q; want %q\", diffID, wantDiffID)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttelemetry, checkCalled := newCalledTelemetry()\n\t\t\t\t\t\t\tsr := io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b)))\n\t\t\t\t\t\t\tr, err := Open(\n\t\t\t\t\t\t\t\tsr,\n\t\t\t\t\t\t\t\tWithDecompressors(cl1),\n\t\t\t\t\t\t\t\tWithTelemetry(telemetry),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tt.Fatalf(\"stargz.Open: %v\", err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif _, ok := r.Lookup(\"\"); !ok {\n\t\t\t\t\t\t\t\tt.Fatalf(\"failed to lookup rootdir: %v\", err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twantTOCVersion := 1\n\t\t\t\t\t\t\tif tt.wantTOCVersion > 0 {\n\t\t\t\t\t\t\t\twantTOCVersion = tt.wantTOCVersion\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif r.toc.Version != wantTOCVersion {\n\t\t\t\t\t\t\t\tt.Fatalf(\"invalid TOC Version %d; wanted %d\", r.toc.Version, wantTOCVersion)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfooterSize := cl1.FooterSize()\n\t\t\t\t\t\t\tfooterOffset := sr.Size() - footerSize\n\t\t\t\t\t\t\tfooter := make([]byte, footerSize)\n\t\t\t\t\t\t\tif _, err := sr.ReadAt(footer, footerOffset); err != nil {\n\t\t\t\t\t\t\t\tt.Errorf(\"failed to read footer: %v\", err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_, tocOffset, _, err := cl1.ParseFooter(footer)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tt.Errorf(\"failed to parse footer: %v\", err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif err := checkCalled(tocOffset >= 0); err != nil {\n\t\t\t\t\t\t\t\tt.Errorf(\"telemetry failure: %v\", err)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\twantNumGz := tt.wantNumGz\n\t\t\t\t\t\t\tif lossless && tt.wantNumGzLossLess > 0 {\n\t\t\t\t\t\t\t\twantNumGz = tt.wantNumGzLossLess\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstreamOffsets := []int64{0}\n\t\t\t\t\t\t\tprevOffset := int64(-1)\n\t\t\t\t\t\t\tstreams := 0\n\t\t\t\t\t\t\tfor _, e := range r.toc.Entries {\n\t\t\t\t\t\t\t\tif e.Offset > prevOffset {\n\t\t\t\t\t\t\t\t\tstreamOffsets = append(streamOffsets, e.Offset)\n\t\t\t\t\t\t\t\t\tprevOffset = e.Offset\n\t\t\t\t\t\t\t\t\tstreams++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstreams++ // TOC\n\t\t\t\t\t\t\tif tocOffset >= 0 {\n\t\t\t\t\t\t\t\t// toc is in the blob\n\t\t\t\t\t\t\t\tstreamOffsets = append(streamOffsets, tocOffset)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstreams++ // footer\n\t\t\t\t\t\t\tstreamOffsets = append(streamOffsets, footerOffset)\n\t\t\t\t\t\t\tif streams != wantNumGz {\n\t\t\t\t\t\t\t\tt.Errorf(\"number of streams in TOC = %d; want %d\", streams, wantNumGz)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tt.Logf(\"testing streams: %+v\", streamOffsets)\n\t\t\t\t\t\t\tcl1.TestStreams(t, b, streamOffsets)\n\n\t\t\t\t\t\t\tfor _, want := range tt.want {\n\t\t\t\t\t\t\t\twant.check(t, r)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\ntype chunkInfo struct {\n\tname string\n\tdata string\n}\n\nfunc newCalledTelemetry() (telemetry *Telemetry, check func(needsGetTOC bool) error) {\n\tvar getFooterLatencyCalled bool\n\tvar getTocLatencyCalled bool\n\tvar deserializeTocLatencyCalled bool\n\treturn &Telemetry{\n\t\t\tfunc(time.Time) { getFooterLatencyCalled = true },\n\t\t\tfunc(time.Time) { getTocLatencyCalled = true },\n\t\t\tfunc(time.Time) { deserializeTocLatencyCalled = true },\n\t\t}, func(needsGetTOC bool) error {\n\t\t\tvar allErr []error\n\t\t\tif !getFooterLatencyCalled {\n\t\t\t\tallErr = append(allErr, fmt.Errorf(\"metrics GetFooterLatency isn't called\"))\n\t\t\t}\n\t\t\tif needsGetTOC {\n\t\t\t\tif !getTocLatencyCalled {\n\t\t\t\t\tallErr = append(allErr, fmt.Errorf(\"metrics GetTocLatency isn't called\"))\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !deserializeTocLatencyCalled {\n\t\t\t\tallErr = append(allErr, fmt.Errorf(\"metrics DeserializeTocLatency isn't called\"))\n\t\t\t}\n\t\t\treturn errorutil.Aggregate(allErr)\n\t\t}\n}\n\nfunc digestFor(content string) string {\n\tsum := sha256.Sum256([]byte(content))\n\treturn fmt.Sprintf(\"sha256:%x\", sum)\n}\n\ntype numTOCEntries int\n\nfunc (n numTOCEntries) check(t TestingT, r *Reader) {\n\tif r.toc == nil {\n\t\tt.Fatal(\"nil TOC\")\n\t}\n\tif got, want := len(r.toc.Entries), int(n); got != want {\n\t\tt.Errorf(\"got %d TOC entries; want %d\", got, want)\n\t}\n\tt.Logf(\"got TOC entries:\")\n\tfor i, ent := range r.toc.Entries {\n\t\tentj, _ := json.Marshal(ent)\n\t\tt.Logf(\"  [%d]: %s\\n\", i, entj)\n\t}\n\tif t.Failed() {\n\t\tt.FailNow()\n\t}\n}\n\nfunc checks(s ...stargzCheck) []stargzCheck { return s }\n\ntype stargzCheck interface {\n\tcheck(t TestingT, r *Reader)\n}\n\ntype stargzCheckFn func(TestingT, *Reader)\n\nfunc (f stargzCheckFn) check(t TestingT, r *Reader) { f(t, r) }\n\nfunc maxDepth(max int) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\te, ok := r.Lookup(\"\")\n\t\tif !ok {\n\t\t\tt.Fatal(\"root directory not found\")\n\t\t}\n\t\td, err := getMaxDepth(t, e, 0, 10*max)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"failed to get max depth (wanted %d): %v\", max, err)\n\t\t\treturn\n\t\t}\n\t\tif d != max {\n\t\t\tt.Errorf(\"invalid depth %d; want %d\", d, max)\n\t\t\treturn\n\t\t}\n\t})\n}\n\nfunc getMaxDepth(t TestingT, e *TOCEntry, current, limit int) (max int, rErr error) {\n\tif current > limit {\n\t\treturn -1, fmt.Errorf(\"walkMaxDepth: exceeds limit: current:%d > limit:%d\",\n\t\t\tcurrent, limit)\n\t}\n\tmax = current\n\te.ForeachChild(func(baseName string, ent *TOCEntry) bool {\n\t\tt.Logf(\"%q(basename:%q) is child of %q\\n\", ent.Name, baseName, e.Name)\n\t\td, err := getMaxDepth(t, ent, current+1, limit)\n\t\tif err != nil {\n\t\t\trErr = err\n\t\t\treturn false\n\t\t}\n\t\tif d > max {\n\t\t\tmax = d\n\t\t}\n\t\treturn true\n\t})\n\treturn\n}\n\nfunc hasFileLen(file string, wantLen int) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == file {\n\t\t\t\tif ent.Type != \"reg\" {\n\t\t\t\t\tt.Errorf(\"file type of %q is %q; want \\\"reg\\\"\", file, ent.Type)\n\t\t\t\t} else if ent.Size != int64(wantLen) {\n\t\t\t\t\tt.Errorf(\"file size of %q = %d; want %d\", file, ent.Size, wantLen)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"file %q not found\", file)\n\t})\n}\n\nfunc hasFileXattrs(file, name, value string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == file {\n\t\t\t\tif ent.Type != \"reg\" {\n\t\t\t\t\tt.Errorf(\"file type of %q is %q; want \\\"reg\\\"\", file, ent.Type)\n\t\t\t\t}\n\t\t\t\tif ent.Xattrs == nil {\n\t\t\t\t\tt.Errorf(\"file %q has no xattrs\", file)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvalueFound, found := ent.Xattrs[name]\n\t\t\t\tif !found {\n\t\t\t\t\tt.Errorf(\"file %q has no xattr %q\", file, name)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif string(valueFound) != value {\n\t\t\t\t\tt.Errorf(\"file %q has xattr %q with value %q instead of %q\", file, name, valueFound, value)\n\t\t\t\t}\n\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"file %q not found\", file)\n\t})\n}\n\nfunc hasFileDigest(file string, digest string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tent, ok := r.Lookup(file)\n\t\tif !ok {\n\t\t\tt.Fatalf(\"didn't find TOCEntry for file %q\", file)\n\t\t}\n\t\tif ent.Digest != digest {\n\t\t\tt.Fatalf(\"Digest(%q) = %q, want %q\", file, ent.Digest, digest)\n\t\t}\n\t})\n}\n\nfunc hasFileContentsWithPreRead(file string, offset int, want string, extra ...chunkInfo) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\textraMap := make(map[string]chunkInfo)\n\t\tfor _, e := range extra {\n\t\t\textraMap[e.name] = e\n\t\t}\n\t\tvar extraNames []string\n\t\tfor n := range extraMap {\n\t\t\textraNames = append(extraNames, n)\n\t\t}\n\t\tf, err := r.OpenFileWithPreReader(file, func(e *TOCEntry, cr io.Reader) error {\n\t\t\tt.Logf(\"On %q: got preread of %q\", file, e.Name)\n\t\t\tex, ok := extraMap[e.Name]\n\t\t\tif !ok {\n\t\t\t\tt.Fatalf(\"fail on %q: unexpected entry %q: %+v, %+v\", file, e.Name, e, extraNames)\n\t\t\t}\n\t\t\tgot, err := io.ReadAll(cr)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"fail on %q: failed to read %q: %v\", file, e.Name, err)\n\t\t\t}\n\t\t\tif ex.data != string(got) {\n\t\t\t\tt.Fatalf(\"fail on %q: unexpected contents of %q: len=%d; want=%d\", file, e.Name, len(got), len(ex.data))\n\t\t\t}\n\t\t\tdelete(extraMap, e.Name)\n\t\t\treturn nil\n\t\t})\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tgot := make([]byte, len(want))\n\t\tn, err := f.ReadAt(got, int64(offset))\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"ReadAt(len %d, offset %d, size %d) = %v, %v\", len(got), offset, f.Size(), n, err)\n\t\t}\n\t\tif string(got) != want {\n\t\t\tt.Fatalf(\"ReadAt(len %d, offset %d) = %q, want %q\", len(got), offset, viewContent(got), viewContent([]byte(want)))\n\t\t}\n\t\tif len(extraMap) != 0 {\n\t\t\tvar exNames []string\n\t\t\tfor _, ex := range extraMap {\n\t\t\t\texNames = append(exNames, ex.name)\n\t\t\t}\n\t\t\tt.Fatalf(\"fail on %q: some entries aren't read: %+v\", file, exNames)\n\t\t}\n\t})\n}\n\nfunc hasFileContentsRange(file string, offset int, want string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tf, err := r.OpenFile(file)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tgot := make([]byte, len(want))\n\t\tn, err := f.ReadAt(got, int64(offset))\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"ReadAt(len %d, offset %d) = %v, %v\", len(got), offset, n, err)\n\t\t}\n\t\tif string(got) != want {\n\t\t\tt.Fatalf(\"ReadAt(len %d, offset %d) = %q, want %q\", len(got), offset, viewContent(got), viewContent([]byte(want)))\n\t\t}\n\t})\n}\n\nfunc hasChunkEntries(file string, wantChunks int) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tent, ok := r.Lookup(file)\n\t\tif !ok {\n\t\t\tt.Fatalf(\"no file for %q\", file)\n\t\t}\n\t\tif ent.Type != \"reg\" {\n\t\t\tt.Fatalf(\"file %q has unexpected type %q; want reg\", file, ent.Type)\n\t\t}\n\t\tchunks := r.getChunks(ent)\n\t\tif len(chunks) != wantChunks {\n\t\t\tt.Errorf(\"len(r.getChunks(%q)) = %d; want %d\", file, len(chunks), wantChunks)\n\t\t\treturn\n\t\t}\n\t\tf := chunks[0]\n\n\t\tvar gotChunks []*TOCEntry\n\t\tvar last *TOCEntry\n\t\tfor off := int64(0); off < f.Size; off++ {\n\t\t\te, ok := r.ChunkEntryForOffset(file, off)\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"no ChunkEntryForOffset at %d\", off)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif last != e {\n\t\t\t\tgotChunks = append(gotChunks, e)\n\t\t\t\tlast = e\n\t\t\t}\n\t\t}\n\t\tif !reflect.DeepEqual(chunks, gotChunks) {\n\t\t\tt.Errorf(\"gotChunks=%d, want=%d; contents mismatch\", len(gotChunks), wantChunks)\n\t\t}\n\n\t\t// And verify the NextOffset\n\t\tfor i := 0; i < len(gotChunks)-1; i++ {\n\t\t\tci := gotChunks[i]\n\t\t\tcnext := gotChunks[i+1]\n\t\t\tif ci.NextOffset() != cnext.Offset {\n\t\t\t\tt.Errorf(\"chunk %d NextOffset %d != next chunk's Offset of %d\", i, ci.NextOffset(), cnext.Offset)\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc entryHasChildren(dir string, want ...string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\twant := append([]string(nil), want...)\n\t\tvar got []string\n\t\tent, ok := r.Lookup(dir)\n\t\tif !ok {\n\t\t\tt.Fatalf(\"didn't find TOCEntry for dir node %q\", dir)\n\t\t}\n\t\tfor baseName := range ent.children {\n\t\t\tgot = append(got, baseName)\n\t\t}\n\t\tsort.Strings(got)\n\t\tsort.Strings(want)\n\t\tif !reflect.DeepEqual(got, want) {\n\t\t\tt.Errorf(\"children of %q = %q; want %q\", dir, got, want)\n\t\t}\n\t})\n}\n\nfunc hasDir(file string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == cleanEntryName(file) {\n\t\t\t\tif ent.Type != \"dir\" {\n\t\t\t\t\tt.Errorf(\"file type of %q is %q; want \\\"dir\\\"\", file, ent.Type)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"directory %q not found\", file)\n\t})\n}\n\nfunc hasDirLinkCount(file string, count int) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == cleanEntryName(file) {\n\t\t\t\tif ent.Type != \"dir\" {\n\t\t\t\t\tt.Errorf(\"file type of %q is %q; want \\\"dir\\\"\", file, ent.Type)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif ent.NumLink != count {\n\t\t\t\t\tt.Errorf(\"link count of %q = %d; want %d\", file, ent.NumLink, count)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"directory %q not found\", file)\n\t})\n}\n\nfunc hasMode(file string, mode os.FileMode) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == cleanEntryName(file) {\n\t\t\t\tif ent.Stat().Mode() != mode {\n\t\t\t\t\tt.Errorf(\"invalid mode: got %v; want %v\", ent.Stat().Mode(), mode)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"file %q not found\", file)\n\t})\n}\n\nfunc hasSymlink(file, target string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tfor _, ent := range r.toc.Entries {\n\t\t\tif ent.Name == file {\n\t\t\t\tif ent.Type != \"symlink\" {\n\t\t\t\t\tt.Errorf(\"file type of %q is %q; want \\\"symlink\\\"\", file, ent.Type)\n\t\t\t\t} else if ent.LinkName != target {\n\t\t\t\t\tt.Errorf(\"link target of symlink %q is %q; want %q\", file, ent.LinkName, target)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tt.Errorf(\"symlink %q not found\", file)\n\t})\n}\n\nfunc lookupMatch(name string, want *TOCEntry) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\te, ok := r.Lookup(name)\n\t\tif !ok {\n\t\t\tt.Fatalf(\"failed to Lookup entry %q\", name)\n\t\t}\n\t\tif !reflect.DeepEqual(e, want) {\n\t\t\tt.Errorf(\"entry %q mismatch.\\n got: %+v\\nwant: %+v\\n\", name, e, want)\n\t\t}\n\n\t})\n}\n\nfunc hasEntryOwner(entry string, owner owner) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tent, ok := r.Lookup(strings.TrimSuffix(entry, \"/\"))\n\t\tif !ok {\n\t\t\tt.Errorf(\"entry %q not found\", entry)\n\t\t\treturn\n\t\t}\n\t\tif ent.UID != owner.uid || ent.GID != owner.gid {\n\t\t\tt.Errorf(\"entry %q has invalid owner (uid:%d, gid:%d) instead of (uid:%d, gid:%d)\", entry, ent.UID, ent.GID, owner.uid, owner.gid)\n\t\t\treturn\n\t\t}\n\t})\n}\n\nfunc mustSameEntry(files ...string) stargzCheck {\n\treturn stargzCheckFn(func(t TestingT, r *Reader) {\n\t\tvar first *TOCEntry\n\t\tfor _, f := range files {\n\t\t\tif first == nil {\n\t\t\t\tvar ok bool\n\t\t\t\tfirst, ok = r.Lookup(f)\n\t\t\t\tif !ok {\n\t\t\t\t\tt.Errorf(\"unknown first file on Lookup: %q\", f)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Test Lookup\n\t\t\te, ok := r.Lookup(f)\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"unknown file on Lookup: %q\", f)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif e != first {\n\t\t\t\tt.Errorf(\"Lookup: %+v(%p) != %+v(%p)\", e, e, first, first)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Test LookupChild\n\t\t\tpe, ok := r.Lookup(filepath.Dir(filepath.Clean(f)))\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"failed to get parent of %q\", f)\n\t\t\t\treturn\n\t\t\t}\n\t\t\te, ok = pe.LookupChild(filepath.Base(filepath.Clean(f)))\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"failed to get %q as the child of %+v\", f, pe)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif e != first {\n\t\t\t\tt.Errorf(\"LookupChild: %+v(%p) != %+v(%p)\", e, e, first, first)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Test ForeachChild\n\t\t\tpe.ForeachChild(func(baseName string, e *TOCEntry) bool {\n\t\t\t\tif baseName == filepath.Base(filepath.Clean(f)) {\n\t\t\t\t\tif e != first {\n\t\t\t\t\t\tt.Errorf(\"ForeachChild: %+v(%p) != %+v(%p)\", e, e, first, first)\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true\n\t\t\t})\n\t\t}\n\t})\n}\n\nfunc viewContent(c []byte) string {\n\tif len(c) < 100 {\n\t\treturn string(c)\n\t}\n\treturn string(c[:50]) + \"...(omit)...\" + string(c[50:100])\n}\n\nfunc tarOf(s ...tarEntry) []tarEntry { return s }\n\ntype tarEntry interface {\n\tappendTar(tw *tar.Writer, prefix string, format tar.Format) error\n}\n\ntype tarEntryFunc func(*tar.Writer, string, tar.Format) error\n\nfunc (f tarEntryFunc) appendTar(tw *tar.Writer, prefix string, format tar.Format) error {\n\treturn f(tw, prefix, format)\n}\n\nfunc buildTar(t TestingT, ents []tarEntry, prefix string, opts ...interface{}) *io.SectionReader {\n\tformat := tar.FormatUnknown\n\tfor _, opt := range opts {\n\t\tswitch v := opt.(type) {\n\t\tcase tar.Format:\n\t\t\tformat = v\n\t\tdefault:\n\t\t\tpanic(fmt.Errorf(\"unsupported opt for buildTar: %v\", opt))\n\t\t}\n\t}\n\tbuf := new(bytes.Buffer)\n\ttw := tar.NewWriter(buf)\n\tfor _, ent := range ents {\n\t\tif err := ent.appendTar(tw, prefix, format); err != nil {\n\t\t\tt.Fatalf(\"building input tar: %v\", err)\n\t\t}\n\t}\n\tif err := tw.Close(); err != nil {\n\t\tt.Errorf(\"closing write of input tar: %v\", err)\n\t}\n\tdata := append(buf.Bytes(), make([]byte, 100)...) // append empty bytes at the tail to see lossless works\n\treturn io.NewSectionReader(bytes.NewReader(data), 0, int64(len(data)))\n}\n\nfunc dir(name string, opts ...interface{}) tarEntry {\n\treturn tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error {\n\t\tvar o owner\n\t\tmode := os.FileMode(0755)\n\t\tfor _, opt := range opts {\n\t\t\tswitch v := opt.(type) {\n\t\t\tcase owner:\n\t\t\t\to = v\n\t\t\tcase os.FileMode:\n\t\t\t\tmode = v\n\t\t\tdefault:\n\t\t\t\treturn errors.New(\"unsupported opt\")\n\t\t\t}\n\t\t}\n\t\tif !strings.HasSuffix(name, \"/\") {\n\t\t\tpanic(fmt.Sprintf(\"missing trailing slash in dir %q \", name))\n\t\t}\n\t\ttm, err := fileModeToTarMode(mode)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn tw.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeDir,\n\t\t\tName:     prefix + name,\n\t\t\tMode:     tm,\n\t\t\tUid:      o.uid,\n\t\t\tGid:      o.gid,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\n\n// xAttr are extended attributes to set on test files created with the file func.\ntype xAttr map[string]string\n\n// owner is owner ot set on test files and directories with the file and dir functions.\ntype owner struct {\n\tuid int\n\tgid int\n}\n\nfunc file(name, contents string, opts ...interface{}) tarEntry {\n\treturn tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error {\n\t\tvar xattrs xAttr\n\t\tvar o owner\n\t\tmode := os.FileMode(0644)\n\t\tfor _, opt := range opts {\n\t\t\tswitch v := opt.(type) {\n\t\t\tcase xAttr:\n\t\t\t\txattrs = v\n\t\t\tcase owner:\n\t\t\t\to = v\n\t\t\tcase os.FileMode:\n\t\t\t\tmode = v\n\t\t\tdefault:\n\t\t\t\treturn errors.New(\"unsupported opt\")\n\t\t\t}\n\t\t}\n\t\tif strings.HasSuffix(name, \"/\") {\n\t\t\treturn fmt.Errorf(\"bogus trailing slash in file %q\", name)\n\t\t}\n\t\ttm, err := fileModeToTarMode(mode)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(xattrs) > 0 {\n\t\t\tformat = tar.FormatPAX // only PAX supports xattrs\n\t\t}\n\t\tif err := tw.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeReg,\n\t\t\tName:     prefix + name,\n\t\t\tMode:     tm,\n\t\t\tXattrs:   xattrs,\n\t\t\tSize:     int64(len(contents)),\n\t\t\tUid:      o.uid,\n\t\t\tGid:      o.gid,\n\t\t\tFormat:   format,\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = io.WriteString(tw, contents)\n\t\treturn err\n\t})\n}\n\nfunc symlink(name, target string) tarEntry {\n\treturn tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error {\n\t\treturn tw.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeSymlink,\n\t\t\tName:     prefix + name,\n\t\t\tLinkname: target,\n\t\t\tMode:     0644,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\n\nfunc link(name string, linkname string) tarEntry {\n\tnow := time.Now()\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\treturn w.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeLink,\n\t\t\tName:     prefix + name,\n\t\t\tLinkname: linkname,\n\t\t\tModTime:  now,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\n\nfunc chardev(name string, major, minor int64) tarEntry {\n\tnow := time.Now()\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\treturn w.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeChar,\n\t\t\tName:     prefix + name,\n\t\t\tDevmajor: major,\n\t\t\tDevminor: minor,\n\t\t\tModTime:  now,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\n\nfunc blockdev(name string, major, minor int64) tarEntry {\n\tnow := time.Now()\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\treturn w.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeBlock,\n\t\t\tName:     prefix + name,\n\t\t\tDevmajor: major,\n\t\t\tDevminor: minor,\n\t\t\tModTime:  now,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\nfunc fifo(name string) tarEntry {\n\tnow := time.Now()\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\treturn w.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeFifo,\n\t\t\tName:     prefix + name,\n\t\t\tModTime:  now,\n\t\t\tFormat:   format,\n\t\t})\n\t})\n}\n\nfunc prefetchLandmark() tarEntry {\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\tif err := w.WriteHeader(&tar.Header{\n\t\t\tName:     PrefetchLandmark,\n\t\t\tTypeflag: tar.TypeReg,\n\t\t\tSize:     int64(len([]byte{landmarkContents})),\n\t\t\tFormat:   format,\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcontents := []byte{landmarkContents}\n\t\tif _, err := io.CopyN(w, bytes.NewReader(contents), int64(len(contents))); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc noPrefetchLandmark() tarEntry {\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\tif err := w.WriteHeader(&tar.Header{\n\t\t\tName:     NoPrefetchLandmark,\n\t\t\tTypeflag: tar.TypeReg,\n\t\t\tSize:     int64(len([]byte{landmarkContents})),\n\t\t\tFormat:   format,\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcontents := []byte{landmarkContents}\n\t\tif _, err := io.CopyN(w, bytes.NewReader(contents), int64(len(contents))); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc regDigest(t TestingT, name string, contentStr string, digestMap map[string]digest.Digest) tarEntry {\n\tif digestMap == nil {\n\t\tt.Fatalf(\"digest map mustn't be nil\")\n\t}\n\tcontent := []byte(contentStr)\n\n\tvar n int64\n\tfor n < int64(len(content)) {\n\t\tsize := int64(chunkSize)\n\t\tremain := int64(len(content)) - n\n\t\tif remain < size {\n\t\t\tsize = remain\n\t\t}\n\t\tdgstr := digest.Canonical.Digester()\n\t\tif _, err := io.CopyN(dgstr.Hash(), bytes.NewReader(content[n:n+size]), size); err != nil {\n\t\t\tt.Fatalf(\"failed to calculate digest of %q (name=%q,offset=%d,size=%d)\",\n\t\t\t\tstring(content[n:n+size]), name, n, size)\n\t\t}\n\t\tdigestMap[chunkID(name, n, size)] = dgstr.Digest()\n\t\tn += size\n\t}\n\n\treturn tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error {\n\t\tif err := w.WriteHeader(&tar.Header{\n\t\t\tTypeflag: tar.TypeReg,\n\t\t\tName:     prefix + name,\n\t\t\tSize:     int64(len(content)),\n\t\t\tFormat:   format,\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err := io.CopyN(w, bytes.NewReader(content), int64(len(content))); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\nvar runes = []rune(\"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")\n\nfunc randomContents(n int) string {\n\tb := make([]rune, n)\n\tfor i := range b {\n\t\tbi, err := rand.Int(rand.Reader, big.NewInt(int64(len(runes))))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tb[i] = runes[int(bi.Int64())]\n\t}\n\treturn string(b)\n}\n\nfunc fileModeToTarMode(mode os.FileMode) (int64, error) {\n\th, err := tar.FileInfoHeader(fileInfoOnlyMode(mode), \"\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn h.Mode, nil\n}\n\n// fileInfoOnlyMode is os.FileMode that populates only file mode.\ntype fileInfoOnlyMode os.FileMode\n\nfunc (f fileInfoOnlyMode) Name() string       { return \"\" }\nfunc (f fileInfoOnlyMode) Size() int64        { return 0 }\nfunc (f fileInfoOnlyMode) Mode() os.FileMode  { return os.FileMode(f) }\nfunc (f fileInfoOnlyMode) ModTime() time.Time { return time.Now() }\nfunc (f fileInfoOnlyMode) IsDir() bool        { return os.FileMode(f).IsDir() }\nfunc (f fileInfoOnlyMode) Sys() interface{}   { return nil }\n\nfunc CheckGzipHasStreams(t TestingT, b []byte, streams []int64) {\n\tif len(streams) == 0 {\n\t\treturn // nop\n\t}\n\n\twants := map[int64]struct{}{}\n\tfor _, s := range streams {\n\t\twants[s] = struct{}{}\n\t}\n\n\tlen0 := len(b)\n\tbr := bytes.NewReader(b)\n\tzr := new(gzip.Reader)\n\tt.Logf(\"got gzip streams:\")\n\tnumStreams := 0\n\tfor {\n\t\tzoff := len0 - br.Len()\n\t\tif err := zr.Reset(br); err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tt.Fatalf(\"countStreams(gzip), Reset: %v\", err)\n\t\t}\n\t\tzr.Multistream(false)\n\t\tn, err := io.Copy(io.Discard, zr)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"countStreams(gzip), Copy: %v\", err)\n\t\t}\n\t\tvar extra string\n\t\tif len(zr.Extra) > 0 {\n\t\t\textra = fmt.Sprintf(\"; extra=%q\", zr.Extra)\n\t\t}\n\t\tt.Logf(\"  [%d] at %d in stargz, uncompressed length %d%s\", numStreams, zoff, n, extra)\n\t\tdelete(wants, int64(zoff))\n\t\tnumStreams++\n\t}\n}\n\nfunc GzipDiffIDOf(t TestingT, b []byte) string {\n\th := sha256.New()\n\tzr, err := gzip.NewReader(bytes.NewReader(b))\n\tif err != nil {\n\t\tt.Fatalf(\"diffIDOf(gzip): %v\", err)\n\t}\n\tdefer zr.Close()\n\tif _, err := io.Copy(h, zr); err != nil {\n\t\tt.Fatalf(\"diffIDOf(gzip).Copy: %v\", err)\n\t}\n\treturn fmt.Sprintf(\"sha256:%x\", h.Sum(nil))\n}\n"
  },
  {
    "path": "vendor/github.com/containerd/stargz-snapshotter/estargz/types.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY 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   Copyright 2019 The Go Authors. All rights reserved.\n   Use of this source code is governed by a BSD-style\n   license that can be found in the LICENSE file.\n*/\n\npackage estargz\n\nimport (\n\t\"archive/tar\"\n\t\"hash\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\nconst (\n\t// TOCTarName is the name of the JSON file in the tar archive in the\n\t// table of contents gzip stream.\n\tTOCTarName = \"stargz.index.json\"\n\n\t// FooterSize is the number of bytes in the footer\n\t//\n\t// The footer is an empty gzip stream with no compression and an Extra\n\t// header of the form \"%016xSTARGZ\", where the 64 bit hex-encoded\n\t// number is the offset to the gzip stream of JSON TOC.\n\t//\n\t// 51 comes from:\n\t//\n\t// 10 bytes  gzip header\n\t// 2  bytes  XLEN (length of Extra field) = 26 (4 bytes header + 16 hex digits + len(\"STARGZ\"))\n\t// 2  bytes  Extra: SI1 = 'S', SI2 = 'G'\n\t// 2  bytes  Extra: LEN = 22 (16 hex digits + len(\"STARGZ\"))\n\t// 22 bytes  Extra: subfield = fmt.Sprintf(\"%016xSTARGZ\", offsetOfTOC)\n\t// 5  bytes  flate header\n\t// 8  bytes  gzip footer\n\t// (End of the eStargz blob)\n\t//\n\t// NOTE: For Extra fields, subfield IDs SI1='S' SI2='G' is used for eStargz.\n\tFooterSize = 51\n\n\t// legacyFooterSize is the number of bytes in the legacy stargz footer.\n\t//\n\t// 47 comes from:\n\t//\n\t//   10 byte gzip header +\n\t//   2 byte (LE16) length of extra, encoding 22 (16 hex digits + len(\"STARGZ\")) == \"\\x16\\x00\" +\n\t//   22 bytes of extra (fmt.Sprintf(\"%016xSTARGZ\", tocGzipOffset))\n\t//   5 byte flate header\n\t//   8 byte gzip footer (two little endian uint32s: digest, size)\n\tlegacyFooterSize = 47\n\n\t// TOCJSONDigestAnnotation is an annotation for an image layer. This stores the\n\t// digest of the TOC JSON.\n\t// This annotation is valid only when it is specified in `.[]layers.annotations`\n\t// of an image manifest.\n\tTOCJSONDigestAnnotation = \"containerd.io/snapshot/stargz/toc.digest\"\n\n\t// StoreUncompressedSizeAnnotation is an additional annotation key for eStargz to enable lazy\n\t// pulling on containers/storage. Stargz Store is required to expose the layer's uncompressed size\n\t// to the runtime but current OCI image doesn't ship this information by default. So we store this\n\t// to the special annotation.\n\tStoreUncompressedSizeAnnotation = \"io.containers.estargz.uncompressed-size\"\n\n\t// PrefetchLandmark is a file entry which indicates the end position of\n\t// prefetch in the stargz file.\n\tPrefetchLandmark = \".prefetch.landmark\"\n\n\t// NoPrefetchLandmark is a file entry which indicates that no prefetch should\n\t// occur in the stargz file.\n\tNoPrefetchLandmark = \".no.prefetch.landmark\"\n\n\tlandmarkContents = 0xf\n)\n\n// JTOC is the JSON-serialized table of contents index of the files in the stargz file.\ntype JTOC struct {\n\tVersion int         `json:\"version\"`\n\tEntries []*TOCEntry `json:\"entries\"`\n}\n\n// TOCEntry is an entry in the stargz file's TOC (Table of Contents).\ntype TOCEntry struct {\n\t// Name is the tar entry's name. It is the complete path\n\t// stored in the tar file, not just the base name.\n\tName string `json:\"name\"`\n\n\t// Type is one of \"dir\", \"reg\", \"symlink\", \"hardlink\", \"char\",\n\t// \"block\", \"fifo\", or \"chunk\".\n\t// The \"chunk\" type is used for regular file data chunks past the first\n\t// TOCEntry; the 2nd chunk and on have only Type (\"chunk\"), Offset,\n\t// ChunkOffset, and ChunkSize populated.\n\tType string `json:\"type\"`\n\n\t// Size, for regular files, is the logical size of the file.\n\tSize int64 `json:\"size,omitempty\"`\n\n\t// ModTime3339 is the modification time of the tar entry. Empty\n\t// means zero or unknown. Otherwise it's in UTC RFC3339\n\t// format. Use the ModTime method to access the time.Time value.\n\tModTime3339 string `json:\"modtime,omitempty\"`\n\tmodTime     time.Time\n\n\t// LinkName, for symlinks and hardlinks, is the link target.\n\tLinkName string `json:\"linkName,omitempty\"`\n\n\t// Mode is the permission and mode bits.\n\tMode int64 `json:\"mode,omitempty\"`\n\n\t// UID is the user ID of the owner.\n\tUID int `json:\"uid,omitempty\"`\n\n\t// GID is the group ID of the owner.\n\tGID int `json:\"gid,omitempty\"`\n\n\t// Uname is the username of the owner.\n\t//\n\t// In the serialized JSON, this field may only be present for\n\t// the first entry with the same UID.\n\tUname string `json:\"userName,omitempty\"`\n\n\t// Gname is the group name of the owner.\n\t//\n\t// In the serialized JSON, this field may only be present for\n\t// the first entry with the same GID.\n\tGname string `json:\"groupName,omitempty\"`\n\n\t// Offset, for regular files, provides the offset in the\n\t// stargz file to the file's data bytes. See ChunkOffset and\n\t// ChunkSize.\n\tOffset int64 `json:\"offset,omitempty\"`\n\n\t// InnerOffset is an optional field indicates uncompressed offset\n\t// of this \"reg\" or \"chunk\" payload in a stream starts from Offset.\n\t// This field enables to put multiple \"reg\" or \"chunk\" payloads\n\t// in one chunk with having the same Offset but different InnerOffset.\n\tInnerOffset int64 `json:\"innerOffset,omitempty\"`\n\n\tnextOffset int64 // the Offset of the next entry with a non-zero Offset\n\n\t// DevMajor is the major device number for \"char\" and \"block\" types.\n\tDevMajor int `json:\"devMajor,omitempty\"`\n\n\t// DevMinor is the major device number for \"char\" and \"block\" types.\n\tDevMinor int `json:\"devMinor,omitempty\"`\n\n\t// NumLink is the number of entry names pointing to this entry.\n\t// Zero means one name references this entry.\n\t// This field is calculated during runtime and not recorded in TOC JSON.\n\tNumLink int `json:\"-\"`\n\n\t// Xattrs are the extended attribute for the entry.\n\tXattrs map[string][]byte `json:\"xattrs,omitempty\"`\n\n\t// Digest stores the OCI checksum for regular files payload.\n\t// It has the form \"sha256:abcdef01234....\".\n\tDigest string `json:\"digest,omitempty\"`\n\n\t// ChunkOffset is non-zero if this is a chunk of a large,\n\t// regular file. If so, the Offset is where the gzip header of\n\t// ChunkSize bytes at ChunkOffset in Name begin.\n\t//\n\t// In serialized form, a \"chunkSize\" JSON field of zero means\n\t// that the chunk goes to the end of the file. After reading\n\t// from the stargz TOC, though, the ChunkSize is initialized\n\t// to a non-zero file for when Type is either \"reg\" or\n\t// \"chunk\".\n\tChunkOffset int64 `json:\"chunkOffset,omitempty\"`\n\tChunkSize   int64 `json:\"chunkSize,omitempty\"`\n\n\t// ChunkDigest stores an OCI digest of the chunk. This must be formed\n\t// as \"sha256:0123abcd...\".\n\tChunkDigest string `json:\"chunkDigest,omitempty\"`\n\n\tchildren map[string]*TOCEntry\n\n\t// chunkTopIndex is index of the entry where Offset starts in the blob.\n\tchunkTopIndex int\n}\n\n// ModTime returns the entry's modification time.\nfunc (e *TOCEntry) ModTime() time.Time { return e.modTime }\n\n// NextOffset returns the position (relative to the start of the\n// stargz file) of the next gzip boundary after e.Offset.\nfunc (e *TOCEntry) NextOffset() int64 { return e.nextOffset }\n\nfunc (e *TOCEntry) addChild(baseName string, child *TOCEntry) {\n\tif e.children == nil {\n\t\te.children = make(map[string]*TOCEntry)\n\t}\n\tif child.Type == \"dir\" {\n\t\te.NumLink++ // Entry \"..\" in the subdirectory links to this directory\n\t}\n\te.children[baseName] = child\n}\n\n// isDataType reports whether TOCEntry is a regular file or chunk (something that\n// contains regular file data).\nfunc (e *TOCEntry) isDataType() bool { return e.Type == \"reg\" || e.Type == \"chunk\" }\n\n// Stat returns a FileInfo value representing e.\nfunc (e *TOCEntry) Stat() os.FileInfo { return fileInfo{e} }\n\n// ForeachChild calls f for each child item. If f returns false, iteration ends.\n// If e is not a directory, f is not called.\nfunc (e *TOCEntry) ForeachChild(f func(baseName string, ent *TOCEntry) bool) {\n\tfor name, ent := range e.children {\n\t\tif !f(name, ent) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// LookupChild returns the directory e's child by its base name.\nfunc (e *TOCEntry) LookupChild(baseName string) (child *TOCEntry, ok bool) {\n\tchild, ok = e.children[baseName]\n\treturn\n}\n\n// fileInfo implements os.FileInfo using the wrapped *TOCEntry.\ntype fileInfo struct{ e *TOCEntry }\n\nvar _ os.FileInfo = fileInfo{}\n\nfunc (fi fileInfo) Name() string       { return path.Base(fi.e.Name) }\nfunc (fi fileInfo) IsDir() bool        { return fi.e.Type == \"dir\" }\nfunc (fi fileInfo) Size() int64        { return fi.e.Size }\nfunc (fi fileInfo) ModTime() time.Time { return fi.e.ModTime() }\nfunc (fi fileInfo) Sys() interface{}   { return fi.e }\nfunc (fi fileInfo) Mode() (m os.FileMode) {\n\t// TOCEntry.Mode is tar.Header.Mode so we can understand the these bits using `tar` pkg.\n\tm = (&tar.Header{Mode: fi.e.Mode}).FileInfo().Mode() &\n\t\t(os.ModePerm | os.ModeSetuid | os.ModeSetgid | os.ModeSticky)\n\tswitch fi.e.Type {\n\tcase \"dir\":\n\t\tm |= os.ModeDir\n\tcase \"symlink\":\n\t\tm |= os.ModeSymlink\n\tcase \"char\":\n\t\tm |= os.ModeDevice | os.ModeCharDevice\n\tcase \"block\":\n\t\tm |= os.ModeDevice\n\tcase \"fifo\":\n\t\tm |= os.ModeNamedPipe\n\t}\n\treturn m\n}\n\n// TOCEntryVerifier holds verifiers that are usable for verifying chunks contained\n// in a eStargz blob.\ntype TOCEntryVerifier interface {\n\n\t// Verifier provides a content verifier that can be used for verifying the\n\t// contents of the specified TOCEntry.\n\tVerifier(ce *TOCEntry) (digest.Verifier, error)\n}\n\n// Compression provides the compression helper to be used creating and parsing eStargz.\n// This package provides gzip-based Compression by default, but any compression\n// algorithm (e.g. zstd) can be used as long as it implements Compression.\ntype Compression interface {\n\tCompressor\n\tDecompressor\n}\n\n// Compressor represents the helper mothods to be used for creating eStargz.\ntype Compressor interface {\n\t// Writer returns WriteCloser to be used for writing a chunk to eStargz.\n\t// Everytime a chunk is written, the WriteCloser is closed and Writer is\n\t// called again for writing the next chunk.\n\t//\n\t// The returned writer should implement \"Flush() error\" function that flushes\n\t// any pending compressed data to the underlying writer.\n\tWriter(w io.Writer) (WriteFlushCloser, error)\n\n\t// WriteTOCAndFooter is called to write JTOC to the passed Writer.\n\t// diffHash calculates the DiffID (uncompressed sha256 hash) of the blob\n\t// WriteTOCAndFooter can optionally write anything that affects DiffID calculation\n\t// (e.g. uncompressed TOC JSON).\n\t//\n\t// This function returns tocDgst that represents the digest of TOC that will be used\n\t// to verify this blob when it's parsed.\n\tWriteTOCAndFooter(w io.Writer, off int64, toc *JTOC, diffHash hash.Hash) (tocDgst digest.Digest, err error)\n}\n\n// Decompressor represents the helper mothods to be used for parsing eStargz.\ntype Decompressor interface {\n\t// Reader returns ReadCloser to be used for decompressing file payload.\n\tReader(r io.Reader) (io.ReadCloser, error)\n\n\t// FooterSize returns the size of the footer of this blob.\n\tFooterSize() int64\n\n\t// ParseFooter parses the footer and returns the offset and (compressed) size of TOC.\n\t// payloadBlobSize is the (compressed) size of the blob payload (i.e. the size between\n\t// the top until the TOC JSON).\n\t//\n\t// If tocOffset < 0, we assume that TOC isn't contained in the blob and pass nil reader\n\t// to ParseTOC. We expect that ParseTOC acquire TOC from the external location and return it.\n\t//\n\t// tocSize is optional. If tocSize <= 0, it's by default the size of the range from tocOffset until the beginning of the\n\t// footer (blob size - tocOff - FooterSize).\n\t// If blobPayloadSize < 0, blobPayloadSize become the blob size.\n\tParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error)\n\n\t// ParseTOC parses TOC from the passed reader. The reader provides the partial contents\n\t// of the underlying blob that has the range specified by ParseFooter method.\n\t//\n\t// This function returns tocDgst that represents the digest of TOC that will be used\n\t// to verify this blob. This must match to the value returned from\n\t// Compressor.WriteTOCAndFooter that is used when creating this blob.\n\t//\n\t// If tocOffset returned by ParseFooter is < 0, we assume that TOC isn't contained in the blob.\n\t// Pass nil reader to ParseTOC then we expect that ParseTOC acquire TOC from the external location\n\t// and return it.\n\tParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error)\n}\n\ntype WriteFlushCloser interface {\n\tio.WriteCloser\n\tFlush() error\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/CODE-OF-CONDUCT.md",
    "content": "## The libtrust Project Community Code of Conduct\n\nThe libtrust project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/CONTRIBUTING.md",
    "content": "# Contributing to libtrust\n\nWant to hack on libtrust? Awesome! Here are instructions to get you\nstarted.\n\nlibtrust is a part of the [Docker](https://www.docker.com) project, and follows\nthe same rules and principles. If you're already familiar with the way\nDocker does things, you'll feel right at home.\n\nOtherwise, go read\n[Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md).\n\nHappy hacking!\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/LICENSE",
    "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   Copyright 2014 Docker, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/containers/libtrust/MAINTAINERS",
    "content": "Solomon Hykes <solomon@docker.com>\nJosh Hawn <josh@docker.com> (github: jlhawn)\nDerek McGowan <derek@docker.com> (github: dmcgowan)\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/README.md",
    "content": "# libtrust\n\n> **WARNING** this library is no longer actively developed, and will be integrated\n> in the [docker/distribution][https://www.github.com/docker/distribution]\n> repository in future.\n\nLibtrust is library for managing authentication and authorization using public key cryptography.\n\nAuthentication is handled using the identity attached to the public key.\nLibtrust provides multiple methods to prove possession of the private key associated with an identity.\n - TLS x509 certificates\n - Signature verification\n - Key Challenge\n\nAuthorization and access control is managed through a distributed trust graph.\nTrust servers are used as the authorities of the trust graph and allow caching portions of the graph for faster access.\n\n## Copyright and license\n\nCode and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license.\nDocs released under Creative commons.\n\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/SECURITY.md",
    "content": "## Security and Disclosure Information Policy for the libtrust Project\n\nThe libtrust Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/certificates.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"math/big\"\n\t\"net\"\n\t\"time\"\n)\n\ntype certTemplateInfo struct {\n\tcommonName  string\n\tdomains     []string\n\tipAddresses []net.IP\n\tisCA        bool\n\tclientAuth  bool\n\tserverAuth  bool\n}\n\nfunc generateCertTemplate(info *certTemplateInfo) *x509.Certificate {\n\t// Generate a certificate template which is valid from the past week to\n\t// 10 years from now. The usage of the certificate depends on the\n\t// specified fields in the given certTempInfo object.\n\tvar (\n\t\tkeyUsage    x509.KeyUsage\n\t\textKeyUsage []x509.ExtKeyUsage\n\t)\n\n\tif info.isCA {\n\t\tkeyUsage = x509.KeyUsageCertSign\n\t}\n\n\tif info.clientAuth {\n\t\textKeyUsage = append(extKeyUsage, x509.ExtKeyUsageClientAuth)\n\t}\n\n\tif info.serverAuth {\n\t\textKeyUsage = append(extKeyUsage, x509.ExtKeyUsageServerAuth)\n\t}\n\n\treturn &x509.Certificate{\n\t\tSerialNumber: big.NewInt(0),\n\t\tSubject: pkix.Name{\n\t\t\tCommonName: info.commonName,\n\t\t},\n\t\tNotBefore:             time.Now().Add(-time.Hour * 24 * 7),\n\t\tNotAfter:              time.Now().Add(time.Hour * 24 * 365 * 10),\n\t\tDNSNames:              info.domains,\n\t\tIPAddresses:           info.ipAddresses,\n\t\tIsCA:                  info.isCA,\n\t\tKeyUsage:              keyUsage,\n\t\tExtKeyUsage:           extKeyUsage,\n\t\tBasicConstraintsValid: info.isCA,\n\t}\n}\n\nfunc generateCert(pub PublicKey, priv PrivateKey, subInfo, issInfo *certTemplateInfo) (cert *x509.Certificate, err error) {\n\tpubCertTemplate := generateCertTemplate(subInfo)\n\tprivCertTemplate := generateCertTemplate(issInfo)\n\n\tcertDER, err := x509.CreateCertificate(\n\t\trand.Reader, pubCertTemplate, privCertTemplate,\n\t\tpub.CryptoPublicKey(), priv.CryptoPrivateKey(),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create certificate: %s\", err)\n\t}\n\n\tcert, err = x509.ParseCertificate(certDER)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse certificate: %s\", err)\n\t}\n\n\treturn\n}\n\n// GenerateSelfSignedServerCert creates a self-signed certificate for the\n// given key which is to be used for TLS servers with the given domains and\n// IP addresses.\nfunc GenerateSelfSignedServerCert(key PrivateKey, domains []string, ipAddresses []net.IP) (*x509.Certificate, error) {\n\tinfo := &certTemplateInfo{\n\t\tcommonName:  key.KeyID(),\n\t\tdomains:     domains,\n\t\tipAddresses: ipAddresses,\n\t\tserverAuth:  true,\n\t}\n\n\treturn generateCert(key.PublicKey(), key, info, info)\n}\n\n// GenerateSelfSignedClientCert creates a self-signed certificate for the\n// given key which is to be used for TLS clients.\nfunc GenerateSelfSignedClientCert(key PrivateKey) (*x509.Certificate, error) {\n\tinfo := &certTemplateInfo{\n\t\tcommonName: key.KeyID(),\n\t\tclientAuth: true,\n\t}\n\n\treturn generateCert(key.PublicKey(), key, info, info)\n}\n\n// GenerateCACert creates a certificate which can be used as a trusted\n// certificate authority.\nfunc GenerateCACert(signer PrivateKey, trustedKey PublicKey) (*x509.Certificate, error) {\n\tsubjectInfo := &certTemplateInfo{\n\t\tcommonName: trustedKey.KeyID(),\n\t\tisCA:       true,\n\t}\n\tissuerInfo := &certTemplateInfo{\n\t\tcommonName: signer.KeyID(),\n\t}\n\n\treturn generateCert(trustedKey, signer, subjectInfo, issuerInfo)\n}\n\n// GenerateCACertPool creates a certificate authority pool to be used for a\n// TLS configuration. Any self-signed certificates issued by the specified\n// trusted keys will be verified during a TLS handshake\nfunc GenerateCACertPool(signer PrivateKey, trustedKeys []PublicKey) (*x509.CertPool, error) {\n\tcertPool := x509.NewCertPool()\n\n\tfor _, trustedKey := range trustedKeys {\n\t\tcert, err := GenerateCACert(signer, trustedKey)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to generate CA certificate: %s\", err)\n\t\t}\n\n\t\tcertPool.AddCert(cert)\n\t}\n\n\treturn certPool, nil\n}\n\n// LoadCertificateBundle loads certificates from the given file.  The file should be pem encoded\n// containing one or more certificates.  The expected pem type is \"CERTIFICATE\".\nfunc LoadCertificateBundle(filename string) ([]*x509.Certificate, error) {\n\tb, err := ioutil.ReadFile(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcertificates := []*x509.Certificate{}\n\tvar block *pem.Block\n\tblock, b = pem.Decode(b)\n\tfor ; block != nil; block, b = pem.Decode(b) {\n\t\tif block.Type == \"CERTIFICATE\" {\n\t\t\tcert, err := x509.ParseCertificate(block.Bytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcertificates = append(certificates, cert)\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"invalid pem block type: %s\", block.Type)\n\t\t}\n\t}\n\n\treturn certificates, nil\n}\n\n// LoadCertificatePool loads a CA pool from the given file.  The file should be pem encoded\n// containing one or more certificates. The expected pem type is \"CERTIFICATE\".\nfunc LoadCertificatePool(filename string) (*x509.CertPool, error) {\n\tcerts, err := LoadCertificateBundle(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpool := x509.NewCertPool()\n\tfor _, cert := range certs {\n\t\tpool.AddCert(cert)\n\t}\n\treturn pool, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/doc.go",
    "content": "/*\nPackage libtrust provides an interface for managing authentication and\nauthorization using public key cryptography. Authentication is handled\nusing the identity attached to the public key and verified through TLS\nx509 certificates, a key challenge, or signature. Authorization and\naccess control is managed through a trust graph distributed between\nboth remote trust servers and locally cached and managed data.\n*/\npackage libtrust\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/ec_key.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n\t\"crypto/x509\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n)\n\n/*\n * EC DSA PUBLIC KEY\n */\n\n// ecPublicKey implements a libtrust.PublicKey using elliptic curve digital\n// signature algorithms.\ntype ecPublicKey struct {\n\t*ecdsa.PublicKey\n\tcurveName          string\n\tsignatureAlgorithm *signatureAlgorithm\n\textended           map[string]interface{}\n}\n\nfunc fromECPublicKey(cryptoPublicKey *ecdsa.PublicKey) (*ecPublicKey, error) {\n\tcurve := cryptoPublicKey.Curve\n\n\tswitch {\n\tcase curve == elliptic.P256():\n\t\treturn &ecPublicKey{cryptoPublicKey, \"P-256\", es256, map[string]interface{}{}}, nil\n\tcase curve == elliptic.P384():\n\t\treturn &ecPublicKey{cryptoPublicKey, \"P-384\", es384, map[string]interface{}{}}, nil\n\tcase curve == elliptic.P521():\n\t\treturn &ecPublicKey{cryptoPublicKey, \"P-521\", es512, map[string]interface{}{}}, nil\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported elliptic curve\")\n\t}\n}\n\n// KeyType returns the key type for elliptic curve keys, i.e., \"EC\".\nfunc (k *ecPublicKey) KeyType() string {\n\treturn \"EC\"\n}\n\n// CurveName returns the elliptic curve identifier.\n// Possible values are \"P-256\", \"P-384\", and \"P-521\".\nfunc (k *ecPublicKey) CurveName() string {\n\treturn k.curveName\n}\n\n// KeyID returns a distinct identifier which is unique to this Public Key.\nfunc (k *ecPublicKey) KeyID() string {\n\treturn keyIDFromCryptoKey(k)\n}\n\nfunc (k *ecPublicKey) String() string {\n\treturn fmt.Sprintf(\"EC Public Key <%s>\", k.KeyID())\n}\n\n// Verify verifyies the signature of the data in the io.Reader using this\n// PublicKey. The alg parameter should identify the digital signature\n// algorithm which was used to produce the signature and should be supported\n// by this public key. Returns a nil error if the signature is valid.\nfunc (k *ecPublicKey) Verify(data io.Reader, alg string, signature []byte) error {\n\t// For EC keys there is only one supported signature algorithm depending\n\t// on the curve parameters.\n\tif k.signatureAlgorithm.HeaderParam() != alg {\n\t\treturn fmt.Errorf(\"unable to verify signature: EC Public Key with curve %q does not support signature algorithm %q\", k.curveName, alg)\n\t}\n\n\t// signature is the concatenation of (r, s), base64Url encoded.\n\tsigLength := len(signature)\n\texpectedOctetLength := 2 * ((k.Params().BitSize + 7) >> 3)\n\tif sigLength != expectedOctetLength {\n\t\treturn fmt.Errorf(\"signature length is %d octets long, should be %d\", sigLength, expectedOctetLength)\n\t}\n\n\trBytes, sBytes := signature[:sigLength/2], signature[sigLength/2:]\n\tr := new(big.Int).SetBytes(rBytes)\n\ts := new(big.Int).SetBytes(sBytes)\n\n\thasher := k.signatureAlgorithm.HashID().New()\n\t_, err := io.Copy(hasher, data)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading data to sign: %s\", err)\n\t}\n\thash := hasher.Sum(nil)\n\n\tif !ecdsa.Verify(k.PublicKey, hash, r, s) {\n\t\treturn errors.New(\"invalid signature\")\n\t}\n\n\treturn nil\n}\n\n// CryptoPublicKey returns the internal object which can be used as a\n// crypto.PublicKey for use with other standard library operations. The type\n// is either *rsa.PublicKey or *ecdsa.PublicKey\nfunc (k *ecPublicKey) CryptoPublicKey() crypto.PublicKey {\n\treturn k.PublicKey\n}\n\nfunc (k *ecPublicKey) toMap() map[string]interface{} {\n\tjwk := make(map[string]interface{})\n\tfor k, v := range k.extended {\n\t\tjwk[k] = v\n\t}\n\tjwk[\"kty\"] = k.KeyType()\n\tjwk[\"kid\"] = k.KeyID()\n\tjwk[\"crv\"] = k.CurveName()\n\n\txBytes := k.X.Bytes()\n\tyBytes := k.Y.Bytes()\n\toctetLength := (k.Params().BitSize + 7) >> 3\n\t// MUST include leading zeros in the output so that x, y are each\n\t// *octetLength* bytes long.\n\txBuf := make([]byte, octetLength-len(xBytes), octetLength)\n\tyBuf := make([]byte, octetLength-len(yBytes), octetLength)\n\txBuf = append(xBuf, xBytes...)\n\tyBuf = append(yBuf, yBytes...)\n\n\tjwk[\"x\"] = joseBase64UrlEncode(xBuf)\n\tjwk[\"y\"] = joseBase64UrlEncode(yBuf)\n\n\treturn jwk\n}\n\n// MarshalJSON serializes this Public Key using the JWK JSON serialization format for\n// elliptic curve keys.\nfunc (k *ecPublicKey) MarshalJSON() (data []byte, err error) {\n\treturn json.Marshal(k.toMap())\n}\n\n// PEMBlock serializes this Public Key to DER-encoded PKIX format.\nfunc (k *ecPublicKey) PEMBlock() (*pem.Block, error) {\n\tderBytes, err := x509.MarshalPKIXPublicKey(k.PublicKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to serialize EC PublicKey to DER-encoded PKIX format: %s\", err)\n\t}\n\tk.extended[\"kid\"] = k.KeyID() // For display purposes.\n\treturn createPemBlock(\"PUBLIC KEY\", derBytes, k.extended)\n}\n\nfunc (k *ecPublicKey) AddExtendedField(field string, value interface{}) {\n\tk.extended[field] = value\n}\n\nfunc (k *ecPublicKey) GetExtendedField(field string) interface{} {\n\tv, ok := k.extended[field]\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn v\n}\n\nfunc ecPublicKeyFromMap(jwk map[string]interface{}) (*ecPublicKey, error) {\n\t// JWK key type (kty) has already been determined to be \"EC\".\n\t// Need to extract 'crv', 'x', 'y', and 'kid' and check for\n\t// consistency.\n\n\t// Get the curve identifier value.\n\tcrv, err := stringFromMap(jwk, \"crv\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key curve identifier: %s\", err)\n\t}\n\n\tvar (\n\t\tcurve  elliptic.Curve\n\t\tsigAlg *signatureAlgorithm\n\t)\n\n\tswitch {\n\tcase crv == \"P-256\":\n\t\tcurve = elliptic.P256()\n\t\tsigAlg = es256\n\tcase crv == \"P-384\":\n\t\tcurve = elliptic.P384()\n\t\tsigAlg = es384\n\tcase crv == \"P-521\":\n\t\tcurve = elliptic.P521()\n\t\tsigAlg = es512\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key curve identifier not supported: %q\\n\", crv)\n\t}\n\n\t// Get the X and Y coordinates for the public key point.\n\txB64Url, err := stringFromMap(jwk, \"x\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key x-coordinate: %s\", err)\n\t}\n\tx, err := parseECCoordinate(xB64Url, curve)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key x-coordinate: %s\", err)\n\t}\n\n\tyB64Url, err := stringFromMap(jwk, \"y\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key y-coordinate: %s\", err)\n\t}\n\ty, err := parseECCoordinate(yB64Url, curve)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Public Key y-coordinate: %s\", err)\n\t}\n\n\tkey := &ecPublicKey{\n\t\tPublicKey: &ecdsa.PublicKey{Curve: curve, X: x, Y: y},\n\t\tcurveName: crv, signatureAlgorithm: sigAlg,\n\t}\n\n\t// Key ID is optional too, but if it exists, it should match the key.\n\t_, ok := jwk[\"kid\"]\n\tif ok {\n\t\tkid, err := stringFromMap(jwk, \"kid\")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"JWK EC Public Key ID: %s\", err)\n\t\t}\n\t\tif kid != key.KeyID() {\n\t\t\treturn nil, fmt.Errorf(\"JWK EC Public Key ID does not match: %s\", kid)\n\t\t}\n\t}\n\n\tkey.extended = jwk\n\n\treturn key, nil\n}\n\n/*\n * EC DSA PRIVATE KEY\n */\n\n// ecPrivateKey implements a JWK Private Key using elliptic curve digital signature\n// algorithms.\ntype ecPrivateKey struct {\n\tecPublicKey\n\t*ecdsa.PrivateKey\n}\n\nfunc fromECPrivateKey(cryptoPrivateKey *ecdsa.PrivateKey) (*ecPrivateKey, error) {\n\tpublicKey, err := fromECPublicKey(&cryptoPrivateKey.PublicKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &ecPrivateKey{*publicKey, cryptoPrivateKey}, nil\n}\n\n// PublicKey returns the Public Key data associated with this Private Key.\nfunc (k *ecPrivateKey) PublicKey() PublicKey {\n\treturn &k.ecPublicKey\n}\n\nfunc (k *ecPrivateKey) String() string {\n\treturn fmt.Sprintf(\"EC Private Key <%s>\", k.KeyID())\n}\n\n// Sign signs the data read from the io.Reader using a signature algorithm supported\n// by the elliptic curve private key. If the specified hashing algorithm is\n// supported by this key, that hash function is used to generate the signature\n// otherwise the the default hashing algorithm for this key is used. Returns\n// the signature and the name of the JWK signature algorithm used, e.g.,\n// \"ES256\", \"ES384\", \"ES512\".\nfunc (k *ecPrivateKey) Sign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error) {\n\t// Generate a signature of the data using the internal alg.\n\t// The given hashId is only a suggestion, and since EC keys only support\n\t// on signature/hash algorithm given the curve name, we disregard it for\n\t// the elliptic curve JWK signature implementation.\n\tr, s, err := k.sign(data, hashID)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"error producing signature: %s\", err)\n\t}\n\n\trBytes, sBytes := r.Bytes(), s.Bytes()\n\toctetLength := (k.ecPublicKey.Params().BitSize + 7) >> 3\n\t// MUST include leading zeros in the output\n\trBuf := make([]byte, octetLength-len(rBytes), octetLength)\n\tsBuf := make([]byte, octetLength-len(sBytes), octetLength)\n\n\trBuf = append(rBuf, rBytes...)\n\tsBuf = append(sBuf, sBytes...)\n\n\tsignature = append(rBuf, sBuf...)\n\talg = k.signatureAlgorithm.HeaderParam()\n\n\treturn\n}\n\n// CryptoPrivateKey returns the internal object which can be used as a\n// crypto.PublicKey for use with other standard library operations. The type\n// is either *rsa.PublicKey or *ecdsa.PublicKey\nfunc (k *ecPrivateKey) CryptoPrivateKey() crypto.PrivateKey {\n\treturn k.PrivateKey\n}\n\nfunc (k *ecPrivateKey) toMap() map[string]interface{} {\n\tjwk := k.ecPublicKey.toMap()\n\n\tdBytes := k.D.Bytes()\n\t// The length of this octet string MUST be ceiling(log-base-2(n)/8)\n\t// octets (where n is the order of the curve). This is because the private\n\t// key d must be in the interval [1, n-1] so the bitlength of d should be\n\t// no larger than the bitlength of n-1. The easiest way to find the octet\n\t// length is to take bitlength(n-1), add 7 to force a carry, and shift this\n\t// bit sequence right by 3, which is essentially dividing by 8 and adding\n\t// 1 if there is any remainder. Thus, the private key value d should be\n\t// output to (bitlength(n-1)+7)>>3 octets.\n\tn := k.ecPublicKey.Params().N\n\toctetLength := (new(big.Int).Sub(n, big.NewInt(1)).BitLen() + 7) >> 3\n\t// Create a buffer with the necessary zero-padding.\n\tdBuf := make([]byte, octetLength-len(dBytes), octetLength)\n\tdBuf = append(dBuf, dBytes...)\n\n\tjwk[\"d\"] = joseBase64UrlEncode(dBuf)\n\n\treturn jwk\n}\n\n// MarshalJSON serializes this Private Key using the JWK JSON serialization format for\n// elliptic curve keys.\nfunc (k *ecPrivateKey) MarshalJSON() (data []byte, err error) {\n\treturn json.Marshal(k.toMap())\n}\n\n// PEMBlock serializes this Private Key to DER-encoded PKIX format.\nfunc (k *ecPrivateKey) PEMBlock() (*pem.Block, error) {\n\tderBytes, err := x509.MarshalECPrivateKey(k.PrivateKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to serialize EC PrivateKey to DER-encoded PKIX format: %s\", err)\n\t}\n\tk.extended[\"keyID\"] = k.KeyID() // For display purposes.\n\treturn createPemBlock(\"EC PRIVATE KEY\", derBytes, k.extended)\n}\n\nfunc ecPrivateKeyFromMap(jwk map[string]interface{}) (*ecPrivateKey, error) {\n\tdB64Url, err := stringFromMap(jwk, \"d\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Private Key: %s\", err)\n\t}\n\n\t// JWK key type (kty) has already been determined to be \"EC\".\n\t// Need to extract the public key information, then extract the private\n\t// key value 'd'.\n\tpublicKey, err := ecPublicKeyFromMap(jwk)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\td, err := parseECPrivateParam(dB64Url, publicKey.Curve)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK EC Private Key d-param: %s\", err)\n\t}\n\n\tkey := &ecPrivateKey{\n\t\tecPublicKey: *publicKey,\n\t\tPrivateKey: &ecdsa.PrivateKey{\n\t\t\tPublicKey: *publicKey.PublicKey,\n\t\t\tD:         d,\n\t\t},\n\t}\n\n\treturn key, nil\n}\n\n/*\n *\tKey Generation Functions.\n */\n\nfunc generateECPrivateKey(curve elliptic.Curve) (k *ecPrivateKey, err error) {\n\tk = new(ecPrivateKey)\n\tk.PrivateKey, err = ecdsa.GenerateKey(curve, rand.Reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tk.ecPublicKey.PublicKey = &k.PrivateKey.PublicKey\n\tk.extended = make(map[string]interface{})\n\n\treturn\n}\n\n// GenerateECP256PrivateKey generates a key pair using elliptic curve P-256.\nfunc GenerateECP256PrivateKey() (PrivateKey, error) {\n\tk, err := generateECPrivateKey(elliptic.P256())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating EC P-256 key: %s\", err)\n\t}\n\n\tk.curveName = \"P-256\"\n\tk.signatureAlgorithm = es256\n\n\treturn k, nil\n}\n\n// GenerateECP384PrivateKey generates a key pair using elliptic curve P-384.\nfunc GenerateECP384PrivateKey() (PrivateKey, error) {\n\tk, err := generateECPrivateKey(elliptic.P384())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating EC P-384 key: %s\", err)\n\t}\n\n\tk.curveName = \"P-384\"\n\tk.signatureAlgorithm = es384\n\n\treturn k, nil\n}\n\n// GenerateECP521PrivateKey generates aß key pair using elliptic curve P-521.\nfunc GenerateECP521PrivateKey() (PrivateKey, error) {\n\tk, err := generateECPrivateKey(elliptic.P521())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating EC P-521 key: %s\", err)\n\t}\n\n\tk.curveName = \"P-521\"\n\tk.signatureAlgorithm = es512\n\n\treturn k, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/ec_key_no_openssl.go",
    "content": "// +build !libtrust_openssl\n\npackage libtrust\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rand\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n)\n\nfunc (k *ecPrivateKey) sign(data io.Reader, hashID crypto.Hash) (r, s *big.Int, err error) {\n\thasher := k.signatureAlgorithm.HashID().New()\n\t_, err = io.Copy(hasher, data)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"error reading data to sign: %s\", err)\n\t}\n\thash := hasher.Sum(nil)\n\n\treturn ecdsa.Sign(rand.Reader, k.PrivateKey, hash)\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/ec_key_openssl.go",
    "content": "// +build libtrust_openssl\n\npackage libtrust\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rand\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n)\n\nfunc (k *ecPrivateKey) sign(data io.Reader, hashID crypto.Hash) (r, s *big.Int, err error) {\n\thId := k.signatureAlgorithm.HashID()\n\tbuf := new(bytes.Buffer)\n\t_, err = buf.ReadFrom(data)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"error reading data: %s\", err)\n\t}\n\n\treturn ecdsa.HashSign(rand.Reader, k.PrivateKey, buf.Bytes(), hId)\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/filter.go",
    "content": "package libtrust\n\nimport (\n\t\"path/filepath\"\n)\n\n// FilterByHosts filters the list of PublicKeys to only those which contain a\n// 'hosts' pattern which matches the given host. If *includeEmpty* is true,\n// then keys which do not specify any hosts are also returned.\nfunc FilterByHosts(keys []PublicKey, host string, includeEmpty bool) ([]PublicKey, error) {\n\tfiltered := make([]PublicKey, 0, len(keys))\n\n\tfor _, pubKey := range keys {\n\t\tvar hosts []string\n\t\tswitch v := pubKey.GetExtendedField(\"hosts\").(type) {\n\t\tcase []string:\n\t\t\thosts = v\n\t\tcase []interface{}:\n\t\t\tfor _, value := range v {\n\t\t\t\th, ok := value.(string)\n\t\t\t\tif !ok {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\thosts = append(hosts, h)\n\t\t\t}\n\t\t}\n\n\t\tif len(hosts) == 0 {\n\t\t\tif includeEmpty {\n\t\t\t\tfiltered = append(filtered, pubKey)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check if any hosts match pattern\n\t\tfor _, hostPattern := range hosts {\n\t\t\tmatch, err := filepath.Match(hostPattern, host)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tif match {\n\t\t\t\tfiltered = append(filtered, pubKey)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t}\n\n\treturn filtered, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/hash.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto\"\n\t_ \"crypto/sha256\" // Registrer SHA224 and SHA256\n\t_ \"crypto/sha512\" // Registrer SHA384 and SHA512\n\t\"fmt\"\n)\n\ntype signatureAlgorithm struct {\n\talgHeaderParam string\n\thashID         crypto.Hash\n}\n\nfunc (h *signatureAlgorithm) HeaderParam() string {\n\treturn h.algHeaderParam\n}\n\nfunc (h *signatureAlgorithm) HashID() crypto.Hash {\n\treturn h.hashID\n}\n\nvar (\n\trs256 = &signatureAlgorithm{\"RS256\", crypto.SHA256}\n\trs384 = &signatureAlgorithm{\"RS384\", crypto.SHA384}\n\trs512 = &signatureAlgorithm{\"RS512\", crypto.SHA512}\n\tes256 = &signatureAlgorithm{\"ES256\", crypto.SHA256}\n\tes384 = &signatureAlgorithm{\"ES384\", crypto.SHA384}\n\tes512 = &signatureAlgorithm{\"ES512\", crypto.SHA512}\n)\n\nfunc rsaSignatureAlgorithmByName(alg string) (*signatureAlgorithm, error) {\n\tswitch {\n\tcase alg == \"RS256\":\n\t\treturn rs256, nil\n\tcase alg == \"RS384\":\n\t\treturn rs384, nil\n\tcase alg == \"RS512\":\n\t\treturn rs512, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"RSA Digital Signature Algorithm %q not supported\", alg)\n\t}\n}\n\nfunc rsaPKCS1v15SignatureAlgorithmForHashID(hashID crypto.Hash) *signatureAlgorithm {\n\tswitch {\n\tcase hashID == crypto.SHA512:\n\t\treturn rs512\n\tcase hashID == crypto.SHA384:\n\t\treturn rs384\n\tcase hashID == crypto.SHA256:\n\t\tfallthrough\n\tdefault:\n\t\treturn rs256\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/jsonsign.go",
    "content": "package libtrust\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/x509\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sort\"\n\t\"time\"\n\t\"unicode\"\n)\n\nvar (\n\t// ErrInvalidSignContent is used when the content to be signed is invalid.\n\tErrInvalidSignContent = errors.New(\"invalid sign content\")\n\n\t// ErrInvalidJSONContent is used when invalid json is encountered.\n\tErrInvalidJSONContent = errors.New(\"invalid json content\")\n\n\t// ErrMissingSignatureKey is used when the specified signature key\n\t// does not exist in the JSON content.\n\tErrMissingSignatureKey = errors.New(\"missing signature key\")\n)\n\ntype jsHeader struct {\n\tJWK       PublicKey `json:\"jwk,omitempty\"`\n\tAlgorithm string    `json:\"alg\"`\n\tChain     []string  `json:\"x5c,omitempty\"`\n}\n\ntype jsSignature struct {\n\tHeader    jsHeader `json:\"header\"`\n\tSignature string   `json:\"signature\"`\n\tProtected string   `json:\"protected,omitempty\"`\n}\n\ntype jsSignaturesSorted []jsSignature\n\nfunc (jsbkid jsSignaturesSorted) Swap(i, j int) { jsbkid[i], jsbkid[j] = jsbkid[j], jsbkid[i] }\nfunc (jsbkid jsSignaturesSorted) Len() int      { return len(jsbkid) }\n\nfunc (jsbkid jsSignaturesSorted) Less(i, j int) bool {\n\tki, kj := jsbkid[i].Header.JWK.KeyID(), jsbkid[j].Header.JWK.KeyID()\n\tsi, sj := jsbkid[i].Signature, jsbkid[j].Signature\n\n\tif ki == kj {\n\t\treturn si < sj\n\t}\n\n\treturn ki < kj\n}\n\ntype signKey struct {\n\tPrivateKey\n\tChain []*x509.Certificate\n}\n\n// JSONSignature represents a signature of a json object.\ntype JSONSignature struct {\n\tpayload      string\n\tsignatures   []jsSignature\n\tindent       string\n\tformatLength int\n\tformatTail   []byte\n}\n\nfunc newJSONSignature() *JSONSignature {\n\treturn &JSONSignature{\n\t\tsignatures: make([]jsSignature, 0, 1),\n\t}\n}\n\n// Payload returns the encoded payload of the signature. This\n// payload should not be signed directly\nfunc (js *JSONSignature) Payload() ([]byte, error) {\n\treturn joseBase64UrlDecode(js.payload)\n}\n\nfunc (js *JSONSignature) protectedHeader() (string, error) {\n\tprotected := map[string]interface{}{\n\t\t\"formatLength\": js.formatLength,\n\t\t\"formatTail\":   joseBase64UrlEncode(js.formatTail),\n\t\t\"time\":         time.Now().UTC().Format(time.RFC3339),\n\t}\n\tprotectedBytes, err := json.Marshal(protected)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn joseBase64UrlEncode(protectedBytes), nil\n}\n\nfunc (js *JSONSignature) signBytes(protectedHeader string) ([]byte, error) {\n\tbuf := make([]byte, len(js.payload)+len(protectedHeader)+1)\n\tcopy(buf, protectedHeader)\n\tbuf[len(protectedHeader)] = '.'\n\tcopy(buf[len(protectedHeader)+1:], js.payload)\n\treturn buf, nil\n}\n\n// Sign adds a signature using the given private key.\nfunc (js *JSONSignature) Sign(key PrivateKey) error {\n\tprotected, err := js.protectedHeader()\n\tif err != nil {\n\t\treturn err\n\t}\n\tsignBytes, err := js.signBytes(protected)\n\tif err != nil {\n\t\treturn err\n\t}\n\tsigBytes, algorithm, err := key.Sign(bytes.NewReader(signBytes), crypto.SHA256)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tjs.signatures = append(js.signatures, jsSignature{\n\t\tHeader: jsHeader{\n\t\t\tJWK:       key.PublicKey(),\n\t\t\tAlgorithm: algorithm,\n\t\t},\n\t\tSignature: joseBase64UrlEncode(sigBytes),\n\t\tProtected: protected,\n\t})\n\n\treturn nil\n}\n\n// SignWithChain adds a signature using the given private key\n// and setting the x509 chain. The public key of the first element\n// in the chain must be the public key corresponding with the sign key.\nfunc (js *JSONSignature) SignWithChain(key PrivateKey, chain []*x509.Certificate) error {\n\t// Ensure key.Chain[0] is public key for key\n\t//key.Chain.PublicKey\n\t//key.PublicKey().CryptoPublicKey()\n\n\t// Verify chain\n\tprotected, err := js.protectedHeader()\n\tif err != nil {\n\t\treturn err\n\t}\n\tsignBytes, err := js.signBytes(protected)\n\tif err != nil {\n\t\treturn err\n\t}\n\tsigBytes, algorithm, err := key.Sign(bytes.NewReader(signBytes), crypto.SHA256)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\theader := jsHeader{\n\t\tChain:     make([]string, len(chain)),\n\t\tAlgorithm: algorithm,\n\t}\n\n\tfor i, cert := range chain {\n\t\theader.Chain[i] = base64.StdEncoding.EncodeToString(cert.Raw)\n\t}\n\n\tjs.signatures = append(js.signatures, jsSignature{\n\t\tHeader:    header,\n\t\tSignature: joseBase64UrlEncode(sigBytes),\n\t\tProtected: protected,\n\t})\n\n\treturn nil\n}\n\n// Verify verifies all the signatures and returns the list of\n// public keys used to sign. Any x509 chains are not checked.\nfunc (js *JSONSignature) Verify() ([]PublicKey, error) {\n\tkeys := make([]PublicKey, len(js.signatures))\n\tfor i, signature := range js.signatures {\n\t\tsignBytes, err := js.signBytes(signature.Protected)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar publicKey PublicKey\n\t\tif len(signature.Header.Chain) > 0 {\n\t\t\tcertBytes, err := base64.StdEncoding.DecodeString(signature.Header.Chain[0])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcert, err := x509.ParseCertificate(certBytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tpublicKey, err = FromCryptoPublicKey(cert.PublicKey)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t} else if signature.Header.JWK != nil {\n\t\t\tpublicKey = signature.Header.JWK\n\t\t} else {\n\t\t\treturn nil, errors.New(\"missing public key\")\n\t\t}\n\n\t\tsigBytes, err := joseBase64UrlDecode(signature.Signature)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\terr = publicKey.Verify(bytes.NewReader(signBytes), signature.Header.Algorithm, sigBytes)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tkeys[i] = publicKey\n\t}\n\treturn keys, nil\n}\n\n// VerifyChains verifies all the signatures and the chains associated\n// with each signature and returns the list of verified chains.\n// Signatures without an x509 chain are not checked.\nfunc (js *JSONSignature) VerifyChains(ca *x509.CertPool) ([][]*x509.Certificate, error) {\n\tchains := make([][]*x509.Certificate, 0, len(js.signatures))\n\tfor _, signature := range js.signatures {\n\t\tsignBytes, err := js.signBytes(signature.Protected)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar publicKey PublicKey\n\t\tif len(signature.Header.Chain) > 0 {\n\t\t\tcertBytes, err := base64.StdEncoding.DecodeString(signature.Header.Chain[0])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcert, err := x509.ParseCertificate(certBytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tpublicKey, err = FromCryptoPublicKey(cert.PublicKey)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tintermediates := x509.NewCertPool()\n\t\t\tif len(signature.Header.Chain) > 1 {\n\t\t\t\tintermediateChain := signature.Header.Chain[1:]\n\t\t\t\tfor i := range intermediateChain {\n\t\t\t\t\tcertBytes, err := base64.StdEncoding.DecodeString(intermediateChain[i])\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tintermediate, err := x509.ParseCertificate(certBytes)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tintermediates.AddCert(intermediate)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tverifyOptions := x509.VerifyOptions{\n\t\t\t\tIntermediates: intermediates,\n\t\t\t\tRoots:         ca,\n\t\t\t}\n\n\t\t\tverifiedChains, err := cert.Verify(verifyOptions)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tchains = append(chains, verifiedChains...)\n\n\t\t\tsigBytes, err := joseBase64UrlDecode(signature.Signature)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr = publicKey.Verify(bytes.NewReader(signBytes), signature.Header.Algorithm, sigBytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t}\n\treturn chains, nil\n}\n\n// JWS returns JSON serialized JWS according to\n// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-7.2\nfunc (js *JSONSignature) JWS() ([]byte, error) {\n\tif len(js.signatures) == 0 {\n\t\treturn nil, errors.New(\"missing signature\")\n\t}\n\n\tsort.Sort(jsSignaturesSorted(js.signatures))\n\n\tjsonMap := map[string]interface{}{\n\t\t\"payload\":    js.payload,\n\t\t\"signatures\": js.signatures,\n\t}\n\n\treturn json.MarshalIndent(jsonMap, \"\", \"   \")\n}\n\nfunc notSpace(r rune) bool {\n\treturn !unicode.IsSpace(r)\n}\n\nfunc detectJSONIndent(jsonContent []byte) (indent string) {\n\tif len(jsonContent) > 2 && jsonContent[0] == '{' && jsonContent[1] == '\\n' {\n\t\tquoteIndex := bytes.IndexRune(jsonContent[1:], '\"')\n\t\tif quoteIndex > 0 {\n\t\t\tindent = string(jsonContent[2 : quoteIndex+1])\n\t\t}\n\t}\n\treturn\n}\n\ntype jsParsedHeader struct {\n\tJWK       json.RawMessage `json:\"jwk\"`\n\tAlgorithm string          `json:\"alg\"`\n\tChain     []string        `json:\"x5c\"`\n}\n\ntype jsParsedSignature struct {\n\tHeader    jsParsedHeader `json:\"header\"`\n\tSignature string         `json:\"signature\"`\n\tProtected string         `json:\"protected\"`\n}\n\n// ParseJWS parses a JWS serialized JSON object into a Json Signature.\nfunc ParseJWS(content []byte) (*JSONSignature, error) {\n\ttype jsParsed struct {\n\t\tPayload    string              `json:\"payload\"`\n\t\tSignatures []jsParsedSignature `json:\"signatures\"`\n\t}\n\tparsed := &jsParsed{}\n\terr := json.Unmarshal(content, parsed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(parsed.Signatures) == 0 {\n\t\treturn nil, errors.New(\"missing signatures\")\n\t}\n\tpayload, err := joseBase64UrlDecode(parsed.Payload)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tjs, err := NewJSONSignature(payload)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tjs.signatures = make([]jsSignature, len(parsed.Signatures))\n\tfor i, signature := range parsed.Signatures {\n\t\theader := jsHeader{\n\t\t\tAlgorithm: signature.Header.Algorithm,\n\t\t}\n\t\tif signature.Header.Chain != nil {\n\t\t\theader.Chain = signature.Header.Chain\n\t\t}\n\t\tif signature.Header.JWK != nil {\n\t\t\tpublicKey, err := UnmarshalPublicKeyJWK([]byte(signature.Header.JWK))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\theader.JWK = publicKey\n\t\t}\n\t\tjs.signatures[i] = jsSignature{\n\t\t\tHeader:    header,\n\t\t\tSignature: signature.Signature,\n\t\t\tProtected: signature.Protected,\n\t\t}\n\t}\n\n\treturn js, nil\n}\n\n// NewJSONSignature returns a new unsigned JWS from a json byte array.\n// JSONSignature will need to be signed before serializing or storing.\n// Optionally, one or more signatures can be provided as byte buffers,\n// containing serialized JWS signatures, to assemble a fully signed JWS\n// package. It is the callers responsibility to ensure uniqueness of the\n// provided signatures.\nfunc NewJSONSignature(content []byte, signatures ...[]byte) (*JSONSignature, error) {\n\tvar dataMap map[string]interface{}\n\terr := json.Unmarshal(content, &dataMap)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tjs := newJSONSignature()\n\tjs.indent = detectJSONIndent(content)\n\n\tjs.payload = joseBase64UrlEncode(content)\n\n\t// Find trailing } and whitespace, put in protected header\n\tcloseIndex := bytes.LastIndexFunc(content, notSpace)\n\tif content[closeIndex] != '}' {\n\t\treturn nil, ErrInvalidJSONContent\n\t}\n\tlastRuneIndex := bytes.LastIndexFunc(content[:closeIndex], notSpace)\n\tif content[lastRuneIndex] == ',' {\n\t\treturn nil, ErrInvalidJSONContent\n\t}\n\tjs.formatLength = lastRuneIndex + 1\n\tjs.formatTail = content[js.formatLength:]\n\n\tif len(signatures) > 0 {\n\t\tfor _, signature := range signatures {\n\t\t\tvar parsedJSig jsParsedSignature\n\n\t\t\tif err := json.Unmarshal(signature, &parsedJSig); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// TODO(stevvooe): A lot of the code below is repeated in\n\t\t\t// ParseJWS. It will require more refactoring to fix that.\n\t\t\tjsig := jsSignature{\n\t\t\t\tHeader: jsHeader{\n\t\t\t\t\tAlgorithm: parsedJSig.Header.Algorithm,\n\t\t\t\t},\n\t\t\t\tSignature: parsedJSig.Signature,\n\t\t\t\tProtected: parsedJSig.Protected,\n\t\t\t}\n\n\t\t\tif parsedJSig.Header.Chain != nil {\n\t\t\t\tjsig.Header.Chain = parsedJSig.Header.Chain\n\t\t\t}\n\n\t\t\tif parsedJSig.Header.JWK != nil {\n\t\t\t\tpublicKey, err := UnmarshalPublicKeyJWK([]byte(parsedJSig.Header.JWK))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tjsig.Header.JWK = publicKey\n\t\t\t}\n\n\t\t\tjs.signatures = append(js.signatures, jsig)\n\t\t}\n\t}\n\n\treturn js, nil\n}\n\n// NewJSONSignatureFromMap returns a new unsigned JSONSignature from a map or\n// struct. JWS will need to be signed before serializing or storing.\nfunc NewJSONSignatureFromMap(content interface{}) (*JSONSignature, error) {\n\tswitch content.(type) {\n\tcase map[string]interface{}:\n\tcase struct{}:\n\tdefault:\n\t\treturn nil, errors.New(\"invalid data type\")\n\t}\n\n\tjs := newJSONSignature()\n\tjs.indent = \"   \"\n\n\tpayload, err := json.MarshalIndent(content, \"\", js.indent)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tjs.payload = joseBase64UrlEncode(payload)\n\n\t// Remove '\\n}' from formatted section, put in protected header\n\tjs.formatLength = len(payload) - 2\n\tjs.formatTail = payload[js.formatLength:]\n\n\treturn js, nil\n}\n\nfunc readIntFromMap(key string, m map[string]interface{}) (int, bool) {\n\tvalue, ok := m[key]\n\tif !ok {\n\t\treturn 0, false\n\t}\n\tswitch v := value.(type) {\n\tcase int:\n\t\treturn v, true\n\tcase float64:\n\t\treturn int(v), true\n\tdefault:\n\t\treturn 0, false\n\t}\n}\n\nfunc readStringFromMap(key string, m map[string]interface{}) (v string, ok bool) {\n\tvalue, ok := m[key]\n\tif !ok {\n\t\treturn \"\", false\n\t}\n\tv, ok = value.(string)\n\treturn\n}\n\n// ParsePrettySignature parses a formatted signature into a\n// JSON signature. If the signatures are missing the format information\n// an error is thrown. The formatted signature must be created by\n// the same method as format signature.\nfunc ParsePrettySignature(content []byte, signatureKey string) (*JSONSignature, error) {\n\tvar contentMap map[string]json.RawMessage\n\terr := json.Unmarshal(content, &contentMap)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error unmarshalling content: %s\", err)\n\t}\n\tsigMessage, ok := contentMap[signatureKey]\n\tif !ok {\n\t\treturn nil, ErrMissingSignatureKey\n\t}\n\n\tvar signatureBlocks []jsParsedSignature\n\terr = json.Unmarshal([]byte(sigMessage), &signatureBlocks)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error unmarshalling signatures: %s\", err)\n\t}\n\n\tjs := newJSONSignature()\n\tjs.signatures = make([]jsSignature, len(signatureBlocks))\n\n\tfor i, signatureBlock := range signatureBlocks {\n\t\tprotectedBytes, err := joseBase64UrlDecode(signatureBlock.Protected)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"base64 decode error: %s\", err)\n\t\t}\n\t\tvar protectedHeader map[string]interface{}\n\t\terr = json.Unmarshal(protectedBytes, &protectedHeader)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error unmarshalling protected header: %s\", err)\n\t\t}\n\n\t\tformatLength, ok := readIntFromMap(\"formatLength\", protectedHeader)\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"missing formatted length\")\n\t\t}\n\t\tencodedTail, ok := readStringFromMap(\"formatTail\", protectedHeader)\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"missing formatted tail\")\n\t\t}\n\t\tformatTail, err := joseBase64UrlDecode(encodedTail)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"base64 decode error on tail: %s\", err)\n\t\t}\n\t\tif js.formatLength == 0 {\n\t\t\tjs.formatLength = formatLength\n\t\t} else if js.formatLength != formatLength {\n\t\t\treturn nil, errors.New(\"conflicting format length\")\n\t\t}\n\t\tif len(js.formatTail) == 0 {\n\t\t\tjs.formatTail = formatTail\n\t\t} else if bytes.Compare(js.formatTail, formatTail) != 0 {\n\t\t\treturn nil, errors.New(\"conflicting format tail\")\n\t\t}\n\n\t\theader := jsHeader{\n\t\t\tAlgorithm: signatureBlock.Header.Algorithm,\n\t\t\tChain:     signatureBlock.Header.Chain,\n\t\t}\n\t\tif signatureBlock.Header.JWK != nil {\n\t\t\tpublicKey, err := UnmarshalPublicKeyJWK([]byte(signatureBlock.Header.JWK))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error unmarshalling public key: %s\", err)\n\t\t\t}\n\t\t\theader.JWK = publicKey\n\t\t}\n\t\tjs.signatures[i] = jsSignature{\n\t\t\tHeader:    header,\n\t\t\tSignature: signatureBlock.Signature,\n\t\t\tProtected: signatureBlock.Protected,\n\t\t}\n\t}\n\tif js.formatLength > len(content) {\n\t\treturn nil, errors.New(\"invalid format length\")\n\t}\n\tformatted := make([]byte, js.formatLength+len(js.formatTail))\n\tcopy(formatted, content[:js.formatLength])\n\tcopy(formatted[js.formatLength:], js.formatTail)\n\tjs.indent = detectJSONIndent(formatted)\n\tjs.payload = joseBase64UrlEncode(formatted)\n\n\treturn js, nil\n}\n\n// PrettySignature formats a json signature into an easy to read\n// single json serialized object.\nfunc (js *JSONSignature) PrettySignature(signatureKey string) ([]byte, error) {\n\tif len(js.signatures) == 0 {\n\t\treturn nil, errors.New(\"no signatures\")\n\t}\n\tpayload, err := joseBase64UrlDecode(js.payload)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpayload = payload[:js.formatLength]\n\n\tsort.Sort(jsSignaturesSorted(js.signatures))\n\n\tvar marshalled []byte\n\tvar marshallErr error\n\tif js.indent != \"\" {\n\t\tmarshalled, marshallErr = json.MarshalIndent(js.signatures, js.indent, js.indent)\n\t} else {\n\t\tmarshalled, marshallErr = json.Marshal(js.signatures)\n\t}\n\tif marshallErr != nil {\n\t\treturn nil, marshallErr\n\t}\n\n\tbuf := bytes.NewBuffer(make([]byte, 0, len(payload)+len(marshalled)+34))\n\tbuf.Write(payload)\n\tbuf.WriteByte(',')\n\tif js.indent != \"\" {\n\t\tbuf.WriteByte('\\n')\n\t\tbuf.WriteString(js.indent)\n\t\tbuf.WriteByte('\"')\n\t\tbuf.WriteString(signatureKey)\n\t\tbuf.WriteString(\"\\\": \")\n\t\tbuf.Write(marshalled)\n\t\tbuf.WriteByte('\\n')\n\t} else {\n\t\tbuf.WriteByte('\"')\n\t\tbuf.WriteString(signatureKey)\n\t\tbuf.WriteString(\"\\\":\")\n\t\tbuf.Write(marshalled)\n\t}\n\tbuf.WriteByte('}')\n\n\treturn buf.Bytes(), nil\n}\n\n// Signatures provides the signatures on this JWS as opaque blobs, sorted by\n// keyID. These blobs can be stored and reassembled with payloads. Internally,\n// they are simply marshaled json web signatures but implementations should\n// not rely on this.\nfunc (js *JSONSignature) Signatures() ([][]byte, error) {\n\tsort.Sort(jsSignaturesSorted(js.signatures))\n\n\tvar sb [][]byte\n\tfor _, jsig := range js.signatures {\n\t\tp, err := json.Marshal(jsig)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tsb = append(sb, p)\n\t}\n\n\treturn sb, nil\n}\n\n// Merge combines the signatures from one or more other signatures into the\n// method receiver. If the payloads differ for any argument, an error will be\n// returned and the receiver will not be modified.\nfunc (js *JSONSignature) Merge(others ...*JSONSignature) error {\n\tmerged := js.signatures\n\tfor _, other := range others {\n\t\tif js.payload != other.payload {\n\t\t\treturn fmt.Errorf(\"payloads differ from merge target\")\n\t\t}\n\t\tmerged = append(merged, other.signatures...)\n\t}\n\n\tjs.signatures = merged\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/key.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// PublicKey is a generic interface for a Public Key.\ntype PublicKey interface {\n\t// KeyType returns the key type for this key. For elliptic curve keys,\n\t// this value should be \"EC\". For RSA keys, this value should be \"RSA\".\n\tKeyType() string\n\t// KeyID returns a distinct identifier which is unique to this Public Key.\n\t// The format generated by this library is a base32 encoding of a 240 bit\n\t// hash of the public key data divided into 12 groups like so:\n\t//    ABCD:EFGH:IJKL:MNOP:QRST:UVWX:YZ23:4567:ABCD:EFGH:IJKL:MNOP\n\tKeyID() string\n\t// Verify verifyies the signature of the data in the io.Reader using this\n\t// Public Key. The alg parameter should identify the digital signature\n\t// algorithm which was used to produce the signature and should be\n\t// supported by this public key. Returns a nil error if the signature\n\t// is valid.\n\tVerify(data io.Reader, alg string, signature []byte) error\n\t// CryptoPublicKey returns the internal object which can be used as a\n\t// crypto.PublicKey for use with other standard library operations. The type\n\t// is either *rsa.PublicKey or *ecdsa.PublicKey\n\tCryptoPublicKey() crypto.PublicKey\n\t// These public keys can be serialized to the standard JSON encoding for\n\t// JSON Web Keys. See section 6 of the IETF draft RFC for JOSE JSON Web\n\t// Algorithms.\n\tMarshalJSON() ([]byte, error)\n\t// These keys can also be serialized to the standard PEM encoding.\n\tPEMBlock() (*pem.Block, error)\n\t// The string representation of a key is its key type and ID.\n\tString() string\n\tAddExtendedField(string, interface{})\n\tGetExtendedField(string) interface{}\n}\n\n// PrivateKey is a generic interface for a Private Key.\ntype PrivateKey interface {\n\t// A PrivateKey contains all fields and methods of a PublicKey of the\n\t// same type. The MarshalJSON method also outputs the private key as a\n\t// JSON Web Key, and the PEMBlock method outputs the private key as a\n\t// PEM block.\n\tPublicKey\n\t// PublicKey returns the PublicKey associated with this PrivateKey.\n\tPublicKey() PublicKey\n\t// Sign signs the data read from the io.Reader using a signature algorithm\n\t// supported by the private key. If the specified hashing algorithm is\n\t// supported by this key, that hash function is used to generate the\n\t// signature otherwise the the default hashing algorithm for this key is\n\t// used. Returns the signature and identifier of the algorithm used.\n\tSign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error)\n\t// CryptoPrivateKey returns the internal object which can be used as a\n\t// crypto.PublicKey for use with other standard library operations. The\n\t// type is either *rsa.PublicKey or *ecdsa.PublicKey\n\tCryptoPrivateKey() crypto.PrivateKey\n}\n\n// FromCryptoPublicKey returns a libtrust PublicKey representation of the given\n// *ecdsa.PublicKey or *rsa.PublicKey. Returns a non-nil error when the given\n// key is of an unsupported type.\nfunc FromCryptoPublicKey(cryptoPublicKey crypto.PublicKey) (PublicKey, error) {\n\tswitch cryptoPublicKey := cryptoPublicKey.(type) {\n\tcase *ecdsa.PublicKey:\n\t\treturn fromECPublicKey(cryptoPublicKey)\n\tcase *rsa.PublicKey:\n\t\treturn fromRSAPublicKey(cryptoPublicKey), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"public key type %T is not supported\", cryptoPublicKey)\n\t}\n}\n\n// FromCryptoPrivateKey returns a libtrust PrivateKey representation of the given\n// *ecdsa.PrivateKey or *rsa.PrivateKey. Returns a non-nil error when the given\n// key is of an unsupported type.\nfunc FromCryptoPrivateKey(cryptoPrivateKey crypto.PrivateKey) (PrivateKey, error) {\n\tswitch cryptoPrivateKey := cryptoPrivateKey.(type) {\n\tcase *ecdsa.PrivateKey:\n\t\treturn fromECPrivateKey(cryptoPrivateKey)\n\tcase *rsa.PrivateKey:\n\t\treturn fromRSAPrivateKey(cryptoPrivateKey), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"private key type %T is not supported\", cryptoPrivateKey)\n\t}\n}\n\n// UnmarshalPublicKeyPEM parses the PEM encoded data and returns a libtrust\n// PublicKey or an error if there is a problem with the encoding.\nfunc UnmarshalPublicKeyPEM(data []byte) (PublicKey, error) {\n\tpemBlock, _ := pem.Decode(data)\n\tif pemBlock == nil {\n\t\treturn nil, errors.New(\"unable to find PEM encoded data\")\n\t} else if pemBlock.Type != \"PUBLIC KEY\" {\n\t\treturn nil, fmt.Errorf(\"unable to get PublicKey from PEM type: %s\", pemBlock.Type)\n\t}\n\n\treturn pubKeyFromPEMBlock(pemBlock)\n}\n\n// UnmarshalPublicKeyPEMBundle parses the PEM encoded data as a bundle of\n// PEM blocks appended one after the other and returns a slice of PublicKey\n// objects that it finds.\nfunc UnmarshalPublicKeyPEMBundle(data []byte) ([]PublicKey, error) {\n\tpubKeys := []PublicKey{}\n\n\tfor {\n\t\tvar pemBlock *pem.Block\n\t\tpemBlock, data = pem.Decode(data)\n\t\tif pemBlock == nil {\n\t\t\tbreak\n\t\t} else if pemBlock.Type != \"PUBLIC KEY\" {\n\t\t\treturn nil, fmt.Errorf(\"unable to get PublicKey from PEM type: %s\", pemBlock.Type)\n\t\t}\n\n\t\tpubKey, err := pubKeyFromPEMBlock(pemBlock)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tpubKeys = append(pubKeys, pubKey)\n\t}\n\n\treturn pubKeys, nil\n}\n\n// UnmarshalPrivateKeyPEM parses the PEM encoded data and returns a libtrust\n// PrivateKey or an error if there is a problem with the encoding.\nfunc UnmarshalPrivateKeyPEM(data []byte) (PrivateKey, error) {\n\tpemBlock, _ := pem.Decode(data)\n\tif pemBlock == nil {\n\t\treturn nil, errors.New(\"unable to find PEM encoded data\")\n\t}\n\n\tvar key PrivateKey\n\n\tswitch {\n\tcase pemBlock.Type == \"RSA PRIVATE KEY\":\n\t\trsaPrivateKey, err := x509.ParsePKCS1PrivateKey(pemBlock.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode RSA Private Key PEM data: %s\", err)\n\t\t}\n\t\tkey = fromRSAPrivateKey(rsaPrivateKey)\n\tcase pemBlock.Type == \"EC PRIVATE KEY\":\n\t\tecPrivateKey, err := x509.ParseECPrivateKey(pemBlock.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode EC Private Key PEM data: %s\", err)\n\t\t}\n\t\tkey, err = fromECPrivateKey(ecPrivateKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unable to get PrivateKey from PEM type: %s\", pemBlock.Type)\n\t}\n\n\taddPEMHeadersToKey(pemBlock, key.PublicKey())\n\n\treturn key, nil\n}\n\n// UnmarshalPublicKeyJWK unmarshals the given JSON Web Key into a generic\n// Public Key to be used with libtrust.\nfunc UnmarshalPublicKeyJWK(data []byte) (PublicKey, error) {\n\tjwk := make(map[string]interface{})\n\n\terr := json.Unmarshal(data, &jwk)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"decoding JWK Public Key JSON data: %s\\n\", err,\n\t\t)\n\t}\n\n\t// Get the Key Type value.\n\tkty, err := stringFromMap(jwk, \"kty\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK Public Key type: %s\", err)\n\t}\n\n\tswitch {\n\tcase kty == \"EC\":\n\t\t// Call out to unmarshal EC public key.\n\t\treturn ecPublicKeyFromMap(jwk)\n\tcase kty == \"RSA\":\n\t\t// Call out to unmarshal RSA public key.\n\t\treturn rsaPublicKeyFromMap(jwk)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"JWK Public Key type not supported: %q\\n\", kty,\n\t\t)\n\t}\n}\n\n// UnmarshalPublicKeyJWKSet parses the JSON encoded data as a JSON Web Key Set\n// and returns a slice of Public Key objects.\nfunc UnmarshalPublicKeyJWKSet(data []byte) ([]PublicKey, error) {\n\trawKeys, err := loadJSONKeySetRaw(data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpubKeys := make([]PublicKey, 0, len(rawKeys))\n\n\tfor _, rawKey := range rawKeys {\n\t\tpubKey, err := UnmarshalPublicKeyJWK(rawKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpubKeys = append(pubKeys, pubKey)\n\t}\n\n\treturn pubKeys, nil\n}\n\n// UnmarshalPrivateKeyJWK unmarshals the given JSON Web Key into a generic\n// Private Key to be used with libtrust.\nfunc UnmarshalPrivateKeyJWK(data []byte) (PrivateKey, error) {\n\tjwk := make(map[string]interface{})\n\n\terr := json.Unmarshal(data, &jwk)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"decoding JWK Private Key JSON data: %s\\n\", err,\n\t\t)\n\t}\n\n\t// Get the Key Type value.\n\tkty, err := stringFromMap(jwk, \"kty\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK Private Key type: %s\", err)\n\t}\n\n\tswitch {\n\tcase kty == \"EC\":\n\t\t// Call out to unmarshal EC private key.\n\t\treturn ecPrivateKeyFromMap(jwk)\n\tcase kty == \"RSA\":\n\t\t// Call out to unmarshal RSA private key.\n\t\treturn rsaPrivateKeyFromMap(jwk)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"JWK Private Key type not supported: %q\\n\", kty,\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/key_files.go",
    "content": "package libtrust\n\nimport (\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"strings\"\n)\n\nvar (\n\t// ErrKeyFileDoesNotExist indicates that the private key file does not exist.\n\tErrKeyFileDoesNotExist = errors.New(\"key file does not exist\")\n)\n\nfunc readKeyFileBytes(filename string) ([]byte, error) {\n\tdata, err := ioutil.ReadFile(filename)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\terr = ErrKeyFileDoesNotExist\n\t\t} else {\n\t\t\terr = fmt.Errorf(\"unable to read key file %s: %s\", filename, err)\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\treturn data, nil\n}\n\n/*\n\tLoading and Saving of Public and Private Keys in either PEM or JWK format.\n*/\n\n// LoadKeyFile opens the given filename and attempts to read a Private Key\n// encoded in either PEM or JWK format (if .json or .jwk file extension).\nfunc LoadKeyFile(filename string) (PrivateKey, error) {\n\tcontents, err := readKeyFileBytes(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar key PrivateKey\n\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\tkey, err = UnmarshalPrivateKeyJWK(contents)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode private key JWK: %s\", err)\n\t\t}\n\t} else {\n\t\tkey, err = UnmarshalPrivateKeyPEM(contents)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode private key PEM: %s\", err)\n\t\t}\n\t}\n\n\treturn key, nil\n}\n\n// LoadPublicKeyFile opens the given filename and attempts to read a Public Key\n// encoded in either PEM or JWK format (if .json or .jwk file extension).\nfunc LoadPublicKeyFile(filename string) (PublicKey, error) {\n\tcontents, err := readKeyFileBytes(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar key PublicKey\n\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\tkey, err = UnmarshalPublicKeyJWK(contents)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode public key JWK: %s\", err)\n\t\t}\n\t} else {\n\t\tkey, err = UnmarshalPublicKeyPEM(contents)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to decode public key PEM: %s\", err)\n\t\t}\n\t}\n\n\treturn key, nil\n}\n\n// SaveKey saves the given key to a file using the provided filename.\n// This process will overwrite any existing file at the provided location.\nfunc SaveKey(filename string, key PrivateKey) error {\n\tvar encodedKey []byte\n\tvar err error\n\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\t// Encode in JSON Web Key format.\n\t\tencodedKey, err = json.MarshalIndent(key, \"\", \"    \")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to encode private key JWK: %s\", err)\n\t\t}\n\t} else {\n\t\t// Encode in PEM format.\n\t\tpemBlock, err := key.PEMBlock()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to encode private key PEM: %s\", err)\n\t\t}\n\t\tencodedKey = pem.EncodeToMemory(pemBlock)\n\t}\n\n\terr = ioutil.WriteFile(filename, encodedKey, os.FileMode(0600))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to write private key file %s: %s\", filename, err)\n\t}\n\n\treturn nil\n}\n\n// SavePublicKey saves the given public key to the file.\nfunc SavePublicKey(filename string, key PublicKey) error {\n\tvar encodedKey []byte\n\tvar err error\n\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\t// Encode in JSON Web Key format.\n\t\tencodedKey, err = json.MarshalIndent(key, \"\", \"    \")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to encode public key JWK: %s\", err)\n\t\t}\n\t} else {\n\t\t// Encode in PEM format.\n\t\tpemBlock, err := key.PEMBlock()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to encode public key PEM: %s\", err)\n\t\t}\n\t\tencodedKey = pem.EncodeToMemory(pemBlock)\n\t}\n\n\terr = ioutil.WriteFile(filename, encodedKey, os.FileMode(0644))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to write public key file %s: %s\", filename, err)\n\t}\n\n\treturn nil\n}\n\n// Public Key Set files\n\ntype jwkSet struct {\n\tKeys []json.RawMessage `json:\"keys\"`\n}\n\n// LoadKeySetFile loads a key set\nfunc LoadKeySetFile(filename string) ([]PublicKey, error) {\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\treturn loadJSONKeySetFile(filename)\n\t}\n\n\t// Must be a PEM format file\n\treturn loadPEMKeySetFile(filename)\n}\n\nfunc loadJSONKeySetRaw(data []byte) ([]json.RawMessage, error) {\n\tif len(data) == 0 {\n\t\t// This is okay, just return an empty slice.\n\t\treturn []json.RawMessage{}, nil\n\t}\n\n\tkeySet := jwkSet{}\n\n\terr := json.Unmarshal(data, &keySet)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to decode JSON Web Key Set: %s\", err)\n\t}\n\n\treturn keySet.Keys, nil\n}\n\nfunc loadJSONKeySetFile(filename string) ([]PublicKey, error) {\n\tcontents, err := readKeyFileBytes(filename)\n\tif err != nil && err != ErrKeyFileDoesNotExist {\n\t\treturn nil, err\n\t}\n\n\treturn UnmarshalPublicKeyJWKSet(contents)\n}\n\nfunc loadPEMKeySetFile(filename string) ([]PublicKey, error) {\n\tdata, err := readKeyFileBytes(filename)\n\tif err != nil && err != ErrKeyFileDoesNotExist {\n\t\treturn nil, err\n\t}\n\n\treturn UnmarshalPublicKeyPEMBundle(data)\n}\n\n// AddKeySetFile adds a key to a key set\nfunc AddKeySetFile(filename string, key PublicKey) error {\n\tif strings.HasSuffix(filename, \".json\") || strings.HasSuffix(filename, \".jwk\") {\n\t\treturn addKeySetJSONFile(filename, key)\n\t}\n\n\t// Must be a PEM format file\n\treturn addKeySetPEMFile(filename, key)\n}\n\nfunc addKeySetJSONFile(filename string, key PublicKey) error {\n\tencodedKey, err := json.Marshal(key)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to encode trusted client key: %s\", err)\n\t}\n\n\tcontents, err := readKeyFileBytes(filename)\n\tif err != nil && err != ErrKeyFileDoesNotExist {\n\t\treturn err\n\t}\n\n\trawEntries, err := loadJSONKeySetRaw(contents)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\trawEntries = append(rawEntries, json.RawMessage(encodedKey))\n\tentriesWrapper := jwkSet{Keys: rawEntries}\n\n\tencodedEntries, err := json.MarshalIndent(entriesWrapper, \"\", \"    \")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to encode trusted client keys: %s\", err)\n\t}\n\n\terr = ioutil.WriteFile(filename, encodedEntries, os.FileMode(0644))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to write trusted client keys file %s: %s\", filename, err)\n\t}\n\n\treturn nil\n}\n\nfunc addKeySetPEMFile(filename string, key PublicKey) error {\n\t// Encode to PEM, open file for appending, write PEM.\n\tfile, err := os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_RDWR, os.FileMode(0644))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to open trusted client keys file %s: %s\", filename, err)\n\t}\n\tdefer file.Close()\n\n\tpemBlock, err := key.PEMBlock()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to encoded trusted key: %s\", err)\n\t}\n\n\t_, err = file.Write(pem.EncodeToMemory(pemBlock))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to write trusted keys file: %s\", err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/key_manager.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"os\"\n\t\"path\"\n\t\"sync\"\n)\n\n// ClientKeyManager manages client keys on the filesystem\ntype ClientKeyManager struct {\n\tkey        PrivateKey\n\tclientFile string\n\tclientDir  string\n\n\tclientLock sync.RWMutex\n\tclients    []PublicKey\n\n\tconfigLock sync.Mutex\n\tconfigs    []*tls.Config\n}\n\n// NewClientKeyManager loads a new manager from a set of key files\n// and managed by the given private key.\nfunc NewClientKeyManager(trustKey PrivateKey, clientFile, clientDir string) (*ClientKeyManager, error) {\n\tm := &ClientKeyManager{\n\t\tkey:        trustKey,\n\t\tclientFile: clientFile,\n\t\tclientDir:  clientDir,\n\t}\n\tif err := m.loadKeys(); err != nil {\n\t\treturn nil, err\n\t}\n\t// TODO Start watching file and directory\n\n\treturn m, nil\n}\n\nfunc (c *ClientKeyManager) loadKeys() (err error) {\n\t// Load authorized keys file\n\tvar clients []PublicKey\n\tif c.clientFile != \"\" {\n\t\tclients, err = LoadKeySetFile(c.clientFile)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to load authorized keys: %s\", err)\n\t\t}\n\t}\n\n\t// Add clients from authorized keys directory\n\tfiles, err := ioutil.ReadDir(c.clientDir)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"unable to open authorized keys directory: %s\", err)\n\t}\n\tfor _, f := range files {\n\t\tif !f.IsDir() {\n\t\t\tpublicKey, err := LoadPublicKeyFile(path.Join(c.clientDir, f.Name()))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to load authorized key file: %s\", err)\n\t\t\t}\n\t\t\tclients = append(clients, publicKey)\n\t\t}\n\t}\n\n\tc.clientLock.Lock()\n\tc.clients = clients\n\tc.clientLock.Unlock()\n\n\treturn nil\n}\n\n// RegisterTLSConfig registers a tls configuration to manager\n// such that any changes to the keys may be reflected in\n// the tls client CA pool\nfunc (c *ClientKeyManager) RegisterTLSConfig(tlsConfig *tls.Config) error {\n\tc.clientLock.RLock()\n\tcertPool, err := GenerateCACertPool(c.key, c.clients)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"CA pool generation error: %s\", err)\n\t}\n\tc.clientLock.RUnlock()\n\n\ttlsConfig.ClientCAs = certPool\n\n\tc.configLock.Lock()\n\tc.configs = append(c.configs, tlsConfig)\n\tc.configLock.Unlock()\n\n\treturn nil\n}\n\n// NewIdentityAuthTLSConfig creates a tls.Config for the server to use for\n// libtrust identity authentication for the domain specified\nfunc NewIdentityAuthTLSConfig(trustKey PrivateKey, clients *ClientKeyManager, addr string, domain string) (*tls.Config, error) {\n\ttlsConfig := newTLSConfig()\n\n\ttlsConfig.ClientAuth = tls.RequireAndVerifyClientCert\n\tif err := clients.RegisterTLSConfig(tlsConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Generate cert\n\tips, domains, err := parseAddr(addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// add domain that it expects clients to use\n\tdomains = append(domains, domain)\n\tx509Cert, err := GenerateSelfSignedServerCert(trustKey, domains, ips)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"certificate generation error: %s\", err)\n\t}\n\ttlsConfig.Certificates = []tls.Certificate{{\n\t\tCertificate: [][]byte{x509Cert.Raw},\n\t\tPrivateKey:  trustKey.CryptoPrivateKey(),\n\t\tLeaf:        x509Cert,\n\t}}\n\n\treturn tlsConfig, nil\n}\n\n// NewCertAuthTLSConfig creates a tls.Config for the server to use for\n// certificate authentication\nfunc NewCertAuthTLSConfig(caPath, certPath, keyPath string) (*tls.Config, error) {\n\ttlsConfig := newTLSConfig()\n\n\tcert, err := tls.LoadX509KeyPair(certPath, keyPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Couldn't load X509 key pair (%s, %s): %s. Key encrypted?\", certPath, keyPath, err)\n\t}\n\ttlsConfig.Certificates = []tls.Certificate{cert}\n\n\t// Verify client certificates against a CA?\n\tif caPath != \"\" {\n\t\tcertPool := x509.NewCertPool()\n\t\tfile, err := ioutil.ReadFile(caPath)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Couldn't read CA certificate: %s\", err)\n\t\t}\n\t\tcertPool.AppendCertsFromPEM(file)\n\n\t\ttlsConfig.ClientAuth = tls.RequireAndVerifyClientCert\n\t\ttlsConfig.ClientCAs = certPool\n\t}\n\n\treturn tlsConfig, nil\n}\n\nfunc newTLSConfig() *tls.Config {\n\treturn &tls.Config{\n\t\tNextProtos: []string{\"http/1.1\"},\n\t\t// Avoid fallback on insecure SSL protocols\n\t\tMinVersion: tls.VersionTLS10,\n\t}\n}\n\n// parseAddr parses an address into an array of IPs and domains\nfunc parseAddr(addr string) ([]net.IP, []string, error) {\n\thost, _, err := net.SplitHostPort(addr)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tvar domains []string\n\tvar ips []net.IP\n\tip := net.ParseIP(host)\n\tif ip != nil {\n\t\tips = []net.IP{ip}\n\t} else {\n\t\tdomains = []string{host}\n\t}\n\treturn ips, domains, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/rsa_key.go",
    "content": "package libtrust\n\nimport (\n\t\"crypto\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n)\n\n/*\n * RSA DSA PUBLIC KEY\n */\n\n// rsaPublicKey implements a JWK Public Key using RSA digital signature algorithms.\ntype rsaPublicKey struct {\n\t*rsa.PublicKey\n\textended map[string]interface{}\n}\n\nfunc fromRSAPublicKey(cryptoPublicKey *rsa.PublicKey) *rsaPublicKey {\n\treturn &rsaPublicKey{cryptoPublicKey, map[string]interface{}{}}\n}\n\n// KeyType returns the JWK key type for RSA keys, i.e., \"RSA\".\nfunc (k *rsaPublicKey) KeyType() string {\n\treturn \"RSA\"\n}\n\n// KeyID returns a distinct identifier which is unique to this Public Key.\nfunc (k *rsaPublicKey) KeyID() string {\n\treturn keyIDFromCryptoKey(k)\n}\n\nfunc (k *rsaPublicKey) String() string {\n\treturn fmt.Sprintf(\"RSA Public Key <%s>\", k.KeyID())\n}\n\n// Verify verifyies the signature of the data in the io.Reader using this Public Key.\n// The alg parameter should be the name of the JWA digital signature algorithm\n// which was used to produce the signature and should be supported by this\n// public key. Returns a nil error if the signature is valid.\nfunc (k *rsaPublicKey) Verify(data io.Reader, alg string, signature []byte) error {\n\t// Verify the signature of the given date, return non-nil error if valid.\n\tsigAlg, err := rsaSignatureAlgorithmByName(alg)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to verify Signature: %s\", err)\n\t}\n\n\thasher := sigAlg.HashID().New()\n\t_, err = io.Copy(hasher, data)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading data to sign: %s\", err)\n\t}\n\thash := hasher.Sum(nil)\n\n\terr = rsa.VerifyPKCS1v15(k.PublicKey, sigAlg.HashID(), hash, signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid %s signature: %s\", sigAlg.HeaderParam(), err)\n\t}\n\n\treturn nil\n}\n\n// CryptoPublicKey returns the internal object which can be used as a\n// crypto.PublicKey for use with other standard library operations. The type\n// is either *rsa.PublicKey or *ecdsa.PublicKey\nfunc (k *rsaPublicKey) CryptoPublicKey() crypto.PublicKey {\n\treturn k.PublicKey\n}\n\nfunc (k *rsaPublicKey) toMap() map[string]interface{} {\n\tjwk := make(map[string]interface{})\n\tfor k, v := range k.extended {\n\t\tjwk[k] = v\n\t}\n\tjwk[\"kty\"] = k.KeyType()\n\tjwk[\"kid\"] = k.KeyID()\n\tjwk[\"n\"] = joseBase64UrlEncode(k.N.Bytes())\n\tjwk[\"e\"] = joseBase64UrlEncode(serializeRSAPublicExponentParam(k.E))\n\n\treturn jwk\n}\n\n// MarshalJSON serializes this Public Key using the JWK JSON serialization format for\n// RSA keys.\nfunc (k *rsaPublicKey) MarshalJSON() (data []byte, err error) {\n\treturn json.Marshal(k.toMap())\n}\n\n// PEMBlock serializes this Public Key to DER-encoded PKIX format.\nfunc (k *rsaPublicKey) PEMBlock() (*pem.Block, error) {\n\tderBytes, err := x509.MarshalPKIXPublicKey(k.PublicKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to serialize RSA PublicKey to DER-encoded PKIX format: %s\", err)\n\t}\n\tk.extended[\"kid\"] = k.KeyID() // For display purposes.\n\treturn createPemBlock(\"PUBLIC KEY\", derBytes, k.extended)\n}\n\nfunc (k *rsaPublicKey) AddExtendedField(field string, value interface{}) {\n\tk.extended[field] = value\n}\n\nfunc (k *rsaPublicKey) GetExtendedField(field string) interface{} {\n\tv, ok := k.extended[field]\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn v\n}\n\nfunc rsaPublicKeyFromMap(jwk map[string]interface{}) (*rsaPublicKey, error) {\n\t// JWK key type (kty) has already been determined to be \"RSA\".\n\t// Need to extract 'n', 'e', and 'kid' and check for\n\t// consistency.\n\n\t// Get the modulus parameter N.\n\tnB64Url, err := stringFromMap(jwk, \"n\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key modulus: %s\", err)\n\t}\n\n\tn, err := parseRSAModulusParam(nB64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key modulus: %s\", err)\n\t}\n\n\t// Get the public exponent E.\n\teB64Url, err := stringFromMap(jwk, \"e\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key exponent: %s\", err)\n\t}\n\n\te, err := parseRSAPublicExponentParam(eB64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key exponent: %s\", err)\n\t}\n\n\tkey := &rsaPublicKey{\n\t\tPublicKey: &rsa.PublicKey{N: n, E: e},\n\t}\n\n\t// Key ID is optional, but if it exists, it should match the key.\n\t_, ok := jwk[\"kid\"]\n\tif ok {\n\t\tkid, err := stringFromMap(jwk, \"kid\")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key ID: %s\", err)\n\t\t}\n\t\tif kid != key.KeyID() {\n\t\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key ID does not match: %s\", kid)\n\t\t}\n\t}\n\n\tif _, ok := jwk[\"d\"]; ok {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Public Key cannot contain private exponent\")\n\t}\n\n\tkey.extended = jwk\n\n\treturn key, nil\n}\n\n/*\n * RSA DSA PRIVATE KEY\n */\n\n// rsaPrivateKey implements a JWK Private Key using RSA digital signature algorithms.\ntype rsaPrivateKey struct {\n\trsaPublicKey\n\t*rsa.PrivateKey\n}\n\nfunc fromRSAPrivateKey(cryptoPrivateKey *rsa.PrivateKey) *rsaPrivateKey {\n\treturn &rsaPrivateKey{\n\t\t*fromRSAPublicKey(&cryptoPrivateKey.PublicKey),\n\t\tcryptoPrivateKey,\n\t}\n}\n\n// PublicKey returns the Public Key data associated with this Private Key.\nfunc (k *rsaPrivateKey) PublicKey() PublicKey {\n\treturn &k.rsaPublicKey\n}\n\nfunc (k *rsaPrivateKey) String() string {\n\treturn fmt.Sprintf(\"RSA Private Key <%s>\", k.KeyID())\n}\n\n// Sign signs the data read from the io.Reader using a signature algorithm supported\n// by the RSA private key. If the specified hashing algorithm is supported by\n// this key, that hash function is used to generate the signature otherwise the\n// the default hashing algorithm for this key is used. Returns the signature\n// and the name of the JWK signature algorithm used, e.g., \"RS256\", \"RS384\",\n// \"RS512\".\nfunc (k *rsaPrivateKey) Sign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error) {\n\t// Generate a signature of the data using the internal alg.\n\tsigAlg := rsaPKCS1v15SignatureAlgorithmForHashID(hashID)\n\thasher := sigAlg.HashID().New()\n\n\t_, err = io.Copy(hasher, data)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"error reading data to sign: %s\", err)\n\t}\n\thash := hasher.Sum(nil)\n\n\tsignature, err = rsa.SignPKCS1v15(rand.Reader, k.PrivateKey, sigAlg.HashID(), hash)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"error producing signature: %s\", err)\n\t}\n\n\talg = sigAlg.HeaderParam()\n\n\treturn\n}\n\n// CryptoPrivateKey returns the internal object which can be used as a\n// crypto.PublicKey for use with other standard library operations. The type\n// is either *rsa.PublicKey or *ecdsa.PublicKey\nfunc (k *rsaPrivateKey) CryptoPrivateKey() crypto.PrivateKey {\n\treturn k.PrivateKey\n}\n\nfunc (k *rsaPrivateKey) toMap() map[string]interface{} {\n\tk.Precompute() // Make sure the precomputed values are stored.\n\tjwk := k.rsaPublicKey.toMap()\n\n\tjwk[\"d\"] = joseBase64UrlEncode(k.D.Bytes())\n\tjwk[\"p\"] = joseBase64UrlEncode(k.Primes[0].Bytes())\n\tjwk[\"q\"] = joseBase64UrlEncode(k.Primes[1].Bytes())\n\tjwk[\"dp\"] = joseBase64UrlEncode(k.Precomputed.Dp.Bytes())\n\tjwk[\"dq\"] = joseBase64UrlEncode(k.Precomputed.Dq.Bytes())\n\tjwk[\"qi\"] = joseBase64UrlEncode(k.Precomputed.Qinv.Bytes())\n\n\totherPrimes := k.Primes[2:]\n\n\tif len(otherPrimes) > 0 {\n\t\totherPrimesInfo := make([]interface{}, len(otherPrimes))\n\t\tfor i, r := range otherPrimes {\n\t\t\totherPrimeInfo := make(map[string]string, 3)\n\t\t\totherPrimeInfo[\"r\"] = joseBase64UrlEncode(r.Bytes())\n\t\t\tcrtVal := k.Precomputed.CRTValues[i]\n\t\t\totherPrimeInfo[\"d\"] = joseBase64UrlEncode(crtVal.Exp.Bytes())\n\t\t\totherPrimeInfo[\"t\"] = joseBase64UrlEncode(crtVal.Coeff.Bytes())\n\t\t\totherPrimesInfo[i] = otherPrimeInfo\n\t\t}\n\t\tjwk[\"oth\"] = otherPrimesInfo\n\t}\n\n\treturn jwk\n}\n\n// MarshalJSON serializes this Private Key using the JWK JSON serialization format for\n// RSA keys.\nfunc (k *rsaPrivateKey) MarshalJSON() (data []byte, err error) {\n\treturn json.Marshal(k.toMap())\n}\n\n// PEMBlock serializes this Private Key to DER-encoded PKIX format.\nfunc (k *rsaPrivateKey) PEMBlock() (*pem.Block, error) {\n\tderBytes := x509.MarshalPKCS1PrivateKey(k.PrivateKey)\n\tk.extended[\"keyID\"] = k.KeyID() // For display purposes.\n\treturn createPemBlock(\"RSA PRIVATE KEY\", derBytes, k.extended)\n}\n\nfunc rsaPrivateKeyFromMap(jwk map[string]interface{}) (*rsaPrivateKey, error) {\n\t// The JWA spec for RSA Private Keys (draft rfc section 5.3.2) states that\n\t// only the private key exponent 'd' is REQUIRED, the others are just for\n\t// signature/decryption optimizations and SHOULD be included when the JWK\n\t// is produced. We MAY choose to accept a JWK which only includes 'd', but\n\t// we're going to go ahead and not choose to accept it without the extra\n\t// fields. Only the 'oth' field will be optional (for multi-prime keys).\n\tprivateExponent, err := parseRSAPrivateKeyParamFromMap(jwk, \"d\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key exponent: %s\", err)\n\t}\n\tfirstPrimeFactor, err := parseRSAPrivateKeyParamFromMap(jwk, \"p\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key prime factor: %s\", err)\n\t}\n\tsecondPrimeFactor, err := parseRSAPrivateKeyParamFromMap(jwk, \"q\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key prime factor: %s\", err)\n\t}\n\tfirstFactorCRT, err := parseRSAPrivateKeyParamFromMap(jwk, \"dp\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key CRT exponent: %s\", err)\n\t}\n\tsecondFactorCRT, err := parseRSAPrivateKeyParamFromMap(jwk, \"dq\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key CRT exponent: %s\", err)\n\t}\n\tcrtCoeff, err := parseRSAPrivateKeyParamFromMap(jwk, \"qi\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key CRT coefficient: %s\", err)\n\t}\n\n\tvar oth interface{}\n\tif _, ok := jwk[\"oth\"]; ok {\n\t\toth = jwk[\"oth\"]\n\t\tdelete(jwk, \"oth\")\n\t}\n\n\t// JWK key type (kty) has already been determined to be \"RSA\".\n\t// Need to extract the public key information, then extract the private\n\t// key values.\n\tpublicKey, err := rsaPublicKeyFromMap(jwk)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tprivateKey := &rsa.PrivateKey{\n\t\tPublicKey: *publicKey.PublicKey,\n\t\tD:         privateExponent,\n\t\tPrimes:    []*big.Int{firstPrimeFactor, secondPrimeFactor},\n\t\tPrecomputed: rsa.PrecomputedValues{\n\t\t\tDp:   firstFactorCRT,\n\t\t\tDq:   secondFactorCRT,\n\t\t\tQinv: crtCoeff,\n\t\t},\n\t}\n\n\tif oth != nil {\n\t\t// Should be an array of more JSON objects.\n\t\totherPrimesInfo, ok := oth.([]interface{})\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"JWK RSA Private Key: Invalid other primes info: must be an array\")\n\t\t}\n\t\tnumOtherPrimeFactors := len(otherPrimesInfo)\n\t\tif numOtherPrimeFactors == 0 {\n\t\t\treturn nil, errors.New(\"JWK RSA Privake Key: Invalid other primes info: must be absent or non-empty\")\n\t\t}\n\t\totherPrimeFactors := make([]*big.Int, numOtherPrimeFactors)\n\t\tproductOfPrimes := new(big.Int).Mul(firstPrimeFactor, secondPrimeFactor)\n\t\tcrtValues := make([]rsa.CRTValue, numOtherPrimeFactors)\n\n\t\tfor i, val := range otherPrimesInfo {\n\t\t\totherPrimeinfo, ok := val.(map[string]interface{})\n\t\t\tif !ok {\n\t\t\t\treturn nil, errors.New(\"JWK RSA Private Key: Invalid other prime info: must be a JSON object\")\n\t\t\t}\n\n\t\t\totherPrimeFactor, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, \"r\")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key prime factor: %s\", err)\n\t\t\t}\n\t\t\totherFactorCRT, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, \"d\")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key CRT exponent: %s\", err)\n\t\t\t}\n\t\t\totherCrtCoeff, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, \"t\")\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"JWK RSA Private Key CRT coefficient: %s\", err)\n\t\t\t}\n\n\t\t\tcrtValue := crtValues[i]\n\t\t\tcrtValue.Exp = otherFactorCRT\n\t\t\tcrtValue.Coeff = otherCrtCoeff\n\t\t\tcrtValue.R = productOfPrimes\n\t\t\totherPrimeFactors[i] = otherPrimeFactor\n\t\t\tproductOfPrimes = new(big.Int).Mul(productOfPrimes, otherPrimeFactor)\n\t\t}\n\n\t\tprivateKey.Primes = append(privateKey.Primes, otherPrimeFactors...)\n\t\tprivateKey.Precomputed.CRTValues = crtValues\n\t}\n\n\tkey := &rsaPrivateKey{\n\t\trsaPublicKey: *publicKey,\n\t\tPrivateKey:   privateKey,\n\t}\n\n\treturn key, nil\n}\n\n/*\n *\tKey Generation Functions.\n */\n\nfunc generateRSAPrivateKey(bits int) (k *rsaPrivateKey, err error) {\n\tk = new(rsaPrivateKey)\n\tk.PrivateKey, err = rsa.GenerateKey(rand.Reader, bits)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tk.rsaPublicKey.PublicKey = &k.PrivateKey.PublicKey\n\tk.extended = make(map[string]interface{})\n\n\treturn\n}\n\n// GenerateRSA2048PrivateKey generates a key pair using 2048-bit RSA.\nfunc GenerateRSA2048PrivateKey() (PrivateKey, error) {\n\tk, err := generateRSAPrivateKey(2048)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating RSA 2048-bit key: %s\", err)\n\t}\n\n\treturn k, nil\n}\n\n// GenerateRSA3072PrivateKey generates a key pair using 3072-bit RSA.\nfunc GenerateRSA3072PrivateKey() (PrivateKey, error) {\n\tk, err := generateRSAPrivateKey(3072)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating RSA 3072-bit key: %s\", err)\n\t}\n\n\treturn k, nil\n}\n\n// GenerateRSA4096PrivateKey generates a key pair using 4096-bit RSA.\nfunc GenerateRSA4096PrivateKey() (PrivateKey, error) {\n\tk, err := generateRSAPrivateKey(4096)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating RSA 4096-bit key: %s\", err)\n\t}\n\n\treturn k, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/libtrust/util.go",
    "content": "package libtrust\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/elliptic\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"encoding/base32\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n)\n\n// LoadOrCreateTrustKey will load a PrivateKey from the specified path\nfunc LoadOrCreateTrustKey(trustKeyPath string) (PrivateKey, error) {\n\tif err := os.MkdirAll(filepath.Dir(trustKeyPath), 0700); err != nil {\n\t\treturn nil, err\n\t}\n\n\ttrustKey, err := LoadKeyFile(trustKeyPath)\n\tif err == ErrKeyFileDoesNotExist {\n\t\ttrustKey, err = GenerateECP256PrivateKey()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error generating key: %s\", err)\n\t\t}\n\n\t\tif err := SaveKey(trustKeyPath, trustKey); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error saving key file: %s\", err)\n\t\t}\n\n\t\tdir, file := filepath.Split(trustKeyPath)\n\t\tif err := SavePublicKey(filepath.Join(dir, \"public-\"+file), trustKey.PublicKey()); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error saving public key file: %s\", err)\n\t\t}\n\t} else if err != nil {\n\t\treturn nil, fmt.Errorf(\"error loading key file: %s\", err)\n\t}\n\treturn trustKey, nil\n}\n\n// NewIdentityAuthTLSClientConfig returns a tls.Config configured to use identity\n// based authentication from the specified dockerUrl, the rootConfigPath and\n// the server name to which it is connecting.\n// If trustUnknownHosts is true it will automatically add the host to the\n// known-hosts.json in rootConfigPath.\nfunc NewIdentityAuthTLSClientConfig(dockerUrl string, trustUnknownHosts bool, rootConfigPath string, serverName string) (*tls.Config, error) {\n\ttlsConfig := newTLSConfig()\n\n\ttrustKeyPath := filepath.Join(rootConfigPath, \"key.json\")\n\tknownHostsPath := filepath.Join(rootConfigPath, \"known-hosts.json\")\n\n\tu, err := url.Parse(dockerUrl)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse machine url\")\n\t}\n\n\tif u.Scheme == \"unix\" {\n\t\treturn nil, nil\n\t}\n\n\taddr := u.Host\n\tproto := \"tcp\"\n\n\ttrustKey, err := LoadOrCreateTrustKey(trustKeyPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to load trust key: %s\", err)\n\t}\n\n\tknownHosts, err := LoadKeySetFile(knownHostsPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not load trusted hosts file: %s\", err)\n\t}\n\n\tallowedHosts, err := FilterByHosts(knownHosts, addr, false)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error filtering hosts: %s\", err)\n\t}\n\n\tcertPool, err := GenerateCACertPool(trustKey, allowedHosts)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Could not create CA pool: %s\", err)\n\t}\n\n\ttlsConfig.ServerName = serverName\n\ttlsConfig.RootCAs = certPool\n\n\tx509Cert, err := GenerateSelfSignedClientCert(trustKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"certificate generation error: %s\", err)\n\t}\n\n\ttlsConfig.Certificates = []tls.Certificate{{\n\t\tCertificate: [][]byte{x509Cert.Raw},\n\t\tPrivateKey:  trustKey.CryptoPrivateKey(),\n\t\tLeaf:        x509Cert,\n\t}}\n\n\ttlsConfig.InsecureSkipVerify = true\n\n\ttestConn, err := tls.Dial(proto, addr, tlsConfig)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"tls Handshake error: %s\", err)\n\t}\n\n\topts := x509.VerifyOptions{\n\t\tRoots:         tlsConfig.RootCAs,\n\t\tCurrentTime:   time.Now(),\n\t\tDNSName:       tlsConfig.ServerName,\n\t\tIntermediates: x509.NewCertPool(),\n\t}\n\n\tcerts := testConn.ConnectionState().PeerCertificates\n\tfor i, cert := range certs {\n\t\tif i == 0 {\n\t\t\tcontinue\n\t\t}\n\t\topts.Intermediates.AddCert(cert)\n\t}\n\n\tif _, err := certs[0].Verify(opts); err != nil {\n\t\tif _, ok := err.(x509.UnknownAuthorityError); ok {\n\t\t\tif trustUnknownHosts {\n\t\t\t\tpubKey, err := FromCryptoPublicKey(certs[0].PublicKey)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"error extracting public key from cert: %s\", err)\n\t\t\t\t}\n\n\t\t\t\tpubKey.AddExtendedField(\"hosts\", []string{addr})\n\n\t\t\t\tif err := AddKeySetFile(knownHostsPath, pubKey); err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"error adding machine to known hosts: %s\", err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn nil, fmt.Errorf(\"unable to connect.  unknown host: %s\", addr)\n\t\t\t}\n\t\t}\n\t}\n\n\ttestConn.Close()\n\ttlsConfig.InsecureSkipVerify = false\n\n\treturn tlsConfig, nil\n}\n\n// joseBase64UrlEncode encodes the given data using the standard base64 url\n// encoding format but with all trailing '=' characters omitted in accordance\n// with the jose specification.\n// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2\nfunc joseBase64UrlEncode(b []byte) string {\n\treturn strings.TrimRight(base64.URLEncoding.EncodeToString(b), \"=\")\n}\n\n// joseBase64UrlDecode decodes the given string using the standard base64 url\n// decoder but first adds the appropriate number of trailing '=' characters in\n// accordance with the jose specification.\n// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2\nfunc joseBase64UrlDecode(s string) ([]byte, error) {\n\ts = strings.Replace(s, \"\\n\", \"\", -1)\n\ts = strings.Replace(s, \" \", \"\", -1)\n\tswitch len(s) % 4 {\n\tcase 0:\n\tcase 2:\n\t\ts += \"==\"\n\tcase 3:\n\t\ts += \"=\"\n\tdefault:\n\t\treturn nil, errors.New(\"illegal base64url string\")\n\t}\n\treturn base64.URLEncoding.DecodeString(s)\n}\n\nfunc keyIDEncode(b []byte) string {\n\ts := strings.TrimRight(base32.StdEncoding.EncodeToString(b), \"=\")\n\tvar buf bytes.Buffer\n\tvar i int\n\tfor i = 0; i < len(s)/4-1; i++ {\n\t\tstart := i * 4\n\t\tend := start + 4\n\t\tbuf.WriteString(s[start:end] + \":\")\n\t}\n\tbuf.WriteString(s[i*4:])\n\treturn buf.String()\n}\n\nfunc keyIDFromCryptoKey(pubKey PublicKey) string {\n\t// Generate and return a 'libtrust' fingerprint of the public key.\n\t// For an RSA key this should be:\n\t//   SHA256(DER encoded ASN1)\n\t// Then truncated to 240 bits and encoded into 12 base32 groups like so:\n\t//   ABCD:EFGH:IJKL:MNOP:QRST:UVWX:YZ23:4567:ABCD:EFGH:IJKL:MNOP\n\tderBytes, err := x509.MarshalPKIXPublicKey(pubKey.CryptoPublicKey())\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\thasher := crypto.SHA256.New()\n\thasher.Write(derBytes)\n\treturn keyIDEncode(hasher.Sum(nil)[:30])\n}\n\nfunc stringFromMap(m map[string]interface{}, key string) (string, error) {\n\tval, ok := m[key]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"%q value not specified\", key)\n\t}\n\n\tstr, ok := val.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"%q value must be a string\", key)\n\t}\n\tdelete(m, key)\n\n\treturn str, nil\n}\n\nfunc parseECCoordinate(cB64Url string, curve elliptic.Curve) (*big.Int, error) {\n\tcurveByteLen := (curve.Params().BitSize + 7) >> 3\n\n\tcBytes, err := joseBase64UrlDecode(cB64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid base64 URL encoding: %s\", err)\n\t}\n\tcByteLength := len(cBytes)\n\tif cByteLength != curveByteLen {\n\t\treturn nil, fmt.Errorf(\"invalid number of octets: got %d, should be %d\", cByteLength, curveByteLen)\n\t}\n\treturn new(big.Int).SetBytes(cBytes), nil\n}\n\nfunc parseECPrivateParam(dB64Url string, curve elliptic.Curve) (*big.Int, error) {\n\tdBytes, err := joseBase64UrlDecode(dB64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid base64 URL encoding: %s\", err)\n\t}\n\n\t// The length of this octet string MUST be ceiling(log-base-2(n)/8)\n\t// octets (where n is the order of the curve). This is because the private\n\t// key d must be in the interval [1, n-1] so the bitlength of d should be\n\t// no larger than the bitlength of n-1. The easiest way to find the octet\n\t// length is to take bitlength(n-1), add 7 to force a carry, and shift this\n\t// bit sequence right by 3, which is essentially dividing by 8 and adding\n\t// 1 if there is any remainder. Thus, the private key value d should be\n\t// output to (bitlength(n-1)+7)>>3 octets.\n\tn := curve.Params().N\n\toctetLength := (new(big.Int).Sub(n, big.NewInt(1)).BitLen() + 7) >> 3\n\tdByteLength := len(dBytes)\n\n\tif dByteLength != octetLength {\n\t\treturn nil, fmt.Errorf(\"invalid number of octets: got %d, should be %d\", dByteLength, octetLength)\n\t}\n\n\treturn new(big.Int).SetBytes(dBytes), nil\n}\n\nfunc parseRSAModulusParam(nB64Url string) (*big.Int, error) {\n\tnBytes, err := joseBase64UrlDecode(nB64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid base64 URL encoding: %s\", err)\n\t}\n\n\treturn new(big.Int).SetBytes(nBytes), nil\n}\n\nfunc serializeRSAPublicExponentParam(e int) []byte {\n\t// We MUST use the minimum number of octets to represent E.\n\t// E is supposed to be 65537 for performance and security reasons\n\t// and is what golang's rsa package generates, but it might be\n\t// different if imported from some other generator.\n\tbuf := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(buf, uint32(e))\n\tvar i int\n\tfor i = 0; i < 8; i++ {\n\t\tif buf[i] != 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn buf[i:]\n}\n\nfunc parseRSAPublicExponentParam(eB64Url string) (int, error) {\n\teBytes, err := joseBase64UrlDecode(eB64Url)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"invalid base64 URL encoding: %s\", err)\n\t}\n\t// Only the minimum number of bytes were used to represent E, but\n\t// binary.BigEndian.Uint32 expects at least 4 bytes, so we need\n\t// to add zero padding if necassary.\n\tbyteLen := len(eBytes)\n\tbuf := make([]byte, 4-byteLen, 4)\n\teBytes = append(buf, eBytes...)\n\n\treturn int(binary.BigEndian.Uint32(eBytes)), nil\n}\n\nfunc parseRSAPrivateKeyParamFromMap(m map[string]interface{}, key string) (*big.Int, error) {\n\tb64Url, err := stringFromMap(m, key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tparamBytes, err := joseBase64UrlDecode(b64Url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invaled base64 URL encoding: %s\", err)\n\t}\n\n\treturn new(big.Int).SetBytes(paramBytes), nil\n}\n\nfunc createPemBlock(name string, derBytes []byte, headers map[string]interface{}) (*pem.Block, error) {\n\tpemBlock := &pem.Block{Type: name, Bytes: derBytes, Headers: map[string]string{}}\n\tfor k, v := range headers {\n\t\tswitch val := v.(type) {\n\t\tcase string:\n\t\t\tpemBlock.Headers[k] = val\n\t\tcase []string:\n\t\t\tif k == \"hosts\" {\n\t\t\t\tpemBlock.Headers[k] = strings.Join(val, \",\")\n\t\t\t} else {\n\t\t\t\t// Return error, non-encodable type\n\t\t\t}\n\t\tdefault:\n\t\t\t// Return error, non-encodable type\n\t\t}\n\t}\n\n\treturn pemBlock, nil\n}\n\nfunc pubKeyFromPEMBlock(pemBlock *pem.Block) (PublicKey, error) {\n\tcryptoPublicKey, err := x509.ParsePKIXPublicKey(pemBlock.Bytes)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to decode Public Key PEM data: %s\", err)\n\t}\n\n\tpubKey, err := FromCryptoPublicKey(cryptoPublicKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddPEMHeadersToKey(pemBlock, pubKey)\n\n\treturn pubKey, nil\n}\n\nfunc addPEMHeadersToKey(pemBlock *pem.Block, pubKey PublicKey) {\n\tfor key, value := range pemBlock.Headers {\n\t\tvar safeVal interface{}\n\t\tif key == \"hosts\" {\n\t\t\tsafeVal = strings.Split(value, \",\")\n\t\t} else {\n\t\t\tsafeVal = value\n\t\t}\n\t\tpubKey.AddExtendedField(key, safeVal)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/.gitignore",
    "content": "*~\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/.golangci.yml",
    "content": "linters:\n  enable:\n    - depguard\n    - staticcheck\n    - unconvert\n    - gofmt\n    - goimports\n    - revive\n    - ineffassign\n    - govet\n    - unused\n    - misspell\n\nlinters-settings:\n  depguard:\n    rules:\n      main:\n        files:\n          - $all\n        deny:\n          - pkg: \"io/ioutil\"\n\n  revive:\n    severity: error\n    rules:\n      - name: indent-error-flow\n        severity: warning\n        disabled: false\n\n      - name: error-strings\n        disabled: false\n\n  staticcheck:\n    # Suppress reports of deprecated packages\n    checks: [\"-SA1019\"]\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/ADOPTERS.md",
    "content": "Below are list of adopters of the `ocicrypt` library or supports use of OCI encrypted images:\n- [skopeo](https://github.com/containers/skopeo)\n- [buildah](https://github.com/containers/buildah)\n- [containerd](https://github.com/containerd/imgcrypt)\n- [nerdctl](https://github.com/containerd/nerdctl)\n- [distribution](https://github.com/distribution/distribution)\n\nBelow are the list of projects that are in the process of adopting support:\n- [quay](https://github.com/quay/quay)\n- [kata-containers](https://github.com/kata-containers/kata-containers)\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/CODE-OF-CONDUCT.md",
    "content": "## The OCIcrypt Library Project Community Code of Conduct\n\nThe OCIcrypt Library project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/containers/ocicrypt/MAINTAINERS",
    "content": "# ocicrypt maintainers\n#\n# Github ID, Name, Email Address\nlumjjb, Brandon Lum, lumjjb@gmail.com\nstefanberger, Stefan Berger, stefanb@linux.ibm.com\narronwy, Arron Wang, arron.wang@intel.com \n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/Makefile",
    "content": "#   Copyright The containerd Authors.\n\n#   Licensed under the Apache License, Version 2.0 (the \"License\");\n#   you may not use this file except in compliance with the License.\n#   You may obtain a copy of the License at\n\n#       http://www.apache.org/licenses/LICENSE-2.0\n\n#   Unless required by applicable law or agreed to in writing, software\n#   distributed under the License is distributed on an \"AS IS\" BASIS,\n#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#   See the License for the specific language governing permissions and\n#   limitations under the License.\n\n.PHONY: check build decoder generate-protobuf\n\nall: build\n\nFORCE:\n\ncheck:\n\tgolangci-lint run\n\nbuild: vendor\n\tgo build ./...\n\nvendor:\n\tgo mod tidy\n\ntest:\n\tgo clean -testcache\n\tgo test ./... -test.v\n\ngenerate-protobuf:\n\tprotoc  -I utils/keyprovider/ utils/keyprovider/keyprovider.proto --go_out=plugins=grpc:utils/keyprovider\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/README.md",
    "content": "# OCIcrypt Library\n\nThe `ocicrypt` library is the OCI image spec implementation of container image encryption. More details of the spec can be seen in the [OCI repository](https://github.com/opencontainers/image-spec/pull/775). The purpose of this library is to encode spec structures and consts in code, as well as provide a consistent implementation of image encryption across container runtimes and build tools.\n\nConsumers of OCIcrypt:\n\n- [containerd/imgcrypt](https://github.com/containerd/imgcrypt)\n- [cri-o](https://github.com/cri-o/cri-o)\n- [skopeo](https://github.com/containers/skopeo)\n\n\n## Usage\n\nThere are various levels of usage for this library. The main consumers of these would be runtime/build tools, and a more specific use would be in the ability to extend cryptographic function.\n\n### Runtime/Build tool usage\n\nThe general exposed interface a runtime/build tool would use, would be to perform encryption or decryption of layers:\n\n```\npackage \"github.com/containers/ocicrypt\"\nfunc EncryptLayer(ec *config.EncryptConfig, encOrPlainLayerReader io.Reader, desc ocispec.Descriptor) (io.Reader, EncryptLayerFinalizer, error)\nfunc DecryptLayer(dc *config.DecryptConfig, encLayerReader io.Reader, desc ocispec.Descriptor, unwrapOnly bool) (io.Reader, digest.Digest, error)\n```\n\nThe settings/parameters to these functions can be specified via creation of an encryption config with the `github.com/containers/ocicrypt/config` package. We note that because setting of annotations and other fields of the layer descriptor is done through various means in different runtimes/build tools, it is the responsibility of the caller to still ensure that the layer descriptor follows the OCI specification (i.e. encoding, setting annotations, etc.).\n\n\n### Crypto Agility and Extensibility\n\nThe implementation for both symmetric and asymmetric encryption used in this library are behind 2 main interfaces, which users can extend if need be. These are in the following packages:\n- github.com/containers/ocicrypt/blockcipher - LayerBlockCipher interface for block ciphers\n- github.com/containers/ocicrypt/keywrap - KeyWrapper interface for key wrapping\n\nWe note that adding interfaces here is risky outside the OCI spec is not recommended, unless for very specialized and confined usecases. Please open an issue or PR if there is a general usecase that could be added to the OCI spec.\n\n\n#### Keyprovider interface\n\nAs part of the keywrap interface, there is a [keyprovider](https://github.com/containers/ocicrypt/blob/main/docs/keyprovider.md) implementation that allows one to call out to a binary or service.\n\n\n## Security Issues\n\nWe consider security issues related to this library critical. Please report and security related issues by emailing maintainers in the [MAINTAINERS](MAINTAINERS) file.\n\n\n## Ocicrypt Pkcs11 Support\n\nOcicrypt Pkcs11 support is currently experiemental. For more details, please refer to the [this document](docs/pkcs11.md).\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/SECURITY.md",
    "content": "## Security and Disclosure Information Policy for the OCIcrypt Library Project\n\nThe OCIcrypt Library Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/blockcipher/blockcipher.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage blockcipher\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\n// LayerCipherType is the ciphertype as specified in the layer metadata\ntype LayerCipherType string\n\n// TODO: Should be obtained from OCI spec once included\nconst (\n\tAES256CTR LayerCipherType = \"AES_256_CTR_HMAC_SHA256\"\n)\n\n// PrivateLayerBlockCipherOptions includes the information required to encrypt/decrypt\n// an image which are sensitive and should not be in plaintext\ntype PrivateLayerBlockCipherOptions struct {\n\t// SymmetricKey represents the symmetric key used for encryption/decryption\n\t// This field should be populated by Encrypt/Decrypt calls\n\tSymmetricKey []byte `json:\"symkey\"`\n\n\t// Digest is the digest of the original data for verification.\n\t// This is NOT populated by Encrypt/Decrypt calls\n\tDigest digest.Digest `json:\"digest\"`\n\n\t// CipherOptions contains the cipher metadata used for encryption/decryption\n\t// This field should be populated by Encrypt/Decrypt calls\n\tCipherOptions map[string][]byte `json:\"cipheroptions\"`\n}\n\n// PublicLayerBlockCipherOptions includes the information required to encrypt/decrypt\n// an image which are public and can be deduplicated in plaintext across multiple\n// recipients\ntype PublicLayerBlockCipherOptions struct {\n\t// CipherType denotes the cipher type according to the list of OCI suppported\n\t// cipher types.\n\tCipherType LayerCipherType `json:\"cipher\"`\n\n\t// Hmac contains the hmac string to help verify encryption\n\tHmac []byte `json:\"hmac\"`\n\n\t// CipherOptions contains the cipher metadata used for encryption/decryption\n\t// This field should be populated by Encrypt/Decrypt calls\n\tCipherOptions map[string][]byte `json:\"cipheroptions\"`\n}\n\n// LayerBlockCipherOptions contains the public and private LayerBlockCipherOptions\n// required to encrypt/decrypt an image\ntype LayerBlockCipherOptions struct {\n\tPublic  PublicLayerBlockCipherOptions\n\tPrivate PrivateLayerBlockCipherOptions\n}\n\n// LayerBlockCipher returns a provider for encrypt/decrypt functionality\n// for handling the layer data for a specific algorithm\ntype LayerBlockCipher interface {\n\t// GenerateKey creates a symmetric key\n\tGenerateKey() ([]byte, error)\n\t// Encrypt takes in layer data and returns the ciphertext and relevant LayerBlockCipherOptions\n\tEncrypt(layerDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, Finalizer, error)\n\t// Decrypt takes in layer ciphertext data and returns the plaintext and relevant LayerBlockCipherOptions\n\tDecrypt(layerDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error)\n}\n\n// LayerBlockCipherHandler is the handler for encrypt/decrypt for layers\ntype LayerBlockCipherHandler struct {\n\tcipherMap map[LayerCipherType]LayerBlockCipher\n}\n\n// Finalizer is called after data blobs are written, and returns the LayerBlockCipherOptions for the encrypted blob\ntype Finalizer func() (LayerBlockCipherOptions, error)\n\n// GetOpt returns the value of the cipher option and if the option exists\nfunc (lbco LayerBlockCipherOptions) GetOpt(key string) (value []byte, ok bool) {\n\tif v, ok := lbco.Public.CipherOptions[key]; ok {\n\t\treturn v, ok\n\t} else if v, ok := lbco.Private.CipherOptions[key]; ok {\n\t\treturn v, ok\n\t}\n\treturn nil, false\n}\n\nfunc wrapFinalizerWithType(fin Finalizer, typ LayerCipherType) Finalizer {\n\treturn func() (LayerBlockCipherOptions, error) {\n\t\tlbco, err := fin()\n\t\tif err != nil {\n\t\t\treturn LayerBlockCipherOptions{}, err\n\t\t}\n\t\tlbco.Public.CipherType = typ\n\t\treturn lbco, err\n\t}\n}\n\n// Encrypt is the handler for the layer decryption routine\nfunc (h *LayerBlockCipherHandler) Encrypt(plainDataReader io.Reader, typ LayerCipherType) (io.Reader, Finalizer, error) {\n\tif c, ok := h.cipherMap[typ]; ok {\n\t\tsk, err := c.GenerateKey()\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\topt := LayerBlockCipherOptions{\n\t\t\tPrivate: PrivateLayerBlockCipherOptions{\n\t\t\t\tSymmetricKey: sk,\n\t\t\t},\n\t\t}\n\t\tencDataReader, fin, err := c.Encrypt(plainDataReader, opt)\n\t\tif err == nil {\n\t\t\tfin = wrapFinalizerWithType(fin, typ)\n\t\t}\n\t\treturn encDataReader, fin, err\n\t}\n\treturn nil, nil, fmt.Errorf(\"unsupported cipher type: %s\", typ)\n}\n\n// Decrypt is the handler for the layer decryption routine\nfunc (h *LayerBlockCipherHandler) Decrypt(encDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error) {\n\ttyp := opt.Public.CipherType\n\tif typ == \"\" {\n\t\treturn nil, LayerBlockCipherOptions{}, errors.New(\"no cipher type provided\")\n\t}\n\tif c, ok := h.cipherMap[typ]; ok {\n\t\treturn c.Decrypt(encDataReader, opt)\n\t}\n\treturn nil, LayerBlockCipherOptions{}, fmt.Errorf(\"unsupported cipher type: %s\", typ)\n}\n\n// NewLayerBlockCipherHandler returns a new default handler\nfunc NewLayerBlockCipherHandler() (*LayerBlockCipherHandler, error) {\n\th := LayerBlockCipherHandler{\n\t\tcipherMap: map[LayerCipherType]LayerBlockCipher{},\n\t}\n\n\tvar err error\n\th.cipherMap[AES256CTR], err = NewAESCTRLayerBlockCipher(256)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to set up Cipher AES-256-CTR: %w\", err)\n\t}\n\n\treturn &h, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/blockcipher/blockcipher_aes_ctr.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage blockcipher\n\nimport (\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/hmac\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\n\t\"github.com/containers/ocicrypt/utils\"\n)\n\n// AESCTRLayerBlockCipher implements the AES CTR stream cipher\ntype AESCTRLayerBlockCipher struct {\n\tkeylen         int // in bytes\n\treader         io.Reader\n\tencrypt        bool\n\tstream         cipher.Stream\n\terr            error\n\thmac           hash.Hash\n\texpHmac        []byte\n\tdoneEncrypting bool\n}\n\ntype aesctrcryptor struct {\n\tbc *AESCTRLayerBlockCipher\n}\n\n// NewAESCTRLayerBlockCipher returns a new AES SIV block cipher of 256 or 512 bits\nfunc NewAESCTRLayerBlockCipher(bits int) (LayerBlockCipher, error) {\n\tif bits != 256 {\n\t\treturn nil, errors.New(\"AES CTR bit count not supported\")\n\t}\n\treturn &AESCTRLayerBlockCipher{keylen: bits / 8}, nil\n}\n\nfunc (r *aesctrcryptor) Read(p []byte) (int, error) {\n\tvar (\n\t\to int\n\t)\n\n\tif r.bc.err != nil {\n\t\treturn 0, r.bc.err\n\t}\n\n\to, err := utils.FillBuffer(r.bc.reader, p)\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\tr.bc.err = err\n\t\t} else {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tif !r.bc.encrypt {\n\t\tif _, err := r.bc.hmac.Write(p[:o]); err != nil {\n\t\t\tr.bc.err = fmt.Errorf(\"could not write to hmac: %w\", err)\n\t\t\treturn 0, r.bc.err\n\t\t}\n\n\t\tif r.bc.err == io.EOF {\n\t\t\t// Before we return EOF we let the HMAC comparison\n\t\t\t// provide a verdict\n\t\t\tif !hmac.Equal(r.bc.hmac.Sum(nil), r.bc.expHmac) {\n\t\t\t\tr.bc.err = fmt.Errorf(\"could not properly decrypt byte stream; exp hmac: '%x', actual hmac: '%s'\", r.bc.expHmac, r.bc.hmac.Sum(nil))\n\t\t\t\treturn 0, r.bc.err\n\t\t\t}\n\t\t}\n\t}\n\n\tr.bc.stream.XORKeyStream(p[:o], p[:o])\n\n\tif r.bc.encrypt {\n\t\tif _, err := r.bc.hmac.Write(p[:o]); err != nil {\n\t\t\tr.bc.err = fmt.Errorf(\"could not write to hmac: %w\", err)\n\t\t\treturn 0, r.bc.err\n\t\t}\n\n\t\tif r.bc.err == io.EOF {\n\t\t\t// Final data encrypted; Do the 'then-MAC' part\n\t\t\tr.bc.doneEncrypting = true\n\t\t}\n\t}\n\n\treturn o, r.bc.err\n}\n\n// init initializes an instance\nfunc (bc *AESCTRLayerBlockCipher) init(encrypt bool, reader io.Reader, opts LayerBlockCipherOptions) (LayerBlockCipherOptions, error) {\n\tvar (\n\t\terr error\n\t)\n\n\tkey := opts.Private.SymmetricKey\n\tif len(key) != bc.keylen {\n\t\treturn LayerBlockCipherOptions{}, fmt.Errorf(\"invalid key length of %d bytes; need %d bytes\", len(key), bc.keylen)\n\t}\n\n\tnonce, ok := opts.GetOpt(\"nonce\")\n\tif !ok {\n\t\tnonce = make([]byte, aes.BlockSize)\n\t\tif _, err := io.ReadFull(rand.Reader, nonce); err != nil {\n\t\t\treturn LayerBlockCipherOptions{}, fmt.Errorf(\"unable to generate random nonce: %w\", err)\n\t\t}\n\t}\n\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn LayerBlockCipherOptions{}, fmt.Errorf(\"aes.NewCipher failed: %w\", err)\n\t}\n\n\tbc.reader = reader\n\tbc.encrypt = encrypt\n\tbc.stream = cipher.NewCTR(block, nonce)\n\tbc.err = nil\n\tbc.hmac = hmac.New(sha256.New, key)\n\tbc.expHmac = opts.Public.Hmac\n\tbc.doneEncrypting = false\n\n\tif !encrypt && len(bc.expHmac) == 0 {\n\t\treturn LayerBlockCipherOptions{}, errors.New(\"HMAC is not provided for decryption process\")\n\t}\n\n\tlbco := LayerBlockCipherOptions{\n\t\tPrivate: PrivateLayerBlockCipherOptions{\n\t\t\tSymmetricKey: key,\n\t\t\tCipherOptions: map[string][]byte{\n\t\t\t\t\"nonce\": nonce,\n\t\t\t},\n\t\t},\n\t}\n\n\treturn lbco, nil\n}\n\n// GenerateKey creates a synmmetric key\nfunc (bc *AESCTRLayerBlockCipher) GenerateKey() ([]byte, error) {\n\tkey := make([]byte, bc.keylen)\n\tif _, err := io.ReadFull(rand.Reader, key); err != nil {\n\t\treturn nil, err\n\t}\n\treturn key, nil\n}\n\n// Encrypt takes in layer data and returns the ciphertext and relevant LayerBlockCipherOptions\nfunc (bc *AESCTRLayerBlockCipher) Encrypt(plainDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, Finalizer, error) {\n\tlbco, err := bc.init(true, plainDataReader, opt)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tfinalizer := func() (LayerBlockCipherOptions, error) {\n\t\tif !bc.doneEncrypting {\n\t\t\treturn LayerBlockCipherOptions{}, errors.New(\"Read()ing not complete, unable to finalize\")\n\t\t}\n\t\tif lbco.Public.CipherOptions == nil {\n\t\t\tlbco.Public.CipherOptions = map[string][]byte{}\n\t\t}\n\t\tlbco.Public.Hmac = bc.hmac.Sum(nil)\n\t\treturn lbco, nil\n\t}\n\treturn &aesctrcryptor{bc}, finalizer, nil\n}\n\n// Decrypt takes in layer ciphertext data and returns the plaintext and relevant LayerBlockCipherOptions\nfunc (bc *AESCTRLayerBlockCipher) Decrypt(encDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error) {\n\tlbco, err := bc.init(false, encDataReader, opt)\n\tif err != nil {\n\t\treturn nil, LayerBlockCipherOptions{}, err\n\t}\n\n\treturn utils.NewDelayedReader(&aesctrcryptor{bc}, 1024*10), lbco, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/config/config.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage config\n\n// EncryptConfig is the container image PGP encryption configuration holding\n// the identifiers of those that will be able to decrypt the container and\n// the PGP public keyring file data that contains their public keys.\ntype EncryptConfig struct {\n\t// map holding 'gpg-recipients', 'gpg-pubkeyringfile', 'pubkeys', 'x509s'\n\tParameters map[string][][]byte\n\n\tDecryptConfig DecryptConfig\n}\n\n// DecryptConfig wraps the Parameters map that holds the decryption key\ntype DecryptConfig struct {\n\t// map holding 'privkeys', 'x509s', 'gpg-privatekeys'\n\tParameters map[string][][]byte\n}\n\n// CryptoConfig is a common wrapper for EncryptConfig and DecrypConfig that can\n// be passed through functions that share much code for encryption and decryption\ntype CryptoConfig struct {\n\tEncryptConfig *EncryptConfig\n\tDecryptConfig *DecryptConfig\n}\n\n// InitDecryption initialized a CryptoConfig object with parameters used for decryption\nfunc InitDecryption(dcparameters map[string][][]byte) CryptoConfig {\n\treturn CryptoConfig{\n\t\tDecryptConfig: &DecryptConfig{\n\t\t\tParameters: dcparameters,\n\t\t},\n\t}\n}\n\n// InitEncryption initializes a CryptoConfig object with parameters used for encryption\n// It also takes dcparameters that may be needed for decryption when adding a recipient\n// to an already encrypted image\nfunc InitEncryption(parameters, dcparameters map[string][][]byte) CryptoConfig {\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters: parameters,\n\t\t\tDecryptConfig: DecryptConfig{\n\t\t\t\tParameters: dcparameters,\n\t\t\t},\n\t\t},\n\t}\n}\n\n// CombineCryptoConfigs takes a CryptoConfig list and creates a single CryptoConfig\n// containing the crypto configuration of all the key bundles\nfunc CombineCryptoConfigs(ccs []CryptoConfig) CryptoConfig {\n\tecparam := map[string][][]byte{}\n\tecdcparam := map[string][][]byte{}\n\tdcparam := map[string][][]byte{}\n\n\tfor _, cc := range ccs {\n\t\tif ec := cc.EncryptConfig; ec != nil {\n\t\t\taddToMap(ecparam, ec.Parameters)\n\t\t\taddToMap(ecdcparam, ec.DecryptConfig.Parameters)\n\t\t}\n\n\t\tif dc := cc.DecryptConfig; dc != nil {\n\t\t\taddToMap(dcparam, dc.Parameters)\n\t\t}\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters: ecparam,\n\t\t\tDecryptConfig: DecryptConfig{\n\t\t\t\tParameters: ecdcparam,\n\t\t\t},\n\t\t},\n\t\tDecryptConfig: &DecryptConfig{\n\t\t\tParameters: dcparam,\n\t\t},\n\t}\n\n}\n\n// AttachDecryptConfig adds DecryptConfig to the field of EncryptConfig so that\n// the decryption parameters can be used to add recipients to an existing image\n// if the user is able to decrypt it.\nfunc (ec *EncryptConfig) AttachDecryptConfig(dc *DecryptConfig) {\n\tif dc != nil {\n\t\taddToMap(ec.DecryptConfig.Parameters, dc.Parameters)\n\t}\n}\n\nfunc addToMap(orig map[string][][]byte, add map[string][][]byte) {\n\tfor k, v := range add {\n\t\tif ov, ok := orig[k]; ok {\n\t\t\torig[k] = append(ov, v...)\n\t\t} else {\n\t\t\torig[k] = v\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/config/constructors.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage config\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt/crypto/pkcs11\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// EncryptWithJwe returns a CryptoConfig to encrypt with jwe public keys\nfunc EncryptWithJwe(pubKeys [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{}\n\tep := map[string][][]byte{\n\t\t\"pubkeys\": pubKeys,\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// EncryptWithPkcs7 returns a CryptoConfig to encrypt with pkcs7 x509 certs\nfunc EncryptWithPkcs7(x509s [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{}\n\n\tep := map[string][][]byte{\n\t\t\"x509s\": x509s,\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// EncryptWithGpg returns a CryptoConfig to encrypt with configured gpg parameters\nfunc EncryptWithGpg(gpgRecipients [][]byte, gpgPubRingFile []byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{}\n\tep := map[string][][]byte{\n\t\t\"gpg-recipients\":     gpgRecipients,\n\t\t\"gpg-pubkeyringfile\": {gpgPubRingFile},\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// EncryptWithPkcs11 returns a CryptoConfig to encrypt with configured pkcs11 parameters\nfunc EncryptWithPkcs11(pkcs11Config *pkcs11.Pkcs11Config, pkcs11Pubkeys, pkcs11Yamls [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{}\n\tep := map[string][][]byte{}\n\n\tif len(pkcs11Yamls) > 0 {\n\t\tif pkcs11Config == nil {\n\t\t\treturn CryptoConfig{}, errors.New(\"pkcs11Config must not be nil\")\n\t\t}\n\t\tp11confYaml, err := yaml.Marshal(pkcs11Config)\n\t\tif err != nil {\n\t\t\treturn CryptoConfig{}, fmt.Errorf(\"Could not marshal Pkcs11Config to Yaml: %w\", err)\n\t\t}\n\n\t\tdc = DecryptConfig{\n\t\t\tParameters: map[string][][]byte{\n\t\t\t\t\"pkcs11-config\": {p11confYaml},\n\t\t\t},\n\t\t}\n\t\tep[\"pkcs11-yamls\"] = pkcs11Yamls\n\t}\n\tif len(pkcs11Pubkeys) > 0 {\n\t\tep[\"pkcs11-pubkeys\"] = pkcs11Pubkeys\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// EncryptWithKeyProvider returns a CryptoConfig to encrypt with configured keyprovider parameters\nfunc EncryptWithKeyProvider(keyProviders [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{}\n\tep := make(map[string][][]byte)\n\tfor _, keyProvider := range keyProviders {\n\t\tkeyProvidersStr := string(keyProvider)\n\t\tidx := strings.Index(keyProvidersStr, \":\")\n\t\tif idx > 0 {\n\t\t\tep[keyProvidersStr[:idx]] = append(ep[keyProvidersStr[:idx]], []byte(keyProvidersStr[idx+1:]))\n\t\t} else {\n\t\t\tep[keyProvidersStr] = append(ep[keyProvidersStr], []byte(\"Enabled\"))\n\t\t}\n\t}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// DecryptWithKeyProvider returns a CryptoConfig to decrypt with configured keyprovider parameters\nfunc DecryptWithKeyProvider(keyProviders [][]byte) (CryptoConfig, error) {\n\tdp := make(map[string][][]byte)\n\tep := map[string][][]byte{}\n\tfor _, keyProvider := range keyProviders {\n\t\tkeyProvidersStr := string(keyProvider)\n\t\tidx := strings.Index(keyProvidersStr, \":\")\n\t\tif idx > 0 {\n\t\t\tdp[keyProvidersStr[:idx]] = append(dp[keyProvidersStr[:idx]], []byte(keyProvidersStr[idx+1:]))\n\t\t} else {\n\t\t\tdp[keyProvidersStr] = append(dp[keyProvidersStr], []byte(\"Enabled\"))\n\t\t}\n\t}\n\tdc := DecryptConfig{\n\t\tParameters: dp,\n\t}\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// DecryptWithPrivKeys returns a CryptoConfig to decrypt with configured private keys\nfunc DecryptWithPrivKeys(privKeys [][]byte, privKeysPasswords [][]byte) (CryptoConfig, error) {\n\tif len(privKeys) != len(privKeysPasswords) {\n\t\treturn CryptoConfig{}, errors.New(\"Length of privKeys should match length of privKeysPasswords\")\n\t}\n\n\tdc := DecryptConfig{\n\t\tParameters: map[string][][]byte{\n\t\t\t\"privkeys\":           privKeys,\n\t\t\t\"privkeys-passwords\": privKeysPasswords,\n\t\t},\n\t}\n\n\tep := map[string][][]byte{}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// DecryptWithX509s returns a CryptoConfig to decrypt with configured x509 certs\nfunc DecryptWithX509s(x509s [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{\n\t\tParameters: map[string][][]byte{\n\t\t\t\"x509s\": x509s,\n\t\t},\n\t}\n\n\tep := map[string][][]byte{}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// DecryptWithGpgPrivKeys returns a CryptoConfig to decrypt with configured gpg private keys\nfunc DecryptWithGpgPrivKeys(gpgPrivKeys, gpgPrivKeysPwds [][]byte) (CryptoConfig, error) {\n\tdc := DecryptConfig{\n\t\tParameters: map[string][][]byte{\n\t\t\t\"gpg-privatekeys\":           gpgPrivKeys,\n\t\t\t\"gpg-privatekeys-passwords\": gpgPrivKeysPwds,\n\t\t},\n\t}\n\n\tep := map[string][][]byte{}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n\n// DecryptWithPkcs11Yaml returns a CryptoConfig to decrypt with pkcs11 YAML formatted key files\nfunc DecryptWithPkcs11Yaml(pkcs11Config *pkcs11.Pkcs11Config, pkcs11Yamls [][]byte) (CryptoConfig, error) {\n\tp11confYaml, err := yaml.Marshal(pkcs11Config)\n\tif err != nil {\n\t\treturn CryptoConfig{}, fmt.Errorf(\"Could not marshal Pkcs11Config to Yaml: %w\", err)\n\t}\n\n\tdc := DecryptConfig{\n\t\tParameters: map[string][][]byte{\n\t\t\t\"pkcs11-yamls\":  pkcs11Yamls,\n\t\t\t\"pkcs11-config\": {p11confYaml},\n\t\t},\n\t}\n\n\tep := map[string][][]byte{}\n\n\treturn CryptoConfig{\n\t\tEncryptConfig: &EncryptConfig{\n\t\t\tParameters:    ep,\n\t\t\tDecryptConfig: dc,\n\t\t},\n\t\tDecryptConfig: &dc,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/config/keyprovider-config/config.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage config\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n)\n\n// Command describes the structure of command, it consist of path and args, where path defines the location of\n// binary executable and args are passed on to the binary executable\ntype Command struct {\n\tPath string   `json:\"path,omitempty\"`\n\tArgs []string `json:\"args,omitempty\"`\n}\n\n// KeyProviderAttrs describes the structure of key provider, it defines the way of invocation to key provider\ntype KeyProviderAttrs struct {\n\tCommand *Command `json:\"cmd,omitempty\"`\n\tGrpc    string   `json:\"grpc,omitempty\"`\n}\n\n// OcicryptConfig represents the format of an ocicrypt_provider.conf config file\ntype OcicryptConfig struct {\n\tKeyProviderConfig map[string]KeyProviderAttrs `json:\"key-providers\"`\n}\n\nconst ENVVARNAME = \"OCICRYPT_KEYPROVIDER_CONFIG\"\n\n// parseConfigFile parses a configuration file; it is not an error if the configuration file does\n// not exist, so no error is returned.\nfunc parseConfigFile(filename string) (*OcicryptConfig, error) {\n\t// a non-existent config file is not an error\n\t_, err := os.Stat(filename)\n\tif os.IsNotExist(err) {\n\t\treturn nil, nil\n\t}\n\n\tdata, err := os.ReadFile(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tic := &OcicryptConfig{}\n\terr = json.Unmarshal(data, ic)\n\treturn ic, err\n}\n\n// getConfiguration tries to read the configuration file at the following locations\n// ${OCICRYPT_KEYPROVIDER_CONFIG} == \"/etc/ocicrypt_keyprovider.yaml\"\n// If no configuration file could be found or read a null pointer is returned\nfunc GetConfiguration() (*OcicryptConfig, error) {\n\tvar ic *OcicryptConfig\n\tvar err error\n\tfilename := os.Getenv(ENVVARNAME)\n\tif len(filename) > 0 {\n\t\tic, err = parseConfigFile(filename)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error while parsing keyprovider config file: %w\", err)\n\t\t}\n\t} else {\n\t\treturn nil, nil\n\t}\n\treturn ic, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/config/pkcs11config/config.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11config\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n\n\t\"github.com/containers/ocicrypt/crypto/pkcs11\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// OcicryptConfig represents the format of an imgcrypt.conf config file\ntype OcicryptConfig struct {\n\tPkcs11Config pkcs11.Pkcs11Config `yaml:\"pkcs11\"`\n}\n\nconst CONFIGFILE = \"ocicrypt.conf\"\nconst ENVVARNAME = \"OCICRYPT_CONFIG\"\n\n// parseConfigFile parses a configuration file; it is not an error if the configuration file does\n// not exist, so no error is returned.\n// A config file may look like this:\n// module-directories:\n// - /usr/lib64/pkcs11/\n// - /usr/lib/pkcs11/\n// allowed-module-paths:\n// - /usr/lib64/pkcs11/\n// - /usr/lib/pkcs11/\nfunc parseConfigFile(filename string) (*OcicryptConfig, error) {\n\t// a non-existent config file is not an error\n\t_, err := os.Stat(filename)\n\tif os.IsNotExist(err) {\n\t\treturn nil, nil\n\t}\n\n\tdata, err := os.ReadFile(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tic := &OcicryptConfig{}\n\terr = yaml.Unmarshal(data, ic)\n\treturn ic, err\n}\n\n// getConfiguration tries to read the configuration file at the following locations\n// 1) ${OCICRYPT_CONFIG} == \"internal\": use internal default allow-all policy\n// 2) ${OCICRYPT_CONFIG}\n// 3) ${XDG_CONFIG_HOME}/ocicrypt-pkcs11.conf\n// 4) ${HOME}/.config/ocicrypt-pkcs11.conf\n// 5) /etc/ocicrypt-pkcs11.conf\n// If no configuration file could be found or read a null pointer is returned\nfunc getConfiguration() (*OcicryptConfig, error) {\n\tfilename := os.Getenv(ENVVARNAME)\n\tif len(filename) > 0 {\n\t\tif filename == \"internal\" {\n\t\t\treturn getDefaultCryptoConfigOpts()\n\t\t}\n\t\tic, err := parseConfigFile(filename)\n\t\tif err != nil || ic != nil {\n\t\t\treturn ic, err\n\t\t}\n\t}\n\tenvvar := os.Getenv(\"XDG_CONFIG_HOME\")\n\tif len(envvar) > 0 {\n\t\tic, err := parseConfigFile(path.Join(envvar, CONFIGFILE))\n\t\tif err != nil || ic != nil {\n\t\t\treturn ic, err\n\t\t}\n\t}\n\tenvvar = os.Getenv(\"HOME\")\n\tif len(envvar) > 0 {\n\t\tic, err := parseConfigFile(path.Join(envvar, \".config\", CONFIGFILE))\n\t\tif err != nil || ic != nil {\n\t\t\treturn ic, err\n\t\t}\n\t}\n\treturn parseConfigFile(path.Join(\"etc\", CONFIGFILE))\n}\n\n// getDefaultCryptoConfigOpts returns default crypto config opts needed for pkcs11 module access\nfunc getDefaultCryptoConfigOpts() (*OcicryptConfig, error) {\n\tmdyaml := pkcs11.GetDefaultModuleDirectoriesYaml(\"\")\n\tconfig := fmt.Sprintf(\"module-directories:\\n\"+\n\t\t\"%s\"+\n\t\t\"allowed-module-paths:\\n\"+\n\t\t\"%s\", mdyaml, mdyaml)\n\tp11conf, err := pkcs11.ParsePkcs11ConfigFile([]byte(config))\n\treturn &OcicryptConfig{\n\t\tPkcs11Config: *p11conf,\n\t}, err\n}\n\n// GetUserPkcs11Config gets the user's Pkcs11Conig either from a configuration file or if none is\n// found the default ones are returned\nfunc GetUserPkcs11Config() (*pkcs11.Pkcs11Config, error) {\n\tfmt.Print(\"Note: pkcs11 support is currently experimental\\n\")\n\tic, err := getConfiguration()\n\tif err != nil {\n\t\treturn &pkcs11.Pkcs11Config{}, err\n\t}\n\tif ic == nil {\n\t\treturn &pkcs11.Pkcs11Config{}, errors.New(\"No ocicrypt config file was found\")\n\t}\n\treturn &ic.Pkcs11Config, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/crypto/pkcs11/common.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n       http://www.apache.org/licenses/LICENSE-2.0\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11\n\nimport (\n\t\"fmt\"\n\n\tpkcs11uri \"github.com/stefanberger/go-pkcs11uri\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// Pkcs11KeyFile describes the format of the pkcs11 (private) key file.\n// It also carries pkcs11 module related environment variables that are transferred to the\n// Pkcs11URI object and activated when the pkcs11 module is used.\ntype Pkcs11KeyFile struct {\n\tPkcs11 struct {\n\t\tUri string `yaml:\"uri\"`\n\t} `yaml:\"pkcs11\"`\n\tModule struct {\n\t\tEnv map[string]string `yaml:\"env,omitempty\"`\n\t} `yaml:\"module\"`\n}\n\n// Pkcs11KeyFileObject is a representation of the Pkcs11KeyFile with the pkcs11 URI as an object\ntype Pkcs11KeyFileObject struct {\n\tUri *pkcs11uri.Pkcs11URI\n}\n\n// ParsePkcs11Uri parses a pkcs11 URI\nfunc ParsePkcs11Uri(uri string) (*pkcs11uri.Pkcs11URI, error) {\n\tp11uri := pkcs11uri.New()\n\terr := p11uri.Parse(uri)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Could not parse Pkcs11URI from file: %w\", err)\n\t}\n\treturn p11uri, err\n}\n\n// ParsePkcs11KeyFile parses a pkcs11 key file holding a pkcs11 URI describing a private key.\n// The file has the following yaml format:\n// pkcs11:\n// - uri : <pkcs11 uri>\n// An error is returned if the pkcs11 URI is malformed\nfunc ParsePkcs11KeyFile(yamlstr []byte) (*Pkcs11KeyFileObject, error) {\n\tp11keyfile := Pkcs11KeyFile{}\n\n\terr := yaml.Unmarshal(yamlstr, &p11keyfile)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Could not unmarshal pkcs11 keyfile: %w\", err)\n\t}\n\n\tp11uri, err := ParsePkcs11Uri(p11keyfile.Pkcs11.Uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tp11uri.SetEnvMap(p11keyfile.Module.Env)\n\n\treturn &Pkcs11KeyFileObject{Uri: p11uri}, err\n}\n\n// IsPkcs11PrivateKey checks whether the given YAML represents a Pkcs11 private key\nfunc IsPkcs11PrivateKey(yamlstr []byte) bool {\n\t_, err := ParsePkcs11KeyFile(yamlstr)\n\treturn err == nil\n}\n\n// IsPkcs11PublicKey checks whether the given YAML represents a Pkcs11 public key\nfunc IsPkcs11PublicKey(yamlstr []byte) bool {\n\t_, err := ParsePkcs11KeyFile(yamlstr)\n\treturn err == nil\n}\n\n// Pkcs11Config describes the layout of a pkcs11 config file\n// The file has the following yaml format:\n// module-directories:\n// - /usr/lib64/pkcs11/\n// allowd-module-paths\n// - /usr/lib64/pkcs11/libsofthsm2.so\ntype Pkcs11Config struct {\n\tModuleDirectories  []string `yaml:\"module-directories\"`\n\tAllowedModulePaths []string `yaml:\"allowed-module-paths\"`\n}\n\n// GetDefaultModuleDirectories returns module directories covering\n// a variety of Linux distros\nfunc GetDefaultModuleDirectories() []string {\n\tdirs := []string{\n\t\t\"/usr/lib64/pkcs11/\", // Fedora,RHEL,openSUSE\n\t\t\"/usr/lib/pkcs11/\",   // Fedora,ArchLinux\n\t\t\"/usr/local/lib/pkcs11/\",\n\t\t\"/usr/lib/softhsm/\", // Debian,Ubuntu\n\t}\n\n\t// Debian directory: /usr/lib/(x86_64|aarch64|arm|powerpc64le|riscv64|s390x)-linux-gnu/\n\thosttype, ostype, q := getHostAndOsType()\n\tif len(hosttype) > 0 {\n\t\tdir := fmt.Sprintf(\"/usr/lib/%s-%s-%s/\", hosttype, ostype, q)\n\t\tdirs = append(dirs, dir)\n\t}\n\treturn dirs\n}\n\n// GetDefaultModuleDirectoresFormatted returns the default module directories formatted for YAML\nfunc GetDefaultModuleDirectoriesYaml(indent string) string {\n\tres := \"\"\n\n\tfor _, dir := range GetDefaultModuleDirectories() {\n\t\tres += indent + \"- \" + dir + \"\\n\"\n\t}\n\treturn res\n}\n\n// ParsePkcs11ConfigFile parses a pkcs11 config file hat influences the module search behavior\n// as well as the set of modules that users are allowed to use\nfunc ParsePkcs11ConfigFile(yamlstr []byte) (*Pkcs11Config, error) {\n\tp11conf := Pkcs11Config{}\n\n\terr := yaml.Unmarshal(yamlstr, &p11conf)\n\tif err != nil {\n\t\treturn &p11conf, fmt.Errorf(\"Could not parse Pkcs11Config: %w\", err)\n\t}\n\treturn &p11conf, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/crypto/pkcs11/pkcs11helpers.go",
    "content": "//go:build cgo\n// +build cgo\n\n/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"net/url\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/miekg/pkcs11\"\n\tpkcs11uri \"github.com/stefanberger/go-pkcs11uri\"\n)\n\nvar (\n\t// OAEPLabel defines the label we use for OAEP encryption; this cannot be changed\n\tOAEPLabel = []byte(\"\")\n\n\t// OAEPSha1Params describes the OAEP parameters with sha1 hash algorithm; needed by SoftHSM\n\tOAEPSha1Params = &pkcs11.OAEPParams{\n\t\tHashAlg:    pkcs11.CKM_SHA_1,\n\t\tMGF:        pkcs11.CKG_MGF1_SHA1,\n\t\tSourceType: pkcs11.CKZ_DATA_SPECIFIED,\n\t\tSourceData: OAEPLabel,\n\t}\n\t// OAEPSha256Params describes the OAEP parameters with sha256 hash algorithm\n\tOAEPSha256Params = &pkcs11.OAEPParams{\n\t\tHashAlg:    pkcs11.CKM_SHA256,\n\t\tMGF:        pkcs11.CKG_MGF1_SHA256,\n\t\tSourceType: pkcs11.CKZ_DATA_SPECIFIED,\n\t\tSourceData: OAEPLabel,\n\t}\n)\n\n// rsaPublicEncryptOAEP encrypts the given plaintext with the given *rsa.PublicKey; the\n// environment variable OCICRYPT_OAEP_HASHALG can be set to 'sha1' to force usage of sha1 for OAEP (SoftHSM).\n// This function is needed by clients who are using a public key file for pkcs11 encryption\nfunc rsaPublicEncryptOAEP(pubKey *rsa.PublicKey, plaintext []byte) ([]byte, string, error) {\n\tvar (\n\t\thashfunc hash.Hash\n\t\thashalg  string\n\t)\n\n\toaephash := os.Getenv(\"OCICRYPT_OAEP_HASHALG\")\n\t// The default is sha256 (previously was sha1)\n\tswitch strings.ToLower(oaephash) {\n\tcase \"sha1\":\n\t\thashfunc = sha1.New()\n\t\thashalg = \"sha1\"\n\tcase \"sha256\", \"\":\n\t\thashfunc = sha256.New()\n\t\thashalg = \"sha256\"\n\tdefault:\n\t\treturn nil, \"\", fmt.Errorf(\"Unsupported OAEP hash '%s'\", oaephash)\n\t}\n\tciphertext, err := rsa.EncryptOAEP(hashfunc, rand.Reader, pubKey, plaintext, OAEPLabel)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"rss.EncryptOAEP failed: %w\", err)\n\t}\n\n\treturn ciphertext, hashalg, nil\n}\n\n// pkcs11UriGetLoginParameters gets the parameters necessary for login from the Pkcs11URI\n// PIN and module are mandatory; slot-id is optional and if not found -1 will be returned\n// For a privateKeyOperation a PIN is required and if none is given, this function will return an error\nfunc pkcs11UriGetLoginParameters(p11uri *pkcs11uri.Pkcs11URI, privateKeyOperation bool) (string, string, int64, error) {\n\tvar (\n\t\tpin string\n\t\terr error\n\t)\n\tif privateKeyOperation {\n\t\tif !p11uri.HasPIN() {\n\t\t\treturn \"\", \"\", 0, errors.New(\"Missing PIN for private key operation\")\n\t\t}\n\t}\n\t// some devices require a PIN to find a *public* key object, others don't\n\tpin, _ = p11uri.GetPIN()\n\n\tmodule, err := p11uri.GetModule()\n\tif err != nil {\n\t\treturn \"\", \"\", 0, fmt.Errorf(\"No module available in pkcs11 URI: %w\", err)\n\t}\n\n\tslotid := int64(-1)\n\n\tslot, ok := p11uri.GetPathAttribute(\"slot-id\", false)\n\tif ok {\n\t\tslotid, err = strconv.ParseInt(slot, 10, 64)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"slot-id is not a valid number: %w\", err)\n\t\t}\n\t\tif slotid < 0 {\n\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"slot-id is a negative number\")\n\t\t}\n\t\tif uint64(slotid) > 0xffffffff {\n\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"slot-id is larger than 32 bit\")\n\t\t}\n\t}\n\n\treturn pin, module, slotid, nil\n}\n\n// pkcs11UriGetKeyIdAndLabel gets the key label by retrieving the value of the 'object' attribute\nfunc pkcs11UriGetKeyIdAndLabel(p11uri *pkcs11uri.Pkcs11URI) (string, string, error) {\n\tkeyid, ok2 := p11uri.GetPathAttribute(\"id\", false)\n\tlabel, ok1 := p11uri.GetPathAttribute(\"object\", false)\n\tif !ok1 && !ok2 {\n\t\treturn \"\", \"\", errors.New(\"Neither 'id' nor 'object' attributes were found in pkcs11 URI\")\n\t}\n\treturn keyid, label, nil\n}\n\n// pkcs11OpenSession opens a session with a pkcs11 device at the given slot and logs in with the given PIN\nfunc pkcs11OpenSession(p11ctx *pkcs11.Ctx, slotid uint, pin string) (session pkcs11.SessionHandle, err error) {\n\tsession, err = p11ctx.OpenSession(slotid, pkcs11.CKF_SERIAL_SESSION|pkcs11.CKF_RW_SESSION)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"OpenSession to slot %d failed: %w\", slotid, err)\n\t}\n\tif len(pin) > 0 {\n\t\terr = p11ctx.Login(session, pkcs11.CKU_USER, pin)\n\t\tif err != nil {\n\t\t\t_ = p11ctx.CloseSession(session)\n\t\t\treturn 0, fmt.Errorf(\"Could not login to device: %w\", err)\n\t\t}\n\t}\n\treturn session, nil\n}\n\n// pkcs11UriLogin uses the given pkcs11 URI to select the pkcs11 module (shared library) and to get\n// the PIN to use for login; if the URI contains a slot-id, the given slot-id will be used, otherwise\n// one slot after the other will be attempted and the first one where login succeeds will be used\nfunc pkcs11UriLogin(p11uri *pkcs11uri.Pkcs11URI, privateKeyOperation bool) (ctx *pkcs11.Ctx, session pkcs11.SessionHandle, err error) {\n\tpin, module, slotid, err := pkcs11UriGetLoginParameters(p11uri, privateKeyOperation)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tp11ctx := pkcs11.New(module)\n\tif p11ctx == nil {\n\t\treturn nil, 0, errors.New(\"Please check module path, input is: \" + module)\n\t}\n\n\terr = p11ctx.Initialize()\n\tif err != nil {\n\t\tp11Err := err.(pkcs11.Error)\n\t\tif p11Err != pkcs11.CKR_CRYPTOKI_ALREADY_INITIALIZED {\n\t\t\treturn nil, 0, fmt.Errorf(\"Initialize failed: %w\", err)\n\t\t}\n\t}\n\n\tif slotid >= 0 {\n\t\tsession, err := pkcs11OpenSession(p11ctx, uint(slotid), pin)\n\t\treturn p11ctx, session, err\n\t}\n\n\tslots, err := p11ctx.GetSlotList(true)\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"GetSlotList failed: %w\", err)\n\t}\n\n\ttokenlabel, ok := p11uri.GetPathAttribute(\"token\", false)\n\tif !ok {\n\t\treturn nil, 0, errors.New(\"Missing 'token' attribute since 'slot-id' was not given\")\n\t}\n\n\tfor _, slot := range slots {\n\t\tti, err := p11ctx.GetTokenInfo(slot)\n\t\tif err != nil || ti.Label != tokenlabel {\n\t\t\tcontinue\n\t\t}\n\n\t\tsession, err = pkcs11OpenSession(p11ctx, slot, pin)\n\t\tif err == nil {\n\t\t\treturn p11ctx, session, err\n\t\t}\n\t}\n\tif len(pin) > 0 {\n\t\treturn nil, 0, errors.New(\"Could not create session to any slot and/or log in\")\n\t}\n\treturn nil, 0, errors.New(\"Could not create session to any slot\")\n}\n\nfunc pkcs11Logout(ctx *pkcs11.Ctx, session pkcs11.SessionHandle) {\n\t_ = ctx.Logout(session)\n\t_ = ctx.CloseSession(session)\n\t_ = ctx.Finalize()\n\tctx.Destroy()\n}\n\n// findObject finds an object of the given class with the given keyid and/or label\nfunc findObject(p11ctx *pkcs11.Ctx, session pkcs11.SessionHandle, class uint, keyid, label string) (pkcs11.ObjectHandle, error) {\n\tmsg := \"\"\n\n\ttemplate := []*pkcs11.Attribute{\n\t\tpkcs11.NewAttribute(pkcs11.CKA_CLASS, class),\n\t}\n\tif len(label) > 0 {\n\t\ttemplate = append(template, pkcs11.NewAttribute(pkcs11.CKA_LABEL, label))\n\t\tmsg = fmt.Sprintf(\"label '%s'\", label)\n\t}\n\tif len(keyid) > 0 {\n\t\ttemplate = append(template, pkcs11.NewAttribute(pkcs11.CKA_ID, keyid))\n\t\tif len(msg) > 0 {\n\t\t\tmsg += \" and \"\n\t\t}\n\t\tmsg += url.PathEscape(keyid)\n\t}\n\n\tif err := p11ctx.FindObjectsInit(session, template); err != nil {\n\t\treturn 0, fmt.Errorf(\"FindObjectsInit failed: %w\", err)\n\t}\n\n\tobj, _, err := p11ctx.FindObjects(session, 100)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"FindObjects failed: %w\", err)\n\t}\n\n\tif err := p11ctx.FindObjectsFinal(session); err != nil {\n\t\treturn 0, fmt.Errorf(\"FindObjectsFinal failed: %w\", err)\n\t}\n\tif len(obj) > 1 {\n\t\treturn 0, fmt.Errorf(\"There are too many (=%d) keys with %s\", len(obj), msg)\n\t} else if len(obj) == 1 {\n\t\treturn obj[0], nil\n\t}\n\n\treturn 0, fmt.Errorf(\"Could not find any object with %s\", msg)\n}\n\n// publicEncryptOAEP uses a public key described by a pkcs11 URI to OAEP encrypt the given plaintext\nfunc publicEncryptOAEP(pubKey *Pkcs11KeyFileObject, plaintext []byte) ([]byte, string, error) {\n\toldenv, err := setEnvVars(pubKey.Uri.GetEnvMap())\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tdefer restoreEnv(oldenv)\n\n\tp11ctx, session, err := pkcs11UriLogin(pubKey.Uri, false)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tdefer pkcs11Logout(p11ctx, session)\n\n\tkeyid, label, err := pkcs11UriGetKeyIdAndLabel(pubKey.Uri)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tp11PubKey, err := findObject(p11ctx, session, pkcs11.CKO_PUBLIC_KEY, keyid, label)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tvar hashalg string\n\n\tvar oaep *pkcs11.OAEPParams\n\toaephash := os.Getenv(\"OCICRYPT_OAEP_HASHALG\")\n\t// The default is sha256 (previously was sha1)\n\tswitch strings.ToLower(oaephash) {\n\tcase \"sha1\":\n\t\toaep = OAEPSha1Params\n\t\thashalg = \"sha1\"\n\tcase \"sha256\", \"\":\n\t\toaep = OAEPSha256Params\n\t\thashalg = \"sha256\"\n\tdefault:\n\t\treturn nil, \"\", fmt.Errorf(\"Unsupported OAEP hash '%s'\", oaephash)\n\t}\n\n\terr = p11ctx.EncryptInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_RSA_PKCS_OAEP, oaep)}, p11PubKey)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"EncryptInit error: %w\", err)\n\t}\n\n\tciphertext, err := p11ctx.Encrypt(session, plaintext)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"Encrypt failed: %w\", err)\n\t}\n\treturn ciphertext, hashalg, nil\n}\n\n// privateDecryptOAEP uses a pkcs11 URI describing a private key to OAEP decrypt a ciphertext\nfunc privateDecryptOAEP(privKeyObj *Pkcs11KeyFileObject, ciphertext []byte, hashalg string) ([]byte, error) {\n\toldenv, err := setEnvVars(privKeyObj.Uri.GetEnvMap())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer restoreEnv(oldenv)\n\n\tp11ctx, session, err := pkcs11UriLogin(privKeyObj.Uri, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer pkcs11Logout(p11ctx, session)\n\n\tkeyid, label, err := pkcs11UriGetKeyIdAndLabel(privKeyObj.Uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tp11PrivKey, err := findObject(p11ctx, session, pkcs11.CKO_PRIVATE_KEY, keyid, label)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar oaep *pkcs11.OAEPParams\n\n\t// An empty string from the Hash in the JSON historically defaults to sha1.\n\tswitch hashalg {\n\tcase \"sha1\", \"\":\n\t\toaep = OAEPSha1Params\n\tcase \"sha256\":\n\t\toaep = OAEPSha256Params\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"Unsupported hash algorithm '%s' for decryption\", hashalg)\n\t}\n\n\terr = p11ctx.DecryptInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_RSA_PKCS_OAEP, oaep)}, p11PrivKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"DecryptInit failed: %w\", err)\n\t}\n\tplaintext, err := p11ctx.Decrypt(session, ciphertext)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Decrypt failed: %w\", err)\n\t}\n\treturn plaintext, err\n}\n\n//\n// The following part deals with the JSON formatted message for multiple pkcs11 recipients\n//\n\n// Pkcs11Blob holds the encrypted blobs for all recipients; this is what we will put into the image's annotations\ntype Pkcs11Blob struct {\n\tVersion    uint              `json:\"version\"`\n\tRecipients []Pkcs11Recipient `json:\"recipients\"`\n}\n\n// Pkcs11Recipient holds the b64-encoded and encrypted blob for a particular recipient\ntype Pkcs11Recipient struct {\n\tVersion uint   `json:\"version\"`\n\tBlob    string `json:\"blob\"`\n\tHash    string `json:\"hash,omitempty\"`\n}\n\n// EncryptMultiple encrypts for one or multiple pkcs11 devices; the public keys passed to this function\n// may either be *rsa.PublicKey or *pkcs11uri.Pkcs11URI; the returned byte array is a JSON string of the\n// following format:\n// {\n// recipients: [ // recipient list\n// {\n// \"version\": 0,\n// \"blob\": <base64 encoded RSA OAEP encrypted blob>,\n// \"hash\": <hash used for OAEP other than 'sha256'>\n// } ,\n// {\n// \"version\": 0,\n// \"blob\": <base64 encoded RSA OAEP encrypted blob>,\n// \"hash\": <hash used for OAEP other than 'sha256'>\n// } ,\n// [...]\n// ]\n// }\nfunc EncryptMultiple(pubKeys []interface{}, data []byte) ([]byte, error) {\n\tvar (\n\t\tciphertext []byte\n\t\terr        error\n\t\tpkcs11blob Pkcs11Blob = Pkcs11Blob{Version: 0}\n\t\thashalg    string\n\t)\n\n\tfor _, pubKey := range pubKeys {\n\t\tswitch pkey := pubKey.(type) {\n\t\tcase *rsa.PublicKey:\n\t\t\tciphertext, hashalg, err = rsaPublicEncryptOAEP(pkey, data)\n\t\tcase *Pkcs11KeyFileObject:\n\t\t\tciphertext, hashalg, err = publicEncryptOAEP(pkey, data)\n\t\tdefault:\n\t\t\terr = fmt.Errorf(\"Unsupported key object type for pkcs11 public key\")\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\trecipient := Pkcs11Recipient{\n\t\t\tVersion: 0,\n\t\t\tBlob:    base64.StdEncoding.EncodeToString(ciphertext),\n\t\t\tHash:    hashalg,\n\t\t}\n\n\t\tpkcs11blob.Recipients = append(pkcs11blob.Recipients, recipient)\n\t}\n\treturn json.Marshal(&pkcs11blob)\n}\n\n// Decrypt tries to decrypt one of the recipients' blobs using a pkcs11 private key.\n// The input pkcs11blobstr is a string with the following format:\n// {\n// recipients: [  // recipient list\n// {\n// \"version\": 0,\n// \"blob\": <base64 encoded RSA OAEP encrypted blob>,\n// \"hash\": <hash used for OAEP other than 'sha1'>\n// } ,\n// {\n// \"version\": 0,\n// \"blob\": <base64 encoded RSA OAEP encrypted blob>,\n// \"hash\": <hash used for OAEP other than 'sha1'>\n// } ,\n// [...]\n// }\n// Note: More recent versions of this code explicitly write 'sha1'\n// while older versions left it empty in case of 'sha1'.\nfunc Decrypt(privKeyObjs []*Pkcs11KeyFileObject, pkcs11blobstr []byte) ([]byte, error) {\n\tpkcs11blob := Pkcs11Blob{}\n\terr := json.Unmarshal(pkcs11blobstr, &pkcs11blob)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Could not parse Pkcs11Blob: %w\", err)\n\t}\n\tswitch pkcs11blob.Version {\n\tcase 0:\n\t\t// latest supported version\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"found Pkcs11Blob with version %d but maximum supported version is 0\", pkcs11blob.Version)\n\t}\n\t// since we do trial and error, collect all encountered errors\n\terrs := \"\"\n\n\tfor _, recipient := range pkcs11blob.Recipients {\n\t\tswitch recipient.Version {\n\t\tcase 0:\n\t\t\t// last supported version\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"found Pkcs11Recipient with version %d but maximum supported version is 0\", recipient.Version)\n\t\t}\n\n\t\tciphertext, err := base64.StdEncoding.DecodeString(recipient.Blob)\n\t\tif err != nil || len(ciphertext) == 0 {\n\t\t\t// This should never happen... we skip over decoding issues\n\t\t\terrs += fmt.Sprintf(\"Base64 decoding failed: %s\\n\", err)\n\t\t\tcontinue\n\t\t}\n\t\t// try all keys until one works\n\t\tfor _, privKeyObj := range privKeyObjs {\n\t\t\tplaintext, err := privateDecryptOAEP(privKeyObj, ciphertext, recipient.Hash)\n\t\t\tif err == nil {\n\t\t\t\treturn plaintext, nil\n\t\t\t}\n\t\t\tif uri, err2 := privKeyObj.Uri.Format(); err2 == nil {\n\t\t\t\terrs += fmt.Sprintf(\"%s : %s\\n\", uri, err)\n\t\t\t} else {\n\t\t\t\terrs += fmt.Sprintf(\"%s\\n\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"Could not find a pkcs11 key for decryption:\\n%s\", errs)\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/crypto/pkcs11/pkcs11helpers_nocgo.go",
    "content": "//go:build !cgo\n// +build !cgo\n\n/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11\n\nimport \"fmt\"\n\nfunc EncryptMultiple(pubKeys []interface{}, data []byte) ([]byte, error) {\n\treturn nil, fmt.Errorf(\"ocicrypt pkcs11 not supported on this build\")\n}\n\nfunc Decrypt(privKeyObjs []*Pkcs11KeyFileObject, pkcs11blobstr []byte) ([]byte, error) {\n\treturn nil, fmt.Errorf(\"ocicrypt pkcs11 not supported on this build\")\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/crypto/pkcs11/utils.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n)\n\nvar (\n\tenvLock sync.Mutex\n)\n\n// setEnvVars sets the environment variables given in the map and locks the environment from\n// modification with the same function; if successful, you *must* call restoreEnv with the return\n// value from this function\nfunc setEnvVars(env map[string]string) ([]string, error) {\n\tenvLock.Lock()\n\n\tif len(env) == 0 {\n\t\treturn nil, nil\n\t}\n\n\toldenv := os.Environ()\n\n\tfor k, v := range env {\n\t\terr := os.Setenv(k, v)\n\t\tif err != nil {\n\t\t\trestoreEnv(oldenv)\n\t\t\treturn nil, fmt.Errorf(\"Could not set environment variable '%s' to '%s': %w\", k, v, err)\n\t\t}\n\t}\n\n\treturn oldenv, nil\n}\n\nfunc arrayToMap(elements []string) map[string]string {\n\to := make(map[string]string)\n\n\tfor _, element := range elements {\n\t\tp := strings.SplitN(element, \"=\", 2)\n\t\tif len(p) == 2 {\n\t\t\to[p[0]] = p[1]\n\t\t}\n\t}\n\n\treturn o\n}\n\n// restoreEnv restores the environment to be exactly as given in the array of strings\n// and unlocks the lock\nfunc restoreEnv(envs []string) {\n\tif envs != nil && len(envs) >= 0 {\n\t\ttarget := arrayToMap(envs)\n\t\tcurr := arrayToMap(os.Environ())\n\n\t\tfor nc, vc := range curr {\n\t\t\tvt, ok := target[nc]\n\t\t\tif !ok {\n\t\t\t\tos.Unsetenv(nc)\n\t\t\t} else if vc == vt {\n\t\t\t\tdelete(target, nc)\n\t\t\t}\n\t\t}\n\n\t\tfor nt, vt := range target {\n\t\t\tos.Setenv(nt, vt)\n\t\t}\n\t}\n\n\tenvLock.Unlock()\n}\n\nfunc getHostAndOsType() (string, string, string) {\n\tht := \"\"\n\tot := \"\"\n\tst := \"\"\n\tswitch runtime.GOOS {\n\tcase \"linux\":\n\t\tot = \"linux\"\n\t\tst = \"gnu\"\n\t\tswitch runtime.GOARCH {\n\t\tcase \"arm\":\n\t\t\tht = \"arm\"\n\t\tcase \"arm64\":\n\t\t\tht = \"aarch64\"\n\t\tcase \"amd64\":\n\t\t\tht = \"x86_64\"\n\t\tcase \"ppc64le\":\n\t\t\tht = \"powerpc64le\"\n\t\tcase \"riscv64\":\n\t\t\tht = \"riscv64\"\n\t\tcase \"s390x\":\n\t\t\tht = \"s390x\"\n\t\t}\n\t}\n\treturn ht, ot, st\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/encryption.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage ocicrypt\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt/blockcipher\"\n\t\"github.com/containers/ocicrypt/config\"\n\tkeyproviderconfig \"github.com/containers/ocicrypt/config/keyprovider-config\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"github.com/containers/ocicrypt/keywrap/jwe\"\n\t\"github.com/containers/ocicrypt/keywrap/keyprovider\"\n\t\"github.com/containers/ocicrypt/keywrap/pgp\"\n\t\"github.com/containers/ocicrypt/keywrap/pkcs11\"\n\t\"github.com/containers/ocicrypt/keywrap/pkcs7\"\n\t\"github.com/opencontainers/go-digest\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n\tlog \"github.com/sirupsen/logrus\"\n)\n\n// EncryptLayerFinalizer is a finalizer run to return the annotations to set for\n// the encrypted layer\ntype EncryptLayerFinalizer func() (map[string]string, error)\n\nfunc init() {\n\tkeyWrappers = make(map[string]keywrap.KeyWrapper)\n\tkeyWrapperAnnotations = make(map[string]string)\n\tRegisterKeyWrapper(\"pgp\", pgp.NewKeyWrapper())\n\tRegisterKeyWrapper(\"jwe\", jwe.NewKeyWrapper())\n\tRegisterKeyWrapper(\"pkcs7\", pkcs7.NewKeyWrapper())\n\tRegisterKeyWrapper(\"pkcs11\", pkcs11.NewKeyWrapper())\n\tic, err := keyproviderconfig.GetConfiguration()\n\tif err != nil {\n\t\tlog.Error(err)\n\t} else if ic != nil {\n\t\tfor provider, attrs := range ic.KeyProviderConfig {\n\t\t\tRegisterKeyWrapper(\"provider.\"+provider, keyprovider.NewKeyWrapper(provider, attrs))\n\t\t}\n\t}\n}\n\nvar keyWrappers map[string]keywrap.KeyWrapper\nvar keyWrapperAnnotations map[string]string\n\n// RegisterKeyWrapper allows to register key wrappers by their encryption scheme\nfunc RegisterKeyWrapper(scheme string, iface keywrap.KeyWrapper) {\n\tkeyWrappers[scheme] = iface\n\tkeyWrapperAnnotations[iface.GetAnnotationID()] = scheme\n}\n\n// GetKeyWrapper looks up the encryptor interface given an encryption scheme (gpg, jwe)\nfunc GetKeyWrapper(scheme string) keywrap.KeyWrapper {\n\treturn keyWrappers[scheme]\n}\n\n// GetWrappedKeysMap returns a map of wrappedKeys as values in a\n// map with the encryption scheme(s) as the key(s)\nfunc GetWrappedKeysMap(desc ocispec.Descriptor) map[string]string {\n\twrappedKeysMap := make(map[string]string)\n\n\tfor annotationsID, scheme := range keyWrapperAnnotations {\n\t\tif annotation, ok := desc.Annotations[annotationsID]; ok {\n\t\t\twrappedKeysMap[scheme] = annotation\n\t\t}\n\t}\n\treturn wrappedKeysMap\n}\n\n// EncryptLayer encrypts the layer by running one encryptor after the other\nfunc EncryptLayer(ec *config.EncryptConfig, encOrPlainLayerReader io.Reader, desc ocispec.Descriptor) (io.Reader, EncryptLayerFinalizer, error) {\n\tvar (\n\t\tencLayerReader io.Reader\n\t\terr            error\n\t\tencrypted      bool\n\t\tbcFin          blockcipher.Finalizer\n\t\tprivOptsData   []byte\n\t\tpubOptsData    []byte\n\t)\n\n\tif ec == nil {\n\t\treturn nil, nil, errors.New(\"EncryptConfig must not be nil\")\n\t}\n\n\tfor annotationsID := range keyWrapperAnnotations {\n\t\tannotation := desc.Annotations[annotationsID]\n\t\tif annotation != \"\" {\n\t\t\tprivOptsData, err = decryptLayerKeyOptsData(&ec.DecryptConfig, desc)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\tpubOptsData, err = getLayerPubOpts(desc)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\t// already encrypted!\n\t\t\tencrypted = true\n\t\t}\n\t}\n\n\tif !encrypted {\n\t\tencLayerReader, bcFin, err = commonEncryptLayer(encOrPlainLayerReader, desc.Digest, blockcipher.AES256CTR)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\tencLayerFinalizer := func() (map[string]string, error) {\n\t\t// If layer was already encrypted, bcFin should be nil, use existing optsData\n\t\tif bcFin != nil {\n\t\t\topts, err := bcFin()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tprivOptsData, err = json.Marshal(opts.Private)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"could not JSON marshal opts: %w\", err)\n\t\t\t}\n\t\t\tpubOptsData, err = json.Marshal(opts.Public)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"could not JSON marshal opts: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\tnewAnnotations := make(map[string]string)\n\t\tkeysWrapped := false\n\t\tif len(keyWrapperAnnotations) == 0 {\n\t\t\treturn nil, errors.New(\"missing Annotations needed for decryption\")\n\t\t}\n\t\tfor annotationsID, scheme := range keyWrapperAnnotations {\n\t\t\tb64Annotations := desc.Annotations[annotationsID]\n\t\t\tkeywrapper := GetKeyWrapper(scheme)\n\t\t\tb64Annotations, err = preWrapKeys(keywrapper, ec, b64Annotations, privOptsData)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif b64Annotations != \"\" {\n\t\t\t\tkeysWrapped = true\n\t\t\t\tnewAnnotations[annotationsID] = b64Annotations\n\t\t\t}\n\t\t}\n\n\t\tif !keysWrapped {\n\t\t\treturn nil, errors.New(\"no wrapped keys produced by encryption\")\n\t\t}\n\t\tnewAnnotations[\"org.opencontainers.image.enc.pubopts\"] = base64.StdEncoding.EncodeToString(pubOptsData)\n\n\t\tif len(newAnnotations) == 0 {\n\t\t\treturn nil, errors.New(\"no encryptor found to handle encryption\")\n\t\t}\n\n\t\treturn newAnnotations, err\n\t}\n\n\t// if nothing was encrypted, we just return encLayer = nil\n\treturn encLayerReader, encLayerFinalizer, err\n\n}\n\n// preWrapKeys calls WrapKeys and handles the base64 encoding and concatenation of the\n// annotation data\nfunc preWrapKeys(keywrapper keywrap.KeyWrapper, ec *config.EncryptConfig, b64Annotations string, optsData []byte) (string, error) {\n\tnewAnnotation, err := keywrapper.WrapKeys(ec, optsData)\n\tif err != nil || len(newAnnotation) == 0 {\n\t\treturn b64Annotations, err\n\t}\n\tb64newAnnotation := base64.StdEncoding.EncodeToString(newAnnotation)\n\tif b64Annotations == \"\" {\n\t\treturn b64newAnnotation, nil\n\t}\n\treturn b64Annotations + \",\" + b64newAnnotation, nil\n}\n\n// DecryptLayer decrypts a layer trying one keywrap.KeyWrapper after the other to see whether it\n// can apply the provided private key\n// If unwrapOnly is set we will only try to decrypt the layer encryption key and return\nfunc DecryptLayer(dc *config.DecryptConfig, encLayerReader io.Reader, desc ocispec.Descriptor, unwrapOnly bool) (io.Reader, digest.Digest, error) {\n\tif dc == nil {\n\t\treturn nil, \"\", errors.New(\"DecryptConfig must not be nil\")\n\t}\n\tprivOptsData, err := decryptLayerKeyOptsData(dc, desc)\n\tif err != nil || unwrapOnly {\n\t\treturn nil, \"\", err\n\t}\n\n\tvar pubOptsData []byte\n\tpubOptsData, err = getLayerPubOpts(desc)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\treturn commonDecryptLayer(encLayerReader, privOptsData, pubOptsData)\n}\n\nfunc decryptLayerKeyOptsData(dc *config.DecryptConfig, desc ocispec.Descriptor) ([]byte, error) {\n\tprivKeyGiven := false\n\terrs := \"\"\n\tif len(keyWrapperAnnotations) == 0 {\n\t\treturn nil, errors.New(\"missing Annotations needed for decryption\")\n\t}\n\tfor annotationsID, scheme := range keyWrapperAnnotations {\n\t\tb64Annotation := desc.Annotations[annotationsID]\n\t\tif b64Annotation != \"\" {\n\t\t\tkeywrapper := GetKeyWrapper(scheme)\n\n\t\t\tif keywrapper.NoPossibleKeys(dc.Parameters) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif len(keywrapper.GetPrivateKeys(dc.Parameters)) > 0 {\n\t\t\t\tprivKeyGiven = true\n\t\t\t}\n\t\t\toptsData, err := preUnwrapKey(keywrapper, dc, b64Annotation)\n\t\t\tif err != nil {\n\t\t\t\t// try next keywrap.KeyWrapper\n\t\t\t\terrs += fmt.Sprintf(\"%s\\n\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif optsData == nil {\n\t\t\t\t// try next keywrap.KeyWrapper\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn optsData, nil\n\t\t}\n\t}\n\tif !privKeyGiven {\n\t\treturn nil, fmt.Errorf(\"missing private key needed for decryption:\\n%s\", errs)\n\t}\n\treturn nil, fmt.Errorf(\"no suitable key unwrapper found or none of the private keys could be used for decryption:\\n%s\", errs)\n}\n\nfunc getLayerPubOpts(desc ocispec.Descriptor) ([]byte, error) {\n\tpubOptsString := desc.Annotations[\"org.opencontainers.image.enc.pubopts\"]\n\tif pubOptsString == \"\" {\n\t\treturn json.Marshal(blockcipher.PublicLayerBlockCipherOptions{})\n\t}\n\treturn base64.StdEncoding.DecodeString(pubOptsString)\n}\n\n// preUnwrapKey decodes the comma separated base64 strings and calls the Unwrap function\n// of the given keywrapper with it and returns the result in case the Unwrap functions\n// does not return an error. If all attempts fail, an error is returned.\nfunc preUnwrapKey(keywrapper keywrap.KeyWrapper, dc *config.DecryptConfig, b64Annotations string) ([]byte, error) {\n\tif b64Annotations == \"\" {\n\t\treturn nil, nil\n\t}\n\terrs := \"\"\n\tfor _, b64Annotation := range strings.Split(b64Annotations, \",\") {\n\t\tannotation, err := base64.StdEncoding.DecodeString(b64Annotation)\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"could not base64 decode the annotation\")\n\t\t}\n\t\toptsData, err := keywrapper.UnwrapKey(dc, annotation)\n\t\tif err != nil {\n\t\t\terrs += fmt.Sprintf(\"- %s\\n\", err)\n\t\t\tcontinue\n\t\t}\n\t\treturn optsData, nil\n\t}\n\treturn nil, fmt.Errorf(\"no suitable key found for decrypting layer key:\\n%s\", errs)\n}\n\n// commonEncryptLayer is a function to encrypt the plain layer using a new random\n// symmetric key and return the LayerBlockCipherHandler's JSON in string form for\n// later use during decryption\nfunc commonEncryptLayer(plainLayerReader io.Reader, d digest.Digest, typ blockcipher.LayerCipherType) (io.Reader, blockcipher.Finalizer, error) {\n\tlbch, err := blockcipher.NewLayerBlockCipherHandler()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tencLayerReader, bcFin, err := lbch.Encrypt(plainLayerReader, typ)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tnewBcFin := func() (blockcipher.LayerBlockCipherOptions, error) {\n\t\tlbco, err := bcFin()\n\t\tif err != nil {\n\t\t\treturn blockcipher.LayerBlockCipherOptions{}, err\n\t\t}\n\t\tlbco.Private.Digest = d\n\t\treturn lbco, nil\n\t}\n\n\treturn encLayerReader, newBcFin, err\n}\n\n// commonDecryptLayer decrypts an encrypted layer previously encrypted with commonEncryptLayer\n// by passing along the optsData\nfunc commonDecryptLayer(encLayerReader io.Reader, privOptsData []byte, pubOptsData []byte) (io.Reader, digest.Digest, error) {\n\tprivOpts := blockcipher.PrivateLayerBlockCipherOptions{}\n\terr := json.Unmarshal(privOptsData, &privOpts)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"could not JSON unmarshal privOptsData: %w\", err)\n\t}\n\n\tlbch, err := blockcipher.NewLayerBlockCipherHandler()\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tpubOpts := blockcipher.PublicLayerBlockCipherOptions{}\n\tif len(pubOptsData) > 0 {\n\t\terr := json.Unmarshal(pubOptsData, &pubOpts)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", fmt.Errorf(\"could not JSON unmarshal pubOptsData: %w\", err)\n\t\t}\n\t}\n\n\topts := blockcipher.LayerBlockCipherOptions{\n\t\tPrivate: privOpts,\n\t\tPublic:  pubOpts,\n\t}\n\n\tplainLayerReader, opts, err := lbch.Decrypt(encLayerReader, opts)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\treturn plainLayerReader, opts.Private.Digest, nil\n}\n\n// FilterOutAnnotations filters out the annotations belonging to the image encryption 'namespace'\n// and returns a map with those taken out\nfunc FilterOutAnnotations(annotations map[string]string) map[string]string {\n\ta := make(map[string]string)\n\tif len(annotations) > 0 {\n\t\tfor k, v := range annotations {\n\t\t\tif strings.HasPrefix(k, \"org.opencontainers.image.enc.\") {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ta[k] = v\n\t\t}\n\t}\n\treturn a\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/gpg.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage ocicrypt\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"golang.org/x/term\"\n)\n\n// GPGVersion enum representing the GPG client version to use.\ntype GPGVersion int\n\nconst (\n\t// GPGv2 signifies gpgv2+\n\tGPGv2 GPGVersion = iota\n\t// GPGv1 signifies gpgv1+\n\tGPGv1\n\t// GPGVersionUndetermined signifies gpg client version undetermined\n\tGPGVersionUndetermined\n)\n\n// GPGClient defines an interface for wrapping the gpg command line tools\ntype GPGClient interface {\n\t// ReadGPGPubRingFile gets the byte sequence of the gpg public keyring\n\tReadGPGPubRingFile() ([]byte, error)\n\t// GetGPGPrivateKey gets the private key bytes of a keyid given a passphrase\n\tGetGPGPrivateKey(keyid uint64, passphrase string) ([]byte, error)\n\t// GetSecretKeyDetails gets the details of a secret key\n\tGetSecretKeyDetails(keyid uint64) ([]byte, bool, error)\n\t// GetKeyDetails gets the details of a public key\n\tGetKeyDetails(keyid uint64) ([]byte, bool, error)\n\t// ResolveRecipients resolves PGP key ids to user names\n\tResolveRecipients([]string) []string\n}\n\n// gpgClient contains generic gpg client information\ntype gpgClient struct {\n\tgpgHomeDir string\n}\n\n// gpgv2Client is a gpg2 client\ntype gpgv2Client struct {\n\tgpgClient\n}\n\n// gpgv1Client is a gpg client\ntype gpgv1Client struct {\n\tgpgClient\n}\n\n// GuessGPGVersion guesses the version of gpg. Defaults to gpg2 if exists, if\n// not defaults to regular gpg.\nfunc GuessGPGVersion() GPGVersion {\n\tif err := exec.Command(\"gpg2\", \"--version\").Run(); err == nil {\n\t\treturn GPGv2\n\t} else if err := exec.Command(\"gpg\", \"--version\").Run(); err == nil {\n\t\treturn GPGv1\n\t}\n\treturn GPGVersionUndetermined\n}\n\n// NewGPGClient creates a new GPGClient object representing the given version\n// and using the given home directory\nfunc NewGPGClient(gpgVersion, gpgHomeDir string) (GPGClient, error) {\n\tv := new(GPGVersion)\n\tswitch gpgVersion {\n\tcase \"v1\":\n\t\t*v = GPGv1\n\tcase \"v2\":\n\t\t*v = GPGv2\n\tdefault:\n\t\tv = nil\n\t}\n\treturn newGPGClient(v, gpgHomeDir)\n}\n\nfunc newGPGClient(version *GPGVersion, homedir string) (GPGClient, error) {\n\tvar gpgVersion GPGVersion\n\tif version != nil {\n\t\tgpgVersion = *version\n\t} else {\n\t\tgpgVersion = GuessGPGVersion()\n\t}\n\n\tswitch gpgVersion {\n\tcase GPGv1:\n\t\treturn &gpgv1Client{\n\t\t\tgpgClient: gpgClient{gpgHomeDir: homedir},\n\t\t}, nil\n\tcase GPGv2:\n\t\treturn &gpgv2Client{\n\t\t\tgpgClient: gpgClient{gpgHomeDir: homedir},\n\t\t}, nil\n\tcase GPGVersionUndetermined:\n\t\treturn nil, fmt.Errorf(\"unable to determine GPG version\")\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unhandled case: NewGPGClient\")\n\t}\n}\n\n// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase\nfunc (gc *gpgv2Client) GetGPGPrivateKey(keyid uint64, passphrase string) ([]byte, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = append(args, []string{\"--homedir\", gc.gpgHomeDir}...)\n\t}\n\n\trfile, wfile, err := os.Pipe()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not create pipe: %w\", err)\n\t}\n\tdefer func() {\n\t\trfile.Close()\n\t\twfile.Close()\n\t}()\n\t// fill pipe in background\n\tgo func(passphrase string) {\n\t\t_, _ = wfile.Write([]byte(passphrase))\n\t\twfile.Close()\n\t}(passphrase)\n\n\targs = append(args, []string{\"--pinentry-mode\", \"loopback\", \"--batch\", \"--passphrase-fd\", fmt.Sprintf(\"%d\", 3), \"--export-secret-key\", fmt.Sprintf(\"0x%x\", keyid)}...)\n\n\tcmd := exec.Command(\"gpg2\", args...)\n\tcmd.ExtraFiles = []*os.File{rfile}\n\n\treturn runGPGGetOutput(cmd)\n}\n\n// ReadGPGPubRingFile reads the GPG public key ring file\nfunc (gc *gpgv2Client) ReadGPGPubRingFile() ([]byte, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = append(args, []string{\"--homedir\", gc.gpgHomeDir}...)\n\t}\n\targs = append(args, []string{\"--batch\", \"--export\"}...)\n\n\tcmd := exec.Command(\"gpg2\", args...)\n\n\treturn runGPGGetOutput(cmd)\n}\n\nfunc (gc *gpgv2Client) getKeyDetails(option string, keyid uint64) ([]byte, bool, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = []string{\"--homedir\", gc.gpgHomeDir}\n\t}\n\targs = append(args, option, fmt.Sprintf(\"0x%x\", keyid))\n\n\tcmd := exec.Command(\"gpg2\", args...)\n\n\tkeydata, err := runGPGGetOutput(cmd)\n\treturn keydata, err == nil, err\n}\n\n// GetSecretKeyDetails retrieves the secret key details of key with keyid.\n// returns a byte array of the details and a bool if the key exists\nfunc (gc *gpgv2Client) GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) {\n\treturn gc.getKeyDetails(\"-K\", keyid)\n}\n\n// GetKeyDetails retrieves the public key details of key with keyid.\n// returns a byte array of the details and a bool if the key exists\nfunc (gc *gpgv2Client) GetKeyDetails(keyid uint64) ([]byte, bool, error) {\n\treturn gc.getKeyDetails(\"-k\", keyid)\n}\n\n// ResolveRecipients converts PGP keyids to email addresses, if possible\nfunc (gc *gpgv2Client) ResolveRecipients(recipients []string) []string {\n\treturn resolveRecipients(gc, recipients)\n}\n\n// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase\nfunc (gc *gpgv1Client) GetGPGPrivateKey(keyid uint64, _ string) ([]byte, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = append(args, []string{\"--homedir\", gc.gpgHomeDir}...)\n\t}\n\targs = append(args, []string{\"--batch\", \"--export-secret-key\", fmt.Sprintf(\"0x%x\", keyid)}...)\n\n\tcmd := exec.Command(\"gpg\", args...)\n\n\treturn runGPGGetOutput(cmd)\n}\n\n// ReadGPGPubRingFile reads the GPG public key ring file\nfunc (gc *gpgv1Client) ReadGPGPubRingFile() ([]byte, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = append(args, []string{\"--homedir\", gc.gpgHomeDir}...)\n\t}\n\targs = append(args, []string{\"--batch\", \"--export\"}...)\n\n\tcmd := exec.Command(\"gpg\", args...)\n\n\treturn runGPGGetOutput(cmd)\n}\n\nfunc (gc *gpgv1Client) getKeyDetails(option string, keyid uint64) ([]byte, bool, error) {\n\tvar args []string\n\n\tif gc.gpgHomeDir != \"\" {\n\t\targs = []string{\"--homedir\", gc.gpgHomeDir}\n\t}\n\targs = append(args, option, fmt.Sprintf(\"0x%x\", keyid))\n\n\tcmd := exec.Command(\"gpg\", args...)\n\n\tkeydata, err := runGPGGetOutput(cmd)\n\n\treturn keydata, err == nil, err\n}\n\n// GetSecretKeyDetails retrieves the secret key details of key with keyid.\n// returns a byte array of the details and a bool if the key exists\nfunc (gc *gpgv1Client) GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) {\n\treturn gc.getKeyDetails(\"-K\", keyid)\n}\n\n// GetKeyDetails retrieves the public key details of key with keyid.\n// returns a byte array of the details and a bool if the key exists\nfunc (gc *gpgv1Client) GetKeyDetails(keyid uint64) ([]byte, bool, error) {\n\treturn gc.getKeyDetails(\"-k\", keyid)\n}\n\n// ResolveRecipients converts PGP keyids to email addresses, if possible\nfunc (gc *gpgv1Client) ResolveRecipients(recipients []string) []string {\n\treturn resolveRecipients(gc, recipients)\n}\n\n// runGPGGetOutput runs the GPG commandline and returns stdout as byte array\n// and any stderr in the error\nfunc runGPGGetOutput(cmd *exec.Cmd) ([]byte, error) {\n\tstdout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstderr, err := cmd.StderrPipe()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := cmd.Start(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tstdoutstr, err2 := io.ReadAll(stdout)\n\tstderrstr, _ := io.ReadAll(stderr)\n\n\tif err := cmd.Wait(); err != nil {\n\t\treturn nil, fmt.Errorf(\"error from %s: %s\", cmd.Path, string(stderrstr))\n\t}\n\n\treturn stdoutstr, err2\n}\n\n// resolveRecipients walks the list of recipients and attempts to convert\n// all keyIds to email addresses; if something goes wrong during the\n// conversion of a recipient, the original string is returned for that\n// recpient\nfunc resolveRecipients(gc GPGClient, recipients []string) []string {\n\tvar result []string\n\n\tfor _, recipient := range recipients {\n\t\tkeyID, err := strconv.ParseUint(recipient, 0, 64)\n\t\tif err != nil {\n\t\t\tresult = append(result, recipient)\n\t\t} else {\n\t\t\tdetails, found, _ := gc.GetKeyDetails(keyID)\n\t\t\tif !found {\n\t\t\t\tresult = append(result, recipient)\n\t\t\t} else {\n\t\t\t\temail := extractEmailFromDetails(details)\n\t\t\t\tif email == \"\" {\n\t\t\t\t\tresult = append(result, recipient)\n\t\t\t\t} else {\n\t\t\t\t\tresult = append(result, email)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn result\n}\n\nvar (\n\tonceRegexp   sync.Once\n\temailPattern *regexp.Regexp\n)\n\nfunc extractEmailFromDetails(details []byte) string {\n\tonceRegexp.Do(func() {\n\t\temailPattern = regexp.MustCompile(`uid\\s+\\[.*\\]\\s.*\\s<(?P<email>.+)>`)\n\t})\n\tloc := emailPattern.FindSubmatchIndex(details)\n\tif len(loc) == 0 {\n\t\treturn \"\"\n\t}\n\treturn string(emailPattern.Expand(nil, []byte(\"$email\"), details, loc))\n}\n\n// uint64ToStringArray converts an array of uint64's to an array of strings\n// by applying a format string to each uint64\nfunc uint64ToStringArray(format string, in []uint64) []string {\n\tvar ret []string\n\n\tfor _, v := range in {\n\t\tret = append(ret, fmt.Sprintf(format, v))\n\t}\n\treturn ret\n}\n\n// GPGGetPrivateKey walks the list of layerInfos and tries to decrypt the\n// wrapped symmetric keys. For this it determines whether a private key is\n// in the GPGVault or on this system and prompts for the passwords for those\n// that are available. If we do not find a private key on the system for\n// getting to the symmetric key of a layer then an error is generated.\nfunc GPGGetPrivateKey(descs []ocispec.Descriptor, gpgClient GPGClient, gpgVault GPGVault, mustFindKey bool) (gpgPrivKeys [][]byte, gpgPrivKeysPwds [][]byte, err error) {\n\t// PrivateKeyData describes a private key\n\ttype PrivateKeyData struct {\n\t\tKeyData         []byte\n\t\tKeyDataPassword []byte\n\t}\n\tvar pkd PrivateKeyData\n\tkeyIDPasswordMap := make(map[uint64]PrivateKeyData)\n\n\tfor _, desc := range descs {\n\t\tfor scheme, b64pgpPackets := range GetWrappedKeysMap(desc) {\n\t\t\tif scheme != \"pgp\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tkeywrapper := GetKeyWrapper(scheme)\n\t\t\tif keywrapper == nil {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"could not get KeyWrapper for %s\", scheme)\n\t\t\t}\n\t\t\tkeyIds, err := keywrapper.GetKeyIdsFromPacket(b64pgpPackets)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\n\t\t\tfound := false\n\t\t\tfor _, keyid := range keyIds {\n\t\t\t\t// do we have this key? -- first check the vault\n\t\t\t\tif gpgVault != nil {\n\t\t\t\t\t_, keydata := gpgVault.GetGPGPrivateKey(keyid)\n\t\t\t\t\tif len(keydata) > 0 {\n\t\t\t\t\t\tpkd = PrivateKeyData{\n\t\t\t\t\t\t\tKeyData:         keydata,\n\t\t\t\t\t\t\tKeyDataPassword: nil, // password not supported in this case\n\t\t\t\t\t\t}\n\t\t\t\t\t\tkeyIDPasswordMap[keyid] = pkd\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t} else if gpgClient != nil {\n\t\t\t\t\t// check the local system's gpg installation\n\t\t\t\t\tkeyinfo, haveKey, _ := gpgClient.GetSecretKeyDetails(keyid)\n\t\t\t\t\t// this may fail if the key is not here; we ignore the error\n\t\t\t\t\tif !haveKey {\n\t\t\t\t\t\t// key not on this system\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\t_, found = keyIDPasswordMap[keyid]\n\t\t\t\t\tif !found {\n\t\t\t\t\t\tfmt.Printf(\"Passphrase required for Key id 0x%x: \\n%v\", keyid, string(keyinfo))\n\t\t\t\t\t\tfmt.Printf(\"Enter passphrase for key with Id 0x%x: \", keyid)\n\n\t\t\t\t\t\tpassword, err := term.ReadPassword(int(os.Stdin.Fd()))\n\t\t\t\t\t\tfmt.Printf(\"\\n\")\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tkeydata, err := gpgClient.GetGPGPrivateKey(keyid, string(password))\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpkd = PrivateKeyData{\n\t\t\t\t\t\t\tKeyData:         keydata,\n\t\t\t\t\t\t\tKeyDataPassword: password,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tkeyIDPasswordMap[keyid] = pkd\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t} else {\n\t\t\t\t\treturn nil, nil, errors.New(\"no GPGVault or GPGClient passed\")\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !found && len(b64pgpPackets) > 0 && mustFindKey {\n\t\t\t\tids := uint64ToStringArray(\"0x%x\", keyIds)\n\n\t\t\t\treturn nil, nil, fmt.Errorf(\"missing key for decryption of layer %x of %s. Need one of the following keys: %s\", desc.Digest, desc.Platform, strings.Join(ids, \", \"))\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, pkd := range keyIDPasswordMap {\n\t\tgpgPrivKeys = append(gpgPrivKeys, pkd.KeyData)\n\t\tgpgPrivKeysPwds = append(gpgPrivKeysPwds, pkd.KeyDataPassword)\n\t}\n\n\treturn gpgPrivKeys, gpgPrivKeysPwds, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/gpgvault.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage ocicrypt\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"golang.org/x/crypto/openpgp\"\n\t\"golang.org/x/crypto/openpgp/packet\"\n)\n\n// GPGVault defines an interface for wrapping multiple secret key rings\ntype GPGVault interface {\n\t// AddSecretKeyRingData adds a secret keyring via its raw byte array\n\tAddSecretKeyRingData(gpgSecretKeyRingData []byte) error\n\t// AddSecretKeyRingDataArray adds secret keyring via its raw byte arrays\n\tAddSecretKeyRingDataArray(gpgSecretKeyRingDataArray [][]byte) error\n\t// AddSecretKeyRingFiles adds secret keyrings given their filenames\n\tAddSecretKeyRingFiles(filenames []string) error\n\t// GetGPGPrivateKey gets the private key bytes of a keyid given a passphrase\n\tGetGPGPrivateKey(keyid uint64) ([]openpgp.Key, []byte)\n}\n\n// gpgVault wraps an array of gpgSecretKeyRing\ntype gpgVault struct {\n\tentityLists []openpgp.EntityList\n\tkeyDataList [][]byte // the raw data original passed in\n}\n\n// NewGPGVault creates an empty GPGVault\nfunc NewGPGVault() GPGVault {\n\treturn &gpgVault{}\n}\n\n// AddSecretKeyRingData adds a secret keyring's to the gpgVault; the raw byte\n// array read from the file must be passed and will be parsed by this function\nfunc (g *gpgVault) AddSecretKeyRingData(gpgSecretKeyRingData []byte) error {\n\t// read the private keys\n\tr := bytes.NewReader(gpgSecretKeyRingData)\n\tentityList, err := openpgp.ReadKeyRing(r)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not read keyring: %w\", err)\n\t}\n\tg.entityLists = append(g.entityLists, entityList)\n\tg.keyDataList = append(g.keyDataList, gpgSecretKeyRingData)\n\treturn nil\n}\n\n// AddSecretKeyRingDataArray adds secret keyrings to the gpgVault; the raw byte\n// arrays read from files must be passed\nfunc (g *gpgVault) AddSecretKeyRingDataArray(gpgSecretKeyRingDataArray [][]byte) error {\n\tfor _, gpgSecretKeyRingData := range gpgSecretKeyRingDataArray {\n\t\tif err := g.AddSecretKeyRingData(gpgSecretKeyRingData); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// AddSecretKeyRingFiles adds the secret key rings given their filenames\nfunc (g *gpgVault) AddSecretKeyRingFiles(filenames []string) error {\n\tfor _, filename := range filenames {\n\t\tgpgSecretKeyRingData, err := os.ReadFile(filename)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = g.AddSecretKeyRingData(gpgSecretKeyRingData)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase\nfunc (g *gpgVault) GetGPGPrivateKey(keyid uint64) ([]openpgp.Key, []byte) {\n\tfor i, el := range g.entityLists {\n\t\tdecKeys := el.KeysByIdUsage(keyid, packet.KeyFlagEncryptCommunications)\n\t\tif len(decKeys) > 0 {\n\t\t\treturn decKeys, g.keyDataList[i]\n\t\t}\n\t}\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/helpers/parse_helpers.go",
    "content": "package helpers\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt\"\n\tencconfig \"github.com/containers/ocicrypt/config\"\n\t\"github.com/containers/ocicrypt/config/pkcs11config\"\n\t\"github.com/containers/ocicrypt/crypto/pkcs11\"\n\tencutils \"github.com/containers/ocicrypt/utils\"\n)\n\n// processRecipientKeys sorts the array of recipients by type. Recipients may be either\n// x509 certificates, public keys, or PGP public keys identified by email address or name\nfunc processRecipientKeys(recipients []string) ([][]byte, [][]byte, [][]byte, [][]byte, [][]byte, [][]byte, error) {\n\tvar (\n\t\tgpgRecipients [][]byte\n\t\tpubkeys       [][]byte\n\t\tx509s         [][]byte\n\t\tpkcs11Pubkeys [][]byte\n\t\tpkcs11Yamls   [][]byte\n\t\tkeyProviders  [][]byte\n\t)\n\n\tfor _, recipient := range recipients {\n\n\t\tidx := strings.Index(recipient, \":\")\n\t\tif idx < 0 {\n\t\t\treturn nil, nil, nil, nil, nil, nil, errors.New(\"Invalid recipient format\")\n\t\t}\n\n\t\tprotocol := recipient[:idx]\n\t\tvalue := recipient[idx+1:]\n\n\t\tswitch protocol {\n\t\tcase \"pgp\":\n\t\t\tgpgRecipients = append(gpgRecipients, []byte(value))\n\n\t\tcase \"jwe\":\n\t\t\ttmp, err := os.ReadFile(value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"Unable to read file: %w\", err)\n\t\t\t}\n\t\t\tif !encutils.IsPublicKey(tmp) {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, errors.New(\"File provided is not a public key\")\n\t\t\t}\n\t\t\tpubkeys = append(pubkeys, tmp)\n\n\t\tcase \"pkcs7\":\n\t\t\ttmp, err := os.ReadFile(value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"Unable to read file: %w\", err)\n\t\t\t}\n\t\t\tif !encutils.IsCertificate(tmp) {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, errors.New(\"File provided is not an x509 cert\")\n\t\t\t}\n\t\t\tx509s = append(x509s, tmp)\n\n\t\tcase \"pkcs11\":\n\t\t\ttmp, err := os.ReadFile(value)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"Unable to read file: %w\", err)\n\t\t\t}\n\t\t\tif encutils.IsPkcs11PublicKey(tmp) {\n\t\t\t\tpkcs11Yamls = append(pkcs11Yamls, tmp)\n\t\t\t} else if encutils.IsPublicKey(tmp) {\n\t\t\t\tpkcs11Pubkeys = append(pkcs11Pubkeys, tmp)\n\t\t\t} else {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, errors.New(\"Provided file is not a public key\")\n\t\t\t}\n\n\t\tcase \"provider\":\n\t\t\tkeyProviders = append(keyProviders, []byte(value))\n\n\t\tdefault:\n\t\t\treturn nil, nil, nil, nil, nil, nil, errors.New(\"Provided protocol not recognized\")\n\t\t}\n\t}\n\treturn gpgRecipients, pubkeys, x509s, pkcs11Pubkeys, pkcs11Yamls, keyProviders, nil\n}\n\n// processx509Certs processes x509 certificate files\nfunc processx509Certs(keys []string) ([][]byte, error) {\n\tvar x509s [][]byte\n\tfor _, key := range keys {\n\t\tfileName := strings.Split(key, \":\")[0]\n\t\tif _, err := os.Stat(fileName); os.IsNotExist(err) {\n\t\t\tcontinue\n\t\t}\n\t\ttmp, err := os.ReadFile(fileName)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Unable to read file: %w\", err)\n\t\t}\n\t\tif !encutils.IsCertificate(tmp) {\n\t\t\tcontinue\n\t\t}\n\t\tx509s = append(x509s, tmp)\n\n\t}\n\treturn x509s, nil\n}\n\n// processPwdString process a password that may be in any of the following formats:\n// - file=<passwordfile>\n// - pass=<password>\n// - fd=<filedescriptor>\n// - <password>\nfunc processPwdString(pwdString string) ([]byte, error) {\n\tif strings.HasPrefix(pwdString, \"file=\") {\n\t\treturn os.ReadFile(pwdString[5:])\n\t} else if strings.HasPrefix(pwdString, \"pass=\") {\n\t\treturn []byte(pwdString[5:]), nil\n\t} else if strings.HasPrefix(pwdString, \"fd=\") {\n\t\tfdStr := pwdString[3:]\n\t\tfd, err := strconv.Atoi(fdStr)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not parse file descriptor %s: %w\", fdStr, err)\n\t\t}\n\t\tf := os.NewFile(uintptr(fd), \"pwdfile\")\n\t\tif f == nil {\n\t\t\treturn nil, fmt.Errorf(\"%s is not a valid file descriptor\", fdStr)\n\t\t}\n\t\tdefer f.Close()\n\t\tpwd := make([]byte, 64)\n\t\tn, err := f.Read(pwd)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not read from file descriptor: %w\", err)\n\t\t}\n\t\treturn pwd[:n], nil\n\t}\n\treturn []byte(pwdString), nil\n}\n\n// processPrivateKeyFiles sorts the different types of private key files; private key files may either be\n// private keys or GPG private key ring files. The private key files may include the password for the\n// private key and take any of the following forms:\n// - <filename>\n// - <filename>:file=<passwordfile>\n// - <filename>:pass=<password>\n// - <filename>:fd=<filedescriptor>\n// - <filename>:<password>\n// - keyprovider:<...>\nfunc processPrivateKeyFiles(keyFilesAndPwds []string) ([][]byte, [][]byte, [][]byte, [][]byte, [][]byte, [][]byte, error) {\n\tvar (\n\t\tgpgSecretKeyRingFiles [][]byte\n\t\tgpgSecretKeyPasswords [][]byte\n\t\tprivkeys              [][]byte\n\t\tprivkeysPasswords     [][]byte\n\t\tpkcs11Yamls           [][]byte\n\t\tkeyProviders          [][]byte\n\t\terr                   error\n\t)\n\t// keys needed for decryption in case of adding a recipient\n\tfor _, keyfileAndPwd := range keyFilesAndPwds {\n\t\tvar password []byte\n\n\t\t// treat \"provider\" protocol separately\n\t\tif strings.HasPrefix(keyfileAndPwd, \"provider:\") {\n\t\t\tkeyProviders = append(keyProviders, []byte(keyfileAndPwd[len(\"provider:\"):]))\n\t\t\tcontinue\n\t\t}\n\t\tparts := strings.Split(keyfileAndPwd, \":\")\n\t\tif len(parts) == 2 {\n\t\t\tpassword, err = processPwdString(parts[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, err\n\t\t\t}\n\t\t}\n\n\t\tkeyfile := parts[0]\n\t\ttmp, err := os.ReadFile(keyfile)\n\t\tif err != nil {\n\t\t\treturn nil, nil, nil, nil, nil, nil, err\n\t\t}\n\t\tisPrivKey, err := encutils.IsPrivateKey(tmp, password)\n\t\tif encutils.IsPasswordError(err) {\n\t\t\treturn nil, nil, nil, nil, nil, nil, err\n\t\t}\n\n\t\tif encutils.IsPkcs11PrivateKey(tmp) {\n\t\t\tpkcs11Yamls = append(pkcs11Yamls, tmp)\n\t\t} else if isPrivKey {\n\t\t\tprivkeys = append(privkeys, tmp)\n\t\t\tprivkeysPasswords = append(privkeysPasswords, password)\n\t\t} else if encutils.IsGPGPrivateKeyRing(tmp) {\n\t\t\tgpgSecretKeyRingFiles = append(gpgSecretKeyRingFiles, tmp)\n\t\t\tgpgSecretKeyPasswords = append(gpgSecretKeyPasswords, password)\n\t\t} else {\n\t\t\t// ignore if file is not recognized, so as not to error if additional\n\t\t\t// metadata/cert files exists\n\t\t\tcontinue\n\t\t}\n\t}\n\treturn gpgSecretKeyRingFiles, gpgSecretKeyPasswords, privkeys, privkeysPasswords, pkcs11Yamls, keyProviders, nil\n}\n\n// CreateDecryptCryptoConfig creates the CryptoConfig object that contains the necessary\n// information to perform decryption from command line options.\nfunc CreateDecryptCryptoConfig(keys []string, decRecipients []string) (encconfig.CryptoConfig, error) {\n\tccs := []encconfig.CryptoConfig{}\n\n\t// x509 cert is needed for PKCS7 decryption\n\t_, _, x509s, _, _, _, err := processRecipientKeys(decRecipients)\n\tif err != nil {\n\t\treturn encconfig.CryptoConfig{}, err\n\t}\n\n\t// x509 certs can also be passed in via keys\n\tx509FromKeys, err := processx509Certs(keys)\n\tif err != nil {\n\t\treturn encconfig.CryptoConfig{}, err\n\t}\n\tx509s = append(x509s, x509FromKeys...)\n\n\tgpgSecretKeyRingFiles, gpgSecretKeyPasswords, privKeys, privKeysPasswords, pkcs11Yamls, keyProviders, err := processPrivateKeyFiles(keys)\n\tif err != nil {\n\t\treturn encconfig.CryptoConfig{}, err\n\t}\n\n\tif len(gpgSecretKeyRingFiles) > 0 {\n\t\tgpgCc, err := encconfig.DecryptWithGpgPrivKeys(gpgSecretKeyRingFiles, gpgSecretKeyPasswords)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tccs = append(ccs, gpgCc)\n\t}\n\n\t/* TODO: Add in GPG client query for secret keys in the future.\n\t_, err = createGPGClient(context)\n\tgpgInstalled := err == nil\n\tif gpgInstalled {\n\t\tif len(gpgSecretKeyRingFiles) == 0 && len(privKeys) == 0 && len(pkcs11Yamls) == 0 && len(keyProviders) == 0 && descs != nil {\n\t\t\t// Get pgp private keys from keyring only if no private key was passed\n\t\t\tgpgPrivKeys, gpgPrivKeyPasswords, err := getGPGPrivateKeys(context, gpgSecretKeyRingFiles, descs, true)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\n\t\t\tgpgCc, err := encconfig.DecryptWithGpgPrivKeys(gpgPrivKeys, gpgPrivKeyPasswords)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tccs = append(ccs, gpgCc)\n\n\t\t} else if len(gpgSecretKeyRingFiles) > 0 {\n\t\t\tgpgCc, err := encconfig.DecryptWithGpgPrivKeys(gpgSecretKeyRingFiles, gpgSecretKeyPasswords)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tccs = append(ccs, gpgCc)\n\n\t\t}\n\t}\n\t*/\n\n\tif len(x509s) > 0 {\n\t\tx509sCc, err := encconfig.DecryptWithX509s(x509s)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tccs = append(ccs, x509sCc)\n\t}\n\tif len(privKeys) > 0 {\n\t\tprivKeysCc, err := encconfig.DecryptWithPrivKeys(privKeys, privKeysPasswords)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tccs = append(ccs, privKeysCc)\n\t}\n\tif len(pkcs11Yamls) > 0 {\n\t\tp11conf, err := pkcs11config.GetUserPkcs11Config()\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tpkcs11PrivKeysCc, err := encconfig.DecryptWithPkcs11Yaml(p11conf, pkcs11Yamls)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tccs = append(ccs, pkcs11PrivKeysCc)\n\t}\n\tif len(keyProviders) > 0 {\n\t\tkeyProviderCc, err := encconfig.DecryptWithKeyProvider(keyProviders)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tccs = append(ccs, keyProviderCc)\n\t}\n\treturn encconfig.CombineCryptoConfigs(ccs), nil\n}\n\n// CreateCryptoConfig from the list of recipient strings and list of key paths of private keys\nfunc CreateCryptoConfig(recipients []string, keys []string) (encconfig.CryptoConfig, error) {\n\tvar decryptCc *encconfig.CryptoConfig\n\tccs := []encconfig.CryptoConfig{}\n\tif len(keys) > 0 {\n\t\tdcc, err := CreateDecryptCryptoConfig(keys, []string{})\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tdecryptCc = &dcc\n\t\tccs = append(ccs, dcc)\n\t}\n\n\tif len(recipients) > 0 {\n\t\tgpgRecipients, pubKeys, x509s, pkcs11Pubkeys, pkcs11Yamls, keyProvider, err := processRecipientKeys(recipients)\n\t\tif err != nil {\n\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t}\n\t\tencryptCcs := []encconfig.CryptoConfig{}\n\n\t\t// Create GPG client with guessed GPG version and default homedir\n\t\tgpgClient, err := ocicrypt.NewGPGClient(\"\", \"\")\n\t\tgpgInstalled := err == nil\n\t\tif len(gpgRecipients) > 0 && gpgInstalled {\n\t\t\tgpgPubRingFile, err := gpgClient.ReadGPGPubRingFile()\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\n\t\t\tgpgCc, err := encconfig.EncryptWithGpg(gpgRecipients, gpgPubRingFile)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tencryptCcs = append(encryptCcs, gpgCc)\n\t\t}\n\n\t\t// Create Encryption Crypto Config\n\t\tif len(x509s) > 0 {\n\t\t\tpkcs7Cc, err := encconfig.EncryptWithPkcs7(x509s)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tencryptCcs = append(encryptCcs, pkcs7Cc)\n\t\t}\n\t\tif len(pubKeys) > 0 {\n\t\t\tjweCc, err := encconfig.EncryptWithJwe(pubKeys)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tencryptCcs = append(encryptCcs, jweCc)\n\t\t}\n\t\tvar p11conf *pkcs11.Pkcs11Config\n\t\tif len(pkcs11Yamls) > 0 || len(pkcs11Pubkeys) > 0 {\n\t\t\tp11conf, err = pkcs11config.GetUserPkcs11Config()\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tpkcs11Cc, err := encconfig.EncryptWithPkcs11(p11conf, pkcs11Pubkeys, pkcs11Yamls)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tencryptCcs = append(encryptCcs, pkcs11Cc)\n\t\t}\n\n\t\tif len(keyProvider) > 0 {\n\t\t\tkeyProviderCc, err := encconfig.EncryptWithKeyProvider(keyProvider)\n\t\t\tif err != nil {\n\t\t\t\treturn encconfig.CryptoConfig{}, err\n\t\t\t}\n\t\t\tencryptCcs = append(encryptCcs, keyProviderCc)\n\t\t}\n\t\tecc := encconfig.CombineCryptoConfigs(encryptCcs)\n\t\tif decryptCc != nil {\n\t\t\tecc.EncryptConfig.AttachDecryptConfig(decryptCc.DecryptConfig)\n\t\t}\n\t\tccs = append(ccs, ecc)\n\t}\n\n\tif len(ccs) > 0 {\n\t\treturn encconfig.CombineCryptoConfigs(ccs), nil\n\t}\n\treturn encconfig.CryptoConfig{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/jwe/keywrapper_jwe.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage jwe\n\nimport (\n\t\"crypto/ecdsa\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/containers/ocicrypt/config\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"github.com/containers/ocicrypt/utils\"\n\t\"github.com/go-jose/go-jose/v4\"\n)\n\ntype jweKeyWrapper struct {\n}\n\nfunc (kw *jweKeyWrapper) GetAnnotationID() string {\n\treturn \"org.opencontainers.image.enc.keys.jwe\"\n}\n\n// NewKeyWrapper returns a new key wrapping interface using jwe\nfunc NewKeyWrapper() keywrap.KeyWrapper {\n\treturn &jweKeyWrapper{}\n}\n\n// WrapKeys wraps the session key for recpients and encrypts the optsData, which\n// describe the symmetric key used for encrypting the layer\nfunc (kw *jweKeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) {\n\tvar joseRecipients []jose.Recipient\n\n\terr := addPubKeys(&joseRecipients, ec.Parameters[\"pubkeys\"])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// no recipients is not an error...\n\tif len(joseRecipients) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tencrypter, err := jose.NewMultiEncrypter(jose.A256GCM, joseRecipients, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"jose.NewMultiEncrypter failed: %w\", err)\n\t}\n\tjwe, err := encrypter.Encrypt(optsData)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"JWE Encrypt failed: %w\", err)\n\t}\n\treturn []byte(jwe.FullSerialize()), nil\n}\n\nfunc (kw *jweKeyWrapper) UnwrapKey(dc *config.DecryptConfig, jweString []byte) ([]byte, error) {\n\t// cf. list of algorithms in func addPubKeys() below\n\tkeyEncryptionAlgorithms := []jose.KeyAlgorithm{jose.RSA_OAEP, jose.RSA_OAEP_256, jose.ECDH_ES_A128KW, jose.ECDH_ES_A192KW, jose.ECDH_ES_A256KW}\n\t// accept all algorithms defined in RFC 7518, section 5.1\n\tcontentEncryption := []jose.ContentEncryption{jose.A128CBC_HS256, jose.A192CBC_HS384, jose.A256CBC_HS512, jose.A128GCM, jose.A192GCM, jose.A256GCM}\n\tjwe, err := jose.ParseEncrypted(string(jweString), keyEncryptionAlgorithms, contentEncryption)\n\tif err != nil {\n\t\treturn nil, errors.New(\"jose.ParseEncrypted failed\")\n\t}\n\n\tprivKeys := kw.GetPrivateKeys(dc.Parameters)\n\tif len(privKeys) == 0 {\n\t\treturn nil, errors.New(\"No private keys found for JWE decryption\")\n\t}\n\tprivKeysPasswords := kw.getPrivateKeysPasswords(dc.Parameters)\n\tif len(privKeysPasswords) != len(privKeys) {\n\t\treturn nil, errors.New(\"Private key password array length must be same as that of private keys\")\n\t}\n\n\tfor idx, privKey := range privKeys {\n\t\tkey, err := utils.ParsePrivateKey(privKey, privKeysPasswords[idx], \"JWE\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t_, _, plain, err := jwe.DecryptMulti(key)\n\t\tif err == nil {\n\t\t\treturn plain, nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"JWE: No suitable private key found for decryption\")\n}\n\nfunc (kw *jweKeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool {\n\treturn len(kw.GetPrivateKeys(dcparameters)) == 0\n}\n\nfunc (kw *jweKeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"privkeys\"]\n}\n\nfunc (kw *jweKeyWrapper) getPrivateKeysPasswords(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"privkeys-passwords\"]\n}\n\nfunc (kw *jweKeyWrapper) GetKeyIdsFromPacket(b64jwes string) ([]uint64, error) {\n\treturn nil, nil\n}\n\nfunc (kw *jweKeyWrapper) GetRecipients(b64jwes string) ([]string, error) {\n\treturn []string{\"[jwe]\"}, nil\n}\n\nfunc addPubKeys(joseRecipients *[]jose.Recipient, pubKeys [][]byte) error {\n\tif len(pubKeys) == 0 {\n\t\treturn nil\n\t}\n\tfor _, pubKey := range pubKeys {\n\t\tkey, err := utils.ParsePublicKey(pubKey, \"JWE\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\talg := jose.RSA_OAEP\n\t\tswitch key := key.(type) {\n\t\tcase *ecdsa.PublicKey:\n\t\t\talg = jose.ECDH_ES_A256KW\n\t\tcase *jose.JSONWebKey:\n\t\t\tif key.Algorithm != \"\" {\n\t\t\t\talg = jose.KeyAlgorithm(key.Algorithm)\n\t\t\t\tswitch alg {\n\t\t\t\t/* accepted algorithms */\n\t\t\t\tcase jose.RSA_OAEP:\n\t\t\t\tcase jose.RSA_OAEP_256:\n\t\t\t\tcase jose.ECDH_ES_A128KW:\n\t\t\t\tcase jose.ECDH_ES_A192KW:\n\t\t\t\tcase jose.ECDH_ES_A256KW:\n\t\t\t\t/* all others are rejected */\n\t\t\t\tdefault:\n\t\t\t\t\treturn fmt.Errorf(\"%s is an unsupported JWE key algorithm\", alg)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t*joseRecipients = append(*joseRecipients, jose.Recipient{\n\t\t\tAlgorithm: alg,\n\t\t\tKey:       key,\n\t\t})\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/keyprovider/keyprovider.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage keyprovider\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/containers/ocicrypt/config\"\n\tkeyproviderconfig \"github.com/containers/ocicrypt/config/keyprovider-config\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"github.com/containers/ocicrypt/utils\"\n\tkeyproviderpb \"github.com/containers/ocicrypt/utils/keyprovider\"\n\tlog \"github.com/sirupsen/logrus\"\n\t\"google.golang.org/grpc\"\n)\n\ntype keyProviderKeyWrapper struct {\n\tprovider string\n\tattrs    keyproviderconfig.KeyProviderAttrs\n}\n\nfunc (kw *keyProviderKeyWrapper) GetAnnotationID() string {\n\treturn \"org.opencontainers.image.enc.keys.provider.\" + kw.provider\n}\n\n// NewKeyWrapper returns a new key wrapping interface using keyprovider\nfunc NewKeyWrapper(p string, a keyproviderconfig.KeyProviderAttrs) keywrap.KeyWrapper {\n\treturn &keyProviderKeyWrapper{provider: p, attrs: a}\n}\n\ntype KeyProviderKeyWrapProtocolOperation string\n\nvar (\n\tOpKeyWrap   KeyProviderKeyWrapProtocolOperation = \"keywrap\"\n\tOpKeyUnwrap KeyProviderKeyWrapProtocolOperation = \"keyunwrap\"\n)\n\n// KeyProviderKeyWrapProtocolInput defines the input to the key provider binary or grpc method.\ntype KeyProviderKeyWrapProtocolInput struct {\n\t// Operation is either \"keywrap\" or \"keyunwrap\"\n\tOperation KeyProviderKeyWrapProtocolOperation `json:\"op\"`\n\t// KeyWrapParams encodes the arguments to key wrap if operation is set to wrap\n\tKeyWrapParams KeyWrapParams `json:\"keywrapparams,omitempty\"`\n\t// KeyUnwrapParams encodes the arguments to key unwrap if operation is set to unwrap\n\tKeyUnwrapParams KeyUnwrapParams `json:\"keyunwrapparams,omitempty\"`\n}\n\n// KeyProviderKeyWrapProtocolOutput defines the output of the key provider binary or grpc method.\ntype KeyProviderKeyWrapProtocolOutput struct {\n\t// KeyWrapResult encodes the results to key wrap if operation is to wrap\n\tKeyWrapResults KeyWrapResults `json:\"keywrapresults,omitempty\"`\n\t// KeyUnwrapResult encodes the result to key unwrap if operation is to unwrap\n\tKeyUnwrapResults KeyUnwrapResults `json:\"keyunwrapresults,omitempty\"`\n}\n\ntype KeyWrapParams struct {\n\tEc       *config.EncryptConfig `json:\"ec\"`\n\tOptsData []byte                `json:\"optsdata\"`\n}\n\ntype KeyUnwrapParams struct {\n\tDc         *config.DecryptConfig `json:\"dc\"`\n\tAnnotation []byte                `json:\"annotation\"`\n}\n\ntype KeyUnwrapResults struct {\n\tOptsData []byte `json:\"optsdata\"`\n}\n\ntype KeyWrapResults struct {\n\tAnnotation []byte `json:\"annotation\"`\n}\n\nvar runner utils.CommandExecuter\n\nfunc init() {\n\trunner = utils.Runner{}\n}\n\n// WrapKeys calls appropriate binary executable/grpc server for wrapping the session key for recipients and gets encrypted optsData, which\n// describe the symmetric key used for encrypting the layer\nfunc (kw *keyProviderKeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) {\n\n\tinput, err := json.Marshal(KeyProviderKeyWrapProtocolInput{\n\t\tOperation: OpKeyWrap,\n\t\tKeyWrapParams: KeyWrapParams{\n\t\t\tEc:       ec,\n\t\t\tOptsData: optsData,\n\t\t},\n\t})\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, ok := ec.Parameters[kw.provider]; ok {\n\t\tif kw.attrs.Command != nil {\n\t\t\tprotocolOuput, err := getProviderCommandOutput(input, kw.attrs.Command)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error while retrieving keyprovider protocol command output: %w\", err)\n\t\t\t}\n\t\t\treturn protocolOuput.KeyWrapResults.Annotation, nil\n\t\t} else if kw.attrs.Grpc != \"\" {\n\t\t\tprotocolOuput, err := getProviderGRPCOutput(input, kw.attrs.Grpc, OpKeyWrap)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error while retrieving keyprovider protocol grpc output: %w\", err)\n\t\t\t}\n\n\t\t\treturn protocolOuput.KeyWrapResults.Annotation, nil\n\t\t}\n\t\treturn nil, errors.New(\"Unsupported keyprovider invocation. Supported invocation methods are grpc and cmd\")\n\t}\n\n\treturn nil, nil\n}\n\n// UnwrapKey calls appropriate binary executable/grpc server for unwrapping the session key based on the protocol given in annotation for recipients and gets decrypted optsData,\n// which describe the symmetric key used for decrypting the layer\nfunc (kw *keyProviderKeyWrapper) UnwrapKey(dc *config.DecryptConfig, jsonString []byte) ([]byte, error) {\n\tinput, err := json.Marshal(KeyProviderKeyWrapProtocolInput{\n\t\tOperation: OpKeyUnwrap,\n\t\tKeyUnwrapParams: KeyUnwrapParams{\n\t\t\tDc:         dc,\n\t\t\tAnnotation: jsonString,\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif kw.attrs.Command != nil {\n\t\tprotocolOuput, err := getProviderCommandOutput(input, kw.attrs.Command)\n\t\tif err != nil {\n\t\t\t// If err is not nil, then ignore it and continue with rest of the given keyproviders\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn protocolOuput.KeyUnwrapResults.OptsData, nil\n\t} else if kw.attrs.Grpc != \"\" {\n\t\tprotocolOuput, err := getProviderGRPCOutput(input, kw.attrs.Grpc, OpKeyUnwrap)\n\t\tif err != nil {\n\t\t\t// If err is not nil, then ignore it and continue with rest of the given keyproviders\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn protocolOuput.KeyUnwrapResults.OptsData, nil\n\t}\n\treturn nil, errors.New(\"Unsupported keyprovider invocation. Supported invocation methods are grpc and cmd\")\n}\n\nfunc getProviderGRPCOutput(input []byte, connString string, operation KeyProviderKeyWrapProtocolOperation) (*KeyProviderKeyWrapProtocolOutput, error) {\n\tvar protocolOuput KeyProviderKeyWrapProtocolOutput\n\tvar grpcOutput *keyproviderpb.KeyProviderKeyWrapProtocolOutput\n\tcc, err := grpc.Dial(connString, grpc.WithInsecure())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error while dialing rpc server: %w\", err)\n\t}\n\tdefer func() {\n\t\tderr := cc.Close()\n\t\tif derr != nil {\n\t\t\tlog.WithError(derr).Error(\"Error closing grpc socket\")\n\t\t}\n\t}()\n\n\tclient := keyproviderpb.NewKeyProviderServiceClient(cc)\n\treq := &keyproviderpb.KeyProviderKeyWrapProtocolInput{\n\t\tKeyProviderKeyWrapProtocolInput: input,\n\t}\n\n\tif operation == OpKeyWrap {\n\t\tgrpcOutput, err = client.WrapKey(context.Background(), req)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error from grpc method: %w\", err)\n\t\t}\n\t} else if operation == OpKeyUnwrap {\n\t\tgrpcOutput, err = client.UnWrapKey(context.Background(), req)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Error from grpc method: %w\", err)\n\t\t}\n\t} else {\n\t\treturn nil, errors.New(\"Unsupported operation\")\n\t}\n\n\trespBytes := grpcOutput.GetKeyProviderKeyWrapProtocolOutput()\n\terr = json.Unmarshal(respBytes, &protocolOuput)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error while unmarshalling grpc method output: %w\", err)\n\t}\n\n\treturn &protocolOuput, nil\n}\n\nfunc getProviderCommandOutput(input []byte, command *keyproviderconfig.Command) (*KeyProviderKeyWrapProtocolOutput, error) {\n\tvar protocolOuput KeyProviderKeyWrapProtocolOutput\n\t// Convert interface to command structure\n\trespBytes, err := runner.Exec(command.Path, command.Args, input)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = json.Unmarshal(respBytes, &protocolOuput)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error while unmarshalling binary executable command output: %w\", err)\n\t}\n\treturn &protocolOuput, nil\n}\n\n// Return false as it is not applicable to keyprovider protocol\nfunc (kw *keyProviderKeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool {\n\treturn false\n}\n\n// Return nil as it is not applicable to keyprovider protocol\nfunc (kw *keyProviderKeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte {\n\treturn nil\n}\n\n// Return nil as it is not applicable to keyprovider protocol\nfunc (kw *keyProviderKeyWrapper) GetKeyIdsFromPacket(_ string) ([]uint64, error) {\n\treturn nil, nil\n}\n\n// Return nil as it is not applicable to keyprovider protocol\nfunc (kw *keyProviderKeyWrapper) GetRecipients(_ string) ([]string, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/keywrap.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage keywrap\n\nimport (\n\t\"github.com/containers/ocicrypt/config\"\n)\n\n// KeyWrapper is the interface used for wrapping keys using\n// a specific encryption technology (pgp, jwe)\ntype KeyWrapper interface {\n\tWrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error)\n\tUnwrapKey(dc *config.DecryptConfig, annotation []byte) ([]byte, error)\n\tGetAnnotationID() string\n\n\t// NoPossibleKeys returns true if there is no possibility of performing\n\t// decryption for parameters provided.\n\tNoPossibleKeys(dcparameters map[string][][]byte) bool\n\n\t// GetPrivateKeys (optional) gets the array of private keys. It is an optional implementation\n\t// as in some key services, a private key may not be exportable (i.e. HSM)\n\t// If not implemented, return nil\n\tGetPrivateKeys(dcparameters map[string][][]byte) [][]byte\n\n\t// GetKeyIdsFromPacket (optional) gets a list of key IDs. This is optional as some encryption\n\t// schemes may not have a notion of key IDs\n\t// If not implemented, return the nil slice\n\tGetKeyIdsFromPacket(packet string) ([]uint64, error)\n\n\t// GetRecipients (optional) gets a list of recipients. It is optional due to the validity of\n\t// recipients in a particular encryptiong scheme\n\t// If not implemented, return the nil slice\n\tGetRecipients(packet string) ([]string, error)\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/pgp/keywrapper_gpg.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pgp\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/rand\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/mail\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt/config\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"golang.org/x/crypto/openpgp\"\n\t\"golang.org/x/crypto/openpgp/packet\"\n)\n\ntype gpgKeyWrapper struct {\n}\n\n// NewKeyWrapper returns a new key wrapping interface for pgp\nfunc NewKeyWrapper() keywrap.KeyWrapper {\n\treturn &gpgKeyWrapper{}\n}\n\nvar (\n\t// GPGDefaultEncryptConfig is the default configuration for layer encryption/decryption\n\tGPGDefaultEncryptConfig = &packet.Config{\n\t\tRand:              rand.Reader,\n\t\tDefaultHash:       crypto.SHA256,\n\t\tDefaultCipher:     packet.CipherAES256,\n\t\tCompressionConfig: &packet.CompressionConfig{Level: 0}, // No compression\n\t\tRSABits:           2048,\n\t}\n)\n\nfunc (kw *gpgKeyWrapper) GetAnnotationID() string {\n\treturn \"org.opencontainers.image.enc.keys.pgp\"\n}\n\n// WrapKeys wraps the session key for recpients and encrypts the optsData, which\n// describe the symmetric key used for encrypting the layer\nfunc (kw *gpgKeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) {\n\tciphertext := new(bytes.Buffer)\n\tel, err := kw.createEntityList(ec)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to create entity list: %w\", err)\n\t}\n\tif len(el) == 0 {\n\t\t// nothing to do -- not an error\n\t\treturn nil, nil\n\t}\n\n\tplaintextWriter, err := openpgp.Encrypt(ciphertext,\n\t\tel,  /*EntityList*/\n\t\tnil, /* Sign*/\n\t\tnil, /* FileHint */\n\t\tGPGDefaultEncryptConfig)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, err = plaintextWriter.Write(optsData); err != nil {\n\t\treturn nil, err\n\t} else if err = plaintextWriter.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn ciphertext.Bytes(), err\n}\n\n// UnwrapKey unwraps the symmetric key with which the layer is encrypted\n// This symmetric key is encrypted in the PGP payload.\nfunc (kw *gpgKeyWrapper) UnwrapKey(dc *config.DecryptConfig, pgpPacket []byte) ([]byte, error) {\n\tpgpPrivateKeys, pgpPrivateKeysPwd, err := kw.getKeyParameters(dc.Parameters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor idx, pgpPrivateKey := range pgpPrivateKeys {\n\t\tr := bytes.NewBuffer(pgpPrivateKey)\n\t\tentityList, err := openpgp.ReadKeyRing(r)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to parse private keys: %w\", err)\n\t\t}\n\n\t\tvar prompt openpgp.PromptFunction\n\t\tif len(pgpPrivateKeysPwd) > idx {\n\t\t\tresponded := false\n\t\t\tprompt = func(keys []openpgp.Key, symmetric bool) ([]byte, error) {\n\t\t\t\tif responded {\n\t\t\t\t\treturn nil, fmt.Errorf(\"don't seem to have the right password\")\n\t\t\t\t}\n\t\t\t\tresponded = true\n\t\t\t\tfor _, key := range keys {\n\t\t\t\t\tif key.PrivateKey != nil {\n\t\t\t\t\t\t_ = key.PrivateKey.Decrypt(pgpPrivateKeysPwd[idx])\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pgpPrivateKeysPwd[idx], nil\n\t\t\t}\n\t\t}\n\n\t\tr = bytes.NewBuffer(pgpPacket)\n\t\tmd, err := openpgp.ReadMessage(r, entityList, prompt, GPGDefaultEncryptConfig)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\t// we get the plain key options back\n\t\toptsData, err := io.ReadAll(md.UnverifiedBody)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn optsData, nil\n\t}\n\treturn nil, errors.New(\"PGP: No suitable key found to unwrap key\")\n}\n\n// GetKeyIdsFromWrappedKeys converts the base64 encoded PGPPacket to uint64 keyIds\nfunc (kw *gpgKeyWrapper) GetKeyIdsFromPacket(b64pgpPackets string) ([]uint64, error) {\n\n\tvar keyids []uint64\n\tfor _, b64pgpPacket := range strings.Split(b64pgpPackets, \",\") {\n\t\tpgpPacket, err := base64.StdEncoding.DecodeString(b64pgpPacket)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not decode base64 encoded PGP packet: %w\", err)\n\t\t}\n\t\tnewids, err := kw.getKeyIDs(pgpPacket)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkeyids = append(keyids, newids...)\n\t}\n\treturn keyids, nil\n}\n\n// getKeyIDs parses a PGPPacket and gets the list of recipients' key IDs\nfunc (kw *gpgKeyWrapper) getKeyIDs(pgpPacket []byte) ([]uint64, error) {\n\tvar keyids []uint64\n\n\tkbuf := bytes.NewBuffer(pgpPacket)\n\tpackets := packet.NewReader(kbuf)\nParsePackets:\n\tfor {\n\t\tp, err := packets.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak ParsePackets\n\t\t}\n\t\tif err != nil {\n\t\t\treturn []uint64{}, fmt.Errorf(\"packets.Next() failed: %w\", err)\n\t\t}\n\t\tswitch p := p.(type) {\n\t\tcase *packet.EncryptedKey:\n\t\t\tkeyids = append(keyids, p.KeyId)\n\t\tcase *packet.SymmetricallyEncrypted:\n\t\t\tbreak ParsePackets\n\t\t}\n\t}\n\treturn keyids, nil\n}\n\n// GetRecipients converts the wrappedKeys to an array of recipients\nfunc (kw *gpgKeyWrapper) GetRecipients(b64pgpPackets string) ([]string, error) {\n\tkeyIds, err := kw.GetKeyIdsFromPacket(b64pgpPackets)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar array []string\n\tfor _, keyid := range keyIds {\n\t\tarray = append(array, \"0x\"+strconv.FormatUint(keyid, 16))\n\t}\n\treturn array, nil\n}\n\nfunc (kw *gpgKeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool {\n\treturn len(kw.GetPrivateKeys(dcparameters)) == 0\n}\n\nfunc (kw *gpgKeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"gpg-privatekeys\"]\n}\n\nfunc (kw *gpgKeyWrapper) getKeyParameters(dcparameters map[string][][]byte) ([][]byte, [][]byte, error) {\n\n\tprivKeys := kw.GetPrivateKeys(dcparameters)\n\tif len(privKeys) == 0 {\n\t\treturn nil, nil, errors.New(\"GPG: Missing private key parameter\")\n\t}\n\n\treturn privKeys, dcparameters[\"gpg-privatekeys-passwords\"], nil\n}\n\n// createEntityList creates the opengpg EntityList by reading the KeyRing\n// first and then filtering out recipients' keys\nfunc (kw *gpgKeyWrapper) createEntityList(ec *config.EncryptConfig) (openpgp.EntityList, error) {\n\tpgpPubringFile := ec.Parameters[\"gpg-pubkeyringfile\"]\n\tif len(pgpPubringFile) == 0 {\n\t\treturn nil, nil\n\t}\n\tr := bytes.NewReader(pgpPubringFile[0])\n\n\tentityList, err := openpgp.ReadKeyRing(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tgpgRecipients := ec.Parameters[\"gpg-recipients\"]\n\tif len(gpgRecipients) == 0 {\n\t\treturn nil, nil\n\t}\n\n\trSet := make(map[string]int)\n\tfor _, r := range gpgRecipients {\n\t\trSet[string(r)] = 0\n\t}\n\n\tvar filteredList openpgp.EntityList\n\tfor _, entity := range entityList {\n\t\tfor k := range entity.Identities {\n\t\t\taddr, err := mail.ParseAddress(k)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tfor _, r := range gpgRecipients {\n\t\t\t\trecp := string(r)\n\t\t\t\tif strings.Compare(addr.Name, recp) == 0 || strings.Compare(addr.Address, recp) == 0 {\n\t\t\t\t\tfilteredList = append(filteredList, entity)\n\t\t\t\t\trSet[recp] = rSet[recp] + 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// make sure we found keys for all the Recipients...\n\tvar buffer bytes.Buffer\n\tnotFound := false\n\tbuffer.WriteString(\"PGP: No key found for the following recipients: \")\n\n\tfor k, v := range rSet {\n\t\tif v == 0 {\n\t\t\tif notFound {\n\t\t\t\tbuffer.WriteString(\", \")\n\t\t\t}\n\t\t\tbuffer.WriteString(k)\n\t\t\tnotFound = true\n\t\t}\n\t}\n\n\tif notFound {\n\t\treturn nil, errors.New(buffer.String())\n\t}\n\n\treturn filteredList, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/pkcs11/keywrapper_pkcs11.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/containers/ocicrypt/config\"\n\t\"github.com/containers/ocicrypt/crypto/pkcs11\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"github.com/containers/ocicrypt/utils\"\n)\n\ntype pkcs11KeyWrapper struct {\n}\n\nfunc (kw *pkcs11KeyWrapper) GetAnnotationID() string {\n\treturn \"org.opencontainers.image.enc.keys.pkcs11\"\n}\n\n// NewKeyWrapper returns a new key wrapping interface using pkcs11\nfunc NewKeyWrapper() keywrap.KeyWrapper {\n\treturn &pkcs11KeyWrapper{}\n}\n\n// WrapKeys wraps the session key for recpients and encrypts the optsData, which\n// describe the symmetric key used for encrypting the layer\nfunc (kw *pkcs11KeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) {\n\t// append({}, ...) allocates a fresh backing array, and that's necessary to guarantee concurrent calls to WrapKeys (as in c/image/copy.Image)\n\t// can't race writing to the same backing array.\n\tpubKeys := append([][]byte{}, ec.Parameters[\"pkcs11-pubkeys\"]...) // In Go 1.21, slices.Clone(ec.Parameters[\"pkcs11-pubkeys\"])\n\tpubKeys = append(pubKeys, ec.Parameters[\"pkcs11-yamls\"]...)\n\tpkcs11Recipients, err := addPubKeys(&ec.DecryptConfig, pubKeys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// no recipients is not an error...\n\tif len(pkcs11Recipients) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tjsonString, err := pkcs11.EncryptMultiple(pkcs11Recipients, optsData)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"PKCS11 EncryptMulitple failed: %w\", err)\n\t}\n\treturn jsonString, nil\n}\n\nfunc (kw *pkcs11KeyWrapper) UnwrapKey(dc *config.DecryptConfig, jsonString []byte) ([]byte, error) {\n\tvar pkcs11PrivKeys []*pkcs11.Pkcs11KeyFileObject\n\n\tprivKeys := kw.GetPrivateKeys(dc.Parameters)\n\tif len(privKeys) == 0 {\n\t\treturn nil, errors.New(\"No private keys found for PKCS11 decryption\")\n\t}\n\n\tp11conf, err := p11confFromParameters(dc.Parameters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, privKey := range privKeys {\n\t\tkey, err := utils.ParsePrivateKey(privKey, nil, \"PKCS11\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch pkcs11PrivKey := key.(type) {\n\t\tcase *pkcs11.Pkcs11KeyFileObject:\n\t\t\tif p11conf != nil {\n\t\t\t\tpkcs11PrivKey.Uri.SetModuleDirectories(p11conf.ModuleDirectories)\n\t\t\t\tpkcs11PrivKey.Uri.SetAllowedModulePaths(p11conf.AllowedModulePaths)\n\t\t\t}\n\t\t\tpkcs11PrivKeys = append(pkcs11PrivKeys, pkcs11PrivKey)\n\t\tdefault:\n\t\t\tcontinue\n\t\t}\n\t}\n\n\tplaintext, err := pkcs11.Decrypt(pkcs11PrivKeys, jsonString)\n\tif err == nil {\n\t\treturn plaintext, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"PKCS11: No suitable private key found for decryption: %w\", err)\n}\n\nfunc (kw *pkcs11KeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool {\n\treturn len(kw.GetPrivateKeys(dcparameters)) == 0\n}\n\nfunc (kw *pkcs11KeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"pkcs11-yamls\"]\n}\n\nfunc (kw *pkcs11KeyWrapper) GetKeyIdsFromPacket(_ string) ([]uint64, error) {\n\treturn nil, nil\n}\n\nfunc (kw *pkcs11KeyWrapper) GetRecipients(_ string) ([]string, error) {\n\treturn []string{\"[pkcs11]\"}, nil\n}\n\nfunc addPubKeys(dc *config.DecryptConfig, pubKeys [][]byte) ([]interface{}, error) {\n\tvar pkcs11Keys []interface{}\n\n\tif len(pubKeys) == 0 {\n\t\treturn pkcs11Keys, nil\n\t}\n\n\tp11conf, err := p11confFromParameters(dc.Parameters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, pubKey := range pubKeys {\n\t\tkey, err := utils.ParsePublicKey(pubKey, \"PKCS11\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch pkcs11PubKey := key.(type) {\n\t\tcase *pkcs11.Pkcs11KeyFileObject:\n\t\t\tif p11conf != nil {\n\t\t\t\tpkcs11PubKey.Uri.SetModuleDirectories(p11conf.ModuleDirectories)\n\t\t\t\tpkcs11PubKey.Uri.SetAllowedModulePaths(p11conf.AllowedModulePaths)\n\t\t\t}\n\t\t}\n\t\tpkcs11Keys = append(pkcs11Keys, key)\n\t}\n\treturn pkcs11Keys, nil\n}\n\nfunc p11confFromParameters(dcparameters map[string][][]byte) (*pkcs11.Pkcs11Config, error) {\n\tif _, ok := dcparameters[\"pkcs11-config\"]; ok {\n\t\treturn pkcs11.ParsePkcs11ConfigFile(dcparameters[\"pkcs11-config\"][0])\n\t}\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/keywrap/pkcs7/keywrapper_pkcs7.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs7\n\nimport (\n\t\"crypto\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/containers/ocicrypt/config\"\n\t\"github.com/containers/ocicrypt/keywrap\"\n\t\"github.com/containers/ocicrypt/utils\"\n\t\"github.com/smallstep/pkcs7\"\n)\n\ntype pkcs7KeyWrapper struct {\n}\n\n// NewKeyWrapper returns a new key wrapping interface using jwe\nfunc NewKeyWrapper() keywrap.KeyWrapper {\n\treturn &pkcs7KeyWrapper{}\n}\n\nfunc (kw *pkcs7KeyWrapper) GetAnnotationID() string {\n\treturn \"org.opencontainers.image.enc.keys.pkcs7\"\n}\n\n// WrapKeys wraps the session key for recpients and encrypts the optsData, which\n// describe the symmetric key used for encrypting the layer\nfunc (kw *pkcs7KeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) {\n\tx509Certs, err := collectX509s(ec.Parameters[\"x509s\"])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// no recipients is not an error...\n\tif len(x509Certs) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tpkcs7.ContentEncryptionAlgorithm = pkcs7.EncryptionAlgorithmAES128GCM\n\treturn pkcs7.Encrypt(optsData, x509Certs)\n}\n\nfunc collectX509s(x509s [][]byte) ([]*x509.Certificate, error) {\n\tif len(x509s) == 0 {\n\t\treturn nil, nil\n\t}\n\tvar x509Certs []*x509.Certificate\n\tfor _, x509 := range x509s {\n\t\tx509Cert, err := utils.ParseCertificate(x509, \"PKCS7\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tx509Certs = append(x509Certs, x509Cert)\n\t}\n\treturn x509Certs, nil\n}\n\nfunc (kw *pkcs7KeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool {\n\treturn len(kw.GetPrivateKeys(dcparameters)) == 0\n}\n\nfunc (kw *pkcs7KeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"privkeys\"]\n}\n\nfunc (kw *pkcs7KeyWrapper) getPrivateKeysPasswords(dcparameters map[string][][]byte) [][]byte {\n\treturn dcparameters[\"privkeys-passwords\"]\n}\n\n// UnwrapKey unwraps the symmetric key with which the layer is encrypted\n// This symmetric key is encrypted in the PKCS7 payload.\nfunc (kw *pkcs7KeyWrapper) UnwrapKey(dc *config.DecryptConfig, pkcs7Packet []byte) ([]byte, error) {\n\tprivKeys := kw.GetPrivateKeys(dc.Parameters)\n\tif len(privKeys) == 0 {\n\t\treturn nil, errors.New(\"no private keys found for PKCS7 decryption\")\n\t}\n\tprivKeysPasswords := kw.getPrivateKeysPasswords(dc.Parameters)\n\tif len(privKeysPasswords) != len(privKeys) {\n\t\treturn nil, errors.New(\"private key password array length must be same as that of private keys\")\n\t}\n\n\tx509Certs, err := collectX509s(dc.Parameters[\"x509s\"])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(x509Certs) == 0 {\n\t\treturn nil, errors.New(\"no x509 certificates found needed for PKCS7 decryption\")\n\t}\n\n\tp7, err := pkcs7.Parse(pkcs7Packet)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not parse PKCS7 packet: %w\", err)\n\t}\n\n\tfor idx, privKey := range privKeys {\n\t\tkey, err := utils.ParsePrivateKey(privKey, privKeysPasswords[idx], \"PKCS7\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, x509Cert := range x509Certs {\n\t\t\toptsData, err := p7.Decrypt(x509Cert, crypto.PrivateKey(key))\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn optsData, nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"PKCS7: No suitable private key found for decryption\")\n}\n\n// GetKeyIdsFromWrappedKeys converts the base64 encoded Packet to uint64 keyIds;\n// We cannot do this with pkcs7\nfunc (kw *pkcs7KeyWrapper) GetKeyIdsFromPacket(b64pkcs7Packets string) ([]uint64, error) {\n\treturn nil, nil\n}\n\n// GetRecipients converts the wrappedKeys to an array of recipients\n// We cannot do this with pkcs7\nfunc (kw *pkcs7KeyWrapper) GetRecipients(b64pkcs7Packets string) ([]string, error) {\n\treturn []string{\"[pkcs7]\"}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/reader.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage ocicrypt\n\nimport (\n\t\"io\"\n)\n\ntype readerAtReader struct {\n\tr   io.ReaderAt\n\toff int64\n}\n\n// ReaderFromReaderAt takes an io.ReaderAt and returns an io.Reader\nfunc ReaderFromReaderAt(r io.ReaderAt) io.Reader {\n\treturn &readerAtReader{\n\t\tr:   r,\n\t\toff: 0,\n\t}\n}\n\nfunc (rar *readerAtReader) Read(p []byte) (n int, err error) {\n\tn, err = rar.r.ReadAt(p, rar.off)\n\trar.off += int64(n)\n\treturn n, err\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/spec/spec.go",
    "content": "package spec\n\nconst (\n\t// MediaTypeLayerEnc is MIME type used for encrypted layers.\n\tMediaTypeLayerEnc = \"application/vnd.oci.image.layer.v1.tar+encrypted\"\n\t// MediaTypeLayerGzipEnc is MIME type used for encrypted gzip-compressed layers.\n\tMediaTypeLayerGzipEnc = \"application/vnd.oci.image.layer.v1.tar+gzip+encrypted\"\n\t// MediaTypeLayerZstdEnc is MIME type used for encrypted zstd-compressed layers.\n\tMediaTypeLayerZstdEnc = \"application/vnd.oci.image.layer.v1.tar+zstd+encrypted\"\n\t// MediaTypeLayerNonDistributableEnc is MIME type used for non distributable encrypted layers.\n\tMediaTypeLayerNonDistributableEnc = \"application/vnd.oci.image.layer.nondistributable.v1.tar+encrypted\"\n\t// MediaTypeLayerNonDistributableGzipEnc is MIME type used for non distributable encrypted gzip-compressed layers.\n\tMediaTypeLayerNonDistributableGzipEnc = \"application/vnd.oci.image.layer.nondistributable.v1.tar+gzip+encrypted\"\n\t// MediaTypeLayerNonDistributableZstdEnc is MIME type used for non distributable encrypted zstd-compressed layers.\n\tMediaTypeLayerNonDistributableZstdEnc = \"application/vnd.oci.image.layer.nondistributable.v1.tar+zstd+encrypted\"\n\t// MediaTypeLayerNonDistributableZsdtEnc is MIME type used for non distributable encrypted zstd-compressed layers.\n\t//\n\t// Deprecated: Use [MediaTypeLayerNonDistributableZstdEnc].\n\tMediaTypeLayerNonDistributableZsdtEnc = MediaTypeLayerNonDistributableZstdEnc\n)\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/delayedreader.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage utils\n\nimport (\n\t\"io\"\n)\n\nfunc min(a, b int) int {\n\tif a < b {\n\t\treturn a\n\t}\n\treturn b\n}\n\n// DelayedReader wraps a io.Reader and allows a client to use the Reader\n// interface. The DelayedReader holds back some buffer to the client\n// so that it can report any error that occurred on the Reader it wraps\n// early to the client while it may still have held some data back.\ntype DelayedReader struct {\n\treader   io.Reader // Reader to Read() bytes from and delay them\n\terr      error     // error that occurred on the reader\n\tbuffer   []byte    // delay buffer\n\tbufbytes int       // number of bytes in the delay buffer to give to Read(); on '0' we return 'EOF' to caller\n\tbufoff   int       // offset in the delay buffer to give to Read()\n}\n\n// NewDelayedReader wraps a io.Reader and allocates a delay buffer of bufsize bytes\nfunc NewDelayedReader(reader io.Reader, bufsize uint) io.Reader {\n\treturn &DelayedReader{\n\t\treader: reader,\n\t\tbuffer: make([]byte, bufsize),\n\t}\n}\n\n// Read implements the io.Reader interface\nfunc (dr *DelayedReader) Read(p []byte) (int, error) {\n\tif dr.err != nil && dr.err != io.EOF {\n\t\treturn 0, dr.err\n\t}\n\n\t// if we are completely drained, return io.EOF\n\tif dr.err == io.EOF && dr.bufbytes == 0 {\n\t\treturn 0, io.EOF\n\t}\n\n\t// only at the beginning we fill our delay buffer in an extra step\n\tif dr.bufbytes < len(dr.buffer) && dr.err == nil {\n\t\tdr.bufbytes, dr.err = FillBuffer(dr.reader, dr.buffer)\n\t\tif dr.err != nil && dr.err != io.EOF {\n\t\t\treturn 0, dr.err\n\t\t}\n\t}\n\t// dr.err != nil means we have EOF and can drain the delay buffer\n\t// otherwise we need to still read from the reader\n\n\tvar tmpbuf []byte\n\ttmpbufbytes := 0\n\tif dr.err == nil {\n\t\ttmpbuf = make([]byte, len(p))\n\t\ttmpbufbytes, dr.err = FillBuffer(dr.reader, tmpbuf)\n\t\tif dr.err != nil && dr.err != io.EOF {\n\t\t\treturn 0, dr.err\n\t\t}\n\t}\n\n\t// copy out of the delay buffer into 'p'\n\ttocopy1 := min(len(p), dr.bufbytes)\n\tc1 := copy(p[:tocopy1], dr.buffer[dr.bufoff:])\n\tdr.bufoff += c1\n\tdr.bufbytes -= c1\n\n\tc2 := 0\n\t// can p still hold more data?\n\tif c1 < len(p) {\n\t\t// copy out of the tmpbuf into 'p'\n\t\tc2 = copy(p[tocopy1:], tmpbuf[:tmpbufbytes])\n\t}\n\n\t// if tmpbuf holds data we need to hold onto, copy them\n\t// into the delay buffer\n\tif tmpbufbytes-c2 > 0 {\n\t\t// left-shift the delay buffer and append the tmpbuf's remaining data\n\t\tdr.buffer = dr.buffer[dr.bufoff : dr.bufoff+dr.bufbytes]\n\t\tdr.buffer = append(dr.buffer, tmpbuf[c2:tmpbufbytes]...)\n\t\tdr.bufoff = 0\n\t\tdr.bufbytes = len(dr.buffer)\n\t}\n\n\tvar err error\n\tif dr.bufbytes == 0 {\n\t\terr = io.EOF\n\t}\n\treturn c1 + c2, err\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/ioutils.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os/exec\"\n)\n\n// FillBuffer fills the given buffer with as many bytes from the reader as possible. It returns\n// EOF if an EOF was encountered or any other error.\nfunc FillBuffer(reader io.Reader, buffer []byte) (int, error) {\n\tn, err := io.ReadFull(reader, buffer)\n\tif err == io.ErrUnexpectedEOF {\n\t\treturn n, io.EOF\n\t}\n\treturn n, err\n}\n\n// first argument is the command, like cat or echo,\n// the second is the list of args to pass to it\ntype CommandExecuter interface {\n\tExec(string, []string, []byte) ([]byte, error)\n}\n\ntype Runner struct{}\n\n// ExecuteCommand is used to execute a linux command line command and return the output of the command with an error if it exists.\nfunc (r Runner) Exec(cmdName string, args []string, input []byte) ([]byte, error) {\n\tvar out bytes.Buffer\n\tvar stderr bytes.Buffer\n\tstdInputBuffer := bytes.NewBuffer(input)\n\tcmd := exec.Command(cmdName, args...)\n\tcmd.Stdin = stdInputBuffer\n\tcmd.Stdout = &out\n\tcmd.Stderr = &stderr\n\terr := cmd.Run()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error while running command: %s. stderr: %s: %w\", cmdName, stderr.String(), err)\n\t}\n\treturn out.Bytes(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/keyprovider/keyprovider.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: keyprovider.proto\n\npackage keyprovider\n\nimport (\n\tcontext \"context\"\n\tfmt \"fmt\"\n\tproto \"github.com/golang/protobuf/proto\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n\tmath \"math\"\n)\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package\n\ntype KeyProviderKeyWrapProtocolInput struct {\n\tKeyProviderKeyWrapProtocolInput []byte   `protobuf:\"bytes,1,opt,name=KeyProviderKeyWrapProtocolInput,proto3\" json:\"KeyProviderKeyWrapProtocolInput,omitempty\"`\n\tXXX_NoUnkeyedLiteral            struct{} `json:\"-\"`\n\tXXX_unrecognized                []byte   `json:\"-\"`\n\tXXX_sizecache                   int32    `json:\"-\"`\n}\n\nfunc (m *KeyProviderKeyWrapProtocolInput) Reset()         { *m = KeyProviderKeyWrapProtocolInput{} }\nfunc (m *KeyProviderKeyWrapProtocolInput) String() string { return proto.CompactTextString(m) }\nfunc (*KeyProviderKeyWrapProtocolInput) ProtoMessage()    {}\nfunc (*KeyProviderKeyWrapProtocolInput) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_da74c8e785ad390c, []int{0}\n}\n\nfunc (m *KeyProviderKeyWrapProtocolInput) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolInput.Unmarshal(m, b)\n}\nfunc (m *KeyProviderKeyWrapProtocolInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolInput.Marshal(b, m, deterministic)\n}\nfunc (m *KeyProviderKeyWrapProtocolInput) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_KeyProviderKeyWrapProtocolInput.Merge(m, src)\n}\nfunc (m *KeyProviderKeyWrapProtocolInput) XXX_Size() int {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolInput.Size(m)\n}\nfunc (m *KeyProviderKeyWrapProtocolInput) XXX_DiscardUnknown() {\n\txxx_messageInfo_KeyProviderKeyWrapProtocolInput.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_KeyProviderKeyWrapProtocolInput proto.InternalMessageInfo\n\nfunc (m *KeyProviderKeyWrapProtocolInput) GetKeyProviderKeyWrapProtocolInput() []byte {\n\tif m != nil {\n\t\treturn m.KeyProviderKeyWrapProtocolInput\n\t}\n\treturn nil\n}\n\ntype KeyProviderKeyWrapProtocolOutput struct {\n\tKeyProviderKeyWrapProtocolOutput []byte   `protobuf:\"bytes,1,opt,name=KeyProviderKeyWrapProtocolOutput,proto3\" json:\"KeyProviderKeyWrapProtocolOutput,omitempty\"`\n\tXXX_NoUnkeyedLiteral             struct{} `json:\"-\"`\n\tXXX_unrecognized                 []byte   `json:\"-\"`\n\tXXX_sizecache                    int32    `json:\"-\"`\n}\n\nfunc (m *KeyProviderKeyWrapProtocolOutput) Reset()         { *m = KeyProviderKeyWrapProtocolOutput{} }\nfunc (m *KeyProviderKeyWrapProtocolOutput) String() string { return proto.CompactTextString(m) }\nfunc (*KeyProviderKeyWrapProtocolOutput) ProtoMessage()    {}\nfunc (*KeyProviderKeyWrapProtocolOutput) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_da74c8e785ad390c, []int{1}\n}\n\nfunc (m *KeyProviderKeyWrapProtocolOutput) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolOutput.Unmarshal(m, b)\n}\nfunc (m *KeyProviderKeyWrapProtocolOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolOutput.Marshal(b, m, deterministic)\n}\nfunc (m *KeyProviderKeyWrapProtocolOutput) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_KeyProviderKeyWrapProtocolOutput.Merge(m, src)\n}\nfunc (m *KeyProviderKeyWrapProtocolOutput) XXX_Size() int {\n\treturn xxx_messageInfo_KeyProviderKeyWrapProtocolOutput.Size(m)\n}\nfunc (m *KeyProviderKeyWrapProtocolOutput) XXX_DiscardUnknown() {\n\txxx_messageInfo_KeyProviderKeyWrapProtocolOutput.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_KeyProviderKeyWrapProtocolOutput proto.InternalMessageInfo\n\nfunc (m *KeyProviderKeyWrapProtocolOutput) GetKeyProviderKeyWrapProtocolOutput() []byte {\n\tif m != nil {\n\t\treturn m.KeyProviderKeyWrapProtocolOutput\n\t}\n\treturn nil\n}\n\nfunc init() {\n\tproto.RegisterType((*KeyProviderKeyWrapProtocolInput)(nil), \"keyprovider.keyProviderKeyWrapProtocolInput\")\n\tproto.RegisterType((*KeyProviderKeyWrapProtocolOutput)(nil), \"keyprovider.keyProviderKeyWrapProtocolOutput\")\n}\n\nfunc init() {\n\tproto.RegisterFile(\"keyprovider.proto\", fileDescriptor_da74c8e785ad390c)\n}\n\nvar fileDescriptor_da74c8e785ad390c = []byte{\n\t// 169 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0x4e, 0xad, 0x2c,\n\t0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x03, 0x32, 0x4a, 0xf2, 0x85, 0xb8, 0x91, 0x84,\n\t0x94, 0xb2, 0xb9, 0xe4, 0x81, 0xdc, 0x00, 0x28, 0xd7, 0x3b, 0xb5, 0x32, 0xbc, 0x28, 0xb1, 0x20,\n\t0x00, 0xa4, 0x2e, 0x39, 0x3f, 0xc7, 0x33, 0xaf, 0xa0, 0xb4, 0x44, 0xc8, 0x83, 0x4b, 0xde, 0x1b,\n\t0xbf, 0x12, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x9e, 0x20, 0x42, 0xca, 0x94, 0xf2, 0xb8, 0x14, 0x70,\n\t0x5b, 0xe6, 0x5f, 0x5a, 0x02, 0xb2, 0xcd, 0x8b, 0x4b, 0xc1, 0x9b, 0x80, 0x1a, 0xa8, 0x75, 0x04,\n\t0xd5, 0x19, 0xbd, 0x62, 0xe4, 0x12, 0x42, 0x52, 0x14, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c, 0x2a,\n\t0x94, 0xc1, 0xc5, 0x0e, 0x52, 0x0c, 0x94, 0x11, 0xd2, 0xd1, 0x43, 0x0e, 0x1f, 0x02, 0x21, 0x21,\n\t0xa5, 0x4b, 0xa4, 0x6a, 0x88, 0xf5, 0x4a, 0x0c, 0x42, 0x59, 0x5c, 0x9c, 0xa1, 0x79, 0xf4, 0xb1,\n\t0xcb, 0x89, 0x37, 0x0a, 0x39, 0x62, 0x93, 0xd8, 0xc0, 0x91, 0x6d, 0x0c, 0x08, 0x00, 0x00, 0xff,\n\t0xff, 0x9a, 0x10, 0xcb, 0xf9, 0x01, 0x02, 0x00, 0x00,\n}\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ context.Context\nvar _ grpc.ClientConnInterface\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\nconst _ = grpc.SupportPackageIsVersion6\n\n// KeyProviderServiceClient is the client API for KeyProviderService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.\ntype KeyProviderServiceClient interface {\n\tWrapKey(ctx context.Context, in *KeyProviderKeyWrapProtocolInput, opts ...grpc.CallOption) (*KeyProviderKeyWrapProtocolOutput, error)\n\tUnWrapKey(ctx context.Context, in *KeyProviderKeyWrapProtocolInput, opts ...grpc.CallOption) (*KeyProviderKeyWrapProtocolOutput, error)\n}\n\ntype keyProviderServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewKeyProviderServiceClient(cc grpc.ClientConnInterface) KeyProviderServiceClient {\n\treturn &keyProviderServiceClient{cc}\n}\n\nfunc (c *keyProviderServiceClient) WrapKey(ctx context.Context, in *KeyProviderKeyWrapProtocolInput, opts ...grpc.CallOption) (*KeyProviderKeyWrapProtocolOutput, error) {\n\tout := new(KeyProviderKeyWrapProtocolOutput)\n\terr := c.cc.Invoke(ctx, \"/keyprovider.KeyProviderService/WrapKey\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *keyProviderServiceClient) UnWrapKey(ctx context.Context, in *KeyProviderKeyWrapProtocolInput, opts ...grpc.CallOption) (*KeyProviderKeyWrapProtocolOutput, error) {\n\tout := new(KeyProviderKeyWrapProtocolOutput)\n\terr := c.cc.Invoke(ctx, \"/keyprovider.KeyProviderService/UnWrapKey\", in, out, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// KeyProviderServiceServer is the server API for KeyProviderService service.\ntype KeyProviderServiceServer interface {\n\tWrapKey(context.Context, *KeyProviderKeyWrapProtocolInput) (*KeyProviderKeyWrapProtocolOutput, error)\n\tUnWrapKey(context.Context, *KeyProviderKeyWrapProtocolInput) (*KeyProviderKeyWrapProtocolOutput, error)\n}\n\n// UnimplementedKeyProviderServiceServer can be embedded to have forward compatible implementations.\ntype UnimplementedKeyProviderServiceServer struct {\n}\n\nfunc (*UnimplementedKeyProviderServiceServer) WrapKey(ctx context.Context, req *KeyProviderKeyWrapProtocolInput) (*KeyProviderKeyWrapProtocolOutput, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method WrapKey not implemented\")\n}\nfunc (*UnimplementedKeyProviderServiceServer) UnWrapKey(ctx context.Context, req *KeyProviderKeyWrapProtocolInput) (*KeyProviderKeyWrapProtocolOutput, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UnWrapKey not implemented\")\n}\n\nfunc RegisterKeyProviderServiceServer(s *grpc.Server, srv KeyProviderServiceServer) {\n\ts.RegisterService(&_KeyProviderService_serviceDesc, srv)\n}\n\nfunc _KeyProviderService_WrapKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(KeyProviderKeyWrapProtocolInput)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(KeyProviderServiceServer).WrapKey(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/keyprovider.KeyProviderService/WrapKey\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(KeyProviderServiceServer).WrapKey(ctx, req.(*KeyProviderKeyWrapProtocolInput))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _KeyProviderService_UnWrapKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(KeyProviderKeyWrapProtocolInput)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(KeyProviderServiceServer).UnWrapKey(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: \"/keyprovider.KeyProviderService/UnWrapKey\",\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(KeyProviderServiceServer).UnWrapKey(ctx, req.(*KeyProviderKeyWrapProtocolInput))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nvar _KeyProviderService_serviceDesc = grpc.ServiceDesc{\n\tServiceName: \"keyprovider.KeyProviderService\",\n\tHandlerType: (*KeyProviderServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"WrapKey\",\n\t\t\tHandler:    _KeyProviderService_WrapKey_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UnWrapKey\",\n\t\t\tHandler:    _KeyProviderService_UnWrapKey_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"keyprovider.proto\",\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/keyprovider/keyprovider.proto",
    "content": "syntax = \"proto3\";\n\npackage keyprovider;\noption go_package = \"keyprovider\";\n\nmessage keyProviderKeyWrapProtocolInput {\n    bytes KeyProviderKeyWrapProtocolInput = 1;\n}\n\nmessage keyProviderKeyWrapProtocolOutput {\n    bytes KeyProviderKeyWrapProtocolOutput = 1;\n}\n\nservice KeyProviderService {\n    rpc WrapKey(keyProviderKeyWrapProtocolInput) returns (keyProviderKeyWrapProtocolOutput) {};\n    rpc UnWrapKey(keyProviderKeyWrapProtocolInput) returns (keyProviderKeyWrapProtocolOutput) {};\n}"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/testing.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage utils\n\nimport (\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"time\"\n)\n\n// CreateRSAKey creates an RSA key\nfunc CreateRSAKey(bits int) (*rsa.PrivateKey, error) {\n\tkey, err := rsa.GenerateKey(rand.Reader, bits)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"rsa.GenerateKey failed: %w\", err)\n\t}\n\treturn key, nil\n}\n\n// CreateECDSAKey creates an elliptic curve key for the given curve\nfunc CreateECDSAKey(curve elliptic.Curve) (*ecdsa.PrivateKey, error) {\n\tkey, err := ecdsa.GenerateKey(curve, rand.Reader)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"ecdsa.GenerateKey failed: %w\", err)\n\t}\n\treturn key, nil\n}\n\n// CreateRSATestKey creates an RSA key of the given size and returns\n// the public and private key in PEM or DER format\nfunc CreateRSATestKey(bits int, password []byte, pemencode bool) ([]byte, []byte, error) {\n\tkey, err := CreateRSAKey(bits)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tpubData, err := x509.MarshalPKIXPublicKey(&key.PublicKey)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"x509.MarshalPKIXPublicKey failed: %w\", err)\n\t}\n\tprivData := x509.MarshalPKCS1PrivateKey(key)\n\n\t// no more encoding needed for DER\n\tif !pemencode {\n\t\treturn pubData, privData, nil\n\t}\n\n\tpublicKey := pem.EncodeToMemory(&pem.Block{\n\t\tType:  \"PUBLIC KEY\",\n\t\tBytes: pubData,\n\t})\n\n\tvar block *pem.Block\n\n\ttyp := \"RSA PRIVATE KEY\"\n\tif len(password) > 0 {\n\t\tblock, err = x509.EncryptPEMBlock(rand.Reader, typ, privData, password, x509.PEMCipherAES256) //nolint:staticcheck // ignore SA1019, which is kept for backward compatibility\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"x509.EncryptPEMBlock failed: %w\", err)\n\t\t}\n\t} else {\n\t\tblock = &pem.Block{\n\t\t\tType:  typ,\n\t\t\tBytes: privData,\n\t\t}\n\t}\n\n\tprivateKey := pem.EncodeToMemory(block)\n\n\treturn publicKey, privateKey, nil\n}\n\n// CreateECDSATestKey creates and elliptic curve key for the given curve and returns\n// the public and private key in DER format\nfunc CreateECDSATestKey(curve elliptic.Curve) ([]byte, []byte, error) {\n\tkey, err := CreateECDSAKey(curve)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tpubData, err := x509.MarshalPKIXPublicKey(&key.PublicKey)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"x509.MarshalPKIXPublicKey failed: %w\", err)\n\t}\n\n\tprivData, err := x509.MarshalECPrivateKey(key)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"x509.MarshalECPrivateKey failed: %w\", err)\n\t}\n\n\treturn pubData, privData, nil\n}\n\n// CreateTestCA creates a root CA for testing\nfunc CreateTestCA() (*rsa.PrivateKey, *x509.Certificate, error) {\n\tkey, err := rsa.GenerateKey(rand.Reader, 2048)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"rsa.GenerateKey failed: %w\", err)\n\t}\n\n\tca := &x509.Certificate{\n\t\tSerialNumber: big.NewInt(1),\n\t\tSubject: pkix.Name{\n\t\t\tCommonName: \"test-ca\",\n\t\t},\n\t\tNotBefore:             time.Now(),\n\t\tNotAfter:              time.Now().AddDate(1, 0, 0),\n\t\tIsCA:                  true,\n\t\tKeyUsage:              x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,\n\t\tBasicConstraintsValid: true,\n\t}\n\tcaCert, err := certifyKey(&key.PublicKey, ca, key, ca)\n\n\treturn key, caCert, err\n}\n\n// CertifyKey certifies a public key using the given CA's private key and cert;\n// The certificate template for the public key is optional\nfunc CertifyKey(pubbytes []byte, template *x509.Certificate, caKey *rsa.PrivateKey, caCert *x509.Certificate) (*x509.Certificate, error) {\n\tpubKey, err := ParsePublicKey(pubbytes, \"CertifyKey\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn certifyKey(pubKey, template, caKey, caCert)\n}\n\nfunc certifyKey(pub interface{}, template *x509.Certificate, caKey *rsa.PrivateKey, caCert *x509.Certificate) (*x509.Certificate, error) {\n\tif template == nil {\n\t\ttemplate = &x509.Certificate{\n\t\t\tSerialNumber: big.NewInt(1),\n\t\t\tSubject: pkix.Name{\n\t\t\t\tCommonName: \"testkey\",\n\t\t\t},\n\t\t\tNotBefore:             time.Now(),\n\t\t\tNotAfter:              time.Now().Add(time.Hour),\n\t\t\tIsCA:                  false,\n\t\t\tKeyUsage:              x509.KeyUsageDigitalSignature,\n\t\t\tBasicConstraintsValid: true,\n\t\t}\n\t}\n\n\tcertDER, err := x509.CreateCertificate(rand.Reader, template, caCert, pub, caKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"x509.CreateCertificate failed: %w\", err)\n\t}\n\n\tcert, err := x509.ParseCertificate(certDER)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"x509.ParseCertificate failed: %w\", err)\n\t}\n\n\treturn cert, nil\n}\n"
  },
  {
    "path": "vendor/github.com/containers/ocicrypt/utils/utils.go",
    "content": "/*\n   Copyright The ocicrypt Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"crypto/x509\"\n\t\"encoding/base64\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt/crypto/pkcs11\"\n\t\"github.com/go-jose/go-jose/v4\"\n\t\"golang.org/x/crypto/openpgp\"\n)\n\n// parseJWKPrivateKey parses the input byte array as a JWK and makes sure it's a private key\nfunc parseJWKPrivateKey(privKey []byte, prefix string) (interface{}, error) {\n\tjwk := jose.JSONWebKey{}\n\terr := jwk.UnmarshalJSON(privKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: Could not parse input as JWK: %w\", prefix, err)\n\t}\n\tif jwk.IsPublic() {\n\t\treturn nil, fmt.Errorf(\"%s: JWK is not a private key\", prefix)\n\t}\n\treturn &jwk, nil\n}\n\n// parseJWKPublicKey parses the input byte array as a JWK\nfunc parseJWKPublicKey(privKey []byte, prefix string) (interface{}, error) {\n\tjwk := jose.JSONWebKey{}\n\terr := jwk.UnmarshalJSON(privKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: Could not parse input as JWK: %w\", prefix, err)\n\t}\n\tif !jwk.IsPublic() {\n\t\treturn nil, fmt.Errorf(\"%s: JWK is not a public key\", prefix)\n\t}\n\treturn &jwk, nil\n}\n\n// parsePkcs11PrivateKeyYaml parses the input byte array as pkcs11 key file yaml format)\nfunc parsePkcs11PrivateKeyYaml(yaml []byte, prefix string) (*pkcs11.Pkcs11KeyFileObject, error) {\n\t// if the URI does not have enough attributes, we will throw an error when decrypting\n\treturn pkcs11.ParsePkcs11KeyFile(yaml)\n}\n\n// parsePkcs11URIPublicKey parses the input byte array as a pkcs11 key file yaml\nfunc parsePkcs11PublicKeyYaml(yaml []byte, prefix string) (*pkcs11.Pkcs11KeyFileObject, error) {\n\t// if the URI does not have enough attributes, we will throw an error when decrypting\n\treturn pkcs11.ParsePkcs11KeyFile(yaml)\n}\n\n// IsPasswordError checks whether an error is related to a missing or wrong\n// password\nfunc IsPasswordError(err error) bool {\n\tif err == nil {\n\t\treturn false\n\t}\n\tmsg := strings.ToLower(err.Error())\n\n\treturn strings.Contains(msg, \"password\") &&\n\t\t(strings.Contains(msg, \"missing\") || strings.Contains(msg, \"wrong\"))\n}\n\n// ParsePrivateKey tries to parse a private key in DER format first and\n// PEM format after, returning an error if the parsing failed\nfunc ParsePrivateKey(privKey, privKeyPassword []byte, prefix string) (interface{}, error) {\n\tkey, err := x509.ParsePKCS8PrivateKey(privKey)\n\tif err != nil {\n\t\tkey, err = x509.ParsePKCS1PrivateKey(privKey)\n\t\tif err != nil {\n\t\t\tkey, err = x509.ParseECPrivateKey(privKey)\n\t\t}\n\t}\n\tif err != nil {\n\t\tblock, _ := pem.Decode(privKey)\n\t\tif block != nil {\n\t\t\tvar der []byte\n\t\t\tif x509.IsEncryptedPEMBlock(block) { //nolint:staticcheck // ignore SA1019, which is kept for backward compatibility\n\t\t\t\tif privKeyPassword == nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"%s: Missing password for encrypted private key\", prefix)\n\t\t\t\t}\n\t\t\t\tder, err = x509.DecryptPEMBlock(block, privKeyPassword) //nolint:staticcheck // ignore SA1019, which is kept for backward compatibility\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"%s: Wrong password: could not decrypt private key\", prefix)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tder = block.Bytes\n\t\t\t}\n\n\t\t\tkey, err = x509.ParsePKCS8PrivateKey(der)\n\t\t\tif err != nil {\n\t\t\t\tkey, err = x509.ParsePKCS1PrivateKey(der)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"%s: Could not parse private key: %w\", prefix, err)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tkey, err = parseJWKPrivateKey(privKey, prefix)\n\t\t\tif err != nil {\n\t\t\t\tkey, err = parsePkcs11PrivateKeyYaml(privKey, prefix)\n\t\t\t}\n\t\t}\n\t}\n\treturn key, err\n}\n\n// IsPrivateKey returns true in case the given byte array represents a private key\n// It returns an error if for example the password is wrong\nfunc IsPrivateKey(data []byte, password []byte) (bool, error) {\n\t_, err := ParsePrivateKey(data, password, \"\")\n\treturn err == nil, err\n}\n\n// IsPkcs11PrivateKey returns true in case the given byte array represents a pkcs11 private key\nfunc IsPkcs11PrivateKey(data []byte) bool {\n\treturn pkcs11.IsPkcs11PrivateKey(data)\n}\n\n// ParsePublicKey tries to parse a public key in DER format first and\n// PEM format after, returning an error if the parsing failed\nfunc ParsePublicKey(pubKey []byte, prefix string) (interface{}, error) {\n\tkey, err := x509.ParsePKIXPublicKey(pubKey)\n\tif err != nil {\n\t\tblock, _ := pem.Decode(pubKey)\n\t\tif block != nil {\n\t\t\tkey, err = x509.ParsePKIXPublicKey(block.Bytes)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"%s: Could not parse public key: %w\", prefix, err)\n\t\t\t}\n\t\t} else {\n\t\t\tkey, err = parseJWKPublicKey(pubKey, prefix)\n\t\t\tif err != nil {\n\t\t\t\tkey, err = parsePkcs11PublicKeyYaml(pubKey, prefix)\n\t\t\t}\n\t\t}\n\t}\n\treturn key, err\n}\n\n// IsPublicKey returns true in case the given byte array represents a public key\nfunc IsPublicKey(data []byte) bool {\n\t_, err := ParsePublicKey(data, \"\")\n\treturn err == nil\n}\n\n// IsPkcs11PublicKey returns true in case the given byte array represents a pkcs11 public key\nfunc IsPkcs11PublicKey(data []byte) bool {\n\treturn pkcs11.IsPkcs11PublicKey(data)\n}\n\n// ParseCertificate tries to parse a public key in DER format first and\n// PEM format after, returning an error if the parsing failed\nfunc ParseCertificate(certBytes []byte, prefix string) (*x509.Certificate, error) {\n\tx509Cert, err := x509.ParseCertificate(certBytes)\n\tif err != nil {\n\t\tblock, _ := pem.Decode(certBytes)\n\t\tif block == nil {\n\t\t\treturn nil, fmt.Errorf(\"%s: Could not PEM decode x509 certificate\", prefix)\n\t\t}\n\t\tx509Cert, err = x509.ParseCertificate(block.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%s: Could not parse x509 certificate: %w\", prefix, err)\n\t\t}\n\t}\n\treturn x509Cert, err\n}\n\n// IsCertificate returns true in case the given byte array represents an x.509 certificate\nfunc IsCertificate(data []byte) bool {\n\t_, err := ParseCertificate(data, \"\")\n\treturn err == nil\n}\n\n// IsGPGPrivateKeyRing returns true in case the given byte array represents a GPG private key ring file\nfunc IsGPGPrivateKeyRing(data []byte) bool {\n\tr := bytes.NewBuffer(data)\n\t_, err := openpgp.ReadKeyRing(r)\n\treturn err == nil\n}\n\n// SortDecryptionKeys parses a list of comma separated base64 entries and sorts the data into\n// a map. Each entry in the list may be either a GPG private key ring, private key, or x.509\n// certificate\nfunc SortDecryptionKeys(b64ItemList string) (map[string][][]byte, error) {\n\tdcparameters := make(map[string][][]byte)\n\n\tfor _, b64Item := range strings.Split(b64ItemList, \",\") {\n\t\tvar password []byte\n\t\tb64Data := strings.Split(b64Item, \":\")\n\t\tkeyData, err := base64.StdEncoding.DecodeString(b64Data[0])\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"Could not base64 decode a passed decryption key\")\n\t\t}\n\t\tif len(b64Data) == 2 {\n\t\t\tpassword, err = base64.StdEncoding.DecodeString(b64Data[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.New(\"Could not base64 decode a passed decryption key password\")\n\t\t\t}\n\t\t}\n\t\tvar key string\n\t\tisPrivKey, err := IsPrivateKey(keyData, password)\n\t\tif IsPasswordError(err) {\n\t\t\treturn nil, err\n\t\t}\n\t\tif isPrivKey {\n\t\t\tkey = \"privkeys\"\n\t\t\tif _, ok := dcparameters[\"privkeys-passwords\"]; !ok {\n\t\t\t\tdcparameters[\"privkeys-passwords\"] = [][]byte{password}\n\t\t\t} else {\n\t\t\t\tdcparameters[\"privkeys-passwords\"] = append(dcparameters[\"privkeys-passwords\"], password)\n\t\t\t}\n\t\t} else if IsCertificate(keyData) {\n\t\t\tkey = \"x509s\"\n\t\t} else if IsGPGPrivateKeyRing(keyData) {\n\t\t\tkey = \"gpg-privatekeys\"\n\t\t}\n\t\tif key != \"\" {\n\t\t\tvalues := dcparameters[key]\n\t\t\tif values == nil {\n\t\t\t\tdcparameters[key] = [][]byte{keyData}\n\t\t\t} else {\n\t\t\t\tdcparameters[key] = append(dcparameters[key], keyData)\n\t\t\t}\n\t\t} else {\n\t\t\treturn nil, errors.New(\"Unknown decryption key type\")\n\t\t}\n\t}\n\n\treturn dcparameters, nil\n}\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/LICENSE",
    "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\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/NOTICE",
    "content": "CoreOS Project\nCopyright 2014 CoreOS, Inc\n\nThis product includes software developed at CoreOS, Inc.\n(http://www.coreos.com/).\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/oidc/jose.go",
    "content": "package oidc\n\nimport jose \"github.com/go-jose/go-jose/v4\"\n\n// JOSE asymmetric signing algorithm values as defined by RFC 7518\n//\n// see: https://tools.ietf.org/html/rfc7518#section-3.1\nconst (\n\tRS256 = \"RS256\" // RSASSA-PKCS-v1.5 using SHA-256\n\tRS384 = \"RS384\" // RSASSA-PKCS-v1.5 using SHA-384\n\tRS512 = \"RS512\" // RSASSA-PKCS-v1.5 using SHA-512\n\tES256 = \"ES256\" // ECDSA using P-256 and SHA-256\n\tES384 = \"ES384\" // ECDSA using P-384 and SHA-384\n\tES512 = \"ES512\" // ECDSA using P-521 and SHA-512\n\tPS256 = \"PS256\" // RSASSA-PSS using SHA256 and MGF1-SHA256\n\tPS384 = \"PS384\" // RSASSA-PSS using SHA384 and MGF1-SHA384\n\tPS512 = \"PS512\" // RSASSA-PSS using SHA512 and MGF1-SHA512\n\tEdDSA = \"EdDSA\" // Ed25519 using SHA-512\n)\n\nvar allAlgs = []jose.SignatureAlgorithm{\n\tjose.RS256,\n\tjose.RS384,\n\tjose.RS512,\n\tjose.ES256,\n\tjose.ES384,\n\tjose.ES512,\n\tjose.PS256,\n\tjose.PS384,\n\tjose.PS512,\n\tjose.EdDSA,\n}\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/oidc/jwks.go",
    "content": "package oidc\n\nimport (\n\t\"context\"\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"sync\"\n\n\tjose \"github.com/go-jose/go-jose/v4\"\n)\n\n// StaticKeySet is a verifier that validates JWT against a static set of public keys.\ntype StaticKeySet struct {\n\t// PublicKeys used to verify the JWT. Supported types are *rsa.PublicKey and\n\t// *ecdsa.PublicKey.\n\tPublicKeys []crypto.PublicKey\n}\n\n// VerifySignature compares the signature against a static set of public keys.\nfunc (s *StaticKeySet) VerifySignature(ctx context.Context, jwt string) ([]byte, error) {\n\t// Algorithms are already checked by Verifier, so this parse method accepts\n\t// any algorithm.\n\tjws, err := jose.ParseSigned(jwt, allAlgs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing jwt: %v\", err)\n\t}\n\tfor _, pub := range s.PublicKeys {\n\t\tswitch pub.(type) {\n\t\tcase *rsa.PublicKey:\n\t\tcase *ecdsa.PublicKey:\n\t\tcase ed25519.PublicKey:\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"invalid public key type provided: %T\", pub)\n\t\t}\n\t\tpayload, err := jws.Verify(pub)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn payload, nil\n\t}\n\treturn nil, fmt.Errorf(\"no public keys able to verify jwt\")\n}\n\n// NewRemoteKeySet returns a KeySet that can validate JSON web tokens by using HTTP\n// GETs to fetch JSON web token sets hosted at a remote URL. This is automatically\n// used by NewProvider using the URLs returned by OpenID Connect discovery, but is\n// exposed for providers that don't support discovery or to prevent round trips to the\n// discovery URL.\n//\n// The returned KeySet is a long lived verifier that caches keys based on any\n// keys change. Reuse a common remote key set instead of creating new ones as needed.\nfunc NewRemoteKeySet(ctx context.Context, jwksURL string) *RemoteKeySet {\n\treturn newRemoteKeySet(ctx, jwksURL)\n}\n\nfunc newRemoteKeySet(ctx context.Context, jwksURL string) *RemoteKeySet {\n\treturn &RemoteKeySet{\n\t\tjwksURL: jwksURL,\n\t\t// For historical reasons, this package uses contexts for configuration, not just\n\t\t// cancellation. In hindsight, this was a bad idea.\n\t\t//\n\t\t// Attemps to reason about how cancels should work with background requests have\n\t\t// largely lead to confusion. Use the context here as a config bag-of-values and\n\t\t// ignore the cancel function.\n\t\tctx: context.WithoutCancel(ctx),\n\t}\n}\n\n// RemoteKeySet is a KeySet implementation that validates JSON web tokens against\n// a jwks_uri endpoint.\ntype RemoteKeySet struct {\n\tjwksURL string\n\n\t// Used for configuration. Cancelation is ignored.\n\tctx context.Context\n\n\t// guard all other fields\n\tmu sync.RWMutex\n\n\t// inflight suppresses parallel execution of updateKeys and allows\n\t// multiple goroutines to wait for its result.\n\tinflight *inflight\n\n\t// A set of cached keys.\n\tcachedKeys []jose.JSONWebKey\n}\n\n// inflight is used to wait on some in-flight request from multiple goroutines.\ntype inflight struct {\n\tdoneCh chan struct{}\n\n\tkeys []jose.JSONWebKey\n\terr  error\n}\n\nfunc newInflight() *inflight {\n\treturn &inflight{doneCh: make(chan struct{})}\n}\n\n// wait returns a channel that multiple goroutines can receive on. Once it returns\n// a value, the inflight request is done and result() can be inspected.\nfunc (i *inflight) wait() <-chan struct{} {\n\treturn i.doneCh\n}\n\n// done can only be called by a single goroutine. It records the result of the\n// inflight request and signals other goroutines that the result is safe to\n// inspect.\nfunc (i *inflight) done(keys []jose.JSONWebKey, err error) {\n\ti.keys = keys\n\ti.err = err\n\tclose(i.doneCh)\n}\n\n// result cannot be called until the wait() channel has returned a value.\nfunc (i *inflight) result() ([]jose.JSONWebKey, error) {\n\treturn i.keys, i.err\n}\n\n// paresdJWTKey is a context key that allows common setups to avoid parsing the\n// JWT twice. It holds a *jose.JSONWebSignature value.\nvar parsedJWTKey contextKey\n\n// VerifySignature validates a payload against a signature from the jwks_uri.\n//\n// Users MUST NOT call this method directly and should use an IDTokenVerifier\n// instead. This method skips critical validations such as 'alg' values and is\n// only exported to implement the KeySet interface.\nfunc (r *RemoteKeySet) VerifySignature(ctx context.Context, jwt string) ([]byte, error) {\n\tjws, ok := ctx.Value(parsedJWTKey).(*jose.JSONWebSignature)\n\tif !ok {\n\t\t// The algorithm values are already enforced by the Validator, which also sets\n\t\t// the context value above to pre-parsed signature.\n\t\t//\n\t\t// Practically, this codepath isn't called in normal use of this package, but\n\t\t// if it is, the algorithms have already been checked.\n\t\tvar err error\n\t\tjws, err = jose.ParseSigned(jwt, allAlgs)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"oidc: malformed jwt: %v\", err)\n\t\t}\n\t}\n\treturn r.verify(ctx, jws)\n}\n\nfunc (r *RemoteKeySet) verify(ctx context.Context, jws *jose.JSONWebSignature) ([]byte, error) {\n\t// We don't support JWTs signed with multiple signatures.\n\tkeyID := \"\"\n\tfor _, sig := range jws.Signatures {\n\t\tkeyID = sig.Header.KeyID\n\t\tbreak\n\t}\n\n\tkeys := r.keysFromCache()\n\tfor _, key := range keys {\n\t\tif keyID == \"\" || key.KeyID == keyID {\n\t\t\tif payload, err := jws.Verify(&key); err == nil {\n\t\t\t\treturn payload, nil\n\t\t\t}\n\t\t}\n\t}\n\n\t// If the kid doesn't match, check for new keys from the remote. This is the\n\t// strategy recommended by the spec.\n\t//\n\t// https://openid.net/specs/openid-connect-core-1_0.html#RotateSigKeys\n\tkeys, err := r.keysFromRemote(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fetching keys %w\", err)\n\t}\n\n\tfor _, key := range keys {\n\t\tif keyID == \"\" || key.KeyID == keyID {\n\t\t\tif payload, err := jws.Verify(&key); err == nil {\n\t\t\t\treturn payload, nil\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, errors.New(\"failed to verify id token signature\")\n}\n\nfunc (r *RemoteKeySet) keysFromCache() (keys []jose.JSONWebKey) {\n\tr.mu.RLock()\n\tdefer r.mu.RUnlock()\n\treturn r.cachedKeys\n}\n\n// keysFromRemote syncs the key set from the remote set, records the values in the\n// cache, and returns the key set.\nfunc (r *RemoteKeySet) keysFromRemote(ctx context.Context) ([]jose.JSONWebKey, error) {\n\t// Need to lock to inspect the inflight request field.\n\tr.mu.Lock()\n\t// If there's not a current inflight request, create one.\n\tif r.inflight == nil {\n\t\tr.inflight = newInflight()\n\n\t\t// This goroutine has exclusive ownership over the current inflight\n\t\t// request. It releases the resource by nil'ing the inflight field\n\t\t// once the goroutine is done.\n\t\tgo func() {\n\t\t\t// Sync keys and finish inflight when that's done.\n\t\t\tkeys, err := r.updateKeys()\n\n\t\t\tr.inflight.done(keys, err)\n\n\t\t\t// Lock to update the keys and indicate that there is no longer an\n\t\t\t// inflight request.\n\t\t\tr.mu.Lock()\n\t\t\tdefer r.mu.Unlock()\n\n\t\t\tif err == nil {\n\t\t\t\tr.cachedKeys = keys\n\t\t\t}\n\n\t\t\t// Free inflight so a different request can run.\n\t\t\tr.inflight = nil\n\t\t}()\n\t}\n\tinflight := r.inflight\n\tr.mu.Unlock()\n\n\tselect {\n\tcase <-ctx.Done():\n\t\treturn nil, ctx.Err()\n\tcase <-inflight.wait():\n\t\treturn inflight.result()\n\t}\n}\n\nfunc (r *RemoteKeySet) updateKeys() ([]jose.JSONWebKey, error) {\n\treq, err := http.NewRequest(\"GET\", r.jwksURL, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: can't create request: %v\", err)\n\t}\n\n\tresp, err := doRequest(r.ctx, req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: get keys failed %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to read response body: %v\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"oidc: get keys failed: %s %s\", resp.Status, body)\n\t}\n\n\tvar keySet jose.JSONWebKeySet\n\terr = unmarshalResp(resp, body, &keySet)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: failed to decode keys: %v %s\", err, body)\n\t}\n\treturn keySet.Keys, nil\n}\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/oidc/oidc.go",
    "content": "// Package oidc implements OpenID Connect client logic for the golang.org/x/oauth2 package.\npackage oidc\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"mime\"\n\t\"net/http\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"golang.org/x/oauth2\"\n)\n\nconst (\n\t// ScopeOpenID is the mandatory scope for all OpenID Connect OAuth2 requests.\n\tScopeOpenID = \"openid\"\n\n\t// ScopeOfflineAccess is an optional scope defined by OpenID Connect for requesting\n\t// OAuth2 refresh tokens.\n\t//\n\t// Support for this scope differs between OpenID Connect providers. For instance\n\t// Google rejects it, favoring appending \"access_type=offline\" as part of the\n\t// authorization request instead.\n\t//\n\t// See: https://openid.net/specs/openid-connect-core-1_0.html#OfflineAccess\n\tScopeOfflineAccess = \"offline_access\"\n)\n\nvar (\n\terrNoAtHash      = errors.New(\"id token did not have an access token hash\")\n\terrInvalidAtHash = errors.New(\"access token hash does not match value in ID token\")\n)\n\ntype contextKey int\n\nvar issuerURLKey contextKey\n\n// ClientContext returns a new Context that carries the provided HTTP client.\n//\n// This method sets the same context key used by the golang.org/x/oauth2 package,\n// so the returned context works for that package too.\n//\n//\tmyClient := &http.Client{}\n//\tctx := oidc.ClientContext(parentContext, myClient)\n//\n//\t// This will use the custom client\n//\tprovider, err := oidc.NewProvider(ctx, \"https://accounts.example.com\")\nfunc ClientContext(ctx context.Context, client *http.Client) context.Context {\n\treturn context.WithValue(ctx, oauth2.HTTPClient, client)\n}\n\nfunc getClient(ctx context.Context) *http.Client {\n\tif c, ok := ctx.Value(oauth2.HTTPClient).(*http.Client); ok {\n\t\treturn c\n\t}\n\treturn nil\n}\n\n// InsecureIssuerURLContext allows discovery to work when the issuer_url reported\n// by upstream is mismatched with the discovery URL. This is meant for integration\n// with off-spec providers such as Azure.\n//\n//\tdiscoveryBaseURL := \"https://login.microsoftonline.com/organizations/v2.0\"\n//\tissuerURL := \"https://login.microsoftonline.com/my-tenantid/v2.0\"\n//\n//\tctx := oidc.InsecureIssuerURLContext(parentContext, issuerURL)\n//\n//\t// Provider will be discovered with the discoveryBaseURL, but use issuerURL\n//\t// for future issuer validation.\n//\tprovider, err := oidc.NewProvider(ctx, discoveryBaseURL)\n//\n// This is insecure because validating the correct issuer is critical for multi-tenant\n// providers. Any overrides here MUST be carefully reviewed.\nfunc InsecureIssuerURLContext(ctx context.Context, issuerURL string) context.Context {\n\treturn context.WithValue(ctx, issuerURLKey, issuerURL)\n}\n\nfunc doRequest(ctx context.Context, req *http.Request) (*http.Response, error) {\n\tclient := http.DefaultClient\n\tif c := getClient(ctx); c != nil {\n\t\tclient = c\n\t}\n\treturn client.Do(req.WithContext(ctx))\n}\n\n// Provider represents an OpenID Connect server's configuration.\ntype Provider struct {\n\tissuer        string\n\tauthURL       string\n\ttokenURL      string\n\tdeviceAuthURL string\n\tuserInfoURL   string\n\tjwksURL       string\n\talgorithms    []string\n\n\t// Raw claims returned by the server.\n\trawClaims []byte\n\n\t// Guards all of the following fields.\n\tmu sync.Mutex\n\t// HTTP client specified from the initial NewProvider request. This is used\n\t// when creating the common key set.\n\tclient *http.Client\n\t// A key set that uses context.Background() and is shared between all code paths\n\t// that don't have a convinent way of supplying a unique context.\n\tcommonRemoteKeySet KeySet\n}\n\nfunc (p *Provider) remoteKeySet() KeySet {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.commonRemoteKeySet == nil {\n\t\tctx := context.Background()\n\t\tif p.client != nil {\n\t\t\tctx = ClientContext(ctx, p.client)\n\t\t}\n\t\tp.commonRemoteKeySet = NewRemoteKeySet(ctx, p.jwksURL)\n\t}\n\treturn p.commonRemoteKeySet\n}\n\ntype providerJSON struct {\n\tIssuer        string   `json:\"issuer\"`\n\tAuthURL       string   `json:\"authorization_endpoint\"`\n\tTokenURL      string   `json:\"token_endpoint\"`\n\tDeviceAuthURL string   `json:\"device_authorization_endpoint\"`\n\tJWKSURL       string   `json:\"jwks_uri\"`\n\tUserInfoURL   string   `json:\"userinfo_endpoint\"`\n\tAlgorithms    []string `json:\"id_token_signing_alg_values_supported\"`\n}\n\n// supportedAlgorithms is a list of algorithms explicitly supported by this\n// package. If a provider supports other algorithms, such as HS256 or none,\n// those values won't be passed to the IDTokenVerifier.\nvar supportedAlgorithms = map[string]bool{\n\tRS256: true,\n\tRS384: true,\n\tRS512: true,\n\tES256: true,\n\tES384: true,\n\tES512: true,\n\tPS256: true,\n\tPS384: true,\n\tPS512: true,\n\tEdDSA: true,\n}\n\n// ProviderConfig allows direct creation of a [Provider] from metadata\n// configuration. This is intended for interop with providers that don't support\n// discovery, or host the JSON discovery document at an off-spec path.\n//\n// The ProviderConfig struct specifies JSON struct tags to support document\n// parsing.\n//\n//\t// Directly fetch the metadata document.\n//\tresp, err := http.Get(\"https://login.example.com/custom-metadata-path\")\n//\tif err != nil {\n//\t\t// ...\n//\t}\n//\tdefer resp.Body.Close()\n//\n//\t// Parse config from JSON metadata.\n//\tconfig := &oidc.ProviderConfig{}\n//\tif err := json.NewDecoder(resp.Body).Decode(config); err != nil {\n//\t\t// ...\n//\t}\n//\tp := config.NewProvider(context.Background())\n//\n// For providers that implement discovery, use [NewProvider] instead.\n//\n// See: https://openid.net/specs/openid-connect-discovery-1_0.html\ntype ProviderConfig struct {\n\t// IssuerURL is the identity of the provider, and the string it uses to sign\n\t// ID tokens with. For example \"https://accounts.google.com\". This value MUST\n\t// match ID tokens exactly.\n\tIssuerURL string `json:\"issuer\"`\n\t// AuthURL is the endpoint used by the provider to support the OAuth 2.0\n\t// authorization endpoint.\n\tAuthURL string `json:\"authorization_endpoint\"`\n\t// TokenURL is the endpoint used by the provider to support the OAuth 2.0\n\t// token endpoint.\n\tTokenURL string `json:\"token_endpoint\"`\n\t// DeviceAuthURL is the endpoint used by the provider to support the OAuth 2.0\n\t// device authorization endpoint.\n\tDeviceAuthURL string `json:\"device_authorization_endpoint\"`\n\t// UserInfoURL is the endpoint used by the provider to support the OpenID\n\t// Connect UserInfo flow.\n\t//\n\t// https://openid.net/specs/openid-connect-core-1_0.html#UserInfo\n\tUserInfoURL string `json:\"userinfo_endpoint\"`\n\t// JWKSURL is the endpoint used by the provider to advertise public keys to\n\t// verify issued ID tokens. This endpoint is polled as new keys are made\n\t// available.\n\tJWKSURL string `json:\"jwks_uri\"`\n\n\t// Algorithms, if provided, indicate a list of JWT algorithms allowed to sign\n\t// ID tokens. If not provided, this defaults to the algorithms advertised by\n\t// the JWK endpoint, then the set of algorithms supported by this package.\n\tAlgorithms []string `json:\"id_token_signing_alg_values_supported\"`\n}\n\n// NewProvider initializes a provider from a set of endpoints, rather than\n// through discovery.\n//\n// The provided context is only used for [http.Client] configuration through\n// [ClientContext], not cancelation.\nfunc (p *ProviderConfig) NewProvider(ctx context.Context) *Provider {\n\treturn &Provider{\n\t\tissuer:        p.IssuerURL,\n\t\tauthURL:       p.AuthURL,\n\t\ttokenURL:      p.TokenURL,\n\t\tdeviceAuthURL: p.DeviceAuthURL,\n\t\tuserInfoURL:   p.UserInfoURL,\n\t\tjwksURL:       p.JWKSURL,\n\t\talgorithms:    p.Algorithms,\n\t\tclient:        getClient(ctx),\n\t}\n}\n\n// NewProvider uses the OpenID Connect discovery mechanism to construct a Provider.\n// The issuer is the URL identifier for the service. For example: \"https://accounts.google.com\"\n// or \"https://login.salesforce.com\".\n//\n// OpenID Connect providers that don't implement discovery or host the discovery\n// document at a non-spec complaint path (such as requiring a URL parameter),\n// should use [ProviderConfig] instead.\n//\n// See: https://openid.net/specs/openid-connect-discovery-1_0.html\nfunc NewProvider(ctx context.Context, issuer string) (*Provider, error) {\n\twellKnown := strings.TrimSuffix(issuer, \"/\") + \"/.well-known/openid-configuration\"\n\treq, err := http.NewRequest(\"GET\", wellKnown, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, err := doRequest(ctx, req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to read response body: %v\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"%s: %s\", resp.Status, body)\n\t}\n\n\tvar p providerJSON\n\terr = unmarshalResp(resp, body, &p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: failed to decode provider discovery object: %v\", err)\n\t}\n\n\tissuerURL, skipIssuerValidation := ctx.Value(issuerURLKey).(string)\n\tif !skipIssuerValidation {\n\t\tissuerURL = issuer\n\t}\n\tif p.Issuer != issuerURL && !skipIssuerValidation {\n\t\treturn nil, fmt.Errorf(\"oidc: issuer URL provided to client (%q) did not match the issuer URL returned by provider (%q)\", issuer, p.Issuer)\n\t}\n\tvar algs []string\n\tfor _, a := range p.Algorithms {\n\t\tif supportedAlgorithms[a] {\n\t\t\talgs = append(algs, a)\n\t\t}\n\t}\n\treturn &Provider{\n\t\tissuer:        issuerURL,\n\t\tauthURL:       p.AuthURL,\n\t\ttokenURL:      p.TokenURL,\n\t\tdeviceAuthURL: p.DeviceAuthURL,\n\t\tuserInfoURL:   p.UserInfoURL,\n\t\tjwksURL:       p.JWKSURL,\n\t\talgorithms:    algs,\n\t\trawClaims:     body,\n\t\tclient:        getClient(ctx),\n\t}, nil\n}\n\n// Claims unmarshals raw fields returned by the server during discovery.\n//\n//\tvar claims struct {\n//\t    ScopesSupported []string `json:\"scopes_supported\"`\n//\t    ClaimsSupported []string `json:\"claims_supported\"`\n//\t}\n//\n//\tif err := provider.Claims(&claims); err != nil {\n//\t    // handle unmarshaling error\n//\t}\n//\n// For a list of fields defined by the OpenID Connect spec see:\n// https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata\nfunc (p *Provider) Claims(v interface{}) error {\n\tif p.rawClaims == nil {\n\t\treturn errors.New(\"oidc: claims not set\")\n\t}\n\treturn json.Unmarshal(p.rawClaims, v)\n}\n\n// Endpoint returns the OAuth2 auth and token endpoints for the given provider.\nfunc (p *Provider) Endpoint() oauth2.Endpoint {\n\treturn oauth2.Endpoint{AuthURL: p.authURL, DeviceAuthURL: p.deviceAuthURL, TokenURL: p.tokenURL}\n}\n\n// UserInfoEndpoint returns the OpenID Connect userinfo endpoint for the given\n// provider.\nfunc (p *Provider) UserInfoEndpoint() string {\n\treturn p.userInfoURL\n}\n\n// UserInfo represents the OpenID Connect userinfo claims.\ntype UserInfo struct {\n\tSubject       string `json:\"sub\"`\n\tProfile       string `json:\"profile\"`\n\tEmail         string `json:\"email\"`\n\tEmailVerified bool   `json:\"email_verified\"`\n\n\tclaims []byte\n}\n\ntype userInfoRaw struct {\n\tSubject string `json:\"sub\"`\n\tProfile string `json:\"profile\"`\n\tEmail   string `json:\"email\"`\n\t// Handle providers that return email_verified as a string\n\t// https://forums.aws.amazon.com/thread.jspa?messageID=949441&#949441 and\n\t// https://discuss.elastic.co/t/openid-error-after-authenticating-against-aws-cognito/206018/11\n\tEmailVerified stringAsBool `json:\"email_verified\"`\n}\n\n// Claims unmarshals the raw JSON object claims into the provided object.\nfunc (u *UserInfo) Claims(v interface{}) error {\n\tif u.claims == nil {\n\t\treturn errors.New(\"oidc: claims not set\")\n\t}\n\treturn json.Unmarshal(u.claims, v)\n}\n\n// UserInfo uses the token source to query the provider's user info endpoint.\nfunc (p *Provider) UserInfo(ctx context.Context, tokenSource oauth2.TokenSource) (*UserInfo, error) {\n\tif p.userInfoURL == \"\" {\n\t\treturn nil, errors.New(\"oidc: user info endpoint is not supported by this provider\")\n\t}\n\n\treq, err := http.NewRequest(\"GET\", p.userInfoURL, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: create GET request: %v\", err)\n\t}\n\n\ttoken, err := tokenSource.Token()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: get access token: %v\", err)\n\t}\n\ttoken.SetAuthHeader(req)\n\n\tresp, err := doRequest(ctx, req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"%s: %s\", resp.Status, body)\n\t}\n\n\tct := resp.Header.Get(\"Content-Type\")\n\tmediaType, _, parseErr := mime.ParseMediaType(ct)\n\tif parseErr == nil && mediaType == \"application/jwt\" {\n\t\tpayload, err := p.remoteKeySet().VerifySignature(ctx, string(body))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"oidc: invalid userinfo jwt signature %v\", err)\n\t\t}\n\t\tbody = payload\n\t}\n\n\tvar userInfo userInfoRaw\n\tif err := json.Unmarshal(body, &userInfo); err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: failed to decode userinfo: %v\", err)\n\t}\n\treturn &UserInfo{\n\t\tSubject:       userInfo.Subject,\n\t\tProfile:       userInfo.Profile,\n\t\tEmail:         userInfo.Email,\n\t\tEmailVerified: bool(userInfo.EmailVerified),\n\t\tclaims:        body,\n\t}, nil\n}\n\n// IDToken is an OpenID Connect extension that provides a predictable representation\n// of an authorization event.\n//\n// The ID Token only holds fields OpenID Connect requires. To access additional\n// claims returned by the server, use the Claims method.\ntype IDToken struct {\n\t// The URL of the server which issued this token. OpenID Connect\n\t// requires this value always be identical to the URL used for\n\t// initial discovery.\n\t//\n\t// Note: Because of a known issue with Google Accounts' implementation\n\t// this value may differ when using Google.\n\t//\n\t// See: https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo\n\tIssuer string\n\n\t// The client ID, or set of client IDs, that this token is issued for. For\n\t// common uses, this is the client that initialized the auth flow.\n\t//\n\t// This package ensures the audience contains an expected value.\n\tAudience []string\n\n\t// A unique string which identifies the end user.\n\tSubject string\n\n\t// Expiry of the token. Ths package will not process tokens that have\n\t// expired unless that validation is explicitly turned off.\n\tExpiry time.Time\n\t// When the token was issued by the provider.\n\tIssuedAt time.Time\n\n\t// Initial nonce provided during the authentication redirect.\n\t//\n\t// This package does NOT provided verification on the value of this field\n\t// and it's the user's responsibility to ensure it contains a valid value.\n\tNonce string\n\n\t// at_hash claim, if set in the ID token. Callers can verify an access token\n\t// that corresponds to the ID token using the VerifyAccessToken method.\n\tAccessTokenHash string\n\n\t// signature algorithm used for ID token, needed to compute a verification hash of an\n\t// access token\n\tsigAlgorithm string\n\n\t// Raw payload of the id_token.\n\tclaims []byte\n\n\t// Map of distributed claim names to claim sources\n\tdistributedClaims map[string]claimSource\n}\n\n// Claims unmarshals the raw JSON payload of the ID Token into a provided struct.\n//\n//\tidToken, err := idTokenVerifier.Verify(rawIDToken)\n//\tif err != nil {\n//\t\t// handle error\n//\t}\n//\tvar claims struct {\n//\t\tEmail         string `json:\"email\"`\n//\t\tEmailVerified bool   `json:\"email_verified\"`\n//\t}\n//\tif err := idToken.Claims(&claims); err != nil {\n//\t\t// handle error\n//\t}\nfunc (i *IDToken) Claims(v interface{}) error {\n\tif i.claims == nil {\n\t\treturn errors.New(\"oidc: claims not set\")\n\t}\n\treturn json.Unmarshal(i.claims, v)\n}\n\n// VerifyAccessToken verifies that the hash of the access token that corresponds to the iD token\n// matches the hash in the id token. It returns an error if the hashes  don't match.\n// It is the caller's responsibility to ensure that the optional access token hash is present for the ID token\n// before calling this method. See https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken\nfunc (i *IDToken) VerifyAccessToken(accessToken string) error {\n\tif i.AccessTokenHash == \"\" {\n\t\treturn errNoAtHash\n\t}\n\tvar h hash.Hash\n\tswitch i.sigAlgorithm {\n\tcase RS256, ES256, PS256:\n\t\th = sha256.New()\n\tcase RS384, ES384, PS384:\n\t\th = sha512.New384()\n\tcase RS512, ES512, PS512, EdDSA:\n\t\th = sha512.New()\n\tdefault:\n\t\treturn fmt.Errorf(\"oidc: unsupported signing algorithm %q\", i.sigAlgorithm)\n\t}\n\th.Write([]byte(accessToken)) // hash documents that Write will never return an error\n\tsum := h.Sum(nil)[:h.Size()/2]\n\tactual := base64.RawURLEncoding.EncodeToString(sum)\n\tif actual != i.AccessTokenHash {\n\t\treturn errInvalidAtHash\n\t}\n\treturn nil\n}\n\ntype idToken struct {\n\tIssuer       string                 `json:\"iss\"`\n\tSubject      string                 `json:\"sub\"`\n\tAudience     audience               `json:\"aud\"`\n\tExpiry       jsonTime               `json:\"exp\"`\n\tIssuedAt     jsonTime               `json:\"iat\"`\n\tNotBefore    *jsonTime              `json:\"nbf\"`\n\tNonce        string                 `json:\"nonce\"`\n\tAtHash       string                 `json:\"at_hash\"`\n\tClaimNames   map[string]string      `json:\"_claim_names\"`\n\tClaimSources map[string]claimSource `json:\"_claim_sources\"`\n}\n\ntype claimSource struct {\n\tEndpoint    string `json:\"endpoint\"`\n\tAccessToken string `json:\"access_token\"`\n}\n\ntype stringAsBool bool\n\nfunc (sb *stringAsBool) UnmarshalJSON(b []byte) error {\n\tswitch string(b) {\n\tcase \"true\", `\"true\"`:\n\t\t*sb = true\n\tcase \"false\", `\"false\"`:\n\t\t*sb = false\n\tdefault:\n\t\treturn errors.New(\"invalid value for boolean\")\n\t}\n\treturn nil\n}\n\ntype audience []string\n\nfunc (a *audience) UnmarshalJSON(b []byte) error {\n\tvar s string\n\tif json.Unmarshal(b, &s) == nil {\n\t\t*a = audience{s}\n\t\treturn nil\n\t}\n\tvar auds []string\n\tif err := json.Unmarshal(b, &auds); err != nil {\n\t\treturn err\n\t}\n\t*a = auds\n\treturn nil\n}\n\ntype jsonTime time.Time\n\nfunc (j *jsonTime) UnmarshalJSON(b []byte) error {\n\tvar n json.Number\n\tif err := json.Unmarshal(b, &n); err != nil {\n\t\treturn err\n\t}\n\tvar unix int64\n\n\tif t, err := n.Int64(); err == nil {\n\t\tunix = t\n\t} else {\n\t\tf, err := n.Float64()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tunix = int64(f)\n\t}\n\t*j = jsonTime(time.Unix(unix, 0))\n\treturn nil\n}\n\nfunc unmarshalResp(r *http.Response, body []byte, v interface{}) error {\n\terr := json.Unmarshal(body, &v)\n\tif err == nil {\n\t\treturn nil\n\t}\n\tct := r.Header.Get(\"Content-Type\")\n\tmediaType, _, parseErr := mime.ParseMediaType(ct)\n\tif parseErr == nil && mediaType == \"application/json\" {\n\t\treturn fmt.Errorf(\"got Content-Type = application/json, but could not unmarshal as JSON: %v\", err)\n\t}\n\treturn fmt.Errorf(\"expected Content-Type = application/json, got %q: %v\", ct, err)\n}\n"
  },
  {
    "path": "vendor/github.com/coreos/go-oidc/v3/oidc/verify.go",
    "content": "package oidc\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"time\"\n\n\tjose \"github.com/go-jose/go-jose/v4\"\n\t\"golang.org/x/oauth2\"\n)\n\nconst (\n\tissuerGoogleAccounts         = \"https://accounts.google.com\"\n\tissuerGoogleAccountsNoScheme = \"accounts.google.com\"\n)\n\n// TokenExpiredError indicates that Verify failed because the token was expired. This\n// error does NOT indicate that the token is not also invalid for other reasons. Other\n// checks might have failed if the expiration check had not failed.\ntype TokenExpiredError struct {\n\t// Expiry is the time when the token expired.\n\tExpiry time.Time\n}\n\nfunc (e *TokenExpiredError) Error() string {\n\treturn fmt.Sprintf(\"oidc: token is expired (Token Expiry: %v)\", e.Expiry)\n}\n\n// KeySet is a set of publc JSON Web Keys that can be used to validate the signature\n// of JSON web tokens. This is expected to be backed by a remote key set through\n// provider metadata discovery or an in-memory set of keys delivered out-of-band.\ntype KeySet interface {\n\t// VerifySignature parses the JSON web token, verifies the signature, and returns\n\t// the raw payload. Header and claim fields are validated by other parts of the\n\t// package. For example, the KeySet does not need to check values such as signature\n\t// algorithm, issuer, and audience since the IDTokenVerifier validates these values\n\t// independently.\n\t//\n\t// If VerifySignature makes HTTP requests to verify the token, it's expected to\n\t// use any HTTP client associated with the context through ClientContext.\n\tVerifySignature(ctx context.Context, jwt string) (payload []byte, err error)\n}\n\n// IDTokenVerifier provides verification for ID Tokens.\ntype IDTokenVerifier struct {\n\tkeySet KeySet\n\tconfig *Config\n\tissuer string\n}\n\n// NewVerifier returns a verifier manually constructed from a key set and issuer URL.\n//\n// It's easier to use provider discovery to construct an IDTokenVerifier than creating\n// one directly. This method is intended to be used with provider that don't support\n// metadata discovery, or avoiding round trips when the key set URL is already known.\n//\n// This constructor can be used to create a verifier directly using the issuer URL and\n// JSON Web Key Set URL without using discovery:\n//\n//\tkeySet := oidc.NewRemoteKeySet(ctx, \"https://www.googleapis.com/oauth2/v3/certs\")\n//\tverifier := oidc.NewVerifier(\"https://accounts.google.com\", keySet, config)\n//\n// Or a static key set (e.g. for testing):\n//\n//\tkeySet := &oidc.StaticKeySet{PublicKeys: []crypto.PublicKey{pub1, pub2}}\n//\tverifier := oidc.NewVerifier(\"https://accounts.google.com\", keySet, config)\nfunc NewVerifier(issuerURL string, keySet KeySet, config *Config) *IDTokenVerifier {\n\treturn &IDTokenVerifier{keySet: keySet, config: config, issuer: issuerURL}\n}\n\n// Config is the configuration for an IDTokenVerifier.\ntype Config struct {\n\t// Expected audience of the token. For a majority of the cases this is expected to be\n\t// the ID of the client that initialized the login flow. It may occasionally differ if\n\t// the provider supports the authorizing party (azp) claim.\n\t//\n\t// If not provided, users must explicitly set SkipClientIDCheck.\n\tClientID string\n\t// If specified, only this set of algorithms may be used to sign the JWT.\n\t//\n\t// If the IDTokenVerifier is created from a provider with (*Provider).Verifier, this\n\t// defaults to the set of algorithms the provider supports. Otherwise this values\n\t// defaults to RS256.\n\tSupportedSigningAlgs []string\n\n\t// If true, no ClientID check performed. Must be true if ClientID field is empty.\n\tSkipClientIDCheck bool\n\t// If true, token expiry is not checked.\n\tSkipExpiryCheck bool\n\n\t// SkipIssuerCheck is intended for specialized cases where the the caller wishes to\n\t// defer issuer validation. When enabled, callers MUST independently verify the Token's\n\t// Issuer is a known good value.\n\t//\n\t// Mismatched issuers often indicate client mis-configuration. If mismatches are\n\t// unexpected, evaluate if the provided issuer URL is incorrect instead of enabling\n\t// this option.\n\tSkipIssuerCheck bool\n\n\t// Time function to check Token expiry. Defaults to time.Now\n\tNow func() time.Time\n\n\t// InsecureSkipSignatureCheck causes this package to skip JWT signature validation.\n\t// It's intended for special cases where providers (such as Azure), use the \"none\"\n\t// algorithm.\n\t//\n\t// This option can only be enabled safely when the ID Token is received directly\n\t// from the provider after the token exchange.\n\t//\n\t// This option MUST NOT be used when receiving an ID Token from sources other\n\t// than the token endpoint.\n\tInsecureSkipSignatureCheck bool\n}\n\n// VerifierContext returns an IDTokenVerifier that uses the provider's key set to\n// verify JWTs. As opposed to Verifier, the context is used to configure requests\n// to the upstream JWKs endpoint. The provided context's cancellation is ignored.\nfunc (p *Provider) VerifierContext(ctx context.Context, config *Config) *IDTokenVerifier {\n\treturn p.newVerifier(NewRemoteKeySet(ctx, p.jwksURL), config)\n}\n\n// Verifier returns an IDTokenVerifier that uses the provider's key set to verify JWTs.\n//\n// The returned verifier uses a background context for all requests to the upstream\n// JWKs endpoint. To control that context, use VerifierContext instead.\nfunc (p *Provider) Verifier(config *Config) *IDTokenVerifier {\n\treturn p.newVerifier(p.remoteKeySet(), config)\n}\n\nfunc (p *Provider) newVerifier(keySet KeySet, config *Config) *IDTokenVerifier {\n\tif len(config.SupportedSigningAlgs) == 0 && len(p.algorithms) > 0 {\n\t\t// Make a copy so we don't modify the config values.\n\t\tcp := &Config{}\n\t\t*cp = *config\n\t\tcp.SupportedSigningAlgs = p.algorithms\n\t\tconfig = cp\n\t}\n\treturn NewVerifier(p.issuer, keySet, config)\n}\n\nfunc contains(sli []string, ele string) bool {\n\tfor _, s := range sli {\n\t\tif s == ele {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// Returns the Claims from the distributed JWT token\nfunc resolveDistributedClaim(ctx context.Context, verifier *IDTokenVerifier, src claimSource) ([]byte, error) {\n\treq, err := http.NewRequest(\"GET\", src.Endpoint, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"malformed request: %v\", err)\n\t}\n\tif src.AccessToken != \"\" {\n\t\treq.Header.Set(\"Authorization\", \"Bearer \"+src.AccessToken)\n\t}\n\n\tresp, err := doRequest(ctx, req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: Request to endpoint failed: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to read response body: %v\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"oidc: request failed: %v\", resp.StatusCode)\n\t}\n\n\ttoken, err := verifier.Verify(ctx, string(body))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"malformed response body: %v\", err)\n\t}\n\n\treturn token.claims, nil\n}\n\n// Verify parses a raw ID Token, verifies it's been signed by the provider, performs\n// any additional checks depending on the Config, and returns the payload.\n//\n// Verify does NOT do nonce validation, which is the callers responsibility.\n//\n// See: https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation\n//\n//\toauth2Token, err := oauth2Config.Exchange(ctx, r.URL.Query().Get(\"code\"))\n//\tif err != nil {\n//\t    // handle error\n//\t}\n//\n//\t// Extract the ID Token from oauth2 token.\n//\trawIDToken, ok := oauth2Token.Extra(\"id_token\").(string)\n//\tif !ok {\n//\t    // handle error\n//\t}\n//\n//\ttoken, err := verifier.Verify(ctx, rawIDToken)\nfunc (v *IDTokenVerifier) Verify(ctx context.Context, rawIDToken string) (*IDToken, error) {\n\tvar supportedSigAlgs []jose.SignatureAlgorithm\n\tfor _, alg := range v.config.SupportedSigningAlgs {\n\t\tsupportedSigAlgs = append(supportedSigAlgs, jose.SignatureAlgorithm(alg))\n\t}\n\tif len(supportedSigAlgs) == 0 {\n\t\t// If no algorithms were specified by both the config and discovery, default\n\t\t// to the one mandatory algorithm \"RS256\".\n\t\tsupportedSigAlgs = []jose.SignatureAlgorithm{jose.RS256}\n\t}\n\tif v.config.InsecureSkipSignatureCheck {\n\t\t// \"none\" is a required value to even parse a JWT with the \"none\" algorithm\n\t\t// using go-jose.\n\t\tsupportedSigAlgs = append(supportedSigAlgs, \"none\")\n\t}\n\n\t// Parse and verify the signature first. This at least forces the user to have\n\t// a valid, signed ID token before we do any other processing.\n\tjws, err := jose.ParseSigned(rawIDToken, supportedSigAlgs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: malformed jwt: %v\", err)\n\t}\n\tswitch len(jws.Signatures) {\n\tcase 0:\n\t\treturn nil, fmt.Errorf(\"oidc: id token not signed\")\n\tcase 1:\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"oidc: multiple signatures on id token not supported\")\n\t}\n\tsig := jws.Signatures[0]\n\n\tvar payload []byte\n\tif v.config.InsecureSkipSignatureCheck {\n\t\t// Yolo mode.\n\t\tpayload = jws.UnsafePayloadWithoutVerification()\n\t} else {\n\t\t// The JWT is attached here for the happy path to avoid the verifier from\n\t\t// having to parse the JWT twice.\n\t\tctx = context.WithValue(ctx, parsedJWTKey, jws)\n\t\tpayload, err = v.keySet.VerifySignature(ctx, rawIDToken)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to verify signature: %v\", err)\n\t\t}\n\t}\n\tvar token idToken\n\tif err := json.Unmarshal(payload, &token); err != nil {\n\t\treturn nil, fmt.Errorf(\"oidc: failed to unmarshal claims: %v\", err)\n\t}\n\n\tdistributedClaims := make(map[string]claimSource)\n\n\t//step through the token to map claim names to claim sources\"\n\tfor cn, src := range token.ClaimNames {\n\t\tif src == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"oidc: failed to obtain source from claim name\")\n\t\t}\n\t\ts, ok := token.ClaimSources[src]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"oidc: source does not exist\")\n\t\t}\n\t\tdistributedClaims[cn] = s\n\t}\n\n\tt := &IDToken{\n\t\tIssuer:            token.Issuer,\n\t\tSubject:           token.Subject,\n\t\tAudience:          []string(token.Audience),\n\t\tExpiry:            time.Time(token.Expiry),\n\t\tIssuedAt:          time.Time(token.IssuedAt),\n\t\tNonce:             token.Nonce,\n\t\tAccessTokenHash:   token.AtHash,\n\t\tclaims:            payload,\n\t\tdistributedClaims: distributedClaims,\n\t\tsigAlgorithm:      sig.Header.Algorithm,\n\t}\n\n\t// Check issuer.\n\tif !v.config.SkipIssuerCheck && t.Issuer != v.issuer {\n\t\t// Google sometimes returns \"accounts.google.com\" as the issuer claim instead of\n\t\t// the required \"https://accounts.google.com\". Detect this case and allow it only\n\t\t// for Google.\n\t\t//\n\t\t// We will not add hooks to let other providers go off spec like this.\n\t\tif !(v.issuer == issuerGoogleAccounts && t.Issuer == issuerGoogleAccountsNoScheme) {\n\t\t\treturn nil, fmt.Errorf(\"oidc: id token issued by a different provider, expected %q got %q\", v.issuer, t.Issuer)\n\t\t}\n\t}\n\n\t// If a client ID has been provided, make sure it's part of the audience. SkipClientIDCheck must be true if ClientID is empty.\n\t//\n\t// This check DOES NOT ensure that the ClientID is the party to which the ID Token was issued (i.e. Authorized party).\n\tif !v.config.SkipClientIDCheck {\n\t\tif v.config.ClientID != \"\" {\n\t\t\tif !contains(t.Audience, v.config.ClientID) {\n\t\t\t\treturn nil, fmt.Errorf(\"oidc: expected audience %q got %q\", v.config.ClientID, t.Audience)\n\t\t\t}\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"oidc: invalid configuration, clientID must be provided or SkipClientIDCheck must be set\")\n\t\t}\n\t}\n\n\t// If a SkipExpiryCheck is false, make sure token is not expired.\n\tif !v.config.SkipExpiryCheck {\n\t\tnow := time.Now\n\t\tif v.config.Now != nil {\n\t\t\tnow = v.config.Now\n\t\t}\n\t\tnowTime := now()\n\n\t\tif t.Expiry.Before(nowTime) {\n\t\t\treturn nil, &TokenExpiredError{Expiry: t.Expiry}\n\t\t}\n\n\t\t// If nbf claim is provided in token, ensure that it is indeed in the past.\n\t\tif token.NotBefore != nil {\n\t\t\tnbfTime := time.Time(*token.NotBefore)\n\t\t\t// Set to 5 minutes since this is what other OpenID Connect providers do to deal with clock skew.\n\t\t\t// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.12.2/src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs#L149-L153\n\t\t\tleeway := 5 * time.Minute\n\n\t\t\tif nowTime.Add(leeway).Before(nbfTime) {\n\t\t\t\treturn nil, fmt.Errorf(\"oidc: current time %v before the nbf (not before) time: %v\", nowTime, nbfTime)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn t, nil\n}\n\n// Nonce returns an auth code option which requires the ID Token created by the\n// OpenID Connect provider to contain the specified nonce.\nfunc Nonce(nonce string) oauth2.AuthCodeOption {\n\treturn oauth2.SetAuthURLParam(\"nonce\", nonce)\n}\n"
  },
  {
    "path": "vendor/github.com/cyberphone/json-canonicalization/LICENSE",
    "content": "   Copyright 2018 Anders Rundgren\r\n\r\n   Licensed under the Apache License, Version 2.0 (the \"License\");\r\n   you may not use this file except in compliance with the License.\r\n   You may obtain a copy of the License at\r\n\r\n       https://www.apache.org/licenses/LICENSE-2.0\r\n\r\n   Unless required by applicable law or agreed to in writing, software\r\n   distributed under the License is distributed on an \"AS IS\" BASIS,\r\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n   See the License for the specific language governing permissions and\r\n   limitations under the License.\r\n"
  },
  {
    "path": "vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/es6numfmt.go",
    "content": "//\n//  Copyright 2006-2019 WebPKI.org (http://webpki.org).\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n \n// This package converts numbers in IEEE-754 double precision into the\n// format specified for JSON in EcmaScript Version 6 and forward.\n// The core application for this is canonicalization:\n// https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02\n\npackage jsoncanonicalizer\n\nimport (\n    \"errors\"\n    \"math\"\n    \"strconv\"\n    \"strings\"\n)\n\nconst invalidPattern uint64 = 0x7ff0000000000000\n\nfunc NumberToJSON(ieeeF64 float64) (res string, err error) {\n    ieeeU64 := math.Float64bits(ieeeF64)\n\n    // Special case: NaN and Infinity are invalid in JSON\n    if (ieeeU64 & invalidPattern) == invalidPattern {\n        return \"null\", errors.New(\"Invalid JSON number: \" + strconv.FormatUint(ieeeU64, 16))\n    }\n\n    // Special case: eliminate \"-0\" as mandated by the ES6-JSON/JCS specifications\n    if ieeeF64 == 0 {  // Right, this line takes both -0 and 0\n        return \"0\", nil\n    }\n\n    // Deal with the sign separately\n    var sign string = \"\"\n    if ieeeF64 < 0 {\n        ieeeF64 =-ieeeF64\n        sign = \"-\"\n    }\n\n    // ES6 has a unique \"g\" format\n    var format byte = 'e'\n    if ieeeF64 < 1e+21 && ieeeF64 >= 1e-6 {\n        format = 'f'\n    }\n\n    // The following should do the trick:\n    es6Formatted := strconv.FormatFloat(ieeeF64, format, -1, 64)\n\n    // Minor cleanup\n    exponent := strings.IndexByte(es6Formatted, 'e')\n    if exponent > 0 {\n        // Go outputs \"1e+09\" which must be rewritten as \"1e+9\"\n        if es6Formatted[exponent + 2] == '0' {\n            es6Formatted = es6Formatted[:exponent + 2] + es6Formatted[exponent + 3:]\n        }\n    }\n    return sign + es6Formatted, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/jsoncanonicalizer.go",
    "content": "//\n//  Copyright 2006-2019 WebPKI.org (http://webpki.org).\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//      https://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n \n// This package transforms JSON data in UTF-8 according to:\n// https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02\n\npackage jsoncanonicalizer\n\nimport (\n    \"errors\"\n    \"container/list\"\n    \"fmt\"\n    \"strconv\"\n    \"strings\"\n    \"unicode/utf16\"\n)\n\ntype nameValueType struct {\n    name string\n    sortKey []uint16\n    value string\n}\n\n// JSON standard escapes (modulo \\u)\nvar asciiEscapes  = []byte{'\\\\', '\"', 'b',  'f',  'n',  'r',  't'}\nvar binaryEscapes = []byte{'\\\\', '\"', '\\b', '\\f', '\\n', '\\r', '\\t'}\n\n// JSON literals\nvar literals      = []string{\"true\", \"false\", \"null\"}\n    \nfunc Transform(jsonData []byte) (result []byte, e error) {\n\n    // JSON data MUST be UTF-8 encoded\n    var jsonDataLength int = len(jsonData)\n\n    // Current pointer in jsonData\n    var index int = 0\n\n    // \"Forward\" declarations are needed for closures referring each other\n    var parseElement func() string\n    var parseSimpleType func() string\n    var parseQuotedString func() string\n    var parseObject func() string\n    var parseArray func() string\n\n    var globalError error = nil\n\n    checkError := func(e error) {\n        // We only honor the first reported error\n        if globalError == nil {\n            globalError = e\n        }\n    }\n    \n    setError := func(msg string) {\n        checkError(errors.New(msg))\n    }\n\n    isWhiteSpace := func(c byte) bool {\n        return c == 0x20 || c == 0x0a || c == 0x0d || c == 0x09\n    }\n\n    nextChar := func() byte {\n        if index < jsonDataLength {\n            c := jsonData[index]\n            if c > 0x7f {\n                setError(\"Unexpected non-ASCII character\")\n            }\n            index++\n            return c\n        }\n        setError(\"Unexpected EOF reached\")\n        return '\"'\n    }\n\n    scan := func() byte {\n        for {\n            c := nextChar()\n            if isWhiteSpace(c) {\n                continue;\n            }\n            return c\n        }\n    }\n\n    scanFor := func(expected byte) {\n        c := scan()\n        if c != expected {\n            setError(\"Expected '\" + string(expected) + \"' but got '\" + string(c) + \"'\")\n        }\n    }\n\n    getUEscape := func() rune {\n        start := index\n        nextChar()\n        nextChar()\n        nextChar()\n        nextChar()\n        if globalError != nil {\n            return 0\n        }\n        u16, err := strconv.ParseUint(string(jsonData[start:index]), 16, 64)\n        checkError(err)\n        return rune(u16)\n    }\n\n    testNextNonWhiteSpaceChar := func() byte {\n        save := index\n        c := scan()\n        index = save\n        return c\n    }\n\n    decorateString := func(rawUTF8 string) string {\n        var quotedString strings.Builder\n        quotedString.WriteByte('\"')\n      CoreLoop:\n        for _, c := range []byte(rawUTF8) {\n            // Is this within the JSON standard escapes?\n            for i, esc := range binaryEscapes {\n                if esc == c {\n                    quotedString.WriteByte('\\\\')\n                    quotedString.WriteByte(asciiEscapes[i])\n                    continue CoreLoop\n                }\n            }\n            if c < 0x20 {\n                // Other ASCII control characters must be escaped with \\uhhhh\n                quotedString.WriteString(fmt.Sprintf(\"\\\\u%04x\", c))         \n            } else {\n                quotedString.WriteByte(c)\n            }\n        }\n        quotedString.WriteByte('\"')\n        return quotedString.String()\n    }\n\n    parseQuotedString = func() string {\n        var rawString strings.Builder\n      CoreLoop:\n        for globalError == nil {\n            var c byte\n            if index < jsonDataLength {\n                c = jsonData[index]\n                index++\n            } else {\n                nextChar()\n                break\n            }\n            if (c == '\"') {\n                break;\n            }\n            if c < ' ' {\n                setError(\"Unterminated string literal\")\n            } else if c == '\\\\' {\n                // Escape sequence\n                c = nextChar()\n                if c == 'u' {\n                    // The \\u escape\n                    firstUTF16 := getUEscape()\n                    if utf16.IsSurrogate(firstUTF16) {\n                        // If the first UTF-16 code unit has a certain value there must be\n                        // another succeeding UTF-16 code unit as well\n                        if nextChar() != '\\\\' || nextChar() != 'u' {\n                            setError(\"Missing surrogate\")\n                        } else {\n                            // Output the UTF-32 code point as UTF-8\n                            rawString.WriteRune(utf16.DecodeRune(firstUTF16, getUEscape()))\n                        }\n                    } else {\n                        // Single UTF-16 code identical to UTF-32.  Output as UTF-8\n                        rawString.WriteRune(firstUTF16)\n                    }\n                } else if c == '/' {\n                    // Benign but useless escape\n                    rawString.WriteByte('/')\n                } else {\n                    // The JSON standard escapes\n                    for i, esc := range asciiEscapes {\n                        if esc == c {\n                            rawString.WriteByte(binaryEscapes[i])\n                            continue CoreLoop\n                        }\n                    }\n                    setError(\"Unexpected escape: \\\\\" + string(c))\n                }\n            } else {\n                // Just an ordinary ASCII character alternatively a UTF-8 byte\n                // outside of ASCII.\n                // Note that properly formatted UTF-8 never clashes with ASCII\n                // making byte per byte search for ASCII break characters work\n                // as expected.\n                rawString.WriteByte(c)\n            }\n        }\n        return rawString.String()\n    }\n\n    parseSimpleType = func() string {\n        var token strings.Builder\n        index--\n        for globalError == nil {\n            c := testNextNonWhiteSpaceChar()\n            if c == ',' || c == ']' || c == '}' {\n                break;\n            }\n            c = nextChar()\n            if isWhiteSpace(c) {\n                break\n            }\n            token.WriteByte(c)\n        }\n        if token.Len() == 0 {\n            setError(\"Missing argument\")\n        }\n        value := token.String()\n        // Is it a JSON literal?\n        for _, literal := range literals {\n            if literal == value {\n                return literal\n            }\n        }\n        // Apparently not so we assume that it is a I-JSON number\n        ieeeF64, err := strconv.ParseFloat(value, 64)\n        checkError(err)\n        value, err = NumberToJSON(ieeeF64)\n        checkError(err)\n        return value\n    }\n\n    parseElement = func() string {\n        switch scan() {\n            case '{':\n                return parseObject()\n            case '\"':\n                return decorateString(parseQuotedString())\n            case '[':\n                return parseArray()\n            default:\n                return parseSimpleType()\n        }\n    }\n\n    parseArray = func() string {\n        var arrayData strings.Builder\n        arrayData.WriteByte('[')\n        var next bool = false\n        for globalError == nil && testNextNonWhiteSpaceChar() != ']' {\n            if next {\n                scanFor(',')\n                arrayData.WriteByte(',')\n            } else {\n                next = true\n            }\n            arrayData.WriteString(parseElement())\n        }\n        scan()\n        arrayData.WriteByte(']')\n        return arrayData.String()\n    }\n\n    lexicographicallyPrecedes := func(sortKey []uint16, e *list.Element) bool {\n        // Find the minimum length of the sortKeys\n        oldSortKey := e.Value.(nameValueType).sortKey\n        minLength := len(oldSortKey)\n        if minLength > len(sortKey) {\n            minLength = len(sortKey)\n        }\n        for q := 0; q < minLength; q++ {\n            diff := int(sortKey[q]) - int(oldSortKey[q])\n            if diff < 0 {\n                // Smaller => Precedes\n                return true\n            } else if diff > 0 {\n                // Bigger => No match\n                return false\n            }\n            // Still equal => Continue\n        }\n        // The sortKeys compared equal up to minLength\n        if len(sortKey) < len(oldSortKey) {\n            // Shorter => Precedes\n            return true\n        }\n        if len(sortKey) == len(oldSortKey) {\n            setError(\"Duplicate key: \" + e.Value.(nameValueType).name)\n        }\n        // Longer => No match\n        return false\n    }\n\n    parseObject = func() string {\n        nameValueList := list.New()\n        var next bool = false\n      CoreLoop:\n        for globalError == nil && testNextNonWhiteSpaceChar() != '}' {\n            if next {\n                scanFor(',')\n            }\n            next = true\n            scanFor('\"')\n            rawUTF8 := parseQuotedString()\n            if globalError != nil {\n                break;\n            }\n            // Sort keys on UTF-16 code units\n            // Since UTF-8 doesn't have endianess this is just a value transformation\n            // In the Go case the transformation is UTF-8 => UTF-32 => UTF-16\n            sortKey := utf16.Encode([]rune(rawUTF8))\n            scanFor(':')\n            nameValue := nameValueType{rawUTF8, sortKey, parseElement()}\n            for e := nameValueList.Front(); e != nil; e = e.Next() {\n                // Check if the key is smaller than a previous key\n                if lexicographicallyPrecedes(sortKey, e) {\n                    // Precedes => Insert before and exit sorting\n                    nameValueList.InsertBefore(nameValue, e)\n                    continue CoreLoop\n                }\n                // Continue searching for a possibly succeeding sortKey\n                // (which is straightforward since the list is ordered)\n            }\n            // The sortKey is either the first or is succeeding all previous sortKeys\n            nameValueList.PushBack(nameValue)\n        }\n        // Scan away '}'\n        scan()\n        // Now everything is sorted so we can properly serialize the object\n        var objectData strings.Builder\n        objectData.WriteByte('{')\n        next = false\n        for e := nameValueList.Front(); e != nil; e = e.Next() {\n            if next {\n                objectData.WriteByte(',')\n            }\n            next = true\n            nameValue := e.Value.(nameValueType)\n            objectData.WriteString(decorateString(nameValue.name))\n            objectData.WriteByte(':')\n            objectData.WriteString(nameValue.value)\n        }\n        objectData.WriteByte('}')\n        return objectData.String()\n    }\n\n    /////////////////////////////////////////////////\n    // This is where Transform actually begins...  //\n    /////////////////////////////////////////////////\n    var transformed string\n\n    if testNextNonWhiteSpaceChar() == '[' {\n        scan()\n        transformed = parseArray()\n    } else {\n        scanFor('{')\n        transformed = parseObject()\n    }\n    for index < jsonDataLength {\n        if !isWhiteSpace(jsonData[index]) {\n            setError(\"Improperly terminated JSON object\")\n            break;\n        }\n        index++\n    }\n    return []byte(transformed), globalError\n}"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/.golangci.yml",
    "content": "# SPDX-License-Identifier: MPL-2.0\n\n# Copyright (C) 2025 Aleksa Sarai <cyphar@cyphar.com>\n# Copyright (C) 2025 SUSE LLC\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\nversion: \"2\"\n\nrun:\n  build-tags:\n    - libpathrs\n\nlinters:\n  enable:\n    - asasalint\n    - asciicheck\n    - containedctx\n    - contextcheck\n    - errcheck\n    - errorlint\n    - exhaustive\n    - forcetypeassert\n    - godot\n    - goprintffuncname\n    - govet\n    - importas\n    - ineffassign\n    - makezero\n    - misspell\n    - musttag\n    - nilerr\n    - nilnesserr\n    - nilnil\n    - noctx\n    - prealloc\n    - revive\n    - staticcheck\n    - testifylint\n    - unconvert\n    - unparam\n    - unused\n    - usetesting\n  settings:\n    govet:\n      enable:\n        - nilness\n    testifylint:\n      enable-all: true\n\nformatters:\n  enable:\n    - gofumpt\n    - goimports\n  settings:\n    goimports:\n      local-prefixes:\n        - github.com/cyphar/filepath-securejoin\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/CHANGELOG.md",
    "content": "# Changelog #\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/)\nand this project adheres to [Semantic Versioning](http://semver.org/).\n\n## [Unreleased] ##\n\n## [0.6.1] - 2025-11-19 ##\n\n> At last up jumped the cunning spider, and fiercely held her fast.\n\n### Fixed ###\n- Our logic for deciding whether to use `openat2(2)` or fallback to an `O_PATH`\n  resolver would cache the result to avoid doing needless test runs of\n  `openat2(2)`. However, this causes issues when `pathrs-lite` is being used by\n  a program that applies new seccomp-bpf filters onto itself -- if the filter\n  denies `openat2(2)` then we would return that error rather than falling back\n  to the `O_PATH` resolver. To resolve this issue, we no longer cache the\n  result if `openat2(2)` was successful, only if there was an error.\n- A file descriptor leak in our `openat2` wrapper (when doing the necessary\n  `dup` for `RESOLVE_IN_ROOT`) has been removed.\n\n## [0.5.2] - 2025-11-19 ##\n\n> \"Will you walk into my parlour?\" said a spider to a fly.\n\n### Fixed ###\n- Our logic for deciding whether to use `openat2(2)` or fallback to an `O_PATH`\n  resolver would cache the result to avoid doing needless test runs of\n  `openat2(2)`. However, this causes issues when `pathrs-lite` is being used by\n  a program that applies new seccomp-bpf filters onto itself -- if the filter\n  denies `openat2(2)` then we would return that error rather than falling back\n  to the `O_PATH` resolver. To resolve this issue, we no longer cache the\n  result if `openat2(2)` was successful, only if there was an error.\n- A file descriptor leak in our `openat2` wrapper (when doing the necessary\n  `dup` for `RESOLVE_IN_ROOT`) has been removed.\n\n## [0.6.0] - 2025-11-03 ##\n\n> By the Power of Greyskull!\n\n### Breaking ###\n- The deprecated `MkdirAll`, `MkdirAllHandle`, `OpenInRoot`, `OpenatInRoot` and\n  `Reopen` wrappers have been removed. Please switch to using `pathrs-lite`\n  directly.\n\n### Added ###\n- `pathrs-lite` now has support for using libpathrs as a backend. This is\n  opt-in and can be enabled at build time with the `libpathrs` build tag. The\n  intention is to allow for downstream libraries and other projects to make use\n  of the pure-Go `github.com/cyphar/filepath-securejoin/pathrs-lite` package\n  and distributors can then opt-in to using `libpathrs` for the entire binary\n  if they wish.\n\n## [0.5.1] - 2025-10-31 ##\n\n> Spooky scary skeletons send shivers down your spine!\n\n### Changed ###\n- `openat2` can return `-EAGAIN` if it detects a possible attack in certain\n  scenarios (namely if there was a rename or mount while walking a path with a\n  `..` component). While this is necessary to avoid a denial-of-service in the\n  kernel, it does require retry loops in userspace.\n\n  In previous versions, `pathrs-lite` would retry `openat2` 32 times before\n  returning an error, but we've received user reports that this limit can be\n  hit on systems with very heavy load. In some synthetic benchmarks (testing\n  the worst-case of an attacker doing renames in a tight loop on every core of\n  a 16-core machine) we managed to get a ~3% failure rate in runc. We have\n  improved this situation in two ways:\n\n  * We have now increased this limit to 128, which should be good enough for\n    most use-cases without becoming a denial-of-service vector (the number of\n    syscalls called by the `O_PATH` resolver in a typical case is within the\n    same ballpark). The same benchmarks show a failure rate of ~0.12% which\n    (while not zero) is probably sufficient for most users.\n\n  * In addition, we now return a `unix.EAGAIN` error that is bubbled up and can\n    be detected by callers. This means that callers with stricter requirements\n    to avoid spurious errors can choose to do their own infinite `EAGAIN` retry\n    loop (though we would strongly recommend users use time-based deadlines in\n    such retry loops to avoid potentially unbounded denials-of-service).\n\n## [0.5.0] - 2025-09-26 ##\n\n> Let the past die. Kill it if you have to.\n\n> **NOTE**: With this release, some parts of\n> `github.com/cyphar/filepath-securejoin` are now licensed under the Mozilla\n> Public License (version 2). Please see [COPYING.md][] as well as the the\n> license header in each file for more details.\n\n[COPYING.md]: ./COPYING.md\n\n### Breaking ###\n- The new API introduced in the [0.3.0][] release has been moved to a new\n  subpackage called `pathrs-lite`. This was primarily done to better indicate\n  the split between the new and old APIs, as well as indicate to users the\n  purpose of this subpackage (it is a less complete version of [libpathrs][]).\n\n  We have added some wrappers to the top-level package to ease the transition,\n  but those are deprecated and will be removed in the next minor release of\n  filepath-securejoin. Users should update their import paths.\n\n  This new subpackage has also been relicensed under the Mozilla Public License\n  (version 2), please see [COPYING.md][] for more details.\n\n### Added ###\n- Most of the key bits the safe `procfs` API have now been exported and are\n  available in `github.com/cyphar/filepath-securejoin/pathrs-lite/procfs`. At\n  the moment this primarily consists of a new `procfs.Handle` API:\n\n   * `OpenProcRoot` returns a new handle to `/proc`, endeavouring to make it\n     safe if possible (`subset=pid` to protect against mistaken write attacks\n     and leaks, as well as using `fsopen(2)` to avoid racing mount attacks).\n\n     `OpenUnsafeProcRoot` returns a handle without attempting to create one\n     with `subset=pid`, which makes it more dangerous to leak. Most users\n     should use `OpenProcRoot` (even if you need to use `ProcRoot` as the base\n     of an operation, as filepath-securejoin will internally open a handle when\n     necessary).\n\n   * The `(*procfs.Handle).Open*` family of methods lets you get a safe\n     `O_PATH` handle to subpaths within `/proc` for certain subpaths.\n\n     For `OpenThreadSelf`, the returned `ProcThreadSelfCloser` needs to be\n     called after you completely finish using the handle (this is necessary\n     because Go is multi-threaded and `ProcThreadSelf` references\n     `/proc/thread-self` which may disappear if we do not\n     `runtime.LockOSThread` -- `ProcThreadSelfCloser` is currently equivalent\n     to `runtime.UnlockOSThread`).\n\n     Note that you cannot open any `procfs` symlinks (most notably magic-links)\n     using this API. At the moment, filepath-securejoin does not support this\n     feature (but [libpathrs][] does).\n\n   * `ProcSelfFdReadlink` lets you get the in-kernel path representation of a\n     file descriptor (think `readlink(\"/proc/self/fd/...\")`), except that we\n     verify that there aren't any tricky overmounts that could fool the\n     process.\n\n     Please be aware that the returned string is simply a snapshot at that\n     particular moment, and an attacker could move the file being pointed to.\n     In addition, complex namespace configurations could result in non-sensical\n     or confusing paths to be returned. The value received from this function\n     should only be used as secondary verification of some security property,\n     not as proof that a particular handle has a particular path.\n\n  The procfs handle used internally by the API is the same as the rest of\n  `filepath-securejoin` (for privileged programs this is usually a private\n  in-process `procfs` instance created with `fsopen(2)`).\n\n  As before, this is intended as a stop-gap before users migrate to\n  [libpathrs][], which provides a far more extensive safe `procfs` API and is\n  generally more robust.\n\n- Previously, the hardened procfs implementation (used internally within\n  `Reopen` and `Open(at)InRoot`) only protected against overmount attacks on\n  systems with `openat2(2)` (Linux 5.6) or systems with `fsopen(2)` or\n  `open_tree(2)` (Linux 5.2) and programs with privileges to use them (with\n  some caveats about locked mounts that probably affect very few users). For\n  other users, an attacker with the ability to create malicious mounts (on most\n  systems, a sysadmin) could trick you into operating on files you didn't\n  expect. This attack only really makes sense in the context of container\n  runtime implementations.\n\n  This was considered a reasonable trade-off, as the long-term intention was to\n  get all users to just switch to [libpathrs][] if they wanted to use the safe\n  `procfs` API (which had more extensive protections, and is what these new\n  protections in `filepath-securejoin` are based on). However, as the API\n  is now being exported it seems unwise to advertise the API as \"safe\" if we do\n  not protect against known attacks.\n\n  The procfs API is now more protected against attackers on systems lacking the\n  aforementioned protections. However, the most comprehensive of these\n  protections effectively rely on [`statx(STATX_MNT_ID)`][statx.2] (Linux 5.8).\n  On older kernel versions, there is no effective protection (there is some\n  minimal protection against non-`procfs` filesystem components but a\n  sufficiently clever attacker can work around those). In addition,\n  `STATX_MNT_ID` is vulnerable to mount ID reuse attacks by sufficiently\n  motivated and privileged attackers -- this problem is mitigated with\n  `STATX_MNT_ID_UNIQUE` (Linux 6.8) but that raises the minimum kernel version\n  for more protection.\n\n  The fact that these protections are quite limited despite needing a fair bit\n  of extra code to handle was one of the primary reasons we did not initially\n  implement this in `filepath-securejoin` ([libpathrs][] supports all of this,\n  of course).\n\n### Fixed ###\n- RHEL 8 kernels have backports of `fsopen(2)` but in some testing we've found\n  that it has very bad (and very difficult to debug) performance issues, and so\n  we will explicitly refuse to use `fsopen(2)` if the running kernel version is\n  pre-5.2 and will instead fallback to `open(\"/proc\")`.\n\n[CVE-2024-21626]: https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv\n[libpathrs]: https://github.com/cyphar/libpathrs\n[statx.2]: https://www.man7.org/linux/man-pages/man2/statx.2.html\n\n## [0.4.1] - 2025-01-28 ##\n\n### Fixed ###\n- The restrictions added for `root` paths passed to `SecureJoin` in 0.4.0 was\n  found to be too strict and caused some regressions when folks tried to\n  update, so this restriction has been relaxed to only return an error if the\n  path contains a `..` component. We still recommend users use `filepath.Clean`\n  (and even `filepath.EvalSymlinks`) on the `root` path they are using, but at\n  least you will no longer be punished for \"trivial\" unclean paths.\n\n## [0.4.0] - 2025-01-13 ##\n\n### Breaking ####\n- `SecureJoin(VFS)` will now return an error if the provided `root` is not a\n  `filepath.Clean`'d path.\n\n  While it is ultimately the responsibility of the caller to ensure the root is\n  a safe path to use, passing a path like `/symlink/..` as a root would result\n  in the `SecureJoin`'d path being placed in `/` even though `/symlink/..`\n  might be a different directory, and so we should more strongly discourage\n  such usage.\n\n  All major users of `securejoin.SecureJoin` already ensure that the paths they\n  provide are safe (and this is ultimately a question of user error), but\n  removing this foot-gun is probably a good idea. Of course, this is\n  necessarily a breaking API change (though we expect no real users to be\n  affected by it).\n\n  Thanks to [Erik Sjölund](https://github.com/eriksjolund), who initially\n  reported this issue as a possible security issue.\n\n- `MkdirAll` and `MkdirHandle` now take an `os.FileMode`-style mode argument\n  instead of a raw `unix.S_*`-style mode argument, which may cause compile-time\n  type errors depending on how you use `filepath-securejoin`. For most users,\n  there will be no change in behaviour aside from the type change (as the\n  bottom `0o777` bits are the same in both formats, and most users are probably\n  only using those bits).\n\n  However, if you were using `unix.S_ISVTX` to set the sticky bit with\n  `MkdirAll(Handle)` you will need to switch to `os.ModeSticky` otherwise you\n  will get a runtime error with this update. In addition, the error message you\n  will get from passing `unix.S_ISUID` and `unix.S_ISGID` will be different as\n  they are treated as invalid bits now (note that previously passing said bits\n  was also an error).\n\n## [0.3.6] - 2024-12-17 ##\n\n### Compatibility ###\n- The minimum Go version requirement for `filepath-securejoin` is now Go 1.18\n  (we use generics internally).\n\n  For reference, `filepath-securejoin@v0.3.0` somewhat-arbitrarily bumped the\n  Go version requirement to 1.21.\n\n  While we did make some use of Go 1.21 stdlib features (and in principle Go\n  versions <= 1.21 are no longer even supported by upstream anymore), some\n  downstreams have complained that the version bump has meant that they have to\n  do workarounds when backporting fixes that use the new `filepath-securejoin`\n  API onto old branches. This is not an ideal situation, but since using this\n  library is probably better for most downstreams than a hand-rolled\n  workaround, we now have compatibility shims that allow us to build on older\n  Go versions.\n- Lower minimum version requirement for `golang.org/x/sys` to `v0.18.0` (we\n  need the wrappers for `fsconfig(2)`), which should also make backporting\n  patches to older branches easier.\n\n## [0.3.5] - 2024-12-06 ##\n\n### Fixed ###\n- `MkdirAll` will now no longer return an `EEXIST` error if two racing\n  processes are creating the same directory. We will still verify that the path\n  is a directory, but this will avoid spurious errors when multiple threads or\n  programs are trying to `MkdirAll` the same path. opencontainers/runc#4543\n\n## [0.3.4] - 2024-10-09 ##\n\n### Fixed ###\n- Previously, some testing mocks we had resulted in us doing `import \"testing\"`\n  in non-`_test.go` code, which made some downstreams like Kubernetes unhappy.\n  This has been fixed. (#32)\n\n## [0.3.3] - 2024-09-30 ##\n\n### Fixed ###\n- The mode and owner verification logic in `MkdirAll` has been removed. This\n  was originally intended to protect against some theoretical attacks but upon\n  further consideration these protections don't actually buy us anything and\n  they were causing spurious errors with more complicated filesystem setups.\n- The \"is the created directory empty\" logic in `MkdirAll` has also been\n  removed. This was not causing us issues yet, but some pseudofilesystems (such\n  as `cgroup`) create non-empty directories and so this logic would've been\n  wrong for such cases.\n\n## [0.3.2] - 2024-09-13 ##\n\n### Changed ###\n- Passing the `S_ISUID` or `S_ISGID` modes to `MkdirAllInRoot` will now return\n  an explicit error saying that those bits are ignored by `mkdirat(2)`. In the\n  past a different error was returned, but since the silent ignoring behaviour\n  is codified in the man pages a more explicit error seems apt. While silently\n  ignoring these bits would be the most compatible option, it could lead to\n  users thinking their code sets these bits when it doesn't. Programs that need\n  to deal with compatibility can mask the bits themselves. (#23, #25)\n\n### Fixed ###\n- If a directory has `S_ISGID` set, then all child directories will have\n  `S_ISGID` set when created and a different gid will be used for any inode\n  created under the directory. Previously, the \"expected owner and mode\"\n  validation in `securejoin.MkdirAll` did not correctly handle this. We now\n  correctly handle this case. (#24, #25)\n\n## [0.3.1] - 2024-07-23 ##\n\n### Changed ###\n- By allowing `Open(at)InRoot` to opt-out of the extra work done by `MkdirAll`\n  to do the necessary \"partial lookups\", `Open(at)InRoot` now does less work\n  for both implementations (resulting in a many-fold decrease in the number of\n  operations for `openat2`, and a modest improvement for non-`openat2`) and is\n  far more guaranteed to match the correct `openat2(RESOLVE_IN_ROOT)`\n  behaviour.\n- We now use `readlinkat(fd, \"\")` where possible. For `Open(at)InRoot` this\n  effectively just means that we no longer risk getting spurious errors during\n  rename races. However, for our hardened procfs handler, this in theory should\n  prevent mount attacks from tricking us when doing magic-link readlinks (even\n  when using the unsafe host `/proc` handle). Unfortunately `Reopen` is still\n  potentially vulnerable to those kinds of somewhat-esoteric attacks.\n\n  Technically this [will only work on post-2.6.39 kernels][linux-readlinkat-emptypath]\n  but it seems incredibly unlikely anyone is using `filepath-securejoin` on a\n  pre-2011 kernel.\n\n### Fixed ###\n- Several improvements were made to the errors returned by `Open(at)InRoot` and\n  `MkdirAll` when dealing with invalid paths under the emulated (ie.\n  non-`openat2`) implementation. Previously, some paths would return the wrong\n  error (`ENOENT` when the last component was a non-directory), and other paths\n  would be returned as though they were acceptable (trailing-slash components\n  after a non-directory would be ignored by `Open(at)InRoot`).\n\n  These changes were done to match `openat2`'s behaviour and purely is a\n  consistency fix (most users are going to be using `openat2` anyway).\n\n[linux-readlinkat-emptypath]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65cfc6722361570bfe255698d9cd4dccaf47570d\n\n## [0.3.0] - 2024-07-11 ##\n\n### Added ###\n- A new set of `*os.File`-based APIs have been added. These are adapted from\n  [libpathrs][] and we strongly suggest using them if possible (as they provide\n  far more protection against attacks than `SecureJoin`):\n\n   - `Open(at)InRoot` resolves a path inside a rootfs and returns an `*os.File`\n     handle to the path. Note that the handle returned is an `O_PATH` handle,\n     which cannot be used for reading or writing (as well as some other\n     operations -- [see open(2) for more details][open.2])\n\n   - `Reopen` takes an `O_PATH` file handle and safely re-opens it to upgrade\n     it to a regular handle. This can also be used with non-`O_PATH` handles,\n     but `O_PATH` is the most obvious application.\n\n   - `MkdirAll` is an implementation of `os.MkdirAll` that is safe to use to\n     create a directory tree within a rootfs.\n\n  As these are new APIs, they may change in the future. However, they should be\n  safe to start migrating to as we have extensive tests ensuring they behave\n  correctly and are safe against various races and other attacks.\n\n[libpathrs]: https://github.com/cyphar/libpathrs\n[open.2]: https://www.man7.org/linux/man-pages/man2/open.2.html\n\n## [0.2.5] - 2024-05-03 ##\n\n### Changed ###\n- Some minor changes were made to how lexical components (like `..` and `.`)\n  are handled during path generation in `SecureJoin`. There is no behaviour\n  change as a result of this fix (the resulting paths are the same).\n\n### Fixed ###\n- The error returned when we hit a symlink loop now references the correct\n  path. (#10)\n\n## [0.2.4] - 2023-09-06 ##\n\n### Security ###\n- This release fixes a potential security issue in filepath-securejoin when\n  used on Windows ([GHSA-6xv5-86q9-7xr8][], which could be used to generate\n  paths outside of the provided rootfs in certain cases), as well as improving\n  the overall behaviour of filepath-securejoin when dealing with Windows paths\n  that contain volume names. Thanks to Paulo Gomes for discovering and fixing\n  these issues.\n\n### Fixed ###\n- Switch to GitHub Actions for CI so we can test on Windows as well as Linux\n  and MacOS.\n\n[GHSA-6xv5-86q9-7xr8]: https://github.com/advisories/GHSA-6xv5-86q9-7xr8\n\n## [0.2.3] - 2021-06-04 ##\n\n### Changed ###\n- Switch to Go 1.13-style `%w` error wrapping, letting us drop the dependency\n  on `github.com/pkg/errors`.\n\n## [0.2.2] - 2018-09-05 ##\n\n### Changed ###\n- Use `syscall.ELOOP` as the base error for symlink loops, rather than our own\n  (internal) error. This allows callers to more easily use `errors.Is` to check\n  for this case.\n\n## [0.2.1] - 2018-09-05 ##\n\n### Fixed ###\n- Use our own `IsNotExist` implementation, which lets us handle `ENOTDIR`\n  properly within `SecureJoin`.\n\n## [0.2.0] - 2017-07-19 ##\n\nWe now have 100% test coverage!\n\n### Added ###\n- Add a `SecureJoinVFS` API that can be used for mocking (as we do in our new\n  tests) or for implementing custom handling of lookup operations (such as for\n  rootless containers, where work is necessary to access directories with weird\n  modes because we don't have `CAP_DAC_READ_SEARCH` or `CAP_DAC_OVERRIDE`).\n\n## 0.1.0 - 2017-07-19\n\nThis is our first release of `github.com/cyphar/filepath-securejoin`,\ncontaining a full implementation with a coverage of 93.5% (the only missing\ncases are the error cases, which are hard to mocktest at the moment).\n\n[Unreleased]: https://github.com/cyphar/filepath-securejoin/compare/v0.6.1...HEAD\n[0.6.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.6.0...v0.6.1\n[0.6.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.5.0...v0.6.0\n[0.5.2]: https://github.com/cyphar/filepath-securejoin/compare/v0.5.1...v0.5.2\n[0.5.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.5.0...v0.5.1\n[0.5.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.4.1...v0.5.0\n[0.4.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.4.0...v0.4.1\n[0.4.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.6...v0.4.0\n[0.3.6]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.5...v0.3.6\n[0.3.5]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.4...v0.3.5\n[0.3.4]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.3...v0.3.4\n[0.3.3]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.2...v0.3.3\n[0.3.2]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.1...v0.3.2\n[0.3.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.3.0...v0.3.1\n[0.3.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.5...v0.3.0\n[0.2.5]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.4...v0.2.5\n[0.2.4]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4\n[0.2.3]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.2...v0.2.3\n[0.2.2]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.1...v0.2.2\n[0.2.1]: https://github.com/cyphar/filepath-securejoin/compare/v0.2.0...v0.2.1\n[0.2.0]: https://github.com/cyphar/filepath-securejoin/compare/v0.1.0...v0.2.0\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/COPYING.md",
    "content": "## COPYING ##\n\n`SPDX-License-Identifier: BSD-3-Clause AND MPL-2.0`\n\nThis project is made up of code licensed under different licenses. Which code\nyou use will have an impact on whether only one or both licenses apply to your\nusage of this library.\n\nNote that **each file** in this project individually has a code comment at the\nstart describing the license of that particular file -- this is the most\naccurate license information of this project; in case there is any conflict\nbetween this document and the comment at the start of a file, the comment shall\ntake precedence. The only purpose of this document is to work around [a known\ntechnical limitation of pkg.go.dev's license checking tool when dealing with\nnon-trivial project licenses][go75067].\n\n[go75067]: https://go.dev/issue/75067\n\n### `BSD-3-Clause` ###\n\nAt time of writing, the following files and directories are licensed under the\nBSD-3-Clause license:\n\n * `doc.go`\n * `join*.go`\n * `vfs.go`\n * `internal/consts/*.go`\n * `pathrs-lite/internal/gocompat/*.go`\n * `pathrs-lite/internal/kernelversion/*.go`\n\nThe text of the BSD-3-Clause license used by this project is the following (the\ntext is also available from the [`LICENSE.BSD`](./LICENSE.BSD) file):\n\n```\nCopyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved.\nCopyright (C) 2017-2024 SUSE LLC. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\n### `MPL-2.0` ###\n\nAll other files (unless otherwise marked) are licensed under the Mozilla Public\nLicense (version 2.0).\n\nThe text of the Mozilla Public License (version 2.0) is the following (the text\nis also available from the [`LICENSE.MPL-2.0`](./LICENSE.MPL-2.0) file):\n\n```\nMozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in\n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n```\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/LICENSE.BSD",
    "content": "Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved.\nCopyright (C) 2017-2024 SUSE LLC. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/LICENSE.MPL-2.0",
    "content": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n    means each individual or legal entity that creates, contributes to\n    the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n    means the combination of the Contributions of others (if any) used\n    by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n    means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n    means Source Code Form to which the initial Contributor has attached\n    the notice in Exhibit A, the Executable Form of such Source Code\n    Form, and Modifications of such Source Code Form, in each case\n    including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n    means\n\n    (a) that the initial Contributor has attached the notice described\n        in Exhibit B to the Covered Software; or\n\n    (b) that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the\n        terms of a Secondary License.\n\n1.6. \"Executable Form\"\n    means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n    means a work that combines Covered Software with other material, in\n    a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n    means this document.\n\n1.9. \"Licensable\"\n    means having the right to grant, to the maximum extent possible,\n    whether at the time of the initial grant or subsequently, any and\n    all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n    means any of the following:\n\n    (a) any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered\n        Software; or\n\n    (b) any new file in Source Code Form that contains any Covered\n        Software.\n\n1.11. \"Patent Claims\" of a Contributor\n    means any patent claim(s), including without limitation, method,\n    process, and apparatus claims, in any patent Licensable by such\n    Contributor that would be infringed, but for the grant of the\n    License, by the making, using, selling, offering for sale, having\n    made, import, or transfer of either its Contributions or its\n    Contributor Version.\n\n1.12. \"Secondary License\"\n    means either the GNU General Public License, Version 2.0, the GNU\n    Lesser General Public License, Version 2.1, the GNU Affero General\n    Public License, Version 3.0, or any later versions of those\n    licenses.\n\n1.13. \"Source Code Form\"\n    means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n    means an individual or a legal entity exercising rights under this\n    License. For legal entities, \"You\" includes any entity that\n    controls, is controlled by, or is under common control with You. For\n    purposes of this definition, \"control\" means (a) the power, direct\n    or indirect, to cause the direction or management of such entity,\n    whether by contract or otherwise, or (b) ownership of more than\n    fifty percent (50%) of the outstanding shares or beneficial\n    ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n    Licensable by such Contributor to use, reproduce, make available,\n    modify, display, perform, distribute, and otherwise exploit its\n    Contributions, either on an unmodified basis, with Modifications, or\n    as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n    for sale, have made, import, and otherwise transfer either its\n    Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n    or\n\n(b) for infringements caused by: (i) Your and any other third party's\n    modifications of Covered Software, or (ii) the combination of its\n    Contributions with other software (except as part of its Contributor\n    Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n    its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n    Form, as described in Section 3.1, and You must inform recipients of\n    the Executable Form how they can obtain a copy of such Source Code\n    Form by reasonable means in a timely manner, at a charge no more\n    than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n    License, or sublicense it under different terms, provided that the\n    license for the Executable Form does not attempt to limit or alter\n    the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n*                                                                      *\n*  6. Disclaimer of Warranty                                           *\n*  -------------------------                                           *\n*                                                                      *\n*  Covered Software is provided under this License on an \"as is\"       *\n*  basis, without warranty of any kind, either expressed, implied, or  *\n*  statutory, including, without limitation, warranties that the       *\n*  Covered Software is free of defects, merchantable, fit for a        *\n*  particular purpose or non-infringing. The entire risk as to the     *\n*  quality and performance of the Covered Software is with You.        *\n*  Should any Covered Software prove defective in any respect, You     *\n*  (not any Contributor) assume the cost of any necessary servicing,   *\n*  repair, or correction. This disclaimer of warranty constitutes an   *\n*  essential part of this License. No use of any Covered Software is   *\n*  authorized under this License except under this disclaimer.         *\n*                                                                      *\n************************************************************************\n\n************************************************************************\n*                                                                      *\n*  7. Limitation of Liability                                          *\n*  --------------------------                                          *\n*                                                                      *\n*  Under no circumstances and under no legal theory, whether tort      *\n*  (including negligence), contract, or otherwise, shall any           *\n*  Contributor, or anyone who distributes Covered Software as          *\n*  permitted above, be liable to You for any direct, indirect,         *\n*  special, incidental, or consequential damages of any character      *\n*  including, without limitation, damages for lost profits, loss of    *\n*  goodwill, work stoppage, computer failure or malfunction, or any    *\n*  and all other commercial damages or losses, even if such party      *\n*  shall have been informed of the possibility of such damages. This   *\n*  limitation of liability shall not apply to liability for death or   *\n*  personal injury resulting from such party's negligence to the       *\n*  extent applicable law prohibits such limitation. Some               *\n*  jurisdictions do not allow the exclusion or limitation of           *\n*  incidental or consequential damages, so this exclusion and          *\n*  limitation may not apply to You.                                    *\n*                                                                      *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n  This Source Code Form is subject to the terms of the Mozilla Public\n  License, v. 2.0. If a copy of the MPL was not distributed with this\n  file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n  This Source Code Form is \"Incompatible With Secondary Licenses\", as\n  defined by the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/README.md",
    "content": "## `filepath-securejoin` ##\n\n[![Go Documentation](https://pkg.go.dev/badge/github.com/cyphar/filepath-securejoin.svg)](https://pkg.go.dev/github.com/cyphar/filepath-securejoin)\n[![Build Status](https://github.com/cyphar/filepath-securejoin/actions/workflows/ci.yml/badge.svg)](https://github.com/cyphar/filepath-securejoin/actions/workflows/ci.yml)\n\n### Old API ###\n\nThis library was originally just an implementation of `SecureJoin` which was\n[intended to be included in the Go standard library][go#20126] as a safer\n`filepath.Join` that would restrict the path lookup to be inside a root\ndirectory.\n\nThe implementation was based on code that existed in several container\nruntimes. Unfortunately, this API is **fundamentally unsafe** against attackers\nthat can modify path components after `SecureJoin` returns and before the\ncaller uses the path, allowing for some fairly trivial TOCTOU attacks.\n\n`SecureJoin` (and `SecureJoinVFS`) are still provided by this library to\nsupport legacy users, but new users are strongly suggested to avoid using\n`SecureJoin` and instead use the [new api](#new-api) or switch to\n[libpathrs][libpathrs].\n\nWith the above limitations in mind, this library guarantees the following:\n\n* If no error is set, the resulting string **must** be a child path of\n  `root` and will not contain any symlink path components (they will all be\n  expanded).\n\n* When expanding symlinks, all symlink path components **must** be resolved\n  relative to the provided root. In particular, this can be considered a\n  userspace implementation of how `chroot(2)` operates on file paths. Note that\n  these symlinks will **not** be expanded lexically (`filepath.Clean` is not\n  called on the input before processing).\n\n* Non-existent path components are unaffected by `SecureJoin` (similar to\n  `filepath.EvalSymlinks`'s semantics).\n\n* The returned path will always be `filepath.Clean`ed and thus not contain any\n  `..` components.\n\nA (trivial) implementation of this function on GNU/Linux systems could be done\nwith the following (note that this requires root privileges and is far more\nopaque than the implementation in this library, and also requires that\n`readlink` is inside the `root` path and is trustworthy):\n\n```go\npackage securejoin\n\nimport (\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\nfunc SecureJoin(root, unsafePath string) (string, error) {\n\tunsafePath = string(filepath.Separator) + unsafePath\n\tcmd := exec.Command(\"chroot\", root,\n\t\t\"readlink\", \"--canonicalize-missing\", \"--no-newline\", unsafePath)\n\toutput, err := cmd.CombinedOutput()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\texpanded := string(output)\n\treturn filepath.Join(root, expanded), nil\n}\n```\n\n[libpathrs]: https://github.com/openSUSE/libpathrs\n[go#20126]: https://github.com/golang/go/issues/20126\n\n### <a name=\"new-api\" /> New API ###\n[#new-api]: #new-api\n\nWhile we recommend users switch to [libpathrs][libpathrs] as soon as it has a\nstable release, some methods implemented by libpathrs have been ported to this\nlibrary to ease the transition. These APIs are only supported on Linux.\n\nThese APIs are implemented such that `filepath-securejoin` will\nopportunistically use certain newer kernel APIs that make these operations far\nmore secure. In particular:\n\n* All of the lookup operations will use [`openat2`][openat2.2] on new enough\n  kernels (Linux 5.6 or later) to restrict lookups through magic-links and\n  bind-mounts (for certain operations) and to make use of `RESOLVE_IN_ROOT` to\n  efficiently resolve symlinks within a rootfs.\n\n* The APIs provide hardening against a malicious `/proc` mount to either detect\n  or avoid being tricked by a `/proc` that is not legitimate. This is done\n  using [`openat2`][openat2.2] for all users, and privileged users will also be\n  further protected by using [`fsopen`][fsopen.2] and [`open_tree`][open_tree.2]\n  (Linux 5.2 or later).\n\n[openat2.2]: https://www.man7.org/linux/man-pages/man2/openat2.2.html\n[fsopen.2]: https://github.com/brauner/man-pages-md/blob/main/fsopen.md\n[open_tree.2]: https://github.com/brauner/man-pages-md/blob/main/open_tree.md\n\n#### `OpenInRoot` ####\n\n```go\nfunc OpenInRoot(root, unsafePath string) (*os.File, error)\nfunc OpenatInRoot(root *os.File, unsafePath string) (*os.File, error)\nfunc Reopen(handle *os.File, flags int) (*os.File, error)\n```\n\n`OpenInRoot` is a much safer version of\n\n```go\npath, err := securejoin.SecureJoin(root, unsafePath)\nfile, err := os.OpenFile(path, unix.O_PATH|unix.O_CLOEXEC)\n```\n\nthat protects against various race attacks that could lead to serious security\nissues, depending on the application. Note that the returned `*os.File` is an\n`O_PATH` file descriptor, which is quite restricted. Callers will probably need\nto use `Reopen` to get a more usable handle (this split is done to provide\nuseful features like PTY spawning and to avoid users accidentally opening bad\ninodes that could cause a DoS).\n\nCallers need to be careful in how they use the returned `*os.File`. Usually it\nis only safe to operate on the handle directly, and it is very easy to create a\nsecurity issue. [libpathrs][libpathrs] provides far more helpers to make using\nthese handles safer -- there is currently no plan to port them to\n`filepath-securejoin`.\n\n`OpenatInRoot` is like `OpenInRoot` except that the root is provided using an\n`*os.File`. This allows you to ensure that multiple `OpenatInRoot` (or\n`MkdirAllHandle`) calls are operating on the same rootfs.\n\n> **NOTE**: Unlike `SecureJoin`, `OpenInRoot` will error out as soon as it hits\n> a dangling symlink or non-existent path. This is in contrast to `SecureJoin`\n> which treated non-existent components as though they were real directories,\n> and would allow for partial resolution of dangling symlinks. These behaviours\n> are at odds with how Linux treats non-existent paths and dangling symlinks,\n> and so these are no longer allowed.\n\n#### `MkdirAll` ####\n\n```go\nfunc MkdirAll(root, unsafePath string, mode int) error\nfunc MkdirAllHandle(root *os.File, unsafePath string, mode int) (*os.File, error)\n```\n\n`MkdirAll` is a much safer version of\n\n```go\npath, err := securejoin.SecureJoin(root, unsafePath)\nerr = os.MkdirAll(path, mode)\n```\n\nthat protects against the same kinds of races that `OpenInRoot` protects\nagainst.\n\n`MkdirAllHandle` is like `MkdirAll` except that the root is provided using an\n`*os.File` (the reason for this is the same as with `OpenatInRoot`) and an\n`*os.File` of the final created directory is returned (this directory is\nguaranteed to be effectively identical to the directory created by\n`MkdirAllHandle`, which is not possible to ensure by just using `OpenatInRoot`\nafter `MkdirAll`).\n\n> **NOTE**: Unlike `SecureJoin`, `MkdirAll` will error out as soon as it hits\n> a dangling symlink or non-existent path. This is in contrast to `SecureJoin`\n> which treated non-existent components as though they were real directories,\n> and would allow for partial resolution of dangling symlinks. These behaviours\n> are at odds with how Linux treats non-existent paths and dangling symlinks,\n> and so these are no longer allowed. This means that `MkdirAll` will not\n> create non-existent directories referenced by a dangling symlink.\n\n### License ###\n\n`SPDX-License-Identifier: BSD-3-Clause AND MPL-2.0`\n\nSome of the code in this project is derived from Go, and is licensed under a\nBSD 3-clause license (available in `LICENSE.BSD`). Other files (many of which\nare derived from [libpathrs][libpathrs]) are licensed under the Mozilla Public\nLicense version 2.0 (available in `LICENSE.MPL-2.0`). If you are using the\n[\"New API\" described above][#new-api], you are probably using code from files\nreleased under this license.\n\nEvery source file in this project has a copyright header describing its\nlicense. Please check the license headers of each file to see what license\napplies to it.\n\nSee [COPYING.md](./COPYING.md) for some more details.\n\n[umoci]: https://github.com/opencontainers/umoci\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/VERSION",
    "content": "0.6.1\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/codecov.yml",
    "content": "# SPDX-License-Identifier: MPL-2.0\n\n# Copyright (C) 2025 Aleksa Sarai <cyphar@cyphar.com>\n# Copyright (C) 2025 SUSE LLC\n#\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\ncomment:\n  layout: \"condensed_header, reach, diff, components, condensed_files, condensed_footer\"\n  require_changes: true\n  branches:\n    - main\n\ncoverage:\n  range: 60..100\n  status:\n    project:\n      default:\n        target: 85%\n        threshold: 0%\n    patch:\n      default:\n        target: auto\n        informational: true\n\ngithub_checks:\n  annotations: false\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/doc.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n// Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved.\n// Copyright (C) 2017-2024 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package securejoin implements a set of helpers to make it easier to write Go\n// code that is safe against symlink-related escape attacks. The primary idea\n// is to let you resolve a path within a rootfs directory as if the rootfs was\n// a chroot.\n//\n// securejoin has two APIs, a \"legacy\" API and a \"modern\" API.\n//\n// The legacy API is [SecureJoin] and [SecureJoinVFS]. These methods are\n// **not** safe against race conditions where an attacker changes the\n// filesystem after (or during) the [SecureJoin] operation.\n//\n// The new API is available in the [pathrs-lite] subpackage, and provide\n// protections against racing attackers as well as several other key\n// protections against attacks often seen by container runtimes. As the name\n// suggests, [pathrs-lite] is a stripped down (pure Go) reimplementation of\n// [libpathrs]. The main APIs provided are [OpenInRoot], [MkdirAll], and\n// [procfs.Handle] -- other APIs are not planned to be ported. The long-term\n// goal is for users to migrate to [libpathrs] which is more fully-featured.\n//\n// securejoin has been used by several container runtimes (Docker, runc,\n// Kubernetes, etc) for quite a few years as a de-facto standard for operating\n// on container filesystem paths \"safely\". However, most users still use the\n// legacy API which is unsafe against various attacks (there is a fairly long\n// history of CVEs in dependent as a result). Users should switch to the modern\n// API as soon as possible (or even better, switch to libpathrs).\n//\n// This project was initially intended to be included in the Go standard\n// library, but it was rejected (see https://go.dev/issue/20126). Much later,\n// [os.Root] was added to the Go stdlib that shares some of the goals of\n// filepath-securejoin. However, its design is intended to work like\n// openat2(RESOLVE_BENEATH) which does not fit the usecase of container\n// runtimes and most system tools.\n//\n// [pathrs-lite]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite\n// [libpathrs]: https://github.com/openSUSE/libpathrs\n// [OpenInRoot]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite#OpenInRoot\n// [MkdirAll]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite#MkdirAll\n// [procfs.Handle]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin/pathrs-lite/procfs#Handle\n// [os.Root]: https:///pkg.go.dev/os#Root\npackage securejoin\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/internal/consts/consts.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n// Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved.\n// Copyright (C) 2017-2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package consts contains the definitions of internal constants used\n// throughout filepath-securejoin.\npackage consts\n\n// MaxSymlinkLimit is the maximum number of symlinks that can be encountered\n// during a single lookup before returning -ELOOP. At time of writing, Linux\n// has an internal limit of 40.\nconst MaxSymlinkLimit = 255\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/join.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n// Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved.\n// Copyright (C) 2017-2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage securejoin\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/cyphar/filepath-securejoin/internal/consts\"\n)\n\n// IsNotExist tells you if err is an error that implies that either the path\n// accessed does not exist (or path components don't exist). This is\n// effectively a more broad version of [os.IsNotExist].\nfunc IsNotExist(err error) bool {\n\t// Check that it's not actually an ENOTDIR, which in some cases is a more\n\t// convoluted case of ENOENT (usually involving weird paths).\n\treturn errors.Is(err, os.ErrNotExist) || errors.Is(err, syscall.ENOTDIR) || errors.Is(err, syscall.ENOENT)\n}\n\n// errUnsafeRoot is returned if the user provides SecureJoinVFS with a path\n// that contains \"..\" components.\nvar errUnsafeRoot = errors.New(\"root path provided to SecureJoin contains '..' components\")\n\n// stripVolume just gets rid of the Windows volume included in a path. Based on\n// some godbolt tests, the Go compiler is smart enough to make this a no-op on\n// Linux.\nfunc stripVolume(path string) string {\n\treturn path[len(filepath.VolumeName(path)):]\n}\n\n// hasDotDot checks if the path contains \"..\" components in a platform-agnostic\n// way.\nfunc hasDotDot(path string) bool {\n\t// If we are on Windows, strip any volume letters. It turns out that\n\t// C:..\\foo may (or may not) be a valid pathname and we need to handle that\n\t// leading \"..\".\n\tpath = stripVolume(path)\n\t// Look for \"/../\" in the path, but we need to handle leading and trailing\n\t// \"..\"s by adding separators. Doing this with filepath.Separator is ugly\n\t// so just convert to Unix-style \"/\" first.\n\tpath = filepath.ToSlash(path)\n\treturn strings.Contains(\"/\"+path+\"/\", \"/../\")\n}\n\n// SecureJoinVFS joins the two given path components (similar to\n// [filepath.Join]) except that the returned path is guaranteed to be scoped\n// inside the provided root path (when evaluated). Any symbolic links in the\n// path are evaluated with the given root treated as the root of the\n// filesystem, similar to a chroot. The filesystem state is evaluated through\n// the given [VFS] interface (if nil, the standard [os].* family of functions\n// are used).\n//\n// Note that the guarantees provided by this function only apply if the path\n// components in the returned string are not modified (in other words are not\n// replaced with symlinks on the filesystem) after this function has returned.\n// Such a symlink race is necessarily out-of-scope of SecureJoinVFS.\n//\n// NOTE: Due to the above limitation, Linux users are strongly encouraged to\n// use [OpenInRoot] instead, which does safely protect against these kinds of\n// attacks. There is no way to solve this problem with SecureJoinVFS because\n// the API is fundamentally wrong (you cannot return a \"safe\" path string and\n// guarantee it won't be modified afterwards).\n//\n// Volume names in unsafePath are always discarded, regardless if they are\n// provided via direct input or when evaluating symlinks. Therefore:\n//\n// \"C:\\Temp\" + \"D:\\path\\to\\file.txt\" results in \"C:\\Temp\\path\\to\\file.txt\"\n//\n// If the provided root is not [filepath.Clean] then an error will be returned,\n// as such root paths are bordering on somewhat unsafe and using such paths is\n// not best practice. We also strongly suggest that any root path is first\n// fully resolved using [filepath.EvalSymlinks] or otherwise constructed to\n// avoid containing symlink components. Of course, the root also *must not* be\n// attacker-controlled.\nfunc SecureJoinVFS(root, unsafePath string, vfs VFS) (string, error) { //nolint:revive // name is part of public API\n\t// The root path must not contain \"..\" components, otherwise when we join\n\t// the subpath we will end up with a weird path. We could work around this\n\t// in other ways but users shouldn't be giving us non-lexical root paths in\n\t// the first place.\n\tif hasDotDot(root) {\n\t\treturn \"\", errUnsafeRoot\n\t}\n\n\t// Use the os.* VFS implementation if none was specified.\n\tif vfs == nil {\n\t\tvfs = osVFS{}\n\t}\n\n\tunsafePath = filepath.FromSlash(unsafePath)\n\tvar (\n\t\tcurrentPath   string\n\t\tremainingPath = unsafePath\n\t\tlinksWalked   int\n\t)\n\tfor remainingPath != \"\" {\n\t\t// On Windows, if we managed to end up at a path referencing a volume,\n\t\t// drop the volume to make sure we don't end up with broken paths or\n\t\t// escaping the root volume.\n\t\tremainingPath = stripVolume(remainingPath)\n\n\t\t// Get the next path component.\n\t\tvar part string\n\t\tif i := strings.IndexRune(remainingPath, filepath.Separator); i == -1 {\n\t\t\tpart, remainingPath = remainingPath, \"\"\n\t\t} else {\n\t\t\tpart, remainingPath = remainingPath[:i], remainingPath[i+1:]\n\t\t}\n\n\t\t// Apply the component lexically to the path we are building.\n\t\t// currentPath does not contain any symlinks, and we are lexically\n\t\t// dealing with a single component, so it's okay to do a filepath.Clean\n\t\t// here.\n\t\tnextPath := filepath.Join(string(filepath.Separator), currentPath, part)\n\t\tif nextPath == string(filepath.Separator) {\n\t\t\tcurrentPath = \"\"\n\t\t\tcontinue\n\t\t}\n\t\tfullPath := root + string(filepath.Separator) + nextPath\n\n\t\t// Figure out whether the path is a symlink.\n\t\tfi, err := vfs.Lstat(fullPath)\n\t\tif err != nil && !IsNotExist(err) {\n\t\t\treturn \"\", err\n\t\t}\n\t\t// Treat non-existent path components the same as non-symlinks (we\n\t\t// can't do any better here).\n\t\tif IsNotExist(err) || fi.Mode()&os.ModeSymlink == 0 {\n\t\t\tcurrentPath = nextPath\n\t\t\tcontinue\n\t\t}\n\n\t\t// It's a symlink, so get its contents and expand it by prepending it\n\t\t// to the yet-unparsed path.\n\t\tlinksWalked++\n\t\tif linksWalked > consts.MaxSymlinkLimit {\n\t\t\treturn \"\", &os.PathError{Op: \"SecureJoin\", Path: root + string(filepath.Separator) + unsafePath, Err: syscall.ELOOP}\n\t\t}\n\n\t\tdest, err := vfs.Readlink(fullPath)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tremainingPath = dest + string(filepath.Separator) + remainingPath\n\t\t// Absolute symlinks reset any work we've already done.\n\t\tif filepath.IsAbs(dest) {\n\t\t\tcurrentPath = \"\"\n\t\t}\n\t}\n\n\t// There should be no lexical components like \"..\" left in the path here,\n\t// but for safety clean up the path before joining it to the root.\n\tfinalPath := filepath.Join(string(filepath.Separator), currentPath)\n\treturn filepath.Join(root, finalPath), nil\n}\n\n// SecureJoin is a wrapper around [SecureJoinVFS] that just uses the [os].* library\n// of functions as the [VFS]. If in doubt, use this function over [SecureJoinVFS].\nfunc SecureJoin(root, unsafePath string) (string, error) {\n\treturn SecureJoinVFS(root, unsafePath, nil)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/README.md",
    "content": "## `pathrs-lite` ##\n\n`github.com/cyphar/filepath-securejoin/pathrs-lite` provides a minimal **pure\nGo** implementation of the core bits of [libpathrs][]. This is not intended to\nbe a complete replacement for libpathrs, instead it is mainly intended to be\nuseful as a transition tool for existing Go projects.\n\n`pathrs-lite` also provides a very easy way to switch to `libpathrs` (even for\ndownstreams where `pathrs-lite` is being used in a third-party package and is\nnot interested in using CGo). At build time, if you use the `libpathrs` build\ntag then `pathrs-lite` will use `libpathrs` directly instead of the pure Go\nimplementation. The two backends are functionally equivalent (and we have\nintegration tests to verify this), so this migration should be very easy with\nno user-visible impact.\n\n[libpathrs]: https://github.com/cyphar/libpathrs\n\n### License ###\n\nMost of this subpackage is licensed under the Mozilla Public License (version\n2.0). For more information, see the top-level [COPYING.md][] and\n[LICENSE.MPL-2.0][] files, as well as the individual license headers for each\nfile.\n\n```\nCopyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\nCopyright (C) 2024-2025 SUSE LLC\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at https://mozilla.org/MPL/2.0/.\n```\n\n[COPYING.md]: ../COPYING.md\n[LICENSE.MPL-2.0]: ../LICENSE.MPL-2.0\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/doc.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package pathrs (pathrs-lite) is a less complete pure Go implementation of\n// some of the APIs provided by [libpathrs].\n//\n// [libpathrs]: https://github.com/cyphar/libpathrs\npackage pathrs\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/assert/assert.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n// Copyright (C) 2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package assert provides some basic assertion helpers for Go.\npackage assert\n\nimport (\n\t\"fmt\"\n)\n\n// Assert panics if the predicate is false with the provided argument.\nfunc Assert(predicate bool, msg any) {\n\tif !predicate {\n\t\tpanic(msg)\n\t}\n}\n\n// Assertf panics if the predicate is false and formats the message using the\n// same formatting as [fmt.Printf].\n//\n// [fmt.Printf]: https://pkg.go.dev/fmt#Printf\nfunc Assertf(predicate bool, fmtMsg string, args ...any) {\n\tAssert(predicate, fmt.Sprintf(fmtMsg, args...))\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/errors_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package internal contains unexported common code for filepath-securejoin.\npackage internal\n\nimport (\n\t\"errors\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\ntype xdevErrorish struct {\n\tdescription string\n}\n\nfunc (err xdevErrorish) Error() string        { return err.description }\nfunc (err xdevErrorish) Is(target error) bool { return target == unix.EXDEV }\n\nvar (\n\t// ErrPossibleAttack indicates that some attack was detected.\n\tErrPossibleAttack error = xdevErrorish{\"possible attack detected\"}\n\n\t// ErrPossibleBreakout indicates that during an operation we ended up in a\n\t// state that could be a breakout but we detected it.\n\tErrPossibleBreakout error = xdevErrorish{\"possible breakout detected\"}\n\n\t// ErrInvalidDirectory indicates an unlinked directory.\n\tErrInvalidDirectory = errors.New(\"wandered into deleted directory\")\n\n\t// ErrDeletedInode indicates an unlinked file (non-directory).\n\tErrDeletedInode = errors.New(\"cannot verify path of deleted inode\")\n)\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/at_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage fd\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n)\n\n// prepareAtWith returns -EBADF (an invalid fd) if dir is nil, otherwise using\n// the dir.Fd(). We use -EBADF because in filepath-securejoin we generally\n// don't want to allow relative-to-cwd paths. The returned path is an\n// *informational* string that describes a reasonable pathname for the given\n// *at(2) arguments. You must not use the full path for any actual filesystem\n// operations.\nfunc prepareAt(dir Fd, path string) (dirFd int, unsafeUnmaskedPath string) {\n\tdirFd, dirPath := -int(unix.EBADF), \".\"\n\tif dir != nil {\n\t\tdirFd, dirPath = int(dir.Fd()), dir.Name()\n\t}\n\tif !filepath.IsAbs(path) {\n\t\t// only prepend the dirfd path for relative paths\n\t\tpath = dirPath + \"/\" + path\n\t}\n\t// NOTE: If path is \".\" or \"\", the returned path won't be filepath.Clean,\n\t// but that's okay since this path is either used for errors (in which case\n\t// a trailing \"/\" or \"/.\" is important information) or will be\n\t// filepath.Clean'd later (in the case of fd.Openat).\n\treturn dirFd, path\n}\n\n// Openat is an [Fd]-based wrapper around unix.Openat.\nfunc Openat(dir Fd, path string, flags int, mode int) (*os.File, error) { //nolint:unparam // wrapper func\n\tdirFd, fullPath := prepareAt(dir, path)\n\t// Make sure we always set O_CLOEXEC.\n\tflags |= unix.O_CLOEXEC\n\tfd, err := unix.Openat(dirFd, path, flags, uint32(mode))\n\tif err != nil {\n\t\treturn nil, &os.PathError{Op: \"openat\", Path: fullPath, Err: err}\n\t}\n\truntime.KeepAlive(dir)\n\t// openat is only used with lexically-safe paths so we can use\n\t// filepath.Clean here, and also the path itself is not going to be used\n\t// for actual path operations.\n\tfullPath = filepath.Clean(fullPath)\n\treturn os.NewFile(uintptr(fd), fullPath), nil\n}\n\n// Fstatat is an [Fd]-based wrapper around unix.Fstatat.\nfunc Fstatat(dir Fd, path string, flags int) (unix.Stat_t, error) {\n\tdirFd, fullPath := prepareAt(dir, path)\n\tvar stat unix.Stat_t\n\tif err := unix.Fstatat(dirFd, path, &stat, flags); err != nil {\n\t\treturn stat, &os.PathError{Op: \"fstatat\", Path: fullPath, Err: err}\n\t}\n\truntime.KeepAlive(dir)\n\treturn stat, nil\n}\n\n// Faccessat is an [Fd]-based wrapper around unix.Faccessat.\nfunc Faccessat(dir Fd, path string, mode uint32, flags int) error {\n\tdirFd, fullPath := prepareAt(dir, path)\n\terr := unix.Faccessat(dirFd, path, mode, flags)\n\tif err != nil {\n\t\terr = &os.PathError{Op: \"faccessat\", Path: fullPath, Err: err}\n\t}\n\truntime.KeepAlive(dir)\n\treturn err\n}\n\n// Readlinkat is an [Fd]-based wrapper around unix.Readlinkat.\nfunc Readlinkat(dir Fd, path string) (string, error) {\n\tdirFd, fullPath := prepareAt(dir, path)\n\tsize := 4096\n\tfor {\n\t\tlinkBuf := make([]byte, size)\n\t\tn, err := unix.Readlinkat(dirFd, path, linkBuf)\n\t\tif err != nil {\n\t\t\treturn \"\", &os.PathError{Op: \"readlinkat\", Path: fullPath, Err: err}\n\t\t}\n\t\truntime.KeepAlive(dir)\n\t\tif n != size {\n\t\t\treturn string(linkBuf[:n]), nil\n\t\t}\n\t\t// Possible truncation, resize the buffer.\n\t\tsize *= 2\n\t}\n}\n\nconst (\n\t// STATX_MNT_ID_UNIQUE is provided in golang.org/x/sys@v0.20.0, but in order to\n\t// avoid bumping the requirement for a single constant we can just define it\n\t// ourselves.\n\t_STATX_MNT_ID_UNIQUE = 0x4000 //nolint:revive // unix.* name\n\n\t// We don't care which mount ID we get. The kernel will give us the unique\n\t// one if it is supported. If the kernel doesn't support\n\t// STATX_MNT_ID_UNIQUE, the bit is ignored and the returned request mask\n\t// will only contain STATX_MNT_ID (if supported).\n\twantStatxMntMask = _STATX_MNT_ID_UNIQUE | unix.STATX_MNT_ID\n)\n\nvar hasStatxMountID = gocompat.SyncOnceValue(func() bool {\n\tvar stx unix.Statx_t\n\terr := unix.Statx(-int(unix.EBADF), \"/\", 0, wantStatxMntMask, &stx)\n\treturn err == nil && stx.Mask&wantStatxMntMask != 0\n})\n\n// GetMountID gets the mount identifier associated with the fd and path\n// combination. It is effectively a wrapper around fetching\n// STATX_MNT_ID{,_UNIQUE} with unix.Statx, but with a fallback to 0 if the\n// kernel doesn't support the feature.\nfunc GetMountID(dir Fd, path string) (uint64, error) {\n\t// If we don't have statx(STATX_MNT_ID*) support, we can't do anything.\n\tif !hasStatxMountID() {\n\t\treturn 0, nil\n\t}\n\n\tdirFd, fullPath := prepareAt(dir, path)\n\n\tvar stx unix.Statx_t\n\terr := unix.Statx(dirFd, path, unix.AT_EMPTY_PATH|unix.AT_SYMLINK_NOFOLLOW, wantStatxMntMask, &stx)\n\tif stx.Mask&wantStatxMntMask == 0 {\n\t\t// It's not a kernel limitation, for some reason we couldn't get a\n\t\t// mount ID. Assume it's some kind of attack.\n\t\terr = fmt.Errorf(\"could not get mount id: %w\", err)\n\t}\n\tif err != nil {\n\t\treturn 0, &os.PathError{Op: \"statx(STATX_MNT_ID_...)\", Path: fullPath, Err: err}\n\t}\n\truntime.KeepAlive(dir)\n\treturn stx.Mnt_id, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/fd.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n// Copyright (C) 2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package fd provides a drop-in interface-based replacement of [*os.File] that\n// allows for things like noop-Close wrappers to be used.\n//\n// [*os.File]: https://pkg.go.dev/os#File\npackage fd\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\n// Fd is an interface that mirrors most of the API of [*os.File], allowing you\n// to create wrappers that can be used in place of [*os.File].\n//\n// [*os.File]: https://pkg.go.dev/os#File\ntype Fd interface {\n\tio.Closer\n\tName() string\n\tFd() uintptr\n}\n\n// Compile-time interface checks.\nvar (\n\t_ Fd = (*os.File)(nil)\n\t_ Fd = noClose{}\n)\n\ntype noClose struct{ inner Fd }\n\nfunc (f noClose) Name() string { return f.inner.Name() }\nfunc (f noClose) Fd() uintptr  { return f.inner.Fd() }\n\nfunc (f noClose) Close() error { return nil }\n\n// NopCloser returns an [*os.File]-like object where the [Close] method is now\n// a no-op.\n//\n// Note that for [*os.File] and similar objects, the Go garbage collector will\n// still call [Close] on the underlying file unless you use\n// [runtime.SetFinalizer] to disable this behaviour. This is up to the caller\n// to do (if necessary).\n//\n// [*os.File]: https://pkg.go.dev/os#File\n// [Close]: https://pkg.go.dev/io#Closer\n// [runtime.SetFinalizer]: https://pkg.go.dev/runtime#SetFinalizer\nfunc NopCloser(f Fd) Fd { return noClose{inner: f} }\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/fd_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage fd\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal\"\n)\n\n// DupWithName creates a new file descriptor referencing the same underlying\n// file, but with the provided name instead of fd.Name().\nfunc DupWithName(fd Fd, name string) (*os.File, error) {\n\tfd2, err := unix.FcntlInt(fd.Fd(), unix.F_DUPFD_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, os.NewSyscallError(\"fcntl(F_DUPFD_CLOEXEC)\", err)\n\t}\n\truntime.KeepAlive(fd)\n\treturn os.NewFile(uintptr(fd2), name), nil\n}\n\n// Dup creates a new file description referencing the same underlying file.\nfunc Dup(fd Fd) (*os.File, error) {\n\treturn DupWithName(fd, fd.Name())\n}\n\n// Fstat is an [Fd]-based wrapper around unix.Fstat.\nfunc Fstat(fd Fd) (unix.Stat_t, error) {\n\tvar stat unix.Stat_t\n\tif err := unix.Fstat(int(fd.Fd()), &stat); err != nil {\n\t\treturn stat, &os.PathError{Op: \"fstat\", Path: fd.Name(), Err: err}\n\t}\n\truntime.KeepAlive(fd)\n\treturn stat, nil\n}\n\n// Fstatfs is an [Fd]-based wrapper around unix.Fstatfs.\nfunc Fstatfs(fd Fd) (unix.Statfs_t, error) {\n\tvar statfs unix.Statfs_t\n\tif err := unix.Fstatfs(int(fd.Fd()), &statfs); err != nil {\n\t\treturn statfs, &os.PathError{Op: \"fstatfs\", Path: fd.Name(), Err: err}\n\t}\n\truntime.KeepAlive(fd)\n\treturn statfs, nil\n}\n\n// IsDeadInode detects whether the file has been unlinked from a filesystem and\n// is thus a \"dead inode\" from the kernel's perspective.\nfunc IsDeadInode(file Fd) error {\n\t// If the nlink of a file drops to 0, there is an attacker deleting\n\t// directories during our walk, which could result in weird /proc values.\n\t// It's better to error out in this case.\n\tstat, err := Fstat(file)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"check for dead inode: %w\", err)\n\t}\n\tif stat.Nlink == 0 {\n\t\terr := internal.ErrDeletedInode\n\t\tif stat.Mode&unix.S_IFMT == unix.S_IFDIR {\n\t\t\terr = internal.ErrInvalidDirectory\n\t\t}\n\t\treturn fmt.Errorf(\"%w %q\", err, file.Name())\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/mount_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage fd\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Fsopen is an [Fd]-based wrapper around unix.Fsopen.\nfunc Fsopen(fsName string, flags int) (*os.File, error) {\n\t// Make sure we always set O_CLOEXEC.\n\tflags |= unix.FSOPEN_CLOEXEC\n\tfd, err := unix.Fsopen(fsName, flags)\n\tif err != nil {\n\t\treturn nil, os.NewSyscallError(\"fsopen \"+fsName, err)\n\t}\n\treturn os.NewFile(uintptr(fd), \"fscontext:\"+fsName), nil\n}\n\n// Fsmount is an [Fd]-based wrapper around unix.Fsmount.\nfunc Fsmount(ctx Fd, flags, mountAttrs int) (*os.File, error) {\n\t// Make sure we always set O_CLOEXEC.\n\tflags |= unix.FSMOUNT_CLOEXEC\n\tfd, err := unix.Fsmount(int(ctx.Fd()), flags, mountAttrs)\n\tif err != nil {\n\t\treturn nil, os.NewSyscallError(\"fsmount \"+ctx.Name(), err)\n\t}\n\treturn os.NewFile(uintptr(fd), \"fsmount:\"+ctx.Name()), nil\n}\n\n// OpenTree is an [Fd]-based wrapper around unix.OpenTree.\nfunc OpenTree(dir Fd, path string, flags uint) (*os.File, error) {\n\tdirFd, fullPath := prepareAt(dir, path)\n\t// Make sure we always set O_CLOEXEC.\n\tflags |= unix.OPEN_TREE_CLOEXEC\n\tfd, err := unix.OpenTree(dirFd, path, flags)\n\tif err != nil {\n\t\treturn nil, &os.PathError{Op: \"open_tree\", Path: fullPath, Err: err}\n\t}\n\truntime.KeepAlive(dir)\n\treturn os.NewFile(uintptr(fd), fullPath), nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd/openat2_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage fd\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"runtime\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc scopedLookupShouldRetry(how *unix.OpenHow, err error) bool {\n\t// RESOLVE_IN_ROOT (and RESOLVE_BENEATH) can return -EAGAIN if we resolve\n\t// \"..\" while a mount or rename occurs anywhere on the system. This could\n\t// happen spuriously, or as the result of an attacker trying to mess with\n\t// us during lookup.\n\t//\n\t// In addition, scoped lookups have a \"safety check\" at the end of\n\t// complete_walk which will return -EXDEV if the final path is not in the\n\t// root.\n\treturn how.Resolve&(unix.RESOLVE_IN_ROOT|unix.RESOLVE_BENEATH) != 0 &&\n\t\t(errors.Is(err, unix.EAGAIN) || errors.Is(err, unix.EXDEV))\n}\n\n// This is a fairly arbitrary limit we have just to avoid an attacker being\n// able to make us spin in an infinite retry loop -- callers can choose to\n// retry on EAGAIN if they prefer.\nconst scopedLookupMaxRetries = 128\n\n// Openat2 is an [Fd]-based wrapper around unix.Openat2, but with some retry\n// logic in case of EAGAIN errors.\n//\n// NOTE: This is a variable so that the lookup tests can force openat2 to fail.\nvar Openat2 = func(dir Fd, path string, how *unix.OpenHow) (*os.File, error) {\n\tdirFd, fullPath := prepareAt(dir, path)\n\t// Make sure we always set O_CLOEXEC.\n\thow.Flags |= unix.O_CLOEXEC\n\tvar tries int\n\tfor {\n\t\tfd, err := unix.Openat2(dirFd, path, how)\n\t\tif err != nil {\n\t\t\tif scopedLookupShouldRetry(how, err) && tries < scopedLookupMaxRetries {\n\t\t\t\t// We retry a couple of times to avoid the spurious errors, and\n\t\t\t\t// if we are being attacked then returning -EAGAIN is the best\n\t\t\t\t// we can do.\n\t\t\t\ttries++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, &os.PathError{Op: \"openat2\", Path: fullPath, Err: err}\n\t\t}\n\t\truntime.KeepAlive(dir)\n\t\treturn os.NewFile(uintptr(fd), fullPath), nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/README.md",
    "content": "## gocompat ##\n\nThis directory contains backports of stdlib functions from later Go versions so\nthe filepath-securejoin can continue to be used by projects that are stuck with\nGo 1.18 support. Note that often filepath-securejoin is added in security\npatches for old releases, so avoiding the need to bump Go compiler requirements\nis a huge plus to downstreams.\n\nThe source code is licensed under the same license as the Go stdlib. See the\nsource files for the precise license information.\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/doc.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n//go:build linux && go1.20\n\n// Copyright (C) 2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package gocompat includes compatibility shims (backported from future Go\n// stdlib versions) to permit filepath-securejoin to be used with older Go\n// versions (often filepath-securejoin is added in security patches for old\n// releases, so avoiding the need to bump Go compiler requirements is a huge\n// plus to downstreams).\npackage gocompat\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_atomic_go119.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n//go:build linux && go1.19\n\n// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage gocompat\n\nimport (\n\t\"sync/atomic\"\n)\n\n// A Bool is an atomic boolean value.\n// The zero value is false.\n//\n// Bool must not be copied after first use.\ntype Bool = atomic.Bool\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_atomic_unsupported.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n//go:build linux && !go1.19\n\n// Copyright (C) 2024-2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage gocompat\n\nimport (\n\t\"sync/atomic\"\n)\n\n// noCopy may be added to structs which must not be copied\n// after the first use.\n//\n// See https://golang.org/issues/8005#issuecomment-190753527\n// for details.\n//\n// Note that it must not be embedded, due to the Lock and Unlock methods.\ntype noCopy struct{}\n\n// Lock is a no-op used by -copylocks checker from `go vet`.\nfunc (*noCopy) Lock() {}\n\n// b32 returns a uint32 0 or 1 representing b.\nfunc b32(b bool) uint32 {\n\tif b {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\n// A Bool is an atomic boolean value.\n// The zero value is false.\n//\n// Bool must not be copied after first use.\ntype Bool struct {\n\t_ noCopy\n\tv uint32\n}\n\n// Load atomically loads and returns the value stored in x.\nfunc (x *Bool) Load() bool { return atomic.LoadUint32(&x.v) != 0 }\n\n// Store atomically stores val into x.\nfunc (x *Bool) Store(val bool) { atomic.StoreUint32(&x.v, b32(val)) }\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_errors_go120.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n//go:build linux && go1.20\n\n// Copyright (C) 2024 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage gocompat\n\nimport (\n\t\"fmt\"\n)\n\n// WrapBaseError is a helper that is equivalent to fmt.Errorf(\"%w: %w\"), except\n// that on pre-1.20 Go versions only errors.Is() works properly (errors.Unwrap)\n// is only guaranteed to give you baseErr.\nfunc WrapBaseError(baseErr, extraErr error) error {\n\treturn fmt.Errorf(\"%w: %w\", extraErr, baseErr)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_errors_unsupported.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n//go:build linux && !go1.20\n\n// Copyright (C) 2024 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage gocompat\n\nimport (\n\t\"fmt\"\n)\n\ntype wrappedError struct {\n\tinner   error\n\tisError error\n}\n\nfunc (err wrappedError) Is(target error) bool {\n\treturn err.isError == target\n}\n\nfunc (err wrappedError) Unwrap() error {\n\treturn err.inner\n}\n\nfunc (err wrappedError) Error() string {\n\treturn fmt.Sprintf(\"%v: %v\", err.isError, err.inner)\n}\n\n// WrapBaseError is a helper that is equivalent to fmt.Errorf(\"%w: %w\"), except\n// that on pre-1.20 Go versions only errors.Is() works properly (errors.Unwrap)\n// is only guaranteed to give you baseErr.\nfunc WrapBaseError(baseErr, extraErr error) error {\n\treturn wrappedError{\n\t\tinner:   baseErr,\n\t\tisError: extraErr,\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_generics_go121.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n//go:build linux && go1.21\n\n// Copyright (C) 2024-2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage gocompat\n\nimport (\n\t\"cmp\"\n\t\"slices\"\n\t\"sync\"\n)\n\n// SlicesDeleteFunc is equivalent to Go 1.21's slices.DeleteFunc.\nfunc SlicesDeleteFunc[S ~[]E, E any](slice S, delFn func(E) bool) S {\n\treturn slices.DeleteFunc(slice, delFn)\n}\n\n// SlicesContains is equivalent to Go 1.21's slices.Contains.\nfunc SlicesContains[S ~[]E, E comparable](slice S, val E) bool {\n\treturn slices.Contains(slice, val)\n}\n\n// SlicesClone is equivalent to Go 1.21's slices.Clone.\nfunc SlicesClone[S ~[]E, E any](slice S) S {\n\treturn slices.Clone(slice)\n}\n\n// SyncOnceValue is equivalent to Go 1.21's sync.OnceValue.\nfunc SyncOnceValue[T any](f func() T) func() T {\n\treturn sync.OnceValue(f)\n}\n\n// SyncOnceValues is equivalent to Go 1.21's sync.OnceValues.\nfunc SyncOnceValues[T1, T2 any](f func() (T1, T2)) func() (T1, T2) {\n\treturn sync.OnceValues(f)\n}\n\n// CmpOrdered is equivalent to Go 1.21's cmp.Ordered generic type definition.\ntype CmpOrdered = cmp.Ordered\n\n// CmpCompare is equivalent to Go 1.21's cmp.Compare.\nfunc CmpCompare[T CmpOrdered](x, y T) int {\n\treturn cmp.Compare(x, y)\n}\n\n// Max2 is equivalent to Go 1.21's max builtin (but only for two parameters).\nfunc Max2[T CmpOrdered](x, y T) T {\n\treturn max(x, y)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat/gocompat_generics_unsupported.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n//go:build linux && !go1.21\n\n// Copyright (C) 2021, 2022 The Go Authors. All rights reserved.\n// Copyright (C) 2024-2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE.BSD file.\n\npackage gocompat\n\nimport (\n\t\"sync\"\n)\n\n// These are very minimal implementations of functions that appear in Go 1.21's\n// stdlib, included so that we can build on older Go versions. Most are\n// borrowed directly from the stdlib, and a few are modified to be \"obviously\n// correct\" without needing to copy too many other helpers.\n\n// clearSlice is equivalent to Go 1.21's builtin clear.\n// Copied from the Go 1.24 stdlib implementation.\nfunc clearSlice[S ~[]E, E any](slice S) {\n\tvar zero E\n\tfor i := range slice {\n\t\tslice[i] = zero\n\t}\n}\n\n// slicesIndexFunc is equivalent to Go 1.21's slices.IndexFunc.\n// Copied from the Go 1.24 stdlib implementation.\nfunc slicesIndexFunc[S ~[]E, E any](s S, f func(E) bool) int {\n\tfor i := range s {\n\t\tif f(s[i]) {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\n// SlicesDeleteFunc is equivalent to Go 1.21's slices.DeleteFunc.\n// Copied from the Go 1.24 stdlib implementation.\nfunc SlicesDeleteFunc[S ~[]E, E any](s S, del func(E) bool) S {\n\ti := slicesIndexFunc(s, del)\n\tif i == -1 {\n\t\treturn s\n\t}\n\t// Don't start copying elements until we find one to delete.\n\tfor j := i + 1; j < len(s); j++ {\n\t\tif v := s[j]; !del(v) {\n\t\t\ts[i] = v\n\t\t\ti++\n\t\t}\n\t}\n\tclearSlice(s[i:]) // zero/nil out the obsolete elements, for GC\n\treturn s[:i]\n}\n\n// SlicesContains is equivalent to Go 1.21's slices.Contains.\n// Similar to the stdlib slices.Contains, except that we don't have\n// slices.Index so we need to use slices.IndexFunc for this non-Func helper.\nfunc SlicesContains[S ~[]E, E comparable](s S, v E) bool {\n\treturn slicesIndexFunc(s, func(e E) bool { return e == v }) >= 0\n}\n\n// SlicesClone is equivalent to Go 1.21's slices.Clone.\n// Copied from the Go 1.24 stdlib implementation.\nfunc SlicesClone[S ~[]E, E any](s S) S {\n\t// Preserve nil in case it matters.\n\tif s == nil {\n\t\treturn nil\n\t}\n\treturn append(S([]E{}), s...)\n}\n\n// SyncOnceValue is equivalent to Go 1.21's sync.OnceValue.\n// Copied from the Go 1.25 stdlib implementation.\nfunc SyncOnceValue[T any](f func() T) func() T {\n\t// Use a struct so that there's a single heap allocation.\n\td := struct {\n\t\tf      func() T\n\t\tonce   sync.Once\n\t\tvalid  bool\n\t\tp      any\n\t\tresult T\n\t}{\n\t\tf: f,\n\t}\n\treturn func() T {\n\t\td.once.Do(func() {\n\t\t\tdefer func() {\n\t\t\t\td.f = nil\n\t\t\t\td.p = recover()\n\t\t\t\tif !d.valid {\n\t\t\t\t\tpanic(d.p)\n\t\t\t\t}\n\t\t\t}()\n\t\t\td.result = d.f()\n\t\t\td.valid = true\n\t\t})\n\t\tif !d.valid {\n\t\t\tpanic(d.p)\n\t\t}\n\t\treturn d.result\n\t}\n}\n\n// SyncOnceValues is equivalent to Go 1.21's sync.OnceValues.\n// Copied from the Go 1.25 stdlib implementation.\nfunc SyncOnceValues[T1, T2 any](f func() (T1, T2)) func() (T1, T2) {\n\t// Use a struct so that there's a single heap allocation.\n\td := struct {\n\t\tf     func() (T1, T2)\n\t\tonce  sync.Once\n\t\tvalid bool\n\t\tp     any\n\t\tr1    T1\n\t\tr2    T2\n\t}{\n\t\tf: f,\n\t}\n\treturn func() (T1, T2) {\n\t\td.once.Do(func() {\n\t\t\tdefer func() {\n\t\t\t\td.f = nil\n\t\t\t\td.p = recover()\n\t\t\t\tif !d.valid {\n\t\t\t\t\tpanic(d.p)\n\t\t\t\t}\n\t\t\t}()\n\t\t\td.r1, d.r2 = d.f()\n\t\t\td.valid = true\n\t\t})\n\t\tif !d.valid {\n\t\t\tpanic(d.p)\n\t\t}\n\t\treturn d.r1, d.r2\n\t}\n}\n\n// CmpOrdered is equivalent to Go 1.21's cmp.Ordered generic type definition.\n// Copied from the Go 1.25 stdlib implementation.\ntype CmpOrdered interface {\n\t~int | ~int8 | ~int16 | ~int32 | ~int64 |\n\t\t~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |\n\t\t~float32 | ~float64 |\n\t\t~string\n}\n\n// isNaN reports whether x is a NaN without requiring the math package.\n// This will always return false if T is not floating-point.\n// Copied from the Go 1.25 stdlib implementation.\nfunc isNaN[T CmpOrdered](x T) bool {\n\treturn x != x\n}\n\n// CmpCompare is equivalent to Go 1.21's cmp.Compare.\n// Copied from the Go 1.25 stdlib implementation.\nfunc CmpCompare[T CmpOrdered](x, y T) int {\n\txNaN := isNaN(x)\n\tyNaN := isNaN(y)\n\tif xNaN {\n\t\tif yNaN {\n\t\t\treturn 0\n\t\t}\n\t\treturn -1\n\t}\n\tif yNaN {\n\t\treturn +1\n\t}\n\tif x < y {\n\t\treturn -1\n\t}\n\tif x > y {\n\t\treturn +1\n\t}\n\treturn 0\n}\n\n// Max2 is equivalent to Go 1.21's max builtin for two parameters.\nfunc Max2[T CmpOrdered](x, y T) T {\n\tm := x\n\tif y > m {\n\t\tm = y\n\t}\n\treturn m\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs/doc.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package gopathrs is a less complete pure Go implementation of some of the\n// APIs provided by [libpathrs].\n//\n// [libpathrs]: https://github.com/cyphar/libpathrs\npackage gopathrs\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs/lookup_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage gopathrs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/internal/consts\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs\"\n)\n\ntype symlinkStackEntry struct {\n\t// (dir, remainingPath) is what we would've returned if the link didn't\n\t// exist. This matches what openat2(RESOLVE_IN_ROOT) would return in\n\t// this case.\n\tdir           *os.File\n\tremainingPath string\n\t// linkUnwalked is the remaining path components from the original\n\t// Readlink which we have yet to walk. When this slice is empty, we\n\t// drop the link from the stack.\n\tlinkUnwalked []string\n}\n\nfunc (se symlinkStackEntry) String() string {\n\treturn fmt.Sprintf(\"<%s>/%s [->%s]\", se.dir.Name(), se.remainingPath, strings.Join(se.linkUnwalked, \"/\"))\n}\n\nfunc (se symlinkStackEntry) Close() {\n\t_ = se.dir.Close()\n}\n\ntype symlinkStack []*symlinkStackEntry\n\nfunc (s *symlinkStack) IsEmpty() bool {\n\treturn s == nil || len(*s) == 0\n}\n\nfunc (s *symlinkStack) Close() {\n\tif s != nil {\n\t\tfor _, link := range *s {\n\t\t\tlink.Close()\n\t\t}\n\t\t// TODO: Switch to clear once we switch to Go 1.21.\n\t\t*s = nil\n\t}\n}\n\nvar (\n\terrEmptyStack         = errors.New(\"[internal] stack is empty\")\n\terrBrokenSymlinkStack = errors.New(\"[internal error] broken symlink stack\")\n)\n\nfunc (s *symlinkStack) popPart(part string) error {\n\tif s == nil || s.IsEmpty() {\n\t\t// If there is nothing in the symlink stack, then the part was from the\n\t\t// real path provided by the user, and this is a no-op.\n\t\treturn errEmptyStack\n\t}\n\tif part == \".\" {\n\t\t// \".\" components are no-ops -- we drop them when doing SwapLink.\n\t\treturn nil\n\t}\n\n\ttailEntry := (*s)[len(*s)-1]\n\n\t// Double-check that we are popping the component we expect.\n\tif len(tailEntry.linkUnwalked) == 0 {\n\t\treturn fmt.Errorf(\"%w: trying to pop component %q of empty stack entry %s\", errBrokenSymlinkStack, part, tailEntry)\n\t}\n\theadPart := tailEntry.linkUnwalked[0]\n\tif headPart != part {\n\t\treturn fmt.Errorf(\"%w: trying to pop component %q but the last stack entry is %s (%q)\", errBrokenSymlinkStack, part, tailEntry, headPart)\n\t}\n\n\t// Drop the component, but keep the entry around in case we are dealing\n\t// with a \"tail-chained\" symlink.\n\ttailEntry.linkUnwalked = tailEntry.linkUnwalked[1:]\n\treturn nil\n}\n\nfunc (s *symlinkStack) PopPart(part string) error {\n\tif err := s.popPart(part); err != nil {\n\t\tif errors.Is(err, errEmptyStack) {\n\t\t\t// Skip empty stacks.\n\t\t\terr = nil\n\t\t}\n\t\treturn err\n\t}\n\n\t// Clean up any of the trailing stack entries that are empty.\n\tfor lastGood := len(*s) - 1; lastGood >= 0; lastGood-- {\n\t\tentry := (*s)[lastGood]\n\t\tif len(entry.linkUnwalked) > 0 {\n\t\t\tbreak\n\t\t}\n\t\tentry.Close()\n\t\t(*s) = (*s)[:lastGood]\n\t}\n\treturn nil\n}\n\nfunc (s *symlinkStack) push(dir *os.File, remainingPath, linkTarget string) error {\n\tif s == nil {\n\t\treturn nil\n\t}\n\t// Split the link target and clean up any \"\" parts.\n\tlinkTargetParts := gocompat.SlicesDeleteFunc(\n\t\tstrings.Split(linkTarget, \"/\"),\n\t\tfunc(part string) bool { return part == \"\" || part == \".\" })\n\n\t// Copy the directory so the caller doesn't close our copy.\n\tdirCopy, err := fd.Dup(dir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Add to the stack.\n\t*s = append(*s, &symlinkStackEntry{\n\t\tdir:           dirCopy,\n\t\tremainingPath: remainingPath,\n\t\tlinkUnwalked:  linkTargetParts,\n\t})\n\treturn nil\n}\n\nfunc (s *symlinkStack) SwapLink(linkPart string, dir *os.File, remainingPath, linkTarget string) error {\n\t// If we are currently inside a symlink resolution, remove the symlink\n\t// component from the last symlink entry, but don't remove the entry even\n\t// if it's empty. If we are a \"tail-chained\" symlink (a trailing symlink we\n\t// hit during a symlink resolution) we need to keep the old symlink until\n\t// we finish the resolution.\n\tif err := s.popPart(linkPart); err != nil {\n\t\tif !errors.Is(err, errEmptyStack) {\n\t\t\treturn err\n\t\t}\n\t\t// Push the component regardless of whether the stack was empty.\n\t}\n\treturn s.push(dir, remainingPath, linkTarget)\n}\n\nfunc (s *symlinkStack) PopTopSymlink() (*os.File, string, bool) {\n\tif s == nil || s.IsEmpty() {\n\t\treturn nil, \"\", false\n\t}\n\ttailEntry := (*s)[0]\n\t*s = (*s)[1:]\n\treturn tailEntry.dir, tailEntry.remainingPath, true\n}\n\n// PartialLookupInRoot tries to lookup as much of the request path as possible\n// within the provided root (a-la RESOLVE_IN_ROOT) and opens the final existing\n// component of the requested path, returning a file handle to the final\n// existing component and a string containing the remaining path components.\nfunc PartialLookupInRoot(root fd.Fd, unsafePath string) (*os.File, string, error) {\n\treturn lookupInRoot(root, unsafePath, true)\n}\n\nfunc completeLookupInRoot(root fd.Fd, unsafePath string) (*os.File, error) {\n\thandle, remainingPath, err := lookupInRoot(root, unsafePath, false)\n\tif remainingPath != \"\" && err == nil {\n\t\t// should never happen\n\t\terr = fmt.Errorf(\"[bug] non-empty remaining path when doing a non-partial lookup: %q\", remainingPath)\n\t}\n\t// lookupInRoot(partial=false) will always close the handle if an error is\n\t// returned, so no need to double-check here.\n\treturn handle, err\n}\n\nfunc lookupInRoot(root fd.Fd, unsafePath string, partial bool) (Handle *os.File, _ string, _ error) {\n\tunsafePath = filepath.ToSlash(unsafePath) // noop\n\n\t// This is very similar to SecureJoin, except that we operate on the\n\t// components using file descriptors. We then return the last component we\n\t// managed open, along with the remaining path components not opened.\n\n\t// Try to use openat2 if possible.\n\t//\n\t// NOTE: If openat2(2) works normally but fails for this lookup, it is\n\t// probably not a good idea to fall-back to the O_PATH resolver. An\n\t// attacker could find a bug in the O_PATH resolver and uncontionally\n\t// falling back to the O_PATH resolver would form a downgrade attack.\n\tif handle, remainingPath, err := lookupOpenat2(root, unsafePath, partial); err == nil || linux.HasOpenat2() {\n\t\treturn handle, remainingPath, err\n\t}\n\n\t// Get the \"actual\" root path from /proc/self/fd. This is necessary if the\n\t// root is some magic-link like /proc/$pid/root, in which case we want to\n\t// make sure when we do procfs.CheckProcSelfFdPath that we are using the\n\t// correct root path.\n\tlogicalRootPath, err := procfs.ProcSelfFdReadlink(root)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"get real root path: %w\", err)\n\t}\n\n\tcurrentDir, err := fd.Dup(root)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"clone root fd: %w\", err)\n\t}\n\tdefer func() {\n\t\t// If a handle is not returned, close the internal handle.\n\t\tif Handle == nil {\n\t\t\t_ = currentDir.Close()\n\t\t}\n\t}()\n\n\t// symlinkStack is used to emulate how openat2(RESOLVE_IN_ROOT) treats\n\t// dangling symlinks. If we hit a non-existent path while resolving a\n\t// symlink, we need to return the (dir, remainingPath) that we had when we\n\t// hit the symlink (treating the symlink as though it were a regular file).\n\t// The set of (dir, remainingPath) sets is stored within the symlinkStack\n\t// and we add and remove parts when we hit symlink and non-symlink\n\t// components respectively. We need a stack because of recursive symlinks\n\t// (symlinks that contain symlink components in their target).\n\t//\n\t// Note that the stack is ONLY used for book-keeping. All of the actual\n\t// path walking logic is still based on currentPath/remainingPath and\n\t// currentDir (as in SecureJoin).\n\tvar symStack *symlinkStack\n\tif partial {\n\t\tsymStack = new(symlinkStack)\n\t\tdefer symStack.Close()\n\t}\n\n\tvar (\n\t\tlinksWalked   int\n\t\tcurrentPath   string\n\t\tremainingPath = unsafePath\n\t)\n\tfor remainingPath != \"\" {\n\t\t// Save the current remaining path so if the part is not real we can\n\t\t// return the path including the component.\n\t\toldRemainingPath := remainingPath\n\n\t\t// Get the next path component.\n\t\tvar part string\n\t\tif i := strings.IndexByte(remainingPath, '/'); i == -1 {\n\t\t\tpart, remainingPath = remainingPath, \"\"\n\t\t} else {\n\t\t\tpart, remainingPath = remainingPath[:i], remainingPath[i+1:]\n\t\t}\n\t\t// If we hit an empty component, we need to treat it as though it is\n\t\t// \".\" so that trailing \"/\" and \"//\" components on a non-directory\n\t\t// correctly return the right error code.\n\t\tif part == \"\" {\n\t\t\tpart = \".\"\n\t\t}\n\n\t\t// Apply the component lexically to the path we are building.\n\t\t// currentPath does not contain any symlinks, and we are lexically\n\t\t// dealing with a single component, so it's okay to do a filepath.Clean\n\t\t// here.\n\t\tnextPath := path.Join(\"/\", currentPath, part)\n\t\t// If we logically hit the root, just clone the root rather than\n\t\t// opening the part and doing all of the other checks.\n\t\tif nextPath == \"/\" {\n\t\t\tif err := symStack.PopPart(part); err != nil {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"walking into root with part %q failed: %w\", part, err)\n\t\t\t}\n\t\t\t// Jump to root.\n\t\t\trootClone, err := fd.Dup(root)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"clone root fd: %w\", err)\n\t\t\t}\n\t\t\t_ = currentDir.Close()\n\t\t\tcurrentDir = rootClone\n\t\t\tcurrentPath = nextPath\n\t\t\tcontinue\n\t\t}\n\n\t\t// Try to open the next component.\n\t\tnextDir, err := fd.Openat(currentDir, part, unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0)\n\t\tswitch err {\n\t\tcase nil:\n\t\t\tst, err := nextDir.Stat()\n\t\t\tif err != nil {\n\t\t\t\t_ = nextDir.Close()\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"stat component %q: %w\", part, err)\n\t\t\t}\n\n\t\t\tswitch st.Mode() & os.ModeType { //nolint:exhaustive // just a glorified if statement\n\t\t\tcase os.ModeSymlink:\n\t\t\t\t// readlinkat implies AT_EMPTY_PATH since Linux 2.6.39. See\n\t\t\t\t// Linux commit 65cfc6722361 (\"readlinkat(), fchownat() and\n\t\t\t\t// fstatat() with empty relative pathnames\").\n\t\t\t\tlinkDest, err := fd.Readlinkat(nextDir, \"\")\n\t\t\t\t// We don't need the handle anymore.\n\t\t\t\t_ = nextDir.Close()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, \"\", err\n\t\t\t\t}\n\n\t\t\t\tlinksWalked++\n\t\t\t\tif linksWalked > consts.MaxSymlinkLimit {\n\t\t\t\t\treturn nil, \"\", &os.PathError{Op: \"securejoin.lookupInRoot\", Path: logicalRootPath + \"/\" + unsafePath, Err: unix.ELOOP}\n\t\t\t\t}\n\n\t\t\t\t// Swap out the symlink's component for the link entry itself.\n\t\t\t\tif err := symStack.SwapLink(part, currentDir, oldRemainingPath, linkDest); err != nil {\n\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"walking into symlink %q failed: push symlink: %w\", part, err)\n\t\t\t\t}\n\n\t\t\t\t// Update our logical remaining path.\n\t\t\t\tremainingPath = linkDest + \"/\" + remainingPath\n\t\t\t\t// Absolute symlinks reset any work we've already done.\n\t\t\t\tif path.IsAbs(linkDest) {\n\t\t\t\t\t// Jump to root.\n\t\t\t\t\trootClone, err := fd.Dup(root)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"clone root fd: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t\t_ = currentDir.Close()\n\t\t\t\t\tcurrentDir = rootClone\n\t\t\t\t\tcurrentPath = \"/\"\n\t\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\t// If we are dealing with a directory, simply walk into it.\n\t\t\t\t_ = currentDir.Close()\n\t\t\t\tcurrentDir = nextDir\n\t\t\t\tcurrentPath = nextPath\n\n\t\t\t\t// The part was real, so drop it from the symlink stack.\n\t\t\t\tif err := symStack.PopPart(part); err != nil {\n\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"walking into directory %q failed: %w\", part, err)\n\t\t\t\t}\n\n\t\t\t\t// If we are operating on a .., make sure we haven't escaped.\n\t\t\t\t// We only have to check for \"..\" here because walking down\n\t\t\t\t// into a regular component component cannot cause you to\n\t\t\t\t// escape. This mirrors the logic in RESOLVE_IN_ROOT, except we\n\t\t\t\t// have to check every \"..\" rather than only checking after a\n\t\t\t\t// rename or mount on the system.\n\t\t\t\tif part == \"..\" {\n\t\t\t\t\t// Make sure the root hasn't moved.\n\t\t\t\t\tif err := procfs.CheckProcSelfFdPath(logicalRootPath, root); err != nil {\n\t\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"root path moved during lookup: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t\t// Make sure the path is what we expect.\n\t\t\t\t\tfullPath := logicalRootPath + nextPath\n\t\t\t\t\tif err := procfs.CheckProcSelfFdPath(fullPath, currentDir); err != nil {\n\t\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"walking into %q had unexpected result: %w\", part, err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tdefault:\n\t\t\tif !partial {\n\t\t\t\treturn nil, \"\", err\n\t\t\t}\n\t\t\t// If there are any remaining components in the symlink stack, we\n\t\t\t// are still within a symlink resolution and thus we hit a dangling\n\t\t\t// symlink. So pretend that the first symlink in the stack we hit\n\t\t\t// was an ENOENT (to match openat2).\n\t\t\tif oldDir, remainingPath, ok := symStack.PopTopSymlink(); ok {\n\t\t\t\t_ = currentDir.Close()\n\t\t\t\treturn oldDir, remainingPath, err\n\t\t\t}\n\t\t\t// We have hit a final component that doesn't exist, so we have our\n\t\t\t// partial open result. Note that we have to use the OLD remaining\n\t\t\t// path, since the lookup failed.\n\t\t\treturn currentDir, oldRemainingPath, err\n\t\t}\n\t}\n\n\t// If the unsafePath had a trailing slash, we need to make sure we try to\n\t// do a relative \".\" open so that we will correctly return an error when\n\t// the final component is a non-directory (to match openat2). In the\n\t// context of openat2, a trailing slash and a trailing \"/.\" are completely\n\t// equivalent.\n\tif strings.HasSuffix(unsafePath, \"/\") {\n\t\tnextDir, err := fd.Openat(currentDir, \".\", unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0)\n\t\tif err != nil {\n\t\t\tif !partial {\n\t\t\t\t_ = currentDir.Close()\n\t\t\t\tcurrentDir = nil\n\t\t\t}\n\t\t\treturn currentDir, \"\", err\n\t\t}\n\t\t_ = currentDir.Close()\n\t\tcurrentDir = nextDir\n\t}\n\n\t// All of the components existed!\n\treturn currentDir, \"\", nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs/mkdir_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage gopathrs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs\"\n)\n\n// ErrInvalidMode is returned from [MkdirAll] when the requested mode is\n// invalid.\nvar ErrInvalidMode = errors.New(\"invalid permission mode\")\n\n// modePermExt is like os.ModePerm except that it also includes the set[ug]id\n// and sticky bits.\nconst modePermExt = os.ModePerm | os.ModeSetuid | os.ModeSetgid | os.ModeSticky\n\n//nolint:cyclop // this function needs to handle a lot of cases\nfunc toUnixMode(mode os.FileMode) (uint32, error) {\n\tsysMode := uint32(mode.Perm())\n\tif mode&os.ModeSetuid != 0 {\n\t\tsysMode |= unix.S_ISUID\n\t}\n\tif mode&os.ModeSetgid != 0 {\n\t\tsysMode |= unix.S_ISGID\n\t}\n\tif mode&os.ModeSticky != 0 {\n\t\tsysMode |= unix.S_ISVTX\n\t}\n\t// We don't allow file type bits.\n\tif mode&os.ModeType != 0 {\n\t\treturn 0, fmt.Errorf(\"%w %+.3o (%s): type bits not permitted\", ErrInvalidMode, mode, mode)\n\t}\n\t// We don't allow other unknown modes.\n\tif mode&^modePermExt != 0 || sysMode&unix.S_IFMT != 0 {\n\t\treturn 0, fmt.Errorf(\"%w %+.3o (%s): unknown mode bits\", ErrInvalidMode, mode, mode)\n\t}\n\treturn sysMode, nil\n}\n\n// MkdirAllHandle is equivalent to [MkdirAll], except that it is safer to use\n// in two respects:\n//\n//   - The caller provides the root directory as an *[os.File] (preferably O_PATH)\n//     handle. This means that the caller can be sure which root directory is\n//     being used. Note that this can be emulated by using /proc/self/fd/... as\n//     the root path with [os.MkdirAll].\n//\n//   - Once all of the directories have been created, an *[os.File] O_PATH handle\n//     to the directory at unsafePath is returned to the caller. This is done in\n//     an effectively-race-free way (an attacker would only be able to swap the\n//     final directory component), which is not possible to emulate with\n//     [MkdirAll].\n//\n// In addition, the returned handle is obtained far more efficiently than doing\n// a brand new lookup of unsafePath (such as with [SecureJoin] or openat2) after\n// doing [MkdirAll]. If you intend to open the directory after creating it, you\n// should use MkdirAllHandle.\n//\n// [SecureJoin]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin#SecureJoin\nfunc MkdirAllHandle(root *os.File, unsafePath string, mode os.FileMode) (_ *os.File, Err error) {\n\tunixMode, err := toUnixMode(mode)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// On Linux, mkdirat(2) (and os.Mkdir) silently ignore the suid and sgid\n\t// bits. We could also silently ignore them but since we have very few\n\t// users it seems more prudent to return an error so users notice that\n\t// these bits will not be set.\n\tif unixMode&^0o1777 != 0 {\n\t\treturn nil, fmt.Errorf(\"%w for mkdir %+.3o: suid and sgid are ignored by mkdir\", ErrInvalidMode, mode)\n\t}\n\n\t// Try to open as much of the path as possible.\n\tcurrentDir, remainingPath, err := PartialLookupInRoot(root, unsafePath)\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\t_ = currentDir.Close()\n\t\t}\n\t}()\n\tif err != nil && !errors.Is(err, unix.ENOENT) {\n\t\treturn nil, fmt.Errorf(\"find existing subpath of %q: %w\", unsafePath, err)\n\t}\n\n\t// If there is an attacker deleting directories as we walk into them,\n\t// detect this proactively. Note this is guaranteed to detect if the\n\t// attacker deleted any part of the tree up to currentDir.\n\t//\n\t// Once we walk into a dead directory, partialLookupInRoot would not be\n\t// able to walk further down the tree (directories must be empty before\n\t// they are deleted), and if the attacker has removed the entire tree we\n\t// can be sure that anything that was originally inside a dead directory\n\t// must also be deleted and thus is a dead directory in its own right.\n\t//\n\t// This is mostly a quality-of-life check, because mkdir will simply fail\n\t// later if the attacker deletes the tree after this check.\n\tif err := fd.IsDeadInode(currentDir); err != nil {\n\t\treturn nil, fmt.Errorf(\"finding existing subpath of %q: %w\", unsafePath, err)\n\t}\n\n\t// Re-open the path to match the O_DIRECTORY reopen loop later (so that we\n\t// always return a non-O_PATH handle). We also check that we actually got a\n\t// directory.\n\tif reopenDir, err := procfs.ReopenFd(currentDir, unix.O_DIRECTORY|unix.O_CLOEXEC); errors.Is(err, unix.ENOTDIR) {\n\t\treturn nil, fmt.Errorf(\"cannot create subdirectories in %q: %w\", currentDir.Name(), unix.ENOTDIR)\n\t} else if err != nil {\n\t\treturn nil, fmt.Errorf(\"re-opening handle to %q: %w\", currentDir.Name(), err)\n\t} else { //nolint:revive // indent-error-flow lint doesn't make sense here\n\t\t_ = currentDir.Close()\n\t\tcurrentDir = reopenDir\n\t}\n\n\tremainingParts := strings.Split(remainingPath, string(filepath.Separator))\n\tif gocompat.SlicesContains(remainingParts, \"..\") {\n\t\t// The path contained \"..\" components after the end of the \"real\"\n\t\t// components. We could try to safely resolve \"..\" here but that would\n\t\t// add a bunch of extra logic for something that it's not clear even\n\t\t// needs to be supported. So just return an error.\n\t\t//\n\t\t// If we do filepath.Clean(remainingPath) then we end up with the\n\t\t// problem that \"..\" can erase a trailing dangling symlink and produce\n\t\t// a path that doesn't quite match what the user asked for.\n\t\treturn nil, fmt.Errorf(\"%w: yet-to-be-created path %q contains '..' components\", unix.ENOENT, remainingPath)\n\t}\n\n\t// Create the remaining components.\n\tfor _, part := range remainingParts {\n\t\tswitch part {\n\t\tcase \"\", \".\":\n\t\t\t// Skip over no-op paths.\n\t\t\tcontinue\n\t\t}\n\n\t\t// NOTE: mkdir(2) will not follow trailing symlinks, so we can safely\n\t\t// create the final component without worrying about symlink-exchange\n\t\t// attacks.\n\t\t//\n\t\t// If we get -EEXIST, it's possible that another program created the\n\t\t// directory at the same time as us. In that case, just continue on as\n\t\t// if we created it (if the created inode is not a directory, the\n\t\t// following open call will fail).\n\t\tif err := unix.Mkdirat(int(currentDir.Fd()), part, unixMode); err != nil && !errors.Is(err, unix.EEXIST) {\n\t\t\terr = &os.PathError{Op: \"mkdirat\", Path: currentDir.Name() + \"/\" + part, Err: err}\n\t\t\t// Make the error a bit nicer if the directory is dead.\n\t\t\tif deadErr := fd.IsDeadInode(currentDir); deadErr != nil {\n\t\t\t\t// TODO: Once we bump the minimum Go version to 1.20, we can use\n\t\t\t\t// multiple %w verbs for this wrapping. For now we need to use a\n\t\t\t\t// compatibility shim for older Go versions.\n\t\t\t\t// err = fmt.Errorf(\"%w (%w)\", err, deadErr)\n\t\t\t\terr = gocompat.WrapBaseError(err, deadErr)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Get a handle to the next component. O_DIRECTORY means we don't need\n\t\t// to use O_PATH.\n\t\tvar nextDir *os.File\n\t\tif linux.HasOpenat2() {\n\t\t\tnextDir, err = openat2(currentDir, part, &unix.OpenHow{\n\t\t\t\tFlags:   unix.O_NOFOLLOW | unix.O_DIRECTORY | unix.O_CLOEXEC,\n\t\t\t\tResolve: unix.RESOLVE_BENEATH | unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_NO_XDEV,\n\t\t\t})\n\t\t} else {\n\t\t\tnextDir, err = fd.Openat(currentDir, part, unix.O_NOFOLLOW|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t_ = currentDir.Close()\n\t\tcurrentDir = nextDir\n\n\t\t// It's possible that the directory we just opened was swapped by an\n\t\t// attacker. Unfortunately there isn't much we can do to protect\n\t\t// against this, and MkdirAll's behaviour is that we will reuse\n\t\t// existing directories anyway so the need to protect against this is\n\t\t// incredibly limited (and arguably doesn't even deserve mention here).\n\t\t//\n\t\t// Ideally we might want to check that the owner and mode match what we\n\t\t// would've created -- unfortunately, it is non-trivial to verify that\n\t\t// the owner and mode of the created directory match. While plain Unix\n\t\t// DAC rules seem simple enough to emulate, there are a bunch of other\n\t\t// factors that can change the mode or owner of created directories\n\t\t// (default POSIX ACLs, mount options like uid=1,gid=2,umask=0 on\n\t\t// filesystems like vfat, etc etc). We used to try to verify this but\n\t\t// it just lead to a series of spurious errors.\n\t\t//\n\t\t// We could also check that the directory is non-empty, but\n\t\t// unfortunately some pseduofilesystems (like cgroupfs) create\n\t\t// non-empty directories, which would result in different spurious\n\t\t// errors.\n\t}\n\treturn currentDir, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs/open_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage gopathrs\n\nimport (\n\t\"os\"\n)\n\n// OpenatInRoot is equivalent to [OpenInRoot], except that the root is provided\n// using an *[os.File] handle, to ensure that the correct root directory is used.\nfunc OpenatInRoot(root *os.File, unsafePath string) (*os.File, error) {\n\thandle, err := completeLookupInRoot(root, unsafePath)\n\tif err != nil {\n\t\treturn nil, &os.PathError{Op: \"securejoin.OpenInRoot\", Path: unsafePath, Err: err}\n\t}\n\treturn handle, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs/openat2_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage gopathrs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/procfs\"\n)\n\nfunc openat2(dir fd.Fd, path string, how *unix.OpenHow) (*os.File, error) {\n\tfile, err := fd.Openat2(dir, path, how)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// If we are using RESOLVE_IN_ROOT, the name we generated may be wrong.\n\tif how.Resolve&unix.RESOLVE_IN_ROOT == unix.RESOLVE_IN_ROOT {\n\t\tif actualPath, err := procfs.ProcSelfFdReadlink(file); err == nil {\n\t\t\t// TODO: Ideally we would not need to dup the fd, but you cannot\n\t\t\t//       easily just swap an *os.File with one from the same fd\n\t\t\t//       (the GC will close the old one, and you cannot clear the\n\t\t\t//       finaliser easily because it is associated with an internal\n\t\t\t//       field of *os.File not *os.File itself).\n\t\t\tnewFile, err := fd.DupWithName(file, actualPath)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\t_ = file.Close()\n\t\t\tfile = newFile\n\t\t}\n\t}\n\treturn file, nil\n}\n\nfunc lookupOpenat2(root fd.Fd, unsafePath string, partial bool) (*os.File, string, error) {\n\tif !partial {\n\t\tfile, err := openat2(root, unsafePath, &unix.OpenHow{\n\t\t\tFlags:   unix.O_PATH | unix.O_CLOEXEC,\n\t\t\tResolve: unix.RESOLVE_IN_ROOT | unix.RESOLVE_NO_MAGICLINKS,\n\t\t})\n\t\treturn file, \"\", err\n\t}\n\treturn partialLookupOpenat2(root, unsafePath)\n}\n\n// partialLookupOpenat2 is an alternative implementation of\n// partialLookupInRoot, using openat2(RESOLVE_IN_ROOT) to more safely get a\n// handle to the deepest existing child of the requested path within the root.\nfunc partialLookupOpenat2(root fd.Fd, unsafePath string) (*os.File, string, error) {\n\t// TODO: Implement this as a git-bisect-like binary search.\n\n\tunsafePath = filepath.ToSlash(unsafePath) // noop\n\tendIdx := len(unsafePath)\n\tvar lastError error\n\tfor endIdx > 0 {\n\t\tsubpath := unsafePath[:endIdx]\n\n\t\thandle, err := openat2(root, subpath, &unix.OpenHow{\n\t\t\tFlags:   unix.O_PATH | unix.O_CLOEXEC,\n\t\t\tResolve: unix.RESOLVE_IN_ROOT | unix.RESOLVE_NO_MAGICLINKS,\n\t\t})\n\t\tif err == nil {\n\t\t\t// Jump over the slash if we have a non-\"\" remainingPath.\n\t\t\tif endIdx < len(unsafePath) {\n\t\t\t\tendIdx++\n\t\t\t}\n\t\t\t// We found a subpath!\n\t\t\treturn handle, unsafePath[endIdx:], lastError\n\t\t}\n\t\tif errors.Is(err, unix.ENOENT) || errors.Is(err, unix.ENOTDIR) {\n\t\t\t// That path doesn't exist, let's try the next directory up.\n\t\t\tendIdx = strings.LastIndexByte(subpath, '/')\n\t\t\tlastError = err\n\t\t\tcontinue\n\t\t}\n\t\treturn nil, \"\", fmt.Errorf(\"open subpath: %w\", err)\n\t}\n\t// If we couldn't open anything, the whole subpath is missing. Return a\n\t// copy of the root fd so that the caller doesn't close this one by\n\t// accident.\n\trootClone, err := fd.Dup(root)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn rootClone, unsafePath, lastError\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/kernelversion/kernel_linux.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n// Copyright (C) 2022 The Go Authors. All rights reserved.\n// Copyright (C) 2025 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE.BSD file.\n\n// The parsing logic is very loosely based on the Go stdlib's\n// src/internal/syscall/unix/kernel_version_linux.go but with an API that looks\n// a bit like runc's libcontainer/system/kernelversion.\n//\n// TODO(cyphar): This API has been copied around to a lot of different projects\n// (Docker, containerd, runc, and now filepath-securejoin) -- maybe we should\n// put it in a separate project?\n\n// Package kernelversion provides a simple mechanism for checking whether the\n// running kernel is at least as new as some baseline kernel version. This is\n// often useful when checking for features that would be too complicated to\n// test support for (or in cases where we know that some kernel features in\n// backport-heavy kernels are broken and need to be avoided).\npackage kernelversion\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n)\n\n// KernelVersion is a numeric representation of the key numerical elements of a\n// kernel version (for instance, \"4.1.2-default-1\" would be represented as\n// KernelVersion{4, 1, 2}).\ntype KernelVersion []uint64\n\nfunc (kver KernelVersion) String() string {\n\tvar str strings.Builder\n\tfor idx, elem := range kver {\n\t\tif idx != 0 {\n\t\t\t_, _ = str.WriteRune('.')\n\t\t}\n\t\t_, _ = str.WriteString(strconv.FormatUint(elem, 10))\n\t}\n\treturn str.String()\n}\n\nvar errInvalidKernelVersion = errors.New(\"invalid kernel version\")\n\n// parseKernelVersion parses a string and creates a KernelVersion based on it.\nfunc parseKernelVersion(kverStr string) (KernelVersion, error) {\n\tkver := make(KernelVersion, 1, 3)\n\tfor idx, ch := range kverStr {\n\t\tif '0' <= ch && ch <= '9' {\n\t\t\tv := &kver[len(kver)-1]\n\t\t\t*v = (*v * 10) + uint64(ch-'0')\n\t\t} else {\n\t\t\tif idx == 0 || kverStr[idx-1] < '0' || '9' < kverStr[idx-1] {\n\t\t\t\t// \".\" must be preceded by a digit while in version section\n\t\t\t\treturn nil, fmt.Errorf(\"%w %q: kernel version has dot(s) followed by non-digit in version section\", errInvalidKernelVersion, kverStr)\n\t\t\t}\n\t\t\tif ch != '.' {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tkver = append(kver, 0)\n\t\t}\n\t}\n\tif len(kver) < 2 {\n\t\treturn nil, fmt.Errorf(\"%w %q: kernel versions must contain at least two components\", errInvalidKernelVersion, kverStr)\n\t}\n\treturn kver, nil\n}\n\n// getKernelVersion gets the current kernel version.\nvar getKernelVersion = gocompat.SyncOnceValues(func() (KernelVersion, error) {\n\tvar uts unix.Utsname\n\tif err := unix.Uname(&uts); err != nil {\n\t\treturn nil, err\n\t}\n\t// Remove the \\x00 from the release.\n\trelease := uts.Release[:]\n\treturn parseKernelVersion(string(release[:bytes.IndexByte(release, 0)]))\n})\n\n// GreaterEqualThan returns true if the the host kernel version is greater than\n// or equal to the provided [KernelVersion]. When doing this comparison, any\n// non-numerical suffixes of the host kernel version are ignored.\n//\n// If the number of components provided is not equal to the number of numerical\n// components of the host kernel version, any missing components are treated as\n// 0. This means that GreaterEqualThan(KernelVersion{4}) will be treated the\n// same as GreaterEqualThan(KernelVersion{4, 0, 0, ..., 0, 0}), and that if the\n// host kernel version is \"4\" then GreaterEqualThan(KernelVersion{4, 1}) will\n// return false (because the host version will be treated as \"4.0\").\nfunc GreaterEqualThan(wantKver KernelVersion) (bool, error) {\n\thostKver, err := getKernelVersion()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\t// Pad out the kernel version lengths to match one another.\n\tcmpLen := gocompat.Max2(len(hostKver), len(wantKver))\n\thostKver = append(hostKver, make(KernelVersion, cmpLen-len(hostKver))...)\n\twantKver = append(wantKver, make(KernelVersion, cmpLen-len(wantKver))...)\n\n\tfor i := 0; i < cmpLen; i++ {\n\t\tswitch gocompat.CmpCompare(hostKver[i], wantKver[i]) {\n\t\tcase -1:\n\t\t\t// host < want\n\t\t\treturn false, nil\n\t\tcase +1:\n\t\t\t// host > want\n\t\t\treturn true, nil\n\t\tcase 0:\n\t\t\tcontinue\n\t\t}\n\t}\n\t// equal version values\n\treturn true, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux/doc.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package linux returns information about what features are supported on the\n// running kernel.\npackage linux\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux/mount_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage linux\n\nimport (\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/kernelversion\"\n)\n\n// HasNewMountAPI returns whether the new fsopen(2) mount API is supported on\n// the running kernel.\nvar HasNewMountAPI = gocompat.SyncOnceValue(func() bool {\n\t// All of the pieces of the new mount API we use (fsopen, fsconfig,\n\t// fsmount, open_tree) were added together in Linux 5.2[1,2], so we can\n\t// just check for one of the syscalls and the others should also be\n\t// available.\n\t//\n\t// Just try to use open_tree(2) to open a file without OPEN_TREE_CLONE.\n\t// This is equivalent to openat(2), but tells us if open_tree is\n\t// available (and thus all of the other basic new mount API syscalls).\n\t// open_tree(2) is most light-weight syscall to test here.\n\t//\n\t// [1]: merge commit 400913252d09\n\t// [2]: <https://lore.kernel.org/lkml/153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk/>\n\tfd, err := unix.OpenTree(-int(unix.EBADF), \"/\", unix.OPEN_TREE_CLOEXEC)\n\tif err != nil {\n\t\treturn false\n\t}\n\t_ = unix.Close(fd)\n\n\t// RHEL 8 has a backport of fsopen(2) that appears to have some very\n\t// difficult to debug performance pathology. As such, it seems prudent to\n\t// simply reject pre-5.2 kernels.\n\tisNotBackport, _ := kernelversion.GreaterEqualThan(kernelversion.KernelVersion{5, 2})\n\treturn isNotBackport\n})\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux/openat2_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage linux\n\nimport (\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n)\n\n// sawOpenat2Error stores whether we have seen an error from HasOpenat2. This\n// is a one-way toggle, so as soon as we see an error we \"lock\" into that mode.\n// We cannot use sync.OnceValue to store the success/fail state once because it\n// is possible for the program we are running in to apply a seccomp-bpf filter\n// and thus disable openat2 during execution.\nvar sawOpenat2Error gocompat.Bool\n\n// HasOpenat2 returns whether openat2(2) is supported on the running kernel.\nvar HasOpenat2 = func() bool {\n\tif sawOpenat2Error.Load() {\n\t\treturn false\n\t}\n\n\tfd, err := unix.Openat2(unix.AT_FDCWD, \".\", &unix.OpenHow{\n\t\tFlags:   unix.O_PATH | unix.O_CLOEXEC,\n\t\tResolve: unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_IN_ROOT,\n\t})\n\tif err != nil {\n\t\tsawOpenat2Error.Store(true) // doesn't matter if we race here\n\t\treturn false\n\t}\n\t_ = unix.Close(fd)\n\treturn true\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs/procfs_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package procfs provides a safe API for operating on /proc on Linux. Note\n// that this is the *internal* procfs API, mainy needed due to Go's\n// restrictions on cyclic dependencies and its incredibly minimal visibility\n// system without making a separate internal/ package.\npackage procfs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/assert\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux\"\n)\n\n// The kernel guarantees that the root inode of a procfs mount has an\n// f_type of PROC_SUPER_MAGIC and st_ino of PROC_ROOT_INO.\nconst (\n\tprocSuperMagic = 0x9fa0 // PROC_SUPER_MAGIC\n\tprocRootIno    = 1      // PROC_ROOT_INO\n)\n\n// verifyProcHandle checks that the handle is from a procfs filesystem.\n// Contrast this to [verifyProcRoot], which also verifies that the handle is\n// the root of a procfs mount.\nfunc verifyProcHandle(procHandle fd.Fd) error {\n\tif statfs, err := fd.Fstatfs(procHandle); err != nil {\n\t\treturn err\n\t} else if statfs.Type != procSuperMagic {\n\t\treturn fmt.Errorf(\"%w: incorrect procfs root filesystem type 0x%x\", errUnsafeProcfs, statfs.Type)\n\t}\n\treturn nil\n}\n\n// verifyProcRoot verifies that the handle is the root of a procfs filesystem.\n// Contrast this to [verifyProcHandle], which only verifies if the handle is\n// some file on procfs (regardless of what file it is).\nfunc verifyProcRoot(procRoot fd.Fd) error {\n\tif err := verifyProcHandle(procRoot); err != nil {\n\t\treturn err\n\t}\n\tif stat, err := fd.Fstat(procRoot); err != nil {\n\t\treturn err\n\t} else if stat.Ino != procRootIno {\n\t\treturn fmt.Errorf(\"%w: incorrect procfs root inode number %d\", errUnsafeProcfs, stat.Ino)\n\t}\n\treturn nil\n}\n\ntype procfsFeatures struct {\n\t// hasSubsetPid was added in Linux 5.8, along with hidepid=ptraceable (and\n\t// string-based hidepid= values). Before this patchset, it was not really\n\t// safe to try to modify procfs superblock flags because the superblock was\n\t// shared -- so if this feature is not available, **you should not set any\n\t// superblock flags**.\n\t//\n\t// 6814ef2d992a (\"proc: add option to mount only a pids subset\")\n\t// fa10fed30f25 (\"proc: allow to mount many instances of proc in one pid namespace\")\n\t// 24a71ce5c47f (\"proc: instantiate only pids that we can ptrace on 'hidepid=4' mount option\")\n\t// 1c6c4d112e81 (\"proc: use human-readable values for hidepid\")\n\t// 9ff7258575d5 (\"Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace\")\n\thasSubsetPid bool\n}\n\nvar getProcfsFeatures = gocompat.SyncOnceValue(func() procfsFeatures {\n\tif !linux.HasNewMountAPI() {\n\t\treturn procfsFeatures{}\n\t}\n\tprocfsCtx, err := fd.Fsopen(\"proc\", unix.FSOPEN_CLOEXEC)\n\tif err != nil {\n\t\treturn procfsFeatures{}\n\t}\n\tdefer procfsCtx.Close() //nolint:errcheck // close failures aren't critical here\n\n\treturn procfsFeatures{\n\t\thasSubsetPid: unix.FsconfigSetString(int(procfsCtx.Fd()), \"subset\", \"pid\") == nil,\n\t}\n})\n\nfunc newPrivateProcMount(subset bool) (_ *Handle, Err error) {\n\tprocfsCtx, err := fd.Fsopen(\"proc\", unix.FSOPEN_CLOEXEC)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer procfsCtx.Close() //nolint:errcheck // close failures aren't critical here\n\n\tif subset && getProcfsFeatures().hasSubsetPid {\n\t\t// Try to configure hidepid=ptraceable,subset=pid if possible, but\n\t\t// ignore errors.\n\t\t_ = unix.FsconfigSetString(int(procfsCtx.Fd()), \"hidepid\", \"ptraceable\")\n\t\t_ = unix.FsconfigSetString(int(procfsCtx.Fd()), \"subset\", \"pid\")\n\t}\n\n\t// Get an actual handle.\n\tif err := unix.FsconfigCreate(int(procfsCtx.Fd())); err != nil {\n\t\treturn nil, os.NewSyscallError(\"fsconfig create procfs\", err)\n\t}\n\t// TODO: Output any information from the fscontext log to debug logs.\n\tprocRoot, err := fd.Fsmount(procfsCtx, unix.FSMOUNT_CLOEXEC, unix.MS_NODEV|unix.MS_NOEXEC|unix.MS_NOSUID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\t_ = procRoot.Close()\n\t\t}\n\t}()\n\treturn newHandle(procRoot)\n}\n\nfunc clonePrivateProcMount() (_ *Handle, Err error) {\n\t// Try to make a clone without using AT_RECURSIVE if we can. If this works,\n\t// we can be sure there are no over-mounts and so if the root is valid then\n\t// we're golden. Otherwise, we have to deal with over-mounts.\n\tprocRoot, err := fd.OpenTree(nil, \"/proc\", unix.OPEN_TREE_CLONE)\n\tif err != nil || hookForcePrivateProcRootOpenTreeAtRecursive(procRoot) {\n\t\tprocRoot, err = fd.OpenTree(nil, \"/proc\", unix.OPEN_TREE_CLONE|unix.AT_RECURSIVE)\n\t}\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating a detached procfs clone: %w\", err)\n\t}\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\t_ = procRoot.Close()\n\t\t}\n\t}()\n\treturn newHandle(procRoot)\n}\n\nfunc privateProcRoot(subset bool) (*Handle, error) {\n\tif !linux.HasNewMountAPI() || hookForceGetProcRootUnsafe() {\n\t\treturn nil, fmt.Errorf(\"new mount api: %w\", unix.ENOTSUP)\n\t}\n\t// Try to create a new procfs mount from scratch if we can. This ensures we\n\t// can get a procfs mount even if /proc is fake (for whatever reason).\n\tprocRoot, err := newPrivateProcMount(subset)\n\tif err != nil || hookForcePrivateProcRootOpenTree(procRoot) {\n\t\t// Try to clone /proc then...\n\t\tprocRoot, err = clonePrivateProcMount()\n\t}\n\treturn procRoot, err\n}\n\nfunc unsafeHostProcRoot() (_ *Handle, Err error) {\n\tprocRoot, err := os.OpenFile(\"/proc\", unix.O_PATH|unix.O_NOFOLLOW|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\t_ = procRoot.Close()\n\t\t}\n\t}()\n\treturn newHandle(procRoot)\n}\n\n// Handle is a wrapper around an *os.File handle to \"/proc\", which can be used\n// to do further procfs-related operations in a safe way.\ntype Handle struct {\n\tInner fd.Fd\n\t// Does this handle have subset=pid set?\n\tisSubset bool\n}\n\nfunc newHandle(procRoot fd.Fd) (*Handle, error) {\n\tif err := verifyProcRoot(procRoot); err != nil {\n\t\t// This is only used in methods that\n\t\t_ = procRoot.Close()\n\t\treturn nil, err\n\t}\n\tproc := &Handle{Inner: procRoot}\n\t// With subset=pid we can be sure that /proc/uptime will not exist.\n\tif err := fd.Faccessat(proc.Inner, \"uptime\", unix.F_OK, unix.AT_SYMLINK_NOFOLLOW); err != nil {\n\t\tproc.isSubset = errors.Is(err, os.ErrNotExist)\n\t}\n\treturn proc, nil\n}\n\n// Close closes the underlying file for the Handle.\nfunc (proc *Handle) Close() error { return proc.Inner.Close() }\n\nvar getCachedProcRoot = gocompat.SyncOnceValue(func() *Handle {\n\tprocRoot, err := getProcRoot(true)\n\tif err != nil {\n\t\treturn nil // just don't cache if we see an error\n\t}\n\tif !procRoot.isSubset {\n\t\treturn nil // we only cache verified subset=pid handles\n\t}\n\n\t// Disarm (*Handle).Close() to stop someone from accidentally closing\n\t// the global handle.\n\tprocRoot.Inner = fd.NopCloser(procRoot.Inner)\n\treturn procRoot\n})\n\n// OpenProcRoot tries to open a \"safer\" handle to \"/proc\".\nfunc OpenProcRoot() (*Handle, error) {\n\tif proc := getCachedProcRoot(); proc != nil {\n\t\treturn proc, nil\n\t}\n\treturn getProcRoot(true)\n}\n\n// OpenUnsafeProcRoot opens a handle to \"/proc\" without any overmounts or\n// masked paths (but also without \"subset=pid\").\nfunc OpenUnsafeProcRoot() (*Handle, error) { return getProcRoot(false) }\n\nfunc getProcRoot(subset bool) (*Handle, error) {\n\tproc, err := privateProcRoot(subset)\n\tif err != nil {\n\t\t// Fall back to using a /proc handle if making a private mount failed.\n\t\t// If we have openat2, at least we can avoid some kinds of over-mount\n\t\t// attacks, but without openat2 there's not much we can do.\n\t\tproc, err = unsafeHostProcRoot()\n\t}\n\treturn proc, err\n}\n\nvar hasProcThreadSelf = gocompat.SyncOnceValue(func() bool {\n\treturn unix.Access(\"/proc/thread-self/\", unix.F_OK) == nil\n})\n\nvar errUnsafeProcfs = errors.New(\"unsafe procfs detected\")\n\n// lookup is a very minimal wrapper around [procfsLookupInRoot] which is\n// intended to be called from the external API.\nfunc (proc *Handle) lookup(subpath string) (*os.File, error) {\n\thandle, err := procfsLookupInRoot(proc.Inner, subpath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn handle, nil\n}\n\n// procfsBase is an enum indicating the prefix of a subpath in operations\n// involving [Handle]s.\ntype procfsBase string\n\nconst (\n\t// ProcRoot refers to the root of the procfs (i.e., \"/proc/<subpath>\").\n\tProcRoot procfsBase = \"/proc\"\n\t// ProcSelf refers to the current process' subdirectory (i.e.,\n\t// \"/proc/self/<subpath>\").\n\tProcSelf procfsBase = \"/proc/self\"\n\t// ProcThreadSelf refers to the current thread's subdirectory (i.e.,\n\t// \"/proc/thread-self/<subpath>\"). In multi-threaded programs (i.e., all Go\n\t// programs) where one thread has a different CLONE_FS, it is possible for\n\t// \"/proc/self\" to point the wrong thread and so \"/proc/thread-self\" may be\n\t// necessary. Note that on pre-3.17 kernels, \"/proc/thread-self\" doesn't\n\t// exist and so a fallback will be used in that case.\n\tProcThreadSelf procfsBase = \"/proc/thread-self\"\n\t// TODO: Switch to an interface setup so we can have a more type-safe\n\t// version of ProcPid and remove the need to worry about invalid string\n\t// values.\n)\n\n// prefix returns a prefix that can be used with the given [Handle].\nfunc (base procfsBase) prefix(proc *Handle) (string, error) {\n\tswitch base {\n\tcase ProcRoot:\n\t\treturn \".\", nil\n\tcase ProcSelf:\n\t\treturn \"self\", nil\n\tcase ProcThreadSelf:\n\t\tthreadSelf := \"thread-self\"\n\t\tif !hasProcThreadSelf() || hookForceProcSelfTask() {\n\t\t\t// Pre-3.17 kernels don't have /proc/thread-self, so do it\n\t\t\t// manually.\n\t\t\tthreadSelf = \"self/task/\" + strconv.Itoa(unix.Gettid())\n\t\t\tif err := fd.Faccessat(proc.Inner, threadSelf, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW); err != nil || hookForceProcSelf() {\n\t\t\t\t// In this case, we running in a pid namespace that doesn't\n\t\t\t\t// match the /proc mount we have. This can happen inside runc.\n\t\t\t\t//\n\t\t\t\t// Unfortunately, there is no nice way to get the correct TID\n\t\t\t\t// to use here because of the age of the kernel, so we have to\n\t\t\t\t// just use /proc/self and hope that it works.\n\t\t\t\tthreadSelf = \"self\"\n\t\t\t}\n\t\t}\n\t\treturn threadSelf, nil\n\t}\n\treturn \"\", fmt.Errorf(\"invalid procfs base %q\", base)\n}\n\n// ProcThreadSelfCloser is a callback that needs to be called when you are done\n// operating on an [os.File] fetched using [ProcThreadSelf].\n//\n// [os.File]: https://pkg.go.dev/os#File\ntype ProcThreadSelfCloser func()\n\n// open is the core lookup operation for [Handle]. It returns a handle to\n// \"/proc/<base>/<subpath>\". If the returned [ProcThreadSelfCloser] is non-nil,\n// you should call it after you are done interacting with the returned handle.\n//\n// In general you should use prefer to use the other helpers, as they remove\n// the need to interact with [procfsBase] and do not return a nil\n// [ProcThreadSelfCloser] for [procfsBase] values other than [ProcThreadSelf]\n// where it is necessary.\nfunc (proc *Handle) open(base procfsBase, subpath string) (_ *os.File, closer ProcThreadSelfCloser, Err error) {\n\tprefix, err := base.prefix(proc)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tsubpath = prefix + \"/\" + subpath\n\n\tswitch base {\n\tcase ProcRoot:\n\t\tfile, err := proc.lookup(subpath)\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t// The Handle handle in use might be a subset=pid one, which will\n\t\t\t// result in spurious errors. In this case, just open a temporary\n\t\t\t// unmasked procfs handle for this operation.\n\t\t\tproc, err2 := OpenUnsafeProcRoot() // !subset=pid\n\t\t\tif err2 != nil {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\tdefer proc.Close() //nolint:errcheck // close failures aren't critical here\n\n\t\t\tfile, err = proc.lookup(subpath)\n\t\t}\n\t\treturn file, nil, err\n\n\tcase ProcSelf:\n\t\tfile, err := proc.lookup(subpath)\n\t\treturn file, nil, err\n\n\tcase ProcThreadSelf:\n\t\t// We need to lock our thread until the caller is done with the handle\n\t\t// because between getting the handle and using it we could get\n\t\t// interrupted by the Go runtime and hit the case where the underlying\n\t\t// thread is swapped out and the original thread is killed, resulting\n\t\t// in pull-your-hair-out-hard-to-debug issues in the caller.\n\t\truntime.LockOSThread()\n\t\tdefer func() {\n\t\t\tif Err != nil {\n\t\t\t\truntime.UnlockOSThread()\n\t\t\t\tcloser = nil\n\t\t\t}\n\t\t}()\n\n\t\tfile, err := proc.lookup(subpath)\n\t\treturn file, runtime.UnlockOSThread, err\n\t}\n\t// should never be reached\n\treturn nil, nil, fmt.Errorf(\"[internal error] invalid procfs base %q\", base)\n}\n\n// OpenThreadSelf returns a handle to \"/proc/thread-self/<subpath>\" (or an\n// equivalent handle on older kernels where \"/proc/thread-self\" doesn't exist).\n// Once finished with the handle, you must call the returned closer function\n// (runtime.UnlockOSThread). You must not pass the returned *os.File to other\n// Go threads or use the handle after calling the closer.\nfunc (proc *Handle) OpenThreadSelf(subpath string) (_ *os.File, _ ProcThreadSelfCloser, Err error) {\n\treturn proc.open(ProcThreadSelf, subpath)\n}\n\n// OpenSelf returns a handle to /proc/self/<subpath>.\nfunc (proc *Handle) OpenSelf(subpath string) (*os.File, error) {\n\tfile, closer, err := proc.open(ProcSelf, subpath)\n\tassert.Assert(closer == nil, \"closer for ProcSelf must be nil\")\n\treturn file, err\n}\n\n// OpenRoot returns a handle to /proc/<subpath>.\nfunc (proc *Handle) OpenRoot(subpath string) (*os.File, error) {\n\tfile, closer, err := proc.open(ProcRoot, subpath)\n\tassert.Assert(closer == nil, \"closer for ProcRoot must be nil\")\n\treturn file, err\n}\n\n// OpenPid returns a handle to /proc/$pid/<subpath> (pid can be a pid or tid).\n// This is mainly intended for usage when operating on other processes.\nfunc (proc *Handle) OpenPid(pid int, subpath string) (*os.File, error) {\n\treturn proc.OpenRoot(strconv.Itoa(pid) + \"/\" + subpath)\n}\n\n// checkSubpathOvermount checks if the dirfd and path combination is on the\n// same mount as the given root.\nfunc checkSubpathOvermount(root, dir fd.Fd, path string) error {\n\t// Get the mntID of our procfs handle.\n\texpectedMountID, err := fd.GetMountID(root, \"\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get root mount id: %w\", err)\n\t}\n\t// Get the mntID of the target magic-link.\n\tgotMountID, err := fd.GetMountID(dir, path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get subpath mount id: %w\", err)\n\t}\n\t// As long as the directory mount is alive, even with wrapping mount IDs,\n\t// we would expect to see a different mount ID here. (Of course, if we're\n\t// using unsafeHostProcRoot() then an attaker could change this after we\n\t// did this check.)\n\tif expectedMountID != gotMountID {\n\t\treturn fmt.Errorf(\"%w: subpath %s/%s has an overmount obscuring the real path (mount ids do not match %d != %d)\",\n\t\t\terrUnsafeProcfs, dir.Name(), path, expectedMountID, gotMountID)\n\t}\n\treturn nil\n}\n\n// Readlink performs a readlink operation on \"/proc/<base>/<subpath>\" in a way\n// that should be free from race attacks. This is most commonly used to get the\n// real path of a file by looking at \"/proc/self/fd/$n\", with the same safety\n// protections as [Open] (as well as some additional checks against\n// overmounts).\nfunc (proc *Handle) Readlink(base procfsBase, subpath string) (string, error) {\n\tlink, closer, err := proc.open(base, subpath)\n\tif closer != nil {\n\t\tdefer closer()\n\t}\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"get safe %s/%s handle: %w\", base, subpath, err)\n\t}\n\tdefer link.Close() //nolint:errcheck // close failures aren't critical here\n\n\t// Try to detect if there is a mount on top of the magic-link. This should\n\t// be safe in general (a mount on top of the path afterwards would not\n\t// affect the handle itself) and will definitely be safe if we are using\n\t// privateProcRoot() (at least since Linux 5.12[1], when anonymous mount\n\t// namespaces were completely isolated from external mounts including mount\n\t// propagation events).\n\t//\n\t// [1]: Linux commit ee2e3f50629f (\"mount: fix mounting of detached mounts\n\t// onto targets that reside on shared mounts\").\n\tif err := checkSubpathOvermount(proc.Inner, link, \"\"); err != nil {\n\t\treturn \"\", fmt.Errorf(\"check safety of %s/%s magiclink: %w\", base, subpath, err)\n\t}\n\n\t// readlinkat implies AT_EMPTY_PATH since Linux 2.6.39. See Linux commit\n\t// 65cfc6722361 (\"readlinkat(), fchownat() and fstatat() with empty\n\t// relative pathnames\").\n\treturn fd.Readlinkat(link, \"\")\n}\n\n// ProcSelfFdReadlink gets the real path of the given file by looking at\n// readlink(/proc/thread-self/fd/$n).\n//\n// This is just a wrapper around [Handle.Readlink].\nfunc ProcSelfFdReadlink(fd fd.Fd) (string, error) {\n\tprocRoot, err := OpenProcRoot() // subset=pid\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer procRoot.Close() //nolint:errcheck // close failures aren't critical here\n\n\tfdPath := \"fd/\" + strconv.Itoa(int(fd.Fd()))\n\treturn procRoot.Readlink(ProcThreadSelf, fdPath)\n}\n\n// CheckProcSelfFdPath returns whether the given file handle matches the\n// expected path. (This is inherently racy.)\nfunc CheckProcSelfFdPath(path string, file fd.Fd) error {\n\tif err := fd.IsDeadInode(file); err != nil {\n\t\treturn err\n\t}\n\tactualPath, err := ProcSelfFdReadlink(file)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get path of handle: %w\", err)\n\t}\n\tif actualPath != path {\n\t\treturn fmt.Errorf(\"%w: handle path %q doesn't match expected path %q\", internal.ErrPossibleBreakout, actualPath, path)\n\t}\n\treturn nil\n}\n\n// ReopenFd takes an existing file descriptor and \"re-opens\" it through\n// /proc/thread-self/fd/<fd>. This allows for O_PATH file descriptors to be\n// upgraded to regular file descriptors, as well as changing the open mode of a\n// regular file descriptor. Some filesystems have unique handling of open(2)\n// which make this incredibly useful (such as /dev/ptmx).\nfunc ReopenFd(handle fd.Fd, flags int) (*os.File, error) {\n\tprocRoot, err := OpenProcRoot() // subset=pid\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer procRoot.Close() //nolint:errcheck // close failures aren't critical here\n\n\t// We can't operate on /proc/thread-self/fd/$n directly when doing a\n\t// re-open, so we need to open /proc/thread-self/fd and then open a single\n\t// final component.\n\tprocFdDir, closer, err := procRoot.OpenThreadSelf(\"fd/\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"get safe /proc/thread-self/fd handle: %w\", err)\n\t}\n\tdefer procFdDir.Close() //nolint:errcheck // close failures aren't critical here\n\tdefer closer()\n\n\t// Try to detect if there is a mount on top of the magic-link we are about\n\t// to open. If we are using unsafeHostProcRoot(), this could change after\n\t// we check it (and there's nothing we can do about that) but for\n\t// privateProcRoot() this should be guaranteed to be safe (at least since\n\t// Linux 5.12[1], when anonymous mount namespaces were completely isolated\n\t// from external mounts including mount propagation events).\n\t//\n\t// [1]: Linux commit ee2e3f50629f (\"mount: fix mounting of detached mounts\n\t// onto targets that reside on shared mounts\").\n\tfdStr := strconv.Itoa(int(handle.Fd()))\n\tif err := checkSubpathOvermount(procRoot.Inner, procFdDir, fdStr); err != nil {\n\t\treturn nil, fmt.Errorf(\"check safety of /proc/thread-self/fd/%s magiclink: %w\", fdStr, err)\n\t}\n\n\tflags |= unix.O_CLOEXEC\n\t// Rather than just wrapping fd.Openat, open-code it so we can copy\n\t// handle.Name().\n\treopenFd, err := unix.Openat(int(procFdDir.Fd()), fdStr, flags, 0)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reopen fd %d: %w\", handle.Fd(), err)\n\t}\n\treturn os.NewFile(uintptr(reopenFd), handle.Name()), nil\n}\n\n// Test hooks used in the procfs tests to verify that the fallback logic works.\n// See testing_mocks_linux_test.go and procfs_linux_test.go for more details.\nvar (\n\thookForcePrivateProcRootOpenTree            = hookDummyFile\n\thookForcePrivateProcRootOpenTreeAtRecursive = hookDummyFile\n\thookForceGetProcRootUnsafe                  = hookDummy\n\n\thookForceProcSelfTask = hookDummy\n\thookForceProcSelf     = hookDummy\n)\n\nfunc hookDummy() bool                { return false }\nfunc hookDummyFile(_ io.Closer) bool { return false }\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs/procfs_lookup_linux.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// This code is adapted to be a minimal version of the libpathrs proc resolver\n// <https://github.com/opensuse/libpathrs/blob/v0.1.3/src/resolvers/procfs.rs>.\n// As we only need O_PATH|O_NOFOLLOW support, this is not too much to port.\n\npackage procfs\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/cyphar/filepath-securejoin/internal/consts\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux\"\n)\n\n// procfsLookupInRoot is a stripped down version of completeLookupInRoot,\n// entirely designed to support the very small set of features necessary to\n// make procfs handling work. Unlike completeLookupInRoot, we always have\n// O_PATH|O_NOFOLLOW behaviour for trailing symlinks.\n//\n// The main restrictions are:\n//\n//   - \"..\" is not supported (as it requires either os.Root-style replays,\n//     which is more bug-prone; or procfs verification, which is not possible\n//     due to re-entrancy issues).\n//   - Absolute symlinks for the same reason (and all absolute symlinks in\n//     procfs are magic-links, which we want to skip anyway).\n//   - If statx is supported (checkSymlinkOvermount), any mount-point crossings\n//     (which is the main attack of concern against /proc).\n//   - Partial lookups are not supported, so the symlink stack is not needed.\n//   - Trailing slash special handling is not necessary in most cases (if we\n//     operating on procfs, it's usually with programmer-controlled strings\n//     that will then be re-opened), so we skip it since whatever re-opens it\n//     can deal with it. It's a creature comfort anyway.\n//\n// If the system supports openat2(), this is implemented using equivalent flags\n// (RESOLVE_BENEATH | RESOLVE_NO_XDEV | RESOLVE_NO_MAGICLINKS).\nfunc procfsLookupInRoot(procRoot fd.Fd, unsafePath string) (Handle *os.File, _ error) {\n\tunsafePath = filepath.ToSlash(unsafePath) // noop\n\n\t// Make sure that an empty unsafe path still returns something sane, even\n\t// with openat2 (which doesn't have AT_EMPTY_PATH semantics yet).\n\tif unsafePath == \"\" {\n\t\tunsafePath = \".\"\n\t}\n\n\t// This is already checked by getProcRoot, but make sure here since the\n\t// core security of this lookup is based on this assumption.\n\tif err := verifyProcRoot(procRoot); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif linux.HasOpenat2() {\n\t\t// We prefer being able to use RESOLVE_NO_XDEV if we can, to be\n\t\t// absolutely sure we are operating on a clean /proc handle that\n\t\t// doesn't have any cheeky overmounts that could trick us (including\n\t\t// symlink mounts on top of /proc/thread-self). RESOLVE_BENEATH isn't\n\t\t// strictly needed, but just use it since we have it.\n\t\t//\n\t\t// NOTE: /proc/self is technically a magic-link (the contents of the\n\t\t//       symlink are generated dynamically), but it doesn't use\n\t\t//       nd_jump_link() so RESOLVE_NO_MAGICLINKS allows it.\n\t\t//\n\t\t// TODO: It would be nice to have RESOLVE_NO_DOTDOT, purely for\n\t\t//       self-consistency with the backup O_PATH resolver.\n\t\thandle, err := fd.Openat2(procRoot, unsafePath, &unix.OpenHow{\n\t\t\tFlags:   unix.O_PATH | unix.O_NOFOLLOW | unix.O_CLOEXEC,\n\t\t\tResolve: unix.RESOLVE_BENEATH | unix.RESOLVE_NO_XDEV | unix.RESOLVE_NO_MAGICLINKS,\n\t\t})\n\t\tif err != nil {\n\t\t\t// TODO: Once we bump the minimum Go version to 1.20, we can use\n\t\t\t// multiple %w verbs for this wrapping. For now we need to use a\n\t\t\t// compatibility shim for older Go versions.\n\t\t\t// err = fmt.Errorf(\"%w: %w\", errUnsafeProcfs, err)\n\t\t\treturn nil, gocompat.WrapBaseError(err, errUnsafeProcfs)\n\t\t}\n\t\treturn handle, nil\n\t}\n\n\t// To mirror openat2(RESOLVE_BENEATH), we need to return an error if the\n\t// path is absolute.\n\tif path.IsAbs(unsafePath) {\n\t\treturn nil, fmt.Errorf(\"%w: cannot resolve absolute paths in procfs resolver\", internal.ErrPossibleBreakout)\n\t}\n\n\tcurrentDir, err := fd.Dup(procRoot)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"clone root fd: %w\", err)\n\t}\n\tdefer func() {\n\t\t// If a handle is not returned, close the internal handle.\n\t\tif Handle == nil {\n\t\t\t_ = currentDir.Close()\n\t\t}\n\t}()\n\n\tvar (\n\t\tlinksWalked   int\n\t\tcurrentPath   string\n\t\tremainingPath = unsafePath\n\t)\n\tfor remainingPath != \"\" {\n\t\t// Get the next path component.\n\t\tvar part string\n\t\tif i := strings.IndexByte(remainingPath, '/'); i == -1 {\n\t\t\tpart, remainingPath = remainingPath, \"\"\n\t\t} else {\n\t\t\tpart, remainingPath = remainingPath[:i], remainingPath[i+1:]\n\t\t}\n\t\tif part == \"\" {\n\t\t\t// no-op component, but treat it the same as \".\"\n\t\t\tpart = \".\"\n\t\t}\n\t\tif part == \"..\" {\n\t\t\t// not permitted\n\t\t\treturn nil, fmt.Errorf(\"%w: cannot walk into '..' in procfs resolver\", internal.ErrPossibleBreakout)\n\t\t}\n\n\t\t// Apply the component lexically to the path we are building.\n\t\t// currentPath does not contain any symlinks, and we are lexically\n\t\t// dealing with a single component, so it's okay to do a filepath.Clean\n\t\t// here. (Not to mention that \"..\" isn't allowed.)\n\t\tnextPath := path.Join(\"/\", currentPath, part)\n\t\t// If we logically hit the root, just clone the root rather than\n\t\t// opening the part and doing all of the other checks.\n\t\tif nextPath == \"/\" {\n\t\t\t// Jump to root.\n\t\t\trootClone, err := fd.Dup(procRoot)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"clone root fd: %w\", err)\n\t\t\t}\n\t\t\t_ = currentDir.Close()\n\t\t\tcurrentDir = rootClone\n\t\t\tcurrentPath = nextPath\n\t\t\tcontinue\n\t\t}\n\n\t\t// Try to open the next component.\n\t\tnextDir, err := fd.Openat(currentDir, part, unix.O_PATH|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Make sure we are still on procfs and haven't crossed mounts.\n\t\tif err := verifyProcHandle(nextDir); err != nil {\n\t\t\t_ = nextDir.Close()\n\t\t\treturn nil, fmt.Errorf(\"check %q component is on procfs: %w\", part, err)\n\t\t}\n\t\tif err := checkSubpathOvermount(procRoot, nextDir, \"\"); err != nil {\n\t\t\t_ = nextDir.Close()\n\t\t\treturn nil, fmt.Errorf(\"check %q component is not overmounted: %w\", part, err)\n\t\t}\n\n\t\t// We are emulating O_PATH|O_NOFOLLOW, so we only need to traverse into\n\t\t// trailing symlinks if we are not the final component. Otherwise we\n\t\t// can just return the currentDir.\n\t\tif remainingPath != \"\" {\n\t\t\tst, err := nextDir.Stat()\n\t\t\tif err != nil {\n\t\t\t\t_ = nextDir.Close()\n\t\t\t\treturn nil, fmt.Errorf(\"stat component %q: %w\", part, err)\n\t\t\t}\n\n\t\t\tif st.Mode()&os.ModeType == os.ModeSymlink {\n\t\t\t\t// readlinkat implies AT_EMPTY_PATH since Linux 2.6.39. See\n\t\t\t\t// Linux commit 65cfc6722361 (\"readlinkat(), fchownat() and\n\t\t\t\t// fstatat() with empty relative pathnames\").\n\t\t\t\tlinkDest, err := fd.Readlinkat(nextDir, \"\")\n\t\t\t\t// We don't need the handle anymore.\n\t\t\t\t_ = nextDir.Close()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tlinksWalked++\n\t\t\t\tif linksWalked > consts.MaxSymlinkLimit {\n\t\t\t\t\treturn nil, &os.PathError{Op: \"securejoin.procfsLookupInRoot\", Path: \"/proc/\" + unsafePath, Err: unix.ELOOP}\n\t\t\t\t}\n\n\t\t\t\t// Update our logical remaining path.\n\t\t\t\tremainingPath = linkDest + \"/\" + remainingPath\n\t\t\t\t// Absolute symlinks are probably magiclinks, we reject them.\n\t\t\t\tif path.IsAbs(linkDest) {\n\t\t\t\t\treturn nil, fmt.Errorf(\"%w: cannot jump to / in procfs resolver -- possible magiclink\", internal.ErrPossibleBreakout)\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// Walk into the next component.\n\t\t_ = currentDir.Close()\n\t\tcurrentDir = nextDir\n\t\tcurrentPath = nextPath\n\t}\n\n\t// One final sanity-check.\n\tif err := verifyProcHandle(currentDir); err != nil {\n\t\treturn nil, fmt.Errorf(\"check final handle is on procfs: %w\", err)\n\t}\n\tif err := checkSubpathOvermount(procRoot, currentDir, \"\"); err != nil {\n\t\treturn nil, fmt.Errorf(\"check final handle is not overmounted: %w\", err)\n\t}\n\treturn currentDir, nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/mkdir.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// MkdirAll is a race-safe alternative to the [os.MkdirAll] function,\n// where the new directory is guaranteed to be within the root directory (if an\n// attacker can move directories from inside the root to outside the root, the\n// created directory tree might be outside of the root but the key constraint\n// is that at no point will we walk outside of the directory tree we are\n// creating).\n//\n// Effectively, MkdirAll(root, unsafePath, mode) is equivalent to\n//\n//\tpath, _ := securejoin.SecureJoin(root, unsafePath)\n//\terr := os.MkdirAll(path, mode)\n//\n// But is much safer. The above implementation is unsafe because if an attacker\n// can modify the filesystem tree between [SecureJoin] and [os.MkdirAll], it is\n// possible for MkdirAll to resolve unsafe symlink components and create\n// directories outside of the root.\n//\n// If you plan to open the directory after you have created it or want to use\n// an open directory handle as the root, you should use [MkdirAllHandle] instead.\n// This function is a wrapper around [MkdirAllHandle].\n//\n// [SecureJoin]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin#SecureJoin\nfunc MkdirAll(root, unsafePath string, mode os.FileMode) error {\n\trootDir, err := os.OpenFile(root, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer rootDir.Close() //nolint:errcheck // close failures aren't critical here\n\n\tf, err := MkdirAllHandle(rootDir, unsafePath, mode)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_ = f.Close()\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/mkdir_libpathrs.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"cyphar.com/go-pathrs\"\n)\n\n// MkdirAllHandle is equivalent to [MkdirAll], except that it is safer to use\n// in two respects:\n//\n//   - The caller provides the root directory as an *[os.File] (preferably O_PATH)\n//     handle. This means that the caller can be sure which root directory is\n//     being used. Note that this can be emulated by using /proc/self/fd/... as\n//     the root path with [os.MkdirAll].\n//\n//   - Once all of the directories have been created, an *[os.File] O_PATH handle\n//     to the directory at unsafePath is returned to the caller. This is done in\n//     an effectively-race-free way (an attacker would only be able to swap the\n//     final directory component), which is not possible to emulate with\n//     [MkdirAll].\n//\n// In addition, the returned handle is obtained far more efficiently than doing\n// a brand new lookup of unsafePath (such as with [SecureJoin] or openat2) after\n// doing [MkdirAll]. If you intend to open the directory after creating it, you\n// should use MkdirAllHandle.\n//\n// [SecureJoin]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin#SecureJoin\nfunc MkdirAllHandle(root *os.File, unsafePath string, mode os.FileMode) (*os.File, error) {\n\trootRef, err := pathrs.RootFromFile(root)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rootRef.Close() //nolint:errcheck // close failures aren't critical here\n\n\thandle, err := rootRef.MkdirAll(unsafePath, mode)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn handle.IntoFile(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/mkdir_purego.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux && !libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs\"\n)\n\n// MkdirAllHandle is equivalent to [MkdirAll], except that it is safer to use\n// in two respects:\n//\n//   - The caller provides the root directory as an *[os.File] (preferably O_PATH)\n//     handle. This means that the caller can be sure which root directory is\n//     being used. Note that this can be emulated by using /proc/self/fd/... as\n//     the root path with [os.MkdirAll].\n//\n//   - Once all of the directories have been created, an *[os.File] O_PATH handle\n//     to the directory at unsafePath is returned to the caller. This is done in\n//     an effectively-race-free way (an attacker would only be able to swap the\n//     final directory component), which is not possible to emulate with\n//     [MkdirAll].\n//\n// In addition, the returned handle is obtained far more efficiently than doing\n// a brand new lookup of unsafePath (such as with [SecureJoin] or openat2) after\n// doing [MkdirAll]. If you intend to open the directory after creating it, you\n// should use MkdirAllHandle.\n//\n// [SecureJoin]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin#SecureJoin\nfunc MkdirAllHandle(root *os.File, unsafePath string, mode os.FileMode) (*os.File, error) {\n\treturn gopathrs.MkdirAllHandle(root, unsafePath, mode)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/open.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// OpenInRoot safely opens the provided unsafePath within the root.\n// Effectively, OpenInRoot(root, unsafePath) is equivalent to\n//\n//\tpath, _ := securejoin.SecureJoin(root, unsafePath)\n//\thandle, err := os.OpenFile(path, unix.O_PATH|unix.O_CLOEXEC)\n//\n// But is much safer. The above implementation is unsafe because if an attacker\n// can modify the filesystem tree between [SecureJoin] and [os.OpenFile], it is\n// possible for the returned file to be outside of the root.\n//\n// Note that the returned handle is an O_PATH handle, meaning that only a very\n// limited set of operations will work on the handle. This is done to avoid\n// accidentally opening an untrusted file that could cause issues (such as a\n// disconnected TTY that could cause a DoS, or some other issue). In order to\n// use the returned handle, you can \"upgrade\" it to a proper handle using\n// [Reopen].\n//\n// [SecureJoin]: https://pkg.go.dev/github.com/cyphar/filepath-securejoin#SecureJoin\nfunc OpenInRoot(root, unsafePath string) (*os.File, error) {\n\trootDir, err := os.OpenFile(root, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rootDir.Close() //nolint:errcheck // close failures aren't critical here\n\treturn OpenatInRoot(rootDir, unsafePath)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/open_libpathrs.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"cyphar.com/go-pathrs\"\n)\n\n// OpenatInRoot is equivalent to [OpenInRoot], except that the root is provided\n// using an *[os.File] handle, to ensure that the correct root directory is used.\nfunc OpenatInRoot(root *os.File, unsafePath string) (*os.File, error) {\n\trootRef, err := pathrs.RootFromFile(root)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rootRef.Close() //nolint:errcheck // close failures aren't critical here\n\n\thandle, err := rootRef.Resolve(unsafePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn handle.IntoFile(), nil\n}\n\n// Reopen takes an *[os.File] handle and re-opens it through /proc/self/fd.\n// Reopen(file, flags) is effectively equivalent to\n//\n//\tfdPath := fmt.Sprintf(\"/proc/self/fd/%d\", file.Fd())\n//\tos.OpenFile(fdPath, flags|unix.O_CLOEXEC)\n//\n// But with some extra hardenings to ensure that we are not tricked by a\n// maliciously-configured /proc mount. While this attack scenario is not\n// common, in container runtimes it is possible for higher-level runtimes to be\n// tricked into configuring an unsafe /proc that can be used to attack file\n// operations. See [CVE-2019-19921] for more details.\n//\n// [CVE-2019-19921]: https://github.com/advisories/GHSA-fh74-hm69-rqjw\nfunc Reopen(file *os.File, flags int) (*os.File, error) {\n\thandle, err := pathrs.HandleFromFile(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer handle.Close() //nolint:errcheck // close failures aren't critical here\n\n\treturn handle.OpenFile(flags)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/open_purego.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux && !libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\npackage pathrs\n\nimport (\n\t\"os\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs\"\n)\n\n// OpenatInRoot is equivalent to [OpenInRoot], except that the root is provided\n// using an *[os.File] handle, to ensure that the correct root directory is used.\nfunc OpenatInRoot(root *os.File, unsafePath string) (*os.File, error) {\n\treturn gopathrs.OpenatInRoot(root, unsafePath)\n}\n\n// Reopen takes an *[os.File] handle and re-opens it through /proc/self/fd.\n// Reopen(file, flags) is effectively equivalent to\n//\n//\tfdPath := fmt.Sprintf(\"/proc/self/fd/%d\", file.Fd())\n//\tos.OpenFile(fdPath, flags|unix.O_CLOEXEC)\n//\n// But with some extra hardenings to ensure that we are not tricked by a\n// maliciously-configured /proc mount. While this attack scenario is not\n// common, in container runtimes it is possible for higher-level runtimes to be\n// tricked into configuring an unsafe /proc that can be used to attack file\n// operations. See [CVE-2019-19921] for more details.\n//\n// [CVE-2019-19921]: https://github.com/advisories/GHSA-fh74-hm69-rqjw\nfunc Reopen(handle *os.File, flags int) (*os.File, error) {\n\treturn procfs.ReopenFd(handle, flags)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/procfs/procfs_libpathrs.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package procfs provides a safe API for operating on /proc on Linux.\npackage procfs\n\nimport (\n\t\"os\"\n\t\"strconv\"\n\n\t\"cyphar.com/go-pathrs/procfs\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// ProcThreadSelfCloser is a callback that needs to be called when you are done\n// operating on an [os.File] fetched using [Handle.OpenThreadSelf].\n//\n// [os.File]: https://pkg.go.dev/os#File\ntype ProcThreadSelfCloser = procfs.ThreadCloser\n\n// Handle is a wrapper around an *os.File handle to \"/proc\", which can be used\n// to do further procfs-related operations in a safe way.\ntype Handle struct {\n\tinner *procfs.Handle\n}\n\n// Close close the resources associated with this [Handle]. Note that if this\n// [Handle] was created with [OpenProcRoot], on some kernels the underlying\n// procfs handle is cached and so this Close operation may be a no-op. However,\n// you should always call Close on [Handle]s once you are done with them.\nfunc (proc *Handle) Close() error { return proc.inner.Close() }\n\n// OpenProcRoot tries to open a \"safer\" handle to \"/proc\" (i.e., one with the\n// \"subset=pid\" mount option applied, available from Linux 5.8). Unless you\n// plan to do many [Handle.OpenRoot] operations, users should prefer to use\n// this over [OpenUnsafeProcRoot] which is far more dangerous to keep open.\n//\n// If a safe handle cannot be opened, OpenProcRoot will fall back to opening a\n// regular \"/proc\" handle.\n//\n// Note that using [Handle.OpenRoot] will still work with handles returned by\n// this function. If a subpath cannot be operated on with a safe \"/proc\"\n// handle, then [OpenUnsafeProcRoot] will be called internally and a temporary\n// unsafe handle will be used.\nfunc OpenProcRoot() (*Handle, error) {\n\tproc, err := procfs.Open()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Handle{inner: proc}, nil\n}\n\n// OpenUnsafeProcRoot opens a handle to \"/proc\" without any overmounts or\n// masked paths. You must be extremely careful to make sure this handle is\n// never leaked to a container and that you program cannot be tricked into\n// writing to arbitrary paths within it.\n//\n// This is not necessary if you just wish to use [Handle.OpenRoot], as handles\n// returned by [OpenProcRoot] will fall back to using a *temporary* unsafe\n// handle in that case. You should only really use this if you need to do many\n// operations with [Handle.OpenRoot] and the performance overhead of making\n// many procfs handles is an issue. If you do use OpenUnsafeProcRoot, you\n// should make sure to close the handle as soon as possible to avoid\n// known-fd-number attacks.\nfunc OpenUnsafeProcRoot() (*Handle, error) {\n\tproc, err := procfs.Open(procfs.UnmaskedProcRoot)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Handle{inner: proc}, nil\n}\n\n// OpenThreadSelf returns a handle to \"/proc/thread-self/<subpath>\" (or an\n// equivalent handle on older kernels where \"/proc/thread-self\" doesn't exist).\n// Once finished with the handle, you must call the returned closer function\n// ([runtime.UnlockOSThread]). You must not pass the returned *os.File to other\n// Go threads or use the handle after calling the closer.\n//\n// [runtime.UnlockOSThread]: https://pkg.go.dev/runtime#UnlockOSThread\nfunc (proc *Handle) OpenThreadSelf(subpath string) (*os.File, ProcThreadSelfCloser, error) {\n\treturn proc.inner.OpenThreadSelf(subpath, unix.O_PATH|unix.O_NOFOLLOW)\n}\n\n// OpenSelf returns a handle to /proc/self/<subpath>.\n//\n// Note that in Go programs with non-homogenous threads, this may result in\n// spurious errors. If you are monkeying around with APIs that are\n// thread-specific, you probably want to use [Handle.OpenThreadSelf] instead\n// which will guarantee that the handle refers to the same thread as the caller\n// is executing on.\nfunc (proc *Handle) OpenSelf(subpath string) (*os.File, error) {\n\treturn proc.inner.OpenSelf(subpath, unix.O_PATH|unix.O_NOFOLLOW)\n}\n\n// OpenRoot returns a handle to /proc/<subpath>.\n//\n// You should only use this when you need to operate on global procfs files\n// (such as sysctls in /proc/sys). Unlike [Handle.OpenThreadSelf],\n// [Handle.OpenSelf], and [Handle.OpenPid], the procfs handle used internally\n// for this operation will never use \"subset=pid\", which makes it a more juicy\n// target for [CVE-2024-21626]-style attacks (and doing something like opening\n// a directory with OpenRoot effectively leaks [OpenUnsafeProcRoot] as long as\n// the file descriptor is open).\n//\n// [CVE-2024-21626]: https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv\nfunc (proc *Handle) OpenRoot(subpath string) (*os.File, error) {\n\treturn proc.inner.OpenRoot(subpath, unix.O_PATH|unix.O_NOFOLLOW)\n}\n\n// OpenPid returns a handle to /proc/$pid/<subpath> (pid can be a pid or tid).\n// This is mainly intended for usage when operating on other processes.\n//\n// You should not use this for the current thread, as special handling is\n// needed for /proc/thread-self (or /proc/self/task/<tid>) when dealing with\n// goroutine scheduling -- use [Handle.OpenThreadSelf] instead.\n//\n// To refer to the current thread-group, you should use prefer\n// [Handle.OpenSelf] to passing os.Getpid as the pid argument.\nfunc (proc *Handle) OpenPid(pid int, subpath string) (*os.File, error) {\n\treturn proc.inner.OpenPid(pid, subpath, unix.O_PATH|unix.O_NOFOLLOW)\n}\n\n// ProcSelfFdReadlink gets the real path of the given file by looking at\n// /proc/self/fd/<fd> with [readlink]. It is effectively just shorthand for\n// something along the lines of:\n//\n//\tproc, err := procfs.OpenProcRoot()\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tlink, err := proc.OpenThreadSelf(fmt.Sprintf(\"fd/%d\", f.Fd()))\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tdefer link.Close()\n//\tvar buf [4096]byte\n//\tn, err := unix.Readlinkat(int(link.Fd()), \"\", buf[:])\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tpathname := buf[:n]\n//\n// [readlink]: https://pkg.go.dev/golang.org/x/sys/unix#Readlinkat\nfunc ProcSelfFdReadlink(f *os.File) (string, error) {\n\tproc, err := procfs.Open()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer proc.Close() //nolint:errcheck // close failures aren't critical here\n\n\tfdPath := \"fd/\" + strconv.Itoa(int(f.Fd()))\n\treturn proc.Readlink(procfs.ProcThreadSelf, fdPath)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/pathrs-lite/procfs/procfs_purego.go",
    "content": "// SPDX-License-Identifier: MPL-2.0\n\n//go:build linux && !libpathrs\n\n// Copyright (C) 2024-2025 Aleksa Sarai <cyphar@cyphar.com>\n// Copyright (C) 2024-2025 SUSE LLC\n//\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at https://mozilla.org/MPL/2.0/.\n\n// Package procfs provides a safe API for operating on /proc on Linux.\npackage procfs\n\nimport (\n\t\"os\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs\"\n)\n\n// This package mostly just wraps internal/procfs APIs. This is necessary\n// because we are forced to export some things from internal/procfs in order to\n// avoid some dependency cycle issues, but we don't want users to see or use\n// them.\n\n// ProcThreadSelfCloser is a callback that needs to be called when you are done\n// operating on an [os.File] fetched using [Handle.OpenThreadSelf].\n//\n// [os.File]: https://pkg.go.dev/os#File\ntype ProcThreadSelfCloser = procfs.ProcThreadSelfCloser\n\n// Handle is a wrapper around an *os.File handle to \"/proc\", which can be used\n// to do further procfs-related operations in a safe way.\ntype Handle struct {\n\tinner *procfs.Handle\n}\n\n// Close close the resources associated with this [Handle]. Note that if this\n// [Handle] was created with [OpenProcRoot], on some kernels the underlying\n// procfs handle is cached and so this Close operation may be a no-op. However,\n// you should always call Close on [Handle]s once you are done with them.\nfunc (proc *Handle) Close() error { return proc.inner.Close() }\n\n// OpenProcRoot tries to open a \"safer\" handle to \"/proc\" (i.e., one with the\n// \"subset=pid\" mount option applied, available from Linux 5.8). Unless you\n// plan to do many [Handle.OpenRoot] operations, users should prefer to use\n// this over [OpenUnsafeProcRoot] which is far more dangerous to keep open.\n//\n// If a safe handle cannot be opened, OpenProcRoot will fall back to opening a\n// regular \"/proc\" handle.\n//\n// Note that using [Handle.OpenRoot] will still work with handles returned by\n// this function. If a subpath cannot be operated on with a safe \"/proc\"\n// handle, then [OpenUnsafeProcRoot] will be called internally and a temporary\n// unsafe handle will be used.\nfunc OpenProcRoot() (*Handle, error) {\n\tproc, err := procfs.OpenProcRoot()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Handle{inner: proc}, nil\n}\n\n// OpenUnsafeProcRoot opens a handle to \"/proc\" without any overmounts or\n// masked paths. You must be extremely careful to make sure this handle is\n// never leaked to a container and that you program cannot be tricked into\n// writing to arbitrary paths within it.\n//\n// This is not necessary if you just wish to use [Handle.OpenRoot], as handles\n// returned by [OpenProcRoot] will fall back to using a *temporary* unsafe\n// handle in that case. You should only really use this if you need to do many\n// operations with [Handle.OpenRoot] and the performance overhead of making\n// many procfs handles is an issue. If you do use OpenUnsafeProcRoot, you\n// should make sure to close the handle as soon as possible to avoid\n// known-fd-number attacks.\nfunc OpenUnsafeProcRoot() (*Handle, error) {\n\tproc, err := procfs.OpenUnsafeProcRoot()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Handle{inner: proc}, nil\n}\n\n// OpenThreadSelf returns a handle to \"/proc/thread-self/<subpath>\" (or an\n// equivalent handle on older kernels where \"/proc/thread-self\" doesn't exist).\n// Once finished with the handle, you must call the returned closer function\n// ([runtime.UnlockOSThread]). You must not pass the returned *os.File to other\n// Go threads or use the handle after calling the closer.\n//\n// [runtime.UnlockOSThread]: https://pkg.go.dev/runtime#UnlockOSThread\nfunc (proc *Handle) OpenThreadSelf(subpath string) (*os.File, ProcThreadSelfCloser, error) {\n\treturn proc.inner.OpenThreadSelf(subpath)\n}\n\n// OpenSelf returns a handle to /proc/self/<subpath>.\n//\n// Note that in Go programs with non-homogenous threads, this may result in\n// spurious errors. If you are monkeying around with APIs that are\n// thread-specific, you probably want to use [Handle.OpenThreadSelf] instead\n// which will guarantee that the handle refers to the same thread as the caller\n// is executing on.\nfunc (proc *Handle) OpenSelf(subpath string) (*os.File, error) {\n\treturn proc.inner.OpenSelf(subpath)\n}\n\n// OpenRoot returns a handle to /proc/<subpath>.\n//\n// You should only use this when you need to operate on global procfs files\n// (such as sysctls in /proc/sys). Unlike [Handle.OpenThreadSelf],\n// [Handle.OpenSelf], and [Handle.OpenPid], the procfs handle used internally\n// for this operation will never use \"subset=pid\", which makes it a more juicy\n// target for [CVE-2024-21626]-style attacks (and doing something like opening\n// a directory with OpenRoot effectively leaks [OpenUnsafeProcRoot] as long as\n// the file descriptor is open).\n//\n// [CVE-2024-21626]: https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv\nfunc (proc *Handle) OpenRoot(subpath string) (*os.File, error) {\n\treturn proc.inner.OpenRoot(subpath)\n}\n\n// OpenPid returns a handle to /proc/$pid/<subpath> (pid can be a pid or tid).\n// This is mainly intended for usage when operating on other processes.\n//\n// You should not use this for the current thread, as special handling is\n// needed for /proc/thread-self (or /proc/self/task/<tid>) when dealing with\n// goroutine scheduling -- use [Handle.OpenThreadSelf] instead.\n//\n// To refer to the current thread-group, you should use prefer\n// [Handle.OpenSelf] to passing os.Getpid as the pid argument.\nfunc (proc *Handle) OpenPid(pid int, subpath string) (*os.File, error) {\n\treturn proc.inner.OpenPid(pid, subpath)\n}\n\n// ProcSelfFdReadlink gets the real path of the given file by looking at\n// /proc/self/fd/<fd> with [readlink]. It is effectively just shorthand for\n// something along the lines of:\n//\n//\tproc, err := procfs.OpenProcRoot()\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tlink, err := proc.OpenThreadSelf(fmt.Sprintf(\"fd/%d\", f.Fd()))\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tdefer link.Close()\n//\tvar buf [4096]byte\n//\tn, err := unix.Readlinkat(int(link.Fd()), \"\", buf[:])\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\tpathname := buf[:n]\n//\n// [readlink]: https://pkg.go.dev/golang.org/x/sys/unix#Readlinkat\nfunc ProcSelfFdReadlink(f *os.File) (string, error) {\n\treturn procfs.ProcSelfFdReadlink(f)\n}\n"
  },
  {
    "path": "vendor/github.com/cyphar/filepath-securejoin/vfs.go",
    "content": "// SPDX-License-Identifier: BSD-3-Clause\n\n// Copyright (C) 2017-2024 SUSE LLC. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage securejoin\n\nimport \"os\"\n\n// In future this should be moved into a separate package, because now there\n// are several projects (umoci and go-mtree) that are using this sort of\n// interface.\n\n// VFS is the minimal interface necessary to use [SecureJoinVFS]. A nil VFS is\n// equivalent to using the standard [os].* family of functions. This is mainly\n// used for the purposes of mock testing, but also can be used to otherwise use\n// [SecureJoinVFS] with VFS-like system.\ntype VFS interface {\n\t// Lstat returns an [os.FileInfo] describing the named file. If the\n\t// file is a symbolic link, the returned [os.FileInfo] describes the\n\t// symbolic link. Lstat makes no attempt to follow the link.\n\t// The semantics are identical to [os.Lstat].\n\tLstat(name string) (os.FileInfo, error)\n\n\t// Readlink returns the destination of the named symbolic link.\n\t// The semantics are identical to [os.Readlink].\n\tReadlink(name string) (string, error)\n}\n\n// osVFS is the \"nil\" VFS, in that it just passes everything through to the os\n// module.\ntype osVFS struct{}\n\nfunc (o osVFS) Lstat(name string) (os.FileInfo, error) { return os.Lstat(name) }\n\nfunc (o osVFS) Readlink(name string) (string, error) { return os.Readlink(name) }\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/LICENSE",
    "content": "ISC License\n\nCopyright (c) 2012-2016 Dave Collins <dave@davec.name>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/bypass.go",
    "content": "// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>\n//\n// Permission to use, copy, modify, and distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n// NOTE: Due to the following build constraints, this file will only be compiled\n// when the code is not running on Google App Engine, compiled by GopherJS, and\n// \"-tags safe\" is not added to the go build command line.  The \"disableunsafe\"\n// tag is deprecated and thus should not be used.\n// Go versions prior to 1.4 are disabled because they use a different layout\n// for interfaces which make the implementation of unsafeReflectValue more complex.\n// +build !js,!appengine,!safe,!disableunsafe,go1.4\n\npackage spew\n\nimport (\n\t\"reflect\"\n\t\"unsafe\"\n)\n\nconst (\n\t// UnsafeDisabled is a build-time constant which specifies whether or\n\t// not access to the unsafe package is available.\n\tUnsafeDisabled = false\n\n\t// ptrSize is the size of a pointer on the current arch.\n\tptrSize = unsafe.Sizeof((*byte)(nil))\n)\n\ntype flag uintptr\n\nvar (\n\t// flagRO indicates whether the value field of a reflect.Value\n\t// is read-only.\n\tflagRO flag\n\n\t// flagAddr indicates whether the address of the reflect.Value's\n\t// value may be taken.\n\tflagAddr flag\n)\n\n// flagKindMask holds the bits that make up the kind\n// part of the flags field. In all the supported versions,\n// it is in the lower 5 bits.\nconst flagKindMask = flag(0x1f)\n\n// Different versions of Go have used different\n// bit layouts for the flags type. This table\n// records the known combinations.\nvar okFlags = []struct {\n\tro, addr flag\n}{{\n\t// From Go 1.4 to 1.5\n\tro:   1 << 5,\n\taddr: 1 << 7,\n}, {\n\t// Up to Go tip.\n\tro:   1<<5 | 1<<6,\n\taddr: 1 << 8,\n}}\n\nvar flagValOffset = func() uintptr {\n\tfield, ok := reflect.TypeOf(reflect.Value{}).FieldByName(\"flag\")\n\tif !ok {\n\t\tpanic(\"reflect.Value has no flag field\")\n\t}\n\treturn field.Offset\n}()\n\n// flagField returns a pointer to the flag field of a reflect.Value.\nfunc flagField(v *reflect.Value) *flag {\n\treturn (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))\n}\n\n// unsafeReflectValue converts the passed reflect.Value into a one that bypasses\n// the typical safety restrictions preventing access to unaddressable and\n// unexported data.  It works by digging the raw pointer to the underlying\n// value out of the protected value and generating a new unprotected (unsafe)\n// reflect.Value to it.\n//\n// This allows us to check for implementations of the Stringer and error\n// interfaces to be used for pretty printing ordinarily unaddressable and\n// inaccessible values such as unexported struct fields.\nfunc unsafeReflectValue(v reflect.Value) reflect.Value {\n\tif !v.IsValid() || (v.CanInterface() && v.CanAddr()) {\n\t\treturn v\n\t}\n\tflagFieldPtr := flagField(&v)\n\t*flagFieldPtr &^= flagRO\n\t*flagFieldPtr |= flagAddr\n\treturn v\n}\n\n// Sanity checks against future reflect package changes\n// to the type or semantics of the Value.flag field.\nfunc init() {\n\tfield, ok := reflect.TypeOf(reflect.Value{}).FieldByName(\"flag\")\n\tif !ok {\n\t\tpanic(\"reflect.Value has no flag field\")\n\t}\n\tif field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {\n\t\tpanic(\"reflect.Value flag field has changed kind\")\n\t}\n\ttype t0 int\n\tvar t struct {\n\t\tA t0\n\t\t// t0 will have flagEmbedRO set.\n\t\tt0\n\t\t// a will have flagStickyRO set\n\t\ta t0\n\t}\n\tvA := reflect.ValueOf(t).FieldByName(\"A\")\n\tva := reflect.ValueOf(t).FieldByName(\"a\")\n\tvt0 := reflect.ValueOf(t).FieldByName(\"t0\")\n\n\t// Infer flagRO from the difference between the flags\n\t// for the (otherwise identical) fields in t.\n\tflagPublic := *flagField(&vA)\n\tflagWithRO := *flagField(&va) | *flagField(&vt0)\n\tflagRO = flagPublic ^ flagWithRO\n\n\t// Infer flagAddr from the difference between a value\n\t// taken from a pointer and not.\n\tvPtrA := reflect.ValueOf(&t).Elem().FieldByName(\"A\")\n\tflagNoPtr := *flagField(&vA)\n\tflagPtr := *flagField(&vPtrA)\n\tflagAddr = flagNoPtr ^ flagPtr\n\n\t// Check that the inferred flags tally with one of the known versions.\n\tfor _, f := range okFlags {\n\t\tif flagRO == f.ro && flagAddr == f.addr {\n\t\t\treturn\n\t\t}\n\t}\n\tpanic(\"reflect.Value read-only flag has changed semantics\")\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/bypasssafe.go",
    "content": "// Copyright (c) 2015-2016 Dave Collins <dave@davec.name>\n//\n// Permission to use, copy, modify, and distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n// NOTE: Due to the following build constraints, this file will only be compiled\n// when the code is running on Google App Engine, compiled by GopherJS, or\n// \"-tags safe\" is added to the go build command line.  The \"disableunsafe\"\n// tag is deprecated and thus should not be used.\n// +build js appengine safe disableunsafe !go1.4\n\npackage spew\n\nimport \"reflect\"\n\nconst (\n\t// UnsafeDisabled is a build-time constant which specifies whether or\n\t// not access to the unsafe package is available.\n\tUnsafeDisabled = true\n)\n\n// unsafeReflectValue typically converts the passed reflect.Value into a one\n// that bypasses the typical safety restrictions preventing access to\n// unaddressable and unexported data.  However, doing this relies on access to\n// the unsafe package.  This is a stub version which simply returns the passed\n// reflect.Value when the unsafe package is not available.\nfunc unsafeReflectValue(v reflect.Value) reflect.Value {\n\treturn v\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/common.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\npackage spew\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n)\n\n// Some constants in the form of bytes to avoid string overhead.  This mirrors\n// the technique used in the fmt package.\nvar (\n\tpanicBytes            = []byte(\"(PANIC=\")\n\tplusBytes             = []byte(\"+\")\n\tiBytes                = []byte(\"i\")\n\ttrueBytes             = []byte(\"true\")\n\tfalseBytes            = []byte(\"false\")\n\tinterfaceBytes        = []byte(\"(interface {})\")\n\tcommaNewlineBytes     = []byte(\",\\n\")\n\tnewlineBytes          = []byte(\"\\n\")\n\topenBraceBytes        = []byte(\"{\")\n\topenBraceNewlineBytes = []byte(\"{\\n\")\n\tcloseBraceBytes       = []byte(\"}\")\n\tasteriskBytes         = []byte(\"*\")\n\tcolonBytes            = []byte(\":\")\n\tcolonSpaceBytes       = []byte(\": \")\n\topenParenBytes        = []byte(\"(\")\n\tcloseParenBytes       = []byte(\")\")\n\tspaceBytes            = []byte(\" \")\n\tpointerChainBytes     = []byte(\"->\")\n\tnilAngleBytes         = []byte(\"<nil>\")\n\tmaxNewlineBytes       = []byte(\"<max depth reached>\\n\")\n\tmaxShortBytes         = []byte(\"<max>\")\n\tcircularBytes         = []byte(\"<already shown>\")\n\tcircularShortBytes    = []byte(\"<shown>\")\n\tinvalidAngleBytes     = []byte(\"<invalid>\")\n\topenBracketBytes      = []byte(\"[\")\n\tcloseBracketBytes     = []byte(\"]\")\n\tpercentBytes          = []byte(\"%\")\n\tprecisionBytes        = []byte(\".\")\n\topenAngleBytes        = []byte(\"<\")\n\tcloseAngleBytes       = []byte(\">\")\n\topenMapBytes          = []byte(\"map[\")\n\tcloseMapBytes         = []byte(\"]\")\n\tlenEqualsBytes        = []byte(\"len=\")\n\tcapEqualsBytes        = []byte(\"cap=\")\n)\n\n// hexDigits is used to map a decimal value to a hex digit.\nvar hexDigits = \"0123456789abcdef\"\n\n// catchPanic handles any panics that might occur during the handleMethods\n// calls.\nfunc catchPanic(w io.Writer, v reflect.Value) {\n\tif err := recover(); err != nil {\n\t\tw.Write(panicBytes)\n\t\tfmt.Fprintf(w, \"%v\", err)\n\t\tw.Write(closeParenBytes)\n\t}\n}\n\n// handleMethods attempts to call the Error and String methods on the underlying\n// type the passed reflect.Value represents and outputes the result to Writer w.\n//\n// It handles panics in any called methods by catching and displaying the error\n// as the formatted value.\nfunc handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) {\n\t// We need an interface to check if the type implements the error or\n\t// Stringer interface.  However, the reflect package won't give us an\n\t// interface on certain things like unexported struct fields in order\n\t// to enforce visibility rules.  We use unsafe, when it's available,\n\t// to bypass these restrictions since this package does not mutate the\n\t// values.\n\tif !v.CanInterface() {\n\t\tif UnsafeDisabled {\n\t\t\treturn false\n\t\t}\n\n\t\tv = unsafeReflectValue(v)\n\t}\n\n\t// Choose whether or not to do error and Stringer interface lookups against\n\t// the base type or a pointer to the base type depending on settings.\n\t// Technically calling one of these methods with a pointer receiver can\n\t// mutate the value, however, types which choose to satisify an error or\n\t// Stringer interface with a pointer receiver should not be mutating their\n\t// state inside these interface methods.\n\tif !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() {\n\t\tv = unsafeReflectValue(v)\n\t}\n\tif v.CanAddr() {\n\t\tv = v.Addr()\n\t}\n\n\t// Is it an error or Stringer?\n\tswitch iface := v.Interface().(type) {\n\tcase error:\n\t\tdefer catchPanic(w, v)\n\t\tif cs.ContinueOnMethod {\n\t\t\tw.Write(openParenBytes)\n\t\t\tw.Write([]byte(iface.Error()))\n\t\t\tw.Write(closeParenBytes)\n\t\t\tw.Write(spaceBytes)\n\t\t\treturn false\n\t\t}\n\n\t\tw.Write([]byte(iface.Error()))\n\t\treturn true\n\n\tcase fmt.Stringer:\n\t\tdefer catchPanic(w, v)\n\t\tif cs.ContinueOnMethod {\n\t\t\tw.Write(openParenBytes)\n\t\t\tw.Write([]byte(iface.String()))\n\t\t\tw.Write(closeParenBytes)\n\t\t\tw.Write(spaceBytes)\n\t\t\treturn false\n\t\t}\n\t\tw.Write([]byte(iface.String()))\n\t\treturn true\n\t}\n\treturn false\n}\n\n// printBool outputs a boolean value as true or false to Writer w.\nfunc printBool(w io.Writer, val bool) {\n\tif val {\n\t\tw.Write(trueBytes)\n\t} else {\n\t\tw.Write(falseBytes)\n\t}\n}\n\n// printInt outputs a signed integer value to Writer w.\nfunc printInt(w io.Writer, val int64, base int) {\n\tw.Write([]byte(strconv.FormatInt(val, base)))\n}\n\n// printUint outputs an unsigned integer value to Writer w.\nfunc printUint(w io.Writer, val uint64, base int) {\n\tw.Write([]byte(strconv.FormatUint(val, base)))\n}\n\n// printFloat outputs a floating point value using the specified precision,\n// which is expected to be 32 or 64bit, to Writer w.\nfunc printFloat(w io.Writer, val float64, precision int) {\n\tw.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))\n}\n\n// printComplex outputs a complex value using the specified float precision\n// for the real and imaginary parts to Writer w.\nfunc printComplex(w io.Writer, c complex128, floatPrecision int) {\n\tr := real(c)\n\tw.Write(openParenBytes)\n\tw.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision)))\n\ti := imag(c)\n\tif i >= 0 {\n\t\tw.Write(plusBytes)\n\t}\n\tw.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision)))\n\tw.Write(iBytes)\n\tw.Write(closeParenBytes)\n}\n\n// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'\n// prefix to Writer w.\nfunc printHexPtr(w io.Writer, p uintptr) {\n\t// Null pointer.\n\tnum := uint64(p)\n\tif num == 0 {\n\t\tw.Write(nilAngleBytes)\n\t\treturn\n\t}\n\n\t// Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix\n\tbuf := make([]byte, 18)\n\n\t// It's simpler to construct the hex string right to left.\n\tbase := uint64(16)\n\ti := len(buf) - 1\n\tfor num >= base {\n\t\tbuf[i] = hexDigits[num%base]\n\t\tnum /= base\n\t\ti--\n\t}\n\tbuf[i] = hexDigits[num]\n\n\t// Add '0x' prefix.\n\ti--\n\tbuf[i] = 'x'\n\ti--\n\tbuf[i] = '0'\n\n\t// Strip unused leading bytes.\n\tbuf = buf[i:]\n\tw.Write(buf)\n}\n\n// valuesSorter implements sort.Interface to allow a slice of reflect.Value\n// elements to be sorted.\ntype valuesSorter struct {\n\tvalues  []reflect.Value\n\tstrings []string // either nil or same len and values\n\tcs      *ConfigState\n}\n\n// newValuesSorter initializes a valuesSorter instance, which holds a set of\n// surrogate keys on which the data should be sorted.  It uses flags in\n// ConfigState to decide if and how to populate those surrogate keys.\nfunc newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface {\n\tvs := &valuesSorter{values: values, cs: cs}\n\tif canSortSimply(vs.values[0].Kind()) {\n\t\treturn vs\n\t}\n\tif !cs.DisableMethods {\n\t\tvs.strings = make([]string, len(values))\n\t\tfor i := range vs.values {\n\t\t\tb := bytes.Buffer{}\n\t\t\tif !handleMethods(cs, &b, vs.values[i]) {\n\t\t\t\tvs.strings = nil\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvs.strings[i] = b.String()\n\t\t}\n\t}\n\tif vs.strings == nil && cs.SpewKeys {\n\t\tvs.strings = make([]string, len(values))\n\t\tfor i := range vs.values {\n\t\t\tvs.strings[i] = Sprintf(\"%#v\", vs.values[i].Interface())\n\t\t}\n\t}\n\treturn vs\n}\n\n// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted\n// directly, or whether it should be considered for sorting by surrogate keys\n// (if the ConfigState allows it).\nfunc canSortSimply(kind reflect.Kind) bool {\n\t// This switch parallels valueSortLess, except for the default case.\n\tswitch kind {\n\tcase reflect.Bool:\n\t\treturn true\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:\n\t\treturn true\n\tcase reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:\n\t\treturn true\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn true\n\tcase reflect.String:\n\t\treturn true\n\tcase reflect.Uintptr:\n\t\treturn true\n\tcase reflect.Array:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// Len returns the number of values in the slice.  It is part of the\n// sort.Interface implementation.\nfunc (s *valuesSorter) Len() int {\n\treturn len(s.values)\n}\n\n// Swap swaps the values at the passed indices.  It is part of the\n// sort.Interface implementation.\nfunc (s *valuesSorter) Swap(i, j int) {\n\ts.values[i], s.values[j] = s.values[j], s.values[i]\n\tif s.strings != nil {\n\t\ts.strings[i], s.strings[j] = s.strings[j], s.strings[i]\n\t}\n}\n\n// valueSortLess returns whether the first value should sort before the second\n// value.  It is used by valueSorter.Less as part of the sort.Interface\n// implementation.\nfunc valueSortLess(a, b reflect.Value) bool {\n\tswitch a.Kind() {\n\tcase reflect.Bool:\n\t\treturn !a.Bool() && b.Bool()\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:\n\t\treturn a.Int() < b.Int()\n\tcase reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:\n\t\treturn a.Uint() < b.Uint()\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn a.Float() < b.Float()\n\tcase reflect.String:\n\t\treturn a.String() < b.String()\n\tcase reflect.Uintptr:\n\t\treturn a.Uint() < b.Uint()\n\tcase reflect.Array:\n\t\t// Compare the contents of both arrays.\n\t\tl := a.Len()\n\t\tfor i := 0; i < l; i++ {\n\t\t\tav := a.Index(i)\n\t\t\tbv := b.Index(i)\n\t\t\tif av.Interface() == bv.Interface() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn valueSortLess(av, bv)\n\t\t}\n\t}\n\treturn a.String() < b.String()\n}\n\n// Less returns whether the value at index i should sort before the\n// value at index j.  It is part of the sort.Interface implementation.\nfunc (s *valuesSorter) Less(i, j int) bool {\n\tif s.strings == nil {\n\t\treturn valueSortLess(s.values[i], s.values[j])\n\t}\n\treturn s.strings[i] < s.strings[j]\n}\n\n// sortValues is a sort function that handles both native types and any type that\n// can be converted to error or Stringer.  Other inputs are sorted according to\n// their Value.String() value to ensure display stability.\nfunc sortValues(values []reflect.Value, cs *ConfigState) {\n\tif len(values) == 0 {\n\t\treturn\n\t}\n\tsort.Sort(newValuesSorter(values, cs))\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/config.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\npackage spew\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\n// ConfigState houses the configuration options used by spew to format and\n// display values.  There is a global instance, Config, that is used to control\n// all top-level Formatter and Dump functionality.  Each ConfigState instance\n// provides methods equivalent to the top-level functions.\n//\n// The zero value for ConfigState provides no indentation.  You would typically\n// want to set it to a space or a tab.\n//\n// Alternatively, you can use NewDefaultConfig to get a ConfigState instance\n// with default settings.  See the documentation of NewDefaultConfig for default\n// values.\ntype ConfigState struct {\n\t// Indent specifies the string to use for each indentation level.  The\n\t// global config instance that all top-level functions use set this to a\n\t// single space by default.  If you would like more indentation, you might\n\t// set this to a tab with \"\\t\" or perhaps two spaces with \"  \".\n\tIndent string\n\n\t// MaxDepth controls the maximum number of levels to descend into nested\n\t// data structures.  The default, 0, means there is no limit.\n\t//\n\t// NOTE: Circular data structures are properly detected, so it is not\n\t// necessary to set this value unless you specifically want to limit deeply\n\t// nested data structures.\n\tMaxDepth int\n\n\t// DisableMethods specifies whether or not error and Stringer interfaces are\n\t// invoked for types that implement them.\n\tDisableMethods bool\n\n\t// DisablePointerMethods specifies whether or not to check for and invoke\n\t// error and Stringer interfaces on types which only accept a pointer\n\t// receiver when the current type is not a pointer.\n\t//\n\t// NOTE: This might be an unsafe action since calling one of these methods\n\t// with a pointer receiver could technically mutate the value, however,\n\t// in practice, types which choose to satisify an error or Stringer\n\t// interface with a pointer receiver should not be mutating their state\n\t// inside these interface methods.  As a result, this option relies on\n\t// access to the unsafe package, so it will not have any effect when\n\t// running in environments without access to the unsafe package such as\n\t// Google App Engine or with the \"safe\" build tag specified.\n\tDisablePointerMethods bool\n\n\t// DisablePointerAddresses specifies whether to disable the printing of\n\t// pointer addresses. This is useful when diffing data structures in tests.\n\tDisablePointerAddresses bool\n\n\t// DisableCapacities specifies whether to disable the printing of capacities\n\t// for arrays, slices, maps and channels. This is useful when diffing\n\t// data structures in tests.\n\tDisableCapacities bool\n\n\t// ContinueOnMethod specifies whether or not recursion should continue once\n\t// a custom error or Stringer interface is invoked.  The default, false,\n\t// means it will print the results of invoking the custom error or Stringer\n\t// interface and return immediately instead of continuing to recurse into\n\t// the internals of the data type.\n\t//\n\t// NOTE: This flag does not have any effect if method invocation is disabled\n\t// via the DisableMethods or DisablePointerMethods options.\n\tContinueOnMethod bool\n\n\t// SortKeys specifies map keys should be sorted before being printed. Use\n\t// this to have a more deterministic, diffable output.  Note that only\n\t// native types (bool, int, uint, floats, uintptr and string) and types\n\t// that support the error or Stringer interfaces (if methods are\n\t// enabled) are supported, with other types sorted according to the\n\t// reflect.Value.String() output which guarantees display stability.\n\tSortKeys bool\n\n\t// SpewKeys specifies that, as a last resort attempt, map keys should\n\t// be spewed to strings and sorted by those strings.  This is only\n\t// considered if SortKeys is true.\n\tSpewKeys bool\n}\n\n// Config is the active configuration of the top-level functions.\n// The configuration can be changed by modifying the contents of spew.Config.\nvar Config = ConfigState{Indent: \" \"}\n\n// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the formatted string as a value that satisfies error.  See NewFormatter\n// for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {\n\treturn fmt.Errorf(format, c.convertArgs(a)...)\n}\n\n// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprint(w, c.convertArgs(a)...)\n}\n\n// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintf(w, format, c.convertArgs(a)...)\n}\n\n// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it\n// passed with a Formatter interface returned by c.NewFormatter.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintln(w, c.convertArgs(a)...)\n}\n\n// Print is a wrapper for fmt.Print that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Print(c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Print(a ...interface{}) (n int, err error) {\n\treturn fmt.Print(c.convertArgs(a)...)\n}\n\n// Printf is a wrapper for fmt.Printf that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {\n\treturn fmt.Printf(format, c.convertArgs(a)...)\n}\n\n// Println is a wrapper for fmt.Println that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Println(c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Println(a ...interface{}) (n int, err error) {\n\treturn fmt.Println(c.convertArgs(a)...)\n}\n\n// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Sprint(a ...interface{}) string {\n\treturn fmt.Sprint(c.convertArgs(a)...)\n}\n\n// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were\n// passed with a Formatter interface returned by c.NewFormatter.  It returns\n// the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Sprintf(format string, a ...interface{}) string {\n\treturn fmt.Sprintf(format, c.convertArgs(a)...)\n}\n\n// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it\n// were passed with a Formatter interface returned by c.NewFormatter.  It\n// returns the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))\nfunc (c *ConfigState) Sprintln(a ...interface{}) string {\n\treturn fmt.Sprintln(c.convertArgs(a)...)\n}\n\n/*\nNewFormatter returns a custom formatter that satisfies the fmt.Formatter\ninterface.  As a result, it integrates cleanly with standard fmt package\nprinting functions.  The formatter is useful for inline printing of smaller data\ntypes similar to the standard %v format specifier.\n\nThe custom formatter only responds to the %v (most compact), %+v (adds pointer\naddresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb\ncombinations.  Any other verbs such as %x and %q will be sent to the the\nstandard fmt package for formatting.  In addition, the custom formatter ignores\nthe width and precision arguments (however they will still work on the format\nspecifiers not handled by the custom formatter).\n\nTypically this function shouldn't be called directly.  It is much easier to make\nuse of the custom formatter by calling one of the convenience functions such as\nc.Printf, c.Println, or c.Printf.\n*/\nfunc (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {\n\treturn newFormatter(c, v)\n}\n\n// Fdump formats and displays the passed arguments to io.Writer w.  It formats\n// exactly the same as Dump.\nfunc (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {\n\tfdump(c, w, a...)\n}\n\n/*\nDump displays the passed parameters to standard out with newlines, customizable\nindentation, and additional debug information such as complete types and all\npointer addresses used to indirect to the final value.  It provides the\nfollowing features over the built-in printing facilities provided by the fmt\npackage:\n\n\t* Pointers are dereferenced and followed\n\t* Circular data structures are detected and handled properly\n\t* Custom Stringer/error interfaces are optionally invoked, including\n\t  on unexported types\n\t* Custom types which only implement the Stringer/error interfaces via\n\t  a pointer receiver are optionally invoked when passing non-pointer\n\t  variables\n\t* Byte arrays and slices are dumped like the hexdump -C command which\n\t  includes offsets, byte values in hex, and ASCII output\n\nThe configuration options are controlled by modifying the public members\nof c.  See ConfigState for options documentation.\n\nSee Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to\nget the formatted result as a string.\n*/\nfunc (c *ConfigState) Dump(a ...interface{}) {\n\tfdump(c, os.Stdout, a...)\n}\n\n// Sdump returns a string with the passed arguments formatted exactly the same\n// as Dump.\nfunc (c *ConfigState) Sdump(a ...interface{}) string {\n\tvar buf bytes.Buffer\n\tfdump(c, &buf, a...)\n\treturn buf.String()\n}\n\n// convertArgs accepts a slice of arguments and returns a slice of the same\n// length with each argument converted to a spew Formatter interface using\n// the ConfigState associated with s.\nfunc (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {\n\tformatters = make([]interface{}, len(args))\n\tfor index, arg := range args {\n\t\tformatters[index] = newFormatter(c, arg)\n\t}\n\treturn formatters\n}\n\n// NewDefaultConfig returns a ConfigState with the following default settings.\n//\n// \tIndent: \" \"\n// \tMaxDepth: 0\n// \tDisableMethods: false\n// \tDisablePointerMethods: false\n// \tContinueOnMethod: false\n// \tSortKeys: false\nfunc NewDefaultConfig() *ConfigState {\n\treturn &ConfigState{Indent: \" \"}\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/doc.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n/*\nPackage spew implements a deep pretty printer for Go data structures to aid in\ndebugging.\n\nA quick overview of the additional features spew provides over the built-in\nprinting facilities for Go data types are as follows:\n\n\t* Pointers are dereferenced and followed\n\t* Circular data structures are detected and handled properly\n\t* Custom Stringer/error interfaces are optionally invoked, including\n\t  on unexported types\n\t* Custom types which only implement the Stringer/error interfaces via\n\t  a pointer receiver are optionally invoked when passing non-pointer\n\t  variables\n\t* Byte arrays and slices are dumped like the hexdump -C command which\n\t  includes offsets, byte values in hex, and ASCII output (only when using\n\t  Dump style)\n\nThere are two different approaches spew allows for dumping Go data structures:\n\n\t* Dump style which prints with newlines, customizable indentation,\n\t  and additional debug information such as types and all pointer addresses\n\t  used to indirect to the final value\n\t* A custom Formatter interface that integrates cleanly with the standard fmt\n\t  package and replaces %v, %+v, %#v, and %#+v to provide inline printing\n\t  similar to the default %v while providing the additional functionality\n\t  outlined above and passing unsupported format verbs such as %x and %q\n\t  along to fmt\n\nQuick Start\n\nThis section demonstrates how to quickly get started with spew.  See the\nsections below for further details on formatting and configuration options.\n\nTo dump a variable with full newlines, indentation, type, and pointer\ninformation use Dump, Fdump, or Sdump:\n\tspew.Dump(myVar1, myVar2, ...)\n\tspew.Fdump(someWriter, myVar1, myVar2, ...)\n\tstr := spew.Sdump(myVar1, myVar2, ...)\n\nAlternatively, if you would prefer to use format strings with a compacted inline\nprinting style, use the convenience wrappers Printf, Fprintf, etc with\n%v (most compact), %+v (adds pointer addresses), %#v (adds types), or\n%#+v (adds types and pointer addresses):\n\tspew.Printf(\"myVar1: %v -- myVar2: %+v\", myVar1, myVar2)\n\tspew.Printf(\"myVar3: %#v -- myVar4: %#+v\", myVar3, myVar4)\n\tspew.Fprintf(someWriter, \"myVar1: %v -- myVar2: %+v\", myVar1, myVar2)\n\tspew.Fprintf(someWriter, \"myVar3: %#v -- myVar4: %#+v\", myVar3, myVar4)\n\nConfiguration Options\n\nConfiguration of spew is handled by fields in the ConfigState type.  For\nconvenience, all of the top-level functions use a global state available\nvia the spew.Config global.\n\nIt is also possible to create a ConfigState instance that provides methods\nequivalent to the top-level functions.  This allows concurrent configuration\noptions.  See the ConfigState documentation for more details.\n\nThe following configuration options are available:\n\t* Indent\n\t\tString to use for each indentation level for Dump functions.\n\t\tIt is a single space by default.  A popular alternative is \"\\t\".\n\n\t* MaxDepth\n\t\tMaximum number of levels to descend into nested data structures.\n\t\tThere is no limit by default.\n\n\t* DisableMethods\n\t\tDisables invocation of error and Stringer interface methods.\n\t\tMethod invocation is enabled by default.\n\n\t* DisablePointerMethods\n\t\tDisables invocation of error and Stringer interface methods on types\n\t\twhich only accept pointer receivers from non-pointer variables.\n\t\tPointer method invocation is enabled by default.\n\n\t* DisablePointerAddresses\n\t\tDisablePointerAddresses specifies whether to disable the printing of\n\t\tpointer addresses. This is useful when diffing data structures in tests.\n\n\t* DisableCapacities\n\t\tDisableCapacities specifies whether to disable the printing of\n\t\tcapacities for arrays, slices, maps and channels. This is useful when\n\t\tdiffing data structures in tests.\n\n\t* ContinueOnMethod\n\t\tEnables recursion into types after invoking error and Stringer interface\n\t\tmethods. Recursion after method invocation is disabled by default.\n\n\t* SortKeys\n\t\tSpecifies map keys should be sorted before being printed. Use\n\t\tthis to have a more deterministic, diffable output.  Note that\n\t\tonly native types (bool, int, uint, floats, uintptr and string)\n\t\tand types which implement error or Stringer interfaces are\n\t\tsupported with other types sorted according to the\n\t\treflect.Value.String() output which guarantees display\n\t\tstability.  Natural map order is used by default.\n\n\t* SpewKeys\n\t\tSpecifies that, as a last resort attempt, map keys should be\n\t\tspewed to strings and sorted by those strings.  This is only\n\t\tconsidered if SortKeys is true.\n\nDump Usage\n\nSimply call spew.Dump with a list of variables you want to dump:\n\n\tspew.Dump(myVar1, myVar2, ...)\n\nYou may also call spew.Fdump if you would prefer to output to an arbitrary\nio.Writer.  For example, to dump to standard error:\n\n\tspew.Fdump(os.Stderr, myVar1, myVar2, ...)\n\nA third option is to call spew.Sdump to get the formatted output as a string:\n\n\tstr := spew.Sdump(myVar1, myVar2, ...)\n\nSample Dump Output\n\nSee the Dump example for details on the setup of the types and variables being\nshown here.\n\n\t(main.Foo) {\n\t unexportedField: (*main.Bar)(0xf84002e210)({\n\t  flag: (main.Flag) flagTwo,\n\t  data: (uintptr) <nil>\n\t }),\n\t ExportedField: (map[interface {}]interface {}) (len=1) {\n\t  (string) (len=3) \"one\": (bool) true\n\t }\n\t}\n\nByte (and uint8) arrays and slices are displayed uniquely like the hexdump -C\ncommand as shown.\n\t([]uint8) (len=32 cap=32) {\n\t 00000000  11 12 13 14 15 16 17 18  19 1a 1b 1c 1d 1e 1f 20  |............... |\n\t 00000010  21 22 23 24 25 26 27 28  29 2a 2b 2c 2d 2e 2f 30  |!\"#$%&'()*+,-./0|\n\t 00000020  31 32                                             |12|\n\t}\n\nCustom Formatter\n\nSpew provides a custom formatter that implements the fmt.Formatter interface\nso that it integrates cleanly with standard fmt package printing functions. The\nformatter is useful for inline printing of smaller data types similar to the\nstandard %v format specifier.\n\nThe custom formatter only responds to the %v (most compact), %+v (adds pointer\naddresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb\ncombinations.  Any other verbs such as %x and %q will be sent to the the\nstandard fmt package for formatting.  In addition, the custom formatter ignores\nthe width and precision arguments (however they will still work on the format\nspecifiers not handled by the custom formatter).\n\nCustom Formatter Usage\n\nThe simplest way to make use of the spew custom formatter is to call one of the\nconvenience functions such as spew.Printf, spew.Println, or spew.Printf.  The\nfunctions have syntax you are most likely already familiar with:\n\n\tspew.Printf(\"myVar1: %v -- myVar2: %+v\", myVar1, myVar2)\n\tspew.Printf(\"myVar3: %#v -- myVar4: %#+v\", myVar3, myVar4)\n\tspew.Println(myVar, myVar2)\n\tspew.Fprintf(os.Stderr, \"myVar1: %v -- myVar2: %+v\", myVar1, myVar2)\n\tspew.Fprintf(os.Stderr, \"myVar3: %#v -- myVar4: %#+v\", myVar3, myVar4)\n\nSee the Index for the full list convenience functions.\n\nSample Formatter Output\n\nDouble pointer to a uint8:\n\t  %v: <**>5\n\t %+v: <**>(0xf8400420d0->0xf8400420c8)5\n\t %#v: (**uint8)5\n\t%#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5\n\nPointer to circular struct with a uint8 field and a pointer to itself:\n\t  %v: <*>{1 <*><shown>}\n\t %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}\n\t %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}\n\t%#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}\n\nSee the Printf example for details on the setup of variables being shown\nhere.\n\nErrors\n\nSince it is possible for custom Stringer/error interfaces to panic, spew\ndetects them and handles them internally by printing the panic information\ninline with the output.  Since spew is intended to provide deep pretty printing\ncapabilities on structures, it intentionally does not return any errors.\n*/\npackage spew\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/dump.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\npackage spew\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nvar (\n\t// uint8Type is a reflect.Type representing a uint8.  It is used to\n\t// convert cgo types to uint8 slices for hexdumping.\n\tuint8Type = reflect.TypeOf(uint8(0))\n\n\t// cCharRE is a regular expression that matches a cgo char.\n\t// It is used to detect character arrays to hexdump them.\n\tcCharRE = regexp.MustCompile(`^.*\\._Ctype_char$`)\n\n\t// cUnsignedCharRE is a regular expression that matches a cgo unsigned\n\t// char.  It is used to detect unsigned character arrays to hexdump\n\t// them.\n\tcUnsignedCharRE = regexp.MustCompile(`^.*\\._Ctype_unsignedchar$`)\n\n\t// cUint8tCharRE is a regular expression that matches a cgo uint8_t.\n\t// It is used to detect uint8_t arrays to hexdump them.\n\tcUint8tCharRE = regexp.MustCompile(`^.*\\._Ctype_uint8_t$`)\n)\n\n// dumpState contains information about the state of a dump operation.\ntype dumpState struct {\n\tw                io.Writer\n\tdepth            int\n\tpointers         map[uintptr]int\n\tignoreNextType   bool\n\tignoreNextIndent bool\n\tcs               *ConfigState\n}\n\n// indent performs indentation according to the depth level and cs.Indent\n// option.\nfunc (d *dumpState) indent() {\n\tif d.ignoreNextIndent {\n\t\td.ignoreNextIndent = false\n\t\treturn\n\t}\n\td.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth))\n}\n\n// unpackValue returns values inside of non-nil interfaces when possible.\n// This is useful for data types like structs, arrays, slices, and maps which\n// can contain varying types packed inside an interface.\nfunc (d *dumpState) unpackValue(v reflect.Value) reflect.Value {\n\tif v.Kind() == reflect.Interface && !v.IsNil() {\n\t\tv = v.Elem()\n\t}\n\treturn v\n}\n\n// dumpPtr handles formatting of pointers by indirecting them as necessary.\nfunc (d *dumpState) dumpPtr(v reflect.Value) {\n\t// Remove pointers at or below the current depth from map used to detect\n\t// circular refs.\n\tfor k, depth := range d.pointers {\n\t\tif depth >= d.depth {\n\t\t\tdelete(d.pointers, k)\n\t\t}\n\t}\n\n\t// Keep list of all dereferenced pointers to show later.\n\tpointerChain := make([]uintptr, 0)\n\n\t// Figure out how many levels of indirection there are by dereferencing\n\t// pointers and unpacking interfaces down the chain while detecting circular\n\t// references.\n\tnilFound := false\n\tcycleFound := false\n\tindirects := 0\n\tve := v\n\tfor ve.Kind() == reflect.Ptr {\n\t\tif ve.IsNil() {\n\t\t\tnilFound = true\n\t\t\tbreak\n\t\t}\n\t\tindirects++\n\t\taddr := ve.Pointer()\n\t\tpointerChain = append(pointerChain, addr)\n\t\tif pd, ok := d.pointers[addr]; ok && pd < d.depth {\n\t\t\tcycleFound = true\n\t\t\tindirects--\n\t\t\tbreak\n\t\t}\n\t\td.pointers[addr] = d.depth\n\n\t\tve = ve.Elem()\n\t\tif ve.Kind() == reflect.Interface {\n\t\t\tif ve.IsNil() {\n\t\t\t\tnilFound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tve = ve.Elem()\n\t\t}\n\t}\n\n\t// Display type information.\n\td.w.Write(openParenBytes)\n\td.w.Write(bytes.Repeat(asteriskBytes, indirects))\n\td.w.Write([]byte(ve.Type().String()))\n\td.w.Write(closeParenBytes)\n\n\t// Display pointer information.\n\tif !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {\n\t\td.w.Write(openParenBytes)\n\t\tfor i, addr := range pointerChain {\n\t\t\tif i > 0 {\n\t\t\t\td.w.Write(pointerChainBytes)\n\t\t\t}\n\t\t\tprintHexPtr(d.w, addr)\n\t\t}\n\t\td.w.Write(closeParenBytes)\n\t}\n\n\t// Display dereferenced value.\n\td.w.Write(openParenBytes)\n\tswitch {\n\tcase nilFound:\n\t\td.w.Write(nilAngleBytes)\n\n\tcase cycleFound:\n\t\td.w.Write(circularBytes)\n\n\tdefault:\n\t\td.ignoreNextType = true\n\t\td.dump(ve)\n\t}\n\td.w.Write(closeParenBytes)\n}\n\n// dumpSlice handles formatting of arrays and slices.  Byte (uint8 under\n// reflection) arrays and slices are dumped in hexdump -C fashion.\nfunc (d *dumpState) dumpSlice(v reflect.Value) {\n\t// Determine whether this type should be hex dumped or not.  Also,\n\t// for types which should be hexdumped, try to use the underlying data\n\t// first, then fall back to trying to convert them to a uint8 slice.\n\tvar buf []uint8\n\tdoConvert := false\n\tdoHexDump := false\n\tnumEntries := v.Len()\n\tif numEntries > 0 {\n\t\tvt := v.Index(0).Type()\n\t\tvts := vt.String()\n\t\tswitch {\n\t\t// C types that need to be converted.\n\t\tcase cCharRE.MatchString(vts):\n\t\t\tfallthrough\n\t\tcase cUnsignedCharRE.MatchString(vts):\n\t\t\tfallthrough\n\t\tcase cUint8tCharRE.MatchString(vts):\n\t\t\tdoConvert = true\n\n\t\t// Try to use existing uint8 slices and fall back to converting\n\t\t// and copying if that fails.\n\t\tcase vt.Kind() == reflect.Uint8:\n\t\t\t// We need an addressable interface to convert the type\n\t\t\t// to a byte slice.  However, the reflect package won't\n\t\t\t// give us an interface on certain things like\n\t\t\t// unexported struct fields in order to enforce\n\t\t\t// visibility rules.  We use unsafe, when available, to\n\t\t\t// bypass these restrictions since this package does not\n\t\t\t// mutate the values.\n\t\t\tvs := v\n\t\t\tif !vs.CanInterface() || !vs.CanAddr() {\n\t\t\t\tvs = unsafeReflectValue(vs)\n\t\t\t}\n\t\t\tif !UnsafeDisabled {\n\t\t\t\tvs = vs.Slice(0, numEntries)\n\n\t\t\t\t// Use the existing uint8 slice if it can be\n\t\t\t\t// type asserted.\n\t\t\t\tiface := vs.Interface()\n\t\t\t\tif slice, ok := iface.([]uint8); ok {\n\t\t\t\t\tbuf = slice\n\t\t\t\t\tdoHexDump = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// The underlying data needs to be converted if it can't\n\t\t\t// be type asserted to a uint8 slice.\n\t\t\tdoConvert = true\n\t\t}\n\n\t\t// Copy and convert the underlying type if needed.\n\t\tif doConvert && vt.ConvertibleTo(uint8Type) {\n\t\t\t// Convert and copy each element into a uint8 byte\n\t\t\t// slice.\n\t\t\tbuf = make([]uint8, numEntries)\n\t\t\tfor i := 0; i < numEntries; i++ {\n\t\t\t\tvv := v.Index(i)\n\t\t\t\tbuf[i] = uint8(vv.Convert(uint8Type).Uint())\n\t\t\t}\n\t\t\tdoHexDump = true\n\t\t}\n\t}\n\n\t// Hexdump the entire slice as needed.\n\tif doHexDump {\n\t\tindent := strings.Repeat(d.cs.Indent, d.depth)\n\t\tstr := indent + hex.Dump(buf)\n\t\tstr = strings.Replace(str, \"\\n\", \"\\n\"+indent, -1)\n\t\tstr = strings.TrimRight(str, d.cs.Indent)\n\t\td.w.Write([]byte(str))\n\t\treturn\n\t}\n\n\t// Recursively call dump for each item.\n\tfor i := 0; i < numEntries; i++ {\n\t\td.dump(d.unpackValue(v.Index(i)))\n\t\tif i < (numEntries - 1) {\n\t\t\td.w.Write(commaNewlineBytes)\n\t\t} else {\n\t\t\td.w.Write(newlineBytes)\n\t\t}\n\t}\n}\n\n// dump is the main workhorse for dumping a value.  It uses the passed reflect\n// value to figure out what kind of object we are dealing with and formats it\n// appropriately.  It is a recursive function, however circular data structures\n// are detected and handled properly.\nfunc (d *dumpState) dump(v reflect.Value) {\n\t// Handle invalid reflect values immediately.\n\tkind := v.Kind()\n\tif kind == reflect.Invalid {\n\t\td.w.Write(invalidAngleBytes)\n\t\treturn\n\t}\n\n\t// Handle pointers specially.\n\tif kind == reflect.Ptr {\n\t\td.indent()\n\t\td.dumpPtr(v)\n\t\treturn\n\t}\n\n\t// Print type information unless already handled elsewhere.\n\tif !d.ignoreNextType {\n\t\td.indent()\n\t\td.w.Write(openParenBytes)\n\t\td.w.Write([]byte(v.Type().String()))\n\t\td.w.Write(closeParenBytes)\n\t\td.w.Write(spaceBytes)\n\t}\n\td.ignoreNextType = false\n\n\t// Display length and capacity if the built-in len and cap functions\n\t// work with the value's kind and the len/cap itself is non-zero.\n\tvalueLen, valueCap := 0, 0\n\tswitch v.Kind() {\n\tcase reflect.Array, reflect.Slice, reflect.Chan:\n\t\tvalueLen, valueCap = v.Len(), v.Cap()\n\tcase reflect.Map, reflect.String:\n\t\tvalueLen = v.Len()\n\t}\n\tif valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {\n\t\td.w.Write(openParenBytes)\n\t\tif valueLen != 0 {\n\t\t\td.w.Write(lenEqualsBytes)\n\t\t\tprintInt(d.w, int64(valueLen), 10)\n\t\t}\n\t\tif !d.cs.DisableCapacities && valueCap != 0 {\n\t\t\tif valueLen != 0 {\n\t\t\t\td.w.Write(spaceBytes)\n\t\t\t}\n\t\t\td.w.Write(capEqualsBytes)\n\t\t\tprintInt(d.w, int64(valueCap), 10)\n\t\t}\n\t\td.w.Write(closeParenBytes)\n\t\td.w.Write(spaceBytes)\n\t}\n\n\t// Call Stringer/error interfaces if they exist and the handle methods flag\n\t// is enabled\n\tif !d.cs.DisableMethods {\n\t\tif (kind != reflect.Invalid) && (kind != reflect.Interface) {\n\t\t\tif handled := handleMethods(d.cs, d.w, v); handled {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch kind {\n\tcase reflect.Invalid:\n\t\t// Do nothing.  We should never get here since invalid has already\n\t\t// been handled above.\n\n\tcase reflect.Bool:\n\t\tprintBool(d.w, v.Bool())\n\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:\n\t\tprintInt(d.w, v.Int(), 10)\n\n\tcase reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:\n\t\tprintUint(d.w, v.Uint(), 10)\n\n\tcase reflect.Float32:\n\t\tprintFloat(d.w, v.Float(), 32)\n\n\tcase reflect.Float64:\n\t\tprintFloat(d.w, v.Float(), 64)\n\n\tcase reflect.Complex64:\n\t\tprintComplex(d.w, v.Complex(), 32)\n\n\tcase reflect.Complex128:\n\t\tprintComplex(d.w, v.Complex(), 64)\n\n\tcase reflect.Slice:\n\t\tif v.IsNil() {\n\t\t\td.w.Write(nilAngleBytes)\n\t\t\tbreak\n\t\t}\n\t\tfallthrough\n\n\tcase reflect.Array:\n\t\td.w.Write(openBraceNewlineBytes)\n\t\td.depth++\n\t\tif (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {\n\t\t\td.indent()\n\t\t\td.w.Write(maxNewlineBytes)\n\t\t} else {\n\t\t\td.dumpSlice(v)\n\t\t}\n\t\td.depth--\n\t\td.indent()\n\t\td.w.Write(closeBraceBytes)\n\n\tcase reflect.String:\n\t\td.w.Write([]byte(strconv.Quote(v.String())))\n\n\tcase reflect.Interface:\n\t\t// The only time we should get here is for nil interfaces due to\n\t\t// unpackValue calls.\n\t\tif v.IsNil() {\n\t\t\td.w.Write(nilAngleBytes)\n\t\t}\n\n\tcase reflect.Ptr:\n\t\t// Do nothing.  We should never get here since pointers have already\n\t\t// been handled above.\n\n\tcase reflect.Map:\n\t\t// nil maps should be indicated as different than empty maps\n\t\tif v.IsNil() {\n\t\t\td.w.Write(nilAngleBytes)\n\t\t\tbreak\n\t\t}\n\n\t\td.w.Write(openBraceNewlineBytes)\n\t\td.depth++\n\t\tif (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {\n\t\t\td.indent()\n\t\t\td.w.Write(maxNewlineBytes)\n\t\t} else {\n\t\t\tnumEntries := v.Len()\n\t\t\tkeys := v.MapKeys()\n\t\t\tif d.cs.SortKeys {\n\t\t\t\tsortValues(keys, d.cs)\n\t\t\t}\n\t\t\tfor i, key := range keys {\n\t\t\t\td.dump(d.unpackValue(key))\n\t\t\t\td.w.Write(colonSpaceBytes)\n\t\t\t\td.ignoreNextIndent = true\n\t\t\t\td.dump(d.unpackValue(v.MapIndex(key)))\n\t\t\t\tif i < (numEntries - 1) {\n\t\t\t\t\td.w.Write(commaNewlineBytes)\n\t\t\t\t} else {\n\t\t\t\t\td.w.Write(newlineBytes)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\td.depth--\n\t\td.indent()\n\t\td.w.Write(closeBraceBytes)\n\n\tcase reflect.Struct:\n\t\td.w.Write(openBraceNewlineBytes)\n\t\td.depth++\n\t\tif (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {\n\t\t\td.indent()\n\t\t\td.w.Write(maxNewlineBytes)\n\t\t} else {\n\t\t\tvt := v.Type()\n\t\t\tnumFields := v.NumField()\n\t\t\tfor i := 0; i < numFields; i++ {\n\t\t\t\td.indent()\n\t\t\t\tvtf := vt.Field(i)\n\t\t\t\td.w.Write([]byte(vtf.Name))\n\t\t\t\td.w.Write(colonSpaceBytes)\n\t\t\t\td.ignoreNextIndent = true\n\t\t\t\td.dump(d.unpackValue(v.Field(i)))\n\t\t\t\tif i < (numFields - 1) {\n\t\t\t\t\td.w.Write(commaNewlineBytes)\n\t\t\t\t} else {\n\t\t\t\t\td.w.Write(newlineBytes)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\td.depth--\n\t\td.indent()\n\t\td.w.Write(closeBraceBytes)\n\n\tcase reflect.Uintptr:\n\t\tprintHexPtr(d.w, uintptr(v.Uint()))\n\n\tcase reflect.UnsafePointer, reflect.Chan, reflect.Func:\n\t\tprintHexPtr(d.w, v.Pointer())\n\n\t// There were not any other types at the time this code was written, but\n\t// fall back to letting the default fmt package handle it in case any new\n\t// types are added.\n\tdefault:\n\t\tif v.CanInterface() {\n\t\t\tfmt.Fprintf(d.w, \"%v\", v.Interface())\n\t\t} else {\n\t\t\tfmt.Fprintf(d.w, \"%v\", v.String())\n\t\t}\n\t}\n}\n\n// fdump is a helper function to consolidate the logic from the various public\n// methods which take varying writers and config states.\nfunc fdump(cs *ConfigState, w io.Writer, a ...interface{}) {\n\tfor _, arg := range a {\n\t\tif arg == nil {\n\t\t\tw.Write(interfaceBytes)\n\t\t\tw.Write(spaceBytes)\n\t\t\tw.Write(nilAngleBytes)\n\t\t\tw.Write(newlineBytes)\n\t\t\tcontinue\n\t\t}\n\n\t\td := dumpState{w: w, cs: cs}\n\t\td.pointers = make(map[uintptr]int)\n\t\td.dump(reflect.ValueOf(arg))\n\t\td.w.Write(newlineBytes)\n\t}\n}\n\n// Fdump formats and displays the passed arguments to io.Writer w.  It formats\n// exactly the same as Dump.\nfunc Fdump(w io.Writer, a ...interface{}) {\n\tfdump(&Config, w, a...)\n}\n\n// Sdump returns a string with the passed arguments formatted exactly the same\n// as Dump.\nfunc Sdump(a ...interface{}) string {\n\tvar buf bytes.Buffer\n\tfdump(&Config, &buf, a...)\n\treturn buf.String()\n}\n\n/*\nDump displays the passed parameters to standard out with newlines, customizable\nindentation, and additional debug information such as complete types and all\npointer addresses used to indirect to the final value.  It provides the\nfollowing features over the built-in printing facilities provided by the fmt\npackage:\n\n\t* Pointers are dereferenced and followed\n\t* Circular data structures are detected and handled properly\n\t* Custom Stringer/error interfaces are optionally invoked, including\n\t  on unexported types\n\t* Custom types which only implement the Stringer/error interfaces via\n\t  a pointer receiver are optionally invoked when passing non-pointer\n\t  variables\n\t* Byte arrays and slices are dumped like the hexdump -C command which\n\t  includes offsets, byte values in hex, and ASCII output\n\nThe configuration options are controlled by an exported package global,\nspew.Config.  See ConfigState for options documentation.\n\nSee Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to\nget the formatted result as a string.\n*/\nfunc Dump(a ...interface{}) {\n\tfdump(&Config, os.Stdout, a...)\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/format.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\npackage spew\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// supportedFlags is a list of all the character flags supported by fmt package.\nconst supportedFlags = \"0-+# \"\n\n// formatState implements the fmt.Formatter interface and contains information\n// about the state of a formatting operation.  The NewFormatter function can\n// be used to get a new Formatter which can be used directly as arguments\n// in standard fmt package printing calls.\ntype formatState struct {\n\tvalue          interface{}\n\tfs             fmt.State\n\tdepth          int\n\tpointers       map[uintptr]int\n\tignoreNextType bool\n\tcs             *ConfigState\n}\n\n// buildDefaultFormat recreates the original format string without precision\n// and width information to pass in to fmt.Sprintf in the case of an\n// unrecognized type.  Unless new types are added to the language, this\n// function won't ever be called.\nfunc (f *formatState) buildDefaultFormat() (format string) {\n\tbuf := bytes.NewBuffer(percentBytes)\n\n\tfor _, flag := range supportedFlags {\n\t\tif f.fs.Flag(int(flag)) {\n\t\t\tbuf.WriteRune(flag)\n\t\t}\n\t}\n\n\tbuf.WriteRune('v')\n\n\tformat = buf.String()\n\treturn format\n}\n\n// constructOrigFormat recreates the original format string including precision\n// and width information to pass along to the standard fmt package.  This allows\n// automatic deferral of all format strings this package doesn't support.\nfunc (f *formatState) constructOrigFormat(verb rune) (format string) {\n\tbuf := bytes.NewBuffer(percentBytes)\n\n\tfor _, flag := range supportedFlags {\n\t\tif f.fs.Flag(int(flag)) {\n\t\t\tbuf.WriteRune(flag)\n\t\t}\n\t}\n\n\tif width, ok := f.fs.Width(); ok {\n\t\tbuf.WriteString(strconv.Itoa(width))\n\t}\n\n\tif precision, ok := f.fs.Precision(); ok {\n\t\tbuf.Write(precisionBytes)\n\t\tbuf.WriteString(strconv.Itoa(precision))\n\t}\n\n\tbuf.WriteRune(verb)\n\n\tformat = buf.String()\n\treturn format\n}\n\n// unpackValue returns values inside of non-nil interfaces when possible and\n// ensures that types for values which have been unpacked from an interface\n// are displayed when the show types flag is also set.\n// This is useful for data types like structs, arrays, slices, and maps which\n// can contain varying types packed inside an interface.\nfunc (f *formatState) unpackValue(v reflect.Value) reflect.Value {\n\tif v.Kind() == reflect.Interface {\n\t\tf.ignoreNextType = false\n\t\tif !v.IsNil() {\n\t\t\tv = v.Elem()\n\t\t}\n\t}\n\treturn v\n}\n\n// formatPtr handles formatting of pointers by indirecting them as necessary.\nfunc (f *formatState) formatPtr(v reflect.Value) {\n\t// Display nil if top level pointer is nil.\n\tshowTypes := f.fs.Flag('#')\n\tif v.IsNil() && (!showTypes || f.ignoreNextType) {\n\t\tf.fs.Write(nilAngleBytes)\n\t\treturn\n\t}\n\n\t// Remove pointers at or below the current depth from map used to detect\n\t// circular refs.\n\tfor k, depth := range f.pointers {\n\t\tif depth >= f.depth {\n\t\t\tdelete(f.pointers, k)\n\t\t}\n\t}\n\n\t// Keep list of all dereferenced pointers to possibly show later.\n\tpointerChain := make([]uintptr, 0)\n\n\t// Figure out how many levels of indirection there are by derferencing\n\t// pointers and unpacking interfaces down the chain while detecting circular\n\t// references.\n\tnilFound := false\n\tcycleFound := false\n\tindirects := 0\n\tve := v\n\tfor ve.Kind() == reflect.Ptr {\n\t\tif ve.IsNil() {\n\t\t\tnilFound = true\n\t\t\tbreak\n\t\t}\n\t\tindirects++\n\t\taddr := ve.Pointer()\n\t\tpointerChain = append(pointerChain, addr)\n\t\tif pd, ok := f.pointers[addr]; ok && pd < f.depth {\n\t\t\tcycleFound = true\n\t\t\tindirects--\n\t\t\tbreak\n\t\t}\n\t\tf.pointers[addr] = f.depth\n\n\t\tve = ve.Elem()\n\t\tif ve.Kind() == reflect.Interface {\n\t\t\tif ve.IsNil() {\n\t\t\t\tnilFound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tve = ve.Elem()\n\t\t}\n\t}\n\n\t// Display type or indirection level depending on flags.\n\tif showTypes && !f.ignoreNextType {\n\t\tf.fs.Write(openParenBytes)\n\t\tf.fs.Write(bytes.Repeat(asteriskBytes, indirects))\n\t\tf.fs.Write([]byte(ve.Type().String()))\n\t\tf.fs.Write(closeParenBytes)\n\t} else {\n\t\tif nilFound || cycleFound {\n\t\t\tindirects += strings.Count(ve.Type().String(), \"*\")\n\t\t}\n\t\tf.fs.Write(openAngleBytes)\n\t\tf.fs.Write([]byte(strings.Repeat(\"*\", indirects)))\n\t\tf.fs.Write(closeAngleBytes)\n\t}\n\n\t// Display pointer information depending on flags.\n\tif f.fs.Flag('+') && (len(pointerChain) > 0) {\n\t\tf.fs.Write(openParenBytes)\n\t\tfor i, addr := range pointerChain {\n\t\t\tif i > 0 {\n\t\t\t\tf.fs.Write(pointerChainBytes)\n\t\t\t}\n\t\t\tprintHexPtr(f.fs, addr)\n\t\t}\n\t\tf.fs.Write(closeParenBytes)\n\t}\n\n\t// Display dereferenced value.\n\tswitch {\n\tcase nilFound:\n\t\tf.fs.Write(nilAngleBytes)\n\n\tcase cycleFound:\n\t\tf.fs.Write(circularShortBytes)\n\n\tdefault:\n\t\tf.ignoreNextType = true\n\t\tf.format(ve)\n\t}\n}\n\n// format is the main workhorse for providing the Formatter interface.  It\n// uses the passed reflect value to figure out what kind of object we are\n// dealing with and formats it appropriately.  It is a recursive function,\n// however circular data structures are detected and handled properly.\nfunc (f *formatState) format(v reflect.Value) {\n\t// Handle invalid reflect values immediately.\n\tkind := v.Kind()\n\tif kind == reflect.Invalid {\n\t\tf.fs.Write(invalidAngleBytes)\n\t\treturn\n\t}\n\n\t// Handle pointers specially.\n\tif kind == reflect.Ptr {\n\t\tf.formatPtr(v)\n\t\treturn\n\t}\n\n\t// Print type information unless already handled elsewhere.\n\tif !f.ignoreNextType && f.fs.Flag('#') {\n\t\tf.fs.Write(openParenBytes)\n\t\tf.fs.Write([]byte(v.Type().String()))\n\t\tf.fs.Write(closeParenBytes)\n\t}\n\tf.ignoreNextType = false\n\n\t// Call Stringer/error interfaces if they exist and the handle methods\n\t// flag is enabled.\n\tif !f.cs.DisableMethods {\n\t\tif (kind != reflect.Invalid) && (kind != reflect.Interface) {\n\t\t\tif handled := handleMethods(f.cs, f.fs, v); handled {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch kind {\n\tcase reflect.Invalid:\n\t\t// Do nothing.  We should never get here since invalid has already\n\t\t// been handled above.\n\n\tcase reflect.Bool:\n\t\tprintBool(f.fs, v.Bool())\n\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:\n\t\tprintInt(f.fs, v.Int(), 10)\n\n\tcase reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:\n\t\tprintUint(f.fs, v.Uint(), 10)\n\n\tcase reflect.Float32:\n\t\tprintFloat(f.fs, v.Float(), 32)\n\n\tcase reflect.Float64:\n\t\tprintFloat(f.fs, v.Float(), 64)\n\n\tcase reflect.Complex64:\n\t\tprintComplex(f.fs, v.Complex(), 32)\n\n\tcase reflect.Complex128:\n\t\tprintComplex(f.fs, v.Complex(), 64)\n\n\tcase reflect.Slice:\n\t\tif v.IsNil() {\n\t\t\tf.fs.Write(nilAngleBytes)\n\t\t\tbreak\n\t\t}\n\t\tfallthrough\n\n\tcase reflect.Array:\n\t\tf.fs.Write(openBracketBytes)\n\t\tf.depth++\n\t\tif (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {\n\t\t\tf.fs.Write(maxShortBytes)\n\t\t} else {\n\t\t\tnumEntries := v.Len()\n\t\t\tfor i := 0; i < numEntries; i++ {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tf.fs.Write(spaceBytes)\n\t\t\t\t}\n\t\t\t\tf.ignoreNextType = true\n\t\t\t\tf.format(f.unpackValue(v.Index(i)))\n\t\t\t}\n\t\t}\n\t\tf.depth--\n\t\tf.fs.Write(closeBracketBytes)\n\n\tcase reflect.String:\n\t\tf.fs.Write([]byte(v.String()))\n\n\tcase reflect.Interface:\n\t\t// The only time we should get here is for nil interfaces due to\n\t\t// unpackValue calls.\n\t\tif v.IsNil() {\n\t\t\tf.fs.Write(nilAngleBytes)\n\t\t}\n\n\tcase reflect.Ptr:\n\t\t// Do nothing.  We should never get here since pointers have already\n\t\t// been handled above.\n\n\tcase reflect.Map:\n\t\t// nil maps should be indicated as different than empty maps\n\t\tif v.IsNil() {\n\t\t\tf.fs.Write(nilAngleBytes)\n\t\t\tbreak\n\t\t}\n\n\t\tf.fs.Write(openMapBytes)\n\t\tf.depth++\n\t\tif (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {\n\t\t\tf.fs.Write(maxShortBytes)\n\t\t} else {\n\t\t\tkeys := v.MapKeys()\n\t\t\tif f.cs.SortKeys {\n\t\t\t\tsortValues(keys, f.cs)\n\t\t\t}\n\t\t\tfor i, key := range keys {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tf.fs.Write(spaceBytes)\n\t\t\t\t}\n\t\t\t\tf.ignoreNextType = true\n\t\t\t\tf.format(f.unpackValue(key))\n\t\t\t\tf.fs.Write(colonBytes)\n\t\t\t\tf.ignoreNextType = true\n\t\t\t\tf.format(f.unpackValue(v.MapIndex(key)))\n\t\t\t}\n\t\t}\n\t\tf.depth--\n\t\tf.fs.Write(closeMapBytes)\n\n\tcase reflect.Struct:\n\t\tnumFields := v.NumField()\n\t\tf.fs.Write(openBraceBytes)\n\t\tf.depth++\n\t\tif (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {\n\t\t\tf.fs.Write(maxShortBytes)\n\t\t} else {\n\t\t\tvt := v.Type()\n\t\t\tfor i := 0; i < numFields; i++ {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tf.fs.Write(spaceBytes)\n\t\t\t\t}\n\t\t\t\tvtf := vt.Field(i)\n\t\t\t\tif f.fs.Flag('+') || f.fs.Flag('#') {\n\t\t\t\t\tf.fs.Write([]byte(vtf.Name))\n\t\t\t\t\tf.fs.Write(colonBytes)\n\t\t\t\t}\n\t\t\t\tf.format(f.unpackValue(v.Field(i)))\n\t\t\t}\n\t\t}\n\t\tf.depth--\n\t\tf.fs.Write(closeBraceBytes)\n\n\tcase reflect.Uintptr:\n\t\tprintHexPtr(f.fs, uintptr(v.Uint()))\n\n\tcase reflect.UnsafePointer, reflect.Chan, reflect.Func:\n\t\tprintHexPtr(f.fs, v.Pointer())\n\n\t// There were not any other types at the time this code was written, but\n\t// fall back to letting the default fmt package handle it if any get added.\n\tdefault:\n\t\tformat := f.buildDefaultFormat()\n\t\tif v.CanInterface() {\n\t\t\tfmt.Fprintf(f.fs, format, v.Interface())\n\t\t} else {\n\t\t\tfmt.Fprintf(f.fs, format, v.String())\n\t\t}\n\t}\n}\n\n// Format satisfies the fmt.Formatter interface. See NewFormatter for usage\n// details.\nfunc (f *formatState) Format(fs fmt.State, verb rune) {\n\tf.fs = fs\n\n\t// Use standard formatting for verbs that are not v.\n\tif verb != 'v' {\n\t\tformat := f.constructOrigFormat(verb)\n\t\tfmt.Fprintf(fs, format, f.value)\n\t\treturn\n\t}\n\n\tif f.value == nil {\n\t\tif fs.Flag('#') {\n\t\t\tfs.Write(interfaceBytes)\n\t\t}\n\t\tfs.Write(nilAngleBytes)\n\t\treturn\n\t}\n\n\tf.format(reflect.ValueOf(f.value))\n}\n\n// newFormatter is a helper function to consolidate the logic from the various\n// public methods which take varying config states.\nfunc newFormatter(cs *ConfigState, v interface{}) fmt.Formatter {\n\tfs := &formatState{value: v, cs: cs}\n\tfs.pointers = make(map[uintptr]int)\n\treturn fs\n}\n\n/*\nNewFormatter returns a custom formatter that satisfies the fmt.Formatter\ninterface.  As a result, it integrates cleanly with standard fmt package\nprinting functions.  The formatter is useful for inline printing of smaller data\ntypes similar to the standard %v format specifier.\n\nThe custom formatter only responds to the %v (most compact), %+v (adds pointer\naddresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb\ncombinations.  Any other verbs such as %x and %q will be sent to the the\nstandard fmt package for formatting.  In addition, the custom formatter ignores\nthe width and precision arguments (however they will still work on the format\nspecifiers not handled by the custom formatter).\n\nTypically this function shouldn't be called directly.  It is much easier to make\nuse of the custom formatter by calling one of the convenience functions such as\nPrintf, Println, or Fprintf.\n*/\nfunc NewFormatter(v interface{}) fmt.Formatter {\n\treturn newFormatter(&Config, v)\n}\n"
  },
  {
    "path": "vendor/github.com/davecgh/go-spew/spew/spew.go",
    "content": "/*\n * Copyright (c) 2013-2016 Dave Collins <dave@davec.name>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\npackage spew\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the formatted string as a value that satisfies error.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Errorf(format string, a ...interface{}) (err error) {\n\treturn fmt.Errorf(format, convertArgs(a)...)\n}\n\n// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Fprint(w io.Writer, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprint(w, convertArgs(a)...)\n}\n\n// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintf(w, format, convertArgs(a)...)\n}\n\n// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it\n// passed with a default Formatter interface returned by NewFormatter.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Fprintln(w io.Writer, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintln(w, convertArgs(a)...)\n}\n\n// Print is a wrapper for fmt.Print that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Print(spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Print(a ...interface{}) (n int, err error) {\n\treturn fmt.Print(convertArgs(a)...)\n}\n\n// Printf is a wrapper for fmt.Printf that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Printf(format string, a ...interface{}) (n int, err error) {\n\treturn fmt.Printf(format, convertArgs(a)...)\n}\n\n// Println is a wrapper for fmt.Println that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the number of bytes written and any write error encountered.  See\n// NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Println(spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Println(a ...interface{}) (n int, err error) {\n\treturn fmt.Println(convertArgs(a)...)\n}\n\n// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Sprint(a ...interface{}) string {\n\treturn fmt.Sprint(convertArgs(a)...)\n}\n\n// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were\n// passed with a default Formatter interface returned by NewFormatter.  It\n// returns the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Sprintf(format string, a ...interface{}) string {\n\treturn fmt.Sprintf(format, convertArgs(a)...)\n}\n\n// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it\n// were passed with a default Formatter interface returned by NewFormatter.  It\n// returns the resulting string.  See NewFormatter for formatting details.\n//\n// This function is shorthand for the following syntax:\n//\n//\tfmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b))\nfunc Sprintln(a ...interface{}) string {\n\treturn fmt.Sprintln(convertArgs(a)...)\n}\n\n// convertArgs accepts a slice of arguments and returns a slice of the same\n// length with each argument converted to a default spew Formatter interface.\nfunc convertArgs(args []interface{}) (formatters []interface{}) {\n\tformatters = make([]interface{}, len(args))\n\tfor index, arg := range args {\n\t\tformatters[index] = NewFormatter(arg)\n\t}\n\treturn formatters\n}\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/.gitattributes",
    "content": "*.go text eol=lf\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/.gitignore",
    "content": "# Cover profiles\n*.out\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/.golangci.yml",
    "content": "linters:\n  enable:\n    - bodyclose\n    - dupword # Checks for duplicate words in the source code\n    - gofmt\n    - goimports\n    - ineffassign\n    - misspell\n    - revive\n    - staticcheck\n    - unconvert\n    - unused\n    - vet\n  disable:\n    - errcheck\n\nrun:\n  deadline: 2m\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md",
    "content": "# Code of Conduct\n\nWe follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).\n\nPlease contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct.\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/CONTRIBUTING.md",
    "content": "# Contributing to the reference library\n\n## Community help\n\nIf you need help, please ask in the [#distribution](https://cloud-native.slack.com/archives/C01GVR8SY4R) channel on CNCF community slack.\n[Click here for an invite to the CNCF community slack](https://slack.cncf.io/)\n\n## Reporting security issues\n\nThe maintainers take security seriously. If you discover a security\nissue, please bring it to their attention right away!\n\nPlease **DO NOT** file a public issue, instead send your report privately to\n[cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io).\n\n## Reporting an issue properly\n\nBy following these simple rules you will get better and faster feedback on your issue.\n\n - search the bugtracker for an already reported issue\n\n### If you found an issue that describes your problem:\n\n - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments\n - please refrain from adding \"same thing here\" or \"+1\" comments\n - you don't need to comment on an issue to get notified of updates: just hit the \"subscribe\" button\n - comment if you have some new, technical and relevant information to add to the case\n - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue.\n\n### If you have not found an existing issue that describes your problem:\n\n 1. create a new issue, with a succinct title that describes your issue:\n   - bad title: \"It doesn't work with my docker\"\n   - good title: \"Private registry push fail: 400 error with E_INVALID_DIGEST\"\n 2. copy the output of (or similar for other container tools):\n   - `docker version`\n   - `docker info`\n   - `docker exec <registry-container> registry --version`\n 3. copy the command line you used to launch your Registry\n 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments)\n 5. reproduce your problem and get your docker daemon logs showing the error\n 6. if relevant, copy your registry logs that show the error\n 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used)\n 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry\n\n## Contributing Code\n\nContributions should be made via pull requests. Pull requests will be reviewed\nby one or more maintainers or reviewers and merged when acceptable.\n\nYou should follow the basic GitHub workflow:\n\n 1. Use your own [fork](https://help.github.com/en/articles/about-forks)\n 2. Create your [change](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes)\n 3. Test your code\n 4. [Commit](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages) your work, always [sign your commits](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages)\n 5. Push your change to your fork and create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)\n\nRefer to [containerd's contribution guide](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes)\nfor tips on creating a successful contribution.\n\n## Sign your work\n\nThe sign-off is a simple line at the end of the explanation for the patch. Your\nsignature certifies that you wrote the patch or otherwise have the right to pass\nit on as an open-source patch. The rules are pretty simple: if you can certify\nthe below (from [developercertificate.org](http://developercertificate.org/)):\n\n```\nDeveloper Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n660 York Street, Suite 102,\nSan Francisco, CA 94110 USA\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n    have the right to submit it under the open source license\n    indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n    of my knowledge, is covered under an appropriate open source\n    license and I have the right under that license to submit that\n    work with modifications, whether created in whole or in part\n    by me, under the same open source license (unless I am\n    permitted to submit under a different license), as indicated\n    in the file; or\n\n(c) The contribution was provided directly to me by some other\n    person who certified (a), (b) or (c) and I have not modified\n    it.\n\n(d) I understand and agree that this project and the contribution\n    are public and that a record of the contribution (including all\n    personal information I submit with it, including my sign-off) is\n    maintained indefinitely and may be redistributed consistent with\n    this project or the open source license(s) involved.\n```\n\nThen you just add a line to every git commit message:\n\n    Signed-off-by: Joe Smith <joe.smith@email.com>\n\nUse your real name (sorry, no pseudonyms or anonymous contributions.)\n\nIf you set your `user.name` and `user.email` git configs, you can sign your\ncommit automatically with `git commit -s`.\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/GOVERNANCE.md",
    "content": "# distribution/reference Project Governance\n\nDistribution [Code of Conduct](./CODE-OF-CONDUCT.md) can be found here.\n\nFor specific guidance on practical contribution steps please\nsee our [CONTRIBUTING.md](./CONTRIBUTING.md) guide.\n\n## Maintainership\n\nThere are different types of maintainers, with different responsibilities, but\nall maintainers have 3 things in common:\n\n1) They share responsibility in the project's success.\n2) They have made a long-term, recurring time investment to improve the project.\n3) They spend that time doing whatever needs to be done, not necessarily what\nis the most interesting or fun.\n\nMaintainers are often under-appreciated, because their work is harder to appreciate.\nIt's easy to appreciate a really cool and technically advanced feature. It's harder\nto appreciate the absence of bugs, the slow but steady improvement in stability,\nor the reliability of a release process. But those things distinguish a good\nproject from a great one.\n\n## Reviewers\n\nA reviewer is a core role within the project.\nThey share in reviewing issues and pull requests and their LGTM counts towards the\nrequired LGTM count to merge a code change into the project.\n\nReviewers are part of the organization but do not have write access.\nBecoming a reviewer is a core aspect in the journey to becoming a maintainer.\n\n## Adding maintainers\n\nMaintainers are first and foremost contributors that have shown they are\ncommitted to the long term success of a project. Contributors wanting to become\nmaintainers are expected to be deeply involved in contributing code, pull\nrequest review, and triage of issues in the project for more than three months.\n\nJust contributing does not make you a maintainer, it is about building trust\nwith the current maintainers of the project and being a person that they can\ndepend on and trust to make decisions in the best interest of the project.\n\nPeriodically, the existing maintainers curate a list of contributors that have\nshown regular activity on the project over the prior months. From this list,\nmaintainer candidates are selected and proposed in a pull request or a\nmaintainers communication channel.\n\nAfter a candidate has been announced to the maintainers, the existing\nmaintainers are given five business days to discuss the candidate, raise\nobjections and cast their vote. Votes may take place on the communication\nchannel or via pull request comment. Candidates must be approved by at least 66%\nof the current maintainers by adding their vote on the mailing list. The\nreviewer role has the same process but only requires 33% of current maintainers.\nOnly maintainers of the repository that the candidate is proposed for are\nallowed to vote.\n\nIf a candidate is approved, a maintainer will contact the candidate to invite\nthe candidate to open a pull request that adds the contributor to the\nMAINTAINERS file. The voting process may take place inside a pull request if a\nmaintainer has already discussed the candidacy with the candidate and a\nmaintainer is willing to be a sponsor by opening the pull request. The candidate\nbecomes a maintainer once the pull request is merged.\n\n## Stepping down policy\n\nLife priorities, interests, and passions can change. If you're a maintainer but\nfeel you must remove yourself from the list, inform other maintainers that you\nintend to step down, and if possible, help find someone to pick up your work.\nAt the very least, ensure your work can be continued where you left off.\n\nAfter you've informed other maintainers, create a pull request to remove\nyourself from the MAINTAINERS file.\n\n## Removal of inactive maintainers\n\nSimilar to the procedure for adding new maintainers, existing maintainers can\nbe removed from the list if they do not show significant activity on the\nproject. Periodically, the maintainers review the list of maintainers and their\nactivity over the last three months.\n\nIf a maintainer has shown insufficient activity over this period, a neutral\nperson will contact the maintainer to ask if they want to continue being\na maintainer. If the maintainer decides to step down as a maintainer, they\nopen a pull request to be removed from the MAINTAINERS file.\n\nIf the maintainer wants to remain a maintainer, but is unable to perform the\nrequired duties they can be removed with a vote of at least 66% of the current\nmaintainers. In this case, maintainers should first propose the change to\nmaintainers via the maintainers communication channel, then open a pull request\nfor voting. The voting period is five business days. The voting pull request\nshould not come as a surpise to any maintainer and any discussion related to\nperformance must not be discussed on the pull request.\n\n## How are decisions made?\n\nDocker distribution is an open-source project with an open design philosophy.\nThis means that the repository is the source of truth for EVERY aspect of the\nproject, including its philosophy, design, road map, and APIs. *If it's part of\nthe project, it's in the repo. If it's in the repo, it's part of the project.*\n\nAs a result, all decisions can be expressed as changes to the repository. An\nimplementation change is a change to the source code. An API change is a change\nto the API specification. A philosophy change is a change to the philosophy\nmanifesto, and so on.\n\nAll decisions affecting distribution, big and small, follow the same 3 steps:\n\n* Step 1: Open a pull request. Anyone can do this.\n\n* Step 2: Discuss the pull request. Anyone can do this.\n\n* Step 3: Merge or refuse the pull request. Who does this depends on the nature\nof the pull request and which areas of the project it affects.\n\n## Helping contributors with the DCO\n\nThe [DCO or `Sign your work`](./CONTRIBUTING.md#sign-your-work)\nrequirement is not intended as a roadblock or speed bump.\n\nSome contributors are not as familiar with `git`, or have used a web\nbased editor, and thus asking them to `git commit --amend -s` is not the best\nway forward.\n\nIn this case, maintainers can update the commits based on clause (c) of the DCO.\nThe most trivial way for a contributor to allow the maintainer to do this, is to\nadd a DCO signature in a pull requests's comment, or a maintainer can simply\nnote that the change is sufficiently trivial that it does not substantially\nchange the existing contribution - i.e., a spelling change.\n\nWhen you add someone's DCO, please also add your own to keep a log.\n\n## I'm a maintainer. Should I make pull requests too?\n\nYes. Nobody should ever push to master directly. All changes should be\nmade through a pull request.\n\n## Conflict Resolution\n\nIf you have a technical dispute that you feel has reached an impasse with a\nsubset of the community, any contributor may open an issue, specifically\ncalling for a resolution vote of the current core maintainers to resolve the\ndispute. The same voting quorums required (2/3) for adding and removing\nmaintainers will apply to conflict resolution.\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/LICENSE",
    "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\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/MAINTAINERS",
    "content": "# Distribution project maintainers & reviewers\n#\n# See GOVERNANCE.md for maintainer versus reviewer roles\n#\n# MAINTAINERS (cncf-distribution-maintainers@lists.cncf.io)\n# GitHub ID, Name, Email address\n\"chrispat\",\"Chris Patterson\",\"chrispat@github.com\"\n\"clarkbw\",\"Bryan Clark\",\"clarkbw@github.com\"\n\"corhere\",\"Cory Snider\",\"csnider@mirantis.com\"\n\"deleteriousEffect\",\"Hayley Swimelar\",\"hswimelar@gitlab.com\"\n\"heww\",\"He Weiwei\",\"hweiwei@vmware.com\"\n\"joaodrp\",\"João Pereira\",\"jpereira@gitlab.com\"\n\"justincormack\",\"Justin Cormack\",\"justin.cormack@docker.com\"\n\"squizzi\",\"Kyle Squizzato\",\"ksquizzato@mirantis.com\"\n\"milosgajdos\",\"Milos Gajdos\",\"milosthegajdos@gmail.com\"\n\"sargun\",\"Sargun Dhillon\",\"sargun@sargun.me\"\n\"wy65701436\",\"Wang Yan\",\"wangyan@vmware.com\"\n\"stevelasker\",\"Steve Lasker\",\"steve.lasker@microsoft.com\"\n#\n# REVIEWERS\n# GitHub ID, Name, Email address\n\"dmcgowan\",\"Derek McGowan\",\"derek@mcgstyle.net\"\n\"stevvooe\",\"Stephen Day\",\"stevvooe@gmail.com\"\n\"thajeztah\",\"Sebastiaan van Stijn\",\"github@gone.nl\"\n\"DavidSpek\", \"David van der Spek\", \"vanderspek.david@gmail.com\"\n\"Jamstah\", \"James Hewitt\", \"james.hewitt@gmail.com\"\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/Makefile",
    "content": "# Project packages.\nPACKAGES=$(shell go list ./...)\n\n# Flags passed to `go test`\nBUILDFLAGS ?= \nTESTFLAGS ?= \n\n.PHONY: all build test coverage\n.DEFAULT: all\n\nall: build\n\nbuild: ## no binaries to build, so just check compilation suceeds\n\tgo build ${BUILDFLAGS} ./...\n\ntest: ## run tests\n\tgo test ${TESTFLAGS} ./...\n\ncoverage: ## generate coverprofiles from the unit tests\n\trm -f coverage.txt\n\tgo test ${TESTFLAGS} -cover -coverprofile=cover.out ./...\n\n.PHONY: help\nhelp:\n\t@awk 'BEGIN {FS = \":.*##\"; printf \"\\nUsage:\\n  make \\033[36m\\033[0m\\n\"} /^[a-zA-Z_\\/%-]+:.*?##/ { printf \"  \\033[36m%-27s\\033[0m %s\\n\", $$1, $$2 } /^##@/ { printf \"\\n\\033[1m%s\\033[0m\\n\", substr($$0, 5) } ' $(MAKEFILE_LIST)\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/README.md",
    "content": "# Distribution reference\n\nGo library to handle references to container images.\n\n<img src=\"/distribution-logo.svg\" width=\"200px\" />\n\n[![Build Status](https://github.com/distribution/reference/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/distribution/reference/actions?query=workflow%3ACI)\n[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/distribution/reference)\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)\n[![codecov](https://codecov.io/gh/distribution/reference/branch/main/graph/badge.svg)](https://codecov.io/gh/distribution/reference)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference.svg?type=shield)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference?ref=badge_shield)\n\nThis repository contains a library for handling references to container images held in container registries. Please see [godoc](https://pkg.go.dev/github.com/distribution/reference) for details.\n\n## Contribution\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute\nissues, fixes, and patches to this project.\n\n## Communication\n\nFor async communication and long running discussions please use issues and pull requests on the github repo.\nThis will be the best place to discuss design and implementation.\n\nFor sync communication we have a #distribution channel in the [CNCF Slack](https://slack.cncf.io/)\nthat everyone is welcome to join and chat about development.\n\n## Licenses\n\nThe distribution codebase is released under the [Apache 2.0 license](LICENSE).\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/SECURITY.md",
    "content": "# Security Policy\n\n## Reporting a Vulnerability\n\nThe maintainers take security seriously. If you discover a security issue, please bring it to their attention right away!\n\nPlease DO NOT file a public issue, instead send your report privately to cncf-distribution-security@lists.cncf.io.\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/helpers.go",
    "content": "package reference\n\nimport \"path\"\n\n// IsNameOnly returns true if reference only contains a repo name.\nfunc IsNameOnly(ref Named) bool {\n\tif _, ok := ref.(NamedTagged); ok {\n\t\treturn false\n\t}\n\tif _, ok := ref.(Canonical); ok {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// FamiliarName returns the familiar name string\n// for the given named, familiarizing if needed.\nfunc FamiliarName(ref Named) string {\n\tif nn, ok := ref.(normalizedNamed); ok {\n\t\treturn nn.Familiar().Name()\n\t}\n\treturn ref.Name()\n}\n\n// FamiliarString returns the familiar string representation\n// for the given reference, familiarizing if needed.\nfunc FamiliarString(ref Reference) string {\n\tif nn, ok := ref.(normalizedNamed); ok {\n\t\treturn nn.Familiar().String()\n\t}\n\treturn ref.String()\n}\n\n// FamiliarMatch reports whether ref matches the specified pattern.\n// See [path.Match] for supported patterns.\nfunc FamiliarMatch(pattern string, ref Reference) (bool, error) {\n\tmatched, err := path.Match(pattern, FamiliarString(ref))\n\tif namedRef, isNamed := ref.(Named); isNamed && !matched {\n\t\tmatched, _ = path.Match(pattern, FamiliarName(namedRef))\n\t}\n\treturn matched, err\n}\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/normalize.go",
    "content": "package reference\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nconst (\n\t// legacyDefaultDomain is the legacy domain for Docker Hub (which was\n\t// originally named \"the Docker Index\"). This domain is still used for\n\t// authentication and image search, which were part of the \"v1\" Docker\n\t// registry specification.\n\t//\n\t// This domain will continue to be supported, but there are plans to consolidate\n\t// legacy domains to new \"canonical\" domains. Once those domains are decided\n\t// on, we must update the normalization functions, but preserve compatibility\n\t// with existing installs, clients, and user configuration.\n\tlegacyDefaultDomain = \"index.docker.io\"\n\n\t// defaultDomain is the default domain used for images on Docker Hub.\n\t// It is used to normalize \"familiar\" names to canonical names, for example,\n\t// to convert \"ubuntu\" to \"docker.io/library/ubuntu:latest\".\n\t//\n\t// Note that actual domain of Docker Hub's registry is registry-1.docker.io.\n\t// This domain will continue to be supported, but there are plans to consolidate\n\t// legacy domains to new \"canonical\" domains. Once those domains are decided\n\t// on, we must update the normalization functions, but preserve compatibility\n\t// with existing installs, clients, and user configuration.\n\tdefaultDomain = \"docker.io\"\n\n\t// officialRepoPrefix is the namespace used for official images on Docker Hub.\n\t// It is used to normalize \"familiar\" names to canonical names, for example,\n\t// to convert \"ubuntu\" to \"docker.io/library/ubuntu:latest\".\n\tofficialRepoPrefix = \"library/\"\n\n\t// defaultTag is the default tag if no tag is provided.\n\tdefaultTag = \"latest\"\n)\n\n// normalizedNamed represents a name which has been\n// normalized and has a familiar form. A familiar name\n// is what is used in Docker UI. An example normalized\n// name is \"docker.io/library/ubuntu\" and corresponding\n// familiar name of \"ubuntu\".\ntype normalizedNamed interface {\n\tNamed\n\tFamiliar() Named\n}\n\n// ParseNormalizedNamed parses a string into a named reference\n// transforming a familiar name from Docker UI to a fully\n// qualified reference. If the value may be an identifier\n// use ParseAnyReference.\nfunc ParseNormalizedNamed(s string) (Named, error) {\n\tif ok := anchoredIdentifierRegexp.MatchString(s); ok {\n\t\treturn nil, fmt.Errorf(\"invalid repository name (%s), cannot specify 64-byte hexadecimal strings\", s)\n\t}\n\tdomain, remainder := splitDockerDomain(s)\n\tvar remote string\n\tif tagSep := strings.IndexRune(remainder, ':'); tagSep > -1 {\n\t\tremote = remainder[:tagSep]\n\t} else {\n\t\tremote = remainder\n\t}\n\tif strings.ToLower(remote) != remote {\n\t\treturn nil, fmt.Errorf(\"invalid reference format: repository name (%s) must be lowercase\", remote)\n\t}\n\n\tref, err := Parse(domain + \"/\" + remainder)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tnamed, isNamed := ref.(Named)\n\tif !isNamed {\n\t\treturn nil, fmt.Errorf(\"reference %s has no name\", ref.String())\n\t}\n\treturn named, nil\n}\n\n// namedTaggedDigested is a reference that has both a tag and a digest.\ntype namedTaggedDigested interface {\n\tNamedTagged\n\tDigested\n}\n\n// ParseDockerRef normalizes the image reference following the docker convention,\n// which allows for references to contain both a tag and a digest. It returns a\n// reference that is either tagged or digested. For references containing both\n// a tag and a digest, it returns a digested reference. For example, the following\n// reference:\n//\n//\tdocker.io/library/busybox:latest@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa\n//\n// Is returned as a digested reference (with the \":latest\" tag removed):\n//\n//\tdocker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa\n//\n// References that are already \"tagged\" or \"digested\" are returned unmodified:\n//\n//\t// Already a digested reference\n//\tdocker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa\n//\n//\t// Already a named reference\n//\tdocker.io/library/busybox:latest\nfunc ParseDockerRef(ref string) (Named, error) {\n\tnamed, err := ParseNormalizedNamed(ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif canonical, ok := named.(namedTaggedDigested); ok {\n\t\t// The reference is both tagged and digested; only return digested.\n\t\tnewNamed, err := WithName(canonical.Name())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn WithDigest(newNamed, canonical.Digest())\n\t}\n\treturn TagNameOnly(named), nil\n}\n\n// splitDockerDomain splits a repository name to domain and remote-name.\n// If no valid domain is found, the default domain is used. Repository name\n// needs to be already validated before.\nfunc splitDockerDomain(name string) (domain, remoteName string) {\n\tmaybeDomain, maybeRemoteName, ok := strings.Cut(name, \"/\")\n\tif !ok {\n\t\t// Fast-path for single element (\"familiar\" names), such as \"ubuntu\"\n\t\t// or \"ubuntu:latest\". Familiar names must be handled separately, to\n\t\t// prevent them from being handled as \"hostname:port\".\n\t\t//\n\t\t// Canonicalize them as \"docker.io/library/name[:tag]\"\n\n\t\t// FIXME(thaJeztah): account for bare \"localhost\" or \"example.com\" names, which SHOULD be considered a domain.\n\t\treturn defaultDomain, officialRepoPrefix + name\n\t}\n\n\tswitch {\n\tcase maybeDomain == localhost:\n\t\t// localhost is a reserved namespace and always considered a domain.\n\t\tdomain, remoteName = maybeDomain, maybeRemoteName\n\tcase maybeDomain == legacyDefaultDomain:\n\t\t// canonicalize the Docker Hub and legacy \"Docker Index\" domains.\n\t\tdomain, remoteName = defaultDomain, maybeRemoteName\n\tcase strings.ContainsAny(maybeDomain, \".:\"):\n\t\t// Likely a domain or IP-address:\n\t\t//\n\t\t// - contains a \".\" (e.g., \"example.com\" or \"127.0.0.1\")\n\t\t// - contains a \":\" (e.g., \"example:5000\", \"::1\", or \"[::1]:5000\")\n\t\tdomain, remoteName = maybeDomain, maybeRemoteName\n\tcase strings.ToLower(maybeDomain) != maybeDomain:\n\t\t// Uppercase namespaces are not allowed, so if the first element\n\t\t// is not lowercase, we assume it to be a domain-name.\n\t\tdomain, remoteName = maybeDomain, maybeRemoteName\n\tdefault:\n\t\t// None of the above: it's not a domain, so use the default, and\n\t\t// use the name input the remote-name.\n\t\tdomain, remoteName = defaultDomain, name\n\t}\n\n\tif domain == defaultDomain && !strings.ContainsRune(remoteName, '/') {\n\t\t// Canonicalize \"familiar\" names, but only on Docker Hub, not\n\t\t// on other domains:\n\t\t//\n\t\t// \"docker.io/ubuntu[:tag]\" => \"docker.io/library/ubuntu[:tag]\"\n\t\tremoteName = officialRepoPrefix + remoteName\n\t}\n\n\treturn domain, remoteName\n}\n\n// familiarizeName returns a shortened version of the name familiar\n// to the Docker UI. Familiar names have the default domain\n// \"docker.io\" and \"library/\" repository prefix removed.\n// For example, \"docker.io/library/redis\" will have the familiar\n// name \"redis\" and \"docker.io/dmcgowan/myapp\" will be \"dmcgowan/myapp\".\n// Returns a familiarized named only reference.\nfunc familiarizeName(named namedRepository) repository {\n\trepo := repository{\n\t\tdomain: named.Domain(),\n\t\tpath:   named.Path(),\n\t}\n\n\tif repo.domain == defaultDomain {\n\t\trepo.domain = \"\"\n\t\t// Handle official repositories which have the pattern \"library/<official repo name>\"\n\t\tif strings.HasPrefix(repo.path, officialRepoPrefix) {\n\t\t\t// TODO(thaJeztah): this check may be too strict, as it assumes the\n\t\t\t//  \"library/\" namespace does not have nested namespaces. While this\n\t\t\t//  is true (currently), technically it would be possible for Docker\n\t\t\t//  Hub to use those (e.g. \"library/distros/ubuntu:latest\").\n\t\t\t//  See https://github.com/distribution/distribution/pull/3769#issuecomment-1302031785.\n\t\t\tif remainder := strings.TrimPrefix(repo.path, officialRepoPrefix); !strings.ContainsRune(remainder, '/') {\n\t\t\t\trepo.path = remainder\n\t\t\t}\n\t\t}\n\t}\n\treturn repo\n}\n\nfunc (r reference) Familiar() Named {\n\treturn reference{\n\t\tnamedRepository: familiarizeName(r.namedRepository),\n\t\ttag:             r.tag,\n\t\tdigest:          r.digest,\n\t}\n}\n\nfunc (r repository) Familiar() Named {\n\treturn familiarizeName(r)\n}\n\nfunc (t taggedReference) Familiar() Named {\n\treturn taggedReference{\n\t\tnamedRepository: familiarizeName(t.namedRepository),\n\t\ttag:             t.tag,\n\t}\n}\n\nfunc (c canonicalReference) Familiar() Named {\n\treturn canonicalReference{\n\t\tnamedRepository: familiarizeName(c.namedRepository),\n\t\tdigest:          c.digest,\n\t}\n}\n\n// TagNameOnly adds the default tag \"latest\" to a reference if it only has\n// a repo name.\nfunc TagNameOnly(ref Named) Named {\n\tif IsNameOnly(ref) {\n\t\tnamedTagged, err := WithTag(ref, defaultTag)\n\t\tif err != nil {\n\t\t\t// Default tag must be valid, to create a NamedTagged\n\t\t\t// type with non-validated input the WithTag function\n\t\t\t// should be used instead\n\t\t\tpanic(err)\n\t\t}\n\t\treturn namedTagged\n\t}\n\treturn ref\n}\n\n// ParseAnyReference parses a reference string as a possible identifier,\n// full digest, or familiar name.\nfunc ParseAnyReference(ref string) (Reference, error) {\n\tif ok := anchoredIdentifierRegexp.MatchString(ref); ok {\n\t\treturn digestReference(\"sha256:\" + ref), nil\n\t}\n\tif dgst, err := digest.Parse(ref); err == nil {\n\t\treturn digestReference(dgst), nil\n\t}\n\n\treturn ParseNormalizedNamed(ref)\n}\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/reference.go",
    "content": "// Package reference provides a general type to represent any way of referencing images within the registry.\n// Its main purpose is to abstract tags and digests (content-addressable hash).\n//\n// Grammar\n//\n//\treference                       := name [ \":\" tag ] [ \"@\" digest ]\n//\tname                            := [domain '/'] remote-name\n//\tdomain                          := host [':' port-number]\n//\thost                            := domain-name | IPv4address | \\[ IPv6address \\]\t; rfc3986 appendix-A\n//\tdomain-name                     := domain-component ['.' domain-component]*\n//\tdomain-component                := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/\n//\tport-number                     := /[0-9]+/\n//\tpath-component                  := alpha-numeric [separator alpha-numeric]*\n//\tpath (or \"remote-name\")         := path-component ['/' path-component]*\n//\talpha-numeric                   := /[a-z0-9]+/\n//\tseparator                       := /[_.]|__|[-]*/\n//\n//\ttag                             := /[\\w][\\w.-]{0,127}/\n//\n//\tdigest                          := digest-algorithm \":\" digest-hex\n//\tdigest-algorithm                := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]*\n//\tdigest-algorithm-separator      := /[+.-_]/\n//\tdigest-algorithm-component      := /[A-Za-z][A-Za-z0-9]*/\n//\tdigest-hex                      := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value\n//\n//\tidentifier                      := /[a-f0-9]{64}/\npackage reference\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nconst (\n\t// RepositoryNameTotalLengthMax is the maximum total number of characters in a repository name.\n\tRepositoryNameTotalLengthMax = 255\n\n\t// NameTotalLengthMax is the maximum total number of characters in a repository name.\n\t//\n\t// Deprecated: use [RepositoryNameTotalLengthMax] instead.\n\tNameTotalLengthMax = RepositoryNameTotalLengthMax\n)\n\nvar (\n\t// ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference.\n\tErrReferenceInvalidFormat = errors.New(\"invalid reference format\")\n\n\t// ErrTagInvalidFormat represents an error while trying to parse a string as a tag.\n\tErrTagInvalidFormat = errors.New(\"invalid tag format\")\n\n\t// ErrDigestInvalidFormat represents an error while trying to parse a string as a tag.\n\tErrDigestInvalidFormat = errors.New(\"invalid digest format\")\n\n\t// ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters.\n\tErrNameContainsUppercase = errors.New(\"repository name must be lowercase\")\n\n\t// ErrNameEmpty is returned for empty, invalid repository names.\n\tErrNameEmpty = errors.New(\"repository name must have at least one component\")\n\n\t// ErrNameTooLong is returned when a repository name is longer than RepositoryNameTotalLengthMax.\n\tErrNameTooLong = fmt.Errorf(\"repository name must not be more than %v characters\", RepositoryNameTotalLengthMax)\n\n\t// ErrNameNotCanonical is returned when a name is not canonical.\n\tErrNameNotCanonical = errors.New(\"repository name must be canonical\")\n)\n\n// Reference is an opaque object reference identifier that may include\n// modifiers such as a hostname, name, tag, and digest.\ntype Reference interface {\n\t// String returns the full reference\n\tString() string\n}\n\n// Field provides a wrapper type for resolving correct reference types when\n// working with encoding.\ntype Field struct {\n\treference Reference\n}\n\n// AsField wraps a reference in a Field for encoding.\nfunc AsField(reference Reference) Field {\n\treturn Field{reference}\n}\n\n// Reference unwraps the reference type from the field to\n// return the Reference object. This object should be\n// of the appropriate type to further check for different\n// reference types.\nfunc (f Field) Reference() Reference {\n\treturn f.reference\n}\n\n// MarshalText serializes the field to byte text which\n// is the string of the reference.\nfunc (f Field) MarshalText() (p []byte, err error) {\n\treturn []byte(f.reference.String()), nil\n}\n\n// UnmarshalText parses text bytes by invoking the\n// reference parser to ensure the appropriately\n// typed reference object is wrapped by field.\nfunc (f *Field) UnmarshalText(p []byte) error {\n\tr, err := Parse(string(p))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tf.reference = r\n\treturn nil\n}\n\n// Named is an object with a full name\ntype Named interface {\n\tReference\n\tName() string\n}\n\n// Tagged is an object which has a tag\ntype Tagged interface {\n\tReference\n\tTag() string\n}\n\n// NamedTagged is an object including a name and tag.\ntype NamedTagged interface {\n\tNamed\n\tTag() string\n}\n\n// Digested is an object which has a digest\n// in which it can be referenced by\ntype Digested interface {\n\tReference\n\tDigest() digest.Digest\n}\n\n// Canonical reference is an object with a fully unique\n// name including a name with domain and digest\ntype Canonical interface {\n\tNamed\n\tDigest() digest.Digest\n}\n\n// namedRepository is a reference to a repository with a name.\n// A namedRepository has both domain and path components.\ntype namedRepository interface {\n\tNamed\n\tDomain() string\n\tPath() string\n}\n\n// Domain returns the domain part of the [Named] reference.\nfunc Domain(named Named) string {\n\tif r, ok := named.(namedRepository); ok {\n\t\treturn r.Domain()\n\t}\n\tdomain, _ := splitDomain(named.Name())\n\treturn domain\n}\n\n// Path returns the name without the domain part of the [Named] reference.\nfunc Path(named Named) (name string) {\n\tif r, ok := named.(namedRepository); ok {\n\t\treturn r.Path()\n\t}\n\t_, path := splitDomain(named.Name())\n\treturn path\n}\n\n// splitDomain splits a named reference into a hostname and path string.\n// If no valid hostname is found, the hostname is empty and the full value\n// is returned as name\nfunc splitDomain(name string) (string, string) {\n\tmatch := anchoredNameRegexp.FindStringSubmatch(name)\n\tif len(match) != 3 {\n\t\treturn \"\", name\n\t}\n\treturn match[1], match[2]\n}\n\n// Parse parses s and returns a syntactically valid Reference.\n// If an error was encountered it is returned, along with a nil Reference.\nfunc Parse(s string) (Reference, error) {\n\tmatches := ReferenceRegexp.FindStringSubmatch(s)\n\tif matches == nil {\n\t\tif s == \"\" {\n\t\t\treturn nil, ErrNameEmpty\n\t\t}\n\t\tif ReferenceRegexp.FindStringSubmatch(strings.ToLower(s)) != nil {\n\t\t\treturn nil, ErrNameContainsUppercase\n\t\t}\n\t\treturn nil, ErrReferenceInvalidFormat\n\t}\n\n\tvar repo repository\n\n\tnameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1])\n\tif len(nameMatch) == 3 {\n\t\trepo.domain = nameMatch[1]\n\t\trepo.path = nameMatch[2]\n\t} else {\n\t\trepo.domain = \"\"\n\t\trepo.path = matches[1]\n\t}\n\n\tif len(repo.path) > RepositoryNameTotalLengthMax {\n\t\treturn nil, ErrNameTooLong\n\t}\n\n\tref := reference{\n\t\tnamedRepository: repo,\n\t\ttag:             matches[2],\n\t}\n\tif matches[3] != \"\" {\n\t\tvar err error\n\t\tref.digest, err = digest.Parse(matches[3])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tr := getBestReferenceType(ref)\n\tif r == nil {\n\t\treturn nil, ErrNameEmpty\n\t}\n\n\treturn r, nil\n}\n\n// ParseNamed parses s and returns a syntactically valid reference implementing\n// the Named interface. The reference must have a name and be in the canonical\n// form, otherwise an error is returned.\n// If an error was encountered it is returned, along with a nil Reference.\nfunc ParseNamed(s string) (Named, error) {\n\tnamed, err := ParseNormalizedNamed(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif named.String() != s {\n\t\treturn nil, ErrNameNotCanonical\n\t}\n\treturn named, nil\n}\n\n// WithName returns a named object representing the given string. If the input\n// is invalid ErrReferenceInvalidFormat will be returned.\nfunc WithName(name string) (Named, error) {\n\tmatch := anchoredNameRegexp.FindStringSubmatch(name)\n\tif match == nil || len(match) != 3 {\n\t\treturn nil, ErrReferenceInvalidFormat\n\t}\n\n\tif len(match[2]) > RepositoryNameTotalLengthMax {\n\t\treturn nil, ErrNameTooLong\n\t}\n\n\treturn repository{\n\t\tdomain: match[1],\n\t\tpath:   match[2],\n\t}, nil\n}\n\n// WithTag combines the name from \"name\" and the tag from \"tag\" to form a\n// reference incorporating both the name and the tag.\nfunc WithTag(name Named, tag string) (NamedTagged, error) {\n\tif !anchoredTagRegexp.MatchString(tag) {\n\t\treturn nil, ErrTagInvalidFormat\n\t}\n\tvar repo repository\n\tif r, ok := name.(namedRepository); ok {\n\t\trepo.domain = r.Domain()\n\t\trepo.path = r.Path()\n\t} else {\n\t\trepo.path = name.Name()\n\t}\n\tif canonical, ok := name.(Canonical); ok {\n\t\treturn reference{\n\t\t\tnamedRepository: repo,\n\t\t\ttag:             tag,\n\t\t\tdigest:          canonical.Digest(),\n\t\t}, nil\n\t}\n\treturn taggedReference{\n\t\tnamedRepository: repo,\n\t\ttag:             tag,\n\t}, nil\n}\n\n// WithDigest combines the name from \"name\" and the digest from \"digest\" to form\n// a reference incorporating both the name and the digest.\nfunc WithDigest(name Named, digest digest.Digest) (Canonical, error) {\n\tif !anchoredDigestRegexp.MatchString(digest.String()) {\n\t\treturn nil, ErrDigestInvalidFormat\n\t}\n\tvar repo repository\n\tif r, ok := name.(namedRepository); ok {\n\t\trepo.domain = r.Domain()\n\t\trepo.path = r.Path()\n\t} else {\n\t\trepo.path = name.Name()\n\t}\n\tif tagged, ok := name.(Tagged); ok {\n\t\treturn reference{\n\t\t\tnamedRepository: repo,\n\t\t\ttag:             tagged.Tag(),\n\t\t\tdigest:          digest,\n\t\t}, nil\n\t}\n\treturn canonicalReference{\n\t\tnamedRepository: repo,\n\t\tdigest:          digest,\n\t}, nil\n}\n\n// TrimNamed removes any tag or digest from the named reference.\nfunc TrimNamed(ref Named) Named {\n\trepo := repository{}\n\tif r, ok := ref.(namedRepository); ok {\n\t\trepo.domain, repo.path = r.Domain(), r.Path()\n\t} else {\n\t\trepo.domain, repo.path = splitDomain(ref.Name())\n\t}\n\treturn repo\n}\n\nfunc getBestReferenceType(ref reference) Reference {\n\tif ref.Name() == \"\" {\n\t\t// Allow digest only references\n\t\tif ref.digest != \"\" {\n\t\t\treturn digestReference(ref.digest)\n\t\t}\n\t\treturn nil\n\t}\n\tif ref.tag == \"\" {\n\t\tif ref.digest != \"\" {\n\t\t\treturn canonicalReference{\n\t\t\t\tnamedRepository: ref.namedRepository,\n\t\t\t\tdigest:          ref.digest,\n\t\t\t}\n\t\t}\n\t\treturn ref.namedRepository\n\t}\n\tif ref.digest == \"\" {\n\t\treturn taggedReference{\n\t\t\tnamedRepository: ref.namedRepository,\n\t\t\ttag:             ref.tag,\n\t\t}\n\t}\n\n\treturn ref\n}\n\ntype reference struct {\n\tnamedRepository\n\ttag    string\n\tdigest digest.Digest\n}\n\nfunc (r reference) String() string {\n\treturn r.Name() + \":\" + r.tag + \"@\" + r.digest.String()\n}\n\nfunc (r reference) Tag() string {\n\treturn r.tag\n}\n\nfunc (r reference) Digest() digest.Digest {\n\treturn r.digest\n}\n\ntype repository struct {\n\tdomain string\n\tpath   string\n}\n\nfunc (r repository) String() string {\n\treturn r.Name()\n}\n\nfunc (r repository) Name() string {\n\tif r.domain == \"\" {\n\t\treturn r.path\n\t}\n\treturn r.domain + \"/\" + r.path\n}\n\nfunc (r repository) Domain() string {\n\treturn r.domain\n}\n\nfunc (r repository) Path() string {\n\treturn r.path\n}\n\ntype digestReference digest.Digest\n\nfunc (d digestReference) String() string {\n\treturn digest.Digest(d).String()\n}\n\nfunc (d digestReference) Digest() digest.Digest {\n\treturn digest.Digest(d)\n}\n\ntype taggedReference struct {\n\tnamedRepository\n\ttag string\n}\n\nfunc (t taggedReference) String() string {\n\treturn t.Name() + \":\" + t.tag\n}\n\nfunc (t taggedReference) Tag() string {\n\treturn t.tag\n}\n\ntype canonicalReference struct {\n\tnamedRepository\n\tdigest digest.Digest\n}\n\nfunc (c canonicalReference) String() string {\n\treturn c.Name() + \"@\" + c.digest.String()\n}\n\nfunc (c canonicalReference) Digest() digest.Digest {\n\treturn c.digest\n}\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/regexp.go",
    "content": "package reference\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n)\n\n// DigestRegexp matches well-formed digests, including algorithm (e.g. \"sha256:<encoded>\").\nvar DigestRegexp = regexp.MustCompile(digestPat)\n\n// DomainRegexp matches hostname or IP-addresses, optionally including a port\n// number. It defines the structure of potential domain components that may be\n// part of image names. This is purposely a subset of what is allowed by DNS to\n// ensure backwards compatibility with Docker image names. It may be a subset of\n// DNS domain name, an IPv4 address in decimal format, or an IPv6 address between\n// square brackets (excluding zone identifiers as defined by [RFC 6874] or special\n// addresses such as IPv4-Mapped).\n//\n// [RFC 6874]: https://www.rfc-editor.org/rfc/rfc6874.\nvar DomainRegexp = regexp.MustCompile(domainAndPort)\n\n// IdentifierRegexp is the format for string identifier used as a\n// content addressable identifier using sha256. These identifiers\n// are like digests without the algorithm, since sha256 is used.\nvar IdentifierRegexp = regexp.MustCompile(identifier)\n\n// NameRegexp is the format for the name component of references, including\n// an optional domain and port, but without tag or digest suffix.\nvar NameRegexp = regexp.MustCompile(namePat)\n\n// ReferenceRegexp is the full supported format of a reference. The regexp\n// is anchored and has capturing groups for name, tag, and digest\n// components.\nvar ReferenceRegexp = regexp.MustCompile(referencePat)\n\n// TagRegexp matches valid tag names. From [docker/docker:graph/tags.go].\n//\n// [docker/docker:graph/tags.go]: https://github.com/moby/moby/blob/v1.6.0/graph/tags.go#L26-L28\nvar TagRegexp = regexp.MustCompile(tag)\n\nconst (\n\t// alphanumeric defines the alphanumeric atom, typically a\n\t// component of names. This only allows lower case characters and digits.\n\talphanumeric = `[a-z0-9]+`\n\n\t// separator defines the separators allowed to be embedded in name\n\t// components. This allows one period, one or two underscore and multiple\n\t// dashes. Repeated dashes and underscores are intentionally treated\n\t// differently. In order to support valid hostnames as name components,\n\t// supporting repeated dash was added. Additionally double underscore is\n\t// now allowed as a separator to loosen the restriction for previously\n\t// supported names.\n\tseparator = `(?:[._]|__|[-]+)`\n\n\t// localhost is treated as a special value for domain-name. Any other\n\t// domain-name without a \".\" or a \":port\" are considered a path component.\n\tlocalhost = `localhost`\n\n\t// domainNameComponent restricts the registry domain component of a\n\t// repository name to start with a component as defined by DomainRegexp.\n\tdomainNameComponent = `(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`\n\n\t// optionalPort matches an optional port-number including the port separator\n\t// (e.g. \":80\").\n\toptionalPort = `(?::[0-9]+)?`\n\n\t// tag matches valid tag names. From docker/docker:graph/tags.go.\n\ttag = `[\\w][\\w.-]{0,127}`\n\n\t// digestPat matches well-formed digests, including algorithm (e.g. \"sha256:<encoded>\").\n\t//\n\t// TODO(thaJeztah): this should follow the same rules as https://pkg.go.dev/github.com/opencontainers/go-digest@v1.0.0#DigestRegexp\n\t// so that go-digest defines the canonical format. Note that the go-digest is\n\t// more relaxed:\n\t//   - it allows multiple algorithms (e.g. \"sha256+b64:<encoded>\") to allow\n\t//     future expansion of supported algorithms.\n\t//   - it allows the \"<encoded>\" value to use urlsafe base64 encoding as defined\n\t//     in [rfc4648, section 5].\n\t//\n\t// [rfc4648, section 5]: https://www.rfc-editor.org/rfc/rfc4648#section-5.\n\tdigestPat = `[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`\n\n\t// identifier is the format for a content addressable identifier using sha256.\n\t// These identifiers are like digests without the algorithm, since sha256 is used.\n\tidentifier = `([a-f0-9]{64})`\n\n\t// ipv6address are enclosed between square brackets and may be represented\n\t// in many ways, see rfc5952. Only IPv6 in compressed or uncompressed format\n\t// are allowed, IPv6 zone identifiers (rfc6874) or Special addresses such as\n\t// IPv4-Mapped are deliberately excluded.\n\tipv6address = `\\[(?:[a-fA-F0-9:]+)\\]`\n)\n\nvar (\n\t// domainName defines the structure of potential domain components\n\t// that may be part of image names. This is purposely a subset of what is\n\t// allowed by DNS to ensure backwards compatibility with Docker image\n\t// names. This includes IPv4 addresses on decimal format.\n\tdomainName = domainNameComponent + anyTimes(`\\.`+domainNameComponent)\n\n\t// host defines the structure of potential domains based on the URI\n\t// Host subcomponent on rfc3986. It may be a subset of DNS domain name,\n\t// or an IPv4 address in decimal format, or an IPv6 address between square\n\t// brackets (excluding zone identifiers as defined by rfc6874 or special\n\t// addresses such as IPv4-Mapped).\n\thost = `(?:` + domainName + `|` + ipv6address + `)`\n\n\t// allowed by the URI Host subcomponent on rfc3986 to ensure backwards\n\t// compatibility with Docker image names.\n\tdomainAndPort = host + optionalPort\n\n\t// anchoredTagRegexp matches valid tag names, anchored at the start and\n\t// end of the matched string.\n\tanchoredTagRegexp = regexp.MustCompile(anchored(tag))\n\n\t// anchoredDigestRegexp matches valid digests, anchored at the start and\n\t// end of the matched string.\n\tanchoredDigestRegexp = regexp.MustCompile(anchored(digestPat))\n\n\t// pathComponent restricts path-components to start with an alphanumeric\n\t// character, with following parts able to be separated by a separator\n\t// (one period, one or two underscore and multiple dashes).\n\tpathComponent = alphanumeric + anyTimes(separator+alphanumeric)\n\n\t// remoteName matches the remote-name of a repository. It consists of one\n\t// or more forward slash (/) delimited path-components:\n\t//\n\t//\tpathComponent[[/pathComponent] ...] // e.g., \"library/ubuntu\"\n\tremoteName = pathComponent + anyTimes(`/`+pathComponent)\n\tnamePat    = optional(domainAndPort+`/`) + remoteName\n\n\t// anchoredNameRegexp is used to parse a name value, capturing the\n\t// domain and trailing components.\n\tanchoredNameRegexp = regexp.MustCompile(anchored(optional(capture(domainAndPort), `/`), capture(remoteName)))\n\n\treferencePat = anchored(capture(namePat), optional(`:`, capture(tag)), optional(`@`, capture(digestPat)))\n\n\t// anchoredIdentifierRegexp is used to check or match an\n\t// identifier value, anchored at start and end of string.\n\tanchoredIdentifierRegexp = regexp.MustCompile(anchored(identifier))\n)\n\n// optional wraps the expression in a non-capturing group and makes the\n// production optional.\nfunc optional(res ...string) string {\n\treturn `(?:` + strings.Join(res, \"\") + `)?`\n}\n\n// anyTimes wraps the expression in a non-capturing group that can occur\n// any number of times.\nfunc anyTimes(res ...string) string {\n\treturn `(?:` + strings.Join(res, \"\") + `)*`\n}\n\n// capture wraps the expression in a capturing group.\nfunc capture(res ...string) string {\n\treturn `(` + strings.Join(res, \"\") + `)`\n}\n\n// anchored anchors the regular expression by adding start and end delimiters.\nfunc anchored(res ...string) string {\n\treturn `^` + strings.Join(res, \"\") + `$`\n}\n"
  },
  {
    "path": "vendor/github.com/distribution/reference/sort.go",
    "content": "/*\n   Copyright The containerd Authors.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage reference\n\nimport (\n\t\"sort\"\n)\n\n// Sort sorts string references preferring higher information references.\n//\n// The precedence is as follows:\n//\n//  1. [Named] + [Tagged] + [Digested] (e.g., \"docker.io/library/busybox:latest@sha256:<digest>\")\n//  2. [Named] + [Tagged]              (e.g., \"docker.io/library/busybox:latest\")\n//  3. [Named] + [Digested]            (e.g., \"docker.io/library/busybo@sha256:<digest>\")\n//  4. [Named]                         (e.g., \"docker.io/library/busybox\")\n//  5. [Digested]                      (e.g., \"docker.io@sha256:<digest>\")\n//  6. Parse error\nfunc Sort(references []string) []string {\n\tvar prefs []Reference\n\tvar bad []string\n\n\tfor _, ref := range references {\n\t\tpref, err := ParseAnyReference(ref)\n\t\tif err != nil {\n\t\t\tbad = append(bad, ref)\n\t\t} else {\n\t\t\tprefs = append(prefs, pref)\n\t\t}\n\t}\n\tsort.Slice(prefs, func(a, b int) bool {\n\t\tar := refRank(prefs[a])\n\t\tbr := refRank(prefs[b])\n\t\tif ar == br {\n\t\t\treturn prefs[a].String() < prefs[b].String()\n\t\t}\n\t\treturn ar < br\n\t})\n\tsort.Strings(bad)\n\tvar refs []string\n\tfor _, pref := range prefs {\n\t\trefs = append(refs, pref.String())\n\t}\n\treturn append(refs, bad...)\n}\n\nfunc refRank(ref Reference) uint8 {\n\tif _, ok := ref.(Named); ok {\n\t\tif _, ok = ref.(Tagged); ok {\n\t\t\tif _, ok = ref.(Digested); ok {\n\t\t\t\treturn 1\n\t\t\t}\n\t\t\treturn 2\n\t\t}\n\t\tif _, ok = ref.(Digested); ok {\n\t\t\treturn 3\n\t\t}\n\t\treturn 4\n\t}\n\treturn 5\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/LICENSE",
    "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\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/errcode/errors.go",
    "content": "package errcode\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n)\n\n// ErrorCoder is the base interface for ErrorCode and Error allowing\n// users of each to just call ErrorCode to get the real ID of each\ntype ErrorCoder interface {\n\tErrorCode() ErrorCode\n}\n\n// ErrorCode represents the error type. The errors are serialized via strings\n// and the integer format may change and should *never* be exported.\ntype ErrorCode int\n\nvar _ error = ErrorCode(0)\n\n// ErrorCode just returns itself\nfunc (ec ErrorCode) ErrorCode() ErrorCode {\n\treturn ec\n}\n\n// Error returns the ID/Value\nfunc (ec ErrorCode) Error() string {\n\t// NOTE(stevvooe): Cannot use message here since it may have unpopulated args.\n\treturn strings.ToLower(strings.Replace(ec.String(), \"_\", \" \", -1))\n}\n\n// Descriptor returns the descriptor for the error code.\nfunc (ec ErrorCode) Descriptor() ErrorDescriptor {\n\td, ok := errorCodeToDescriptors[ec]\n\n\tif !ok {\n\t\treturn ErrorCodeUnknown.Descriptor()\n\t}\n\n\treturn d\n}\n\n// String returns the canonical identifier for this error code.\nfunc (ec ErrorCode) String() string {\n\treturn ec.Descriptor().Value\n}\n\n// Message returned the human-readable error message for this error code.\nfunc (ec ErrorCode) Message() string {\n\treturn ec.Descriptor().Message\n}\n\n// MarshalText encodes the receiver into UTF-8-encoded text and returns the\n// result.\nfunc (ec ErrorCode) MarshalText() (text []byte, err error) {\n\treturn []byte(ec.String()), nil\n}\n\n// UnmarshalText decodes the form generated by MarshalText.\nfunc (ec *ErrorCode) UnmarshalText(text []byte) error {\n\tdesc, ok := idToDescriptors[string(text)]\n\n\tif !ok {\n\t\tdesc = ErrorCodeUnknown.Descriptor()\n\t}\n\n\t*ec = desc.Code\n\n\treturn nil\n}\n\n// WithMessage creates a new Error struct based on the passed-in info and\n// overrides the Message property.\nfunc (ec ErrorCode) WithMessage(message string) Error {\n\treturn Error{\n\t\tCode:    ec,\n\t\tMessage: message,\n\t}\n}\n\n// WithDetail creates a new Error struct based on the passed-in info and\n// set the Detail property appropriately\nfunc (ec ErrorCode) WithDetail(detail interface{}) Error {\n\treturn Error{\n\t\tCode:    ec,\n\t\tMessage: ec.Message(),\n\t}.WithDetail(detail)\n}\n\n// WithArgs creates a new Error struct and sets the Args slice\nfunc (ec ErrorCode) WithArgs(args ...interface{}) Error {\n\treturn Error{\n\t\tCode:    ec,\n\t\tMessage: ec.Message(),\n\t}.WithArgs(args...)\n}\n\n// Error provides a wrapper around ErrorCode with extra Details provided.\ntype Error struct {\n\tCode    ErrorCode   `json:\"code\"`\n\tMessage string      `json:\"message\"`\n\tDetail  interface{} `json:\"detail,omitempty\"`\n\n\t// TODO(duglin): See if we need an \"args\" property so we can do the\n\t// variable substitution right before showing the message to the user\n}\n\nvar _ error = Error{}\n\n// ErrorCode returns the ID/Value of this Error\nfunc (e Error) ErrorCode() ErrorCode {\n\treturn e.Code\n}\n\n// Error returns a human readable representation of the error.\nfunc (e Error) Error() string {\n\treturn fmt.Sprintf(\"%s: %s\", e.Code.Error(), e.Message)\n}\n\n// WithDetail will return a new Error, based on the current one, but with\n// some Detail info added\nfunc (e Error) WithDetail(detail interface{}) Error {\n\treturn Error{\n\t\tCode:    e.Code,\n\t\tMessage: e.Message,\n\t\tDetail:  detail,\n\t}\n}\n\n// WithArgs uses the passed-in list of interface{} as the substitution\n// variables in the Error's Message string, but returns a new Error\nfunc (e Error) WithArgs(args ...interface{}) Error {\n\treturn Error{\n\t\tCode:    e.Code,\n\t\tMessage: fmt.Sprintf(e.Code.Message(), args...),\n\t\tDetail:  e.Detail,\n\t}\n}\n\n// ErrorDescriptor provides relevant information about a given error code.\ntype ErrorDescriptor struct {\n\t// Code is the error code that this descriptor describes.\n\tCode ErrorCode\n\n\t// Value provides a unique, string key, often captilized with\n\t// underscores, to identify the error code. This value is used as the\n\t// keyed value when serializing api errors.\n\tValue string\n\n\t// Message is a short, human readable decription of the error condition\n\t// included in API responses.\n\tMessage string\n\n\t// Description provides a complete account of the errors purpose, suitable\n\t// for use in documentation.\n\tDescription string\n\n\t// HTTPStatusCode provides the http status code that is associated with\n\t// this error condition.\n\tHTTPStatusCode int\n}\n\n// ParseErrorCode returns the value by the string error code.\n// `ErrorCodeUnknown` will be returned if the error is not known.\nfunc ParseErrorCode(value string) ErrorCode {\n\ted, ok := idToDescriptors[value]\n\tif ok {\n\t\treturn ed.Code\n\t}\n\n\treturn ErrorCodeUnknown\n}\n\n// Errors provides the envelope for multiple errors and a few sugar methods\n// for use within the application.\ntype Errors []error\n\nvar _ error = Errors{}\n\nfunc (errs Errors) Error() string {\n\tswitch len(errs) {\n\tcase 0:\n\t\treturn \"<nil>\"\n\tcase 1:\n\t\treturn errs[0].Error()\n\tdefault:\n\t\tmsg := \"errors:\\n\"\n\t\tfor _, err := range errs {\n\t\t\tmsg += err.Error() + \"\\n\"\n\t\t}\n\t\treturn msg\n\t}\n}\n\n// Len returns the current number of errors.\nfunc (errs Errors) Len() int {\n\treturn len(errs)\n}\n\n// MarshalJSON converts slice of error, ErrorCode or Error into a\n// slice of Error - then serializes\nfunc (errs Errors) MarshalJSON() ([]byte, error) {\n\tvar tmpErrs struct {\n\t\tErrors []Error `json:\"errors,omitempty\"`\n\t}\n\n\tfor _, daErr := range errs {\n\t\tvar err Error\n\n\t\tswitch daErr := daErr.(type) {\n\t\tcase ErrorCode:\n\t\t\terr = daErr.WithDetail(nil)\n\t\tcase Error:\n\t\t\terr = daErr\n\t\tdefault:\n\t\t\terr = ErrorCodeUnknown.WithDetail(daErr)\n\n\t\t}\n\n\t\t// If the Error struct was setup and they forgot to set the\n\t\t// Message field (meaning its \"\") then grab it from the ErrCode\n\t\tmsg := err.Message\n\t\tif msg == \"\" {\n\t\t\tmsg = err.Code.Message()\n\t\t}\n\n\t\ttmpErrs.Errors = append(tmpErrs.Errors, Error{\n\t\t\tCode:    err.Code,\n\t\t\tMessage: msg,\n\t\t\tDetail:  err.Detail,\n\t\t})\n\t}\n\n\treturn json.Marshal(tmpErrs)\n}\n\n// UnmarshalJSON deserializes []Error and then converts it into slice of\n// Error or ErrorCode\nfunc (errs *Errors) UnmarshalJSON(data []byte) error {\n\tvar tmpErrs struct {\n\t\tErrors []Error\n\t}\n\n\tif err := json.Unmarshal(data, &tmpErrs); err != nil {\n\t\treturn err\n\t}\n\n\tvar newErrs Errors\n\tfor _, daErr := range tmpErrs.Errors {\n\t\t// If Message is empty or exactly matches the Code's message string\n\t\t// then just use the Code, no need for a full Error struct\n\t\tif daErr.Detail == nil && (daErr.Message == \"\" || daErr.Message == daErr.Code.Message()) {\n\t\t\t// Error's w/o details get converted to ErrorCode\n\t\t\tnewErrs = append(newErrs, daErr.Code)\n\t\t} else {\n\t\t\t// Error's w/ details are untouched\n\t\t\tnewErrs = append(newErrs, Error{\n\t\t\t\tCode:    daErr.Code,\n\t\t\t\tMessage: daErr.Message,\n\t\t\t\tDetail:  daErr.Detail,\n\t\t\t})\n\t\t}\n\t}\n\n\t*errs = newErrs\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/errcode/handler.go",
    "content": "package errcode\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\n// ServeJSON attempts to serve the errcode in a JSON envelope. It marshals err\n// and sets the content-type header to 'application/json'. It will handle\n// ErrorCoder and Errors, and if necessary will create an envelope.\nfunc ServeJSON(w http.ResponseWriter, err error) error {\n\tw.Header().Set(\"Content-Type\", \"application/json; charset=utf-8\")\n\tvar sc int\n\n\tswitch errs := err.(type) {\n\tcase Errors:\n\t\tif len(errs) < 1 {\n\t\t\tbreak\n\t\t}\n\n\t\tif err, ok := errs[0].(ErrorCoder); ok {\n\t\t\tsc = err.ErrorCode().Descriptor().HTTPStatusCode\n\t\t}\n\tcase ErrorCoder:\n\t\tsc = errs.ErrorCode().Descriptor().HTTPStatusCode\n\t\terr = Errors{err} // create an envelope.\n\tdefault:\n\t\t// We just have an unhandled error type, so just place in an envelope\n\t\t// and move along.\n\t\terr = Errors{err}\n\t}\n\n\tif sc == 0 {\n\t\tsc = http.StatusInternalServerError\n\t}\n\n\tw.WriteHeader(sc)\n\n\treturn json.NewEncoder(w).Encode(err)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/errcode/register.go",
    "content": "package errcode\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"sort\"\n\t\"sync\"\n)\n\nvar (\n\terrorCodeToDescriptors = map[ErrorCode]ErrorDescriptor{}\n\tidToDescriptors        = map[string]ErrorDescriptor{}\n\tgroupToDescriptors     = map[string][]ErrorDescriptor{}\n)\n\nvar (\n\t// ErrorCodeUnknown is a generic error that can be used as a last\n\t// resort if there is no situation-specific error message that can be used\n\tErrorCodeUnknown = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:   \"UNKNOWN\",\n\t\tMessage: \"unknown error\",\n\t\tDescription: `Generic error returned when the error does not have an\n\t\t\t                                            API classification.`,\n\t\tHTTPStatusCode: http.StatusInternalServerError,\n\t})\n\n\t// ErrorCodeUnsupported is returned when an operation is not supported.\n\tErrorCodeUnsupported = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:   \"UNSUPPORTED\",\n\t\tMessage: \"The operation is unsupported.\",\n\t\tDescription: `The operation was unsupported due to a missing\n\t\timplementation or invalid set of parameters.`,\n\t\tHTTPStatusCode: http.StatusMethodNotAllowed,\n\t})\n\n\t// ErrorCodeUnauthorized is returned if a request requires\n\t// authentication.\n\tErrorCodeUnauthorized = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:   \"UNAUTHORIZED\",\n\t\tMessage: \"authentication required\",\n\t\tDescription: `The access controller was unable to authenticate\n\t\tthe client. Often this will be accompanied by a\n\t\tWww-Authenticate HTTP response header indicating how to\n\t\tauthenticate.`,\n\t\tHTTPStatusCode: http.StatusUnauthorized,\n\t})\n\n\t// ErrorCodeDenied is returned if a client does not have sufficient\n\t// permission to perform an action.\n\tErrorCodeDenied = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:   \"DENIED\",\n\t\tMessage: \"requested access to the resource is denied\",\n\t\tDescription: `The access controller denied access for the\n\t\toperation on a resource.`,\n\t\tHTTPStatusCode: http.StatusForbidden,\n\t})\n\n\t// ErrorCodeUnavailable provides a common error to report unavailability\n\t// of a service or endpoint.\n\tErrorCodeUnavailable = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:          \"UNAVAILABLE\",\n\t\tMessage:        \"service unavailable\",\n\t\tDescription:    \"Returned when a service is not available\",\n\t\tHTTPStatusCode: http.StatusServiceUnavailable,\n\t})\n\n\t// ErrorCodeTooManyRequests is returned if a client attempts too many\n\t// times to contact a service endpoint.\n\tErrorCodeTooManyRequests = Register(\"errcode\", ErrorDescriptor{\n\t\tValue:   \"TOOMANYREQUESTS\",\n\t\tMessage: \"too many requests\",\n\t\tDescription: `Returned when a client attempts to contact a\n\t\tservice too many times`,\n\t\tHTTPStatusCode: http.StatusTooManyRequests,\n\t})\n)\n\nvar nextCode = 1000\nvar registerLock sync.Mutex\n\n// Register will make the passed-in error known to the environment and\n// return a new ErrorCode\nfunc Register(group string, descriptor ErrorDescriptor) ErrorCode {\n\tregisterLock.Lock()\n\tdefer registerLock.Unlock()\n\n\tdescriptor.Code = ErrorCode(nextCode)\n\n\tif _, ok := idToDescriptors[descriptor.Value]; ok {\n\t\tpanic(fmt.Sprintf(\"ErrorValue %q is already registered\", descriptor.Value))\n\t}\n\tif _, ok := errorCodeToDescriptors[descriptor.Code]; ok {\n\t\tpanic(fmt.Sprintf(\"ErrorCode %v is already registered\", descriptor.Code))\n\t}\n\n\tgroupToDescriptors[group] = append(groupToDescriptors[group], descriptor)\n\terrorCodeToDescriptors[descriptor.Code] = descriptor\n\tidToDescriptors[descriptor.Value] = descriptor\n\n\tnextCode++\n\treturn descriptor.Code\n}\n\ntype byValue []ErrorDescriptor\n\nfunc (a byValue) Len() int           { return len(a) }\nfunc (a byValue) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }\nfunc (a byValue) Less(i, j int) bool { return a[i].Value < a[j].Value }\n\n// GetGroupNames returns the list of Error group names that are registered\nfunc GetGroupNames() []string {\n\tkeys := []string{}\n\n\tfor k := range groupToDescriptors {\n\t\tkeys = append(keys, k)\n\t}\n\tsort.Strings(keys)\n\treturn keys\n}\n\n// GetErrorCodeGroup returns the named group of error descriptors\nfunc GetErrorCodeGroup(name string) []ErrorDescriptor {\n\tdesc := groupToDescriptors[name]\n\tsort.Sort(byValue(desc))\n\treturn desc\n}\n\n// GetErrorAllDescriptors returns a slice of all ErrorDescriptors that are\n// registered, irrespective of what group they're in\nfunc GetErrorAllDescriptors() []ErrorDescriptor {\n\tresult := []ErrorDescriptor{}\n\n\tfor _, group := range GetGroupNames() {\n\t\tresult = append(result, GetErrorCodeGroup(group)...)\n\t}\n\tsort.Sort(byValue(result))\n\treturn result\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/descriptors.go",
    "content": "package v2\n\nimport (\n\t\"net/http\"\n\t\"regexp\"\n\n\t\"github.com/distribution/reference\"\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\t\"github.com/opencontainers/go-digest\"\n)\n\nvar (\n\tnameParameterDescriptor = ParameterDescriptor{\n\t\tName:        \"name\",\n\t\tType:        \"string\",\n\t\tFormat:      reference.NameRegexp.String(),\n\t\tRequired:    true,\n\t\tDescription: `Name of the target repository.`,\n\t}\n\n\treferenceParameterDescriptor = ParameterDescriptor{\n\t\tName:        \"reference\",\n\t\tType:        \"string\",\n\t\tFormat:      reference.TagRegexp.String(),\n\t\tRequired:    true,\n\t\tDescription: `Tag or digest of the target manifest.`,\n\t}\n\n\tuuidParameterDescriptor = ParameterDescriptor{\n\t\tName:        \"uuid\",\n\t\tType:        \"opaque\",\n\t\tRequired:    true,\n\t\tDescription: \"A uuid identifying the upload. This field can accept characters that match `[a-zA-Z0-9-_.=]+`.\",\n\t}\n\n\tdigestPathParameter = ParameterDescriptor{\n\t\tName:        \"digest\",\n\t\tType:        \"path\",\n\t\tRequired:    true,\n\t\tFormat:      digest.DigestRegexp.String(),\n\t\tDescription: `Digest of desired blob.`,\n\t}\n\n\thostHeader = ParameterDescriptor{\n\t\tName:        \"Host\",\n\t\tType:        \"string\",\n\t\tDescription: \"Standard HTTP Host Header. Should be set to the registry host.\",\n\t\tFormat:      \"<registry host>\",\n\t\tExamples:    []string{\"registry-1.docker.io\"},\n\t}\n\n\tauthHeader = ParameterDescriptor{\n\t\tName:        \"Authorization\",\n\t\tType:        \"string\",\n\t\tDescription: \"An RFC7235 compliant authorization header.\",\n\t\tFormat:      \"<scheme> <token>\",\n\t\tExamples:    []string{\"Bearer dGhpcyBpcyBhIGZha2UgYmVhcmVyIHRva2VuIQ==\"},\n\t}\n\n\tauthChallengeHeader = ParameterDescriptor{\n\t\tName:        \"WWW-Authenticate\",\n\t\tType:        \"string\",\n\t\tDescription: \"An RFC7235 compliant authentication challenge header.\",\n\t\tFormat:      `<scheme> realm=\"<realm>\", ...\"`,\n\t\tExamples: []string{\n\t\t\t`Bearer realm=\"https://auth.docker.com/\", service=\"registry.docker.com\", scopes=\"repository:library/ubuntu:pull\"`,\n\t\t},\n\t}\n\n\tcontentLengthZeroHeader = ParameterDescriptor{\n\t\tName:        \"Content-Length\",\n\t\tDescription: \"The `Content-Length` header must be zero and the body must be empty.\",\n\t\tType:        \"integer\",\n\t\tFormat:      \"0\",\n\t}\n\n\tdockerUploadUUIDHeader = ParameterDescriptor{\n\t\tName:        \"Docker-Upload-UUID\",\n\t\tDescription: \"Identifies the docker upload uuid for the current request.\",\n\t\tType:        \"uuid\",\n\t\tFormat:      \"<uuid>\",\n\t}\n\n\tdigestHeader = ParameterDescriptor{\n\t\tName:        \"Docker-Content-Digest\",\n\t\tDescription: \"Digest of the targeted content for the request.\",\n\t\tType:        \"digest\",\n\t\tFormat:      \"<digest>\",\n\t}\n\n\tlinkHeader = ParameterDescriptor{\n\t\tName:        \"Link\",\n\t\tType:        \"link\",\n\t\tDescription: \"RFC5988 compliant rel='next' with URL to next result set, if available\",\n\t\tFormat:      `<<url>?n=<last n value>&last=<last entry from response>>; rel=\"next\"`,\n\t}\n\n\tpaginationParameters = []ParameterDescriptor{\n\t\t{\n\t\t\tName:        \"n\",\n\t\t\tType:        \"integer\",\n\t\t\tDescription: \"Limit the number of entries in each response. It not present, all entries will be returned.\",\n\t\t\tFormat:      \"<integer>\",\n\t\t\tRequired:    false,\n\t\t},\n\t\t{\n\t\t\tName:        \"last\",\n\t\t\tType:        \"string\",\n\t\t\tDescription: \"Result set will include values lexically after last.\",\n\t\t\tFormat:      \"<integer>\",\n\t\t\tRequired:    false,\n\t\t},\n\t}\n\n\tunauthorizedResponseDescriptor = ResponseDescriptor{\n\t\tName:        \"Authentication Required\",\n\t\tStatusCode:  http.StatusUnauthorized,\n\t\tDescription: \"The client is not authenticated.\",\n\t\tHeaders: []ParameterDescriptor{\n\t\t\tauthChallengeHeader,\n\t\t\t{\n\t\t\t\tName:        \"Content-Length\",\n\t\t\t\tType:        \"integer\",\n\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\tFormat:      \"<length>\",\n\t\t\t},\n\t\t},\n\t\tBody: BodyDescriptor{\n\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\tFormat:      errorsBody,\n\t\t},\n\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\terrcode.ErrorCodeUnauthorized,\n\t\t},\n\t}\n\n\tinvalidPaginationResponseDescriptor = ResponseDescriptor{\n\t\tName:        \"Invalid pagination number\",\n\t\tDescription: \"The received parameter n was invalid in some way, as described by the error code. The client should resolve the issue and retry the request.\",\n\t\tStatusCode:  http.StatusBadRequest,\n\t\tBody: BodyDescriptor{\n\t\t\tContentType: \"application/json\",\n\t\t\tFormat:      errorsBody,\n\t\t},\n\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\tErrorCodePaginationNumberInvalid,\n\t\t},\n\t}\n\n\trepositoryNotFoundResponseDescriptor = ResponseDescriptor{\n\t\tName:        \"No Such Repository Error\",\n\t\tStatusCode:  http.StatusNotFound,\n\t\tDescription: \"The repository is not known to the registry.\",\n\t\tHeaders: []ParameterDescriptor{\n\t\t\t{\n\t\t\t\tName:        \"Content-Length\",\n\t\t\t\tType:        \"integer\",\n\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\tFormat:      \"<length>\",\n\t\t\t},\n\t\t},\n\t\tBody: BodyDescriptor{\n\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\tFormat:      errorsBody,\n\t\t},\n\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\tErrorCodeNameUnknown,\n\t\t},\n\t}\n\n\tdeniedResponseDescriptor = ResponseDescriptor{\n\t\tName:        \"Access Denied\",\n\t\tStatusCode:  http.StatusForbidden,\n\t\tDescription: \"The client does not have required access to the repository.\",\n\t\tHeaders: []ParameterDescriptor{\n\t\t\t{\n\t\t\t\tName:        \"Content-Length\",\n\t\t\t\tType:        \"integer\",\n\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\tFormat:      \"<length>\",\n\t\t\t},\n\t\t},\n\t\tBody: BodyDescriptor{\n\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\tFormat:      errorsBody,\n\t\t},\n\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\terrcode.ErrorCodeDenied,\n\t\t},\n\t}\n\n\ttooManyRequestsDescriptor = ResponseDescriptor{\n\t\tName:        \"Too Many Requests\",\n\t\tStatusCode:  http.StatusTooManyRequests,\n\t\tDescription: \"The client made too many requests within a time interval.\",\n\t\tHeaders: []ParameterDescriptor{\n\t\t\t{\n\t\t\t\tName:        \"Content-Length\",\n\t\t\t\tType:        \"integer\",\n\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\tFormat:      \"<length>\",\n\t\t\t},\n\t\t},\n\t\tBody: BodyDescriptor{\n\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\tFormat:      errorsBody,\n\t\t},\n\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\terrcode.ErrorCodeTooManyRequests,\n\t\t},\n\t}\n)\n\nconst (\n\tmanifestBody = `{\n   \"name\": <name>,\n   \"tag\": <tag>,\n   \"fsLayers\": [\n      {\n         \"blobSum\": \"<digest>\"\n      },\n      ...\n    ]\n   ],\n   \"history\": <v1 images>,\n   \"signature\": <JWS>\n}`\n\n\terrorsBody = `{\n\t\"errors:\" [\n\t    {\n            \"code\": <error code>,\n            \"message\": \"<error message>\",\n            \"detail\": ...\n        },\n        ...\n    ]\n}`\n)\n\n// APIDescriptor exports descriptions of the layout of the v2 registry API.\nvar APIDescriptor = struct {\n\t// RouteDescriptors provides a list of the routes available in the API.\n\tRouteDescriptors []RouteDescriptor\n}{\n\tRouteDescriptors: routeDescriptors,\n}\n\n// RouteDescriptor describes a route specified by name.\ntype RouteDescriptor struct {\n\t// Name is the name of the route, as specified in RouteNameXXX exports.\n\t// These names a should be considered a unique reference for a route. If\n\t// the route is registered with gorilla, this is the name that will be\n\t// used.\n\tName string\n\n\t// Path is a gorilla/mux-compatible regexp that can be used to match the\n\t// route. For any incoming method and path, only one route descriptor\n\t// should match.\n\tPath string\n\n\t// Entity should be a short, human-readalbe description of the object\n\t// targeted by the endpoint.\n\tEntity string\n\n\t// Description should provide an accurate overview of the functionality\n\t// provided by the route.\n\tDescription string\n\n\t// Methods should describe the various HTTP methods that may be used on\n\t// this route, including request and response formats.\n\tMethods []MethodDescriptor\n}\n\n// MethodDescriptor provides a description of the requests that may be\n// conducted with the target method.\ntype MethodDescriptor struct {\n\n\t// Method is an HTTP method, such as GET, PUT or POST.\n\tMethod string\n\n\t// Description should provide an overview of the functionality provided by\n\t// the covered method, suitable for use in documentation. Use of markdown\n\t// here is encouraged.\n\tDescription string\n\n\t// Requests is a slice of request descriptors enumerating how this\n\t// endpoint may be used.\n\tRequests []RequestDescriptor\n}\n\n// RequestDescriptor covers a particular set of headers and parameters that\n// can be carried out with the parent method. Its most helpful to have one\n// RequestDescriptor per API use case.\ntype RequestDescriptor struct {\n\t// Name provides a short identifier for the request, usable as a title or\n\t// to provide quick context for the particular request.\n\tName string\n\n\t// Description should cover the requests purpose, covering any details for\n\t// this particular use case.\n\tDescription string\n\n\t// Headers describes headers that must be used with the HTTP request.\n\tHeaders []ParameterDescriptor\n\n\t// PathParameters enumerate the parameterized path components for the\n\t// given request, as defined in the route's regular expression.\n\tPathParameters []ParameterDescriptor\n\n\t// QueryParameters provides a list of query parameters for the given\n\t// request.\n\tQueryParameters []ParameterDescriptor\n\n\t// Body describes the format of the request body.\n\tBody BodyDescriptor\n\n\t// Successes enumerates the possible responses that are considered to be\n\t// the result of a successful request.\n\tSuccesses []ResponseDescriptor\n\n\t// Failures covers the possible failures from this particular request.\n\tFailures []ResponseDescriptor\n}\n\n// ResponseDescriptor describes the components of an API response.\ntype ResponseDescriptor struct {\n\t// Name provides a short identifier for the response, usable as a title or\n\t// to provide quick context for the particular response.\n\tName string\n\n\t// Description should provide a brief overview of the role of the\n\t// response.\n\tDescription string\n\n\t// StatusCode specifies the status received by this particular response.\n\tStatusCode int\n\n\t// Headers covers any headers that may be returned from the response.\n\tHeaders []ParameterDescriptor\n\n\t// Fields describes any fields that may be present in the response.\n\tFields []ParameterDescriptor\n\n\t// ErrorCodes enumerates the error codes that may be returned along with\n\t// the response.\n\tErrorCodes []errcode.ErrorCode\n\n\t// Body describes the body of the response, if any.\n\tBody BodyDescriptor\n}\n\n// BodyDescriptor describes a request body and its expected content type. For\n// the most  part, it should be example json or some placeholder for body\n// data in documentation.\ntype BodyDescriptor struct {\n\tContentType string\n\tFormat      string\n}\n\n// ParameterDescriptor describes the format of a request parameter, which may\n// be a header, path parameter or query parameter.\ntype ParameterDescriptor struct {\n\t// Name is the name of the parameter, either of the path component or\n\t// query parameter.\n\tName string\n\n\t// Type specifies the type of the parameter, such as string, integer, etc.\n\tType string\n\n\t// Description provides a human-readable description of the parameter.\n\tDescription string\n\n\t// Required means the field is required when set.\n\tRequired bool\n\n\t// Format is a specifying the string format accepted by this parameter.\n\tFormat string\n\n\t// Regexp is a compiled regular expression that can be used to validate\n\t// the contents of the parameter.\n\tRegexp *regexp.Regexp\n\n\t// Examples provides multiple examples for the values that might be valid\n\t// for this parameter.\n\tExamples []string\n}\n\nvar routeDescriptors = []RouteDescriptor{\n\t{\n\t\tName:        RouteNameBase,\n\t\tPath:        \"/v2/\",\n\t\tEntity:      \"Base\",\n\t\tDescription: `Base V2 API route. Typically, this can be used for lightweight version checks and to validate registry authentication.`,\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Check that the endpoint implements Docker Registry API V2.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The API implements V2 protocol and is accessible.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The registry does not implement the V2 API.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tName:        RouteNameTags,\n\t\tPath:        \"/v2/{name:\" + reference.NameRegexp.String() + \"}/tags/list\",\n\t\tEntity:      \"Tags\",\n\t\tDescription: \"Retrieve information about tags.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Fetch the tags under the repository identified by `name`.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Tags\",\n\t\t\t\t\t\tDescription: \"Return all tags for the repository\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t\tDescription: \"A list of tags for the named repository.\",\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat: `{\n    \"name\": <name>,\n    \"tags\": [\n        <tag>,\n        ...\n    ]\n}`,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:            \"Tags Paginated\",\n\t\t\t\t\t\tDescription:     \"Return a portion of the tags for the specified repository.\",\n\t\t\t\t\t\tPathParameters:  []ParameterDescriptor{nameParameterDescriptor},\n\t\t\t\t\t\tQueryParameters: paginationParameters,\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t\tDescription: \"A list of tags for the named repository.\",\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tlinkHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat: `{\n    \"name\": <name>,\n    \"tags\": [\n        <tag>,\n        ...\n    ],\n}`,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\tinvalidPaginationResponseDescriptor,\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tName:        RouteNameManifest,\n\t\tPath:        \"/v2/{name:\" + reference.NameRegexp.String() + \"}/manifests/{reference:\" + reference.TagRegexp.String() + \"|\" + digest.DigestRegexp.String() + \"}\",\n\t\tEntity:      \"Manifest\",\n\t\tDescription: \"Create, update, delete and retrieve manifests.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Fetch the manifest identified by `name` and `reference` where `reference` can be a tag or digest. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\treferenceParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The manifest identified by `name` and `reference`. The contents can be used to identify and resolve resources required to run the specified image.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"<media type of manifest>\",\n\t\t\t\t\t\t\t\t\tFormat:      manifestBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The name or reference was invalid.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeTagInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"PUT\",\n\t\t\t\tDescription: \"Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\treferenceParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\tContentType: \"<media type of manifest>\",\n\t\t\t\t\t\t\tFormat:      manifestBody,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The manifest has been accepted by the registry and is stored under the specified `name` and `tag`.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusCreated,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The canonical location url of the uploaded manifest.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<url>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Invalid Manifest\",\n\t\t\t\t\t\t\t\tDescription: \"The received manifest was invalid in some way, as described by the error codes. The client should resolve the issue and retry the request.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeTagInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeManifestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeManifestUnverified,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Missing Layer(s)\",\n\t\t\t\t\t\t\t\tDescription: \"One or more layers may be missing during a manifest upload. If so, the missing layers will be enumerated in the error response.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat: `{\n    \"errors:\" [{\n            \"code\": \"BLOB_UNKNOWN\",\n            \"message\": \"blob unknown to registry\",\n            \"detail\": {\n                \"digest\": \"<digest>\"\n            }\n        },\n        ...\n    ]\n}`,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Not allowed\",\n\t\t\t\t\t\t\t\tDescription: \"Manifest put is not allowed because the registry is configured as a pull-through cache or for some other reason\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusMethodNotAllowed,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"DELETE\",\n\t\t\t\tDescription: \"Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\treferenceParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode: http.StatusAccepted,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Invalid Name or Reference\",\n\t\t\t\t\t\t\t\tDescription: \"The specified `name` or `reference` were invalid and the delete was unable to proceed.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeTagInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Unknown Manifest\",\n\t\t\t\t\t\t\t\tDescription: \"The specified `name` or `reference` are unknown to the registry and the delete was unable to proceed. Clients can assume the manifest was already deleted if this response is returned.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameUnknown,\n\t\t\t\t\t\t\t\t\tErrorCodeManifestUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Not allowed\",\n\t\t\t\t\t\t\t\tDescription: \"Manifest delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusMethodNotAllowed,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\n\t{\n\t\tName:        RouteNameBlob,\n\t\tPath:        \"/v2/{name:\" + reference.NameRegexp.String() + \"}/blobs/{digest:\" + digest.DigestRegexp.String() + \"}\",\n\t\tEntity:      \"Blob\",\n\t\tDescription: \"Operations on blobs identified by `name` and `digest`. Used to fetch or delete layers by digest.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Retrieve the blob from the registry identified by `digest`. A `HEAD` request can also be issued to this endpoint to obtain resource information without receiving all data.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tName: \"Fetch Blob\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tdigestPathParameter,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob identified by `digest` is available. The blob content will be present in the body of the request.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The length of the requested blob content.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/octet-stream\",\n\t\t\t\t\t\t\t\t\tFormat:      \"<blob binary data>\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob identified by `digest` is available at the provided location.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusTemporaryRedirect,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The location where the layer should be accessible.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<blob location>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob, identified by `name` and `digest`, is unknown to the registry.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameUnknown,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Fetch Blob Part\",\n\t\t\t\t\t\tDescription: \"This endpoint may also support RFC7233 compliant range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is returned, range requests can be used to fetch partial content.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Range\",\n\t\t\t\t\t\t\t\tType:        \"string\",\n\t\t\t\t\t\t\t\tDescription: \"HTTP Range header specifying blob chunk.\",\n\t\t\t\t\t\t\t\tFormat:      \"bytes=<start>-<end>\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tdigestPathParameter,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob identified by `digest` is available. The specified chunk of blob content will be present in the body of the request.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusPartialContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The length of the requested blob chunk.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Range\",\n\t\t\t\t\t\t\t\t\t\tType:        \"byte range\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Content range of blob chunk.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"bytes <start>-<end>/<size>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/octet-stream\",\n\t\t\t\t\t\t\t\t\tFormat:      \"<blob binary data>\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was a problem with the request that needs to be addressed by the client, such as an invalid `name` or `tag`.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode: http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameUnknown,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The range specification cannot be satisfied for the requested content. This can happen when the range is not formatted correctly or if the range is outside of the valid size of the content.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusRequestedRangeNotSatisfiable,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"DELETE\",\n\t\t\t\tDescription: \"Delete the blob identified by `name` and `digest`\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tdigestPathParameter,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode: http.StatusAccepted,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"0\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"0\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:       \"Invalid Name or Digest\",\n\t\t\t\t\t\t\t\tStatusCode: http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob, identified by `name` and `digest`, is unknown to the registry.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameUnknown,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"Blob delete is not allowed because the registry is configured as a pull-through cache or `delete` has been disabled\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusMethodNotAllowed,\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t// TODO(stevvooe): We may want to add a PUT request here to\n\t\t\t// kickoff an upload of a blob, integrated with the blob upload\n\t\t\t// API.\n\t\t},\n\t},\n\n\t{\n\t\tName:        RouteNameBlobUpload,\n\t\tPath:        \"/v2/{name:\" + reference.NameRegexp.String() + \"}/blobs/uploads/\",\n\t\tEntity:      \"Initiate Blob Upload\",\n\t\tDescription: \"Initiate a blob upload. This endpoint can be used to create resumable uploads or monolithic uploads.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"POST\",\n\t\t\t\tDescription: \"Initiate a resumable blob upload. If successful, an upload location will be provided to complete the upload. Optionally, if the `digest` parameter is present, the request body will be used to complete the upload in a single request.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Initiate Monolithic Blob Upload\",\n\t\t\t\t\t\tDescription: \"Upload a blob identified by the `digest` parameter in single request. This upload will not be resumable unless a recoverable error is returned.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:   \"Content-Length\",\n\t\t\t\t\t\t\t\tType:   \"integer\",\n\t\t\t\t\t\t\t\tFormat: \"<length of blob>\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tQueryParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"digest\",\n\t\t\t\t\t\t\t\tType:        \"query\",\n\t\t\t\t\t\t\t\tFormat:      \"<digest>\",\n\t\t\t\t\t\t\t\tRegexp:      digest.DigestRegexp,\n\t\t\t\t\t\t\t\tDescription: `Digest of uploaded blob. If present, the upload will be completed, in a single request, with contents of the request body as the resulting blob.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\tContentType: \"application/octect-stream\",\n\t\t\t\t\t\t\tFormat:      \"<binary data>\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob has been created in the registry and is available at the provided location.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusCreated,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:   \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:   \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat: \"<blob location>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:       \"Invalid Name or Digest\",\n\t\t\t\t\t\t\t\tStatusCode: http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Not allowed\",\n\t\t\t\t\t\t\t\tDescription: \"Blob upload is not allowed because the registry is configured as a pull-through cache or for some other reason\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusMethodNotAllowed,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Initiate Resumable Blob Upload\",\n\t\t\t\t\t\tDescription: \"Initiate a resumable blob upload with an empty request body.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload has been created. The `Location` header must be used to complete the upload. The response should be identical to a `GET` request on the contents of the returned `Location` header.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusAccepted,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"/v2/<name>/blobs/uploads/<uuid>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The location of the created upload. Clients should use the contents verbatim to complete the upload, adding parameters where required.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Range\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"0-0\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Range header indicating the progress of the upload. When starting an upload, it will return an empty range, since no content has been received.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:       \"Invalid Name or Digest\",\n\t\t\t\t\t\t\t\tStatusCode: http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Mount Blob\",\n\t\t\t\t\t\tDescription: \"Mount a blob identified by the `mount` parameter from another repository.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tQueryParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"mount\",\n\t\t\t\t\t\t\t\tType:        \"query\",\n\t\t\t\t\t\t\t\tFormat:      \"<digest>\",\n\t\t\t\t\t\t\t\tRegexp:      digest.DigestRegexp,\n\t\t\t\t\t\t\t\tDescription: `Digest of blob to mount from the source repository.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"from\",\n\t\t\t\t\t\t\t\tType:        \"query\",\n\t\t\t\t\t\t\t\tFormat:      \"<repository name>\",\n\t\t\t\t\t\t\t\tRegexp:      reference.NameRegexp,\n\t\t\t\t\t\t\t\tDescription: `Name of the source repository.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The blob has been mounted in the repository and is available at the provided location.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusCreated,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:   \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:   \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat: \"<blob location>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:       \"Invalid Name or Digest\",\n\t\t\t\t\t\t\t\tStatusCode: http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Not allowed\",\n\t\t\t\t\t\t\t\tDescription: \"Blob mount is not allowed because the registry is configured as a pull-through cache or for some other reason\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusMethodNotAllowed,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\n\t{\n\t\tName:        RouteNameBlobUploadChunk,\n\t\tPath:        \"/v2/{name:\" + reference.NameRegexp.String() + \"}/blobs/uploads/{uuid:[a-zA-Z0-9-_.=]+}\",\n\t\tEntity:      \"Blob Upload\",\n\t\tDescription: \"Interact with blob uploads. Clients should never assemble URLs for this endpoint and should only take it through the `Location` header on related API requests. The `Location` header and its parameters should be preserved by clients, using the latest value returned via upload related API calls.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Retrieve status of upload identified by `uuid`. The primary purpose of this endpoint is to resolve the current status of a resumable upload.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tDescription: \"Retrieve the progress of the current upload, as reported by the `Range` header.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tuuidParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Upload Progress\",\n\t\t\t\t\t\t\t\tDescription: \"The upload is known and in progress. The last received offset is available in the `Range` header.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNoContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Range\",\n\t\t\t\t\t\t\t\t\t\tType:        \"header\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"0-<offset>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Range indicating the current progress of the upload.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was an error processing the upload and it must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload is unknown to the registry. The upload must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"PATCH\",\n\t\t\t\tDescription: \"Upload a chunk of data for the specified upload.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Stream upload\",\n\t\t\t\t\t\tDescription: \"Upload a stream of data to upload without completing the upload.\",\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tuuidParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\tContentType: \"application/octet-stream\",\n\t\t\t\t\t\t\tFormat:      \"<binary data>\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Data Accepted\",\n\t\t\t\t\t\t\t\tDescription: \"The stream of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNoContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"/v2/<name>/blobs/uploads/<uuid>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Range\",\n\t\t\t\t\t\t\t\t\t\tType:        \"header\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"0-<offset>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Range indicating the current progress of the upload.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was an error processing the upload and it must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload is unknown to the registry. The upload must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Chunked upload\",\n\t\t\t\t\t\tDescription: \"Upload a chunk of data to specified upload without completing the upload. The data will be uploaded to the specified Content Range.\",\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tuuidParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Content-Range\",\n\t\t\t\t\t\t\t\tType:        \"header\",\n\t\t\t\t\t\t\t\tFormat:      \"<start of range>-<end of range, inclusive>\",\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\tDescription: \"Range of bytes identifying the desired block of content represented by the body. Start must the end offset retrieved via status check plus one. Note that this is a non-standard use of the `Content-Range` header.\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\tFormat:      \"<length of chunk>\",\n\t\t\t\t\t\t\t\tDescription: \"Length of the chunk being uploaded, corresponding the length of the request body.\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\tContentType: \"application/octet-stream\",\n\t\t\t\t\t\t\tFormat:      \"<binary chunk>\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Chunk Accepted\",\n\t\t\t\t\t\t\t\tDescription: \"The chunk of data has been accepted and the current progress is available in the range header. The updated upload location is available in the `Location` header.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNoContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"/v2/<name>/blobs/uploads/<uuid>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The location of the upload. Clients should assume this changes after each request. Clients should use the contents verbatim to complete the upload, adding parameters where required.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Range\",\n\t\t\t\t\t\t\t\t\t\tType:        \"header\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"0-<offset>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Range indicating the current progress of the upload.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdockerUploadUUIDHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was an error processing the upload and it must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload is unknown to the registry. The upload must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The `Content-Range` specification cannot be accepted, either because it does not overlap with the current progress or it is invalid.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusRequestedRangeNotSatisfiable,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"PUT\",\n\t\t\t\tDescription: \"Complete the upload specified by `uuid`, optionally appending the body as the final chunk.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tDescription: \"Complete the upload, providing all the data in the body, if necessary. A request without a body will just complete the upload with previously uploaded content.\",\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\tFormat:      \"<length of data>\",\n\t\t\t\t\t\t\t\tDescription: \"Length of the data being uploaded, corresponding to the length of the request body. May be zero if no data is provided.\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tuuidParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tQueryParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"digest\",\n\t\t\t\t\t\t\t\tType:        \"string\",\n\t\t\t\t\t\t\t\tFormat:      \"<digest>\",\n\t\t\t\t\t\t\t\tRegexp:      digest.DigestRegexp,\n\t\t\t\t\t\t\t\tRequired:    true,\n\t\t\t\t\t\t\t\tDescription: `Digest of uploaded blob.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\tContentType: \"application/octet-stream\",\n\t\t\t\t\t\t\tFormat:      \"<binary data>\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Upload Complete\",\n\t\t\t\t\t\t\t\tDescription: \"The upload has been completed and accepted by the registry. The canonical location will be available in the `Location` header.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNoContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Location\",\n\t\t\t\t\t\t\t\t\t\tType:        \"url\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<blob location>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"The canonical location of the blob for retrieval\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Range\",\n\t\t\t\t\t\t\t\t\t\tType:        \"header\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<start of range>-<end of range, inclusive>\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Range of bytes identifying the desired block of content represented by the body. Start must match the end of offset retrieved via status check. Note that this is a non-standard use of the `Content-Range` header.\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t\tdigestHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"There was an error processing the upload and it must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeDigestInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadInvalid,\n\t\t\t\t\t\t\t\t\terrcode.ErrorCodeUnsupported,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload is unknown to the registry. The upload must be restarted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tMethod:      \"DELETE\",\n\t\t\t\tDescription: \"Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tDescription: \"Cancel the upload specified by `uuid`.\",\n\t\t\t\t\t\tPathParameters: []ParameterDescriptor{\n\t\t\t\t\t\t\tnameParameterDescriptor,\n\t\t\t\t\t\t\tuuidParameterDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\thostHeader,\n\t\t\t\t\t\t\tauthHeader,\n\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tName:        \"Upload Deleted\",\n\t\t\t\t\t\t\t\tDescription: \"The upload has been successfully deleted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNoContent,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\tcontentLengthZeroHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"An error was encountered processing the delete. The client may ignore this error.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusBadRequest,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeNameInvalid,\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadInvalid,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"The upload is unknown to the registry. The client may ignore this error and assume the upload has been deleted.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusNotFound,\n\t\t\t\t\t\t\t\tErrorCodes: []errcode.ErrorCode{\n\t\t\t\t\t\t\t\t\tErrorCodeBlobUploadUnknown,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat:      errorsBody,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tunauthorizedResponseDescriptor,\n\t\t\t\t\t\t\trepositoryNotFoundResponseDescriptor,\n\t\t\t\t\t\t\tdeniedResponseDescriptor,\n\t\t\t\t\t\t\ttooManyRequestsDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tName:        RouteNameCatalog,\n\t\tPath:        \"/v2/_catalog\",\n\t\tEntity:      \"Catalog\",\n\t\tDescription: \"List a set of available repositories in the local registry cluster. Does not provide any indication of what may be available upstream. Applications can only determine if a repository is available but not if it is not available.\",\n\t\tMethods: []MethodDescriptor{\n\t\t\t{\n\t\t\t\tMethod:      \"GET\",\n\t\t\t\tDescription: \"Retrieve a sorted, json list of repositories available in the registry.\",\n\t\t\t\tRequests: []RequestDescriptor{\n\t\t\t\t\t{\n\t\t\t\t\t\tName:        \"Catalog Fetch\",\n\t\t\t\t\t\tDescription: \"Request an unabridged list of repositories available.  The implementation may impose a maximum limit and return a partial set with pagination links.\",\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDescription: \"Returns the unabridged list of repositories as a json response.\",\n\t\t\t\t\t\t\t\tStatusCode:  http.StatusOK,\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat: `{\n\t\"repositories\": [\n\t\t<name>,\n\t\t...\n\t]\n}`,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tName:            \"Catalog Fetch Paginated\",\n\t\t\t\t\t\tDescription:     \"Return the specified portion of repositories.\",\n\t\t\t\t\t\tQueryParameters: paginationParameters,\n\t\t\t\t\t\tSuccesses: []ResponseDescriptor{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tStatusCode: http.StatusOK,\n\t\t\t\t\t\t\t\tBody: BodyDescriptor{\n\t\t\t\t\t\t\t\t\tContentType: \"application/json; charset=utf-8\",\n\t\t\t\t\t\t\t\t\tFormat: `{\n\t\"repositories\": [\n\t\t<name>,\n\t\t...\n\t]\n\t\"next\": \"<url>?last=<name>&n=<last value of n>\"\n}`,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tHeaders: []ParameterDescriptor{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tName:        \"Content-Length\",\n\t\t\t\t\t\t\t\t\t\tType:        \"integer\",\n\t\t\t\t\t\t\t\t\t\tDescription: \"Length of the JSON response body.\",\n\t\t\t\t\t\t\t\t\t\tFormat:      \"<length>\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tlinkHeader,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tFailures: []ResponseDescriptor{\n\t\t\t\t\t\t\tinvalidPaginationResponseDescriptor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n}\n\nvar routeDescriptorsMap map[string]RouteDescriptor\n\nfunc init() {\n\trouteDescriptorsMap = make(map[string]RouteDescriptor, len(routeDescriptors))\n\n\tfor _, descriptor := range routeDescriptors {\n\t\trouteDescriptorsMap[descriptor.Name] = descriptor\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/doc.go",
    "content": "// Package v2 describes routes, urls and the error codes used in the Docker\n// Registry JSON HTTP API V2. In addition to declarations, descriptors are\n// provided for routes and error codes that can be used for implementation and\n// automatically generating documentation.\n//\n// Definitions here are considered to be locked down for the V2 registry api.\n// Any changes must be considered carefully and should not proceed without a\n// change proposal in docker core.\npackage v2\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/errors.go",
    "content": "package v2\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n)\n\nconst errGroup = \"registry.api.v2\"\n\nvar (\n\t// ErrorCodeDigestInvalid is returned when uploading a blob if the\n\t// provided digest does not match the blob contents.\n\tErrorCodeDigestInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"DIGEST_INVALID\",\n\t\tMessage: \"provided digest did not match uploaded content\",\n\t\tDescription: `When a blob is uploaded, the registry will check that\n\t\tthe content matches the digest provided by the client. The error may\n\t\tinclude a detail structure with the key \"digest\", including the\n\t\tinvalid digest string. This error may also be returned when a manifest\n\t\tincludes an invalid layer digest.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeSizeInvalid is returned when uploading a blob if the provided\n\tErrorCodeSizeInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"SIZE_INVALID\",\n\t\tMessage: \"provided length did not match content length\",\n\t\tDescription: `When a layer is uploaded, the provided size will be\n\t\tchecked against the uploaded content. If they do not match, this error\n\t\twill be returned.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeNameInvalid is returned when the name in the manifest does not\n\t// match the provided name.\n\tErrorCodeNameInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"NAME_INVALID\",\n\t\tMessage: \"invalid repository name\",\n\t\tDescription: `Invalid repository name encountered either during\n\t\tmanifest validation or any API operation.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeTagInvalid is returned when the tag in the manifest does not\n\t// match the provided tag.\n\tErrorCodeTagInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"TAG_INVALID\",\n\t\tMessage: \"manifest tag did not match URI\",\n\t\tDescription: `During a manifest upload, if the tag in the manifest\n\t\tdoes not match the uri tag, this error will be returned.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeNameUnknown when the repository name is not known.\n\tErrorCodeNameUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"NAME_UNKNOWN\",\n\t\tMessage: \"repository name not known to registry\",\n\t\tDescription: `This is returned if the name used during an operation is\n\t\tunknown to the registry.`,\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeManifestUnknown returned when image manifest is unknown.\n\tErrorCodeManifestUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"MANIFEST_UNKNOWN\",\n\t\tMessage: \"manifest unknown\",\n\t\tDescription: `This error is returned when the manifest, identified by\n\t\tname and tag is unknown to the repository.`,\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeManifestInvalid returned when an image manifest is invalid,\n\t// typically during a PUT operation. This error encompasses all errors\n\t// encountered during manifest validation that aren't signature errors.\n\tErrorCodeManifestInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"MANIFEST_INVALID\",\n\t\tMessage: \"manifest invalid\",\n\t\tDescription: `During upload, manifests undergo several checks ensuring\n\t\tvalidity. If those checks fail, this error may be returned, unless a\n\t\tmore specific error is included. The detail will contain information\n\t\tthe failed validation.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeManifestUnverified is returned when the manifest fails\n\t// signature verification.\n\tErrorCodeManifestUnverified = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"MANIFEST_UNVERIFIED\",\n\t\tMessage: \"manifest failed signature verification\",\n\t\tDescription: `During manifest upload, if the manifest fails signature\n\t\tverification, this error will be returned.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeManifestBlobUnknown is returned when a manifest blob is\n\t// unknown to the registry.\n\tErrorCodeManifestBlobUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"MANIFEST_BLOB_UNKNOWN\",\n\t\tMessage: \"blob unknown to registry\",\n\t\tDescription: `This error may be returned when a manifest blob is \n\t\tunknown to the registry.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n\n\t// ErrorCodeBlobUnknown is returned when a blob is unknown to the\n\t// registry. This can happen when the manifest references a nonexistent\n\t// layer or the result is not found by a blob fetch.\n\tErrorCodeBlobUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"BLOB_UNKNOWN\",\n\t\tMessage: \"blob unknown to registry\",\n\t\tDescription: `This error may be returned when a blob is unknown to the\n\t\tregistry in a specified repository. This can be returned with a\n\t\tstandard get or if a manifest references an unknown layer during\n\t\tupload.`,\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeBlobUploadUnknown is returned when an upload is unknown.\n\tErrorCodeBlobUploadUnknown = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"BLOB_UPLOAD_UNKNOWN\",\n\t\tMessage: \"blob upload unknown to registry\",\n\t\tDescription: `If a blob upload has been cancelled or was never\n\t\tstarted, this error code may be returned.`,\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\t// ErrorCodeBlobUploadInvalid is returned when an upload is invalid.\n\tErrorCodeBlobUploadInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"BLOB_UPLOAD_INVALID\",\n\t\tMessage: \"blob upload invalid\",\n\t\tDescription: `The blob upload encountered an error and can no\n\t\tlonger proceed.`,\n\t\tHTTPStatusCode: http.StatusNotFound,\n\t})\n\n\tErrorCodePaginationNumberInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{\n\t\tValue:   \"PAGINATION_NUMBER_INVALID\",\n\t\tMessage: \"invalid number of results requested\",\n\t\tDescription: `Returned when the \"n\" parameter (number of results\n\t\tto return) is not an integer, \"n\" is negative or \"n\" is bigger than\n\t\tthe maximum allowed.`,\n\t\tHTTPStatusCode: http.StatusBadRequest,\n\t})\n)\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/headerparser.go",
    "content": "package v2\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\t\"unicode\"\n)\n\nvar (\n\t// according to rfc7230\n\treToken            = regexp.MustCompile(`^[^\"(),/:;<=>?@[\\]{}[:space:][:cntrl:]]+`)\n\treQuotedValue      = regexp.MustCompile(`^[^\\\\\"]+`)\n\treEscapedCharacter = regexp.MustCompile(`^[[:blank:][:graph:]]`)\n)\n\n// parseForwardedHeader is a benevolent parser of Forwarded header defined in rfc7239. The header contains\n// a comma-separated list of forwarding key-value pairs. Each list element is set by single proxy. The\n// function parses only the first element of the list, which is set by the very first proxy. It returns a map\n// of corresponding key-value pairs and an unparsed slice of the input string.\n//\n// Examples of Forwarded header values:\n//\n//  1. Forwarded: For=192.0.2.43; Proto=https,For=\"[2001:db8:cafe::17]\",For=unknown\n//  2. Forwarded: for=\"192.0.2.43:443\"; host=\"registry.example.org\", for=\"10.10.05.40:80\"\n//\n// The first will be parsed into {\"for\": \"192.0.2.43\", \"proto\": \"https\"} while the second into\n// {\"for\": \"192.0.2.43:443\", \"host\": \"registry.example.org\"}.\nfunc parseForwardedHeader(forwarded string) (map[string]string, string, error) {\n\t// Following are states of forwarded header parser. Any state could transition to a failure.\n\tconst (\n\t\t// terminating state; can transition to Parameter\n\t\tstateElement = iota\n\t\t// terminating state; can transition to KeyValueDelimiter\n\t\tstateParameter\n\t\t// can transition to Value\n\t\tstateKeyValueDelimiter\n\t\t// can transition to one of { QuotedValue, PairEnd }\n\t\tstateValue\n\t\t// can transition to one of { EscapedCharacter, PairEnd }\n\t\tstateQuotedValue\n\t\t// can transition to one of { QuotedValue }\n\t\tstateEscapedCharacter\n\t\t// terminating state; can transition to one of { Parameter, Element }\n\t\tstatePairEnd\n\t)\n\n\tvar (\n\t\tparameter string\n\t\tvalue     string\n\t\tparse     = forwarded[:]\n\t\tres       = map[string]string{}\n\t\tstate     = stateElement\n\t)\n\nLoop:\n\tfor {\n\t\t// skip spaces unless in quoted value\n\t\tif state != stateQuotedValue && state != stateEscapedCharacter {\n\t\t\tparse = strings.TrimLeftFunc(parse, unicode.IsSpace)\n\t\t}\n\n\t\tif len(parse) == 0 {\n\t\t\tif state != stateElement && state != statePairEnd && state != stateParameter {\n\t\t\t\treturn nil, parse, fmt.Errorf(\"unexpected end of input\")\n\t\t\t}\n\t\t\t// terminating\n\t\t\tbreak\n\t\t}\n\n\t\tswitch state {\n\t\t// terminate at list element delimiter\n\t\tcase stateElement:\n\t\t\tif parse[0] == ',' {\n\t\t\t\tparse = parse[1:]\n\t\t\t\tbreak Loop\n\t\t\t}\n\t\t\tstate = stateParameter\n\n\t\t// parse parameter (the key of key-value pair)\n\t\tcase stateParameter:\n\t\t\tmatch := reToken.FindString(parse)\n\t\t\tif len(match) == 0 {\n\t\t\t\treturn nil, parse, fmt.Errorf(\"failed to parse token at position %d\", len(forwarded)-len(parse))\n\t\t\t}\n\t\t\tparameter = strings.ToLower(match)\n\t\t\tparse = parse[len(match):]\n\t\t\tstate = stateKeyValueDelimiter\n\n\t\t// parse '='\n\t\tcase stateKeyValueDelimiter:\n\t\t\tif parse[0] != '=' {\n\t\t\t\treturn nil, parse, fmt.Errorf(\"expected '=', not '%c' at position %d\", parse[0], len(forwarded)-len(parse))\n\t\t\t}\n\t\t\tparse = parse[1:]\n\t\t\tstate = stateValue\n\n\t\t// parse value or quoted value\n\t\tcase stateValue:\n\t\t\tif parse[0] == '\"' {\n\t\t\t\tparse = parse[1:]\n\t\t\t\tstate = stateQuotedValue\n\t\t\t} else {\n\t\t\t\tvalue = reToken.FindString(parse)\n\t\t\t\tif len(value) == 0 {\n\t\t\t\t\treturn nil, parse, fmt.Errorf(\"failed to parse value at position %d\", len(forwarded)-len(parse))\n\t\t\t\t}\n\t\t\t\tif _, exists := res[parameter]; exists {\n\t\t\t\t\treturn nil, parse, fmt.Errorf(\"duplicate parameter %q at position %d\", parameter, len(forwarded)-len(parse))\n\t\t\t\t}\n\t\t\t\tres[parameter] = value\n\t\t\t\tparse = parse[len(value):]\n\t\t\t\tvalue = \"\"\n\t\t\t\tstate = statePairEnd\n\t\t\t}\n\n\t\t// parse a part of quoted value until the first backslash\n\t\tcase stateQuotedValue:\n\t\t\tmatch := reQuotedValue.FindString(parse)\n\t\t\tvalue += match\n\t\t\tparse = parse[len(match):]\n\t\t\tswitch {\n\t\t\tcase len(parse) == 0:\n\t\t\t\treturn nil, parse, fmt.Errorf(\"unterminated quoted string\")\n\t\t\tcase parse[0] == '\"':\n\t\t\t\tres[parameter] = value\n\t\t\t\tvalue = \"\"\n\t\t\t\tparse = parse[1:]\n\t\t\t\tstate = statePairEnd\n\t\t\tcase parse[0] == '\\\\':\n\t\t\t\tparse = parse[1:]\n\t\t\t\tstate = stateEscapedCharacter\n\t\t\t}\n\n\t\t// parse escaped character in a quoted string, ignore the backslash\n\t\t// transition back to QuotedValue state\n\t\tcase stateEscapedCharacter:\n\t\t\tc := reEscapedCharacter.FindString(parse)\n\t\t\tif len(c) == 0 {\n\t\t\t\treturn nil, parse, fmt.Errorf(\"invalid escape sequence at position %d\", len(forwarded)-len(parse)-1)\n\t\t\t}\n\t\t\tvalue += c\n\t\t\tparse = parse[1:]\n\t\t\tstate = stateQuotedValue\n\n\t\t// expect either a new key-value pair, new list or end of input\n\t\tcase statePairEnd:\n\t\t\tswitch parse[0] {\n\t\t\tcase ';':\n\t\t\t\tparse = parse[1:]\n\t\t\t\tstate = stateParameter\n\t\t\tcase ',':\n\t\t\t\tstate = stateElement\n\t\t\tdefault:\n\t\t\t\treturn nil, parse, fmt.Errorf(\"expected ',' or ';', not %c at position %d\", parse[0], len(forwarded)-len(parse))\n\t\t\t}\n\t\t}\n\t}\n\n\treturn res, parse, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/routes.go",
    "content": "package v2\n\nimport \"github.com/gorilla/mux\"\n\n// The following are definitions of the name under which all V2 routes are\n// registered. These symbols can be used to look up a route based on the name.\nconst (\n\tRouteNameBase            = \"base\"\n\tRouteNameManifest        = \"manifest\"\n\tRouteNameTags            = \"tags\"\n\tRouteNameBlob            = \"blob\"\n\tRouteNameBlobUpload      = \"blob-upload\"\n\tRouteNameBlobUploadChunk = \"blob-upload-chunk\"\n\tRouteNameCatalog         = \"catalog\"\n)\n\n// Router builds a gorilla router with named routes for the various API\n// methods. This can be used directly by both server implementations and\n// clients.\nfunc Router() *mux.Router {\n\treturn RouterWithPrefix(\"\")\n}\n\n// RouterWithPrefix builds a gorilla router with a configured prefix\n// on all routes.\nfunc RouterWithPrefix(prefix string) *mux.Router {\n\trootRouter := mux.NewRouter()\n\trouter := rootRouter\n\tif prefix != \"\" {\n\t\trouter = router.PathPrefix(prefix).Subrouter()\n\t}\n\n\trouter.StrictSlash(true)\n\n\tfor _, descriptor := range routeDescriptors {\n\t\trouter.Path(descriptor.Path).Name(descriptor.Name)\n\t}\n\n\treturn rootRouter\n}\n"
  },
  {
    "path": "vendor/github.com/docker/distribution/registry/api/v2/urls.go",
    "content": "package v2\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/distribution/reference\"\n\t\"github.com/gorilla/mux\"\n)\n\n// URLBuilder creates registry API urls from a single base endpoint. It can be\n// used to create urls for use in a registry client or server.\n//\n// All urls will be created from the given base, including the api version.\n// For example, if a root of \"/foo/\" is provided, urls generated will be fall\n// under \"/foo/v2/...\". Most application will only provide a schema, host and\n// port, such as \"https://localhost:5000/\".\ntype URLBuilder struct {\n\troot     *url.URL // url root (ie http://localhost/)\n\trouter   *mux.Router\n\trelative bool\n}\n\n// NewURLBuilder creates a URLBuilder with provided root url object.\nfunc NewURLBuilder(root *url.URL, relative bool) *URLBuilder {\n\treturn &URLBuilder{\n\t\troot:     root,\n\t\trouter:   Router(),\n\t\trelative: relative,\n\t}\n}\n\n// NewURLBuilderFromString workes identically to NewURLBuilder except it takes\n// a string argument for the root, returning an error if it is not a valid\n// url.\nfunc NewURLBuilderFromString(root string, relative bool) (*URLBuilder, error) {\n\tu, err := url.Parse(root)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn NewURLBuilder(u, relative), nil\n}\n\n// NewURLBuilderFromRequest uses information from an *http.Request to\n// construct the root url.\nfunc NewURLBuilderFromRequest(r *http.Request, relative bool) *URLBuilder {\n\tvar (\n\t\tscheme = \"http\"\n\t\thost   = r.Host\n\t)\n\n\tif r.TLS != nil {\n\t\tscheme = \"https\"\n\t} else if len(r.URL.Scheme) > 0 {\n\t\tscheme = r.URL.Scheme\n\t}\n\n\t// Handle fowarded headers\n\t// Prefer \"Forwarded\" header as defined by rfc7239 if given\n\t// see https://tools.ietf.org/html/rfc7239\n\tif forwarded := r.Header.Get(\"Forwarded\"); len(forwarded) > 0 {\n\t\tforwardedHeader, _, err := parseForwardedHeader(forwarded)\n\t\tif err == nil {\n\t\t\tif fproto := forwardedHeader[\"proto\"]; len(fproto) > 0 {\n\t\t\t\tscheme = fproto\n\t\t\t}\n\t\t\tif fhost := forwardedHeader[\"host\"]; len(fhost) > 0 {\n\t\t\t\thost = fhost\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif forwardedProto := r.Header.Get(\"X-Forwarded-Proto\"); len(forwardedProto) > 0 {\n\t\t\tscheme = forwardedProto\n\t\t}\n\t\tif forwardedHost := r.Header.Get(\"X-Forwarded-Host\"); len(forwardedHost) > 0 {\n\t\t\t// According to the Apache mod_proxy docs, X-Forwarded-Host can be a\n\t\t\t// comma-separated list of hosts, to which each proxy appends the\n\t\t\t// requested host. We want to grab the first from this comma-separated\n\t\t\t// list.\n\t\t\thosts := strings.SplitN(forwardedHost, \",\", 2)\n\t\t\thost = strings.TrimSpace(hosts[0])\n\t\t}\n\t}\n\n\tbasePath := routeDescriptorsMap[RouteNameBase].Path\n\n\trequestPath := r.URL.Path\n\tindex := strings.Index(requestPath, basePath)\n\n\tu := &url.URL{\n\t\tScheme: scheme,\n\t\tHost:   host,\n\t}\n\n\tif index > 0 {\n\t\t// N.B. index+1 is important because we want to include the trailing /\n\t\tu.Path = requestPath[0 : index+1]\n\t}\n\n\treturn NewURLBuilder(u, relative)\n}\n\n// BuildBaseURL constructs a base url for the API, typically just \"/v2/\".\nfunc (ub *URLBuilder) BuildBaseURL() (string, error) {\n\troute := ub.cloneRoute(RouteNameBase)\n\n\tbaseURL, err := route.URL()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn baseURL.String(), nil\n}\n\n// BuildCatalogURL constructs a url get a catalog of repositories\nfunc (ub *URLBuilder) BuildCatalogURL(values ...url.Values) (string, error) {\n\troute := ub.cloneRoute(RouteNameCatalog)\n\n\tcatalogURL, err := route.URL()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn appendValuesURL(catalogURL, values...).String(), nil\n}\n\n// BuildTagsURL constructs a url to list the tags in the named repository.\nfunc (ub *URLBuilder) BuildTagsURL(name reference.Named) (string, error) {\n\troute := ub.cloneRoute(RouteNameTags)\n\n\ttagsURL, err := route.URL(\"name\", name.Name())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn tagsURL.String(), nil\n}\n\n// BuildManifestURL constructs a url for the manifest identified by name and\n// reference. The argument reference may be either a tag or digest.\nfunc (ub *URLBuilder) BuildManifestURL(ref reference.Named) (string, error) {\n\troute := ub.cloneRoute(RouteNameManifest)\n\n\ttagOrDigest := \"\"\n\tswitch v := ref.(type) {\n\tcase reference.Tagged:\n\t\ttagOrDigest = v.Tag()\n\tcase reference.Digested:\n\t\ttagOrDigest = v.Digest().String()\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"reference must have a tag or digest\")\n\t}\n\n\tmanifestURL, err := route.URL(\"name\", ref.Name(), \"reference\", tagOrDigest)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn manifestURL.String(), nil\n}\n\n// BuildBlobURL constructs the url for the blob identified by name and dgst.\nfunc (ub *URLBuilder) BuildBlobURL(ref reference.Canonical) (string, error) {\n\troute := ub.cloneRoute(RouteNameBlob)\n\n\tlayerURL, err := route.URL(\"name\", ref.Name(), \"digest\", ref.Digest().String())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn layerURL.String(), nil\n}\n\n// BuildBlobUploadURL constructs a url to begin a blob upload in the\n// repository identified by name.\nfunc (ub *URLBuilder) BuildBlobUploadURL(name reference.Named, values ...url.Values) (string, error) {\n\troute := ub.cloneRoute(RouteNameBlobUpload)\n\n\tuploadURL, err := route.URL(\"name\", name.Name())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn appendValuesURL(uploadURL, values...).String(), nil\n}\n\n// BuildBlobUploadChunkURL constructs a url for the upload identified by uuid,\n// including any url values. This should generally not be used by clients, as\n// this url is provided by server implementations during the blob upload\n// process.\nfunc (ub *URLBuilder) BuildBlobUploadChunkURL(name reference.Named, uuid string, values ...url.Values) (string, error) {\n\troute := ub.cloneRoute(RouteNameBlobUploadChunk)\n\n\tuploadURL, err := route.URL(\"name\", name.Name(), \"uuid\", uuid)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn appendValuesURL(uploadURL, values...).String(), nil\n}\n\n// clondedRoute returns a clone of the named route from the router. Routes\n// must be cloned to avoid modifying them during url generation.\nfunc (ub *URLBuilder) cloneRoute(name string) clonedRoute {\n\troute := new(mux.Route)\n\troot := new(url.URL)\n\n\t*route = *ub.router.GetRoute(name) // clone the route\n\t*root = *ub.root\n\n\treturn clonedRoute{Route: route, root: root, relative: ub.relative}\n}\n\ntype clonedRoute struct {\n\t*mux.Route\n\troot     *url.URL\n\trelative bool\n}\n\nfunc (cr clonedRoute) URL(pairs ...string) (*url.URL, error) {\n\trouteURL, err := cr.Route.URL(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif cr.relative {\n\t\treturn routeURL, nil\n\t}\n\n\tif routeURL.Scheme == \"\" && routeURL.User == nil && routeURL.Host == \"\" {\n\t\trouteURL.Path = routeURL.Path[1:]\n\t}\n\n\turl := cr.root.ResolveReference(routeURL)\n\turl.Scheme = cr.root.Scheme\n\treturn url, nil\n}\n\n// appendValuesURL appends the parameters to the url.\nfunc appendValuesURL(u *url.URL, values ...url.Values) *url.URL {\n\tmerged := u.Query()\n\n\tfor _, v := range values {\n\t\tfor k, vv := range v {\n\t\t\tmerged[k] = append(merged[k], vv...)\n\t\t}\n\t}\n\n\tu.RawQuery = merged.Encode()\n\treturn u\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/LICENSE",
    "content": "Copyright (c) 2016 David Calavera\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/client/client.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/docker/docker-credential-helpers/credentials\"\n)\n\n// isValidCredsMessage checks if 'msg' contains invalid credentials error message.\n// It returns whether the logs are free of invalid credentials errors and the error if it isn't.\n// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername.\nfunc isValidCredsMessage(msg string) error {\n\tif credentials.IsCredentialsMissingServerURLMessage(msg) {\n\t\treturn credentials.NewErrCredentialsMissingServerURL()\n\t}\n\tif credentials.IsCredentialsMissingUsernameMessage(msg) {\n\t\treturn credentials.NewErrCredentialsMissingUsername()\n\t}\n\treturn nil\n}\n\n// Store uses an external program to save credentials.\nfunc Store(program ProgramFunc, creds *credentials.Credentials) error {\n\tcmd := program(credentials.ActionStore)\n\n\tbuffer := new(bytes.Buffer)\n\tif err := json.NewEncoder(buffer).Encode(creds); err != nil {\n\t\treturn err\n\t}\n\tcmd.Input(buffer)\n\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\tif isValidErr := isValidCredsMessage(string(out)); isValidErr != nil {\n\t\t\terr = isValidErr\n\t\t}\n\t\treturn fmt.Errorf(\"error storing credentials - err: %v, out: `%s`\", err, strings.TrimSpace(string(out)))\n\t}\n\n\treturn nil\n}\n\n// Get executes an external program to get the credentials from a native store.\nfunc Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error) {\n\tcmd := program(credentials.ActionGet)\n\tcmd.Input(strings.NewReader(serverURL))\n\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\tif credentials.IsErrCredentialsNotFoundMessage(string(out)) {\n\t\t\treturn nil, credentials.NewErrCredentialsNotFound()\n\t\t}\n\n\t\tif isValidErr := isValidCredsMessage(string(out)); isValidErr != nil {\n\t\t\terr = isValidErr\n\t\t}\n\n\t\treturn nil, fmt.Errorf(\"error getting credentials - err: %v, out: `%s`\", err, strings.TrimSpace(string(out)))\n\t}\n\n\tresp := &credentials.Credentials{\n\t\tServerURL: serverURL,\n\t}\n\n\tif err := json.NewDecoder(bytes.NewReader(out)).Decode(resp); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn resp, nil\n}\n\n// Erase executes a program to remove the server credentials from the native store.\nfunc Erase(program ProgramFunc, serverURL string) error {\n\tcmd := program(credentials.ActionErase)\n\tcmd.Input(strings.NewReader(serverURL))\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\tt := strings.TrimSpace(string(out))\n\n\t\tif isValidErr := isValidCredsMessage(t); isValidErr != nil {\n\t\t\terr = isValidErr\n\t\t}\n\n\t\treturn fmt.Errorf(\"error erasing credentials - err: %v, out: `%s`\", err, t)\n\t}\n\n\treturn nil\n}\n\n// List executes a program to list server credentials in the native store.\nfunc List(program ProgramFunc) (map[string]string, error) {\n\tcmd := program(credentials.ActionList)\n\tcmd.Input(strings.NewReader(\"unused\"))\n\tout, err := cmd.Output()\n\tif err != nil {\n\t\tt := strings.TrimSpace(string(out))\n\n\t\tif isValidErr := isValidCredsMessage(t); isValidErr != nil {\n\t\t\terr = isValidErr\n\t\t}\n\n\t\treturn nil, fmt.Errorf(\"error listing credentials - err: %v, out: `%s`\", err, t)\n\t}\n\n\tvar resp map[string]string\n\tif err = json.NewDecoder(bytes.NewReader(out)).Decode(&resp); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn resp, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/client/command.go",
    "content": "package client\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n)\n\n// Program is an interface to execute external programs.\ntype Program interface {\n\tOutput() ([]byte, error)\n\tInput(in io.Reader)\n}\n\n// ProgramFunc is a type of function that initializes programs based on arguments.\ntype ProgramFunc func(args ...string) Program\n\n// NewShellProgramFunc creates a [ProgramFunc] to run command in a [Shell].\nfunc NewShellProgramFunc(command string) ProgramFunc {\n\treturn func(args ...string) Program {\n\t\treturn createProgramCmdRedirectErr(command, args, nil)\n\t}\n}\n\n// NewShellProgramFuncWithEnv creates a [ProgramFunc] tu run command\n// in a [Shell] with the given environment variables.\nfunc NewShellProgramFuncWithEnv(command string, env *map[string]string) ProgramFunc {\n\treturn func(args ...string) Program {\n\t\treturn createProgramCmdRedirectErr(command, args, env)\n\t}\n}\n\nfunc createProgramCmdRedirectErr(command string, args []string, env *map[string]string) *Shell {\n\tec := exec.Command(command, args...)\n\tif env != nil {\n\t\tfor k, v := range *env {\n\t\t\tec.Env = append(ec.Environ(), k+\"=\"+v)\n\t\t}\n\t}\n\tec.Stderr = os.Stderr\n\treturn &Shell{cmd: ec}\n}\n\n// Shell invokes shell commands to talk with a remote credentials-helper.\ntype Shell struct {\n\tcmd *exec.Cmd\n}\n\n// Output returns responses from the remote credentials-helper.\nfunc (s *Shell) Output() ([]byte, error) {\n\treturn s.cmd.Output()\n}\n\n// Input sets the input to send to a remote credentials-helper.\nfunc (s *Shell) Input(in io.Reader) {\n\ts.cmd.Stdin = in\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go",
    "content": "package credentials\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\n// Action defines the name of an action (sub-command) supported by a\n// credential-helper binary. It is an alias for \"string\", and mostly\n// for convenience.\ntype Action = string\n\n// List of actions (sub-commands) supported by credential-helper binaries.\nconst (\n\tActionStore   Action = \"store\"\n\tActionGet     Action = \"get\"\n\tActionErase   Action = \"erase\"\n\tActionList    Action = \"list\"\n\tActionVersion Action = \"version\"\n)\n\n// Credentials holds the information shared between docker and the credentials store.\ntype Credentials struct {\n\tServerURL string\n\tUsername  string\n\tSecret    string\n}\n\n// isValid checks the integrity of Credentials object such that no credentials lack\n// a server URL or a username.\n// It returns whether the credentials are valid and the error if it isn't.\n// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername\nfunc (c *Credentials) isValid() (bool, error) {\n\tif len(c.ServerURL) == 0 {\n\t\treturn false, NewErrCredentialsMissingServerURL()\n\t}\n\n\tif len(c.Username) == 0 {\n\t\treturn false, NewErrCredentialsMissingUsername()\n\t}\n\n\treturn true, nil\n}\n\n// CredsLabel holds the way Docker credentials should be labeled as such in credentials stores that allow labelling.\n// That label allows to filter out non-Docker credentials too at lookup/search in macOS keychain,\n// Windows credentials manager and Linux libsecret. Default value is \"Docker Credentials\"\nvar CredsLabel = \"Docker Credentials\"\n\n// SetCredsLabel is a simple setter for CredsLabel\nfunc SetCredsLabel(label string) {\n\tCredsLabel = label\n}\n\n// Serve initializes the credentials-helper and parses the action argument.\n// This function is designed to be called from a command line interface.\n// It uses os.Args[1] as the key for the action.\n// It uses os.Stdin as input and os.Stdout as output.\n// This function terminates the program with os.Exit(1) if there is an error.\nfunc Serve(helper Helper) {\n\tif len(os.Args) != 2 {\n\t\t_, _ = fmt.Fprintln(os.Stdout, usage())\n\t\tos.Exit(1)\n\t}\n\n\tswitch os.Args[1] {\n\tcase \"--version\", \"-v\":\n\t\t_ = PrintVersion(os.Stdout)\n\t\tos.Exit(0)\n\tcase \"--help\", \"-h\":\n\t\t_, _ = fmt.Fprintln(os.Stdout, usage())\n\t\tos.Exit(0)\n\t}\n\n\tif err := HandleCommand(helper, os.Args[1], os.Stdin, os.Stdout); err != nil {\n\t\t_, _ = fmt.Fprintln(os.Stdout, err)\n\t\tos.Exit(1)\n\t}\n}\n\nfunc usage() string {\n\treturn fmt.Sprintf(\"Usage: %s <store|get|erase|list|version>\", Name)\n}\n\n// HandleCommand runs a helper to execute a credential action.\nfunc HandleCommand(helper Helper, action Action, in io.Reader, out io.Writer) error {\n\tswitch action {\n\tcase ActionStore:\n\t\treturn Store(helper, in)\n\tcase ActionGet:\n\t\treturn Get(helper, in, out)\n\tcase ActionErase:\n\t\treturn Erase(helper, in)\n\tcase ActionList:\n\t\treturn List(helper, out)\n\tcase ActionVersion:\n\t\treturn PrintVersion(out)\n\tdefault:\n\t\treturn fmt.Errorf(\"%s: unknown action: %s\", Name, action)\n\t}\n}\n\n// Store uses a helper and an input reader to save credentials.\n// The reader must contain the JSON serialization of a Credentials struct.\nfunc Store(helper Helper, reader io.Reader) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tbuffer := new(bytes.Buffer)\n\tfor scanner.Scan() {\n\t\tbuffer.Write(scanner.Bytes())\n\t}\n\n\tif err := scanner.Err(); err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\tvar creds Credentials\n\tif err := json.NewDecoder(buffer).Decode(&creds); err != nil {\n\t\treturn err\n\t}\n\n\tif ok, err := creds.isValid(); !ok {\n\t\treturn err\n\t}\n\n\treturn helper.Add(&creds)\n}\n\n// Get retrieves the credentials for a given server url.\n// The reader must contain the server URL to search.\n// The writer is used to write the JSON serialization of the credentials.\nfunc Get(helper Helper, reader io.Reader, writer io.Writer) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tbuffer := new(bytes.Buffer)\n\tfor scanner.Scan() {\n\t\tbuffer.Write(scanner.Bytes())\n\t}\n\n\tif err := scanner.Err(); err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\tserverURL := strings.TrimSpace(buffer.String())\n\tif len(serverURL) == 0 {\n\t\treturn NewErrCredentialsMissingServerURL()\n\t}\n\n\tusername, secret, err := helper.Get(serverURL)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbuffer.Reset()\n\terr = json.NewEncoder(buffer).Encode(Credentials{\n\t\tServerURL: serverURL,\n\t\tUsername:  username,\n\t\tSecret:    secret,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, _ = fmt.Fprint(writer, buffer.String())\n\treturn nil\n}\n\n// Erase removes credentials from the store.\n// The reader must contain the server URL to remove.\nfunc Erase(helper Helper, reader io.Reader) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tbuffer := new(bytes.Buffer)\n\tfor scanner.Scan() {\n\t\tbuffer.Write(scanner.Bytes())\n\t}\n\n\tif err := scanner.Err(); err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\tserverURL := strings.TrimSpace(buffer.String())\n\tif len(serverURL) == 0 {\n\t\treturn NewErrCredentialsMissingServerURL()\n\t}\n\n\treturn helper.Delete(serverURL)\n}\n\n// List returns all the serverURLs of keys in\n// the OS store as a list of strings\nfunc List(helper Helper, writer io.Writer) error {\n\taccts, err := helper.List()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn json.NewEncoder(writer).Encode(accts)\n}\n\n// PrintVersion outputs the current version.\nfunc PrintVersion(writer io.Writer) error {\n\t_, _ = fmt.Fprintf(writer, \"%s (%s) %s\\n\", Name, Package, Version)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/credentials/error.go",
    "content": "package credentials\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\nconst (\n\t// ErrCredentialsNotFound standardizes the not found error, so every helper returns\n\t// the same message and docker can handle it properly.\n\terrCredentialsNotFoundMessage = \"credentials not found in native keychain\"\n\n\t// ErrCredentialsMissingServerURL and ErrCredentialsMissingUsername standardize\n\t// invalid credentials or credentials management operations\n\terrCredentialsMissingServerURLMessage = \"no credentials server URL\"\n\terrCredentialsMissingUsernameMessage  = \"no credentials username\"\n)\n\n// errCredentialsNotFound represents an error\n// raised when credentials are not in the store.\ntype errCredentialsNotFound struct{}\n\n// Error returns the standard error message\n// for when the credentials are not in the store.\nfunc (errCredentialsNotFound) Error() string {\n\treturn errCredentialsNotFoundMessage\n}\n\n// NotFound implements the [ErrNotFound][errdefs.ErrNotFound] interface.\n//\n// [errdefs.ErrNotFound]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrNotFound\nfunc (errCredentialsNotFound) NotFound() {}\n\n// NewErrCredentialsNotFound creates a new error\n// for when the credentials are not in the store.\nfunc NewErrCredentialsNotFound() error {\n\treturn errCredentialsNotFound{}\n}\n\n// IsErrCredentialsNotFound returns true if the error\n// was caused by not having a set of credentials in a store.\nfunc IsErrCredentialsNotFound(err error) bool {\n\tvar target errCredentialsNotFound\n\treturn errors.As(err, &target)\n}\n\n// IsErrCredentialsNotFoundMessage returns true if the error\n// was caused by not having a set of credentials in a store.\n//\n// This function helps to check messages returned by an\n// external program via its standard output.\nfunc IsErrCredentialsNotFoundMessage(err string) bool {\n\treturn strings.TrimSpace(err) == errCredentialsNotFoundMessage\n}\n\n// errCredentialsMissingServerURL represents an error raised\n// when the credentials object has no server URL or when no\n// server URL is provided to a credentials operation requiring\n// one.\ntype errCredentialsMissingServerURL struct{}\n\nfunc (errCredentialsMissingServerURL) Error() string {\n\treturn errCredentialsMissingServerURLMessage\n}\n\n// InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter]\n// interface.\n//\n// [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter\nfunc (errCredentialsMissingServerURL) InvalidParameter() {}\n\n// errCredentialsMissingUsername represents an error raised\n// when the credentials object has no username or when no\n// username is provided to a credentials operation requiring\n// one.\ntype errCredentialsMissingUsername struct{}\n\nfunc (errCredentialsMissingUsername) Error() string {\n\treturn errCredentialsMissingUsernameMessage\n}\n\n// InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter]\n// interface.\n//\n// [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter\nfunc (errCredentialsMissingUsername) InvalidParameter() {}\n\n// NewErrCredentialsMissingServerURL creates a new error for\n// errCredentialsMissingServerURL.\nfunc NewErrCredentialsMissingServerURL() error {\n\treturn errCredentialsMissingServerURL{}\n}\n\n// NewErrCredentialsMissingUsername creates a new error for\n// errCredentialsMissingUsername.\nfunc NewErrCredentialsMissingUsername() error {\n\treturn errCredentialsMissingUsername{}\n}\n\n// IsCredentialsMissingServerURL returns true if the error\n// was an errCredentialsMissingServerURL.\nfunc IsCredentialsMissingServerURL(err error) bool {\n\tvar target errCredentialsMissingServerURL\n\treturn errors.As(err, &target)\n}\n\n// IsCredentialsMissingServerURLMessage checks for an\n// errCredentialsMissingServerURL in the error message.\nfunc IsCredentialsMissingServerURLMessage(err string) bool {\n\treturn strings.TrimSpace(err) == errCredentialsMissingServerURLMessage\n}\n\n// IsCredentialsMissingUsername returns true if the error\n// was an errCredentialsMissingUsername.\nfunc IsCredentialsMissingUsername(err error) bool {\n\tvar target errCredentialsMissingUsername\n\treturn errors.As(err, &target)\n}\n\n// IsCredentialsMissingUsernameMessage checks for an\n// errCredentialsMissingUsername in the error message.\nfunc IsCredentialsMissingUsernameMessage(err string) bool {\n\treturn strings.TrimSpace(err) == errCredentialsMissingUsernameMessage\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/credentials/helper.go",
    "content": "package credentials\n\n// Helper is the interface a credentials store helper must implement.\ntype Helper interface {\n\t// Add appends credentials to the store.\n\tAdd(*Credentials) error\n\t// Delete removes credentials from the store.\n\tDelete(serverURL string) error\n\t// Get retrieves credentials from the store.\n\t// It returns username and secret as strings.\n\tGet(serverURL string) (string, string, error)\n\t// List returns the stored serverURLs and their associated usernames.\n\tList() (map[string]string, error)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/docker-credential-helpers/credentials/version.go",
    "content": "package credentials\n\nvar (\n\t// Name is filled at linking time\n\tName = \"\"\n\n\t// Package is filled at linking time\n\tPackage = \"github.com/docker/docker-credential-helpers\"\n\n\t// Version holds the complete version number. Filled in at linking time.\n\tVersion = \"v0.0.0+unknown\"\n\n\t// Revision is filled with the VCS (e.g. git) revision being used to build\n\t// the program at linking time.\n\tRevision = \"\"\n)\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright 2015 Docker, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/docker/go-connections/sockets/inmem_socket.go",
    "content": "package sockets\n\nimport (\n\t\"errors\"\n\t\"net\"\n\t\"sync\"\n)\n\nvar errClosed = errors.New(\"use of closed network connection\")\n\n// InmemSocket implements net.Listener using in-memory only connections.\ntype InmemSocket struct {\n\tchConn  chan net.Conn\n\tchClose chan struct{}\n\taddr    string\n\tmu      sync.Mutex\n}\n\n// dummyAddr is used to satisfy net.Addr for the in-mem socket\n// it is just stored as a string and returns the string for all calls\ntype dummyAddr string\n\n// NewInmemSocket creates an in-memory only net.Listener\n// The addr argument can be any string, but is used to satisfy the `Addr()` part\n// of the net.Listener interface\nfunc NewInmemSocket(addr string, bufSize int) *InmemSocket {\n\treturn &InmemSocket{\n\t\tchConn:  make(chan net.Conn, bufSize),\n\t\tchClose: make(chan struct{}),\n\t\taddr:    addr,\n\t}\n}\n\n// Addr returns the socket's addr string to satisfy net.Listener\nfunc (s *InmemSocket) Addr() net.Addr {\n\treturn dummyAddr(s.addr)\n}\n\n// Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn.\nfunc (s *InmemSocket) Accept() (net.Conn, error) {\n\tselect {\n\tcase conn := <-s.chConn:\n\t\treturn conn, nil\n\tcase <-s.chClose:\n\t\treturn nil, errClosed\n\t}\n}\n\n// Close closes the listener. It will be unavailable for use once closed.\nfunc (s *InmemSocket) Close() error {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\tselect {\n\tcase <-s.chClose:\n\tdefault:\n\t\tclose(s.chClose)\n\t}\n\treturn nil\n}\n\n// Dial is used to establish a connection with the in-mem server\nfunc (s *InmemSocket) Dial(network, addr string) (net.Conn, error) {\n\tsrvConn, clientConn := net.Pipe()\n\tselect {\n\tcase s.chConn <- srvConn:\n\tcase <-s.chClose:\n\t\treturn nil, errClosed\n\t}\n\n\treturn clientConn, nil\n}\n\n// Network returns the addr string, satisfies net.Addr\nfunc (a dummyAddr) Network() string {\n\treturn string(a)\n}\n\n// String returns the string form\nfunc (a dummyAddr) String() string {\n\treturn string(a)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/proxy.go",
    "content": "package sockets\n\nimport (\n\t\"net\"\n\t\"os\"\n\t\"strings\"\n)\n\n// GetProxyEnv allows access to the uppercase and the lowercase forms of\n// proxy-related variables.  See the Go specification for details on these\n// variables. https://golang.org/pkg/net/http/\n//\n// Deprecated: this function was used as helper for [DialerFromEnvironment] and is no longer used. It will be removed in the next release.\nfunc GetProxyEnv(key string) string {\n\tproxyValue := os.Getenv(strings.ToUpper(key))\n\tif proxyValue == \"\" {\n\t\treturn os.Getenv(strings.ToLower(key))\n\t}\n\treturn proxyValue\n}\n\n// DialerFromEnvironment was previously used to configure a net.Dialer to route\n// connections through a SOCKS proxy.\n//\n// Deprecated: SOCKS proxies are now supported by configuring only\n// http.Transport.Proxy, and no longer require changing http.Transport.Dial.\n// Therefore, only [sockets.ConfigureTransport] needs to be called, and any\n// [sockets.DialerFromEnvironment] calls can be dropped.\nfunc DialerFromEnvironment(direct *net.Dialer) (*net.Dialer, error) {\n\treturn direct, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/sockets.go",
    "content": "// Package sockets provides helper functions to create and configure Unix or TCP sockets.\npackage sockets\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"syscall\"\n\t\"time\"\n)\n\nconst (\n\tdefaultTimeout        = 10 * time.Second\n\tmaxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path)\n)\n\n// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system.\nvar ErrProtocolNotAvailable = errors.New(\"protocol not available\")\n\n// ConfigureTransport configures the specified [http.Transport] according to the specified proto\n// and addr.\n//\n// If the proto is unix (using a unix socket to communicate) or npipe the compression is disabled.\n// For other protos, compression is enabled. If you want to manually enable/disable compression,\n// make sure you do it _after_ any subsequent calls to ConfigureTransport is made against the same\n// [http.Transport].\nfunc ConfigureTransport(tr *http.Transport, proto, addr string) error {\n\tswitch proto {\n\tcase \"unix\":\n\t\treturn configureUnixTransport(tr, proto, addr)\n\tcase \"npipe\":\n\t\treturn configureNpipeTransport(tr, proto, addr)\n\tdefault:\n\t\ttr.Proxy = http.ProxyFromEnvironment\n\t\ttr.DisableCompression = false\n\t\ttr.DialContext = (&net.Dialer{\n\t\t\tTimeout: defaultTimeout,\n\t\t}).DialContext\n\t}\n\treturn nil\n}\n\n// DialPipe connects to a Windows named pipe. It is not supported on\n// non-Windows platforms.\n//\n// Deprecated: use [github.com/Microsoft/go-winio.DialPipe] or [github.com/Microsoft/go-winio.DialPipeContext].\nfunc DialPipe(addr string, timeout time.Duration) (net.Conn, error) {\n\treturn dialPipe(addr, timeout)\n}\n\nfunc configureUnixTransport(tr *http.Transport, proto, addr string) error {\n\tif len(addr) > maxUnixSocketPathSize {\n\t\treturn fmt.Errorf(\"unix socket path %q is too long\", addr)\n\t}\n\t// No need for compression in local communications.\n\ttr.DisableCompression = true\n\tdialer := &net.Dialer{\n\t\tTimeout: defaultTimeout,\n\t}\n\ttr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {\n\t\treturn dialer.DialContext(ctx, proto, addr)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/sockets_unix.go",
    "content": "//go:build !windows\n\npackage sockets\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"syscall\"\n\t\"time\"\n)\n\nfunc configureNpipeTransport(tr *http.Transport, proto, addr string) error {\n\treturn ErrProtocolNotAvailable\n}\n\nfunc dialPipe(_ string, _ time.Duration) (net.Conn, error) {\n\treturn nil, syscall.EAFNOSUPPORT\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/sockets_windows.go",
    "content": "package sockets\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/Microsoft/go-winio\"\n)\n\nfunc configureNpipeTransport(tr *http.Transport, proto, addr string) error {\n\t// No need for compression in local communications.\n\ttr.DisableCompression = true\n\ttr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {\n\t\treturn winio.DialPipeContext(ctx, addr)\n\t}\n\treturn nil\n}\n\nfunc dialPipe(addr string, timeout time.Duration) (net.Conn, error) {\n\treturn winio.DialPipe(addr, &timeout)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/tcp_socket.go",
    "content": "// Package sockets provides helper functions to create and configure Unix or TCP sockets.\npackage sockets\n\nimport (\n\t\"crypto/tls\"\n\t\"net\"\n)\n\n// NewTCPSocket creates a TCP socket listener with the specified address and\n// the specified tls configuration. If TLSConfig is set, will encapsulate the\n// TCP listener inside a TLS one.\nfunc NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) {\n\tl, err := net.Listen(\"tcp\", addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif tlsConfig != nil {\n\t\ttlsConfig.NextProtos = []string{\"http/1.1\"}\n\t\tl = tls.NewListener(l, tlsConfig)\n\t}\n\treturn l, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/unix_socket.go",
    "content": "/*\nPackage sockets is a simple unix domain socket wrapper.\n\n# Usage\n\nFor example:\n\n\timport(\n\t\t\"fmt\"\n\t\t\"net\"\n\t\t\"os\"\n\t\t\"github.com/docker/go-connections/sockets\"\n\t)\n\n\tfunc main() {\n\t\tl, err := sockets.NewUnixSocketWithOpts(\"/path/to/sockets\",\n\t\t\tsockets.WithChown(0,0),sockets.WithChmod(0660))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\techoStr := \"hello\"\n\n\t\tgo func() {\n\t\t\tfor {\n\t\t\t\tconn, err := l.Accept()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconn.Write([]byte(echoStr))\n\t\t\t\tconn.Close()\n\t\t\t}\n\t\t}()\n\n\t\tconn, err := net.Dial(\"unix\", path)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\tbuf := make([]byte, 5)\n\t\tif _, err := conn.Read(buf); err != nil {\n\t\t\tpanic(err)\n\t\t} else if string(buf) != echoStr {\n\t\t\tpanic(fmt.Errorf(\"msg may lost\"))\n\t\t}\n\t}\n*/\npackage sockets\n\nimport (\n\t\"net\"\n\t\"os\"\n\t\"syscall\"\n)\n\n// SockOption sets up socket file's creating option\ntype SockOption func(string) error\n\n// NewUnixSocketWithOpts creates a unix socket with the specified options.\n// By default, socket permissions are 0000 (i.e.: no access for anyone); pass\n// WithChmod() and WithChown() to set the desired ownership and permissions.\n//\n// This function temporarily changes the system's \"umask\" to 0777 to work around\n// a race condition between creating the socket and setting its permissions. While\n// this should only be for a short duration, it may affect other processes that\n// create files/directories during that period.\nfunc NewUnixSocketWithOpts(path string, opts ...SockOption) (net.Listener, error) {\n\tif err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) {\n\t\treturn nil, err\n\t}\n\n\tl, err := listenUnix(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, op := range opts {\n\t\tif err := op(path); err != nil {\n\t\t\t_ = l.Close()\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn l, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/unix_socket_unix.go",
    "content": "//go:build !windows\n\npackage sockets\n\nimport (\n\t\"net\"\n\t\"os\"\n\t\"syscall\"\n)\n\n// WithChown modifies the socket file's uid and gid\nfunc WithChown(uid, gid int) SockOption {\n\treturn func(path string) error {\n\t\tif err := os.Chown(path, uid, gid); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithChmod modifies socket file's access mode.\nfunc WithChmod(mask os.FileMode) SockOption {\n\treturn func(path string) error {\n\t\tif err := os.Chmod(path, mask); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// NewUnixSocket creates a unix socket with the specified path and group.\nfunc NewUnixSocket(path string, gid int) (net.Listener, error) {\n\treturn NewUnixSocketWithOpts(path, WithChown(0, gid), WithChmod(0o660))\n}\n\nfunc listenUnix(path string) (net.Listener, error) {\n\t// net.Listen does not allow for permissions to be set. As a result, when\n\t// specifying custom permissions (\"WithChmod()\"), there is a short time\n\t// between creating the socket and applying the permissions, during which\n\t// the socket permissions are Less restrictive than desired.\n\t//\n\t// To work around this limitation of net.Listen(), we temporarily set the\n\t// umask to 0777, which forces the socket to be created with 000 permissions\n\t// (i.e.: no access for anyone). After that, WithChmod() must be used to set\n\t// the desired permissions.\n\t//\n\t// We don't use \"defer\" here, to reset the umask to its original value as soon\n\t// as possible. Ideally we'd be able to detect if WithChmod() was passed as\n\t// an option, and skip changing umask if default permissions are used.\n\torigUmask := syscall.Umask(0o777)\n\tl, err := net.Listen(\"unix\", path)\n\tsyscall.Umask(origUmask)\n\treturn l, err\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/sockets/unix_socket_windows.go",
    "content": "package sockets\n\nimport \"net\"\n\nfunc listenUnix(path string) (net.Listener, error) {\n\treturn net.Listen(\"unix\", path)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/tlsconfig/certpool.go",
    "content": "package tlsconfig\n\nimport (\n\t\"crypto/x509\"\n\t\"runtime\"\n)\n\n// SystemCertPool returns a copy of the system cert pool,\n// returns an error if failed to load or empty pool on windows.\nfunc SystemCertPool() (*x509.CertPool, error) {\n\tcertpool, err := x509.SystemCertPool()\n\tif err != nil && runtime.GOOS == \"windows\" {\n\t\treturn x509.NewCertPool(), nil\n\t}\n\treturn certpool, err\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-connections/tlsconfig/config.go",
    "content": "// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.\n//\n// As a reminder from https://golang.org/pkg/crypto/tls/#Config:\n//\n//\tA Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified.\n//\tA Config may be reused; the tls package will also not modify it.\npackage tlsconfig\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n)\n\n// Options represents the information needed to create client and server TLS configurations.\ntype Options struct {\n\tCAFile string\n\n\t// If either CertFile or KeyFile is empty, Client() will not load them\n\t// preventing the client from authenticating to the server.\n\t// However, Server() requires them and will error out if they are empty.\n\tCertFile string\n\tKeyFile  string\n\n\t// client-only option\n\tInsecureSkipVerify bool\n\t// server-only option\n\tClientAuth tls.ClientAuthType\n\t// If ExclusiveRootPools is set, then if a CA file is provided, the root pool used for TLS\n\t// creds will include exclusively the roots in that CA file.  If no CA file is provided,\n\t// the system pool will be used.\n\tExclusiveRootPools bool\n\tMinVersion         uint16\n}\n\n// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls\n// options struct but wants to use a commonly accepted set of TLS cipher suites, with\n// known weak algorithms removed.\nvar DefaultServerAcceptedCiphers = defaultCipherSuites\n\n// defaultCipherSuites is shared by both client and server as the default set.\nvar defaultCipherSuites = []uint16{\n\ttls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\n\ttls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,\n\ttls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\n\ttls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,\n}\n\n// ServerDefault returns a secure-enough TLS configuration for the server TLS configuration.\nfunc ServerDefault(ops ...func(*tls.Config)) *tls.Config {\n\treturn defaultConfig(ops...)\n}\n\n// ClientDefault returns a secure-enough TLS configuration for the client TLS configuration.\nfunc ClientDefault(ops ...func(*tls.Config)) *tls.Config {\n\treturn defaultConfig(ops...)\n}\n\n// defaultConfig is the default config used by both client and server TLS configuration.\nfunc defaultConfig(ops ...func(*tls.Config)) *tls.Config {\n\ttlsConfig := &tls.Config{\n\t\t// Avoid fallback by default to SSL protocols < TLS1.2\n\t\tMinVersion:   tls.VersionTLS12,\n\t\tCipherSuites: defaultCipherSuites,\n\t}\n\n\tfor _, op := range ops {\n\t\top(tlsConfig)\n\t}\n\n\treturn tlsConfig\n}\n\n// certPool returns an X.509 certificate pool from `caFile`, the certificate file.\nfunc certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) {\n\t// If we should verify the server, we need to load a trusted ca\n\tvar (\n\t\tpool *x509.CertPool\n\t\terr  error\n\t)\n\tif exclusivePool {\n\t\tpool = x509.NewCertPool()\n\t} else {\n\t\tpool, err = SystemCertPool()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to read system certificates: %v\", err)\n\t\t}\n\t}\n\tpemData, err := os.ReadFile(caFile)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not read CA certificate %q: %v\", caFile, err)\n\t}\n\tif !pool.AppendCertsFromPEM(pemData) {\n\t\treturn nil, fmt.Errorf(\"failed to append certificates from PEM file: %q\", caFile)\n\t}\n\treturn pool, nil\n}\n\n// allTLSVersions lists all the TLS versions and is used by the code that validates\n// a uint16 value as a TLS version.\nvar allTLSVersions = map[uint16]struct{}{\n\ttls.VersionTLS10: {},\n\ttls.VersionTLS11: {},\n\ttls.VersionTLS12: {},\n\ttls.VersionTLS13: {},\n}\n\n// isValidMinVersion checks that the input value is a valid tls minimum version\nfunc isValidMinVersion(version uint16) bool {\n\t_, ok := allTLSVersions[version]\n\treturn ok\n}\n\n// adjustMinVersion sets the MinVersion on `config`, the input configuration.\n// It assumes the current MinVersion on the `config` is the lowest allowed.\nfunc adjustMinVersion(options Options, config *tls.Config) error {\n\tif options.MinVersion > 0 {\n\t\tif !isValidMinVersion(options.MinVersion) {\n\t\t\treturn fmt.Errorf(\"invalid minimum TLS version: %x\", options.MinVersion)\n\t\t}\n\t\tif options.MinVersion < config.MinVersion {\n\t\t\treturn fmt.Errorf(\"requested minimum TLS version is too low. Should be at-least: %x\", config.MinVersion)\n\t\t}\n\t\tconfig.MinVersion = options.MinVersion\n\t}\n\n\treturn nil\n}\n\n// errEncryptedKeyDeprecated is produced when we encounter an encrypted\n// (password-protected) key. From https://go-review.googlesource.com/c/go/+/264159;\n//\n// > Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since\n// > it does not authenticate the ciphertext, it is vulnerable to padding oracle\n// > attacks that can let an attacker recover the plaintext\n// >\n// > It's unfortunate that we don't implement PKCS#8 encryption so we can't\n// > recommend an alternative but PEM encryption is so broken that it's worth\n// > deprecating outright.\n//\n// Also see https://docs.docker.com/go/deprecated/\nvar errEncryptedKeyDeprecated = errors.New(\"private key is encrypted; encrypted private keys are obsolete, and not supported\")\n\n// getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format.\n// It returns an error if the file could not be decoded or was protected by\n// a passphrase.\nfunc getPrivateKey(keyBytes []byte) ([]byte, error) {\n\t// this section makes some small changes to code from notary/tuf/utils/x509.go\n\tpemBlock, _ := pem.Decode(keyBytes)\n\tif pemBlock == nil {\n\t\treturn nil, fmt.Errorf(\"no valid private key found\")\n\t}\n\n\tif x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // Ignore SA1019 (IsEncryptedPEMBlock is deprecated)\n\t\treturn nil, errEncryptedKeyDeprecated\n\t}\n\n\treturn keyBytes, nil\n}\n\n// getCert returns a Certificate from the CertFile and KeyFile in 'options',\n// if the key is encrypted, the Passphrase in 'options' will be used to\n// decrypt it.\nfunc getCert(options Options) ([]tls.Certificate, error) {\n\tif options.CertFile == \"\" && options.KeyFile == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tcert, err := os.ReadFile(options.CertFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tprKeyBytes, err := os.ReadFile(options.KeyFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tprKeyBytes, err = getPrivateKey(prKeyBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttlsCert, err := tls.X509KeyPair(cert, prKeyBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn []tls.Certificate{tlsCert}, nil\n}\n\n// Client returns a TLS configuration meant to be used by a client.\nfunc Client(options Options) (*tls.Config, error) {\n\ttlsConfig := defaultConfig()\n\ttlsConfig.InsecureSkipVerify = options.InsecureSkipVerify\n\tif !options.InsecureSkipVerify && options.CAFile != \"\" {\n\t\tCAs, err := certPool(options.CAFile, options.ExclusiveRootPools)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttlsConfig.RootCAs = CAs\n\t}\n\n\ttlsCerts, err := getCert(options)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not load X509 key pair: %w\", err)\n\t}\n\ttlsConfig.Certificates = tlsCerts\n\n\tif err := adjustMinVersion(options, tlsConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tlsConfig, nil\n}\n\n// Server returns a TLS configuration meant to be used by a server.\nfunc Server(options Options) (*tls.Config, error) {\n\ttlsConfig := defaultConfig()\n\ttlsConfig.ClientAuth = options.ClientAuth\n\ttlsCert, err := tls.LoadX509KeyPair(options.CertFile, options.KeyFile)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn nil, fmt.Errorf(\"could not load X509 key pair (cert: %q, key: %q): %v\", options.CertFile, options.KeyFile, err)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"error reading X509 key pair - make sure the key is not encrypted (cert: %q, key: %q): %v\", options.CertFile, options.KeyFile, err)\n\t}\n\ttlsConfig.Certificates = []tls.Certificate{tlsCert}\n\tif options.ClientAuth >= tls.VerifyClientCertIfGiven && options.CAFile != \"\" {\n\t\tCAs, err := certPool(options.CAFile, options.ExclusiveRootPools)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttlsConfig.ClientCAs = CAs\n\t}\n\n\tif err := adjustMinVersion(options, tlsConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tlsConfig, nil\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/CONTRIBUTING.md",
    "content": "# Contributing to go-units\n\nWant to hack on go-units? Awesome! Here are instructions to get you started.\n\ngo-units is a part of the [Docker](https://www.docker.com) project, and follows\nthe same rules and principles. If you're already familiar with the way\nDocker does things, you'll feel right at home.\n\nOtherwise, go read Docker's\n[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md),\n[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md),\n[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and\n[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md).\n\n### Sign your work\n\nThe sign-off is a simple line at the end of the explanation for the patch. Your\nsignature certifies that you wrote the patch or otherwise have the right to pass\nit on as an open-source patch. The rules are pretty simple: if you can certify\nthe below (from [developercertificate.org](http://developercertificate.org/)):\n\n```\nDeveloper Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n660 York Street, Suite 102,\nSan Francisco, CA 94110 USA\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n    have the right to submit it under the open source license\n    indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n    of my knowledge, is covered under an appropriate open source\n    license and I have the right under that license to submit that\n    work with modifications, whether created in whole or in part\n    by me, under the same open source license (unless I am\n    permitted to submit under a different license), as indicated\n    in the file; or\n\n(c) The contribution was provided directly to me by some other\n    person who certified (a), (b) or (c) and I have not modified\n    it.\n\n(d) I understand and agree that this project and the contribution\n    are public and that a record of the contribution (including all\n    personal information I submit with it, including my sign-off) is\n    maintained indefinitely and may be redistributed consistent with\n    this project or the open source license(s) involved.\n```\n\nThen you just add a line to every git commit message:\n\n    Signed-off-by: Joe Smith <joe.smith@email.com>\n\nUse your real name (sorry, no pseudonyms or anonymous contributions.)\n\nIf you set your `user.name` and `user.email` git configs, you can sign your\ncommit automatically with `git commit -s`.\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright 2015 Docker, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/docker/go-units/MAINTAINERS",
    "content": "# go-units maintainers file\n#\n# This file describes who runs the docker/go-units project and how.\n# This is a living document - if you see something out of date or missing, speak up!\n#\n# It is structured to be consumable by both humans and programs.\n# To extract its contents programmatically, use any TOML-compliant parser.\n#\n# This file is compiled into the MAINTAINERS file in docker/opensource.\n#\n[Org]\n\t[Org.\"Core maintainers\"]\n\t\tpeople = [\n\t\t\t\"akihirosuda\",\n\t\t\t\"dnephin\",\n\t\t\t\"thajeztah\",\n\t\t\t\"vdemeester\",\n\t\t]\n\n[people]\n\n# A reference list of all people associated with the project.\n# All other sections should refer to people by their canonical key\n# in the people section.\n\n\t# ADD YOURSELF HERE IN ALPHABETICAL ORDER\n\n\t[people.akihirosuda]\n\tName = \"Akihiro Suda\"\n\tEmail = \"akihiro.suda.cz@hco.ntt.co.jp\"\n\tGitHub = \"AkihiroSuda\"\n\n\t[people.dnephin]\n\tName = \"Daniel Nephin\"\n\tEmail = \"dnephin@gmail.com\"\n\tGitHub = \"dnephin\"\n\t\n\t[people.thajeztah]\n\tName = \"Sebastiaan van Stijn\"\n\tEmail = \"github@gone.nl\"\n\tGitHub = \"thaJeztah\"\n\n\t[people.vdemeester]\n\tName = \"Vincent Demeester\"\n\tEmail = \"vincent@sbr.pm\"\n\tGitHub = \"vdemeester\""
  },
  {
    "path": "vendor/github.com/docker/go-units/README.md",
    "content": "[![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units)\n\n# Introduction\n\ngo-units is a library to transform human friendly measurements into machine friendly values.\n\n## Usage\n\nSee the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation.\n\n## Copyright and license\n\nCopyright © 2015 Docker, Inc.\n\ngo-units is licensed under the Apache License, Version 2.0.\nSee [LICENSE](LICENSE) for the full text of the license.\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/circle.yml",
    "content": "dependencies:\n  post:\n    # install golint\n    - go get golang.org/x/lint/golint\n\ntest:\n  pre:\n    # run analysis before tests\n    - go vet ./...\n    - test -z \"$(golint ./... | tee /dev/stderr)\"\n    - test -z \"$(gofmt -s -l . | tee /dev/stderr)\"\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/duration.go",
    "content": "// Package units provides helper function to parse and print size and time units\n// in human-readable format.\npackage units\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// HumanDuration returns a human-readable approximation of a duration\n// (eg. \"About a minute\", \"4 hours ago\", etc.).\nfunc HumanDuration(d time.Duration) string {\n\tif seconds := int(d.Seconds()); seconds < 1 {\n\t\treturn \"Less than a second\"\n\t} else if seconds == 1 {\n\t\treturn \"1 second\"\n\t} else if seconds < 60 {\n\t\treturn fmt.Sprintf(\"%d seconds\", seconds)\n\t} else if minutes := int(d.Minutes()); minutes == 1 {\n\t\treturn \"About a minute\"\n\t} else if minutes < 60 {\n\t\treturn fmt.Sprintf(\"%d minutes\", minutes)\n\t} else if hours := int(d.Hours() + 0.5); hours == 1 {\n\t\treturn \"About an hour\"\n\t} else if hours < 48 {\n\t\treturn fmt.Sprintf(\"%d hours\", hours)\n\t} else if hours < 24*7*2 {\n\t\treturn fmt.Sprintf(\"%d days\", hours/24)\n\t} else if hours < 24*30*2 {\n\t\treturn fmt.Sprintf(\"%d weeks\", hours/24/7)\n\t} else if hours < 24*365*2 {\n\t\treturn fmt.Sprintf(\"%d months\", hours/24/30)\n\t}\n\treturn fmt.Sprintf(\"%d years\", int(d.Hours())/24/365)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/size.go",
    "content": "package units\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// See: http://en.wikipedia.org/wiki/Binary_prefix\nconst (\n\t// Decimal\n\n\tKB = 1000\n\tMB = 1000 * KB\n\tGB = 1000 * MB\n\tTB = 1000 * GB\n\tPB = 1000 * TB\n\n\t// Binary\n\n\tKiB = 1024\n\tMiB = 1024 * KiB\n\tGiB = 1024 * MiB\n\tTiB = 1024 * GiB\n\tPiB = 1024 * TiB\n)\n\ntype unitMap map[byte]int64\n\nvar (\n\tdecimalMap = unitMap{'k': KB, 'm': MB, 'g': GB, 't': TB, 'p': PB}\n\tbinaryMap  = unitMap{'k': KiB, 'm': MiB, 'g': GiB, 't': TiB, 'p': PiB}\n)\n\nvar (\n\tdecimapAbbrs = []string{\"B\", \"kB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"}\n\tbinaryAbbrs  = []string{\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"}\n)\n\nfunc getSizeAndUnit(size float64, base float64, _map []string) (float64, string) {\n\ti := 0\n\tunitsLimit := len(_map) - 1\n\tfor size >= base && i < unitsLimit {\n\t\tsize = size / base\n\t\ti++\n\t}\n\treturn size, _map[i]\n}\n\n// CustomSize returns a human-readable approximation of a size\n// using custom format.\nfunc CustomSize(format string, size float64, base float64, _map []string) string {\n\tsize, unit := getSizeAndUnit(size, base, _map)\n\treturn fmt.Sprintf(format, size, unit)\n}\n\n// HumanSizeWithPrecision allows the size to be in any precision,\n// instead of 4 digit precision used in units.HumanSize.\nfunc HumanSizeWithPrecision(size float64, precision int) string {\n\tsize, unit := getSizeAndUnit(size, 1000.0, decimapAbbrs)\n\treturn fmt.Sprintf(\"%.*g%s\", precision, size, unit)\n}\n\n// HumanSize returns a human-readable approximation of a size\n// capped at 4 valid numbers (eg. \"2.746 MB\", \"796 KB\").\nfunc HumanSize(size float64) string {\n\treturn HumanSizeWithPrecision(size, 4)\n}\n\n// BytesSize returns a human-readable size in bytes, kibibytes,\n// mebibytes, gibibytes, or tebibytes (eg. \"44kiB\", \"17MiB\").\nfunc BytesSize(size float64) string {\n\treturn CustomSize(\"%.4g%s\", size, 1024.0, binaryAbbrs)\n}\n\n// FromHumanSize returns an integer from a human-readable specification of a\n// size using SI standard (eg. \"44kB\", \"17MB\").\nfunc FromHumanSize(size string) (int64, error) {\n\treturn parseSize(size, decimalMap)\n}\n\n// RAMInBytes parses a human-readable string representing an amount of RAM\n// in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and\n// returns the number of bytes, or -1 if the string is unparseable.\n// Units are case-insensitive, and the 'b' suffix is optional.\nfunc RAMInBytes(size string) (int64, error) {\n\treturn parseSize(size, binaryMap)\n}\n\n// Parses the human-readable size string into the amount it represents.\nfunc parseSize(sizeStr string, uMap unitMap) (int64, error) {\n\t// TODO: rewrite to use strings.Cut if there's a space\n\t// once Go < 1.18 is deprecated.\n\tsep := strings.LastIndexAny(sizeStr, \"01234567890. \")\n\tif sep == -1 {\n\t\t// There should be at least a digit.\n\t\treturn -1, fmt.Errorf(\"invalid size: '%s'\", sizeStr)\n\t}\n\tvar num, sfx string\n\tif sizeStr[sep] != ' ' {\n\t\tnum = sizeStr[:sep+1]\n\t\tsfx = sizeStr[sep+1:]\n\t} else {\n\t\t// Omit the space separator.\n\t\tnum = sizeStr[:sep]\n\t\tsfx = sizeStr[sep+1:]\n\t}\n\n\tsize, err := strconv.ParseFloat(num, 64)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\t// Backward compatibility: reject negative sizes.\n\tif size < 0 {\n\t\treturn -1, fmt.Errorf(\"invalid size: '%s'\", sizeStr)\n\t}\n\n\tif len(sfx) == 0 {\n\t\treturn int64(size), nil\n\t}\n\n\t// Process the suffix.\n\n\tif len(sfx) > 3 { // Too long.\n\t\tgoto badSuffix\n\t}\n\tsfx = strings.ToLower(sfx)\n\t// Trivial case: b suffix.\n\tif sfx[0] == 'b' {\n\t\tif len(sfx) > 1 { // no extra characters allowed after b.\n\t\t\tgoto badSuffix\n\t\t}\n\t\treturn int64(size), nil\n\t}\n\t// A suffix from the map.\n\tif mul, ok := uMap[sfx[0]]; ok {\n\t\tsize *= float64(mul)\n\t} else {\n\t\tgoto badSuffix\n\t}\n\n\t// The suffix may have extra \"b\" or \"ib\" (e.g. KiB or MB).\n\tswitch {\n\tcase len(sfx) == 2 && sfx[1] != 'b':\n\t\tgoto badSuffix\n\tcase len(sfx) == 3 && sfx[1:] != \"ib\":\n\t\tgoto badSuffix\n\t}\n\n\treturn int64(size), nil\n\nbadSuffix:\n\treturn -1, fmt.Errorf(\"invalid suffix: '%s'\", sfx)\n}\n"
  },
  {
    "path": "vendor/github.com/docker/go-units/ulimit.go",
    "content": "package units\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Ulimit is a human friendly version of Rlimit.\ntype Ulimit struct {\n\tName string\n\tHard int64\n\tSoft int64\n}\n\n// Rlimit specifies the resource limits, such as max open files.\ntype Rlimit struct {\n\tType int    `json:\"type,omitempty\"`\n\tHard uint64 `json:\"hard,omitempty\"`\n\tSoft uint64 `json:\"soft,omitempty\"`\n}\n\nconst (\n\t// magic numbers for making the syscall\n\t// some of these are defined in the syscall package, but not all.\n\t// Also since Windows client doesn't get access to the syscall package, need to\n\t//\tdefine these here\n\trlimitAs         = 9\n\trlimitCore       = 4\n\trlimitCPU        = 0\n\trlimitData       = 2\n\trlimitFsize      = 1\n\trlimitLocks      = 10\n\trlimitMemlock    = 8\n\trlimitMsgqueue   = 12\n\trlimitNice       = 13\n\trlimitNofile     = 7\n\trlimitNproc      = 6\n\trlimitRss        = 5\n\trlimitRtprio     = 14\n\trlimitRttime     = 15\n\trlimitSigpending = 11\n\trlimitStack      = 3\n)\n\nvar ulimitNameMapping = map[string]int{\n\t//\"as\":         rlimitAs, // Disabled since this doesn't seem usable with the way Docker inits a container.\n\t\"core\":       rlimitCore,\n\t\"cpu\":        rlimitCPU,\n\t\"data\":       rlimitData,\n\t\"fsize\":      rlimitFsize,\n\t\"locks\":      rlimitLocks,\n\t\"memlock\":    rlimitMemlock,\n\t\"msgqueue\":   rlimitMsgqueue,\n\t\"nice\":       rlimitNice,\n\t\"nofile\":     rlimitNofile,\n\t\"nproc\":      rlimitNproc,\n\t\"rss\":        rlimitRss,\n\t\"rtprio\":     rlimitRtprio,\n\t\"rttime\":     rlimitRttime,\n\t\"sigpending\": rlimitSigpending,\n\t\"stack\":      rlimitStack,\n}\n\n// ParseUlimit parses and returns a Ulimit from the specified string.\nfunc ParseUlimit(val string) (*Ulimit, error) {\n\tparts := strings.SplitN(val, \"=\", 2)\n\tif len(parts) != 2 {\n\t\treturn nil, fmt.Errorf(\"invalid ulimit argument: %s\", val)\n\t}\n\n\tif _, exists := ulimitNameMapping[parts[0]]; !exists {\n\t\treturn nil, fmt.Errorf(\"invalid ulimit type: %s\", parts[0])\n\t}\n\n\tvar (\n\t\tsoft int64\n\t\thard = &soft // default to soft in case no hard was set\n\t\ttemp int64\n\t\terr  error\n\t)\n\tswitch limitVals := strings.Split(parts[1], \":\"); len(limitVals) {\n\tcase 2:\n\t\ttemp, err = strconv.ParseInt(limitVals[1], 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thard = &temp\n\t\tfallthrough\n\tcase 1:\n\t\tsoft, err = strconv.ParseInt(limitVals[0], 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"too many limit value arguments - %s, can only have up to two, `soft[:hard]`\", parts[1])\n\t}\n\n\tif *hard != -1 {\n\t\tif soft == -1 {\n\t\t\treturn nil, fmt.Errorf(\"ulimit soft limit must be less than or equal to hard limit: soft: -1 (unlimited), hard: %d\", *hard)\n\t\t}\n\t\tif soft > *hard {\n\t\t\treturn nil, fmt.Errorf(\"ulimit soft limit must be less than or equal to hard limit: %d > %d\", soft, *hard)\n\t\t}\n\t}\n\n\treturn &Ulimit{Name: parts[0], Soft: soft, Hard: *hard}, nil\n}\n\n// GetRlimit returns the RLimit corresponding to Ulimit.\nfunc (u *Ulimit) GetRlimit() (*Rlimit, error) {\n\tt, exists := ulimitNameMapping[u.Name]\n\tif !exists {\n\t\treturn nil, fmt.Errorf(\"invalid ulimit name %s\", u.Name)\n\t}\n\n\treturn &Rlimit{Type: t, Soft: uint64(u.Soft), Hard: uint64(u.Hard)}, nil\n}\n\nfunc (u *Ulimit) String() string {\n\treturn fmt.Sprintf(\"%s=%d:%d\", u.Name, u.Soft, u.Hard)\n}\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/.gitignore",
    "content": ""
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/LICENSE.txt",
    "content": "Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com)\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\n all 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\n THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/Makefile",
    "content": ".PHONY: ci generate clean\n\nci: clean generate\n\tgo test -race -v ./...\n\ngenerate:\n\tgo generate .\n\nclean:\n\trm -rf *_generated*.go\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/README.md",
    "content": "# httpsnoop\n\nPackage httpsnoop provides an easy way to capture http related metrics (i.e.\nresponse time, bytes written, and http status code) from your application's\nhttp.Handlers.\n\nDoing this requires non-trivial wrapping of the http.ResponseWriter interface,\nwhich is also exposed for users interested in a more low-level API.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/felixge/httpsnoop.svg)](https://pkg.go.dev/github.com/felixge/httpsnoop)\n[![Build Status](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml/badge.svg)](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml)\n\n## Usage Example\n\n```go\n// myH is your app's http handler, perhaps a http.ServeMux or similar.\nvar myH http.Handler\n// wrappedH wraps myH in order to log every request.\nwrappedH := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\tm := httpsnoop.CaptureMetrics(myH, w, r)\n\tlog.Printf(\n\t\t\"%s %s (code=%d dt=%s written=%d)\",\n\t\tr.Method,\n\t\tr.URL,\n\t\tm.Code,\n\t\tm.Duration,\n\t\tm.Written,\n\t)\n})\nhttp.ListenAndServe(\":8080\", wrappedH)\n```\n\n## Why this package exists\n\nInstrumenting an application's http.Handler is surprisingly difficult.\n\nHowever if you google for e.g. \"capture ResponseWriter status code\" you'll find\nlots of advise and code examples that suggest it to be a fairly trivial\nundertaking. Unfortunately everything I've seen so far has a high chance of\nbreaking your application.\n\nThe main problem is that a `http.ResponseWriter` often implements additional\ninterfaces such as `http.Flusher`, `http.CloseNotifier`, `http.Hijacker`, `http.Pusher`, and\n`io.ReaderFrom`. So the naive approach of just wrapping `http.ResponseWriter`\nin your own struct that also implements the `http.ResponseWriter` interface\nwill hide the additional interfaces mentioned above. This has a high change of\nintroducing subtle bugs into any non-trivial application.\n\nAnother approach I've seen people take is to return a struct that implements\nall of the interfaces above. However, that's also problematic, because it's\ndifficult to fake some of these interfaces behaviors when the underlying\n`http.ResponseWriter` doesn't have an implementation. It's also dangerous,\nbecause an application may choose to operate differently, merely because it\ndetects the presence of these additional interfaces.\n\nThis package solves this problem by checking which additional interfaces a\n`http.ResponseWriter` implements, returning a wrapped version implementing the\nexact same set of interfaces.\n\nAdditionally this package properly handles edge cases such as `WriteHeader` not\nbeing called, or called more than once, as well as concurrent calls to\n`http.ResponseWriter` methods, and even calls happening after the wrapped\n`ServeHTTP` has already returned.\n\nUnfortunately this package is not perfect either. It's possible that it is\nstill missing some interfaces provided by the go core (let me know if you find\none), and it won't work for applications adding their own interfaces into the\nmix. You can however use `httpsnoop.Unwrap(w)` to access the underlying\n`http.ResponseWriter` and type-assert the result to its other interfaces.\n\nHowever, hopefully the explanation above has sufficiently scared you of rolling\nyour own solution to this problem. httpsnoop may still break your application,\nbut at least it tries to avoid it as much as possible.\n\nAnyway, the real problem here is that smuggling additional interfaces inside\n`http.ResponseWriter` is a problematic design choice, but it probably goes as\ndeep as the Go language specification itself. But that's okay, I still prefer\nGo over the alternatives ;).\n\n## Performance\n\n```\nBenchmarkBaseline-8      \t   20000\t     94912 ns/op\nBenchmarkCaptureMetrics-8\t   20000\t     95461 ns/op\n```\n\nAs you can see, using `CaptureMetrics` on a vanilla http.Handler introduces an\noverhead of ~500 ns per http request on my machine. However, the margin of\nerror appears to be larger than that, therefor it should be reasonable to\nassume that the overhead introduced by `CaptureMetrics` is absolutely\nnegligible.\n\n## License\n\nMIT\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/capture_metrics.go",
    "content": "package httpsnoop\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"time\"\n)\n\n// Metrics holds metrics captured from CaptureMetrics.\ntype Metrics struct {\n\t// Code is the first http response code passed to the WriteHeader func of\n\t// the ResponseWriter. If no such call is made, a default code of 200 is\n\t// assumed instead.\n\tCode int\n\t// Duration is the time it took to execute the handler.\n\tDuration time.Duration\n\t// Written is the number of bytes successfully written by the Write or\n\t// ReadFrom function of the ResponseWriter. ResponseWriters may also write\n\t// data to their underlaying connection directly (e.g. headers), but those\n\t// are not tracked. Therefor the number of Written bytes will usually match\n\t// the size of the response body.\n\tWritten int64\n}\n\n// CaptureMetrics wraps the given hnd, executes it with the given w and r, and\n// returns the metrics it captured from it.\nfunc CaptureMetrics(hnd http.Handler, w http.ResponseWriter, r *http.Request) Metrics {\n\treturn CaptureMetricsFn(w, func(ww http.ResponseWriter) {\n\t\thnd.ServeHTTP(ww, r)\n\t})\n}\n\n// CaptureMetricsFn wraps w and calls fn with the wrapped w and returns the\n// resulting metrics. This is very similar to CaptureMetrics (which is just\n// sugar on top of this func), but is a more usable interface if your\n// application doesn't use the Go http.Handler interface.\nfunc CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metrics {\n\tm := Metrics{Code: http.StatusOK}\n\tm.CaptureMetrics(w, fn)\n\treturn m\n}\n\n// CaptureMetrics wraps w and calls fn with the wrapped w and updates\n// Metrics m with the resulting metrics. This is similar to CaptureMetricsFn,\n// but allows one to customize starting Metrics object.\nfunc (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) {\n\tvar (\n\t\tstart         = time.Now()\n\t\theaderWritten bool\n\t\thooks         = Hooks{\n\t\t\tWriteHeader: func(next WriteHeaderFunc) WriteHeaderFunc {\n\t\t\t\treturn func(code int) {\n\t\t\t\t\tnext(code)\n\n\t\t\t\t\tif !(code >= 100 && code <= 199) && !headerWritten {\n\t\t\t\t\t\tm.Code = code\n\t\t\t\t\t\theaderWritten = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tWrite: func(next WriteFunc) WriteFunc {\n\t\t\t\treturn func(p []byte) (int, error) {\n\t\t\t\t\tn, err := next(p)\n\n\t\t\t\t\tm.Written += int64(n)\n\t\t\t\t\theaderWritten = true\n\t\t\t\t\treturn n, err\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tReadFrom: func(next ReadFromFunc) ReadFromFunc {\n\t\t\t\treturn func(src io.Reader) (int64, error) {\n\t\t\t\t\tn, err := next(src)\n\n\t\t\t\t\theaderWritten = true\n\t\t\t\t\tm.Written += n\n\t\t\t\t\treturn n, err\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t)\n\n\tfn(Wrap(w, hooks))\n\tm.Duration += time.Since(start)\n}\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/docs.go",
    "content": "// Package httpsnoop provides an easy way to capture http related metrics (i.e.\n// response time, bytes written, and http status code) from your application's\n// http.Handlers.\n//\n// Doing this requires non-trivial wrapping of the http.ResponseWriter\n// interface, which is also exposed for users interested in a more low-level\n// API.\npackage httpsnoop\n\n//go:generate go run codegen/main.go\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go",
    "content": "// +build go1.8\n// Code generated by \"httpsnoop/codegen\"; DO NOT EDIT.\n\npackage httpsnoop\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n)\n\n// HeaderFunc is part of the http.ResponseWriter interface.\ntype HeaderFunc func() http.Header\n\n// WriteHeaderFunc is part of the http.ResponseWriter interface.\ntype WriteHeaderFunc func(code int)\n\n// WriteFunc is part of the http.ResponseWriter interface.\ntype WriteFunc func(b []byte) (int, error)\n\n// FlushFunc is part of the http.Flusher interface.\ntype FlushFunc func()\n\n// CloseNotifyFunc is part of the http.CloseNotifier interface.\ntype CloseNotifyFunc func() <-chan bool\n\n// HijackFunc is part of the http.Hijacker interface.\ntype HijackFunc func() (net.Conn, *bufio.ReadWriter, error)\n\n// ReadFromFunc is part of the io.ReaderFrom interface.\ntype ReadFromFunc func(src io.Reader) (int64, error)\n\n// PushFunc is part of the http.Pusher interface.\ntype PushFunc func(target string, opts *http.PushOptions) error\n\n// Hooks defines a set of method interceptors for methods included in\n// http.ResponseWriter as well as some others. You can think of them as\n// middleware for the function calls they target. See Wrap for more details.\ntype Hooks struct {\n\tHeader      func(HeaderFunc) HeaderFunc\n\tWriteHeader func(WriteHeaderFunc) WriteHeaderFunc\n\tWrite       func(WriteFunc) WriteFunc\n\tFlush       func(FlushFunc) FlushFunc\n\tCloseNotify func(CloseNotifyFunc) CloseNotifyFunc\n\tHijack      func(HijackFunc) HijackFunc\n\tReadFrom    func(ReadFromFunc) ReadFromFunc\n\tPush        func(PushFunc) PushFunc\n}\n\n// Wrap returns a wrapped version of w that provides the exact same interface\n// as w. Specifically if w implements any combination of:\n//\n// - http.Flusher\n// - http.CloseNotifier\n// - http.Hijacker\n// - io.ReaderFrom\n// - http.Pusher\n//\n// The wrapped version will implement the exact same combination. If no hooks\n// are set, the wrapped version also behaves exactly as w. Hooks targeting\n// methods not supported by w are ignored. Any other hooks will intercept the\n// method they target and may modify the call's arguments and/or return values.\n// The CaptureMetrics implementation serves as a working example for how the\n// hooks can be used.\nfunc Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {\n\trw := &rw{w: w, h: hooks}\n\t_, i0 := w.(http.Flusher)\n\t_, i1 := w.(http.CloseNotifier)\n\t_, i2 := w.(http.Hijacker)\n\t_, i3 := w.(io.ReaderFrom)\n\t_, i4 := w.(http.Pusher)\n\tswitch {\n\t// combination 1/32\n\tcase !i0 && !i1 && !i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t}{rw, rw}\n\t// combination 2/32\n\tcase !i0 && !i1 && !i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw}\n\t// combination 3/32\n\tcase !i0 && !i1 && !i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw}\n\t// combination 4/32\n\tcase !i0 && !i1 && !i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw}\n\t// combination 5/32\n\tcase !i0 && !i1 && i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw}\n\t// combination 6/32\n\tcase !i0 && !i1 && i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw}\n\t// combination 7/32\n\tcase !i0 && !i1 && i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 8/32\n\tcase !i0 && !i1 && i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 9/32\n\tcase !i0 && i1 && !i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t}{rw, rw, rw}\n\t// combination 10/32\n\tcase !i0 && i1 && !i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw}\n\t// combination 11/32\n\tcase !i0 && i1 && !i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 12/32\n\tcase !i0 && i1 && !i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 13/32\n\tcase !i0 && i1 && i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw}\n\t// combination 14/32\n\tcase !i0 && i1 && i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 15/32\n\tcase !i0 && i1 && i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 16/32\n\tcase !i0 && i1 && i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t// combination 17/32\n\tcase i0 && !i1 && !i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t}{rw, rw, rw}\n\t// combination 18/32\n\tcase i0 && !i1 && !i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw}\n\t// combination 19/32\n\tcase i0 && !i1 && !i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 20/32\n\tcase i0 && !i1 && !i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 21/32\n\tcase i0 && !i1 && i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw}\n\t// combination 22/32\n\tcase i0 && !i1 && i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 23/32\n\tcase i0 && !i1 && i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 24/32\n\tcase i0 && !i1 && i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t// combination 25/32\n\tcase i0 && i1 && !i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t}{rw, rw, rw, rw}\n\t// combination 26/32\n\tcase i0 && i1 && !i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 27/32\n\tcase i0 && i1 && !i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 28/32\n\tcase i0 && i1 && !i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t// combination 29/32\n\tcase i0 && i1 && i2 && !i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 30/32\n\tcase i0 && i1 && i2 && !i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t// combination 31/32\n\tcase i0 && i1 && i2 && i3 && !i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t// combination 32/32\n\tcase i0 && i1 && i2 && i3 && i4:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t\thttp.Pusher\n\t\t}{rw, rw, rw, rw, rw, rw, rw}\n\t}\n\tpanic(\"unreachable\")\n}\n\ntype rw struct {\n\tw http.ResponseWriter\n\th Hooks\n}\n\nfunc (w *rw) Unwrap() http.ResponseWriter {\n\treturn w.w\n}\n\nfunc (w *rw) Header() http.Header {\n\tf := w.w.(http.ResponseWriter).Header\n\tif w.h.Header != nil {\n\t\tf = w.h.Header(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) WriteHeader(code int) {\n\tf := w.w.(http.ResponseWriter).WriteHeader\n\tif w.h.WriteHeader != nil {\n\t\tf = w.h.WriteHeader(f)\n\t}\n\tf(code)\n}\n\nfunc (w *rw) Write(b []byte) (int, error) {\n\tf := w.w.(http.ResponseWriter).Write\n\tif w.h.Write != nil {\n\t\tf = w.h.Write(f)\n\t}\n\treturn f(b)\n}\n\nfunc (w *rw) Flush() {\n\tf := w.w.(http.Flusher).Flush\n\tif w.h.Flush != nil {\n\t\tf = w.h.Flush(f)\n\t}\n\tf()\n}\n\nfunc (w *rw) CloseNotify() <-chan bool {\n\tf := w.w.(http.CloseNotifier).CloseNotify\n\tif w.h.CloseNotify != nil {\n\t\tf = w.h.CloseNotify(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {\n\tf := w.w.(http.Hijacker).Hijack\n\tif w.h.Hijack != nil {\n\t\tf = w.h.Hijack(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) ReadFrom(src io.Reader) (int64, error) {\n\tf := w.w.(io.ReaderFrom).ReadFrom\n\tif w.h.ReadFrom != nil {\n\t\tf = w.h.ReadFrom(f)\n\t}\n\treturn f(src)\n}\n\nfunc (w *rw) Push(target string, opts *http.PushOptions) error {\n\tf := w.w.(http.Pusher).Push\n\tif w.h.Push != nil {\n\t\tf = w.h.Push(f)\n\t}\n\treturn f(target, opts)\n}\n\ntype Unwrapper interface {\n\tUnwrap() http.ResponseWriter\n}\n\n// Unwrap returns the underlying http.ResponseWriter from within zero or more\n// layers of httpsnoop wrappers.\nfunc Unwrap(w http.ResponseWriter) http.ResponseWriter {\n\tif rw, ok := w.(Unwrapper); ok {\n\t\t// recurse until rw.Unwrap() returns a non-Unwrapper\n\t\treturn Unwrap(rw.Unwrap())\n\t} else {\n\t\treturn w\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go",
    "content": "// +build !go1.8\n// Code generated by \"httpsnoop/codegen\"; DO NOT EDIT.\n\npackage httpsnoop\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n)\n\n// HeaderFunc is part of the http.ResponseWriter interface.\ntype HeaderFunc func() http.Header\n\n// WriteHeaderFunc is part of the http.ResponseWriter interface.\ntype WriteHeaderFunc func(code int)\n\n// WriteFunc is part of the http.ResponseWriter interface.\ntype WriteFunc func(b []byte) (int, error)\n\n// FlushFunc is part of the http.Flusher interface.\ntype FlushFunc func()\n\n// CloseNotifyFunc is part of the http.CloseNotifier interface.\ntype CloseNotifyFunc func() <-chan bool\n\n// HijackFunc is part of the http.Hijacker interface.\ntype HijackFunc func() (net.Conn, *bufio.ReadWriter, error)\n\n// ReadFromFunc is part of the io.ReaderFrom interface.\ntype ReadFromFunc func(src io.Reader) (int64, error)\n\n// Hooks defines a set of method interceptors for methods included in\n// http.ResponseWriter as well as some others. You can think of them as\n// middleware for the function calls they target. See Wrap for more details.\ntype Hooks struct {\n\tHeader      func(HeaderFunc) HeaderFunc\n\tWriteHeader func(WriteHeaderFunc) WriteHeaderFunc\n\tWrite       func(WriteFunc) WriteFunc\n\tFlush       func(FlushFunc) FlushFunc\n\tCloseNotify func(CloseNotifyFunc) CloseNotifyFunc\n\tHijack      func(HijackFunc) HijackFunc\n\tReadFrom    func(ReadFromFunc) ReadFromFunc\n}\n\n// Wrap returns a wrapped version of w that provides the exact same interface\n// as w. Specifically if w implements any combination of:\n//\n// - http.Flusher\n// - http.CloseNotifier\n// - http.Hijacker\n// - io.ReaderFrom\n//\n// The wrapped version will implement the exact same combination. If no hooks\n// are set, the wrapped version also behaves exactly as w. Hooks targeting\n// methods not supported by w are ignored. Any other hooks will intercept the\n// method they target and may modify the call's arguments and/or return values.\n// The CaptureMetrics implementation serves as a working example for how the\n// hooks can be used.\nfunc Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {\n\trw := &rw{w: w, h: hooks}\n\t_, i0 := w.(http.Flusher)\n\t_, i1 := w.(http.CloseNotifier)\n\t_, i2 := w.(http.Hijacker)\n\t_, i3 := w.(io.ReaderFrom)\n\tswitch {\n\t// combination 1/16\n\tcase !i0 && !i1 && !i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t}{rw, rw}\n\t// combination 2/16\n\tcase !i0 && !i1 && !i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw}\n\t// combination 3/16\n\tcase !i0 && !i1 && i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw}\n\t// combination 4/16\n\tcase !i0 && !i1 && i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 5/16\n\tcase !i0 && i1 && !i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t}{rw, rw, rw}\n\t// combination 6/16\n\tcase !i0 && i1 && !i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 7/16\n\tcase !i0 && i1 && i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw}\n\t// combination 8/16\n\tcase !i0 && i1 && i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 9/16\n\tcase i0 && !i1 && !i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t}{rw, rw, rw}\n\t// combination 10/16\n\tcase i0 && !i1 && !i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw}\n\t// combination 11/16\n\tcase i0 && !i1 && i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw}\n\t// combination 12/16\n\tcase i0 && !i1 && i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 13/16\n\tcase i0 && i1 && !i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t}{rw, rw, rw, rw}\n\t// combination 14/16\n\tcase i0 && i1 && !i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 15/16\n\tcase i0 && i1 && i2 && !i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t}{rw, rw, rw, rw, rw}\n\t// combination 16/16\n\tcase i0 && i1 && i2 && i3:\n\t\treturn struct {\n\t\t\tUnwrapper\n\t\t\thttp.ResponseWriter\n\t\t\thttp.Flusher\n\t\t\thttp.CloseNotifier\n\t\t\thttp.Hijacker\n\t\t\tio.ReaderFrom\n\t\t}{rw, rw, rw, rw, rw, rw}\n\t}\n\tpanic(\"unreachable\")\n}\n\ntype rw struct {\n\tw http.ResponseWriter\n\th Hooks\n}\n\nfunc (w *rw) Unwrap() http.ResponseWriter {\n\treturn w.w\n}\n\nfunc (w *rw) Header() http.Header {\n\tf := w.w.(http.ResponseWriter).Header\n\tif w.h.Header != nil {\n\t\tf = w.h.Header(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) WriteHeader(code int) {\n\tf := w.w.(http.ResponseWriter).WriteHeader\n\tif w.h.WriteHeader != nil {\n\t\tf = w.h.WriteHeader(f)\n\t}\n\tf(code)\n}\n\nfunc (w *rw) Write(b []byte) (int, error) {\n\tf := w.w.(http.ResponseWriter).Write\n\tif w.h.Write != nil {\n\t\tf = w.h.Write(f)\n\t}\n\treturn f(b)\n}\n\nfunc (w *rw) Flush() {\n\tf := w.w.(http.Flusher).Flush\n\tif w.h.Flush != nil {\n\t\tf = w.h.Flush(f)\n\t}\n\tf()\n}\n\nfunc (w *rw) CloseNotify() <-chan bool {\n\tf := w.w.(http.CloseNotifier).CloseNotify\n\tif w.h.CloseNotify != nil {\n\t\tf = w.h.CloseNotify(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {\n\tf := w.w.(http.Hijacker).Hijack\n\tif w.h.Hijack != nil {\n\t\tf = w.h.Hijack(f)\n\t}\n\treturn f()\n}\n\nfunc (w *rw) ReadFrom(src io.Reader) (int64, error) {\n\tf := w.w.(io.ReaderFrom).ReadFrom\n\tif w.h.ReadFrom != nil {\n\t\tf = w.h.ReadFrom(f)\n\t}\n\treturn f(src)\n}\n\ntype Unwrapper interface {\n\tUnwrap() http.ResponseWriter\n}\n\n// Unwrap returns the underlying http.ResponseWriter from within zero or more\n// layers of httpsnoop wrappers.\nfunc Unwrap(w http.ResponseWriter) http.ResponseWriter {\n\tif rw, ok := w.(Unwrapper); ok {\n\t\t// recurse until rw.Unwrap() returns a non-Unwrapper\n\t\treturn Unwrap(rw.Unwrap())\n\t} else {\n\t\treturn w\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/.gitignore",
    "content": "jose-util/jose-util\njose-util.t.err"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/.golangci.yml",
    "content": "# https://github.com/golangci/golangci-lint\n\nrun:\n  skip-files:\n    - doc_test.go\n  modules-download-mode: readonly\n\nlinters:\n  enable-all: true\n  disable:\n    - gochecknoglobals\n    - goconst\n    - lll\n    - maligned\n    - nakedret\n    - scopelint\n    - unparam\n    - funlen # added in 1.18 (requires go-jose changes before it can be enabled)\n\nlinters-settings:\n  gocyclo:\n    min-complexity: 35\n\nissues:\n  exclude-rules:\n    - text: \"don't use ALL_CAPS in Go names\"\n      linters:\n        - golint\n    - text: \"hardcoded credentials\"\n      linters:\n        - gosec\n    - text: \"weak cryptographic primitive\"\n      linters:\n        - gosec\n    - path: json/\n      linters:\n        - dupl\n        - errcheck\n        - gocritic\n        - gocyclo\n        - golint\n        - govet\n        - ineffassign\n        - staticcheck\n        - structcheck\n        - stylecheck\n        - unused\n    - path: _test\\.go\n      linters:\n        - scopelint\n    - path: jwk.go\n      linters:\n        - gocyclo\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/.travis.yml",
    "content": "language: go\n\nmatrix:\n  fast_finish: true\n  allow_failures:\n    - go: tip\n\ngo:\n  - \"1.13.x\"\n  - \"1.14.x\"\n  - tip\n\nbefore_script:\n  - export PATH=$HOME/.local/bin:$PATH\n\nbefore_install:\n  - go get -u github.com/mattn/goveralls github.com/wadey/gocovmerge\n  - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0\n  - pip install cram --user\n\nscript:\n  - go test -v -covermode=count -coverprofile=profile.cov .\n  - go test -v -covermode=count -coverprofile=cryptosigner/profile.cov ./cryptosigner\n  - go test -v -covermode=count -coverprofile=cipher/profile.cov ./cipher\n  - go test -v -covermode=count -coverprofile=jwt/profile.cov ./jwt\n  - go test -v ./json  # no coverage for forked encoding/json package\n  - golangci-lint run\n  - cd jose-util && go build && PATH=$PWD:$PATH cram -v jose-util.t # cram tests jose-util\n  - cd ..\n\nafter_success:\n  - gocovmerge *.cov */*.cov > merged.coverprofile\n  - goveralls -coverprofile merged.coverprofile -service=travis-ci\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/CONTRIBUTING.md",
    "content": "# Contributing\n\nIf you would like to contribute code to go-jose you can do so through GitHub by\nforking the repository and sending a pull request.\n\nWhen submitting code, please make every effort to follow existing conventions\nand style in order to keep the code as readable as possible. Please also make\nsure all tests pass by running `go test`, and format your code with `go fmt`.\nWe also recommend using `golint` and `errcheck`.\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/LICENSE",
    "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 [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": "vendor/github.com/go-jose/go-jose/v4/README.md",
    "content": "# Go JOSE\n\n[![godoc](https://pkg.go.dev/badge/github.com/go-jose/go-jose/v4.svg)](https://pkg.go.dev/github.com/go-jose/go-jose/v4)\n[![godoc](https://pkg.go.dev/badge/github.com/go-jose/go-jose/v4/jwt.svg)](https://pkg.go.dev/github.com/go-jose/go-jose/v4/jwt)\n[![license](https://img.shields.io/badge/license-apache_2.0-blue.svg?style=flat)](https://raw.githubusercontent.com/go-jose/go-jose/master/LICENSE)\n\nPackage jose aims to provide an implementation of the Javascript Object Signing\nand Encryption set of standards. This includes support for JSON Web Encryption,\nJSON Web Signature, and JSON Web Token standards.\n\n## Overview\n\nThe implementation follows the\n[JSON Web Encryption](https://dx.doi.org/10.17487/RFC7516) (RFC 7516),\n[JSON Web Signature](https://dx.doi.org/10.17487/RFC7515) (RFC 7515), and\n[JSON Web Token](https://dx.doi.org/10.17487/RFC7519) (RFC 7519) specifications.\nTables of supported algorithms are shown below. The library supports both\nthe compact and JWS/JWE JSON Serialization formats, and has optional support for\nmultiple recipients. It also comes with a small command-line utility\n([`jose-util`](https://pkg.go.dev/github.com/go-jose/go-jose/jose-util))\nfor dealing with JOSE messages in a shell.\n\n**Note**: We use a forked version of the `encoding/json` package from the Go\nstandard library which uses case-sensitive matching for member names (instead\nof [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html)).\nThis is to avoid differences in interpretation of messages between go-jose and\nlibraries in other languages.\n\n### Versions\n\nThe forthcoming Version 5 will be released with several breaking API changes,\nand will require Golang's `encoding/json/v2`, which is currently requires \nGo 1.25 built with GOEXPERIMENT=jsonv2.\n\nVersion 4 is the current stable version:\n\n    import \"github.com/go-jose/go-jose/v4\"\n\nIt supports at least the current and previous Golang release. Currently it\nrequires Golang 1.24.\n\nVersion 3 is only receiving critical security updates. Migration to Version 4 is recommended.\n\nVersions 1 and 2 are obsolete, but can be found in the old repository, [square/go-jose](https://github.com/square/go-jose).\n\n### Supported algorithms\n\nSee below for a table of supported algorithms. Algorithm identifiers match\nthe names in the [JSON Web Algorithms](https://dx.doi.org/10.17487/RFC7518)\nstandard where possible. The Godoc reference has a list of constants.\n\n| Key encryption         | Algorithm identifier(s)                        |\n|:-----------------------|:-----------------------------------------------|\n| RSA-PKCS#1v1.5         | RSA1_5                                         |\n| RSA-OAEP               | RSA-OAEP, RSA-OAEP-256                         |\n| AES key wrap           | A128KW, A192KW, A256KW                         |\n| AES-GCM key wrap       | A128GCMKW, A192GCMKW, A256GCMKW                |\n| ECDH-ES + AES key wrap | ECDH-ES+A128KW, ECDH-ES+A192KW, ECDH-ES+A256KW |\n| ECDH-ES (direct)       | ECDH-ES<sup>1</sup>                            |\n| Direct encryption      | dir<sup>1</sup>                                |\n\n<sup>1. Not supported in multi-recipient mode</sup>\n\n| Signing / MAC     | Algorithm identifier(s) |\n|:------------------|:------------------------|\n| RSASSA-PKCS#1v1.5 | RS256, RS384, RS512     |\n| RSASSA-PSS        | PS256, PS384, PS512     |\n| HMAC              | HS256, HS384, HS512     |\n| ECDSA             | ES256, ES384, ES512     |\n| Ed25519           | EdDSA<sup>2</sup>       |\n\n<sup>2. Only available in version 2 of the package</sup>\n\n| Content encryption | Algorithm identifier(s)                     |\n|:-------------------|:--------------------------------------------|\n| AES-CBC+HMAC       | A128CBC-HS256, A192CBC-HS384, A256CBC-HS512 |\n| AES-GCM            | A128GCM, A192GCM, A256GCM                   |\n\n| Compression        | Algorithm identifiers(s) |\n|:-------------------|--------------------------|\n| DEFLATE (RFC 1951) | DEF                      |\n\n### Supported key types\n\nSee below for a table of supported key types. These are understood by the\nlibrary, and can be passed to corresponding functions such as `NewEncrypter` or\n`NewSigner`. Each of these keys can also be wrapped in a JWK if desired, which\nallows attaching a key id.\n\n| Algorithm(s)      | Corresponding types                                                                                                                  |\n|:------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| RSA               | *[rsa.PublicKey](https://pkg.go.dev/crypto/rsa/#PublicKey), *[rsa.PrivateKey](https://pkg.go.dev/crypto/rsa/#PrivateKey)             |\n| ECDH, ECDSA       | *[ecdsa.PublicKey](https://pkg.go.dev/crypto/ecdsa/#PublicKey), *[ecdsa.PrivateKey](https://pkg.go.dev/crypto/ecdsa/#PrivateKey)     |\n| EdDSA<sup>1</sup> | [ed25519.PublicKey](https://pkg.go.dev/crypto/ed25519#PublicKey), [ed25519.PrivateKey](https://pkg.go.dev/crypto/ed25519#PrivateKey) |\n| AES, HMAC         | []byte                                                                                                                               |\n\n<sup>1. Only available in version 2 or later of the package</sup>\n\n## Examples\n\n[![godoc](https://pkg.go.dev/badge/github.com/go-jose/go-jose/v4.svg)](https://pkg.go.dev/github.com/go-jose/go-jose/v4)\n[![godoc](https://pkg.go.dev/badge/github.com/go-jose/go-jose/v4/jwt.svg)](https://pkg.go.dev/github.com/go-jose/go-jose/v4/jwt)\n\nExamples can be found in the Godoc\nreference for this package. The\n[`jose-util`](https://github.com/go-jose/go-jose/tree/main/jose-util)\nsubdirectory also contains a small command-line utility which might be useful\nas an example as well.\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/SECURITY.md",
    "content": "# Security Policy\nThis document explains how to contact the Let's Encrypt security team to report security vulnerabilities.\n\n## Supported Versions\n| Version | Supported |\n| ------- | ----------|\n| >= v3   | &check; |\n| v2      | &cross; |\n| v1      | &cross; |\n\n## Reporting a vulnerability\n\nPlease see [https://letsencrypt.org/contact/#security](https://letsencrypt.org/contact/#security) for the email address to report a vulnerability. Ensure that the subject line for your report contains the word `vulnerability` and is descriptive. Your email should be acknowledged within 24 hours. If you do not receive a response within 24 hours, please follow-up again with another email.\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/asymmetric.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"crypto\"\n\t\"crypto/aes\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\"\n\t\"crypto/sha256\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\n\tjosecipher \"github.com/go-jose/go-jose/v4/cipher\"\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// A generic RSA-based encrypter/verifier\ntype rsaEncrypterVerifier struct {\n\tpublicKey *rsa.PublicKey\n}\n\n// A generic RSA-based decrypter/signer\ntype rsaDecrypterSigner struct {\n\tprivateKey *rsa.PrivateKey\n}\n\n// A generic EC-based encrypter/verifier\ntype ecEncrypterVerifier struct {\n\tpublicKey *ecdsa.PublicKey\n}\n\ntype edEncrypterVerifier struct {\n\tpublicKey ed25519.PublicKey\n}\n\n// A key generator for ECDH-ES\ntype ecKeyGenerator struct {\n\tsize      int\n\talgID     string\n\tpublicKey *ecdsa.PublicKey\n}\n\n// A generic EC-based decrypter/signer\ntype ecDecrypterSigner struct {\n\tprivateKey *ecdsa.PrivateKey\n}\n\ntype edDecrypterSigner struct {\n\tprivateKey ed25519.PrivateKey\n}\n\n// newRSARecipient creates recipientKeyInfo based on the given key.\nfunc newRSARecipient(keyAlg KeyAlgorithm, publicKey *rsa.PublicKey) (recipientKeyInfo, error) {\n\t// Verify that key management algorithm is supported by this encrypter\n\tswitch keyAlg {\n\tcase RSA1_5, RSA_OAEP, RSA_OAEP_256:\n\tdefault:\n\t\treturn recipientKeyInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tif publicKey == nil {\n\t\treturn recipientKeyInfo{}, errors.New(\"invalid public key\")\n\t}\n\n\treturn recipientKeyInfo{\n\t\tkeyAlg: keyAlg,\n\t\tkeyEncrypter: &rsaEncrypterVerifier{\n\t\t\tpublicKey: publicKey,\n\t\t},\n\t}, nil\n}\n\n// newRSASigner creates a recipientSigInfo based on the given key.\nfunc newRSASigner(sigAlg SignatureAlgorithm, privateKey *rsa.PrivateKey) (recipientSigInfo, error) {\n\t// Verify that key management algorithm is supported by this encrypter\n\tswitch sigAlg {\n\tcase RS256, RS384, RS512, PS256, PS384, PS512:\n\tdefault:\n\t\treturn recipientSigInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tif privateKey == nil {\n\t\treturn recipientSigInfo{}, errors.New(\"invalid private key\")\n\t}\n\n\treturn recipientSigInfo{\n\t\tsigAlg: sigAlg,\n\t\tpublicKey: staticPublicKey(&JSONWebKey{\n\t\t\tKey: privateKey.Public(),\n\t\t}),\n\t\tsigner: &rsaDecrypterSigner{\n\t\t\tprivateKey: privateKey,\n\t\t},\n\t}, nil\n}\n\nfunc newEd25519Signer(sigAlg SignatureAlgorithm, privateKey ed25519.PrivateKey) (recipientSigInfo, error) {\n\tif sigAlg != EdDSA {\n\t\treturn recipientSigInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tif privateKey == nil {\n\t\treturn recipientSigInfo{}, errors.New(\"invalid private key\")\n\t}\n\treturn recipientSigInfo{\n\t\tsigAlg: sigAlg,\n\t\tpublicKey: staticPublicKey(&JSONWebKey{\n\t\t\tKey: privateKey.Public(),\n\t\t}),\n\t\tsigner: &edDecrypterSigner{\n\t\t\tprivateKey: privateKey,\n\t\t},\n\t}, nil\n}\n\n// newECDHRecipient creates recipientKeyInfo based on the given key.\nfunc newECDHRecipient(keyAlg KeyAlgorithm, publicKey *ecdsa.PublicKey) (recipientKeyInfo, error) {\n\t// Verify that key management algorithm is supported by this encrypter\n\tswitch keyAlg {\n\tcase ECDH_ES, ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:\n\tdefault:\n\t\treturn recipientKeyInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tif publicKey == nil || !publicKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {\n\t\treturn recipientKeyInfo{}, errors.New(\"invalid public key\")\n\t}\n\n\treturn recipientKeyInfo{\n\t\tkeyAlg: keyAlg,\n\t\tkeyEncrypter: &ecEncrypterVerifier{\n\t\t\tpublicKey: publicKey,\n\t\t},\n\t}, nil\n}\n\n// newECDSASigner creates a recipientSigInfo based on the given key.\nfunc newECDSASigner(sigAlg SignatureAlgorithm, privateKey *ecdsa.PrivateKey) (recipientSigInfo, error) {\n\t// Verify that key management algorithm is supported by this encrypter\n\tswitch sigAlg {\n\tcase ES256, ES384, ES512:\n\tdefault:\n\t\treturn recipientSigInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tif privateKey == nil {\n\t\treturn recipientSigInfo{}, errors.New(\"invalid private key\")\n\t}\n\n\treturn recipientSigInfo{\n\t\tsigAlg: sigAlg,\n\t\tpublicKey: staticPublicKey(&JSONWebKey{\n\t\t\tKey: privateKey.Public(),\n\t\t}),\n\t\tsigner: &ecDecrypterSigner{\n\t\t\tprivateKey: privateKey,\n\t\t},\n\t}, nil\n}\n\n// Encrypt the given payload and update the object.\nfunc (ctx rsaEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {\n\tencryptedKey, err := ctx.encrypt(cek, alg)\n\tif err != nil {\n\t\treturn recipientInfo{}, err\n\t}\n\n\treturn recipientInfo{\n\t\tencryptedKey: encryptedKey,\n\t\theader:       &rawHeader{},\n\t}, nil\n}\n\n// Encrypt the given payload. Based on the key encryption algorithm,\n// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).\nfunc (ctx rsaEncrypterVerifier) encrypt(cek []byte, alg KeyAlgorithm) ([]byte, error) {\n\tswitch alg {\n\tcase RSA1_5:\n\t\treturn rsa.EncryptPKCS1v15(RandReader, ctx.publicKey, cek)\n\tcase RSA_OAEP:\n\t\treturn rsa.EncryptOAEP(sha1.New(), RandReader, ctx.publicKey, cek, []byte{})\n\tcase RSA_OAEP_256:\n\t\treturn rsa.EncryptOAEP(sha256.New(), RandReader, ctx.publicKey, cek, []byte{})\n\t}\n\n\treturn nil, ErrUnsupportedAlgorithm\n}\n\n// Decrypt the given payload and return the content encryption key.\nfunc (ctx rsaDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {\n\treturn ctx.decrypt(recipient.encryptedKey, headers.getAlgorithm(), generator)\n}\n\n// Decrypt the given payload. Based on the key encryption algorithm,\n// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).\nfunc (ctx rsaDecrypterSigner) decrypt(jek []byte, alg KeyAlgorithm, generator keyGenerator) ([]byte, error) {\n\t// Note: The random reader on decrypt operations is only used for blinding,\n\t// so stubbing is meanlingless (hence the direct use of rand.Reader).\n\tswitch alg {\n\tcase RSA1_5:\n\t\tdefer func() {\n\t\t\t// DecryptPKCS1v15SessionKey sometimes panics on an invalid payload\n\t\t\t// because of an index out of bounds error, which we want to ignore.\n\t\t\t// This has been fixed in Go 1.3.1 (released 2014/08/13), the recover()\n\t\t\t// only exists for preventing crashes with unpatched versions.\n\t\t\t// See: https://groups.google.com/forum/#!topic/golang-dev/7ihX6Y6kx9k\n\t\t\t// See: https://code.google.com/p/go/source/detail?r=58ee390ff31602edb66af41ed10901ec95904d33\n\t\t\t_ = recover()\n\t\t}()\n\n\t\t// Perform some input validation.\n\t\tkeyBytes := ctx.privateKey.PublicKey.N.BitLen() / 8\n\t\tif keyBytes != len(jek) {\n\t\t\t// Input size is incorrect, the encrypted payload should always match\n\t\t\t// the size of the public modulus (e.g. using a 2048 bit key will\n\t\t\t// produce 256 bytes of output). Reject this since it's invalid input.\n\t\t\treturn nil, ErrCryptoFailure\n\t\t}\n\n\t\tcek, _, err := generator.genKey()\n\t\tif err != nil {\n\t\t\treturn nil, ErrCryptoFailure\n\t\t}\n\n\t\t// When decrypting an RSA-PKCS1v1.5 payload, we must take precautions to\n\t\t// prevent chosen-ciphertext attacks as described in RFC 3218, \"Preventing\n\t\t// the Million Message Attack on Cryptographic Message Syntax\". We are\n\t\t// therefore deliberately ignoring errors here.\n\t\t_ = rsa.DecryptPKCS1v15SessionKey(rand.Reader, ctx.privateKey, jek, cek)\n\n\t\treturn cek, nil\n\tcase RSA_OAEP:\n\t\t// Use rand.Reader for RSA blinding\n\t\treturn rsa.DecryptOAEP(sha1.New(), rand.Reader, ctx.privateKey, jek, []byte{})\n\tcase RSA_OAEP_256:\n\t\t// Use rand.Reader for RSA blinding\n\t\treturn rsa.DecryptOAEP(sha256.New(), rand.Reader, ctx.privateKey, jek, []byte{})\n\t}\n\n\treturn nil, ErrUnsupportedAlgorithm\n}\n\n// Sign the given payload\nfunc (ctx rsaDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {\n\tvar hash crypto.Hash\n\n\tswitch alg {\n\tcase RS256, PS256:\n\t\thash = crypto.SHA256\n\tcase RS384, PS384:\n\t\thash = crypto.SHA384\n\tcase RS512, PS512:\n\t\thash = crypto.SHA512\n\tdefault:\n\t\treturn Signature{}, ErrUnsupportedAlgorithm\n\t}\n\n\thasher := hash.New()\n\n\t// According to documentation, Write() on hash never fails\n\t_, _ = hasher.Write(payload)\n\thashed := hasher.Sum(nil)\n\n\tvar out []byte\n\tvar err error\n\n\tswitch alg {\n\tcase RS256, RS384, RS512:\n\t\t// TODO(https://github.com/go-jose/go-jose/issues/40): As of go1.20, the\n\t\t// random parameter is legacy and ignored, and it can be nil.\n\t\t// https://cs.opensource.google/go/go/+/refs/tags/go1.20:src/crypto/rsa/pkcs1v15.go;l=263;bpv=0;bpt=1\n\t\tout, err = rsa.SignPKCS1v15(RandReader, ctx.privateKey, hash, hashed)\n\tcase PS256, PS384, PS512:\n\t\tout, err = rsa.SignPSS(RandReader, ctx.privateKey, hash, hashed, &rsa.PSSOptions{\n\t\t\tSaltLength: rsa.PSSSaltLengthEqualsHash,\n\t\t})\n\t}\n\n\tif err != nil {\n\t\treturn Signature{}, err\n\t}\n\n\treturn Signature{\n\t\tSignature: out,\n\t\tprotected: &rawHeader{},\n\t}, nil\n}\n\n// Verify the given payload\nfunc (ctx rsaEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {\n\tvar hash crypto.Hash\n\n\tswitch alg {\n\tcase RS256, PS256:\n\t\thash = crypto.SHA256\n\tcase RS384, PS384:\n\t\thash = crypto.SHA384\n\tcase RS512, PS512:\n\t\thash = crypto.SHA512\n\tdefault:\n\t\treturn ErrUnsupportedAlgorithm\n\t}\n\n\thasher := hash.New()\n\n\t// According to documentation, Write() on hash never fails\n\t_, _ = hasher.Write(payload)\n\thashed := hasher.Sum(nil)\n\n\tswitch alg {\n\tcase RS256, RS384, RS512:\n\t\treturn rsa.VerifyPKCS1v15(ctx.publicKey, hash, hashed, signature)\n\tcase PS256, PS384, PS512:\n\t\treturn rsa.VerifyPSS(ctx.publicKey, hash, hashed, signature, nil)\n\t}\n\n\treturn ErrUnsupportedAlgorithm\n}\n\n// Encrypt the given payload and update the object.\nfunc (ctx ecEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {\n\tswitch alg {\n\tcase ECDH_ES:\n\t\t// ECDH-ES mode doesn't wrap a key, the shared secret is used directly as the key.\n\t\treturn recipientInfo{\n\t\t\theader: &rawHeader{},\n\t\t}, nil\n\tcase ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:\n\tdefault:\n\t\treturn recipientInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\tgenerator := ecKeyGenerator{\n\t\talgID:     string(alg),\n\t\tpublicKey: ctx.publicKey,\n\t}\n\n\tswitch alg {\n\tcase ECDH_ES_A128KW:\n\t\tgenerator.size = 16\n\tcase ECDH_ES_A192KW:\n\t\tgenerator.size = 24\n\tcase ECDH_ES_A256KW:\n\t\tgenerator.size = 32\n\t}\n\n\tkek, header, err := generator.genKey()\n\tif err != nil {\n\t\treturn recipientInfo{}, err\n\t}\n\n\tblock, err := aes.NewCipher(kek)\n\tif err != nil {\n\t\treturn recipientInfo{}, err\n\t}\n\n\tjek, err := josecipher.KeyWrap(block, cek)\n\tif err != nil {\n\t\treturn recipientInfo{}, err\n\t}\n\n\treturn recipientInfo{\n\t\tencryptedKey: jek,\n\t\theader:       &header,\n\t}, nil\n}\n\n// Get key size for EC key generator\nfunc (ctx ecKeyGenerator) keySize() int {\n\treturn ctx.size\n}\n\n// Get a content encryption key for ECDH-ES\nfunc (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) {\n\tpriv, err := ecdsa.GenerateKey(ctx.publicKey.Curve, RandReader)\n\tif err != nil {\n\t\treturn nil, rawHeader{}, err\n\t}\n\n\tout := josecipher.DeriveECDHES(ctx.algID, []byte{}, []byte{}, priv, ctx.publicKey, ctx.size)\n\n\tb, err := json.Marshal(&JSONWebKey{\n\t\tKey: &priv.PublicKey,\n\t})\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\theaders := rawHeader{\n\t\theaderEPK: makeRawMessage(b),\n\t}\n\n\treturn out, headers, nil\n}\n\n// Decrypt the given payload and return the content encryption key.\nfunc (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {\n\tepk, err := headers.getEPK()\n\tif err != nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid epk header\")\n\t}\n\tif epk == nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: missing epk header\")\n\t}\n\n\tpublicKey, ok := epk.Key.(*ecdsa.PublicKey)\n\tif publicKey == nil || !ok {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid epk header\")\n\t}\n\n\tif !ctx.privateKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid public key in epk header\")\n\t}\n\n\tapuData, err := headers.getAPU()\n\tif err != nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid apu header\")\n\t}\n\tapvData, err := headers.getAPV()\n\tif err != nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid apv header\")\n\t}\n\n\tderiveKey := func(algID string, size int) []byte {\n\t\treturn josecipher.DeriveECDHES(algID, apuData.bytes(), apvData.bytes(), ctx.privateKey, publicKey, size)\n\t}\n\n\tvar keySize int\n\n\talgorithm := headers.getAlgorithm()\n\tswitch algorithm {\n\tcase ECDH_ES:\n\t\t// ECDH-ES uses direct key agreement, no key unwrapping necessary.\n\t\treturn deriveKey(string(headers.getEncryption()), generator.keySize()), nil\n\tcase ECDH_ES_A128KW:\n\t\tkeySize = 16\n\tcase ECDH_ES_A192KW:\n\t\tkeySize = 24\n\tcase ECDH_ES_A256KW:\n\t\tkeySize = 32\n\tdefault:\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n\n\tkey := deriveKey(string(algorithm), keySize)\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn josecipher.KeyUnwrap(block, recipient.encryptedKey)\n}\n\nfunc (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {\n\tif alg != EdDSA {\n\t\treturn Signature{}, ErrUnsupportedAlgorithm\n\t}\n\n\tsig, err := ctx.privateKey.Sign(RandReader, payload, crypto.Hash(0))\n\tif err != nil {\n\t\treturn Signature{}, err\n\t}\n\n\treturn Signature{\n\t\tSignature: sig,\n\t\tprotected: &rawHeader{},\n\t}, nil\n}\n\nfunc (ctx edEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {\n\tif alg != EdDSA {\n\t\treturn ErrUnsupportedAlgorithm\n\t}\n\tok := ed25519.Verify(ctx.publicKey, payload, signature)\n\tif !ok {\n\t\treturn errors.New(\"go-jose/go-jose: ed25519 signature failed to verify\")\n\t}\n\treturn nil\n}\n\n// Sign the given payload\nfunc (ctx ecDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {\n\tvar expectedBitSize int\n\tvar hash crypto.Hash\n\n\tswitch alg {\n\tcase ES256:\n\t\texpectedBitSize = 256\n\t\thash = crypto.SHA256\n\tcase ES384:\n\t\texpectedBitSize = 384\n\t\thash = crypto.SHA384\n\tcase ES512:\n\t\texpectedBitSize = 521\n\t\thash = crypto.SHA512\n\t}\n\n\tcurveBits := ctx.privateKey.Curve.Params().BitSize\n\tif expectedBitSize != curveBits {\n\t\treturn Signature{}, fmt.Errorf(\"go-jose/go-jose: expected %d bit key, got %d bits instead\", expectedBitSize, curveBits)\n\t}\n\n\thasher := hash.New()\n\n\t// According to documentation, Write() on hash never fails\n\t_, _ = hasher.Write(payload)\n\thashed := hasher.Sum(nil)\n\n\tr, s, err := ecdsa.Sign(RandReader, ctx.privateKey, hashed)\n\tif err != nil {\n\t\treturn Signature{}, err\n\t}\n\n\tkeyBytes := curveBits / 8\n\tif curveBits%8 > 0 {\n\t\tkeyBytes++\n\t}\n\n\t// We serialize the outputs (r and s) into big-endian byte arrays and pad\n\t// them with zeros on the left to make sure the sizes work out. Both arrays\n\t// must be keyBytes long, and the output must be 2*keyBytes long.\n\trBytes := r.Bytes()\n\trBytesPadded := make([]byte, keyBytes)\n\tcopy(rBytesPadded[keyBytes-len(rBytes):], rBytes)\n\n\tsBytes := s.Bytes()\n\tsBytesPadded := make([]byte, keyBytes)\n\tcopy(sBytesPadded[keyBytes-len(sBytes):], sBytes)\n\n\tout := append(rBytesPadded, sBytesPadded...)\n\n\treturn Signature{\n\t\tSignature: out,\n\t\tprotected: &rawHeader{},\n\t}, nil\n}\n\n// Verify the given payload\nfunc (ctx ecEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {\n\tvar keySize int\n\tvar hash crypto.Hash\n\n\tswitch alg {\n\tcase ES256:\n\t\tkeySize = 32\n\t\thash = crypto.SHA256\n\tcase ES384:\n\t\tkeySize = 48\n\t\thash = crypto.SHA384\n\tcase ES512:\n\t\tkeySize = 66\n\t\thash = crypto.SHA512\n\tdefault:\n\t\treturn ErrUnsupportedAlgorithm\n\t}\n\n\tif len(signature) != 2*keySize {\n\t\treturn fmt.Errorf(\"go-jose/go-jose: invalid signature size, have %d bytes, wanted %d\", len(signature), 2*keySize)\n\t}\n\n\thasher := hash.New()\n\n\t// According to documentation, Write() on hash never fails\n\t_, _ = hasher.Write(payload)\n\thashed := hasher.Sum(nil)\n\n\tr := big.NewInt(0).SetBytes(signature[:keySize])\n\ts := big.NewInt(0).SetBytes(signature[keySize:])\n\n\tmatch := ecdsa.Verify(ctx.publicKey, hashed, r, s)\n\tif !match {\n\t\treturn errors.New(\"go-jose/go-jose: ecdsa signature failed to verify\")\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/cipher/cbc_hmac.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage josecipher\n\nimport (\n\t\"bytes\"\n\t\"crypto/cipher\"\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"crypto/subtle\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"hash\"\n)\n\nconst (\n\tnonceBytes = 16\n)\n\n// NewCBCHMAC instantiates a new AEAD based on CBC+HMAC.\nfunc NewCBCHMAC(key []byte, newBlockCipher func([]byte) (cipher.Block, error)) (cipher.AEAD, error) {\n\tkeySize := len(key) / 2\n\tintegrityKey := key[:keySize]\n\tencryptionKey := key[keySize:]\n\n\tblockCipher, err := newBlockCipher(encryptionKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar hash func() hash.Hash\n\tswitch keySize {\n\tcase 16:\n\t\thash = sha256.New\n\tcase 24:\n\t\thash = sha512.New384\n\tcase 32:\n\t\thash = sha512.New\n\t}\n\n\treturn &cbcAEAD{\n\t\thash:         hash,\n\t\tblockCipher:  blockCipher,\n\t\tauthtagBytes: keySize,\n\t\tintegrityKey: integrityKey,\n\t}, nil\n}\n\n// An AEAD based on CBC+HMAC\ntype cbcAEAD struct {\n\thash         func() hash.Hash\n\tauthtagBytes int\n\tintegrityKey []byte\n\tblockCipher  cipher.Block\n}\n\nfunc (ctx *cbcAEAD) NonceSize() int {\n\treturn nonceBytes\n}\n\nfunc (ctx *cbcAEAD) Overhead() int {\n\t// Maximum overhead is block size (for padding) plus auth tag length, where\n\t// the length of the auth tag is equivalent to the key size.\n\treturn ctx.blockCipher.BlockSize() + ctx.authtagBytes\n}\n\n// Seal encrypts and authenticates the plaintext.\nfunc (ctx *cbcAEAD) Seal(dst, nonce, plaintext, data []byte) []byte {\n\t// Output buffer -- must take care not to mangle plaintext input.\n\tciphertext := make([]byte, uint64(len(plaintext))+uint64(ctx.Overhead()))[:len(plaintext)]\n\tcopy(ciphertext, plaintext)\n\tciphertext = padBuffer(ciphertext, ctx.blockCipher.BlockSize())\n\n\tcbc := cipher.NewCBCEncrypter(ctx.blockCipher, nonce)\n\n\tcbc.CryptBlocks(ciphertext, ciphertext)\n\tauthtag := ctx.computeAuthTag(data, nonce, ciphertext)\n\n\tret, out := resize(dst, uint64(len(dst))+uint64(len(ciphertext))+uint64(len(authtag)))\n\tcopy(out, ciphertext)\n\tcopy(out[len(ciphertext):], authtag)\n\n\treturn ret\n}\n\n// Open decrypts and authenticates the ciphertext.\nfunc (ctx *cbcAEAD) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) {\n\tif len(ciphertext) < ctx.authtagBytes {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid ciphertext (too short)\")\n\t}\n\n\toffset := len(ciphertext) - ctx.authtagBytes\n\texpectedTag := ctx.computeAuthTag(data, nonce, ciphertext[:offset])\n\tmatch := subtle.ConstantTimeCompare(expectedTag, ciphertext[offset:])\n\tif match != 1 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid ciphertext (auth tag mismatch)\")\n\t}\n\n\tcbc := cipher.NewCBCDecrypter(ctx.blockCipher, nonce)\n\n\t// Make copy of ciphertext buffer, don't want to modify in place\n\tbuffer := append([]byte{}, ciphertext[:offset]...)\n\n\tif len(buffer)%ctx.blockCipher.BlockSize() > 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid ciphertext (invalid length)\")\n\t}\n\n\tcbc.CryptBlocks(buffer, buffer)\n\n\t// Remove padding\n\tplaintext, err := unpadBuffer(buffer, ctx.blockCipher.BlockSize())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tret, out := resize(dst, uint64(len(dst))+uint64(len(plaintext)))\n\tcopy(out, plaintext)\n\n\treturn ret, nil\n}\n\n// Compute an authentication tag\nfunc (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte {\n\tbuffer := make([]byte, uint64(len(aad))+uint64(len(nonce))+uint64(len(ciphertext))+8)\n\tn := 0\n\tn += copy(buffer, aad)\n\tn += copy(buffer[n:], nonce)\n\tn += copy(buffer[n:], ciphertext)\n\tbinary.BigEndian.PutUint64(buffer[n:], uint64(len(aad))*8)\n\n\t// According to documentation, Write() on hash.Hash never fails.\n\thmac := hmac.New(ctx.hash, ctx.integrityKey)\n\t_, _ = hmac.Write(buffer)\n\n\treturn hmac.Sum(nil)[:ctx.authtagBytes]\n}\n\n// resize ensures that the given slice has a capacity of at least n bytes.\n// If the capacity of the slice is less than n, a new slice is allocated\n// and the existing data will be copied.\nfunc resize(in []byte, n uint64) (head, tail []byte) {\n\tif uint64(cap(in)) >= n {\n\t\thead = in[:n]\n\t} else {\n\t\thead = make([]byte, n)\n\t\tcopy(head, in)\n\t}\n\n\ttail = head[len(in):]\n\treturn\n}\n\n// Apply padding\nfunc padBuffer(buffer []byte, blockSize int) []byte {\n\tmissing := blockSize - (len(buffer) % blockSize)\n\tret, out := resize(buffer, uint64(len(buffer))+uint64(missing))\n\tpadding := bytes.Repeat([]byte{byte(missing)}, missing)\n\tcopy(out, padding)\n\treturn ret\n}\n\n// Remove padding\nfunc unpadBuffer(buffer []byte, blockSize int) ([]byte, error) {\n\tif len(buffer)%blockSize != 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid padding\")\n\t}\n\n\tlast := buffer[len(buffer)-1]\n\tcount := int(last)\n\n\tif count == 0 || count > blockSize || count > len(buffer) {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid padding\")\n\t}\n\n\tpadding := bytes.Repeat([]byte{last}, count)\n\tif !bytes.HasSuffix(buffer, padding) {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid padding\")\n\t}\n\n\treturn buffer[:len(buffer)-count], nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/cipher/concat_kdf.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage josecipher\n\nimport (\n\t\"crypto\"\n\t\"encoding/binary\"\n\t\"hash\"\n\t\"io\"\n)\n\ntype concatKDF struct {\n\tz, info []byte\n\ti       uint32\n\tcache   []byte\n\thasher  hash.Hash\n}\n\n// NewConcatKDF builds a KDF reader based on the given inputs.\nfunc NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader {\n\tbuffer := make([]byte, uint64(len(algID))+uint64(len(ptyUInfo))+uint64(len(ptyVInfo))+uint64(len(supPubInfo))+uint64(len(supPrivInfo)))\n\tn := 0\n\tn += copy(buffer, algID)\n\tn += copy(buffer[n:], ptyUInfo)\n\tn += copy(buffer[n:], ptyVInfo)\n\tn += copy(buffer[n:], supPubInfo)\n\tcopy(buffer[n:], supPrivInfo)\n\n\thasher := hash.New()\n\n\treturn &concatKDF{\n\t\tz:      z,\n\t\tinfo:   buffer,\n\t\thasher: hasher,\n\t\tcache:  []byte{},\n\t\ti:      1,\n\t}\n}\n\nfunc (ctx *concatKDF) Read(out []byte) (int, error) {\n\tcopied := copy(out, ctx.cache)\n\tctx.cache = ctx.cache[copied:]\n\n\tfor copied < len(out) {\n\t\tctx.hasher.Reset()\n\n\t\t// Write on a hash.Hash never fails\n\t\t_ = binary.Write(ctx.hasher, binary.BigEndian, ctx.i)\n\t\t_, _ = ctx.hasher.Write(ctx.z)\n\t\t_, _ = ctx.hasher.Write(ctx.info)\n\n\t\thash := ctx.hasher.Sum(nil)\n\t\tchunkCopied := copy(out[copied:], hash)\n\t\tcopied += chunkCopied\n\t\tctx.cache = hash[chunkCopied:]\n\n\t\tctx.i++\n\t}\n\n\treturn copied, nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/cipher/ecdh_es.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage josecipher\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"encoding/binary\"\n)\n\n// DeriveECDHES derives a shared encryption key using ECDH/ConcatKDF as described in JWE/JWA.\n// It is an error to call this function with a private/public key that are not on the same\n// curve. Callers must ensure that the keys are valid before calling this function. Output\n// size may be at most 1<<16 bytes (64 KiB).\nfunc DeriveECDHES(alg string, apuData, apvData []byte, priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey, size int) []byte {\n\tif size > 1<<16 {\n\t\tpanic(\"ECDH-ES output size too large, must be less than or equal to 1<<16\")\n\t}\n\n\t// algId, partyUInfo, partyVInfo inputs must be prefixed with the length\n\talgID := lengthPrefixed([]byte(alg))\n\tptyUInfo := lengthPrefixed(apuData)\n\tptyVInfo := lengthPrefixed(apvData)\n\n\t// suppPubInfo is the encoded length of the output size in bits\n\tsupPubInfo := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(supPubInfo, uint32(size)*8)\n\n\tif !priv.PublicKey.Curve.IsOnCurve(pub.X, pub.Y) {\n\t\tpanic(\"public key not on same curve as private key\")\n\t}\n\n\tz, _ := priv.Curve.ScalarMult(pub.X, pub.Y, priv.D.Bytes())\n\tzBytes := z.Bytes()\n\n\t// Note that calling z.Bytes() on a big.Int may strip leading zero bytes from\n\t// the returned byte array. This can lead to a problem where zBytes will be\n\t// shorter than expected which breaks the key derivation. Therefore we must pad\n\t// to the full length of the expected coordinate here before calling the KDF.\n\toctSize := dSize(priv.Curve)\n\tif len(zBytes) != octSize {\n\t\tzBytes = append(bytes.Repeat([]byte{0}, octSize-len(zBytes)), zBytes...)\n\t}\n\n\treader := NewConcatKDF(crypto.SHA256, zBytes, algID, ptyUInfo, ptyVInfo, supPubInfo, []byte{})\n\tkey := make([]byte, size)\n\n\t// Read on the KDF will never fail\n\t_, _ = reader.Read(key)\n\n\treturn key\n}\n\n// dSize returns the size in octets for a coordinate on a elliptic curve.\nfunc dSize(curve elliptic.Curve) int {\n\torder := curve.Params().P\n\tbitLen := order.BitLen()\n\tsize := bitLen / 8\n\tif bitLen%8 != 0 {\n\t\tsize++\n\t}\n\treturn size\n}\n\nfunc lengthPrefixed(data []byte) []byte {\n\tout := make([]byte, len(data)+4)\n\tbinary.BigEndian.PutUint32(out, uint32(len(data)))\n\tcopy(out[4:], data)\n\treturn out\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/cipher/key_wrap.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage josecipher\n\nimport (\n\t\"crypto/cipher\"\n\t\"crypto/subtle\"\n\t\"encoding/binary\"\n\t\"errors\"\n)\n\nvar defaultIV = []byte{0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6}\n\n// KeyWrap implements NIST key wrapping; it wraps a content encryption key (cek) with the given block cipher.\nfunc KeyWrap(block cipher.Block, cek []byte) ([]byte, error) {\n\tif len(cek)%8 != 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: key wrap input must be 8 byte blocks\")\n\t}\n\n\tn := len(cek) / 8\n\tr := make([][]byte, n)\n\n\tfor i := range r {\n\t\tr[i] = make([]byte, 8)\n\t\tcopy(r[i], cek[i*8:])\n\t}\n\n\tbuffer := make([]byte, 16)\n\ttBytes := make([]byte, 8)\n\tcopy(buffer, defaultIV)\n\n\tfor t := 0; t < 6*n; t++ {\n\t\tcopy(buffer[8:], r[t%n])\n\n\t\tblock.Encrypt(buffer, buffer)\n\n\t\tbinary.BigEndian.PutUint64(tBytes, uint64(t+1))\n\n\t\tfor i := 0; i < 8; i++ {\n\t\t\tbuffer[i] ^= tBytes[i]\n\t\t}\n\t\tcopy(r[t%n], buffer[8:])\n\t}\n\n\tout := make([]byte, (n+1)*8)\n\tcopy(out, buffer[:8])\n\tfor i := range r {\n\t\tcopy(out[(i+1)*8:], r[i])\n\t}\n\n\treturn out, nil\n}\n\n// KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher.\nfunc KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) {\n\tif len(ciphertext)%8 != 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: key wrap input must be 8 byte blocks\")\n\t}\n\n\tn := (len(ciphertext) / 8) - 1\n\tr := make([][]byte, n)\n\n\tfor i := range r {\n\t\tr[i] = make([]byte, 8)\n\t\tcopy(r[i], ciphertext[(i+1)*8:])\n\t}\n\n\tbuffer := make([]byte, 16)\n\ttBytes := make([]byte, 8)\n\tcopy(buffer[:8], ciphertext[:8])\n\n\tfor t := 6*n - 1; t >= 0; t-- {\n\t\tbinary.BigEndian.PutUint64(tBytes, uint64(t+1))\n\n\t\tfor i := 0; i < 8; i++ {\n\t\t\tbuffer[i] ^= tBytes[i]\n\t\t}\n\t\tcopy(buffer[8:], r[t%n])\n\n\t\tblock.Decrypt(buffer, buffer)\n\n\t\tcopy(r[t%n], buffer[8:])\n\t}\n\n\tif subtle.ConstantTimeCompare(buffer[:8], defaultIV) == 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: failed to unwrap key\")\n\t}\n\n\tout := make([]byte, n*8)\n\tfor i := range r {\n\t\tcopy(out[i*8:], r[i])\n\t}\n\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/crypter.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"crypto/ecdsa\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// Encrypter represents an encrypter which produces an encrypted JWE object.\ntype Encrypter interface {\n\tEncrypt(plaintext []byte) (*JSONWebEncryption, error)\n\tEncryptWithAuthData(plaintext []byte, aad []byte) (*JSONWebEncryption, error)\n\tOptions() EncrypterOptions\n}\n\n// A generic content cipher\ntype contentCipher interface {\n\tkeySize() int\n\tencrypt(cek []byte, aad, plaintext []byte) (*aeadParts, error)\n\tdecrypt(cek []byte, aad []byte, parts *aeadParts) ([]byte, error)\n}\n\n// A key generator (for generating/getting a CEK)\ntype keyGenerator interface {\n\tkeySize() int\n\tgenKey() ([]byte, rawHeader, error)\n}\n\n// A generic key encrypter\ntype keyEncrypter interface {\n\tencryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) // Encrypt a key\n}\n\n// A generic key decrypter\ntype keyDecrypter interface {\n\tdecryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) // Decrypt a key\n}\n\n// A generic encrypter based on the given key encrypter and content cipher.\ntype genericEncrypter struct {\n\tcontentAlg     ContentEncryption\n\tcompressionAlg CompressionAlgorithm\n\tcipher         contentCipher\n\trecipients     []recipientKeyInfo\n\tkeyGenerator   keyGenerator\n\textraHeaders   map[HeaderKey]interface{}\n}\n\ntype recipientKeyInfo struct {\n\tkeyID        string\n\tkeyAlg       KeyAlgorithm\n\tkeyEncrypter keyEncrypter\n}\n\n// EncrypterOptions represents options that can be set on new encrypters.\ntype EncrypterOptions struct {\n\tCompression CompressionAlgorithm\n\n\t// Optional map of name/value pairs to be inserted into the protected\n\t// header of a JWS object. Some specifications which make use of\n\t// JWS require additional values here.\n\t//\n\t// Values will be serialized by [json.Marshal] and must be valid inputs to\n\t// that function.\n\t//\n\t// [json.Marshal]: https://pkg.go.dev/encoding/json#Marshal\n\tExtraHeaders map[HeaderKey]interface{}\n}\n\n// WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it\n// if necessary, and returns the updated EncrypterOptions.\n//\n// The v parameter will be serialized by [json.Marshal] and must be a valid\n// input to that function.\n//\n// [json.Marshal]: https://pkg.go.dev/encoding/json#Marshal\nfunc (eo *EncrypterOptions) WithHeader(k HeaderKey, v interface{}) *EncrypterOptions {\n\tif eo.ExtraHeaders == nil {\n\t\teo.ExtraHeaders = map[HeaderKey]interface{}{}\n\t}\n\teo.ExtraHeaders[k] = v\n\treturn eo\n}\n\n// WithContentType adds a content type (\"cty\") header and returns the updated\n// EncrypterOptions.\nfunc (eo *EncrypterOptions) WithContentType(contentType ContentType) *EncrypterOptions {\n\treturn eo.WithHeader(HeaderContentType, contentType)\n}\n\n// WithType adds a type (\"typ\") header and returns the updated EncrypterOptions.\nfunc (eo *EncrypterOptions) WithType(typ ContentType) *EncrypterOptions {\n\treturn eo.WithHeader(HeaderType, typ)\n}\n\n// Recipient represents an algorithm/key to encrypt messages to.\n//\n// PBES2Count and PBES2Salt correspond with the  \"p2c\" and \"p2s\" headers used\n// on the password-based encryption algorithms PBES2-HS256+A128KW,\n// PBES2-HS384+A192KW, and PBES2-HS512+A256KW. If they are not provided a safe\n// default of 100000 will be used for the count and a 128-bit random salt will\n// be generated.\ntype Recipient struct {\n\tAlgorithm KeyAlgorithm\n\t// Key must have one of these types:\n\t//  - ed25519.PublicKey\n\t//  - *ecdsa.PublicKey\n\t//  - *rsa.PublicKey\n\t//  - *JSONWebKey\n\t//  - JSONWebKey\n\t//  - []byte (a symmetric key)\n\t//  - Any type that satisfies the OpaqueKeyEncrypter interface\n\t//\n\t// The type of Key must match the value of Algorithm.\n\tKey        interface{}\n\tKeyID      string\n\tPBES2Count int\n\tPBES2Salt  []byte\n}\n\n// NewEncrypter creates an appropriate encrypter based on the key type\nfunc NewEncrypter(enc ContentEncryption, rcpt Recipient, opts *EncrypterOptions) (Encrypter, error) {\n\tencrypter := &genericEncrypter{\n\t\tcontentAlg: enc,\n\t\trecipients: []recipientKeyInfo{},\n\t\tcipher:     getContentCipher(enc),\n\t}\n\tif opts != nil {\n\t\tencrypter.compressionAlg = opts.Compression\n\t\tencrypter.extraHeaders = opts.ExtraHeaders\n\t}\n\n\tif encrypter.cipher == nil {\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n\n\tvar keyID string\n\tvar rawKey interface{}\n\tswitch encryptionKey := rcpt.Key.(type) {\n\tcase JSONWebKey:\n\t\tkeyID, rawKey = encryptionKey.KeyID, encryptionKey.Key\n\tcase *JSONWebKey:\n\t\tkeyID, rawKey = encryptionKey.KeyID, encryptionKey.Key\n\tcase OpaqueKeyEncrypter:\n\t\tkeyID, rawKey = encryptionKey.KeyID(), encryptionKey\n\tdefault:\n\t\trawKey = encryptionKey\n\t}\n\n\tswitch rcpt.Algorithm {\n\tcase DIRECT:\n\t\t// Direct encryption mode must be treated differently\n\t\tkeyBytes, ok := rawKey.([]byte)\n\t\tif !ok {\n\t\t\treturn nil, ErrUnsupportedKeyType\n\t\t}\n\t\tif encrypter.cipher.keySize() != len(keyBytes) {\n\t\t\treturn nil, ErrInvalidKeySize\n\t\t}\n\t\tencrypter.keyGenerator = staticKeyGenerator{\n\t\t\tkey: keyBytes,\n\t\t}\n\t\trecipientInfo, _ := newSymmetricRecipient(rcpt.Algorithm, keyBytes)\n\t\trecipientInfo.keyID = keyID\n\t\tif rcpt.KeyID != \"\" {\n\t\t\trecipientInfo.keyID = rcpt.KeyID\n\t\t}\n\t\tencrypter.recipients = []recipientKeyInfo{recipientInfo}\n\t\treturn encrypter, nil\n\tcase ECDH_ES:\n\t\t// ECDH-ES (w/o key wrapping) is similar to DIRECT mode\n\t\tkeyDSA, ok := rawKey.(*ecdsa.PublicKey)\n\t\tif !ok {\n\t\t\treturn nil, ErrUnsupportedKeyType\n\t\t}\n\t\tencrypter.keyGenerator = ecKeyGenerator{\n\t\t\tsize:      encrypter.cipher.keySize(),\n\t\t\talgID:     string(enc),\n\t\t\tpublicKey: keyDSA,\n\t\t}\n\t\trecipientInfo, _ := newECDHRecipient(rcpt.Algorithm, keyDSA)\n\t\trecipientInfo.keyID = keyID\n\t\tif rcpt.KeyID != \"\" {\n\t\t\trecipientInfo.keyID = rcpt.KeyID\n\t\t}\n\t\tencrypter.recipients = []recipientKeyInfo{recipientInfo}\n\t\treturn encrypter, nil\n\tdefault:\n\t\t// Can just add a standard recipient\n\t\tencrypter.keyGenerator = randomKeyGenerator{\n\t\t\tsize: encrypter.cipher.keySize(),\n\t\t}\n\t\terr := encrypter.addRecipient(rcpt)\n\t\treturn encrypter, err\n\t}\n}\n\n// NewMultiEncrypter creates a multi-encrypter based on the given parameters\nfunc NewMultiEncrypter(enc ContentEncryption, rcpts []Recipient, opts *EncrypterOptions) (Encrypter, error) {\n\tcipher := getContentCipher(enc)\n\n\tif cipher == nil {\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n\tif len(rcpts) == 0 {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: recipients is nil or empty\")\n\t}\n\n\tencrypter := &genericEncrypter{\n\t\tcontentAlg: enc,\n\t\trecipients: []recipientKeyInfo{},\n\t\tcipher:     cipher,\n\t\tkeyGenerator: randomKeyGenerator{\n\t\t\tsize: cipher.keySize(),\n\t\t},\n\t}\n\n\tif opts != nil {\n\t\tencrypter.compressionAlg = opts.Compression\n\t\tencrypter.extraHeaders = opts.ExtraHeaders\n\t}\n\n\tfor _, recipient := range rcpts {\n\t\terr := encrypter.addRecipient(recipient)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn encrypter, nil\n}\n\nfunc (ctx *genericEncrypter) addRecipient(recipient Recipient) (err error) {\n\tvar recipientInfo recipientKeyInfo\n\n\tswitch recipient.Algorithm {\n\tcase DIRECT, ECDH_ES:\n\t\treturn fmt.Errorf(\"go-jose/go-jose: key algorithm '%s' not supported in multi-recipient mode\", recipient.Algorithm)\n\t}\n\n\trecipientInfo, err = makeJWERecipient(recipient.Algorithm, recipient.Key)\n\tif recipient.KeyID != \"\" {\n\t\trecipientInfo.keyID = recipient.KeyID\n\t}\n\n\tswitch recipient.Algorithm {\n\tcase PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW:\n\t\tif sr, ok := recipientInfo.keyEncrypter.(*symmetricKeyCipher); ok {\n\t\t\tsr.p2c = recipient.PBES2Count\n\t\t\tsr.p2s = recipient.PBES2Salt\n\t\t}\n\t}\n\n\tif err == nil {\n\t\tctx.recipients = append(ctx.recipients, recipientInfo)\n\t}\n\treturn err\n}\n\nfunc makeJWERecipient(alg KeyAlgorithm, encryptionKey interface{}) (recipientKeyInfo, error) {\n\tswitch encryptionKey := encryptionKey.(type) {\n\tcase *rsa.PublicKey:\n\t\treturn newRSARecipient(alg, encryptionKey)\n\tcase *ecdsa.PublicKey:\n\t\treturn newECDHRecipient(alg, encryptionKey)\n\tcase []byte:\n\t\treturn newSymmetricRecipient(alg, encryptionKey)\n\tcase string:\n\t\treturn newSymmetricRecipient(alg, []byte(encryptionKey))\n\tcase JSONWebKey:\n\t\trecipient, err := makeJWERecipient(alg, encryptionKey.Key)\n\t\trecipient.keyID = encryptionKey.KeyID\n\t\treturn recipient, err\n\tcase *JSONWebKey:\n\t\trecipient, err := makeJWERecipient(alg, encryptionKey.Key)\n\t\trecipient.keyID = encryptionKey.KeyID\n\t\treturn recipient, err\n\tcase OpaqueKeyEncrypter:\n\t\treturn newOpaqueKeyEncrypter(alg, encryptionKey)\n\t}\n\treturn recipientKeyInfo{}, ErrUnsupportedKeyType\n}\n\n// newDecrypter creates an appropriate decrypter based on the key type\nfunc newDecrypter(decryptionKey interface{}) (keyDecrypter, error) {\n\tswitch decryptionKey := decryptionKey.(type) {\n\tcase *rsa.PrivateKey:\n\t\treturn &rsaDecrypterSigner{\n\t\t\tprivateKey: decryptionKey,\n\t\t}, nil\n\tcase *ecdsa.PrivateKey:\n\t\treturn &ecDecrypterSigner{\n\t\t\tprivateKey: decryptionKey,\n\t\t}, nil\n\tcase []byte:\n\t\treturn &symmetricKeyCipher{\n\t\t\tkey: decryptionKey,\n\t\t}, nil\n\tcase string:\n\t\treturn &symmetricKeyCipher{\n\t\t\tkey: []byte(decryptionKey),\n\t\t}, nil\n\tcase JSONWebKey:\n\t\treturn newDecrypter(decryptionKey.Key)\n\tcase *JSONWebKey:\n\t\treturn newDecrypter(decryptionKey.Key)\n\tcase OpaqueKeyDecrypter:\n\t\treturn &opaqueKeyDecrypter{decrypter: decryptionKey}, nil\n\tdefault:\n\t\treturn nil, ErrUnsupportedKeyType\n\t}\n}\n\n// Implementation of encrypt method producing a JWE object.\nfunc (ctx *genericEncrypter) Encrypt(plaintext []byte) (*JSONWebEncryption, error) {\n\treturn ctx.EncryptWithAuthData(plaintext, nil)\n}\n\n// Implementation of encrypt method producing a JWE object.\nfunc (ctx *genericEncrypter) EncryptWithAuthData(plaintext, aad []byte) (*JSONWebEncryption, error) {\n\tobj := &JSONWebEncryption{}\n\tobj.aad = aad\n\n\tobj.protected = &rawHeader{}\n\terr := obj.protected.set(headerEncryption, ctx.contentAlg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tobj.recipients = make([]recipientInfo, len(ctx.recipients))\n\n\tif len(ctx.recipients) == 0 {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: no recipients to encrypt to\")\n\t}\n\n\tcek, headers, err := ctx.keyGenerator.genKey()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tobj.protected.merge(&headers)\n\n\tfor i, info := range ctx.recipients {\n\t\trecipient, err := info.keyEncrypter.encryptKey(cek, info.keyAlg)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\terr = recipient.header.set(headerAlgorithm, info.keyAlg)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif info.keyID != \"\" {\n\t\t\terr = recipient.header.set(headerKeyID, info.keyID)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\tobj.recipients[i] = recipient\n\t}\n\n\tif len(ctx.recipients) == 1 {\n\t\t// Move per-recipient headers into main protected header if there's\n\t\t// only a single recipient.\n\t\tobj.protected.merge(obj.recipients[0].header)\n\t\tobj.recipients[0].header = nil\n\t}\n\n\tif ctx.compressionAlg != NONE {\n\t\tplaintext, err = compress(ctx.compressionAlg, plaintext)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\terr = obj.protected.set(headerCompression, ctx.compressionAlg)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tfor k, v := range ctx.extraHeaders {\n\t\tb, err := json.Marshal(v)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t(*obj.protected)[k] = makeRawMessage(b)\n\t}\n\n\tauthData := obj.computeAuthData()\n\tparts, err := ctx.cipher.encrypt(cek, authData, plaintext)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tobj.iv = parts.iv\n\tobj.ciphertext = parts.ciphertext\n\tobj.tag = parts.tag\n\n\treturn obj, nil\n}\n\nfunc (ctx *genericEncrypter) Options() EncrypterOptions {\n\treturn EncrypterOptions{\n\t\tCompression:  ctx.compressionAlg,\n\t\tExtraHeaders: ctx.extraHeaders,\n\t}\n}\n\n// Decrypt and validate the object and return the plaintext. This\n// function does not support multi-recipient. If you desire multi-recipient\n// decryption use DecryptMulti instead.\n//\n// The decryptionKey argument must contain a private or symmetric key\n// and must have one of these types:\n//   - *ecdsa.PrivateKey\n//   - *rsa.PrivateKey\n//   - *JSONWebKey\n//   - JSONWebKey\n//   - *JSONWebKeySet\n//   - JSONWebKeySet\n//   - []byte (a symmetric key)\n//   - string (a symmetric key)\n//   - Any type that satisfies the OpaqueKeyDecrypter interface.\n//\n// Note that ed25519 is only available for signatures, not encryption, so is\n// not an option here.\n//\n// Automatically decompresses plaintext, but returns an error if the decompressed\n// data would be >250kB or >10x the size of the compressed data, whichever is larger.\nfunc (obj JSONWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error) {\n\theaders := obj.mergedHeaders(nil)\n\n\tif len(obj.recipients) > 1 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: too many recipients in payload; expecting only one\")\n\t}\n\n\terr := headers.checkNoCritical()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tkey, err := tryJWKS(decryptionKey, obj.Header)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdecrypter, err := newDecrypter(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcipher := getContentCipher(headers.getEncryption())\n\tif cipher == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unsupported enc value '%s'\", string(headers.getEncryption()))\n\t}\n\n\tgenerator := randomKeyGenerator{\n\t\tsize: cipher.keySize(),\n\t}\n\n\tparts := &aeadParts{\n\t\tiv:         obj.iv,\n\t\tciphertext: obj.ciphertext,\n\t\ttag:        obj.tag,\n\t}\n\n\tauthData := obj.computeAuthData()\n\n\tvar plaintext []byte\n\trecipient := obj.recipients[0]\n\trecipientHeaders := obj.mergedHeaders(&recipient)\n\n\tcek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)\n\tif err == nil {\n\t\t// Found a valid CEK -- let's try to decrypt.\n\t\tplaintext, err = cipher.decrypt(cek, authData, parts)\n\t}\n\n\tif plaintext == nil {\n\t\treturn nil, ErrCryptoFailure\n\t}\n\n\t// The \"zip\" header parameter may only be present in the protected header.\n\tif comp := obj.protected.getCompression(); comp != \"\" {\n\t\tplaintext, err = decompress(comp, plaintext)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: failed to decompress plaintext: %v\", err)\n\t\t}\n\t}\n\n\treturn plaintext, nil\n}\n\n// DecryptMulti decrypts and validates the object and returns the plaintexts,\n// with support for multiple recipients. It returns the index of the recipient\n// for which the decryption was successful, the merged headers for that recipient,\n// and the plaintext.\n//\n// The decryptionKey argument must have one of the types allowed for the\n// decryptionKey argument of Decrypt().\n//\n// Automatically decompresses plaintext, but returns an error if the decompressed\n// data would be >250kB or >3x the size of the compressed data, whichever is larger.\nfunc (obj JSONWebEncryption) DecryptMulti(decryptionKey interface{}) (int, Header, []byte, error) {\n\tglobalHeaders := obj.mergedHeaders(nil)\n\n\terr := globalHeaders.checkNoCritical()\n\tif err != nil {\n\t\treturn -1, Header{}, nil, err\n\t}\n\n\tkey, err := tryJWKS(decryptionKey, obj.Header)\n\tif err != nil {\n\t\treturn -1, Header{}, nil, err\n\t}\n\tdecrypter, err := newDecrypter(key)\n\tif err != nil {\n\t\treturn -1, Header{}, nil, err\n\t}\n\n\tencryption := globalHeaders.getEncryption()\n\tcipher := getContentCipher(encryption)\n\tif cipher == nil {\n\t\treturn -1, Header{}, nil, fmt.Errorf(\"go-jose/go-jose: unsupported enc value '%s'\", string(encryption))\n\t}\n\n\tgenerator := randomKeyGenerator{\n\t\tsize: cipher.keySize(),\n\t}\n\n\tparts := &aeadParts{\n\t\tiv:         obj.iv,\n\t\tciphertext: obj.ciphertext,\n\t\ttag:        obj.tag,\n\t}\n\n\tauthData := obj.computeAuthData()\n\n\tindex := -1\n\tvar plaintext []byte\n\tvar headers rawHeader\n\n\tfor i, recipient := range obj.recipients {\n\t\trecipientHeaders := obj.mergedHeaders(&recipient)\n\n\t\tcek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)\n\t\tif err == nil {\n\t\t\t// Found a valid CEK -- let's try to decrypt.\n\t\t\tplaintext, err = cipher.decrypt(cek, authData, parts)\n\t\t\tif err == nil {\n\t\t\t\tindex = i\n\t\t\t\theaders = recipientHeaders\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif plaintext == nil {\n\t\treturn -1, Header{}, nil, ErrCryptoFailure\n\t}\n\n\t// The \"zip\" header parameter may only be present in the protected header.\n\tif comp := obj.protected.getCompression(); comp != \"\" {\n\t\tplaintext, err = decompress(comp, plaintext)\n\t\tif err != nil {\n\t\t\treturn -1, Header{}, nil, fmt.Errorf(\"go-jose/go-jose: failed to decompress plaintext: %v\", err)\n\t\t}\n\t}\n\n\tsanitized, err := headers.sanitized()\n\tif err != nil {\n\t\treturn -1, Header{}, nil, fmt.Errorf(\"go-jose/go-jose: failed to sanitize header: %v\", err)\n\t}\n\n\treturn index, sanitized, plaintext, err\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/doc.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\nPackage jose aims to provide an implementation of the Javascript Object Signing\nand Encryption set of standards. It implements encryption and signing based on\nthe JSON Web Encryption and JSON Web Signature standards, with optional JSON Web\nToken support available in a sub-package. The library supports both the compact\nand JWS/JWE JSON Serialization formats, and has optional support for multiple\nrecipients.\n*/\npackage jose\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/encoding.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"bytes\"\n\t\"compress/flate\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n\t\"strings\"\n\t\"unicode\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// Helper function to serialize known-good objects.\n// Precondition: value is not a nil pointer.\nfunc mustSerializeJSON(value interface{}) []byte {\n\tout, err := json.Marshal(value)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t// We never want to serialize the top-level value \"null,\" since it's not a\n\t// valid JOSE message. But if a caller passes in a nil pointer to this method,\n\t// MarshalJSON will happily serialize it as the top-level value \"null\". If\n\t// that value is then embedded in another operation, for instance by being\n\t// base64-encoded and fed as input to a signing algorithm\n\t// (https://github.com/go-jose/go-jose/issues/22), the result will be\n\t// incorrect. Because this method is intended for known-good objects, and a nil\n\t// pointer is not a known-good object, we are free to panic in this case.\n\t// Note: It's not possible to directly check whether the data pointed at by an\n\t// interface is a nil pointer, so we do this hacky workaround.\n\t// https://groups.google.com/forum/#!topic/golang-nuts/wnH302gBa4I\n\tif string(out) == \"null\" {\n\t\tpanic(\"Tried to serialize a nil pointer.\")\n\t}\n\treturn out\n}\n\n// Strip all newlines and whitespace\nfunc stripWhitespace(data string) string {\n\tbuf := strings.Builder{}\n\tbuf.Grow(len(data))\n\tfor _, r := range data {\n\t\tif !unicode.IsSpace(r) {\n\t\t\tbuf.WriteRune(r)\n\t\t}\n\t}\n\treturn buf.String()\n}\n\n// Perform compression based on algorithm\nfunc compress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {\n\tswitch algorithm {\n\tcase DEFLATE:\n\t\treturn deflate(input)\n\tdefault:\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n}\n\n// Perform decompression based on algorithm\nfunc decompress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {\n\tswitch algorithm {\n\tcase DEFLATE:\n\t\treturn inflate(input)\n\tdefault:\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n}\n\n// deflate compresses the input.\nfunc deflate(input []byte) ([]byte, error) {\n\toutput := new(bytes.Buffer)\n\n\t// Writing to byte buffer, err is always nil\n\twriter, _ := flate.NewWriter(output, 1)\n\t_, _ = io.Copy(writer, bytes.NewBuffer(input))\n\n\terr := writer.Close()\n\treturn output.Bytes(), err\n}\n\n// inflate decompresses the input.\n//\n// Errors if the decompressed data would be >250kB or >10x the size of the\n// compressed data, whichever is larger.\nfunc inflate(input []byte) ([]byte, error) {\n\toutput := new(bytes.Buffer)\n\treader := flate.NewReader(bytes.NewBuffer(input))\n\n\tmaxCompressedSize := max(250_000, 10*int64(len(input)))\n\n\tlimit := maxCompressedSize + 1\n\tn, err := io.CopyN(output, reader, limit)\n\tif err != nil && err != io.EOF {\n\t\treturn nil, err\n\t}\n\tif n == limit {\n\t\treturn nil, fmt.Errorf(\"uncompressed data would be too large (>%d bytes)\", maxCompressedSize)\n\t}\n\n\terr = reader.Close()\n\treturn output.Bytes(), err\n}\n\n// byteBuffer represents a slice of bytes that can be serialized to url-safe base64.\ntype byteBuffer struct {\n\tdata []byte\n}\n\nfunc newBuffer(data []byte) *byteBuffer {\n\tif data == nil {\n\t\treturn nil\n\t}\n\treturn &byteBuffer{\n\t\tdata: data,\n\t}\n}\n\nfunc newFixedSizeBuffer(data []byte, length int) *byteBuffer {\n\tif len(data) > length {\n\t\tpanic(\"go-jose/go-jose: invalid call to newFixedSizeBuffer (len(data) > length)\")\n\t}\n\tpad := make([]byte, length-len(data))\n\treturn newBuffer(append(pad, data...))\n}\n\nfunc newBufferFromInt(num uint64) *byteBuffer {\n\tdata := make([]byte, 8)\n\tbinary.BigEndian.PutUint64(data, num)\n\treturn newBuffer(bytes.TrimLeft(data, \"\\x00\"))\n}\n\nfunc (b *byteBuffer) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(b.base64())\n}\n\nfunc (b *byteBuffer) UnmarshalJSON(data []byte) error {\n\tvar encoded string\n\terr := json.Unmarshal(data, &encoded)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif encoded == \"\" {\n\t\treturn nil\n\t}\n\n\tdecoded, err := base64.RawURLEncoding.DecodeString(encoded)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*b = *newBuffer(decoded)\n\n\treturn nil\n}\n\nfunc (b *byteBuffer) base64() string {\n\treturn base64.RawURLEncoding.EncodeToString(b.data)\n}\n\nfunc (b *byteBuffer) bytes() []byte {\n\t// Handling nil here allows us to transparently handle nil slices when serializing.\n\tif b == nil {\n\t\treturn nil\n\t}\n\treturn b.data\n}\n\nfunc (b byteBuffer) bigInt() *big.Int {\n\treturn new(big.Int).SetBytes(b.data)\n}\n\nfunc (b byteBuffer) toInt() int {\n\treturn int(b.bigInt().Int64())\n}\n\nfunc base64EncodeLen(sl []byte) int {\n\treturn base64.RawURLEncoding.EncodedLen(len(sl))\n}\n\nfunc base64JoinWithDots(inputs ...[]byte) string {\n\tif len(inputs) == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Count of dots.\n\ttotalCount := len(inputs) - 1\n\n\tfor _, input := range inputs {\n\t\ttotalCount += base64EncodeLen(input)\n\t}\n\n\tout := make([]byte, totalCount)\n\tstartEncode := 0\n\tfor i, input := range inputs {\n\t\tbase64.RawURLEncoding.Encode(out[startEncode:], input)\n\n\t\tif i == len(inputs)-1 {\n\t\t\tcontinue\n\t\t}\n\n\t\tstartEncode += base64EncodeLen(input)\n\t\tout[startEncode] = '.'\n\t\tstartEncode++\n\t}\n\n\treturn string(out)\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/LICENSE",
    "content": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/README.md",
    "content": "# Safe JSON\n\nThis repository contains a fork of the `encoding/json` package from Go 1.6.\n\nThe following changes were made:\n\n* Object deserialization uses case-sensitive member name matching instead of\n  [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html).\n  This is to avoid differences in the interpretation of JOSE messages between\n  go-jose and libraries written in other languages.\n* When deserializing a JSON object, we check for duplicate keys and reject the\n  input whenever we detect a duplicate. Rather than trying to work with malformed\n  data, we prefer to reject it right away.\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/decode.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Represents JSON data structure using native Go types: booleans, floats,\n// strings, arrays, and maps.\n\npackage json\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"unicode\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n)\n\n// Unmarshal parses the JSON-encoded data and stores the result\n// in the value pointed to by v.\n//\n// Unmarshal uses the inverse of the encodings that\n// Marshal uses, allocating maps, slices, and pointers as necessary,\n// with the following additional rules:\n//\n// To unmarshal JSON into a pointer, Unmarshal first handles the case of\n// the JSON being the JSON literal null.  In that case, Unmarshal sets\n// the pointer to nil.  Otherwise, Unmarshal unmarshals the JSON into\n// the value pointed at by the pointer.  If the pointer is nil, Unmarshal\n// allocates a new value for it to point to.\n//\n// To unmarshal JSON into a struct, Unmarshal matches incoming object\n// keys to the keys used by Marshal (either the struct field name or its tag),\n// preferring an exact match but also accepting a case-insensitive match.\n// Unmarshal will only set exported fields of the struct.\n//\n// To unmarshal JSON into an interface value,\n// Unmarshal stores one of these in the interface value:\n//\n//\tbool, for JSON booleans\n//\tfloat64, for JSON numbers\n//\tstring, for JSON strings\n//\t[]interface{}, for JSON arrays\n//\tmap[string]interface{}, for JSON objects\n//\tnil for JSON null\n//\n// To unmarshal a JSON array into a slice, Unmarshal resets the slice length\n// to zero and then appends each element to the slice.\n// As a special case, to unmarshal an empty JSON array into a slice,\n// Unmarshal replaces the slice with a new empty slice.\n//\n// To unmarshal a JSON array into a Go array, Unmarshal decodes\n// JSON array elements into corresponding Go array elements.\n// If the Go array is smaller than the JSON array,\n// the additional JSON array elements are discarded.\n// If the JSON array is smaller than the Go array,\n// the additional Go array elements are set to zero values.\n//\n// To unmarshal a JSON object into a string-keyed map, Unmarshal first\n// establishes a map to use, If the map is nil, Unmarshal allocates a new map.\n// Otherwise Unmarshal reuses the existing map, keeping existing entries.\n// Unmarshal then stores key-value pairs from the JSON object into the map.\n//\n// If a JSON value is not appropriate for a given target type,\n// or if a JSON number overflows the target type, Unmarshal\n// skips that field and completes the unmarshaling as best it can.\n// If no more serious errors are encountered, Unmarshal returns\n// an UnmarshalTypeError describing the earliest such error.\n//\n// The JSON null value unmarshals into an interface, map, pointer, or slice\n// by setting that Go value to nil. Because null is often used in JSON to mean\n// “not present,” unmarshaling a JSON null into any other Go type has no effect\n// on the value and produces no error.\n//\n// When unmarshaling quoted strings, invalid UTF-8 or\n// invalid UTF-16 surrogate pairs are not treated as an error.\n// Instead, they are replaced by the Unicode replacement\n// character U+FFFD.\nfunc Unmarshal(data []byte, v interface{}) error {\n\t// Check for well-formedness.\n\t// Avoids filling out half a data structure\n\t// before discovering a JSON syntax error.\n\tvar d decodeState\n\terr := checkValid(data, &d.scan)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\td.init(data)\n\treturn d.unmarshal(v)\n}\n\n// Unmarshaler is the interface implemented by objects\n// that can unmarshal a JSON description of themselves.\n// The input can be assumed to be a valid encoding of\n// a JSON value. UnmarshalJSON must copy the JSON data\n// if it wishes to retain the data after returning.\ntype Unmarshaler interface {\n\tUnmarshalJSON([]byte) error\n}\n\n// An UnmarshalTypeError describes a JSON value that was\n// not appropriate for a value of a specific Go type.\ntype UnmarshalTypeError struct {\n\tValue  string       // description of JSON value - \"bool\", \"array\", \"number -5\"\n\tType   reflect.Type // type of Go value it could not be assigned to\n\tOffset int64        // error occurred after reading Offset bytes\n}\n\nfunc (e *UnmarshalTypeError) Error() string {\n\treturn \"json: cannot unmarshal \" + e.Value + \" into Go value of type \" + e.Type.String()\n}\n\n// An UnmarshalFieldError describes a JSON object key that\n// led to an unexported (and therefore unwritable) struct field.\n// (No longer used; kept for compatibility.)\ntype UnmarshalFieldError struct {\n\tKey   string\n\tType  reflect.Type\n\tField reflect.StructField\n}\n\nfunc (e *UnmarshalFieldError) Error() string {\n\treturn \"json: cannot unmarshal object key \" + strconv.Quote(e.Key) + \" into unexported field \" + e.Field.Name + \" of type \" + e.Type.String()\n}\n\n// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal.\n// (The argument to Unmarshal must be a non-nil pointer.)\ntype InvalidUnmarshalError struct {\n\tType reflect.Type\n}\n\nfunc (e *InvalidUnmarshalError) Error() string {\n\tif e.Type == nil {\n\t\treturn \"json: Unmarshal(nil)\"\n\t}\n\n\tif e.Type.Kind() != reflect.Ptr {\n\t\treturn \"json: Unmarshal(non-pointer \" + e.Type.String() + \")\"\n\t}\n\treturn \"json: Unmarshal(nil \" + e.Type.String() + \")\"\n}\n\nfunc (d *decodeState) unmarshal(v interface{}) (err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tif _, ok := r.(runtime.Error); ok {\n\t\t\t\tpanic(r)\n\t\t\t}\n\t\t\terr = r.(error)\n\t\t}\n\t}()\n\n\trv := reflect.ValueOf(v)\n\tif rv.Kind() != reflect.Ptr || rv.IsNil() {\n\t\treturn &InvalidUnmarshalError{reflect.TypeOf(v)}\n\t}\n\n\td.scan.reset()\n\t// We decode rv not rv.Elem because the Unmarshaler interface\n\t// test must be applied at the top level of the value.\n\td.value(rv)\n\treturn d.savedError\n}\n\n// A Number represents a JSON number literal.\ntype Number string\n\n// String returns the literal text of the number.\nfunc (n Number) String() string { return string(n) }\n\n// Float64 returns the number as a float64.\nfunc (n Number) Float64() (float64, error) {\n\treturn strconv.ParseFloat(string(n), 64)\n}\n\n// Int64 returns the number as an int64.\nfunc (n Number) Int64() (int64, error) {\n\treturn strconv.ParseInt(string(n), 10, 64)\n}\n\n// isValidNumber reports whether s is a valid JSON number literal.\nfunc isValidNumber(s string) bool {\n\t// This function implements the JSON numbers grammar.\n\t// See https://tools.ietf.org/html/rfc7159#section-6\n\t// and http://json.org/number.gif\n\n\tif s == \"\" {\n\t\treturn false\n\t}\n\n\t// Optional -\n\tif s[0] == '-' {\n\t\ts = s[1:]\n\t\tif s == \"\" {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Digits\n\tswitch {\n\tdefault:\n\t\treturn false\n\n\tcase s[0] == '0':\n\t\ts = s[1:]\n\n\tcase '1' <= s[0] && s[0] <= '9':\n\t\ts = s[1:]\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t}\n\t}\n\n\t// . followed by 1 or more digits.\n\tif len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' {\n\t\ts = s[2:]\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t}\n\t}\n\n\t// e or E followed by an optional - or + and\n\t// 1 or more digits.\n\tif len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {\n\t\ts = s[1:]\n\t\tif s[0] == '+' || s[0] == '-' {\n\t\t\ts = s[1:]\n\t\t\tif s == \"\" {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t}\n\t}\n\n\t// Make sure we are at the end.\n\treturn s == \"\"\n}\n\ntype NumberUnmarshalType int\n\nconst (\n\t// unmarshal a JSON number into an interface{} as a float64\n\tUnmarshalFloat NumberUnmarshalType = iota\n\t// unmarshal a JSON number into an interface{} as a `json.Number`\n\tUnmarshalJSONNumber\n\t// unmarshal a JSON number into an interface{} as a int64\n\t// if value is an integer otherwise float64\n\tUnmarshalIntOrFloat\n)\n\n// decodeState represents the state while decoding a JSON value.\ntype decodeState struct {\n\tdata       []byte\n\toff        int // read offset in data\n\tscan       scanner\n\tnextscan   scanner // for calls to nextValue\n\tsavedError error\n\tnumberType NumberUnmarshalType\n}\n\n// errPhase is used for errors that should not happen unless\n// there is a bug in the JSON decoder or something is editing\n// the data slice while the decoder executes.\nvar errPhase = errors.New(\"JSON decoder out of sync - data changing underfoot?\")\n\nfunc (d *decodeState) init(data []byte) *decodeState {\n\td.data = data\n\td.off = 0\n\td.savedError = nil\n\treturn d\n}\n\n// error aborts the decoding by panicking with err.\nfunc (d *decodeState) error(err error) {\n\tpanic(err)\n}\n\n// saveError saves the first err it is called with,\n// for reporting at the end of the unmarshal.\nfunc (d *decodeState) saveError(err error) {\n\tif d.savedError == nil {\n\t\td.savedError = err\n\t}\n}\n\n// next cuts off and returns the next full JSON value in d.data[d.off:].\n// The next value is known to be an object or array, not a literal.\nfunc (d *decodeState) next() []byte {\n\tc := d.data[d.off]\n\titem, rest, err := nextValue(d.data[d.off:], &d.nextscan)\n\tif err != nil {\n\t\td.error(err)\n\t}\n\td.off = len(d.data) - len(rest)\n\n\t// Our scanner has seen the opening brace/bracket\n\t// and thinks we're still in the middle of the object.\n\t// invent a closing brace/bracket to get it out.\n\tif c == '{' {\n\t\td.scan.step(&d.scan, '}')\n\t} else {\n\t\td.scan.step(&d.scan, ']')\n\t}\n\n\treturn item\n}\n\n// scanWhile processes bytes in d.data[d.off:] until it\n// receives a scan code not equal to op.\n// It updates d.off and returns the new scan code.\nfunc (d *decodeState) scanWhile(op int) int {\n\tvar newOp int\n\tfor {\n\t\tif d.off >= len(d.data) {\n\t\t\tnewOp = d.scan.eof()\n\t\t\td.off = len(d.data) + 1 // mark processed EOF with len+1\n\t\t} else {\n\t\t\tc := d.data[d.off]\n\t\t\td.off++\n\t\t\tnewOp = d.scan.step(&d.scan, c)\n\t\t}\n\t\tif newOp != op {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn newOp\n}\n\n// value decodes a JSON value from d.data[d.off:] into the value.\n// it updates d.off to point past the decoded value.\nfunc (d *decodeState) value(v reflect.Value) {\n\tif !v.IsValid() {\n\t\t_, rest, err := nextValue(d.data[d.off:], &d.nextscan)\n\t\tif err != nil {\n\t\t\td.error(err)\n\t\t}\n\t\td.off = len(d.data) - len(rest)\n\n\t\t// d.scan thinks we're still at the beginning of the item.\n\t\t// Feed in an empty string - the shortest, simplest value -\n\t\t// so that it knows we got to the end of the value.\n\t\tif d.scan.redo {\n\t\t\t// rewind.\n\t\t\td.scan.redo = false\n\t\t\td.scan.step = stateBeginValue\n\t\t}\n\t\td.scan.step(&d.scan, '\"')\n\t\td.scan.step(&d.scan, '\"')\n\n\t\tn := len(d.scan.parseState)\n\t\tif n > 0 && d.scan.parseState[n-1] == parseObjectKey {\n\t\t\t// d.scan thinks we just read an object key; finish the object\n\t\t\td.scan.step(&d.scan, ':')\n\t\t\td.scan.step(&d.scan, '\"')\n\t\t\td.scan.step(&d.scan, '\"')\n\t\t\td.scan.step(&d.scan, '}')\n\t\t}\n\n\t\treturn\n\t}\n\n\tswitch op := d.scanWhile(scanSkipSpace); op {\n\tdefault:\n\t\td.error(errPhase)\n\n\tcase scanBeginArray:\n\t\td.array(v)\n\n\tcase scanBeginObject:\n\t\td.object(v)\n\n\tcase scanBeginLiteral:\n\t\td.literal(v)\n\t}\n}\n\ntype unquotedValue struct{}\n\n// valueQuoted is like value but decodes a\n// quoted string literal or literal null into an interface value.\n// If it finds anything other than a quoted string literal or null,\n// valueQuoted returns unquotedValue{}.\nfunc (d *decodeState) valueQuoted() interface{} {\n\tswitch op := d.scanWhile(scanSkipSpace); op {\n\tdefault:\n\t\td.error(errPhase)\n\n\tcase scanBeginArray:\n\t\td.array(reflect.Value{})\n\n\tcase scanBeginObject:\n\t\td.object(reflect.Value{})\n\n\tcase scanBeginLiteral:\n\t\tswitch v := d.literalInterface().(type) {\n\t\tcase nil, string:\n\t\t\treturn v\n\t\t}\n\t}\n\treturn unquotedValue{}\n}\n\n// indirect walks down v allocating pointers as needed,\n// until it gets to a non-pointer.\n// if it encounters an Unmarshaler, indirect stops and returns that.\n// if decodingNull is true, indirect stops at the last pointer so it can be set to nil.\nfunc (d *decodeState) indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {\n\t// If v is a named type and is addressable,\n\t// start with its address, so that if the type has pointer methods,\n\t// we find them.\n\tif v.Kind() != reflect.Ptr && v.Type().Name() != \"\" && v.CanAddr() {\n\t\tv = v.Addr()\n\t}\n\tfor {\n\t\t// Load value from interface, but only if the result will be\n\t\t// usefully addressable.\n\t\tif v.Kind() == reflect.Interface && !v.IsNil() {\n\t\t\te := v.Elem()\n\t\t\tif e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) {\n\t\t\t\tv = e\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tif v.Kind() != reflect.Ptr {\n\t\t\tbreak\n\t\t}\n\n\t\tif v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() {\n\t\t\tbreak\n\t\t}\n\t\tif v.IsNil() {\n\t\t\tv.Set(reflect.New(v.Type().Elem()))\n\t\t}\n\t\tif v.Type().NumMethod() > 0 {\n\t\t\tif u, ok := v.Interface().(Unmarshaler); ok {\n\t\t\t\treturn u, nil, reflect.Value{}\n\t\t\t}\n\t\t\tif u, ok := v.Interface().(encoding.TextUnmarshaler); ok {\n\t\t\t\treturn nil, u, reflect.Value{}\n\t\t\t}\n\t\t}\n\t\tv = v.Elem()\n\t}\n\treturn nil, nil, v\n}\n\n// array consumes an array from d.data[d.off-1:], decoding into the value v.\n// the first byte of the array ('[') has been read already.\nfunc (d *decodeState) array(v reflect.Value) {\n\t// Check for unmarshaler.\n\tu, ut, pv := d.indirect(v, false)\n\tif u != nil {\n\t\td.off--\n\t\terr := u.UnmarshalJSON(d.next())\n\t\tif err != nil {\n\t\t\td.error(err)\n\t\t}\n\t\treturn\n\t}\n\tif ut != nil {\n\t\td.saveError(&UnmarshalTypeError{\"array\", v.Type(), int64(d.off)})\n\t\td.off--\n\t\td.next()\n\t\treturn\n\t}\n\n\tv = pv\n\n\t// Check type of target.\n\tswitch v.Kind() {\n\tcase reflect.Interface:\n\t\tif v.NumMethod() == 0 {\n\t\t\t// Decoding into nil interface?  Switch to non-reflect code.\n\t\t\tv.Set(reflect.ValueOf(d.arrayInterface()))\n\t\t\treturn\n\t\t}\n\t\t// Otherwise it's invalid.\n\t\tfallthrough\n\tdefault:\n\t\td.saveError(&UnmarshalTypeError{\"array\", v.Type(), int64(d.off)})\n\t\td.off--\n\t\td.next()\n\t\treturn\n\tcase reflect.Array:\n\tcase reflect.Slice:\n\t\tbreak\n\t}\n\n\ti := 0\n\tfor {\n\t\t// Look ahead for ] - can only happen on first iteration.\n\t\top := d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndArray {\n\t\t\tbreak\n\t\t}\n\n\t\t// Back up so d.value can have the byte we just read.\n\t\td.off--\n\t\td.scan.undo(op)\n\n\t\t// Get element of array, growing if necessary.\n\t\tif v.Kind() == reflect.Slice {\n\t\t\t// Grow slice if necessary\n\t\t\tif i >= v.Cap() {\n\t\t\t\tnewcap := v.Cap() + v.Cap()/2\n\t\t\t\tif newcap < 4 {\n\t\t\t\t\tnewcap = 4\n\t\t\t\t}\n\t\t\t\tnewv := reflect.MakeSlice(v.Type(), v.Len(), newcap)\n\t\t\t\treflect.Copy(newv, v)\n\t\t\t\tv.Set(newv)\n\t\t\t}\n\t\t\tif i >= v.Len() {\n\t\t\t\tv.SetLen(i + 1)\n\t\t\t}\n\t\t}\n\n\t\tif i < v.Len() {\n\t\t\t// Decode into element.\n\t\t\td.value(v.Index(i))\n\t\t} else {\n\t\t\t// Ran out of fixed array: skip.\n\t\t\td.value(reflect.Value{})\n\t\t}\n\t\ti++\n\n\t\t// Next token must be , or ].\n\t\top = d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndArray {\n\t\t\tbreak\n\t\t}\n\t\tif op != scanArrayValue {\n\t\t\td.error(errPhase)\n\t\t}\n\t}\n\n\tif i < v.Len() {\n\t\tif v.Kind() == reflect.Array {\n\t\t\t// Array.  Zero the rest.\n\t\t\tz := reflect.Zero(v.Type().Elem())\n\t\t\tfor ; i < v.Len(); i++ {\n\t\t\t\tv.Index(i).Set(z)\n\t\t\t}\n\t\t} else {\n\t\t\tv.SetLen(i)\n\t\t}\n\t}\n\tif i == 0 && v.Kind() == reflect.Slice {\n\t\tv.Set(reflect.MakeSlice(v.Type(), 0, 0))\n\t}\n}\n\nvar nullLiteral = []byte(\"null\")\n\n// object consumes an object from d.data[d.off-1:], decoding into the value v.\n// the first byte ('{') of the object has been read already.\nfunc (d *decodeState) object(v reflect.Value) {\n\t// Check for unmarshaler.\n\tu, ut, pv := d.indirect(v, false)\n\tif u != nil {\n\t\td.off--\n\t\terr := u.UnmarshalJSON(d.next())\n\t\tif err != nil {\n\t\t\td.error(err)\n\t\t}\n\t\treturn\n\t}\n\tif ut != nil {\n\t\td.saveError(&UnmarshalTypeError{\"object\", v.Type(), int64(d.off)})\n\t\td.off--\n\t\td.next() // skip over { } in input\n\t\treturn\n\t}\n\tv = pv\n\n\t// Decoding into nil interface?  Switch to non-reflect code.\n\tif v.Kind() == reflect.Interface && v.NumMethod() == 0 {\n\t\tv.Set(reflect.ValueOf(d.objectInterface()))\n\t\treturn\n\t}\n\n\t// Check type of target: struct or map[string]T\n\tswitch v.Kind() {\n\tcase reflect.Map:\n\t\t// map must have string kind\n\t\tt := v.Type()\n\t\tif t.Key().Kind() != reflect.String {\n\t\t\td.saveError(&UnmarshalTypeError{\"object\", v.Type(), int64(d.off)})\n\t\t\td.off--\n\t\t\td.next() // skip over { } in input\n\t\t\treturn\n\t\t}\n\t\tif v.IsNil() {\n\t\t\tv.Set(reflect.MakeMap(t))\n\t\t}\n\tcase reflect.Struct:\n\n\tdefault:\n\t\td.saveError(&UnmarshalTypeError{\"object\", v.Type(), int64(d.off)})\n\t\td.off--\n\t\td.next() // skip over { } in input\n\t\treturn\n\t}\n\n\tvar mapElem reflect.Value\n\tkeys := map[string]bool{}\n\n\tfor {\n\t\t// Read opening \" of string key or closing }.\n\t\top := d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndObject {\n\t\t\t// closing } - can only happen on first iteration.\n\t\t\tbreak\n\t\t}\n\t\tif op != scanBeginLiteral {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Read key.\n\t\tstart := d.off - 1\n\t\top = d.scanWhile(scanContinue)\n\t\titem := d.data[start : d.off-1]\n\t\tkey, ok := unquote(item)\n\t\tif !ok {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Check for duplicate keys.\n\t\t_, ok = keys[key]\n\t\tif !ok {\n\t\t\tkeys[key] = true\n\t\t} else {\n\t\t\td.error(fmt.Errorf(\"json: duplicate key '%s' in object\", key))\n\t\t}\n\n\t\t// Figure out field corresponding to key.\n\t\tvar subv reflect.Value\n\t\tdestring := false // whether the value is wrapped in a string to be decoded first\n\n\t\tif v.Kind() == reflect.Map {\n\t\t\telemType := v.Type().Elem()\n\t\t\tif !mapElem.IsValid() {\n\t\t\t\tmapElem = reflect.New(elemType).Elem()\n\t\t\t} else {\n\t\t\t\tmapElem.Set(reflect.Zero(elemType))\n\t\t\t}\n\t\t\tsubv = mapElem\n\t\t} else {\n\t\t\tvar f *field\n\t\t\tfields := cachedTypeFields(v.Type())\n\t\t\tfor i := range fields {\n\t\t\t\tff := &fields[i]\n\t\t\t\tif bytes.Equal(ff.nameBytes, []byte(key)) {\n\t\t\t\t\tf = ff\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif f != nil {\n\t\t\t\tsubv = v\n\t\t\t\tdestring = f.quoted\n\t\t\t\tfor _, i := range f.index {\n\t\t\t\t\tif subv.Kind() == reflect.Ptr {\n\t\t\t\t\t\tif subv.IsNil() {\n\t\t\t\t\t\t\tsubv.Set(reflect.New(subv.Type().Elem()))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubv = subv.Elem()\n\t\t\t\t\t}\n\t\t\t\t\tsubv = subv.Field(i)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Read : before value.\n\t\tif op == scanSkipSpace {\n\t\t\top = d.scanWhile(scanSkipSpace)\n\t\t}\n\t\tif op != scanObjectKey {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Read value.\n\t\tif destring {\n\t\t\tswitch qv := d.valueQuoted().(type) {\n\t\t\tcase nil:\n\t\t\t\td.literalStore(nullLiteral, subv, false)\n\t\t\tcase string:\n\t\t\t\td.literalStore([]byte(qv), subv, true)\n\t\t\tdefault:\n\t\t\t\td.saveError(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v\", subv.Type()))\n\t\t\t}\n\t\t} else {\n\t\t\td.value(subv)\n\t\t}\n\n\t\t// Write value back to map;\n\t\t// if using struct, subv points into struct already.\n\t\tif v.Kind() == reflect.Map {\n\t\t\tkv := reflect.ValueOf(key).Convert(v.Type().Key())\n\t\t\tv.SetMapIndex(kv, subv)\n\t\t}\n\n\t\t// Next token must be , or }.\n\t\top = d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndObject {\n\t\t\tbreak\n\t\t}\n\t\tif op != scanObjectValue {\n\t\t\td.error(errPhase)\n\t\t}\n\t}\n}\n\n// literal consumes a literal from d.data[d.off-1:], decoding into the value v.\n// The first byte of the literal has been read already\n// (that's how the caller knows it's a literal).\nfunc (d *decodeState) literal(v reflect.Value) {\n\t// All bytes inside literal return scanContinue op code.\n\tstart := d.off - 1\n\top := d.scanWhile(scanContinue)\n\n\t// Scan read one byte too far; back up.\n\td.off--\n\td.scan.undo(op)\n\n\td.literalStore(d.data[start:d.off], v, false)\n}\n\n// convertNumber converts the number literal s to a float64, int64 or a Number\n// depending on d.numberDecodeType.\nfunc (d *decodeState) convertNumber(s string) (interface{}, error) {\n\tswitch d.numberType {\n\n\tcase UnmarshalJSONNumber:\n\t\treturn Number(s), nil\n\tcase UnmarshalIntOrFloat:\n\t\tv, err := strconv.ParseInt(s, 10, 64)\n\t\tif err == nil {\n\t\t\treturn v, nil\n\t\t}\n\n\t\t// tries to parse integer number in scientific notation\n\t\tf, err := strconv.ParseFloat(s, 64)\n\t\tif err != nil {\n\t\t\treturn nil, &UnmarshalTypeError{\"number \" + s, reflect.TypeOf(0.0), int64(d.off)}\n\t\t}\n\n\t\t// if it has no decimal value use int64\n\t\tif fi, fd := math.Modf(f); fd == 0.0 {\n\t\t\treturn int64(fi), nil\n\t\t}\n\t\treturn f, nil\n\tdefault:\n\t\tf, err := strconv.ParseFloat(s, 64)\n\t\tif err != nil {\n\t\t\treturn nil, &UnmarshalTypeError{\"number \" + s, reflect.TypeOf(0.0), int64(d.off)}\n\t\t}\n\t\treturn f, nil\n\t}\n\n}\n\nvar numberType = reflect.TypeOf(Number(\"\"))\n\n// literalStore decodes a literal stored in item into v.\n//\n// fromQuoted indicates whether this literal came from unwrapping a\n// string from the \",string\" struct tag option. this is used only to\n// produce more helpful error messages.\nfunc (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) {\n\t// Check for unmarshaler.\n\tif len(item) == 0 {\n\t\t//Empty string given\n\t\td.saveError(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\treturn\n\t}\n\twantptr := item[0] == 'n' // null\n\tu, ut, pv := d.indirect(v, wantptr)\n\tif u != nil {\n\t\terr := u.UnmarshalJSON(item)\n\t\tif err != nil {\n\t\t\td.error(err)\n\t\t}\n\t\treturn\n\t}\n\tif ut != nil {\n\t\tif item[0] != '\"' {\n\t\t\tif fromQuoted {\n\t\t\t\td.saveError(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"string\", v.Type(), int64(d.off)})\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\ts, ok := unquoteBytes(item)\n\t\tif !ok {\n\t\t\tif fromQuoted {\n\t\t\t\td.error(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.error(errPhase)\n\t\t\t}\n\t\t}\n\t\terr := ut.UnmarshalText(s)\n\t\tif err != nil {\n\t\t\td.error(err)\n\t\t}\n\t\treturn\n\t}\n\n\tv = pv\n\n\tswitch c := item[0]; c {\n\tcase 'n': // null\n\t\tswitch v.Kind() {\n\t\tcase reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:\n\t\t\tv.Set(reflect.Zero(v.Type()))\n\t\t\t// otherwise, ignore null for primitives/string\n\t\t}\n\tcase 't', 'f': // true, false\n\t\tvalue := c == 't'\n\t\tswitch v.Kind() {\n\t\tdefault:\n\t\t\tif fromQuoted {\n\t\t\t\td.saveError(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"bool\", v.Type(), int64(d.off)})\n\t\t\t}\n\t\tcase reflect.Bool:\n\t\t\tv.SetBool(value)\n\t\tcase reflect.Interface:\n\t\t\tif v.NumMethod() == 0 {\n\t\t\t\tv.Set(reflect.ValueOf(value))\n\t\t\t} else {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"bool\", v.Type(), int64(d.off)})\n\t\t\t}\n\t\t}\n\n\tcase '\"': // string\n\t\ts, ok := unquoteBytes(item)\n\t\tif !ok {\n\t\t\tif fromQuoted {\n\t\t\t\td.error(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.error(errPhase)\n\t\t\t}\n\t\t}\n\t\tswitch v.Kind() {\n\t\tdefault:\n\t\t\td.saveError(&UnmarshalTypeError{\"string\", v.Type(), int64(d.off)})\n\t\tcase reflect.Slice:\n\t\t\tif v.Type().Elem().Kind() != reflect.Uint8 {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"string\", v.Type(), int64(d.off)})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tb := make([]byte, base64.StdEncoding.DecodedLen(len(s)))\n\t\t\tn, err := base64.StdEncoding.Decode(b, s)\n\t\t\tif err != nil {\n\t\t\t\td.saveError(err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv.SetBytes(b[:n])\n\t\tcase reflect.String:\n\t\t\tv.SetString(string(s))\n\t\tcase reflect.Interface:\n\t\t\tif v.NumMethod() == 0 {\n\t\t\t\tv.Set(reflect.ValueOf(string(s)))\n\t\t\t} else {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"string\", v.Type(), int64(d.off)})\n\t\t\t}\n\t\t}\n\n\tdefault: // number\n\t\tif c != '-' && (c < '0' || c > '9') {\n\t\t\tif fromQuoted {\n\t\t\t\td.error(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.error(errPhase)\n\t\t\t}\n\t\t}\n\t\ts := string(item)\n\t\tswitch v.Kind() {\n\t\tdefault:\n\t\t\tif v.Kind() == reflect.String && v.Type() == numberType {\n\t\t\t\tv.SetString(s)\n\t\t\t\tif !isValidNumber(s) {\n\t\t\t\t\td.error(fmt.Errorf(\"json: invalid number literal, trying to unmarshal %q into Number\", item))\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif fromQuoted {\n\t\t\t\td.error(fmt.Errorf(\"json: invalid use of ,string struct tag, trying to unmarshal %q into %v\", item, v.Type()))\n\t\t\t} else {\n\t\t\t\td.error(&UnmarshalTypeError{\"number\", v.Type(), int64(d.off)})\n\t\t\t}\n\t\tcase reflect.Interface:\n\t\t\tn, err := d.convertNumber(s)\n\t\t\tif err != nil {\n\t\t\t\td.saveError(err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif v.NumMethod() != 0 {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"number\", v.Type(), int64(d.off)})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv.Set(reflect.ValueOf(n))\n\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\tn, err := strconv.ParseInt(s, 10, 64)\n\t\t\tif err != nil || v.OverflowInt(n) {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"number \" + s, v.Type(), int64(d.off)})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv.SetInt(n)\n\n\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\t\tn, err := strconv.ParseUint(s, 10, 64)\n\t\t\tif err != nil || v.OverflowUint(n) {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"number \" + s, v.Type(), int64(d.off)})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv.SetUint(n)\n\n\t\tcase reflect.Float32, reflect.Float64:\n\t\t\tn, err := strconv.ParseFloat(s, v.Type().Bits())\n\t\t\tif err != nil || v.OverflowFloat(n) {\n\t\t\t\td.saveError(&UnmarshalTypeError{\"number \" + s, v.Type(), int64(d.off)})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv.SetFloat(n)\n\t\t}\n\t}\n}\n\n// The xxxInterface routines build up a value to be stored\n// in an empty interface.  They are not strictly necessary,\n// but they avoid the weight of reflection in this common case.\n\n// valueInterface is like value but returns interface{}\nfunc (d *decodeState) valueInterface() interface{} {\n\tswitch d.scanWhile(scanSkipSpace) {\n\tdefault:\n\t\td.error(errPhase)\n\t\tpanic(\"unreachable\")\n\tcase scanBeginArray:\n\t\treturn d.arrayInterface()\n\tcase scanBeginObject:\n\t\treturn d.objectInterface()\n\tcase scanBeginLiteral:\n\t\treturn d.literalInterface()\n\t}\n}\n\n// arrayInterface is like array but returns []interface{}.\nfunc (d *decodeState) arrayInterface() []interface{} {\n\tvar v = make([]interface{}, 0)\n\tfor {\n\t\t// Look ahead for ] - can only happen on first iteration.\n\t\top := d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndArray {\n\t\t\tbreak\n\t\t}\n\n\t\t// Back up so d.value can have the byte we just read.\n\t\td.off--\n\t\td.scan.undo(op)\n\n\t\tv = append(v, d.valueInterface())\n\n\t\t// Next token must be , or ].\n\t\top = d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndArray {\n\t\t\tbreak\n\t\t}\n\t\tif op != scanArrayValue {\n\t\t\td.error(errPhase)\n\t\t}\n\t}\n\treturn v\n}\n\n// objectInterface is like object but returns map[string]interface{}.\nfunc (d *decodeState) objectInterface() map[string]interface{} {\n\tm := make(map[string]interface{})\n\tkeys := map[string]bool{}\n\n\tfor {\n\t\t// Read opening \" of string key or closing }.\n\t\top := d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndObject {\n\t\t\t// closing } - can only happen on first iteration.\n\t\t\tbreak\n\t\t}\n\t\tif op != scanBeginLiteral {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Read string key.\n\t\tstart := d.off - 1\n\t\top = d.scanWhile(scanContinue)\n\t\titem := d.data[start : d.off-1]\n\t\tkey, ok := unquote(item)\n\t\tif !ok {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Check for duplicate keys.\n\t\t_, ok = keys[key]\n\t\tif !ok {\n\t\t\tkeys[key] = true\n\t\t} else {\n\t\t\td.error(fmt.Errorf(\"json: duplicate key '%s' in object\", key))\n\t\t}\n\n\t\t// Read : before value.\n\t\tif op == scanSkipSpace {\n\t\t\top = d.scanWhile(scanSkipSpace)\n\t\t}\n\t\tif op != scanObjectKey {\n\t\t\td.error(errPhase)\n\t\t}\n\n\t\t// Read value.\n\t\tm[key] = d.valueInterface()\n\n\t\t// Next token must be , or }.\n\t\top = d.scanWhile(scanSkipSpace)\n\t\tif op == scanEndObject {\n\t\t\tbreak\n\t\t}\n\t\tif op != scanObjectValue {\n\t\t\td.error(errPhase)\n\t\t}\n\t}\n\treturn m\n}\n\n// literalInterface is like literal but returns an interface value.\nfunc (d *decodeState) literalInterface() interface{} {\n\t// All bytes inside literal return scanContinue op code.\n\tstart := d.off - 1\n\top := d.scanWhile(scanContinue)\n\n\t// Scan read one byte too far; back up.\n\td.off--\n\td.scan.undo(op)\n\titem := d.data[start:d.off]\n\n\tswitch c := item[0]; c {\n\tcase 'n': // null\n\t\treturn nil\n\n\tcase 't', 'f': // true, false\n\t\treturn c == 't'\n\n\tcase '\"': // string\n\t\ts, ok := unquote(item)\n\t\tif !ok {\n\t\t\td.error(errPhase)\n\t\t}\n\t\treturn s\n\n\tdefault: // number\n\t\tif c != '-' && (c < '0' || c > '9') {\n\t\t\td.error(errPhase)\n\t\t}\n\t\tn, err := d.convertNumber(string(item))\n\t\tif err != nil {\n\t\t\td.saveError(err)\n\t\t}\n\t\treturn n\n\t}\n}\n\n// getu4 decodes \\uXXXX from the beginning of s, returning the hex value,\n// or it returns -1.\nfunc getu4(s []byte) rune {\n\tif len(s) < 6 || s[0] != '\\\\' || s[1] != 'u' {\n\t\treturn -1\n\t}\n\tr, err := strconv.ParseUint(string(s[2:6]), 16, 64)\n\tif err != nil {\n\t\treturn -1\n\t}\n\treturn rune(r)\n}\n\n// unquote converts a quoted JSON string literal s into an actual string t.\n// The rules are different than for Go, so cannot use strconv.Unquote.\nfunc unquote(s []byte) (t string, ok bool) {\n\ts, ok = unquoteBytes(s)\n\tt = string(s)\n\treturn\n}\n\nfunc unquoteBytes(s []byte) (t []byte, ok bool) {\n\tif len(s) < 2 || s[0] != '\"' || s[len(s)-1] != '\"' {\n\t\treturn\n\t}\n\ts = s[1 : len(s)-1]\n\n\t// Check for unusual characters. If there are none,\n\t// then no unquoting is needed, so return a slice of the\n\t// original bytes.\n\tr := 0\n\tfor r < len(s) {\n\t\tc := s[r]\n\t\tif c == '\\\\' || c == '\"' || c < ' ' {\n\t\t\tbreak\n\t\t}\n\t\tif c < utf8.RuneSelf {\n\t\t\tr++\n\t\t\tcontinue\n\t\t}\n\t\trr, size := utf8.DecodeRune(s[r:])\n\t\tif rr == utf8.RuneError && size == 1 {\n\t\t\tbreak\n\t\t}\n\t\tr += size\n\t}\n\tif r == len(s) {\n\t\treturn s, true\n\t}\n\n\tb := make([]byte, len(s)+2*utf8.UTFMax)\n\tw := copy(b, s[0:r])\n\tfor r < len(s) {\n\t\t// Out of room?  Can only happen if s is full of\n\t\t// malformed UTF-8 and we're replacing each\n\t\t// byte with RuneError.\n\t\tif w >= len(b)-2*utf8.UTFMax {\n\t\t\tnb := make([]byte, (len(b)+utf8.UTFMax)*2)\n\t\t\tcopy(nb, b[0:w])\n\t\t\tb = nb\n\t\t}\n\t\tswitch c := s[r]; {\n\t\tcase c == '\\\\':\n\t\t\tr++\n\t\t\tif r >= len(s) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tswitch s[r] {\n\t\t\tdefault:\n\t\t\t\treturn\n\t\t\tcase '\"', '\\\\', '/', '\\'':\n\t\t\t\tb[w] = s[r]\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 'b':\n\t\t\t\tb[w] = '\\b'\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 'f':\n\t\t\t\tb[w] = '\\f'\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 'n':\n\t\t\t\tb[w] = '\\n'\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 'r':\n\t\t\t\tb[w] = '\\r'\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 't':\n\t\t\t\tb[w] = '\\t'\n\t\t\t\tr++\n\t\t\t\tw++\n\t\t\tcase 'u':\n\t\t\t\tr--\n\t\t\t\trr := getu4(s[r:])\n\t\t\t\tif rr < 0 {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tr += 6\n\t\t\t\tif utf16.IsSurrogate(rr) {\n\t\t\t\t\trr1 := getu4(s[r:])\n\t\t\t\t\tif dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar {\n\t\t\t\t\t\t// A valid pair; consume.\n\t\t\t\t\t\tr += 6\n\t\t\t\t\t\tw += utf8.EncodeRune(b[w:], dec)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// Invalid surrogate; fall back to replacement rune.\n\t\t\t\t\trr = unicode.ReplacementChar\n\t\t\t\t}\n\t\t\t\tw += utf8.EncodeRune(b[w:], rr)\n\t\t\t}\n\n\t\t// Quote, control characters are invalid.\n\t\tcase c == '\"', c < ' ':\n\t\t\treturn\n\n\t\t// ASCII\n\t\tcase c < utf8.RuneSelf:\n\t\t\tb[w] = c\n\t\t\tr++\n\t\t\tw++\n\n\t\t// Coerce to well-formed UTF-8.\n\t\tdefault:\n\t\t\trr, size := utf8.DecodeRune(s[r:])\n\t\t\tr += size\n\t\t\tw += utf8.EncodeRune(b[w:], rr)\n\t\t}\n\t}\n\treturn b[0:w], true\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/encode.go",
    "content": "// Copyright 2010 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package json implements encoding and decoding of JSON objects as defined in\n// RFC 4627. The mapping between JSON objects and Go values is described\n// in the documentation for the Marshal and Unmarshal functions.\n//\n// See \"JSON and Go\" for an introduction to this package:\n// https://golang.org/doc/articles/json_and_go.html\npackage json\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n// Marshal returns the JSON encoding of v.\n//\n// Marshal traverses the value v recursively.\n// If an encountered value implements the Marshaler interface\n// and is not a nil pointer, Marshal calls its MarshalJSON method\n// to produce JSON. If no MarshalJSON method is present but the\n// value implements encoding.TextMarshaler instead, Marshal calls\n// its MarshalText method.\n// The nil pointer exception is not strictly necessary\n// but mimics a similar, necessary exception in the behavior of\n// UnmarshalJSON.\n//\n// Otherwise, Marshal uses the following type-dependent default encodings:\n//\n// Boolean values encode as JSON booleans.\n//\n// Floating point, integer, and Number values encode as JSON numbers.\n//\n// String values encode as JSON strings coerced to valid UTF-8,\n// replacing invalid bytes with the Unicode replacement rune.\n// The angle brackets \"<\" and \">\" are escaped to \"\\u003c\" and \"\\u003e\"\n// to keep some browsers from misinterpreting JSON output as HTML.\n// Ampersand \"&\" is also escaped to \"\\u0026\" for the same reason.\n//\n// Array and slice values encode as JSON arrays, except that\n// []byte encodes as a base64-encoded string, and a nil slice\n// encodes as the null JSON object.\n//\n// Struct values encode as JSON objects. Each exported struct field\n// becomes a member of the object unless\n//   - the field's tag is \"-\", or\n//   - the field is empty and its tag specifies the \"omitempty\" option.\n//\n// The empty values are false, 0, any\n// nil pointer or interface value, and any array, slice, map, or string of\n// length zero. The object's default key string is the struct field name\n// but can be specified in the struct field's tag value. The \"json\" key in\n// the struct field's tag value is the key name, followed by an optional comma\n// and options. Examples:\n//\n//\t// Field is ignored by this package.\n//\tField int `json:\"-\"`\n//\n//\t// Field appears in JSON as key \"myName\".\n//\tField int `json:\"myName\"`\n//\n//\t// Field appears in JSON as key \"myName\" and\n//\t// the field is omitted from the object if its value is empty,\n//\t// as defined above.\n//\tField int `json:\"myName,omitempty\"`\n//\n//\t// Field appears in JSON as key \"Field\" (the default), but\n//\t// the field is skipped if empty.\n//\t// Note the leading comma.\n//\tField int `json:\",omitempty\"`\n//\n// The \"string\" option signals that a field is stored as JSON inside a\n// JSON-encoded string. It applies only to fields of string, floating point,\n// integer, or boolean types. This extra level of encoding is sometimes used\n// when communicating with JavaScript programs:\n//\n//\tInt64String int64 `json:\",string\"`\n//\n// The key name will be used if it's a non-empty string consisting of\n// only Unicode letters, digits, dollar signs, percent signs, hyphens,\n// underscores and slashes.\n//\n// Anonymous struct fields are usually marshaled as if their inner exported fields\n// were fields in the outer struct, subject to the usual Go visibility rules amended\n// as described in the next paragraph.\n// An anonymous struct field with a name given in its JSON tag is treated as\n// having that name, rather than being anonymous.\n// An anonymous struct field of interface type is treated the same as having\n// that type as its name, rather than being anonymous.\n//\n// The Go visibility rules for struct fields are amended for JSON when\n// deciding which field to marshal or unmarshal. If there are\n// multiple fields at the same level, and that level is the least\n// nested (and would therefore be the nesting level selected by the\n// usual Go rules), the following extra rules apply:\n//\n// 1) Of those fields, if any are JSON-tagged, only tagged fields are considered,\n// even if there are multiple untagged fields that would otherwise conflict.\n// 2) If there is exactly one field (tagged or not according to the first rule), that is selected.\n// 3) Otherwise there are multiple fields, and all are ignored; no error occurs.\n//\n// Handling of anonymous struct fields is new in Go 1.1.\n// Prior to Go 1.1, anonymous struct fields were ignored. To force ignoring of\n// an anonymous struct field in both current and earlier versions, give the field\n// a JSON tag of \"-\".\n//\n// Map values encode as JSON objects.\n// The map's key type must be string; the map keys are used as JSON object\n// keys, subject to the UTF-8 coercion described for string values above.\n//\n// Pointer values encode as the value pointed to.\n// A nil pointer encodes as the null JSON object.\n//\n// Interface values encode as the value contained in the interface.\n// A nil interface value encodes as the null JSON object.\n//\n// Channel, complex, and function values cannot be encoded in JSON.\n// Attempting to encode such a value causes Marshal to return\n// an UnsupportedTypeError.\n//\n// JSON cannot represent cyclic data structures and Marshal does not\n// handle them.  Passing cyclic structures to Marshal will result in\n// an infinite recursion.\nfunc Marshal(v interface{}) ([]byte, error) {\n\te := &encodeState{}\n\terr := e.marshal(v)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn e.Bytes(), nil\n}\n\n// MarshalIndent is like Marshal but applies Indent to format the output.\nfunc MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {\n\tb, err := Marshal(v)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar buf bytes.Buffer\n\terr = Indent(&buf, b, prefix, indent)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n\n// HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029\n// characters inside string literals changed to \\u003c, \\u003e, \\u0026, \\u2028, \\u2029\n// so that the JSON will be safe to embed inside HTML <script> tags.\n// For historical reasons, web browsers don't honor standard HTML\n// escaping within <script> tags, so an alternative JSON encoding must\n// be used.\nfunc HTMLEscape(dst *bytes.Buffer, src []byte) {\n\t// The characters can only appear in string literals,\n\t// so just scan the string one byte at a time.\n\tstart := 0\n\tfor i, c := range src {\n\t\tif c == '<' || c == '>' || c == '&' {\n\t\t\tif start < i {\n\t\t\t\tdst.Write(src[start:i])\n\t\t\t}\n\t\t\tdst.WriteString(`\\u00`)\n\t\t\tdst.WriteByte(hex[c>>4])\n\t\t\tdst.WriteByte(hex[c&0xF])\n\t\t\tstart = i + 1\n\t\t}\n\t\t// Convert U+2028 and U+2029 (E2 80 A8 and E2 80 A9).\n\t\tif c == 0xE2 && i+2 < len(src) && src[i+1] == 0x80 && src[i+2]&^1 == 0xA8 {\n\t\t\tif start < i {\n\t\t\t\tdst.Write(src[start:i])\n\t\t\t}\n\t\t\tdst.WriteString(`\\u202`)\n\t\t\tdst.WriteByte(hex[src[i+2]&0xF])\n\t\t\tstart = i + 3\n\t\t}\n\t}\n\tif start < len(src) {\n\t\tdst.Write(src[start:])\n\t}\n}\n\n// Marshaler is the interface implemented by objects that\n// can marshal themselves into valid JSON.\ntype Marshaler interface {\n\tMarshalJSON() ([]byte, error)\n}\n\n// An UnsupportedTypeError is returned by Marshal when attempting\n// to encode an unsupported value type.\ntype UnsupportedTypeError struct {\n\tType reflect.Type\n}\n\nfunc (e *UnsupportedTypeError) Error() string {\n\treturn \"json: unsupported type: \" + e.Type.String()\n}\n\ntype UnsupportedValueError struct {\n\tValue reflect.Value\n\tStr   string\n}\n\nfunc (e *UnsupportedValueError) Error() string {\n\treturn \"json: unsupported value: \" + e.Str\n}\n\n// Before Go 1.2, an InvalidUTF8Error was returned by Marshal when\n// attempting to encode a string value with invalid UTF-8 sequences.\n// As of Go 1.2, Marshal instead coerces the string to valid UTF-8 by\n// replacing invalid bytes with the Unicode replacement rune U+FFFD.\n// This error is no longer generated but is kept for backwards compatibility\n// with programs that might mention it.\ntype InvalidUTF8Error struct {\n\tS string // the whole string value that caused the error\n}\n\nfunc (e *InvalidUTF8Error) Error() string {\n\treturn \"json: invalid UTF-8 in string: \" + strconv.Quote(e.S)\n}\n\ntype MarshalerError struct {\n\tType reflect.Type\n\tErr  error\n}\n\nfunc (e *MarshalerError) Error() string {\n\treturn \"json: error calling MarshalJSON for type \" + e.Type.String() + \": \" + e.Err.Error()\n}\n\nvar hex = \"0123456789abcdef\"\n\n// An encodeState encodes JSON into a bytes.Buffer.\ntype encodeState struct {\n\tbytes.Buffer // accumulated output\n\tscratch      [64]byte\n}\n\nvar encodeStatePool sync.Pool\n\nfunc newEncodeState() *encodeState {\n\tif v := encodeStatePool.Get(); v != nil {\n\t\te := v.(*encodeState)\n\t\te.Reset()\n\t\treturn e\n\t}\n\treturn new(encodeState)\n}\n\nfunc (e *encodeState) marshal(v interface{}) (err error) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tif _, ok := r.(runtime.Error); ok {\n\t\t\t\tpanic(r)\n\t\t\t}\n\t\t\tif s, ok := r.(string); ok {\n\t\t\t\tpanic(s)\n\t\t\t}\n\t\t\terr = r.(error)\n\t\t}\n\t}()\n\te.reflectValue(reflect.ValueOf(v))\n\treturn nil\n}\n\nfunc (e *encodeState) error(err error) {\n\tpanic(err)\n}\n\nfunc isEmptyValue(v reflect.Value) bool {\n\tswitch v.Kind() {\n\tcase reflect.Array, reflect.Map, reflect.Slice, reflect.String:\n\t\treturn v.Len() == 0\n\tcase reflect.Bool:\n\t\treturn !v.Bool()\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn v.Int() == 0\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn v.Uint() == 0\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn v.Float() == 0\n\tcase reflect.Interface, reflect.Ptr:\n\t\treturn v.IsNil()\n\t}\n\treturn false\n}\n\nfunc (e *encodeState) reflectValue(v reflect.Value) {\n\tvalueEncoder(v)(e, v, false)\n}\n\ntype encoderFunc func(e *encodeState, v reflect.Value, quoted bool)\n\nvar encoderCache struct {\n\tsync.RWMutex\n\tm map[reflect.Type]encoderFunc\n}\n\nfunc valueEncoder(v reflect.Value) encoderFunc {\n\tif !v.IsValid() {\n\t\treturn invalidValueEncoder\n\t}\n\treturn typeEncoder(v.Type())\n}\n\nfunc typeEncoder(t reflect.Type) encoderFunc {\n\tencoderCache.RLock()\n\tf := encoderCache.m[t]\n\tencoderCache.RUnlock()\n\tif f != nil {\n\t\treturn f\n\t}\n\n\t// To deal with recursive types, populate the map with an\n\t// indirect func before we build it. This type waits on the\n\t// real func (f) to be ready and then calls it.  This indirect\n\t// func is only used for recursive types.\n\tencoderCache.Lock()\n\tif encoderCache.m == nil {\n\t\tencoderCache.m = make(map[reflect.Type]encoderFunc)\n\t}\n\tvar wg sync.WaitGroup\n\twg.Add(1)\n\tencoderCache.m[t] = func(e *encodeState, v reflect.Value, quoted bool) {\n\t\twg.Wait()\n\t\tf(e, v, quoted)\n\t}\n\tencoderCache.Unlock()\n\n\t// Compute fields without lock.\n\t// Might duplicate effort but won't hold other computations back.\n\tf = newTypeEncoder(t, true)\n\twg.Done()\n\tencoderCache.Lock()\n\tencoderCache.m[t] = f\n\tencoderCache.Unlock()\n\treturn f\n}\n\nvar (\n\tmarshalerType     = reflect.TypeOf(new(Marshaler)).Elem()\n\ttextMarshalerType = reflect.TypeOf(new(encoding.TextMarshaler)).Elem()\n)\n\n// newTypeEncoder constructs an encoderFunc for a type.\n// The returned encoder only checks CanAddr when allowAddr is true.\nfunc newTypeEncoder(t reflect.Type, allowAddr bool) encoderFunc {\n\tif t.Implements(marshalerType) {\n\t\treturn marshalerEncoder\n\t}\n\tif t.Kind() != reflect.Ptr && allowAddr {\n\t\tif reflect.PtrTo(t).Implements(marshalerType) {\n\t\t\treturn newCondAddrEncoder(addrMarshalerEncoder, newTypeEncoder(t, false))\n\t\t}\n\t}\n\n\tif t.Implements(textMarshalerType) {\n\t\treturn textMarshalerEncoder\n\t}\n\tif t.Kind() != reflect.Ptr && allowAddr {\n\t\tif reflect.PtrTo(t).Implements(textMarshalerType) {\n\t\t\treturn newCondAddrEncoder(addrTextMarshalerEncoder, newTypeEncoder(t, false))\n\t\t}\n\t}\n\n\tswitch t.Kind() {\n\tcase reflect.Bool:\n\t\treturn boolEncoder\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn intEncoder\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn uintEncoder\n\tcase reflect.Float32:\n\t\treturn float32Encoder\n\tcase reflect.Float64:\n\t\treturn float64Encoder\n\tcase reflect.String:\n\t\treturn stringEncoder\n\tcase reflect.Interface:\n\t\treturn interfaceEncoder\n\tcase reflect.Struct:\n\t\treturn newStructEncoder(t)\n\tcase reflect.Map:\n\t\treturn newMapEncoder(t)\n\tcase reflect.Slice:\n\t\treturn newSliceEncoder(t)\n\tcase reflect.Array:\n\t\treturn newArrayEncoder(t)\n\tcase reflect.Ptr:\n\t\treturn newPtrEncoder(t)\n\tdefault:\n\t\treturn unsupportedTypeEncoder\n\t}\n}\n\nfunc invalidValueEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\te.WriteString(\"null\")\n}\n\nfunc marshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.Kind() == reflect.Ptr && v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tm := v.Interface().(Marshaler)\n\tb, err := m.MarshalJSON()\n\tif err == nil {\n\t\t// copy JSON into buffer, checking validity.\n\t\terr = compact(&e.Buffer, b, true)\n\t}\n\tif err != nil {\n\t\te.error(&MarshalerError{v.Type(), err})\n\t}\n}\n\nfunc addrMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tva := v.Addr()\n\tif va.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tm := va.Interface().(Marshaler)\n\tb, err := m.MarshalJSON()\n\tif err == nil {\n\t\t// copy JSON into buffer, checking validity.\n\t\terr = compact(&e.Buffer, b, true)\n\t}\n\tif err != nil {\n\t\te.error(&MarshalerError{v.Type(), err})\n\t}\n}\n\nfunc textMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.Kind() == reflect.Ptr && v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tm := v.Interface().(encoding.TextMarshaler)\n\tb, err := m.MarshalText()\n\tif err != nil {\n\t\te.error(&MarshalerError{v.Type(), err})\n\t}\n\te.stringBytes(b)\n}\n\nfunc addrTextMarshalerEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tva := v.Addr()\n\tif va.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tm := va.Interface().(encoding.TextMarshaler)\n\tb, err := m.MarshalText()\n\tif err != nil {\n\t\te.error(&MarshalerError{v.Type(), err})\n\t}\n\te.stringBytes(b)\n}\n\nfunc boolEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n\tif v.Bool() {\n\t\te.WriteString(\"true\")\n\t} else {\n\t\te.WriteString(\"false\")\n\t}\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n}\n\nfunc intEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tb := strconv.AppendInt(e.scratch[:0], v.Int(), 10)\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n\te.Write(b)\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n}\n\nfunc uintEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tb := strconv.AppendUint(e.scratch[:0], v.Uint(), 10)\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n\te.Write(b)\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n}\n\ntype floatEncoder int // number of bits\n\nfunc (bits floatEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {\n\tf := v.Float()\n\tif math.IsInf(f, 0) || math.IsNaN(f) {\n\t\te.error(&UnsupportedValueError{v, strconv.FormatFloat(f, 'g', -1, int(bits))})\n\t}\n\tb := strconv.AppendFloat(e.scratch[:0], f, 'g', -1, int(bits))\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n\te.Write(b)\n\tif quoted {\n\t\te.WriteByte('\"')\n\t}\n}\n\nvar (\n\tfloat32Encoder = (floatEncoder(32)).encode\n\tfloat64Encoder = (floatEncoder(64)).encode\n)\n\nfunc stringEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.Type() == numberType {\n\t\tnumStr := v.String()\n\t\t// In Go1.5 the empty string encodes to \"0\", while this is not a valid number literal\n\t\t// we keep compatibility so check validity after this.\n\t\tif numStr == \"\" {\n\t\t\tnumStr = \"0\" // Number's zero-val\n\t\t}\n\t\tif !isValidNumber(numStr) {\n\t\t\te.error(fmt.Errorf(\"json: invalid number literal %q\", numStr))\n\t\t}\n\t\te.WriteString(numStr)\n\t\treturn\n\t}\n\tif quoted {\n\t\tsb, err := Marshal(v.String())\n\t\tif err != nil {\n\t\t\te.error(err)\n\t\t}\n\t\te.string(string(sb))\n\t} else {\n\t\te.string(v.String())\n\t}\n}\n\nfunc interfaceEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\te.reflectValue(v.Elem())\n}\n\nfunc unsupportedTypeEncoder(e *encodeState, v reflect.Value, quoted bool) {\n\te.error(&UnsupportedTypeError{v.Type()})\n}\n\ntype structEncoder struct {\n\tfields    []field\n\tfieldEncs []encoderFunc\n}\n\nfunc (se *structEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {\n\te.WriteByte('{')\n\tfirst := true\n\tfor i, f := range se.fields {\n\t\tfv := fieldByIndex(v, f.index)\n\t\tif !fv.IsValid() || f.omitEmpty && isEmptyValue(fv) {\n\t\t\tcontinue\n\t\t}\n\t\tif first {\n\t\t\tfirst = false\n\t\t} else {\n\t\t\te.WriteByte(',')\n\t\t}\n\t\te.string(f.name)\n\t\te.WriteByte(':')\n\t\tse.fieldEncs[i](e, fv, f.quoted)\n\t}\n\te.WriteByte('}')\n}\n\nfunc newStructEncoder(t reflect.Type) encoderFunc {\n\tfields := cachedTypeFields(t)\n\tse := &structEncoder{\n\t\tfields:    fields,\n\t\tfieldEncs: make([]encoderFunc, len(fields)),\n\t}\n\tfor i, f := range fields {\n\t\tse.fieldEncs[i] = typeEncoder(typeByIndex(t, f.index))\n\t}\n\treturn se.encode\n}\n\ntype mapEncoder struct {\n\telemEnc encoderFunc\n}\n\nfunc (me *mapEncoder) encode(e *encodeState, v reflect.Value, _ bool) {\n\tif v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\te.WriteByte('{')\n\tvar sv stringValues = v.MapKeys()\n\tsort.Sort(sv)\n\tfor i, k := range sv {\n\t\tif i > 0 {\n\t\t\te.WriteByte(',')\n\t\t}\n\t\te.string(k.String())\n\t\te.WriteByte(':')\n\t\tme.elemEnc(e, v.MapIndex(k), false)\n\t}\n\te.WriteByte('}')\n}\n\nfunc newMapEncoder(t reflect.Type) encoderFunc {\n\tif t.Key().Kind() != reflect.String {\n\t\treturn unsupportedTypeEncoder\n\t}\n\tme := &mapEncoder{typeEncoder(t.Elem())}\n\treturn me.encode\n}\n\nfunc encodeByteSlice(e *encodeState, v reflect.Value, _ bool) {\n\tif v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\ts := v.Bytes()\n\te.WriteByte('\"')\n\tif len(s) < 1024 {\n\t\t// for small buffers, using Encode directly is much faster.\n\t\tdst := make([]byte, base64.StdEncoding.EncodedLen(len(s)))\n\t\tbase64.StdEncoding.Encode(dst, s)\n\t\te.Write(dst)\n\t} else {\n\t\t// for large buffers, avoid unnecessary extra temporary\n\t\t// buffer space.\n\t\tenc := base64.NewEncoder(base64.StdEncoding, e)\n\t\t_, _ = enc.Write(s)\n\t\tenc.Close()\n\t}\n\te.WriteByte('\"')\n}\n\n// sliceEncoder just wraps an arrayEncoder, checking to make sure the value isn't nil.\ntype sliceEncoder struct {\n\tarrayEnc encoderFunc\n}\n\nfunc (se *sliceEncoder) encode(e *encodeState, v reflect.Value, _ bool) {\n\tif v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tse.arrayEnc(e, v, false)\n}\n\nfunc newSliceEncoder(t reflect.Type) encoderFunc {\n\t// Byte slices get special treatment; arrays don't.\n\tif t.Elem().Kind() == reflect.Uint8 {\n\t\treturn encodeByteSlice\n\t}\n\tenc := &sliceEncoder{newArrayEncoder(t)}\n\treturn enc.encode\n}\n\ntype arrayEncoder struct {\n\telemEnc encoderFunc\n}\n\nfunc (ae *arrayEncoder) encode(e *encodeState, v reflect.Value, _ bool) {\n\te.WriteByte('[')\n\tn := v.Len()\n\tfor i := 0; i < n; i++ {\n\t\tif i > 0 {\n\t\t\te.WriteByte(',')\n\t\t}\n\t\tae.elemEnc(e, v.Index(i), false)\n\t}\n\te.WriteByte(']')\n}\n\nfunc newArrayEncoder(t reflect.Type) encoderFunc {\n\tenc := &arrayEncoder{typeEncoder(t.Elem())}\n\treturn enc.encode\n}\n\ntype ptrEncoder struct {\n\telemEnc encoderFunc\n}\n\nfunc (pe *ptrEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.IsNil() {\n\t\te.WriteString(\"null\")\n\t\treturn\n\t}\n\tpe.elemEnc(e, v.Elem(), quoted)\n}\n\nfunc newPtrEncoder(t reflect.Type) encoderFunc {\n\tenc := &ptrEncoder{typeEncoder(t.Elem())}\n\treturn enc.encode\n}\n\ntype condAddrEncoder struct {\n\tcanAddrEnc, elseEnc encoderFunc\n}\n\nfunc (ce *condAddrEncoder) encode(e *encodeState, v reflect.Value, quoted bool) {\n\tif v.CanAddr() {\n\t\tce.canAddrEnc(e, v, quoted)\n\t} else {\n\t\tce.elseEnc(e, v, quoted)\n\t}\n}\n\n// newCondAddrEncoder returns an encoder that checks whether its value\n// CanAddr and delegates to canAddrEnc if so, else to elseEnc.\nfunc newCondAddrEncoder(canAddrEnc, elseEnc encoderFunc) encoderFunc {\n\tenc := &condAddrEncoder{canAddrEnc: canAddrEnc, elseEnc: elseEnc}\n\treturn enc.encode\n}\n\nfunc isValidTag(s string) bool {\n\tif s == \"\" {\n\t\treturn false\n\t}\n\tfor _, c := range s {\n\t\tswitch {\n\t\tcase strings.ContainsRune(\"!#$%&()*+-./:<=>?@[]^_{|}~ \", c):\n\t\t\t// Backslash and quote chars are reserved, but\n\t\t\t// otherwise any punctuation chars are allowed\n\t\t\t// in a tag name.\n\t\tdefault:\n\t\t\tif !unicode.IsLetter(c) && !unicode.IsDigit(c) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\nfunc fieldByIndex(v reflect.Value, index []int) reflect.Value {\n\tfor _, i := range index {\n\t\tif v.Kind() == reflect.Ptr {\n\t\t\tif v.IsNil() {\n\t\t\t\treturn reflect.Value{}\n\t\t\t}\n\t\t\tv = v.Elem()\n\t\t}\n\t\tv = v.Field(i)\n\t}\n\treturn v\n}\n\nfunc typeByIndex(t reflect.Type, index []int) reflect.Type {\n\tfor _, i := range index {\n\t\tif t.Kind() == reflect.Ptr {\n\t\t\tt = t.Elem()\n\t\t}\n\t\tt = t.Field(i).Type\n\t}\n\treturn t\n}\n\n// stringValues is a slice of reflect.Value holding *reflect.StringValue.\n// It implements the methods to sort by string.\ntype stringValues []reflect.Value\n\nfunc (sv stringValues) Len() int           { return len(sv) }\nfunc (sv stringValues) Swap(i, j int)      { sv[i], sv[j] = sv[j], sv[i] }\nfunc (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) }\nfunc (sv stringValues) get(i int) string   { return sv[i].String() }\n\n// NOTE: keep in sync with stringBytes below.\nfunc (e *encodeState) string(s string) int {\n\tlen0 := e.Len()\n\te.WriteByte('\"')\n\tstart := 0\n\tfor i := 0; i < len(s); {\n\t\tif b := s[i]; b < utf8.RuneSelf {\n\t\t\tif 0x20 <= b && b != '\\\\' && b != '\"' && b != '<' && b != '>' && b != '&' {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif start < i {\n\t\t\t\te.WriteString(s[start:i])\n\t\t\t}\n\t\t\tswitch b {\n\t\t\tcase '\\\\', '\"':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte(b)\n\t\t\tcase '\\n':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('n')\n\t\t\tcase '\\r':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('r')\n\t\t\tcase '\\t':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('t')\n\t\t\tdefault:\n\t\t\t\t// This encodes bytes < 0x20 except for \\n and \\r,\n\t\t\t\t// as well as <, > and &. The latter are escaped because they\n\t\t\t\t// can lead to security holes when user-controlled strings\n\t\t\t\t// are rendered into JSON and served to some browsers.\n\t\t\t\te.WriteString(`\\u00`)\n\t\t\t\te.WriteByte(hex[b>>4])\n\t\t\t\te.WriteByte(hex[b&0xF])\n\t\t\t}\n\t\t\ti++\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\tc, size := utf8.DecodeRuneInString(s[i:])\n\t\tif c == utf8.RuneError && size == 1 {\n\t\t\tif start < i {\n\t\t\t\te.WriteString(s[start:i])\n\t\t\t}\n\t\t\te.WriteString(`\\ufffd`)\n\t\t\ti += size\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\t// U+2028 is LINE SEPARATOR.\n\t\t// U+2029 is PARAGRAPH SEPARATOR.\n\t\t// They are both technically valid characters in JSON strings,\n\t\t// but don't work in JSONP, which has to be evaluated as JavaScript,\n\t\t// and can lead to security holes there. It is valid JSON to\n\t\t// escape them, so we do so unconditionally.\n\t\t// See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.\n\t\tif c == '\\u2028' || c == '\\u2029' {\n\t\t\tif start < i {\n\t\t\t\te.WriteString(s[start:i])\n\t\t\t}\n\t\t\te.WriteString(`\\u202`)\n\t\t\te.WriteByte(hex[c&0xF])\n\t\t\ti += size\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\ti += size\n\t}\n\tif start < len(s) {\n\t\te.WriteString(s[start:])\n\t}\n\te.WriteByte('\"')\n\treturn e.Len() - len0\n}\n\n// NOTE: keep in sync with string above.\nfunc (e *encodeState) stringBytes(s []byte) int {\n\tlen0 := e.Len()\n\te.WriteByte('\"')\n\tstart := 0\n\tfor i := 0; i < len(s); {\n\t\tif b := s[i]; b < utf8.RuneSelf {\n\t\t\tif 0x20 <= b && b != '\\\\' && b != '\"' && b != '<' && b != '>' && b != '&' {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif start < i {\n\t\t\t\te.Write(s[start:i])\n\t\t\t}\n\t\t\tswitch b {\n\t\t\tcase '\\\\', '\"':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte(b)\n\t\t\tcase '\\n':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('n')\n\t\t\tcase '\\r':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('r')\n\t\t\tcase '\\t':\n\t\t\t\te.WriteByte('\\\\')\n\t\t\t\te.WriteByte('t')\n\t\t\tdefault:\n\t\t\t\t// This encodes bytes < 0x20 except for \\n and \\r,\n\t\t\t\t// as well as <, >, and &. The latter are escaped because they\n\t\t\t\t// can lead to security holes when user-controlled strings\n\t\t\t\t// are rendered into JSON and served to some browsers.\n\t\t\t\te.WriteString(`\\u00`)\n\t\t\t\te.WriteByte(hex[b>>4])\n\t\t\t\te.WriteByte(hex[b&0xF])\n\t\t\t}\n\t\t\ti++\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\tc, size := utf8.DecodeRune(s[i:])\n\t\tif c == utf8.RuneError && size == 1 {\n\t\t\tif start < i {\n\t\t\t\te.Write(s[start:i])\n\t\t\t}\n\t\t\te.WriteString(`\\ufffd`)\n\t\t\ti += size\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\t// U+2028 is LINE SEPARATOR.\n\t\t// U+2029 is PARAGRAPH SEPARATOR.\n\t\t// They are both technically valid characters in JSON strings,\n\t\t// but don't work in JSONP, which has to be evaluated as JavaScript,\n\t\t// and can lead to security holes there. It is valid JSON to\n\t\t// escape them, so we do so unconditionally.\n\t\t// See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.\n\t\tif c == '\\u2028' || c == '\\u2029' {\n\t\t\tif start < i {\n\t\t\t\te.Write(s[start:i])\n\t\t\t}\n\t\t\te.WriteString(`\\u202`)\n\t\t\te.WriteByte(hex[c&0xF])\n\t\t\ti += size\n\t\t\tstart = i\n\t\t\tcontinue\n\t\t}\n\t\ti += size\n\t}\n\tif start < len(s) {\n\t\te.Write(s[start:])\n\t}\n\te.WriteByte('\"')\n\treturn e.Len() - len0\n}\n\n// A field represents a single field found in a struct.\ntype field struct {\n\tname      string\n\tnameBytes []byte // []byte(name)\n\n\ttag       bool\n\tindex     []int\n\ttyp       reflect.Type\n\tomitEmpty bool\n\tquoted    bool\n}\n\nfunc fillField(f field) field {\n\tf.nameBytes = []byte(f.name)\n\treturn f\n}\n\n// byName sorts field by name, breaking ties with depth,\n// then breaking ties with \"name came from json tag\", then\n// breaking ties with index sequence.\ntype byName []field\n\nfunc (x byName) Len() int { return len(x) }\n\nfunc (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }\n\nfunc (x byName) Less(i, j int) bool {\n\tif x[i].name != x[j].name {\n\t\treturn x[i].name < x[j].name\n\t}\n\tif len(x[i].index) != len(x[j].index) {\n\t\treturn len(x[i].index) < len(x[j].index)\n\t}\n\tif x[i].tag != x[j].tag {\n\t\treturn x[i].tag\n\t}\n\treturn byIndex(x).Less(i, j)\n}\n\n// byIndex sorts field by index sequence.\ntype byIndex []field\n\nfunc (x byIndex) Len() int { return len(x) }\n\nfunc (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }\n\nfunc (x byIndex) Less(i, j int) bool {\n\tfor k, xik := range x[i].index {\n\t\tif k >= len(x[j].index) {\n\t\t\treturn false\n\t\t}\n\t\tif xik != x[j].index[k] {\n\t\t\treturn xik < x[j].index[k]\n\t\t}\n\t}\n\treturn len(x[i].index) < len(x[j].index)\n}\n\n// typeFields returns a list of fields that JSON should recognize for the given type.\n// The algorithm is breadth-first search over the set of structs to include - the top struct\n// and then any reachable anonymous structs.\nfunc typeFields(t reflect.Type) []field {\n\t// Anonymous fields to explore at the current level and the next.\n\tcurrent := []field{}\n\tnext := []field{{typ: t}}\n\n\t// Count of queued names for current level and the next.\n\tcount := map[reflect.Type]int{}\n\tnextCount := map[reflect.Type]int{}\n\n\t// Types already visited at an earlier level.\n\tvisited := map[reflect.Type]bool{}\n\n\t// Fields found.\n\tvar fields []field\n\n\tfor len(next) > 0 {\n\t\tcurrent, next = next, current[:0]\n\t\tcount, nextCount = nextCount, map[reflect.Type]int{}\n\n\t\tfor _, f := range current {\n\t\t\tif visited[f.typ] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvisited[f.typ] = true\n\n\t\t\t// Scan f.typ for fields to include.\n\t\t\tfor i := 0; i < f.typ.NumField(); i++ {\n\t\t\t\tsf := f.typ.Field(i)\n\t\t\t\tif sf.PkgPath != \"\" && !sf.Anonymous { // unexported\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttag := sf.Tag.Get(\"json\")\n\t\t\t\tif tag == \"-\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tname, opts := parseTag(tag)\n\t\t\t\tif !isValidTag(name) {\n\t\t\t\t\tname = \"\"\n\t\t\t\t}\n\t\t\t\tindex := make([]int, len(f.index)+1)\n\t\t\t\tcopy(index, f.index)\n\t\t\t\tindex[len(f.index)] = i\n\n\t\t\t\tft := sf.Type\n\t\t\t\tif ft.Name() == \"\" && ft.Kind() == reflect.Ptr {\n\t\t\t\t\t// Follow pointer.\n\t\t\t\t\tft = ft.Elem()\n\t\t\t\t}\n\n\t\t\t\t// Only strings, floats, integers, and booleans can be quoted.\n\t\t\t\tquoted := false\n\t\t\t\tif opts.Contains(\"string\") {\n\t\t\t\t\tswitch ft.Kind() {\n\t\t\t\t\tcase reflect.Bool,\n\t\t\t\t\t\treflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,\n\t\t\t\t\t\treflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,\n\t\t\t\t\t\treflect.Float32, reflect.Float64,\n\t\t\t\t\t\treflect.String:\n\t\t\t\t\t\tquoted = true\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Record found field and index sequence.\n\t\t\t\tif name != \"\" || !sf.Anonymous || ft.Kind() != reflect.Struct {\n\t\t\t\t\ttagged := name != \"\"\n\t\t\t\t\tif name == \"\" {\n\t\t\t\t\t\tname = sf.Name\n\t\t\t\t\t}\n\t\t\t\t\tfields = append(fields, fillField(field{\n\t\t\t\t\t\tname:      name,\n\t\t\t\t\t\ttag:       tagged,\n\t\t\t\t\t\tindex:     index,\n\t\t\t\t\t\ttyp:       ft,\n\t\t\t\t\t\tomitEmpty: opts.Contains(\"omitempty\"),\n\t\t\t\t\t\tquoted:    quoted,\n\t\t\t\t\t}))\n\t\t\t\t\tif count[f.typ] > 1 {\n\t\t\t\t\t\t// If there were multiple instances, add a second,\n\t\t\t\t\t\t// so that the annihilation code will see a duplicate.\n\t\t\t\t\t\t// It only cares about the distinction between 1 or 2,\n\t\t\t\t\t\t// so don't bother generating any more copies.\n\t\t\t\t\t\tfields = append(fields, fields[len(fields)-1])\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// Record new anonymous struct to explore in next round.\n\t\t\t\tnextCount[ft]++\n\t\t\t\tif nextCount[ft] == 1 {\n\t\t\t\t\tnext = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsort.Sort(byName(fields))\n\n\t// Delete all fields that are hidden by the Go rules for embedded fields,\n\t// except that fields with JSON tags are promoted.\n\n\t// The fields are sorted in primary order of name, secondary order\n\t// of field index length. Loop over names; for each name, delete\n\t// hidden fields by choosing the one dominant field that survives.\n\tout := fields[:0]\n\tfor advance, i := 0, 0; i < len(fields); i += advance {\n\t\t// One iteration per name.\n\t\t// Find the sequence of fields with the name of this first field.\n\t\tfi := fields[i]\n\t\tname := fi.name\n\t\tfor advance = 1; i+advance < len(fields); advance++ {\n\t\t\tfj := fields[i+advance]\n\t\t\tif fj.name != name {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif advance == 1 { // Only one field with this name\n\t\t\tout = append(out, fi)\n\t\t\tcontinue\n\t\t}\n\t\tdominant, ok := dominantField(fields[i : i+advance])\n\t\tif ok {\n\t\t\tout = append(out, dominant)\n\t\t}\n\t}\n\n\tfields = out\n\tsort.Sort(byIndex(fields))\n\n\treturn fields\n}\n\n// dominantField looks through the fields, all of which are known to\n// have the same name, to find the single field that dominates the\n// others using Go's embedding rules, modified by the presence of\n// JSON tags. If there are multiple top-level fields, the boolean\n// will be false: This condition is an error in Go and we skip all\n// the fields.\nfunc dominantField(fields []field) (field, bool) {\n\t// The fields are sorted in increasing index-length order. The winner\n\t// must therefore be one with the shortest index length. Drop all\n\t// longer entries, which is easy: just truncate the slice.\n\tlength := len(fields[0].index)\n\ttagged := -1 // Index of first tagged field.\n\tfor i, f := range fields {\n\t\tif len(f.index) > length {\n\t\t\tfields = fields[:i]\n\t\t\tbreak\n\t\t}\n\t\tif f.tag {\n\t\t\tif tagged >= 0 {\n\t\t\t\t// Multiple tagged fields at the same level: conflict.\n\t\t\t\t// Return no field.\n\t\t\t\treturn field{}, false\n\t\t\t}\n\t\t\ttagged = i\n\t\t}\n\t}\n\tif tagged >= 0 {\n\t\treturn fields[tagged], true\n\t}\n\t// All remaining fields have the same length. If there's more than one,\n\t// we have a conflict (two fields named \"X\" at the same level) and we\n\t// return no field.\n\tif len(fields) > 1 {\n\t\treturn field{}, false\n\t}\n\treturn fields[0], true\n}\n\nvar fieldCache struct {\n\tsync.RWMutex\n\tm map[reflect.Type][]field\n}\n\n// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.\nfunc cachedTypeFields(t reflect.Type) []field {\n\tfieldCache.RLock()\n\tf := fieldCache.m[t]\n\tfieldCache.RUnlock()\n\tif f != nil {\n\t\treturn f\n\t}\n\n\t// Compute fields without lock.\n\t// Might duplicate effort but won't hold other computations back.\n\tf = typeFields(t)\n\tif f == nil {\n\t\tf = []field{}\n\t}\n\n\tfieldCache.Lock()\n\tif fieldCache.m == nil {\n\t\tfieldCache.m = map[reflect.Type][]field{}\n\t}\n\tfieldCache.m[t] = f\n\tfieldCache.Unlock()\n\treturn f\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/indent.go",
    "content": "// Copyright 2010 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport \"bytes\"\n\n// Compact appends to dst the JSON-encoded src with\n// insignificant space characters elided.\nfunc Compact(dst *bytes.Buffer, src []byte) error {\n\treturn compact(dst, src, false)\n}\n\nfunc compact(dst *bytes.Buffer, src []byte, escape bool) error {\n\torigLen := dst.Len()\n\tvar scan scanner\n\tscan.reset()\n\tstart := 0\n\tfor i, c := range src {\n\t\tif escape && (c == '<' || c == '>' || c == '&') {\n\t\t\tif start < i {\n\t\t\t\tdst.Write(src[start:i])\n\t\t\t}\n\t\t\tdst.WriteString(`\\u00`)\n\t\t\tdst.WriteByte(hex[c>>4])\n\t\t\tdst.WriteByte(hex[c&0xF])\n\t\t\tstart = i + 1\n\t\t}\n\t\t// Convert U+2028 and U+2029 (E2 80 A8 and E2 80 A9).\n\t\tif c == 0xE2 && i+2 < len(src) && src[i+1] == 0x80 && src[i+2]&^1 == 0xA8 {\n\t\t\tif start < i {\n\t\t\t\tdst.Write(src[start:i])\n\t\t\t}\n\t\t\tdst.WriteString(`\\u202`)\n\t\t\tdst.WriteByte(hex[src[i+2]&0xF])\n\t\t\tstart = i + 3\n\t\t}\n\t\tv := scan.step(&scan, c)\n\t\tif v >= scanSkipSpace {\n\t\t\tif v == scanError {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif start < i {\n\t\t\t\tdst.Write(src[start:i])\n\t\t\t}\n\t\t\tstart = i + 1\n\t\t}\n\t}\n\tif scan.eof() == scanError {\n\t\tdst.Truncate(origLen)\n\t\treturn scan.err\n\t}\n\tif start < len(src) {\n\t\tdst.Write(src[start:])\n\t}\n\treturn nil\n}\n\nfunc newline(dst *bytes.Buffer, prefix, indent string, depth int) {\n\tdst.WriteByte('\\n')\n\tdst.WriteString(prefix)\n\tfor i := 0; i < depth; i++ {\n\t\tdst.WriteString(indent)\n\t}\n}\n\n// Indent appends to dst an indented form of the JSON-encoded src.\n// Each element in a JSON object or array begins on a new,\n// indented line beginning with prefix followed by one or more\n// copies of indent according to the indentation nesting.\n// The data appended to dst does not begin with the prefix nor\n// any indentation, to make it easier to embed inside other formatted JSON data.\n// Although leading space characters (space, tab, carriage return, newline)\n// at the beginning of src are dropped, trailing space characters\n// at the end of src are preserved and copied to dst.\n// For example, if src has no trailing spaces, neither will dst;\n// if src ends in a trailing newline, so will dst.\nfunc Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error {\n\torigLen := dst.Len()\n\tvar scan scanner\n\tscan.reset()\n\tneedIndent := false\n\tdepth := 0\n\tfor _, c := range src {\n\t\tscan.bytes++\n\t\tv := scan.step(&scan, c)\n\t\tif v == scanSkipSpace {\n\t\t\tcontinue\n\t\t}\n\t\tif v == scanError {\n\t\t\tbreak\n\t\t}\n\t\tif needIndent && v != scanEndObject && v != scanEndArray {\n\t\t\tneedIndent = false\n\t\t\tdepth++\n\t\t\tnewline(dst, prefix, indent, depth)\n\t\t}\n\n\t\t// Emit semantically uninteresting bytes\n\t\t// (in particular, punctuation in strings) unmodified.\n\t\tif v == scanContinue {\n\t\t\tdst.WriteByte(c)\n\t\t\tcontinue\n\t\t}\n\n\t\t// Add spacing around real punctuation.\n\t\tswitch c {\n\t\tcase '{', '[':\n\t\t\t// delay indent so that empty object and array are formatted as {} and [].\n\t\t\tneedIndent = true\n\t\t\tdst.WriteByte(c)\n\n\t\tcase ',':\n\t\t\tdst.WriteByte(c)\n\t\t\tnewline(dst, prefix, indent, depth)\n\n\t\tcase ':':\n\t\t\tdst.WriteByte(c)\n\t\t\tdst.WriteByte(' ')\n\n\t\tcase '}', ']':\n\t\t\tif needIndent {\n\t\t\t\t// suppress indent in empty object/array\n\t\t\t\tneedIndent = false\n\t\t\t} else {\n\t\t\t\tdepth--\n\t\t\t\tnewline(dst, prefix, indent, depth)\n\t\t\t}\n\t\t\tdst.WriteByte(c)\n\n\t\tdefault:\n\t\t\tdst.WriteByte(c)\n\t\t}\n\t}\n\tif scan.eof() == scanError {\n\t\tdst.Truncate(origLen)\n\t\treturn scan.err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/scanner.go",
    "content": "// Copyright 2010 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\n// JSON value parser state machine.\n// Just about at the limit of what is reasonable to write by hand.\n// Some parts are a bit tedious, but overall it nicely factors out the\n// otherwise common code from the multiple scanning functions\n// in this package (Compact, Indent, checkValid, nextValue, etc).\n//\n// This file starts with two simple examples using the scanner\n// before diving into the scanner itself.\n\nimport \"strconv\"\n\n// checkValid verifies that data is valid JSON-encoded data.\n// scan is passed in for use by checkValid to avoid an allocation.\nfunc checkValid(data []byte, scan *scanner) error {\n\tscan.reset()\n\tfor _, c := range data {\n\t\tscan.bytes++\n\t\tif scan.step(scan, c) == scanError {\n\t\t\treturn scan.err\n\t\t}\n\t}\n\tif scan.eof() == scanError {\n\t\treturn scan.err\n\t}\n\treturn nil\n}\n\n// nextValue splits data after the next whole JSON value,\n// returning that value and the bytes that follow it as separate slices.\n// scan is passed in for use by nextValue to avoid an allocation.\nfunc nextValue(data []byte, scan *scanner) (value, rest []byte, err error) {\n\tscan.reset()\n\tfor i, c := range data {\n\t\tv := scan.step(scan, c)\n\t\tif v >= scanEndObject {\n\t\t\tswitch v {\n\t\t\t// probe the scanner with a space to determine whether we will\n\t\t\t// get scanEnd on the next character. Otherwise, if the next character\n\t\t\t// is not a space, scanEndTop allocates a needless error.\n\t\t\tcase scanEndObject, scanEndArray:\n\t\t\t\tif scan.step(scan, ' ') == scanEnd {\n\t\t\t\t\treturn data[:i+1], data[i+1:], nil\n\t\t\t\t}\n\t\t\tcase scanError:\n\t\t\t\treturn nil, nil, scan.err\n\t\t\tcase scanEnd:\n\t\t\t\treturn data[:i], data[i:], nil\n\t\t\t}\n\t\t}\n\t}\n\tif scan.eof() == scanError {\n\t\treturn nil, nil, scan.err\n\t}\n\treturn data, nil, nil\n}\n\n// A SyntaxError is a description of a JSON syntax error.\ntype SyntaxError struct {\n\tmsg    string // description of error\n\tOffset int64  // error occurred after reading Offset bytes\n}\n\nfunc (e *SyntaxError) Error() string { return e.msg }\n\n// A scanner is a JSON scanning state machine.\n// Callers call scan.reset() and then pass bytes in one at a time\n// by calling scan.step(&scan, c) for each byte.\n// The return value, referred to as an opcode, tells the\n// caller about significant parsing events like beginning\n// and ending literals, objects, and arrays, so that the\n// caller can follow along if it wishes.\n// The return value scanEnd indicates that a single top-level\n// JSON value has been completed, *before* the byte that\n// just got passed in.  (The indication must be delayed in order\n// to recognize the end of numbers: is 123 a whole value or\n// the beginning of 12345e+6?).\ntype scanner struct {\n\t// The step is a func to be called to execute the next transition.\n\t// Also tried using an integer constant and a single func\n\t// with a switch, but using the func directly was 10% faster\n\t// on a 64-bit Mac Mini, and it's nicer to read.\n\tstep func(*scanner, byte) int\n\n\t// Reached end of top-level value.\n\tendTop bool\n\n\t// Stack of what we're in the middle of - array values, object keys, object values.\n\tparseState []int\n\n\t// Error that happened, if any.\n\terr error\n\n\t// 1-byte redo (see undo method)\n\tredo      bool\n\tredoCode  int\n\tredoState func(*scanner, byte) int\n\n\t// total bytes consumed, updated by decoder.Decode\n\tbytes int64\n}\n\n// These values are returned by the state transition functions\n// assigned to scanner.state and the method scanner.eof.\n// They give details about the current state of the scan that\n// callers might be interested to know about.\n// It is okay to ignore the return value of any particular\n// call to scanner.state: if one call returns scanError,\n// every subsequent call will return scanError too.\nconst (\n\t// Continue.\n\tscanContinue     = iota // uninteresting byte\n\tscanBeginLiteral        // end implied by next result != scanContinue\n\tscanBeginObject         // begin object\n\tscanObjectKey           // just finished object key (string)\n\tscanObjectValue         // just finished non-last object value\n\tscanEndObject           // end object (implies scanObjectValue if possible)\n\tscanBeginArray          // begin array\n\tscanArrayValue          // just finished array value\n\tscanEndArray            // end array (implies scanArrayValue if possible)\n\tscanSkipSpace           // space byte; can skip; known to be last \"continue\" result\n\n\t// Stop.\n\tscanEnd   // top-level value ended *before* this byte; known to be first \"stop\" result\n\tscanError // hit an error, scanner.err.\n)\n\n// These values are stored in the parseState stack.\n// They give the current state of a composite value\n// being scanned.  If the parser is inside a nested value\n// the parseState describes the nested state, outermost at entry 0.\nconst (\n\tparseObjectKey   = iota // parsing object key (before colon)\n\tparseObjectValue        // parsing object value (after colon)\n\tparseArrayValue         // parsing array value\n)\n\n// reset prepares the scanner for use.\n// It must be called before calling s.step.\nfunc (s *scanner) reset() {\n\ts.step = stateBeginValue\n\ts.parseState = s.parseState[0:0]\n\ts.err = nil\n\ts.redo = false\n\ts.endTop = false\n}\n\n// eof tells the scanner that the end of input has been reached.\n// It returns a scan status just as s.step does.\nfunc (s *scanner) eof() int {\n\tif s.err != nil {\n\t\treturn scanError\n\t}\n\tif s.endTop {\n\t\treturn scanEnd\n\t}\n\ts.step(s, ' ')\n\tif s.endTop {\n\t\treturn scanEnd\n\t}\n\tif s.err == nil {\n\t\ts.err = &SyntaxError{\"unexpected end of JSON input\", s.bytes}\n\t}\n\treturn scanError\n}\n\n// pushParseState pushes a new parse state p onto the parse stack.\nfunc (s *scanner) pushParseState(p int) {\n\ts.parseState = append(s.parseState, p)\n}\n\n// popParseState pops a parse state (already obtained) off the stack\n// and updates s.step accordingly.\nfunc (s *scanner) popParseState() {\n\tn := len(s.parseState) - 1\n\ts.parseState = s.parseState[0:n]\n\ts.redo = false\n\tif n == 0 {\n\t\ts.step = stateEndTop\n\t\ts.endTop = true\n\t} else {\n\t\ts.step = stateEndValue\n\t}\n}\n\nfunc isSpace(c byte) bool {\n\treturn c == ' ' || c == '\\t' || c == '\\r' || c == '\\n'\n}\n\n// stateBeginValueOrEmpty is the state after reading `[`.\nfunc stateBeginValueOrEmpty(s *scanner, c byte) int {\n\tif c <= ' ' && isSpace(c) {\n\t\treturn scanSkipSpace\n\t}\n\tif c == ']' {\n\t\treturn stateEndValue(s, c)\n\t}\n\treturn stateBeginValue(s, c)\n}\n\n// stateBeginValue is the state at the beginning of the input.\nfunc stateBeginValue(s *scanner, c byte) int {\n\tif c <= ' ' && isSpace(c) {\n\t\treturn scanSkipSpace\n\t}\n\tswitch c {\n\tcase '{':\n\t\ts.step = stateBeginStringOrEmpty\n\t\ts.pushParseState(parseObjectKey)\n\t\treturn scanBeginObject\n\tcase '[':\n\t\ts.step = stateBeginValueOrEmpty\n\t\ts.pushParseState(parseArrayValue)\n\t\treturn scanBeginArray\n\tcase '\"':\n\t\ts.step = stateInString\n\t\treturn scanBeginLiteral\n\tcase '-':\n\t\ts.step = stateNeg\n\t\treturn scanBeginLiteral\n\tcase '0': // beginning of 0.123\n\t\ts.step = state0\n\t\treturn scanBeginLiteral\n\tcase 't': // beginning of true\n\t\ts.step = stateT\n\t\treturn scanBeginLiteral\n\tcase 'f': // beginning of false\n\t\ts.step = stateF\n\t\treturn scanBeginLiteral\n\tcase 'n': // beginning of null\n\t\ts.step = stateN\n\t\treturn scanBeginLiteral\n\t}\n\tif '1' <= c && c <= '9' { // beginning of 1234.5\n\t\ts.step = state1\n\t\treturn scanBeginLiteral\n\t}\n\treturn s.error(c, \"looking for beginning of value\")\n}\n\n// stateBeginStringOrEmpty is the state after reading `{`.\nfunc stateBeginStringOrEmpty(s *scanner, c byte) int {\n\tif c <= ' ' && isSpace(c) {\n\t\treturn scanSkipSpace\n\t}\n\tif c == '}' {\n\t\tn := len(s.parseState)\n\t\ts.parseState[n-1] = parseObjectValue\n\t\treturn stateEndValue(s, c)\n\t}\n\treturn stateBeginString(s, c)\n}\n\n// stateBeginString is the state after reading `{\"key\": value,`.\nfunc stateBeginString(s *scanner, c byte) int {\n\tif c <= ' ' && isSpace(c) {\n\t\treturn scanSkipSpace\n\t}\n\tif c == '\"' {\n\t\ts.step = stateInString\n\t\treturn scanBeginLiteral\n\t}\n\treturn s.error(c, \"looking for beginning of object key string\")\n}\n\n// stateEndValue is the state after completing a value,\n// such as after reading `{}` or `true` or `[\"x\"`.\nfunc stateEndValue(s *scanner, c byte) int {\n\tn := len(s.parseState)\n\tif n == 0 {\n\t\t// Completed top-level before the current byte.\n\t\ts.step = stateEndTop\n\t\ts.endTop = true\n\t\treturn stateEndTop(s, c)\n\t}\n\tif c <= ' ' && isSpace(c) {\n\t\ts.step = stateEndValue\n\t\treturn scanSkipSpace\n\t}\n\tps := s.parseState[n-1]\n\tswitch ps {\n\tcase parseObjectKey:\n\t\tif c == ':' {\n\t\t\ts.parseState[n-1] = parseObjectValue\n\t\t\ts.step = stateBeginValue\n\t\t\treturn scanObjectKey\n\t\t}\n\t\treturn s.error(c, \"after object key\")\n\tcase parseObjectValue:\n\t\tif c == ',' {\n\t\t\ts.parseState[n-1] = parseObjectKey\n\t\t\ts.step = stateBeginString\n\t\t\treturn scanObjectValue\n\t\t}\n\t\tif c == '}' {\n\t\t\ts.popParseState()\n\t\t\treturn scanEndObject\n\t\t}\n\t\treturn s.error(c, \"after object key:value pair\")\n\tcase parseArrayValue:\n\t\tif c == ',' {\n\t\t\ts.step = stateBeginValue\n\t\t\treturn scanArrayValue\n\t\t}\n\t\tif c == ']' {\n\t\t\ts.popParseState()\n\t\t\treturn scanEndArray\n\t\t}\n\t\treturn s.error(c, \"after array element\")\n\t}\n\treturn s.error(c, \"\")\n}\n\n// stateEndTop is the state after finishing the top-level value,\n// such as after reading `{}` or `[1,2,3]`.\n// Only space characters should be seen now.\nfunc stateEndTop(s *scanner, c byte) int {\n\tif c != ' ' && c != '\\t' && c != '\\r' && c != '\\n' {\n\t\t// Complain about non-space byte on next call.\n\t\ts.error(c, \"after top-level value\")\n\t}\n\treturn scanEnd\n}\n\n// stateInString is the state after reading `\"`.\nfunc stateInString(s *scanner, c byte) int {\n\tif c == '\"' {\n\t\ts.step = stateEndValue\n\t\treturn scanContinue\n\t}\n\tif c == '\\\\' {\n\t\ts.step = stateInStringEsc\n\t\treturn scanContinue\n\t}\n\tif c < 0x20 {\n\t\treturn s.error(c, \"in string literal\")\n\t}\n\treturn scanContinue\n}\n\n// stateInStringEsc is the state after reading `\"\\` during a quoted string.\nfunc stateInStringEsc(s *scanner, c byte) int {\n\tswitch c {\n\tcase 'b', 'f', 'n', 'r', 't', '\\\\', '/', '\"':\n\t\ts.step = stateInString\n\t\treturn scanContinue\n\tcase 'u':\n\t\ts.step = stateInStringEscU\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in string escape code\")\n}\n\n// stateInStringEscU is the state after reading `\"\\u` during a quoted string.\nfunc stateInStringEscU(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {\n\t\ts.step = stateInStringEscU1\n\t\treturn scanContinue\n\t}\n\t// numbers\n\treturn s.error(c, \"in \\\\u hexadecimal character escape\")\n}\n\n// stateInStringEscU1 is the state after reading `\"\\u1` during a quoted string.\nfunc stateInStringEscU1(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {\n\t\ts.step = stateInStringEscU12\n\t\treturn scanContinue\n\t}\n\t// numbers\n\treturn s.error(c, \"in \\\\u hexadecimal character escape\")\n}\n\n// stateInStringEscU12 is the state after reading `\"\\u12` during a quoted string.\nfunc stateInStringEscU12(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {\n\t\ts.step = stateInStringEscU123\n\t\treturn scanContinue\n\t}\n\t// numbers\n\treturn s.error(c, \"in \\\\u hexadecimal character escape\")\n}\n\n// stateInStringEscU123 is the state after reading `\"\\u123` during a quoted string.\nfunc stateInStringEscU123(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' {\n\t\ts.step = stateInString\n\t\treturn scanContinue\n\t}\n\t// numbers\n\treturn s.error(c, \"in \\\\u hexadecimal character escape\")\n}\n\n// stateNeg is the state after reading `-` during a number.\nfunc stateNeg(s *scanner, c byte) int {\n\tif c == '0' {\n\t\ts.step = state0\n\t\treturn scanContinue\n\t}\n\tif '1' <= c && c <= '9' {\n\t\ts.step = state1\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in numeric literal\")\n}\n\n// state1 is the state after reading a non-zero integer during a number,\n// such as after reading `1` or `100` but not `0`.\nfunc state1(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' {\n\t\ts.step = state1\n\t\treturn scanContinue\n\t}\n\treturn state0(s, c)\n}\n\n// state0 is the state after reading `0` during a number.\nfunc state0(s *scanner, c byte) int {\n\tif c == '.' {\n\t\ts.step = stateDot\n\t\treturn scanContinue\n\t}\n\tif c == 'e' || c == 'E' {\n\t\ts.step = stateE\n\t\treturn scanContinue\n\t}\n\treturn stateEndValue(s, c)\n}\n\n// stateDot is the state after reading the integer and decimal point in a number,\n// such as after reading `1.`.\nfunc stateDot(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' {\n\t\ts.step = stateDot0\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"after decimal point in numeric literal\")\n}\n\n// stateDot0 is the state after reading the integer, decimal point, and subsequent\n// digits of a number, such as after reading `3.14`.\nfunc stateDot0(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' {\n\t\treturn scanContinue\n\t}\n\tif c == 'e' || c == 'E' {\n\t\ts.step = stateE\n\t\treturn scanContinue\n\t}\n\treturn stateEndValue(s, c)\n}\n\n// stateE is the state after reading the mantissa and e in a number,\n// such as after reading `314e` or `0.314e`.\nfunc stateE(s *scanner, c byte) int {\n\tif c == '+' || c == '-' {\n\t\ts.step = stateESign\n\t\treturn scanContinue\n\t}\n\treturn stateESign(s, c)\n}\n\n// stateESign is the state after reading the mantissa, e, and sign in a number,\n// such as after reading `314e-` or `0.314e+`.\nfunc stateESign(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' {\n\t\ts.step = stateE0\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in exponent of numeric literal\")\n}\n\n// stateE0 is the state after reading the mantissa, e, optional sign,\n// and at least one digit of the exponent in a number,\n// such as after reading `314e-2` or `0.314e+1` or `3.14e0`.\nfunc stateE0(s *scanner, c byte) int {\n\tif '0' <= c && c <= '9' {\n\t\treturn scanContinue\n\t}\n\treturn stateEndValue(s, c)\n}\n\n// stateT is the state after reading `t`.\nfunc stateT(s *scanner, c byte) int {\n\tif c == 'r' {\n\t\ts.step = stateTr\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal true (expecting 'r')\")\n}\n\n// stateTr is the state after reading `tr`.\nfunc stateTr(s *scanner, c byte) int {\n\tif c == 'u' {\n\t\ts.step = stateTru\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal true (expecting 'u')\")\n}\n\n// stateTru is the state after reading `tru`.\nfunc stateTru(s *scanner, c byte) int {\n\tif c == 'e' {\n\t\ts.step = stateEndValue\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal true (expecting 'e')\")\n}\n\n// stateF is the state after reading `f`.\nfunc stateF(s *scanner, c byte) int {\n\tif c == 'a' {\n\t\ts.step = stateFa\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal false (expecting 'a')\")\n}\n\n// stateFa is the state after reading `fa`.\nfunc stateFa(s *scanner, c byte) int {\n\tif c == 'l' {\n\t\ts.step = stateFal\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal false (expecting 'l')\")\n}\n\n// stateFal is the state after reading `fal`.\nfunc stateFal(s *scanner, c byte) int {\n\tif c == 's' {\n\t\ts.step = stateFals\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal false (expecting 's')\")\n}\n\n// stateFals is the state after reading `fals`.\nfunc stateFals(s *scanner, c byte) int {\n\tif c == 'e' {\n\t\ts.step = stateEndValue\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal false (expecting 'e')\")\n}\n\n// stateN is the state after reading `n`.\nfunc stateN(s *scanner, c byte) int {\n\tif c == 'u' {\n\t\ts.step = stateNu\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal null (expecting 'u')\")\n}\n\n// stateNu is the state after reading `nu`.\nfunc stateNu(s *scanner, c byte) int {\n\tif c == 'l' {\n\t\ts.step = stateNul\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal null (expecting 'l')\")\n}\n\n// stateNul is the state after reading `nul`.\nfunc stateNul(s *scanner, c byte) int {\n\tif c == 'l' {\n\t\ts.step = stateEndValue\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in literal null (expecting 'l')\")\n}\n\n// stateError is the state after reaching a syntax error,\n// such as after reading `[1}` or `5.1.2`.\nfunc stateError(s *scanner, c byte) int {\n\treturn scanError\n}\n\n// error records an error and switches to the error state.\nfunc (s *scanner) error(c byte, context string) int {\n\ts.step = stateError\n\ts.err = &SyntaxError{\"invalid character \" + quoteChar(c) + \" \" + context, s.bytes}\n\treturn scanError\n}\n\n// quoteChar formats c as a quoted character literal\nfunc quoteChar(c byte) string {\n\t// special cases - different from quoted strings\n\tif c == '\\'' {\n\t\treturn `'\\''`\n\t}\n\tif c == '\"' {\n\t\treturn `'\"'`\n\t}\n\n\t// use quoted string with different quotation marks\n\ts := strconv.Quote(string(c))\n\treturn \"'\" + s[1:len(s)-1] + \"'\"\n}\n\n// undo causes the scanner to return scanCode from the next state transition.\n// This gives callers a simple 1-byte undo mechanism.\nfunc (s *scanner) undo(scanCode int) {\n\tif s.redo {\n\t\tpanic(\"json: invalid use of scanner\")\n\t}\n\ts.redoCode = scanCode\n\ts.redoState = s.step\n\ts.step = stateRedo\n\ts.redo = true\n}\n\n// stateRedo helps implement the scanner's 1-byte undo.\nfunc stateRedo(s *scanner, c byte) int {\n\ts.redo = false\n\ts.step = s.redoState\n\treturn s.redoCode\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/stream.go",
    "content": "// Copyright 2010 The Go Authors.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n)\n\n// A Decoder reads and decodes JSON objects from an input stream.\ntype Decoder struct {\n\tr     io.Reader\n\tbuf   []byte\n\td     decodeState\n\tscanp int // start of unread data in buf\n\tscan  scanner\n\terr   error\n\n\ttokenState int\n\ttokenStack []int\n}\n\n// NewDecoder returns a new decoder that reads from r.\n//\n// The decoder introduces its own buffering and may\n// read data from r beyond the JSON values requested.\nfunc NewDecoder(r io.Reader) *Decoder {\n\treturn &Decoder{r: r}\n}\n\n// Deprecated: Use `SetNumberType` instead\n// UseNumber causes the Decoder to unmarshal a number into an interface{} as a\n// Number instead of as a float64.\nfunc (dec *Decoder) UseNumber() { dec.d.numberType = UnmarshalJSONNumber }\n\n// SetNumberType causes the Decoder to unmarshal a number into an interface{} as a\n// Number, float64 or int64 depending on `t` enum value.\nfunc (dec *Decoder) SetNumberType(t NumberUnmarshalType) { dec.d.numberType = t }\n\n// Decode reads the next JSON-encoded value from its\n// input and stores it in the value pointed to by v.\n//\n// See the documentation for Unmarshal for details about\n// the conversion of JSON into a Go value.\nfunc (dec *Decoder) Decode(v interface{}) error {\n\tif dec.err != nil {\n\t\treturn dec.err\n\t}\n\n\tif err := dec.tokenPrepareForDecode(); err != nil {\n\t\treturn err\n\t}\n\n\tif !dec.tokenValueAllowed() {\n\t\treturn &SyntaxError{msg: \"not at beginning of value\"}\n\t}\n\n\t// Read whole value into buffer.\n\tn, err := dec.readValue()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdec.d.init(dec.buf[dec.scanp : dec.scanp+n])\n\tdec.scanp += n\n\n\t// Don't save err from unmarshal into dec.err:\n\t// the connection is still usable since we read a complete JSON\n\t// object from it before the error happened.\n\terr = dec.d.unmarshal(v)\n\n\t// fixup token streaming state\n\tdec.tokenValueEnd()\n\n\treturn err\n}\n\n// Buffered returns a reader of the data remaining in the Decoder's\n// buffer. The reader is valid until the next call to Decode.\nfunc (dec *Decoder) Buffered() io.Reader {\n\treturn bytes.NewReader(dec.buf[dec.scanp:])\n}\n\n// readValue reads a JSON value into dec.buf.\n// It returns the length of the encoding.\nfunc (dec *Decoder) readValue() (int, error) {\n\tdec.scan.reset()\n\n\tscanp := dec.scanp\n\tvar err error\nInput:\n\tfor {\n\t\t// Look in the buffer for a new value.\n\t\tfor i, c := range dec.buf[scanp:] {\n\t\t\tdec.scan.bytes++\n\t\t\tv := dec.scan.step(&dec.scan, c)\n\t\t\tif v == scanEnd {\n\t\t\t\tscanp += i\n\t\t\t\tbreak Input\n\t\t\t}\n\t\t\t// scanEnd is delayed one byte.\n\t\t\t// We might block trying to get that byte from src,\n\t\t\t// so instead invent a space byte.\n\t\t\tif (v == scanEndObject || v == scanEndArray) && dec.scan.step(&dec.scan, ' ') == scanEnd {\n\t\t\t\tscanp += i + 1\n\t\t\t\tbreak Input\n\t\t\t}\n\t\t\tif v == scanError {\n\t\t\t\tdec.err = dec.scan.err\n\t\t\t\treturn 0, dec.scan.err\n\t\t\t}\n\t\t}\n\t\tscanp = len(dec.buf)\n\n\t\t// Did the last read have an error?\n\t\t// Delayed until now to allow buffer scan.\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tif dec.scan.step(&dec.scan, ' ') == scanEnd {\n\t\t\t\t\tbreak Input\n\t\t\t\t}\n\t\t\t\tif nonSpace(dec.buf) {\n\t\t\t\t\terr = io.ErrUnexpectedEOF\n\t\t\t\t}\n\t\t\t}\n\t\t\tdec.err = err\n\t\t\treturn 0, err\n\t\t}\n\n\t\tn := scanp - dec.scanp\n\t\terr = dec.refill()\n\t\tscanp = dec.scanp + n\n\t}\n\treturn scanp - dec.scanp, nil\n}\n\nfunc (dec *Decoder) refill() error {\n\t// Make room to read more into the buffer.\n\t// First slide down data already consumed.\n\tif dec.scanp > 0 {\n\t\tn := copy(dec.buf, dec.buf[dec.scanp:])\n\t\tdec.buf = dec.buf[:n]\n\t\tdec.scanp = 0\n\t}\n\n\t// Grow buffer if not large enough.\n\tconst minRead = 512\n\tif cap(dec.buf)-len(dec.buf) < minRead {\n\t\tnewBuf := make([]byte, len(dec.buf), 2*cap(dec.buf)+minRead)\n\t\tcopy(newBuf, dec.buf)\n\t\tdec.buf = newBuf\n\t}\n\n\t// Read.  Delay error for next iteration (after scan).\n\tn, err := dec.r.Read(dec.buf[len(dec.buf):cap(dec.buf)])\n\tdec.buf = dec.buf[0 : len(dec.buf)+n]\n\n\treturn err\n}\n\nfunc nonSpace(b []byte) bool {\n\tfor _, c := range b {\n\t\tif !isSpace(c) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// An Encoder writes JSON objects to an output stream.\ntype Encoder struct {\n\tw   io.Writer\n\terr error\n}\n\n// NewEncoder returns a new encoder that writes to w.\nfunc NewEncoder(w io.Writer) *Encoder {\n\treturn &Encoder{w: w}\n}\n\n// Encode writes the JSON encoding of v to the stream,\n// followed by a newline character.\n//\n// See the documentation for Marshal for details about the\n// conversion of Go values to JSON.\nfunc (enc *Encoder) Encode(v interface{}) error {\n\tif enc.err != nil {\n\t\treturn enc.err\n\t}\n\te := newEncodeState()\n\terr := e.marshal(v)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Terminate each value with a newline.\n\t// This makes the output look a little nicer\n\t// when debugging, and some kind of space\n\t// is required if the encoded value was a number,\n\t// so that the reader knows there aren't more\n\t// digits coming.\n\te.WriteByte('\\n')\n\n\tif _, err = enc.w.Write(e.Bytes()); err != nil {\n\t\tenc.err = err\n\t}\n\tencodeStatePool.Put(e)\n\treturn err\n}\n\n// RawMessage is a raw encoded JSON object.\n// It implements Marshaler and Unmarshaler and can\n// be used to delay JSON decoding or precompute a JSON encoding.\ntype RawMessage []byte\n\n// MarshalJSON returns *m as the JSON encoding of m.\nfunc (m *RawMessage) MarshalJSON() ([]byte, error) {\n\treturn *m, nil\n}\n\n// UnmarshalJSON sets *m to a copy of data.\nfunc (m *RawMessage) UnmarshalJSON(data []byte) error {\n\tif m == nil {\n\t\treturn errors.New(\"json.RawMessage: UnmarshalJSON on nil pointer\")\n\t}\n\t*m = append((*m)[0:0], data...)\n\treturn nil\n}\n\nvar _ Marshaler = (*RawMessage)(nil)\nvar _ Unmarshaler = (*RawMessage)(nil)\n\n// A Token holds a value of one of these types:\n//\n//\tDelim, for the four JSON delimiters [ ] { }\n//\tbool, for JSON booleans\n//\tfloat64, for JSON numbers\n//\tNumber, for JSON numbers\n//\tstring, for JSON string literals\n//\tnil, for JSON null\ntype Token interface{}\n\nconst (\n\ttokenTopValue = iota\n\ttokenArrayStart\n\ttokenArrayValue\n\ttokenArrayComma\n\ttokenObjectStart\n\ttokenObjectKey\n\ttokenObjectColon\n\ttokenObjectValue\n\ttokenObjectComma\n)\n\n// advance tokenstate from a separator state to a value state\nfunc (dec *Decoder) tokenPrepareForDecode() error {\n\t// Note: Not calling peek before switch, to avoid\n\t// putting peek into the standard Decode path.\n\t// peek is only called when using the Token API.\n\tswitch dec.tokenState {\n\tcase tokenArrayComma:\n\t\tc, err := dec.peek()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif c != ',' {\n\t\t\treturn &SyntaxError{\"expected comma after array element\", 0}\n\t\t}\n\t\tdec.scanp++\n\t\tdec.tokenState = tokenArrayValue\n\tcase tokenObjectColon:\n\t\tc, err := dec.peek()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif c != ':' {\n\t\t\treturn &SyntaxError{\"expected colon after object key\", 0}\n\t\t}\n\t\tdec.scanp++\n\t\tdec.tokenState = tokenObjectValue\n\t}\n\treturn nil\n}\n\nfunc (dec *Decoder) tokenValueAllowed() bool {\n\tswitch dec.tokenState {\n\tcase tokenTopValue, tokenArrayStart, tokenArrayValue, tokenObjectValue:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (dec *Decoder) tokenValueEnd() {\n\tswitch dec.tokenState {\n\tcase tokenArrayStart, tokenArrayValue:\n\t\tdec.tokenState = tokenArrayComma\n\tcase tokenObjectValue:\n\t\tdec.tokenState = tokenObjectComma\n\t}\n}\n\n// A Delim is a JSON array or object delimiter, one of [ ] { or }.\ntype Delim rune\n\nfunc (d Delim) String() string {\n\treturn string(d)\n}\n\n// Token returns the next JSON token in the input stream.\n// At the end of the input stream, Token returns nil, io.EOF.\n//\n// Token guarantees that the delimiters [ ] { } it returns are\n// properly nested and matched: if Token encounters an unexpected\n// delimiter in the input, it will return an error.\n//\n// The input stream consists of basic JSON values—bool, string,\n// number, and null—along with delimiters [ ] { } of type Delim\n// to mark the start and end of arrays and objects.\n// Commas and colons are elided.\nfunc (dec *Decoder) Token() (Token, error) {\n\tfor {\n\t\tc, err := dec.peek()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch c {\n\t\tcase '[':\n\t\t\tif !dec.tokenValueAllowed() {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tdec.scanp++\n\t\t\tdec.tokenStack = append(dec.tokenStack, dec.tokenState)\n\t\t\tdec.tokenState = tokenArrayStart\n\t\t\treturn Delim('['), nil\n\n\t\tcase ']':\n\t\t\tif dec.tokenState != tokenArrayStart && dec.tokenState != tokenArrayComma {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tdec.scanp++\n\t\t\tdec.tokenState = dec.tokenStack[len(dec.tokenStack)-1]\n\t\t\tdec.tokenStack = dec.tokenStack[:len(dec.tokenStack)-1]\n\t\t\tdec.tokenValueEnd()\n\t\t\treturn Delim(']'), nil\n\n\t\tcase '{':\n\t\t\tif !dec.tokenValueAllowed() {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tdec.scanp++\n\t\t\tdec.tokenStack = append(dec.tokenStack, dec.tokenState)\n\t\t\tdec.tokenState = tokenObjectStart\n\t\t\treturn Delim('{'), nil\n\n\t\tcase '}':\n\t\t\tif dec.tokenState != tokenObjectStart && dec.tokenState != tokenObjectComma {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tdec.scanp++\n\t\t\tdec.tokenState = dec.tokenStack[len(dec.tokenStack)-1]\n\t\t\tdec.tokenStack = dec.tokenStack[:len(dec.tokenStack)-1]\n\t\t\tdec.tokenValueEnd()\n\t\t\treturn Delim('}'), nil\n\n\t\tcase ':':\n\t\t\tif dec.tokenState != tokenObjectColon {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tdec.scanp++\n\t\t\tdec.tokenState = tokenObjectValue\n\t\t\tcontinue\n\n\t\tcase ',':\n\t\t\tif dec.tokenState == tokenArrayComma {\n\t\t\t\tdec.scanp++\n\t\t\t\tdec.tokenState = tokenArrayValue\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif dec.tokenState == tokenObjectComma {\n\t\t\t\tdec.scanp++\n\t\t\t\tdec.tokenState = tokenObjectKey\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn dec.tokenError(c)\n\n\t\tcase '\"':\n\t\t\tif dec.tokenState == tokenObjectStart || dec.tokenState == tokenObjectKey {\n\t\t\t\tvar x string\n\t\t\t\told := dec.tokenState\n\t\t\t\tdec.tokenState = tokenTopValue\n\t\t\t\terr := dec.Decode(&x)\n\t\t\t\tdec.tokenState = old\n\t\t\t\tif err != nil {\n\t\t\t\t\tclearOffset(err)\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdec.tokenState = tokenObjectColon\n\t\t\t\treturn x, nil\n\t\t\t}\n\t\t\tfallthrough\n\n\t\tdefault:\n\t\t\tif !dec.tokenValueAllowed() {\n\t\t\t\treturn dec.tokenError(c)\n\t\t\t}\n\t\t\tvar x interface{}\n\t\t\tif err := dec.Decode(&x); err != nil {\n\t\t\t\tclearOffset(err)\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn x, nil\n\t\t}\n\t}\n}\n\nfunc clearOffset(err error) {\n\tif s, ok := err.(*SyntaxError); ok {\n\t\ts.Offset = 0\n\t}\n}\n\nfunc (dec *Decoder) tokenError(c byte) (Token, error) {\n\tvar context string\n\tswitch dec.tokenState {\n\tcase tokenTopValue:\n\t\tcontext = \" looking for beginning of value\"\n\tcase tokenArrayStart, tokenArrayValue, tokenObjectValue:\n\t\tcontext = \" looking for beginning of value\"\n\tcase tokenArrayComma:\n\t\tcontext = \" after array element\"\n\tcase tokenObjectKey:\n\t\tcontext = \" looking for beginning of object key string\"\n\tcase tokenObjectColon:\n\t\tcontext = \" after object key\"\n\tcase tokenObjectComma:\n\t\tcontext = \" after object key:value pair\"\n\t}\n\treturn nil, &SyntaxError{\"invalid character \" + quoteChar(c) + \" \" + context, 0}\n}\n\n// More reports whether there is another element in the\n// current array or object being parsed.\nfunc (dec *Decoder) More() bool {\n\tc, err := dec.peek()\n\treturn err == nil && c != ']' && c != '}'\n}\n\nfunc (dec *Decoder) peek() (byte, error) {\n\tvar err error\n\tfor {\n\t\tfor i := dec.scanp; i < len(dec.buf); i++ {\n\t\t\tc := dec.buf[i]\n\t\t\tif isSpace(c) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdec.scanp = i\n\t\t\treturn c, nil\n\t\t}\n\t\t// buffer has been scanned, now report any error\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\terr = dec.refill()\n\t}\n}\n\n/*\nTODO\n\n// EncodeToken writes the given JSON token to the stream.\n// It returns an error if the delimiters [ ] { } are not properly used.\n//\n// EncodeToken does not call Flush, because usually it is part of\n// a larger operation such as Encode, and those will call Flush when finished.\n// Callers that create an Encoder and then invoke EncodeToken directly,\n// without using Encode, need to call Flush when finished to ensure that\n// the JSON is written to the underlying writer.\nfunc (e *Encoder) EncodeToken(t Token) error  {\n\t...\n}\n\n*/\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/json/tags.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"strings\"\n)\n\n// tagOptions is the string following a comma in a struct field's \"json\"\n// tag, or the empty string. It does not include the leading comma.\ntype tagOptions string\n\n// parseTag splits a struct field's json tag into its name and\n// comma-separated options.\nfunc parseTag(tag string) (string, tagOptions) {\n\tif idx := strings.Index(tag, \",\"); idx != -1 {\n\t\treturn tag[:idx], tagOptions(tag[idx+1:])\n\t}\n\treturn tag, tagOptions(\"\")\n}\n\n// Contains reports whether a comma-separated list of options\n// contains a particular substr flag. substr must be surrounded by a\n// string boundary or commas.\nfunc (o tagOptions) Contains(optionName string) bool {\n\tif len(o) == 0 {\n\t\treturn false\n\t}\n\ts := string(o)\n\tfor s != \"\" {\n\t\tvar next string\n\t\ti := strings.Index(s, \",\")\n\t\tif i >= 0 {\n\t\t\ts, next = s[:i], s[i+1:]\n\t\t}\n\t\tif s == optionName {\n\t\t\treturn true\n\t\t}\n\t\ts = next\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/jwe.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// rawJSONWebEncryption represents a raw JWE JSON object. Used for parsing/serializing.\ntype rawJSONWebEncryption struct {\n\tProtected    *byteBuffer        `json:\"protected,omitempty\"`\n\tUnprotected  *rawHeader         `json:\"unprotected,omitempty\"`\n\tHeader       *rawHeader         `json:\"header,omitempty\"`\n\tRecipients   []rawRecipientInfo `json:\"recipients,omitempty\"`\n\tAad          *byteBuffer        `json:\"aad,omitempty\"`\n\tEncryptedKey *byteBuffer        `json:\"encrypted_key,omitempty\"`\n\tIv           *byteBuffer        `json:\"iv,omitempty\"`\n\tCiphertext   *byteBuffer        `json:\"ciphertext,omitempty\"`\n\tTag          *byteBuffer        `json:\"tag,omitempty\"`\n}\n\n// rawRecipientInfo represents a raw JWE Per-Recipient header JSON object. Used for parsing/serializing.\ntype rawRecipientInfo struct {\n\tHeader       *rawHeader `json:\"header,omitempty\"`\n\tEncryptedKey string     `json:\"encrypted_key,omitempty\"`\n}\n\n// JSONWebEncryption represents an encrypted JWE object after parsing.\ntype JSONWebEncryption struct {\n\tHeader                   Header\n\tprotected, unprotected   *rawHeader\n\trecipients               []recipientInfo\n\taad, iv, ciphertext, tag []byte\n\toriginal                 *rawJSONWebEncryption\n}\n\n// recipientInfo represents a raw JWE Per-Recipient header JSON object after parsing.\ntype recipientInfo struct {\n\theader       *rawHeader\n\tencryptedKey []byte\n}\n\n// GetAuthData retrieves the (optional) authenticated data attached to the object.\nfunc (obj JSONWebEncryption) GetAuthData() []byte {\n\tif obj.aad != nil {\n\t\tout := make([]byte, len(obj.aad))\n\t\tcopy(out, obj.aad)\n\t\treturn out\n\t}\n\n\treturn nil\n}\n\n// Get the merged header values\nfunc (obj JSONWebEncryption) mergedHeaders(recipient *recipientInfo) rawHeader {\n\tout := rawHeader{}\n\tout.merge(obj.protected)\n\tout.merge(obj.unprotected)\n\n\tif recipient != nil {\n\t\tout.merge(recipient.header)\n\t}\n\n\treturn out\n}\n\n// Get the additional authenticated data from a JWE object.\nfunc (obj JSONWebEncryption) computeAuthData() []byte {\n\tvar protected string\n\n\tswitch {\n\tcase obj.original != nil && obj.original.Protected != nil:\n\t\tprotected = obj.original.Protected.base64()\n\tcase obj.protected != nil:\n\t\tprotected = base64.RawURLEncoding.EncodeToString(mustSerializeJSON((obj.protected)))\n\tdefault:\n\t\tprotected = \"\"\n\t}\n\n\toutput := []byte(protected)\n\tif obj.aad != nil {\n\t\toutput = append(output, '.')\n\t\toutput = append(output, []byte(base64.RawURLEncoding.EncodeToString(obj.aad))...)\n\t}\n\n\treturn output\n}\n\nfunc containsKeyAlgorithm(haystack []KeyAlgorithm, needle KeyAlgorithm) bool {\n\tfor _, algorithm := range haystack {\n\t\tif algorithm == needle {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc containsContentEncryption(haystack []ContentEncryption, needle ContentEncryption) bool {\n\tfor _, algorithm := range haystack {\n\t\tif algorithm == needle {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// ParseEncrypted parses an encrypted message in JWE Compact or JWE JSON Serialization.\n//\n// https://datatracker.ietf.org/doc/html/rfc7516#section-3.1\n// https://datatracker.ietf.org/doc/html/rfc7516#section-3.2\n//\n// The keyAlgorithms and contentEncryption parameters are used to validate the \"alg\" and \"enc\"\n// header parameters respectively. They must be nonempty, and each \"alg\" or \"enc\" header in\n// parsed data must contain a value that is present in the corresponding parameter. That\n// includes the protected and unprotected headers as well as all recipients. To accept\n// multiple algorithms, pass a slice of all the algorithms you want to accept.\nfunc ParseEncrypted(input string,\n\tkeyEncryptionAlgorithms []KeyAlgorithm,\n\tcontentEncryption []ContentEncryption,\n) (*JSONWebEncryption, error) {\n\tinput = stripWhitespace(input)\n\tif strings.HasPrefix(input, \"{\") {\n\t\treturn ParseEncryptedJSON(input, keyEncryptionAlgorithms, contentEncryption)\n\t}\n\n\treturn ParseEncryptedCompact(input, keyEncryptionAlgorithms, contentEncryption)\n}\n\n// ParseEncryptedJSON parses a message in JWE JSON Serialization.\n//\n// https://datatracker.ietf.org/doc/html/rfc7516#section-3.2\nfunc ParseEncryptedJSON(\n\tinput string,\n\tkeyEncryptionAlgorithms []KeyAlgorithm,\n\tcontentEncryption []ContentEncryption,\n) (*JSONWebEncryption, error) {\n\tvar parsed rawJSONWebEncryption\n\terr := json.Unmarshal([]byte(input), &parsed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn parsed.sanitized(keyEncryptionAlgorithms, contentEncryption)\n}\n\n// sanitized produces a cleaned-up JWE object from the raw JSON.\nfunc (parsed *rawJSONWebEncryption) sanitized(\n\tkeyEncryptionAlgorithms []KeyAlgorithm,\n\tcontentEncryption []ContentEncryption,\n) (*JSONWebEncryption, error) {\n\tif len(keyEncryptionAlgorithms) == 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: no key algorithms provided\")\n\t}\n\tif len(contentEncryption) == 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: no content encryption algorithms provided\")\n\t}\n\n\tobj := &JSONWebEncryption{\n\t\toriginal:    parsed,\n\t\tunprotected: parsed.Unprotected,\n\t}\n\n\t// Check that there is not a nonce in the unprotected headers\n\tif parsed.Unprotected != nil {\n\t\tif nonce := parsed.Unprotected.getNonce(); nonce != \"\" {\n\t\t\treturn nil, ErrUnprotectedNonce\n\t\t}\n\t}\n\tif parsed.Header != nil {\n\t\tif nonce := parsed.Header.getNonce(); nonce != \"\" {\n\t\t\treturn nil, ErrUnprotectedNonce\n\t\t}\n\t}\n\n\tif parsed.Protected != nil && len(parsed.Protected.bytes()) > 0 {\n\t\terr := json.Unmarshal(parsed.Protected.bytes(), &obj.protected)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid protected header: %s, %s\", err, parsed.Protected.base64())\n\t\t}\n\t}\n\n\t// Note: this must be called _after_ we parse the protected header,\n\t// otherwise fields from the protected header will not get picked up.\n\tvar err error\n\tmergedHeaders := obj.mergedHeaders(nil)\n\tobj.Header, err = mergedHeaders.sanitized()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: cannot sanitize merged headers: %v (%v)\", err, mergedHeaders)\n\t}\n\n\tif len(parsed.Recipients) == 0 {\n\t\tobj.recipients = []recipientInfo{\n\t\t\t{\n\t\t\t\theader:       parsed.Header,\n\t\t\t\tencryptedKey: parsed.EncryptedKey.bytes(),\n\t\t\t},\n\t\t}\n\t} else {\n\t\tobj.recipients = make([]recipientInfo, len(parsed.Recipients))\n\t\tfor r := range parsed.Recipients {\n\t\t\tencryptedKey, err := base64.RawURLEncoding.DecodeString(parsed.Recipients[r].EncryptedKey)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// Check that there is not a nonce in the unprotected header\n\t\t\tif parsed.Recipients[r].Header != nil && parsed.Recipients[r].Header.getNonce() != \"\" {\n\t\t\t\treturn nil, ErrUnprotectedNonce\n\t\t\t}\n\n\t\t\tobj.recipients[r].header = parsed.Recipients[r].Header\n\t\t\tobj.recipients[r].encryptedKey = encryptedKey\n\t\t}\n\t}\n\n\tfor i, recipient := range obj.recipients {\n\t\theaders := obj.mergedHeaders(&recipient)\n\t\tif headers.getAlgorithm() == \"\" {\n\t\t\treturn nil, fmt.Errorf(`go-jose/go-jose: recipient %d: missing header \"alg\"`, i)\n\t\t}\n\t\tif headers.getEncryption() == \"\" {\n\t\t\treturn nil, fmt.Errorf(`go-jose/go-jose: recipient %d: missing header \"enc\"`, i)\n\t\t}\n\t\terr := validateAlgEnc(headers, keyEncryptionAlgorithms, contentEncryption)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: recipient %d: %s\", i, err)\n\t\t}\n\n\t}\n\n\tif obj.protected != nil {\n\t\terr := validateAlgEnc(*obj.protected, keyEncryptionAlgorithms, contentEncryption)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: protected header: %s\", err)\n\t\t}\n\t}\n\tif obj.unprotected != nil {\n\t\terr := validateAlgEnc(*obj.unprotected, keyEncryptionAlgorithms, contentEncryption)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unprotected header: %s\", err)\n\t\t}\n\t}\n\n\tobj.iv = parsed.Iv.bytes()\n\tobj.ciphertext = parsed.Ciphertext.bytes()\n\tobj.tag = parsed.Tag.bytes()\n\tobj.aad = parsed.Aad.bytes()\n\n\treturn obj, nil\n}\n\nfunc validateAlgEnc(headers rawHeader, keyAlgorithms []KeyAlgorithm, contentEncryption []ContentEncryption) error {\n\talg := headers.getAlgorithm()\n\tenc := headers.getEncryption()\n\tif alg != \"\" && !containsKeyAlgorithm(keyAlgorithms, alg) {\n\t\treturn fmt.Errorf(\"unexpected key algorithm %q; expected %q\", alg, keyAlgorithms)\n\t}\n\tif enc != \"\" && !containsContentEncryption(contentEncryption, enc) {\n\t\treturn fmt.Errorf(\"unexpected content encryption algorithm %q; expected %q\", enc, contentEncryption)\n\t}\n\treturn nil\n}\n\n// ParseEncryptedCompact parses a message in JWE Compact Serialization.\n//\n// https://datatracker.ietf.org/doc/html/rfc7516#section-3.1\nfunc ParseEncryptedCompact(\n\tinput string,\n\tkeyAlgorithms []KeyAlgorithm,\n\tcontentEncryption []ContentEncryption,\n) (*JSONWebEncryption, error) {\n\tvar parts [5]string\n\tvar ok bool\n\n\tfor i := range 4 {\n\t\tparts[i], input, ok = strings.Cut(input, \".\")\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"go-jose/go-jose: compact JWE format must have five parts\")\n\t\t}\n\t}\n\t// Validate that the last part does not contain more dots\n\tif strings.ContainsRune(input, '.') {\n\t\treturn nil, errors.New(\"go-jose/go-jose: compact JWE format must have five parts\")\n\t}\n\tparts[4] = input\n\n\trawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tencryptedKey, err := base64.RawURLEncoding.DecodeString(parts[1])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tiv, err := base64.RawURLEncoding.DecodeString(parts[2])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tciphertext, err := base64.RawURLEncoding.DecodeString(parts[3])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttag, err := base64.RawURLEncoding.DecodeString(parts[4])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\traw := &rawJSONWebEncryption{\n\t\tProtected:    newBuffer(rawProtected),\n\t\tEncryptedKey: newBuffer(encryptedKey),\n\t\tIv:           newBuffer(iv),\n\t\tCiphertext:   newBuffer(ciphertext),\n\t\tTag:          newBuffer(tag),\n\t}\n\n\treturn raw.sanitized(keyAlgorithms, contentEncryption)\n}\n\n// CompactSerialize serializes an object using the compact serialization format.\nfunc (obj JSONWebEncryption) CompactSerialize() (string, error) {\n\tif len(obj.recipients) != 1 || obj.unprotected != nil ||\n\t\tobj.protected == nil || obj.recipients[0].header != nil {\n\t\treturn \"\", ErrNotSupported\n\t}\n\n\tserializedProtected := mustSerializeJSON(obj.protected)\n\n\treturn base64JoinWithDots(\n\t\tserializedProtected,\n\t\tobj.recipients[0].encryptedKey,\n\t\tobj.iv,\n\t\tobj.ciphertext,\n\t\tobj.tag,\n\t), nil\n}\n\n// FullSerialize serializes an object using the full JSON serialization format.\nfunc (obj JSONWebEncryption) FullSerialize() string {\n\traw := rawJSONWebEncryption{\n\t\tUnprotected:  obj.unprotected,\n\t\tIv:           newBuffer(obj.iv),\n\t\tCiphertext:   newBuffer(obj.ciphertext),\n\t\tEncryptedKey: newBuffer(obj.recipients[0].encryptedKey),\n\t\tTag:          newBuffer(obj.tag),\n\t\tAad:          newBuffer(obj.aad),\n\t\tRecipients:   []rawRecipientInfo{},\n\t}\n\n\tif len(obj.recipients) > 1 {\n\t\tfor _, recipient := range obj.recipients {\n\t\t\tinfo := rawRecipientInfo{\n\t\t\t\tHeader:       recipient.header,\n\t\t\t\tEncryptedKey: base64.RawURLEncoding.EncodeToString(recipient.encryptedKey),\n\t\t\t}\n\t\t\traw.Recipients = append(raw.Recipients, info)\n\t\t}\n\t} else {\n\t\t// Use flattened serialization\n\t\traw.Header = obj.recipients[0].header\n\t\traw.EncryptedKey = newBuffer(obj.recipients[0].encryptedKey)\n\t}\n\n\tif obj.protected != nil {\n\t\traw.Protected = newBuffer(mustSerializeJSON(obj.protected))\n\t}\n\n\treturn string(mustSerializeJSON(raw))\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/jwk.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/elliptic\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\"\n\t\"crypto/sha256\"\n\t\"crypto/x509\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"net/url\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// rawJSONWebKey represents a public or private key in JWK format, used for parsing/serializing.\ntype rawJSONWebKey struct {\n\tUse string      `json:\"use,omitempty\"`\n\tKty string      `json:\"kty,omitempty\"`\n\tKid string      `json:\"kid,omitempty\"`\n\tCrv string      `json:\"crv,omitempty\"`\n\tAlg string      `json:\"alg,omitempty\"`\n\tK   *byteBuffer `json:\"k,omitempty\"`\n\tX   *byteBuffer `json:\"x,omitempty\"`\n\tY   *byteBuffer `json:\"y,omitempty\"`\n\tN   *byteBuffer `json:\"n,omitempty\"`\n\tE   *byteBuffer `json:\"e,omitempty\"`\n\t// -- Following fields are only used for private keys --\n\t// RSA uses D, P and Q, while ECDSA uses only D. Fields Dp, Dq, and Qi are\n\t// completely optional. Therefore for RSA/ECDSA, D != nil is a contract that\n\t// we have a private key whereas D == nil means we have only a public key.\n\tD  *byteBuffer `json:\"d,omitempty\"`\n\tP  *byteBuffer `json:\"p,omitempty\"`\n\tQ  *byteBuffer `json:\"q,omitempty\"`\n\tDp *byteBuffer `json:\"dp,omitempty\"`\n\tDq *byteBuffer `json:\"dq,omitempty\"`\n\tQi *byteBuffer `json:\"qi,omitempty\"`\n\t// Certificates\n\tX5c       []string `json:\"x5c,omitempty\"`\n\tX5u       string   `json:\"x5u,omitempty\"`\n\tX5tSHA1   string   `json:\"x5t,omitempty\"`\n\tX5tSHA256 string   `json:\"x5t#S256,omitempty\"`\n}\n\n// JSONWebKey represents a public or private key in JWK format. It can be\n// marshaled into JSON and unmarshaled from JSON.\ntype JSONWebKey struct {\n\t// Key is the Go in-memory representation of this key. It must have one\n\t// of these types:\n\t//  - ed25519.PublicKey\n\t//  - ed25519.PrivateKey\n\t//  - *ecdsa.PublicKey\n\t//  - *ecdsa.PrivateKey\n\t//  - *rsa.PublicKey\n\t//  - *rsa.PrivateKey\n\t//  - []byte (a symmetric key)\n\t//\n\t// When marshaling this JSONWebKey into JSON, the \"kty\" header parameter\n\t// will be automatically set based on the type of this field.\n\tKey interface{}\n\t// Key identifier, parsed from `kid` header.\n\tKeyID string\n\t// Key algorithm, parsed from `alg` header.\n\tAlgorithm string\n\t// Key use, parsed from `use` header.\n\tUse string\n\n\t// X.509 certificate chain, parsed from `x5c` header.\n\tCertificates []*x509.Certificate\n\t// X.509 certificate URL, parsed from `x5u` header.\n\tCertificatesURL *url.URL\n\t// X.509 certificate thumbprint (SHA-1), parsed from `x5t` header.\n\tCertificateThumbprintSHA1 []byte\n\t// X.509 certificate thumbprint (SHA-256), parsed from `x5t#S256` header.\n\tCertificateThumbprintSHA256 []byte\n}\n\n// MarshalJSON serializes the given key to its JSON representation.\nfunc (k JSONWebKey) MarshalJSON() ([]byte, error) {\n\tvar raw *rawJSONWebKey\n\tvar err error\n\n\tswitch key := k.Key.(type) {\n\tcase ed25519.PublicKey:\n\t\traw = fromEdPublicKey(key)\n\tcase *ecdsa.PublicKey:\n\t\traw, err = fromEcPublicKey(key)\n\tcase *rsa.PublicKey:\n\t\traw = fromRsaPublicKey(key)\n\tcase ed25519.PrivateKey:\n\t\traw, err = fromEdPrivateKey(key)\n\tcase *ecdsa.PrivateKey:\n\t\traw, err = fromEcPrivateKey(key)\n\tcase *rsa.PrivateKey:\n\t\traw, err = fromRsaPrivateKey(key)\n\tcase []byte:\n\t\traw, err = fromSymmetricKey(key)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unknown key type '%s'\", reflect.TypeOf(key))\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\traw.Kid = k.KeyID\n\traw.Alg = k.Algorithm\n\traw.Use = k.Use\n\n\tfor _, cert := range k.Certificates {\n\t\traw.X5c = append(raw.X5c, base64.StdEncoding.EncodeToString(cert.Raw))\n\t}\n\n\tx5tSHA1Len := len(k.CertificateThumbprintSHA1)\n\tx5tSHA256Len := len(k.CertificateThumbprintSHA256)\n\tif x5tSHA1Len > 0 {\n\t\tif x5tSHA1Len != sha1.Size {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid SHA-1 thumbprint (must be %d bytes, not %d)\", sha1.Size, x5tSHA1Len)\n\t\t}\n\t\traw.X5tSHA1 = base64.RawURLEncoding.EncodeToString(k.CertificateThumbprintSHA1)\n\t}\n\tif x5tSHA256Len > 0 {\n\t\tif x5tSHA256Len != sha256.Size {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid SHA-256 thumbprint (must be %d bytes, not %d)\", sha256.Size, x5tSHA256Len)\n\t\t}\n\t\traw.X5tSHA256 = base64.RawURLEncoding.EncodeToString(k.CertificateThumbprintSHA256)\n\t}\n\n\t// If cert chain is attached (as opposed to being behind a URL), check the\n\t// keys thumbprints to make sure they match what is expected. This is to\n\t// ensure we don't accidentally produce a JWK with semantically inconsistent\n\t// data in the headers.\n\tif len(k.Certificates) > 0 {\n\t\texpectedSHA1 := sha1.Sum(k.Certificates[0].Raw)\n\t\texpectedSHA256 := sha256.Sum256(k.Certificates[0].Raw)\n\n\t\tif len(k.CertificateThumbprintSHA1) > 0 && !bytes.Equal(k.CertificateThumbprintSHA1, expectedSHA1[:]) {\n\t\t\treturn nil, errors.New(\"go-jose/go-jose: invalid SHA-1 thumbprint, does not match cert chain\")\n\t\t}\n\t\tif len(k.CertificateThumbprintSHA256) > 0 && !bytes.Equal(k.CertificateThumbprintSHA256, expectedSHA256[:]) {\n\t\t\treturn nil, errors.New(\"go-jose/go-jose: invalid or SHA-256 thumbprint, does not match cert chain\")\n\t\t}\n\t}\n\n\tif k.CertificatesURL != nil {\n\t\traw.X5u = k.CertificatesURL.String()\n\t}\n\n\treturn json.Marshal(raw)\n}\n\n// UnmarshalJSON reads a key from its JSON representation.\n//\n// Returns ErrUnsupportedKeyType for unrecognized or unsupported \"kty\" header values.\nfunc (k *JSONWebKey) UnmarshalJSON(data []byte) (err error) {\n\tvar raw rawJSONWebKey\n\terr = json.Unmarshal(data, &raw)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcerts, err := parseCertificateChain(raw.X5c)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"go-jose/go-jose: failed to unmarshal x5c field: %s\", err)\n\t}\n\n\tvar key interface{}\n\tvar certPub interface{}\n\tvar keyPub interface{}\n\n\tif len(certs) > 0 {\n\t\t// We need to check that leaf public key matches the key embedded in this\n\t\t// JWK, as required by the standard (see RFC 7517, Section 4.7). Otherwise\n\t\t// the JWK parsed could be semantically invalid. Technically, should also\n\t\t// check key usage fields and other extensions on the cert here, but the\n\t\t// standard doesn't exactly explain how they're supposed to map from the\n\t\t// JWK representation to the X.509 extensions.\n\t\tcertPub = certs[0].PublicKey\n\t}\n\n\tswitch raw.Kty {\n\tcase \"EC\":\n\t\tif raw.D != nil {\n\t\t\tkey, err = raw.ecPrivateKey()\n\t\t\tif err == nil {\n\t\t\t\tkeyPub = key.(*ecdsa.PrivateKey).Public()\n\t\t\t}\n\t\t} else {\n\t\t\tkey, err = raw.ecPublicKey()\n\t\t\tkeyPub = key\n\t\t}\n\tcase \"RSA\":\n\t\tif raw.D != nil {\n\t\t\tkey, err = raw.rsaPrivateKey()\n\t\t\tif err == nil {\n\t\t\t\tkeyPub = key.(*rsa.PrivateKey).Public()\n\t\t\t}\n\t\t} else {\n\t\t\tkey, err = raw.rsaPublicKey()\n\t\t\tkeyPub = key\n\t\t}\n\tcase \"oct\":\n\t\tif certPub != nil {\n\t\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, found 'oct' (symmetric) key with cert chain\")\n\t\t}\n\t\tkey, err = raw.symmetricKey()\n\tcase \"OKP\":\n\t\tif raw.Crv == \"Ed25519\" {\n\t\t\tif raw.D != nil {\n\t\t\t\tkey, err = raw.edPrivateKey()\n\t\t\t\tif err == nil {\n\t\t\t\t\tkeyPub = key.(ed25519.PrivateKey).Public()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkey, err = raw.edPublicKey()\n\t\t\t\tkeyPub = key\n\t\t\t}\n\t\t}\n\tcase \"\":\n\t\t// kty MUST be present\n\t\terr = fmt.Errorf(\"go-jose/go-jose: missing json web key type\")\n\t}\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif key == nil {\n\t\t// RFC 7517:\n\t\t// 5.  JWK Set Format\n\t\t// ...\n\t\t//     Implementations SHOULD ignore JWKs within a JWK Set that use \"kty\"\n\t\t//     (key type) values that are not understood by them, that are missing\n\t\t//     required members, or for which values are out of the supported\n\t\t//     ranges.\n\t\treturn ErrUnsupportedKeyType\n\t}\n\n\tif certPub != nil && keyPub != nil {\n\t\tif !reflect.DeepEqual(certPub, keyPub) {\n\t\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, public keys in key and x5c fields do not match\")\n\t\t}\n\t}\n\n\t*k = JSONWebKey{Key: key, KeyID: raw.Kid, Algorithm: raw.Alg, Use: raw.Use, Certificates: certs}\n\n\tif raw.X5u != \"\" {\n\t\tk.CertificatesURL, err = url.Parse(raw.X5u)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"go-jose/go-jose: invalid JWK, x5u header is invalid URL: %w\", err)\n\t\t}\n\t}\n\n\t// x5t parameters are base64url-encoded SHA thumbprints\n\t// See RFC 7517, Section 4.8, https://tools.ietf.org/html/rfc7517#section-4.8\n\tx5tSHA1bytes, err := base64.RawURLEncoding.DecodeString(raw.X5tSHA1)\n\tif err != nil {\n\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5t header has invalid encoding\")\n\t}\n\n\t// RFC 7517, Section 4.8 is ambiguous as to whether the digest output should be byte or hex,\n\t// for this reason, after base64 decoding, if the size is sha1.Size it's likely that the value is a byte encoded\n\t// checksum so we skip this. Otherwise if the checksum was hex encoded we expect a 40 byte sized array so we'll\n\t// try to hex decode it. When Marshalling this value we'll always use a base64 encoded version of byte format checksum.\n\tif len(x5tSHA1bytes) == 2*sha1.Size {\n\t\thx, err := hex.DecodeString(string(x5tSHA1bytes))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"go-jose/go-jose: invalid JWK, unable to hex decode x5t: %v\", err)\n\n\t\t}\n\t\tx5tSHA1bytes = hx\n\t}\n\n\tk.CertificateThumbprintSHA1 = x5tSHA1bytes\n\n\tx5tSHA256bytes, err := base64.RawURLEncoding.DecodeString(raw.X5tSHA256)\n\tif err != nil {\n\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5t#S256 header has invalid encoding\")\n\t}\n\n\tif len(x5tSHA256bytes) == 2*sha256.Size {\n\t\thx256, err := hex.DecodeString(string(x5tSHA256bytes))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"go-jose/go-jose: invalid JWK, unable to hex decode x5t#S256: %v\", err)\n\t\t}\n\t\tx5tSHA256bytes = hx256\n\t}\n\n\tk.CertificateThumbprintSHA256 = x5tSHA256bytes\n\n\tx5tSHA1Len := len(k.CertificateThumbprintSHA1)\n\tx5tSHA256Len := len(k.CertificateThumbprintSHA256)\n\tif x5tSHA1Len > 0 && x5tSHA1Len != sha1.Size {\n\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5t header is of incorrect size\")\n\t}\n\tif x5tSHA256Len > 0 && x5tSHA256Len != sha256.Size {\n\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5t#S256 header is of incorrect size\")\n\t}\n\n\t// If certificate chain *and* thumbprints are set, verify correctness.\n\tif len(k.Certificates) > 0 {\n\t\tleaf := k.Certificates[0]\n\t\tsha1sum := sha1.Sum(leaf.Raw)\n\t\tsha256sum := sha256.Sum256(leaf.Raw)\n\n\t\tif len(k.CertificateThumbprintSHA1) > 0 && !bytes.Equal(sha1sum[:], k.CertificateThumbprintSHA1) {\n\t\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5c thumbprint does not match x5t value\")\n\t\t}\n\n\t\tif len(k.CertificateThumbprintSHA256) > 0 && !bytes.Equal(sha256sum[:], k.CertificateThumbprintSHA256) {\n\t\t\treturn errors.New(\"go-jose/go-jose: invalid JWK, x5c thumbprint does not match x5t#S256 value\")\n\t\t}\n\t}\n\n\treturn\n}\n\n// JSONWebKeySet represents a JWK Set object.\ntype JSONWebKeySet struct {\n\tKeys []JSONWebKey `json:\"keys\"`\n}\n\n// Key convenience method returns keys by key ID. Specification states\n// that a JWK Set \"SHOULD\" use distinct key IDs, but allows for some\n// cases where they are not distinct. Hence method returns a slice\n// of JSONWebKeys.\nfunc (s *JSONWebKeySet) Key(kid string) []JSONWebKey {\n\tvar keys []JSONWebKey\n\tfor _, key := range s.Keys {\n\t\tif key.KeyID == kid {\n\t\t\tkeys = append(keys, key)\n\t\t}\n\t}\n\n\treturn keys\n}\n\nconst rsaThumbprintTemplate = `{\"e\":\"%s\",\"kty\":\"RSA\",\"n\":\"%s\"}`\nconst ecThumbprintTemplate = `{\"crv\":\"%s\",\"kty\":\"EC\",\"x\":\"%s\",\"y\":\"%s\"}`\nconst edThumbprintTemplate = `{\"crv\":\"%s\",\"kty\":\"OKP\",\"x\":\"%s\"}`\n\nfunc ecThumbprintInput(curve elliptic.Curve, x, y *big.Int) (string, error) {\n\tcoordLength := curveSize(curve)\n\tcrv, err := curveName(curve)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif len(x.Bytes()) > coordLength || len(y.Bytes()) > coordLength {\n\t\treturn \"\", errors.New(\"go-jose/go-jose: invalid elliptic key (too large)\")\n\t}\n\n\treturn fmt.Sprintf(ecThumbprintTemplate, crv,\n\t\tnewFixedSizeBuffer(x.Bytes(), coordLength).base64(),\n\t\tnewFixedSizeBuffer(y.Bytes(), coordLength).base64()), nil\n}\n\nfunc rsaThumbprintInput(n *big.Int, e int) (string, error) {\n\treturn fmt.Sprintf(rsaThumbprintTemplate,\n\t\tnewBufferFromInt(uint64(e)).base64(),\n\t\tnewBuffer(n.Bytes()).base64()), nil\n}\n\nfunc edThumbprintInput(ed ed25519.PublicKey) (string, error) {\n\tcrv := \"Ed25519\"\n\tif len(ed) > 32 {\n\t\treturn \"\", errors.New(\"go-jose/go-jose: invalid elliptic key (too large)\")\n\t}\n\treturn fmt.Sprintf(edThumbprintTemplate, crv,\n\t\tnewFixedSizeBuffer(ed, 32).base64()), nil\n}\n\n// Thumbprint computes the JWK Thumbprint of a key using the\n// indicated hash algorithm.\nfunc (k *JSONWebKey) Thumbprint(hash crypto.Hash) ([]byte, error) {\n\tvar input string\n\tvar err error\n\tswitch key := k.Key.(type) {\n\tcase ed25519.PublicKey:\n\t\tinput, err = edThumbprintInput(key)\n\tcase *ecdsa.PublicKey:\n\t\tinput, err = ecThumbprintInput(key.Curve, key.X, key.Y)\n\tcase *ecdsa.PrivateKey:\n\t\tinput, err = ecThumbprintInput(key.Curve, key.X, key.Y)\n\tcase *rsa.PublicKey:\n\t\tinput, err = rsaThumbprintInput(key.N, key.E)\n\tcase *rsa.PrivateKey:\n\t\tinput, err = rsaThumbprintInput(key.N, key.E)\n\tcase ed25519.PrivateKey:\n\t\tinput, err = edThumbprintInput(ed25519.PublicKey(key[32:]))\n\tcase OpaqueSigner:\n\t\treturn key.Public().Thumbprint(hash)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unknown key type '%s'\", reflect.TypeOf(key))\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\th := hash.New()\n\t_, _ = h.Write([]byte(input))\n\treturn h.Sum(nil), nil\n}\n\n// IsPublic returns true if the JWK represents a public key (not symmetric, not private).\nfunc (k *JSONWebKey) IsPublic() bool {\n\tswitch k.Key.(type) {\n\tcase *ecdsa.PublicKey, *rsa.PublicKey, ed25519.PublicKey:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// Public creates JSONWebKey with corresponding public key if JWK represents asymmetric private key.\nfunc (k *JSONWebKey) Public() JSONWebKey {\n\tif k.IsPublic() {\n\t\treturn *k\n\t}\n\tret := *k\n\tswitch key := k.Key.(type) {\n\tcase *ecdsa.PrivateKey:\n\t\tret.Key = key.Public()\n\tcase *rsa.PrivateKey:\n\t\tret.Key = key.Public()\n\tcase ed25519.PrivateKey:\n\t\tret.Key = key.Public()\n\tdefault:\n\t\treturn JSONWebKey{} // returning invalid key\n\t}\n\treturn ret\n}\n\n// Valid checks that the key contains the expected parameters.\nfunc (k *JSONWebKey) Valid() bool {\n\tif k.Key == nil {\n\t\treturn false\n\t}\n\tswitch key := k.Key.(type) {\n\tcase *ecdsa.PublicKey:\n\t\tif key.Curve == nil || key.X == nil || key.Y == nil {\n\t\t\treturn false\n\t\t}\n\tcase *ecdsa.PrivateKey:\n\t\tif key.Curve == nil || key.X == nil || key.Y == nil || key.D == nil {\n\t\t\treturn false\n\t\t}\n\tcase *rsa.PublicKey:\n\t\tif key.N == nil || key.E == 0 {\n\t\t\treturn false\n\t\t}\n\tcase *rsa.PrivateKey:\n\t\tif key.N == nil || key.E == 0 || key.D == nil || len(key.Primes) < 2 {\n\t\t\treturn false\n\t\t}\n\tcase ed25519.PublicKey:\n\t\tif len(key) != 32 {\n\t\t\treturn false\n\t\t}\n\tcase ed25519.PrivateKey:\n\t\tif len(key) != 64 {\n\t\t\treturn false\n\t\t}\n\tdefault:\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc (key rawJSONWebKey) rsaPublicKey() (*rsa.PublicKey, error) {\n\tif key.N == nil || key.E == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid RSA key, missing n/e values\")\n\t}\n\n\treturn &rsa.PublicKey{\n\t\tN: key.N.bigInt(),\n\t\tE: key.E.toInt(),\n\t}, nil\n}\n\nfunc fromEdPublicKey(pub ed25519.PublicKey) *rawJSONWebKey {\n\treturn &rawJSONWebKey{\n\t\tKty: \"OKP\",\n\t\tCrv: \"Ed25519\",\n\t\tX:   newBuffer(pub),\n\t}\n}\n\nfunc fromRsaPublicKey(pub *rsa.PublicKey) *rawJSONWebKey {\n\treturn &rawJSONWebKey{\n\t\tKty: \"RSA\",\n\t\tN:   newBuffer(pub.N.Bytes()),\n\t\tE:   newBufferFromInt(uint64(pub.E)),\n\t}\n}\n\nfunc (key rawJSONWebKey) ecPublicKey() (*ecdsa.PublicKey, error) {\n\tvar curve elliptic.Curve\n\tswitch key.Crv {\n\tcase \"P-256\":\n\t\tcurve = elliptic.P256()\n\tcase \"P-384\":\n\t\tcurve = elliptic.P384()\n\tcase \"P-521\":\n\t\tcurve = elliptic.P521()\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unsupported elliptic curve '%s'\", key.Crv)\n\t}\n\n\tif key.X == nil || key.Y == nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid EC key, missing x/y values\")\n\t}\n\n\t// The length of this octet string MUST be the full size of a coordinate for\n\t// the curve specified in the \"crv\" parameter.\n\t// https://tools.ietf.org/html/rfc7518#section-6.2.1.2\n\tif curveSize(curve) != len(key.X.data) {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC public key, wrong length for x\")\n\t}\n\n\tif curveSize(curve) != len(key.Y.data) {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC public key, wrong length for y\")\n\t}\n\n\tx := key.X.bigInt()\n\ty := key.Y.bigInt()\n\n\tif !curve.IsOnCurve(x, y) {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid EC key, X/Y are not on declared curve\")\n\t}\n\n\treturn &ecdsa.PublicKey{\n\t\tCurve: curve,\n\t\tX:     x,\n\t\tY:     y,\n\t}, nil\n}\n\nfunc fromEcPublicKey(pub *ecdsa.PublicKey) (*rawJSONWebKey, error) {\n\tif pub == nil || pub.X == nil || pub.Y == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC key (nil, or X/Y missing)\")\n\t}\n\n\tname, err := curveName(pub.Curve)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsize := curveSize(pub.Curve)\n\n\txBytes := pub.X.Bytes()\n\tyBytes := pub.Y.Bytes()\n\n\tif len(xBytes) > size || len(yBytes) > size {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC key (X/Y too large)\")\n\t}\n\n\tkey := &rawJSONWebKey{\n\t\tKty: \"EC\",\n\t\tCrv: name,\n\t\tX:   newFixedSizeBuffer(xBytes, size),\n\t\tY:   newFixedSizeBuffer(yBytes, size),\n\t}\n\n\treturn key, nil\n}\n\nfunc (key rawJSONWebKey) edPrivateKey() (ed25519.PrivateKey, error) {\n\tvar missing []string\n\tif key.D == nil {\n\t\tmissing = append(missing, \"D\")\n\t}\n\tif key.X == nil {\n\t\tmissing = append(missing, \"X\")\n\t}\n\n\tif len(missing) > 0 {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid Ed25519 private key, missing %s value(s)\", strings.Join(missing, \", \"))\n\t}\n\n\tprivateKey := make([]byte, ed25519.PrivateKeySize)\n\tcopy(privateKey[0:32], key.D.bytes())\n\tcopy(privateKey[32:], key.X.bytes())\n\trv := ed25519.PrivateKey(privateKey)\n\treturn rv, nil\n}\n\nfunc (key rawJSONWebKey) edPublicKey() (ed25519.PublicKey, error) {\n\tif key.X == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid Ed key, missing x value\")\n\t}\n\tpublicKey := make([]byte, ed25519.PublicKeySize)\n\tcopy(publicKey[0:32], key.X.bytes())\n\trv := ed25519.PublicKey(publicKey)\n\treturn rv, nil\n}\n\nfunc (key rawJSONWebKey) rsaPrivateKey() (*rsa.PrivateKey, error) {\n\tvar missing []string\n\tif key.N == nil {\n\t\tmissing = append(missing, \"N\")\n\t}\n\tif key.E == nil {\n\t\tmissing = append(missing, \"E\")\n\t}\n\tif key.D == nil {\n\t\tmissing = append(missing, \"D\")\n\t}\n\tif key.P == nil {\n\t\tmissing = append(missing, \"P\")\n\t}\n\tif key.Q == nil {\n\t\tmissing = append(missing, \"Q\")\n\t}\n\tif len(missing) > 0 {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid RSA private key, missing %s value(s)\", strings.Join(missing, \", \"))\n\t}\n\n\trv := &rsa.PrivateKey{\n\t\tPublicKey: rsa.PublicKey{\n\t\t\tN: key.N.bigInt(),\n\t\t\tE: key.E.toInt(),\n\t\t},\n\t\tD: key.D.bigInt(),\n\t\tPrimes: []*big.Int{\n\t\t\tkey.P.bigInt(),\n\t\t\tkey.Q.bigInt(),\n\t\t},\n\t}\n\n\tif key.Dp != nil {\n\t\trv.Precomputed.Dp = key.Dp.bigInt()\n\t}\n\tif key.Dq != nil {\n\t\trv.Precomputed.Dq = key.Dq.bigInt()\n\t}\n\tif key.Qi != nil {\n\t\trv.Precomputed.Qinv = key.Qi.bigInt()\n\t}\n\n\terr := rv.Validate()\n\treturn rv, err\n}\n\nfunc fromEdPrivateKey(ed ed25519.PrivateKey) (*rawJSONWebKey, error) {\n\traw := fromEdPublicKey(ed25519.PublicKey(ed[32:]))\n\n\traw.D = newBuffer(ed[0:32])\n\treturn raw, nil\n}\n\nfunc fromRsaPrivateKey(rsa *rsa.PrivateKey) (*rawJSONWebKey, error) {\n\tif len(rsa.Primes) != 2 {\n\t\treturn nil, ErrUnsupportedKeyType\n\t}\n\n\traw := fromRsaPublicKey(&rsa.PublicKey)\n\n\traw.D = newBuffer(rsa.D.Bytes())\n\traw.P = newBuffer(rsa.Primes[0].Bytes())\n\traw.Q = newBuffer(rsa.Primes[1].Bytes())\n\n\tif rsa.Precomputed.Dp != nil {\n\t\traw.Dp = newBuffer(rsa.Precomputed.Dp.Bytes())\n\t}\n\tif rsa.Precomputed.Dq != nil {\n\t\traw.Dq = newBuffer(rsa.Precomputed.Dq.Bytes())\n\t}\n\tif rsa.Precomputed.Qinv != nil {\n\t\traw.Qi = newBuffer(rsa.Precomputed.Qinv.Bytes())\n\t}\n\n\treturn raw, nil\n}\n\nfunc (key rawJSONWebKey) ecPrivateKey() (*ecdsa.PrivateKey, error) {\n\tvar curve elliptic.Curve\n\tswitch key.Crv {\n\tcase \"P-256\":\n\t\tcurve = elliptic.P256()\n\tcase \"P-384\":\n\t\tcurve = elliptic.P384()\n\tcase \"P-521\":\n\t\tcurve = elliptic.P521()\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: unsupported elliptic curve '%s'\", key.Crv)\n\t}\n\n\tvar missing []string\n\tif key.X == nil {\n\t\tmissing = append(missing, \"X\")\n\t}\n\tif key.Y == nil {\n\t\tmissing = append(missing, \"Y\")\n\t}\n\tif key.D == nil {\n\t\tmissing = append(missing, \"D\")\n\t}\n\n\tif len(missing) > 0 {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC private key, missing %s value(s)\", strings.Join(missing, \", \"))\n\t}\n\n\t// The length of this octet string MUST be the full size of a coordinate for\n\t// the curve specified in the \"crv\" parameter.\n\t// https://tools.ietf.org/html/rfc7518#section-6.2.1.2\n\tif curveSize(curve) != len(key.X.data) {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC private key, wrong length for x\")\n\t}\n\n\tif curveSize(curve) != len(key.Y.data) {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC private key, wrong length for y\")\n\t}\n\n\t// https://tools.ietf.org/html/rfc7518#section-6.2.2.1\n\tif dSize(curve) != len(key.D.data) {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC private key, wrong length for d\")\n\t}\n\n\tx := key.X.bigInt()\n\ty := key.Y.bigInt()\n\n\tif !curve.IsOnCurve(x, y) {\n\t\treturn nil, errors.New(\"go-jose/go-jose: invalid EC key, X/Y are not on declared curve\")\n\t}\n\n\treturn &ecdsa.PrivateKey{\n\t\tPublicKey: ecdsa.PublicKey{\n\t\t\tCurve: curve,\n\t\t\tX:     x,\n\t\t\tY:     y,\n\t\t},\n\t\tD: key.D.bigInt(),\n\t}, nil\n}\n\nfunc fromEcPrivateKey(ec *ecdsa.PrivateKey) (*rawJSONWebKey, error) {\n\traw, err := fromEcPublicKey(&ec.PublicKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif ec.D == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid EC private key\")\n\t}\n\n\traw.D = newFixedSizeBuffer(ec.D.Bytes(), dSize(ec.PublicKey.Curve))\n\n\treturn raw, nil\n}\n\n// dSize returns the size in octets for the \"d\" member of an elliptic curve\n// private key.\n// The length of this octet string MUST be ceiling(log-base-2(n)/8)\n// octets (where n is the order of the curve).\n// https://tools.ietf.org/html/rfc7518#section-6.2.2.1\nfunc dSize(curve elliptic.Curve) int {\n\torder := curve.Params().P\n\tbitLen := order.BitLen()\n\tsize := bitLen / 8\n\tif bitLen%8 != 0 {\n\t\tsize++\n\t}\n\treturn size\n}\n\nfunc fromSymmetricKey(key []byte) (*rawJSONWebKey, error) {\n\treturn &rawJSONWebKey{\n\t\tKty: \"oct\",\n\t\tK:   newBuffer(key),\n\t}, nil\n}\n\nfunc (key rawJSONWebKey) symmetricKey() ([]byte, error) {\n\tif key.K == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid OCT (symmetric) key, missing k value\")\n\t}\n\treturn key.K.bytes(), nil\n}\n\nvar (\n\t// ErrJWKSKidNotFound is returned when a JWKS does not contain a JWK with a\n\t// key ID which matches one in the provided tokens headers.\n\tErrJWKSKidNotFound = errors.New(\"go-jose/go-jose: JWK with matching kid not found in JWK Set\")\n)\n\nfunc tryJWKS(key interface{}, headers ...Header) (interface{}, error) {\n\tvar jwks JSONWebKeySet\n\n\tswitch jwksType := key.(type) {\n\tcase *JSONWebKeySet:\n\t\tjwks = *jwksType\n\tcase JSONWebKeySet:\n\t\tjwks = jwksType\n\tdefault:\n\t\t// If the specified key is not a JWKS, return as is.\n\t\treturn key, nil\n\t}\n\n\t// Determine the KID to search for from the headers.\n\tvar kid string\n\tfor _, header := range headers {\n\t\tif header.KeyID != \"\" {\n\t\t\tkid = header.KeyID\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// If no KID is specified in the headers, reject.\n\tif kid == \"\" {\n\t\treturn nil, ErrJWKSKidNotFound\n\t}\n\n\t// Find the JWK with the matching KID. If no JWK with the specified KID is\n\t// found, reject.\n\tkeys := jwks.Key(kid)\n\tif len(keys) == 0 {\n\t\treturn nil, ErrJWKSKidNotFound\n\t}\n\n\treturn keys[0].Key, nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/jws.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// rawJSONWebSignature represents a raw JWS JSON object. Used for parsing/serializing.\ntype rawJSONWebSignature struct {\n\tPayload    *byteBuffer        `json:\"payload,omitempty\"`\n\tSignatures []rawSignatureInfo `json:\"signatures,omitempty\"`\n\tProtected  *byteBuffer        `json:\"protected,omitempty\"`\n\tHeader     *rawHeader         `json:\"header,omitempty\"`\n\tSignature  *byteBuffer        `json:\"signature,omitempty\"`\n}\n\n// rawSignatureInfo represents a single JWS signature over the JWS payload and protected header.\ntype rawSignatureInfo struct {\n\tProtected *byteBuffer `json:\"protected,omitempty\"`\n\tHeader    *rawHeader  `json:\"header,omitempty\"`\n\tSignature *byteBuffer `json:\"signature,omitempty\"`\n}\n\n// JSONWebSignature represents a signed JWS object after parsing.\ntype JSONWebSignature struct {\n\tpayload []byte\n\t// Signatures attached to this object (may be more than one for multi-sig).\n\t// Be careful about accessing these directly, prefer to use Verify() or\n\t// VerifyMulti() to ensure that the data you're getting is verified.\n\tSignatures []Signature\n}\n\n// Signature represents a single signature over the JWS payload and protected header.\ntype Signature struct {\n\t// Merged header fields. Contains both protected and unprotected header\n\t// values. Prefer using Protected and Unprotected fields instead of this.\n\t// Values in this header may or may not have been signed and in general\n\t// should not be trusted.\n\tHeader Header\n\n\t// Protected header. Values in this header were signed and\n\t// will be verified as part of the signature verification process.\n\tProtected Header\n\n\t// Unprotected header. Values in this header were not signed\n\t// and in general should not be trusted.\n\tUnprotected Header\n\n\t// The actual signature value\n\tSignature []byte\n\n\tprotected *rawHeader\n\theader    *rawHeader\n\toriginal  *rawSignatureInfo\n}\n\n// ParseSigned parses a signed message in JWS Compact or JWS JSON Serialization. Validation fails if\n// the JWS is signed with an algorithm that isn't in the provided list of signature algorithms.\n// Applications should decide for themselves which signature algorithms are acceptable. If you're\n// not sure which signature algorithms your application might receive, consult the documentation of\n// the program which provides them or the protocol that you are implementing. You can also try\n// getting an example JWS and decoding it with a tool like https://jwt.io to see what its \"alg\"\n// header parameter indicates. The signature on the JWS does not get validated during parsing. Call\n// Verify() after parsing to validate the signature and obtain the payload.\n//\n// https://datatracker.ietf.org/doc/html/rfc7515#section-7\nfunc ParseSigned(\n\tsignature string,\n\tsignatureAlgorithms []SignatureAlgorithm,\n) (*JSONWebSignature, error) {\n\tsignature = stripWhitespace(signature)\n\tif strings.HasPrefix(signature, \"{\") {\n\t\treturn ParseSignedJSON(signature, signatureAlgorithms)\n\t}\n\n\treturn parseSignedCompact(signature, nil, signatureAlgorithms)\n}\n\n// ParseSignedCompact parses a message in JWS Compact Serialization. Validation fails if the JWS is\n// signed with an algorithm that isn't in the provided list of signature algorithms. Applications\n// should decide for themselves which signature algorithms are acceptable.If you're not sure which\n// signature algorithms your application might receive, consult the documentation of the program\n// which provides them or the protocol that you are implementing. You can also try getting an\n// example JWS and decoding it with a tool like https://jwt.io to see what its \"alg\" header\n// parameter indicates. The signature on the JWS does not get validated during parsing. Call\n// Verify() after parsing to validate the signature and obtain the payload.\n//\n// https://datatracker.ietf.org/doc/html/rfc7515#section-7.1\nfunc ParseSignedCompact(\n\tsignature string,\n\tsignatureAlgorithms []SignatureAlgorithm,\n) (*JSONWebSignature, error) {\n\treturn parseSignedCompact(signature, nil, signatureAlgorithms)\n}\n\n// ParseDetached parses a signed message in compact serialization format with detached payload.\n// Validation fails if the JWS is signed with an algorithm that isn't in the provided list of\n// signature algorithms. Applications should decide for themselves which signature algorithms are\n// acceptable. If you're not sure which signature algorithms your application might receive, consult\n// the documentation of the program which provides them or the protocol that you are implementing.\n// You can also try getting an example JWS and decoding it with a tool like https://jwt.io to see\n// what its \"alg\" header parameter indicates. The signature on the JWS does not get validated during\n// parsing. Call Verify() after parsing to validate the signature and obtain the payload.\n//\n// https://datatracker.ietf.org/doc/html/rfc7515#appendix-F\nfunc ParseDetached(\n\tsignature string,\n\tpayload []byte,\n\tsignatureAlgorithms []SignatureAlgorithm,\n) (*JSONWebSignature, error) {\n\tif payload == nil {\n\t\treturn nil, errors.New(\"go-jose/go-jose: nil payload\")\n\t}\n\treturn parseSignedCompact(stripWhitespace(signature), payload, signatureAlgorithms)\n}\n\n// Get a header value\nfunc (sig Signature) mergedHeaders() rawHeader {\n\tout := rawHeader{}\n\tout.merge(sig.protected)\n\tout.merge(sig.header)\n\treturn out\n}\n\n// Compute data to be signed\nfunc (obj JSONWebSignature) computeAuthData(payload []byte, signature *Signature) ([]byte, error) {\n\tvar authData bytes.Buffer\n\n\tprotectedHeader := new(rawHeader)\n\n\tif signature.original != nil && signature.original.Protected != nil {\n\t\tif err := json.Unmarshal(signature.original.Protected.bytes(), protectedHeader); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tauthData.WriteString(signature.original.Protected.base64())\n\t} else if signature.protected != nil {\n\t\tprotectedHeader = signature.protected\n\t\tauthData.WriteString(base64.RawURLEncoding.EncodeToString(mustSerializeJSON(protectedHeader)))\n\t}\n\n\tneedsBase64 := true\n\n\tif protectedHeader != nil {\n\t\tvar err error\n\t\tif needsBase64, err = protectedHeader.getB64(); err != nil {\n\t\t\tneedsBase64 = true\n\t\t}\n\t}\n\n\tauthData.WriteByte('.')\n\n\tif needsBase64 {\n\t\tauthData.WriteString(base64.RawURLEncoding.EncodeToString(payload))\n\t} else {\n\t\tauthData.Write(payload)\n\t}\n\n\treturn authData.Bytes(), nil\n}\n\n// ParseSignedJSON parses a message in JWS JSON Serialization.\n//\n// https://datatracker.ietf.org/doc/html/rfc7515#section-7.2\nfunc ParseSignedJSON(\n\tinput string,\n\tsignatureAlgorithms []SignatureAlgorithm,\n) (*JSONWebSignature, error) {\n\tvar parsed rawJSONWebSignature\n\terr := json.Unmarshal([]byte(input), &parsed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn parsed.sanitized(signatureAlgorithms)\n}\n\nfunc containsSignatureAlgorithm(haystack []SignatureAlgorithm, needle SignatureAlgorithm) bool {\n\tfor _, algorithm := range haystack {\n\t\tif algorithm == needle {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// ErrUnexpectedSignatureAlgorithm is returned when the signature algorithm in\n// the JWS header does not match one of the expected algorithms.\ntype ErrUnexpectedSignatureAlgorithm struct {\n\t// Got is the signature algorithm found in the JWS header.\n\tGot      SignatureAlgorithm\n\texpected []SignatureAlgorithm\n}\n\nfunc (e *ErrUnexpectedSignatureAlgorithm) Error() string {\n\treturn fmt.Sprintf(\"unexpected signature algorithm %q; expected %q\", e.Got, e.expected)\n}\n\nfunc newErrUnexpectedSignatureAlgorithm(got SignatureAlgorithm, expected []SignatureAlgorithm) error {\n\treturn &ErrUnexpectedSignatureAlgorithm{\n\t\tGot:      got,\n\t\texpected: expected,\n\t}\n}\n\n// sanitized produces a cleaned-up JWS object from the raw JSON.\nfunc (parsed *rawJSONWebSignature) sanitized(signatureAlgorithms []SignatureAlgorithm) (*JSONWebSignature, error) {\n\tif len(signatureAlgorithms) == 0 {\n\t\treturn nil, errors.New(\"go-jose/go-jose: no signature algorithms specified\")\n\t}\n\tif parsed.Payload == nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: missing payload in JWS message\")\n\t}\n\n\tobj := &JSONWebSignature{\n\t\tpayload:    parsed.Payload.bytes(),\n\t\tSignatures: make([]Signature, len(parsed.Signatures)),\n\t}\n\n\tif len(parsed.Signatures) == 0 {\n\t\t// No signatures array, must be flattened serialization\n\t\tsignature := Signature{}\n\t\tif parsed.Protected != nil && len(parsed.Protected.bytes()) > 0 {\n\t\t\tsignature.protected = &rawHeader{}\n\t\t\terr := json.Unmarshal(parsed.Protected.bytes(), signature.protected)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\t// Check that there is not a nonce in the unprotected header\n\t\tif parsed.Header != nil && parsed.Header.getNonce() != \"\" {\n\t\t\treturn nil, ErrUnprotectedNonce\n\t\t}\n\n\t\tsignature.header = parsed.Header\n\t\tsignature.Signature = parsed.Signature.bytes()\n\t\t// Make a fake \"original\" rawSignatureInfo to store the unprocessed\n\t\t// Protected header. This is necessary because the Protected header can\n\t\t// contain arbitrary fields not registered as part of the spec. See\n\t\t// https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4\n\t\t// If we unmarshal Protected into a rawHeader with its explicit list of fields,\n\t\t// we cannot marshal losslessly. So we have to keep around the original bytes.\n\t\t// This is used in computeAuthData, which will first attempt to use\n\t\t// the original bytes of a protected header, and fall back on marshaling the\n\t\t// header struct only if those bytes are not available.\n\t\tsignature.original = &rawSignatureInfo{\n\t\t\tProtected: parsed.Protected,\n\t\t\tHeader:    parsed.Header,\n\t\t\tSignature: parsed.Signature,\n\t\t}\n\n\t\tvar err error\n\t\tsignature.Header, err = signature.mergedHeaders().sanitized()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\talg := SignatureAlgorithm(signature.Header.Algorithm)\n\t\tif !containsSignatureAlgorithm(signatureAlgorithms, alg) {\n\t\t\treturn nil, newErrUnexpectedSignatureAlgorithm(alg, signatureAlgorithms)\n\t\t}\n\n\t\tif signature.header != nil {\n\t\t\tsignature.Unprotected, err = signature.header.sanitized()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tif signature.protected != nil {\n\t\t\tsignature.Protected, err = signature.protected.sanitized()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\t// As per RFC 7515 Section 4.1.3, only public keys are allowed to be embedded.\n\t\tjwk := signature.Header.JSONWebKey\n\t\tif jwk != nil && (!jwk.Valid() || !jwk.IsPublic()) {\n\t\t\treturn nil, errors.New(\"go-jose/go-jose: invalid embedded jwk, must be public key\")\n\t\t}\n\n\t\tobj.Signatures = append(obj.Signatures, signature)\n\t}\n\n\tfor i, sig := range parsed.Signatures {\n\t\tif sig.Protected != nil && len(sig.Protected.bytes()) > 0 {\n\t\t\tobj.Signatures[i].protected = &rawHeader{}\n\t\t\terr := json.Unmarshal(sig.Protected.bytes(), obj.Signatures[i].protected)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\t// Check that there is not a nonce in the unprotected header\n\t\tif sig.Header != nil && sig.Header.getNonce() != \"\" {\n\t\t\treturn nil, ErrUnprotectedNonce\n\t\t}\n\n\t\tvar err error\n\t\tobj.Signatures[i].Header, err = obj.Signatures[i].mergedHeaders().sanitized()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\talg := SignatureAlgorithm(obj.Signatures[i].Header.Algorithm)\n\t\tif !containsSignatureAlgorithm(signatureAlgorithms, alg) {\n\t\t\treturn nil, newErrUnexpectedSignatureAlgorithm(alg, signatureAlgorithms)\n\t\t}\n\n\t\tif obj.Signatures[i].header != nil {\n\t\t\tobj.Signatures[i].Unprotected, err = obj.Signatures[i].header.sanitized()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tif obj.Signatures[i].protected != nil {\n\t\t\tobj.Signatures[i].Protected, err = obj.Signatures[i].protected.sanitized()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tobj.Signatures[i].Signature = sig.Signature.bytes()\n\n\t\t// As per RFC 7515 Section 4.1.3, only public keys are allowed to be embedded.\n\t\tjwk := obj.Signatures[i].Header.JSONWebKey\n\t\tif jwk != nil && (!jwk.Valid() || !jwk.IsPublic()) {\n\t\t\treturn nil, errors.New(\"go-jose/go-jose: invalid embedded jwk, must be public key\")\n\t\t}\n\n\t\t// Copy value of sig\n\t\toriginal := sig\n\n\t\tobj.Signatures[i].header = sig.Header\n\t\tobj.Signatures[i].original = &original\n\t}\n\n\treturn obj, nil\n}\n\nconst tokenDelim = \".\"\n\n// parseSignedCompact parses a message in compact format.\nfunc parseSignedCompact(\n\tinput string,\n\tpayload []byte,\n\tsignatureAlgorithms []SignatureAlgorithm,\n) (*JSONWebSignature, error) {\n\tprotected, s, ok := strings.Cut(input, tokenDelim)\n\tif !ok { // no period found\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: compact JWS format must have three parts\")\n\t}\n\tclaims, sig, ok := strings.Cut(s, tokenDelim)\n\tif !ok { // only one period found\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: compact JWS format must have three parts\")\n\t}\n\tif strings.ContainsRune(sig, '.') { // too many periods found\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: compact JWS format must have three parts\")\n\t}\n\n\tif claims != \"\" && payload != nil {\n\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: payload is not detached\")\n\t}\n\n\trawProtected, err := base64.RawURLEncoding.DecodeString(protected)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif payload == nil {\n\t\tpayload, err = base64.RawURLEncoding.DecodeString(claims)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tsignature, err := base64.RawURLEncoding.DecodeString(sig)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\traw := &rawJSONWebSignature{\n\t\tPayload:   newBuffer(payload),\n\t\tProtected: newBuffer(rawProtected),\n\t\tSignature: newBuffer(signature),\n\t}\n\treturn raw.sanitized(signatureAlgorithms)\n}\n\nfunc (obj JSONWebSignature) compactSerialize(detached bool) (string, error) {\n\tif len(obj.Signatures) != 1 || obj.Signatures[0].header != nil || obj.Signatures[0].protected == nil {\n\t\treturn \"\", ErrNotSupported\n\t}\n\n\tserializedProtected := mustSerializeJSON(obj.Signatures[0].protected)\n\n\tvar payload []byte\n\tif !detached {\n\t\tpayload = obj.payload\n\t}\n\n\treturn base64JoinWithDots(\n\t\tserializedProtected,\n\t\tpayload,\n\t\tobj.Signatures[0].Signature,\n\t), nil\n}\n\n// CompactSerialize serializes an object using the compact serialization format.\nfunc (obj JSONWebSignature) CompactSerialize() (string, error) {\n\treturn obj.compactSerialize(false)\n}\n\n// DetachedCompactSerialize serializes an object using the compact serialization format with detached payload.\nfunc (obj JSONWebSignature) DetachedCompactSerialize() (string, error) {\n\treturn obj.compactSerialize(true)\n}\n\n// FullSerialize serializes an object using the full JSON serialization format.\nfunc (obj JSONWebSignature) FullSerialize() string {\n\traw := rawJSONWebSignature{\n\t\tPayload: newBuffer(obj.payload),\n\t}\n\n\tif len(obj.Signatures) == 1 {\n\t\tif obj.Signatures[0].protected != nil {\n\t\t\tserializedProtected := mustSerializeJSON(obj.Signatures[0].protected)\n\t\t\traw.Protected = newBuffer(serializedProtected)\n\t\t}\n\t\traw.Header = obj.Signatures[0].header\n\t\traw.Signature = newBuffer(obj.Signatures[0].Signature)\n\t} else {\n\t\traw.Signatures = make([]rawSignatureInfo, len(obj.Signatures))\n\t\tfor i, signature := range obj.Signatures {\n\t\t\traw.Signatures[i] = rawSignatureInfo{\n\t\t\t\tHeader:    signature.header,\n\t\t\t\tSignature: newBuffer(signature.Signature),\n\t\t\t}\n\n\t\t\tif signature.protected != nil {\n\t\t\t\traw.Signatures[i].Protected = newBuffer(mustSerializeJSON(signature.protected))\n\t\t\t}\n\t\t}\n\t}\n\n\treturn string(mustSerializeJSON(raw))\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/opaque.go",
    "content": "/*-\n * Copyright 2018 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\n// OpaqueSigner is an interface that supports signing payloads with opaque\n// private key(s). Private key operations performed by implementers may, for\n// example, occur in a hardware module. An OpaqueSigner may rotate signing keys\n// transparently to the user of this interface.\ntype OpaqueSigner interface {\n\t// Public returns the public key of the current signing key.\n\tPublic() *JSONWebKey\n\t// Algs returns a list of supported signing algorithms.\n\tAlgs() []SignatureAlgorithm\n\t// SignPayload signs a payload with the current signing key using the given\n\t// algorithm.\n\tSignPayload(payload []byte, alg SignatureAlgorithm) ([]byte, error)\n}\n\ntype opaqueSigner struct {\n\tsigner OpaqueSigner\n}\n\nfunc newOpaqueSigner(alg SignatureAlgorithm, signer OpaqueSigner) (recipientSigInfo, error) {\n\tvar algSupported bool\n\tfor _, salg := range signer.Algs() {\n\t\tif alg == salg {\n\t\t\talgSupported = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !algSupported {\n\t\treturn recipientSigInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\treturn recipientSigInfo{\n\t\tsigAlg:    alg,\n\t\tpublicKey: signer.Public,\n\t\tsigner: &opaqueSigner{\n\t\t\tsigner: signer,\n\t\t},\n\t}, nil\n}\n\nfunc (o *opaqueSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {\n\tout, err := o.signer.SignPayload(payload, alg)\n\tif err != nil {\n\t\treturn Signature{}, err\n\t}\n\n\treturn Signature{\n\t\tSignature: out,\n\t\tprotected: &rawHeader{},\n\t}, nil\n}\n\n// OpaqueVerifier is an interface that supports verifying payloads with opaque\n// public key(s). An OpaqueSigner may rotate signing keys transparently to the\n// user of this interface.\ntype OpaqueVerifier interface {\n\tVerifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error\n}\n\ntype opaqueVerifier struct {\n\tverifier OpaqueVerifier\n}\n\nfunc (o *opaqueVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {\n\treturn o.verifier.VerifyPayload(payload, signature, alg)\n}\n\n// OpaqueKeyEncrypter is an interface that supports encrypting keys with an opaque key.\n//\n// Note: this cannot currently be implemented outside this package because of its\n// unexported method.\ntype OpaqueKeyEncrypter interface {\n\t// KeyID returns the kid\n\tKeyID() string\n\t// Algs returns a list of supported key encryption algorithms.\n\tAlgs() []KeyAlgorithm\n\t// encryptKey encrypts the CEK using the given algorithm.\n\tencryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error)\n}\n\ntype opaqueKeyEncrypter struct {\n\tencrypter OpaqueKeyEncrypter\n}\n\nfunc newOpaqueKeyEncrypter(alg KeyAlgorithm, encrypter OpaqueKeyEncrypter) (recipientKeyInfo, error) {\n\tvar algSupported bool\n\tfor _, salg := range encrypter.Algs() {\n\t\tif alg == salg {\n\t\t\talgSupported = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !algSupported {\n\t\treturn recipientKeyInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\treturn recipientKeyInfo{\n\t\tkeyID:  encrypter.KeyID(),\n\t\tkeyAlg: alg,\n\t\tkeyEncrypter: &opaqueKeyEncrypter{\n\t\t\tencrypter: encrypter,\n\t\t},\n\t}, nil\n}\n\nfunc (oke *opaqueKeyEncrypter) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {\n\treturn oke.encrypter.encryptKey(cek, alg)\n}\n\n// OpaqueKeyDecrypter is an interface that supports decrypting keys with an opaque key.\ntype OpaqueKeyDecrypter interface {\n\tDecryptKey(encryptedKey []byte, header Header) ([]byte, error)\n}\n\ntype opaqueKeyDecrypter struct {\n\tdecrypter OpaqueKeyDecrypter\n}\n\nfunc (okd *opaqueKeyDecrypter) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {\n\tmergedHeaders := rawHeader{}\n\tmergedHeaders.merge(&headers)\n\tmergedHeaders.merge(recipient.header)\n\n\theader, err := mergedHeaders.sanitized()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn okd.decrypter.DecryptKey(recipient.encryptedKey, header)\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/shared.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"crypto/elliptic\"\n\t\"crypto/x509\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// KeyAlgorithm represents a key management algorithm.\ntype KeyAlgorithm string\n\n// SignatureAlgorithm represents a signature (or MAC) algorithm.\ntype SignatureAlgorithm string\n\n// ContentEncryption represents a content encryption algorithm.\ntype ContentEncryption string\n\n// CompressionAlgorithm represents an algorithm used for plaintext compression.\ntype CompressionAlgorithm string\n\n// ContentType represents type of the contained data.\ntype ContentType string\n\nvar (\n\t// ErrCryptoFailure represents an error in cryptographic primitive. This\n\t// occurs when, for example, a message had an invalid authentication tag or\n\t// could not be decrypted.\n\tErrCryptoFailure = errors.New(\"go-jose/go-jose: error in cryptographic primitive\")\n\n\t// ErrUnsupportedAlgorithm indicates that a selected algorithm is not\n\t// supported. This occurs when trying to instantiate an encrypter for an\n\t// algorithm that is not yet implemented.\n\tErrUnsupportedAlgorithm = errors.New(\"go-jose/go-jose: unknown/unsupported algorithm\")\n\n\t// ErrUnsupportedKeyType indicates that the given key type/format is not\n\t// supported. This occurs when trying to instantiate an encrypter and passing\n\t// it a key of an unrecognized type or with unsupported parameters, such as\n\t// an RSA private key with more than two primes.\n\tErrUnsupportedKeyType = errors.New(\"go-jose/go-jose: unsupported key type/format\")\n\n\t// ErrInvalidKeySize indicates that the given key is not the correct size\n\t// for the selected algorithm. This can occur, for example, when trying to\n\t// encrypt with AES-256 but passing only a 128-bit key as input.\n\tErrInvalidKeySize = errors.New(\"go-jose/go-jose: invalid key size for algorithm\")\n\n\t// ErrNotSupported serialization of object is not supported. This occurs when\n\t// trying to compact-serialize an object which can't be represented in\n\t// compact form.\n\tErrNotSupported = errors.New(\"go-jose/go-jose: compact serialization not supported for object\")\n\n\t// ErrUnprotectedNonce indicates that while parsing a JWS or JWE object, a\n\t// nonce header parameter was included in an unprotected header object.\n\tErrUnprotectedNonce = errors.New(\"go-jose/go-jose: Nonce parameter included in unprotected header\")\n\n\t// ErrMissingX5cHeader indicates that the JWT header is missing x5c headers.\n\tErrMissingX5cHeader = errors.New(\"go-jose/go-jose: no x5c header present in message\")\n\n\t// ErrUnsupportedEllipticCurve indicates unsupported or unknown elliptic curve has been found.\n\tErrUnsupportedEllipticCurve = errors.New(\"go-jose/go-jose: unsupported/unknown elliptic curve\")\n\n\t// ErrUnsupportedCriticalHeader is returned when a header is marked critical but not supported by go-jose.\n\tErrUnsupportedCriticalHeader = errors.New(\"go-jose/go-jose: unsupported critical header\")\n)\n\n// Key management algorithms\nconst (\n\tED25519            = KeyAlgorithm(\"ED25519\")\n\tRSA1_5             = KeyAlgorithm(\"RSA1_5\")             // RSA-PKCS1v1.5\n\tRSA_OAEP           = KeyAlgorithm(\"RSA-OAEP\")           // RSA-OAEP-SHA1\n\tRSA_OAEP_256       = KeyAlgorithm(\"RSA-OAEP-256\")       // RSA-OAEP-SHA256\n\tA128KW             = KeyAlgorithm(\"A128KW\")             // AES key wrap (128)\n\tA192KW             = KeyAlgorithm(\"A192KW\")             // AES key wrap (192)\n\tA256KW             = KeyAlgorithm(\"A256KW\")             // AES key wrap (256)\n\tDIRECT             = KeyAlgorithm(\"dir\")                // Direct encryption\n\tECDH_ES            = KeyAlgorithm(\"ECDH-ES\")            // ECDH-ES\n\tECDH_ES_A128KW     = KeyAlgorithm(\"ECDH-ES+A128KW\")     // ECDH-ES + AES key wrap (128)\n\tECDH_ES_A192KW     = KeyAlgorithm(\"ECDH-ES+A192KW\")     // ECDH-ES + AES key wrap (192)\n\tECDH_ES_A256KW     = KeyAlgorithm(\"ECDH-ES+A256KW\")     // ECDH-ES + AES key wrap (256)\n\tA128GCMKW          = KeyAlgorithm(\"A128GCMKW\")          // AES-GCM key wrap (128)\n\tA192GCMKW          = KeyAlgorithm(\"A192GCMKW\")          // AES-GCM key wrap (192)\n\tA256GCMKW          = KeyAlgorithm(\"A256GCMKW\")          // AES-GCM key wrap (256)\n\tPBES2_HS256_A128KW = KeyAlgorithm(\"PBES2-HS256+A128KW\") // PBES2 + HMAC-SHA256 + AES key wrap (128)\n\tPBES2_HS384_A192KW = KeyAlgorithm(\"PBES2-HS384+A192KW\") // PBES2 + HMAC-SHA384 + AES key wrap (192)\n\tPBES2_HS512_A256KW = KeyAlgorithm(\"PBES2-HS512+A256KW\") // PBES2 + HMAC-SHA512 + AES key wrap (256)\n)\n\n// Signature algorithms\nconst (\n\tEdDSA = SignatureAlgorithm(\"EdDSA\")\n\tHS256 = SignatureAlgorithm(\"HS256\") // HMAC using SHA-256\n\tHS384 = SignatureAlgorithm(\"HS384\") // HMAC using SHA-384\n\tHS512 = SignatureAlgorithm(\"HS512\") // HMAC using SHA-512\n\tRS256 = SignatureAlgorithm(\"RS256\") // RSASSA-PKCS-v1.5 using SHA-256\n\tRS384 = SignatureAlgorithm(\"RS384\") // RSASSA-PKCS-v1.5 using SHA-384\n\tRS512 = SignatureAlgorithm(\"RS512\") // RSASSA-PKCS-v1.5 using SHA-512\n\tES256 = SignatureAlgorithm(\"ES256\") // ECDSA using P-256 and SHA-256\n\tES384 = SignatureAlgorithm(\"ES384\") // ECDSA using P-384 and SHA-384\n\tES512 = SignatureAlgorithm(\"ES512\") // ECDSA using P-521 and SHA-512\n\tPS256 = SignatureAlgorithm(\"PS256\") // RSASSA-PSS using SHA256 and MGF1-SHA256\n\tPS384 = SignatureAlgorithm(\"PS384\") // RSASSA-PSS using SHA384 and MGF1-SHA384\n\tPS512 = SignatureAlgorithm(\"PS512\") // RSASSA-PSS using SHA512 and MGF1-SHA512\n)\n\n// Content encryption algorithms\nconst (\n\tA128CBC_HS256 = ContentEncryption(\"A128CBC-HS256\") // AES-CBC + HMAC-SHA256 (128)\n\tA192CBC_HS384 = ContentEncryption(\"A192CBC-HS384\") // AES-CBC + HMAC-SHA384 (192)\n\tA256CBC_HS512 = ContentEncryption(\"A256CBC-HS512\") // AES-CBC + HMAC-SHA512 (256)\n\tA128GCM       = ContentEncryption(\"A128GCM\")       // AES-GCM (128)\n\tA192GCM       = ContentEncryption(\"A192GCM\")       // AES-GCM (192)\n\tA256GCM       = ContentEncryption(\"A256GCM\")       // AES-GCM (256)\n)\n\n// Compression algorithms\nconst (\n\tNONE    = CompressionAlgorithm(\"\")    // No compression\n\tDEFLATE = CompressionAlgorithm(\"DEF\") // DEFLATE (RFC 1951)\n)\n\n// A key in the protected header of a JWS object. Use of the Header...\n// constants is preferred to enhance type safety.\ntype HeaderKey string\n\nconst (\n\tHeaderType        = \"typ\" // string\n\tHeaderContentType = \"cty\" // string\n\n\t// These are set by go-jose and shouldn't need to be set by consumers of the\n\t// library.\n\theaderAlgorithm   = \"alg\"  // string\n\theaderEncryption  = \"enc\"  // ContentEncryption\n\theaderCompression = \"zip\"  // CompressionAlgorithm\n\theaderCritical    = \"crit\" // []string\n\n\theaderAPU = \"apu\" // *byteBuffer\n\theaderAPV = \"apv\" // *byteBuffer\n\theaderEPK = \"epk\" // *JSONWebKey\n\theaderIV  = \"iv\"  // *byteBuffer\n\theaderTag = \"tag\" // *byteBuffer\n\theaderX5c = \"x5c\" // []*x509.Certificate\n\n\theaderJWK   = \"jwk\"   // *JSONWebKey\n\theaderKeyID = \"kid\"   // string\n\theaderNonce = \"nonce\" // string\n\theaderB64   = \"b64\"   // bool\n\n\theaderP2C = \"p2c\" // *byteBuffer (int)\n\theaderP2S = \"p2s\" // *byteBuffer ([]byte)\n\n)\n\n// supportedCritical is the set of supported extensions that are understood and processed.\nvar supportedCritical = map[string]struct{}{\n\theaderB64: {},\n}\n\n// rawHeader represents the JOSE header for JWE/JWS objects (used for parsing).\n//\n// The decoding of the constituent items is deferred because we want to marshal\n// some members into particular structs rather than generic maps, but at the\n// same time we need to receive any extra fields unhandled by this library to\n// pass through to consuming code in case it wants to examine them.\ntype rawHeader map[HeaderKey]*json.RawMessage\n\n// Header represents the read-only JOSE header for JWE/JWS objects.\ntype Header struct {\n\tKeyID      string\n\tJSONWebKey *JSONWebKey\n\tAlgorithm  string\n\tNonce      string\n\n\t// Unverified certificate chain parsed from x5c header.\n\tcertificates []*x509.Certificate\n\n\t// At parse time, each header parameter with a name other than \"kid\",\n\t// \"jwk\", \"alg\", \"nonce\", or \"x5c\"  will have its value passed to\n\t// [json.Unmarshal] to unmarshal it into an interface value.\n\t// The resulting value will be stored in this map, with the header\n\t// parameter name as the key.\n\t//\n\t// [json.Unmarshal]: https://pkg.go.dev/encoding/json#Unmarshal\n\tExtraHeaders map[HeaderKey]interface{}\n}\n\n// Certificates verifies & returns the certificate chain present\n// in the x5c header field of a message, if one was present. Returns\n// an error if there was no x5c header present or the chain could\n// not be validated with the given verify options.\nfunc (h Header) Certificates(opts x509.VerifyOptions) ([][]*x509.Certificate, error) {\n\tif len(h.certificates) == 0 {\n\t\treturn nil, ErrMissingX5cHeader\n\t}\n\n\tleaf := h.certificates[0]\n\tif opts.Intermediates == nil {\n\t\topts.Intermediates = x509.NewCertPool()\n\t\tfor _, intermediate := range h.certificates[1:] {\n\t\t\topts.Intermediates.AddCert(intermediate)\n\t\t}\n\t}\n\n\treturn leaf.Verify(opts)\n}\n\nfunc (parsed rawHeader) set(k HeaderKey, v interface{}) error {\n\tb, err := json.Marshal(v)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tparsed[k] = makeRawMessage(b)\n\treturn nil\n}\n\n// getString gets a string from the raw JSON, defaulting to \"\".\nfunc (parsed rawHeader) getString(k HeaderKey) string {\n\tv, ok := parsed[k]\n\tif !ok || v == nil {\n\t\treturn \"\"\n\t}\n\tvar s string\n\terr := json.Unmarshal(*v, &s)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn s\n}\n\n// getByteBuffer gets a byte buffer from the raw JSON. Returns (nil, nil) if\n// not specified.\nfunc (parsed rawHeader) getByteBuffer(k HeaderKey) (*byteBuffer, error) {\n\tv := parsed[k]\n\tif v == nil {\n\t\treturn nil, nil\n\t}\n\tvar bb *byteBuffer\n\terr := json.Unmarshal(*v, &bb)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn bb, nil\n}\n\n// getAlgorithm extracts parsed \"alg\" from the raw JSON as a KeyAlgorithm.\nfunc (parsed rawHeader) getAlgorithm() KeyAlgorithm {\n\treturn KeyAlgorithm(parsed.getString(headerAlgorithm))\n}\n\n// getSignatureAlgorithm extracts parsed \"alg\" from the raw JSON as a SignatureAlgorithm.\nfunc (parsed rawHeader) getSignatureAlgorithm() SignatureAlgorithm {\n\treturn SignatureAlgorithm(parsed.getString(headerAlgorithm))\n}\n\n// getEncryption extracts parsed \"enc\" from the raw JSON.\nfunc (parsed rawHeader) getEncryption() ContentEncryption {\n\treturn ContentEncryption(parsed.getString(headerEncryption))\n}\n\n// getCompression extracts parsed \"zip\" from the raw JSON.\nfunc (parsed rawHeader) getCompression() CompressionAlgorithm {\n\treturn CompressionAlgorithm(parsed.getString(headerCompression))\n}\n\nfunc (parsed rawHeader) getNonce() string {\n\treturn parsed.getString(headerNonce)\n}\n\n// getEPK extracts parsed \"epk\" from the raw JSON.\nfunc (parsed rawHeader) getEPK() (*JSONWebKey, error) {\n\tv := parsed[headerEPK]\n\tif v == nil {\n\t\treturn nil, nil\n\t}\n\tvar epk *JSONWebKey\n\terr := json.Unmarshal(*v, &epk)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn epk, nil\n}\n\n// getAPU extracts parsed \"apu\" from the raw JSON.\nfunc (parsed rawHeader) getAPU() (*byteBuffer, error) {\n\treturn parsed.getByteBuffer(headerAPU)\n}\n\n// getAPV extracts parsed \"apv\" from the raw JSON.\nfunc (parsed rawHeader) getAPV() (*byteBuffer, error) {\n\treturn parsed.getByteBuffer(headerAPV)\n}\n\n// getIV extracts parsed \"iv\" from the raw JSON.\nfunc (parsed rawHeader) getIV() (*byteBuffer, error) {\n\treturn parsed.getByteBuffer(headerIV)\n}\n\n// getTag extracts parsed \"tag\" from the raw JSON.\nfunc (parsed rawHeader) getTag() (*byteBuffer, error) {\n\treturn parsed.getByteBuffer(headerTag)\n}\n\n// getJWK extracts parsed \"jwk\" from the raw JSON.\nfunc (parsed rawHeader) getJWK() (*JSONWebKey, error) {\n\tv := parsed[headerJWK]\n\tif v == nil {\n\t\treturn nil, nil\n\t}\n\tvar jwk *JSONWebKey\n\terr := json.Unmarshal(*v, &jwk)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn jwk, nil\n}\n\n// getCritical extracts parsed \"crit\" from the raw JSON. If omitted, it\n// returns an empty slice.\nfunc (parsed rawHeader) getCritical() ([]string, error) {\n\tv := parsed[headerCritical]\n\tif v == nil {\n\t\treturn nil, nil\n\t}\n\n\tvar q []string\n\terr := json.Unmarshal(*v, &q)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn q, nil\n}\n\n// checkNoCritical verifies there are no critical headers present.\nfunc (parsed rawHeader) checkNoCritical() error {\n\tif _, ok := parsed[headerCritical]; ok {\n\t\treturn ErrUnsupportedCriticalHeader\n\t}\n\n\treturn nil\n}\n\n// checkSupportedCritical verifies there are no unsupported critical headers.\n// Supported headers are passed in as a set: map of names to empty structs\nfunc (parsed rawHeader) checkSupportedCritical(supported map[string]struct{}) error {\n\tcrit, err := parsed.getCritical()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, name := range crit {\n\t\tif _, ok := supported[name]; !ok {\n\t\t\treturn ErrUnsupportedCriticalHeader\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// getS2C extracts parsed \"p2c\" from the raw JSON.\nfunc (parsed rawHeader) getP2C() (int, error) {\n\tv := parsed[headerP2C]\n\tif v == nil {\n\t\treturn 0, nil\n\t}\n\n\tvar p2c int\n\terr := json.Unmarshal(*v, &p2c)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn p2c, nil\n}\n\n// getS2S extracts parsed \"p2s\" from the raw JSON.\nfunc (parsed rawHeader) getP2S() (*byteBuffer, error) {\n\treturn parsed.getByteBuffer(headerP2S)\n}\n\n// getB64 extracts parsed \"b64\" from the raw JSON, defaulting to true.\nfunc (parsed rawHeader) getB64() (bool, error) {\n\tv := parsed[headerB64]\n\tif v == nil {\n\t\treturn true, nil\n\t}\n\n\tvar b64 bool\n\terr := json.Unmarshal(*v, &b64)\n\tif err != nil {\n\t\treturn true, err\n\t}\n\treturn b64, nil\n}\n\n// sanitized produces a cleaned-up header object from the raw JSON.\nfunc (parsed rawHeader) sanitized() (h Header, err error) {\n\tfor k, v := range parsed {\n\t\tif v == nil {\n\t\t\tcontinue\n\t\t}\n\t\tswitch k {\n\t\tcase headerJWK:\n\t\t\tvar jwk *JSONWebKey\n\t\t\terr = json.Unmarshal(*v, &jwk)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal JWK: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.JSONWebKey = jwk\n\t\tcase headerKeyID:\n\t\t\tvar s string\n\t\t\terr = json.Unmarshal(*v, &s)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal key ID: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.KeyID = s\n\t\tcase headerAlgorithm:\n\t\t\tvar s string\n\t\t\terr = json.Unmarshal(*v, &s)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal algorithm: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.Algorithm = s\n\t\tcase headerNonce:\n\t\t\tvar s string\n\t\t\terr = json.Unmarshal(*v, &s)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal nonce: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.Nonce = s\n\t\tcase headerX5c:\n\t\t\tc := []string{}\n\t\t\terr = json.Unmarshal(*v, &c)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal x5c header: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.certificates, err = parseCertificateChain(c)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal x5c header: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\tdefault:\n\t\t\tif h.ExtraHeaders == nil {\n\t\t\t\th.ExtraHeaders = map[HeaderKey]interface{}{}\n\t\t\t}\n\t\t\tvar v2 interface{}\n\t\t\terr = json.Unmarshal(*v, &v2)\n\t\t\tif err != nil {\n\t\t\t\terr = fmt.Errorf(\"failed to unmarshal value: %v: %#v\", err, string(*v))\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.ExtraHeaders[k] = v2\n\t\t}\n\t}\n\treturn\n}\n\nfunc parseCertificateChain(chain []string) ([]*x509.Certificate, error) {\n\tout := make([]*x509.Certificate, len(chain))\n\tfor i, cert := range chain {\n\t\traw, err := base64.StdEncoding.DecodeString(cert)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tout[i], err = x509.ParseCertificate(raw)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn out, nil\n}\n\nfunc (parsed rawHeader) isSet(k HeaderKey) bool {\n\tdvr := parsed[k]\n\tif dvr == nil {\n\t\treturn false\n\t}\n\n\tvar dv interface{}\n\terr := json.Unmarshal(*dvr, &dv)\n\tif err != nil {\n\t\treturn true\n\t}\n\n\tif dvStr, ok := dv.(string); ok {\n\t\treturn dvStr != \"\"\n\t}\n\n\treturn true\n}\n\n// Merge headers from src into dst, giving precedence to headers from l.\nfunc (parsed rawHeader) merge(src *rawHeader) {\n\tif src == nil {\n\t\treturn\n\t}\n\n\tfor k, v := range *src {\n\t\tif parsed.isSet(k) {\n\t\t\tcontinue\n\t\t}\n\n\t\tparsed[k] = v\n\t}\n}\n\n// Get JOSE name of curve\nfunc curveName(crv elliptic.Curve) (string, error) {\n\tswitch crv {\n\tcase elliptic.P256():\n\t\treturn \"P-256\", nil\n\tcase elliptic.P384():\n\t\treturn \"P-384\", nil\n\tcase elliptic.P521():\n\t\treturn \"P-521\", nil\n\tdefault:\n\t\treturn \"\", ErrUnsupportedEllipticCurve\n\t}\n}\n\n// Get size of curve in bytes\nfunc curveSize(crv elliptic.Curve) int {\n\tbits := crv.Params().BitSize\n\n\tdiv := bits / 8\n\tmod := bits % 8\n\n\tif mod == 0 {\n\t\treturn div\n\t}\n\n\treturn div + 1\n}\n\nfunc makeRawMessage(b []byte) *json.RawMessage {\n\trm := json.RawMessage(b)\n\treturn &rm\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/signing.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"bytes\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/go-jose/go-jose/v4/json\"\n)\n\n// NonceSource represents a source of random nonces to go into JWS objects\ntype NonceSource interface {\n\tNonce() (string, error)\n}\n\n// Signer represents a signer which takes a payload and produces a signed JWS object.\ntype Signer interface {\n\tSign(payload []byte) (*JSONWebSignature, error)\n\tOptions() SignerOptions\n}\n\n// SigningKey represents an algorithm/key used to sign a message.\n//\n// Key must have one of these types:\n//   - ed25519.PrivateKey\n//   - *ecdsa.PrivateKey\n//   - *rsa.PrivateKey\n//   - *JSONWebKey\n//   - JSONWebKey\n//   - []byte (an HMAC key)\n//   - Any type that satisfies the OpaqueSigner interface\n//\n// If the key is an HMAC key, it must have at least as many bytes as the relevant hash output:\n//   - HS256: 32 bytes\n//   - HS384: 48 bytes\n//   - HS512: 64 bytes\ntype SigningKey struct {\n\tAlgorithm SignatureAlgorithm\n\tKey       interface{}\n}\n\n// SignerOptions represents options that can be set when creating signers.\ntype SignerOptions struct {\n\tNonceSource NonceSource\n\tEmbedJWK    bool\n\n\t// Optional map of additional keys to be inserted into the protected header\n\t// of a JWS object. Some specifications which make use of JWS like to insert\n\t// additional values here.\n\t//\n\t// Values will be serialized by [json.Marshal] and must be valid inputs to\n\t// that function.\n\t//\n\t// [json.Marshal]: https://pkg.go.dev/encoding/json#Marshal\n\tExtraHeaders map[HeaderKey]interface{}\n}\n\n// WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it\n// if necessary, and returns the updated SignerOptions.\n//\n// The v argument will be serialized by [json.Marshal] and must be a valid\n// input to that function.\n//\n// [json.Marshal]: https://pkg.go.dev/encoding/json#Marshal\nfunc (so *SignerOptions) WithHeader(k HeaderKey, v interface{}) *SignerOptions {\n\tif so.ExtraHeaders == nil {\n\t\tso.ExtraHeaders = map[HeaderKey]interface{}{}\n\t}\n\tso.ExtraHeaders[k] = v\n\treturn so\n}\n\n// WithContentType adds a content type (\"cty\") header and returns the updated\n// SignerOptions.\nfunc (so *SignerOptions) WithContentType(contentType ContentType) *SignerOptions {\n\treturn so.WithHeader(HeaderContentType, contentType)\n}\n\n// WithType adds a type (\"typ\") header and returns the updated SignerOptions.\nfunc (so *SignerOptions) WithType(typ ContentType) *SignerOptions {\n\treturn so.WithHeader(HeaderType, typ)\n}\n\n// WithCritical adds the given names to the critical (\"crit\") header and returns\n// the updated SignerOptions.\nfunc (so *SignerOptions) WithCritical(names ...string) *SignerOptions {\n\tif so.ExtraHeaders[headerCritical] == nil {\n\t\tso.WithHeader(headerCritical, make([]string, 0, len(names)))\n\t}\n\tcrit := so.ExtraHeaders[headerCritical].([]string)\n\tso.ExtraHeaders[headerCritical] = append(crit, names...)\n\treturn so\n}\n\n// WithBase64 adds a base64url-encode payload (\"b64\") header and returns the updated\n// SignerOptions. When the \"b64\" value is \"false\", the payload is not base64 encoded.\nfunc (so *SignerOptions) WithBase64(b64 bool) *SignerOptions {\n\tif !b64 {\n\t\tso.WithHeader(headerB64, b64)\n\t\tso.WithCritical(headerB64)\n\t}\n\treturn so\n}\n\ntype payloadSigner interface {\n\tsignPayload(payload []byte, alg SignatureAlgorithm) (Signature, error)\n}\n\ntype payloadVerifier interface {\n\tverifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error\n}\n\ntype genericSigner struct {\n\trecipients   []recipientSigInfo\n\tnonceSource  NonceSource\n\tembedJWK     bool\n\textraHeaders map[HeaderKey]interface{}\n}\n\ntype recipientSigInfo struct {\n\tsigAlg    SignatureAlgorithm\n\tpublicKey func() *JSONWebKey\n\tsigner    payloadSigner\n}\n\nfunc staticPublicKey(jwk *JSONWebKey) func() *JSONWebKey {\n\treturn func() *JSONWebKey {\n\t\treturn jwk\n\t}\n}\n\n// NewSigner creates an appropriate signer based on the key type\nfunc NewSigner(sig SigningKey, opts *SignerOptions) (Signer, error) {\n\treturn NewMultiSigner([]SigningKey{sig}, opts)\n}\n\n// NewMultiSigner creates a signer for multiple recipients\nfunc NewMultiSigner(sigs []SigningKey, opts *SignerOptions) (Signer, error) {\n\tsigner := &genericSigner{recipients: []recipientSigInfo{}}\n\n\tif opts != nil {\n\t\tsigner.nonceSource = opts.NonceSource\n\t\tsigner.embedJWK = opts.EmbedJWK\n\t\tsigner.extraHeaders = opts.ExtraHeaders\n\t}\n\n\tfor _, sig := range sigs {\n\t\terr := signer.addRecipient(sig.Algorithm, sig.Key)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn signer, nil\n}\n\n// newVerifier creates a verifier based on the key type\nfunc newVerifier(verificationKey interface{}) (payloadVerifier, error) {\n\tswitch verificationKey := verificationKey.(type) {\n\tcase ed25519.PublicKey:\n\t\treturn &edEncrypterVerifier{\n\t\t\tpublicKey: verificationKey,\n\t\t}, nil\n\tcase *rsa.PublicKey:\n\t\treturn &rsaEncrypterVerifier{\n\t\t\tpublicKey: verificationKey,\n\t\t}, nil\n\tcase *ecdsa.PublicKey:\n\t\treturn &ecEncrypterVerifier{\n\t\t\tpublicKey: verificationKey,\n\t\t}, nil\n\tcase []byte:\n\t\treturn &symmetricMac{\n\t\t\tkey: verificationKey,\n\t\t}, nil\n\tcase JSONWebKey:\n\t\treturn newVerifier(verificationKey.Key)\n\tcase *JSONWebKey:\n\t\treturn newVerifier(verificationKey.Key)\n\tcase OpaqueVerifier:\n\t\treturn &opaqueVerifier{verifier: verificationKey}, nil\n\tdefault:\n\t\treturn nil, ErrUnsupportedKeyType\n\t}\n}\n\nfunc (ctx *genericSigner) addRecipient(alg SignatureAlgorithm, signingKey interface{}) error {\n\trecipient, err := makeJWSRecipient(alg, signingKey)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx.recipients = append(ctx.recipients, recipient)\n\treturn nil\n}\n\nfunc makeJWSRecipient(alg SignatureAlgorithm, signingKey interface{}) (recipientSigInfo, error) {\n\tswitch signingKey := signingKey.(type) {\n\tcase ed25519.PrivateKey:\n\t\treturn newEd25519Signer(alg, signingKey)\n\tcase *rsa.PrivateKey:\n\t\treturn newRSASigner(alg, signingKey)\n\tcase *ecdsa.PrivateKey:\n\t\treturn newECDSASigner(alg, signingKey)\n\tcase []byte:\n\t\treturn newSymmetricSigner(alg, signingKey)\n\tcase JSONWebKey:\n\t\treturn newJWKSigner(alg, signingKey)\n\tcase *JSONWebKey:\n\t\treturn newJWKSigner(alg, *signingKey)\n\tcase OpaqueSigner:\n\t\treturn newOpaqueSigner(alg, signingKey)\n\tdefault:\n\t\treturn recipientSigInfo{}, ErrUnsupportedKeyType\n\t}\n}\n\nfunc newJWKSigner(alg SignatureAlgorithm, signingKey JSONWebKey) (recipientSigInfo, error) {\n\trecipient, err := makeJWSRecipient(alg, signingKey.Key)\n\tif err != nil {\n\t\treturn recipientSigInfo{}, err\n\t}\n\tif recipient.publicKey != nil && recipient.publicKey() != nil {\n\t\t// recipient.publicKey is a JWK synthesized for embedding when recipientSigInfo\n\t\t// was created for the inner key (such as a RSA or ECDSA public key). It contains\n\t\t// the pub key for embedding, but doesn't have extra params like key id.\n\t\tpublicKey := signingKey\n\t\tpublicKey.Key = recipient.publicKey().Key\n\t\trecipient.publicKey = staticPublicKey(&publicKey)\n\n\t\t// This should be impossible, but let's check anyway.\n\t\tif !recipient.publicKey().IsPublic() {\n\t\t\treturn recipientSigInfo{}, errors.New(\"go-jose/go-jose: public key was unexpectedly not public\")\n\t\t}\n\t}\n\treturn recipient, nil\n}\n\nfunc (ctx *genericSigner) Sign(payload []byte) (*JSONWebSignature, error) {\n\tobj := &JSONWebSignature{}\n\tobj.payload = payload\n\tobj.Signatures = make([]Signature, len(ctx.recipients))\n\n\tfor i, recipient := range ctx.recipients {\n\t\tprotected := map[HeaderKey]interface{}{\n\t\t\theaderAlgorithm: string(recipient.sigAlg),\n\t\t}\n\n\t\tif recipient.publicKey != nil && recipient.publicKey() != nil {\n\t\t\t// We want to embed the JWK or set the kid header, but not both. Having a protected\n\t\t\t// header that contains an embedded JWK while also simultaneously containing the kid\n\t\t\t// header is confusing, and at least in ACME the two are considered to be mutually\n\t\t\t// exclusive. The fact that both can exist at the same time is a somewhat unfortunate\n\t\t\t// result of the JOSE spec. We've decided that this library will only include one or\n\t\t\t// the other to avoid this confusion.\n\t\t\t//\n\t\t\t// See https://github.com/go-jose/go-jose/issues/157 for more context.\n\t\t\tif ctx.embedJWK {\n\t\t\t\tprotected[headerJWK] = recipient.publicKey()\n\t\t\t} else {\n\t\t\t\tkeyID := recipient.publicKey().KeyID\n\t\t\t\tif keyID != \"\" {\n\t\t\t\t\tprotected[headerKeyID] = keyID\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ctx.nonceSource != nil {\n\t\t\tnonce, err := ctx.nonceSource.Nonce()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: Error generating nonce: %v\", err)\n\t\t\t}\n\t\t\tprotected[headerNonce] = nonce\n\t\t}\n\n\t\tfor k, v := range ctx.extraHeaders {\n\t\t\tprotected[k] = v\n\t\t}\n\n\t\tserializedProtected := mustSerializeJSON(protected)\n\t\tneedsBase64 := true\n\n\t\tif b64, ok := protected[headerB64]; ok {\n\t\t\tif needsBase64, ok = b64.(bool); !ok {\n\t\t\t\treturn nil, errors.New(\"go-jose/go-jose: Invalid b64 header parameter\")\n\t\t\t}\n\t\t}\n\n\t\tvar input bytes.Buffer\n\n\t\tinput.WriteString(base64.RawURLEncoding.EncodeToString(serializedProtected))\n\t\tinput.WriteByte('.')\n\n\t\tif needsBase64 {\n\t\t\tinput.WriteString(base64.RawURLEncoding.EncodeToString(payload))\n\t\t} else {\n\t\t\tinput.Write(payload)\n\t\t}\n\n\t\tsignatureInfo, err := recipient.signer.signPayload(input.Bytes(), recipient.sigAlg)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tsignatureInfo.protected = &rawHeader{}\n\t\tfor k, v := range protected {\n\t\t\tb, err := json.Marshal(v)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: Error marshalling item %#v: %v\", k, err)\n\t\t\t}\n\t\t\t(*signatureInfo.protected)[k] = makeRawMessage(b)\n\t\t}\n\t\tobj.Signatures[i] = signatureInfo\n\t}\n\n\treturn obj, nil\n}\n\nfunc (ctx *genericSigner) Options() SignerOptions {\n\treturn SignerOptions{\n\t\tNonceSource:  ctx.nonceSource,\n\t\tEmbedJWK:     ctx.embedJWK,\n\t\tExtraHeaders: ctx.extraHeaders,\n\t}\n}\n\n// Verify validates the signature on the object and returns the payload.\n// This function does not support multi-signature. If you desire multi-signature\n// verification use VerifyMulti instead.\n//\n// Be careful when verifying signatures based on embedded JWKs inside the\n// payload header. You cannot assume that the key received in a payload is\n// trusted.\n//\n// The verificationKey argument must have one of these types:\n//   - ed25519.PublicKey\n//   - *ecdsa.PublicKey\n//   - *rsa.PublicKey\n//   - *JSONWebKey\n//   - JSONWebKey\n//   - *JSONWebKeySet\n//   - JSONWebKeySet\n//   - []byte (an HMAC key)\n//   - Any type that implements the OpaqueVerifier interface.\n//\n// If the key is an HMAC key, it must have at least as many bytes as the relevant hash output:\n//   - HS256: 32 bytes\n//   - HS384: 48 bytes\n//   - HS512: 64 bytes\nfunc (obj JSONWebSignature) Verify(verificationKey interface{}) ([]byte, error) {\n\terr := obj.DetachedVerify(obj.payload, verificationKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn obj.payload, nil\n}\n\n// UnsafePayloadWithoutVerification returns the payload without\n// verifying it. The content returned from this function cannot be\n// trusted.\nfunc (obj JSONWebSignature) UnsafePayloadWithoutVerification() []byte {\n\treturn obj.payload\n}\n\n// DetachedVerify validates a detached signature on the given payload. In\n// most cases, you will probably want to use Verify instead. DetachedVerify\n// is only useful if you have a payload and signature that are separated from\n// each other.\n//\n// The verificationKey argument must have one of the types allowed for the\n// verificationKey argument of JSONWebSignature.Verify().\nfunc (obj JSONWebSignature) DetachedVerify(payload []byte, verificationKey interface{}) error {\n\tkey, err := tryJWKS(verificationKey, obj.headers()...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tverifier, err := newVerifier(key)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(obj.Signatures) > 1 {\n\t\treturn errors.New(\"go-jose/go-jose: too many signatures in payload; expecting only one\")\n\t}\n\n\tsignature := obj.Signatures[0]\n\n\tif signature.header != nil {\n\t\t// Per https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11,\n\t\t// 4.1.11. \"crit\" (Critical) Header Parameter\n\t\t// \"When used, this Header Parameter MUST be integrity\n\t\t// protected; therefore, it MUST occur only within the JWS\n\t\t// Protected Header.\"\n\t\terr = signature.header.checkNoCritical()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif signature.protected != nil {\n\t\terr = signature.protected.checkSupportedCritical(supportedCritical)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tinput, err := obj.computeAuthData(payload, &signature)\n\tif err != nil {\n\t\treturn ErrCryptoFailure\n\t}\n\n\theaders := signature.mergedHeaders()\n\talg := headers.getSignatureAlgorithm()\n\terr = verifier.verifyPayload(input, signature.Signature, alg)\n\tif err == nil {\n\t\treturn nil\n\t}\n\n\treturn ErrCryptoFailure\n}\n\n// VerifyMulti validates (one of the multiple) signatures on the object and\n// returns the index of the signature that was verified, along with the signature\n// object and the payload. We return the signature and index to guarantee that\n// callers are getting the verified value.\n//\n// The verificationKey argument must have one of the types allowed for the\n// verificationKey argument of JSONWebSignature.Verify().\nfunc (obj JSONWebSignature) VerifyMulti(verificationKey interface{}) (int, Signature, []byte, error) {\n\tidx, sig, err := obj.DetachedVerifyMulti(obj.payload, verificationKey)\n\tif err != nil {\n\t\treturn -1, Signature{}, nil, err\n\t}\n\treturn idx, sig, obj.payload, nil\n}\n\n// DetachedVerifyMulti validates a detached signature on the given payload with\n// a signature/object that has potentially multiple signers. This returns the index\n// of the signature that was verified, along with the signature object. We return\n// the signature and index to guarantee that callers are getting the verified value.\n//\n// In most cases, you will probably want to use Verify or VerifyMulti instead.\n// DetachedVerifyMulti is only useful if you have a payload and signature that are\n// separated from each other, and the signature can have multiple signers at the\n// same time.\n//\n// The verificationKey argument must have one of the types allowed for the\n// verificationKey argument of JSONWebSignature.Verify().\nfunc (obj JSONWebSignature) DetachedVerifyMulti(payload []byte, verificationKey interface{}) (int, Signature, error) {\n\tkey, err := tryJWKS(verificationKey, obj.headers()...)\n\tif err != nil {\n\t\treturn -1, Signature{}, err\n\t}\n\tverifier, err := newVerifier(key)\n\tif err != nil {\n\t\treturn -1, Signature{}, err\n\t}\n\nouter:\n\tfor i, signature := range obj.Signatures {\n\t\tif signature.header != nil {\n\t\t\t// Per https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11,\n\t\t\t// 4.1.11. \"crit\" (Critical) Header Parameter\n\t\t\t// \"When used, this Header Parameter MUST be integrity\n\t\t\t// protected; therefore, it MUST occur only within the JWS\n\t\t\t// Protected Header.\"\n\t\t\terr = signature.header.checkNoCritical()\n\t\t\tif err != nil {\n\t\t\t\tcontinue outer\n\t\t\t}\n\t\t}\n\n\t\tif signature.protected != nil {\n\t\t\t// Check for only supported critical headers\n\t\t\terr = signature.protected.checkSupportedCritical(supportedCritical)\n\t\t\tif err != nil {\n\t\t\t\tcontinue outer\n\t\t\t}\n\t\t}\n\n\t\tinput, err := obj.computeAuthData(payload, &signature)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\theaders := signature.mergedHeaders()\n\t\talg := headers.getSignatureAlgorithm()\n\t\terr = verifier.verifyPayload(input, signature.Signature, alg)\n\t\tif err == nil {\n\t\t\treturn i, signature, nil\n\t\t}\n\t}\n\n\treturn -1, Signature{}, ErrCryptoFailure\n}\n\nfunc (obj JSONWebSignature) headers() []Header {\n\theaders := make([]Header, len(obj.Signatures))\n\tfor i, sig := range obj.Signatures {\n\t\theaders[i] = sig.Header\n\t}\n\treturn headers\n}\n"
  },
  {
    "path": "vendor/github.com/go-jose/go-jose/v4/symmetric.go",
    "content": "/*-\n * Copyright 2014 Square Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage jose\n\nimport (\n\t\"bytes\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/hmac\"\n\t\"crypto/pbkdf2\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"crypto/subtle\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\n\tjosecipher \"github.com/go-jose/go-jose/v4/cipher\"\n)\n\n// RandReader is a cryptographically secure random number generator (stubbed out in tests).\nvar RandReader = rand.Reader\n\nconst (\n\t// RFC7518 recommends a minimum of 1,000 iterations:\n\t// \t- https://tools.ietf.org/html/rfc7518#section-4.8.1.2\n\t//\n\t// NIST recommends a minimum of 10,000:\n\t// \t- https://pages.nist.gov/800-63-3/sp800-63b.html\n\t//\n\t// 1Password increased in 2023 from 100,000 to 650,000:\n\t//  - https://support.1password.com/pbkdf2/\n\t//\n\t// OWASP recommended 600,000 in Dec 2022:\n\t//\t- https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2\n\tdefaultP2C = 600000\n\t// Default salt size: 128 bits\n\tdefaultP2SSize = 16\n)\n\n// Dummy key cipher for shared symmetric key mode\ntype symmetricKeyCipher struct {\n\tkey []byte // Pre-shared content-encryption key\n\tp2c int    // PBES2 Count\n\tp2s []byte // PBES2 Salt Input\n}\n\n// Signer/verifier for MAC modes\ntype symmetricMac struct {\n\tkey []byte\n}\n\n// Input/output from an AEAD operation\ntype aeadParts struct {\n\tiv, ciphertext, tag []byte\n}\n\n// A content cipher based on an AEAD construction\ntype aeadContentCipher struct {\n\tkeyBytes     int\n\tauthtagBytes int\n\tgetAead      func(key []byte) (cipher.AEAD, error)\n}\n\n// Random key generator\ntype randomKeyGenerator struct {\n\tsize int\n}\n\n// Static key generator\ntype staticKeyGenerator struct {\n\tkey []byte\n}\n\n// Create a new content cipher based on AES-GCM\nfunc newAESGCM(keySize int) contentCipher {\n\treturn &aeadContentCipher{\n\t\tkeyBytes:     keySize,\n\t\tauthtagBytes: 16,\n\t\tgetAead: func(key []byte) (cipher.AEAD, error) {\n\t\t\taes, err := aes.NewCipher(key)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn cipher.NewGCM(aes)\n\t\t},\n\t}\n}\n\n// Create a new content cipher based on AES-CBC+HMAC\nfunc newAESCBC(keySize int) contentCipher {\n\treturn &aeadContentCipher{\n\t\tkeyBytes:     keySize * 2,\n\t\tauthtagBytes: keySize,\n\t\tgetAead: func(key []byte) (cipher.AEAD, error) {\n\t\t\treturn josecipher.NewCBCHMAC(key, aes.NewCipher)\n\t\t},\n\t}\n}\n\n// Get an AEAD cipher object for the given content encryption algorithm\nfunc getContentCipher(alg ContentEncryption) contentCipher {\n\tswitch alg {\n\tcase A128GCM:\n\t\treturn newAESGCM(16)\n\tcase A192GCM:\n\t\treturn newAESGCM(24)\n\tcase A256GCM:\n\t\treturn newAESGCM(32)\n\tcase A128CBC_HS256:\n\t\treturn newAESCBC(16)\n\tcase A192CBC_HS384:\n\t\treturn newAESCBC(24)\n\tcase A256CBC_HS512:\n\t\treturn newAESCBC(32)\n\tdefault:\n\t\treturn nil\n\t}\n}\n\n// getPbkdf2Params returns the key length and hash function used in\n// pbkdf2.Key.\nfunc getPbkdf2Params(alg KeyAlgorithm) (int, func() hash.Hash) {\n\tswitch alg {\n\tcase PBES2_HS256_A128KW:\n\t\treturn 16, sha256.New\n\tcase PBES2_HS384_A192KW:\n\t\treturn 24, sha512.New384\n\tcase PBES2_HS512_A256KW:\n\t\treturn 32, sha512.New\n\tdefault:\n\t\tpanic(\"invalid algorithm\")\n\t}\n}\n\n// getRandomSalt generates a new salt of the given size.\nfunc getRandomSalt(size int) ([]byte, error) {\n\tsalt := make([]byte, size)\n\t_, err := io.ReadFull(RandReader, salt)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn salt, nil\n}\n\n// newSymmetricRecipient creates a JWE encrypter based on AES-GCM key wrap.\nfunc newSymmetricRecipient(keyAlg KeyAlgorithm, key []byte) (recipientKeyInfo, error) {\n\tswitch keyAlg {\n\tcase DIRECT, A128GCMKW, A192GCMKW, A256GCMKW, A128KW, A192KW, A256KW:\n\tcase PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW:\n\tdefault:\n\t\treturn recipientKeyInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\treturn recipientKeyInfo{\n\t\tkeyAlg: keyAlg,\n\t\tkeyEncrypter: &symmetricKeyCipher{\n\t\t\tkey: key,\n\t\t},\n\t}, nil\n}\n\n// newSymmetricSigner creates a recipientSigInfo based on the given key.\nfunc newSymmetricSigner(sigAlg SignatureAlgorithm, key []byte) (recipientSigInfo, error) {\n\t// Verify that key management algorithm is supported by this encrypter\n\tswitch sigAlg {\n\tcase HS256, HS384, HS512:\n\tdefault:\n\t\treturn recipientSigInfo{}, ErrUnsupportedAlgorithm\n\t}\n\n\treturn recipientSigInfo{\n\t\tsigAlg: sigAlg,\n\t\tsigner: &symmetricMac{\n\t\t\tkey: key,\n\t\t},\n\t}, nil\n}\n\n// Generate a random key for the given content cipher\nfunc (ctx randomKeyGenerator) genKey() ([]byte, rawHeader, error) {\n\tkey := make([]byte, ctx.size)\n\t_, err := io.ReadFull(RandReader, key)\n\tif err != nil {\n\t\treturn nil, rawHeader{}, err\n\t}\n\n\treturn key, rawHeader{}, nil\n}\n\n// Key size for random generator\nfunc (ctx randomKeyGenerator) keySize() int {\n\treturn ctx.size\n}\n\n// Generate a static key (for direct mode)\nfunc (ctx staticKeyGenerator) genKey() ([]byte, rawHeader, error) {\n\tcek := make([]byte, len(ctx.key))\n\tcopy(cek, ctx.key)\n\treturn cek, rawHeader{}, nil\n}\n\n// Key size for static generator\nfunc (ctx staticKeyGenerator) keySize() int {\n\treturn len(ctx.key)\n}\n\n// Get key size for this cipher\nfunc (ctx aeadContentCipher) keySize() int {\n\treturn ctx.keyBytes\n}\n\n// Encrypt some data\nfunc (ctx aeadContentCipher) encrypt(key, aad, pt []byte) (*aeadParts, error) {\n\t// Get a new AEAD instance\n\taead, err := ctx.getAead(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Initialize a new nonce\n\tiv := make([]byte, aead.NonceSize())\n\t_, err = io.ReadFull(RandReader, iv)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tciphertextAndTag := aead.Seal(nil, iv, pt, aad)\n\toffset := len(ciphertextAndTag) - ctx.authtagBytes\n\n\treturn &aeadParts{\n\t\tiv:         iv,\n\t\tciphertext: ciphertextAndTag[:offset],\n\t\ttag:        ciphertextAndTag[offset:],\n\t}, nil\n}\n\n// Decrypt some data\nfunc (ctx aeadContentCipher) decrypt(key, aad []byte, parts *aeadParts) ([]byte, error) {\n\taead, err := ctx.getAead(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(parts.iv) != aead.NonceSize() || len(parts.tag) < ctx.authtagBytes {\n\t\treturn nil, ErrCryptoFailure\n\t}\n\n\treturn aead.Open(nil, parts.iv, append(parts.ciphertext, parts.tag...), aad)\n}\n\n// Encrypt the content encryption key.\nfunc (ctx *symmetricKeyCipher) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {\n\tswitch alg {\n\tcase DIRECT:\n\t\treturn recipientInfo{\n\t\t\theader: &rawHeader{},\n\t\t}, nil\n\tcase A128GCMKW, A192GCMKW, A256GCMKW:\n\t\taead := newAESGCM(len(ctx.key))\n\n\t\tparts, err := aead.encrypt(ctx.key, []byte{}, cek)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\theader := &rawHeader{}\n\n\t\tif err = header.set(headerIV, newBuffer(parts.iv)); err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\tif err = header.set(headerTag, newBuffer(parts.tag)); err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\treturn recipientInfo{\n\t\t\theader:       header,\n\t\t\tencryptedKey: parts.ciphertext,\n\t\t}, nil\n\tcase A128KW, A192KW, A256KW:\n\t\tblock, err := aes.NewCipher(ctx.key)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\tjek, err := josecipher.KeyWrap(block, cek)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\treturn recipientInfo{\n\t\t\tencryptedKey: jek,\n\t\t\theader:       &rawHeader{},\n\t\t}, nil\n\tcase PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW:\n\t\tif len(ctx.p2s) == 0 {\n\t\t\tsalt, err := getRandomSalt(defaultP2SSize)\n\t\t\tif err != nil {\n\t\t\t\treturn recipientInfo{}, err\n\t\t\t}\n\t\t\tctx.p2s = salt\n\t\t}\n\n\t\tif ctx.p2c <= 0 {\n\t\t\tctx.p2c = defaultP2C\n\t\t}\n\n\t\t// salt is UTF8(Alg) || 0x00 || Salt Input\n\t\tsalt := bytes.Join([][]byte{[]byte(alg), ctx.p2s}, []byte{0x00})\n\n\t\t// derive key\n\t\tkeyLen, h := getPbkdf2Params(alg)\n\t\tkey, err := pbkdf2.Key(h, string(ctx.key), salt, ctx.p2c, keyLen)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, nil\n\t\t}\n\n\t\t// use AES cipher with derived key\n\t\tblock, err := aes.NewCipher(key)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\tjek, err := josecipher.KeyWrap(block, cek)\n\t\tif err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\theader := &rawHeader{}\n\n\t\tif err = header.set(headerP2C, ctx.p2c); err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\tif err = header.set(headerP2S, newBuffer(ctx.p2s)); err != nil {\n\t\t\treturn recipientInfo{}, err\n\t\t}\n\n\t\treturn recipientInfo{\n\t\t\tencryptedKey: jek,\n\t\t\theader:       header,\n\t\t}, nil\n\t}\n\n\treturn recipientInfo{}, ErrUnsupportedAlgorithm\n}\n\n// Decrypt the content encryption key.\nfunc (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {\n\tswitch headers.getAlgorithm() {\n\tcase DIRECT:\n\t\tcek := make([]byte, len(ctx.key))\n\t\tcopy(cek, ctx.key)\n\t\treturn cek, nil\n\tcase A128GCMKW, A192GCMKW, A256GCMKW:\n\t\taead := newAESGCM(len(ctx.key))\n\n\t\tiv, err := headers.getIV()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid IV: %v\", err)\n\t\t}\n\t\ttag, err := headers.getTag()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid tag: %v\", err)\n\t\t}\n\n\t\tparts := &aeadParts{\n\t\t\tiv:         iv.bytes(),\n\t\t\tciphertext: recipient.encryptedKey,\n\t\t\ttag:        tag.bytes(),\n\t\t}\n\n\t\tcek, err := aead.decrypt(ctx.key, []byte{}, parts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn cek, nil\n\tcase A128KW, A192KW, A256KW:\n\t\tblock, err := aes.NewCipher(ctx.key)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn cek, nil\n\tcase PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW:\n\t\tp2s, err := headers.getP2S()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid P2S: %v\", err)\n\t\t}\n\t\tif p2s == nil || len(p2s.data) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid P2S: must be present\")\n\t\t}\n\n\t\tp2c, err := headers.getP2C()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid P2C: %v\", err)\n\t\t}\n\t\tif p2c <= 0 {\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid P2C: must be a positive integer\")\n\t\t}\n\t\tif p2c > 1000000 {\n\t\t\t// An unauthenticated attacker can set a high P2C value. Set an upper limit to avoid\n\t\t\t// DoS attacks.\n\t\t\treturn nil, fmt.Errorf(\"go-jose/go-jose: invalid P2C: too high\")\n\t\t}\n\n\t\t// salt is UTF8(Alg) || 0x00 || Salt Input\n\t\talg := headers.getAlgorithm()\n\t\tsalt := bytes.Join([][]byte{[]byte(alg), p2s.bytes()}, []byte{0x00})\n\n\t\t// derive key\n\t\tkeyLen, h := getPbkdf2Params(alg)\n\t\tkey, err := pbkdf2.Key(h, string(ctx.key), salt, p2c, keyLen)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// use AES cipher with derived key\n\t\tblock, err := aes.NewCipher(key)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn cek, nil\n\t}\n\n\treturn nil, ErrUnsupportedAlgorithm\n}\n\n// Sign the given payload\nfunc (ctx symmetricMac) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {\n\tmac, err := ctx.hmac(payload, alg)\n\tif err != nil {\n\t\treturn Signature{}, err\n\t}\n\n\treturn Signature{\n\t\tSignature: mac,\n\t\tprotected: &rawHeader{},\n\t}, nil\n}\n\n// Verify the given payload\nfunc (ctx symmetricMac) verifyPayload(payload []byte, mac []byte, alg SignatureAlgorithm) error {\n\texpected, err := ctx.hmac(payload, alg)\n\tif err != nil {\n\t\treturn errors.New(\"go-jose/go-jose: failed to compute hmac\")\n\t}\n\n\tif len(mac) != len(expected) {\n\t\treturn errors.New(\"go-jose/go-jose: invalid hmac\")\n\t}\n\n\tmatch := subtle.ConstantTimeCompare(mac, expected)\n\tif match != 1 {\n\t\treturn errors.New(\"go-jose/go-jose: invalid hmac\")\n\t}\n\n\treturn nil\n}\n\n// Compute the HMAC based on the given alg value\nfunc (ctx symmetricMac) hmac(payload []byte, alg SignatureAlgorithm) ([]byte, error) {\n\tvar hash func() hash.Hash\n\n\t// https://datatracker.ietf.org/doc/html/rfc7518#section-3.2\n\t// A key of the same size as the hash output (for instance, 256 bits for\n\t// \"HS256\") or larger MUST be used\n\tswitch alg {\n\tcase HS256:\n\t\tif len(ctx.key)*8 < 256 {\n\t\t\treturn nil, ErrInvalidKeySize\n\t\t}\n\t\thash = sha256.New\n\tcase HS384:\n\t\tif len(ctx.key)*8 < 384 {\n\t\t\treturn nil, ErrInvalidKeySize\n\t\t}\n\t\thash = sha512.New384\n\tcase HS512:\n\t\tif len(ctx.key)*8 < 512 {\n\t\t\treturn nil, ErrInvalidKeySize\n\t\t}\n\t\thash = sha512.New\n\tdefault:\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n\n\thmac := hmac.New(hash, ctx.key)\n\n\t// According to documentation, Write() on hash never fails\n\t_, _ = hmac.Write(payload)\n\treturn hmac.Sum(nil), nil\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/.golangci.yaml",
    "content": "version: \"2\"\n\nrun:\n  timeout: 1m\n  tests: true\n\nlinters:\n  default: none\n  enable: # please keep this alphabetized\n    - asasalint\n    - asciicheck\n    - copyloopvar\n    - dupl\n    - errcheck\n    - forcetypeassert\n    - goconst\n    - gocritic\n    - govet\n    - ineffassign\n    - misspell\n    - musttag\n    - revive\n    - staticcheck\n    - unused\n\nissues:\n  max-issues-per-linter: 0\n  max-same-issues: 10\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/CHANGELOG.md",
    "content": "# CHANGELOG\n\n## v1.0.0-rc1\n\nThis is the first logged release.  Major changes (including breaking changes)\nhave occurred since earlier tags.\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/CONTRIBUTING.md",
    "content": "# Contributing\n\nLogr is open to pull-requests, provided they fit within the intended scope of\nthe project.  Specifically, this library aims to be VERY small and minimalist,\nwith no external dependencies.\n\n## Compatibility\n\nThis project intends to follow [semantic versioning](http://semver.org) and\nis very strict about compatibility.  Any proposed changes MUST follow those\nrules.\n\n## Performance\n\nAs a logging library, logr must be as light-weight as possible.  Any proposed\ncode change must include results of running the [benchmark](./benchmark)\nbefore and after the change.\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/LICENSE",
    "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": "vendor/github.com/go-logr/logr/README.md",
    "content": "# A minimal logging API for Go\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/logr.svg)](https://pkg.go.dev/github.com/go-logr/logr)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-logr/logr)](https://goreportcard.com/report/github.com/go-logr/logr)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/go-logr/logr/badge)](https://securityscorecards.dev/viewer/?platform=github.com&org=go-logr&repo=logr)\n\nlogr offers an(other) opinion on how Go programs and libraries can do logging\nwithout becoming coupled to a particular logging implementation.  This is not\nan implementation of logging - it is an API.  In fact it is two APIs with two\ndifferent sets of users.\n\nThe `Logger` type is intended for application and library authors.  It provides\na relatively small API which can be used everywhere you want to emit logs.  It\ndefers the actual act of writing logs (to files, to stdout, or whatever) to the\n`LogSink` interface.\n\nThe `LogSink` interface is intended for logging library implementers.  It is a\npure interface which can be implemented by logging frameworks to provide the actual logging\nfunctionality.\n\nThis decoupling allows application and library developers to write code in\nterms of `logr.Logger` (which has very low dependency fan-out) while the\nimplementation of logging is managed \"up stack\" (e.g. in or near `main()`.)\nApplication developers can then switch out implementations as necessary.\n\nMany people assert that libraries should not be logging, and as such efforts\nlike this are pointless.  Those people are welcome to convince the authors of\nthe tens-of-thousands of libraries that *DO* write logs that they are all\nwrong.  In the meantime, logr takes a more practical approach.\n\n## Typical usage\n\nSomewhere, early in an application's life, it will make a decision about which\nlogging library (implementation) it actually wants to use.  Something like:\n\n```\n    func main() {\n        // ... other setup code ...\n\n        // Create the \"root\" logger.  We have chosen the \"logimpl\" implementation,\n        // which takes some initial parameters and returns a logr.Logger.\n        logger := logimpl.New(param1, param2)\n\n        // ... other setup code ...\n```\n\nMost apps will call into other libraries, create structures to govern the flow,\netc.  The `logr.Logger` object can be passed to these other libraries, stored\nin structs, or even used as a package-global variable, if needed.  For example:\n\n```\n    app := createTheAppObject(logger)\n    app.Run()\n```\n\nOutside of this early setup, no other packages need to know about the choice of\nimplementation.  They write logs in terms of the `logr.Logger` that they\nreceived:\n\n```\n    type appObject struct {\n        // ... other fields ...\n        logger logr.Logger\n        // ... other fields ...\n    }\n\n    func (app *appObject) Run() {\n        app.logger.Info(\"starting up\", \"timestamp\", time.Now())\n\n        // ... app code ...\n```\n\n## Background\n\nIf the Go standard library had defined an interface for logging, this project\nprobably would not be needed.  Alas, here we are.\n\nWhen the Go developers started developing such an interface with\n[slog](https://github.com/golang/go/issues/56345), they adopted some of the\nlogr design but also left out some parts and changed others:\n\n| Feature | logr | slog |\n|---------|------|------|\n| High-level API | `Logger` (passed by value) | `Logger` (passed by [pointer](https://github.com/golang/go/issues/59126)) |\n| Low-level API | `LogSink` | `Handler` |\n| Stack unwinding | done by `LogSink` | done by `Logger` |\n| Skipping helper functions | `WithCallDepth`, `WithCallStackHelper` | [not supported by Logger](https://github.com/golang/go/issues/59145) |\n| Generating a value for logging on demand | `Marshaler` | `LogValuer` |\n| Log levels | >= 0, higher meaning \"less important\" | positive and negative, with 0 for \"info\" and higher meaning \"more important\" |\n| Error log entries | always logged, don't have a verbosity level | normal log entries with level >= `LevelError` |\n| Passing logger via context | `NewContext`, `FromContext` | no API |\n| Adding a name to a logger | `WithName` | no API |\n| Modify verbosity of log entries in a call chain | `V` | no API |\n| Grouping of key/value pairs | not supported | `WithGroup`, `GroupValue` |\n| Pass context for extracting additional values | no API | API variants like `InfoCtx` |\n\nThe high-level slog API is explicitly meant to be one of many different APIs\nthat can be layered on top of a shared `slog.Handler`. logr is one such\nalternative API, with [interoperability](#slog-interoperability) provided by\nsome conversion functions.\n\n### Inspiration\n\nBefore you consider this package, please read [this blog post by the\ninimitable Dave Cheney][warning-makes-no-sense].  We really appreciate what\nhe has to say, and it largely aligns with our own experiences.\n\n### Differences from Dave's ideas\n\nThe main differences are:\n\n1. Dave basically proposes doing away with the notion of a logging API in favor\nof `fmt.Printf()`.  We disagree, especially when you consider things like output\nlocations, timestamps, file and line decorations, and structured logging.  This\npackage restricts the logging API to just 2 types of logs: info and error.\n\nInfo logs are things you want to tell the user which are not errors.  Error\nlogs are, well, errors.  If your code receives an `error` from a subordinate\nfunction call and is logging that `error` *and not returning it*, use error\nlogs.\n\n2. Verbosity-levels on info logs.  This gives developers a chance to indicate\narbitrary grades of importance for info logs, without assigning names with\nsemantic meaning such as \"warning\", \"trace\", and \"debug.\"  Superficially this\nmay feel very similar, but the primary difference is the lack of semantics.\nBecause verbosity is a numerical value, it's safe to assume that an app running\nwith higher verbosity means more (and less important) logs will be generated.\n\n## Implementations (non-exhaustive)\n\nThere are implementations for the following logging libraries:\n\n- **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr)\n- **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr)\n- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr)\n- **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr)\n- **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting)\n- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr)\n- **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr)\n- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr)\n- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend)\n- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr)\n- **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr)\n- **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0)\n- **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing)\n\n## slog interoperability\n\nInteroperability goes both ways, using the `logr.Logger` API with a `slog.Handler`\nand using the `slog.Logger` API with a `logr.LogSink`. `FromSlogHandler` and\n`ToSlogHandler` convert between a `logr.Logger` and a `slog.Handler`.\nAs usual, `slog.New` can be used to wrap such a `slog.Handler` in the high-level\nslog API.\n\n### Using a `logr.LogSink` as backend for slog\n\nIdeally, a logr sink implementation should support both logr and slog by\nimplementing both the normal logr interface(s) and `SlogSink`.  Because\nof a conflict in the parameters of the common `Enabled` method, it is [not\npossible to implement both slog.Handler and logr.Sink in the same\ntype](https://github.com/golang/go/issues/59110).\n\nIf both are supported, log calls can go from the high-level APIs to the backend\nwithout the need to convert parameters. `FromSlogHandler` and `ToSlogHandler` can\nconvert back and forth without adding additional wrappers, with one exception:\nwhen `Logger.V` was used to adjust the verbosity for a `slog.Handler`, then\n`ToSlogHandler` has to use a wrapper which adjusts the verbosity for future\nlog calls.\n\nSuch an implementation should also support values that implement specific\ninterfaces from both packages for logging (`logr.Marshaler`, `slog.LogValuer`,\n`slog.GroupValue`). logr does not convert those.\n\nNot supporting slog has several drawbacks:\n- Recording source code locations works correctly if the handler gets called\n  through `slog.Logger`, but may be wrong in other cases. That's because a\n  `logr.Sink` does its own stack unwinding instead of using the program counter\n  provided by the high-level API.\n- slog levels <= 0 can be mapped to logr levels by negating the level without a\n  loss of information. But all slog levels > 0 (e.g. `slog.LevelWarning` as\n  used by `slog.Logger.Warn`) must be mapped to 0 before calling the sink\n  because logr does not support \"more important than info\" levels.\n- The slog group concept is supported by prefixing each key in a key/value\n  pair with the group names, separated by a dot. For structured output like\n  JSON it would be better to group the key/value pairs inside an object.\n- Special slog values and interfaces don't work as expected.\n- The overhead is likely to be higher.\n\nThese drawbacks are severe enough that applications using a mixture of slog and\nlogr should switch to a different backend.\n\n### Using a `slog.Handler` as backend for logr\n\nUsing a plain `slog.Handler` without support for logr works better than the\nother direction:\n- All logr verbosity levels can be mapped 1:1 to their corresponding slog level\n  by negating them.\n- Stack unwinding is done by the `SlogSink` and the resulting program\n  counter is passed to the `slog.Handler`.\n- Names added via `Logger.WithName` are gathered and recorded in an additional\n  attribute with `logger` as key and the names separated by slash as value.\n- `Logger.Error` is turned into a log record with `slog.LevelError` as level\n  and an additional attribute with `err` as key, if an error was provided.\n\nThe main drawback is that `logr.Marshaler` will not be supported. Types should\nideally support both `logr.Marshaler` and `slog.Valuer`. If compatibility\nwith logr implementations without slog support is not important, then\n`slog.Valuer` is sufficient.\n\n### Context support for slog\n\nStoring a logger in a `context.Context` is not supported by\nslog. `NewContextWithSlogLogger` and `FromContextAsSlogLogger` can be\nused to fill this gap. They store and retrieve a `slog.Logger` pointer\nunder the same context key that is also used by `NewContext` and\n`FromContext` for `logr.Logger` value.\n\nWhen `NewContextWithSlogLogger` is followed by `FromContext`, the latter will\nautomatically convert the `slog.Logger` to a\n`logr.Logger`. `FromContextAsSlogLogger` does the same for the other direction.\n\nWith this approach, binaries which use either slog or logr are as efficient as\npossible with no unnecessary allocations. This is also why the API stores a\n`slog.Logger` pointer: when storing a `slog.Handler`, creating a `slog.Logger`\non retrieval would need to allocate one.\n\nThe downside is that switching back and forth needs more allocations. Because\nlogr is the API that is already in use by different packages, in particular\nKubernetes, the recommendation is to use the `logr.Logger` API in code which\nuses contextual logging.\n\nAn alternative to adding values to a logger and storing that logger in the\ncontext is to store the values in the context and to configure a logging\nbackend to extract those values when emitting log entries. This only works when\nlog calls are passed the context, which is not supported by the logr API.\n\nWith the slog API, it is possible, but not\nrequired. https://github.com/veqryn/slog-context is a package for slog which\nprovides additional support code for this approach. It also contains wrappers\nfor the context functions in logr, so developers who prefer to not use the logr\nAPIs directly can use those instead and the resulting code will still be\ninteroperable with logr.\n\n## FAQ\n\n### Conceptual\n\n#### Why structured logging?\n\n- **Structured logs are more easily queryable**: Since you've got\n  key-value pairs, it's much easier to query your structured logs for\n  particular values by filtering on the contents of a particular key --\n  think searching request logs for error codes, Kubernetes reconcilers for\n  the name and namespace of the reconciled object, etc.\n\n- **Structured logging makes it easier to have cross-referenceable logs**:\n  Similarly to searchability, if you maintain conventions around your\n  keys, it becomes easy to gather all log lines related to a particular\n  concept.\n\n- **Structured logs allow better dimensions of filtering**: if you have\n  structure to your logs, you've got more precise control over how much\n  information is logged -- you might choose in a particular configuration\n  to log certain keys but not others, only log lines where a certain key\n  matches a certain value, etc., instead of just having v-levels and names\n  to key off of.\n\n- **Structured logs better represent structured data**: sometimes, the\n  data that you want to log is inherently structured (think tuple-link\n  objects.)  Structured logs allow you to preserve that structure when\n  outputting.\n\n#### Why V-levels?\n\n**V-levels give operators an easy way to control the chattiness of log\noperations**.  V-levels provide a way for a given package to distinguish\nthe relative importance or verbosity of a given log message.  Then, if\na particular logger or package is logging too many messages, the user\nof the package can simply change the v-levels for that library.\n\n#### Why not named levels, like Info/Warning/Error?\n\nRead [Dave Cheney's post][warning-makes-no-sense].  Then read [Differences\nfrom Dave's ideas](#differences-from-daves-ideas).\n\n#### Why not allow format strings, too?\n\n**Format strings negate many of the benefits of structured logs**:\n\n- They're not easily searchable without resorting to fuzzy searching,\n  regular expressions, etc.\n\n- They don't store structured data well, since contents are flattened into\n  a string.\n\n- They're not cross-referenceable.\n\n- They don't compress easily, since the message is not constant.\n\n(Unless you turn positional parameters into key-value pairs with numerical\nkeys, at which point you've gotten key-value logging with meaningless\nkeys.)\n\n### Practical\n\n#### Why key-value pairs, and not a map?\n\nKey-value pairs are *much* easier to optimize, especially around\nallocations.  Zap (a structured logger that inspired logr's interface) has\n[performance measurements](https://github.com/uber-go/zap#performance)\nthat show this quite nicely.\n\nWhile the interface ends up being a little less obvious, you get\npotentially better performance, plus avoid making users type\n`map[string]string{}` every time they want to log.\n\n#### What if my V-levels differ between libraries?\n\nThat's fine.  Control your V-levels on a per-logger basis, and use the\n`WithName` method to pass different loggers to different libraries.\n\nGenerally, you should take care to ensure that you have relatively\nconsistent V-levels within a given logger, however, as this makes deciding\non what verbosity of logs to request easier.\n\n#### But I really want to use a format string!\n\nThat's not actually a question.  Assuming your question is \"how do\nI convert my mental model of logging with format strings to logging with\nconstant messages\":\n\n1. Figure out what the error actually is, as you'd write in a TL;DR style,\n   and use that as a message.\n\n2. For every place you'd write a format specifier, look to the word before\n   it, and add that as a key value pair.\n\nFor instance, consider the following examples (all taken from spots in the\nKubernetes codebase):\n\n- `klog.V(4).Infof(\"Client is returning errors: code %v, error %v\",\n  responseCode, err)` becomes `logger.Error(err, \"client returned an\n  error\", \"code\", responseCode)`\n\n- `klog.V(4).Infof(\"Got a Retry-After %ds response for attempt %d to %v\",\n  seconds, retries, url)` becomes `logger.V(4).Info(\"got a retry-after\n  response when requesting url\", \"attempt\", retries, \"after\n  seconds\", seconds, \"url\", url)`\n\nIf you *really* must use a format string, use it in a key's value, and\ncall `fmt.Sprintf` yourself.  For instance: `log.Printf(\"unable to\nreflect over type %T\")` becomes `logger.Info(\"unable to reflect over\ntype\", \"type\", fmt.Sprintf(\"%T\"))`.  In general though, the cases where\nthis is necessary should be few and far between.\n\n#### How do I choose my V-levels?\n\nThis is basically the only hard constraint: increase V-levels to denote\nmore verbose or more debug-y logs.\n\nOtherwise, you can start out with `0` as \"you always want to see this\",\n`1` as \"common logging that you might *possibly* want to turn off\", and\n`10` as \"I would like to performance-test your log collection stack.\"\n\nThen gradually choose levels in between as you need them, working your way\ndown from 10 (for debug and trace style logs) and up from 1 (for chattier\ninfo-type logs). For reference, slog pre-defines -4 for debug logs\n(corresponds to 4 in logr), which matches what is\n[recommended for Kubernetes](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#what-method-to-use).\n\n#### How do I choose my keys?\n\nKeys are fairly flexible, and can hold more or less any string\nvalue. For best compatibility with implementations and consistency\nwith existing code in other projects, there are a few conventions you\nshould consider.\n\n- Make your keys human-readable.\n- Constant keys are generally a good idea.\n- Be consistent across your codebase.\n- Keys should naturally match parts of the message string.\n- Use lower case for simple keys and\n  [lowerCamelCase](https://en.wiktionary.org/wiki/lowerCamelCase) for\n  more complex ones. Kubernetes is one example of a project that has\n  [adopted that\n  convention](https://github.com/kubernetes/community/blob/HEAD/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments).\n\nWhile key names are mostly unrestricted (and spaces are acceptable),\nit's generally a good idea to stick to printable ascii characters, or at\nleast match the general character set of your log lines.\n\n#### Why should keys be constant values?\n\nThe point of structured logging is to make later log processing easier.  Your\nkeys are, effectively, the schema of each log message.  If you use different\nkeys across instances of the same log line, you will make your structured logs\nmuch harder to use.  `Sprintf()` is for values, not for keys!\n\n#### Why is this not a pure interface?\n\nThe Logger type is implemented as a struct in order to allow the Go compiler to\noptimize things like high-V `Info` logs that are not triggered.  Not all of\nthese implementations are implemented yet, but this structure was suggested as\na way to ensure they *can* be implemented.  All of the real work is behind the\n`LogSink` interface.\n\n[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/SECURITY.md",
    "content": "# Security Policy\n\nIf you have discovered a security vulnerability in this project, please report it\nprivately. **Do not disclose it as a public issue.** This gives us time to work with you\nto fix the issue before public exposure, reducing the chance that the exploit will be\nused before a patch is released.\n\nYou may submit the report in the following ways:\n\n- send an email to go-logr-security@googlegroups.com\n- send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new)\n\nPlease provide the following information in your report:\n\n- A description of the vulnerability and its impact\n- How to reproduce the issue\n\nWe ask that you give us 90 days to work on a fix before public exposure.\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/context.go",
    "content": "/*\nCopyright 2023 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\n// contextKey is how we find Loggers in a context.Context. With Go < 1.21,\n// the value is always a Logger value. With Go >= 1.21, the value can be a\n// Logger value or a slog.Logger pointer.\ntype contextKey struct{}\n\n// notFoundError exists to carry an IsNotFound method.\ntype notFoundError struct{}\n\nfunc (notFoundError) Error() string {\n\treturn \"no logr.Logger was present\"\n}\n\nfunc (notFoundError) IsNotFound() bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/context_noslog.go",
    "content": "//go:build !go1.21\n// +build !go1.21\n\n/*\nCopyright 2019 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\nimport (\n\t\"context\"\n)\n\n// FromContext returns a Logger from ctx or an error if no Logger is found.\nfunc FromContext(ctx context.Context) (Logger, error) {\n\tif v, ok := ctx.Value(contextKey{}).(Logger); ok {\n\t\treturn v, nil\n\t}\n\n\treturn Logger{}, notFoundError{}\n}\n\n// FromContextOrDiscard returns a Logger from ctx.  If no Logger is found, this\n// returns a Logger that discards all log messages.\nfunc FromContextOrDiscard(ctx context.Context) Logger {\n\tif v, ok := ctx.Value(contextKey{}).(Logger); ok {\n\t\treturn v\n\t}\n\n\treturn Discard()\n}\n\n// NewContext returns a new Context, derived from ctx, which carries the\n// provided Logger.\nfunc NewContext(ctx context.Context, logger Logger) context.Context {\n\treturn context.WithValue(ctx, contextKey{}, logger)\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/context_slog.go",
    "content": "//go:build go1.21\n// +build go1.21\n\n/*\nCopyright 2019 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n)\n\n// FromContext returns a Logger from ctx or an error if no Logger is found.\nfunc FromContext(ctx context.Context) (Logger, error) {\n\tv := ctx.Value(contextKey{})\n\tif v == nil {\n\t\treturn Logger{}, notFoundError{}\n\t}\n\n\tswitch v := v.(type) {\n\tcase Logger:\n\t\treturn v, nil\n\tcase *slog.Logger:\n\t\treturn FromSlogHandler(v.Handler()), nil\n\tdefault:\n\t\t// Not reached.\n\t\tpanic(fmt.Sprintf(\"unexpected value type for logr context key: %T\", v))\n\t}\n}\n\n// FromContextAsSlogLogger returns a slog.Logger from ctx or nil if no such Logger is found.\nfunc FromContextAsSlogLogger(ctx context.Context) *slog.Logger {\n\tv := ctx.Value(contextKey{})\n\tif v == nil {\n\t\treturn nil\n\t}\n\n\tswitch v := v.(type) {\n\tcase Logger:\n\t\treturn slog.New(ToSlogHandler(v))\n\tcase *slog.Logger:\n\t\treturn v\n\tdefault:\n\t\t// Not reached.\n\t\tpanic(fmt.Sprintf(\"unexpected value type for logr context key: %T\", v))\n\t}\n}\n\n// FromContextOrDiscard returns a Logger from ctx.  If no Logger is found, this\n// returns a Logger that discards all log messages.\nfunc FromContextOrDiscard(ctx context.Context) Logger {\n\tif logger, err := FromContext(ctx); err == nil {\n\t\treturn logger\n\t}\n\treturn Discard()\n}\n\n// NewContext returns a new Context, derived from ctx, which carries the\n// provided Logger.\nfunc NewContext(ctx context.Context, logger Logger) context.Context {\n\treturn context.WithValue(ctx, contextKey{}, logger)\n}\n\n// NewContextWithSlogLogger returns a new Context, derived from ctx, which carries the\n// provided slog.Logger.\nfunc NewContextWithSlogLogger(ctx context.Context, logger *slog.Logger) context.Context {\n\treturn context.WithValue(ctx, contextKey{}, logger)\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/discard.go",
    "content": "/*\nCopyright 2020 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\n// Discard returns a Logger that discards all messages logged to it.  It can be\n// used whenever the caller is not interested in the logs.  Logger instances\n// produced by this function always compare as equal.\nfunc Discard() Logger {\n\treturn New(nil)\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/funcr/funcr.go",
    "content": "/*\nCopyright 2021 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Package funcr implements formatting of structured log messages and\n// optionally captures the call site and timestamp.\n//\n// The simplest way to use it is via its implementation of a\n// github.com/go-logr/logr.LogSink with output through an arbitrary\n// \"write\" function.  See New and NewJSON for details.\n//\n// # Custom LogSinks\n//\n// For users who need more control, a funcr.Formatter can be embedded inside\n// your own custom LogSink implementation. This is useful when the LogSink\n// needs to implement additional methods, for example.\n//\n// # Formatting\n//\n// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for\n// values which are being logged.  When rendering a struct, funcr will use Go's\n// standard JSON tags (all except \"string\").\npackage funcr\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/go-logr/logr\"\n)\n\n// New returns a logr.Logger which is implemented by an arbitrary function.\nfunc New(fn func(prefix, args string), opts Options) logr.Logger {\n\treturn logr.New(newSink(fn, NewFormatter(opts)))\n}\n\n// NewJSON returns a logr.Logger which is implemented by an arbitrary function\n// and produces JSON output.\nfunc NewJSON(fn func(obj string), opts Options) logr.Logger {\n\tfnWrapper := func(_, obj string) {\n\t\tfn(obj)\n\t}\n\treturn logr.New(newSink(fnWrapper, NewFormatterJSON(opts)))\n}\n\n// Underlier exposes access to the underlying logging function. Since\n// callers only have a logr.Logger, they have to know which\n// implementation is in use, so this interface is less of an\n// abstraction and more of a way to test type conversion.\ntype Underlier interface {\n\tGetUnderlying() func(prefix, args string)\n}\n\nfunc newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink {\n\tl := &fnlogger{\n\t\tFormatter: formatter,\n\t\twrite:     fn,\n\t}\n\t// For skipping fnlogger.Info and fnlogger.Error.\n\tl.AddCallDepth(1) // via Formatter\n\treturn l\n}\n\n// Options carries parameters which influence the way logs are generated.\ntype Options struct {\n\t// LogCaller tells funcr to add a \"caller\" key to some or all log lines.\n\t// This has some overhead, so some users might not want it.\n\tLogCaller MessageClass\n\n\t// LogCallerFunc tells funcr to also log the calling function name.  This\n\t// has no effect if caller logging is not enabled (see Options.LogCaller).\n\tLogCallerFunc bool\n\n\t// LogTimestamp tells funcr to add a \"ts\" key to log lines.  This has some\n\t// overhead, so some users might not want it.\n\tLogTimestamp bool\n\n\t// TimestampFormat tells funcr how to render timestamps when LogTimestamp\n\t// is enabled.  If not specified, a default format will be used.  For more\n\t// details, see docs for Go's time.Layout.\n\tTimestampFormat string\n\n\t// LogInfoLevel tells funcr what key to use to log the info level.\n\t// If not specified, the info level will be logged as \"level\".\n\t// If this is set to \"\", the info level will not be logged at all.\n\tLogInfoLevel *string\n\n\t// Verbosity tells funcr which V logs to produce.  Higher values enable\n\t// more logs.  Info logs at or below this level will be written, while logs\n\t// above this level will be discarded.\n\tVerbosity int\n\n\t// RenderBuiltinsHook allows users to mutate the list of key-value pairs\n\t// while a log line is being rendered.  The kvList argument follows logr\n\t// conventions - each pair of slice elements is comprised of a string key\n\t// and an arbitrary value (verified and sanitized before calling this\n\t// hook).  The value returned must follow the same conventions.  This hook\n\t// can be used to audit or modify logged data.  For example, you might want\n\t// to prefix all of funcr's built-in keys with some string.  This hook is\n\t// only called for built-in (provided by funcr itself) key-value pairs.\n\t// Equivalent hooks are offered for key-value pairs saved via\n\t// logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and\n\t// for user-provided pairs (see RenderArgsHook).\n\tRenderBuiltinsHook func(kvList []any) []any\n\n\t// RenderValuesHook is the same as RenderBuiltinsHook, except that it is\n\t// only called for key-value pairs saved via logr.Logger.WithValues.  See\n\t// RenderBuiltinsHook for more details.\n\tRenderValuesHook func(kvList []any) []any\n\n\t// RenderArgsHook is the same as RenderBuiltinsHook, except that it is only\n\t// called for key-value pairs passed directly to Info and Error.  See\n\t// RenderBuiltinsHook for more details.\n\tRenderArgsHook func(kvList []any) []any\n\n\t// MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct\n\t// that contains a struct, etc.) it may log.  Every time it finds a struct,\n\t// slice, array, or map the depth is increased by one.  When the maximum is\n\t// reached, the value will be converted to a string indicating that the max\n\t// depth has been exceeded.  If this field is not specified, a default\n\t// value will be used.\n\tMaxLogDepth int\n}\n\n// MessageClass indicates which category or categories of messages to consider.\ntype MessageClass int\n\nconst (\n\t// None ignores all message classes.\n\tNone MessageClass = iota\n\t// All considers all message classes.\n\tAll\n\t// Info only considers info messages.\n\tInfo\n\t// Error only considers error messages.\n\tError\n)\n\n// fnlogger inherits some of its LogSink implementation from Formatter\n// and just needs to add some glue code.\ntype fnlogger struct {\n\tFormatter\n\twrite func(prefix, args string)\n}\n\nfunc (l fnlogger) WithName(name string) logr.LogSink {\n\tl.AddName(name) // via Formatter\n\treturn &l\n}\n\nfunc (l fnlogger) WithValues(kvList ...any) logr.LogSink {\n\tl.AddValues(kvList) // via Formatter\n\treturn &l\n}\n\nfunc (l fnlogger) WithCallDepth(depth int) logr.LogSink {\n\tl.AddCallDepth(depth) // via Formatter\n\treturn &l\n}\n\nfunc (l fnlogger) Info(level int, msg string, kvList ...any) {\n\tprefix, args := l.FormatInfo(level, msg, kvList)\n\tl.write(prefix, args)\n}\n\nfunc (l fnlogger) Error(err error, msg string, kvList ...any) {\n\tprefix, args := l.FormatError(err, msg, kvList)\n\tl.write(prefix, args)\n}\n\nfunc (l fnlogger) GetUnderlying() func(prefix, args string) {\n\treturn l.write\n}\n\n// Assert conformance to the interfaces.\nvar _ logr.LogSink = &fnlogger{}\nvar _ logr.CallDepthLogSink = &fnlogger{}\nvar _ Underlier = &fnlogger{}\n\n// NewFormatter constructs a Formatter which emits a JSON-like key=value format.\nfunc NewFormatter(opts Options) Formatter {\n\treturn newFormatter(opts, outputKeyValue)\n}\n\n// NewFormatterJSON constructs a Formatter which emits strict JSON.\nfunc NewFormatterJSON(opts Options) Formatter {\n\treturn newFormatter(opts, outputJSON)\n}\n\n// Defaults for Options.\nconst defaultTimestampFormat = \"2006-01-02 15:04:05.000000\"\nconst defaultMaxLogDepth = 16\n\nfunc newFormatter(opts Options, outfmt outputFormat) Formatter {\n\tif opts.TimestampFormat == \"\" {\n\t\topts.TimestampFormat = defaultTimestampFormat\n\t}\n\tif opts.MaxLogDepth == 0 {\n\t\topts.MaxLogDepth = defaultMaxLogDepth\n\t}\n\tif opts.LogInfoLevel == nil {\n\t\topts.LogInfoLevel = new(string)\n\t\t*opts.LogInfoLevel = \"level\"\n\t}\n\tf := Formatter{\n\t\toutputFormat: outfmt,\n\t\tprefix:       \"\",\n\t\tvalues:       nil,\n\t\tdepth:        0,\n\t\topts:         &opts,\n\t}\n\treturn f\n}\n\n// Formatter is an opaque struct which can be embedded in a LogSink\n// implementation. It should be constructed with NewFormatter. Some of\n// its methods directly implement logr.LogSink.\ntype Formatter struct {\n\toutputFormat outputFormat\n\tprefix       string\n\tvalues       []any\n\tvaluesStr    string\n\tdepth        int\n\topts         *Options\n\tgroupName    string // for slog groups\n\tgroups       []groupDef\n}\n\n// outputFormat indicates which outputFormat to use.\ntype outputFormat int\n\nconst (\n\t// outputKeyValue emits a JSON-like key=value format, but not strict JSON.\n\toutputKeyValue outputFormat = iota\n\t// outputJSON emits strict JSON.\n\toutputJSON\n)\n\n// groupDef represents a saved group.  The values may be empty, but we don't\n// know if we need to render the group until the final record is rendered.\ntype groupDef struct {\n\tname   string\n\tvalues string\n}\n\n// PseudoStruct is a list of key-value pairs that gets logged as a struct.\ntype PseudoStruct []any\n\n// render produces a log line, ready to use.\nfunc (f Formatter) render(builtins, args []any) string {\n\t// Empirically bytes.Buffer is faster than strings.Builder for this.\n\tbuf := bytes.NewBuffer(make([]byte, 0, 1024))\n\n\tif f.outputFormat == outputJSON {\n\t\tbuf.WriteByte('{') // for the whole record\n\t}\n\n\t// Render builtins\n\tvals := builtins\n\tif hook := f.opts.RenderBuiltinsHook; hook != nil {\n\t\tvals = hook(f.sanitize(vals))\n\t}\n\tf.flatten(buf, vals, false) // keys are ours, no need to escape\n\tcontinuing := len(builtins) > 0\n\n\t// Turn the inner-most group into a string\n\targsStr := func() string {\n\t\tbuf := bytes.NewBuffer(make([]byte, 0, 1024))\n\n\t\tvals = args\n\t\tif hook := f.opts.RenderArgsHook; hook != nil {\n\t\t\tvals = hook(f.sanitize(vals))\n\t\t}\n\t\tf.flatten(buf, vals, true) // escape user-provided keys\n\n\t\treturn buf.String()\n\t}()\n\n\t// Render the stack of groups from the inside out.\n\tbodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr)\n\tfor i := len(f.groups) - 1; i >= 0; i-- {\n\t\tgrp := &f.groups[i]\n\t\tif grp.values == \"\" && bodyStr == \"\" {\n\t\t\t// no contents, so we must elide the whole group\n\t\t\tcontinue\n\t\t}\n\t\tbodyStr = f.renderGroup(grp.name, grp.values, bodyStr)\n\t}\n\n\tif bodyStr != \"\" {\n\t\tif continuing {\n\t\t\tbuf.WriteByte(f.comma())\n\t\t}\n\t\tbuf.WriteString(bodyStr)\n\t}\n\n\tif f.outputFormat == outputJSON {\n\t\tbuf.WriteByte('}') // for the whole record\n\t}\n\n\treturn buf.String()\n}\n\n// renderGroup returns a string representation of the named group with rendered\n// values and args.  If the name is empty, this will return the values and args,\n// joined.  If the name is not empty, this will return a single key-value pair,\n// where the value is a grouping of the values and args.  If the values and\n// args are both empty, this will return an empty string, even if the name was\n// specified.\nfunc (f Formatter) renderGroup(name string, values string, args string) string {\n\tbuf := bytes.NewBuffer(make([]byte, 0, 1024))\n\n\tneedClosingBrace := false\n\tif name != \"\" && (values != \"\" || args != \"\") {\n\t\tbuf.WriteString(f.quoted(name, true)) // escape user-provided keys\n\t\tbuf.WriteByte(f.colon())\n\t\tbuf.WriteByte('{')\n\t\tneedClosingBrace = true\n\t}\n\n\tcontinuing := false\n\tif values != \"\" {\n\t\tbuf.WriteString(values)\n\t\tcontinuing = true\n\t}\n\n\tif args != \"\" {\n\t\tif continuing {\n\t\t\tbuf.WriteByte(f.comma())\n\t\t}\n\t\tbuf.WriteString(args)\n\t}\n\n\tif needClosingBrace {\n\t\tbuf.WriteByte('}')\n\t}\n\n\treturn buf.String()\n}\n\n// flatten renders a list of key-value pairs into a buffer.  If escapeKeys is\n// true, the keys are assumed to have non-JSON-compatible characters in them\n// and must be evaluated for escapes.\n//\n// This function returns a potentially modified version of kvList, which\n// ensures that there is a value for every key (adding a value if needed) and\n// that each key is a string (substituting a key if needed).\nfunc (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any {\n\t// This logic overlaps with sanitize() but saves one type-cast per key,\n\t// which can be measurable.\n\tif len(kvList)%2 != 0 {\n\t\tkvList = append(kvList, noValue)\n\t}\n\tcopied := false\n\tfor i := 0; i < len(kvList); i += 2 {\n\t\tk, ok := kvList[i].(string)\n\t\tif !ok {\n\t\t\tif !copied {\n\t\t\t\tnewList := make([]any, len(kvList))\n\t\t\t\tcopy(newList, kvList)\n\t\t\t\tkvList = newList\n\t\t\t\tcopied = true\n\t\t\t}\n\t\t\tk = f.nonStringKey(kvList[i])\n\t\t\tkvList[i] = k\n\t\t}\n\t\tv := kvList[i+1]\n\n\t\tif i > 0 {\n\t\t\tif f.outputFormat == outputJSON {\n\t\t\t\tbuf.WriteByte(f.comma())\n\t\t\t} else {\n\t\t\t\t// In theory the format could be something we don't understand.  In\n\t\t\t\t// practice, we control it, so it won't be.\n\t\t\t\tbuf.WriteByte(' ')\n\t\t\t}\n\t\t}\n\n\t\tbuf.WriteString(f.quoted(k, escapeKeys))\n\t\tbuf.WriteByte(f.colon())\n\t\tbuf.WriteString(f.pretty(v))\n\t}\n\treturn kvList\n}\n\nfunc (f Formatter) quoted(str string, escape bool) string {\n\tif escape {\n\t\treturn prettyString(str)\n\t}\n\t// this is faster\n\treturn `\"` + str + `\"`\n}\n\nfunc (f Formatter) comma() byte {\n\tif f.outputFormat == outputJSON {\n\t\treturn ','\n\t}\n\treturn ' '\n}\n\nfunc (f Formatter) colon() byte {\n\tif f.outputFormat == outputJSON {\n\t\treturn ':'\n\t}\n\treturn '='\n}\n\nfunc (f Formatter) pretty(value any) string {\n\treturn f.prettyWithFlags(value, 0, 0)\n}\n\nconst (\n\tflagRawStruct = 0x1 // do not print braces on structs\n)\n\n// TODO: This is not fast. Most of the overhead goes here.\nfunc (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {\n\tif depth > f.opts.MaxLogDepth {\n\t\treturn `\"<max-log-depth-exceeded>\"`\n\t}\n\n\t// Handle types that take full control of logging.\n\tif v, ok := value.(logr.Marshaler); ok {\n\t\t// Replace the value with what the type wants to get logged.\n\t\t// That then gets handled below via reflection.\n\t\tvalue = invokeMarshaler(v)\n\t}\n\n\t// Handle types that want to format themselves.\n\tswitch v := value.(type) {\n\tcase fmt.Stringer:\n\t\tvalue = invokeStringer(v)\n\tcase error:\n\t\tvalue = invokeError(v)\n\t}\n\n\t// Handling the most common types without reflect is a small perf win.\n\tswitch v := value.(type) {\n\tcase bool:\n\t\treturn strconv.FormatBool(v)\n\tcase string:\n\t\treturn prettyString(v)\n\tcase int:\n\t\treturn strconv.FormatInt(int64(v), 10)\n\tcase int8:\n\t\treturn strconv.FormatInt(int64(v), 10)\n\tcase int16:\n\t\treturn strconv.FormatInt(int64(v), 10)\n\tcase int32:\n\t\treturn strconv.FormatInt(int64(v), 10)\n\tcase int64:\n\t\treturn strconv.FormatInt(int64(v), 10)\n\tcase uint:\n\t\treturn strconv.FormatUint(uint64(v), 10)\n\tcase uint8:\n\t\treturn strconv.FormatUint(uint64(v), 10)\n\tcase uint16:\n\t\treturn strconv.FormatUint(uint64(v), 10)\n\tcase uint32:\n\t\treturn strconv.FormatUint(uint64(v), 10)\n\tcase uint64:\n\t\treturn strconv.FormatUint(v, 10)\n\tcase uintptr:\n\t\treturn strconv.FormatUint(uint64(v), 10)\n\tcase float32:\n\t\treturn strconv.FormatFloat(float64(v), 'f', -1, 32)\n\tcase float64:\n\t\treturn strconv.FormatFloat(v, 'f', -1, 64)\n\tcase complex64:\n\t\treturn `\"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `\"`\n\tcase complex128:\n\t\treturn `\"` + strconv.FormatComplex(v, 'f', -1, 128) + `\"`\n\tcase PseudoStruct:\n\t\tbuf := bytes.NewBuffer(make([]byte, 0, 1024))\n\t\tv = f.sanitize(v)\n\t\tif flags&flagRawStruct == 0 {\n\t\t\tbuf.WriteByte('{')\n\t\t}\n\t\tfor i := 0; i < len(v); i += 2 {\n\t\t\tif i > 0 {\n\t\t\t\tbuf.WriteByte(f.comma())\n\t\t\t}\n\t\t\tk, _ := v[i].(string) // sanitize() above means no need to check success\n\t\t\t// arbitrary keys might need escaping\n\t\t\tbuf.WriteString(prettyString(k))\n\t\t\tbuf.WriteByte(f.colon())\n\t\t\tbuf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1))\n\t\t}\n\t\tif flags&flagRawStruct == 0 {\n\t\t\tbuf.WriteByte('}')\n\t\t}\n\t\treturn buf.String()\n\t}\n\n\tbuf := bytes.NewBuffer(make([]byte, 0, 256))\n\tt := reflect.TypeOf(value)\n\tif t == nil {\n\t\treturn \"null\"\n\t}\n\tv := reflect.ValueOf(value)\n\tswitch t.Kind() {\n\tcase reflect.Bool:\n\t\treturn strconv.FormatBool(v.Bool())\n\tcase reflect.String:\n\t\treturn prettyString(v.String())\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn strconv.FormatInt(int64(v.Int()), 10)\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn strconv.FormatUint(uint64(v.Uint()), 10)\n\tcase reflect.Float32:\n\t\treturn strconv.FormatFloat(float64(v.Float()), 'f', -1, 32)\n\tcase reflect.Float64:\n\t\treturn strconv.FormatFloat(v.Float(), 'f', -1, 64)\n\tcase reflect.Complex64:\n\t\treturn `\"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `\"`\n\tcase reflect.Complex128:\n\t\treturn `\"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `\"`\n\tcase reflect.Struct:\n\t\tif flags&flagRawStruct == 0 {\n\t\t\tbuf.WriteByte('{')\n\t\t}\n\t\tprintComma := false // testing i>0 is not enough because of JSON omitted fields\n\t\tfor i := 0; i < t.NumField(); i++ {\n\t\t\tfld := t.Field(i)\n\t\t\tif fld.PkgPath != \"\" {\n\t\t\t\t// reflect says this field is only defined for non-exported fields.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !v.Field(i).CanInterface() {\n\t\t\t\t// reflect isn't clear exactly what this means, but we can't use it.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tname := \"\"\n\t\t\tomitempty := false\n\t\t\tif tag, found := fld.Tag.Lookup(\"json\"); found {\n\t\t\t\tif tag == \"-\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif comma := strings.Index(tag, \",\"); comma != -1 {\n\t\t\t\t\tif n := tag[:comma]; n != \"\" {\n\t\t\t\t\t\tname = n\n\t\t\t\t\t}\n\t\t\t\t\trest := tag[comma:]\n\t\t\t\t\tif strings.Contains(rest, \",omitempty,\") || strings.HasSuffix(rest, \",omitempty\") {\n\t\t\t\t\t\tomitempty = true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tname = tag\n\t\t\t\t}\n\t\t\t}\n\t\t\tif omitempty && isEmpty(v.Field(i)) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif printComma {\n\t\t\t\tbuf.WriteByte(f.comma())\n\t\t\t}\n\t\t\tprintComma = true // if we got here, we are rendering a field\n\t\t\tif fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == \"\" {\n\t\t\t\tbuf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif name == \"\" {\n\t\t\t\tname = fld.Name\n\t\t\t}\n\t\t\t// field names can't contain characters which need escaping\n\t\t\tbuf.WriteString(f.quoted(name, false))\n\t\t\tbuf.WriteByte(f.colon())\n\t\t\tbuf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1))\n\t\t}\n\t\tif flags&flagRawStruct == 0 {\n\t\t\tbuf.WriteByte('}')\n\t\t}\n\t\treturn buf.String()\n\tcase reflect.Slice, reflect.Array:\n\t\t// If this is outputing as JSON make sure this isn't really a json.RawMessage.\n\t\t// If so just emit \"as-is\" and don't pretty it as that will just print\n\t\t// it as [X,Y,Z,...] which isn't terribly useful vs the string form you really want.\n\t\tif f.outputFormat == outputJSON {\n\t\t\tif rm, ok := value.(json.RawMessage); ok {\n\t\t\t\t// If it's empty make sure we emit an empty value as the array style would below.\n\t\t\t\tif len(rm) > 0 {\n\t\t\t\t\tbuf.Write(rm)\n\t\t\t\t} else {\n\t\t\t\t\tbuf.WriteString(\"null\")\n\t\t\t\t}\n\t\t\t\treturn buf.String()\n\t\t\t}\n\t\t}\n\t\tbuf.WriteByte('[')\n\t\tfor i := 0; i < v.Len(); i++ {\n\t\t\tif i > 0 {\n\t\t\t\tbuf.WriteByte(f.comma())\n\t\t\t}\n\t\t\te := v.Index(i)\n\t\t\tbuf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1))\n\t\t}\n\t\tbuf.WriteByte(']')\n\t\treturn buf.String()\n\tcase reflect.Map:\n\t\tbuf.WriteByte('{')\n\t\t// This does not sort the map keys, for best perf.\n\t\tit := v.MapRange()\n\t\ti := 0\n\t\tfor it.Next() {\n\t\t\tif i > 0 {\n\t\t\t\tbuf.WriteByte(f.comma())\n\t\t\t}\n\t\t\t// If a map key supports TextMarshaler, use it.\n\t\t\tkeystr := \"\"\n\t\t\tif m, ok := it.Key().Interface().(encoding.TextMarshaler); ok {\n\t\t\t\ttxt, err := m.MarshalText()\n\t\t\t\tif err != nil {\n\t\t\t\t\tkeystr = fmt.Sprintf(\"<error-MarshalText: %s>\", err.Error())\n\t\t\t\t} else {\n\t\t\t\t\tkeystr = string(txt)\n\t\t\t\t}\n\t\t\t\tkeystr = prettyString(keystr)\n\t\t\t} else {\n\t\t\t\t// prettyWithFlags will produce already-escaped values\n\t\t\t\tkeystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1)\n\t\t\t\tif t.Key().Kind() != reflect.String {\n\t\t\t\t\t// JSON only does string keys.  Unlike Go's standard JSON, we'll\n\t\t\t\t\t// convert just about anything to a string.\n\t\t\t\t\tkeystr = prettyString(keystr)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.WriteString(keystr)\n\t\t\tbuf.WriteByte(f.colon())\n\t\t\tbuf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1))\n\t\t\ti++\n\t\t}\n\t\tbuf.WriteByte('}')\n\t\treturn buf.String()\n\tcase reflect.Ptr, reflect.Interface:\n\t\tif v.IsNil() {\n\t\t\treturn \"null\"\n\t\t}\n\t\treturn f.prettyWithFlags(v.Elem().Interface(), 0, depth)\n\t}\n\treturn fmt.Sprintf(`\"<unhandled-%s>\"`, t.Kind().String())\n}\n\nfunc prettyString(s string) string {\n\t// Avoid escaping (which does allocations) if we can.\n\tif needsEscape(s) {\n\t\treturn strconv.Quote(s)\n\t}\n\tb := bytes.NewBuffer(make([]byte, 0, 1024))\n\tb.WriteByte('\"')\n\tb.WriteString(s)\n\tb.WriteByte('\"')\n\treturn b.String()\n}\n\n// needsEscape determines whether the input string needs to be escaped or not,\n// without doing any allocations.\nfunc needsEscape(s string) bool {\n\tfor _, r := range s {\n\t\tif !strconv.IsPrint(r) || r == '\\\\' || r == '\"' {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc isEmpty(v reflect.Value) bool {\n\tswitch v.Kind() {\n\tcase reflect.Array, reflect.Map, reflect.Slice, reflect.String:\n\t\treturn v.Len() == 0\n\tcase reflect.Bool:\n\t\treturn !v.Bool()\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn v.Int() == 0\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn v.Uint() == 0\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn v.Float() == 0\n\tcase reflect.Complex64, reflect.Complex128:\n\t\treturn v.Complex() == 0\n\tcase reflect.Interface, reflect.Ptr:\n\t\treturn v.IsNil()\n\t}\n\treturn false\n}\n\nfunc invokeMarshaler(m logr.Marshaler) (ret any) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tret = fmt.Sprintf(\"<panic: %s>\", r)\n\t\t}\n\t}()\n\treturn m.MarshalLog()\n}\n\nfunc invokeStringer(s fmt.Stringer) (ret string) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tret = fmt.Sprintf(\"<panic: %s>\", r)\n\t\t}\n\t}()\n\treturn s.String()\n}\n\nfunc invokeError(e error) (ret string) {\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tret = fmt.Sprintf(\"<panic: %s>\", r)\n\t\t}\n\t}()\n\treturn e.Error()\n}\n\n// Caller represents the original call site for a log line, after considering\n// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper.  The File and\n// Line fields will always be provided, while the Func field is optional.\n// Users can set the render hook fields in Options to examine logged key-value\n// pairs, one of which will be {\"caller\", Caller} if the Options.LogCaller\n// field is enabled for the given MessageClass.\ntype Caller struct {\n\t// File is the basename of the file for this call site.\n\tFile string `json:\"file\"`\n\t// Line is the line number in the file for this call site.\n\tLine int `json:\"line\"`\n\t// Func is the function name for this call site, or empty if\n\t// Options.LogCallerFunc is not enabled.\n\tFunc string `json:\"function,omitempty\"`\n}\n\nfunc (f Formatter) caller() Caller {\n\t// +1 for this frame, +1 for Info/Error.\n\tpc, file, line, ok := runtime.Caller(f.depth + 2)\n\tif !ok {\n\t\treturn Caller{\"<unknown>\", 0, \"\"}\n\t}\n\tfn := \"\"\n\tif f.opts.LogCallerFunc {\n\t\tif fp := runtime.FuncForPC(pc); fp != nil {\n\t\t\tfn = fp.Name()\n\t\t}\n\t}\n\n\treturn Caller{filepath.Base(file), line, fn}\n}\n\nconst noValue = \"<no-value>\"\n\nfunc (f Formatter) nonStringKey(v any) string {\n\treturn fmt.Sprintf(\"<non-string-key: %s>\", f.snippet(v))\n}\n\n// snippet produces a short snippet string of an arbitrary value.\nfunc (f Formatter) snippet(v any) string {\n\tconst snipLen = 16\n\n\tsnip := f.pretty(v)\n\tif len(snip) > snipLen {\n\t\tsnip = snip[:snipLen]\n\t}\n\treturn snip\n}\n\n// sanitize ensures that a list of key-value pairs has a value for every key\n// (adding a value if needed) and that each key is a string (substituting a key\n// if needed).\nfunc (f Formatter) sanitize(kvList []any) []any {\n\tif len(kvList)%2 != 0 {\n\t\tkvList = append(kvList, noValue)\n\t}\n\tfor i := 0; i < len(kvList); i += 2 {\n\t\t_, ok := kvList[i].(string)\n\t\tif !ok {\n\t\t\tkvList[i] = f.nonStringKey(kvList[i])\n\t\t}\n\t}\n\treturn kvList\n}\n\n// startGroup opens a new group scope (basically a sub-struct), which locks all\n// the current saved values and starts them anew.  This is needed to satisfy\n// slog.\nfunc (f *Formatter) startGroup(name string) {\n\t// Unnamed groups are just inlined.\n\tif name == \"\" {\n\t\treturn\n\t}\n\n\tn := len(f.groups)\n\tf.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr})\n\n\t// Start collecting new values.\n\tf.groupName = name\n\tf.valuesStr = \"\"\n\tf.values = nil\n}\n\n// Init configures this Formatter from runtime info, such as the call depth\n// imposed by logr itself.\n// Note that this receiver is a pointer, so depth can be saved.\nfunc (f *Formatter) Init(info logr.RuntimeInfo) {\n\tf.depth += info.CallDepth\n}\n\n// Enabled checks whether an info message at the given level should be logged.\nfunc (f Formatter) Enabled(level int) bool {\n\treturn level <= f.opts.Verbosity\n}\n\n// GetDepth returns the current depth of this Formatter.  This is useful for\n// implementations which do their own caller attribution.\nfunc (f Formatter) GetDepth() int {\n\treturn f.depth\n}\n\n// FormatInfo renders an Info log message into strings.  The prefix will be\n// empty when no names were set (via AddNames), or when the output is\n// configured for JSON.\nfunc (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, argsStr string) {\n\targs := make([]any, 0, 64) // using a constant here impacts perf\n\tprefix = f.prefix\n\tif f.outputFormat == outputJSON {\n\t\targs = append(args, \"logger\", prefix)\n\t\tprefix = \"\"\n\t}\n\tif f.opts.LogTimestamp {\n\t\targs = append(args, \"ts\", time.Now().Format(f.opts.TimestampFormat))\n\t}\n\tif policy := f.opts.LogCaller; policy == All || policy == Info {\n\t\targs = append(args, \"caller\", f.caller())\n\t}\n\tif key := *f.opts.LogInfoLevel; key != \"\" {\n\t\targs = append(args, key, level)\n\t}\n\targs = append(args, \"msg\", msg)\n\treturn prefix, f.render(args, kvList)\n}\n\n// FormatError renders an Error log message into strings.  The prefix will be\n// empty when no names were set (via AddNames), or when the output is\n// configured for JSON.\nfunc (f Formatter) FormatError(err error, msg string, kvList []any) (prefix, argsStr string) {\n\targs := make([]any, 0, 64) // using a constant here impacts perf\n\tprefix = f.prefix\n\tif f.outputFormat == outputJSON {\n\t\targs = append(args, \"logger\", prefix)\n\t\tprefix = \"\"\n\t}\n\tif f.opts.LogTimestamp {\n\t\targs = append(args, \"ts\", time.Now().Format(f.opts.TimestampFormat))\n\t}\n\tif policy := f.opts.LogCaller; policy == All || policy == Error {\n\t\targs = append(args, \"caller\", f.caller())\n\t}\n\targs = append(args, \"msg\", msg)\n\tvar loggableErr any\n\tif err != nil {\n\t\tloggableErr = err.Error()\n\t}\n\targs = append(args, \"error\", loggableErr)\n\treturn prefix, f.render(args, kvList)\n}\n\n// AddName appends the specified name.  funcr uses '/' characters to separate\n// name elements.  Callers should not pass '/' in the provided name string, but\n// this library does not actually enforce that.\nfunc (f *Formatter) AddName(name string) {\n\tif len(f.prefix) > 0 {\n\t\tf.prefix += \"/\"\n\t}\n\tf.prefix += name\n}\n\n// AddValues adds key-value pairs to the set of saved values to be logged with\n// each log line.\nfunc (f *Formatter) AddValues(kvList []any) {\n\t// Three slice args forces a copy.\n\tn := len(f.values)\n\tf.values = append(f.values[:n:n], kvList...)\n\n\tvals := f.values\n\tif hook := f.opts.RenderValuesHook; hook != nil {\n\t\tvals = hook(f.sanitize(vals))\n\t}\n\n\t// Pre-render values, so we don't have to do it on each Info/Error call.\n\tbuf := bytes.NewBuffer(make([]byte, 0, 1024))\n\tf.flatten(buf, vals, true) // escape user-provided keys\n\tf.valuesStr = buf.String()\n}\n\n// AddCallDepth increases the number of stack-frames to skip when attributing\n// the log line to a file and line.\nfunc (f *Formatter) AddCallDepth(depth int) {\n\tf.depth += depth\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/funcr/slogsink.go",
    "content": "//go:build go1.21\n// +build go1.21\n\n/*\nCopyright 2023 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage funcr\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n\n\t\"github.com/go-logr/logr\"\n)\n\nvar _ logr.SlogSink = &fnlogger{}\n\nconst extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink\n\nfunc (l fnlogger) Handle(_ context.Context, record slog.Record) error {\n\tkvList := make([]any, 0, 2*record.NumAttrs())\n\trecord.Attrs(func(attr slog.Attr) bool {\n\t\tkvList = attrToKVs(attr, kvList)\n\t\treturn true\n\t})\n\n\tif record.Level >= slog.LevelError {\n\t\tl.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...)\n\t} else {\n\t\tlevel := l.levelFromSlog(record.Level)\n\t\tl.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...)\n\t}\n\treturn nil\n}\n\nfunc (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink {\n\tkvList := make([]any, 0, 2*len(attrs))\n\tfor _, attr := range attrs {\n\t\tkvList = attrToKVs(attr, kvList)\n\t}\n\tl.AddValues(kvList)\n\treturn &l\n}\n\nfunc (l fnlogger) WithGroup(name string) logr.SlogSink {\n\tl.startGroup(name)\n\treturn &l\n}\n\n// attrToKVs appends a slog.Attr to a logr-style kvList.  It handle slog Groups\n// and other details of slog.\nfunc attrToKVs(attr slog.Attr, kvList []any) []any {\n\tattrVal := attr.Value.Resolve()\n\tif attrVal.Kind() == slog.KindGroup {\n\t\tgroupVal := attrVal.Group()\n\t\tgrpKVs := make([]any, 0, 2*len(groupVal))\n\t\tfor _, attr := range groupVal {\n\t\t\tgrpKVs = attrToKVs(attr, grpKVs)\n\t\t}\n\t\tif attr.Key == \"\" {\n\t\t\t// slog says we have to inline these\n\t\t\tkvList = append(kvList, grpKVs...)\n\t\t} else {\n\t\t\tkvList = append(kvList, attr.Key, PseudoStruct(grpKVs))\n\t\t}\n\t} else if attr.Key != \"\" {\n\t\tkvList = append(kvList, attr.Key, attrVal.Any())\n\t}\n\n\treturn kvList\n}\n\n// levelFromSlog adjusts the level by the logger's verbosity and negates it.\n// It ensures that the result is >= 0. This is necessary because the result is\n// passed to a LogSink and that API did not historically document whether\n// levels could be negative or what that meant.\n//\n// Some example usage:\n//\n//\tlogrV0 := getMyLogger()\n//\tlogrV2 := logrV0.V(2)\n//\tslogV2 := slog.New(logr.ToSlogHandler(logrV2))\n//\tslogV2.Debug(\"msg\") // =~ logrV2.V(4) =~ logrV0.V(6)\n//\tslogV2.Info(\"msg\")  // =~  logrV2.V(0) =~ logrV0.V(2)\n//\tslogv2.Warn(\"msg\")  // =~ logrV2.V(-4) =~ logrV0.V(0)\nfunc (l fnlogger) levelFromSlog(level slog.Level) int {\n\tresult := -level\n\tif result < 0 {\n\t\tresult = 0 // because LogSink doesn't expect negative V levels\n\t}\n\treturn int(result)\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/logr.go",
    "content": "/*\nCopyright 2019 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// This design derives from Dave Cheney's blog:\n//     http://dave.cheney.net/2015/11/05/lets-talk-about-logging\n\n// Package logr defines a general-purpose logging API and abstract interfaces\n// to back that API.  Packages in the Go ecosystem can depend on this package,\n// while callers can implement logging with whatever backend is appropriate.\n//\n// # Usage\n//\n// Logging is done using a Logger instance.  Logger is a concrete type with\n// methods, which defers the actual logging to a LogSink interface.  The main\n// methods of Logger are Info() and Error().  Arguments to Info() and Error()\n// are key/value pairs rather than printf-style formatted strings, emphasizing\n// \"structured logging\".\n//\n// With Go's standard log package, we might write:\n//\n//\tlog.Printf(\"setting target value %s\", targetValue)\n//\n// With logr's structured logging, we'd write:\n//\n//\tlogger.Info(\"setting target\", \"value\", targetValue)\n//\n// Errors are much the same.  Instead of:\n//\n//\tlog.Printf(\"failed to open the pod bay door for user %s: %v\", user, err)\n//\n// We'd write:\n//\n//\tlogger.Error(err, \"failed to open the pod bay door\", \"user\", user)\n//\n// Info() and Error() are very similar, but they are separate methods so that\n// LogSink implementations can choose to do things like attach additional\n// information (such as stack traces) on calls to Error(). Error() messages are\n// always logged, regardless of the current verbosity.  If there is no error\n// instance available, passing nil is valid.\n//\n// # Verbosity\n//\n// Often we want to log information only when the application in \"verbose\n// mode\".  To write log lines that are more verbose, Logger has a V() method.\n// The higher the V-level of a log line, the less critical it is considered.\n// Log-lines with V-levels that are not enabled (as per the LogSink) will not\n// be written.  Level V(0) is the default, and logger.V(0).Info() has the same\n// meaning as logger.Info().  Negative V-levels have the same meaning as V(0).\n// Error messages do not have a verbosity level and are always logged.\n//\n// Where we might have written:\n//\n//\tif flVerbose >= 2 {\n//\t    log.Printf(\"an unusual thing happened\")\n//\t}\n//\n// We can write:\n//\n//\tlogger.V(2).Info(\"an unusual thing happened\")\n//\n// # Logger Names\n//\n// Logger instances can have name strings so that all messages logged through\n// that instance have additional context.  For example, you might want to add\n// a subsystem name:\n//\n//\tlogger.WithName(\"compactor\").Info(\"started\", \"time\", time.Now())\n//\n// The WithName() method returns a new Logger, which can be passed to\n// constructors or other functions for further use.  Repeated use of WithName()\n// will accumulate name \"segments\".  These name segments will be joined in some\n// way by the LogSink implementation.  It is strongly recommended that name\n// segments contain simple identifiers (letters, digits, and hyphen), and do\n// not contain characters that could muddle the log output or confuse the\n// joining operation (e.g. whitespace, commas, periods, slashes, brackets,\n// quotes, etc).\n//\n// # Saved Values\n//\n// Logger instances can store any number of key/value pairs, which will be\n// logged alongside all messages logged through that instance.  For example,\n// you might want to create a Logger instance per managed object:\n//\n// With the standard log package, we might write:\n//\n//\tlog.Printf(\"decided to set field foo to value %q for object %s/%s\",\n//\t    targetValue, object.Namespace, object.Name)\n//\n// With logr we'd write:\n//\n//\t// Elsewhere: set up the logger to log the object name.\n//\tobj.logger = mainLogger.WithValues(\n//\t    \"name\", obj.name, \"namespace\", obj.namespace)\n//\n//\t// later on...\n//\tobj.logger.Info(\"setting foo\", \"value\", targetValue)\n//\n// # Best Practices\n//\n// Logger has very few hard rules, with the goal that LogSink implementations\n// might have a lot of freedom to differentiate.  There are, however, some\n// things to consider.\n//\n// The log message consists of a constant message attached to the log line.\n// This should generally be a simple description of what's occurring, and should\n// never be a format string.  Variable information can then be attached using\n// named values.\n//\n// Keys are arbitrary strings, but should generally be constant values.  Values\n// may be any Go value, but how the value is formatted is determined by the\n// LogSink implementation.\n//\n// Logger instances are meant to be passed around by value. Code that receives\n// such a value can call its methods without having to check whether the\n// instance is ready for use.\n//\n// The zero logger (= Logger{}) is identical to Discard() and discards all log\n// entries. Code that receives a Logger by value can simply call it, the methods\n// will never crash. For cases where passing a logger is optional, a pointer to Logger\n// should be used.\n//\n// # Key Naming Conventions\n//\n// Keys are not strictly required to conform to any specification or regex, but\n// it is recommended that they:\n//   - be human-readable and meaningful (not auto-generated or simple ordinals)\n//   - be constant (not dependent on input data)\n//   - contain only printable characters\n//   - not contain whitespace or punctuation\n//   - use lower case for simple keys and lowerCamelCase for more complex ones\n//\n// These guidelines help ensure that log data is processed properly regardless\n// of the log implementation.  For example, log implementations will try to\n// output JSON data or will store data for later database (e.g. SQL) queries.\n//\n// While users are generally free to use key names of their choice, it's\n// generally best to avoid using the following keys, as they're frequently used\n// by implementations:\n//   - \"caller\": the calling information (file/line) of a particular log line\n//   - \"error\": the underlying error value in the `Error` method\n//   - \"level\": the log level\n//   - \"logger\": the name of the associated logger\n//   - \"msg\": the log message\n//   - \"stacktrace\": the stack trace associated with a particular log line or\n//     error (often from the `Error` message)\n//   - \"ts\": the timestamp for a log line\n//\n// Implementations are encouraged to make use of these keys to represent the\n// above concepts, when necessary (for example, in a pure-JSON output form, it\n// would be necessary to represent at least message and timestamp as ordinary\n// named values).\n//\n// # Break Glass\n//\n// Implementations may choose to give callers access to the underlying\n// logging implementation.  The recommended pattern for this is:\n//\n//\t// Underlier exposes access to the underlying logging implementation.\n//\t// Since callers only have a logr.Logger, they have to know which\n//\t// implementation is in use, so this interface is less of an abstraction\n//\t// and more of way to test type conversion.\n//\ttype Underlier interface {\n//\t    GetUnderlying() <underlying-type>\n//\t}\n//\n// Logger grants access to the sink to enable type assertions like this:\n//\n//\tfunc DoSomethingWithImpl(log logr.Logger) {\n//\t    if underlier, ok := log.GetSink().(impl.Underlier); ok {\n//\t       implLogger := underlier.GetUnderlying()\n//\t       ...\n//\t    }\n//\t}\n//\n// Custom `With*` functions can be implemented by copying the complete\n// Logger struct and replacing the sink in the copy:\n//\n//\t// WithFooBar changes the foobar parameter in the log sink and returns a\n//\t// new logger with that modified sink.  It does nothing for loggers where\n//\t// the sink doesn't support that parameter.\n//\tfunc WithFoobar(log logr.Logger, foobar int) logr.Logger {\n//\t   if foobarLogSink, ok := log.GetSink().(FoobarSink); ok {\n//\t      log = log.WithSink(foobarLogSink.WithFooBar(foobar))\n//\t   }\n//\t   return log\n//\t}\n//\n// Don't use New to construct a new Logger with a LogSink retrieved from an\n// existing Logger. Source code attribution might not work correctly and\n// unexported fields in Logger get lost.\n//\n// Beware that the same LogSink instance may be shared by different logger\n// instances. Calling functions that modify the LogSink will affect all of\n// those.\npackage logr\n\n// New returns a new Logger instance.  This is primarily used by libraries\n// implementing LogSink, rather than end users.  Passing a nil sink will create\n// a Logger which discards all log lines.\nfunc New(sink LogSink) Logger {\n\tlogger := Logger{}\n\tlogger.setSink(sink)\n\tif sink != nil {\n\t\tsink.Init(runtimeInfo)\n\t}\n\treturn logger\n}\n\n// setSink stores the sink and updates any related fields. It mutates the\n// logger and thus is only safe to use for loggers that are not currently being\n// used concurrently.\nfunc (l *Logger) setSink(sink LogSink) {\n\tl.sink = sink\n}\n\n// GetSink returns the stored sink.\nfunc (l Logger) GetSink() LogSink {\n\treturn l.sink\n}\n\n// WithSink returns a copy of the logger with the new sink.\nfunc (l Logger) WithSink(sink LogSink) Logger {\n\tl.setSink(sink)\n\treturn l\n}\n\n// Logger is an interface to an abstract logging implementation.  This is a\n// concrete type for performance reasons, but all the real work is passed on to\n// a LogSink.  Implementations of LogSink should provide their own constructors\n// that return Logger, not LogSink.\n//\n// The underlying sink can be accessed through GetSink and be modified through\n// WithSink. This enables the implementation of custom extensions (see \"Break\n// Glass\" in the package documentation). Normally the sink should be used only\n// indirectly.\ntype Logger struct {\n\tsink  LogSink\n\tlevel int\n}\n\n// Enabled tests whether this Logger is enabled.  For example, commandline\n// flags might be used to set the logging verbosity and disable some info logs.\nfunc (l Logger) Enabled() bool {\n\t// Some implementations of LogSink look at the caller in Enabled (e.g.\n\t// different verbosity levels per package or file), but we only pass one\n\t// CallDepth in (via Init).  This means that all calls from Logger to the\n\t// LogSink's Enabled, Info, and Error methods must have the same number of\n\t// frames.  In other words, Logger methods can't call other Logger methods\n\t// which call these LogSink methods unless we do it the same in all paths.\n\treturn l.sink != nil && l.sink.Enabled(l.level)\n}\n\n// Info logs a non-error message with the given key/value pairs as context.\n//\n// The msg argument should be used to add some constant description to the log\n// line.  The key/value pairs can then be used to add additional variable\n// information.  The key/value pairs must alternate string keys and arbitrary\n// values.\nfunc (l Logger) Info(msg string, keysAndValues ...any) {\n\tif l.sink == nil {\n\t\treturn\n\t}\n\tif l.sink.Enabled(l.level) { // see comment in Enabled\n\t\tif withHelper, ok := l.sink.(CallStackHelperLogSink); ok {\n\t\t\twithHelper.GetCallStackHelper()()\n\t\t}\n\t\tl.sink.Info(l.level, msg, keysAndValues...)\n\t}\n}\n\n// Error logs an error, with the given message and key/value pairs as context.\n// It functions similarly to Info, but may have unique behavior, and should be\n// preferred for logging errors (see the package documentations for more\n// information). The log message will always be emitted, regardless of\n// verbosity level.\n//\n// The msg argument should be used to add context to any underlying error,\n// while the err argument should be used to attach the actual error that\n// triggered this log line, if present. The err parameter is optional\n// and nil may be passed instead of an error instance.\nfunc (l Logger) Error(err error, msg string, keysAndValues ...any) {\n\tif l.sink == nil {\n\t\treturn\n\t}\n\tif withHelper, ok := l.sink.(CallStackHelperLogSink); ok {\n\t\twithHelper.GetCallStackHelper()()\n\t}\n\tl.sink.Error(err, msg, keysAndValues...)\n}\n\n// V returns a new Logger instance for a specific verbosity level, relative to\n// this Logger.  In other words, V-levels are additive.  A higher verbosity\n// level means a log message is less important.  Negative V-levels are treated\n// as 0.\nfunc (l Logger) V(level int) Logger {\n\tif l.sink == nil {\n\t\treturn l\n\t}\n\tif level < 0 {\n\t\tlevel = 0\n\t}\n\tl.level += level\n\treturn l\n}\n\n// GetV returns the verbosity level of the logger. If the logger's LogSink is\n// nil as in the Discard logger, this will always return 0.\nfunc (l Logger) GetV() int {\n\t// 0 if l.sink nil because of the if check in V above.\n\treturn l.level\n}\n\n// WithValues returns a new Logger instance with additional key/value pairs.\n// See Info for documentation on how key/value pairs work.\nfunc (l Logger) WithValues(keysAndValues ...any) Logger {\n\tif l.sink == nil {\n\t\treturn l\n\t}\n\tl.setSink(l.sink.WithValues(keysAndValues...))\n\treturn l\n}\n\n// WithName returns a new Logger instance with the specified name element added\n// to the Logger's name.  Successive calls with WithName append additional\n// suffixes to the Logger's name.  It's strongly recommended that name segments\n// contain only letters, digits, and hyphens (see the package documentation for\n// more information).\nfunc (l Logger) WithName(name string) Logger {\n\tif l.sink == nil {\n\t\treturn l\n\t}\n\tl.setSink(l.sink.WithName(name))\n\treturn l\n}\n\n// WithCallDepth returns a Logger instance that offsets the call stack by the\n// specified number of frames when logging call site information, if possible.\n// This is useful for users who have helper functions between the \"real\" call\n// site and the actual calls to Logger methods.  If depth is 0 the attribution\n// should be to the direct caller of this function.  If depth is 1 the\n// attribution should skip 1 call frame, and so on.  Successive calls to this\n// are additive.\n//\n// If the underlying log implementation supports a WithCallDepth(int) method,\n// it will be called and the result returned.  If the implementation does not\n// support CallDepthLogSink, the original Logger will be returned.\n//\n// To skip one level, WithCallStackHelper() should be used instead of\n// WithCallDepth(1) because it works with implementions that support the\n// CallDepthLogSink and/or CallStackHelperLogSink interfaces.\nfunc (l Logger) WithCallDepth(depth int) Logger {\n\tif l.sink == nil {\n\t\treturn l\n\t}\n\tif withCallDepth, ok := l.sink.(CallDepthLogSink); ok {\n\t\tl.setSink(withCallDepth.WithCallDepth(depth))\n\t}\n\treturn l\n}\n\n// WithCallStackHelper returns a new Logger instance that skips the direct\n// caller when logging call site information, if possible.  This is useful for\n// users who have helper functions between the \"real\" call site and the actual\n// calls to Logger methods and want to support loggers which depend on marking\n// each individual helper function, like loggers based on testing.T.\n//\n// In addition to using that new logger instance, callers also must call the\n// returned function.\n//\n// If the underlying log implementation supports a WithCallDepth(int) method,\n// WithCallDepth(1) will be called to produce a new logger. If it supports a\n// WithCallStackHelper() method, that will be also called. If the\n// implementation does not support either of these, the original Logger will be\n// returned.\nfunc (l Logger) WithCallStackHelper() (func(), Logger) {\n\tif l.sink == nil {\n\t\treturn func() {}, l\n\t}\n\tvar helper func()\n\tif withCallDepth, ok := l.sink.(CallDepthLogSink); ok {\n\t\tl.setSink(withCallDepth.WithCallDepth(1))\n\t}\n\tif withHelper, ok := l.sink.(CallStackHelperLogSink); ok {\n\t\thelper = withHelper.GetCallStackHelper()\n\t} else {\n\t\thelper = func() {}\n\t}\n\treturn helper, l\n}\n\n// IsZero returns true if this logger is an uninitialized zero value\nfunc (l Logger) IsZero() bool {\n\treturn l.sink == nil\n}\n\n// RuntimeInfo holds information that the logr \"core\" library knows which\n// LogSinks might want to know.\ntype RuntimeInfo struct {\n\t// CallDepth is the number of call frames the logr library adds between the\n\t// end-user and the LogSink.  LogSink implementations which choose to print\n\t// the original logging site (e.g. file & line) should climb this many\n\t// additional frames to find it.\n\tCallDepth int\n}\n\n// runtimeInfo is a static global.  It must not be changed at run time.\nvar runtimeInfo = RuntimeInfo{\n\tCallDepth: 1,\n}\n\n// LogSink represents a logging implementation.  End-users will generally not\n// interact with this type.\ntype LogSink interface {\n\t// Init receives optional information about the logr library for LogSink\n\t// implementations that need it.\n\tInit(info RuntimeInfo)\n\n\t// Enabled tests whether this LogSink is enabled at the specified V-level.\n\t// For example, commandline flags might be used to set the logging\n\t// verbosity and disable some info logs.\n\tEnabled(level int) bool\n\n\t// Info logs a non-error message with the given key/value pairs as context.\n\t// The level argument is provided for optional logging.  This method will\n\t// only be called when Enabled(level) is true. See Logger.Info for more\n\t// details.\n\tInfo(level int, msg string, keysAndValues ...any)\n\n\t// Error logs an error, with the given message and key/value pairs as\n\t// context.  See Logger.Error for more details.\n\tError(err error, msg string, keysAndValues ...any)\n\n\t// WithValues returns a new LogSink with additional key/value pairs.  See\n\t// Logger.WithValues for more details.\n\tWithValues(keysAndValues ...any) LogSink\n\n\t// WithName returns a new LogSink with the specified name appended.  See\n\t// Logger.WithName for more details.\n\tWithName(name string) LogSink\n}\n\n// CallDepthLogSink represents a LogSink that knows how to climb the call stack\n// to identify the original call site and can offset the depth by a specified\n// number of frames.  This is useful for users who have helper functions\n// between the \"real\" call site and the actual calls to Logger methods.\n// Implementations that log information about the call site (such as file,\n// function, or line) would otherwise log information about the intermediate\n// helper functions.\n//\n// This is an optional interface and implementations are not required to\n// support it.\ntype CallDepthLogSink interface {\n\t// WithCallDepth returns a LogSink that will offset the call\n\t// stack by the specified number of frames when logging call\n\t// site information.\n\t//\n\t// If depth is 0, the LogSink should skip exactly the number\n\t// of call frames defined in RuntimeInfo.CallDepth when Info\n\t// or Error are called, i.e. the attribution should be to the\n\t// direct caller of Logger.Info or Logger.Error.\n\t//\n\t// If depth is 1 the attribution should skip 1 call frame, and so on.\n\t// Successive calls to this are additive.\n\tWithCallDepth(depth int) LogSink\n}\n\n// CallStackHelperLogSink represents a LogSink that knows how to climb\n// the call stack to identify the original call site and can skip\n// intermediate helper functions if they mark themselves as\n// helper. Go's testing package uses that approach.\n//\n// This is useful for users who have helper functions between the\n// \"real\" call site and the actual calls to Logger methods.\n// Implementations that log information about the call site (such as\n// file, function, or line) would otherwise log information about the\n// intermediate helper functions.\n//\n// This is an optional interface and implementations are not required\n// to support it. Implementations that choose to support this must not\n// simply implement it as WithCallDepth(1), because\n// Logger.WithCallStackHelper will call both methods if they are\n// present. This should only be implemented for LogSinks that actually\n// need it, as with testing.T.\ntype CallStackHelperLogSink interface {\n\t// GetCallStackHelper returns a function that must be called\n\t// to mark the direct caller as helper function when logging\n\t// call site information.\n\tGetCallStackHelper() func()\n}\n\n// Marshaler is an optional interface that logged values may choose to\n// implement. Loggers with structured output, such as JSON, should\n// log the object return by the MarshalLog method instead of the\n// original value.\ntype Marshaler interface {\n\t// MarshalLog can be used to:\n\t//   - ensure that structs are not logged as strings when the original\n\t//     value has a String method: return a different type without a\n\t//     String method\n\t//   - select which fields of a complex type should get logged:\n\t//     return a simpler struct with fewer fields\n\t//   - log unexported fields: return a different struct\n\t//     with exported fields\n\t//\n\t// It may return any value of any type.\n\tMarshalLog() any\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/sloghandler.go",
    "content": "//go:build go1.21\n// +build go1.21\n\n/*\nCopyright 2023 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n)\n\ntype slogHandler struct {\n\t// May be nil, in which case all logs get discarded.\n\tsink LogSink\n\t// Non-nil if sink is non-nil and implements SlogSink.\n\tslogSink SlogSink\n\n\t// groupPrefix collects values from WithGroup calls. It gets added as\n\t// prefix to value keys when handling a log record.\n\tgroupPrefix string\n\n\t// levelBias can be set when constructing the handler to influence the\n\t// slog.Level of log records. A positive levelBias reduces the\n\t// slog.Level value. slog has no API to influence this value after the\n\t// handler got created, so it can only be set indirectly through\n\t// Logger.V.\n\tlevelBias slog.Level\n}\n\nvar _ slog.Handler = &slogHandler{}\n\n// groupSeparator is used to concatenate WithGroup names and attribute keys.\nconst groupSeparator = \".\"\n\n// GetLevel is used for black box unit testing.\nfunc (l *slogHandler) GetLevel() slog.Level {\n\treturn l.levelBias\n}\n\nfunc (l *slogHandler) Enabled(_ context.Context, level slog.Level) bool {\n\treturn l.sink != nil && (level >= slog.LevelError || l.sink.Enabled(l.levelFromSlog(level)))\n}\n\nfunc (l *slogHandler) Handle(ctx context.Context, record slog.Record) error {\n\tif l.slogSink != nil {\n\t\t// Only adjust verbosity level of log entries < slog.LevelError.\n\t\tif record.Level < slog.LevelError {\n\t\t\trecord.Level -= l.levelBias\n\t\t}\n\t\treturn l.slogSink.Handle(ctx, record)\n\t}\n\n\t// No need to check for nil sink here because Handle will only be called\n\t// when Enabled returned true.\n\n\tkvList := make([]any, 0, 2*record.NumAttrs())\n\trecord.Attrs(func(attr slog.Attr) bool {\n\t\tkvList = attrToKVs(attr, l.groupPrefix, kvList)\n\t\treturn true\n\t})\n\tif record.Level >= slog.LevelError {\n\t\tl.sinkWithCallDepth().Error(nil, record.Message, kvList...)\n\t} else {\n\t\tlevel := l.levelFromSlog(record.Level)\n\t\tl.sinkWithCallDepth().Info(level, record.Message, kvList...)\n\t}\n\treturn nil\n}\n\n// sinkWithCallDepth adjusts the stack unwinding so that when Error or Info\n// are called by Handle, code in slog gets skipped.\n//\n// This offset currently (Go 1.21.0) works for calls through\n// slog.New(ToSlogHandler(...)).  There's no guarantee that the call\n// chain won't change. Wrapping the handler will also break unwinding. It's\n// still better than not adjusting at all....\n//\n// This cannot be done when constructing the handler because FromSlogHandler needs\n// access to the original sink without this adjustment. A second copy would\n// work, but then WithAttrs would have to be called for both of them.\nfunc (l *slogHandler) sinkWithCallDepth() LogSink {\n\tif sink, ok := l.sink.(CallDepthLogSink); ok {\n\t\treturn sink.WithCallDepth(2)\n\t}\n\treturn l.sink\n}\n\nfunc (l *slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler {\n\tif l.sink == nil || len(attrs) == 0 {\n\t\treturn l\n\t}\n\n\tclone := *l\n\tif l.slogSink != nil {\n\t\tclone.slogSink = l.slogSink.WithAttrs(attrs)\n\t\tclone.sink = clone.slogSink\n\t} else {\n\t\tkvList := make([]any, 0, 2*len(attrs))\n\t\tfor _, attr := range attrs {\n\t\t\tkvList = attrToKVs(attr, l.groupPrefix, kvList)\n\t\t}\n\t\tclone.sink = l.sink.WithValues(kvList...)\n\t}\n\treturn &clone\n}\n\nfunc (l *slogHandler) WithGroup(name string) slog.Handler {\n\tif l.sink == nil {\n\t\treturn l\n\t}\n\tif name == \"\" {\n\t\t// slog says to inline empty groups\n\t\treturn l\n\t}\n\tclone := *l\n\tif l.slogSink != nil {\n\t\tclone.slogSink = l.slogSink.WithGroup(name)\n\t\tclone.sink = clone.slogSink\n\t} else {\n\t\tclone.groupPrefix = addPrefix(clone.groupPrefix, name)\n\t}\n\treturn &clone\n}\n\n// attrToKVs appends a slog.Attr to a logr-style kvList.  It handle slog Groups\n// and other details of slog.\nfunc attrToKVs(attr slog.Attr, groupPrefix string, kvList []any) []any {\n\tattrVal := attr.Value.Resolve()\n\tif attrVal.Kind() == slog.KindGroup {\n\t\tgroupVal := attrVal.Group()\n\t\tgrpKVs := make([]any, 0, 2*len(groupVal))\n\t\tprefix := groupPrefix\n\t\tif attr.Key != \"\" {\n\t\t\tprefix = addPrefix(groupPrefix, attr.Key)\n\t\t}\n\t\tfor _, attr := range groupVal {\n\t\t\tgrpKVs = attrToKVs(attr, prefix, grpKVs)\n\t\t}\n\t\tkvList = append(kvList, grpKVs...)\n\t} else if attr.Key != \"\" {\n\t\tkvList = append(kvList, addPrefix(groupPrefix, attr.Key), attrVal.Any())\n\t}\n\n\treturn kvList\n}\n\nfunc addPrefix(prefix, name string) string {\n\tif prefix == \"\" {\n\t\treturn name\n\t}\n\tif name == \"\" {\n\t\treturn prefix\n\t}\n\treturn prefix + groupSeparator + name\n}\n\n// levelFromSlog adjusts the level by the logger's verbosity and negates it.\n// It ensures that the result is >= 0. This is necessary because the result is\n// passed to a LogSink and that API did not historically document whether\n// levels could be negative or what that meant.\n//\n// Some example usage:\n//\n//\tlogrV0 := getMyLogger()\n//\tlogrV2 := logrV0.V(2)\n//\tslogV2 := slog.New(logr.ToSlogHandler(logrV2))\n//\tslogV2.Debug(\"msg\") // =~ logrV2.V(4) =~ logrV0.V(6)\n//\tslogV2.Info(\"msg\")  // =~  logrV2.V(0) =~ logrV0.V(2)\n//\tslogv2.Warn(\"msg\")  // =~ logrV2.V(-4) =~ logrV0.V(0)\nfunc (l *slogHandler) levelFromSlog(level slog.Level) int {\n\tresult := -level\n\tresult += l.levelBias // in case the original Logger had a V level\n\tif result < 0 {\n\t\tresult = 0 // because LogSink doesn't expect negative V levels\n\t}\n\treturn int(result)\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/slogr.go",
    "content": "//go:build go1.21\n// +build go1.21\n\n/*\nCopyright 2023 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n)\n\n// FromSlogHandler returns a Logger which writes to the slog.Handler.\n//\n// The logr verbosity level is mapped to slog levels such that V(0) becomes\n// slog.LevelInfo and V(4) becomes slog.LevelDebug.\nfunc FromSlogHandler(handler slog.Handler) Logger {\n\tif handler, ok := handler.(*slogHandler); ok {\n\t\tif handler.sink == nil {\n\t\t\treturn Discard()\n\t\t}\n\t\treturn New(handler.sink).V(int(handler.levelBias))\n\t}\n\treturn New(&slogSink{handler: handler})\n}\n\n// ToSlogHandler returns a slog.Handler which writes to the same sink as the Logger.\n//\n// The returned logger writes all records with level >= slog.LevelError as\n// error log entries with LogSink.Error, regardless of the verbosity level of\n// the Logger:\n//\n//\tlogger := <some Logger with 0 as verbosity level>\n//\tslog.New(ToSlogHandler(logger.V(10))).Error(...) -> logSink.Error(...)\n//\n// The level of all other records gets reduced by the verbosity\n// level of the Logger and the result is negated. If it happens\n// to be negative, then it gets replaced by zero because a LogSink\n// is not expected to handled negative levels:\n//\n//\tslog.New(ToSlogHandler(logger)).Debug(...) -> logger.GetSink().Info(level=4, ...)\n//\tslog.New(ToSlogHandler(logger)).Warning(...) -> logger.GetSink().Info(level=0, ...)\n//\tslog.New(ToSlogHandler(logger)).Info(...) -> logger.GetSink().Info(level=0, ...)\n//\tslog.New(ToSlogHandler(logger.V(4))).Info(...) -> logger.GetSink().Info(level=4, ...)\nfunc ToSlogHandler(logger Logger) slog.Handler {\n\tif sink, ok := logger.GetSink().(*slogSink); ok && logger.GetV() == 0 {\n\t\treturn sink.handler\n\t}\n\n\thandler := &slogHandler{sink: logger.GetSink(), levelBias: slog.Level(logger.GetV())}\n\tif slogSink, ok := handler.sink.(SlogSink); ok {\n\t\thandler.slogSink = slogSink\n\t}\n\treturn handler\n}\n\n// SlogSink is an optional interface that a LogSink can implement to support\n// logging through the slog.Logger or slog.Handler APIs better. It then should\n// also support special slog values like slog.Group. When used as a\n// slog.Handler, the advantages are:\n//\n//   - stack unwinding gets avoided in favor of logging the pre-recorded PC,\n//     as intended by slog\n//   - proper grouping of key/value pairs via WithGroup\n//   - verbosity levels > slog.LevelInfo can be recorded\n//   - less overhead\n//\n// Both APIs (Logger and slog.Logger/Handler) then are supported equally\n// well. Developers can pick whatever API suits them better and/or mix\n// packages which use either API in the same binary with a common logging\n// implementation.\n//\n// This interface is necessary because the type implementing the LogSink\n// interface cannot also implement the slog.Handler interface due to the\n// different prototype of the common Enabled method.\n//\n// An implementation could support both interfaces in two different types, but then\n// additional interfaces would be needed to convert between those types in FromSlogHandler\n// and ToSlogHandler.\ntype SlogSink interface {\n\tLogSink\n\n\tHandle(ctx context.Context, record slog.Record) error\n\tWithAttrs(attrs []slog.Attr) SlogSink\n\tWithGroup(name string) SlogSink\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/logr/slogsink.go",
    "content": "//go:build go1.21\n// +build go1.21\n\n/*\nCopyright 2023 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage logr\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n\t\"runtime\"\n\t\"time\"\n)\n\nvar (\n\t_ LogSink          = &slogSink{}\n\t_ CallDepthLogSink = &slogSink{}\n\t_ Underlier        = &slogSink{}\n)\n\n// Underlier is implemented by the LogSink returned by NewFromLogHandler.\ntype Underlier interface {\n\t// GetUnderlying returns the Handler used by the LogSink.\n\tGetUnderlying() slog.Handler\n}\n\nconst (\n\t// nameKey is used to log the `WithName` values as an additional attribute.\n\tnameKey = \"logger\"\n\n\t// errKey is used to log the error parameter of Error as an additional attribute.\n\terrKey = \"err\"\n)\n\ntype slogSink struct {\n\tcallDepth int\n\tname      string\n\thandler   slog.Handler\n}\n\nfunc (l *slogSink) Init(info RuntimeInfo) {\n\tl.callDepth = info.CallDepth\n}\n\nfunc (l *slogSink) GetUnderlying() slog.Handler {\n\treturn l.handler\n}\n\nfunc (l *slogSink) WithCallDepth(depth int) LogSink {\n\tnewLogger := *l\n\tnewLogger.callDepth += depth\n\treturn &newLogger\n}\n\nfunc (l *slogSink) Enabled(level int) bool {\n\treturn l.handler.Enabled(context.Background(), slog.Level(-level))\n}\n\nfunc (l *slogSink) Info(level int, msg string, kvList ...interface{}) {\n\tl.log(nil, msg, slog.Level(-level), kvList...)\n}\n\nfunc (l *slogSink) Error(err error, msg string, kvList ...interface{}) {\n\tl.log(err, msg, slog.LevelError, kvList...)\n}\n\nfunc (l *slogSink) log(err error, msg string, level slog.Level, kvList ...interface{}) {\n\tvar pcs [1]uintptr\n\t// skip runtime.Callers, this function, Info/Error, and all helper functions above that.\n\truntime.Callers(3+l.callDepth, pcs[:])\n\n\trecord := slog.NewRecord(time.Now(), level, msg, pcs[0])\n\tif l.name != \"\" {\n\t\trecord.AddAttrs(slog.String(nameKey, l.name))\n\t}\n\tif err != nil {\n\t\trecord.AddAttrs(slog.Any(errKey, err))\n\t}\n\trecord.Add(kvList...)\n\t_ = l.handler.Handle(context.Background(), record)\n}\n\nfunc (l slogSink) WithName(name string) LogSink {\n\tif l.name != \"\" {\n\t\tl.name += \"/\"\n\t}\n\tl.name += name\n\treturn &l\n}\n\nfunc (l slogSink) WithValues(kvList ...interface{}) LogSink {\n\tl.handler = l.handler.WithAttrs(kvListToAttrs(kvList...))\n\treturn &l\n}\n\nfunc kvListToAttrs(kvList ...interface{}) []slog.Attr {\n\t// We don't need the record itself, only its Add method.\n\trecord := slog.NewRecord(time.Time{}, 0, \"\", 0)\n\trecord.Add(kvList...)\n\tattrs := make([]slog.Attr, 0, record.NumAttrs())\n\trecord.Attrs(func(attr slog.Attr) bool {\n\t\tattrs = append(attrs, attr)\n\t\treturn true\n\t})\n\treturn attrs\n}\n"
  },
  {
    "path": "vendor/github.com/go-logr/stdr/LICENSE",
    "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": "vendor/github.com/go-logr/stdr/README.md",
    "content": "# Minimal Go logging using logr and Go's standard library\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr)\n\nThis package implements the [logr interface](https://github.com/go-logr/logr)\nin terms of Go's standard log package(https://pkg.go.dev/log).\n"
  },
  {
    "path": "vendor/github.com/go-logr/stdr/stdr.go",
    "content": "/*\nCopyright 2019 The logr Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Package stdr implements github.com/go-logr/logr.Logger in terms of\n// Go's standard log package.\npackage stdr\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/go-logr/logr\"\n\t\"github.com/go-logr/logr/funcr\"\n)\n\n// The global verbosity level.  See SetVerbosity().\nvar globalVerbosity int\n\n// SetVerbosity sets the global level against which all info logs will be\n// compared.  If this is greater than or equal to the \"V\" of the logger, the\n// message will be logged.  A higher value here means more logs will be written.\n// The previous verbosity value is returned.  This is not concurrent-safe -\n// callers must be sure to call it from only one goroutine.\nfunc SetVerbosity(v int) int {\n\told := globalVerbosity\n\tglobalVerbosity = v\n\treturn old\n}\n\n// New returns a logr.Logger which is implemented by Go's standard log package,\n// or something like it.  If std is nil, this will use a default logger\n// instead.\n//\n// Example: stdr.New(log.New(os.Stderr, \"\", log.LstdFlags|log.Lshortfile)))\nfunc New(std StdLogger) logr.Logger {\n\treturn NewWithOptions(std, Options{})\n}\n\n// NewWithOptions returns a logr.Logger which is implemented by Go's standard\n// log package, or something like it.  See New for details.\nfunc NewWithOptions(std StdLogger, opts Options) logr.Logger {\n\tif std == nil {\n\t\t// Go's log.Default() is only available in 1.16 and higher.\n\t\tstd = log.New(os.Stderr, \"\", log.LstdFlags)\n\t}\n\n\tif opts.Depth < 0 {\n\t\topts.Depth = 0\n\t}\n\n\tfopts := funcr.Options{\n\t\tLogCaller: funcr.MessageClass(opts.LogCaller),\n\t}\n\n\tsl := &logger{\n\t\tFormatter: funcr.NewFormatter(fopts),\n\t\tstd:       std,\n\t}\n\n\t// For skipping our own logger.Info/Error.\n\tsl.Formatter.AddCallDepth(1 + opts.Depth)\n\n\treturn logr.New(sl)\n}\n\n// Options carries parameters which influence the way logs are generated.\ntype Options struct {\n\t// Depth biases the assumed number of call frames to the \"true\" caller.\n\t// This is useful when the calling code calls a function which then calls\n\t// stdr (e.g. a logging shim to another API).  Values less than zero will\n\t// be treated as zero.\n\tDepth int\n\n\t// LogCaller tells stdr to add a \"caller\" key to some or all log lines.\n\t// Go's log package has options to log this natively, too.\n\tLogCaller MessageClass\n\n\t// TODO: add an option to log the date/time\n}\n\n// MessageClass indicates which category or categories of messages to consider.\ntype MessageClass int\n\nconst (\n\t// None ignores all message classes.\n\tNone MessageClass = iota\n\t// All considers all message classes.\n\tAll\n\t// Info only considers info messages.\n\tInfo\n\t// Error only considers error messages.\n\tError\n)\n\n// StdLogger is the subset of the Go stdlib log.Logger API that is needed for\n// this adapter.\ntype StdLogger interface {\n\t// Output is the same as log.Output and log.Logger.Output.\n\tOutput(calldepth int, logline string) error\n}\n\ntype logger struct {\n\tfuncr.Formatter\n\tstd StdLogger\n}\n\nvar _ logr.LogSink = &logger{}\nvar _ logr.CallDepthLogSink = &logger{}\n\nfunc (l logger) Enabled(level int) bool {\n\treturn globalVerbosity >= level\n}\n\nfunc (l logger) Info(level int, msg string, kvList ...interface{}) {\n\tprefix, args := l.FormatInfo(level, msg, kvList)\n\tif prefix != \"\" {\n\t\targs = prefix + \": \" + args\n\t}\n\t_ = l.std.Output(l.Formatter.GetDepth()+1, args)\n}\n\nfunc (l logger) Error(err error, msg string, kvList ...interface{}) {\n\tprefix, args := l.FormatError(err, msg, kvList)\n\tif prefix != \"\" {\n\t\targs = prefix + \": \" + args\n\t}\n\t_ = l.std.Output(l.Formatter.GetDepth()+1, args)\n}\n\nfunc (l logger) WithName(name string) logr.LogSink {\n\tl.Formatter.AddName(name)\n\treturn &l\n}\n\nfunc (l logger) WithValues(kvList ...interface{}) logr.LogSink {\n\tl.Formatter.AddValues(kvList)\n\treturn &l\n}\n\nfunc (l logger) WithCallDepth(depth int) logr.LogSink {\n\tl.Formatter.AddCallDepth(depth)\n\treturn &l\n}\n\n// Underlier exposes access to the underlying logging implementation.  Since\n// callers only have a logr.Logger, they have to know which implementation is\n// in use, so this interface is less of an abstraction and more of way to test\n// type conversion.\ntype Underlier interface {\n\tGetUnderlying() StdLogger\n}\n\n// GetUnderlying returns the StdLogger underneath this logger.  Since StdLogger\n// is itself an interface, the result may or may not be a Go log.Logger.\nfunc (l logger) GetUnderlying() StdLogger {\n\treturn l.std\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/AUTHORS",
    "content": "# This source code refers to The Go Authors for copyright purposes.\n# The master list of authors is in the main Go distribution,\n# visible at http://tip.golang.org/AUTHORS.\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/CONTRIBUTORS",
    "content": "# This source code was written by the Go contributors.\n# The master list of contributors is in the main Go distribution,\n# visible at http://tip.golang.org/CONTRIBUTORS.\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/LICENSE",
    "content": "Copyright 2010 The Go Authors.  All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n    * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/buffer.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/encoding/prototext\"\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\nconst (\n\tWireVarint     = 0\n\tWireFixed32    = 5\n\tWireFixed64    = 1\n\tWireBytes      = 2\n\tWireStartGroup = 3\n\tWireEndGroup   = 4\n)\n\n// EncodeVarint returns the varint encoded bytes of v.\nfunc EncodeVarint(v uint64) []byte {\n\treturn protowire.AppendVarint(nil, v)\n}\n\n// SizeVarint returns the length of the varint encoded bytes of v.\n// This is equal to len(EncodeVarint(v)).\nfunc SizeVarint(v uint64) int {\n\treturn protowire.SizeVarint(v)\n}\n\n// DecodeVarint parses a varint encoded integer from b,\n// returning the integer value and the length of the varint.\n// It returns (0, 0) if there is a parse error.\nfunc DecodeVarint(b []byte) (uint64, int) {\n\tv, n := protowire.ConsumeVarint(b)\n\tif n < 0 {\n\t\treturn 0, 0\n\t}\n\treturn v, n\n}\n\n// Buffer is a buffer for encoding and decoding the protobuf wire format.\n// It may be reused between invocations to reduce memory usage.\ntype Buffer struct {\n\tbuf           []byte\n\tidx           int\n\tdeterministic bool\n}\n\n// NewBuffer allocates a new Buffer initialized with buf,\n// where the contents of buf are considered the unread portion of the buffer.\nfunc NewBuffer(buf []byte) *Buffer {\n\treturn &Buffer{buf: buf}\n}\n\n// SetDeterministic specifies whether to use deterministic serialization.\n//\n// Deterministic serialization guarantees that for a given binary, equal\n// messages will always be serialized to the same bytes. This implies:\n//\n//   - Repeated serialization of a message will return the same bytes.\n//   - Different processes of the same binary (which may be executing on\n//     different machines) will serialize equal messages to the same bytes.\n//\n// Note that the deterministic serialization is NOT canonical across\n// languages. It is not guaranteed to remain stable over time. It is unstable\n// across different builds with schema changes due to unknown fields.\n// Users who need canonical serialization (e.g., persistent storage in a\n// canonical form, fingerprinting, etc.) should define their own\n// canonicalization specification and implement their own serializer rather\n// than relying on this API.\n//\n// If deterministic serialization is requested, map entries will be sorted\n// by keys in lexographical order. This is an implementation detail and\n// subject to change.\nfunc (b *Buffer) SetDeterministic(deterministic bool) {\n\tb.deterministic = deterministic\n}\n\n// SetBuf sets buf as the internal buffer,\n// where the contents of buf are considered the unread portion of the buffer.\nfunc (b *Buffer) SetBuf(buf []byte) {\n\tb.buf = buf\n\tb.idx = 0\n}\n\n// Reset clears the internal buffer of all written and unread data.\nfunc (b *Buffer) Reset() {\n\tb.buf = b.buf[:0]\n\tb.idx = 0\n}\n\n// Bytes returns the internal buffer.\nfunc (b *Buffer) Bytes() []byte {\n\treturn b.buf\n}\n\n// Unread returns the unread portion of the buffer.\nfunc (b *Buffer) Unread() []byte {\n\treturn b.buf[b.idx:]\n}\n\n// Marshal appends the wire-format encoding of m to the buffer.\nfunc (b *Buffer) Marshal(m Message) error {\n\tvar err error\n\tb.buf, err = marshalAppend(b.buf, m, b.deterministic)\n\treturn err\n}\n\n// Unmarshal parses the wire-format message in the buffer and\n// places the decoded results in m.\n// It does not reset m before unmarshaling.\nfunc (b *Buffer) Unmarshal(m Message) error {\n\terr := UnmarshalMerge(b.Unread(), m)\n\tb.idx = len(b.buf)\n\treturn err\n}\n\ntype unknownFields struct{ XXX_unrecognized protoimpl.UnknownFields }\n\nfunc (m *unknownFields) String() string { panic(\"not implemented\") }\nfunc (m *unknownFields) Reset()         { panic(\"not implemented\") }\nfunc (m *unknownFields) ProtoMessage()  { panic(\"not implemented\") }\n\n// DebugPrint dumps the encoded bytes of b with a header and footer including s\n// to stdout. This is only intended for debugging.\nfunc (*Buffer) DebugPrint(s string, b []byte) {\n\tm := MessageReflect(new(unknownFields))\n\tm.SetUnknown(b)\n\tb, _ = prototext.MarshalOptions{AllowPartial: true, Indent: \"\\t\"}.Marshal(m.Interface())\n\tfmt.Printf(\"==== %s ====\\n%s==== %s ====\\n\", s, b, s)\n}\n\n// EncodeVarint appends an unsigned varint encoding to the buffer.\nfunc (b *Buffer) EncodeVarint(v uint64) error {\n\tb.buf = protowire.AppendVarint(b.buf, v)\n\treturn nil\n}\n\n// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer.\nfunc (b *Buffer) EncodeZigzag32(v uint64) error {\n\treturn b.EncodeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))\n}\n\n// EncodeZigzag64 appends a 64-bit zig-zag varint encoding to the buffer.\nfunc (b *Buffer) EncodeZigzag64(v uint64) error {\n\treturn b.EncodeVarint(uint64((uint64(v) << 1) ^ uint64((int64(v) >> 63))))\n}\n\n// EncodeFixed32 appends a 32-bit little-endian integer to the buffer.\nfunc (b *Buffer) EncodeFixed32(v uint64) error {\n\tb.buf = protowire.AppendFixed32(b.buf, uint32(v))\n\treturn nil\n}\n\n// EncodeFixed64 appends a 64-bit little-endian integer to the buffer.\nfunc (b *Buffer) EncodeFixed64(v uint64) error {\n\tb.buf = protowire.AppendFixed64(b.buf, uint64(v))\n\treturn nil\n}\n\n// EncodeRawBytes appends a length-prefixed raw bytes to the buffer.\nfunc (b *Buffer) EncodeRawBytes(v []byte) error {\n\tb.buf = protowire.AppendBytes(b.buf, v)\n\treturn nil\n}\n\n// EncodeStringBytes appends a length-prefixed raw bytes to the buffer.\n// It does not validate whether v contains valid UTF-8.\nfunc (b *Buffer) EncodeStringBytes(v string) error {\n\tb.buf = protowire.AppendString(b.buf, v)\n\treturn nil\n}\n\n// EncodeMessage appends a length-prefixed encoded message to the buffer.\nfunc (b *Buffer) EncodeMessage(m Message) error {\n\tvar err error\n\tb.buf = protowire.AppendVarint(b.buf, uint64(Size(m)))\n\tb.buf, err = marshalAppend(b.buf, m, b.deterministic)\n\treturn err\n}\n\n// DecodeVarint consumes an encoded unsigned varint from the buffer.\nfunc (b *Buffer) DecodeVarint() (uint64, error) {\n\tv, n := protowire.ConsumeVarint(b.buf[b.idx:])\n\tif n < 0 {\n\t\treturn 0, protowire.ParseError(n)\n\t}\n\tb.idx += n\n\treturn uint64(v), nil\n}\n\n// DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer.\nfunc (b *Buffer) DecodeZigzag32() (uint64, error) {\n\tv, err := b.DecodeVarint()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint64((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), nil\n}\n\n// DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer.\nfunc (b *Buffer) DecodeZigzag64() (uint64, error) {\n\tv, err := b.DecodeVarint()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint64((uint64(v) >> 1) ^ uint64((int64(v&1)<<63)>>63)), nil\n}\n\n// DecodeFixed32 consumes a 32-bit little-endian integer from the buffer.\nfunc (b *Buffer) DecodeFixed32() (uint64, error) {\n\tv, n := protowire.ConsumeFixed32(b.buf[b.idx:])\n\tif n < 0 {\n\t\treturn 0, protowire.ParseError(n)\n\t}\n\tb.idx += n\n\treturn uint64(v), nil\n}\n\n// DecodeFixed64 consumes a 64-bit little-endian integer from the buffer.\nfunc (b *Buffer) DecodeFixed64() (uint64, error) {\n\tv, n := protowire.ConsumeFixed64(b.buf[b.idx:])\n\tif n < 0 {\n\t\treturn 0, protowire.ParseError(n)\n\t}\n\tb.idx += n\n\treturn uint64(v), nil\n}\n\n// DecodeRawBytes consumes a length-prefixed raw bytes from the buffer.\n// If alloc is specified, it returns a copy the raw bytes\n// rather than a sub-slice of the buffer.\nfunc (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error) {\n\tv, n := protowire.ConsumeBytes(b.buf[b.idx:])\n\tif n < 0 {\n\t\treturn nil, protowire.ParseError(n)\n\t}\n\tb.idx += n\n\tif alloc {\n\t\tv = append([]byte(nil), v...)\n\t}\n\treturn v, nil\n}\n\n// DecodeStringBytes consumes a length-prefixed raw bytes from the buffer.\n// It does not validate whether the raw bytes contain valid UTF-8.\nfunc (b *Buffer) DecodeStringBytes() (string, error) {\n\tv, n := protowire.ConsumeString(b.buf[b.idx:])\n\tif n < 0 {\n\t\treturn \"\", protowire.ParseError(n)\n\t}\n\tb.idx += n\n\treturn v, nil\n}\n\n// DecodeMessage consumes a length-prefixed message from the buffer.\n// It does not reset m before unmarshaling.\nfunc (b *Buffer) DecodeMessage(m Message) error {\n\tv, err := b.DecodeRawBytes(false)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn UnmarshalMerge(v, m)\n}\n\n// DecodeGroup consumes a message group from the buffer.\n// It assumes that the start group marker has already been consumed and\n// consumes all bytes until (and including the end group marker).\n// It does not reset m before unmarshaling.\nfunc (b *Buffer) DecodeGroup(m Message) error {\n\tv, n, err := consumeGroup(b.buf[b.idx:])\n\tif err != nil {\n\t\treturn err\n\t}\n\tb.idx += n\n\treturn UnmarshalMerge(v, m)\n}\n\n// consumeGroup parses b until it finds an end group marker, returning\n// the raw bytes of the message (excluding the end group marker) and the\n// the total length of the message (including the end group marker).\nfunc consumeGroup(b []byte) ([]byte, int, error) {\n\tb0 := b\n\tdepth := 1 // assume this follows a start group marker\n\tfor {\n\t\t_, wtyp, tagLen := protowire.ConsumeTag(b)\n\t\tif tagLen < 0 {\n\t\t\treturn nil, 0, protowire.ParseError(tagLen)\n\t\t}\n\t\tb = b[tagLen:]\n\n\t\tvar valLen int\n\t\tswitch wtyp {\n\t\tcase protowire.VarintType:\n\t\t\t_, valLen = protowire.ConsumeVarint(b)\n\t\tcase protowire.Fixed32Type:\n\t\t\t_, valLen = protowire.ConsumeFixed32(b)\n\t\tcase protowire.Fixed64Type:\n\t\t\t_, valLen = protowire.ConsumeFixed64(b)\n\t\tcase protowire.BytesType:\n\t\t\t_, valLen = protowire.ConsumeBytes(b)\n\t\tcase protowire.StartGroupType:\n\t\t\tdepth++\n\t\tcase protowire.EndGroupType:\n\t\t\tdepth--\n\t\tdefault:\n\t\t\treturn nil, 0, errors.New(\"proto: cannot parse reserved wire type\")\n\t\t}\n\t\tif valLen < 0 {\n\t\t\treturn nil, 0, protowire.ParseError(valLen)\n\t\t}\n\t\tb = b[valLen:]\n\n\t\tif depth == 0 {\n\t\t\treturn b0[:len(b0)-len(b)-tagLen], len(b0) - len(b), nil\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/defaults.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// SetDefaults sets unpopulated scalar fields to their default values.\n// Fields within a oneof are not set even if they have a default value.\n// SetDefaults is recursively called upon any populated message fields.\nfunc SetDefaults(m Message) {\n\tif m != nil {\n\t\tsetDefaults(MessageReflect(m))\n\t}\n}\n\nfunc setDefaults(m protoreflect.Message) {\n\tfds := m.Descriptor().Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tfd := fds.Get(i)\n\t\tif !m.Has(fd) {\n\t\t\tif fd.HasDefault() && fd.ContainingOneof() == nil {\n\t\t\t\tv := fd.Default()\n\t\t\t\tif fd.Kind() == protoreflect.BytesKind {\n\t\t\t\t\tv = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes\n\t\t\t\t}\n\t\t\t\tm.Set(fd, v)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t}\n\n\tm.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tswitch {\n\t\t// Handle singular message.\n\t\tcase fd.Cardinality() != protoreflect.Repeated:\n\t\t\tif fd.Message() != nil {\n\t\t\t\tsetDefaults(m.Get(fd).Message())\n\t\t\t}\n\t\t// Handle list of messages.\n\t\tcase fd.IsList():\n\t\t\tif fd.Message() != nil {\n\t\t\t\tls := m.Get(fd).List()\n\t\t\t\tfor i := 0; i < ls.Len(); i++ {\n\t\t\t\t\tsetDefaults(ls.Get(i).Message())\n\t\t\t\t}\n\t\t\t}\n\t\t// Handle map of messages.\n\t\tcase fd.IsMap():\n\t\t\tif fd.MapValue().Message() != nil {\n\t\t\t\tms := m.Get(fd).Map()\n\t\t\t\tms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {\n\t\t\t\t\tsetDefaults(v.Message())\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn true\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/deprecated.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\n\tprotoV2 \"google.golang.org/protobuf/proto\"\n)\n\nvar (\n\t// Deprecated: No longer returned.\n\tErrNil = errors.New(\"proto: Marshal called with nil\")\n\n\t// Deprecated: No longer returned.\n\tErrTooLarge = errors.New(\"proto: message encodes to over 2 GB\")\n\n\t// Deprecated: No longer returned.\n\tErrInternalBadWireType = errors.New(\"proto: internal error: bad wiretype for oneof\")\n)\n\n// Deprecated: Do not use.\ntype Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }\n\n// Deprecated: Do not use.\nfunc GetStats() Stats { return Stats{} }\n\n// Deprecated: Do not use.\nfunc MarshalMessageSet(interface{}) ([]byte, error) {\n\treturn nil, errors.New(\"proto: not implemented\")\n}\n\n// Deprecated: Do not use.\nfunc UnmarshalMessageSet([]byte, interface{}) error {\n\treturn errors.New(\"proto: not implemented\")\n}\n\n// Deprecated: Do not use.\nfunc MarshalMessageSetJSON(interface{}) ([]byte, error) {\n\treturn nil, errors.New(\"proto: not implemented\")\n}\n\n// Deprecated: Do not use.\nfunc UnmarshalMessageSetJSON([]byte, interface{}) error {\n\treturn errors.New(\"proto: not implemented\")\n}\n\n// Deprecated: Do not use.\nfunc RegisterMessageSetType(Message, int32, string) {}\n\n// Deprecated: Do not use.\nfunc EnumName(m map[int32]string, v int32) string {\n\ts, ok := m[v]\n\tif ok {\n\t\treturn s\n\t}\n\treturn strconv.Itoa(int(v))\n}\n\n// Deprecated: Do not use.\nfunc UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) {\n\tif data[0] == '\"' {\n\t\t// New style: enums are strings.\n\t\tvar repr string\n\t\tif err := json.Unmarshal(data, &repr); err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tval, ok := m[repr]\n\t\tif !ok {\n\t\t\treturn 0, fmt.Errorf(\"unrecognized enum %s value %q\", enumName, repr)\n\t\t}\n\t\treturn val, nil\n\t}\n\t// Old style: enums are ints.\n\tvar val int32\n\tif err := json.Unmarshal(data, &val); err != nil {\n\t\treturn 0, fmt.Errorf(\"cannot unmarshal %#q into enum %s\", data, enumName)\n\t}\n\treturn val, nil\n}\n\n// Deprecated: Do not use; this type existed for intenal-use only.\ntype InternalMessageInfo struct{}\n\n// Deprecated: Do not use; this method existed for intenal-use only.\nfunc (*InternalMessageInfo) DiscardUnknown(m Message) {\n\tDiscardUnknown(m)\n}\n\n// Deprecated: Do not use; this method existed for intenal-use only.\nfunc (*InternalMessageInfo) Marshal(b []byte, m Message, deterministic bool) ([]byte, error) {\n\treturn protoV2.MarshalOptions{Deterministic: deterministic}.MarshalAppend(b, MessageV2(m))\n}\n\n// Deprecated: Do not use; this method existed for intenal-use only.\nfunc (*InternalMessageInfo) Merge(dst, src Message) {\n\tprotoV2.Merge(MessageV2(dst), MessageV2(src))\n}\n\n// Deprecated: Do not use; this method existed for intenal-use only.\nfunc (*InternalMessageInfo) Size(m Message) int {\n\treturn protoV2.Size(MessageV2(m))\n}\n\n// Deprecated: Do not use; this method existed for intenal-use only.\nfunc (*InternalMessageInfo) Unmarshal(m Message, b []byte) error {\n\treturn protoV2.UnmarshalOptions{Merge: true}.Unmarshal(b, MessageV2(m))\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/discard.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// DiscardUnknown recursively discards all unknown fields from this message\n// and all embedded messages.\n//\n// When unmarshaling a message with unrecognized fields, the tags and values\n// of such fields are preserved in the Message. This allows a later call to\n// marshal to be able to produce a message that continues to have those\n// unrecognized fields. To avoid this, DiscardUnknown is used to\n// explicitly clear the unknown fields after unmarshaling.\nfunc DiscardUnknown(m Message) {\n\tif m != nil {\n\t\tdiscardUnknown(MessageReflect(m))\n\t}\n}\n\nfunc discardUnknown(m protoreflect.Message) {\n\tm.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {\n\t\tswitch {\n\t\t// Handle singular message.\n\t\tcase fd.Cardinality() != protoreflect.Repeated:\n\t\t\tif fd.Message() != nil {\n\t\t\t\tdiscardUnknown(m.Get(fd).Message())\n\t\t\t}\n\t\t// Handle list of messages.\n\t\tcase fd.IsList():\n\t\t\tif fd.Message() != nil {\n\t\t\t\tls := m.Get(fd).List()\n\t\t\t\tfor i := 0; i < ls.Len(); i++ {\n\t\t\t\t\tdiscardUnknown(ls.Get(i).Message())\n\t\t\t\t}\n\t\t\t}\n\t\t// Handle map of messages.\n\t\tcase fd.IsMap():\n\t\t\tif fd.MapValue().Message() != nil {\n\t\t\t\tms := m.Get(fd).Map()\n\t\t\t\tms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool {\n\t\t\t\t\tdiscardUnknown(v.Message())\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn true\n\t})\n\n\t// Discard unknown fields.\n\tif len(m.GetUnknown()) > 0 {\n\t\tm.SetUnknown(nil)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/extensions.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\ntype (\n\t// ExtensionDesc represents an extension descriptor and\n\t// is used to interact with an extension field in a message.\n\t//\n\t// Variables of this type are generated in code by protoc-gen-go.\n\tExtensionDesc = protoimpl.ExtensionInfo\n\n\t// ExtensionRange represents a range of message extensions.\n\t// Used in code generated by protoc-gen-go.\n\tExtensionRange = protoiface.ExtensionRangeV1\n\n\t// Deprecated: Do not use; this is an internal type.\n\tExtension = protoimpl.ExtensionFieldV1\n\n\t// Deprecated: Do not use; this is an internal type.\n\tXXX_InternalExtensions = protoimpl.ExtensionFields\n)\n\n// ErrMissingExtension reports whether the extension was not present.\nvar ErrMissingExtension = errors.New(\"proto: missing extension\")\n\nvar errNotExtendable = errors.New(\"proto: not an extendable proto.Message\")\n\n// HasExtension reports whether the extension field is present in m\n// either as an explicitly populated field or as an unknown field.\nfunc HasExtension(m Message, xt *ExtensionDesc) (has bool) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn false\n\t}\n\n\t// Check whether any populated known field matches the field number.\n\txtd := xt.TypeDescriptor()\n\tif isValidExtension(mr.Descriptor(), xtd) {\n\t\thas = mr.Has(xtd)\n\t} else {\n\t\tmr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {\n\t\t\thas = int32(fd.Number()) == xt.Field\n\t\t\treturn !has\n\t\t})\n\t}\n\n\t// Check whether any unknown field matches the field number.\n\tfor b := mr.GetUnknown(); !has && len(b) > 0; {\n\t\tnum, _, n := protowire.ConsumeField(b)\n\t\thas = int32(num) == xt.Field\n\t\tb = b[n:]\n\t}\n\treturn has\n}\n\n// ClearExtension removes the extension field from m\n// either as an explicitly populated field or as an unknown field.\nfunc ClearExtension(m Message, xt *ExtensionDesc) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn\n\t}\n\n\txtd := xt.TypeDescriptor()\n\tif isValidExtension(mr.Descriptor(), xtd) {\n\t\tmr.Clear(xtd)\n\t} else {\n\t\tmr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {\n\t\t\tif int32(fd.Number()) == xt.Field {\n\t\t\t\tmr.Clear(fd)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t})\n\t}\n\tclearUnknown(mr, fieldNum(xt.Field))\n}\n\n// ClearAllExtensions clears all extensions from m.\n// This includes populated fields and unknown fields in the extension range.\nfunc ClearAllExtensions(m Message) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn\n\t}\n\n\tmr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {\n\t\tif fd.IsExtension() {\n\t\t\tmr.Clear(fd)\n\t\t}\n\t\treturn true\n\t})\n\tclearUnknown(mr, mr.Descriptor().ExtensionRanges())\n}\n\n// GetExtension retrieves a proto2 extended field from m.\n//\n// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),\n// then GetExtension parses the encoded field and returns a Go value of the specified type.\n// If the field is not present, then the default value is returned (if one is specified),\n// otherwise ErrMissingExtension is reported.\n//\n// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil),\n// then GetExtension returns the raw encoded bytes for the extension field.\nfunc GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {\n\t\treturn nil, errNotExtendable\n\t}\n\n\t// Retrieve the unknown fields for this extension field.\n\tvar bo protoreflect.RawFields\n\tfor bi := mr.GetUnknown(); len(bi) > 0; {\n\t\tnum, _, n := protowire.ConsumeField(bi)\n\t\tif int32(num) == xt.Field {\n\t\t\tbo = append(bo, bi[:n]...)\n\t\t}\n\t\tbi = bi[n:]\n\t}\n\n\t// For type incomplete descriptors, only retrieve the unknown fields.\n\tif xt.ExtensionType == nil {\n\t\treturn []byte(bo), nil\n\t}\n\n\t// If the extension field only exists as unknown fields, unmarshal it.\n\t// This is rarely done since proto.Unmarshal eagerly unmarshals extensions.\n\txtd := xt.TypeDescriptor()\n\tif !isValidExtension(mr.Descriptor(), xtd) {\n\t\treturn nil, fmt.Errorf(\"proto: bad extended type; %T does not extend %T\", xt.ExtendedType, m)\n\t}\n\tif !mr.Has(xtd) && len(bo) > 0 {\n\t\tm2 := mr.New()\n\t\tif err := (proto.UnmarshalOptions{\n\t\t\tResolver: extensionResolver{xt},\n\t\t}.Unmarshal(bo, m2.Interface())); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif m2.Has(xtd) {\n\t\t\tmr.Set(xtd, m2.Get(xtd))\n\t\t\tclearUnknown(mr, fieldNum(xt.Field))\n\t\t}\n\t}\n\n\t// Check whether the message has the extension field set or a default.\n\tvar pv protoreflect.Value\n\tswitch {\n\tcase mr.Has(xtd):\n\t\tpv = mr.Get(xtd)\n\tcase xtd.HasDefault():\n\t\tpv = xtd.Default()\n\tdefault:\n\t\treturn nil, ErrMissingExtension\n\t}\n\n\tv := xt.InterfaceOf(pv)\n\trv := reflect.ValueOf(v)\n\tif isScalarKind(rv.Kind()) {\n\t\trv2 := reflect.New(rv.Type())\n\t\trv2.Elem().Set(rv)\n\t\tv = rv2.Interface()\n\t}\n\treturn v, nil\n}\n\n// extensionResolver is a custom extension resolver that stores a single\n// extension type that takes precedence over the global registry.\ntype extensionResolver struct{ xt protoreflect.ExtensionType }\n\nfunc (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {\n\tif xtd := r.xt.TypeDescriptor(); xtd.FullName() == field {\n\t\treturn r.xt, nil\n\t}\n\treturn protoregistry.GlobalTypes.FindExtensionByName(field)\n}\n\nfunc (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {\n\tif xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field {\n\t\treturn r.xt, nil\n\t}\n\treturn protoregistry.GlobalTypes.FindExtensionByNumber(message, field)\n}\n\n// GetExtensions returns a list of the extensions values present in m,\n// corresponding with the provided list of extension descriptors, xts.\n// If an extension is missing in m, the corresponding value is nil.\nfunc GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn nil, errNotExtendable\n\t}\n\n\tvs := make([]interface{}, len(xts))\n\tfor i, xt := range xts {\n\t\tv, err := GetExtension(m, xt)\n\t\tif err != nil {\n\t\t\tif err == ErrMissingExtension {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn vs, err\n\t\t}\n\t\tvs[i] = v\n\t}\n\treturn vs, nil\n}\n\n// SetExtension sets an extension field in m to the provided value.\nfunc SetExtension(m Message, xt *ExtensionDesc, v interface{}) error {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {\n\t\treturn errNotExtendable\n\t}\n\n\trv := reflect.ValueOf(v)\n\tif reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) {\n\t\treturn fmt.Errorf(\"proto: bad extension value type. got: %T, want: %T\", v, xt.ExtensionType)\n\t}\n\tif rv.Kind() == reflect.Ptr {\n\t\tif rv.IsNil() {\n\t\t\treturn fmt.Errorf(\"proto: SetExtension called with nil value of type %T\", v)\n\t\t}\n\t\tif isScalarKind(rv.Elem().Kind()) {\n\t\t\tv = rv.Elem().Interface()\n\t\t}\n\t}\n\n\txtd := xt.TypeDescriptor()\n\tif !isValidExtension(mr.Descriptor(), xtd) {\n\t\treturn fmt.Errorf(\"proto: bad extended type; %T does not extend %T\", xt.ExtendedType, m)\n\t}\n\tmr.Set(xtd, xt.ValueOf(v))\n\tclearUnknown(mr, fieldNum(xt.Field))\n\treturn nil\n}\n\n// SetRawExtension inserts b into the unknown fields of m.\n//\n// Deprecated: Use Message.ProtoReflect.SetUnknown instead.\nfunc SetRawExtension(m Message, fnum int32, b []byte) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn\n\t}\n\n\t// Verify that the raw field is valid.\n\tfor b0 := b; len(b0) > 0; {\n\t\tnum, _, n := protowire.ConsumeField(b0)\n\t\tif int32(num) != fnum {\n\t\t\tpanic(fmt.Sprintf(\"mismatching field number: got %d, want %d\", num, fnum))\n\t\t}\n\t\tb0 = b0[n:]\n\t}\n\n\tClearExtension(m, &ExtensionDesc{Field: fnum})\n\tmr.SetUnknown(append(mr.GetUnknown(), b...))\n}\n\n// ExtensionDescs returns a list of extension descriptors found in m,\n// containing descriptors for both populated extension fields in m and\n// also unknown fields of m that are in the extension range.\n// For the later case, an type incomplete descriptor is provided where only\n// the ExtensionDesc.Field field is populated.\n// The order of the extension descriptors is undefined.\nfunc ExtensionDescs(m Message) ([]*ExtensionDesc, error) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 {\n\t\treturn nil, errNotExtendable\n\t}\n\n\t// Collect a set of known extension descriptors.\n\textDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc)\n\tmr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tif fd.IsExtension() {\n\t\t\txt := fd.(protoreflect.ExtensionTypeDescriptor)\n\t\t\tif xd, ok := xt.Type().(*ExtensionDesc); ok {\n\t\t\t\textDescs[fd.Number()] = xd\n\t\t\t}\n\t\t}\n\t\treturn true\n\t})\n\n\t// Collect a set of unknown extension descriptors.\n\textRanges := mr.Descriptor().ExtensionRanges()\n\tfor b := mr.GetUnknown(); len(b) > 0; {\n\t\tnum, _, n := protowire.ConsumeField(b)\n\t\tif extRanges.Has(num) && extDescs[num] == nil {\n\t\t\textDescs[num] = nil\n\t\t}\n\t\tb = b[n:]\n\t}\n\n\t// Transpose the set of descriptors into a list.\n\tvar xts []*ExtensionDesc\n\tfor num, xt := range extDescs {\n\t\tif xt == nil {\n\t\t\txt = &ExtensionDesc{Field: int32(num)}\n\t\t}\n\t\txts = append(xts, xt)\n\t}\n\treturn xts, nil\n}\n\n// isValidExtension reports whether xtd is a valid extension descriptor for md.\nfunc isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool {\n\treturn xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number())\n}\n\n// isScalarKind reports whether k is a protobuf scalar kind (except bytes).\n// This function exists for historical reasons since the representation of\n// scalars differs between v1 and v2, where v1 uses *T and v2 uses T.\nfunc isScalarKind(k reflect.Kind) bool {\n\tswitch k {\n\tcase reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// clearUnknown removes unknown fields from m where remover.Has reports true.\nfunc clearUnknown(m protoreflect.Message, remover interface {\n\tHas(protoreflect.FieldNumber) bool\n}) {\n\tvar bo protoreflect.RawFields\n\tfor bi := m.GetUnknown(); len(bi) > 0; {\n\t\tnum, _, n := protowire.ConsumeField(bi)\n\t\tif !remover.Has(num) {\n\t\t\tbo = append(bo, bi[:n]...)\n\t\t}\n\t\tbi = bi[n:]\n\t}\n\tif bi := m.GetUnknown(); len(bi) != len(bo) {\n\t\tm.SetUnknown(bo)\n\t}\n}\n\ntype fieldNum protoreflect.FieldNumber\n\nfunc (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool {\n\treturn protoreflect.FieldNumber(n1) == n2\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/properties.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\n// StructProperties represents protocol buffer type information for a\n// generated protobuf message in the open-struct API.\n//\n// Deprecated: Do not use.\ntype StructProperties struct {\n\t// Prop are the properties for each field.\n\t//\n\t// Fields belonging to a oneof are stored in OneofTypes instead, with a\n\t// single Properties representing the parent oneof held here.\n\t//\n\t// The order of Prop matches the order of fields in the Go struct.\n\t// Struct fields that are not related to protobufs have a \"XXX_\" prefix\n\t// in the Properties.Name and must be ignored by the user.\n\tProp []*Properties\n\n\t// OneofTypes contains information about the oneof fields in this message.\n\t// It is keyed by the protobuf field name.\n\tOneofTypes map[string]*OneofProperties\n}\n\n// Properties represents the type information for a protobuf message field.\n//\n// Deprecated: Do not use.\ntype Properties struct {\n\t// Name is a placeholder name with little meaningful semantic value.\n\t// If the name has an \"XXX_\" prefix, the entire Properties must be ignored.\n\tName string\n\t// OrigName is the protobuf field name or oneof name.\n\tOrigName string\n\t// JSONName is the JSON name for the protobuf field.\n\tJSONName string\n\t// Enum is a placeholder name for enums.\n\t// For historical reasons, this is neither the Go name for the enum,\n\t// nor the protobuf name for the enum.\n\tEnum string // Deprecated: Do not use.\n\t// Weak contains the full name of the weakly referenced message.\n\tWeak string\n\t// Wire is a string representation of the wire type.\n\tWire string\n\t// WireType is the protobuf wire type for the field.\n\tWireType int\n\t// Tag is the protobuf field number.\n\tTag int\n\t// Required reports whether this is a required field.\n\tRequired bool\n\t// Optional reports whether this is a optional field.\n\tOptional bool\n\t// Repeated reports whether this is a repeated field.\n\tRepeated bool\n\t// Packed reports whether this is a packed repeated field of scalars.\n\tPacked bool\n\t// Proto3 reports whether this field operates under the proto3 syntax.\n\tProto3 bool\n\t// Oneof reports whether this field belongs within a oneof.\n\tOneof bool\n\n\t// Default is the default value in string form.\n\tDefault string\n\t// HasDefault reports whether the field has a default value.\n\tHasDefault bool\n\n\t// MapKeyProp is the properties for the key field for a map field.\n\tMapKeyProp *Properties\n\t// MapValProp is the properties for the value field for a map field.\n\tMapValProp *Properties\n}\n\n// OneofProperties represents the type information for a protobuf oneof.\n//\n// Deprecated: Do not use.\ntype OneofProperties struct {\n\t// Type is a pointer to the generated wrapper type for the field value.\n\t// This is nil for messages that are not in the open-struct API.\n\tType reflect.Type\n\t// Field is the index into StructProperties.Prop for the containing oneof.\n\tField int\n\t// Prop is the properties for the field.\n\tProp *Properties\n}\n\n// String formats the properties in the protobuf struct field tag style.\nfunc (p *Properties) String() string {\n\ts := p.Wire\n\ts += \",\" + strconv.Itoa(p.Tag)\n\tif p.Required {\n\t\ts += \",req\"\n\t}\n\tif p.Optional {\n\t\ts += \",opt\"\n\t}\n\tif p.Repeated {\n\t\ts += \",rep\"\n\t}\n\tif p.Packed {\n\t\ts += \",packed\"\n\t}\n\ts += \",name=\" + p.OrigName\n\tif p.JSONName != \"\" {\n\t\ts += \",json=\" + p.JSONName\n\t}\n\tif len(p.Enum) > 0 {\n\t\ts += \",enum=\" + p.Enum\n\t}\n\tif len(p.Weak) > 0 {\n\t\ts += \",weak=\" + p.Weak\n\t}\n\tif p.Proto3 {\n\t\ts += \",proto3\"\n\t}\n\tif p.Oneof {\n\t\ts += \",oneof\"\n\t}\n\tif p.HasDefault {\n\t\ts += \",def=\" + p.Default\n\t}\n\treturn s\n}\n\n// Parse populates p by parsing a string in the protobuf struct field tag style.\nfunc (p *Properties) Parse(tag string) {\n\t// For example: \"bytes,49,opt,name=foo,def=hello!\"\n\tfor len(tag) > 0 {\n\t\ti := strings.IndexByte(tag, ',')\n\t\tif i < 0 {\n\t\t\ti = len(tag)\n\t\t}\n\t\tswitch s := tag[:i]; {\n\t\tcase strings.HasPrefix(s, \"name=\"):\n\t\t\tp.OrigName = s[len(\"name=\"):]\n\t\tcase strings.HasPrefix(s, \"json=\"):\n\t\t\tp.JSONName = s[len(\"json=\"):]\n\t\tcase strings.HasPrefix(s, \"enum=\"):\n\t\t\tp.Enum = s[len(\"enum=\"):]\n\t\tcase strings.HasPrefix(s, \"weak=\"):\n\t\t\tp.Weak = s[len(\"weak=\"):]\n\t\tcase strings.Trim(s, \"0123456789\") == \"\":\n\t\t\tn, _ := strconv.ParseUint(s, 10, 32)\n\t\t\tp.Tag = int(n)\n\t\tcase s == \"opt\":\n\t\t\tp.Optional = true\n\t\tcase s == \"req\":\n\t\t\tp.Required = true\n\t\tcase s == \"rep\":\n\t\t\tp.Repeated = true\n\t\tcase s == \"varint\" || s == \"zigzag32\" || s == \"zigzag64\":\n\t\t\tp.Wire = s\n\t\t\tp.WireType = WireVarint\n\t\tcase s == \"fixed32\":\n\t\t\tp.Wire = s\n\t\t\tp.WireType = WireFixed32\n\t\tcase s == \"fixed64\":\n\t\t\tp.Wire = s\n\t\t\tp.WireType = WireFixed64\n\t\tcase s == \"bytes\":\n\t\t\tp.Wire = s\n\t\t\tp.WireType = WireBytes\n\t\tcase s == \"group\":\n\t\t\tp.Wire = s\n\t\t\tp.WireType = WireStartGroup\n\t\tcase s == \"packed\":\n\t\t\tp.Packed = true\n\t\tcase s == \"proto3\":\n\t\t\tp.Proto3 = true\n\t\tcase s == \"oneof\":\n\t\t\tp.Oneof = true\n\t\tcase strings.HasPrefix(s, \"def=\"):\n\t\t\t// The default tag is special in that everything afterwards is the\n\t\t\t// default regardless of the presence of commas.\n\t\t\tp.HasDefault = true\n\t\t\tp.Default, i = tag[len(\"def=\"):], len(tag)\n\t\t}\n\t\ttag = strings.TrimPrefix(tag[i:], \",\")\n\t}\n}\n\n// Init populates the properties from a protocol buffer struct tag.\n//\n// Deprecated: Do not use.\nfunc (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {\n\tp.Name = name\n\tp.OrigName = name\n\tif tag == \"\" {\n\t\treturn\n\t}\n\tp.Parse(tag)\n\n\tif typ != nil && typ.Kind() == reflect.Map {\n\t\tp.MapKeyProp = new(Properties)\n\t\tp.MapKeyProp.Init(nil, \"Key\", f.Tag.Get(\"protobuf_key\"), nil)\n\t\tp.MapValProp = new(Properties)\n\t\tp.MapValProp.Init(nil, \"Value\", f.Tag.Get(\"protobuf_val\"), nil)\n\t}\n}\n\nvar propertiesCache sync.Map // map[reflect.Type]*StructProperties\n\n// GetProperties returns the list of properties for the type represented by t,\n// which must be a generated protocol buffer message in the open-struct API,\n// where protobuf message fields are represented by exported Go struct fields.\n//\n// Deprecated: Use protobuf reflection instead.\nfunc GetProperties(t reflect.Type) *StructProperties {\n\tif p, ok := propertiesCache.Load(t); ok {\n\t\treturn p.(*StructProperties)\n\t}\n\tp, _ := propertiesCache.LoadOrStore(t, newProperties(t))\n\treturn p.(*StructProperties)\n}\n\nfunc newProperties(t reflect.Type) *StructProperties {\n\tif t.Kind() != reflect.Struct {\n\t\tpanic(fmt.Sprintf(\"%v is not a generated message in the open-struct API\", t))\n\t}\n\n\tvar hasOneof bool\n\tprop := new(StructProperties)\n\n\t// Construct a list of properties for each field in the struct.\n\tfor i := 0; i < t.NumField(); i++ {\n\t\tp := new(Properties)\n\t\tf := t.Field(i)\n\t\ttagField := f.Tag.Get(\"protobuf\")\n\t\tp.Init(f.Type, f.Name, tagField, &f)\n\n\t\ttagOneof := f.Tag.Get(\"protobuf_oneof\")\n\t\tif tagOneof != \"\" {\n\t\t\thasOneof = true\n\t\t\tp.OrigName = tagOneof\n\t\t}\n\n\t\t// Rename unrelated struct fields with the \"XXX_\" prefix since so much\n\t\t// user code simply checks for this to exclude special fields.\n\t\tif tagField == \"\" && tagOneof == \"\" && !strings.HasPrefix(p.Name, \"XXX_\") {\n\t\t\tp.Name = \"XXX_\" + p.Name\n\t\t\tp.OrigName = \"XXX_\" + p.OrigName\n\t\t} else if p.Weak != \"\" {\n\t\t\tp.Name = p.OrigName // avoid possible \"XXX_\" prefix on weak field\n\t\t}\n\n\t\tprop.Prop = append(prop.Prop, p)\n\t}\n\n\t// Construct a mapping of oneof field names to properties.\n\tif hasOneof {\n\t\tvar oneofWrappers []interface{}\n\t\tif fn, ok := reflect.PtrTo(t).MethodByName(\"XXX_OneofFuncs\"); ok {\n\t\t\toneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{})\n\t\t}\n\t\tif fn, ok := reflect.PtrTo(t).MethodByName(\"XXX_OneofWrappers\"); ok {\n\t\t\toneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{})\n\t\t}\n\t\tif m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok {\n\t\t\tif m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok {\n\t\t\t\toneofWrappers = m.ProtoMessageInfo().OneofWrappers\n\t\t\t}\n\t\t}\n\n\t\tprop.OneofTypes = make(map[string]*OneofProperties)\n\t\tfor _, wrapper := range oneofWrappers {\n\t\t\tp := &OneofProperties{\n\t\t\t\tType: reflect.ValueOf(wrapper).Type(), // *T\n\t\t\t\tProp: new(Properties),\n\t\t\t}\n\t\t\tf := p.Type.Elem().Field(0)\n\t\t\tp.Prop.Name = f.Name\n\t\t\tp.Prop.Parse(f.Tag.Get(\"protobuf\"))\n\n\t\t\t// Determine the struct field that contains this oneof.\n\t\t\t// Each wrapper is assignable to exactly one parent field.\n\t\t\tvar foundOneof bool\n\t\t\tfor i := 0; i < t.NumField() && !foundOneof; i++ {\n\t\t\t\tif p.Type.AssignableTo(t.Field(i).Type) {\n\t\t\t\t\tp.Field = i\n\t\t\t\t\tfoundOneof = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !foundOneof {\n\t\t\t\tpanic(fmt.Sprintf(\"%v is not a generated message in the open-struct API\", t))\n\t\t\t}\n\t\t\tprop.OneofTypes[p.Prop.OrigName] = p\n\t\t}\n\t}\n\n\treturn prop\n}\n\nfunc (sp *StructProperties) Len() int           { return len(sp.Prop) }\nfunc (sp *StructProperties) Less(i, j int) bool { return false }\nfunc (sp *StructProperties) Swap(i, j int)      { return }\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/proto.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package proto provides functionality for handling protocol buffer messages.\n// In particular, it provides marshaling and unmarshaling between a protobuf\n// message and the binary wire format.\n//\n// See https://developers.google.com/protocol-buffers/docs/gotutorial for\n// more information.\n//\n// Deprecated: Use the \"google.golang.org/protobuf/proto\" package instead.\npackage proto\n\nimport (\n\tprotoV2 \"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\nconst (\n\tProtoPackageIsVersion1 = true\n\tProtoPackageIsVersion2 = true\n\tProtoPackageIsVersion3 = true\n\tProtoPackageIsVersion4 = true\n)\n\n// GeneratedEnum is any enum type generated by protoc-gen-go\n// which is a named int32 kind.\n// This type exists for documentation purposes.\ntype GeneratedEnum interface{}\n\n// GeneratedMessage is any message type generated by protoc-gen-go\n// which is a pointer to a named struct kind.\n// This type exists for documentation purposes.\ntype GeneratedMessage interface{}\n\n// Message is a protocol buffer message.\n//\n// This is the v1 version of the message interface and is marginally better\n// than an empty interface as it lacks any method to programatically interact\n// with the contents of the message.\n//\n// A v2 message is declared in \"google.golang.org/protobuf/proto\".Message and\n// exposes protobuf reflection as a first-class feature of the interface.\n//\n// To convert a v1 message to a v2 message, use the MessageV2 function.\n// To convert a v2 message to a v1 message, use the MessageV1 function.\ntype Message = protoiface.MessageV1\n\n// MessageV1 converts either a v1 or v2 message to a v1 message.\n// It returns nil if m is nil.\nfunc MessageV1(m GeneratedMessage) protoiface.MessageV1 {\n\treturn protoimpl.X.ProtoMessageV1Of(m)\n}\n\n// MessageV2 converts either a v1 or v2 message to a v2 message.\n// It returns nil if m is nil.\nfunc MessageV2(m GeneratedMessage) protoV2.Message {\n\treturn protoimpl.X.ProtoMessageV2Of(m)\n}\n\n// MessageReflect returns a reflective view for a message.\n// It returns nil if m is nil.\nfunc MessageReflect(m Message) protoreflect.Message {\n\treturn protoimpl.X.MessageOf(m)\n}\n\n// Marshaler is implemented by messages that can marshal themselves.\n// This interface is used by the following functions: Size, Marshal,\n// Buffer.Marshal, and Buffer.EncodeMessage.\n//\n// Deprecated: Do not implement.\ntype Marshaler interface {\n\t// Marshal formats the encoded bytes of the message.\n\t// It should be deterministic and emit valid protobuf wire data.\n\t// The caller takes ownership of the returned buffer.\n\tMarshal() ([]byte, error)\n}\n\n// Unmarshaler is implemented by messages that can unmarshal themselves.\n// This interface is used by the following functions: Unmarshal, UnmarshalMerge,\n// Buffer.Unmarshal, Buffer.DecodeMessage, and Buffer.DecodeGroup.\n//\n// Deprecated: Do not implement.\ntype Unmarshaler interface {\n\t// Unmarshal parses the encoded bytes of the protobuf wire input.\n\t// The provided buffer is only valid for during method call.\n\t// It should not reset the receiver message.\n\tUnmarshal([]byte) error\n}\n\n// Merger is implemented by messages that can merge themselves.\n// This interface is used by the following functions: Clone and Merge.\n//\n// Deprecated: Do not implement.\ntype Merger interface {\n\t// Merge merges the contents of src into the receiver message.\n\t// It clones all data structures in src such that it aliases no mutable\n\t// memory referenced by src.\n\tMerge(src Message)\n}\n\n// RequiredNotSetError is an error type returned when\n// marshaling or unmarshaling a message with missing required fields.\ntype RequiredNotSetError struct {\n\terr error\n}\n\nfunc (e *RequiredNotSetError) Error() string {\n\tif e.err != nil {\n\t\treturn e.err.Error()\n\t}\n\treturn \"proto: required field not set\"\n}\nfunc (e *RequiredNotSetError) RequiredNotSet() bool {\n\treturn true\n}\n\nfunc checkRequiredNotSet(m protoV2.Message) error {\n\tif err := protoV2.CheckInitialized(m); err != nil {\n\t\treturn &RequiredNotSetError{err: err}\n\t}\n\treturn nil\n}\n\n// Clone returns a deep copy of src.\nfunc Clone(src Message) Message {\n\treturn MessageV1(protoV2.Clone(MessageV2(src)))\n}\n\n// Merge merges src into dst, which must be messages of the same type.\n//\n// Populated scalar fields in src are copied to dst, while populated\n// singular messages in src are merged into dst by recursively calling Merge.\n// The elements of every list field in src is appended to the corresponded\n// list fields in dst. The entries of every map field in src is copied into\n// the corresponding map field in dst, possibly replacing existing entries.\n// The unknown fields of src are appended to the unknown fields of dst.\nfunc Merge(dst, src Message) {\n\tprotoV2.Merge(MessageV2(dst), MessageV2(src))\n}\n\n// Equal reports whether two messages are equal.\n// If two messages marshal to the same bytes under deterministic serialization,\n// then Equal is guaranteed to report true.\n//\n// Two messages are equal if they are the same protobuf message type,\n// have the same set of populated known and extension field values,\n// and the same set of unknown fields values.\n//\n// Scalar values are compared with the equivalent of the == operator in Go,\n// except bytes values which are compared using bytes.Equal and\n// floating point values which specially treat NaNs as equal.\n// Message values are compared by recursively calling Equal.\n// Lists are equal if each element value is also equal.\n// Maps are equal if they have the same set of keys, where the pair of values\n// for each key is also equal.\nfunc Equal(x, y Message) bool {\n\treturn protoV2.Equal(MessageV2(x), MessageV2(y))\n}\n\nfunc isMessageSet(md protoreflect.MessageDescriptor) bool {\n\tms, ok := md.(interface{ IsMessageSet() bool })\n\treturn ok && ms.IsMessageSet()\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/registry.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/reflect/protodesc\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\n// filePath is the path to the proto source file.\ntype filePath = string // e.g., \"google/protobuf/descriptor.proto\"\n\n// fileDescGZIP is the compressed contents of the encoded FileDescriptorProto.\ntype fileDescGZIP = []byte\n\nvar fileCache sync.Map // map[filePath]fileDescGZIP\n\n// RegisterFile is called from generated code to register the compressed\n// FileDescriptorProto with the file path for a proto source file.\n//\n// Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead.\nfunc RegisterFile(s filePath, d fileDescGZIP) {\n\t// Decompress the descriptor.\n\tzr, err := gzip.NewReader(bytes.NewReader(d))\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"proto: invalid compressed file descriptor: %v\", err))\n\t}\n\tb, err := ioutil.ReadAll(zr)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"proto: invalid compressed file descriptor: %v\", err))\n\t}\n\n\t// Construct a protoreflect.FileDescriptor from the raw descriptor.\n\t// Note that DescBuilder.Build automatically registers the constructed\n\t// file descriptor with the v2 registry.\n\tprotoimpl.DescBuilder{RawDescriptor: b}.Build()\n\n\t// Locally cache the raw descriptor form for the file.\n\tfileCache.Store(s, d)\n}\n\n// FileDescriptor returns the compressed FileDescriptorProto given the file path\n// for a proto source file. It returns nil if not found.\n//\n// Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead.\nfunc FileDescriptor(s filePath) fileDescGZIP {\n\tif v, ok := fileCache.Load(s); ok {\n\t\treturn v.(fileDescGZIP)\n\t}\n\n\t// Find the descriptor in the v2 registry.\n\tvar b []byte\n\tif fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil {\n\t\tb, _ = Marshal(protodesc.ToFileDescriptorProto(fd))\n\t}\n\n\t// Locally cache the raw descriptor form for the file.\n\tif len(b) > 0 {\n\t\tv, _ := fileCache.LoadOrStore(s, protoimpl.X.CompressGZIP(b))\n\t\treturn v.(fileDescGZIP)\n\t}\n\treturn nil\n}\n\n// enumName is the name of an enum. For historical reasons, the enum name is\n// neither the full Go name nor the full protobuf name of the enum.\n// The name is the dot-separated combination of just the proto package that the\n// enum is declared within followed by the Go type name of the generated enum.\ntype enumName = string // e.g., \"my.proto.package.GoMessage_GoEnum\"\n\n// enumsByName maps enum values by name to their numeric counterpart.\ntype enumsByName = map[string]int32\n\n// enumsByNumber maps enum values by number to their name counterpart.\ntype enumsByNumber = map[int32]string\n\nvar enumCache sync.Map     // map[enumName]enumsByName\nvar numFilesCache sync.Map // map[protoreflect.FullName]int\n\n// RegisterEnum is called from the generated code to register the mapping of\n// enum value names to enum numbers for the enum identified by s.\n//\n// Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead.\nfunc RegisterEnum(s enumName, _ enumsByNumber, m enumsByName) {\n\tif _, ok := enumCache.Load(s); ok {\n\t\tpanic(\"proto: duplicate enum registered: \" + s)\n\t}\n\tenumCache.Store(s, m)\n\n\t// This does not forward registration to the v2 registry since this API\n\t// lacks sufficient information to construct a complete v2 enum descriptor.\n}\n\n// EnumValueMap returns the mapping from enum value names to enum numbers for\n// the enum of the given name. It returns nil if not found.\n//\n// Deprecated: Use protoregistry.GlobalTypes.FindEnumByName instead.\nfunc EnumValueMap(s enumName) enumsByName {\n\tif v, ok := enumCache.Load(s); ok {\n\t\treturn v.(enumsByName)\n\t}\n\n\t// Check whether the cache is stale. If the number of files in the current\n\t// package differs, then it means that some enums may have been recently\n\t// registered upstream that we do not know about.\n\tvar protoPkg protoreflect.FullName\n\tif i := strings.LastIndexByte(s, '.'); i >= 0 {\n\t\tprotoPkg = protoreflect.FullName(s[:i])\n\t}\n\tv, _ := numFilesCache.Load(protoPkg)\n\tnumFiles, _ := v.(int)\n\tif protoregistry.GlobalFiles.NumFilesByPackage(protoPkg) == numFiles {\n\t\treturn nil // cache is up-to-date; was not found earlier\n\t}\n\n\t// Update the enum cache for all enums declared in the given proto package.\n\tnumFiles = 0\n\tprotoregistry.GlobalFiles.RangeFilesByPackage(protoPkg, func(fd protoreflect.FileDescriptor) bool {\n\t\twalkEnums(fd, func(ed protoreflect.EnumDescriptor) {\n\t\t\tname := protoimpl.X.LegacyEnumName(ed)\n\t\t\tif _, ok := enumCache.Load(name); !ok {\n\t\t\t\tm := make(enumsByName)\n\t\t\t\tevs := ed.Values()\n\t\t\t\tfor i := evs.Len() - 1; i >= 0; i-- {\n\t\t\t\t\tev := evs.Get(i)\n\t\t\t\t\tm[string(ev.Name())] = int32(ev.Number())\n\t\t\t\t}\n\t\t\t\tenumCache.LoadOrStore(name, m)\n\t\t\t}\n\t\t})\n\t\tnumFiles++\n\t\treturn true\n\t})\n\tnumFilesCache.Store(protoPkg, numFiles)\n\n\t// Check cache again for enum map.\n\tif v, ok := enumCache.Load(s); ok {\n\t\treturn v.(enumsByName)\n\t}\n\treturn nil\n}\n\n// walkEnums recursively walks all enums declared in d.\nfunc walkEnums(d interface {\n\tEnums() protoreflect.EnumDescriptors\n\tMessages() protoreflect.MessageDescriptors\n}, f func(protoreflect.EnumDescriptor)) {\n\teds := d.Enums()\n\tfor i := eds.Len() - 1; i >= 0; i-- {\n\t\tf(eds.Get(i))\n\t}\n\tmds := d.Messages()\n\tfor i := mds.Len() - 1; i >= 0; i-- {\n\t\twalkEnums(mds.Get(i), f)\n\t}\n}\n\n// messageName is the full name of protobuf message.\ntype messageName = string\n\nvar messageTypeCache sync.Map // map[messageName]reflect.Type\n\n// RegisterType is called from generated code to register the message Go type\n// for a message of the given name.\n//\n// Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead.\nfunc RegisterType(m Message, s messageName) {\n\tmt := protoimpl.X.LegacyMessageTypeOf(m, protoreflect.FullName(s))\n\tif err := protoregistry.GlobalTypes.RegisterMessage(mt); err != nil {\n\t\tpanic(err)\n\t}\n\tmessageTypeCache.Store(s, reflect.TypeOf(m))\n}\n\n// RegisterMapType is called from generated code to register the Go map type\n// for a protobuf message representing a map entry.\n//\n// Deprecated: Do not use.\nfunc RegisterMapType(m interface{}, s messageName) {\n\tt := reflect.TypeOf(m)\n\tif t.Kind() != reflect.Map {\n\t\tpanic(fmt.Sprintf(\"invalid map kind: %v\", t))\n\t}\n\tif _, ok := messageTypeCache.Load(s); ok {\n\t\tpanic(fmt.Errorf(\"proto: duplicate proto message registered: %s\", s))\n\t}\n\tmessageTypeCache.Store(s, t)\n}\n\n// MessageType returns the message type for a named message.\n// It returns nil if not found.\n//\n// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead.\nfunc MessageType(s messageName) reflect.Type {\n\tif v, ok := messageTypeCache.Load(s); ok {\n\t\treturn v.(reflect.Type)\n\t}\n\n\t// Derive the message type from the v2 registry.\n\tvar t reflect.Type\n\tif mt, _ := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(s)); mt != nil {\n\t\tt = messageGoType(mt)\n\t}\n\n\t// If we could not get a concrete type, it is possible that it is a\n\t// pseudo-message for a map entry.\n\tif t == nil {\n\t\td, _ := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(s))\n\t\tif md, _ := d.(protoreflect.MessageDescriptor); md != nil && md.IsMapEntry() {\n\t\t\tkt := goTypeForField(md.Fields().ByNumber(1))\n\t\t\tvt := goTypeForField(md.Fields().ByNumber(2))\n\t\t\tt = reflect.MapOf(kt, vt)\n\t\t}\n\t}\n\n\t// Locally cache the message type for the given name.\n\tif t != nil {\n\t\tv, _ := messageTypeCache.LoadOrStore(s, t)\n\t\treturn v.(reflect.Type)\n\t}\n\treturn nil\n}\n\nfunc goTypeForField(fd protoreflect.FieldDescriptor) reflect.Type {\n\tswitch k := fd.Kind(); k {\n\tcase protoreflect.EnumKind:\n\t\tif et, _ := protoregistry.GlobalTypes.FindEnumByName(fd.Enum().FullName()); et != nil {\n\t\t\treturn enumGoType(et)\n\t\t}\n\t\treturn reflect.TypeOf(protoreflect.EnumNumber(0))\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tif mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()); mt != nil {\n\t\t\treturn messageGoType(mt)\n\t\t}\n\t\treturn reflect.TypeOf((*protoreflect.Message)(nil)).Elem()\n\tdefault:\n\t\treturn reflect.TypeOf(fd.Default().Interface())\n\t}\n}\n\nfunc enumGoType(et protoreflect.EnumType) reflect.Type {\n\treturn reflect.TypeOf(et.New(0))\n}\n\nfunc messageGoType(mt protoreflect.MessageType) reflect.Type {\n\treturn reflect.TypeOf(MessageV1(mt.Zero().Interface()))\n}\n\n// MessageName returns the full protobuf name for the given message type.\n//\n// Deprecated: Use protoreflect.MessageDescriptor.FullName instead.\nfunc MessageName(m Message) messageName {\n\tif m == nil {\n\t\treturn \"\"\n\t}\n\tif m, ok := m.(interface{ XXX_MessageName() messageName }); ok {\n\t\treturn m.XXX_MessageName()\n\t}\n\treturn messageName(protoimpl.X.MessageDescriptorOf(m).FullName())\n}\n\n// RegisterExtension is called from the generated code to register\n// the extension descriptor.\n//\n// Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead.\nfunc RegisterExtension(d *ExtensionDesc) {\n\tif err := protoregistry.GlobalTypes.RegisterExtension(d); err != nil {\n\t\tpanic(err)\n\t}\n}\n\ntype extensionsByNumber = map[int32]*ExtensionDesc\n\nvar extensionCache sync.Map // map[messageName]extensionsByNumber\n\n// RegisteredExtensions returns a map of the registered extensions for the\n// provided protobuf message, indexed by the extension field number.\n//\n// Deprecated: Use protoregistry.GlobalTypes.RangeExtensionsByMessage instead.\nfunc RegisteredExtensions(m Message) extensionsByNumber {\n\t// Check whether the cache is stale. If the number of extensions for\n\t// the given message differs, then it means that some extensions were\n\t// recently registered upstream that we do not know about.\n\ts := MessageName(m)\n\tv, _ := extensionCache.Load(s)\n\txs, _ := v.(extensionsByNumber)\n\tif protoregistry.GlobalTypes.NumExtensionsByMessage(protoreflect.FullName(s)) == len(xs) {\n\t\treturn xs // cache is up-to-date\n\t}\n\n\t// Cache is stale, re-compute the extensions map.\n\txs = make(extensionsByNumber)\n\tprotoregistry.GlobalTypes.RangeExtensionsByMessage(protoreflect.FullName(s), func(xt protoreflect.ExtensionType) bool {\n\t\tif xd, ok := xt.(*ExtensionDesc); ok {\n\t\t\txs[int32(xt.TypeDescriptor().Number())] = xd\n\t\t} else {\n\t\t\t// TODO: This implies that the protoreflect.ExtensionType is a\n\t\t\t// custom type not generated by protoc-gen-go. We could try and\n\t\t\t// convert the type to an ExtensionDesc.\n\t\t}\n\t\treturn true\n\t})\n\textensionCache.Store(s, xs)\n\treturn xs\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/text_decode.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/prototext\"\n\tprotoV2 \"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\nconst wrapTextUnmarshalV2 = false\n\n// ParseError is returned by UnmarshalText.\ntype ParseError struct {\n\tMessage string\n\n\t// Deprecated: Do not use.\n\tLine, Offset int\n}\n\nfunc (e *ParseError) Error() string {\n\tif wrapTextUnmarshalV2 {\n\t\treturn e.Message\n\t}\n\tif e.Line == 1 {\n\t\treturn fmt.Sprintf(\"line 1.%d: %v\", e.Offset, e.Message)\n\t}\n\treturn fmt.Sprintf(\"line %d: %v\", e.Line, e.Message)\n}\n\n// UnmarshalText parses a proto text formatted string into m.\nfunc UnmarshalText(s string, m Message) error {\n\tif u, ok := m.(encoding.TextUnmarshaler); ok {\n\t\treturn u.UnmarshalText([]byte(s))\n\t}\n\n\tm.Reset()\n\tmi := MessageV2(m)\n\n\tif wrapTextUnmarshalV2 {\n\t\terr := prototext.UnmarshalOptions{\n\t\t\tAllowPartial: true,\n\t\t}.Unmarshal([]byte(s), mi)\n\t\tif err != nil {\n\t\t\treturn &ParseError{Message: err.Error()}\n\t\t}\n\t\treturn checkRequiredNotSet(mi)\n\t} else {\n\t\tif err := newTextParser(s).unmarshalMessage(mi.ProtoReflect(), \"\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn checkRequiredNotSet(mi)\n\t}\n}\n\ntype textParser struct {\n\ts            string // remaining input\n\tdone         bool   // whether the parsing is finished (success or error)\n\tbacked       bool   // whether back() was called\n\toffset, line int\n\tcur          token\n}\n\ntype token struct {\n\tvalue    string\n\terr      *ParseError\n\tline     int    // line number\n\toffset   int    // byte number from start of input, not start of line\n\tunquoted string // the unquoted version of value, if it was a quoted string\n}\n\nfunc newTextParser(s string) *textParser {\n\tp := new(textParser)\n\tp.s = s\n\tp.line = 1\n\tp.cur.line = 1\n\treturn p\n}\n\nfunc (p *textParser) unmarshalMessage(m protoreflect.Message, terminator string) (err error) {\n\tmd := m.Descriptor()\n\tfds := md.Fields()\n\n\t// A struct is a sequence of \"name: value\", terminated by one of\n\t// '>' or '}', or the end of the input.  A name may also be\n\t// \"[extension]\" or \"[type/url]\".\n\t//\n\t// The whole struct can also be an expanded Any message, like:\n\t// [type/url] < ... struct contents ... >\n\tseen := make(map[protoreflect.FieldNumber]bool)\n\tfor {\n\t\ttok := p.next()\n\t\tif tok.err != nil {\n\t\t\treturn tok.err\n\t\t}\n\t\tif tok.value == terminator {\n\t\t\tbreak\n\t\t}\n\t\tif tok.value == \"[\" {\n\t\t\tif err := p.unmarshalExtensionOrAny(m, seen); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// This is a normal, non-extension field.\n\t\tname := protoreflect.Name(tok.value)\n\t\tfd := fds.ByName(name)\n\t\tswitch {\n\t\tcase fd == nil:\n\t\t\tgd := fds.ByName(protoreflect.Name(strings.ToLower(string(name))))\n\t\t\tif gd != nil && gd.Kind() == protoreflect.GroupKind && gd.Message().Name() == name {\n\t\t\t\tfd = gd\n\t\t\t}\n\t\tcase fd.Kind() == protoreflect.GroupKind && fd.Message().Name() != name:\n\t\t\tfd = nil\n\t\tcase fd.IsWeak() && fd.Message().IsPlaceholder():\n\t\t\tfd = nil\n\t\t}\n\t\tif fd == nil {\n\t\t\ttypeName := string(md.FullName())\n\t\t\tif m, ok := m.Interface().(Message); ok {\n\t\t\t\tt := reflect.TypeOf(m)\n\t\t\t\tif t.Kind() == reflect.Ptr {\n\t\t\t\t\ttypeName = t.Elem().String()\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn p.errorf(\"unknown field name %q in %v\", name, typeName)\n\t\t}\n\t\tif od := fd.ContainingOneof(); od != nil && m.WhichOneof(od) != nil {\n\t\t\treturn p.errorf(\"field '%s' would overwrite already parsed oneof '%s'\", name, od.Name())\n\t\t}\n\t\tif fd.Cardinality() != protoreflect.Repeated && seen[fd.Number()] {\n\t\t\treturn p.errorf(\"non-repeated field %q was repeated\", fd.Name())\n\t\t}\n\t\tseen[fd.Number()] = true\n\n\t\t// Consume any colon.\n\t\tif err := p.checkForColon(fd); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Parse into the field.\n\t\tv := m.Get(fd)\n\t\tif !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {\n\t\t\tv = m.Mutable(fd)\n\t\t}\n\t\tif v, err = p.unmarshalValue(v, fd); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tm.Set(fd, v)\n\n\t\tif err := p.consumeOptionalSeparator(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (p *textParser) unmarshalExtensionOrAny(m protoreflect.Message, seen map[protoreflect.FieldNumber]bool) error {\n\tname, err := p.consumeExtensionOrAnyName()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If it contains a slash, it's an Any type URL.\n\tif slashIdx := strings.LastIndex(name, \"/\"); slashIdx >= 0 {\n\t\ttok := p.next()\n\t\tif tok.err != nil {\n\t\t\treturn tok.err\n\t\t}\n\t\t// consume an optional colon\n\t\tif tok.value == \":\" {\n\t\t\ttok = p.next()\n\t\t\tif tok.err != nil {\n\t\t\t\treturn tok.err\n\t\t\t}\n\t\t}\n\n\t\tvar terminator string\n\t\tswitch tok.value {\n\t\tcase \"<\":\n\t\t\tterminator = \">\"\n\t\tcase \"{\":\n\t\t\tterminator = \"}\"\n\t\tdefault:\n\t\t\treturn p.errorf(\"expected '{' or '<', found %q\", tok.value)\n\t\t}\n\n\t\tmt, err := protoregistry.GlobalTypes.FindMessageByURL(name)\n\t\tif err != nil {\n\t\t\treturn p.errorf(\"unrecognized message %q in google.protobuf.Any\", name[slashIdx+len(\"/\"):])\n\t\t}\n\t\tm2 := mt.New()\n\t\tif err := p.unmarshalMessage(m2, terminator); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tb, err := protoV2.Marshal(m2.Interface())\n\t\tif err != nil {\n\t\t\treturn p.errorf(\"failed to marshal message of type %q: %v\", name[slashIdx+len(\"/\"):], err)\n\t\t}\n\n\t\turlFD := m.Descriptor().Fields().ByName(\"type_url\")\n\t\tvalFD := m.Descriptor().Fields().ByName(\"value\")\n\t\tif seen[urlFD.Number()] {\n\t\t\treturn p.errorf(\"Any message unpacked multiple times, or %q already set\", urlFD.Name())\n\t\t}\n\t\tif seen[valFD.Number()] {\n\t\t\treturn p.errorf(\"Any message unpacked multiple times, or %q already set\", valFD.Name())\n\t\t}\n\t\tm.Set(urlFD, protoreflect.ValueOfString(name))\n\t\tm.Set(valFD, protoreflect.ValueOfBytes(b))\n\t\tseen[urlFD.Number()] = true\n\t\tseen[valFD.Number()] = true\n\t\treturn nil\n\t}\n\n\txname := protoreflect.FullName(name)\n\txt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname)\n\tif xt == nil && isMessageSet(m.Descriptor()) {\n\t\txt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append(\"message_set_extension\"))\n\t}\n\tif xt == nil {\n\t\treturn p.errorf(\"unrecognized extension %q\", name)\n\t}\n\tfd := xt.TypeDescriptor()\n\tif fd.ContainingMessage().FullName() != m.Descriptor().FullName() {\n\t\treturn p.errorf(\"extension field %q does not extend message %q\", name, m.Descriptor().FullName())\n\t}\n\n\tif err := p.checkForColon(fd); err != nil {\n\t\treturn err\n\t}\n\n\tv := m.Get(fd)\n\tif !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) {\n\t\tv = m.Mutable(fd)\n\t}\n\tv, err = p.unmarshalValue(v, fd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.Set(fd, v)\n\treturn p.consumeOptionalSeparator()\n}\n\nfunc (p *textParser) unmarshalValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn v, tok.err\n\t}\n\tif tok.value == \"\" {\n\t\treturn v, p.errorf(\"unexpected EOF\")\n\t}\n\n\tswitch {\n\tcase fd.IsList():\n\t\tlv := v.List()\n\t\tvar err error\n\t\tif tok.value == \"[\" {\n\t\t\t// Repeated field with list notation, like [1,2,3].\n\t\t\tfor {\n\t\t\t\tvv := lv.NewElement()\n\t\t\t\tvv, err = p.unmarshalSingularValue(vv, fd)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\t\tlv.Append(vv)\n\n\t\t\t\ttok := p.next()\n\t\t\t\tif tok.err != nil {\n\t\t\t\t\treturn v, tok.err\n\t\t\t\t}\n\t\t\t\tif tok.value == \"]\" {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif tok.value != \",\" {\n\t\t\t\t\treturn v, p.errorf(\"Expected ']' or ',' found %q\", tok.value)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn v, nil\n\t\t}\n\n\t\t// One value of the repeated field.\n\t\tp.back()\n\t\tvv := lv.NewElement()\n\t\tvv, err = p.unmarshalSingularValue(vv, fd)\n\t\tif err != nil {\n\t\t\treturn v, err\n\t\t}\n\t\tlv.Append(vv)\n\t\treturn v, nil\n\tcase fd.IsMap():\n\t\t// The map entry should be this sequence of tokens:\n\t\t//\t< key : KEY value : VALUE >\n\t\t// However, implementations may omit key or value, and technically\n\t\t// we should support them in any order.\n\t\tvar terminator string\n\t\tswitch tok.value {\n\t\tcase \"<\":\n\t\t\tterminator = \">\"\n\t\tcase \"{\":\n\t\t\tterminator = \"}\"\n\t\tdefault:\n\t\t\treturn v, p.errorf(\"expected '{' or '<', found %q\", tok.value)\n\t\t}\n\n\t\tkeyFD := fd.MapKey()\n\t\tvalFD := fd.MapValue()\n\n\t\tmv := v.Map()\n\t\tkv := keyFD.Default()\n\t\tvv := mv.NewValue()\n\t\tfor {\n\t\t\ttok := p.next()\n\t\t\tif tok.err != nil {\n\t\t\t\treturn v, tok.err\n\t\t\t}\n\t\t\tif tok.value == terminator {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvar err error\n\t\t\tswitch tok.value {\n\t\t\tcase \"key\":\n\t\t\t\tif err := p.consumeToken(\":\"); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\t\tif kv, err = p.unmarshalSingularValue(kv, keyFD); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\t\tif err := p.consumeOptionalSeparator(); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\tcase \"value\":\n\t\t\t\tif err := p.checkForColon(valFD); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\t\tif vv, err = p.unmarshalSingularValue(vv, valFD); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\t\tif err := p.consumeOptionalSeparator(); err != nil {\n\t\t\t\t\treturn v, err\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tp.back()\n\t\t\t\treturn v, p.errorf(`expected \"key\", \"value\", or %q, found %q`, terminator, tok.value)\n\t\t\t}\n\t\t}\n\t\tmv.Set(kv.MapKey(), vv)\n\t\treturn v, nil\n\tdefault:\n\t\tp.back()\n\t\treturn p.unmarshalSingularValue(v, fd)\n\t}\n}\n\nfunc (p *textParser) unmarshalSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn v, tok.err\n\t}\n\tif tok.value == \"\" {\n\t\treturn v, p.errorf(\"unexpected EOF\")\n\t}\n\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind:\n\t\tswitch tok.value {\n\t\tcase \"true\", \"1\", \"t\", \"True\":\n\t\t\treturn protoreflect.ValueOfBool(true), nil\n\t\tcase \"false\", \"0\", \"f\", \"False\":\n\t\t\treturn protoreflect.ValueOfBool(false), nil\n\t\t}\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfInt32(int32(x)), nil\n\t\t}\n\n\t\t// The C++ parser accepts large positive hex numbers that uses\n\t\t// two's complement arithmetic to represent negative numbers.\n\t\t// This feature is here for backwards compatibility with C++.\n\t\tif strings.HasPrefix(tok.value, \"0x\") {\n\t\t\tif x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {\n\t\t\t\treturn protoreflect.ValueOfInt32(int32(-(int64(^x) + 1))), nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif x, err := strconv.ParseInt(tok.value, 0, 64); err == nil {\n\t\t\treturn protoreflect.ValueOfInt64(int64(x)), nil\n\t\t}\n\n\t\t// The C++ parser accepts large positive hex numbers that uses\n\t\t// two's complement arithmetic to represent negative numbers.\n\t\t// This feature is here for backwards compatibility with C++.\n\t\tif strings.HasPrefix(tok.value, \"0x\") {\n\t\t\tif x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {\n\t\t\t\treturn protoreflect.ValueOfInt64(int64(-(int64(^x) + 1))), nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfUint32(uint32(x)), nil\n\t\t}\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif x, err := strconv.ParseUint(tok.value, 0, 64); err == nil {\n\t\t\treturn protoreflect.ValueOfUint64(uint64(x)), nil\n\t\t}\n\tcase protoreflect.FloatKind:\n\t\t// Ignore 'f' for compatibility with output generated by C++,\n\t\t// but don't remove 'f' when the value is \"-inf\" or \"inf\".\n\t\tv := tok.value\n\t\tif strings.HasSuffix(v, \"f\") && v != \"-inf\" && v != \"inf\" {\n\t\t\tv = v[:len(v)-len(\"f\")]\n\t\t}\n\t\tif x, err := strconv.ParseFloat(v, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfFloat32(float32(x)), nil\n\t\t}\n\tcase protoreflect.DoubleKind:\n\t\t// Ignore 'f' for compatibility with output generated by C++,\n\t\t// but don't remove 'f' when the value is \"-inf\" or \"inf\".\n\t\tv := tok.value\n\t\tif strings.HasSuffix(v, \"f\") && v != \"-inf\" && v != \"inf\" {\n\t\t\tv = v[:len(v)-len(\"f\")]\n\t\t}\n\t\tif x, err := strconv.ParseFloat(v, 64); err == nil {\n\t\t\treturn protoreflect.ValueOfFloat64(float64(x)), nil\n\t\t}\n\tcase protoreflect.StringKind:\n\t\tif isQuote(tok.value[0]) {\n\t\t\treturn protoreflect.ValueOfString(tok.unquoted), nil\n\t\t}\n\tcase protoreflect.BytesKind:\n\t\tif isQuote(tok.value[0]) {\n\t\t\treturn protoreflect.ValueOfBytes([]byte(tok.unquoted)), nil\n\t\t}\n\tcase protoreflect.EnumKind:\n\t\tif x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(x)), nil\n\t\t}\n\t\tvd := fd.Enum().Values().ByName(protoreflect.Name(tok.value))\n\t\tif vd != nil {\n\t\t\treturn protoreflect.ValueOfEnum(vd.Number()), nil\n\t\t}\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tvar terminator string\n\t\tswitch tok.value {\n\t\tcase \"{\":\n\t\t\tterminator = \"}\"\n\t\tcase \"<\":\n\t\t\tterminator = \">\"\n\t\tdefault:\n\t\t\treturn v, p.errorf(\"expected '{' or '<', found %q\", tok.value)\n\t\t}\n\t\terr := p.unmarshalMessage(v.Message(), terminator)\n\t\treturn v, err\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"invalid kind %v\", fd.Kind()))\n\t}\n\treturn v, p.errorf(\"invalid %v: %v\", fd.Kind(), tok.value)\n}\n\n// Consume a ':' from the input stream (if the next token is a colon),\n// returning an error if a colon is needed but not present.\nfunc (p *textParser) checkForColon(fd protoreflect.FieldDescriptor) *ParseError {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn tok.err\n\t}\n\tif tok.value != \":\" {\n\t\tif fd.Message() == nil {\n\t\t\treturn p.errorf(\"expected ':', found %q\", tok.value)\n\t\t}\n\t\tp.back()\n\t}\n\treturn nil\n}\n\n// consumeExtensionOrAnyName consumes an extension name or an Any type URL and\n// the following ']'. It returns the name or URL consumed.\nfunc (p *textParser) consumeExtensionOrAnyName() (string, error) {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn \"\", tok.err\n\t}\n\n\t// If extension name or type url is quoted, it's a single token.\n\tif len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] {\n\t\tname, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0]))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn name, p.consumeToken(\"]\")\n\t}\n\n\t// Consume everything up to \"]\"\n\tvar parts []string\n\tfor tok.value != \"]\" {\n\t\tparts = append(parts, tok.value)\n\t\ttok = p.next()\n\t\tif tok.err != nil {\n\t\t\treturn \"\", p.errorf(\"unrecognized type_url or extension name: %s\", tok.err)\n\t\t}\n\t\tif p.done && tok.value != \"]\" {\n\t\t\treturn \"\", p.errorf(\"unclosed type_url or extension name\")\n\t\t}\n\t}\n\treturn strings.Join(parts, \"\"), nil\n}\n\n// consumeOptionalSeparator consumes an optional semicolon or comma.\n// It is used in unmarshalMessage to provide backward compatibility.\nfunc (p *textParser) consumeOptionalSeparator() error {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn tok.err\n\t}\n\tif tok.value != \";\" && tok.value != \",\" {\n\t\tp.back()\n\t}\n\treturn nil\n}\n\nfunc (p *textParser) errorf(format string, a ...interface{}) *ParseError {\n\tpe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset}\n\tp.cur.err = pe\n\tp.done = true\n\treturn pe\n}\n\nfunc (p *textParser) skipWhitespace() {\n\ti := 0\n\tfor i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') {\n\t\tif p.s[i] == '#' {\n\t\t\t// comment; skip to end of line or input\n\t\t\tfor i < len(p.s) && p.s[i] != '\\n' {\n\t\t\t\ti++\n\t\t\t}\n\t\t\tif i == len(p.s) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif p.s[i] == '\\n' {\n\t\t\tp.line++\n\t\t}\n\t\ti++\n\t}\n\tp.offset += i\n\tp.s = p.s[i:len(p.s)]\n\tif len(p.s) == 0 {\n\t\tp.done = true\n\t}\n}\n\nfunc (p *textParser) advance() {\n\t// Skip whitespace\n\tp.skipWhitespace()\n\tif p.done {\n\t\treturn\n\t}\n\n\t// Start of non-whitespace\n\tp.cur.err = nil\n\tp.cur.offset, p.cur.line = p.offset, p.line\n\tp.cur.unquoted = \"\"\n\tswitch p.s[0] {\n\tcase '<', '>', '{', '}', ':', '[', ']', ';', ',', '/':\n\t\t// Single symbol\n\t\tp.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)]\n\tcase '\"', '\\'':\n\t\t// Quoted string\n\t\ti := 1\n\t\tfor i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\\n' {\n\t\t\tif p.s[i] == '\\\\' && i+1 < len(p.s) {\n\t\t\t\t// skip escaped char\n\t\t\t\ti++\n\t\t\t}\n\t\t\ti++\n\t\t}\n\t\tif i >= len(p.s) || p.s[i] != p.s[0] {\n\t\t\tp.errorf(\"unmatched quote\")\n\t\t\treturn\n\t\t}\n\t\tunq, err := unquoteC(p.s[1:i], rune(p.s[0]))\n\t\tif err != nil {\n\t\t\tp.errorf(\"invalid quoted string %s: %v\", p.s[0:i+1], err)\n\t\t\treturn\n\t\t}\n\t\tp.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)]\n\t\tp.cur.unquoted = unq\n\tdefault:\n\t\ti := 0\n\t\tfor i < len(p.s) && isIdentOrNumberChar(p.s[i]) {\n\t\t\ti++\n\t\t}\n\t\tif i == 0 {\n\t\t\tp.errorf(\"unexpected byte %#x\", p.s[0])\n\t\t\treturn\n\t\t}\n\t\tp.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)]\n\t}\n\tp.offset += len(p.cur.value)\n}\n\n// Back off the parser by one token. Can only be done between calls to next().\n// It makes the next advance() a no-op.\nfunc (p *textParser) back() { p.backed = true }\n\n// Advances the parser and returns the new current token.\nfunc (p *textParser) next() *token {\n\tif p.backed || p.done {\n\t\tp.backed = false\n\t\treturn &p.cur\n\t}\n\tp.advance()\n\tif p.done {\n\t\tp.cur.value = \"\"\n\t} else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) {\n\t\t// Look for multiple quoted strings separated by whitespace,\n\t\t// and concatenate them.\n\t\tcat := p.cur\n\t\tfor {\n\t\t\tp.skipWhitespace()\n\t\t\tif p.done || !isQuote(p.s[0]) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tp.advance()\n\t\t\tif p.cur.err != nil {\n\t\t\t\treturn &p.cur\n\t\t\t}\n\t\t\tcat.value += \" \" + p.cur.value\n\t\t\tcat.unquoted += p.cur.unquoted\n\t\t}\n\t\tp.done = false // parser may have seen EOF, but we want to return cat\n\t\tp.cur = cat\n\t}\n\treturn &p.cur\n}\n\nfunc (p *textParser) consumeToken(s string) error {\n\ttok := p.next()\n\tif tok.err != nil {\n\t\treturn tok.err\n\t}\n\tif tok.value != s {\n\t\tp.back()\n\t\treturn p.errorf(\"expected %q, found %q\", s, tok.value)\n\t}\n\treturn nil\n}\n\nvar errBadUTF8 = errors.New(\"proto: bad UTF-8\")\n\nfunc unquoteC(s string, quote rune) (string, error) {\n\t// This is based on C++'s tokenizer.cc.\n\t// Despite its name, this is *not* parsing C syntax.\n\t// For instance, \"\\0\" is an invalid quoted string.\n\n\t// Avoid allocation in trivial cases.\n\tsimple := true\n\tfor _, r := range s {\n\t\tif r == '\\\\' || r == quote {\n\t\t\tsimple = false\n\t\t\tbreak\n\t\t}\n\t}\n\tif simple {\n\t\treturn s, nil\n\t}\n\n\tbuf := make([]byte, 0, 3*len(s)/2)\n\tfor len(s) > 0 {\n\t\tr, n := utf8.DecodeRuneInString(s)\n\t\tif r == utf8.RuneError && n == 1 {\n\t\t\treturn \"\", errBadUTF8\n\t\t}\n\t\ts = s[n:]\n\t\tif r != '\\\\' {\n\t\t\tif r < utf8.RuneSelf {\n\t\t\t\tbuf = append(buf, byte(r))\n\t\t\t} else {\n\t\t\t\tbuf = append(buf, string(r)...)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tch, tail, err := unescape(s)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tbuf = append(buf, ch...)\n\t\ts = tail\n\t}\n\treturn string(buf), nil\n}\n\nfunc unescape(s string) (ch string, tail string, err error) {\n\tr, n := utf8.DecodeRuneInString(s)\n\tif r == utf8.RuneError && n == 1 {\n\t\treturn \"\", \"\", errBadUTF8\n\t}\n\ts = s[n:]\n\tswitch r {\n\tcase 'a':\n\t\treturn \"\\a\", s, nil\n\tcase 'b':\n\t\treturn \"\\b\", s, nil\n\tcase 'f':\n\t\treturn \"\\f\", s, nil\n\tcase 'n':\n\t\treturn \"\\n\", s, nil\n\tcase 'r':\n\t\treturn \"\\r\", s, nil\n\tcase 't':\n\t\treturn \"\\t\", s, nil\n\tcase 'v':\n\t\treturn \"\\v\", s, nil\n\tcase '?':\n\t\treturn \"?\", s, nil // trigraph workaround\n\tcase '\\'', '\"', '\\\\':\n\t\treturn string(r), s, nil\n\tcase '0', '1', '2', '3', '4', '5', '6', '7':\n\t\tif len(s) < 2 {\n\t\t\treturn \"\", \"\", fmt.Errorf(`\\%c requires 2 following digits`, r)\n\t\t}\n\t\tss := string(r) + s[:2]\n\t\ts = s[2:]\n\t\ti, err := strconv.ParseUint(ss, 8, 8)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(`\\%s contains non-octal digits`, ss)\n\t\t}\n\t\treturn string([]byte{byte(i)}), s, nil\n\tcase 'x', 'X', 'u', 'U':\n\t\tvar n int\n\t\tswitch r {\n\t\tcase 'x', 'X':\n\t\t\tn = 2\n\t\tcase 'u':\n\t\t\tn = 4\n\t\tcase 'U':\n\t\t\tn = 8\n\t\t}\n\t\tif len(s) < n {\n\t\t\treturn \"\", \"\", fmt.Errorf(`\\%c requires %d following digits`, r, n)\n\t\t}\n\t\tss := s[:n]\n\t\ts = s[n:]\n\t\ti, err := strconv.ParseUint(ss, 16, 64)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(`\\%c%s contains non-hexadecimal digits`, r, ss)\n\t\t}\n\t\tif r == 'x' || r == 'X' {\n\t\t\treturn string([]byte{byte(i)}), s, nil\n\t\t}\n\t\tif i > utf8.MaxRune {\n\t\t\treturn \"\", \"\", fmt.Errorf(`\\%c%s is not a valid Unicode code point`, r, ss)\n\t\t}\n\t\treturn string(rune(i)), s, nil\n\t}\n\treturn \"\", \"\", fmt.Errorf(`unknown escape \\%c`, r)\n}\n\nfunc isIdentOrNumberChar(c byte) bool {\n\tswitch {\n\tcase 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z':\n\t\treturn true\n\tcase '0' <= c && c <= '9':\n\t\treturn true\n\t}\n\tswitch c {\n\tcase '-', '+', '.', '_':\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc isWhitespace(c byte) bool {\n\tswitch c {\n\tcase ' ', '\\t', '\\n', '\\r':\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc isQuote(c byte) bool {\n\tswitch c {\n\tcase '\"', '\\'':\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/text_encode.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/encoding/prototext\"\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\nconst wrapTextMarshalV2 = false\n\n// TextMarshaler is a configurable text format marshaler.\ntype TextMarshaler struct {\n\tCompact   bool // use compact text format (one line)\n\tExpandAny bool // expand google.protobuf.Any messages of known types\n}\n\n// Marshal writes the proto text format of m to w.\nfunc (tm *TextMarshaler) Marshal(w io.Writer, m Message) error {\n\tb, err := tm.marshal(m)\n\tif len(b) > 0 {\n\t\tif _, err := w.Write(b); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn err\n}\n\n// Text returns a proto text formatted string of m.\nfunc (tm *TextMarshaler) Text(m Message) string {\n\tb, _ := tm.marshal(m)\n\treturn string(b)\n}\n\nfunc (tm *TextMarshaler) marshal(m Message) ([]byte, error) {\n\tmr := MessageReflect(m)\n\tif mr == nil || !mr.IsValid() {\n\t\treturn []byte(\"<nil>\"), nil\n\t}\n\n\tif wrapTextMarshalV2 {\n\t\tif m, ok := m.(encoding.TextMarshaler); ok {\n\t\t\treturn m.MarshalText()\n\t\t}\n\n\t\topts := prototext.MarshalOptions{\n\t\t\tAllowPartial: true,\n\t\t\tEmitUnknown:  true,\n\t\t}\n\t\tif !tm.Compact {\n\t\t\topts.Indent = \"  \"\n\t\t}\n\t\tif !tm.ExpandAny {\n\t\t\topts.Resolver = (*protoregistry.Types)(nil)\n\t\t}\n\t\treturn opts.Marshal(mr.Interface())\n\t} else {\n\t\tw := &textWriter{\n\t\t\tcompact:   tm.Compact,\n\t\t\texpandAny: tm.ExpandAny,\n\t\t\tcomplete:  true,\n\t\t}\n\n\t\tif m, ok := m.(encoding.TextMarshaler); ok {\n\t\t\tb, err := m.MarshalText()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tw.Write(b)\n\t\t\treturn w.buf, nil\n\t\t}\n\n\t\terr := w.writeMessage(mr)\n\t\treturn w.buf, err\n\t}\n}\n\nvar (\n\tdefaultTextMarshaler = TextMarshaler{}\n\tcompactTextMarshaler = TextMarshaler{Compact: true}\n)\n\n// MarshalText writes the proto text format of m to w.\nfunc MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) }\n\n// MarshalTextString returns a proto text formatted string of m.\nfunc MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) }\n\n// CompactText writes the compact proto text format of m to w.\nfunc CompactText(w io.Writer, m Message) error { return compactTextMarshaler.Marshal(w, m) }\n\n// CompactTextString returns a compact proto text formatted string of m.\nfunc CompactTextString(m Message) string { return compactTextMarshaler.Text(m) }\n\nvar (\n\tnewline         = []byte(\"\\n\")\n\tendBraceNewline = []byte(\"}\\n\")\n\tposInf          = []byte(\"inf\")\n\tnegInf          = []byte(\"-inf\")\n\tnan             = []byte(\"nan\")\n)\n\n// textWriter is an io.Writer that tracks its indentation level.\ntype textWriter struct {\n\tcompact   bool // same as TextMarshaler.Compact\n\texpandAny bool // same as TextMarshaler.ExpandAny\n\tcomplete  bool // whether the current position is a complete line\n\tindent    int  // indentation level; never negative\n\tbuf       []byte\n}\n\nfunc (w *textWriter) Write(p []byte) (n int, _ error) {\n\tnewlines := bytes.Count(p, newline)\n\tif newlines == 0 {\n\t\tif !w.compact && w.complete {\n\t\t\tw.writeIndent()\n\t\t}\n\t\tw.buf = append(w.buf, p...)\n\t\tw.complete = false\n\t\treturn len(p), nil\n\t}\n\n\tfrags := bytes.SplitN(p, newline, newlines+1)\n\tif w.compact {\n\t\tfor i, frag := range frags {\n\t\t\tif i > 0 {\n\t\t\t\tw.buf = append(w.buf, ' ')\n\t\t\t\tn++\n\t\t\t}\n\t\t\tw.buf = append(w.buf, frag...)\n\t\t\tn += len(frag)\n\t\t}\n\t\treturn n, nil\n\t}\n\n\tfor i, frag := range frags {\n\t\tif w.complete {\n\t\t\tw.writeIndent()\n\t\t}\n\t\tw.buf = append(w.buf, frag...)\n\t\tn += len(frag)\n\t\tif i+1 < len(frags) {\n\t\t\tw.buf = append(w.buf, '\\n')\n\t\t\tn++\n\t\t}\n\t}\n\tw.complete = len(frags[len(frags)-1]) == 0\n\treturn n, nil\n}\n\nfunc (w *textWriter) WriteByte(c byte) error {\n\tif w.compact && c == '\\n' {\n\t\tc = ' '\n\t}\n\tif !w.compact && w.complete {\n\t\tw.writeIndent()\n\t}\n\tw.buf = append(w.buf, c)\n\tw.complete = c == '\\n'\n\treturn nil\n}\n\nfunc (w *textWriter) writeName(fd protoreflect.FieldDescriptor) {\n\tif !w.compact && w.complete {\n\t\tw.writeIndent()\n\t}\n\tw.complete = false\n\n\tif fd.Kind() != protoreflect.GroupKind {\n\t\tw.buf = append(w.buf, fd.Name()...)\n\t\tw.WriteByte(':')\n\t} else {\n\t\t// Use message type name for group field name.\n\t\tw.buf = append(w.buf, fd.Message().Name()...)\n\t}\n\n\tif !w.compact {\n\t\tw.WriteByte(' ')\n\t}\n}\n\nfunc requiresQuotes(u string) bool {\n\t// When type URL contains any characters except [0-9A-Za-z./\\-]*, it must be quoted.\n\tfor _, ch := range u {\n\t\tswitch {\n\t\tcase ch == '.' || ch == '/' || ch == '_':\n\t\t\tcontinue\n\t\tcase '0' <= ch && ch <= '9':\n\t\t\tcontinue\n\t\tcase 'A' <= ch && ch <= 'Z':\n\t\t\tcontinue\n\t\tcase 'a' <= ch && ch <= 'z':\n\t\t\tcontinue\n\t\tdefault:\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// writeProto3Any writes an expanded google.protobuf.Any message.\n//\n// It returns (false, nil) if sv value can't be unmarshaled (e.g. because\n// required messages are not linked in).\n//\n// It returns (true, error) when sv was written in expanded format or an error\n// was encountered.\nfunc (w *textWriter) writeProto3Any(m protoreflect.Message) (bool, error) {\n\tmd := m.Descriptor()\n\tfdURL := md.Fields().ByName(\"type_url\")\n\tfdVal := md.Fields().ByName(\"value\")\n\n\turl := m.Get(fdURL).String()\n\tmt, err := protoregistry.GlobalTypes.FindMessageByURL(url)\n\tif err != nil {\n\t\treturn false, nil\n\t}\n\n\tb := m.Get(fdVal).Bytes()\n\tm2 := mt.New()\n\tif err := proto.Unmarshal(b, m2.Interface()); err != nil {\n\t\treturn false, nil\n\t}\n\tw.Write([]byte(\"[\"))\n\tif requiresQuotes(url) {\n\t\tw.writeQuotedString(url)\n\t} else {\n\t\tw.Write([]byte(url))\n\t}\n\tif w.compact {\n\t\tw.Write([]byte(\"]:<\"))\n\t} else {\n\t\tw.Write([]byte(\"]: <\\n\"))\n\t\tw.indent++\n\t}\n\tif err := w.writeMessage(m2); err != nil {\n\t\treturn true, err\n\t}\n\tif w.compact {\n\t\tw.Write([]byte(\"> \"))\n\t} else {\n\t\tw.indent--\n\t\tw.Write([]byte(\">\\n\"))\n\t}\n\treturn true, nil\n}\n\nfunc (w *textWriter) writeMessage(m protoreflect.Message) error {\n\tmd := m.Descriptor()\n\tif w.expandAny && md.FullName() == \"google.protobuf.Any\" {\n\t\tif canExpand, err := w.writeProto3Any(m); canExpand {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfds := md.Fields()\n\tfor i := 0; i < fds.Len(); {\n\t\tfd := fds.Get(i)\n\t\tif od := fd.ContainingOneof(); od != nil {\n\t\t\tfd = m.WhichOneof(od)\n\t\t\ti += od.Fields().Len()\n\t\t} else {\n\t\t\ti++\n\t\t}\n\t\tif fd == nil || !m.Has(fd) {\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch {\n\t\tcase fd.IsList():\n\t\t\tlv := m.Get(fd).List()\n\t\t\tfor j := 0; j < lv.Len(); j++ {\n\t\t\t\tw.writeName(fd)\n\t\t\t\tv := lv.Get(j)\n\t\t\t\tif err := w.writeSingularValue(v, fd); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tw.WriteByte('\\n')\n\t\t\t}\n\t\tcase fd.IsMap():\n\t\t\tkfd := fd.MapKey()\n\t\t\tvfd := fd.MapValue()\n\t\t\tmv := m.Get(fd).Map()\n\n\t\t\ttype entry struct{ key, val protoreflect.Value }\n\t\t\tvar entries []entry\n\t\t\tmv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {\n\t\t\t\tentries = append(entries, entry{k.Value(), v})\n\t\t\t\treturn true\n\t\t\t})\n\t\t\tsort.Slice(entries, func(i, j int) bool {\n\t\t\t\tswitch kfd.Kind() {\n\t\t\t\tcase protoreflect.BoolKind:\n\t\t\t\t\treturn !entries[i].key.Bool() && entries[j].key.Bool()\n\t\t\t\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\t\t\t\treturn entries[i].key.Int() < entries[j].key.Int()\n\t\t\t\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\t\t\t\treturn entries[i].key.Uint() < entries[j].key.Uint()\n\t\t\t\tcase protoreflect.StringKind:\n\t\t\t\t\treturn entries[i].key.String() < entries[j].key.String()\n\t\t\t\tdefault:\n\t\t\t\t\tpanic(\"invalid kind\")\n\t\t\t\t}\n\t\t\t})\n\t\t\tfor _, entry := range entries {\n\t\t\t\tw.writeName(fd)\n\t\t\t\tw.WriteByte('<')\n\t\t\t\tif !w.compact {\n\t\t\t\t\tw.WriteByte('\\n')\n\t\t\t\t}\n\t\t\t\tw.indent++\n\t\t\t\tw.writeName(kfd)\n\t\t\t\tif err := w.writeSingularValue(entry.key, kfd); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tw.WriteByte('\\n')\n\t\t\t\tw.writeName(vfd)\n\t\t\t\tif err := w.writeSingularValue(entry.val, vfd); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tw.WriteByte('\\n')\n\t\t\t\tw.indent--\n\t\t\t\tw.WriteByte('>')\n\t\t\t\tw.WriteByte('\\n')\n\t\t\t}\n\t\tdefault:\n\t\t\tw.writeName(fd)\n\t\t\tif err := w.writeSingularValue(m.Get(fd), fd); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tw.WriteByte('\\n')\n\t\t}\n\t}\n\n\tif b := m.GetUnknown(); len(b) > 0 {\n\t\tw.writeUnknownFields(b)\n\t}\n\treturn w.writeExtensions(m)\n}\n\nfunc (w *textWriter) writeSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tswitch fd.Kind() {\n\tcase protoreflect.FloatKind, protoreflect.DoubleKind:\n\t\tswitch vf := v.Float(); {\n\t\tcase math.IsInf(vf, +1):\n\t\t\tw.Write(posInf)\n\t\tcase math.IsInf(vf, -1):\n\t\t\tw.Write(negInf)\n\t\tcase math.IsNaN(vf):\n\t\t\tw.Write(nan)\n\t\tdefault:\n\t\t\tfmt.Fprint(w, v.Interface())\n\t\t}\n\tcase protoreflect.StringKind:\n\t\t// NOTE: This does not validate UTF-8 for historical reasons.\n\t\tw.writeQuotedString(string(v.String()))\n\tcase protoreflect.BytesKind:\n\t\tw.writeQuotedString(string(v.Bytes()))\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tvar bra, ket byte = '<', '>'\n\t\tif fd.Kind() == protoreflect.GroupKind {\n\t\t\tbra, ket = '{', '}'\n\t\t}\n\t\tw.WriteByte(bra)\n\t\tif !w.compact {\n\t\t\tw.WriteByte('\\n')\n\t\t}\n\t\tw.indent++\n\t\tm := v.Message()\n\t\tif m2, ok := m.Interface().(encoding.TextMarshaler); ok {\n\t\t\tb, err := m2.MarshalText()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tw.Write(b)\n\t\t} else {\n\t\t\tw.writeMessage(m)\n\t\t}\n\t\tw.indent--\n\t\tw.WriteByte(ket)\n\tcase protoreflect.EnumKind:\n\t\tif ev := fd.Enum().Values().ByNumber(v.Enum()); ev != nil {\n\t\t\tfmt.Fprint(w, ev.Name())\n\t\t} else {\n\t\t\tfmt.Fprint(w, v.Enum())\n\t\t}\n\tdefault:\n\t\tfmt.Fprint(w, v.Interface())\n\t}\n\treturn nil\n}\n\n// writeQuotedString writes a quoted string in the protocol buffer text format.\nfunc (w *textWriter) writeQuotedString(s string) {\n\tw.WriteByte('\"')\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch c := s[i]; c {\n\t\tcase '\\n':\n\t\t\tw.buf = append(w.buf, `\\n`...)\n\t\tcase '\\r':\n\t\t\tw.buf = append(w.buf, `\\r`...)\n\t\tcase '\\t':\n\t\t\tw.buf = append(w.buf, `\\t`...)\n\t\tcase '\"':\n\t\t\tw.buf = append(w.buf, `\\\"`...)\n\t\tcase '\\\\':\n\t\t\tw.buf = append(w.buf, `\\\\`...)\n\t\tdefault:\n\t\t\tif isPrint := c >= 0x20 && c < 0x7f; isPrint {\n\t\t\t\tw.buf = append(w.buf, c)\n\t\t\t} else {\n\t\t\t\tw.buf = append(w.buf, fmt.Sprintf(`\\%03o`, c)...)\n\t\t\t}\n\t\t}\n\t}\n\tw.WriteByte('\"')\n}\n\nfunc (w *textWriter) writeUnknownFields(b []byte) {\n\tif !w.compact {\n\t\tfmt.Fprintf(w, \"/* %d unknown bytes */\\n\", len(b))\n\t}\n\n\tfor len(b) > 0 {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn\n\t\t}\n\t\tb = b[n:]\n\n\t\tif wtyp == protowire.EndGroupType {\n\t\t\tw.indent--\n\t\t\tw.Write(endBraceNewline)\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Fprint(w, num)\n\t\tif wtyp != protowire.StartGroupType {\n\t\t\tw.WriteByte(':')\n\t\t}\n\t\tif !w.compact || wtyp == protowire.StartGroupType {\n\t\t\tw.WriteByte(' ')\n\t\t}\n\t\tswitch wtyp {\n\t\tcase protowire.VarintType:\n\t\t\tv, n := protowire.ConsumeVarint(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tfmt.Fprint(w, v)\n\t\tcase protowire.Fixed32Type:\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tfmt.Fprint(w, v)\n\t\tcase protowire.Fixed64Type:\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tfmt.Fprint(w, v)\n\t\tcase protowire.BytesType:\n\t\t\tv, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tfmt.Fprintf(w, \"%q\", v)\n\t\tcase protowire.StartGroupType:\n\t\t\tw.WriteByte('{')\n\t\t\tw.indent++\n\t\tdefault:\n\t\t\tfmt.Fprintf(w, \"/* unknown wire type %d */\", wtyp)\n\t\t}\n\t\tw.WriteByte('\\n')\n\t}\n}\n\n// writeExtensions writes all the extensions in m.\nfunc (w *textWriter) writeExtensions(m protoreflect.Message) error {\n\tmd := m.Descriptor()\n\tif md.ExtensionRanges().Len() == 0 {\n\t\treturn nil\n\t}\n\n\ttype ext struct {\n\t\tdesc protoreflect.FieldDescriptor\n\t\tval  protoreflect.Value\n\t}\n\tvar exts []ext\n\tm.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tif fd.IsExtension() {\n\t\t\texts = append(exts, ext{fd, v})\n\t\t}\n\t\treturn true\n\t})\n\tsort.Slice(exts, func(i, j int) bool {\n\t\treturn exts[i].desc.Number() < exts[j].desc.Number()\n\t})\n\n\tfor _, ext := range exts {\n\t\t// For message set, use the name of the message as the extension name.\n\t\tname := string(ext.desc.FullName())\n\t\tif isMessageSet(ext.desc.ContainingMessage()) {\n\t\t\tname = strings.TrimSuffix(name, \".message_set_extension\")\n\t\t}\n\n\t\tif !ext.desc.IsList() {\n\t\t\tif err := w.writeSingularExtension(name, ext.val, ext.desc); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tlv := ext.val.List()\n\t\t\tfor i := 0; i < lv.Len(); i++ {\n\t\t\t\tif err := w.writeSingularExtension(name, lv.Get(i), ext.desc); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (w *textWriter) writeSingularExtension(name string, v protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tfmt.Fprintf(w, \"[%s]:\", name)\n\tif !w.compact {\n\t\tw.WriteByte(' ')\n\t}\n\tif err := w.writeSingularValue(v, fd); err != nil {\n\t\treturn err\n\t}\n\tw.WriteByte('\\n')\n\treturn nil\n}\n\nfunc (w *textWriter) writeIndent() {\n\tif !w.complete {\n\t\treturn\n\t}\n\tfor i := 0; i < w.indent*2; i++ {\n\t\tw.buf = append(w.buf, ' ')\n\t}\n\tw.complete = false\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/wire.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\tprotoV2 \"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// Size returns the size in bytes of the wire-format encoding of m.\nfunc Size(m Message) int {\n\tif m == nil {\n\t\treturn 0\n\t}\n\tmi := MessageV2(m)\n\treturn protoV2.Size(mi)\n}\n\n// Marshal returns the wire-format encoding of m.\nfunc Marshal(m Message) ([]byte, error) {\n\tb, err := marshalAppend(nil, m, false)\n\tif b == nil {\n\t\tb = zeroBytes\n\t}\n\treturn b, err\n}\n\nvar zeroBytes = make([]byte, 0, 0)\n\nfunc marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) {\n\tif m == nil {\n\t\treturn nil, ErrNil\n\t}\n\tmi := MessageV2(m)\n\tnbuf, err := protoV2.MarshalOptions{\n\t\tDeterministic: deterministic,\n\t\tAllowPartial:  true,\n\t}.MarshalAppend(buf, mi)\n\tif err != nil {\n\t\treturn buf, err\n\t}\n\tif len(buf) == len(nbuf) {\n\t\tif !mi.ProtoReflect().IsValid() {\n\t\t\treturn buf, ErrNil\n\t\t}\n\t}\n\treturn nbuf, checkRequiredNotSet(mi)\n}\n\n// Unmarshal parses a wire-format message in b and places the decoded results in m.\n//\n// Unmarshal resets m before starting to unmarshal, so any existing data in m is always\n// removed. Use UnmarshalMerge to preserve and append to existing data.\nfunc Unmarshal(b []byte, m Message) error {\n\tm.Reset()\n\treturn UnmarshalMerge(b, m)\n}\n\n// UnmarshalMerge parses a wire-format message in b and places the decoded results in m.\nfunc UnmarshalMerge(b []byte, m Message) error {\n\tmi := MessageV2(m)\n\tout, err := protoV2.UnmarshalOptions{\n\t\tAllowPartial: true,\n\t\tMerge:        true,\n\t}.UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     b,\n\t\tMessage: mi.ProtoReflect(),\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tif out.Flags&protoiface.UnmarshalInitialized > 0 {\n\t\treturn nil\n\t}\n\treturn checkRequiredNotSet(mi)\n}\n"
  },
  {
    "path": "vendor/github.com/golang/protobuf/proto/wrappers.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\n// Bool stores v in a new bool value and returns a pointer to it.\nfunc Bool(v bool) *bool { return &v }\n\n// Int stores v in a new int32 value and returns a pointer to it.\n//\n// Deprecated: Use Int32 instead.\nfunc Int(v int) *int32 { return Int32(int32(v)) }\n\n// Int32 stores v in a new int32 value and returns a pointer to it.\nfunc Int32(v int32) *int32 { return &v }\n\n// Int64 stores v in a new int64 value and returns a pointer to it.\nfunc Int64(v int64) *int64 { return &v }\n\n// Uint32 stores v in a new uint32 value and returns a pointer to it.\nfunc Uint32(v uint32) *uint32 { return &v }\n\n// Uint64 stores v in a new uint64 value and returns a pointer to it.\nfunc Uint64(v uint64) *uint64 { return &v }\n\n// Float32 stores v in a new float32 value and returns a pointer to it.\nfunc Float32(v float32) *float32 { return &v }\n\n// Float64 stores v in a new float64 value and returns a pointer to it.\nfunc Float64(v float64) *float64 { return &v }\n\n// String stores v in a new string value and returns a pointer to it.\nfunc String(v string) *string { return &v }\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/LICENSE",
    "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 [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."
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/README.md",
    "content": "# `name`\n\n[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/name?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/name)\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/check.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"strings\"\n\t\"unicode/utf8\"\n)\n\n// stripRunesFn returns a function which returns -1 (i.e. a value which\n// signals deletion in strings.Map) for runes in 'runes', and the rune otherwise.\nfunc stripRunesFn(runes string) func(rune) rune {\n\treturn func(r rune) rune {\n\t\tif strings.ContainsRune(runes, r) {\n\t\t\treturn -1\n\t\t}\n\t\treturn r\n\t}\n}\n\n// checkElement checks a given named element matches character and length restrictions.\n// Returns true if the given element adheres to the given restrictions, false otherwise.\nfunc checkElement(name, element, allowedRunes string, minRunes, maxRunes int) error {\n\tnumRunes := utf8.RuneCountInString(element)\n\tif (numRunes < minRunes) || (maxRunes < numRunes) {\n\t\treturn newErrBadName(\"%s must be between %d and %d characters in length: %s\", name, minRunes, maxRunes, element)\n\t} else if len(strings.Map(stripRunesFn(allowedRunes), element)) != 0 {\n\t\treturn newErrBadName(\"%s can only contain the characters `%s`: %s\", name, allowedRunes, element)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/digest.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t// nolint: depguard\n\t_ \"crypto/sha256\" // Recommended by go-digest.\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nconst digestDelim = \"@\"\n\n// Digest stores a digest name in a structured form.\ntype Digest struct {\n\tRepository\n\tdigest   string\n\toriginal string\n}\n\nvar _ Reference = (*Digest)(nil)\nvar _ encoding.TextMarshaler = (*Digest)(nil)\nvar _ encoding.TextUnmarshaler = (*Digest)(nil)\nvar _ json.Marshaler = (*Digest)(nil)\nvar _ json.Unmarshaler = (*Digest)(nil)\n\n// Context implements Reference.\nfunc (d Digest) Context() Repository {\n\treturn d.Repository\n}\n\n// Identifier implements Reference.\nfunc (d Digest) Identifier() string {\n\treturn d.DigestStr()\n}\n\n// DigestStr returns the digest component of the Digest.\nfunc (d Digest) DigestStr() string {\n\treturn d.digest\n}\n\n// Name returns the name from which the Digest was derived.\nfunc (d Digest) Name() string {\n\treturn d.Repository.Name() + digestDelim + d.DigestStr()\n}\n\n// String returns the original input string.\nfunc (d Digest) String() string {\n\treturn d.original\n}\n\n// MarshalJSON formats the digest into a string for JSON serialization.\nfunc (d Digest) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(d.String())\n}\n\n// UnmarshalJSON parses a JSON string into a Digest.\nfunc (d *Digest) UnmarshalJSON(data []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\tn, err := NewDigest(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*d = n\n\treturn nil\n}\n\n// MarshalText formats the digest into a string for text serialization.\nfunc (d Digest) MarshalText() ([]byte, error) {\n\treturn []byte(d.String()), nil\n}\n\n// UnmarshalText parses a text string into a Digest.\nfunc (d *Digest) UnmarshalText(data []byte) error {\n\tn, err := NewDigest(string(data))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*d = n\n\treturn nil\n}\n\n// NewDigest returns a new Digest representing the given name.\nfunc NewDigest(name string, opts ...Option) (Digest, error) {\n\t// Split on \"@\"\n\tparts := strings.Split(name, digestDelim)\n\tif len(parts) != 2 {\n\t\treturn Digest{}, newErrBadName(\"a digest must contain exactly one '@' separator (e.g. registry/repository@digest) saw: %s\", name)\n\t}\n\tbase := parts[0]\n\tdig := parts[1]\n\tprefix := digest.Canonical.String() + \":\"\n\tif !strings.HasPrefix(dig, prefix) {\n\t\treturn Digest{}, newErrBadName(\"unsupported digest algorithm: %s\", dig)\n\t}\n\thex := strings.TrimPrefix(dig, prefix)\n\tif err := digest.Canonical.Validate(hex); err != nil {\n\t\treturn Digest{}, err\n\t}\n\n\ttag, err := NewTag(base, opts...)\n\tif err == nil {\n\t\tbase = tag.Repository.Name()\n\t}\n\n\trepo, err := NewRepository(base, opts...)\n\tif err != nil {\n\t\treturn Digest{}, err\n\t}\n\treturn Digest{\n\t\tRepository: repo,\n\t\tdigest:     dig,\n\t\toriginal:   name,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/doc.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package name defines structured types for representing image references.\n//\n// What's in a name? For image references, not nearly enough!\n//\n// Image references look a lot like URLs, but they differ in that they don't\n// contain the scheme (http or https), they can end with a :tag or a @digest\n// (the latter being validated), and they perform defaulting for missing\n// components.\n//\n// Since image references don't contain the scheme, we do our best to infer\n// if we use http or https from the given hostname. We allow http fallback for\n// any host that looks like localhost (localhost, 127.0.0.1, ::1), ends in\n// \".local\", or is in the \"private\" address space per RFC 1918. For everything\n// else, we assume https only. To override this heuristic, use the Insecure\n// option.\n//\n// Image references with a digest signal to us that we should verify the content\n// of the image matches the digest. E.g. when pulling a Digest reference, we'll\n// calculate the sha256 of the manifest returned by the registry and error out\n// if it doesn't match what we asked for.\n//\n// For defaulting, we interpret \"ubuntu\" as\n// \"index.docker.io/library/ubuntu:latest\" because we add the missing repo\n// \"library\", the missing registry \"index.docker.io\", and the missing tag\n// \"latest\". To disable this defaulting, use the StrictValidation option. This\n// is useful e.g. to only allow image references that explicitly set a tag or\n// digest, so that you don't accidentally pull \"latest\".\npackage name\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/errors.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// ErrBadName is an error for when a bad docker name is supplied.\ntype ErrBadName struct {\n\tinfo string\n}\n\nfunc (e *ErrBadName) Error() string {\n\treturn e.info\n}\n\n// Is reports whether target is an error of type ErrBadName\nfunc (e *ErrBadName) Is(target error) bool {\n\tvar berr *ErrBadName\n\treturn errors.As(target, &berr)\n}\n\n// newErrBadName returns a ErrBadName which returns the given formatted string from Error().\nfunc newErrBadName(fmtStr string, args ...any) *ErrBadName {\n\treturn &ErrBadName{fmt.Sprintf(fmtStr, args...)}\n}\n\n// IsErrBadName returns true if the given error is an ErrBadName.\n//\n// Deprecated: Use errors.Is.\nfunc IsErrBadName(err error) bool {\n\tvar berr *ErrBadName\n\treturn errors.As(err, &berr)\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/options.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nconst (\n\t// DefaultRegistry is the registry name that will be used if no registry\n\t// provided and the default is not overridden.\n\tDefaultRegistry      = \"index.docker.io\"\n\tdefaultRegistryAlias = \"docker.io\"\n\n\t// DefaultTag is the tag name that will be used if no tag provided and the\n\t// default is not overridden.\n\tDefaultTag = \"latest\"\n)\n\ntype options struct {\n\tstrict          bool // weak by default\n\tinsecure        bool // secure by default\n\tdefaultRegistry string\n\tdefaultTag      string\n}\n\nfunc makeOptions(opts ...Option) options {\n\topt := options{\n\t\tdefaultRegistry: DefaultRegistry,\n\t\tdefaultTag:      DefaultTag,\n\t}\n\tfor _, o := range opts {\n\t\to(&opt)\n\t}\n\treturn opt\n}\n\n// Option is a functional option for name parsing.\ntype Option func(*options)\n\n// StrictValidation is an Option that requires image references to be fully\n// specified; i.e. no defaulting for registry (dockerhub), repo (library),\n// or tag (latest).\nfunc StrictValidation(opts *options) {\n\topts.strict = true\n}\n\n// WeakValidation is an Option that sets defaults when parsing names, see\n// StrictValidation.\nfunc WeakValidation(opts *options) {\n\topts.strict = false\n}\n\n// Insecure is an Option that allows image references to be fetched without TLS.\nfunc Insecure(opts *options) {\n\topts.insecure = true\n}\n\n// OptionFn is a function that returns an option.\ntype OptionFn func() Option\n\n// WithDefaultRegistry sets the default registry that will be used if one is not\n// provided.\nfunc WithDefaultRegistry(r string) Option {\n\treturn func(opts *options) {\n\t\topts.defaultRegistry = r\n\t}\n}\n\n// WithDefaultTag sets the default tag that will be used if one is not provided.\nfunc WithDefaultTag(t string) Option {\n\treturn func(opts *options) {\n\t\topts.defaultTag = t\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/ref.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"fmt\"\n)\n\n// Reference defines the interface that consumers use when they can\n// take either a tag or a digest.\ntype Reference interface {\n\tfmt.Stringer\n\n\t// Context accesses the Repository context of the reference.\n\tContext() Repository\n\n\t// Identifier accesses the type-specific portion of the reference.\n\tIdentifier() string\n\n\t// Name is the fully-qualified reference name.\n\tName() string\n\n\t// Scope is the scope needed to access this reference.\n\tScope(string) string\n}\n\n// ParseReference parses the string as a reference, either by tag or digest.\nfunc ParseReference(s string, opts ...Option) (Reference, error) {\n\tif t, err := NewTag(s, opts...); err == nil {\n\t\treturn t, nil\n\t}\n\tif d, err := NewDigest(s, opts...); err == nil {\n\t\treturn d, nil\n\t}\n\treturn nil, newErrBadName(\"could not parse reference: %s\", s)\n}\n\ntype stringConst string\n\n// MustParseReference behaves like ParseReference, but panics instead of\n// returning an error. It's intended for use in tests, or when a value is\n// expected to be valid at code authoring time.\n//\n// To discourage its use in scenarios where the value is not known at code\n// authoring time, it must be passed a string constant:\n//\n//\tconst str = \"valid/string\"\n//\tMustParseReference(str)\n//\tMustParseReference(\"another/valid/string\")\n//\tMustParseReference(str + \"/and/more\")\n//\n// These will not compile:\n//\n//\tvar str = \"valid/string\"\n//\tMustParseReference(str)\n//\tMustParseReference(strings.Join([]string{\"valid\", \"string\"}, \"/\"))\nfunc MustParseReference(s stringConst, opts ...Option) Reference {\n\tref, err := ParseReference(string(s), opts...)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ref\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/registry.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"net\"\n\t\"net/url\"\n\t\"path\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Detect more complex forms of local references.\nvar reLocal = regexp.MustCompile(`.*\\.local(?:host)?(?::\\d{1,5})?$`)\n\n// Detect the loopback IP (127.0.0.1)\nvar reLoopback = regexp.MustCompile(regexp.QuoteMeta(\"127.0.0.1\"))\n\n// Detect the loopback IPV6 (::1)\nvar reipv6Loopback = regexp.MustCompile(regexp.QuoteMeta(\"::1\"))\n\n// Registry stores a docker registry name in a structured form.\ntype Registry struct {\n\tinsecure bool\n\tregistry string\n}\n\nvar _ encoding.TextMarshaler = (*Registry)(nil)\nvar _ encoding.TextUnmarshaler = (*Registry)(nil)\nvar _ json.Marshaler = (*Registry)(nil)\nvar _ json.Unmarshaler = (*Registry)(nil)\n\n// RegistryStr returns the registry component of the Registry.\nfunc (r Registry) RegistryStr() string {\n\treturn r.registry\n}\n\n// Name returns the name from which the Registry was derived.\nfunc (r Registry) Name() string {\n\treturn r.RegistryStr()\n}\n\nfunc (r Registry) String() string {\n\treturn r.Name()\n}\n\n// Repo returns a Repository in the Registry with the given name.\nfunc (r Registry) Repo(repo ...string) Repository {\n\treturn Repository{Registry: r, repository: path.Join(repo...)}\n}\n\n// Scope returns the scope required to access the registry.\nfunc (r Registry) Scope(string) string {\n\t// The only resource under 'registry' is 'catalog'. http://goo.gl/N9cN9Z\n\treturn \"registry:catalog:*\"\n}\n\nfunc (r Registry) isRFC1918() bool {\n\tipStr := strings.Split(r.Name(), \":\")[0]\n\tip := net.ParseIP(ipStr)\n\tif ip == nil {\n\t\treturn false\n\t}\n\tfor _, cidr := range []string{\"10.0.0.0/8\", \"172.16.0.0/12\", \"192.168.0.0/16\"} {\n\t\t_, block, _ := net.ParseCIDR(cidr)\n\t\tif block.Contains(ip) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// Scheme returns https scheme for all the endpoints except localhost or when explicitly defined.\nfunc (r Registry) Scheme() string {\n\tif r.insecure {\n\t\treturn \"http\"\n\t}\n\tif r.isRFC1918() {\n\t\treturn \"http\"\n\t}\n\tif strings.HasPrefix(r.Name(), \"localhost:\") {\n\t\treturn \"http\"\n\t}\n\tif reLocal.MatchString(r.Name()) {\n\t\treturn \"http\"\n\t}\n\tif reLoopback.MatchString(r.Name()) {\n\t\treturn \"http\"\n\t}\n\tif reipv6Loopback.MatchString(r.Name()) {\n\t\treturn \"http\"\n\t}\n\treturn \"https\"\n}\n\nfunc checkRegistry(name string) error {\n\t// Per RFC 3986, registries (authorities) are required to be prefixed with \"//\"\n\t// url.Host == hostname[:port] == authority\n\tif url, err := url.Parse(\"//\" + name); err != nil || url.Host != name {\n\t\treturn newErrBadName(\"registries must be valid RFC 3986 URI authorities: %s\", name)\n\t}\n\treturn nil\n}\n\n// NewRegistry returns a Registry based on the given name.\n// Strict validation requires explicit, valid RFC 3986 URI authorities to be given.\nfunc NewRegistry(name string, opts ...Option) (Registry, error) {\n\topt := makeOptions(opts...)\n\tif opt.strict && len(name) == 0 {\n\t\treturn Registry{}, newErrBadName(\"strict validation requires the registry to be explicitly defined\")\n\t}\n\n\tif err := checkRegistry(name); err != nil {\n\t\treturn Registry{}, err\n\t}\n\n\tif name == \"\" {\n\t\tname = opt.defaultRegistry\n\t}\n\t// Rewrite \"docker.io\" to \"index.docker.io\".\n\t// See: https://github.com/google/go-containerregistry/issues/68\n\tif name == defaultRegistryAlias {\n\t\tname = DefaultRegistry\n\t}\n\n\treturn Registry{registry: name, insecure: opt.insecure}, nil\n}\n\n// NewInsecureRegistry returns an Insecure Registry based on the given name.\n//\n// Deprecated: Use the Insecure Option with NewRegistry instead.\nfunc NewInsecureRegistry(name string, opts ...Option) (Registry, error) {\n\topts = append(opts, Insecure)\n\treturn NewRegistry(name, opts...)\n}\n\n// MarshalJSON formats the Registry into a string for JSON serialization.\nfunc (r Registry) MarshalJSON() ([]byte, error) { return json.Marshal(r.String()) }\n\n// UnmarshalJSON parses a JSON string into a Registry.\nfunc (r *Registry) UnmarshalJSON(data []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\tn, err := NewRegistry(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*r = n\n\treturn nil\n}\n\n// MarshalText formats the registry into a string for text serialization.\nfunc (r Registry) MarshalText() ([]byte, error) { return []byte(r.String()), nil }\n\n// UnmarshalText parses a text string into a Registry.\nfunc (r *Registry) UnmarshalText(data []byte) error {\n\tn, err := NewRegistry(string(data))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*r = n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/repository.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n)\n\nconst (\n\tdefaultNamespace = \"library\"\n\trepositoryChars  = \"abcdefghijklmnopqrstuvwxyz0123456789_-./\"\n\tregRepoDelimiter = \"/\"\n)\n\n// Repository stores a docker repository name in a structured form.\ntype Repository struct {\n\tRegistry\n\trepository string\n}\n\nvar _ encoding.TextMarshaler = (*Repository)(nil)\nvar _ encoding.TextUnmarshaler = (*Repository)(nil)\nvar _ json.Marshaler = (*Repository)(nil)\nvar _ json.Unmarshaler = (*Repository)(nil)\n\n// See https://docs.docker.com/docker-hub/official_repos\nfunc hasImplicitNamespace(repo string, reg Registry) bool {\n\treturn !strings.ContainsRune(repo, '/') && reg.RegistryStr() == DefaultRegistry\n}\n\n// RepositoryStr returns the repository component of the Repository.\nfunc (r Repository) RepositoryStr() string {\n\tif hasImplicitNamespace(r.repository, r.Registry) {\n\t\treturn fmt.Sprintf(\"%s/%s\", defaultNamespace, r.repository)\n\t}\n\treturn r.repository\n}\n\n// Name returns the name from which the Repository was derived.\nfunc (r Repository) Name() string {\n\tregName := r.Registry.Name()\n\tif regName != \"\" {\n\t\treturn regName + regRepoDelimiter + r.RepositoryStr()\n\t}\n\t// TODO: As far as I can tell, this is unreachable.\n\treturn r.RepositoryStr()\n}\n\nfunc (r Repository) String() string {\n\treturn r.Name()\n}\n\n// Scope returns the scope required to perform the given action on the registry.\n// TODO(jonjohnsonjr): consider moving scopes to a separate package.\nfunc (r Repository) Scope(action string) string {\n\treturn fmt.Sprintf(\"repository:%s:%s\", r.RepositoryStr(), action)\n}\n\nfunc checkRepository(repository string) error {\n\treturn checkElement(\"repository\", repository, repositoryChars, 2, 255)\n}\n\n// NewRepository returns a new Repository representing the given name, according to the given strictness.\nfunc NewRepository(name string, opts ...Option) (Repository, error) {\n\topt := makeOptions(opts...)\n\tif len(name) == 0 {\n\t\treturn Repository{}, newErrBadName(\"a repository name must be specified\")\n\t}\n\n\tvar registry string\n\trepo := name\n\tparts := strings.SplitN(name, regRepoDelimiter, 2)\n\tif len(parts) == 2 && (strings.ContainsRune(parts[0], '.') || strings.ContainsRune(parts[0], ':')) {\n\t\t// The first part of the repository is treated as the registry domain\n\t\t// iff it contains a '.' or ':' character, otherwise it is all repository\n\t\t// and the domain defaults to Docker Hub.\n\t\tregistry = parts[0]\n\t\trepo = parts[1]\n\t}\n\n\tif err := checkRepository(repo); err != nil {\n\t\treturn Repository{}, err\n\t}\n\n\treg, err := NewRegistry(registry, opts...)\n\tif err != nil {\n\t\treturn Repository{}, err\n\t}\n\tif hasImplicitNamespace(repo, reg) && opt.strict {\n\t\treturn Repository{}, newErrBadName(\"strict validation requires the full repository path (missing 'library')\")\n\t}\n\treturn Repository{reg, repo}, nil\n}\n\n// Tag returns a Tag in this Repository.\nfunc (r Repository) Tag(identifier string) Tag {\n\tt := Tag{\n\t\ttag:        identifier,\n\t\tRepository: r,\n\t}\n\tt.original = t.Name()\n\treturn t\n}\n\n// Digest returns a Digest in this Repository.\nfunc (r Repository) Digest(identifier string) Digest {\n\td := Digest{\n\t\tdigest:     identifier,\n\t\tRepository: r,\n\t}\n\td.original = d.Name()\n\treturn d\n}\n\n// MarshalJSON formats the Repository into a string for JSON serialization.\nfunc (r Repository) MarshalJSON() ([]byte, error) { return json.Marshal(r.String()) }\n\n// UnmarshalJSON parses a JSON string into a Repository.\nfunc (r *Repository) UnmarshalJSON(data []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\tn, err := NewRepository(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*r = n\n\treturn nil\n}\n\n// MarshalText formats the repository name into a string for text serialization.\nfunc (r Repository) MarshalText() ([]byte, error) { return []byte(r.String()), nil }\n\n// UnmarshalText parses a text string into a Repository.\nfunc (r *Repository) UnmarshalText(data []byte) error {\n\tn, err := NewRepository(string(data))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*r = n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/name/tag.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage name\n\nimport (\n\t\"encoding\"\n\t\"encoding/json\"\n\t\"strings\"\n)\n\nconst (\n\t// TODO(dekkagaijin): use the docker/distribution regexes for validation.\n\ttagChars = \"abcdefghijklmnopqrstuvwxyz0123456789_-.ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\ttagDelim = \":\"\n)\n\n// Tag stores a docker tag name in a structured form.\ntype Tag struct {\n\tRepository\n\ttag      string\n\toriginal string\n}\n\nvar _ Reference = (*Tag)(nil)\nvar _ encoding.TextMarshaler = (*Tag)(nil)\nvar _ encoding.TextUnmarshaler = (*Tag)(nil)\nvar _ json.Marshaler = (*Tag)(nil)\nvar _ json.Unmarshaler = (*Tag)(nil)\n\n// Context implements Reference.\nfunc (t Tag) Context() Repository {\n\treturn t.Repository\n}\n\n// Identifier implements Reference.\nfunc (t Tag) Identifier() string {\n\treturn t.TagStr()\n}\n\n// TagStr returns the tag component of the Tag.\nfunc (t Tag) TagStr() string {\n\treturn t.tag\n}\n\n// Name returns the name from which the Tag was derived.\nfunc (t Tag) Name() string {\n\treturn t.Repository.Name() + tagDelim + t.TagStr()\n}\n\n// String returns the original input string.\nfunc (t Tag) String() string {\n\treturn t.original\n}\n\n// Scope returns the scope required to perform the given action on the tag.\nfunc (t Tag) Scope(action string) string {\n\treturn t.Repository.Scope(action)\n}\n\nfunc checkTag(name string) error {\n\treturn checkElement(\"tag\", name, tagChars, 1, 128)\n}\n\n// NewTag returns a new Tag representing the given name, according to the given strictness.\nfunc NewTag(name string, opts ...Option) (Tag, error) {\n\topt := makeOptions(opts...)\n\tbase := name\n\ttag := \"\"\n\n\t// Split on \":\"\n\tparts := strings.Split(name, tagDelim)\n\t// Verify that we aren't confusing a tag for a hostname w/ port for the purposes of weak validation.\n\tif len(parts) > 1 && !strings.Contains(parts[len(parts)-1], regRepoDelimiter) {\n\t\tbase = strings.Join(parts[:len(parts)-1], tagDelim)\n\t\ttag = parts[len(parts)-1]\n\t\tif tag == \"\" {\n\t\t\treturn Tag{}, newErrBadName(\"%s must specify a tag name after the colon\", name)\n\t\t}\n\t}\n\n\t// We don't require a tag, but if we get one check it's valid,\n\t// even when not being strict.\n\t// If we are being strict, we want to validate the tag regardless in case\n\t// it's empty.\n\tif tag != \"\" || opt.strict {\n\t\tif err := checkTag(tag); err != nil {\n\t\t\treturn Tag{}, err\n\t\t}\n\t}\n\n\tif tag == \"\" {\n\t\ttag = opt.defaultTag\n\t}\n\n\trepo, err := NewRepository(base, opts...)\n\tif err != nil {\n\t\treturn Tag{}, err\n\t}\n\treturn Tag{\n\t\tRepository: repo,\n\t\ttag:        tag,\n\t\toriginal:   name,\n\t}, nil\n}\n\n// MarshalJSON formats the Tag into a string for JSON serialization.\nfunc (t Tag) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) }\n\n// UnmarshalJSON parses a JSON string into a Tag.\nfunc (t *Tag) UnmarshalJSON(data []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\tn, err := NewTag(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*t = n\n\treturn nil\n}\n\n// MarshalText formats the tag into a string for text serialization.\nfunc (t Tag) MarshalText() ([]byte, error) { return []byte(t.String()), nil }\n\n// UnmarshalText parses a text string into a Tag.\nfunc (t *Tag) UnmarshalText(data []byte) error {\n\tn, err := NewTag(string(data))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*t = n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/config.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"time\"\n)\n\n// ConfigFile is the configuration file that holds the metadata describing\n// how to launch a container. See:\n// https://github.com/opencontainers/image-spec/blob/master/config.md\n//\n// docker_version and os.version are not part of the spec but included\n// for backwards compatibility.\ntype ConfigFile struct {\n\tArchitecture string `json:\"architecture\"`\n\tAuthor       string `json:\"author,omitempty\"`\n\tContainer    string `json:\"container,omitempty\"`\n\tCreated      Time   `json:\"created,omitempty\"`\n\t// Deprecated: This field is deprecated and will be removed in the next release.\n\tDockerVersion string    `json:\"docker_version,omitempty\"`\n\tHistory       []History `json:\"history,omitempty\"`\n\tOS            string    `json:\"os\"`\n\tRootFS        RootFS    `json:\"rootfs\"`\n\tConfig        Config    `json:\"config\"`\n\tOSVersion     string    `json:\"os.version,omitempty\"`\n\tVariant       string    `json:\"variant,omitempty\"`\n\tOSFeatures    []string  `json:\"os.features,omitempty\"`\n}\n\n// Platform attempts to generates a Platform from the ConfigFile fields.\nfunc (cf *ConfigFile) Platform() *Platform {\n\tif cf.OS == \"\" && cf.Architecture == \"\" && cf.OSVersion == \"\" && cf.Variant == \"\" && len(cf.OSFeatures) == 0 {\n\t\treturn nil\n\t}\n\treturn &Platform{\n\t\tOS:           cf.OS,\n\t\tArchitecture: cf.Architecture,\n\t\tOSVersion:    cf.OSVersion,\n\t\tVariant:      cf.Variant,\n\t\tOSFeatures:   cf.OSFeatures,\n\t}\n}\n\n// History is one entry of a list recording how this container image was built.\ntype History struct {\n\tAuthor     string `json:\"author,omitempty\"`\n\tCreated    Time   `json:\"created,omitempty\"`\n\tCreatedBy  string `json:\"created_by,omitempty\"`\n\tComment    string `json:\"comment,omitempty\"`\n\tEmptyLayer bool   `json:\"empty_layer,omitempty\"`\n}\n\n// Time is a wrapper around time.Time to help with deep copying\ntype Time struct {\n\ttime.Time\n}\n\n// DeepCopyInto creates a deep-copy of the Time value.  The underlying time.Time\n// type is effectively immutable in the time API, so it is safe to\n// copy-by-assign, despite the presence of (unexported) Pointer fields.\nfunc (t *Time) DeepCopyInto(out *Time) {\n\t*out = *t\n}\n\n// RootFS holds the ordered list of file system deltas that comprise the\n// container image's root filesystem.\ntype RootFS struct {\n\tType    string `json:\"type\"`\n\tDiffIDs []Hash `json:\"diff_ids\"`\n}\n\n// HealthConfig holds configuration settings for the HEALTHCHECK feature.\ntype HealthConfig struct {\n\t// Test is the test to perform to check that the container is healthy.\n\t// An empty slice means to inherit the default.\n\t// The options are:\n\t// {} : inherit healthcheck\n\t// {\"NONE\"} : disable healthcheck\n\t// {\"CMD\", args...} : exec arguments directly\n\t// {\"CMD-SHELL\", command} : run command with system's default shell\n\tTest []string `json:\",omitempty\"`\n\n\t// Zero means to inherit. Durations are expressed as integer nanoseconds.\n\tInterval    time.Duration `json:\",omitempty\"` // Interval is the time to wait between checks.\n\tTimeout     time.Duration `json:\",omitempty\"` // Timeout is the time to wait before considering the check to have hung.\n\tStartPeriod time.Duration `json:\",omitempty\"` // The start period for the container to initialize before the retries starts to count down.\n\n\t// Retries is the number of consecutive failures needed to consider a container as unhealthy.\n\t// Zero means inherit.\n\tRetries int `json:\",omitempty\"`\n}\n\n// Config is a submessage of the config file described as:\n//\n//\tThe execution parameters which SHOULD be used as a base when running\n//\ta container using the image.\n//\n// The names of the fields in this message are chosen to reflect the JSON\n// payload of the Config as defined here:\n// https://git.io/vrAET\n// and\n// https://github.com/opencontainers/image-spec/blob/master/config.md\ntype Config struct {\n\tAttachStderr    bool                `json:\"AttachStderr,omitempty\"`\n\tAttachStdin     bool                `json:\"AttachStdin,omitempty\"`\n\tAttachStdout    bool                `json:\"AttachStdout,omitempty\"`\n\tCmd             []string            `json:\"Cmd,omitempty\"`\n\tHealthcheck     *HealthConfig       `json:\"Healthcheck,omitempty\"`\n\tDomainname      string              `json:\"Domainname,omitempty\"`\n\tEntrypoint      []string            `json:\"Entrypoint,omitempty\"`\n\tEnv             []string            `json:\"Env,omitempty\"`\n\tHostname        string              `json:\"Hostname,omitempty\"`\n\tImage           string              `json:\"Image,omitempty\"`\n\tLabels          map[string]string   `json:\"Labels,omitempty\"`\n\tOnBuild         []string            `json:\"OnBuild,omitempty\"`\n\tOpenStdin       bool                `json:\"OpenStdin,omitempty\"`\n\tStdinOnce       bool                `json:\"StdinOnce,omitempty\"`\n\tTty             bool                `json:\"Tty,omitempty\"`\n\tUser            string              `json:\"User,omitempty\"`\n\tVolumes         map[string]struct{} `json:\"Volumes,omitempty\"`\n\tWorkingDir      string              `json:\"WorkingDir,omitempty\"`\n\tExposedPorts    map[string]struct{} `json:\"ExposedPorts,omitempty\"`\n\tArgsEscaped     bool                `json:\"ArgsEscaped,omitempty\"`\n\tNetworkDisabled bool                `json:\"NetworkDisabled,omitempty\"`\n\tMacAddress      string              `json:\"MacAddress,omitempty\"`\n\tStopSignal      string              `json:\"StopSignal,omitempty\"`\n\tShell           []string            `json:\"Shell,omitempty\"`\n}\n\n// ParseConfigFile parses the io.Reader's contents into a ConfigFile.\nfunc ParseConfigFile(r io.Reader) (*ConfigFile, error) {\n\tcf := ConfigFile{}\n\tif err := json.NewDecoder(r).Decode(&cf); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &cf, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/doc.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// +k8s:deepcopy-gen=package\n\n// Package v1 defines structured types for OCI v1 images\npackage v1\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/hash.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"crypto\"\n\t\"encoding\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"strings\"\n)\n\n// Hash is an unqualified digest of some content, e.g. sha256:deadbeef\ntype Hash struct {\n\t// Algorithm holds the algorithm used to compute the hash.\n\tAlgorithm string\n\n\t// Hex holds the hex portion of the content hash.\n\tHex string\n}\n\nvar _ encoding.TextMarshaler = (*Hash)(nil)\nvar _ encoding.TextUnmarshaler = (*Hash)(nil)\nvar _ json.Marshaler = (*Hash)(nil)\nvar _ json.Unmarshaler = (*Hash)(nil)\n\n// String reverses NewHash returning the string-form of the hash.\nfunc (h Hash) String() string {\n\treturn fmt.Sprintf(\"%s:%s\", h.Algorithm, h.Hex)\n}\n\n// NewHash validates the input string is a hash and returns a strongly type Hash object.\nfunc NewHash(s string) (Hash, error) {\n\th := Hash{}\n\tif err := h.parse(s); err != nil {\n\t\treturn Hash{}, err\n\t}\n\treturn h, nil\n}\n\n// MarshalJSON implements json.Marshaler\nfunc (h Hash) MarshalJSON() ([]byte, error) { return json.Marshal(h.String()) }\n\n// UnmarshalJSON implements json.Unmarshaler\nfunc (h *Hash) UnmarshalJSON(data []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\treturn h.parse(s)\n}\n\n// MarshalText implements encoding.TextMarshaler. This is required to use\n// v1.Hash as a key in a map when marshalling JSON.\nfunc (h Hash) MarshalText() ([]byte, error) { return []byte(h.String()), nil }\n\n// UnmarshalText implements encoding.TextUnmarshaler. This is required to use\n// v1.Hash as a key in a map when unmarshalling JSON.\nfunc (h *Hash) UnmarshalText(text []byte) error { return h.parse(string(text)) }\n\n// Hasher returns a hash.Hash for the named algorithm (e.g. \"sha256\")\nfunc Hasher(name string) (hash.Hash, error) {\n\tswitch name {\n\tcase \"sha256\":\n\t\treturn crypto.SHA256.New(), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported hash: %q\", name)\n\t}\n}\n\nfunc (h *Hash) parse(unquoted string) error {\n\tparts := strings.Split(unquoted, \":\")\n\tif len(parts) != 2 {\n\t\treturn fmt.Errorf(\"cannot parse hash: %q\", unquoted)\n\t}\n\n\trest := strings.TrimLeft(parts[1], \"0123456789abcdef\")\n\tif len(rest) != 0 {\n\t\treturn fmt.Errorf(\"found non-hex character in hash: %c\", rest[0])\n\t}\n\n\thasher, err := Hasher(parts[0])\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Compare the hex to the expected size (2 hex characters per byte)\n\tif len(parts[1]) != hasher.Size()*2 {\n\t\treturn fmt.Errorf(\"wrong number of hex digits for %s: %s\", parts[0], parts[1])\n\t}\n\n\th.Algorithm = parts[0]\n\th.Hex = parts[1]\n\treturn nil\n}\n\n// SHA256 computes the Hash of the provided io.Reader's content.\nfunc SHA256(r io.Reader) (Hash, int64, error) {\n\thasher := crypto.SHA256.New()\n\tn, err := io.Copy(hasher, r)\n\tif err != nil {\n\t\treturn Hash{}, 0, err\n\t}\n\treturn Hash{\n\t\tAlgorithm: \"sha256\",\n\t\tHex:       hex.EncodeToString(hasher.Sum(make([]byte, 0, hasher.Size()))),\n\t}, n, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/image.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"github.com/google/go-containerregistry/pkg/v1/types\"\n)\n\n// Image defines the interface for interacting with an OCI v1 image.\ntype Image interface {\n\t// Layers returns the ordered collection of filesystem layers that comprise this image.\n\t// The order of the list is oldest/base layer first, and most-recent/top layer last.\n\tLayers() ([]Layer, error)\n\n\t// MediaType of this image's manifest.\n\tMediaType() (types.MediaType, error)\n\n\t// Size returns the size of the manifest.\n\tSize() (int64, error)\n\n\t// ConfigName returns the hash of the image's config file, also known as\n\t// the Image ID.\n\tConfigName() (Hash, error)\n\n\t// ConfigFile returns this image's config file.\n\tConfigFile() (*ConfigFile, error)\n\n\t// RawConfigFile returns the serialized bytes of ConfigFile().\n\tRawConfigFile() ([]byte, error)\n\n\t// Digest returns the sha256 of this image's manifest.\n\tDigest() (Hash, error)\n\n\t// Manifest returns this image's Manifest object.\n\tManifest() (*Manifest, error)\n\n\t// RawManifest returns the serialized bytes of Manifest()\n\tRawManifest() ([]byte, error)\n\n\t// LayerByDigest returns a Layer for interacting with a particular layer of\n\t// the image, looking it up by \"digest\" (the compressed hash).\n\tLayerByDigest(Hash) (Layer, error)\n\n\t// LayerByDiffID is an analog to LayerByDigest, looking up by \"diff id\"\n\t// (the uncompressed hash).\n\tLayerByDiffID(Hash) (Layer, error)\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/index.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"github.com/google/go-containerregistry/pkg/v1/types\"\n)\n\n// ImageIndex defines the interface for interacting with an OCI image index.\ntype ImageIndex interface {\n\t// MediaType of this image's manifest.\n\tMediaType() (types.MediaType, error)\n\n\t// Digest returns the sha256 of this index's manifest.\n\tDigest() (Hash, error)\n\n\t// Size returns the size of the manifest.\n\tSize() (int64, error)\n\n\t// IndexManifest returns this image index's manifest object.\n\tIndexManifest() (*IndexManifest, error)\n\n\t// RawManifest returns the serialized bytes of IndexManifest().\n\tRawManifest() ([]byte, error)\n\n\t// Image returns a v1.Image that this ImageIndex references.\n\tImage(Hash) (Image, error)\n\n\t// ImageIndex returns a v1.ImageIndex that this ImageIndex references.\n\tImageIndex(Hash) (ImageIndex, error)\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/layer.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"io\"\n\n\t\"github.com/google/go-containerregistry/pkg/v1/types\"\n)\n\n// Layer is an interface for accessing the properties of a particular layer of a v1.Image\ntype Layer interface {\n\t// Digest returns the Hash of the compressed layer.\n\tDigest() (Hash, error)\n\n\t// DiffID returns the Hash of the uncompressed layer.\n\tDiffID() (Hash, error)\n\n\t// Compressed returns an io.ReadCloser for the compressed layer contents.\n\tCompressed() (io.ReadCloser, error)\n\n\t// Uncompressed returns an io.ReadCloser for the uncompressed layer contents.\n\tUncompressed() (io.ReadCloser, error)\n\n\t// Size returns the compressed size of the Layer.\n\tSize() (int64, error)\n\n\t// MediaType returns the media type of the Layer.\n\tMediaType() (types.MediaType, error)\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\n\t\"github.com/google/go-containerregistry/pkg/v1/types\"\n)\n\n// Manifest represents the OCI image manifest in a structured way.\ntype Manifest struct {\n\tSchemaVersion int64             `json:\"schemaVersion\"`\n\tMediaType     types.MediaType   `json:\"mediaType,omitempty\"`\n\tConfig        Descriptor        `json:\"config\"`\n\tLayers        []Descriptor      `json:\"layers\"`\n\tAnnotations   map[string]string `json:\"annotations,omitempty\"`\n\tSubject       *Descriptor       `json:\"subject,omitempty\"`\n}\n\n// IndexManifest represents an OCI image index in a structured way.\ntype IndexManifest struct {\n\tSchemaVersion int64             `json:\"schemaVersion\"`\n\tMediaType     types.MediaType   `json:\"mediaType,omitempty\"`\n\tManifests     []Descriptor      `json:\"manifests\"`\n\tAnnotations   map[string]string `json:\"annotations,omitempty\"`\n\tSubject       *Descriptor       `json:\"subject,omitempty\"`\n}\n\n// Descriptor holds a reference from the manifest to one of its constituent elements.\ntype Descriptor struct {\n\tMediaType    types.MediaType   `json:\"mediaType\"`\n\tSize         int64             `json:\"size\"`\n\tDigest       Hash              `json:\"digest\"`\n\tData         []byte            `json:\"data,omitempty\"`\n\tURLs         []string          `json:\"urls,omitempty\"`\n\tAnnotations  map[string]string `json:\"annotations,omitempty\"`\n\tPlatform     *Platform         `json:\"platform,omitempty\"`\n\tArtifactType string            `json:\"artifactType,omitempty\"`\n}\n\n// ParseManifest parses the io.Reader's contents into a Manifest.\nfunc ParseManifest(r io.Reader) (*Manifest, error) {\n\tm := Manifest{}\n\tif err := json.NewDecoder(r).Decode(&m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &m, nil\n}\n\n// ParseIndexManifest parses the io.Reader's contents into an IndexManifest.\nfunc ParseIndexManifest(r io.Reader) (*IndexManifest, error) {\n\tim := IndexManifest{}\n\tif err := json.NewDecoder(r).Decode(&im); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &im, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/platform.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// Platform represents the target os/arch for an image.\ntype Platform struct {\n\tArchitecture string   `json:\"architecture\"`\n\tOS           string   `json:\"os\"`\n\tOSVersion    string   `json:\"os.version,omitempty\"`\n\tOSFeatures   []string `json:\"os.features,omitempty\"`\n\tVariant      string   `json:\"variant,omitempty\"`\n\tFeatures     []string `json:\"features,omitempty\"`\n}\n\nfunc (p Platform) String() string {\n\tif p.OS == \"\" {\n\t\treturn \"\"\n\t}\n\tvar b strings.Builder\n\tb.WriteString(p.OS)\n\tif p.Architecture != \"\" {\n\t\tb.WriteString(\"/\")\n\t\tb.WriteString(p.Architecture)\n\t}\n\tif p.Variant != \"\" {\n\t\tb.WriteString(\"/\")\n\t\tb.WriteString(p.Variant)\n\t}\n\tif p.OSVersion != \"\" {\n\t\tb.WriteString(\":\")\n\t\tb.WriteString(p.OSVersion)\n\t}\n\treturn b.String()\n}\n\n// ParsePlatform parses a string representing a Platform, if possible.\nfunc ParsePlatform(s string) (*Platform, error) {\n\tvar p Platform\n\tparts := strings.Split(strings.TrimSpace(s), \":\")\n\tif len(parts) == 2 {\n\t\tp.OSVersion = parts[1]\n\t}\n\tparts = strings.Split(parts[0], \"/\")\n\tif len(parts) > 0 {\n\t\tp.OS = parts[0]\n\t}\n\tif len(parts) > 1 {\n\t\tp.Architecture = parts[1]\n\t}\n\tif len(parts) > 2 {\n\t\tp.Variant = parts[2]\n\t}\n\tif len(parts) > 3 {\n\t\treturn nil, fmt.Errorf(\"too many slashes in platform spec: %s\", s)\n\t}\n\treturn &p, nil\n}\n\n// Equals returns true if the given platform is semantically equivalent to this one.\n// The order of Features and OSFeatures is not important.\nfunc (p Platform) Equals(o Platform) bool {\n\treturn p.OS == o.OS &&\n\t\tp.Architecture == o.Architecture &&\n\t\tp.Variant == o.Variant &&\n\t\tp.OSVersion == o.OSVersion &&\n\t\tstringSliceEqualIgnoreOrder(p.OSFeatures, o.OSFeatures) &&\n\t\tstringSliceEqualIgnoreOrder(p.Features, o.Features)\n}\n\n// Satisfies returns true if this Platform \"satisfies\" the given spec Platform.\n//\n// Note that this is different from Equals and that Satisfies is not reflexive.\n//\n// The given spec represents \"requirements\" such that any missing values in the\n// spec are not compared.\n//\n// For OSFeatures and Features, Satisfies will return true if this Platform's\n// fields contain a superset of the values in the spec's fields (order ignored).\nfunc (p Platform) Satisfies(spec Platform) bool {\n\treturn satisfies(spec.OS, p.OS) &&\n\t\tsatisfies(spec.Architecture, p.Architecture) &&\n\t\tsatisfies(spec.Variant, p.Variant) &&\n\t\tsatisfies(spec.OSVersion, p.OSVersion) &&\n\t\tsatisfiesList(spec.OSFeatures, p.OSFeatures) &&\n\t\tsatisfiesList(spec.Features, p.Features)\n}\n\nfunc satisfies(want, have string) bool {\n\treturn want == \"\" || want == have\n}\n\nfunc satisfiesList(want, have []string) bool {\n\tif len(want) == 0 {\n\t\treturn true\n\t}\n\n\tset := map[string]struct{}{}\n\tfor _, h := range have {\n\t\tset[h] = struct{}{}\n\t}\n\n\tfor _, w := range want {\n\t\tif _, ok := set[w]; !ok {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\n// stringSliceEqual compares 2 string slices and returns if their contents are identical.\nfunc stringSliceEqual(a, b []string) bool {\n\tif len(a) != len(b) {\n\t\treturn false\n\t}\n\tfor i, elm := range a {\n\t\tif elm != b[i] {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// stringSliceEqualIgnoreOrder compares 2 string slices and returns if their contents are identical, ignoring order\nfunc stringSliceEqualIgnoreOrder(a, b []string) bool {\n\tif a != nil && b != nil {\n\t\tsort.Strings(a)\n\t\tsort.Strings(b)\n\t}\n\treturn stringSliceEqual(a, b)\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/progress.go",
    "content": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\n// Update representation of an update of transfer progress. Some functions\n// in this module can take a channel to which updates will be sent while a\n// transfer is in progress.\n// +k8s:deepcopy-gen=false\ntype Update struct {\n\tTotal    int64\n\tComplete int64\n\tError    error\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/types/types.go",
    "content": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package types holds common OCI media types.\npackage types\n\n// MediaType is an enumeration of the supported mime types that an element of an image might have.\ntype MediaType string\n\n// The collection of known MediaType values.\nconst (\n\tOCIContentDescriptor           MediaType = \"application/vnd.oci.descriptor.v1+json\"\n\tOCIImageIndex                  MediaType = \"application/vnd.oci.image.index.v1+json\"\n\tOCIManifestSchema1             MediaType = \"application/vnd.oci.image.manifest.v1+json\"\n\tOCIConfigJSON                  MediaType = \"application/vnd.oci.image.config.v1+json\"\n\tOCILayer                       MediaType = \"application/vnd.oci.image.layer.v1.tar+gzip\"\n\tOCILayerZStd                   MediaType = \"application/vnd.oci.image.layer.v1.tar+zstd\"\n\tOCIRestrictedLayer             MediaType = \"application/vnd.oci.image.layer.nondistributable.v1.tar+gzip\"\n\tOCIUncompressedLayer           MediaType = \"application/vnd.oci.image.layer.v1.tar\"\n\tOCIUncompressedRestrictedLayer MediaType = \"application/vnd.oci.image.layer.nondistributable.v1.tar\"\n\n\tDockerManifestSchema1       MediaType = \"application/vnd.docker.distribution.manifest.v1+json\"\n\tDockerManifestSchema1Signed MediaType = \"application/vnd.docker.distribution.manifest.v1+prettyjws\"\n\tDockerManifestSchema2       MediaType = \"application/vnd.docker.distribution.manifest.v2+json\"\n\tDockerManifestList          MediaType = \"application/vnd.docker.distribution.manifest.list.v2+json\"\n\tDockerLayer                 MediaType = \"application/vnd.docker.image.rootfs.diff.tar.gzip\"\n\tDockerConfigJSON            MediaType = \"application/vnd.docker.container.image.v1+json\"\n\tDockerPluginConfig          MediaType = \"application/vnd.docker.plugin.v1+json\"\n\tDockerForeignLayer          MediaType = \"application/vnd.docker.image.rootfs.foreign.diff.tar.gzip\"\n\tDockerUncompressedLayer     MediaType = \"application/vnd.docker.image.rootfs.diff.tar\"\n\n\tOCIVendorPrefix    = \"vnd.oci\"\n\tDockerVendorPrefix = \"vnd.docker\"\n)\n\n// IsDistributable returns true if a layer is distributable, see:\n// https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers\nfunc (m MediaType) IsDistributable() bool {\n\tswitch m {\n\tcase DockerForeignLayer, OCIRestrictedLayer, OCIUncompressedRestrictedLayer:\n\t\treturn false\n\t}\n\treturn true\n}\n\n// IsImage returns true if the mediaType represents an image manifest, as opposed to something else, like an index.\nfunc (m MediaType) IsImage() bool {\n\tswitch m {\n\tcase OCIManifestSchema1, DockerManifestSchema2:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// IsIndex returns true if the mediaType represents an index, as opposed to something else, like an image.\nfunc (m MediaType) IsIndex() bool {\n\tswitch m {\n\tcase OCIImageIndex, DockerManifestList:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// IsConfig returns true if the mediaType represents a config, as opposed to something else, like an image.\nfunc (m MediaType) IsConfig() bool {\n\tswitch m {\n\tcase OCIConfigJSON, DockerConfigJSON:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (m MediaType) IsSchema1() bool {\n\tswitch m {\n\tcase DockerManifestSchema1, DockerManifestSchema1Signed:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (m MediaType) IsLayer() bool {\n\tswitch m {\n\tcase DockerLayer, DockerUncompressedLayer, OCILayer, OCILayerZStd, OCIUncompressedLayer, DockerForeignLayer, OCIRestrictedLayer, OCIUncompressedRestrictedLayer:\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.go",
    "content": "//go:build !ignore_autogenerated\n// +build !ignore_autogenerated\n\n// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by deepcopy-gen. DO NOT EDIT.\n\npackage v1\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *Config) DeepCopyInto(out *Config) {\n\t*out = *in\n\tif in.Cmd != nil {\n\t\tin, out := &in.Cmd, &out.Cmd\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Healthcheck != nil {\n\t\tin, out := &in.Healthcheck, &out.Healthcheck\n\t\t*out = new(HealthConfig)\n\t\t(*in).DeepCopyInto(*out)\n\t}\n\tif in.Entrypoint != nil {\n\t\tin, out := &in.Entrypoint, &out.Entrypoint\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Env != nil {\n\t\tin, out := &in.Env, &out.Env\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Labels != nil {\n\t\tin, out := &in.Labels, &out.Labels\n\t\t*out = make(map[string]string, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.OnBuild != nil {\n\t\tin, out := &in.OnBuild, &out.OnBuild\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Volumes != nil {\n\t\tin, out := &in.Volumes, &out.Volumes\n\t\t*out = make(map[string]struct{}, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.ExposedPorts != nil {\n\t\tin, out := &in.ExposedPorts, &out.ExposedPorts\n\t\t*out = make(map[string]struct{}, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.Shell != nil {\n\t\tin, out := &in.Shell, &out.Shell\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.\nfunc (in *Config) DeepCopy() *Config {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Config)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *ConfigFile) DeepCopyInto(out *ConfigFile) {\n\t*out = *in\n\tin.Created.DeepCopyInto(&out.Created)\n\tif in.History != nil {\n\t\tin, out := &in.History, &out.History\n\t\t*out = make([]History, len(*in))\n\t\tfor i := range *in {\n\t\t\t(*in)[i].DeepCopyInto(&(*out)[i])\n\t\t}\n\t}\n\tin.RootFS.DeepCopyInto(&out.RootFS)\n\tin.Config.DeepCopyInto(&out.Config)\n\tif in.OSFeatures != nil {\n\t\tin, out := &in.OSFeatures, &out.OSFeatures\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigFile.\nfunc (in *ConfigFile) DeepCopy() *ConfigFile {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ConfigFile)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *Descriptor) DeepCopyInto(out *Descriptor) {\n\t*out = *in\n\tout.Digest = in.Digest\n\tif in.Data != nil {\n\t\tin, out := &in.Data, &out.Data\n\t\t*out = make([]byte, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.URLs != nil {\n\t\tin, out := &in.URLs, &out.URLs\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Annotations != nil {\n\t\tin, out := &in.Annotations, &out.Annotations\n\t\t*out = make(map[string]string, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.Platform != nil {\n\t\tin, out := &in.Platform, &out.Platform\n\t\t*out = new(Platform)\n\t\t(*in).DeepCopyInto(*out)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Descriptor.\nfunc (in *Descriptor) DeepCopy() *Descriptor {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Descriptor)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *Hash) DeepCopyInto(out *Hash) {\n\t*out = *in\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hash.\nfunc (in *Hash) DeepCopy() *Hash {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Hash)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *HealthConfig) DeepCopyInto(out *HealthConfig) {\n\t*out = *in\n\tif in.Test != nil {\n\t\tin, out := &in.Test, &out.Test\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthConfig.\nfunc (in *HealthConfig) DeepCopy() *HealthConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(HealthConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *History) DeepCopyInto(out *History) {\n\t*out = *in\n\tin.Created.DeepCopyInto(&out.Created)\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new History.\nfunc (in *History) DeepCopy() *History {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(History)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *IndexManifest) DeepCopyInto(out *IndexManifest) {\n\t*out = *in\n\tif in.Manifests != nil {\n\t\tin, out := &in.Manifests, &out.Manifests\n\t\t*out = make([]Descriptor, len(*in))\n\t\tfor i := range *in {\n\t\t\t(*in)[i].DeepCopyInto(&(*out)[i])\n\t\t}\n\t}\n\tif in.Annotations != nil {\n\t\tin, out := &in.Annotations, &out.Annotations\n\t\t*out = make(map[string]string, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.Subject != nil {\n\t\tin, out := &in.Subject, &out.Subject\n\t\t*out = new(Descriptor)\n\t\t(*in).DeepCopyInto(*out)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndexManifest.\nfunc (in *IndexManifest) DeepCopy() *IndexManifest {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(IndexManifest)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *Manifest) DeepCopyInto(out *Manifest) {\n\t*out = *in\n\tin.Config.DeepCopyInto(&out.Config)\n\tif in.Layers != nil {\n\t\tin, out := &in.Layers, &out.Layers\n\t\t*out = make([]Descriptor, len(*in))\n\t\tfor i := range *in {\n\t\t\t(*in)[i].DeepCopyInto(&(*out)[i])\n\t\t}\n\t}\n\tif in.Annotations != nil {\n\t\tin, out := &in.Annotations, &out.Annotations\n\t\t*out = make(map[string]string, len(*in))\n\t\tfor key, val := range *in {\n\t\t\t(*out)[key] = val\n\t\t}\n\t}\n\tif in.Subject != nil {\n\t\tin, out := &in.Subject, &out.Subject\n\t\t*out = new(Descriptor)\n\t\t(*in).DeepCopyInto(*out)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.\nfunc (in *Manifest) DeepCopy() *Manifest {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Manifest)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *Platform) DeepCopyInto(out *Platform) {\n\t*out = *in\n\tif in.OSFeatures != nil {\n\t\tin, out := &in.OSFeatures, &out.OSFeatures\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\tif in.Features != nil {\n\t\tin, out := &in.Features, &out.Features\n\t\t*out = make([]string, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Platform.\nfunc (in *Platform) DeepCopy() *Platform {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Platform)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *RootFS) DeepCopyInto(out *RootFS) {\n\t*out = *in\n\tif in.DiffIDs != nil {\n\t\tin, out := &in.DiffIDs, &out.DiffIDs\n\t\t*out = make([]Hash, len(*in))\n\t\tcopy(*out, *in)\n\t}\n\treturn\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootFS.\nfunc (in *RootFS) DeepCopy() *RootFS {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(RootFS)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time.\nfunc (in *Time) DeepCopy() *Time {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Time)\n\tin.DeepCopyInto(out)\n\treturn out\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-intervals/LICENSE",
    "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 [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": "vendor/github.com/google/go-intervals/intervalset/intervalset.go",
    "content": "// Copyright 2017 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package intervalset provides an abtraction for dealing with sets of\n// 1-dimensional spans, such as sets of time ranges. The Set type provides set\n// arithmetic and enumeration methods based on an Interval interface.\n//\n// DISCLAIMER: This library is not yet stable, so expect breaking changes.\npackage intervalset\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// Interval is the interface for a continuous or discrete span. The interval is\n// assumed to be inclusive of the starting point and exclusive of the ending\n// point.\n//\n// All methods in the interface are non-destructive: Calls to the methods should\n// not modify the interval. Furthermore, the implementation assumes an interval\n// will not be mutated by user code, either.\ntype Interval interface {\n\t// Intersect returns the intersection of an interval with another\n\t// interval. The function may panic if the other interval is incompatible.\n\tIntersect(Interval) Interval\n\n\t// Before returns true if the interval is completely before another interval.\n\tBefore(Interval) bool\n\n\t// IsZero returns true for the zero value of an interval.\n\tIsZero() bool\n\n\t// Bisect returns two intervals, one on the lower side of x and one on the\n\t// upper side of x, corresponding to the subtraction of x from the original\n\t// interval. The returned intervals are always within the range of the\n\t// original interval.\n\tBisect(x Interval) (Interval, Interval)\n\n\t// Adjoin returns the union of two intervals, if the intervals are exactly\n\t// adjacent, or the zero interval if they are not.\n\tAdjoin(Interval) Interval\n\n\t// Encompass returns an interval that covers the exact extents of two\n\t// intervals.\n\tEncompass(Interval) Interval\n}\n\n// Set is a set of interval objects used for\ntype Set struct {\n\t//non-overlapping intervals\n\tintervals []Interval\n\t// factory is needed when the extents of the empty set are needed.\n\tfactory intervalFactory\n}\n\n// SetInput is an interface implemented by Set and ImmutableSet. It is used when\n// one of these types type must take a set as an argument.\ntype SetInput interface {\n\t// Extent returns the Interval defined by the minimum and maximum values of\n\t// the set.\n\tExtent() Interval\n\n\t// IntervalsBetween iterates over the intervals within extents set and calls f\n\t// with each. If f returns false, iteration ceases.\n\t//\n\t// Any interval within the set that overlaps partially with extents is truncated\n\t// before being passed to f.\n\tIntervalsBetween(extents Interval, f IntervalReceiver)\n}\n\n// NewSet returns a new set given a sorted slice of intervals. This function\n// panics if the intervals are not sorted.\nfunc NewSet(intervals []Interval) *Set {\n\treturn NewSetV1(intervals, oldBehaviorFactory.makeZero)\n}\n\n// NewSetV1 returns a new set given a sorted slice of intervals. This function\n// panics if the intervals are not sorted.\n//\n// NewSetV1 will be renamed and will replace NewSet in the v1 release.\nfunc NewSetV1(intervals []Interval, makeZero func() Interval) *Set {\n\tif err := CheckSorted(intervals); err != nil {\n\t\tpanic(err)\n\t}\n\treturn &Set{intervals, makeIntervalFactor(makeZero)}\n}\n\n// CheckSorted checks that interval[i+1] is not before interval[i] for all\n// relevant elements of the input slice. Nil is returned when len(intervals) is\n// 0 or 1.\nfunc CheckSorted(intervals []Interval) error {\n\tfor i := 0; i < len(intervals)-1; i++ {\n\t\tif !intervals[i].Before(intervals[i+1]) {\n\t\t\treturn fmt.Errorf(\"!intervals[%d].Before(intervals[%d]) for %s, %s\", i, i+1, intervals[i], intervals[i+1])\n\t\t}\n\t}\n\treturn nil\n}\n\n// Empty returns a new, empty set of intervals.\nfunc Empty() *Set {\n\treturn EmptyV1(oldBehaviorFactory.makeZero)\n}\n\n// EmptyV1 returns a new, empty set of intervals using the semantics of the V1\n// API, which will require a factory method for construction of an empty interval.\nfunc EmptyV1(makeZero func() Interval) *Set {\n\treturn &Set{nil, makeIntervalFactor(makeZero)}\n}\n\n// Copy returns a copy of a set that may be mutated without affecting the original.\nfunc (s *Set) Copy() *Set {\n\treturn &Set{append([]Interval(nil), s.intervals...), s.factory}\n}\n\n// String returns a human-friendly representation of the set.\nfunc (s *Set) String() string {\n\tvar strs []string\n\tfor _, x := range s.intervals {\n\t\tstrs = append(strs, fmt.Sprintf(\"%s\", x))\n\t}\n\treturn fmt.Sprintf(\"{%s}\", strings.Join(strs, \", \"))\n}\n\n// Extent returns the Interval defined by the minimum and maximum values of the\n// set.\nfunc (s *Set) Extent() Interval {\n\tif len(s.intervals) == 0 {\n\t\treturn s.factory.makeZero()\n\t}\n\treturn s.intervals[0].Encompass(s.intervals[len(s.intervals)-1])\n}\n\n// Add adds all the elements of another set to this set.\nfunc (s *Set) Add(b SetInput) {\n\t// Deal with nil extent. See https://github.com/google/go-intervals/issues/6.\n\tbExtent := b.Extent()\n\tif bExtent == nil {\n\t\treturn // no changes needed\n\t}\n\n\t// Loop through the intervals of x\n\tb.IntervalsBetween(bExtent, func(x Interval) bool {\n\t\ts.insert(x)\n\t\treturn true\n\t})\n}\n\n// Contains reports whether an interval is entirely contained by the set.\nfunc (s *Set) Contains(ival Interval) bool {\n\t// Loop through the intervals of x\n\tnext := s.iterator(ival, true)\n\tfor setInterval := next(); setInterval != nil; setInterval = next() {\n\t\tleft, right := ival.Bisect(setInterval)\n\t\tif !left.IsZero() {\n\t\t\treturn false\n\t\t}\n\t\tival = right\n\t}\n\treturn ival.IsZero()\n}\n\n// adjoinOrAppend adds an interval to the end of intervals unless that value\n// directly adjoins the last element of intervals, in which case the last\n// element will be replaced by the adjoined interval.\nfunc adjoinOrAppend(intervals []Interval, x Interval) []Interval {\n\tlastIndex := len(intervals) - 1\n\tif lastIndex == -1 {\n\t\treturn append(intervals, x)\n\t}\n\tadjoined := intervals[lastIndex].Adjoin(x)\n\tif adjoined.IsZero() {\n\t\treturn append(intervals, x)\n\t}\n\tintervals[lastIndex] = adjoined\n\treturn intervals\n}\n\nfunc (s *Set) insert(insertion Interval) {\n\tif s.Contains(insertion) {\n\t\treturn\n\t}\n\t// TODO(reddaly): Something like Java's ArrayList would allow both O(log(n))\n\t// insertion and O(log(n)) lookup. For now, we have O(log(n)) lookup and O(n)\n\t// insertion.\n\tvar newIntervals []Interval\n\tpush := func(x Interval) {\n\t\tnewIntervals = adjoinOrAppend(newIntervals, x)\n\t}\n\tinserted := false\n\tfor _, x := range s.intervals {\n\t\tif inserted {\n\t\t\tpush(x)\n\t\t\tcontinue\n\t\t}\n\t\tif insertion.Before(x) {\n\t\t\tpush(insertion)\n\t\t\tpush(x)\n\t\t\tinserted = true\n\t\t\tcontinue\n\t\t}\n\t\t// [===left===)[==x===)[===right===)\n\t\tleft, right := insertion.Bisect(x)\n\t\tif !left.IsZero() {\n\t\t\tpush(left)\n\t\t}\n\t\tpush(x)\n\t\t// Replace the interval being inserted with the remaining portion of the\n\t\t// interval to be inserted.\n\t\tif right.IsZero() {\n\t\t\tinserted = true\n\t\t} else {\n\t\t\tinsertion = right\n\t\t}\n\t}\n\tif !inserted {\n\t\tpush(insertion)\n\t}\n\ts.intervals = newIntervals\n}\n\n// Sub destructively modifies the set by subtracting b.\nfunc (s *Set) Sub(b SetInput) {\n\textent := s.Extent()\n\t// Deal with nil extent. See https://github.com/google/go-intervals/issues/6.\n\tif extent == nil {\n\t\t// Set is already empty, no changes necessary.\n\t\treturn\n\t}\n\tvar newIntervals []Interval\n\tpush := func(x Interval) {\n\t\tnewIntervals = adjoinOrAppend(newIntervals, x)\n\t}\n\tnextX := s.iterator(extent, true)\n\tnextY, cancel := setIntervalIterator(b, extent)\n\tdefer cancel()\n\n\tx := nextX()\n\ty := nextY()\n\tfor x != nil {\n\t\t// If y == nil, all of the remaining intervals in A are to the right of B,\n\t\t// so just yield them.\n\t\tif y == nil {\n\t\t\tpush(x)\n\t\t\tx = nextX()\n\t\t\tcontinue\n\t\t}\n\t\t// Split x into parts left and right of y.\n\t\t// The diagrams below show the bisection results for various situations.\n\t\t// if left.IsZero() && !right.IsZero()\n\t\t//             xxx\n\t\t// y1y1 y2y2 y3  y4y4\n\t\t//             xxx\n\t\t// or\n\t\t//   xxxxxxxxxxxx\n\t\t// y1y1 y2y2 y3  y4y4\n\t\t//\n\t\t// if !left.IsZero() && !right.IsZero()\n\t\t//       x1x1x1x1x1\n\t\t//         y1  y2\n\t\t//\n\t\t// if left.IsZero() && right.IsZero()\n\t\t//    x1x1x1x1  x2x2x2\n\t\t//  y1y1y1y1y1y1y1\n\t\t//\n\t\t// if !left.IsZero() && right.IsZero()\n\t\t//   x1x1  x2\n\t\t//     y1y1y1y1\n\t\tleft, right := x.Bisect(y)\n\n\t\t// If the left side of x is non-zero, it can definitely be pushed to the\n\t\t// resulting interval set since no subsequent y value will intersect it.\n\t\t// The sequences look something like\n\t\t//         x1x1x1x1x1       OR   x1x1x1 x2\n\t\t//             y1 y2                       y1y1y1\n\t\t// left  = x1x1                  x1x1x1\n\t\t// right =       x1x1                            {zero}\n\t\tif !left.IsZero() {\n\t\t\tpush(left)\n\t\t}\n\n\t\tif !right.IsZero() {\n\t\t\t// If the right side of x is non-zero:\n\t\t\t// 1) Right is the remaining portion of x that needs to be pushed.\n\t\t\tx = right\n\t\t\t// 2) It's not possible for current y to intersect it, so advance y. It's\n\t\t\t//    possible nextY() will intersect it, so don't push yet.\n\t\t\ty = nextY()\n\t\t} else {\n\t\t\t// There's nothing left of x to push, so advance x.\n\t\t\tx = nextX()\n\t\t}\n\t}\n\n\t// Setting s.intervals is the only side effect in this function.\n\ts.intervals = newIntervals\n}\n\n// intersectionIterator returns a function that yields intervals that are\n// members of the intersection of s and b, in increasing order.\nfunc (s *Set) intersectionIterator(b SetInput) (iter func() Interval, cancel func()) {\n\treturn intervalMapperToIterator(func(f IntervalReceiver) {\n\t\tsExtent, bExtent := s.Extent(), b.Extent()\n\t\t// Deal with nil extent. See https://github.com/google/go-intervals/issues/6.\n\t\tif sExtent == nil || bExtent == nil {\n\t\t\t// IF either set is already empty, the intersection is empty. This\n\t\t\t// voids a panic below where a valid Interval is needed for each\n\t\t\t// extent.\n\t\t\treturn\n\t\t}\n\t\tnextX := s.iterator(bExtent, true)\n\t\tnextY, cancel := setIntervalIterator(b, sExtent)\n\t\tdefer cancel()\n\n\t\tx := nextX()\n\t\ty := nextY()\n\t\t// Loop through corresponding intervals of S and B.\n\t\t// If y == nil, all of the remaining intervals in S are to the right of B.\n\t\t// If x == nil, all of the remaining intervals in B are to the right of S.\n\t\tfor x != nil && y != nil {\n\t\t\tif x.Before(y) {\n\t\t\t\tx = nextX()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif y.Before(x) {\n\t\t\t\ty = nextY()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\txyIntersect := x.Intersect(y)\n\t\t\tif !xyIntersect.IsZero() {\n\t\t\t\tif !f(xyIntersect) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t_, right := x.Bisect(y)\n\t\t\t\tif !right.IsZero() {\n\t\t\t\t\tx = right\n\t\t\t\t} else {\n\t\t\t\t\tx = nextX()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n}\n\n// Intersect destructively modifies the set by intersectin it with b.\nfunc (s *Set) Intersect(b SetInput) {\n\titer, cancel := s.intersectionIterator(b)\n\tdefer cancel()\n\tvar newIntervals []Interval\n\tfor x := iter(); x != nil; x = iter() {\n\t\tnewIntervals = append(newIntervals, x)\n\t}\n\ts.intervals = newIntervals\n}\n\n// searchLow returns the first index in s.intervals that is not before x.\nfunc (s *Set) searchLow(x Interval) int {\n\treturn sort.Search(len(s.intervals), func(i int) bool {\n\t\treturn !s.intervals[i].Before(x)\n\t})\n}\n\n// searchLow returns the index of the first interval in s.intervals that is\n// entirely after x.\nfunc (s *Set) searchHigh(x Interval) int {\n\treturn sort.Search(len(s.intervals), func(i int) bool {\n\t\treturn x.Before(s.intervals[i])\n\t})\n}\n\n// iterator returns a function that yields elements of the set in order.\n//\n// The function returned will return nil when finished iterating.\nfunc (s *Set) iterator(extents Interval, forward bool) func() Interval {\n\tlow, high := s.searchLow(extents), s.searchHigh(extents)\n\n\ti, stride := low, 1\n\tif !forward {\n\t\ti, stride = high-1, -1\n\t}\n\n\treturn func() Interval {\n\t\tif i < 0 || i >= len(s.intervals) {\n\t\t\treturn nil\n\t\t}\n\t\tx := s.intervals[i]\n\t\ti += stride\n\t\treturn x\n\t}\n}\n\n// IntervalReceiver is a function used for iterating over a set of intervals. It\n// takes the start and end times and returns true if the iteration should\n// continue.\ntype IntervalReceiver func(Interval) bool\n\n// IntervalsBetween iterates over the intervals within extents set and calls f\n// with each. If f returns false, iteration ceases.\n//\n// Any interval within the set that overlaps partially with extents is truncated\n// before being passed to f.\nfunc (s *Set) IntervalsBetween(extents Interval, f IntervalReceiver) {\n\t// Begin = first index in s.intervals that is not before extents.\n\tbegin := sort.Search(len(s.intervals), func(i int) bool {\n\t\treturn !s.intervals[i].Before(extents)\n\t})\n\n\t// TODO(reddaly): Optimize this by performing a binary search for the ending\n\t// point.\n\tfor _, interval := range s.intervals[begin:] {\n\t\t// If the interval is after the extents, there will be no more overlap, so\n\t\t// break out of the loop.\n\t\tif extents.Before(interval) {\n\t\t\tbreak\n\t\t}\n\t\tportionOfInterval := extents.Intersect(interval)\n\t\tif portionOfInterval.IsZero() {\n\t\t\tcontinue\n\t\t}\n\n\t\tif !f(portionOfInterval) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// Intervals iterates over all the intervals within the set and calls f with\n// each one. If f returns false, iteration ceases.\nfunc (s *Set) Intervals(f IntervalReceiver) {\n\tfor _, interval := range s.intervals {\n\t\tif !f(interval) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// AllIntervals returns an ordered slice of all the intervals in the set.\nfunc (s *Set) AllIntervals() []Interval {\n\treturn append(make([]Interval, 0, len(s.intervals)), s.intervals...)\n}\n\n// ImmutableSet returns an immutable copy of this set.\nfunc (s *Set) ImmutableSet() *ImmutableSet {\n\treturn NewImmutableSet(s.AllIntervals())\n}\n\n// mapFn reports true if an iteration should continue. It is called on values of\n// a collection.\ntype mapFn func(interface{}) bool\n\n// mapFn calls mapFn for each member of a collection.\ntype mapperFn func(mapFn)\n\n// iteratorFn returns the next item in an iteration or the zero value. The\n// second return value indicates whether the first return value is a member of\n// the collection.\ntype iteratorFn func() (interface{}, bool)\n\n// generatorFn returns an iterator.\ntype generatorFn func() iteratorFn\n\n// cancelFn should be called to clean up the goroutine that would otherwise leak.\ntype cancelFn func()\n\n// mapperToIterator returns an iteratorFn version of a mappingFn. The second\n// return value must be called at the end of iteration, or the underlying\n// goroutine will leak.\nfunc mapperToIterator(m mapperFn) (iteratorFn, cancelFn) {\n\tgeneratedValues := make(chan interface{}, 1)\n\tstopCh := make(chan interface{}, 1)\n\tgo func() {\n\t\tm(func(obj interface{}) bool {\n\t\t\tselect {\n\t\t\tcase <-stopCh:\n\t\t\t\treturn false\n\t\t\tcase generatedValues <- obj:\n\t\t\t\treturn true\n\t\t\t}\n\t\t})\n\t\tclose(generatedValues)\n\t}()\n\titer := func() (interface{}, bool) {\n\t\tvalue, ok := <-generatedValues\n\t\treturn value, ok\n\t}\n\treturn iter, func() {\n\t\tstopCh <- nil\n\t}\n}\n\nfunc intervalMapperToIterator(mapper func(IntervalReceiver)) (iter func() Interval, cancel func()) {\n\tgenericMapper := func(m mapFn) {\n\t\tmapper(func(ival Interval) bool {\n\t\t\treturn m(ival)\n\t\t})\n\t}\n\n\tgenericIter, cancel := mapperToIterator(genericMapper)\n\treturn func() Interval {\n\t\tgenericVal, iterationEnded := genericIter()\n\t\tif !iterationEnded {\n\t\t\treturn nil\n\t\t}\n\t\tival, ok := genericVal.(Interval)\n\t\tif !ok {\n\t\t\tpanic(\"unexpected value type, internal error\")\n\t\t}\n\t\treturn ival\n\t}, cancel\n}\n\nfunc setIntervalIterator(s SetInput, extent Interval) (iter func() Interval, cancel func()) {\n\treturn intervalMapperToIterator(func(f IntervalReceiver) {\n\t\ts.IntervalsBetween(extent, f)\n\t})\n}\n\n// oldBehaviorFactory returns a nil interval. This was used before\n// construction of a Set/ImmutableSet required passing in a factory method for\n// creating a zero interval object.\nvar oldBehaviorFactory = makeIntervalFactor(func() Interval { return nil })\n\n// intervalFactory is used to construct a zero-value interval. The zero value\n// interval may be different for different types of intervals, so a factory is\n// sometimes needed to write generic algorithms about intervals.\ntype intervalFactory struct {\n\tmakeZero func() Interval\n}\n\nfunc makeIntervalFactor(makeZero func() Interval) intervalFactory {\n\treturn intervalFactory{makeZero}\n}\n"
  },
  {
    "path": "vendor/github.com/google/go-intervals/intervalset/intervalset_immutable.go",
    "content": "// Copyright 2017 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage intervalset\n\n// ImmutableSet is a set of interval objects. It provides various set theory\n// operations.\ntype ImmutableSet struct {\n\tset *Set\n}\n\n// NewImmutableSet returns a new set given a sorted slice of intervals. This\n// function panics if the intervals are not sorted.\nfunc NewImmutableSet(intervals []Interval) *ImmutableSet {\n\treturn NewImmutableSetV1(intervals, oldBehaviorFactory.makeZero)\n}\n\n// NewImmutableSetV1 returns a new set given a sorted slice of intervals. This\n// function panics if the intervals are not sorted.\nfunc NewImmutableSetV1(intervals []Interval, makeZero func() Interval) *ImmutableSet {\n\treturn &ImmutableSet{NewSetV1(intervals, makeZero)}\n}\n\n// String returns a human-friendly representation of the set.\nfunc (s *ImmutableSet) String() string {\n\treturn s.set.String()\n}\n\n// Extent returns the Interval defined by the minimum and maximum values of the\n// set.\nfunc (s *ImmutableSet) Extent() Interval {\n\treturn s.set.Extent()\n}\n\n// Contains reports whether an interval is entirely contained by the set.\nfunc (s *ImmutableSet) Contains(ival Interval) bool {\n\treturn s.set.Contains(ival)\n}\n\n// Union returns a set with the contents of this set and another set.\nfunc (s *ImmutableSet) Union(b SetInput) *ImmutableSet {\n\tunion := s.set.Copy()\n\tunion.Add(b)\n\treturn &ImmutableSet{union}\n}\n\n// Sub returns a set without the intervals of another set.\nfunc (s *ImmutableSet) Sub(b SetInput) *ImmutableSet {\n\tx := s.set.Copy()\n\tx.Sub(b)\n\treturn &ImmutableSet{x}\n}\n\n// Intersect returns the intersection of two sets.\nfunc (s *ImmutableSet) Intersect(b SetInput) *ImmutableSet {\n\tx := s.set.Copy()\n\tx.Intersect(b)\n\treturn &ImmutableSet{x}\n}\n\n// IntervalsBetween iterates over the intervals within extents set and calls f\n// with each. If f returns false, iteration ceases.\n//\n// Any interval within the set that overlaps partially with extents is truncated\n// before being passed to f.\nfunc (s *ImmutableSet) IntervalsBetween(extents Interval, f IntervalReceiver) {\n\ts.set.IntervalsBetween(extents, f)\n}\n\n// Intervals iterates over all the intervals within the set and calls f with\n// each one. If f returns false, iteration ceases.\nfunc (s *ImmutableSet) Intervals(f IntervalReceiver) {\n\ts.set.Intervals(f)\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/CHANGELOG.md",
    "content": "# Changelog\n\n## [1.6.0](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) (2024-01-16)\n\n\n### Features\n\n* add Max UUID constant ([#149](https://github.com/google/uuid/issues/149)) ([c58770e](https://github.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3))\n\n\n### Bug Fixes\n\n* fix typo in version 7 uuid documentation ([#153](https://github.com/google/uuid/issues/153)) ([016b199](https://github.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06))\n* Monotonicity in UUIDv7 ([#150](https://github.com/google/uuid/issues/150)) ([a2b2b32](https://github.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6))\n\n## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12)\n\n\n### Features\n\n* Validate UUID without creating new UUID ([#141](https://github.com/google/uuid/issues/141)) ([9ee7366](https://github.com/google/uuid/commit/9ee7366e66c9ad96bab89139418a713dc584ae29))\n\n## [1.4.0](https://github.com/google/uuid/compare/v1.3.1...v1.4.0) (2023-10-26)\n\n\n### Features\n\n* UUIDs slice type with Strings() convenience method ([#133](https://github.com/google/uuid/issues/133)) ([cd5fbbd](https://github.com/google/uuid/commit/cd5fbbdd02f3e3467ac18940e07e062be1f864b4))\n\n### Fixes\n\n* Clarify that Parse's job is to parse but not necessarily validate strings. (Documents current behavior)\n\n## [1.3.1](https://github.com/google/uuid/compare/v1.3.0...v1.3.1) (2023-08-18)\n\n\n### Bug Fixes\n\n* Use .EqualFold() to parse urn prefixed UUIDs ([#118](https://github.com/google/uuid/issues/118)) ([574e687](https://github.com/google/uuid/commit/574e6874943741fb99d41764c705173ada5293f0))\n\n## Changelog\n"
  },
  {
    "path": "vendor/github.com/google/uuid/CONTRIBUTING.md",
    "content": "# How to contribute\n\nWe definitely welcome patches and contribution to this project!\n\n### Tips\n\nCommits must be formatted according to the [Conventional Commits Specification](https://www.conventionalcommits.org).\n\nAlways try to include a test case! If it is not possible or not necessary,\nplease explain why in the pull request description.\n\n### Releasing\n\nCommits that would precipitate a SemVer change, as described in the Conventional\nCommits Specification, will trigger [`release-please`](https://github.com/google-github-actions/release-please-action)\nto create a release candidate pull request. Once submitted, `release-please`\nwill create a release.\n\nFor tips on how to work with `release-please`, see its documentation.\n\n### Legal requirements\n\nIn order to protect both you and ourselves, you will need to sign the\n[Contributor License Agreement](https://cla.developers.google.com/clas).\n\nYou may have already signed it for other Google projects.\n"
  },
  {
    "path": "vendor/github.com/google/uuid/CONTRIBUTORS",
    "content": "Paul Borman <borman@google.com>\nbmatsuo\nshawnps\ntheory\njboverfelt\ndsymonds\ncd1\nwallclockbuilder\ndansouza\n"
  },
  {
    "path": "vendor/github.com/google/uuid/LICENSE",
    "content": "Copyright (c) 2009,2014 Google Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/google/uuid/README.md",
    "content": "# uuid\nThe uuid package generates and inspects UUIDs based on\n[RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122)\nand DCE 1.1: Authentication and Security Services. \n\nThis package is based on the github.com/pborman/uuid package (previously named\ncode.google.com/p/go-uuid).  It differs from these earlier packages in that\na UUID is a 16 byte array rather than a byte slice.  One loss due to this\nchange is the ability to represent an invalid UUID (vs a NIL UUID).\n\n###### Install\n```sh\ngo get github.com/google/uuid\n```\n\n###### Documentation \n[![Go Reference](https://pkg.go.dev/badge/github.com/google/uuid.svg)](https://pkg.go.dev/github.com/google/uuid)\n\nFull `go doc` style documentation for the package can be viewed online without\ninstalling this package by using the GoDoc site here: \nhttp://pkg.go.dev/github.com/google/uuid\n"
  },
  {
    "path": "vendor/github.com/google/uuid/dce.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"os\"\n)\n\n// A Domain represents a Version 2 domain\ntype Domain byte\n\n// Domain constants for DCE Security (Version 2) UUIDs.\nconst (\n\tPerson = Domain(0)\n\tGroup  = Domain(1)\n\tOrg    = Domain(2)\n)\n\n// NewDCESecurity returns a DCE Security (Version 2) UUID.\n//\n// The domain should be one of Person, Group or Org.\n// On a POSIX system the id should be the users UID for the Person\n// domain and the users GID for the Group.  The meaning of id for\n// the domain Org or on non-POSIX systems is site defined.\n//\n// For a given domain/id pair the same token may be returned for up to\n// 7 minutes and 10 seconds.\nfunc NewDCESecurity(domain Domain, id uint32) (UUID, error) {\n\tuuid, err := NewUUID()\n\tif err == nil {\n\t\tuuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2\n\t\tuuid[9] = byte(domain)\n\t\tbinary.BigEndian.PutUint32(uuid[0:], id)\n\t}\n\treturn uuid, err\n}\n\n// NewDCEPerson returns a DCE Security (Version 2) UUID in the person\n// domain with the id returned by os.Getuid.\n//\n//  NewDCESecurity(Person, uint32(os.Getuid()))\nfunc NewDCEPerson() (UUID, error) {\n\treturn NewDCESecurity(Person, uint32(os.Getuid()))\n}\n\n// NewDCEGroup returns a DCE Security (Version 2) UUID in the group\n// domain with the id returned by os.Getgid.\n//\n//  NewDCESecurity(Group, uint32(os.Getgid()))\nfunc NewDCEGroup() (UUID, error) {\n\treturn NewDCESecurity(Group, uint32(os.Getgid()))\n}\n\n// Domain returns the domain for a Version 2 UUID.  Domains are only defined\n// for Version 2 UUIDs.\nfunc (uuid UUID) Domain() Domain {\n\treturn Domain(uuid[9])\n}\n\n// ID returns the id for a Version 2 UUID. IDs are only defined for Version 2\n// UUIDs.\nfunc (uuid UUID) ID() uint32 {\n\treturn binary.BigEndian.Uint32(uuid[0:4])\n}\n\nfunc (d Domain) String() string {\n\tswitch d {\n\tcase Person:\n\t\treturn \"Person\"\n\tcase Group:\n\t\treturn \"Group\"\n\tcase Org:\n\t\treturn \"Org\"\n\t}\n\treturn fmt.Sprintf(\"Domain%d\", int(d))\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/doc.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package uuid generates and inspects UUIDs.\n//\n// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security\n// Services.\n//\n// A UUID is a 16 byte (128 bit) array.  UUIDs may be used as keys to\n// maps or compared directly.\npackage uuid\n"
  },
  {
    "path": "vendor/github.com/google/uuid/hash.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"crypto/md5\"\n\t\"crypto/sha1\"\n\t\"hash\"\n)\n\n// Well known namespace IDs and UUIDs\nvar (\n\tNameSpaceDNS  = Must(Parse(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tNameSpaceURL  = Must(Parse(\"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"))\n\tNameSpaceOID  = Must(Parse(\"6ba7b812-9dad-11d1-80b4-00c04fd430c8\"))\n\tNameSpaceX500 = Must(Parse(\"6ba7b814-9dad-11d1-80b4-00c04fd430c8\"))\n\tNil           UUID // empty UUID, all zeros\n\n\t// The Max UUID is special form of UUID that is specified to have all 128 bits set to 1.\n\tMax = UUID{\n\t\t0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,\n\t\t0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,\n\t}\n)\n\n// NewHash returns a new UUID derived from the hash of space concatenated with\n// data generated by h.  The hash should be at least 16 byte in length.  The\n// first 16 bytes of the hash are used to form the UUID.  The version of the\n// UUID will be the lower 4 bits of version.  NewHash is used to implement\n// NewMD5 and NewSHA1.\nfunc NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {\n\th.Reset()\n\th.Write(space[:]) //nolint:errcheck\n\th.Write(data)     //nolint:errcheck\n\ts := h.Sum(nil)\n\tvar uuid UUID\n\tcopy(uuid[:], s)\n\tuuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4)\n\tuuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant\n\treturn uuid\n}\n\n// NewMD5 returns a new MD5 (Version 3) UUID based on the\n// supplied name space and data.  It is the same as calling:\n//\n//  NewHash(md5.New(), space, data, 3)\nfunc NewMD5(space UUID, data []byte) UUID {\n\treturn NewHash(md5.New(), space, data, 3)\n}\n\n// NewSHA1 returns a new SHA1 (Version 5) UUID based on the\n// supplied name space and data.  It is the same as calling:\n//\n//  NewHash(sha1.New(), space, data, 5)\nfunc NewSHA1(space UUID, data []byte) UUID {\n\treturn NewHash(sha1.New(), space, data, 5)\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/marshal.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport \"fmt\"\n\n// MarshalText implements encoding.TextMarshaler.\nfunc (uuid UUID) MarshalText() ([]byte, error) {\n\tvar js [36]byte\n\tencodeHex(js[:], uuid)\n\treturn js[:], nil\n}\n\n// UnmarshalText implements encoding.TextUnmarshaler.\nfunc (uuid *UUID) UnmarshalText(data []byte) error {\n\tid, err := ParseBytes(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*uuid = id\n\treturn nil\n}\n\n// MarshalBinary implements encoding.BinaryMarshaler.\nfunc (uuid UUID) MarshalBinary() ([]byte, error) {\n\treturn uuid[:], nil\n}\n\n// UnmarshalBinary implements encoding.BinaryUnmarshaler.\nfunc (uuid *UUID) UnmarshalBinary(data []byte) error {\n\tif len(data) != 16 {\n\t\treturn fmt.Errorf(\"invalid UUID (got %d bytes)\", len(data))\n\t}\n\tcopy(uuid[:], data)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/node.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"sync\"\n)\n\nvar (\n\tnodeMu sync.Mutex\n\tifname string  // name of interface being used\n\tnodeID [6]byte // hardware for version 1 UUIDs\n\tzeroID [6]byte // nodeID with only 0's\n)\n\n// NodeInterface returns the name of the interface from which the NodeID was\n// derived.  The interface \"user\" is returned if the NodeID was set by\n// SetNodeID.\nfunc NodeInterface() string {\n\tdefer nodeMu.Unlock()\n\tnodeMu.Lock()\n\treturn ifname\n}\n\n// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.\n// If name is \"\" then the first usable interface found will be used or a random\n// Node ID will be generated.  If a named interface cannot be found then false\n// is returned.\n//\n// SetNodeInterface never fails when name is \"\".\nfunc SetNodeInterface(name string) bool {\n\tdefer nodeMu.Unlock()\n\tnodeMu.Lock()\n\treturn setNodeInterface(name)\n}\n\nfunc setNodeInterface(name string) bool {\n\tiname, addr := getHardwareInterface(name) // null implementation for js\n\tif iname != \"\" && addr != nil {\n\t\tifname = iname\n\t\tcopy(nodeID[:], addr)\n\t\treturn true\n\t}\n\n\t// We found no interfaces with a valid hardware address.  If name\n\t// does not specify a specific interface generate a random Node ID\n\t// (section 4.1.6)\n\tif name == \"\" {\n\t\tifname = \"random\"\n\t\trandomBits(nodeID[:])\n\t\treturn true\n\t}\n\treturn false\n}\n\n// NodeID returns a slice of a copy of the current Node ID, setting the Node ID\n// if not already set.\nfunc NodeID() []byte {\n\tdefer nodeMu.Unlock()\n\tnodeMu.Lock()\n\tif nodeID == zeroID {\n\t\tsetNodeInterface(\"\")\n\t}\n\tnid := nodeID\n\treturn nid[:]\n}\n\n// SetNodeID sets the Node ID to be used for Version 1 UUIDs.  The first 6 bytes\n// of id are used.  If id is less than 6 bytes then false is returned and the\n// Node ID is not set.\nfunc SetNodeID(id []byte) bool {\n\tif len(id) < 6 {\n\t\treturn false\n\t}\n\tdefer nodeMu.Unlock()\n\tnodeMu.Lock()\n\tcopy(nodeID[:], id)\n\tifname = \"user\"\n\treturn true\n}\n\n// NodeID returns the 6 byte node id encoded in uuid.  It returns nil if uuid is\n// not valid.  The NodeID is only well defined for version 1 and 2 UUIDs.\nfunc (uuid UUID) NodeID() []byte {\n\tvar node [6]byte\n\tcopy(node[:], uuid[10:])\n\treturn node[:]\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/node_js.go",
    "content": "// Copyright 2017 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build js\n\npackage uuid\n\n// getHardwareInterface returns nil values for the JS version of the code.\n// This removes the \"net\" dependency, because it is not used in the browser.\n// Using the \"net\" library inflates the size of the transpiled JS code by 673k bytes.\nfunc getHardwareInterface(name string) (string, []byte) { return \"\", nil }\n"
  },
  {
    "path": "vendor/github.com/google/uuid/node_net.go",
    "content": "// Copyright 2017 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build !js\n\npackage uuid\n\nimport \"net\"\n\nvar interfaces []net.Interface // cached list of interfaces\n\n// getHardwareInterface returns the name and hardware address of interface name.\n// If name is \"\" then the name and hardware address of one of the system's\n// interfaces is returned.  If no interfaces are found (name does not exist or\n// there are no interfaces) then \"\", nil is returned.\n//\n// Only addresses of at least 6 bytes are returned.\nfunc getHardwareInterface(name string) (string, []byte) {\n\tif interfaces == nil {\n\t\tvar err error\n\t\tinterfaces, err = net.Interfaces()\n\t\tif err != nil {\n\t\t\treturn \"\", nil\n\t\t}\n\t}\n\tfor _, ifs := range interfaces {\n\t\tif len(ifs.HardwareAddr) >= 6 && (name == \"\" || name == ifs.Name) {\n\t\t\treturn ifs.Name, ifs.HardwareAddr\n\t\t}\n\t}\n\treturn \"\", nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/null.go",
    "content": "// Copyright 2021 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"bytes\"\n\t\"database/sql/driver\"\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\nvar jsonNull = []byte(\"null\")\n\n// NullUUID represents a UUID that may be null.\n// NullUUID implements the SQL driver.Scanner interface so\n// it can be used as a scan destination:\n//\n//  var u uuid.NullUUID\n//  err := db.QueryRow(\"SELECT name FROM foo WHERE id=?\", id).Scan(&u)\n//  ...\n//  if u.Valid {\n//     // use u.UUID\n//  } else {\n//     // NULL value\n//  }\n//\ntype NullUUID struct {\n\tUUID  UUID\n\tValid bool // Valid is true if UUID is not NULL\n}\n\n// Scan implements the SQL driver.Scanner interface.\nfunc (nu *NullUUID) Scan(value interface{}) error {\n\tif value == nil {\n\t\tnu.UUID, nu.Valid = Nil, false\n\t\treturn nil\n\t}\n\n\terr := nu.UUID.Scan(value)\n\tif err != nil {\n\t\tnu.Valid = false\n\t\treturn err\n\t}\n\n\tnu.Valid = true\n\treturn nil\n}\n\n// Value implements the driver Valuer interface.\nfunc (nu NullUUID) Value() (driver.Value, error) {\n\tif !nu.Valid {\n\t\treturn nil, nil\n\t}\n\t// Delegate to UUID Value function\n\treturn nu.UUID.Value()\n}\n\n// MarshalBinary implements encoding.BinaryMarshaler.\nfunc (nu NullUUID) MarshalBinary() ([]byte, error) {\n\tif nu.Valid {\n\t\treturn nu.UUID[:], nil\n\t}\n\n\treturn []byte(nil), nil\n}\n\n// UnmarshalBinary implements encoding.BinaryUnmarshaler.\nfunc (nu *NullUUID) UnmarshalBinary(data []byte) error {\n\tif len(data) != 16 {\n\t\treturn fmt.Errorf(\"invalid UUID (got %d bytes)\", len(data))\n\t}\n\tcopy(nu.UUID[:], data)\n\tnu.Valid = true\n\treturn nil\n}\n\n// MarshalText implements encoding.TextMarshaler.\nfunc (nu NullUUID) MarshalText() ([]byte, error) {\n\tif nu.Valid {\n\t\treturn nu.UUID.MarshalText()\n\t}\n\n\treturn jsonNull, nil\n}\n\n// UnmarshalText implements encoding.TextUnmarshaler.\nfunc (nu *NullUUID) UnmarshalText(data []byte) error {\n\tid, err := ParseBytes(data)\n\tif err != nil {\n\t\tnu.Valid = false\n\t\treturn err\n\t}\n\tnu.UUID = id\n\tnu.Valid = true\n\treturn nil\n}\n\n// MarshalJSON implements json.Marshaler.\nfunc (nu NullUUID) MarshalJSON() ([]byte, error) {\n\tif nu.Valid {\n\t\treturn json.Marshal(nu.UUID)\n\t}\n\n\treturn jsonNull, nil\n}\n\n// UnmarshalJSON implements json.Unmarshaler.\nfunc (nu *NullUUID) UnmarshalJSON(data []byte) error {\n\tif bytes.Equal(data, jsonNull) {\n\t\t*nu = NullUUID{}\n\t\treturn nil // valid null UUID\n\t}\n\terr := json.Unmarshal(data, &nu.UUID)\n\tnu.Valid = err == nil\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/sql.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"database/sql/driver\"\n\t\"fmt\"\n)\n\n// Scan implements sql.Scanner so UUIDs can be read from databases transparently.\n// Currently, database types that map to string and []byte are supported. Please\n// consult database-specific driver documentation for matching types.\nfunc (uuid *UUID) Scan(src interface{}) error {\n\tswitch src := src.(type) {\n\tcase nil:\n\t\treturn nil\n\n\tcase string:\n\t\t// if an empty UUID comes from a table, we return a null UUID\n\t\tif src == \"\" {\n\t\t\treturn nil\n\t\t}\n\n\t\t// see Parse for required string format\n\t\tu, err := Parse(src)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Scan: %v\", err)\n\t\t}\n\n\t\t*uuid = u\n\n\tcase []byte:\n\t\t// if an empty UUID comes from a table, we return a null UUID\n\t\tif len(src) == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\t// assumes a simple slice of bytes if 16 bytes\n\t\t// otherwise attempts to parse\n\t\tif len(src) != 16 {\n\t\t\treturn uuid.Scan(string(src))\n\t\t}\n\t\tcopy((*uuid)[:], src)\n\n\tdefault:\n\t\treturn fmt.Errorf(\"Scan: unable to scan type %T into UUID\", src)\n\t}\n\n\treturn nil\n}\n\n// Value implements sql.Valuer so that UUIDs can be written to databases\n// transparently. Currently, UUIDs map to strings. Please consult\n// database-specific driver documentation for matching types.\nfunc (uuid UUID) Value() (driver.Value, error) {\n\treturn uuid.String(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/time.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"encoding/binary\"\n\t\"sync\"\n\t\"time\"\n)\n\n// A Time represents a time as the number of 100's of nanoseconds since 15 Oct\n// 1582.\ntype Time int64\n\nconst (\n\tlillian    = 2299160          // Julian day of 15 Oct 1582\n\tunix       = 2440587          // Julian day of 1 Jan 1970\n\tepoch      = unix - lillian   // Days between epochs\n\tg1582      = epoch * 86400    // seconds between epochs\n\tg1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs\n)\n\nvar (\n\ttimeMu   sync.Mutex\n\tlasttime uint64 // last time we returned\n\tclockSeq uint16 // clock sequence for this run\n\n\ttimeNow = time.Now // for testing\n)\n\n// UnixTime converts t the number of seconds and nanoseconds using the Unix\n// epoch of 1 Jan 1970.\nfunc (t Time) UnixTime() (sec, nsec int64) {\n\tsec = int64(t - g1582ns100)\n\tnsec = (sec % 10000000) * 100\n\tsec /= 10000000\n\treturn sec, nsec\n}\n\n// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and\n// clock sequence as well as adjusting the clock sequence as needed.  An error\n// is returned if the current time cannot be determined.\nfunc GetTime() (Time, uint16, error) {\n\tdefer timeMu.Unlock()\n\ttimeMu.Lock()\n\treturn getTime()\n}\n\nfunc getTime() (Time, uint16, error) {\n\tt := timeNow()\n\n\t// If we don't have a clock sequence already, set one.\n\tif clockSeq == 0 {\n\t\tsetClockSequence(-1)\n\t}\n\tnow := uint64(t.UnixNano()/100) + g1582ns100\n\n\t// If time has gone backwards with this clock sequence then we\n\t// increment the clock sequence\n\tif now <= lasttime {\n\t\tclockSeq = ((clockSeq + 1) & 0x3fff) | 0x8000\n\t}\n\tlasttime = now\n\treturn Time(now), clockSeq, nil\n}\n\n// ClockSequence returns the current clock sequence, generating one if not\n// already set.  The clock sequence is only used for Version 1 UUIDs.\n//\n// The uuid package does not use global static storage for the clock sequence or\n// the last time a UUID was generated.  Unless SetClockSequence is used, a new\n// random clock sequence is generated the first time a clock sequence is\n// requested by ClockSequence, GetTime, or NewUUID.  (section 4.2.1.1)\nfunc ClockSequence() int {\n\tdefer timeMu.Unlock()\n\ttimeMu.Lock()\n\treturn clockSequence()\n}\n\nfunc clockSequence() int {\n\tif clockSeq == 0 {\n\t\tsetClockSequence(-1)\n\t}\n\treturn int(clockSeq & 0x3fff)\n}\n\n// SetClockSequence sets the clock sequence to the lower 14 bits of seq.  Setting to\n// -1 causes a new sequence to be generated.\nfunc SetClockSequence(seq int) {\n\tdefer timeMu.Unlock()\n\ttimeMu.Lock()\n\tsetClockSequence(seq)\n}\n\nfunc setClockSequence(seq int) {\n\tif seq == -1 {\n\t\tvar b [2]byte\n\t\trandomBits(b[:]) // clock sequence\n\t\tseq = int(b[0])<<8 | int(b[1])\n\t}\n\toldSeq := clockSeq\n\tclockSeq = uint16(seq&0x3fff) | 0x8000 // Set our variant\n\tif oldSeq != clockSeq {\n\t\tlasttime = 0\n\t}\n}\n\n// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in\n// uuid.  The time is only defined for version 1, 2, 6 and 7 UUIDs.\nfunc (uuid UUID) Time() Time {\n\tvar t Time\n\tswitch uuid.Version() {\n\tcase 6:\n\t\ttime := binary.BigEndian.Uint64(uuid[:8]) // Ignore uuid[6] version b0110\n\t\tt = Time(time)\n\tcase 7:\n\t\ttime := binary.BigEndian.Uint64(uuid[:8])\n\t\tt = Time((time>>16)*10000 + g1582ns100)\n\tdefault: // forward compatible\n\t\ttime := int64(binary.BigEndian.Uint32(uuid[0:4]))\n\t\ttime |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32\n\t\ttime |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48\n\t\tt = Time(time)\n\t}\n\treturn t\n}\n\n// ClockSequence returns the clock sequence encoded in uuid.\n// The clock sequence is only well defined for version 1 and 2 UUIDs.\nfunc (uuid UUID) ClockSequence() int {\n\treturn int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/util.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"io\"\n)\n\n// randomBits completely fills slice b with random data.\nfunc randomBits(b []byte) {\n\tif _, err := io.ReadFull(rander, b); err != nil {\n\t\tpanic(err.Error()) // rand should never fail\n\t}\n}\n\n// xvalues returns the value of a byte as a hexadecimal digit or 255.\nvar xvalues = [256]byte{\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255,\n\t255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n\t255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n}\n\n// xtob converts hex characters x1 and x2 into a byte.\nfunc xtob(x1, x2 byte) (byte, bool) {\n\tb1 := xvalues[x1]\n\tb2 := xvalues[x2]\n\treturn (b1 << 4) | b2, b1 != 255 && b2 != 255\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/uuid.go",
    "content": "// Copyright 2018 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"bytes\"\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\t\"sync\"\n)\n\n// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC\n// 4122.\ntype UUID [16]byte\n\n// A Version represents a UUID's version.\ntype Version byte\n\n// A Variant represents a UUID's variant.\ntype Variant byte\n\n// Constants returned by Variant.\nconst (\n\tInvalid   = Variant(iota) // Invalid UUID\n\tRFC4122                   // The variant specified in RFC4122\n\tReserved                  // Reserved, NCS backward compatibility.\n\tMicrosoft                 // Reserved, Microsoft Corporation backward compatibility.\n\tFuture                    // Reserved for future definition.\n)\n\nconst randPoolSize = 16 * 16\n\nvar (\n\trander      = rand.Reader // random function\n\tpoolEnabled = false\n\tpoolMu      sync.Mutex\n\tpoolPos     = randPoolSize     // protected with poolMu\n\tpool        [randPoolSize]byte // protected with poolMu\n)\n\ntype invalidLengthError struct{ len int }\n\nfunc (err invalidLengthError) Error() string {\n\treturn fmt.Sprintf(\"invalid UUID length: %d\", err.len)\n}\n\n// IsInvalidLengthError is matcher function for custom error invalidLengthError\nfunc IsInvalidLengthError(err error) bool {\n\t_, ok := err.(invalidLengthError)\n\treturn ok\n}\n\n// Parse decodes s into a UUID or returns an error if it cannot be parsed.  Both\n// the standard UUID forms defined in RFC 4122\n// (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and\n// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) are decoded.  In addition,\n// Parse accepts non-standard strings such as the raw hex encoding\n// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx and 38 byte \"Microsoft style\" encodings,\n// e.g.  {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.  Only the middle 36 bytes are\n// examined in the latter case.  Parse should not be used to validate strings as\n// it parses non-standard encodings as indicated above.\nfunc Parse(s string) (UUID, error) {\n\tvar uuid UUID\n\tswitch len(s) {\n\t// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tcase 36:\n\n\t// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tcase 36 + 9:\n\t\tif !strings.EqualFold(s[:9], \"urn:uuid:\") {\n\t\t\treturn uuid, fmt.Errorf(\"invalid urn prefix: %q\", s[:9])\n\t\t}\n\t\ts = s[9:]\n\n\t// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\n\tcase 36 + 2:\n\t\ts = s[1:]\n\n\t// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\tcase 32:\n\t\tvar ok bool\n\t\tfor i := range uuid {\n\t\t\tuuid[i], ok = xtob(s[i*2], s[i*2+1])\n\t\t\tif !ok {\n\t\t\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t\t\t}\n\t\t}\n\t\treturn uuid, nil\n\tdefault:\n\t\treturn uuid, invalidLengthError{len(s)}\n\t}\n\t// s is now at least 36 bytes long\n\t// it must be of the form  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tif s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {\n\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t}\n\tfor i, x := range [16]int{\n\t\t0, 2, 4, 6,\n\t\t9, 11,\n\t\t14, 16,\n\t\t19, 21,\n\t\t24, 26, 28, 30, 32, 34,\n\t} {\n\t\tv, ok := xtob(s[x], s[x+1])\n\t\tif !ok {\n\t\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t\t}\n\t\tuuid[i] = v\n\t}\n\treturn uuid, nil\n}\n\n// ParseBytes is like Parse, except it parses a byte slice instead of a string.\nfunc ParseBytes(b []byte) (UUID, error) {\n\tvar uuid UUID\n\tswitch len(b) {\n\tcase 36: // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tcase 36 + 9: // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\t\tif !bytes.EqualFold(b[:9], []byte(\"urn:uuid:\")) {\n\t\t\treturn uuid, fmt.Errorf(\"invalid urn prefix: %q\", b[:9])\n\t\t}\n\t\tb = b[9:]\n\tcase 36 + 2: // {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\n\t\tb = b[1:]\n\tcase 32: // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\t\tvar ok bool\n\t\tfor i := 0; i < 32; i += 2 {\n\t\t\tuuid[i/2], ok = xtob(b[i], b[i+1])\n\t\t\tif !ok {\n\t\t\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t\t\t}\n\t\t}\n\t\treturn uuid, nil\n\tdefault:\n\t\treturn uuid, invalidLengthError{len(b)}\n\t}\n\t// s is now at least 36 bytes long\n\t// it must be of the form  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tif b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' {\n\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t}\n\tfor i, x := range [16]int{\n\t\t0, 2, 4, 6,\n\t\t9, 11,\n\t\t14, 16,\n\t\t19, 21,\n\t\t24, 26, 28, 30, 32, 34,\n\t} {\n\t\tv, ok := xtob(b[x], b[x+1])\n\t\tif !ok {\n\t\t\treturn uuid, errors.New(\"invalid UUID format\")\n\t\t}\n\t\tuuid[i] = v\n\t}\n\treturn uuid, nil\n}\n\n// MustParse is like Parse but panics if the string cannot be parsed.\n// It simplifies safe initialization of global variables holding compiled UUIDs.\nfunc MustParse(s string) UUID {\n\tuuid, err := Parse(s)\n\tif err != nil {\n\t\tpanic(`uuid: Parse(` + s + `): ` + err.Error())\n\t}\n\treturn uuid\n}\n\n// FromBytes creates a new UUID from a byte slice. Returns an error if the slice\n// does not have a length of 16. The bytes are copied from the slice.\nfunc FromBytes(b []byte) (uuid UUID, err error) {\n\terr = uuid.UnmarshalBinary(b)\n\treturn uuid, err\n}\n\n// Must returns uuid if err is nil and panics otherwise.\nfunc Must(uuid UUID, err error) UUID {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn uuid\n}\n\n// Validate returns an error if s is not a properly formatted UUID in one of the following formats:\n//   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n//   urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n//   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n//   {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\n// It returns an error if the format is invalid, otherwise nil.\nfunc Validate(s string) error {\n\tswitch len(s) {\n\t// Standard UUID format\n\tcase 36:\n\n\t// UUID with \"urn:uuid:\" prefix\n\tcase 36 + 9:\n\t\tif !strings.EqualFold(s[:9], \"urn:uuid:\") {\n\t\t\treturn fmt.Errorf(\"invalid urn prefix: %q\", s[:9])\n\t\t}\n\t\ts = s[9:]\n\n\t// UUID enclosed in braces\n\tcase 36 + 2:\n\t\tif s[0] != '{' || s[len(s)-1] != '}' {\n\t\t\treturn fmt.Errorf(\"invalid bracketed UUID format\")\n\t\t}\n\t\ts = s[1 : len(s)-1]\n\n\t// UUID without hyphens\n\tcase 32:\n\t\tfor i := 0; i < len(s); i += 2 {\n\t\t\t_, ok := xtob(s[i], s[i+1])\n\t\t\tif !ok {\n\t\t\t\treturn errors.New(\"invalid UUID format\")\n\t\t\t}\n\t\t}\n\n\tdefault:\n\t\treturn invalidLengthError{len(s)}\n\t}\n\n\t// Check for standard UUID format\n\tif len(s) == 36 {\n\t\tif s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {\n\t\t\treturn errors.New(\"invalid UUID format\")\n\t\t}\n\t\tfor _, x := range []int{0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} {\n\t\t\tif _, ok := xtob(s[x], s[x+1]); !ok {\n\t\t\t\treturn errors.New(\"invalid UUID format\")\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n// , or \"\" if uuid is invalid.\nfunc (uuid UUID) String() string {\n\tvar buf [36]byte\n\tencodeHex(buf[:], uuid)\n\treturn string(buf[:])\n}\n\n// URN returns the RFC 2141 URN form of uuid,\n// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,  or \"\" if uuid is invalid.\nfunc (uuid UUID) URN() string {\n\tvar buf [36 + 9]byte\n\tcopy(buf[:], \"urn:uuid:\")\n\tencodeHex(buf[9:], uuid)\n\treturn string(buf[:])\n}\n\nfunc encodeHex(dst []byte, uuid UUID) {\n\thex.Encode(dst, uuid[:4])\n\tdst[8] = '-'\n\thex.Encode(dst[9:13], uuid[4:6])\n\tdst[13] = '-'\n\thex.Encode(dst[14:18], uuid[6:8])\n\tdst[18] = '-'\n\thex.Encode(dst[19:23], uuid[8:10])\n\tdst[23] = '-'\n\thex.Encode(dst[24:], uuid[10:])\n}\n\n// Variant returns the variant encoded in uuid.\nfunc (uuid UUID) Variant() Variant {\n\tswitch {\n\tcase (uuid[8] & 0xc0) == 0x80:\n\t\treturn RFC4122\n\tcase (uuid[8] & 0xe0) == 0xc0:\n\t\treturn Microsoft\n\tcase (uuid[8] & 0xe0) == 0xe0:\n\t\treturn Future\n\tdefault:\n\t\treturn Reserved\n\t}\n}\n\n// Version returns the version of uuid.\nfunc (uuid UUID) Version() Version {\n\treturn Version(uuid[6] >> 4)\n}\n\nfunc (v Version) String() string {\n\tif v > 15 {\n\t\treturn fmt.Sprintf(\"BAD_VERSION_%d\", v)\n\t}\n\treturn fmt.Sprintf(\"VERSION_%d\", v)\n}\n\nfunc (v Variant) String() string {\n\tswitch v {\n\tcase RFC4122:\n\t\treturn \"RFC4122\"\n\tcase Reserved:\n\t\treturn \"Reserved\"\n\tcase Microsoft:\n\t\treturn \"Microsoft\"\n\tcase Future:\n\t\treturn \"Future\"\n\tcase Invalid:\n\t\treturn \"Invalid\"\n\t}\n\treturn fmt.Sprintf(\"BadVariant%d\", int(v))\n}\n\n// SetRand sets the random number generator to r, which implements io.Reader.\n// If r.Read returns an error when the package requests random data then\n// a panic will be issued.\n//\n// Calling SetRand with nil sets the random number generator to the default\n// generator.\nfunc SetRand(r io.Reader) {\n\tif r == nil {\n\t\trander = rand.Reader\n\t\treturn\n\t}\n\trander = r\n}\n\n// EnableRandPool enables internal randomness pool used for Random\n// (Version 4) UUID generation. The pool contains random bytes read from\n// the random number generator on demand in batches. Enabling the pool\n// may improve the UUID generation throughput significantly.\n//\n// Since the pool is stored on the Go heap, this feature may be a bad fit\n// for security sensitive applications.\n//\n// Both EnableRandPool and DisableRandPool are not thread-safe and should\n// only be called when there is no possibility that New or any other\n// UUID Version 4 generation function will be called concurrently.\nfunc EnableRandPool() {\n\tpoolEnabled = true\n}\n\n// DisableRandPool disables the randomness pool if it was previously\n// enabled with EnableRandPool.\n//\n// Both EnableRandPool and DisableRandPool are not thread-safe and should\n// only be called when there is no possibility that New or any other\n// UUID Version 4 generation function will be called concurrently.\nfunc DisableRandPool() {\n\tpoolEnabled = false\n\tdefer poolMu.Unlock()\n\tpoolMu.Lock()\n\tpoolPos = randPoolSize\n}\n\n// UUIDs is a slice of UUID types.\ntype UUIDs []UUID\n\n// Strings returns a string slice containing the string form of each UUID in uuids.\nfunc (uuids UUIDs) Strings() []string {\n\tvar uuidStrs = make([]string, len(uuids))\n\tfor i, uuid := range uuids {\n\t\tuuidStrs[i] = uuid.String()\n\t}\n\treturn uuidStrs\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/version1.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"encoding/binary\"\n)\n\n// NewUUID returns a Version 1 UUID based on the current NodeID and clock\n// sequence, and the current time.  If the NodeID has not been set by SetNodeID\n// or SetNodeInterface then it will be set automatically.  If the NodeID cannot\n// be set NewUUID returns nil.  If clock sequence has not been set by\n// SetClockSequence then it will be set automatically.  If GetTime fails to\n// return the current NewUUID returns nil and an error.\n//\n// In most cases, New should be used.\nfunc NewUUID() (UUID, error) {\n\tvar uuid UUID\n\tnow, seq, err := GetTime()\n\tif err != nil {\n\t\treturn uuid, err\n\t}\n\n\ttimeLow := uint32(now & 0xffffffff)\n\ttimeMid := uint16((now >> 32) & 0xffff)\n\ttimeHi := uint16((now >> 48) & 0x0fff)\n\ttimeHi |= 0x1000 // Version 1\n\n\tbinary.BigEndian.PutUint32(uuid[0:], timeLow)\n\tbinary.BigEndian.PutUint16(uuid[4:], timeMid)\n\tbinary.BigEndian.PutUint16(uuid[6:], timeHi)\n\tbinary.BigEndian.PutUint16(uuid[8:], seq)\n\n\tnodeMu.Lock()\n\tif nodeID == zeroID {\n\t\tsetNodeInterface(\"\")\n\t}\n\tcopy(uuid[10:], nodeID[:])\n\tnodeMu.Unlock()\n\n\treturn uuid, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/version4.go",
    "content": "// Copyright 2016 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport \"io\"\n\n// New creates a new random UUID or panics.  New is equivalent to\n// the expression\n//\n//    uuid.Must(uuid.NewRandom())\nfunc New() UUID {\n\treturn Must(NewRandom())\n}\n\n// NewString creates a new random UUID and returns it as a string or panics.\n// NewString is equivalent to the expression\n//\n//    uuid.New().String()\nfunc NewString() string {\n\treturn Must(NewRandom()).String()\n}\n\n// NewRandom returns a Random (Version 4) UUID.\n//\n// The strength of the UUIDs is based on the strength of the crypto/rand\n// package.\n//\n// Uses the randomness pool if it was enabled with EnableRandPool.\n//\n// A note about uniqueness derived from the UUID Wikipedia entry:\n//\n//  Randomly generated UUIDs have 122 random bits.  One's annual risk of being\n//  hit by a meteorite is estimated to be one chance in 17 billion, that\n//  means the probability is about 0.00000000006 (6 × 10−11),\n//  equivalent to the odds of creating a few tens of trillions of UUIDs in a\n//  year and having one duplicate.\nfunc NewRandom() (UUID, error) {\n\tif !poolEnabled {\n\t\treturn NewRandomFromReader(rander)\n\t}\n\treturn newRandomFromPool()\n}\n\n// NewRandomFromReader returns a UUID based on bytes read from a given io.Reader.\nfunc NewRandomFromReader(r io.Reader) (UUID, error) {\n\tvar uuid UUID\n\t_, err := io.ReadFull(r, uuid[:])\n\tif err != nil {\n\t\treturn Nil, err\n\t}\n\tuuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4\n\tuuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10\n\treturn uuid, nil\n}\n\nfunc newRandomFromPool() (UUID, error) {\n\tvar uuid UUID\n\tpoolMu.Lock()\n\tif poolPos == randPoolSize {\n\t\t_, err := io.ReadFull(rander, pool[:])\n\t\tif err != nil {\n\t\t\tpoolMu.Unlock()\n\t\t\treturn Nil, err\n\t\t}\n\t\tpoolPos = 0\n\t}\n\tcopy(uuid[:], pool[poolPos:(poolPos+16)])\n\tpoolPos += 16\n\tpoolMu.Unlock()\n\n\tuuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4\n\tuuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10\n\treturn uuid, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/version6.go",
    "content": "// Copyright 2023 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport \"encoding/binary\"\n\n// UUID version 6 is a field-compatible version of UUIDv1, reordered for improved DB locality.\n// It is expected that UUIDv6 will primarily be used in contexts where there are existing v1 UUIDs.\n// Systems that do not involve legacy UUIDv1 SHOULD consider using UUIDv7 instead.\n//\n// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#uuidv6\n//\n// NewV6 returns a Version 6 UUID based on the current NodeID and clock\n// sequence, and the current time. If the NodeID has not been set by SetNodeID\n// or SetNodeInterface then it will be set automatically. If the NodeID cannot\n// be set NewV6 set NodeID is random bits automatically . If clock sequence has not been set by\n// SetClockSequence then it will be set automatically. If GetTime fails to\n// return the current NewV6 returns Nil and an error.\nfunc NewV6() (UUID, error) {\n\tvar uuid UUID\n\tnow, seq, err := GetTime()\n\tif err != nil {\n\t\treturn uuid, err\n\t}\n\n\t/*\n\t    0                   1                   2                   3\n\t    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n\t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t   |                           time_high                           |\n\t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t   |           time_mid            |      time_low_and_version     |\n\t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t   |clk_seq_hi_res |  clk_seq_low  |         node (0-1)            |\n\t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t   |                         node (2-5)                            |\n\t   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t*/\n\n\tbinary.BigEndian.PutUint64(uuid[0:], uint64(now))\n\tbinary.BigEndian.PutUint16(uuid[8:], seq)\n\n\tuuid[6] = 0x60 | (uuid[6] & 0x0F)\n\tuuid[8] = 0x80 | (uuid[8] & 0x3F)\n\n\tnodeMu.Lock()\n\tif nodeID == zeroID {\n\t\tsetNodeInterface(\"\")\n\t}\n\tcopy(uuid[10:], nodeID[:])\n\tnodeMu.Unlock()\n\n\treturn uuid, nil\n}\n"
  },
  {
    "path": "vendor/github.com/google/uuid/version7.go",
    "content": "// Copyright 2023 Google Inc.  All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage uuid\n\nimport (\n\t\"io\"\n)\n\n// UUID version 7 features a time-ordered value field derived from the widely\n// implemented and well known Unix Epoch timestamp source,\n// the number of milliseconds seconds since midnight 1 Jan 1970 UTC, leap seconds excluded.\n// As well as improved entropy characteristics over versions 1 or 6.\n//\n// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#name-uuid-version-7\n//\n// Implementations SHOULD utilize UUID version 7 over UUID version 1 and 6 if possible.\n//\n// NewV7 returns a Version 7 UUID based on the current time(Unix Epoch).\n// Uses the randomness pool if it was enabled with EnableRandPool.\n// On error, NewV7 returns Nil and an error\nfunc NewV7() (UUID, error) {\n\tuuid, err := NewRandom()\n\tif err != nil {\n\t\treturn uuid, err\n\t}\n\tmakeV7(uuid[:])\n\treturn uuid, nil\n}\n\n// NewV7FromReader returns a Version 7 UUID based on the current time(Unix Epoch).\n// it use NewRandomFromReader fill random bits.\n// On error, NewV7FromReader returns Nil and an error.\nfunc NewV7FromReader(r io.Reader) (UUID, error) {\n\tuuid, err := NewRandomFromReader(r)\n\tif err != nil {\n\t\treturn uuid, err\n\t}\n\n\tmakeV7(uuid[:])\n\treturn uuid, nil\n}\n\n// makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6])\n// uuid[8] already has the right version number (Variant is 10)\n// see function NewV7 and NewV7FromReader\nfunc makeV7(uuid []byte) {\n\t/*\n\t\t 0                   1                   2                   3\n\t\t 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n\t\t+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t\t|                           unix_ts_ms                          |\n\t\t+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t\t|          unix_ts_ms           |  ver  |  rand_a (12 bit seq)  |\n\t\t+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t\t|var|                        rand_b                             |\n\t\t+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t\t|                            rand_b                             |\n\t\t+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\t*/\n\t_ = uuid[15] // bounds check\n\n\tt, s := getV7Time()\n\n\tuuid[0] = byte(t >> 40)\n\tuuid[1] = byte(t >> 32)\n\tuuid[2] = byte(t >> 24)\n\tuuid[3] = byte(t >> 16)\n\tuuid[4] = byte(t >> 8)\n\tuuid[5] = byte(t)\n\n\tuuid[6] = 0x70 | (0x0F & byte(s>>8))\n\tuuid[7] = byte(s)\n}\n\n// lastV7time is the last time we returned stored as:\n//\n//\t52 bits of time in milliseconds since epoch\n//\t12 bits of (fractional nanoseconds) >> 8\nvar lastV7time int64\n\nconst nanoPerMilli = 1000000\n\n// getV7Time returns the time in milliseconds and nanoseconds / 256.\n// The returned (milli << 12 + seq) is guarenteed to be greater than\n// (milli << 12 + seq) returned by any previous call to getV7Time.\nfunc getV7Time() (milli, seq int64) {\n\ttimeMu.Lock()\n\tdefer timeMu.Unlock()\n\n\tnano := timeNow().UnixNano()\n\tmilli = nano / nanoPerMilli\n\t// Sequence number is between 0 and 3906 (nanoPerMilli>>8)\n\tseq = (nano - milli*nanoPerMilli) >> 8\n\tnow := milli<<12 + seq\n\tif now <= lastV7time {\n\t\tnow = lastV7time + 1\n\t\tmilli = now >> 12\n\t\tseq = now & 0xfff\n\t}\n\tlastV7time = now\n\treturn milli, seq\n}\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/.editorconfig",
    "content": "; https://editorconfig.org/\n\nroot = true\n\n[*]\ninsert_final_newline = true\ncharset = utf-8\ntrim_trailing_whitespace = true\nindent_style = space\nindent_size = 2\n\n[{Makefile,go.mod,go.sum,*.go,.gitmodules}]\nindent_style = tab\nindent_size = 4\n\n[*.md]\nindent_size = 4\ntrim_trailing_whitespace = false\n\neclint_indent_style = unset"
  },
  {
    "path": "vendor/github.com/gorilla/mux/.gitignore",
    "content": "coverage.coverprofile\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/LICENSE",
    "content": "Copyright (c) 2023 The Gorilla Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n\t * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n\t * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/Makefile",
    "content": "GO_LINT=$(shell which golangci-lint 2> /dev/null || echo '')\nGO_LINT_URI=github.com/golangci/golangci-lint/cmd/golangci-lint@latest\n\nGO_SEC=$(shell which gosec 2> /dev/null || echo '')\nGO_SEC_URI=github.com/securego/gosec/v2/cmd/gosec@latest\n\nGO_VULNCHECK=$(shell which govulncheck 2> /dev/null || echo '')\nGO_VULNCHECK_URI=golang.org/x/vuln/cmd/govulncheck@latest\n\n.PHONY: golangci-lint\ngolangci-lint:\n\t$(if $(GO_LINT), ,go install $(GO_LINT_URI))\n\t@echo \"##### Running golangci-lint\"\n\tgolangci-lint run -v\n\t\n.PHONY: gosec\ngosec:\n\t$(if $(GO_SEC), ,go install $(GO_SEC_URI))\n\t@echo \"##### Running gosec\"\n\tgosec ./...\n\n.PHONY: govulncheck\ngovulncheck:\n\t$(if $(GO_VULNCHECK), ,go install $(GO_VULNCHECK_URI))\n\t@echo \"##### Running govulncheck\"\n\tgovulncheck ./...\n\n.PHONY: verify\nverify: golangci-lint gosec govulncheck\n\n.PHONY: test\ntest:\n\t@echo \"##### Running tests\"\n\tgo test -race -cover -coverprofile=coverage.coverprofile -covermode=atomic -v ./..."
  },
  {
    "path": "vendor/github.com/gorilla/mux/README.md",
    "content": "# gorilla/mux\n\n![testing](https://github.com/gorilla/mux/actions/workflows/test.yml/badge.svg)\n[![codecov](https://codecov.io/github/gorilla/mux/branch/main/graph/badge.svg)](https://codecov.io/github/gorilla/mux)\n[![godoc](https://godoc.org/github.com/gorilla/mux?status.svg)](https://godoc.org/github.com/gorilla/mux)\n[![sourcegraph](https://sourcegraph.com/github.com/gorilla/mux/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/mux?badge)\n\n\n![Gorilla Logo](https://github.com/gorilla/.github/assets/53367916/d92caabf-98e0-473e-bfbf-ab554ba435e5)\n\nPackage `gorilla/mux` implements a request router and dispatcher for matching incoming requests to\ntheir respective handler.\n\nThe name mux stands for \"HTTP request multiplexer\". Like the standard `http.ServeMux`, `mux.Router` matches incoming requests against a list of registered routes and calls a handler for the route that matches the URL or other conditions. The main features are:\n\n* It implements the `http.Handler` interface so it is compatible with the standard `http.ServeMux`.\n* Requests can be matched based on URL host, path, path prefix, schemes, header and query values, HTTP methods or using custom matchers.\n* URL hosts, paths and query values can have variables with an optional regular expression.\n* Registered URLs can be built, or \"reversed\", which helps maintaining references to resources.\n* Routes can be used as subrouters: nested routes are only tested if the parent route matches. This is useful to define groups of routes that share common conditions like a host, a path prefix or other repeated attributes. As a bonus, this optimizes request matching.\n\n---\n\n* [Install](#install)\n* [Examples](#examples)\n* [Matching Routes](#matching-routes)\n* [Static Files](#static-files)\n* [Serving Single Page Applications](#serving-single-page-applications) (e.g. React, Vue, Ember.js, etc.)\n* [Registered URLs](#registered-urls)\n* [Walking Routes](#walking-routes)\n* [Graceful Shutdown](#graceful-shutdown)\n* [Middleware](#middleware)\n* [Handling CORS Requests](#handling-cors-requests)\n* [Testing Handlers](#testing-handlers)\n* [Full Example](#full-example)\n\n---\n\n## Install\n\nWith a [correctly configured](https://golang.org/doc/install#testing) Go toolchain:\n\n```sh\ngo get -u github.com/gorilla/mux\n```\n\n## Examples\n\nLet's start registering a couple of URL paths and handlers:\n\n```go\nfunc main() {\n    r := mux.NewRouter()\n    r.HandleFunc(\"/\", HomeHandler)\n    r.HandleFunc(\"/products\", ProductsHandler)\n    r.HandleFunc(\"/articles\", ArticlesHandler)\n    http.Handle(\"/\", r)\n}\n```\n\nHere we register three routes mapping URL paths to handlers. This is equivalent to how `http.HandleFunc()` works: if an incoming request URL matches one of the paths, the corresponding handler is called passing (`http.ResponseWriter`, `*http.Request`) as parameters.\n\nPaths can have variables. They are defined using the format `{name}` or `{name:pattern}`. If a regular expression pattern is not defined, the matched variable will be anything until the next slash. For example:\n\n```go\nr := mux.NewRouter()\nr.HandleFunc(\"/products/{key}\", ProductHandler)\nr.HandleFunc(\"/articles/{category}/\", ArticlesCategoryHandler)\nr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler)\n```\n\nThe names are used to create a map of route variables which can be retrieved calling `mux.Vars()`:\n\n```go\nfunc ArticlesCategoryHandler(w http.ResponseWriter, r *http.Request) {\n    vars := mux.Vars(r)\n    w.WriteHeader(http.StatusOK)\n    fmt.Fprintf(w, \"Category: %v\\n\", vars[\"category\"])\n}\n```\n\nAnd this is all you need to know about the basic usage. More advanced options are explained below.\n\n### Matching Routes\n\nRoutes can also be restricted to a domain or subdomain. Just define a host pattern to be matched. They can also have variables:\n\n```go\nr := mux.NewRouter()\n// Only matches if domain is \"www.example.com\".\nr.Host(\"www.example.com\")\n// Matches a dynamic subdomain.\nr.Host(\"{subdomain:[a-z]+}.example.com\")\n```\n\nThere are several other matchers that can be added. To match path prefixes:\n\n```go\nr.PathPrefix(\"/products/\")\n```\n\n...or HTTP methods:\n\n```go\nr.Methods(\"GET\", \"POST\")\n```\n\n...or URL schemes:\n\n```go\nr.Schemes(\"https\")\n```\n\n...or header values:\n\n```go\nr.Headers(\"X-Requested-With\", \"XMLHttpRequest\")\n```\n\n...or query values:\n\n```go\nr.Queries(\"key\", \"value\")\n```\n\n...or to use a custom matcher function:\n\n```go\nr.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool {\n    return r.ProtoMajor == 0\n})\n```\n\n...and finally, it is possible to combine several matchers in a single route:\n\n```go\nr.HandleFunc(\"/products\", ProductsHandler).\n  Host(\"www.example.com\").\n  Methods(\"GET\").\n  Schemes(\"http\")\n```\n\nRoutes are tested in the order they were added to the router. If two routes match, the first one wins:\n\n```go\nr := mux.NewRouter()\nr.HandleFunc(\"/specific\", specificHandler)\nr.PathPrefix(\"/\").Handler(catchAllHandler)\n```\n\nSetting the same matching conditions again and again can be boring, so we have a way to group several routes that share the same requirements. We call it \"subrouting\".\n\nFor example, let's say we have several URLs that should only match when the host is `www.example.com`. Create a route for that host and get a \"subrouter\" from it:\n\n```go\nr := mux.NewRouter()\ns := r.Host(\"www.example.com\").Subrouter()\n```\n\nThen register routes in the subrouter:\n\n```go\ns.HandleFunc(\"/products/\", ProductsHandler)\ns.HandleFunc(\"/products/{key}\", ProductHandler)\ns.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler)\n```\n\nThe three URL paths we registered above will only be tested if the domain is `www.example.com`, because the subrouter is tested first. This is not only convenient, but also optimizes request matching. You can create subrouters combining any attribute matchers accepted by a route.\n\nSubrouters can be used to create domain or path \"namespaces\": you define subrouters in a central place and then parts of the app can register its paths relatively to a given subrouter.\n\nThere's one more thing about subroutes. When a subrouter has a path prefix, the inner routes use it as base for their paths:\n\n```go\nr := mux.NewRouter()\ns := r.PathPrefix(\"/products\").Subrouter()\n// \"/products/\"\ns.HandleFunc(\"/\", ProductsHandler)\n// \"/products/{key}/\"\ns.HandleFunc(\"/{key}/\", ProductHandler)\n// \"/products/{key}/details\"\ns.HandleFunc(\"/{key}/details\", ProductDetailsHandler)\n```\n\n\n### Static Files\n\nNote that the path provided to `PathPrefix()` represents a \"wildcard\": calling\n`PathPrefix(\"/static/\").Handler(...)` means that the handler will be passed any\nrequest that matches \"/static/\\*\". This makes it easy to serve static files with mux:\n\n```go\nfunc main() {\n    var dir string\n\n    flag.StringVar(&dir, \"dir\", \".\", \"the directory to serve files from. Defaults to the current dir\")\n    flag.Parse()\n    r := mux.NewRouter()\n\n    // This will serve files under http://localhost:8000/static/<filename>\n    r.PathPrefix(\"/static/\").Handler(http.StripPrefix(\"/static/\", http.FileServer(http.Dir(dir))))\n\n    srv := &http.Server{\n        Handler:      r,\n        Addr:         \"127.0.0.1:8000\",\n        // Good practice: enforce timeouts for servers you create!\n        WriteTimeout: 15 * time.Second,\n        ReadTimeout:  15 * time.Second,\n    }\n\n    log.Fatal(srv.ListenAndServe())\n}\n```\n\n### Serving Single Page Applications\n\nMost of the time it makes sense to serve your SPA on a separate web server from your API,\nbut sometimes it's desirable to serve them both from one place. It's possible to write a simple\nhandler for serving your SPA (for use with React Router's [BrowserRouter](https://reacttraining.com/react-router/web/api/BrowserRouter) for example), and leverage\nmux's powerful routing for your API endpoints.\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/gorilla/mux\"\n)\n\n// spaHandler implements the http.Handler interface, so we can use it\n// to respond to HTTP requests. The path to the static directory and\n// path to the index file within that static directory are used to\n// serve the SPA in the given static directory.\ntype spaHandler struct {\n\tstaticPath string\n\tindexPath  string\n}\n\n// ServeHTTP inspects the URL path to locate a file within the static dir\n// on the SPA handler. If a file is found, it will be served. If not, the\n// file located at the index path on the SPA handler will be served. This\n// is suitable behavior for serving an SPA (single page application).\nfunc (h spaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\t// Join internally call path.Clean to prevent directory traversal\n\tpath := filepath.Join(h.staticPath, r.URL.Path)\n\n\t// check whether a file exists or is a directory at the given path\n\tfi, err := os.Stat(path)\n\tif os.IsNotExist(err) || fi.IsDir() {\n\t\t// file does not exist or path is a directory, serve index.html\n\t\thttp.ServeFile(w, r, filepath.Join(h.staticPath, h.indexPath))\n\t\treturn\n\t}\n\n\tif err != nil {\n\t\t// if we got an error (that wasn't that the file doesn't exist) stating the\n\t\t// file, return a 500 internal server error and stop\n\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n        return\n\t}\n\n\t// otherwise, use http.FileServer to serve the static file\n\thttp.FileServer(http.Dir(h.staticPath)).ServeHTTP(w, r)\n}\n\nfunc main() {\n\trouter := mux.NewRouter()\n\n\trouter.HandleFunc(\"/api/health\", func(w http.ResponseWriter, r *http.Request) {\n\t\t// an example API handler\n\t\tjson.NewEncoder(w).Encode(map[string]bool{\"ok\": true})\n\t})\n\n\tspa := spaHandler{staticPath: \"build\", indexPath: \"index.html\"}\n\trouter.PathPrefix(\"/\").Handler(spa)\n\n\tsrv := &http.Server{\n\t\tHandler: router,\n\t\tAddr:    \"127.0.0.1:8000\",\n\t\t// Good practice: enforce timeouts for servers you create!\n\t\tWriteTimeout: 15 * time.Second,\n\t\tReadTimeout:  15 * time.Second,\n\t}\n\n\tlog.Fatal(srv.ListenAndServe())\n}\n```\n\n### Registered URLs\n\nNow let's see how to build registered URLs.\n\nRoutes can be named. All routes that define a name can have their URLs built, or \"reversed\". We define a name calling `Name()` on a route. For example:\n\n```go\nr := mux.NewRouter()\nr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler).\n  Name(\"article\")\n```\n\nTo build a URL, get the route and call the `URL()` method, passing a sequence of key/value pairs for the route variables. For the previous route, we would do:\n\n```go\nurl, err := r.Get(\"article\").URL(\"category\", \"technology\", \"id\", \"42\")\n```\n\n...and the result will be a `url.URL` with the following path:\n\n```\n\"/articles/technology/42\"\n```\n\nThis also works for host and query value variables:\n\n```go\nr := mux.NewRouter()\nr.Host(\"{subdomain}.example.com\").\n  Path(\"/articles/{category}/{id:[0-9]+}\").\n  Queries(\"filter\", \"{filter}\").\n  HandlerFunc(ArticleHandler).\n  Name(\"article\")\n\n// url.String() will be \"http://news.example.com/articles/technology/42?filter=gorilla\"\nurl, err := r.Get(\"article\").URL(\"subdomain\", \"news\",\n                                 \"category\", \"technology\",\n                                 \"id\", \"42\",\n                                 \"filter\", \"gorilla\")\n```\n\nAll variables defined in the route are required, and their values must conform to the corresponding patterns. These requirements guarantee that a generated URL will always match a registered route -- the only exception is for explicitly defined \"build-only\" routes which never match.\n\nRegex support also exists for matching Headers within a route. For example, we could do:\n\n```go\nr.HeadersRegexp(\"Content-Type\", \"application/(text|json)\")\n```\n\n...and the route will match both requests with a Content-Type of `application/json` as well as `application/text`\n\nThere's also a way to build only the URL host or path for a route: use the methods `URLHost()` or `URLPath()` instead. For the previous route, we would do:\n\n```go\n// \"http://news.example.com/\"\nhost, err := r.Get(\"article\").URLHost(\"subdomain\", \"news\")\n\n// \"/articles/technology/42\"\npath, err := r.Get(\"article\").URLPath(\"category\", \"technology\", \"id\", \"42\")\n```\n\nAnd if you use subrouters, host and path defined separately can be built as well:\n\n```go\nr := mux.NewRouter()\ns := r.Host(\"{subdomain}.example.com\").Subrouter()\ns.Path(\"/articles/{category}/{id:[0-9]+}\").\n  HandlerFunc(ArticleHandler).\n  Name(\"article\")\n\n// \"http://news.example.com/articles/technology/42\"\nurl, err := r.Get(\"article\").URL(\"subdomain\", \"news\",\n                                 \"category\", \"technology\",\n                                 \"id\", \"42\")\n```\n\nTo find all the required variables for a given route when calling `URL()`, the method `GetVarNames()` is available:\n```go\nr := mux.NewRouter()\nr.Host(\"{domain}\").\n    Path(\"/{group}/{item_id}\").\n    Queries(\"some_data1\", \"{some_data1}\").\n    Queries(\"some_data2\", \"{some_data2}\").\n    Name(\"article\")\n\n// Will print [domain group item_id some_data1 some_data2] <nil>\nfmt.Println(r.Get(\"article\").GetVarNames())\n\n```\n### Walking Routes\n\nThe `Walk` function on `mux.Router` can be used to visit all of the routes that are registered on a router. For example,\nthe following prints all of the registered routes:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/gorilla/mux\"\n)\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\treturn\n}\n\nfunc main() {\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/\", handler)\n\tr.HandleFunc(\"/products\", handler).Methods(\"POST\")\n\tr.HandleFunc(\"/articles\", handler).Methods(\"GET\")\n\tr.HandleFunc(\"/articles/{id}\", handler).Methods(\"GET\", \"PUT\")\n\tr.HandleFunc(\"/authors\", handler).Queries(\"surname\", \"{surname}\")\n\terr := r.Walk(func(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error {\n\t\tpathTemplate, err := route.GetPathTemplate()\n\t\tif err == nil {\n\t\t\tfmt.Println(\"ROUTE:\", pathTemplate)\n\t\t}\n\t\tpathRegexp, err := route.GetPathRegexp()\n\t\tif err == nil {\n\t\t\tfmt.Println(\"Path regexp:\", pathRegexp)\n\t\t}\n\t\tqueriesTemplates, err := route.GetQueriesTemplates()\n\t\tif err == nil {\n\t\t\tfmt.Println(\"Queries templates:\", strings.Join(queriesTemplates, \",\"))\n\t\t}\n\t\tqueriesRegexps, err := route.GetQueriesRegexp()\n\t\tif err == nil {\n\t\t\tfmt.Println(\"Queries regexps:\", strings.Join(queriesRegexps, \",\"))\n\t\t}\n\t\tmethods, err := route.GetMethods()\n\t\tif err == nil {\n\t\t\tfmt.Println(\"Methods:\", strings.Join(methods, \",\"))\n\t\t}\n\t\tfmt.Println()\n\t\treturn nil\n\t})\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\thttp.Handle(\"/\", r)\n}\n```\n\n### Graceful Shutdown\n\nGo 1.8 introduced the ability to [gracefully shutdown](https://golang.org/doc/go1.8#http_shutdown) a `*http.Server`. Here's how to do that alongside `mux`:\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"flag\"\n    \"log\"\n    \"net/http\"\n    \"os\"\n    \"os/signal\"\n    \"time\"\n\n    \"github.com/gorilla/mux\"\n)\n\nfunc main() {\n    var wait time.Duration\n    flag.DurationVar(&wait, \"graceful-timeout\", time.Second * 15, \"the duration for which the server gracefully wait for existing connections to finish - e.g. 15s or 1m\")\n    flag.Parse()\n\n    r := mux.NewRouter()\n    // Add your routes as needed\n\n    srv := &http.Server{\n        Addr:         \"0.0.0.0:8080\",\n        // Good practice to set timeouts to avoid Slowloris attacks.\n        WriteTimeout: time.Second * 15,\n        ReadTimeout:  time.Second * 15,\n        IdleTimeout:  time.Second * 60,\n        Handler: r, // Pass our instance of gorilla/mux in.\n    }\n\n    // Run our server in a goroutine so that it doesn't block.\n    go func() {\n        if err := srv.ListenAndServe(); err != nil {\n            log.Println(err)\n        }\n    }()\n\n    c := make(chan os.Signal, 1)\n    // We'll accept graceful shutdowns when quit via SIGINT (Ctrl+C)\n    // SIGKILL, SIGQUIT or SIGTERM (Ctrl+/) will not be caught.\n    signal.Notify(c, os.Interrupt)\n\n    // Block until we receive our signal.\n    <-c\n\n    // Create a deadline to wait for.\n    ctx, cancel := context.WithTimeout(context.Background(), wait)\n    defer cancel()\n    // Doesn't block if no connections, but will otherwise wait\n    // until the timeout deadline.\n    srv.Shutdown(ctx)\n    // Optionally, you could run srv.Shutdown in a goroutine and block on\n    // <-ctx.Done() if your application should wait for other services\n    // to finalize based on context cancellation.\n    log.Println(\"shutting down\")\n    os.Exit(0)\n}\n```\n\n### Middleware\n\nMux supports the addition of middlewares to a [Router](https://godoc.org/github.com/gorilla/mux#Router), which are executed in the order they are added if a match is found, including its subrouters.\nMiddlewares are (typically) small pieces of code which take one request, do something with it, and pass it down to another middleware or the final handler. Some common use cases for middleware are request logging, header manipulation, or `ResponseWriter` hijacking.\n\nMux middlewares are defined using the de facto standard type:\n\n```go\ntype MiddlewareFunc func(http.Handler) http.Handler\n```\n\nTypically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed to it, and then calls the handler passed as parameter to the MiddlewareFunc. This takes advantage of closures being able access variables from the context where they are created, while retaining the signature enforced by the receivers.\n\nA very basic middleware which logs the URI of the request being handled could be written as:\n\n```go\nfunc loggingMiddleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        // Do stuff here\n        log.Println(r.RequestURI)\n        // Call the next handler, which can be another middleware in the chain, or the final handler.\n        next.ServeHTTP(w, r)\n    })\n}\n```\n\nMiddlewares can be added to a router using `Router.Use()`:\n\n```go\nr := mux.NewRouter()\nr.HandleFunc(\"/\", handler)\nr.Use(loggingMiddleware)\n```\n\nA more complex authentication middleware, which maps session token to users, could be written as:\n\n```go\n// Define our struct\ntype authenticationMiddleware struct {\n\ttokenUsers map[string]string\n}\n\n// Initialize it somewhere\nfunc (amw *authenticationMiddleware) Populate() {\n\tamw.tokenUsers[\"00000000\"] = \"user0\"\n\tamw.tokenUsers[\"aaaaaaaa\"] = \"userA\"\n\tamw.tokenUsers[\"05f717e5\"] = \"randomUser\"\n\tamw.tokenUsers[\"deadbeef\"] = \"user0\"\n}\n\n// Middleware function, which will be called for each request\nfunc (amw *authenticationMiddleware) Middleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        token := r.Header.Get(\"X-Session-Token\")\n\n        if user, found := amw.tokenUsers[token]; found {\n        \t// We found the token in our map\n        \tlog.Printf(\"Authenticated user %s\\n\", user)\n        \t// Pass down the request to the next middleware (or final handler)\n        \tnext.ServeHTTP(w, r)\n        } else {\n        \t// Write an error and stop the handler chain\n        \thttp.Error(w, \"Forbidden\", http.StatusForbidden)\n        }\n    })\n}\n```\n\n```go\nr := mux.NewRouter()\nr.HandleFunc(\"/\", handler)\n\namw := authenticationMiddleware{tokenUsers: make(map[string]string)}\namw.Populate()\n\nr.Use(amw.Middleware)\n```\n\nNote: The handler chain will be stopped if your middleware doesn't call `next.ServeHTTP()` with the corresponding parameters. This can be used to abort a request if the middleware writer wants to. Middlewares _should_ write to `ResponseWriter` if they _are_ going to terminate the request, and they _should not_ write to `ResponseWriter` if they _are not_ going to terminate it.\n\n### Handling CORS Requests\n\n[CORSMethodMiddleware](https://godoc.org/github.com/gorilla/mux#CORSMethodMiddleware) intends to make it easier to strictly set the `Access-Control-Allow-Methods` response header.\n\n* You will still need to use your own CORS handler to set the other CORS headers such as `Access-Control-Allow-Origin`\n* The middleware will set the `Access-Control-Allow-Methods` header to all the method matchers (e.g. `r.Methods(http.MethodGet, http.MethodPut, http.MethodOptions)` -> `Access-Control-Allow-Methods: GET,PUT,OPTIONS`) on a route\n* If you do not specify any methods, then:\n> _Important_: there must be an `OPTIONS` method matcher for the middleware to set the headers.\n\nHere is an example of using `CORSMethodMiddleware` along with a custom `OPTIONS` handler to set all the required CORS headers:\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\t\"github.com/gorilla/mux\"\n)\n\nfunc main() {\n    r := mux.NewRouter()\n\n    // IMPORTANT: you must specify an OPTIONS method matcher for the middleware to set CORS headers\n    r.HandleFunc(\"/foo\", fooHandler).Methods(http.MethodGet, http.MethodPut, http.MethodPatch, http.MethodOptions)\n    r.Use(mux.CORSMethodMiddleware(r))\n    \n    http.ListenAndServe(\":8080\", r)\n}\n\nfunc fooHandler(w http.ResponseWriter, r *http.Request) {\n    w.Header().Set(\"Access-Control-Allow-Origin\", \"*\")\n    if r.Method == http.MethodOptions {\n        return\n    }\n\n    w.Write([]byte(\"foo\"))\n}\n```\n\nAnd an request to `/foo` using something like:\n\n```bash\ncurl localhost:8080/foo -v\n```\n\nWould look like:\n\n```bash\n*   Trying ::1...\n* TCP_NODELAY set\n* Connected to localhost (::1) port 8080 (#0)\n> GET /foo HTTP/1.1\n> Host: localhost:8080\n> User-Agent: curl/7.59.0\n> Accept: */*\n> \n< HTTP/1.1 200 OK\n< Access-Control-Allow-Methods: GET,PUT,PATCH,OPTIONS\n< Access-Control-Allow-Origin: *\n< Date: Fri, 28 Jun 2019 20:13:30 GMT\n< Content-Length: 3\n< Content-Type: text/plain; charset=utf-8\n< \n* Connection #0 to host localhost left intact\nfoo\n```\n\n### Testing Handlers\n\nTesting handlers in a Go web application is straightforward, and _mux_ doesn't complicate this any further. Given two files: `endpoints.go` and `endpoints_test.go`, here's how we'd test an application using _mux_.\n\nFirst, our simple HTTP handler:\n\n```go\n// endpoints.go\npackage main\n\nfunc HealthCheckHandler(w http.ResponseWriter, r *http.Request) {\n    // A very simple health check.\n    w.Header().Set(\"Content-Type\", \"application/json\")\n    w.WriteHeader(http.StatusOK)\n\n    // In the future we could report back on the status of our DB, or our cache\n    // (e.g. Redis) by performing a simple PING, and include them in the response.\n    io.WriteString(w, `{\"alive\": true}`)\n}\n\nfunc main() {\n    r := mux.NewRouter()\n    r.HandleFunc(\"/health\", HealthCheckHandler)\n\n    log.Fatal(http.ListenAndServe(\"localhost:8080\", r))\n}\n```\n\nOur test code:\n\n```go\n// endpoints_test.go\npackage main\n\nimport (\n    \"net/http\"\n    \"net/http/httptest\"\n    \"testing\"\n)\n\nfunc TestHealthCheckHandler(t *testing.T) {\n    // Create a request to pass to our handler. We don't have any query parameters for now, so we'll\n    // pass 'nil' as the third parameter.\n    req, err := http.NewRequest(\"GET\", \"/health\", nil)\n    if err != nil {\n        t.Fatal(err)\n    }\n\n    // We create a ResponseRecorder (which satisfies http.ResponseWriter) to record the response.\n    rr := httptest.NewRecorder()\n    handler := http.HandlerFunc(HealthCheckHandler)\n\n    // Our handlers satisfy http.Handler, so we can call their ServeHTTP method\n    // directly and pass in our Request and ResponseRecorder.\n    handler.ServeHTTP(rr, req)\n\n    // Check the status code is what we expect.\n    if status := rr.Code; status != http.StatusOK {\n        t.Errorf(\"handler returned wrong status code: got %v want %v\",\n            status, http.StatusOK)\n    }\n\n    // Check the response body is what we expect.\n    expected := `{\"alive\": true}`\n    if rr.Body.String() != expected {\n        t.Errorf(\"handler returned unexpected body: got %v want %v\",\n            rr.Body.String(), expected)\n    }\n}\n```\n\nIn the case that our routes have [variables](#examples), we can pass those in the request. We could write\n[table-driven tests](https://dave.cheney.net/2013/06/09/writing-table-driven-tests-in-go) to test multiple\npossible route variables as needed.\n\n```go\n// endpoints.go\nfunc main() {\n    r := mux.NewRouter()\n    // A route with a route variable:\n    r.HandleFunc(\"/metrics/{type}\", MetricsHandler)\n\n    log.Fatal(http.ListenAndServe(\"localhost:8080\", r))\n}\n```\n\nOur test file, with a table-driven test of `routeVariables`:\n\n```go\n// endpoints_test.go\nfunc TestMetricsHandler(t *testing.T) {\n    tt := []struct{\n        routeVariable string\n        shouldPass bool\n    }{\n        {\"goroutines\", true},\n        {\"heap\", true},\n        {\"counters\", true},\n        {\"queries\", true},\n        {\"adhadaeqm3k\", false},\n    }\n\n    for _, tc := range tt {\n        path := fmt.Sprintf(\"/metrics/%s\", tc.routeVariable)\n        req, err := http.NewRequest(\"GET\", path, nil)\n        if err != nil {\n            t.Fatal(err)\n        }\n\n        rr := httptest.NewRecorder()\n\t\n\t// To add the vars to the context, \n\t// we need to create a router through which we can pass the request.\n\trouter := mux.NewRouter()\n        router.HandleFunc(\"/metrics/{type}\", MetricsHandler)\n        router.ServeHTTP(rr, req)\n\n        // In this case, our MetricsHandler returns a non-200 response\n        // for a route variable it doesn't know about.\n        if rr.Code == http.StatusOK && !tc.shouldPass {\n            t.Errorf(\"handler should have failed on routeVariable %s: got %v want %v\",\n                tc.routeVariable, rr.Code, http.StatusOK)\n        }\n    }\n}\n```\n\n## Full Example\n\nHere's a complete, runnable example of a small `mux` based server:\n\n```go\npackage main\n\nimport (\n    \"net/http\"\n    \"log\"\n    \"github.com/gorilla/mux\"\n)\n\nfunc YourHandler(w http.ResponseWriter, r *http.Request) {\n    w.Write([]byte(\"Gorilla!\\n\"))\n}\n\nfunc main() {\n    r := mux.NewRouter()\n    // Routes consist of a path and a handler function.\n    r.HandleFunc(\"/\", YourHandler)\n\n    // Bind to a port and pass our router in\n    log.Fatal(http.ListenAndServe(\":8000\", r))\n}\n```\n\n## License\n\nBSD licensed. See the LICENSE file for details.\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/doc.go",
    "content": "// Copyright 2012 The Gorilla Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage mux implements a request router and dispatcher.\n\nThe name mux stands for \"HTTP request multiplexer\". Like the standard\nhttp.ServeMux, mux.Router matches incoming requests against a list of\nregistered routes and calls a handler for the route that matches the URL\nor other conditions. The main features are:\n\n  - Requests can be matched based on URL host, path, path prefix, schemes,\n    header and query values, HTTP methods or using custom matchers.\n  - URL hosts, paths and query values can have variables with an optional\n    regular expression.\n  - Registered URLs can be built, or \"reversed\", which helps maintaining\n    references to resources.\n  - Routes can be used as subrouters: nested routes are only tested if the\n    parent route matches. This is useful to define groups of routes that\n    share common conditions like a host, a path prefix or other repeated\n    attributes. As a bonus, this optimizes request matching.\n  - It implements the http.Handler interface so it is compatible with the\n    standard http.ServeMux.\n\nLet's start registering a couple of URL paths and handlers:\n\n\tfunc main() {\n\t\tr := mux.NewRouter()\n\t\tr.HandleFunc(\"/\", HomeHandler)\n\t\tr.HandleFunc(\"/products\", ProductsHandler)\n\t\tr.HandleFunc(\"/articles\", ArticlesHandler)\n\t\thttp.Handle(\"/\", r)\n\t}\n\nHere we register three routes mapping URL paths to handlers. This is\nequivalent to how http.HandleFunc() works: if an incoming request URL matches\none of the paths, the corresponding handler is called passing\n(http.ResponseWriter, *http.Request) as parameters.\n\nPaths can have variables. They are defined using the format {name} or\n{name:pattern}. If a regular expression pattern is not defined, the matched\nvariable will be anything until the next slash. For example:\n\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/products/{key}\", ProductHandler)\n\tr.HandleFunc(\"/articles/{category}/\", ArticlesCategoryHandler)\n\tr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler)\n\nGroups can be used inside patterns, as long as they are non-capturing (?:re). For example:\n\n\tr.HandleFunc(\"/articles/{category}/{sort:(?:asc|desc|new)}\", ArticlesCategoryHandler)\n\nThe names are used to create a map of route variables which can be retrieved\ncalling mux.Vars():\n\n\tvars := mux.Vars(request)\n\tcategory := vars[\"category\"]\n\nNote that if any capturing groups are present, mux will panic() during parsing. To prevent\nthis, convert any capturing groups to non-capturing, e.g. change \"/{sort:(asc|desc)}\" to\n\"/{sort:(?:asc|desc)}\". This is a change from prior versions which behaved unpredictably\nwhen capturing groups were present.\n\nAnd this is all you need to know about the basic usage. More advanced options\nare explained below.\n\nRoutes can also be restricted to a domain or subdomain. Just define a host\npattern to be matched. They can also have variables:\n\n\tr := mux.NewRouter()\n\t// Only matches if domain is \"www.example.com\".\n\tr.Host(\"www.example.com\")\n\t// Matches a dynamic subdomain.\n\tr.Host(\"{subdomain:[a-z]+}.domain.com\")\n\nThere are several other matchers that can be added. To match path prefixes:\n\n\tr.PathPrefix(\"/products/\")\n\n...or HTTP methods:\n\n\tr.Methods(\"GET\", \"POST\")\n\n...or URL schemes:\n\n\tr.Schemes(\"https\")\n\n...or header values:\n\n\tr.Headers(\"X-Requested-With\", \"XMLHttpRequest\")\n\n...or query values:\n\n\tr.Queries(\"key\", \"value\")\n\n...or to use a custom matcher function:\n\n\tr.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool {\n\t\treturn r.ProtoMajor == 0\n\t})\n\n...and finally, it is possible to combine several matchers in a single route:\n\n\tr.HandleFunc(\"/products\", ProductsHandler).\n\t  Host(\"www.example.com\").\n\t  Methods(\"GET\").\n\t  Schemes(\"http\")\n\nSetting the same matching conditions again and again can be boring, so we have\na way to group several routes that share the same requirements.\nWe call it \"subrouting\".\n\nFor example, let's say we have several URLs that should only match when the\nhost is \"www.example.com\". Create a route for that host and get a \"subrouter\"\nfrom it:\n\n\tr := mux.NewRouter()\n\ts := r.Host(\"www.example.com\").Subrouter()\n\nThen register routes in the subrouter:\n\n\ts.HandleFunc(\"/products/\", ProductsHandler)\n\ts.HandleFunc(\"/products/{key}\", ProductHandler)\n\ts.HandleFunc(\"/articles/{category}/{id:[0-9]+}\"), ArticleHandler)\n\nThe three URL paths we registered above will only be tested if the domain is\n\"www.example.com\", because the subrouter is tested first. This is not\nonly convenient, but also optimizes request matching. You can create\nsubrouters combining any attribute matchers accepted by a route.\n\nSubrouters can be used to create domain or path \"namespaces\": you define\nsubrouters in a central place and then parts of the app can register its\npaths relatively to a given subrouter.\n\nThere's one more thing about subroutes. When a subrouter has a path prefix,\nthe inner routes use it as base for their paths:\n\n\tr := mux.NewRouter()\n\ts := r.PathPrefix(\"/products\").Subrouter()\n\t// \"/products/\"\n\ts.HandleFunc(\"/\", ProductsHandler)\n\t// \"/products/{key}/\"\n\ts.HandleFunc(\"/{key}/\", ProductHandler)\n\t// \"/products/{key}/details\"\n\ts.HandleFunc(\"/{key}/details\", ProductDetailsHandler)\n\nNote that the path provided to PathPrefix() represents a \"wildcard\": calling\nPathPrefix(\"/static/\").Handler(...) means that the handler will be passed any\nrequest that matches \"/static/*\". This makes it easy to serve static files with mux:\n\n\tfunc main() {\n\t\tvar dir string\n\n\t\tflag.StringVar(&dir, \"dir\", \".\", \"the directory to serve files from. Defaults to the current dir\")\n\t\tflag.Parse()\n\t\tr := mux.NewRouter()\n\n\t\t// This will serve files under http://localhost:8000/static/<filename>\n\t\tr.PathPrefix(\"/static/\").Handler(http.StripPrefix(\"/static/\", http.FileServer(http.Dir(dir))))\n\n\t\tsrv := &http.Server{\n\t\t\tHandler:      r,\n\t\t\tAddr:         \"127.0.0.1:8000\",\n\t\t\t// Good practice: enforce timeouts for servers you create!\n\t\t\tWriteTimeout: 15 * time.Second,\n\t\t\tReadTimeout:  15 * time.Second,\n\t\t}\n\n\t\tlog.Fatal(srv.ListenAndServe())\n\t}\n\nNow let's see how to build registered URLs.\n\nRoutes can be named. All routes that define a name can have their URLs built,\nor \"reversed\". We define a name calling Name() on a route. For example:\n\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler).\n\t  Name(\"article\")\n\nTo build a URL, get the route and call the URL() method, passing a sequence of\nkey/value pairs for the route variables. For the previous route, we would do:\n\n\turl, err := r.Get(\"article\").URL(\"category\", \"technology\", \"id\", \"42\")\n\n...and the result will be a url.URL with the following path:\n\n\t\"/articles/technology/42\"\n\nThis also works for host and query value variables:\n\n\tr := mux.NewRouter()\n\tr.Host(\"{subdomain}.domain.com\").\n\t  Path(\"/articles/{category}/{id:[0-9]+}\").\n\t  Queries(\"filter\", \"{filter}\").\n\t  HandlerFunc(ArticleHandler).\n\t  Name(\"article\")\n\n\t// url.String() will be \"http://news.domain.com/articles/technology/42?filter=gorilla\"\n\turl, err := r.Get(\"article\").URL(\"subdomain\", \"news\",\n\t                                 \"category\", \"technology\",\n\t                                 \"id\", \"42\",\n\t                                 \"filter\", \"gorilla\")\n\nAll variables defined in the route are required, and their values must\nconform to the corresponding patterns. These requirements guarantee that a\ngenerated URL will always match a registered route -- the only exception is\nfor explicitly defined \"build-only\" routes which never match.\n\nRegex support also exists for matching Headers within a route. For example, we could do:\n\n\tr.HeadersRegexp(\"Content-Type\", \"application/(text|json)\")\n\n...and the route will match both requests with a Content-Type of `application/json` as well as\n`application/text`\n\nThere's also a way to build only the URL host or path for a route:\nuse the methods URLHost() or URLPath() instead. For the previous route,\nwe would do:\n\n\t// \"http://news.domain.com/\"\n\thost, err := r.Get(\"article\").URLHost(\"subdomain\", \"news\")\n\n\t// \"/articles/technology/42\"\n\tpath, err := r.Get(\"article\").URLPath(\"category\", \"technology\", \"id\", \"42\")\n\nAnd if you use subrouters, host and path defined separately can be built\nas well:\n\n\tr := mux.NewRouter()\n\ts := r.Host(\"{subdomain}.domain.com\").Subrouter()\n\ts.Path(\"/articles/{category}/{id:[0-9]+}\").\n\t  HandlerFunc(ArticleHandler).\n\t  Name(\"article\")\n\n\t// \"http://news.domain.com/articles/technology/42\"\n\turl, err := r.Get(\"article\").URL(\"subdomain\", \"news\",\n\t                                 \"category\", \"technology\",\n\t                                 \"id\", \"42\")\n\nMux supports the addition of middlewares to a Router, which are executed in the order they are added if a match is found, including its subrouters. Middlewares are (typically) small pieces of code which take one request, do something with it, and pass it down to another middleware or the final handler. Some common use cases for middleware are request logging, header manipulation, or ResponseWriter hijacking.\n\n\ttype MiddlewareFunc func(http.Handler) http.Handler\n\nTypically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed to it, and then calls the handler passed as parameter to the MiddlewareFunc (closures can access variables from the context where they are created).\n\nA very basic middleware which logs the URI of the request being handled could be written as:\n\n\tfunc simpleMw(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\t// Do stuff here\n\t\t\tlog.Println(r.RequestURI)\n\t\t\t// Call the next handler, which can be another middleware in the chain, or the final handler.\n\t\t\tnext.ServeHTTP(w, r)\n\t\t})\n\t}\n\nMiddlewares can be added to a router using `Router.Use()`:\n\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/\", handler)\n\tr.Use(simpleMw)\n\nA more complex authentication middleware, which maps session token to users, could be written as:\n\n\t// Define our struct\n\ttype authenticationMiddleware struct {\n\t\ttokenUsers map[string]string\n\t}\n\n\t// Initialize it somewhere\n\tfunc (amw *authenticationMiddleware) Populate() {\n\t\tamw.tokenUsers[\"00000000\"] = \"user0\"\n\t\tamw.tokenUsers[\"aaaaaaaa\"] = \"userA\"\n\t\tamw.tokenUsers[\"05f717e5\"] = \"randomUser\"\n\t\tamw.tokenUsers[\"deadbeef\"] = \"user0\"\n\t}\n\n\t// Middleware function, which will be called for each request\n\tfunc (amw *authenticationMiddleware) Middleware(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\ttoken := r.Header.Get(\"X-Session-Token\")\n\n\t\t\tif user, found := amw.tokenUsers[token]; found {\n\t\t\t\t// We found the token in our map\n\t\t\t\tlog.Printf(\"Authenticated user %s\\n\", user)\n\t\t\t\tnext.ServeHTTP(w, r)\n\t\t\t} else {\n\t\t\t\thttp.Error(w, \"Forbidden\", http.StatusForbidden)\n\t\t\t}\n\t\t})\n\t}\n\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/\", handler)\n\n\tamw := authenticationMiddleware{tokenUsers: make(map[string]string)}\n\tamw.Populate()\n\n\tr.Use(amw.Middleware)\n\nNote: The handler chain will be stopped if your middleware doesn't call `next.ServeHTTP()` with the corresponding parameters. This can be used to abort a request if the middleware writer wants to.\n*/\npackage mux\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/middleware.go",
    "content": "package mux\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n)\n\n// MiddlewareFunc is a function which receives an http.Handler and returns another http.Handler.\n// Typically, the returned handler is a closure which does something with the http.ResponseWriter and http.Request passed\n// to it, and then calls the handler passed as parameter to the MiddlewareFunc.\ntype MiddlewareFunc func(http.Handler) http.Handler\n\n// middleware interface is anything which implements a MiddlewareFunc named Middleware.\ntype middleware interface {\n\tMiddleware(handler http.Handler) http.Handler\n}\n\n// Middleware allows MiddlewareFunc to implement the middleware interface.\nfunc (mw MiddlewareFunc) Middleware(handler http.Handler) http.Handler {\n\treturn mw(handler)\n}\n\n// Use appends a MiddlewareFunc to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.\nfunc (r *Router) Use(mwf ...MiddlewareFunc) {\n\tfor _, fn := range mwf {\n\t\tr.middlewares = append(r.middlewares, fn)\n\t}\n}\n\n// useInterface appends a middleware to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.\nfunc (r *Router) useInterface(mw middleware) {\n\tr.middlewares = append(r.middlewares, mw)\n}\n\n// CORSMethodMiddleware automatically sets the Access-Control-Allow-Methods response header\n// on requests for routes that have an OPTIONS method matcher to all the method matchers on\n// the route. Routes that do not explicitly handle OPTIONS requests will not be processed\n// by the middleware. See examples for usage.\nfunc CORSMethodMiddleware(r *Router) MiddlewareFunc {\n\treturn func(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {\n\t\t\tallMethods, err := getAllMethodsForRoute(r, req)\n\t\t\tif err == nil {\n\t\t\t\tfor _, v := range allMethods {\n\t\t\t\t\tif v == http.MethodOptions {\n\t\t\t\t\t\tw.Header().Set(\"Access-Control-Allow-Methods\", strings.Join(allMethods, \",\"))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext.ServeHTTP(w, req)\n\t\t})\n\t}\n}\n\n// getAllMethodsForRoute returns all the methods from method matchers matching a given\n// request.\nfunc getAllMethodsForRoute(r *Router, req *http.Request) ([]string, error) {\n\tvar allMethods []string\n\n\tfor _, route := range r.routes {\n\t\tvar match RouteMatch\n\t\tif route.Match(req, &match) || match.MatchErr == ErrMethodMismatch {\n\t\t\tmethods, err := route.GetMethods()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tallMethods = append(allMethods, methods...)\n\t\t}\n\t}\n\n\treturn allMethods, nil\n}\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/mux.go",
    "content": "// Copyright 2012 The Gorilla Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage mux\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"path\"\n\t\"regexp\"\n)\n\nvar (\n\t// ErrMethodMismatch is returned when the method in the request does not match\n\t// the method defined against the route.\n\tErrMethodMismatch = errors.New(\"method is not allowed\")\n\t// ErrNotFound is returned when no route match is found.\n\tErrNotFound = errors.New(\"no matching route was found\")\n)\n\n// NewRouter returns a new router instance.\nfunc NewRouter() *Router {\n\treturn &Router{namedRoutes: make(map[string]*Route)}\n}\n\n// Router registers routes to be matched and dispatches a handler.\n//\n// It implements the http.Handler interface, so it can be registered to serve\n// requests:\n//\n//\tvar router = mux.NewRouter()\n//\n//\tfunc main() {\n//\t    http.Handle(\"/\", router)\n//\t}\n//\n// Or, for Google App Engine, register it in a init() function:\n//\n//\tfunc init() {\n//\t    http.Handle(\"/\", router)\n//\t}\n//\n// This will send all incoming requests to the router.\ntype Router struct {\n\t// Configurable Handler to be used when no route matches.\n\t// This can be used to render your own 404 Not Found errors.\n\tNotFoundHandler http.Handler\n\n\t// Configurable Handler to be used when the request method does not match the route.\n\t// This can be used to render your own 405 Method Not Allowed errors.\n\tMethodNotAllowedHandler http.Handler\n\n\t// Routes to be matched, in order.\n\troutes []*Route\n\n\t// Routes by name for URL building.\n\tnamedRoutes map[string]*Route\n\n\t// If true, do not clear the request context after handling the request.\n\t//\n\t// Deprecated: No effect, since the context is stored on the request itself.\n\tKeepContext bool\n\n\t// Slice of middlewares to be called after a match is found\n\tmiddlewares []middleware\n\n\t// configuration shared with `Route`\n\trouteConf\n}\n\n// common route configuration shared between `Router` and `Route`\ntype routeConf struct {\n\t// If true, \"/path/foo%2Fbar/to\" will match the path \"/path/{var}/to\"\n\tuseEncodedPath bool\n\n\t// If true, when the path pattern is \"/path/\", accessing \"/path\" will\n\t// redirect to the former and vice versa.\n\tstrictSlash bool\n\n\t// If true, when the path pattern is \"/path//to\", accessing \"/path//to\"\n\t// will not redirect\n\tskipClean bool\n\n\t// Manager for the variables from host and path.\n\tregexp routeRegexpGroup\n\n\t// List of matchers.\n\tmatchers []matcher\n\n\t// The scheme used when building URLs.\n\tbuildScheme string\n\n\tbuildVarsFunc BuildVarsFunc\n}\n\n// returns an effective deep copy of `routeConf`\nfunc copyRouteConf(r routeConf) routeConf {\n\tc := r\n\n\tif r.regexp.path != nil {\n\t\tc.regexp.path = copyRouteRegexp(r.regexp.path)\n\t}\n\n\tif r.regexp.host != nil {\n\t\tc.regexp.host = copyRouteRegexp(r.regexp.host)\n\t}\n\n\tc.regexp.queries = make([]*routeRegexp, 0, len(r.regexp.queries))\n\tfor _, q := range r.regexp.queries {\n\t\tc.regexp.queries = append(c.regexp.queries, copyRouteRegexp(q))\n\t}\n\n\tc.matchers = make([]matcher, len(r.matchers))\n\tcopy(c.matchers, r.matchers)\n\n\treturn c\n}\n\nfunc copyRouteRegexp(r *routeRegexp) *routeRegexp {\n\tc := *r\n\treturn &c\n}\n\n// Match attempts to match the given request against the router's registered routes.\n//\n// If the request matches a route of this router or one of its subrouters the Route,\n// Handler, and Vars fields of the the match argument are filled and this function\n// returns true.\n//\n// If the request does not match any of this router's or its subrouters' routes\n// then this function returns false. If available, a reason for the match failure\n// will be filled in the match argument's MatchErr field. If the match failure type\n// (eg: not found) has a registered handler, the handler is assigned to the Handler\n// field of the match argument.\nfunc (r *Router) Match(req *http.Request, match *RouteMatch) bool {\n\tfor _, route := range r.routes {\n\t\tif route.Match(req, match) {\n\t\t\t// Build middleware chain if no error was found\n\t\t\tif match.MatchErr == nil {\n\t\t\t\tfor i := len(r.middlewares) - 1; i >= 0; i-- {\n\t\t\t\t\tmatch.Handler = r.middlewares[i].Middleware(match.Handler)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t}\n\n\tif match.MatchErr == ErrMethodMismatch {\n\t\tif r.MethodNotAllowedHandler != nil {\n\t\t\tmatch.Handler = r.MethodNotAllowedHandler\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\t// Closest match for a router (includes sub-routers)\n\tif r.NotFoundHandler != nil {\n\t\tmatch.Handler = r.NotFoundHandler\n\t\tmatch.MatchErr = ErrNotFound\n\t\treturn true\n\t}\n\n\tmatch.MatchErr = ErrNotFound\n\treturn false\n}\n\n// ServeHTTP dispatches the handler registered in the matched route.\n//\n// When there is a match, the route variables can be retrieved calling\n// mux.Vars(request).\nfunc (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {\n\tif !r.skipClean {\n\t\tpath := req.URL.Path\n\t\tif r.useEncodedPath {\n\t\t\tpath = req.URL.EscapedPath()\n\t\t}\n\t\t// Clean path to canonical form and redirect.\n\t\tif p := cleanPath(path); p != path {\n\n\t\t\t// Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query.\n\t\t\t// This matches with fix in go 1.2 r.c. 4 for same problem.  Go Issue:\n\t\t\t// http://code.google.com/p/go/issues/detail?id=5252\n\t\t\turl := *req.URL\n\t\t\turl.Path = p\n\t\t\tp = url.String()\n\n\t\t\tw.Header().Set(\"Location\", p)\n\t\t\tw.WriteHeader(http.StatusMovedPermanently)\n\t\t\treturn\n\t\t}\n\t}\n\tvar match RouteMatch\n\tvar handler http.Handler\n\tif r.Match(req, &match) {\n\t\thandler = match.Handler\n\t\treq = requestWithVars(req, match.Vars)\n\t\treq = requestWithRoute(req, match.Route)\n\t}\n\n\tif handler == nil && match.MatchErr == ErrMethodMismatch {\n\t\thandler = methodNotAllowedHandler()\n\t}\n\n\tif handler == nil {\n\t\thandler = http.NotFoundHandler()\n\t}\n\n\thandler.ServeHTTP(w, req)\n}\n\n// Get returns a route registered with the given name.\nfunc (r *Router) Get(name string) *Route {\n\treturn r.namedRoutes[name]\n}\n\n// GetRoute returns a route registered with the given name. This method\n// was renamed to Get() and remains here for backwards compatibility.\nfunc (r *Router) GetRoute(name string) *Route {\n\treturn r.namedRoutes[name]\n}\n\n// StrictSlash defines the trailing slash behavior for new routes. The initial\n// value is false.\n//\n// When true, if the route path is \"/path/\", accessing \"/path\" will perform a redirect\n// to the former and vice versa. In other words, your application will always\n// see the path as specified in the route.\n//\n// When false, if the route path is \"/path\", accessing \"/path/\" will not match\n// this route and vice versa.\n//\n// The re-direct is a HTTP 301 (Moved Permanently). Note that when this is set for\n// routes with a non-idempotent method (e.g. POST, PUT), the subsequent re-directed\n// request will be made as a GET by most clients. Use middleware or client settings\n// to modify this behaviour as needed.\n//\n// Special case: when a route sets a path prefix using the PathPrefix() method,\n// strict slash is ignored for that route because the redirect behavior can't\n// be determined from a prefix alone. However, any subrouters created from that\n// route inherit the original StrictSlash setting.\nfunc (r *Router) StrictSlash(value bool) *Router {\n\tr.strictSlash = value\n\treturn r\n}\n\n// SkipClean defines the path cleaning behaviour for new routes. The initial\n// value is false. Users should be careful about which routes are not cleaned\n//\n// When true, if the route path is \"/path//to\", it will remain with the double\n// slash. This is helpful if you have a route like: /fetch/http://xkcd.com/534/\n//\n// When false, the path will be cleaned, so /fetch/http://xkcd.com/534/ will\n// become /fetch/http/xkcd.com/534\nfunc (r *Router) SkipClean(value bool) *Router {\n\tr.skipClean = value\n\treturn r\n}\n\n// UseEncodedPath tells the router to match the encoded original path\n// to the routes.\n// For eg. \"/path/foo%2Fbar/to\" will match the path \"/path/{var}/to\".\n//\n// If not called, the router will match the unencoded path to the routes.\n// For eg. \"/path/foo%2Fbar/to\" will match the path \"/path/foo/bar/to\"\nfunc (r *Router) UseEncodedPath() *Router {\n\tr.useEncodedPath = true\n\treturn r\n}\n\n// ----------------------------------------------------------------------------\n// Route factories\n// ----------------------------------------------------------------------------\n\n// NewRoute registers an empty route.\nfunc (r *Router) NewRoute() *Route {\n\t// initialize a route with a copy of the parent router's configuration\n\troute := &Route{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes}\n\tr.routes = append(r.routes, route)\n\treturn route\n}\n\n// Name registers a new route with a name.\n// See Route.Name().\nfunc (r *Router) Name(name string) *Route {\n\treturn r.NewRoute().Name(name)\n}\n\n// Handle registers a new route with a matcher for the URL path.\n// See Route.Path() and Route.Handler().\nfunc (r *Router) Handle(path string, handler http.Handler) *Route {\n\treturn r.NewRoute().Path(path).Handler(handler)\n}\n\n// HandleFunc registers a new route with a matcher for the URL path.\n// See Route.Path() and Route.HandlerFunc().\nfunc (r *Router) HandleFunc(path string, f func(http.ResponseWriter,\n\t*http.Request)) *Route {\n\treturn r.NewRoute().Path(path).HandlerFunc(f)\n}\n\n// Headers registers a new route with a matcher for request header values.\n// See Route.Headers().\nfunc (r *Router) Headers(pairs ...string) *Route {\n\treturn r.NewRoute().Headers(pairs...)\n}\n\n// Host registers a new route with a matcher for the URL host.\n// See Route.Host().\nfunc (r *Router) Host(tpl string) *Route {\n\treturn r.NewRoute().Host(tpl)\n}\n\n// MatcherFunc registers a new route with a custom matcher function.\n// See Route.MatcherFunc().\nfunc (r *Router) MatcherFunc(f MatcherFunc) *Route {\n\treturn r.NewRoute().MatcherFunc(f)\n}\n\n// Methods registers a new route with a matcher for HTTP methods.\n// See Route.Methods().\nfunc (r *Router) Methods(methods ...string) *Route {\n\treturn r.NewRoute().Methods(methods...)\n}\n\n// Path registers a new route with a matcher for the URL path.\n// See Route.Path().\nfunc (r *Router) Path(tpl string) *Route {\n\treturn r.NewRoute().Path(tpl)\n}\n\n// PathPrefix registers a new route with a matcher for the URL path prefix.\n// See Route.PathPrefix().\nfunc (r *Router) PathPrefix(tpl string) *Route {\n\treturn r.NewRoute().PathPrefix(tpl)\n}\n\n// Queries registers a new route with a matcher for URL query values.\n// See Route.Queries().\nfunc (r *Router) Queries(pairs ...string) *Route {\n\treturn r.NewRoute().Queries(pairs...)\n}\n\n// Schemes registers a new route with a matcher for URL schemes.\n// See Route.Schemes().\nfunc (r *Router) Schemes(schemes ...string) *Route {\n\treturn r.NewRoute().Schemes(schemes...)\n}\n\n// BuildVarsFunc registers a new route with a custom function for modifying\n// route variables before building a URL.\nfunc (r *Router) BuildVarsFunc(f BuildVarsFunc) *Route {\n\treturn r.NewRoute().BuildVarsFunc(f)\n}\n\n// Walk walks the router and all its sub-routers, calling walkFn for each route\n// in the tree. The routes are walked in the order they were added. Sub-routers\n// are explored depth-first.\nfunc (r *Router) Walk(walkFn WalkFunc) error {\n\treturn r.walk(walkFn, []*Route{})\n}\n\n// SkipRouter is used as a return value from WalkFuncs to indicate that the\n// router that walk is about to descend down to should be skipped.\nvar SkipRouter = errors.New(\"skip this router\")\n\n// WalkFunc is the type of the function called for each route visited by Walk.\n// At every invocation, it is given the current route, and the current router,\n// and a list of ancestor routes that lead to the current route.\ntype WalkFunc func(route *Route, router *Router, ancestors []*Route) error\n\nfunc (r *Router) walk(walkFn WalkFunc, ancestors []*Route) error {\n\tfor _, t := range r.routes {\n\t\terr := walkFn(t, r, ancestors)\n\t\tif err == SkipRouter {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, sr := range t.matchers {\n\t\t\tif h, ok := sr.(*Router); ok {\n\t\t\t\tancestors = append(ancestors, t)\n\t\t\t\terr := h.walk(walkFn, ancestors)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tancestors = ancestors[:len(ancestors)-1]\n\t\t\t}\n\t\t}\n\t\tif h, ok := t.handler.(*Router); ok {\n\t\t\tancestors = append(ancestors, t)\n\t\t\terr := h.walk(walkFn, ancestors)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tancestors = ancestors[:len(ancestors)-1]\n\t\t}\n\t}\n\treturn nil\n}\n\n// ----------------------------------------------------------------------------\n// Context\n// ----------------------------------------------------------------------------\n\n// RouteMatch stores information about a matched route.\ntype RouteMatch struct {\n\tRoute   *Route\n\tHandler http.Handler\n\tVars    map[string]string\n\n\t// MatchErr is set to appropriate matching error\n\t// It is set to ErrMethodMismatch if there is a mismatch in\n\t// the request method and route method\n\tMatchErr error\n}\n\ntype contextKey int\n\nconst (\n\tvarsKey contextKey = iota\n\trouteKey\n)\n\n// Vars returns the route variables for the current request, if any.\nfunc Vars(r *http.Request) map[string]string {\n\tif rv := r.Context().Value(varsKey); rv != nil {\n\t\treturn rv.(map[string]string)\n\t}\n\treturn nil\n}\n\n// CurrentRoute returns the matched route for the current request, if any.\n// This only works when called inside the handler of the matched route\n// because the matched route is stored in the request context which is cleared\n// after the handler returns.\nfunc CurrentRoute(r *http.Request) *Route {\n\tif rv := r.Context().Value(routeKey); rv != nil {\n\t\treturn rv.(*Route)\n\t}\n\treturn nil\n}\n\nfunc requestWithVars(r *http.Request, vars map[string]string) *http.Request {\n\tctx := context.WithValue(r.Context(), varsKey, vars)\n\treturn r.WithContext(ctx)\n}\n\nfunc requestWithRoute(r *http.Request, route *Route) *http.Request {\n\tctx := context.WithValue(r.Context(), routeKey, route)\n\treturn r.WithContext(ctx)\n}\n\n// ----------------------------------------------------------------------------\n// Helpers\n// ----------------------------------------------------------------------------\n\n// cleanPath returns the canonical path for p, eliminating . and .. elements.\n// Borrowed from the net/http package.\nfunc cleanPath(p string) string {\n\tif p == \"\" {\n\t\treturn \"/\"\n\t}\n\tif p[0] != '/' {\n\t\tp = \"/\" + p\n\t}\n\tnp := path.Clean(p)\n\t// path.Clean removes trailing slash except for root;\n\t// put the trailing slash back if necessary.\n\tif p[len(p)-1] == '/' && np != \"/\" {\n\t\tnp += \"/\"\n\t}\n\n\treturn np\n}\n\n// uniqueVars returns an error if two slices contain duplicated strings.\nfunc uniqueVars(s1, s2 []string) error {\n\tfor _, v1 := range s1 {\n\t\tfor _, v2 := range s2 {\n\t\t\tif v1 == v2 {\n\t\t\t\treturn fmt.Errorf(\"mux: duplicated route variable %q\", v2)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// checkPairs returns the count of strings passed in, and an error if\n// the count is not an even number.\nfunc checkPairs(pairs ...string) (int, error) {\n\tlength := len(pairs)\n\tif length%2 != 0 {\n\t\treturn length, fmt.Errorf(\n\t\t\t\"mux: number of parameters must be multiple of 2, got %v\", pairs)\n\t}\n\treturn length, nil\n}\n\n// mapFromPairsToString converts variadic string parameters to a\n// string to string map.\nfunc mapFromPairsToString(pairs ...string) (map[string]string, error) {\n\tlength, err := checkPairs(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tm := make(map[string]string, length/2)\n\tfor i := 0; i < length; i += 2 {\n\t\tm[pairs[i]] = pairs[i+1]\n\t}\n\treturn m, nil\n}\n\n// mapFromPairsToRegex converts variadic string parameters to a\n// string to regex map.\nfunc mapFromPairsToRegex(pairs ...string) (map[string]*regexp.Regexp, error) {\n\tlength, err := checkPairs(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tm := make(map[string]*regexp.Regexp, length/2)\n\tfor i := 0; i < length; i += 2 {\n\t\tregex, err := regexp.Compile(pairs[i+1])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tm[pairs[i]] = regex\n\t}\n\treturn m, nil\n}\n\n// matchInArray returns true if the given string value is in the array.\nfunc matchInArray(arr []string, value string) bool {\n\tfor _, v := range arr {\n\t\tif v == value {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// matchMapWithString returns true if the given key/value pairs exist in a given map.\nfunc matchMapWithString(toCheck map[string]string, toMatch map[string][]string, canonicalKey bool) bool {\n\tfor k, v := range toCheck {\n\t\t// Check if key exists.\n\t\tif canonicalKey {\n\t\t\tk = http.CanonicalHeaderKey(k)\n\t\t}\n\t\tif values := toMatch[k]; values == nil {\n\t\t\treturn false\n\t\t} else if v != \"\" {\n\t\t\t// If value was defined as an empty string we only check that the\n\t\t\t// key exists. Otherwise we also check for equality.\n\t\t\tvalueExists := false\n\t\t\tfor _, value := range values {\n\t\t\t\tif v == value {\n\t\t\t\t\tvalueExists = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !valueExists {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\n// matchMapWithRegex returns true if the given key/value pairs exist in a given map compiled against\n// the given regex\nfunc matchMapWithRegex(toCheck map[string]*regexp.Regexp, toMatch map[string][]string, canonicalKey bool) bool {\n\tfor k, v := range toCheck {\n\t\t// Check if key exists.\n\t\tif canonicalKey {\n\t\t\tk = http.CanonicalHeaderKey(k)\n\t\t}\n\t\tif values := toMatch[k]; values == nil {\n\t\t\treturn false\n\t\t} else if v != nil {\n\t\t\t// If value was defined as an empty string we only check that the\n\t\t\t// key exists. Otherwise we also check for equality.\n\t\t\tvalueExists := false\n\t\t\tfor _, value := range values {\n\t\t\t\tif v.MatchString(value) {\n\t\t\t\t\tvalueExists = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !valueExists {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\n// methodNotAllowed replies to the request with an HTTP status code 405.\nfunc methodNotAllowed(w http.ResponseWriter, r *http.Request) {\n\tw.WriteHeader(http.StatusMethodNotAllowed)\n}\n\n// methodNotAllowedHandler returns a simple request handler\n// that replies to each request with a status code 405.\nfunc methodNotAllowedHandler() http.Handler { return http.HandlerFunc(methodNotAllowed) }\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/regexp.go",
    "content": "// Copyright 2012 The Gorilla Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage mux\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\ntype routeRegexpOptions struct {\n\tstrictSlash    bool\n\tuseEncodedPath bool\n}\n\ntype regexpType int\n\nconst (\n\tregexpTypePath regexpType = iota\n\tregexpTypeHost\n\tregexpTypePrefix\n\tregexpTypeQuery\n)\n\n// newRouteRegexp parses a route template and returns a routeRegexp,\n// used to match a host, a path or a query string.\n//\n// It will extract named variables, assemble a regexp to be matched, create\n// a \"reverse\" template to build URLs and compile regexps to validate variable\n// values used in URL building.\n//\n// Previously we accepted only Python-like identifiers for variable\n// names ([a-zA-Z_][a-zA-Z0-9_]*), but currently the only restriction is that\n// name and pattern can't be empty, and names can't contain a colon.\nfunc newRouteRegexp(tpl string, typ regexpType, options routeRegexpOptions) (*routeRegexp, error) {\n\t// Check if it is well-formed.\n\tidxs, errBraces := braceIndices(tpl)\n\tif errBraces != nil {\n\t\treturn nil, errBraces\n\t}\n\t// Backup the original.\n\ttemplate := tpl\n\t// Now let's parse it.\n\tdefaultPattern := \"[^/]+\"\n\tif typ == regexpTypeQuery {\n\t\tdefaultPattern = \".*\"\n\t} else if typ == regexpTypeHost {\n\t\tdefaultPattern = \"[^.]+\"\n\t}\n\t// Only match strict slash if not matching\n\tif typ != regexpTypePath {\n\t\toptions.strictSlash = false\n\t}\n\t// Set a flag for strictSlash.\n\tendSlash := false\n\tif options.strictSlash && strings.HasSuffix(tpl, \"/\") {\n\t\ttpl = tpl[:len(tpl)-1]\n\t\tendSlash = true\n\t}\n\tvarsN := make([]string, len(idxs)/2)\n\tvarsR := make([]*regexp.Regexp, len(idxs)/2)\n\tpattern := bytes.NewBufferString(\"\")\n\tpattern.WriteByte('^')\n\treverse := bytes.NewBufferString(\"\")\n\tvar end int\n\tvar err error\n\tfor i := 0; i < len(idxs); i += 2 {\n\t\t// Set all values we are interested in.\n\t\traw := tpl[end:idxs[i]]\n\t\tend = idxs[i+1]\n\t\tparts := strings.SplitN(tpl[idxs[i]+1:end-1], \":\", 2)\n\t\tname := parts[0]\n\t\tpatt := defaultPattern\n\t\tif len(parts) == 2 {\n\t\t\tpatt = parts[1]\n\t\t}\n\t\t// Name or pattern can't be empty.\n\t\tif name == \"\" || patt == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"mux: missing name or pattern in %q\",\n\t\t\t\ttpl[idxs[i]:end])\n\t\t}\n\t\t// Build the regexp pattern.\n\t\tfmt.Fprintf(pattern, \"%s(?P<%s>%s)\", regexp.QuoteMeta(raw), varGroupName(i/2), patt)\n\n\t\t// Build the reverse template.\n\t\tfmt.Fprintf(reverse, \"%s%%s\", raw)\n\n\t\t// Append variable name and compiled pattern.\n\t\tvarsN[i/2] = name\n\t\tvarsR[i/2], err = regexp.Compile(fmt.Sprintf(\"^%s$\", patt))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// Add the remaining.\n\traw := tpl[end:]\n\tpattern.WriteString(regexp.QuoteMeta(raw))\n\tif options.strictSlash {\n\t\tpattern.WriteString(\"[/]?\")\n\t}\n\tif typ == regexpTypeQuery {\n\t\t// Add the default pattern if the query value is empty\n\t\tif queryVal := strings.SplitN(template, \"=\", 2)[1]; queryVal == \"\" {\n\t\t\tpattern.WriteString(defaultPattern)\n\t\t}\n\t}\n\tif typ != regexpTypePrefix {\n\t\tpattern.WriteByte('$')\n\t}\n\n\tvar wildcardHostPort bool\n\tif typ == regexpTypeHost {\n\t\tif !strings.Contains(pattern.String(), \":\") {\n\t\t\twildcardHostPort = true\n\t\t}\n\t}\n\treverse.WriteString(raw)\n\tif endSlash {\n\t\treverse.WriteByte('/')\n\t}\n\t// Compile full regexp.\n\treg, errCompile := regexp.Compile(pattern.String())\n\tif errCompile != nil {\n\t\treturn nil, errCompile\n\t}\n\n\t// Check for capturing groups which used to work in older versions\n\tif reg.NumSubexp() != len(idxs)/2 {\n\t\tpanic(fmt.Sprintf(\"route %s contains capture groups in its regexp. \", template) +\n\t\t\t\"Only non-capturing groups are accepted: e.g. (?:pattern) instead of (pattern)\")\n\t}\n\n\t// Done!\n\treturn &routeRegexp{\n\t\ttemplate:         template,\n\t\tregexpType:       typ,\n\t\toptions:          options,\n\t\tregexp:           reg,\n\t\treverse:          reverse.String(),\n\t\tvarsN:            varsN,\n\t\tvarsR:            varsR,\n\t\twildcardHostPort: wildcardHostPort,\n\t}, nil\n}\n\n// routeRegexp stores a regexp to match a host or path and information to\n// collect and validate route variables.\ntype routeRegexp struct {\n\t// The unmodified template.\n\ttemplate string\n\t// The type of match\n\tregexpType regexpType\n\t// Options for matching\n\toptions routeRegexpOptions\n\t// Expanded regexp.\n\tregexp *regexp.Regexp\n\t// Reverse template.\n\treverse string\n\t// Variable names.\n\tvarsN []string\n\t// Variable regexps (validators).\n\tvarsR []*regexp.Regexp\n\t// Wildcard host-port (no strict port match in hostname)\n\twildcardHostPort bool\n}\n\n// Match matches the regexp against the URL host or path.\nfunc (r *routeRegexp) Match(req *http.Request, match *RouteMatch) bool {\n\tif r.regexpType == regexpTypeHost {\n\t\thost := getHost(req)\n\t\tif r.wildcardHostPort {\n\t\t\t// Don't be strict on the port match\n\t\t\tif i := strings.Index(host, \":\"); i != -1 {\n\t\t\t\thost = host[:i]\n\t\t\t}\n\t\t}\n\t\treturn r.regexp.MatchString(host)\n\t}\n\n\tif r.regexpType == regexpTypeQuery {\n\t\treturn r.matchQueryString(req)\n\t}\n\tpath := req.URL.Path\n\tif r.options.useEncodedPath {\n\t\tpath = req.URL.EscapedPath()\n\t}\n\treturn r.regexp.MatchString(path)\n}\n\n// url builds a URL part using the given values.\nfunc (r *routeRegexp) url(values map[string]string) (string, error) {\n\turlValues := make([]interface{}, len(r.varsN))\n\tfor k, v := range r.varsN {\n\t\tvalue, ok := values[v]\n\t\tif !ok {\n\t\t\treturn \"\", fmt.Errorf(\"mux: missing route variable %q\", v)\n\t\t}\n\t\tif r.regexpType == regexpTypeQuery {\n\t\t\tvalue = url.QueryEscape(value)\n\t\t}\n\t\turlValues[k] = value\n\t}\n\trv := fmt.Sprintf(r.reverse, urlValues...)\n\tif !r.regexp.MatchString(rv) {\n\t\t// The URL is checked against the full regexp, instead of checking\n\t\t// individual variables. This is faster but to provide a good error\n\t\t// message, we check individual regexps if the URL doesn't match.\n\t\tfor k, v := range r.varsN {\n\t\t\tif !r.varsR[k].MatchString(values[v]) {\n\t\t\t\treturn \"\", fmt.Errorf(\n\t\t\t\t\t\"mux: variable %q doesn't match, expected %q\", values[v],\n\t\t\t\t\tr.varsR[k].String())\n\t\t\t}\n\t\t}\n\t}\n\treturn rv, nil\n}\n\n// getURLQuery returns a single query parameter from a request URL.\n// For a URL with foo=bar&baz=ding, we return only the relevant key\n// value pair for the routeRegexp.\nfunc (r *routeRegexp) getURLQuery(req *http.Request) string {\n\tif r.regexpType != regexpTypeQuery {\n\t\treturn \"\"\n\t}\n\ttemplateKey := strings.SplitN(r.template, \"=\", 2)[0]\n\tval, ok := findFirstQueryKey(req.URL.RawQuery, templateKey)\n\tif ok {\n\t\treturn templateKey + \"=\" + val\n\t}\n\treturn \"\"\n}\n\n// findFirstQueryKey returns the same result as (*url.URL).Query()[key][0].\n// If key was not found, empty string and false is returned.\nfunc findFirstQueryKey(rawQuery, key string) (value string, ok bool) {\n\tquery := []byte(rawQuery)\n\tfor len(query) > 0 {\n\t\tfoundKey := query\n\t\tif i := bytes.IndexAny(foundKey, \"&;\"); i >= 0 {\n\t\t\tfoundKey, query = foundKey[:i], foundKey[i+1:]\n\t\t} else {\n\t\t\tquery = query[:0]\n\t\t}\n\t\tif len(foundKey) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tvar value []byte\n\t\tif i := bytes.IndexByte(foundKey, '='); i >= 0 {\n\t\t\tfoundKey, value = foundKey[:i], foundKey[i+1:]\n\t\t}\n\t\tif len(foundKey) < len(key) {\n\t\t\t// Cannot possibly be key.\n\t\t\tcontinue\n\t\t}\n\t\tkeyString, err := url.QueryUnescape(string(foundKey))\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tif keyString != key {\n\t\t\tcontinue\n\t\t}\n\t\tvalueString, err := url.QueryUnescape(string(value))\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn valueString, true\n\t}\n\treturn \"\", false\n}\n\nfunc (r *routeRegexp) matchQueryString(req *http.Request) bool {\n\treturn r.regexp.MatchString(r.getURLQuery(req))\n}\n\n// braceIndices returns the first level curly brace indices from a string.\n// It returns an error in case of unbalanced braces.\nfunc braceIndices(s string) ([]int, error) {\n\tvar level, idx int\n\tvar idxs []int\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch s[i] {\n\t\tcase '{':\n\t\t\tif level++; level == 1 {\n\t\t\t\tidx = i\n\t\t\t}\n\t\tcase '}':\n\t\t\tif level--; level == 0 {\n\t\t\t\tidxs = append(idxs, idx, i+1)\n\t\t\t} else if level < 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"mux: unbalanced braces in %q\", s)\n\t\t\t}\n\t\t}\n\t}\n\tif level != 0 {\n\t\treturn nil, fmt.Errorf(\"mux: unbalanced braces in %q\", s)\n\t}\n\treturn idxs, nil\n}\n\n// varGroupName builds a capturing group name for the indexed variable.\nfunc varGroupName(idx int) string {\n\treturn \"v\" + strconv.Itoa(idx)\n}\n\n// ----------------------------------------------------------------------------\n// routeRegexpGroup\n// ----------------------------------------------------------------------------\n\n// routeRegexpGroup groups the route matchers that carry variables.\ntype routeRegexpGroup struct {\n\thost    *routeRegexp\n\tpath    *routeRegexp\n\tqueries []*routeRegexp\n}\n\n// setMatch extracts the variables from the URL once a route matches.\nfunc (v routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) {\n\t// Store host variables.\n\tif v.host != nil {\n\t\thost := getHost(req)\n\t\tif v.host.wildcardHostPort {\n\t\t\t// Don't be strict on the port match\n\t\t\tif i := strings.Index(host, \":\"); i != -1 {\n\t\t\t\thost = host[:i]\n\t\t\t}\n\t\t}\n\t\tmatches := v.host.regexp.FindStringSubmatchIndex(host)\n\t\tif len(matches) > 0 {\n\t\t\textractVars(host, matches, v.host.varsN, m.Vars)\n\t\t}\n\t}\n\tpath := req.URL.Path\n\tif r.useEncodedPath {\n\t\tpath = req.URL.EscapedPath()\n\t}\n\t// Store path variables.\n\tif v.path != nil {\n\t\tmatches := v.path.regexp.FindStringSubmatchIndex(path)\n\t\tif len(matches) > 0 {\n\t\t\textractVars(path, matches, v.path.varsN, m.Vars)\n\t\t\t// Check if we should redirect.\n\t\t\tif v.path.options.strictSlash {\n\t\t\t\tp1 := strings.HasSuffix(path, \"/\")\n\t\t\t\tp2 := strings.HasSuffix(v.path.template, \"/\")\n\t\t\t\tif p1 != p2 {\n\t\t\t\t\tu, _ := url.Parse(req.URL.String())\n\t\t\t\t\tif p1 {\n\t\t\t\t\t\tu.Path = u.Path[:len(u.Path)-1]\n\t\t\t\t\t} else {\n\t\t\t\t\t\tu.Path += \"/\"\n\t\t\t\t\t}\n\t\t\t\t\tm.Handler = http.RedirectHandler(u.String(), http.StatusMovedPermanently)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Store query string variables.\n\tfor _, q := range v.queries {\n\t\tqueryURL := q.getURLQuery(req)\n\t\tmatches := q.regexp.FindStringSubmatchIndex(queryURL)\n\t\tif len(matches) > 0 {\n\t\t\textractVars(queryURL, matches, q.varsN, m.Vars)\n\t\t}\n\t}\n}\n\n// getHost tries its best to return the request host.\n// According to section 14.23 of RFC 2616 the Host header\n// can include the port number if the default value of 80 is not used.\nfunc getHost(r *http.Request) string {\n\tif r.URL.IsAbs() {\n\t\treturn r.URL.Host\n\t}\n\treturn r.Host\n}\n\nfunc extractVars(input string, matches []int, names []string, output map[string]string) {\n\tfor i, name := range names {\n\t\toutput[name] = input[matches[2*i+2]:matches[2*i+3]]\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/route.go",
    "content": "// Copyright 2012 The Gorilla Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage mux\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Route stores information to match a request and build URLs.\ntype Route struct {\n\t// Request handler for the route.\n\thandler http.Handler\n\t// If true, this route never matches: it is only used to build URLs.\n\tbuildOnly bool\n\t// The name used to build URLs.\n\tname string\n\t// Error resulted from building a route.\n\terr error\n\n\t// \"global\" reference to all named routes\n\tnamedRoutes map[string]*Route\n\n\t// config possibly passed in from `Router`\n\trouteConf\n}\n\n// SkipClean reports whether path cleaning is enabled for this route via\n// Router.SkipClean.\nfunc (r *Route) SkipClean() bool {\n\treturn r.skipClean\n}\n\n// Match matches the route against the request.\nfunc (r *Route) Match(req *http.Request, match *RouteMatch) bool {\n\tif r.buildOnly || r.err != nil {\n\t\treturn false\n\t}\n\n\tvar matchErr error\n\n\t// Match everything.\n\tfor _, m := range r.matchers {\n\t\tif matched := m.Match(req, match); !matched {\n\t\t\tif _, ok := m.(methodMatcher); ok {\n\t\t\t\tmatchErr = ErrMethodMismatch\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Ignore ErrNotFound errors. These errors arise from match call\n\t\t\t// to Subrouters.\n\t\t\t//\n\t\t\t// This prevents subsequent matching subrouters from failing to\n\t\t\t// run middleware. If not ignored, the middleware would see a\n\t\t\t// non-nil MatchErr and be skipped, even when there was a\n\t\t\t// matching route.\n\t\t\tif match.MatchErr == ErrNotFound {\n\t\t\t\tmatch.MatchErr = nil\n\t\t\t}\n\n\t\t\tmatchErr = nil // nolint:ineffassign\n\t\t\treturn false\n\t\t} else {\n\t\t\t// Multiple routes may share the same path but use different HTTP methods. For instance:\n\t\t\t// Route 1: POST \"/users/{id}\".\n\t\t\t// Route 2: GET \"/users/{id}\", parameters: \"id\": \"[0-9]+\".\n\t\t\t//\n\t\t\t// The router must handle these cases correctly. For a GET request to \"/users/abc\" with \"id\" as \"-2\",\n\t\t\t// The router should return a \"Not Found\" error as no route fully matches this request.\n\t\t\tif match.MatchErr == ErrMethodMismatch {\n\t\t\t\tmatch.MatchErr = nil\n\t\t\t}\n\t\t}\n\t}\n\n\tif matchErr != nil {\n\t\tmatch.MatchErr = matchErr\n\t\treturn false\n\t}\n\n\tif match.MatchErr == ErrMethodMismatch && r.handler != nil {\n\t\t// We found a route which matches request method, clear MatchErr\n\t\tmatch.MatchErr = nil\n\t\t// Then override the mis-matched handler\n\t\tmatch.Handler = r.handler\n\t}\n\n\t// Yay, we have a match. Let's collect some info about it.\n\tif match.Route == nil {\n\t\tmatch.Route = r\n\t}\n\tif match.Handler == nil {\n\t\tmatch.Handler = r.handler\n\t}\n\tif match.Vars == nil {\n\t\tmatch.Vars = make(map[string]string)\n\t}\n\n\t// Set variables.\n\tr.regexp.setMatch(req, match, r)\n\treturn true\n}\n\n// ----------------------------------------------------------------------------\n// Route attributes\n// ----------------------------------------------------------------------------\n\n// GetError returns an error resulted from building the route, if any.\nfunc (r *Route) GetError() error {\n\treturn r.err\n}\n\n// BuildOnly sets the route to never match: it is only used to build URLs.\nfunc (r *Route) BuildOnly() *Route {\n\tr.buildOnly = true\n\treturn r\n}\n\n// Handler --------------------------------------------------------------------\n\n// Handler sets a handler for the route.\nfunc (r *Route) Handler(handler http.Handler) *Route {\n\tif r.err == nil {\n\t\tr.handler = handler\n\t}\n\treturn r\n}\n\n// HandlerFunc sets a handler function for the route.\nfunc (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route {\n\treturn r.Handler(http.HandlerFunc(f))\n}\n\n// GetHandler returns the handler for the route, if any.\nfunc (r *Route) GetHandler() http.Handler {\n\treturn r.handler\n}\n\n// Name -----------------------------------------------------------------------\n\n// Name sets the name for the route, used to build URLs.\n// It is an error to call Name more than once on a route.\nfunc (r *Route) Name(name string) *Route {\n\tif r.name != \"\" {\n\t\tr.err = fmt.Errorf(\"mux: route already has name %q, can't set %q\",\n\t\t\tr.name, name)\n\t}\n\tif r.err == nil {\n\t\tr.name = name\n\t\tr.namedRoutes[name] = r\n\t}\n\treturn r\n}\n\n// GetName returns the name for the route, if any.\nfunc (r *Route) GetName() string {\n\treturn r.name\n}\n\n// ----------------------------------------------------------------------------\n// Matchers\n// ----------------------------------------------------------------------------\n\n// matcher types try to match a request.\ntype matcher interface {\n\tMatch(*http.Request, *RouteMatch) bool\n}\n\n// addMatcher adds a matcher to the route.\nfunc (r *Route) addMatcher(m matcher) *Route {\n\tif r.err == nil {\n\t\tr.matchers = append(r.matchers, m)\n\t}\n\treturn r\n}\n\n// addRegexpMatcher adds a host or path matcher and builder to a route.\nfunc (r *Route) addRegexpMatcher(tpl string, typ regexpType) error {\n\tif r.err != nil {\n\t\treturn r.err\n\t}\n\tif typ == regexpTypePath || typ == regexpTypePrefix {\n\t\tif len(tpl) > 0 && tpl[0] != '/' {\n\t\t\treturn fmt.Errorf(\"mux: path must start with a slash, got %q\", tpl)\n\t\t}\n\t\tif r.regexp.path != nil {\n\t\t\ttpl = strings.TrimRight(r.regexp.path.template, \"/\") + tpl\n\t\t}\n\t}\n\trr, err := newRouteRegexp(tpl, typ, routeRegexpOptions{\n\t\tstrictSlash:    r.strictSlash,\n\t\tuseEncodedPath: r.useEncodedPath,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, q := range r.regexp.queries {\n\t\tif err = uniqueVars(rr.varsN, q.varsN); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif typ == regexpTypeHost {\n\t\tif r.regexp.path != nil {\n\t\t\tif err = uniqueVars(rr.varsN, r.regexp.path.varsN); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tr.regexp.host = rr\n\t} else {\n\t\tif r.regexp.host != nil {\n\t\t\tif err = uniqueVars(rr.varsN, r.regexp.host.varsN); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif typ == regexpTypeQuery {\n\t\t\tr.regexp.queries = append(r.regexp.queries, rr)\n\t\t} else {\n\t\t\tr.regexp.path = rr\n\t\t}\n\t}\n\tr.addMatcher(rr)\n\treturn nil\n}\n\n// Headers --------------------------------------------------------------------\n\n// headerMatcher matches the request against header values.\ntype headerMatcher map[string]string\n\nfunc (m headerMatcher) Match(r *http.Request, match *RouteMatch) bool {\n\treturn matchMapWithString(m, r.Header, true)\n}\n\n// Headers adds a matcher for request header values.\n// It accepts a sequence of key/value pairs to be matched. For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\tr.Headers(\"Content-Type\", \"application/json\",\n//\t          \"X-Requested-With\", \"XMLHttpRequest\")\n//\n// The above route will only match if both request header values match.\n// If the value is an empty string, it will match any value if the key is set.\nfunc (r *Route) Headers(pairs ...string) *Route {\n\tif r.err == nil {\n\t\tvar headers map[string]string\n\t\theaders, r.err = mapFromPairsToString(pairs...)\n\t\treturn r.addMatcher(headerMatcher(headers))\n\t}\n\treturn r\n}\n\n// headerRegexMatcher matches the request against the route given a regex for the header\ntype headerRegexMatcher map[string]*regexp.Regexp\n\nfunc (m headerRegexMatcher) Match(r *http.Request, match *RouteMatch) bool {\n\treturn matchMapWithRegex(m, r.Header, true)\n}\n\n// HeadersRegexp accepts a sequence of key/value pairs, where the value has regex\n// support. For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\tr.HeadersRegexp(\"Content-Type\", \"application/(text|json)\",\n//\t          \"X-Requested-With\", \"XMLHttpRequest\")\n//\n// The above route will only match if both the request header matches both regular expressions.\n// If the value is an empty string, it will match any value if the key is set.\n// Use the start and end of string anchors (^ and $) to match an exact value.\nfunc (r *Route) HeadersRegexp(pairs ...string) *Route {\n\tif r.err == nil {\n\t\tvar headers map[string]*regexp.Regexp\n\t\theaders, r.err = mapFromPairsToRegex(pairs...)\n\t\treturn r.addMatcher(headerRegexMatcher(headers))\n\t}\n\treturn r\n}\n\n// Host -----------------------------------------------------------------------\n\n// Host adds a matcher for the URL host.\n// It accepts a template with zero or more URL variables enclosed by {}.\n// Variables can define an optional regexp pattern to be matched:\n//\n// - {name} matches anything until the next dot.\n//\n// - {name:pattern} matches the given regexp pattern.\n//\n// For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\tr.Host(\"www.example.com\")\n//\tr.Host(\"{subdomain}.domain.com\")\n//\tr.Host(\"{subdomain:[a-z]+}.domain.com\")\n//\n// Variable names must be unique in a given route. They can be retrieved\n// calling mux.Vars(request).\nfunc (r *Route) Host(tpl string) *Route {\n\tr.err = r.addRegexpMatcher(tpl, regexpTypeHost)\n\treturn r\n}\n\n// MatcherFunc ----------------------------------------------------------------\n\n// MatcherFunc is the function signature used by custom matchers.\ntype MatcherFunc func(*http.Request, *RouteMatch) bool\n\n// Match returns the match for a given request.\nfunc (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool {\n\treturn m(r, match)\n}\n\n// MatcherFunc adds a custom function to be used as request matcher.\nfunc (r *Route) MatcherFunc(f MatcherFunc) *Route {\n\treturn r.addMatcher(f)\n}\n\n// Methods --------------------------------------------------------------------\n\n// methodMatcher matches the request against HTTP methods.\ntype methodMatcher []string\n\nfunc (m methodMatcher) Match(r *http.Request, match *RouteMatch) bool {\n\treturn matchInArray(m, r.Method)\n}\n\n// Methods adds a matcher for HTTP methods.\n// It accepts a sequence of one or more methods to be matched, e.g.:\n// \"GET\", \"POST\", \"PUT\".\nfunc (r *Route) Methods(methods ...string) *Route {\n\tfor k, v := range methods {\n\t\tmethods[k] = strings.ToUpper(v)\n\t}\n\treturn r.addMatcher(methodMatcher(methods))\n}\n\n// Path -----------------------------------------------------------------------\n\n// Path adds a matcher for the URL path.\n// It accepts a template with zero or more URL variables enclosed by {}. The\n// template must start with a \"/\".\n// Variables can define an optional regexp pattern to be matched:\n//\n// - {name} matches anything until the next slash.\n//\n// - {name:pattern} matches the given regexp pattern.\n//\n// For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\tr.Path(\"/products/\").Handler(ProductsHandler)\n//\tr.Path(\"/products/{key}\").Handler(ProductsHandler)\n//\tr.Path(\"/articles/{category}/{id:[0-9]+}\").\n//\t  Handler(ArticleHandler)\n//\n// Variable names must be unique in a given route. They can be retrieved\n// calling mux.Vars(request).\nfunc (r *Route) Path(tpl string) *Route {\n\tr.err = r.addRegexpMatcher(tpl, regexpTypePath)\n\treturn r\n}\n\n// PathPrefix -----------------------------------------------------------------\n\n// PathPrefix adds a matcher for the URL path prefix. This matches if the given\n// template is a prefix of the full URL path. See Route.Path() for details on\n// the tpl argument.\n//\n// Note that it does not treat slashes specially (\"/foobar/\" will be matched by\n// the prefix \"/foo\") so you may want to use a trailing slash here.\n//\n// Also note that the setting of Router.StrictSlash() has no effect on routes\n// with a PathPrefix matcher.\nfunc (r *Route) PathPrefix(tpl string) *Route {\n\tr.err = r.addRegexpMatcher(tpl, regexpTypePrefix)\n\treturn r\n}\n\n// Query ----------------------------------------------------------------------\n\n// Queries adds a matcher for URL query values.\n// It accepts a sequence of key/value pairs. Values may define variables.\n// For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\tr.Queries(\"foo\", \"bar\", \"id\", \"{id:[0-9]+}\")\n//\n// The above route will only match if the URL contains the defined queries\n// values, e.g.: ?foo=bar&id=42.\n//\n// If the value is an empty string, it will match any value if the key is set.\n//\n// Variables can define an optional regexp pattern to be matched:\n//\n// - {name} matches anything until the next slash.\n//\n// - {name:pattern} matches the given regexp pattern.\nfunc (r *Route) Queries(pairs ...string) *Route {\n\tlength := len(pairs)\n\tif length%2 != 0 {\n\t\tr.err = fmt.Errorf(\n\t\t\t\"mux: number of parameters must be multiple of 2, got %v\", pairs)\n\t\treturn nil\n\t}\n\tfor i := 0; i < length; i += 2 {\n\t\tif r.err = r.addRegexpMatcher(pairs[i]+\"=\"+pairs[i+1], regexpTypeQuery); r.err != nil {\n\t\t\treturn r\n\t\t}\n\t}\n\n\treturn r\n}\n\n// Schemes --------------------------------------------------------------------\n\n// schemeMatcher matches the request against URL schemes.\ntype schemeMatcher []string\n\nfunc (m schemeMatcher) Match(r *http.Request, match *RouteMatch) bool {\n\tscheme := r.URL.Scheme\n\t// https://golang.org/pkg/net/http/#Request\n\t// \"For [most] server requests, fields other than Path and RawQuery will be\n\t// empty.\"\n\t// Since we're an http muxer, the scheme is either going to be http or https\n\t// though, so we can just set it based on the tls termination state.\n\tif scheme == \"\" {\n\t\tif r.TLS == nil {\n\t\t\tscheme = \"http\"\n\t\t} else {\n\t\t\tscheme = \"https\"\n\t\t}\n\t}\n\treturn matchInArray(m, scheme)\n}\n\n// Schemes adds a matcher for URL schemes.\n// It accepts a sequence of schemes to be matched, e.g.: \"http\", \"https\".\n// If the request's URL has a scheme set, it will be matched against.\n// Generally, the URL scheme will only be set if a previous handler set it,\n// such as the ProxyHeaders handler from gorilla/handlers.\n// If unset, the scheme will be determined based on the request's TLS\n// termination state.\n// The first argument to Schemes will be used when constructing a route URL.\nfunc (r *Route) Schemes(schemes ...string) *Route {\n\tfor k, v := range schemes {\n\t\tschemes[k] = strings.ToLower(v)\n\t}\n\tif len(schemes) > 0 {\n\t\tr.buildScheme = schemes[0]\n\t}\n\treturn r.addMatcher(schemeMatcher(schemes))\n}\n\n// BuildVarsFunc --------------------------------------------------------------\n\n// BuildVarsFunc is the function signature used by custom build variable\n// functions (which can modify route variables before a route's URL is built).\ntype BuildVarsFunc func(map[string]string) map[string]string\n\n// BuildVarsFunc adds a custom function to be used to modify build variables\n// before a route's URL is built.\nfunc (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route {\n\tif r.buildVarsFunc != nil {\n\t\t// compose the old and new functions\n\t\told := r.buildVarsFunc\n\t\tr.buildVarsFunc = func(m map[string]string) map[string]string {\n\t\t\treturn f(old(m))\n\t\t}\n\t} else {\n\t\tr.buildVarsFunc = f\n\t}\n\treturn r\n}\n\n// Subrouter ------------------------------------------------------------------\n\n// Subrouter creates a subrouter for the route.\n//\n// It will test the inner routes only if the parent route matched. For example:\n//\n//\tr := mux.NewRouter().NewRoute()\n//\ts := r.Host(\"www.example.com\").Subrouter()\n//\ts.HandleFunc(\"/products/\", ProductsHandler)\n//\ts.HandleFunc(\"/products/{key}\", ProductHandler)\n//\ts.HandleFunc(\"/articles/{category}/{id:[0-9]+}\"), ArticleHandler)\n//\n// Here, the routes registered in the subrouter won't be tested if the host\n// doesn't match.\nfunc (r *Route) Subrouter() *Router {\n\t// initialize a subrouter with a copy of the parent route's configuration\n\trouter := &Router{routeConf: copyRouteConf(r.routeConf), namedRoutes: r.namedRoutes}\n\tr.addMatcher(router)\n\treturn router\n}\n\n// ----------------------------------------------------------------------------\n// URL building\n// ----------------------------------------------------------------------------\n\n// URL builds a URL for the route.\n//\n// It accepts a sequence of key/value pairs for the route variables. For\n// example, given this route:\n//\n//\tr := mux.NewRouter()\n//\tr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler).\n//\t  Name(\"article\")\n//\n// ...a URL for it can be built using:\n//\n//\turl, err := r.Get(\"article\").URL(\"category\", \"technology\", \"id\", \"42\")\n//\n// ...which will return an url.URL with the following path:\n//\n//\t\"/articles/technology/42\"\n//\n// This also works for host variables:\n//\n//\tr := mux.NewRouter()\n//\tr.HandleFunc(\"/articles/{category}/{id:[0-9]+}\", ArticleHandler).\n//\t  Host(\"{subdomain}.domain.com\").\n//\t  Name(\"article\")\n//\n//\t// url.String() will be \"http://news.domain.com/articles/technology/42\"\n//\turl, err := r.Get(\"article\").URL(\"subdomain\", \"news\",\n//\t                                 \"category\", \"technology\",\n//\t                                 \"id\", \"42\")\n//\n// The scheme of the resulting url will be the first argument that was passed to Schemes:\n//\n//\t// url.String() will be \"https://example.com\"\n//\tr := mux.NewRouter().NewRoute()\n//\turl, err := r.Host(\"example.com\")\n//\t             .Schemes(\"https\", \"http\").URL()\n//\n// All variables defined in the route are required, and their values must\n// conform to the corresponding patterns.\nfunc (r *Route) URL(pairs ...string) (*url.URL, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tvalues, err := r.prepareVars(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar scheme, host, path string\n\tqueries := make([]string, 0, len(r.regexp.queries))\n\tif r.regexp.host != nil {\n\t\tif host, err = r.regexp.host.url(values); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tscheme = \"http\"\n\t\tif r.buildScheme != \"\" {\n\t\t\tscheme = r.buildScheme\n\t\t}\n\t}\n\tif r.regexp.path != nil {\n\t\tif path, err = r.regexp.path.url(values); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tfor _, q := range r.regexp.queries {\n\t\tvar query string\n\t\tif query, err = q.url(values); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tqueries = append(queries, query)\n\t}\n\treturn &url.URL{\n\t\tScheme:   scheme,\n\t\tHost:     host,\n\t\tPath:     path,\n\t\tRawQuery: strings.Join(queries, \"&\"),\n\t}, nil\n}\n\n// URLHost builds the host part of the URL for a route. See Route.URL().\n//\n// The route must have a host defined.\nfunc (r *Route) URLHost(pairs ...string) (*url.URL, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tif r.regexp.host == nil {\n\t\treturn nil, errors.New(\"mux: route doesn't have a host\")\n\t}\n\tvalues, err := r.prepareVars(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thost, err := r.regexp.host.url(values)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tu := &url.URL{\n\t\tScheme: \"http\",\n\t\tHost:   host,\n\t}\n\tif r.buildScheme != \"\" {\n\t\tu.Scheme = r.buildScheme\n\t}\n\treturn u, nil\n}\n\n// URLPath builds the path part of the URL for a route. See Route.URL().\n//\n// The route must have a path defined.\nfunc (r *Route) URLPath(pairs ...string) (*url.URL, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tif r.regexp.path == nil {\n\t\treturn nil, errors.New(\"mux: route doesn't have a path\")\n\t}\n\tvalues, err := r.prepareVars(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpath, err := r.regexp.path.url(values)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &url.URL{\n\t\tPath: path,\n\t}, nil\n}\n\n// GetPathTemplate returns the template used to build the\n// route match.\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if the route does not define a path.\nfunc (r *Route) GetPathTemplate() (string, error) {\n\tif r.err != nil {\n\t\treturn \"\", r.err\n\t}\n\tif r.regexp.path == nil {\n\t\treturn \"\", errors.New(\"mux: route doesn't have a path\")\n\t}\n\treturn r.regexp.path.template, nil\n}\n\n// GetPathRegexp returns the expanded regular expression used to match route path.\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if the route does not define a path.\nfunc (r *Route) GetPathRegexp() (string, error) {\n\tif r.err != nil {\n\t\treturn \"\", r.err\n\t}\n\tif r.regexp.path == nil {\n\t\treturn \"\", errors.New(\"mux: route does not have a path\")\n\t}\n\treturn r.regexp.path.regexp.String(), nil\n}\n\n// GetQueriesRegexp returns the expanded regular expressions used to match the\n// route queries.\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if the route does not have queries.\nfunc (r *Route) GetQueriesRegexp() ([]string, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tif r.regexp.queries == nil {\n\t\treturn nil, errors.New(\"mux: route doesn't have queries\")\n\t}\n\tqueries := make([]string, 0, len(r.regexp.queries))\n\tfor _, query := range r.regexp.queries {\n\t\tqueries = append(queries, query.regexp.String())\n\t}\n\treturn queries, nil\n}\n\n// GetQueriesTemplates returns the templates used to build the\n// query matching.\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if the route does not define queries.\nfunc (r *Route) GetQueriesTemplates() ([]string, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tif r.regexp.queries == nil {\n\t\treturn nil, errors.New(\"mux: route doesn't have queries\")\n\t}\n\tqueries := make([]string, 0, len(r.regexp.queries))\n\tfor _, query := range r.regexp.queries {\n\t\tqueries = append(queries, query.template)\n\t}\n\treturn queries, nil\n}\n\n// GetMethods returns the methods the route matches against\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if route does not have methods.\nfunc (r *Route) GetMethods() ([]string, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tfor _, m := range r.matchers {\n\t\tif methods, ok := m.(methodMatcher); ok {\n\t\t\treturn []string(methods), nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"mux: route doesn't have methods\")\n}\n\n// GetHostTemplate returns the template used to build the\n// route match.\n// This is useful for building simple REST API documentation and for instrumentation\n// against third-party services.\n// An error will be returned if the route does not define a host.\nfunc (r *Route) GetHostTemplate() (string, error) {\n\tif r.err != nil {\n\t\treturn \"\", r.err\n\t}\n\tif r.regexp.host == nil {\n\t\treturn \"\", errors.New(\"mux: route doesn't have a host\")\n\t}\n\treturn r.regexp.host.template, nil\n}\n\n// GetVarNames returns the names of all variables added by regexp matchers\n// These can be used to know which route variables should be passed into r.URL()\nfunc (r *Route) GetVarNames() ([]string, error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tvar varNames []string\n\tif r.regexp.host != nil {\n\t\tvarNames = append(varNames, r.regexp.host.varsN...)\n\t}\n\tif r.regexp.path != nil {\n\t\tvarNames = append(varNames, r.regexp.path.varsN...)\n\t}\n\tfor _, regx := range r.regexp.queries {\n\t\tvarNames = append(varNames, regx.varsN...)\n\t}\n\treturn varNames, nil\n}\n\n// prepareVars converts the route variable pairs into a map. If the route has a\n// BuildVarsFunc, it is invoked.\nfunc (r *Route) prepareVars(pairs ...string) (map[string]string, error) {\n\tm, err := mapFromPairsToString(pairs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn r.buildVars(m), nil\n}\n\nfunc (r *Route) buildVars(m map[string]string) map[string]string {\n\tif r.buildVarsFunc != nil {\n\t\tm = r.buildVarsFunc(m)\n\t}\n\treturn m\n}\n"
  },
  {
    "path": "vendor/github.com/gorilla/mux/test_helpers.go",
    "content": "// Copyright 2012 The Gorilla Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage mux\n\nimport \"net/http\"\n\n// SetURLVars sets the URL variables for the given request, to be accessed via\n// mux.Vars for testing route behaviour. Arguments are not modified, a shallow\n// copy is returned.\n//\n// This API should only be used for testing purposes; it provides a way to\n// inject variables into the request context. Alternatively, URL variables\n// can be set by making a route that captures the required variables,\n// starting a server and sending the request to that server.\nfunc SetURLVars(r *http.Request, val map[string]string) *http.Request {\n\treturn requestWithVars(r, val)\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-cleanhttp/LICENSE",
    "content": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\n     means each individual or legal entity that creates, contributes to the\n     creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n\n     means the combination of the Contributions of others (if any) used by a\n     Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n\n     means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n\n     means Source Code Form to which the initial Contributor has attached the\n     notice in Exhibit A, the Executable Form of such Source Code Form, and\n     Modifications of such Source Code Form, in each case including portions\n     thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n     means\n\n     a. that the initial Contributor has attached the notice described in\n        Exhibit B to the Covered Software; or\n\n     b. that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the terms of\n        a Secondary License.\n\n1.6. \"Executable Form\"\n\n     means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n\n     means a work that combines Covered Software with other material, in a\n     separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n\n     means this document.\n\n1.9. \"Licensable\"\n\n     means having the right to grant, to the maximum extent possible, whether\n     at the time of the initial grant or subsequently, any and all of the\n     rights conveyed by this License.\n\n1.10. \"Modifications\"\n\n     means any of the following:\n\n     a. any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered Software; or\n\n     b. any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor\n\n      means any patent claim(s), including without limitation, method,\n      process, and apparatus claims, in any patent Licensable by such\n      Contributor that would be infringed, but for the grant of the License,\n      by the making, using, selling, offering for sale, having made, import,\n      or transfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\"\n\n      means either the GNU General Public License, Version 2.0, the GNU Lesser\n      General Public License, Version 2.1, the GNU Affero General Public\n      License, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\"\n\n      means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n\n      means an individual or a legal entity exercising rights under this\n      License. For legal entities, \"You\" includes any entity that controls, is\n      controlled by, or is under common control with You. For purposes of this\n      definition, \"control\" means (a) the power, direct or indirect, to cause\n      the direction or management of such entity, whether by contract or\n      otherwise, or (b) ownership of more than fifty percent (50%) of the\n      outstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\n     Each Contributor hereby grants You a world-wide, royalty-free,\n     non-exclusive license:\n\n     a. under intellectual property rights (other than patent or trademark)\n        Licensable by such Contributor to use, reproduce, make available,\n        modify, display, perform, distribute, and otherwise exploit its\n        Contributions, either on an unmodified basis, with Modifications, or\n        as part of a Larger Work; and\n\n     b. under Patent Claims of such Contributor to make, use, sell, offer for\n        sale, have made, import, and otherwise transfer either its\n        Contributions or its Contributor Version.\n\n2.2. Effective Date\n\n     The licenses granted in Section 2.1 with respect to any Contribution\n     become effective for each Contribution on the date the Contributor first\n     distributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\n     The licenses granted in this Section 2 are the only rights granted under\n     this License. No additional rights or licenses will be implied from the\n     distribution or licensing of Covered Software under this License.\n     Notwithstanding Section 2.1(b) above, no patent license is granted by a\n     Contributor:\n\n     a. for any code that a Contributor has removed from Covered Software; or\n\n     b. for infringements caused by: (i) Your and any other third party's\n        modifications of Covered Software, or (ii) the combination of its\n        Contributions with other software (except as part of its Contributor\n        Version); or\n\n     c. under Patent Claims infringed by Covered Software in the absence of\n        its Contributions.\n\n     This License does not grant any rights in the trademarks, service marks,\n     or logos of any Contributor (except as may be necessary to comply with\n     the notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\n     No Contributor makes additional grants as a result of Your choice to\n     distribute the Covered Software under a subsequent version of this\n     License (see Section 10.2) or under the terms of a Secondary License (if\n     permitted under the terms of Section 3.3).\n\n2.5. Representation\n\n     Each Contributor represents that the Contributor believes its\n     Contributions are its original creation(s) or it has sufficient rights to\n     grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\n     This License is not intended to limit any rights You have under\n     applicable copyright doctrines of fair use, fair dealing, or other\n     equivalents.\n\n2.7. Conditions\n\n     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\n     Section 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\n     All distribution of Covered Software in Source Code Form, including any\n     Modifications that You create or to which You contribute, must be under\n     the terms of this License. You must inform recipients that the Source\n     Code Form of the Covered Software is governed by the terms of this\n     License, and how they can obtain a copy of this License. You may not\n     attempt to alter or restrict the recipients' rights in the Source Code\n     Form.\n\n3.2. Distribution of Executable Form\n\n     If You distribute Covered Software in Executable Form then:\n\n     a. such Covered Software must also be made available in Source Code Form,\n        as described in Section 3.1, and You must inform recipients of the\n        Executable Form how they can obtain a copy of such Source Code Form by\n        reasonable means in a timely manner, at a charge no more than the cost\n        of distribution to the recipient; and\n\n     b. You may distribute such Executable Form under the terms of this\n        License, or sublicense it under different terms, provided that the\n        license for the Executable Form does not attempt to limit or alter the\n        recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\n     You may create and distribute a Larger Work under terms of Your choice,\n     provided that You also comply with the requirements of this License for\n     the Covered Software. If the Larger Work is a combination of Covered\n     Software with a work governed by one or more Secondary Licenses, and the\n     Covered Software is not Incompatible With Secondary Licenses, this\n     License permits You to additionally distribute such Covered Software\n     under the terms of such Secondary License(s), so that the recipient of\n     the Larger Work may, at their option, further distribute the Covered\n     Software under the terms of either this License or such Secondary\n     License(s).\n\n3.4. Notices\n\n     You may not remove or alter the substance of any license notices\n     (including copyright notices, patent notices, disclaimers of warranty, or\n     limitations of liability) contained within the Source Code Form of the\n     Covered Software, except that You may alter any license notices to the\n     extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\n     You may choose to offer, and to charge a fee for, warranty, support,\n     indemnity or liability obligations to one or more recipients of Covered\n     Software. However, You may do so only on Your own behalf, and not on\n     behalf of any Contributor. You must make it absolutely clear that any\n     such warranty, support, indemnity, or liability obligation is offered by\n     You alone, and You hereby agree to indemnify every Contributor for any\n     liability incurred by such Contributor as a result of warranty, support,\n     indemnity or liability terms You offer. You may include additional\n     disclaimers of warranty and limitations of liability specific to any\n     jurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\n   If it is impossible for You to comply with any of the terms of this License\n   with respect to some or all of the Covered Software due to statute,\n   judicial order, or regulation then You must: (a) comply with the terms of\n   this License to the maximum extent possible; and (b) describe the\n   limitations and the code they affect. Such description must be placed in a\n   text file included with all distributions of the Covered Software under\n   this License. Except to the extent prohibited by statute or regulation,\n   such description must be sufficiently detailed for a recipient of ordinary\n   skill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\n     fail to comply with any of its terms. However, if You become compliant,\n     then the rights granted under this License from a particular Contributor\n     are reinstated (a) provisionally, unless and until such Contributor\n     explicitly and finally terminates Your grants, and (b) on an ongoing\n     basis, if such Contributor fails to notify You of the non-compliance by\n     some reasonable means prior to 60 days after You have come back into\n     compliance. Moreover, Your grants from a particular Contributor are\n     reinstated on an ongoing basis if such Contributor notifies You of the\n     non-compliance by some reasonable means, this is the first time You have\n     received notice of non-compliance with this License from such\n     Contributor, and You become compliant prior to 30 days after Your receipt\n     of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\n     infringement claim (excluding declaratory judgment actions,\n     counter-claims, and cross-claims) alleging that a Contributor Version\n     directly or indirectly infringes any patent, then the rights granted to\n     You by any and all Contributors for the Covered Software under Section\n     2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\n     license agreements (excluding distributors and resellers) which have been\n     validly granted by You or Your distributors under this License prior to\n     termination shall survive termination.\n\n6. Disclaimer of Warranty\n\n   Covered Software is provided under this License on an \"as is\" basis,\n   without warranty of any kind, either expressed, implied, or statutory,\n   including, without limitation, warranties that the Covered Software is free\n   of defects, merchantable, fit for a particular purpose or non-infringing.\n   The entire risk as to the quality and performance of the Covered Software\n   is with You. Should any Covered Software prove defective in any respect,\n   You (not any Contributor) assume the cost of any necessary servicing,\n   repair, or correction. This disclaimer of warranty constitutes an essential\n   part of this License. No use of  any Covered Software is authorized under\n   this License except under this disclaimer.\n\n7. Limitation of Liability\n\n   Under no circumstances and under no legal theory, whether tort (including\n   negligence), contract, or otherwise, shall any Contributor, or anyone who\n   distributes Covered Software as permitted above, be liable to You for any\n   direct, indirect, special, incidental, or consequential damages of any\n   character including, without limitation, damages for lost profits, loss of\n   goodwill, work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses, even if such party shall have been\n   informed of the possibility of such damages. This limitation of liability\n   shall not apply to liability for death or personal injury resulting from\n   such party's negligence to the extent applicable law prohibits such\n   limitation. Some jurisdictions do not allow the exclusion or limitation of\n   incidental or consequential damages, so this exclusion and limitation may\n   not apply to You.\n\n8. Litigation\n\n   Any litigation relating to this License may be brought only in the courts\n   of a jurisdiction where the defendant maintains its principal place of\n   business and such litigation shall be governed by laws of that\n   jurisdiction, without reference to its conflict-of-law provisions. Nothing\n   in this Section shall prevent a party's ability to bring cross-claims or\n   counter-claims.\n\n9. Miscellaneous\n\n   This License represents the complete agreement concerning the subject\n   matter hereof. If any provision of this License is held to be\n   unenforceable, such provision shall be reformed only to the extent\n   necessary to make it enforceable. Any law or regulation which provides that\n   the language of a contract shall be construed against the drafter shall not\n   be used to construe this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\n      Mozilla Foundation is the license steward. Except as provided in Section\n      10.3, no one other than the license steward has the right to modify or\n      publish new versions of this License. Each version will be given a\n      distinguishing version number.\n\n10.2. Effect of New Versions\n\n      You may distribute the Covered Software under the terms of the version\n      of the License under which You originally received the Covered Software,\n      or under the terms of any subsequent version published by the license\n      steward.\n\n10.3. Modified Versions\n\n      If you create software not governed by this License, and you want to\n      create a new license for such software, you may create and use a\n      modified version of this License if you rename the license and remove\n      any references to the name of the license steward (except to note that\n      such modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\n      Licenses If You choose to distribute Source Code Form that is\n      Incompatible With Secondary Licenses under the terms of this version of\n      the License, the notice described in Exhibit B of this License must be\n      attached.\n\nExhibit A - Source Code Form License Notice\n\n      This Source Code Form is subject to the\n      terms of the Mozilla Public License, v.\n      2.0. If a copy of the MPL was not\n      distributed with this file, You can\n      obtain one at\n      http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a\nnotice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\n      This Source Code Form is \"Incompatible\n      With Secondary Licenses\", as defined by\n      the Mozilla Public License, v. 2.0.\n\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-cleanhttp/README.md",
    "content": "# cleanhttp\n\nFunctions for accessing \"clean\" Go http.Client values\n\n-------------\n\nThe Go standard library contains a default `http.Client` called\n`http.DefaultClient`. It is a common idiom in Go code to start with\n`http.DefaultClient` and tweak it as necessary, and in fact, this is\nencouraged; from the `http` package documentation:\n\n> The Client's Transport typically has internal state (cached TCP connections),\nso Clients should be reused instead of created as needed. Clients are safe for\nconcurrent use by multiple goroutines.\n\nUnfortunately, this is a shared value, and it is not uncommon for libraries to\nassume that they are free to modify it at will. With enough dependencies, it\ncan be very easy to encounter strange problems and race conditions due to\nmanipulation of this shared value across libraries and goroutines (clients are\nsafe for concurrent use, but writing values to the client struct itself is not\nprotected).\n\nMaking things worse is the fact that a bare `http.Client` will use a default\n`http.Transport` called `http.DefaultTransport`, which is another global value\nthat behaves the same way. So it is not simply enough to replace\n`http.DefaultClient` with `&http.Client{}`.\n\nThis repository provides some simple functions to get a \"clean\" `http.Client`\n-- one that uses the same default values as the Go standard library, but\nreturns a client that does not share any state with other clients.\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go",
    "content": "package cleanhttp\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"runtime\"\n\t\"time\"\n)\n\n// DefaultTransport returns a new http.Transport with similar default values to\n// http.DefaultTransport, but with idle connections and keepalives disabled.\nfunc DefaultTransport() *http.Transport {\n\ttransport := DefaultPooledTransport()\n\ttransport.DisableKeepAlives = true\n\ttransport.MaxIdleConnsPerHost = -1\n\treturn transport\n}\n\n// DefaultPooledTransport returns a new http.Transport with similar default\n// values to http.DefaultTransport. Do not use this for transient transports as\n// it can leak file descriptors over time. Only use this for transports that\n// will be re-used for the same host(s).\nfunc DefaultPooledTransport() *http.Transport {\n\ttransport := &http.Transport{\n\t\tProxy: http.ProxyFromEnvironment,\n\t\tDialContext: (&net.Dialer{\n\t\t\tTimeout:   30 * time.Second,\n\t\t\tKeepAlive: 30 * time.Second,\n\t\t\tDualStack: true,\n\t\t}).DialContext,\n\t\tMaxIdleConns:          100,\n\t\tIdleConnTimeout:       90 * time.Second,\n\t\tTLSHandshakeTimeout:   10 * time.Second,\n\t\tExpectContinueTimeout: 1 * time.Second,\n\t\tForceAttemptHTTP2:     true,\n\t\tMaxIdleConnsPerHost:   runtime.GOMAXPROCS(0) + 1,\n\t}\n\treturn transport\n}\n\n// DefaultClient returns a new http.Client with similar default values to\n// http.Client, but with a non-shared Transport, idle connections disabled, and\n// keepalives disabled.\nfunc DefaultClient() *http.Client {\n\treturn &http.Client{\n\t\tTransport: DefaultTransport(),\n\t}\n}\n\n// DefaultPooledClient returns a new http.Client with similar default values to\n// http.Client, but with a shared Transport. Do not use this function for\n// transient clients as it can leak file descriptors over time. Only use this\n// for clients that will be re-used for the same host(s).\nfunc DefaultPooledClient() *http.Client {\n\treturn &http.Client{\n\t\tTransport: DefaultPooledTransport(),\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-cleanhttp/doc.go",
    "content": "// Package cleanhttp offers convenience utilities for acquiring \"clean\"\n// http.Transport and http.Client structs.\n//\n// Values set on http.DefaultClient and http.DefaultTransport affect all\n// callers. This can have detrimental effects, esepcially in TLS contexts,\n// where client or root certificates set to talk to multiple endpoints can end\n// up displacing each other, leading to hard-to-debug issues. This package\n// provides non-shared http.Client and http.Transport structs to ensure that\n// the configuration will not be overwritten by other parts of the application\n// or dependencies.\n//\n// The DefaultClient and DefaultTransport functions disable idle connections\n// and keepalives. Without ensuring that idle connections are closed before\n// garbage collection, short-term clients/transports can leak file descriptors,\n// eventually leading to \"too many open files\" errors. If you will be\n// connecting to the same hosts repeatedly from the same client, you can use\n// DefaultPooledClient to receive a client that has connection pooling\n// semantics similar to http.DefaultClient.\n//\npackage cleanhttp\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-cleanhttp/handlers.go",
    "content": "package cleanhttp\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n\t\"unicode\"\n)\n\n// HandlerInput provides input options to cleanhttp's handlers\ntype HandlerInput struct {\n\tErrStatus int\n}\n\n// PrintablePathCheckHandler is a middleware that ensures the request path\n// contains only printable runes.\nfunc PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler {\n\t// Nil-check on input to make it optional\n\tif input == nil {\n\t\tinput = &HandlerInput{\n\t\t\tErrStatus: http.StatusBadRequest,\n\t\t}\n\t}\n\n\t// Default to http.StatusBadRequest on error\n\tif input.ErrStatus == 0 {\n\t\tinput.ErrStatus = http.StatusBadRequest\n\t}\n\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif r != nil {\n\t\t\t// Check URL path for non-printable characters\n\t\t\tidx := strings.IndexFunc(r.URL.Path, func(c rune) bool {\n\t\t\t\treturn !unicode.IsPrint(c)\n\t\t\t})\n\n\t\t\tif idx != -1 {\n\t\t\t\tw.WriteHeader(input.ErrStatus)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif next != nil {\n\t\t\t\tnext.ServeHTTP(w, r)\n\t\t\t}\n\t\t}\n\n\t\treturn\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/.go-version",
    "content": "1.13\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/CODEOWNERS",
    "content": "# Each line is a file pattern followed by one or more owners.\n# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners\n\n# Default owner\n* @hashicorp/team-ip-compliance\n\n# Add override rules below. Each line is a file/folder pattern followed by one or more owners.\n# Being an owner means those groups or individuals will be added as reviewers to PRs affecting\n# those areas of the code.\n# Examples:\n# /docs/  @docs-team\n# *.js    @js-team\n# *.go    @go-team"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/LICENSE",
    "content": "Copyright (c) 2014 HashiCorp, Inc.\n\nMozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. “Contributor”\n\n     means each individual or legal entity that creates, contributes to the\n     creation of, or owns Covered Software.\n\n1.2. “Contributor Version”\n\n     means the combination of the Contributions of others (if any) used by a\n     Contributor and that particular Contributor’s Contribution.\n\n1.3. “Contribution”\n\n     means Covered Software of a particular Contributor.\n\n1.4. “Covered Software”\n\n     means Source Code Form to which the initial Contributor has attached the\n     notice in Exhibit A, the Executable Form of such Source Code Form, and\n     Modifications of such Source Code Form, in each case including portions\n     thereof.\n\n1.5. “Incompatible With Secondary Licenses”\n     means\n\n     a. that the initial Contributor has attached the notice described in\n        Exhibit B to the Covered Software; or\n\n     b. that the Covered Software was made available under the terms of version\n        1.1 or earlier of the License, but not also under the terms of a\n        Secondary License.\n\n1.6. “Executable Form”\n\n     means any form of the work other than Source Code Form.\n\n1.7. “Larger Work”\n\n     means a work that combines Covered Software with other material, in a separate\n     file or files, that is not Covered Software.\n\n1.8. “License”\n\n     means this document.\n\n1.9. “Licensable”\n\n     means having the right to grant, to the maximum extent possible, whether at the\n     time of the initial grant or subsequently, any and all of the rights conveyed by\n     this License.\n\n1.10. “Modifications”\n\n     means any of the following:\n\n     a. any file in Source Code Form that results from an addition to, deletion\n        from, or modification of the contents of Covered Software; or\n\n     b. any new file in Source Code Form that contains any Covered Software.\n\n1.11. “Patent Claims” of a Contributor\n\n      means any patent claim(s), including without limitation, method, process,\n      and apparatus claims, in any patent Licensable by such Contributor that\n      would be infringed, but for the grant of the License, by the making,\n      using, selling, offering for sale, having made, import, or transfer of\n      either its Contributions or its Contributor Version.\n\n1.12. “Secondary License”\n\n      means either the GNU General Public License, Version 2.0, the GNU Lesser\n      General Public License, Version 2.1, the GNU Affero General Public\n      License, Version 3.0, or any later versions of those licenses.\n\n1.13. “Source Code Form”\n\n      means the form of the work preferred for making modifications.\n\n1.14. “You” (or “Your”)\n\n      means an individual or a legal entity exercising rights under this\n      License. For legal entities, “You” includes any entity that controls, is\n      controlled by, or is under common control with You. For purposes of this\n      definition, “control” means (a) the power, direct or indirect, to cause\n      the direction or management of such entity, whether by contract or\n      otherwise, or (b) ownership of more than fifty percent (50%) of the\n      outstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\n     Each Contributor hereby grants You a world-wide, royalty-free,\n     non-exclusive license:\n\n     a. under intellectual property rights (other than patent or trademark)\n        Licensable by such Contributor to use, reproduce, make available,\n        modify, display, perform, distribute, and otherwise exploit its\n        Contributions, either on an unmodified basis, with Modifications, or as\n        part of a Larger Work; and\n\n     b. under Patent Claims of such Contributor to make, use, sell, offer for\n        sale, have made, import, and otherwise transfer either its Contributions\n        or its Contributor Version.\n\n2.2. Effective Date\n\n     The licenses granted in Section 2.1 with respect to any Contribution become\n     effective for each Contribution on the date the Contributor first distributes\n     such Contribution.\n\n2.3. Limitations on Grant Scope\n\n     The licenses granted in this Section 2 are the only rights granted under this\n     License. No additional rights or licenses will be implied from the distribution\n     or licensing of Covered Software under this License. Notwithstanding Section\n     2.1(b) above, no patent license is granted by a Contributor:\n\n     a. for any code that a Contributor has removed from Covered Software; or\n\n     b. for infringements caused by: (i) Your and any other third party’s\n        modifications of Covered Software, or (ii) the combination of its\n        Contributions with other software (except as part of its Contributor\n        Version); or\n\n     c. under Patent Claims infringed by Covered Software in the absence of its\n        Contributions.\n\n     This License does not grant any rights in the trademarks, service marks, or\n     logos of any Contributor (except as may be necessary to comply with the\n     notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\n     No Contributor makes additional grants as a result of Your choice to\n     distribute the Covered Software under a subsequent version of this License\n     (see Section 10.2) or under the terms of a Secondary License (if permitted\n     under the terms of Section 3.3).\n\n2.5. Representation\n\n     Each Contributor represents that the Contributor believes its Contributions\n     are its original creation(s) or it has sufficient rights to grant the\n     rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\n     This License is not intended to limit any rights You have under applicable\n     copyright doctrines of fair use, fair dealing, or other equivalents.\n\n2.7. Conditions\n\n     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\n     Section 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\n     All distribution of Covered Software in Source Code Form, including any\n     Modifications that You create or to which You contribute, must be under the\n     terms of this License. You must inform recipients that the Source Code Form\n     of the Covered Software is governed by the terms of this License, and how\n     they can obtain a copy of this License. You may not attempt to alter or\n     restrict the recipients’ rights in the Source Code Form.\n\n3.2. Distribution of Executable Form\n\n     If You distribute Covered Software in Executable Form then:\n\n     a. such Covered Software must also be made available in Source Code Form,\n        as described in Section 3.1, and You must inform recipients of the\n        Executable Form how they can obtain a copy of such Source Code Form by\n        reasonable means in a timely manner, at a charge no more than the cost\n        of distribution to the recipient; and\n\n     b. You may distribute such Executable Form under the terms of this License,\n        or sublicense it under different terms, provided that the license for\n        the Executable Form does not attempt to limit or alter the recipients’\n        rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\n     You may create and distribute a Larger Work under terms of Your choice,\n     provided that You also comply with the requirements of this License for the\n     Covered Software. If the Larger Work is a combination of Covered Software\n     with a work governed by one or more Secondary Licenses, and the Covered\n     Software is not Incompatible With Secondary Licenses, this License permits\n     You to additionally distribute such Covered Software under the terms of\n     such Secondary License(s), so that the recipient of the Larger Work may, at\n     their option, further distribute the Covered Software under the terms of\n     either this License or such Secondary License(s).\n\n3.4. Notices\n\n     You may not remove or alter the substance of any license notices (including\n     copyright notices, patent notices, disclaimers of warranty, or limitations\n     of liability) contained within the Source Code Form of the Covered\n     Software, except that You may alter any license notices to the extent\n     required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\n     You may choose to offer, and to charge a fee for, warranty, support,\n     indemnity or liability obligations to one or more recipients of Covered\n     Software. However, You may do so only on Your own behalf, and not on behalf\n     of any Contributor. You must make it absolutely clear that any such\n     warranty, support, indemnity, or liability obligation is offered by You\n     alone, and You hereby agree to indemnify every Contributor for any\n     liability incurred by such Contributor as a result of warranty, support,\n     indemnity or liability terms You offer. You may include additional\n     disclaimers of warranty and limitations of liability specific to any\n     jurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\n   If it is impossible for You to comply with any of the terms of this License\n   with respect to some or all of the Covered Software due to statute, judicial\n   order, or regulation then You must: (a) comply with the terms of this License\n   to the maximum extent possible; and (b) describe the limitations and the code\n   they affect. Such description must be placed in a text file included with all\n   distributions of the Covered Software under this License. Except to the\n   extent prohibited by statute or regulation, such description must be\n   sufficiently detailed for a recipient of ordinary skill to be able to\n   understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\n     fail to comply with any of its terms. However, if You become compliant,\n     then the rights granted under this License from a particular Contributor\n     are reinstated (a) provisionally, unless and until such Contributor\n     explicitly and finally terminates Your grants, and (b) on an ongoing basis,\n     if such Contributor fails to notify You of the non-compliance by some\n     reasonable means prior to 60 days after You have come back into compliance.\n     Moreover, Your grants from a particular Contributor are reinstated on an\n     ongoing basis if such Contributor notifies You of the non-compliance by\n     some reasonable means, this is the first time You have received notice of\n     non-compliance with this License from such Contributor, and You become\n     compliant prior to 30 days after Your receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\n     infringement claim (excluding declaratory judgment actions, counter-claims,\n     and cross-claims) alleging that a Contributor Version directly or\n     indirectly infringes any patent, then the rights granted to You by any and\n     all Contributors for the Covered Software under Section 2.1 of this License\n     shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\n     license agreements (excluding distributors and resellers) which have been\n     validly granted by You or Your distributors under this License prior to\n     termination shall survive termination.\n\n6. Disclaimer of Warranty\n\n   Covered Software is provided under this License on an “as is” basis, without\n   warranty of any kind, either expressed, implied, or statutory, including,\n   without limitation, warranties that the Covered Software is free of defects,\n   merchantable, fit for a particular purpose or non-infringing. The entire\n   risk as to the quality and performance of the Covered Software is with You.\n   Should any Covered Software prove defective in any respect, You (not any\n   Contributor) assume the cost of any necessary servicing, repair, or\n   correction. This disclaimer of warranty constitutes an essential part of this\n   License. No use of  any Covered Software is authorized under this License\n   except under this disclaimer.\n\n7. Limitation of Liability\n\n   Under no circumstances and under no legal theory, whether tort (including\n   negligence), contract, or otherwise, shall any Contributor, or anyone who\n   distributes Covered Software as permitted above, be liable to You for any\n   direct, indirect, special, incidental, or consequential damages of any\n   character including, without limitation, damages for lost profits, loss of\n   goodwill, work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses, even if such party shall have been\n   informed of the possibility of such damages. This limitation of liability\n   shall not apply to liability for death or personal injury resulting from such\n   party’s negligence to the extent applicable law prohibits such limitation.\n   Some jurisdictions do not allow the exclusion or limitation of incidental or\n   consequential damages, so this exclusion and limitation may not apply to You.\n\n8. Litigation\n\n   Any litigation relating to this License may be brought only in the courts of\n   a jurisdiction where the defendant maintains its principal place of business\n   and such litigation shall be governed by laws of that jurisdiction, without\n   reference to its conflict-of-law provisions. Nothing in this Section shall\n   prevent a party’s ability to bring cross-claims or counter-claims.\n\n9. Miscellaneous\n\n   This License represents the complete agreement concerning the subject matter\n   hereof. If any provision of this License is held to be unenforceable, such\n   provision shall be reformed only to the extent necessary to make it\n   enforceable. Any law or regulation which provides that the language of a\n   contract shall be construed against the drafter shall not be used to construe\n   this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\n      Mozilla Foundation is the license steward. Except as provided in Section\n      10.3, no one other than the license steward has the right to modify or\n      publish new versions of this License. Each version will be given a\n      distinguishing version number.\n\n10.2. Effect of New Versions\n\n      You may distribute the Covered Software under the terms of the version of\n      the License under which You originally received the Covered Software, or\n      under the terms of any subsequent version published by the license\n      steward.\n\n10.3. Modified Versions\n\n      If you create software not governed by this License, and you want to\n      create a new license for such software, you may create and use a modified\n      version of this License if you rename the license and remove any\n      references to the name of the license steward (except to note that such\n      modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n      If You choose to distribute Source Code Form that is Incompatible With\n      Secondary Licenses under the terms of this version of the License, the\n      notice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n\n      This Source Code Form is subject to the\n      terms of the Mozilla Public License, v.\n      2.0. If a copy of the MPL was not\n      distributed with this file, You can\n      obtain one at\n      http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file, then\nYou may include the notice in a location (such as a LICENSE file in a relevant\ndirectory) where a recipient would be likely to look for such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - “Incompatible With Secondary Licenses” Notice\n\n      This Source Code Form is “Incompatible\n      With Secondary Licenses”, as defined by\n      the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/Makefile",
    "content": "TEST?=./...\n\ndefault: test\n\n# test runs the test suite and vets the code.\ntest: generate\n\t@echo \"==> Running tests...\"\n\t@go list $(TEST) \\\n\t\t| grep -v \"/vendor/\" \\\n\t\t| xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS}\n\n# testrace runs the race checker\ntestrace: generate\n\t@echo \"==> Running tests (race)...\"\n\t@go list $(TEST) \\\n\t\t| grep -v \"/vendor/\" \\\n\t\t| xargs -n1 go test -timeout=60s -race ${TESTARGS}\n\n# updatedeps installs all the dependencies needed to run and build.\nupdatedeps:\n\t@sh -c \"'${CURDIR}/scripts/deps.sh' '${NAME}'\"\n\n# generate runs `go generate` to build the dynamically generated source files.\ngenerate:\n\t@echo \"==> Generating...\"\n\t@find . -type f -name '.DS_Store' -delete\n\t@go list ./... \\\n\t\t| grep -v \"/vendor/\" \\\n\t\t| xargs -n1 go generate\n\n.PHONY: default test testrace updatedeps generate\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/README.md",
    "content": "# go-multierror\n\n[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror)\n[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror)\n\n[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror\n[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror\n\n`go-multierror` is a package for Go that provides a mechanism for\nrepresenting a list of `error` values as a single `error`.\n\nThis allows a function in Go to return an `error` that might actually\nbe a list of errors. If the caller knows this, they can unwrap the\nlist and access the errors. If the caller doesn't know, the error\nformats to a nice human-readable format.\n\n`go-multierror` is fully compatible with the Go standard library\n[errors](https://golang.org/pkg/errors/) package, including the\nfunctions `As`, `Is`, and `Unwrap`. This provides a standardized approach\nfor introspecting on error values.\n\n## Installation and Docs\n\nInstall using `go get github.com/hashicorp/go-multierror`.\n\nFull documentation is available at\nhttps://pkg.go.dev/github.com/hashicorp/go-multierror\n\n### Requires go version 1.13 or newer\n\n`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced\n[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which\nthis library takes advantage of.\n\nIf you need to use an earlier version of go, you can use the\n[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0)\ntag, which doesn't rely on features in go 1.13.\n\nIf you see compile errors that look like the below, it's likely that\nyou're on an older version of go:\n\n```\n/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As\n/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is\n```\n\n## Usage\n\ngo-multierror is easy to use and purposely built to be unobtrusive in\nexisting Go applications/libraries that may not be aware of it.\n\n**Building a list of errors**\n\nThe `Append` function is used to create a list of errors. This function\nbehaves a lot like the Go built-in `append` function: it doesn't matter\nif the first argument is nil, a `multierror.Error`, or any other `error`,\nthe function behaves as you would expect.\n\n```go\nvar result error\n\nif err := step1(); err != nil {\n\tresult = multierror.Append(result, err)\n}\nif err := step2(); err != nil {\n\tresult = multierror.Append(result, err)\n}\n\nreturn result\n```\n\n**Customizing the formatting of the errors**\n\nBy specifying a custom `ErrorFormat`, you can customize the format\nof the `Error() string` function:\n\n```go\nvar result *multierror.Error\n\n// ... accumulate errors here, maybe using Append\n\nif result != nil {\n\tresult.ErrorFormat = func([]error) string {\n\t\treturn \"errors!\"\n\t}\n}\n```\n\n**Accessing the list of errors**\n\n`multierror.Error` implements `error` so if the caller doesn't know about\nmultierror, it will work just fine. But if you're aware a multierror might\nbe returned, you can use type switches to access the list of errors:\n\n```go\nif err := something(); err != nil {\n\tif merr, ok := err.(*multierror.Error); ok {\n\t\t// Use merr.Errors\n\t}\n}\n```\n\nYou can also use the standard [`errors.Unwrap`](https://golang.org/pkg/errors/#Unwrap)\nfunction. This will continue to unwrap into subsequent errors until none exist.\n\n**Extracting an error**\n\nThe standard library [`errors.As`](https://golang.org/pkg/errors/#As)\nfunction can be used directly with a multierror to extract a specific error:\n\n```go\n// Assume err is a multierror value\nerr := somefunc()\n\n// We want to know if \"err\" has a \"RichErrorType\" in it and extract it.\nvar errRich RichErrorType\nif errors.As(err, &errRich) {\n\t// It has it, and now errRich is populated.\n}\n```\n\n**Checking for an exact error value**\n\nSome errors are returned as exact errors such as the [`ErrNotExist`](https://golang.org/pkg/os/#pkg-variables)\nerror in the `os` package. You can check if this error is present by using\nthe standard [`errors.Is`](https://golang.org/pkg/errors/#Is) function.\n\n```go\n// Assume err is a multierror value\nerr := somefunc()\nif errors.Is(err, os.ErrNotExist) {\n\t// err contains os.ErrNotExist\n}\n```\n\n**Returning a multierror only if there are errors**\n\nIf you build a `multierror.Error`, you can use the `ErrorOrNil` function\nto return an `error` implementation only if there are errors to return:\n\n```go\nvar result *multierror.Error\n\n// ... accumulate errors here\n\n// Return the `error` only if errors were added to the multierror, otherwise\n// return nil since there are no errors.\nreturn result.ErrorOrNil()\n```\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/append.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\n// Append is a helper function that will append more errors\n// onto an Error in order to create a larger multi-error.\n//\n// If err is not a multierror.Error, then it will be turned into\n// one. If any of the errs are multierr.Error, they will be flattened\n// one level into err.\n// Any nil errors within errs will be ignored. If err is nil, a new\n// *Error will be returned.\nfunc Append(err error, errs ...error) *Error {\n\tswitch err := err.(type) {\n\tcase *Error:\n\t\t// Typed nils can reach here, so initialize if we are nil\n\t\tif err == nil {\n\t\t\terr = new(Error)\n\t\t}\n\n\t\t// Go through each error and flatten\n\t\tfor _, e := range errs {\n\t\t\tswitch e := e.(type) {\n\t\t\tcase *Error:\n\t\t\t\tif e != nil {\n\t\t\t\t\terr.Errors = append(err.Errors, e.Errors...)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tif e != nil {\n\t\t\t\t\terr.Errors = append(err.Errors, e)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn err\n\tdefault:\n\t\tnewErrs := make([]error, 0, len(errs)+1)\n\t\tif err != nil {\n\t\t\tnewErrs = append(newErrs, err)\n\t\t}\n\t\tnewErrs = append(newErrs, errs...)\n\n\t\treturn Append(&Error{}, newErrs...)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/flatten.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\n// Flatten flattens the given error, merging any *Errors together into\n// a single *Error.\nfunc Flatten(err error) error {\n\t// If it isn't an *Error, just return the error as-is\n\tif _, ok := err.(*Error); !ok {\n\t\treturn err\n\t}\n\n\t// Otherwise, make the result and flatten away!\n\tflatErr := new(Error)\n\tflatten(err, flatErr)\n\treturn flatErr\n}\n\nfunc flatten(err error, flatErr *Error) {\n\tswitch err := err.(type) {\n\tcase *Error:\n\t\tfor _, e := range err.Errors {\n\t\t\tflatten(e, flatErr)\n\t\t}\n\tdefault:\n\t\tflatErr.Errors = append(flatErr.Errors, err)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/format.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// ErrorFormatFunc is a function callback that is called by Error to\n// turn the list of errors into a string.\ntype ErrorFormatFunc func([]error) string\n\n// ListFormatFunc is a basic formatter that outputs the number of errors\n// that occurred along with a bullet point list of the errors.\nfunc ListFormatFunc(es []error) string {\n\tif len(es) == 1 {\n\t\treturn fmt.Sprintf(\"1 error occurred:\\n\\t* %s\\n\\n\", es[0])\n\t}\n\n\tpoints := make([]string, len(es))\n\tfor i, err := range es {\n\t\tpoints[i] = fmt.Sprintf(\"* %s\", err)\n\t}\n\n\treturn fmt.Sprintf(\n\t\t\"%d errors occurred:\\n\\t%s\\n\\n\",\n\t\tlen(es), strings.Join(points, \"\\n\\t\"))\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/group.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\nimport \"sync\"\n\n// Group is a collection of goroutines which return errors that need to be\n// coalesced.\ntype Group struct {\n\tmutex sync.Mutex\n\terr   *Error\n\twg    sync.WaitGroup\n}\n\n// Go calls the given function in a new goroutine.\n//\n// If the function returns an error it is added to the group multierror which\n// is returned by Wait.\nfunc (g *Group) Go(f func() error) {\n\tg.wg.Add(1)\n\n\tgo func() {\n\t\tdefer g.wg.Done()\n\n\t\tif err := f(); err != nil {\n\t\t\tg.mutex.Lock()\n\t\t\tg.err = Append(g.err, err)\n\t\t\tg.mutex.Unlock()\n\t\t}\n\t}()\n}\n\n// Wait blocks until all function calls from the Go method have returned, then\n// returns the multierror.\nfunc (g *Group) Wait() *Error {\n\tg.wg.Wait()\n\tg.mutex.Lock()\n\tdefer g.mutex.Unlock()\n\treturn g.err\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/multierror.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// Error is an error type to track multiple errors. This is used to\n// accumulate errors in cases and return them as a single \"error\".\ntype Error struct {\n\tErrors      []error\n\tErrorFormat ErrorFormatFunc\n}\n\nfunc (e *Error) Error() string {\n\tfn := e.ErrorFormat\n\tif fn == nil {\n\t\tfn = ListFormatFunc\n\t}\n\n\treturn fn(e.Errors)\n}\n\n// ErrorOrNil returns an error interface if this Error represents\n// a list of errors, or returns nil if the list of errors is empty. This\n// function is useful at the end of accumulation to make sure that the value\n// returned represents the existence of errors.\nfunc (e *Error) ErrorOrNil() error {\n\tif e == nil {\n\t\treturn nil\n\t}\n\tif len(e.Errors) == 0 {\n\t\treturn nil\n\t}\n\n\treturn e\n}\n\nfunc (e *Error) GoString() string {\n\treturn fmt.Sprintf(\"*%#v\", *e)\n}\n\n// WrappedErrors returns the list of errors that this Error is wrapping. It is\n// an implementation of the errwrap.Wrapper interface so that multierror.Error\n// can be used with that library.\n//\n// This method is not safe to be called concurrently. Unlike accessing the\n// Errors field directly, this function also checks if the multierror is nil to\n// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface.\nfunc (e *Error) WrappedErrors() []error {\n\tif e == nil {\n\t\treturn nil\n\t}\n\treturn e.Errors\n}\n\n// Unwrap returns an error from Error (or nil if there are no errors).\n// This error returned will further support Unwrap to get the next error,\n// etc. The order will match the order of Errors in the multierror.Error\n// at the time of calling.\n//\n// The resulting error supports errors.As/Is/Unwrap so you can continue\n// to use the stdlib errors package to introspect further.\n//\n// This will perform a shallow copy of the errors slice. Any errors appended\n// to this error after calling Unwrap will not be available until a new\n// Unwrap is called on the multierror.Error.\nfunc (e *Error) Unwrap() error {\n\t// If we have no errors then we do nothing\n\tif e == nil || len(e.Errors) == 0 {\n\t\treturn nil\n\t}\n\n\t// If we have exactly one error, we can just return that directly.\n\tif len(e.Errors) == 1 {\n\t\treturn e.Errors[0]\n\t}\n\n\t// Shallow copy the slice\n\terrs := make([]error, len(e.Errors))\n\tcopy(errs, e.Errors)\n\treturn chain(errs)\n}\n\n// chain implements the interfaces necessary for errors.Is/As/Unwrap to\n// work in a deterministic way with multierror. A chain tracks a list of\n// errors while accounting for the current represented error. This lets\n// Is/As be meaningful.\n//\n// Unwrap returns the next error. In the cleanest form, Unwrap would return\n// the wrapped error here but we can't do that if we want to properly\n// get access to all the errors. Instead, users are recommended to use\n// Is/As to get the correct error type out.\n//\n// Precondition: []error is non-empty (len > 0)\ntype chain []error\n\n// Error implements the error interface\nfunc (e chain) Error() string {\n\treturn e[0].Error()\n}\n\n// Unwrap implements errors.Unwrap by returning the next error in the\n// chain or nil if there are no more errors.\nfunc (e chain) Unwrap() error {\n\tif len(e) == 1 {\n\t\treturn nil\n\t}\n\n\treturn e[1:]\n}\n\n// As implements errors.As by attempting to map to the current value.\nfunc (e chain) As(target interface{}) bool {\n\treturn errors.As(e[0], target)\n}\n\n// Is implements errors.Is by comparing the current value directly.\nfunc (e chain) Is(target error) bool {\n\treturn errors.Is(e[0], target)\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/prefix.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\nimport (\n\t\"fmt\"\n)\n\n// Prefix is a helper function that will prefix some text\n// to the given error. If the error is a multierror.Error, then\n// it will be prefixed to each wrapped error.\n//\n// This is useful to use when appending multiple multierrors\n// together in order to give better scoping.\nfunc Prefix(err error, prefix string) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\n\tswitch err := err.(type) {\n\tcase *Error:\n\t\t// Typed nils can reach here, so initialize if we are nil\n\t\tif err == nil {\n\t\t\terr = new(Error)\n\t\t}\n\n\t\t// Wrap each of the errors\n\t\tfor i, e := range err.Errors {\n\t\t\terr.Errors[i] = fmt.Errorf(\"%s %s\", prefix, e)\n\t\t}\n\n\t\treturn err\n\tdefault:\n\t\treturn fmt.Errorf(\"%s %s\", prefix, err)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-multierror/sort.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage multierror\n\n// Len implements sort.Interface function for length\nfunc (err *Error) Len() int {\n\tif err == nil {\n\t\treturn 0\n\t}\n\n\treturn len(err.Errors)\n}\n\n// Swap implements sort.Interface function for swapping elements\nfunc (err Error) Swap(i, j int) {\n\terr.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i]\n}\n\n// Less implements sort.Interface function for determining order\nfunc (err Error) Less(i, j int) bool {\n\treturn err.Errors[i].Error() < err.Errors[j].Error()\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/.gitignore",
    "content": ".idea/\n*.iml\n*.test\n.vscode/"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/.go-version",
    "content": "1.23\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/.golangci.yml",
    "content": "# Copyright (c) HashiCorp, Inc.\n# SPDX-License-Identifier: MPL-2.0\n\nlinters:\n  disable-all: true\n  enable:\n    - errcheck\n    - staticcheck\n    - gosimple\n    - govet\noutput_format: colored-line-number\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/CHANGELOG.md",
    "content": "## 0.7.7 (May 30, 2024)\n\nBUG FIXES:\n\n- client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158)\n\n## 0.7.6 (May 9, 2024)\n\nENHANCEMENTS:\n\n- client: support a `RetryPrepare` function for modifying the request before retrying (#216)\n- client: support HTTP-date values for `Retry-After` header value (#138)\n- client: avoid reading entire body when the body is a `*bytes.Reader` (#197)\n\nBUG FIXES:\n\n- client: fix a broken check for invalid server certificate in go 1.20+ (#210)\n\n## 0.7.5 (Nov 8, 2023)\n\nBUG FIXES:\n\n- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207)\n\n## 0.7.4 (Jun 6, 2023)\n\nBUG FIXES:\n\n- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194)\n\n## 0.7.3 (May 15, 2023)\n\nInitial release\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS",
    "content": "# Each line is a file pattern followed by one or more owners.\n# More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners\n\n# Default owner\n* @hashicorp/team-ip-compliance @hashicorp/go-retryablehttp-maintainers\n\n# Add override rules below. Each line is a file/folder pattern followed by one or more owners.\n# Being an owner means those groups or individuals will be added as reviewers to PRs affecting\n# those areas of the code.\n# Examples:\n# /docs/  @docs-team\n# *.js    @js-team\n# *.go    @go-team\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/LICENSE",
    "content": "Copyright (c) 2015 HashiCorp, Inc.\n\nMozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\n     means each individual or legal entity that creates, contributes to the\n     creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n\n     means the combination of the Contributions of others (if any) used by a\n     Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n\n     means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n\n     means Source Code Form to which the initial Contributor has attached the\n     notice in Exhibit A, the Executable Form of such Source Code Form, and\n     Modifications of such Source Code Form, in each case including portions\n     thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n     means\n\n     a. that the initial Contributor has attached the notice described in\n        Exhibit B to the Covered Software; or\n\n     b. that the Covered Software was made available under the terms of\n        version 1.1 or earlier of the License, but not also under the terms of\n        a Secondary License.\n\n1.6. \"Executable Form\"\n\n     means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n\n     means a work that combines Covered Software with other material, in a\n     separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n\n     means this document.\n\n1.9. \"Licensable\"\n\n     means having the right to grant, to the maximum extent possible, whether\n     at the time of the initial grant or subsequently, any and all of the\n     rights conveyed by this License.\n\n1.10. \"Modifications\"\n\n     means any of the following:\n\n     a. any file in Source Code Form that results from an addition to,\n        deletion from, or modification of the contents of Covered Software; or\n\n     b. any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor\n\n      means any patent claim(s), including without limitation, method,\n      process, and apparatus claims, in any patent Licensable by such\n      Contributor that would be infringed, but for the grant of the License,\n      by the making, using, selling, offering for sale, having made, import,\n      or transfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\"\n\n      means either the GNU General Public License, Version 2.0, the GNU Lesser\n      General Public License, Version 2.1, the GNU Affero General Public\n      License, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\"\n\n      means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n\n      means an individual or a legal entity exercising rights under this\n      License. For legal entities, \"You\" includes any entity that controls, is\n      controlled by, or is under common control with You. For purposes of this\n      definition, \"control\" means (a) the power, direct or indirect, to cause\n      the direction or management of such entity, whether by contract or\n      otherwise, or (b) ownership of more than fifty percent (50%) of the\n      outstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\n     Each Contributor hereby grants You a world-wide, royalty-free,\n     non-exclusive license:\n\n     a. under intellectual property rights (other than patent or trademark)\n        Licensable by such Contributor to use, reproduce, make available,\n        modify, display, perform, distribute, and otherwise exploit its\n        Contributions, either on an unmodified basis, with Modifications, or\n        as part of a Larger Work; and\n\n     b. under Patent Claims of such Contributor to make, use, sell, offer for\n        sale, have made, import, and otherwise transfer either its\n        Contributions or its Contributor Version.\n\n2.2. Effective Date\n\n     The licenses granted in Section 2.1 with respect to any Contribution\n     become effective for each Contribution on the date the Contributor first\n     distributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\n     The licenses granted in this Section 2 are the only rights granted under\n     this License. No additional rights or licenses will be implied from the\n     distribution or licensing of Covered Software under this License.\n     Notwithstanding Section 2.1(b) above, no patent license is granted by a\n     Contributor:\n\n     a. for any code that a Contributor has removed from Covered Software; or\n\n     b. for infringements caused by: (i) Your and any other third party's\n        modifications of Covered Software, or (ii) the combination of its\n        Contributions with other software (except as part of its Contributor\n        Version); or\n\n     c. under Patent Claims infringed by Covered Software in the absence of\n        its Contributions.\n\n     This License does not grant any rights in the trademarks, service marks,\n     or logos of any Contributor (except as may be necessary to comply with\n     the notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\n     No Contributor makes additional grants as a result of Your choice to\n     distribute the Covered Software under a subsequent version of this\n     License (see Section 10.2) or under the terms of a Secondary License (if\n     permitted under the terms of Section 3.3).\n\n2.5. Representation\n\n     Each Contributor represents that the Contributor believes its\n     Contributions are its original creation(s) or it has sufficient rights to\n     grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\n     This License is not intended to limit any rights You have under\n     applicable copyright doctrines of fair use, fair dealing, or other\n     equivalents.\n\n2.7. Conditions\n\n     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\n     Section 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\n     All distribution of Covered Software in Source Code Form, including any\n     Modifications that You create or to which You contribute, must be under\n     the terms of this License. You must inform recipients that the Source\n     Code Form of the Covered Software is governed by the terms of this\n     License, and how they can obtain a copy of this License. You may not\n     attempt to alter or restrict the recipients' rights in the Source Code\n     Form.\n\n3.2. Distribution of Executable Form\n\n     If You distribute Covered Software in Executable Form then:\n\n     a. such Covered Software must also be made available in Source Code Form,\n        as described in Section 3.1, and You must inform recipients of the\n        Executable Form how they can obtain a copy of such Source Code Form by\n        reasonable means in a timely manner, at a charge no more than the cost\n        of distribution to the recipient; and\n\n     b. You may distribute such Executable Form under the terms of this\n        License, or sublicense it under different terms, provided that the\n        license for the Executable Form does not attempt to limit or alter the\n        recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\n     You may create and distribute a Larger Work under terms of Your choice,\n     provided that You also comply with the requirements of this License for\n     the Covered Software. If the Larger Work is a combination of Covered\n     Software with a work governed by one or more Secondary Licenses, and the\n     Covered Software is not Incompatible With Secondary Licenses, this\n     License permits You to additionally distribute such Covered Software\n     under the terms of such Secondary License(s), so that the recipient of\n     the Larger Work may, at their option, further distribute the Covered\n     Software under the terms of either this License or such Secondary\n     License(s).\n\n3.4. Notices\n\n     You may not remove or alter the substance of any license notices\n     (including copyright notices, patent notices, disclaimers of warranty, or\n     limitations of liability) contained within the Source Code Form of the\n     Covered Software, except that You may alter any license notices to the\n     extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\n     You may choose to offer, and to charge a fee for, warranty, support,\n     indemnity or liability obligations to one or more recipients of Covered\n     Software. However, You may do so only on Your own behalf, and not on\n     behalf of any Contributor. You must make it absolutely clear that any\n     such warranty, support, indemnity, or liability obligation is offered by\n     You alone, and You hereby agree to indemnify every Contributor for any\n     liability incurred by such Contributor as a result of warranty, support,\n     indemnity or liability terms You offer. You may include additional\n     disclaimers of warranty and limitations of liability specific to any\n     jurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\n   If it is impossible for You to comply with any of the terms of this License\n   with respect to some or all of the Covered Software due to statute,\n   judicial order, or regulation then You must: (a) comply with the terms of\n   this License to the maximum extent possible; and (b) describe the\n   limitations and the code they affect. Such description must be placed in a\n   text file included with all distributions of the Covered Software under\n   this License. Except to the extent prohibited by statute or regulation,\n   such description must be sufficiently detailed for a recipient of ordinary\n   skill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\n     fail to comply with any of its terms. However, if You become compliant,\n     then the rights granted under this License from a particular Contributor\n     are reinstated (a) provisionally, unless and until such Contributor\n     explicitly and finally terminates Your grants, and (b) on an ongoing\n     basis, if such Contributor fails to notify You of the non-compliance by\n     some reasonable means prior to 60 days after You have come back into\n     compliance. Moreover, Your grants from a particular Contributor are\n     reinstated on an ongoing basis if such Contributor notifies You of the\n     non-compliance by some reasonable means, this is the first time You have\n     received notice of non-compliance with this License from such\n     Contributor, and You become compliant prior to 30 days after Your receipt\n     of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\n     infringement claim (excluding declaratory judgment actions,\n     counter-claims, and cross-claims) alleging that a Contributor Version\n     directly or indirectly infringes any patent, then the rights granted to\n     You by any and all Contributors for the Covered Software under Section\n     2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\n     license agreements (excluding distributors and resellers) which have been\n     validly granted by You or Your distributors under this License prior to\n     termination shall survive termination.\n\n6. Disclaimer of Warranty\n\n   Covered Software is provided under this License on an \"as is\" basis,\n   without warranty of any kind, either expressed, implied, or statutory,\n   including, without limitation, warranties that the Covered Software is free\n   of defects, merchantable, fit for a particular purpose or non-infringing.\n   The entire risk as to the quality and performance of the Covered Software\n   is with You. Should any Covered Software prove defective in any respect,\n   You (not any Contributor) assume the cost of any necessary servicing,\n   repair, or correction. This disclaimer of warranty constitutes an essential\n   part of this License. No use of  any Covered Software is authorized under\n   this License except under this disclaimer.\n\n7. Limitation of Liability\n\n   Under no circumstances and under no legal theory, whether tort (including\n   negligence), contract, or otherwise, shall any Contributor, or anyone who\n   distributes Covered Software as permitted above, be liable to You for any\n   direct, indirect, special, incidental, or consequential damages of any\n   character including, without limitation, damages for lost profits, loss of\n   goodwill, work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses, even if such party shall have been\n   informed of the possibility of such damages. This limitation of liability\n   shall not apply to liability for death or personal injury resulting from\n   such party's negligence to the extent applicable law prohibits such\n   limitation. Some jurisdictions do not allow the exclusion or limitation of\n   incidental or consequential damages, so this exclusion and limitation may\n   not apply to You.\n\n8. Litigation\n\n   Any litigation relating to this License may be brought only in the courts\n   of a jurisdiction where the defendant maintains its principal place of\n   business and such litigation shall be governed by laws of that\n   jurisdiction, without reference to its conflict-of-law provisions. Nothing\n   in this Section shall prevent a party's ability to bring cross-claims or\n   counter-claims.\n\n9. Miscellaneous\n\n   This License represents the complete agreement concerning the subject\n   matter hereof. If any provision of this License is held to be\n   unenforceable, such provision shall be reformed only to the extent\n   necessary to make it enforceable. Any law or regulation which provides that\n   the language of a contract shall be construed against the drafter shall not\n   be used to construe this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\n      Mozilla Foundation is the license steward. Except as provided in Section\n      10.3, no one other than the license steward has the right to modify or\n      publish new versions of this License. Each version will be given a\n      distinguishing version number.\n\n10.2. Effect of New Versions\n\n      You may distribute the Covered Software under the terms of the version\n      of the License under which You originally received the Covered Software,\n      or under the terms of any subsequent version published by the license\n      steward.\n\n10.3. Modified Versions\n\n      If you create software not governed by this License, and you want to\n      create a new license for such software, you may create and use a\n      modified version of this License if you rename the license and remove\n      any references to the name of the license steward (except to note that\n      such modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\n      Licenses If You choose to distribute Source Code Form that is\n      Incompatible With Secondary Licenses under the terms of this version of\n      the License, the notice described in Exhibit B of this License must be\n      attached.\n\nExhibit A - Source Code Form License Notice\n\n      This Source Code Form is subject to the\n      terms of the Mozilla Public License, v.\n      2.0. If a copy of the MPL was not\n      distributed with this file, You can\n      obtain one at\n      http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a\nnotice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\n      This Source Code Form is \"Incompatible\n      With Secondary Licenses\", as defined by\n      the Mozilla Public License, v. 2.0.\n\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/Makefile",
    "content": "default: test\n\ntest:\n\tgo vet ./...\n\tgo test -v -race ./... -coverprofile=coverage.out\n\nupdatedeps:\n\tgo get -f -t -u ./...\n\tgo get -f -u ./...\n\n.PHONY: default test updatedeps\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/README.md",
    "content": "go-retryablehttp\n================\n\n[![Build Status](http://img.shields.io/travis/hashicorp/go-retryablehttp.svg?style=flat-square)][travis]\n[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs]\n\n[travis]: http://travis-ci.org/hashicorp/go-retryablehttp\n[godocs]: http://godoc.org/github.com/hashicorp/go-retryablehttp\n\nThe `retryablehttp` package provides a familiar HTTP client interface with\nautomatic retries and exponential backoff. It is a thin wrapper over the\nstandard `net/http` client library and exposes nearly the same public API. This\nmakes `retryablehttp` very easy to drop into existing programs.\n\n`retryablehttp` performs automatic retries under certain conditions. Mainly, if\nan error is returned by the client (connection errors, etc.), or if a 500-range\nresponse code is received (except 501), then a retry is invoked after a wait\nperiod.  Otherwise, the response is returned and left to the caller to\ninterpret.\n\nThe main difference from `net/http` is that requests which take a request body\n(POST/PUT et. al) can have the body provided in a number of ways (some more or\nless efficient) that allow \"rewinding\" the request body if the initial request\nfails so that the full request can be attempted again. See the\n[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp) for more\ndetails.\n\nVersion 0.6.0 and before are compatible with Go prior to 1.12. From 0.6.1 onward, Go 1.12+ is required.\nFrom 0.6.7 onward, Go 1.13+ is required.\n\nExample Use\n===========\n\nUsing this library should look almost identical to what you would do with\n`net/http`. The most simple example of a GET request is shown below:\n\n```go\nresp, err := retryablehttp.Get(\"/foo\")\nif err != nil {\n    panic(err)\n}\n```\n\nThe returned response object is an `*http.Response`, the same thing you would\nusually get from `net/http`. Had the request failed one or more times, the above\ncall would block and retry with exponential backoff.\n\n## Getting a stdlib `*http.Client` with retries\n\nIt's possible to convert a `*retryablehttp.Client` directly to a `*http.Client`.\nThis makes use of retryablehttp broadly applicable with minimal effort. Simply\nconfigure a `*retryablehttp.Client` as you wish, and then call `StandardClient()`:\n\n```go\nretryClient := retryablehttp.NewClient()\nretryClient.RetryMax = 10\n\nstandardClient := retryClient.StandardClient() // *http.Client\n```\n\nFor more usage and examples see the\n[pkg.go.dev](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/cert_error_go119.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\n//go:build !go1.20\n// +build !go1.20\n\npackage retryablehttp\n\nimport \"crypto/x509\"\n\nfunc isCertError(err error) bool {\n\t_, ok := err.(x509.UnknownAuthorityError)\n\treturn ok\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/cert_error_go120.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\n//go:build go1.20\n// +build go1.20\n\npackage retryablehttp\n\nimport \"crypto/tls\"\n\nfunc isCertError(err error) bool {\n\t_, ok := err.(*tls.CertificateVerificationError)\n\treturn ok\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/client.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\n// Package retryablehttp provides a familiar HTTP client interface with\n// automatic retries and exponential backoff. It is a thin wrapper over the\n// standard net/http client library and exposes nearly the same public API.\n// This makes retryablehttp very easy to drop into existing programs.\n//\n// retryablehttp performs automatic retries under certain conditions. Mainly, if\n// an error is returned by the client (connection errors etc), or if a 500-range\n// response is received, then a retry is invoked. Otherwise, the response is\n// returned and left to the caller to interpret.\n//\n// Requests which take a request body should provide a non-nil function\n// parameter. The best choice is to provide either a function satisfying\n// ReaderFunc which provides multiple io.Readers in an efficient manner, a\n// *bytes.Buffer (the underlying raw byte slice will be used) or a raw byte\n// slice. As it is a reference type, and we will wrap it as needed by readers,\n// we can efficiently re-use the request body without needing to copy it. If an\n// io.Reader (such as a *bytes.Reader) is provided, the full body will be read\n// prior to the first request, and will be efficiently re-used for any retries.\n// ReadSeeker can be used, but some users have observed occasional data races\n// between the net/http library and the Seek functionality of some\n// implementations of ReadSeeker, so should be avoided if possible.\npackage retryablehttp\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"math\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tcleanhttp \"github.com/hashicorp/go-cleanhttp\"\n)\n\nvar (\n\t// Default retry configuration\n\tdefaultRetryWaitMin = 1 * time.Second\n\tdefaultRetryWaitMax = 30 * time.Second\n\tdefaultRetryMax     = 4\n\n\t// defaultLogger is the logger provided with defaultClient\n\tdefaultLogger = log.New(os.Stderr, \"\", log.LstdFlags)\n\n\t// defaultClient is used for performing requests without explicitly making\n\t// a new client. It is purposely private to avoid modifications.\n\tdefaultClient = NewClient()\n\n\t// We need to consume response bodies to maintain http connections, but\n\t// limit the size we consume to respReadLimit.\n\trespReadLimit = int64(4096)\n\n\t// timeNow sets the function that returns the current time.\n\t// This defaults to time.Now. Changes to this should only be done in tests.\n\ttimeNow = time.Now\n\n\t// A regular expression to match the error returned by net/http when the\n\t// configured number of redirects is exhausted. This error isn't typed\n\t// specifically so we resort to matching on the error string.\n\tredirectsErrorRe = regexp.MustCompile(`stopped after \\d+ redirects\\z`)\n\n\t// A regular expression to match the error returned by net/http when the\n\t// scheme specified in the URL is invalid. This error isn't typed\n\t// specifically so we resort to matching on the error string.\n\tschemeErrorRe = regexp.MustCompile(`unsupported protocol scheme`)\n\n\t// A regular expression to match the error returned by net/http when a\n\t// request header or value is invalid. This error isn't typed\n\t// specifically so we resort to matching on the error string.\n\tinvalidHeaderErrorRe = regexp.MustCompile(`invalid header`)\n\n\t// A regular expression to match the error returned by net/http when the\n\t// TLS certificate is not trusted. This error isn't typed\n\t// specifically so we resort to matching on the error string.\n\tnotTrustedErrorRe = regexp.MustCompile(`certificate is not trusted`)\n)\n\n// ReaderFunc is the type of function that can be given natively to NewRequest\ntype ReaderFunc func() (io.Reader, error)\n\n// ResponseHandlerFunc is a type of function that takes in a Response, and does something with it.\n// The ResponseHandlerFunc is called when the HTTP client successfully receives a response and the\n// CheckRetry function indicates that a retry of the base request is not necessary.\n// If an error is returned from this function, the CheckRetry policy will be used to determine\n// whether to retry the whole request (including this handler).\n//\n// Make sure to check status codes! Even if the request was completed it may have a non-2xx status code.\n//\n// The response body is not automatically closed. It must be closed either by the ResponseHandlerFunc or\n// by the caller out-of-band. Failure to do so will result in a memory leak.\ntype ResponseHandlerFunc func(*http.Response) error\n\n// LenReader is an interface implemented by many in-memory io.Reader's. Used\n// for automatically sending the right Content-Length header when possible.\ntype LenReader interface {\n\tLen() int\n}\n\n// Request wraps the metadata needed to create HTTP requests.\ntype Request struct {\n\t// body is a seekable reader over the request body payload. This is\n\t// used to rewind the request data in between retries.\n\tbody ReaderFunc\n\n\tresponseHandler ResponseHandlerFunc\n\n\t// Embed an HTTP request directly. This makes a *Request act exactly\n\t// like an *http.Request so that all meta methods are supported.\n\t*http.Request\n}\n\n// WithContext returns wrapped Request with a shallow copy of underlying *http.Request\n// with its context changed to ctx. The provided ctx must be non-nil.\nfunc (r *Request) WithContext(ctx context.Context) *Request {\n\treturn &Request{\n\t\tbody:            r.body,\n\t\tresponseHandler: r.responseHandler,\n\t\tRequest:         r.Request.WithContext(ctx),\n\t}\n}\n\n// SetResponseHandler allows setting the response handler.\nfunc (r *Request) SetResponseHandler(fn ResponseHandlerFunc) {\n\tr.responseHandler = fn\n}\n\n// BodyBytes allows accessing the request body. It is an analogue to\n// http.Request's Body variable, but it returns a copy of the underlying data\n// rather than consuming it.\n//\n// This function is not thread-safe; do not call it at the same time as another\n// call, or at the same time this request is being used with Client.Do.\nfunc (r *Request) BodyBytes() ([]byte, error) {\n\tif r.body == nil {\n\t\treturn nil, nil\n\t}\n\tbody, err := r.body()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbuf := new(bytes.Buffer)\n\t_, err = buf.ReadFrom(body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n\n// SetBody allows setting the request body.\n//\n// It is useful if a new body needs to be set without constructing a new Request.\nfunc (r *Request) SetBody(rawBody interface{}) error {\n\tbodyReader, contentLength, err := getBodyReaderAndContentLength(rawBody)\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.body = bodyReader\n\tr.ContentLength = contentLength\n\tif bodyReader != nil {\n\t\tr.GetBody = func() (io.ReadCloser, error) {\n\t\t\tbody, err := bodyReader()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif rc, ok := body.(io.ReadCloser); ok {\n\t\t\t\treturn rc, nil\n\t\t\t}\n\t\t\treturn io.NopCloser(body), nil\n\t\t}\n\t} else {\n\t\tr.GetBody = func() (io.ReadCloser, error) { return http.NoBody, nil }\n\t}\n\treturn nil\n}\n\n// WriteTo allows copying the request body into a writer.\n//\n// It writes data to w until there's no more data to write or\n// when an error occurs. The return int64 value is the number of bytes\n// written. Any error encountered during the write is also returned.\n// The signature matches io.WriterTo interface.\nfunc (r *Request) WriteTo(w io.Writer) (int64, error) {\n\tbody, err := r.body()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif c, ok := body.(io.Closer); ok {\n\t\tdefer c.Close()\n\t}\n\treturn io.Copy(w, body)\n}\n\nfunc getBodyReaderAndContentLength(rawBody interface{}) (ReaderFunc, int64, error) {\n\tvar bodyReader ReaderFunc\n\tvar contentLength int64\n\n\tswitch body := rawBody.(type) {\n\t// If they gave us a function already, great! Use it.\n\tcase ReaderFunc:\n\t\tbodyReader = body\n\t\ttmp, err := body()\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t}\n\t\tif lr, ok := tmp.(LenReader); ok {\n\t\t\tcontentLength = int64(lr.Len())\n\t\t}\n\t\tif c, ok := tmp.(io.Closer); ok {\n\t\t\tc.Close()\n\t\t}\n\n\tcase func() (io.Reader, error):\n\t\tbodyReader = body\n\t\ttmp, err := body()\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t}\n\t\tif lr, ok := tmp.(LenReader); ok {\n\t\t\tcontentLength = int64(lr.Len())\n\t\t}\n\t\tif c, ok := tmp.(io.Closer); ok {\n\t\t\tc.Close()\n\t\t}\n\n\t// If a regular byte slice, we can read it over and over via new\n\t// readers\n\tcase []byte:\n\t\tbuf := body\n\t\tbodyReader = func() (io.Reader, error) {\n\t\t\treturn bytes.NewReader(buf), nil\n\t\t}\n\t\tcontentLength = int64(len(buf))\n\n\t// If a bytes.Buffer we can read the underlying byte slice over and\n\t// over\n\tcase *bytes.Buffer:\n\t\tbuf := body\n\t\tbodyReader = func() (io.Reader, error) {\n\t\t\treturn bytes.NewReader(buf.Bytes()), nil\n\t\t}\n\t\tcontentLength = int64(buf.Len())\n\n\t// We prioritize *bytes.Reader here because we don't really want to\n\t// deal with it seeking so want it to match here instead of the\n\t// io.ReadSeeker case.\n\tcase *bytes.Reader:\n\t\tsnapshot := *body\n\t\tbodyReader = func() (io.Reader, error) {\n\t\t\tr := snapshot\n\t\t\treturn &r, nil\n\t\t}\n\t\tcontentLength = int64(body.Len())\n\n\t// Compat case\n\tcase io.ReadSeeker:\n\t\traw := body\n\t\tbodyReader = func() (io.Reader, error) {\n\t\t\t_, err := raw.Seek(0, 0)\n\t\t\treturn io.NopCloser(raw), err\n\t\t}\n\t\tif lr, ok := raw.(LenReader); ok {\n\t\t\tcontentLength = int64(lr.Len())\n\t\t}\n\n\t// Read all in so we can reset\n\tcase io.Reader:\n\t\tbuf, err := io.ReadAll(body)\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t}\n\t\tif len(buf) == 0 {\n\t\t\tbodyReader = func() (io.Reader, error) {\n\t\t\t\treturn http.NoBody, nil\n\t\t\t}\n\t\t\tcontentLength = 0\n\t\t} else {\n\t\t\tbodyReader = func() (io.Reader, error) {\n\t\t\t\treturn bytes.NewReader(buf), nil\n\t\t\t}\n\t\t\tcontentLength = int64(len(buf))\n\t\t}\n\n\t// No body provided, nothing to do\n\tcase nil:\n\n\t// Unrecognized type\n\tdefault:\n\t\treturn nil, 0, fmt.Errorf(\"cannot handle type %T\", rawBody)\n\t}\n\treturn bodyReader, contentLength, nil\n}\n\n// FromRequest wraps an http.Request in a retryablehttp.Request\nfunc FromRequest(r *http.Request) (*Request, error) {\n\tbodyReader, _, err := getBodyReaderAndContentLength(r.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Could assert contentLength == r.ContentLength\n\treturn &Request{body: bodyReader, Request: r}, nil\n}\n\n// NewRequest creates a new wrapped request.\nfunc NewRequest(method, url string, rawBody interface{}) (*Request, error) {\n\treturn NewRequestWithContext(context.Background(), method, url, rawBody)\n}\n\n// NewRequestWithContext creates a new wrapped request with the provided context.\n//\n// The context controls the entire lifetime of a request and its response:\n// obtaining a connection, sending the request, and reading the response headers and body.\nfunc NewRequestWithContext(ctx context.Context, method, url string, rawBody interface{}) (*Request, error) {\n\thttpReq, err := http.NewRequestWithContext(ctx, method, url, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treq := &Request{\n\t\tRequest: httpReq,\n\t}\n\tif err := req.SetBody(rawBody); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn req, nil\n}\n\n// Logger interface allows to use other loggers than\n// standard log.Logger.\ntype Logger interface {\n\tPrintf(string, ...interface{})\n}\n\n// LeveledLogger is an interface that can be implemented by any logger or a\n// logger wrapper to provide leveled logging. The methods accept a message\n// string and a variadic number of key-value pairs. For log.Printf style\n// formatting where message string contains a format specifier, use Logger\n// interface.\ntype LeveledLogger interface {\n\tError(msg string, keysAndValues ...interface{})\n\tInfo(msg string, keysAndValues ...interface{})\n\tDebug(msg string, keysAndValues ...interface{})\n\tWarn(msg string, keysAndValues ...interface{})\n}\n\n// hookLogger adapts an LeveledLogger to Logger for use by the existing hook functions\n// without changing the API.\ntype hookLogger struct {\n\tLeveledLogger\n}\n\nfunc (h hookLogger) Printf(s string, args ...interface{}) {\n\th.Info(fmt.Sprintf(s, args...))\n}\n\n// RequestLogHook allows a function to run before each retry. The HTTP\n// request which will be made, and the retry number (0 for the initial\n// request) are available to users. The internal logger is exposed to\n// consumers.\ntype RequestLogHook func(Logger, *http.Request, int)\n\n// ResponseLogHook is like RequestLogHook, but allows running a function\n// on each HTTP response. This function will be invoked at the end of\n// every HTTP request executed, regardless of whether a subsequent retry\n// needs to be performed or not. If the response body is read or closed\n// from this method, this will affect the response returned from Do().\ntype ResponseLogHook func(Logger, *http.Response)\n\n// CheckRetry specifies a policy for handling retries. It is called\n// following each request with the response and error values returned by\n// the http.Client. If CheckRetry returns false, the Client stops retrying\n// and returns the response to the caller. If CheckRetry returns an error,\n// that error value is returned in lieu of the error from the request. The\n// Client will close any response body when retrying, but if the retry is\n// aborted it is up to the CheckRetry callback to properly close any\n// response body before returning.\ntype CheckRetry func(ctx context.Context, resp *http.Response, err error) (bool, error)\n\n// Backoff specifies a policy for how long to wait between retries.\n// It is called after a failing request to determine the amount of time\n// that should pass before trying again.\ntype Backoff func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration\n\n// ErrorHandler is called if retries are expired, containing the last status\n// from the http library. If not specified, default behavior for the library is\n// to close the body and return an error indicating how many tries were\n// attempted. If overriding this, be sure to close the body if needed.\ntype ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Response, error)\n\n// PrepareRetry is called before retry operation. It can be used for example to re-sign the request\ntype PrepareRetry func(req *http.Request) error\n\n// Client is used to make HTTP requests. It adds additional functionality\n// like automatic retries to tolerate minor outages.\ntype Client struct {\n\tHTTPClient *http.Client // Internal HTTP client.\n\tLogger     interface{}  // Customer logger instance. Can be either Logger or LeveledLogger\n\n\tRetryWaitMin time.Duration // Minimum time to wait\n\tRetryWaitMax time.Duration // Maximum time to wait\n\tRetryMax     int           // Maximum number of retries\n\n\t// RequestLogHook allows a user-supplied function to be called\n\t// before each retry.\n\tRequestLogHook RequestLogHook\n\n\t// ResponseLogHook allows a user-supplied function to be called\n\t// with the response from each HTTP request executed.\n\tResponseLogHook ResponseLogHook\n\n\t// CheckRetry specifies the policy for handling retries, and is called\n\t// after each request. The default policy is DefaultRetryPolicy.\n\tCheckRetry CheckRetry\n\n\t// Backoff specifies the policy for how long to wait between retries\n\tBackoff Backoff\n\n\t// ErrorHandler specifies the custom error handler to use, if any\n\tErrorHandler ErrorHandler\n\n\t// PrepareRetry can prepare the request for retry operation, for example re-sign it\n\tPrepareRetry PrepareRetry\n\n\tloggerInit sync.Once\n\tclientInit sync.Once\n}\n\n// NewClient creates a new Client with default settings.\nfunc NewClient() *Client {\n\treturn &Client{\n\t\tHTTPClient:   cleanhttp.DefaultPooledClient(),\n\t\tLogger:       defaultLogger,\n\t\tRetryWaitMin: defaultRetryWaitMin,\n\t\tRetryWaitMax: defaultRetryWaitMax,\n\t\tRetryMax:     defaultRetryMax,\n\t\tCheckRetry:   DefaultRetryPolicy,\n\t\tBackoff:      DefaultBackoff,\n\t}\n}\n\nfunc (c *Client) logger() interface{} {\n\tc.loggerInit.Do(func() {\n\t\tif c.Logger == nil {\n\t\t\treturn\n\t\t}\n\n\t\tswitch c.Logger.(type) {\n\t\tcase Logger, LeveledLogger:\n\t\t\t// ok\n\t\tdefault:\n\t\t\t// This should happen in dev when they are setting Logger and work on code, not in prod.\n\t\t\tpanic(fmt.Sprintf(\"invalid logger type passed, must be Logger or LeveledLogger, was %T\", c.Logger))\n\t\t}\n\t})\n\n\treturn c.Logger\n}\n\n// DefaultRetryPolicy provides a default callback for Client.CheckRetry, which\n// will retry on connection errors and server errors.\nfunc DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) {\n\t// do not retry on context.Canceled or context.DeadlineExceeded\n\tif ctx.Err() != nil {\n\t\treturn false, ctx.Err()\n\t}\n\n\t// don't propagate other errors\n\tshouldRetry, _ := baseRetryPolicy(resp, err)\n\treturn shouldRetry, nil\n}\n\n// ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it\n// propagates errors back instead of returning nil. This allows you to inspect\n// why it decided to retry or not.\nfunc ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) {\n\t// do not retry on context.Canceled or context.DeadlineExceeded\n\tif ctx.Err() != nil {\n\t\treturn false, ctx.Err()\n\t}\n\n\treturn baseRetryPolicy(resp, err)\n}\n\nfunc baseRetryPolicy(resp *http.Response, err error) (bool, error) {\n\tif err != nil {\n\t\tif v, ok := err.(*url.Error); ok {\n\t\t\t// Don't retry if the error was due to too many redirects.\n\t\t\tif redirectsErrorRe.MatchString(v.Error()) {\n\t\t\t\treturn false, v\n\t\t\t}\n\n\t\t\t// Don't retry if the error was due to an invalid protocol scheme.\n\t\t\tif schemeErrorRe.MatchString(v.Error()) {\n\t\t\t\treturn false, v\n\t\t\t}\n\n\t\t\t// Don't retry if the error was due to an invalid header.\n\t\t\tif invalidHeaderErrorRe.MatchString(v.Error()) {\n\t\t\t\treturn false, v\n\t\t\t}\n\n\t\t\t// Don't retry if the error was due to TLS cert verification failure.\n\t\t\tif notTrustedErrorRe.MatchString(v.Error()) {\n\t\t\t\treturn false, v\n\t\t\t}\n\t\t\tif isCertError(v.Err) {\n\t\t\t\treturn false, v\n\t\t\t}\n\t\t}\n\n\t\t// The error is likely recoverable so retry.\n\t\treturn true, nil\n\t}\n\n\t// 429 Too Many Requests is recoverable. Sometimes the server puts\n\t// a Retry-After response header to indicate when the server is\n\t// available to start processing request from client.\n\tif resp.StatusCode == http.StatusTooManyRequests {\n\t\treturn true, nil\n\t}\n\n\t// Check the response code. We retry on 500-range responses to allow\n\t// the server time to recover, as 500's are typically not permanent\n\t// errors and may relate to outages on the server side. This will catch\n\t// invalid response codes as well, like 0 and 999.\n\tif resp.StatusCode == 0 || (resp.StatusCode >= 500 && resp.StatusCode != http.StatusNotImplemented) {\n\t\treturn true, fmt.Errorf(\"unexpected HTTP status %s\", resp.Status)\n\t}\n\n\treturn false, nil\n}\n\n// DefaultBackoff provides a default callback for Client.Backoff which\n// will perform exponential backoff based on the attempt number and limited\n// by the provided minimum and maximum durations.\n//\n// It also tries to parse Retry-After response header when a http.StatusTooManyRequests\n// (HTTP Code 429) is found in the resp parameter. Hence it will return the number of\n// seconds the server states it may be ready to process more requests from this client.\nfunc DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {\n\tif resp != nil {\n\t\tif resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable {\n\t\t\tif sleep, ok := parseRetryAfterHeader(resp.Header[\"Retry-After\"]); ok {\n\t\t\t\treturn sleep\n\t\t\t}\n\t\t}\n\t}\n\n\tmult := math.Pow(2, float64(attemptNum)) * float64(min)\n\tsleep := time.Duration(mult)\n\tif float64(sleep) != mult || sleep > max {\n\t\tsleep = max\n\t}\n\treturn sleep\n}\n\n// parseRetryAfterHeader parses the Retry-After header and returns the\n// delay duration according to the spec: https://httpwg.org/specs/rfc7231.html#header.retry-after\n// The bool returned will be true if the header was successfully parsed.\n// Otherwise, the header was either not present, or was not parseable according to the spec.\n//\n// Retry-After headers come in two flavors: Seconds or HTTP-Date\n//\n// Examples:\n// * Retry-After: Fri, 31 Dec 1999 23:59:59 GMT\n// * Retry-After: 120\nfunc parseRetryAfterHeader(headers []string) (time.Duration, bool) {\n\tif len(headers) == 0 || headers[0] == \"\" {\n\t\treturn 0, false\n\t}\n\theader := headers[0]\n\t// Retry-After: 120\n\tif sleep, err := strconv.ParseInt(header, 10, 64); err == nil {\n\t\tif sleep < 0 { // a negative sleep doesn't make sense\n\t\t\treturn 0, false\n\t\t}\n\t\treturn time.Second * time.Duration(sleep), true\n\t}\n\n\t// Retry-After: Fri, 31 Dec 1999 23:59:59 GMT\n\tretryTime, err := time.Parse(time.RFC1123, header)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\tif until := retryTime.Sub(timeNow()); until > 0 {\n\t\treturn until, true\n\t}\n\t// date is in the past\n\treturn 0, true\n}\n\n// LinearJitterBackoff provides a callback for Client.Backoff which will\n// perform linear backoff based on the attempt number and with jitter to\n// prevent a thundering herd.\n//\n// min and max here are *not* absolute values. The number to be multiplied by\n// the attempt number will be chosen at random from between them, thus they are\n// bounding the jitter.\n//\n// For instance:\n// * To get strictly linear backoff of one second increasing each retry, set\n// both to one second (1s, 2s, 3s, 4s, ...)\n// * To get a small amount of jitter centered around one second increasing each\n// retry, set to around one second, such as a min of 800ms and max of 1200ms\n// (892ms, 2102ms, 2945ms, 4312ms, ...)\n// * To get extreme jitter, set to a very wide spread, such as a min of 100ms\n// and a max of 20s (15382ms, 292ms, 51321ms, 35234ms, ...)\nfunc LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {\n\t// attemptNum always starts at zero but we want to start at 1 for multiplication\n\tattemptNum++\n\n\tif max <= min {\n\t\t// Unclear what to do here, or they are the same, so return min *\n\t\t// attemptNum\n\t\treturn min * time.Duration(attemptNum)\n\t}\n\n\t// Seed rand; doing this every time is fine\n\tsource := rand.New(rand.NewSource(int64(time.Now().Nanosecond())))\n\n\t// Pick a random number that lies somewhere between the min and max and\n\t// multiply by the attemptNum. attemptNum starts at zero so we always\n\t// increment here. We first get a random percentage, then apply that to the\n\t// difference between min and max, and add to min.\n\tjitter := source.Float64() * float64(max-min)\n\tjitterMin := int64(jitter) + int64(min)\n\treturn time.Duration(jitterMin * int64(attemptNum))\n}\n\n// RateLimitLinearJitterBackoff wraps the retryablehttp.LinearJitterBackoff.\n// It first checks if the response status code is http.StatusTooManyRequests\n// (HTTP Code 429) or http.StatusServiceUnavailable (HTTP Code 503). If it is\n// and the response contains a Retry-After response header, it will wait the\n// amount of time specified by the header. Otherwise, this calls\n// LinearJitterBackoff.\nfunc RateLimitLinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {\n\tif resp != nil {\n\t\tif resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable {\n\t\t\tif sleep, ok := parseRetryAfterHeader(resp.Header[\"Retry-After\"]); ok {\n\t\t\t\treturn sleep\n\t\t\t}\n\t\t}\n\t}\n\treturn LinearJitterBackoff(min, max, attemptNum, resp)\n}\n\n// PassthroughErrorHandler is an ErrorHandler that directly passes through the\n// values from the net/http library for the final request. The body is not\n// closed.\nfunc PassthroughErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) {\n\treturn resp, err\n}\n\n// Do wraps calling an HTTP method with retries.\nfunc (c *Client) Do(req *Request) (*http.Response, error) {\n\tc.clientInit.Do(func() {\n\t\tif c.HTTPClient == nil {\n\t\t\tc.HTTPClient = cleanhttp.DefaultPooledClient()\n\t\t}\n\t})\n\n\tlogger := c.logger()\n\n\tif logger != nil {\n\t\tswitch v := logger.(type) {\n\t\tcase LeveledLogger:\n\t\t\tv.Debug(\"performing request\", \"method\", req.Method, \"url\", redactURL(req.URL))\n\t\tcase Logger:\n\t\t\tv.Printf(\"[DEBUG] %s %s\", req.Method, redactURL(req.URL))\n\t\t}\n\t}\n\n\tvar resp *http.Response\n\tvar attempt int\n\tvar shouldRetry bool\n\tvar doErr, respErr, checkErr, prepareErr error\n\n\tfor i := 0; ; i++ {\n\t\tdoErr, respErr, prepareErr = nil, nil, nil\n\t\tattempt++\n\n\t\t// Always rewind the request body when non-nil.\n\t\tif req.body != nil {\n\t\t\tbody, err := req.body()\n\t\t\tif err != nil {\n\t\t\t\tc.HTTPClient.CloseIdleConnections()\n\t\t\t\treturn resp, err\n\t\t\t}\n\t\t\tif c, ok := body.(io.ReadCloser); ok {\n\t\t\t\treq.Body = c\n\t\t\t} else {\n\t\t\t\treq.Body = io.NopCloser(body)\n\t\t\t}\n\t\t}\n\n\t\tif c.RequestLogHook != nil {\n\t\t\tswitch v := logger.(type) {\n\t\t\tcase LeveledLogger:\n\t\t\t\tc.RequestLogHook(hookLogger{v}, req.Request, i)\n\t\t\tcase Logger:\n\t\t\t\tc.RequestLogHook(v, req.Request, i)\n\t\t\tdefault:\n\t\t\t\tc.RequestLogHook(nil, req.Request, i)\n\t\t\t}\n\t\t}\n\n\t\t// Attempt the request\n\t\tresp, doErr = c.HTTPClient.Do(req.Request)\n\n\t\t// Check if we should continue with retries.\n\t\tshouldRetry, checkErr = c.CheckRetry(req.Context(), resp, doErr)\n\t\tif !shouldRetry && doErr == nil && req.responseHandler != nil {\n\t\t\trespErr = req.responseHandler(resp)\n\t\t\tshouldRetry, checkErr = c.CheckRetry(req.Context(), resp, respErr)\n\t\t}\n\n\t\terr := doErr\n\t\tif respErr != nil {\n\t\t\terr = respErr\n\t\t}\n\t\tif err != nil {\n\t\t\tswitch v := logger.(type) {\n\t\t\tcase LeveledLogger:\n\t\t\t\tv.Error(\"request failed\", \"error\", err, \"method\", req.Method, \"url\", redactURL(req.URL))\n\t\t\tcase Logger:\n\t\t\t\tv.Printf(\"[ERR] %s %s request failed: %v\", req.Method, redactURL(req.URL), err)\n\t\t\t}\n\t\t} else {\n\t\t\t// Call this here to maintain the behavior of logging all requests,\n\t\t\t// even if CheckRetry signals to stop.\n\t\t\tif c.ResponseLogHook != nil {\n\t\t\t\t// Call the response logger function if provided.\n\t\t\t\tswitch v := logger.(type) {\n\t\t\t\tcase LeveledLogger:\n\t\t\t\t\tc.ResponseLogHook(hookLogger{v}, resp)\n\t\t\t\tcase Logger:\n\t\t\t\t\tc.ResponseLogHook(v, resp)\n\t\t\t\tdefault:\n\t\t\t\t\tc.ResponseLogHook(nil, resp)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif !shouldRetry {\n\t\t\tbreak\n\t\t}\n\n\t\t// We do this before drainBody because there's no need for the I/O if\n\t\t// we're breaking out\n\t\tremain := c.RetryMax - i\n\t\tif remain <= 0 {\n\t\t\tbreak\n\t\t}\n\n\t\t// We're going to retry, consume any response to reuse the connection.\n\t\tif doErr == nil {\n\t\t\tc.drainBody(resp.Body)\n\t\t}\n\n\t\twait := c.Backoff(c.RetryWaitMin, c.RetryWaitMax, i, resp)\n\t\tif logger != nil {\n\t\t\tdesc := fmt.Sprintf(\"%s %s\", req.Method, redactURL(req.URL))\n\t\t\tif resp != nil {\n\t\t\t\tdesc = fmt.Sprintf(\"%s (status: %d)\", desc, resp.StatusCode)\n\t\t\t}\n\t\t\tswitch v := logger.(type) {\n\t\t\tcase LeveledLogger:\n\t\t\t\tv.Debug(\"retrying request\", \"request\", desc, \"timeout\", wait, \"remaining\", remain)\n\t\t\tcase Logger:\n\t\t\t\tv.Printf(\"[DEBUG] %s: retrying in %s (%d left)\", desc, wait, remain)\n\t\t\t}\n\t\t}\n\t\ttimer := time.NewTimer(wait)\n\t\tselect {\n\t\tcase <-req.Context().Done():\n\t\t\ttimer.Stop()\n\t\t\tc.HTTPClient.CloseIdleConnections()\n\t\t\treturn nil, req.Context().Err()\n\t\tcase <-timer.C:\n\t\t}\n\n\t\t// Make shallow copy of http Request so that we can modify its body\n\t\t// without racing against the closeBody call in persistConn.writeLoop.\n\t\thttpreq := *req.Request\n\t\treq.Request = &httpreq\n\n\t\tif c.PrepareRetry != nil {\n\t\t\tif err := c.PrepareRetry(req.Request); err != nil {\n\t\t\t\tprepareErr = err\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t// this is the closest we have to success criteria\n\tif doErr == nil && respErr == nil && checkErr == nil && prepareErr == nil && !shouldRetry {\n\t\treturn resp, nil\n\t}\n\n\tdefer c.HTTPClient.CloseIdleConnections()\n\n\tvar err error\n\tif prepareErr != nil {\n\t\terr = prepareErr\n\t} else if checkErr != nil {\n\t\terr = checkErr\n\t} else if respErr != nil {\n\t\terr = respErr\n\t} else {\n\t\terr = doErr\n\t}\n\n\tif c.ErrorHandler != nil {\n\t\treturn c.ErrorHandler(resp, err, attempt)\n\t}\n\n\t// By default, we close the response body and return an error without\n\t// returning the response\n\tif resp != nil {\n\t\tc.drainBody(resp.Body)\n\t}\n\n\t// this means CheckRetry thought the request was a failure, but didn't\n\t// communicate why\n\tif err == nil {\n\t\treturn nil, fmt.Errorf(\"%s %s giving up after %d attempt(s)\",\n\t\t\treq.Method, redactURL(req.URL), attempt)\n\t}\n\n\treturn nil, fmt.Errorf(\"%s %s giving up after %d attempt(s): %w\",\n\t\treq.Method, redactURL(req.URL), attempt, err)\n}\n\n// Try to read the response body so we can reuse this connection.\nfunc (c *Client) drainBody(body io.ReadCloser) {\n\tdefer body.Close()\n\t_, err := io.Copy(io.Discard, io.LimitReader(body, respReadLimit))\n\tif err != nil {\n\t\tif c.logger() != nil {\n\t\t\tswitch v := c.logger().(type) {\n\t\t\tcase LeveledLogger:\n\t\t\t\tv.Error(\"error reading response body\", \"error\", err)\n\t\t\tcase Logger:\n\t\t\t\tv.Printf(\"[ERR] error reading response body: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Get is a shortcut for doing a GET request without making a new client.\nfunc Get(url string) (*http.Response, error) {\n\treturn defaultClient.Get(url)\n}\n\n// Get is a convenience helper for doing simple GET requests.\nfunc (c *Client) Get(url string) (*http.Response, error) {\n\treq, err := NewRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c.Do(req)\n}\n\n// Head is a shortcut for doing a HEAD request without making a new client.\nfunc Head(url string) (*http.Response, error) {\n\treturn defaultClient.Head(url)\n}\n\n// Head is a convenience method for doing simple HEAD requests.\nfunc (c *Client) Head(url string) (*http.Response, error) {\n\treq, err := NewRequest(\"HEAD\", url, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c.Do(req)\n}\n\n// Post is a shortcut for doing a POST request without making a new client.\n// The bodyType parameter sets the \"Content-Type\" header of the request.\nfunc Post(url, bodyType string, body interface{}) (*http.Response, error) {\n\treturn defaultClient.Post(url, bodyType, body)\n}\n\n// Post is a convenience method for doing simple POST requests.\n// The bodyType parameter sets the \"Content-Type\" header of the request.\nfunc (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) {\n\treq, err := NewRequest(\"POST\", url, body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.Header.Set(\"Content-Type\", bodyType)\n\treturn c.Do(req)\n}\n\n// PostForm is a shortcut to perform a POST with form data without creating\n// a new client.\nfunc PostForm(url string, data url.Values) (*http.Response, error) {\n\treturn defaultClient.PostForm(url, data)\n}\n\n// PostForm is a convenience method for doing simple POST operations using\n// pre-filled url.Values form data.\nfunc (c *Client) PostForm(url string, data url.Values) (*http.Response, error) {\n\treturn c.Post(url, \"application/x-www-form-urlencoded\", strings.NewReader(data.Encode()))\n}\n\n// StandardClient returns a stdlib *http.Client with a custom Transport, which\n// shims in a *retryablehttp.Client for added retries.\nfunc (c *Client) StandardClient() *http.Client {\n\treturn &http.Client{\n\t\tTransport: &RoundTripper{Client: c},\n\t}\n}\n\n// Taken from url.URL#Redacted() which was introduced in go 1.15.\n// We can switch to using it directly if we'll bump the minimum required go version.\nfunc redactURL(u *url.URL) string {\n\tif u == nil {\n\t\treturn \"\"\n\t}\n\n\tru := *u\n\tif _, has := ru.User.Password(); has {\n\t\tru.User = url.UserPassword(ru.User.Username(), \"xxxxx\")\n\t}\n\treturn ru.String()\n}\n"
  },
  {
    "path": "vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go",
    "content": "// Copyright (c) HashiCorp, Inc.\n// SPDX-License-Identifier: MPL-2.0\n\npackage retryablehttp\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"sync\"\n)\n\n// RoundTripper implements the http.RoundTripper interface, using a retrying\n// HTTP client to execute requests.\n//\n// It is important to note that retryablehttp doesn't always act exactly as a\n// RoundTripper should. This is highly dependent on the retryable client's\n// configuration.\ntype RoundTripper struct {\n\t// The client to use during requests. If nil, the default retryablehttp\n\t// client and settings will be used.\n\tClient *Client\n\n\t// once ensures that the logic to initialize the default client runs at\n\t// most once, in a single thread.\n\tonce sync.Once\n}\n\n// init initializes the underlying retryable client.\nfunc (rt *RoundTripper) init() {\n\tif rt.Client == nil {\n\t\trt.Client = NewClient()\n\t}\n}\n\n// RoundTrip satisfies the http.RoundTripper interface.\nfunc (rt *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {\n\trt.once.Do(rt.init)\n\n\t// Convert the request to be retryable.\n\tretryableReq, err := FromRequest(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Execute the request.\n\tresp, err := rt.Client.Do(retryableReq)\n\t// If we got an error returned by standard library's `Do` method, unwrap it\n\t// otherwise we will wind up erroneously re-nesting the error.\n\tif _, ok := err.(*url.Error); ok {\n\t\treturn resp, errors.Unwrap(err)\n\t}\n\n\treturn resp, err\n}\n"
  },
  {
    "path": "vendor/github.com/inconshreveable/mousetrap/LICENSE",
    "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 2022 Alan Shreve (@inconshreveable)\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/inconshreveable/mousetrap/README.md",
    "content": "# mousetrap\n\nmousetrap is a tiny library that answers a single question.\n\nOn a Windows machine, was the process invoked by someone double clicking on\nthe executable file while browsing in explorer?\n\n### Motivation\n\nWindows developers unfamiliar with command line tools will often \"double-click\"\nthe executable for a tool. Because most CLI tools print the help and then exit\nwhen invoked without arguments, this is often very frustrating for those users.\n\nmousetrap provides a way to detect these invocations so that you can provide\nmore helpful behavior and instructions on how to run the CLI tool. To see what\nthis looks like, both from an organizational and a technical perspective, see\nhttps://inconshreveable.com/09-09-2014/sweat-the-small-stuff/\n\n### The interface\n\nThe library exposes a single interface:\n\n    func StartedByExplorer() (bool)\n"
  },
  {
    "path": "vendor/github.com/inconshreveable/mousetrap/trap_others.go",
    "content": "//go:build !windows\n// +build !windows\n\npackage mousetrap\n\n// StartedByExplorer returns true if the program was invoked by the user\n// double-clicking on the executable from explorer.exe\n//\n// It is conservative and returns false if any of the internal calls fail.\n// It does not guarantee that the program was run from a terminal. It only can tell you\n// whether it was launched from explorer.exe\n//\n// On non-Windows platforms, it always returns false.\nfunc StartedByExplorer() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/inconshreveable/mousetrap/trap_windows.go",
    "content": "package mousetrap\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {\n\tsnapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer syscall.CloseHandle(snapshot)\n\tvar procEntry syscall.ProcessEntry32\n\tprocEntry.Size = uint32(unsafe.Sizeof(procEntry))\n\tif err = syscall.Process32First(snapshot, &procEntry); err != nil {\n\t\treturn nil, err\n\t}\n\tfor {\n\t\tif procEntry.ProcessID == uint32(pid) {\n\t\t\treturn &procEntry, nil\n\t\t}\n\t\terr = syscall.Process32Next(snapshot, &procEntry)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n}\n\n// StartedByExplorer returns true if the program was invoked by the user double-clicking\n// on the executable from explorer.exe\n//\n// It is conservative and returns false if any of the internal calls fail.\n// It does not guarantee that the program was run from a terminal. It only can tell you\n// whether it was launched from explorer.exe\nfunc StartedByExplorer() bool {\n\tpe, err := getProcessEntry(syscall.Getppid())\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn \"explorer.exe\" == syscall.UTF16ToString(pe.ExeFile[:])\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/.gitattributes",
    "content": "* -text\n*.bin -text -diff\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/.gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\n*.test\n*.prof\n/s2/cmd/_s2sx/sfx-exe\n\n# Linux perf files\nperf.data\nperf.data.old\n\n# gdb history\n.gdb_history\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/.goreleaser.yml",
    "content": "version: 2\n\nbefore:\n  hooks:\n    - ./gen.sh\n\nbuilds:\n  -\n    id: \"s2c\"\n    binary: s2c\n    main: ./s2/cmd/s2c/main.go\n    flags:\n      - -trimpath\n    env:\n      - CGO_ENABLED=0\n    goos:\n      - aix\n      - linux\n      - freebsd\n      - netbsd\n      - windows\n      - darwin\n    goarch:\n      - 386\n      - amd64\n      - arm\n      - arm64\n      - ppc64\n      - ppc64le\n      - mips64\n      - mips64le\n    goarm:\n      - 7\n  -\n    id: \"s2d\"\n    binary: s2d\n    main: ./s2/cmd/s2d/main.go\n    flags:\n      - -trimpath\n    env:\n      - CGO_ENABLED=0\n    goos:\n      - aix\n      - linux\n      - freebsd\n      - netbsd\n      - windows\n      - darwin\n    goarch:\n      - 386\n      - amd64\n      - arm\n      - arm64\n      - ppc64\n      - ppc64le\n      - mips64\n      - mips64le\n    goarm:\n      - 7\n  -\n    id: \"s2sx\"\n    binary: s2sx\n    main: ./s2/cmd/_s2sx/main.go\n    flags:\n      - -modfile=s2sx.mod\n      - -trimpath\n    env:\n      - CGO_ENABLED=0\n    goos:\n      - aix\n      - linux\n      - freebsd\n      - netbsd\n      - windows\n      - darwin\n    goarch:\n      - 386\n      - amd64\n      - arm\n      - arm64\n      - ppc64\n      - ppc64le\n      - mips64\n      - mips64le\n    goarm:\n      - 7\n\narchives:\n  -\n    id: s2-binaries\n    name_template: \"s2-{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}\"\n    format_overrides:\n      - goos: windows\n        format: zip\n    files:\n      - unpack/*\n      - s2/LICENSE\n      - s2/README.md\nchecksum:\n  name_template: 'checksums.txt'\nsnapshot:\n  version_template: \"{{ .Tag }}-next\"\nchangelog:\n  sort: asc\n  filters:\n    exclude:\n    - '^doc:'\n    - '^docs:'\n    - '^test:'\n    - '^tests:'\n    - '^Update\\sREADME.md'\n\nnfpms:\n  -\n    file_name_template: \"s2_package__{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}\"\n    vendor: Klaus Post\n    homepage: https://github.com/klauspost/compress\n    maintainer: Klaus Post <klauspost@gmail.com>\n    description: S2 Compression Tool\n    license: BSD 3-Clause\n    formats:\n      - deb\n      - rpm\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/LICENSE",
    "content": "Copyright (c) 2012 The Go Authors. All rights reserved.\nCopyright (c) 2019 Klaus Post. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n------------------\n\nFiles: gzhttp/*\n\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 2016-2017 The New York Times Company\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n------------------\n\nFiles: s2/cmd/internal/readahead/*\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Klaus Post\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\n---------------------\nFiles: snappy/*\nFiles: internal/snapref/*\n\nCopyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n-----------------\n\nFiles: s2/cmd/internal/filepathx/*\n\nCopyright 2016 The filepathx Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/README.md",
    "content": "# compress\r\n\r\nThis package provides various compression algorithms.\r\n\r\n* [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression in pure Go.\r\n* [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) is a high performance replacement for Snappy.\r\n* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib).\r\n* [snappy](https://github.com/klauspost/compress/tree/master/snappy) is a drop-in replacement for `github.com/golang/snappy` offering better compression and concurrent streams.\r\n* [huff0](https://github.com/klauspost/compress/tree/master/huff0) and [FSE](https://github.com/klauspost/compress/tree/master/fse) implementations for raw entropy encoding.\r\n* [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp) Provides client and server wrappers for handling gzipped/zstd HTTP requests efficiently.\r\n* [pgzip](https://github.com/klauspost/pgzip) is a separate package that provides a very fast parallel gzip implementation.\r\n\r\n[![Go Reference](https://pkg.go.dev/badge/klauspost/compress.svg)](https://pkg.go.dev/github.com/klauspost/compress?tab=subdirectories)\r\n[![Go](https://github.com/klauspost/compress/actions/workflows/go.yml/badge.svg)](https://github.com/klauspost/compress/actions/workflows/go.yml)\r\n[![Sourcegraph Badge](https://sourcegraph.com/github.com/klauspost/compress/-/badge.svg)](https://sourcegraph.com/github.com/klauspost/compress?badge)\r\n\r\n# package usage\r\n\r\nUse `go get github.com/klauspost/compress@latest` to add it to your project.\r\n\r\nThis package will support the current Go version and 2 versions back.\r\n\r\n* Use the `nounsafe` tag to disable all use of the \"unsafe\" package.\r\n* Use the `noasm` tag to disable all assembly across packages.\r\n\r\nUse the links above for more information on each.\r\n\r\n# changelog\r\n* Jan 16th, 2026 [1.18.3](https://github.com/klauspost/compress/releases/tag/v1.18.3)\r\n\t* Downstream CVE-2025-61728. See [golang/go#77102](https://github.com/golang/go/issues/77102).\r\n\r\n* Dec 1st, 2025 - [1.18.2](https://github.com/klauspost/compress/releases/tag/v1.18.2)\r\n\t* flate: Fix invalid encoding on level 9 with single value input in https://github.com/klauspost/compress/pull/1115\r\n\t* flate: reduce stateless allocations by @RXamzin in https://github.com/klauspost/compress/pull/1106\r\n\r\n* Oct 20, 2025 - [1.18.1](https://github.com/klauspost/compress/releases/tag/v1.18.1) - RETRACTED\r\n  * zstd: Add simple zstd EncodeTo/DecodeTo functions  https://github.com/klauspost/compress/pull/1079\r\n  * zstd: Fix incorrect buffer size in dictionary encodes https://github.com/klauspost/compress/pull/1059\r\n  * s2: check for cap, not len of buffer in EncodeBetter/Best by @vdarulis in https://github.com/klauspost/compress/pull/1080\r\n  * zlib: Avoiding extra allocation in zlib.reader.Reset by @travelpolicy in https://github.com/klauspost/compress/pull/1086\r\n  * gzhttp: remove redundant err check in zstdReader by @ryanfowler in https://github.com/klauspost/compress/pull/1090\r\n  * flate: Faster load+store https://github.com/klauspost/compress/pull/1104\r\n  * flate: Simplify matchlen https://github.com/klauspost/compress/pull/1101\r\n  * flate: Use exact sizes for huffman tables https://github.com/klauspost/compress/pull/1103\r\n\r\n* Feb 19th, 2025 - [1.18.0](https://github.com/klauspost/compress/releases/tag/v1.18.0)\r\n  * Add unsafe little endian loaders https://github.com/klauspost/compress/pull/1036\r\n  * fix: check `r.err != nil` but return a nil value error `err` by @alingse in https://github.com/klauspost/compress/pull/1028\r\n  * flate: Simplify L4-6 loading https://github.com/klauspost/compress/pull/1043\r\n  * flate: Simplify matchlen (remove asm) https://github.com/klauspost/compress/pull/1045\r\n  * s2: Improve small block compression speed w/o asm https://github.com/klauspost/compress/pull/1048\r\n  * flate: Fix matchlen L5+L6 https://github.com/klauspost/compress/pull/1049\r\n  * flate: Cleanup & reduce casts https://github.com/klauspost/compress/pull/1050\r\n\r\n<details>\r\n\t<summary>See changes to v1.17.x</summary>\r\n\r\n* Oct 11th, 2024 - [1.17.11](https://github.com/klauspost/compress/releases/tag/v1.17.11)\r\n  * zstd: Fix extra CRC written with multiple Close calls https://github.com/klauspost/compress/pull/1017\r\n  * s2: Don't use stack for index tables https://github.com/klauspost/compress/pull/1014\r\n  * gzhttp: No content-type on no body response code by @juliens in https://github.com/klauspost/compress/pull/1011\r\n  * gzhttp: Do not set the content-type when response has no body by @kevinpollet in https://github.com/klauspost/compress/pull/1013\r\n\r\n* Sep 23rd, 2024 - [1.17.10](https://github.com/klauspost/compress/releases/tag/v1.17.10)\r\n\t* gzhttp: Add TransportAlwaysDecompress option. https://github.com/klauspost/compress/pull/978\r\n\t* gzhttp: Add supported decompress request body by @mirecl in https://github.com/klauspost/compress/pull/1002\r\n\t* s2: Add EncodeBuffer buffer recycling callback https://github.com/klauspost/compress/pull/982\r\n\t* zstd: Improve memory usage on small streaming encodes https://github.com/klauspost/compress/pull/1007\r\n\t* flate: read data written with partial flush by @vajexal in https://github.com/klauspost/compress/pull/996\r\n\r\n* Jun 12th, 2024 - [1.17.9](https://github.com/klauspost/compress/releases/tag/v1.17.9)\r\n\t* s2: Reduce ReadFrom temporary allocations https://github.com/klauspost/compress/pull/949\r\n\t* flate, zstd: Shave some bytes off amd64 matchLen by @greatroar in https://github.com/klauspost/compress/pull/963\r\n\t* Upgrade zip/zlib to 1.22.4 upstream https://github.com/klauspost/compress/pull/970 https://github.com/klauspost/compress/pull/971\r\n\t* zstd: BuildDict fails with RLE table https://github.com/klauspost/compress/pull/951\r\n\r\n* Apr 9th, 2024 - [1.17.8](https://github.com/klauspost/compress/releases/tag/v1.17.8)\r\n\t* zstd: Reject blocks where reserved values are not 0 https://github.com/klauspost/compress/pull/885\r\n\t* zstd: Add RLE detection+encoding https://github.com/klauspost/compress/pull/938\r\n\r\n* Feb 21st, 2024 - [1.17.7](https://github.com/klauspost/compress/releases/tag/v1.17.7)\r\n\t* s2: Add AsyncFlush method: Complete the block without flushing by @Jille in https://github.com/klauspost/compress/pull/927\r\n\t* s2: Fix literal+repeat exceeds dst crash https://github.com/klauspost/compress/pull/930\r\n  \r\n* Feb 5th, 2024 - [1.17.6](https://github.com/klauspost/compress/releases/tag/v1.17.6)\r\n\t* zstd: Fix incorrect repeat coding in best mode https://github.com/klauspost/compress/pull/923\r\n\t* s2: Fix DecodeConcurrent deadlock on errors https://github.com/klauspost/compress/pull/925\r\n  \r\n* Jan 26th, 2024 - [v1.17.5](https://github.com/klauspost/compress/releases/tag/v1.17.5)\r\n\t* flate: Fix reset with dictionary on custom window encodes https://github.com/klauspost/compress/pull/912\r\n\t* zstd: Add Frame header encoding and stripping https://github.com/klauspost/compress/pull/908\r\n\t* zstd: Limit better/best default window to 8MB https://github.com/klauspost/compress/pull/913\r\n\t* zstd: Speed improvements by @greatroar in https://github.com/klauspost/compress/pull/896 https://github.com/klauspost/compress/pull/910\r\n\t* s2: Fix callbacks for skippable blocks and disallow 0xfe (Padding) by @Jille in https://github.com/klauspost/compress/pull/916 https://github.com/klauspost/compress/pull/917\r\nhttps://github.com/klauspost/compress/pull/919 https://github.com/klauspost/compress/pull/918\r\n\r\n* Dec 1st, 2023 - [v1.17.4](https://github.com/klauspost/compress/releases/tag/v1.17.4)\r\n\t* huff0: Speed up symbol counting by @greatroar in https://github.com/klauspost/compress/pull/887\r\n\t* huff0: Remove byteReader by @greatroar in https://github.com/klauspost/compress/pull/886\r\n\t* gzhttp: Allow overriding decompression on transport https://github.com/klauspost/compress/pull/892\r\n\t* gzhttp: Clamp compression level https://github.com/klauspost/compress/pull/890\r\n\t* gzip: Error out if reserved bits are set https://github.com/klauspost/compress/pull/891\r\n\r\n* Nov 15th, 2023 - [v1.17.3](https://github.com/klauspost/compress/releases/tag/v1.17.3)\r\n\t* fse: Fix max header size https://github.com/klauspost/compress/pull/881\r\n\t* zstd: Improve better/best compression https://github.com/klauspost/compress/pull/877\r\n\t* gzhttp: Fix missing content type on Close https://github.com/klauspost/compress/pull/883\r\n\r\n* Oct 22nd, 2023 - [v1.17.2](https://github.com/klauspost/compress/releases/tag/v1.17.2)\r\n\t* zstd: Fix rare *CORRUPTION* output in \"best\" mode. See https://github.com/klauspost/compress/pull/876\r\n\r\n* Oct 14th, 2023 - [v1.17.1](https://github.com/klauspost/compress/releases/tag/v1.17.1)\r\n\t* s2: Fix S2 \"best\" dictionary wrong encoding https://github.com/klauspost/compress/pull/871\r\n\t* flate: Reduce allocations in decompressor and minor code improvements by @fakefloordiv in https://github.com/klauspost/compress/pull/869\r\n\t* s2: Fix EstimateBlockSize on 6&7 length input https://github.com/klauspost/compress/pull/867\r\n\r\n* Sept 19th, 2023 - [v1.17.0](https://github.com/klauspost/compress/releases/tag/v1.17.0)\r\n\t* Add experimental dictionary builder  https://github.com/klauspost/compress/pull/853\r\n\t* Add xerial snappy read/writer https://github.com/klauspost/compress/pull/838\r\n\t* flate: Add limited window compression https://github.com/klauspost/compress/pull/843\r\n\t* s2: Do 2 overlapping match checks https://github.com/klauspost/compress/pull/839\r\n\t* flate: Add amd64 assembly matchlen https://github.com/klauspost/compress/pull/837\r\n\t* gzip: Copy bufio.Reader on Reset by @thatguystone in https://github.com/klauspost/compress/pull/860\r\n   \r\n</details>\r\n<details>\r\n\t<summary>See changes to v1.16.x</summary>\r\n\r\n   \r\n* July 1st, 2023 - [v1.16.7](https://github.com/klauspost/compress/releases/tag/v1.16.7)\r\n\t* zstd: Fix default level first dictionary encode https://github.com/klauspost/compress/pull/829\r\n\t* s2: add GetBufferCapacity() method by @GiedriusS in https://github.com/klauspost/compress/pull/832\r\n\r\n* June 13, 2023 - [v1.16.6](https://github.com/klauspost/compress/releases/tag/v1.16.6)\r\n\t* zstd: correctly ignore WithEncoderPadding(1) by @ianlancetaylor in https://github.com/klauspost/compress/pull/806\r\n\t* zstd: Add amd64 match length assembly https://github.com/klauspost/compress/pull/824\r\n\t* gzhttp: Handle informational headers by @rtribotte in https://github.com/klauspost/compress/pull/815\r\n\t* s2: Improve Better compression slightly https://github.com/klauspost/compress/pull/663\r\n\r\n* Apr 16, 2023 - [v1.16.5](https://github.com/klauspost/compress/releases/tag/v1.16.5)\r\n\t* zstd: readByte needs to use io.ReadFull by @jnoxon in https://github.com/klauspost/compress/pull/802\r\n\t* gzip: Fix WriterTo after initial read https://github.com/klauspost/compress/pull/804\r\n\r\n* Apr 5, 2023 - [v1.16.4](https://github.com/klauspost/compress/releases/tag/v1.16.4)\r\n\t* zstd: Improve zstd best efficiency by @greatroar and @klauspost in https://github.com/klauspost/compress/pull/784\r\n\t* zstd: Respect WithAllLitEntropyCompression https://github.com/klauspost/compress/pull/792\r\n\t* zstd: Fix amd64 not always detecting corrupt data https://github.com/klauspost/compress/pull/785\r\n\t* zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795\r\n\t* s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779\r\n\t* s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780\r\n\t* gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799\r\n\r\n* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)\r\n\t* zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776\r\n\t* gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767\r\n\t* s2: Add Intel LZ4s converter https://github.com/klauspost/compress/pull/766\r\n\t* zstd: Minor bug fixes https://github.com/klauspost/compress/pull/771 https://github.com/klauspost/compress/pull/772 https://github.com/klauspost/compress/pull/773\r\n\t* huff0: Speed up compress1xDo by @greatroar in https://github.com/klauspost/compress/pull/774\r\n\r\n* Feb 26, 2023 - [v1.16.0](https://github.com/klauspost/compress/releases/tag/v1.16.0)\r\n\t* s2: Add [Dictionary](https://github.com/klauspost/compress/tree/master/s2#dictionaries) support.  https://github.com/klauspost/compress/pull/685\r\n\t* s2: Add Compression Size Estimate.  https://github.com/klauspost/compress/pull/752\r\n\t* s2: Add support for custom stream encoder. https://github.com/klauspost/compress/pull/755\r\n\t* s2: Add LZ4 block converter. https://github.com/klauspost/compress/pull/748\r\n\t* s2: Support io.ReaderAt in ReadSeeker. https://github.com/klauspost/compress/pull/747\r\n\t* s2c/s2sx: Use concurrent decoding. https://github.com/klauspost/compress/pull/746\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes to v1.15.x</summary>\r\n\t\r\n* Jan 21st, 2023 (v1.15.15)\r\n\t* deflate: Improve level 7-9 https://github.com/klauspost/compress/pull/739\r\n\t* zstd: Add delta encoding support by @greatroar in https://github.com/klauspost/compress/pull/728\r\n\t* zstd: Various speed improvements by @greatroar https://github.com/klauspost/compress/pull/741 https://github.com/klauspost/compress/pull/734 https://github.com/klauspost/compress/pull/736 https://github.com/klauspost/compress/pull/744 https://github.com/klauspost/compress/pull/743 https://github.com/klauspost/compress/pull/745\r\n\t* gzhttp: Add SuffixETag() and DropETag() options to prevent ETag collisions on compressed responses by @willbicks in https://github.com/klauspost/compress/pull/740\r\n\r\n* Jan 3rd, 2023 (v1.15.14)\r\n\r\n\t* flate: Improve speed in big stateless blocks https://github.com/klauspost/compress/pull/718\r\n\t* zstd: Minor speed tweaks by @greatroar in https://github.com/klauspost/compress/pull/716 https://github.com/klauspost/compress/pull/720\r\n\t* export NoGzipResponseWriter for custom ResponseWriter wrappers by @harshavardhana in https://github.com/klauspost/compress/pull/722\r\n\t* s2: Add example for indexing and existing stream https://github.com/klauspost/compress/pull/723\r\n\r\n* Dec 11, 2022 (v1.15.13)\r\n\t* zstd: Add [MaxEncodedSize](https://pkg.go.dev/github.com/klauspost/compress@v1.15.13/zstd#Encoder.MaxEncodedSize) to encoder  https://github.com/klauspost/compress/pull/691\r\n\t* zstd: Various tweaks and improvements https://github.com/klauspost/compress/pull/693 https://github.com/klauspost/compress/pull/695 https://github.com/klauspost/compress/pull/696 https://github.com/klauspost/compress/pull/701 https://github.com/klauspost/compress/pull/702 https://github.com/klauspost/compress/pull/703 https://github.com/klauspost/compress/pull/704 https://github.com/klauspost/compress/pull/705 https://github.com/klauspost/compress/pull/706 https://github.com/klauspost/compress/pull/707 https://github.com/klauspost/compress/pull/708\r\n\r\n* Oct 26, 2022 (v1.15.12)\r\n\r\n\t* zstd: Tweak decoder allocs. https://github.com/klauspost/compress/pull/680\r\n\t* gzhttp: Always delete `HeaderNoCompression` https://github.com/klauspost/compress/pull/683\r\n\r\n* Sept 26, 2022 (v1.15.11)\r\n\r\n\t* flate: Improve level 1-3 compression  https://github.com/klauspost/compress/pull/678\r\n\t* zstd: Improve \"best\" compression by @nightwolfz in https://github.com/klauspost/compress/pull/677\r\n\t* zstd: Fix+reduce decompression allocations https://github.com/klauspost/compress/pull/668\r\n\t* zstd: Fix non-effective noescape tag https://github.com/klauspost/compress/pull/667\r\n\r\n* Sept 16, 2022 (v1.15.10)\r\n\r\n\t* zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649\r\n\t* Add Go 1.19 - deprecate Go 1.16  https://github.com/klauspost/compress/pull/651\r\n\t* flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656\r\n\t* zstd: Improve \"better\" compression  https://github.com/klauspost/compress/pull/657\r\n\t* s2: Improve \"best\" compression https://github.com/klauspost/compress/pull/658\r\n\t* s2: Improve \"better\" compression. https://github.com/klauspost/compress/pull/635\r\n\t* s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646\r\n\t* Use arrays for constant size copies https://github.com/klauspost/compress/pull/659\r\n\r\n* July 21, 2022 (v1.15.9)\r\n\r\n\t* zstd: Fix decoder crash on amd64 (no BMI) on invalid input https://github.com/klauspost/compress/pull/645\r\n\t* zstd: Disable decoder extended memory copies (amd64) due to possible crashes https://github.com/klauspost/compress/pull/644\r\n\t* zstd: Allow single segments up to \"max decoded size\" https://github.com/klauspost/compress/pull/643\r\n\r\n* July 13, 2022 (v1.15.8)\r\n\r\n\t* gzip: fix stack exhaustion bug in Reader.Read https://github.com/klauspost/compress/pull/641\r\n\t* s2: Add Index header trim/restore https://github.com/klauspost/compress/pull/638\r\n\t* zstd: Optimize seqdeq amd64 asm by @greatroar in https://github.com/klauspost/compress/pull/636\r\n\t* zstd: Improve decoder memcopy https://github.com/klauspost/compress/pull/637\r\n\t* huff0: Pass a single bitReader pointer to asm by @greatroar in https://github.com/klauspost/compress/pull/634\r\n\t* zstd: Branchless getBits for amd64 w/o BMI2 by @greatroar in https://github.com/klauspost/compress/pull/640\r\n\t* gzhttp: Remove header before writing https://github.com/klauspost/compress/pull/639\r\n\r\n* June 29, 2022 (v1.15.7)\r\n\r\n\t* s2: Fix absolute forward seeks  https://github.com/klauspost/compress/pull/633\r\n\t* zip: Merge upstream  https://github.com/klauspost/compress/pull/631\r\n\t* zip: Re-add zip64 fix https://github.com/klauspost/compress/pull/624\r\n\t* zstd: translate fseDecoder.buildDtable into asm by @WojciechMula in https://github.com/klauspost/compress/pull/598\r\n\t* flate: Faster histograms  https://github.com/klauspost/compress/pull/620\r\n\t* deflate: Use compound hcode  https://github.com/klauspost/compress/pull/622\r\n\r\n* June 3, 2022 (v1.15.6)\r\n\t* s2: Improve coding for long, close matches https://github.com/klauspost/compress/pull/613\r\n\t* s2c: Add Snappy/S2 stream recompression https://github.com/klauspost/compress/pull/611\r\n\t* zstd: Always use configured block size https://github.com/klauspost/compress/pull/605\r\n\t* zstd: Fix incorrect hash table placement for dict encoding in default https://github.com/klauspost/compress/pull/606\r\n\t* zstd: Apply default config to ZipDecompressor without options https://github.com/klauspost/compress/pull/608\r\n\t* gzhttp: Exclude more common archive formats https://github.com/klauspost/compress/pull/612\r\n\t* s2: Add ReaderIgnoreCRC https://github.com/klauspost/compress/pull/609\r\n\t* s2: Remove sanity load on index creation https://github.com/klauspost/compress/pull/607\r\n\t* snappy: Use dedicated function for scoring https://github.com/klauspost/compress/pull/614\r\n\t* s2c+s2d: Use official snappy framed extension https://github.com/klauspost/compress/pull/610\r\n\r\n* May 25, 2022 (v1.15.5)\r\n\t* s2: Add concurrent stream decompression https://github.com/klauspost/compress/pull/602\r\n\t* s2: Fix final emit oob read crash on amd64 https://github.com/klauspost/compress/pull/601\r\n\t* huff0: asm implementation of Decompress1X by @WojciechMula https://github.com/klauspost/compress/pull/596\r\n\t* zstd: Use 1 less goroutine for stream decoding https://github.com/klauspost/compress/pull/588\r\n\t* zstd: Copy literal in 16 byte blocks when possible https://github.com/klauspost/compress/pull/592\r\n\t* zstd: Speed up when WithDecoderLowmem(false) https://github.com/klauspost/compress/pull/599\r\n\t* zstd: faster next state update in BMI2 version of decode by @WojciechMula in https://github.com/klauspost/compress/pull/593\r\n\t* huff0: Do not check max size when reading table. https://github.com/klauspost/compress/pull/586\r\n\t* flate: Inplace hashing for level 7-9 https://github.com/klauspost/compress/pull/590\r\n\r\n\r\n* May 11, 2022 (v1.15.4)\r\n\t* huff0: decompress directly into output by @WojciechMula in [#577](https://github.com/klauspost/compress/pull/577)\r\n\t* inflate: Keep dict on stack [#581](https://github.com/klauspost/compress/pull/581)\r\n\t* zstd: Faster decoding memcopy in asm [#583](https://github.com/klauspost/compress/pull/583)\r\n\t* zstd: Fix ignored crc [#580](https://github.com/klauspost/compress/pull/580)\r\n\r\n* May 5, 2022 (v1.15.3)\r\n\t* zstd: Allow to ignore checksum checking by @WojciechMula [#572](https://github.com/klauspost/compress/pull/572)\r\n\t* s2: Fix incorrect seek for io.SeekEnd in [#575](https://github.com/klauspost/compress/pull/575)\r\n\r\n* Apr 26, 2022 (v1.15.2)\r\n\t* zstd: Add x86-64 assembly for decompression on streams and blocks. Contributed by [@WojciechMula](https://github.com/WojciechMula). Typically 2x faster.  [#528](https://github.com/klauspost/compress/pull/528) [#531](https://github.com/klauspost/compress/pull/531) [#545](https://github.com/klauspost/compress/pull/545) [#537](https://github.com/klauspost/compress/pull/537)\r\n\t* zstd: Add options to ZipDecompressor and fixes [#539](https://github.com/klauspost/compress/pull/539)\r\n\t* s2: Use sorted search for index [#555](https://github.com/klauspost/compress/pull/555)\r\n\t* Minimum version is Go 1.16, added CI test on 1.18.\r\n\r\n* Mar 11, 2022 (v1.15.1)\r\n\t* huff0: Add x86 assembly of Decode4X by @WojciechMula in [#512](https://github.com/klauspost/compress/pull/512)\r\n\t* zstd: Reuse zip decoders in [#514](https://github.com/klauspost/compress/pull/514)\r\n\t* zstd: Detect extra block data and report as corrupted in [#520](https://github.com/klauspost/compress/pull/520)\r\n\t* zstd: Handle zero sized frame content size stricter in [#521](https://github.com/klauspost/compress/pull/521)\r\n\t* zstd: Add stricter block size checks in [#523](https://github.com/klauspost/compress/pull/523)\r\n\r\n* Mar 3, 2022 (v1.15.0)\r\n\t* zstd: Refactor decoder [#498](https://github.com/klauspost/compress/pull/498)\r\n\t* zstd: Add stream encoding without goroutines [#505](https://github.com/klauspost/compress/pull/505)\r\n\t* huff0: Prevent single blocks exceeding 16 bits by @klauspost in[#507](https://github.com/klauspost/compress/pull/507)\r\n\t* flate: Inline literal emission [#509](https://github.com/klauspost/compress/pull/509)\r\n\t* gzhttp: Add zstd to transport [#400](https://github.com/klauspost/compress/pull/400)\r\n\t* gzhttp: Make content-type optional [#510](https://github.com/klauspost/compress/pull/510)\r\n\r\nBoth compression and decompression now supports \"synchronous\" stream operations. This means that whenever \"concurrency\" is set to 1, they will operate without spawning goroutines.\r\n\r\nStream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected.\r\n\r\nWhile the release has been extensively tested, it is recommended to testing when upgrading.\r\n\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes to v1.14.x</summary>\r\n\t\r\n* Feb 22, 2022 (v1.14.4)\r\n\t* flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503)\r\n\t* zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502)\r\n\t* zip: don't read data descriptor early by @saracen in [#501](https://github.com/klauspost/compress/pull/501)  #501\r\n\t* huff0: Use static decompression buffer up to 30% faster [#499](https://github.com/klauspost/compress/pull/499) [#500](https://github.com/klauspost/compress/pull/500)\r\n\r\n* Feb 17, 2022 (v1.14.3)\r\n\t* flate: Improve fastest levels compression speed ~10% more throughput. [#482](https://github.com/klauspost/compress/pull/482) [#489](https://github.com/klauspost/compress/pull/489) [#490](https://github.com/klauspost/compress/pull/490) [#491](https://github.com/klauspost/compress/pull/491) [#494](https://github.com/klauspost/compress/pull/494)  [#478](https://github.com/klauspost/compress/pull/478)\r\n\t* flate: Faster decompression speed, ~5-10%. [#483](https://github.com/klauspost/compress/pull/483)\r\n\t* s2: Faster compression with Go v1.18 and amd64 microarch level 3+. [#484](https://github.com/klauspost/compress/pull/484) [#486](https://github.com/klauspost/compress/pull/486)\r\n\r\n* Jan 25, 2022 (v1.14.2)\r\n\t* zstd: improve header decoder by @dsnet  [#476](https://github.com/klauspost/compress/pull/476)\r\n\t* zstd: Add bigger default blocks  [#469](https://github.com/klauspost/compress/pull/469)\r\n\t* zstd: Remove unused decompression buffer [#470](https://github.com/klauspost/compress/pull/470)\r\n\t* zstd: Fix logically dead code by @ningmingxiao [#472](https://github.com/klauspost/compress/pull/472)\r\n\t* flate: Improve level 7-9 [#471](https://github.com/klauspost/compress/pull/471) [#473](https://github.com/klauspost/compress/pull/473)\r\n\t* zstd: Add noasm tag for xxhash [#475](https://github.com/klauspost/compress/pull/475)\r\n\r\n* Jan 11, 2022 (v1.14.1)\r\n\t* s2: Add stream index in [#462](https://github.com/klauspost/compress/pull/462)\r\n\t* flate: Speed and efficiency improvements in [#439](https://github.com/klauspost/compress/pull/439) [#461](https://github.com/klauspost/compress/pull/461) [#455](https://github.com/klauspost/compress/pull/455) [#452](https://github.com/klauspost/compress/pull/452) [#458](https://github.com/klauspost/compress/pull/458)\r\n\t* zstd: Performance improvement in [#420]( https://github.com/klauspost/compress/pull/420) [#456](https://github.com/klauspost/compress/pull/456) [#437](https://github.com/klauspost/compress/pull/437) [#467](https://github.com/klauspost/compress/pull/467) [#468](https://github.com/klauspost/compress/pull/468)\r\n\t* zstd: add arm64 xxhash assembly in [#464](https://github.com/klauspost/compress/pull/464)\r\n\t* Add garbled for binaries for s2 in [#445](https://github.com/klauspost/compress/pull/445)\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes to v1.13.x</summary>\r\n\t\r\n* Aug 30, 2021 (v1.13.5)\r\n\t* gz/zlib/flate: Alias stdlib errors [#425](https://github.com/klauspost/compress/pull/425)\r\n\t* s2: Add block support to commandline tools [#413](https://github.com/klauspost/compress/pull/413)\r\n\t* zstd: pooledZipWriter should return Writers to the same pool [#426](https://github.com/klauspost/compress/pull/426)\r\n\t* Removed golang/snappy as external dependency for tests [#421](https://github.com/klauspost/compress/pull/421)\r\n\r\n* Aug 12, 2021 (v1.13.4)\r\n\t* Add [snappy replacement package](https://github.com/klauspost/compress/tree/master/snappy).\r\n\t* zstd: Fix incorrect encoding in \"best\" mode [#415](https://github.com/klauspost/compress/pull/415)\r\n\r\n* Aug 3, 2021 (v1.13.3) \r\n\t* zstd: Improve Best compression [#404](https://github.com/klauspost/compress/pull/404)\r\n\t* zstd: Fix WriteTo error forwarding [#411](https://github.com/klauspost/compress/pull/411)\r\n\t* gzhttp: Return http.HandlerFunc instead of http.Handler. Unlikely breaking change. [#406](https://github.com/klauspost/compress/pull/406)\r\n\t* s2sx: Fix max size error [#399](https://github.com/klauspost/compress/pull/399)\r\n\t* zstd: Add optional stream content size on reset [#401](https://github.com/klauspost/compress/pull/401)\r\n\t* zstd: use SpeedBestCompression for level >= 10 [#410](https://github.com/klauspost/compress/pull/410)\r\n\r\n* Jun 14, 2021 (v1.13.1)\r\n\t* s2: Add full Snappy output support  [#396](https://github.com/klauspost/compress/pull/396)\r\n\t* zstd: Add configurable [Decoder window](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithDecoderMaxWindow) size [#394](https://github.com/klauspost/compress/pull/394)\r\n\t* gzhttp: Add header to skip compression  [#389](https://github.com/klauspost/compress/pull/389)\r\n\t* s2: Improve speed with bigger output margin  [#395](https://github.com/klauspost/compress/pull/395)\r\n\r\n* Jun 3, 2021 (v1.13.0)\r\n\t* Added [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp#gzip-handler) which allows wrapping HTTP servers and clients with GZIP compressors.\r\n\t* zstd: Detect short invalid signatures [#382](https://github.com/klauspost/compress/pull/382)\r\n\t* zstd: Spawn decoder goroutine only if needed. [#380](https://github.com/klauspost/compress/pull/380)\r\n</details>\r\n\r\n\r\n<details>\r\n\t<summary>See changes to v1.12.x</summary>\r\n\t\r\n* May 25, 2021 (v1.12.3)\r\n\t* deflate: Better/faster Huffman encoding [#374](https://github.com/klauspost/compress/pull/374)\r\n\t* deflate: Allocate less for history. [#375](https://github.com/klauspost/compress/pull/375)\r\n\t* zstd: Forward read errors [#373](https://github.com/klauspost/compress/pull/373) \r\n\r\n* Apr 27, 2021 (v1.12.2)\r\n\t* zstd: Improve better/best compression [#360](https://github.com/klauspost/compress/pull/360) [#364](https://github.com/klauspost/compress/pull/364) [#365](https://github.com/klauspost/compress/pull/365)\r\n\t* zstd: Add helpers to compress/decompress zstd inside zip files [#363](https://github.com/klauspost/compress/pull/363)\r\n\t* deflate: Improve level 5+6 compression [#367](https://github.com/klauspost/compress/pull/367)\r\n\t* s2: Improve better/best compression [#358](https://github.com/klauspost/compress/pull/358) [#359](https://github.com/klauspost/compress/pull/358)\r\n\t* s2: Load after checking src limit on amd64. [#362](https://github.com/klauspost/compress/pull/362)\r\n\t* s2sx: Limit max executable size [#368](https://github.com/klauspost/compress/pull/368) \r\n\r\n* Apr 14, 2021 (v1.12.1)\r\n\t* snappy package removed. Upstream added as dependency.\r\n\t* s2: Better compression in \"best\" mode [#353](https://github.com/klauspost/compress/pull/353)\r\n\t* s2sx: Add stdin input and detect pre-compressed from signature [#352](https://github.com/klauspost/compress/pull/352)\r\n\t* s2c/s2d: Add http as possible input [#348](https://github.com/klauspost/compress/pull/348)\r\n\t* s2c/s2d/s2sx: Always truncate when writing files [#352](https://github.com/klauspost/compress/pull/352)\r\n\t* zstd: Reduce memory usage further when using [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) [#346](https://github.com/klauspost/compress/pull/346)\r\n\t* s2: Fix potential problem with amd64 assembly and profilers [#349](https://github.com/klauspost/compress/pull/349)\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes to v1.11.x</summary>\r\n\t\r\n* Mar 26, 2021 (v1.11.13)\r\n\t* zstd: Big speedup on small dictionary encodes [#344](https://github.com/klauspost/compress/pull/344) [#345](https://github.com/klauspost/compress/pull/345)\r\n\t* zstd: Add [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) encoder option [#336](https://github.com/klauspost/compress/pull/336)\r\n\t* deflate: Improve entropy compression [#338](https://github.com/klauspost/compress/pull/338)\r\n\t* s2: Clean up and minor performance improvement in best [#341](https://github.com/klauspost/compress/pull/341)\r\n\r\n* Mar 5, 2021 (v1.11.12)\r\n\t* s2: Add `s2sx` binary that creates [self extracting archives](https://github.com/klauspost/compress/tree/master/s2#s2sx-self-extracting-archives).\r\n\t* s2: Speed up decompression on non-assembly platforms [#328](https://github.com/klauspost/compress/pull/328)\r\n\r\n* Mar 1, 2021 (v1.11.9)\r\n\t* s2: Add ARM64 decompression assembly. Around 2x output speed. [#324](https://github.com/klauspost/compress/pull/324)\r\n\t* s2: Improve \"better\" speed and efficiency. [#325](https://github.com/klauspost/compress/pull/325)\r\n\t* s2: Fix binaries.\r\n\r\n* Feb 25, 2021 (v1.11.8)\r\n\t* s2: Fixed occasional out-of-bounds write on amd64. Upgrade recommended.\r\n\t* s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315)\r\n\t* s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322)\r\n\t* zstd: Faster \"compression\" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314)\r\n\t* zip: Fix zip64 headers. [#313](https://github.com/klauspost/compress/pull/313)\r\n  \r\n* Jan 14, 2021 (v1.11.7)\r\n\t* Use Bytes() interface to get bytes across packages. [#309](https://github.com/klauspost/compress/pull/309)\r\n\t* s2: Add 'best' compression option.  [#310](https://github.com/klauspost/compress/pull/310)\r\n\t* s2: Add ReaderMaxBlockSize, changes `s2.NewReader` signature to include varargs. [#311](https://github.com/klauspost/compress/pull/311)\r\n\t* s2: Fix crash on small better buffers. [#308](https://github.com/klauspost/compress/pull/308)\r\n\t* s2: Clean up decoder. [#312](https://github.com/klauspost/compress/pull/312)\r\n\r\n* Jan 7, 2021 (v1.11.6)\r\n\t* zstd: Make decoder allocations smaller [#306](https://github.com/klauspost/compress/pull/306)\r\n\t* zstd: Free Decoder resources when Reset is called with a nil io.Reader  [#305](https://github.com/klauspost/compress/pull/305)\r\n\r\n* Dec 20, 2020 (v1.11.4)\r\n\t* zstd: Add Best compression mode [#304](https://github.com/klauspost/compress/pull/304)\r\n\t* Add header decoder [#299](https://github.com/klauspost/compress/pull/299)\r\n\t* s2: Add uncompressed stream option [#297](https://github.com/klauspost/compress/pull/297)\r\n\t* Simplify/speed up small blocks with known max size. [#300](https://github.com/klauspost/compress/pull/300)\r\n\t* zstd: Always reset literal dict encoder [#303](https://github.com/klauspost/compress/pull/303)\r\n\r\n* Nov 15, 2020 (v1.11.3)\r\n\t* inflate: 10-15% faster decompression  [#293](https://github.com/klauspost/compress/pull/293)\r\n\t* zstd: Tweak DecodeAll default allocation [#295](https://github.com/klauspost/compress/pull/295)\r\n\r\n* Oct 11, 2020 (v1.11.2)\r\n\t* s2: Fix out of bounds read in \"better\" block compression [#291](https://github.com/klauspost/compress/pull/291)\r\n\r\n* Oct 1, 2020 (v1.11.1)\r\n\t* zstd: Set allLitEntropy true in default configuration [#286](https://github.com/klauspost/compress/pull/286)\r\n\r\n* Sept 8, 2020 (v1.11.0)\r\n\t* zstd: Add experimental compression [dictionaries](https://github.com/klauspost/compress/tree/master/zstd#dictionaries) [#281](https://github.com/klauspost/compress/pull/281)\r\n\t* zstd: Fix mixed Write and ReadFrom calls [#282](https://github.com/klauspost/compress/pull/282)\r\n\t* inflate/gz: Limit variable shifts, ~5% faster decompression [#274](https://github.com/klauspost/compress/pull/274)\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes to v1.10.x</summary>\r\n \r\n* July 8, 2020 (v1.10.11) \r\n\t* zstd: Fix extra block when compressing with ReadFrom. [#278](https://github.com/klauspost/compress/pull/278)\r\n\t* huff0: Also populate compression table when reading decoding table. [#275](https://github.com/klauspost/compress/pull/275)\r\n\t\r\n* June 23, 2020 (v1.10.10) \r\n\t* zstd: Skip entropy compression in fastest mode when no matches. [#270](https://github.com/klauspost/compress/pull/270)\r\n\t\r\n* June 16, 2020 (v1.10.9): \r\n\t* zstd: API change for specifying dictionaries. See [#268](https://github.com/klauspost/compress/pull/268)\r\n\t* zip: update CreateHeaderRaw to handle zip64 fields. [#266](https://github.com/klauspost/compress/pull/266)\r\n\t* Fuzzit tests removed. The service has been purchased and is no longer available.\r\n\t\r\n* June 5, 2020 (v1.10.8): \r\n\t* 1.15x faster zstd block decompression. [#265](https://github.com/klauspost/compress/pull/265)\r\n\t\r\n* June 1, 2020 (v1.10.7): \r\n\t* Added zstd decompression [dictionary support](https://github.com/klauspost/compress/tree/master/zstd#dictionaries)\r\n\t* Increase zstd decompression speed up to 1.19x.  [#259](https://github.com/klauspost/compress/pull/259)\r\n\t* Remove internal reset call in zstd compression and reduce allocations. [#263](https://github.com/klauspost/compress/pull/263)\r\n\t\r\n* May 21, 2020: (v1.10.6) \r\n\t* zstd: Reduce allocations while decoding. [#258](https://github.com/klauspost/compress/pull/258), [#252](https://github.com/klauspost/compress/pull/252)\r\n\t* zstd: Stricter decompression checks.\r\n\t\r\n* April 12, 2020: (v1.10.5)\r\n\t* s2-commands: Flush output when receiving SIGINT. [#239](https://github.com/klauspost/compress/pull/239)\r\n\t\r\n* Apr 8, 2020: (v1.10.4) \r\n\t* zstd: Minor/special case optimizations. [#251](https://github.com/klauspost/compress/pull/251),  [#250](https://github.com/klauspost/compress/pull/250),  [#249](https://github.com/klauspost/compress/pull/249),  [#247](https://github.com/klauspost/compress/pull/247)\r\n* Mar 11, 2020: (v1.10.3) \r\n\t* s2: Use S2 encoder in pure Go mode for Snappy output as well. [#245](https://github.com/klauspost/compress/pull/245)\r\n\t* s2: Fix pure Go block encoder. [#244](https://github.com/klauspost/compress/pull/244)\r\n\t* zstd: Added \"better compression\" mode. [#240](https://github.com/klauspost/compress/pull/240)\r\n\t* zstd: Improve speed of fastest compression mode by 5-10% [#241](https://github.com/klauspost/compress/pull/241)\r\n\t* zstd: Skip creating encoders when not needed. [#238](https://github.com/klauspost/compress/pull/238)\r\n\t\r\n* Feb 27, 2020: (v1.10.2) \r\n\t* Close to 50% speedup in inflate (gzip/zip decompression). [#236](https://github.com/klauspost/compress/pull/236) [#234](https://github.com/klauspost/compress/pull/234) [#232](https://github.com/klauspost/compress/pull/232)\r\n\t* Reduce deflate level 1-6 memory usage up to 59%. [#227](https://github.com/klauspost/compress/pull/227)\r\n\t\r\n* Feb 18, 2020: (v1.10.1)\r\n\t* Fix zstd crash when resetting multiple times without sending data. [#226](https://github.com/klauspost/compress/pull/226)\r\n\t* deflate: Fix dictionary use on level 1-6. [#224](https://github.com/klauspost/compress/pull/224)\r\n\t* Remove deflate writer reference when closing. [#224](https://github.com/klauspost/compress/pull/224)\r\n\t\r\n* Feb 4, 2020: (v1.10.0) \r\n\t* Add optional dictionary to [stateless deflate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc#StatelessDeflate). Breaking change, send `nil` for previous behaviour. [#216](https://github.com/klauspost/compress/pull/216)\r\n\t* Fix buffer overflow on repeated small block deflate.  [#218](https://github.com/klauspost/compress/pull/218)\r\n\t* Allow copying content from an existing ZIP file without decompressing+compressing. [#214](https://github.com/klauspost/compress/pull/214)\r\n\t* Added [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) AMD64 assembler and various optimizations. Stream speed >10GB/s.  [#186](https://github.com/klauspost/compress/pull/186)\r\n\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes prior to v1.10.0</summary>\r\n\r\n* Jan 20,2020 (v1.9.8) Optimize gzip/deflate with better size estimates and faster table generation. [#207](https://github.com/klauspost/compress/pull/207) by [luyu6056](https://github.com/luyu6056),  [#206](https://github.com/klauspost/compress/pull/206).\r\n* Jan 11, 2020: S2 Encode/Decode will use provided buffer if capacity is big enough. [#204](https://github.com/klauspost/compress/pull/204) \r\n* Jan 5, 2020: (v1.9.7) Fix another zstd regression in v1.9.5 - v1.9.6 removed.\r\n* Jan 4, 2020: (v1.9.6) Regression in v1.9.5 fixed causing corrupt zstd encodes in rare cases.\r\n* Jan 4, 2020: Faster IO in [s2c + s2d commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) compression/decompression. [#192](https://github.com/klauspost/compress/pull/192)\r\n* Dec 29, 2019: Removed v1.9.5 since fuzz tests showed a compatibility problem with the reference zstandard decoder.\r\n* Dec 29, 2019: (v1.9.5) zstd: 10-20% faster block compression. [#199](https://github.com/klauspost/compress/pull/199)\r\n* Dec 29, 2019: [zip](https://godoc.org/github.com/klauspost/compress/zip) package updated with latest Go features\r\n* Dec 29, 2019: zstd: Single segment flag condintions tweaked. [#197](https://github.com/klauspost/compress/pull/197)\r\n* Dec 18, 2019: s2: Faster compression when ReadFrom is used. [#198](https://github.com/klauspost/compress/pull/198)\r\n* Dec 10, 2019: s2: Fix repeat length output when just above at 16MB limit.\r\n* Dec 10, 2019: zstd: Add function to get decoder as io.ReadCloser. [#191](https://github.com/klauspost/compress/pull/191)\r\n* Dec 3, 2019: (v1.9.4) S2: limit max repeat length. [#188](https://github.com/klauspost/compress/pull/188)\r\n* Dec 3, 2019: Add [WithNoEntropyCompression](https://godoc.org/github.com/klauspost/compress/zstd#WithNoEntropyCompression) to zstd [#187](https://github.com/klauspost/compress/pull/187)\r\n* Dec 3, 2019: Reduce memory use for tests. Check for leaked goroutines.\r\n* Nov 28, 2019 (v1.9.3) Less allocations in stateless deflate.\r\n* Nov 28, 2019: 5-20% Faster huff0 decode. Impacts zstd as well. [#184](https://github.com/klauspost/compress/pull/184)\r\n* Nov 12, 2019 (v1.9.2) Added [Stateless Compression](#stateless-compression) for gzip/deflate.\r\n* Nov 12, 2019: Fixed zstd decompression of large single blocks. [#180](https://github.com/klauspost/compress/pull/180)\r\n* Nov 11, 2019: Set default  [s2c](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) block size to 4MB.\r\n* Nov 11, 2019: Reduce inflate memory use by 1KB.\r\n* Nov 10, 2019: Less allocations in deflate bit writer.\r\n* Nov 10, 2019: Fix inconsistent error returned by zstd decoder.\r\n* Oct 28, 2019 (v1.9.1) ztsd: Fix crash when compressing blocks. [#174](https://github.com/klauspost/compress/pull/174)\r\n* Oct 24, 2019 (v1.9.0) zstd: Fix rare data corruption [#173](https://github.com/klauspost/compress/pull/173)\r\n* Oct 24, 2019 zstd: Fix huff0 out of buffer write [#171](https://github.com/klauspost/compress/pull/171) and always return errors [#172](https://github.com/klauspost/compress/pull/172) \r\n* Oct 10, 2019: Big deflate rewrite, 30-40% faster with better compression [#105](https://github.com/klauspost/compress/pull/105)\r\n\r\n</details>\r\n\r\n<details>\r\n\t<summary>See changes prior to v1.9.0</summary>\r\n\r\n* Oct 10, 2019: (v1.8.6) zstd: Allow partial reads to get flushed data. [#169](https://github.com/klauspost/compress/pull/169)\r\n* Oct 3, 2019: Fix inconsistent results on broken zstd streams.\r\n* Sep 25, 2019: Added `-rm` (remove source files) and `-q` (no output except errors) to `s2c` and `s2d` [commands](https://github.com/klauspost/compress/tree/master/s2#commandline-tools)\r\n* Sep 16, 2019: (v1.8.4) Add `s2c` and `s2d` [commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools).\r\n* Sep 10, 2019: (v1.8.3) Fix s2 decoder [Skip](https://godoc.org/github.com/klauspost/compress/s2#Reader.Skip).\r\n* Sep 7, 2019: zstd: Added [WithWindowSize](https://godoc.org/github.com/klauspost/compress/zstd#WithWindowSize), contributed by [ianwilkes](https://github.com/ianwilkes).\r\n* Sep 5, 2019: (v1.8.2) Add [WithZeroFrames](https://godoc.org/github.com/klauspost/compress/zstd#WithZeroFrames) which adds full zero payload block encoding option.\r\n* Sep 5, 2019: Lazy initialization of zstandard predefined en/decoder tables.\r\n* Aug 26, 2019: (v1.8.1) S2: 1-2% compression increase in \"better\" compression mode.\r\n* Aug 26, 2019: zstd: Check maximum size of Huffman 1X compressed literals while decoding.\r\n* Aug 24, 2019: (v1.8.0) Added [S2 compression](https://github.com/klauspost/compress/tree/master/s2#s2-compression), a high performance replacement for Snappy. \r\n* Aug 21, 2019: (v1.7.6) Fixed minor issues found by fuzzer. One could lead to zstd not decompressing.\r\n* Aug 18, 2019: Add [fuzzit](https://fuzzit.dev/) continuous fuzzing.\r\n* Aug 14, 2019: zstd: Skip incompressible data 2x faster.  [#147](https://github.com/klauspost/compress/pull/147)\r\n* Aug 4, 2019 (v1.7.5): Better literal compression. [#146](https://github.com/klauspost/compress/pull/146)\r\n* Aug 4, 2019: Faster zstd compression. [#143](https://github.com/klauspost/compress/pull/143) [#144](https://github.com/klauspost/compress/pull/144)\r\n* Aug 4, 2019: Faster zstd decompression. [#145](https://github.com/klauspost/compress/pull/145) [#143](https://github.com/klauspost/compress/pull/143) [#142](https://github.com/klauspost/compress/pull/142)\r\n* July 15, 2019 (v1.7.4): Fix double EOF block in rare cases on zstd encoder.\r\n* July 15, 2019 (v1.7.3): Minor speedup/compression increase in default zstd encoder.\r\n* July 14, 2019: zstd decoder: Fix decompression error on multiple uses with mixed content.\r\n* July 7, 2019 (v1.7.2): Snappy update, zstd decoder potential race fix.\r\n* June 17, 2019: zstd decompression bugfix.\r\n* June 17, 2019: fix 32 bit builds.\r\n* June 17, 2019: Easier use in modules (less dependencies).\r\n* June 9, 2019: New stronger \"default\" [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression mode. Matches zstd default compression ratio.\r\n* June 5, 2019: 20-40% throughput in [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and better compression.\r\n* June 5, 2019: deflate/gzip compression: Reduce memory usage of lower compression levels.\r\n* June 2, 2019: Added [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression!\r\n* May 25, 2019: deflate/gzip: 10% faster bit writer, mostly visible in lower levels.\r\n* Apr 22, 2019: [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) decompression added.\r\n* Aug 1, 2018: Added [huff0 README](https://github.com/klauspost/compress/tree/master/huff0#huff0-entropy-compression).\r\n* Jul 8, 2018: Added [Performance Update 2018](#performance-update-2018) below.\r\n* Jun 23, 2018: Merged [Go 1.11 inflate optimizations](https://go-review.googlesource.com/c/go/+/102235). Go 1.9 is now required. Backwards compatible version tagged with [v1.3.0](https://github.com/klauspost/compress/releases/tag/v1.3.0).\r\n* Apr 2, 2018: Added [huff0](https://godoc.org/github.com/klauspost/compress/huff0) en/decoder. Experimental for now, API may change.\r\n* Mar 4, 2018: Added [FSE Entropy](https://godoc.org/github.com/klauspost/compress/fse) en/decoder. Experimental for now, API may change.\r\n* Nov 3, 2017: Add compression [Estimate](https://godoc.org/github.com/klauspost/compress#Estimate) function.\r\n* May 28, 2017: Reduce allocations when resetting decoder.\r\n* Apr 02, 2017: Change back to official crc32, since changes were merged in Go 1.7.\r\n* Jan 14, 2017: Reduce stack pressure due to array copies. See [Issue #18625](https://github.com/golang/go/issues/18625).\r\n* Oct 25, 2016: Level 2-4 have been rewritten and now offers significantly better performance than before.\r\n* Oct 20, 2016: Port zlib changes from Go 1.7 to fix zlib writer issue. Please update.\r\n* Oct 16, 2016: Go 1.7 changes merged. Apples to apples this package is a few percent faster, but has a significantly better balance between speed and compression per level. \r\n* Mar 24, 2016: Always attempt Huffman encoding on level 4-7. This improves base 64 encoded data compression.\r\n* Mar 24, 2016: Small speedup for level 1-3.\r\n* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster.\r\n* Feb 19, 2016: Handle small payloads faster in level 1-3.\r\n* Feb 19, 2016: Added faster level 2 + 3 compression modes.\r\n* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progression in terms of compression. New default level is 5.\r\n* Feb 14, 2016: Snappy: Merge upstream changes. \r\n* Feb 14, 2016: Snappy: Fix aggressive skipping.\r\n* Feb 14, 2016: Snappy: Update benchmark.\r\n* Feb 13, 2016: Deflate: Fixed assembler problem that could lead to sub-optimal compression.\r\n* Feb 12, 2016: Snappy: Added AMD64 SSE 4.2 optimizations to matching, which makes easy to compress material run faster. Typical speedup is around 25%.\r\n* Feb 9, 2016: Added Snappy package fork. This version is 5-7% faster, much more on hard to compress content.\r\n* Jan 30, 2016: Optimize level 1 to 3 by not considering static dictionary or storing uncompressed. ~4-5% speedup.\r\n* Jan 16, 2016: Optimization on deflate level 1,2,3 compression.\r\n* Jan 8 2016: Merge [CL 18317](https://go-review.googlesource.com/#/c/18317): fix reading, writing of zip64 archives.\r\n* Dec 8 2015: Make level 1 and -2 deterministic even if write size differs.\r\n* Dec 8 2015: Split encoding functions, so hashing and matching can potentially be inlined. 1-3% faster on AMD64. 5% faster on other platforms.\r\n* Dec 8 2015: Fixed rare [one byte out-of bounds read](https://github.com/klauspost/compress/issues/20). Please update!\r\n* Nov 23 2015: Optimization on token writer. ~2-4% faster. Contributed by [@dsnet](https://github.com/dsnet).\r\n* Nov 20 2015: Small optimization to bit writer on 64 bit systems.\r\n* Nov 17 2015: Fixed out-of-bound errors if the underlying Writer returned an error. See [#15](https://github.com/klauspost/compress/issues/15).\r\n* Nov 12 2015: Added [io.WriterTo](https://golang.org/pkg/io/#WriterTo) support to gzip/inflate.\r\n* Nov 11 2015: Merged [CL 16669](https://go-review.googlesource.com/#/c/16669/4): archive/zip: enable overriding (de)compressors per file\r\n* Oct 15 2015: Added skipping on uncompressible data. Random data speed up >5x.\r\n\r\n</details>\r\n\r\n# deflate usage\r\n\r\nThe packages are drop-in replacements for standard library [deflate](https://godoc.org/github.com/klauspost/compress/flate), [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip), and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). Simply replace the import path to use them:\r\n\r\nTypical speed is about 2x of the standard library packages.\r\n\r\n| old import       | new import                            | Documentation                                                           |\r\n|------------------|---------------------------------------|-------------------------------------------------------------------------|\r\n| `compress/gzip`  | `github.com/klauspost/compress/gzip`  | [gzip](https://pkg.go.dev/github.com/klauspost/compress/gzip?tab=doc)   |\r\n| `compress/zlib`  | `github.com/klauspost/compress/zlib`  | [zlib](https://pkg.go.dev/github.com/klauspost/compress/zlib?tab=doc)   |\r\n| `archive/zip`    | `github.com/klauspost/compress/zip`   | [zip](https://pkg.go.dev/github.com/klauspost/compress/zip?tab=doc)     |\r\n| `compress/flate` | `github.com/klauspost/compress/flate` | [flate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc) |\r\n\r\nYou may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop-in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.\r\n\r\nThe packages implement the same API as the standard library, so you can use the original godoc documentation: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).\r\n\r\nCurrently there is only minor speedup on decompression (mostly CRC32 calculation).\r\n\r\nMemory usage is typically 1MB for a Writer. stdlib is in the same range. \r\nIf you expect to have a lot of concurrently allocated Writers consider using \r\nthe stateless compression described below.\r\n\r\nFor compression performance, see: [this spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing).\r\n\r\nTo disable all assembly add `-tags=noasm`. This works across all packages.\r\n\r\n# Stateless compression\r\n\r\nThis package offers stateless compression as a special option for gzip/deflate. \r\nIt will do compression but without maintaining any state between Write calls.\r\n\r\nThis means there will be no memory kept between Write calls, but compression and speed will be suboptimal.\r\n\r\nThis is only relevant in cases where you expect to run many thousands of compressors concurrently, \r\nbut with very little activity. This is *not* intended for regular web servers serving individual requests.  \r\n\r\nBecause of this, the size of actual Write calls will affect output size.\r\n\r\nIn gzip, specify level `-3` / `gzip.StatelessCompression` to enable.\r\n\r\nFor direct deflate use, NewStatelessWriter and StatelessDeflate are available. See [documentation](https://godoc.org/github.com/klauspost/compress/flate#NewStatelessWriter)\r\n\r\nA `bufio.Writer` can of course be used to control write sizes. For example, to use a 4KB buffer:\r\n\r\n```go\r\n\t// replace 'ioutil.Discard' with your output.\r\n\tgzw, err := gzip.NewWriterLevel(ioutil.Discard, gzip.StatelessCompression)\r\n\tif err != nil {\r\n\t\treturn err\r\n\t}\r\n\tdefer gzw.Close()\r\n\r\n\tw := bufio.NewWriterSize(gzw, 4096)\r\n\tdefer w.Flush()\r\n\t\r\n\t// Write to 'w' \r\n```\r\n\r\nThis will only use up to 4KB in memory when the writer is idle. \r\n\r\nCompression is almost always worse than the fastest compression level \r\nand each write will allocate (a little) memory. \r\n\r\n\r\n# Other packages\r\n\r\nHere are other packages of good quality and pure Go (no cgo wrappers or autoconverted code):\r\n\r\n* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression.\r\n* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression.\r\n* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer.\r\n* [github.com/ronanh/intcomp](https://github.com/ronanh/intcomp) - Integer compression.\r\n* [github.com/spenczar/fpc](https://github.com/spenczar/fpc) - Float compression.\r\n* [github.com/minio/zipindex](https://github.com/minio/zipindex) - External ZIP directory index.\r\n* [github.com/ybirader/pzip](https://github.com/ybirader/pzip) - Fast concurrent zip archiver and extractor.\r\n\r\n# license\r\n\r\nThis code is licensed under the same conditions as the original Go code. See LICENSE file.\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nSecurity updates are applied only to the latest release.\n\n## Vulnerability Definition\n\nA security vulnerability is a bug that with certain input triggers a crash or an infinite loop. Most calls will have varying execution time and only in rare cases will slow operation be considered a security vulnerability.\n\nCorrupted output generally is not considered a security vulnerability, unless independent operations are able to affect each other. Note that not all functionality is re-entrant and safe to use concurrently.\n\nOut-of-memory crashes only applies if the en/decoder uses an abnormal amount of memory, with appropriate options applied, to limit maximum window size, concurrency, etc. However, if you are in doubt you are welcome to file a security issue.\n\nIt is assumed that all callers are trusted, meaning internal data exposed through reflection or inspection of returned data structures is not considered a vulnerability.\n\nVulnerabilities resulting from compiler/assembler errors should be reported upstream. Depending on the severity this package may or may not implement a workaround.\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/klauspost/compress/security/advisories/new). If possible please provide a minimal reproducer. If the issue only applies to a single platform, it would be helpful to provide access to that.\n\nThis project is maintained by a team of volunteers on a reasonable-effort basis. As such, vulnerabilities will be disclosed in a best effort base.\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/compressible.go",
    "content": "package compress\n\nimport \"math\"\n\n// Estimate returns a normalized compressibility estimate of block b.\n// Values close to zero are likely uncompressible.\n// Values above 0.1 are likely to be compressible.\n// Values above 0.5 are very compressible.\n// Very small lengths will return 0.\nfunc Estimate(b []byte) float64 {\n\tif len(b) < 16 {\n\t\treturn 0\n\t}\n\n\t// Correctly predicted order 1\n\thits := 0\n\tlastMatch := false\n\tvar o1 [256]byte\n\tvar hist [256]int\n\tc1 := byte(0)\n\tfor _, c := range b {\n\t\tif c == o1[c1] {\n\t\t\t// We only count a hit if there was two correct predictions in a row.\n\t\t\tif lastMatch {\n\t\t\t\thits++\n\t\t\t}\n\t\t\tlastMatch = true\n\t\t} else {\n\t\t\tlastMatch = false\n\t\t}\n\t\to1[c1] = c\n\t\tc1 = c\n\t\thist[c]++\n\t}\n\n\t// Use x^0.6 to give better spread\n\tprediction := math.Pow(float64(hits)/float64(len(b)), 0.6)\n\n\t// Calculate histogram distribution\n\tvariance := float64(0)\n\tavg := float64(len(b)) / 256\n\n\tfor _, v := range hist {\n\t\tΔ := float64(v) - avg\n\t\tvariance += Δ * Δ\n\t}\n\n\tstddev := math.Sqrt(float64(variance)) / float64(len(b))\n\texp := math.Sqrt(1 / float64(len(b)))\n\n\t// Subtract expected stddev\n\tstddev -= exp\n\tif stddev < 0 {\n\t\tstddev = 0\n\t}\n\tstddev *= 1 + exp\n\n\t// Use x^0.4 to give better spread\n\tentropy := math.Pow(stddev, 0.4)\n\n\t// 50/50 weight between prediction and histogram distribution\n\treturn math.Pow((prediction+entropy)/2, 0.9)\n}\n\n// ShannonEntropyBits returns the number of bits minimum required to represent\n// an entropy encoding of the input bytes.\n// https://en.wiktionary.org/wiki/Shannon_entropy\nfunc ShannonEntropyBits(b []byte) int {\n\tif len(b) == 0 {\n\t\treturn 0\n\t}\n\tvar hist [256]int\n\tfor _, c := range b {\n\t\thist[c]++\n\t}\n\tshannon := float64(0)\n\tinvTotal := 1.0 / float64(len(b))\n\tfor _, v := range hist[:] {\n\t\tif v > 0 {\n\t\t\tn := float64(v)\n\t\t\tshannon += math.Ceil(-math.Log2(n*invTotal) * n)\n\t\t}\n\t}\n\treturn int(math.Ceil(shannon))\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/deflate.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Copyright (c) 2015 Klaus Post\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\nconst (\n\tNoCompression      = 0\n\tBestSpeed          = 1\n\tBestCompression    = 9\n\tDefaultCompression = -1\n\n\t// HuffmanOnly disables Lempel-Ziv match searching and only performs Huffman\n\t// entropy encoding. This mode is useful in compressing data that has\n\t// already been compressed with an LZ style algorithm (e.g. Snappy or LZ4)\n\t// that lacks an entropy encoder. Compression gains are achieved when\n\t// certain bytes in the input stream occur more frequently than others.\n\t//\n\t// Note that HuffmanOnly produces a compressed output that is\n\t// RFC 1951 compliant. That is, any valid DEFLATE decompressor will\n\t// continue to be able to decompress this output.\n\tHuffmanOnly         = -2\n\tConstantCompression = HuffmanOnly // compatibility alias.\n\n\tlogWindowSize    = 15\n\twindowSize       = 1 << logWindowSize\n\twindowMask       = windowSize - 1\n\tlogMaxOffsetSize = 15  // Standard DEFLATE\n\tminMatchLength   = 4   // The smallest match that the compressor looks for\n\tmaxMatchLength   = 258 // The longest match for the compressor\n\tminOffsetSize    = 1   // The shortest offset that makes any sense\n\n\t// The maximum number of tokens we will encode at the time.\n\t// Smaller sizes usually creates less optimal blocks.\n\t// Bigger can make context switching slow.\n\t// We use this for levels 7-9, so we make it big.\n\tmaxFlateBlockTokens = 1 << 15\n\tmaxStoreBlockSize   = 65535\n\thashBits            = 17 // After 17 performance degrades\n\thashSize            = 1 << hashBits\n\thashMask            = (1 << hashBits) - 1\n\thashShift           = (hashBits + minMatchLength - 1) / minMatchLength\n\tmaxHashOffset       = 1 << 28\n\n\tskipNever = math.MaxInt32\n\n\tdebugDeflate = false\n)\n\ntype compressionLevel struct {\n\tgood, lazy, nice, chain, fastSkipHashing, level int\n}\n\n// Compression levels have been rebalanced from zlib deflate defaults\n// to give a bigger spread in speed and compression.\n// See https://blog.klauspost.com/rebalancing-deflate-compression-levels/\nvar levels = []compressionLevel{\n\t{}, // 0\n\t// Level 1-6 uses specialized algorithm - values not used\n\t{0, 0, 0, 0, 0, 1},\n\t{0, 0, 0, 0, 0, 2},\n\t{0, 0, 0, 0, 0, 3},\n\t{0, 0, 0, 0, 0, 4},\n\t{0, 0, 0, 0, 0, 5},\n\t{0, 0, 0, 0, 0, 6},\n\t// Levels 7-9 use increasingly more lazy matching\n\t// and increasingly stringent conditions for \"good enough\".\n\t{8, 12, 16, 24, skipNever, 7},\n\t{16, 30, 40, 64, skipNever, 8},\n\t{32, 258, 258, 1024, skipNever, 9},\n}\n\n// advancedState contains state for the advanced levels, with bigger hash tables, etc.\ntype advancedState struct {\n\t// deflate state\n\tlength         int\n\toffset         int\n\tmaxInsertIndex int\n\tchainHead      int\n\thashOffset     int\n\n\tii uint16 // position of last match, intended to overflow to reset.\n\n\t// input window: unprocessed data is window[index:windowEnd]\n\tindex     int\n\thashMatch [maxMatchLength + minMatchLength]uint32\n\n\t// Input hash chains\n\t// hashHead[hashValue] contains the largest inputIndex with the specified hash value\n\t// If hashHead[hashValue] is within the current window, then\n\t// hashPrev[hashHead[hashValue] & windowMask] contains the previous index\n\t// with the same hash value.\n\thashHead [hashSize]uint32\n\thashPrev [windowSize]uint32\n}\n\ntype compressor struct {\n\tcompressionLevel\n\n\th *huffmanEncoder\n\tw *huffmanBitWriter\n\n\t// compression algorithm\n\tfill func(*compressor, []byte) int // copy data to window\n\tstep func(*compressor)             // process window\n\n\twindow     []byte\n\twindowEnd  int\n\tblockStart int // window index where current tokens start\n\terr        error\n\n\t// queued output tokens\n\ttokens tokens\n\tfast   fastEnc\n\tstate  *advancedState\n\n\tsync          bool // requesting flush\n\tbyteAvailable bool // if true, still need to process window[index-1].\n}\n\nfunc (d *compressor) fillDeflate(b []byte) int {\n\ts := d.state\n\tif s.index >= 2*windowSize-(minMatchLength+maxMatchLength) {\n\t\t// shift the window by windowSize\n\t\t//copy(d.window[:], d.window[windowSize:2*windowSize])\n\t\t*(*[windowSize]byte)(d.window) = *(*[windowSize]byte)(d.window[windowSize:])\n\t\ts.index -= windowSize\n\t\td.windowEnd -= windowSize\n\t\tif d.blockStart >= windowSize {\n\t\t\td.blockStart -= windowSize\n\t\t} else {\n\t\t\td.blockStart = math.MaxInt32\n\t\t}\n\t\ts.hashOffset += windowSize\n\t\tif s.hashOffset > maxHashOffset {\n\t\t\tdelta := s.hashOffset - 1\n\t\t\ts.hashOffset -= delta\n\t\t\ts.chainHead -= delta\n\t\t\t// Iterate over slices instead of arrays to avoid copying\n\t\t\t// the entire table onto the stack (Issue #18625).\n\t\t\tfor i, v := range s.hashPrev[:] {\n\t\t\t\tif int(v) > delta {\n\t\t\t\t\ts.hashPrev[i] = uint32(int(v) - delta)\n\t\t\t\t} else {\n\t\t\t\t\ts.hashPrev[i] = 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor i, v := range s.hashHead[:] {\n\t\t\t\tif int(v) > delta {\n\t\t\t\t\ts.hashHead[i] = uint32(int(v) - delta)\n\t\t\t\t} else {\n\t\t\t\t\ts.hashHead[i] = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tn := copy(d.window[d.windowEnd:], b)\n\td.windowEnd += n\n\treturn n\n}\n\nfunc (d *compressor) writeBlock(tok *tokens, index int, eof bool) error {\n\tif index > 0 || eof {\n\t\tvar window []byte\n\t\tif d.blockStart <= index {\n\t\t\twindow = d.window[d.blockStart:index]\n\t\t}\n\t\td.blockStart = index\n\t\t//d.w.writeBlock(tok, eof, window)\n\t\td.w.writeBlockDynamic(tok, eof, window, d.sync)\n\t\treturn d.w.err\n\t}\n\treturn nil\n}\n\n// writeBlockSkip writes the current block and uses the number of tokens\n// to determine if the block should be stored on no matches, or\n// only huffman encoded.\nfunc (d *compressor) writeBlockSkip(tok *tokens, index int, eof bool) error {\n\tif index > 0 || eof {\n\t\tif d.blockStart <= index {\n\t\t\twindow := d.window[d.blockStart:index]\n\t\t\t// If we removed less than a 64th of all literals\n\t\t\t// we huffman compress the block.\n\t\t\tif int(tok.n) > len(window)-int(tok.n>>6) {\n\t\t\t\td.w.writeBlockHuff(eof, window, d.sync)\n\t\t\t} else {\n\t\t\t\t// Write a dynamic huffman block.\n\t\t\t\td.w.writeBlockDynamic(tok, eof, window, d.sync)\n\t\t\t}\n\t\t} else {\n\t\t\td.w.writeBlock(tok, eof, nil)\n\t\t}\n\t\td.blockStart = index\n\t\treturn d.w.err\n\t}\n\treturn nil\n}\n\n// fillWindow will fill the current window with the supplied\n// dictionary and calculate all hashes.\n// This is much faster than doing a full encode.\n// Should only be used after a start/reset.\nfunc (d *compressor) fillWindow(b []byte) {\n\t// Do not fill window if we are in store-only or huffman mode.\n\tif d.level <= 0 && d.level > -MinCustomWindowSize {\n\t\treturn\n\t}\n\tif d.fast != nil {\n\t\t// encode the last data, but discard the result\n\t\tif len(b) > maxMatchOffset {\n\t\t\tb = b[len(b)-maxMatchOffset:]\n\t\t}\n\t\td.fast.Encode(&d.tokens, b)\n\t\td.tokens.Reset()\n\t\treturn\n\t}\n\ts := d.state\n\t// If we are given too much, cut it.\n\tif len(b) > windowSize {\n\t\tb = b[len(b)-windowSize:]\n\t}\n\t// Add all to window.\n\tn := copy(d.window[d.windowEnd:], b)\n\n\t// Calculate 256 hashes at the time (more L1 cache hits)\n\tloops := (n + 256 - minMatchLength) / 256\n\tfor j := range loops {\n\t\tstartindex := j * 256\n\t\tend := min(startindex+256+minMatchLength-1, n)\n\t\ttocheck := d.window[startindex:end]\n\t\tdstSize := len(tocheck) - minMatchLength + 1\n\n\t\tif dstSize <= 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tdst := s.hashMatch[:dstSize]\n\t\tbulkHash4(tocheck, dst)\n\t\tvar newH uint32\n\t\tfor i, val := range dst {\n\t\t\tdi := i + startindex\n\t\t\tnewH = val & hashMask\n\t\t\t// Get previous value with the same hash.\n\t\t\t// Our chain should point to the previous value.\n\t\t\ts.hashPrev[di&windowMask] = s.hashHead[newH]\n\t\t\t// Set the head of the hash chain to us.\n\t\t\ts.hashHead[newH] = uint32(di + s.hashOffset)\n\t\t}\n\t}\n\t// Update window information.\n\td.windowEnd += n\n\ts.index = n\n}\n\n// Try to find a match starting at index whose length is greater than prevSize.\n// We only look at chainCount possibilities before giving up.\n// pos = s.index, prevHead = s.chainHead-s.hashOffset, prevLength=minMatchLength-1, lookahead\nfunc (d *compressor) findMatch(pos int, prevHead int, lookahead int) (length, offset int, ok bool) {\n\tminMatchLook := min(lookahead, maxMatchLength)\n\n\twin := d.window[0 : pos+minMatchLook]\n\n\t// We quit when we get a match that's at least nice long\n\tnice := min(d.nice, len(win)-pos)\n\n\t// If we've got a match that's good enough, only look in 1/4 the chain.\n\ttries := d.chain\n\tlength = minMatchLength - 1\n\n\twEnd := win[pos+length]\n\twPos := win[pos:]\n\tminIndex := max(pos-windowSize, 0)\n\toffset = 0\n\n\tif d.chain < 100 {\n\t\tfor i := prevHead; tries > 0; tries-- {\n\t\t\tif wEnd == win[i+length] {\n\t\t\t\tn := matchLen(win[i:i+minMatchLook], wPos)\n\t\t\t\tif n > length {\n\t\t\t\t\tlength = n\n\t\t\t\t\toffset = pos - i\n\t\t\t\t\tok = true\n\t\t\t\t\tif n >= nice {\n\t\t\t\t\t\t// The match is good enough that we don't try to find a better one.\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\twEnd = win[pos+n]\n\t\t\t\t}\n\t\t\t}\n\t\t\tif i <= minIndex {\n\t\t\t\t// hashPrev[i & windowMask] has already been overwritten, so stop now.\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ti = int(d.state.hashPrev[i&windowMask]) - d.state.hashOffset\n\t\t\tif i < minIndex {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\t// Minimum gain to accept a match.\n\tcGain := 4\n\n\t// Some like it higher (CSV), some like it lower (JSON)\n\tconst baseCost = 3\n\t// Base is 4 bytes at with an additional cost.\n\t// Matches must be better than this.\n\n\tfor i := prevHead; tries > 0; tries-- {\n\t\tif wEnd == win[i+length] {\n\t\t\tn := matchLen(win[i:i+minMatchLook], wPos)\n\t\t\tif n > length {\n\t\t\t\t// Calculate gain. Estimate\n\t\t\t\tnewGain := d.h.bitLengthRaw(wPos[:n]) - int(offsetExtraBits[offsetCode(uint32(pos-i))]) - baseCost - int(lengthExtraBits[lengthCodes[(n-3)&255]])\n\n\t\t\t\t//fmt.Println(\"gain:\", newGain, \"prev:\", cGain, \"raw:\", d.h.bitLengthRaw(wPos[:n]), \"this-len:\", n, \"prev-len:\", length)\n\t\t\t\tif newGain > cGain {\n\t\t\t\t\tlength = n\n\t\t\t\t\toffset = pos - i\n\t\t\t\t\tcGain = newGain\n\t\t\t\t\tok = true\n\t\t\t\t\tif n >= nice {\n\t\t\t\t\t\t// The match is good enough that we don't try to find a better one.\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\twEnd = win[pos+n]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif i <= minIndex {\n\t\t\t// hashPrev[i & windowMask] has already been overwritten, so stop now.\n\t\t\tbreak\n\t\t}\n\t\ti = int(d.state.hashPrev[i&windowMask]) - d.state.hashOffset\n\t\tif i < minIndex {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn\n}\n\nfunc (d *compressor) writeStoredBlock(buf []byte) error {\n\tif d.w.writeStoredHeader(len(buf), false); d.w.err != nil {\n\t\treturn d.w.err\n\t}\n\td.w.writeBytes(buf)\n\treturn d.w.err\n}\n\n// hash4 returns a hash representation of the first 4 bytes\n// of the supplied slice.\n// The caller must ensure that len(b) >= 4.\nfunc hash4(b []byte) uint32 {\n\treturn hash4u(le.Load32(b, 0), hashBits)\n}\n\n// hash4 returns the hash of u to fit in a hash table with h bits.\n// Preferably h should be a constant and should always be <32.\nfunc hash4u(u uint32, h uint8) uint32 {\n\treturn (u * prime4bytes) >> (32 - h)\n}\n\n// bulkHash4 will compute hashes using the same\n// algorithm as hash4\nfunc bulkHash4(b []byte, dst []uint32) {\n\tif len(b) < 4 {\n\t\treturn\n\t}\n\thb := le.Load32(b, 0)\n\n\tdst[0] = hash4u(hb, hashBits)\n\tend := len(b) - 4 + 1\n\tfor i := 1; i < end; i++ {\n\t\thb = (hb >> 8) | uint32(b[i+3])<<24\n\t\tdst[i] = hash4u(hb, hashBits)\n\t}\n}\n\nfunc (d *compressor) initDeflate() {\n\td.window = make([]byte, 2*windowSize)\n\td.byteAvailable = false\n\td.err = nil\n\tif d.state == nil {\n\t\treturn\n\t}\n\ts := d.state\n\ts.index = 0\n\ts.hashOffset = 1\n\ts.length = minMatchLength - 1\n\ts.offset = 0\n\ts.chainHead = -1\n}\n\n// deflateLazy is the same as deflate, but with d.fastSkipHashing == skipNever,\n// meaning it always has lazy matching on.\nfunc (d *compressor) deflateLazy() {\n\ts := d.state\n\t// Sanity enables additional runtime tests.\n\t// It's intended to be used during development\n\t// to supplement the currently ad-hoc unit tests.\n\tconst sanity = debugDeflate\n\n\tif d.windowEnd-s.index < minMatchLength+maxMatchLength && !d.sync {\n\t\treturn\n\t}\n\tif d.windowEnd != s.index && d.chain > 100 {\n\t\t// Get literal huffman coder.\n\t\tif d.h == nil {\n\t\t\td.h = newHuffmanEncoder(maxFlateBlockTokens)\n\t\t}\n\t\tvar tmp [256]uint16\n\t\ttoIndex := d.window[s.index:d.windowEnd]\n\t\ttoIndex = toIndex[:min(len(toIndex), maxFlateBlockTokens)]\n\t\tfor _, v := range toIndex {\n\t\t\ttmp[v]++\n\t\t}\n\t\td.h.generate(tmp[:], 15)\n\t}\n\n\ts.maxInsertIndex = d.windowEnd - (minMatchLength - 1)\n\n\tfor {\n\t\tif sanity && s.index > d.windowEnd {\n\t\t\tpanic(\"index > windowEnd\")\n\t\t}\n\t\tlookahead := d.windowEnd - s.index\n\t\tif lookahead < minMatchLength+maxMatchLength {\n\t\t\tif !d.sync {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif sanity && s.index > d.windowEnd {\n\t\t\t\tpanic(\"index > windowEnd\")\n\t\t\t}\n\t\t\tif lookahead == 0 {\n\t\t\t\t// Flush current output block if any.\n\t\t\t\tif d.byteAvailable {\n\t\t\t\t\t// There is still one pending token that needs to be flushed\n\t\t\t\t\td.tokens.AddLiteral(d.window[s.index-1])\n\t\t\t\t\td.byteAvailable = false\n\t\t\t\t}\n\t\t\t\tif d.tokens.n > 0 {\n\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\td.tokens.Reset()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tif s.index < s.maxInsertIndex {\n\t\t\t// Update the hash\n\t\t\thash := hash4(d.window[s.index:])\n\t\t\tch := s.hashHead[hash]\n\t\t\ts.chainHead = int(ch)\n\t\t\ts.hashPrev[s.index&windowMask] = ch\n\t\t\ts.hashHead[hash] = uint32(s.index + s.hashOffset)\n\t\t}\n\t\tprevLength := s.length\n\t\tprevOffset := s.offset\n\t\ts.length = minMatchLength - 1\n\t\ts.offset = 0\n\t\tminIndex := max(s.index-windowSize, 0)\n\n\t\tif s.chainHead-s.hashOffset >= minIndex && lookahead > prevLength && prevLength < d.lazy {\n\t\t\tif newLength, newOffset, ok := d.findMatch(s.index, s.chainHead-s.hashOffset, lookahead); ok {\n\t\t\t\ts.length = newLength\n\t\t\t\ts.offset = newOffset\n\t\t\t}\n\t\t}\n\n\t\tif prevLength >= minMatchLength && s.length <= prevLength {\n\t\t\t// No better match, but check for better match at end...\n\t\t\t//\n\t\t\t// Skip forward a number of bytes.\n\t\t\t// Offset of 2 seems to yield best results. 3 is sometimes better.\n\t\t\tconst checkOff = 2\n\n\t\t\t// Check all, except full length\n\t\t\tif prevLength < maxMatchLength-checkOff {\n\t\t\t\tprevIndex := s.index - 1\n\t\t\t\tif prevIndex+prevLength < s.maxInsertIndex {\n\t\t\t\t\tend := min(lookahead, maxMatchLength+checkOff)\n\t\t\t\t\tend += prevIndex\n\n\t\t\t\t\t// Hash at match end.\n\t\t\t\t\th := hash4(d.window[prevIndex+prevLength:])\n\t\t\t\t\tch2 := int(s.hashHead[h]) - s.hashOffset - prevLength\n\t\t\t\t\tif prevIndex-ch2 != prevOffset && ch2 > minIndex+checkOff {\n\t\t\t\t\t\tlength := matchLen(d.window[prevIndex+checkOff:end], d.window[ch2+checkOff:])\n\t\t\t\t\t\t// It seems like a pure length metric is best.\n\t\t\t\t\t\tif length > prevLength {\n\t\t\t\t\t\t\tprevLength = length\n\t\t\t\t\t\t\tprevOffset = prevIndex - ch2\n\n\t\t\t\t\t\t\t// Extend back...\n\t\t\t\t\t\t\tfor i := checkOff - 1; i >= 0; i-- {\n\t\t\t\t\t\t\t\tif prevLength >= maxMatchLength || d.window[prevIndex+i] != d.window[ch2+i] {\n\t\t\t\t\t\t\t\t\t// Emit tokens we \"owe\"\n\t\t\t\t\t\t\t\t\tfor j := 0; j <= i; j++ {\n\t\t\t\t\t\t\t\t\t\td.tokens.AddLiteral(d.window[prevIndex+j])\n\t\t\t\t\t\t\t\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t\t\t\t\t\t\t\t// The block includes the current character\n\t\t\t\t\t\t\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\td.tokens.Reset()\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ts.index++\n\t\t\t\t\t\t\t\t\t\tif s.index < s.maxInsertIndex {\n\t\t\t\t\t\t\t\t\t\t\th := hash4(d.window[s.index:])\n\t\t\t\t\t\t\t\t\t\t\tch := s.hashHead[h]\n\t\t\t\t\t\t\t\t\t\t\ts.chainHead = int(ch)\n\t\t\t\t\t\t\t\t\t\t\ts.hashPrev[s.index&windowMask] = ch\n\t\t\t\t\t\t\t\t\t\t\ts.hashHead[h] = uint32(s.index + s.hashOffset)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprevLength++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if false {\n\t\t\t\t\t\t\t// Check one further ahead.\n\t\t\t\t\t\t\t// Only rarely better, disabled for now.\n\t\t\t\t\t\t\tprevIndex++\n\t\t\t\t\t\t\th := hash4(d.window[prevIndex+prevLength:])\n\t\t\t\t\t\t\tch2 := int(s.hashHead[h]) - s.hashOffset - prevLength\n\t\t\t\t\t\t\tif prevIndex-ch2 != prevOffset && ch2 > minIndex+checkOff {\n\t\t\t\t\t\t\t\tlength := matchLen(d.window[prevIndex+checkOff:end], d.window[ch2+checkOff:])\n\t\t\t\t\t\t\t\t// It seems like a pure length metric is best.\n\t\t\t\t\t\t\t\tif length > prevLength+checkOff {\n\t\t\t\t\t\t\t\t\tprevLength = length\n\t\t\t\t\t\t\t\t\tprevOffset = prevIndex - ch2\n\t\t\t\t\t\t\t\t\tprevIndex--\n\n\t\t\t\t\t\t\t\t\t// Extend back...\n\t\t\t\t\t\t\t\t\tfor i := checkOff; i >= 0; i-- {\n\t\t\t\t\t\t\t\t\t\tif prevLength >= maxMatchLength || d.window[prevIndex+i] != d.window[ch2+i-1] {\n\t\t\t\t\t\t\t\t\t\t\t// Emit tokens we \"owe\"\n\t\t\t\t\t\t\t\t\t\t\tfor j := 0; j <= i; j++ {\n\t\t\t\t\t\t\t\t\t\t\t\td.tokens.AddLiteral(d.window[prevIndex+j])\n\t\t\t\t\t\t\t\t\t\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// The block includes the current character\n\t\t\t\t\t\t\t\t\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\td.tokens.Reset()\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\ts.index++\n\t\t\t\t\t\t\t\t\t\t\t\tif s.index < s.maxInsertIndex {\n\t\t\t\t\t\t\t\t\t\t\t\t\th := hash4(d.window[s.index:])\n\t\t\t\t\t\t\t\t\t\t\t\t\tch := s.hashHead[h]\n\t\t\t\t\t\t\t\t\t\t\t\t\ts.chainHead = int(ch)\n\t\t\t\t\t\t\t\t\t\t\t\t\ts.hashPrev[s.index&windowMask] = ch\n\t\t\t\t\t\t\t\t\t\t\t\t\ts.hashHead[h] = uint32(s.index + s.hashOffset)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tprevLength++\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// There was a match at the previous step, and the current match is\n\t\t\t// not better. Output the previous match.\n\t\t\td.tokens.AddMatch(uint32(prevLength-3), uint32(prevOffset-minOffsetSize))\n\n\t\t\t// Insert in the hash table all strings up to the end of the match.\n\t\t\t// index and index-1 are already inserted. If there is not enough\n\t\t\t// lookahead, the last two strings are not inserted into the hash\n\t\t\t// table.\n\t\t\tnewIndex := s.index + prevLength - 1\n\t\t\t// Calculate missing hashes\n\t\t\tend := min(newIndex, s.maxInsertIndex)\n\t\t\tend += minMatchLength - 1\n\t\t\tstartindex := min(s.index+1, s.maxInsertIndex)\n\t\t\ttocheck := d.window[startindex:end]\n\t\t\tdstSize := len(tocheck) - minMatchLength + 1\n\t\t\tif dstSize > 0 {\n\t\t\t\tdst := s.hashMatch[:dstSize]\n\t\t\t\tbulkHash4(tocheck, dst)\n\t\t\t\tvar newH uint32\n\t\t\t\tfor i, val := range dst {\n\t\t\t\t\tdi := i + startindex\n\t\t\t\t\tnewH = val & hashMask\n\t\t\t\t\t// Get previous value with the same hash.\n\t\t\t\t\t// Our chain should point to the previous value.\n\t\t\t\t\ts.hashPrev[di&windowMask] = s.hashHead[newH]\n\t\t\t\t\t// Set the head of the hash chain to us.\n\t\t\t\t\ts.hashHead[newH] = uint32(di + s.hashOffset)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ts.index = newIndex\n\t\t\td.byteAvailable = false\n\t\t\ts.length = minMatchLength - 1\n\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t// The block includes the current character\n\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\td.tokens.Reset()\n\t\t\t}\n\t\t\ts.ii = 0\n\t\t} else {\n\t\t\t// Reset, if we got a match this run.\n\t\t\tif s.length >= minMatchLength {\n\t\t\t\ts.ii = 0\n\t\t\t}\n\t\t\t// We have a byte waiting. Emit it.\n\t\t\tif d.byteAvailable {\n\t\t\t\ts.ii++\n\t\t\t\td.tokens.AddLiteral(d.window[s.index-1])\n\t\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\td.tokens.Reset()\n\t\t\t\t}\n\t\t\t\ts.index++\n\n\t\t\t\t// If we have a long run of no matches, skip additional bytes\n\t\t\t\t// Resets when s.ii overflows after 64KB.\n\t\t\t\tif n := int(s.ii) - d.chain; n > 0 {\n\t\t\t\t\tn = 1 + int(n>>6)\n\t\t\t\t\tfor j := 0; j < n; j++ {\n\t\t\t\t\t\tif s.index >= d.windowEnd-1 {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\td.tokens.AddLiteral(d.window[s.index-1])\n\t\t\t\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\td.tokens.Reset()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Index...\n\t\t\t\t\t\tif s.index < s.maxInsertIndex {\n\t\t\t\t\t\t\th := hash4(d.window[s.index:])\n\t\t\t\t\t\t\tch := s.hashHead[h]\n\t\t\t\t\t\t\ts.chainHead = int(ch)\n\t\t\t\t\t\t\ts.hashPrev[s.index&windowMask] = ch\n\t\t\t\t\t\t\ts.hashHead[h] = uint32(s.index + s.hashOffset)\n\t\t\t\t\t\t}\n\t\t\t\t\t\ts.index++\n\t\t\t\t\t}\n\t\t\t\t\t// Flush last byte\n\t\t\t\t\td.tokens.AddLiteral(d.window[s.index-1])\n\t\t\t\t\td.byteAvailable = false\n\t\t\t\t\t// s.length = minMatchLength - 1 // not needed, since s.ii is reset above, so it should never be > minMatchLength\n\t\t\t\t\tif d.tokens.n == maxFlateBlockTokens {\n\t\t\t\t\t\tif d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\td.tokens.Reset()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ts.index++\n\t\t\t\td.byteAvailable = true\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (d *compressor) store() {\n\tif d.windowEnd > 0 && (d.windowEnd == maxStoreBlockSize || d.sync) {\n\t\td.err = d.writeStoredBlock(d.window[:d.windowEnd])\n\t\td.windowEnd = 0\n\t}\n}\n\n// fillWindow will fill the buffer with data for huffman-only compression.\n// The number of bytes copied is returned.\nfunc (d *compressor) fillBlock(b []byte) int {\n\tn := copy(d.window[d.windowEnd:], b)\n\td.windowEnd += n\n\treturn n\n}\n\n// storeHuff will compress and store the currently added data,\n// if enough has been accumulated or we at the end of the stream.\n// Any error that occurred will be in d.err\nfunc (d *compressor) storeHuff() {\n\tif d.windowEnd < len(d.window) && !d.sync || d.windowEnd == 0 {\n\t\treturn\n\t}\n\td.w.writeBlockHuff(false, d.window[:d.windowEnd], d.sync)\n\td.err = d.w.err\n\td.windowEnd = 0\n}\n\n// storeFast will compress and store the currently added data,\n// if enough has been accumulated or we at the end of the stream.\n// Any error that occurred will be in d.err\nfunc (d *compressor) storeFast() {\n\t// We only compress if we have maxStoreBlockSize.\n\tif d.windowEnd < len(d.window) {\n\t\tif !d.sync {\n\t\t\treturn\n\t\t}\n\t\t// Handle extremely small sizes.\n\t\tif d.windowEnd < 128 {\n\t\t\tif d.windowEnd == 0 {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif d.windowEnd <= 32 {\n\t\t\t\td.err = d.writeStoredBlock(d.window[:d.windowEnd])\n\t\t\t} else {\n\t\t\t\td.w.writeBlockHuff(false, d.window[:d.windowEnd], true)\n\t\t\t\td.err = d.w.err\n\t\t\t}\n\t\t\td.tokens.Reset()\n\t\t\td.windowEnd = 0\n\t\t\td.fast.Reset()\n\t\t\treturn\n\t\t}\n\t}\n\n\td.fast.Encode(&d.tokens, d.window[:d.windowEnd])\n\t// If we made zero matches, store the block as is.\n\tif d.tokens.n == 0 {\n\t\td.err = d.writeStoredBlock(d.window[:d.windowEnd])\n\t\t// If we removed less than 1/16th, huffman compress the block.\n\t} else if int(d.tokens.n) > d.windowEnd-(d.windowEnd>>4) {\n\t\td.w.writeBlockHuff(false, d.window[:d.windowEnd], d.sync)\n\t\td.err = d.w.err\n\t} else {\n\t\td.w.writeBlockDynamic(&d.tokens, false, d.window[:d.windowEnd], d.sync)\n\t\td.err = d.w.err\n\t}\n\td.tokens.Reset()\n\td.windowEnd = 0\n}\n\n// write will add input byte to the stream.\n// Unless an error occurs all bytes will be consumed.\nfunc (d *compressor) write(b []byte) (n int, err error) {\n\tif d.err != nil {\n\t\treturn 0, d.err\n\t}\n\tn = len(b)\n\tfor len(b) > 0 {\n\t\tif d.windowEnd == len(d.window) || d.sync {\n\t\t\td.step(d)\n\t\t}\n\t\tb = b[d.fill(d, b):]\n\t\tif d.err != nil {\n\t\t\treturn 0, d.err\n\t\t}\n\t}\n\treturn n, d.err\n}\n\nfunc (d *compressor) syncFlush() error {\n\td.sync = true\n\tif d.err != nil {\n\t\treturn d.err\n\t}\n\td.step(d)\n\tif d.err == nil {\n\t\td.w.writeStoredHeader(0, false)\n\t\td.w.flush()\n\t\td.err = d.w.err\n\t}\n\td.sync = false\n\treturn d.err\n}\n\nfunc (d *compressor) init(w io.Writer, level int) (err error) {\n\td.w = newHuffmanBitWriter(w)\n\n\tswitch {\n\tcase level == NoCompression:\n\t\td.window = make([]byte, maxStoreBlockSize)\n\t\td.fill = (*compressor).fillBlock\n\t\td.step = (*compressor).store\n\tcase level == ConstantCompression:\n\t\td.w.logNewTablePenalty = 10\n\t\td.window = make([]byte, 32<<10)\n\t\td.fill = (*compressor).fillBlock\n\t\td.step = (*compressor).storeHuff\n\tcase level == DefaultCompression:\n\t\tlevel = 5\n\t\tfallthrough\n\tcase level >= 1 && level <= 6:\n\t\td.w.logNewTablePenalty = 7\n\t\td.fast = newFastEnc(level)\n\t\td.window = make([]byte, maxStoreBlockSize)\n\t\td.fill = (*compressor).fillBlock\n\t\td.step = (*compressor).storeFast\n\tcase 7 <= level && level <= 9:\n\t\td.w.logNewTablePenalty = 8\n\t\td.state = &advancedState{}\n\t\td.compressionLevel = levels[level]\n\t\td.initDeflate()\n\t\td.fill = (*compressor).fillDeflate\n\t\td.step = (*compressor).deflateLazy\n\tcase -level >= MinCustomWindowSize && -level <= MaxCustomWindowSize:\n\t\td.w.logNewTablePenalty = 7\n\t\td.fast = &fastEncL5Window{maxOffset: int32(-level), cur: maxStoreBlockSize}\n\t\td.window = make([]byte, maxStoreBlockSize)\n\t\td.fill = (*compressor).fillBlock\n\t\td.step = (*compressor).storeFast\n\tdefault:\n\t\treturn fmt.Errorf(\"flate: invalid compression level %d: want value in range [-2, 9]\", level)\n\t}\n\td.level = level\n\treturn nil\n}\n\n// reset the state of the compressor.\nfunc (d *compressor) reset(w io.Writer) {\n\td.w.reset(w)\n\td.sync = false\n\td.err = nil\n\t// We only need to reset a few things for Snappy.\n\tif d.fast != nil {\n\t\td.fast.Reset()\n\t\td.windowEnd = 0\n\t\td.tokens.Reset()\n\t\treturn\n\t}\n\tswitch d.compressionLevel.chain {\n\tcase 0:\n\t\t// level was NoCompression or ConstantCompression.\n\t\td.windowEnd = 0\n\tdefault:\n\t\ts := d.state\n\t\ts.chainHead = -1\n\t\tfor i := range s.hashHead {\n\t\t\ts.hashHead[i] = 0\n\t\t}\n\t\tfor i := range s.hashPrev {\n\t\t\ts.hashPrev[i] = 0\n\t\t}\n\t\ts.hashOffset = 1\n\t\ts.index, d.windowEnd = 0, 0\n\t\td.blockStart, d.byteAvailable = 0, false\n\t\td.tokens.Reset()\n\t\ts.length = minMatchLength - 1\n\t\ts.offset = 0\n\t\ts.ii = 0\n\t\ts.maxInsertIndex = 0\n\t}\n}\n\nfunc (d *compressor) close() error {\n\tif d.err != nil {\n\t\treturn d.err\n\t}\n\td.sync = true\n\td.step(d)\n\tif d.err != nil {\n\t\treturn d.err\n\t}\n\tif d.w.writeStoredHeader(0, true); d.w.err != nil {\n\t\treturn d.w.err\n\t}\n\td.w.flush()\n\td.w.reset(nil)\n\treturn d.w.err\n}\n\n// NewWriter returns a new Writer compressing data at the given level.\n// Following zlib, levels range from 1 (BestSpeed) to 9 (BestCompression);\n// higher levels typically run slower but compress more.\n// Level 0 (NoCompression) does not attempt any compression; it only adds the\n// necessary DEFLATE framing.\n// Level -1 (DefaultCompression) uses the default compression level.\n// Level -2 (ConstantCompression) will use Huffman compression only, giving\n// a very fast compression for all types of input, but sacrificing considerable\n// compression efficiency.\n//\n// If level is in the range [-2, 9] then the error returned will be nil.\n// Otherwise the error returned will be non-nil.\nfunc NewWriter(w io.Writer, level int) (*Writer, error) {\n\tvar dw Writer\n\tif err := dw.d.init(w, level); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &dw, nil\n}\n\n// NewWriterDict is like NewWriter but initializes the new\n// Writer with a preset dictionary.  The returned Writer behaves\n// as if the dictionary had been written to it without producing\n// any compressed output.  The compressed data written to w\n// can only be decompressed by a Reader initialized with the\n// same dictionary.\nfunc NewWriterDict(w io.Writer, level int, dict []byte) (*Writer, error) {\n\tzw, err := NewWriter(w, level)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tzw.d.fillWindow(dict)\n\tzw.dict = append(zw.dict, dict...) // duplicate dictionary for Reset method.\n\treturn zw, err\n}\n\n// MinCustomWindowSize is the minimum window size that can be sent to NewWriterWindow.\nconst MinCustomWindowSize = 32\n\n// MaxCustomWindowSize is the maximum custom window that can be sent to NewWriterWindow.\nconst MaxCustomWindowSize = windowSize\n\n// NewWriterWindow returns a new Writer compressing data with a custom window size.\n// windowSize must be from MinCustomWindowSize to MaxCustomWindowSize.\nfunc NewWriterWindow(w io.Writer, windowSize int) (*Writer, error) {\n\tif windowSize < MinCustomWindowSize {\n\t\treturn nil, errors.New(\"flate: requested window size less than MinWindowSize\")\n\t}\n\tif windowSize > MaxCustomWindowSize {\n\t\treturn nil, errors.New(\"flate: requested window size bigger than MaxCustomWindowSize\")\n\t}\n\tvar dw Writer\n\tif err := dw.d.init(w, -windowSize); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &dw, nil\n}\n\n// A Writer takes data written to it and writes the compressed\n// form of that data to an underlying writer (see NewWriter).\ntype Writer struct {\n\td    compressor\n\tdict []byte\n}\n\n// Write writes data to w, which will eventually write the\n// compressed form of data to its underlying writer.\nfunc (w *Writer) Write(data []byte) (n int, err error) {\n\treturn w.d.write(data)\n}\n\n// Flush flushes any pending data to the underlying writer.\n// It is useful mainly in compressed network protocols, to ensure that\n// a remote reader has enough data to reconstruct a packet.\n// Flush does not return until the data has been written.\n// Calling Flush when there is no pending data still causes the Writer\n// to emit a sync marker of at least 4 bytes.\n// If the underlying writer returns an error, Flush returns that error.\n//\n// In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH.\nfunc (w *Writer) Flush() error {\n\t// For more about flushing:\n\t// http://www.bolet.org/~pornin/deflate-flush.html\n\treturn w.d.syncFlush()\n}\n\n// Close flushes and closes the writer.\nfunc (w *Writer) Close() error {\n\treturn w.d.close()\n}\n\n// Reset discards the writer's state and makes it equivalent to\n// the result of NewWriter or NewWriterDict called with dst\n// and w's level and dictionary.\nfunc (w *Writer) Reset(dst io.Writer) {\n\tif len(w.dict) > 0 {\n\t\t// w was created with NewWriterDict\n\t\tw.d.reset(dst)\n\t\tif dst != nil {\n\t\t\tw.d.fillWindow(w.dict)\n\t\t}\n\t} else {\n\t\t// w was created with NewWriter\n\t\tw.d.reset(dst)\n\t}\n}\n\n// ResetDict discards the writer's state and makes it equivalent to\n// the result of NewWriter or NewWriterDict called with dst\n// and w's level, but sets a specific dictionary.\nfunc (w *Writer) ResetDict(dst io.Writer, dict []byte) {\n\tw.dict = dict\n\tw.d.reset(dst)\n\tw.d.fillWindow(w.dict)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/dict_decoder.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\n// dictDecoder implements the LZ77 sliding dictionary as used in decompression.\n// LZ77 decompresses data through sequences of two forms of commands:\n//\n//   - Literal insertions: Runs of one or more symbols are inserted into the data\n//     stream as is. This is accomplished through the writeByte method for a\n//     single symbol, or combinations of writeSlice/writeMark for multiple symbols.\n//     Any valid stream must start with a literal insertion if no preset dictionary\n//     is used.\n//\n//   - Backward copies: Runs of one or more symbols are copied from previously\n//     emitted data. Backward copies come as the tuple (dist, length) where dist\n//     determines how far back in the stream to copy from and length determines how\n//     many bytes to copy. Note that it is valid for the length to be greater than\n//     the distance. Since LZ77 uses forward copies, that situation is used to\n//     perform a form of run-length encoding on repeated runs of symbols.\n//     The writeCopy and tryWriteCopy are used to implement this command.\n//\n// For performance reasons, this implementation performs little to no sanity\n// checks about the arguments. As such, the invariants documented for each\n// method call must be respected.\ntype dictDecoder struct {\n\thist []byte // Sliding window history\n\n\t// Invariant: 0 <= rdPos <= wrPos <= len(hist)\n\twrPos int  // Current output position in buffer\n\trdPos int  // Have emitted hist[:rdPos] already\n\tfull  bool // Has a full window length been written yet?\n}\n\n// init initializes dictDecoder to have a sliding window dictionary of the given\n// size. If a preset dict is provided, it will initialize the dictionary with\n// the contents of dict.\nfunc (dd *dictDecoder) init(size int, dict []byte) {\n\t*dd = dictDecoder{hist: dd.hist}\n\n\tif cap(dd.hist) < size {\n\t\tdd.hist = make([]byte, size)\n\t}\n\tdd.hist = dd.hist[:size]\n\n\tif len(dict) > len(dd.hist) {\n\t\tdict = dict[len(dict)-len(dd.hist):]\n\t}\n\tdd.wrPos = copy(dd.hist, dict)\n\tif dd.wrPos == len(dd.hist) {\n\t\tdd.wrPos = 0\n\t\tdd.full = true\n\t}\n\tdd.rdPos = dd.wrPos\n}\n\n// histSize reports the total amount of historical data in the dictionary.\nfunc (dd *dictDecoder) histSize() int {\n\tif dd.full {\n\t\treturn len(dd.hist)\n\t}\n\treturn dd.wrPos\n}\n\n// availRead reports the number of bytes that can be flushed by readFlush.\nfunc (dd *dictDecoder) availRead() int {\n\treturn dd.wrPos - dd.rdPos\n}\n\n// availWrite reports the available amount of output buffer space.\nfunc (dd *dictDecoder) availWrite() int {\n\treturn len(dd.hist) - dd.wrPos\n}\n\n// writeSlice returns a slice of the available buffer to write data to.\n//\n// This invariant will be kept: len(s) <= availWrite()\nfunc (dd *dictDecoder) writeSlice() []byte {\n\treturn dd.hist[dd.wrPos:]\n}\n\n// writeMark advances the writer pointer by cnt.\n//\n// This invariant must be kept: 0 <= cnt <= availWrite()\nfunc (dd *dictDecoder) writeMark(cnt int) {\n\tdd.wrPos += cnt\n}\n\n// writeByte writes a single byte to the dictionary.\n//\n// This invariant must be kept: 0 < availWrite()\nfunc (dd *dictDecoder) writeByte(c byte) {\n\tdd.hist[dd.wrPos] = c\n\tdd.wrPos++\n}\n\n// writeCopy copies a string at a given (dist, length) to the output.\n// This returns the number of bytes copied and may be less than the requested\n// length if the available space in the output buffer is too small.\n//\n// This invariant must be kept: 0 < dist <= histSize()\nfunc (dd *dictDecoder) writeCopy(dist, length int) int {\n\tdstBase := dd.wrPos\n\tdstPos := dstBase\n\tsrcPos := dstPos - dist\n\tendPos := min(dstPos+length, len(dd.hist))\n\n\t// Copy non-overlapping section after destination position.\n\t//\n\t// This section is non-overlapping in that the copy length for this section\n\t// is always less than or equal to the backwards distance. This can occur\n\t// if a distance refers to data that wraps-around in the buffer.\n\t// Thus, a backwards copy is performed here; that is, the exact bytes in\n\t// the source prior to the copy is placed in the destination.\n\tif srcPos < 0 {\n\t\tsrcPos += len(dd.hist)\n\t\tdstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:])\n\t\tsrcPos = 0\n\t}\n\n\t// Copy possibly overlapping section before destination position.\n\t//\n\t// This section can overlap if the copy length for this section is larger\n\t// than the backwards distance. This is allowed by LZ77 so that repeated\n\t// strings can be succinctly represented using (dist, length) pairs.\n\t// Thus, a forwards copy is performed here; that is, the bytes copied is\n\t// possibly dependent on the resulting bytes in the destination as the copy\n\t// progresses along. This is functionally equivalent to the following:\n\t//\n\t//\tfor i := 0; i < endPos-dstPos; i++ {\n\t//\t\tdd.hist[dstPos+i] = dd.hist[srcPos+i]\n\t//\t}\n\t//\tdstPos = endPos\n\t//\n\tfor dstPos < endPos {\n\t\tdstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos])\n\t}\n\n\tdd.wrPos = dstPos\n\treturn dstPos - dstBase\n}\n\n// tryWriteCopy tries to copy a string at a given (distance, length) to the\n// output. This specialized version is optimized for short distances.\n//\n// This method is designed to be inlined for performance reasons.\n//\n// This invariant must be kept: 0 < dist <= histSize()\nfunc (dd *dictDecoder) tryWriteCopy(dist, length int) int {\n\tdstPos := dd.wrPos\n\tendPos := dstPos + length\n\tif dstPos < dist || endPos > len(dd.hist) {\n\t\treturn 0\n\t}\n\tdstBase := dstPos\n\tsrcPos := dstPos - dist\n\n\t// Copy possibly overlapping section before destination position.\nloop:\n\tdstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos])\n\tif dstPos < endPos {\n\t\tgoto loop // Avoid for-loop so that this function can be inlined\n\t}\n\n\tdd.wrPos = dstPos\n\treturn dstPos - dstBase\n}\n\n// readFlush returns a slice of the historical buffer that is ready to be\n// emitted to the user. The data returned by readFlush must be fully consumed\n// before calling any other dictDecoder methods.\nfunc (dd *dictDecoder) readFlush() []byte {\n\ttoRead := dd.hist[dd.rdPos:dd.wrPos]\n\tdd.rdPos = dd.wrPos\n\tif dd.wrPos == len(dd.hist) {\n\t\tdd.wrPos, dd.rdPos = 0, 0\n\t\tdd.full = true\n\t}\n\treturn toRead\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/fast_encoder.go",
    "content": "// Copyright 2011 The Snappy-Go Authors. All rights reserved.\n// Modified for deflate by Klaus Post (c) 2015.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\ntype fastEnc interface {\n\tEncode(dst *tokens, src []byte)\n\tReset()\n}\n\nfunc newFastEnc(level int) fastEnc {\n\tswitch level {\n\tcase 1:\n\t\treturn &fastEncL1{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tcase 2:\n\t\treturn &fastEncL2{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tcase 3:\n\t\treturn &fastEncL3{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tcase 4:\n\t\treturn &fastEncL4{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tcase 5:\n\t\treturn &fastEncL5{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tcase 6:\n\t\treturn &fastEncL6{fastGen: fastGen{cur: maxStoreBlockSize}}\n\tdefault:\n\t\tpanic(\"invalid level specified\")\n\t}\n}\n\nconst (\n\ttableBits       = 15             // Bits used in the table\n\ttableSize       = 1 << tableBits // Size of the table\n\ttableShift      = 32 - tableBits // Right-shift to get the tableBits most significant bits of a uint32.\n\tbaseMatchOffset = 1              // The smallest match offset\n\tbaseMatchLength = 3              // The smallest match length per the RFC section 3.2.5\n\tmaxMatchOffset  = 1 << 15        // The largest match offset\n\n\tbTableBits   = 17                                               // Bits used in the big tables\n\tbTableSize   = 1 << bTableBits                                  // Size of the table\n\tallocHistory = maxStoreBlockSize * 5                            // Size to preallocate for history.\n\tbufferReset  = (1 << 31) - allocHistory - maxStoreBlockSize - 1 // Reset the buffer offset when reaching this.\n)\n\nconst (\n\tprime3bytes = 506832829\n\tprime4bytes = 2654435761\n\tprime5bytes = 889523592379\n\tprime6bytes = 227718039650203\n\tprime7bytes = 58295818150454627\n\tprime8bytes = 0xcf1bbcdcb7a56463\n)\n\nfunc load3232(b []byte, i int32) uint32 {\n\treturn le.Load32(b, i)\n}\n\nfunc load6432(b []byte, i int32) uint64 {\n\treturn le.Load64(b, i)\n}\n\ntype tableEntry struct {\n\toffset int32\n}\n\n// fastGen maintains the table for matches,\n// and the previous byte block for level 2.\n// This is the generic implementation.\ntype fastGen struct {\n\thist []byte\n\tcur  int32\n}\n\nfunc (e *fastGen) addBlock(src []byte) int32 {\n\t// check if we have space already\n\tif len(e.hist)+len(src) > cap(e.hist) {\n\t\tif cap(e.hist) == 0 {\n\t\t\te.hist = make([]byte, 0, allocHistory)\n\t\t} else {\n\t\t\tif cap(e.hist) < maxMatchOffset*2 {\n\t\t\t\tpanic(\"unexpected buffer size\")\n\t\t\t}\n\t\t\t// Move down\n\t\t\toffset := int32(len(e.hist)) - maxMatchOffset\n\t\t\t// copy(e.hist[0:maxMatchOffset], e.hist[offset:])\n\t\t\t*(*[maxMatchOffset]byte)(e.hist) = *(*[maxMatchOffset]byte)(e.hist[offset:])\n\t\t\te.cur += offset\n\t\t\te.hist = e.hist[:maxMatchOffset]\n\t\t}\n\t}\n\ts := int32(len(e.hist))\n\te.hist = append(e.hist, src...)\n\treturn s\n}\n\ntype tableEntryPrev struct {\n\tCur  tableEntry\n\tPrev tableEntry\n}\n\n// hash7 returns the hash of the lowest 7 bytes of u to fit in a hash table with h bits.\n// Preferably h should be a constant and should always be <64.\nfunc hash7(u uint64, h uint8) uint32 {\n\treturn uint32(((u << (64 - 56)) * prime7bytes) >> ((64 - h) & reg8SizeMask64))\n}\n\n// hashLen returns a hash of the lowest mls bytes of with length output bits.\n// mls must be >=3 and <=8. Any other value will return hash for 4 bytes.\n// length should always be < 32.\n// Preferably length and mls should be a constant for inlining.\nfunc hashLen(u uint64, length, mls uint8) uint32 {\n\tswitch mls {\n\tcase 3:\n\t\treturn (uint32(u<<8) * prime3bytes) >> (32 - length)\n\tcase 5:\n\t\treturn uint32(((u << (64 - 40)) * prime5bytes) >> (64 - length))\n\tcase 6:\n\t\treturn uint32(((u << (64 - 48)) * prime6bytes) >> (64 - length))\n\tcase 7:\n\t\treturn uint32(((u << (64 - 56)) * prime7bytes) >> (64 - length))\n\tcase 8:\n\t\treturn uint32((u * prime8bytes) >> (64 - length))\n\tdefault:\n\t\treturn (uint32(u) * prime4bytes) >> (32 - length)\n\t}\n}\n\n// matchlen will return the match length between offsets and t in src.\n// The maximum length returned is maxMatchLength - 4.\n// It is assumed that s > t, that t >=0 and s < len(src).\nfunc (e *fastGen) matchlen(s, t int, src []byte) int32 {\n\tif debugDeflate {\n\t\tif t >= s {\n\t\t\tpanic(fmt.Sprint(\"t >=s:\", t, s))\n\t\t}\n\t\tif int(s) >= len(src) {\n\t\t\tpanic(fmt.Sprint(\"s >= len(src):\", s, len(src)))\n\t\t}\n\t\tif t < 0 {\n\t\t\tpanic(fmt.Sprint(\"t < 0:\", t))\n\t\t}\n\t\tif s-t > maxMatchOffset {\n\t\t\tpanic(fmt.Sprint(s, \"-\", t, \"(\", s-t, \") > maxMatchLength (\", maxMatchOffset, \")\"))\n\t\t}\n\t}\n\ta := src[s:min(s+maxMatchLength-4, len(src))]\n\tb := src[t:]\n\treturn int32(matchLen(a, b))\n}\n\n// matchlenLong will return the match length between offsets and t in src.\n// It is assumed that s > t, that t >=0 and s < len(src).\nfunc (e *fastGen) matchlenLong(s, t int, src []byte) int32 {\n\tif debugDeflate {\n\t\tif t >= s {\n\t\t\tpanic(fmt.Sprint(\"t >=s:\", t, s))\n\t\t}\n\t\tif int(s) >= len(src) {\n\t\t\tpanic(fmt.Sprint(\"s >= len(src):\", s, len(src)))\n\t\t}\n\t\tif t < 0 {\n\t\t\tpanic(fmt.Sprint(\"t < 0:\", t))\n\t\t}\n\t\tif s-t > maxMatchOffset {\n\t\t\tpanic(fmt.Sprint(s, \"-\", t, \"(\", s-t, \") > maxMatchLength (\", maxMatchOffset, \")\"))\n\t\t}\n\t}\n\treturn int32(matchLen(src[s:], src[t:]))\n}\n\n// Reset the encoding table.\nfunc (e *fastGen) Reset() {\n\tif cap(e.hist) < allocHistory {\n\t\te.hist = make([]byte, 0, allocHistory)\n\t}\n\t// We offset current position so everything will be out of reach.\n\t// If we are above the buffer reset it will be cleared anyway since len(hist) == 0.\n\tif e.cur <= bufferReset {\n\t\te.cur += maxMatchOffset + int32(len(e.hist))\n\t}\n\te.hist = e.hist[:0]\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\nconst (\n\t// The largest offset code.\n\toffsetCodeCount = 30\n\n\t// The special code used to mark the end of a block.\n\tendBlockMarker = 256\n\n\t// The first length code.\n\tlengthCodesStart = 257\n\n\t// The number of codegen codes.\n\tcodegenCodeCount = 19\n\tbadCode          = 255\n\n\t// maxPredefinedTokens is the maximum number of tokens\n\t// where we check if fixed size is smaller.\n\tmaxPredefinedTokens = 250\n\n\t// bufferFlushSize indicates the buffer size\n\t// after which bytes are flushed to the writer.\n\t// Should preferably be a multiple of 6, since\n\t// we accumulate 6 bytes between writes to the buffer.\n\tbufferFlushSize = 246\n)\n\n// Minimum length code that emits bits.\nconst lengthExtraBitsMinCode = 8\n\n// The number of extra bits needed by length code X - LENGTH_CODES_START.\nvar lengthExtraBits = [32]uint8{\n\t/* 257 */ 0, 0, 0,\n\t/* 260 */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 2,\n\t/* 270 */ 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,\n\t/* 280 */ 4, 5, 5, 5, 5, 0,\n}\n\n// The length indicated by length code X - LENGTH_CODES_START.\nvar lengthBase = [32]uint8{\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 10,\n\t12, 14, 16, 20, 24, 28, 32, 40, 48, 56,\n\t64, 80, 96, 112, 128, 160, 192, 224, 255,\n}\n\n// Minimum offset code that emits bits.\nconst offsetExtraBitsMinCode = 4\n\n// offset code word extra bits.\nvar offsetExtraBits = [32]int8{\n\t0, 0, 0, 0, 1, 1, 2, 2, 3, 3,\n\t4, 4, 5, 5, 6, 6, 7, 7, 8, 8,\n\t9, 9, 10, 10, 11, 11, 12, 12, 13, 13,\n\t/* extended window */\n\t14, 14,\n}\n\nvar offsetCombined = [32]uint32{}\n\nfunc init() {\n\tvar offsetBase = [32]uint32{\n\t\t/* normal deflate */\n\t\t0x000000, 0x000001, 0x000002, 0x000003, 0x000004,\n\t\t0x000006, 0x000008, 0x00000c, 0x000010, 0x000018,\n\t\t0x000020, 0x000030, 0x000040, 0x000060, 0x000080,\n\t\t0x0000c0, 0x000100, 0x000180, 0x000200, 0x000300,\n\t\t0x000400, 0x000600, 0x000800, 0x000c00, 0x001000,\n\t\t0x001800, 0x002000, 0x003000, 0x004000, 0x006000,\n\n\t\t/* extended window */\n\t\t0x008000, 0x00c000,\n\t}\n\n\tfor i := range offsetCombined[:] {\n\t\t// Don't use extended window values...\n\t\tif offsetExtraBits[i] == 0 || offsetBase[i] > 0x006000 {\n\t\t\tcontinue\n\t\t}\n\t\toffsetCombined[i] = uint32(offsetExtraBits[i]) | (offsetBase[i] << 8)\n\t}\n}\n\n// The odd order in which the codegen code sizes are written.\nvar codegenOrder = []uint32{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}\n\ntype huffmanBitWriter struct {\n\t// writer is the underlying writer.\n\t// Do not use it directly; use the write method, which ensures\n\t// that Write errors are sticky.\n\twriter io.Writer\n\n\t// Data waiting to be written is bytes[0:nbytes]\n\t// and then the low nbits of bits.\n\tbits            uint64\n\tnbits           uint8\n\tnbytes          uint8\n\tlastHuffMan     bool\n\tliteralEncoding *huffmanEncoder\n\ttmpLitEncoding  *huffmanEncoder\n\toffsetEncoding  *huffmanEncoder\n\tcodegenEncoding *huffmanEncoder\n\terr             error\n\tlastHeader      int\n\t// Set between 0 (reused block can be up to 2x the size)\n\tlogNewTablePenalty uint\n\tbytes              [256 + 8]byte\n\tliteralFreq        [lengthCodesStart + 32]uint16\n\toffsetFreq         [32]uint16\n\tcodegenFreq        [codegenCodeCount]uint16\n\n\t// codegen must have an extra space for the final symbol.\n\tcodegen [literalCount + offsetCodeCount + 1]uint8\n}\n\n// Huffman reuse.\n//\n// The huffmanBitWriter supports reusing huffman tables and thereby combining block sections.\n//\n// This is controlled by several variables:\n//\n// If lastHeader is non-zero the Huffman table can be reused.\n// This also indicates that a Huffman table has been generated that can output all\n// possible symbols.\n// It also indicates that an EOB has not yet been emitted, so if a new tabel is generated\n// an EOB with the previous table must be written.\n//\n// If lastHuffMan is set, a table for outputting literals has been generated and offsets are invalid.\n//\n// An incoming block estimates the output size of a new table using a 'fresh' by calculating the\n// optimal size and adding a penalty in 'logNewTablePenalty'.\n// A Huffman table is not optimal, which is why we add a penalty, and generating a new table\n// is slower both for compression and decompression.\n\nfunc newHuffmanBitWriter(w io.Writer) *huffmanBitWriter {\n\treturn &huffmanBitWriter{\n\t\twriter:          w,\n\t\tliteralEncoding: newHuffmanEncoder(literalCount),\n\t\ttmpLitEncoding:  newHuffmanEncoder(literalCount),\n\t\tcodegenEncoding: newHuffmanEncoder(codegenCodeCount),\n\t\toffsetEncoding:  newHuffmanEncoder(offsetCodeCount),\n\t}\n}\n\nfunc (w *huffmanBitWriter) reset(writer io.Writer) {\n\tw.writer = writer\n\tw.bits, w.nbits, w.nbytes, w.err = 0, 0, 0, nil\n\tw.lastHeader = 0\n\tw.lastHuffMan = false\n}\n\nfunc (w *huffmanBitWriter) canReuse(t *tokens) (ok bool) {\n\ta := t.offHist[:offsetCodeCount]\n\tb := w.offsetEncoding.codes\n\tb = b[:len(a)]\n\tfor i, v := range a {\n\t\tif v != 0 && b[i].zero() {\n\t\t\treturn false\n\t\t}\n\t}\n\n\ta = t.extraHist[:literalCount-256]\n\tb = w.literalEncoding.codes[256:literalCount]\n\tb = b[:len(a)]\n\tfor i, v := range a {\n\t\tif v != 0 && b[i].zero() {\n\t\t\treturn false\n\t\t}\n\t}\n\n\ta = t.litHist[:256]\n\tb = w.literalEncoding.codes[:len(a)]\n\tfor i, v := range a {\n\t\tif v != 0 && b[i].zero() {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc (w *huffmanBitWriter) flush() {\n\tif w.err != nil {\n\t\tw.nbits = 0\n\t\treturn\n\t}\n\tif w.lastHeader > 0 {\n\t\t// We owe an EOB\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t}\n\tn := w.nbytes\n\tfor w.nbits != 0 {\n\t\tw.bytes[n] = byte(w.bits)\n\t\tw.bits >>= 8\n\t\tif w.nbits > 8 { // Avoid underflow\n\t\t\tw.nbits -= 8\n\t\t} else {\n\t\t\tw.nbits = 0\n\t\t}\n\t\tn++\n\t}\n\tw.bits = 0\n\tif n > 0 {\n\t\tw.write(w.bytes[:n])\n\t}\n\tw.nbytes = 0\n}\n\nfunc (w *huffmanBitWriter) write(b []byte) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\t_, w.err = w.writer.Write(b)\n}\n\nfunc (w *huffmanBitWriter) writeBits(b int32, nb uint8) {\n\tw.bits |= uint64(b) << (w.nbits & 63)\n\tw.nbits += nb\n\tif w.nbits >= 48 {\n\t\tw.writeOutBits()\n\t}\n}\n\nfunc (w *huffmanBitWriter) writeBytes(bytes []byte) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\tn := w.nbytes\n\tif w.nbits&7 != 0 {\n\t\tw.err = InternalError(\"writeBytes with unfinished bits\")\n\t\treturn\n\t}\n\tfor w.nbits != 0 {\n\t\tw.bytes[n] = byte(w.bits)\n\t\tw.bits >>= 8\n\t\tw.nbits -= 8\n\t\tn++\n\t}\n\tif n != 0 {\n\t\tw.write(w.bytes[:n])\n\t}\n\tw.nbytes = 0\n\tw.write(bytes)\n}\n\n// RFC 1951 3.2.7 specifies a special run-length encoding for specifying\n// the literal and offset lengths arrays (which are concatenated into a single\n// array).  This method generates that run-length encoding.\n//\n// The result is written into the codegen array, and the frequencies\n// of each code is written into the codegenFreq array.\n// Codes 0-15 are single byte codes. Codes 16-18 are followed by additional\n// information. Code badCode is an end marker\n//\n//\tnumLiterals      The number of literals in literalEncoding\n//\tnumOffsets       The number of offsets in offsetEncoding\n//\tlitenc, offenc   The literal and offset encoder to use\nfunc (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litEnc, offEnc *huffmanEncoder) {\n\tfor i := range w.codegenFreq {\n\t\tw.codegenFreq[i] = 0\n\t}\n\t// Note that we are using codegen both as a temporary variable for holding\n\t// a copy of the frequencies, and as the place where we put the result.\n\t// This is fine because the output is always shorter than the input used\n\t// so far.\n\tcodegen := w.codegen[:] // cache\n\t// Copy the concatenated code sizes to codegen. Put a marker at the end.\n\tcgnl := codegen[:numLiterals]\n\tfor i := range cgnl {\n\t\tcgnl[i] = litEnc.codes[i].len()\n\t}\n\n\tcgnl = codegen[numLiterals : numLiterals+numOffsets]\n\tfor i := range cgnl {\n\t\tcgnl[i] = offEnc.codes[i].len()\n\t}\n\tcodegen[numLiterals+numOffsets] = badCode\n\n\tsize := codegen[0]\n\tcount := 1\n\toutIndex := 0\n\tfor inIndex := 1; size != badCode; inIndex++ {\n\t\t// INVARIANT: We have seen \"count\" copies of size that have not yet\n\t\t// had output generated for them.\n\t\tnextSize := codegen[inIndex]\n\t\tif nextSize == size {\n\t\t\tcount++\n\t\t\tcontinue\n\t\t}\n\t\t// We need to generate codegen indicating \"count\" of size.\n\t\tif size != 0 {\n\t\t\tcodegen[outIndex] = size\n\t\t\toutIndex++\n\t\t\tw.codegenFreq[size]++\n\t\t\tcount--\n\t\t\tfor count >= 3 {\n\t\t\t\tn := min(6, count)\n\t\t\t\tcodegen[outIndex] = 16\n\t\t\t\toutIndex++\n\t\t\t\tcodegen[outIndex] = uint8(n - 3)\n\t\t\t\toutIndex++\n\t\t\t\tw.codegenFreq[16]++\n\t\t\t\tcount -= n\n\t\t\t}\n\t\t} else {\n\t\t\tfor count >= 11 {\n\t\t\t\tn := min(138, count)\n\t\t\t\tcodegen[outIndex] = 18\n\t\t\t\toutIndex++\n\t\t\t\tcodegen[outIndex] = uint8(n - 11)\n\t\t\t\toutIndex++\n\t\t\t\tw.codegenFreq[18]++\n\t\t\t\tcount -= n\n\t\t\t}\n\t\t\tif count >= 3 {\n\t\t\t\t// count >= 3 && count <= 10\n\t\t\t\tcodegen[outIndex] = 17\n\t\t\t\toutIndex++\n\t\t\t\tcodegen[outIndex] = uint8(count - 3)\n\t\t\t\toutIndex++\n\t\t\t\tw.codegenFreq[17]++\n\t\t\t\tcount = 0\n\t\t\t}\n\t\t}\n\t\tcount--\n\t\tfor ; count >= 0; count-- {\n\t\t\tcodegen[outIndex] = size\n\t\t\toutIndex++\n\t\t\tw.codegenFreq[size]++\n\t\t}\n\t\t// Set up invariant for next time through the loop.\n\t\tsize = nextSize\n\t\tcount = 1\n\t}\n\t// Marker indicating the end of the codegen.\n\tcodegen[outIndex] = badCode\n}\n\nfunc (w *huffmanBitWriter) codegens() int {\n\tnumCodegens := len(w.codegenFreq)\n\tfor numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {\n\t\tnumCodegens--\n\t}\n\treturn numCodegens\n}\n\nfunc (w *huffmanBitWriter) headerSize() (size, numCodegens int) {\n\tnumCodegens = len(w.codegenFreq)\n\tfor numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {\n\t\tnumCodegens--\n\t}\n\treturn 3 + 5 + 5 + 4 + (3 * numCodegens) +\n\t\tw.codegenEncoding.bitLength(w.codegenFreq[:]) +\n\t\tint(w.codegenFreq[16])*2 +\n\t\tint(w.codegenFreq[17])*3 +\n\t\tint(w.codegenFreq[18])*7, numCodegens\n}\n\n// dynamicSize returns the size of dynamically encoded data in bits.\nfunc (w *huffmanBitWriter) dynamicReuseSize(litEnc, offEnc *huffmanEncoder) (size int) {\n\tsize = litEnc.bitLength(w.literalFreq[:]) +\n\t\toffEnc.bitLength(w.offsetFreq[:])\n\treturn size\n}\n\n// dynamicSize returns the size of dynamically encoded data in bits.\nfunc (w *huffmanBitWriter) dynamicSize(litEnc, offEnc *huffmanEncoder, extraBits int) (size, numCodegens int) {\n\theader, numCodegens := w.headerSize()\n\tsize = header +\n\t\tlitEnc.bitLength(w.literalFreq[:]) +\n\t\toffEnc.bitLength(w.offsetFreq[:]) +\n\t\textraBits\n\treturn size, numCodegens\n}\n\n// extraBitSize will return the number of bits that will be written\n// as \"extra\" bits on matches.\nfunc (w *huffmanBitWriter) extraBitSize() int {\n\ttotal := 0\n\tfor i, n := range w.literalFreq[257:literalCount] {\n\t\ttotal += int(n) * int(lengthExtraBits[i&31])\n\t}\n\tfor i, n := range w.offsetFreq[:offsetCodeCount] {\n\t\ttotal += int(n) * int(offsetExtraBits[i&31])\n\t}\n\treturn total\n}\n\n// fixedSize returns the size of dynamically encoded data in bits.\nfunc (w *huffmanBitWriter) fixedSize(extraBits int) int {\n\treturn 3 +\n\t\tfixedLiteralEncoding.bitLength(w.literalFreq[:]) +\n\t\tfixedOffsetEncoding.bitLength(w.offsetFreq[:]) +\n\t\textraBits\n}\n\n// storedSize calculates the stored size, including header.\n// The function returns the size in bits and whether the block\n// fits inside a single block.\nfunc (w *huffmanBitWriter) storedSize(in []byte) (int, bool) {\n\tif in == nil {\n\t\treturn 0, false\n\t}\n\tif len(in) <= maxStoreBlockSize {\n\t\treturn (len(in) + 5) * 8, true\n\t}\n\treturn 0, false\n}\n\nfunc (w *huffmanBitWriter) writeCode(c hcode) {\n\t// The function does not get inlined if we \"& 63\" the shift.\n\tw.bits |= c.code64() << (w.nbits & 63)\n\tw.nbits += c.len()\n\tif w.nbits >= 48 {\n\t\tw.writeOutBits()\n\t}\n}\n\n// writeOutBits will write bits to the buffer.\nfunc (w *huffmanBitWriter) writeOutBits() {\n\tbits := w.bits\n\tw.bits >>= 48\n\tw.nbits -= 48\n\tn := w.nbytes\n\n\t// We overwrite, but faster...\n\tle.Store64(w.bytes[:], n, bits)\n\tn += 6\n\n\tif n >= bufferFlushSize {\n\t\tif w.err != nil {\n\t\t\tn = 0\n\t\t\treturn\n\t\t}\n\t\tw.write(w.bytes[:n])\n\t\tn = 0\n\t}\n\n\tw.nbytes = n\n}\n\n// Write the header of a dynamic Huffman block to the output stream.\n//\n//\tnumLiterals  The number of literals specified in codegen\n//\tnumOffsets   The number of offsets specified in codegen\n//\tnumCodegens  The number of codegens used in codegen\nfunc (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, numCodegens int, isEof bool) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\tvar firstBits int32 = 4\n\tif isEof {\n\t\tfirstBits = 5\n\t}\n\tw.writeBits(firstBits, 3)\n\tw.writeBits(int32(numLiterals-257), 5)\n\tw.writeBits(int32(numOffsets-1), 5)\n\tw.writeBits(int32(numCodegens-4), 4)\n\n\tfor i := range numCodegens {\n\t\tvalue := uint(w.codegenEncoding.codes[codegenOrder[i]].len())\n\t\tw.writeBits(int32(value), 3)\n\t}\n\n\ti := 0\n\tfor {\n\t\tvar codeWord = uint32(w.codegen[i])\n\t\ti++\n\t\tif codeWord == badCode {\n\t\t\tbreak\n\t\t}\n\t\tw.writeCode(w.codegenEncoding.codes[codeWord])\n\n\t\tswitch codeWord {\n\t\tcase 16:\n\t\t\tw.writeBits(int32(w.codegen[i]), 2)\n\t\t\ti++\n\t\tcase 17:\n\t\t\tw.writeBits(int32(w.codegen[i]), 3)\n\t\t\ti++\n\t\tcase 18:\n\t\t\tw.writeBits(int32(w.codegen[i]), 7)\n\t\t\ti++\n\t\t}\n\t}\n}\n\n// writeStoredHeader will write a stored header.\n// If the stored block is only used for EOF,\n// it is replaced with a fixed huffman block.\nfunc (w *huffmanBitWriter) writeStoredHeader(length int, isEof bool) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\tif w.lastHeader > 0 {\n\t\t// We owe an EOB\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t}\n\n\t// To write EOF, use a fixed encoding block. 10 bits instead of 5 bytes.\n\tif length == 0 && isEof {\n\t\tw.writeFixedHeader(isEof)\n\t\t// EOB: 7 bits, value: 0\n\t\tw.writeBits(0, 7)\n\t\tw.flush()\n\t\treturn\n\t}\n\n\tvar flag int32\n\tif isEof {\n\t\tflag = 1\n\t}\n\tw.writeBits(flag, 3)\n\tw.flush()\n\tw.writeBits(int32(length), 16)\n\tw.writeBits(int32(^uint16(length)), 16)\n}\n\nfunc (w *huffmanBitWriter) writeFixedHeader(isEof bool) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\tif w.lastHeader > 0 {\n\t\t// We owe an EOB\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t}\n\n\t// Indicate that we are a fixed Huffman block\n\tvar value int32 = 2\n\tif isEof {\n\t\tvalue = 3\n\t}\n\tw.writeBits(value, 3)\n}\n\n// writeBlock will write a block of tokens with the smallest encoding.\n// The original input can be supplied, and if the huffman encoded data\n// is larger than the original bytes, the data will be written as a\n// stored block.\n// If the input is nil, the tokens will always be Huffman encoded.\nfunc (w *huffmanBitWriter) writeBlock(tokens *tokens, eof bool, input []byte) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\n\ttokens.AddEOB()\n\tif w.lastHeader > 0 {\n\t\t// We owe an EOB\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t}\n\tnumLiterals, numOffsets := w.indexTokens(tokens, false)\n\tw.generate()\n\tvar extraBits int\n\tstoredSize, storable := w.storedSize(input)\n\tif storable {\n\t\textraBits = w.extraBitSize()\n\t}\n\n\t// Figure out smallest code.\n\t// Fixed Huffman baseline.\n\tvar literalEncoding = fixedLiteralEncoding\n\tvar offsetEncoding = fixedOffsetEncoding\n\tvar size = math.MaxInt32\n\tif tokens.n < maxPredefinedTokens {\n\t\tsize = w.fixedSize(extraBits)\n\t}\n\n\t// Dynamic Huffman?\n\tvar numCodegens int\n\n\t// Generate codegen and codegenFrequencies, which indicates how to encode\n\t// the literalEncoding and the offsetEncoding.\n\tw.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)\n\tw.codegenEncoding.generate(w.codegenFreq[:], 7)\n\tdynamicSize, numCodegens := w.dynamicSize(w.literalEncoding, w.offsetEncoding, extraBits)\n\n\tif dynamicSize < size {\n\t\tsize = dynamicSize\n\t\tliteralEncoding = w.literalEncoding\n\t\toffsetEncoding = w.offsetEncoding\n\t}\n\n\t// Stored bytes?\n\tif storable && storedSize <= size {\n\t\tw.writeStoredHeader(len(input), eof)\n\t\tw.writeBytes(input)\n\t\treturn\n\t}\n\n\t// Huffman.\n\tif literalEncoding == fixedLiteralEncoding {\n\t\tw.writeFixedHeader(eof)\n\t} else {\n\t\tw.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)\n\t}\n\n\t// Write the tokens.\n\tw.writeTokens(tokens.Slice(), literalEncoding.codes, offsetEncoding.codes)\n}\n\n// writeBlockDynamic encodes a block using a dynamic Huffman table.\n// This should be used if the symbols used have a disproportionate\n// histogram distribution.\n// If input is supplied and the compression savings are below 1/16th of the\n// input size the block is stored.\nfunc (w *huffmanBitWriter) writeBlockDynamic(tokens *tokens, eof bool, input []byte, sync bool) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\n\tsync = sync || eof\n\tif sync {\n\t\ttokens.AddEOB()\n\t}\n\n\t// We cannot reuse pure huffman table, and must mark as EOF.\n\tif (w.lastHuffMan || eof) && w.lastHeader > 0 {\n\t\t// We will not try to reuse.\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t\tw.lastHuffMan = false\n\t}\n\n\t// fillReuse enables filling of empty values.\n\t// This will make encodings always reusable without testing.\n\t// However, this does not appear to benefit on most cases.\n\tconst fillReuse = false\n\n\t// Check if we can reuse...\n\tif !fillReuse && w.lastHeader > 0 && !w.canReuse(tokens) {\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t}\n\n\tnumLiterals, numOffsets := w.indexTokens(tokens, true)\n\textraBits := 0\n\tssize, storable := w.storedSize(input)\n\n\tconst usePrefs = true\n\tif storable || w.lastHeader > 0 {\n\t\textraBits = w.extraBitSize()\n\t}\n\n\tvar size int\n\n\t// Check if we should reuse.\n\tif w.lastHeader > 0 {\n\t\t// Estimate size for using a new table.\n\t\t// Use the previous header size as the best estimate.\n\t\tnewSize := w.lastHeader + tokens.EstimatedBits()\n\t\tnewSize += int(w.literalEncoding.codes[endBlockMarker].len()) + newSize>>w.logNewTablePenalty\n\n\t\t// The estimated size is calculated as an optimal table.\n\t\t// We add a penalty to make it more realistic and re-use a bit more.\n\t\treuseSize := w.dynamicReuseSize(w.literalEncoding, w.offsetEncoding) + extraBits\n\n\t\t// Check if a new table is better.\n\t\tif newSize < reuseSize {\n\t\t\t// Write the EOB we owe.\n\t\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\t\tsize = newSize\n\t\t\tw.lastHeader = 0\n\t\t} else {\n\t\t\tsize = reuseSize\n\t\t}\n\n\t\tif tokens.n < maxPredefinedTokens {\n\t\t\tif preSize := w.fixedSize(extraBits) + 7; usePrefs && preSize < size {\n\t\t\t\t// Check if we get a reasonable size decrease.\n\t\t\t\tif storable && ssize <= size {\n\t\t\t\t\tw.writeStoredHeader(len(input), eof)\n\t\t\t\t\tw.writeBytes(input)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tw.writeFixedHeader(eof)\n\t\t\t\tif !sync {\n\t\t\t\t\ttokens.AddEOB()\n\t\t\t\t}\n\t\t\t\tw.writeTokens(tokens.Slice(), fixedLiteralEncoding.codes, fixedOffsetEncoding.codes)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\t// Check if we get a reasonable size decrease.\n\t\tif storable && ssize <= size {\n\t\t\tw.writeStoredHeader(len(input), eof)\n\t\t\tw.writeBytes(input)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// We want a new block/table\n\tif w.lastHeader == 0 {\n\t\tif fillReuse && !sync {\n\t\t\tw.fillTokens()\n\t\t\tnumLiterals, numOffsets = maxNumLit, maxNumDist\n\t\t} else {\n\t\t\tw.literalFreq[endBlockMarker] = 1\n\t\t}\n\n\t\tw.generate()\n\t\t// Generate codegen and codegenFrequencies, which indicates how to encode\n\t\t// the literalEncoding and the offsetEncoding.\n\t\tw.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)\n\t\tw.codegenEncoding.generate(w.codegenFreq[:], 7)\n\n\t\tvar numCodegens int\n\t\tif fillReuse && !sync {\n\t\t\t// Reindex for accurate size...\n\t\t\tw.indexTokens(tokens, true)\n\t\t}\n\t\tsize, numCodegens = w.dynamicSize(w.literalEncoding, w.offsetEncoding, extraBits)\n\n\t\t// Store predefined, if we don't get a reasonable improvement.\n\t\tif tokens.n < maxPredefinedTokens {\n\t\t\tif preSize := w.fixedSize(extraBits); usePrefs && preSize <= size {\n\t\t\t\t// Store bytes, if we don't get an improvement.\n\t\t\t\tif storable && ssize <= preSize {\n\t\t\t\t\tw.writeStoredHeader(len(input), eof)\n\t\t\t\t\tw.writeBytes(input)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tw.writeFixedHeader(eof)\n\t\t\t\tif !sync {\n\t\t\t\t\ttokens.AddEOB()\n\t\t\t\t}\n\t\t\t\tw.writeTokens(tokens.Slice(), fixedLiteralEncoding.codes, fixedOffsetEncoding.codes)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tif storable && ssize <= size {\n\t\t\t// Store bytes, if we don't get an improvement.\n\t\t\tw.writeStoredHeader(len(input), eof)\n\t\t\tw.writeBytes(input)\n\t\t\treturn\n\t\t}\n\n\t\t// Write Huffman table.\n\t\tw.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)\n\t\tif !sync {\n\t\t\tw.lastHeader, _ = w.headerSize()\n\t\t}\n\t\tw.lastHuffMan = false\n\t}\n\n\tif sync {\n\t\tw.lastHeader = 0\n\t}\n\t// Write the tokens.\n\tw.writeTokens(tokens.Slice(), w.literalEncoding.codes, w.offsetEncoding.codes)\n}\n\nfunc (w *huffmanBitWriter) fillTokens() {\n\tfor i, v := range w.literalFreq[:literalCount] {\n\t\tif v == 0 {\n\t\t\tw.literalFreq[i] = 1\n\t\t}\n\t}\n\tfor i, v := range w.offsetFreq[:offsetCodeCount] {\n\t\tif v == 0 {\n\t\t\tw.offsetFreq[i] = 1\n\t\t}\n\t}\n}\n\n// indexTokens indexes a slice of tokens, and updates\n// literalFreq and offsetFreq, and generates literalEncoding\n// and offsetEncoding.\n// The number of literal and offset tokens is returned.\nfunc (w *huffmanBitWriter) indexTokens(t *tokens, alwaysEOB bool) (numLiterals, numOffsets int) {\n\t//copy(w.literalFreq[:], t.litHist[:])\n\t*(*[256]uint16)(w.literalFreq[:]) = t.litHist\n\t//copy(w.literalFreq[256:], t.extraHist[:])\n\t*(*[32]uint16)(w.literalFreq[256:]) = t.extraHist\n\tw.offsetFreq = t.offHist\n\n\tif t.n == 0 {\n\t\treturn\n\t}\n\tif alwaysEOB {\n\t\tw.literalFreq[endBlockMarker] = 1\n\t}\n\n\t// get the number of literals\n\tnumLiterals = len(w.literalFreq)\n\tfor w.literalFreq[numLiterals-1] == 0 {\n\t\tnumLiterals--\n\t}\n\t// get the number of offsets\n\tnumOffsets = len(w.offsetFreq)\n\tfor numOffsets > 0 && w.offsetFreq[numOffsets-1] == 0 {\n\t\tnumOffsets--\n\t}\n\tif numOffsets == 0 {\n\t\t// We haven't found a single match. If we want to go with the dynamic encoding,\n\t\t// we should count at least one offset to be sure that the offset huffman tree could be encoded.\n\t\tw.offsetFreq[0] = 1\n\t\tnumOffsets = 1\n\t}\n\treturn\n}\n\nfunc (w *huffmanBitWriter) generate() {\n\tw.literalEncoding.generate(w.literalFreq[:literalCount], 15)\n\tw.offsetEncoding.generate(w.offsetFreq[:offsetCodeCount], 15)\n}\n\n// writeTokens writes a slice of tokens to the output.\n// codes for literal and offset encoding must be supplied.\nfunc (w *huffmanBitWriter) writeTokens(tokens []token, leCodes, oeCodes []hcode) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\tif len(tokens) == 0 {\n\t\treturn\n\t}\n\n\t// Only last token should be endBlockMarker.\n\tvar deferEOB bool\n\tif tokens[len(tokens)-1] == endBlockMarker {\n\t\ttokens = tokens[:len(tokens)-1]\n\t\tdeferEOB = true\n\t}\n\n\t// Create slices up to the next power of two to avoid bounds checks.\n\tlits := leCodes[:256]\n\toffs := oeCodes[:32]\n\tlengths := leCodes[lengthCodesStart:]\n\tlengths = lengths[:32]\n\n\t// Go 1.16 LOVES having these on stack.\n\tbits, nbits, nbytes := w.bits, w.nbits, w.nbytes\n\n\tfor _, t := range tokens {\n\t\tif t < 256 {\n\t\t\t//w.writeCode(lits[t.literal()])\n\t\t\tc := lits[t]\n\t\t\tbits |= c.code64() << (nbits & 63)\n\t\t\tnbits += c.len()\n\t\t\tif nbits >= 48 {\n\t\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\t\tbits >>= 48\n\t\t\t\tnbits -= 48\n\t\t\t\tnbytes += 6\n\t\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\t\tif w.err != nil {\n\t\t\t\t\t\tnbytes = 0\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\t\tnbytes = 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Write the length\n\t\tlength := t.length()\n\t\tlengthCode := lengthCode(length) & 31\n\t\tif false {\n\t\t\tw.writeCode(lengths[lengthCode])\n\t\t} else {\n\t\t\t// inlined\n\t\t\tc := lengths[lengthCode]\n\t\t\tbits |= c.code64() << (nbits & 63)\n\t\t\tnbits += c.len()\n\t\t\tif nbits >= 48 {\n\t\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\t\tbits >>= 48\n\t\t\t\tnbits -= 48\n\t\t\t\tnbytes += 6\n\t\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\t\tif w.err != nil {\n\t\t\t\t\t\tnbytes = 0\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\t\tnbytes = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif lengthCode >= lengthExtraBitsMinCode {\n\t\t\textraLengthBits := lengthExtraBits[lengthCode]\n\t\t\t//w.writeBits(extraLength, extraLengthBits)\n\t\t\textraLength := int32(length - lengthBase[lengthCode])\n\t\t\tbits |= uint64(extraLength) << (nbits & 63)\n\t\t\tnbits += extraLengthBits\n\t\t\tif nbits >= 48 {\n\t\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\t\tbits >>= 48\n\t\t\t\tnbits -= 48\n\t\t\t\tnbytes += 6\n\t\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\t\tif w.err != nil {\n\t\t\t\t\t\tnbytes = 0\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\t\tnbytes = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Write the offset\n\t\toffset := t.offset()\n\t\toffsetCode := (offset >> 16) & 31\n\t\tif false {\n\t\t\tw.writeCode(offs[offsetCode])\n\t\t} else {\n\t\t\t// inlined\n\t\t\tc := offs[offsetCode]\n\t\t\tbits |= c.code64() << (nbits & 63)\n\t\t\tnbits += c.len()\n\t\t\tif nbits >= 48 {\n\t\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\t\tbits >>= 48\n\t\t\t\tnbits -= 48\n\t\t\t\tnbytes += 6\n\t\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\t\tif w.err != nil {\n\t\t\t\t\t\tnbytes = 0\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\t\tnbytes = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif offsetCode >= offsetExtraBitsMinCode {\n\t\t\toffsetComb := offsetCombined[offsetCode]\n\t\t\t//w.writeBits(extraOffset, extraOffsetBits)\n\t\t\tbits |= uint64((offset-(offsetComb>>8))&matchOffsetOnlyMask) << (nbits & 63)\n\t\t\tnbits += uint8(offsetComb)\n\t\t\tif nbits >= 48 {\n\t\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\t\tbits >>= 48\n\t\t\t\tnbits -= 48\n\t\t\t\tnbytes += 6\n\t\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\t\tif w.err != nil {\n\t\t\t\t\t\tnbytes = 0\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\t\tnbytes = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Restore...\n\tw.bits, w.nbits, w.nbytes = bits, nbits, nbytes\n\n\tif deferEOB {\n\t\tw.writeCode(leCodes[endBlockMarker])\n\t}\n}\n\n// huffOffset is a static offset encoder used for huffman only encoding.\n// It can be reused since we will not be encoding offset values.\nvar huffOffset *huffmanEncoder\n\nfunc init() {\n\tw := newHuffmanBitWriter(nil)\n\tw.offsetFreq[0] = 1\n\thuffOffset = newHuffmanEncoder(offsetCodeCount)\n\thuffOffset.generate(w.offsetFreq[:offsetCodeCount], 15)\n}\n\n// writeBlockHuff encodes a block of bytes as either\n// Huffman encoded literals or uncompressed bytes if the\n// results only gains very little from compression.\nfunc (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {\n\tif w.err != nil {\n\t\treturn\n\t}\n\n\t// Clear histogram\n\tfor i := range w.literalFreq[:] {\n\t\tw.literalFreq[i] = 0\n\t}\n\tif !w.lastHuffMan {\n\t\tfor i := range w.offsetFreq[:] {\n\t\t\tw.offsetFreq[i] = 0\n\t\t}\n\t}\n\n\tconst numLiterals = endBlockMarker + 1\n\tconst numOffsets = 1\n\n\t// Add everything as literals\n\t// We have to estimate the header size.\n\t// Assume header is around 70 bytes:\n\t// https://stackoverflow.com/a/25454430\n\tconst guessHeaderSizeBits = 70 * 8\n\thistogram(input, w.literalFreq[:numLiterals])\n\tssize, storable := w.storedSize(input)\n\tif storable && len(input) > 1024 {\n\t\t// Quick check for incompressible content.\n\t\tabs := float64(0)\n\t\tavg := float64(len(input)) / 256\n\t\tmax := float64(len(input) * 2)\n\t\tfor _, v := range w.literalFreq[:256] {\n\t\t\tdiff := float64(v) - avg\n\t\t\tabs += diff * diff\n\t\t\tif abs > max {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif abs < max {\n\t\t\tif debugDeflate {\n\t\t\t\tfmt.Println(\"stored\", abs, \"<\", max)\n\t\t\t}\n\t\t\t// No chance we can compress this...\n\t\t\tw.writeStoredHeader(len(input), eof)\n\t\t\tw.writeBytes(input)\n\t\t\treturn\n\t\t}\n\t}\n\tw.literalFreq[endBlockMarker] = 1\n\tw.tmpLitEncoding.generate(w.literalFreq[:numLiterals], 15)\n\testBits := w.tmpLitEncoding.canReuseBits(w.literalFreq[:numLiterals])\n\tif estBits < math.MaxInt32 {\n\t\testBits += w.lastHeader\n\t\tif w.lastHeader == 0 {\n\t\t\testBits += guessHeaderSizeBits\n\t\t}\n\t\testBits += estBits >> w.logNewTablePenalty\n\t}\n\n\t// Store bytes, if we don't get a reasonable improvement.\n\tif storable && ssize <= estBits {\n\t\tif debugDeflate {\n\t\t\tfmt.Println(\"stored,\", ssize, \"<=\", estBits)\n\t\t}\n\t\tw.writeStoredHeader(len(input), eof)\n\t\tw.writeBytes(input)\n\t\treturn\n\t}\n\n\tif w.lastHeader > 0 {\n\t\treuseSize := w.literalEncoding.canReuseBits(w.literalFreq[:256])\n\n\t\tif estBits < reuseSize {\n\t\t\tif debugDeflate {\n\t\t\t\tfmt.Println(\"NOT reusing, reuse:\", reuseSize/8, \"> new:\", estBits/8, \"header est:\", w.lastHeader/8, \"bytes\")\n\t\t\t}\n\t\t\t// We owe an EOB\n\t\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\t\tw.lastHeader = 0\n\t\t} else if debugDeflate {\n\t\t\tfmt.Println(\"reusing, reuse:\", reuseSize/8, \"> new:\", estBits/8, \"- header est:\", w.lastHeader/8)\n\t\t}\n\t}\n\n\tcount := 0\n\tif w.lastHeader == 0 {\n\t\t// Use the temp encoding, so swap.\n\t\tw.literalEncoding, w.tmpLitEncoding = w.tmpLitEncoding, w.literalEncoding\n\t\t// Generate codegen and codegenFrequencies, which indicates how to encode\n\t\t// the literalEncoding and the offsetEncoding.\n\t\tw.generateCodegen(numLiterals, numOffsets, w.literalEncoding, huffOffset)\n\t\tw.codegenEncoding.generate(w.codegenFreq[:], 7)\n\t\tnumCodegens := w.codegens()\n\n\t\t// Huffman.\n\t\tw.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)\n\t\tw.lastHuffMan = true\n\t\tw.lastHeader, _ = w.headerSize()\n\t\tif debugDeflate {\n\t\t\tcount += w.lastHeader\n\t\t\tfmt.Println(\"header:\", count/8)\n\t\t}\n\t}\n\n\tencoding := w.literalEncoding.codes[:256]\n\t// Go 1.16 LOVES having these on stack. At least 1.5x the speed.\n\tbits, nbits, nbytes := w.bits, w.nbits, w.nbytes\n\n\tif debugDeflate {\n\t\tcount -= int(nbytes)*8 + int(nbits)\n\t}\n\t// Unroll, write 3 codes/loop.\n\t// Fastest number of unrolls.\n\tfor len(input) > 3 {\n\t\t// We must have at least 48 bits free.\n\t\tif nbits >= 8 {\n\t\t\tn := nbits >> 3\n\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\tbits >>= (n * 8) & 63\n\t\t\tnbits -= n * 8\n\t\t\tnbytes += n\n\t\t}\n\t\tif nbytes >= bufferFlushSize {\n\t\t\tif w.err != nil {\n\t\t\t\tnbytes = 0\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif debugDeflate {\n\t\t\t\tcount += int(nbytes) * 8\n\t\t\t}\n\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\tnbytes = 0\n\t\t}\n\t\ta, b := encoding[input[0]], encoding[input[1]]\n\t\tbits |= a.code64() << (nbits & 63)\n\t\tbits |= b.code64() << ((nbits + a.len()) & 63)\n\t\tc := encoding[input[2]]\n\t\tnbits += b.len() + a.len()\n\t\tbits |= c.code64() << (nbits & 63)\n\t\tnbits += c.len()\n\t\tinput = input[3:]\n\t}\n\n\t// Remaining...\n\tfor _, t := range input {\n\t\tif nbits >= 48 {\n\t\t\tle.Store64(w.bytes[:], nbytes, bits)\n\t\t\tbits >>= 48\n\t\t\tnbits -= 48\n\t\t\tnbytes += 6\n\t\t\tif nbytes >= bufferFlushSize {\n\t\t\t\tif w.err != nil {\n\t\t\t\t\tnbytes = 0\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif debugDeflate {\n\t\t\t\t\tcount += int(nbytes) * 8\n\t\t\t\t}\n\t\t\t\t_, w.err = w.writer.Write(w.bytes[:nbytes])\n\t\t\t\tnbytes = 0\n\t\t\t}\n\t\t}\n\t\t// Bitwriting inlined, ~30% speedup\n\t\tc := encoding[t]\n\t\tbits |= c.code64() << (nbits & 63)\n\n\t\tnbits += c.len()\n\t\tif debugDeflate {\n\t\t\tcount += int(c.len())\n\t\t}\n\t}\n\t// Restore...\n\tw.bits, w.nbits, w.nbytes = bits, nbits, nbytes\n\n\tif debugDeflate {\n\t\tnb := count + int(nbytes)*8 + int(nbits)\n\t\tfmt.Println(\"wrote\", nb, \"bits,\", nb/8, \"bytes.\")\n\t}\n\t// Flush if needed to have space.\n\tif w.nbits >= 48 {\n\t\tw.writeOutBits()\n\t}\n\n\tif eof || sync {\n\t\tw.writeCode(w.literalEncoding.codes[endBlockMarker])\n\t\tw.lastHeader = 0\n\t\tw.lastHuffMan = false\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/huffman_code.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"math\"\n\t\"math/bits\"\n)\n\nconst (\n\tmaxBitsLimit = 16\n\t// number of valid literals\n\tliteralCount = 286\n)\n\n// hcode is a huffman code with a bit code and bit length.\ntype hcode uint32\n\nfunc (h hcode) len() uint8 {\n\treturn uint8(h)\n}\n\nfunc (h hcode) code64() uint64 {\n\treturn uint64(h >> 8)\n}\n\nfunc (h hcode) zero() bool {\n\treturn h == 0\n}\n\ntype huffmanEncoder struct {\n\tcodes    []hcode\n\tbitCount [17]int32\n\n\t// Allocate a reusable buffer with the longest possible frequency table.\n\t// Possible lengths are codegenCodeCount, offsetCodeCount and literalCount.\n\t// The largest of these is literalCount, so we allocate for that case.\n\tfreqcache [literalCount + 1]literalNode\n}\n\ntype literalNode struct {\n\tliteral uint16\n\tfreq    uint16\n}\n\n// A levelInfo describes the state of the constructed tree for a given depth.\ntype levelInfo struct {\n\t// Our level.  for better printing\n\tlevel int32\n\n\t// The frequency of the last node at this level\n\tlastFreq int32\n\n\t// The frequency of the next character to add to this level\n\tnextCharFreq int32\n\n\t// The frequency of the next pair (from level below) to add to this level.\n\t// Only valid if the \"needed\" value of the next lower level is 0.\n\tnextPairFreq int32\n\n\t// The number of chains remaining to generate for this level before moving\n\t// up to the next level\n\tneeded int32\n}\n\n// set sets the code and length of an hcode.\nfunc (h *hcode) set(code uint16, length uint8) {\n\t*h = hcode(length) | (hcode(code) << 8)\n}\n\nfunc newhcode(code uint16, length uint8) hcode {\n\treturn hcode(length) | (hcode(code) << 8)\n}\n\nfunc reverseBits(number uint16, bitLength byte) uint16 {\n\treturn bits.Reverse16(number << ((16 - bitLength) & 15))\n}\n\nfunc maxNode() literalNode { return literalNode{math.MaxUint16, math.MaxUint16} }\n\nfunc newHuffmanEncoder(size int) *huffmanEncoder {\n\t// Make capacity to next power of two.\n\tc := uint(bits.Len32(uint32(size - 1)))\n\treturn &huffmanEncoder{codes: make([]hcode, size, 1<<c)}\n}\n\n// Generates a HuffmanCode corresponding to the fixed literal table\nfunc generateFixedLiteralEncoding() *huffmanEncoder {\n\th := newHuffmanEncoder(literalCount)\n\tcodes := h.codes\n\tvar ch uint16\n\tfor ch = range uint16(literalCount) {\n\t\tvar bits uint16\n\t\tvar size uint8\n\t\tswitch {\n\t\tcase ch < 144:\n\t\t\t// size 8, 000110000  .. 10111111\n\t\t\tbits = ch + 48\n\t\t\tsize = 8\n\t\tcase ch < 256:\n\t\t\t// size 9, 110010000 .. 111111111\n\t\t\tbits = ch + 400 - 144\n\t\t\tsize = 9\n\t\tcase ch < 280:\n\t\t\t// size 7, 0000000 .. 0010111\n\t\t\tbits = ch - 256\n\t\t\tsize = 7\n\t\tdefault:\n\t\t\t// size 8, 11000000 .. 11000111\n\t\t\tbits = ch + 192 - 280\n\t\t\tsize = 8\n\t\t}\n\t\tcodes[ch] = newhcode(reverseBits(bits, size), size)\n\t}\n\treturn h\n}\n\nfunc generateFixedOffsetEncoding() *huffmanEncoder {\n\th := newHuffmanEncoder(30)\n\tcodes := h.codes\n\tfor ch := range codes {\n\t\tcodes[ch] = newhcode(reverseBits(uint16(ch), 5), 5)\n\t}\n\treturn h\n}\n\nvar fixedLiteralEncoding = generateFixedLiteralEncoding()\nvar fixedOffsetEncoding = generateFixedOffsetEncoding()\n\nfunc (h *huffmanEncoder) bitLength(freq []uint16) int {\n\tvar total int\n\tfor i, f := range freq {\n\t\tif f != 0 {\n\t\t\ttotal += int(f) * int(h.codes[i].len())\n\t\t}\n\t}\n\treturn total\n}\n\nfunc (h *huffmanEncoder) bitLengthRaw(b []byte) int {\n\tvar total int\n\tfor _, f := range b {\n\t\ttotal += int(h.codes[f].len())\n\t}\n\treturn total\n}\n\n// canReuseBits returns the number of bits or math.MaxInt32 if the encoder cannot be reused.\nfunc (h *huffmanEncoder) canReuseBits(freq []uint16) int {\n\tvar total int\n\tfor i, f := range freq {\n\t\tif f != 0 {\n\t\t\tcode := h.codes[i]\n\t\t\tif code.zero() {\n\t\t\t\treturn math.MaxInt32\n\t\t\t}\n\t\t\ttotal += int(f) * int(code.len())\n\t\t}\n\t}\n\treturn total\n}\n\n// Return the number of literals assigned to each bit size in the Huffman encoding\n//\n// This method is only called when list.length >= 3\n// The cases of 0, 1, and 2 literals are handled by special case code.\n//\n// list  An array of the literals with non-zero frequencies\n//\n//\tand their associated frequencies. The array is in order of increasing\n//\tfrequency, and has as its last element a special element with frequency\n//\tMaxInt32\n//\n// maxBits     The maximum number of bits that should be used to encode any literal.\n//\n//\tMust be less than 16.\n//\n// return      An integer array in which array[i] indicates the number of literals\n//\n//\tthat should be encoded in i bits.\nfunc (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {\n\tif maxBits >= maxBitsLimit {\n\t\tpanic(\"flate: maxBits too large\")\n\t}\n\tn := int32(len(list))\n\tlist = list[0 : n+1]\n\tlist[n] = maxNode()\n\n\t// The tree can't have greater depth than n - 1, no matter what. This\n\t// saves a little bit of work in some small cases\n\tif maxBits > n-1 {\n\t\tmaxBits = n - 1\n\t}\n\n\t// Create information about each of the levels.\n\t// A bogus \"Level 0\" whose sole purpose is so that\n\t// level1.prev.needed==0.  This makes level1.nextPairFreq\n\t// be a legitimate value that never gets chosen.\n\tvar levels [maxBitsLimit]levelInfo\n\t// leafCounts[i] counts the number of literals at the left\n\t// of ancestors of the rightmost node at level i.\n\t// leafCounts[i][j] is the number of literals at the left\n\t// of the level j ancestor.\n\tvar leafCounts [maxBitsLimit][maxBitsLimit]int32\n\n\t// Descending to only have 1 bounds check.\n\tl2f := int32(list[2].freq)\n\tl1f := int32(list[1].freq)\n\tl0f := int32(list[0].freq) + int32(list[1].freq)\n\n\tfor level := int32(1); level <= maxBits; level++ {\n\t\t// For every level, the first two items are the first two characters.\n\t\t// We initialize the levels as if we had already figured this out.\n\t\tlevels[level] = levelInfo{\n\t\t\tlevel:        level,\n\t\t\tlastFreq:     l1f,\n\t\t\tnextCharFreq: l2f,\n\t\t\tnextPairFreq: l0f,\n\t\t}\n\t\tleafCounts[level][level] = 2\n\t\tif level == 1 {\n\t\t\tlevels[level].nextPairFreq = math.MaxInt32\n\t\t}\n\t}\n\n\t// We need a total of 2*n - 2 items at top level and have already generated 2.\n\tlevels[maxBits].needed = 2*n - 4\n\n\tlevel := uint32(maxBits)\n\tfor level < 16 {\n\t\tl := &levels[level]\n\t\tif l.nextPairFreq == math.MaxInt32 && l.nextCharFreq == math.MaxInt32 {\n\t\t\t// We've run out of both leafs and pairs.\n\t\t\t// End all calculations for this level.\n\t\t\t// To make sure we never come back to this level or any lower level,\n\t\t\t// set nextPairFreq impossibly large.\n\t\t\tl.needed = 0\n\t\t\tlevels[level+1].nextPairFreq = math.MaxInt32\n\t\t\tlevel++\n\t\t\tcontinue\n\t\t}\n\n\t\tprevFreq := l.lastFreq\n\t\tif l.nextCharFreq < l.nextPairFreq {\n\t\t\t// The next item on this row is a leaf node.\n\t\t\tn := leafCounts[level][level] + 1\n\t\t\tl.lastFreq = l.nextCharFreq\n\t\t\t// Lower leafCounts are the same of the previous node.\n\t\t\tleafCounts[level][level] = n\n\t\t\te := list[n]\n\t\t\tif e.literal < math.MaxUint16 {\n\t\t\t\tl.nextCharFreq = int32(e.freq)\n\t\t\t} else {\n\t\t\t\tl.nextCharFreq = math.MaxInt32\n\t\t\t}\n\t\t} else {\n\t\t\t// The next item on this row is a pair from the previous row.\n\t\t\t// nextPairFreq isn't valid until we generate two\n\t\t\t// more values in the level below\n\t\t\tl.lastFreq = l.nextPairFreq\n\t\t\t// Take leaf counts from the lower level, except counts[level] remains the same.\n\t\t\tif true {\n\t\t\t\tsave := leafCounts[level][level]\n\t\t\t\tleafCounts[level] = leafCounts[level-1]\n\t\t\t\tleafCounts[level][level] = save\n\t\t\t} else {\n\t\t\t\tcopy(leafCounts[level][:level], leafCounts[level-1][:level])\n\t\t\t}\n\t\t\tlevels[l.level-1].needed = 2\n\t\t}\n\n\t\tif l.needed--; l.needed == 0 {\n\t\t\t// We've done everything we need to do for this level.\n\t\t\t// Continue calculating one level up. Fill in nextPairFreq\n\t\t\t// of that level with the sum of the two nodes we've just calculated on\n\t\t\t// this level.\n\t\t\tif l.level == maxBits {\n\t\t\t\t// All done!\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tlevels[l.level+1].nextPairFreq = prevFreq + l.lastFreq\n\t\t\tlevel++\n\t\t} else {\n\t\t\t// If we stole from below, move down temporarily to replenish it.\n\t\t\tfor levels[level-1].needed > 0 {\n\t\t\t\tlevel--\n\t\t\t}\n\t\t}\n\t}\n\n\t// Somethings is wrong if at the end, the top level is null or hasn't used\n\t// all of the leaves.\n\tif leafCounts[maxBits][maxBits] != n {\n\t\tpanic(\"leafCounts[maxBits][maxBits] != n\")\n\t}\n\n\tbitCount := h.bitCount[:maxBits+1]\n\tbits := 1\n\tcounts := &leafCounts[maxBits]\n\tfor level := maxBits; level > 0; level-- {\n\t\t// chain.leafCount gives the number of literals requiring at least \"bits\"\n\t\t// bits to encode.\n\t\tbitCount[bits] = counts[level] - counts[level-1]\n\t\tbits++\n\t}\n\treturn bitCount\n}\n\n// Look at the leaves and assign them a bit count and an encoding as specified\n// in RFC 1951 3.2.2\nfunc (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalNode) {\n\tcode := uint16(0)\n\tfor n, bits := range bitCount {\n\t\tcode <<= 1\n\t\tif n == 0 || bits == 0 {\n\t\t\tcontinue\n\t\t}\n\t\t// The literals list[len(list)-bits] .. list[len(list)-bits]\n\t\t// are encoded using \"bits\" bits, and get the values\n\t\t// code, code + 1, ....  The code values are\n\t\t// assigned in literal order (not frequency order).\n\t\tchunk := list[len(list)-int(bits):]\n\n\t\tsortByLiteral(chunk)\n\t\tfor _, node := range chunk {\n\t\t\th.codes[node.literal] = newhcode(reverseBits(code, uint8(n)), uint8(n))\n\t\t\tcode++\n\t\t}\n\t\tlist = list[0 : len(list)-int(bits)]\n\t}\n}\n\n// Update this Huffman Code object to be the minimum code for the specified frequency count.\n//\n// freq  An array of frequencies, in which frequency[i] gives the frequency of literal i.\n// maxBits  The maximum number of bits to use for any literal.\nfunc (h *huffmanEncoder) generate(freq []uint16, maxBits int32) {\n\tlist := h.freqcache[:len(freq)+1]\n\tcodes := h.codes[:len(freq)]\n\t// Number of non-zero literals\n\tcount := 0\n\t// Set list to be the set of all non-zero literals and their frequencies\n\tfor i, f := range freq {\n\t\tif f != 0 {\n\t\t\tlist[count] = literalNode{uint16(i), f}\n\t\t\tcount++\n\t\t} else {\n\t\t\tcodes[i] = 0\n\t\t}\n\t}\n\tlist[count] = literalNode{}\n\n\tlist = list[:count]\n\tif count <= 2 {\n\t\t// Handle the small cases here, because they are awkward for the general case code. With\n\t\t// two or fewer literals, everything has bit length 1.\n\t\tfor i, node := range list {\n\t\t\t// \"list\" is in order of increasing literal value.\n\t\t\th.codes[node.literal].set(uint16(i), 1)\n\t\t}\n\t\treturn\n\t}\n\tsortByFreq(list)\n\n\t// Get the number of literals for each bit count\n\tbitCount := h.bitCounts(list, maxBits)\n\t// And do the assignment\n\th.assignEncodingAndSize(bitCount, list)\n}\n\n// atLeastOne clamps the result between 1 and 15.\nfunc atLeastOne(v float32) float32 {\n\tif v < 1 {\n\t\treturn 1\n\t}\n\tif v > 15 {\n\t\treturn 15\n\t}\n\treturn v\n}\n\nfunc histogram(b []byte, h []uint16) {\n\tif true && len(b) >= 8<<10 {\n\t\t// Split for bigger inputs\n\t\thistogramSplit(b, h)\n\t} else {\n\t\th = h[:256]\n\t\tfor _, t := range b {\n\t\t\th[t]++\n\t\t}\n\t}\n}\n\nfunc histogramSplit(b []byte, h []uint16) {\n\t// Tested, and slightly faster than 2-way.\n\t// Writing to separate arrays and combining is also slightly slower.\n\th = h[:256]\n\tfor len(b)&3 != 0 {\n\t\th[b[0]]++\n\t\tb = b[1:]\n\t}\n\tn := len(b) / 4\n\tx, y, z, w := b[:n], b[n:], b[n+n:], b[n+n+n:]\n\ty, z, w = y[:len(x)], z[:len(x)], w[:len(x)]\n\tfor i, t := range x {\n\t\tv0 := &h[t]\n\t\tv1 := &h[y[i]]\n\t\tv3 := &h[w[i]]\n\t\tv2 := &h[z[i]]\n\t\t*v0++\n\t\t*v1++\n\t\t*v2++\n\t\t*v3++\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/huffman_sortByFreq.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\n// Sort sorts data.\n// It makes one call to data.Len to determine n, and O(n*log(n)) calls to\n// data.Less and data.Swap. The sort is not guaranteed to be stable.\nfunc sortByFreq(data []literalNode) {\n\tn := len(data)\n\tquickSortByFreq(data, 0, n, maxDepth(n))\n}\n\nfunc quickSortByFreq(data []literalNode, a, b, maxDepth int) {\n\tfor b-a > 12 { // Use ShellSort for slices <= 12 elements\n\t\tif maxDepth == 0 {\n\t\t\theapSort(data, a, b)\n\t\t\treturn\n\t\t}\n\t\tmaxDepth--\n\t\tmlo, mhi := doPivotByFreq(data, a, b)\n\t\t// Avoiding recursion on the larger subproblem guarantees\n\t\t// a stack depth of at most lg(b-a).\n\t\tif mlo-a < b-mhi {\n\t\t\tquickSortByFreq(data, a, mlo, maxDepth)\n\t\t\ta = mhi // i.e., quickSortByFreq(data, mhi, b)\n\t\t} else {\n\t\t\tquickSortByFreq(data, mhi, b, maxDepth)\n\t\t\tb = mlo // i.e., quickSortByFreq(data, a, mlo)\n\t\t}\n\t}\n\tif b-a > 1 {\n\t\t// Do ShellSort pass with gap 6\n\t\t// It could be written in this simplified form cause b-a <= 12\n\t\tfor i := a + 6; i < b; i++ {\n\t\t\tif data[i].freq == data[i-6].freq && data[i].literal < data[i-6].literal || data[i].freq < data[i-6].freq {\n\t\t\t\tdata[i], data[i-6] = data[i-6], data[i]\n\t\t\t}\n\t\t}\n\t\tinsertionSortByFreq(data, a, b)\n\t}\n}\n\nfunc doPivotByFreq(data []literalNode, lo, hi int) (midlo, midhi int) {\n\tm := int(uint(lo+hi) >> 1) // Written like this to avoid integer overflow.\n\tif hi-lo > 40 {\n\t\t// Tukey's ``Ninther,'' median of three medians of three.\n\t\ts := (hi - lo) / 8\n\t\tmedianOfThreeSortByFreq(data, lo, lo+s, lo+2*s)\n\t\tmedianOfThreeSortByFreq(data, m, m-s, m+s)\n\t\tmedianOfThreeSortByFreq(data, hi-1, hi-1-s, hi-1-2*s)\n\t}\n\tmedianOfThreeSortByFreq(data, lo, m, hi-1)\n\n\t// Invariants are:\n\t//\tdata[lo] = pivot (set up by ChoosePivot)\n\t//\tdata[lo < i < a] < pivot\n\t//\tdata[a <= i < b] <= pivot\n\t//\tdata[b <= i < c] unexamined\n\t//\tdata[c <= i < hi-1] > pivot\n\t//\tdata[hi-1] >= pivot\n\tpivot := lo\n\ta, c := lo+1, hi-1\n\n\tfor ; a < c && (data[a].freq == data[pivot].freq && data[a].literal < data[pivot].literal || data[a].freq < data[pivot].freq); a++ {\n\t}\n\tb := a\n\tfor {\n\t\tfor ; b < c && (data[pivot].freq == data[b].freq && data[pivot].literal > data[b].literal || data[pivot].freq > data[b].freq); b++ { // data[b] <= pivot\n\t\t}\n\t\tfor ; b < c && (data[pivot].freq == data[c-1].freq && data[pivot].literal < data[c-1].literal || data[pivot].freq < data[c-1].freq); c-- { // data[c-1] > pivot\n\t\t}\n\t\tif b >= c {\n\t\t\tbreak\n\t\t}\n\t\t// data[b] > pivot; data[c-1] <= pivot\n\t\tdata[b], data[c-1] = data[c-1], data[b]\n\t\tb++\n\t\tc--\n\t}\n\t// If hi-c<3 then there are duplicates (by property of median of nine).\n\t// Let's be a bit more conservative, and set border to 5.\n\tprotect := hi-c < 5\n\tif !protect && hi-c < (hi-lo)/4 {\n\t\t// Lets test some points for equality to pivot\n\t\tdups := 0\n\t\tif data[pivot].freq == data[hi-1].freq && data[pivot].literal > data[hi-1].literal || data[pivot].freq > data[hi-1].freq { // data[hi-1] = pivot\n\t\t\tdata[c], data[hi-1] = data[hi-1], data[c]\n\t\t\tc++\n\t\t\tdups++\n\t\t}\n\t\tif data[b-1].freq == data[pivot].freq && data[b-1].literal > data[pivot].literal || data[b-1].freq > data[pivot].freq { // data[b-1] = pivot\n\t\t\tb--\n\t\t\tdups++\n\t\t}\n\t\t// m-lo = (hi-lo)/2 > 6\n\t\t// b-lo > (hi-lo)*3/4-1 > 8\n\t\t// ==> m < b ==> data[m] <= pivot\n\t\tif data[m].freq == data[pivot].freq && data[m].literal > data[pivot].literal || data[m].freq > data[pivot].freq { // data[m] = pivot\n\t\t\tdata[m], data[b-1] = data[b-1], data[m]\n\t\t\tb--\n\t\t\tdups++\n\t\t}\n\t\t// if at least 2 points are equal to pivot, assume skewed distribution\n\t\tprotect = dups > 1\n\t}\n\tif protect {\n\t\t// Protect against a lot of duplicates\n\t\t// Add invariant:\n\t\t//\tdata[a <= i < b] unexamined\n\t\t//\tdata[b <= i < c] = pivot\n\t\tfor {\n\t\t\tfor ; a < b && (data[b-1].freq == data[pivot].freq && data[b-1].literal > data[pivot].literal || data[b-1].freq > data[pivot].freq); b-- { // data[b] == pivot\n\t\t\t}\n\t\t\tfor ; a < b && (data[a].freq == data[pivot].freq && data[a].literal < data[pivot].literal || data[a].freq < data[pivot].freq); a++ { // data[a] < pivot\n\t\t\t}\n\t\t\tif a >= b {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// data[a] == pivot; data[b-1] < pivot\n\t\t\tdata[a], data[b-1] = data[b-1], data[a]\n\t\t\ta++\n\t\t\tb--\n\t\t}\n\t}\n\t// Swap pivot into middle\n\tdata[pivot], data[b-1] = data[b-1], data[pivot]\n\treturn b - 1, c\n}\n\n// Insertion sort\nfunc insertionSortByFreq(data []literalNode, a, b int) {\n\tfor i := a + 1; i < b; i++ {\n\t\tfor j := i; j > a && (data[j].freq == data[j-1].freq && data[j].literal < data[j-1].literal || data[j].freq < data[j-1].freq); j-- {\n\t\t\tdata[j], data[j-1] = data[j-1], data[j]\n\t\t}\n\t}\n}\n\n// quickSortByFreq, loosely following Bentley and McIlroy,\n// ``Engineering a Sort Function,'' SP&E November 1993.\n\n// medianOfThreeSortByFreq moves the median of the three values data[m0], data[m1], data[m2] into data[m1].\nfunc medianOfThreeSortByFreq(data []literalNode, m1, m0, m2 int) {\n\t// sort 3 elements\n\tif data[m1].freq == data[m0].freq && data[m1].literal < data[m0].literal || data[m1].freq < data[m0].freq {\n\t\tdata[m1], data[m0] = data[m0], data[m1]\n\t}\n\t// data[m0] <= data[m1]\n\tif data[m2].freq == data[m1].freq && data[m2].literal < data[m1].literal || data[m2].freq < data[m1].freq {\n\t\tdata[m2], data[m1] = data[m1], data[m2]\n\t\t// data[m0] <= data[m2] && data[m1] < data[m2]\n\t\tif data[m1].freq == data[m0].freq && data[m1].literal < data[m0].literal || data[m1].freq < data[m0].freq {\n\t\t\tdata[m1], data[m0] = data[m0], data[m1]\n\t\t}\n\t}\n\t// now data[m0] <= data[m1] <= data[m2]\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/huffman_sortByLiteral.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\n// Sort sorts data.\n// It makes one call to data.Len to determine n, and O(n*log(n)) calls to\n// data.Less and data.Swap. The sort is not guaranteed to be stable.\nfunc sortByLiteral(data []literalNode) {\n\tn := len(data)\n\tquickSort(data, 0, n, maxDepth(n))\n}\n\nfunc quickSort(data []literalNode, a, b, maxDepth int) {\n\tfor b-a > 12 { // Use ShellSort for slices <= 12 elements\n\t\tif maxDepth == 0 {\n\t\t\theapSort(data, a, b)\n\t\t\treturn\n\t\t}\n\t\tmaxDepth--\n\t\tmlo, mhi := doPivot(data, a, b)\n\t\t// Avoiding recursion on the larger subproblem guarantees\n\t\t// a stack depth of at most lg(b-a).\n\t\tif mlo-a < b-mhi {\n\t\t\tquickSort(data, a, mlo, maxDepth)\n\t\t\ta = mhi // i.e., quickSort(data, mhi, b)\n\t\t} else {\n\t\t\tquickSort(data, mhi, b, maxDepth)\n\t\t\tb = mlo // i.e., quickSort(data, a, mlo)\n\t\t}\n\t}\n\tif b-a > 1 {\n\t\t// Do ShellSort pass with gap 6\n\t\t// It could be written in this simplified form cause b-a <= 12\n\t\tfor i := a + 6; i < b; i++ {\n\t\t\tif data[i].literal < data[i-6].literal {\n\t\t\t\tdata[i], data[i-6] = data[i-6], data[i]\n\t\t\t}\n\t\t}\n\t\tinsertionSort(data, a, b)\n\t}\n}\nfunc heapSort(data []literalNode, a, b int) {\n\tfirst := a\n\tlo := 0\n\thi := b - a\n\n\t// Build heap with greatest element at top.\n\tfor i := (hi - 1) / 2; i >= 0; i-- {\n\t\tsiftDown(data, i, hi, first)\n\t}\n\n\t// Pop elements, largest first, into end of data.\n\tfor i := hi - 1; i >= 0; i-- {\n\t\tdata[first], data[first+i] = data[first+i], data[first]\n\t\tsiftDown(data, lo, i, first)\n\t}\n}\n\n// siftDown implements the heap property on data[lo, hi).\n// first is an offset into the array where the root of the heap lies.\nfunc siftDown(data []literalNode, lo, hi, first int) {\n\troot := lo\n\tfor {\n\t\tchild := 2*root + 1\n\t\tif child >= hi {\n\t\t\tbreak\n\t\t}\n\t\tif child+1 < hi && data[first+child].literal < data[first+child+1].literal {\n\t\t\tchild++\n\t\t}\n\t\tif data[first+root].literal > data[first+child].literal {\n\t\t\treturn\n\t\t}\n\t\tdata[first+root], data[first+child] = data[first+child], data[first+root]\n\t\troot = child\n\t}\n}\nfunc doPivot(data []literalNode, lo, hi int) (midlo, midhi int) {\n\tm := int(uint(lo+hi) >> 1) // Written like this to avoid integer overflow.\n\tif hi-lo > 40 {\n\t\t// Tukey's ``Ninther,'' median of three medians of three.\n\t\ts := (hi - lo) / 8\n\t\tmedianOfThree(data, lo, lo+s, lo+2*s)\n\t\tmedianOfThree(data, m, m-s, m+s)\n\t\tmedianOfThree(data, hi-1, hi-1-s, hi-1-2*s)\n\t}\n\tmedianOfThree(data, lo, m, hi-1)\n\n\t// Invariants are:\n\t//\tdata[lo] = pivot (set up by ChoosePivot)\n\t//\tdata[lo < i < a] < pivot\n\t//\tdata[a <= i < b] <= pivot\n\t//\tdata[b <= i < c] unexamined\n\t//\tdata[c <= i < hi-1] > pivot\n\t//\tdata[hi-1] >= pivot\n\tpivot := lo\n\ta, c := lo+1, hi-1\n\n\tfor ; a < c && data[a].literal < data[pivot].literal; a++ {\n\t}\n\tb := a\n\tfor {\n\t\tfor ; b < c && data[pivot].literal > data[b].literal; b++ { // data[b] <= pivot\n\t\t}\n\t\tfor ; b < c && data[pivot].literal < data[c-1].literal; c-- { // data[c-1] > pivot\n\t\t}\n\t\tif b >= c {\n\t\t\tbreak\n\t\t}\n\t\t// data[b] > pivot; data[c-1] <= pivot\n\t\tdata[b], data[c-1] = data[c-1], data[b]\n\t\tb++\n\t\tc--\n\t}\n\t// If hi-c<3 then there are duplicates (by property of median of nine).\n\t// Let's be a bit more conservative, and set border to 5.\n\tprotect := hi-c < 5\n\tif !protect && hi-c < (hi-lo)/4 {\n\t\t// Lets test some points for equality to pivot\n\t\tdups := 0\n\t\tif data[pivot].literal > data[hi-1].literal { // data[hi-1] = pivot\n\t\t\tdata[c], data[hi-1] = data[hi-1], data[c]\n\t\t\tc++\n\t\t\tdups++\n\t\t}\n\t\tif data[b-1].literal > data[pivot].literal { // data[b-1] = pivot\n\t\t\tb--\n\t\t\tdups++\n\t\t}\n\t\t// m-lo = (hi-lo)/2 > 6\n\t\t// b-lo > (hi-lo)*3/4-1 > 8\n\t\t// ==> m < b ==> data[m] <= pivot\n\t\tif data[m].literal > data[pivot].literal { // data[m] = pivot\n\t\t\tdata[m], data[b-1] = data[b-1], data[m]\n\t\t\tb--\n\t\t\tdups++\n\t\t}\n\t\t// if at least 2 points are equal to pivot, assume skewed distribution\n\t\tprotect = dups > 1\n\t}\n\tif protect {\n\t\t// Protect against a lot of duplicates\n\t\t// Add invariant:\n\t\t//\tdata[a <= i < b] unexamined\n\t\t//\tdata[b <= i < c] = pivot\n\t\tfor {\n\t\t\tfor ; a < b && data[b-1].literal > data[pivot].literal; b-- { // data[b] == pivot\n\t\t\t}\n\t\t\tfor ; a < b && data[a].literal < data[pivot].literal; a++ { // data[a] < pivot\n\t\t\t}\n\t\t\tif a >= b {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// data[a] == pivot; data[b-1] < pivot\n\t\t\tdata[a], data[b-1] = data[b-1], data[a]\n\t\t\ta++\n\t\t\tb--\n\t\t}\n\t}\n\t// Swap pivot into middle\n\tdata[pivot], data[b-1] = data[b-1], data[pivot]\n\treturn b - 1, c\n}\n\n// Insertion sort\nfunc insertionSort(data []literalNode, a, b int) {\n\tfor i := a + 1; i < b; i++ {\n\t\tfor j := i; j > a && data[j].literal < data[j-1].literal; j-- {\n\t\t\tdata[j], data[j-1] = data[j-1], data[j]\n\t\t}\n\t}\n}\n\n// maxDepth returns a threshold at which quicksort should switch\n// to heapsort. It returns 2*ceil(lg(n+1)).\nfunc maxDepth(n int) int {\n\tvar depth int\n\tfor i := n; i > 0; i >>= 1 {\n\t\tdepth++\n\t}\n\treturn depth * 2\n}\n\n// medianOfThree moves the median of the three values data[m0], data[m1], data[m2] into data[m1].\nfunc medianOfThree(data []literalNode, m1, m0, m2 int) {\n\t// sort 3 elements\n\tif data[m1].literal < data[m0].literal {\n\t\tdata[m1], data[m0] = data[m0], data[m1]\n\t}\n\t// data[m0] <= data[m1]\n\tif data[m2].literal < data[m1].literal {\n\t\tdata[m2], data[m1] = data[m1], data[m2]\n\t\t// data[m0] <= data[m2] && data[m1] < data[m2]\n\t\tif data[m1].literal < data[m0].literal {\n\t\t\tdata[m1], data[m0] = data[m0], data[m1]\n\t\t}\n\t}\n\t// now data[m0] <= data[m1] <= data[m2]\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/inflate.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package flate implements the DEFLATE compressed data format, described in\n// RFC 1951.  The gzip and zlib packages implement access to DEFLATE-based file\n// formats.\npackage flate\n\nimport (\n\t\"bufio\"\n\t\"compress/flate\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/bits\"\n\t\"sync\"\n)\n\nconst (\n\tmaxCodeLen     = 16 // max length of Huffman code\n\tmaxCodeLenMask = 15 // mask for max length of Huffman code\n\t// The next three numbers come from the RFC section 3.2.7, with the\n\t// additional proviso in section 3.2.5 which implies that distance codes\n\t// 30 and 31 should never occur in compressed data.\n\tmaxNumLit  = 286\n\tmaxNumDist = 30\n\tnumCodes   = 19 // number of codes in Huffman meta-code\n\n\tdebugDecode = false\n)\n\n// Value of length - 3 and extra bits.\ntype lengthExtra struct {\n\tlength, extra uint8\n}\n\nvar decCodeToLen = [32]lengthExtra{{length: 0x0, extra: 0x0}, {length: 0x1, extra: 0x0}, {length: 0x2, extra: 0x0}, {length: 0x3, extra: 0x0}, {length: 0x4, extra: 0x0}, {length: 0x5, extra: 0x0}, {length: 0x6, extra: 0x0}, {length: 0x7, extra: 0x0}, {length: 0x8, extra: 0x1}, {length: 0xa, extra: 0x1}, {length: 0xc, extra: 0x1}, {length: 0xe, extra: 0x1}, {length: 0x10, extra: 0x2}, {length: 0x14, extra: 0x2}, {length: 0x18, extra: 0x2}, {length: 0x1c, extra: 0x2}, {length: 0x20, extra: 0x3}, {length: 0x28, extra: 0x3}, {length: 0x30, extra: 0x3}, {length: 0x38, extra: 0x3}, {length: 0x40, extra: 0x4}, {length: 0x50, extra: 0x4}, {length: 0x60, extra: 0x4}, {length: 0x70, extra: 0x4}, {length: 0x80, extra: 0x5}, {length: 0xa0, extra: 0x5}, {length: 0xc0, extra: 0x5}, {length: 0xe0, extra: 0x5}, {length: 0xff, extra: 0x0}, {length: 0x0, extra: 0x0}, {length: 0x0, extra: 0x0}, {length: 0x0, extra: 0x0}}\n\nvar bitMask32 = [32]uint32{\n\t0, 1, 3, 7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF,\n\t0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF,\n\t0x1ffff, 0x3ffff, 0x7FFFF, 0xfFFFF, 0x1fFFFF, 0x3fFFFF, 0x7fFFFF, 0xffFFFF,\n\t0x1ffFFFF, 0x3ffFFFF, 0x7ffFFFF, 0xfffFFFF, 0x1fffFFFF, 0x3fffFFFF, 0x7fffFFFF,\n} // up to 32 bits\n\n// Initialize the fixedHuffmanDecoder only once upon first use.\nvar fixedOnce sync.Once\nvar fixedHuffmanDecoder huffmanDecoder\n\n// A CorruptInputError reports the presence of corrupt input at a given offset.\ntype CorruptInputError = flate.CorruptInputError\n\n// An InternalError reports an error in the flate code itself.\ntype InternalError string\n\nfunc (e InternalError) Error() string { return \"flate: internal error: \" + string(e) }\n\n// A ReadError reports an error encountered while reading input.\n//\n// Deprecated: No longer returned.\ntype ReadError = flate.ReadError\n\n// A WriteError reports an error encountered while writing output.\n//\n// Deprecated: No longer returned.\ntype WriteError = flate.WriteError\n\n// Resetter resets a ReadCloser returned by NewReader or NewReaderDict to\n// to switch to a new underlying Reader. This permits reusing a ReadCloser\n// instead of allocating a new one.\ntype Resetter interface {\n\t// Reset discards any buffered data and resets the Resetter as if it was\n\t// newly initialized with the given reader.\n\tReset(r io.Reader, dict []byte) error\n}\n\n// The data structure for decoding Huffman tables is based on that of\n// zlib. There is a lookup table of a fixed bit width (huffmanChunkBits),\n// For codes smaller than the table width, there are multiple entries\n// (each combination of trailing bits has the same value). For codes\n// larger than the table width, the table contains a link to an overflow\n// table. The width of each entry in the link table is the maximum code\n// size minus the chunk width.\n//\n// Note that you can do a lookup in the table even without all bits\n// filled. Since the extra bits are zero, and the DEFLATE Huffman codes\n// have the property that shorter codes come before longer ones, the\n// bit length estimate in the result is a lower bound on the actual\n// number of bits.\n//\n// See the following:\n//\thttp://www.gzip.org/algorithm.txt\n\n// chunk & 15 is number of bits\n// chunk >> 4 is value, including table link\n\nconst (\n\thuffmanChunkBits  = 9\n\thuffmanNumChunks  = 1 << huffmanChunkBits\n\thuffmanCountMask  = 15\n\thuffmanValueShift = 4\n)\n\ntype huffmanDecoder struct {\n\tmaxRead  int                       // the maximum number of bits we can read and not overread\n\tchunks   *[huffmanNumChunks]uint16 // chunks as described above\n\tlinks    [][]uint16                // overflow links\n\tlinkMask uint32                    // mask the width of the link table\n}\n\n// Initialize Huffman decoding tables from array of code lengths.\n// Following this function, h is guaranteed to be initialized into a complete\n// tree (i.e., neither over-subscribed nor under-subscribed). The exception is a\n// degenerate case where the tree has only a single symbol with length 1. Empty\n// trees are permitted.\nfunc (h *huffmanDecoder) init(lengths []int) bool {\n\t// Sanity enables additional runtime tests during Huffman\n\t// table construction. It's intended to be used during\n\t// development to supplement the currently ad-hoc unit tests.\n\tconst sanity = false\n\n\tif h.chunks == nil {\n\t\th.chunks = new([huffmanNumChunks]uint16)\n\t}\n\n\tif h.maxRead != 0 {\n\t\t*h = huffmanDecoder{chunks: h.chunks, links: h.links}\n\t}\n\n\t// Count number of codes of each length,\n\t// compute maxRead and max length.\n\tvar count [maxCodeLen]int\n\tvar min, max int\n\tfor _, n := range lengths {\n\t\tif n == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif min == 0 || n < min {\n\t\t\tmin = n\n\t\t}\n\t\tif n > max {\n\t\t\tmax = n\n\t\t}\n\t\tcount[n&maxCodeLenMask]++\n\t}\n\n\t// Empty tree. The decompressor.huffSym function will fail later if the tree\n\t// is used. Technically, an empty tree is only valid for the HDIST tree and\n\t// not the HCLEN and HLIT tree. However, a stream with an empty HCLEN tree\n\t// is guaranteed to fail since it will attempt to use the tree to decode the\n\t// codes for the HLIT and HDIST trees. Similarly, an empty HLIT tree is\n\t// guaranteed to fail later since the compressed data section must be\n\t// composed of at least one symbol (the end-of-block marker).\n\tif max == 0 {\n\t\treturn true\n\t}\n\n\tcode := 0\n\tvar nextcode [maxCodeLen]int\n\tfor i := min; i <= max; i++ {\n\t\tcode <<= 1\n\t\tnextcode[i&maxCodeLenMask] = code\n\t\tcode += count[i&maxCodeLenMask]\n\t}\n\n\t// Check that the coding is complete (i.e., that we've\n\t// assigned all 2-to-the-max possible bit sequences).\n\t// Exception: To be compatible with zlib, we also need to\n\t// accept degenerate single-code codings. See also\n\t// TestDegenerateHuffmanCoding.\n\tif code != 1<<uint(max) && !(code == 1 && max == 1) {\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"coding failed, code, max:\", code, max, code == 1<<uint(max), code == 1 && max == 1, \"(one should be true)\")\n\t\t}\n\t\treturn false\n\t}\n\n\th.maxRead = min\n\n\tchunks := h.chunks[:]\n\tfor i := range chunks {\n\t\tchunks[i] = 0\n\t}\n\n\tif max > huffmanChunkBits {\n\t\tnumLinks := 1 << (uint(max) - huffmanChunkBits)\n\t\th.linkMask = uint32(numLinks - 1)\n\n\t\t// create link tables\n\t\tlink := nextcode[huffmanChunkBits+1] >> 1\n\t\tif cap(h.links) < huffmanNumChunks-link {\n\t\t\th.links = make([][]uint16, huffmanNumChunks-link)\n\t\t} else {\n\t\t\th.links = h.links[:huffmanNumChunks-link]\n\t\t}\n\t\tfor j := uint(link); j < huffmanNumChunks; j++ {\n\t\t\treverse := int(bits.Reverse16(uint16(j)))\n\t\t\treverse >>= uint(16 - huffmanChunkBits)\n\t\t\toff := j - uint(link)\n\t\t\tif sanity && h.chunks[reverse] != 0 {\n\t\t\t\tpanic(\"impossible: overwriting existing chunk\")\n\t\t\t}\n\t\t\th.chunks[reverse] = uint16(off<<huffmanValueShift | (huffmanChunkBits + 1))\n\t\t\tif cap(h.links[off]) < numLinks {\n\t\t\t\th.links[off] = make([]uint16, numLinks)\n\t\t\t} else {\n\t\t\t\th.links[off] = h.links[off][:numLinks]\n\t\t\t}\n\t\t}\n\t} else {\n\t\th.links = h.links[:0]\n\t}\n\n\tfor i, n := range lengths {\n\t\tif n == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tcode := nextcode[n]\n\t\tnextcode[n]++\n\t\tchunk := uint16(i<<huffmanValueShift | n)\n\t\treverse := int(bits.Reverse16(uint16(code)))\n\t\treverse >>= uint(16 - n)\n\t\tif n <= huffmanChunkBits {\n\t\t\tfor off := reverse; off < len(h.chunks); off += 1 << uint(n) {\n\t\t\t\t// We should never need to overwrite\n\t\t\t\t// an existing chunk. Also, 0 is\n\t\t\t\t// never a valid chunk, because the\n\t\t\t\t// lower 4 \"count\" bits should be\n\t\t\t\t// between 1 and 15.\n\t\t\t\tif sanity && h.chunks[off] != 0 {\n\t\t\t\t\tpanic(\"impossible: overwriting existing chunk\")\n\t\t\t\t}\n\t\t\t\th.chunks[off] = chunk\n\t\t\t}\n\t\t} else {\n\t\t\tj := reverse & (huffmanNumChunks - 1)\n\t\t\tif sanity && h.chunks[j]&huffmanCountMask != huffmanChunkBits+1 {\n\t\t\t\t// Longer codes should have been\n\t\t\t\t// associated with a link table above.\n\t\t\t\tpanic(\"impossible: not an indirect chunk\")\n\t\t\t}\n\t\t\tvalue := h.chunks[j] >> huffmanValueShift\n\t\t\tlinktab := h.links[value]\n\t\t\treverse >>= huffmanChunkBits\n\t\t\tfor off := reverse; off < len(linktab); off += 1 << uint(n-huffmanChunkBits) {\n\t\t\t\tif sanity && linktab[off] != 0 {\n\t\t\t\t\tpanic(\"impossible: overwriting existing chunk\")\n\t\t\t\t}\n\t\t\t\tlinktab[off] = chunk\n\t\t\t}\n\t\t}\n\t}\n\n\tif sanity {\n\t\t// Above we've sanity checked that we never overwrote\n\t\t// an existing entry. Here we additionally check that\n\t\t// we filled the tables completely.\n\t\tfor i, chunk := range h.chunks {\n\t\t\tif chunk == 0 {\n\t\t\t\t// As an exception, in the degenerate\n\t\t\t\t// single-code case, we allow odd\n\t\t\t\t// chunks to be missing.\n\t\t\t\tif code == 1 && i%2 == 1 {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tpanic(\"impossible: missing chunk\")\n\t\t\t}\n\t\t}\n\t\tfor _, linktab := range h.links {\n\t\t\tfor _, chunk := range linktab {\n\t\t\t\tif chunk == 0 {\n\t\t\t\t\tpanic(\"impossible: missing chunk\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true\n}\n\n// Reader is the actual read interface needed by NewReader.\n// If the passed in io.Reader does not also have ReadByte,\n// the NewReader will introduce its own buffering.\ntype Reader interface {\n\tio.Reader\n\tio.ByteReader\n}\n\ntype step uint8\n\nconst (\n\tcopyData step = iota + 1\n\tnextBlock\n\thuffmanBytesBuffer\n\thuffmanBytesReader\n\thuffmanBufioReader\n\thuffmanStringsReader\n\thuffmanGenericReader\n)\n\n// flushMode tells decompressor when to return data\ntype flushMode uint8\n\nconst (\n\tsyncFlush    flushMode = iota // return data after sync flush block\n\tpartialFlush                  // return data after each block\n)\n\n// Decompress state.\ntype decompressor struct {\n\t// Input source.\n\tr       Reader\n\troffset int64\n\n\t// Huffman decoders for literal/length, distance.\n\th1, h2 huffmanDecoder\n\n\t// Length arrays used to define Huffman codes.\n\tbits     *[maxNumLit + maxNumDist]int\n\tcodebits *[numCodes]int\n\n\t// Output history, buffer.\n\tdict dictDecoder\n\n\t// Next step in the decompression,\n\t// and decompression state.\n\tstep      step\n\tstepState int\n\terr       error\n\ttoRead    []byte\n\thl, hd    *huffmanDecoder\n\tcopyLen   int\n\tcopyDist  int\n\n\t// Temporary buffer (avoids repeated allocation).\n\tbuf [4]byte\n\n\t// Input bits, in top of b.\n\tb uint32\n\n\tnb    uint\n\tfinal bool\n\n\tflushMode flushMode\n}\n\nfunc (f *decompressor) nextBlock() {\n\tfor f.nb < 1+2 {\n\t\tif f.err = f.moreBits(); f.err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tf.final = f.b&1 == 1\n\tf.b >>= 1\n\ttyp := f.b & 3\n\tf.b >>= 2\n\tf.nb -= 1 + 2\n\tswitch typ {\n\tcase 0:\n\t\tf.dataBlock()\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"stored block\")\n\t\t}\n\tcase 1:\n\t\t// compressed, fixed Huffman tables\n\t\tf.hl = &fixedHuffmanDecoder\n\t\tf.hd = nil\n\t\tf.huffmanBlockDecoder()\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"predefinied huffman block\")\n\t\t}\n\tcase 2:\n\t\t// compressed, dynamic Huffman tables\n\t\tif f.err = f.readHuffman(); f.err != nil {\n\t\t\tbreak\n\t\t}\n\t\tf.hl = &f.h1\n\t\tf.hd = &f.h2\n\t\tf.huffmanBlockDecoder()\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"dynamic huffman block\")\n\t\t}\n\tdefault:\n\t\t// 3 is reserved.\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"reserved data block encountered\")\n\t\t}\n\t\tf.err = CorruptInputError(f.roffset)\n\t}\n}\n\nfunc (f *decompressor) Read(b []byte) (int, error) {\n\tfor {\n\t\tif len(f.toRead) > 0 {\n\t\t\tn := copy(b, f.toRead)\n\t\t\tf.toRead = f.toRead[n:]\n\t\t\tif len(f.toRead) == 0 {\n\t\t\t\treturn n, f.err\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif f.err != nil {\n\t\t\treturn 0, f.err\n\t\t}\n\n\t\tf.doStep()\n\n\t\tif f.err != nil && len(f.toRead) == 0 {\n\t\t\tf.toRead = f.dict.readFlush() // Flush what's left in case of error\n\t\t}\n\t}\n}\n\n// WriteTo implements the io.WriteTo interface for io.Copy and friends.\nfunc (f *decompressor) WriteTo(w io.Writer) (int64, error) {\n\ttotal := int64(0)\n\tflushed := false\n\tfor {\n\t\tif len(f.toRead) > 0 {\n\t\t\tn, err := w.Write(f.toRead)\n\t\t\ttotal += int64(n)\n\t\t\tif err != nil {\n\t\t\t\tf.err = err\n\t\t\t\treturn total, err\n\t\t\t}\n\t\t\tif n != len(f.toRead) {\n\t\t\t\treturn total, io.ErrShortWrite\n\t\t\t}\n\t\t\tf.toRead = f.toRead[:0]\n\t\t}\n\t\tif f.err != nil && flushed {\n\t\t\tif f.err == io.EOF {\n\t\t\t\treturn total, nil\n\t\t\t}\n\t\t\treturn total, f.err\n\t\t}\n\t\tif f.err == nil {\n\t\t\tf.doStep()\n\t\t}\n\t\tif len(f.toRead) == 0 && f.err != nil && !flushed {\n\t\t\tf.toRead = f.dict.readFlush() // Flush what's left in case of error\n\t\t\tflushed = true\n\t\t}\n\t}\n}\n\nfunc (f *decompressor) Close() error {\n\tif f.err == io.EOF {\n\t\treturn nil\n\t}\n\treturn f.err\n}\n\n// RFC 1951 section 3.2.7.\n// Compression with dynamic Huffman codes\n\nvar codeOrder = [...]int{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}\n\nfunc (f *decompressor) readHuffman() error {\n\t// HLIT[5], HDIST[5], HCLEN[4].\n\tfor f.nb < 5+5+4 {\n\t\tif err := f.moreBits(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tnlit := int(f.b&0x1F) + 257\n\tif nlit > maxNumLit {\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"nlit > maxNumLit\", nlit)\n\t\t}\n\t\treturn CorruptInputError(f.roffset)\n\t}\n\tf.b >>= 5\n\tndist := int(f.b&0x1F) + 1\n\tif ndist > maxNumDist {\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"ndist > maxNumDist\", ndist)\n\t\t}\n\t\treturn CorruptInputError(f.roffset)\n\t}\n\tf.b >>= 5\n\tnclen := int(f.b&0xF) + 4\n\t// numCodes is 19, so nclen is always valid.\n\tf.b >>= 4\n\tf.nb -= 5 + 5 + 4\n\n\t// (HCLEN+4)*3 bits: code lengths in the magic codeOrder order.\n\tfor i := range nclen {\n\t\tfor f.nb < 3 {\n\t\t\tif err := f.moreBits(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tf.codebits[codeOrder[i]] = int(f.b & 0x7)\n\t\tf.b >>= 3\n\t\tf.nb -= 3\n\t}\n\tfor i := nclen; i < len(codeOrder); i++ {\n\t\tf.codebits[codeOrder[i]] = 0\n\t}\n\tif !f.h1.init(f.codebits[0:]) {\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"init codebits failed\")\n\t\t}\n\t\treturn CorruptInputError(f.roffset)\n\t}\n\n\t// HLIT + 257 code lengths, HDIST + 1 code lengths,\n\t// using the code length Huffman code.\n\tfor i, n := 0, nlit+ndist; i < n; {\n\t\tx, err := f.huffSym(&f.h1)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif x < 16 {\n\t\t\t// Actual length.\n\t\t\tf.bits[i] = x\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\t// Repeat previous length or zero.\n\t\tvar rep int\n\t\tvar nb uint\n\t\tvar b int\n\t\tswitch x {\n\t\tdefault:\n\t\t\treturn InternalError(\"unexpected length code\")\n\t\tcase 16:\n\t\t\trep = 3\n\t\t\tnb = 2\n\t\t\tif i == 0 {\n\t\t\t\tif debugDecode {\n\t\t\t\t\tfmt.Println(\"i==0\")\n\t\t\t\t}\n\t\t\t\treturn CorruptInputError(f.roffset)\n\t\t\t}\n\t\t\tb = f.bits[i-1]\n\t\tcase 17:\n\t\t\trep = 3\n\t\t\tnb = 3\n\t\t\tb = 0\n\t\tcase 18:\n\t\t\trep = 11\n\t\t\tnb = 7\n\t\t\tb = 0\n\t\t}\n\t\tfor f.nb < nb {\n\t\t\tif err := f.moreBits(); err != nil {\n\t\t\t\tif debugDecode {\n\t\t\t\t\tfmt.Println(\"morebits:\", err)\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\trep += int(f.b & uint32(1<<(nb&regSizeMaskUint32)-1))\n\t\tf.b >>= nb & regSizeMaskUint32\n\t\tf.nb -= nb\n\t\tif i+rep > n {\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"i+rep > n\", i, rep, n)\n\t\t\t}\n\t\t\treturn CorruptInputError(f.roffset)\n\t\t}\n\t\tfor j := 0; j < rep; j++ {\n\t\t\tf.bits[i] = b\n\t\t\ti++\n\t\t}\n\t}\n\n\tif !f.h1.init(f.bits[0:nlit]) || !f.h2.init(f.bits[nlit:nlit+ndist]) {\n\t\tif debugDecode {\n\t\t\tfmt.Println(\"init2 failed\")\n\t\t}\n\t\treturn CorruptInputError(f.roffset)\n\t}\n\n\t// As an optimization, we can initialize the maxRead bits to read at a time\n\t// for the HLIT tree to the length of the EOB marker since we know that\n\t// every block must terminate with one. This preserves the property that\n\t// we never read any extra bytes after the end of the DEFLATE stream.\n\tif f.h1.maxRead < f.bits[endBlockMarker] {\n\t\tf.h1.maxRead = f.bits[endBlockMarker]\n\t}\n\tif !f.final {\n\t\t// If not the final block, the smallest block possible is\n\t\t// a predefined table, BTYPE=01, with a single EOB marker.\n\t\t// This will take up 3 + 7 bits.\n\t\tf.h1.maxRead += 10\n\t}\n\n\treturn nil\n}\n\n// Copy a single uncompressed data block from input to output.\nfunc (f *decompressor) dataBlock() {\n\t// Uncompressed.\n\t// Discard current half-byte.\n\tleft := (f.nb) & 7\n\tf.nb -= left\n\tf.b >>= left\n\n\toffBytes := f.nb >> 3\n\t// Unfilled values will be overwritten.\n\tf.buf[0] = uint8(f.b)\n\tf.buf[1] = uint8(f.b >> 8)\n\tf.buf[2] = uint8(f.b >> 16)\n\tf.buf[3] = uint8(f.b >> 24)\n\n\tf.roffset += int64(offBytes)\n\tf.nb, f.b = 0, 0\n\n\t// Length then ones-complement of length.\n\tnr, err := io.ReadFull(f.r, f.buf[offBytes:4])\n\tf.roffset += int64(nr)\n\tif err != nil {\n\t\tf.err = noEOF(err)\n\t\treturn\n\t}\n\tn := uint16(f.buf[0]) | uint16(f.buf[1])<<8\n\tnn := uint16(f.buf[2]) | uint16(f.buf[3])<<8\n\tif nn != ^n {\n\t\tif debugDecode {\n\t\t\tncomp := ^n\n\t\t\tfmt.Println(\"uint16(nn) != uint16(^n)\", nn, ncomp)\n\t\t}\n\t\tf.err = CorruptInputError(f.roffset)\n\t\treturn\n\t}\n\n\tif n == 0 {\n\t\tif f.flushMode == syncFlush {\n\t\t\tf.toRead = f.dict.readFlush()\n\t\t}\n\n\t\tf.finishBlock()\n\t\treturn\n\t}\n\n\tf.copyLen = int(n)\n\tf.copyData()\n}\n\n// copyData copies f.copyLen bytes from the underlying reader into f.hist.\n// It pauses for reads when f.hist is full.\nfunc (f *decompressor) copyData() {\n\tbuf := f.dict.writeSlice()\n\tif len(buf) > f.copyLen {\n\t\tbuf = buf[:f.copyLen]\n\t}\n\n\tcnt, err := io.ReadFull(f.r, buf)\n\tf.roffset += int64(cnt)\n\tf.copyLen -= cnt\n\tf.dict.writeMark(cnt)\n\tif err != nil {\n\t\tf.err = noEOF(err)\n\t\treturn\n\t}\n\n\tif f.dict.availWrite() == 0 || f.copyLen > 0 {\n\t\tf.toRead = f.dict.readFlush()\n\t\tf.step = copyData\n\t\treturn\n\t}\n\tf.finishBlock()\n}\n\nfunc (f *decompressor) finishBlock() {\n\tif f.final {\n\t\tif f.dict.availRead() > 0 {\n\t\t\tf.toRead = f.dict.readFlush()\n\t\t}\n\n\t\tf.err = io.EOF\n\t} else if f.flushMode == partialFlush && f.dict.availRead() > 0 {\n\t\tf.toRead = f.dict.readFlush()\n\t}\n\n\tf.step = nextBlock\n}\n\nfunc (f *decompressor) doStep() {\n\tswitch f.step {\n\tcase copyData:\n\t\tf.copyData()\n\tcase nextBlock:\n\t\tf.nextBlock()\n\tcase huffmanBytesBuffer:\n\t\tf.huffmanBytesBuffer()\n\tcase huffmanBytesReader:\n\t\tf.huffmanBytesReader()\n\tcase huffmanBufioReader:\n\t\tf.huffmanBufioReader()\n\tcase huffmanStringsReader:\n\t\tf.huffmanStringsReader()\n\tcase huffmanGenericReader:\n\t\tf.huffmanGenericReader()\n\tdefault:\n\t\tpanic(\"BUG: unexpected step state\")\n\t}\n}\n\n// noEOF returns err, unless err == io.EOF, in which case it returns io.ErrUnexpectedEOF.\nfunc noEOF(e error) error {\n\tif e == io.EOF {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn e\n}\n\nfunc (f *decompressor) moreBits() error {\n\tc, err := f.r.ReadByte()\n\tif err != nil {\n\t\treturn noEOF(err)\n\t}\n\tf.roffset++\n\tf.b |= uint32(c) << (f.nb & regSizeMaskUint32)\n\tf.nb += 8\n\treturn nil\n}\n\n// Read the next Huffman-encoded symbol from f according to h.\nfunc (f *decompressor) huffSym(h *huffmanDecoder) (int, error) {\n\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t// with single element, huffSym must error on these two edge cases. In both\n\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t// satisfy the n == 0 check below.\n\tn := uint(h.maxRead)\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tnb, b := f.nb, f.b\n\tfor {\n\t\tfor nb < n {\n\t\t\tc, err := f.r.ReadByte()\n\t\t\tif err != nil {\n\t\t\t\tf.b = b\n\t\t\t\tf.nb = nb\n\t\t\t\treturn 0, noEOF(err)\n\t\t\t}\n\t\t\tf.roffset++\n\t\t\tb |= uint32(c) << (nb & regSizeMaskUint32)\n\t\t\tnb += 8\n\t\t}\n\t\tchunk := h.chunks[b&(huffmanNumChunks-1)]\n\t\tn = uint(chunk & huffmanCountMask)\n\t\tif n > huffmanChunkBits {\n\t\t\tchunk = h.links[chunk>>huffmanValueShift][(b>>huffmanChunkBits)&h.linkMask]\n\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t}\n\t\tif n <= nb {\n\t\t\tif n == 0 {\n\t\t\t\tf.b = b\n\t\t\t\tf.nb = nb\n\t\t\t\tif debugDecode {\n\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t}\n\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\treturn 0, f.err\n\t\t\t}\n\t\t\tf.b = b >> (n & regSizeMaskUint32)\n\t\t\tf.nb = nb - n\n\t\t\treturn int(chunk >> huffmanValueShift), nil\n\t\t}\n\t}\n}\n\nfunc makeReader(r io.Reader) Reader {\n\tif rr, ok := r.(Reader); ok {\n\t\treturn rr\n\t}\n\treturn bufio.NewReader(r)\n}\n\nfunc fixedHuffmanDecoderInit() {\n\tfixedOnce.Do(func() {\n\t\t// These come from the RFC section 3.2.6.\n\t\tvar bits [288]int\n\t\tfor i := range 144 {\n\t\t\tbits[i] = 8\n\t\t}\n\t\tfor i := 144; i < 256; i++ {\n\t\t\tbits[i] = 9\n\t\t}\n\t\tfor i := 256; i < 280; i++ {\n\t\t\tbits[i] = 7\n\t\t}\n\t\tfor i := 280; i < 288; i++ {\n\t\t\tbits[i] = 8\n\t\t}\n\t\tfixedHuffmanDecoder.init(bits[:])\n\t})\n}\n\nfunc (f *decompressor) Reset(r io.Reader, dict []byte) error {\n\t*f = decompressor{\n\t\tr:        makeReader(r),\n\t\tbits:     f.bits,\n\t\tcodebits: f.codebits,\n\t\th1:       f.h1,\n\t\th2:       f.h2,\n\t\tdict:     f.dict,\n\t\tstep:     nextBlock,\n\t}\n\tf.dict.init(maxMatchOffset, dict)\n\treturn nil\n}\n\ntype ReaderOpt func(*decompressor)\n\n// WithPartialBlock tells decompressor to return after each block,\n// so it can read data written with partial flush\nfunc WithPartialBlock() ReaderOpt {\n\treturn func(f *decompressor) {\n\t\tf.flushMode = partialFlush\n\t}\n}\n\n// WithDict initializes the reader with a preset dictionary\nfunc WithDict(dict []byte) ReaderOpt {\n\treturn func(f *decompressor) {\n\t\tf.dict.init(maxMatchOffset, dict)\n\t}\n}\n\n// NewReaderOpts returns new reader with provided options\nfunc NewReaderOpts(r io.Reader, opts ...ReaderOpt) io.ReadCloser {\n\tfixedHuffmanDecoderInit()\n\n\tvar f decompressor\n\tf.r = makeReader(r)\n\tf.bits = new([maxNumLit + maxNumDist]int)\n\tf.codebits = new([numCodes]int)\n\tf.step = nextBlock\n\tf.dict.init(maxMatchOffset, nil)\n\n\tfor _, opt := range opts {\n\t\topt(&f)\n\t}\n\n\treturn &f\n}\n\n// NewReader returns a new ReadCloser that can be used\n// to read the uncompressed version of r.\n// If r does not also implement io.ByteReader,\n// the decompressor may read more data than necessary from r.\n// It is the caller's responsibility to call Close on the ReadCloser\n// when finished reading.\n//\n// The ReadCloser returned by NewReader also implements Resetter.\nfunc NewReader(r io.Reader) io.ReadCloser {\n\treturn NewReaderOpts(r)\n}\n\n// NewReaderDict is like NewReader but initializes the reader\n// with a preset dictionary. The returned Reader behaves as if\n// the uncompressed data stream started with the given dictionary,\n// which has already been read. NewReaderDict is typically used\n// to read data compressed by NewWriterDict.\n//\n// The ReadCloser returned by NewReader also implements Resetter.\nfunc NewReaderDict(r io.Reader, dict []byte) io.ReadCloser {\n\treturn NewReaderOpts(r, WithDict(dict))\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/inflate_gen.go",
    "content": "// Code generated by go generate gen_inflate.go. DO NOT EDIT.\n\npackage flate\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"math/bits\"\n\t\"strings\"\n)\n\n// Decode a single Huffman block from f.\n// hl and hd are the Huffman states for the lit/length values\n// and the distance values, respectively. If hd == nil, using the\n// fixed distance encoding associated with fixed Huffman blocks.\nfunc (f *decompressor) huffmanBytesBuffer() {\n\tconst (\n\t\tstateInit = iota // Zero value must be stateInit\n\t\tstateDict\n\t)\n\tfr := f.r.(*bytes.Buffer)\n\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tfnb, fb, dict := f.nb, f.b, &f.dict\n\n\tswitch f.stepState {\n\tcase stateInit:\n\t\tgoto readLiteral\n\tcase stateDict:\n\t\tgoto copyHistory\n\t}\n\nreadLiteral:\n\t// Read literal and/or (length, distance) according to RFC section 3.2.3.\n\t{\n\t\tvar v int\n\t\t{\n\t\t\t// Inlined v, err := f.huffSym(f.hl)\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hl.maxRead)\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hl.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hl.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hl.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tv = int(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar length int\n\t\tswitch {\n\t\tcase v < 256:\n\t\t\tdict.writeByte(byte(v))\n\t\t\tif dict.availWrite() == 0 {\n\t\t\t\tf.toRead = dict.readFlush()\n\t\t\t\tf.step = huffmanBytesBuffer\n\t\t\t\tf.stepState = stateInit\n\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgoto readLiteral\n\t\tcase v == 256:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tf.finishBlock()\n\t\t\treturn\n\t\t// otherwise, reference to older data\n\t\tcase v < 265:\n\t\t\tlength = v - (257 - 3)\n\t\tcase v < maxNumLit:\n\t\t\tval := decCodeToLen[(v - 257)]\n\t\t\tlength = int(val.length) + 3\n\t\t\tn := uint(val.extra)\n\t\t\tfor fnb < n {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits n>0:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tlength += int(fb & bitMask32[n])\n\t\t\tfb >>= n & regSizeMaskUint32\n\t\t\tfnb -= n\n\t\tdefault:\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(v, \">= maxNumLit\")\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\n\t\tvar dist uint32\n\t\tif f.hd == nil {\n\t\t\tfor fnb < 5 {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<5:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tdist = uint32(bits.Reverse8(uint8(fb & 0x1F << 3)))\n\t\t\tfb >>= 5\n\t\t\tfnb -= 5\n\t\t} else {\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hd.maxRead)\n\t\t\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t\t\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t\t\t// inline call to moreBits and reassign b,nb back to f on return.\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hd.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hd.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hd.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tdist = uint32(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch {\n\t\tcase dist < 4:\n\t\t\tdist++\n\t\tcase dist < maxNumDist:\n\t\t\tnb := uint(dist-2) >> 1\n\t\t\t// have 1 bit in bottom of dist, need nb more.\n\t\t\textra := (dist & 1) << (nb & regSizeMaskUint32)\n\t\t\tfor fnb < nb {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<nb:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\textra |= fb & bitMask32[nb]\n\t\t\tfb >>= nb & regSizeMaskUint32\n\t\t\tfnb -= nb\n\t\t\tdist = 1<<((nb+1)&regSizeMaskUint32) + 1 + extra\n\t\t\t// slower: dist = bitMask32[nb+1] + 2 + extra\n\t\tdefault:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist too big:\", dist, maxNumDist)\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\t// No check on length; encoding can be prescient.\n\t\tif dist > uint32(dict.histSize()) {\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist > dict.histSize():\", dist, dict.histSize())\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\tf.copyLen, f.copyDist = length, int(dist)\n\t\tgoto copyHistory\n\t}\n\ncopyHistory:\n\t// Perform a backwards copy according to RFC section 3.2.3.\n\t{\n\t\tcnt := dict.tryWriteCopy(f.copyDist, f.copyLen)\n\t\tif cnt == 0 {\n\t\t\tcnt = dict.writeCopy(f.copyDist, f.copyLen)\n\t\t}\n\t\tf.copyLen -= cnt\n\n\t\tif dict.availWrite() == 0 || f.copyLen > 0 {\n\t\t\tf.toRead = dict.readFlush()\n\t\t\tf.step = huffmanBytesBuffer // We need to continue this work\n\t\t\tf.stepState = stateDict\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\t\tgoto readLiteral\n\t}\n\t// Not reached\n}\n\n// Decode a single Huffman block from f.\n// hl and hd are the Huffman states for the lit/length values\n// and the distance values, respectively. If hd == nil, using the\n// fixed distance encoding associated with fixed Huffman blocks.\nfunc (f *decompressor) huffmanBytesReader() {\n\tconst (\n\t\tstateInit = iota // Zero value must be stateInit\n\t\tstateDict\n\t)\n\tfr := f.r.(*bytes.Reader)\n\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tfnb, fb, dict := f.nb, f.b, &f.dict\n\n\tswitch f.stepState {\n\tcase stateInit:\n\t\tgoto readLiteral\n\tcase stateDict:\n\t\tgoto copyHistory\n\t}\n\nreadLiteral:\n\t// Read literal and/or (length, distance) according to RFC section 3.2.3.\n\t{\n\t\tvar v int\n\t\t{\n\t\t\t// Inlined v, err := f.huffSym(f.hl)\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hl.maxRead)\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hl.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hl.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hl.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tv = int(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar length int\n\t\tswitch {\n\t\tcase v < 256:\n\t\t\tdict.writeByte(byte(v))\n\t\t\tif dict.availWrite() == 0 {\n\t\t\t\tf.toRead = dict.readFlush()\n\t\t\t\tf.step = huffmanBytesReader\n\t\t\t\tf.stepState = stateInit\n\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgoto readLiteral\n\t\tcase v == 256:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tf.finishBlock()\n\t\t\treturn\n\t\t// otherwise, reference to older data\n\t\tcase v < 265:\n\t\t\tlength = v - (257 - 3)\n\t\tcase v < maxNumLit:\n\t\t\tval := decCodeToLen[(v - 257)]\n\t\t\tlength = int(val.length) + 3\n\t\t\tn := uint(val.extra)\n\t\t\tfor fnb < n {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits n>0:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tlength += int(fb & bitMask32[n])\n\t\t\tfb >>= n & regSizeMaskUint32\n\t\t\tfnb -= n\n\t\tdefault:\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(v, \">= maxNumLit\")\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\n\t\tvar dist uint32\n\t\tif f.hd == nil {\n\t\t\tfor fnb < 5 {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<5:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tdist = uint32(bits.Reverse8(uint8(fb & 0x1F << 3)))\n\t\t\tfb >>= 5\n\t\t\tfnb -= 5\n\t\t} else {\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hd.maxRead)\n\t\t\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t\t\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t\t\t// inline call to moreBits and reassign b,nb back to f on return.\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hd.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hd.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hd.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tdist = uint32(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch {\n\t\tcase dist < 4:\n\t\t\tdist++\n\t\tcase dist < maxNumDist:\n\t\t\tnb := uint(dist-2) >> 1\n\t\t\t// have 1 bit in bottom of dist, need nb more.\n\t\t\textra := (dist & 1) << (nb & regSizeMaskUint32)\n\t\t\tfor fnb < nb {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<nb:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\textra |= fb & bitMask32[nb]\n\t\t\tfb >>= nb & regSizeMaskUint32\n\t\t\tfnb -= nb\n\t\t\tdist = 1<<((nb+1)&regSizeMaskUint32) + 1 + extra\n\t\t\t// slower: dist = bitMask32[nb+1] + 2 + extra\n\t\tdefault:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist too big:\", dist, maxNumDist)\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\t// No check on length; encoding can be prescient.\n\t\tif dist > uint32(dict.histSize()) {\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist > dict.histSize():\", dist, dict.histSize())\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\tf.copyLen, f.copyDist = length, int(dist)\n\t\tgoto copyHistory\n\t}\n\ncopyHistory:\n\t// Perform a backwards copy according to RFC section 3.2.3.\n\t{\n\t\tcnt := dict.tryWriteCopy(f.copyDist, f.copyLen)\n\t\tif cnt == 0 {\n\t\t\tcnt = dict.writeCopy(f.copyDist, f.copyLen)\n\t\t}\n\t\tf.copyLen -= cnt\n\n\t\tif dict.availWrite() == 0 || f.copyLen > 0 {\n\t\t\tf.toRead = dict.readFlush()\n\t\t\tf.step = huffmanBytesReader // We need to continue this work\n\t\t\tf.stepState = stateDict\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\t\tgoto readLiteral\n\t}\n\t// Not reached\n}\n\n// Decode a single Huffman block from f.\n// hl and hd are the Huffman states for the lit/length values\n// and the distance values, respectively. If hd == nil, using the\n// fixed distance encoding associated with fixed Huffman blocks.\nfunc (f *decompressor) huffmanBufioReader() {\n\tconst (\n\t\tstateInit = iota // Zero value must be stateInit\n\t\tstateDict\n\t)\n\tfr := f.r.(*bufio.Reader)\n\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tfnb, fb, dict := f.nb, f.b, &f.dict\n\n\tswitch f.stepState {\n\tcase stateInit:\n\t\tgoto readLiteral\n\tcase stateDict:\n\t\tgoto copyHistory\n\t}\n\nreadLiteral:\n\t// Read literal and/or (length, distance) according to RFC section 3.2.3.\n\t{\n\t\tvar v int\n\t\t{\n\t\t\t// Inlined v, err := f.huffSym(f.hl)\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hl.maxRead)\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hl.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hl.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hl.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tv = int(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar length int\n\t\tswitch {\n\t\tcase v < 256:\n\t\t\tdict.writeByte(byte(v))\n\t\t\tif dict.availWrite() == 0 {\n\t\t\t\tf.toRead = dict.readFlush()\n\t\t\t\tf.step = huffmanBufioReader\n\t\t\t\tf.stepState = stateInit\n\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgoto readLiteral\n\t\tcase v == 256:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tf.finishBlock()\n\t\t\treturn\n\t\t// otherwise, reference to older data\n\t\tcase v < 265:\n\t\t\tlength = v - (257 - 3)\n\t\tcase v < maxNumLit:\n\t\t\tval := decCodeToLen[(v - 257)]\n\t\t\tlength = int(val.length) + 3\n\t\t\tn := uint(val.extra)\n\t\t\tfor fnb < n {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits n>0:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tlength += int(fb & bitMask32[n])\n\t\t\tfb >>= n & regSizeMaskUint32\n\t\t\tfnb -= n\n\t\tdefault:\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(v, \">= maxNumLit\")\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\n\t\tvar dist uint32\n\t\tif f.hd == nil {\n\t\t\tfor fnb < 5 {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<5:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tdist = uint32(bits.Reverse8(uint8(fb & 0x1F << 3)))\n\t\t\tfb >>= 5\n\t\t\tfnb -= 5\n\t\t} else {\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hd.maxRead)\n\t\t\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t\t\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t\t\t// inline call to moreBits and reassign b,nb back to f on return.\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hd.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hd.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hd.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tdist = uint32(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch {\n\t\tcase dist < 4:\n\t\t\tdist++\n\t\tcase dist < maxNumDist:\n\t\t\tnb := uint(dist-2) >> 1\n\t\t\t// have 1 bit in bottom of dist, need nb more.\n\t\t\textra := (dist & 1) << (nb & regSizeMaskUint32)\n\t\t\tfor fnb < nb {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<nb:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\textra |= fb & bitMask32[nb]\n\t\t\tfb >>= nb & regSizeMaskUint32\n\t\t\tfnb -= nb\n\t\t\tdist = 1<<((nb+1)&regSizeMaskUint32) + 1 + extra\n\t\t\t// slower: dist = bitMask32[nb+1] + 2 + extra\n\t\tdefault:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist too big:\", dist, maxNumDist)\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\t// No check on length; encoding can be prescient.\n\t\tif dist > uint32(dict.histSize()) {\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist > dict.histSize():\", dist, dict.histSize())\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\tf.copyLen, f.copyDist = length, int(dist)\n\t\tgoto copyHistory\n\t}\n\ncopyHistory:\n\t// Perform a backwards copy according to RFC section 3.2.3.\n\t{\n\t\tcnt := dict.tryWriteCopy(f.copyDist, f.copyLen)\n\t\tif cnt == 0 {\n\t\t\tcnt = dict.writeCopy(f.copyDist, f.copyLen)\n\t\t}\n\t\tf.copyLen -= cnt\n\n\t\tif dict.availWrite() == 0 || f.copyLen > 0 {\n\t\t\tf.toRead = dict.readFlush()\n\t\t\tf.step = huffmanBufioReader // We need to continue this work\n\t\t\tf.stepState = stateDict\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\t\tgoto readLiteral\n\t}\n\t// Not reached\n}\n\n// Decode a single Huffman block from f.\n// hl and hd are the Huffman states for the lit/length values\n// and the distance values, respectively. If hd == nil, using the\n// fixed distance encoding associated with fixed Huffman blocks.\nfunc (f *decompressor) huffmanStringsReader() {\n\tconst (\n\t\tstateInit = iota // Zero value must be stateInit\n\t\tstateDict\n\t)\n\tfr := f.r.(*strings.Reader)\n\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tfnb, fb, dict := f.nb, f.b, &f.dict\n\n\tswitch f.stepState {\n\tcase stateInit:\n\t\tgoto readLiteral\n\tcase stateDict:\n\t\tgoto copyHistory\n\t}\n\nreadLiteral:\n\t// Read literal and/or (length, distance) according to RFC section 3.2.3.\n\t{\n\t\tvar v int\n\t\t{\n\t\t\t// Inlined v, err := f.huffSym(f.hl)\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hl.maxRead)\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hl.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hl.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hl.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tv = int(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar length int\n\t\tswitch {\n\t\tcase v < 256:\n\t\t\tdict.writeByte(byte(v))\n\t\t\tif dict.availWrite() == 0 {\n\t\t\t\tf.toRead = dict.readFlush()\n\t\t\t\tf.step = huffmanStringsReader\n\t\t\t\tf.stepState = stateInit\n\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgoto readLiteral\n\t\tcase v == 256:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tf.finishBlock()\n\t\t\treturn\n\t\t// otherwise, reference to older data\n\t\tcase v < 265:\n\t\t\tlength = v - (257 - 3)\n\t\tcase v < maxNumLit:\n\t\t\tval := decCodeToLen[(v - 257)]\n\t\t\tlength = int(val.length) + 3\n\t\t\tn := uint(val.extra)\n\t\t\tfor fnb < n {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits n>0:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tlength += int(fb & bitMask32[n])\n\t\t\tfb >>= n & regSizeMaskUint32\n\t\t\tfnb -= n\n\t\tdefault:\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(v, \">= maxNumLit\")\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\n\t\tvar dist uint32\n\t\tif f.hd == nil {\n\t\t\tfor fnb < 5 {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<5:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tdist = uint32(bits.Reverse8(uint8(fb & 0x1F << 3)))\n\t\t\tfb >>= 5\n\t\t\tfnb -= 5\n\t\t} else {\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hd.maxRead)\n\t\t\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t\t\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t\t\t// inline call to moreBits and reassign b,nb back to f on return.\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hd.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hd.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hd.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tdist = uint32(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch {\n\t\tcase dist < 4:\n\t\t\tdist++\n\t\tcase dist < maxNumDist:\n\t\t\tnb := uint(dist-2) >> 1\n\t\t\t// have 1 bit in bottom of dist, need nb more.\n\t\t\textra := (dist & 1) << (nb & regSizeMaskUint32)\n\t\t\tfor fnb < nb {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<nb:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\textra |= fb & bitMask32[nb]\n\t\t\tfb >>= nb & regSizeMaskUint32\n\t\t\tfnb -= nb\n\t\t\tdist = 1<<((nb+1)&regSizeMaskUint32) + 1 + extra\n\t\t\t// slower: dist = bitMask32[nb+1] + 2 + extra\n\t\tdefault:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist too big:\", dist, maxNumDist)\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\t// No check on length; encoding can be prescient.\n\t\tif dist > uint32(dict.histSize()) {\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist > dict.histSize():\", dist, dict.histSize())\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\tf.copyLen, f.copyDist = length, int(dist)\n\t\tgoto copyHistory\n\t}\n\ncopyHistory:\n\t// Perform a backwards copy according to RFC section 3.2.3.\n\t{\n\t\tcnt := dict.tryWriteCopy(f.copyDist, f.copyLen)\n\t\tif cnt == 0 {\n\t\t\tcnt = dict.writeCopy(f.copyDist, f.copyLen)\n\t\t}\n\t\tf.copyLen -= cnt\n\n\t\tif dict.availWrite() == 0 || f.copyLen > 0 {\n\t\t\tf.toRead = dict.readFlush()\n\t\t\tf.step = huffmanStringsReader // We need to continue this work\n\t\t\tf.stepState = stateDict\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\t\tgoto readLiteral\n\t}\n\t// Not reached\n}\n\n// Decode a single Huffman block from f.\n// hl and hd are the Huffman states for the lit/length values\n// and the distance values, respectively. If hd == nil, using the\n// fixed distance encoding associated with fixed Huffman blocks.\nfunc (f *decompressor) huffmanGenericReader() {\n\tconst (\n\t\tstateInit = iota // Zero value must be stateInit\n\t\tstateDict\n\t)\n\tfr := f.r.(Reader)\n\n\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t// inline call to moreBits and reassign b,nb back to f on return.\n\tfnb, fb, dict := f.nb, f.b, &f.dict\n\n\tswitch f.stepState {\n\tcase stateInit:\n\t\tgoto readLiteral\n\tcase stateDict:\n\t\tgoto copyHistory\n\t}\n\nreadLiteral:\n\t// Read literal and/or (length, distance) according to RFC section 3.2.3.\n\t{\n\t\tvar v int\n\t\t{\n\t\t\t// Inlined v, err := f.huffSym(f.hl)\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hl.maxRead)\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hl.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hl.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hl.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tv = int(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar length int\n\t\tswitch {\n\t\tcase v < 256:\n\t\t\tdict.writeByte(byte(v))\n\t\t\tif dict.availWrite() == 0 {\n\t\t\t\tf.toRead = dict.readFlush()\n\t\t\t\tf.step = huffmanGenericReader\n\t\t\t\tf.stepState = stateInit\n\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgoto readLiteral\n\t\tcase v == 256:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tf.finishBlock()\n\t\t\treturn\n\t\t// otherwise, reference to older data\n\t\tcase v < 265:\n\t\t\tlength = v - (257 - 3)\n\t\tcase v < maxNumLit:\n\t\t\tval := decCodeToLen[(v - 257)]\n\t\t\tlength = int(val.length) + 3\n\t\t\tn := uint(val.extra)\n\t\t\tfor fnb < n {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits n>0:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tlength += int(fb & bitMask32[n])\n\t\t\tfb >>= n & regSizeMaskUint32\n\t\t\tfnb -= n\n\t\tdefault:\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(v, \">= maxNumLit\")\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\n\t\tvar dist uint32\n\t\tif f.hd == nil {\n\t\t\tfor fnb < 5 {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<5:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\tdist = uint32(bits.Reverse8(uint8(fb & 0x1F << 3)))\n\t\t\tfb >>= 5\n\t\t\tfnb -= 5\n\t\t} else {\n\t\t\t// Since a huffmanDecoder can be empty or be composed of a degenerate tree\n\t\t\t// with single element, huffSym must error on these two edge cases. In both\n\t\t\t// cases, the chunks slice will be 0 for the invalid sequence, leading it\n\t\t\t// satisfy the n == 0 check below.\n\t\t\tn := uint(f.hd.maxRead)\n\t\t\t// Optimization. Compiler isn't smart enough to keep f.b,f.nb in registers,\n\t\t\t// but is smart enough to keep local variables in registers, so use nb and b,\n\t\t\t// inline call to moreBits and reassign b,nb back to f on return.\n\t\t\tfor {\n\t\t\t\tfor fnb < n {\n\t\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tf.err = noEOF(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tf.roffset++\n\t\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\t\tfnb += 8\n\t\t\t\t}\n\t\t\t\tchunk := f.hd.chunks[fb&(huffmanNumChunks-1)]\n\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\tif n > huffmanChunkBits {\n\t\t\t\t\tchunk = f.hd.links[chunk>>huffmanValueShift][(fb>>huffmanChunkBits)&f.hd.linkMask]\n\t\t\t\t\tn = uint(chunk & huffmanCountMask)\n\t\t\t\t}\n\t\t\t\tif n <= fnb {\n\t\t\t\t\tif n == 0 {\n\t\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\t\tfmt.Println(\"huffsym: n==0\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tfb = fb >> (n & regSizeMaskUint32)\n\t\t\t\t\tfnb = fnb - n\n\t\t\t\t\tdist = uint32(chunk >> huffmanValueShift)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch {\n\t\tcase dist < 4:\n\t\t\tdist++\n\t\tcase dist < maxNumDist:\n\t\t\tnb := uint(dist-2) >> 1\n\t\t\t// have 1 bit in bottom of dist, need nb more.\n\t\t\textra := (dist & 1) << (nb & regSizeMaskUint32)\n\t\t\tfor fnb < nb {\n\t\t\t\tc, err := fr.ReadByte()\n\t\t\t\tif err != nil {\n\t\t\t\t\tf.b, f.nb = fb, fnb\n\t\t\t\t\tif debugDecode {\n\t\t\t\t\t\tfmt.Println(\"morebits f.nb<nb:\", err)\n\t\t\t\t\t}\n\t\t\t\t\tf.err = err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tf.roffset++\n\t\t\t\tfb |= uint32(c) << (fnb & regSizeMaskUint32)\n\t\t\t\tfnb += 8\n\t\t\t}\n\t\t\textra |= fb & bitMask32[nb]\n\t\t\tfb >>= nb & regSizeMaskUint32\n\t\t\tfnb -= nb\n\t\t\tdist = 1<<((nb+1)&regSizeMaskUint32) + 1 + extra\n\t\t\t// slower: dist = bitMask32[nb+1] + 2 + extra\n\t\tdefault:\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist too big:\", dist, maxNumDist)\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\t// No check on length; encoding can be prescient.\n\t\tif dist > uint32(dict.histSize()) {\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\tif debugDecode {\n\t\t\t\tfmt.Println(\"dist > dict.histSize():\", dist, dict.histSize())\n\t\t\t}\n\t\t\tf.err = CorruptInputError(f.roffset)\n\t\t\treturn\n\t\t}\n\n\t\tf.copyLen, f.copyDist = length, int(dist)\n\t\tgoto copyHistory\n\t}\n\ncopyHistory:\n\t// Perform a backwards copy according to RFC section 3.2.3.\n\t{\n\t\tcnt := dict.tryWriteCopy(f.copyDist, f.copyLen)\n\t\tif cnt == 0 {\n\t\t\tcnt = dict.writeCopy(f.copyDist, f.copyLen)\n\t\t}\n\t\tf.copyLen -= cnt\n\n\t\tif dict.availWrite() == 0 || f.copyLen > 0 {\n\t\t\tf.toRead = dict.readFlush()\n\t\t\tf.step = huffmanGenericReader // We need to continue this work\n\t\t\tf.stepState = stateDict\n\t\t\tf.b, f.nb = fb, fnb\n\t\t\treturn\n\t\t}\n\t\tgoto readLiteral\n\t}\n\t// Not reached\n}\n\nfunc (f *decompressor) huffmanBlockDecoder() {\n\tswitch f.r.(type) {\n\tcase *bytes.Buffer:\n\t\tf.huffmanBytesBuffer()\n\tcase *bytes.Reader:\n\t\tf.huffmanBytesReader()\n\tcase *bufio.Reader:\n\t\tf.huffmanBufioReader()\n\tcase *strings.Reader:\n\t\tf.huffmanStringsReader()\n\tcase Reader:\n\t\tf.huffmanGenericReader()\n\tdefault:\n\t\tf.huffmanGenericReader()\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level1.go",
    "content": "package flate\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// fastGen maintains the table for matches,\n// and the previous byte block for level 2.\n// This is the generic implementation.\ntype fastEncL1 struct {\n\tfastGen\n\ttable [tableSize]tableEntry\n}\n\n// EncodeL1 uses a similar algorithm to level 1\nfunc (e *fastEncL1) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashBytes              = 5\n\t)\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\n\tfor {\n\t\tconst skipLog = 5\n\t\tconst doEvery = 2\n\n\t\tnextS := s\n\t\tvar candidate tableEntry\n\t\tvar t int32\n\t\tfor {\n\t\t\tnextHash := hashLen(cv, tableBits, hashBytes)\n\t\t\tcandidate = e.table[nextHash]\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\tnow := load6432(src, nextS)\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur}\n\t\t\tnextHash = hashLen(now, tableBits, hashBytes)\n\t\t\tt = candidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\te.table[nextHash] = tableEntry{offset: nextS + e.cur}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Do one right away...\n\t\t\tcv = now\n\t\t\ts = nextS\n\t\t\tnextS++\n\t\t\tcandidate = e.table[nextHash]\n\t\t\tnow >>= 8\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur}\n\n\t\t\tt = candidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\te.table[nextHash] = tableEntry{offset: nextS + e.cur}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = now\n\t\t\ts = nextS\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\t\tfor {\n\t\t\t// Invariant: we have a 4-byte match at s, and no need to emit any\n\t\t\t// literal bytes prior to s.\n\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\tl := e.matchlenLong(int(s+4), int(t+4), src) + 4\n\n\t\t\t// Extend backwards\n\t\t\tfor t > 0 && s > nextEmit && le.Load8(src, t-1) == le.Load8(src, s-1) {\n\t\t\t\ts--\n\t\t\t\tt--\n\t\t\t\tl++\n\t\t\t}\n\t\t\tif nextEmit < s {\n\t\t\t\tif false {\n\t\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t\t} else {\n\t\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\t\tdst.n++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save the match found\n\t\t\tif false {\n\t\t\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\t\t} else {\n\t\t\t\t// Inlined...\n\t\t\t\txoffset := uint32(s - t - baseMatchOffset)\n\t\t\t\txlength := l\n\t\t\t\toc := offsetCode(xoffset)\n\t\t\t\txoffset |= oc << 16\n\t\t\t\tfor xlength > 0 {\n\t\t\t\t\txl := xlength\n\t\t\t\t\tif xl > 258 {\n\t\t\t\t\t\tif xl > 258+baseMatchLength {\n\t\t\t\t\t\t\txl = 258\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txl = 258 - baseMatchLength\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\txlength -= xl\n\t\t\t\t\txl -= baseMatchLength\n\t\t\t\t\tdst.extraHist[lengthCodes1[uint8(xl)]]++\n\t\t\t\t\tdst.offHist[oc]++\n\t\t\t\t\tdst.tokens[dst.n] = token(matchType | uint32(xl)<<lengthShift | xoffset)\n\t\t\t\t\tdst.n++\n\t\t\t\t}\n\t\t\t}\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif nextS >= s {\n\t\t\t\ts = nextS + 1\n\t\t\t}\n\t\t\tif s >= sLimit {\n\t\t\t\t// Index first pair after match end.\n\t\t\t\tif int(s+l+8) < len(src) {\n\t\t\t\t\tcv := load6432(src, s)\n\t\t\t\t\te.table[hashLen(cv, tableBits, hashBytes)] = tableEntry{offset: s + e.cur}\n\t\t\t\t}\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\t// We could immediately start working at s now, but to improve\n\t\t\t// compression we first update the hash table at s-2 and at s. If\n\t\t\t// another emitCopy is not our next move, also calculate nextHash\n\t\t\t// at s+1. At least on GOARCH=amd64, these three hash calculations\n\t\t\t// are faster as one load64 call (with some shifts) instead of\n\t\t\t// three load32 calls.\n\t\t\tx := load6432(src, s-2)\n\t\t\to := e.cur + s - 2\n\t\t\tprevHash := hashLen(x, tableBits, hashBytes)\n\t\t\te.table[prevHash] = tableEntry{offset: o}\n\t\t\tx >>= 16\n\t\t\tcurrHash := hashLen(x, tableBits, hashBytes)\n\t\t\tcandidate = e.table[currHash]\n\t\t\te.table[currHash] = tableEntry{offset: o + 2}\n\n\t\t\tt = candidate.offset - e.cur\n\t\t\tif s-t > maxMatchOffset || uint32(x) != load3232(src, t) {\n\t\t\t\tcv = x >> 8\n\t\t\t\ts++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level2.go",
    "content": "package flate\n\nimport \"fmt\"\n\n// fastGen maintains the table for matches,\n// and the previous byte block for level 2.\n// This is the generic implementation.\ntype fastEncL2 struct {\n\tfastGen\n\ttable [bTableSize]tableEntry\n}\n\n// EncodeL2 uses a similar algorithm to level 1, but is capable\n// of matching across blocks giving better compression at a small slowdown.\nfunc (e *fastEncL2) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashBytes              = 5\n\t)\n\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\tfor {\n\t\t// When should we start skipping if we haven't found matches in a long while.\n\t\tconst skipLog = 5\n\t\tconst doEvery = 2\n\n\t\tnextS := s\n\t\tvar candidate tableEntry\n\t\tfor {\n\t\t\tnextHash := hashLen(cv, bTableBits, hashBytes)\n\t\t\ts = nextS\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\tcandidate = e.table[nextHash]\n\t\t\tnow := load6432(src, nextS)\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur}\n\t\t\tnextHash = hashLen(now, bTableBits, hashBytes)\n\n\t\t\toffset := s - (candidate.offset - e.cur)\n\t\t\tif offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\te.table[nextHash] = tableEntry{offset: nextS + e.cur}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Do one right away...\n\t\t\tcv = now\n\t\t\ts = nextS\n\t\t\tnextS++\n\t\t\tcandidate = e.table[nextHash]\n\t\t\tnow >>= 8\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur}\n\n\t\t\toffset = s - (candidate.offset - e.cur)\n\t\t\tif offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = now\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\n\t\t// Call emitCopy, and then see if another emitCopy could be our next\n\t\t// move. Repeat until we find no match for the input immediately after\n\t\t// what was consumed by the last emitCopy call.\n\t\t//\n\t\t// If we exit this loop normally then we need to call emitLiteral next,\n\t\t// though we don't yet know how big the literal will be. We handle that\n\t\t// by proceeding to the next iteration of the main loop. We also can\n\t\t// exit this loop via goto if we get close to exhausting the input.\n\t\tfor {\n\t\t\t// Invariant: we have a 4-byte match at s, and no need to emit any\n\t\t\t// literal bytes prior to s.\n\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\tt := candidate.offset - e.cur\n\t\t\tl := e.matchlenLong(int(s+4), int(t+4), src) + 4\n\n\t\t\t// Extend backwards\n\t\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\t\ts--\n\t\t\t\tt--\n\t\t\t\tl++\n\t\t\t}\n\t\t\tif nextEmit < s {\n\t\t\t\tif false {\n\t\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t\t} else {\n\t\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\t\tdst.n++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif nextS >= s {\n\t\t\t\ts = nextS + 1\n\t\t\t}\n\n\t\t\tif s >= sLimit {\n\t\t\t\t// Index first pair after match end.\n\t\t\t\tif int(s+l+8) < len(src) {\n\t\t\t\t\tcv := load6432(src, s)\n\t\t\t\t\te.table[hashLen(cv, bTableBits, hashBytes)] = tableEntry{offset: s + e.cur}\n\t\t\t\t}\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\t// Store every second hash in-between, but offset by 1.\n\t\t\tfor i := s - l + 2; i < s-5; i += 7 {\n\t\t\t\tx := load6432(src, i)\n\t\t\t\tnextHash := hashLen(x, bTableBits, hashBytes)\n\t\t\t\te.table[nextHash] = tableEntry{offset: e.cur + i}\n\t\t\t\t// Skip one\n\t\t\t\tx >>= 16\n\t\t\t\tnextHash = hashLen(x, bTableBits, hashBytes)\n\t\t\t\te.table[nextHash] = tableEntry{offset: e.cur + i + 2}\n\t\t\t\t// Skip one\n\t\t\t\tx >>= 16\n\t\t\t\tnextHash = hashLen(x, bTableBits, hashBytes)\n\t\t\t\te.table[nextHash] = tableEntry{offset: e.cur + i + 4}\n\t\t\t}\n\n\t\t\t// We could immediately start working at s now, but to improve\n\t\t\t// compression we first update the hash table at s-2 to s. If\n\t\t\t// another emitCopy is not our next move, also calculate nextHash\n\t\t\t// at s+1. At least on GOARCH=amd64, these three hash calculations\n\t\t\t// are faster as one load64 call (with some shifts) instead of\n\t\t\t// three load32 calls.\n\t\t\tx := load6432(src, s-2)\n\t\t\to := e.cur + s - 2\n\t\t\tprevHash := hashLen(x, bTableBits, hashBytes)\n\t\t\tprevHash2 := hashLen(x>>8, bTableBits, hashBytes)\n\t\t\te.table[prevHash] = tableEntry{offset: o}\n\t\t\te.table[prevHash2] = tableEntry{offset: o + 1}\n\t\t\tcurrHash := hashLen(x>>16, bTableBits, hashBytes)\n\t\t\tcandidate = e.table[currHash]\n\t\t\te.table[currHash] = tableEntry{offset: o + 2}\n\n\t\t\toffset := s - (candidate.offset - e.cur)\n\t\t\tif offset > maxMatchOffset || uint32(x>>16) != load3232(src, candidate.offset-e.cur) {\n\t\t\t\tcv = x >> 24\n\t\t\t\ts++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level3.go",
    "content": "package flate\n\nimport \"fmt\"\n\n// fastEncL3\ntype fastEncL3 struct {\n\tfastGen\n\ttable [1 << 16]tableEntryPrev\n}\n\n// Encode uses a similar algorithm to level 2, will check up to two candidates.\nfunc (e *fastEncL3) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\ttableBits              = 16\n\t\ttableSize              = 1 << tableBits\n\t\thashBytes              = 5\n\t)\n\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntryPrev{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i]\n\t\t\tif v.Cur.offset <= minOff {\n\t\t\t\tv.Cur.offset = 0\n\t\t\t} else {\n\t\t\t\tv.Cur.offset = v.Cur.offset - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\tif v.Prev.offset <= minOff {\n\t\t\t\tv.Prev.offset = 0\n\t\t\t} else {\n\t\t\t\tv.Prev.offset = v.Prev.offset - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i] = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// Skip if too small.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\tfor {\n\t\tconst skipLog = 7\n\t\tnextS := s\n\t\tvar candidate tableEntry\n\t\tfor {\n\t\t\tnextHash := hashLen(cv, tableBits, hashBytes)\n\t\t\ts = nextS\n\t\t\tnextS = s + 1 + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\tcandidates := e.table[nextHash]\n\t\t\tnow := load6432(src, nextS)\n\n\t\t\t// Safe offset distance until s + 4...\n\t\t\tminOffset := e.cur + s - (maxMatchOffset - 4)\n\t\t\te.table[nextHash] = tableEntryPrev{Prev: candidates.Cur, Cur: tableEntry{offset: s + e.cur}}\n\n\t\t\t// Check both candidates\n\t\t\tcandidate = candidates.Cur\n\t\t\tif candidate.offset < minOffset {\n\t\t\t\tcv = now\n\t\t\t\t// Previous will also be invalid, we have nothing.\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\tif candidates.Prev.offset < minOffset || uint32(cv) != load3232(src, candidates.Prev.offset-e.cur) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// Both match and are valid, pick longest.\n\t\t\t\toffset := s - (candidate.offset - e.cur)\n\t\t\t\to2 := s - (candidates.Prev.offset - e.cur)\n\t\t\t\tl1, l2 := matchLen(src[s+4:], src[s-offset+4:]), matchLen(src[s+4:], src[s-o2+4:])\n\t\t\t\tif l2 > l1 {\n\t\t\t\t\tcandidate = candidates.Prev\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t} else {\n\t\t\t\t// We only check if value mismatches.\n\t\t\t\t// Offset will always be invalid in other cases.\n\t\t\t\tcandidate = candidates.Prev\n\t\t\t\tif candidate.offset > minOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tcv = now\n\t\t}\n\n\t\t// Call emitCopy, and then see if another emitCopy could be our next\n\t\t// move. Repeat until we find no match for the input immediately after\n\t\t// what was consumed by the last emitCopy call.\n\t\t//\n\t\t// If we exit this loop normally then we need to call emitLiteral next,\n\t\t// though we don't yet know how big the literal will be. We handle that\n\t\t// by proceeding to the next iteration of the main loop. We also can\n\t\t// exit this loop via goto if we get close to exhausting the input.\n\t\tfor {\n\t\t\t// Invariant: we have a 4-byte match at s, and no need to emit any\n\t\t\t// literal bytes prior to s.\n\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\t//\n\t\t\tt := candidate.offset - e.cur\n\t\t\tl := e.matchlenLong(int(s+4), int(t+4), src) + 4\n\n\t\t\t// Extend backwards\n\t\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\t\ts--\n\t\t\t\tt--\n\t\t\t\tl++\n\t\t\t}\n\t\t\tif nextEmit < s {\n\t\t\t\tif false {\n\t\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t\t} else {\n\t\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\t\tdst.n++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif nextS >= s {\n\t\t\t\ts = nextS + 1\n\t\t\t}\n\n\t\t\tif s >= sLimit {\n\t\t\t\tt += l\n\t\t\t\t// Index first pair after match end.\n\t\t\t\tif int(t+8) < len(src) && t > 0 {\n\t\t\t\t\tcv = load6432(src, t)\n\t\t\t\t\tnextHash := hashLen(cv, tableBits, hashBytes)\n\t\t\t\t\te.table[nextHash] = tableEntryPrev{\n\t\t\t\t\t\tPrev: e.table[nextHash].Cur,\n\t\t\t\t\t\tCur:  tableEntry{offset: e.cur + t},\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\t// Store every 5th hash in-between.\n\t\t\tfor i := s - l + 2; i < s-5; i += 6 {\n\t\t\t\tnextHash := hashLen(load6432(src, i), tableBits, hashBytes)\n\t\t\t\te.table[nextHash] = tableEntryPrev{\n\t\t\t\t\tPrev: e.table[nextHash].Cur,\n\t\t\t\t\tCur:  tableEntry{offset: e.cur + i}}\n\t\t\t}\n\t\t\t// We could immediately start working at s now, but to improve\n\t\t\t// compression we first update the hash table at s-2 to s.\n\t\t\tx := load6432(src, s-2)\n\t\t\tprevHash := hashLen(x, tableBits, hashBytes)\n\n\t\t\te.table[prevHash] = tableEntryPrev{\n\t\t\t\tPrev: e.table[prevHash].Cur,\n\t\t\t\tCur:  tableEntry{offset: e.cur + s - 2},\n\t\t\t}\n\t\t\tx >>= 8\n\t\t\tprevHash = hashLen(x, tableBits, hashBytes)\n\n\t\t\te.table[prevHash] = tableEntryPrev{\n\t\t\t\tPrev: e.table[prevHash].Cur,\n\t\t\t\tCur:  tableEntry{offset: e.cur + s - 1},\n\t\t\t}\n\t\t\tx >>= 8\n\t\t\tcurrHash := hashLen(x, tableBits, hashBytes)\n\t\t\tcandidates := e.table[currHash]\n\t\t\tcv = x\n\t\t\te.table[currHash] = tableEntryPrev{\n\t\t\t\tPrev: candidates.Cur,\n\t\t\t\tCur:  tableEntry{offset: s + e.cur},\n\t\t\t}\n\n\t\t\t// Check both candidates\n\t\t\tcandidate = candidates.Cur\n\t\t\tminOffset := e.cur + s - (maxMatchOffset - 4)\n\n\t\t\tif candidate.offset > minOffset {\n\t\t\t\tif uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\t\t// Found a match...\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tcandidate = candidates.Prev\n\t\t\t\tif candidate.offset > minOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {\n\t\t\t\t\t// Match at prev...\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tcv = x >> 8\n\t\t\ts++\n\t\t\tbreak\n\t\t}\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level4.go",
    "content": "package flate\n\nimport \"fmt\"\n\ntype fastEncL4 struct {\n\tfastGen\n\ttable  [tableSize]tableEntry\n\tbTable [tableSize]tableEntry\n}\n\nfunc (e *fastEncL4) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashShortBytes         = 4\n\t)\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.bTable[:] {\n\t\t\t\te.bTable[i] = tableEntry{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.bTable[:] {\n\t\t\tv := e.bTable[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.bTable[i].offset = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\tfor {\n\t\tconst skipLog = 6\n\t\tconst doEvery = 1\n\n\t\tnextS := s\n\t\tvar t int32\n\t\tfor {\n\t\t\tnextHashS := hashLen(cv, tableBits, hashShortBytes)\n\t\t\tnextHashL := hash7(cv, tableBits)\n\n\t\t\ts = nextS\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\t// Fetch a short+long candidate\n\t\t\tsCandidate := e.table[nextHashS]\n\t\t\tlCandidate := e.bTable[nextHashL]\n\t\t\tnext := load6432(src, nextS)\n\t\t\tentry := tableEntry{offset: s + e.cur}\n\t\t\te.table[nextHashS] = entry\n\t\t\te.bTable[nextHashL] = entry\n\n\t\t\tt = lCandidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t// We got a long match. Use that.\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tt = sCandidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t// Found a 4 match...\n\t\t\t\tlCandidate = e.bTable[hash7(next, tableBits)]\n\n\t\t\t\t// If the next long is a candidate, check if we should use that instead...\n\t\t\t\tlOff := lCandidate.offset - e.cur\n\t\t\t\tif nextS-lOff < maxMatchOffset && load3232(src, lOff) == uint32(next) {\n\t\t\t\t\tl1, l2 := matchLen(src[s+4:], src[t+4:]), matchLen(src[nextS+4:], src[nextS-lOff+4:])\n\t\t\t\t\tif l2 > l1 {\n\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\tt = lCandidate.offset - e.cur\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = next\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlenLong(int(s+4), int(t+4), src) + 4\n\n\t\t// Extend backwards\n\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\t\tif nextEmit < s {\n\t\t\tif false {\n\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t} else {\n\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\tdst.n++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif debugDeflate {\n\t\t\tif t >= s {\n\t\t\t\tpanic(\"s-t\")\n\t\t\t}\n\t\t\tif (s - t) > maxMatchOffset {\n\t\t\t\tpanic(fmt.Sprintln(\"mmo\", t))\n\t\t\t}\n\t\t\tif l < baseMatchLength {\n\t\t\t\tpanic(\"bml\")\n\t\t\t}\n\t\t}\n\n\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\ts += l\n\t\tnextEmit = s\n\t\tif nextS >= s {\n\t\t\ts = nextS + 1\n\t\t}\n\n\t\tif s >= sLimit {\n\t\t\t// Index first pair after match end.\n\t\t\tif int(s+8) < len(src) {\n\t\t\t\tcv := load6432(src, s)\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = tableEntry{offset: s + e.cur}\n\t\t\t\te.bTable[hash7(cv, tableBits)] = tableEntry{offset: s + e.cur}\n\t\t\t}\n\t\t\tgoto emitRemainder\n\t\t}\n\n\t\t// Store every 3rd hash in-between\n\t\tif true {\n\t\t\ti := nextS\n\t\t\tif i < s-1 {\n\t\t\t\tcv := load6432(src, i)\n\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\tt2 := tableEntry{offset: t.offset + 1}\n\t\t\t\te.bTable[hash7(cv, tableBits)] = t\n\t\t\t\te.bTable[hash7(cv>>8, tableBits)] = t2\n\t\t\t\te.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2\n\n\t\t\t\ti += 3\n\t\t\t\tfor ; i < s-1; i += 3 {\n\t\t\t\t\tcv := load6432(src, i)\n\t\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\t\tt2 := tableEntry{offset: t.offset + 1}\n\t\t\t\t\te.bTable[hash7(cv, tableBits)] = t\n\t\t\t\t\te.bTable[hash7(cv>>8, tableBits)] = t2\n\t\t\t\t\te.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// We could immediately start working at s now, but to improve\n\t\t// compression we first update the hash table at s-1 and at s.\n\t\tx := load6432(src, s-1)\n\t\to := e.cur + s - 1\n\t\tprevHashS := hashLen(x, tableBits, hashShortBytes)\n\t\tprevHashL := hash7(x, tableBits)\n\t\te.table[prevHashS] = tableEntry{offset: o}\n\t\te.bTable[prevHashL] = tableEntry{offset: o}\n\t\tcv = x >> 8\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level5.go",
    "content": "package flate\n\nimport \"fmt\"\n\ntype fastEncL5 struct {\n\tfastGen\n\ttable  [tableSize]tableEntry\n\tbTable [tableSize]tableEntryPrev\n}\n\nfunc (e *fastEncL5) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashShortBytes         = 4\n\t)\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.bTable[:] {\n\t\t\t\te.bTable[i] = tableEntryPrev{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.bTable[:] {\n\t\t\tv := e.bTable[i]\n\t\t\tif v.Cur.offset <= minOff {\n\t\t\t\tv.Cur.offset = 0\n\t\t\t\tv.Prev.offset = 0\n\t\t\t} else {\n\t\t\t\tv.Cur.offset = v.Cur.offset - e.cur + maxMatchOffset\n\t\t\t\tif v.Prev.offset <= minOff {\n\t\t\t\t\tv.Prev.offset = 0\n\t\t\t\t} else {\n\t\t\t\t\tv.Prev.offset = v.Prev.offset - e.cur + maxMatchOffset\n\t\t\t\t}\n\t\t\t}\n\t\t\te.bTable[i] = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\tfor {\n\t\tconst skipLog = 6\n\t\tconst doEvery = 1\n\n\t\tnextS := s\n\t\tvar l int32\n\t\tvar t int32\n\t\tfor {\n\t\t\tnextHashS := hashLen(cv, tableBits, hashShortBytes)\n\t\t\tnextHashL := hash7(cv, tableBits)\n\n\t\t\ts = nextS\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\t// Fetch a short+long candidate\n\t\t\tsCandidate := e.table[nextHashS]\n\t\t\tlCandidate := e.bTable[nextHashL]\n\t\t\tnext := load6432(src, nextS)\n\t\t\tentry := tableEntry{offset: s + e.cur}\n\t\t\te.table[nextHashS] = entry\n\t\t\teLong := &e.bTable[nextHashL]\n\t\t\teLong.Cur, eLong.Prev = entry, eLong.Cur\n\n\t\t\tnextHashS = hashLen(next, tableBits, hashShortBytes)\n\t\t\tnextHashL = hash7(next, tableBits)\n\n\t\t\tt = lCandidate.Cur.offset - e.cur\n\t\t\tif s-t < maxMatchOffset {\n\t\t\t\tif uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t\tt2 := lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif s-t2 < maxMatchOffset && uint32(cv) == load3232(src, t2) {\n\t\t\t\t\t\tl = e.matchlen(int(s+4), int(t+4), src) + 4\n\t\t\t\t\t\tml1 := e.matchlen(int(s+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml1 > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\tl = ml1\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tt = lCandidate.Prev.offset - e.cur\n\t\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tt = sCandidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t// Found a 4 match...\n\t\t\t\tl = e.matchlen(int(s+4), int(t+4), src) + 4\n\t\t\t\tlCandidate = e.bTable[nextHashL]\n\t\t\t\t// Store the next match\n\n\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t// If the next long is a candidate, use that...\n\t\t\t\tt2 := lCandidate.Cur.offset - e.cur\n\t\t\t\tif nextS-t2 < maxMatchOffset {\n\t\t\t\t\tif load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(int(nextS+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the previous long is a candidate, use that...\n\t\t\t\t\tt2 = lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif nextS-t2 < maxMatchOffset && load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(int(nextS+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = next\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\n\t\tif l == 0 {\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\tl = e.matchlenLong(int(s+4), int(t+4), src) + 4\n\t\t} else if l == maxMatchLength {\n\t\t\tl += e.matchlenLong(int(s+l), int(t+l), src)\n\t\t}\n\n\t\t// Try to locate a better match by checking the end of best match...\n\t\tif sAt := s + l; l < 30 && sAt < sLimit {\n\t\t\t// Allow some bytes at the beginning to mismatch.\n\t\t\t// Sweet spot is 2/3 bytes depending on input.\n\t\t\t// 3 is only a little better when it is but sometimes a lot worse.\n\t\t\t// The skipped bytes are tested in Extend backwards,\n\t\t\t// and still picked up as part of the match if they do.\n\t\t\tconst skipBeginning = 2\n\t\t\teLong := e.bTable[hash7(load6432(src, sAt), tableBits)].Cur.offset\n\t\t\tt2 := eLong - e.cur - l + skipBeginning\n\t\t\ts2 := s + skipBeginning\n\t\t\toff := s2 - t2\n\t\t\tif t2 >= 0 && off < maxMatchOffset && off > 0 {\n\t\t\t\tif l2 := e.matchlenLong(int(s2), int(t2), src); l2 > l {\n\t\t\t\t\tt = t2\n\t\t\t\t\tl = l2\n\t\t\t\t\ts = s2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Extend backwards\n\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\t\tif nextEmit < s {\n\t\t\tif false {\n\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t} else {\n\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\tdst.n++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif debugDeflate {\n\t\t\tif t >= s {\n\t\t\t\tpanic(fmt.Sprintln(\"s-t\", s, t))\n\t\t\t}\n\t\t\tif (s - t) > maxMatchOffset {\n\t\t\t\tpanic(fmt.Sprintln(\"mmo\", s-t))\n\t\t\t}\n\t\t\tif l < baseMatchLength {\n\t\t\t\tpanic(\"bml\")\n\t\t\t}\n\t\t}\n\n\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\ts += l\n\t\tnextEmit = s\n\t\tif nextS >= s {\n\t\t\ts = nextS + 1\n\t\t}\n\n\t\tif s >= sLimit {\n\t\t\tgoto emitRemainder\n\t\t}\n\n\t\t// Store every 3rd hash in-between.\n\t\tif true {\n\t\t\tconst hashEvery = 3\n\t\t\ti := s - l + 1\n\t\t\tif i < s-1 {\n\t\t\t\tcv := load6432(src, i)\n\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = t\n\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\n\t\t\t\t// Do an long at i+1\n\t\t\t\tcv >>= 8\n\t\t\t\tt = tableEntry{offset: t.offset + 1}\n\t\t\t\teLong = &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\n\t\t\t\t// We only have enough bits for a short entry at i+2\n\t\t\t\tcv >>= 8\n\t\t\t\tt = tableEntry{offset: t.offset + 1}\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = t\n\n\t\t\t\t// Skip one - otherwise we risk hitting 's'\n\t\t\t\ti += 4\n\t\t\t\tfor ; i < s-1; i += hashEvery {\n\t\t\t\t\tcv := load6432(src, i)\n\t\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\t\tt2 := tableEntry{offset: t.offset + 1}\n\t\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\t\t\t\t\te.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// We could immediately start working at s now, but to improve\n\t\t// compression we first update the hash table at s-1 and at s.\n\t\tx := load6432(src, s-1)\n\t\to := e.cur + s - 1\n\t\tprevHashS := hashLen(x, tableBits, hashShortBytes)\n\t\tprevHashL := hash7(x, tableBits)\n\t\te.table[prevHashS] = tableEntry{offset: o}\n\t\teLong := &e.bTable[prevHashL]\n\t\teLong.Cur, eLong.Prev = tableEntry{offset: o}, eLong.Cur\n\t\tcv = x >> 8\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n\n// fastEncL5Window is a level 5 encoder,\n// but with a custom window size.\ntype fastEncL5Window struct {\n\thist      []byte\n\tcur       int32\n\tmaxOffset int32\n\ttable     [tableSize]tableEntry\n\tbTable    [tableSize]tableEntryPrev\n}\n\nfunc (e *fastEncL5Window) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashShortBytes         = 4\n\t)\n\tmaxMatchOffset := e.maxOffset\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.bTable[:] {\n\t\t\t\te.bTable[i] = tableEntryPrev{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.bTable[:] {\n\t\t\tv := e.bTable[i]\n\t\t\tif v.Cur.offset <= minOff {\n\t\t\t\tv.Cur.offset = 0\n\t\t\t\tv.Prev.offset = 0\n\t\t\t} else {\n\t\t\t\tv.Cur.offset = v.Cur.offset - e.cur + maxMatchOffset\n\t\t\t\tif v.Prev.offset <= minOff {\n\t\t\t\t\tv.Prev.offset = 0\n\t\t\t\t} else {\n\t\t\t\t\tv.Prev.offset = v.Prev.offset - e.cur + maxMatchOffset\n\t\t\t\t}\n\t\t\t}\n\t\t\te.bTable[i] = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\tfor {\n\t\tconst skipLog = 6\n\t\tconst doEvery = 1\n\n\t\tnextS := s\n\t\tvar l int32\n\t\tvar t int32\n\t\tfor {\n\t\t\tnextHashS := hashLen(cv, tableBits, hashShortBytes)\n\t\t\tnextHashL := hash7(cv, tableBits)\n\n\t\t\ts = nextS\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\t// Fetch a short+long candidate\n\t\t\tsCandidate := e.table[nextHashS]\n\t\t\tlCandidate := e.bTable[nextHashL]\n\t\t\tnext := load6432(src, nextS)\n\t\t\tentry := tableEntry{offset: s + e.cur}\n\t\t\te.table[nextHashS] = entry\n\t\t\teLong := &e.bTable[nextHashL]\n\t\t\teLong.Cur, eLong.Prev = entry, eLong.Cur\n\n\t\t\tnextHashS = hashLen(next, tableBits, hashShortBytes)\n\t\t\tnextHashL = hash7(next, tableBits)\n\n\t\t\tt = lCandidate.Cur.offset - e.cur\n\t\t\tif s-t < maxMatchOffset {\n\t\t\t\tif uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t\tt2 := lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif s-t2 < maxMatchOffset && uint32(cv) == load3232(src, t2) {\n\t\t\t\t\t\tl = e.matchlen(s+4, t+4, src) + 4\n\t\t\t\t\t\tml1 := e.matchlen(s+4, t2+4, src) + 4\n\t\t\t\t\t\tif ml1 > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\tl = ml1\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tt = lCandidate.Prev.offset - e.cur\n\t\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tt = sCandidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t// Found a 4 match...\n\t\t\t\tl = e.matchlen(s+4, t+4, src) + 4\n\t\t\t\tlCandidate = e.bTable[nextHashL]\n\t\t\t\t// Store the next match\n\n\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t// If the next long is a candidate, use that...\n\t\t\t\tt2 := lCandidate.Cur.offset - e.cur\n\t\t\t\tif nextS-t2 < maxMatchOffset {\n\t\t\t\t\tif load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(nextS+4, t2+4, src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the previous long is a candidate, use that...\n\t\t\t\t\tt2 = lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif nextS-t2 < maxMatchOffset && load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(nextS+4, t2+4, src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = next\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\n\t\tif l == 0 {\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\tl = e.matchlenLong(s+4, t+4, src) + 4\n\t\t} else if l == maxMatchLength {\n\t\t\tl += e.matchlenLong(s+l, t+l, src)\n\t\t}\n\n\t\t// Try to locate a better match by checking the end of best match...\n\t\tif sAt := s + l; l < 30 && sAt < sLimit {\n\t\t\t// Allow some bytes at the beginning to mismatch.\n\t\t\t// Sweet spot is 2/3 bytes depending on input.\n\t\t\t// 3 is only a little better when it is but sometimes a lot worse.\n\t\t\t// The skipped bytes are tested in Extend backwards,\n\t\t\t// and still picked up as part of the match if they do.\n\t\t\tconst skipBeginning = 2\n\t\t\teLong := e.bTable[hash7(load6432(src, sAt), tableBits)].Cur.offset\n\t\t\tt2 := eLong - e.cur - l + skipBeginning\n\t\t\ts2 := s + skipBeginning\n\t\t\toff := s2 - t2\n\t\t\tif t2 >= 0 && off < maxMatchOffset && off > 0 {\n\t\t\t\tif l2 := e.matchlenLong(s2, t2, src); l2 > l {\n\t\t\t\t\tt = t2\n\t\t\t\t\tl = l2\n\t\t\t\t\ts = s2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Extend backwards\n\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\t\tif nextEmit < s {\n\t\t\tif false {\n\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t} else {\n\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\tdst.n++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif debugDeflate {\n\t\t\tif t >= s {\n\t\t\t\tpanic(fmt.Sprintln(\"s-t\", s, t))\n\t\t\t}\n\t\t\tif (s - t) > maxMatchOffset {\n\t\t\t\tpanic(fmt.Sprintln(\"mmo\", s-t))\n\t\t\t}\n\t\t\tif l < baseMatchLength {\n\t\t\t\tpanic(\"bml\")\n\t\t\t}\n\t\t}\n\n\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\ts += l\n\t\tnextEmit = s\n\t\tif nextS >= s {\n\t\t\ts = nextS + 1\n\t\t}\n\n\t\tif s >= sLimit {\n\t\t\tgoto emitRemainder\n\t\t}\n\n\t\t// Store every 3rd hash in-between.\n\t\tif true {\n\t\t\tconst hashEvery = 3\n\t\t\ti := s - l + 1\n\t\t\tif i < s-1 {\n\t\t\t\tcv := load6432(src, i)\n\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = t\n\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\n\t\t\t\t// Do an long at i+1\n\t\t\t\tcv >>= 8\n\t\t\t\tt = tableEntry{offset: t.offset + 1}\n\t\t\t\teLong = &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\n\t\t\t\t// We only have enough bits for a short entry at i+2\n\t\t\t\tcv >>= 8\n\t\t\t\tt = tableEntry{offset: t.offset + 1}\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = t\n\n\t\t\t\t// Skip one - otherwise we risk hitting 's'\n\t\t\t\ti += 4\n\t\t\t\tfor ; i < s-1; i += hashEvery {\n\t\t\t\t\tcv := load6432(src, i)\n\t\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\t\tt2 := tableEntry{offset: t.offset + 1}\n\t\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\t\t\t\t\te.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// We could immediately start working at s now, but to improve\n\t\t// compression we first update the hash table at s-1 and at s.\n\t\tx := load6432(src, s-1)\n\t\to := e.cur + s - 1\n\t\tprevHashS := hashLen(x, tableBits, hashShortBytes)\n\t\tprevHashL := hash7(x, tableBits)\n\t\te.table[prevHashS] = tableEntry{offset: o}\n\t\teLong := &e.bTable[prevHashL]\n\t\teLong.Cur, eLong.Prev = tableEntry{offset: o}, eLong.Cur\n\t\tcv = x >> 8\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n\n// Reset the encoding table.\nfunc (e *fastEncL5Window) Reset() {\n\t// We keep the same allocs, since we are compressing the same block sizes.\n\tif cap(e.hist) < allocHistory {\n\t\te.hist = make([]byte, 0, allocHistory)\n\t}\n\n\t// We offset current position so everything will be out of reach.\n\t// If we are above the buffer reset it will be cleared anyway since len(hist) == 0.\n\tif e.cur <= int32(bufferReset) {\n\t\te.cur += e.maxOffset + int32(len(e.hist))\n\t}\n\te.hist = e.hist[:0]\n}\n\nfunc (e *fastEncL5Window) addBlock(src []byte) int32 {\n\t// check if we have space already\n\tmaxMatchOffset := e.maxOffset\n\n\tif len(e.hist)+len(src) > cap(e.hist) {\n\t\tif cap(e.hist) == 0 {\n\t\t\te.hist = make([]byte, 0, allocHistory)\n\t\t} else {\n\t\t\tif cap(e.hist) < int(maxMatchOffset*2) {\n\t\t\t\tpanic(\"unexpected buffer size\")\n\t\t\t}\n\t\t\t// Move down\n\t\t\toffset := int32(len(e.hist)) - maxMatchOffset\n\t\t\tcopy(e.hist[0:maxMatchOffset], e.hist[offset:])\n\t\t\te.cur += offset\n\t\t\te.hist = e.hist[:maxMatchOffset]\n\t\t}\n\t}\n\ts := int32(len(e.hist))\n\te.hist = append(e.hist, src...)\n\treturn s\n}\n\n// matchlen will return the match length between offsets and t in src.\n// The maximum length returned is maxMatchLength - 4.\n// It is assumed that s > t, that t >=0 and s < len(src).\nfunc (e *fastEncL5Window) matchlen(s, t int32, src []byte) int32 {\n\tif debugDecode {\n\t\tif t >= s {\n\t\t\tpanic(fmt.Sprint(\"t >=s:\", t, s))\n\t\t}\n\t\tif int(s) >= len(src) {\n\t\t\tpanic(fmt.Sprint(\"s >= len(src):\", s, len(src)))\n\t\t}\n\t\tif t < 0 {\n\t\t\tpanic(fmt.Sprint(\"t < 0:\", t))\n\t\t}\n\t\tif s-t > e.maxOffset {\n\t\t\tpanic(fmt.Sprint(s, \"-\", t, \"(\", s-t, \") > maxMatchLength (\", maxMatchOffset, \")\"))\n\t\t}\n\t}\n\ts1 := min(int(s)+maxMatchLength-4, len(src))\n\n\t// Extend the match to be as long as possible.\n\treturn int32(matchLen(src[s:s1], src[t:]))\n}\n\n// matchlenLong will return the match length between offsets and t in src.\n// It is assumed that s > t, that t >=0 and s < len(src).\nfunc (e *fastEncL5Window) matchlenLong(s, t int32, src []byte) int32 {\n\tif debugDeflate {\n\t\tif t >= s {\n\t\t\tpanic(fmt.Sprint(\"t >=s:\", t, s))\n\t\t}\n\t\tif int(s) >= len(src) {\n\t\t\tpanic(fmt.Sprint(\"s >= len(src):\", s, len(src)))\n\t\t}\n\t\tif t < 0 {\n\t\t\tpanic(fmt.Sprint(\"t < 0:\", t))\n\t\t}\n\t\tif s-t > e.maxOffset {\n\t\t\tpanic(fmt.Sprint(s, \"-\", t, \"(\", s-t, \") > maxMatchLength (\", maxMatchOffset, \")\"))\n\t\t}\n\t}\n\t// Extend the match to be as long as possible.\n\treturn int32(matchLen(src[s:], src[t:]))\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/level6.go",
    "content": "package flate\n\nimport \"fmt\"\n\ntype fastEncL6 struct {\n\tfastGen\n\ttable  [tableSize]tableEntry\n\tbTable [tableSize]tableEntryPrev\n}\n\nfunc (e *fastEncL6) Encode(dst *tokens, src []byte) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t\thashShortBytes         = 4\n\t)\n\tif debugDeflate && e.cur < 0 {\n\t\tpanic(fmt.Sprint(\"e.cur < 0: \", e.cur))\n\t}\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= bufferReset {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.bTable[:] {\n\t\t\t\te.bTable[i] = tableEntryPrev{}\n\t\t\t}\n\t\t\te.cur = maxMatchOffset\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - maxMatchOffset\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v <= minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + maxMatchOffset\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.bTable[:] {\n\t\t\tv := e.bTable[i]\n\t\t\tif v.Cur.offset <= minOff {\n\t\t\t\tv.Cur.offset = 0\n\t\t\t\tv.Prev.offset = 0\n\t\t\t} else {\n\t\t\t\tv.Cur.offset = v.Cur.offset - e.cur + maxMatchOffset\n\t\t\t\tif v.Prev.offset <= minOff {\n\t\t\t\t\tv.Prev.offset = 0\n\t\t\t\t} else {\n\t\t\t\t\tv.Prev.offset = v.Prev.offset - e.cur + maxMatchOffset\n\t\t\t\t}\n\t\t\t}\n\t\t\te.bTable[i] = v\n\t\t}\n\t\te.cur = maxMatchOffset\n\t}\n\n\ts := e.addBlock(src)\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = uint16(len(src))\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tnextEmit := s\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int32(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load6432(src, s)\n\t// Repeat MUST be > 1 and within range\n\trepeat := int32(1)\n\tfor {\n\t\tconst skipLog = 7\n\t\tconst doEvery = 1\n\n\t\tnextS := s\n\t\tvar l int32\n\t\tvar t int32\n\t\tfor {\n\t\t\tnextHashS := hashLen(cv, tableBits, hashShortBytes)\n\t\t\tnextHashL := hash7(cv, tableBits)\n\t\t\ts = nextS\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\t// Fetch a short+long candidate\n\t\t\tsCandidate := e.table[nextHashS]\n\t\t\tlCandidate := e.bTable[nextHashL]\n\t\t\tnext := load6432(src, nextS)\n\t\t\tentry := tableEntry{offset: s + e.cur}\n\t\t\te.table[nextHashS] = entry\n\t\t\teLong := &e.bTable[nextHashL]\n\t\t\teLong.Cur, eLong.Prev = entry, eLong.Cur\n\n\t\t\t// Calculate hashes of 'next'\n\t\t\tnextHashS = hashLen(next, tableBits, hashShortBytes)\n\t\t\tnextHashL = hash7(next, tableBits)\n\n\t\t\tt = lCandidate.Cur.offset - e.cur\n\t\t\tif s-t < maxMatchOffset {\n\t\t\t\tif uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Long candidate matches at least 4 bytes.\n\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t\t// Check the previous long candidate as well.\n\t\t\t\t\tt2 := lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif s-t2 < maxMatchOffset && uint32(cv) == load3232(src, t2) {\n\t\t\t\t\t\tl = e.matchlen(int(s+4), int(t+4), src) + 4\n\t\t\t\t\t\tml1 := e.matchlen(int(s+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml1 > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\tl = ml1\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// Current value did not match, but check if previous long value does.\n\t\t\t\tt = lCandidate.Prev.offset - e.cur\n\t\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t\t// Store the next match\n\t\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tt = sCandidate.offset - e.cur\n\t\t\tif s-t < maxMatchOffset && uint32(cv) == load3232(src, t) {\n\t\t\t\t// Found a 4 match...\n\t\t\t\tl = e.matchlen(int(s+4), int(t+4), src) + 4\n\n\t\t\t\t// Look up next long candidate (at nextS)\n\t\t\t\tlCandidate = e.bTable[nextHashL]\n\n\t\t\t\t// Store the next match\n\t\t\t\te.table[nextHashS] = tableEntry{offset: nextS + e.cur}\n\t\t\t\teLong := &e.bTable[nextHashL]\n\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: nextS + e.cur}, eLong.Cur\n\n\t\t\t\t// Check repeat at s + repOff\n\t\t\t\tconst repOff = 1\n\t\t\t\tt2 := s - repeat + repOff\n\t\t\t\tif load3232(src, t2) == uint32(cv>>(8*repOff)) {\n\t\t\t\t\tml := e.matchlen(int(s+4+repOff), int(t2+4), src) + 4\n\t\t\t\t\tif ml > l {\n\t\t\t\t\t\tt = t2\n\t\t\t\t\t\tl = ml\n\t\t\t\t\t\ts += repOff\n\t\t\t\t\t\t// Not worth checking more.\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the next long is a candidate, use that...\n\t\t\t\tt2 = lCandidate.Cur.offset - e.cur\n\t\t\t\tif nextS-t2 < maxMatchOffset {\n\t\t\t\t\tif load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(int(nextS+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\t// This is ok, but check previous as well.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the previous long is a candidate, use that...\n\t\t\t\t\tt2 = lCandidate.Prev.offset - e.cur\n\t\t\t\t\tif nextS-t2 < maxMatchOffset && load3232(src, t2) == uint32(next) {\n\t\t\t\t\t\tml := e.matchlen(int(nextS+4), int(t2+4), src) + 4\n\t\t\t\t\t\tif ml > l {\n\t\t\t\t\t\t\tt = t2\n\t\t\t\t\t\t\ts = nextS\n\t\t\t\t\t\t\tl = ml\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = next\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tif l == 0 {\n\t\t\tl = e.matchlenLong(int(s+4), int(t+4), src) + 4\n\t\t} else if l == maxMatchLength {\n\t\t\tl += e.matchlenLong(int(s+l), int(t+l), src)\n\t\t}\n\n\t\t// Try to locate a better match by checking the end-of-match...\n\t\tif sAt := s + l; sAt < sLimit {\n\t\t\t// Allow some bytes at the beginning to mismatch.\n\t\t\t// Sweet spot is 2/3 bytes depending on input.\n\t\t\t// 3 is only a little better when it is but sometimes a lot worse.\n\t\t\t// The skipped bytes are tested in Extend backwards,\n\t\t\t// and still picked up as part of the match if they do.\n\t\t\tconst skipBeginning = 2\n\t\t\teLong := &e.bTable[hash7(load6432(src, sAt), tableBits)]\n\t\t\t// Test current\n\t\t\tt2 := eLong.Cur.offset - e.cur - l + skipBeginning\n\t\t\ts2 := s + skipBeginning\n\t\t\toff := s2 - t2\n\t\t\tif off < maxMatchOffset {\n\t\t\t\tif off > 0 && t2 >= 0 {\n\t\t\t\t\tif l2 := e.matchlenLong(int(s2), int(t2), src); l2 > l {\n\t\t\t\t\t\tt = t2\n\t\t\t\t\t\tl = l2\n\t\t\t\t\t\ts = s2\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Test next:\n\t\t\t\tt2 = eLong.Prev.offset - e.cur - l + skipBeginning\n\t\t\t\toff := s2 - t2\n\t\t\t\tif off > 0 && off < maxMatchOffset && t2 >= 0 {\n\t\t\t\t\tif l2 := e.matchlenLong(int(s2), int(t2), src); l2 > l {\n\t\t\t\t\t\tt = t2\n\t\t\t\t\t\tl = l2\n\t\t\t\t\t\ts = s2\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Extend backwards\n\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\t\tif nextEmit < s {\n\t\t\tif false {\n\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t} else {\n\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\tdst.n++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif false {\n\t\t\tif t >= s {\n\t\t\t\tpanic(fmt.Sprintln(\"s-t\", s, t))\n\t\t\t}\n\t\t\tif (s - t) > maxMatchOffset {\n\t\t\t\tpanic(fmt.Sprintln(\"mmo\", s-t))\n\t\t\t}\n\t\t\tif l < baseMatchLength {\n\t\t\t\tpanic(\"bml\")\n\t\t\t}\n\t\t}\n\n\t\tdst.AddMatchLong(l, uint32(s-t-baseMatchOffset))\n\t\trepeat = s - t\n\t\ts += l\n\t\tnextEmit = s\n\t\tif nextS >= s {\n\t\t\ts = nextS + 1\n\t\t}\n\n\t\tif s >= sLimit {\n\t\t\t// Index after match end.\n\t\t\tfor i := nextS + 1; i < int32(len(src))-8; i += 2 {\n\t\t\t\tcv := load6432(src, i)\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = tableEntry{offset: i + e.cur}\n\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong.Cur, eLong.Prev = tableEntry{offset: i + e.cur}, eLong.Cur\n\t\t\t}\n\t\t\tgoto emitRemainder\n\t\t}\n\n\t\t// Store every long hash in-between and every second short.\n\t\tif true {\n\t\t\tfor i := nextS + 1; i < s-1; i += 2 {\n\t\t\t\tcv := load6432(src, i)\n\t\t\t\tt := tableEntry{offset: i + e.cur}\n\t\t\t\tt2 := tableEntry{offset: t.offset + 1}\n\t\t\t\teLong := &e.bTable[hash7(cv, tableBits)]\n\t\t\t\teLong2 := &e.bTable[hash7(cv>>8, tableBits)]\n\t\t\t\te.table[hashLen(cv, tableBits, hashShortBytes)] = t\n\t\t\t\teLong.Cur, eLong.Prev = t, eLong.Cur\n\t\t\t\teLong2.Cur, eLong2.Prev = t2, eLong2.Cur\n\t\t\t}\n\t\t}\n\n\t\t// We could immediately start working at s now, but to improve\n\t\t// compression we first update the hash table at s-1 and at s.\n\t\tcv = load6432(src, s)\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/matchlen_generic.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"math/bits\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// matchLen returns the maximum common prefix length of a and b.\n// a must be the shortest of the two.\nfunc matchLen(a, b []byte) (n int) {\n\tleft := len(a)\n\tfor left >= 8 {\n\t\tdiff := le.Load64(a, n) ^ le.Load64(b, n)\n\t\tif diff != 0 {\n\t\t\treturn n + bits.TrailingZeros64(diff)>>3\n\t\t}\n\t\tn += 8\n\t\tleft -= 8\n\t}\n\n\ta = a[n:]\n\tb = b[n:]\n\tfor i := range a {\n\t\tif a[i] != b[i] {\n\t\t\tbreak\n\t\t}\n\t\tn++\n\t}\n\treturn n\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/regmask_amd64.go",
    "content": "package flate\n\nconst (\n\t// Masks for shifts with register sizes of the shift value.\n\t// This can be used to work around the x86 design of shifting by mod register size.\n\t// It can be used when a variable shift is always smaller than the register size.\n\n\t// reg8SizeMaskX - shift value is 8 bits, shifted is X\n\treg8SizeMask8  = 7\n\treg8SizeMask16 = 15\n\treg8SizeMask32 = 31\n\treg8SizeMask64 = 63\n\n\t// reg16SizeMaskX - shift value is 16 bits, shifted is X\n\treg16SizeMask8  = reg8SizeMask8\n\treg16SizeMask16 = reg8SizeMask16\n\treg16SizeMask32 = reg8SizeMask32\n\treg16SizeMask64 = reg8SizeMask64\n\n\t// reg32SizeMaskX - shift value is 32 bits, shifted is X\n\treg32SizeMask8  = reg8SizeMask8\n\treg32SizeMask16 = reg8SizeMask16\n\treg32SizeMask32 = reg8SizeMask32\n\treg32SizeMask64 = reg8SizeMask64\n\n\t// reg64SizeMaskX - shift value is 64 bits, shifted is X\n\treg64SizeMask8  = reg8SizeMask8\n\treg64SizeMask16 = reg8SizeMask16\n\treg64SizeMask32 = reg8SizeMask32\n\treg64SizeMask64 = reg8SizeMask64\n\n\t// regSizeMaskUintX - shift value is uint, shifted is X\n\tregSizeMaskUint8  = reg8SizeMask8\n\tregSizeMaskUint16 = reg8SizeMask16\n\tregSizeMaskUint32 = reg8SizeMask32\n\tregSizeMaskUint64 = reg8SizeMask64\n)\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/regmask_other.go",
    "content": "//go:build !amd64\n// +build !amd64\n\npackage flate\n\nconst (\n\t// Masks for shifts with register sizes of the shift value.\n\t// This can be used to work around the x86 design of shifting by mod register size.\n\t// It can be used when a variable shift is always smaller than the register size.\n\n\t// reg8SizeMaskX - shift value is 8 bits, shifted is X\n\treg8SizeMask8  = 0xff\n\treg8SizeMask16 = 0xff\n\treg8SizeMask32 = 0xff\n\treg8SizeMask64 = 0xff\n\n\t// reg16SizeMaskX - shift value is 16 bits, shifted is X\n\treg16SizeMask8  = 0xffff\n\treg16SizeMask16 = 0xffff\n\treg16SizeMask32 = 0xffff\n\treg16SizeMask64 = 0xffff\n\n\t// reg32SizeMaskX - shift value is 32 bits, shifted is X\n\treg32SizeMask8  = 0xffffffff\n\treg32SizeMask16 = 0xffffffff\n\treg32SizeMask32 = 0xffffffff\n\treg32SizeMask64 = 0xffffffff\n\n\t// reg64SizeMaskX - shift value is 64 bits, shifted is X\n\treg64SizeMask8  = 0xffffffffffffffff\n\treg64SizeMask16 = 0xffffffffffffffff\n\treg64SizeMask32 = 0xffffffffffffffff\n\treg64SizeMask64 = 0xffffffffffffffff\n\n\t// regSizeMaskUintX - shift value is uint, shifted is X\n\tregSizeMaskUint8  = ^uint(0)\n\tregSizeMaskUint16 = ^uint(0)\n\tregSizeMaskUint32 = ^uint(0)\n\tregSizeMaskUint64 = ^uint(0)\n)\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/stateless.go",
    "content": "package flate\n\nimport (\n\t\"io\"\n\t\"math\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\nconst (\n\tmaxStatelessBlock = math.MaxInt16\n\t// dictionary will be taken from maxStatelessBlock, so limit it.\n\tmaxStatelessDict = 8 << 10\n\n\tslTableBits  = 13\n\tslTableSize  = 1 << slTableBits\n\tslTableShift = 32 - slTableBits\n)\n\ntype statelessWriter struct {\n\tdst    io.Writer\n\tclosed bool\n}\n\nfunc (s *statelessWriter) Close() error {\n\tif s.closed {\n\t\treturn nil\n\t}\n\ts.closed = true\n\t// Emit EOF block\n\treturn StatelessDeflate(s.dst, nil, true, nil)\n}\n\nfunc (s *statelessWriter) Write(p []byte) (n int, err error) {\n\terr = StatelessDeflate(s.dst, p, false, nil)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(p), nil\n}\n\nfunc (s *statelessWriter) Reset(w io.Writer) {\n\ts.dst = w\n\ts.closed = false\n}\n\n// NewStatelessWriter will do compression but without maintaining any state\n// between Write calls.\n// There will be no memory kept between Write calls,\n// but compression and speed will be suboptimal.\n// Because of this, the size of actual Write calls will affect output size.\nfunc NewStatelessWriter(dst io.Writer) io.WriteCloser {\n\treturn &statelessWriter{dst: dst}\n}\n\n// bitWriterPool contains bit writers that can be reused.\nvar bitWriterPool = sync.Pool{\n\tNew: func() any {\n\t\treturn newHuffmanBitWriter(nil)\n\t},\n}\n\n// tokensPool contains tokens struct objects that can be reused\nvar tokensPool = sync.Pool{\n\tNew: func() any {\n\t\treturn &tokens{}\n\t},\n}\n\n// StatelessDeflate allows compressing directly to a Writer without retaining state.\n// When returning everything will be flushed.\n// Up to 8KB of an optional dictionary can be given which is presumed to precede the block.\n// Longer dictionaries will be truncated and will still produce valid output.\n// Sending nil dictionary is perfectly fine.\nfunc StatelessDeflate(out io.Writer, in []byte, eof bool, dict []byte) error {\n\tbw := bitWriterPool.Get().(*huffmanBitWriter)\n\tbw.reset(out)\n\tdefer func() {\n\t\t// don't keep a reference to our output\n\t\tbw.reset(nil)\n\t\tbitWriterPool.Put(bw)\n\t}()\n\tif eof && len(in) == 0 {\n\t\t// Just write an EOF block.\n\t\t// Could be faster...\n\t\tbw.writeStoredHeader(0, true)\n\t\tbw.flush()\n\t\treturn bw.err\n\t}\n\n\t// Truncate dict\n\tif len(dict) > maxStatelessDict {\n\t\tdict = dict[len(dict)-maxStatelessDict:]\n\t}\n\n\t// For subsequent loops, keep shallow dict reference to avoid alloc+copy.\n\tvar inDict []byte\n\n\tdst := tokensPool.Get().(*tokens)\n\tdst.Reset()\n\tdefer func() {\n\t\ttokensPool.Put(dst)\n\t}()\n\n\tfor len(in) > 0 {\n\t\ttodo := in\n\t\tif len(inDict) > 0 {\n\t\t\tif len(todo) > maxStatelessBlock-maxStatelessDict {\n\t\t\t\ttodo = todo[:maxStatelessBlock-maxStatelessDict]\n\t\t\t}\n\t\t} else if len(todo) > maxStatelessBlock-len(dict) {\n\t\t\ttodo = todo[:maxStatelessBlock-len(dict)]\n\t\t}\n\t\tinOrg := in\n\t\tin = in[len(todo):]\n\t\tuncompressed := todo\n\t\tif len(dict) > 0 {\n\t\t\t// combine dict and source\n\t\t\tbufLen := len(todo) + len(dict)\n\t\t\tcombined := make([]byte, bufLen)\n\t\t\tcopy(combined, dict)\n\t\t\tcopy(combined[len(dict):], todo)\n\t\t\ttodo = combined\n\t\t}\n\t\t// Compress\n\t\tif len(inDict) == 0 {\n\t\t\tstatelessEnc(dst, todo, int16(len(dict)))\n\t\t} else {\n\t\t\tstatelessEnc(dst, inDict[:maxStatelessDict+len(todo)], maxStatelessDict)\n\t\t}\n\t\tisEof := eof && len(in) == 0\n\n\t\tif dst.n == 0 {\n\t\t\tbw.writeStoredHeader(len(uncompressed), isEof)\n\t\t\tif bw.err != nil {\n\t\t\t\treturn bw.err\n\t\t\t}\n\t\t\tbw.writeBytes(uncompressed)\n\t\t} else if int(dst.n) > len(uncompressed)-len(uncompressed)>>4 {\n\t\t\t// If we removed less than 1/16th, huffman compress the block.\n\t\t\tbw.writeBlockHuff(isEof, uncompressed, len(in) == 0)\n\t\t} else {\n\t\t\tbw.writeBlockDynamic(dst, isEof, uncompressed, len(in) == 0)\n\t\t}\n\t\tif len(in) > 0 {\n\t\t\t// Retain a dict if we have more\n\t\t\tinDict = inOrg[len(uncompressed)-maxStatelessDict:]\n\t\t\tdict = nil\n\t\t\tdst.Reset()\n\t\t}\n\t\tif bw.err != nil {\n\t\t\treturn bw.err\n\t\t}\n\t}\n\tif !eof {\n\t\t// Align, only a stored block can do that.\n\t\tbw.writeStoredHeader(0, false)\n\t}\n\tbw.flush()\n\treturn bw.err\n}\n\nfunc hashSL(u uint32) uint32 {\n\treturn (u * 0x1e35a7bd) >> slTableShift\n}\n\nfunc load3216(b []byte, i int16) uint32 {\n\treturn le.Load32(b, i)\n}\n\nfunc load6416(b []byte, i int16) uint64 {\n\treturn le.Load64(b, i)\n}\n\nfunc statelessEnc(dst *tokens, src []byte, startAt int16) {\n\tconst (\n\t\tinputMargin            = 12 - 1\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t)\n\n\ttype tableEntry struct {\n\t\toffset int16\n\t}\n\n\tvar table [slTableSize]tableEntry\n\n\t// This check isn't in the Snappy implementation, but there, the caller\n\t// instead of the callee handles this case.\n\tif len(src)-int(startAt) < minNonLiteralBlockSize {\n\t\t// We do not fill the token table.\n\t\t// This will be picked up by caller.\n\t\tdst.n = 0\n\t\treturn\n\t}\n\t// Index until startAt\n\tif startAt > 0 {\n\t\tcv := load3232(src, 0)\n\t\tfor i := range startAt {\n\t\t\ttable[hashSL(cv)] = tableEntry{offset: i}\n\t\t\tcv = (cv >> 8) | (uint32(src[i+4]) << 24)\n\t\t}\n\t}\n\n\ts := startAt + 1\n\tnextEmit := startAt\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := int16(len(src) - inputMargin)\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tcv := load3216(src, s)\n\n\tfor {\n\t\tconst skipLog = 5\n\t\tconst doEvery = 2\n\n\t\tnextS := s\n\t\tvar candidate tableEntry\n\t\tfor {\n\t\t\tnextHash := hashSL(cv)\n\t\t\tcandidate = table[nextHash]\n\t\t\tnextS = s + doEvery + (s-nextEmit)>>skipLog\n\t\t\tif nextS > sLimit || nextS <= 0 {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\tnow := load6416(src, nextS)\n\t\t\ttable[nextHash] = tableEntry{offset: s}\n\t\t\tnextHash = hashSL(uint32(now))\n\n\t\t\tif cv == load3216(src, candidate.offset) {\n\t\t\t\ttable[nextHash] = tableEntry{offset: nextS}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Do one right away...\n\t\t\tcv = uint32(now)\n\t\t\ts = nextS\n\t\t\tnextS++\n\t\t\tcandidate = table[nextHash]\n\t\t\tnow >>= 8\n\t\t\ttable[nextHash] = tableEntry{offset: s}\n\n\t\t\tif cv == load3216(src, candidate.offset) {\n\t\t\t\ttable[nextHash] = tableEntry{offset: nextS}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcv = uint32(now)\n\t\t\ts = nextS\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\t\tfor {\n\t\t\t// Invariant: we have a 4-byte match at s, and no need to emit any\n\t\t\t// literal bytes prior to s.\n\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\tt := candidate.offset\n\t\t\tl := int16(matchLen(src[s+4:], src[t+4:]) + 4)\n\n\t\t\t// Extend backwards\n\t\t\tfor t > 0 && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\t\ts--\n\t\t\t\tt--\n\t\t\t\tl++\n\t\t\t}\n\t\t\tif nextEmit < s {\n\t\t\t\tif false {\n\t\t\t\t\temitLiteral(dst, src[nextEmit:s])\n\t\t\t\t} else {\n\t\t\t\t\tfor _, v := range src[nextEmit:s] {\n\t\t\t\t\t\tdst.tokens[dst.n] = token(v)\n\t\t\t\t\t\tdst.litHist[v]++\n\t\t\t\t\t\tdst.n++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save the match found\n\t\t\tdst.AddMatchLong(int32(l), uint32(s-t-baseMatchOffset))\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif nextS >= s {\n\t\t\t\ts = nextS + 1\n\t\t\t}\n\t\t\tif s >= sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\t// We could immediately start working at s now, but to improve\n\t\t\t// compression we first update the hash table at s-2 and at s. If\n\t\t\t// another emitCopy is not our next move, also calculate nextHash\n\t\t\t// at s+1. At least on GOARCH=amd64, these three hash calculations\n\t\t\t// are faster as one load64 call (with some shifts) instead of\n\t\t\t// three load32 calls.\n\t\t\tx := load6416(src, s-2)\n\t\t\to := s - 2\n\t\t\tprevHash := hashSL(uint32(x))\n\t\t\ttable[prevHash] = tableEntry{offset: o}\n\t\t\tx >>= 16\n\t\t\tcurrHash := hashSL(uint32(x))\n\t\t\tcandidate = table[currHash]\n\t\t\ttable[currHash] = tableEntry{offset: o + 2}\n\n\t\t\tif uint32(x) != load3216(src, candidate.offset) {\n\t\t\t\tcv = uint32(x >> 8)\n\t\t\t\ts++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\nemitRemainder:\n\tif int(nextEmit) < len(src) {\n\t\t// If nothing was added, don't encode literals.\n\t\tif dst.n == 0 {\n\t\t\treturn\n\t\t}\n\t\temitLiteral(dst, src[nextEmit:])\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/flate/token.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage flate\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n)\n\nconst (\n\t// bits 0-16  \txoffset = offset - MIN_OFFSET_SIZE, or literal - 16 bits\n\t// bits 16-22\toffsetcode - 5 bits\n\t// bits 22-30   xlength = length - MIN_MATCH_LENGTH - 8 bits\n\t// bits 30-32   type   0 = literal  1=EOF  2=Match   3=Unused - 2 bits\n\tlengthShift         = 22\n\toffsetMask          = 1<<lengthShift - 1\n\ttypeMask            = 3 << 30\n\tliteralType         = 0 << 30\n\tmatchType           = 1 << 30\n\tmatchOffsetOnlyMask = 0xffff\n)\n\n// The length code for length X (MIN_MATCH_LENGTH <= X <= MAX_MATCH_LENGTH)\n// is lengthCodes[length - MIN_MATCH_LENGTH]\nvar lengthCodes = [256]uint8{\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 8,\n\t9, 9, 10, 10, 11, 11, 12, 12, 12, 12,\n\t13, 13, 13, 13, 14, 14, 14, 14, 15, 15,\n\t15, 15, 16, 16, 16, 16, 16, 16, 16, 16,\n\t17, 17, 17, 17, 17, 17, 17, 17, 18, 18,\n\t18, 18, 18, 18, 18, 18, 19, 19, 19, 19,\n\t19, 19, 19, 19, 20, 20, 20, 20, 20, 20,\n\t20, 20, 20, 20, 20, 20, 20, 20, 20, 20,\n\t21, 21, 21, 21, 21, 21, 21, 21, 21, 21,\n\t21, 21, 21, 21, 21, 21, 22, 22, 22, 22,\n\t22, 22, 22, 22, 22, 22, 22, 22, 22, 22,\n\t22, 22, 23, 23, 23, 23, 23, 23, 23, 23,\n\t23, 23, 23, 23, 23, 23, 23, 23, 24, 24,\n\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t25, 25, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 28,\n}\n\n// lengthCodes1 is length codes, but starting at 1.\nvar lengthCodes1 = [256]uint8{\n\t1, 2, 3, 4, 5, 6, 7, 8, 9, 9,\n\t10, 10, 11, 11, 12, 12, 13, 13, 13, 13,\n\t14, 14, 14, 14, 15, 15, 15, 15, 16, 16,\n\t16, 16, 17, 17, 17, 17, 17, 17, 17, 17,\n\t18, 18, 18, 18, 18, 18, 18, 18, 19, 19,\n\t19, 19, 19, 19, 19, 19, 20, 20, 20, 20,\n\t20, 20, 20, 20, 21, 21, 21, 21, 21, 21,\n\t21, 21, 21, 21, 21, 21, 21, 21, 21, 21,\n\t22, 22, 22, 22, 22, 22, 22, 22, 22, 22,\n\t22, 22, 22, 22, 22, 22, 23, 23, 23, 23,\n\t23, 23, 23, 23, 23, 23, 23, 23, 23, 23,\n\t23, 23, 24, 24, 24, 24, 24, 24, 24, 24,\n\t24, 24, 24, 24, 24, 24, 24, 24, 25, 25,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 29,\n}\n\nvar offsetCodes = [256]uint32{\n\t0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,\n\t8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,\n\t10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n\t11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,\n\t12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,\n\t12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,\n\t13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,\n\t13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,\n\t14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n\t14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n\t14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n\t14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,\n\t15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n\t15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n\t15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n\t15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,\n}\n\n// offsetCodes14 are offsetCodes, but with 14 added.\nvar offsetCodes14 = [256]uint32{\n\t14, 15, 16, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21,\n\t22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,\n\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n\t29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n\t29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n\t29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,\n}\n\ntype token uint32\n\ntype tokens struct {\n\textraHist [32]uint16  // codes 256->maxnumlit\n\toffHist   [32]uint16  // offset codes\n\tlitHist   [256]uint16 // codes 0->255\n\tnFilled   int\n\tn         uint16 // Must be able to contain maxStoreBlockSize\n\ttokens    [maxStoreBlockSize + 1]token\n}\n\nfunc (t *tokens) Reset() {\n\tif t.n == 0 {\n\t\treturn\n\t}\n\tt.n = 0\n\tt.nFilled = 0\n\tfor i := range t.litHist[:] {\n\t\tt.litHist[i] = 0\n\t}\n\tfor i := range t.extraHist[:] {\n\t\tt.extraHist[i] = 0\n\t}\n\tfor i := range t.offHist[:] {\n\t\tt.offHist[i] = 0\n\t}\n}\n\nfunc (t *tokens) Fill() {\n\tif t.n == 0 {\n\t\treturn\n\t}\n\tfor i, v := range t.litHist[:] {\n\t\tif v == 0 {\n\t\t\tt.litHist[i] = 1\n\t\t\tt.nFilled++\n\t\t}\n\t}\n\tfor i, v := range t.extraHist[:literalCount-256] {\n\t\tif v == 0 {\n\t\t\tt.nFilled++\n\t\t\tt.extraHist[i] = 1\n\t\t}\n\t}\n\tfor i, v := range t.offHist[:offsetCodeCount] {\n\t\tif v == 0 {\n\t\t\tt.offHist[i] = 1\n\t\t}\n\t}\n}\n\nfunc indexTokens(in []token) tokens {\n\tvar t tokens\n\tt.indexTokens(in)\n\treturn t\n}\n\nfunc (t *tokens) indexTokens(in []token) {\n\tt.Reset()\n\tfor _, tok := range in {\n\t\tif tok < matchType {\n\t\t\tt.AddLiteral(tok.literal())\n\t\t\tcontinue\n\t\t}\n\t\tt.AddMatch(uint32(tok.length()), tok.offset()&matchOffsetOnlyMask)\n\t}\n}\n\n// emitLiteral writes a literal chunk and returns the number of bytes written.\nfunc emitLiteral(dst *tokens, lit []byte) {\n\tfor _, v := range lit {\n\t\tdst.tokens[dst.n] = token(v)\n\t\tdst.litHist[v]++\n\t\tdst.n++\n\t}\n}\n\nfunc (t *tokens) AddLiteral(lit byte) {\n\tt.tokens[t.n] = token(lit)\n\tt.litHist[lit]++\n\tt.n++\n}\n\n// from https://stackoverflow.com/a/28730362\nfunc mFastLog2(val float32) float32 {\n\tux := int32(math.Float32bits(val))\n\tlog2 := (float32)(((ux >> 23) & 255) - 128)\n\tux &= -0x7f800001\n\tux += 127 << 23\n\tuval := math.Float32frombits(uint32(ux))\n\tlog2 += ((-0.34484843)*uval+2.02466578)*uval - 0.67487759\n\treturn log2\n}\n\n// EstimatedBits will return an minimum size estimated by an *optimal*\n// compression of the block.\n// The size of the block\nfunc (t *tokens) EstimatedBits() int {\n\tshannon := float32(0)\n\tbits := int(0)\n\tnMatches := 0\n\ttotal := int(t.n) + t.nFilled\n\tif total > 0 {\n\t\tinvTotal := 1.0 / float32(total)\n\t\tfor _, v := range t.litHist[:] {\n\t\t\tif v > 0 {\n\t\t\t\tn := float32(v)\n\t\t\t\tshannon += atLeastOne(-mFastLog2(n*invTotal)) * n\n\t\t\t}\n\t\t}\n\t\t// Just add 15 for EOB\n\t\tshannon += 15\n\t\tfor i, v := range t.extraHist[1 : literalCount-256] {\n\t\t\tif v > 0 {\n\t\t\t\tn := float32(v)\n\t\t\t\tshannon += atLeastOne(-mFastLog2(n*invTotal)) * n\n\t\t\t\tbits += int(lengthExtraBits[i&31]) * int(v)\n\t\t\t\tnMatches += int(v)\n\t\t\t}\n\t\t}\n\t}\n\tif nMatches > 0 {\n\t\tinvTotal := 1.0 / float32(nMatches)\n\t\tfor i, v := range t.offHist[:offsetCodeCount] {\n\t\t\tif v > 0 {\n\t\t\t\tn := float32(v)\n\t\t\t\tshannon += atLeastOne(-mFastLog2(n*invTotal)) * n\n\t\t\t\tbits += int(offsetExtraBits[i&31]) * int(v)\n\t\t\t}\n\t\t}\n\t}\n\treturn int(shannon) + bits\n}\n\n// AddMatch adds a match to the tokens.\n// This function is very sensitive to inlining and right on the border.\nfunc (t *tokens) AddMatch(xlength uint32, xoffset uint32) {\n\tif debugDeflate {\n\t\tif xlength >= maxMatchLength+baseMatchLength {\n\t\t\tpanic(fmt.Errorf(\"invalid length: %v\", xlength))\n\t\t}\n\t\tif xoffset >= maxMatchOffset+baseMatchOffset {\n\t\t\tpanic(fmt.Errorf(\"invalid offset: %v\", xoffset))\n\t\t}\n\t}\n\toCode := offsetCode(xoffset)\n\txoffset |= oCode << 16\n\n\tt.extraHist[lengthCodes1[uint8(xlength)]]++\n\tt.offHist[oCode&31]++\n\tt.tokens[t.n] = token(matchType | xlength<<lengthShift | xoffset)\n\tt.n++\n}\n\n// AddMatchLong adds a match to the tokens, potentially longer than max match length.\n// Length should NOT have the base subtracted, only offset should.\nfunc (t *tokens) AddMatchLong(xlength int32, xoffset uint32) {\n\tif debugDeflate {\n\t\tif xoffset >= maxMatchOffset+baseMatchOffset {\n\t\t\tpanic(fmt.Errorf(\"invalid offset: %v\", xoffset))\n\t\t}\n\t}\n\toc := offsetCode(xoffset)\n\txoffset |= oc << 16\n\tfor xlength > 0 {\n\t\txl := xlength\n\t\tif xl > 258 {\n\t\t\t// We need to have at least baseMatchLength left over for next loop.\n\t\t\tif xl > 258+baseMatchLength {\n\t\t\t\txl = 258\n\t\t\t} else {\n\t\t\t\txl = 258 - baseMatchLength\n\t\t\t}\n\t\t}\n\t\txlength -= xl\n\t\txl -= baseMatchLength\n\t\tt.extraHist[lengthCodes1[uint8(xl)]]++\n\t\tt.offHist[oc&31]++\n\t\tt.tokens[t.n] = token(matchType | uint32(xl)<<lengthShift | xoffset)\n\t\tt.n++\n\t}\n}\n\nfunc (t *tokens) AddEOB() {\n\tt.tokens[t.n] = token(endBlockMarker)\n\tt.extraHist[0]++\n\tt.n++\n}\n\nfunc (t *tokens) Slice() []token {\n\treturn t.tokens[:t.n]\n}\n\n// VarInt returns the tokens as varint encoded bytes.\nfunc (t *tokens) VarInt() []byte {\n\tvar b = make([]byte, binary.MaxVarintLen32*int(t.n))\n\tvar off int\n\tfor _, v := range t.tokens[:t.n] {\n\t\toff += binary.PutUvarint(b[off:], uint64(v))\n\t}\n\treturn b[:off]\n}\n\n// FromVarInt restores t to the varint encoded tokens provided.\n// Any data in t is removed.\nfunc (t *tokens) FromVarInt(b []byte) error {\n\tvar buf = bytes.NewReader(b)\n\tvar toks []token\n\tfor {\n\t\tr, err := binary.ReadUvarint(buf)\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttoks = append(toks, token(r))\n\t}\n\tt.indexTokens(toks)\n\treturn nil\n}\n\n// Returns the type of a token\nfunc (t token) typ() uint32 { return uint32(t) & typeMask }\n\n// Returns the literal of a literal token\nfunc (t token) literal() uint8 { return uint8(t) }\n\n// Returns the extra offset of a match token\nfunc (t token) offset() uint32 { return uint32(t) & offsetMask }\n\nfunc (t token) length() uint8 { return uint8(t >> lengthShift) }\n\n// Convert length to code.\nfunc lengthCode(len uint8) uint8 { return lengthCodes[len] }\n\n// Returns the offset code corresponding to a specific offset\nfunc offsetCode(off uint32) uint32 {\n\tif false {\n\t\tif off < uint32(len(offsetCodes)) {\n\t\t\treturn offsetCodes[off&255]\n\t\t} else if off>>7 < uint32(len(offsetCodes)) {\n\t\t\treturn offsetCodes[(off>>7)&255] + 14\n\t\t} else {\n\t\t\treturn offsetCodes[(off>>14)&255] + 28\n\t\t}\n\t}\n\tif off < uint32(len(offsetCodes)) {\n\t\treturn offsetCodes[uint8(off)]\n\t}\n\treturn offsetCodes14[uint8(off>>7)]\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/README.md",
    "content": "# Finite State Entropy\r\n\r\nThis package provides Finite State Entropy encoding and decoding.\r\n            \r\nFinite State Entropy (also referenced as [tANS](https://en.wikipedia.org/wiki/Asymmetric_numeral_systems#tANS)) \r\nencoding provides a fast near-optimal symbol encoding/decoding\r\nfor byte blocks as implemented in [zstandard](https://github.com/facebook/zstd).\r\n\r\nThis can be used for compressing input with a lot of similar input values to the smallest number of bytes.\r\nThis does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,\r\nbut it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding. \r\n\r\n* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/fse)\r\n\r\n## News\r\n\r\n * Feb 2018: First implementation released. Consider this beta software for now.\r\n\r\n# Usage\r\n\r\nThis package provides a low level interface that allows to compress single independent blocks. \r\n\r\nEach block is separate, and there is no built in integrity checks. \r\nThis means that the caller should keep track of block sizes and also do checksums if needed.  \r\n\r\nCompressing a block is done via the [`Compress`](https://godoc.org/github.com/klauspost/compress/fse#Compress) function.\r\nYou must provide input and will receive the output and maybe an error.\r\n\r\nThese error values can be returned:\r\n\r\n| Error               | Description                                                                 |\r\n|---------------------|-----------------------------------------------------------------------------|\r\n| `<nil>`             | Everything ok, output is returned                                           |\r\n| `ErrIncompressible` | Returned when input is judged to be too hard to compress                    |\r\n| `ErrUseRLE`         | Returned from the compressor when the input is a single byte value repeated |\r\n| `(error)`           | An internal error occurred.                                                 |\r\n\r\nAs can be seen above there are errors that will be returned even under normal operation so it is important to handle these.\r\n\r\nTo reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/fse#Scratch) object \r\nthat can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same \r\nobject can be used for both.   \r\n\r\nBe aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this\r\nyou must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.\r\n\r\nDecompressing is done by calling the [`Decompress`](https://godoc.org/github.com/klauspost/compress/fse#Decompress) function.\r\nYou must provide the output from the compression stage, at exactly the size you got back. If you receive an error back\r\nyour input was likely corrupted. \r\n\r\nIt is important to note that a successful decoding does *not* mean your output matches your original input. \r\nThere are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.\r\n\r\nFor more detailed usage, see examples in the [godoc documentation](https://godoc.org/github.com/klauspost/compress/fse#pkg-examples).\r\n\r\n# Performance\r\n\r\nA lot of factors are affecting speed. Block sizes and compressibility of the material are primary factors.  \r\nAll compression functions are currently only running on the calling goroutine so only one core will be used per block.  \r\n\r\nThe compressor is significantly faster if symbols are kept as small as possible. The highest byte value of the input\r\nis used to reduce some of the processing, so if all your input is above byte value 64 for instance, it may be \r\nbeneficial to transpose all your input values down by 64.   \r\n\r\nWith moderate block sizes around 64k speed are typically 200MB/s per core for compression and \r\naround 300MB/s decompression speed. \r\n\r\nThe same hardware typically does Huffman (deflate) encoding at 125MB/s and decompression at 100MB/s. \r\n\r\n# Plans\r\n\r\nAt one point, more internals will be exposed to facilitate more \"expert\" usage of the components. \r\n\r\nA streaming interface is also likely to be implemented. Likely compatible with [FSE stream format](https://github.com/Cyan4973/FiniteStateEntropy/blob/dev/programs/fileio.c#L261).  \r\n\r\n# Contributing\r\n\r\nContributions are always welcome. Be aware that adding public functions will require good justification and breaking \r\nchanges will likely not be accepted. If in doubt open an issue before writing the PR.  "
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/bitreader.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage fse\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"io\"\n)\n\n// bitReader reads a bitstream in reverse.\n// The last set bit indicates the start of the stream and is used\n// for aligning the input.\ntype bitReader struct {\n\tin       []byte\n\toff      uint // next byte to read is at in[off - 1]\n\tvalue    uint64\n\tbitsRead uint8\n}\n\n// init initializes and resets the bit reader.\nfunc (b *bitReader) init(in []byte) error {\n\tif len(in) < 1 {\n\t\treturn errors.New(\"corrupt stream: too short\")\n\t}\n\tb.in = in\n\tb.off = uint(len(in))\n\t// The highest bit of the last byte indicates where to start\n\tv := in[len(in)-1]\n\tif v == 0 {\n\t\treturn errors.New(\"corrupt stream, did not find end of stream\")\n\t}\n\tb.bitsRead = 64\n\tb.value = 0\n\tif len(in) >= 8 {\n\t\tb.fillFastStart()\n\t} else {\n\t\tb.fill()\n\t\tb.fill()\n\t}\n\tb.bitsRead += 8 - uint8(highBits(uint32(v)))\n\treturn nil\n}\n\n// getBits will return n bits. n can be 0.\nfunc (b *bitReader) getBits(n uint8) uint16 {\n\tif n == 0 || b.bitsRead >= 64 {\n\t\treturn 0\n\t}\n\treturn b.getBitsFast(n)\n}\n\n// getBitsFast requires that at least one bit is requested every time.\n// There are no checks if the buffer is filled.\nfunc (b *bitReader) getBitsFast(n uint8) uint16 {\n\tconst regMask = 64 - 1\n\tv := uint16((b.value << (b.bitsRead & regMask)) >> ((regMask + 1 - n) & regMask))\n\tb.bitsRead += n\n\treturn v\n}\n\n// fillFast() will make sure at least 32 bits are available.\n// There must be at least 4 bytes available.\nfunc (b *bitReader) fillFast() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\t// 2 bounds checks.\n\tv := b.in[b.off-4:]\n\tv = v[:4]\n\tlow := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24)\n\tb.value = (b.value << 32) | uint64(low)\n\tb.bitsRead -= 32\n\tb.off -= 4\n}\n\n// fill() will make sure at least 32 bits are available.\nfunc (b *bitReader) fill() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\tif b.off > 4 {\n\t\tv := b.in[b.off-4:]\n\t\tv = v[:4]\n\t\tlow := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24)\n\t\tb.value = (b.value << 32) | uint64(low)\n\t\tb.bitsRead -= 32\n\t\tb.off -= 4\n\t\treturn\n\t}\n\tfor b.off > 0 {\n\t\tb.value = (b.value << 8) | uint64(b.in[b.off-1])\n\t\tb.bitsRead -= 8\n\t\tb.off--\n\t}\n}\n\n// fillFastStart() assumes the bitreader is empty and there is at least 8 bytes to read.\nfunc (b *bitReader) fillFastStart() {\n\t// Do single re-slice to avoid bounds checks.\n\tb.value = binary.LittleEndian.Uint64(b.in[b.off-8:])\n\tb.bitsRead = 0\n\tb.off -= 8\n}\n\n// finished returns true if all bits have been read from the bit stream.\nfunc (b *bitReader) finished() bool {\n\treturn b.bitsRead >= 64 && b.off == 0\n}\n\n// close the bitstream and returns an error if out-of-buffer reads occurred.\nfunc (b *bitReader) close() error {\n\t// Release reference.\n\tb.in = nil\n\tif b.bitsRead > 64 {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/bitwriter.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage fse\n\nimport \"fmt\"\n\n// bitWriter will write bits.\n// First bit will be LSB of the first byte of output.\ntype bitWriter struct {\n\tbitContainer uint64\n\tnBits        uint8\n\tout          []byte\n}\n\n// bitMask16 is bitmasks. Has extra to avoid bounds check.\nvar bitMask16 = [32]uint16{\n\t0, 1, 3, 7, 0xF, 0x1F,\n\t0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF,\n\t0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0xFFFF,\n\t0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,\n\t0xFFFF, 0xFFFF} /* up to 16 bits */\n\n// addBits16NC will add up to 16 bits.\n// It will not check if there is space for them,\n// so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits16NC(value uint16, bits uint8) {\n\tb.bitContainer |= uint64(value&bitMask16[bits&31]) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated.\n// It will not check if there is space for them, so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits16Clean(value uint16, bits uint8) {\n\tb.bitContainer |= uint64(value) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// addBits16ZeroNC will add up to 16 bits.\n// It will not check if there is space for them,\n// so the caller must ensure that it has flushed recently.\n// This is fastest if bits can be zero.\nfunc (b *bitWriter) addBits16ZeroNC(value uint16, bits uint8) {\n\tif bits == 0 {\n\t\treturn\n\t}\n\tvalue <<= (16 - bits) & 15\n\tvalue >>= (16 - bits) & 15\n\tb.bitContainer |= uint64(value) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// flush will flush all pending full bytes.\n// There will be at least 56 bits available for writing when this has been called.\n// Using flush32 is faster, but leaves less space for writing.\nfunc (b *bitWriter) flush() {\n\tv := b.nBits >> 3\n\tswitch v {\n\tcase 0:\n\tcase 1:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t)\n\tcase 2:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t)\n\tcase 3:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t)\n\tcase 4:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t\tbyte(b.bitContainer>>24),\n\t\t)\n\tcase 5:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t\tbyte(b.bitContainer>>24),\n\t\t\tbyte(b.bitContainer>>32),\n\t\t)\n\tcase 6:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t\tbyte(b.bitContainer>>24),\n\t\t\tbyte(b.bitContainer>>32),\n\t\t\tbyte(b.bitContainer>>40),\n\t\t)\n\tcase 7:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t\tbyte(b.bitContainer>>24),\n\t\t\tbyte(b.bitContainer>>32),\n\t\t\tbyte(b.bitContainer>>40),\n\t\t\tbyte(b.bitContainer>>48),\n\t\t)\n\tcase 8:\n\t\tb.out = append(b.out,\n\t\t\tbyte(b.bitContainer),\n\t\t\tbyte(b.bitContainer>>8),\n\t\t\tbyte(b.bitContainer>>16),\n\t\t\tbyte(b.bitContainer>>24),\n\t\t\tbyte(b.bitContainer>>32),\n\t\t\tbyte(b.bitContainer>>40),\n\t\t\tbyte(b.bitContainer>>48),\n\t\t\tbyte(b.bitContainer>>56),\n\t\t)\n\tdefault:\n\t\tpanic(fmt.Errorf(\"bits (%d) > 64\", b.nBits))\n\t}\n\tb.bitContainer >>= v << 3\n\tb.nBits &= 7\n}\n\n// flush32 will flush out, so there are at least 32 bits available for writing.\nfunc (b *bitWriter) flush32() {\n\tif b.nBits < 32 {\n\t\treturn\n\t}\n\tb.out = append(b.out,\n\t\tbyte(b.bitContainer),\n\t\tbyte(b.bitContainer>>8),\n\t\tbyte(b.bitContainer>>16),\n\t\tbyte(b.bitContainer>>24))\n\tb.nBits -= 32\n\tb.bitContainer >>= 32\n}\n\n// flushAlign will flush remaining full bytes and align to next byte boundary.\nfunc (b *bitWriter) flushAlign() {\n\tnbBytes := (b.nBits + 7) >> 3\n\tfor i := range nbBytes {\n\t\tb.out = append(b.out, byte(b.bitContainer>>(i*8)))\n\t}\n\tb.nBits = 0\n\tb.bitContainer = 0\n}\n\n// close will write the alignment bit and write the final byte(s)\n// to the output.\nfunc (b *bitWriter) close() {\n\t// End mark\n\tb.addBits16Clean(1, 1)\n\t// flush until next byte.\n\tb.flushAlign()\n}\n\n// reset and continue writing by appending to out.\nfunc (b *bitWriter) reset(out []byte) {\n\tb.bitContainer = 0\n\tb.nBits = 0\n\tb.out = out\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/bytereader.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage fse\n\n// byteReader provides a byte reader that reads\n// little endian values from a byte stream.\n// The input stream is manually advanced.\n// The reader performs no bounds checks.\ntype byteReader struct {\n\tb   []byte\n\toff int\n}\n\n// init will initialize the reader and set the input.\nfunc (b *byteReader) init(in []byte) {\n\tb.b = in\n\tb.off = 0\n}\n\n// advance the stream b n bytes.\nfunc (b *byteReader) advance(n uint) {\n\tb.off += int(n)\n}\n\n// Uint32 returns a little endian uint32 starting at current offset.\nfunc (b byteReader) Uint32() uint32 {\n\tb2 := b.b[b.off:]\n\tb2 = b2[:4]\n\tv3 := uint32(b2[3])\n\tv2 := uint32(b2[2])\n\tv1 := uint32(b2[1])\n\tv0 := uint32(b2[0])\n\treturn v0 | (v1 << 8) | (v2 << 16) | (v3 << 24)\n}\n\n// unread returns the unread portion of the input.\nfunc (b byteReader) unread() []byte {\n\treturn b.b[b.off:]\n}\n\n// remain will return the number of bytes remaining.\nfunc (b byteReader) remain() int {\n\treturn len(b.b) - b.off\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/compress.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage fse\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// Compress the input bytes. Input must be < 2GB.\n// Provide a Scratch buffer to avoid memory allocations.\n// Note that the output is also kept in the scratch buffer.\n// If input is too hard to compress, ErrIncompressible is returned.\n// If input is a single byte value repeated ErrUseRLE is returned.\nfunc Compress(in []byte, s *Scratch) ([]byte, error) {\n\tif len(in) <= 1 {\n\t\treturn nil, ErrIncompressible\n\t}\n\tif len(in) > (2<<30)-1 {\n\t\treturn nil, errors.New(\"input too big, must be < 2GB\")\n\t}\n\ts, err := s.prepare(in)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Create histogram, if none was provided.\n\tmaxCount := s.maxCount\n\tif maxCount == 0 {\n\t\tmaxCount = s.countSimple(in)\n\t}\n\t// Reset for next run.\n\ts.clearCount = true\n\ts.maxCount = 0\n\tif maxCount == len(in) {\n\t\t// One symbol, use RLE\n\t\treturn nil, ErrUseRLE\n\t}\n\tif maxCount == 1 || maxCount < (len(in)>>7) {\n\t\t// Each symbol present maximum once or too well distributed.\n\t\treturn nil, ErrIncompressible\n\t}\n\ts.optimalTableLog()\n\terr = s.normalizeCount()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = s.writeCount()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif false {\n\t\terr = s.validateNorm()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\terr = s.buildCTable()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = s.compress(in)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts.Out = s.bw.out\n\t// Check if we compressed.\n\tif len(s.Out) >= len(in) {\n\t\treturn nil, ErrIncompressible\n\t}\n\treturn s.Out, nil\n}\n\n// cState contains the compression state of a stream.\ntype cState struct {\n\tbw         *bitWriter\n\tstateTable []uint16\n\tstate      uint16\n}\n\n// init will initialize the compression state to the first symbol of the stream.\nfunc (c *cState) init(bw *bitWriter, ct *cTable, tableLog uint8, first symbolTransform) {\n\tc.bw = bw\n\tc.stateTable = ct.stateTable\n\n\tnbBitsOut := (first.deltaNbBits + (1 << 15)) >> 16\n\tim := int32((nbBitsOut << 16) - first.deltaNbBits)\n\tlu := (im >> nbBitsOut) + first.deltaFindState\n\tc.state = c.stateTable[lu]\n}\n\n// encode the output symbol provided and write it to the bitstream.\nfunc (c *cState) encode(symbolTT symbolTransform) {\n\tnbBitsOut := (uint32(c.state) + symbolTT.deltaNbBits) >> 16\n\tdstState := int32(c.state>>(nbBitsOut&15)) + symbolTT.deltaFindState\n\tc.bw.addBits16NC(c.state, uint8(nbBitsOut))\n\tc.state = c.stateTable[dstState]\n}\n\n// encode the output symbol provided and write it to the bitstream.\nfunc (c *cState) encodeZero(symbolTT symbolTransform) {\n\tnbBitsOut := (uint32(c.state) + symbolTT.deltaNbBits) >> 16\n\tdstState := int32(c.state>>(nbBitsOut&15)) + symbolTT.deltaFindState\n\tc.bw.addBits16ZeroNC(c.state, uint8(nbBitsOut))\n\tc.state = c.stateTable[dstState]\n}\n\n// flush will write the tablelog to the output and flush the remaining full bytes.\nfunc (c *cState) flush(tableLog uint8) {\n\tc.bw.flush32()\n\tc.bw.addBits16NC(c.state, tableLog)\n\tc.bw.flush()\n}\n\n// compress is the main compression loop that will encode the input from the last byte to the first.\nfunc (s *Scratch) compress(src []byte) error {\n\tif len(src) <= 2 {\n\t\treturn errors.New(\"compress: src too small\")\n\t}\n\ttt := s.ct.symbolTT[:256]\n\ts.bw.reset(s.Out)\n\n\t// Our two states each encodes every second byte.\n\t// Last byte encoded (first byte decoded) will always be encoded by c1.\n\tvar c1, c2 cState\n\n\t// Encode so remaining size is divisible by 4.\n\tip := len(src)\n\tif ip&1 == 1 {\n\t\tc1.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-1]])\n\t\tc2.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-2]])\n\t\tc1.encodeZero(tt[src[ip-3]])\n\t\tip -= 3\n\t} else {\n\t\tc2.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-1]])\n\t\tc1.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-2]])\n\t\tip -= 2\n\t}\n\tif ip&2 != 0 {\n\t\tc2.encodeZero(tt[src[ip-1]])\n\t\tc1.encodeZero(tt[src[ip-2]])\n\t\tip -= 2\n\t}\n\tsrc = src[:ip]\n\n\t// Main compression loop.\n\tswitch {\n\tcase !s.zeroBits && s.actualTableLog <= 8:\n\t\t// We can encode 4 symbols without requiring a flush.\n\t\t// We do not need to check if any output is 0 bits.\n\t\tfor ; len(src) >= 4; src = src[:len(src)-4] {\n\t\t\ts.bw.flush32()\n\t\t\tv3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1]\n\t\t\tc2.encode(tt[v0])\n\t\t\tc1.encode(tt[v1])\n\t\t\tc2.encode(tt[v2])\n\t\t\tc1.encode(tt[v3])\n\t\t}\n\tcase !s.zeroBits:\n\t\t// We do not need to check if any output is 0 bits.\n\t\tfor ; len(src) >= 4; src = src[:len(src)-4] {\n\t\t\ts.bw.flush32()\n\t\t\tv3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1]\n\t\t\tc2.encode(tt[v0])\n\t\t\tc1.encode(tt[v1])\n\t\t\ts.bw.flush32()\n\t\t\tc2.encode(tt[v2])\n\t\t\tc1.encode(tt[v3])\n\t\t}\n\tcase s.actualTableLog <= 8:\n\t\t// We can encode 4 symbols without requiring a flush\n\t\tfor ; len(src) >= 4; src = src[:len(src)-4] {\n\t\t\ts.bw.flush32()\n\t\t\tv3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1]\n\t\t\tc2.encodeZero(tt[v0])\n\t\t\tc1.encodeZero(tt[v1])\n\t\t\tc2.encodeZero(tt[v2])\n\t\t\tc1.encodeZero(tt[v3])\n\t\t}\n\tdefault:\n\t\tfor ; len(src) >= 4; src = src[:len(src)-4] {\n\t\t\ts.bw.flush32()\n\t\t\tv3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1]\n\t\t\tc2.encodeZero(tt[v0])\n\t\t\tc1.encodeZero(tt[v1])\n\t\t\ts.bw.flush32()\n\t\t\tc2.encodeZero(tt[v2])\n\t\t\tc1.encodeZero(tt[v3])\n\t\t}\n\t}\n\n\t// Flush final state.\n\t// Used to initialize state when decoding.\n\tc2.flush(s.actualTableLog)\n\tc1.flush(s.actualTableLog)\n\n\ts.bw.close()\n\treturn nil\n}\n\n// writeCount will write the normalized histogram count to header.\n// This is read back by readNCount.\nfunc (s *Scratch) writeCount() error {\n\tvar (\n\t\ttableLog  = s.actualTableLog\n\t\ttableSize = 1 << tableLog\n\t\tprevious0 bool\n\t\tcharnum   uint16\n\n\t\tmaxHeaderSize = ((int(s.symbolLen)*int(tableLog) + 4 + 2) >> 3) + 3\n\n\t\t// Write Table Size\n\t\tbitStream = uint32(tableLog - minTablelog)\n\t\tbitCount  = uint(4)\n\t\tremaining = int16(tableSize + 1) /* +1 for extra accuracy */\n\t\tthreshold = int16(tableSize)\n\t\tnbBits    = uint(tableLog + 1)\n\t)\n\tif cap(s.Out) < maxHeaderSize {\n\t\ts.Out = make([]byte, 0, s.br.remain()+maxHeaderSize)\n\t}\n\toutP := uint(0)\n\tout := s.Out[:maxHeaderSize]\n\n\t// stops at 1\n\tfor remaining > 1 {\n\t\tif previous0 {\n\t\t\tstart := charnum\n\t\t\tfor s.norm[charnum] == 0 {\n\t\t\t\tcharnum++\n\t\t\t}\n\t\t\tfor charnum >= start+24 {\n\t\t\t\tstart += 24\n\t\t\t\tbitStream += uint32(0xFFFF) << bitCount\n\t\t\t\tout[outP] = byte(bitStream)\n\t\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\t\toutP += 2\n\t\t\t\tbitStream >>= 16\n\t\t\t}\n\t\t\tfor charnum >= start+3 {\n\t\t\t\tstart += 3\n\t\t\t\tbitStream += 3 << bitCount\n\t\t\t\tbitCount += 2\n\t\t\t}\n\t\t\tbitStream += uint32(charnum-start) << bitCount\n\t\t\tbitCount += 2\n\t\t\tif bitCount > 16 {\n\t\t\t\tout[outP] = byte(bitStream)\n\t\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\t\toutP += 2\n\t\t\t\tbitStream >>= 16\n\t\t\t\tbitCount -= 16\n\t\t\t}\n\t\t}\n\n\t\tcount := s.norm[charnum]\n\t\tcharnum++\n\t\tmax := (2*threshold - 1) - remaining\n\t\tif count < 0 {\n\t\t\tremaining += count\n\t\t} else {\n\t\t\tremaining -= count\n\t\t}\n\t\tcount++ // +1 for extra accuracy\n\t\tif count >= threshold {\n\t\t\tcount += max // [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[\n\t\t}\n\t\tbitStream += uint32(count) << bitCount\n\t\tbitCount += nbBits\n\t\tif count < max {\n\t\t\tbitCount--\n\t\t}\n\n\t\tprevious0 = count == 1\n\t\tif remaining < 1 {\n\t\t\treturn errors.New(\"internal error: remaining<1\")\n\t\t}\n\t\tfor remaining < threshold {\n\t\t\tnbBits--\n\t\t\tthreshold >>= 1\n\t\t}\n\n\t\tif bitCount > 16 {\n\t\t\tout[outP] = byte(bitStream)\n\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\toutP += 2\n\t\t\tbitStream >>= 16\n\t\t\tbitCount -= 16\n\t\t}\n\t}\n\n\tout[outP] = byte(bitStream)\n\tout[outP+1] = byte(bitStream >> 8)\n\toutP += (bitCount + 7) / 8\n\n\tif charnum > s.symbolLen {\n\t\treturn errors.New(\"internal error: charnum > s.symbolLen\")\n\t}\n\ts.Out = out[:outP]\n\treturn nil\n}\n\n// symbolTransform contains the state transform for a symbol.\ntype symbolTransform struct {\n\tdeltaFindState int32\n\tdeltaNbBits    uint32\n}\n\n// String prints values as a human readable string.\nfunc (s symbolTransform) String() string {\n\treturn fmt.Sprintf(\"dnbits: %08x, fs:%d\", s.deltaNbBits, s.deltaFindState)\n}\n\n// cTable contains tables used for compression.\ntype cTable struct {\n\ttableSymbol []byte\n\tstateTable  []uint16\n\tsymbolTT    []symbolTransform\n}\n\n// allocCtable will allocate tables needed for compression.\n// If existing tables a re big enough, they are simply re-used.\nfunc (s *Scratch) allocCtable() {\n\ttableSize := 1 << s.actualTableLog\n\t// get tableSymbol that is big enough.\n\tif cap(s.ct.tableSymbol) < tableSize {\n\t\ts.ct.tableSymbol = make([]byte, tableSize)\n\t}\n\ts.ct.tableSymbol = s.ct.tableSymbol[:tableSize]\n\n\tctSize := tableSize\n\tif cap(s.ct.stateTable) < ctSize {\n\t\ts.ct.stateTable = make([]uint16, ctSize)\n\t}\n\ts.ct.stateTable = s.ct.stateTable[:ctSize]\n\n\tif cap(s.ct.symbolTT) < 256 {\n\t\ts.ct.symbolTT = make([]symbolTransform, 256)\n\t}\n\ts.ct.symbolTT = s.ct.symbolTT[:256]\n}\n\n// buildCTable will populate the compression table so it is ready to be used.\nfunc (s *Scratch) buildCTable() error {\n\ttableSize := uint32(1 << s.actualTableLog)\n\thighThreshold := tableSize - 1\n\tvar cumul [maxSymbolValue + 2]int16\n\n\ts.allocCtable()\n\ttableSymbol := s.ct.tableSymbol[:tableSize]\n\t// symbol start positions\n\t{\n\t\tcumul[0] = 0\n\t\tfor ui, v := range s.norm[:s.symbolLen-1] {\n\t\t\tu := byte(ui) // one less than reference\n\t\t\tif v == -1 {\n\t\t\t\t// Low proba symbol\n\t\t\t\tcumul[u+1] = cumul[u] + 1\n\t\t\t\ttableSymbol[highThreshold] = u\n\t\t\t\thighThreshold--\n\t\t\t} else {\n\t\t\t\tcumul[u+1] = cumul[u] + v\n\t\t\t}\n\t\t}\n\t\t// Encode last symbol separately to avoid overflowing u\n\t\tu := int(s.symbolLen - 1)\n\t\tv := s.norm[s.symbolLen-1]\n\t\tif v == -1 {\n\t\t\t// Low proba symbol\n\t\t\tcumul[u+1] = cumul[u] + 1\n\t\t\ttableSymbol[highThreshold] = byte(u)\n\t\t\thighThreshold--\n\t\t} else {\n\t\t\tcumul[u+1] = cumul[u] + v\n\t\t}\n\t\tif uint32(cumul[s.symbolLen]) != tableSize {\n\t\t\treturn fmt.Errorf(\"internal error: expected cumul[s.symbolLen] (%d) == tableSize (%d)\", cumul[s.symbolLen], tableSize)\n\t\t}\n\t\tcumul[s.symbolLen] = int16(tableSize) + 1\n\t}\n\t// Spread symbols\n\ts.zeroBits = false\n\t{\n\t\tstep := tableStep(tableSize)\n\t\ttableMask := tableSize - 1\n\t\tvar position uint32\n\t\t// if any symbol > largeLimit, we may have 0 bits output.\n\t\tlargeLimit := int16(1 << (s.actualTableLog - 1))\n\t\tfor ui, v := range s.norm[:s.symbolLen] {\n\t\t\tsymbol := byte(ui)\n\t\t\tif v > largeLimit {\n\t\t\t\ts.zeroBits = true\n\t\t\t}\n\t\t\tfor range v {\n\t\t\t\ttableSymbol[position] = symbol\n\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\tfor position > highThreshold {\n\t\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\t} /* Low proba area */\n\t\t\t}\n\t\t}\n\n\t\t// Check if we have gone through all positions\n\t\tif position != 0 {\n\t\t\treturn errors.New(\"position!=0\")\n\t\t}\n\t}\n\n\t// Build table\n\ttable := s.ct.stateTable\n\t{\n\t\ttsi := int(tableSize)\n\t\tfor u, v := range tableSymbol {\n\t\t\t// TableU16 : sorted by symbol order; gives next state value\n\t\t\ttable[cumul[v]] = uint16(tsi + u)\n\t\t\tcumul[v]++\n\t\t}\n\t}\n\n\t// Build Symbol Transformation Table\n\t{\n\t\ttotal := int16(0)\n\t\tsymbolTT := s.ct.symbolTT[:s.symbolLen]\n\t\ttableLog := s.actualTableLog\n\t\ttl := (uint32(tableLog) << 16) - (1 << tableLog)\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tswitch v {\n\t\t\tcase 0:\n\t\t\tcase -1, 1:\n\t\t\t\tsymbolTT[i].deltaNbBits = tl\n\t\t\t\tsymbolTT[i].deltaFindState = int32(total - 1)\n\t\t\t\ttotal++\n\t\t\tdefault:\n\t\t\t\tmaxBitsOut := uint32(tableLog) - highBits(uint32(v-1))\n\t\t\t\tminStatePlus := uint32(v) << maxBitsOut\n\t\t\t\tsymbolTT[i].deltaNbBits = (maxBitsOut << 16) - minStatePlus\n\t\t\t\tsymbolTT[i].deltaFindState = int32(total - v)\n\t\t\t\ttotal += v\n\t\t\t}\n\t\t}\n\t\tif total != int16(tableSize) {\n\t\t\treturn fmt.Errorf(\"total mismatch %d (got) != %d (want)\", total, tableSize)\n\t\t}\n\t}\n\treturn nil\n}\n\n// countSimple will create a simple histogram in s.count.\n// Returns the biggest count.\n// Does not update s.clearCount.\nfunc (s *Scratch) countSimple(in []byte) (max int) {\n\tfor _, v := range in {\n\t\ts.count[v]++\n\t}\n\tm, symlen := uint32(0), s.symbolLen\n\tfor i, v := range s.count[:] {\n\t\tif v == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif v > m {\n\t\t\tm = v\n\t\t}\n\t\tsymlen = uint16(i) + 1\n\t}\n\ts.symbolLen = symlen\n\treturn int(m)\n}\n\n// minTableLog provides the minimum logSize to safely represent a distribution.\nfunc (s *Scratch) minTableLog() uint8 {\n\tminBitsSrc := highBits(uint32(s.br.remain()-1)) + 1\n\tminBitsSymbols := highBits(uint32(s.symbolLen-1)) + 2\n\tif minBitsSrc < minBitsSymbols {\n\t\treturn uint8(minBitsSrc)\n\t}\n\treturn uint8(minBitsSymbols)\n}\n\n// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog\nfunc (s *Scratch) optimalTableLog() {\n\ttableLog := s.TableLog\n\tminBits := s.minTableLog()\n\tmaxBitsSrc := uint8(highBits(uint32(s.br.remain()-1))) - 2\n\tif maxBitsSrc < tableLog {\n\t\t// Accuracy can be reduced\n\t\ttableLog = maxBitsSrc\n\t}\n\tif minBits > tableLog {\n\t\ttableLog = minBits\n\t}\n\t// Need a minimum to safely represent all symbol values\n\tif tableLog < minTablelog {\n\t\ttableLog = minTablelog\n\t}\n\tif tableLog > maxTableLog {\n\t\ttableLog = maxTableLog\n\t}\n\ts.actualTableLog = tableLog\n}\n\nvar rtbTable = [...]uint32{0, 473195, 504333, 520860, 550000, 700000, 750000, 830000}\n\n// normalizeCount will normalize the count of the symbols so\n// the total is equal to the table size.\nfunc (s *Scratch) normalizeCount() error {\n\tvar (\n\t\ttableLog          = s.actualTableLog\n\t\tscale             = 62 - uint64(tableLog)\n\t\tstep              = (1 << 62) / uint64(s.br.remain())\n\t\tvStep             = uint64(1) << (scale - 20)\n\t\tstillToDistribute = int16(1 << tableLog)\n\t\tlargest           int\n\t\tlargestP          int16\n\t\tlowThreshold      = (uint32)(s.br.remain() >> tableLog)\n\t)\n\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t// already handled\n\t\t// if (count[s] == s.length) return 0;   /* rle special case */\n\n\t\tif cnt == 0 {\n\t\t\ts.norm[i] = 0\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowThreshold {\n\t\t\ts.norm[i] = -1\n\t\t\tstillToDistribute--\n\t\t} else {\n\t\t\tproba := (int16)((uint64(cnt) * step) >> scale)\n\t\t\tif proba < 8 {\n\t\t\t\trestToBeat := vStep * uint64(rtbTable[proba])\n\t\t\t\tv := uint64(cnt)*step - (uint64(proba) << scale)\n\t\t\t\tif v > restToBeat {\n\t\t\t\t\tproba++\n\t\t\t\t}\n\t\t\t}\n\t\t\tif proba > largestP {\n\t\t\t\tlargestP = proba\n\t\t\t\tlargest = i\n\t\t\t}\n\t\t\ts.norm[i] = proba\n\t\t\tstillToDistribute -= proba\n\t\t}\n\t}\n\n\tif -stillToDistribute >= (s.norm[largest] >> 1) {\n\t\t// corner case, need another normalization method\n\t\treturn s.normalizeCount2()\n\t}\n\ts.norm[largest] += stillToDistribute\n\treturn nil\n}\n\n// Secondary normalization method.\n// To be used when primary method fails.\nfunc (s *Scratch) normalizeCount2() error {\n\tconst notYetAssigned = -2\n\tvar (\n\t\tdistributed  uint32\n\t\ttotal        = uint32(s.br.remain())\n\t\ttableLog     = s.actualTableLog\n\t\tlowThreshold = total >> tableLog\n\t\tlowOne       = (total * 3) >> (tableLog + 1)\n\t)\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\tif cnt == 0 {\n\t\t\ts.norm[i] = 0\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowThreshold {\n\t\t\ts.norm[i] = -1\n\t\t\tdistributed++\n\t\t\ttotal -= cnt\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowOne {\n\t\t\ts.norm[i] = 1\n\t\t\tdistributed++\n\t\t\ttotal -= cnt\n\t\t\tcontinue\n\t\t}\n\t\ts.norm[i] = notYetAssigned\n\t}\n\ttoDistribute := (1 << tableLog) - distributed\n\n\tif (total / toDistribute) > lowOne {\n\t\t// risk of rounding to zero\n\t\tlowOne = (total * 3) / (toDistribute * 2)\n\t\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t\tif (s.norm[i] == notYetAssigned) && (cnt <= lowOne) {\n\t\t\t\ts.norm[i] = 1\n\t\t\t\tdistributed++\n\t\t\t\ttotal -= cnt\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\ttoDistribute = (1 << tableLog) - distributed\n\t}\n\tif distributed == uint32(s.symbolLen)+1 {\n\t\t// all values are pretty poor;\n\t\t//   probably incompressible data (should have already been detected);\n\t\t//   find max, then give all remaining points to max\n\t\tvar maxV int\n\t\tvar maxC uint32\n\t\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t\tif cnt > maxC {\n\t\t\t\tmaxV = i\n\t\t\t\tmaxC = cnt\n\t\t\t}\n\t\t}\n\t\ts.norm[maxV] += int16(toDistribute)\n\t\treturn nil\n\t}\n\n\tif total == 0 {\n\t\t// all of the symbols were low enough for the lowOne or lowThreshold\n\t\tfor i := uint32(0); toDistribute > 0; i = (i + 1) % (uint32(s.symbolLen)) {\n\t\t\tif s.norm[i] > 0 {\n\t\t\t\ttoDistribute--\n\t\t\t\ts.norm[i]++\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tvar (\n\t\tvStepLog = 62 - uint64(tableLog)\n\t\tmid      = uint64((1 << (vStepLog - 1)) - 1)\n\t\trStep    = (((1 << vStepLog) * uint64(toDistribute)) + mid) / uint64(total) // scale on remaining\n\t\ttmpTotal = mid\n\t)\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\tif s.norm[i] == notYetAssigned {\n\t\t\tvar (\n\t\t\t\tend    = tmpTotal + uint64(cnt)*rStep\n\t\t\t\tsStart = uint32(tmpTotal >> vStepLog)\n\t\t\t\tsEnd   = uint32(end >> vStepLog)\n\t\t\t\tweight = sEnd - sStart\n\t\t\t)\n\t\t\tif weight < 1 {\n\t\t\t\treturn errors.New(\"weight < 1\")\n\t\t\t}\n\t\t\ts.norm[i] = int16(weight)\n\t\t\ttmpTotal = end\n\t\t}\n\t}\n\treturn nil\n}\n\n// validateNorm validates the normalized histogram table.\nfunc (s *Scratch) validateNorm() (err error) {\n\tvar total int\n\tfor _, v := range s.norm[:s.symbolLen] {\n\t\tif v >= 0 {\n\t\t\ttotal += int(v)\n\t\t} else {\n\t\t\ttotal -= int(v)\n\t\t}\n\t}\n\tdefer func() {\n\t\tif err == nil {\n\t\t\treturn\n\t\t}\n\t\tfmt.Printf(\"selected TableLog: %d, Symbol length: %d\\n\", s.actualTableLog, s.symbolLen)\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tfmt.Printf(\"%3d: %5d -> %4d \\n\", i, s.count[i], v)\n\t\t}\n\t}()\n\tif total != (1 << s.actualTableLog) {\n\t\treturn fmt.Errorf(\"warning: Total == %d != %d\", total, 1<<s.actualTableLog)\n\t}\n\tfor i, v := range s.count[s.symbolLen:] {\n\t\tif v != 0 {\n\t\t\treturn fmt.Errorf(\"warning: Found symbol out of range, %d after cut\", i)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/decompress.go",
    "content": "package fse\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nconst (\n\ttablelogAbsoluteMax = 15\n)\n\n// Decompress a block of data.\n// You can provide a scratch buffer to avoid allocations.\n// If nil is provided a temporary one will be allocated.\n// It is possible, but by no way guaranteed that corrupt data will\n// return an error.\n// It is up to the caller to verify integrity of the returned data.\n// Use a predefined Scratch to set maximum acceptable output size.\nfunc Decompress(b []byte, s *Scratch) ([]byte, error) {\n\ts, err := s.prepare(b)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts.Out = s.Out[:0]\n\terr = s.readNCount()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = s.buildDtable()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = s.decompress()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn s.Out, nil\n}\n\n// readNCount will read the symbol distribution so decoding tables can be constructed.\nfunc (s *Scratch) readNCount() error {\n\tvar (\n\t\tcharnum   uint16\n\t\tprevious0 bool\n\t\tb         = &s.br\n\t)\n\tiend := b.remain()\n\tif iend < 4 {\n\t\treturn errors.New(\"input too small\")\n\t}\n\tbitStream := b.Uint32()\n\tnbBits := uint((bitStream & 0xF) + minTablelog) // extract tableLog\n\tif nbBits > tablelogAbsoluteMax {\n\t\treturn errors.New(\"tableLog too large\")\n\t}\n\tbitStream >>= 4\n\tbitCount := uint(4)\n\n\ts.actualTableLog = uint8(nbBits)\n\tremaining := int32((1 << nbBits) + 1)\n\tthreshold := int32(1 << nbBits)\n\tgotTotal := int32(0)\n\tnbBits++\n\n\tfor remaining > 1 {\n\t\tif previous0 {\n\t\t\tn0 := charnum\n\t\t\tfor (bitStream & 0xFFFF) == 0xFFFF {\n\t\t\t\tn0 += 24\n\t\t\t\tif b.off < iend-5 {\n\t\t\t\t\tb.advance(2)\n\t\t\t\t\tbitStream = b.Uint32() >> bitCount\n\t\t\t\t} else {\n\t\t\t\t\tbitStream >>= 16\n\t\t\t\t\tbitCount += 16\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (bitStream & 3) == 3 {\n\t\t\t\tn0 += 3\n\t\t\t\tbitStream >>= 2\n\t\t\t\tbitCount += 2\n\t\t\t}\n\t\t\tn0 += uint16(bitStream & 3)\n\t\t\tbitCount += 2\n\t\t\tif n0 > maxSymbolValue {\n\t\t\t\treturn errors.New(\"maxSymbolValue too small\")\n\t\t\t}\n\t\t\tfor charnum < n0 {\n\t\t\t\ts.norm[charnum&0xff] = 0\n\t\t\t\tcharnum++\n\t\t\t}\n\n\t\t\tif b.off <= iend-7 || b.off+int(bitCount>>3) <= iend-4 {\n\t\t\t\tb.advance(bitCount >> 3)\n\t\t\t\tbitCount &= 7\n\t\t\t\tbitStream = b.Uint32() >> bitCount\n\t\t\t} else {\n\t\t\t\tbitStream >>= 2\n\t\t\t}\n\t\t}\n\n\t\tmax := (2*(threshold) - 1) - (remaining)\n\t\tvar count int32\n\n\t\tif (int32(bitStream) & (threshold - 1)) < max {\n\t\t\tcount = int32(bitStream) & (threshold - 1)\n\t\t\tbitCount += nbBits - 1\n\t\t} else {\n\t\t\tcount = int32(bitStream) & (2*threshold - 1)\n\t\t\tif count >= threshold {\n\t\t\t\tcount -= max\n\t\t\t}\n\t\t\tbitCount += nbBits\n\t\t}\n\n\t\tcount-- // extra accuracy\n\t\tif count < 0 {\n\t\t\t// -1 means +1\n\t\t\tremaining += count\n\t\t\tgotTotal -= count\n\t\t} else {\n\t\t\tremaining -= count\n\t\t\tgotTotal += count\n\t\t}\n\t\ts.norm[charnum&0xff] = int16(count)\n\t\tcharnum++\n\t\tprevious0 = count == 0\n\t\tfor remaining < threshold {\n\t\t\tnbBits--\n\t\t\tthreshold >>= 1\n\t\t}\n\t\tif b.off <= iend-7 || b.off+int(bitCount>>3) <= iend-4 {\n\t\t\tb.advance(bitCount >> 3)\n\t\t\tbitCount &= 7\n\t\t} else {\n\t\t\tbitCount -= (uint)(8 * (len(b.b) - 4 - b.off))\n\t\t\tb.off = len(b.b) - 4\n\t\t}\n\t\tbitStream = b.Uint32() >> (bitCount & 31)\n\t}\n\ts.symbolLen = charnum\n\n\tif s.symbolLen <= 1 {\n\t\treturn fmt.Errorf(\"symbolLen (%d) too small\", s.symbolLen)\n\t}\n\tif s.symbolLen > maxSymbolValue+1 {\n\t\treturn fmt.Errorf(\"symbolLen (%d) too big\", s.symbolLen)\n\t}\n\tif remaining != 1 {\n\t\treturn fmt.Errorf(\"corruption detected (remaining %d != 1)\", remaining)\n\t}\n\tif bitCount > 32 {\n\t\treturn fmt.Errorf(\"corruption detected (bitCount %d > 32)\", bitCount)\n\t}\n\tif gotTotal != 1<<s.actualTableLog {\n\t\treturn fmt.Errorf(\"corruption detected (total %d != %d)\", gotTotal, 1<<s.actualTableLog)\n\t}\n\tb.advance((bitCount + 7) >> 3)\n\treturn nil\n}\n\n// decSymbol contains information about a state entry,\n// Including the state offset base, the output symbol and\n// the number of bits to read for the low part of the destination state.\ntype decSymbol struct {\n\tnewState uint16\n\tsymbol   uint8\n\tnbBits   uint8\n}\n\n// allocDtable will allocate decoding tables if they are not big enough.\nfunc (s *Scratch) allocDtable() {\n\ttableSize := 1 << s.actualTableLog\n\tif cap(s.decTable) < tableSize {\n\t\ts.decTable = make([]decSymbol, tableSize)\n\t}\n\ts.decTable = s.decTable[:tableSize]\n\n\tif cap(s.ct.tableSymbol) < 256 {\n\t\ts.ct.tableSymbol = make([]byte, 256)\n\t}\n\ts.ct.tableSymbol = s.ct.tableSymbol[:256]\n\n\tif cap(s.ct.stateTable) < 256 {\n\t\ts.ct.stateTable = make([]uint16, 256)\n\t}\n\ts.ct.stateTable = s.ct.stateTable[:256]\n}\n\n// buildDtable will build the decoding table.\nfunc (s *Scratch) buildDtable() error {\n\ttableSize := uint32(1 << s.actualTableLog)\n\thighThreshold := tableSize - 1\n\ts.allocDtable()\n\tsymbolNext := s.ct.stateTable[:256]\n\n\t// Init, lay down lowprob symbols\n\ts.zeroBits = false\n\t{\n\t\tlargeLimit := int16(1 << (s.actualTableLog - 1))\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tif v == -1 {\n\t\t\t\ts.decTable[highThreshold].symbol = uint8(i)\n\t\t\t\thighThreshold--\n\t\t\t\tsymbolNext[i] = 1\n\t\t\t} else {\n\t\t\t\tif v >= largeLimit {\n\t\t\t\t\ts.zeroBits = true\n\t\t\t\t}\n\t\t\t\tsymbolNext[i] = uint16(v)\n\t\t\t}\n\t\t}\n\t}\n\t// Spread symbols\n\t{\n\t\ttableMask := tableSize - 1\n\t\tstep := tableStep(tableSize)\n\t\tposition := uint32(0)\n\t\tfor ss, v := range s.norm[:s.symbolLen] {\n\t\t\tfor i := 0; i < int(v); i++ {\n\t\t\t\ts.decTable[position].symbol = uint8(ss)\n\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\tfor position > highThreshold {\n\t\t\t\t\t// lowprob area\n\t\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif position != 0 {\n\t\t\t// position must reach all cells once, otherwise normalizedCounter is incorrect\n\t\t\treturn errors.New(\"corrupted input (position != 0)\")\n\t\t}\n\t}\n\n\t// Build Decoding table\n\t{\n\t\ttableSize := uint16(1 << s.actualTableLog)\n\t\tfor u, v := range s.decTable {\n\t\t\tsymbol := v.symbol\n\t\t\tnextState := symbolNext[symbol]\n\t\t\tsymbolNext[symbol] = nextState + 1\n\t\t\tnBits := s.actualTableLog - byte(highBits(uint32(nextState)))\n\t\t\ts.decTable[u].nbBits = nBits\n\t\t\tnewState := (nextState << nBits) - tableSize\n\t\t\tif newState >= tableSize {\n\t\t\t\treturn fmt.Errorf(\"newState (%d) outside table size (%d)\", newState, tableSize)\n\t\t\t}\n\t\t\tif newState == uint16(u) && nBits == 0 {\n\t\t\t\t// Seems weird that this is possible with nbits > 0.\n\t\t\t\treturn fmt.Errorf(\"newState (%d) == oldState (%d) and no bits\", newState, u)\n\t\t\t}\n\t\t\ts.decTable[u].newState = newState\n\t\t}\n\t}\n\treturn nil\n}\n\n// decompress will decompress the bitstream.\n// If the buffer is over-read an error is returned.\nfunc (s *Scratch) decompress() error {\n\tbr := &s.bits\n\tif err := br.init(s.br.unread()); err != nil {\n\t\treturn err\n\t}\n\n\tvar s1, s2 decoder\n\t// Initialize and decode first state and symbol.\n\ts1.init(br, s.decTable, s.actualTableLog)\n\ts2.init(br, s.decTable, s.actualTableLog)\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tvar tmp = s.ct.tableSymbol[:256]\n\tvar off uint8\n\n\t// Main part\n\tif !s.zeroBits {\n\t\tfor br.off >= 8 {\n\t\t\tbr.fillFast()\n\t\t\ttmp[off+0] = s1.nextFast()\n\t\t\ttmp[off+1] = s2.nextFast()\n\t\t\tbr.fillFast()\n\t\t\ttmp[off+2] = s1.nextFast()\n\t\t\ttmp[off+3] = s2.nextFast()\n\t\t\toff += 4\n\t\t\t// When off is 0, we have overflowed and should write.\n\t\t\tif off == 0 {\n\t\t\t\ts.Out = append(s.Out, tmp...)\n\t\t\t\tif len(s.Out) >= s.DecompressLimit {\n\t\t\t\t\treturn fmt.Errorf(\"output size (%d) > DecompressLimit (%d)\", len(s.Out), s.DecompressLimit)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor br.off >= 8 {\n\t\t\tbr.fillFast()\n\t\t\ttmp[off+0] = s1.next()\n\t\t\ttmp[off+1] = s2.next()\n\t\t\tbr.fillFast()\n\t\t\ttmp[off+2] = s1.next()\n\t\t\ttmp[off+3] = s2.next()\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\ts.Out = append(s.Out, tmp...)\n\t\t\t\t// When off is 0, we have overflowed and should write.\n\t\t\t\tif len(s.Out) >= s.DecompressLimit {\n\t\t\t\t\treturn fmt.Errorf(\"output size (%d) > DecompressLimit (%d)\", len(s.Out), s.DecompressLimit)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ts.Out = append(s.Out, tmp[:off]...)\n\n\t// Final bits, a bit more expensive check\n\tfor {\n\t\tif s1.finished() {\n\t\t\ts.Out = append(s.Out, s1.final(), s2.final())\n\t\t\tbreak\n\t\t}\n\t\tbr.fill()\n\t\ts.Out = append(s.Out, s1.next())\n\t\tif s2.finished() {\n\t\t\ts.Out = append(s.Out, s2.final(), s1.final())\n\t\t\tbreak\n\t\t}\n\t\ts.Out = append(s.Out, s2.next())\n\t\tif len(s.Out) >= s.DecompressLimit {\n\t\t\treturn fmt.Errorf(\"output size (%d) > DecompressLimit (%d)\", len(s.Out), s.DecompressLimit)\n\t\t}\n\t}\n\treturn br.close()\n}\n\n// decoder keeps track of the current state and updates it from the bitstream.\ntype decoder struct {\n\tstate uint16\n\tbr    *bitReader\n\tdt    []decSymbol\n}\n\n// init will initialize the decoder and read the first state from the stream.\nfunc (d *decoder) init(in *bitReader, dt []decSymbol, tableLog uint8) {\n\td.dt = dt\n\td.br = in\n\td.state = in.getBits(tableLog)\n}\n\n// next returns the next symbol and sets the next state.\n// At least tablelog bits must be available in the bit reader.\nfunc (d *decoder) next() uint8 {\n\tn := &d.dt[d.state]\n\tlowBits := d.br.getBits(n.nbBits)\n\td.state = n.newState + lowBits\n\treturn n.symbol\n}\n\n// finished returns true if all bits have been read from the bitstream\n// and the next state would require reading bits from the input.\nfunc (d *decoder) finished() bool {\n\treturn d.br.finished() && d.dt[d.state].nbBits > 0\n}\n\n// final returns the current state symbol without decoding the next.\nfunc (d *decoder) final() uint8 {\n\treturn d.dt[d.state].symbol\n}\n\n// nextFast returns the next symbol and sets the next state.\n// This can only be used if no symbols are 0 bits.\n// At least tablelog bits must be available in the bit reader.\nfunc (d *decoder) nextFast() uint8 {\n\tn := d.dt[d.state]\n\tlowBits := d.br.getBitsFast(n.nbBits)\n\td.state = n.newState + lowBits\n\treturn n.symbol\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/fse/fse.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\n// Package fse provides Finite State Entropy encoding and decoding.\n//\n// Finite State Entropy encoding provides a fast near-optimal symbol encoding/decoding\n// for byte blocks as implemented in zstd.\n//\n// See https://github.com/klauspost/compress/tree/master/fse for more information.\npackage fse\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math/bits\"\n)\n\nconst (\n\t/*!MEMORY_USAGE :\n\t *  Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.)\n\t *  Increasing memory usage improves compression ratio\n\t *  Reduced memory usage can improve speed, due to cache effect\n\t *  Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */\n\tmaxMemoryUsage     = 14\n\tdefaultMemoryUsage = 13\n\n\tmaxTableLog     = maxMemoryUsage - 2\n\tmaxTablesize    = 1 << maxTableLog\n\tdefaultTablelog = defaultMemoryUsage - 2\n\tminTablelog     = 5\n\tmaxSymbolValue  = 255\n)\n\nvar (\n\t// ErrIncompressible is returned when input is judged to be too hard to compress.\n\tErrIncompressible = errors.New(\"input is not compressible\")\n\n\t// ErrUseRLE is returned from the compressor when the input is a single byte value repeated.\n\tErrUseRLE = errors.New(\"input is single value repeated\")\n)\n\n// Scratch provides temporary storage for compression and decompression.\ntype Scratch struct {\n\t// Private\n\tcount    [maxSymbolValue + 1]uint32\n\tnorm     [maxSymbolValue + 1]int16\n\tbr       byteReader\n\tbits     bitReader\n\tbw       bitWriter\n\tct       cTable      // Compression tables.\n\tdecTable []decSymbol // Decompression table.\n\tmaxCount int         // count of the most probable symbol\n\n\t// Per block parameters.\n\t// These can be used to override compression parameters of the block.\n\t// Do not touch, unless you know what you are doing.\n\n\t// Out is output buffer.\n\t// If the scratch is re-used before the caller is done processing the output,\n\t// set this field to nil.\n\t// Otherwise the output buffer will be re-used for next Compression/Decompression step\n\t// and allocation will be avoided.\n\tOut []byte\n\n\t// DecompressLimit limits the maximum decoded size acceptable.\n\t// If > 0 decompression will stop when approximately this many bytes\n\t// has been decoded.\n\t// If 0, maximum size will be 2GB.\n\tDecompressLimit int\n\n\tsymbolLen      uint16 // Length of active part of the symbol table.\n\tactualTableLog uint8  // Selected tablelog.\n\tzeroBits       bool   // no bits has prob > 50%.\n\tclearCount     bool   // clear count\n\n\t// MaxSymbolValue will override the maximum symbol value of the next block.\n\tMaxSymbolValue uint8\n\n\t// TableLog will attempt to override the tablelog for the next block.\n\tTableLog uint8\n}\n\n// Histogram allows to populate the histogram and skip that step in the compression,\n// It otherwise allows to inspect the histogram when compression is done.\n// To indicate that you have populated the histogram call HistogramFinished\n// with the value of the highest populated symbol, as well as the number of entries\n// in the most populated entry. These are accepted at face value.\n// The returned slice will always be length 256.\nfunc (s *Scratch) Histogram() []uint32 {\n\treturn s.count[:]\n}\n\n// HistogramFinished can be called to indicate that the histogram has been populated.\n// maxSymbol is the index of the highest set symbol of the next data segment.\n// maxCount is the number of entries in the most populated entry.\n// These are accepted at face value.\nfunc (s *Scratch) HistogramFinished(maxSymbol uint8, maxCount int) {\n\ts.maxCount = maxCount\n\ts.symbolLen = uint16(maxSymbol) + 1\n\ts.clearCount = maxCount != 0\n}\n\n// prepare will prepare and allocate scratch tables used for both compression and decompression.\nfunc (s *Scratch) prepare(in []byte) (*Scratch, error) {\n\tif s == nil {\n\t\ts = &Scratch{}\n\t}\n\tif s.MaxSymbolValue == 0 {\n\t\ts.MaxSymbolValue = 255\n\t}\n\tif s.TableLog == 0 {\n\t\ts.TableLog = defaultTablelog\n\t}\n\tif s.TableLog > maxTableLog {\n\t\treturn nil, fmt.Errorf(\"tableLog (%d) > maxTableLog (%d)\", s.TableLog, maxTableLog)\n\t}\n\tif cap(s.Out) == 0 {\n\t\ts.Out = make([]byte, 0, len(in))\n\t}\n\tif s.clearCount && s.maxCount == 0 {\n\t\tfor i := range s.count {\n\t\t\ts.count[i] = 0\n\t\t}\n\t\ts.clearCount = false\n\t}\n\ts.br.init(in)\n\tif s.DecompressLimit == 0 {\n\t\t// Max size 2GB.\n\t\ts.DecompressLimit = (2 << 30) - 1\n\t}\n\n\treturn s, nil\n}\n\n// tableStep returns the next table index.\nfunc tableStep(tableSize uint32) uint32 {\n\treturn (tableSize >> 1) + (tableSize >> 3) + 3\n}\n\nfunc highBits(val uint32) (n uint32) {\n\treturn uint32(bits.Len32(val) - 1)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/gen.sh",
    "content": "#!/bin/sh\n\ncd s2/cmd/_s2sx/ || exit 1\ngo generate .\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/.gitignore",
    "content": "/huff0-fuzz.zip\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/README.md",
    "content": "# Huff0 entropy compression\r\n\r\nThis package provides Huff0 encoding and decoding as used in zstd.\r\n            \r\n[Huff0](https://github.com/Cyan4973/FiniteStateEntropy#new-generation-entropy-coders), \r\na Huffman codec designed for modern CPU, featuring OoO (Out of Order) operations on multiple ALU \r\n(Arithmetic Logic Unit), achieving extremely fast compression and decompression speeds.\r\n\r\nThis can be used for compressing input with a lot of similar input values to the smallest number of bytes.\r\nThis does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,\r\nbut it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding. \r\n\r\n* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/huff0)\r\n\r\n## News\r\n\r\nThis is used as part of the [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression package.\r\n\r\nThis ensures that most functionality is well tested.\r\n\r\n# Usage\r\n\r\nThis package provides a low level interface that allows to compress single independent blocks. \r\n\r\nEach block is separate, and there is no built in integrity checks. \r\nThis means that the caller should keep track of block sizes and also do checksums if needed.  \r\n\r\nCompressing a block is done via the [`Compress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress1X) and \r\n[`Compress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress4X) functions.\r\nYou must provide input and will receive the output and maybe an error.\r\n\r\nThese error values can be returned:\r\n\r\n| Error               | Description                                                                 |\r\n|---------------------|-----------------------------------------------------------------------------|\r\n| `<nil>`             | Everything ok, output is returned                                           |\r\n| `ErrIncompressible` | Returned when input is judged to be too hard to compress                    |\r\n| `ErrUseRLE`         | Returned from the compressor when the input is a single byte value repeated |\r\n| `ErrTooBig`         | Returned if the input block exceeds the maximum allowed size (128 Kib)      |\r\n| `(error)`           | An internal error occurred.                                                 |\r\n\r\n\r\nAs can be seen above some of there are errors that will be returned even under normal operation so it is important to handle these.\r\n\r\nTo reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object \r\nthat can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same \r\nobject can be used for both.   \r\n\r\nBe aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this\r\nyou must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.\r\n\r\nThe `Scratch` object will retain state that allows to re-use previous tables for encoding and decoding.  \r\n\r\n## Tables and re-use\r\n\r\nHuff0 allows for reusing tables from the previous block to save space if that is expected to give better/faster results. \r\n\r\nThe Scratch object allows you to set a [`ReusePolicy`](https://godoc.org/github.com/klauspost/compress/huff0#ReusePolicy) \r\nthat controls this behaviour. See the documentation for details. This can be altered between each block.\r\n\r\nDo however note that this information is *not* stored in the output block and it is up to the users of the package to\r\nrecord whether [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable) should be called,\r\nbased on the boolean reported back from the CompressXX call. \r\n\r\nIf you want to store the table separate from the data, you can access them as `OutData` and `OutTable` on the \r\n[`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object.\r\n\r\n## Decompressing\r\n\r\nThe first part of decoding is to initialize the decoding table through [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable).\r\nThis will initialize the decoding tables. \r\nYou can supply the complete block to `ReadTable` and it will return the data part of the block \r\nwhich can be given to the decompressor. \r\n\r\nDecompressing is done by calling the [`Decompress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress1X) \r\nor [`Decompress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress4X) function.\r\n\r\nFor concurrently decompressing content with a fixed table a stateless [`Decoder`](https://godoc.org/github.com/klauspost/compress/huff0#Decoder) can be requested which will remain correct as long as the scratch is unchanged. The capacity of the provided slice indicates the expected output size.\r\n\r\nYou must provide the output from the compression stage, at exactly the size you got back. If you receive an error back\r\nyour input was likely corrupted. \r\n\r\nIt is important to note that a successful decoding does *not* mean your output matches your original input. \r\nThere are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.\r\n\r\n# Contributing\r\n\r\nContributions are always welcome. Be aware that adding public functions will require good justification and breaking \r\nchanges will likely not be accepted. If in doubt open an issue before writing the PR.\r\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/bitreader.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage huff0\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// bitReader reads a bitstream in reverse.\n// The last set bit indicates the start of the stream and is used\n// for aligning the input.\ntype bitReaderBytes struct {\n\tin       []byte\n\toff      uint // next byte to read is at in[off - 1]\n\tvalue    uint64\n\tbitsRead uint8\n}\n\n// init initializes and resets the bit reader.\nfunc (b *bitReaderBytes) init(in []byte) error {\n\tif len(in) < 1 {\n\t\treturn errors.New(\"corrupt stream: too short\")\n\t}\n\tb.in = in\n\tb.off = uint(len(in))\n\t// The highest bit of the last byte indicates where to start\n\tv := in[len(in)-1]\n\tif v == 0 {\n\t\treturn errors.New(\"corrupt stream, did not find end of stream\")\n\t}\n\tb.bitsRead = 64\n\tb.value = 0\n\tif len(in) >= 8 {\n\t\tb.fillFastStart()\n\t} else {\n\t\tb.fill()\n\t\tb.fill()\n\t}\n\tb.advance(8 - uint8(highBit32(uint32(v))))\n\treturn nil\n}\n\n// peekByteFast requires that at least one byte is requested every time.\n// There are no checks if the buffer is filled.\nfunc (b *bitReaderBytes) peekByteFast() uint8 {\n\tgot := uint8(b.value >> 56)\n\treturn got\n}\n\nfunc (b *bitReaderBytes) advance(n uint8) {\n\tb.bitsRead += n\n\tb.value <<= n & 63\n}\n\n// fillFast() will make sure at least 32 bits are available.\n// There must be at least 4 bytes available.\nfunc (b *bitReaderBytes) fillFast() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\n\t// 2 bounds checks.\n\tlow := le.Load32(b.in, b.off-4)\n\tb.value |= uint64(low) << (b.bitsRead - 32)\n\tb.bitsRead -= 32\n\tb.off -= 4\n}\n\n// fillFastStart() assumes the bitReaderBytes is empty and there is at least 8 bytes to read.\nfunc (b *bitReaderBytes) fillFastStart() {\n\t// Do single re-slice to avoid bounds checks.\n\tb.value = le.Load64(b.in, b.off-8)\n\tb.bitsRead = 0\n\tb.off -= 8\n}\n\n// fill() will make sure at least 32 bits are available.\nfunc (b *bitReaderBytes) fill() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\tif b.off >= 4 {\n\t\tlow := le.Load32(b.in, b.off-4)\n\t\tb.value |= uint64(low) << (b.bitsRead - 32)\n\t\tb.bitsRead -= 32\n\t\tb.off -= 4\n\t\treturn\n\t}\n\tfor b.off > 0 {\n\t\tb.value |= uint64(b.in[b.off-1]) << (b.bitsRead - 8)\n\t\tb.bitsRead -= 8\n\t\tb.off--\n\t}\n}\n\n// finished returns true if all bits have been read from the bit stream.\nfunc (b *bitReaderBytes) finished() bool {\n\treturn b.off == 0 && b.bitsRead >= 64\n}\n\nfunc (b *bitReaderBytes) remaining() uint {\n\treturn b.off*8 + uint(64-b.bitsRead)\n}\n\n// close the bitstream and returns an error if out-of-buffer reads occurred.\nfunc (b *bitReaderBytes) close() error {\n\t// Release reference.\n\tb.in = nil\n\tif b.remaining() > 0 {\n\t\treturn fmt.Errorf(\"corrupt input: %d bits remain on stream\", b.remaining())\n\t}\n\tif b.bitsRead > 64 {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn nil\n}\n\n// bitReaderShifted reads a bitstream in reverse.\n// The last set bit indicates the start of the stream and is used\n// for aligning the input.\ntype bitReaderShifted struct {\n\tin       []byte\n\toff      uint // next byte to read is at in[off - 1]\n\tvalue    uint64\n\tbitsRead uint8\n}\n\n// init initializes and resets the bit reader.\nfunc (b *bitReaderShifted) init(in []byte) error {\n\tif len(in) < 1 {\n\t\treturn errors.New(\"corrupt stream: too short\")\n\t}\n\tb.in = in\n\tb.off = uint(len(in))\n\t// The highest bit of the last byte indicates where to start\n\tv := in[len(in)-1]\n\tif v == 0 {\n\t\treturn errors.New(\"corrupt stream, did not find end of stream\")\n\t}\n\tb.bitsRead = 64\n\tb.value = 0\n\tif len(in) >= 8 {\n\t\tb.fillFastStart()\n\t} else {\n\t\tb.fill()\n\t\tb.fill()\n\t}\n\tb.advance(8 - uint8(highBit32(uint32(v))))\n\treturn nil\n}\n\n// peekBitsFast requires that at least one bit is requested every time.\n// There are no checks if the buffer is filled.\nfunc (b *bitReaderShifted) peekBitsFast(n uint8) uint16 {\n\treturn uint16(b.value >> ((64 - n) & 63))\n}\n\nfunc (b *bitReaderShifted) advance(n uint8) {\n\tb.bitsRead += n\n\tb.value <<= n & 63\n}\n\n// fillFast() will make sure at least 32 bits are available.\n// There must be at least 4 bytes available.\nfunc (b *bitReaderShifted) fillFast() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\n\tlow := le.Load32(b.in, b.off-4)\n\tb.value |= uint64(low) << ((b.bitsRead - 32) & 63)\n\tb.bitsRead -= 32\n\tb.off -= 4\n}\n\n// fillFastStart() assumes the bitReaderShifted is empty and there is at least 8 bytes to read.\nfunc (b *bitReaderShifted) fillFastStart() {\n\tb.value = le.Load64(b.in, b.off-8)\n\tb.bitsRead = 0\n\tb.off -= 8\n}\n\n// fill() will make sure at least 32 bits are available.\nfunc (b *bitReaderShifted) fill() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\tif b.off > 4 {\n\t\tlow := le.Load32(b.in, b.off-4)\n\t\tb.value |= uint64(low) << ((b.bitsRead - 32) & 63)\n\t\tb.bitsRead -= 32\n\t\tb.off -= 4\n\t\treturn\n\t}\n\tfor b.off > 0 {\n\t\tb.value |= uint64(b.in[b.off-1]) << ((b.bitsRead - 8) & 63)\n\t\tb.bitsRead -= 8\n\t\tb.off--\n\t}\n}\n\nfunc (b *bitReaderShifted) remaining() uint {\n\treturn b.off*8 + uint(64-b.bitsRead)\n}\n\n// close the bitstream and returns an error if out-of-buffer reads occurred.\nfunc (b *bitReaderShifted) close() error {\n\t// Release reference.\n\tb.in = nil\n\tif b.remaining() > 0 {\n\t\treturn fmt.Errorf(\"corrupt input: %d bits remain on stream\", b.remaining())\n\t}\n\tif b.bitsRead > 64 {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/bitwriter.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage huff0\n\n// bitWriter will write bits.\n// First bit will be LSB of the first byte of output.\ntype bitWriter struct {\n\tbitContainer uint64\n\tnBits        uint8\n\tout          []byte\n}\n\n// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated.\n// It will not check if there is space for them, so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits16Clean(value uint16, bits uint8) {\n\tb.bitContainer |= uint64(value) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// encSymbol will add up to 16 bits. value may not contain more set bits than indicated.\n// It will not check if there is space for them, so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) encSymbol(ct cTable, symbol byte) {\n\tenc := ct[symbol]\n\tb.bitContainer |= uint64(enc.val) << (b.nBits & 63)\n\tif false {\n\t\tif enc.nBits == 0 {\n\t\t\tpanic(\"nbits 0\")\n\t\t}\n\t}\n\tb.nBits += enc.nBits\n}\n\n// encTwoSymbols will add up to 32 bits. value may not contain more set bits than indicated.\n// It will not check if there is space for them, so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) encTwoSymbols(ct cTable, av, bv byte) {\n\tencA := ct[av]\n\tencB := ct[bv]\n\tsh := b.nBits & 63\n\tcombined := uint64(encA.val) | (uint64(encB.val) << (encA.nBits & 63))\n\tb.bitContainer |= combined << sh\n\tif false {\n\t\tif encA.nBits == 0 {\n\t\t\tpanic(\"nbitsA 0\")\n\t\t}\n\t\tif encB.nBits == 0 {\n\t\t\tpanic(\"nbitsB 0\")\n\t\t}\n\t}\n\tb.nBits += encA.nBits + encB.nBits\n}\n\n// encFourSymbols adds up to 32 bits from four symbols.\n// It will not check if there is space for them,\n// so the caller must ensure that b has been flushed recently.\nfunc (b *bitWriter) encFourSymbols(encA, encB, encC, encD cTableEntry) {\n\tbitsA := encA.nBits\n\tbitsB := bitsA + encB.nBits\n\tbitsC := bitsB + encC.nBits\n\tbitsD := bitsC + encD.nBits\n\tcombined := uint64(encA.val) |\n\t\t(uint64(encB.val) << (bitsA & 63)) |\n\t\t(uint64(encC.val) << (bitsB & 63)) |\n\t\t(uint64(encD.val) << (bitsC & 63))\n\tb.bitContainer |= combined << (b.nBits & 63)\n\tb.nBits += bitsD\n}\n\n// flush32 will flush out, so there are at least 32 bits available for writing.\nfunc (b *bitWriter) flush32() {\n\tif b.nBits < 32 {\n\t\treturn\n\t}\n\tb.out = append(b.out,\n\t\tbyte(b.bitContainer),\n\t\tbyte(b.bitContainer>>8),\n\t\tbyte(b.bitContainer>>16),\n\t\tbyte(b.bitContainer>>24))\n\tb.nBits -= 32\n\tb.bitContainer >>= 32\n}\n\n// flushAlign will flush remaining full bytes and align to next byte boundary.\nfunc (b *bitWriter) flushAlign() {\n\tnbBytes := (b.nBits + 7) >> 3\n\tfor i := range nbBytes {\n\t\tb.out = append(b.out, byte(b.bitContainer>>(i*8)))\n\t}\n\tb.nBits = 0\n\tb.bitContainer = 0\n}\n\n// close will write the alignment bit and write the final byte(s)\n// to the output.\nfunc (b *bitWriter) close() {\n\t// End mark\n\tb.addBits16Clean(1, 1)\n\t// flush until next byte.\n\tb.flushAlign()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/compress.go",
    "content": "package huff0\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"runtime\"\n\t\"sync\"\n)\n\n// Compress1X will compress the input.\n// The output can be decoded using Decompress1X.\n// Supply a Scratch object. The scratch object contains state about re-use,\n// So when sharing across independent encodes, be sure to set the re-use policy.\nfunc Compress1X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) {\n\ts, err = s.prepare(in)\n\tif err != nil {\n\t\treturn nil, false, err\n\t}\n\treturn compress(in, s, s.compress1X)\n}\n\n// Compress4X will compress the input. The input is split into 4 independent blocks\n// and compressed similar to Compress1X.\n// The output can be decoded using Decompress4X.\n// Supply a Scratch object. The scratch object contains state about re-use,\n// So when sharing across independent encodes, be sure to set the re-use policy.\nfunc Compress4X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) {\n\ts, err = s.prepare(in)\n\tif err != nil {\n\t\treturn nil, false, err\n\t}\n\tif false {\n\t\t// TODO: compress4Xp only slightly faster.\n\t\tconst parallelThreshold = 8 << 10\n\t\tif len(in) < parallelThreshold || runtime.GOMAXPROCS(0) == 1 {\n\t\t\treturn compress(in, s, s.compress4X)\n\t\t}\n\t\treturn compress(in, s, s.compress4Xp)\n\t}\n\treturn compress(in, s, s.compress4X)\n}\n\nfunc compress(in []byte, s *Scratch, compressor func(src []byte) ([]byte, error)) (out []byte, reUsed bool, err error) {\n\t// Nuke previous table if we cannot reuse anyway.\n\tif s.Reuse == ReusePolicyNone {\n\t\ts.prevTable = s.prevTable[:0]\n\t}\n\n\t// Create histogram, if none was provided.\n\tmaxCount := s.maxCount\n\tvar canReuse = false\n\tif maxCount == 0 {\n\t\tmaxCount, canReuse = s.countSimple(in)\n\t} else {\n\t\tcanReuse = s.canUseTable(s.prevTable)\n\t}\n\n\t// We want the output size to be less than this:\n\twantSize := len(in)\n\tif s.WantLogLess > 0 {\n\t\twantSize -= wantSize >> s.WantLogLess\n\t}\n\n\t// Reset for next run.\n\ts.clearCount = true\n\ts.maxCount = 0\n\tif maxCount >= len(in) {\n\t\tif maxCount > len(in) {\n\t\t\treturn nil, false, fmt.Errorf(\"maxCount (%d) > length (%d)\", maxCount, len(in))\n\t\t}\n\t\tif len(in) == 1 {\n\t\t\treturn nil, false, ErrIncompressible\n\t\t}\n\t\t// One symbol, use RLE\n\t\treturn nil, false, ErrUseRLE\n\t}\n\tif maxCount == 1 || maxCount < (len(in)>>7) {\n\t\t// Each symbol present maximum once or too well distributed.\n\t\treturn nil, false, ErrIncompressible\n\t}\n\tif s.Reuse == ReusePolicyMust && !canReuse {\n\t\t// We must reuse, but we can't.\n\t\treturn nil, false, ErrIncompressible\n\t}\n\tif (s.Reuse == ReusePolicyPrefer || s.Reuse == ReusePolicyMust) && canReuse {\n\t\tkeepTable := s.cTable\n\t\tkeepTL := s.actualTableLog\n\t\ts.cTable = s.prevTable\n\t\ts.actualTableLog = s.prevTableLog\n\t\ts.Out, err = compressor(in)\n\t\ts.cTable = keepTable\n\t\ts.actualTableLog = keepTL\n\t\tif err == nil && len(s.Out) < wantSize {\n\t\t\ts.OutData = s.Out\n\t\t\treturn s.Out, true, nil\n\t\t}\n\t\tif s.Reuse == ReusePolicyMust {\n\t\t\treturn nil, false, ErrIncompressible\n\t\t}\n\t\t// Do not attempt to re-use later.\n\t\ts.prevTable = s.prevTable[:0]\n\t}\n\n\t// Calculate new table.\n\terr = s.buildCTable()\n\tif err != nil {\n\t\treturn nil, false, err\n\t}\n\n\tif false && !s.canUseTable(s.cTable) {\n\t\tpanic(\"invalid table generated\")\n\t}\n\n\tif s.Reuse == ReusePolicyAllow && canReuse {\n\t\thSize := len(s.Out)\n\t\toldSize := s.prevTable.estimateSize(s.count[:s.symbolLen])\n\t\tnewSize := s.cTable.estimateSize(s.count[:s.symbolLen])\n\t\tif oldSize <= hSize+newSize || hSize+12 >= wantSize {\n\t\t\t// Retain cTable even if we re-use.\n\t\t\tkeepTable := s.cTable\n\t\t\tkeepTL := s.actualTableLog\n\n\t\t\ts.cTable = s.prevTable\n\t\t\ts.actualTableLog = s.prevTableLog\n\t\t\ts.Out, err = compressor(in)\n\n\t\t\t// Restore ctable.\n\t\t\ts.cTable = keepTable\n\t\t\ts.actualTableLog = keepTL\n\t\t\tif err != nil {\n\t\t\t\treturn nil, false, err\n\t\t\t}\n\t\t\tif len(s.Out) >= wantSize {\n\t\t\t\treturn nil, false, ErrIncompressible\n\t\t\t}\n\t\t\ts.OutData = s.Out\n\t\t\treturn s.Out, true, nil\n\t\t}\n\t}\n\n\t// Use new table\n\terr = s.cTable.write(s)\n\tif err != nil {\n\t\ts.OutTable = nil\n\t\treturn nil, false, err\n\t}\n\ts.OutTable = s.Out\n\n\t// Compress using new table\n\ts.Out, err = compressor(in)\n\tif err != nil {\n\t\ts.OutTable = nil\n\t\treturn nil, false, err\n\t}\n\tif len(s.Out) >= wantSize {\n\t\ts.OutTable = nil\n\t\treturn nil, false, ErrIncompressible\n\t}\n\t// Move current table into previous.\n\ts.prevTable, s.prevTableLog, s.cTable = s.cTable, s.actualTableLog, s.prevTable[:0]\n\ts.OutData = s.Out[len(s.OutTable):]\n\treturn s.Out, false, nil\n}\n\n// EstimateSizes will estimate the data sizes\nfunc EstimateSizes(in []byte, s *Scratch) (tableSz, dataSz, reuseSz int, err error) {\n\ts, err = s.prepare(in)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\n\t// Create histogram, if none was provided.\n\ttableSz, dataSz, reuseSz = -1, -1, -1\n\tmaxCount := s.maxCount\n\tvar canReuse = false\n\tif maxCount == 0 {\n\t\tmaxCount, canReuse = s.countSimple(in)\n\t} else {\n\t\tcanReuse = s.canUseTable(s.prevTable)\n\t}\n\n\t// We want the output size to be less than this:\n\twantSize := len(in)\n\tif s.WantLogLess > 0 {\n\t\twantSize -= wantSize >> s.WantLogLess\n\t}\n\n\t// Reset for next run.\n\ts.clearCount = true\n\ts.maxCount = 0\n\tif maxCount >= len(in) {\n\t\tif maxCount > len(in) {\n\t\t\treturn 0, 0, 0, fmt.Errorf(\"maxCount (%d) > length (%d)\", maxCount, len(in))\n\t\t}\n\t\tif len(in) == 1 {\n\t\t\treturn 0, 0, 0, ErrIncompressible\n\t\t}\n\t\t// One symbol, use RLE\n\t\treturn 0, 0, 0, ErrUseRLE\n\t}\n\tif maxCount == 1 || maxCount < (len(in)>>7) {\n\t\t// Each symbol present maximum once or too well distributed.\n\t\treturn 0, 0, 0, ErrIncompressible\n\t}\n\n\t// Calculate new table.\n\terr = s.buildCTable()\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\n\tif false && !s.canUseTable(s.cTable) {\n\t\tpanic(\"invalid table generated\")\n\t}\n\n\ttableSz, err = s.cTable.estTableSize(s)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\tif canReuse {\n\t\treuseSz = s.prevTable.estimateSize(s.count[:s.symbolLen])\n\t}\n\tdataSz = s.cTable.estimateSize(s.count[:s.symbolLen])\n\n\t// Restore\n\treturn tableSz, dataSz, reuseSz, nil\n}\n\nfunc (s *Scratch) compress1X(src []byte) ([]byte, error) {\n\treturn s.compress1xDo(s.Out, src), nil\n}\n\nfunc (s *Scratch) compress1xDo(dst, src []byte) []byte {\n\tvar bw = bitWriter{out: dst}\n\n\t// N is length divisible by 4.\n\tn := len(src)\n\tn -= n & 3\n\tcTable := s.cTable[:256]\n\n\t// Encode last bytes.\n\tfor i := len(src) & 3; i > 0; i-- {\n\t\tbw.encSymbol(cTable, src[n+i-1])\n\t}\n\tn -= 4\n\tif s.actualTableLog <= 8 {\n\t\tfor ; n >= 0; n -= 4 {\n\t\t\ttmp := src[n : n+4]\n\t\t\t// tmp should be len 4\n\t\t\tbw.flush32()\n\t\t\tbw.encFourSymbols(cTable[tmp[3]], cTable[tmp[2]], cTable[tmp[1]], cTable[tmp[0]])\n\t\t}\n\t} else {\n\t\tfor ; n >= 0; n -= 4 {\n\t\t\ttmp := src[n : n+4]\n\t\t\t// tmp should be len 4\n\t\t\tbw.flush32()\n\t\t\tbw.encTwoSymbols(cTable, tmp[3], tmp[2])\n\t\t\tbw.flush32()\n\t\t\tbw.encTwoSymbols(cTable, tmp[1], tmp[0])\n\t\t}\n\t}\n\tbw.close()\n\treturn bw.out\n}\n\nvar sixZeros [6]byte\n\nfunc (s *Scratch) compress4X(src []byte) ([]byte, error) {\n\tif len(src) < 12 {\n\t\treturn nil, ErrIncompressible\n\t}\n\tsegmentSize := (len(src) + 3) / 4\n\n\t// Add placeholder for output length\n\toffsetIdx := len(s.Out)\n\ts.Out = append(s.Out, sixZeros[:]...)\n\n\tfor i := range 4 {\n\t\ttoDo := src\n\t\tif len(toDo) > segmentSize {\n\t\t\ttoDo = toDo[:segmentSize]\n\t\t}\n\t\tsrc = src[len(toDo):]\n\n\t\tidx := len(s.Out)\n\t\ts.Out = s.compress1xDo(s.Out, toDo)\n\t\tif len(s.Out)-idx > math.MaxUint16 {\n\t\t\t// We cannot store the size in the jump table\n\t\t\treturn nil, ErrIncompressible\n\t\t}\n\t\t// Write compressed length as little endian before block.\n\t\tif i < 3 {\n\t\t\t// Last length is not written.\n\t\t\tlength := len(s.Out) - idx\n\t\t\ts.Out[i*2+offsetIdx] = byte(length)\n\t\t\ts.Out[i*2+offsetIdx+1] = byte(length >> 8)\n\t\t}\n\t}\n\n\treturn s.Out, nil\n}\n\n// compress4Xp will compress 4 streams using separate goroutines.\nfunc (s *Scratch) compress4Xp(src []byte) ([]byte, error) {\n\tif len(src) < 12 {\n\t\treturn nil, ErrIncompressible\n\t}\n\t// Add placeholder for output length\n\ts.Out = s.Out[:6]\n\n\tsegmentSize := (len(src) + 3) / 4\n\tvar wg sync.WaitGroup\n\twg.Add(4)\n\tfor i := range 4 {\n\t\ttoDo := src\n\t\tif len(toDo) > segmentSize {\n\t\t\ttoDo = toDo[:segmentSize]\n\t\t}\n\t\tsrc = src[len(toDo):]\n\n\t\t// Separate goroutine for each block.\n\t\tgo func(i int) {\n\t\t\ts.tmpOut[i] = s.compress1xDo(s.tmpOut[i][:0], toDo)\n\t\t\twg.Done()\n\t\t}(i)\n\t}\n\twg.Wait()\n\tfor i := range 4 {\n\t\to := s.tmpOut[i]\n\t\tif len(o) > math.MaxUint16 {\n\t\t\t// We cannot store the size in the jump table\n\t\t\treturn nil, ErrIncompressible\n\t\t}\n\t\t// Write compressed length as little endian before block.\n\t\tif i < 3 {\n\t\t\t// Last length is not written.\n\t\t\ts.Out[i*2] = byte(len(o))\n\t\t\ts.Out[i*2+1] = byte(len(o) >> 8)\n\t\t}\n\n\t\t// Write output.\n\t\ts.Out = append(s.Out, o...)\n\t}\n\treturn s.Out, nil\n}\n\n// countSimple will create a simple histogram in s.count.\n// Returns the biggest count.\n// Does not update s.clearCount.\nfunc (s *Scratch) countSimple(in []byte) (max int, reuse bool) {\n\treuse = true\n\t_ = s.count // Assert that s != nil to speed up the following loop.\n\tfor _, v := range in {\n\t\ts.count[v]++\n\t}\n\tm := uint32(0)\n\tif len(s.prevTable) > 0 {\n\t\tfor i, v := range s.count[:] {\n\t\t\tif v == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif v > m {\n\t\t\t\tm = v\n\t\t\t}\n\t\t\ts.symbolLen = uint16(i) + 1\n\t\t\tif i >= len(s.prevTable) {\n\t\t\t\treuse = false\n\t\t\t} else if s.prevTable[i].nBits == 0 {\n\t\t\t\treuse = false\n\t\t\t}\n\t\t}\n\t\treturn int(m), reuse\n\t}\n\tfor i, v := range s.count[:] {\n\t\tif v == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif v > m {\n\t\t\tm = v\n\t\t}\n\t\ts.symbolLen = uint16(i) + 1\n\t}\n\treturn int(m), false\n}\n\nfunc (s *Scratch) canUseTable(c cTable) bool {\n\tif len(c) < int(s.symbolLen) {\n\t\treturn false\n\t}\n\tfor i, v := range s.count[:s.symbolLen] {\n\t\tif v != 0 && c[i].nBits == 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n//lint:ignore U1000 used for debugging\nfunc (s *Scratch) validateTable(c cTable) bool {\n\tif len(c) < int(s.symbolLen) {\n\t\treturn false\n\t}\n\tfor i, v := range s.count[:s.symbolLen] {\n\t\tif v != 0 {\n\t\t\tif c[i].nBits == 0 {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif c[i].nBits > s.actualTableLog {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\n// minTableLog provides the minimum logSize to safely represent a distribution.\nfunc (s *Scratch) minTableLog() uint8 {\n\tminBitsSrc := highBit32(uint32(s.srcLen)) + 1\n\tminBitsSymbols := highBit32(uint32(s.symbolLen-1)) + 2\n\tif minBitsSrc < minBitsSymbols {\n\t\treturn uint8(minBitsSrc)\n\t}\n\treturn uint8(minBitsSymbols)\n}\n\n// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog\nfunc (s *Scratch) optimalTableLog() {\n\ttableLog := s.TableLog\n\tminBits := s.minTableLog()\n\tmaxBitsSrc := uint8(highBit32(uint32(s.srcLen-1))) - 1\n\tif maxBitsSrc < tableLog {\n\t\t// Accuracy can be reduced\n\t\ttableLog = maxBitsSrc\n\t}\n\tif minBits > tableLog {\n\t\ttableLog = minBits\n\t}\n\t// Need a minimum to safely represent all symbol values\n\tif tableLog < minTablelog {\n\t\ttableLog = minTablelog\n\t}\n\tif tableLog > tableLogMax {\n\t\ttableLog = tableLogMax\n\t}\n\ts.actualTableLog = tableLog\n}\n\ntype cTableEntry struct {\n\tval   uint16\n\tnBits uint8\n\t// We have 8 bits extra\n}\n\nconst huffNodesMask = huffNodesLen - 1\n\nfunc (s *Scratch) buildCTable() error {\n\ts.optimalTableLog()\n\ts.huffSort()\n\tif cap(s.cTable) < maxSymbolValue+1 {\n\t\ts.cTable = make([]cTableEntry, s.symbolLen, maxSymbolValue+1)\n\t} else {\n\t\ts.cTable = s.cTable[:s.symbolLen]\n\t\tfor i := range s.cTable {\n\t\t\ts.cTable[i] = cTableEntry{}\n\t\t}\n\t}\n\n\tvar startNode = int16(s.symbolLen)\n\tnonNullRank := s.symbolLen - 1\n\n\tnodeNb := startNode\n\thuffNode := s.nodes[1 : huffNodesLen+1]\n\n\t// This overlays the slice above, but allows \"-1\" index lookups.\n\t// Different from reference implementation.\n\thuffNode0 := s.nodes[0 : huffNodesLen+1]\n\n\tfor huffNode[nonNullRank].count() == 0 {\n\t\tnonNullRank--\n\t}\n\n\tlowS := int16(nonNullRank)\n\tnodeRoot := nodeNb + lowS - 1\n\tlowN := nodeNb\n\thuffNode[nodeNb].setCount(huffNode[lowS].count() + huffNode[lowS-1].count())\n\thuffNode[lowS].setParent(nodeNb)\n\thuffNode[lowS-1].setParent(nodeNb)\n\tnodeNb++\n\tlowS -= 2\n\tfor n := nodeNb; n <= nodeRoot; n++ {\n\t\thuffNode[n].setCount(1 << 30)\n\t}\n\t// fake entry, strong barrier\n\thuffNode0[0].setCount(1 << 31)\n\n\t// create parents\n\tfor nodeNb <= nodeRoot {\n\t\tvar n1, n2 int16\n\t\tif huffNode0[lowS+1].count() < huffNode0[lowN+1].count() {\n\t\t\tn1 = lowS\n\t\t\tlowS--\n\t\t} else {\n\t\t\tn1 = lowN\n\t\t\tlowN++\n\t\t}\n\t\tif huffNode0[lowS+1].count() < huffNode0[lowN+1].count() {\n\t\t\tn2 = lowS\n\t\t\tlowS--\n\t\t} else {\n\t\t\tn2 = lowN\n\t\t\tlowN++\n\t\t}\n\n\t\thuffNode[nodeNb].setCount(huffNode0[n1+1].count() + huffNode0[n2+1].count())\n\t\thuffNode0[n1+1].setParent(nodeNb)\n\t\thuffNode0[n2+1].setParent(nodeNb)\n\t\tnodeNb++\n\t}\n\n\t// distribute weights (unlimited tree height)\n\thuffNode[nodeRoot].setNbBits(0)\n\tfor n := nodeRoot - 1; n >= startNode; n-- {\n\t\thuffNode[n].setNbBits(huffNode[huffNode[n].parent()].nbBits() + 1)\n\t}\n\tfor n := uint16(0); n <= nonNullRank; n++ {\n\t\thuffNode[n].setNbBits(huffNode[huffNode[n].parent()].nbBits() + 1)\n\t}\n\ts.actualTableLog = s.setMaxHeight(int(nonNullRank))\n\tmaxNbBits := s.actualTableLog\n\n\t// fill result into tree (val, nbBits)\n\tif maxNbBits > tableLogMax {\n\t\treturn fmt.Errorf(\"internal error: maxNbBits (%d) > tableLogMax (%d)\", maxNbBits, tableLogMax)\n\t}\n\tvar nbPerRank [tableLogMax + 1]uint16\n\tvar valPerRank [16]uint16\n\tfor _, v := range huffNode[:nonNullRank+1] {\n\t\tnbPerRank[v.nbBits()]++\n\t}\n\t// determine stating value per rank\n\t{\n\t\tmin := uint16(0)\n\t\tfor n := maxNbBits; n > 0; n-- {\n\t\t\t// get starting value within each rank\n\t\t\tvalPerRank[n] = min\n\t\t\tmin += nbPerRank[n]\n\t\t\tmin >>= 1\n\t\t}\n\t}\n\n\t// push nbBits per symbol, symbol order\n\tfor _, v := range huffNode[:nonNullRank+1] {\n\t\ts.cTable[v.symbol()].nBits = v.nbBits()\n\t}\n\n\t// assign value within rank, symbol order\n\tt := s.cTable[:s.symbolLen]\n\tfor n, val := range t {\n\t\tnbits := val.nBits & 15\n\t\tv := valPerRank[nbits]\n\t\tt[n].val = v\n\t\tvalPerRank[nbits] = v + 1\n\t}\n\n\treturn nil\n}\n\n// huffSort will sort symbols, decreasing order.\nfunc (s *Scratch) huffSort() {\n\ttype rankPos struct {\n\t\tbase    uint32\n\t\tcurrent uint32\n\t}\n\n\t// Clear nodes\n\tnodes := s.nodes[:huffNodesLen+1]\n\ts.nodes = nodes\n\tnodes = nodes[1 : huffNodesLen+1]\n\n\t// Sort into buckets based on length of symbol count.\n\tvar rank [32]rankPos\n\tfor _, v := range s.count[:s.symbolLen] {\n\t\tr := highBit32(v+1) & 31\n\t\trank[r].base++\n\t}\n\t// maxBitLength is log2(BlockSizeMax) + 1\n\tconst maxBitLength = 18 + 1\n\tfor n := maxBitLength; n > 0; n-- {\n\t\trank[n-1].base += rank[n].base\n\t}\n\tfor n := range rank[:maxBitLength] {\n\t\trank[n].current = rank[n].base\n\t}\n\tfor n, c := range s.count[:s.symbolLen] {\n\t\tr := (highBit32(c+1) + 1) & 31\n\t\tpos := rank[r].current\n\t\trank[r].current++\n\t\tprev := nodes[(pos-1)&huffNodesMask]\n\t\tfor pos > rank[r].base && c > prev.count() {\n\t\t\tnodes[pos&huffNodesMask] = prev\n\t\t\tpos--\n\t\t\tprev = nodes[(pos-1)&huffNodesMask]\n\t\t}\n\t\tnodes[pos&huffNodesMask] = makeNodeElt(c, byte(n))\n\t}\n}\n\nfunc (s *Scratch) setMaxHeight(lastNonNull int) uint8 {\n\tmaxNbBits := s.actualTableLog\n\thuffNode := s.nodes[1 : huffNodesLen+1]\n\t//huffNode = huffNode[: huffNodesLen]\n\n\tlargestBits := huffNode[lastNonNull].nbBits()\n\n\t// early exit : no elt > maxNbBits\n\tif largestBits <= maxNbBits {\n\t\treturn largestBits\n\t}\n\ttotalCost := int(0)\n\tbaseCost := int(1) << (largestBits - maxNbBits)\n\tn := uint32(lastNonNull)\n\n\tfor huffNode[n].nbBits() > maxNbBits {\n\t\ttotalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits()))\n\t\thuffNode[n].setNbBits(maxNbBits)\n\t\tn--\n\t}\n\t// n stops at huffNode[n].nbBits <= maxNbBits\n\n\tfor huffNode[n].nbBits() == maxNbBits {\n\t\tn--\n\t}\n\t// n end at index of smallest symbol using < maxNbBits\n\n\t// renorm totalCost\n\ttotalCost >>= largestBits - maxNbBits /* note : totalCost is necessarily a multiple of baseCost */\n\n\t// repay normalized cost\n\t{\n\t\tconst noSymbol = 0xF0F0F0F0\n\t\tvar rankLast [tableLogMax + 2]uint32\n\n\t\tfor i := range rankLast[:] {\n\t\t\trankLast[i] = noSymbol\n\t\t}\n\n\t\t// Get pos of last (smallest) symbol per rank\n\t\t{\n\t\t\tcurrentNbBits := maxNbBits\n\t\t\tfor pos := int(n); pos >= 0; pos-- {\n\t\t\t\tif huffNode[pos].nbBits() >= currentNbBits {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tcurrentNbBits = huffNode[pos].nbBits() // < maxNbBits\n\t\t\t\trankLast[maxNbBits-currentNbBits] = uint32(pos)\n\t\t\t}\n\t\t}\n\n\t\tfor totalCost > 0 {\n\t\t\tnBitsToDecrease := uint8(highBit32(uint32(totalCost))) + 1\n\n\t\t\tfor ; nBitsToDecrease > 1; nBitsToDecrease-- {\n\t\t\t\thighPos := rankLast[nBitsToDecrease]\n\t\t\t\tlowPos := rankLast[nBitsToDecrease-1]\n\t\t\t\tif highPos == noSymbol {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif lowPos == noSymbol {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\thighTotal := huffNode[highPos].count()\n\t\t\t\tlowTotal := 2 * huffNode[lowPos].count()\n\t\t\t\tif highTotal <= lowTotal {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !)\n\t\t\t// HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary\n\t\t\t// FIXME: try to remove\n\t\t\tfor (nBitsToDecrease <= tableLogMax) && (rankLast[nBitsToDecrease] == noSymbol) {\n\t\t\t\tnBitsToDecrease++\n\t\t\t}\n\t\t\ttotalCost -= 1 << (nBitsToDecrease - 1)\n\t\t\tif rankLast[nBitsToDecrease-1] == noSymbol {\n\t\t\t\t// this rank is no longer empty\n\t\t\t\trankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]\n\t\t\t}\n\t\t\thuffNode[rankLast[nBitsToDecrease]].setNbBits(1 +\n\t\t\t\thuffNode[rankLast[nBitsToDecrease]].nbBits())\n\t\t\tif rankLast[nBitsToDecrease] == 0 {\n\t\t\t\t/* special case, reached largest symbol */\n\t\t\t\trankLast[nBitsToDecrease] = noSymbol\n\t\t\t} else {\n\t\t\t\trankLast[nBitsToDecrease]--\n\t\t\t\tif huffNode[rankLast[nBitsToDecrease]].nbBits() != maxNbBits-nBitsToDecrease {\n\t\t\t\t\trankLast[nBitsToDecrease] = noSymbol /* this rank is now empty */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor totalCost < 0 { /* Sometimes, cost correction overshoot */\n\t\t\tif rankLast[1] == noSymbol { /* special case : no rank 1 symbol (using maxNbBits-1); let's create one from largest rank 0 (using maxNbBits) */\n\t\t\t\tfor huffNode[n].nbBits() == maxNbBits {\n\t\t\t\t\tn--\n\t\t\t\t}\n\t\t\t\thuffNode[n+1].setNbBits(huffNode[n+1].nbBits() - 1)\n\t\t\t\trankLast[1] = n + 1\n\t\t\t\ttotalCost++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\thuffNode[rankLast[1]+1].setNbBits(huffNode[rankLast[1]+1].nbBits() - 1)\n\t\t\trankLast[1]++\n\t\t\ttotalCost++\n\t\t}\n\t}\n\treturn maxNbBits\n}\n\n// A nodeElt is the fields\n//\n//\tcount  uint32\n//\tparent uint16\n//\tsymbol byte\n//\tnbBits uint8\n//\n// in some order, all squashed into an integer so that the compiler\n// always loads and stores entire nodeElts instead of separate fields.\ntype nodeElt uint64\n\nfunc makeNodeElt(count uint32, symbol byte) nodeElt {\n\treturn nodeElt(count) | nodeElt(symbol)<<48\n}\n\nfunc (e *nodeElt) count() uint32  { return uint32(*e) }\nfunc (e *nodeElt) parent() uint16 { return uint16(*e >> 32) }\nfunc (e *nodeElt) symbol() byte   { return byte(*e >> 48) }\nfunc (e *nodeElt) nbBits() uint8  { return uint8(*e >> 56) }\n\nfunc (e *nodeElt) setCount(c uint32) { *e = (*e)&0xffffffff00000000 | nodeElt(c) }\nfunc (e *nodeElt) setParent(p int16) { *e = (*e)&0xffff0000ffffffff | nodeElt(uint16(p))<<32 }\nfunc (e *nodeElt) setNbBits(n uint8) { *e = (*e)&0x00ffffffffffffff | nodeElt(n)<<56 }\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/decompress.go",
    "content": "package huff0\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/fse\"\n)\n\ntype dTable struct {\n\tsingle []dEntrySingle\n}\n\n// single-symbols decoding\ntype dEntrySingle struct {\n\tentry uint16\n}\n\n// Uses special code for all tables that are < 8 bits.\nconst use8BitTables = true\n\n// ReadTable will read a table from the input.\n// The size of the input may be larger than the table definition.\n// Any content remaining after the table definition will be returned.\n// If no Scratch is provided a new one is allocated.\n// The returned Scratch can be used for encoding or decoding input using this table.\nfunc ReadTable(in []byte, s *Scratch) (s2 *Scratch, remain []byte, err error) {\n\ts, err = s.prepare(nil)\n\tif err != nil {\n\t\treturn s, nil, err\n\t}\n\tif len(in) <= 1 {\n\t\treturn s, nil, errors.New(\"input too small for table\")\n\t}\n\tiSize := in[0]\n\tin = in[1:]\n\tif iSize >= 128 {\n\t\t// Uncompressed\n\t\toSize := iSize - 127\n\t\tiSize = (oSize + 1) / 2\n\t\tif int(iSize) > len(in) {\n\t\t\treturn s, nil, errors.New(\"input too small for table\")\n\t\t}\n\t\tfor n := uint8(0); n < oSize; n += 2 {\n\t\t\tv := in[n/2]\n\t\t\ts.huffWeight[n] = v >> 4\n\t\t\ts.huffWeight[n+1] = v & 15\n\t\t}\n\t\ts.symbolLen = uint16(oSize)\n\t\tin = in[iSize:]\n\t} else {\n\t\tif len(in) < int(iSize) {\n\t\t\treturn s, nil, fmt.Errorf(\"input too small for table, want %d bytes, have %d\", iSize, len(in))\n\t\t}\n\t\t// FSE compressed weights\n\t\ts.fse.DecompressLimit = 255\n\t\thw := s.huffWeight[:]\n\t\ts.fse.Out = hw\n\t\tb, err := fse.Decompress(in[:iSize], s.fse)\n\t\ts.fse.Out = nil\n\t\tif err != nil {\n\t\t\treturn s, nil, fmt.Errorf(\"fse decompress returned: %w\", err)\n\t\t}\n\t\tif len(b) > 255 {\n\t\t\treturn s, nil, errors.New(\"corrupt input: output table too large\")\n\t\t}\n\t\ts.symbolLen = uint16(len(b))\n\t\tin = in[iSize:]\n\t}\n\n\t// collect weight stats\n\tvar rankStats [16]uint32\n\tweightTotal := uint32(0)\n\tfor _, v := range s.huffWeight[:s.symbolLen] {\n\t\tif v > tableLogMax {\n\t\t\treturn s, nil, errors.New(\"corrupt input: weight too large\")\n\t\t}\n\t\tv2 := v & 15\n\t\trankStats[v2]++\n\t\t// (1 << (v2-1)) is slower since the compiler cannot prove that v2 isn't 0.\n\t\tweightTotal += (1 << v2) >> 1\n\t}\n\tif weightTotal == 0 {\n\t\treturn s, nil, errors.New(\"corrupt input: weights zero\")\n\t}\n\n\t// get last non-null symbol weight (implied, total must be 2^n)\n\t{\n\t\ttableLog := highBit32(weightTotal) + 1\n\t\tif tableLog > tableLogMax {\n\t\t\treturn s, nil, errors.New(\"corrupt input: tableLog too big\")\n\t\t}\n\t\ts.actualTableLog = uint8(tableLog)\n\t\t// determine last weight\n\t\t{\n\t\t\ttotal := uint32(1) << tableLog\n\t\t\trest := total - weightTotal\n\t\t\tverif := uint32(1) << highBit32(rest)\n\t\t\tlastWeight := highBit32(rest) + 1\n\t\t\tif verif != rest {\n\t\t\t\t// last value must be a clean power of 2\n\t\t\t\treturn s, nil, errors.New(\"corrupt input: last value not power of two\")\n\t\t\t}\n\t\t\ts.huffWeight[s.symbolLen] = uint8(lastWeight)\n\t\t\ts.symbolLen++\n\t\t\trankStats[lastWeight]++\n\t\t}\n\t}\n\n\tif (rankStats[1] < 2) || (rankStats[1]&1 != 0) {\n\t\t// by construction : at least 2 elts of rank 1, must be even\n\t\treturn s, nil, errors.New(\"corrupt input: min elt size, even check failed \")\n\t}\n\n\t// TODO: Choose between single/double symbol decoding\n\n\t// Calculate starting value for each rank\n\t{\n\t\tvar nextRankStart uint32\n\t\tfor n := uint8(1); n < s.actualTableLog+1; n++ {\n\t\t\tcurrent := nextRankStart\n\t\t\tnextRankStart += rankStats[n] << (n - 1)\n\t\t\trankStats[n] = current\n\t\t}\n\t}\n\n\t// fill DTable (always full size)\n\ttSize := 1 << tableLogMax\n\tif len(s.dt.single) != tSize {\n\t\ts.dt.single = make([]dEntrySingle, tSize)\n\t}\n\tcTable := s.prevTable\n\tif cap(cTable) < maxSymbolValue+1 {\n\t\tcTable = make([]cTableEntry, 0, maxSymbolValue+1)\n\t}\n\tcTable = cTable[:maxSymbolValue+1]\n\ts.prevTable = cTable[:s.symbolLen]\n\ts.prevTableLog = s.actualTableLog\n\n\tfor n, w := range s.huffWeight[:s.symbolLen] {\n\t\tif w == 0 {\n\t\t\tcTable[n] = cTableEntry{\n\t\t\t\tval:   0,\n\t\t\t\tnBits: 0,\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tlength := (uint32(1) << w) >> 1\n\t\td := dEntrySingle{\n\t\t\tentry: uint16(s.actualTableLog+1-w) | (uint16(n) << 8),\n\t\t}\n\n\t\trank := &rankStats[w]\n\t\tcTable[n] = cTableEntry{\n\t\t\tval:   uint16(*rank >> (w - 1)),\n\t\t\tnBits: uint8(d.entry),\n\t\t}\n\n\t\tsingle := s.dt.single[*rank : *rank+length]\n\t\tfor i := range single {\n\t\t\tsingle[i] = d\n\t\t}\n\t\t*rank += length\n\t}\n\n\treturn s, in, nil\n}\n\n// Decompress1X will decompress a 1X encoded stream.\n// The length of the supplied input must match the end of a block exactly.\n// Before this is called, the table must be initialized with ReadTable unless\n// the encoder re-used the table.\n// deprecated: Use the stateless Decoder() to get a concurrent version.\nfunc (s *Scratch) Decompress1X(in []byte) (out []byte, err error) {\n\tif cap(s.Out) < s.MaxDecodedSize {\n\t\ts.Out = make([]byte, s.MaxDecodedSize)\n\t}\n\ts.Out = s.Out[:0:s.MaxDecodedSize]\n\ts.Out, err = s.Decoder().Decompress1X(s.Out, in)\n\treturn s.Out, err\n}\n\n// Decompress4X will decompress a 4X encoded stream.\n// Before this is called, the table must be initialized with ReadTable unless\n// the encoder re-used the table.\n// The length of the supplied input must match the end of a block exactly.\n// The destination size of the uncompressed data must be known and provided.\n// deprecated: Use the stateless Decoder() to get a concurrent version.\nfunc (s *Scratch) Decompress4X(in []byte, dstSize int) (out []byte, err error) {\n\tif dstSize > s.MaxDecodedSize {\n\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t}\n\tif cap(s.Out) < dstSize {\n\t\ts.Out = make([]byte, s.MaxDecodedSize)\n\t}\n\ts.Out = s.Out[:0:dstSize]\n\ts.Out, err = s.Decoder().Decompress4X(s.Out, in)\n\treturn s.Out, err\n}\n\n// Decoder will return a stateless decoder that can be used by multiple\n// decompressors concurrently.\n// Before this is called, the table must be initialized with ReadTable.\n// The Decoder is still linked to the scratch buffer so that cannot be reused.\n// However, it is safe to discard the scratch.\nfunc (s *Scratch) Decoder() *Decoder {\n\treturn &Decoder{\n\t\tdt:             s.dt,\n\t\tactualTableLog: s.actualTableLog,\n\t\tbufs:           &s.decPool,\n\t}\n}\n\n// Decoder provides stateless decoding.\ntype Decoder struct {\n\tdt             dTable\n\tactualTableLog uint8\n\tbufs           *sync.Pool\n}\n\nfunc (d *Decoder) buffer() *[4][256]byte {\n\tbuf, ok := d.bufs.Get().(*[4][256]byte)\n\tif ok {\n\t\treturn buf\n\t}\n\treturn &[4][256]byte{}\n}\n\n// decompress1X8Bit will decompress a 1X encoded stream with tablelog <= 8.\n// The cap of the output buffer will be the maximum decompressed size.\n// The length of the supplied input must match the end of a block exactly.\nfunc (d *Decoder) decompress1X8Bit(dst, src []byte) ([]byte, error) {\n\tif d.actualTableLog == 8 {\n\t\treturn d.decompress1X8BitExactly(dst, src)\n\t}\n\tvar br bitReaderBytes\n\terr := br.init(src)\n\tif err != nil {\n\t\treturn dst, err\n\t}\n\tmaxDecodedSize := cap(dst)\n\tdst = dst[:0]\n\n\t// Avoid bounds check by always having full sized table.\n\tdt := d.dt.single[:256]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbufs := d.buffer()\n\tbuf := &bufs[0]\n\tvar off uint8\n\n\tswitch d.actualTableLog {\n\tcase 8:\n\t\tconst shift = 0\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\tbr.close()\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 7:\n\t\tconst shift = 8 - 7\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\tbr.close()\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 6:\n\t\tconst shift = 8 - 6\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 5:\n\t\tconst shift = 8 - 5\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 4:\n\t\tconst shift = 8 - 4\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 3:\n\t\tconst shift = 8 - 3\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 2:\n\t\tconst shift = 8 - 2\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tcase 1:\n\t\tconst shift = 8 - 1\n\t\tfor br.off >= 4 {\n\t\t\tbr.fillFast()\n\t\t\tv := dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\t\tv = dt[uint8(br.value>>(56+shift))]\n\t\t\tbr.advance(uint8(v.entry))\n\t\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\t\toff += 4\n\t\t\tif off == 0 {\n\t\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\t\td.bufs.Put(bufs)\n\t\t\t\t\tbr.close()\n\t\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t\t}\n\t\t\t\tdst = append(dst, buf[:]...)\n\t\t\t}\n\t\t}\n\tdefault:\n\t\td.bufs.Put(bufs)\n\t\treturn nil, fmt.Errorf(\"invalid tablelog: %d\", d.actualTableLog)\n\t}\n\n\tif len(dst)+int(off) > maxDecodedSize {\n\t\td.bufs.Put(bufs)\n\t\tbr.close()\n\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t}\n\tdst = append(dst, buf[:off]...)\n\n\t// br < 4, so uint8 is fine\n\tbitsLeft := int8(uint8(br.off)*8 + (64 - br.bitsRead))\n\tshift := (8 - d.actualTableLog) & 7\n\n\tfor bitsLeft > 0 {\n\t\tif br.bitsRead >= 64-8 {\n\t\t\tfor br.off > 0 {\n\t\t\t\tbr.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8)\n\t\t\t\tbr.bitsRead -= 8\n\t\t\t\tbr.off--\n\t\t\t}\n\t\t}\n\t\tif len(dst) >= maxDecodedSize {\n\t\t\tbr.close()\n\t\t\td.bufs.Put(bufs)\n\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t}\n\t\tv := dt[br.peekByteFast()>>shift]\n\t\tnBits := uint8(v.entry)\n\t\tbr.advance(nBits)\n\t\tbitsLeft -= int8(nBits)\n\t\tdst = append(dst, uint8(v.entry>>8))\n\t}\n\td.bufs.Put(bufs)\n\treturn dst, br.close()\n}\n\n// decompress1X8Bit will decompress a 1X encoded stream with tablelog <= 8.\n// The cap of the output buffer will be the maximum decompressed size.\n// The length of the supplied input must match the end of a block exactly.\nfunc (d *Decoder) decompress1X8BitExactly(dst, src []byte) ([]byte, error) {\n\tvar br bitReaderBytes\n\terr := br.init(src)\n\tif err != nil {\n\t\treturn dst, err\n\t}\n\tmaxDecodedSize := cap(dst)\n\tdst = dst[:0]\n\n\t// Avoid bounds check by always having full sized table.\n\tdt := d.dt.single[:256]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbufs := d.buffer()\n\tbuf := &bufs[0]\n\tvar off uint8\n\n\tconst shift = 56\n\n\t//fmt.Printf(\"mask: %b, tl:%d\\n\", mask, d.actualTableLog)\n\tfor br.off >= 4 {\n\t\tbr.fillFast()\n\t\tv := dt[uint8(br.value>>shift)]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\tv = dt[uint8(br.value>>shift)]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\tv = dt[uint8(br.value>>shift)]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\tv = dt[uint8(br.value>>shift)]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\toff += 4\n\t\tif off == 0 {\n\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\td.bufs.Put(bufs)\n\t\t\t\tbr.close()\n\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t}\n\t\t\tdst = append(dst, buf[:]...)\n\t\t}\n\t}\n\n\tif len(dst)+int(off) > maxDecodedSize {\n\t\td.bufs.Put(bufs)\n\t\tbr.close()\n\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t}\n\tdst = append(dst, buf[:off]...)\n\n\t// br < 4, so uint8 is fine\n\tbitsLeft := int8(uint8(br.off)*8 + (64 - br.bitsRead))\n\tfor bitsLeft > 0 {\n\t\tif br.bitsRead >= 64-8 {\n\t\t\tfor br.off > 0 {\n\t\t\t\tbr.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8)\n\t\t\t\tbr.bitsRead -= 8\n\t\t\t\tbr.off--\n\t\t\t}\n\t\t}\n\t\tif len(dst) >= maxDecodedSize {\n\t\t\td.bufs.Put(bufs)\n\t\t\tbr.close()\n\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t}\n\t\tv := dt[br.peekByteFast()]\n\t\tnBits := uint8(v.entry)\n\t\tbr.advance(nBits)\n\t\tbitsLeft -= int8(nBits)\n\t\tdst = append(dst, uint8(v.entry>>8))\n\t}\n\td.bufs.Put(bufs)\n\treturn dst, br.close()\n}\n\n// Decompress4X will decompress a 4X encoded stream.\n// The length of the supplied input must match the end of a block exactly.\n// The *capacity* of the dst slice must match the destination size of\n// the uncompressed data exactly.\nfunc (d *Decoder) decompress4X8bit(dst, src []byte) ([]byte, error) {\n\tif d.actualTableLog == 8 {\n\t\treturn d.decompress4X8bitExactly(dst, src)\n\t}\n\n\tvar br [4]bitReaderBytes\n\tstart := 6\n\tfor i := range 3 {\n\t\tlength := int(src[i*2]) | (int(src[i*2+1]) << 8)\n\t\tif start+length >= len(src) {\n\t\t\treturn nil, errors.New(\"truncated input (or invalid offset)\")\n\t\t}\n\t\terr := br[i].init(src[start : start+length])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart += length\n\t}\n\terr := br[3].init(src[start:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// destination, offset to match first output\n\tdstSize := cap(dst)\n\tdst = dst[:dstSize]\n\tout := dst\n\tdstEvery := (dstSize + 3) / 4\n\n\tshift := (56 + (8 - d.actualTableLog)) & 63\n\n\tconst tlSize = 1 << 8\n\tsingle := d.dt.single[:tlSize]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbuf := d.buffer()\n\tvar off uint8\n\tvar decoded int\n\n\t// Decode 4 values from each decoder/loop.\n\tconst bufoff = 256\n\tfor {\n\t\tif br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {\n\t\t\tbreak\n\t\t}\n\n\t\t{\n\t\t\t// Interleave 2 decodes.\n\t\t\tconst stream = 0\n\t\t\tconst stream2 = 1\n\t\t\tbr1 := &br[stream]\n\t\t\tbr2 := &br[stream2]\n\t\t\tbr1.fillFast()\n\t\t\tbr2.fillFast()\n\n\t\t\tv := single[uint8(br1.value>>shift)].entry\n\t\t\tv2 := single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off] = uint8(v >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+1] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+2] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+2] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+3] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+3] = uint8(v2 >> 8)\n\t\t}\n\n\t\t{\n\t\t\tconst stream = 2\n\t\t\tconst stream2 = 3\n\t\t\tbr1 := &br[stream]\n\t\t\tbr2 := &br[stream2]\n\t\t\tbr1.fillFast()\n\t\t\tbr2.fillFast()\n\n\t\t\tv := single[uint8(br1.value>>shift)].entry\n\t\t\tv2 := single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off] = uint8(v >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+1] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+2] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+2] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+3] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+3] = uint8(v2 >> 8)\n\t\t}\n\n\t\toff += 4\n\n\t\tif off == 0 {\n\t\t\tif bufoff > dstEvery {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 1\")\n\t\t\t}\n\t\t\t// There must at least be 3 buffers left.\n\t\t\tif len(out)-bufoff < dstEvery*3 {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 2\")\n\t\t\t}\n\t\t\t//copy(out, buf[0][:])\n\t\t\t//copy(out[dstEvery:], buf[1][:])\n\t\t\t//copy(out[dstEvery*2:], buf[2][:])\n\t\t\t*(*[bufoff]byte)(out) = buf[0]\n\t\t\t*(*[bufoff]byte)(out[dstEvery:]) = buf[1]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*2:]) = buf[2]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*3:]) = buf[3]\n\t\t\tout = out[bufoff:]\n\t\t\tdecoded += bufoff * 4\n\t\t}\n\t}\n\tif off > 0 {\n\t\tioff := int(off)\n\t\tif len(out) < dstEvery*3+ioff {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 3\")\n\t\t}\n\t\tcopy(out, buf[0][:off])\n\t\tcopy(out[dstEvery:], buf[1][:off])\n\t\tcopy(out[dstEvery*2:], buf[2][:off])\n\t\tcopy(out[dstEvery*3:], buf[3][:off])\n\t\tdecoded += int(off) * 4\n\t\tout = out[off:]\n\t}\n\n\t// Decode remaining.\n\t// Decode remaining.\n\tremainBytes := dstEvery - (decoded / 4)\n\tfor i := range br {\n\t\toffset := dstEvery * i\n\t\tendsAt := min(offset+remainBytes, len(out))\n\t\tbr := &br[i]\n\t\tbitsLeft := br.remaining()\n\t\tfor bitsLeft > 0 {\n\t\t\tif br.finished() {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\tif br.bitsRead >= 56 {\n\t\t\t\tif br.off >= 4 {\n\t\t\t\t\tv := br.in[br.off-4:]\n\t\t\t\t\tv = v[:4]\n\t\t\t\t\tlow := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24)\n\t\t\t\t\tbr.value |= uint64(low) << (br.bitsRead - 32)\n\t\t\t\t\tbr.bitsRead -= 32\n\t\t\t\t\tbr.off -= 4\n\t\t\t\t} else {\n\t\t\t\t\tfor br.off > 0 {\n\t\t\t\t\t\tbr.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8)\n\t\t\t\t\t\tbr.bitsRead -= 8\n\t\t\t\t\t\tbr.off--\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// end inline...\n\t\t\tif offset >= endsAt {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 4\")\n\t\t\t}\n\n\t\t\t// Read value and increment offset.\n\t\t\tv := single[uint8(br.value>>shift)].entry\n\t\t\tnBits := uint8(v)\n\t\t\tbr.advance(nBits)\n\t\t\tbitsLeft -= uint(nBits)\n\t\t\tout[offset] = uint8(v >> 8)\n\t\t\toffset++\n\t\t}\n\t\tif offset != endsAt {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, fmt.Errorf(\"corruption detected: short output block %d, end %d != %d\", i, offset, endsAt)\n\t\t}\n\t\tdecoded += offset - dstEvery*i\n\t\terr = br.close()\n\t\tif err != nil {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\td.bufs.Put(buf)\n\tif dstSize != decoded {\n\t\treturn nil, errors.New(\"corruption detected: short output block\")\n\t}\n\treturn dst, nil\n}\n\n// Decompress4X will decompress a 4X encoded stream.\n// The length of the supplied input must match the end of a block exactly.\n// The *capacity* of the dst slice must match the destination size of\n// the uncompressed data exactly.\nfunc (d *Decoder) decompress4X8bitExactly(dst, src []byte) ([]byte, error) {\n\tvar br [4]bitReaderBytes\n\tstart := 6\n\tfor i := range 3 {\n\t\tlength := int(src[i*2]) | (int(src[i*2+1]) << 8)\n\t\tif start+length >= len(src) {\n\t\t\treturn nil, errors.New(\"truncated input (or invalid offset)\")\n\t\t}\n\t\terr := br[i].init(src[start : start+length])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart += length\n\t}\n\terr := br[3].init(src[start:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// destination, offset to match first output\n\tdstSize := cap(dst)\n\tdst = dst[:dstSize]\n\tout := dst\n\tdstEvery := (dstSize + 3) / 4\n\n\tconst shift = 56\n\tconst tlSize = 1 << 8\n\tsingle := d.dt.single[:tlSize]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbuf := d.buffer()\n\tvar off uint8\n\tvar decoded int\n\n\t// Decode 4 values from each decoder/loop.\n\tconst bufoff = 256\n\tfor {\n\t\tif br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {\n\t\t\tbreak\n\t\t}\n\n\t\t{\n\t\t\t// Interleave 2 decodes.\n\t\t\tconst stream = 0\n\t\t\tconst stream2 = 1\n\t\t\tbr1 := &br[stream]\n\t\t\tbr2 := &br[stream2]\n\t\t\tbr1.fillFast()\n\t\t\tbr2.fillFast()\n\n\t\t\tv := single[uint8(br1.value>>shift)].entry\n\t\t\tv2 := single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off] = uint8(v >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+1] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+2] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+2] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+3] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+3] = uint8(v2 >> 8)\n\t\t}\n\n\t\t{\n\t\t\tconst stream = 2\n\t\t\tconst stream2 = 3\n\t\t\tbr1 := &br[stream]\n\t\t\tbr2 := &br[stream2]\n\t\t\tbr1.fillFast()\n\t\t\tbr2.fillFast()\n\n\t\t\tv := single[uint8(br1.value>>shift)].entry\n\t\t\tv2 := single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off] = uint8(v >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+1] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+2] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+2] = uint8(v2 >> 8)\n\n\t\t\tv = single[uint8(br1.value>>shift)].entry\n\t\t\tv2 = single[uint8(br2.value>>shift)].entry\n\t\t\tbr1.bitsRead += uint8(v)\n\t\t\tbr1.value <<= v & 63\n\t\t\tbr2.bitsRead += uint8(v2)\n\t\t\tbr2.value <<= v2 & 63\n\t\t\tbuf[stream][off+3] = uint8(v >> 8)\n\t\t\tbuf[stream2][off+3] = uint8(v2 >> 8)\n\t\t}\n\n\t\toff += 4\n\n\t\tif off == 0 {\n\t\t\tif bufoff > dstEvery {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 1\")\n\t\t\t}\n\t\t\t// There must at least be 3 buffers left.\n\t\t\tif len(out)-bufoff < dstEvery*3 {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 2\")\n\t\t\t}\n\n\t\t\t//copy(out, buf[0][:])\n\t\t\t//copy(out[dstEvery:], buf[1][:])\n\t\t\t//copy(out[dstEvery*2:], buf[2][:])\n\t\t\t// copy(out[dstEvery*3:], buf[3][:])\n\t\t\t*(*[bufoff]byte)(out) = buf[0]\n\t\t\t*(*[bufoff]byte)(out[dstEvery:]) = buf[1]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*2:]) = buf[2]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*3:]) = buf[3]\n\t\t\tout = out[bufoff:]\n\t\t\tdecoded += bufoff * 4\n\t\t}\n\t}\n\tif off > 0 {\n\t\tioff := int(off)\n\t\tif len(out) < dstEvery*3+ioff {\n\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 3\")\n\t\t}\n\t\tcopy(out, buf[0][:off])\n\t\tcopy(out[dstEvery:], buf[1][:off])\n\t\tcopy(out[dstEvery*2:], buf[2][:off])\n\t\tcopy(out[dstEvery*3:], buf[3][:off])\n\t\tdecoded += int(off) * 4\n\t\tout = out[off:]\n\t}\n\n\t// Decode remaining.\n\tremainBytes := dstEvery - (decoded / 4)\n\tfor i := range br {\n\t\toffset := dstEvery * i\n\t\tendsAt := min(offset+remainBytes, len(out))\n\t\tbr := &br[i]\n\t\tbitsLeft := br.remaining()\n\t\tfor bitsLeft > 0 {\n\t\t\tif br.finished() {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\tif br.bitsRead >= 56 {\n\t\t\t\tif br.off >= 4 {\n\t\t\t\t\tv := br.in[br.off-4:]\n\t\t\t\t\tv = v[:4]\n\t\t\t\t\tlow := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24)\n\t\t\t\t\tbr.value |= uint64(low) << (br.bitsRead - 32)\n\t\t\t\t\tbr.bitsRead -= 32\n\t\t\t\t\tbr.off -= 4\n\t\t\t\t} else {\n\t\t\t\t\tfor br.off > 0 {\n\t\t\t\t\t\tbr.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8)\n\t\t\t\t\t\tbr.bitsRead -= 8\n\t\t\t\t\t\tbr.off--\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// end inline...\n\t\t\tif offset >= endsAt {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 4\")\n\t\t\t}\n\n\t\t\t// Read value and increment offset.\n\t\t\tv := single[br.peekByteFast()].entry\n\t\t\tnBits := uint8(v)\n\t\t\tbr.advance(nBits)\n\t\t\tbitsLeft -= uint(nBits)\n\t\t\tout[offset] = uint8(v >> 8)\n\t\t\toffset++\n\t\t}\n\t\tif offset != endsAt {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, fmt.Errorf(\"corruption detected: short output block %d, end %d != %d\", i, offset, endsAt)\n\t\t}\n\n\t\tdecoded += offset - dstEvery*i\n\t\terr = br.close()\n\t\tif err != nil {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\td.bufs.Put(buf)\n\tif dstSize != decoded {\n\t\treturn nil, errors.New(\"corruption detected: short output block\")\n\t}\n\treturn dst, nil\n}\n\n// matches will compare a decoding table to a coding table.\n// Errors are written to the writer.\n// Nothing will be written if table is ok.\nfunc (s *Scratch) matches(ct cTable, w io.Writer) {\n\tif s == nil || len(s.dt.single) == 0 {\n\t\treturn\n\t}\n\tdt := s.dt.single[:1<<s.actualTableLog]\n\ttablelog := s.actualTableLog\n\tok := 0\n\tbroken := 0\n\tfor sym, enc := range ct {\n\t\terrs := 0\n\t\tbroken++\n\t\tif enc.nBits == 0 {\n\t\t\tfor _, dec := range dt {\n\t\t\t\tif uint8(dec.entry>>8) == byte(sym) {\n\t\t\t\t\tfmt.Fprintf(w, \"symbol %x has decoder, but no encoder\\n\", sym)\n\t\t\t\t\terrs++\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif errs == 0 {\n\t\t\t\tbroken--\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\t// Unused bits in input\n\t\tub := tablelog - enc.nBits\n\t\ttop := enc.val << ub\n\t\t// decoder looks at top bits.\n\t\tdec := dt[top]\n\t\tif uint8(dec.entry) != enc.nBits {\n\t\t\tfmt.Fprintf(w, \"symbol 0x%x bit size mismatch (enc: %d, dec:%d).\\n\", sym, enc.nBits, uint8(dec.entry))\n\t\t\terrs++\n\t\t}\n\t\tif uint8(dec.entry>>8) != uint8(sym) {\n\t\t\tfmt.Fprintf(w, \"symbol 0x%x decoder output mismatch (enc: %d, dec:%d).\\n\", sym, sym, uint8(dec.entry>>8))\n\t\t\terrs++\n\t\t}\n\t\tif errs > 0 {\n\t\t\tfmt.Fprintf(w, \"%d errors in base, stopping\\n\", errs)\n\t\t\tcontinue\n\t\t}\n\t\t// Ensure that all combinations are covered.\n\t\tfor i := uint16(0); i < (1 << ub); i++ {\n\t\t\tvval := top | i\n\t\t\tdec := dt[vval]\n\t\t\tif uint8(dec.entry) != enc.nBits {\n\t\t\t\tfmt.Fprintf(w, \"symbol 0x%x bit size mismatch (enc: %d, dec:%d).\\n\", vval, enc.nBits, uint8(dec.entry))\n\t\t\t\terrs++\n\t\t\t}\n\t\t\tif uint8(dec.entry>>8) != uint8(sym) {\n\t\t\t\tfmt.Fprintf(w, \"symbol 0x%x decoder output mismatch (enc: %d, dec:%d).\\n\", vval, sym, uint8(dec.entry>>8))\n\t\t\t\terrs++\n\t\t\t}\n\t\t\tif errs > 20 {\n\t\t\t\tfmt.Fprintf(w, \"%d errors, stopping\\n\", errs)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif errs == 0 {\n\t\t\tok++\n\t\t\tbroken--\n\t\t}\n\t}\n\tif broken > 0 {\n\t\tfmt.Fprintf(w, \"%d broken, %d ok\\n\", broken, ok)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/decompress_amd64.go",
    "content": "//go:build amd64 && !appengine && !noasm && gc\n// +build amd64,!appengine,!noasm,gc\n\n// This file contains the specialisation of Decoder.Decompress4X\n// and Decoder.Decompress1X that use an asm implementation of thir main loops.\npackage huff0\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/klauspost/compress/internal/cpuinfo\"\n)\n\n// decompress4x_main_loop_x86 is an x86 assembler implementation\n// of Decompress4X when tablelog > 8.\n//\n//go:noescape\nfunc decompress4x_main_loop_amd64(ctx *decompress4xContext)\n\n// decompress4x_8b_loop_x86 is an x86 assembler implementation\n// of Decompress4X when tablelog <= 8 which decodes 4 entries\n// per loop.\n//\n//go:noescape\nfunc decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)\n\n// fallback8BitSize is the size where using Go version is faster.\nconst fallback8BitSize = 800\n\ntype decompress4xContext struct {\n\tpbr      *[4]bitReaderShifted\n\tpeekBits uint8\n\tout      *byte\n\tdstEvery int\n\ttbl      *dEntrySingle\n\tdecoded  int\n\tlimit    *byte\n}\n\n// Decompress4X will decompress a 4X encoded stream.\n// The length of the supplied input must match the end of a block exactly.\n// The *capacity* of the dst slice must match the destination size of\n// the uncompressed data exactly.\nfunc (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {\n\tif len(d.dt.single) == 0 {\n\t\treturn nil, errors.New(\"no table loaded\")\n\t}\n\tif len(src) < 6+(4*1) {\n\t\treturn nil, errors.New(\"input too small\")\n\t}\n\n\tuse8BitTables := d.actualTableLog <= 8\n\tif cap(dst) < fallback8BitSize && use8BitTables {\n\t\treturn d.decompress4X8bit(dst, src)\n\t}\n\n\tvar br [4]bitReaderShifted\n\t// Decode \"jump table\"\n\tstart := 6\n\tfor i := range 3 {\n\t\tlength := int(src[i*2]) | (int(src[i*2+1]) << 8)\n\t\tif start+length >= len(src) {\n\t\t\treturn nil, errors.New(\"truncated input (or invalid offset)\")\n\t\t}\n\t\terr := br[i].init(src[start : start+length])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart += length\n\t}\n\terr := br[3].init(src[start:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// destination, offset to match first output\n\tdstSize := cap(dst)\n\tdst = dst[:dstSize]\n\tout := dst\n\tdstEvery := (dstSize + 3) / 4\n\n\tconst tlSize = 1 << tableLogMax\n\tconst tlMask = tlSize - 1\n\tsingle := d.dt.single[:tlSize]\n\n\tvar decoded int\n\n\tif len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) {\n\t\tctx := decompress4xContext{\n\t\t\tpbr:      &br,\n\t\t\tpeekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()\n\t\t\tout:      &out[0],\n\t\t\tdstEvery: dstEvery,\n\t\t\ttbl:      &single[0],\n\t\t\tlimit:    &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last.\n\t\t}\n\t\tif use8BitTables {\n\t\t\tdecompress4x_8b_main_loop_amd64(&ctx)\n\t\t} else {\n\t\t\tdecompress4x_main_loop_amd64(&ctx)\n\t\t}\n\n\t\tdecoded = ctx.decoded\n\t\tout = out[decoded/4:]\n\t}\n\n\t// Decode remaining.\n\tremainBytes := dstEvery - (decoded / 4)\n\tfor i := range br {\n\t\toffset := dstEvery * i\n\t\tendsAt := min(offset+remainBytes, len(out))\n\t\tbr := &br[i]\n\t\tbitsLeft := br.remaining()\n\t\tfor bitsLeft > 0 {\n\t\t\tbr.fill()\n\t\t\tif offset >= endsAt {\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 4\")\n\t\t\t}\n\n\t\t\t// Read value and increment offset.\n\t\t\tval := br.peekBitsFast(d.actualTableLog)\n\t\t\tv := single[val&tlMask].entry\n\t\t\tnBits := uint8(v)\n\t\t\tbr.advance(nBits)\n\t\t\tbitsLeft -= uint(nBits)\n\t\t\tout[offset] = uint8(v >> 8)\n\t\t\toffset++\n\t\t}\n\t\tif offset != endsAt {\n\t\t\treturn nil, fmt.Errorf(\"corruption detected: short output block %d, end %d != %d\", i, offset, endsAt)\n\t\t}\n\t\tdecoded += offset - dstEvery*i\n\t\terr = br.close()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif dstSize != decoded {\n\t\treturn nil, errors.New(\"corruption detected: short output block\")\n\t}\n\treturn dst, nil\n}\n\n// decompress4x_main_loop_x86 is an x86 assembler implementation\n// of Decompress1X when tablelog > 8.\n//\n//go:noescape\nfunc decompress1x_main_loop_amd64(ctx *decompress1xContext)\n\n// decompress4x_main_loop_x86 is an x86 with BMI2 assembler implementation\n// of Decompress1X when tablelog > 8.\n//\n//go:noescape\nfunc decompress1x_main_loop_bmi2(ctx *decompress1xContext)\n\ntype decompress1xContext struct {\n\tpbr      *bitReaderShifted\n\tpeekBits uint8\n\tout      *byte\n\toutCap   int\n\ttbl      *dEntrySingle\n\tdecoded  int\n}\n\n// Error reported by asm implementations\nconst error_max_decoded_size_exeeded = -1\n\n// Decompress1X will decompress a 1X encoded stream.\n// The cap of the output buffer will be the maximum decompressed size.\n// The length of the supplied input must match the end of a block exactly.\nfunc (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {\n\tif len(d.dt.single) == 0 {\n\t\treturn nil, errors.New(\"no table loaded\")\n\t}\n\tvar br bitReaderShifted\n\terr := br.init(src)\n\tif err != nil {\n\t\treturn dst, err\n\t}\n\tmaxDecodedSize := cap(dst)\n\tdst = dst[:maxDecodedSize]\n\n\tconst tlSize = 1 << tableLogMax\n\tconst tlMask = tlSize - 1\n\n\tif maxDecodedSize >= 4 {\n\t\tctx := decompress1xContext{\n\t\t\tpbr:      &br,\n\t\t\tout:      &dst[0],\n\t\t\toutCap:   maxDecodedSize,\n\t\t\tpeekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()\n\t\t\ttbl:      &d.dt.single[0],\n\t\t}\n\n\t\tif cpuinfo.HasBMI2() {\n\t\t\tdecompress1x_main_loop_bmi2(&ctx)\n\t\t} else {\n\t\t\tdecompress1x_main_loop_amd64(&ctx)\n\t\t}\n\t\tif ctx.decoded == error_max_decoded_size_exeeded {\n\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t}\n\n\t\tdst = dst[:ctx.decoded]\n\t}\n\n\t// br < 8, so uint8 is fine\n\tbitsLeft := uint8(br.off)*8 + 64 - br.bitsRead\n\tfor bitsLeft > 0 {\n\t\tbr.fill()\n\t\tif len(dst) >= maxDecodedSize {\n\t\t\tbr.close()\n\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t}\n\t\tv := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tnBits := uint8(v.entry)\n\t\tbr.advance(nBits)\n\t\tbitsLeft -= nBits\n\t\tdst = append(dst, uint8(v.entry>>8))\n\t}\n\treturn dst, br.close()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/decompress_amd64.s",
    "content": "// Code generated by command: go run gen.go -out ../decompress_amd64.s -pkg=huff0. DO NOT EDIT.\n\n//go:build amd64 && !appengine && !noasm && gc\n\n// func decompress4x_main_loop_amd64(ctx *decompress4xContext)\nTEXT ·decompress4x_main_loop_amd64(SB), $0-8\n\t// Preload values\n\tMOVQ    ctx+0(FP), AX\n\tMOVBQZX 8(AX), DI\n\tMOVQ    16(AX), BX\n\tMOVQ    48(AX), SI\n\tMOVQ    24(AX), R8\n\tMOVQ    32(AX), R9\n\tMOVQ    (AX), R10\n\n\t// Main loop\nmain_loop:\n\tXORL  DX, DX\n\tCMPQ  BX, SI\n\tSETGE DL\n\n\t// br0.fillFast32()\n\tMOVQ    32(R10), R11\n\tMOVBQZX 40(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill0\n\tMOVQ    24(R10), AX\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, AX\n\tMOVQ    (R10), R13\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (AX)(R13*1), R13\n\tMOVQ R12, CX\n\tSHLQ CL, R13\n\tMOVQ AX, 24(R10)\n\tORQ  R13, R11\n\n\t// exhausted += (br0.off < 4)\n\tCMPQ AX, $0x04\n\tADCB $+0, DL\n\nskip_fill0:\n\t// val0 := br0.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br0.peekTopBits(peekBits)\n\tMOVQ DI, CX\n\tMOVQ R11, R13\n\tSHRQ CL, R13\n\n\t// v1 := table[val1&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v1.entry))\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// these two writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\tMOVW AX, (BX)\n\n\t// update the bitreader structure\n\tMOVQ R11, 32(R10)\n\tMOVB R12, 40(R10)\n\n\t// br1.fillFast32()\n\tMOVQ    80(R10), R11\n\tMOVBQZX 88(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill1\n\tMOVQ    72(R10), AX\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, AX\n\tMOVQ    48(R10), R13\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (AX)(R13*1), R13\n\tMOVQ R12, CX\n\tSHLQ CL, R13\n\tMOVQ AX, 72(R10)\n\tORQ  R13, R11\n\n\t// exhausted += (br1.off < 4)\n\tCMPQ AX, $0x04\n\tADCB $+0, DL\n\nskip_fill1:\n\t// val0 := br1.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br1.peekTopBits(peekBits)\n\tMOVQ DI, CX\n\tMOVQ R11, R13\n\tSHRQ CL, R13\n\n\t// v1 := table[val1&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v1.entry))\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// these two writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\tMOVW AX, (BX)(R8*1)\n\n\t// update the bitreader structure\n\tMOVQ R11, 80(R10)\n\tMOVB R12, 88(R10)\n\n\t// br2.fillFast32()\n\tMOVQ    128(R10), R11\n\tMOVBQZX 136(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill2\n\tMOVQ    120(R10), AX\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, AX\n\tMOVQ    96(R10), R13\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (AX)(R13*1), R13\n\tMOVQ R12, CX\n\tSHLQ CL, R13\n\tMOVQ AX, 120(R10)\n\tORQ  R13, R11\n\n\t// exhausted += (br2.off < 4)\n\tCMPQ AX, $0x04\n\tADCB $+0, DL\n\nskip_fill2:\n\t// val0 := br2.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br2.peekTopBits(peekBits)\n\tMOVQ DI, CX\n\tMOVQ R11, R13\n\tSHRQ CL, R13\n\n\t// v1 := table[val1&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v1.entry))\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// these two writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\tMOVW AX, (BX)(R8*2)\n\n\t// update the bitreader structure\n\tMOVQ R11, 128(R10)\n\tMOVB R12, 136(R10)\n\n\t// br3.fillFast32()\n\tMOVQ    176(R10), R11\n\tMOVBQZX 184(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill3\n\tMOVQ    168(R10), AX\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, AX\n\tMOVQ    144(R10), R13\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (AX)(R13*1), R13\n\tMOVQ R12, CX\n\tSHLQ CL, R13\n\tMOVQ AX, 168(R10)\n\tORQ  R13, R11\n\n\t// exhausted += (br3.off < 4)\n\tCMPQ AX, $0x04\n\tADCB $+0, DL\n\nskip_fill3:\n\t// val0 := br3.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br3.peekTopBits(peekBits)\n\tMOVQ DI, CX\n\tMOVQ R11, R13\n\tSHRQ CL, R13\n\n\t// v1 := table[val1&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v1.entry))\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// these two writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\tLEAQ (R8)(R8*2), CX\n\tMOVW AX, (BX)(CX*1)\n\n\t// update the bitreader structure\n\tMOVQ  R11, 176(R10)\n\tMOVB  R12, 184(R10)\n\tADDQ  $0x02, BX\n\tTESTB DL, DL\n\tJZ    main_loop\n\tMOVQ  ctx+0(FP), AX\n\tSUBQ  16(AX), BX\n\tSHLQ  $0x02, BX\n\tMOVQ  BX, 40(AX)\n\tRET\n\n// func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)\nTEXT ·decompress4x_8b_main_loop_amd64(SB), $0-8\n\t// Preload values\n\tMOVQ    ctx+0(FP), CX\n\tMOVBQZX 8(CX), DI\n\tMOVQ    16(CX), BX\n\tMOVQ    48(CX), SI\n\tMOVQ    24(CX), R8\n\tMOVQ    32(CX), R9\n\tMOVQ    (CX), R10\n\n\t// Main loop\nmain_loop:\n\tXORL  DX, DX\n\tCMPQ  BX, SI\n\tSETGE DL\n\n\t// br0.fillFast32()\n\tMOVQ    32(R10), R11\n\tMOVBQZX 40(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill0\n\tMOVQ    24(R10), R13\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, R13\n\tMOVQ    (R10), R14\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (R13)(R14*1), R14\n\tMOVQ R12, CX\n\tSHLQ CL, R14\n\tMOVQ R13, 24(R10)\n\tORQ  R14, R11\n\n\t// exhausted += (br0.off < 4)\n\tCMPQ R13, $0x04\n\tADCB $+0, DL\n\nskip_fill0:\n\t// val0 := br0.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br0.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v1 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v1.entry)\n\tMOVB   CH, AH\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// val2 := br0.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v2 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v2.entry)\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val3 := br0.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v3 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br0.advance(uint8(v3.entry)\n\tMOVB   CH, AL\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// these four writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\t// out[id * dstEvery + 3] = uint8(v2.entry >> 8)\n\t// out[id * dstEvery + 4] = uint8(v3.entry >> 8)\n\tMOVL AX, (BX)\n\n\t// update the bitreader structure\n\tMOVQ R11, 32(R10)\n\tMOVB R12, 40(R10)\n\n\t// br1.fillFast32()\n\tMOVQ    80(R10), R11\n\tMOVBQZX 88(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill1\n\tMOVQ    72(R10), R13\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, R13\n\tMOVQ    48(R10), R14\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (R13)(R14*1), R14\n\tMOVQ R12, CX\n\tSHLQ CL, R14\n\tMOVQ R13, 72(R10)\n\tORQ  R14, R11\n\n\t// exhausted += (br1.off < 4)\n\tCMPQ R13, $0x04\n\tADCB $+0, DL\n\nskip_fill1:\n\t// val0 := br1.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br1.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v1 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v1.entry)\n\tMOVB   CH, AH\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// val2 := br1.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v2 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v2.entry)\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val3 := br1.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v3 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br1.advance(uint8(v3.entry)\n\tMOVB   CH, AL\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// these four writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\t// out[id * dstEvery + 3] = uint8(v2.entry >> 8)\n\t// out[id * dstEvery + 4] = uint8(v3.entry >> 8)\n\tMOVL AX, (BX)(R8*1)\n\n\t// update the bitreader structure\n\tMOVQ R11, 80(R10)\n\tMOVB R12, 88(R10)\n\n\t// br2.fillFast32()\n\tMOVQ    128(R10), R11\n\tMOVBQZX 136(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill2\n\tMOVQ    120(R10), R13\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, R13\n\tMOVQ    96(R10), R14\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (R13)(R14*1), R14\n\tMOVQ R12, CX\n\tSHLQ CL, R14\n\tMOVQ R13, 120(R10)\n\tORQ  R14, R11\n\n\t// exhausted += (br2.off < 4)\n\tCMPQ R13, $0x04\n\tADCB $+0, DL\n\nskip_fill2:\n\t// val0 := br2.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br2.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v1 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v1.entry)\n\tMOVB   CH, AH\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// val2 := br2.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v2 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v2.entry)\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val3 := br2.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v3 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br2.advance(uint8(v3.entry)\n\tMOVB   CH, AL\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// these four writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\t// out[id * dstEvery + 3] = uint8(v2.entry >> 8)\n\t// out[id * dstEvery + 4] = uint8(v3.entry >> 8)\n\tMOVL AX, (BX)(R8*2)\n\n\t// update the bitreader structure\n\tMOVQ R11, 128(R10)\n\tMOVB R12, 136(R10)\n\n\t// br3.fillFast32()\n\tMOVQ    176(R10), R11\n\tMOVBQZX 184(R10), R12\n\tCMPQ    R12, $0x20\n\tJBE     skip_fill3\n\tMOVQ    168(R10), R13\n\tSUBQ    $0x20, R12\n\tSUBQ    $0x04, R13\n\tMOVQ    144(R10), R14\n\n\t// b.value |= uint64(low) << (b.bitsRead & 63)\n\tMOVL (R13)(R14*1), R14\n\tMOVQ R12, CX\n\tSHLQ CL, R14\n\tMOVQ R13, 168(R10)\n\tORQ  R14, R11\n\n\t// exhausted += (br3.off < 4)\n\tCMPQ R13, $0x04\n\tADCB $+0, DL\n\nskip_fill3:\n\t// val0 := br3.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v0 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v0.entry)\n\tMOVB CH, AL\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val1 := br3.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v1 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v1.entry)\n\tMOVB   CH, AH\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// val2 := br3.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v2 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v2.entry)\n\tMOVB CH, AH\n\tSHLQ CL, R11\n\tADDB CL, R12\n\n\t// val3 := br3.peekTopBits(peekBits)\n\tMOVQ R11, R13\n\tMOVQ DI, CX\n\tSHRQ CL, R13\n\n\t// v3 := table[val0&mask]\n\tMOVW (R9)(R13*2), CX\n\n\t// br3.advance(uint8(v3.entry)\n\tMOVB   CH, AL\n\tSHLQ   CL, R11\n\tADDB   CL, R12\n\tBSWAPL AX\n\n\t// these four writes get coalesced\n\t// out[id * dstEvery + 0] = uint8(v0.entry >> 8)\n\t// out[id * dstEvery + 1] = uint8(v1.entry >> 8)\n\t// out[id * dstEvery + 3] = uint8(v2.entry >> 8)\n\t// out[id * dstEvery + 4] = uint8(v3.entry >> 8)\n\tLEAQ (R8)(R8*2), CX\n\tMOVL AX, (BX)(CX*1)\n\n\t// update the bitreader structure\n\tMOVQ  R11, 176(R10)\n\tMOVB  R12, 184(R10)\n\tADDQ  $0x04, BX\n\tTESTB DL, DL\n\tJZ    main_loop\n\tMOVQ  ctx+0(FP), AX\n\tSUBQ  16(AX), BX\n\tSHLQ  $0x02, BX\n\tMOVQ  BX, 40(AX)\n\tRET\n\n// func decompress1x_main_loop_amd64(ctx *decompress1xContext)\nTEXT ·decompress1x_main_loop_amd64(SB), $0-8\n\tMOVQ    ctx+0(FP), CX\n\tMOVQ    16(CX), DX\n\tMOVQ    24(CX), BX\n\tCMPQ    BX, $0x04\n\tJB      error_max_decoded_size_exceeded\n\tLEAQ    (DX)(BX*1), BX\n\tMOVQ    (CX), SI\n\tMOVQ    (SI), R8\n\tMOVQ    24(SI), R9\n\tMOVQ    32(SI), R10\n\tMOVBQZX 40(SI), R11\n\tMOVQ    32(CX), SI\n\tMOVBQZX 8(CX), DI\n\tJMP     loop_condition\n\nmain_loop:\n\t// Check if we have room for 4 bytes in the output buffer\n\tLEAQ 4(DX), CX\n\tCMPQ CX, BX\n\tJGE  error_max_decoded_size_exceeded\n\n\t// Decode 4 values\n\tCMPQ R11, $0x20\n\tJL   bitReader_fillFast_1_end\n\tSUBQ $0x20, R11\n\tSUBQ $0x04, R9\n\tMOVL (R8)(R9*1), R12\n\tMOVQ R11, CX\n\tSHLQ CL, R12\n\tORQ  R12, R10\n\nbitReader_fillFast_1_end:\n\tMOVQ    DI, CX\n\tMOVQ    R10, R12\n\tSHRQ    CL, R12\n\tMOVW    (SI)(R12*2), CX\n\tMOVB    CH, AL\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLQ    CL, R10\n\tMOVQ    DI, CX\n\tMOVQ    R10, R12\n\tSHRQ    CL, R12\n\tMOVW    (SI)(R12*2), CX\n\tMOVB    CH, AH\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLQ    CL, R10\n\tBSWAPL  AX\n\tCMPQ    R11, $0x20\n\tJL      bitReader_fillFast_2_end\n\tSUBQ    $0x20, R11\n\tSUBQ    $0x04, R9\n\tMOVL    (R8)(R9*1), R12\n\tMOVQ    R11, CX\n\tSHLQ    CL, R12\n\tORQ     R12, R10\n\nbitReader_fillFast_2_end:\n\tMOVQ    DI, CX\n\tMOVQ    R10, R12\n\tSHRQ    CL, R12\n\tMOVW    (SI)(R12*2), CX\n\tMOVB    CH, AH\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLQ    CL, R10\n\tMOVQ    DI, CX\n\tMOVQ    R10, R12\n\tSHRQ    CL, R12\n\tMOVW    (SI)(R12*2), CX\n\tMOVB    CH, AL\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLQ    CL, R10\n\tBSWAPL  AX\n\n\t// Store the decoded values\n\tMOVL AX, (DX)\n\tADDQ $0x04, DX\n\nloop_condition:\n\tCMPQ R9, $0x08\n\tJGE  main_loop\n\n\t// Update ctx structure\n\tMOVQ ctx+0(FP), AX\n\tSUBQ 16(AX), DX\n\tMOVQ DX, 40(AX)\n\tMOVQ (AX), AX\n\tMOVQ R9, 24(AX)\n\tMOVQ R10, 32(AX)\n\tMOVB R11, 40(AX)\n\tRET\n\n\t// Report error\nerror_max_decoded_size_exceeded:\n\tMOVQ ctx+0(FP), AX\n\tMOVQ $-1, CX\n\tMOVQ CX, 40(AX)\n\tRET\n\n// func decompress1x_main_loop_bmi2(ctx *decompress1xContext)\n// Requires: BMI2\nTEXT ·decompress1x_main_loop_bmi2(SB), $0-8\n\tMOVQ    ctx+0(FP), CX\n\tMOVQ    16(CX), DX\n\tMOVQ    24(CX), BX\n\tCMPQ    BX, $0x04\n\tJB      error_max_decoded_size_exceeded\n\tLEAQ    (DX)(BX*1), BX\n\tMOVQ    (CX), SI\n\tMOVQ    (SI), R8\n\tMOVQ    24(SI), R9\n\tMOVQ    32(SI), R10\n\tMOVBQZX 40(SI), R11\n\tMOVQ    32(CX), SI\n\tMOVBQZX 8(CX), DI\n\tJMP     loop_condition\n\nmain_loop:\n\t// Check if we have room for 4 bytes in the output buffer\n\tLEAQ 4(DX), CX\n\tCMPQ CX, BX\n\tJGE  error_max_decoded_size_exceeded\n\n\t// Decode 4 values\n\tCMPQ  R11, $0x20\n\tJL    bitReader_fillFast_1_end\n\tSUBQ  $0x20, R11\n\tSUBQ  $0x04, R9\n\tMOVL  (R8)(R9*1), CX\n\tSHLXQ R11, CX, CX\n\tORQ   CX, R10\n\nbitReader_fillFast_1_end:\n\tSHRXQ   DI, R10, CX\n\tMOVW    (SI)(CX*2), CX\n\tMOVB    CH, AL\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLXQ   CX, R10, R10\n\tSHRXQ   DI, R10, CX\n\tMOVW    (SI)(CX*2), CX\n\tMOVB    CH, AH\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLXQ   CX, R10, R10\n\tBSWAPL  AX\n\tCMPQ    R11, $0x20\n\tJL      bitReader_fillFast_2_end\n\tSUBQ    $0x20, R11\n\tSUBQ    $0x04, R9\n\tMOVL    (R8)(R9*1), CX\n\tSHLXQ   R11, CX, CX\n\tORQ     CX, R10\n\nbitReader_fillFast_2_end:\n\tSHRXQ   DI, R10, CX\n\tMOVW    (SI)(CX*2), CX\n\tMOVB    CH, AH\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLXQ   CX, R10, R10\n\tSHRXQ   DI, R10, CX\n\tMOVW    (SI)(CX*2), CX\n\tMOVB    CH, AL\n\tMOVBQZX CL, CX\n\tADDQ    CX, R11\n\tSHLXQ   CX, R10, R10\n\tBSWAPL  AX\n\n\t// Store the decoded values\n\tMOVL AX, (DX)\n\tADDQ $0x04, DX\n\nloop_condition:\n\tCMPQ R9, $0x08\n\tJGE  main_loop\n\n\t// Update ctx structure\n\tMOVQ ctx+0(FP), AX\n\tSUBQ 16(AX), DX\n\tMOVQ DX, 40(AX)\n\tMOVQ (AX), AX\n\tMOVQ R9, 24(AX)\n\tMOVQ R10, 32(AX)\n\tMOVB R11, 40(AX)\n\tRET\n\n\t// Report error\nerror_max_decoded_size_exceeded:\n\tMOVQ ctx+0(FP), AX\n\tMOVQ $-1, CX\n\tMOVQ CX, 40(AX)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/decompress_generic.go",
    "content": "//go:build !amd64 || appengine || !gc || noasm\n// +build !amd64 appengine !gc noasm\n\n// This file contains a generic implementation of Decoder.Decompress4X.\npackage huff0\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// Decompress4X will decompress a 4X encoded stream.\n// The length of the supplied input must match the end of a block exactly.\n// The *capacity* of the dst slice must match the destination size of\n// the uncompressed data exactly.\nfunc (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {\n\tif len(d.dt.single) == 0 {\n\t\treturn nil, errors.New(\"no table loaded\")\n\t}\n\tif len(src) < 6+(4*1) {\n\t\treturn nil, errors.New(\"input too small\")\n\t}\n\tif use8BitTables && d.actualTableLog <= 8 {\n\t\treturn d.decompress4X8bit(dst, src)\n\t}\n\n\tvar br [4]bitReaderShifted\n\t// Decode \"jump table\"\n\tstart := 6\n\tfor i := 0; i < 3; i++ {\n\t\tlength := int(src[i*2]) | (int(src[i*2+1]) << 8)\n\t\tif start+length >= len(src) {\n\t\t\treturn nil, errors.New(\"truncated input (or invalid offset)\")\n\t\t}\n\t\terr := br[i].init(src[start : start+length])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstart += length\n\t}\n\terr := br[3].init(src[start:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// destination, offset to match first output\n\tdstSize := cap(dst)\n\tdst = dst[:dstSize]\n\tout := dst\n\tdstEvery := (dstSize + 3) / 4\n\n\tconst tlSize = 1 << tableLogMax\n\tconst tlMask = tlSize - 1\n\tsingle := d.dt.single[:tlSize]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbuf := d.buffer()\n\tvar off uint8\n\tvar decoded int\n\n\t// Decode 2 values from each decoder/loop.\n\tconst bufoff = 256\n\tfor {\n\t\tif br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {\n\t\t\tbreak\n\t\t}\n\n\t\t{\n\t\t\tconst stream = 0\n\t\t\tconst stream2 = 1\n\t\t\tbr[stream].fillFast()\n\t\t\tbr[stream2].fillFast()\n\n\t\t\tval := br[stream].peekBitsFast(d.actualTableLog)\n\t\t\tval2 := br[stream2].peekBitsFast(d.actualTableLog)\n\t\t\tv := single[val&tlMask]\n\t\t\tv2 := single[val2&tlMask]\n\t\t\tbr[stream].advance(uint8(v.entry))\n\t\t\tbr[stream2].advance(uint8(v2.entry))\n\t\t\tbuf[stream][off] = uint8(v.entry >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2.entry >> 8)\n\n\t\t\tval = br[stream].peekBitsFast(d.actualTableLog)\n\t\t\tval2 = br[stream2].peekBitsFast(d.actualTableLog)\n\t\t\tv = single[val&tlMask]\n\t\t\tv2 = single[val2&tlMask]\n\t\t\tbr[stream].advance(uint8(v.entry))\n\t\t\tbr[stream2].advance(uint8(v2.entry))\n\t\t\tbuf[stream][off+1] = uint8(v.entry >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2.entry >> 8)\n\t\t}\n\n\t\t{\n\t\t\tconst stream = 2\n\t\t\tconst stream2 = 3\n\t\t\tbr[stream].fillFast()\n\t\t\tbr[stream2].fillFast()\n\n\t\t\tval := br[stream].peekBitsFast(d.actualTableLog)\n\t\t\tval2 := br[stream2].peekBitsFast(d.actualTableLog)\n\t\t\tv := single[val&tlMask]\n\t\t\tv2 := single[val2&tlMask]\n\t\t\tbr[stream].advance(uint8(v.entry))\n\t\t\tbr[stream2].advance(uint8(v2.entry))\n\t\t\tbuf[stream][off] = uint8(v.entry >> 8)\n\t\t\tbuf[stream2][off] = uint8(v2.entry >> 8)\n\n\t\t\tval = br[stream].peekBitsFast(d.actualTableLog)\n\t\t\tval2 = br[stream2].peekBitsFast(d.actualTableLog)\n\t\t\tv = single[val&tlMask]\n\t\t\tv2 = single[val2&tlMask]\n\t\t\tbr[stream].advance(uint8(v.entry))\n\t\t\tbr[stream2].advance(uint8(v2.entry))\n\t\t\tbuf[stream][off+1] = uint8(v.entry >> 8)\n\t\t\tbuf[stream2][off+1] = uint8(v2.entry >> 8)\n\t\t}\n\n\t\toff += 2\n\n\t\tif off == 0 {\n\t\t\tif bufoff > dstEvery {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 1\")\n\t\t\t}\n\t\t\t// There must at least be 3 buffers left.\n\t\t\tif len(out)-bufoff < dstEvery*3 {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 2\")\n\t\t\t}\n\t\t\t//copy(out, buf[0][:])\n\t\t\t//copy(out[dstEvery:], buf[1][:])\n\t\t\t//copy(out[dstEvery*2:], buf[2][:])\n\t\t\t//copy(out[dstEvery*3:], buf[3][:])\n\t\t\t*(*[bufoff]byte)(out) = buf[0]\n\t\t\t*(*[bufoff]byte)(out[dstEvery:]) = buf[1]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*2:]) = buf[2]\n\t\t\t*(*[bufoff]byte)(out[dstEvery*3:]) = buf[3]\n\t\t\tout = out[bufoff:]\n\t\t\tdecoded += bufoff * 4\n\t\t}\n\t}\n\tif off > 0 {\n\t\tioff := int(off)\n\t\tif len(out) < dstEvery*3+ioff {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 3\")\n\t\t}\n\t\tcopy(out, buf[0][:off])\n\t\tcopy(out[dstEvery:], buf[1][:off])\n\t\tcopy(out[dstEvery*2:], buf[2][:off])\n\t\tcopy(out[dstEvery*3:], buf[3][:off])\n\t\tdecoded += int(off) * 4\n\t\tout = out[off:]\n\t}\n\n\t// Decode remaining.\n\tremainBytes := dstEvery - (decoded / 4)\n\tfor i := range br {\n\t\toffset := dstEvery * i\n\t\tendsAt := offset + remainBytes\n\t\tif endsAt > len(out) {\n\t\t\tendsAt = len(out)\n\t\t}\n\t\tbr := &br[i]\n\t\tbitsLeft := br.remaining()\n\t\tfor bitsLeft > 0 {\n\t\t\tbr.fill()\n\t\t\tif offset >= endsAt {\n\t\t\t\td.bufs.Put(buf)\n\t\t\t\treturn nil, errors.New(\"corruption detected: stream overrun 4\")\n\t\t\t}\n\n\t\t\t// Read value and increment offset.\n\t\t\tval := br.peekBitsFast(d.actualTableLog)\n\t\t\tv := single[val&tlMask].entry\n\t\t\tnBits := uint8(v)\n\t\t\tbr.advance(nBits)\n\t\t\tbitsLeft -= uint(nBits)\n\t\t\tout[offset] = uint8(v >> 8)\n\t\t\toffset++\n\t\t}\n\t\tif offset != endsAt {\n\t\t\td.bufs.Put(buf)\n\t\t\treturn nil, fmt.Errorf(\"corruption detected: short output block %d, end %d != %d\", i, offset, endsAt)\n\t\t}\n\t\tdecoded += offset - dstEvery*i\n\t\terr = br.close()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\td.bufs.Put(buf)\n\tif dstSize != decoded {\n\t\treturn nil, errors.New(\"corruption detected: short output block\")\n\t}\n\treturn dst, nil\n}\n\n// Decompress1X will decompress a 1X encoded stream.\n// The cap of the output buffer will be the maximum decompressed size.\n// The length of the supplied input must match the end of a block exactly.\nfunc (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {\n\tif len(d.dt.single) == 0 {\n\t\treturn nil, errors.New(\"no table loaded\")\n\t}\n\tif use8BitTables && d.actualTableLog <= 8 {\n\t\treturn d.decompress1X8Bit(dst, src)\n\t}\n\tvar br bitReaderShifted\n\terr := br.init(src)\n\tif err != nil {\n\t\treturn dst, err\n\t}\n\tmaxDecodedSize := cap(dst)\n\tdst = dst[:0]\n\n\t// Avoid bounds check by always having full sized table.\n\tconst tlSize = 1 << tableLogMax\n\tconst tlMask = tlSize - 1\n\tdt := d.dt.single[:tlSize]\n\n\t// Use temp table to avoid bound checks/append penalty.\n\tbufs := d.buffer()\n\tbuf := &bufs[0]\n\tvar off uint8\n\n\tfor br.off >= 8 {\n\t\tbr.fillFast()\n\t\tv := dt[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+0] = uint8(v.entry >> 8)\n\n\t\tv = dt[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+1] = uint8(v.entry >> 8)\n\n\t\t// Refill\n\t\tbr.fillFast()\n\n\t\tv = dt[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+2] = uint8(v.entry >> 8)\n\n\t\tv = dt[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tbr.advance(uint8(v.entry))\n\t\tbuf[off+3] = uint8(v.entry >> 8)\n\n\t\toff += 4\n\t\tif off == 0 {\n\t\t\tif len(dst)+256 > maxDecodedSize {\n\t\t\t\tbr.close()\n\t\t\t\td.bufs.Put(bufs)\n\t\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t\t}\n\t\t\tdst = append(dst, buf[:]...)\n\t\t}\n\t}\n\n\tif len(dst)+int(off) > maxDecodedSize {\n\t\td.bufs.Put(bufs)\n\t\tbr.close()\n\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t}\n\tdst = append(dst, buf[:off]...)\n\n\t// br < 8, so uint8 is fine\n\tbitsLeft := uint8(br.off)*8 + 64 - br.bitsRead\n\tfor bitsLeft > 0 {\n\t\tbr.fill()\n\t\tif false && br.bitsRead >= 32 {\n\t\t\tif br.off >= 4 {\n\t\t\t\tv := br.in[br.off-4:]\n\t\t\t\tv = v[:4]\n\t\t\t\tlow := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24)\n\t\t\t\tbr.value = (br.value << 32) | uint64(low)\n\t\t\t\tbr.bitsRead -= 32\n\t\t\t\tbr.off -= 4\n\t\t\t} else {\n\t\t\t\tfor br.off > 0 {\n\t\t\t\t\tbr.value = (br.value << 8) | uint64(br.in[br.off-1])\n\t\t\t\t\tbr.bitsRead -= 8\n\t\t\t\t\tbr.off--\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif len(dst) >= maxDecodedSize {\n\t\t\td.bufs.Put(bufs)\n\t\t\tbr.close()\n\t\t\treturn nil, ErrMaxDecodedSizeExceeded\n\t\t}\n\t\tv := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask]\n\t\tnBits := uint8(v.entry)\n\t\tbr.advance(nBits)\n\t\tbitsLeft -= nBits\n\t\tdst = append(dst, uint8(v.entry>>8))\n\t}\n\td.bufs.Put(bufs)\n\treturn dst, br.close()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/huff0/huff0.go",
    "content": "// Package huff0 provides fast huffman encoding as used in zstd.\n//\n// See README.md at https://github.com/klauspost/compress/tree/master/huff0 for details.\npackage huff0\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"math/bits\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/fse\"\n)\n\nconst (\n\tmaxSymbolValue = 255\n\n\t// zstandard limits tablelog to 11, see:\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#huffman-tree-description\n\ttableLogMax     = 11\n\ttableLogDefault = 11\n\tminTablelog     = 5\n\thuffNodesLen    = 512\n\n\t// BlockSizeMax is maximum input size for a single block uncompressed.\n\tBlockSizeMax = 1<<18 - 1\n)\n\nvar (\n\t// ErrIncompressible is returned when input is judged to be too hard to compress.\n\tErrIncompressible = errors.New(\"input is not compressible\")\n\n\t// ErrUseRLE is returned from the compressor when the input is a single byte value repeated.\n\tErrUseRLE = errors.New(\"input is single value repeated\")\n\n\t// ErrTooBig is return if input is too large for a single block.\n\tErrTooBig = errors.New(\"input too big\")\n\n\t// ErrMaxDecodedSizeExceeded is return if input is too large for a single block.\n\tErrMaxDecodedSizeExceeded = errors.New(\"maximum output size exceeded\")\n)\n\ntype ReusePolicy uint8\n\nconst (\n\t// ReusePolicyAllow will allow reuse if it produces smaller output.\n\tReusePolicyAllow ReusePolicy = iota\n\n\t// ReusePolicyPrefer will re-use aggressively if possible.\n\t// This will not check if a new table will produce smaller output,\n\t// except if the current table is impossible to use or\n\t// compressed output is bigger than input.\n\tReusePolicyPrefer\n\n\t// ReusePolicyNone will disable re-use of tables.\n\t// This is slightly faster than ReusePolicyAllow but may produce larger output.\n\tReusePolicyNone\n\n\t// ReusePolicyMust must allow reuse and produce smaller output.\n\tReusePolicyMust\n)\n\ntype Scratch struct {\n\tcount [maxSymbolValue + 1]uint32\n\n\t// Per block parameters.\n\t// These can be used to override compression parameters of the block.\n\t// Do not touch, unless you know what you are doing.\n\n\t// Out is output buffer.\n\t// If the scratch is re-used before the caller is done processing the output,\n\t// set this field to nil.\n\t// Otherwise the output buffer will be re-used for next Compression/Decompression step\n\t// and allocation will be avoided.\n\tOut []byte\n\n\t// OutTable will contain the table data only, if a new table has been generated.\n\t// Slice of the returned data.\n\tOutTable []byte\n\n\t// OutData will contain the compressed data.\n\t// Slice of the returned data.\n\tOutData []byte\n\n\t// MaxDecodedSize will set the maximum allowed output size.\n\t// This value will automatically be set to BlockSizeMax if not set.\n\t// Decoders will return ErrMaxDecodedSizeExceeded is this limit is exceeded.\n\tMaxDecodedSize int\n\n\tsrcLen int\n\n\t// MaxSymbolValue will override the maximum symbol value of the next block.\n\tMaxSymbolValue uint8\n\n\t// TableLog will attempt to override the tablelog for the next block.\n\t// Must be <= 11 and >= 5.\n\tTableLog uint8\n\n\t// Reuse will specify the reuse policy\n\tReuse ReusePolicy\n\n\t// WantLogLess allows to specify a log 2 reduction that should at least be achieved,\n\t// otherwise the block will be returned as incompressible.\n\t// The reduction should then at least be (input size >> WantLogLess)\n\t// If WantLogLess == 0 any improvement will do.\n\tWantLogLess uint8\n\n\tsymbolLen      uint16 // Length of active part of the symbol table.\n\tmaxCount       int    // count of the most probable symbol\n\tclearCount     bool   // clear count\n\tactualTableLog uint8  // Selected tablelog.\n\tprevTableLog   uint8  // Tablelog for previous table\n\tprevTable      cTable // Table used for previous compression.\n\tcTable         cTable // compression table\n\tdt             dTable // decompression table\n\tnodes          []nodeElt\n\ttmpOut         [4][]byte\n\tfse            *fse.Scratch\n\tdecPool        sync.Pool // *[4][256]byte buffers.\n\thuffWeight     [maxSymbolValue + 1]byte\n}\n\n// TransferCTable will transfer the previously used compression table.\nfunc (s *Scratch) TransferCTable(src *Scratch) {\n\tif cap(s.prevTable) < len(src.prevTable) {\n\t\ts.prevTable = make(cTable, 0, maxSymbolValue+1)\n\t}\n\ts.prevTable = s.prevTable[:len(src.prevTable)]\n\tcopy(s.prevTable, src.prevTable)\n\ts.prevTableLog = src.prevTableLog\n}\n\nfunc (s *Scratch) prepare(in []byte) (*Scratch, error) {\n\tif len(in) > BlockSizeMax {\n\t\treturn nil, ErrTooBig\n\t}\n\tif s == nil {\n\t\ts = &Scratch{}\n\t}\n\tif s.MaxSymbolValue == 0 {\n\t\ts.MaxSymbolValue = maxSymbolValue\n\t}\n\tif s.TableLog == 0 {\n\t\ts.TableLog = tableLogDefault\n\t}\n\tif s.TableLog > tableLogMax || s.TableLog < minTablelog {\n\t\treturn nil, fmt.Errorf(\" invalid tableLog %d (%d -> %d)\", s.TableLog, minTablelog, tableLogMax)\n\t}\n\tif s.MaxDecodedSize <= 0 || s.MaxDecodedSize > BlockSizeMax {\n\t\ts.MaxDecodedSize = BlockSizeMax\n\t}\n\tif s.clearCount && s.maxCount == 0 {\n\t\tfor i := range s.count {\n\t\t\ts.count[i] = 0\n\t\t}\n\t\ts.clearCount = false\n\t}\n\tif cap(s.Out) == 0 {\n\t\ts.Out = make([]byte, 0, len(in))\n\t}\n\ts.Out = s.Out[:0]\n\n\ts.OutTable = nil\n\ts.OutData = nil\n\tif cap(s.nodes) < huffNodesLen+1 {\n\t\ts.nodes = make([]nodeElt, 0, huffNodesLen+1)\n\t}\n\ts.nodes = s.nodes[:0]\n\tif s.fse == nil {\n\t\ts.fse = &fse.Scratch{}\n\t}\n\ts.srcLen = len(in)\n\n\treturn s, nil\n}\n\ntype cTable []cTableEntry\n\nfunc (c cTable) write(s *Scratch) error {\n\tvar (\n\t\t// precomputed conversion table\n\t\tbitsToWeight [tableLogMax + 1]byte\n\t\thuffLog      = s.actualTableLog\n\t\t// last weight is not saved.\n\t\tmaxSymbolValue = uint8(s.symbolLen - 1)\n\t\thuffWeight     = s.huffWeight[:256]\n\t)\n\tconst (\n\t\tmaxFSETableLog = 6\n\t)\n\t// convert to weight\n\tbitsToWeight[0] = 0\n\tfor n := uint8(1); n < huffLog+1; n++ {\n\t\tbitsToWeight[n] = huffLog + 1 - n\n\t}\n\n\t// Acquire histogram for FSE.\n\thist := s.fse.Histogram()\n\thist = hist[:256]\n\tfor i := range hist[:16] {\n\t\thist[i] = 0\n\t}\n\tfor n := range maxSymbolValue {\n\t\tv := bitsToWeight[c[n].nBits] & 15\n\t\thuffWeight[n] = v\n\t\thist[v]++\n\t}\n\n\t// FSE compress if feasible.\n\tif maxSymbolValue >= 2 {\n\t\thuffMaxCnt := uint32(0)\n\t\thuffMax := uint8(0)\n\t\tfor i, v := range hist[:16] {\n\t\t\tif v == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\thuffMax = byte(i)\n\t\t\tif v > huffMaxCnt {\n\t\t\t\thuffMaxCnt = v\n\t\t\t}\n\t\t}\n\t\ts.fse.HistogramFinished(huffMax, int(huffMaxCnt))\n\t\ts.fse.TableLog = maxFSETableLog\n\t\tb, err := fse.Compress(huffWeight[:maxSymbolValue], s.fse)\n\t\tif err == nil && len(b) < int(s.symbolLen>>1) {\n\t\t\ts.Out = append(s.Out, uint8(len(b)))\n\t\t\ts.Out = append(s.Out, b...)\n\t\t\treturn nil\n\t\t}\n\t\t// Unable to compress (RLE/uncompressible)\n\t}\n\t// write raw values as 4-bits (max : 15)\n\tif maxSymbolValue > (256 - 128) {\n\t\t// should not happen : likely means source cannot be compressed\n\t\treturn ErrIncompressible\n\t}\n\top := s.Out\n\t// special case, pack weights 4 bits/weight.\n\top = append(op, 128|(maxSymbolValue-1))\n\t// be sure it doesn't cause msan issue in final combination\n\thuffWeight[maxSymbolValue] = 0\n\tfor n := uint16(0); n < uint16(maxSymbolValue); n += 2 {\n\t\top = append(op, (huffWeight[n]<<4)|huffWeight[n+1])\n\t}\n\ts.Out = op\n\treturn nil\n}\n\nfunc (c cTable) estTableSize(s *Scratch) (sz int, err error) {\n\tvar (\n\t\t// precomputed conversion table\n\t\tbitsToWeight [tableLogMax + 1]byte\n\t\thuffLog      = s.actualTableLog\n\t\t// last weight is not saved.\n\t\tmaxSymbolValue = uint8(s.symbolLen - 1)\n\t\thuffWeight     = s.huffWeight[:256]\n\t)\n\tconst (\n\t\tmaxFSETableLog = 6\n\t)\n\t// convert to weight\n\tbitsToWeight[0] = 0\n\tfor n := uint8(1); n < huffLog+1; n++ {\n\t\tbitsToWeight[n] = huffLog + 1 - n\n\t}\n\n\t// Acquire histogram for FSE.\n\thist := s.fse.Histogram()\n\thist = hist[:256]\n\tfor i := range hist[:16] {\n\t\thist[i] = 0\n\t}\n\tfor n := range maxSymbolValue {\n\t\tv := bitsToWeight[c[n].nBits] & 15\n\t\thuffWeight[n] = v\n\t\thist[v]++\n\t}\n\n\t// FSE compress if feasible.\n\tif maxSymbolValue >= 2 {\n\t\thuffMaxCnt := uint32(0)\n\t\thuffMax := uint8(0)\n\t\tfor i, v := range hist[:16] {\n\t\t\tif v == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\thuffMax = byte(i)\n\t\t\tif v > huffMaxCnt {\n\t\t\t\thuffMaxCnt = v\n\t\t\t}\n\t\t}\n\t\ts.fse.HistogramFinished(huffMax, int(huffMaxCnt))\n\t\ts.fse.TableLog = maxFSETableLog\n\t\tb, err := fse.Compress(huffWeight[:maxSymbolValue], s.fse)\n\t\tif err == nil && len(b) < int(s.symbolLen>>1) {\n\t\t\tsz += 1 + len(b)\n\t\t\treturn sz, nil\n\t\t}\n\t\t// Unable to compress (RLE/uncompressible)\n\t}\n\t// write raw values as 4-bits (max : 15)\n\tif maxSymbolValue > (256 - 128) {\n\t\t// should not happen : likely means source cannot be compressed\n\t\treturn 0, ErrIncompressible\n\t}\n\t// special case, pack weights 4 bits/weight.\n\tsz += 1 + int(maxSymbolValue/2)\n\treturn sz, nil\n}\n\n// estimateSize returns the estimated size in bytes of the input represented in the\n// histogram supplied.\nfunc (c cTable) estimateSize(hist []uint32) int {\n\tnbBits := uint32(7)\n\tfor i, v := range c[:len(hist)] {\n\t\tnbBits += uint32(v.nBits) * hist[i]\n\t}\n\treturn int(nbBits >> 3)\n}\n\n// minSize returns the minimum possible size considering the shannon limit.\nfunc (s *Scratch) minSize(total int) int {\n\tnbBits := float64(7)\n\tfTotal := float64(total)\n\tfor _, v := range s.count[:s.symbolLen] {\n\t\tn := float64(v)\n\t\tif n > 0 {\n\t\t\tnbBits += math.Log2(fTotal/n) * n\n\t\t}\n\t}\n\treturn int(nbBits) >> 3\n}\n\nfunc highBit32(val uint32) (n uint32) {\n\treturn uint32(bits.Len32(val) - 1)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go",
    "content": "// Package cpuinfo gives runtime info about the current CPU.\n//\n// This is a very limited module meant for use internally\n// in this project. For more versatile solution check\n// https://github.com/klauspost/cpuid.\npackage cpuinfo\n\n// HasBMI1 checks whether an x86 CPU supports the BMI1 extension.\nfunc HasBMI1() bool {\n\treturn hasBMI1\n}\n\n// HasBMI2 checks whether an x86 CPU supports the BMI2 extension.\nfunc HasBMI2() bool {\n\treturn hasBMI2\n}\n\n// DisableBMI2 will disable BMI2, for testing purposes.\n// Call returned function to restore previous state.\nfunc DisableBMI2() func() {\n\told := hasBMI2\n\thasBMI2 = false\n\treturn func() {\n\t\thasBMI2 = old\n\t}\n}\n\n// HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions.\nfunc HasBMI() bool {\n\treturn HasBMI1() && HasBMI2()\n}\n\nvar hasBMI1 bool\nvar hasBMI2 bool\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go",
    "content": "//go:build amd64 && !appengine && !noasm && gc\n// +build amd64,!appengine,!noasm,gc\n\npackage cpuinfo\n\n// go:noescape\nfunc x86extensions() (bmi1, bmi2 bool)\n\nfunc init() {\n\thasBMI1, hasBMI2 = x86extensions()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s",
    "content": "// +build !appengine\n// +build gc\n// +build !noasm\n\n#include \"textflag.h\"\n#include \"funcdata.h\"\n#include \"go_asm.h\"\n\nTEXT ·x86extensions(SB), NOSPLIT, $0\n\t// 1. determine max EAX value\n\tXORQ AX, AX\n\tCPUID\n\n\tCMPQ AX, $7\n\tJB   unsupported\n\n\t// 2. EAX = 7, ECX = 0 --- see Table 3-8 \"Information Returned by CPUID Instruction\"\n\tMOVQ $7, AX\n\tMOVQ $0, CX\n\tCPUID\n\n\tBTQ   $3, BX // bit 3 = BMI1\n\tSETCS AL\n\n\tBTQ   $8, BX // bit 8 = BMI2\n\tSETCS AH\n\n\tMOVB AL, bmi1+0(FP)\n\tMOVB AH, bmi2+1(FP)\n\tRET\n\nunsupported:\n\tXORQ AX, AX\n\tMOVB AL, bmi1+0(FP)\n\tMOVB AL, bmi2+1(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/le/le.go",
    "content": "package le\n\ntype Indexer interface {\n\tint | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go",
    "content": "//go:build !(amd64 || arm64 || ppc64le || riscv64) || nounsafe || purego || appengine\n\npackage le\n\nimport (\n\t\"encoding/binary\"\n)\n\n// Load8 will load from b at index i.\nfunc Load8[I Indexer](b []byte, i I) byte {\n\treturn b[i]\n}\n\n// Load16 will load from b at index i.\nfunc Load16[I Indexer](b []byte, i I) uint16 {\n\treturn binary.LittleEndian.Uint16(b[i:])\n}\n\n// Load32 will load from b at index i.\nfunc Load32[I Indexer](b []byte, i I) uint32 {\n\treturn binary.LittleEndian.Uint32(b[i:])\n}\n\n// Load64 will load from b at index i.\nfunc Load64[I Indexer](b []byte, i I) uint64 {\n\treturn binary.LittleEndian.Uint64(b[i:])\n}\n\n// Store16 will store v at b.\nfunc Store16(b []byte, v uint16) {\n\tbinary.LittleEndian.PutUint16(b, v)\n}\n\n// Store32 will store v at b.\nfunc Store32(b []byte, v uint32) {\n\tbinary.LittleEndian.PutUint32(b, v)\n}\n\n// Store64 will store v at b.\nfunc Store64[I Indexer](b []byte, i I, v uint64) {\n\tbinary.LittleEndian.PutUint64(b[i:], v)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.go",
    "content": "// We enable 64 bit LE platforms:\n\n//go:build (amd64 || arm64 || ppc64le || riscv64) && !nounsafe && !purego && !appengine\n\npackage le\n\nimport (\n\t\"unsafe\"\n)\n\n// Load8 will load from b at index i.\nfunc Load8[I Indexer](b []byte, i I) byte {\n\t//return binary.LittleEndian.Uint16(b[i:])\n\t//return *(*uint16)(unsafe.Pointer(&b[i]))\n\treturn *(*byte)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i))\n}\n\n// Load16 will load from b at index i.\nfunc Load16[I Indexer](b []byte, i I) uint16 {\n\t//return binary.LittleEndian.Uint16(b[i:])\n\t//return *(*uint16)(unsafe.Pointer(&b[i]))\n\treturn *(*uint16)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i))\n}\n\n// Load32 will load from b at index i.\nfunc Load32[I Indexer](b []byte, i I) uint32 {\n\t//return binary.LittleEndian.Uint32(b[i:])\n\t//return *(*uint32)(unsafe.Pointer(&b[i]))\n\treturn *(*uint32)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i))\n}\n\n// Load64 will load from b at index i.\nfunc Load64[I Indexer](b []byte, i I) uint64 {\n\t//return binary.LittleEndian.Uint64(b[i:])\n\t//return *(*uint64)(unsafe.Pointer(&b[i]))\n\treturn *(*uint64)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i))\n}\n\n// Store16 will store v at b.\nfunc Store16(b []byte, v uint16) {\n\t*(*uint16)(unsafe.Pointer(unsafe.SliceData(b))) = v\n}\n\n// Store32 will store v at b.\nfunc Store32(b []byte, v uint32) {\n\t*(*uint32)(unsafe.Pointer(unsafe.SliceData(b))) = v\n}\n\n// Store64 will store v at b[i:].\nfunc Store64[I Indexer](b []byte, i I, v uint64) {\n\t*(*uint64)(unsafe.Add(unsafe.Pointer(unsafe.SliceData(b)), i)) = v\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/LICENSE",
    "content": "Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/decode.go",
    "content": "// Copyright 2011 The Snappy-Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage snapref\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"io\"\n)\n\nvar (\n\t// ErrCorrupt reports that the input is invalid.\n\tErrCorrupt = errors.New(\"snappy: corrupt input\")\n\t// ErrTooLarge reports that the uncompressed length is too large.\n\tErrTooLarge = errors.New(\"snappy: decoded block is too large\")\n\t// ErrUnsupported reports that the input isn't supported.\n\tErrUnsupported = errors.New(\"snappy: unsupported input\")\n\n\terrUnsupportedLiteralLength = errors.New(\"snappy: unsupported literal length\")\n)\n\n// DecodedLen returns the length of the decoded block.\nfunc DecodedLen(src []byte) (int, error) {\n\tv, _, err := decodedLen(src)\n\treturn v, err\n}\n\n// decodedLen returns the length of the decoded block and the number of bytes\n// that the length header occupied.\nfunc decodedLen(src []byte) (blockLen, headerLen int, err error) {\n\tv, n := binary.Uvarint(src)\n\tif n <= 0 || v > 0xffffffff {\n\t\treturn 0, 0, ErrCorrupt\n\t}\n\n\tconst wordSize = 32 << (^uint(0) >> 32 & 1)\n\tif wordSize == 32 && v > 0x7fffffff {\n\t\treturn 0, 0, ErrTooLarge\n\t}\n\treturn int(v), n, nil\n}\n\nconst (\n\tdecodeErrCodeCorrupt                  = 1\n\tdecodeErrCodeUnsupportedLiteralLength = 2\n)\n\n// Decode returns the decoded form of src. The returned slice may be a sub-\n// slice of dst if dst was large enough to hold the entire decoded block.\n// Otherwise, a newly allocated slice will be returned.\n//\n// The dst and src must not overlap. It is valid to pass a nil dst.\n//\n// Decode handles the Snappy block format, not the Snappy stream format.\nfunc Decode(dst, src []byte) ([]byte, error) {\n\tdLen, s, err := decodedLen(src)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif dLen <= len(dst) {\n\t\tdst = dst[:dLen]\n\t} else {\n\t\tdst = make([]byte, dLen)\n\t}\n\tswitch decode(dst, src[s:]) {\n\tcase 0:\n\t\treturn dst, nil\n\tcase decodeErrCodeUnsupportedLiteralLength:\n\t\treturn nil, errUnsupportedLiteralLength\n\t}\n\treturn nil, ErrCorrupt\n}\n\n// NewReader returns a new Reader that decompresses from r, using the framing\n// format described at\n// https://github.com/google/snappy/blob/master/framing_format.txt\nfunc NewReader(r io.Reader) *Reader {\n\treturn &Reader{\n\t\tr:       r,\n\t\tdecoded: make([]byte, maxBlockSize),\n\t\tbuf:     make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize),\n\t}\n}\n\n// Reader is an io.Reader that can read Snappy-compressed bytes.\n//\n// Reader handles the Snappy stream format, not the Snappy block format.\ntype Reader struct {\n\tr       io.Reader\n\terr     error\n\tdecoded []byte\n\tbuf     []byte\n\t// decoded[i:j] contains decoded bytes that have not yet been passed on.\n\ti, j       int\n\treadHeader bool\n}\n\n// Reset discards any buffered data, resets all state, and switches the Snappy\n// reader to read from r. This permits reusing a Reader rather than allocating\n// a new one.\nfunc (r *Reader) Reset(reader io.Reader) {\n\tr.r = reader\n\tr.err = nil\n\tr.i = 0\n\tr.j = 0\n\tr.readHeader = false\n}\n\nfunc (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) {\n\tif _, r.err = io.ReadFull(r.r, p); r.err != nil {\n\t\tif r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) {\n\t\t\tr.err = ErrCorrupt\n\t\t}\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc (r *Reader) fill() error {\n\tfor r.i >= r.j {\n\t\tif !r.readFull(r.buf[:4], true) {\n\t\t\treturn r.err\n\t\t}\n\t\tchunkType := r.buf[0]\n\t\tif !r.readHeader {\n\t\t\tif chunkType != chunkTypeStreamIdentifier {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tr.readHeader = true\n\t\t}\n\t\tchunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16\n\t\tif chunkLen > len(r.buf) {\n\t\t\tr.err = ErrUnsupported\n\t\t\treturn r.err\n\t\t}\n\n\t\t// The chunk types are specified at\n\t\t// https://github.com/google/snappy/blob/master/framing_format.txt\n\t\tswitch chunkType {\n\t\tcase chunkTypeCompressedData:\n\t\t\t// Section 4.2. Compressed data (chunk type 0x00).\n\t\t\tif chunkLen < checksumSize {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tbuf := r.buf[:chunkLen]\n\t\t\tif !r.readFull(buf, false) {\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tchecksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24\n\t\t\tbuf = buf[checksumSize:]\n\n\t\t\tn, err := DecodedLen(buf)\n\t\t\tif err != nil {\n\t\t\t\tr.err = err\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif n > len(r.decoded) {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif _, err := Decode(r.decoded, buf); err != nil {\n\t\t\t\tr.err = err\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif crc(r.decoded[:n]) != checksum {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tr.i, r.j = 0, n\n\t\t\tcontinue\n\n\t\tcase chunkTypeUncompressedData:\n\t\t\t// Section 4.3. Uncompressed data (chunk type 0x01).\n\t\t\tif chunkLen < checksumSize {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tbuf := r.buf[:checksumSize]\n\t\t\tif !r.readFull(buf, false) {\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tchecksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24\n\t\t\t// Read directly into r.decoded instead of via r.buf.\n\t\t\tn := chunkLen - checksumSize\n\t\t\tif n > len(r.decoded) {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif !r.readFull(r.decoded[:n], false) {\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif crc(r.decoded[:n]) != checksum {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tr.i, r.j = 0, n\n\t\t\tcontinue\n\n\t\tcase chunkTypeStreamIdentifier:\n\t\t\t// Section 4.1. Stream identifier (chunk type 0xff).\n\t\t\tif chunkLen != len(magicBody) {\n\t\t\t\tr.err = ErrCorrupt\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tif !r.readFull(r.buf[:len(magicBody)], false) {\n\t\t\t\treturn r.err\n\t\t\t}\n\t\t\tfor i := range len(magicBody) {\n\t\t\t\tif r.buf[i] != magicBody[i] {\n\t\t\t\t\tr.err = ErrCorrupt\n\t\t\t\t\treturn r.err\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif chunkType <= 0x7f {\n\t\t\t// Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f).\n\t\t\tr.err = ErrUnsupported\n\t\t\treturn r.err\n\t\t}\n\t\t// Section 4.4 Padding (chunk type 0xfe).\n\t\t// Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).\n\t\tif !r.readFull(r.buf[:chunkLen], false) {\n\t\t\treturn r.err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Read satisfies the io.Reader interface.\nfunc (r *Reader) Read(p []byte) (int, error) {\n\tif r.err != nil {\n\t\treturn 0, r.err\n\t}\n\n\tif err := r.fill(); err != nil {\n\t\treturn 0, err\n\t}\n\n\tn := copy(p, r.decoded[r.i:r.j])\n\tr.i += n\n\treturn n, nil\n}\n\n// ReadByte satisfies the io.ByteReader interface.\nfunc (r *Reader) ReadByte() (byte, error) {\n\tif r.err != nil {\n\t\treturn 0, r.err\n\t}\n\n\tif err := r.fill(); err != nil {\n\t\treturn 0, err\n\t}\n\n\tc := r.decoded[r.i]\n\tr.i++\n\treturn c, nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/decode_other.go",
    "content": "// Copyright 2016 The Snappy-Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage snapref\n\n// decode writes the decoding of src to dst. It assumes that the varint-encoded\n// length of the decompressed bytes has already been read, and that len(dst)\n// equals that length.\n//\n// It returns 0 on success or a decodeErrCodeXxx error code on failure.\nfunc decode(dst, src []byte) int {\n\tvar d, s, offset, length int\n\tfor s < len(src) {\n\t\tswitch src[s] & 0x03 {\n\t\tcase tagLiteral:\n\t\t\tx := uint32(src[s] >> 2)\n\t\t\tswitch {\n\t\t\tcase x < 60:\n\t\t\t\ts++\n\t\t\tcase x == 60:\n\t\t\t\ts += 2\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-1])\n\t\t\tcase x == 61:\n\t\t\t\ts += 3\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-2]) | uint32(src[s-1])<<8\n\t\t\tcase x == 62:\n\t\t\t\ts += 4\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16\n\t\t\tcase x == 63:\n\t\t\t\ts += 5\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24\n\t\t\t}\n\t\t\tlength = int(x) + 1\n\t\t\tif length <= 0 {\n\t\t\t\treturn decodeErrCodeUnsupportedLiteralLength\n\t\t\t}\n\t\t\tif length > len(dst)-d || length > len(src)-s {\n\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t}\n\t\t\tcopy(dst[d:], src[s:s+length])\n\t\t\td += length\n\t\t\ts += length\n\t\t\tcontinue\n\n\t\tcase tagCopy1:\n\t\t\ts += 2\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t}\n\t\t\tlength = 4 + int(src[s-2])>>2&0x7\n\t\t\toffset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))\n\n\t\tcase tagCopy2:\n\t\t\ts += 3\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t}\n\t\t\tlength = 1 + int(src[s-3])>>2\n\t\t\toffset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)\n\n\t\tcase tagCopy4:\n\t\t\ts += 5\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\treturn decodeErrCodeCorrupt\n\t\t\t}\n\t\t\tlength = 1 + int(src[s-5])>>2\n\t\t\toffset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)\n\t\t}\n\n\t\tif offset <= 0 || d < offset || length > len(dst)-d {\n\t\t\treturn decodeErrCodeCorrupt\n\t\t}\n\t\t// Copy from an earlier sub-slice of dst to a later sub-slice.\n\t\t// If no overlap, use the built-in copy:\n\t\tif offset >= length {\n\t\t\tcopy(dst[d:d+length], dst[d-offset:])\n\t\t\td += length\n\t\t\tcontinue\n\t\t}\n\n\t\t// Unlike the built-in copy function, this byte-by-byte copy always runs\n\t\t// forwards, even if the slices overlap. Conceptually, this is:\n\t\t//\n\t\t// d += forwardCopy(dst[d:d+length], dst[d-offset:])\n\t\t//\n\t\t// We align the slices into a and b and show the compiler they are the same size.\n\t\t// This allows the loop to run without bounds checks.\n\t\ta := dst[d : d+length]\n\t\tb := dst[d-offset:]\n\t\tb = b[:len(a)]\n\t\tfor i := range a {\n\t\t\ta[i] = b[i]\n\t\t}\n\t\td += length\n\t}\n\tif d != len(dst) {\n\t\treturn decodeErrCodeCorrupt\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/encode.go",
    "content": "// Copyright 2011 The Snappy-Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage snapref\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"io\"\n)\n\n// Encode returns the encoded form of src. The returned slice may be a sub-\n// slice of dst if dst was large enough to hold the entire encoded block.\n// Otherwise, a newly allocated slice will be returned.\n//\n// The dst and src must not overlap. It is valid to pass a nil dst.\n//\n// Encode handles the Snappy block format, not the Snappy stream format.\nfunc Encode(dst, src []byte) []byte {\n\tif n := MaxEncodedLen(len(src)); n < 0 {\n\t\tpanic(ErrTooLarge)\n\t} else if cap(dst) < n {\n\t\tdst = make([]byte, n)\n\t} else {\n\t\tdst = dst[:n]\n\t}\n\n\t// The block starts with the varint-encoded length of the decompressed bytes.\n\td := binary.PutUvarint(dst, uint64(len(src)))\n\n\tfor len(src) > 0 {\n\t\tp := src\n\t\tsrc = nil\n\t\tif len(p) > maxBlockSize {\n\t\t\tp, src = p[:maxBlockSize], p[maxBlockSize:]\n\t\t}\n\t\tif len(p) < minNonLiteralBlockSize {\n\t\t\td += emitLiteral(dst[d:], p)\n\t\t} else {\n\t\t\td += encodeBlock(dst[d:], p)\n\t\t}\n\t}\n\treturn dst[:d]\n}\n\n// inputMargin is the minimum number of extra input bytes to keep, inside\n// encodeBlock's inner loop. On some architectures, this margin lets us\n// implement a fast path for emitLiteral, where the copy of short (<= 16 byte)\n// literals can be implemented as a single load to and store from a 16-byte\n// register. That literal's actual length can be as short as 1 byte, so this\n// can copy up to 15 bytes too much, but that's OK as subsequent iterations of\n// the encoding loop will fix up the copy overrun, and this inputMargin ensures\n// that we don't overrun the dst and src buffers.\nconst inputMargin = 16 - 1\n\n// minNonLiteralBlockSize is the minimum size of the input to encodeBlock that\n// could be encoded with a copy tag. This is the minimum with respect to the\n// algorithm used by encodeBlock, not a minimum enforced by the file format.\n//\n// The encoded output must start with at least a 1 byte literal, as there are\n// no previous bytes to copy. A minimal (1 byte) copy after that, generated\n// from an emitCopy call in encodeBlock's main loop, would require at least\n// another inputMargin bytes, for the reason above: we want any emitLiteral\n// calls inside encodeBlock's main loop to use the fast path if possible, which\n// requires being able to overrun by inputMargin bytes. Thus,\n// minNonLiteralBlockSize equals 1 + 1 + inputMargin.\n//\n// The C++ code doesn't use this exact threshold, but it could, as discussed at\n// https://groups.google.com/d/topic/snappy-compression/oGbhsdIJSJ8/discussion\n// The difference between Go (2+inputMargin) and C++ (inputMargin) is purely an\n// optimization. It should not affect the encoded form. This is tested by\n// TestSameEncodingAsCppShortCopies.\nconst minNonLiteralBlockSize = 1 + 1 + inputMargin\n\n// MaxEncodedLen returns the maximum length of a snappy block, given its\n// uncompressed length.\n//\n// It will return a negative value if srcLen is too large to encode.\nfunc MaxEncodedLen(srcLen int) int {\n\tn := uint64(srcLen)\n\tif n > 0xffffffff {\n\t\treturn -1\n\t}\n\t// Compressed data can be defined as:\n\t//    compressed := item* literal*\n\t//    item       := literal* copy\n\t//\n\t// The trailing literal sequence has a space blowup of at most 62/60\n\t// since a literal of length 60 needs one tag byte + one extra byte\n\t// for length information.\n\t//\n\t// Item blowup is trickier to measure. Suppose the \"copy\" op copies\n\t// 4 bytes of data. Because of a special check in the encoding code,\n\t// we produce a 4-byte copy only if the offset is < 65536. Therefore\n\t// the copy op takes 3 bytes to encode, and this type of item leads\n\t// to at most the 62/60 blowup for representing literals.\n\t//\n\t// Suppose the \"copy\" op copies 5 bytes of data. If the offset is big\n\t// enough, it will take 5 bytes to encode the copy op. Therefore the\n\t// worst case here is a one-byte literal followed by a five-byte copy.\n\t// That is, 6 bytes of input turn into 7 bytes of \"compressed\" data.\n\t//\n\t// This last factor dominates the blowup, so the final estimate is:\n\tn = 32 + n + n/6\n\tif n > 0xffffffff {\n\t\treturn -1\n\t}\n\treturn int(n)\n}\n\nvar errClosed = errors.New(\"snappy: Writer is closed\")\n\n// NewWriter returns a new Writer that compresses to w.\n//\n// The Writer returned does not buffer writes. There is no need to Flush or\n// Close such a Writer.\n//\n// Deprecated: the Writer returned is not suitable for many small writes, only\n// for few large writes. Use NewBufferedWriter instead, which is efficient\n// regardless of the frequency and shape of the writes, and remember to Close\n// that Writer when done.\nfunc NewWriter(w io.Writer) *Writer {\n\treturn &Writer{\n\t\tw:    w,\n\t\tobuf: make([]byte, obufLen),\n\t}\n}\n\n// NewBufferedWriter returns a new Writer that compresses to w, using the\n// framing format described at\n// https://github.com/google/snappy/blob/master/framing_format.txt\n//\n// The Writer returned buffers writes. Users must call Close to guarantee all\n// data has been forwarded to the underlying io.Writer. They may also call\n// Flush zero or more times before calling Close.\nfunc NewBufferedWriter(w io.Writer) *Writer {\n\treturn &Writer{\n\t\tw:    w,\n\t\tibuf: make([]byte, 0, maxBlockSize),\n\t\tobuf: make([]byte, obufLen),\n\t}\n}\n\n// Writer is an io.Writer that can write Snappy-compressed bytes.\n//\n// Writer handles the Snappy stream format, not the Snappy block format.\ntype Writer struct {\n\tw   io.Writer\n\terr error\n\n\t// ibuf is a buffer for the incoming (uncompressed) bytes.\n\t//\n\t// Its use is optional. For backwards compatibility, Writers created by the\n\t// NewWriter function have ibuf == nil, do not buffer incoming bytes, and\n\t// therefore do not need to be Flush'ed or Close'd.\n\tibuf []byte\n\n\t// obuf is a buffer for the outgoing (compressed) bytes.\n\tobuf []byte\n\n\t// wroteStreamHeader is whether we have written the stream header.\n\twroteStreamHeader bool\n}\n\n// Reset discards the writer's state and switches the Snappy writer to write to\n// w. This permits reusing a Writer rather than allocating a new one.\nfunc (w *Writer) Reset(writer io.Writer) {\n\tw.w = writer\n\tw.err = nil\n\tif w.ibuf != nil {\n\t\tw.ibuf = w.ibuf[:0]\n\t}\n\tw.wroteStreamHeader = false\n}\n\n// Write satisfies the io.Writer interface.\nfunc (w *Writer) Write(p []byte) (nRet int, errRet error) {\n\tif w.ibuf == nil {\n\t\t// Do not buffer incoming bytes. This does not perform or compress well\n\t\t// if the caller of Writer.Write writes many small slices. This\n\t\t// behavior is therefore deprecated, but still supported for backwards\n\t\t// compatibility with code that doesn't explicitly Flush or Close.\n\t\treturn w.write(p)\n\t}\n\n\t// The remainder of this method is based on bufio.Writer.Write from the\n\t// standard library.\n\n\tfor len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil {\n\t\tvar n int\n\t\tif len(w.ibuf) == 0 {\n\t\t\t// Large write, empty buffer.\n\t\t\t// Write directly from p to avoid copy.\n\t\t\tn, _ = w.write(p)\n\t\t} else {\n\t\t\tn = copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p)\n\t\t\tw.ibuf = w.ibuf[:len(w.ibuf)+n]\n\t\t\tw.Flush()\n\t\t}\n\t\tnRet += n\n\t\tp = p[n:]\n\t}\n\tif w.err != nil {\n\t\treturn nRet, w.err\n\t}\n\tn := copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p)\n\tw.ibuf = w.ibuf[:len(w.ibuf)+n]\n\tnRet += n\n\treturn nRet, nil\n}\n\nfunc (w *Writer) write(p []byte) (nRet int, errRet error) {\n\tif w.err != nil {\n\t\treturn 0, w.err\n\t}\n\tfor len(p) > 0 {\n\t\tobufStart := len(magicChunk)\n\t\tif !w.wroteStreamHeader {\n\t\t\tw.wroteStreamHeader = true\n\t\t\tcopy(w.obuf, magicChunk)\n\t\t\tobufStart = 0\n\t\t}\n\n\t\tvar uncompressed []byte\n\t\tif len(p) > maxBlockSize {\n\t\t\tuncompressed, p = p[:maxBlockSize], p[maxBlockSize:]\n\t\t} else {\n\t\t\tuncompressed, p = p, nil\n\t\t}\n\t\tchecksum := crc(uncompressed)\n\n\t\t// Compress the buffer, discarding the result if the improvement\n\t\t// isn't at least 12.5%.\n\t\tcompressed := Encode(w.obuf[obufHeaderLen:], uncompressed)\n\t\tchunkType := uint8(chunkTypeCompressedData)\n\t\tchunkLen := 4 + len(compressed)\n\t\tobufEnd := obufHeaderLen + len(compressed)\n\t\tif len(compressed) >= len(uncompressed)-len(uncompressed)/8 {\n\t\t\tchunkType = chunkTypeUncompressedData\n\t\t\tchunkLen = 4 + len(uncompressed)\n\t\t\tobufEnd = obufHeaderLen\n\t\t}\n\n\t\t// Fill in the per-chunk header that comes before the body.\n\t\tw.obuf[len(magicChunk)+0] = chunkType\n\t\tw.obuf[len(magicChunk)+1] = uint8(chunkLen >> 0)\n\t\tw.obuf[len(magicChunk)+2] = uint8(chunkLen >> 8)\n\t\tw.obuf[len(magicChunk)+3] = uint8(chunkLen >> 16)\n\t\tw.obuf[len(magicChunk)+4] = uint8(checksum >> 0)\n\t\tw.obuf[len(magicChunk)+5] = uint8(checksum >> 8)\n\t\tw.obuf[len(magicChunk)+6] = uint8(checksum >> 16)\n\t\tw.obuf[len(magicChunk)+7] = uint8(checksum >> 24)\n\n\t\tif _, err := w.w.Write(w.obuf[obufStart:obufEnd]); err != nil {\n\t\t\tw.err = err\n\t\t\treturn nRet, err\n\t\t}\n\t\tif chunkType == chunkTypeUncompressedData {\n\t\t\tif _, err := w.w.Write(uncompressed); err != nil {\n\t\t\t\tw.err = err\n\t\t\t\treturn nRet, err\n\t\t\t}\n\t\t}\n\t\tnRet += len(uncompressed)\n\t}\n\treturn nRet, nil\n}\n\n// Flush flushes the Writer to its underlying io.Writer.\nfunc (w *Writer) Flush() error {\n\tif w.err != nil {\n\t\treturn w.err\n\t}\n\tif len(w.ibuf) == 0 {\n\t\treturn nil\n\t}\n\tw.write(w.ibuf)\n\tw.ibuf = w.ibuf[:0]\n\treturn w.err\n}\n\n// Close calls Flush and then closes the Writer.\nfunc (w *Writer) Close() error {\n\tw.Flush()\n\tret := w.err\n\tif w.err == nil {\n\t\tw.err = errClosed\n\t}\n\treturn ret\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/encode_other.go",
    "content": "// Copyright 2016 The Snappy-Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage snapref\n\nfunc load32(b []byte, i int) uint32 {\n\tb = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.\n\treturn uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24\n}\n\nfunc load64(b []byte, i int) uint64 {\n\tb = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line.\n\treturn uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |\n\t\tuint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56\n}\n\n// emitLiteral writes a literal chunk and returns the number of bytes written.\n//\n// It assumes that:\n//\n//\tdst is long enough to hold the encoded bytes\n//\t1 <= len(lit) && len(lit) <= 65536\nfunc emitLiteral(dst, lit []byte) int {\n\ti, n := 0, uint(len(lit)-1)\n\tswitch {\n\tcase n < 60:\n\t\tdst[0] = uint8(n)<<2 | tagLiteral\n\t\ti = 1\n\tcase n < 1<<8:\n\t\tdst[0] = 60<<2 | tagLiteral\n\t\tdst[1] = uint8(n)\n\t\ti = 2\n\tdefault:\n\t\tdst[0] = 61<<2 | tagLiteral\n\t\tdst[1] = uint8(n)\n\t\tdst[2] = uint8(n >> 8)\n\t\ti = 3\n\t}\n\treturn i + copy(dst[i:], lit)\n}\n\n// emitCopy writes a copy chunk and returns the number of bytes written.\n//\n// It assumes that:\n//\n//\tdst is long enough to hold the encoded bytes\n//\t1 <= offset && offset <= 65535\n//\t4 <= length && length <= 65535\nfunc emitCopy(dst []byte, offset, length int) int {\n\ti := 0\n\t// The maximum length for a single tagCopy1 or tagCopy2 op is 64 bytes. The\n\t// threshold for this loop is a little higher (at 68 = 64 + 4), and the\n\t// length emitted down below is a little lower (at 60 = 64 - 4), because\n\t// it's shorter to encode a length 67 copy as a length 60 tagCopy2 followed\n\t// by a length 7 tagCopy1 (which encodes as 3+2 bytes) than to encode it as\n\t// a length 64 tagCopy2 followed by a length 3 tagCopy2 (which encodes as\n\t// 3+3 bytes). The magic 4 in the 64±4 is because the minimum length for a\n\t// tagCopy1 op is 4 bytes, which is why a length 3 copy has to be an\n\t// encodes-as-3-bytes tagCopy2 instead of an encodes-as-2-bytes tagCopy1.\n\tfor length >= 68 {\n\t\t// Emit a length 64 copy, encoded as 3 bytes.\n\t\tdst[i+0] = 63<<2 | tagCopy2\n\t\tdst[i+1] = uint8(offset)\n\t\tdst[i+2] = uint8(offset >> 8)\n\t\ti += 3\n\t\tlength -= 64\n\t}\n\tif length > 64 {\n\t\t// Emit a length 60 copy, encoded as 3 bytes.\n\t\tdst[i+0] = 59<<2 | tagCopy2\n\t\tdst[i+1] = uint8(offset)\n\t\tdst[i+2] = uint8(offset >> 8)\n\t\ti += 3\n\t\tlength -= 60\n\t}\n\tif length >= 12 || offset >= 2048 {\n\t\t// Emit the remaining copy, encoded as 3 bytes.\n\t\tdst[i+0] = uint8(length-1)<<2 | tagCopy2\n\t\tdst[i+1] = uint8(offset)\n\t\tdst[i+2] = uint8(offset >> 8)\n\t\treturn i + 3\n\t}\n\t// Emit the remaining copy, encoded as 2 bytes.\n\tdst[i+0] = uint8(offset>>8)<<5 | uint8(length-4)<<2 | tagCopy1\n\tdst[i+1] = uint8(offset)\n\treturn i + 2\n}\n\nfunc hash(u, shift uint32) uint32 {\n\treturn (u * 0x1e35a7bd) >> shift\n}\n\n// EncodeBlockInto exposes encodeBlock but checks dst size.\nfunc EncodeBlockInto(dst, src []byte) (d int) {\n\tif MaxEncodedLen(len(src)) > len(dst) {\n\t\treturn 0\n\t}\n\n\t// encodeBlock breaks on too big blocks, so split.\n\tfor len(src) > 0 {\n\t\tp := src\n\t\tsrc = nil\n\t\tif len(p) > maxBlockSize {\n\t\t\tp, src = p[:maxBlockSize], p[maxBlockSize:]\n\t\t}\n\t\tif len(p) < minNonLiteralBlockSize {\n\t\t\td += emitLiteral(dst[d:], p)\n\t\t} else {\n\t\t\td += encodeBlock(dst[d:], p)\n\t\t}\n\t}\n\treturn d\n}\n\n// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It\n// assumes that the varint-encoded length of the decompressed bytes has already\n// been written.\n//\n// It also assumes that:\n//\n//\tlen(dst) >= MaxEncodedLen(len(src)) &&\n//\tminNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize\nfunc encodeBlock(dst, src []byte) (d int) {\n\t// Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.\n\t// The table element type is uint16, as s < sLimit and sLimit < len(src)\n\t// and len(src) <= maxBlockSize and maxBlockSize == 65536.\n\tconst (\n\t\tmaxTableSize = 1 << 14\n\t\t// tableMask is redundant, but helps the compiler eliminate bounds\n\t\t// checks.\n\t\ttableMask = maxTableSize - 1\n\t)\n\tshift := uint32(32 - 8)\n\tfor tableSize := 1 << 8; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 {\n\t\tshift--\n\t}\n\t// In Go, all array elements are zero-initialized, so there is no advantage\n\t// to a smaller tableSize per se. However, it matches the C++ algorithm,\n\t// and in the asm versions of this code, we can get away with zeroing only\n\t// the first tableSize elements.\n\tvar table [maxTableSize]uint16\n\n\t// sLimit is when to stop looking for offset/length copies. The inputMargin\n\t// lets us use a fast path for emitLiteral in the main loop, while we are\n\t// looking for copies.\n\tsLimit := len(src) - inputMargin\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := 0\n\n\t// The encoded form must start with a literal, as there are no previous\n\t// bytes to copy, so we start looking for hash matches at s == 1.\n\ts := 1\n\tnextHash := hash(load32(src, s), shift)\n\n\tfor {\n\t\t// Copied from the C++ snappy implementation:\n\t\t//\n\t\t// Heuristic match skipping: If 32 bytes are scanned with no matches\n\t\t// found, start looking only at every other byte. If 32 more bytes are\n\t\t// scanned (or skipped), look at every third byte, etc.. When a match\n\t\t// is found, immediately go back to looking at every byte. This is a\n\t\t// small loss (~5% performance, ~0.1% density) for compressible data\n\t\t// due to more bookkeeping, but for non-compressible data (such as\n\t\t// JPEG) it's a huge win since the compressor quickly \"realizes\" the\n\t\t// data is incompressible and doesn't bother looking for matches\n\t\t// everywhere.\n\t\t//\n\t\t// The \"skip\" variable keeps track of how many bytes there are since\n\t\t// the last match; dividing it by 32 (ie. right-shifting by five) gives\n\t\t// the number of bytes to move ahead for each iteration.\n\t\tskip := 32\n\n\t\tnextS := s\n\t\tcandidate := 0\n\t\tfor {\n\t\t\ts = nextS\n\t\t\tbytesBetweenHashLookups := skip >> 5\n\t\t\tnextS = s + bytesBetweenHashLookups\n\t\t\tskip += bytesBetweenHashLookups\n\t\t\tif nextS > sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\t\t\tcandidate = int(table[nextHash&tableMask])\n\t\t\ttable[nextHash&tableMask] = uint16(s)\n\t\t\tnextHash = hash(load32(src, nextS), shift)\n\t\t\tif load32(src, s) == load32(src, candidate) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes\n\t\t// match. But, prior to the match, src[nextEmit:s] are unmatched. Emit\n\t\t// them as literal bytes.\n\t\td += emitLiteral(dst[d:], src[nextEmit:s])\n\n\t\t// Call emitCopy, and then see if another emitCopy could be our next\n\t\t// move. Repeat until we find no match for the input immediately after\n\t\t// what was consumed by the last emitCopy call.\n\t\t//\n\t\t// If we exit this loop normally then we need to call emitLiteral next,\n\t\t// though we don't yet know how big the literal will be. We handle that\n\t\t// by proceeding to the next iteration of the main loop. We also can\n\t\t// exit this loop via goto if we get close to exhausting the input.\n\t\tfor {\n\t\t\t// Invariant: we have a 4-byte match at s, and no need to emit any\n\t\t\t// literal bytes prior to s.\n\t\t\tbase := s\n\n\t\t\t// Extend the 4-byte match as long as possible.\n\t\t\t//\n\t\t\t// This is an inlined version of:\n\t\t\t//\ts = extendMatch(src, candidate+4, s+4)\n\t\t\ts += 4\n\t\t\tfor i := candidate + 4; s < len(src) && src[i] == src[s]; i, s = i+1, s+1 {\n\t\t\t}\n\n\t\t\td += emitCopy(dst[d:], base-candidate, s-base)\n\t\t\tnextEmit = s\n\t\t\tif s >= sLimit {\n\t\t\t\tgoto emitRemainder\n\t\t\t}\n\n\t\t\t// We could immediately start working at s now, but to improve\n\t\t\t// compression we first update the hash table at s-1 and at s. If\n\t\t\t// another emitCopy is not our next move, also calculate nextHash\n\t\t\t// at s+1. At least on GOARCH=amd64, these three hash calculations\n\t\t\t// are faster as one load64 call (with some shifts) instead of\n\t\t\t// three load32 calls.\n\t\t\tx := load64(src, s-1)\n\t\t\tprevHash := hash(uint32(x>>0), shift)\n\t\t\ttable[prevHash&tableMask] = uint16(s - 1)\n\t\t\tcurrHash := hash(uint32(x>>8), shift)\n\t\t\tcandidate = int(table[currHash&tableMask])\n\t\t\ttable[currHash&tableMask] = uint16(s)\n\t\t\tif uint32(x>>8) != load32(src, candidate) {\n\t\t\t\tnextHash = hash(uint32(x>>16), shift)\n\t\t\t\ts++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\nemitRemainder:\n\tif nextEmit < len(src) {\n\t\td += emitLiteral(dst[d:], src[nextEmit:])\n\t}\n\treturn d\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/internal/snapref/snappy.go",
    "content": "// Copyright 2011 The Snappy-Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package snapref implements the Snappy compression format. It aims for very\n// high speeds and reasonable compression.\n//\n// There are actually two Snappy formats: block and stream. They are related,\n// but different: trying to decompress block-compressed data as a Snappy stream\n// will fail, and vice versa. The block format is the Decode and Encode\n// functions and the stream format is the Reader and Writer types.\n//\n// The block format, the more common case, is used when the complete size (the\n// number of bytes) of the original data is known upfront, at the time\n// compression starts. The stream format, also known as the framing format, is\n// for when that isn't always true.\n//\n// The canonical, C++ implementation is at https://github.com/google/snappy and\n// it only implements the block format.\npackage snapref\n\nimport (\n\t\"hash/crc32\"\n)\n\n/*\nEach encoded block begins with the varint-encoded length of the decoded data,\nfollowed by a sequence of chunks. Chunks begin and end on byte boundaries. The\nfirst byte of each chunk is broken into its 2 least and 6 most significant bits\ncalled l and m: l ranges in [0, 4) and m ranges in [0, 64). l is the chunk tag.\nZero means a literal tag. All other values mean a copy tag.\n\nFor literal tags:\n  - If m < 60, the next 1 + m bytes are literal bytes.\n  - Otherwise, let n be the little-endian unsigned integer denoted by the next\n    m - 59 bytes. The next 1 + n bytes after that are literal bytes.\n\nFor copy tags, length bytes are copied from offset bytes ago, in the style of\nLempel-Ziv compression algorithms. In particular:\n  - For l == 1, the offset ranges in [0, 1<<11) and the length in [4, 12).\n    The length is 4 + the low 3 bits of m. The high 3 bits of m form bits 8-10\n    of the offset. The next byte is bits 0-7 of the offset.\n  - For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65).\n    The length is 1 + m. The offset is the little-endian unsigned integer\n    denoted by the next 2 bytes.\n  - For l == 3, this tag is a legacy format that is no longer issued by most\n    encoders. Nonetheless, the offset ranges in [0, 1<<32) and the length in\n    [1, 65). The length is 1 + m. The offset is the little-endian unsigned\n    integer denoted by the next 4 bytes.\n*/\nconst (\n\ttagLiteral = 0x00\n\ttagCopy1   = 0x01\n\ttagCopy2   = 0x02\n\ttagCopy4   = 0x03\n)\n\nconst (\n\tchecksumSize    = 4\n\tchunkHeaderSize = 4\n\tmagicChunk      = \"\\xff\\x06\\x00\\x00\" + magicBody\n\tmagicBody       = \"sNaPpY\"\n\n\t// maxBlockSize is the maximum size of the input to encodeBlock. It is not\n\t// part of the wire format per se, but some parts of the encoder assume\n\t// that an offset fits into a uint16.\n\t//\n\t// Also, for the framing format (Writer type instead of Encode function),\n\t// https://github.com/google/snappy/blob/master/framing_format.txt says\n\t// that \"the uncompressed data in a chunk must be no longer than 65536\n\t// bytes\".\n\tmaxBlockSize = 65536\n\n\t// maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is\n\t// hard coded to be a const instead of a variable, so that obufLen can also\n\t// be a const. Their equivalence is confirmed by\n\t// TestMaxEncodedLenOfMaxBlockSize.\n\tmaxEncodedLenOfMaxBlockSize = 76490\n\n\tobufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize\n\tobufLen       = obufHeaderLen + maxEncodedLenOfMaxBlockSize\n)\n\nconst (\n\tchunkTypeCompressedData   = 0x00\n\tchunkTypeUncompressedData = 0x01\n\tchunkTypePadding          = 0xfe\n\tchunkTypeStreamIdentifier = 0xff\n)\n\nvar crcTable = crc32.MakeTable(crc32.Castagnoli)\n\n// crc implements the checksum specified in section 3 of\n// https://github.com/google/snappy/blob/master/framing_format.txt\nfunc crc(b []byte) uint32 {\n\tc := crc32.Update(0, crcTable, b)\n\treturn uint32(c>>15|c<<17) + 0xa282ead8\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/s2sx.mod",
    "content": "module github.com/klauspost/compress\n\ngo 1.22\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/s2sx.sum",
    "content": ""
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/README.md",
    "content": "# zstd \n\n[Zstandard](https://facebook.github.io/zstd/) is a real-time compression algorithm, providing high compression ratios. \nIt offers a very wide range of compression / speed trade-off, while being backed by a very fast decoder.\nA high performance compression algorithm is implemented. For now focused on speed. \n\nThis package provides [compression](#Compressor) to and [decompression](#Decompressor) of Zstandard content. \n\nThis package is pure Go. Use `noasm` and `nounsafe` to disable relevant features.\n\nThe `zstd` package is provided as open source software using a Go standard license.\n\nCurrently the package is heavily optimized for 64 bit processors and will be significantly slower on 32 bit processors.\n\nFor seekable zstd streams, see [this excellent package](https://github.com/SaveTheRbtz/zstd-seekable-format-go).\n\n## Installation\n\nInstall using `go get -u github.com/klauspost/compress`. The package is located in `github.com/klauspost/compress/zstd`.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/klauspost/compress/zstd.svg)](https://pkg.go.dev/github.com/klauspost/compress/zstd)\n\n## Compressor\n\n### Status: \n\nSTABLE - there may always be subtle bugs, a wide variety of content has been tested and the library is actively \nused by several projects. This library is being [fuzz-tested](https://github.com/klauspost/compress-fuzz) for all updates.\n\nThere may still be specific combinations of data types/size/settings that could lead to edge cases, \nso as always, testing is recommended.  \n\nFor now, a high speed (fastest) and medium-fast (default) compressor has been implemented. \n\n* The \"Fastest\" compression ratio is roughly equivalent to zstd level 1. \n* The \"Default\" compression ratio is roughly equivalent to zstd level 3 (default).\n* The \"Better\" compression ratio is roughly equivalent to zstd level 7.\n* The \"Best\" compression ratio is roughly equivalent to zstd level 11.\n\nIn terms of speed, it is typically 2x as fast as the stdlib deflate/gzip in its fastest mode. \nThe compression ratio compared to stdlib is around level 3, but usually 3x as fast.\n\n \n### Usage\n\nAn Encoder can be used for either compressing a stream via the\n`io.WriteCloser` interface supported by the Encoder or as multiple independent\ntasks via the `EncodeAll` function.\nSmaller encodes are encouraged to use the EncodeAll function.\nUse `NewWriter` to create a new instance that can be used for both.\n\nTo create a writer with default options, do like this:\n\n```Go\n// Compress input to output.\nfunc Compress(in io.Reader, out io.Writer) error {\n    enc, err := zstd.NewWriter(out)\n    if err != nil {\n        return err\n    }\n    _, err = io.Copy(enc, in)\n    if err != nil {\n        enc.Close()\n        return err\n    }\n    return enc.Close()\n}\n```\n\nNow you can encode by writing data to `enc`. The output will be finished writing when `Close()` is called.\nEven if your encode fails, you should still call `Close()` to release any resources that may be held up.  \n\nThe above is fine for big encodes. However, whenever possible try to *reuse* the writer.\n\nTo reuse the encoder, you can use the `Reset(io.Writer)` function to change to another output. \nThis will allow the encoder to reuse all resources and avoid wasteful allocations. \n\nCurrently stream encoding has 'light' concurrency, meaning up to 2 goroutines can be working on part \nof a stream. This is independent of the `WithEncoderConcurrency(n)`, but that is likely to change \nin the future. So if you want to limit concurrency for future updates, specify the concurrency\nyou would like.\n\nIf you would like stream encoding to be done without spawning async goroutines, use `WithEncoderConcurrency(1)`\nwhich will compress input as each block is completed, blocking on writes until each has completed.\n\nYou can specify your desired compression level using `WithEncoderLevel()` option. Currently only pre-defined \ncompression settings can be specified.\n\n#### Future Compatibility Guarantees\n\nThis will be an evolving project. When using this package it is important to note that both the compression efficiency and speed may change.\n\nThe goal will be to keep the default efficiency at the default zstd (level 3). \nHowever the encoding should never be assumed to remain the same, \nand you should not use hashes of compressed output for similarity checks.\n\nThe Encoder can be assumed to produce the same output from the exact same code version.\nHowever, the may be modes in the future that break this, \nalthough they will not be enabled without an explicit option.   \n\nThis encoder is not designed to (and will probably never) output the exact same bitstream as the reference encoder.\n\nAlso note, that the cgo decompressor currently does not [report all errors on invalid input](https://github.com/DataDog/zstd/issues/59),\n[omits error checks](https://github.com/DataDog/zstd/issues/61), [ignores checksums](https://github.com/DataDog/zstd/issues/43) \nand seems to ignore concatenated streams, even though [it is part of the spec](https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frames).\n\n#### Blocks\n\nFor compressing small blocks, the returned encoder has a function called `EncodeAll(src, dst []byte) []byte`.\n\n`EncodeAll` will encode all input in src and append it to dst.\nThis function can be called concurrently. \nEach call will only run on a same goroutine as the caller.\n\nEncoded blocks can be concatenated and the result will be the combined input stream.\nData compressed with EncodeAll can be decoded with the Decoder, using either a stream or `DecodeAll`.\n\nEspecially when encoding blocks you should take special care to reuse the encoder. \nThis will effectively make it run without allocations after a warmup period. \nTo make it run completely without allocations, supply a destination buffer with space for all content.   \n\n```Go\nimport \"github.com/klauspost/compress/zstd\"\n\n// Create a writer that caches compressors.\n// For this operation type we supply a nil Reader.\nvar encoder, _ = zstd.NewWriter(nil)\n\n// Compress a buffer. \n// If you have a destination buffer, the allocation in the call can also be eliminated.\nfunc Compress(src []byte) []byte {\n    return encoder.EncodeAll(src, make([]byte, 0, len(src)))\n} \n```\n\nYou can control the maximum number of concurrent encodes using the `WithEncoderConcurrency(n)` \noption when creating the writer.\n\nUsing the Encoder for both a stream and individual blocks concurrently is safe. \n\n### Performance\n\nI have collected some speed examples to compare speed and compression against other compressors.\n\n* `file` is the input file.\n* `out` is the compressor used. `zskp` is this package. `zstd` is the Datadog cgo library. `gzstd/gzkp` is gzip standard and this library.\n* `level` is the compression level used. For `zskp` level 1 is \"fastest\", level 2 is \"default\"; 3 is \"better\", 4 is \"best\".\n* `insize`/`outsize` is the input/output size.\n* `millis` is the number of milliseconds used for compression.\n* `mb/s` is megabytes (2^20 bytes) per second.\n\n```\nSilesia Corpus:\nhttp://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip\n\nThis package:\nfile    out     level   insize      outsize     millis  mb/s\nsilesia.tar zskp    1   211947520   73821326    634     318.47\nsilesia.tar zskp    2   211947520   67655404    1508    133.96\nsilesia.tar zskp    3   211947520   64746933    3000    67.37\nsilesia.tar zskp    4   211947520   60073508    16926   11.94\n\ncgo zstd:\nsilesia.tar zstd    1   211947520   73605392    543     371.56\nsilesia.tar zstd    3   211947520   66793289    864     233.68\nsilesia.tar zstd    6   211947520   62916450    1913    105.66\nsilesia.tar zstd    9   211947520   60212393    5063    39.92\n\ngzip, stdlib/this package:\nsilesia.tar gzstd   1   211947520   80007735    1498    134.87\nsilesia.tar gzkp    1   211947520   80088272    1009    200.31\n\nGOB stream of binary data. Highly compressible.\nhttps://files.klauspost.com/compress/gob-stream.7z\n\nfile        out     level   insize  outsize     millis  mb/s\ngob-stream  zskp    1   1911399616  233948096   3230    564.34\ngob-stream  zskp    2   1911399616  203997694   4997    364.73\ngob-stream  zskp    3   1911399616  173526523   13435   135.68\ngob-stream  zskp    4   1911399616  162195235   47559   38.33\n\ngob-stream  zstd    1   1911399616  249810424   2637    691.26\ngob-stream  zstd    3   1911399616  208192146   3490    522.31\ngob-stream  zstd    6   1911399616  193632038   6687    272.56\ngob-stream  zstd    9   1911399616  177620386   16175   112.70\n\ngob-stream  gzstd   1   1911399616  357382013   9046    201.49\ngob-stream  gzkp    1   1911399616  359136669   4885    373.08\n\nThe test data for the Large Text Compression Benchmark is the first\n10^9 bytes of the English Wikipedia dump on Mar. 3, 2006.\nhttp://mattmahoney.net/dc/textdata.html\n\nfile    out level   insize      outsize     millis  mb/s\nenwik9  zskp    1   1000000000  343833605   3687    258.64\nenwik9  zskp    2   1000000000  317001237   7672    124.29\nenwik9  zskp    3   1000000000  291915823   15923   59.89\nenwik9  zskp    4   1000000000  261710291   77697   12.27\n\nenwik9  zstd    1   1000000000  358072021   3110    306.65\nenwik9  zstd    3   1000000000  313734672   4784    199.35\nenwik9  zstd    6   1000000000  295138875   10290   92.68\nenwik9  zstd    9   1000000000  278348700   28549   33.40\n\nenwik9  gzstd   1   1000000000  382578136   8608    110.78\nenwik9  gzkp    1   1000000000  382781160   5628    169.45\n\nHighly compressible JSON file.\nhttps://files.klauspost.com/compress/github-june-2days-2019.json.zst\n\nfile                        out level   insize      outsize     millis  mb/s\ngithub-june-2days-2019.json zskp    1   6273951764  697439532   9789    611.17\ngithub-june-2days-2019.json zskp    2   6273951764  610876538   18553   322.49\ngithub-june-2days-2019.json zskp    3   6273951764  517662858   44186   135.41\ngithub-june-2days-2019.json zskp    4   6273951764  464617114   165373  36.18\n\ngithub-june-2days-2019.json zstd    1   6273951764  766284037   8450    708.00\ngithub-june-2days-2019.json zstd    3   6273951764  661889476   10927   547.57\ngithub-june-2days-2019.json zstd    6   6273951764  642756859   22996   260.18\ngithub-june-2days-2019.json zstd    9   6273951764  601974523   52413   114.16\n\ngithub-june-2days-2019.json gzstd   1   6273951764  1164397768  26793   223.32\ngithub-june-2days-2019.json gzkp    1   6273951764  1120631856  17693   338.16\n\nVM Image, Linux mint with a few installed applications:\nhttps://files.klauspost.com/compress/rawstudio-mint14.7z\n\nfile                    out level   insize      outsize     millis  mb/s\nrawstudio-mint14.tar    zskp    1   8558382592  3718400221  18206   448.29\nrawstudio-mint14.tar    zskp    2   8558382592  3326118337  37074   220.15\nrawstudio-mint14.tar    zskp    3   8558382592  3163842361  87306   93.49\nrawstudio-mint14.tar    zskp    4   8558382592  2970480650  783862  10.41\n\nrawstudio-mint14.tar    zstd    1   8558382592  3609250104  17136   476.27\nrawstudio-mint14.tar    zstd    3   8558382592  3341679997  29262   278.92\nrawstudio-mint14.tar    zstd    6   8558382592  3235846406  77904   104.77\nrawstudio-mint14.tar    zstd    9   8558382592  3160778861  140946  57.91\n\nrawstudio-mint14.tar    gzstd   1   8558382592  3926234992  51345   158.96\nrawstudio-mint14.tar    gzkp    1   8558382592  3960117298  36722   222.26\n\nCSV data:\nhttps://files.klauspost.com/compress/nyc-taxi-data-10M.csv.zst\n\nfile                    out level   insize      outsize     millis  mb/s\nnyc-taxi-data-10M.csv   zskp    1   3325605752  641319332   9462    335.17\nnyc-taxi-data-10M.csv   zskp    2   3325605752  588976126   17570   180.50\nnyc-taxi-data-10M.csv   zskp    3   3325605752  529329260   32432   97.79\nnyc-taxi-data-10M.csv   zskp    4   3325605752  474949772   138025  22.98\n\nnyc-taxi-data-10M.csv   zstd    1   3325605752  687399637   8233    385.18\nnyc-taxi-data-10M.csv   zstd    3   3325605752  598514411   10065   315.07\nnyc-taxi-data-10M.csv   zstd    6   3325605752  570522953   20038   158.27\nnyc-taxi-data-10M.csv   zstd    9   3325605752  517554797   64565   49.12\n\nnyc-taxi-data-10M.csv   gzstd   1   3325605752  928654908   21270   149.11\nnyc-taxi-data-10M.csv   gzkp    1   3325605752  922273214   13929   227.68\n```\n\n## Decompressor\n\nStatus: STABLE - there may still be subtle bugs, but a wide variety of content has been tested.\n\nThis library is being continuously [fuzz-tested](https://github.com/klauspost/compress-fuzz),\nkindly supplied by [fuzzit.dev](https://fuzzit.dev/). \nThe main purpose of the fuzz testing is to ensure that it is not possible to crash the decoder, \nor run it past its limits with ANY input provided.  \n \n### Usage\n\nThe package has been designed for two main usages, big streams of data and smaller in-memory buffers. \nThere are two main usages of the package for these. Both of them are accessed by creating a `Decoder`.\n\nFor streaming use a simple setup could look like this:\n\n```Go\nimport \"github.com/klauspost/compress/zstd\"\n\nfunc Decompress(in io.Reader, out io.Writer) error {\n    d, err := zstd.NewReader(in)\n    if err != nil {\n        return err\n    }\n    defer d.Close()\n    \n    // Copy content...\n    _, err = io.Copy(out, d)\n    return err\n}\n```\n\nIt is important to use the \"Close\" function when you no longer need the Reader to stop running goroutines, \nwhen running with default settings.\nGoroutines will exit once an error has been returned, including `io.EOF` at the end of a stream.\n\nStreams are decoded concurrently in 4 asynchronous stages to give the best possible throughput.\nHowever, if you prefer synchronous decompression, use `WithDecoderConcurrency(1)` which will decompress data \nas it is being requested only.\n\nFor decoding buffers, it could look something like this:\n\n```Go\nimport \"github.com/klauspost/compress/zstd\"\n\n// Create a reader that caches decompressors.\n// For this operation type we supply a nil Reader.\nvar decoder, _ = zstd.NewReader(nil, zstd.WithDecoderConcurrency(0))\n\n// Decompress a buffer. We don't supply a destination buffer,\n// so it will be allocated by the decoder.\nfunc Decompress(src []byte) ([]byte, error) {\n    return decoder.DecodeAll(src, nil)\n} \n```\n\nBoth of these cases should provide the functionality needed. \nThe decoder can be used for *concurrent* decompression of multiple buffers.\nBy default 4 decompressors will be created. \n\nIt will only allow a certain number of concurrent operations to run. \nTo tweak that yourself use the `WithDecoderConcurrency(n)` option when creating the decoder.\nIt is possible to use `WithDecoderConcurrency(0)` to create GOMAXPROCS decoders.\n\n### Dictionaries\n\nData compressed with [dictionaries](https://github.com/facebook/zstd#the-case-for-small-data-compression) can be decompressed.\n\nDictionaries are added individually to Decoders.\nDictionaries are generated by the `zstd --train` command and contains an initial state for the decoder.\nTo add a dictionary use the `WithDecoderDicts(dicts ...[]byte)` option with the dictionary data.\nSeveral dictionaries can be added at once.\n\nThe dictionary will be used automatically for the data that specifies them.\nA re-used Decoder will still contain the dictionaries registered.\n\nWhen registering multiple dictionaries with the same ID, the last one will be used.\n\nIt is possible to use dictionaries when compressing data.\n\nTo enable a dictionary use `WithEncoderDict(dict []byte)`. Here only one dictionary will be used \nand it will likely be used even if it doesn't improve compression. \n\nThe used dictionary must be used to decompress the content.\n\nFor any real gains, the dictionary should be built with similar data. \nIf an unsuitable dictionary is used the output may be slightly larger than using no dictionary.\nUse the [zstd commandline tool](https://github.com/facebook/zstd/releases) to build a dictionary from sample data.\nFor information see [zstd dictionary information](https://github.com/facebook/zstd#the-case-for-small-data-compression). \n\nFor now there is a fixed startup performance penalty for compressing content with dictionaries. \nThis will likely be improved over time. Just be aware to test performance when implementing.  \n\n### Allocation-less operation\n\nThe decoder has been designed to operate without allocations after a warmup. \n\nThis means that you should *store* the decoder for best performance. \nTo re-use a stream decoder, use the `Reset(r io.Reader) error` to switch to another stream.\nA decoder can safely be re-used even if the previous stream failed.\n\nTo release the resources, you must call the `Close()` function on a decoder.\nAfter this it can *no longer be reused*, but all running goroutines will be stopped.\nSo you *must* use this if you will no longer need the Reader.\n\nFor decompressing smaller buffers a single decoder can be used.\nWhen decoding buffers, you can supply a destination slice with length 0 and your expected capacity.\nIn this case no unneeded allocations should be made. \n\n### Concurrency\n\nThe buffer decoder does everything on the same goroutine and does nothing concurrently.\nIt can however decode several buffers concurrently. Use `WithDecoderConcurrency(n)` to limit that.\n\nThe stream decoder will create goroutines that:\n\n1) Reads input and splits the input into blocks.\n2) Decompression of literals.\n3) Decompression of sequences.\n4) Reconstruction of output stream.\n\nSo effectively this also means the decoder will \"read ahead\" and prepare data to always be available for output.\n\nThe concurrency level will, for streams, determine how many blocks ahead the compression will start.\n\nSince \"blocks\" are quite dependent on the output of the previous block stream decoding will only have limited concurrency.\n\nIn practice this means that concurrency is often limited to utilizing about 3 cores effectively.\n  \n### Benchmarks\n\nThe first two are streaming decodes and the last are smaller inputs. \n\nRunning on AMD Ryzen 9 3950X 16-Core Processor. AMD64 assembly used.\n\n```\nBenchmarkDecoderSilesia-32    \t                   5\t 206878840 ns/op\t1024.50 MB/s\t   49808 B/op\t      43 allocs/op\nBenchmarkDecoderEnwik9-32                          1\t1271809000 ns/op\t 786.28 MB/s\t   72048 B/op\t      52 allocs/op\n\nConcurrent blocks, performance:\n\nBenchmarkDecoder_DecodeAllParallel/kppkn.gtb.zst-32         \t   67356\t     17857 ns/op\t10321.96 MB/s\t        22.48 pct\t     102 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/geo.protodata.zst-32     \t  266656\t      4421 ns/op\t26823.21 MB/s\t        11.89 pct\t      19 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/plrabn12.txt.zst-32      \t   20992\t     56842 ns/op\t8477.17 MB/s\t        39.90 pct\t     754 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/lcet10.txt.zst-32        \t   27456\t     43932 ns/op\t9714.01 MB/s\t        33.27 pct\t     524 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/asyoulik.txt.zst-32      \t   78432\t     15047 ns/op\t8319.15 MB/s\t        40.34 pct\t      66 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/alice29.txt.zst-32       \t   65800\t     18436 ns/op\t8249.63 MB/s\t        37.75 pct\t      88 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/html_x_4.zst-32          \t  102993\t     11523 ns/op\t35546.09 MB/s\t         3.637 pct\t     143 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/paper-100k.pdf.zst-32    \t 1000000\t      1070 ns/op\t95720.98 MB/s\t        80.53 pct\t       3 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/fireworks.jpeg.zst-32    \t  749802\t      1752 ns/op\t70272.35 MB/s\t       100.0 pct\t       5 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/urls.10K.zst-32          \t   22640\t     52934 ns/op\t13263.37 MB/s\t        26.25 pct\t    1014 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/html.zst-32              \t  226412\t      5232 ns/op\t19572.27 MB/s\t        14.49 pct\t      20 B/op\t       0 allocs/op\nBenchmarkDecoder_DecodeAllParallel/comp-data.bin.zst-32     \t  923041\t      1276 ns/op\t3194.71 MB/s\t        31.26 pct\t       0 B/op\t       0 allocs/op\n```\n\nThis reflects the performance around May 2022, but this may be out of date.\n\n## Zstd inside ZIP files\n\nIt is possible to use zstandard to compress individual files inside zip archives.\nWhile this isn't widely supported it can be useful for internal files.\n\nTo support the compression and decompression of these files you must register a compressor and decompressor.\n\nIt is highly recommended registering the (de)compressors on individual zip Reader/Writer and NOT\nuse the global registration functions. The main reason for this is that 2 registrations from \ndifferent packages will result in a panic.\n\nIt is a good idea to only have a single compressor and decompressor, since they can be used for multiple zip\nfiles concurrently, and using a single instance will allow reusing some resources.\n\nSee [this example](https://pkg.go.dev/github.com/klauspost/compress/zstd#example-ZipCompressor) for \nhow to compress and decompress files inside zip archives.\n\n# Contributions\n\nContributions are always welcome. \nFor new features/fixes, remember to add tests and for performance enhancements include benchmarks.\n\nFor general feedback and experience reports, feel free to open an issue or write me on [Twitter](https://twitter.com/sh0dan).\n\nThis package includes the excellent [`github.com/cespare/xxhash`](https://github.com/cespare/xxhash) package Copyright (c) 2016 Caleb Spare.\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/bitreader.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/bits\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// bitReader reads a bitstream in reverse.\n// The last set bit indicates the start of the stream and is used\n// for aligning the input.\ntype bitReader struct {\n\tin       []byte\n\tvalue    uint64 // Maybe use [16]byte, but shifting is awkward.\n\tcursor   int    // offset where next read should end\n\tbitsRead uint8\n}\n\n// init initializes and resets the bit reader.\nfunc (b *bitReader) init(in []byte) error {\n\tif len(in) < 1 {\n\t\treturn errors.New(\"corrupt stream: too short\")\n\t}\n\tb.in = in\n\t// The highest bit of the last byte indicates where to start\n\tv := in[len(in)-1]\n\tif v == 0 {\n\t\treturn errors.New(\"corrupt stream, did not find end of stream\")\n\t}\n\tb.cursor = len(in)\n\tb.bitsRead = 64\n\tb.value = 0\n\tif len(in) >= 8 {\n\t\tb.fillFastStart()\n\t} else {\n\t\tb.fill()\n\t\tb.fill()\n\t}\n\tb.bitsRead += 8 - uint8(highBits(uint32(v)))\n\treturn nil\n}\n\n// getBits will return n bits. n can be 0.\nfunc (b *bitReader) getBits(n uint8) int {\n\tif n == 0 /*|| b.bitsRead >= 64 */ {\n\t\treturn 0\n\t}\n\treturn int(b.get32BitsFast(n))\n}\n\n// get32BitsFast requires that at least one bit is requested every time.\n// There are no checks if the buffer is filled.\nfunc (b *bitReader) get32BitsFast(n uint8) uint32 {\n\tconst regMask = 64 - 1\n\tv := uint32((b.value << (b.bitsRead & regMask)) >> ((regMask + 1 - n) & regMask))\n\tb.bitsRead += n\n\treturn v\n}\n\n// fillFast() will make sure at least 32 bits are available.\n// There must be at least 4 bytes available.\nfunc (b *bitReader) fillFast() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\tb.cursor -= 4\n\tb.value = (b.value << 32) | uint64(le.Load32(b.in, b.cursor))\n\tb.bitsRead -= 32\n}\n\n// fillFastStart() assumes the bitreader is empty and there is at least 8 bytes to read.\nfunc (b *bitReader) fillFastStart() {\n\tb.cursor -= 8\n\tb.value = le.Load64(b.in, b.cursor)\n\tb.bitsRead = 0\n}\n\n// fill() will make sure at least 32 bits are available.\nfunc (b *bitReader) fill() {\n\tif b.bitsRead < 32 {\n\t\treturn\n\t}\n\tif b.cursor >= 4 {\n\t\tb.cursor -= 4\n\t\tb.value = (b.value << 32) | uint64(le.Load32(b.in, b.cursor))\n\t\tb.bitsRead -= 32\n\t\treturn\n\t}\n\n\tb.bitsRead -= uint8(8 * b.cursor)\n\tfor b.cursor > 0 {\n\t\tb.cursor -= 1\n\t\tb.value = (b.value << 8) | uint64(b.in[b.cursor])\n\t}\n}\n\n// finished returns true if all bits have been read from the bit stream.\nfunc (b *bitReader) finished() bool {\n\treturn b.cursor == 0 && b.bitsRead >= 64\n}\n\n// overread returns true if more bits have been requested than is on the stream.\nfunc (b *bitReader) overread() bool {\n\treturn b.bitsRead > 64\n}\n\n// remain returns the number of bits remaining.\nfunc (b *bitReader) remain() uint {\n\treturn 8*uint(b.cursor) + 64 - uint(b.bitsRead)\n}\n\n// close the bitstream and returns an error if out-of-buffer reads occurred.\nfunc (b *bitReader) close() error {\n\t// Release reference.\n\tb.in = nil\n\tb.cursor = 0\n\tif !b.finished() {\n\t\treturn fmt.Errorf(\"%d extra bits on block, should be 0\", b.remain())\n\t}\n\tif b.bitsRead > 64 {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn nil\n}\n\nfunc highBits(val uint32) (n uint32) {\n\treturn uint32(bits.Len32(val) - 1)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/bitwriter.go",
    "content": "// Copyright 2018 Klaus Post. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n// Based on work Copyright (c) 2013, Yann Collet, released under BSD License.\n\npackage zstd\n\n// bitWriter will write bits.\n// First bit will be LSB of the first byte of output.\ntype bitWriter struct {\n\tbitContainer uint64\n\tnBits        uint8\n\tout          []byte\n}\n\n// bitMask16 is bitmasks. Has extra to avoid bounds check.\nvar bitMask16 = [32]uint16{\n\t0, 1, 3, 7, 0xF, 0x1F,\n\t0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF,\n\t0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0xFFFF,\n\t0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,\n\t0xFFFF, 0xFFFF} /* up to 16 bits */\n\nvar bitMask32 = [32]uint32{\n\t0, 1, 3, 7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF,\n\t0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF,\n\t0x1ffff, 0x3ffff, 0x7FFFF, 0xfFFFF, 0x1fFFFF, 0x3fFFFF, 0x7fFFFF, 0xffFFFF,\n\t0x1ffFFFF, 0x3ffFFFF, 0x7ffFFFF, 0xfffFFFF, 0x1fffFFFF, 0x3fffFFFF, 0x7fffFFFF,\n} // up to 32 bits\n\n// addBits16NC will add up to 16 bits.\n// It will not check if there is space for them,\n// so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits16NC(value uint16, bits uint8) {\n\tb.bitContainer |= uint64(value&bitMask16[bits&31]) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// addBits32NC will add up to 31 bits.\n// It will not check if there is space for them,\n// so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits32NC(value uint32, bits uint8) {\n\tb.bitContainer |= uint64(value&bitMask32[bits&31]) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// addBits64NC will add up to 64 bits.\n// There must be space for 32 bits.\nfunc (b *bitWriter) addBits64NC(value uint64, bits uint8) {\n\tif bits <= 31 {\n\t\tb.addBits32Clean(uint32(value), bits)\n\t\treturn\n\t}\n\tb.addBits32Clean(uint32(value), 32)\n\tb.flush32()\n\tb.addBits32Clean(uint32(value>>32), bits-32)\n}\n\n// addBits32Clean will add up to 32 bits.\n// It will not check if there is space for them.\n// The input must not contain more bits than specified.\nfunc (b *bitWriter) addBits32Clean(value uint32, bits uint8) {\n\tb.bitContainer |= uint64(value) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated.\n// It will not check if there is space for them, so the caller must ensure that it has flushed recently.\nfunc (b *bitWriter) addBits16Clean(value uint16, bits uint8) {\n\tb.bitContainer |= uint64(value) << (b.nBits & 63)\n\tb.nBits += bits\n}\n\n// flush32 will flush out, so there are at least 32 bits available for writing.\nfunc (b *bitWriter) flush32() {\n\tif b.nBits < 32 {\n\t\treturn\n\t}\n\tb.out = append(b.out,\n\t\tbyte(b.bitContainer),\n\t\tbyte(b.bitContainer>>8),\n\t\tbyte(b.bitContainer>>16),\n\t\tbyte(b.bitContainer>>24))\n\tb.nBits -= 32\n\tb.bitContainer >>= 32\n}\n\n// flushAlign will flush remaining full bytes and align to next byte boundary.\nfunc (b *bitWriter) flushAlign() {\n\tnbBytes := (b.nBits + 7) >> 3\n\tfor i := range nbBytes {\n\t\tb.out = append(b.out, byte(b.bitContainer>>(i*8)))\n\t}\n\tb.nBits = 0\n\tb.bitContainer = 0\n}\n\n// close will write the alignment bit and write the final byte(s)\n// to the output.\nfunc (b *bitWriter) close() {\n\t// End mark\n\tb.addBits16Clean(1, 1)\n\t// flush until next byte.\n\tb.flushAlign()\n}\n\n// reset and continue writing by appending to out.\nfunc (b *bitWriter) reset(out []byte) {\n\tb.bitContainer = 0\n\tb.nBits = 0\n\tb.out = out\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/blockdec.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/huff0\"\n\t\"github.com/klauspost/compress/zstd/internal/xxhash\"\n)\n\ntype blockType uint8\n\n//go:generate stringer -type=blockType,literalsBlockType,seqCompMode,tableIndex\n\nconst (\n\tblockTypeRaw blockType = iota\n\tblockTypeRLE\n\tblockTypeCompressed\n\tblockTypeReserved\n)\n\ntype literalsBlockType uint8\n\nconst (\n\tliteralsBlockRaw literalsBlockType = iota\n\tliteralsBlockRLE\n\tliteralsBlockCompressed\n\tliteralsBlockTreeless\n)\n\nconst (\n\t// maxCompressedBlockSize is the biggest allowed compressed block size (128KB)\n\tmaxCompressedBlockSize = 128 << 10\n\n\tcompressedBlockOverAlloc    = 16\n\tmaxCompressedBlockSizeAlloc = 128<<10 + compressedBlockOverAlloc\n\n\t// Maximum possible block size (all Raw+Uncompressed).\n\tmaxBlockSize = (1 << 21) - 1\n\n\tmaxMatchLen  = 131074\n\tmaxSequences = 0x7f00 + 0xffff\n\n\t// We support slightly less than the reference decoder to be able to\n\t// use ints on 32 bit archs.\n\tmaxOffsetBits = 30\n)\n\nvar (\n\thuffDecoderPool = sync.Pool{New: func() any {\n\t\treturn &huff0.Scratch{}\n\t}}\n\n\tfseDecoderPool = sync.Pool{New: func() any {\n\t\treturn &fseDecoder{}\n\t}}\n)\n\ntype blockDec struct {\n\t// Raw source data of the block.\n\tdata        []byte\n\tdataStorage []byte\n\n\t// Destination of the decoded data.\n\tdst []byte\n\n\t// Buffer for literals data.\n\tliteralBuf []byte\n\n\t// Window size of the block.\n\tWindowSize uint64\n\n\terr error\n\n\t// Check against this crc, if hasCRC is true.\n\tcheckCRC uint32\n\thasCRC   bool\n\n\t// Frame to use for singlethreaded decoding.\n\t// Should not be used by the decoder itself since parent may be another frame.\n\tlocalFrame *frameDec\n\n\tsequence []seqVals\n\n\tasync struct {\n\t\tnewHist  *history\n\t\tliterals []byte\n\t\tseqData  []byte\n\t\tseqSize  int // Size of uncompressed sequences\n\t\tfcs      uint64\n\t}\n\n\t// Block is RLE, this is the size.\n\tRLESize uint32\n\n\tType blockType\n\n\t// Is this the last block of a frame?\n\tLast bool\n\n\t// Use less memory\n\tlowMem bool\n}\n\nfunc (b *blockDec) String() string {\n\tif b == nil {\n\t\treturn \"<nil>\"\n\t}\n\treturn fmt.Sprintf(\"Steam Size: %d, Type: %v, Last: %t, Window: %d\", len(b.data), b.Type, b.Last, b.WindowSize)\n}\n\nfunc newBlockDec(lowMem bool) *blockDec {\n\tb := blockDec{\n\t\tlowMem: lowMem,\n\t}\n\treturn &b\n}\n\n// reset will reset the block.\n// Input must be a start of a block and will be at the end of the block when returned.\nfunc (b *blockDec) reset(br byteBuffer, windowSize uint64) error {\n\tb.WindowSize = windowSize\n\ttmp, err := br.readSmall(3)\n\tif err != nil {\n\t\tprintln(\"Reading block header:\", err)\n\t\treturn err\n\t}\n\tbh := uint32(tmp[0]) | (uint32(tmp[1]) << 8) | (uint32(tmp[2]) << 16)\n\tb.Last = bh&1 != 0\n\tb.Type = blockType((bh >> 1) & 3)\n\t// find size.\n\tcSize := int(bh >> 3)\n\tmaxSize := maxCompressedBlockSizeAlloc\n\tswitch b.Type {\n\tcase blockTypeReserved:\n\t\treturn ErrReservedBlockType\n\tcase blockTypeRLE:\n\t\tif cSize > maxCompressedBlockSize || cSize > int(b.WindowSize) {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"rle block too big: csize:%d block: %+v\\n\", uint64(cSize), b)\n\t\t\t}\n\t\t\treturn ErrWindowSizeExceeded\n\t\t}\n\t\tb.RLESize = uint32(cSize)\n\t\tif b.lowMem {\n\t\t\tmaxSize = cSize\n\t\t}\n\t\tcSize = 1\n\tcase blockTypeCompressed:\n\t\tif debugDecoder {\n\t\t\tprintln(\"Data size on stream:\", cSize)\n\t\t}\n\t\tb.RLESize = 0\n\t\tmaxSize = maxCompressedBlockSizeAlloc\n\t\tif windowSize < maxCompressedBlockSize && b.lowMem {\n\t\t\tmaxSize = int(windowSize) + compressedBlockOverAlloc\n\t\t}\n\t\tif cSize > maxCompressedBlockSize || uint64(cSize) > b.WindowSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"compressed block too big: csize:%d block: %+v\\n\", uint64(cSize), b)\n\t\t\t}\n\t\t\treturn ErrCompressedSizeTooBig\n\t\t}\n\t\t// Empty compressed blocks must at least be 2 bytes\n\t\t// for Literals_Block_Type and one for Sequences_Section_Header.\n\t\tif cSize < 2 {\n\t\t\treturn ErrBlockTooSmall\n\t\t}\n\tcase blockTypeRaw:\n\t\tif cSize > maxCompressedBlockSize || cSize > int(b.WindowSize) {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"rle block too big: csize:%d block: %+v\\n\", uint64(cSize), b)\n\t\t\t}\n\t\t\treturn ErrWindowSizeExceeded\n\t\t}\n\n\t\tb.RLESize = 0\n\t\t// We do not need a destination for raw blocks.\n\t\tmaxSize = -1\n\tdefault:\n\t\tpanic(\"Invalid block type\")\n\t}\n\n\t// Read block data.\n\tif _, ok := br.(*byteBuf); !ok && cap(b.dataStorage) < cSize {\n\t\t// byteBuf doesn't need a destination buffer.\n\t\tif b.lowMem || cSize > maxCompressedBlockSize {\n\t\t\tb.dataStorage = make([]byte, 0, cSize+compressedBlockOverAlloc)\n\t\t} else {\n\t\t\tb.dataStorage = make([]byte, 0, maxCompressedBlockSizeAlloc)\n\t\t}\n\t}\n\tb.data, err = br.readBig(cSize, b.dataStorage)\n\tif err != nil {\n\t\tif debugDecoder {\n\t\t\tprintln(\"Reading block:\", err, \"(\", cSize, \")\", len(b.data))\n\t\t\tprintf(\"%T\", br)\n\t\t}\n\t\treturn err\n\t}\n\tif cap(b.dst) <= maxSize {\n\t\tb.dst = make([]byte, 0, maxSize+1)\n\t}\n\treturn nil\n}\n\n// sendEOF will make the decoder send EOF on this frame.\nfunc (b *blockDec) sendErr(err error) {\n\tb.Last = true\n\tb.Type = blockTypeReserved\n\tb.err = err\n}\n\n// Close will release resources.\n// Closed blockDec cannot be reset.\nfunc (b *blockDec) Close() {\n}\n\n// decodeBuf\nfunc (b *blockDec) decodeBuf(hist *history) error {\n\tswitch b.Type {\n\tcase blockTypeRLE:\n\t\tif cap(b.dst) < int(b.RLESize) {\n\t\t\tif b.lowMem {\n\t\t\t\tb.dst = make([]byte, b.RLESize)\n\t\t\t} else {\n\t\t\t\tb.dst = make([]byte, maxCompressedBlockSize)\n\t\t\t}\n\t\t}\n\t\tb.dst = b.dst[:b.RLESize]\n\t\tv := b.data[0]\n\t\tfor i := range b.dst {\n\t\t\tb.dst[i] = v\n\t\t}\n\t\thist.appendKeep(b.dst)\n\t\treturn nil\n\tcase blockTypeRaw:\n\t\thist.appendKeep(b.data)\n\t\treturn nil\n\tcase blockTypeCompressed:\n\t\tsaved := b.dst\n\t\t// Append directly to history\n\t\tif hist.ignoreBuffer == 0 {\n\t\t\tb.dst = hist.b\n\t\t\thist.b = nil\n\t\t} else {\n\t\t\tb.dst = b.dst[:0]\n\t\t}\n\t\terr := b.decodeCompressed(hist)\n\t\tif debugDecoder {\n\t\t\tprintln(\"Decompressed to total\", len(b.dst), \"bytes, hash:\", xxhash.Sum64(b.dst), \"error:\", err)\n\t\t}\n\t\tif hist.ignoreBuffer == 0 {\n\t\t\thist.b = b.dst\n\t\t\tb.dst = saved\n\t\t} else {\n\t\t\thist.appendKeep(b.dst)\n\t\t}\n\t\treturn err\n\tcase blockTypeReserved:\n\t\t// Used for returning errors.\n\t\treturn b.err\n\tdefault:\n\t\tpanic(\"Invalid block type\")\n\t}\n}\n\nfunc (b *blockDec) decodeLiterals(in []byte, hist *history) (remain []byte, err error) {\n\t// There must be at least one byte for Literals_Block_Type and one for Sequences_Section_Header\n\tif len(in) < 2 {\n\t\treturn in, ErrBlockTooSmall\n\t}\n\n\tlitType := literalsBlockType(in[0] & 3)\n\tvar litRegenSize int\n\tvar litCompSize int\n\tsizeFormat := (in[0] >> 2) & 3\n\tvar fourStreams bool\n\tvar literals []byte\n\tswitch litType {\n\tcase literalsBlockRaw, literalsBlockRLE:\n\t\tswitch sizeFormat {\n\t\tcase 0, 2:\n\t\t\t// Regenerated_Size uses 5 bits (0-31). Literals_Section_Header uses 1 byte.\n\t\t\tlitRegenSize = int(in[0] >> 3)\n\t\t\tin = in[1:]\n\t\tcase 1:\n\t\t\t// Regenerated_Size uses 12 bits (0-4095). Literals_Section_Header uses 2 bytes.\n\t\t\tlitRegenSize = int(in[0]>>4) + (int(in[1]) << 4)\n\t\t\tin = in[2:]\n\t\tcase 3:\n\t\t\t//  Regenerated_Size uses 20 bits (0-1048575). Literals_Section_Header uses 3 bytes.\n\t\t\tif len(in) < 3 {\n\t\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, len(in))\n\t\t\t\treturn in, ErrBlockTooSmall\n\t\t\t}\n\t\t\tlitRegenSize = int(in[0]>>4) + (int(in[1]) << 4) + (int(in[2]) << 12)\n\t\t\tin = in[3:]\n\t\t}\n\tcase literalsBlockCompressed, literalsBlockTreeless:\n\t\tswitch sizeFormat {\n\t\tcase 0, 1:\n\t\t\t// Both Regenerated_Size and Compressed_Size use 10 bits (0-1023).\n\t\t\tif len(in) < 3 {\n\t\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, len(in))\n\t\t\t\treturn in, ErrBlockTooSmall\n\t\t\t}\n\t\t\tn := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12)\n\t\t\tlitRegenSize = int(n & 1023)\n\t\t\tlitCompSize = int(n >> 10)\n\t\t\tfourStreams = sizeFormat == 1\n\t\t\tin = in[3:]\n\t\tcase 2:\n\t\t\tfourStreams = true\n\t\t\tif len(in) < 4 {\n\t\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, len(in))\n\t\t\t\treturn in, ErrBlockTooSmall\n\t\t\t}\n\t\t\tn := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12) + (uint64(in[3]) << 20)\n\t\t\tlitRegenSize = int(n & 16383)\n\t\t\tlitCompSize = int(n >> 14)\n\t\t\tin = in[4:]\n\t\tcase 3:\n\t\t\tfourStreams = true\n\t\t\tif len(in) < 5 {\n\t\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, len(in))\n\t\t\t\treturn in, ErrBlockTooSmall\n\t\t\t}\n\t\t\tn := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12) + (uint64(in[3]) << 20) + (uint64(in[4]) << 28)\n\t\t\tlitRegenSize = int(n & 262143)\n\t\t\tlitCompSize = int(n >> 18)\n\t\t\tin = in[5:]\n\t\t}\n\t}\n\tif debugDecoder {\n\t\tprintln(\"literals type:\", litType, \"litRegenSize:\", litRegenSize, \"litCompSize:\", litCompSize, \"sizeFormat:\", sizeFormat, \"4X:\", fourStreams)\n\t}\n\tif litRegenSize > int(b.WindowSize) || litRegenSize > maxCompressedBlockSize {\n\t\treturn in, ErrWindowSizeExceeded\n\t}\n\n\tswitch litType {\n\tcase literalsBlockRaw:\n\t\tif len(in) < litRegenSize {\n\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, \"remain:\", len(in), \"want:\", litRegenSize)\n\t\t\treturn in, ErrBlockTooSmall\n\t\t}\n\t\tliterals = in[:litRegenSize]\n\t\tin = in[litRegenSize:]\n\t\t//printf(\"Found %d uncompressed literals\\n\", litRegenSize)\n\tcase literalsBlockRLE:\n\t\tif len(in) < 1 {\n\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, \"remain:\", len(in), \"want:\", 1)\n\t\t\treturn in, ErrBlockTooSmall\n\t\t}\n\t\tif cap(b.literalBuf) < litRegenSize {\n\t\t\tif b.lowMem {\n\t\t\t\tb.literalBuf = make([]byte, litRegenSize, litRegenSize+compressedBlockOverAlloc)\n\t\t\t} else {\n\t\t\t\tb.literalBuf = make([]byte, litRegenSize, maxCompressedBlockSize+compressedBlockOverAlloc)\n\t\t\t}\n\t\t}\n\t\tliterals = b.literalBuf[:litRegenSize]\n\t\tv := in[0]\n\t\tfor i := range literals {\n\t\t\tliterals[i] = v\n\t\t}\n\t\tin = in[1:]\n\t\tif debugDecoder {\n\t\t\tprintf(\"Found %d RLE compressed literals\\n\", litRegenSize)\n\t\t}\n\tcase literalsBlockTreeless:\n\t\tif len(in) < litCompSize {\n\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, \"remain:\", len(in), \"want:\", litCompSize)\n\t\t\treturn in, ErrBlockTooSmall\n\t\t}\n\t\t// Store compressed literals, so we defer decoding until we get history.\n\t\tliterals = in[:litCompSize]\n\t\tin = in[litCompSize:]\n\t\tif debugDecoder {\n\t\t\tprintf(\"Found %d compressed literals\\n\", litCompSize)\n\t\t}\n\t\thuff := hist.huffTree\n\t\tif huff == nil {\n\t\t\treturn in, errors.New(\"literal block was treeless, but no history was defined\")\n\t\t}\n\t\t// Ensure we have space to store it.\n\t\tif cap(b.literalBuf) < litRegenSize {\n\t\t\tif b.lowMem {\n\t\t\t\tb.literalBuf = make([]byte, 0, litRegenSize+compressedBlockOverAlloc)\n\t\t\t} else {\n\t\t\t\tb.literalBuf = make([]byte, 0, maxCompressedBlockSize+compressedBlockOverAlloc)\n\t\t\t}\n\t\t}\n\t\tvar err error\n\t\t// Use our out buffer.\n\t\thuff.MaxDecodedSize = litRegenSize\n\t\tif fourStreams {\n\t\t\tliterals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals)\n\t\t} else {\n\t\t\tliterals, err = huff.Decoder().Decompress1X(b.literalBuf[:0:litRegenSize], literals)\n\t\t}\n\t\t// Make sure we don't leak our literals buffer\n\t\tif err != nil {\n\t\t\tprintln(\"decompressing literals:\", err)\n\t\t\treturn in, err\n\t\t}\n\t\tif len(literals) != litRegenSize {\n\t\t\treturn in, fmt.Errorf(\"literal output size mismatch want %d, got %d\", litRegenSize, len(literals))\n\t\t}\n\n\tcase literalsBlockCompressed:\n\t\tif len(in) < litCompSize {\n\t\t\tprintln(\"too small: litType:\", litType, \" sizeFormat\", sizeFormat, \"remain:\", len(in), \"want:\", litCompSize)\n\t\t\treturn in, ErrBlockTooSmall\n\t\t}\n\t\tliterals = in[:litCompSize]\n\t\tin = in[litCompSize:]\n\t\t// Ensure we have space to store it.\n\t\tif cap(b.literalBuf) < litRegenSize {\n\t\t\tif b.lowMem {\n\t\t\t\tb.literalBuf = make([]byte, 0, litRegenSize+compressedBlockOverAlloc)\n\t\t\t} else {\n\t\t\t\tb.literalBuf = make([]byte, 0, maxCompressedBlockSize+compressedBlockOverAlloc)\n\t\t\t}\n\t\t}\n\t\thuff := hist.huffTree\n\t\tif huff == nil || (hist.dict != nil && huff == hist.dict.litEnc) {\n\t\t\thuff = huffDecoderPool.Get().(*huff0.Scratch)\n\t\t\tif huff == nil {\n\t\t\t\thuff = &huff0.Scratch{}\n\t\t\t}\n\t\t}\n\t\tvar err error\n\t\tif debugDecoder {\n\t\t\tprintln(\"huff table input:\", len(literals), \"CRC:\", crc32.ChecksumIEEE(literals))\n\t\t}\n\t\thuff, literals, err = huff0.ReadTable(literals, huff)\n\t\tif err != nil {\n\t\t\tprintln(\"reading huffman table:\", err)\n\t\t\treturn in, err\n\t\t}\n\t\thist.huffTree = huff\n\t\thuff.MaxDecodedSize = litRegenSize\n\t\t// Use our out buffer.\n\t\tif fourStreams {\n\t\t\tliterals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals)\n\t\t} else {\n\t\t\tliterals, err = huff.Decoder().Decompress1X(b.literalBuf[:0:litRegenSize], literals)\n\t\t}\n\t\tif err != nil {\n\t\t\tprintln(\"decoding compressed literals:\", err)\n\t\t\treturn in, err\n\t\t}\n\t\t// Make sure we don't leak our literals buffer\n\t\tif len(literals) != litRegenSize {\n\t\t\treturn in, fmt.Errorf(\"literal output size mismatch want %d, got %d\", litRegenSize, len(literals))\n\t\t}\n\t\t// Re-cap to get extra size.\n\t\tliterals = b.literalBuf[:len(literals)]\n\t\tif debugDecoder {\n\t\t\tprintf(\"Decompressed %d literals into %d bytes\\n\", litCompSize, litRegenSize)\n\t\t}\n\t}\n\thist.decoders.literals = literals\n\treturn in, nil\n}\n\n// decodeCompressed will start decompressing a block.\nfunc (b *blockDec) decodeCompressed(hist *history) error {\n\tin := b.data\n\tin, err := b.decodeLiterals(in, hist)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = b.prepareSequences(in, hist)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif hist.decoders.nSeqs == 0 {\n\t\tb.dst = append(b.dst, hist.decoders.literals...)\n\t\treturn nil\n\t}\n\tbefore := len(hist.decoders.out)\n\terr = hist.decoders.decodeSync(hist.b[hist.ignoreBuffer:])\n\tif err != nil {\n\t\treturn err\n\t}\n\tif hist.decoders.maxSyncLen > 0 {\n\t\thist.decoders.maxSyncLen += uint64(before)\n\t\thist.decoders.maxSyncLen -= uint64(len(hist.decoders.out))\n\t}\n\tb.dst = hist.decoders.out\n\thist.recentOffsets = hist.decoders.prevOffset\n\treturn nil\n}\n\nfunc (b *blockDec) prepareSequences(in []byte, hist *history) (err error) {\n\tif debugDecoder {\n\t\tprintf(\"prepareSequences: %d byte(s) input\\n\", len(in))\n\t}\n\t// Decode Sequences\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#sequences-section\n\tif len(in) < 1 {\n\t\treturn ErrBlockTooSmall\n\t}\n\tvar nSeqs int\n\tseqHeader := in[0]\n\tswitch {\n\tcase seqHeader < 128:\n\t\tnSeqs = int(seqHeader)\n\t\tin = in[1:]\n\tcase seqHeader < 255:\n\t\tif len(in) < 2 {\n\t\t\treturn ErrBlockTooSmall\n\t\t}\n\t\tnSeqs = int(seqHeader-128)<<8 | int(in[1])\n\t\tin = in[2:]\n\tcase seqHeader == 255:\n\t\tif len(in) < 3 {\n\t\t\treturn ErrBlockTooSmall\n\t\t}\n\t\tnSeqs = 0x7f00 + int(in[1]) + (int(in[2]) << 8)\n\t\tin = in[3:]\n\t}\n\tif nSeqs == 0 && len(in) != 0 {\n\t\t// When no sequences, there should not be any more data...\n\t\tif debugDecoder {\n\t\t\tprintf(\"prepareSequences: 0 sequences, but %d byte(s) left on stream\\n\", len(in))\n\t\t}\n\t\treturn ErrUnexpectedBlockSize\n\t}\n\n\tvar seqs = &hist.decoders\n\tseqs.nSeqs = nSeqs\n\tif nSeqs > 0 {\n\t\tif len(in) < 1 {\n\t\t\treturn ErrBlockTooSmall\n\t\t}\n\t\tbr := byteReader{b: in, off: 0}\n\t\tcompMode := br.Uint8()\n\t\tbr.advance(1)\n\t\tif debugDecoder {\n\t\t\tprintf(\"Compression modes: 0b%b\", compMode)\n\t\t}\n\t\tif compMode&3 != 0 {\n\t\t\treturn errors.New(\"corrupt block: reserved bits not zero\")\n\t\t}\n\t\tfor i := range uint(3) {\n\t\t\tmode := seqCompMode((compMode >> (6 - i*2)) & 3)\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"Table\", tableIndex(i), \"is\", mode)\n\t\t\t}\n\t\t\tvar seq *sequenceDec\n\t\t\tswitch tableIndex(i) {\n\t\t\tcase tableLiteralLengths:\n\t\t\t\tseq = &seqs.litLengths\n\t\t\tcase tableOffsets:\n\t\t\t\tseq = &seqs.offsets\n\t\t\tcase tableMatchLengths:\n\t\t\t\tseq = &seqs.matchLengths\n\t\t\tdefault:\n\t\t\t\tpanic(\"unknown table\")\n\t\t\t}\n\t\t\tswitch mode {\n\t\t\tcase compModePredefined:\n\t\t\t\tif seq.fse != nil && !seq.fse.preDefined {\n\t\t\t\t\tfseDecoderPool.Put(seq.fse)\n\t\t\t\t}\n\t\t\t\tseq.fse = &fsePredef[i]\n\t\t\tcase compModeRLE:\n\t\t\t\tif br.remain() < 1 {\n\t\t\t\t\treturn ErrBlockTooSmall\n\t\t\t\t}\n\t\t\t\tv := br.Uint8()\n\t\t\t\tbr.advance(1)\n\t\t\t\tif seq.fse == nil || seq.fse.preDefined {\n\t\t\t\t\tseq.fse = fseDecoderPool.Get().(*fseDecoder)\n\t\t\t\t}\n\t\t\t\tsymb, err := decSymbolValue(v, symbolTableX[i])\n\t\t\t\tif err != nil {\n\t\t\t\t\tprintf(\"RLE Transform table (%v) error: %v\", tableIndex(i), err)\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tseq.fse.setRLE(symb)\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintf(\"RLE set to 0x%x, code: %v\", symb, v)\n\t\t\t\t}\n\t\t\tcase compModeFSE:\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"Reading table for\", tableIndex(i))\n\t\t\t\t}\n\t\t\t\tif seq.fse == nil || seq.fse.preDefined {\n\t\t\t\t\tseq.fse = fseDecoderPool.Get().(*fseDecoder)\n\t\t\t\t}\n\t\t\t\terr := seq.fse.readNCount(&br, uint16(maxTableSymbol[i]))\n\t\t\t\tif err != nil {\n\t\t\t\t\tprintln(\"Read table error:\", err)\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\terr = seq.fse.transform(symbolTableX[i])\n\t\t\t\tif err != nil {\n\t\t\t\t\tprintln(\"Transform table error:\", err)\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"Read table ok\", \"symbolLen:\", seq.fse.symbolLen)\n\t\t\t\t}\n\t\t\tcase compModeRepeat:\n\t\t\t\tseq.repeat = true\n\t\t\t}\n\t\t\tif br.overread() {\n\t\t\t\treturn io.ErrUnexpectedEOF\n\t\t\t}\n\t\t}\n\t\tin = br.unread()\n\t}\n\tif debugDecoder {\n\t\tprintln(\"Literals:\", len(seqs.literals), \"hash:\", xxhash.Sum64(seqs.literals), \"and\", seqs.nSeqs, \"sequences.\")\n\t}\n\n\tif nSeqs == 0 {\n\t\tif len(b.sequence) > 0 {\n\t\t\tb.sequence = b.sequence[:0]\n\t\t}\n\t\treturn nil\n\t}\n\tbr := seqs.br\n\tif br == nil {\n\t\tbr = &bitReader{}\n\t}\n\tif err := br.init(in); err != nil {\n\t\treturn err\n\t}\n\n\tif err := seqs.initialize(br, hist, b.dst); err != nil {\n\t\tprintln(\"initializing sequences:\", err)\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (b *blockDec) decodeSequences(hist *history) error {\n\tif cap(b.sequence) < hist.decoders.nSeqs {\n\t\tif b.lowMem {\n\t\t\tb.sequence = make([]seqVals, 0, hist.decoders.nSeqs)\n\t\t} else {\n\t\t\tb.sequence = make([]seqVals, 0, 0x7F00+0xffff)\n\t\t}\n\t}\n\tb.sequence = b.sequence[:hist.decoders.nSeqs]\n\tif hist.decoders.nSeqs == 0 {\n\t\thist.decoders.seqSize = len(hist.decoders.literals)\n\t\treturn nil\n\t}\n\thist.decoders.windowSize = hist.windowSize\n\thist.decoders.prevOffset = hist.recentOffsets\n\n\terr := hist.decoders.decode(b.sequence)\n\thist.recentOffsets = hist.decoders.prevOffset\n\treturn err\n}\n\nfunc (b *blockDec) executeSequences(hist *history) error {\n\thbytes := hist.b\n\tif len(hbytes) > hist.windowSize {\n\t\thbytes = hbytes[len(hbytes)-hist.windowSize:]\n\t\t// We do not need history anymore.\n\t\tif hist.dict != nil {\n\t\t\thist.dict.content = nil\n\t\t}\n\t}\n\thist.decoders.windowSize = hist.windowSize\n\thist.decoders.out = b.dst[:0]\n\terr := hist.decoders.execute(b.sequence, hbytes)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn b.updateHistory(hist)\n}\n\nfunc (b *blockDec) updateHistory(hist *history) error {\n\tif len(b.data) > maxCompressedBlockSize {\n\t\treturn fmt.Errorf(\"compressed block size too large (%d)\", len(b.data))\n\t}\n\t// Set output and release references.\n\tb.dst = hist.decoders.out\n\thist.recentOffsets = hist.decoders.prevOffset\n\n\tif b.Last {\n\t\t// if last block we don't care about history.\n\t\tprintln(\"Last block, no history returned\")\n\t\thist.b = hist.b[:0]\n\t\treturn nil\n\t} else {\n\t\thist.append(b.dst)\n\t\tif debugDecoder {\n\t\t\tprintln(\"Finished block with \", len(b.sequence), \"sequences. Added\", len(b.dst), \"to history, now length\", len(hist.b))\n\t\t}\n\t}\n\thist.decoders.out, hist.decoders.literals = nil, nil\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/blockenc.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"math/bits\"\n\t\"slices\"\n\n\t\"github.com/klauspost/compress/huff0\"\n)\n\ntype blockEnc struct {\n\tsize       int\n\tliterals   []byte\n\tsequences  []seq\n\tcoders     seqCoders\n\tlitEnc     *huff0.Scratch\n\tdictLitEnc *huff0.Scratch\n\twr         bitWriter\n\n\textraLits         int\n\toutput            []byte\n\trecentOffsets     [3]uint32\n\tprevRecentOffsets [3]uint32\n\n\tlast   bool\n\tlowMem bool\n}\n\n// init should be used once the block has been created.\n// If called more than once, the effect is the same as calling reset.\nfunc (b *blockEnc) init() {\n\tif b.lowMem {\n\t\t// 1K literals\n\t\tif cap(b.literals) < 1<<10 {\n\t\t\tb.literals = make([]byte, 0, 1<<10)\n\t\t}\n\t\tconst defSeqs = 20\n\t\tif cap(b.sequences) < defSeqs {\n\t\t\tb.sequences = make([]seq, 0, defSeqs)\n\t\t}\n\t\t// 1K\n\t\tif cap(b.output) < 1<<10 {\n\t\t\tb.output = make([]byte, 0, 1<<10)\n\t\t}\n\t} else {\n\t\tif cap(b.literals) < maxCompressedBlockSize {\n\t\t\tb.literals = make([]byte, 0, maxCompressedBlockSize)\n\t\t}\n\t\tconst defSeqs = 2000\n\t\tif cap(b.sequences) < defSeqs {\n\t\t\tb.sequences = make([]seq, 0, defSeqs)\n\t\t}\n\t\tif cap(b.output) < maxCompressedBlockSize {\n\t\t\tb.output = make([]byte, 0, maxCompressedBlockSize)\n\t\t}\n\t}\n\n\tif b.coders.mlEnc == nil {\n\t\tb.coders.mlEnc = &fseEncoder{}\n\t\tb.coders.mlPrev = &fseEncoder{}\n\t\tb.coders.ofEnc = &fseEncoder{}\n\t\tb.coders.ofPrev = &fseEncoder{}\n\t\tb.coders.llEnc = &fseEncoder{}\n\t\tb.coders.llPrev = &fseEncoder{}\n\t}\n\tb.litEnc = &huff0.Scratch{WantLogLess: 4}\n\tb.reset(nil)\n}\n\n// initNewEncode can be used to reset offsets and encoders to the initial state.\nfunc (b *blockEnc) initNewEncode() {\n\tb.recentOffsets = [3]uint32{1, 4, 8}\n\tb.litEnc.Reuse = huff0.ReusePolicyNone\n\tb.coders.setPrev(nil, nil, nil)\n}\n\n// reset will reset the block for a new encode, but in the same stream,\n// meaning that state will be carried over, but the block content is reset.\n// If a previous block is provided, the recent offsets are carried over.\nfunc (b *blockEnc) reset(prev *blockEnc) {\n\tb.extraLits = 0\n\tb.literals = b.literals[:0]\n\tb.size = 0\n\tb.sequences = b.sequences[:0]\n\tb.output = b.output[:0]\n\tb.last = false\n\tif prev != nil {\n\t\tb.recentOffsets = prev.prevRecentOffsets\n\t}\n\tb.dictLitEnc = nil\n}\n\n// reset will reset the block for a new encode, but in the same stream,\n// meaning that state will be carried over, but the block content is reset.\n// If a previous block is provided, the recent offsets are carried over.\nfunc (b *blockEnc) swapEncoders(prev *blockEnc) {\n\tb.coders.swap(&prev.coders)\n\tb.litEnc, prev.litEnc = prev.litEnc, b.litEnc\n}\n\n// blockHeader contains the information for a block header.\ntype blockHeader uint32\n\n// setLast sets the 'last' indicator on a block.\nfunc (h *blockHeader) setLast(b bool) {\n\tif b {\n\t\t*h = *h | 1\n\t} else {\n\t\tconst mask = (1 << 24) - 2\n\t\t*h = *h & mask\n\t}\n}\n\n// setSize will store the compressed size of a block.\nfunc (h *blockHeader) setSize(v uint32) {\n\tconst mask = 7\n\t*h = (*h)&mask | blockHeader(v<<3)\n}\n\n// setType sets the block type.\nfunc (h *blockHeader) setType(t blockType) {\n\tconst mask = 1 | (((1 << 24) - 1) ^ 7)\n\t*h = (*h & mask) | blockHeader(t<<1)\n}\n\n// appendTo will append the block header to a slice.\nfunc (h blockHeader) appendTo(b []byte) []byte {\n\treturn append(b, uint8(h), uint8(h>>8), uint8(h>>16))\n}\n\n// String returns a string representation of the block.\nfunc (h blockHeader) String() string {\n\treturn fmt.Sprintf(\"Type: %d, Size: %d, Last:%t\", (h>>1)&3, h>>3, h&1 == 1)\n}\n\n// literalsHeader contains literals header information.\ntype literalsHeader uint64\n\n// setType can be used to set the type of literal block.\nfunc (h *literalsHeader) setType(t literalsBlockType) {\n\tconst mask = math.MaxUint64 - 3\n\t*h = (*h & mask) | literalsHeader(t)\n}\n\n// setSize can be used to set a single size, for uncompressed and RLE content.\nfunc (h *literalsHeader) setSize(regenLen int) {\n\tinBits := bits.Len32(uint32(regenLen))\n\t// Only retain 2 bits\n\tconst mask = 3\n\tlh := uint64(*h & mask)\n\tswitch {\n\tcase inBits < 5:\n\t\tlh |= (uint64(regenLen) << 3) | (1 << 60)\n\t\tif debugEncoder {\n\t\t\tgot := int(lh>>3) & 0xff\n\t\t\tif got != regenLen {\n\t\t\t\tpanic(fmt.Sprint(\"litRegenSize = \", regenLen, \"(want) != \", got, \"(got)\"))\n\t\t\t}\n\t\t}\n\tcase inBits < 12:\n\t\tlh |= (1 << 2) | (uint64(regenLen) << 4) | (2 << 60)\n\tcase inBits < 20:\n\t\tlh |= (3 << 2) | (uint64(regenLen) << 4) | (3 << 60)\n\tdefault:\n\t\tpanic(fmt.Errorf(\"internal error: block too big (%d)\", regenLen))\n\t}\n\t*h = literalsHeader(lh)\n}\n\n// setSizes will set the size of a compressed literals section and the input length.\nfunc (h *literalsHeader) setSizes(compLen, inLen int, single bool) {\n\tcompBits, inBits := bits.Len32(uint32(compLen)), bits.Len32(uint32(inLen))\n\t// Only retain 2 bits\n\tconst mask = 3\n\tlh := uint64(*h & mask)\n\tswitch {\n\tcase compBits <= 10 && inBits <= 10:\n\t\tif !single {\n\t\t\tlh |= 1 << 2\n\t\t}\n\t\tlh |= (uint64(inLen) << 4) | (uint64(compLen) << (10 + 4)) | (3 << 60)\n\t\tif debugEncoder {\n\t\t\tconst mmask = (1 << 24) - 1\n\t\t\tn := (lh >> 4) & mmask\n\t\t\tif int(n&1023) != inLen {\n\t\t\t\tpanic(fmt.Sprint(\"regensize:\", int(n&1023), \"!=\", inLen, inBits))\n\t\t\t}\n\t\t\tif int(n>>10) != compLen {\n\t\t\t\tpanic(fmt.Sprint(\"compsize:\", int(n>>10), \"!=\", compLen, compBits))\n\t\t\t}\n\t\t}\n\tcase compBits <= 14 && inBits <= 14:\n\t\tlh |= (2 << 2) | (uint64(inLen) << 4) | (uint64(compLen) << (14 + 4)) | (4 << 60)\n\t\tif single {\n\t\t\tpanic(\"single stream used with more than 10 bits length.\")\n\t\t}\n\tcase compBits <= 18 && inBits <= 18:\n\t\tlh |= (3 << 2) | (uint64(inLen) << 4) | (uint64(compLen) << (18 + 4)) | (5 << 60)\n\t\tif single {\n\t\t\tpanic(\"single stream used with more than 10 bits length.\")\n\t\t}\n\tdefault:\n\t\tpanic(\"internal error: block too big\")\n\t}\n\t*h = literalsHeader(lh)\n}\n\n// appendTo will append the literals header to a byte slice.\nfunc (h literalsHeader) appendTo(b []byte) []byte {\n\tsize := uint8(h >> 60)\n\tswitch size {\n\tcase 1:\n\t\tb = append(b, uint8(h))\n\tcase 2:\n\t\tb = append(b, uint8(h), uint8(h>>8))\n\tcase 3:\n\t\tb = append(b, uint8(h), uint8(h>>8), uint8(h>>16))\n\tcase 4:\n\t\tb = append(b, uint8(h), uint8(h>>8), uint8(h>>16), uint8(h>>24))\n\tcase 5:\n\t\tb = append(b, uint8(h), uint8(h>>8), uint8(h>>16), uint8(h>>24), uint8(h>>32))\n\tdefault:\n\t\tpanic(fmt.Errorf(\"internal error: literalsHeader has invalid size (%d)\", size))\n\t}\n\treturn b\n}\n\n// size returns the output size with currently set values.\nfunc (h literalsHeader) size() int {\n\treturn int(h >> 60)\n}\n\nfunc (h literalsHeader) String() string {\n\treturn fmt.Sprintf(\"Type: %d, SizeFormat: %d, Size: 0x%d, Bytes:%d\", literalsBlockType(h&3), (h>>2)&3, h&((1<<60)-1)>>4, h>>60)\n}\n\n// pushOffsets will push the recent offsets to the backup store.\nfunc (b *blockEnc) pushOffsets() {\n\tb.prevRecentOffsets = b.recentOffsets\n}\n\n// pushOffsets will push the recent offsets to the backup store.\nfunc (b *blockEnc) popOffsets() {\n\tb.recentOffsets = b.prevRecentOffsets\n}\n\n// matchOffset will adjust recent offsets and return the adjusted one,\n// if it matches a previous offset.\nfunc (b *blockEnc) matchOffset(offset, lits uint32) uint32 {\n\t// Check if offset is one of the recent offsets.\n\t// Adjusts the output offset accordingly.\n\t// Gives a tiny bit of compression, typically around 1%.\n\tif true {\n\t\tif lits > 0 {\n\t\t\tswitch offset {\n\t\t\tcase b.recentOffsets[0]:\n\t\t\t\toffset = 1\n\t\t\tcase b.recentOffsets[1]:\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset = 2\n\t\t\tcase b.recentOffsets[2]:\n\t\t\t\tb.recentOffsets[2] = b.recentOffsets[1]\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset = 3\n\t\t\tdefault:\n\t\t\t\tb.recentOffsets[2] = b.recentOffsets[1]\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset += 3\n\t\t\t}\n\t\t} else {\n\t\t\tswitch offset {\n\t\t\tcase b.recentOffsets[1]:\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset = 1\n\t\t\tcase b.recentOffsets[2]:\n\t\t\t\tb.recentOffsets[2] = b.recentOffsets[1]\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset = 2\n\t\t\tcase b.recentOffsets[0] - 1:\n\t\t\t\tb.recentOffsets[2] = b.recentOffsets[1]\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset = 3\n\t\t\tdefault:\n\t\t\t\tb.recentOffsets[2] = b.recentOffsets[1]\n\t\t\t\tb.recentOffsets[1] = b.recentOffsets[0]\n\t\t\t\tb.recentOffsets[0] = offset\n\t\t\t\toffset += 3\n\t\t\t}\n\t\t}\n\t} else {\n\t\toffset += 3\n\t}\n\treturn offset\n}\n\n// encodeRaw can be used to set the output to a raw representation of supplied bytes.\nfunc (b *blockEnc) encodeRaw(a []byte) {\n\tvar bh blockHeader\n\tbh.setLast(b.last)\n\tbh.setSize(uint32(len(a)))\n\tbh.setType(blockTypeRaw)\n\tb.output = bh.appendTo(b.output[:0])\n\tb.output = append(b.output, a...)\n\tif debugEncoder {\n\t\tprintln(\"Adding RAW block, length\", len(a), \"last:\", b.last)\n\t}\n}\n\n// encodeRaw can be used to set the output to a raw representation of supplied bytes.\nfunc (b *blockEnc) encodeRawTo(dst, src []byte) []byte {\n\tvar bh blockHeader\n\tbh.setLast(b.last)\n\tbh.setSize(uint32(len(src)))\n\tbh.setType(blockTypeRaw)\n\tdst = bh.appendTo(dst)\n\tdst = append(dst, src...)\n\tif debugEncoder {\n\t\tprintln(\"Adding RAW block, length\", len(src), \"last:\", b.last)\n\t}\n\treturn dst\n}\n\n// encodeLits can be used if the block is only litLen.\nfunc (b *blockEnc) encodeLits(lits []byte, raw bool) error {\n\tvar bh blockHeader\n\tbh.setLast(b.last)\n\tbh.setSize(uint32(len(lits)))\n\n\t// Don't compress extremely small blocks\n\tif len(lits) < 8 || (len(lits) < 32 && b.dictLitEnc == nil) || raw {\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding RAW block, length\", len(lits), \"last:\", b.last)\n\t\t}\n\t\tbh.setType(blockTypeRaw)\n\t\tb.output = bh.appendTo(b.output)\n\t\tb.output = append(b.output, lits...)\n\t\treturn nil\n\t}\n\n\tvar (\n\t\tout            []byte\n\t\treUsed, single bool\n\t\terr            error\n\t)\n\tif b.dictLitEnc != nil {\n\t\tb.litEnc.TransferCTable(b.dictLitEnc)\n\t\tb.litEnc.Reuse = huff0.ReusePolicyAllow\n\t\tb.dictLitEnc = nil\n\t}\n\tif len(lits) >= 1024 {\n\t\t// Use 4 Streams.\n\t\tout, reUsed, err = huff0.Compress4X(lits, b.litEnc)\n\t} else if len(lits) > 16 {\n\t\t// Use 1 stream\n\t\tsingle = true\n\t\tout, reUsed, err = huff0.Compress1X(lits, b.litEnc)\n\t} else {\n\t\terr = huff0.ErrIncompressible\n\t}\n\tif err == nil && len(out)+5 > len(lits) {\n\t\t// If we are close, we may still be worse or equal to raw.\n\t\tvar lh literalsHeader\n\t\tlh.setSizes(len(out), len(lits), single)\n\t\tif len(out)+lh.size() >= len(lits) {\n\t\t\terr = huff0.ErrIncompressible\n\t\t}\n\t}\n\tswitch err {\n\tcase huff0.ErrIncompressible:\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding RAW block, length\", len(lits), \"last:\", b.last)\n\t\t}\n\t\tbh.setType(blockTypeRaw)\n\t\tb.output = bh.appendTo(b.output)\n\t\tb.output = append(b.output, lits...)\n\t\treturn nil\n\tcase huff0.ErrUseRLE:\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding RLE block, length\", len(lits))\n\t\t}\n\t\tbh.setType(blockTypeRLE)\n\t\tb.output = bh.appendTo(b.output)\n\t\tb.output = append(b.output, lits[0])\n\t\treturn nil\n\tcase nil:\n\tdefault:\n\t\treturn err\n\t}\n\t// Compressed...\n\t// Now, allow reuse\n\tb.litEnc.Reuse = huff0.ReusePolicyAllow\n\tbh.setType(blockTypeCompressed)\n\tvar lh literalsHeader\n\tif reUsed {\n\t\tif debugEncoder {\n\t\t\tprintln(\"Reused tree, compressed to\", len(out))\n\t\t}\n\t\tlh.setType(literalsBlockTreeless)\n\t} else {\n\t\tif debugEncoder {\n\t\t\tprintln(\"New tree, compressed to\", len(out), \"tree size:\", len(b.litEnc.OutTable))\n\t\t}\n\t\tlh.setType(literalsBlockCompressed)\n\t}\n\t// Set sizes\n\tlh.setSizes(len(out), len(lits), single)\n\tbh.setSize(uint32(len(out) + lh.size() + 1))\n\n\t// Write block headers.\n\tb.output = bh.appendTo(b.output)\n\tb.output = lh.appendTo(b.output)\n\t// Add compressed data.\n\tb.output = append(b.output, out...)\n\t// No sequences.\n\tb.output = append(b.output, 0)\n\treturn nil\n}\n\n// encodeRLE will encode an RLE block.\nfunc (b *blockEnc) encodeRLE(val byte, length uint32) {\n\tvar bh blockHeader\n\tbh.setLast(b.last)\n\tbh.setSize(length)\n\tbh.setType(blockTypeRLE)\n\tb.output = bh.appendTo(b.output)\n\tb.output = append(b.output, val)\n}\n\n// fuzzFseEncoder can be used to fuzz the FSE encoder.\nfunc fuzzFseEncoder(data []byte) int {\n\tif len(data) > maxSequences || len(data) < 2 {\n\t\treturn 0\n\t}\n\tenc := fseEncoder{}\n\thist := enc.Histogram()\n\tmaxSym := uint8(0)\n\tfor i, v := range data {\n\t\tv = v & 63\n\t\tdata[i] = v\n\t\thist[v]++\n\t\tif v > maxSym {\n\t\t\tmaxSym = v\n\t\t}\n\t}\n\tif maxSym == 0 {\n\t\t// All 0\n\t\treturn 0\n\t}\n\tcnt := int(slices.Max(hist[:maxSym]))\n\tif cnt == len(data) {\n\t\t// RLE\n\t\treturn 0\n\t}\n\tenc.HistogramFinished(maxSym, cnt)\n\terr := enc.normalizeCount(len(data))\n\tif err != nil {\n\t\treturn 0\n\t}\n\t_, err = enc.writeCount(nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn 1\n}\n\n// encode will encode the block and append the output in b.output.\n// Previous offset codes must be pushed if more blocks are expected.\nfunc (b *blockEnc) encode(org []byte, raw, rawAllLits bool) error {\n\tif len(b.sequences) == 0 {\n\t\treturn b.encodeLits(b.literals, rawAllLits)\n\t}\n\tif len(b.sequences) == 1 && len(org) > 0 && len(b.literals) <= 1 {\n\t\t// Check common RLE cases.\n\t\tseq := b.sequences[0]\n\t\tif seq.litLen == uint32(len(b.literals)) && seq.offset-3 == 1 {\n\t\t\t// Offset == 1 and 0 or 1 literals.\n\t\t\tb.encodeRLE(org[0], b.sequences[0].matchLen+zstdMinMatch+seq.litLen)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\t// We want some difference to at least account for the headers.\n\tsaved := b.size - len(b.literals) - (b.size >> 6)\n\tif saved < 16 {\n\t\tif org == nil {\n\t\t\treturn errIncompressible\n\t\t}\n\t\tb.popOffsets()\n\t\treturn b.encodeLits(org, rawAllLits)\n\t}\n\n\tvar bh blockHeader\n\tvar lh literalsHeader\n\tbh.setLast(b.last)\n\tbh.setType(blockTypeCompressed)\n\t// Store offset of the block header. Needed when we know the size.\n\tbhOffset := len(b.output)\n\tb.output = bh.appendTo(b.output)\n\n\tvar (\n\t\tout            []byte\n\t\treUsed, single bool\n\t\terr            error\n\t)\n\tif b.dictLitEnc != nil {\n\t\tb.litEnc.TransferCTable(b.dictLitEnc)\n\t\tb.litEnc.Reuse = huff0.ReusePolicyAllow\n\t\tb.dictLitEnc = nil\n\t}\n\tif len(b.literals) >= 1024 && !raw {\n\t\t// Use 4 Streams.\n\t\tout, reUsed, err = huff0.Compress4X(b.literals, b.litEnc)\n\t} else if len(b.literals) > 16 && !raw {\n\t\t// Use 1 stream\n\t\tsingle = true\n\t\tout, reUsed, err = huff0.Compress1X(b.literals, b.litEnc)\n\t} else {\n\t\terr = huff0.ErrIncompressible\n\t}\n\n\tif err == nil && len(out)+5 > len(b.literals) {\n\t\t// If we are close, we may still be worse or equal to raw.\n\t\tvar lh literalsHeader\n\t\tlh.setSize(len(b.literals))\n\t\tszRaw := lh.size()\n\t\tlh.setSizes(len(out), len(b.literals), single)\n\t\tszComp := lh.size()\n\t\tif len(out)+szComp >= len(b.literals)+szRaw {\n\t\t\terr = huff0.ErrIncompressible\n\t\t}\n\t}\n\tswitch err {\n\tcase huff0.ErrIncompressible:\n\t\tlh.setType(literalsBlockRaw)\n\t\tlh.setSize(len(b.literals))\n\t\tb.output = lh.appendTo(b.output)\n\t\tb.output = append(b.output, b.literals...)\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding literals RAW, length\", len(b.literals))\n\t\t}\n\tcase huff0.ErrUseRLE:\n\t\tlh.setType(literalsBlockRLE)\n\t\tlh.setSize(len(b.literals))\n\t\tb.output = lh.appendTo(b.output)\n\t\tb.output = append(b.output, b.literals[0])\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding literals RLE\")\n\t\t}\n\tcase nil:\n\t\t// Compressed litLen...\n\t\tif reUsed {\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"reused tree\")\n\t\t\t}\n\t\t\tlh.setType(literalsBlockTreeless)\n\t\t} else {\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"new tree, size:\", len(b.litEnc.OutTable))\n\t\t\t}\n\t\t\tlh.setType(literalsBlockCompressed)\n\t\t\tif debugEncoder {\n\t\t\t\t_, _, err := huff0.ReadTable(out, nil)\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlh.setSizes(len(out), len(b.literals), single)\n\t\tif debugEncoder {\n\t\t\tprintf(\"Compressed %d literals to %d bytes\", len(b.literals), len(out))\n\t\t\tprintln(\"Adding literal header:\", lh)\n\t\t}\n\t\tb.output = lh.appendTo(b.output)\n\t\tb.output = append(b.output, out...)\n\t\tb.litEnc.Reuse = huff0.ReusePolicyAllow\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding literals compressed\")\n\t\t}\n\tdefault:\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding literals ERROR:\", err)\n\t\t}\n\t\treturn err\n\t}\n\t// Sequence compression\n\n\t// Write the number of sequences\n\tswitch {\n\tcase len(b.sequences) < 128:\n\t\tb.output = append(b.output, uint8(len(b.sequences)))\n\tcase len(b.sequences) < 0x7f00: // TODO: this could be wrong\n\t\tn := len(b.sequences)\n\t\tb.output = append(b.output, 128+uint8(n>>8), uint8(n))\n\tdefault:\n\t\tn := len(b.sequences) - 0x7f00\n\t\tb.output = append(b.output, 255, uint8(n), uint8(n>>8))\n\t}\n\tif debugEncoder {\n\t\tprintln(\"Encoding\", len(b.sequences), \"sequences\")\n\t}\n\tb.genCodes()\n\tllEnc := b.coders.llEnc\n\tofEnc := b.coders.ofEnc\n\tmlEnc := b.coders.mlEnc\n\terr = llEnc.normalizeCount(len(b.sequences))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ofEnc.normalizeCount(len(b.sequences))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = mlEnc.normalizeCount(len(b.sequences))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Choose the best compression mode for each type.\n\t// Will evaluate the new vs predefined and previous.\n\tchooseComp := func(cur, prev, preDef *fseEncoder) (*fseEncoder, seqCompMode) {\n\t\t// See if predefined/previous is better\n\t\thist := cur.count[:cur.symbolLen]\n\t\tnSize := cur.approxSize(hist) + cur.maxHeaderSize()\n\t\tpredefSize := preDef.approxSize(hist)\n\t\tprevSize := prev.approxSize(hist)\n\n\t\t// Add a small penalty for new encoders.\n\t\t// Don't bother with extremely small (<2 byte gains).\n\t\tnSize = nSize + (nSize+2*8*16)>>4\n\t\tswitch {\n\t\tcase predefSize <= prevSize && predefSize <= nSize || forcePreDef:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"Using predefined\", predefSize>>3, \"<=\", nSize>>3)\n\t\t\t}\n\t\t\treturn preDef, compModePredefined\n\t\tcase prevSize <= nSize:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"Using previous\", prevSize>>3, \"<=\", nSize>>3)\n\t\t\t}\n\t\t\treturn prev, compModeRepeat\n\t\tdefault:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"Using new, predef\", predefSize>>3, \". previous:\", prevSize>>3, \">\", nSize>>3, \"header max:\", cur.maxHeaderSize()>>3, \"bytes\")\n\t\t\t\tprintln(\"tl:\", cur.actualTableLog, \"symbolLen:\", cur.symbolLen, \"norm:\", cur.norm[:cur.symbolLen], \"hist\", cur.count[:cur.symbolLen])\n\t\t\t}\n\t\t\treturn cur, compModeFSE\n\t\t}\n\t}\n\n\t// Write compression mode\n\tvar mode uint8\n\tif llEnc.useRLE {\n\t\tmode |= uint8(compModeRLE) << 6\n\t\tllEnc.setRLE(b.sequences[0].llCode)\n\t\tif debugEncoder {\n\t\t\tprintln(\"llEnc.useRLE\")\n\t\t}\n\t} else {\n\t\tvar m seqCompMode\n\t\tllEnc, m = chooseComp(llEnc, b.coders.llPrev, &fsePredefEnc[tableLiteralLengths])\n\t\tmode |= uint8(m) << 6\n\t}\n\tif ofEnc.useRLE {\n\t\tmode |= uint8(compModeRLE) << 4\n\t\tofEnc.setRLE(b.sequences[0].ofCode)\n\t\tif debugEncoder {\n\t\t\tprintln(\"ofEnc.useRLE\")\n\t\t}\n\t} else {\n\t\tvar m seqCompMode\n\t\tofEnc, m = chooseComp(ofEnc, b.coders.ofPrev, &fsePredefEnc[tableOffsets])\n\t\tmode |= uint8(m) << 4\n\t}\n\n\tif mlEnc.useRLE {\n\t\tmode |= uint8(compModeRLE) << 2\n\t\tmlEnc.setRLE(b.sequences[0].mlCode)\n\t\tif debugEncoder {\n\t\t\tprintln(\"mlEnc.useRLE, code: \", b.sequences[0].mlCode, \"value\", b.sequences[0].matchLen)\n\t\t}\n\t} else {\n\t\tvar m seqCompMode\n\t\tmlEnc, m = chooseComp(mlEnc, b.coders.mlPrev, &fsePredefEnc[tableMatchLengths])\n\t\tmode |= uint8(m) << 2\n\t}\n\tb.output = append(b.output, mode)\n\tif debugEncoder {\n\t\tprintf(\"Compression modes: 0b%b\", mode)\n\t}\n\tb.output, err = llEnc.writeCount(b.output)\n\tif err != nil {\n\t\treturn err\n\t}\n\tstart := len(b.output)\n\tb.output, err = ofEnc.writeCount(b.output)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif false {\n\t\tprintln(\"block:\", b.output[start:], \"tablelog\", ofEnc.actualTableLog, \"maxcount:\", ofEnc.maxCount)\n\t\tfmt.Printf(\"selected TableLog: %d, Symbol length: %d\\n\", ofEnc.actualTableLog, ofEnc.symbolLen)\n\t\tfor i, v := range ofEnc.norm[:ofEnc.symbolLen] {\n\t\t\tfmt.Printf(\"%3d: %5d -> %4d \\n\", i, ofEnc.count[i], v)\n\t\t}\n\t}\n\tb.output, err = mlEnc.writeCount(b.output)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Maybe in block?\n\twr := &b.wr\n\twr.reset(b.output)\n\n\tvar ll, of, ml cState\n\n\t// Current sequence\n\tseq := len(b.sequences) - 1\n\ts := b.sequences[seq]\n\tllEnc.setBits(llBitsTable[:])\n\tmlEnc.setBits(mlBitsTable[:])\n\tofEnc.setBits(nil)\n\n\tllTT, ofTT, mlTT := llEnc.ct.symbolTT[:256], ofEnc.ct.symbolTT[:256], mlEnc.ct.symbolTT[:256]\n\n\t// We have 3 bounds checks here (and in the loop).\n\t// Since we are iterating backwards it is kinda hard to avoid.\n\tllB, ofB, mlB := llTT[s.llCode], ofTT[s.ofCode], mlTT[s.mlCode]\n\tll.init(wr, &llEnc.ct, llB)\n\tof.init(wr, &ofEnc.ct, ofB)\n\twr.flush32()\n\tml.init(wr, &mlEnc.ct, mlB)\n\n\t// Each of these lookups also generates a bounds check.\n\twr.addBits32NC(s.litLen, llB.outBits)\n\twr.addBits32NC(s.matchLen, mlB.outBits)\n\twr.flush32()\n\twr.addBits32NC(s.offset, ofB.outBits)\n\tif debugSequences {\n\t\tprintln(\"Encoded seq\", seq, s, \"codes:\", s.llCode, s.mlCode, s.ofCode, \"states:\", ll.state, ml.state, of.state, \"bits:\", llB, mlB, ofB)\n\t}\n\tseq--\n\t// Store sequences in reverse...\n\tfor seq >= 0 {\n\t\ts = b.sequences[seq]\n\n\t\tofB := ofTT[s.ofCode]\n\t\twr.flush32() // tablelog max is below 8 for each, so it will fill max 24 bits.\n\t\t//of.encode(ofB)\n\t\tnbBitsOut := (uint32(of.state) + ofB.deltaNbBits) >> 16\n\t\tdstState := int32(of.state>>(nbBitsOut&15)) + int32(ofB.deltaFindState)\n\t\twr.addBits16NC(of.state, uint8(nbBitsOut))\n\t\tof.state = of.stateTable[dstState]\n\n\t\t// Accumulate extra bits.\n\t\toutBits := ofB.outBits & 31\n\t\textraBits := uint64(s.offset & bitMask32[outBits])\n\t\textraBitsN := outBits\n\n\t\tmlB := mlTT[s.mlCode]\n\t\t//ml.encode(mlB)\n\t\tnbBitsOut = (uint32(ml.state) + mlB.deltaNbBits) >> 16\n\t\tdstState = int32(ml.state>>(nbBitsOut&15)) + int32(mlB.deltaFindState)\n\t\twr.addBits16NC(ml.state, uint8(nbBitsOut))\n\t\tml.state = ml.stateTable[dstState]\n\n\t\toutBits = mlB.outBits & 31\n\t\textraBits = extraBits<<outBits | uint64(s.matchLen&bitMask32[outBits])\n\t\textraBitsN += outBits\n\n\t\tllB := llTT[s.llCode]\n\t\t//ll.encode(llB)\n\t\tnbBitsOut = (uint32(ll.state) + llB.deltaNbBits) >> 16\n\t\tdstState = int32(ll.state>>(nbBitsOut&15)) + int32(llB.deltaFindState)\n\t\twr.addBits16NC(ll.state, uint8(nbBitsOut))\n\t\tll.state = ll.stateTable[dstState]\n\n\t\toutBits = llB.outBits & 31\n\t\textraBits = extraBits<<outBits | uint64(s.litLen&bitMask32[outBits])\n\t\textraBitsN += outBits\n\n\t\twr.flush32()\n\t\twr.addBits64NC(extraBits, extraBitsN)\n\n\t\tif debugSequences {\n\t\t\tprintln(\"Encoded seq\", seq, s)\n\t\t}\n\n\t\tseq--\n\t}\n\tml.flush(mlEnc.actualTableLog)\n\tof.flush(ofEnc.actualTableLog)\n\tll.flush(llEnc.actualTableLog)\n\twr.close()\n\tb.output = wr.out\n\n\t// Maybe even add a bigger margin.\n\tif len(b.output)-3-bhOffset >= b.size {\n\t\t// Discard and encode as raw block.\n\t\tb.output = b.encodeRawTo(b.output[:bhOffset], org)\n\t\tb.popOffsets()\n\t\tb.litEnc.Reuse = huff0.ReusePolicyNone\n\t\treturn nil\n\t}\n\n\t// Size is output minus block header.\n\tbh.setSize(uint32(len(b.output)-bhOffset) - 3)\n\tif debugEncoder {\n\t\tprintln(\"Rewriting block header\", bh)\n\t}\n\t_ = bh.appendTo(b.output[bhOffset:bhOffset])\n\tb.coders.setPrev(llEnc, mlEnc, ofEnc)\n\treturn nil\n}\n\nvar errIncompressible = errors.New(\"incompressible\")\n\nfunc (b *blockEnc) genCodes() {\n\tif len(b.sequences) == 0 {\n\t\t// nothing to do\n\t\treturn\n\t}\n\tif len(b.sequences) > math.MaxUint16 {\n\t\tpanic(\"can only encode up to 64K sequences\")\n\t}\n\t// No bounds checks after here:\n\tllH := b.coders.llEnc.Histogram()\n\tofH := b.coders.ofEnc.Histogram()\n\tmlH := b.coders.mlEnc.Histogram()\n\tfor i := range llH {\n\t\tllH[i] = 0\n\t}\n\tfor i := range ofH {\n\t\tofH[i] = 0\n\t}\n\tfor i := range mlH {\n\t\tmlH[i] = 0\n\t}\n\n\tvar llMax, ofMax, mlMax uint8\n\tfor i := range b.sequences {\n\t\tseq := &b.sequences[i]\n\t\tv := llCode(seq.litLen)\n\t\tseq.llCode = v\n\t\tllH[v]++\n\t\tif v > llMax {\n\t\t\tllMax = v\n\t\t}\n\n\t\tv = ofCode(seq.offset)\n\t\tseq.ofCode = v\n\t\tofH[v]++\n\t\tif v > ofMax {\n\t\t\tofMax = v\n\t\t}\n\n\t\tv = mlCode(seq.matchLen)\n\t\tseq.mlCode = v\n\t\tmlH[v]++\n\t\tif v > mlMax {\n\t\t\tmlMax = v\n\t\t\tif debugAsserts && mlMax > maxMatchLengthSymbol {\n\t\t\t\tpanic(fmt.Errorf(\"mlMax > maxMatchLengthSymbol (%d), matchlen: %d\", mlMax, seq.matchLen))\n\t\t\t}\n\t\t}\n\t}\n\tif debugAsserts && mlMax > maxMatchLengthSymbol {\n\t\tpanic(fmt.Errorf(\"mlMax > maxMatchLengthSymbol (%d)\", mlMax))\n\t}\n\tif debugAsserts && ofMax > maxOffsetBits {\n\t\tpanic(fmt.Errorf(\"ofMax > maxOffsetBits (%d)\", ofMax))\n\t}\n\tif debugAsserts && llMax > maxLiteralLengthSymbol {\n\t\tpanic(fmt.Errorf(\"llMax > maxLiteralLengthSymbol (%d)\", llMax))\n\t}\n\n\tb.coders.mlEnc.HistogramFinished(mlMax, int(slices.Max(mlH[:mlMax+1])))\n\tb.coders.ofEnc.HistogramFinished(ofMax, int(slices.Max(ofH[:ofMax+1])))\n\tb.coders.llEnc.HistogramFinished(llMax, int(slices.Max(llH[:llMax+1])))\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/blocktype_string.go",
    "content": "// Code generated by \"stringer -type=blockType,literalsBlockType,seqCompMode,tableIndex\"; DO NOT EDIT.\n\npackage zstd\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[blockTypeRaw-0]\n\t_ = x[blockTypeRLE-1]\n\t_ = x[blockTypeCompressed-2]\n\t_ = x[blockTypeReserved-3]\n}\n\nconst _blockType_name = \"blockTypeRawblockTypeRLEblockTypeCompressedblockTypeReserved\"\n\nvar _blockType_index = [...]uint8{0, 12, 24, 43, 60}\n\nfunc (i blockType) String() string {\n\tif i >= blockType(len(_blockType_index)-1) {\n\t\treturn \"blockType(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _blockType_name[_blockType_index[i]:_blockType_index[i+1]]\n}\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[literalsBlockRaw-0]\n\t_ = x[literalsBlockRLE-1]\n\t_ = x[literalsBlockCompressed-2]\n\t_ = x[literalsBlockTreeless-3]\n}\n\nconst _literalsBlockType_name = \"literalsBlockRawliteralsBlockRLEliteralsBlockCompressedliteralsBlockTreeless\"\n\nvar _literalsBlockType_index = [...]uint8{0, 16, 32, 55, 76}\n\nfunc (i literalsBlockType) String() string {\n\tif i >= literalsBlockType(len(_literalsBlockType_index)-1) {\n\t\treturn \"literalsBlockType(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _literalsBlockType_name[_literalsBlockType_index[i]:_literalsBlockType_index[i+1]]\n}\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[compModePredefined-0]\n\t_ = x[compModeRLE-1]\n\t_ = x[compModeFSE-2]\n\t_ = x[compModeRepeat-3]\n}\n\nconst _seqCompMode_name = \"compModePredefinedcompModeRLEcompModeFSEcompModeRepeat\"\n\nvar _seqCompMode_index = [...]uint8{0, 18, 29, 40, 54}\n\nfunc (i seqCompMode) String() string {\n\tif i >= seqCompMode(len(_seqCompMode_index)-1) {\n\t\treturn \"seqCompMode(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _seqCompMode_name[_seqCompMode_index[i]:_seqCompMode_index[i+1]]\n}\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[tableLiteralLengths-0]\n\t_ = x[tableOffsets-1]\n\t_ = x[tableMatchLengths-2]\n}\n\nconst _tableIndex_name = \"tableLiteralLengthstableOffsetstableMatchLengths\"\n\nvar _tableIndex_index = [...]uint8{0, 19, 31, 48}\n\nfunc (i tableIndex) String() string {\n\tif i >= tableIndex(len(_tableIndex_index)-1) {\n\t\treturn \"tableIndex(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _tableIndex_name[_tableIndex_index[i]:_tableIndex_index[i+1]]\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/bytebuf.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\ntype byteBuffer interface {\n\t// Read up to 8 bytes.\n\t// Returns io.ErrUnexpectedEOF if this cannot be satisfied.\n\treadSmall(n int) ([]byte, error)\n\n\t// Read >8 bytes.\n\t// MAY use the destination slice.\n\treadBig(n int, dst []byte) ([]byte, error)\n\n\t// Read a single byte.\n\treadByte() (byte, error)\n\n\t// Skip n bytes.\n\tskipN(n int64) error\n}\n\n// in-memory buffer\ntype byteBuf []byte\n\nfunc (b *byteBuf) readSmall(n int) ([]byte, error) {\n\tif debugAsserts && n > 8 {\n\t\tpanic(fmt.Errorf(\"small read > 8 (%d). use readBig\", n))\n\t}\n\tbb := *b\n\tif len(bb) < n {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\tr := bb[:n]\n\t*b = bb[n:]\n\treturn r, nil\n}\n\nfunc (b *byteBuf) readBig(n int, dst []byte) ([]byte, error) {\n\tbb := *b\n\tif len(bb) < n {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\tr := bb[:n]\n\t*b = bb[n:]\n\treturn r, nil\n}\n\nfunc (b *byteBuf) readByte() (byte, error) {\n\tbb := *b\n\tif len(bb) < 1 {\n\t\treturn 0, io.ErrUnexpectedEOF\n\t}\n\tr := bb[0]\n\t*b = bb[1:]\n\treturn r, nil\n}\n\nfunc (b *byteBuf) skipN(n int64) error {\n\tbb := *b\n\tif n < 0 {\n\t\treturn fmt.Errorf(\"negative skip (%d) requested\", n)\n\t}\n\tif int64(len(bb)) < n {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\t*b = bb[n:]\n\treturn nil\n}\n\n// wrapper around a reader.\ntype readerWrapper struct {\n\tr   io.Reader\n\ttmp [8]byte\n}\n\nfunc (r *readerWrapper) readSmall(n int) ([]byte, error) {\n\tif debugAsserts && n > 8 {\n\t\tpanic(fmt.Errorf(\"small read > 8 (%d). use readBig\", n))\n\t}\n\tn2, err := io.ReadFull(r.r, r.tmp[:n])\n\t// We only really care about the actual bytes read.\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"readSmall: got\", n2, \"want\", n, \"err\", err)\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn r.tmp[:n], nil\n}\n\nfunc (r *readerWrapper) readBig(n int, dst []byte) ([]byte, error) {\n\tif cap(dst) < n {\n\t\tdst = make([]byte, n)\n\t}\n\tn2, err := io.ReadFull(r.r, dst[:n])\n\tif err == io.EOF && n > 0 {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn dst[:n2], err\n}\n\nfunc (r *readerWrapper) readByte() (byte, error) {\n\tn2, err := io.ReadFull(r.r, r.tmp[:1])\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn 0, err\n\t}\n\tif n2 != 1 {\n\t\treturn 0, io.ErrUnexpectedEOF\n\t}\n\treturn r.tmp[0], nil\n}\n\nfunc (r *readerWrapper) skipN(n int64) error {\n\tn2, err := io.CopyN(io.Discard, r.r, n)\n\tif n2 != n {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/bytereader.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\n// byteReader provides a byte reader that reads\n// little endian values from a byte stream.\n// The input stream is manually advanced.\n// The reader performs no bounds checks.\ntype byteReader struct {\n\tb   []byte\n\toff int\n}\n\n// advance the stream b n bytes.\nfunc (b *byteReader) advance(n uint) {\n\tb.off += int(n)\n}\n\n// overread returns whether we have advanced too far.\nfunc (b *byteReader) overread() bool {\n\treturn b.off > len(b.b)\n}\n\n// Int32 returns a little endian int32 starting at current offset.\nfunc (b byteReader) Int32() int32 {\n\tb2 := b.b[b.off:]\n\tb2 = b2[:4]\n\tv3 := int32(b2[3])\n\tv2 := int32(b2[2])\n\tv1 := int32(b2[1])\n\tv0 := int32(b2[0])\n\treturn v0 | (v1 << 8) | (v2 << 16) | (v3 << 24)\n}\n\n// Uint8 returns the next byte\nfunc (b *byteReader) Uint8() uint8 {\n\tv := b.b[b.off]\n\treturn v\n}\n\n// Uint32 returns a little endian uint32 starting at current offset.\nfunc (b byteReader) Uint32() uint32 {\n\tif r := b.remain(); r < 4 {\n\t\t// Very rare\n\t\tv := uint32(0)\n\t\tfor i := 1; i <= r; i++ {\n\t\t\tv = (v << 8) | uint32(b.b[len(b.b)-i])\n\t\t}\n\t\treturn v\n\t}\n\tb2 := b.b[b.off:]\n\tb2 = b2[:4]\n\tv3 := uint32(b2[3])\n\tv2 := uint32(b2[2])\n\tv1 := uint32(b2[1])\n\tv0 := uint32(b2[0])\n\treturn v0 | (v1 << 8) | (v2 << 16) | (v3 << 24)\n}\n\n// Uint32NC returns a little endian uint32 starting at current offset.\n// The caller must be sure if there are at least 4 bytes left.\nfunc (b byteReader) Uint32NC() uint32 {\n\tb2 := b.b[b.off:]\n\tb2 = b2[:4]\n\tv3 := uint32(b2[3])\n\tv2 := uint32(b2[2])\n\tv1 := uint32(b2[1])\n\tv0 := uint32(b2[0])\n\treturn v0 | (v1 << 8) | (v2 << 16) | (v3 << 24)\n}\n\n// unread returns the unread portion of the input.\nfunc (b byteReader) unread() []byte {\n\treturn b.b[b.off:]\n}\n\n// remain will return the number of bytes remaining.\nfunc (b byteReader) remain() int {\n\treturn len(b.b) - b.off\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/decodeheader.go",
    "content": "// Copyright 2020+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\npackage zstd\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"io\"\n)\n\n// HeaderMaxSize is the maximum size of a Frame and Block Header.\n// If less is sent to Header.Decode it *may* still contain enough information.\nconst HeaderMaxSize = 14 + 3\n\n// Header contains information about the first frame and block within that.\ntype Header struct {\n\t// SingleSegment specifies whether the data is to be decompressed into a\n\t// single contiguous memory segment.\n\t// It implies that WindowSize is invalid and that FrameContentSize is valid.\n\tSingleSegment bool\n\n\t// WindowSize is the window of data to keep while decoding.\n\t// Will only be set if SingleSegment is false.\n\tWindowSize uint64\n\n\t// Dictionary ID.\n\t// If 0, no dictionary.\n\tDictionaryID uint32\n\n\t// HasFCS specifies whether FrameContentSize has a valid value.\n\tHasFCS bool\n\n\t// FrameContentSize is the expected uncompressed size of the entire frame.\n\tFrameContentSize uint64\n\n\t// Skippable will be true if the frame is meant to be skipped.\n\t// This implies that FirstBlock.OK is false.\n\tSkippable bool\n\n\t// SkippableID is the user-specific ID for the skippable frame.\n\t// Valid values are between 0 to 15, inclusive.\n\tSkippableID int\n\n\t// SkippableSize is the length of the user data to skip following\n\t// the header.\n\tSkippableSize uint32\n\n\t// HeaderSize is the raw size of the frame header.\n\t//\n\t// For normal frames, it includes the size of the magic number and\n\t// the size of the header (per section 3.1.1.1).\n\t// It does not include the size for any data blocks (section 3.1.1.2) nor\n\t// the size for the trailing content checksum.\n\t//\n\t// For skippable frames, this counts the size of the magic number\n\t// along with the size of the size field of the payload.\n\t// It does not include the size of the skippable payload itself.\n\t// The total frame size is the HeaderSize plus the SkippableSize.\n\tHeaderSize int\n\n\t// First block information.\n\tFirstBlock struct {\n\t\t// OK will be set if first block could be decoded.\n\t\tOK bool\n\n\t\t// Is this the last block of a frame?\n\t\tLast bool\n\n\t\t// Is the data compressed?\n\t\t// If true CompressedSize will be populated.\n\t\t// Unfortunately DecompressedSize cannot be determined\n\t\t// without decoding the blocks.\n\t\tCompressed bool\n\n\t\t// DecompressedSize is the expected decompressed size of the block.\n\t\t// Will be 0 if it cannot be determined.\n\t\tDecompressedSize int\n\n\t\t// CompressedSize of the data in the block.\n\t\t// Does not include the block header.\n\t\t// Will be equal to DecompressedSize if not Compressed.\n\t\tCompressedSize int\n\t}\n\n\t// If set there is a checksum present for the block content.\n\t// The checksum field at the end is always 4 bytes long.\n\tHasCheckSum bool\n}\n\n// Decode the header from the beginning of the stream.\n// This will decode the frame header and the first block header if enough bytes are provided.\n// It is recommended to provide at least HeaderMaxSize bytes.\n// If the frame header cannot be read an error will be returned.\n// If there isn't enough input, io.ErrUnexpectedEOF is returned.\n// The FirstBlock.OK will indicate if enough information was available to decode the first block header.\nfunc (h *Header) Decode(in []byte) error {\n\t_, err := h.DecodeAndStrip(in)\n\treturn err\n}\n\n// DecodeAndStrip will decode the header from the beginning of the stream\n// and on success return the remaining bytes.\n// This will decode the frame header and the first block header if enough bytes are provided.\n// It is recommended to provide at least HeaderMaxSize bytes.\n// If the frame header cannot be read an error will be returned.\n// If there isn't enough input, io.ErrUnexpectedEOF is returned.\n// The FirstBlock.OK will indicate if enough information was available to decode the first block header.\nfunc (h *Header) DecodeAndStrip(in []byte) (remain []byte, err error) {\n\t*h = Header{}\n\tif len(in) < 4 {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\th.HeaderSize += 4\n\tb, in := in[:4], in[4:]\n\tif string(b) != frameMagic {\n\t\tif string(b[1:4]) != skippableFrameMagic || b[0]&0xf0 != 0x50 {\n\t\t\treturn nil, ErrMagicMismatch\n\t\t}\n\t\tif len(in) < 4 {\n\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t}\n\t\th.HeaderSize += 4\n\t\th.Skippable = true\n\t\th.SkippableID = int(b[0] & 0xf)\n\t\th.SkippableSize = binary.LittleEndian.Uint32(in)\n\t\treturn in[4:], nil\n\t}\n\n\t// Read Window_Descriptor\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor\n\tif len(in) < 1 {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\tfhd, in := in[0], in[1:]\n\th.HeaderSize++\n\th.SingleSegment = fhd&(1<<5) != 0\n\th.HasCheckSum = fhd&(1<<2) != 0\n\tif fhd&(1<<3) != 0 {\n\t\treturn nil, errors.New(\"reserved bit set on frame header\")\n\t}\n\n\tif !h.SingleSegment {\n\t\tif len(in) < 1 {\n\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t}\n\t\tvar wd byte\n\t\twd, in = in[0], in[1:]\n\t\th.HeaderSize++\n\t\twindowLog := 10 + (wd >> 3)\n\t\twindowBase := uint64(1) << windowLog\n\t\twindowAdd := (windowBase / 8) * uint64(wd&0x7)\n\t\th.WindowSize = windowBase + windowAdd\n\t}\n\n\t// Read Dictionary_ID\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary_id\n\tif size := fhd & 3; size != 0 {\n\t\tif size == 3 {\n\t\t\tsize = 4\n\t\t}\n\t\tif len(in) < int(size) {\n\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t}\n\t\tb, in = in[:size], in[size:]\n\t\th.HeaderSize += int(size)\n\t\tswitch len(b) {\n\t\tcase 1:\n\t\t\th.DictionaryID = uint32(b[0])\n\t\tcase 2:\n\t\t\th.DictionaryID = uint32(b[0]) | (uint32(b[1]) << 8)\n\t\tcase 4:\n\t\t\th.DictionaryID = uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)\n\t\t}\n\t}\n\n\t// Read Frame_Content_Size\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame_content_size\n\tvar fcsSize int\n\tv := fhd >> 6\n\tswitch v {\n\tcase 0:\n\t\tif h.SingleSegment {\n\t\t\tfcsSize = 1\n\t\t}\n\tdefault:\n\t\tfcsSize = 1 << v\n\t}\n\n\tif fcsSize > 0 {\n\t\th.HasFCS = true\n\t\tif len(in) < fcsSize {\n\t\t\treturn nil, io.ErrUnexpectedEOF\n\t\t}\n\t\tb, in = in[:fcsSize], in[fcsSize:]\n\t\th.HeaderSize += int(fcsSize)\n\t\tswitch len(b) {\n\t\tcase 1:\n\t\t\th.FrameContentSize = uint64(b[0])\n\t\tcase 2:\n\t\t\t// When FCS_Field_Size is 2, the offset of 256 is added.\n\t\t\th.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) + 256\n\t\tcase 4:\n\t\t\th.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) | (uint64(b[2]) << 16) | (uint64(b[3]) << 24)\n\t\tcase 8:\n\t\t\td1 := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)\n\t\t\td2 := uint32(b[4]) | (uint32(b[5]) << 8) | (uint32(b[6]) << 16) | (uint32(b[7]) << 24)\n\t\t\th.FrameContentSize = uint64(d1) | (uint64(d2) << 32)\n\t\t}\n\t}\n\n\t// Frame Header done, we will not fail from now on.\n\tif len(in) < 3 {\n\t\treturn in, nil\n\t}\n\ttmp := in[:3]\n\tbh := uint32(tmp[0]) | (uint32(tmp[1]) << 8) | (uint32(tmp[2]) << 16)\n\th.FirstBlock.Last = bh&1 != 0\n\tblockType := blockType((bh >> 1) & 3)\n\t// find size.\n\tcSize := int(bh >> 3)\n\tswitch blockType {\n\tcase blockTypeReserved:\n\t\treturn in, nil\n\tcase blockTypeRLE:\n\t\th.FirstBlock.Compressed = true\n\t\th.FirstBlock.DecompressedSize = cSize\n\t\th.FirstBlock.CompressedSize = 1\n\tcase blockTypeCompressed:\n\t\th.FirstBlock.Compressed = true\n\t\th.FirstBlock.CompressedSize = cSize\n\tcase blockTypeRaw:\n\t\th.FirstBlock.DecompressedSize = cSize\n\t\th.FirstBlock.CompressedSize = cSize\n\tdefault:\n\t\tpanic(\"Invalid block type\")\n\t}\n\n\th.FirstBlock.OK = true\n\treturn in, nil\n}\n\n// AppendTo will append the encoded header to the dst slice.\n// There is no error checking performed on the header values.\nfunc (h *Header) AppendTo(dst []byte) ([]byte, error) {\n\tif h.Skippable {\n\t\tmagic := [4]byte{0x50, 0x2a, 0x4d, 0x18}\n\t\tmagic[0] |= byte(h.SkippableID & 0xf)\n\t\tdst = append(dst, magic[:]...)\n\t\tf := h.SkippableSize\n\t\treturn append(dst, uint8(f), uint8(f>>8), uint8(f>>16), uint8(f>>24)), nil\n\t}\n\tf := frameHeader{\n\t\tContentSize:   h.FrameContentSize,\n\t\tWindowSize:    uint32(h.WindowSize),\n\t\tSingleSegment: h.SingleSegment,\n\t\tChecksum:      h.HasCheckSum,\n\t\tDictID:        h.DictionaryID,\n\t}\n\treturn f.appendTo(dst), nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/decoder.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"context\"\n\t\"encoding/binary\"\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/zstd/internal/xxhash\"\n)\n\n// Decoder provides decoding of zstandard streams.\n// The decoder has been designed to operate without allocations after a warmup.\n// This means that you should store the decoder for best performance.\n// To re-use a stream decoder, use the Reset(r io.Reader) error to switch to another stream.\n// A decoder can safely be re-used even if the previous stream failed.\n// To release the resources, you must call the Close() function on a decoder.\ntype Decoder struct {\n\to decoderOptions\n\n\t// Unreferenced decoders, ready for use.\n\tdecoders chan *blockDec\n\n\t// Current read position used for Reader functionality.\n\tcurrent decoderState\n\n\t// sync stream decoding\n\tsyncStream struct {\n\t\tdecodedFrame uint64\n\t\tbr           readerWrapper\n\t\tenabled      bool\n\t\tinFrame      bool\n\t\tdstBuf       []byte\n\t}\n\n\tframe *frameDec\n\n\t// streamWg is the waitgroup for all streams\n\tstreamWg sync.WaitGroup\n}\n\n// decoderState is used for maintaining state when the decoder\n// is used for streaming.\ntype decoderState struct {\n\t// current block being written to stream.\n\tdecodeOutput\n\n\t// output in order to be written to stream.\n\toutput chan decodeOutput\n\n\t// cancel remaining output.\n\tcancel context.CancelFunc\n\n\t// crc of current frame\n\tcrc *xxhash.Digest\n\n\tflushed bool\n}\n\nvar (\n\t// Check the interfaces we want to support.\n\t_ = io.WriterTo(&Decoder{})\n\t_ = io.Reader(&Decoder{})\n)\n\n// NewReader creates a new decoder.\n// A nil Reader can be provided in which case Reset can be used to start a decode.\n//\n// A Decoder can be used in two modes:\n//\n// 1) As a stream, or\n// 2) For stateless decoding using DecodeAll.\n//\n// Only a single stream can be decoded concurrently, but the same decoder\n// can run multiple concurrent stateless decodes. It is even possible to\n// use stateless decodes while a stream is being decoded.\n//\n// The Reset function can be used to initiate a new stream, which will considerably\n// reduce the allocations normally caused by NewReader.\nfunc NewReader(r io.Reader, opts ...DOption) (*Decoder, error) {\n\tinitPredefined()\n\tvar d Decoder\n\td.o.setDefault()\n\tfor _, o := range opts {\n\t\terr := o(&d.o)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\td.current.crc = xxhash.New()\n\td.current.flushed = true\n\n\tif r == nil {\n\t\td.current.err = ErrDecoderNilInput\n\t}\n\n\t// Initialize dict map if needed.\n\tif d.o.dicts == nil {\n\t\td.o.dicts = make(map[uint32]*dict)\n\t}\n\n\t// Create decoders\n\td.decoders = make(chan *blockDec, d.o.concurrent)\n\tfor i := 0; i < d.o.concurrent; i++ {\n\t\tdec := newBlockDec(d.o.lowMem)\n\t\tdec.localFrame = newFrameDec(d.o)\n\t\td.decoders <- dec\n\t}\n\n\tif r == nil {\n\t\treturn &d, nil\n\t}\n\treturn &d, d.Reset(r)\n}\n\n// Read bytes from the decompressed stream into p.\n// Returns the number of bytes read and any error that occurred.\n// When the stream is done, io.EOF will be returned.\nfunc (d *Decoder) Read(p []byte) (int, error) {\n\tvar n int\n\tfor {\n\t\tif len(d.current.b) > 0 {\n\t\t\tfilled := copy(p, d.current.b)\n\t\t\tp = p[filled:]\n\t\t\td.current.b = d.current.b[filled:]\n\t\t\tn += filled\n\t\t}\n\t\tif len(p) == 0 {\n\t\t\tbreak\n\t\t}\n\t\tif len(d.current.b) == 0 {\n\t\t\t// We have an error and no more data\n\t\t\tif d.current.err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif !d.nextBlock(n == 0) {\n\t\t\t\treturn n, d.current.err\n\t\t\t}\n\t\t}\n\t}\n\tif len(d.current.b) > 0 {\n\t\tif debugDecoder {\n\t\t\tprintln(\"returning\", n, \"still bytes left:\", len(d.current.b))\n\t\t}\n\t\t// Only return error at end of block\n\t\treturn n, nil\n\t}\n\tif d.current.err != nil {\n\t\td.drainOutput()\n\t}\n\tif debugDecoder {\n\t\tprintln(\"returning\", n, d.current.err, len(d.decoders))\n\t}\n\treturn n, d.current.err\n}\n\n// Reset will reset the decoder the supplied stream after the current has finished processing.\n// Note that this functionality cannot be used after Close has been called.\n// Reset can be called with a nil reader to release references to the previous reader.\n// After being called with a nil reader, no other operations than Reset or DecodeAll or Close\n// should be used.\nfunc (d *Decoder) Reset(r io.Reader) error {\n\tif d.current.err == ErrDecoderClosed {\n\t\treturn d.current.err\n\t}\n\n\td.drainOutput()\n\n\td.syncStream.br.r = nil\n\tif r == nil {\n\t\td.current.err = ErrDecoderNilInput\n\t\tif len(d.current.b) > 0 {\n\t\t\td.current.b = d.current.b[:0]\n\t\t}\n\t\td.current.flushed = true\n\t\treturn nil\n\t}\n\n\t// If bytes buffer and < 5MB, do sync decoding anyway.\n\tif bb, ok := r.(byter); ok && bb.Len() < d.o.decodeBufsBelow && !d.o.limitToCap {\n\t\tbb2 := bb\n\t\tif debugDecoder {\n\t\t\tprintln(\"*bytes.Buffer detected, doing sync decode, len:\", bb.Len())\n\t\t}\n\t\tb := bb2.Bytes()\n\t\tvar dst []byte\n\t\tif cap(d.syncStream.dstBuf) > 0 {\n\t\t\tdst = d.syncStream.dstBuf[:0]\n\t\t}\n\n\t\tdst, err := d.DecodeAll(b, dst)\n\t\tif err == nil {\n\t\t\terr = io.EOF\n\t\t}\n\t\t// Save output buffer\n\t\td.syncStream.dstBuf = dst\n\t\td.current.b = dst\n\t\td.current.err = err\n\t\td.current.flushed = true\n\t\tif debugDecoder {\n\t\t\tprintln(\"sync decode to\", len(dst), \"bytes, err:\", err)\n\t\t}\n\t\treturn nil\n\t}\n\t// Remove current block.\n\td.stashDecoder()\n\td.current.decodeOutput = decodeOutput{}\n\td.current.err = nil\n\td.current.flushed = false\n\td.current.d = nil\n\td.syncStream.dstBuf = nil\n\n\t// Ensure no-one else is still running...\n\td.streamWg.Wait()\n\tif d.frame == nil {\n\t\td.frame = newFrameDec(d.o)\n\t}\n\n\tif d.o.concurrent == 1 {\n\t\treturn d.startSyncDecoder(r)\n\t}\n\n\td.current.output = make(chan decodeOutput, d.o.concurrent)\n\tctx, cancel := context.WithCancel(context.Background())\n\td.current.cancel = cancel\n\td.streamWg.Add(1)\n\tgo d.startStreamDecoder(ctx, r, d.current.output)\n\n\treturn nil\n}\n\n// ResetWithOptions will reset the decoder and apply the given options\n// for the next stream or DecodeAll operation.\n// Options are applied on top of the existing options.\n// Some options cannot be changed on reset and will return an error.\nfunc (d *Decoder) ResetWithOptions(r io.Reader, opts ...DOption) error {\n\td.o.resetOpt = true\n\tdefer func() { d.o.resetOpt = false }()\n\tfor _, o := range opts {\n\t\tif err := o(&d.o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn d.Reset(r)\n}\n\n// drainOutput will drain the output until errEndOfStream is sent.\nfunc (d *Decoder) drainOutput() {\n\tif d.current.cancel != nil {\n\t\tif debugDecoder {\n\t\t\tprintln(\"cancelling current\")\n\t\t}\n\t\td.current.cancel()\n\t\td.current.cancel = nil\n\t}\n\tif d.current.d != nil {\n\t\tif debugDecoder {\n\t\t\tprintf(\"re-adding current decoder %p, decoders: %d\", d.current.d, len(d.decoders))\n\t\t}\n\t\td.decoders <- d.current.d\n\t\td.current.d = nil\n\t\td.current.b = nil\n\t}\n\tif d.current.output == nil || d.current.flushed {\n\t\tprintln(\"current already flushed\")\n\t\treturn\n\t}\n\tfor v := range d.current.output {\n\t\tif v.d != nil {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"re-adding decoder %p\", v.d)\n\t\t\t}\n\t\t\td.decoders <- v.d\n\t\t}\n\t}\n\td.current.output = nil\n\td.current.flushed = true\n}\n\n// WriteTo writes data to w until there's no more data to write or when an error occurs.\n// The return value n is the number of bytes written.\n// Any error encountered during the write is also returned.\nfunc (d *Decoder) WriteTo(w io.Writer) (int64, error) {\n\tvar n int64\n\tfor {\n\t\tif len(d.current.b) > 0 {\n\t\t\tn2, err2 := w.Write(d.current.b)\n\t\t\tn += int64(n2)\n\t\t\tif err2 != nil && (d.current.err == nil || d.current.err == io.EOF) {\n\t\t\t\td.current.err = err2\n\t\t\t} else if n2 != len(d.current.b) {\n\t\t\t\td.current.err = io.ErrShortWrite\n\t\t\t}\n\t\t}\n\t\tif d.current.err != nil {\n\t\t\tbreak\n\t\t}\n\t\td.nextBlock(true)\n\t}\n\terr := d.current.err\n\tif err != nil {\n\t\td.drainOutput()\n\t}\n\tif err == io.EOF {\n\t\terr = nil\n\t}\n\treturn n, err\n}\n\n// DecodeAll allows stateless decoding of a blob of bytes.\n// Output will be appended to dst, so if the destination size is known\n// you can pre-allocate the destination slice to avoid allocations.\n// DecodeAll can be used concurrently.\n// The Decoder concurrency limits will be respected.\nfunc (d *Decoder) DecodeAll(input, dst []byte) ([]byte, error) {\n\tif d.decoders == nil {\n\t\treturn dst, ErrDecoderClosed\n\t}\n\n\t// Grab a block decoder and frame decoder.\n\tblock := <-d.decoders\n\tframe := block.localFrame\n\tinitialSize := len(dst)\n\tdefer func() {\n\t\tif debugDecoder {\n\t\t\tprintf(\"re-adding decoder: %p\", block)\n\t\t}\n\t\tframe.rawInput = nil\n\t\tframe.bBuf = nil\n\t\tif frame.history.decoders.br != nil {\n\t\t\tframe.history.decoders.br.in = nil\n\t\t\tframe.history.decoders.br.cursor = 0\n\t\t}\n\t\td.decoders <- block\n\t}()\n\tframe.bBuf = input\n\n\tfor {\n\t\tframe.history.reset()\n\t\terr := frame.reset(&frame.bBuf)\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"frame reset return EOF\")\n\t\t\t\t}\n\t\t\t\treturn dst, nil\n\t\t\t}\n\t\t\treturn dst, err\n\t\t}\n\t\tif err = d.setDict(frame); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif frame.WindowSize > d.o.maxWindowSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"window size exceeded:\", frame.WindowSize, \">\", d.o.maxWindowSize)\n\t\t\t}\n\t\t\treturn dst, ErrWindowSizeExceeded\n\t\t}\n\t\tif frame.FrameContentSize != fcsUnknown {\n\t\t\tif frame.FrameContentSize > d.o.maxDecodedSize-uint64(len(dst)-initialSize) {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"decoder size exceeded; fcs:\", frame.FrameContentSize, \"> mcs:\", d.o.maxDecodedSize-uint64(len(dst)-initialSize), \"len:\", len(dst))\n\t\t\t\t}\n\t\t\t\treturn dst, ErrDecoderSizeExceeded\n\t\t\t}\n\t\t\tif d.o.limitToCap && frame.FrameContentSize > uint64(cap(dst)-len(dst)) {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"decoder size exceeded; fcs:\", frame.FrameContentSize, \"> (cap-len)\", cap(dst)-len(dst))\n\t\t\t\t}\n\t\t\t\treturn dst, ErrDecoderSizeExceeded\n\t\t\t}\n\t\t\tif cap(dst)-len(dst) < int(frame.FrameContentSize) {\n\t\t\t\tdst2 := make([]byte, len(dst), len(dst)+int(frame.FrameContentSize)+compressedBlockOverAlloc)\n\t\t\t\tcopy(dst2, dst)\n\t\t\t\tdst = dst2\n\t\t\t}\n\t\t}\n\n\t\tif cap(dst) == 0 && !d.o.limitToCap {\n\t\t\t// Allocate len(input) * 2 by default if nothing is provided\n\t\t\t// and we didn't get frame content size.\n\t\t\tsize := min(\n\t\t\t\t// Cap to 1 MB.\n\t\t\t\tlen(input)*2, 1<<20)\n\t\t\tif uint64(size) > d.o.maxDecodedSize {\n\t\t\t\tsize = int(d.o.maxDecodedSize)\n\t\t\t}\n\t\t\tdst = make([]byte, 0, size)\n\t\t}\n\n\t\tdst, err = frame.runDecoder(dst, block)\n\t\tif err != nil {\n\t\t\treturn dst, err\n\t\t}\n\t\tif uint64(len(dst)-initialSize) > d.o.maxDecodedSize {\n\t\t\treturn dst, ErrDecoderSizeExceeded\n\t\t}\n\t\tif len(frame.bBuf) == 0 {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"frame dbuf empty\")\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\treturn dst, nil\n}\n\n// nextBlock returns the next block.\n// If an error occurs d.err will be set.\n// Optionally the function can block for new output.\n// If non-blocking mode is used the returned boolean will be false\n// if no data was available without blocking.\nfunc (d *Decoder) nextBlock(blocking bool) (ok bool) {\n\tif d.current.err != nil {\n\t\t// Keep error state.\n\t\treturn false\n\t}\n\td.current.b = d.current.b[:0]\n\n\t// SYNC:\n\tif d.syncStream.enabled {\n\t\tif !blocking {\n\t\t\treturn false\n\t\t}\n\t\tok = d.nextBlockSync()\n\t\tif !ok {\n\t\t\td.stashDecoder()\n\t\t}\n\t\treturn ok\n\t}\n\n\t//ASYNC:\n\td.stashDecoder()\n\tif blocking {\n\t\td.current.decodeOutput, ok = <-d.current.output\n\t} else {\n\t\tselect {\n\t\tcase d.current.decodeOutput, ok = <-d.current.output:\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n\tif !ok {\n\t\t// This should not happen, so signal error state...\n\t\td.current.err = io.ErrUnexpectedEOF\n\t\treturn false\n\t}\n\tnext := d.current.decodeOutput\n\tif next.d != nil && next.d.async.newHist != nil {\n\t\td.current.crc.Reset()\n\t}\n\tif debugDecoder {\n\t\tvar tmp [4]byte\n\t\tbinary.LittleEndian.PutUint32(tmp[:], uint32(xxhash.Sum64(next.b)))\n\t\tprintln(\"got\", len(d.current.b), \"bytes, error:\", d.current.err, \"data crc:\", tmp)\n\t}\n\n\tif d.o.ignoreChecksum {\n\t\treturn true\n\t}\n\n\tif len(next.b) > 0 {\n\t\td.current.crc.Write(next.b)\n\t}\n\tif next.err == nil && next.d != nil && next.d.hasCRC {\n\t\tgot := uint32(d.current.crc.Sum64())\n\t\tif got != next.d.checkCRC {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"CRC Check Failed: %08x (got) != %08x (on stream)\\n\", got, next.d.checkCRC)\n\t\t\t}\n\t\t\td.current.err = ErrCRCMismatch\n\t\t} else {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"CRC ok %08x\\n\", got)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc (d *Decoder) nextBlockSync() (ok bool) {\n\tif d.current.d == nil {\n\t\td.current.d = <-d.decoders\n\t}\n\tfor len(d.current.b) == 0 {\n\t\tif !d.syncStream.inFrame {\n\t\t\td.frame.history.reset()\n\t\t\td.current.err = d.frame.reset(&d.syncStream.br)\n\t\t\tif d.current.err == nil {\n\t\t\t\td.current.err = d.setDict(d.frame)\n\t\t\t}\n\t\t\tif d.current.err != nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif d.frame.WindowSize > d.o.maxDecodedSize || d.frame.WindowSize > d.o.maxWindowSize {\n\t\t\t\td.current.err = ErrDecoderSizeExceeded\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\td.syncStream.decodedFrame = 0\n\t\t\td.syncStream.inFrame = true\n\t\t}\n\t\td.current.err = d.frame.next(d.current.d)\n\t\tif d.current.err != nil {\n\t\t\treturn false\n\t\t}\n\t\td.frame.history.ensureBlock()\n\t\tif debugDecoder {\n\t\t\tprintln(\"History trimmed:\", len(d.frame.history.b), \"decoded already:\", d.syncStream.decodedFrame)\n\t\t}\n\t\thistBefore := len(d.frame.history.b)\n\t\td.current.err = d.current.d.decodeBuf(&d.frame.history)\n\n\t\tif d.current.err != nil {\n\t\t\tprintln(\"error after:\", d.current.err)\n\t\t\treturn false\n\t\t}\n\t\td.current.b = d.frame.history.b[histBefore:]\n\t\tif debugDecoder {\n\t\t\tprintln(\"history after:\", len(d.frame.history.b))\n\t\t}\n\n\t\t// Check frame size (before CRC)\n\t\td.syncStream.decodedFrame += uint64(len(d.current.b))\n\t\tif d.syncStream.decodedFrame > d.frame.FrameContentSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"DecodedFrame (%d) > FrameContentSize (%d)\\n\", d.syncStream.decodedFrame, d.frame.FrameContentSize)\n\t\t\t}\n\t\t\td.current.err = ErrFrameSizeExceeded\n\t\t\treturn false\n\t\t}\n\n\t\t// Check FCS\n\t\tif d.current.d.Last && d.frame.FrameContentSize != fcsUnknown && d.syncStream.decodedFrame != d.frame.FrameContentSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"DecodedFrame (%d) != FrameContentSize (%d)\\n\", d.syncStream.decodedFrame, d.frame.FrameContentSize)\n\t\t\t}\n\t\t\td.current.err = ErrFrameSizeMismatch\n\t\t\treturn false\n\t\t}\n\n\t\t// Update/Check CRC\n\t\tif d.frame.HasCheckSum {\n\t\t\tif !d.o.ignoreChecksum {\n\t\t\t\td.frame.crc.Write(d.current.b)\n\t\t\t}\n\t\t\tif d.current.d.Last {\n\t\t\t\tif !d.o.ignoreChecksum {\n\t\t\t\t\td.current.err = d.frame.checkCRC()\n\t\t\t\t} else {\n\t\t\t\t\td.current.err = d.frame.consumeCRC()\n\t\t\t\t}\n\t\t\t\tif d.current.err != nil {\n\t\t\t\t\tprintln(\"CRC error:\", d.current.err)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\td.syncStream.inFrame = !d.current.d.Last\n\t}\n\treturn true\n}\n\nfunc (d *Decoder) stashDecoder() {\n\tif d.current.d != nil {\n\t\tif debugDecoder {\n\t\t\tprintf(\"re-adding current decoder %p\", d.current.d)\n\t\t}\n\t\td.decoders <- d.current.d\n\t\td.current.d = nil\n\t}\n}\n\n// Close will release all resources.\n// It is NOT possible to reuse the decoder after this.\nfunc (d *Decoder) Close() {\n\tif d.current.err == ErrDecoderClosed {\n\t\treturn\n\t}\n\td.drainOutput()\n\tif d.current.cancel != nil {\n\t\td.current.cancel()\n\t\td.streamWg.Wait()\n\t\td.current.cancel = nil\n\t}\n\tif d.decoders != nil {\n\t\tclose(d.decoders)\n\t\tfor dec := range d.decoders {\n\t\t\tdec.Close()\n\t\t}\n\t\td.decoders = nil\n\t}\n\tif d.current.d != nil {\n\t\td.current.d.Close()\n\t\td.current.d = nil\n\t}\n\td.current.err = ErrDecoderClosed\n}\n\n// IOReadCloser returns the decoder as an io.ReadCloser for convenience.\n// Any changes to the decoder will be reflected, so the returned ReadCloser\n// can be reused along with the decoder.\n// io.WriterTo is also supported by the returned ReadCloser.\nfunc (d *Decoder) IOReadCloser() io.ReadCloser {\n\treturn closeWrapper{d: d}\n}\n\n// closeWrapper wraps a function call as a closer.\ntype closeWrapper struct {\n\td *Decoder\n}\n\n// WriteTo forwards WriteTo calls to the decoder.\nfunc (c closeWrapper) WriteTo(w io.Writer) (n int64, err error) {\n\treturn c.d.WriteTo(w)\n}\n\n// Read forwards read calls to the decoder.\nfunc (c closeWrapper) Read(p []byte) (n int, err error) {\n\treturn c.d.Read(p)\n}\n\n// Close closes the decoder.\nfunc (c closeWrapper) Close() error {\n\tc.d.Close()\n\treturn nil\n}\n\ntype decodeOutput struct {\n\td   *blockDec\n\tb   []byte\n\terr error\n}\n\nfunc (d *Decoder) startSyncDecoder(r io.Reader) error {\n\td.frame.history.reset()\n\td.syncStream.br = readerWrapper{r: r}\n\td.syncStream.inFrame = false\n\td.syncStream.enabled = true\n\td.syncStream.decodedFrame = 0\n\treturn nil\n}\n\n// Create Decoder:\n// ASYNC:\n// Spawn 3 go routines.\n// 0: Read frames and decode block literals.\n// 1: Decode sequences.\n// 2: Execute sequences, send to output.\nfunc (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output chan decodeOutput) {\n\tdefer d.streamWg.Done()\n\tbr := readerWrapper{r: r}\n\n\tvar seqDecode = make(chan *blockDec, d.o.concurrent)\n\tvar seqExecute = make(chan *blockDec, d.o.concurrent)\n\n\t// Async 1: Decode sequences...\n\tgo func() {\n\t\tvar hist history\n\t\tvar hasErr bool\n\n\t\tfor block := range seqDecode {\n\t\t\tif hasErr {\n\t\t\t\tif block != nil {\n\t\t\t\t\tseqExecute <- block\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif block.async.newHist != nil {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"Async 1: new history, recent:\", block.async.newHist.recentOffsets)\n\t\t\t\t}\n\t\t\t\thist.reset()\n\t\t\t\thist.decoders = block.async.newHist.decoders\n\t\t\t\thist.recentOffsets = block.async.newHist.recentOffsets\n\t\t\t\thist.windowSize = block.async.newHist.windowSize\n\t\t\t\tif block.async.newHist.dict != nil {\n\t\t\t\t\thist.setDict(block.async.newHist.dict)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif block.err != nil || block.Type != blockTypeCompressed {\n\t\t\t\thasErr = block.err != nil\n\t\t\t\tseqExecute <- block\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\thist.decoders.literals = block.async.literals\n\t\t\tblock.err = block.prepareSequences(block.async.seqData, &hist)\n\t\t\tif debugDecoder && block.err != nil {\n\t\t\t\tprintln(\"prepareSequences returned:\", block.err)\n\t\t\t}\n\t\t\thasErr = block.err != nil\n\t\t\tif block.err == nil {\n\t\t\t\tblock.err = block.decodeSequences(&hist)\n\t\t\t\tif debugDecoder && block.err != nil {\n\t\t\t\t\tprintln(\"decodeSequences returned:\", block.err)\n\t\t\t\t}\n\t\t\t\thasErr = block.err != nil\n\t\t\t\t//\t\t\t\tblock.async.sequence = hist.decoders.seq[:hist.decoders.nSeqs]\n\t\t\t\tblock.async.seqSize = hist.decoders.seqSize\n\t\t\t}\n\t\t\tseqExecute <- block\n\t\t}\n\t\tclose(seqExecute)\n\t\thist.reset()\n\t}()\n\n\tvar wg sync.WaitGroup\n\twg.Add(1)\n\n\t// Async 3: Execute sequences...\n\tframeHistCache := d.frame.history.b\n\tgo func() {\n\t\tvar hist history\n\t\tvar decodedFrame uint64\n\t\tvar fcs uint64\n\t\tvar hasErr bool\n\t\tfor block := range seqExecute {\n\t\t\tout := decodeOutput{err: block.err, d: block}\n\t\t\tif block.err != nil || hasErr {\n\t\t\t\thasErr = true\n\t\t\t\toutput <- out\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif block.async.newHist != nil {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"Async 2: new history\")\n\t\t\t\t}\n\t\t\t\thist.reset()\n\t\t\t\thist.windowSize = block.async.newHist.windowSize\n\t\t\t\thist.allocFrameBuffer = block.async.newHist.allocFrameBuffer\n\t\t\t\tif block.async.newHist.dict != nil {\n\t\t\t\t\thist.setDict(block.async.newHist.dict)\n\t\t\t\t}\n\n\t\t\t\tif cap(hist.b) < hist.allocFrameBuffer {\n\t\t\t\t\tif cap(frameHistCache) >= hist.allocFrameBuffer {\n\t\t\t\t\t\thist.b = frameHistCache\n\t\t\t\t\t} else {\n\t\t\t\t\t\thist.b = make([]byte, 0, hist.allocFrameBuffer)\n\t\t\t\t\t\tprintln(\"Alloc history sized\", hist.allocFrameBuffer)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thist.b = hist.b[:0]\n\t\t\t\tfcs = block.async.fcs\n\t\t\t\tdecodedFrame = 0\n\t\t\t}\n\t\t\tdo := decodeOutput{err: block.err, d: block}\n\t\t\tswitch block.Type {\n\t\t\tcase blockTypeRLE:\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"add rle block length:\", block.RLESize)\n\t\t\t\t}\n\n\t\t\t\tif cap(block.dst) < int(block.RLESize) {\n\t\t\t\t\tif block.lowMem {\n\t\t\t\t\t\tblock.dst = make([]byte, block.RLESize)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tblock.dst = make([]byte, maxCompressedBlockSize)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tblock.dst = block.dst[:block.RLESize]\n\t\t\t\tv := block.data[0]\n\t\t\t\tfor i := range block.dst {\n\t\t\t\t\tblock.dst[i] = v\n\t\t\t\t}\n\t\t\t\thist.append(block.dst)\n\t\t\t\tdo.b = block.dst\n\t\t\tcase blockTypeRaw:\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"add raw block length:\", len(block.data))\n\t\t\t\t}\n\t\t\t\thist.append(block.data)\n\t\t\t\tdo.b = block.data\n\t\t\tcase blockTypeCompressed:\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"execute with history length:\", len(hist.b), \"window:\", hist.windowSize)\n\t\t\t\t}\n\t\t\t\thist.decoders.seqSize = block.async.seqSize\n\t\t\t\thist.decoders.literals = block.async.literals\n\t\t\t\tdo.err = block.executeSequences(&hist)\n\t\t\t\thasErr = do.err != nil\n\t\t\t\tif debugDecoder && hasErr {\n\t\t\t\t\tprintln(\"executeSequences returned:\", do.err)\n\t\t\t\t}\n\t\t\t\tdo.b = block.dst\n\t\t\t}\n\t\t\tif !hasErr {\n\t\t\t\tdecodedFrame += uint64(len(do.b))\n\t\t\t\tif decodedFrame > fcs {\n\t\t\t\t\tprintln(\"fcs exceeded\", block.Last, fcs, decodedFrame)\n\t\t\t\t\tdo.err = ErrFrameSizeExceeded\n\t\t\t\t\thasErr = true\n\t\t\t\t} else if block.Last && fcs != fcsUnknown && decodedFrame != fcs {\n\t\t\t\t\tdo.err = ErrFrameSizeMismatch\n\t\t\t\t\thasErr = true\n\t\t\t\t} else {\n\t\t\t\t\tif debugDecoder {\n\t\t\t\t\t\tprintln(\"fcs ok\", block.Last, fcs, decodedFrame)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput <- do\n\t\t}\n\t\tclose(output)\n\t\tframeHistCache = hist.b\n\t\twg.Done()\n\t\tif debugDecoder {\n\t\t\tprintln(\"decoder goroutines finished\")\n\t\t}\n\t\thist.reset()\n\t}()\n\n\tvar hist history\ndecodeStream:\n\tfor {\n\t\tvar hasErr bool\n\t\thist.reset()\n\t\tdecodeBlock := func(block *blockDec) {\n\t\t\tif hasErr {\n\t\t\t\tif block != nil {\n\t\t\t\t\tseqDecode <- block\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif block.err != nil || block.Type != blockTypeCompressed {\n\t\t\t\thasErr = block.err != nil\n\t\t\t\tseqDecode <- block\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tremain, err := block.decodeLiterals(block.data, &hist)\n\t\t\tblock.err = err\n\t\t\thasErr = block.err != nil\n\t\t\tif err == nil {\n\t\t\t\tblock.async.literals = hist.decoders.literals\n\t\t\t\tblock.async.seqData = remain\n\t\t\t} else if debugDecoder {\n\t\t\t\tprintln(\"decodeLiterals error:\", err)\n\t\t\t}\n\t\t\tseqDecode <- block\n\t\t}\n\t\tframe := d.frame\n\t\tif debugDecoder {\n\t\t\tprintln(\"New frame...\")\n\t\t}\n\t\tvar historySent bool\n\t\tframe.history.reset()\n\t\terr := frame.reset(&br)\n\t\tif debugDecoder && err != nil {\n\t\t\tprintln(\"Frame decoder returned\", err)\n\t\t}\n\t\tif err == nil {\n\t\t\terr = d.setDict(frame)\n\t\t}\n\t\tif err == nil && d.frame.WindowSize > d.o.maxWindowSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"decoder size exceeded, fws:\", d.frame.WindowSize, \"> mws:\", d.o.maxWindowSize)\n\t\t\t}\n\n\t\t\terr = ErrDecoderSizeExceeded\n\t\t}\n\t\tif err != nil {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\tcase dec := <-d.decoders:\n\t\t\t\tdec.sendErr(err)\n\t\t\t\tdecodeBlock(dec)\n\t\t\t}\n\t\t\tbreak decodeStream\n\t\t}\n\n\t\t// Go through all blocks of the frame.\n\t\tfor {\n\t\t\tvar dec *blockDec\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\tbreak decodeStream\n\t\t\tcase dec = <-d.decoders:\n\t\t\t\t// Once we have a decoder, we MUST return it.\n\t\t\t}\n\t\t\terr := frame.next(dec)\n\t\t\tif !historySent {\n\t\t\t\th := frame.history\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintln(\"Alloc History:\", h.allocFrameBuffer)\n\t\t\t\t}\n\t\t\t\thist.reset()\n\t\t\t\tif h.dict != nil {\n\t\t\t\t\thist.setDict(h.dict)\n\t\t\t\t}\n\t\t\t\tdec.async.newHist = &h\n\t\t\t\tdec.async.fcs = frame.FrameContentSize\n\t\t\t\thistorySent = true\n\t\t\t} else {\n\t\t\t\tdec.async.newHist = nil\n\t\t\t}\n\t\t\tif debugDecoder && err != nil {\n\t\t\t\tprintln(\"next block returned error:\", err)\n\t\t\t}\n\t\t\tdec.err = err\n\t\t\tdec.hasCRC = false\n\t\t\tif dec.Last && frame.HasCheckSum && err == nil {\n\t\t\t\tcrc, err := frame.rawInput.readSmall(4)\n\t\t\t\tif len(crc) < 4 {\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\terr = io.ErrUnexpectedEOF\n\n\t\t\t\t\t}\n\t\t\t\t\tprintln(\"CRC missing?\", err)\n\t\t\t\t\tdec.err = err\n\t\t\t\t} else {\n\t\t\t\t\tdec.checkCRC = binary.LittleEndian.Uint32(crc)\n\t\t\t\t\tdec.hasCRC = true\n\t\t\t\t\tif debugDecoder {\n\t\t\t\t\t\tprintf(\"found crc to check: %08x\\n\", dec.checkCRC)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\terr = dec.err\n\t\t\tlast := dec.Last\n\t\t\tdecodeBlock(dec)\n\t\t\tif err != nil {\n\t\t\t\tbreak decodeStream\n\t\t\t}\n\t\t\tif last {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tclose(seqDecode)\n\twg.Wait()\n\thist.reset()\n\td.frame.history.b = frameHistCache\n}\n\nfunc (d *Decoder) setDict(frame *frameDec) (err error) {\n\tdict, ok := d.o.dicts[frame.DictionaryID]\n\tif ok {\n\t\tif debugDecoder {\n\t\t\tprintln(\"setting dict\", frame.DictionaryID)\n\t\t}\n\t\tframe.history.setDict(dict)\n\t} else if frame.DictionaryID != 0 {\n\t\t// A zero or missing dictionary id is ambiguous:\n\t\t// either dictionary zero, or no dictionary. In particular,\n\t\t// zstd --patch-from uses this id for the source file,\n\t\t// so only return an error if the dictionary id is not zero.\n\t\terr = ErrUnknownDictionary\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/decoder_options.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math/bits\"\n\t\"runtime\"\n)\n\n// DOption is an option for creating a decoder.\ntype DOption func(*decoderOptions) error\n\n// options retains accumulated state of multiple options.\ntype decoderOptions struct {\n\tlowMem          bool\n\tconcurrent      int\n\tmaxDecodedSize  uint64\n\tmaxWindowSize   uint64\n\tdicts           map[uint32]*dict\n\tignoreChecksum  bool\n\tlimitToCap      bool\n\tdecodeBufsBelow int\n\tresetOpt        bool\n}\n\nfunc (o *decoderOptions) setDefault() {\n\t*o = decoderOptions{\n\t\t// use less ram: true for now, but may change.\n\t\tlowMem:          true,\n\t\tconcurrent:      runtime.GOMAXPROCS(0),\n\t\tmaxWindowSize:   MaxWindowSize,\n\t\tdecodeBufsBelow: 128 << 10,\n\t}\n\tif o.concurrent > 4 {\n\t\to.concurrent = 4\n\t}\n\to.maxDecodedSize = 64 << 30\n}\n\n// WithDecoderLowmem will set whether to use a lower amount of memory,\n// but possibly have to allocate more while running.\n// Cannot be changed with ResetWithOptions.\nfunc WithDecoderLowmem(b bool) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif o.resetOpt && b != o.lowMem {\n\t\t\treturn errors.New(\"WithDecoderLowmem cannot be changed on Reset\")\n\t\t}\n\t\to.lowMem = b\n\t\treturn nil\n\t}\n}\n\n// WithDecoderConcurrency sets the number of created decoders.\n// When decoding block with DecodeAll, this will limit the number\n// of possible concurrently running decodes.\n// When decoding streams, this will limit the number of\n// inflight blocks.\n// When decoding streams and setting maximum to 1,\n// no async decoding will be done.\n// The value supplied must be at least 0.\n// When a value of 0 is provided GOMAXPROCS will be used.\n// By default this will be set to 4 or GOMAXPROCS, whatever is lower.\n// Cannot be changed with ResetWithOptions.\nfunc WithDecoderConcurrency(n int) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif n < 0 {\n\t\t\treturn errors.New(\"concurrency must be at least 0\")\n\t\t}\n\t\tnewVal := n\n\t\tif n == 0 {\n\t\t\tnewVal = runtime.GOMAXPROCS(0)\n\t\t}\n\t\tif o.resetOpt && newVal != o.concurrent {\n\t\t\treturn errors.New(\"WithDecoderConcurrency cannot be changed on Reset\")\n\t\t}\n\t\to.concurrent = newVal\n\t\treturn nil\n\t}\n}\n\n// WithDecoderMaxMemory allows to set a maximum decoded size for in-memory\n// non-streaming operations or maximum window size for streaming operations.\n// This can be used to control memory usage of potentially hostile content.\n// Maximum is 1 << 63 bytes. Default is 64GiB.\n// Can be changed with ResetWithOptions.\nfunc WithDecoderMaxMemory(n uint64) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif n == 0 {\n\t\t\treturn errors.New(\"WithDecoderMaxMemory must be at least 1\")\n\t\t}\n\t\tif n > 1<<63 {\n\t\t\treturn errors.New(\"WithDecoderMaxmemory must be less than 1 << 63\")\n\t\t}\n\t\to.maxDecodedSize = n\n\t\treturn nil\n\t}\n}\n\n// WithDecoderDicts allows to register one or more dictionaries for the decoder.\n//\n// Each slice in dict must be in the [dictionary format] produced by\n// \"zstd --train\" from the Zstandard reference implementation.\n//\n// If several dictionaries with the same ID are provided, the last one will be used.\n// Can be changed with ResetWithOptions.\n//\n// [dictionary format]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format\nfunc WithDecoderDicts(dicts ...[]byte) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif o.dicts == nil {\n\t\t\to.dicts = make(map[uint32]*dict)\n\t\t}\n\t\tfor _, b := range dicts {\n\t\t\td, err := loadDict(b)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\to.dicts[d.id] = d\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithDecoderDictRaw registers a dictionary that may be used by the decoder.\n// The slice content can be arbitrary data.\n// Can be changed with ResetWithOptions.\nfunc WithDecoderDictRaw(id uint32, content []byte) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif bits.UintSize > 32 && uint(len(content)) > dictMaxLength {\n\t\t\treturn fmt.Errorf(\"dictionary of size %d > 2GiB too large\", len(content))\n\t\t}\n\t\tif o.dicts == nil {\n\t\t\to.dicts = make(map[uint32]*dict)\n\t\t}\n\t\to.dicts[id] = &dict{id: id, content: content, offsets: [3]int{1, 4, 8}}\n\t\treturn nil\n\t}\n}\n\n// WithDecoderMaxWindow allows to set a maximum window size for decodes.\n// This allows rejecting packets that will cause big memory usage.\n// The Decoder will likely allocate more memory based on the WithDecoderLowmem setting.\n// If WithDecoderMaxMemory is set to a lower value, that will be used.\n// Default is 512MB, Maximum is ~3.75 TB as per zstandard spec.\n// Can be changed with ResetWithOptions.\nfunc WithDecoderMaxWindow(size uint64) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif size < MinWindowSize {\n\t\t\treturn errors.New(\"WithMaxWindowSize must be at least 1KB, 1024 bytes\")\n\t\t}\n\t\tif size > (1<<41)+7*(1<<38) {\n\t\t\treturn errors.New(\"WithMaxWindowSize must be less than (1<<41) + 7*(1<<38) ~ 3.75TB\")\n\t\t}\n\t\to.maxWindowSize = size\n\t\treturn nil\n\t}\n}\n\n// WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes,\n// or any size set in WithDecoderMaxMemory.\n// This can be used to limit decoding to a specific maximum output size.\n// Disabled by default.\n// Can be changed with ResetWithOptions.\nfunc WithDecodeAllCapLimit(b bool) DOption {\n\treturn func(o *decoderOptions) error {\n\t\to.limitToCap = b\n\t\treturn nil\n\t}\n}\n\n// WithDecodeBuffersBelow will fully decode readers that have a\n// `Bytes() []byte` and `Len() int` interface similar to bytes.Buffer.\n// This typically uses less allocations but will have the full decompressed object in memory.\n// Note that DecodeAllCapLimit will disable this, as well as giving a size of 0 or less.\n// Default is 128KiB.\n// Cannot be changed with ResetWithOptions.\nfunc WithDecodeBuffersBelow(size int) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif o.resetOpt && size != o.decodeBufsBelow {\n\t\t\treturn errors.New(\"WithDecodeBuffersBelow cannot be changed on Reset\")\n\t\t}\n\t\to.decodeBufsBelow = size\n\t\treturn nil\n\t}\n}\n\n// IgnoreChecksum allows to forcibly ignore checksum checking.\n// Can be changed with ResetWithOptions.\nfunc IgnoreChecksum(b bool) DOption {\n\treturn func(o *decoderOptions) error {\n\t\to.ignoreChecksum = b\n\t\treturn nil\n\t}\n}\n\n// WithDecoderDictDelete removes dictionaries by ID.\n// If no ids are passed, all dictionaries are deleted.\n// Should be used with ResetWithOptions.\nfunc WithDecoderDictDelete(ids ...uint32) DOption {\n\treturn func(o *decoderOptions) error {\n\t\tif len(ids) == 0 {\n\t\t\tclear(o.dicts)\n\t\t}\n\t\tfor _, id := range ids {\n\t\t\tdelete(o.dicts, id)\n\t\t}\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/dict.go",
    "content": "package zstd\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"sort\"\n\n\t\"github.com/klauspost/compress/huff0\"\n)\n\ntype dict struct {\n\tid uint32\n\n\tlitEnc              *huff0.Scratch\n\tllDec, ofDec, mlDec sequenceDec\n\toffsets             [3]int\n\tcontent             []byte\n}\n\nconst dictMagic = \"\\x37\\xa4\\x30\\xec\"\n\n// Maximum dictionary size for the reference implementation (1.5.3) is 2 GiB.\nconst dictMaxLength = 1 << 31\n\n// ID returns the dictionary id or 0 if d is nil.\nfunc (d *dict) ID() uint32 {\n\tif d == nil {\n\t\treturn 0\n\t}\n\treturn d.id\n}\n\n// ContentSize returns the dictionary content size or 0 if d is nil.\nfunc (d *dict) ContentSize() int {\n\tif d == nil {\n\t\treturn 0\n\t}\n\treturn len(d.content)\n}\n\n// Content returns the dictionary content.\nfunc (d *dict) Content() []byte {\n\tif d == nil {\n\t\treturn nil\n\t}\n\treturn d.content\n}\n\n// Offsets returns the initial offsets.\nfunc (d *dict) Offsets() [3]int {\n\tif d == nil {\n\t\treturn [3]int{}\n\t}\n\treturn d.offsets\n}\n\n// LitEncoder returns the literal encoder.\nfunc (d *dict) LitEncoder() *huff0.Scratch {\n\tif d == nil {\n\t\treturn nil\n\t}\n\treturn d.litEnc\n}\n\n// Load a dictionary as described in\n// https://github.com/facebook/zstd/blob/master/doc/zstd_compression_format.md#dictionary-format\nfunc loadDict(b []byte) (*dict, error) {\n\t// Check static field size.\n\tif len(b) <= 8+(3*4) {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\td := dict{\n\t\tllDec: sequenceDec{fse: &fseDecoder{}},\n\t\tofDec: sequenceDec{fse: &fseDecoder{}},\n\t\tmlDec: sequenceDec{fse: &fseDecoder{}},\n\t}\n\tif string(b[:4]) != dictMagic {\n\t\treturn nil, ErrMagicMismatch\n\t}\n\td.id = binary.LittleEndian.Uint32(b[4:8])\n\tif d.id == 0 {\n\t\treturn nil, errors.New(\"dictionaries cannot have ID 0\")\n\t}\n\n\t// Read literal table\n\tvar err error\n\td.litEnc, b, err = huff0.ReadTable(b[8:], nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading literal table: %w\", err)\n\t}\n\td.litEnc.Reuse = huff0.ReusePolicyMust\n\n\tbr := byteReader{\n\t\tb:   b,\n\t\toff: 0,\n\t}\n\treadDec := func(i tableIndex, dec *fseDecoder) error {\n\t\tif err := dec.readNCount(&br, uint16(maxTableSymbol[i])); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif br.overread() {\n\t\t\treturn io.ErrUnexpectedEOF\n\t\t}\n\t\terr = dec.transform(symbolTableX[i])\n\t\tif err != nil {\n\t\t\tprintln(\"Transform table error:\", err)\n\t\t\treturn err\n\t\t}\n\t\tif debugDecoder || debugEncoder {\n\t\t\tprintln(\"Read table ok\", \"symbolLen:\", dec.symbolLen)\n\t\t}\n\t\t// Set decoders as predefined so they aren't reused.\n\t\tdec.preDefined = true\n\t\treturn nil\n\t}\n\n\tif err := readDec(tableOffsets, d.ofDec.fse); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := readDec(tableMatchLengths, d.mlDec.fse); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := readDec(tableLiteralLengths, d.llDec.fse); err != nil {\n\t\treturn nil, err\n\t}\n\tif br.remain() < 12 {\n\t\treturn nil, io.ErrUnexpectedEOF\n\t}\n\n\td.offsets[0] = int(br.Uint32())\n\tbr.advance(4)\n\td.offsets[1] = int(br.Uint32())\n\tbr.advance(4)\n\td.offsets[2] = int(br.Uint32())\n\tbr.advance(4)\n\tif d.offsets[0] <= 0 || d.offsets[1] <= 0 || d.offsets[2] <= 0 {\n\t\treturn nil, errors.New(\"invalid offset in dictionary\")\n\t}\n\td.content = make([]byte, br.remain())\n\tcopy(d.content, br.unread())\n\tif d.offsets[0] > len(d.content) || d.offsets[1] > len(d.content) || d.offsets[2] > len(d.content) {\n\t\treturn nil, fmt.Errorf(\"initial offset bigger than dictionary content size %d, offsets: %v\", len(d.content), d.offsets)\n\t}\n\n\treturn &d, nil\n}\n\n// InspectDictionary loads a zstd dictionary and provides functions to inspect the content.\nfunc InspectDictionary(b []byte) (interface {\n\tID() uint32\n\tContentSize() int\n\tContent() []byte\n\tOffsets() [3]int\n\tLitEncoder() *huff0.Scratch\n}, error) {\n\tinitPredefined()\n\td, err := loadDict(b)\n\treturn d, err\n}\n\ntype BuildDictOptions struct {\n\t// Dictionary ID.\n\tID uint32\n\n\t// Content to use to create dictionary tables.\n\tContents [][]byte\n\n\t// History to use for all blocks.\n\tHistory []byte\n\n\t// Offsets to use.\n\tOffsets [3]int\n\n\t// CompatV155 will make the dictionary compatible with Zstd v1.5.5 and earlier.\n\t// See https://github.com/facebook/zstd/issues/3724\n\tCompatV155 bool\n\n\t// Use the specified encoder level.\n\t// The dictionary will be built using the specified encoder level,\n\t// which will reflect speed and make the dictionary tailored for that level.\n\t// If not set SpeedBestCompression will be used.\n\tLevel EncoderLevel\n\n\t// DebugOut will write stats and other details here if set.\n\tDebugOut io.Writer\n}\n\nfunc BuildDict(o BuildDictOptions) ([]byte, error) {\n\tinitPredefined()\n\thist := o.History\n\tcontents := o.Contents\n\tdebug := o.DebugOut != nil\n\tprintln := func(args ...any) {\n\t\tif o.DebugOut != nil {\n\t\t\tfmt.Fprintln(o.DebugOut, args...)\n\t\t}\n\t}\n\tprintf := func(s string, args ...any) {\n\t\tif o.DebugOut != nil {\n\t\t\tfmt.Fprintf(o.DebugOut, s, args...)\n\t\t}\n\t}\n\tprint := func(args ...any) {\n\t\tif o.DebugOut != nil {\n\t\t\tfmt.Fprint(o.DebugOut, args...)\n\t\t}\n\t}\n\n\tif int64(len(hist)) > dictMaxLength {\n\t\treturn nil, fmt.Errorf(\"dictionary of size %d > %d\", len(hist), int64(dictMaxLength))\n\t}\n\tif len(hist) < 8 {\n\t\treturn nil, fmt.Errorf(\"dictionary of size %d < %d\", len(hist), 8)\n\t}\n\tif len(contents) == 0 {\n\t\treturn nil, errors.New(\"no content provided\")\n\t}\n\td := dict{\n\t\tid:      o.ID,\n\t\tlitEnc:  nil,\n\t\tllDec:   sequenceDec{},\n\t\tofDec:   sequenceDec{},\n\t\tmlDec:   sequenceDec{},\n\t\toffsets: o.Offsets,\n\t\tcontent: hist,\n\t}\n\tblock := blockEnc{lowMem: false}\n\tblock.init()\n\tenc := encoder(&bestFastEncoder{fastBase: fastBase{maxMatchOff: int32(maxMatchLen), bufferReset: math.MaxInt32 - int32(maxMatchLen*2), lowMem: false}})\n\tif o.Level != 0 {\n\t\teOpts := encoderOptions{\n\t\t\tlevel:      o.Level,\n\t\t\tblockSize:  maxMatchLen,\n\t\t\twindowSize: maxMatchLen,\n\t\t\tdict:       &d,\n\t\t\tlowMem:     false,\n\t\t}\n\t\tenc = eOpts.encoder()\n\t} else {\n\t\to.Level = SpeedBestCompression\n\t}\n\tvar (\n\t\tremain [256]int\n\t\tll     [256]int\n\t\tml     [256]int\n\t\tof     [256]int\n\t)\n\taddValues := func(dst *[256]int, src []byte) {\n\t\tfor _, v := range src {\n\t\t\tdst[v]++\n\t\t}\n\t}\n\taddHist := func(dst *[256]int, src *[256]uint32) {\n\t\tfor i, v := range src {\n\t\t\tdst[i] += int(v)\n\t\t}\n\t}\n\tseqs := 0\n\tnUsed := 0\n\tlitTotal := 0\n\tnewOffsets := make(map[uint32]int, 1000)\n\tfor _, b := range contents {\n\t\tblock.reset(nil)\n\t\tif len(b) < 8 {\n\t\t\tcontinue\n\t\t}\n\t\tnUsed++\n\t\tenc.Reset(&d, true)\n\t\tenc.Encode(&block, b)\n\t\taddValues(&remain, block.literals)\n\t\tlitTotal += len(block.literals)\n\t\tif len(block.sequences) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tseqs += len(block.sequences)\n\t\tblock.genCodes()\n\t\taddHist(&ll, block.coders.llEnc.Histogram())\n\t\taddHist(&ml, block.coders.mlEnc.Histogram())\n\t\taddHist(&of, block.coders.ofEnc.Histogram())\n\t\tfor i, seq := range block.sequences {\n\t\t\tif i > 3 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\toffset := seq.offset\n\t\t\tif offset == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif int(offset) >= len(o.History) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif offset > 3 {\n\t\t\t\tnewOffsets[offset-3]++\n\t\t\t} else {\n\t\t\t\tnewOffsets[uint32(o.Offsets[offset-1])]++\n\t\t\t}\n\t\t}\n\t}\n\t// Find most used offsets.\n\tvar sortedOffsets []uint32\n\tfor k := range newOffsets {\n\t\tsortedOffsets = append(sortedOffsets, k)\n\t}\n\tsort.Slice(sortedOffsets, func(i, j int) bool {\n\t\ta, b := sortedOffsets[i], sortedOffsets[j]\n\t\tif a == b {\n\t\t\t// Prefer the longer offset\n\t\t\treturn sortedOffsets[i] > sortedOffsets[j]\n\t\t}\n\t\treturn newOffsets[sortedOffsets[i]] > newOffsets[sortedOffsets[j]]\n\t})\n\tif len(sortedOffsets) > 3 {\n\t\tif debug {\n\t\t\tprint(\"Offsets:\")\n\t\t\tfor i, v := range sortedOffsets {\n\t\t\t\tif i > 20 {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tprintf(\"[%d: %d],\", v, newOffsets[v])\n\t\t\t}\n\t\t\tprintln(\"\")\n\t\t}\n\n\t\tsortedOffsets = sortedOffsets[:3]\n\t}\n\tfor i, v := range sortedOffsets {\n\t\to.Offsets[i] = int(v)\n\t}\n\tif debug {\n\t\tprintln(\"New repeat offsets\", o.Offsets)\n\t}\n\n\tif nUsed == 0 || seqs == 0 {\n\t\treturn nil, fmt.Errorf(\"%d blocks, %d sequences found\", nUsed, seqs)\n\t}\n\tif debug {\n\t\tprintln(\"Sequences:\", seqs, \"Blocks:\", nUsed, \"Literals:\", litTotal)\n\t}\n\tif seqs/nUsed < 512 {\n\t\t// Use 512 as minimum.\n\t\tnUsed = seqs / 512\n\t\tif nUsed == 0 {\n\t\t\tnUsed = 1\n\t\t}\n\t}\n\tcopyHist := func(dst *fseEncoder, src *[256]int) ([]byte, error) {\n\t\thist := dst.Histogram()\n\t\tvar maxSym uint8\n\t\tvar maxCount int\n\t\tvar fakeLength int\n\t\tfor i, v := range src {\n\t\t\tif v > 0 {\n\t\t\t\tv = v / nUsed\n\t\t\t\tif v == 0 {\n\t\t\t\t\tv = 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif v > maxCount {\n\t\t\t\tmaxCount = v\n\t\t\t}\n\t\t\tif v != 0 {\n\t\t\t\tmaxSym = uint8(i)\n\t\t\t}\n\t\t\tfakeLength += v\n\t\t\thist[i] = uint32(v)\n\t\t}\n\n\t\t// Ensure we aren't trying to represent RLE.\n\t\tif maxCount == fakeLength {\n\t\t\tfor i := range hist {\n\t\t\t\tif uint8(i) == maxSym {\n\t\t\t\t\tfakeLength++\n\t\t\t\t\tmaxSym++\n\t\t\t\t\thist[i+1] = 1\n\t\t\t\t\tif maxSym > 1 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif hist[0] == 0 {\n\t\t\t\t\tfakeLength++\n\t\t\t\t\thist[i] = 1\n\t\t\t\t\tif maxSym > 1 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdst.HistogramFinished(maxSym, maxCount)\n\t\tdst.reUsed = false\n\t\tdst.useRLE = false\n\t\terr := dst.normalizeCount(fakeLength)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif debug {\n\t\t\tprintln(\"RAW:\", dst.count[:maxSym+1], \"NORM:\", dst.norm[:maxSym+1], \"LEN:\", fakeLength)\n\t\t}\n\t\treturn dst.writeCount(nil)\n\t}\n\tif debug {\n\t\tprint(\"Literal lengths: \")\n\t}\n\tllTable, err := copyHist(block.coders.llEnc, &ll)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif debug {\n\t\tprint(\"Match lengths: \")\n\t}\n\tmlTable, err := copyHist(block.coders.mlEnc, &ml)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif debug {\n\t\tprint(\"Offsets: \")\n\t}\n\tofTable, err := copyHist(block.coders.ofEnc, &of)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Literal table\n\tavgSize := min(litTotal, huff0.BlockSizeMax/2)\n\thuffBuff := make([]byte, 0, avgSize)\n\t// Target size\n\tdiv := max(litTotal/avgSize, 1)\n\tif debug {\n\t\tprintln(\"Huffman weights:\")\n\t}\n\tfor i, n := range remain[:] {\n\t\tif n > 0 {\n\t\t\tn = n / div\n\t\t\t// Allow all entries to be represented.\n\t\t\tif n == 0 {\n\t\t\t\tn = 1\n\t\t\t}\n\t\t\thuffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...)\n\t\t\tif debug {\n\t\t\t\tprintf(\"[%d: %d], \", i, n)\n\t\t\t}\n\t\t}\n\t}\n\tif o.CompatV155 && remain[255]/div == 0 {\n\t\thuffBuff = append(huffBuff, 255)\n\t}\n\tscratch := &huff0.Scratch{TableLog: 11}\n\tfor tries := range 255 {\n\t\tscratch = &huff0.Scratch{TableLog: 11}\n\t\t_, _, err = huff0.Compress1X(huffBuff, scratch)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif debug {\n\t\t\tprintf(\"Try %d: Huffman error: %v\\n\", tries+1, err)\n\t\t}\n\t\thuffBuff = huffBuff[:0]\n\t\tif tries == 250 {\n\t\t\tif debug {\n\t\t\t\tprintln(\"Huffman: Bailing out with predefined table\")\n\t\t\t}\n\n\t\t\t// Bail out.... Just generate something\n\t\t\thuffBuff = append(huffBuff, bytes.Repeat([]byte{255}, 10000)...)\n\t\t\tfor i := range 128 {\n\t\t\t\thuffBuff = append(huffBuff, byte(i))\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif errors.Is(err, huff0.ErrIncompressible) {\n\t\t\t// Try truncating least common.\n\t\t\tfor i, n := range remain[:] {\n\t\t\t\tif n > 0 {\n\t\t\t\t\tn = n / (div * (i + 1))\n\t\t\t\t\tif n > 0 {\n\t\t\t\t\t\thuffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif o.CompatV155 && len(huffBuff) > 0 && huffBuff[len(huffBuff)-1] != 255 {\n\t\t\t\thuffBuff = append(huffBuff, 255)\n\t\t\t}\n\t\t\tif len(huffBuff) == 0 {\n\t\t\t\thuffBuff = append(huffBuff, 0, 255)\n\t\t\t}\n\t\t}\n\t\tif errors.Is(err, huff0.ErrUseRLE) {\n\t\t\tfor i, n := range remain[:] {\n\t\t\t\tn = n / (div * (i + 1))\n\t\t\t\t// Allow all entries to be represented.\n\t\t\t\tif n == 0 {\n\t\t\t\t\tn = 1\n\t\t\t\t}\n\t\t\t\thuffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...)\n\t\t\t}\n\t\t}\n\t}\n\n\tvar out bytes.Buffer\n\tout.Write([]byte(dictMagic))\n\tout.Write(binary.LittleEndian.AppendUint32(nil, o.ID))\n\tout.Write(scratch.OutTable)\n\tif debug {\n\t\tprintln(\"huff table:\", len(scratch.OutTable), \"bytes\")\n\t\tprintln(\"of table:\", len(ofTable), \"bytes\")\n\t\tprintln(\"ml table:\", len(mlTable), \"bytes\")\n\t\tprintln(\"ll table:\", len(llTable), \"bytes\")\n\t}\n\tout.Write(ofTable)\n\tout.Write(mlTable)\n\tout.Write(llTable)\n\tout.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[0])))\n\tout.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[1])))\n\tout.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[2])))\n\tout.Write(hist)\n\tif debug {\n\t\t_, err := loadDict(out.Bytes())\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\ti, err := InspectDictionary(out.Bytes())\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tprintln(\"ID:\", i.ID())\n\t\tprintln(\"Content size:\", i.ContentSize())\n\t\tprintln(\"Encoder:\", i.LitEncoder() != nil)\n\t\tprintln(\"Offsets:\", i.Offsets())\n\t\tvar totalSize int\n\t\tfor _, b := range contents {\n\t\t\ttotalSize += len(b)\n\t\t}\n\n\t\tencWith := func(opts ...EOption) int {\n\t\t\tenc, err := NewWriter(nil, opts...)\n\t\t\tif err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t\tdefer enc.Close()\n\t\t\tvar dst []byte\n\t\t\tvar totalSize int\n\t\t\tfor _, b := range contents {\n\t\t\t\tdst = enc.EncodeAll(b, dst[:0])\n\t\t\t\ttotalSize += len(dst)\n\t\t\t}\n\t\t\treturn totalSize\n\t\t}\n\t\tplain := encWith(WithEncoderLevel(o.Level))\n\t\twithDict := encWith(WithEncoderLevel(o.Level), WithEncoderDict(out.Bytes()))\n\t\tprintln(\"Input size:\", totalSize)\n\t\tprintln(\"Plain Compressed:\", plain)\n\t\tprintln(\"Dict Compressed:\", withDict)\n\t\tprintln(\"Saved:\", plain-withDict, (plain-withDict)/len(contents), \"bytes per input (rounded down)\")\n\t}\n\treturn out.Bytes(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/enc_base.go",
    "content": "package zstd\n\nimport (\n\t\"fmt\"\n\t\"math/bits\"\n\n\t\"github.com/klauspost/compress/zstd/internal/xxhash\"\n)\n\nconst (\n\tdictShardBits = 7\n)\n\ntype fastBase struct {\n\t// cur is the offset at the start of hist\n\tcur int32\n\t// maximum offset. Should be at least 2x block size.\n\tmaxMatchOff int32\n\tbufferReset int32\n\thist        []byte\n\tcrc         *xxhash.Digest\n\ttmp         [8]byte\n\tblk         *blockEnc\n\tlastDictID  uint32\n\tlowMem      bool\n}\n\n// CRC returns the underlying CRC writer.\nfunc (e *fastBase) CRC() *xxhash.Digest {\n\treturn e.crc\n}\n\n// AppendCRC will append the CRC to the destination slice and return it.\nfunc (e *fastBase) AppendCRC(dst []byte) []byte {\n\tcrc := e.crc.Sum(e.tmp[:0])\n\tdst = append(dst, crc[7], crc[6], crc[5], crc[4])\n\treturn dst\n}\n\n// WindowSize returns the window size of the encoder,\n// or a window size small enough to contain the input size, if > 0.\nfunc (e *fastBase) WindowSize(size int64) int32 {\n\tif size > 0 && size < int64(e.maxMatchOff) {\n\t\tb := max(\n\t\t\t// Keep minimum window.\n\t\t\tint32(1)<<uint(bits.Len(uint(size))), 1024)\n\t\treturn b\n\t}\n\treturn e.maxMatchOff\n}\n\n// Block returns the current block.\nfunc (e *fastBase) Block() *blockEnc {\n\treturn e.blk\n}\n\nfunc (e *fastBase) addBlock(src []byte) int32 {\n\tif debugAsserts && e.cur > e.bufferReset {\n\t\tpanic(fmt.Sprintf(\"ecur (%d) > buffer reset (%d)\", e.cur, e.bufferReset))\n\t}\n\t// check if we have space already\n\tif len(e.hist)+len(src) > cap(e.hist) {\n\t\tif cap(e.hist) == 0 {\n\t\t\te.ensureHist(len(src))\n\t\t} else {\n\t\t\tif cap(e.hist) < int(e.maxMatchOff+maxCompressedBlockSize) {\n\t\t\t\tpanic(fmt.Errorf(\"unexpected buffer cap %d, want at least %d with window %d\", cap(e.hist), e.maxMatchOff+maxCompressedBlockSize, e.maxMatchOff))\n\t\t\t}\n\t\t\t// Move down\n\t\t\toffset := int32(len(e.hist)) - e.maxMatchOff\n\t\t\tcopy(e.hist[0:e.maxMatchOff], e.hist[offset:])\n\t\t\te.cur += offset\n\t\t\te.hist = e.hist[:e.maxMatchOff]\n\t\t}\n\t}\n\ts := int32(len(e.hist))\n\te.hist = append(e.hist, src...)\n\treturn s\n}\n\n// ensureHist will ensure that history can keep at least this many bytes.\nfunc (e *fastBase) ensureHist(n int) {\n\tif cap(e.hist) >= n {\n\t\treturn\n\t}\n\tl := e.maxMatchOff\n\tif (e.lowMem && e.maxMatchOff > maxCompressedBlockSize) || e.maxMatchOff <= maxCompressedBlockSize {\n\t\tl += maxCompressedBlockSize\n\t} else {\n\t\tl += e.maxMatchOff\n\t}\n\t// Make it at least 1MB.\n\tif l < 1<<20 && !e.lowMem {\n\t\tl = 1 << 20\n\t}\n\t// Make it at least the requested size.\n\tif l < int32(n) {\n\t\tl = int32(n)\n\t}\n\te.hist = make([]byte, 0, l)\n}\n\n// useBlock will replace the block with the provided one,\n// but transfer recent offsets from the previous.\nfunc (e *fastBase) UseBlock(enc *blockEnc) {\n\tenc.reset(e.blk)\n\te.blk = enc\n}\n\nfunc (e *fastBase) matchlen(s, t int32, src []byte) int32 {\n\tif debugAsserts {\n\t\tif s < 0 {\n\t\t\terr := fmt.Sprintf(\"s (%d) < 0\", s)\n\t\t\tpanic(err)\n\t\t}\n\t\tif t < 0 {\n\t\t\terr := fmt.Sprintf(\"t (%d) < 0\", t)\n\t\t\tpanic(err)\n\t\t}\n\t\tif s-t > e.maxMatchOff {\n\t\t\terr := fmt.Sprintf(\"s (%d) - t (%d) > maxMatchOff (%d)\", s, t, e.maxMatchOff)\n\t\t\tpanic(err)\n\t\t}\n\t\tif len(src)-int(s) > maxCompressedBlockSize {\n\t\t\tpanic(fmt.Sprintf(\"len(src)-s (%d) > maxCompressedBlockSize (%d)\", len(src)-int(s), maxCompressedBlockSize))\n\t\t}\n\t}\n\treturn int32(matchLen(src[s:], src[t:]))\n}\n\n// Reset the encoding table.\nfunc (e *fastBase) resetBase(d *dict, singleBlock bool) {\n\tif e.blk == nil {\n\t\te.blk = &blockEnc{lowMem: e.lowMem}\n\t\te.blk.init()\n\t} else {\n\t\te.blk.reset(nil)\n\t}\n\te.blk.initNewEncode()\n\tif e.crc == nil {\n\t\te.crc = xxhash.New()\n\t} else {\n\t\te.crc.Reset()\n\t}\n\te.blk.dictLitEnc = nil\n\tif d != nil {\n\t\tlow := e.lowMem\n\t\tif singleBlock {\n\t\t\te.lowMem = true\n\t\t}\n\t\te.ensureHist(d.ContentSize() + maxCompressedBlockSize)\n\t\te.lowMem = low\n\t}\n\n\t// We offset current position so everything will be out of reach.\n\t// If above reset line, history will be purged.\n\tif e.cur < e.bufferReset {\n\t\te.cur += e.maxMatchOff + int32(len(e.hist))\n\t}\n\te.hist = e.hist[:0]\n\tif d != nil {\n\t\t// Set offsets (currently not used)\n\t\tfor i, off := range d.offsets {\n\t\t\te.blk.recentOffsets[i] = uint32(off)\n\t\t\te.blk.prevRecentOffsets[i] = e.blk.recentOffsets[i]\n\t\t}\n\t\t// Transfer litenc.\n\t\te.blk.dictLitEnc = d.litEnc\n\t\te.hist = append(e.hist, d.content...)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/enc_best.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/klauspost/compress\"\n)\n\nconst (\n\tbestLongTableBits = 22                     // Bits used in the long match table\n\tbestLongTableSize = 1 << bestLongTableBits // Size of the table\n\tbestLongLen       = 8                      // Bytes used for table hash\n\n\t// Note: Increasing the short table bits or making the hash shorter\n\t// can actually lead to compression degradation since it will 'steal' more from the\n\t// long match table and match offsets are quite big.\n\t// This greatly depends on the type of input.\n\tbestShortTableBits = 18                      // Bits used in the short match table\n\tbestShortTableSize = 1 << bestShortTableBits // Size of the table\n\tbestShortLen       = 4                       // Bytes used for table hash\n\n)\n\ntype match struct {\n\toffset int32\n\ts      int32\n\tlength int32\n\trep    int32\n\test    int32\n}\n\nconst highScore = maxMatchLen * 8\n\n// estBits will estimate output bits from predefined tables.\nfunc (m *match) estBits(bitsPerByte int32) {\n\tmlc := mlCode(uint32(m.length - zstdMinMatch))\n\tvar ofc uint8\n\tif m.rep < 0 {\n\t\tofc = ofCode(uint32(m.s-m.offset) + 3)\n\t} else {\n\t\tofc = ofCode(uint32(m.rep) & 3)\n\t}\n\t// Cost, excluding\n\tofTT, mlTT := fsePredefEnc[tableOffsets].ct.symbolTT[ofc], fsePredefEnc[tableMatchLengths].ct.symbolTT[mlc]\n\n\t// Add cost of match encoding...\n\tm.est = int32(ofTT.outBits + mlTT.outBits)\n\tm.est += int32(ofTT.deltaNbBits>>16 + mlTT.deltaNbBits>>16)\n\t// Subtract savings compared to literal encoding...\n\tm.est -= (m.length * bitsPerByte) >> 10\n\tif m.est > 0 {\n\t\t// Unlikely gain..\n\t\tm.length = 0\n\t\tm.est = highScore\n\t}\n}\n\n// bestFastEncoder uses 2 tables, one for short matches (5 bytes) and one for long matches.\n// The long match table contains the previous entry with the same hash,\n// effectively making it a \"chain\" of length 2.\n// When we find a long match we choose between the two values and select the longest.\n// When we find a short match, after checking the long, we check if we can find a long at n+1\n// and that it is longer (lazy matching).\ntype bestFastEncoder struct {\n\tfastBase\n\ttable         [bestShortTableSize]prevEntry\n\tlongTable     [bestLongTableSize]prevEntry\n\tdictTable     []prevEntry\n\tdictLongTable []prevEntry\n}\n\n// Encode improves compression...\nfunc (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 4\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\te.table = [bestShortTableSize]prevEntry{}\n\t\t\te.longTable = [bestLongTableSize]prevEntry{}\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tv2 := e.table[i].prev\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t\tv2 = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t\tif v2 < minOff {\n\t\t\t\t\tv2 = 0\n\t\t\t\t} else {\n\t\t\t\t\tv2 = v2 - e.cur + e.maxMatchOff\n\t\t\t\t}\n\t\t\t}\n\t\t\te.table[i] = prevEntry{\n\t\t\t\toffset: v,\n\t\t\t\tprev:   v2,\n\t\t\t}\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\tv := e.longTable[i].offset\n\t\t\tv2 := e.longTable[i].prev\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t\tv2 = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t\tif v2 < minOff {\n\t\t\t\t\tv2 = 0\n\t\t\t\t} else {\n\t\t\t\t\tv2 = v2 - e.cur + e.maxMatchOff\n\t\t\t\t}\n\t\t\t}\n\t\t\te.longTable[i] = prevEntry{\n\t\t\t\toffset: v,\n\t\t\t\tprev:   v2,\n\t\t\t}\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\t// Add block to history\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\n\t// Check RLE first\n\tif len(src) > zstdMinMatch {\n\t\tml := matchLen(src[1:], src)\n\t\tif ml == len(src)-1 {\n\t\t\tblk.literals = append(blk.literals, src[0])\n\t\t\tblk.sequences = append(blk.sequences, seq{litLen: 1, matchLen: uint32(len(src)-1) - zstdMinMatch, offset: 1 + 3})\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Use this to estimate literal cost.\n\t// Scaled by 10 bits.\n\tbitsPerByte := max(\n\t\t// Huffman can never go < 1 bit/byte\n\t\tint32((compress.ShannonEntropyBits(src)*1024)/len(src)), 1024)\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\tconst kSearchStrength = 10\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\toffset3 := int32(blk.recentOffsets[2])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\t// We allow the encoder to optionally turn off repeat offsets across blocks\n\t\tcanRepeat := len(blk.sequences) > 2\n\n\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\tpanic(\"offset0 was 0\")\n\t\t}\n\n\t\tconst goodEnough = 250\n\n\t\tcv := load6432(src, s)\n\n\t\tnextHashL := hashLen(cv, bestLongTableBits, bestLongLen)\n\t\tnextHashS := hashLen(cv, bestShortTableBits, bestShortLen)\n\t\tcandidateL := e.longTable[nextHashL]\n\t\tcandidateS := e.table[nextHashS]\n\n\t\t// Set m to a match at offset if it looks like that will improve compression.\n\t\timprove := func(m *match, offset int32, s int32, first uint32, rep int32) {\n\t\t\tdelta := s - offset\n\t\t\tif delta >= e.maxMatchOff || delta <= 0 || load3232(src, offset) != first {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Try to quick reject if we already have a long match.\n\t\t\tif m.length > 16 {\n\t\t\t\tleft := len(src) - int(m.s+m.length)\n\t\t\t\t// If we are too close to the end, keep as is.\n\t\t\t\tif left <= 0 {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tcheckLen := m.length - (s - m.s) - 8\n\t\t\t\tif left > 2 && checkLen > 4 {\n\t\t\t\t\t// Check 4 bytes, 4 bytes from the end of the current match.\n\t\t\t\t\ta := load3232(src, offset+checkLen)\n\t\t\t\t\tb := load3232(src, s+checkLen)\n\t\t\t\t\tif a != b {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tl := 4 + e.matchlen(s+4, offset+4, src)\n\t\t\tif m.rep <= 0 {\n\t\t\t\t// Extend candidate match backwards as far as possible.\n\t\t\t\t// Do not extend repeats as we can assume they are optimal\n\t\t\t\t// and offsets change if s == nextEmit.\n\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\tfor offset > tMin && s > nextEmit && src[offset-1] == src[s-1] && l < maxMatchLength {\n\t\t\t\t\ts--\n\t\t\t\t\toffset--\n\t\t\t\t\tl++\n\t\t\t\t}\n\t\t\t}\n\t\t\tif debugAsserts {\n\t\t\t\tif offset >= s {\n\t\t\t\t\tpanic(fmt.Sprintf(\"offset: %d - s:%d - rep: %d - cur :%d - max: %d\", offset, s, rep, e.cur, e.maxMatchOff))\n\t\t\t\t}\n\t\t\t\tif !bytes.Equal(src[s:s+l], src[offset:offset+l]) {\n\t\t\t\t\tpanic(fmt.Sprintf(\"second match mismatch: %v != %v, first: %08x\", src[s:s+4], src[offset:offset+4], first))\n\t\t\t\t}\n\t\t\t}\n\t\t\tcand := match{offset: offset, s: s, length: l, rep: rep}\n\t\t\tcand.estBits(bitsPerByte)\n\t\t\tif m.est >= highScore || cand.est-m.est+(cand.s-m.s)*bitsPerByte>>10 < 0 {\n\t\t\t\t*m = cand\n\t\t\t}\n\t\t}\n\n\t\tbest := match{s: s, est: highScore}\n\t\timprove(&best, candidateL.offset-e.cur, s, uint32(cv), -1)\n\t\timprove(&best, candidateL.prev-e.cur, s, uint32(cv), -1)\n\t\timprove(&best, candidateS.offset-e.cur, s, uint32(cv), -1)\n\t\timprove(&best, candidateS.prev-e.cur, s, uint32(cv), -1)\n\n\t\tif canRepeat && best.length < goodEnough {\n\t\t\tif s == nextEmit {\n\t\t\t\t// Check repeats straight after a match.\n\t\t\t\timprove(&best, s-offset2, s, uint32(cv), 1|4)\n\t\t\t\timprove(&best, s-offset3, s, uint32(cv), 2|4)\n\t\t\t\tif offset1 > 1 {\n\t\t\t\t\timprove(&best, s-(offset1-1), s, uint32(cv), 3|4)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If either no match or a non-repeat match, check at + 1\n\t\t\tif best.rep <= 0 {\n\t\t\t\tcv32 := uint32(cv >> 8)\n\t\t\t\tspp := s + 1\n\t\t\t\timprove(&best, spp-offset1, spp, cv32, 1)\n\t\t\t\timprove(&best, spp-offset2, spp, cv32, 2)\n\t\t\t\timprove(&best, spp-offset3, spp, cv32, 3)\n\t\t\t\tif best.rep < 0 {\n\t\t\t\t\tcv32 = uint32(cv >> 24)\n\t\t\t\t\tspp += 2\n\t\t\t\t\timprove(&best, spp-offset1, spp, cv32, 1)\n\t\t\t\t\timprove(&best, spp-offset2, spp, cv32, 2)\n\t\t\t\t\timprove(&best, spp-offset3, spp, cv32, 3)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Load next and check...\n\t\te.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: candidateL.offset}\n\t\te.table[nextHashS] = prevEntry{offset: s + e.cur, prev: candidateS.offset}\n\t\tindex0 := s + 1\n\n\t\t// Look far ahead, unless we have a really long match already...\n\t\tif best.length < goodEnough {\n\t\t\t// No match found, move forward on input, no need to check forward...\n\t\t\tif best.length < 4 {\n\t\t\t\ts += 1 + (s-nextEmit)>>(kSearchStrength-1)\n\t\t\t\tif s >= sLimit {\n\t\t\t\t\tbreak encodeLoop\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tcandidateS = e.table[hashLen(cv>>8, bestShortTableBits, bestShortLen)]\n\t\t\tcv = load6432(src, s+1)\n\t\t\tcv2 := load6432(src, s+2)\n\t\t\tcandidateL = e.longTable[hashLen(cv, bestLongTableBits, bestLongLen)]\n\t\t\tcandidateL2 := e.longTable[hashLen(cv2, bestLongTableBits, bestLongLen)]\n\n\t\t\t// Short at s+1\n\t\t\timprove(&best, candidateS.offset-e.cur, s+1, uint32(cv), -1)\n\t\t\t// Long at s+1, s+2\n\t\t\timprove(&best, candidateL.offset-e.cur, s+1, uint32(cv), -1)\n\t\t\timprove(&best, candidateL.prev-e.cur, s+1, uint32(cv), -1)\n\t\t\timprove(&best, candidateL2.offset-e.cur, s+2, uint32(cv2), -1)\n\t\t\timprove(&best, candidateL2.prev-e.cur, s+2, uint32(cv2), -1)\n\t\t\tif false {\n\t\t\t\t// Short at s+3.\n\t\t\t\t// Too often worse...\n\t\t\t\timprove(&best, e.table[hashLen(cv2>>8, bestShortTableBits, bestShortLen)].offset-e.cur, s+3, uint32(cv2>>8), -1)\n\t\t\t}\n\n\t\t\t// Start check at a fixed offset to allow for a few mismatches.\n\t\t\t// For this compression level 2 yields the best results.\n\t\t\t// We cannot do this if we have already indexed this position.\n\t\t\tconst skipBeginning = 2\n\t\t\tif best.s > s-skipBeginning {\n\t\t\t\t// See if we can find a better match by checking where the current best ends.\n\t\t\t\t// Use that offset to see if we can find a better full match.\n\t\t\t\tif sAt := best.s + best.length; sAt < sLimit {\n\t\t\t\t\tnextHashL := hashLen(load6432(src, sAt), bestLongTableBits, bestLongLen)\n\t\t\t\t\tcandidateEnd := e.longTable[nextHashL]\n\n\t\t\t\t\tif off := candidateEnd.offset - e.cur - best.length + skipBeginning; off >= 0 {\n\t\t\t\t\t\timprove(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)\n\t\t\t\t\t\tif off := candidateEnd.prev - e.cur - best.length + skipBeginning; off >= 0 {\n\t\t\t\t\t\t\timprove(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif debugAsserts {\n\t\t\tif best.offset >= best.s {\n\t\t\t\tpanic(fmt.Sprintf(\"best.offset > s: %d >= %d\", best.offset, best.s))\n\t\t\t}\n\t\t\tif best.s < nextEmit {\n\t\t\t\tpanic(fmt.Sprintf(\"s %d < nextEmit %d\", best.s, nextEmit))\n\t\t\t}\n\t\t\tif best.offset < s-e.maxMatchOff {\n\t\t\t\tpanic(fmt.Sprintf(\"best.offset < s-e.maxMatchOff: %d < %d\", best.offset, s-e.maxMatchOff))\n\t\t\t}\n\t\t\tif !bytes.Equal(src[best.s:best.s+best.length], src[best.offset:best.offset+best.length]) {\n\t\t\t\tpanic(fmt.Sprintf(\"match mismatch: %v != %v\", src[best.s:best.s+best.length], src[best.offset:best.offset+best.length]))\n\t\t\t}\n\t\t}\n\n\t\t// We have a match, we can store the forward value\n\t\ts = best.s\n\t\tif best.rep > 0 {\n\t\t\tvar seq seq\n\t\t\tseq.matchLen = uint32(best.length - zstdMinMatch)\n\t\t\taddLiterals(&seq, best.s)\n\n\t\t\t// Repeat. If bit 4 is set, this is a non-lit repeat.\n\t\t\tseq.offset = uint32(best.rep & 3)\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", best.s, \"off:\", best.s-best.offset)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Index old s + 1 -> s - 1\n\t\t\ts = best.s + best.length\n\t\t\tnextEmit = s\n\n\t\t\t// Index skipped...\n\t\t\tend := min(s, sLimit+4)\n\t\t\toff := index0 + e.cur\n\t\t\tfor index0 < end {\n\t\t\t\tcv0 := load6432(src, index0)\n\t\t\t\th0 := hashLen(cv0, bestLongTableBits, bestLongLen)\n\t\t\t\th1 := hashLen(cv0, bestShortTableBits, bestShortLen)\n\t\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\t\te.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset}\n\t\t\t\toff++\n\t\t\t\tindex0++\n\t\t\t}\n\n\t\t\tswitch best.rep {\n\t\t\tcase 2, 4 | 1:\n\t\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tcase 3, 4 | 2:\n\t\t\t\toffset1, offset2, offset3 = offset3, offset1, offset2\n\t\t\tcase 4 | 3:\n\t\t\t\toffset1, offset2, offset3 = offset1-1, offset1, offset2\n\t\t\t}\n\t\t\tif s >= sLimit {\n\t\t\t\tif debugEncoder {\n\t\t\t\t\tprintln(\"repeat ended\", s, best.length)\n\t\t\t\t}\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// A 4-byte match has been found. Update recent offsets.\n\t\t// We'll later see if more than 4 bytes.\n\t\tt := best.offset\n\t\toffset1, offset2, offset3 = s-t, offset1, offset2\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tl := best.length\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\n\t\t// Index old s + 1 -> s - 1 or sLimit\n\t\tend := min(s, sLimit-4)\n\n\t\toff := index0 + e.cur\n\t\tfor index0 < end {\n\t\t\tcv0 := load6432(src, index0)\n\t\t\th0 := hashLen(cv0, bestLongTableBits, bestLongLen)\n\t\t\th1 := hashLen(cv0, bestShortTableBits, bestShortLen)\n\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\te.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset}\n\t\t\tindex0++\n\t\t\toff++\n\t\t}\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tblk.recentOffsets[2] = uint32(offset3)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// EncodeNoHist will encode a block with no history and no following blocks.\n// Most notable difference is that src will not be copied for history and\n// we do not need to check for max match length.\nfunc (e *bestFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {\n\te.ensureHist(len(src))\n\te.Encode(blk, src)\n}\n\n// Reset will reset and set a dictionary if not nil\nfunc (e *bestFastEncoder) Reset(d *dict, singleBlock bool) {\n\te.resetBase(d, singleBlock)\n\tif d == nil {\n\t\treturn\n\t}\n\t// Init or copy dict table\n\tif len(e.dictTable) != len(e.table) || d.id != e.lastDictID {\n\t\tif len(e.dictTable) != len(e.table) {\n\t\t\te.dictTable = make([]prevEntry, len(e.table))\n\t\t}\n\t\tend := int32(len(d.content)) - 8 + e.maxMatchOff\n\t\tfor i := e.maxMatchOff; i < end; i += 4 {\n\t\t\tconst hashLog = bestShortTableBits\n\n\t\t\tcv := load6432(d.content, i-e.maxMatchOff)\n\t\t\tnextHash := hashLen(cv, hashLog, bestShortLen)      // 0 -> 4\n\t\t\tnextHash1 := hashLen(cv>>8, hashLog, bestShortLen)  // 1 -> 5\n\t\t\tnextHash2 := hashLen(cv>>16, hashLog, bestShortLen) // 2 -> 6\n\t\t\tnextHash3 := hashLen(cv>>24, hashLog, bestShortLen) // 3 -> 7\n\t\t\te.dictTable[nextHash] = prevEntry{\n\t\t\t\tprev:   e.dictTable[nextHash].offset,\n\t\t\t\toffset: i,\n\t\t\t}\n\t\t\te.dictTable[nextHash1] = prevEntry{\n\t\t\t\tprev:   e.dictTable[nextHash1].offset,\n\t\t\t\toffset: i + 1,\n\t\t\t}\n\t\t\te.dictTable[nextHash2] = prevEntry{\n\t\t\t\tprev:   e.dictTable[nextHash2].offset,\n\t\t\t\toffset: i + 2,\n\t\t\t}\n\t\t\te.dictTable[nextHash3] = prevEntry{\n\t\t\t\tprev:   e.dictTable[nextHash3].offset,\n\t\t\t\toffset: i + 3,\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t}\n\n\t// Init or copy dict table\n\tif len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID {\n\t\tif len(e.dictLongTable) != len(e.longTable) {\n\t\t\te.dictLongTable = make([]prevEntry, len(e.longTable))\n\t\t}\n\t\tif len(d.content) >= 8 {\n\t\t\tcv := load6432(d.content, 0)\n\t\t\th := hashLen(cv, bestLongTableBits, bestLongLen)\n\t\t\te.dictLongTable[h] = prevEntry{\n\t\t\t\toffset: e.maxMatchOff,\n\t\t\t\tprev:   e.dictLongTable[h].offset,\n\t\t\t}\n\n\t\t\tend := int32(len(d.content)) - 8 + e.maxMatchOff\n\t\t\toff := 8 // First to read\n\t\t\tfor i := e.maxMatchOff + 1; i < end; i++ {\n\t\t\t\tcv = cv>>8 | (uint64(d.content[off]) << 56)\n\t\t\t\th := hashLen(cv, bestLongTableBits, bestLongLen)\n\t\t\t\te.dictLongTable[h] = prevEntry{\n\t\t\t\t\toffset: i,\n\t\t\t\t\tprev:   e.dictLongTable[h].offset,\n\t\t\t\t}\n\t\t\t\toff++\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t}\n\t// Reset table to initial state\n\tcopy(e.longTable[:], e.dictLongTable)\n\n\te.cur = e.maxMatchOff\n\t// Reset table to initial state\n\tcopy(e.table[:], e.dictTable)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/enc_better.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport \"fmt\"\n\nconst (\n\tbetterLongTableBits = 19                       // Bits used in the long match table\n\tbetterLongTableSize = 1 << betterLongTableBits // Size of the table\n\tbetterLongLen       = 8                        // Bytes used for table hash\n\n\t// Note: Increasing the short table bits or making the hash shorter\n\t// can actually lead to compression degradation since it will 'steal' more from the\n\t// long match table and match offsets are quite big.\n\t// This greatly depends on the type of input.\n\tbetterShortTableBits = 13                        // Bits used in the short match table\n\tbetterShortTableSize = 1 << betterShortTableBits // Size of the table\n\tbetterShortLen       = 5                         // Bytes used for table hash\n\n\tbetterLongTableShardCnt  = 1 << (betterLongTableBits - dictShardBits)    // Number of shards in the table\n\tbetterLongTableShardSize = betterLongTableSize / betterLongTableShardCnt // Size of an individual shard\n\n\tbetterShortTableShardCnt  = 1 << (betterShortTableBits - dictShardBits)     // Number of shards in the table\n\tbetterShortTableShardSize = betterShortTableSize / betterShortTableShardCnt // Size of an individual shard\n)\n\ntype prevEntry struct {\n\toffset int32\n\tprev   int32\n}\n\n// betterFastEncoder uses 2 tables, one for short matches (5 bytes) and one for long matches.\n// The long match table contains the previous entry with the same hash,\n// effectively making it a \"chain\" of length 2.\n// When we find a long match we choose between the two values and select the longest.\n// When we find a short match, after checking the long, we check if we can find a long at n+1\n// and that it is longer (lazy matching).\ntype betterFastEncoder struct {\n\tfastBase\n\ttable     [betterShortTableSize]tableEntry\n\tlongTable [betterLongTableSize]prevEntry\n}\n\ntype betterFastEncoderDict struct {\n\tbetterFastEncoder\n\tdictTable            []tableEntry\n\tdictLongTable        []prevEntry\n\tshortTableShardDirty [betterShortTableShardCnt]bool\n\tlongTableShardDirty  [betterLongTableShardCnt]bool\n\tallDirty             bool\n}\n\n// Encode improves compression...\nfunc (e *betterFastEncoder) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 2\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\te.table = [betterShortTableSize]tableEntry{}\n\t\t\te.longTable = [betterLongTableSize]prevEntry{}\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\tv := e.longTable[i].offset\n\t\t\tv2 := e.longTable[i].prev\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t\tv2 = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t\tif v2 < minOff {\n\t\t\t\t\tv2 = 0\n\t\t\t\t} else {\n\t\t\t\t\tv2 = v2 - e.cur + e.maxMatchOff\n\t\t\t\t}\n\t\t\t}\n\t\t\te.longTable[i] = prevEntry{\n\t\t\t\toffset: v,\n\t\t\t\tprev:   v2,\n\t\t\t}\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\t// Add block to history\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\n\t// Check RLE first\n\tif len(src) > zstdMinMatch {\n\t\tml := matchLen(src[1:], src)\n\t\tif ml == len(src)-1 {\n\t\t\tblk.literals = append(blk.literals, src[0])\n\t\t\tblk.sequences = append(blk.sequences, seq{litLen: 1, matchLen: uint32(len(src)-1) - zstdMinMatch, offset: 1 + 3})\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 1.\n\tconst stepSize = 1\n\n\tconst kSearchStrength = 9\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\tvar t int32\n\t\t// We allow the encoder to optionally turn off repeat offsets across blocks\n\t\tcanRepeat := len(blk.sequences) > 2\n\t\tvar matched, index0 int32\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHashL := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\tnextHashS := hashLen(cv, betterShortTableBits, betterShortLen)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcandidateS := e.table[nextHashS]\n\n\t\t\tconst repOff = 1\n\t\t\trepIndex := s - offset1 + repOff\n\t\t\toff := s + e.cur\n\t\t\te.longTable[nextHashL] = prevEntry{offset: off, prev: candidateL.offset}\n\t\t\te.table[nextHashS] = tableEntry{offset: off, val: uint32(cv)}\n\t\t\tindex0 = s + 1\n\n\t\t\tif canRepeat {\n\t\t\t\tif repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 4 + e.matchlen(s+4+repOff, repIndex+4, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 0\n\t\t\t\t\tseq.offset = 1\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t\t\t// Index match start+1 (long) -> s - 1\n\t\t\t\t\tindex0 := s + repOff\n\t\t\t\t\ts += length + repOff\n\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\t\t\t\t\t// Index skipped...\n\t\t\t\t\tfor index0 < s-1 {\n\t\t\t\t\t\tcv0 := load6432(src, index0)\n\t\t\t\t\t\tcv1 := cv0 >> 8\n\t\t\t\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\t\t\t\toff := index0 + e.cur\n\t\t\t\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\t\t\t\te.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\t\t\t\tindex0 += 2\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst repOff2 = 1\n\n\t\t\t\t// We deviate from the reference encoder and also check offset 2.\n\t\t\t\t// Still slower and not much better, so disabled.\n\t\t\t\t// repIndex = s - offset2 + repOff2\n\t\t\t\tif false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 8 + e.matchlen(s+8+repOff2, repIndex+8, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff2\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 2\n\t\t\t\t\tseq.offset = 2\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence 2\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t\t\ts += length + repOff2\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\n\t\t\t\t\t// Index skipped...\n\t\t\t\t\tfor index0 < s-1 {\n\t\t\t\t\t\tcv0 := load6432(src, index0)\n\t\t\t\t\t\tcv1 := cv0 >> 8\n\t\t\t\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\t\t\t\toff := index0 + e.cur\n\t\t\t\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\t\t\t\te.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\t\t\t\tindex0 += 2\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\t// Swap offsets\n\t\t\t\t\toffset1, offset2 = offset2, offset1\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the offsets of our two matches.\n\t\t\tcoffsetL := candidateL.offset - e.cur\n\t\t\tcoffsetLP := candidateL.prev - e.cur\n\n\t\t\t// Check if we have a long match.\n\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\tmatched = e.matchlen(s+8, coffsetL+8, src) + 8\n\t\t\t\tt = coffsetL\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\n\t\t\t\tif s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tprevMatch := e.matchlen(s+8, coffsetLP+8, src) + 8\n\t\t\t\t\tif prevMatch > matched {\n\t\t\t\t\t\tmatched = prevMatch\n\t\t\t\t\t\tt = coffsetLP\n\t\t\t\t\t}\n\t\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t\t}\n\t\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t\t}\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we have a long match on prev.\n\t\t\tif s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) {\n\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\tmatched = e.matchlen(s+8, coffsetLP+8, src) + 8\n\t\t\t\tt = coffsetLP\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tcoffsetS := candidateS.offset - e.cur\n\n\t\t\t// Check if we have a short match.\n\t\t\tif s-coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val {\n\t\t\t\t// found a regular match\n\t\t\t\tmatched = e.matchlen(s+4, coffsetS+4, src) + 4\n\n\t\t\t\t// See if we can find a long match at s+1\n\t\t\t\tconst checkAt = 1\n\t\t\t\tcv := load6432(src, s+checkAt)\n\t\t\t\tnextHashL = hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\t\tcandidateL = e.longTable[nextHashL]\n\t\t\t\tcoffsetL = candidateL.offset - e.cur\n\n\t\t\t\t// We can store it, since we have at least a 4 byte match.\n\t\t\t\te.longTable[nextHashL] = prevEntry{offset: s + checkAt + e.cur, prev: candidateL.offset}\n\t\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\ts += checkAt\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"long match (after short)\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check prev long...\n\t\t\t\tcoffsetL = candidateL.prev - e.cur\n\t\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\ts += checkAt\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"prev long match (after short)\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt = coffsetS\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"short match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// No match found, move forward in input.\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\n\t\t// Try to find a better match by searching for a long match at the end of the current best match\n\t\tif s+matched < sLimit {\n\t\t\t// Allow some bytes at the beginning to mismatch.\n\t\t\t// Sweet spot is around 3 bytes, but depends on input.\n\t\t\t// The skipped bytes are tested in Extend backwards,\n\t\t\t// and still picked up as part of the match if they do.\n\t\t\tconst skipBeginning = 3\n\n\t\t\tnextHashL := hashLen(load6432(src, s+matched), betterLongTableBits, betterLongLen)\n\t\t\ts2 := s + skipBeginning\n\t\t\tcv := load3232(src, s2)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcoffsetL := candidateL.offset - e.cur - matched + skipBeginning\n\t\t\tif coffsetL >= 0 && coffsetL < s2 && s2-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) {\n\t\t\t\t// Found a long match, at least 4 bytes.\n\t\t\t\tmatchedNext := e.matchlen(s2+4, coffsetL+4, src) + 4\n\t\t\t\tif matchedNext > matched {\n\t\t\t\t\tt = coffsetL\n\t\t\t\t\ts = s2\n\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match at end-of-match\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check prev long...\n\t\t\tif true {\n\t\t\t\tcoffsetL = candidateL.prev - e.cur - matched + skipBeginning\n\t\t\t\tif coffsetL >= 0 && coffsetL < s2 && s2-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 4 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s2+4, coffsetL+4, src) + 4\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\ts = s2\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"prev long match at end-of-match\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// A match has been found. Update recent offsets.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the n-byte match as long as possible.\n\t\tl := matched\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\n\t\t// Index match start+1 (long) -> s - 1\n\t\toff := index0 + e.cur\n\t\tfor index0 < s-1 {\n\t\t\tcv0 := load6432(src, index0)\n\t\t\tcv1 := cv0 >> 8\n\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\te.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\tindex0 += 2\n\t\t\toff += 2\n\t\t}\n\n\t\tcv = load6432(src, s)\n\t\tif !canRepeat {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check offset 2\n\t\tfor {\n\t\t\to2 := s - offset2\n\t\t\tif load3232(src, o2) != uint32(cv) {\n\t\t\t\t// Do regular search\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHashL := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\tnextHashS := hashLen(cv, betterShortTableBits, betterShortLen)\n\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\te.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: e.longTable[nextHashL].offset}\n\t\t\te.table[nextHashS] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\t// Finished\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// EncodeNoHist will encode a block with no history and no following blocks.\n// Most notable difference is that src will not be copied for history and\n// we do not need to check for max match length.\nfunc (e *betterFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {\n\te.ensureHist(len(src))\n\te.Encode(blk, src)\n}\n\n// Encode improves compression...\nfunc (e *betterFastEncoderDict) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 2\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.longTable[:] {\n\t\t\t\te.longTable[i] = prevEntry{}\n\t\t\t}\n\t\t\te.cur = e.maxMatchOff\n\t\t\te.allDirty = true\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\tv := e.longTable[i].offset\n\t\t\tv2 := e.longTable[i].prev\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t\tv2 = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t\tif v2 < minOff {\n\t\t\t\t\tv2 = 0\n\t\t\t\t} else {\n\t\t\t\t\tv2 = v2 - e.cur + e.maxMatchOff\n\t\t\t\t}\n\t\t\t}\n\t\t\te.longTable[i] = prevEntry{\n\t\t\t\toffset: v,\n\t\t\t\tprev:   v2,\n\t\t\t}\n\t\t}\n\t\te.allDirty = true\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 1.\n\tconst stepSize = 1\n\n\tconst kSearchStrength = 9\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\tvar t int32\n\t\t// We allow the encoder to optionally turn off repeat offsets across blocks\n\t\tcanRepeat := len(blk.sequences) > 2\n\t\tvar matched, index0 int32\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHashL := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\tnextHashS := hashLen(cv, betterShortTableBits, betterShortLen)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcandidateS := e.table[nextHashS]\n\n\t\t\tconst repOff = 1\n\t\t\trepIndex := s - offset1 + repOff\n\t\t\toff := s + e.cur\n\t\t\te.longTable[nextHashL] = prevEntry{offset: off, prev: candidateL.offset}\n\t\t\te.markLongShardDirty(nextHashL)\n\t\t\te.table[nextHashS] = tableEntry{offset: off, val: uint32(cv)}\n\t\t\te.markShortShardDirty(nextHashS)\n\t\t\tindex0 = s + 1\n\n\t\t\tif canRepeat {\n\t\t\t\tif repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 4 + e.matchlen(s+4+repOff, repIndex+4, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 0\n\t\t\t\t\tseq.offset = 1\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t\t\t// Index match start+1 (long) -> s - 1\n\t\t\t\t\ts += length + repOff\n\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\t\t\t\t\t// Index skipped...\n\t\t\t\t\tfor index0 < s-1 {\n\t\t\t\t\t\tcv0 := load6432(src, index0)\n\t\t\t\t\t\tcv1 := cv0 >> 8\n\t\t\t\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\t\t\t\toff := index0 + e.cur\n\t\t\t\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\t\t\t\te.markLongShardDirty(h0)\n\t\t\t\t\t\th1 := hashLen(cv1, betterShortTableBits, betterShortLen)\n\t\t\t\t\t\te.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\t\t\t\te.markShortShardDirty(h1)\n\t\t\t\t\t\tindex0 += 2\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst repOff2 = 1\n\n\t\t\t\t// We deviate from the reference encoder and also check offset 2.\n\t\t\t\t// Still slower and not much better, so disabled.\n\t\t\t\t// repIndex = s - offset2 + repOff2\n\t\t\t\tif false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 8 + e.matchlen(s+8+repOff2, repIndex+8, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff2\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 2\n\t\t\t\t\tseq.offset = 2\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence 2\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t\t\ts += length + repOff2\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\n\t\t\t\t\t// Index skipped...\n\t\t\t\t\tfor index0 < s-1 {\n\t\t\t\t\t\tcv0 := load6432(src, index0)\n\t\t\t\t\t\tcv1 := cv0 >> 8\n\t\t\t\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\t\t\t\toff := index0 + e.cur\n\t\t\t\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\t\t\t\te.markLongShardDirty(h0)\n\t\t\t\t\t\th1 := hashLen(cv1, betterShortTableBits, betterShortLen)\n\t\t\t\t\t\te.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\t\t\t\te.markShortShardDirty(h1)\n\t\t\t\t\t\tindex0 += 2\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\t// Swap offsets\n\t\t\t\t\toffset1, offset2 = offset2, offset1\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the offsets of our two matches.\n\t\t\tcoffsetL := candidateL.offset - e.cur\n\t\t\tcoffsetLP := candidateL.prev - e.cur\n\n\t\t\t// Check if we have a long match.\n\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\tmatched = e.matchlen(s+8, coffsetL+8, src) + 8\n\t\t\t\tt = coffsetL\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\n\t\t\t\tif s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tprevMatch := e.matchlen(s+8, coffsetLP+8, src) + 8\n\t\t\t\t\tif prevMatch > matched {\n\t\t\t\t\t\tmatched = prevMatch\n\t\t\t\t\t\tt = coffsetLP\n\t\t\t\t\t}\n\t\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t\t}\n\t\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t\t}\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we have a long match on prev.\n\t\t\tif s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) {\n\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\tmatched = e.matchlen(s+8, coffsetLP+8, src) + 8\n\t\t\t\tt = coffsetLP\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tcoffsetS := candidateS.offset - e.cur\n\n\t\t\t// Check if we have a short match.\n\t\t\tif s-coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val {\n\t\t\t\t// found a regular match\n\t\t\t\tmatched = e.matchlen(s+4, coffsetS+4, src) + 4\n\n\t\t\t\t// See if we can find a long match at s+1\n\t\t\t\tconst checkAt = 1\n\t\t\t\tcv := load6432(src, s+checkAt)\n\t\t\t\tnextHashL = hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\t\tcandidateL = e.longTable[nextHashL]\n\t\t\t\tcoffsetL = candidateL.offset - e.cur\n\n\t\t\t\t// We can store it, since we have at least a 4 byte match.\n\t\t\t\te.longTable[nextHashL] = prevEntry{offset: s + checkAt + e.cur, prev: candidateL.offset}\n\t\t\t\te.markLongShardDirty(nextHashL)\n\t\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\ts += checkAt\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"long match (after short)\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check prev long...\n\t\t\t\tcoffsetL = candidateL.prev - e.cur\n\t\t\t\tif s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 8 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\ts += checkAt\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"prev long match (after short)\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt = coffsetS\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"short match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// No match found, move forward in input.\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t\t// Try to find a better match by searching for a long match at the end of the current best match\n\t\tif s+matched < sLimit {\n\t\t\tnextHashL := hashLen(load6432(src, s+matched), betterLongTableBits, betterLongLen)\n\t\t\tcv := load3232(src, s)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcoffsetL := candidateL.offset - e.cur - matched\n\t\t\tif coffsetL >= 0 && coffsetL < s && s-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) {\n\t\t\t\t// Found a long match, at least 4 bytes.\n\t\t\t\tmatchedNext := e.matchlen(s+4, coffsetL+4, src) + 4\n\t\t\t\tif matchedNext > matched {\n\t\t\t\t\tt = coffsetL\n\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match at end-of-match\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check prev long...\n\t\t\tif true {\n\t\t\t\tcoffsetL = candidateL.prev - e.cur - matched\n\t\t\t\tif coffsetL >= 0 && coffsetL < s && s-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) {\n\t\t\t\t\t// Found a long match, at least 4 bytes.\n\t\t\t\t\tmatchedNext := e.matchlen(s+4, coffsetL+4, src) + 4\n\t\t\t\t\tif matchedNext > matched {\n\t\t\t\t\t\tt = coffsetL\n\t\t\t\t\t\tmatched = matchedNext\n\t\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\t\tprintln(\"prev long match at end-of-match\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// A match has been found. Update recent offsets.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the n-byte match as long as possible.\n\t\tl := matched\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\n\t\t// Index match start+1 (long) -> s - 1\n\t\toff := index0 + e.cur\n\t\tfor index0 < s-1 {\n\t\t\tcv0 := load6432(src, index0)\n\t\t\tcv1 := cv0 >> 8\n\t\t\th0 := hashLen(cv0, betterLongTableBits, betterLongLen)\n\t\t\te.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset}\n\t\t\te.markLongShardDirty(h0)\n\t\t\th1 := hashLen(cv1, betterShortTableBits, betterShortLen)\n\t\t\te.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)}\n\t\t\te.markShortShardDirty(h1)\n\t\t\tindex0 += 2\n\t\t\toff += 2\n\t\t}\n\n\t\tcv = load6432(src, s)\n\t\tif !canRepeat {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check offset 2\n\t\tfor {\n\t\t\to2 := s - offset2\n\t\t\tif load3232(src, o2) != uint32(cv) {\n\t\t\t\t// Do regular search\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHashL := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\tnextHashS := hashLen(cv, betterShortTableBits, betterShortLen)\n\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\te.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: e.longTable[nextHashL].offset}\n\t\t\te.markLongShardDirty(nextHashL)\n\t\t\te.table[nextHashS] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.markShortShardDirty(nextHashS)\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\t// Finished\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *betterFastEncoder) Reset(d *dict, singleBlock bool) {\n\te.resetBase(d, singleBlock)\n\tif d != nil {\n\t\tpanic(\"betterFastEncoder: Reset with dict\")\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *betterFastEncoderDict) Reset(d *dict, singleBlock bool) {\n\te.resetBase(d, singleBlock)\n\tif d == nil {\n\t\treturn\n\t}\n\t// Init or copy dict table\n\tif len(e.dictTable) != len(e.table) || d.id != e.lastDictID {\n\t\tif len(e.dictTable) != len(e.table) {\n\t\t\te.dictTable = make([]tableEntry, len(e.table))\n\t\t}\n\t\tend := int32(len(d.content)) - 8 + e.maxMatchOff\n\t\tfor i := e.maxMatchOff; i < end; i += 4 {\n\t\t\tconst hashLog = betterShortTableBits\n\n\t\t\tcv := load6432(d.content, i-e.maxMatchOff)\n\t\t\tnextHash := hashLen(cv, hashLog, betterShortLen)      // 0 -> 4\n\t\t\tnextHash1 := hashLen(cv>>8, hashLog, betterShortLen)  // 1 -> 5\n\t\t\tnextHash2 := hashLen(cv>>16, hashLog, betterShortLen) // 2 -> 6\n\t\t\tnextHash3 := hashLen(cv>>24, hashLog, betterShortLen) // 3 -> 7\n\t\t\te.dictTable[nextHash] = tableEntry{\n\t\t\t\tval:    uint32(cv),\n\t\t\t\toffset: i,\n\t\t\t}\n\t\t\te.dictTable[nextHash1] = tableEntry{\n\t\t\t\tval:    uint32(cv >> 8),\n\t\t\t\toffset: i + 1,\n\t\t\t}\n\t\t\te.dictTable[nextHash2] = tableEntry{\n\t\t\t\tval:    uint32(cv >> 16),\n\t\t\t\toffset: i + 2,\n\t\t\t}\n\t\t\te.dictTable[nextHash3] = tableEntry{\n\t\t\t\tval:    uint32(cv >> 24),\n\t\t\t\toffset: i + 3,\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t\te.allDirty = true\n\t}\n\n\t// Init or copy dict table\n\tif len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID {\n\t\tif len(e.dictLongTable) != len(e.longTable) {\n\t\t\te.dictLongTable = make([]prevEntry, len(e.longTable))\n\t\t}\n\t\tif len(d.content) >= 8 {\n\t\t\tcv := load6432(d.content, 0)\n\t\t\th := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\te.dictLongTable[h] = prevEntry{\n\t\t\t\toffset: e.maxMatchOff,\n\t\t\t\tprev:   e.dictLongTable[h].offset,\n\t\t\t}\n\n\t\t\tend := int32(len(d.content)) - 8 + e.maxMatchOff\n\t\t\toff := 8 // First to read\n\t\t\tfor i := e.maxMatchOff + 1; i < end; i++ {\n\t\t\t\tcv = cv>>8 | (uint64(d.content[off]) << 56)\n\t\t\t\th := hashLen(cv, betterLongTableBits, betterLongLen)\n\t\t\t\te.dictLongTable[h] = prevEntry{\n\t\t\t\t\toffset: i,\n\t\t\t\t\tprev:   e.dictLongTable[h].offset,\n\t\t\t\t}\n\t\t\t\toff++\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t\te.allDirty = true\n\t}\n\n\t// Reset table to initial state\n\t{\n\t\tdirtyShardCnt := 0\n\t\tif !e.allDirty {\n\t\t\tfor i := range e.shortTableShardDirty {\n\t\t\t\tif e.shortTableShardDirty[i] {\n\t\t\t\t\tdirtyShardCnt++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst shardCnt = betterShortTableShardCnt\n\t\tconst shardSize = betterShortTableShardSize\n\t\tif e.allDirty || dirtyShardCnt > shardCnt*4/6 {\n\t\t\tcopy(e.table[:], e.dictTable)\n\t\t\tfor i := range e.shortTableShardDirty {\n\t\t\t\te.shortTableShardDirty[i] = false\n\t\t\t}\n\t\t} else {\n\t\t\tfor i := range e.shortTableShardDirty {\n\t\t\t\tif !e.shortTableShardDirty[i] {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tcopy(e.table[i*shardSize:(i+1)*shardSize], e.dictTable[i*shardSize:(i+1)*shardSize])\n\t\t\t\te.shortTableShardDirty[i] = false\n\t\t\t}\n\t\t}\n\t}\n\t{\n\t\tdirtyShardCnt := 0\n\t\tif !e.allDirty {\n\t\t\tfor i := range e.shortTableShardDirty {\n\t\t\t\tif e.shortTableShardDirty[i] {\n\t\t\t\t\tdirtyShardCnt++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst shardCnt = betterLongTableShardCnt\n\t\tconst shardSize = betterLongTableShardSize\n\t\tif e.allDirty || dirtyShardCnt > shardCnt*4/6 {\n\t\t\tcopy(e.longTable[:], e.dictLongTable)\n\t\t\tfor i := range e.longTableShardDirty {\n\t\t\t\te.longTableShardDirty[i] = false\n\t\t\t}\n\t\t} else {\n\t\t\tfor i := range e.longTableShardDirty {\n\t\t\t\tif !e.longTableShardDirty[i] {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tcopy(e.longTable[i*shardSize:(i+1)*shardSize], e.dictLongTable[i*shardSize:(i+1)*shardSize])\n\t\t\t\te.longTableShardDirty[i] = false\n\t\t\t}\n\t\t}\n\t}\n\te.cur = e.maxMatchOff\n\te.allDirty = false\n}\n\nfunc (e *betterFastEncoderDict) markLongShardDirty(entryNum uint32) {\n\te.longTableShardDirty[entryNum/betterLongTableShardSize] = true\n}\n\nfunc (e *betterFastEncoderDict) markShortShardDirty(entryNum uint32) {\n\te.shortTableShardDirty[entryNum/betterShortTableShardSize] = true\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/enc_dfast.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport \"fmt\"\n\nconst (\n\tdFastLongTableBits = 17                      // Bits used in the long match table\n\tdFastLongTableSize = 1 << dFastLongTableBits // Size of the table\n\tdFastLongTableMask = dFastLongTableSize - 1  // Mask for table indices. Redundant, but can eliminate bounds checks.\n\tdFastLongLen       = 8                       // Bytes used for table hash\n\n\tdLongTableShardCnt  = 1 << (dFastLongTableBits - dictShardBits) // Number of shards in the table\n\tdLongTableShardSize = dFastLongTableSize / dLongTableShardCnt   // Size of an individual shard\n\n\tdFastShortTableBits = tableBits                // Bits used in the short match table\n\tdFastShortTableSize = 1 << dFastShortTableBits // Size of the table\n\tdFastShortTableMask = dFastShortTableSize - 1  // Mask for table indices. Redundant, but can eliminate bounds checks.\n\tdFastShortLen       = 5                        // Bytes used for table hash\n\n)\n\ntype doubleFastEncoder struct {\n\tfastEncoder\n\tlongTable [dFastLongTableSize]tableEntry\n}\n\ntype doubleFastEncoderDict struct {\n\tfastEncoderDict\n\tlongTable           [dFastLongTableSize]tableEntry\n\tdictLongTable       []tableEntry\n\tlongTableShardDirty [dLongTableShardCnt]bool\n}\n\n// Encode mimmics functionality in zstd_dfast.c\nfunc (e *doubleFastEncoder) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 2\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\te.table = [dFastShortTableSize]tableEntry{}\n\t\t\te.longTable = [dFastLongTableSize]tableEntry{}\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\tv := e.longTable[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.longTable[i].offset = v\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 1.\n\tconst stepSize = 1\n\n\tconst kSearchStrength = 8\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\tvar t int32\n\t\t// We allow the encoder to optionally turn off repeat offsets across blocks\n\t\tcanRepeat := len(blk.sequences) > 2\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\tnextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcandidateS := e.table[nextHashS]\n\n\t\t\tconst repOff = 1\n\t\t\trepIndex := s - offset1 + repOff\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.table[nextHashS] = entry\n\n\t\t\tif canRepeat {\n\t\t\t\tif repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 4 + e.matchlen(s+4+repOff, repIndex+4, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 0\n\t\t\t\t\tseq.offset = 1\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\t\ts += length + repOff\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the offsets of our two matches.\n\t\t\tcoffsetL := s - (candidateL.offset - e.cur)\n\t\t\tcoffsetS := s - (candidateS.offset - e.cur)\n\n\t\t\t// Check if we have a long match.\n\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we have a short match.\n\t\t\tif coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val {\n\t\t\t\t// found a regular match\n\t\t\t\t// See if we can find a long match at s+1\n\t\t\t\tconst checkAt = 1\n\t\t\t\tcv := load6432(src, s+checkAt)\n\t\t\t\tnextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\t\tcandidateL = e.longTable[nextHashL]\n\t\t\t\tcoffsetL = s - (candidateL.offset - e.cur) + checkAt\n\n\t\t\t\t// We can store it, since we have at least a 4 byte match.\n\t\t\t\te.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)}\n\t\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\t\ts += checkAt\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match (after short)\")\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tt = candidateS.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"short match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// No match found, move forward in input.\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\n\t\t// A 4-byte match has been found. Update recent offsets.\n\t\t// We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlen(s+4, t+4, src) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\n\t\t// Index match start+1 (long) and start+2 (short)\n\t\tindex0 := s - l + 1\n\t\t// Index match end-2 (long) and end-1 (short)\n\t\tindex1 := s - 2\n\n\t\tcv0 := load6432(src, index0)\n\t\tcv1 := load6432(src, index1)\n\t\tte0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)}\n\t\tte1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)}\n\t\te.longTable[hashLen(cv0, dFastLongTableBits, dFastLongLen)] = te0\n\t\te.longTable[hashLen(cv1, dFastLongTableBits, dFastLongLen)] = te1\n\t\tcv0 >>= 8\n\t\tcv1 >>= 8\n\t\tte0.offset++\n\t\tte1.offset++\n\t\tte0.val = uint32(cv0)\n\t\tte1.val = uint32(cv1)\n\t\te.table[hashLen(cv0, dFastShortTableBits, dFastShortLen)] = te0\n\t\te.table[hashLen(cv1, dFastShortTableBits, dFastShortLen)] = te1\n\n\t\tcv = load6432(src, s)\n\n\t\tif !canRepeat {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check offset 2\n\t\tfor {\n\t\t\to2 := s - offset2\n\t\t\tif load3232(src, o2) != uint32(cv) {\n\t\t\t\t// Do regular search\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen)\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.table[nextHashS] = entry\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\t// Finished\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// EncodeNoHist will encode a block with no history and no following blocks.\n// Most notable difference is that src will not be copied for history and\n// we do not need to check for max match length.\nfunc (e *doubleFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 2\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tif e.cur >= e.bufferReset {\n\t\tfor i := range e.table[:] {\n\t\t\te.table[i] = tableEntry{}\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\te.longTable[i] = tableEntry{}\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t}\n\n\ts := int32(0)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 1.\n\tconst stepSize = 1\n\n\tconst kSearchStrength = 8\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\tvar t int32\n\t\tfor {\n\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\tnextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcandidateS := e.table[nextHashS]\n\n\t\t\tconst repOff = 1\n\t\t\trepIndex := s - offset1 + repOff\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.table[nextHashS] = entry\n\n\t\t\tif len(blk.sequences) > 2 {\n\t\t\t\tif load3232(src, repIndex) == uint32(cv>>(repOff*8)) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\t//length := 4 + e.matchlen(s+4+repOff, repIndex+4, src)\n\t\t\t\t\tlength := 4 + int32(matchLen(src[s+4+repOff:], src[repIndex+4:]))\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 0\n\t\t\t\t\tseq.offset = 1\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\t\ts += length + repOff\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the offsets of our two matches.\n\t\t\tcoffsetL := s - (candidateL.offset - e.cur)\n\t\t\tcoffsetS := s - (candidateS.offset - e.cur)\n\n\t\t\t// Check if we have a long match.\n\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d). cur: %d\", s, t, e.cur))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we have a short match.\n\t\t\tif coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val {\n\t\t\t\t// found a regular match\n\t\t\t\t// See if we can find a long match at s+1\n\t\t\t\tconst checkAt = 1\n\t\t\t\tcv := load6432(src, s+checkAt)\n\t\t\t\tnextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\t\tcandidateL = e.longTable[nextHashL]\n\t\t\t\tcoffsetL = s - (candidateL.offset - e.cur) + checkAt\n\n\t\t\t\t// We can store it, since we have at least a 4 byte match.\n\t\t\t\te.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)}\n\t\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\t\ts += checkAt\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match (after short)\")\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tt = candidateS.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"short match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// No match found, move forward in input.\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\n\t\t// A 4-byte match has been found. Update recent offsets.\n\t\t// We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\t//l := e.matchlen(s+4, t+4, src) + 4\n\t\tl := int32(matchLen(src[s+4:], src[t+4:])) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\n\t\t// Index match start+1 (long) and start+2 (short)\n\t\tindex0 := s - l + 1\n\t\t// Index match end-2 (long) and end-1 (short)\n\t\tindex1 := s - 2\n\n\t\tcv0 := load6432(src, index0)\n\t\tcv1 := load6432(src, index1)\n\t\tte0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)}\n\t\tte1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)}\n\t\te.longTable[hashLen(cv0, dFastLongTableBits, dFastLongLen)] = te0\n\t\te.longTable[hashLen(cv1, dFastLongTableBits, dFastLongLen)] = te1\n\t\tcv0 >>= 8\n\t\tcv1 >>= 8\n\t\tte0.offset++\n\t\tte1.offset++\n\t\tte0.val = uint32(cv0)\n\t\tte1.val = uint32(cv1)\n\t\te.table[hashLen(cv0, dFastShortTableBits, dFastShortLen)] = te0\n\t\te.table[hashLen(cv1, dFastShortTableBits, dFastShortLen)] = te1\n\n\t\tcv = load6432(src, s)\n\n\t\tif len(blk.sequences) <= 2 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check offset 2\n\t\tfor {\n\t\t\to2 := s - offset2\n\t\t\tif load3232(src, o2) != uint32(cv) {\n\t\t\t\t// Do regular search\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHashS := hashLen(cv1>>8, dFastShortTableBits, dFastShortLen)\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\t//l := 4 + e.matchlen(s+4, o2+4, src)\n\t\t\tl := 4 + int32(matchLen(src[s+4:], src[o2+4:]))\n\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.table[nextHashS] = entry\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\t// Finished\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n\n\t// We do not store history, so we must offset e.cur to avoid false matches for next user.\n\tif e.cur < e.bufferReset {\n\t\te.cur += int32(len(src))\n\t}\n}\n\n// Encode will encode the content, with a dictionary if initialized for it.\nfunc (e *doubleFastEncoderDict) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\t// Input margin is the number of bytes we read (8)\n\t\t// and the maximum we will read ahead (2)\n\t\tinputMargin            = 8 + 2\n\t\tminNonLiteralBlockSize = 16\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\tfor i := range e.longTable[:] {\n\t\t\t\te.longTable[i] = tableEntry{}\n\t\t\t}\n\t\t\te.markAllShardsDirty()\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\tfor i := range e.longTable[:] {\n\t\t\tv := e.longTable[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.longTable[i].offset = v\n\t\t}\n\t\te.markAllShardsDirty()\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 1.\n\tconst stepSize = 1\n\n\tconst kSearchStrength = 8\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\tvar t int32\n\t\t// We allow the encoder to optionally turn off repeat offsets across blocks\n\t\tcanRepeat := len(blk.sequences) > 2\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\tnextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen)\n\t\t\tcandidateL := e.longTable[nextHashL]\n\t\t\tcandidateS := e.table[nextHashS]\n\n\t\t\tconst repOff = 1\n\t\t\trepIndex := s - offset1 + repOff\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.markLongShardDirty(nextHashL)\n\t\t\te.table[nextHashS] = entry\n\t\t\te.markShardDirty(nextHashS)\n\n\t\t\tif canRepeat {\n\t\t\t\tif repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) {\n\t\t\t\t\t// Consider history as well.\n\t\t\t\t\tvar seq seq\n\t\t\t\t\tlength := 4 + e.matchlen(s+4+repOff, repIndex+4, src)\n\n\t\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t\t// We might be able to match backwards.\n\t\t\t\t\t// Extend as long as we can.\n\t\t\t\t\tstart := s + repOff\n\t\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t\t// and have to do special offset treatment.\n\t\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\t\t\t\tfor repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {\n\t\t\t\t\t\trepIndex--\n\t\t\t\t\t\tstart--\n\t\t\t\t\t\tseq.matchLen++\n\t\t\t\t\t}\n\t\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t\t// rep 0\n\t\t\t\t\tseq.offset = 1\n\t\t\t\t\tif debugSequences {\n\t\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t\t}\n\t\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\t\ts += length + repOff\n\t\t\t\t\tnextEmit = s\n\t\t\t\t\tif s >= sLimit {\n\t\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak encodeLoop\n\t\t\t\t\t}\n\t\t\t\t\tcv = load6432(src, s)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the offsets of our two matches.\n\t\t\tcoffsetL := s - (candidateL.offset - e.cur)\n\t\t\tcoffsetS := s - (candidateS.offset - e.cur)\n\n\t\t\t// Check if we have a long match.\n\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"long match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we have a short match.\n\t\t\tif coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val {\n\t\t\t\t// found a regular match\n\t\t\t\t// See if we can find a long match at s+1\n\t\t\t\tconst checkAt = 1\n\t\t\t\tcv := load6432(src, s+checkAt)\n\t\t\t\tnextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\t\tcandidateL = e.longTable[nextHashL]\n\t\t\t\tcoffsetL = s - (candidateL.offset - e.cur) + checkAt\n\n\t\t\t\t// We can store it, since we have at least a 4 byte match.\n\t\t\t\te.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)}\n\t\t\t\te.markLongShardDirty(nextHashL)\n\t\t\t\tif coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val {\n\t\t\t\t\t// Found a long match, likely at least 8 bytes.\n\t\t\t\t\t// Reference encoder checks all 8 bytes, we only check 4,\n\t\t\t\t\t// but the likelihood of both the first 4 bytes and the hash matching should be enough.\n\t\t\t\t\tt = candidateL.offset - e.cur\n\t\t\t\t\ts += checkAt\n\t\t\t\t\tif debugMatches {\n\t\t\t\t\t\tprintln(\"long match (after short)\")\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tt = candidateS.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tif debugMatches {\n\t\t\t\t\tprintln(\"short match\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// No match found, move forward in input.\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\n\t\t// A 4-byte match has been found. Update recent offsets.\n\t\t// We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlen(s+4, t+4, src) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\n\t\t// Index match start+1 (long) and start+2 (short)\n\t\tindex0 := s - l + 1\n\t\t// Index match end-2 (long) and end-1 (short)\n\t\tindex1 := s - 2\n\n\t\tcv0 := load6432(src, index0)\n\t\tcv1 := load6432(src, index1)\n\t\tte0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)}\n\t\tte1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)}\n\t\tlongHash1 := hashLen(cv0, dFastLongTableBits, dFastLongLen)\n\t\tlongHash2 := hashLen(cv1, dFastLongTableBits, dFastLongLen)\n\t\te.longTable[longHash1] = te0\n\t\te.longTable[longHash2] = te1\n\t\te.markLongShardDirty(longHash1)\n\t\te.markLongShardDirty(longHash2)\n\t\tcv0 >>= 8\n\t\tcv1 >>= 8\n\t\tte0.offset++\n\t\tte1.offset++\n\t\tte0.val = uint32(cv0)\n\t\tte1.val = uint32(cv1)\n\t\thashVal1 := hashLen(cv0, dFastShortTableBits, dFastShortLen)\n\t\thashVal2 := hashLen(cv1, dFastShortTableBits, dFastShortLen)\n\t\te.table[hashVal1] = te0\n\t\te.markShardDirty(hashVal1)\n\t\te.table[hashVal2] = te1\n\t\te.markShardDirty(hashVal2)\n\n\t\tcv = load6432(src, s)\n\n\t\tif !canRepeat {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check offset 2\n\t\tfor {\n\t\t\to2 := s - offset2\n\t\t\tif load3232(src, o2) != uint32(cv) {\n\t\t\t\t// Do regular search\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen)\n\t\t\tnextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen)\n\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\tentry := tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.longTable[nextHashL] = entry\n\t\t\te.markLongShardDirty(nextHashL)\n\t\t\te.table[nextHashS] = entry\n\t\t\te.markShardDirty(nextHashS)\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\t// Finished\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n\t// If we encoded more than 64K mark all dirty.\n\tif len(src) > 64<<10 {\n\t\te.markAllShardsDirty()\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *doubleFastEncoder) Reset(d *dict, singleBlock bool) {\n\te.fastEncoder.Reset(d, singleBlock)\n\tif d != nil {\n\t\tpanic(\"doubleFastEncoder: Reset with dict not supported\")\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *doubleFastEncoderDict) Reset(d *dict, singleBlock bool) {\n\tallDirty := e.allDirty\n\te.fastEncoderDict.Reset(d, singleBlock)\n\tif d == nil {\n\t\treturn\n\t}\n\n\t// Init or copy dict table\n\tif len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID {\n\t\tif len(e.dictLongTable) != len(e.longTable) {\n\t\t\te.dictLongTable = make([]tableEntry, len(e.longTable))\n\t\t}\n\t\tif len(d.content) >= 8 {\n\t\t\tcv := load6432(d.content, 0)\n\t\t\te.dictLongTable[hashLen(cv, dFastLongTableBits, dFastLongLen)] = tableEntry{\n\t\t\t\tval:    uint32(cv),\n\t\t\t\toffset: e.maxMatchOff,\n\t\t\t}\n\t\t\tend := int32(len(d.content)) - 8 + e.maxMatchOff\n\t\t\tfor i := e.maxMatchOff + 1; i < end; i++ {\n\t\t\t\tcv = cv>>8 | (uint64(d.content[i-e.maxMatchOff+7]) << 56)\n\t\t\t\te.dictLongTable[hashLen(cv, dFastLongTableBits, dFastLongLen)] = tableEntry{\n\t\t\t\t\tval:    uint32(cv),\n\t\t\t\t\toffset: i,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t\tallDirty = true\n\t}\n\t// Reset table to initial state\n\te.cur = e.maxMatchOff\n\n\tdirtyShardCnt := 0\n\tif !allDirty {\n\t\tfor i := range e.longTableShardDirty {\n\t\t\tif e.longTableShardDirty[i] {\n\t\t\t\tdirtyShardCnt++\n\t\t\t}\n\t\t}\n\t}\n\n\tif allDirty || dirtyShardCnt > dLongTableShardCnt/2 {\n\t\t//copy(e.longTable[:], e.dictLongTable)\n\t\te.longTable = *(*[dFastLongTableSize]tableEntry)(e.dictLongTable)\n\t\tfor i := range e.longTableShardDirty {\n\t\t\te.longTableShardDirty[i] = false\n\t\t}\n\t\treturn\n\t}\n\tfor i := range e.longTableShardDirty {\n\t\tif !e.longTableShardDirty[i] {\n\t\t\tcontinue\n\t\t}\n\n\t\t// copy(e.longTable[i*dLongTableShardSize:(i+1)*dLongTableShardSize], e.dictLongTable[i*dLongTableShardSize:(i+1)*dLongTableShardSize])\n\t\t*(*[dLongTableShardSize]tableEntry)(e.longTable[i*dLongTableShardSize:]) = *(*[dLongTableShardSize]tableEntry)(e.dictLongTable[i*dLongTableShardSize:])\n\n\t\te.longTableShardDirty[i] = false\n\t}\n}\n\nfunc (e *doubleFastEncoderDict) markLongShardDirty(entryNum uint32) {\n\te.longTableShardDirty[entryNum/dLongTableShardSize] = true\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/enc_fast.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"fmt\"\n)\n\nconst (\n\ttableBits        = 15                               // Bits used in the table\n\ttableSize        = 1 << tableBits                   // Size of the table\n\ttableShardCnt    = 1 << (tableBits - dictShardBits) // Number of shards in the table\n\ttableShardSize   = tableSize / tableShardCnt        // Size of an individual shard\n\ttableFastHashLen = 6\n\ttableMask        = tableSize - 1 // Mask for table indices. Redundant, but can eliminate bounds checks.\n\tmaxMatchLength   = 131074\n)\n\ntype tableEntry struct {\n\tval    uint32\n\toffset int32\n}\n\ntype fastEncoder struct {\n\tfastBase\n\ttable [tableSize]tableEntry\n}\n\ntype fastEncoderDict struct {\n\tfastEncoder\n\tdictTable       []tableEntry\n\ttableShardDirty [tableShardCnt]bool\n\tallDirty        bool\n}\n\n// Encode mimmics functionality in zstd_fast.c\nfunc (e *fastEncoder) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\tinputMargin            = 8\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t)\n\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\tfor i := range e.table[:] {\n\t\t\t\te.table[i] = tableEntry{}\n\t\t\t}\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 2.\n\tconst stepSize = 2\n\n\t// TEMPLATE\n\tconst hashLog = tableBits\n\t// seems global, but would be nice to tweak.\n\tconst kSearchStrength = 6\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\t// t will contain the match offset when we find one.\n\t\t// When existing the search loop, we have already checked 4 bytes.\n\t\tvar t int32\n\n\t\t// We will not use repeat offsets across blocks.\n\t\t// By not using them for the first 3 matches\n\t\tcanRepeat := len(blk.sequences) > 2\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\tnextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen)\n\t\t\tcandidate := e.table[nextHash]\n\t\t\tcandidate2 := e.table[nextHash2]\n\t\t\trepIndex := s - offset1 + 2\n\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)}\n\n\t\t\tif canRepeat && repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>16) {\n\t\t\t\t// Consider history as well.\n\t\t\t\tvar seq seq\n\t\t\t\tlength := 4 + e.matchlen(s+6, repIndex+4, src)\n\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t// We might be able to match backwards.\n\t\t\t\t// Extend as long as we can.\n\t\t\t\tstart := s + 2\n\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t// and have to do special offset treatment.\n\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\tsMin := max(s-e.maxMatchOff, 0)\n\t\t\t\tfor repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch {\n\t\t\t\t\trepIndex--\n\t\t\t\t\tstart--\n\t\t\t\t\tseq.matchLen++\n\t\t\t\t}\n\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t// rep 0\n\t\t\t\tseq.offset = 1\n\t\t\t\tif debugSequences {\n\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t}\n\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\ts += length + 2\n\t\t\t\tnextEmit = s\n\t\t\t\tif s >= sLimit {\n\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak encodeLoop\n\t\t\t\t}\n\t\t\t\tcv = load6432(src, s)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcoffset0 := s - (candidate.offset - e.cur)\n\t\t\tcoffset1 := s - (candidate2.offset - e.cur) + 1\n\t\t\tif coffset0 < e.maxMatchOff && uint32(cv) == candidate.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate2.offset - e.cur\n\t\t\t\ts++\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlen(s+4, t+4, src) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence.\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\t// Don't use repeat offsets\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\t\tcv = load6432(src, s)\n\n\t\t// Check offset 2\n\t\tif o2 := s - offset2; canRepeat && load3232(src, o2) == uint32(cv) {\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\t// Prepare next loop.\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// EncodeNoHist will encode a block with no history and no following blocks.\n// Most notable difference is that src will not be copied for history and\n// we do not need to check for max match length.\nfunc (e *fastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {\n\tconst (\n\t\tinputMargin            = 8\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t)\n\tif debugEncoder {\n\t\tif len(src) > maxCompressedBlockSize {\n\t\t\tpanic(\"src too big\")\n\t\t}\n\t}\n\n\t// Protect against e.cur wraparound.\n\tif e.cur >= e.bufferReset {\n\t\tfor i := range e.table[:] {\n\t\t\te.table[i] = tableEntry{}\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t}\n\n\ts := int32(0)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 2.\n\tconst stepSize = 2\n\n\t// TEMPLATE\n\tconst hashLog = tableBits\n\t// seems global, but would be nice to tweak.\n\tconst kSearchStrength = 6\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\t// t will contain the match offset when we find one.\n\t\t// When existing the search loop, we have already checked 4 bytes.\n\t\tvar t int32\n\n\t\t// We will not use repeat offsets across blocks.\n\t\t// By not using them for the first 3 matches\n\n\t\tfor {\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\tnextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen)\n\t\t\tcandidate := e.table[nextHash]\n\t\t\tcandidate2 := e.table[nextHash2]\n\t\t\trepIndex := s - offset1 + 2\n\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)}\n\n\t\t\tif len(blk.sequences) > 2 && load3232(src, repIndex) == uint32(cv>>16) {\n\t\t\t\t// Consider history as well.\n\t\t\t\tvar seq seq\n\t\t\t\tlength := 4 + e.matchlen(s+6, repIndex+4, src)\n\n\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t// We might be able to match backwards.\n\t\t\t\t// Extend as long as we can.\n\t\t\t\tstart := s + 2\n\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t// and have to do special offset treatment.\n\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\tsMin := max(s-e.maxMatchOff, 0)\n\t\t\t\tfor repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] {\n\t\t\t\t\trepIndex--\n\t\t\t\t\tstart--\n\t\t\t\t\tseq.matchLen++\n\t\t\t\t}\n\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t// rep 0\n\t\t\t\tseq.offset = 1\n\t\t\t\tif debugSequences {\n\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t}\n\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\ts += length + 2\n\t\t\t\tnextEmit = s\n\t\t\t\tif s >= sLimit {\n\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak encodeLoop\n\t\t\t\t}\n\t\t\t\tcv = load6432(src, s)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcoffset0 := s - (candidate.offset - e.cur)\n\t\t\tcoffset1 := s - (candidate2.offset - e.cur) + 1\n\t\t\tif coffset0 < e.maxMatchOff && uint32(cv) == candidate.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(fmt.Sprintf(\"t (%d) < 0, candidate.offset: %d, e.cur: %d, coffset0: %d, e.maxMatchOff: %d\", t, candidate.offset, e.cur, coffset0, e.maxMatchOff))\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate2.offset - e.cur\n\t\t\t\ts++\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && t < 0 {\n\t\t\tpanic(fmt.Sprintf(\"t (%d) < 0 \", t))\n\t\t}\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlen(s+4, t+4, src) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence.\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\t// Don't use repeat offsets\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\t\tcv = load6432(src, s)\n\n\t\t// Check offset 2\n\t\tif o2 := s - offset2; len(blk.sequences) > 2 && load3232(src, o2) == uint32(cv) {\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\t// Prepare next loop.\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n\t// We do not store history, so we must offset e.cur to avoid false matches for next user.\n\tif e.cur < e.bufferReset {\n\t\te.cur += int32(len(src))\n\t}\n}\n\n// Encode will encode the content, with a dictionary if initialized for it.\nfunc (e *fastEncoderDict) Encode(blk *blockEnc, src []byte) {\n\tconst (\n\t\tinputMargin            = 8\n\t\tminNonLiteralBlockSize = 1 + 1 + inputMargin\n\t)\n\tif e.allDirty || len(src) > 32<<10 {\n\t\te.fastEncoder.Encode(blk, src)\n\t\te.allDirty = true\n\t\treturn\n\t}\n\t// Protect against e.cur wraparound.\n\tfor e.cur >= e.bufferReset-int32(len(e.hist)) {\n\t\tif len(e.hist) == 0 {\n\t\t\te.table = [tableSize]tableEntry{}\n\t\t\te.cur = e.maxMatchOff\n\t\t\tbreak\n\t\t}\n\t\t// Shift down everything in the table that isn't already too far away.\n\t\tminOff := e.cur + int32(len(e.hist)) - e.maxMatchOff\n\t\tfor i := range e.table[:] {\n\t\t\tv := e.table[i].offset\n\t\t\tif v < minOff {\n\t\t\t\tv = 0\n\t\t\t} else {\n\t\t\t\tv = v - e.cur + e.maxMatchOff\n\t\t\t}\n\t\t\te.table[i].offset = v\n\t\t}\n\t\te.cur = e.maxMatchOff\n\t\tbreak\n\t}\n\n\ts := e.addBlock(src)\n\tblk.size = len(src)\n\tif len(src) < minNonLiteralBlockSize {\n\t\tblk.extraLits = len(src)\n\t\tblk.literals = blk.literals[:len(src)]\n\t\tcopy(blk.literals, src)\n\t\treturn\n\t}\n\n\t// Override src\n\tsrc = e.hist\n\tsLimit := int32(len(src)) - inputMargin\n\t// stepSize is the number of bytes to skip on every main loop iteration.\n\t// It should be >= 2.\n\tconst stepSize = 2\n\n\t// TEMPLATE\n\tconst hashLog = tableBits\n\t// seems global, but would be nice to tweak.\n\tconst kSearchStrength = 7\n\n\t// nextEmit is where in src the next emitLiteral should start from.\n\tnextEmit := s\n\tcv := load6432(src, s)\n\n\t// Relative offsets\n\toffset1 := int32(blk.recentOffsets[0])\n\toffset2 := int32(blk.recentOffsets[1])\n\n\taddLiterals := func(s *seq, until int32) {\n\t\tif until == nextEmit {\n\t\t\treturn\n\t\t}\n\t\tblk.literals = append(blk.literals, src[nextEmit:until]...)\n\t\ts.litLen = uint32(until - nextEmit)\n\t}\n\tif debugEncoder {\n\t\tprintln(\"recent offsets:\", blk.recentOffsets)\n\t}\n\nencodeLoop:\n\tfor {\n\t\t// t will contain the match offset when we find one.\n\t\t// When existing the search loop, we have already checked 4 bytes.\n\t\tvar t int32\n\n\t\t// We will not use repeat offsets across blocks.\n\t\t// By not using them for the first 3 matches\n\t\tcanRepeat := len(blk.sequences) > 2\n\n\t\tfor {\n\t\t\tif debugAsserts && canRepeat && offset1 == 0 {\n\t\t\t\tpanic(\"offset0 was 0\")\n\t\t\t}\n\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\tnextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen)\n\t\t\tcandidate := e.table[nextHash]\n\t\t\tcandidate2 := e.table[nextHash2]\n\t\t\trepIndex := s - offset1 + 2\n\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.markShardDirty(nextHash)\n\t\t\te.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)}\n\t\t\te.markShardDirty(nextHash2)\n\n\t\t\tif canRepeat && repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>16) {\n\t\t\t\t// Consider history as well.\n\t\t\t\tvar seq seq\n\t\t\t\tlength := 4 + e.matchlen(s+6, repIndex+4, src)\n\n\t\t\t\tseq.matchLen = uint32(length - zstdMinMatch)\n\n\t\t\t\t// We might be able to match backwards.\n\t\t\t\t// Extend as long as we can.\n\t\t\t\tstart := s + 2\n\t\t\t\t// We end the search early, so we don't risk 0 literals\n\t\t\t\t// and have to do special offset treatment.\n\t\t\t\tstartLimit := nextEmit + 1\n\n\t\t\t\tsMin := max(s-e.maxMatchOff, 0)\n\t\t\t\tfor repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch {\n\t\t\t\t\trepIndex--\n\t\t\t\t\tstart--\n\t\t\t\t\tseq.matchLen++\n\t\t\t\t}\n\t\t\t\taddLiterals(&seq, start)\n\n\t\t\t\t// rep 0\n\t\t\t\tseq.offset = 1\n\t\t\t\tif debugSequences {\n\t\t\t\t\tprintln(\"repeat sequence\", seq, \"next s:\", s)\n\t\t\t\t}\n\t\t\t\tblk.sequences = append(blk.sequences, seq)\n\t\t\t\ts += length + 2\n\t\t\t\tnextEmit = s\n\t\t\t\tif s >= sLimit {\n\t\t\t\t\tif debugEncoder {\n\t\t\t\t\t\tprintln(\"repeat ended\", s, length)\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak encodeLoop\n\t\t\t\t}\n\t\t\t\tcv = load6432(src, s)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcoffset0 := s - (candidate.offset - e.cur)\n\t\t\tcoffset1 := s - (candidate2.offset - e.cur) + 1\n\t\t\tif coffset0 < e.maxMatchOff && uint32(cv) == candidate.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate.offset - e.cur\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val {\n\t\t\t\t// found a regular match\n\t\t\t\tt = candidate2.offset - e.cur\n\t\t\t\ts++\n\t\t\t\tif debugAsserts && s <= t {\n\t\t\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t\t\t}\n\t\t\t\tif debugAsserts && s-t > e.maxMatchOff {\n\t\t\t\t\tpanic(\"s - t >e.maxMatchOff\")\n\t\t\t\t}\n\t\t\t\tif debugAsserts && t < 0 {\n\t\t\t\t\tpanic(\"t<0\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ts += stepSize + ((s - nextEmit) >> (kSearchStrength - 1))\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t\t// A 4-byte match has been found. We'll later see if more than 4 bytes.\n\t\toffset2 = offset1\n\t\toffset1 = s - t\n\n\t\tif debugAsserts && s <= t {\n\t\t\tpanic(fmt.Sprintf(\"s (%d) <= t (%d)\", s, t))\n\t\t}\n\n\t\tif debugAsserts && canRepeat && int(offset1) > len(src) {\n\t\t\tpanic(\"invalid offset\")\n\t\t}\n\n\t\t// Extend the 4-byte match as long as possible.\n\t\tl := e.matchlen(s+4, t+4, src) + 4\n\n\t\t// Extend backwards\n\t\ttMin := max(s-e.maxMatchOff, 0)\n\t\tfor t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {\n\t\t\ts--\n\t\t\tt--\n\t\t\tl++\n\t\t}\n\n\t\t// Write our sequence.\n\t\tvar seq seq\n\t\tseq.litLen = uint32(s - nextEmit)\n\t\tseq.matchLen = uint32(l - zstdMinMatch)\n\t\tif seq.litLen > 0 {\n\t\t\tblk.literals = append(blk.literals, src[nextEmit:s]...)\n\t\t}\n\t\t// Don't use repeat offsets\n\t\tseq.offset = uint32(s-t) + 3\n\t\ts += l\n\t\tif debugSequences {\n\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t}\n\t\tblk.sequences = append(blk.sequences, seq)\n\t\tnextEmit = s\n\t\tif s >= sLimit {\n\t\t\tbreak encodeLoop\n\t\t}\n\t\tcv = load6432(src, s)\n\n\t\t// Check offset 2\n\t\tif o2 := s - offset2; canRepeat && load3232(src, o2) == uint32(cv) {\n\t\t\t// We have at least 4 byte match.\n\t\t\t// No need to check backwards. We come straight from a match\n\t\t\tl := 4 + e.matchlen(s+4, o2+4, src)\n\n\t\t\t// Store this, since we have it.\n\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)\n\t\t\te.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)}\n\t\t\te.markShardDirty(nextHash)\n\t\t\tseq.matchLen = uint32(l) - zstdMinMatch\n\t\t\tseq.litLen = 0\n\t\t\t// Since litlen is always 0, this is offset 1.\n\t\t\tseq.offset = 1\n\t\t\ts += l\n\t\t\tnextEmit = s\n\t\t\tif debugSequences {\n\t\t\t\tprintln(\"sequence\", seq, \"next s:\", s)\n\t\t\t}\n\t\t\tblk.sequences = append(blk.sequences, seq)\n\n\t\t\t// Swap offset 1 and 2.\n\t\t\toffset1, offset2 = offset2, offset1\n\t\t\tif s >= sLimit {\n\t\t\t\tbreak encodeLoop\n\t\t\t}\n\t\t\t// Prepare next loop.\n\t\t\tcv = load6432(src, s)\n\t\t}\n\t}\n\n\tif int(nextEmit) < len(src) {\n\t\tblk.literals = append(blk.literals, src[nextEmit:]...)\n\t\tblk.extraLits = len(src) - int(nextEmit)\n\t}\n\tblk.recentOffsets[0] = uint32(offset1)\n\tblk.recentOffsets[1] = uint32(offset2)\n\tif debugEncoder {\n\t\tprintln(\"returning, recent offsets:\", blk.recentOffsets, \"extra literals:\", blk.extraLits)\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *fastEncoder) Reset(d *dict, singleBlock bool) {\n\te.resetBase(d, singleBlock)\n\tif d != nil {\n\t\tpanic(\"fastEncoder: Reset with dict\")\n\t}\n}\n\n// ResetDict will reset and set a dictionary if not nil\nfunc (e *fastEncoderDict) Reset(d *dict, singleBlock bool) {\n\te.resetBase(d, singleBlock)\n\tif d == nil {\n\t\treturn\n\t}\n\n\t// Init or copy dict table\n\tif len(e.dictTable) != len(e.table) || d.id != e.lastDictID {\n\t\tif len(e.dictTable) != len(e.table) {\n\t\t\te.dictTable = make([]tableEntry, len(e.table))\n\t\t}\n\t\tif true {\n\t\t\tend := e.maxMatchOff + int32(len(d.content)) - 8\n\t\t\tfor i := e.maxMatchOff; i < end; i += 2 {\n\t\t\t\tconst hashLog = tableBits\n\n\t\t\t\tcv := load6432(d.content, i-e.maxMatchOff)\n\t\t\t\tnextHash := hashLen(cv, hashLog, tableFastHashLen)     // 0 -> 6\n\t\t\t\tnextHash1 := hashLen(cv>>8, hashLog, tableFastHashLen) // 1 -> 7\n\t\t\t\te.dictTable[nextHash] = tableEntry{\n\t\t\t\t\tval:    uint32(cv),\n\t\t\t\t\toffset: i,\n\t\t\t\t}\n\t\t\t\te.dictTable[nextHash1] = tableEntry{\n\t\t\t\t\tval:    uint32(cv >> 8),\n\t\t\t\t\toffset: i + 1,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\te.lastDictID = d.id\n\t\te.allDirty = true\n\t}\n\n\te.cur = e.maxMatchOff\n\tdirtyShardCnt := 0\n\tif !e.allDirty {\n\t\tfor i := range e.tableShardDirty {\n\t\t\tif e.tableShardDirty[i] {\n\t\t\t\tdirtyShardCnt++\n\t\t\t}\n\t\t}\n\t}\n\n\tconst shardCnt = tableShardCnt\n\tconst shardSize = tableShardSize\n\tif e.allDirty || dirtyShardCnt > shardCnt*4/6 {\n\t\t//copy(e.table[:], e.dictTable)\n\t\te.table = *(*[tableSize]tableEntry)(e.dictTable)\n\t\tfor i := range e.tableShardDirty {\n\t\t\te.tableShardDirty[i] = false\n\t\t}\n\t\te.allDirty = false\n\t\treturn\n\t}\n\tfor i := range e.tableShardDirty {\n\t\tif !e.tableShardDirty[i] {\n\t\t\tcontinue\n\t\t}\n\n\t\t//copy(e.table[i*shardSize:(i+1)*shardSize], e.dictTable[i*shardSize:(i+1)*shardSize])\n\t\t*(*[shardSize]tableEntry)(e.table[i*shardSize:]) = *(*[shardSize]tableEntry)(e.dictTable[i*shardSize:])\n\t\te.tableShardDirty[i] = false\n\t}\n\te.allDirty = false\n}\n\nfunc (e *fastEncoderDict) markAllShardsDirty() {\n\te.allDirty = true\n}\n\nfunc (e *fastEncoderDict) markShardDirty(entryNum uint32) {\n\te.tableShardDirty[entryNum/tableShardSize] = true\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/encoder.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\trdebug \"runtime/debug\"\n\t\"sync\"\n\n\t\"github.com/klauspost/compress/zstd/internal/xxhash\"\n)\n\n// Encoder provides encoding to Zstandard.\n// An Encoder can be used for either compressing a stream via the\n// io.WriteCloser interface supported by the Encoder or as multiple independent\n// tasks via the EncodeAll function.\n// Smaller encodes are encouraged to use the EncodeAll function.\n// Use NewWriter to create a new instance.\ntype Encoder struct {\n\to        encoderOptions\n\tencoders chan encoder\n\tstate    encoderState\n\tinit     sync.Once\n}\n\ntype encoder interface {\n\tEncode(blk *blockEnc, src []byte)\n\tEncodeNoHist(blk *blockEnc, src []byte)\n\tBlock() *blockEnc\n\tCRC() *xxhash.Digest\n\tAppendCRC([]byte) []byte\n\tWindowSize(size int64) int32\n\tUseBlock(*blockEnc)\n\tReset(d *dict, singleBlock bool)\n}\n\ntype encoderState struct {\n\tw                io.Writer\n\tfilling          []byte\n\tcurrent          []byte\n\tprevious         []byte\n\tencoder          encoder\n\twriting          *blockEnc\n\terr              error\n\twriteErr         error\n\tnWritten         int64\n\tnInput           int64\n\tframeContentSize int64\n\theaderWritten    bool\n\teofWritten       bool\n\tfullFrameWritten bool\n\n\t// This waitgroup indicates an encode is running.\n\twg sync.WaitGroup\n\t// This waitgroup indicates we have a block encoding/writing.\n\twWg sync.WaitGroup\n}\n\n// NewWriter will create a new Zstandard encoder.\n// If the encoder will be used for encoding blocks a nil writer can be used.\nfunc NewWriter(w io.Writer, opts ...EOption) (*Encoder, error) {\n\tinitPredefined()\n\tvar e Encoder\n\te.o.setDefault()\n\tfor _, o := range opts {\n\t\terr := o(&e.o)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif w != nil {\n\t\te.Reset(w)\n\t}\n\treturn &e, nil\n}\n\nfunc (e *Encoder) initialize() {\n\tif e.o.concurrent == 0 {\n\t\te.o.setDefault()\n\t}\n\te.encoders = make(chan encoder, e.o.concurrent)\n\tfor i := 0; i < e.o.concurrent; i++ {\n\t\tenc := e.o.encoder()\n\t\te.encoders <- enc\n\t}\n}\n\n// Reset will re-initialize the writer and new writes will encode to the supplied writer\n// as a new, independent stream.\nfunc (e *Encoder) Reset(w io.Writer) {\n\ts := &e.state\n\ts.wg.Wait()\n\ts.wWg.Wait()\n\tif cap(s.filling) == 0 {\n\t\ts.filling = make([]byte, 0, e.o.blockSize)\n\t}\n\tif e.o.concurrent > 1 {\n\t\tif cap(s.current) == 0 {\n\t\t\ts.current = make([]byte, 0, e.o.blockSize)\n\t\t}\n\t\tif cap(s.previous) == 0 {\n\t\t\ts.previous = make([]byte, 0, e.o.blockSize)\n\t\t}\n\t\ts.current = s.current[:0]\n\t\ts.previous = s.previous[:0]\n\t\tif s.writing == nil {\n\t\t\ts.writing = &blockEnc{lowMem: e.o.lowMem}\n\t\t\ts.writing.init()\n\t\t}\n\t\ts.writing.initNewEncode()\n\t}\n\tif s.encoder == nil {\n\t\ts.encoder = e.o.encoder()\n\t}\n\ts.filling = s.filling[:0]\n\ts.encoder.Reset(e.o.dict, false)\n\ts.headerWritten = false\n\ts.eofWritten = false\n\ts.fullFrameWritten = false\n\ts.w = w\n\ts.err = nil\n\ts.nWritten = 0\n\ts.nInput = 0\n\ts.writeErr = nil\n\ts.frameContentSize = 0\n}\n\n// ResetWithOptions will re-initialize the writer and apply the given options\n// as a new, independent stream.\n// Options are applied on top of the existing options.\n// Some options cannot be changed on reset and will return an error.\nfunc (e *Encoder) ResetWithOptions(w io.Writer, opts ...EOption) error {\n\te.o.resetOpt = true\n\tdefer func() { e.o.resetOpt = false }()\n\tfor _, o := range opts {\n\t\tif err := o(&e.o); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\te.Reset(w)\n\treturn nil\n}\n\n// ResetContentSize will reset and set a content size for the next stream.\n// If the bytes written does not match the size given an error will be returned\n// when calling Close().\n// This is removed when Reset is called.\n// Sizes <= 0 results in no content size set.\nfunc (e *Encoder) ResetContentSize(w io.Writer, size int64) {\n\te.Reset(w)\n\tif size >= 0 {\n\t\te.state.frameContentSize = size\n\t}\n}\n\n// Write data to the encoder.\n// Input data will be buffered and as the buffer fills up\n// content will be compressed and written to the output.\n// When done writing, use Close to flush the remaining output\n// and write CRC if requested.\nfunc (e *Encoder) Write(p []byte) (n int, err error) {\n\ts := &e.state\n\tif s.eofWritten {\n\t\treturn 0, ErrEncoderClosed\n\t}\n\tfor len(p) > 0 {\n\t\tif len(p)+len(s.filling) < e.o.blockSize {\n\t\t\tif e.o.crc {\n\t\t\t\t_, _ = s.encoder.CRC().Write(p)\n\t\t\t}\n\t\t\ts.filling = append(s.filling, p...)\n\t\t\treturn n + len(p), nil\n\t\t}\n\t\tadd := p\n\t\tif len(p)+len(s.filling) > e.o.blockSize {\n\t\t\tadd = add[:e.o.blockSize-len(s.filling)]\n\t\t}\n\t\tif e.o.crc {\n\t\t\t_, _ = s.encoder.CRC().Write(add)\n\t\t}\n\t\ts.filling = append(s.filling, add...)\n\t\tp = p[len(add):]\n\t\tn += len(add)\n\t\tif len(s.filling) < e.o.blockSize {\n\t\t\treturn n, nil\n\t\t}\n\t\terr := e.nextBlock(false)\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tif debugAsserts && len(s.filling) > 0 {\n\t\t\tpanic(len(s.filling))\n\t\t}\n\t}\n\treturn n, nil\n}\n\n// nextBlock will synchronize and start compressing input in e.state.filling.\n// If an error has occurred during encoding it will be returned.\nfunc (e *Encoder) nextBlock(final bool) error {\n\ts := &e.state\n\t// Wait for current block.\n\ts.wg.Wait()\n\tif s.err != nil {\n\t\treturn s.err\n\t}\n\tif len(s.filling) > e.o.blockSize {\n\t\treturn fmt.Errorf(\"block > maxStoreBlockSize\")\n\t}\n\tif !s.headerWritten {\n\t\t// If we have a single block encode, do a sync compression.\n\t\tif final && len(s.filling) == 0 && !e.o.fullZero {\n\t\t\ts.headerWritten = true\n\t\t\ts.fullFrameWritten = true\n\t\t\ts.eofWritten = true\n\t\t\treturn nil\n\t\t}\n\t\tif final && len(s.filling) > 0 {\n\t\t\ts.current = e.encodeAll(s.encoder, s.filling, s.current[:0])\n\t\t\tvar n2 int\n\t\t\tn2, s.err = s.w.Write(s.current)\n\t\t\tif s.err != nil {\n\t\t\t\treturn s.err\n\t\t\t}\n\t\t\ts.nWritten += int64(n2)\n\t\t\ts.nInput += int64(len(s.filling))\n\t\t\ts.current = s.current[:0]\n\t\t\ts.filling = s.filling[:0]\n\t\t\ts.headerWritten = true\n\t\t\ts.fullFrameWritten = true\n\t\t\ts.eofWritten = true\n\t\t\treturn nil\n\t\t}\n\n\t\tvar tmp [maxHeaderSize]byte\n\t\tfh := frameHeader{\n\t\t\tContentSize:   uint64(s.frameContentSize),\n\t\t\tWindowSize:    uint32(s.encoder.WindowSize(s.frameContentSize)),\n\t\t\tSingleSegment: false,\n\t\t\tChecksum:      e.o.crc,\n\t\t\tDictID:        e.o.dict.ID(),\n\t\t}\n\n\t\tdst := fh.appendTo(tmp[:0])\n\t\ts.headerWritten = true\n\t\ts.wWg.Wait()\n\t\tvar n2 int\n\t\tn2, s.err = s.w.Write(dst)\n\t\tif s.err != nil {\n\t\t\treturn s.err\n\t\t}\n\t\ts.nWritten += int64(n2)\n\t}\n\tif s.eofWritten {\n\t\t// Ensure we only write it once.\n\t\tfinal = false\n\t}\n\n\tif len(s.filling) == 0 {\n\t\t// Final block, but no data.\n\t\tif final {\n\t\t\tenc := s.encoder\n\t\t\tblk := enc.Block()\n\t\t\tblk.reset(nil)\n\t\t\tblk.last = true\n\t\t\tblk.encodeRaw(nil)\n\t\t\ts.wWg.Wait()\n\t\t\t_, s.err = s.w.Write(blk.output)\n\t\t\ts.nWritten += int64(len(blk.output))\n\t\t\ts.eofWritten = true\n\t\t}\n\t\treturn s.err\n\t}\n\n\t// SYNC:\n\tif e.o.concurrent == 1 {\n\t\tsrc := s.filling\n\t\ts.nInput += int64(len(s.filling))\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding sync block,\", len(src), \"bytes, final:\", final)\n\t\t}\n\t\tenc := s.encoder\n\t\tblk := enc.Block()\n\t\tblk.reset(nil)\n\t\tenc.Encode(blk, src)\n\t\tblk.last = final\n\t\tif final {\n\t\t\ts.eofWritten = true\n\t\t}\n\n\t\ts.err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)\n\t\tif s.err != nil {\n\t\t\treturn s.err\n\t\t}\n\t\t_, s.err = s.w.Write(blk.output)\n\t\ts.nWritten += int64(len(blk.output))\n\t\ts.filling = s.filling[:0]\n\t\treturn s.err\n\t}\n\n\t// Move blocks forward.\n\ts.filling, s.current, s.previous = s.previous[:0], s.filling, s.current\n\ts.nInput += int64(len(s.current))\n\ts.wg.Add(1)\n\tif final {\n\t\ts.eofWritten = true\n\t}\n\tgo func(src []byte) {\n\t\tif debugEncoder {\n\t\t\tprintln(\"Adding block,\", len(src), \"bytes, final:\", final)\n\t\t}\n\t\tdefer func() {\n\t\t\tif r := recover(); r != nil {\n\t\t\t\ts.err = fmt.Errorf(\"panic while encoding: %v\", r)\n\t\t\t\trdebug.PrintStack()\n\t\t\t}\n\t\t\ts.wg.Done()\n\t\t}()\n\t\tenc := s.encoder\n\t\tblk := enc.Block()\n\t\tenc.Encode(blk, src)\n\t\tblk.last = final\n\t\t// Wait for pending writes.\n\t\ts.wWg.Wait()\n\t\tif s.writeErr != nil {\n\t\t\ts.err = s.writeErr\n\t\t\treturn\n\t\t}\n\t\t// Transfer encoders from previous write block.\n\t\tblk.swapEncoders(s.writing)\n\t\t// Transfer recent offsets to next.\n\t\tenc.UseBlock(s.writing)\n\t\ts.writing = blk\n\t\ts.wWg.Add(1)\n\t\tgo func() {\n\t\t\tdefer func() {\n\t\t\t\tif r := recover(); r != nil {\n\t\t\t\t\ts.writeErr = fmt.Errorf(\"panic while encoding/writing: %v\", r)\n\t\t\t\t\trdebug.PrintStack()\n\t\t\t\t}\n\t\t\t\ts.wWg.Done()\n\t\t\t}()\n\t\t\ts.writeErr = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)\n\t\t\tif s.writeErr != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t_, s.writeErr = s.w.Write(blk.output)\n\t\t\ts.nWritten += int64(len(blk.output))\n\t\t}()\n\t}(s.current)\n\treturn nil\n}\n\n// ReadFrom reads data from r until EOF or error.\n// The return value n is the number of bytes read.\n// Any error except io.EOF encountered during the read is also returned.\n//\n// The Copy function uses ReaderFrom if available.\nfunc (e *Encoder) ReadFrom(r io.Reader) (n int64, err error) {\n\tif debugEncoder {\n\t\tprintln(\"Using ReadFrom\")\n\t}\n\n\t// Flush any current writes.\n\tif len(e.state.filling) > 0 {\n\t\tif err := e.nextBlock(false); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\te.state.filling = e.state.filling[:e.o.blockSize]\n\tsrc := e.state.filling\n\tfor {\n\t\tn2, err := r.Read(src)\n\t\tif e.o.crc {\n\t\t\t_, _ = e.state.encoder.CRC().Write(src[:n2])\n\t\t}\n\t\t// src is now the unfilled part...\n\t\tsrc = src[n2:]\n\t\tn += int64(n2)\n\t\tswitch err {\n\t\tcase io.EOF:\n\t\t\te.state.filling = e.state.filling[:len(e.state.filling)-len(src)]\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"ReadFrom: got EOF final block:\", len(e.state.filling))\n\t\t\t}\n\t\t\treturn n, nil\n\t\tcase nil:\n\t\tdefault:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"ReadFrom: got error:\", err)\n\t\t\t}\n\t\t\te.state.err = err\n\t\t\treturn n, err\n\t\t}\n\t\tif len(src) > 0 {\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"ReadFrom: got space left in source:\", len(src))\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\terr = e.nextBlock(false)\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\te.state.filling = e.state.filling[:e.o.blockSize]\n\t\tsrc = e.state.filling\n\t}\n}\n\n// Flush will send the currently written data to output\n// and block until everything has been written.\n// This should only be used on rare occasions where pushing the currently queued data is critical.\nfunc (e *Encoder) Flush() error {\n\ts := &e.state\n\tif len(s.filling) > 0 {\n\t\terr := e.nextBlock(false)\n\t\tif err != nil {\n\t\t\t// Ignore Flush after Close.\n\t\t\tif errors.Is(s.err, ErrEncoderClosed) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\ts.wg.Wait()\n\ts.wWg.Wait()\n\tif s.err != nil {\n\t\t// Ignore Flush after Close.\n\t\tif errors.Is(s.err, ErrEncoderClosed) {\n\t\t\treturn nil\n\t\t}\n\t\treturn s.err\n\t}\n\treturn s.writeErr\n}\n\n// Close will flush the final output and close the stream.\n// The function will block until everything has been written.\n// The Encoder can still be re-used after calling this.\nfunc (e *Encoder) Close() error {\n\ts := &e.state\n\tif s.encoder == nil {\n\t\treturn nil\n\t}\n\terr := e.nextBlock(true)\n\tif err != nil {\n\t\tif errors.Is(s.err, ErrEncoderClosed) {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\tif s.frameContentSize > 0 {\n\t\tif s.nInput != s.frameContentSize {\n\t\t\treturn fmt.Errorf(\"frame content size %d given, but %d bytes was written\", s.frameContentSize, s.nInput)\n\t\t}\n\t}\n\tif e.state.fullFrameWritten {\n\t\treturn s.err\n\t}\n\ts.wg.Wait()\n\ts.wWg.Wait()\n\n\tif s.err != nil {\n\t\treturn s.err\n\t}\n\tif s.writeErr != nil {\n\t\treturn s.writeErr\n\t}\n\n\t// Write CRC\n\tif e.o.crc && s.err == nil {\n\t\t// heap alloc.\n\t\tvar tmp [4]byte\n\t\t_, s.err = s.w.Write(s.encoder.AppendCRC(tmp[:0]))\n\t\ts.nWritten += 4\n\t}\n\n\t// Add padding with content from crypto/rand.Reader\n\tif s.err == nil && e.o.pad > 0 {\n\t\tadd := calcSkippableFrame(s.nWritten, int64(e.o.pad))\n\t\tframe, err := skippableFrame(s.filling[:0], add, rand.Reader)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, s.err = s.w.Write(frame)\n\t}\n\tif s.err == nil {\n\t\ts.err = ErrEncoderClosed\n\t\treturn nil\n\t}\n\n\treturn s.err\n}\n\n// EncodeAll will encode all input in src and append it to dst.\n// This function can be called concurrently, but each call will only run on a single goroutine.\n// If empty input is given, nothing is returned, unless WithZeroFrames is specified.\n// Encoded blocks can be concatenated and the result will be the combined input stream.\n// Data compressed with EncodeAll can be decoded with the Decoder,\n// using either a stream or DecodeAll.\nfunc (e *Encoder) EncodeAll(src, dst []byte) []byte {\n\te.init.Do(e.initialize)\n\tenc := <-e.encoders\n\tdefer func() {\n\t\te.encoders <- enc\n\t}()\n\treturn e.encodeAll(enc, src, dst)\n}\n\nfunc (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte {\n\tif len(src) == 0 {\n\t\tif e.o.fullZero {\n\t\t\t// Add frame header.\n\t\t\tfh := frameHeader{\n\t\t\t\tContentSize:   0,\n\t\t\t\tWindowSize:    MinWindowSize,\n\t\t\t\tSingleSegment: true,\n\t\t\t\t// Adding a checksum would be a waste of space.\n\t\t\t\tChecksum: false,\n\t\t\t\tDictID:   0,\n\t\t\t}\n\t\t\tdst = fh.appendTo(dst)\n\n\t\t\t// Write raw block as last one only.\n\t\t\tvar blk blockHeader\n\t\t\tblk.setSize(0)\n\t\t\tblk.setType(blockTypeRaw)\n\t\t\tblk.setLast(true)\n\t\t\tdst = blk.appendTo(dst)\n\t\t}\n\t\treturn dst\n\t}\n\n\t// Use single segments when above minimum window and below window size.\n\tsingle := len(src) <= e.o.windowSize && len(src) > MinWindowSize\n\tif e.o.single != nil {\n\t\tsingle = *e.o.single\n\t}\n\tfh := frameHeader{\n\t\tContentSize:   uint64(len(src)),\n\t\tWindowSize:    uint32(enc.WindowSize(int64(len(src)))),\n\t\tSingleSegment: single,\n\t\tChecksum:      e.o.crc,\n\t\tDictID:        e.o.dict.ID(),\n\t}\n\n\t// If less than 1MB, allocate a buffer up front.\n\tif len(dst) == 0 && cap(dst) == 0 && len(src) < 1<<20 && !e.o.lowMem {\n\t\tdst = make([]byte, 0, len(src))\n\t}\n\tdst = fh.appendTo(dst)\n\n\t// If we can do everything in one block, prefer that.\n\tif len(src) <= e.o.blockSize {\n\t\tenc.Reset(e.o.dict, true)\n\t\t// Slightly faster with no history and everything in one block.\n\t\tif e.o.crc {\n\t\t\t_, _ = enc.CRC().Write(src)\n\t\t}\n\t\tblk := enc.Block()\n\t\tblk.last = true\n\t\tif e.o.dict == nil {\n\t\t\tenc.EncodeNoHist(blk, src)\n\t\t} else {\n\t\t\tenc.Encode(blk, src)\n\t\t}\n\n\t\t// If we got the exact same number of literals as input,\n\t\t// assume the literals cannot be compressed.\n\t\toldout := blk.output\n\t\t// Output directly to dst\n\t\tblk.output = dst\n\n\t\terr := blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tdst = blk.output\n\t\tblk.output = oldout\n\t} else {\n\t\tenc.Reset(e.o.dict, false)\n\t\tblk := enc.Block()\n\t\tfor len(src) > 0 {\n\t\t\ttodo := src\n\t\t\tif len(todo) > e.o.blockSize {\n\t\t\t\ttodo = todo[:e.o.blockSize]\n\t\t\t}\n\t\t\tsrc = src[len(todo):]\n\t\t\tif e.o.crc {\n\t\t\t\t_, _ = enc.CRC().Write(todo)\n\t\t\t}\n\t\t\tblk.pushOffsets()\n\t\t\tenc.Encode(blk, todo)\n\t\t\tif len(src) == 0 {\n\t\t\t\tblk.last = true\n\t\t\t}\n\t\t\terr := blk.encode(todo, e.o.noEntropy, !e.o.allLitEntropy)\n\t\t\tif err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t\tdst = append(dst, blk.output...)\n\t\t\tblk.reset(nil)\n\t\t}\n\t}\n\tif e.o.crc {\n\t\tdst = enc.AppendCRC(dst)\n\t}\n\t// Add padding with content from crypto/rand.Reader\n\tif e.o.pad > 0 {\n\t\tadd := calcSkippableFrame(int64(len(dst)), int64(e.o.pad))\n\t\tvar err error\n\t\tdst, err = skippableFrame(dst, add, rand.Reader)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn dst\n}\n\n// MaxEncodedSize returns the expected maximum\n// size of an encoded block or stream.\nfunc (e *Encoder) MaxEncodedSize(size int) int {\n\tframeHeader := 4 + 2 // magic + frame header & window descriptor\n\tif e.o.dict != nil {\n\t\tframeHeader += 4\n\t}\n\t// Frame content size:\n\tif size < 256 {\n\t\tframeHeader++\n\t} else if size < 65536+256 {\n\t\tframeHeader += 2\n\t} else if size < math.MaxInt32 {\n\t\tframeHeader += 4\n\t} else {\n\t\tframeHeader += 8\n\t}\n\t// Final crc\n\tif e.o.crc {\n\t\tframeHeader += 4\n\t}\n\n\t// Max overhead is 3 bytes/block.\n\t// There cannot be 0 blocks.\n\tblocks := (size + e.o.blockSize) / e.o.blockSize\n\n\t// Combine, add padding.\n\tmaxSz := frameHeader + 3*blocks + size\n\tif e.o.pad > 1 {\n\t\tmaxSz += calcSkippableFrame(int64(maxSz), int64(e.o.pad))\n\t}\n\treturn maxSz\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/encoder_options.go",
    "content": "package zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"math/bits\"\n\t\"runtime\"\n\t\"strings\"\n)\n\n// EOption is an option for creating a encoder.\ntype EOption func(*encoderOptions) error\n\n// options retains accumulated state of multiple options.\ntype encoderOptions struct {\n\tresetOpt        bool\n\tconcurrent      int\n\tlevel           EncoderLevel\n\tsingle          *bool\n\tpad             int\n\tblockSize       int\n\twindowSize      int\n\tcrc             bool\n\tfullZero        bool\n\tnoEntropy       bool\n\tallLitEntropy   bool\n\tcustomWindow    bool\n\tcustomALEntropy bool\n\tcustomBlockSize bool\n\tlowMem          bool\n\tdict            *dict\n}\n\nfunc (o *encoderOptions) setDefault() {\n\t*o = encoderOptions{\n\t\tconcurrent:    runtime.GOMAXPROCS(0),\n\t\tcrc:           true,\n\t\tsingle:        nil,\n\t\tblockSize:     maxCompressedBlockSize,\n\t\twindowSize:    8 << 20,\n\t\tlevel:         SpeedDefault,\n\t\tallLitEntropy: false,\n\t\tlowMem:        false,\n\t}\n}\n\n// encoder returns an encoder with the selected options.\nfunc (o encoderOptions) encoder() encoder {\n\tswitch o.level {\n\tcase SpeedFastest:\n\t\tif o.dict != nil {\n\t\t\treturn &fastEncoderDict{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}}\n\t\t}\n\t\treturn &fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}\n\n\tcase SpeedDefault:\n\t\tif o.dict != nil {\n\t\t\treturn &doubleFastEncoderDict{fastEncoderDict: fastEncoderDict{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}}}\n\t\t}\n\t\treturn &doubleFastEncoder{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}}\n\tcase SpeedBetterCompression:\n\t\tif o.dict != nil {\n\t\t\treturn &betterFastEncoderDict{betterFastEncoder: betterFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}}\n\t\t}\n\t\treturn &betterFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}\n\tcase SpeedBestCompression:\n\t\treturn &bestFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}\n\t}\n\tpanic(\"unknown compression level\")\n}\n\n// WithEncoderCRC will add CRC value to output.\n// Output will be 4 bytes larger.\n// Can be changed with ResetWithOptions.\nfunc WithEncoderCRC(b bool) EOption {\n\treturn func(o *encoderOptions) error { o.crc = b; return nil }\n}\n\n// WithEncoderConcurrency will set the concurrency,\n// meaning the maximum number of encoders to run concurrently.\n// The value supplied must be at least 0.\n// When a value of 0 is provided GOMAXPROCS will be used.\n// For streams, setting a value of 1 will disable async compression.\n// By default this will be set to GOMAXPROCS.\n// Cannot be changed with ResetWithOptions.\nfunc WithEncoderConcurrency(n int) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tif n < 0 {\n\t\t\treturn errors.New(\"concurrency must at least 0\")\n\t\t}\n\t\tif n == 0 {\n\t\t\tn = runtime.GOMAXPROCS(0)\n\t\t}\n\t\tif o.resetOpt && n != o.concurrent {\n\t\t\treturn errors.New(\"WithEncoderConcurrency cannot be changed on Reset\")\n\t\t}\n\t\to.concurrent = n\n\t\treturn nil\n\t}\n}\n\n// WithWindowSize will set the maximum allowed back-reference distance.\n// The value must be a power of two between MinWindowSize and MaxWindowSize.\n// A larger value will enable better compression but allocate more memory and,\n// for above-default values, take considerably longer.\n// The default value is determined by the compression level and max 8MB.\n// Cannot be changed with ResetWithOptions.\nfunc WithWindowSize(n int) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tswitch {\n\t\tcase n < MinWindowSize:\n\t\t\treturn fmt.Errorf(\"window size must be at least %d\", MinWindowSize)\n\t\tcase n > MaxWindowSize:\n\t\t\treturn fmt.Errorf(\"window size must be at most %d\", MaxWindowSize)\n\t\tcase (n & (n - 1)) != 0:\n\t\t\treturn errors.New(\"window size must be a power of 2\")\n\t\t}\n\t\tif o.resetOpt && n != o.windowSize {\n\t\t\treturn errors.New(\"WithWindowSize cannot be changed on Reset\")\n\t\t}\n\n\t\to.windowSize = n\n\t\to.customWindow = true\n\t\tif o.blockSize > o.windowSize {\n\t\t\to.blockSize = o.windowSize\n\t\t\to.customBlockSize = true\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithEncoderPadding will add padding to all output so the size will be a multiple of n.\n// This can be used to obfuscate the exact output size or make blocks of a certain size.\n// The contents will be a skippable frame, so it will be invisible by the decoder.\n// n must be > 0 and <= 1GB, 1<<30 bytes.\n// The padded area will be filled with data from crypto/rand.Reader.\n// If `EncodeAll` is used with data already in the destination, the total size will be multiple of this.\n// Can be changed with ResetWithOptions.\nfunc WithEncoderPadding(n int) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tif n <= 0 {\n\t\t\treturn fmt.Errorf(\"padding must be at least 1\")\n\t\t}\n\t\t// No need to waste our time.\n\t\tif n == 1 {\n\t\t\tn = 0\n\t\t}\n\t\tif n > 1<<30 {\n\t\t\treturn fmt.Errorf(\"padding must less than 1GB (1<<30 bytes) \")\n\t\t}\n\t\to.pad = n\n\t\treturn nil\n\t}\n}\n\n// EncoderLevel predefines encoder compression levels.\n// Only use the constants made available, since the actual mapping\n// of these values are very likely to change and your compression could change\n// unpredictably when upgrading the library.\ntype EncoderLevel int\n\nconst (\n\tspeedNotSet EncoderLevel = iota\n\n\t// SpeedFastest will choose the fastest reasonable compression.\n\t// This is roughly equivalent to the fastest Zstandard mode.\n\tSpeedFastest\n\n\t// SpeedDefault is the default \"pretty fast\" compression option.\n\t// This is roughly equivalent to the default Zstandard mode (level 3).\n\tSpeedDefault\n\n\t// SpeedBetterCompression will yield better compression than the default.\n\t// Currently it is about zstd level 7-8 with ~ 2x-3x the default CPU usage.\n\t// By using this, notice that CPU usage may go up in the future.\n\tSpeedBetterCompression\n\n\t// SpeedBestCompression will choose the best available compression option.\n\t// This will offer the best compression no matter the CPU cost.\n\tSpeedBestCompression\n\n\t// speedLast should be kept as the last actual compression option.\n\t// The is not for external usage, but is used to keep track of the valid options.\n\tspeedLast\n)\n\n// EncoderLevelFromString will convert a string representation of an encoding level back\n// to a compression level. The compare is not case sensitive.\n// If the string wasn't recognized, (false, SpeedDefault) will be returned.\nfunc EncoderLevelFromString(s string) (bool, EncoderLevel) {\n\tfor l := speedNotSet + 1; l < speedLast; l++ {\n\t\tif strings.EqualFold(s, l.String()) {\n\t\t\treturn true, l\n\t\t}\n\t}\n\treturn false, SpeedDefault\n}\n\n// EncoderLevelFromZstd will return an encoder level that closest matches the compression\n// ratio of a specific zstd compression level.\n// Many input values will provide the same compression level.\nfunc EncoderLevelFromZstd(level int) EncoderLevel {\n\tswitch {\n\tcase level < 3:\n\t\treturn SpeedFastest\n\tcase level >= 3 && level < 6:\n\t\treturn SpeedDefault\n\tcase level >= 6 && level < 10:\n\t\treturn SpeedBetterCompression\n\tdefault:\n\t\treturn SpeedBestCompression\n\t}\n}\n\n// String provides a string representation of the compression level.\nfunc (e EncoderLevel) String() string {\n\tswitch e {\n\tcase SpeedFastest:\n\t\treturn \"fastest\"\n\tcase SpeedDefault:\n\t\treturn \"default\"\n\tcase SpeedBetterCompression:\n\t\treturn \"better\"\n\tcase SpeedBestCompression:\n\t\treturn \"best\"\n\tdefault:\n\t\treturn \"invalid\"\n\t}\n}\n\n// WithEncoderLevel specifies a predefined compression level.\n// Cannot be changed with ResetWithOptions.\nfunc WithEncoderLevel(l EncoderLevel) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tswitch {\n\t\tcase l <= speedNotSet || l >= speedLast:\n\t\t\treturn fmt.Errorf(\"unknown encoder level\")\n\t\t}\n\t\tif o.resetOpt && l != o.level {\n\t\t\treturn errors.New(\"WithEncoderLevel cannot be changed on Reset\")\n\t\t}\n\t\to.level = l\n\t\tif !o.customWindow {\n\t\t\tswitch o.level {\n\t\t\tcase SpeedFastest:\n\t\t\t\to.windowSize = 4 << 20\n\t\t\t\tif !o.customBlockSize {\n\t\t\t\t\to.blockSize = 1 << 16\n\t\t\t\t}\n\t\t\tcase SpeedDefault:\n\t\t\t\to.windowSize = 8 << 20\n\t\t\tcase SpeedBetterCompression:\n\t\t\t\to.windowSize = 8 << 20\n\t\t\tcase SpeedBestCompression:\n\t\t\t\to.windowSize = 8 << 20\n\t\t\t}\n\t\t}\n\t\tif !o.customALEntropy {\n\t\t\to.allLitEntropy = l > SpeedDefault\n\t\t}\n\n\t\treturn nil\n\t}\n}\n\n// WithZeroFrames will encode 0 length input as full frames.\n// This can be needed for compatibility with zstandard usage,\n// but is not needed for this package.\n// Can be changed with ResetWithOptions.\nfunc WithZeroFrames(b bool) EOption {\n\treturn func(o *encoderOptions) error {\n\t\to.fullZero = b\n\t\treturn nil\n\t}\n}\n\n// WithAllLitEntropyCompression will apply entropy compression if no matches are found.\n// Disabling this will skip incompressible data faster, but in cases with no matches but\n// skewed character distribution compression is lost.\n// Default value depends on the compression level selected.\n// Can be changed with ResetWithOptions.\nfunc WithAllLitEntropyCompression(b bool) EOption {\n\treturn func(o *encoderOptions) error {\n\t\to.customALEntropy = true\n\t\to.allLitEntropy = b\n\t\treturn nil\n\t}\n}\n\n// WithNoEntropyCompression will always skip entropy compression of literals.\n// This can be useful if content has matches, but unlikely to benefit from entropy\n// compression. Usually the slight speed improvement is not worth enabling this.\n// Can be changed with ResetWithOptions.\nfunc WithNoEntropyCompression(b bool) EOption {\n\treturn func(o *encoderOptions) error {\n\t\to.noEntropy = b\n\t\treturn nil\n\t}\n}\n\n// WithSingleSegment will set the \"single segment\" flag when EncodeAll is used.\n// If this flag is set, data must be regenerated within a single continuous memory segment.\n// In this case, Window_Descriptor byte is skipped, but Frame_Content_Size is necessarily present.\n// As a consequence, the decoder must allocate a memory segment of size equal or larger than size of your content.\n// In order to preserve the decoder from unreasonable memory requirements,\n// a decoder is allowed to reject a compressed frame which requests a memory size beyond decoder's authorized range.\n// For broader compatibility, decoders are recommended to support memory sizes of at least 8 MB.\n// This is only a recommendation, each decoder is free to support higher or lower limits, depending on local limitations.\n// If this is not specified, block encodes will automatically choose this based on the input size and the window size.\n// This setting has no effect on streamed encodes.\n// Can be changed with ResetWithOptions.\nfunc WithSingleSegment(b bool) EOption {\n\treturn func(o *encoderOptions) error {\n\t\to.single = &b\n\t\treturn nil\n\t}\n}\n\n// WithLowerEncoderMem will trade in some memory cases trade less memory usage for\n// slower encoding speed.\n// This will not change the window size which is the primary function for reducing\n// memory usage. See WithWindowSize.\n// Cannot be changed with ResetWithOptions.\nfunc WithLowerEncoderMem(b bool) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tif o.resetOpt && b != o.lowMem {\n\t\t\treturn errors.New(\"WithLowerEncoderMem cannot be changed on Reset\")\n\t\t}\n\t\to.lowMem = b\n\t\treturn nil\n\t}\n}\n\n// WithEncoderDict allows to register a dictionary that will be used for the encode.\n//\n// The slice dict must be in the [dictionary format] produced by\n// \"zstd --train\" from the Zstandard reference implementation.\n//\n// The encoder *may* choose to use no dictionary instead for certain payloads.\n// Can be changed with ResetWithOptions.\n//\n// [dictionary format]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format\nfunc WithEncoderDict(dict []byte) EOption {\n\treturn func(o *encoderOptions) error {\n\t\td, err := loadDict(dict)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\to.dict = d\n\t\treturn nil\n\t}\n}\n\n// WithEncoderDictRaw registers a dictionary that may be used by the encoder.\n//\n// The slice content may contain arbitrary data. It will be used as an initial\n// history.\n// Can be changed with ResetWithOptions.\nfunc WithEncoderDictRaw(id uint32, content []byte) EOption {\n\treturn func(o *encoderOptions) error {\n\t\tif bits.UintSize > 32 && uint(len(content)) > dictMaxLength {\n\t\t\treturn fmt.Errorf(\"dictionary of size %d > 2GiB too large\", len(content))\n\t\t}\n\t\to.dict = &dict{id: id, content: content, offsets: [3]int{1, 4, 8}}\n\t\treturn nil\n\t}\n}\n\n// WithEncoderDictDelete clears the dictionary, so no dictionary will be used.\n// Should be used with ResetWithOptions.\nfunc WithEncoderDictDelete() EOption {\n\treturn func(o *encoderOptions) error {\n\t\to.dict = nil\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/framedec.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"io\"\n\n\t\"github.com/klauspost/compress/zstd/internal/xxhash\"\n)\n\ntype frameDec struct {\n\to   decoderOptions\n\tcrc *xxhash.Digest\n\n\tWindowSize uint64\n\n\t// Frame history passed between blocks\n\thistory history\n\n\trawInput byteBuffer\n\n\t// Byte buffer that can be reused for small input blocks.\n\tbBuf byteBuf\n\n\tFrameContentSize uint64\n\n\tDictionaryID  uint32\n\tHasCheckSum   bool\n\tSingleSegment bool\n}\n\nconst (\n\t// MinWindowSize is the minimum Window Size, which is 1 KB.\n\tMinWindowSize = 1 << 10\n\n\t// MaxWindowSize is the maximum encoder window size\n\t// and the default decoder maximum window size.\n\tMaxWindowSize = 1 << 29\n)\n\nconst (\n\tframeMagic          = \"\\x28\\xb5\\x2f\\xfd\"\n\tskippableFrameMagic = \"\\x2a\\x4d\\x18\"\n)\n\nfunc newFrameDec(o decoderOptions) *frameDec {\n\tif o.maxWindowSize > o.maxDecodedSize {\n\t\to.maxWindowSize = o.maxDecodedSize\n\t}\n\td := frameDec{\n\t\to: o,\n\t}\n\treturn &d\n}\n\n// reset will read the frame header and prepare for block decoding.\n// If nothing can be read from the input, io.EOF will be returned.\n// Any other error indicated that the stream contained data, but\n// there was a problem.\nfunc (d *frameDec) reset(br byteBuffer) error {\n\td.HasCheckSum = false\n\td.WindowSize = 0\n\tvar signature [4]byte\n\tfor {\n\t\tvar err error\n\t\t// Check if we can read more...\n\t\tb, err := br.readSmall(1)\n\t\tswitch err {\n\t\tcase io.EOF, io.ErrUnexpectedEOF:\n\t\t\treturn io.EOF\n\t\tcase nil:\n\t\t\tsignature[0] = b[0]\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\t\t// Read the rest, don't allow io.ErrUnexpectedEOF\n\t\tb, err = br.readSmall(3)\n\t\tswitch err {\n\t\tcase io.EOF:\n\t\t\treturn io.EOF\n\t\tcase nil:\n\t\t\tcopy(signature[1:], b)\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\n\t\tif string(signature[1:4]) != skippableFrameMagic || signature[0]&0xf0 != 0x50 {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"Not skippable\", hex.EncodeToString(signature[:]), hex.EncodeToString([]byte(skippableFrameMagic)))\n\t\t\t}\n\t\t\t// Break if not skippable frame.\n\t\t\tbreak\n\t\t}\n\t\t// Read size to skip\n\t\tb, err = br.readSmall(4)\n\t\tif err != nil {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"Reading Frame Size\", err)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tn := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)\n\t\tprintln(\"Skipping frame with\", n, \"bytes.\")\n\t\terr = br.skipN(int64(n))\n\t\tif err != nil {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"Reading discarded frame\", err)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\tif string(signature[:]) != frameMagic {\n\t\tif debugDecoder {\n\t\t\tprintln(\"Got magic numbers: \", signature, \"want:\", []byte(frameMagic))\n\t\t}\n\t\treturn ErrMagicMismatch\n\t}\n\n\t// Read Frame_Header_Descriptor\n\tfhd, err := br.readByte()\n\tif err != nil {\n\t\tif debugDecoder {\n\t\t\tprintln(\"Reading Frame_Header_Descriptor\", err)\n\t\t}\n\t\treturn err\n\t}\n\td.SingleSegment = fhd&(1<<5) != 0\n\n\tif fhd&(1<<3) != 0 {\n\t\treturn errors.New(\"reserved bit set on frame header\")\n\t}\n\n\t// Read Window_Descriptor\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor\n\td.WindowSize = 0\n\tif !d.SingleSegment {\n\t\twd, err := br.readByte()\n\t\tif err != nil {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"Reading Window_Descriptor\", err)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintf(\"raw: %x, mantissa: %d, exponent: %d\\n\", wd, wd&7, wd>>3)\n\t\t}\n\t\twindowLog := 10 + (wd >> 3)\n\t\twindowBase := uint64(1) << windowLog\n\t\twindowAdd := (windowBase / 8) * uint64(wd&0x7)\n\t\td.WindowSize = windowBase + windowAdd\n\t}\n\n\t// Read Dictionary_ID\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary_id\n\td.DictionaryID = 0\n\tif size := fhd & 3; size != 0 {\n\t\tif size == 3 {\n\t\t\tsize = 4\n\t\t}\n\n\t\tb, err := br.readSmall(int(size))\n\t\tif err != nil {\n\t\t\tprintln(\"Reading Dictionary_ID\", err)\n\t\t\treturn err\n\t\t}\n\t\tvar id uint32\n\t\tswitch len(b) {\n\t\tcase 1:\n\t\t\tid = uint32(b[0])\n\t\tcase 2:\n\t\t\tid = uint32(b[0]) | (uint32(b[1]) << 8)\n\t\tcase 4:\n\t\t\tid = uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"Dict size\", size, \"ID:\", id)\n\t\t}\n\t\td.DictionaryID = id\n\t}\n\n\t// Read Frame_Content_Size\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame_content_size\n\tvar fcsSize int\n\tv := fhd >> 6\n\tswitch v {\n\tcase 0:\n\t\tif d.SingleSegment {\n\t\t\tfcsSize = 1\n\t\t}\n\tdefault:\n\t\tfcsSize = 1 << v\n\t}\n\td.FrameContentSize = fcsUnknown\n\tif fcsSize > 0 {\n\t\tb, err := br.readSmall(fcsSize)\n\t\tif err != nil {\n\t\t\tprintln(\"Reading Frame content\", err)\n\t\t\treturn err\n\t\t}\n\t\tswitch len(b) {\n\t\tcase 1:\n\t\t\td.FrameContentSize = uint64(b[0])\n\t\tcase 2:\n\t\t\t// When FCS_Field_Size is 2, the offset of 256 is added.\n\t\t\td.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) + 256\n\t\tcase 4:\n\t\t\td.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) | (uint64(b[2]) << 16) | (uint64(b[3]) << 24)\n\t\tcase 8:\n\t\t\td1 := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)\n\t\t\td2 := uint32(b[4]) | (uint32(b[5]) << 8) | (uint32(b[6]) << 16) | (uint32(b[7]) << 24)\n\t\t\td.FrameContentSize = uint64(d1) | (uint64(d2) << 32)\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"Read FCS:\", d.FrameContentSize)\n\t\t}\n\t}\n\n\t// Move this to shared.\n\td.HasCheckSum = fhd&(1<<2) != 0\n\tif d.HasCheckSum {\n\t\tif d.crc == nil {\n\t\t\td.crc = xxhash.New()\n\t\t}\n\t\td.crc.Reset()\n\t}\n\n\tif d.WindowSize > d.o.maxWindowSize {\n\t\tif debugDecoder {\n\t\t\tprintf(\"window size %d > max %d\\n\", d.WindowSize, d.o.maxWindowSize)\n\t\t}\n\t\treturn ErrWindowSizeExceeded\n\t}\n\n\tif d.WindowSize == 0 && d.SingleSegment {\n\t\t// We may not need window in this case.\n\t\td.WindowSize = max(d.FrameContentSize, MinWindowSize)\n\t\tif d.WindowSize > d.o.maxDecodedSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintf(\"window size %d > max %d\\n\", d.WindowSize, d.o.maxWindowSize)\n\t\t\t}\n\t\t\treturn ErrDecoderSizeExceeded\n\t\t}\n\t}\n\n\t// The minimum Window_Size is 1 KB.\n\tif d.WindowSize < MinWindowSize {\n\t\tif debugDecoder {\n\t\t\tprintln(\"got window size: \", d.WindowSize)\n\t\t}\n\t\treturn ErrWindowSizeTooSmall\n\t}\n\td.history.windowSize = int(d.WindowSize)\n\tif !d.o.lowMem || d.history.windowSize < maxBlockSize {\n\t\t// Alloc 2x window size if not low-mem, or window size below 2MB.\n\t\td.history.allocFrameBuffer = d.history.windowSize * 2\n\t} else {\n\t\tif d.o.lowMem {\n\t\t\t// Alloc with 1MB extra.\n\t\t\td.history.allocFrameBuffer = d.history.windowSize + maxBlockSize/2\n\t\t} else {\n\t\t\t// Alloc with 2MB extra.\n\t\t\td.history.allocFrameBuffer = d.history.windowSize + maxBlockSize\n\t\t}\n\t}\n\n\tif debugDecoder {\n\t\tprintln(\"Frame: Dict:\", d.DictionaryID, \"FrameContentSize:\", d.FrameContentSize, \"singleseg:\", d.SingleSegment, \"window:\", d.WindowSize, \"crc:\", d.HasCheckSum)\n\t}\n\n\t// history contains input - maybe we do something\n\td.rawInput = br\n\treturn nil\n}\n\n// next will start decoding the next block from stream.\nfunc (d *frameDec) next(block *blockDec) error {\n\tif debugDecoder {\n\t\tprintln(\"decoding new block\")\n\t}\n\terr := block.reset(d.rawInput, d.WindowSize)\n\tif err != nil {\n\t\tprintln(\"block error:\", err)\n\t\t// Signal the frame decoder we have a problem.\n\t\tblock.sendErr(err)\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// checkCRC will check the checksum, assuming the frame has one.\n// Will return ErrCRCMismatch if crc check failed, otherwise nil.\nfunc (d *frameDec) checkCRC() error {\n\t// We can overwrite upper tmp now\n\tbuf, err := d.rawInput.readSmall(4)\n\tif err != nil {\n\t\tprintln(\"CRC missing?\", err)\n\t\treturn err\n\t}\n\n\twant := binary.LittleEndian.Uint32(buf[:4])\n\tgot := uint32(d.crc.Sum64())\n\n\tif got != want {\n\t\tif debugDecoder {\n\t\t\tprintf(\"CRC check failed: got %08x, want %08x\\n\", got, want)\n\t\t}\n\t\treturn ErrCRCMismatch\n\t}\n\tif debugDecoder {\n\t\tprintf(\"CRC ok %08x\\n\", got)\n\t}\n\treturn nil\n}\n\n// consumeCRC skips over the checksum, assuming the frame has one.\nfunc (d *frameDec) consumeCRC() error {\n\t_, err := d.rawInput.readSmall(4)\n\tif err != nil {\n\t\tprintln(\"CRC missing?\", err)\n\t}\n\treturn err\n}\n\n// runDecoder will run the decoder for the remainder of the frame.\nfunc (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {\n\tsaved := d.history.b\n\n\t// We use the history for output to avoid copying it.\n\td.history.b = dst\n\td.history.ignoreBuffer = len(dst)\n\t// Store input length, so we only check new data.\n\tcrcStart := len(dst)\n\td.history.decoders.maxSyncLen = 0\n\tif d.o.limitToCap {\n\t\td.history.decoders.maxSyncLen = uint64(cap(dst) - len(dst))\n\t}\n\tif d.FrameContentSize != fcsUnknown {\n\t\tif !d.o.limitToCap || d.FrameContentSize+uint64(len(dst)) < d.history.decoders.maxSyncLen {\n\t\t\td.history.decoders.maxSyncLen = d.FrameContentSize + uint64(len(dst))\n\t\t}\n\t\tif d.history.decoders.maxSyncLen > d.o.maxDecodedSize {\n\t\t\tif debugDecoder {\n\t\t\t\tprintln(\"maxSyncLen:\", d.history.decoders.maxSyncLen, \"> maxDecodedSize:\", d.o.maxDecodedSize)\n\t\t\t}\n\t\t\treturn dst, ErrDecoderSizeExceeded\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"maxSyncLen:\", d.history.decoders.maxSyncLen)\n\t\t}\n\t\tif !d.o.limitToCap && uint64(cap(dst)) < d.history.decoders.maxSyncLen {\n\t\t\t// Alloc for output\n\t\t\tdst2 := make([]byte, len(dst), d.history.decoders.maxSyncLen+compressedBlockOverAlloc)\n\t\t\tcopy(dst2, dst)\n\t\t\tdst = dst2\n\t\t}\n\t}\n\tvar err error\n\tfor {\n\t\terr = dec.reset(d.rawInput, d.WindowSize)\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"next block:\", dec)\n\t\t}\n\t\terr = dec.decodeBuf(&d.history)\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tif uint64(len(d.history.b)-crcStart) > d.o.maxDecodedSize {\n\t\t\tprintln(\"runDecoder: maxDecodedSize exceeded\", uint64(len(d.history.b)-crcStart), \">\", d.o.maxDecodedSize)\n\t\t\terr = ErrDecoderSizeExceeded\n\t\t\tbreak\n\t\t}\n\t\tif d.o.limitToCap && len(d.history.b) > cap(dst) {\n\t\t\tprintln(\"runDecoder: cap exceeded\", uint64(len(d.history.b)), \">\", cap(dst))\n\t\t\terr = ErrDecoderSizeExceeded\n\t\t\tbreak\n\t\t}\n\t\tif uint64(len(d.history.b)-crcStart) > d.FrameContentSize {\n\t\t\tprintln(\"runDecoder: FrameContentSize exceeded\", uint64(len(d.history.b)-crcStart), \">\", d.FrameContentSize)\n\t\t\terr = ErrFrameSizeExceeded\n\t\t\tbreak\n\t\t}\n\t\tif dec.Last {\n\t\t\tbreak\n\t\t}\n\t\tif debugDecoder {\n\t\t\tprintln(\"runDecoder: FrameContentSize\", uint64(len(d.history.b)-crcStart), \"<=\", d.FrameContentSize)\n\t\t}\n\t}\n\tdst = d.history.b\n\tif err == nil {\n\t\tif d.FrameContentSize != fcsUnknown && uint64(len(d.history.b)-crcStart) != d.FrameContentSize {\n\t\t\terr = ErrFrameSizeMismatch\n\t\t} else if d.HasCheckSum {\n\t\t\tif d.o.ignoreChecksum {\n\t\t\t\terr = d.consumeCRC()\n\t\t\t} else {\n\t\t\t\td.crc.Write(dst[crcStart:])\n\t\t\t\terr = d.checkCRC()\n\t\t\t}\n\t\t}\n\t}\n\td.history.b = saved\n\treturn dst, err\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/frameenc.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"math/bits\"\n)\n\ntype frameHeader struct {\n\tContentSize   uint64\n\tWindowSize    uint32\n\tSingleSegment bool\n\tChecksum      bool\n\tDictID        uint32\n}\n\nconst maxHeaderSize = 14\n\nfunc (f frameHeader) appendTo(dst []byte) []byte {\n\tdst = append(dst, frameMagic...)\n\tvar fhd uint8\n\tif f.Checksum {\n\t\tfhd |= 1 << 2\n\t}\n\tif f.SingleSegment {\n\t\tfhd |= 1 << 5\n\t}\n\n\tvar dictIDContent []byte\n\tif f.DictID > 0 {\n\t\tvar tmp [4]byte\n\t\tif f.DictID < 256 {\n\t\t\tfhd |= 1\n\t\t\ttmp[0] = uint8(f.DictID)\n\t\t\tdictIDContent = tmp[:1]\n\t\t} else if f.DictID < 1<<16 {\n\t\t\tfhd |= 2\n\t\t\tbinary.LittleEndian.PutUint16(tmp[:2], uint16(f.DictID))\n\t\t\tdictIDContent = tmp[:2]\n\t\t} else {\n\t\t\tfhd |= 3\n\t\t\tbinary.LittleEndian.PutUint32(tmp[:4], f.DictID)\n\t\t\tdictIDContent = tmp[:4]\n\t\t}\n\t}\n\tvar fcs uint8\n\tif f.ContentSize >= 256 {\n\t\tfcs++\n\t}\n\tif f.ContentSize >= 65536+256 {\n\t\tfcs++\n\t}\n\tif f.ContentSize >= 0xffffffff {\n\t\tfcs++\n\t}\n\n\tfhd |= fcs << 6\n\n\tdst = append(dst, fhd)\n\tif !f.SingleSegment {\n\t\tconst winLogMin = 10\n\t\twindowLog := (bits.Len32(f.WindowSize-1) - winLogMin) << 3\n\t\tdst = append(dst, uint8(windowLog))\n\t}\n\tif f.DictID > 0 {\n\t\tdst = append(dst, dictIDContent...)\n\t}\n\tswitch fcs {\n\tcase 0:\n\t\tif f.SingleSegment {\n\t\t\tdst = append(dst, uint8(f.ContentSize))\n\t\t}\n\t\t// Unless SingleSegment is set, framessizes < 256 are not stored.\n\tcase 1:\n\t\tf.ContentSize -= 256\n\t\tdst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8))\n\tcase 2:\n\t\tdst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8), uint8(f.ContentSize>>16), uint8(f.ContentSize>>24))\n\tcase 3:\n\t\tdst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8), uint8(f.ContentSize>>16), uint8(f.ContentSize>>24),\n\t\t\tuint8(f.ContentSize>>32), uint8(f.ContentSize>>40), uint8(f.ContentSize>>48), uint8(f.ContentSize>>56))\n\tdefault:\n\t\tpanic(\"invalid fcs\")\n\t}\n\treturn dst\n}\n\nconst skippableFrameHeader = 4 + 4\n\n// calcSkippableFrame will return a total size to be added for written\n// to be divisible by multiple.\n// The value will always be > skippableFrameHeader.\n// The function will panic if written < 0 or wantMultiple <= 0.\nfunc calcSkippableFrame(written, wantMultiple int64) int {\n\tif wantMultiple <= 0 {\n\t\tpanic(\"wantMultiple <= 0\")\n\t}\n\tif written < 0 {\n\t\tpanic(\"written < 0\")\n\t}\n\tleftOver := written % wantMultiple\n\tif leftOver == 0 {\n\t\treturn 0\n\t}\n\ttoAdd := wantMultiple - leftOver\n\tfor toAdd < skippableFrameHeader {\n\t\ttoAdd += wantMultiple\n\t}\n\treturn int(toAdd)\n}\n\n// skippableFrame will add a skippable frame with a total size of bytes.\n// total should be >= skippableFrameHeader and < math.MaxUint32.\nfunc skippableFrame(dst []byte, total int, r io.Reader) ([]byte, error) {\n\tif total == 0 {\n\t\treturn dst, nil\n\t}\n\tif total < skippableFrameHeader {\n\t\treturn dst, fmt.Errorf(\"requested skippable frame (%d) < 8\", total)\n\t}\n\tif int64(total) > math.MaxUint32 {\n\t\treturn dst, fmt.Errorf(\"requested skippable frame (%d) > max uint32\", total)\n\t}\n\tdst = append(dst, 0x50, 0x2a, 0x4d, 0x18)\n\tf := uint32(total - skippableFrameHeader)\n\tdst = append(dst, uint8(f), uint8(f>>8), uint8(f>>16), uint8(f>>24))\n\tstart := len(dst)\n\tdst = append(dst, make([]byte, f)...)\n\t_, err := io.ReadFull(r, dst[start:])\n\treturn dst, err\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_decoder.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\nconst (\n\ttablelogAbsoluteMax = 9\n)\n\nconst (\n\t/*!MEMORY_USAGE :\n\t *  Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.)\n\t *  Increasing memory usage improves compression ratio\n\t *  Reduced memory usage can improve speed, due to cache effect\n\t *  Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */\n\tmaxMemoryUsage = tablelogAbsoluteMax + 2\n\n\tmaxTableLog    = maxMemoryUsage - 2\n\tmaxTablesize   = 1 << maxTableLog\n\tmaxTableMask   = (1 << maxTableLog) - 1\n\tminTablelog    = 5\n\tmaxSymbolValue = 255\n)\n\n// fseDecoder provides temporary storage for compression and decompression.\ntype fseDecoder struct {\n\tdt             [maxTablesize]decSymbol // Decompression table.\n\tsymbolLen      uint16                  // Length of active part of the symbol table.\n\tactualTableLog uint8                   // Selected tablelog.\n\tmaxBits        uint8                   // Maximum number of additional bits\n\n\t// used for table creation to avoid allocations.\n\tstateTable [256]uint16\n\tnorm       [maxSymbolValue + 1]int16\n\tpreDefined bool\n}\n\n// tableStep returns the next table index.\nfunc tableStep(tableSize uint32) uint32 {\n\treturn (tableSize >> 1) + (tableSize >> 3) + 3\n}\n\n// readNCount will read the symbol distribution so decoding tables can be constructed.\nfunc (s *fseDecoder) readNCount(b *byteReader, maxSymbol uint16) error {\n\tvar (\n\t\tcharnum   uint16\n\t\tprevious0 bool\n\t)\n\tif b.remain() < 4 {\n\t\treturn errors.New(\"input too small\")\n\t}\n\tbitStream := b.Uint32NC()\n\tnbBits := uint((bitStream & 0xF) + minTablelog) // extract tableLog\n\tif nbBits > tablelogAbsoluteMax {\n\t\tprintln(\"Invalid tablelog:\", nbBits)\n\t\treturn errors.New(\"tableLog too large\")\n\t}\n\tbitStream >>= 4\n\tbitCount := uint(4)\n\n\ts.actualTableLog = uint8(nbBits)\n\tremaining := int32((1 << nbBits) + 1)\n\tthreshold := int32(1 << nbBits)\n\tgotTotal := int32(0)\n\tnbBits++\n\n\tfor remaining > 1 && charnum <= maxSymbol {\n\t\tif previous0 {\n\t\t\t//println(\"prev0\")\n\t\t\tn0 := charnum\n\t\t\tfor (bitStream & 0xFFFF) == 0xFFFF {\n\t\t\t\t//println(\"24 x 0\")\n\t\t\t\tn0 += 24\n\t\t\t\tif r := b.remain(); r > 5 {\n\t\t\t\t\tb.advance(2)\n\t\t\t\t\t// The check above should make sure we can read 32 bits\n\t\t\t\t\tbitStream = b.Uint32NC() >> bitCount\n\t\t\t\t} else {\n\t\t\t\t\t// end of bit stream\n\t\t\t\t\tbitStream >>= 16\n\t\t\t\t\tbitCount += 16\n\t\t\t\t}\n\t\t\t}\n\t\t\t//printf(\"bitstream: %d, 0b%b\", bitStream&3, bitStream)\n\t\t\tfor (bitStream & 3) == 3 {\n\t\t\t\tn0 += 3\n\t\t\t\tbitStream >>= 2\n\t\t\t\tbitCount += 2\n\t\t\t}\n\t\t\tn0 += uint16(bitStream & 3)\n\t\t\tbitCount += 2\n\n\t\t\tif n0 > maxSymbolValue {\n\t\t\t\treturn errors.New(\"maxSymbolValue too small\")\n\t\t\t}\n\t\t\t//println(\"inserting \", n0-charnum, \"zeroes from idx\", charnum, \"ending before\", n0)\n\t\t\tfor charnum < n0 {\n\t\t\t\ts.norm[uint8(charnum)] = 0\n\t\t\t\tcharnum++\n\t\t\t}\n\n\t\t\tif r := b.remain(); r >= 7 || r-int(bitCount>>3) >= 4 {\n\t\t\t\tb.advance(bitCount >> 3)\n\t\t\t\tbitCount &= 7\n\t\t\t\t// The check above should make sure we can read 32 bits\n\t\t\t\tbitStream = b.Uint32NC() >> bitCount\n\t\t\t} else {\n\t\t\t\tbitStream >>= 2\n\t\t\t}\n\t\t}\n\n\t\tmax := (2*threshold - 1) - remaining\n\t\tvar count int32\n\n\t\tif int32(bitStream)&(threshold-1) < max {\n\t\t\tcount = int32(bitStream) & (threshold - 1)\n\t\t\tif debugAsserts && nbBits < 1 {\n\t\t\t\tpanic(\"nbBits underflow\")\n\t\t\t}\n\t\t\tbitCount += nbBits - 1\n\t\t} else {\n\t\t\tcount = int32(bitStream) & (2*threshold - 1)\n\t\t\tif count >= threshold {\n\t\t\t\tcount -= max\n\t\t\t}\n\t\t\tbitCount += nbBits\n\t\t}\n\n\t\t// extra accuracy\n\t\tcount--\n\t\tif count < 0 {\n\t\t\t// -1 means +1\n\t\t\tremaining += count\n\t\t\tgotTotal -= count\n\t\t} else {\n\t\t\tremaining -= count\n\t\t\tgotTotal += count\n\t\t}\n\t\ts.norm[charnum&0xff] = int16(count)\n\t\tcharnum++\n\t\tprevious0 = count == 0\n\t\tfor remaining < threshold {\n\t\t\tnbBits--\n\t\t\tthreshold >>= 1\n\t\t}\n\n\t\tif r := b.remain(); r >= 7 || r-int(bitCount>>3) >= 4 {\n\t\t\tb.advance(bitCount >> 3)\n\t\t\tbitCount &= 7\n\t\t\t// The check above should make sure we can read 32 bits\n\t\t\tbitStream = b.Uint32NC() >> (bitCount & 31)\n\t\t} else {\n\t\t\tbitCount -= (uint)(8 * (len(b.b) - 4 - b.off))\n\t\t\tb.off = len(b.b) - 4\n\t\t\tbitStream = b.Uint32() >> (bitCount & 31)\n\t\t}\n\t}\n\ts.symbolLen = charnum\n\tif s.symbolLen <= 1 {\n\t\treturn fmt.Errorf(\"symbolLen (%d) too small\", s.symbolLen)\n\t}\n\tif s.symbolLen > maxSymbolValue+1 {\n\t\treturn fmt.Errorf(\"symbolLen (%d) too big\", s.symbolLen)\n\t}\n\tif remaining != 1 {\n\t\treturn fmt.Errorf(\"corruption detected (remaining %d != 1)\", remaining)\n\t}\n\tif bitCount > 32 {\n\t\treturn fmt.Errorf(\"corruption detected (bitCount %d > 32)\", bitCount)\n\t}\n\tif gotTotal != 1<<s.actualTableLog {\n\t\treturn fmt.Errorf(\"corruption detected (total %d != %d)\", gotTotal, 1<<s.actualTableLog)\n\t}\n\tb.advance((bitCount + 7) >> 3)\n\treturn s.buildDtable()\n}\n\nfunc (s *fseDecoder) mustReadFrom(r io.Reader) {\n\tfatalErr := func(err error) {\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\t// \tdt             [maxTablesize]decSymbol // Decompression table.\n\t//\tsymbolLen      uint16                  // Length of active part of the symbol table.\n\t//\tactualTableLog uint8                   // Selected tablelog.\n\t//\tmaxBits        uint8                   // Maximum number of additional bits\n\t//\t// used for table creation to avoid allocations.\n\t//\tstateTable [256]uint16\n\t//\tnorm       [maxSymbolValue + 1]int16\n\t//\tpreDefined bool\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.dt))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.symbolLen))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.actualTableLog))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.maxBits))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.stateTable))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.norm))\n\tfatalErr(binary.Read(r, binary.LittleEndian, &s.preDefined))\n}\n\n// decSymbol contains information about a state entry,\n// Including the state offset base, the output symbol and\n// the number of bits to read for the low part of the destination state.\n// Using a composite uint64 is faster than a struct with separate members.\ntype decSymbol uint64\n\nfunc newDecSymbol(nbits, addBits uint8, newState uint16, baseline uint32) decSymbol {\n\treturn decSymbol(nbits) | (decSymbol(addBits) << 8) | (decSymbol(newState) << 16) | (decSymbol(baseline) << 32)\n}\n\nfunc (d decSymbol) nbBits() uint8 {\n\treturn uint8(d)\n}\n\nfunc (d decSymbol) addBits() uint8 {\n\treturn uint8(d >> 8)\n}\n\nfunc (d decSymbol) newState() uint16 {\n\treturn uint16(d >> 16)\n}\n\nfunc (d decSymbol) baselineInt() int {\n\treturn int(d >> 32)\n}\n\nfunc (d *decSymbol) setNBits(nBits uint8) {\n\tconst mask = 0xffffffffffffff00\n\t*d = (*d & mask) | decSymbol(nBits)\n}\n\nfunc (d *decSymbol) setAddBits(addBits uint8) {\n\tconst mask = 0xffffffffffff00ff\n\t*d = (*d & mask) | (decSymbol(addBits) << 8)\n}\n\nfunc (d *decSymbol) setNewState(state uint16) {\n\tconst mask = 0xffffffff0000ffff\n\t*d = (*d & mask) | decSymbol(state)<<16\n}\n\nfunc (d *decSymbol) setExt(addBits uint8, baseline uint32) {\n\tconst mask = 0xffff00ff\n\t*d = (*d & mask) | (decSymbol(addBits) << 8) | (decSymbol(baseline) << 32)\n}\n\n// decSymbolValue returns the transformed decSymbol for the given symbol.\nfunc decSymbolValue(symb uint8, t []baseOffset) (decSymbol, error) {\n\tif int(symb) >= len(t) {\n\t\treturn 0, fmt.Errorf(\"rle symbol %d >= max %d\", symb, len(t))\n\t}\n\tlu := t[symb]\n\treturn newDecSymbol(0, lu.addBits, 0, lu.baseLine), nil\n}\n\n// setRLE will set the decoder til RLE mode.\nfunc (s *fseDecoder) setRLE(symbol decSymbol) {\n\ts.actualTableLog = 0\n\ts.maxBits = symbol.addBits()\n\ts.dt[0] = symbol\n}\n\n// transform will transform the decoder table into a table usable for\n// decoding without having to apply the transformation while decoding.\n// The state will contain the base value and the number of bits to read.\nfunc (s *fseDecoder) transform(t []baseOffset) error {\n\ttableSize := uint16(1 << s.actualTableLog)\n\ts.maxBits = 0\n\tfor i, v := range s.dt[:tableSize] {\n\t\tadd := v.addBits()\n\t\tif int(add) >= len(t) {\n\t\t\treturn fmt.Errorf(\"invalid decoding table entry %d, symbol %d >= max (%d)\", i, v.addBits(), len(t))\n\t\t}\n\t\tlu := t[add]\n\t\tif lu.addBits > s.maxBits {\n\t\t\ts.maxBits = lu.addBits\n\t\t}\n\t\tv.setExt(lu.addBits, lu.baseLine)\n\t\ts.dt[i] = v\n\t}\n\treturn nil\n}\n\ntype fseState struct {\n\tdt    []decSymbol\n\tstate decSymbol\n}\n\n// Initialize and decodeAsync first state and symbol.\nfunc (s *fseState) init(br *bitReader, tableLog uint8, dt []decSymbol) {\n\ts.dt = dt\n\tbr.fill()\n\ts.state = dt[br.getBits(tableLog)]\n}\n\n// final returns the current state symbol without decoding the next.\nfunc (s decSymbol) final() (int, uint8) {\n\treturn s.baselineInt(), s.addBits()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go",
    "content": "//go:build amd64 && !appengine && !noasm && gc\n// +build amd64,!appengine,!noasm,gc\n\npackage zstd\n\nimport (\n\t\"fmt\"\n)\n\ntype buildDtableAsmContext struct {\n\t// inputs\n\tstateTable *uint16\n\tnorm       *int16\n\tdt         *uint64\n\n\t// outputs --- set by the procedure in the case of error;\n\t// for interpretation please see the error handling part below\n\terrParam1 uint64\n\terrParam2 uint64\n}\n\n// buildDtable_asm is an x86 assembly implementation of fseDecoder.buildDtable.\n// Function returns non-zero exit code on error.\n//\n//go:noescape\nfunc buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int\n\n// please keep in sync with _generate/gen_fse.go\nconst (\n\terrorCorruptedNormalizedCounter = 1\n\terrorNewStateTooBig             = 2\n\terrorNewStateNoBits             = 3\n)\n\n// buildDtable will build the decoding table.\nfunc (s *fseDecoder) buildDtable() error {\n\tctx := buildDtableAsmContext{\n\t\tstateTable: &s.stateTable[0],\n\t\tnorm:       &s.norm[0],\n\t\tdt:         (*uint64)(&s.dt[0]),\n\t}\n\tcode := buildDtable_asm(s, &ctx)\n\n\tif code != 0 {\n\t\tswitch code {\n\t\tcase errorCorruptedNormalizedCounter:\n\t\t\tposition := ctx.errParam1\n\t\t\treturn fmt.Errorf(\"corrupted input (position=%d, expected 0)\", position)\n\n\t\tcase errorNewStateTooBig:\n\t\t\tnewState := decSymbol(ctx.errParam1)\n\t\t\tsize := ctx.errParam2\n\t\t\treturn fmt.Errorf(\"newState (%d) outside table size (%d)\", newState, size)\n\n\t\tcase errorNewStateNoBits:\n\t\t\tnewState := decSymbol(ctx.errParam1)\n\t\t\toldState := decSymbol(ctx.errParam2)\n\t\t\treturn fmt.Errorf(\"newState (%d) == oldState (%d) and no bits\", newState, oldState)\n\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"buildDtable_asm returned unhandled nonzero code = %d\", code)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.s",
    "content": "// Code generated by command: go run gen_fse.go -out ../fse_decoder_amd64.s -pkg=zstd. DO NOT EDIT.\n\n//go:build !appengine && !noasm && gc && !noasm\n\n// func buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int\nTEXT ·buildDtable_asm(SB), $0-24\n\tMOVQ ctx+8(FP), CX\n\tMOVQ s+0(FP), DI\n\n\t// Load values\n\tMOVBQZX 4098(DI), DX\n\tXORQ    AX, AX\n\tBTSQ    DX, AX\n\tMOVQ    (CX), BX\n\tMOVQ    16(CX), SI\n\tLEAQ    -1(AX), R8\n\tMOVQ    8(CX), CX\n\tMOVWQZX 4096(DI), DI\n\n\t// End load values\n\t// Init, lay down lowprob symbols\n\tXORQ R9, R9\n\tJMP  init_main_loop_condition\n\ninit_main_loop:\n\tMOVWQSX (CX)(R9*2), R10\n\tCMPW    R10, $-1\n\tJNE     do_not_update_high_threshold\n\tMOVB    R9, 1(SI)(R8*8)\n\tDECQ    R8\n\tMOVQ    $0x0000000000000001, R10\n\ndo_not_update_high_threshold:\n\tMOVW R10, (BX)(R9*2)\n\tINCQ R9\n\ninit_main_loop_condition:\n\tCMPQ R9, DI\n\tJL   init_main_loop\n\n\t// Spread symbols\n\t// Calculate table step\n\tMOVQ AX, R9\n\tSHRQ $0x01, R9\n\tMOVQ AX, R10\n\tSHRQ $0x03, R10\n\tLEAQ 3(R9)(R10*1), R9\n\n\t// Fill add bits values\n\tLEAQ -1(AX), R10\n\tXORQ R11, R11\n\tXORQ R12, R12\n\tJMP  spread_main_loop_condition\n\nspread_main_loop:\n\tXORQ    R13, R13\n\tMOVWQSX (CX)(R12*2), R14\n\tJMP     spread_inner_loop_condition\n\nspread_inner_loop:\n\tMOVB R12, 1(SI)(R11*8)\n\nadjust_position:\n\tADDQ R9, R11\n\tANDQ R10, R11\n\tCMPQ R11, R8\n\tJG   adjust_position\n\tINCQ R13\n\nspread_inner_loop_condition:\n\tCMPQ R13, R14\n\tJL   spread_inner_loop\n\tINCQ R12\n\nspread_main_loop_condition:\n\tCMPQ  R12, DI\n\tJL    spread_main_loop\n\tTESTQ R11, R11\n\tJZ    spread_check_ok\n\tMOVQ  ctx+8(FP), AX\n\tMOVQ  R11, 24(AX)\n\tMOVQ  $+1, ret+16(FP)\n\tRET\n\nspread_check_ok:\n\t// Build Decoding table\n\tXORQ DI, DI\n\nbuild_table_main_table:\n\tMOVBQZX 1(SI)(DI*8), CX\n\tMOVWQZX (BX)(CX*2), R8\n\tLEAQ    1(R8), R9\n\tMOVW    R9, (BX)(CX*2)\n\tMOVQ    R8, R9\n\tBSRQ    R9, R9\n\tMOVQ    DX, CX\n\tSUBQ    R9, CX\n\tSHLQ    CL, R8\n\tSUBQ    AX, R8\n\tMOVB    CL, (SI)(DI*8)\n\tMOVW    R8, 2(SI)(DI*8)\n\tCMPQ    R8, AX\n\tJLE     build_table_check1_ok\n\tMOVQ    ctx+8(FP), CX\n\tMOVQ    R8, 24(CX)\n\tMOVQ    AX, 32(CX)\n\tMOVQ    $+2, ret+16(FP)\n\tRET\n\nbuild_table_check1_ok:\n\tTESTB CL, CL\n\tJNZ   build_table_check2_ok\n\tCMPW  R8, DI\n\tJNE   build_table_check2_ok\n\tMOVQ  ctx+8(FP), AX\n\tMOVQ  R8, 24(AX)\n\tMOVQ  DI, 32(AX)\n\tMOVQ  $+3, ret+16(FP)\n\tRET\n\nbuild_table_check2_ok:\n\tINCQ DI\n\tCMPQ DI, AX\n\tJL   build_table_main_table\n\tMOVQ $+0, ret+16(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go",
    "content": "//go:build !amd64 || appengine || !gc || noasm\n// +build !amd64 appengine !gc noasm\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// buildDtable will build the decoding table.\nfunc (s *fseDecoder) buildDtable() error {\n\ttableSize := uint32(1 << s.actualTableLog)\n\thighThreshold := tableSize - 1\n\tsymbolNext := s.stateTable[:256]\n\n\t// Init, lay down lowprob symbols\n\t{\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tif v == -1 {\n\t\t\t\ts.dt[highThreshold].setAddBits(uint8(i))\n\t\t\t\thighThreshold--\n\t\t\t\tv = 1\n\t\t\t}\n\t\t\tsymbolNext[i] = uint16(v)\n\t\t}\n\t}\n\n\t// Spread symbols\n\t{\n\t\ttableMask := tableSize - 1\n\t\tstep := tableStep(tableSize)\n\t\tposition := uint32(0)\n\t\tfor ss, v := range s.norm[:s.symbolLen] {\n\t\t\tfor i := 0; i < int(v); i++ {\n\t\t\t\ts.dt[position].setAddBits(uint8(ss))\n\t\t\t\tfor {\n\t\t\t\t\t// lowprob area\n\t\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\t\tif position <= highThreshold {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif position != 0 {\n\t\t\t// position must reach all cells once, otherwise normalizedCounter is incorrect\n\t\t\treturn errors.New(\"corrupted input (position != 0)\")\n\t\t}\n\t}\n\n\t// Build Decoding table\n\t{\n\t\ttableSize := uint16(1 << s.actualTableLog)\n\t\tfor u, v := range s.dt[:tableSize] {\n\t\t\tsymbol := v.addBits()\n\t\t\tnextState := symbolNext[symbol]\n\t\t\tsymbolNext[symbol] = nextState + 1\n\t\t\tnBits := s.actualTableLog - byte(highBits(uint32(nextState)))\n\t\t\ts.dt[u&maxTableMask].setNBits(nBits)\n\t\t\tnewState := (nextState << nBits) - tableSize\n\t\t\tif newState > tableSize {\n\t\t\t\treturn fmt.Errorf(\"newState (%d) outside table size (%d)\", newState, tableSize)\n\t\t\t}\n\t\t\tif newState == uint16(u) && nBits == 0 {\n\t\t\t\t// Seems weird that this is possible with nbits > 0.\n\t\t\t\treturn fmt.Errorf(\"newState (%d) == oldState (%d) and no bits\", newState, u)\n\t\t\t}\n\t\t\ts.dt[u&maxTableMask].setNewState(newState)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_encoder.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n)\n\nconst (\n\t// For encoding we only support up to\n\tmaxEncTableLog    = 8\n\tmaxEncTablesize   = 1 << maxTableLog\n\tmaxEncTableMask   = (1 << maxTableLog) - 1\n\tminEncTablelog    = 5\n\tmaxEncSymbolValue = maxMatchLengthSymbol\n)\n\n// Scratch provides temporary storage for compression and decompression.\ntype fseEncoder struct {\n\tsymbolLen      uint16 // Length of active part of the symbol table.\n\tactualTableLog uint8  // Selected tablelog.\n\tct             cTable // Compression tables.\n\tmaxCount       int    // count of the most probable symbol\n\tzeroBits       bool   // no bits has prob > 50%.\n\tclearCount     bool   // clear count\n\tuseRLE         bool   // This encoder is for RLE\n\tpreDefined     bool   // This encoder is predefined.\n\treUsed         bool   // Set to know when the encoder has been reused.\n\trleVal         uint8  // RLE Symbol\n\tmaxBits        uint8  // Maximum output bits after transform.\n\n\t// TODO: Technically zstd should be fine with 64 bytes.\n\tcount [256]uint32\n\tnorm  [256]int16\n}\n\n// cTable contains tables used for compression.\ntype cTable struct {\n\ttableSymbol []byte\n\tstateTable  []uint16\n\tsymbolTT    []symbolTransform\n}\n\n// symbolTransform contains the state transform for a symbol.\ntype symbolTransform struct {\n\tdeltaNbBits    uint32\n\tdeltaFindState int16\n\toutBits        uint8\n}\n\n// String prints values as a human readable string.\nfunc (s symbolTransform) String() string {\n\treturn fmt.Sprintf(\"{deltabits: %08x, findstate:%d outbits:%d}\", s.deltaNbBits, s.deltaFindState, s.outBits)\n}\n\n// Histogram allows to populate the histogram and skip that step in the compression,\n// It otherwise allows to inspect the histogram when compression is done.\n// To indicate that you have populated the histogram call HistogramFinished\n// with the value of the highest populated symbol, as well as the number of entries\n// in the most populated entry. These are accepted at face value.\nfunc (s *fseEncoder) Histogram() *[256]uint32 {\n\treturn &s.count\n}\n\n// HistogramFinished can be called to indicate that the histogram has been populated.\n// maxSymbol is the index of the highest set symbol of the next data segment.\n// maxCount is the number of entries in the most populated entry.\n// These are accepted at face value.\nfunc (s *fseEncoder) HistogramFinished(maxSymbol uint8, maxCount int) {\n\ts.maxCount = maxCount\n\ts.symbolLen = uint16(maxSymbol) + 1\n\ts.clearCount = maxCount != 0\n}\n\n// allocCtable will allocate tables needed for compression.\n// If existing tables a re big enough, they are simply re-used.\nfunc (s *fseEncoder) allocCtable() {\n\ttableSize := 1 << s.actualTableLog\n\t// get tableSymbol that is big enough.\n\tif cap(s.ct.tableSymbol) < tableSize {\n\t\ts.ct.tableSymbol = make([]byte, tableSize)\n\t}\n\ts.ct.tableSymbol = s.ct.tableSymbol[:tableSize]\n\n\tctSize := tableSize\n\tif cap(s.ct.stateTable) < ctSize {\n\t\ts.ct.stateTable = make([]uint16, ctSize)\n\t}\n\ts.ct.stateTable = s.ct.stateTable[:ctSize]\n\n\tif cap(s.ct.symbolTT) < 256 {\n\t\ts.ct.symbolTT = make([]symbolTransform, 256)\n\t}\n\ts.ct.symbolTT = s.ct.symbolTT[:256]\n}\n\n// buildCTable will populate the compression table so it is ready to be used.\nfunc (s *fseEncoder) buildCTable() error {\n\ttableSize := uint32(1 << s.actualTableLog)\n\thighThreshold := tableSize - 1\n\tvar cumul [256]int16\n\n\ts.allocCtable()\n\ttableSymbol := s.ct.tableSymbol[:tableSize]\n\t// symbol start positions\n\t{\n\t\tcumul[0] = 0\n\t\tfor ui, v := range s.norm[:s.symbolLen-1] {\n\t\t\tu := byte(ui) // one less than reference\n\t\t\tif v == -1 {\n\t\t\t\t// Low proba symbol\n\t\t\t\tcumul[u+1] = cumul[u] + 1\n\t\t\t\ttableSymbol[highThreshold] = u\n\t\t\t\thighThreshold--\n\t\t\t} else {\n\t\t\t\tcumul[u+1] = cumul[u] + v\n\t\t\t}\n\t\t}\n\t\t// Encode last symbol separately to avoid overflowing u\n\t\tu := int(s.symbolLen - 1)\n\t\tv := s.norm[s.symbolLen-1]\n\t\tif v == -1 {\n\t\t\t// Low proba symbol\n\t\t\tcumul[u+1] = cumul[u] + 1\n\t\t\ttableSymbol[highThreshold] = byte(u)\n\t\t\thighThreshold--\n\t\t} else {\n\t\t\tcumul[u+1] = cumul[u] + v\n\t\t}\n\t\tif uint32(cumul[s.symbolLen]) != tableSize {\n\t\t\treturn fmt.Errorf(\"internal error: expected cumul[s.symbolLen] (%d) == tableSize (%d)\", cumul[s.symbolLen], tableSize)\n\t\t}\n\t\tcumul[s.symbolLen] = int16(tableSize) + 1\n\t}\n\t// Spread symbols\n\ts.zeroBits = false\n\t{\n\t\tstep := tableStep(tableSize)\n\t\ttableMask := tableSize - 1\n\t\tvar position uint32\n\t\t// if any symbol > largeLimit, we may have 0 bits output.\n\t\tlargeLimit := int16(1 << (s.actualTableLog - 1))\n\t\tfor ui, v := range s.norm[:s.symbolLen] {\n\t\t\tsymbol := byte(ui)\n\t\t\tif v > largeLimit {\n\t\t\t\ts.zeroBits = true\n\t\t\t}\n\t\t\tfor range v {\n\t\t\t\ttableSymbol[position] = symbol\n\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\tfor position > highThreshold {\n\t\t\t\t\tposition = (position + step) & tableMask\n\t\t\t\t} /* Low proba area */\n\t\t\t}\n\t\t}\n\n\t\t// Check if we have gone through all positions\n\t\tif position != 0 {\n\t\t\treturn errors.New(\"position!=0\")\n\t\t}\n\t}\n\n\t// Build table\n\ttable := s.ct.stateTable\n\t{\n\t\ttsi := int(tableSize)\n\t\tfor u, v := range tableSymbol {\n\t\t\t// TableU16 : sorted by symbol order; gives next state value\n\t\t\ttable[cumul[v]] = uint16(tsi + u)\n\t\t\tcumul[v]++\n\t\t}\n\t}\n\n\t// Build Symbol Transformation Table\n\t{\n\t\ttotal := int16(0)\n\t\tsymbolTT := s.ct.symbolTT[:s.symbolLen]\n\t\ttableLog := s.actualTableLog\n\t\ttl := (uint32(tableLog) << 16) - (1 << tableLog)\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tswitch v {\n\t\t\tcase 0:\n\t\t\tcase -1, 1:\n\t\t\t\tsymbolTT[i].deltaNbBits = tl\n\t\t\t\tsymbolTT[i].deltaFindState = total - 1\n\t\t\t\ttotal++\n\t\t\tdefault:\n\t\t\t\tmaxBitsOut := uint32(tableLog) - highBit(uint32(v-1))\n\t\t\t\tminStatePlus := uint32(v) << maxBitsOut\n\t\t\t\tsymbolTT[i].deltaNbBits = (maxBitsOut << 16) - minStatePlus\n\t\t\t\tsymbolTT[i].deltaFindState = total - v\n\t\t\t\ttotal += v\n\t\t\t}\n\t\t}\n\t\tif total != int16(tableSize) {\n\t\t\treturn fmt.Errorf(\"total mismatch %d (got) != %d (want)\", total, tableSize)\n\t\t}\n\t}\n\treturn nil\n}\n\nvar rtbTable = [...]uint32{0, 473195, 504333, 520860, 550000, 700000, 750000, 830000}\n\nfunc (s *fseEncoder) setRLE(val byte) {\n\ts.allocCtable()\n\ts.actualTableLog = 0\n\ts.ct.stateTable = s.ct.stateTable[:1]\n\ts.ct.symbolTT[val] = symbolTransform{\n\t\tdeltaFindState: 0,\n\t\tdeltaNbBits:    0,\n\t}\n\tif debugEncoder {\n\t\tprintln(\"setRLE: val\", val, \"symbolTT\", s.ct.symbolTT[val])\n\t}\n\ts.rleVal = val\n\ts.useRLE = true\n}\n\n// setBits will set output bits for the transform.\n// if nil is provided, the number of bits is equal to the index.\nfunc (s *fseEncoder) setBits(transform []byte) {\n\tif s.reUsed || s.preDefined {\n\t\treturn\n\t}\n\tif s.useRLE {\n\t\tif transform == nil {\n\t\t\ts.ct.symbolTT[s.rleVal].outBits = s.rleVal\n\t\t\ts.maxBits = s.rleVal\n\t\t\treturn\n\t\t}\n\t\ts.maxBits = transform[s.rleVal]\n\t\ts.ct.symbolTT[s.rleVal].outBits = s.maxBits\n\t\treturn\n\t}\n\tif transform == nil {\n\t\tfor i := range s.ct.symbolTT[:s.symbolLen] {\n\t\t\ts.ct.symbolTT[i].outBits = uint8(i)\n\t\t}\n\t\ts.maxBits = uint8(s.symbolLen - 1)\n\t\treturn\n\t}\n\ts.maxBits = 0\n\tfor i, v := range transform[:s.symbolLen] {\n\t\ts.ct.symbolTT[i].outBits = v\n\t\tif v > s.maxBits {\n\t\t\t// We could assume bits always going up, but we play safe.\n\t\t\ts.maxBits = v\n\t\t}\n\t}\n}\n\n// normalizeCount will normalize the count of the symbols so\n// the total is equal to the table size.\n// If successful, compression tables will also be made ready.\nfunc (s *fseEncoder) normalizeCount(length int) error {\n\tif s.reUsed {\n\t\treturn nil\n\t}\n\ts.optimalTableLog(length)\n\tvar (\n\t\ttableLog          = s.actualTableLog\n\t\tscale             = 62 - uint64(tableLog)\n\t\tstep              = (1 << 62) / uint64(length)\n\t\tvStep             = uint64(1) << (scale - 20)\n\t\tstillToDistribute = int16(1 << tableLog)\n\t\tlargest           int\n\t\tlargestP          int16\n\t\tlowThreshold      = (uint32)(length >> tableLog)\n\t)\n\tif s.maxCount == length {\n\t\ts.useRLE = true\n\t\treturn nil\n\t}\n\ts.useRLE = false\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t// already handled\n\t\t// if (count[s] == s.length) return 0;   /* rle special case */\n\n\t\tif cnt == 0 {\n\t\t\ts.norm[i] = 0\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowThreshold {\n\t\t\ts.norm[i] = -1\n\t\t\tstillToDistribute--\n\t\t} else {\n\t\t\tproba := (int16)((uint64(cnt) * step) >> scale)\n\t\t\tif proba < 8 {\n\t\t\t\trestToBeat := vStep * uint64(rtbTable[proba])\n\t\t\t\tv := uint64(cnt)*step - (uint64(proba) << scale)\n\t\t\t\tif v > restToBeat {\n\t\t\t\t\tproba++\n\t\t\t\t}\n\t\t\t}\n\t\t\tif proba > largestP {\n\t\t\t\tlargestP = proba\n\t\t\t\tlargest = i\n\t\t\t}\n\t\t\ts.norm[i] = proba\n\t\t\tstillToDistribute -= proba\n\t\t}\n\t}\n\n\tif -stillToDistribute >= (s.norm[largest] >> 1) {\n\t\t// corner case, need another normalization method\n\t\terr := s.normalizeCount2(length)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif debugAsserts {\n\t\t\terr = s.validateNorm()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn s.buildCTable()\n\t}\n\ts.norm[largest] += stillToDistribute\n\tif debugAsserts {\n\t\terr := s.validateNorm()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn s.buildCTable()\n}\n\n// Secondary normalization method.\n// To be used when primary method fails.\nfunc (s *fseEncoder) normalizeCount2(length int) error {\n\tconst notYetAssigned = -2\n\tvar (\n\t\tdistributed  uint32\n\t\ttotal        = uint32(length)\n\t\ttableLog     = s.actualTableLog\n\t\tlowThreshold = total >> tableLog\n\t\tlowOne       = (total * 3) >> (tableLog + 1)\n\t)\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\tif cnt == 0 {\n\t\t\ts.norm[i] = 0\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowThreshold {\n\t\t\ts.norm[i] = -1\n\t\t\tdistributed++\n\t\t\ttotal -= cnt\n\t\t\tcontinue\n\t\t}\n\t\tif cnt <= lowOne {\n\t\t\ts.norm[i] = 1\n\t\t\tdistributed++\n\t\t\ttotal -= cnt\n\t\t\tcontinue\n\t\t}\n\t\ts.norm[i] = notYetAssigned\n\t}\n\ttoDistribute := (1 << tableLog) - distributed\n\n\tif (total / toDistribute) > lowOne {\n\t\t// risk of rounding to zero\n\t\tlowOne = (total * 3) / (toDistribute * 2)\n\t\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t\tif (s.norm[i] == notYetAssigned) && (cnt <= lowOne) {\n\t\t\t\ts.norm[i] = 1\n\t\t\t\tdistributed++\n\t\t\t\ttotal -= cnt\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\ttoDistribute = (1 << tableLog) - distributed\n\t}\n\tif distributed == uint32(s.symbolLen)+1 {\n\t\t// all values are pretty poor;\n\t\t//   probably incompressible data (should have already been detected);\n\t\t//   find max, then give all remaining points to max\n\t\tvar maxV int\n\t\tvar maxC uint32\n\t\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\t\tif cnt > maxC {\n\t\t\t\tmaxV = i\n\t\t\t\tmaxC = cnt\n\t\t\t}\n\t\t}\n\t\ts.norm[maxV] += int16(toDistribute)\n\t\treturn nil\n\t}\n\n\tif total == 0 {\n\t\t// all of the symbols were low enough for the lowOne or lowThreshold\n\t\tfor i := uint32(0); toDistribute > 0; i = (i + 1) % (uint32(s.symbolLen)) {\n\t\t\tif s.norm[i] > 0 {\n\t\t\t\ttoDistribute--\n\t\t\t\ts.norm[i]++\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tvar (\n\t\tvStepLog = 62 - uint64(tableLog)\n\t\tmid      = uint64((1 << (vStepLog - 1)) - 1)\n\t\trStep    = (((1 << vStepLog) * uint64(toDistribute)) + mid) / uint64(total) // scale on remaining\n\t\ttmpTotal = mid\n\t)\n\tfor i, cnt := range s.count[:s.symbolLen] {\n\t\tif s.norm[i] == notYetAssigned {\n\t\t\tvar (\n\t\t\t\tend    = tmpTotal + uint64(cnt)*rStep\n\t\t\t\tsStart = uint32(tmpTotal >> vStepLog)\n\t\t\t\tsEnd   = uint32(end >> vStepLog)\n\t\t\t\tweight = sEnd - sStart\n\t\t\t)\n\t\t\tif weight < 1 {\n\t\t\t\treturn errors.New(\"weight < 1\")\n\t\t\t}\n\t\t\ts.norm[i] = int16(weight)\n\t\t\ttmpTotal = end\n\t\t}\n\t}\n\treturn nil\n}\n\n// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog\nfunc (s *fseEncoder) optimalTableLog(length int) {\n\ttableLog := uint8(maxEncTableLog)\n\tminBitsSrc := highBit(uint32(length)) + 1\n\tminBitsSymbols := highBit(uint32(s.symbolLen-1)) + 2\n\tminBits := uint8(minBitsSymbols)\n\tif minBitsSrc < minBitsSymbols {\n\t\tminBits = uint8(minBitsSrc)\n\t}\n\n\tmaxBitsSrc := uint8(highBit(uint32(length-1))) - 2\n\tif maxBitsSrc < tableLog {\n\t\t// Accuracy can be reduced\n\t\ttableLog = maxBitsSrc\n\t}\n\tif minBits > tableLog {\n\t\ttableLog = minBits\n\t}\n\t// Need a minimum to safely represent all symbol values\n\tif tableLog < minEncTablelog {\n\t\ttableLog = minEncTablelog\n\t}\n\tif tableLog > maxEncTableLog {\n\t\ttableLog = maxEncTableLog\n\t}\n\ts.actualTableLog = tableLog\n}\n\n// validateNorm validates the normalized histogram table.\nfunc (s *fseEncoder) validateNorm() (err error) {\n\tvar total int\n\tfor _, v := range s.norm[:s.symbolLen] {\n\t\tif v >= 0 {\n\t\t\ttotal += int(v)\n\t\t} else {\n\t\t\ttotal -= int(v)\n\t\t}\n\t}\n\tdefer func() {\n\t\tif err == nil {\n\t\t\treturn\n\t\t}\n\t\tfmt.Printf(\"selected TableLog: %d, Symbol length: %d\\n\", s.actualTableLog, s.symbolLen)\n\t\tfor i, v := range s.norm[:s.symbolLen] {\n\t\t\tfmt.Printf(\"%3d: %5d -> %4d \\n\", i, s.count[i], v)\n\t\t}\n\t}()\n\tif total != (1 << s.actualTableLog) {\n\t\treturn fmt.Errorf(\"warning: Total == %d != %d\", total, 1<<s.actualTableLog)\n\t}\n\tfor i, v := range s.count[s.symbolLen:] {\n\t\tif v != 0 {\n\t\t\treturn fmt.Errorf(\"warning: Found symbol out of range, %d after cut\", i)\n\t\t}\n\t}\n\treturn nil\n}\n\n// writeCount will write the normalized histogram count to header.\n// This is read back by readNCount.\nfunc (s *fseEncoder) writeCount(out []byte) ([]byte, error) {\n\tif s.useRLE {\n\t\treturn append(out, s.rleVal), nil\n\t}\n\tif s.preDefined || s.reUsed {\n\t\t// Never write predefined.\n\t\treturn out, nil\n\t}\n\n\tvar (\n\t\ttableLog  = s.actualTableLog\n\t\ttableSize = 1 << tableLog\n\t\tprevious0 bool\n\t\tcharnum   uint16\n\n\t\t// maximum header size plus 2 extra bytes for final output if bitCount == 0.\n\t\tmaxHeaderSize = ((int(s.symbolLen) * int(tableLog)) >> 3) + 3 + 2\n\n\t\t// Write Table Size\n\t\tbitStream = uint32(tableLog - minEncTablelog)\n\t\tbitCount  = uint(4)\n\t\tremaining = int16(tableSize + 1) /* +1 for extra accuracy */\n\t\tthreshold = int16(tableSize)\n\t\tnbBits    = uint(tableLog + 1)\n\t\toutP      = len(out)\n\t)\n\tif cap(out) < outP+maxHeaderSize {\n\t\tout = append(out, make([]byte, maxHeaderSize*3)...)\n\t\tout = out[:len(out)-maxHeaderSize*3]\n\t}\n\tout = out[:outP+maxHeaderSize]\n\n\t// stops at 1\n\tfor remaining > 1 {\n\t\tif previous0 {\n\t\t\tstart := charnum\n\t\t\tfor s.norm[charnum] == 0 {\n\t\t\t\tcharnum++\n\t\t\t}\n\t\t\tfor charnum >= start+24 {\n\t\t\t\tstart += 24\n\t\t\t\tbitStream += uint32(0xFFFF) << bitCount\n\t\t\t\tout[outP] = byte(bitStream)\n\t\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\t\toutP += 2\n\t\t\t\tbitStream >>= 16\n\t\t\t}\n\t\t\tfor charnum >= start+3 {\n\t\t\t\tstart += 3\n\t\t\t\tbitStream += 3 << bitCount\n\t\t\t\tbitCount += 2\n\t\t\t}\n\t\t\tbitStream += uint32(charnum-start) << bitCount\n\t\t\tbitCount += 2\n\t\t\tif bitCount > 16 {\n\t\t\t\tout[outP] = byte(bitStream)\n\t\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\t\toutP += 2\n\t\t\t\tbitStream >>= 16\n\t\t\t\tbitCount -= 16\n\t\t\t}\n\t\t}\n\n\t\tcount := s.norm[charnum]\n\t\tcharnum++\n\t\tmax := (2*threshold - 1) - remaining\n\t\tif count < 0 {\n\t\t\tremaining += count\n\t\t} else {\n\t\t\tremaining -= count\n\t\t}\n\t\tcount++ // +1 for extra accuracy\n\t\tif count >= threshold {\n\t\t\tcount += max // [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[\n\t\t}\n\t\tbitStream += uint32(count) << bitCount\n\t\tbitCount += nbBits\n\t\tif count < max {\n\t\t\tbitCount--\n\t\t}\n\n\t\tprevious0 = count == 1\n\t\tif remaining < 1 {\n\t\t\treturn nil, errors.New(\"internal error: remaining < 1\")\n\t\t}\n\t\tfor remaining < threshold {\n\t\t\tnbBits--\n\t\t\tthreshold >>= 1\n\t\t}\n\n\t\tif bitCount > 16 {\n\t\t\tout[outP] = byte(bitStream)\n\t\t\tout[outP+1] = byte(bitStream >> 8)\n\t\t\toutP += 2\n\t\t\tbitStream >>= 16\n\t\t\tbitCount -= 16\n\t\t}\n\t}\n\n\tif outP+2 > len(out) {\n\t\treturn nil, fmt.Errorf(\"internal error: %d > %d, maxheader: %d, sl: %d, tl: %d, normcount: %v\", outP+2, len(out), maxHeaderSize, s.symbolLen, int(tableLog), s.norm[:s.symbolLen])\n\t}\n\tout[outP] = byte(bitStream)\n\tout[outP+1] = byte(bitStream >> 8)\n\toutP += int((bitCount + 7) / 8)\n\n\tif charnum > s.symbolLen {\n\t\treturn nil, errors.New(\"internal error: charnum > s.symbolLen\")\n\t}\n\treturn out[:outP], nil\n}\n\n// Approximate symbol cost, as fractional value, using fixed-point format (accuracyLog fractional bits)\n// note 1 : assume symbolValue is valid (<= maxSymbolValue)\n// note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits *\nfunc (s *fseEncoder) bitCost(symbolValue uint8, accuracyLog uint32) uint32 {\n\tminNbBits := s.ct.symbolTT[symbolValue].deltaNbBits >> 16\n\tthreshold := (minNbBits + 1) << 16\n\tif debugAsserts {\n\t\tif !(s.actualTableLog < 16) {\n\t\t\tpanic(\"!s.actualTableLog < 16\")\n\t\t}\n\t\t// ensure enough room for renormalization double shift\n\t\tif !(uint8(accuracyLog) < 31-s.actualTableLog) {\n\t\t\tpanic(\"!uint8(accuracyLog) < 31-s.actualTableLog\")\n\t\t}\n\t}\n\ttableSize := uint32(1) << s.actualTableLog\n\tdeltaFromThreshold := threshold - (s.ct.symbolTT[symbolValue].deltaNbBits + tableSize)\n\t// linear interpolation (very approximate)\n\tnormalizedDeltaFromThreshold := (deltaFromThreshold << accuracyLog) >> s.actualTableLog\n\tbitMultiplier := uint32(1) << accuracyLog\n\tif debugAsserts {\n\t\tif s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold {\n\t\t\tpanic(\"s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold\")\n\t\t}\n\t\tif normalizedDeltaFromThreshold > bitMultiplier {\n\t\t\tpanic(\"normalizedDeltaFromThreshold > bitMultiplier\")\n\t\t}\n\t}\n\treturn (minNbBits+1)*bitMultiplier - normalizedDeltaFromThreshold\n}\n\n// Returns the cost in bits of encoding the distribution in count using ctable.\n// Histogram should only be up to the last non-zero symbol.\n// Returns an -1 if ctable cannot represent all the symbols in count.\nfunc (s *fseEncoder) approxSize(hist []uint32) uint32 {\n\tif int(s.symbolLen) < len(hist) {\n\t\t// More symbols than we have.\n\t\treturn math.MaxUint32\n\t}\n\tif s.useRLE {\n\t\t// We will never reuse RLE encoders.\n\t\treturn math.MaxUint32\n\t}\n\tconst kAccuracyLog = 8\n\tbadCost := (uint32(s.actualTableLog) + 1) << kAccuracyLog\n\tvar cost uint32\n\tfor i, v := range hist {\n\t\tif v == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif s.norm[i] == 0 {\n\t\t\treturn math.MaxUint32\n\t\t}\n\t\tbitCost := s.bitCost(uint8(i), kAccuracyLog)\n\t\tif bitCost > badCost {\n\t\t\treturn math.MaxUint32\n\t\t}\n\t\tcost += v * bitCost\n\t}\n\treturn cost >> kAccuracyLog\n}\n\n// maxHeaderSize returns the maximum header size in bits.\n// This is not exact size, but we want a penalty for new tables anyway.\nfunc (s *fseEncoder) maxHeaderSize() uint32 {\n\tif s.preDefined {\n\t\treturn 0\n\t}\n\tif s.useRLE {\n\t\treturn 8\n\t}\n\treturn (((uint32(s.symbolLen) * uint32(s.actualTableLog)) >> 3) + 3) * 8\n}\n\n// cState contains the compression state of a stream.\ntype cState struct {\n\tbw         *bitWriter\n\tstateTable []uint16\n\tstate      uint16\n}\n\n// init will initialize the compression state to the first symbol of the stream.\nfunc (c *cState) init(bw *bitWriter, ct *cTable, first symbolTransform) {\n\tc.bw = bw\n\tc.stateTable = ct.stateTable\n\tif len(c.stateTable) == 1 {\n\t\t// RLE\n\t\tc.stateTable[0] = uint16(0)\n\t\tc.state = 0\n\t\treturn\n\t}\n\tnbBitsOut := (first.deltaNbBits + (1 << 15)) >> 16\n\tim := int32((nbBitsOut << 16) - first.deltaNbBits)\n\tlu := (im >> nbBitsOut) + int32(first.deltaFindState)\n\tc.state = c.stateTable[lu]\n}\n\n// flush will write the tablelog to the output and flush the remaining full bytes.\nfunc (c *cState) flush(tableLog uint8) {\n\tc.bw.flush32()\n\tc.bw.addBits16NC(c.state, tableLog)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/fse_predefined.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sync\"\n)\n\nvar (\n\t// fsePredef are the predefined fse tables as defined here:\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions\n\t// These values are already transformed.\n\tfsePredef [3]fseDecoder\n\n\t// fsePredefEnc are the predefined encoder based on fse tables as defined here:\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions\n\t// These values are already transformed.\n\tfsePredefEnc [3]fseEncoder\n\n\t// symbolTableX contain the transformations needed for each type as defined in\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets\n\tsymbolTableX [3][]baseOffset\n\n\t// maxTableSymbol is the biggest supported symbol for each table type\n\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets\n\tmaxTableSymbol = [3]uint8{tableLiteralLengths: maxLiteralLengthSymbol, tableOffsets: maxOffsetLengthSymbol, tableMatchLengths: maxMatchLengthSymbol}\n\n\t// bitTables is the bits table for each table.\n\tbitTables = [3][]byte{tableLiteralLengths: llBitsTable[:], tableOffsets: nil, tableMatchLengths: mlBitsTable[:]}\n)\n\ntype tableIndex uint8\n\nconst (\n\t// indexes for fsePredef and symbolTableX\n\ttableLiteralLengths tableIndex = 0\n\ttableOffsets        tableIndex = 1\n\ttableMatchLengths   tableIndex = 2\n\n\tmaxLiteralLengthSymbol = 35\n\tmaxOffsetLengthSymbol  = 30\n\tmaxMatchLengthSymbol   = 52\n)\n\n// baseOffset is used for calculating transformations.\ntype baseOffset struct {\n\tbaseLine uint32\n\taddBits  uint8\n}\n\n// fillBase will precalculate base offsets with the given bit distributions.\nfunc fillBase(dst []baseOffset, base uint32, bits ...uint8) {\n\tif len(bits) != len(dst) {\n\t\tpanic(fmt.Sprintf(\"len(dst) (%d) != len(bits) (%d)\", len(dst), len(bits)))\n\t}\n\tfor i, bit := range bits {\n\t\tif base > math.MaxInt32 {\n\t\t\tpanic(\"invalid decoding table, base overflows int32\")\n\t\t}\n\n\t\tdst[i] = baseOffset{\n\t\t\tbaseLine: base,\n\t\t\taddBits:  bit,\n\t\t}\n\t\tbase += 1 << bit\n\t}\n}\n\nvar predef sync.Once\n\nfunc initPredefined() {\n\tpredef.Do(func() {\n\t\t// Literals length codes\n\t\ttmp := make([]baseOffset, 36)\n\t\tfor i := range tmp[:16] {\n\t\t\ttmp[i] = baseOffset{\n\t\t\t\tbaseLine: uint32(i),\n\t\t\t\taddBits:  0,\n\t\t\t}\n\t\t}\n\t\tfillBase(tmp[16:], 16, 1, 1, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)\n\t\tsymbolTableX[tableLiteralLengths] = tmp\n\n\t\t// Match length codes\n\t\ttmp = make([]baseOffset, 53)\n\t\tfor i := range tmp[:32] {\n\t\t\ttmp[i] = baseOffset{\n\t\t\t\t// The transformation adds the 3 length.\n\t\t\t\tbaseLine: uint32(i) + 3,\n\t\t\t\taddBits:  0,\n\t\t\t}\n\t\t}\n\t\tfillBase(tmp[32:], 35, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)\n\t\tsymbolTableX[tableMatchLengths] = tmp\n\n\t\t// Offset codes\n\t\ttmp = make([]baseOffset, maxOffsetBits+1)\n\t\ttmp[1] = baseOffset{\n\t\t\tbaseLine: 1,\n\t\t\taddBits:  1,\n\t\t}\n\t\tfillBase(tmp[2:], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)\n\t\tsymbolTableX[tableOffsets] = tmp\n\n\t\t// Fill predefined tables and transform them.\n\t\t// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions\n\t\tfor i := range fsePredef[:] {\n\t\t\tf := &fsePredef[i]\n\t\t\tswitch tableIndex(i) {\n\t\t\tcase tableLiteralLengths:\n\t\t\t\t// https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L243\n\t\t\t\tf.actualTableLog = 6\n\t\t\t\tcopy(f.norm[:], []int16{4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,\n\t\t\t\t\t2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1,\n\t\t\t\t\t-1, -1, -1, -1})\n\t\t\t\tf.symbolLen = 36\n\t\t\tcase tableOffsets:\n\t\t\t\t// https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L281\n\t\t\t\tf.actualTableLog = 5\n\t\t\t\tcopy(f.norm[:], []int16{\n\t\t\t\t\t1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,\n\t\t\t\t\t1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1})\n\t\t\t\tf.symbolLen = 29\n\t\t\tcase tableMatchLengths:\n\t\t\t\t//https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L304\n\t\t\t\tf.actualTableLog = 6\n\t\t\t\tcopy(f.norm[:], []int16{\n\t\t\t\t\t1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,\n\t\t\t\t\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t\t\t\t\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1,\n\t\t\t\t\t-1, -1, -1, -1, -1})\n\t\t\t\tf.symbolLen = 53\n\t\t\t}\n\t\t\tif err := f.buildDtable(); err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"building table %v: %v\", tableIndex(i), err))\n\t\t\t}\n\t\t\tif err := f.transform(symbolTableX[i]); err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"building table %v: %v\", tableIndex(i), err))\n\t\t\t}\n\t\t\tf.preDefined = true\n\n\t\t\t// Create encoder as well\n\t\t\tenc := &fsePredefEnc[i]\n\t\t\tcopy(enc.norm[:], f.norm[:])\n\t\t\tenc.symbolLen = f.symbolLen\n\t\t\tenc.actualTableLog = f.actualTableLog\n\t\t\tif err := enc.buildCTable(); err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"building encoding table %v: %v\", tableIndex(i), err))\n\t\t\t}\n\t\t\tenc.setBits(bitTables[i])\n\t\t\tenc.preDefined = true\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/hash.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nconst (\n\tprime3bytes = 506832829\n\tprime4bytes = 2654435761\n\tprime5bytes = 889523592379\n\tprime6bytes = 227718039650203\n\tprime7bytes = 58295818150454627\n\tprime8bytes = 0xcf1bbcdcb7a56463\n)\n\n// hashLen returns a hash of the lowest mls bytes of with length output bits.\n// mls must be >=3 and <=8. Any other value will return hash for 4 bytes.\n// length should always be < 32.\n// Preferably length and mls should be a constant for inlining.\nfunc hashLen(u uint64, length, mls uint8) uint32 {\n\tswitch mls {\n\tcase 3:\n\t\treturn (uint32(u<<8) * prime3bytes) >> (32 - length)\n\tcase 5:\n\t\treturn uint32(((u << (64 - 40)) * prime5bytes) >> (64 - length))\n\tcase 6:\n\t\treturn uint32(((u << (64 - 48)) * prime6bytes) >> (64 - length))\n\tcase 7:\n\t\treturn uint32(((u << (64 - 56)) * prime7bytes) >> (64 - length))\n\tcase 8:\n\t\treturn uint32((u * prime8bytes) >> (64 - length))\n\tdefault:\n\t\treturn (uint32(u) * prime4bytes) >> (32 - length)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/history.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"github.com/klauspost/compress/huff0\"\n)\n\n// history contains the information transferred between blocks.\ntype history struct {\n\t// Literal decompression\n\thuffTree *huff0.Scratch\n\n\t// Sequence decompression\n\tdecoders      sequenceDecs\n\trecentOffsets [3]int\n\n\t// History buffer...\n\tb []byte\n\n\t// ignoreBuffer is meant to ignore a number of bytes\n\t// when checking for matches in history\n\tignoreBuffer int\n\n\twindowSize       int\n\tallocFrameBuffer int // needed?\n\terror            bool\n\tdict             *dict\n}\n\n// reset will reset the history to initial state of a frame.\n// The history must already have been initialized to the desired size.\nfunc (h *history) reset() {\n\th.b = h.b[:0]\n\th.ignoreBuffer = 0\n\th.error = false\n\th.recentOffsets = [3]int{1, 4, 8}\n\th.decoders.freeDecoders()\n\th.decoders = sequenceDecs{br: h.decoders.br}\n\th.freeHuffDecoder()\n\th.huffTree = nil\n\th.dict = nil\n\t//printf(\"history created: %+v (l: %d, c: %d)\", *h, len(h.b), cap(h.b))\n}\n\nfunc (h *history) freeHuffDecoder() {\n\tif h.huffTree != nil {\n\t\tif h.dict == nil || h.dict.litEnc != h.huffTree {\n\t\t\thuffDecoderPool.Put(h.huffTree)\n\t\t\th.huffTree = nil\n\t\t}\n\t}\n}\n\nfunc (h *history) setDict(dict *dict) {\n\tif dict == nil {\n\t\treturn\n\t}\n\th.dict = dict\n\th.decoders.litLengths = dict.llDec\n\th.decoders.offsets = dict.ofDec\n\th.decoders.matchLengths = dict.mlDec\n\th.decoders.dict = dict.content\n\th.recentOffsets = dict.offsets\n\th.huffTree = dict.litEnc\n}\n\n// append bytes to history.\n// This function will make sure there is space for it,\n// if the buffer has been allocated with enough extra space.\nfunc (h *history) append(b []byte) {\n\tif len(b) >= h.windowSize {\n\t\t// Discard all history by simply overwriting\n\t\th.b = h.b[:h.windowSize]\n\t\tcopy(h.b, b[len(b)-h.windowSize:])\n\t\treturn\n\t}\n\n\t// If there is space, append it.\n\tif len(b) < cap(h.b)-len(h.b) {\n\t\th.b = append(h.b, b...)\n\t\treturn\n\t}\n\n\t// Move data down so we only have window size left.\n\t// We know we have less than window size in b at this point.\n\tdiscard := len(b) + len(h.b) - h.windowSize\n\tcopy(h.b, h.b[discard:])\n\th.b = h.b[:h.windowSize]\n\tcopy(h.b[h.windowSize-len(b):], b)\n}\n\n// ensureBlock will ensure there is space for at least one block...\nfunc (h *history) ensureBlock() {\n\tif cap(h.b) < h.allocFrameBuffer {\n\t\th.b = make([]byte, 0, h.allocFrameBuffer)\n\t\treturn\n\t}\n\n\tavail := cap(h.b) - len(h.b)\n\tif avail >= h.windowSize || avail > maxCompressedBlockSize {\n\t\treturn\n\t}\n\t// Move data down so we only have window size left.\n\t// We know we have less than window size in b at this point.\n\tdiscard := len(h.b) - h.windowSize\n\tcopy(h.b, h.b[discard:])\n\th.b = h.b[:h.windowSize]\n}\n\n// append bytes to history without ever discarding anything.\nfunc (h *history) appendKeep(b []byte) {\n\th.b = append(h.b, b...)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt",
    "content": "Copyright (c) 2016 Caleb Spare\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.md",
    "content": "# xxhash\n\nVENDORED: Go to [github.com/cespare/xxhash](https://github.com/cespare/xxhash) for original package.\n\nxxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a\nhigh-quality hashing algorithm that is much faster than anything in the Go\nstandard library.\n\nThis package provides a straightforward API:\n\n```\nfunc Sum64(b []byte) uint64\nfunc Sum64String(s string) uint64\ntype Digest struct{ ... }\n    func New() *Digest\n```\n\nThe `Digest` type implements hash.Hash64. Its key methods are:\n\n```\nfunc (*Digest) Write([]byte) (int, error)\nfunc (*Digest) WriteString(string) (int, error)\nfunc (*Digest) Sum64() uint64\n```\n\nThe package is written with optimized pure Go and also contains even faster\nassembly implementations for amd64 and arm64. If desired, the `purego` build tag\nopts into using the Go code even on those architectures.\n\n[xxHash]: http://cyan4973.github.io/xxHash/\n\n## Compatibility\n\nThis package is in a module and the latest code is in version 2 of the module.\nYou need a version of Go with at least \"minimal module compatibility\" to use\ngithub.com/cespare/xxhash/v2:\n\n* 1.9.7+ for Go 1.9\n* 1.10.3+ for Go 1.10\n* Go 1.11 or later\n\nI recommend using the latest release of Go.\n\n## Benchmarks\n\nHere are some quick benchmarks comparing the pure-Go and assembly\nimplementations of Sum64.\n\n| input size | purego    | asm       |\n| ---------- | --------- | --------- |\n| 4 B        |  1.3 GB/s |  1.2 GB/s |\n| 16 B       |  2.9 GB/s |  3.5 GB/s |\n| 100 B      |  6.9 GB/s |  8.1 GB/s |\n| 4 KB       | 11.7 GB/s | 16.7 GB/s |\n| 10 MB      | 12.0 GB/s | 17.3 GB/s |\n\nThese numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C\nCPU using the following commands under Go 1.19.2:\n\n```\nbenchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$')\nbenchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$')\n```\n\n## Projects using this package\n\n- [InfluxDB](https://github.com/influxdata/influxdb)\n- [Prometheus](https://github.com/prometheus/prometheus)\n- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)\n- [FreeCache](https://github.com/coocood/freecache)\n- [FastCache](https://github.com/VictoriaMetrics/fastcache)\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.go",
    "content": "// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described\n// at http://cyan4973.github.io/xxHash/.\n// THIS IS VENDORED: Go to github.com/cespare/xxhash for original package.\n\npackage xxhash\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"math/bits\"\n)\n\nconst (\n\tprime1 uint64 = 11400714785074694791\n\tprime2 uint64 = 14029467366897019727\n\tprime3 uint64 = 1609587929392839161\n\tprime4 uint64 = 9650029242287828579\n\tprime5 uint64 = 2870177450012600261\n)\n\n// Store the primes in an array as well.\n//\n// The consts are used when possible in Go code to avoid MOVs but we need a\n// contiguous array of the assembly code.\nvar primes = [...]uint64{prime1, prime2, prime3, prime4, prime5}\n\n// Digest implements hash.Hash64.\ntype Digest struct {\n\tv1    uint64\n\tv2    uint64\n\tv3    uint64\n\tv4    uint64\n\ttotal uint64\n\tmem   [32]byte\n\tn     int // how much of mem is used\n}\n\n// New creates a new Digest that computes the 64-bit xxHash algorithm.\nfunc New() *Digest {\n\tvar d Digest\n\td.Reset()\n\treturn &d\n}\n\n// Reset clears the Digest's state so that it can be reused.\nfunc (d *Digest) Reset() {\n\td.v1 = primes[0] + prime2\n\td.v2 = prime2\n\td.v3 = 0\n\td.v4 = -primes[0]\n\td.total = 0\n\td.n = 0\n}\n\n// Size always returns 8 bytes.\nfunc (d *Digest) Size() int { return 8 }\n\n// BlockSize always returns 32 bytes.\nfunc (d *Digest) BlockSize() int { return 32 }\n\n// Write adds more data to d. It always returns len(b), nil.\nfunc (d *Digest) Write(b []byte) (n int, err error) {\n\tn = len(b)\n\td.total += uint64(n)\n\n\tmemleft := d.mem[d.n&(len(d.mem)-1):]\n\n\tif d.n+n < 32 {\n\t\t// This new data doesn't even fill the current block.\n\t\tcopy(memleft, b)\n\t\td.n += n\n\t\treturn\n\t}\n\n\tif d.n > 0 {\n\t\t// Finish off the partial block.\n\t\tc := copy(memleft, b)\n\t\td.v1 = round(d.v1, u64(d.mem[0:8]))\n\t\td.v2 = round(d.v2, u64(d.mem[8:16]))\n\t\td.v3 = round(d.v3, u64(d.mem[16:24]))\n\t\td.v4 = round(d.v4, u64(d.mem[24:32]))\n\t\tb = b[c:]\n\t\td.n = 0\n\t}\n\n\tif len(b) >= 32 {\n\t\t// One or more full blocks left.\n\t\tnw := writeBlocks(d, b)\n\t\tb = b[nw:]\n\t}\n\n\t// Store any remaining partial block.\n\tcopy(d.mem[:], b)\n\td.n = len(b)\n\n\treturn\n}\n\n// Sum appends the current hash to b and returns the resulting slice.\nfunc (d *Digest) Sum(b []byte) []byte {\n\ts := d.Sum64()\n\treturn append(\n\t\tb,\n\t\tbyte(s>>56),\n\t\tbyte(s>>48),\n\t\tbyte(s>>40),\n\t\tbyte(s>>32),\n\t\tbyte(s>>24),\n\t\tbyte(s>>16),\n\t\tbyte(s>>8),\n\t\tbyte(s),\n\t)\n}\n\n// Sum64 returns the current hash.\nfunc (d *Digest) Sum64() uint64 {\n\tvar h uint64\n\n\tif d.total >= 32 {\n\t\tv1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4\n\t\th = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)\n\t\th = mergeRound(h, v1)\n\t\th = mergeRound(h, v2)\n\t\th = mergeRound(h, v3)\n\t\th = mergeRound(h, v4)\n\t} else {\n\t\th = d.v3 + prime5\n\t}\n\n\th += d.total\n\n\tb := d.mem[:d.n&(len(d.mem)-1)]\n\tfor ; len(b) >= 8; b = b[8:] {\n\t\tk1 := round(0, u64(b[:8]))\n\t\th ^= k1\n\t\th = rol27(h)*prime1 + prime4\n\t}\n\tif len(b) >= 4 {\n\t\th ^= uint64(u32(b[:4])) * prime1\n\t\th = rol23(h)*prime2 + prime3\n\t\tb = b[4:]\n\t}\n\tfor ; len(b) > 0; b = b[1:] {\n\t\th ^= uint64(b[0]) * prime5\n\t\th = rol11(h) * prime1\n\t}\n\n\th ^= h >> 33\n\th *= prime2\n\th ^= h >> 29\n\th *= prime3\n\th ^= h >> 32\n\n\treturn h\n}\n\nconst (\n\tmagic         = \"xxh\\x06\"\n\tmarshaledSize = len(magic) + 8*5 + 32\n)\n\n// MarshalBinary implements the encoding.BinaryMarshaler interface.\nfunc (d *Digest) MarshalBinary() ([]byte, error) {\n\tb := make([]byte, 0, marshaledSize)\n\tb = append(b, magic...)\n\tb = appendUint64(b, d.v1)\n\tb = appendUint64(b, d.v2)\n\tb = appendUint64(b, d.v3)\n\tb = appendUint64(b, d.v4)\n\tb = appendUint64(b, d.total)\n\tb = append(b, d.mem[:d.n]...)\n\tb = b[:len(b)+len(d.mem)-d.n]\n\treturn b, nil\n}\n\n// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.\nfunc (d *Digest) UnmarshalBinary(b []byte) error {\n\tif len(b) < len(magic) || string(b[:len(magic)]) != magic {\n\t\treturn errors.New(\"xxhash: invalid hash state identifier\")\n\t}\n\tif len(b) != marshaledSize {\n\t\treturn errors.New(\"xxhash: invalid hash state size\")\n\t}\n\tb = b[len(magic):]\n\tb, d.v1 = consumeUint64(b)\n\tb, d.v2 = consumeUint64(b)\n\tb, d.v3 = consumeUint64(b)\n\tb, d.v4 = consumeUint64(b)\n\tb, d.total = consumeUint64(b)\n\tcopy(d.mem[:], b)\n\td.n = int(d.total % uint64(len(d.mem)))\n\treturn nil\n}\n\nfunc appendUint64(b []byte, x uint64) []byte {\n\tvar a [8]byte\n\tbinary.LittleEndian.PutUint64(a[:], x)\n\treturn append(b, a[:]...)\n}\n\nfunc consumeUint64(b []byte) ([]byte, uint64) {\n\tx := u64(b)\n\treturn b[8:], x\n}\n\nfunc u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }\nfunc u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }\n\nfunc round(acc, input uint64) uint64 {\n\tacc += input * prime2\n\tacc = rol31(acc)\n\tacc *= prime1\n\treturn acc\n}\n\nfunc mergeRound(acc, val uint64) uint64 {\n\tval = round(0, val)\n\tacc ^= val\n\tacc = acc*prime1 + prime4\n\treturn acc\n}\n\nfunc rol1(x uint64) uint64  { return bits.RotateLeft64(x, 1) }\nfunc rol7(x uint64) uint64  { return bits.RotateLeft64(x, 7) }\nfunc rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }\nfunc rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }\nfunc rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }\nfunc rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }\nfunc rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }\nfunc rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.s",
    "content": "//go:build !appengine && gc && !purego && !noasm\n// +build !appengine\n// +build gc\n// +build !purego\n// +build !noasm\n\n#include \"textflag.h\"\n\n// Registers:\n#define h      AX\n#define d      AX\n#define p      SI // pointer to advance through b\n#define n      DX\n#define end    BX // loop end\n#define v1     R8\n#define v2     R9\n#define v3     R10\n#define v4     R11\n#define x      R12\n#define prime1 R13\n#define prime2 R14\n#define prime4 DI\n\n#define round(acc, x) \\\n\tIMULQ prime2, x   \\\n\tADDQ  x, acc      \\\n\tROLQ  $31, acc    \\\n\tIMULQ prime1, acc\n\n// round0 performs the operation x = round(0, x).\n#define round0(x) \\\n\tIMULQ prime2, x \\\n\tROLQ  $31, x    \\\n\tIMULQ prime1, x\n\n// mergeRound applies a merge round on the two registers acc and x.\n// It assumes that prime1, prime2, and prime4 have been loaded.\n#define mergeRound(acc, x) \\\n\tround0(x)         \\\n\tXORQ  x, acc      \\\n\tIMULQ prime1, acc \\\n\tADDQ  prime4, acc\n\n// blockLoop processes as many 32-byte blocks as possible,\n// updating v1, v2, v3, and v4. It assumes that there is at least one block\n// to process.\n#define blockLoop() \\\nloop:  \\\n\tMOVQ +0(p), x  \\\n\tround(v1, x)   \\\n\tMOVQ +8(p), x  \\\n\tround(v2, x)   \\\n\tMOVQ +16(p), x \\\n\tround(v3, x)   \\\n\tMOVQ +24(p), x \\\n\tround(v4, x)   \\\n\tADDQ $32, p    \\\n\tCMPQ p, end    \\\n\tJLE  loop\n\n// func Sum64(b []byte) uint64\nTEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32\n\t// Load fixed primes.\n\tMOVQ ·primes+0(SB), prime1\n\tMOVQ ·primes+8(SB), prime2\n\tMOVQ ·primes+24(SB), prime4\n\n\t// Load slice.\n\tMOVQ b_base+0(FP), p\n\tMOVQ b_len+8(FP), n\n\tLEAQ (p)(n*1), end\n\n\t// The first loop limit will be len(b)-32.\n\tSUBQ $32, end\n\n\t// Check whether we have at least one block.\n\tCMPQ n, $32\n\tJLT  noBlocks\n\n\t// Set up initial state (v1, v2, v3, v4).\n\tMOVQ prime1, v1\n\tADDQ prime2, v1\n\tMOVQ prime2, v2\n\tXORQ v3, v3\n\tXORQ v4, v4\n\tSUBQ prime1, v4\n\n\tblockLoop()\n\n\tMOVQ v1, h\n\tROLQ $1, h\n\tMOVQ v2, x\n\tROLQ $7, x\n\tADDQ x, h\n\tMOVQ v3, x\n\tROLQ $12, x\n\tADDQ x, h\n\tMOVQ v4, x\n\tROLQ $18, x\n\tADDQ x, h\n\n\tmergeRound(h, v1)\n\tmergeRound(h, v2)\n\tmergeRound(h, v3)\n\tmergeRound(h, v4)\n\n\tJMP afterBlocks\n\nnoBlocks:\n\tMOVQ ·primes+32(SB), h\n\nafterBlocks:\n\tADDQ n, h\n\n\tADDQ $24, end\n\tCMPQ p, end\n\tJG   try4\n\nloop8:\n\tMOVQ  (p), x\n\tADDQ  $8, p\n\tround0(x)\n\tXORQ  x, h\n\tROLQ  $27, h\n\tIMULQ prime1, h\n\tADDQ  prime4, h\n\n\tCMPQ p, end\n\tJLE  loop8\n\ntry4:\n\tADDQ $4, end\n\tCMPQ p, end\n\tJG   try1\n\n\tMOVL  (p), x\n\tADDQ  $4, p\n\tIMULQ prime1, x\n\tXORQ  x, h\n\n\tROLQ  $23, h\n\tIMULQ prime2, h\n\tADDQ  ·primes+16(SB), h\n\ntry1:\n\tADDQ $4, end\n\tCMPQ p, end\n\tJGE  finalize\n\nloop1:\n\tMOVBQZX (p), x\n\tADDQ    $1, p\n\tIMULQ   ·primes+32(SB), x\n\tXORQ    x, h\n\tROLQ    $11, h\n\tIMULQ   prime1, h\n\n\tCMPQ p, end\n\tJL   loop1\n\nfinalize:\n\tMOVQ  h, x\n\tSHRQ  $33, x\n\tXORQ  x, h\n\tIMULQ prime2, h\n\tMOVQ  h, x\n\tSHRQ  $29, x\n\tXORQ  x, h\n\tIMULQ ·primes+16(SB), h\n\tMOVQ  h, x\n\tSHRQ  $32, x\n\tXORQ  x, h\n\n\tMOVQ h, ret+24(FP)\n\tRET\n\n// func writeBlocks(d *Digest, b []byte) int\nTEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40\n\t// Load fixed primes needed for round.\n\tMOVQ ·primes+0(SB), prime1\n\tMOVQ ·primes+8(SB), prime2\n\n\t// Load slice.\n\tMOVQ b_base+8(FP), p\n\tMOVQ b_len+16(FP), n\n\tLEAQ (p)(n*1), end\n\tSUBQ $32, end\n\n\t// Load vN from d.\n\tMOVQ s+0(FP), d\n\tMOVQ 0(d), v1\n\tMOVQ 8(d), v2\n\tMOVQ 16(d), v3\n\tMOVQ 24(d), v4\n\n\t// We don't need to check the loop condition here; this function is\n\t// always called with at least one block of data to process.\n\tblockLoop()\n\n\t// Copy vN back to d.\n\tMOVQ v1, 0(d)\n\tMOVQ v2, 8(d)\n\tMOVQ v3, 16(d)\n\tMOVQ v4, 24(d)\n\n\t// The number of bytes written is p minus the old base pointer.\n\tSUBQ b_base+8(FP), p\n\tMOVQ p, ret+32(FP)\n\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s",
    "content": "//go:build !appengine && gc && !purego && !noasm\n// +build !appengine\n// +build gc\n// +build !purego\n// +build !noasm\n\n#include \"textflag.h\"\n\n// Registers:\n#define digest\tR1\n#define h\tR2 // return value\n#define p\tR3 // input pointer\n#define n\tR4 // input length\n#define nblocks\tR5 // n / 32\n#define prime1\tR7\n#define prime2\tR8\n#define prime3\tR9\n#define prime4\tR10\n#define prime5\tR11\n#define v1\tR12\n#define v2\tR13\n#define v3\tR14\n#define v4\tR15\n#define x1\tR20\n#define x2\tR21\n#define x3\tR22\n#define x4\tR23\n\n#define round(acc, x) \\\n\tMADD prime2, acc, x, acc \\\n\tROR  $64-31, acc         \\\n\tMUL  prime1, acc\n\n// round0 performs the operation x = round(0, x).\n#define round0(x) \\\n\tMUL prime2, x \\\n\tROR $64-31, x \\\n\tMUL prime1, x\n\n#define mergeRound(acc, x) \\\n\tround0(x)                     \\\n\tEOR  x, acc                   \\\n\tMADD acc, prime4, prime1, acc\n\n// blockLoop processes as many 32-byte blocks as possible,\n// updating v1, v2, v3, and v4. It assumes that n >= 32.\n#define blockLoop() \\\n\tLSR     $5, n, nblocks  \\\n\tPCALIGN $16             \\\n\tloop:                   \\\n\tLDP.P   16(p), (x1, x2) \\\n\tLDP.P   16(p), (x3, x4) \\\n\tround(v1, x1)           \\\n\tround(v2, x2)           \\\n\tround(v3, x3)           \\\n\tround(v4, x4)           \\\n\tSUB     $1, nblocks     \\\n\tCBNZ    nblocks, loop\n\n// func Sum64(b []byte) uint64\nTEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32\n\tLDP b_base+0(FP), (p, n)\n\n\tLDP  ·primes+0(SB), (prime1, prime2)\n\tLDP  ·primes+16(SB), (prime3, prime4)\n\tMOVD ·primes+32(SB), prime5\n\n\tCMP  $32, n\n\tCSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 }\n\tBLT  afterLoop\n\n\tADD  prime1, prime2, v1\n\tMOVD prime2, v2\n\tMOVD $0, v3\n\tNEG  prime1, v4\n\n\tblockLoop()\n\n\tROR $64-1, v1, x1\n\tROR $64-7, v2, x2\n\tADD x1, x2\n\tROR $64-12, v3, x3\n\tROR $64-18, v4, x4\n\tADD x3, x4\n\tADD x2, x4, h\n\n\tmergeRound(h, v1)\n\tmergeRound(h, v2)\n\tmergeRound(h, v3)\n\tmergeRound(h, v4)\n\nafterLoop:\n\tADD n, h\n\n\tTBZ   $4, n, try8\n\tLDP.P 16(p), (x1, x2)\n\n\tround0(x1)\n\n\t// NOTE: here and below, sequencing the EOR after the ROR (using a\n\t// rotated register) is worth a small but measurable speedup for small\n\t// inputs.\n\tROR  $64-27, h\n\tEOR  x1 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\n\tround0(x2)\n\tROR  $64-27, h\n\tEOR  x2 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\ntry8:\n\tTBZ    $3, n, try4\n\tMOVD.P 8(p), x1\n\n\tround0(x1)\n\tROR  $64-27, h\n\tEOR  x1 @> 64-27, h, h\n\tMADD h, prime4, prime1, h\n\ntry4:\n\tTBZ     $2, n, try2\n\tMOVWU.P 4(p), x2\n\n\tMUL  prime1, x2\n\tROR  $64-23, h\n\tEOR  x2 @> 64-23, h, h\n\tMADD h, prime3, prime2, h\n\ntry2:\n\tTBZ     $1, n, try1\n\tMOVHU.P 2(p), x3\n\tAND     $255, x3, x1\n\tLSR     $8, x3, x2\n\n\tMUL prime5, x1\n\tROR $64-11, h\n\tEOR x1 @> 64-11, h, h\n\tMUL prime1, h\n\n\tMUL prime5, x2\n\tROR $64-11, h\n\tEOR x2 @> 64-11, h, h\n\tMUL prime1, h\n\ntry1:\n\tTBZ   $0, n, finalize\n\tMOVBU (p), x4\n\n\tMUL prime5, x4\n\tROR $64-11, h\n\tEOR x4 @> 64-11, h, h\n\tMUL prime1, h\n\nfinalize:\n\tEOR h >> 33, h\n\tMUL prime2, h\n\tEOR h >> 29, h\n\tMUL prime3, h\n\tEOR h >> 32, h\n\n\tMOVD h, ret+24(FP)\n\tRET\n\n// func writeBlocks(s *Digest, b []byte) int\nTEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40\n\tLDP ·primes+0(SB), (prime1, prime2)\n\n\t// Load state. Assume v[1-4] are stored contiguously.\n\tMOVD s+0(FP), digest\n\tLDP  0(digest), (v1, v2)\n\tLDP  16(digest), (v3, v4)\n\n\tLDP b_base+8(FP), (p, n)\n\n\tblockLoop()\n\n\t// Store updated state.\n\tSTP (v1, v2), 0(digest)\n\tSTP (v3, v4), 16(digest)\n\n\tBIC  $31, n\n\tMOVD n, ret+32(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go",
    "content": "//go:build (amd64 || arm64) && !appengine && gc && !purego && !noasm\n// +build amd64 arm64\n// +build !appengine\n// +build gc\n// +build !purego\n// +build !noasm\n\npackage xxhash\n\n// Sum64 computes the 64-bit xxHash digest of b.\n//\n//go:noescape\nfunc Sum64(b []byte) uint64\n\n//go:noescape\nfunc writeBlocks(s *Digest, b []byte) int\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.go",
    "content": "//go:build (!amd64 && !arm64) || appengine || !gc || purego || noasm\n// +build !amd64,!arm64 appengine !gc purego noasm\n\npackage xxhash\n\n// Sum64 computes the 64-bit xxHash digest of b.\nfunc Sum64(b []byte) uint64 {\n\t// A simpler version would be\n\t//   d := New()\n\t//   d.Write(b)\n\t//   return d.Sum64()\n\t// but this is faster, particularly for small inputs.\n\n\tn := len(b)\n\tvar h uint64\n\n\tif n >= 32 {\n\t\tv1 := primes[0] + prime2\n\t\tv2 := prime2\n\t\tv3 := uint64(0)\n\t\tv4 := -primes[0]\n\t\tfor len(b) >= 32 {\n\t\t\tv1 = round(v1, u64(b[0:8:len(b)]))\n\t\t\tv2 = round(v2, u64(b[8:16:len(b)]))\n\t\t\tv3 = round(v3, u64(b[16:24:len(b)]))\n\t\t\tv4 = round(v4, u64(b[24:32:len(b)]))\n\t\t\tb = b[32:len(b):len(b)]\n\t\t}\n\t\th = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)\n\t\th = mergeRound(h, v1)\n\t\th = mergeRound(h, v2)\n\t\th = mergeRound(h, v3)\n\t\th = mergeRound(h, v4)\n\t} else {\n\t\th = prime5\n\t}\n\n\th += uint64(n)\n\n\tfor ; len(b) >= 8; b = b[8:] {\n\t\tk1 := round(0, u64(b[:8]))\n\t\th ^= k1\n\t\th = rol27(h)*prime1 + prime4\n\t}\n\tif len(b) >= 4 {\n\t\th ^= uint64(u32(b[:4])) * prime1\n\t\th = rol23(h)*prime2 + prime3\n\t\tb = b[4:]\n\t}\n\tfor ; len(b) > 0; b = b[1:] {\n\t\th ^= uint64(b[0]) * prime5\n\t\th = rol11(h) * prime1\n\t}\n\n\th ^= h >> 33\n\th *= prime2\n\th ^= h >> 29\n\th *= prime3\n\th ^= h >> 32\n\n\treturn h\n}\n\nfunc writeBlocks(d *Digest, b []byte) int {\n\tv1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4\n\tn := len(b)\n\tfor len(b) >= 32 {\n\t\tv1 = round(v1, u64(b[0:8:len(b)]))\n\t\tv2 = round(v2, u64(b[8:16:len(b)]))\n\t\tv3 = round(v3, u64(b[16:24:len(b)]))\n\t\tv4 = round(v4, u64(b[24:32:len(b)]))\n\t\tb = b[32:len(b):len(b)]\n\t}\n\td.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4\n\treturn n - len(b)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go",
    "content": "package xxhash\n\n// Sum64String computes the 64-bit xxHash digest of s.\nfunc Sum64String(s string) uint64 {\n\treturn Sum64([]byte(s))\n}\n\n// WriteString adds more data to d. It always returns len(s), nil.\nfunc (d *Digest) WriteString(s string) (n int, err error) {\n\treturn d.Write([]byte(s))\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go",
    "content": "//go:build amd64 && !appengine && !noasm && gc\n// +build amd64,!appengine,!noasm,gc\n\n// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\npackage zstd\n\n// matchLen returns how many bytes match in a and b\n//\n// It assumes that:\n//\n//\tlen(a) <= len(b) and len(a) > 0\n//\n//go:noescape\nfunc matchLen(a []byte, b []byte) int\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s",
    "content": "// Copied from S2 implementation.\n\n//go:build !appengine && !noasm && gc && !noasm\n\n#include \"textflag.h\"\n\n// func matchLen(a []byte, b []byte) int\nTEXT ·matchLen(SB), NOSPLIT, $0-56\n\tMOVQ a_base+0(FP), AX\n\tMOVQ b_base+24(FP), CX\n\tMOVQ a_len+8(FP), DX\n\n\t// matchLen\n\tXORL SI, SI\n\tCMPL DX, $0x08\n\tJB   matchlen_match4_standalone\n\nmatchlen_loopback_standalone:\n\tMOVQ (AX)(SI*1), BX\n\tXORQ (CX)(SI*1), BX\n\tJZ   matchlen_loop_standalone\n\n#ifdef GOAMD64_v3\n\tTZCNTQ BX, BX\n#else\n\tBSFQ BX, BX\n#endif\n\tSHRL $0x03, BX\n\tLEAL (SI)(BX*1), SI\n\tJMP  gen_match_len_end\n\nmatchlen_loop_standalone:\n\tLEAL -8(DX), DX\n\tLEAL 8(SI), SI\n\tCMPL DX, $0x08\n\tJAE  matchlen_loopback_standalone\n\nmatchlen_match4_standalone:\n\tCMPL DX, $0x04\n\tJB   matchlen_match2_standalone\n\tMOVL (AX)(SI*1), BX\n\tCMPL (CX)(SI*1), BX\n\tJNE  matchlen_match2_standalone\n\tLEAL -4(DX), DX\n\tLEAL 4(SI), SI\n\nmatchlen_match2_standalone:\n\tCMPL DX, $0x02\n\tJB   matchlen_match1_standalone\n\tMOVW (AX)(SI*1), BX\n\tCMPW (CX)(SI*1), BX\n\tJNE  matchlen_match1_standalone\n\tLEAL -2(DX), DX\n\tLEAL 2(SI), SI\n\nmatchlen_match1_standalone:\n\tCMPL DX, $0x01\n\tJB   gen_match_len_end\n\tMOVB (AX)(SI*1), BL\n\tCMPB (CX)(SI*1), BL\n\tJNE  gen_match_len_end\n\tINCL SI\n\ngen_match_len_end:\n\tMOVQ SI, ret+48(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/matchlen_generic.go",
    "content": "//go:build !amd64 || appengine || !gc || noasm\n// +build !amd64 appengine !gc noasm\n\n// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\npackage zstd\n\nimport (\n\t\"math/bits\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// matchLen returns the maximum common prefix length of a and b.\n// a must be the shortest of the two.\nfunc matchLen(a, b []byte) (n int) {\n\tleft := len(a)\n\tfor left >= 8 {\n\t\tdiff := le.Load64(a, n) ^ le.Load64(b, n)\n\t\tif diff != 0 {\n\t\t\treturn n + bits.TrailingZeros64(diff)>>3\n\t\t}\n\t\tn += 8\n\t\tleft -= 8\n\t}\n\ta = a[n:]\n\tb = b[n:]\n\n\tfor i := range a {\n\t\tif a[i] != b[i] {\n\t\t\tbreak\n\t\t}\n\t\tn++\n\t}\n\treturn n\n\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/seqdec.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\ntype seq struct {\n\tlitLen   uint32\n\tmatchLen uint32\n\toffset   uint32\n\n\t// Codes are stored here for the encoder\n\t// so they only have to be looked up once.\n\tllCode, mlCode, ofCode uint8\n}\n\ntype seqVals struct {\n\tll, ml, mo int\n}\n\nfunc (s seq) String() string {\n\tif s.offset <= 3 {\n\t\tif s.offset == 0 {\n\t\t\treturn fmt.Sprint(\"litLen:\", s.litLen, \", matchLen:\", s.matchLen+zstdMinMatch, \", offset: INVALID (0)\")\n\t\t}\n\t\treturn fmt.Sprint(\"litLen:\", s.litLen, \", matchLen:\", s.matchLen+zstdMinMatch, \", offset:\", s.offset, \" (repeat)\")\n\t}\n\treturn fmt.Sprint(\"litLen:\", s.litLen, \", matchLen:\", s.matchLen+zstdMinMatch, \", offset:\", s.offset-3, \" (new)\")\n}\n\ntype seqCompMode uint8\n\nconst (\n\tcompModePredefined seqCompMode = iota\n\tcompModeRLE\n\tcompModeFSE\n\tcompModeRepeat\n)\n\ntype sequenceDec struct {\n\t// decoder keeps track of the current state and updates it from the bitstream.\n\tfse    *fseDecoder\n\tstate  fseState\n\trepeat bool\n}\n\n// init the state of the decoder with input from stream.\nfunc (s *sequenceDec) init(br *bitReader) error {\n\tif s.fse == nil {\n\t\treturn errors.New(\"sequence decoder not defined\")\n\t}\n\ts.state.init(br, s.fse.actualTableLog, s.fse.dt[:1<<s.fse.actualTableLog])\n\treturn nil\n}\n\n// sequenceDecs contains all 3 sequence decoders and their state.\ntype sequenceDecs struct {\n\tlitLengths   sequenceDec\n\toffsets      sequenceDec\n\tmatchLengths sequenceDec\n\tprevOffset   [3]int\n\tdict         []byte\n\tliterals     []byte\n\tout          []byte\n\tnSeqs        int\n\tbr           *bitReader\n\tseqSize      int\n\twindowSize   int\n\tmaxBits      uint8\n\tmaxSyncLen   uint64\n}\n\n// initialize all 3 decoders from the stream input.\nfunc (s *sequenceDecs) initialize(br *bitReader, hist *history, out []byte) error {\n\tif err := s.litLengths.init(br); err != nil {\n\t\treturn errors.New(\"litLengths:\" + err.Error())\n\t}\n\tif err := s.offsets.init(br); err != nil {\n\t\treturn errors.New(\"offsets:\" + err.Error())\n\t}\n\tif err := s.matchLengths.init(br); err != nil {\n\t\treturn errors.New(\"matchLengths:\" + err.Error())\n\t}\n\ts.br = br\n\ts.prevOffset = hist.recentOffsets\n\ts.maxBits = s.litLengths.fse.maxBits + s.offsets.fse.maxBits + s.matchLengths.fse.maxBits\n\ts.windowSize = hist.windowSize\n\ts.out = out\n\ts.dict = nil\n\tif hist.dict != nil {\n\t\ts.dict = hist.dict.content\n\t}\n\treturn nil\n}\n\nfunc (s *sequenceDecs) freeDecoders() {\n\tif f := s.litLengths.fse; f != nil && !f.preDefined {\n\t\tfseDecoderPool.Put(f)\n\t\ts.litLengths.fse = nil\n\t}\n\tif f := s.offsets.fse; f != nil && !f.preDefined {\n\t\tfseDecoderPool.Put(f)\n\t\ts.offsets.fse = nil\n\t}\n\tif f := s.matchLengths.fse; f != nil && !f.preDefined {\n\t\tfseDecoderPool.Put(f)\n\t\ts.matchLengths.fse = nil\n\t}\n}\n\n// execute will execute the decoded sequence with the provided history.\n// The sequence must be evaluated before being sent.\nfunc (s *sequenceDecs) execute(seqs []seqVals, hist []byte) error {\n\tif len(s.dict) == 0 {\n\t\treturn s.executeSimple(seqs, hist)\n\t}\n\n\t// Ensure we have enough output size...\n\tif len(s.out)+s.seqSize > cap(s.out) {\n\t\taddBytes := s.seqSize + len(s.out)\n\t\ts.out = append(s.out, make([]byte, addBytes)...)\n\t\ts.out = s.out[:len(s.out)-addBytes]\n\t}\n\n\tif debugDecoder {\n\t\tprintf(\"Execute %d seqs with hist %d, dict %d, literals: %d into %d bytes\\n\", len(seqs), len(hist), len(s.dict), len(s.literals), s.seqSize)\n\t}\n\n\tvar t = len(s.out)\n\tout := s.out[:t+s.seqSize]\n\n\tfor _, seq := range seqs {\n\t\t// Add literals\n\t\tcopy(out[t:], s.literals[:seq.ll])\n\t\tt += seq.ll\n\t\ts.literals = s.literals[seq.ll:]\n\n\t\t// Copy from dictionary...\n\t\tif seq.mo > t+len(hist) || seq.mo > s.windowSize {\n\t\t\tif len(s.dict) == 0 {\n\t\t\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history (%d)\", seq.mo, t+len(hist))\n\t\t\t}\n\n\t\t\t// we may be in dictionary.\n\t\t\tdictO := len(s.dict) - (seq.mo - (t + len(hist)))\n\t\t\tif dictO < 0 || dictO >= len(s.dict) {\n\t\t\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history+dict (%d)\", seq.mo, t+len(hist)+len(s.dict))\n\t\t\t}\n\t\t\tend := dictO + seq.ml\n\t\t\tif end > len(s.dict) {\n\t\t\t\tn := len(s.dict) - dictO\n\t\t\t\tcopy(out[t:], s.dict[dictO:])\n\t\t\t\tt += n\n\t\t\t\tseq.ml -= n\n\t\t\t} else {\n\t\t\t\tcopy(out[t:], s.dict[dictO:end])\n\t\t\t\tt += end - dictO\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// Copy from history.\n\t\tif v := seq.mo - t; v > 0 {\n\t\t\t// v is the start position in history from end.\n\t\t\tstart := len(hist) - v\n\t\t\tif seq.ml > v {\n\t\t\t\t// Some goes into current block.\n\t\t\t\t// Copy remainder of history\n\t\t\t\tcopy(out[t:], hist[start:])\n\t\t\t\tt += v\n\t\t\t\tseq.ml -= v\n\t\t\t} else {\n\t\t\t\tcopy(out[t:], hist[start:start+seq.ml])\n\t\t\t\tt += seq.ml\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\t// We must be in current buffer now\n\t\tif seq.ml > 0 {\n\t\t\tstart := t - seq.mo\n\t\t\tif seq.ml <= t-start {\n\t\t\t\t// No overlap\n\t\t\t\tcopy(out[t:], out[start:start+seq.ml])\n\t\t\t\tt += seq.ml\n\t\t\t\tcontinue\n\t\t\t} else {\n\t\t\t\t// Overlapping copy\n\t\t\t\t// Extend destination slice and copy one byte at the time.\n\t\t\t\tsrc := out[start : start+seq.ml]\n\t\t\t\tdst := out[t:]\n\t\t\t\tdst = dst[:len(src)]\n\t\t\t\tt += len(src)\n\t\t\t\t// Destination is the space we just added.\n\t\t\t\tfor i := range src {\n\t\t\t\t\tdst[i] = src[i]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add final literals\n\tcopy(out[t:], s.literals)\n\tif debugDecoder {\n\t\tt += len(s.literals)\n\t\tif t != len(out) {\n\t\t\tpanic(fmt.Errorf(\"length mismatch, want %d, got %d, ss: %d\", len(out), t, s.seqSize))\n\t\t}\n\t}\n\ts.out = out\n\n\treturn nil\n}\n\n// decode sequences from the stream with the provided history.\nfunc (s *sequenceDecs) decodeSync(hist []byte) error {\n\tsupported, err := s.decodeSyncSimple(hist)\n\tif supported {\n\t\treturn err\n\t}\n\n\tbr := s.br\n\tseqs := s.nSeqs\n\tstartSize := len(s.out)\n\t// Grab full sizes tables, to avoid bounds checks.\n\tllTable, mlTable, ofTable := s.litLengths.fse.dt[:maxTablesize], s.matchLengths.fse.dt[:maxTablesize], s.offsets.fse.dt[:maxTablesize]\n\tllState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state\n\tout := s.out\n\tmaxBlockSize := min(s.windowSize, maxCompressedBlockSize)\n\n\tif debugDecoder {\n\t\tprintln(\"decodeSync: decoding\", seqs, \"sequences\", br.remain(), \"bits remain on stream\")\n\t}\n\tfor i := seqs - 1; i >= 0; i-- {\n\t\tif br.overread() {\n\t\t\tprintf(\"reading sequence %d, exceeded available data. Overread by %d\\n\", seqs-i, -br.remain())\n\t\t\treturn io.ErrUnexpectedEOF\n\t\t}\n\t\tvar ll, mo, ml int\n\t\tif br.cursor > 4+((maxOffsetBits+16+16)>>3) {\n\t\t\t// inlined function:\n\t\t\t// ll, mo, ml = s.nextFast(br, llState, mlState, ofState)\n\n\t\t\t// Final will not read from stream.\n\t\t\tvar llB, mlB, moB uint8\n\t\t\tll, llB = llState.final()\n\t\t\tml, mlB = mlState.final()\n\t\t\tmo, moB = ofState.final()\n\n\t\t\t// extra bits are stored in reverse order.\n\t\t\tbr.fillFast()\n\t\t\tmo += br.getBits(moB)\n\t\t\tif s.maxBits > 32 {\n\t\t\t\tbr.fillFast()\n\t\t\t}\n\t\t\tml += br.getBits(mlB)\n\t\t\tll += br.getBits(llB)\n\n\t\t\tif moB > 1 {\n\t\t\t\ts.prevOffset[2] = s.prevOffset[1]\n\t\t\t\ts.prevOffset[1] = s.prevOffset[0]\n\t\t\t\ts.prevOffset[0] = mo\n\t\t\t} else {\n\t\t\t\t// mo = s.adjustOffset(mo, ll, moB)\n\t\t\t\t// Inlined for rather big speedup\n\t\t\t\tif ll == 0 {\n\t\t\t\t\t// There is an exception though, when current sequence's literals_length = 0.\n\t\t\t\t\t// In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2,\n\t\t\t\t\t// an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte.\n\t\t\t\t\tmo++\n\t\t\t\t}\n\n\t\t\t\tif mo == 0 {\n\t\t\t\t\tmo = s.prevOffset[0]\n\t\t\t\t} else {\n\t\t\t\t\tvar temp int\n\t\t\t\t\tif mo == 3 {\n\t\t\t\t\t\ttemp = s.prevOffset[0] - 1\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp = s.prevOffset[mo]\n\t\t\t\t\t}\n\n\t\t\t\t\tif temp == 0 {\n\t\t\t\t\t\t// 0 is not valid; input is corrupted; force offset to 1\n\t\t\t\t\t\tprintln(\"WARNING: temp was 0\")\n\t\t\t\t\t\ttemp = 1\n\t\t\t\t\t}\n\n\t\t\t\t\tif mo != 1 {\n\t\t\t\t\t\ts.prevOffset[2] = s.prevOffset[1]\n\t\t\t\t\t}\n\t\t\t\t\ts.prevOffset[1] = s.prevOffset[0]\n\t\t\t\t\ts.prevOffset[0] = temp\n\t\t\t\t\tmo = temp\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.fillFast()\n\t\t} else {\n\t\t\tll, mo, ml = s.next(br, llState, mlState, ofState)\n\t\t\tbr.fill()\n\t\t}\n\n\t\tif debugSequences {\n\t\t\tprintln(\"Seq\", seqs-i-1, \"Litlen:\", ll, \"mo:\", mo, \"(abs) ml:\", ml)\n\t\t}\n\n\t\tif ll > len(s.literals) {\n\t\t\treturn fmt.Errorf(\"unexpected literal count, want %d bytes, but only %d is available\", ll, len(s.literals))\n\t\t}\n\t\tsize := ll + ml + len(out)\n\t\tif size-startSize > maxBlockSize {\n\t\t\treturn fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t\t}\n\t\tif size > cap(out) {\n\t\t\t// Not enough size, which can happen under high volume block streaming conditions\n\t\t\t// but could be if destination slice is too small for sync operations.\n\t\t\t// over-allocating here can create a large amount of GC pressure so we try to keep\n\t\t\t// it as contained as possible\n\t\t\tused := len(out) - startSize\n\t\t\taddBytes := 256 + ll + ml + used>>2\n\t\t\t// Clamp to max block size.\n\t\t\tif used+addBytes > maxBlockSize {\n\t\t\t\taddBytes = maxBlockSize - used\n\t\t\t}\n\t\t\tout = append(out, make([]byte, addBytes)...)\n\t\t\tout = out[:len(out)-addBytes]\n\t\t}\n\t\tif ml > maxMatchLen {\n\t\t\treturn fmt.Errorf(\"match len (%d) bigger than max allowed length\", ml)\n\t\t}\n\n\t\t// Add literals\n\t\tout = append(out, s.literals[:ll]...)\n\t\ts.literals = s.literals[ll:]\n\n\t\tif mo == 0 && ml > 0 {\n\t\t\treturn fmt.Errorf(\"zero matchoff and matchlen (%d) > 0\", ml)\n\t\t}\n\n\t\tif mo > len(out)+len(hist) || mo > s.windowSize {\n\t\t\tif len(s.dict) == 0 {\n\t\t\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history (%d)\", mo, len(out)+len(hist)-startSize)\n\t\t\t}\n\n\t\t\t// we may be in dictionary.\n\t\t\tdictO := len(s.dict) - (mo - (len(out) + len(hist)))\n\t\t\tif dictO < 0 || dictO >= len(s.dict) {\n\t\t\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history (%d)\", mo, len(out)+len(hist)-startSize)\n\t\t\t}\n\t\t\tend := dictO + ml\n\t\t\tif end > len(s.dict) {\n\t\t\t\tout = append(out, s.dict[dictO:]...)\n\t\t\t\tml -= len(s.dict) - dictO\n\t\t\t} else {\n\t\t\t\tout = append(out, s.dict[dictO:end]...)\n\t\t\t\tmo = 0\n\t\t\t\tml = 0\n\t\t\t}\n\t\t}\n\n\t\t// Copy from history.\n\t\t// TODO: Blocks without history could be made to ignore this completely.\n\t\tif v := mo - len(out); v > 0 {\n\t\t\t// v is the start position in history from end.\n\t\t\tstart := len(hist) - v\n\t\t\tif ml > v {\n\t\t\t\t// Some goes into current block.\n\t\t\t\t// Copy remainder of history\n\t\t\t\tout = append(out, hist[start:]...)\n\t\t\t\tml -= v\n\t\t\t} else {\n\t\t\t\tout = append(out, hist[start:start+ml]...)\n\t\t\t\tml = 0\n\t\t\t}\n\t\t}\n\t\t// We must be in current buffer now\n\t\tif ml > 0 {\n\t\t\tstart := len(out) - mo\n\t\t\tif ml <= len(out)-start {\n\t\t\t\t// No overlap\n\t\t\t\tout = append(out, out[start:start+ml]...)\n\t\t\t} else {\n\t\t\t\t// Overlapping copy\n\t\t\t\t// Extend destination slice and copy one byte at the time.\n\t\t\t\tout = out[:len(out)+ml]\n\t\t\t\tsrc := out[start : start+ml]\n\t\t\t\t// Destination is the space we just added.\n\t\t\t\tdst := out[len(out)-ml:]\n\t\t\t\tdst = dst[:len(src)]\n\t\t\t\tfor i := range src {\n\t\t\t\t\tdst[i] = src[i]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif i == 0 {\n\t\t\t// This is the last sequence, so we shouldn't update state.\n\t\t\tbreak\n\t\t}\n\n\t\t// Manually inlined, ~ 5-20% faster\n\t\t// Update all 3 states at once. Approx 20% faster.\n\t\tnBits := llState.nbBits() + mlState.nbBits() + ofState.nbBits()\n\t\tif nBits == 0 {\n\t\t\tllState = llTable[llState.newState()&maxTableMask]\n\t\t\tmlState = mlTable[mlState.newState()&maxTableMask]\n\t\t\tofState = ofTable[ofState.newState()&maxTableMask]\n\t\t} else {\n\t\t\tbits := br.get32BitsFast(nBits)\n\n\t\t\tlowBits := uint16(bits >> ((ofState.nbBits() + mlState.nbBits()) & 31))\n\t\t\tllState = llTable[(llState.newState()+lowBits)&maxTableMask]\n\n\t\t\tlowBits = uint16(bits >> (ofState.nbBits() & 31))\n\t\t\tlowBits &= bitMask[mlState.nbBits()&15]\n\t\t\tmlState = mlTable[(mlState.newState()+lowBits)&maxTableMask]\n\n\t\t\tlowBits = uint16(bits) & bitMask[ofState.nbBits()&15]\n\t\t\tofState = ofTable[(ofState.newState()+lowBits)&maxTableMask]\n\t\t}\n\t}\n\n\tif size := len(s.literals) + len(out) - startSize; size > maxBlockSize {\n\t\treturn fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t}\n\n\t// Add final literals\n\ts.out = append(out, s.literals...)\n\treturn br.close()\n}\n\nvar bitMask [16]uint16\n\nfunc init() {\n\tfor i := range bitMask[:] {\n\t\tbitMask[i] = uint16((1 << uint(i)) - 1)\n\t}\n}\n\nfunc (s *sequenceDecs) next(br *bitReader, llState, mlState, ofState decSymbol) (ll, mo, ml int) {\n\t// Final will not read from stream.\n\tll, llB := llState.final()\n\tml, mlB := mlState.final()\n\tmo, moB := ofState.final()\n\n\t// extra bits are stored in reverse order.\n\tbr.fill()\n\tmo += br.getBits(moB)\n\tif s.maxBits > 32 {\n\t\tbr.fill()\n\t}\n\t// matchlength+literal length, max 32 bits\n\tml += br.getBits(mlB)\n\tll += br.getBits(llB)\n\tmo = s.adjustOffset(mo, ll, moB)\n\treturn\n}\n\nfunc (s *sequenceDecs) adjustOffset(offset, litLen int, offsetB uint8) int {\n\tif offsetB > 1 {\n\t\ts.prevOffset[2] = s.prevOffset[1]\n\t\ts.prevOffset[1] = s.prevOffset[0]\n\t\ts.prevOffset[0] = offset\n\t\treturn offset\n\t}\n\n\tif litLen == 0 {\n\t\t// There is an exception though, when current sequence's literals_length = 0.\n\t\t// In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2,\n\t\t// an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte.\n\t\toffset++\n\t}\n\n\tif offset == 0 {\n\t\treturn s.prevOffset[0]\n\t}\n\tvar temp int\n\tif offset == 3 {\n\t\ttemp = s.prevOffset[0] - 1\n\t} else {\n\t\ttemp = s.prevOffset[offset]\n\t}\n\n\tif temp == 0 {\n\t\t// 0 is not valid; input is corrupted; force offset to 1\n\t\tprintln(\"temp was 0\")\n\t\ttemp = 1\n\t}\n\n\tif offset != 1 {\n\t\ts.prevOffset[2] = s.prevOffset[1]\n\t}\n\ts.prevOffset[1] = s.prevOffset[0]\n\ts.prevOffset[0] = temp\n\treturn temp\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go",
    "content": "//go:build amd64 && !appengine && !noasm && gc\n// +build amd64,!appengine,!noasm,gc\n\npackage zstd\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/klauspost/compress/internal/cpuinfo\"\n)\n\ntype decodeSyncAsmContext struct {\n\tllTable     []decSymbol\n\tmlTable     []decSymbol\n\tofTable     []decSymbol\n\tllState     uint64\n\tmlState     uint64\n\tofState     uint64\n\titeration   int\n\tlitRemain   int\n\tout         []byte\n\toutPosition int\n\tliterals    []byte\n\tlitPosition int\n\thistory     []byte\n\twindowSize  int\n\tll          int // set on error (not for all errors, please refer to _generate/gen.go)\n\tml          int // set on error (not for all errors, please refer to _generate/gen.go)\n\tmo          int // set on error (not for all errors, please refer to _generate/gen.go)\n}\n\n// sequenceDecs_decodeSync_amd64 implements the main loop of sequenceDecs.decodeSync in x86 asm.\n//\n// Please refer to seqdec_generic.go for the reference implementation.\n//\n//go:noescape\nfunc sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n\n// sequenceDecs_decodeSync_bmi2 implements the main loop of sequenceDecs.decodeSync in x86 asm with BMI2 extensions.\n//\n//go:noescape\nfunc sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n\n// sequenceDecs_decodeSync_safe_amd64 does the same as above, but does not write more than output buffer.\n//\n//go:noescape\nfunc sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n\n// sequenceDecs_decodeSync_safe_bmi2 does the same as above, but does not write more than output buffer.\n//\n//go:noescape\nfunc sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n\n// decode sequences from the stream with the provided history but without a dictionary.\nfunc (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {\n\tif len(s.dict) > 0 {\n\t\treturn false, nil\n\t}\n\tif s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSize {\n\t\treturn false, nil\n\t}\n\n\t// FIXME: Using unsafe memory copies leads to rare, random crashes\n\t// with fuzz testing. It is therefore disabled for now.\n\tconst useSafe = true\n\t/*\n\t\tuseSafe := false\n\t\tif s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSizeAlloc {\n\t\t\tuseSafe = true\n\t\t}\n\t\tif s.maxSyncLen > 0 && cap(s.out)-len(s.out)-compressedBlockOverAlloc < int(s.maxSyncLen) {\n\t\t\tuseSafe = true\n\t\t}\n\t\tif cap(s.literals) < len(s.literals)+compressedBlockOverAlloc {\n\t\t\tuseSafe = true\n\t\t}\n\t*/\n\n\tbr := s.br\n\n\tmaxBlockSize := min(s.windowSize, maxCompressedBlockSize)\n\n\tctx := decodeSyncAsmContext{\n\t\tllTable:     s.litLengths.fse.dt[:maxTablesize],\n\t\tmlTable:     s.matchLengths.fse.dt[:maxTablesize],\n\t\tofTable:     s.offsets.fse.dt[:maxTablesize],\n\t\tllState:     uint64(s.litLengths.state.state),\n\t\tmlState:     uint64(s.matchLengths.state.state),\n\t\tofState:     uint64(s.offsets.state.state),\n\t\titeration:   s.nSeqs - 1,\n\t\tlitRemain:   len(s.literals),\n\t\tout:         s.out,\n\t\toutPosition: len(s.out),\n\t\tliterals:    s.literals,\n\t\twindowSize:  s.windowSize,\n\t\thistory:     hist,\n\t}\n\n\ts.seqSize = 0\n\tstartSize := len(s.out)\n\n\tvar errCode int\n\tif cpuinfo.HasBMI2() {\n\t\tif useSafe {\n\t\t\terrCode = sequenceDecs_decodeSync_safe_bmi2(s, br, &ctx)\n\t\t} else {\n\t\t\terrCode = sequenceDecs_decodeSync_bmi2(s, br, &ctx)\n\t\t}\n\t} else {\n\t\tif useSafe {\n\t\t\terrCode = sequenceDecs_decodeSync_safe_amd64(s, br, &ctx)\n\t\t} else {\n\t\t\terrCode = sequenceDecs_decodeSync_amd64(s, br, &ctx)\n\t\t}\n\t}\n\tswitch errCode {\n\tcase noError:\n\t\tbreak\n\n\tcase errorMatchLenOfsMismatch:\n\t\treturn true, fmt.Errorf(\"zero matchoff and matchlen (%d) > 0\", ctx.ml)\n\n\tcase errorMatchLenTooBig:\n\t\treturn true, fmt.Errorf(\"match len (%d) bigger than max allowed length\", ctx.ml)\n\n\tcase errorMatchOffTooBig:\n\t\treturn true, fmt.Errorf(\"match offset (%d) bigger than current history (%d)\",\n\t\t\tctx.mo, ctx.outPosition+len(hist)-startSize)\n\n\tcase errorNotEnoughLiterals:\n\t\treturn true, fmt.Errorf(\"unexpected literal count, want %d bytes, but only %d is available\",\n\t\t\tctx.ll, ctx.litRemain+ctx.ll)\n\n\tcase errorOverread:\n\t\treturn true, io.ErrUnexpectedEOF\n\n\tcase errorNotEnoughSpace:\n\t\tsize := ctx.outPosition + ctx.ll + ctx.ml\n\t\tif debugDecoder {\n\t\t\tprintln(\"msl:\", s.maxSyncLen, \"cap\", cap(s.out), \"bef:\", startSize, \"sz:\", size-startSize, \"mbs:\", maxBlockSize, \"outsz:\", cap(s.out)-startSize)\n\t\t}\n\t\treturn true, fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\n\tdefault:\n\t\treturn true, fmt.Errorf(\"sequenceDecs_decode returned erroneous code %d\", errCode)\n\t}\n\n\ts.seqSize += ctx.litRemain\n\tif s.seqSize > maxBlockSize {\n\t\treturn true, fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t}\n\terr := br.close()\n\tif err != nil {\n\t\tprintf(\"Closing sequences: %v, %+v\\n\", err, *br)\n\t\treturn true, err\n\t}\n\n\ts.literals = s.literals[ctx.litPosition:]\n\tt := ctx.outPosition\n\ts.out = s.out[:t]\n\n\t// Add final literals\n\ts.out = append(s.out, s.literals...)\n\tif debugDecoder {\n\t\tt += len(s.literals)\n\t\tif t != len(s.out) {\n\t\t\tpanic(fmt.Errorf(\"length mismatch, want %d, got %d\", len(s.out), t))\n\t\t}\n\t}\n\n\treturn true, nil\n}\n\n// --------------------------------------------------------------------------------\n\ntype decodeAsmContext struct {\n\tllTable   []decSymbol\n\tmlTable   []decSymbol\n\tofTable   []decSymbol\n\tllState   uint64\n\tmlState   uint64\n\tofState   uint64\n\titeration int\n\tseqs      []seqVals\n\tlitRemain int\n}\n\nconst noError = 0\n\n// error reported when mo == 0 && ml > 0\nconst errorMatchLenOfsMismatch = 1\n\n// error reported when ml > maxMatchLen\nconst errorMatchLenTooBig = 2\n\n// error reported when mo > available history or mo > s.windowSize\nconst errorMatchOffTooBig = 3\n\n// error reported when the sum of literal lengths exeeceds the literal buffer size\nconst errorNotEnoughLiterals = 4\n\n// error reported when capacity of `out` is too small\nconst errorNotEnoughSpace = 5\n\n// error reported when bits are overread.\nconst errorOverread = 6\n\n// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm.\n//\n// Please refer to seqdec_generic.go for the reference implementation.\n//\n//go:noescape\nfunc sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n\n// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm.\n//\n// Please refer to seqdec_generic.go for the reference implementation.\n//\n//go:noescape\nfunc sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n\n// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm with BMI2 extensions.\n//\n//go:noescape\nfunc sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n\n// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm with BMI2 extensions.\n//\n//go:noescape\nfunc sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n\n// decode sequences from the stream without the provided history.\nfunc (s *sequenceDecs) decode(seqs []seqVals) error {\n\tbr := s.br\n\n\tmaxBlockSize := min(s.windowSize, maxCompressedBlockSize)\n\n\tctx := decodeAsmContext{\n\t\tllTable:   s.litLengths.fse.dt[:maxTablesize],\n\t\tmlTable:   s.matchLengths.fse.dt[:maxTablesize],\n\t\tofTable:   s.offsets.fse.dt[:maxTablesize],\n\t\tllState:   uint64(s.litLengths.state.state),\n\t\tmlState:   uint64(s.matchLengths.state.state),\n\t\tofState:   uint64(s.offsets.state.state),\n\t\tseqs:      seqs,\n\t\titeration: len(seqs) - 1,\n\t\tlitRemain: len(s.literals),\n\t}\n\n\tif debugDecoder {\n\t\tprintln(\"decode: decoding\", len(seqs), \"sequences\", br.remain(), \"bits remain on stream\")\n\t}\n\n\ts.seqSize = 0\n\tlte56bits := s.maxBits+s.offsets.fse.actualTableLog+s.matchLengths.fse.actualTableLog+s.litLengths.fse.actualTableLog <= 56\n\tvar errCode int\n\tif cpuinfo.HasBMI2() {\n\t\tif lte56bits {\n\t\t\terrCode = sequenceDecs_decode_56_bmi2(s, br, &ctx)\n\t\t} else {\n\t\t\terrCode = sequenceDecs_decode_bmi2(s, br, &ctx)\n\t\t}\n\t} else {\n\t\tif lte56bits {\n\t\t\terrCode = sequenceDecs_decode_56_amd64(s, br, &ctx)\n\t\t} else {\n\t\t\terrCode = sequenceDecs_decode_amd64(s, br, &ctx)\n\t\t}\n\t}\n\tif errCode != 0 {\n\t\ti := len(seqs) - ctx.iteration - 1\n\t\tswitch errCode {\n\t\tcase errorMatchLenOfsMismatch:\n\t\t\tml := ctx.seqs[i].ml\n\t\t\treturn fmt.Errorf(\"zero matchoff and matchlen (%d) > 0\", ml)\n\n\t\tcase errorMatchLenTooBig:\n\t\t\tml := ctx.seqs[i].ml\n\t\t\treturn fmt.Errorf(\"match len (%d) bigger than max allowed length\", ml)\n\n\t\tcase errorNotEnoughLiterals:\n\t\t\tll := ctx.seqs[i].ll\n\t\t\treturn fmt.Errorf(\"unexpected literal count, want %d bytes, but only %d is available\", ll, ctx.litRemain+ll)\n\t\tcase errorOverread:\n\t\t\treturn io.ErrUnexpectedEOF\n\t\t}\n\n\t\treturn fmt.Errorf(\"sequenceDecs_decode_amd64 returned erroneous code %d\", errCode)\n\t}\n\n\tif ctx.litRemain < 0 {\n\t\treturn fmt.Errorf(\"literal count is too big: total available %d, total requested %d\",\n\t\t\tlen(s.literals), len(s.literals)-ctx.litRemain)\n\t}\n\n\ts.seqSize += ctx.litRemain\n\tif s.seqSize > maxBlockSize {\n\t\treturn fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t}\n\tif debugDecoder {\n\t\tprintln(\"decode: \", br.remain(), \"bits remain on stream. code:\", errCode)\n\t}\n\terr := br.close()\n\tif err != nil {\n\t\tprintf(\"Closing sequences: %v, %+v\\n\", err, *br)\n\t}\n\treturn err\n}\n\n// --------------------------------------------------------------------------------\n\ntype executeAsmContext struct {\n\tseqs        []seqVals\n\tseqIndex    int\n\tout         []byte\n\thistory     []byte\n\tliterals    []byte\n\toutPosition int\n\tlitPosition int\n\twindowSize  int\n}\n\n// sequenceDecs_executeSimple_amd64 implements the main loop of sequenceDecs.executeSimple in x86 asm.\n//\n// Returns false if a match offset is too big.\n//\n// Please refer to seqdec_generic.go for the reference implementation.\n//\n//go:noescape\nfunc sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool\n\n// Same as above, but with safe memcopies\n//\n//go:noescape\nfunc sequenceDecs_executeSimple_safe_amd64(ctx *executeAsmContext) bool\n\n// executeSimple handles cases when dictionary is not used.\nfunc (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error {\n\t// Ensure we have enough output size...\n\tif len(s.out)+s.seqSize+compressedBlockOverAlloc > cap(s.out) {\n\t\taddBytes := s.seqSize + len(s.out) + compressedBlockOverAlloc\n\t\ts.out = append(s.out, make([]byte, addBytes)...)\n\t\ts.out = s.out[:len(s.out)-addBytes]\n\t}\n\n\tif debugDecoder {\n\t\tprintf(\"Execute %d seqs with literals: %d into %d bytes\\n\", len(seqs), len(s.literals), s.seqSize)\n\t}\n\n\tvar t = len(s.out)\n\tout := s.out[:t+s.seqSize]\n\n\tctx := executeAsmContext{\n\t\tseqs:        seqs,\n\t\tseqIndex:    0,\n\t\tout:         out,\n\t\thistory:     hist,\n\t\toutPosition: t,\n\t\tlitPosition: 0,\n\t\tliterals:    s.literals,\n\t\twindowSize:  s.windowSize,\n\t}\n\tvar ok bool\n\tif cap(s.literals) < len(s.literals)+compressedBlockOverAlloc {\n\t\tok = sequenceDecs_executeSimple_safe_amd64(&ctx)\n\t} else {\n\t\tok = sequenceDecs_executeSimple_amd64(&ctx)\n\t}\n\tif !ok {\n\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history (%d)\",\n\t\t\tseqs[ctx.seqIndex].mo, ctx.outPosition+len(hist))\n\t}\n\ts.literals = s.literals[ctx.litPosition:]\n\tt = ctx.outPosition\n\n\t// Add final literals\n\tcopy(out[t:], s.literals)\n\tif debugDecoder {\n\t\tt += len(s.literals)\n\t\tif t != len(out) {\n\t\t\tpanic(fmt.Errorf(\"length mismatch, want %d, got %d, ss: %d\", len(out), t, s.seqSize))\n\t\t}\n\t}\n\ts.out = out\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s",
    "content": "// Code generated by command: go run gen.go -out ../seqdec_amd64.s -pkg=zstd. DO NOT EDIT.\n\n//go:build !appengine && !noasm && gc && !noasm\n\n// func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n// Requires: CMOV\nTEXT ·sequenceDecs_decode_amd64(SB), $8-32\n\tMOVQ    br+8(FP), CX\n\tMOVQ    24(CX), DX\n\tMOVBQZX 40(CX), BX\n\tMOVQ    (CX), AX\n\tMOVQ    32(CX), SI\n\tADDQ    SI, AX\n\tMOVQ    AX, (SP)\n\tMOVQ    ctx+16(FP), AX\n\tMOVQ    72(AX), DI\n\tMOVQ    80(AX), R8\n\tMOVQ    88(AX), R9\n\tMOVQ    104(AX), R10\n\tMOVQ    s+0(FP), AX\n\tMOVQ    144(AX), R11\n\tMOVQ    152(AX), R12\n\tMOVQ    160(AX), R13\n\nsequenceDecs_decode_amd64_main_loop:\n\tMOVQ (SP), R14\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decode_amd64_fill_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R14\n\tMOVQ (R14), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decode_amd64_fill_end\n\nsequenceDecs_decode_amd64_fill_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decode_amd64_fill_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decode_amd64_fill_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R14\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R14), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decode_amd64_fill_byte_by_byte\n\nsequenceDecs_decode_amd64_fill_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_amd64_fill_end:\n\t// Update offset\n\tMOVQ  R9, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_amd64_of_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_amd64_of_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_amd64_of_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_amd64_of_update_zero:\n\tMOVQ AX, 16(R10)\n\n\t// Update match length\n\tMOVQ  R8, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_amd64_ml_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_amd64_ml_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_amd64_ml_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_amd64_ml_update_zero:\n\tMOVQ AX, 8(R10)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decode_amd64_fill_2_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R14\n\tMOVQ (R14), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decode_amd64_fill_2_end\n\nsequenceDecs_decode_amd64_fill_2_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decode_amd64_fill_2_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decode_amd64_fill_2_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R14\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R14), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decode_amd64_fill_2_byte_by_byte\n\nsequenceDecs_decode_amd64_fill_2_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_amd64_fill_2_end:\n\t// Update literal length\n\tMOVQ  DI, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_amd64_ll_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_amd64_ll_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_amd64_ll_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_amd64_ll_update_zero:\n\tMOVQ AX, (R10)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R14, (SP)\n\tMOVQ    R9, AX\n\tSHRQ    $0x08, AX\n\tMOVBQZX AL, AX\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decode_amd64_skip_update\n\n\t// Update Literal Length State\n\tMOVBQZX DI, R14\n\tSHRL    $0x10, DI\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, DI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Match Length State\n\tMOVBQZX R8, R14\n\tSHRL    $0x10, R8\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, R8\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Offset State\n\tMOVBQZX R9, R14\n\tSHRL    $0x10, R9\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, R9\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R9*8), R9\n\nsequenceDecs_decode_amd64_skip_update:\n\t// Adjust offset\n\tMOVQ 16(R10), CX\n\tCMPQ AX, $0x01\n\tJBE  sequenceDecs_decode_amd64_adjust_offsetB_1_or_0\n\tMOVQ R12, R13\n\tMOVQ R11, R12\n\tMOVQ CX, R11\n\tJMP  sequenceDecs_decode_amd64_after_adjust\n\nsequenceDecs_decode_amd64_adjust_offsetB_1_or_0:\n\tCMPQ (R10), $0x00000000\n\tJNE  sequenceDecs_decode_amd64_adjust_offset_maybezero\n\tINCQ CX\n\tJMP  sequenceDecs_decode_amd64_adjust_offset_nonzero\n\nsequenceDecs_decode_amd64_adjust_offset_maybezero:\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_amd64_adjust_offset_nonzero\n\tMOVQ  R11, CX\n\tJMP   sequenceDecs_decode_amd64_after_adjust\n\nsequenceDecs_decode_amd64_adjust_offset_nonzero:\n\tCMPQ CX, $0x01\n\tJB   sequenceDecs_decode_amd64_adjust_zero\n\tJEQ  sequenceDecs_decode_amd64_adjust_one\n\tCMPQ CX, $0x02\n\tJA   sequenceDecs_decode_amd64_adjust_three\n\tJMP  sequenceDecs_decode_amd64_adjust_two\n\nsequenceDecs_decode_amd64_adjust_zero:\n\tMOVQ R11, AX\n\tJMP  sequenceDecs_decode_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_amd64_adjust_one:\n\tMOVQ R12, AX\n\tJMP  sequenceDecs_decode_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_amd64_adjust_two:\n\tMOVQ R13, AX\n\tJMP  sequenceDecs_decode_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_amd64_adjust_three:\n\tLEAQ -1(R11), AX\n\nsequenceDecs_decode_amd64_adjust_test_temp_valid:\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decode_amd64_adjust_temp_valid\n\tMOVQ  $0x00000001, AX\n\nsequenceDecs_decode_amd64_adjust_temp_valid:\n\tCMPQ    CX, $0x01\n\tCMOVQNE R12, R13\n\tMOVQ    R11, R12\n\tMOVQ    AX, R11\n\tMOVQ    AX, CX\n\nsequenceDecs_decode_amd64_after_adjust:\n\tMOVQ CX, 16(R10)\n\n\t// Check values\n\tMOVQ  8(R10), AX\n\tMOVQ  (R10), R14\n\tLEAQ  (AX)(R14*1), R15\n\tMOVQ  s+0(FP), BP\n\tADDQ  R15, 256(BP)\n\tMOVQ  ctx+16(FP), R15\n\tSUBQ  R14, 128(R15)\n\tJS    error_not_enough_literals\n\tCMPQ  AX, $0x00020002\n\tJA    sequenceDecs_decode_amd64_error_match_len_too_big\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_amd64_match_len_ofs_ok\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decode_amd64_error_match_len_ofs_mismatch\n\nsequenceDecs_decode_amd64_match_len_ofs_ok:\n\tADDQ $0x18, R10\n\tMOVQ ctx+16(FP), AX\n\tDECQ 96(AX)\n\tJNS  sequenceDecs_decode_amd64_main_loop\n\tMOVQ s+0(FP), AX\n\tMOVQ R11, 144(AX)\n\tMOVQ R12, 152(AX)\n\tMOVQ R13, 160(AX)\n\tMOVQ br+8(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVB BL, 40(AX)\n\tMOVQ SI, 32(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decode_amd64_error_match_len_ofs_mismatch:\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decode_amd64_error_match_len_too_big:\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n// Requires: CMOV\nTEXT ·sequenceDecs_decode_56_amd64(SB), $8-32\n\tMOVQ    br+8(FP), CX\n\tMOVQ    24(CX), DX\n\tMOVBQZX 40(CX), BX\n\tMOVQ    (CX), AX\n\tMOVQ    32(CX), SI\n\tADDQ    SI, AX\n\tMOVQ    AX, (SP)\n\tMOVQ    ctx+16(FP), AX\n\tMOVQ    72(AX), DI\n\tMOVQ    80(AX), R8\n\tMOVQ    88(AX), R9\n\tMOVQ    104(AX), R10\n\tMOVQ    s+0(FP), AX\n\tMOVQ    144(AX), R11\n\tMOVQ    152(AX), R12\n\tMOVQ    160(AX), R13\n\nsequenceDecs_decode_56_amd64_main_loop:\n\tMOVQ (SP), R14\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decode_56_amd64_fill_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R14\n\tMOVQ (R14), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decode_56_amd64_fill_end\n\nsequenceDecs_decode_56_amd64_fill_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decode_56_amd64_fill_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decode_56_amd64_fill_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R14\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R14), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decode_56_amd64_fill_byte_by_byte\n\nsequenceDecs_decode_56_amd64_fill_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_56_amd64_fill_end:\n\t// Update offset\n\tMOVQ  R9, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_56_amd64_of_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_56_amd64_of_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_56_amd64_of_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_56_amd64_of_update_zero:\n\tMOVQ AX, 16(R10)\n\n\t// Update match length\n\tMOVQ  R8, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_56_amd64_ml_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_56_amd64_ml_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_56_amd64_ml_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_56_amd64_ml_update_zero:\n\tMOVQ AX, 8(R10)\n\n\t// Update literal length\n\tMOVQ  DI, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R15\n\tSHLQ  CL, R15\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decode_56_amd64_ll_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decode_56_amd64_ll_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decode_56_amd64_ll_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R15\n\tADDQ  R15, AX\n\nsequenceDecs_decode_56_amd64_ll_update_zero:\n\tMOVQ AX, (R10)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R14, (SP)\n\tMOVQ    R9, AX\n\tSHRQ    $0x08, AX\n\tMOVBQZX AL, AX\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decode_56_amd64_skip_update\n\n\t// Update Literal Length State\n\tMOVBQZX DI, R14\n\tSHRL    $0x10, DI\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, DI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Match Length State\n\tMOVBQZX R8, R14\n\tSHRL    $0x10, R8\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, R8\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Offset State\n\tMOVBQZX R9, R14\n\tSHRL    $0x10, R9\n\tLEAQ    (BX)(R14*1), CX\n\tMOVQ    DX, R15\n\tMOVQ    CX, BX\n\tROLQ    CL, R15\n\tMOVL    $0x00000001, BP\n\tMOVB    R14, CL\n\tSHLL    CL, BP\n\tDECL    BP\n\tANDQ    BP, R15\n\tADDQ    R15, R9\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R9*8), R9\n\nsequenceDecs_decode_56_amd64_skip_update:\n\t// Adjust offset\n\tMOVQ 16(R10), CX\n\tCMPQ AX, $0x01\n\tJBE  sequenceDecs_decode_56_amd64_adjust_offsetB_1_or_0\n\tMOVQ R12, R13\n\tMOVQ R11, R12\n\tMOVQ CX, R11\n\tJMP  sequenceDecs_decode_56_amd64_after_adjust\n\nsequenceDecs_decode_56_amd64_adjust_offsetB_1_or_0:\n\tCMPQ (R10), $0x00000000\n\tJNE  sequenceDecs_decode_56_amd64_adjust_offset_maybezero\n\tINCQ CX\n\tJMP  sequenceDecs_decode_56_amd64_adjust_offset_nonzero\n\nsequenceDecs_decode_56_amd64_adjust_offset_maybezero:\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_56_amd64_adjust_offset_nonzero\n\tMOVQ  R11, CX\n\tJMP   sequenceDecs_decode_56_amd64_after_adjust\n\nsequenceDecs_decode_56_amd64_adjust_offset_nonzero:\n\tCMPQ CX, $0x01\n\tJB   sequenceDecs_decode_56_amd64_adjust_zero\n\tJEQ  sequenceDecs_decode_56_amd64_adjust_one\n\tCMPQ CX, $0x02\n\tJA   sequenceDecs_decode_56_amd64_adjust_three\n\tJMP  sequenceDecs_decode_56_amd64_adjust_two\n\nsequenceDecs_decode_56_amd64_adjust_zero:\n\tMOVQ R11, AX\n\tJMP  sequenceDecs_decode_56_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_56_amd64_adjust_one:\n\tMOVQ R12, AX\n\tJMP  sequenceDecs_decode_56_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_56_amd64_adjust_two:\n\tMOVQ R13, AX\n\tJMP  sequenceDecs_decode_56_amd64_adjust_test_temp_valid\n\nsequenceDecs_decode_56_amd64_adjust_three:\n\tLEAQ -1(R11), AX\n\nsequenceDecs_decode_56_amd64_adjust_test_temp_valid:\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decode_56_amd64_adjust_temp_valid\n\tMOVQ  $0x00000001, AX\n\nsequenceDecs_decode_56_amd64_adjust_temp_valid:\n\tCMPQ    CX, $0x01\n\tCMOVQNE R12, R13\n\tMOVQ    R11, R12\n\tMOVQ    AX, R11\n\tMOVQ    AX, CX\n\nsequenceDecs_decode_56_amd64_after_adjust:\n\tMOVQ CX, 16(R10)\n\n\t// Check values\n\tMOVQ  8(R10), AX\n\tMOVQ  (R10), R14\n\tLEAQ  (AX)(R14*1), R15\n\tMOVQ  s+0(FP), BP\n\tADDQ  R15, 256(BP)\n\tMOVQ  ctx+16(FP), R15\n\tSUBQ  R14, 128(R15)\n\tJS    error_not_enough_literals\n\tCMPQ  AX, $0x00020002\n\tJA    sequenceDecs_decode_56_amd64_error_match_len_too_big\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_56_amd64_match_len_ofs_ok\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decode_56_amd64_error_match_len_ofs_mismatch\n\nsequenceDecs_decode_56_amd64_match_len_ofs_ok:\n\tADDQ $0x18, R10\n\tMOVQ ctx+16(FP), AX\n\tDECQ 96(AX)\n\tJNS  sequenceDecs_decode_56_amd64_main_loop\n\tMOVQ s+0(FP), AX\n\tMOVQ R11, 144(AX)\n\tMOVQ R12, 152(AX)\n\tMOVQ R13, 160(AX)\n\tMOVQ br+8(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVB BL, 40(AX)\n\tMOVQ SI, 32(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decode_56_amd64_error_match_len_ofs_mismatch:\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decode_56_amd64_error_match_len_too_big:\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n// Requires: BMI, BMI2, CMOV\nTEXT ·sequenceDecs_decode_bmi2(SB), $8-32\n\tMOVQ    br+8(FP), BX\n\tMOVQ    24(BX), AX\n\tMOVBQZX 40(BX), DX\n\tMOVQ    (BX), CX\n\tMOVQ    32(BX), BX\n\tADDQ    BX, CX\n\tMOVQ    CX, (SP)\n\tMOVQ    ctx+16(FP), CX\n\tMOVQ    72(CX), SI\n\tMOVQ    80(CX), DI\n\tMOVQ    88(CX), R8\n\tMOVQ    104(CX), R9\n\tMOVQ    s+0(FP), CX\n\tMOVQ    144(CX), R10\n\tMOVQ    152(CX), R11\n\tMOVQ    160(CX), R12\n\nsequenceDecs_decode_bmi2_main_loop:\n\tMOVQ (SP), R13\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decode_bmi2_fill_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R13\n\tMOVQ (R13), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decode_bmi2_fill_end\n\nsequenceDecs_decode_bmi2_fill_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decode_bmi2_fill_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decode_bmi2_fill_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R13), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decode_bmi2_fill_byte_by_byte\n\nsequenceDecs_decode_bmi2_fill_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_bmi2_fill_end:\n\t// Update offset\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, R8, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   R8, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, 16(R9)\n\n\t// Update match length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, DI, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   DI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, 8(R9)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decode_bmi2_fill_2_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R13\n\tMOVQ (R13), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decode_bmi2_fill_2_end\n\nsequenceDecs_decode_bmi2_fill_2_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decode_bmi2_fill_2_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decode_bmi2_fill_2_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R13), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decode_bmi2_fill_2_byte_by_byte\n\nsequenceDecs_decode_bmi2_fill_2_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_bmi2_fill_2_end:\n\t// Update literal length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, SI, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   SI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, (R9)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R13, (SP)\n\tMOVQ    $0x00000808, CX\n\tBEXTRQ  CX, R8, R13\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decode_bmi2_skip_update\n\tLEAQ    (SI)(DI*1), R14\n\tADDQ    R8, R14\n\tMOVBQZX R14, R14\n\tLEAQ    (DX)(R14*1), CX\n\tMOVQ    AX, R15\n\tMOVQ    CX, DX\n\tROLQ    CL, R15\n\tBZHIQ   R14, R15, R15\n\n\t// Update Offset State\n\tBZHIQ R8, R15, CX\n\tSHRXQ R8, R15, R15\n\tSHRL  $0x10, R8\n\tADDQ  CX, R8\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Match Length State\n\tBZHIQ DI, R15, CX\n\tSHRXQ DI, R15, R15\n\tSHRL  $0x10, DI\n\tADDQ  CX, DI\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Literal Length State\n\tBZHIQ SI, R15, CX\n\tSHRL  $0x10, SI\n\tADDQ  CX, SI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(SI*8), SI\n\nsequenceDecs_decode_bmi2_skip_update:\n\t// Adjust offset\n\tMOVQ 16(R9), CX\n\tCMPQ R13, $0x01\n\tJBE  sequenceDecs_decode_bmi2_adjust_offsetB_1_or_0\n\tMOVQ R11, R12\n\tMOVQ R10, R11\n\tMOVQ CX, R10\n\tJMP  sequenceDecs_decode_bmi2_after_adjust\n\nsequenceDecs_decode_bmi2_adjust_offsetB_1_or_0:\n\tCMPQ (R9), $0x00000000\n\tJNE  sequenceDecs_decode_bmi2_adjust_offset_maybezero\n\tINCQ CX\n\tJMP  sequenceDecs_decode_bmi2_adjust_offset_nonzero\n\nsequenceDecs_decode_bmi2_adjust_offset_maybezero:\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_bmi2_adjust_offset_nonzero\n\tMOVQ  R10, CX\n\tJMP   sequenceDecs_decode_bmi2_after_adjust\n\nsequenceDecs_decode_bmi2_adjust_offset_nonzero:\n\tCMPQ CX, $0x01\n\tJB   sequenceDecs_decode_bmi2_adjust_zero\n\tJEQ  sequenceDecs_decode_bmi2_adjust_one\n\tCMPQ CX, $0x02\n\tJA   sequenceDecs_decode_bmi2_adjust_three\n\tJMP  sequenceDecs_decode_bmi2_adjust_two\n\nsequenceDecs_decode_bmi2_adjust_zero:\n\tMOVQ R10, R13\n\tJMP  sequenceDecs_decode_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_bmi2_adjust_one:\n\tMOVQ R11, R13\n\tJMP  sequenceDecs_decode_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_bmi2_adjust_two:\n\tMOVQ R12, R13\n\tJMP  sequenceDecs_decode_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_bmi2_adjust_three:\n\tLEAQ -1(R10), R13\n\nsequenceDecs_decode_bmi2_adjust_test_temp_valid:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decode_bmi2_adjust_temp_valid\n\tMOVQ  $0x00000001, R13\n\nsequenceDecs_decode_bmi2_adjust_temp_valid:\n\tCMPQ    CX, $0x01\n\tCMOVQNE R11, R12\n\tMOVQ    R10, R11\n\tMOVQ    R13, R10\n\tMOVQ    R13, CX\n\nsequenceDecs_decode_bmi2_after_adjust:\n\tMOVQ CX, 16(R9)\n\n\t// Check values\n\tMOVQ  8(R9), R13\n\tMOVQ  (R9), R14\n\tLEAQ  (R13)(R14*1), R15\n\tMOVQ  s+0(FP), BP\n\tADDQ  R15, 256(BP)\n\tMOVQ  ctx+16(FP), R15\n\tSUBQ  R14, 128(R15)\n\tJS    error_not_enough_literals\n\tCMPQ  R13, $0x00020002\n\tJA    sequenceDecs_decode_bmi2_error_match_len_too_big\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_bmi2_match_len_ofs_ok\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decode_bmi2_error_match_len_ofs_mismatch\n\nsequenceDecs_decode_bmi2_match_len_ofs_ok:\n\tADDQ $0x18, R9\n\tMOVQ ctx+16(FP), CX\n\tDECQ 96(CX)\n\tJNS  sequenceDecs_decode_bmi2_main_loop\n\tMOVQ s+0(FP), CX\n\tMOVQ R10, 144(CX)\n\tMOVQ R11, 152(CX)\n\tMOVQ R12, 160(CX)\n\tMOVQ br+8(FP), CX\n\tMOVQ AX, 24(CX)\n\tMOVB DL, 40(CX)\n\tMOVQ BX, 32(CX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decode_bmi2_error_match_len_ofs_mismatch:\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decode_bmi2_error_match_len_too_big:\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int\n// Requires: BMI, BMI2, CMOV\nTEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32\n\tMOVQ    br+8(FP), BX\n\tMOVQ    24(BX), AX\n\tMOVBQZX 40(BX), DX\n\tMOVQ    (BX), CX\n\tMOVQ    32(BX), BX\n\tADDQ    BX, CX\n\tMOVQ    CX, (SP)\n\tMOVQ    ctx+16(FP), CX\n\tMOVQ    72(CX), SI\n\tMOVQ    80(CX), DI\n\tMOVQ    88(CX), R8\n\tMOVQ    104(CX), R9\n\tMOVQ    s+0(FP), CX\n\tMOVQ    144(CX), R10\n\tMOVQ    152(CX), R11\n\tMOVQ    160(CX), R12\n\nsequenceDecs_decode_56_bmi2_main_loop:\n\tMOVQ (SP), R13\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decode_56_bmi2_fill_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R13\n\tMOVQ (R13), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decode_56_bmi2_fill_end\n\nsequenceDecs_decode_56_bmi2_fill_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decode_56_bmi2_fill_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decode_56_bmi2_fill_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R13), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decode_56_bmi2_fill_byte_by_byte\n\nsequenceDecs_decode_56_bmi2_fill_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decode_56_bmi2_fill_end:\n\t// Update offset\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, R8, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   R8, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, 16(R9)\n\n\t// Update match length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, DI, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   DI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, 8(R9)\n\n\t// Update literal length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, SI, R14\n\tMOVQ   AX, R15\n\tLEAQ   (DX)(R14*1), CX\n\tROLQ   CL, R15\n\tBZHIQ  R14, R15, R15\n\tMOVQ   CX, DX\n\tMOVQ   SI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R15, CX\n\tMOVQ   CX, (R9)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R13, (SP)\n\tMOVQ    $0x00000808, CX\n\tBEXTRQ  CX, R8, R13\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decode_56_bmi2_skip_update\n\tLEAQ    (SI)(DI*1), R14\n\tADDQ    R8, R14\n\tMOVBQZX R14, R14\n\tLEAQ    (DX)(R14*1), CX\n\tMOVQ    AX, R15\n\tMOVQ    CX, DX\n\tROLQ    CL, R15\n\tBZHIQ   R14, R15, R15\n\n\t// Update Offset State\n\tBZHIQ R8, R15, CX\n\tSHRXQ R8, R15, R15\n\tSHRL  $0x10, R8\n\tADDQ  CX, R8\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Match Length State\n\tBZHIQ DI, R15, CX\n\tSHRXQ DI, R15, R15\n\tSHRL  $0x10, DI\n\tADDQ  CX, DI\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Literal Length State\n\tBZHIQ SI, R15, CX\n\tSHRL  $0x10, SI\n\tADDQ  CX, SI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(SI*8), SI\n\nsequenceDecs_decode_56_bmi2_skip_update:\n\t// Adjust offset\n\tMOVQ 16(R9), CX\n\tCMPQ R13, $0x01\n\tJBE  sequenceDecs_decode_56_bmi2_adjust_offsetB_1_or_0\n\tMOVQ R11, R12\n\tMOVQ R10, R11\n\tMOVQ CX, R10\n\tJMP  sequenceDecs_decode_56_bmi2_after_adjust\n\nsequenceDecs_decode_56_bmi2_adjust_offsetB_1_or_0:\n\tCMPQ (R9), $0x00000000\n\tJNE  sequenceDecs_decode_56_bmi2_adjust_offset_maybezero\n\tINCQ CX\n\tJMP  sequenceDecs_decode_56_bmi2_adjust_offset_nonzero\n\nsequenceDecs_decode_56_bmi2_adjust_offset_maybezero:\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_56_bmi2_adjust_offset_nonzero\n\tMOVQ  R10, CX\n\tJMP   sequenceDecs_decode_56_bmi2_after_adjust\n\nsequenceDecs_decode_56_bmi2_adjust_offset_nonzero:\n\tCMPQ CX, $0x01\n\tJB   sequenceDecs_decode_56_bmi2_adjust_zero\n\tJEQ  sequenceDecs_decode_56_bmi2_adjust_one\n\tCMPQ CX, $0x02\n\tJA   sequenceDecs_decode_56_bmi2_adjust_three\n\tJMP  sequenceDecs_decode_56_bmi2_adjust_two\n\nsequenceDecs_decode_56_bmi2_adjust_zero:\n\tMOVQ R10, R13\n\tJMP  sequenceDecs_decode_56_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_56_bmi2_adjust_one:\n\tMOVQ R11, R13\n\tJMP  sequenceDecs_decode_56_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_56_bmi2_adjust_two:\n\tMOVQ R12, R13\n\tJMP  sequenceDecs_decode_56_bmi2_adjust_test_temp_valid\n\nsequenceDecs_decode_56_bmi2_adjust_three:\n\tLEAQ -1(R10), R13\n\nsequenceDecs_decode_56_bmi2_adjust_test_temp_valid:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decode_56_bmi2_adjust_temp_valid\n\tMOVQ  $0x00000001, R13\n\nsequenceDecs_decode_56_bmi2_adjust_temp_valid:\n\tCMPQ    CX, $0x01\n\tCMOVQNE R11, R12\n\tMOVQ    R10, R11\n\tMOVQ    R13, R10\n\tMOVQ    R13, CX\n\nsequenceDecs_decode_56_bmi2_after_adjust:\n\tMOVQ CX, 16(R9)\n\n\t// Check values\n\tMOVQ  8(R9), R13\n\tMOVQ  (R9), R14\n\tLEAQ  (R13)(R14*1), R15\n\tMOVQ  s+0(FP), BP\n\tADDQ  R15, 256(BP)\n\tMOVQ  ctx+16(FP), R15\n\tSUBQ  R14, 128(R15)\n\tJS    error_not_enough_literals\n\tCMPQ  R13, $0x00020002\n\tJA    sequenceDecs_decode_56_bmi2_error_match_len_too_big\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decode_56_bmi2_match_len_ofs_ok\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decode_56_bmi2_error_match_len_ofs_mismatch\n\nsequenceDecs_decode_56_bmi2_match_len_ofs_ok:\n\tADDQ $0x18, R9\n\tMOVQ ctx+16(FP), CX\n\tDECQ 96(CX)\n\tJNS  sequenceDecs_decode_56_bmi2_main_loop\n\tMOVQ s+0(FP), CX\n\tMOVQ R10, 144(CX)\n\tMOVQ R11, 152(CX)\n\tMOVQ R12, 160(CX)\n\tMOVQ br+8(FP), CX\n\tMOVQ AX, 24(CX)\n\tMOVB DL, 40(CX)\n\tMOVQ BX, 32(CX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decode_56_bmi2_error_match_len_ofs_mismatch:\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decode_56_bmi2_error_match_len_too_big:\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool\n// Requires: SSE\nTEXT ·sequenceDecs_executeSimple_amd64(SB), $8-9\n\tMOVQ  ctx+0(FP), R10\n\tMOVQ  8(R10), CX\n\tTESTQ CX, CX\n\tJZ    empty_seqs\n\tMOVQ  (R10), AX\n\tMOVQ  24(R10), DX\n\tMOVQ  32(R10), BX\n\tMOVQ  80(R10), SI\n\tMOVQ  104(R10), DI\n\tMOVQ  120(R10), R8\n\tMOVQ  56(R10), R9\n\tMOVQ  64(R10), R10\n\tADDQ  R10, R9\n\n\t// seqsBase += 24 * seqIndex\n\tLEAQ (DX)(DX*2), R11\n\tSHLQ $0x03, R11\n\tADDQ R11, AX\n\n\t// outBase += outPosition\n\tADDQ DI, BX\n\nmain_loop:\n\tMOVQ (AX), R11\n\tMOVQ 16(AX), R12\n\tMOVQ 8(AX), R13\n\n\t// Copy literals\n\tTESTQ R11, R11\n\tJZ    check_offset\n\tXORQ  R14, R14\n\ncopy_1:\n\tMOVUPS (SI)(R14*1), X0\n\tMOVUPS X0, (BX)(R14*1)\n\tADDQ   $0x10, R14\n\tCMPQ   R14, R11\n\tJB     copy_1\n\tADDQ   R11, SI\n\tADDQ   R11, BX\n\tADDQ   R11, DI\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tLEAQ (DI)(R10*1), R11\n\tCMPQ R12, R11\n\tJG   error_match_off_too_big\n\tCMPQ R12, R8\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ R12, R11\n\tSUBQ DI, R11\n\tJLS  copy_match\n\tMOVQ R9, R14\n\tSUBQ R11, R14\n\tCMPQ R13, R11\n\tJG   copy_all_from_history\n\tMOVQ R13, R11\n\tSUBQ $0x10, R11\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R11\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(R11*1), R14\n\tLEAQ   16(BX)(R11*1), BX\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), R11\n\tMOVB 2(R14), R12\n\tMOVW R11, (BX)\n\tMOVB R12, 2(BX)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), R11\n\tMOVL -4(R14)(R13*1), R12\n\tMOVL R11, (BX)\n\tMOVL R12, -4(BX)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), R11\n\tMOVQ -8(R14)(R13*1), R12\n\tMOVQ R11, (BX)\n\tMOVQ R12, -8(BX)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\ncopy_4_end:\n\tADDQ R13, DI\n\tADDQ $0x18, AX\n\tINCQ DX\n\tCMPQ DX, CX\n\tJB   main_loop\n\tJMP  loop_finished\n\ncopy_all_from_history:\n\tMOVQ R11, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(BX)(R15*1), BX\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ R11, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ R11, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(R11*1), BP\n\tMOVB R15, (BX)\n\tMOVB BP, -1(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (BX)\n\tMOVB BP, 2(BX)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(R11*1), BP\n\tMOVL R15, (BX)\n\tMOVL BP, -4(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(R11*1), BP\n\tMOVQ R15, (BX)\n\tMOVQ BP, -8(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\ncopy_5_end:\n\tADDQ R11, DI\n\tSUBQ R11, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ BX, R11\n\tSUBQ R12, R11\n\n\t// ml <= mo\n\tCMPQ R13, R12\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, DI\n\tMOVQ BX, R12\n\tADDQ R13, BX\n\ncopy_2:\n\tMOVUPS (R11), X0\n\tMOVUPS X0, (R12)\n\tADDQ   $0x10, R11\n\tADDQ   $0x10, R12\n\tSUBQ   $0x10, R13\n\tJHI    copy_2\n\tJMP    handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, DI\n\ncopy_slow_3:\n\tMOVB (R11), R12\n\tMOVB R12, (BX)\n\tINCQ R11\n\tINCQ BX\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tADDQ $0x18, AX\n\tINCQ DX\n\tCMPQ DX, CX\n\tJB   main_loop\n\nloop_finished:\n\t// Return value\n\tMOVB $0x01, ret+8(FP)\n\n\t// Update the context\n\tMOVQ ctx+0(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVQ DI, 104(AX)\n\tSUBQ 80(AX), SI\n\tMOVQ SI, 112(AX)\n\tRET\n\nerror_match_off_too_big:\n\t// Return value\n\tMOVB $0x00, ret+8(FP)\n\n\t// Update the context\n\tMOVQ ctx+0(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVQ DI, 104(AX)\n\tSUBQ 80(AX), SI\n\tMOVQ SI, 112(AX)\n\tRET\n\nempty_seqs:\n\t// Return value\n\tMOVB $0x01, ret+8(FP)\n\tRET\n\n// func sequenceDecs_executeSimple_safe_amd64(ctx *executeAsmContext) bool\n// Requires: SSE\nTEXT ·sequenceDecs_executeSimple_safe_amd64(SB), $8-9\n\tMOVQ  ctx+0(FP), R10\n\tMOVQ  8(R10), CX\n\tTESTQ CX, CX\n\tJZ    empty_seqs\n\tMOVQ  (R10), AX\n\tMOVQ  24(R10), DX\n\tMOVQ  32(R10), BX\n\tMOVQ  80(R10), SI\n\tMOVQ  104(R10), DI\n\tMOVQ  120(R10), R8\n\tMOVQ  56(R10), R9\n\tMOVQ  64(R10), R10\n\tADDQ  R10, R9\n\n\t// seqsBase += 24 * seqIndex\n\tLEAQ (DX)(DX*2), R11\n\tSHLQ $0x03, R11\n\tADDQ R11, AX\n\n\t// outBase += outPosition\n\tADDQ DI, BX\n\nmain_loop:\n\tMOVQ (AX), R11\n\tMOVQ 16(AX), R12\n\tMOVQ 8(AX), R13\n\n\t// Copy literals\n\tTESTQ R11, R11\n\tJZ    check_offset\n\tMOVQ  R11, R14\n\tSUBQ  $0x10, R14\n\tJB    copy_1_small\n\ncopy_1_loop:\n\tMOVUPS (SI), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, SI\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R14\n\tJAE    copy_1_loop\n\tLEAQ   16(SI)(R14*1), SI\n\tLEAQ   16(BX)(R14*1), BX\n\tMOVUPS -16(SI), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_1_end\n\ncopy_1_small:\n\tCMPQ R11, $0x03\n\tJE   copy_1_move_3\n\tJB   copy_1_move_1or2\n\tCMPQ R11, $0x08\n\tJB   copy_1_move_4through7\n\tJMP  copy_1_move_8through16\n\ncopy_1_move_1or2:\n\tMOVB (SI), R14\n\tMOVB -1(SI)(R11*1), R15\n\tMOVB R14, (BX)\n\tMOVB R15, -1(BX)(R11*1)\n\tADDQ R11, SI\n\tADDQ R11, BX\n\tJMP  copy_1_end\n\ncopy_1_move_3:\n\tMOVW (SI), R14\n\tMOVB 2(SI), R15\n\tMOVW R14, (BX)\n\tMOVB R15, 2(BX)\n\tADDQ R11, SI\n\tADDQ R11, BX\n\tJMP  copy_1_end\n\ncopy_1_move_4through7:\n\tMOVL (SI), R14\n\tMOVL -4(SI)(R11*1), R15\n\tMOVL R14, (BX)\n\tMOVL R15, -4(BX)(R11*1)\n\tADDQ R11, SI\n\tADDQ R11, BX\n\tJMP  copy_1_end\n\ncopy_1_move_8through16:\n\tMOVQ (SI), R14\n\tMOVQ -8(SI)(R11*1), R15\n\tMOVQ R14, (BX)\n\tMOVQ R15, -8(BX)(R11*1)\n\tADDQ R11, SI\n\tADDQ R11, BX\n\ncopy_1_end:\n\tADDQ R11, DI\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tLEAQ (DI)(R10*1), R11\n\tCMPQ R12, R11\n\tJG   error_match_off_too_big\n\tCMPQ R12, R8\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ R12, R11\n\tSUBQ DI, R11\n\tJLS  copy_match\n\tMOVQ R9, R14\n\tSUBQ R11, R14\n\tCMPQ R13, R11\n\tJG   copy_all_from_history\n\tMOVQ R13, R11\n\tSUBQ $0x10, R11\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R11\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(R11*1), R14\n\tLEAQ   16(BX)(R11*1), BX\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), R11\n\tMOVB 2(R14), R12\n\tMOVW R11, (BX)\n\tMOVB R12, 2(BX)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), R11\n\tMOVL -4(R14)(R13*1), R12\n\tMOVL R11, (BX)\n\tMOVL R12, -4(BX)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), R11\n\tMOVQ -8(R14)(R13*1), R12\n\tMOVQ R11, (BX)\n\tMOVQ R12, -8(BX)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, BX\n\ncopy_4_end:\n\tADDQ R13, DI\n\tADDQ $0x18, AX\n\tINCQ DX\n\tCMPQ DX, CX\n\tJB   main_loop\n\tJMP  loop_finished\n\ncopy_all_from_history:\n\tMOVQ R11, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(BX)(R15*1), BX\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ R11, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ R11, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(R11*1), BP\n\tMOVB R15, (BX)\n\tMOVB BP, -1(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (BX)\n\tMOVB BP, 2(BX)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(R11*1), BP\n\tMOVL R15, (BX)\n\tMOVL BP, -4(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(R11*1), BP\n\tMOVQ R15, (BX)\n\tMOVQ BP, -8(BX)(R11*1)\n\tADDQ R11, R14\n\tADDQ R11, BX\n\ncopy_5_end:\n\tADDQ R11, DI\n\tSUBQ R11, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ BX, R11\n\tSUBQ R12, R11\n\n\t// ml <= mo\n\tCMPQ R13, R12\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, DI\n\tMOVQ R13, R12\n\tSUBQ $0x10, R12\n\tJB   copy_2_small\n\ncopy_2_loop:\n\tMOVUPS (R11), X0\n\tMOVUPS X0, (BX)\n\tADDQ   $0x10, R11\n\tADDQ   $0x10, BX\n\tSUBQ   $0x10, R12\n\tJAE    copy_2_loop\n\tLEAQ   16(R11)(R12*1), R11\n\tLEAQ   16(BX)(R12*1), BX\n\tMOVUPS -16(R11), X0\n\tMOVUPS X0, -16(BX)\n\tJMP    copy_2_end\n\ncopy_2_small:\n\tCMPQ R13, $0x03\n\tJE   copy_2_move_3\n\tJB   copy_2_move_1or2\n\tCMPQ R13, $0x08\n\tJB   copy_2_move_4through7\n\tJMP  copy_2_move_8through16\n\ncopy_2_move_1or2:\n\tMOVB (R11), R12\n\tMOVB -1(R11)(R13*1), R14\n\tMOVB R12, (BX)\n\tMOVB R14, -1(BX)(R13*1)\n\tADDQ R13, R11\n\tADDQ R13, BX\n\tJMP  copy_2_end\n\ncopy_2_move_3:\n\tMOVW (R11), R12\n\tMOVB 2(R11), R14\n\tMOVW R12, (BX)\n\tMOVB R14, 2(BX)\n\tADDQ R13, R11\n\tADDQ R13, BX\n\tJMP  copy_2_end\n\ncopy_2_move_4through7:\n\tMOVL (R11), R12\n\tMOVL -4(R11)(R13*1), R14\n\tMOVL R12, (BX)\n\tMOVL R14, -4(BX)(R13*1)\n\tADDQ R13, R11\n\tADDQ R13, BX\n\tJMP  copy_2_end\n\ncopy_2_move_8through16:\n\tMOVQ (R11), R12\n\tMOVQ -8(R11)(R13*1), R14\n\tMOVQ R12, (BX)\n\tMOVQ R14, -8(BX)(R13*1)\n\tADDQ R13, R11\n\tADDQ R13, BX\n\ncopy_2_end:\n\tJMP handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, DI\n\ncopy_slow_3:\n\tMOVB (R11), R12\n\tMOVB R12, (BX)\n\tINCQ R11\n\tINCQ BX\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tADDQ $0x18, AX\n\tINCQ DX\n\tCMPQ DX, CX\n\tJB   main_loop\n\nloop_finished:\n\t// Return value\n\tMOVB $0x01, ret+8(FP)\n\n\t// Update the context\n\tMOVQ ctx+0(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVQ DI, 104(AX)\n\tSUBQ 80(AX), SI\n\tMOVQ SI, 112(AX)\n\tRET\n\nerror_match_off_too_big:\n\t// Return value\n\tMOVB $0x00, ret+8(FP)\n\n\t// Update the context\n\tMOVQ ctx+0(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVQ DI, 104(AX)\n\tSUBQ 80(AX), SI\n\tMOVQ SI, 112(AX)\n\tRET\n\nempty_seqs:\n\t// Return value\n\tMOVB $0x01, ret+8(FP)\n\tRET\n\n// func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n// Requires: CMOV, SSE\nTEXT ·sequenceDecs_decodeSync_amd64(SB), $64-32\n\tMOVQ    br+8(FP), CX\n\tMOVQ    24(CX), DX\n\tMOVBQZX 40(CX), BX\n\tMOVQ    (CX), AX\n\tMOVQ    32(CX), SI\n\tADDQ    SI, AX\n\tMOVQ    AX, (SP)\n\tMOVQ    ctx+16(FP), AX\n\tMOVQ    72(AX), DI\n\tMOVQ    80(AX), R8\n\tMOVQ    88(AX), R9\n\tXORQ    CX, CX\n\tMOVQ    CX, 8(SP)\n\tMOVQ    CX, 16(SP)\n\tMOVQ    CX, 24(SP)\n\tMOVQ    112(AX), R10\n\tMOVQ    128(AX), CX\n\tMOVQ    CX, 32(SP)\n\tMOVQ    144(AX), R11\n\tMOVQ    136(AX), R12\n\tMOVQ    200(AX), CX\n\tMOVQ    CX, 56(SP)\n\tMOVQ    176(AX), CX\n\tMOVQ    CX, 48(SP)\n\tMOVQ    184(AX), AX\n\tMOVQ    AX, 40(SP)\n\tMOVQ    40(SP), AX\n\tADDQ    AX, 48(SP)\n\n\t// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)\n\tADDQ R10, 32(SP)\n\n\t// outBase += outPosition\n\tADDQ R12, R10\n\nsequenceDecs_decodeSync_amd64_main_loop:\n\tMOVQ (SP), R13\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decodeSync_amd64_fill_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R13\n\tMOVQ (R13), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decodeSync_amd64_fill_end\n\nsequenceDecs_decodeSync_amd64_fill_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decodeSync_amd64_fill_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decodeSync_amd64_fill_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R13), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decodeSync_amd64_fill_byte_by_byte\n\nsequenceDecs_decodeSync_amd64_fill_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_amd64_fill_end:\n\t// Update offset\n\tMOVQ  R9, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_amd64_of_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_amd64_of_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_amd64_of_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_amd64_of_update_zero:\n\tMOVQ AX, 8(SP)\n\n\t// Update match length\n\tMOVQ  R8, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_amd64_ml_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_amd64_ml_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_amd64_ml_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_amd64_ml_update_zero:\n\tMOVQ AX, 16(SP)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R13\n\tMOVQ (R13), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decodeSync_amd64_fill_2_end\n\nsequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decodeSync_amd64_fill_2_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decodeSync_amd64_fill_2_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R13), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte\n\nsequenceDecs_decodeSync_amd64_fill_2_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_amd64_fill_2_end:\n\t// Update literal length\n\tMOVQ  DI, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_amd64_ll_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_amd64_ll_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_amd64_ll_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_amd64_ll_update_zero:\n\tMOVQ AX, 24(SP)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R13, (SP)\n\tMOVQ    R9, AX\n\tSHRQ    $0x08, AX\n\tMOVBQZX AL, AX\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decodeSync_amd64_skip_update\n\n\t// Update Literal Length State\n\tMOVBQZX DI, R13\n\tSHRL    $0x10, DI\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, DI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Match Length State\n\tMOVBQZX R8, R13\n\tSHRL    $0x10, R8\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, R8\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Offset State\n\tMOVBQZX R9, R13\n\tSHRL    $0x10, R9\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, R9\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R9*8), R9\n\nsequenceDecs_decodeSync_amd64_skip_update:\n\t// Adjust offset\n\tMOVQ   s+0(FP), CX\n\tMOVQ   8(SP), R13\n\tCMPQ   AX, $0x01\n\tJBE    sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0\n\tMOVUPS 144(CX), X0\n\tMOVQ   R13, 144(CX)\n\tMOVUPS X0, 152(CX)\n\tJMP    sequenceDecs_decodeSync_amd64_after_adjust\n\nsequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0:\n\tCMPQ 24(SP), $0x00000000\n\tJNE  sequenceDecs_decodeSync_amd64_adjust_offset_maybezero\n\tINCQ R13\n\tJMP  sequenceDecs_decodeSync_amd64_adjust_offset_nonzero\n\nsequenceDecs_decodeSync_amd64_adjust_offset_maybezero:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_amd64_adjust_offset_nonzero\n\tMOVQ  144(CX), R13\n\tJMP   sequenceDecs_decodeSync_amd64_after_adjust\n\nsequenceDecs_decodeSync_amd64_adjust_offset_nonzero:\n\tMOVQ    R13, AX\n\tXORQ    R14, R14\n\tMOVQ    $-1, R15\n\tCMPQ    R13, $0x03\n\tCMOVQEQ R14, AX\n\tCMOVQEQ R15, R14\n\tADDQ    144(CX)(AX*8), R14\n\tJNZ     sequenceDecs_decodeSync_amd64_adjust_temp_valid\n\tMOVQ    $0x00000001, R14\n\nsequenceDecs_decodeSync_amd64_adjust_temp_valid:\n\tCMPQ R13, $0x01\n\tJZ   sequenceDecs_decodeSync_amd64_adjust_skip\n\tMOVQ 152(CX), AX\n\tMOVQ AX, 160(CX)\n\nsequenceDecs_decodeSync_amd64_adjust_skip:\n\tMOVQ 144(CX), AX\n\tMOVQ AX, 152(CX)\n\tMOVQ R14, 144(CX)\n\tMOVQ R14, R13\n\nsequenceDecs_decodeSync_amd64_after_adjust:\n\tMOVQ R13, 8(SP)\n\n\t// Check values\n\tMOVQ  16(SP), AX\n\tMOVQ  24(SP), CX\n\tLEAQ  (AX)(CX*1), R14\n\tMOVQ  s+0(FP), R15\n\tADDQ  R14, 256(R15)\n\tMOVQ  ctx+16(FP), R14\n\tSUBQ  CX, 104(R14)\n\tJS    error_not_enough_literals\n\tCMPQ  AX, $0x00020002\n\tJA    sequenceDecs_decodeSync_amd64_error_match_len_too_big\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_amd64_match_len_ofs_ok\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch\n\nsequenceDecs_decodeSync_amd64_match_len_ofs_ok:\n\tMOVQ 24(SP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ 16(SP), R13\n\n\t// Check if we have enough space in s.out\n\tLEAQ (AX)(R13*1), R14\n\tADDQ R10, R14\n\tCMPQ R14, 32(SP)\n\tJA   error_not_enough_space\n\n\t// Copy literals\n\tTESTQ AX, AX\n\tJZ    check_offset\n\tXORQ  R14, R14\n\ncopy_1:\n\tMOVUPS (R11)(R14*1), X0\n\tMOVUPS X0, (R10)(R14*1)\n\tADDQ   $0x10, R14\n\tCMPQ   R14, AX\n\tJB     copy_1\n\tADDQ   AX, R11\n\tADDQ   AX, R10\n\tADDQ   AX, R12\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tMOVQ R12, AX\n\tADDQ 40(SP), AX\n\tCMPQ CX, AX\n\tJG   error_match_off_too_big\n\tCMPQ CX, 56(SP)\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ CX, AX\n\tSUBQ R12, AX\n\tJLS  copy_match\n\tMOVQ 48(SP), R14\n\tSUBQ AX, R14\n\tCMPQ R13, AX\n\tJG   copy_all_from_history\n\tMOVQ R13, AX\n\tSUBQ $0x10, AX\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, AX\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(AX*1), R14\n\tLEAQ   16(R10)(AX*1), R10\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), AX\n\tMOVB 2(R14), CL\n\tMOVW AX, (R10)\n\tMOVB CL, 2(R10)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), AX\n\tMOVL -4(R14)(R13*1), CX\n\tMOVL AX, (R10)\n\tMOVL CX, -4(R10)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), AX\n\tMOVQ -8(R14)(R13*1), CX\n\tMOVQ AX, (R10)\n\tMOVQ CX, -8(R10)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\ncopy_4_end:\n\tADDQ R13, R12\n\tJMP  handle_loop\n\tJMP loop_finished\n\ncopy_all_from_history:\n\tMOVQ AX, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(R10)(R15*1), R10\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ AX, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ AX, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(AX*1), BP\n\tMOVB R15, (R10)\n\tMOVB BP, -1(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (R10)\n\tMOVB BP, 2(R10)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(AX*1), BP\n\tMOVL R15, (R10)\n\tMOVL BP, -4(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(AX*1), BP\n\tMOVQ R15, (R10)\n\tMOVQ BP, -8(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\ncopy_5_end:\n\tADDQ AX, R12\n\tSUBQ AX, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ R10, AX\n\tSUBQ CX, AX\n\n\t// ml <= mo\n\tCMPQ R13, CX\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, R12\n\tMOVQ R10, CX\n\tADDQ R13, R10\n\ncopy_2:\n\tMOVUPS (AX), X0\n\tMOVUPS X0, (CX)\n\tADDQ   $0x10, AX\n\tADDQ   $0x10, CX\n\tSUBQ   $0x10, R13\n\tJHI    copy_2\n\tJMP    handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, R12\n\ncopy_slow_3:\n\tMOVB (AX), CL\n\tMOVB CL, (R10)\n\tINCQ AX\n\tINCQ R10\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tMOVQ ctx+16(FP), AX\n\tDECQ 96(AX)\n\tJNS  sequenceDecs_decodeSync_amd64_main_loop\n\nloop_finished:\n\tMOVQ br+8(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVB BL, 40(AX)\n\tMOVQ SI, 32(AX)\n\n\t// Update the context\n\tMOVQ ctx+16(FP), AX\n\tMOVQ R12, 136(AX)\n\tMOVQ 144(AX), CX\n\tSUBQ CX, R11\n\tMOVQ R11, 168(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch:\n\tMOVQ 16(SP), AX\n\tMOVQ ctx+16(FP), CX\n\tMOVQ AX, 216(CX)\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decodeSync_amd64_error_match_len_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\nerror_match_off_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ CX, 224(AX)\n\tMOVQ R12, 136(AX)\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n\t// Return with not enough output space error\nerror_not_enough_space:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ R12, 136(AX)\n\tMOVQ $0x00000005, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n// Requires: BMI, BMI2, CMOV, SSE\nTEXT ·sequenceDecs_decodeSync_bmi2(SB), $64-32\n\tMOVQ    br+8(FP), BX\n\tMOVQ    24(BX), AX\n\tMOVBQZX 40(BX), DX\n\tMOVQ    (BX), CX\n\tMOVQ    32(BX), BX\n\tADDQ    BX, CX\n\tMOVQ    CX, (SP)\n\tMOVQ    ctx+16(FP), CX\n\tMOVQ    72(CX), SI\n\tMOVQ    80(CX), DI\n\tMOVQ    88(CX), R8\n\tXORQ    R9, R9\n\tMOVQ    R9, 8(SP)\n\tMOVQ    R9, 16(SP)\n\tMOVQ    R9, 24(SP)\n\tMOVQ    112(CX), R9\n\tMOVQ    128(CX), R10\n\tMOVQ    R10, 32(SP)\n\tMOVQ    144(CX), R10\n\tMOVQ    136(CX), R11\n\tMOVQ    200(CX), R12\n\tMOVQ    R12, 56(SP)\n\tMOVQ    176(CX), R12\n\tMOVQ    R12, 48(SP)\n\tMOVQ    184(CX), CX\n\tMOVQ    CX, 40(SP)\n\tMOVQ    40(SP), CX\n\tADDQ    CX, 48(SP)\n\n\t// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)\n\tADDQ R9, 32(SP)\n\n\t// outBase += outPosition\n\tADDQ R11, R9\n\nsequenceDecs_decodeSync_bmi2_main_loop:\n\tMOVQ (SP), R12\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decodeSync_bmi2_fill_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R12\n\tMOVQ (R12), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decodeSync_bmi2_fill_end\n\nsequenceDecs_decodeSync_bmi2_fill_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decodeSync_bmi2_fill_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decodeSync_bmi2_fill_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R12\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R12), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decodeSync_bmi2_fill_byte_by_byte\n\nsequenceDecs_decodeSync_bmi2_fill_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_bmi2_fill_end:\n\t// Update offset\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, R8, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   R8, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 8(SP)\n\n\t// Update match length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, DI, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   DI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 16(SP)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R12\n\tMOVQ (R12), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decodeSync_bmi2_fill_2_end\n\nsequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decodeSync_bmi2_fill_2_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decodeSync_bmi2_fill_2_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R12\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R12), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte\n\nsequenceDecs_decodeSync_bmi2_fill_2_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_bmi2_fill_2_end:\n\t// Update literal length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, SI, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   SI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 24(SP)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R12, (SP)\n\tMOVQ    $0x00000808, CX\n\tBEXTRQ  CX, R8, R12\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decodeSync_bmi2_skip_update\n\tLEAQ    (SI)(DI*1), R13\n\tADDQ    R8, R13\n\tMOVBQZX R13, R13\n\tLEAQ    (DX)(R13*1), CX\n\tMOVQ    AX, R14\n\tMOVQ    CX, DX\n\tROLQ    CL, R14\n\tBZHIQ   R13, R14, R14\n\n\t// Update Offset State\n\tBZHIQ R8, R14, CX\n\tSHRXQ R8, R14, R14\n\tSHRL  $0x10, R8\n\tADDQ  CX, R8\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Match Length State\n\tBZHIQ DI, R14, CX\n\tSHRXQ DI, R14, R14\n\tSHRL  $0x10, DI\n\tADDQ  CX, DI\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Literal Length State\n\tBZHIQ SI, R14, CX\n\tSHRL  $0x10, SI\n\tADDQ  CX, SI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(SI*8), SI\n\nsequenceDecs_decodeSync_bmi2_skip_update:\n\t// Adjust offset\n\tMOVQ   s+0(FP), CX\n\tMOVQ   8(SP), R13\n\tCMPQ   R12, $0x01\n\tJBE    sequenceDecs_decodeSync_bmi2_adjust_offsetB_1_or_0\n\tMOVUPS 144(CX), X0\n\tMOVQ   R13, 144(CX)\n\tMOVUPS X0, 152(CX)\n\tJMP    sequenceDecs_decodeSync_bmi2_after_adjust\n\nsequenceDecs_decodeSync_bmi2_adjust_offsetB_1_or_0:\n\tCMPQ 24(SP), $0x00000000\n\tJNE  sequenceDecs_decodeSync_bmi2_adjust_offset_maybezero\n\tINCQ R13\n\tJMP  sequenceDecs_decodeSync_bmi2_adjust_offset_nonzero\n\nsequenceDecs_decodeSync_bmi2_adjust_offset_maybezero:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_bmi2_adjust_offset_nonzero\n\tMOVQ  144(CX), R13\n\tJMP   sequenceDecs_decodeSync_bmi2_after_adjust\n\nsequenceDecs_decodeSync_bmi2_adjust_offset_nonzero:\n\tMOVQ    R13, R12\n\tXORQ    R14, R14\n\tMOVQ    $-1, R15\n\tCMPQ    R13, $0x03\n\tCMOVQEQ R14, R12\n\tCMOVQEQ R15, R14\n\tADDQ    144(CX)(R12*8), R14\n\tJNZ     sequenceDecs_decodeSync_bmi2_adjust_temp_valid\n\tMOVQ    $0x00000001, R14\n\nsequenceDecs_decodeSync_bmi2_adjust_temp_valid:\n\tCMPQ R13, $0x01\n\tJZ   sequenceDecs_decodeSync_bmi2_adjust_skip\n\tMOVQ 152(CX), R12\n\tMOVQ R12, 160(CX)\n\nsequenceDecs_decodeSync_bmi2_adjust_skip:\n\tMOVQ 144(CX), R12\n\tMOVQ R12, 152(CX)\n\tMOVQ R14, 144(CX)\n\tMOVQ R14, R13\n\nsequenceDecs_decodeSync_bmi2_after_adjust:\n\tMOVQ R13, 8(SP)\n\n\t// Check values\n\tMOVQ  16(SP), CX\n\tMOVQ  24(SP), R12\n\tLEAQ  (CX)(R12*1), R14\n\tMOVQ  s+0(FP), R15\n\tADDQ  R14, 256(R15)\n\tMOVQ  ctx+16(FP), R14\n\tSUBQ  R12, 104(R14)\n\tJS    error_not_enough_literals\n\tCMPQ  CX, $0x00020002\n\tJA    sequenceDecs_decodeSync_bmi2_error_match_len_too_big\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_bmi2_match_len_ofs_ok\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decodeSync_bmi2_error_match_len_ofs_mismatch\n\nsequenceDecs_decodeSync_bmi2_match_len_ofs_ok:\n\tMOVQ 24(SP), CX\n\tMOVQ 8(SP), R12\n\tMOVQ 16(SP), R13\n\n\t// Check if we have enough space in s.out\n\tLEAQ (CX)(R13*1), R14\n\tADDQ R9, R14\n\tCMPQ R14, 32(SP)\n\tJA   error_not_enough_space\n\n\t// Copy literals\n\tTESTQ CX, CX\n\tJZ    check_offset\n\tXORQ  R14, R14\n\ncopy_1:\n\tMOVUPS (R10)(R14*1), X0\n\tMOVUPS X0, (R9)(R14*1)\n\tADDQ   $0x10, R14\n\tCMPQ   R14, CX\n\tJB     copy_1\n\tADDQ   CX, R10\n\tADDQ   CX, R9\n\tADDQ   CX, R11\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tMOVQ R11, CX\n\tADDQ 40(SP), CX\n\tCMPQ R12, CX\n\tJG   error_match_off_too_big\n\tCMPQ R12, 56(SP)\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ R12, CX\n\tSUBQ R11, CX\n\tJLS  copy_match\n\tMOVQ 48(SP), R14\n\tSUBQ CX, R14\n\tCMPQ R13, CX\n\tJG   copy_all_from_history\n\tMOVQ R13, CX\n\tSUBQ $0x10, CX\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, CX\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(CX*1), R14\n\tLEAQ   16(R9)(CX*1), R9\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), CX\n\tMOVB 2(R14), R12\n\tMOVW CX, (R9)\n\tMOVB R12, 2(R9)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), CX\n\tMOVL -4(R14)(R13*1), R12\n\tMOVL CX, (R9)\n\tMOVL R12, -4(R9)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), CX\n\tMOVQ -8(R14)(R13*1), R12\n\tMOVQ CX, (R9)\n\tMOVQ R12, -8(R9)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\ncopy_4_end:\n\tADDQ R13, R11\n\tJMP  handle_loop\n\tJMP loop_finished\n\ncopy_all_from_history:\n\tMOVQ CX, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(R9)(R15*1), R9\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ CX, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ CX, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(CX*1), BP\n\tMOVB R15, (R9)\n\tMOVB BP, -1(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (R9)\n\tMOVB BP, 2(R9)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(CX*1), BP\n\tMOVL R15, (R9)\n\tMOVL BP, -4(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(CX*1), BP\n\tMOVQ R15, (R9)\n\tMOVQ BP, -8(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\ncopy_5_end:\n\tADDQ CX, R11\n\tSUBQ CX, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ R9, CX\n\tSUBQ R12, CX\n\n\t// ml <= mo\n\tCMPQ R13, R12\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, R11\n\tMOVQ R9, R12\n\tADDQ R13, R9\n\ncopy_2:\n\tMOVUPS (CX), X0\n\tMOVUPS X0, (R12)\n\tADDQ   $0x10, CX\n\tADDQ   $0x10, R12\n\tSUBQ   $0x10, R13\n\tJHI    copy_2\n\tJMP    handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, R11\n\ncopy_slow_3:\n\tMOVB (CX), R12\n\tMOVB R12, (R9)\n\tINCQ CX\n\tINCQ R9\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tMOVQ ctx+16(FP), CX\n\tDECQ 96(CX)\n\tJNS  sequenceDecs_decodeSync_bmi2_main_loop\n\nloop_finished:\n\tMOVQ br+8(FP), CX\n\tMOVQ AX, 24(CX)\n\tMOVB DL, 40(CX)\n\tMOVQ BX, 32(CX)\n\n\t// Update the context\n\tMOVQ ctx+16(FP), AX\n\tMOVQ R11, 136(AX)\n\tMOVQ 144(AX), CX\n\tSUBQ CX, R10\n\tMOVQ R10, 168(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decodeSync_bmi2_error_match_len_ofs_mismatch:\n\tMOVQ 16(SP), AX\n\tMOVQ ctx+16(FP), CX\n\tMOVQ AX, 216(CX)\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decodeSync_bmi2_error_match_len_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\nerror_match_off_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ CX, 224(AX)\n\tMOVQ R11, 136(AX)\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n\t// Return with not enough output space error\nerror_not_enough_space:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ R11, 136(AX)\n\tMOVQ $0x00000005, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n// Requires: CMOV, SSE\nTEXT ·sequenceDecs_decodeSync_safe_amd64(SB), $64-32\n\tMOVQ    br+8(FP), CX\n\tMOVQ    24(CX), DX\n\tMOVBQZX 40(CX), BX\n\tMOVQ    (CX), AX\n\tMOVQ    32(CX), SI\n\tADDQ    SI, AX\n\tMOVQ    AX, (SP)\n\tMOVQ    ctx+16(FP), AX\n\tMOVQ    72(AX), DI\n\tMOVQ    80(AX), R8\n\tMOVQ    88(AX), R9\n\tXORQ    CX, CX\n\tMOVQ    CX, 8(SP)\n\tMOVQ    CX, 16(SP)\n\tMOVQ    CX, 24(SP)\n\tMOVQ    112(AX), R10\n\tMOVQ    128(AX), CX\n\tMOVQ    CX, 32(SP)\n\tMOVQ    144(AX), R11\n\tMOVQ    136(AX), R12\n\tMOVQ    200(AX), CX\n\tMOVQ    CX, 56(SP)\n\tMOVQ    176(AX), CX\n\tMOVQ    CX, 48(SP)\n\tMOVQ    184(AX), AX\n\tMOVQ    AX, 40(SP)\n\tMOVQ    40(SP), AX\n\tADDQ    AX, 48(SP)\n\n\t// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)\n\tADDQ R10, 32(SP)\n\n\t// outBase += outPosition\n\tADDQ R12, R10\n\nsequenceDecs_decodeSync_safe_amd64_main_loop:\n\tMOVQ (SP), R13\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R13\n\tMOVQ (R13), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decodeSync_safe_amd64_fill_end\n\nsequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decodeSync_safe_amd64_fill_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decodeSync_safe_amd64_fill_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R13), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte\n\nsequenceDecs_decodeSync_safe_amd64_fill_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_safe_amd64_fill_end:\n\t// Update offset\n\tMOVQ  R9, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_safe_amd64_of_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_safe_amd64_of_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_safe_amd64_of_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_safe_amd64_of_update_zero:\n\tMOVQ AX, 8(SP)\n\n\t// Update match length\n\tMOVQ  R8, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_safe_amd64_ml_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_safe_amd64_ml_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_safe_amd64_ml_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_safe_amd64_ml_update_zero:\n\tMOVQ AX, 16(SP)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ SI, $0x08\n\tJL   sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte\n\tMOVQ BX, AX\n\tSHRQ $0x03, AX\n\tSUBQ AX, R13\n\tMOVQ (R13), DX\n\tSUBQ AX, SI\n\tANDQ $0x07, BX\n\tJMP  sequenceDecs_decodeSync_safe_amd64_fill_2_end\n\nsequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:\n\tCMPQ    SI, $0x00\n\tJLE     sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread\n\tCMPQ    BX, $0x07\n\tJLE     sequenceDecs_decodeSync_safe_amd64_fill_2_end\n\tSHLQ    $0x08, DX\n\tSUBQ    $0x01, R13\n\tSUBQ    $0x01, SI\n\tSUBQ    $0x08, BX\n\tMOVBQZX (R13), AX\n\tORQ     AX, DX\n\tJMP     sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte\n\nsequenceDecs_decodeSync_safe_amd64_fill_2_check_overread:\n\tCMPQ BX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_safe_amd64_fill_2_end:\n\t// Update literal length\n\tMOVQ  DI, AX\n\tMOVQ  BX, CX\n\tMOVQ  DX, R14\n\tSHLQ  CL, R14\n\tMOVB  AH, CL\n\tSHRQ  $0x20, AX\n\tTESTQ CX, CX\n\tJZ    sequenceDecs_decodeSync_safe_amd64_ll_update_zero\n\tADDQ  CX, BX\n\tCMPQ  BX, $0x40\n\tJA    sequenceDecs_decodeSync_safe_amd64_ll_update_zero\n\tCMPQ  CX, $0x40\n\tJAE   sequenceDecs_decodeSync_safe_amd64_ll_update_zero\n\tNEGQ  CX\n\tSHRQ  CL, R14\n\tADDQ  R14, AX\n\nsequenceDecs_decodeSync_safe_amd64_ll_update_zero:\n\tMOVQ AX, 24(SP)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R13, (SP)\n\tMOVQ    R9, AX\n\tSHRQ    $0x08, AX\n\tMOVBQZX AL, AX\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decodeSync_safe_amd64_skip_update\n\n\t// Update Literal Length State\n\tMOVBQZX DI, R13\n\tSHRL    $0x10, DI\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, DI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Match Length State\n\tMOVBQZX R8, R13\n\tSHRL    $0x10, R8\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, R8\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Offset State\n\tMOVBQZX R9, R13\n\tSHRL    $0x10, R9\n\tLEAQ    (BX)(R13*1), CX\n\tMOVQ    DX, R14\n\tMOVQ    CX, BX\n\tROLQ    CL, R14\n\tMOVL    $0x00000001, R15\n\tMOVB    R13, CL\n\tSHLL    CL, R15\n\tDECL    R15\n\tANDQ    R15, R14\n\tADDQ    R14, R9\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R9*8), R9\n\nsequenceDecs_decodeSync_safe_amd64_skip_update:\n\t// Adjust offset\n\tMOVQ   s+0(FP), CX\n\tMOVQ   8(SP), R13\n\tCMPQ   AX, $0x01\n\tJBE    sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0\n\tMOVUPS 144(CX), X0\n\tMOVQ   R13, 144(CX)\n\tMOVUPS X0, 152(CX)\n\tJMP    sequenceDecs_decodeSync_safe_amd64_after_adjust\n\nsequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0:\n\tCMPQ 24(SP), $0x00000000\n\tJNE  sequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero\n\tINCQ R13\n\tJMP  sequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero\n\nsequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero\n\tMOVQ  144(CX), R13\n\tJMP   sequenceDecs_decodeSync_safe_amd64_after_adjust\n\nsequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero:\n\tMOVQ    R13, AX\n\tXORQ    R14, R14\n\tMOVQ    $-1, R15\n\tCMPQ    R13, $0x03\n\tCMOVQEQ R14, AX\n\tCMOVQEQ R15, R14\n\tADDQ    144(CX)(AX*8), R14\n\tJNZ     sequenceDecs_decodeSync_safe_amd64_adjust_temp_valid\n\tMOVQ    $0x00000001, R14\n\nsequenceDecs_decodeSync_safe_amd64_adjust_temp_valid:\n\tCMPQ R13, $0x01\n\tJZ   sequenceDecs_decodeSync_safe_amd64_adjust_skip\n\tMOVQ 152(CX), AX\n\tMOVQ AX, 160(CX)\n\nsequenceDecs_decodeSync_safe_amd64_adjust_skip:\n\tMOVQ 144(CX), AX\n\tMOVQ AX, 152(CX)\n\tMOVQ R14, 144(CX)\n\tMOVQ R14, R13\n\nsequenceDecs_decodeSync_safe_amd64_after_adjust:\n\tMOVQ R13, 8(SP)\n\n\t// Check values\n\tMOVQ  16(SP), AX\n\tMOVQ  24(SP), CX\n\tLEAQ  (AX)(CX*1), R14\n\tMOVQ  s+0(FP), R15\n\tADDQ  R14, 256(R15)\n\tMOVQ  ctx+16(FP), R14\n\tSUBQ  CX, 104(R14)\n\tJS    error_not_enough_literals\n\tCMPQ  AX, $0x00020002\n\tJA    sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok\n\tTESTQ AX, AX\n\tJNZ   sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch\n\nsequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok:\n\tMOVQ 24(SP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ 16(SP), R13\n\n\t// Check if we have enough space in s.out\n\tLEAQ (AX)(R13*1), R14\n\tADDQ R10, R14\n\tCMPQ R14, 32(SP)\n\tJA   error_not_enough_space\n\n\t// Copy literals\n\tTESTQ AX, AX\n\tJZ    check_offset\n\tMOVQ  AX, R14\n\tSUBQ  $0x10, R14\n\tJB    copy_1_small\n\ncopy_1_loop:\n\tMOVUPS (R11), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, R11\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, R14\n\tJAE    copy_1_loop\n\tLEAQ   16(R11)(R14*1), R11\n\tLEAQ   16(R10)(R14*1), R10\n\tMOVUPS -16(R11), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_1_end\n\ncopy_1_small:\n\tCMPQ AX, $0x03\n\tJE   copy_1_move_3\n\tJB   copy_1_move_1or2\n\tCMPQ AX, $0x08\n\tJB   copy_1_move_4through7\n\tJMP  copy_1_move_8through16\n\ncopy_1_move_1or2:\n\tMOVB (R11), R14\n\tMOVB -1(R11)(AX*1), R15\n\tMOVB R14, (R10)\n\tMOVB R15, -1(R10)(AX*1)\n\tADDQ AX, R11\n\tADDQ AX, R10\n\tJMP  copy_1_end\n\ncopy_1_move_3:\n\tMOVW (R11), R14\n\tMOVB 2(R11), R15\n\tMOVW R14, (R10)\n\tMOVB R15, 2(R10)\n\tADDQ AX, R11\n\tADDQ AX, R10\n\tJMP  copy_1_end\n\ncopy_1_move_4through7:\n\tMOVL (R11), R14\n\tMOVL -4(R11)(AX*1), R15\n\tMOVL R14, (R10)\n\tMOVL R15, -4(R10)(AX*1)\n\tADDQ AX, R11\n\tADDQ AX, R10\n\tJMP  copy_1_end\n\ncopy_1_move_8through16:\n\tMOVQ (R11), R14\n\tMOVQ -8(R11)(AX*1), R15\n\tMOVQ R14, (R10)\n\tMOVQ R15, -8(R10)(AX*1)\n\tADDQ AX, R11\n\tADDQ AX, R10\n\ncopy_1_end:\n\tADDQ AX, R12\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tMOVQ R12, AX\n\tADDQ 40(SP), AX\n\tCMPQ CX, AX\n\tJG   error_match_off_too_big\n\tCMPQ CX, 56(SP)\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ CX, AX\n\tSUBQ R12, AX\n\tJLS  copy_match\n\tMOVQ 48(SP), R14\n\tSUBQ AX, R14\n\tCMPQ R13, AX\n\tJG   copy_all_from_history\n\tMOVQ R13, AX\n\tSUBQ $0x10, AX\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, AX\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(AX*1), R14\n\tLEAQ   16(R10)(AX*1), R10\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), AX\n\tMOVB 2(R14), CL\n\tMOVW AX, (R10)\n\tMOVB CL, 2(R10)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), AX\n\tMOVL -4(R14)(R13*1), CX\n\tMOVL AX, (R10)\n\tMOVL CX, -4(R10)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), AX\n\tMOVQ -8(R14)(R13*1), CX\n\tMOVQ AX, (R10)\n\tMOVQ CX, -8(R10)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R10\n\ncopy_4_end:\n\tADDQ R13, R12\n\tJMP  handle_loop\n\tJMP loop_finished\n\ncopy_all_from_history:\n\tMOVQ AX, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(R10)(R15*1), R10\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ AX, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ AX, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(AX*1), BP\n\tMOVB R15, (R10)\n\tMOVB BP, -1(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (R10)\n\tMOVB BP, 2(R10)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(AX*1), BP\n\tMOVL R15, (R10)\n\tMOVL BP, -4(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(AX*1), BP\n\tMOVQ R15, (R10)\n\tMOVQ BP, -8(R10)(AX*1)\n\tADDQ AX, R14\n\tADDQ AX, R10\n\ncopy_5_end:\n\tADDQ AX, R12\n\tSUBQ AX, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ R10, AX\n\tSUBQ CX, AX\n\n\t// ml <= mo\n\tCMPQ R13, CX\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, R12\n\tMOVQ R13, CX\n\tSUBQ $0x10, CX\n\tJB   copy_2_small\n\ncopy_2_loop:\n\tMOVUPS (AX), X0\n\tMOVUPS X0, (R10)\n\tADDQ   $0x10, AX\n\tADDQ   $0x10, R10\n\tSUBQ   $0x10, CX\n\tJAE    copy_2_loop\n\tLEAQ   16(AX)(CX*1), AX\n\tLEAQ   16(R10)(CX*1), R10\n\tMOVUPS -16(AX), X0\n\tMOVUPS X0, -16(R10)\n\tJMP    copy_2_end\n\ncopy_2_small:\n\tCMPQ R13, $0x03\n\tJE   copy_2_move_3\n\tJB   copy_2_move_1or2\n\tCMPQ R13, $0x08\n\tJB   copy_2_move_4through7\n\tJMP  copy_2_move_8through16\n\ncopy_2_move_1or2:\n\tMOVB (AX), CL\n\tMOVB -1(AX)(R13*1), R14\n\tMOVB CL, (R10)\n\tMOVB R14, -1(R10)(R13*1)\n\tADDQ R13, AX\n\tADDQ R13, R10\n\tJMP  copy_2_end\n\ncopy_2_move_3:\n\tMOVW (AX), CX\n\tMOVB 2(AX), R14\n\tMOVW CX, (R10)\n\tMOVB R14, 2(R10)\n\tADDQ R13, AX\n\tADDQ R13, R10\n\tJMP  copy_2_end\n\ncopy_2_move_4through7:\n\tMOVL (AX), CX\n\tMOVL -4(AX)(R13*1), R14\n\tMOVL CX, (R10)\n\tMOVL R14, -4(R10)(R13*1)\n\tADDQ R13, AX\n\tADDQ R13, R10\n\tJMP  copy_2_end\n\ncopy_2_move_8through16:\n\tMOVQ (AX), CX\n\tMOVQ -8(AX)(R13*1), R14\n\tMOVQ CX, (R10)\n\tMOVQ R14, -8(R10)(R13*1)\n\tADDQ R13, AX\n\tADDQ R13, R10\n\ncopy_2_end:\n\tJMP handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, R12\n\ncopy_slow_3:\n\tMOVB (AX), CL\n\tMOVB CL, (R10)\n\tINCQ AX\n\tINCQ R10\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tMOVQ ctx+16(FP), AX\n\tDECQ 96(AX)\n\tJNS  sequenceDecs_decodeSync_safe_amd64_main_loop\n\nloop_finished:\n\tMOVQ br+8(FP), AX\n\tMOVQ DX, 24(AX)\n\tMOVB BL, 40(AX)\n\tMOVQ SI, 32(AX)\n\n\t// Update the context\n\tMOVQ ctx+16(FP), AX\n\tMOVQ R12, 136(AX)\n\tMOVQ 144(AX), CX\n\tSUBQ CX, R11\n\tMOVQ R11, 168(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch:\n\tMOVQ 16(SP), AX\n\tMOVQ ctx+16(FP), CX\n\tMOVQ AX, 216(CX)\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decodeSync_safe_amd64_error_match_len_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\nerror_match_off_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ CX, 224(AX)\n\tMOVQ R12, 136(AX)\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n\t// Return with not enough output space error\nerror_not_enough_space:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ R12, 136(AX)\n\tMOVQ $0x00000005, ret+24(FP)\n\tRET\n\n// func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int\n// Requires: BMI, BMI2, CMOV, SSE\nTEXT ·sequenceDecs_decodeSync_safe_bmi2(SB), $64-32\n\tMOVQ    br+8(FP), BX\n\tMOVQ    24(BX), AX\n\tMOVBQZX 40(BX), DX\n\tMOVQ    (BX), CX\n\tMOVQ    32(BX), BX\n\tADDQ    BX, CX\n\tMOVQ    CX, (SP)\n\tMOVQ    ctx+16(FP), CX\n\tMOVQ    72(CX), SI\n\tMOVQ    80(CX), DI\n\tMOVQ    88(CX), R8\n\tXORQ    R9, R9\n\tMOVQ    R9, 8(SP)\n\tMOVQ    R9, 16(SP)\n\tMOVQ    R9, 24(SP)\n\tMOVQ    112(CX), R9\n\tMOVQ    128(CX), R10\n\tMOVQ    R10, 32(SP)\n\tMOVQ    144(CX), R10\n\tMOVQ    136(CX), R11\n\tMOVQ    200(CX), R12\n\tMOVQ    R12, 56(SP)\n\tMOVQ    176(CX), R12\n\tMOVQ    R12, 48(SP)\n\tMOVQ    184(CX), CX\n\tMOVQ    CX, 40(SP)\n\tMOVQ    40(SP), CX\n\tADDQ    CX, 48(SP)\n\n\t// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)\n\tADDQ R9, 32(SP)\n\n\t// outBase += outPosition\n\tADDQ R11, R9\n\nsequenceDecs_decodeSync_safe_bmi2_main_loop:\n\tMOVQ (SP), R12\n\n\t// Fill bitreader to have enough for the offset and match length.\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R12\n\tMOVQ (R12), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decodeSync_safe_bmi2_fill_end\n\nsequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decodeSync_safe_bmi2_fill_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decodeSync_safe_bmi2_fill_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R12\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R12), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte\n\nsequenceDecs_decodeSync_safe_bmi2_fill_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_safe_bmi2_fill_end:\n\t// Update offset\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, R8, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   R8, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 8(SP)\n\n\t// Update match length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, DI, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   DI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 16(SP)\n\n\t// Fill bitreader to have enough for the remaining\n\tCMPQ BX, $0x08\n\tJL   sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte\n\tMOVQ DX, CX\n\tSHRQ $0x03, CX\n\tSUBQ CX, R12\n\tMOVQ (R12), AX\n\tSUBQ CX, BX\n\tANDQ $0x07, DX\n\tJMP  sequenceDecs_decodeSync_safe_bmi2_fill_2_end\n\nsequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:\n\tCMPQ    BX, $0x00\n\tJLE     sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread\n\tCMPQ    DX, $0x07\n\tJLE     sequenceDecs_decodeSync_safe_bmi2_fill_2_end\n\tSHLQ    $0x08, AX\n\tSUBQ    $0x01, R12\n\tSUBQ    $0x01, BX\n\tSUBQ    $0x08, DX\n\tMOVBQZX (R12), CX\n\tORQ     CX, AX\n\tJMP     sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte\n\nsequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread:\n\tCMPQ DX, $0x40\n\tJA   error_overread\n\nsequenceDecs_decodeSync_safe_bmi2_fill_2_end:\n\t// Update literal length\n\tMOVQ   $0x00000808, CX\n\tBEXTRQ CX, SI, R13\n\tMOVQ   AX, R14\n\tLEAQ   (DX)(R13*1), CX\n\tROLQ   CL, R14\n\tBZHIQ  R13, R14, R14\n\tMOVQ   CX, DX\n\tMOVQ   SI, CX\n\tSHRQ   $0x20, CX\n\tADDQ   R14, CX\n\tMOVQ   CX, 24(SP)\n\n\t// Fill bitreader for state updates\n\tMOVQ    R12, (SP)\n\tMOVQ    $0x00000808, CX\n\tBEXTRQ  CX, R8, R12\n\tMOVQ    ctx+16(FP), CX\n\tCMPQ    96(CX), $0x00\n\tJZ      sequenceDecs_decodeSync_safe_bmi2_skip_update\n\tLEAQ    (SI)(DI*1), R13\n\tADDQ    R8, R13\n\tMOVBQZX R13, R13\n\tLEAQ    (DX)(R13*1), CX\n\tMOVQ    AX, R14\n\tMOVQ    CX, DX\n\tROLQ    CL, R14\n\tBZHIQ   R13, R14, R14\n\n\t// Update Offset State\n\tBZHIQ R8, R14, CX\n\tSHRXQ R8, R14, R14\n\tSHRL  $0x10, R8\n\tADDQ  CX, R8\n\n\t// Load ctx.ofTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 48(CX), CX\n\tMOVQ (CX)(R8*8), R8\n\n\t// Update Match Length State\n\tBZHIQ DI, R14, CX\n\tSHRXQ DI, R14, R14\n\tSHRL  $0x10, DI\n\tADDQ  CX, DI\n\n\t// Load ctx.mlTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ 24(CX), CX\n\tMOVQ (CX)(DI*8), DI\n\n\t// Update Literal Length State\n\tBZHIQ SI, R14, CX\n\tSHRL  $0x10, SI\n\tADDQ  CX, SI\n\n\t// Load ctx.llTable\n\tMOVQ ctx+16(FP), CX\n\tMOVQ (CX), CX\n\tMOVQ (CX)(SI*8), SI\n\nsequenceDecs_decodeSync_safe_bmi2_skip_update:\n\t// Adjust offset\n\tMOVQ   s+0(FP), CX\n\tMOVQ   8(SP), R13\n\tCMPQ   R12, $0x01\n\tJBE    sequenceDecs_decodeSync_safe_bmi2_adjust_offsetB_1_or_0\n\tMOVUPS 144(CX), X0\n\tMOVQ   R13, 144(CX)\n\tMOVUPS X0, 152(CX)\n\tJMP    sequenceDecs_decodeSync_safe_bmi2_after_adjust\n\nsequenceDecs_decodeSync_safe_bmi2_adjust_offsetB_1_or_0:\n\tCMPQ 24(SP), $0x00000000\n\tJNE  sequenceDecs_decodeSync_safe_bmi2_adjust_offset_maybezero\n\tINCQ R13\n\tJMP  sequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero\n\nsequenceDecs_decodeSync_safe_bmi2_adjust_offset_maybezero:\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero\n\tMOVQ  144(CX), R13\n\tJMP   sequenceDecs_decodeSync_safe_bmi2_after_adjust\n\nsequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero:\n\tMOVQ    R13, R12\n\tXORQ    R14, R14\n\tMOVQ    $-1, R15\n\tCMPQ    R13, $0x03\n\tCMOVQEQ R14, R12\n\tCMOVQEQ R15, R14\n\tADDQ    144(CX)(R12*8), R14\n\tJNZ     sequenceDecs_decodeSync_safe_bmi2_adjust_temp_valid\n\tMOVQ    $0x00000001, R14\n\nsequenceDecs_decodeSync_safe_bmi2_adjust_temp_valid:\n\tCMPQ R13, $0x01\n\tJZ   sequenceDecs_decodeSync_safe_bmi2_adjust_skip\n\tMOVQ 152(CX), R12\n\tMOVQ R12, 160(CX)\n\nsequenceDecs_decodeSync_safe_bmi2_adjust_skip:\n\tMOVQ 144(CX), R12\n\tMOVQ R12, 152(CX)\n\tMOVQ R14, 144(CX)\n\tMOVQ R14, R13\n\nsequenceDecs_decodeSync_safe_bmi2_after_adjust:\n\tMOVQ R13, 8(SP)\n\n\t// Check values\n\tMOVQ  16(SP), CX\n\tMOVQ  24(SP), R12\n\tLEAQ  (CX)(R12*1), R14\n\tMOVQ  s+0(FP), R15\n\tADDQ  R14, 256(R15)\n\tMOVQ  ctx+16(FP), R14\n\tSUBQ  R12, 104(R14)\n\tJS    error_not_enough_literals\n\tCMPQ  CX, $0x00020002\n\tJA    sequenceDecs_decodeSync_safe_bmi2_error_match_len_too_big\n\tTESTQ R13, R13\n\tJNZ   sequenceDecs_decodeSync_safe_bmi2_match_len_ofs_ok\n\tTESTQ CX, CX\n\tJNZ   sequenceDecs_decodeSync_safe_bmi2_error_match_len_ofs_mismatch\n\nsequenceDecs_decodeSync_safe_bmi2_match_len_ofs_ok:\n\tMOVQ 24(SP), CX\n\tMOVQ 8(SP), R12\n\tMOVQ 16(SP), R13\n\n\t// Check if we have enough space in s.out\n\tLEAQ (CX)(R13*1), R14\n\tADDQ R9, R14\n\tCMPQ R14, 32(SP)\n\tJA   error_not_enough_space\n\n\t// Copy literals\n\tTESTQ CX, CX\n\tJZ    check_offset\n\tMOVQ  CX, R14\n\tSUBQ  $0x10, R14\n\tJB    copy_1_small\n\ncopy_1_loop:\n\tMOVUPS (R10), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, R10\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, R14\n\tJAE    copy_1_loop\n\tLEAQ   16(R10)(R14*1), R10\n\tLEAQ   16(R9)(R14*1), R9\n\tMOVUPS -16(R10), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_1_end\n\ncopy_1_small:\n\tCMPQ CX, $0x03\n\tJE   copy_1_move_3\n\tJB   copy_1_move_1or2\n\tCMPQ CX, $0x08\n\tJB   copy_1_move_4through7\n\tJMP  copy_1_move_8through16\n\ncopy_1_move_1or2:\n\tMOVB (R10), R14\n\tMOVB -1(R10)(CX*1), R15\n\tMOVB R14, (R9)\n\tMOVB R15, -1(R9)(CX*1)\n\tADDQ CX, R10\n\tADDQ CX, R9\n\tJMP  copy_1_end\n\ncopy_1_move_3:\n\tMOVW (R10), R14\n\tMOVB 2(R10), R15\n\tMOVW R14, (R9)\n\tMOVB R15, 2(R9)\n\tADDQ CX, R10\n\tADDQ CX, R9\n\tJMP  copy_1_end\n\ncopy_1_move_4through7:\n\tMOVL (R10), R14\n\tMOVL -4(R10)(CX*1), R15\n\tMOVL R14, (R9)\n\tMOVL R15, -4(R9)(CX*1)\n\tADDQ CX, R10\n\tADDQ CX, R9\n\tJMP  copy_1_end\n\ncopy_1_move_8through16:\n\tMOVQ (R10), R14\n\tMOVQ -8(R10)(CX*1), R15\n\tMOVQ R14, (R9)\n\tMOVQ R15, -8(R9)(CX*1)\n\tADDQ CX, R10\n\tADDQ CX, R9\n\ncopy_1_end:\n\tADDQ CX, R11\n\n\t// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)\ncheck_offset:\n\tMOVQ R11, CX\n\tADDQ 40(SP), CX\n\tCMPQ R12, CX\n\tJG   error_match_off_too_big\n\tCMPQ R12, 56(SP)\n\tJG   error_match_off_too_big\n\n\t// Copy match from history\n\tMOVQ R12, CX\n\tSUBQ R11, CX\n\tJLS  copy_match\n\tMOVQ 48(SP), R14\n\tSUBQ CX, R14\n\tCMPQ R13, CX\n\tJG   copy_all_from_history\n\tMOVQ R13, CX\n\tSUBQ $0x10, CX\n\tJB   copy_4_small\n\ncopy_4_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, CX\n\tJAE    copy_4_loop\n\tLEAQ   16(R14)(CX*1), R14\n\tLEAQ   16(R9)(CX*1), R9\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_4_end\n\ncopy_4_small:\n\tCMPQ R13, $0x03\n\tJE   copy_4_move_3\n\tCMPQ R13, $0x08\n\tJB   copy_4_move_4through7\n\tJMP  copy_4_move_8through16\n\ncopy_4_move_3:\n\tMOVW (R14), CX\n\tMOVB 2(R14), R12\n\tMOVW CX, (R9)\n\tMOVB R12, 2(R9)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\tJMP  copy_4_end\n\ncopy_4_move_4through7:\n\tMOVL (R14), CX\n\tMOVL -4(R14)(R13*1), R12\n\tMOVL CX, (R9)\n\tMOVL R12, -4(R9)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\tJMP  copy_4_end\n\ncopy_4_move_8through16:\n\tMOVQ (R14), CX\n\tMOVQ -8(R14)(R13*1), R12\n\tMOVQ CX, (R9)\n\tMOVQ R12, -8(R9)(R13*1)\n\tADDQ R13, R14\n\tADDQ R13, R9\n\ncopy_4_end:\n\tADDQ R13, R11\n\tJMP  handle_loop\n\tJMP loop_finished\n\ncopy_all_from_history:\n\tMOVQ CX, R15\n\tSUBQ $0x10, R15\n\tJB   copy_5_small\n\ncopy_5_loop:\n\tMOVUPS (R14), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, R14\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, R15\n\tJAE    copy_5_loop\n\tLEAQ   16(R14)(R15*1), R14\n\tLEAQ   16(R9)(R15*1), R9\n\tMOVUPS -16(R14), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_5_end\n\ncopy_5_small:\n\tCMPQ CX, $0x03\n\tJE   copy_5_move_3\n\tJB   copy_5_move_1or2\n\tCMPQ CX, $0x08\n\tJB   copy_5_move_4through7\n\tJMP  copy_5_move_8through16\n\ncopy_5_move_1or2:\n\tMOVB (R14), R15\n\tMOVB -1(R14)(CX*1), BP\n\tMOVB R15, (R9)\n\tMOVB BP, -1(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_3:\n\tMOVW (R14), R15\n\tMOVB 2(R14), BP\n\tMOVW R15, (R9)\n\tMOVB BP, 2(R9)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_4through7:\n\tMOVL (R14), R15\n\tMOVL -4(R14)(CX*1), BP\n\tMOVL R15, (R9)\n\tMOVL BP, -4(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\tJMP  copy_5_end\n\ncopy_5_move_8through16:\n\tMOVQ (R14), R15\n\tMOVQ -8(R14)(CX*1), BP\n\tMOVQ R15, (R9)\n\tMOVQ BP, -8(R9)(CX*1)\n\tADDQ CX, R14\n\tADDQ CX, R9\n\ncopy_5_end:\n\tADDQ CX, R11\n\tSUBQ CX, R13\n\n\t// Copy match from the current buffer\ncopy_match:\n\tMOVQ R9, CX\n\tSUBQ R12, CX\n\n\t// ml <= mo\n\tCMPQ R13, R12\n\tJA   copy_overlapping_match\n\n\t// Copy non-overlapping match\n\tADDQ R13, R11\n\tMOVQ R13, R12\n\tSUBQ $0x10, R12\n\tJB   copy_2_small\n\ncopy_2_loop:\n\tMOVUPS (CX), X0\n\tMOVUPS X0, (R9)\n\tADDQ   $0x10, CX\n\tADDQ   $0x10, R9\n\tSUBQ   $0x10, R12\n\tJAE    copy_2_loop\n\tLEAQ   16(CX)(R12*1), CX\n\tLEAQ   16(R9)(R12*1), R9\n\tMOVUPS -16(CX), X0\n\tMOVUPS X0, -16(R9)\n\tJMP    copy_2_end\n\ncopy_2_small:\n\tCMPQ R13, $0x03\n\tJE   copy_2_move_3\n\tJB   copy_2_move_1or2\n\tCMPQ R13, $0x08\n\tJB   copy_2_move_4through7\n\tJMP  copy_2_move_8through16\n\ncopy_2_move_1or2:\n\tMOVB (CX), R12\n\tMOVB -1(CX)(R13*1), R14\n\tMOVB R12, (R9)\n\tMOVB R14, -1(R9)(R13*1)\n\tADDQ R13, CX\n\tADDQ R13, R9\n\tJMP  copy_2_end\n\ncopy_2_move_3:\n\tMOVW (CX), R12\n\tMOVB 2(CX), R14\n\tMOVW R12, (R9)\n\tMOVB R14, 2(R9)\n\tADDQ R13, CX\n\tADDQ R13, R9\n\tJMP  copy_2_end\n\ncopy_2_move_4through7:\n\tMOVL (CX), R12\n\tMOVL -4(CX)(R13*1), R14\n\tMOVL R12, (R9)\n\tMOVL R14, -4(R9)(R13*1)\n\tADDQ R13, CX\n\tADDQ R13, R9\n\tJMP  copy_2_end\n\ncopy_2_move_8through16:\n\tMOVQ (CX), R12\n\tMOVQ -8(CX)(R13*1), R14\n\tMOVQ R12, (R9)\n\tMOVQ R14, -8(R9)(R13*1)\n\tADDQ R13, CX\n\tADDQ R13, R9\n\ncopy_2_end:\n\tJMP handle_loop\n\n\t// Copy overlapping match\ncopy_overlapping_match:\n\tADDQ R13, R11\n\ncopy_slow_3:\n\tMOVB (CX), R12\n\tMOVB R12, (R9)\n\tINCQ CX\n\tINCQ R9\n\tDECQ R13\n\tJNZ  copy_slow_3\n\nhandle_loop:\n\tMOVQ ctx+16(FP), CX\n\tDECQ 96(CX)\n\tJNS  sequenceDecs_decodeSync_safe_bmi2_main_loop\n\nloop_finished:\n\tMOVQ br+8(FP), CX\n\tMOVQ AX, 24(CX)\n\tMOVB DL, 40(CX)\n\tMOVQ BX, 32(CX)\n\n\t// Update the context\n\tMOVQ ctx+16(FP), AX\n\tMOVQ R11, 136(AX)\n\tMOVQ 144(AX), CX\n\tSUBQ CX, R10\n\tMOVQ R10, 168(AX)\n\n\t// Return success\n\tMOVQ $0x00000000, ret+24(FP)\n\tRET\n\n\t// Return with match length error\nsequenceDecs_decodeSync_safe_bmi2_error_match_len_ofs_mismatch:\n\tMOVQ 16(SP), AX\n\tMOVQ ctx+16(FP), CX\n\tMOVQ AX, 216(CX)\n\tMOVQ $0x00000001, ret+24(FP)\n\tRET\n\n\t// Return with match too long error\nsequenceDecs_decodeSync_safe_bmi2_error_match_len_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ $0x00000002, ret+24(FP)\n\tRET\n\n\t// Return with match offset too long error\nerror_match_off_too_big:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 8(SP), CX\n\tMOVQ CX, 224(AX)\n\tMOVQ R11, 136(AX)\n\tMOVQ $0x00000003, ret+24(FP)\n\tRET\n\n\t// Return with not enough literals error\nerror_not_enough_literals:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ $0x00000004, ret+24(FP)\n\tRET\n\n\t// Return with overread error\nerror_overread:\n\tMOVQ $0x00000006, ret+24(FP)\n\tRET\n\n\t// Return with not enough output space error\nerror_not_enough_space:\n\tMOVQ ctx+16(FP), AX\n\tMOVQ 24(SP), CX\n\tMOVQ CX, 208(AX)\n\tMOVQ 16(SP), CX\n\tMOVQ CX, 216(AX)\n\tMOVQ R11, 136(AX)\n\tMOVQ $0x00000005, ret+24(FP)\n\tRET\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/seqdec_generic.go",
    "content": "//go:build !amd64 || appengine || !gc || noasm\n// +build !amd64 appengine !gc noasm\n\npackage zstd\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// decode sequences from the stream with the provided history but without dictionary.\nfunc (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {\n\treturn false, nil\n}\n\n// decode sequences from the stream without the provided history.\nfunc (s *sequenceDecs) decode(seqs []seqVals) error {\n\tbr := s.br\n\n\t// Grab full sizes tables, to avoid bounds checks.\n\tllTable, mlTable, ofTable := s.litLengths.fse.dt[:maxTablesize], s.matchLengths.fse.dt[:maxTablesize], s.offsets.fse.dt[:maxTablesize]\n\tllState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state\n\ts.seqSize = 0\n\tlitRemain := len(s.literals)\n\n\tmaxBlockSize := maxCompressedBlockSize\n\tif s.windowSize < maxBlockSize {\n\t\tmaxBlockSize = s.windowSize\n\t}\n\tfor i := range seqs {\n\t\tvar ll, mo, ml int\n\t\tif br.cursor > 4+((maxOffsetBits+16+16)>>3) {\n\t\t\t// inlined function:\n\t\t\t// ll, mo, ml = s.nextFast(br, llState, mlState, ofState)\n\n\t\t\t// Final will not read from stream.\n\t\t\tvar llB, mlB, moB uint8\n\t\t\tll, llB = llState.final()\n\t\t\tml, mlB = mlState.final()\n\t\t\tmo, moB = ofState.final()\n\n\t\t\t// extra bits are stored in reverse order.\n\t\t\tbr.fillFast()\n\t\t\tmo += br.getBits(moB)\n\t\t\tif s.maxBits > 32 {\n\t\t\t\tbr.fillFast()\n\t\t\t}\n\t\t\tml += br.getBits(mlB)\n\t\t\tll += br.getBits(llB)\n\n\t\t\tif moB > 1 {\n\t\t\t\ts.prevOffset[2] = s.prevOffset[1]\n\t\t\t\ts.prevOffset[1] = s.prevOffset[0]\n\t\t\t\ts.prevOffset[0] = mo\n\t\t\t} else {\n\t\t\t\t// mo = s.adjustOffset(mo, ll, moB)\n\t\t\t\t// Inlined for rather big speedup\n\t\t\t\tif ll == 0 {\n\t\t\t\t\t// There is an exception though, when current sequence's literals_length = 0.\n\t\t\t\t\t// In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2,\n\t\t\t\t\t// an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte.\n\t\t\t\t\tmo++\n\t\t\t\t}\n\n\t\t\t\tif mo == 0 {\n\t\t\t\t\tmo = s.prevOffset[0]\n\t\t\t\t} else {\n\t\t\t\t\tvar temp int\n\t\t\t\t\tif mo == 3 {\n\t\t\t\t\t\ttemp = s.prevOffset[0] - 1\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp = s.prevOffset[mo]\n\t\t\t\t\t}\n\n\t\t\t\t\tif temp == 0 {\n\t\t\t\t\t\t// 0 is not valid; input is corrupted; force offset to 1\n\t\t\t\t\t\tprintln(\"WARNING: temp was 0\")\n\t\t\t\t\t\ttemp = 1\n\t\t\t\t\t}\n\n\t\t\t\t\tif mo != 1 {\n\t\t\t\t\t\ts.prevOffset[2] = s.prevOffset[1]\n\t\t\t\t\t}\n\t\t\t\t\ts.prevOffset[1] = s.prevOffset[0]\n\t\t\t\t\ts.prevOffset[0] = temp\n\t\t\t\t\tmo = temp\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.fillFast()\n\t\t} else {\n\t\t\tif br.overread() {\n\t\t\t\tif debugDecoder {\n\t\t\t\t\tprintf(\"reading sequence %d, exceeded available data\\n\", i)\n\t\t\t\t}\n\t\t\t\treturn io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\tll, mo, ml = s.next(br, llState, mlState, ofState)\n\t\t\tbr.fill()\n\t\t}\n\n\t\tif debugSequences {\n\t\t\tprintln(\"Seq\", i, \"Litlen:\", ll, \"mo:\", mo, \"(abs) ml:\", ml)\n\t\t}\n\t\t// Evaluate.\n\t\t// We might be doing this async, so do it early.\n\t\tif mo == 0 && ml > 0 {\n\t\t\treturn fmt.Errorf(\"zero matchoff and matchlen (%d) > 0\", ml)\n\t\t}\n\t\tif ml > maxMatchLen {\n\t\t\treturn fmt.Errorf(\"match len (%d) bigger than max allowed length\", ml)\n\t\t}\n\t\ts.seqSize += ll + ml\n\t\tif s.seqSize > maxBlockSize {\n\t\t\treturn fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t\t}\n\t\tlitRemain -= ll\n\t\tif litRemain < 0 {\n\t\t\treturn fmt.Errorf(\"unexpected literal count, want %d bytes, but only %d is available\", ll, litRemain+ll)\n\t\t}\n\t\tseqs[i] = seqVals{\n\t\t\tll: ll,\n\t\t\tml: ml,\n\t\t\tmo: mo,\n\t\t}\n\t\tif i == len(seqs)-1 {\n\t\t\t// This is the last sequence, so we shouldn't update state.\n\t\t\tbreak\n\t\t}\n\n\t\t// Manually inlined, ~ 5-20% faster\n\t\t// Update all 3 states at once. Approx 20% faster.\n\t\tnBits := llState.nbBits() + mlState.nbBits() + ofState.nbBits()\n\t\tif nBits == 0 {\n\t\t\tllState = llTable[llState.newState()&maxTableMask]\n\t\t\tmlState = mlTable[mlState.newState()&maxTableMask]\n\t\t\tofState = ofTable[ofState.newState()&maxTableMask]\n\t\t} else {\n\t\t\tbits := br.get32BitsFast(nBits)\n\t\t\tlowBits := uint16(bits >> ((ofState.nbBits() + mlState.nbBits()) & 31))\n\t\t\tllState = llTable[(llState.newState()+lowBits)&maxTableMask]\n\n\t\t\tlowBits = uint16(bits >> (ofState.nbBits() & 31))\n\t\t\tlowBits &= bitMask[mlState.nbBits()&15]\n\t\t\tmlState = mlTable[(mlState.newState()+lowBits)&maxTableMask]\n\n\t\t\tlowBits = uint16(bits) & bitMask[ofState.nbBits()&15]\n\t\t\tofState = ofTable[(ofState.newState()+lowBits)&maxTableMask]\n\t\t}\n\t}\n\ts.seqSize += litRemain\n\tif s.seqSize > maxBlockSize {\n\t\treturn fmt.Errorf(\"output bigger than max block size (%d)\", maxBlockSize)\n\t}\n\terr := br.close()\n\tif err != nil {\n\t\tprintf(\"Closing sequences: %v, %+v\\n\", err, *br)\n\t}\n\treturn err\n}\n\n// executeSimple handles cases when a dictionary is not used.\nfunc (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error {\n\t// Ensure we have enough output size...\n\tif len(s.out)+s.seqSize > cap(s.out) {\n\t\taddBytes := s.seqSize + len(s.out)\n\t\ts.out = append(s.out, make([]byte, addBytes)...)\n\t\ts.out = s.out[:len(s.out)-addBytes]\n\t}\n\n\tif debugDecoder {\n\t\tprintf(\"Execute %d seqs with literals: %d into %d bytes\\n\", len(seqs), len(s.literals), s.seqSize)\n\t}\n\n\tvar t = len(s.out)\n\tout := s.out[:t+s.seqSize]\n\n\tfor _, seq := range seqs {\n\t\t// Add literals\n\t\tcopy(out[t:], s.literals[:seq.ll])\n\t\tt += seq.ll\n\t\ts.literals = s.literals[seq.ll:]\n\n\t\t// Malformed input\n\t\tif seq.mo > t+len(hist) || seq.mo > s.windowSize {\n\t\t\treturn fmt.Errorf(\"match offset (%d) bigger than current history (%d)\", seq.mo, t+len(hist))\n\t\t}\n\n\t\t// Copy from history.\n\t\tif v := seq.mo - t; v > 0 {\n\t\t\t// v is the start position in history from end.\n\t\t\tstart := len(hist) - v\n\t\t\tif seq.ml > v {\n\t\t\t\t// Some goes into the current block.\n\t\t\t\t// Copy remainder of history\n\t\t\t\tcopy(out[t:], hist[start:])\n\t\t\t\tt += v\n\t\t\t\tseq.ml -= v\n\t\t\t} else {\n\t\t\t\tcopy(out[t:], hist[start:start+seq.ml])\n\t\t\t\tt += seq.ml\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// We must be in the current buffer now\n\t\tif seq.ml > 0 {\n\t\t\tstart := t - seq.mo\n\t\t\tif seq.ml <= t-start {\n\t\t\t\t// No overlap\n\t\t\t\tcopy(out[t:], out[start:start+seq.ml])\n\t\t\t\tt += seq.ml\n\t\t\t} else {\n\t\t\t\t// Overlapping copy\n\t\t\t\t// Extend destination slice and copy one byte at the time.\n\t\t\t\tsrc := out[start : start+seq.ml]\n\t\t\t\tdst := out[t:]\n\t\t\t\tdst = dst[:len(src)]\n\t\t\t\tt += len(src)\n\t\t\t\t// Destination is the space we just added.\n\t\t\t\tfor i := range src {\n\t\t\t\t\tdst[i] = src[i]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Add final literals\n\tcopy(out[t:], s.literals)\n\tif debugDecoder {\n\t\tt += len(s.literals)\n\t\tif t != len(out) {\n\t\t\tpanic(fmt.Errorf(\"length mismatch, want %d, got %d, ss: %d\", len(out), t, s.seqSize))\n\t\t}\n\t}\n\ts.out = out\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/seqenc.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport \"math/bits\"\n\ntype seqCoders struct {\n\tllEnc, ofEnc, mlEnc    *fseEncoder\n\tllPrev, ofPrev, mlPrev *fseEncoder\n}\n\n// swap coders with another (block).\nfunc (s *seqCoders) swap(other *seqCoders) {\n\t*s, *other = *other, *s\n}\n\n// setPrev will update the previous encoders to the actually used ones\n// and make sure a fresh one is in the main slot.\nfunc (s *seqCoders) setPrev(ll, ml, of *fseEncoder) {\n\tcompareSwap := func(used *fseEncoder, current, prev **fseEncoder) {\n\t\t// We used the new one, more current to history and reuse the previous history\n\t\tif *current == used {\n\t\t\t*prev, *current = *current, *prev\n\t\t\tc := *current\n\t\t\tp := *prev\n\t\t\tc.reUsed = false\n\t\t\tp.reUsed = true\n\t\t\treturn\n\t\t}\n\t\tif used == *prev {\n\t\t\treturn\n\t\t}\n\t\t// Ensure we cannot reuse by accident\n\t\tprevEnc := *prev\n\t\tprevEnc.symbolLen = 0\n\t}\n\tcompareSwap(ll, &s.llEnc, &s.llPrev)\n\tcompareSwap(ml, &s.mlEnc, &s.mlPrev)\n\tcompareSwap(of, &s.ofEnc, &s.ofPrev)\n}\n\nfunc highBit(val uint32) (n uint32) {\n\treturn uint32(bits.Len32(val) - 1)\n}\n\nvar llCodeTable = [64]byte{0, 1, 2, 3, 4, 5, 6, 7,\n\t8, 9, 10, 11, 12, 13, 14, 15,\n\t16, 16, 17, 17, 18, 18, 19, 19,\n\t20, 20, 20, 20, 21, 21, 21, 21,\n\t22, 22, 22, 22, 22, 22, 22, 22,\n\t23, 23, 23, 23, 23, 23, 23, 23,\n\t24, 24, 24, 24, 24, 24, 24, 24,\n\t24, 24, 24, 24, 24, 24, 24, 24}\n\n// Up to 6 bits\nconst maxLLCode = 35\n\n// llBitsTable translates from ll code to number of bits.\nvar llBitsTable = [maxLLCode + 1]byte{\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t1, 1, 1, 1, 2, 2, 3, 3,\n\t4, 6, 7, 8, 9, 10, 11, 12,\n\t13, 14, 15, 16}\n\n// llCode returns the code that represents the literal length requested.\nfunc llCode(litLength uint32) uint8 {\n\tconst llDeltaCode = 19\n\tif litLength <= 63 {\n\t\treturn llCodeTable[litLength&63]\n\t}\n\treturn uint8(highBit(litLength)) + llDeltaCode\n}\n\nvar mlCodeTable = [128]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\t32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37,\n\t38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,\n\t40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n\t41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,\n\t42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,\n\t42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42}\n\n// Up to 6 bits\nconst maxMLCode = 52\n\n// mlBitsTable translates from ml code to number of bits.\nvar mlBitsTable = [maxMLCode + 1]byte{\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t0, 0, 0, 0, 0, 0, 0, 0,\n\t1, 1, 1, 1, 2, 2, 3, 3,\n\t4, 4, 5, 7, 8, 9, 10, 11,\n\t12, 13, 14, 15, 16}\n\n// note : mlBase = matchLength - MINMATCH;\n// because it's the format it's stored in seqStore->sequences\nfunc mlCode(mlBase uint32) uint8 {\n\tconst mlDeltaCode = 36\n\tif mlBase <= 127 {\n\t\treturn mlCodeTable[mlBase&127]\n\t}\n\treturn uint8(highBit(mlBase)) + mlDeltaCode\n}\n\nfunc ofCode(offset uint32) uint8 {\n\t// A valid offset will always be > 0.\n\treturn uint8(bits.Len32(offset) - 1)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/simple_go124.go",
    "content": "// Copyright 2025+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\n//go:build go1.24\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"runtime\"\n\t\"sync\"\n\t\"weak\"\n)\n\nvar weakMu sync.Mutex\nvar simpleEnc weak.Pointer[Encoder]\nvar simpleDec weak.Pointer[Decoder]\n\n// EncodeTo appends the encoded data from src to dst.\nfunc EncodeTo(dst []byte, src []byte) []byte {\n\tweakMu.Lock()\n\tenc := simpleEnc.Value()\n\tif enc == nil {\n\t\tvar err error\n\t\tenc, err = NewWriter(nil, WithEncoderConcurrency(runtime.NumCPU()), WithWindowSize(1<<20), WithLowerEncoderMem(true), WithZeroFrames(true))\n\t\tif err != nil {\n\t\t\tpanic(\"failed to create simple encoder: \" + err.Error())\n\t\t}\n\t\tsimpleEnc = weak.Make(enc)\n\t}\n\tweakMu.Unlock()\n\n\treturn enc.EncodeAll(src, dst)\n}\n\n// DecodeTo appends the decoded data from src to dst.\n// The maximum decoded size is 1GiB,\n// not including what may already be in dst.\nfunc DecodeTo(dst []byte, src []byte) ([]byte, error) {\n\tweakMu.Lock()\n\tdec := simpleDec.Value()\n\tif dec == nil {\n\t\tvar err error\n\t\tdec, err = NewReader(nil, WithDecoderConcurrency(runtime.NumCPU()), WithDecoderLowmem(true), WithDecoderMaxMemory(1<<30))\n\t\tif err != nil {\n\t\t\tweakMu.Unlock()\n\t\t\treturn nil, errors.New(\"failed to create simple decoder: \" + err.Error())\n\t\t}\n\t\truntime.SetFinalizer(dec, func(d *Decoder) {\n\t\t\td.Close()\n\t\t})\n\t\tsimpleDec = weak.Make(dec)\n\t}\n\tweakMu.Unlock()\n\treturn dec.DecodeAll(src, dst)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/snappy.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n// Based on work by Yann Collet, released under BSD License.\n\npackage zstd\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"hash/crc32\"\n\t\"io\"\n\n\t\"github.com/klauspost/compress/huff0\"\n\tsnappy \"github.com/klauspost/compress/internal/snapref\"\n)\n\nconst (\n\tsnappyTagLiteral = 0x00\n\tsnappyTagCopy1   = 0x01\n\tsnappyTagCopy2   = 0x02\n\tsnappyTagCopy4   = 0x03\n)\n\nconst (\n\tsnappyChecksumSize = 4\n\tsnappyMagicBody    = \"sNaPpY\"\n\n\t// snappyMaxBlockSize is the maximum size of the input to encodeBlock. It is not\n\t// part of the wire format per se, but some parts of the encoder assume\n\t// that an offset fits into a uint16.\n\t//\n\t// Also, for the framing format (Writer type instead of Encode function),\n\t// https://github.com/google/snappy/blob/master/framing_format.txt says\n\t// that \"the uncompressed data in a chunk must be no longer than 65536\n\t// bytes\".\n\tsnappyMaxBlockSize = 65536\n\n\t// snappyMaxEncodedLenOfMaxBlockSize equals MaxEncodedLen(snappyMaxBlockSize), but is\n\t// hard coded to be a const instead of a variable, so that obufLen can also\n\t// be a const. Their equivalence is confirmed by\n\t// TestMaxEncodedLenOfMaxBlockSize.\n\tsnappyMaxEncodedLenOfMaxBlockSize = 76490\n)\n\nconst (\n\tchunkTypeCompressedData   = 0x00\n\tchunkTypeUncompressedData = 0x01\n\tchunkTypePadding          = 0xfe\n\tchunkTypeStreamIdentifier = 0xff\n)\n\nvar (\n\t// ErrSnappyCorrupt reports that the input is invalid.\n\tErrSnappyCorrupt = errors.New(\"snappy: corrupt input\")\n\t// ErrSnappyTooLarge reports that the uncompressed length is too large.\n\tErrSnappyTooLarge = errors.New(\"snappy: decoded block is too large\")\n\t// ErrSnappyUnsupported reports that the input isn't supported.\n\tErrSnappyUnsupported = errors.New(\"snappy: unsupported input\")\n\n\terrUnsupportedLiteralLength = errors.New(\"snappy: unsupported literal length\")\n)\n\n// SnappyConverter can read SnappyConverter-compressed streams and convert them to zstd.\n// Conversion is done by converting the stream directly from Snappy without intermediate\n// full decoding.\n// Therefore the compression ratio is much less than what can be done by a full decompression\n// and compression, and a faulty Snappy stream may lead to a faulty Zstandard stream without\n// any errors being generated.\n// No CRC value is being generated and not all CRC values of the Snappy stream are checked.\n// However, it provides really fast recompression of Snappy streams.\n// The converter can be reused to avoid allocations, even after errors.\ntype SnappyConverter struct {\n\tr     io.Reader\n\terr   error\n\tbuf   []byte\n\tblock *blockEnc\n}\n\n// Convert the Snappy stream supplied in 'in' and write the zStandard stream to 'w'.\n// If any error is detected on the Snappy stream it is returned.\n// The number of bytes written is returned.\nfunc (r *SnappyConverter) Convert(in io.Reader, w io.Writer) (int64, error) {\n\tinitPredefined()\n\tr.err = nil\n\tr.r = in\n\tif r.block == nil {\n\t\tr.block = &blockEnc{}\n\t\tr.block.init()\n\t}\n\tr.block.initNewEncode()\n\tif len(r.buf) != snappyMaxEncodedLenOfMaxBlockSize+snappyChecksumSize {\n\t\tr.buf = make([]byte, snappyMaxEncodedLenOfMaxBlockSize+snappyChecksumSize)\n\t}\n\tr.block.litEnc.Reuse = huff0.ReusePolicyNone\n\tvar written int64\n\tvar readHeader bool\n\t{\n\t\theader := frameHeader{WindowSize: snappyMaxBlockSize}.appendTo(r.buf[:0])\n\n\t\tvar n int\n\t\tn, r.err = w.Write(header)\n\t\tif r.err != nil {\n\t\t\treturn written, r.err\n\t\t}\n\t\twritten += int64(n)\n\t}\n\n\tfor {\n\t\tif !r.readFull(r.buf[:4], true) {\n\t\t\t// Add empty last block\n\t\t\tr.block.reset(nil)\n\t\t\tr.block.last = true\n\t\t\terr := r.block.encodeLits(r.block.literals, false)\n\t\t\tif err != nil {\n\t\t\t\treturn written, err\n\t\t\t}\n\t\t\tn, err := w.Write(r.block.output)\n\t\t\tif err != nil {\n\t\t\t\treturn written, err\n\t\t\t}\n\t\t\twritten += int64(n)\n\n\t\t\treturn written, r.err\n\t\t}\n\t\tchunkType := r.buf[0]\n\t\tif !readHeader {\n\t\t\tif chunkType != chunkTypeStreamIdentifier {\n\t\t\t\tprintln(\"chunkType != chunkTypeStreamIdentifier\", chunkType)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\treadHeader = true\n\t\t}\n\t\tchunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16\n\t\tif chunkLen > len(r.buf) {\n\t\t\tprintln(\"chunkLen > len(r.buf)\", chunkType)\n\t\t\tr.err = ErrSnappyUnsupported\n\t\t\treturn written, r.err\n\t\t}\n\n\t\t// The chunk types are specified at\n\t\t// https://github.com/google/snappy/blob/master/framing_format.txt\n\t\tswitch chunkType {\n\t\tcase chunkTypeCompressedData:\n\t\t\t// Section 4.2. Compressed data (chunk type 0x00).\n\t\t\tif chunkLen < snappyChecksumSize {\n\t\t\t\tprintln(\"chunkLen < snappyChecksumSize\", chunkLen, snappyChecksumSize)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tbuf := r.buf[:chunkLen]\n\t\t\tif !r.readFull(buf, false) {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\t//checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24\n\t\t\tbuf = buf[snappyChecksumSize:]\n\n\t\t\tn, hdr, err := snappyDecodedLen(buf)\n\t\t\tif err != nil {\n\t\t\t\tr.err = err\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tbuf = buf[hdr:]\n\t\t\tif n > snappyMaxBlockSize {\n\t\t\t\tprintln(\"n > snappyMaxBlockSize\", n, snappyMaxBlockSize)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tr.block.reset(nil)\n\t\t\tr.block.pushOffsets()\n\t\t\tif err := decodeSnappy(r.block, buf); err != nil {\n\t\t\t\tr.err = err\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tif r.block.size+r.block.extraLits != n {\n\t\t\t\tprintf(\"invalid size, want %d, got %d\\n\", n, r.block.size+r.block.extraLits)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\terr = r.block.encode(nil, false, false)\n\t\t\tswitch err {\n\t\t\tcase errIncompressible:\n\t\t\t\tr.block.popOffsets()\n\t\t\t\tr.block.reset(nil)\n\t\t\t\tr.block.literals, err = snappy.Decode(r.block.literals[:n], r.buf[snappyChecksumSize:chunkLen])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn written, err\n\t\t\t\t}\n\t\t\t\terr = r.block.encodeLits(r.block.literals, false)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn written, err\n\t\t\t\t}\n\t\t\tcase nil:\n\t\t\tdefault:\n\t\t\t\treturn written, err\n\t\t\t}\n\n\t\t\tn, r.err = w.Write(r.block.output)\n\t\t\tif r.err != nil {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\twritten += int64(n)\n\t\t\tcontinue\n\t\tcase chunkTypeUncompressedData:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"Uncompressed, chunklen\", chunkLen)\n\t\t\t}\n\t\t\t// Section 4.3. Uncompressed data (chunk type 0x01).\n\t\t\tif chunkLen < snappyChecksumSize {\n\t\t\t\tprintln(\"chunkLen < snappyChecksumSize\", chunkLen, snappyChecksumSize)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tr.block.reset(nil)\n\t\t\tbuf := r.buf[:snappyChecksumSize]\n\t\t\tif !r.readFull(buf, false) {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tchecksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24\n\t\t\t// Read directly into r.decoded instead of via r.buf.\n\t\t\tn := chunkLen - snappyChecksumSize\n\t\t\tif n > snappyMaxBlockSize {\n\t\t\t\tprintln(\"n > snappyMaxBlockSize\", n, snappyMaxBlockSize)\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tr.block.literals = r.block.literals[:n]\n\t\t\tif !r.readFull(r.block.literals, false) {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tif snappyCRC(r.block.literals) != checksum {\n\t\t\t\tprintln(\"literals crc mismatch\")\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\terr := r.block.encodeLits(r.block.literals, false)\n\t\t\tif err != nil {\n\t\t\t\treturn written, err\n\t\t\t}\n\t\t\tn, r.err = w.Write(r.block.output)\n\t\t\tif r.err != nil {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\twritten += int64(n)\n\t\t\tcontinue\n\n\t\tcase chunkTypeStreamIdentifier:\n\t\t\tif debugEncoder {\n\t\t\t\tprintln(\"stream id\", chunkLen, len(snappyMagicBody))\n\t\t\t}\n\t\t\t// Section 4.1. Stream identifier (chunk type 0xff).\n\t\t\tif chunkLen != len(snappyMagicBody) {\n\t\t\t\tprintln(\"chunkLen != len(snappyMagicBody)\", chunkLen, len(snappyMagicBody))\n\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tif !r.readFull(r.buf[:len(snappyMagicBody)], false) {\n\t\t\t\treturn written, r.err\n\t\t\t}\n\t\t\tfor i := range len(snappyMagicBody) {\n\t\t\t\tif r.buf[i] != snappyMagicBody[i] {\n\t\t\t\t\tprintln(\"r.buf[i] != snappyMagicBody[i]\", r.buf[i], snappyMagicBody[i], i)\n\t\t\t\t\tr.err = ErrSnappyCorrupt\n\t\t\t\t\treturn written, r.err\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif chunkType <= 0x7f {\n\t\t\t// Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f).\n\t\t\tprintln(\"chunkType <= 0x7f\")\n\t\t\tr.err = ErrSnappyUnsupported\n\t\t\treturn written, r.err\n\t\t}\n\t\t// Section 4.4 Padding (chunk type 0xfe).\n\t\t// Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).\n\t\tif !r.readFull(r.buf[:chunkLen], false) {\n\t\t\treturn written, r.err\n\t\t}\n\t}\n}\n\n// decodeSnappy writes the decoding of src to dst. It assumes that the varint-encoded\n// length of the decompressed bytes has already been read.\nfunc decodeSnappy(blk *blockEnc, src []byte) error {\n\t//decodeRef(make([]byte, snappyMaxBlockSize), src)\n\tvar s, length int\n\tlits := blk.extraLits\n\tvar offset uint32\n\tfor s < len(src) {\n\t\tswitch src[s] & 0x03 {\n\t\tcase snappyTagLiteral:\n\t\t\tx := uint32(src[s] >> 2)\n\t\t\tswitch {\n\t\t\tcase x < 60:\n\t\t\t\ts++\n\t\t\tcase x == 60:\n\t\t\t\ts += 2\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, src)\n\t\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-1])\n\t\t\tcase x == 61:\n\t\t\t\ts += 3\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, src)\n\t\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-2]) | uint32(src[s-1])<<8\n\t\t\tcase x == 62:\n\t\t\t\ts += 4\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, src)\n\t\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16\n\t\t\tcase x == 63:\n\t\t\t\ts += 5\n\t\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, src)\n\t\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t\t}\n\t\t\t\tx = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24\n\t\t\t}\n\t\t\tif x > snappyMaxBlockSize {\n\t\t\t\tprintln(\"x > snappyMaxBlockSize\", x, snappyMaxBlockSize)\n\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t}\n\t\t\tlength = int(x) + 1\n\t\t\tif length <= 0 {\n\t\t\t\tprintln(\"length <= 0 \", length)\n\n\t\t\t\treturn errUnsupportedLiteralLength\n\t\t\t}\n\t\t\t//if length > snappyMaxBlockSize-d || uint32(length) > len(src)-s {\n\t\t\t//\treturn ErrSnappyCorrupt\n\t\t\t//}\n\n\t\t\tblk.literals = append(blk.literals, src[s:s+length]...)\n\t\t\t//println(length, \"litLen\")\n\t\t\tlits += length\n\t\t\ts += length\n\t\t\tcontinue\n\n\t\tcase snappyTagCopy1:\n\t\t\ts += 2\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, len(src))\n\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t}\n\t\t\tlength = 4 + int(src[s-2])>>2&0x7\n\t\t\toffset = uint32(src[s-2])&0xe0<<3 | uint32(src[s-1])\n\n\t\tcase snappyTagCopy2:\n\t\t\ts += 3\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, len(src))\n\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t}\n\t\t\tlength = 1 + int(src[s-3])>>2\n\t\t\toffset = uint32(src[s-2]) | uint32(src[s-1])<<8\n\n\t\tcase snappyTagCopy4:\n\t\t\ts += 5\n\t\t\tif uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line.\n\t\t\t\tprintln(\"uint(s) > uint(len(src)\", s, len(src))\n\t\t\t\treturn ErrSnappyCorrupt\n\t\t\t}\n\t\t\tlength = 1 + int(src[s-5])>>2\n\t\t\toffset = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24\n\t\t}\n\n\t\tif offset <= 0 || blk.size+lits < int(offset) /*|| length > len(blk)-d */ {\n\t\t\tprintln(\"offset <= 0 || blk.size+lits < int(offset)\", offset, blk.size+lits, int(offset), blk.size, lits)\n\n\t\t\treturn ErrSnappyCorrupt\n\t\t}\n\n\t\t// Check if offset is one of the recent offsets.\n\t\t// Adjusts the output offset accordingly.\n\t\t// Gives a tiny bit of compression, typically around 1%.\n\t\tif false {\n\t\t\toffset = blk.matchOffset(offset, uint32(lits))\n\t\t} else {\n\t\t\toffset += 3\n\t\t}\n\n\t\tblk.sequences = append(blk.sequences, seq{\n\t\t\tlitLen:   uint32(lits),\n\t\t\toffset:   offset,\n\t\t\tmatchLen: uint32(length) - zstdMinMatch,\n\t\t})\n\t\tblk.size += length + lits\n\t\tlits = 0\n\t}\n\tblk.extraLits = lits\n\treturn nil\n}\n\nfunc (r *SnappyConverter) readFull(p []byte, allowEOF bool) (ok bool) {\n\tif _, r.err = io.ReadFull(r.r, p); r.err != nil {\n\t\tif r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) {\n\t\t\tr.err = ErrSnappyCorrupt\n\t\t}\n\t\treturn false\n\t}\n\treturn true\n}\n\nvar crcTable = crc32.MakeTable(crc32.Castagnoli)\n\n// crc implements the checksum specified in section 3 of\n// https://github.com/google/snappy/blob/master/framing_format.txt\nfunc snappyCRC(b []byte) uint32 {\n\tc := crc32.Update(0, crcTable, b)\n\treturn c>>15 | c<<17 + 0xa282ead8\n}\n\n// snappyDecodedLen returns the length of the decoded block and the number of bytes\n// that the length header occupied.\nfunc snappyDecodedLen(src []byte) (blockLen, headerLen int, err error) {\n\tv, n := binary.Uvarint(src)\n\tif n <= 0 || v > 0xffffffff {\n\t\treturn 0, 0, ErrSnappyCorrupt\n\t}\n\n\tconst wordSize = 32 << (^uint(0) >> 32 & 1)\n\tif wordSize == 32 && v > 0x7fffffff {\n\t\treturn 0, 0, ErrSnappyTooLarge\n\t}\n\treturn int(v), n, nil\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/zip.go",
    "content": "// Copyright 2019+ Klaus Post. All rights reserved.\n// License information can be found in the LICENSE file.\n\npackage zstd\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"sync\"\n)\n\n// ZipMethodWinZip is the method for Zstandard compressed data inside Zip files for WinZip.\n// See https://www.winzip.com/win/en/comp_info.html\nconst ZipMethodWinZip = 93\n\n// ZipMethodPKWare is the original method number used by PKWARE to indicate Zstandard compression.\n// Deprecated: This has been deprecated by PKWARE, use ZipMethodWinZip instead for compression.\n// See https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT\nconst ZipMethodPKWare = 20\n\n// zipReaderPool is the default reader pool.\nvar zipReaderPool = sync.Pool{New: func() any {\n\tz, err := NewReader(nil, WithDecoderLowmem(true), WithDecoderMaxWindow(128<<20), WithDecoderConcurrency(1))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn z\n}}\n\n// newZipReader creates a pooled zip decompressor.\nfunc newZipReader(opts ...DOption) func(r io.Reader) io.ReadCloser {\n\tpool := &zipReaderPool\n\tif len(opts) > 0 {\n\t\topts = append([]DOption{WithDecoderLowmem(true), WithDecoderMaxWindow(128 << 20)}, opts...)\n\t\t// Force concurrency 1\n\t\topts = append(opts, WithDecoderConcurrency(1))\n\t\t// Create our own pool\n\t\tpool = &sync.Pool{}\n\t}\n\treturn func(r io.Reader) io.ReadCloser {\n\t\tdec, ok := pool.Get().(*Decoder)\n\t\tif ok {\n\t\t\tdec.Reset(r)\n\t\t} else {\n\t\t\td, err := NewReader(r, opts...)\n\t\t\tif err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t\tdec = d\n\t\t}\n\t\treturn &pooledZipReader{dec: dec, pool: pool}\n\t}\n}\n\ntype pooledZipReader struct {\n\tmu   sync.Mutex // guards Close and Read\n\tpool *sync.Pool\n\tdec  *Decoder\n}\n\nfunc (r *pooledZipReader) Read(p []byte) (n int, err error) {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tif r.dec == nil {\n\t\treturn 0, errors.New(\"read after close or EOF\")\n\t}\n\tdec, err := r.dec.Read(p)\n\tif err == io.EOF {\n\t\tr.dec.Reset(nil)\n\t\tr.pool.Put(r.dec)\n\t\tr.dec = nil\n\t}\n\treturn dec, err\n}\n\nfunc (r *pooledZipReader) Close() error {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tvar err error\n\tif r.dec != nil {\n\t\terr = r.dec.Reset(nil)\n\t\tr.pool.Put(r.dec)\n\t\tr.dec = nil\n\t}\n\treturn err\n}\n\ntype pooledZipWriter struct {\n\tmu   sync.Mutex // guards Close and Read\n\tenc  *Encoder\n\tpool *sync.Pool\n}\n\nfunc (w *pooledZipWriter) Write(p []byte) (n int, err error) {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\tif w.enc == nil {\n\t\treturn 0, errors.New(\"Write after Close\")\n\t}\n\treturn w.enc.Write(p)\n}\n\nfunc (w *pooledZipWriter) Close() error {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\tvar err error\n\tif w.enc != nil {\n\t\terr = w.enc.Close()\n\t\tw.pool.Put(w.enc)\n\t\tw.enc = nil\n\t}\n\treturn err\n}\n\n// ZipCompressor returns a compressor that can be registered with zip libraries.\n// The provided encoder options will be used on all encodes.\nfunc ZipCompressor(opts ...EOption) func(w io.Writer) (io.WriteCloser, error) {\n\tvar pool sync.Pool\n\treturn func(w io.Writer) (io.WriteCloser, error) {\n\t\tenc, ok := pool.Get().(*Encoder)\n\t\tif ok {\n\t\t\tenc.Reset(w)\n\t\t} else {\n\t\t\tvar err error\n\t\t\tenc, err = NewWriter(w, opts...)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\treturn &pooledZipWriter{enc: enc, pool: &pool}, nil\n\t}\n}\n\n// ZipDecompressor returns a decompressor that can be registered with zip libraries.\n// See ZipCompressor for example.\n// Options can be specified. WithDecoderConcurrency(1) is forced,\n// and by default a 128MB maximum decompression window is specified.\n// The window size can be overridden if required.\nfunc ZipDecompressor(opts ...DOption) func(r io.Reader) io.ReadCloser {\n\treturn newZipReader(opts...)\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/compress/zstd/zstd.go",
    "content": "// Package zstd provides decompression of zstandard files.\n//\n// For advanced usage and examples, go to the README: https://github.com/klauspost/compress/tree/master/zstd#zstd\npackage zstd\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"log\"\n\t\"math\"\n\n\t\"github.com/klauspost/compress/internal/le\"\n)\n\n// enable debug printing\nconst debug = false\n\n// enable encoding debug printing\nconst debugEncoder = debug\n\n// enable decoding debug printing\nconst debugDecoder = debug\n\n// Enable extra assertions.\nconst debugAsserts = debug || false\n\n// print sequence details\nconst debugSequences = false\n\n// print detailed matching information\nconst debugMatches = false\n\n// force encoder to use predefined tables.\nconst forcePreDef = false\n\n// zstdMinMatch is the minimum zstd match length.\nconst zstdMinMatch = 3\n\n// fcsUnknown is used for unknown frame content size.\nconst fcsUnknown = math.MaxUint64\n\nvar (\n\t// ErrReservedBlockType is returned when a reserved block type is found.\n\t// Typically this indicates wrong or corrupted input.\n\tErrReservedBlockType = errors.New(\"invalid input: reserved block type encountered\")\n\n\t// ErrCompressedSizeTooBig is returned when a block is bigger than allowed.\n\t// Typically this indicates wrong or corrupted input.\n\tErrCompressedSizeTooBig = errors.New(\"invalid input: compressed size too big\")\n\n\t// ErrBlockTooSmall is returned when a block is too small to be decoded.\n\t// Typically returned on invalid input.\n\tErrBlockTooSmall = errors.New(\"block too small\")\n\n\t// ErrUnexpectedBlockSize is returned when a block has unexpected size.\n\t// Typically returned on invalid input.\n\tErrUnexpectedBlockSize = errors.New(\"unexpected block size\")\n\n\t// ErrMagicMismatch is returned when a \"magic\" number isn't what is expected.\n\t// Typically this indicates wrong or corrupted input.\n\tErrMagicMismatch = errors.New(\"invalid input: magic number mismatch\")\n\n\t// ErrWindowSizeExceeded is returned when a reference exceeds the valid window size.\n\t// Typically this indicates wrong or corrupted input.\n\tErrWindowSizeExceeded = errors.New(\"window size exceeded\")\n\n\t// ErrWindowSizeTooSmall is returned when no window size is specified.\n\t// Typically this indicates wrong or corrupted input.\n\tErrWindowSizeTooSmall = errors.New(\"invalid input: window size was too small\")\n\n\t// ErrDecoderSizeExceeded is returned if decompressed size exceeds the configured limit.\n\tErrDecoderSizeExceeded = errors.New(\"decompressed size exceeds configured limit\")\n\n\t// ErrUnknownDictionary is returned if the dictionary ID is unknown.\n\tErrUnknownDictionary = errors.New(\"unknown dictionary\")\n\n\t// ErrFrameSizeExceeded is returned if the stated frame size is exceeded.\n\t// This is only returned if SingleSegment is specified on the frame.\n\tErrFrameSizeExceeded = errors.New(\"frame size exceeded\")\n\n\t// ErrFrameSizeMismatch is returned if the stated frame size does not match the expected size.\n\t// This is only returned if SingleSegment is specified on the frame.\n\tErrFrameSizeMismatch = errors.New(\"frame size does not match size on stream\")\n\n\t// ErrCRCMismatch is returned if CRC mismatches.\n\tErrCRCMismatch = errors.New(\"CRC check failed\")\n\n\t// ErrDecoderClosed will be returned if the Decoder was used after\n\t// Close has been called.\n\tErrDecoderClosed = errors.New(\"decoder used after Close\")\n\n\t// ErrEncoderClosed will be returned if the Encoder was used after\n\t// Close has been called.\n\tErrEncoderClosed = errors.New(\"encoder used after Close\")\n\n\t// ErrDecoderNilInput is returned when a nil Reader was provided\n\t// and an operation other than Reset/DecodeAll/Close was attempted.\n\tErrDecoderNilInput = errors.New(\"nil input provided as reader\")\n)\n\nfunc println(a ...any) {\n\tif debug || debugDecoder || debugEncoder {\n\t\tlog.Println(a...)\n\t}\n}\n\nfunc printf(format string, a ...any) {\n\tif debug || debugDecoder || debugEncoder {\n\t\tlog.Printf(format, a...)\n\t}\n}\n\nfunc load3232(b []byte, i int32) uint32 {\n\treturn le.Load32(b, i)\n}\n\nfunc load6432(b []byte, i int32) uint64 {\n\treturn le.Load64(b, i)\n}\n\ntype byter interface {\n\tBytes() []byte\n\tLen() int\n}\n\nvar _ byter = &bytes.Buffer{}\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/.gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\n*.test\n*.prof\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/.travis.yml",
    "content": "\narch:\n  - amd64\n  - ppc64le\nlanguage: go\n\nos:\n  - linux\n  - osx\n\ngo:\n  - 1.13.x\n  - 1.14.x\n  - 1.15.x\n  - master\n\nenv:\n  - GO111MODULE=off\n\nscript:\n  - diff <(gofmt -d .) <(printf \"\")\n  - go test -v -cpu=1,2,4 .\n  - go test -v -cpu=2 -race -short .\n\nmatrix:\n  allow_failures:\n    - go: 'master'\n  fast_finish: true \n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/GO_LICENSE",
    "content": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014 Klaus Post\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\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/README.md",
    "content": "pgzip\n=====\n\nGo parallel gzip compression/decompression. This is a fully gzip compatible drop in replacement for \"compress/gzip\".\n\nThis will split compression into blocks that are compressed in parallel. \nThis can be useful for compressing big amounts of data. The output is a standard gzip file.\n\nThe gzip decompression is modified so it decompresses ahead of the current reader. \nThis means that reads will be non-blocking if the decompressor can keep ahead of your code reading from it. \nCRC calculation also takes place in a separate goroutine.\n\nYou should only use this if you are (de)compressing big amounts of data, \nsay **more than 1MB** at the time, otherwise you will not see any benefit, \nand it will likely be faster to use the internal gzip library \nor [this package](https://github.com/klauspost/compress).\n\nIt is important to note that this library creates and reads *standard gzip files*. \nYou do not have to match the compressor/decompressor to get the described speedups, \nand the gzip files are fully compatible with other gzip readers/writers.\n\nA golang variant of this is [bgzf](https://godoc.org/github.com/biogo/hts/bgzf), \nwhich has the same feature, as well as seeking in the resulting file. \nThe only drawback is a slightly bigger overhead compared to this and pure gzip. \nSee a comparison below.\n\n[![GoDoc][1]][2] [![Build Status][3]][4]\n\n[1]: https://godoc.org/github.com/klauspost/pgzip?status.svg\n[2]: https://godoc.org/github.com/klauspost/pgzip\n[3]: https://travis-ci.org/klauspost/pgzip.svg\n[4]: https://travis-ci.org/klauspost/pgzip\n\nInstallation\n====\n```go get github.com/klauspost/pgzip/...```\n\nYou might need to get/update the dependencies:\n\n```\ngo get -u github.com/klauspost/compress\n```\n\nUsage\n====\n[Godoc Doumentation](https://godoc.org/github.com/klauspost/pgzip)\n\nTo use as a replacement for gzip, exchange \n\n```import \"compress/gzip\"``` \nwith \n```import gzip \"github.com/klauspost/pgzip\"```.\n\n# Changes\n\n* Oct 6, 2016: Fixed an issue if the destination writer returned an error.\n* Oct 6, 2016: Better buffer reuse, should now generate less garbage.\n* Oct 6, 2016: Output does not change based on write sizes.\n* Dec 8, 2015: Decoder now supports the io.WriterTo interface, giving a speedup and less GC pressure.\n* Oct 9, 2015: Reduced allocations by ~35 by using sync.Pool. ~15% overall speedup.\n\nChanges in [github.com/klauspost/compress](https://github.com/klauspost/compress#changelog) are also carried over, so see that for more changes.\n\n## Compression\nThe simplest way to use this is to simply do the same as you would when using [compress/gzip](http://golang.org/pkg/compress/gzip). \n\nTo change the block size, use the added (*pgzip.Writer).SetConcurrency(blockSize, blocks int) function. With this you can control the approximate size of your blocks, as well as how many you want to be processing in parallel. Default values for this is SetConcurrency(1MB, runtime.GOMAXPROCS(0)), meaning blocks are split at 1 MB and up to the number of CPU threads blocks can be processing at once before the writer blocks.\n\n\nExample:\n```\nvar b bytes.Buffer\nw := gzip.NewWriter(&b)\nw.SetConcurrency(100000, 10)\nw.Write([]byte(\"hello, world\\n\"))\nw.Close()\n```\n\nTo get any performance gains, you should at least be compressing more than 1 megabyte of data at the time.\n\nYou should at least have a block size of 100k and at least a number of blocks that match the number of cores your would like to utilize, but about twice the number of blocks would be the best.\n\nAnother side effect of this is, that it is likely to speed up your other code, since writes to the compressor only blocks if the compressor is already compressing the number of blocks you have specified. This also means you don't have worry about buffering input to the compressor.\n\n## Decompression\n\nDecompression works similar to compression. That means that you simply call pgzip the same way as you would call [compress/gzip](http://golang.org/pkg/compress/gzip). \n\nThe only difference is that if you want to specify your own readahead, you have to use `pgzip.NewReaderN(r io.Reader, blockSize, blocks int)` to get a reader with your custom blocksizes. The `blockSize` is the size of each block decoded, and `blocks` is the maximum number of blocks that is decoded ahead.\n\nSee [Example on playground](http://play.golang.org/p/uHv1B5NbDh)\n\nPerformance\n====\n## Compression\n\nSee my blog post in [Benchmarks of Golang Gzip](https://blog.klauspost.com/go-gzipdeflate-benchmarks/).\n\nCompression cost is usually about 0.2% with default settings with a block size of 250k.\n\nExample with GOMAXPROC set to 32 (16 core CPU)\n\nContent is [Matt Mahoneys 10GB corpus](http://mattmahoney.net/dc/10gb.html). Compression level 6.\n\nCompressor  | MB/sec   | speedup | size | size overhead (lower=better)\n------------|----------|---------|------|---------\n[gzip](http://golang.org/pkg/compress/gzip) (golang) | 16.91MB/s (1 thread) | 1.0x | 4781329307 | 0%\n[gzip](http://github.com/klauspost/compress/gzip) (klauspost) | 127.10MB/s (1 thread) | 7.52x | 4885366806 | +2.17%\n[pgzip](https://github.com/klauspost/pgzip) (klauspost) | 2085.35MB/s|  123.34x | 4886132566 | +2.19%\n[pargzip](https://godoc.org/github.com/golang/build/pargzip) (builder) | 334.04MB/s | 19.76x | 4786890417 | +0.12%\n\npgzip also contains a [huffman only compression](https://github.com/klauspost/compress#linear-time-compression-huffman-only) mode, that will allow compression at ~450MB per core per second, largely independent of the content.\n\nSee the [complete sheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing) for different content types and compression settings.\n\n## Decompression\n\nThe decompression speedup is there because it allows you to do other work while the decompression is taking place.\n\nIn the example above, the numbers are as follows on a 4 CPU machine:\n\nDecompressor | Time | Speedup\n-------------|------|--------\n[gzip](http://golang.org/pkg/compress/gzip) (golang) | 1m28.85s | 0%\n[pgzip](https://github.com/klauspost/pgzip) (klauspost) | 43.48s | 104%\n\nBut wait, since gzip decompression is inherently singlethreaded (aside from CRC calculation) how can it be more than 100% faster?  Because pgzip due to its design also acts as a buffer. When using unbuffered gzip, you are also waiting for io when you are decompressing. If the gzip decoder can keep up, it will always have data ready for your reader, and you will not be waiting for input to the gzip decompressor to complete.\n\nThis is pretty much an optimal situation for pgzip, but it reflects most common usecases for CPU intensive gzip usage.\n\nI haven't included [bgzf](https://godoc.org/github.com/biogo/hts/bgzf) in this comparison, since it only can decompress files created by a compatible encoder, and therefore cannot be considered a generic gzip decompressor. But if you are able to compress your files with a bgzf compatible program, you can expect it to scale beyond 100%.\n\n# License\nThis contains large portions of code from the go repository - see GO_LICENSE for more information. The changes are released under MIT License. See LICENSE for more information.\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/gunzip.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package pgzip implements reading and writing of gzip format compressed files,\n// as specified in RFC 1952.\n//\n// This is a drop in replacement for \"compress/gzip\".\n// This will split compression into blocks that are compressed in parallel.\n// This can be useful for compressing big amounts of data.\n// The gzip decompression has not been modified, but remains in the package,\n// so you can use it as a complete replacement for \"compress/gzip\".\n//\n// See more at https://github.com/klauspost/pgzip\npackage pgzip\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"hash\"\n\t\"hash/crc32\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/klauspost/compress/flate\"\n)\n\nconst (\n\tgzipID1     = 0x1f\n\tgzipID2     = 0x8b\n\tgzipDeflate = 8\n\tflagText    = 1 << 0\n\tflagHdrCrc  = 1 << 1\n\tflagExtra   = 1 << 2\n\tflagName    = 1 << 3\n\tflagComment = 1 << 4\n)\n\nfunc makeReader(r io.Reader) flate.Reader {\n\tif rr, ok := r.(flate.Reader); ok {\n\t\treturn rr\n\t}\n\treturn bufio.NewReader(r)\n}\n\nvar (\n\t// ErrChecksum is returned when reading GZIP data that has an invalid checksum.\n\tErrChecksum = errors.New(\"gzip: invalid checksum\")\n\t// ErrHeader is returned when reading GZIP data that has an invalid header.\n\tErrHeader = errors.New(\"gzip: invalid header\")\n)\n\n// The gzip file stores a header giving metadata about the compressed file.\n// That header is exposed as the fields of the Writer and Reader structs.\ntype Header struct {\n\tComment string    // comment\n\tExtra   []byte    // \"extra data\"\n\tModTime time.Time // modification time\n\tName    string    // file name\n\tOS      byte      // operating system type\n}\n\n// A Reader is an io.Reader that can be read to retrieve\n// uncompressed data from a gzip-format compressed file.\n//\n// In general, a gzip file can be a concatenation of gzip files,\n// each with its own header.  Reads from the Reader\n// return the concatenation of the uncompressed data of each.\n// Only the first header is recorded in the Reader fields.\n//\n// Gzip files store a length and checksum of the uncompressed data.\n// The Reader will return a ErrChecksum when Read\n// reaches the end of the uncompressed data if it does not\n// have the expected length or checksum.  Clients should treat data\n// returned by Read as tentative until they receive the io.EOF\n// marking the end of the data.\ntype Reader struct {\n\tHeader\n\tr            flate.Reader\n\tdecompressor io.ReadCloser\n\tdigest       hash.Hash32\n\tsize         uint32\n\tflg          byte\n\tbuf          [512]byte\n\terr          error\n\tcloseErr     chan error\n\tmultistream  bool\n\n\treadAhead   chan read\n\troff        int // read offset\n\tcurrent     []byte\n\tcloseReader chan struct{}\n\tlastBlock   bool\n\tblockSize   int\n\tblocks      int\n\n\tactiveRA bool       // Indication if readahead is active\n\tmu       sync.Mutex // Lock for above\n\n\tblockPool chan []byte\n}\n\ntype read struct {\n\tb   []byte\n\terr error\n}\n\n// NewReader creates a new Reader reading the given reader.\n// The implementation buffers input and may read more data than necessary from r.\n// It is the caller's responsibility to call Close on the Reader when done.\nfunc NewReader(r io.Reader) (*Reader, error) {\n\tz := new(Reader)\n\tz.blocks = defaultBlocks\n\tz.blockSize = defaultBlockSize\n\tz.r = makeReader(r)\n\tz.digest = crc32.NewIEEE()\n\tz.multistream = true\n\tz.blockPool = make(chan []byte, z.blocks)\n\tfor i := 0; i < z.blocks; i++ {\n\t\tz.blockPool <- make([]byte, z.blockSize)\n\t}\n\tif err := z.readHeader(true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn z, nil\n}\n\n// NewReaderN creates a new Reader reading the given reader.\n// The implementation buffers input and may read more data than necessary from r.\n// It is the caller's responsibility to call Close on the Reader when done.\n//\n// With this you can control the approximate size of your blocks,\n// as well as how many blocks you want to have prefetched.\n//\n// Default values for this is blockSize = 250000, blocks = 16,\n// meaning up to 16 blocks of maximum 250000 bytes will be\n// prefetched.\nfunc NewReaderN(r io.Reader, blockSize, blocks int) (*Reader, error) {\n\tz := new(Reader)\n\tz.blocks = blocks\n\tz.blockSize = blockSize\n\tz.r = makeReader(r)\n\tz.digest = crc32.NewIEEE()\n\tz.multistream = true\n\n\t// Account for too small values\n\tif z.blocks <= 0 {\n\t\tz.blocks = defaultBlocks\n\t}\n\tif z.blockSize <= 512 {\n\t\tz.blockSize = defaultBlockSize\n\t}\n\tz.blockPool = make(chan []byte, z.blocks)\n\tfor i := 0; i < z.blocks; i++ {\n\t\tz.blockPool <- make([]byte, z.blockSize)\n\t}\n\tif err := z.readHeader(true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn z, nil\n}\n\n// Reset discards the Reader z's state and makes it equivalent to the\n// result of its original state from NewReader, but reading from r instead.\n// This permits reusing a Reader rather than allocating a new one.\nfunc (z *Reader) Reset(r io.Reader) error {\n\tz.killReadAhead()\n\tz.r = makeReader(r)\n\tz.digest = crc32.NewIEEE()\n\tz.size = 0\n\tz.err = nil\n\tz.multistream = true\n\n\t// Account for uninitialized values\n\tif z.blocks <= 0 {\n\t\tz.blocks = defaultBlocks\n\t}\n\tif z.blockSize <= 512 {\n\t\tz.blockSize = defaultBlockSize\n\t}\n\n\tif z.blockPool == nil {\n\t\tz.blockPool = make(chan []byte, z.blocks)\n\t\tfor i := 0; i < z.blocks; i++ {\n\t\t\tz.blockPool <- make([]byte, z.blockSize)\n\t\t}\n\t}\n\n\treturn z.readHeader(true)\n}\n\n// Multistream controls whether the reader supports multistream files.\n//\n// If enabled (the default), the Reader expects the input to be a sequence\n// of individually gzipped data streams, each with its own header and\n// trailer, ending at EOF. The effect is that the concatenation of a sequence\n// of gzipped files is treated as equivalent to the gzip of the concatenation\n// of the sequence. This is standard behavior for gzip readers.\n//\n// Calling Multistream(false) disables this behavior; disabling the behavior\n// can be useful when reading file formats that distinguish individual gzip\n// data streams or mix gzip data streams with other data streams.\n// In this mode, when the Reader reaches the end of the data stream,\n// Read returns io.EOF. If the underlying reader implements io.ByteReader,\n// it will be left positioned just after the gzip stream.\n// To start the next stream, call z.Reset(r) followed by z.Multistream(false).\n// If there is no next stream, z.Reset(r) will return io.EOF.\nfunc (z *Reader) Multistream(ok bool) {\n\tz.multistream = ok\n}\n\n// GZIP (RFC 1952) is little-endian, unlike ZLIB (RFC 1950).\nfunc get4(p []byte) uint32 {\n\treturn uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | uint32(p[3])<<24\n}\n\nfunc (z *Reader) readString() (string, error) {\n\tvar err error\n\tneedconv := false\n\tfor i := 0; ; i++ {\n\t\tif i >= len(z.buf) {\n\t\t\treturn \"\", ErrHeader\n\t\t}\n\t\tz.buf[i], err = z.r.ReadByte()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif z.buf[i] > 0x7f {\n\t\t\tneedconv = true\n\t\t}\n\t\tif z.buf[i] == 0 {\n\t\t\t// GZIP (RFC 1952) specifies that strings are NUL-terminated ISO 8859-1 (Latin-1).\n\t\t\tif needconv {\n\t\t\t\ts := make([]rune, 0, i)\n\t\t\t\tfor _, v := range z.buf[0:i] {\n\t\t\t\t\ts = append(s, rune(v))\n\t\t\t\t}\n\t\t\t\treturn string(s), nil\n\t\t\t}\n\t\t\treturn string(z.buf[0:i]), nil\n\t\t}\n\t}\n}\n\nfunc (z *Reader) read2() (uint32, error) {\n\t_, err := io.ReadFull(z.r, z.buf[0:2])\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint32(z.buf[0]) | uint32(z.buf[1])<<8, nil\n}\n\nfunc (z *Reader) readHeader(save bool) error {\n\tz.killReadAhead()\n\n\t_, err := io.ReadFull(z.r, z.buf[0:10])\n\tif err != nil {\n\t\treturn err\n\t}\n\tif z.buf[0] != gzipID1 || z.buf[1] != gzipID2 || z.buf[2] != gzipDeflate {\n\t\treturn ErrHeader\n\t}\n\tz.flg = z.buf[3]\n\tif save {\n\t\tz.ModTime = time.Unix(int64(get4(z.buf[4:8])), 0)\n\t\t// z.buf[8] is xfl, ignored\n\t\tz.OS = z.buf[9]\n\t}\n\tz.digest.Reset()\n\tz.digest.Write(z.buf[0:10])\n\n\tif z.flg&flagExtra != 0 {\n\t\tn, err := z.read2()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdata := make([]byte, n)\n\t\tif _, err = io.ReadFull(z.r, data); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif save {\n\t\t\tz.Extra = data\n\t\t}\n\t}\n\n\tvar s string\n\tif z.flg&flagName != 0 {\n\t\tif s, err = z.readString(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif save {\n\t\t\tz.Name = s\n\t\t}\n\t}\n\n\tif z.flg&flagComment != 0 {\n\t\tif s, err = z.readString(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif save {\n\t\t\tz.Comment = s\n\t\t}\n\t}\n\n\tif z.flg&flagHdrCrc != 0 {\n\t\tn, err := z.read2()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsum := z.digest.Sum32() & 0xFFFF\n\t\tif n != sum {\n\t\t\treturn ErrHeader\n\t\t}\n\t}\n\n\tz.digest.Reset()\n\tz.decompressor = flate.NewReader(z.r)\n\tz.doReadAhead()\n\treturn nil\n}\n\nfunc (z *Reader) killReadAhead() error {\n\tz.mu.Lock()\n\tdefer z.mu.Unlock()\n\tif z.activeRA {\n\t\tif z.closeReader != nil {\n\t\t\tclose(z.closeReader)\n\t\t}\n\n\t\t// Wait for decompressor to be closed and return error, if any.\n\t\te, ok := <-z.closeErr\n\t\tz.activeRA = false\n\n\t\tfor blk := range z.readAhead {\n\t\t\tif blk.b != nil {\n\t\t\t\tz.blockPool <- blk.b\n\t\t\t}\n\t\t}\n\t\tif cap(z.current) > 0 {\n\t\t\tz.blockPool <- z.current\n\t\t\tz.current = nil\n\t\t}\n\t\tif !ok {\n\t\t\t// Channel is closed, so if there was any error it has already been returned.\n\t\t\treturn nil\n\t\t}\n\t\treturn e\n\t}\n\treturn nil\n}\n\n// Starts readahead.\n// Will return on error (including io.EOF)\n// or when z.closeReader is closed.\nfunc (z *Reader) doReadAhead() {\n\tz.mu.Lock()\n\tdefer z.mu.Unlock()\n\tz.activeRA = true\n\n\tif z.blocks <= 0 {\n\t\tz.blocks = defaultBlocks\n\t}\n\tif z.blockSize <= 512 {\n\t\tz.blockSize = defaultBlockSize\n\t}\n\tra := make(chan read, z.blocks)\n\tz.readAhead = ra\n\tcloseReader := make(chan struct{}, 0)\n\tz.closeReader = closeReader\n\tz.lastBlock = false\n\tcloseErr := make(chan error, 1)\n\tz.closeErr = closeErr\n\tz.size = 0\n\tz.roff = 0\n\tz.current = nil\n\tdecomp := z.decompressor\n\n\tgo func() {\n\t\tdefer func() {\n\t\t\tcloseErr <- decomp.Close()\n\t\t\tclose(closeErr)\n\t\t\tclose(ra)\n\t\t}()\n\n\t\t// We hold a local reference to digest, since\n\t\t// it way be changed by reset.\n\t\tdigest := z.digest\n\t\tvar wg sync.WaitGroup\n\t\tfor {\n\t\t\tvar buf []byte\n\t\t\tselect {\n\t\t\tcase buf = <-z.blockPool:\n\t\t\tcase <-closeReader:\n\t\t\t\treturn\n\t\t\t}\n\t\t\tbuf = buf[0:z.blockSize]\n\t\t\t// Try to fill the buffer\n\t\t\tn, err := io.ReadFull(decomp, buf)\n\t\t\tif err == io.ErrUnexpectedEOF {\n\t\t\t\tif n > 0 {\n\t\t\t\t\terr = nil\n\t\t\t\t} else {\n\t\t\t\t\t// If we got zero bytes, we need to establish if\n\t\t\t\t\t// we reached end of stream or truncated stream.\n\t\t\t\t\t_, err = decomp.Read([]byte{})\n\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\terr = nil\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif n < len(buf) {\n\t\t\t\tbuf = buf[0:n]\n\t\t\t}\n\t\t\twg.Wait()\n\t\t\twg.Add(1)\n\t\t\tgo func() {\n\t\t\t\tdigest.Write(buf)\n\t\t\t\twg.Done()\n\t\t\t}()\n\t\t\tz.size += uint32(n)\n\n\t\t\t// If we return any error, out digest must be ready\n\t\t\tif err != nil {\n\t\t\t\twg.Wait()\n\t\t\t}\n\t\t\tselect {\n\t\t\tcase z.readAhead <- read{b: buf, err: err}:\n\t\t\tcase <-closeReader:\n\t\t\t\t// Sent on close, we don't care about the next results\n\t\t\t\tz.blockPool <- buf\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n}\n\nfunc (z *Reader) Read(p []byte) (n int, err error) {\n\tif z.err != nil {\n\t\treturn 0, z.err\n\t}\n\tif len(p) == 0 {\n\t\treturn 0, nil\n\t}\n\n\tfor {\n\t\tif len(z.current) == 0 && !z.lastBlock {\n\t\t\tread := <-z.readAhead\n\n\t\t\tif read.err != nil {\n\t\t\t\t// If not nil, the reader will have exited\n\t\t\t\tz.closeReader = nil\n\n\t\t\t\tif read.err != io.EOF {\n\t\t\t\t\tz.err = read.err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif read.err == io.EOF {\n\t\t\t\t\tz.lastBlock = true\n\t\t\t\t\terr = nil\n\t\t\t\t}\n\t\t\t}\n\t\t\tz.current = read.b\n\t\t\tz.roff = 0\n\t\t}\n\t\tavail := z.current[z.roff:]\n\t\tif len(p) >= len(avail) {\n\t\t\t// If len(p) >= len(current), return all content of current\n\t\t\tn = copy(p, avail)\n\t\t\tz.blockPool <- z.current\n\t\t\tz.current = nil\n\t\t\tif z.lastBlock {\n\t\t\t\terr = io.EOF\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\t// We copy as much as there is space for\n\t\t\tn = copy(p, avail)\n\t\t\tz.roff += n\n\t\t}\n\t\treturn\n\t}\n\n\t// Finished file; check checksum + size.\n\tif _, err := io.ReadFull(z.r, z.buf[0:8]); err != nil {\n\t\tz.err = err\n\t\treturn 0, err\n\t}\n\tcrc32, isize := get4(z.buf[0:4]), get4(z.buf[4:8])\n\tsum := z.digest.Sum32()\n\tif sum != crc32 || isize != z.size {\n\t\tz.err = ErrChecksum\n\t\treturn 0, z.err\n\t}\n\n\t// File is ok; should we attempt reading one more?\n\tif !z.multistream {\n\t\treturn 0, io.EOF\n\t}\n\n\t// Is there another?\n\tif err = z.readHeader(false); err != nil {\n\t\tz.err = err\n\t\treturn\n\t}\n\n\t// Yes.  Reset and read from it.\n\treturn z.Read(p)\n}\n\nfunc (z *Reader) WriteTo(w io.Writer) (n int64, err error) {\n\ttotal := int64(0)\n\tavail := z.current[z.roff:]\n\tif len(avail) != 0 {\n\t\tn, err := w.Write(avail)\n\t\tif n != len(avail) {\n\t\t\treturn total, io.ErrShortWrite\n\t\t}\n\t\ttotal += int64(n)\n\t\tif err != nil {\n\t\t\treturn total, err\n\t\t}\n\t\tz.blockPool <- z.current\n\t\tz.current = nil\n\t}\n\tfor {\n\t\tif z.err != nil {\n\t\t\treturn total, z.err\n\t\t}\n\t\t// We write both to output and digest.\n\t\tfor {\n\t\t\t// Read from input\n\t\t\tread := <-z.readAhead\n\t\t\tif read.err != nil {\n\t\t\t\t// If not nil, the reader will have exited\n\t\t\t\tz.closeReader = nil\n\n\t\t\t\tif read.err != io.EOF {\n\t\t\t\t\tz.err = read.err\n\t\t\t\t\treturn total, z.err\n\t\t\t\t}\n\t\t\t\tif read.err == io.EOF {\n\t\t\t\t\tz.lastBlock = true\n\t\t\t\t\terr = nil\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Write what we got\n\t\t\tn, err := w.Write(read.b)\n\t\t\tif n != len(read.b) {\n\t\t\t\treturn total, io.ErrShortWrite\n\t\t\t}\n\t\t\ttotal += int64(n)\n\t\t\tif err != nil {\n\t\t\t\treturn total, err\n\t\t\t}\n\t\t\t// Put block back\n\t\t\tz.blockPool <- read.b\n\t\t\tif z.lastBlock {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Finished file; check checksum + size.\n\t\tif _, err := io.ReadFull(z.r, z.buf[0:8]); err != nil {\n\t\t\tz.err = err\n\t\t\treturn total, err\n\t\t}\n\t\tcrc32, isize := get4(z.buf[0:4]), get4(z.buf[4:8])\n\t\tsum := z.digest.Sum32()\n\t\tif sum != crc32 || isize != z.size {\n\t\t\tz.err = ErrChecksum\n\t\t\treturn total, z.err\n\t\t}\n\t\t// File is ok; should we attempt reading one more?\n\t\tif !z.multistream {\n\t\t\treturn total, nil\n\t\t}\n\n\t\t// Is there another?\n\t\terr = z.readHeader(false)\n\t\tif err == io.EOF {\n\t\t\treturn total, nil\n\t\t}\n\t\tif err != nil {\n\t\t\tz.err = err\n\t\t\treturn total, err\n\t\t}\n\t}\n}\n\n// Close closes the Reader. It does not close the underlying io.Reader.\nfunc (z *Reader) Close() error {\n\treturn z.killReadAhead()\n}\n"
  },
  {
    "path": "vendor/github.com/klauspost/pgzip/gzip.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage pgzip\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"hash/crc32\"\n\t\"io\"\n\t\"runtime\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/klauspost/compress/flate\"\n)\n\nconst (\n\tdefaultBlockSize = 1 << 20\n\ttailSize         = 16384\n\tdefaultBlocks    = 4\n)\n\n// These constants are copied from the flate package, so that code that imports\n// \"compress/gzip\" does not also have to import \"compress/flate\".\nconst (\n\tNoCompression       = flate.NoCompression\n\tBestSpeed           = flate.BestSpeed\n\tBestCompression     = flate.BestCompression\n\tDefaultCompression  = flate.DefaultCompression\n\tConstantCompression = flate.ConstantCompression\n\tHuffmanOnly         = flate.HuffmanOnly\n)\n\n// A Writer is an io.WriteCloser.\n// Writes to a Writer are compressed and written to w.\ntype Writer struct {\n\tHeader\n\tw             io.Writer\n\tlevel         int\n\twroteHeader   bool\n\tblockSize     int\n\tblocks        int\n\tcurrentBuffer []byte\n\tprevTail      []byte\n\tdigest        hash.Hash32\n\tsize          int\n\tclosed        bool\n\tbuf           [10]byte\n\terrMu         sync.RWMutex\n\terr           error\n\tpushedErr     chan struct{}\n\tresults       chan result\n\tdictFlatePool sync.Pool\n\tdstPool       sync.Pool\n\twg            sync.WaitGroup\n}\n\ntype result struct {\n\tresult        chan []byte\n\tnotifyWritten chan struct{}\n}\n\n// Use SetConcurrency to finetune the concurrency level if needed.\n//\n// With this you can control the approximate size of your blocks,\n// as well as how many you want to be processing in parallel.\n//\n// Default values for this is SetConcurrency(defaultBlockSize, runtime.GOMAXPROCS(0)),\n// meaning blocks are split at 1 MB and up to the number of CPU threads\n// can be processing at once before the writer blocks.\nfunc (z *Writer) SetConcurrency(blockSize, blocks int) error {\n\tif blockSize <= tailSize {\n\t\treturn fmt.Errorf(\"gzip: block size cannot be less than or equal to %d\", tailSize)\n\t}\n\tif blocks <= 0 {\n\t\treturn errors.New(\"gzip: blocks cannot be zero or less\")\n\t}\n\tif blockSize == z.blockSize && blocks == z.blocks {\n\t\treturn nil\n\t}\n\tz.blockSize = blockSize\n\tz.results = make(chan result, blocks)\n\tz.blocks = blocks\n\tz.dstPool.New = func() interface{} { return make([]byte, 0, blockSize+(blockSize)>>4) }\n\treturn nil\n}\n\n// NewWriter returns a new Writer.\n// Writes to the returned writer are compressed and written to w.\n//\n// It is the caller's responsibility to call Close on the WriteCloser when done.\n// Writes may be buffered and not flushed until Close.\n//\n// Callers that wish to set the fields in Writer.Header must do so before\n// the first call to Write or Close. The Comment and Name header fields are\n// UTF-8 strings in Go, but the underlying format requires NUL-terminated ISO\n// 8859-1 (Latin-1). NUL or non-Latin-1 runes in those strings will lead to an\n// error on Write.\nfunc NewWriter(w io.Writer) *Writer {\n\tz, _ := NewWriterLevel(w, DefaultCompression)\n\treturn z\n}\n\n// NewWriterLevel is like NewWriter but specifies the compression level instead\n// of assuming DefaultCompression.\n//\n// The compression level can be DefaultCompression, NoCompression, or any\n// integer value between BestSpeed and BestCompression inclusive. The error\n// returned will be nil if the level is valid.\nfunc NewWriterLevel(w io.Writer, level int) (*Writer, error) {\n\tif level < ConstantCompression || level > BestCompression {\n\t\treturn nil, fmt.Errorf(\"gzip: invalid compression level: %d\", level)\n\t}\n\tz := new(Writer)\n\tz.SetConcurrency(defaultBlockSize, runtime.GOMAXPROCS(0))\n\tz.init(w, level)\n\treturn z, nil\n}\n\n// This function must be used by goroutines to set an\n// error condition, since z.err access is restricted\n// to the callers goruotine.\nfunc (z *Writer) pushError(err error) {\n\tz.errMu.Lock()\n\tif z.err != nil {\n\t\tz.errMu.Unlock()\n\t\treturn\n\t}\n\tz.err = err\n\tclose(z.pushedErr)\n\tz.errMu.Unlock()\n}\n\nfunc (z *Writer) init(w io.Writer, level int) {\n\tz.wg.Wait()\n\tdigest := z.digest\n\tif digest != nil {\n\t\tdigest.Reset()\n\t} else {\n\t\tdigest = crc32.NewIEEE()\n\t}\n\tz.Header = Header{OS: 255}\n\tz.w = w\n\tz.level = level\n\tz.digest = digest\n\tz.pushedErr = make(chan struct{}, 0)\n\tz.results = make(chan result, z.blocks)\n\tz.err = nil\n\tz.closed = false\n\tz.Comment = \"\"\n\tz.Extra = nil\n\tz.ModTime = time.Time{}\n\tz.wroteHeader = false\n\tz.currentBuffer = nil\n\tz.buf = [10]byte{}\n\tz.prevTail = nil\n\tz.size = 0\n\tif z.dictFlatePool.New == nil {\n\t\tz.dictFlatePool.New = func() interface{} {\n\t\t\tf, _ := flate.NewWriterDict(w, level, nil)\n\t\t\treturn f\n\t\t}\n\t}\n}\n\n// Reset discards the Writer z's state and makes it equivalent to the\n// result of its original state from NewWriter or NewWriterLevel, but\n// writing to w instead. This permits reusing a Writer rather than\n// allocating a new one.\nfunc (z *Writer) Reset(w io.Writer) {\n\tif z.results != nil && !z.closed {\n\t\tclose(z.results)\n\t}\n\tz.SetConcurrency(defaultBlockSize, runtime.GOMAXPROCS(0))\n\tz.init(w, z.level)\n}\n\n// GZIP (RFC 1952) is little-endian, unlike ZLIB (RFC 1950).\nfunc put2(p []byte, v uint16) {\n\tp[0] = uint8(v >> 0)\n\tp[1] = uint8(v >> 8)\n}\n\nfunc put4(p []byte, v uint32) {\n\tp[0] = uint8(v >> 0)\n\tp[1] = uint8(v >> 8)\n\tp[2] = uint8(v >> 16)\n\tp[3] = uint8(v >> 24)\n}\n\n// writeBytes writes a length-prefixed byte slice to z.w.\nfunc (z *Writer) writeBytes(b []byte) error {\n\tif len(b) > 0xffff {\n\t\treturn errors.New(\"gzip.Write: Extra data is too large\")\n\t}\n\tput2(z.buf[0:2], uint16(len(b)))\n\t_, err := z.w.Write(z.buf[0:2])\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = z.w.Write(b)\n\treturn err\n}\n\n// writeString writes a UTF-8 string s in GZIP's format to z.w.\n// GZIP (RFC 1952) specifies that strings are NUL-terminated ISO 8859-1 (Latin-1).\nfunc (z *Writer) writeString(s string) (err error) {\n\t// GZIP stores Latin-1 strings; error if non-Latin-1; convert if non-ASCII.\n\tneedconv := false\n\tfor _, v := range s {\n\t\tif v == 0 || v > 0xff {\n\t\t\treturn errors.New(\"gzip.Write: non-Latin-1 header string\")\n\t\t}\n\t\tif v > 0x7f {\n\t\t\tneedconv = true\n\t\t}\n\t}\n\tif needconv {\n\t\tb := make([]byte, 0, len(s))\n\t\tfor _, v := range s {\n\t\t\tb = append(b, byte(v))\n\t\t}\n\t\t_, err = z.w.Write(b)\n\t} else {\n\t\t_, err = io.WriteString(z.w, s)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\t// GZIP strings are NUL-terminated.\n\tz.buf[0] = 0\n\t_, err = z.w.Write(z.buf[0:1])\n\treturn err\n}\n\n// compressCurrent will compress the data currently buffered\n// This should only be called from the main writer/flush/closer\nfunc (z *Writer) compressCurrent(flush bool) {\n\tc := z.currentBuffer\n\tif len(c) > z.blockSize {\n\t\t// This can never happen through the public interface.\n\t\tpanic(\"len(z.currentBuffer) > z.blockSize (most likely due to concurrent Write race)\")\n\t}\n\n\tr := result{}\n\tr.result = make(chan []byte, 1)\n\tr.notifyWritten = make(chan struct{}, 0)\n\t// Reserve a result slot\n\tselect {\n\tcase z.results <- r:\n\tcase <-z.pushedErr:\n\t\treturn\n\t}\n\n\tz.wg.Add(1)\n\ttail := z.prevTail\n\tif len(c) > tailSize {\n\t\tbuf := z.dstPool.Get().([]byte) // Put in .compressBlock\n\t\t// Copy tail from current buffer before handing the buffer over to the\n\t\t// compressBlock goroutine.\n\t\tbuf = append(buf[:0], c[len(c)-tailSize:]...)\n\t\tz.prevTail = buf\n\t} else {\n\t\tz.prevTail = nil\n\t}\n\tgo z.compressBlock(c, tail, r, z.closed)\n\n\tz.currentBuffer = z.dstPool.Get().([]byte) // Put in .compressBlock\n\tz.currentBuffer = z.currentBuffer[:0]\n\n\t// Wait if flushing\n\tif flush {\n\t\t<-r.notifyWritten\n\t}\n}\n\n// Returns an error if it has been set.\n// Cannot be used by functions that are from internal goroutines.\nfunc (z *Writer) checkError() error {\n\tz.errMu.RLock()\n\terr := z.err\n\tz.errMu.RUnlock()\n\treturn err\n}\n\n// Write writes a compressed form of p to the underlying io.Writer. The\n// compressed bytes are not necessarily flushed to output until\n// the Writer is closed or Flush() is called.\n//\n// The function will return quickly, if there are unused buffers.\n// The sent slice (p) is copied, and the caller is free to re-use the buffer\n// when the function returns.\n//\n// Errors that occur during compression will be reported later, and a nil error\n// does not signify that the compression succeeded (since it is most likely still running)\n// That means that the call that returns an error may not be the call that caused it.\n// Only Flush and Close functions are guaranteed to return any errors up to that point.\nfunc (z *Writer) Write(p []byte) (int, error) {\n\tif err := z.checkError(); err != nil {\n\t\treturn 0, err\n\t}\n\t// Write the GZIP header lazily.\n\tif !z.wroteHeader {\n\t\tz.wroteHeader = true\n\t\tz.buf[0] = gzipID1\n\t\tz.buf[1] = gzipID2\n\t\tz.buf[2] = gzipDeflate\n\t\tz.buf[3] = 0\n\t\tif z.Extra != nil {\n\t\t\tz.buf[3] |= 0x04\n\t\t}\n\t\tif z.Name != \"\" {\n\t\t\tz.buf[3] |= 0x08\n\t\t}\n\t\tif z.Comment != \"\" {\n\t\t\tz.buf[3] |= 0x10\n\t\t}\n\t\tput4(z.buf[4:8], uint32(z.ModTime.Unix()))\n\t\tif z.level == BestCompression {\n\t\t\tz.buf[8] = 2\n\t\t} else if z.level == BestSpeed {\n\t\t\tz.buf[8] = 4\n\t\t} else {\n\t\t\tz.buf[8] = 0\n\t\t}\n\t\tz.buf[9] = z.OS\n\t\tvar n int\n\t\tvar err error\n\t\tn, err = z.w.Write(z.buf[0:10])\n\t\tif err != nil {\n\t\t\tz.pushError(err)\n\t\t\treturn n, err\n\t\t}\n\t\tif z.Extra != nil {\n\t\t\terr = z.writeBytes(z.Extra)\n\t\t\tif err != nil {\n\t\t\t\tz.pushError(err)\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t\tif z.Name != \"\" {\n\t\t\terr = z.writeString(z.Name)\n\t\t\tif err != nil {\n\t\t\t\tz.pushError(err)\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t\tif z.Comment != \"\" {\n\t\t\terr = z.writeString(z.Comment)\n\t\t\tif err != nil {\n\t\t\t\tz.pushError(err)\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t\t// Start receiving data from compressors\n\t\tgo func() {\n\t\t\tlisten := z.results\n\t\t\tvar failed bool\n\t\t\tfor {\n\t\t\t\tr, ok := <-listen\n\t\t\t\t// If closed, we are finished.\n\t\t\t\tif !ok {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif failed {\n\t\t\t\t\tclose(r.notifyWritten)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tbuf := <-r.result\n\t\t\t\tn, err := z.w.Write(buf)\n\t\t\t\tif err != nil {\n\t\t\t\t\tz.pushError(err)\n\t\t\t\t\tclose(r.notifyWritten)\n\t\t\t\t\tfailed = true\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif n != len(buf) {\n\t\t\t\t\tz.pushError(fmt.Errorf(\"gzip: short write %d should be %d\", n, len(buf)))\n\t\t\t\t\tfailed = true\n\t\t\t\t\tclose(r.notifyWritten)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tz.dstPool.Put(buf)\n\t\t\t\tclose(r.notifyWritten)\n\t\t\t}\n\t\t}()\n\t\tz.currentBuffer = z.dstPool.Get().([]byte)\n\t\tz.currentBuffer = z.currentBuffer[:0]\n\t}\n\tq := p\n\tfor len(q) > 0 {\n\t\tlength := len(q)\n\t\tif length+len(z.currentBuffer) > z.blockSize {\n\t\t\tlength = z.blockSize - len(z.currentBuffer)\n\t\t}\n\t\tz.digest.Write(q[:length])\n\t\tz.currentBuffer = append(z.currentBuffer, q[:length]...)\n\t\tif len(z.currentBuffer) > z.blockSize {\n\t\t\tpanic(\"z.currentBuffer too large (most likely due to concurrent Write race)\")\n\t\t}\n\t\tif len(z.currentBuffer) == z.blockSize {\n\t\t\tz.compressCurrent(false)\n\t\t\tif err := z.checkError(); err != nil {\n\t\t\t\treturn len(p) - len(q), err\n\t\t\t}\n\t\t}\n\t\tz.size += length\n\t\tq = q[length:]\n\t}\n\treturn len(p), z.checkError()\n}\n\n// Step 1: compresses buffer to buffer\n// Step 2: send writer to channel\n// Step 3: Close result channel to indicate we are done\nfunc (z *Writer) compressBlock(p, prevTail []byte, r result, closed bool) {\n\tdefer func() {\n\t\tclose(r.result)\n\t\tz.wg.Done()\n\t}()\n\tbuf := z.dstPool.Get().([]byte) // Corresponding Put in .Write's result writer\n\tdest := bytes.NewBuffer(buf[:0])\n\n\tcompressor := z.dictFlatePool.Get().(*flate.Writer) // Put below\n\tcompressor.ResetDict(dest, prevTail)\n\tcompressor.Write(p)\n\tz.dstPool.Put(p) // Corresponding Get in .Write and .compressCurrent\n\n\terr := compressor.Flush()\n\tif err != nil {\n\t\tz.pushError(err)\n\t\treturn\n\t}\n\tif closed {\n\t\terr = compressor.Close()\n\t\tif err != nil {\n\t\t\tz.pushError(err)\n\t\t\treturn\n\t\t}\n\t}\n\tz.dictFlatePool.Put(compressor) // Get above\n\n\tif prevTail != nil {\n\t\tz.dstPool.Put(prevTail) // Get in .compressCurrent\n\t}\n\n\t// Read back buffer\n\tbuf = dest.Bytes()\n\tr.result <- buf\n}\n\n// Flush flushes any pending compressed data to the underlying writer.\n//\n// It is useful mainly in compressed network protocols, to ensure that\n// a remote reader has enough data to reconstruct a packet. Flush does\n// not return until the data has been written. If the underlying\n// writer returns an error, Flush returns that error.\n//\n// In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH.\nfunc (z *Writer) Flush() error {\n\tif err := z.checkError(); err != nil {\n\t\treturn err\n\t}\n\tif z.closed {\n\t\treturn nil\n\t}\n\tif !z.wroteHeader {\n\t\t_, err := z.Write(nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// We send current block to compression\n\tz.compressCurrent(true)\n\n\treturn z.checkError()\n}\n\n// UncompressedSize will return the number of bytes written.\n// pgzip only, not a function in the official gzip package.\nfunc (z *Writer) UncompressedSize() int {\n\treturn z.size\n}\n\n// Close closes the Writer, flushing any unwritten data to the underlying\n// io.Writer, but does not close the underlying io.Writer.\nfunc (z *Writer) Close() error {\n\tif err := z.checkError(); err != nil {\n\t\treturn err\n\t}\n\tif z.closed {\n\t\treturn nil\n\t}\n\n\tz.closed = true\n\tif !z.wroteHeader {\n\t\tz.Write(nil)\n\t\tif err := z.checkError(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tz.compressCurrent(true)\n\tif err := z.checkError(); err != nil {\n\t\treturn err\n\t}\n\tclose(z.results)\n\tput4(z.buf[0:4], z.digest.Sum32())\n\tput4(z.buf[4:8], uint32(z.size))\n\t_, err := z.w.Write(z.buf[0:8])\n\tif err != nil {\n\t\tz.pushError(err)\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 Yasuhiro Matsumoto\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": "vendor/github.com/mattn/go-runewidth/README.md",
    "content": "go-runewidth\n============\n\n[![Build Status](https://github.com/mattn/go-runewidth/workflows/test/badge.svg?branch=master)](https://github.com/mattn/go-runewidth/actions?query=workflow%3Atest)\n[![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth)\n[![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth)\n\nProvides functions to get fixed width of the character or string.\n\nUsage\n-----\n\n```go\nrunewidth.StringWidth(\"つのだ☆HIRO\") == 12\n```\n\n\nAuthor\n------\n\nYasuhiro Matsumoto\n\nLicense\n-------\n\nunder the MIT License: http://mattn.mit-license.org/2013\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/benchstat.txt",
    "content": "goos: darwin\ngoarch: arm64\npkg: github.com/mattn/go-runewidth\ncpu: Apple M2\n                                   │   old.txt    │              new.txt               │\n                                   │    sec/op    │   sec/op     vs base               │\nString1WidthAll/regular-8            108.92m ± 0%   35.09m ± 3%  -67.78% (p=0.002 n=6)\nString1WidthAll/lut-8                 93.97m ± 0%   18.70m ± 0%  -80.10% (p=0.002 n=6)\nString1Width768/regular-8             60.62µ ± 1%   11.54µ ± 0%  -80.97% (p=0.002 n=6)\nString1Width768/lut-8                 60.66µ ± 1%   11.43µ ± 0%  -81.16% (p=0.002 n=6)\nString1WidthAllEastAsian/regular-8   115.13m ± 1%   40.79m ± 8%  -64.57% (p=0.002 n=6)\nString1WidthAllEastAsian/lut-8        93.65m ± 0%   18.70m ± 2%  -80.03% (p=0.002 n=6)\nString1Width768EastAsian/regular-8    75.32µ ± 0%   23.49µ ± 0%  -68.82% (p=0.002 n=6)\nString1Width768EastAsian/lut-8        60.76µ ± 0%   11.50µ ± 0%  -81.07% (p=0.002 n=6)\ngeomean                               2.562m        604.5µ       -76.41%\n\n                                   │   old.txt    │                 new.txt                 │\n                                   │     B/op     │    B/op      vs base                    │\nString1WidthAll/regular-8            106.3Mi ± 0%    0.0Mi ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAll/lut-8                106.3Mi ± 0%    0.0Mi ± 0%  -100.00% (p=0.002 n=6)\nString1Width768/regular-8            75.00Ki ± 0%   0.00Ki ± 0%  -100.00% (p=0.002 n=6)\nString1Width768/lut-8                75.00Ki ± 0%   0.00Ki ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAllEastAsian/regular-8   106.3Mi ± 0%    0.0Mi ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAllEastAsian/lut-8       106.3Mi ± 0%    0.0Mi ± 0%  -100.00% (p=0.002 n=6)\nString1Width768EastAsian/regular-8   75.00Ki ± 0%   0.00Ki ± 0%  -100.00% (p=0.002 n=6)\nString1Width768EastAsian/lut-8       75.00Ki ± 0%   0.00Ki ± 0%  -100.00% (p=0.002 n=6)\ngeomean                              2.790Mi                     ?                      ¹ ²\n¹ summaries must be >0 to compute geomean\n² ratios must be >0 to compute geomean\n\n                                   │   old.txt   │                 new.txt                 │\n                                   │  allocs/op  │  allocs/op   vs base                    │\nString1WidthAll/regular-8            3.342M ± 0%   0.000M ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAll/lut-8                3.342M ± 0%   0.000M ± 0%  -100.00% (p=0.002 n=6)\nString1Width768/regular-8            2.304k ± 0%   0.000k ± 0%  -100.00% (p=0.002 n=6)\nString1Width768/lut-8                2.304k ± 0%   0.000k ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAllEastAsian/regular-8   3.342M ± 0%   0.000M ± 0%  -100.00% (p=0.002 n=6)\nString1WidthAllEastAsian/lut-8       3.342M ± 0%   0.000M ± 0%  -100.00% (p=0.002 n=6)\nString1Width768EastAsian/regular-8   2.304k ± 0%   0.000k ± 0%  -100.00% (p=0.002 n=6)\nString1Width768EastAsian/lut-8       2.304k ± 0%   0.000k ± 0%  -100.00% (p=0.002 n=6)\ngeomean                              87.75k                     ?                      ¹ ²\n¹ summaries must be >0 to compute geomean\n² ratios must be >0 to compute geomean\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/new.txt",
    "content": "goos: darwin\ngoarch: arm64\npkg: github.com/mattn/go-runewidth\ncpu: Apple M2\nBenchmarkString1WidthAll/regular-8    \t      33\t  35033923 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      33\t  34965112 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      33\t  36307234 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      33\t  35007705 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      33\t  35154182 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      34\t  35155400 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      63\t  18688500 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      63\t  18712474 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      63\t  18700211 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      62\t  18694179 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      62\t  18708392 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      63\t  18770608 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  104137\t     11526 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  103986\t     11540 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  104079\t     11552 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  103963\t     11530 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  103714\t     11538 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/regular-8    \t  104181\t     11537 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  105150\t     11420 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  104778\t     11423 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  105069\t     11422 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  105127\t     11475 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  104742\t     11433 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768/lut-8        \t  105163\t     11432 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  40723347 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  40790299 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  40801338 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  40798216 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  44135253 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t      28\t  40779546 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      62\t  18694165 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      62\t  18685047 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      62\t  18689273 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      62\t  19150346 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      63\t  19126154 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      62\t  18712619 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   50775\t     23595 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   51061\t     23563 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   51057\t     23492 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   51138\t     23445 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   51195\t     23469 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   51087\t     23482 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104559\t     11549 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104508\t     11483 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104296\t     11503 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104606\t     11485 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104588\t     11495 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t  104602\t     11518 ns/op\t       0 B/op\t       0 allocs/op\nPASS\nok  \tgithub.com/mattn/go-runewidth\t64.455s\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/old.txt",
    "content": "goos: darwin\ngoarch: arm64\npkg: github.com/mattn/go-runewidth\ncpu: Apple M2\nBenchmarkString1WidthAll/regular-8    \t      10\t 108559258 ns/op\t111412145 B/op\t 3342342 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      10\t 108968079 ns/op\t111412364 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      10\t 108890338 ns/op\t111412388 B/op\t 3342344 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      10\t 108940704 ns/op\t111412584 B/op\t 3342346 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      10\t 108632796 ns/op\t111412348 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/regular-8    \t      10\t 109354546 ns/op\t111412777 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  93844406 ns/op\t111412569 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  93991080 ns/op\t111412512 B/op\t 3342344 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  93980632 ns/op\t111412413 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  94004083 ns/op\t111412396 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  93959795 ns/op\t111412445 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAll/lut-8        \t      12\t  93846198 ns/op\t111412556 B/op\t 3342345 allocs/op\nBenchmarkString1Width768/regular-8    \t   19785\t     60696 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/regular-8    \t   19824\t     60520 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/regular-8    \t   19832\t     60547 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/regular-8    \t   19778\t     60543 ns/op\t   76800 B/op\t    2304 allocs/op\nBenchmarkString1Width768/regular-8    \t   19842\t     61142 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/regular-8    \t   19780\t     60696 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19598\t     61161 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19731\t     60707 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19738\t     60626 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19764\t     60670 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19797\t     60642 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768/lut-8        \t   19738\t     60608 ns/op\t   76800 B/op\t    2304 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 115080431 ns/op\t111412458 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 114908880 ns/op\t111412476 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 115077134 ns/op\t111412540 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 115175292 ns/op\t111412467 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 115792653 ns/op\t111412362 B/op\t 3342344 allocs/op\nBenchmarkString1WidthAllEastAsian/regular-8         \t       9\t 115255417 ns/op\t111412572 B/op\t 3342346 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  93761542 ns/op\t111412538 B/op\t 3342345 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  94089990 ns/op\t111412440 B/op\t 3342343 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  93721410 ns/op\t111412514 B/op\t 3342344 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  93572951 ns/op\t111412329 B/op\t 3342342 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  93536052 ns/op\t111412206 B/op\t 3342341 allocs/op\nBenchmarkString1WidthAllEastAsian/lut-8             \t      12\t  93532365 ns/op\t111412412 B/op\t 3342343 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15904\t     75401 ns/op\t   76800 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15932\t     75449 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15944\t     75181 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15963\t     75311 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15879\t     75292 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/regular-8         \t   15955\t     75334 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19692\t     60692 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19712\t     60699 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19741\t     60819 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19771\t     60653 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19737\t     61027 ns/op\t   76801 B/op\t    2304 allocs/op\nBenchmarkString1Width768EastAsian/lut-8             \t   19657\t     60820 ns/op\t   76801 B/op\t    2304 allocs/op\nPASS\nok  \tgithub.com/mattn/go-runewidth\t76.165s\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth.go",
    "content": "package runewidth\n\nimport (\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/clipperhouse/uax29/v2/graphemes\"\n)\n\n//go:generate go run script/generate.go\n\nvar (\n\t// EastAsianWidth will be set true if the current locale is CJK\n\tEastAsianWidth bool\n\n\t// StrictEmojiNeutral should be set false if handle broken fonts\n\tStrictEmojiNeutral bool = true\n\n\t// DefaultCondition is a condition in current locale\n\tDefaultCondition = &Condition{\n\t\tEastAsianWidth:     false,\n\t\tStrictEmojiNeutral: true,\n\t}\n)\n\nfunc init() {\n\thandleEnv()\n}\n\nfunc handleEnv() {\n\tenv := os.Getenv(\"RUNEWIDTH_EASTASIAN\")\n\tif env == \"\" {\n\t\tEastAsianWidth = IsEastAsian()\n\t} else {\n\t\tEastAsianWidth = env == \"1\"\n\t}\n\t// update DefaultCondition\n\tif DefaultCondition.EastAsianWidth != EastAsianWidth {\n\t\tDefaultCondition.EastAsianWidth = EastAsianWidth\n\t\tif len(DefaultCondition.combinedLut) > 0 {\n\t\t\tDefaultCondition.combinedLut = DefaultCondition.combinedLut[:0]\n\t\t\tCreateLUT()\n\t\t}\n\t}\n}\n\ntype interval struct {\n\tfirst rune\n\tlast  rune\n}\n\ntype table []interval\n\nfunc inTables(r rune, ts ...table) bool {\n\tfor _, t := range ts {\n\t\tif inTable(r, t) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc inTable(r rune, t table) bool {\n\tif r < t[0].first {\n\t\treturn false\n\t}\n\tif r > t[len(t)-1].last {\n\t\treturn false\n\t}\n\n\tbot := 0\n\ttop := len(t) - 1\n\tfor top >= bot {\n\t\tmid := (bot + top) >> 1\n\n\t\tswitch {\n\t\tcase t[mid].last < r:\n\t\t\tbot = mid + 1\n\t\tcase t[mid].first > r:\n\t\t\ttop = mid - 1\n\t\tdefault:\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nvar private = table{\n\t{0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD},\n}\n\nvar nonprint = table{\n\t{0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD},\n\t{0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F},\n\t{0x2028, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF},\n\t{0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF},\n}\n\n// Condition have flag EastAsianWidth whether the current locale is CJK or not.\ntype Condition struct {\n\tcombinedLut        []byte\n\tEastAsianWidth     bool\n\tStrictEmojiNeutral bool\n}\n\n// NewCondition return new instance of Condition which is current locale.\nfunc NewCondition() *Condition {\n\treturn &Condition{\n\t\tEastAsianWidth:     EastAsianWidth,\n\t\tStrictEmojiNeutral: StrictEmojiNeutral,\n\t}\n}\n\n// RuneWidth returns the number of cells in r.\n// See http://www.unicode.org/reports/tr11/\nfunc (c *Condition) RuneWidth(r rune) int {\n\tif r < 0 || r > 0x10FFFF {\n\t\treturn 0\n\t}\n\tif len(c.combinedLut) > 0 {\n\t\treturn int(c.combinedLut[r>>1]>>(uint(r&1)*4)) & 3\n\t}\n\t// optimized version, verified by TestRuneWidthChecksums()\n\tif !c.EastAsianWidth {\n\t\tswitch {\n\t\tcase r < 0x20:\n\t\t\treturn 0\n\t\tcase (r >= 0x7F && r <= 0x9F) || r == 0xAD: // nonprint\n\t\t\treturn 0\n\t\tcase r < 0x300:\n\t\t\treturn 1\n\t\tcase inTable(r, narrow):\n\t\t\treturn 1\n\t\tcase inTables(r, nonprint, combining):\n\t\t\treturn 0\n\t\tcase inTable(r, doublewidth):\n\t\t\treturn 2\n\t\tdefault:\n\t\t\treturn 1\n\t\t}\n\t} else {\n\t\tswitch {\n\t\tcase inTables(r, nonprint, combining):\n\t\t\treturn 0\n\t\tcase inTable(r, narrow):\n\t\t\treturn 1\n\t\tcase inTables(r, ambiguous, doublewidth):\n\t\t\treturn 2\n\t\tcase !c.StrictEmojiNeutral && inTables(r, ambiguous, emoji, narrow):\n\t\t\treturn 2\n\t\tdefault:\n\t\t\treturn 1\n\t\t}\n\t}\n}\n\n// CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation.\n// This should not be called concurrently with other operations on c.\n// If options in c is changed, CreateLUT should be called again.\nfunc (c *Condition) CreateLUT() {\n\tconst max = 0x110000\n\tlut := c.combinedLut\n\tif len(c.combinedLut) != 0 {\n\t\t// Remove so we don't use it.\n\t\tc.combinedLut = nil\n\t} else {\n\t\tlut = make([]byte, max/2)\n\t}\n\tfor i := range lut {\n\t\ti32 := int32(i * 2)\n\t\tx0 := c.RuneWidth(i32)\n\t\tx1 := c.RuneWidth(i32 + 1)\n\t\tlut[i] = uint8(x0) | uint8(x1)<<4\n\t}\n\tc.combinedLut = lut\n}\n\n// StringWidth return width as you can see\nfunc (c *Condition) StringWidth(s string) (width int) {\n\tg := graphemes.FromString(s)\n\tfor g.Next() {\n\t\tvar chWidth int\n\t\tfor _, r := range g.Value() {\n\t\t\tchWidth = c.RuneWidth(r)\n\t\t\tif chWidth > 0 {\n\t\t\t\tbreak // Our best guess at this point is to use the width of the first non-zero-width rune.\n\t\t\t}\n\t\t}\n\t\twidth += chWidth\n\t}\n\treturn\n}\n\n// Truncate return string truncated with w cells\nfunc (c *Condition) Truncate(s string, w int, tail string) string {\n\tif c.StringWidth(s) <= w {\n\t\treturn s\n\t}\n\tw -= c.StringWidth(tail)\n\tvar width int\n\tpos := len(s)\n\tg := graphemes.FromString(s)\n\tfor g.Next() {\n\t\tvar chWidth int\n\t\tfor _, r := range g.Value() {\n\t\t\tchWidth = c.RuneWidth(r)\n\t\t\tif chWidth > 0 {\n\t\t\t\tbreak // See StringWidth() for details.\n\t\t\t}\n\t\t}\n\t\tif width+chWidth > w {\n\t\t\tpos = g.Start()\n\t\t\tbreak\n\t\t}\n\t\twidth += chWidth\n\t}\n\treturn s[:pos] + tail\n}\n\n// TruncateLeft cuts w cells from the beginning of the `s`.\nfunc (c *Condition) TruncateLeft(s string, w int, prefix string) string {\n\tif c.StringWidth(s) <= w {\n\t\treturn prefix\n\t}\n\n\tvar width int\n\tpos := len(s)\n\n\tg := graphemes.FromString(s)\n\tfor g.Next() {\n\t\tvar chWidth int\n\t\tfor _, r := range g.Value() {\n\t\t\tchWidth = c.RuneWidth(r)\n\t\t\tif chWidth > 0 {\n\t\t\t\tbreak // See StringWidth() for details.\n\t\t\t}\n\t\t}\n\n\t\tif width+chWidth > w {\n\t\t\tif width < w {\n\t\t\t\tpos = g.End()\n\t\t\t\tprefix += strings.Repeat(\" \", width+chWidth-w)\n\t\t\t} else {\n\t\t\t\tpos = g.Start()\n\t\t\t}\n\n\t\t\tbreak\n\t\t}\n\n\t\twidth += chWidth\n\t}\n\n\treturn prefix + s[pos:]\n}\n\n// Wrap return string wrapped with w cells\nfunc (c *Condition) Wrap(s string, w int) string {\n\twidth := 0\n\tout := \"\"\n\tfor _, r := range s {\n\t\tcw := c.RuneWidth(r)\n\t\tif r == '\\n' {\n\t\t\tout += string(r)\n\t\t\twidth = 0\n\t\t\tcontinue\n\t\t} else if width+cw > w {\n\t\t\tout += \"\\n\"\n\t\t\twidth = 0\n\t\t\tout += string(r)\n\t\t\twidth += cw\n\t\t\tcontinue\n\t\t}\n\t\tout += string(r)\n\t\twidth += cw\n\t}\n\treturn out\n}\n\n// FillLeft return string filled in left by spaces in w cells\nfunc (c *Condition) FillLeft(s string, w int) string {\n\twidth := c.StringWidth(s)\n\tcount := w - width\n\tif count > 0 {\n\t\tb := make([]byte, count)\n\t\tfor i := range b {\n\t\t\tb[i] = ' '\n\t\t}\n\t\treturn string(b) + s\n\t}\n\treturn s\n}\n\n// FillRight return string filled in left by spaces in w cells\nfunc (c *Condition) FillRight(s string, w int) string {\n\twidth := c.StringWidth(s)\n\tcount := w - width\n\tif count > 0 {\n\t\tb := make([]byte, count)\n\t\tfor i := range b {\n\t\t\tb[i] = ' '\n\t\t}\n\t\treturn s + string(b)\n\t}\n\treturn s\n}\n\n// RuneWidth returns the number of cells in r.\n// See http://www.unicode.org/reports/tr11/\nfunc RuneWidth(r rune) int {\n\treturn DefaultCondition.RuneWidth(r)\n}\n\n// IsAmbiguousWidth returns whether is ambiguous width or not.\nfunc IsAmbiguousWidth(r rune) bool {\n\treturn inTables(r, private, ambiguous)\n}\n\n// IsNeutralWidth returns whether is neutral width or not.\nfunc IsNeutralWidth(r rune) bool {\n\treturn inTable(r, neutral)\n}\n\n// StringWidth return width as you can see\nfunc StringWidth(s string) (width int) {\n\treturn DefaultCondition.StringWidth(s)\n}\n\n// Truncate return string truncated with w cells\nfunc Truncate(s string, w int, tail string) string {\n\treturn DefaultCondition.Truncate(s, w, tail)\n}\n\n// TruncateLeft cuts w cells from the beginning of the `s`.\nfunc TruncateLeft(s string, w int, prefix string) string {\n\treturn DefaultCondition.TruncateLeft(s, w, prefix)\n}\n\n// Wrap return string wrapped with w cells\nfunc Wrap(s string, w int) string {\n\treturn DefaultCondition.Wrap(s, w)\n}\n\n// FillLeft return string filled in left by spaces in w cells\nfunc FillLeft(s string, w int) string {\n\treturn DefaultCondition.FillLeft(s, w)\n}\n\n// FillRight return string filled in left by spaces in w cells\nfunc FillRight(s string, w int) string {\n\treturn DefaultCondition.FillRight(s, w)\n}\n\n// CreateLUT will create an in-memory lookup table of 557055 bytes for faster operation.\n// This should not be called concurrently with other operations.\nfunc CreateLUT() {\n\tif len(DefaultCondition.combinedLut) > 0 {\n\t\treturn\n\t}\n\tDefaultCondition.CreateLUT()\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth_appengine.go",
    "content": "//go:build appengine\n// +build appengine\n\npackage runewidth\n\n// IsEastAsian return true if the current locale is CJK\nfunc IsEastAsian() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth_js.go",
    "content": "//go:build js && !appengine\n// +build js,!appengine\n\npackage runewidth\n\nfunc IsEastAsian() bool {\n\t// TODO: Implement this for the web. Detect east asian in a compatible way, and return true.\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth_posix.go",
    "content": "//go:build !windows && !js && !appengine\n// +build !windows,!js,!appengine\n\npackage runewidth\n\nimport (\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\\.(.+)`)\n\nvar mblenTable = map[string]int{\n\t\"utf-8\":   6,\n\t\"utf8\":    6,\n\t\"jis\":     8,\n\t\"eucjp\":   3,\n\t\"euckr\":   2,\n\t\"euccn\":   2,\n\t\"sjis\":    2,\n\t\"cp932\":   2,\n\t\"cp51932\": 2,\n\t\"cp936\":   2,\n\t\"cp949\":   2,\n\t\"cp950\":   2,\n\t\"big5\":    2,\n\t\"gbk\":     2,\n\t\"gb2312\":  2,\n}\n\nfunc isEastAsian(locale string) bool {\n\tcharset := strings.ToLower(locale)\n\tr := reLoc.FindStringSubmatch(locale)\n\tif len(r) == 2 {\n\t\tcharset = strings.ToLower(r[1])\n\t}\n\n\tif strings.HasSuffix(charset, \"@cjk_narrow\") {\n\t\treturn false\n\t}\n\n\tfor pos, b := range []byte(charset) {\n\t\tif b == '@' {\n\t\t\tcharset = charset[:pos]\n\t\t\tbreak\n\t\t}\n\t}\n\tmax := 1\n\tif m, ok := mblenTable[charset]; ok {\n\t\tmax = m\n\t}\n\tif max > 1 && (charset[0] != 'u' ||\n\t\tstrings.HasPrefix(locale, \"ja\") ||\n\t\tstrings.HasPrefix(locale, \"ko\") ||\n\t\tstrings.HasPrefix(locale, \"zh\")) {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// IsEastAsian return true if the current locale is CJK\nfunc IsEastAsian() bool {\n\tlocale := os.Getenv(\"LC_ALL\")\n\tif locale == \"\" {\n\t\tlocale = os.Getenv(\"LC_CTYPE\")\n\t}\n\tif locale == \"\" {\n\t\tlocale = os.Getenv(\"LANG\")\n\t}\n\n\t// ignore C locale\n\tif locale == \"POSIX\" || locale == \"C\" {\n\t\treturn false\n\t}\n\tif len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') {\n\t\treturn false\n\t}\n\n\treturn isEastAsian(locale)\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth_table.go",
    "content": "// Code generated by script/generate.go. DO NOT EDIT.\n\npackage runewidth\n\nvar combining = table{\n\t{0x0300, 0x036F}, {0x0483, 0x0489}, {0x07EB, 0x07F3},\n\t{0x0C00, 0x0C00}, {0x0C04, 0x0C04}, {0x0CF3, 0x0CF3},\n\t{0x0D00, 0x0D01}, {0x135D, 0x135F}, {0x1A7F, 0x1A7F},\n\t{0x1AB0, 0x1ADD}, {0x1AE0, 0x1AEB}, {0x1B6B, 0x1B73},\n\t{0x1DC0, 0x1DFF}, {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1},\n\t{0x2DE0, 0x2DFF}, {0x3099, 0x309A}, {0xA66F, 0xA672},\n\t{0xA674, 0xA67D}, {0xA69E, 0xA69F}, {0xA6F0, 0xA6F1},\n\t{0xA8E0, 0xA8F1}, {0xFE20, 0xFE2F}, {0x101FD, 0x101FD},\n\t{0x10376, 0x1037A}, {0x10EAB, 0x10EAC}, {0x10F46, 0x10F50},\n\t{0x10F82, 0x10F85}, {0x11300, 0x11301}, {0x1133B, 0x1133C},\n\t{0x11366, 0x1136C}, {0x11370, 0x11374}, {0x16AF0, 0x16AF4},\n\t{0x1CF00, 0x1CF2D}, {0x1CF30, 0x1CF46}, {0x1D165, 0x1D169},\n\t{0x1D16D, 0x1D172}, {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B},\n\t{0x1D1AA, 0x1D1AD}, {0x1D242, 0x1D244}, {0x1E000, 0x1E006},\n\t{0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024},\n\t{0x1E026, 0x1E02A}, {0x1E08F, 0x1E08F}, {0x1E8D0, 0x1E8D6},\n}\n\nvar doublewidth = table{\n\t{0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A},\n\t{0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3},\n\t{0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2630, 0x2637},\n\t{0x2648, 0x2653}, {0x267F, 0x267F}, {0x268A, 0x268F},\n\t{0x2693, 0x2693}, {0x26A1, 0x26A1}, {0x26AA, 0x26AB},\n\t{0x26BD, 0x26BE}, {0x26C4, 0x26C5}, {0x26CE, 0x26CE},\n\t{0x26D4, 0x26D4}, {0x26EA, 0x26EA}, {0x26F2, 0x26F3},\n\t{0x26F5, 0x26F5}, {0x26FA, 0x26FA}, {0x26FD, 0x26FD},\n\t{0x2705, 0x2705}, {0x270A, 0x270B}, {0x2728, 0x2728},\n\t{0x274C, 0x274C}, {0x274E, 0x274E}, {0x2753, 0x2755},\n\t{0x2757, 0x2757}, {0x2795, 0x2797}, {0x27B0, 0x27B0},\n\t{0x27BF, 0x27BF}, {0x2B1B, 0x2B1C}, {0x2B50, 0x2B50},\n\t{0x2B55, 0x2B55}, {0x2E80, 0x2E99}, {0x2E9B, 0x2EF3},\n\t{0x2F00, 0x2FD5}, {0x2FF0, 0x303E}, {0x3041, 0x3096},\n\t{0x3099, 0x30FF}, {0x3105, 0x312F}, {0x3131, 0x318E},\n\t{0x3190, 0x31E5}, {0x31EF, 0x321E}, {0x3220, 0x3247},\n\t{0x3250, 0xA48C}, {0xA490, 0xA4C6}, {0xA960, 0xA97C},\n\t{0xAC00, 0xD7A3}, {0xF900, 0xFAFF}, {0xFE10, 0xFE19},\n\t{0xFE30, 0xFE52}, {0xFE54, 0xFE66}, {0xFE68, 0xFE6B},\n\t{0xFF01, 0xFF60}, {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE4},\n\t{0x16FF0, 0x16FF6}, {0x17000, 0x18CD5}, {0x18CFF, 0x18D1E},\n\t{0x18D80, 0x18DF2}, {0x1AFF0, 0x1AFF3}, {0x1AFF5, 0x1AFFB},\n\t{0x1AFFD, 0x1AFFE}, {0x1B000, 0x1B122}, {0x1B132, 0x1B132},\n\t{0x1B150, 0x1B152}, {0x1B155, 0x1B155}, {0x1B164, 0x1B167},\n\t{0x1B170, 0x1B2FB}, {0x1D300, 0x1D356}, {0x1D360, 0x1D376},\n\t{0x1F004, 0x1F004}, {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E},\n\t{0x1F191, 0x1F19A}, {0x1F200, 0x1F202}, {0x1F210, 0x1F23B},\n\t{0x1F240, 0x1F248}, {0x1F250, 0x1F251}, {0x1F260, 0x1F265},\n\t{0x1F300, 0x1F320}, {0x1F32D, 0x1F335}, {0x1F337, 0x1F37C},\n\t{0x1F37E, 0x1F393}, {0x1F3A0, 0x1F3CA}, {0x1F3CF, 0x1F3D3},\n\t{0x1F3E0, 0x1F3F0}, {0x1F3F4, 0x1F3F4}, {0x1F3F8, 0x1F43E},\n\t{0x1F440, 0x1F440}, {0x1F442, 0x1F4FC}, {0x1F4FF, 0x1F53D},\n\t{0x1F54B, 0x1F54E}, {0x1F550, 0x1F567}, {0x1F57A, 0x1F57A},\n\t{0x1F595, 0x1F596}, {0x1F5A4, 0x1F5A4}, {0x1F5FB, 0x1F64F},\n\t{0x1F680, 0x1F6C5}, {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2},\n\t{0x1F6D5, 0x1F6D8}, {0x1F6DC, 0x1F6DF}, {0x1F6EB, 0x1F6EC},\n\t{0x1F6F4, 0x1F6FC}, {0x1F7E0, 0x1F7EB}, {0x1F7F0, 0x1F7F0},\n\t{0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F9FF},\n\t{0x1FA70, 0x1FA7C}, {0x1FA80, 0x1FA8A}, {0x1FA8E, 0x1FAC6},\n\t{0x1FAC8, 0x1FAC8}, {0x1FACD, 0x1FADC}, {0x1FADF, 0x1FAEA},\n\t{0x1FAEF, 0x1FAF8}, {0x20000, 0x2FFFD}, {0x30000, 0x3FFFD},\n}\n\nvar ambiguous = table{\n\t{0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8},\n\t{0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4},\n\t{0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6},\n\t{0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1},\n\t{0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED},\n\t{0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA},\n\t{0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101},\n\t{0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B},\n\t{0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133},\n\t{0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144},\n\t{0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153},\n\t{0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE},\n\t{0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4},\n\t{0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA},\n\t{0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261},\n\t{0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB},\n\t{0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB},\n\t{0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F},\n\t{0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1},\n\t{0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F},\n\t{0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016},\n\t{0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022},\n\t{0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033},\n\t{0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E},\n\t{0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084},\n\t{0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105},\n\t{0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116},\n\t{0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B},\n\t{0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B},\n\t{0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199},\n\t{0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4},\n\t{0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203},\n\t{0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F},\n\t{0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A},\n\t{0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225},\n\t{0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237},\n\t{0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C},\n\t{0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267},\n\t{0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283},\n\t{0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299},\n\t{0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312},\n\t{0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573},\n\t{0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1},\n\t{0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7},\n\t{0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8},\n\t{0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5},\n\t{0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609},\n\t{0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E},\n\t{0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661},\n\t{0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D},\n\t{0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF},\n\t{0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1},\n\t{0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1},\n\t{0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC},\n\t{0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F},\n\t{0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF},\n\t{0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A},\n\t{0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D},\n\t{0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF},\n\t{0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD},\n}\nvar narrow = table{\n\t{0x0020, 0x007E}, {0x00A2, 0x00A3}, {0x00A5, 0x00A6},\n\t{0x00AC, 0x00AC}, {0x00AF, 0x00AF}, {0x27E6, 0x27ED},\n\t{0x2985, 0x2986},\n}\n\nvar neutral = table{\n\t{0x0000, 0x001F}, {0x007F, 0x00A0}, {0x00A9, 0x00A9},\n\t{0x00AB, 0x00AB}, {0x00B5, 0x00B5}, {0x00BB, 0x00BB},\n\t{0x00C0, 0x00C5}, {0x00C7, 0x00CF}, {0x00D1, 0x00D6},\n\t{0x00D9, 0x00DD}, {0x00E2, 0x00E5}, {0x00E7, 0x00E7},\n\t{0x00EB, 0x00EB}, {0x00EE, 0x00EF}, {0x00F1, 0x00F1},\n\t{0x00F4, 0x00F6}, {0x00FB, 0x00FB}, {0x00FD, 0x00FD},\n\t{0x00FF, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112},\n\t{0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A},\n\t{0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E},\n\t{0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C},\n\t{0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A},\n\t{0x016C, 0x01CD}, {0x01CF, 0x01CF}, {0x01D1, 0x01D1},\n\t{0x01D3, 0x01D3}, {0x01D5, 0x01D5}, {0x01D7, 0x01D7},\n\t{0x01D9, 0x01D9}, {0x01DB, 0x01DB}, {0x01DD, 0x0250},\n\t{0x0252, 0x0260}, {0x0262, 0x02C3}, {0x02C5, 0x02C6},\n\t{0x02C8, 0x02C8}, {0x02CC, 0x02CC}, {0x02CE, 0x02CF},\n\t{0x02D1, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE},\n\t{0x02E0, 0x02FF}, {0x0370, 0x0377}, {0x037A, 0x037F},\n\t{0x0384, 0x038A}, {0x038C, 0x038C}, {0x038E, 0x0390},\n\t{0x03AA, 0x03B0}, {0x03C2, 0x03C2}, {0x03CA, 0x0400},\n\t{0x0402, 0x040F}, {0x0450, 0x0450}, {0x0452, 0x052F},\n\t{0x0531, 0x0556}, {0x0559, 0x058A}, {0x058D, 0x058F},\n\t{0x0591, 0x05C7}, {0x05D0, 0x05EA}, {0x05EF, 0x05F4},\n\t{0x0600, 0x070D}, {0x070F, 0x074A}, {0x074D, 0x07B1},\n\t{0x07C0, 0x07FA}, {0x07FD, 0x082D}, {0x0830, 0x083E},\n\t{0x0840, 0x085B}, {0x085E, 0x085E}, {0x0860, 0x086A},\n\t{0x0870, 0x0891}, {0x0897, 0x0983}, {0x0985, 0x098C},\n\t{0x098F, 0x0990}, {0x0993, 0x09A8}, {0x09AA, 0x09B0},\n\t{0x09B2, 0x09B2}, {0x09B6, 0x09B9}, {0x09BC, 0x09C4},\n\t{0x09C7, 0x09C8}, {0x09CB, 0x09CE}, {0x09D7, 0x09D7},\n\t{0x09DC, 0x09DD}, {0x09DF, 0x09E3}, {0x09E6, 0x09FE},\n\t{0x0A01, 0x0A03}, {0x0A05, 0x0A0A}, {0x0A0F, 0x0A10},\n\t{0x0A13, 0x0A28}, {0x0A2A, 0x0A30}, {0x0A32, 0x0A33},\n\t{0x0A35, 0x0A36}, {0x0A38, 0x0A39}, {0x0A3C, 0x0A3C},\n\t{0x0A3E, 0x0A42}, {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D},\n\t{0x0A51, 0x0A51}, {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E},\n\t{0x0A66, 0x0A76}, {0x0A81, 0x0A83}, {0x0A85, 0x0A8D},\n\t{0x0A8F, 0x0A91}, {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0},\n\t{0x0AB2, 0x0AB3}, {0x0AB5, 0x0AB9}, {0x0ABC, 0x0AC5},\n\t{0x0AC7, 0x0AC9}, {0x0ACB, 0x0ACD}, {0x0AD0, 0x0AD0},\n\t{0x0AE0, 0x0AE3}, {0x0AE6, 0x0AF1}, {0x0AF9, 0x0AFF},\n\t{0x0B01, 0x0B03}, {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10},\n\t{0x0B13, 0x0B28}, {0x0B2A, 0x0B30}, {0x0B32, 0x0B33},\n\t{0x0B35, 0x0B39}, {0x0B3C, 0x0B44}, {0x0B47, 0x0B48},\n\t{0x0B4B, 0x0B4D}, {0x0B55, 0x0B57}, {0x0B5C, 0x0B5D},\n\t{0x0B5F, 0x0B63}, {0x0B66, 0x0B77}, {0x0B82, 0x0B83},\n\t{0x0B85, 0x0B8A}, {0x0B8E, 0x0B90}, {0x0B92, 0x0B95},\n\t{0x0B99, 0x0B9A}, {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F},\n\t{0x0BA3, 0x0BA4}, {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9},\n\t{0x0BBE, 0x0BC2}, {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCD},\n\t{0x0BD0, 0x0BD0}, {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BFA},\n\t{0x0C00, 0x0C0C}, {0x0C0E, 0x0C10}, {0x0C12, 0x0C28},\n\t{0x0C2A, 0x0C39}, {0x0C3C, 0x0C44}, {0x0C46, 0x0C48},\n\t{0x0C4A, 0x0C4D}, {0x0C55, 0x0C56}, {0x0C58, 0x0C5A},\n\t{0x0C5C, 0x0C5D}, {0x0C60, 0x0C63}, {0x0C66, 0x0C6F},\n\t{0x0C77, 0x0C8C}, {0x0C8E, 0x0C90}, {0x0C92, 0x0CA8},\n\t{0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, {0x0CBC, 0x0CC4},\n\t{0x0CC6, 0x0CC8}, {0x0CCA, 0x0CCD}, {0x0CD5, 0x0CD6},\n\t{0x0CDC, 0x0CDE}, {0x0CE0, 0x0CE3}, {0x0CE6, 0x0CEF},\n\t{0x0CF1, 0x0CF3}, {0x0D00, 0x0D0C}, {0x0D0E, 0x0D10},\n\t{0x0D12, 0x0D44}, {0x0D46, 0x0D48}, {0x0D4A, 0x0D4F},\n\t{0x0D54, 0x0D63}, {0x0D66, 0x0D7F}, {0x0D81, 0x0D83},\n\t{0x0D85, 0x0D96}, {0x0D9A, 0x0DB1}, {0x0DB3, 0x0DBB},\n\t{0x0DBD, 0x0DBD}, {0x0DC0, 0x0DC6}, {0x0DCA, 0x0DCA},\n\t{0x0DCF, 0x0DD4}, {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF},\n\t{0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF4}, {0x0E01, 0x0E3A},\n\t{0x0E3F, 0x0E5B}, {0x0E81, 0x0E82}, {0x0E84, 0x0E84},\n\t{0x0E86, 0x0E8A}, {0x0E8C, 0x0EA3}, {0x0EA5, 0x0EA5},\n\t{0x0EA7, 0x0EBD}, {0x0EC0, 0x0EC4}, {0x0EC6, 0x0EC6},\n\t{0x0EC8, 0x0ECE}, {0x0ED0, 0x0ED9}, {0x0EDC, 0x0EDF},\n\t{0x0F00, 0x0F47}, {0x0F49, 0x0F6C}, {0x0F71, 0x0F97},\n\t{0x0F99, 0x0FBC}, {0x0FBE, 0x0FCC}, {0x0FCE, 0x0FDA},\n\t{0x1000, 0x10C5}, {0x10C7, 0x10C7}, {0x10CD, 0x10CD},\n\t{0x10D0, 0x10FF}, {0x1160, 0x1248}, {0x124A, 0x124D},\n\t{0x1250, 0x1256}, {0x1258, 0x1258}, {0x125A, 0x125D},\n\t{0x1260, 0x1288}, {0x128A, 0x128D}, {0x1290, 0x12B0},\n\t{0x12B2, 0x12B5}, {0x12B8, 0x12BE}, {0x12C0, 0x12C0},\n\t{0x12C2, 0x12C5}, {0x12C8, 0x12D6}, {0x12D8, 0x1310},\n\t{0x1312, 0x1315}, {0x1318, 0x135A}, {0x135D, 0x137C},\n\t{0x1380, 0x1399}, {0x13A0, 0x13F5}, {0x13F8, 0x13FD},\n\t{0x1400, 0x169C}, {0x16A0, 0x16F8}, {0x1700, 0x1715},\n\t{0x171F, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176C},\n\t{0x176E, 0x1770}, {0x1772, 0x1773}, {0x1780, 0x17DD},\n\t{0x17E0, 0x17E9}, {0x17F0, 0x17F9}, {0x1800, 0x1819},\n\t{0x1820, 0x1878}, {0x1880, 0x18AA}, {0x18B0, 0x18F5},\n\t{0x1900, 0x191E}, {0x1920, 0x192B}, {0x1930, 0x193B},\n\t{0x1940, 0x1940}, {0x1944, 0x196D}, {0x1970, 0x1974},\n\t{0x1980, 0x19AB}, {0x19B0, 0x19C9}, {0x19D0, 0x19DA},\n\t{0x19DE, 0x1A1B}, {0x1A1E, 0x1A5E}, {0x1A60, 0x1A7C},\n\t{0x1A7F, 0x1A89}, {0x1A90, 0x1A99}, {0x1AA0, 0x1AAD},\n\t{0x1AB0, 0x1ADD}, {0x1AE0, 0x1AEB}, {0x1B00, 0x1B4C},\n\t{0x1B4E, 0x1BF3}, {0x1BFC, 0x1C37}, {0x1C3B, 0x1C49},\n\t{0x1C4D, 0x1C8A}, {0x1C90, 0x1CBA}, {0x1CBD, 0x1CC7},\n\t{0x1CD0, 0x1CFA}, {0x1D00, 0x1F15}, {0x1F18, 0x1F1D},\n\t{0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, {0x1F50, 0x1F57},\n\t{0x1F59, 0x1F59}, {0x1F5B, 0x1F5B}, {0x1F5D, 0x1F5D},\n\t{0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4}, {0x1FB6, 0x1FC4},\n\t{0x1FC6, 0x1FD3}, {0x1FD6, 0x1FDB}, {0x1FDD, 0x1FEF},\n\t{0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFE}, {0x2000, 0x200F},\n\t{0x2011, 0x2012}, {0x2017, 0x2017}, {0x201A, 0x201B},\n\t{0x201E, 0x201F}, {0x2023, 0x2023}, {0x2028, 0x202F},\n\t{0x2031, 0x2031}, {0x2034, 0x2034}, {0x2036, 0x203A},\n\t{0x203C, 0x203D}, {0x203F, 0x2064}, {0x2066, 0x2071},\n\t{0x2075, 0x207E}, {0x2080, 0x2080}, {0x2085, 0x208E},\n\t{0x2090, 0x209C}, {0x20A0, 0x20A8}, {0x20AA, 0x20AB},\n\t{0x20AD, 0x20C1}, {0x20D0, 0x20F0}, {0x2100, 0x2102},\n\t{0x2104, 0x2104}, {0x2106, 0x2108}, {0x210A, 0x2112},\n\t{0x2114, 0x2115}, {0x2117, 0x2120}, {0x2123, 0x2125},\n\t{0x2127, 0x212A}, {0x212C, 0x2152}, {0x2155, 0x215A},\n\t{0x215F, 0x215F}, {0x216C, 0x216F}, {0x217A, 0x2188},\n\t{0x218A, 0x218B}, {0x219A, 0x21B7}, {0x21BA, 0x21D1},\n\t{0x21D3, 0x21D3}, {0x21D5, 0x21E6}, {0x21E8, 0x21FF},\n\t{0x2201, 0x2201}, {0x2204, 0x2206}, {0x2209, 0x220A},\n\t{0x220C, 0x220E}, {0x2210, 0x2210}, {0x2212, 0x2214},\n\t{0x2216, 0x2219}, {0x221B, 0x221C}, {0x2221, 0x2222},\n\t{0x2224, 0x2224}, {0x2226, 0x2226}, {0x222D, 0x222D},\n\t{0x222F, 0x2233}, {0x2238, 0x223B}, {0x223E, 0x2247},\n\t{0x2249, 0x224B}, {0x224D, 0x2251}, {0x2253, 0x225F},\n\t{0x2262, 0x2263}, {0x2268, 0x2269}, {0x226C, 0x226D},\n\t{0x2270, 0x2281}, {0x2284, 0x2285}, {0x2288, 0x2294},\n\t{0x2296, 0x2298}, {0x229A, 0x22A4}, {0x22A6, 0x22BE},\n\t{0x22C0, 0x2311}, {0x2313, 0x2319}, {0x231C, 0x2328},\n\t{0x232B, 0x23E8}, {0x23ED, 0x23EF}, {0x23F1, 0x23F2},\n\t{0x23F4, 0x2429}, {0x2440, 0x244A}, {0x24EA, 0x24EA},\n\t{0x254C, 0x254F}, {0x2574, 0x257F}, {0x2590, 0x2591},\n\t{0x2596, 0x259F}, {0x25A2, 0x25A2}, {0x25AA, 0x25B1},\n\t{0x25B4, 0x25B5}, {0x25B8, 0x25BB}, {0x25BE, 0x25BF},\n\t{0x25C2, 0x25C5}, {0x25C9, 0x25CA}, {0x25CC, 0x25CD},\n\t{0x25D2, 0x25E1}, {0x25E6, 0x25EE}, {0x25F0, 0x25FC},\n\t{0x25FF, 0x2604}, {0x2607, 0x2608}, {0x260A, 0x260D},\n\t{0x2610, 0x2613}, {0x2616, 0x261B}, {0x261D, 0x261D},\n\t{0x261F, 0x262F}, {0x2638, 0x263F}, {0x2641, 0x2641},\n\t{0x2643, 0x2647}, {0x2654, 0x265F}, {0x2662, 0x2662},\n\t{0x2666, 0x2666}, {0x266B, 0x266B}, {0x266E, 0x266E},\n\t{0x2670, 0x267E}, {0x2680, 0x2689}, {0x2690, 0x2692},\n\t{0x2694, 0x269D}, {0x26A0, 0x26A0}, {0x26A2, 0x26A9},\n\t{0x26AC, 0x26BC}, {0x26C0, 0x26C3}, {0x26E2, 0x26E2},\n\t{0x26E4, 0x26E7}, {0x2700, 0x2704}, {0x2706, 0x2709},\n\t{0x270C, 0x2727}, {0x2729, 0x273C}, {0x273E, 0x274B},\n\t{0x274D, 0x274D}, {0x274F, 0x2752}, {0x2756, 0x2756},\n\t{0x2758, 0x2775}, {0x2780, 0x2794}, {0x2798, 0x27AF},\n\t{0x27B1, 0x27BE}, {0x27C0, 0x27E5}, {0x27EE, 0x2984},\n\t{0x2987, 0x2B1A}, {0x2B1D, 0x2B4F}, {0x2B51, 0x2B54},\n\t{0x2B5A, 0x2B73}, {0x2B76, 0x2CF3}, {0x2CF9, 0x2D25},\n\t{0x2D27, 0x2D27}, {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67},\n\t{0x2D6F, 0x2D70}, {0x2D7F, 0x2D96}, {0x2DA0, 0x2DA6},\n\t{0x2DA8, 0x2DAE}, {0x2DB0, 0x2DB6}, {0x2DB8, 0x2DBE},\n\t{0x2DC0, 0x2DC6}, {0x2DC8, 0x2DCE}, {0x2DD0, 0x2DD6},\n\t{0x2DD8, 0x2DDE}, {0x2DE0, 0x2E5D}, {0x303F, 0x303F},\n\t{0xA4D0, 0xA62B}, {0xA640, 0xA6F7}, {0xA700, 0xA7DC},\n\t{0xA7F1, 0xA82C}, {0xA830, 0xA839}, {0xA840, 0xA877},\n\t{0xA880, 0xA8C5}, {0xA8CE, 0xA8D9}, {0xA8E0, 0xA953},\n\t{0xA95F, 0xA95F}, {0xA980, 0xA9CD}, {0xA9CF, 0xA9D9},\n\t{0xA9DE, 0xA9FE}, {0xAA00, 0xAA36}, {0xAA40, 0xAA4D},\n\t{0xAA50, 0xAA59}, {0xAA5C, 0xAAC2}, {0xAADB, 0xAAF6},\n\t{0xAB01, 0xAB06}, {0xAB09, 0xAB0E}, {0xAB11, 0xAB16},\n\t{0xAB20, 0xAB26}, {0xAB28, 0xAB2E}, {0xAB30, 0xAB6B},\n\t{0xAB70, 0xABED}, {0xABF0, 0xABF9}, {0xD7B0, 0xD7C6},\n\t{0xD7CB, 0xD7FB}, {0xD800, 0xDFFF}, {0xFB00, 0xFB06},\n\t{0xFB13, 0xFB17}, {0xFB1D, 0xFB36}, {0xFB38, 0xFB3C},\n\t{0xFB3E, 0xFB3E}, {0xFB40, 0xFB41}, {0xFB43, 0xFB44},\n\t{0xFB46, 0xFDCF}, {0xFDF0, 0xFDFF}, {0xFE20, 0xFE2F},\n\t{0xFE70, 0xFE74}, {0xFE76, 0xFEFC}, {0xFEFF, 0xFEFF},\n\t{0xFFF9, 0xFFFC}, {0x10000, 0x1000B}, {0x1000D, 0x10026},\n\t{0x10028, 0x1003A}, {0x1003C, 0x1003D}, {0x1003F, 0x1004D},\n\t{0x10050, 0x1005D}, {0x10080, 0x100FA}, {0x10100, 0x10102},\n\t{0x10107, 0x10133}, {0x10137, 0x1018E}, {0x10190, 0x1019C},\n\t{0x101A0, 0x101A0}, {0x101D0, 0x101FD}, {0x10280, 0x1029C},\n\t{0x102A0, 0x102D0}, {0x102E0, 0x102FB}, {0x10300, 0x10323},\n\t{0x1032D, 0x1034A}, {0x10350, 0x1037A}, {0x10380, 0x1039D},\n\t{0x1039F, 0x103C3}, {0x103C8, 0x103D5}, {0x10400, 0x1049D},\n\t{0x104A0, 0x104A9}, {0x104B0, 0x104D3}, {0x104D8, 0x104FB},\n\t{0x10500, 0x10527}, {0x10530, 0x10563}, {0x1056F, 0x1057A},\n\t{0x1057C, 0x1058A}, {0x1058C, 0x10592}, {0x10594, 0x10595},\n\t{0x10597, 0x105A1}, {0x105A3, 0x105B1}, {0x105B3, 0x105B9},\n\t{0x105BB, 0x105BC}, {0x105C0, 0x105F3}, {0x10600, 0x10736},\n\t{0x10740, 0x10755}, {0x10760, 0x10767}, {0x10780, 0x10785},\n\t{0x10787, 0x107B0}, {0x107B2, 0x107BA}, {0x10800, 0x10805},\n\t{0x10808, 0x10808}, {0x1080A, 0x10835}, {0x10837, 0x10838},\n\t{0x1083C, 0x1083C}, {0x1083F, 0x10855}, {0x10857, 0x1089E},\n\t{0x108A7, 0x108AF}, {0x108E0, 0x108F2}, {0x108F4, 0x108F5},\n\t{0x108FB, 0x1091B}, {0x1091F, 0x10939}, {0x1093F, 0x10959},\n\t{0x10980, 0x109B7}, {0x109BC, 0x109CF}, {0x109D2, 0x10A03},\n\t{0x10A05, 0x10A06}, {0x10A0C, 0x10A13}, {0x10A15, 0x10A17},\n\t{0x10A19, 0x10A35}, {0x10A38, 0x10A3A}, {0x10A3F, 0x10A48},\n\t{0x10A50, 0x10A58}, {0x10A60, 0x10A9F}, {0x10AC0, 0x10AE6},\n\t{0x10AEB, 0x10AF6}, {0x10B00, 0x10B35}, {0x10B39, 0x10B55},\n\t{0x10B58, 0x10B72}, {0x10B78, 0x10B91}, {0x10B99, 0x10B9C},\n\t{0x10BA9, 0x10BAF}, {0x10C00, 0x10C48}, {0x10C80, 0x10CB2},\n\t{0x10CC0, 0x10CF2}, {0x10CFA, 0x10D27}, {0x10D30, 0x10D39},\n\t{0x10D40, 0x10D65}, {0x10D69, 0x10D85}, {0x10D8E, 0x10D8F},\n\t{0x10E60, 0x10E7E}, {0x10E80, 0x10EA9}, {0x10EAB, 0x10EAD},\n\t{0x10EB0, 0x10EB1}, {0x10EC2, 0x10EC7}, {0x10ED0, 0x10ED8},\n\t{0x10EFA, 0x10F27}, {0x10F30, 0x10F59}, {0x10F70, 0x10F89},\n\t{0x10FB0, 0x10FCB}, {0x10FE0, 0x10FF6}, {0x11000, 0x1104D},\n\t{0x11052, 0x11075}, {0x1107F, 0x110C2}, {0x110CD, 0x110CD},\n\t{0x110D0, 0x110E8}, {0x110F0, 0x110F9}, {0x11100, 0x11134},\n\t{0x11136, 0x11147}, {0x11150, 0x11176}, {0x11180, 0x111DF},\n\t{0x111E1, 0x111F4}, {0x11200, 0x11211}, {0x11213, 0x11241},\n\t{0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128A, 0x1128D},\n\t{0x1128F, 0x1129D}, {0x1129F, 0x112A9}, {0x112B0, 0x112EA},\n\t{0x112F0, 0x112F9}, {0x11300, 0x11303}, {0x11305, 0x1130C},\n\t{0x1130F, 0x11310}, {0x11313, 0x11328}, {0x1132A, 0x11330},\n\t{0x11332, 0x11333}, {0x11335, 0x11339}, {0x1133B, 0x11344},\n\t{0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11350, 0x11350},\n\t{0x11357, 0x11357}, {0x1135D, 0x11363}, {0x11366, 0x1136C},\n\t{0x11370, 0x11374}, {0x11380, 0x11389}, {0x1138B, 0x1138B},\n\t{0x1138E, 0x1138E}, {0x11390, 0x113B5}, {0x113B7, 0x113C0},\n\t{0x113C2, 0x113C2}, {0x113C5, 0x113C5}, {0x113C7, 0x113CA},\n\t{0x113CC, 0x113D5}, {0x113D7, 0x113D8}, {0x113E1, 0x113E2},\n\t{0x11400, 0x1145B}, {0x1145D, 0x11461}, {0x11480, 0x114C7},\n\t{0x114D0, 0x114D9}, {0x11580, 0x115B5}, {0x115B8, 0x115DD},\n\t{0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C},\n\t{0x11680, 0x116B9}, {0x116C0, 0x116C9}, {0x116D0, 0x116E3},\n\t{0x11700, 0x1171A}, {0x1171D, 0x1172B}, {0x11730, 0x11746},\n\t{0x11800, 0x1183B}, {0x118A0, 0x118F2}, {0x118FF, 0x11906},\n\t{0x11909, 0x11909}, {0x1190C, 0x11913}, {0x11915, 0x11916},\n\t{0x11918, 0x11935}, {0x11937, 0x11938}, {0x1193B, 0x11946},\n\t{0x11950, 0x11959}, {0x119A0, 0x119A7}, {0x119AA, 0x119D7},\n\t{0x119DA, 0x119E4}, {0x11A00, 0x11A47}, {0x11A50, 0x11AA2},\n\t{0x11AB0, 0x11AF8}, {0x11B00, 0x11B09}, {0x11B60, 0x11B67},\n\t{0x11BC0, 0x11BE1}, {0x11BF0, 0x11BF9}, {0x11C00, 0x11C08},\n\t{0x11C0A, 0x11C36}, {0x11C38, 0x11C45}, {0x11C50, 0x11C6C},\n\t{0x11C70, 0x11C8F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CB6},\n\t{0x11D00, 0x11D06}, {0x11D08, 0x11D09}, {0x11D0B, 0x11D36},\n\t{0x11D3A, 0x11D3A}, {0x11D3C, 0x11D3D}, {0x11D3F, 0x11D47},\n\t{0x11D50, 0x11D59}, {0x11D60, 0x11D65}, {0x11D67, 0x11D68},\n\t{0x11D6A, 0x11D8E}, {0x11D90, 0x11D91}, {0x11D93, 0x11D98},\n\t{0x11DA0, 0x11DA9}, {0x11DB0, 0x11DDB}, {0x11DE0, 0x11DE9},\n\t{0x11EE0, 0x11EF8}, {0x11F00, 0x11F10}, {0x11F12, 0x11F3A},\n\t{0x11F3E, 0x11F5A}, {0x11FB0, 0x11FB0}, {0x11FC0, 0x11FF1},\n\t{0x11FFF, 0x12399}, {0x12400, 0x1246E}, {0x12470, 0x12474},\n\t{0x12480, 0x12543}, {0x12F90, 0x12FF2}, {0x13000, 0x13455},\n\t{0x13460, 0x143FA}, {0x14400, 0x14646}, {0x16100, 0x16139},\n\t{0x16800, 0x16A38}, {0x16A40, 0x16A5E}, {0x16A60, 0x16A69},\n\t{0x16A6E, 0x16ABE}, {0x16AC0, 0x16AC9}, {0x16AD0, 0x16AED},\n\t{0x16AF0, 0x16AF5}, {0x16B00, 0x16B45}, {0x16B50, 0x16B59},\n\t{0x16B5B, 0x16B61}, {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F},\n\t{0x16D40, 0x16D79}, {0x16E40, 0x16E9A}, {0x16EA0, 0x16EB8},\n\t{0x16EBB, 0x16ED3}, {0x16F00, 0x16F4A}, {0x16F4F, 0x16F87},\n\t{0x16F8F, 0x16F9F}, {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C},\n\t{0x1BC80, 0x1BC88}, {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BCA3},\n\t{0x1CC00, 0x1CCFC}, {0x1CD00, 0x1CEB3}, {0x1CEBA, 0x1CED0},\n\t{0x1CEE0, 0x1CEF0}, {0x1CF00, 0x1CF2D}, {0x1CF30, 0x1CF46},\n\t{0x1CF50, 0x1CFC3}, {0x1D000, 0x1D0F5}, {0x1D100, 0x1D126},\n\t{0x1D129, 0x1D1EA}, {0x1D200, 0x1D245}, {0x1D2C0, 0x1D2D3},\n\t{0x1D2E0, 0x1D2F3}, {0x1D377, 0x1D378}, {0x1D400, 0x1D454},\n\t{0x1D456, 0x1D49C}, {0x1D49E, 0x1D49F}, {0x1D4A2, 0x1D4A2},\n\t{0x1D4A5, 0x1D4A6}, {0x1D4A9, 0x1D4AC}, {0x1D4AE, 0x1D4B9},\n\t{0x1D4BB, 0x1D4BB}, {0x1D4BD, 0x1D4C3}, {0x1D4C5, 0x1D505},\n\t{0x1D507, 0x1D50A}, {0x1D50D, 0x1D514}, {0x1D516, 0x1D51C},\n\t{0x1D51E, 0x1D539}, {0x1D53B, 0x1D53E}, {0x1D540, 0x1D544},\n\t{0x1D546, 0x1D546}, {0x1D54A, 0x1D550}, {0x1D552, 0x1D6A5},\n\t{0x1D6A8, 0x1D7CB}, {0x1D7CE, 0x1DA8B}, {0x1DA9B, 0x1DA9F},\n\t{0x1DAA1, 0x1DAAF}, {0x1DF00, 0x1DF1E}, {0x1DF25, 0x1DF2A},\n\t{0x1E000, 0x1E006}, {0x1E008, 0x1E018}, {0x1E01B, 0x1E021},\n\t{0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, {0x1E030, 0x1E06D},\n\t{0x1E08F, 0x1E08F}, {0x1E100, 0x1E12C}, {0x1E130, 0x1E13D},\n\t{0x1E140, 0x1E149}, {0x1E14E, 0x1E14F}, {0x1E290, 0x1E2AE},\n\t{0x1E2C0, 0x1E2F9}, {0x1E2FF, 0x1E2FF}, {0x1E4D0, 0x1E4F9},\n\t{0x1E5D0, 0x1E5FA}, {0x1E5FF, 0x1E5FF}, {0x1E6C0, 0x1E6DE},\n\t{0x1E6E0, 0x1E6F5}, {0x1E6FE, 0x1E6FF}, {0x1E7E0, 0x1E7E6},\n\t{0x1E7E8, 0x1E7EB}, {0x1E7ED, 0x1E7EE}, {0x1E7F0, 0x1E7FE},\n\t{0x1E800, 0x1E8C4}, {0x1E8C7, 0x1E8D6}, {0x1E900, 0x1E94B},\n\t{0x1E950, 0x1E959}, {0x1E95E, 0x1E95F}, {0x1EC71, 0x1ECB4},\n\t{0x1ED01, 0x1ED3D}, {0x1EE00, 0x1EE03}, {0x1EE05, 0x1EE1F},\n\t{0x1EE21, 0x1EE22}, {0x1EE24, 0x1EE24}, {0x1EE27, 0x1EE27},\n\t{0x1EE29, 0x1EE32}, {0x1EE34, 0x1EE37}, {0x1EE39, 0x1EE39},\n\t{0x1EE3B, 0x1EE3B}, {0x1EE42, 0x1EE42}, {0x1EE47, 0x1EE47},\n\t{0x1EE49, 0x1EE49}, {0x1EE4B, 0x1EE4B}, {0x1EE4D, 0x1EE4F},\n\t{0x1EE51, 0x1EE52}, {0x1EE54, 0x1EE54}, {0x1EE57, 0x1EE57},\n\t{0x1EE59, 0x1EE59}, {0x1EE5B, 0x1EE5B}, {0x1EE5D, 0x1EE5D},\n\t{0x1EE5F, 0x1EE5F}, {0x1EE61, 0x1EE62}, {0x1EE64, 0x1EE64},\n\t{0x1EE67, 0x1EE6A}, {0x1EE6C, 0x1EE72}, {0x1EE74, 0x1EE77},\n\t{0x1EE79, 0x1EE7C}, {0x1EE7E, 0x1EE7E}, {0x1EE80, 0x1EE89},\n\t{0x1EE8B, 0x1EE9B}, {0x1EEA1, 0x1EEA3}, {0x1EEA5, 0x1EEA9},\n\t{0x1EEAB, 0x1EEBB}, {0x1EEF0, 0x1EEF1}, {0x1F000, 0x1F003},\n\t{0x1F005, 0x1F02B}, {0x1F030, 0x1F093}, {0x1F0A0, 0x1F0AE},\n\t{0x1F0B1, 0x1F0BF}, {0x1F0C1, 0x1F0CE}, {0x1F0D1, 0x1F0F5},\n\t{0x1F10B, 0x1F10F}, {0x1F12E, 0x1F12F}, {0x1F16A, 0x1F16F},\n\t{0x1F1AD, 0x1F1AD}, {0x1F1E6, 0x1F1FF}, {0x1F321, 0x1F32C},\n\t{0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, {0x1F394, 0x1F39F},\n\t{0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF}, {0x1F3F1, 0x1F3F3},\n\t{0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F}, {0x1F441, 0x1F441},\n\t{0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A}, {0x1F54F, 0x1F54F},\n\t{0x1F568, 0x1F579}, {0x1F57B, 0x1F594}, {0x1F597, 0x1F5A3},\n\t{0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F}, {0x1F6C6, 0x1F6CB},\n\t{0x1F6CD, 0x1F6CF}, {0x1F6D3, 0x1F6D4}, {0x1F6E0, 0x1F6EA},\n\t{0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F7D9}, {0x1F800, 0x1F80B},\n\t{0x1F810, 0x1F847}, {0x1F850, 0x1F859}, {0x1F860, 0x1F887},\n\t{0x1F890, 0x1F8AD}, {0x1F8B0, 0x1F8BB}, {0x1F8C0, 0x1F8C1},\n\t{0x1F8D0, 0x1F8D8}, {0x1F900, 0x1F90B}, {0x1F93B, 0x1F93B},\n\t{0x1F946, 0x1F946}, {0x1FA00, 0x1FA57}, {0x1FA60, 0x1FA6D},\n\t{0x1FB00, 0x1FB92}, {0x1FB94, 0x1FBFA}, {0xE0001, 0xE0001},\n\t{0xE0020, 0xE007F},\n}\n\nvar emoji = table{\n\t{0x203C, 0x203C}, {0x2049, 0x2049}, {0x2122, 0x2122},\n\t{0x2139, 0x2139}, {0x2194, 0x2199}, {0x21A9, 0x21AA},\n\t{0x231A, 0x231B}, {0x2328, 0x2328}, {0x23CF, 0x23CF},\n\t{0x23E9, 0x23F3}, {0x23F8, 0x23FA}, {0x24C2, 0x24C2},\n\t{0x25AA, 0x25AB}, {0x25B6, 0x25B6}, {0x25C0, 0x25C0},\n\t{0x25FB, 0x25FE}, {0x2600, 0x2604}, {0x260E, 0x260E},\n\t{0x2611, 0x2611}, {0x2614, 0x2615}, {0x2618, 0x2618},\n\t{0x261D, 0x261D}, {0x2620, 0x2620}, {0x2622, 0x2623},\n\t{0x2626, 0x2626}, {0x262A, 0x262A}, {0x262E, 0x262F},\n\t{0x2638, 0x263A}, {0x2640, 0x2640}, {0x2642, 0x2642},\n\t{0x2648, 0x2653}, {0x265F, 0x2660}, {0x2663, 0x2663},\n\t{0x2665, 0x2666}, {0x2668, 0x2668}, {0x267B, 0x267B},\n\t{0x267E, 0x267F}, {0x2692, 0x2697}, {0x2699, 0x2699},\n\t{0x269B, 0x269C}, {0x26A0, 0x26A1}, {0x26A7, 0x26A7},\n\t{0x26AA, 0x26AB}, {0x26B0, 0x26B1}, {0x26BD, 0x26BE},\n\t{0x26C4, 0x26C5}, {0x26C8, 0x26C8}, {0x26CE, 0x26CF},\n\t{0x26D1, 0x26D1}, {0x26D3, 0x26D4}, {0x26E9, 0x26EA},\n\t{0x26F0, 0x26F5}, {0x26F7, 0x26FA}, {0x26FD, 0x26FD},\n\t{0x2702, 0x2702}, {0x2705, 0x2705}, {0x2708, 0x270D},\n\t{0x270F, 0x270F}, {0x2712, 0x2712}, {0x2714, 0x2714},\n\t{0x2716, 0x2716}, {0x271D, 0x271D}, {0x2721, 0x2721},\n\t{0x2728, 0x2728}, {0x2733, 0x2734}, {0x2744, 0x2744},\n\t{0x2747, 0x2747}, {0x274C, 0x274C}, {0x274E, 0x274E},\n\t{0x2753, 0x2755}, {0x2757, 0x2757}, {0x2763, 0x2764},\n\t{0x2795, 0x2797}, {0x27A1, 0x27A1}, {0x27B0, 0x27B0},\n\t{0x27BF, 0x27BF}, {0x2934, 0x2935}, {0x2B05, 0x2B07},\n\t{0x2B1B, 0x2B1C}, {0x2B50, 0x2B50}, {0x2B55, 0x2B55},\n\t{0x3030, 0x3030}, {0x303D, 0x303D}, {0x3297, 0x3297},\n\t{0x3299, 0x3299}, {0x1F004, 0x1F004}, {0x1F02C, 0x1F02F},\n\t{0x1F094, 0x1F09F}, {0x1F0AF, 0x1F0B0}, {0x1F0C0, 0x1F0C0},\n\t{0x1F0CF, 0x1F0D0}, {0x1F0F6, 0x1F0FF}, {0x1F170, 0x1F171},\n\t{0x1F17E, 0x1F17F}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A},\n\t{0x1F1AE, 0x1F1E5}, {0x1F201, 0x1F20F}, {0x1F21A, 0x1F21A},\n\t{0x1F22F, 0x1F22F}, {0x1F232, 0x1F23A}, {0x1F23C, 0x1F23F},\n\t{0x1F249, 0x1F25F}, {0x1F266, 0x1F321}, {0x1F324, 0x1F393},\n\t{0x1F396, 0x1F397}, {0x1F399, 0x1F39B}, {0x1F39E, 0x1F3F0},\n\t{0x1F3F3, 0x1F3F5}, {0x1F3F7, 0x1F3FA}, {0x1F400, 0x1F4FD},\n\t{0x1F4FF, 0x1F53D}, {0x1F549, 0x1F54E}, {0x1F550, 0x1F567},\n\t{0x1F56F, 0x1F570}, {0x1F573, 0x1F57A}, {0x1F587, 0x1F587},\n\t{0x1F58A, 0x1F58D}, {0x1F590, 0x1F590}, {0x1F595, 0x1F596},\n\t{0x1F5A4, 0x1F5A5}, {0x1F5A8, 0x1F5A8}, {0x1F5B1, 0x1F5B2},\n\t{0x1F5BC, 0x1F5BC}, {0x1F5C2, 0x1F5C4}, {0x1F5D1, 0x1F5D3},\n\t{0x1F5DC, 0x1F5DE}, {0x1F5E1, 0x1F5E1}, {0x1F5E3, 0x1F5E3},\n\t{0x1F5E8, 0x1F5E8}, {0x1F5EF, 0x1F5EF}, {0x1F5F3, 0x1F5F3},\n\t{0x1F5FA, 0x1F64F}, {0x1F680, 0x1F6C5}, {0x1F6CB, 0x1F6D2},\n\t{0x1F6D5, 0x1F6E5}, {0x1F6E9, 0x1F6E9}, {0x1F6EB, 0x1F6F0},\n\t{0x1F6F3, 0x1F6FF}, {0x1F7DA, 0x1F7FF}, {0x1F80C, 0x1F80F},\n\t{0x1F848, 0x1F84F}, {0x1F85A, 0x1F85F}, {0x1F888, 0x1F88F},\n\t{0x1F8AE, 0x1F8AF}, {0x1F8BC, 0x1F8BF}, {0x1F8C2, 0x1F8CF},\n\t{0x1F8D9, 0x1F8FF}, {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945},\n\t{0x1F947, 0x1F9FF}, {0x1FA58, 0x1FA5F}, {0x1FA6E, 0x1FAFF},\n\t{0x1FC00, 0x1FFFD},\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-runewidth/runewidth_windows.go",
    "content": "//go:build windows && !appengine\n// +build windows,!appengine\n\npackage runewidth\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nvar (\n\tkernel32               = syscall.NewLazyDLL(\"kernel32\")\n\tprocGetConsoleOutputCP = kernel32.NewProc(\"GetConsoleOutputCP\")\n)\n\n// IsEastAsian return true if the current locale is CJK\nfunc IsEastAsian() bool {\n\tif os.Getenv(\"WT_SESSION\") != \"\" {\n\t\t// Windows Terminal always not use East Asian Ambiguous Width(s).\n\t\treturn false\n\t}\n\n\tr1, _, _ := procGetConsoleOutputCP.Call()\n\tif r1 == 0 {\n\t\treturn false\n\t}\n\n\tswitch int(r1) {\n\tcase 932, 51932, 936, 949, 950:\n\t\treturn true\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/.codecov.yml",
    "content": "coverage:\n  status:\n    project: off\n    patch: off\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/.gitignore",
    "content": "*.db\n*.exe\n*.dll\n*.o\n\n# VSCode\n.vscode\n\n# Exclude from upgrade\nupgrade/*.c\nupgrade/*.h\n\n# Exclude upgrade binary\nupgrade/upgrade\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014 Yasuhiro Matsumoto\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": "vendor/github.com/mattn/go-sqlite3/README.md",
    "content": "go-sqlite3\n==========\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mattn/go-sqlite3.svg)](https://pkg.go.dev/github.com/mattn/go-sqlite3)\n[![GitHub Actions](https://github.com/mattn/go-sqlite3/workflows/Go/badge.svg)](https://github.com/mattn/go-sqlite3/actions?query=workflow%3AGo)\n[![Financial Contributors on Open Collective](https://opencollective.com/mattn-go-sqlite3/all/badge.svg?label=financial+contributors)](https://opencollective.com/mattn-go-sqlite3) \n[![codecov](https://codecov.io/gh/mattn/go-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-sqlite3)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-sqlite3)](https://goreportcard.com/report/github.com/mattn/go-sqlite3)\n\nLatest stable version is v1.14 or later, not v2.\n\n~~**NOTE:** The increase to v2 was an accident. There were no major changes or features.~~\n\n# Description\n\nA sqlite3 driver that conforms to the built-in database/sql interface.\n\nSupported Golang version: See [.github/workflows/go.yaml](./.github/workflows/go.yaml).\n\nThis package follows the official [Golang Release Policy](https://golang.org/doc/devel/release.html#policy).\n\n### Overview\n\n- [go-sqlite3](#go-sqlite3)\n- [Description](#description)\n    - [Overview](#overview)\n- [Installation](#installation)\n- [API Reference](#api-reference)\n- [Connection String](#connection-string)\n  - [DSN Examples](#dsn-examples)\n- [Features](#features)\n    - [Usage](#usage)\n    - [Feature / Extension List](#feature--extension-list)\n- [Compilation](#compilation)\n  - [Android](#android)\n- [ARM](#arm)\n- [Cross Compile](#cross-compile)\n- [Compiling](#compiling)\n  - [Linux](#linux)\n    - [Alpine](#alpine)\n    - [Fedora](#fedora)\n    - [Ubuntu](#ubuntu)\n  - [macOS](#mac-osx)\n  - [Windows](#windows)\n  - [Errors](#errors)\n- [User Authentication](#user-authentication)\n  - [Compile](#compile)\n  - [Usage](#usage-1)\n    - [Create protected database](#create-protected-database)\n    - [Password Encoding](#password-encoding)\n      - [Available Encoders](#available-encoders)\n    - [Restrictions](#restrictions)\n    - [Support](#support)\n    - [User Management](#user-management)\n      - [SQL](#sql)\n        - [Examples](#examples)\n      - [*SQLiteConn](#sqliteconn)\n    - [Attached database](#attached-database)\n- [Extensions](#extensions)\n  - [Spatialite](#spatialite)\n- [FAQ](#faq)\n- [License](#license)\n- [Author](#author)\n\n# Installation\n\nThis package can be installed with the `go get` command:\n\n    go get github.com/mattn/go-sqlite3\n\n_go-sqlite3_ is *cgo* package.\nIf you want to build your app using go-sqlite3, you need gcc.\n\n***Important: because this is a `CGO` enabled package, you are required to set the environment variable `CGO_ENABLED=1` and have a `gcc` compiler present within your path.***\n\n# API Reference\n\nAPI documentation can be found [here](http://godoc.org/github.com/mattn/go-sqlite3).\n\nExamples can be found under the [examples](./_example) directory.\n\n# Connection String\n\nWhen creating a new SQLite database or connection to an existing one, with the file name additional options can be given.\nThis is also known as a DSN (Data Source Name) string.\n\nOptions are append after the filename of the SQLite database.\nThe database filename and options are separated by an `?` (Question Mark).\nOptions should be URL-encoded (see [url.QueryEscape](https://golang.org/pkg/net/url/#QueryEscape)).\n\nThis also applies when using an in-memory database instead of a file.\n\nOptions can be given using the following format: `KEYWORD=VALUE` and multiple options can be combined with the `&` ampersand.\n\nThis library supports DSN options of SQLite itself and provides additional options.\n\nBoolean values can be one of:\n* `0` `no` `false` `off`\n* `1` `yes` `true` `on`\n\n| Name | Key | Value(s) | Description |\n|------|-----|----------|-------------|\n| UA - Create | `_auth` | - | Create User Authentication, for more information see [User Authentication](#user-authentication) |\n| UA - Username | `_auth_user` | `string` | Username for User Authentication, for more information see [User Authentication](#user-authentication) |\n| UA - Password | `_auth_pass` | `string` | Password for User Authentication, for more information see [User Authentication](#user-authentication) |\n| UA - Crypt | `_auth_crypt` | <ul><li>SHA1</li><li>SSHA1</li><li>SHA256</li><li>SSHA256</li><li>SHA384</li><li>SSHA384</li><li>SHA512</li><li>SSHA512</li></ul> | Password encoder to use for User Authentication, for more information see [User Authentication](#user-authentication) |\n| UA - Salt | `_auth_salt` | `string` | Salt to use if the configure password encoder requires a salt, for User Authentication, for more information see [User Authentication](#user-authentication) |\n| Auto Vacuum | `_auto_vacuum` \\| `_vacuum` | <ul><li>`0` \\| `none`</li><li>`1` \\| `full`</li><li>`2` \\| `incremental`</li></ul> | For more information see [PRAGMA auto_vacuum](https://www.sqlite.org/pragma.html#pragma_auto_vacuum) |\n| Busy Timeout | `_busy_timeout` \\| `_timeout` | `int` | Specify value for sqlite3_busy_timeout. For more information see [PRAGMA busy_timeout](https://www.sqlite.org/pragma.html#pragma_busy_timeout) |\n| Case Sensitive LIKE | `_case_sensitive_like` \\| `_cslike` | `boolean` | For more information see [PRAGMA case_sensitive_like](https://www.sqlite.org/pragma.html#pragma_case_sensitive_like) |\n| Defer Foreign Keys | `_defer_foreign_keys` \\| `_defer_fk` | `boolean` | For more information see [PRAGMA defer_foreign_keys](https://www.sqlite.org/pragma.html#pragma_defer_foreign_keys) |\n| Foreign Keys | `_foreign_keys` \\| `_fk` | `boolean` | For more information see [PRAGMA foreign_keys](https://www.sqlite.org/pragma.html#pragma_foreign_keys) |\n| Ignore CHECK Constraints | `_ignore_check_constraints` | `boolean` | For more information see [PRAGMA ignore_check_constraints](https://www.sqlite.org/pragma.html#pragma_ignore_check_constraints) |\n| Immutable | `immutable` | `boolean` | For more information see [Immutable](https://www.sqlite.org/c3ref/open.html) |\n| Journal Mode | `_journal_mode` \\| `_journal` | <ul><li>DELETE</li><li>TRUNCATE</li><li>PERSIST</li><li>MEMORY</li><li>WAL</li><li>OFF</li></ul> | For more information see [PRAGMA journal_mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) |\n| Locking Mode | `_locking_mode` \\| `_locking` | <ul><li>NORMAL</li><li>EXCLUSIVE</li></ul> | For more information see [PRAGMA locking_mode](https://www.sqlite.org/pragma.html#pragma_locking_mode) |\n| Mode | `mode` | <ul><li>ro</li><li>rw</li><li>rwc</li><li>memory</li></ul> | Access Mode of the database. For more information see [SQLite Open](https://www.sqlite.org/c3ref/open.html) |\n| Mutex Locking | `_mutex` | <ul><li>no</li><li>full</li></ul> | Specify mutex mode. |\n| Query Only | `_query_only` | `boolean` | For more information see [PRAGMA query_only](https://www.sqlite.org/pragma.html#pragma_query_only) |\n| Recursive Triggers | `_recursive_triggers` \\| `_rt` | `boolean` | For more information see [PRAGMA recursive_triggers](https://www.sqlite.org/pragma.html#pragma_recursive_triggers) |\n| Secure Delete | `_secure_delete` | `boolean` \\| `FAST` | For more information see [PRAGMA secure_delete](https://www.sqlite.org/pragma.html#pragma_secure_delete) |\n| Shared-Cache Mode | `cache` | <ul><li>shared</li><li>private</li></ul> | Set cache mode for more information see [sqlite.org](https://www.sqlite.org/sharedcache.html) |\n| Synchronous | `_synchronous` \\| `_sync` | <ul><li>0 \\| OFF</li><li>1 \\| NORMAL</li><li>2 \\| FULL</li><li>3 \\| EXTRA</li></ul> | For more information see [PRAGMA synchronous](https://www.sqlite.org/pragma.html#pragma_synchronous) |\n| Time Zone Location | `_loc` | auto | Specify location of time format. |\n| Transaction Lock | `_txlock` | <ul><li>immediate</li><li>deferred</li><li>exclusive</li></ul> | Specify locking behavior for transactions. |\n| Writable Schema | `_writable_schema` | `Boolean` | When this pragma is on, the SQLITE_MASTER tables in which database can be changed using ordinary UPDATE, INSERT, and DELETE statements. Warning: misuse of this pragma can easily result in a corrupt database file. |\n| Cache Size | `_cache_size` | `int` | Maximum cache size; default is 2000K (2M). See [PRAGMA cache_size](https://sqlite.org/pragma.html#pragma_cache_size) |\n\n\n## DSN Examples\n\n```\nfile:test.db?cache=shared&mode=memory\n```\n\n# Features\n\nThis package allows additional configuration of features available within SQLite3 to be enabled or disabled by golang build constraints also known as build `tags`.\n\nClick [here](https://golang.org/pkg/go/build/#hdr-Build_Constraints) for more information about build tags / constraints.\n\n### Usage\n\nIf you wish to build this library with additional extensions / features, use the following command:\n\n```bash\ngo build -tags \"<FEATURE>\"\n```\n\nFor available features, see the extension list.\nWhen using multiple build tags, all the different tags should be space delimited.\n\nExample:\n\n```bash\ngo build -tags \"icu json1 fts5 secure_delete\"\n```\n\n### Feature / Extension List\n\n| Extension | Build Tag | Description |\n|-----------|-----------|-------------|\n| Additional Statistics | sqlite_stat4 | This option adds additional logic to the ANALYZE command and to the query planner that can help SQLite to chose a better query plan under certain situations. The ANALYZE command is enhanced to collect histogram data from all columns of every index and store that data in the sqlite_stat4 table.<br><br>The query planner will then use the histogram data to help it make better index choices. The downside of this compile-time option is that it violates the query planner stability guarantee making it more difficult to ensure consistent performance in mass-produced applications.<br><br>SQLITE_ENABLE_STAT4 is an enhancement of SQLITE_ENABLE_STAT3. STAT3 only recorded histogram data for the left-most column of each index whereas the STAT4 enhancement records histogram data from all columns of each index.<br><br>The SQLITE_ENABLE_STAT3 compile-time option is a no-op and is ignored if the SQLITE_ENABLE_STAT4 compile-time option is used |\n| Allow URI Authority | sqlite_allow_uri_authority | URI filenames normally throws an error if the authority section is not either empty or \"localhost\".<br><br>However, if SQLite is compiled with the SQLITE_ALLOW_URI_AUTHORITY compile-time option, then the URI is converted into a Uniform Naming Convention (UNC) filename and passed down to the underlying operating system that way |\n| App Armor | sqlite_app_armor | When defined, this C-preprocessor macro activates extra code that attempts to detect misuse of the SQLite API, such as passing in NULL pointers to required parameters or using objects after they have been destroyed. <br><br>App Armor is not available under `Windows`. |\n| Disable Load Extensions | sqlite_omit_load_extension | Loading of external extensions is enabled by default.<br><br>To disable extension loading add the build tag `sqlite_omit_load_extension`. |\n| Enable Serialization with `libsqlite3` | sqlite_serialize | Serialization and deserialization of a SQLite database is available by default, unless the build tag `libsqlite3` is set.<br><br>To enable this functionality even if `libsqlite3` is set, add the build tag `sqlite_serialize`. |\n| Foreign Keys | sqlite_foreign_keys | This macro determines whether enforcement of foreign key constraints is enabled or disabled by default for new database connections.<br><br>Each database connection can always turn enforcement of foreign key constraints on and off and run-time using the foreign_keys pragma.<br><br>Enforcement of foreign key constraints is normally off by default, but if this compile-time parameter is set to 1, enforcement of foreign key constraints will be on by default | \n| Full Auto Vacuum | sqlite_vacuum_full | Set the default auto vacuum to full |\n| Incremental Auto Vacuum | sqlite_vacuum_incr | Set the default auto vacuum to incremental |\n| Full Text Search Engine | sqlite_fts5 | When this option is defined in the amalgamation, versions 5 of the full-text search engine (fts5) is added to the build automatically |\n|  International Components for Unicode | sqlite_icu | This option causes the International Components for Unicode or \"ICU\" extension to SQLite to be added to the build |\n| Introspect PRAGMAS | sqlite_introspect | This option adds some extra PRAGMA statements. <ul><li>PRAGMA function_list</li><li>PRAGMA module_list</li><li>PRAGMA pragma_list</li></ul> |\n| JSON SQL Functions | sqlite_json | When this option is defined in the amalgamation, the JSON SQL functions are added to the build automatically |\n| Math Functions | sqlite_math_functions | This compile-time option enables built-in scalar math functions. For more information see [Built-In Mathematical SQL Functions](https://www.sqlite.org/lang_mathfunc.html) |\n| OS Trace | sqlite_os_trace | This option enables OSTRACE() debug logging. This can be verbose and should not be used in production. |\n| Percentile | sqlite_percentile | This option enables [The Percentile Extension](sqlite.org/percentile.html). |\n| Pre Update Hook | sqlite_preupdate_hook | Registers a callback function that is invoked prior to each INSERT, UPDATE, and DELETE operation on a database table. |\n| Secure Delete | sqlite_secure_delete | This compile-time option changes the default setting of the secure_delete pragma.<br><br>When this option is not used, secure_delete defaults to off. When this option is present, secure_delete defaults to on.<br><br>The secure_delete setting causes deleted content to be overwritten with zeros. There is a small performance penalty since additional I/O must occur.<br><br>On the other hand, secure_delete can prevent fragments of sensitive information from lingering in unused parts of the database file after it has been deleted. See the documentation on the secure_delete pragma for additional information |\n| Secure Delete (FAST) | sqlite_secure_delete_fast | For more information see [PRAGMA secure_delete](https://www.sqlite.org/pragma.html#pragma_secure_delete) |\n| Tracing / Debug | sqlite_trace | Activate trace functions |\n| User Authentication | sqlite_userauth | SQLite User Authentication see [User Authentication](#user-authentication) for more information. |\n| Virtual Tables | sqlite_vtable | SQLite Virtual Tables see [SQLite Official VTABLE Documentation](https://www.sqlite.org/vtab.html) for more information, and a [full example here](https://github.com/mattn/go-sqlite3/tree/master/_example/vtable) |\n\n# Compilation\n\nThis package requires the `CGO_ENABLED=1` environment variable if not set by default, and the presence of the `gcc` compiler.\n\nIf you need to add additional CFLAGS or LDFLAGS to the build command, and do not want to modify this package, then this can be achieved by using the `CGO_CFLAGS` and `CGO_LDFLAGS` environment variables.\n\n## Android\n\nThis package can be compiled for android.\nCompile with:\n\n```bash\ngo build -tags \"android\"\n```\n\nFor more information see [#201](https://github.com/mattn/go-sqlite3/issues/201)\n\n# ARM\n\nTo compile for `ARM` use the following environment:\n\n```bash\nenv CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ \\\n    CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 \\\n    go build -v \n```\n\nAdditional information:\n- [#242](https://github.com/mattn/go-sqlite3/issues/242)\n- [#504](https://github.com/mattn/go-sqlite3/issues/504)\n\n# Cross Compile\n\nThis library can be cross-compiled.\n\nIn some cases you are required to the `CC` environment variable with the cross compiler.\n\n## Cross Compiling from macOS\nThe simplest way to cross compile from macOS is to use [xgo](https://github.com/karalabe/xgo).\n\nSteps:\n- Install [musl-cross](https://github.com/FiloSottile/homebrew-musl-cross) (`brew install FiloSottile/musl-cross/musl-cross`).\n- Run `CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ GOARCH=amd64 GOOS=linux CGO_ENABLED=1 go build -ldflags \"-linkmode external -extldflags -static\"`.\n\nPlease refer to the project's [README](https://github.com/FiloSottile/homebrew-musl-cross#readme) for further information.\n\n# Compiling\n\n## Linux\n\nTo compile this package on Linux, you must install the development tools for your linux distribution.\n\nTo compile under linux use the build tag `linux`.\n\n```bash\ngo build -tags \"linux\"\n```\n\nIf you wish to link directly to libsqlite3 then you can use the `libsqlite3` build tag.\n\n```\ngo build -tags \"libsqlite3 linux\"\n```\n\n### Alpine\n\nWhen building in an `alpine` container  run the following command before building:\n\n```\napk add --update gcc musl-dev\n```\n\n### Fedora\n\n```bash\nsudo yum groupinstall \"Development Tools\" \"Development Libraries\"\n```\n\n### Ubuntu\n\n```bash\nsudo apt-get install build-essential\n```\n\n## macOS\n\nmacOS should have all the tools present to compile this package. If not, install XCode to add all the developers tools.\n\nRequired dependency:\n\n```bash\nbrew install sqlite3\n```\n\nFor macOS, there is an additional package to install which is required if you wish to build the `icu` extension.\n\nThis additional package can be installed with `homebrew`:\n\n```bash\nbrew upgrade icu4c\n```\n\nTo compile for macOS on x86:\n\n```bash\ngo build -tags \"darwin amd64\"\n```\n\nTo compile for macOS on ARM chips:\n\n```bash\ngo build -tags \"darwin arm64\"\n```\n\nIf you wish to link directly to libsqlite3, use the `libsqlite3` build tag:\n\n```\n# x86 \ngo build -tags \"libsqlite3 darwin amd64\"\n# ARM\ngo build -tags \"libsqlite3 darwin arm64\"\n```\n\nAdditional information:\n- [#206](https://github.com/mattn/go-sqlite3/issues/206)\n- [#404](https://github.com/mattn/go-sqlite3/issues/404)\n\n## Windows\n\nTo compile this package on Windows, you must have the `gcc` compiler installed.\n\n1) Install a Windows `gcc` toolchain.\n2) Add the `bin` folder to the Windows path, if the installer did not do this by default.\n3) Open a terminal for the TDM-GCC toolchain, which can be found in the Windows Start menu.\n4) Navigate to your project folder and run the `go build ...` command for this package.\n\nFor example the TDM-GCC Toolchain can be found [here](https://jmeubank.github.io/tdm-gcc/).\n\n## Errors\n\n- Compile error: `can not be used when making a shared object; recompile with -fPIC`\n\n    When receiving a compile time error referencing recompile with `-FPIC` then you\n    are probably using a hardend system.\n\n    You can compile the library on a hardend system with the following command.\n\n    ```bash\n    go build -ldflags '-extldflags=-fno-PIC'\n    ```\n\n    More details see [#120](https://github.com/mattn/go-sqlite3/issues/120)\n\n- Can't build go-sqlite3 on windows 64bit.\n\n    > Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit.\n    > See: [#27](https://github.com/mattn/go-sqlite3/issues/27)\n\n- `go get github.com/mattn/go-sqlite3` throws compilation error.\n\n    `gcc` throws: `internal compiler error`\n\n    Remove the download repository from your disk and try re-install with:\n\n    ```bash\n    go install github.com/mattn/go-sqlite3\n    ```\n\n# User Authentication\n\n***This is deprecated***\n\nThis package supports the SQLite User Authentication module.\n\n## Compile\n\nTo use the User authentication module, the package has to be compiled with the tag `sqlite_userauth`. See [Features](#features).\n\n## Usage\n\n### Create protected database\n\nTo create a database protected by user authentication, provide the following argument to the connection string `_auth`.\nThis will enable user authentication within the database. This option however requires two additional arguments:\n\n- `_auth_user`\n- `_auth_pass`\n\nWhen `_auth` is present in the connection string user authentication will be enabled and the provided user will be created\nas an `admin` user. After initial creation, the parameter `_auth` has no effect anymore and can be omitted from the connection string.\n\nExample connection strings:\n\nCreate an user authentication database with user `admin` and password `admin`:\n\n`file:test.s3db?_auth&_auth_user=admin&_auth_pass=admin`\n\nCreate an user authentication database with user `admin` and password `admin` and use `SHA1` for the password encoding:\n\n`file:test.s3db?_auth&_auth_user=admin&_auth_pass=admin&_auth_crypt=sha1`\n\n### Password Encoding\n\nThe passwords within the user authentication module of SQLite are encoded with the SQLite function `sqlite_cryp`.\nThis function uses a ceasar-cypher which is quite insecure.\nThis library provides several additional password encoders which can be configured through the connection string.\n\nThe password cypher can be configured with the key `_auth_crypt`. And if the configured password encoder also requires an\nsalt this can be configured with `_auth_salt`.\n\n#### Available Encoders\n\n- SHA1\n- SSHA1 (Salted SHA1)\n- SHA256\n- SSHA256 (salted SHA256)\n- SHA384\n- SSHA384 (salted SHA384)\n- SHA512\n- SSHA512 (salted SHA512)\n\n### Restrictions\n\nOperations on the database regarding user management can only be preformed by an administrator user.\n\n### Support\n\nThe user authentication supports two kinds of users:\n\n- administrators\n- regular users\n\n### User Management\n\nUser management can be done by directly using the `*SQLiteConn` or by SQL.\n\n#### SQL\n\nThe following sql functions are available for user management:\n\n| Function | Arguments | Description |\n|----------|-----------|-------------|\n| `authenticate` | username `string`, password `string` | Will authenticate an user, this is done by the connection; and should not be used manually. |\n| `auth_user_add` | username `string`, password `string`, admin `int` | This function will add an user to the database.<br>if the database is not protected by user authentication it will enable it. Argument `admin` is an integer identifying if the added user should be an administrator. Only Administrators can add administrators. |\n| `auth_user_change` | username `string`, password `string`, admin `int` | Function to modify an user. Users can change their own password, but only an administrator can change the administrator flag. |\n| `authUserDelete` | username `string` | Delete an user from the database. Can only be used by an administrator. The current logged in administrator cannot be deleted. This is to make sure their is always an administrator remaining. |\n\nThese functions will return an integer:\n\n- 0 (SQLITE_OK)\n- 23 (SQLITE_AUTH) Failed to perform due to authentication or insufficient privileges\n\n##### Examples\n\n```sql\n// Autheticate user\n// Create Admin User\nSELECT auth_user_add('admin2', 'admin2', 1);\n\n// Change password for user\nSELECT auth_user_change('user', 'userpassword', 0);\n\n// Delete user\nSELECT user_delete('user');\n```\n\n#### *SQLiteConn\n\nThe following functions are available for User authentication from the `*SQLiteConn`:\n\n| Function | Description |\n|----------|-------------|\n| `Authenticate(username, password string) error` | Authenticate user |\n| `AuthUserAdd(username, password string, admin bool) error` | Add user |\n| `AuthUserChange(username, password string, admin bool) error` | Modify user |\n| `AuthUserDelete(username string) error` | Delete user |\n\n### Attached database\n\nWhen using attached databases, SQLite will use the authentication from the `main` database for the attached database(s).\n\n# Extensions\n\nIf you want your own extension to be listed here, or you want to add a reference to an extension; please submit an Issue for this.\n\n## Spatialite\n\nSpatialite is available as an extension to SQLite, and can be used in combination with this repository.\nFor an example, see [shaxbee/go-spatialite](https://github.com/shaxbee/go-spatialite).\n\n## extension-functions.c from SQLite3 Contrib\n\nextension-functions.c is available as an extension to SQLite, and provides the following functions:\n\n- Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi.\n- String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter.\n- Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile\n\nFor an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/dinedal/go-sqlite3-extension-functions).\n\n# FAQ\n\n- Getting insert error while query is opened.\n\n    > You can pass some arguments into the connection string, for example, a URI.\n    > See: [#39](https://github.com/mattn/go-sqlite3/issues/39)\n\n- Do you want to cross compile? mingw on Linux or Mac?\n\n    > See: [#106](https://github.com/mattn/go-sqlite3/issues/106)\n    > See also: http://www.limitlessfx.com/cross-compile-golang-app-for-windows-from-linux.html\n\n- Want to get time.Time with current locale\n\n    Use `_loc=auto` in SQLite3 filename schema like `file:foo.db?_loc=auto`.\n\n- Can I use this in multiple routines concurrently?\n\n    Yes for readonly. But not for writable. See [#50](https://github.com/mattn/go-sqlite3/issues/50), [#51](https://github.com/mattn/go-sqlite3/issues/51), [#209](https://github.com/mattn/go-sqlite3/issues/209), [#274](https://github.com/mattn/go-sqlite3/issues/274).\n\n- Why I'm getting `no such table` error?\n\n    Why is it racy if I use a `sql.Open(\"sqlite3\", \":memory:\")` database?\n\n    Each connection to `\":memory:\"` opens a brand new in-memory sql database, so if\n    the stdlib's sql engine happens to open another connection and you've only\n    specified `\":memory:\"`, that connection will see a brand new database. A\n    workaround is to use `\"file::memory:?cache=shared\"` (or `\"file:foobar?mode=memory&cache=shared\"`). Every\n    connection to this string will point to the same in-memory database.\n    \n    Note that if the last database connection in the pool closes, the in-memory database is deleted. Make sure the [max idle connection limit](https://golang.org/pkg/database/sql/#DB.SetMaxIdleConns) is > 0, and the [connection lifetime](https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime) is infinite.\n    \n    For more information see:\n    * [#204](https://github.com/mattn/go-sqlite3/issues/204)\n    * [#511](https://github.com/mattn/go-sqlite3/issues/511)\n    * https://www.sqlite.org/sharedcache.html#shared_cache_and_in_memory_databases\n    * https://www.sqlite.org/inmemorydb.html#sharedmemdb\n\n- Reading from database with large amount of goroutines fails on OSX.\n\n    OS X limits OS-wide to not have more than 1000 files open simultaneously by default.\n\n    For more information, see [#289](https://github.com/mattn/go-sqlite3/issues/289)\n\n- Trying to execute a `.` (dot) command throws an error.\n\n    Error: `Error: near \".\": syntax error`\n    Dot command are part of SQLite3 CLI, not of this library.\n\n    You need to implement the feature or call the sqlite3 cli.\n\n    More information see [#305](https://github.com/mattn/go-sqlite3/issues/305).\n\n- Error: `database is locked`\n\n    When you get a database is locked, please use the following options.\n\n    Add to DSN: `cache=shared`\n\n    Example:\n    ```go\n    db, err := sql.Open(\"sqlite3\", \"file:locked.sqlite?cache=shared\")\n    ```\n\n    Next, please set the database connections of the SQL package to 1:\n    \n    ```go\n    db.SetMaxOpenConns(1)\n    ```\n\n    For more information, see [#209](https://github.com/mattn/go-sqlite3/issues/209).\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who [[contribute](CONTRIBUTING.md)].\n<a href=\"https://github.com/mattn/go-sqlite3/graphs/contributors\"><img src=\"https://opencollective.com/mattn-go-sqlite3/contributors.svg?width=890&button=false\" /></a>\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute here](https://opencollective.com/mattn-go-sqlite3/contribute)].\n\n#### Individuals\n\n<a href=\"https://opencollective.com/mattn-go-sqlite3\"><img src=\"https://opencollective.com/mattn-go-sqlite3/individuals.svg?width=890\"></a>\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/mattn-go-sqlite3/contribute)]\n\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/0/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/1/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/2/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/3/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/4/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/5/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/6/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/7/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/8/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/mattn-go-sqlite3/organization/9/website\"><img src=\"https://opencollective.com/mattn-go-sqlite3/organization/9/avatar.svg\"></a>\n\n# License\n\nMIT: http://mattn.mit-license.org/2018\n\nsqlite3-binding.c, sqlite3-binding.h, sqlite3ext.h\n\nThe -binding suffix was added to avoid build failures under gccgo.\n\nIn this repository, those files are an amalgamation of code that was copied from SQLite3. The license of that code is the same as the license of SQLite3.\n\n# Author\n\nYasuhiro Matsumoto (a.k.a mattn)\n\nG.J.R. Timmer\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/backup.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n*/\nimport \"C\"\nimport (\n\t\"runtime\"\n\t\"unsafe\"\n)\n\n// SQLiteBackup implement interface of Backup.\ntype SQLiteBackup struct {\n\tb *C.sqlite3_backup\n}\n\n// Backup make backup from src to dest.\nfunc (destConn *SQLiteConn) Backup(dest string, srcConn *SQLiteConn, src string) (*SQLiteBackup, error) {\n\tdestptr := C.CString(dest)\n\tdefer C.free(unsafe.Pointer(destptr))\n\tsrcptr := C.CString(src)\n\tdefer C.free(unsafe.Pointer(srcptr))\n\n\tif b := C.sqlite3_backup_init(destConn.db, destptr, srcConn.db, srcptr); b != nil {\n\t\tbb := &SQLiteBackup{b: b}\n\t\truntime.SetFinalizer(bb, (*SQLiteBackup).Finish)\n\t\treturn bb, nil\n\t}\n\treturn nil, destConn.lastError()\n}\n\n// Step to backs up for one step. Calls the underlying `sqlite3_backup_step`\n// function.  This function returns a boolean indicating if the backup is done\n// and an error signalling any other error. Done is returned if the underlying\n// C function returns SQLITE_DONE (Code 101)\nfunc (b *SQLiteBackup) Step(p int) (bool, error) {\n\tret := C.sqlite3_backup_step(b.b, C.int(p))\n\tif ret == C.SQLITE_DONE {\n\t\treturn true, nil\n\t} else if ret != 0 && ret != C.SQLITE_LOCKED && ret != C.SQLITE_BUSY {\n\t\treturn false, Error{Code: ErrNo(ret)}\n\t}\n\treturn false, nil\n}\n\n// Remaining return whether have the rest for backup.\nfunc (b *SQLiteBackup) Remaining() int {\n\treturn int(C.sqlite3_backup_remaining(b.b))\n}\n\n// PageCount return count of pages.\nfunc (b *SQLiteBackup) PageCount() int {\n\treturn int(C.sqlite3_backup_pagecount(b.b))\n}\n\n// Finish close backup.\nfunc (b *SQLiteBackup) Finish() error {\n\treturn b.Close()\n}\n\n// Close close backup.\nfunc (b *SQLiteBackup) Close() error {\n\tret := C.sqlite3_backup_finish(b.b)\n\n\t// sqlite3_backup_finish() never fails, it just returns the\n\t// error code from previous operations, so clean up before\n\t// checking and returning an error\n\tb.b = nil\n\truntime.SetFinalizer(b, nil)\n\n\tif ret != 0 {\n\t\treturn Error{Code: ErrNo(ret)}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/callback.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\n// You can't export a Go function to C and have definitions in the C\n// preamble in the same file, so we have to have callbackTrampoline in\n// its own file. Because we need a separate file anyway, the support\n// code for SQLite custom functions is in here.\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n\nvoid _sqlite3_result_text(sqlite3_context* ctx, const char* s);\nvoid _sqlite3_result_blob(sqlite3_context* ctx, const void* b, int l);\n*/\nimport \"C\"\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"sync\"\n\t\"unsafe\"\n)\n\n//export callbackTrampoline\nfunc callbackTrampoline(ctx *C.sqlite3_context, argc int, argv **C.sqlite3_value) {\n\targs := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]\n\tfi := lookupHandle(C.sqlite3_user_data(ctx)).(*functionInfo)\n\tfi.Call(ctx, args)\n}\n\n//export stepTrampoline\nfunc stepTrampoline(ctx *C.sqlite3_context, argc C.int, argv **C.sqlite3_value) {\n\targs := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:int(argc):int(argc)]\n\tai := lookupHandle(C.sqlite3_user_data(ctx)).(*aggInfo)\n\tai.Step(ctx, args)\n}\n\n//export doneTrampoline\nfunc doneTrampoline(ctx *C.sqlite3_context) {\n\tai := lookupHandle(C.sqlite3_user_data(ctx)).(*aggInfo)\n\tai.Done(ctx)\n}\n\n//export compareTrampoline\nfunc compareTrampoline(handlePtr unsafe.Pointer, la C.int, a *C.char, lb C.int, b *C.char) C.int {\n\tcmp := lookupHandle(handlePtr).(func(string, string) int)\n\treturn C.int(cmp(C.GoStringN(a, la), C.GoStringN(b, lb)))\n}\n\n//export commitHookTrampoline\nfunc commitHookTrampoline(handle unsafe.Pointer) int {\n\tcallback := lookupHandle(handle).(func() int)\n\treturn callback()\n}\n\n//export rollbackHookTrampoline\nfunc rollbackHookTrampoline(handle unsafe.Pointer) {\n\tcallback := lookupHandle(handle).(func())\n\tcallback()\n}\n\n//export updateHookTrampoline\nfunc updateHookTrampoline(handle unsafe.Pointer, op int, db *C.char, table *C.char, rowid int64) {\n\tcallback := lookupHandle(handle).(func(int, string, string, int64))\n\tcallback(op, C.GoString(db), C.GoString(table), rowid)\n}\n\n//export authorizerTrampoline\nfunc authorizerTrampoline(handle unsafe.Pointer, op int, arg1 *C.char, arg2 *C.char, arg3 *C.char) int {\n\tcallback := lookupHandle(handle).(func(int, string, string, string) int)\n\treturn callback(op, C.GoString(arg1), C.GoString(arg2), C.GoString(arg3))\n}\n\n//export preUpdateHookTrampoline\nfunc preUpdateHookTrampoline(handle unsafe.Pointer, dbHandle uintptr, op int, db *C.char, table *C.char, oldrowid int64, newrowid int64) {\n\thval := lookupHandleVal(handle)\n\tdata := SQLitePreUpdateData{\n\t\tConn:         hval.db,\n\t\tOp:           op,\n\t\tDatabaseName: C.GoString(db),\n\t\tTableName:    C.GoString(table),\n\t\tOldRowID:     oldrowid,\n\t\tNewRowID:     newrowid,\n\t}\n\tcallback := hval.val.(func(SQLitePreUpdateData))\n\tcallback(data)\n}\n\n// Use handles to avoid passing Go pointers to C.\ntype handleVal struct {\n\tdb  *SQLiteConn\n\tval any\n}\n\nvar handleLock sync.Mutex\nvar handleVals = make(map[unsafe.Pointer]handleVal)\n\nfunc newHandle(db *SQLiteConn, v any) unsafe.Pointer {\n\thandleLock.Lock()\n\tdefer handleLock.Unlock()\n\tval := handleVal{db: db, val: v}\n\tvar p unsafe.Pointer = C.malloc(C.size_t(1))\n\tif p == nil {\n\t\tpanic(\"can't allocate 'cgo-pointer hack index pointer': ptr == nil\")\n\t}\n\thandleVals[p] = val\n\treturn p\n}\n\nfunc lookupHandleVal(handle unsafe.Pointer) handleVal {\n\thandleLock.Lock()\n\tdefer handleLock.Unlock()\n\treturn handleVals[handle]\n}\n\nfunc lookupHandle(handle unsafe.Pointer) any {\n\treturn lookupHandleVal(handle).val\n}\n\nfunc deleteHandles(db *SQLiteConn) {\n\thandleLock.Lock()\n\tdefer handleLock.Unlock()\n\tfor handle, val := range handleVals {\n\t\tif val.db == db {\n\t\t\tdelete(handleVals, handle)\n\t\t\tC.free(handle)\n\t\t}\n\t}\n}\n\n// This is only here so that tests can refer to it.\ntype callbackArgRaw C.sqlite3_value\n\ntype callbackArgConverter func(*C.sqlite3_value) (reflect.Value, error)\n\ntype callbackArgCast struct {\n\tf   callbackArgConverter\n\ttyp reflect.Type\n}\n\nfunc (c callbackArgCast) Run(v *C.sqlite3_value) (reflect.Value, error) {\n\tval, err := c.f(v)\n\tif err != nil {\n\t\treturn reflect.Value{}, err\n\t}\n\tif !val.Type().ConvertibleTo(c.typ) {\n\t\treturn reflect.Value{}, fmt.Errorf(\"cannot convert %s to %s\", val.Type(), c.typ)\n\t}\n\treturn val.Convert(c.typ), nil\n}\n\nfunc callbackArgInt64(v *C.sqlite3_value) (reflect.Value, error) {\n\tif C.sqlite3_value_type(v) != C.SQLITE_INTEGER {\n\t\treturn reflect.Value{}, fmt.Errorf(\"argument must be an INTEGER\")\n\t}\n\treturn reflect.ValueOf(int64(C.sqlite3_value_int64(v))), nil\n}\n\nfunc callbackArgBool(v *C.sqlite3_value) (reflect.Value, error) {\n\tif C.sqlite3_value_type(v) != C.SQLITE_INTEGER {\n\t\treturn reflect.Value{}, fmt.Errorf(\"argument must be an INTEGER\")\n\t}\n\ti := int64(C.sqlite3_value_int64(v))\n\tval := false\n\tif i != 0 {\n\t\tval = true\n\t}\n\treturn reflect.ValueOf(val), nil\n}\n\nfunc callbackArgFloat64(v *C.sqlite3_value) (reflect.Value, error) {\n\tif C.sqlite3_value_type(v) != C.SQLITE_FLOAT {\n\t\treturn reflect.Value{}, fmt.Errorf(\"argument must be a FLOAT\")\n\t}\n\treturn reflect.ValueOf(float64(C.sqlite3_value_double(v))), nil\n}\n\nfunc callbackArgBytes(v *C.sqlite3_value) (reflect.Value, error) {\n\tswitch C.sqlite3_value_type(v) {\n\tcase C.SQLITE_BLOB:\n\t\tl := C.sqlite3_value_bytes(v)\n\t\tp := C.sqlite3_value_blob(v)\n\t\treturn reflect.ValueOf(C.GoBytes(p, l)), nil\n\tcase C.SQLITE_TEXT:\n\t\tl := C.sqlite3_value_bytes(v)\n\t\tc := unsafe.Pointer(C.sqlite3_value_text(v))\n\t\treturn reflect.ValueOf(C.GoBytes(c, l)), nil\n\tdefault:\n\t\treturn reflect.Value{}, fmt.Errorf(\"argument must be BLOB or TEXT\")\n\t}\n}\n\nfunc callbackArgString(v *C.sqlite3_value) (reflect.Value, error) {\n\tswitch C.sqlite3_value_type(v) {\n\tcase C.SQLITE_BLOB:\n\t\tl := C.sqlite3_value_bytes(v)\n\t\tp := (*C.char)(C.sqlite3_value_blob(v))\n\t\treturn reflect.ValueOf(C.GoStringN(p, l)), nil\n\tcase C.SQLITE_TEXT:\n\t\tc := (*C.char)(unsafe.Pointer(C.sqlite3_value_text(v)))\n\t\treturn reflect.ValueOf(C.GoString(c)), nil\n\tdefault:\n\t\treturn reflect.Value{}, fmt.Errorf(\"argument must be BLOB or TEXT\")\n\t}\n}\n\nfunc callbackArgGeneric(v *C.sqlite3_value) (reflect.Value, error) {\n\tswitch C.sqlite3_value_type(v) {\n\tcase C.SQLITE_INTEGER:\n\t\treturn callbackArgInt64(v)\n\tcase C.SQLITE_FLOAT:\n\t\treturn callbackArgFloat64(v)\n\tcase C.SQLITE_TEXT:\n\t\treturn callbackArgString(v)\n\tcase C.SQLITE_BLOB:\n\t\treturn callbackArgBytes(v)\n\tcase C.SQLITE_NULL:\n\t\t// Interpret NULL as a nil byte slice.\n\t\tvar ret []byte\n\t\treturn reflect.ValueOf(ret), nil\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n}\n\nfunc callbackArg(typ reflect.Type) (callbackArgConverter, error) {\n\tswitch typ.Kind() {\n\tcase reflect.Interface:\n\t\tif typ.NumMethod() != 0 {\n\t\t\treturn nil, errors.New(\"the only supported interface type is any\")\n\t\t}\n\t\treturn callbackArgGeneric, nil\n\tcase reflect.Slice:\n\t\tif typ.Elem().Kind() != reflect.Uint8 {\n\t\t\treturn nil, errors.New(\"the only supported slice type is []byte\")\n\t\t}\n\t\treturn callbackArgBytes, nil\n\tcase reflect.String:\n\t\treturn callbackArgString, nil\n\tcase reflect.Bool:\n\t\treturn callbackArgBool, nil\n\tcase reflect.Int64:\n\t\treturn callbackArgInt64, nil\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Int, reflect.Uint:\n\t\tc := callbackArgCast{callbackArgInt64, typ}\n\t\treturn c.Run, nil\n\tcase reflect.Float64:\n\t\treturn callbackArgFloat64, nil\n\tcase reflect.Float32:\n\t\tc := callbackArgCast{callbackArgFloat64, typ}\n\t\treturn c.Run, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"don't know how to convert to %s\", typ)\n\t}\n}\n\nfunc callbackConvertArgs(argv []*C.sqlite3_value, converters []callbackArgConverter, variadic callbackArgConverter) ([]reflect.Value, error) {\n\tvar args []reflect.Value\n\n\tif len(argv) < len(converters) {\n\t\treturn nil, fmt.Errorf(\"function requires at least %d arguments\", len(converters))\n\t}\n\n\tfor i, arg := range argv[:len(converters)] {\n\t\tv, err := converters[i](arg)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\targs = append(args, v)\n\t}\n\n\tif variadic != nil {\n\t\tfor _, arg := range argv[len(converters):] {\n\t\t\tv, err := variadic(arg)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\targs = append(args, v)\n\t\t}\n\t}\n\treturn args, nil\n}\n\ntype callbackRetConverter func(*C.sqlite3_context, reflect.Value) error\n\nfunc callbackRetInteger(ctx *C.sqlite3_context, v reflect.Value) error {\n\tswitch v.Type().Kind() {\n\tcase reflect.Int64:\n\tcase reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Int, reflect.Uint:\n\t\tv = v.Convert(reflect.TypeOf(int64(0)))\n\tcase reflect.Bool:\n\t\tb := v.Interface().(bool)\n\t\tif b {\n\t\t\tv = reflect.ValueOf(int64(1))\n\t\t} else {\n\t\t\tv = reflect.ValueOf(int64(0))\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"cannot convert %s to INTEGER\", v.Type())\n\t}\n\n\tC.sqlite3_result_int64(ctx, C.sqlite3_int64(v.Interface().(int64)))\n\treturn nil\n}\n\nfunc callbackRetFloat(ctx *C.sqlite3_context, v reflect.Value) error {\n\tswitch v.Type().Kind() {\n\tcase reflect.Float64:\n\tcase reflect.Float32:\n\t\tv = v.Convert(reflect.TypeOf(float64(0)))\n\tdefault:\n\t\treturn fmt.Errorf(\"cannot convert %s to FLOAT\", v.Type())\n\t}\n\n\tC.sqlite3_result_double(ctx, C.double(v.Interface().(float64)))\n\treturn nil\n}\n\nfunc callbackRetBlob(ctx *C.sqlite3_context, v reflect.Value) error {\n\tif v.Type().Kind() != reflect.Slice || v.Type().Elem().Kind() != reflect.Uint8 {\n\t\treturn fmt.Errorf(\"cannot convert %s to BLOB\", v.Type())\n\t}\n\ti := v.Interface()\n\tif i == nil || len(i.([]byte)) == 0 {\n\t\tC.sqlite3_result_null(ctx)\n\t} else {\n\t\tbs := i.([]byte)\n\t\tC._sqlite3_result_blob(ctx, unsafe.Pointer(&bs[0]), C.int(len(bs)))\n\t}\n\treturn nil\n}\n\nfunc callbackRetText(ctx *C.sqlite3_context, v reflect.Value) error {\n\tif v.Type().Kind() != reflect.String {\n\t\treturn fmt.Errorf(\"cannot convert %s to TEXT\", v.Type())\n\t}\n\tcstr := C.CString(v.Interface().(string))\n\tC._sqlite3_result_text(ctx, cstr)\n\treturn nil\n}\n\nfunc callbackRetNil(ctx *C.sqlite3_context, v reflect.Value) error {\n\treturn nil\n}\n\nfunc callbackRetGeneric(ctx *C.sqlite3_context, v reflect.Value) error {\n\tif v.IsNil() {\n\t\tC.sqlite3_result_null(ctx)\n\t\treturn nil\n\t}\n\n\tcb, err := callbackRet(v.Elem().Type())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn cb(ctx, v.Elem())\n}\n\nfunc callbackRet(typ reflect.Type) (callbackRetConverter, error) {\n\tswitch typ.Kind() {\n\tcase reflect.Interface:\n\t\terrorInterface := reflect.TypeOf((*error)(nil)).Elem()\n\t\tif typ.Implements(errorInterface) {\n\t\t\treturn callbackRetNil, nil\n\t\t}\n\n\t\tif typ.NumMethod() == 0 {\n\t\t\treturn callbackRetGeneric, nil\n\t\t}\n\n\t\tfallthrough\n\tcase reflect.Slice:\n\t\tif typ.Elem().Kind() != reflect.Uint8 {\n\t\t\treturn nil, errors.New(\"the only supported slice type is []byte\")\n\t\t}\n\t\treturn callbackRetBlob, nil\n\tcase reflect.String:\n\t\treturn callbackRetText, nil\n\tcase reflect.Bool, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Int, reflect.Uint:\n\t\treturn callbackRetInteger, nil\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn callbackRetFloat, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"don't know how to convert to %s\", typ)\n\t}\n}\n\nfunc callbackError(ctx *C.sqlite3_context, err error) {\n\tcstr := C.CString(err.Error())\n\tdefer C.free(unsafe.Pointer(cstr))\n\tC.sqlite3_result_error(ctx, cstr, C.int(-1))\n}\n\n// Test support code. Tests are not allowed to import \"C\", so we can't\n// declare any functions that use C.sqlite3_value.\nfunc callbackSyntheticForTests(v reflect.Value, err error) callbackArgConverter {\n\treturn func(*C.sqlite3_value) (reflect.Value, error) {\n\t\treturn v, err\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/convert.go",
    "content": "// Extracted from Go database/sql source code\n\n// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Type conversions for Scan.\n\npackage sqlite3\n\nimport (\n\t\"database/sql\"\n\t\"database/sql/driver\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"time\"\n)\n\nvar errNilPtr = errors.New(\"destination pointer is nil\") // embedded in descriptive error\n\n// convertAssign copies to dest the value in src, converting it if possible.\n// An error is returned if the copy would result in loss of information.\n// dest should be a pointer type.\nfunc convertAssign(dest, src any) error {\n\t// Common cases, without reflect.\n\tswitch s := src.(type) {\n\tcase string:\n\t\tswitch d := dest.(type) {\n\t\tcase *string:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = s\n\t\t\treturn nil\n\t\tcase *[]byte:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = []byte(s)\n\t\t\treturn nil\n\t\tcase *sql.RawBytes:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = append((*d)[:0], s...)\n\t\t\treturn nil\n\t\t}\n\tcase []byte:\n\t\tswitch d := dest.(type) {\n\t\tcase *string:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = string(s)\n\t\t\treturn nil\n\t\tcase *any:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = cloneBytes(s)\n\t\t\treturn nil\n\t\tcase *[]byte:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = cloneBytes(s)\n\t\t\treturn nil\n\t\tcase *sql.RawBytes:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = s\n\t\t\treturn nil\n\t\t}\n\tcase time.Time:\n\t\tswitch d := dest.(type) {\n\t\tcase *time.Time:\n\t\t\t*d = s\n\t\t\treturn nil\n\t\tcase *string:\n\t\t\t*d = s.Format(time.RFC3339Nano)\n\t\t\treturn nil\n\t\tcase *[]byte:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = []byte(s.Format(time.RFC3339Nano))\n\t\t\treturn nil\n\t\tcase *sql.RawBytes:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = s.AppendFormat((*d)[:0], time.RFC3339Nano)\n\t\t\treturn nil\n\t\t}\n\tcase nil:\n\t\tswitch d := dest.(type) {\n\t\tcase *any:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = nil\n\t\t\treturn nil\n\t\tcase *[]byte:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = nil\n\t\t\treturn nil\n\t\tcase *sql.RawBytes:\n\t\t\tif d == nil {\n\t\t\t\treturn errNilPtr\n\t\t\t}\n\t\t\t*d = nil\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tvar sv reflect.Value\n\n\tswitch d := dest.(type) {\n\tcase *string:\n\t\tsv = reflect.ValueOf(src)\n\t\tswitch sv.Kind() {\n\t\tcase reflect.Bool,\n\t\t\treflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,\n\t\t\treflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,\n\t\t\treflect.Float32, reflect.Float64:\n\t\t\t*d = asString(src)\n\t\t\treturn nil\n\t\t}\n\tcase *[]byte:\n\t\tsv = reflect.ValueOf(src)\n\t\tif b, ok := asBytes(nil, sv); ok {\n\t\t\t*d = b\n\t\t\treturn nil\n\t\t}\n\tcase *sql.RawBytes:\n\t\tsv = reflect.ValueOf(src)\n\t\tif b, ok := asBytes([]byte(*d)[:0], sv); ok {\n\t\t\t*d = sql.RawBytes(b)\n\t\t\treturn nil\n\t\t}\n\tcase *bool:\n\t\tbv, err := driver.Bool.ConvertValue(src)\n\t\tif err == nil {\n\t\t\t*d = bv.(bool)\n\t\t}\n\t\treturn err\n\tcase *any:\n\t\t*d = src\n\t\treturn nil\n\t}\n\n\tif scanner, ok := dest.(sql.Scanner); ok {\n\t\treturn scanner.Scan(src)\n\t}\n\n\tdpv := reflect.ValueOf(dest)\n\tif dpv.Kind() != reflect.Ptr {\n\t\treturn errors.New(\"destination not a pointer\")\n\t}\n\tif dpv.IsNil() {\n\t\treturn errNilPtr\n\t}\n\n\tif !sv.IsValid() {\n\t\tsv = reflect.ValueOf(src)\n\t}\n\n\tdv := reflect.Indirect(dpv)\n\tif sv.IsValid() && sv.Type().AssignableTo(dv.Type()) {\n\t\tswitch b := src.(type) {\n\t\tcase []byte:\n\t\t\tdv.Set(reflect.ValueOf(cloneBytes(b)))\n\t\tdefault:\n\t\t\tdv.Set(sv)\n\t\t}\n\t\treturn nil\n\t}\n\n\tif dv.Kind() == sv.Kind() && sv.Type().ConvertibleTo(dv.Type()) {\n\t\tdv.Set(sv.Convert(dv.Type()))\n\t\treturn nil\n\t}\n\n\t// The following conversions use a string value as an intermediate representation\n\t// to convert between various numeric types.\n\t//\n\t// This also allows scanning into user defined types such as \"type Int int64\".\n\t// For symmetry, also check for string destination types.\n\tswitch dv.Kind() {\n\tcase reflect.Ptr:\n\t\tif src == nil {\n\t\t\tdv.Set(reflect.Zero(dv.Type()))\n\t\t\treturn nil\n\t\t}\n\t\tdv.Set(reflect.New(dv.Type().Elem()))\n\t\treturn convertAssign(dv.Interface(), src)\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\ts := asString(src)\n\t\ti64, err := strconv.ParseInt(s, 10, dv.Type().Bits())\n\t\tif err != nil {\n\t\t\terr = strconvErr(err)\n\t\t\treturn fmt.Errorf(\"converting driver.Value type %T (%q) to a %s: %v\", src, s, dv.Kind(), err)\n\t\t}\n\t\tdv.SetInt(i64)\n\t\treturn nil\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\ts := asString(src)\n\t\tu64, err := strconv.ParseUint(s, 10, dv.Type().Bits())\n\t\tif err != nil {\n\t\t\terr = strconvErr(err)\n\t\t\treturn fmt.Errorf(\"converting driver.Value type %T (%q) to a %s: %v\", src, s, dv.Kind(), err)\n\t\t}\n\t\tdv.SetUint(u64)\n\t\treturn nil\n\tcase reflect.Float32, reflect.Float64:\n\t\ts := asString(src)\n\t\tf64, err := strconv.ParseFloat(s, dv.Type().Bits())\n\t\tif err != nil {\n\t\t\terr = strconvErr(err)\n\t\t\treturn fmt.Errorf(\"converting driver.Value type %T (%q) to a %s: %v\", src, s, dv.Kind(), err)\n\t\t}\n\t\tdv.SetFloat(f64)\n\t\treturn nil\n\tcase reflect.String:\n\t\tswitch v := src.(type) {\n\t\tcase string:\n\t\t\tdv.SetString(v)\n\t\t\treturn nil\n\t\tcase []byte:\n\t\t\tdv.SetString(string(v))\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn fmt.Errorf(\"unsupported Scan, storing driver.Value type %T into type %T\", src, dest)\n}\n\nfunc strconvErr(err error) error {\n\tif ne, ok := err.(*strconv.NumError); ok {\n\t\treturn ne.Err\n\t}\n\treturn err\n}\n\nfunc cloneBytes(b []byte) []byte {\n\tif b == nil {\n\t\treturn nil\n\t}\n\tc := make([]byte, len(b))\n\tcopy(c, b)\n\treturn c\n}\n\nfunc asString(src any) string {\n\tswitch v := src.(type) {\n\tcase string:\n\t\treturn v\n\tcase []byte:\n\t\treturn string(v)\n\t}\n\trv := reflect.ValueOf(src)\n\tswitch rv.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn strconv.FormatInt(rv.Int(), 10)\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\treturn strconv.FormatUint(rv.Uint(), 10)\n\tcase reflect.Float64:\n\t\treturn strconv.FormatFloat(rv.Float(), 'g', -1, 64)\n\tcase reflect.Float32:\n\t\treturn strconv.FormatFloat(rv.Float(), 'g', -1, 32)\n\tcase reflect.Bool:\n\t\treturn strconv.FormatBool(rv.Bool())\n\t}\n\treturn fmt.Sprintf(\"%v\", src)\n}\n\nfunc asBytes(buf []byte, rv reflect.Value) (b []byte, ok bool) {\n\tswitch rv.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn strconv.AppendInt(buf, rv.Int(), 10), true\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\treturn strconv.AppendUint(buf, rv.Uint(), 10), true\n\tcase reflect.Float32:\n\t\treturn strconv.AppendFloat(buf, rv.Float(), 'g', -1, 32), true\n\tcase reflect.Float64:\n\t\treturn strconv.AppendFloat(buf, rv.Float(), 'g', -1, 64), true\n\tcase reflect.Bool:\n\t\treturn strconv.AppendBool(buf, rv.Bool()), true\n\tcase reflect.String:\n\t\ts := rv.String()\n\t\treturn append(buf, s...), true\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/doc.go",
    "content": "/*\nPackage sqlite3 provides interface to SQLite3 databases.\n\nThis works as a driver for database/sql.\n\nInstallation\n\n\tgo get github.com/mattn/go-sqlite3\n\n# Supported Types\n\nCurrently, go-sqlite3 supports the following data types.\n\n\t+------------------------------+\n\t|go        | sqlite3           |\n\t|----------|-------------------|\n\t|nil       | null              |\n\t|int       | integer           |\n\t|int64     | integer           |\n\t|float64   | float             |\n\t|bool      | integer           |\n\t|[]byte    | blob              |\n\t|string    | text              |\n\t|time.Time | timestamp/datetime|\n\t+------------------------------+\n\n# SQLite3 Extension\n\nYou can write your own extension module for sqlite3. For example, below is an\nextension for a Regexp matcher operation.\n\n\t#include <pcre.h>\n\t#include <string.h>\n\t#include <stdio.h>\n\t#include <sqlite3ext.h>\n\n\tSQLITE_EXTENSION_INIT1\n\tstatic void regexp_func(sqlite3_context *context, int argc, sqlite3_value **argv) {\n\t  if (argc >= 2) {\n\t    const char *target  = (const char *)sqlite3_value_text(argv[1]);\n\t    const char *pattern = (const char *)sqlite3_value_text(argv[0]);\n\t    const char* errstr = NULL;\n\t    int erroff = 0;\n\t    int vec[500];\n\t    int n, rc;\n\t    pcre* re = pcre_compile(pattern, 0, &errstr, &erroff, NULL);\n\t    rc = pcre_exec(re, NULL, target, strlen(target), 0, 0, vec, 500);\n\t    if (rc <= 0) {\n\t      sqlite3_result_error(context, errstr, 0);\n\t      return;\n\t    }\n\t    sqlite3_result_int(context, 1);\n\t  }\n\t}\n\n\t#ifdef _WIN32\n\t__declspec(dllexport)\n\t#endif\n\tint sqlite3_extension_init(sqlite3 *db, char **errmsg,\n\t      const sqlite3_api_routines *api) {\n\t  SQLITE_EXTENSION_INIT2(api);\n\t  return sqlite3_create_function(db, \"regexp\", 2, SQLITE_UTF8,\n\t      (void*)db, regexp_func, NULL, NULL);\n\t}\n\nIt needs to be built as a so/dll shared library. And you need to register\nthe extension module like below.\n\n\tsql.Register(\"sqlite3_with_extensions\",\n\t\t&sqlite3.SQLiteDriver{\n\t\t\tExtensions: []string{\n\t\t\t\t\"sqlite3_mod_regexp\",\n\t\t\t},\n\t\t})\n\nThen, you can use this extension.\n\n\trows, err := db.Query(\"select text from mytable where name regexp '^golang'\")\n\n# Connection Hook\n\nYou can hook and inject your code when the connection is established by setting\nConnectHook to get the SQLiteConn.\n\n\tsql.Register(\"sqlite3_with_hook_example\",\n\t\t\t&sqlite3.SQLiteDriver{\n\t\t\t\t\tConnectHook: func(conn *sqlite3.SQLiteConn) error {\n\t\t\t\t\t\tsqlite3conn = append(sqlite3conn, conn)\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t},\n\t\t\t})\n\nYou can also use database/sql.Conn.Raw (Go >= 1.13):\n\n\tconn, err := db.Conn(context.Background())\n\t// if err != nil { ... }\n\tdefer conn.Close()\n\terr = conn.Raw(func (driverConn any) error {\n\t\tsqliteConn := driverConn.(*sqlite3.SQLiteConn)\n\t\t// ... use sqliteConn\n\t})\n\t// if err != nil { ... }\n\n# Go SQlite3 Extensions\n\nIf you want to register Go functions as SQLite extension functions\nyou can make a custom driver by calling RegisterFunction from\nConnectHook.\n\n\tregex = func(re, s string) (bool, error) {\n\t\treturn regexp.MatchString(re, s)\n\t}\n\tsql.Register(\"sqlite3_extended\",\n\t\t\t&sqlite3.SQLiteDriver{\n\t\t\t\t\tConnectHook: func(conn *sqlite3.SQLiteConn) error {\n\t\t\t\t\t\treturn conn.RegisterFunc(\"regexp\", regex, true)\n\t\t\t\t\t},\n\t\t\t})\n\nYou can then use the custom driver by passing its name to sql.Open.\n\n\tvar i int\n\tconn, err := sql.Open(\"sqlite3_extended\", \"./foo.db\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\terr = db.QueryRow(`SELECT regexp(\"foo.*\", \"seafood\")`).Scan(&i)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\nSee the documentation of RegisterFunc for more details.\n*/\npackage sqlite3\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/error.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n*/\nimport \"C\"\nimport \"syscall\"\n\n// ErrNo inherit errno.\ntype ErrNo int\n\n// ErrNoMask is mask code.\nconst ErrNoMask C.int = 0xff\n\n// ErrNoExtended is extended errno.\ntype ErrNoExtended int\n\n// Error implement sqlite error code.\ntype Error struct {\n\tCode         ErrNo         /* The error code returned by SQLite */\n\tExtendedCode ErrNoExtended /* The extended error code returned by SQLite */\n\tSystemErrno  syscall.Errno /* The system errno returned by the OS through SQLite, if applicable */\n\terr          string        /* The error string returned by sqlite3_errmsg(),\n\tthis usually contains more specific details. */\n}\n\n// result codes from http://www.sqlite.org/c3ref/c_abort.html\nvar (\n\tErrError      = ErrNo(1)  /* SQL error or missing database */\n\tErrInternal   = ErrNo(2)  /* Internal logic error in SQLite */\n\tErrPerm       = ErrNo(3)  /* Access permission denied */\n\tErrAbort      = ErrNo(4)  /* Callback routine requested an abort */\n\tErrBusy       = ErrNo(5)  /* The database file is locked */\n\tErrLocked     = ErrNo(6)  /* A table in the database is locked */\n\tErrNomem      = ErrNo(7)  /* A malloc() failed */\n\tErrReadonly   = ErrNo(8)  /* Attempt to write a readonly database */\n\tErrInterrupt  = ErrNo(9)  /* Operation terminated by sqlite3_interrupt() */\n\tErrIoErr      = ErrNo(10) /* Some kind of disk I/O error occurred */\n\tErrCorrupt    = ErrNo(11) /* The database disk image is malformed */\n\tErrNotFound   = ErrNo(12) /* Unknown opcode in sqlite3_file_control() */\n\tErrFull       = ErrNo(13) /* Insertion failed because database is full */\n\tErrCantOpen   = ErrNo(14) /* Unable to open the database file */\n\tErrProtocol   = ErrNo(15) /* Database lock protocol error */\n\tErrEmpty      = ErrNo(16) /* Database is empty */\n\tErrSchema     = ErrNo(17) /* The database schema changed */\n\tErrTooBig     = ErrNo(18) /* String or BLOB exceeds size limit */\n\tErrConstraint = ErrNo(19) /* Abort due to constraint violation */\n\tErrMismatch   = ErrNo(20) /* Data type mismatch */\n\tErrMisuse     = ErrNo(21) /* Library used incorrectly */\n\tErrNoLFS      = ErrNo(22) /* Uses OS features not supported on host */\n\tErrAuth       = ErrNo(23) /* Authorization denied */\n\tErrFormat     = ErrNo(24) /* Auxiliary database format error */\n\tErrRange      = ErrNo(25) /* 2nd parameter to sqlite3_bind out of range */\n\tErrNotADB     = ErrNo(26) /* File opened that is not a database file */\n\tErrNotice     = ErrNo(27) /* Notifications from sqlite3_log() */\n\tErrWarning    = ErrNo(28) /* Warnings from sqlite3_log() */\n)\n\n// Error return error message from errno.\nfunc (err ErrNo) Error() string {\n\treturn Error{Code: err}.Error()\n}\n\n// Extend return extended errno.\nfunc (err ErrNo) Extend(by int) ErrNoExtended {\n\treturn ErrNoExtended(int(err) | (by << 8))\n}\n\n// Error return error message that is extended code.\nfunc (err ErrNoExtended) Error() string {\n\treturn Error{Code: ErrNo(C.int(err) & ErrNoMask), ExtendedCode: err}.Error()\n}\n\nfunc (err Error) Error() string {\n\tvar str string\n\tif err.err != \"\" {\n\t\tstr = err.err\n\t} else {\n\t\tstr = C.GoString(C.sqlite3_errstr(C.int(err.Code)))\n\t}\n\tif err.SystemErrno != 0 {\n\t\tstr += \": \" + err.SystemErrno.Error()\n\t}\n\treturn str\n}\n\n// result codes from http://www.sqlite.org/c3ref/c_abort_rollback.html\nvar (\n\tErrIoErrRead              = ErrIoErr.Extend(1)\n\tErrIoErrShortRead         = ErrIoErr.Extend(2)\n\tErrIoErrWrite             = ErrIoErr.Extend(3)\n\tErrIoErrFsync             = ErrIoErr.Extend(4)\n\tErrIoErrDirFsync          = ErrIoErr.Extend(5)\n\tErrIoErrTruncate          = ErrIoErr.Extend(6)\n\tErrIoErrFstat             = ErrIoErr.Extend(7)\n\tErrIoErrUnlock            = ErrIoErr.Extend(8)\n\tErrIoErrRDlock            = ErrIoErr.Extend(9)\n\tErrIoErrDelete            = ErrIoErr.Extend(10)\n\tErrIoErrBlocked           = ErrIoErr.Extend(11)\n\tErrIoErrNoMem             = ErrIoErr.Extend(12)\n\tErrIoErrAccess            = ErrIoErr.Extend(13)\n\tErrIoErrCheckReservedLock = ErrIoErr.Extend(14)\n\tErrIoErrLock              = ErrIoErr.Extend(15)\n\tErrIoErrClose             = ErrIoErr.Extend(16)\n\tErrIoErrDirClose          = ErrIoErr.Extend(17)\n\tErrIoErrSHMOpen           = ErrIoErr.Extend(18)\n\tErrIoErrSHMSize           = ErrIoErr.Extend(19)\n\tErrIoErrSHMLock           = ErrIoErr.Extend(20)\n\tErrIoErrSHMMap            = ErrIoErr.Extend(21)\n\tErrIoErrSeek              = ErrIoErr.Extend(22)\n\tErrIoErrDeleteNoent       = ErrIoErr.Extend(23)\n\tErrIoErrMMap              = ErrIoErr.Extend(24)\n\tErrIoErrGetTempPath       = ErrIoErr.Extend(25)\n\tErrIoErrConvPath          = ErrIoErr.Extend(26)\n\tErrLockedSharedCache      = ErrLocked.Extend(1)\n\tErrBusyRecovery           = ErrBusy.Extend(1)\n\tErrBusySnapshot           = ErrBusy.Extend(2)\n\tErrCantOpenNoTempDir      = ErrCantOpen.Extend(1)\n\tErrCantOpenIsDir          = ErrCantOpen.Extend(2)\n\tErrCantOpenFullPath       = ErrCantOpen.Extend(3)\n\tErrCantOpenConvPath       = ErrCantOpen.Extend(4)\n\tErrCorruptVTab            = ErrCorrupt.Extend(1)\n\tErrReadonlyRecovery       = ErrReadonly.Extend(1)\n\tErrReadonlyCantLock       = ErrReadonly.Extend(2)\n\tErrReadonlyRollback       = ErrReadonly.Extend(3)\n\tErrReadonlyDbMoved        = ErrReadonly.Extend(4)\n\tErrAbortRollback          = ErrAbort.Extend(2)\n\tErrConstraintCheck        = ErrConstraint.Extend(1)\n\tErrConstraintCommitHook   = ErrConstraint.Extend(2)\n\tErrConstraintForeignKey   = ErrConstraint.Extend(3)\n\tErrConstraintFunction     = ErrConstraint.Extend(4)\n\tErrConstraintNotNull      = ErrConstraint.Extend(5)\n\tErrConstraintPrimaryKey   = ErrConstraint.Extend(6)\n\tErrConstraintTrigger      = ErrConstraint.Extend(7)\n\tErrConstraintUnique       = ErrConstraint.Extend(8)\n\tErrConstraintVTab         = ErrConstraint.Extend(9)\n\tErrConstraintRowID        = ErrConstraint.Extend(10)\n\tErrNoticeRecoverWAL       = ErrNotice.Extend(1)\n\tErrNoticeRecoverRollback  = ErrNotice.Extend(2)\n\tErrWarningAutoIndex       = ErrWarning.Extend(1)\n)\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c",
    "content": "#ifndef USE_LIBSQLITE3\n/******************************************************************************\n** This file is an amalgamation of many separate C source files from SQLite\n** version 3.51.2.  By combining all the individual C code files into this\n** single large file, the entire code can be compiled as a single translation\n** unit.  This allows many compilers to do optimizations that would not be\n** possible if the files were compiled separately.  Performance improvements\n** of 5% or more are commonly seen when SQLite is compiled as a single\n** translation unit.\n**\n** This file is all you need to compile SQLite.  To use SQLite in other\n** programs, you need this file and the \"sqlite3.h\" header file that defines\n** the programming interface to the SQLite library.  (If you do not have\n** the \"sqlite3.h\" header file at hand, you will find a copy embedded within\n** the text of this file.  Search for \"Begin file sqlite3.h\" to find the start\n** of the embedded sqlite3.h header file.) Additional code files may be needed\n** if you want a wrapper to interface SQLite with your choice of programming\n** language. The code for the \"sqlite3\" command-line shell is also in a\n** separate file. This file contains only code for the core SQLite library.\n**\n** The content in this amalgamation comes from Fossil check-in\n** b270f8339eb13b504d0b2ba154ebca966b7d with changes in files:\n**\n**    \n*/\n#ifndef SQLITE_AMALGAMATION\n#define SQLITE_CORE 1\n#define SQLITE_AMALGAMATION 1\n#ifndef SQLITE_PRIVATE\n# define SQLITE_PRIVATE static\n#endif\n/************** Begin file sqliteInt.h ***************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Internal interface definitions for SQLite.\n**\n*/\n#ifndef SQLITEINT_H\n#define SQLITEINT_H\n\n/* Special Comments:\n**\n** Some comments have special meaning to the tools that measure test\n** coverage:\n**\n**    NO_TEST                     - The branches on this line are not\n**                                  measured by branch coverage.  This is\n**                                  used on lines of code that actually\n**                                  implement parts of coverage testing.\n**\n**    OPTIMIZATION-IF-TRUE        - This branch is allowed to always be false\n**                                  and the correct answer is still obtained,\n**                                  though perhaps more slowly.\n**\n**    OPTIMIZATION-IF-FALSE       - This branch is allowed to always be true\n**                                  and the correct answer is still obtained,\n**                                  though perhaps more slowly.\n**\n**    PREVENTS-HARMLESS-OVERREAD  - This branch prevents a buffer overread\n**                                  that would be harmless and undetectable\n**                                  if it did occur.\n**\n** In all cases, the special comment must be enclosed in the usual\n** slash-asterisk...asterisk-slash comment marks, with no spaces between the\n** asterisks and the comment text.\n*/\n\n/*\n** Make sure the Tcl calling convention macro is defined.  This macro is\n** only used by test code and Tcl integration code.\n*/\n#ifndef SQLITE_TCLAPI\n#  define SQLITE_TCLAPI\n#endif\n\n/*\n** Include the header file used to customize the compiler options for MSVC.\n** This should be done first so that it can successfully prevent spurious\n** compiler warnings due to subsequent content in this file and other files\n** that are included by this file.\n*/\n/************** Include msvc.h in the middle of sqliteInt.h ******************/\n/************** Begin file msvc.h ********************************************/\n/*\n** 2015 January 12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains code that is specific to MSVC.\n*/\n#ifndef SQLITE_MSVC_H\n#define SQLITE_MSVC_H\n\n#if defined(_MSC_VER)\n#pragma warning(disable : 4054)\n#pragma warning(disable : 4055)\n#pragma warning(disable : 4100)\n#pragma warning(disable : 4127)\n#pragma warning(disable : 4130)\n#pragma warning(disable : 4152)\n#pragma warning(disable : 4189)\n#pragma warning(disable : 4206)\n#pragma warning(disable : 4210)\n#pragma warning(disable : 4232)\n#pragma warning(disable : 4244)\n#pragma warning(disable : 4305)\n#pragma warning(disable : 4306)\n#pragma warning(disable : 4702)\n#pragma warning(disable : 4706)\n#endif /* defined(_MSC_VER) */\n\n#if defined(_MSC_VER) && !defined(_WIN64)\n#undef SQLITE_4_BYTE_ALIGNED_MALLOC\n#define SQLITE_4_BYTE_ALIGNED_MALLOC\n#endif /* defined(_MSC_VER) && !defined(_WIN64) */\n\n#if !defined(HAVE_LOG2) && defined(_MSC_VER) && _MSC_VER<1800\n#define HAVE_LOG2 0\n#endif /* !defined(HAVE_LOG2) && defined(_MSC_VER) && _MSC_VER<1800 */\n\n#endif /* SQLITE_MSVC_H */\n\n/************** End of msvc.h ************************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n\n/*\n** Special setup for VxWorks\n*/\n/************** Include vxworks.h in the middle of sqliteInt.h ***************/\n/************** Begin file vxworks.h *****************************************/\n/*\n** 2015-03-02\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains code that is specific to Wind River's VxWorks\n*/\n#if defined(__RTP__) || defined(_WRS_KERNEL)\n/* This is VxWorks.  Set up things specially for that OS\n*/\n#include <vxWorks.h>\n#include <pthread.h>  /* amalgamator: dontcache */\n#define OS_VXWORKS 1\n#define SQLITE_OS_OTHER 0\n#define SQLITE_HOMEGROWN_RECURSIVE_MUTEX 1\n#define SQLITE_OMIT_LOAD_EXTENSION 1\n#define SQLITE_ENABLE_LOCKING_STYLE 0\n#define HAVE_UTIME 1\n#else\n/* This is not VxWorks. */\n#ifndef OS_VXWORKS\n#  define OS_VXWORKS 0\n#endif\n#define HAVE_FCHOWN 1\n#define HAVE_READLINK 1\n#define HAVE_LSTAT 1\n#endif /* defined(_WRS_KERNEL) */\n\n/************** End of vxworks.h *********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n\n/*\n** These #defines should enable >2GB file support on POSIX if the\n** underlying operating system supports it.  If the OS lacks\n** large file support, or if the OS is windows, these should be no-ops.\n**\n** Ticket #2739:  The _LARGEFILE_SOURCE macro must appear before any\n** system #includes.  Hence, this block of code must be the very first\n** code in all source files.\n**\n** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch\n** on the compiler command line.  This is necessary if you are compiling\n** on a recent machine (ex: Red Hat 7.2) but you want your code to work\n** on an older machine (ex: Red Hat 6.0).  If you compile on Red Hat 7.2\n** without this option, LFS is enable.  But LFS does not exist in the kernel\n** in Red Hat 6.0, so the code won't work.  Hence, for maximum binary\n** portability you should omit LFS.\n**\n** The previous paragraph was written in 2005.  (This paragraph is written\n** on 2008-11-28.) These days, all Linux kernels support large files, so\n** you should probably leave LFS enabled.  But some embedded platforms might\n** lack LFS in which case the SQLITE_DISABLE_LFS macro might still be useful.\n**\n** Similar is true for Mac OS X.  LFS is only supported on Mac OS X 9 and later.\n*/\n#ifndef SQLITE_DISABLE_LFS\n# define _LARGE_FILE       1\n# ifndef _FILE_OFFSET_BITS\n#   define _FILE_OFFSET_BITS 64\n# endif\n# define _LARGEFILE_SOURCE 1\n#endif\n\n/* The GCC_VERSION and MSVC_VERSION macros are used to\n** conditionally include optimizations for each of these compilers.  A\n** value of 0 means that compiler is not being used.  The\n** SQLITE_DISABLE_INTRINSIC macro means do not use any compiler-specific\n** optimizations, and hence set all compiler macros to 0\n**\n** There was once also a CLANG_VERSION macro.  However, we learn that the\n** version numbers in clang are for \"marketing\" only and are inconsistent\n** and unreliable.  Fortunately, all versions of clang also recognize the\n** gcc version numbers and have reasonable settings for gcc version numbers,\n** so the GCC_VERSION macro will be set to a correct non-zero value even\n** when compiling with clang.\n*/\n#if defined(__GNUC__) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define GCC_VERSION (__GNUC__*1000000+__GNUC_MINOR__*1000+__GNUC_PATCHLEVEL__)\n#else\n# define GCC_VERSION 0\n#endif\n#if defined(_MSC_VER) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define MSVC_VERSION _MSC_VER\n#else\n# define MSVC_VERSION 0\n#endif\n\n/*\n** Some C99 functions in \"math.h\" are only present for MSVC when its version\n** is associated with Visual Studio 2013 or higher.\n*/\n#ifndef SQLITE_HAVE_C99_MATH_FUNCS\n# if MSVC_VERSION==0 || MSVC_VERSION>=1800\n#  define SQLITE_HAVE_C99_MATH_FUNCS (1)\n# else\n#  define SQLITE_HAVE_C99_MATH_FUNCS (0)\n# endif\n#endif\n\n/* Needed for various definitions... */\n#if defined(__GNUC__) && !defined(_GNU_SOURCE)\n# define _GNU_SOURCE\n#endif\n\n#if defined(__OpenBSD__) && !defined(_BSD_SOURCE)\n# define _BSD_SOURCE\n#endif\n\n/*\n** Macro to disable warnings about missing \"break\" at the end of a \"case\".\n*/\n#if defined(__has_attribute)\n#  if __has_attribute(fallthrough)\n#    define deliberate_fall_through __attribute__((fallthrough));\n#  endif\n#endif\n#if !defined(deliberate_fall_through)\n#  define deliberate_fall_through\n#endif\n\n/*\n** For MinGW, check to see if we can include the header file containing its\n** version information, among other things.  Normally, this internal MinGW\n** header file would [only] be included automatically by other MinGW header\n** files; however, the contained version information is now required by this\n** header file to work around binary compatibility issues (see below) and\n** this is the only known way to reliably obtain it.  This entire #if block\n** would be completely unnecessary if there was any other way of detecting\n** MinGW via their preprocessor (e.g. if they customized their GCC to define\n** some MinGW-specific macros).  When compiling for MinGW, either the\n** _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be\n** defined; otherwise, detection of conditions specific to MinGW will be\n** disabled.\n*/\n#if defined(_HAVE_MINGW_H)\n# include \"mingw.h\"\n#elif defined(_HAVE__MINGW_H)\n# include \"_mingw.h\"\n#endif\n\n/*\n** For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T\n** define is required to maintain binary compatibility with the MSVC runtime\n** library in use (e.g. for Windows XP).\n*/\n#if !defined(_USE_32BIT_TIME_T) && !defined(_USE_64BIT_TIME_T) && \\\n    defined(_WIN32) && !defined(_WIN64) && \\\n    defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION >= 4 && \\\n    defined(__MSVCRT__)\n# define _USE_32BIT_TIME_T\n#endif\n\n/* Optionally #include a user-defined header, whereby compilation options\n** may be set prior to where they take effect, but after platform setup.\n** If SQLITE_CUSTOM_INCLUDE=? is defined, its value names the #include\n** file.\n*/\n#ifdef SQLITE_CUSTOM_INCLUDE\n# define INC_STRINGIFY_(f) #f\n# define INC_STRINGIFY(f) INC_STRINGIFY_(f)\n# include INC_STRINGIFY(SQLITE_CUSTOM_INCLUDE)\n#endif\n\n/* The public SQLite interface.  The _FILE_OFFSET_BITS macro must appear\n** first in QNX.  Also, the _USE_32BIT_TIME_T macro must appear first for\n** MinGW.\n*/\n/************** Include sqlite3.h in the middle of sqliteInt.h ***************/\n/************** Begin file sqlite3.h *****************************************/\n/*\n** 2001-09-15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface that the SQLite library\n** presents to client programs.  If a C-function, structure, datatype,\n** or constant definition does not appear in this file, then it is\n** not a published API of SQLite, is subject to change without\n** notice, and should not be referenced by programs that use SQLite.\n**\n** Some of the definitions that are in this file are marked as\n** \"experimental\".  Experimental interfaces are normally new\n** features recently added to SQLite.  We do not anticipate changes\n** to experimental interfaces but reserve the right to make minor changes\n** if experience from use \"in the wild\" suggest such changes are prudent.\n**\n** The official C-language API documentation for SQLite is derived\n** from comments in this file.  This file is the authoritative source\n** on how SQLite interfaces are supposed to operate.\n**\n** The name of this file under configuration management is \"sqlite.h.in\".\n** The makefile makes some minor changes to this file (such as inserting\n** the version number) and changes its name to \"sqlite3.h\" as\n** part of the build process.\n*/\n#ifndef SQLITE3_H\n#define SQLITE3_H\n#include <stdarg.h>     /* Needed for the definition of va_list */\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#if 0\nextern \"C\" {\n#endif\n\n\n/*\n** Facilitate override of interface linkage and calling conventions.\n** Be aware that these macros may not be used within this particular\n** translation of the amalgamation and its associated header file.\n**\n** The SQLITE_EXTERN and SQLITE_API macros are used to instruct the\n** compiler that the target identifier should have external linkage.\n**\n** The SQLITE_CDECL macro is used to set the calling convention for\n** public functions that accept a variable number of arguments.\n**\n** The SQLITE_APICALL macro is used to set the calling convention for\n** public functions that accept a fixed number of arguments.\n**\n** The SQLITE_STDCALL macro is no longer used and is now deprecated.\n**\n** The SQLITE_CALLBACK macro is used to set the calling convention for\n** function pointers.\n**\n** The SQLITE_SYSAPI macro is used to set the calling convention for\n** functions provided by the operating system.\n**\n** Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and\n** SQLITE_SYSAPI macros are used only when building for environments\n** that require non-default calling conventions.\n*/\n#ifndef SQLITE_EXTERN\n# define SQLITE_EXTERN extern\n#endif\n#ifndef SQLITE_API\n# define SQLITE_API\n#endif\n#ifndef SQLITE_CDECL\n# define SQLITE_CDECL\n#endif\n#ifndef SQLITE_APICALL\n# define SQLITE_APICALL\n#endif\n#ifndef SQLITE_STDCALL\n# define SQLITE_STDCALL SQLITE_APICALL\n#endif\n#ifndef SQLITE_CALLBACK\n# define SQLITE_CALLBACK\n#endif\n#ifndef SQLITE_SYSAPI\n# define SQLITE_SYSAPI\n#endif\n\n/*\n** These no-op macros are used in front of interfaces to mark those\n** interfaces as either deprecated or experimental.  New applications\n** should not use deprecated interfaces - they are supported for backwards\n** compatibility only.  Application writers should be aware that\n** experimental interfaces are subject to change in point releases.\n**\n** These macros used to resolve to various kinds of compiler magic that\n** would generate warning messages when they were used.  But that\n** compiler magic ended up generating such a flurry of bug reports\n** that we have taken it all out and gone back to using simple\n** noop macros.\n*/\n#define SQLITE_DEPRECATED\n#define SQLITE_EXPERIMENTAL\n\n/*\n** Ensure these symbols were not defined by some previous header file.\n*/\n#ifdef SQLITE_VERSION\n# undef SQLITE_VERSION\n#endif\n#ifdef SQLITE_VERSION_NUMBER\n# undef SQLITE_VERSION_NUMBER\n#endif\n\n/*\n** CAPI3REF: Compile-Time Library Version Numbers\n**\n** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header\n** evaluates to a string literal that is the SQLite version in the\n** format \"X.Y.Z\" where X is the major version number (always 3 for\n** SQLite3) and Y is the minor version number and Z is the release number.)^\n** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer\n** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same\n** numbers used in [SQLITE_VERSION].)^\n** The SQLITE_VERSION_NUMBER for any given release of SQLite will also\n** be larger than the release from which it is derived.  Either Y will\n** be held constant and Z will be incremented or else Y will be incremented\n** and Z will be reset to zero.\n**\n** Since [version 3.6.18] ([dateof:3.6.18]),\n** SQLite source code has been stored in the\n** <a href=\"http://fossil-scm.org/\">Fossil configuration management\n** system</a>.  ^The SQLITE_SOURCE_ID macro evaluates to\n** a string which identifies a particular check-in of SQLite\n** within its configuration management system.  ^The SQLITE_SOURCE_ID\n** string contains the date and time of the check-in (UTC) and a SHA1\n** or SHA3-256 hash of the entire source tree.  If the source code has\n** been edited in any way since it was last checked in, then the last\n** four hexadecimal digits of the hash may be modified.\n**\n** See also: [sqlite3_libversion()],\n** [sqlite3_libversion_number()], [sqlite3_sourceid()],\n** [sqlite_version()] and [sqlite_source_id()].\n*/\n#define SQLITE_VERSION        \"3.51.2\"\n#define SQLITE_VERSION_NUMBER 3051002\n#define SQLITE_SOURCE_ID      \"2026-01-09 17:27:48 b270f8339eb13b504d0b2ba154ebca966b7dde08e40c3ed7d559749818cb2075\"\n#define SQLITE_SCM_BRANCH     \"branch-3.51\"\n#define SQLITE_SCM_TAGS       \"release version-3.51.2\"\n#define SQLITE_SCM_DATETIME   \"2026-01-09T17:27:48.405Z\"\n\n/*\n** CAPI3REF: Run-Time Library Version Numbers\n** KEYWORDS: sqlite3_version sqlite3_sourceid\n**\n** These interfaces provide the same information as the [SQLITE_VERSION],\n** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros\n** but are associated with the library instead of the header file.  ^(Cautious\n** programmers might include assert() statements in their application to\n** verify that values returned by these interfaces match the macros in\n** the header, and thus ensure that the application is\n** compiled with matching library and header files.\n**\n** <blockquote><pre>\n** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );\n** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );\n** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );\n** </pre></blockquote>)^\n**\n** ^The sqlite3_version[] string constant contains the text of the\n** [SQLITE_VERSION] macro.  ^The sqlite3_libversion() function returns a\n** pointer to the sqlite3_version[] string constant.  The sqlite3_libversion()\n** function is provided for use in DLLs since DLL users usually do not have\n** direct access to string constants within the DLL.  ^The\n** sqlite3_libversion_number() function returns an integer equal to\n** [SQLITE_VERSION_NUMBER].  ^(The sqlite3_sourceid() function returns\n** a pointer to a string constant whose value is the same as the\n** [SQLITE_SOURCE_ID] C preprocessor macro.  Except if SQLite is built\n** using an edited copy of [the amalgamation], then the last four characters\n** of the hash might be different from [SQLITE_SOURCE_ID].)^\n**\n** See also: [sqlite_version()] and [sqlite_source_id()].\n*/\nSQLITE_API const char sqlite3_version[] = SQLITE_VERSION;\nSQLITE_API const char *sqlite3_libversion(void);\nSQLITE_API const char *sqlite3_sourceid(void);\nSQLITE_API int sqlite3_libversion_number(void);\n\n/*\n** CAPI3REF: Run-Time Library Compilation Options Diagnostics\n**\n** ^The sqlite3_compileoption_used() function returns 0 or 1\n** indicating whether the specified option was defined at\n** compile time.  ^The SQLITE_ prefix may be omitted from the\n** option name passed to sqlite3_compileoption_used().\n**\n** ^The sqlite3_compileoption_get() function allows iterating\n** over the list of options that were defined at compile time by\n** returning the N-th compile time option string.  ^If N is out of range,\n** sqlite3_compileoption_get() returns a NULL pointer.  ^The SQLITE_\n** prefix is omitted from any strings returned by\n** sqlite3_compileoption_get().\n**\n** ^Support for the diagnostic functions sqlite3_compileoption_used()\n** and sqlite3_compileoption_get() may be omitted by specifying the\n** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.\n**\n** See also: SQL functions [sqlite_compileoption_used()] and\n** [sqlite_compileoption_get()] and the [compile_options pragma].\n*/\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\nSQLITE_API int sqlite3_compileoption_used(const char *zOptName);\nSQLITE_API const char *sqlite3_compileoption_get(int N);\n#else\n# define sqlite3_compileoption_used(X) 0\n# define sqlite3_compileoption_get(X)  ((void*)0)\n#endif\n\n/*\n** CAPI3REF: Test To See If The Library Is Threadsafe\n**\n** ^The sqlite3_threadsafe() function returns zero if and only if\n** SQLite was compiled with mutexing code omitted due to the\n** [SQLITE_THREADSAFE] compile-time option being set to 0.\n**\n** SQLite can be compiled with or without mutexes.  When\n** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes\n** are enabled and SQLite is threadsafe.  When the\n** [SQLITE_THREADSAFE] macro is 0,\n** the mutexes are omitted.  Without the mutexes, it is not safe\n** to use SQLite concurrently from more than one thread.\n**\n** Enabling mutexes incurs a measurable performance penalty.\n** So if speed is of utmost importance, it makes sense to disable\n** the mutexes.  But for maximum safety, mutexes should be enabled.\n** ^The default behavior is for mutexes to be enabled.\n**\n** This interface can be used by an application to make sure that the\n** version of SQLite that it is linking against was compiled with\n** the desired setting of the [SQLITE_THREADSAFE] macro.\n**\n** This interface only reports on the compile-time mutex setting\n** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with\n** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but\n** can be fully or partially disabled using a call to [sqlite3_config()]\n** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],\n** or [SQLITE_CONFIG_SERIALIZED].  ^(The return value of the\n** sqlite3_threadsafe() function shows only the compile-time setting of\n** thread safety, not any run-time changes to that setting made by\n** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()\n** is unchanged by calls to sqlite3_config().)^\n**\n** See the [threading mode] documentation for additional information.\n*/\nSQLITE_API int sqlite3_threadsafe(void);\n\n/*\n** CAPI3REF: Database Connection Handle\n** KEYWORDS: {database connection} {database connections}\n**\n** Each open SQLite database is represented by a pointer to an instance of\n** the opaque structure named \"sqlite3\".  It is useful to think of an sqlite3\n** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and\n** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]\n** and [sqlite3_close_v2()] are its destructors.  There are many other\n** interfaces (such as\n** [sqlite3_prepare_v2()], [sqlite3_create_function()], and\n** [sqlite3_busy_timeout()] to name but three) that are methods on an\n** sqlite3 object.\n*/\ntypedef struct sqlite3 sqlite3;\n\n/*\n** CAPI3REF: 64-Bit Integer Types\n** KEYWORDS: sqlite_int64 sqlite_uint64\n**\n** Because there is no cross-platform way to specify 64-bit integer types\n** SQLite includes typedefs for 64-bit signed and unsigned integers.\n**\n** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.\n** The sqlite_int64 and sqlite_uint64 types are supported for backwards\n** compatibility only.\n**\n** ^The sqlite3_int64 and sqlite_int64 types can store integer values\n** between -9223372036854775808 and +9223372036854775807 inclusive.  ^The\n** sqlite3_uint64 and sqlite_uint64 types can store integer values\n** between 0 and +18446744073709551615 inclusive.\n*/\n#ifdef SQLITE_INT64_TYPE\n  typedef SQLITE_INT64_TYPE sqlite_int64;\n# ifdef SQLITE_UINT64_TYPE\n    typedef SQLITE_UINT64_TYPE sqlite_uint64;\n# else\n    typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;\n# endif\n#elif defined(_MSC_VER) || defined(__BORLANDC__)\n  typedef __int64 sqlite_int64;\n  typedef unsigned __int64 sqlite_uint64;\n#else\n  typedef long long int sqlite_int64;\n  typedef unsigned long long int sqlite_uint64;\n#endif\ntypedef sqlite_int64 sqlite3_int64;\ntypedef sqlite_uint64 sqlite3_uint64;\n\n/*\n** If compiling for a processor that lacks floating point support,\n** substitute integer for floating-point.\n*/\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# define double sqlite3_int64\n#endif\n\n/*\n** CAPI3REF: Closing A Database Connection\n** DESTRUCTOR: sqlite3\n**\n** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors\n** for the [sqlite3] object.\n** ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if\n** the [sqlite3] object is successfully destroyed and all associated\n** resources are deallocated.\n**\n** Ideally, applications should [sqlite3_finalize | finalize] all\n** [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and\n** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated\n** with the [sqlite3] object prior to attempting to close the object.\n** ^If the database connection is associated with unfinalized prepared\n** statements, BLOB handlers, and/or unfinished sqlite3_backup objects then\n** sqlite3_close() will leave the database connection open and return\n** [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared\n** statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups,\n** it returns [SQLITE_OK] regardless, but instead of deallocating the database\n** connection immediately, it marks the database connection as an unusable\n** \"zombie\" and makes arrangements to automatically deallocate the database\n** connection after all prepared statements are finalized, all BLOB handles\n** are closed, and all backups have finished. The sqlite3_close_v2() interface\n** is intended for use with host languages that are garbage collected, and\n** where the order in which destructors are called is arbitrary.\n**\n** ^If an [sqlite3] object is destroyed while a transaction is open,\n** the transaction is automatically rolled back.\n**\n** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)]\n** must be either a NULL\n** pointer or an [sqlite3] object pointer obtained\n** from [sqlite3_open()], [sqlite3_open16()], or\n** [sqlite3_open_v2()], and not previously closed.\n** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer\n** argument is a harmless no-op.\n*/\nSQLITE_API int sqlite3_close(sqlite3*);\nSQLITE_API int sqlite3_close_v2(sqlite3*);\n\n/*\n** The type for a callback function.\n** This is legacy and deprecated.  It is included for historical\n** compatibility and is not documented.\n*/\ntypedef int (*sqlite3_callback)(void*,int,char**, char**);\n\n/*\n** CAPI3REF: One-Step Query Execution Interface\n** METHOD: sqlite3\n**\n** The sqlite3_exec() interface is a convenience wrapper around\n** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],\n** that allows an application to run multiple statements of SQL\n** without having to use a lot of C code.\n**\n** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,\n** semicolon-separated SQL statements passed into its 2nd argument,\n** in the context of the [database connection] passed in as its 1st\n** argument.  ^If the callback function of the 3rd argument to\n** sqlite3_exec() is not NULL, then it is invoked for each result row\n** coming out of the evaluated SQL statements.  ^The 4th argument to\n** sqlite3_exec() is relayed through to the 1st argument of each\n** callback invocation.  ^If the callback pointer to sqlite3_exec()\n** is NULL, then no callback is ever invoked and result rows are\n** ignored.\n**\n** ^If an error occurs while evaluating the SQL statements passed into\n** sqlite3_exec(), then execution of the current statement stops and\n** subsequent statements are skipped.  ^If the 5th parameter to sqlite3_exec()\n** is not NULL then any error message is written into memory obtained\n** from [sqlite3_malloc()] and passed back through the 5th parameter.\n** To avoid memory leaks, the application should invoke [sqlite3_free()]\n** on error message strings returned through the 5th parameter of\n** sqlite3_exec() after the error message string is no longer needed.\n** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors\n** occur, then sqlite3_exec() sets the pointer in its 5th parameter to\n** NULL before returning.\n**\n** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()\n** routine returns SQLITE_ABORT without invoking the callback again and\n** without running any subsequent SQL statements.\n**\n** ^The 2nd argument to the sqlite3_exec() callback function is the\n** number of columns in the result.  ^The 3rd argument to the sqlite3_exec()\n** callback is an array of pointers to strings obtained as if from\n** [sqlite3_column_text()], one for each column.  ^If an element of a\n** result row is NULL then the corresponding string pointer for the\n** sqlite3_exec() callback is a NULL pointer.  ^The 4th argument to the\n** sqlite3_exec() callback is an array of pointers to strings where each\n** entry represents the name of a corresponding result column as obtained\n** from [sqlite3_column_name()].\n**\n** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer\n** to an empty string, or a pointer that contains only whitespace and/or\n** SQL comments, then no SQL statements are evaluated and the database\n** is not changed.\n**\n** Restrictions:\n**\n** <ul>\n** <li> The application must ensure that the 1st parameter to sqlite3_exec()\n**      is a valid and open [database connection].\n** <li> The application must not close the [database connection] specified by\n**      the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.\n** <li> The application must not modify the SQL statement text passed into\n**      the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.\n** <li> The application must not dereference the arrays or string pointers\n**       passed as the 3rd and 4th callback parameters after it returns.\n** </ul>\n*/\nSQLITE_API int sqlite3_exec(\n  sqlite3*,                                  /* An open database */\n  const char *sql,                           /* SQL to be evaluated */\n  int (*callback)(void*,int,char**,char**),  /* Callback function */\n  void *,                                    /* 1st argument to callback */\n  char **errmsg                              /* Error msg written here */\n);\n\n/*\n** CAPI3REF: Result Codes\n** KEYWORDS: {result code definitions}\n**\n** Many SQLite functions return an integer result code from the set shown\n** here in order to indicate success or failure.\n**\n** New error codes may be added in future versions of SQLite.\n**\n** See also: [extended result code definitions]\n*/\n#define SQLITE_OK           0   /* Successful result */\n/* beginning-of-error-codes */\n#define SQLITE_ERROR        1   /* Generic error */\n#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */\n#define SQLITE_PERM         3   /* Access permission denied */\n#define SQLITE_ABORT        4   /* Callback routine requested an abort */\n#define SQLITE_BUSY         5   /* The database file is locked */\n#define SQLITE_LOCKED       6   /* A table in the database is locked */\n#define SQLITE_NOMEM        7   /* A malloc() failed */\n#define SQLITE_READONLY     8   /* Attempt to write a readonly database */\n#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/\n#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */\n#define SQLITE_CORRUPT     11   /* The database disk image is malformed */\n#define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */\n#define SQLITE_FULL        13   /* Insertion failed because database is full */\n#define SQLITE_CANTOPEN    14   /* Unable to open the database file */\n#define SQLITE_PROTOCOL    15   /* Database lock protocol error */\n#define SQLITE_EMPTY       16   /* Internal use only */\n#define SQLITE_SCHEMA      17   /* The database schema changed */\n#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */\n#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */\n#define SQLITE_MISMATCH    20   /* Data type mismatch */\n#define SQLITE_MISUSE      21   /* Library used incorrectly */\n#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */\n#define SQLITE_AUTH        23   /* Authorization denied */\n#define SQLITE_FORMAT      24   /* Not used */\n#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */\n#define SQLITE_NOTADB      26   /* File opened that is not a database file */\n#define SQLITE_NOTICE      27   /* Notifications from sqlite3_log() */\n#define SQLITE_WARNING     28   /* Warnings from sqlite3_log() */\n#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */\n#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */\n/* end-of-error-codes */\n\n/*\n** CAPI3REF: Extended Result Codes\n** KEYWORDS: {extended result code definitions}\n**\n** In its default configuration, SQLite API routines return one of 30 integer\n** [result codes].  However, experience has shown that many of\n** these result codes are too coarse-grained.  They do not provide as\n** much information about problems as programmers might like.  In an effort to\n** address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]\n** and later) include\n** support for additional result codes that provide more detailed information\n** about errors. These [extended result codes] are enabled or disabled\n** on a per database connection basis using the\n** [sqlite3_extended_result_codes()] API.  Or, the extended code for\n** the most recent error can be obtained using\n** [sqlite3_extended_errcode()].\n*/\n#define SQLITE_ERROR_MISSING_COLLSEQ   (SQLITE_ERROR | (1<<8))\n#define SQLITE_ERROR_RETRY             (SQLITE_ERROR | (2<<8))\n#define SQLITE_ERROR_SNAPSHOT          (SQLITE_ERROR | (3<<8))\n#define SQLITE_ERROR_RESERVESIZE       (SQLITE_ERROR | (4<<8))\n#define SQLITE_ERROR_KEY               (SQLITE_ERROR | (5<<8))\n#define SQLITE_ERROR_UNABLE            (SQLITE_ERROR | (6<<8))\n#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))\n#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))\n#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))\n#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))\n#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))\n#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))\n#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))\n#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))\n#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))\n#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))\n#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))\n#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))\n#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))\n#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))\n#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))\n#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))\n#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))\n#define SQLITE_IOERR_SHMOPEN           (SQLITE_IOERR | (18<<8))\n#define SQLITE_IOERR_SHMSIZE           (SQLITE_IOERR | (19<<8))\n#define SQLITE_IOERR_SHMLOCK           (SQLITE_IOERR | (20<<8))\n#define SQLITE_IOERR_SHMMAP            (SQLITE_IOERR | (21<<8))\n#define SQLITE_IOERR_SEEK              (SQLITE_IOERR | (22<<8))\n#define SQLITE_IOERR_DELETE_NOENT      (SQLITE_IOERR | (23<<8))\n#define SQLITE_IOERR_MMAP              (SQLITE_IOERR | (24<<8))\n#define SQLITE_IOERR_GETTEMPPATH       (SQLITE_IOERR | (25<<8))\n#define SQLITE_IOERR_CONVPATH          (SQLITE_IOERR | (26<<8))\n#define SQLITE_IOERR_VNODE             (SQLITE_IOERR | (27<<8))\n#define SQLITE_IOERR_AUTH              (SQLITE_IOERR | (28<<8))\n#define SQLITE_IOERR_BEGIN_ATOMIC      (SQLITE_IOERR | (29<<8))\n#define SQLITE_IOERR_COMMIT_ATOMIC     (SQLITE_IOERR | (30<<8))\n#define SQLITE_IOERR_ROLLBACK_ATOMIC   (SQLITE_IOERR | (31<<8))\n#define SQLITE_IOERR_DATA              (SQLITE_IOERR | (32<<8))\n#define SQLITE_IOERR_CORRUPTFS         (SQLITE_IOERR | (33<<8))\n#define SQLITE_IOERR_IN_PAGE           (SQLITE_IOERR | (34<<8))\n#define SQLITE_IOERR_BADKEY            (SQLITE_IOERR | (35<<8))\n#define SQLITE_IOERR_CODEC             (SQLITE_IOERR | (36<<8))\n#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED |  (1<<8))\n#define SQLITE_LOCKED_VTAB             (SQLITE_LOCKED |  (2<<8))\n#define SQLITE_BUSY_RECOVERY           (SQLITE_BUSY   |  (1<<8))\n#define SQLITE_BUSY_SNAPSHOT           (SQLITE_BUSY   |  (2<<8))\n#define SQLITE_BUSY_TIMEOUT            (SQLITE_BUSY   |  (3<<8))\n#define SQLITE_CANTOPEN_NOTEMPDIR      (SQLITE_CANTOPEN | (1<<8))\n#define SQLITE_CANTOPEN_ISDIR          (SQLITE_CANTOPEN | (2<<8))\n#define SQLITE_CANTOPEN_FULLPATH       (SQLITE_CANTOPEN | (3<<8))\n#define SQLITE_CANTOPEN_CONVPATH       (SQLITE_CANTOPEN | (4<<8))\n#define SQLITE_CANTOPEN_DIRTYWAL       (SQLITE_CANTOPEN | (5<<8)) /* Not Used */\n#define SQLITE_CANTOPEN_SYMLINK        (SQLITE_CANTOPEN | (6<<8))\n#define SQLITE_CORRUPT_VTAB            (SQLITE_CORRUPT | (1<<8))\n#define SQLITE_CORRUPT_SEQUENCE        (SQLITE_CORRUPT | (2<<8))\n#define SQLITE_CORRUPT_INDEX           (SQLITE_CORRUPT | (3<<8))\n#define SQLITE_READONLY_RECOVERY       (SQLITE_READONLY | (1<<8))\n#define SQLITE_READONLY_CANTLOCK       (SQLITE_READONLY | (2<<8))\n#define SQLITE_READONLY_ROLLBACK       (SQLITE_READONLY | (3<<8))\n#define SQLITE_READONLY_DBMOVED        (SQLITE_READONLY | (4<<8))\n#define SQLITE_READONLY_CANTINIT       (SQLITE_READONLY | (5<<8))\n#define SQLITE_READONLY_DIRECTORY      (SQLITE_READONLY | (6<<8))\n#define SQLITE_ABORT_ROLLBACK          (SQLITE_ABORT | (2<<8))\n#define SQLITE_CONSTRAINT_CHECK        (SQLITE_CONSTRAINT | (1<<8))\n#define SQLITE_CONSTRAINT_COMMITHOOK   (SQLITE_CONSTRAINT | (2<<8))\n#define SQLITE_CONSTRAINT_FOREIGNKEY   (SQLITE_CONSTRAINT | (3<<8))\n#define SQLITE_CONSTRAINT_FUNCTION     (SQLITE_CONSTRAINT | (4<<8))\n#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))\n#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))\n#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))\n#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))\n#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))\n#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))\n#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))\n#define SQLITE_CONSTRAINT_DATATYPE     (SQLITE_CONSTRAINT |(12<<8))\n#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))\n#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))\n#define SQLITE_NOTICE_RBU              (SQLITE_NOTICE | (3<<8))\n#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))\n#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))\n#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))\n#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8)) /* internal use only */\n\n/*\n** CAPI3REF: Flags For File Open Operations\n**\n** These bit values are intended for use in the\n** 3rd parameter to the [sqlite3_open_v2()] interface and\n** in the 4th parameter to the [sqlite3_vfs.xOpen] method.\n**\n** Only those flags marked as \"Ok for sqlite3_open_v2()\" may be\n** used as the third argument to the [sqlite3_open_v2()] interface.\n** The other flags have historically been ignored by sqlite3_open_v2(),\n** though future versions of SQLite might change so that an error is\n** raised if any of the disallowed bits are passed into sqlite3_open_v2().\n** Applications should not depend on the historical behavior.\n**\n** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into\n** [sqlite3_open_v2()] does *not* cause the underlying database file\n** to be opened using O_EXCL.  Passing SQLITE_OPEN_EXCLUSIVE into\n** [sqlite3_open_v2()] has historically been a no-op and might become an\n** error in future versions of SQLite.\n*/\n#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */\n#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */\n#define SQLITE_OPEN_AUTOPROXY        0x00000020  /* VFS only */\n#define SQLITE_OPEN_URI              0x00000040  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_MEMORY           0x00000080  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */\n#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */\n#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */\n#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */\n#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */\n#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */\n#define SQLITE_OPEN_SUPER_JOURNAL    0x00004000  /* VFS only */\n#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_WAL              0x00080000  /* VFS only */\n#define SQLITE_OPEN_NOFOLLOW         0x01000000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_EXRESCODE        0x02000000  /* Extended result codes */\n\n/* Reserved:                         0x00F00000 */\n/* Legacy compatibility: */\n#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */\n\n\n/*\n** CAPI3REF: Device Characteristics\n**\n** The xDeviceCharacteristics method of the [sqlite3_io_methods]\n** object returns an integer which is a vector of these\n** bit values expressing I/O characteristics of the mass storage\n** device that holds the file that the [sqlite3_io_methods]\n** refers to.\n**\n** The SQLITE_IOCAP_ATOMIC property means that all writes of\n** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n** mean that writes of blocks that are nnn bytes in size and\n** are aligned to an address which is an integer multiple of\n** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n** that when data is appended to a file, the data is appended\n** first then the size of the file is extended, never the other\n** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n** information is written to disk in the same order as calls\n** to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that\n** after reboot following a crash or power loss, the only bytes in a\n** file that were written at the application level might have changed\n** and that adjacent bytes, even bytes within the same sector are\n** guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN\n** flag indicates that a file cannot be deleted when open.  The\n** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on\n** read-only media and cannot be changed even by processes with\n** elevated privileges.\n**\n** The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying\n** filesystem supports doing multiple write operations atomically when those\n** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and\n** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].\n**\n** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read\n** from the database file in amounts that are not a multiple of the\n** page size and that do not begin at a page boundary.  Without this\n** property, SQLite is careful to only do full-page reads and write\n** on aligned pages, with the one exception that it will do a sub-page\n** read of the first page to access the database header.\n*/\n#define SQLITE_IOCAP_ATOMIC                 0x00000001\n#define SQLITE_IOCAP_ATOMIC512              0x00000002\n#define SQLITE_IOCAP_ATOMIC1K               0x00000004\n#define SQLITE_IOCAP_ATOMIC2K               0x00000008\n#define SQLITE_IOCAP_ATOMIC4K               0x00000010\n#define SQLITE_IOCAP_ATOMIC8K               0x00000020\n#define SQLITE_IOCAP_ATOMIC16K              0x00000040\n#define SQLITE_IOCAP_ATOMIC32K              0x00000080\n#define SQLITE_IOCAP_ATOMIC64K              0x00000100\n#define SQLITE_IOCAP_SAFE_APPEND            0x00000200\n#define SQLITE_IOCAP_SEQUENTIAL             0x00000400\n#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800\n#define SQLITE_IOCAP_POWERSAFE_OVERWRITE    0x00001000\n#define SQLITE_IOCAP_IMMUTABLE              0x00002000\n#define SQLITE_IOCAP_BATCH_ATOMIC           0x00004000\n#define SQLITE_IOCAP_SUBPAGE_READ           0x00008000\n\n/*\n** CAPI3REF: File Locking Levels\n**\n** SQLite uses one of these integer values as the second\n** argument to calls it makes to the xLock() and xUnlock() methods\n** of an [sqlite3_io_methods] object.  These values are ordered from\n** least restrictive to most restrictive.\n**\n** The argument to xLock() is always SHARED or higher.  The argument to\n** xUnlock is either SHARED or NONE.\n*/\n#define SQLITE_LOCK_NONE          0       /* xUnlock() only */\n#define SQLITE_LOCK_SHARED        1       /* xLock() or xUnlock() */\n#define SQLITE_LOCK_RESERVED      2       /* xLock() only */\n#define SQLITE_LOCK_PENDING       3       /* xLock() only */\n#define SQLITE_LOCK_EXCLUSIVE     4       /* xLock() only */\n\n/*\n** CAPI3REF: Synchronization Type Flags\n**\n** When SQLite invokes the xSync() method of an\n** [sqlite3_io_methods] object it uses a combination of\n** these integer values as the second argument.\n**\n** When the SQLITE_SYNC_DATAONLY flag is used, it means that the\n** sync operation only needs to flush data to mass storage.  Inode\n** information need not be flushed. If the lower four bits of the flag\n** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.\n** If the lower four bits equal SQLITE_SYNC_FULL, that means\n** to use Mac OS X style fullsync instead of fsync().\n**\n** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags\n** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL\n** settings.  The [synchronous pragma] determines when calls to the\n** xSync VFS method occur and applies uniformly across all platforms.\n** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how\n** energetic or rigorous or forceful the sync operations are and\n** only make a difference on Mac OSX for the default SQLite code.\n** (Third-party VFS implementations might also make the distinction\n** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the\n** operating systems natively supported by SQLite, only Mac OSX\n** cares about the difference.)\n*/\n#define SQLITE_SYNC_NORMAL        0x00002\n#define SQLITE_SYNC_FULL          0x00003\n#define SQLITE_SYNC_DATAONLY      0x00010\n\n/*\n** CAPI3REF: OS Interface Open File Handle\n**\n** An [sqlite3_file] object represents an open file in the\n** [sqlite3_vfs | OS interface layer].  Individual OS interface\n** implementations will\n** want to subclass this object by appending additional fields\n** for their own use.  The pMethods entry is a pointer to an\n** [sqlite3_io_methods] object that defines methods for performing\n** I/O operations on the open file.\n*/\ntypedef struct sqlite3_file sqlite3_file;\nstruct sqlite3_file {\n  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */\n};\n\n/*\n** CAPI3REF: OS Interface File Virtual Methods Object\n**\n** Every file opened by the [sqlite3_vfs.xOpen] method populates an\n** [sqlite3_file] object (or, more commonly, a subclass of the\n** [sqlite3_file] object) with a pointer to an instance of this object.\n** This object defines the methods used to perform various operations\n** against the open file represented by the [sqlite3_file] object.\n**\n** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element\n** to a non-NULL pointer, then the sqlite3_io_methods.xClose method\n** may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed.  The\n** only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen]\n** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element\n** to NULL.\n**\n** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or\n** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().\n** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]\n** flag may be ORed in to indicate that only the data of the file\n** and not its inode needs to be synced.\n**\n** The integer values to xLock() and xUnlock() are one of\n** <ul>\n** <li> [SQLITE_LOCK_NONE],\n** <li> [SQLITE_LOCK_SHARED],\n** <li> [SQLITE_LOCK_RESERVED],\n** <li> [SQLITE_LOCK_PENDING], or\n** <li> [SQLITE_LOCK_EXCLUSIVE].\n** </ul>\n** xLock() upgrades the database file lock.  In other words, xLock() moves the\n** database file lock in the direction NONE toward EXCLUSIVE. The argument to\n** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never\n** SQLITE_LOCK_NONE.  If the database file lock is already at or above the\n** requested lock, then the call to xLock() is a no-op.\n** xUnlock() downgrades the database file lock to either SHARED or NONE.\n** If the lock is already at or below the requested lock state, then the call\n** to xUnlock() is a no-op.\n** The xCheckReservedLock() method checks whether any database connection,\n** either in this process or in some other process, is holding a RESERVED,\n** PENDING, or EXCLUSIVE lock on the file.  It returns, via its output\n** pointer parameter, true if such a lock exists and false otherwise.\n**\n** The xFileControl() method is a generic interface that allows custom\n** VFS implementations to directly control an open file using the\n** [sqlite3_file_control()] interface.  The second \"op\" argument is an\n** integer opcode.  The third argument is a generic pointer intended to\n** point to a structure that may contain arguments or space in which to\n** write return values.  Potential uses for xFileControl() might be\n** functions to enable blocking locks with timeouts, to change the\n** locking strategy (for example to use dot-file locks), to inquire\n** about the status of a lock, or to break stale locks.  The SQLite\n** core reserves all opcodes less than 100 for its own use.\n** A [file control opcodes | list of opcodes] less than 100 is available.\n** Applications that define a custom xFileControl method should use opcodes\n** greater than 100 to avoid conflicts.  VFS implementations should\n** return [SQLITE_NOTFOUND] for file control opcodes that they do not\n** recognize.\n**\n** The xSectorSize() method returns the sector size of the\n** device that underlies the file.  The sector size is the\n** minimum write that can be performed without disturbing\n** other bytes in the file.  The xDeviceCharacteristics()\n** method returns a bit vector describing behaviors of the\n** underlying device:\n**\n** <ul>\n** <li> [SQLITE_IOCAP_ATOMIC]\n** <li> [SQLITE_IOCAP_ATOMIC512]\n** <li> [SQLITE_IOCAP_ATOMIC1K]\n** <li> [SQLITE_IOCAP_ATOMIC2K]\n** <li> [SQLITE_IOCAP_ATOMIC4K]\n** <li> [SQLITE_IOCAP_ATOMIC8K]\n** <li> [SQLITE_IOCAP_ATOMIC16K]\n** <li> [SQLITE_IOCAP_ATOMIC32K]\n** <li> [SQLITE_IOCAP_ATOMIC64K]\n** <li> [SQLITE_IOCAP_SAFE_APPEND]\n** <li> [SQLITE_IOCAP_SEQUENTIAL]\n** <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]\n** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]\n** <li> [SQLITE_IOCAP_IMMUTABLE]\n** <li> [SQLITE_IOCAP_BATCH_ATOMIC]\n** <li> [SQLITE_IOCAP_SUBPAGE_READ]\n** </ul>\n**\n** The SQLITE_IOCAP_ATOMIC property means that all writes of\n** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n** mean that writes of blocks that are nnn bytes in size and\n** are aligned to an address which is an integer multiple of\n** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n** that when data is appended to a file, the data is appended\n** first then the size of the file is extended, never the other\n** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n** information is written to disk in the same order as calls\n** to xWrite().\n**\n** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill\n** in the unread portions of the buffer with zeros.  A VFS that\n** fails to zero-fill short reads might seem to work.  However,\n** failure to zero-fill short reads will eventually lead to\n** database corruption.\n*/\ntypedef struct sqlite3_io_methods sqlite3_io_methods;\nstruct sqlite3_io_methods {\n  int iVersion;\n  int (*xClose)(sqlite3_file*);\n  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\n  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);\n  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);\n  int (*xSync)(sqlite3_file*, int flags);\n  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);\n  int (*xLock)(sqlite3_file*, int);\n  int (*xUnlock)(sqlite3_file*, int);\n  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);\n  int (*xFileControl)(sqlite3_file*, int op, void *pArg);\n  int (*xSectorSize)(sqlite3_file*);\n  int (*xDeviceCharacteristics)(sqlite3_file*);\n  /* Methods above are valid for version 1 */\n  int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);\n  int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);\n  void (*xShmBarrier)(sqlite3_file*);\n  int (*xShmUnmap)(sqlite3_file*, int deleteFlag);\n  /* Methods above are valid for version 2 */\n  int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);\n  int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);\n  /* Methods above are valid for version 3 */\n  /* Additional methods may be added in future releases */\n};\n\n/*\n** CAPI3REF: Standard File Control Opcodes\n** KEYWORDS: {file control opcodes} {file control opcode}\n**\n** These integer constants are opcodes for the xFileControl method\n** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]\n** interface.\n**\n** <ul>\n** <li>[[SQLITE_FCNTL_LOCKSTATE]]\n** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This\n** opcode causes the xFileControl method to write the current state of\n** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],\n** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])\n** into an integer that the pArg argument points to.\n** This capability is only available if SQLite is compiled with [SQLITE_DEBUG].\n**\n** <li>[[SQLITE_FCNTL_SIZE_HINT]]\n** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS\n** layer a hint of how large the database file will grow to be during the\n** current transaction.  This hint is not guaranteed to be accurate but it\n** is often close.  The underlying VFS might choose to preallocate database\n** file space based on this hint in order to help writes to the database\n** file run faster.\n**\n** <li>[[SQLITE_FCNTL_SIZE_LIMIT]]\n** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that\n** implements [sqlite3_deserialize()] to set an upper bound on the size\n** of the in-memory database.  The argument is a pointer to a [sqlite3_int64].\n** If the integer pointed to is negative, then it is filled in with the\n** current limit.  Otherwise the limit is set to the larger of the value\n** of the integer pointed to and the current database size.  The integer\n** pointed to is set to the new limit.\n**\n** <li>[[SQLITE_FCNTL_CHUNK_SIZE]]\n** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS\n** extends and truncates the database file in chunks of a size specified\n** by the user. The fourth argument to [sqlite3_file_control()] should\n** point to an integer (type int) containing the new chunk-size to use\n** for the nominated database. Allocating database file space in large\n** chunks (say 1MB at a time), may reduce file-system fragmentation and\n** improve performance on some systems.\n**\n** <li>[[SQLITE_FCNTL_FILE_POINTER]]\n** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer\n** to the [sqlite3_file] object associated with a particular database\n** connection.  See also [SQLITE_FCNTL_JOURNAL_POINTER].\n**\n** <li>[[SQLITE_FCNTL_JOURNAL_POINTER]]\n** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer\n** to the [sqlite3_file] object associated with the journal file (either\n** the [rollback journal] or the [write-ahead log]) for a particular database\n** connection.  See also [SQLITE_FCNTL_FILE_POINTER].\n**\n** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]\n** The SQLITE_FCNTL_SYNC_OMITTED file-control is no longer used.\n**\n** <li>[[SQLITE_FCNTL_SYNC]]\n** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and\n** sent to the VFS immediately before the xSync method is invoked on a\n** database file descriptor. Or, if the xSync method is not invoked\n** because the user has configured SQLite with\n** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place\n** of the xSync method. In most cases, the pointer argument passed with\n** this file-control is NULL. However, if the database file is being synced\n** as part of a multi-database commit, the argument points to a nul-terminated\n** string containing the transactions super-journal file name. VFSes that\n** do not need this signal should silently ignore this opcode. Applications\n** should not call [sqlite3_file_control()] with this opcode as doing so may\n** disrupt the operation of the specialized VFSes that do require it.\n**\n** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]]\n** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite\n** and sent to the VFS after a transaction has been committed immediately\n** but before the database is unlocked. VFSes that do not need this signal\n** should silently ignore this opcode. Applications should not call\n** [sqlite3_file_control()] with this opcode as doing so may disrupt the\n** operation of the specialized VFSes that do require it.\n**\n** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]\n** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic\n** retry counts and intervals for certain disk I/O operations for the\n** windows [VFS] in order to provide robustness in the presence of\n** anti-virus programs.  By default, the windows VFS will retry file read,\n** file write, and file delete operations up to 10 times, with a delay\n** of 25 milliseconds before the first retry and with the delay increasing\n** by an additional 25 milliseconds with each subsequent retry.  This\n** opcode allows these two values (10 retries and 25 milliseconds of delay)\n** to be adjusted.  The values are changed for all database connections\n** within the same process.  The argument is a pointer to an array of two\n** integers where the first integer is the new retry count and the second\n** integer is the delay.  If either integer is negative, then the setting\n** is not changed but instead the prior value of that setting is written\n** into the array entry, allowing the current retry settings to be\n** interrogated.  The zDbName parameter is ignored.\n**\n** <li>[[SQLITE_FCNTL_PERSIST_WAL]]\n** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the\n** persistent [WAL | Write Ahead Log] setting.  By default, the auxiliary\n** write ahead log ([WAL file]) and shared memory\n** files used for transaction control\n** are automatically deleted when the latest connection to the database\n** closes.  Setting persistent WAL mode causes those files to persist after\n** close.  Persisting the files is useful when other processes that do not\n** have write permission on the directory containing the database file want\n** to read the database file, as the WAL and shared memory files must exist\n** in order for the database to be readable.  The fourth parameter to\n** [sqlite3_file_control()] for this opcode should be a pointer to an integer.\n** That integer is 0 to disable persistent WAL mode or 1 to enable persistent\n** WAL mode.  If the integer is -1, then it is overwritten with the current\n** WAL persistence setting.\n**\n** <li>[[SQLITE_FCNTL_POWERSAFE_OVERWRITE]]\n** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the\n** persistent \"powersafe-overwrite\" or \"PSOW\" setting.  The PSOW setting\n** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the\n** xDeviceCharacteristics methods. The fourth parameter to\n** [sqlite3_file_control()] for this opcode should be a pointer to an integer.\n** That integer is 0 to disable zero-damage mode or 1 to enable zero-damage\n** mode.  If the integer is -1, then it is overwritten with the current\n** zero-damage mode setting.\n**\n** <li>[[SQLITE_FCNTL_OVERWRITE]]\n** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening\n** a write transaction to indicate that, unless it is rolled back for some\n** reason, the entire database file will be overwritten by the current\n** transaction. This is used by VACUUM operations.\n**\n** <li>[[SQLITE_FCNTL_VFSNAME]]\n** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of\n** all [VFSes] in the VFS stack.  The names of all VFS shims and the\n** final bottom-level VFS are written into memory obtained from\n** [sqlite3_malloc()] and the result is stored in the char* variable\n** that the fourth parameter of [sqlite3_file_control()] points to.\n** The caller is responsible for freeing the memory when done.  As with\n** all file-control actions, there is no guarantee that this will actually\n** do anything.  Callers should initialize the char* variable to a NULL\n** pointer in case this file-control is not implemented.  This file-control\n** is intended for diagnostic use only.\n**\n** <li>[[SQLITE_FCNTL_VFS_POINTER]]\n** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level\n** [VFSes] currently in use.  ^(The argument X in\n** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be\n** of type \"[sqlite3_vfs] **\".  This opcode will set *X\n** to a pointer to the top-level VFS.)^\n** ^When there are multiple VFS shims in the stack, this opcode finds the\n** upper-most shim only.\n**\n** <li>[[SQLITE_FCNTL_PRAGMA]]\n** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA]\n** file control is sent to the open [sqlite3_file] object corresponding\n** to the database file to which the pragma statement refers. ^The argument\n** to the [SQLITE_FCNTL_PRAGMA] file control is an array of\n** pointers to strings (char**) in which the second element of the array\n** is the name of the pragma and the third element is the argument to the\n** pragma or NULL if the pragma has no argument.  ^The handler for an\n** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element\n** of the char** argument point to a string obtained from [sqlite3_mprintf()]\n** or the equivalent and that string will become the result of the pragma or\n** the error message if the pragma fails. ^If the\n** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal\n** [PRAGMA] processing continues.  ^If the [SQLITE_FCNTL_PRAGMA]\n** file control returns [SQLITE_OK], then the parser assumes that the\n** VFS has handled the PRAGMA itself and the parser generates a no-op\n** prepared statement if result string is NULL, or that returns a copy\n** of the result string if the string is non-NULL.\n** ^If the [SQLITE_FCNTL_PRAGMA] file control returns\n** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means\n** that the VFS encountered an error while handling the [PRAGMA] and the\n** compilation of the PRAGMA fails with an error.  ^The [SQLITE_FCNTL_PRAGMA]\n** file control occurs at the beginning of pragma statement analysis and so\n** it is able to override built-in [PRAGMA] statements.\n**\n** <li>[[SQLITE_FCNTL_BUSYHANDLER]]\n** ^The [SQLITE_FCNTL_BUSYHANDLER]\n** file-control may be invoked by SQLite on the database file handle\n** shortly after it is opened in order to provide a custom VFS with access\n** to the connection's busy-handler callback. The argument is of type (void**)\n** - an array of two (void *) values. The first (void *) actually points\n** to a function of type (int (*)(void *)). In order to invoke the connection's\n** busy-handler, this function should be invoked with the second (void *) in\n** the array as the only argument. If it returns non-zero, then the operation\n** should be retried. If it returns zero, the custom VFS should abandon the\n** current operation.\n**\n** <li>[[SQLITE_FCNTL_TEMPFILENAME]]\n** ^Applications can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control\n** to have SQLite generate a\n** temporary filename using the same algorithm that is followed to generate\n** temporary filenames for TEMP tables and other internal uses.  The\n** argument should be a char** which will be filled with the filename\n** written into memory obtained from [sqlite3_malloc()].  The caller should\n** invoke [sqlite3_free()] on the result to avoid a memory leak.\n**\n** <li>[[SQLITE_FCNTL_MMAP_SIZE]]\n** The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the\n** maximum number of bytes that will be used for memory-mapped I/O.\n** The argument is a pointer to a value of type sqlite3_int64 that\n** is an advisory maximum number of bytes in the file to memory map.  The\n** pointer is overwritten with the old value.  The limit is not changed if\n** the value originally pointed to is negative, and so the current limit\n** can be queried by passing in a pointer to a negative number.  This\n** file-control is used internally to implement [PRAGMA mmap_size].\n**\n** <li>[[SQLITE_FCNTL_TRACE]]\n** The [SQLITE_FCNTL_TRACE] file control provides advisory information\n** to the VFS about what the higher layers of the SQLite stack are doing.\n** This file control is used by some VFS activity tracing [shims].\n** The argument is a zero-terminated string.  Higher layers in the\n** SQLite stack may generate instances of this file control if\n** the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled.\n**\n** <li>[[SQLITE_FCNTL_HAS_MOVED]]\n** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a\n** pointer to an integer and it writes a boolean into that integer depending\n** on whether or not the file has been renamed, moved, or deleted since it\n** was first opened.\n**\n** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]\n** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the\n** underlying native file handle associated with a file handle.  This file\n** control interprets its argument as a pointer to a native file handle and\n** writes the resulting value there.\n**\n** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]\n** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging.  This\n** opcode causes the xFileControl method to swap the file handle with the one\n** pointed to by the pArg argument.  This capability is used during testing\n** and only needs to be supported when SQLITE_TEST is defined.\n**\n** <li>[[SQLITE_FCNTL_NULL_IO]]\n** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor\n** or file handle for the [sqlite3_file] object such that it will no longer\n** read or write to the database file.\n**\n** <li>[[SQLITE_FCNTL_WAL_BLOCK]]\n** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might\n** be advantageous to block on the next WAL lock if the lock is not immediately\n** available.  The WAL subsystem issues this signal during rare\n** circumstances in order to fix a problem with priority inversion.\n** Applications should <em>not</em> use this file-control.\n**\n** <li>[[SQLITE_FCNTL_ZIPVFS]]\n** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other\n** VFS should return SQLITE_NOTFOUND for this opcode.\n**\n** <li>[[SQLITE_FCNTL_RBU]]\n** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by\n** the RBU extension only.  All other VFS should return SQLITE_NOTFOUND for\n** this opcode.\n**\n** <li>[[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]]\n** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then\n** the file descriptor is placed in \"batch write mode\", which\n** means all subsequent write operations will be deferred and done\n** atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].  Systems\n** that do not support batch atomic writes will return SQLITE_NOTFOUND.\n** ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to\n** the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or\n** [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make\n** no VFS interface calls on the same [sqlite3_file] file descriptor\n** except for calls to the xWrite method and the xFileControl method\n** with [SQLITE_FCNTL_SIZE_HINT].\n**\n** <li>[[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]]\n** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write\n** operations since the previous successful call to\n** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically.\n** This file control returns [SQLITE_OK] if and only if the writes were\n** all performed successfully and have been committed to persistent storage.\n** ^Regardless of whether or not it is successful, this file control takes\n** the file descriptor out of batch write mode so that all subsequent\n** write operations are independent.\n** ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without\n** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].\n**\n** <li>[[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]]\n** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write\n** operations since the previous successful call to\n** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back.\n** ^This file control takes the file descriptor out of batch write mode\n** so that all subsequent write operations are independent.\n** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without\n** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].\n**\n** <li>[[SQLITE_FCNTL_LOCK_TIMEOUT]]\n** The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode is used to configure a VFS\n** to block for up to M milliseconds before failing when attempting to\n** obtain a file lock using the xLock or xShmLock methods of the VFS.\n** The parameter is a pointer to a 32-bit signed integer that contains\n** the value that M is to be set to. Before returning, the 32-bit signed\n** integer is overwritten with the previous value of M.\n**\n** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]\n** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the\n** VFS to block when taking a SHARED lock to connect to a wal mode database.\n** This is used to implement the functionality associated with\n** SQLITE_SETLK_BLOCK_ON_CONNECT.\n**\n** <li>[[SQLITE_FCNTL_DATA_VERSION]]\n** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to\n** a database file.  The argument is a pointer to a 32-bit unsigned integer.\n** The \"data version\" for the pager is written into the pointer.  The\n** \"data version\" changes whenever any change occurs to the corresponding\n** database file, either through SQL statements on the same database\n** connection or through transactions committed by separate database\n** connections possibly in other processes. The [sqlite3_total_changes()]\n** interface can be used to find if any database on the connection has changed,\n** but that interface responds to changes on TEMP as well as MAIN and does\n** not provide a mechanism to detect changes to MAIN only.  Also, the\n** [sqlite3_total_changes()] interface responds to internal changes only and\n** omits changes made by other database connections.  The\n** [PRAGMA data_version] command provides a mechanism to detect changes to\n** a single attached database that occur due to other database connections,\n** but omits changes implemented by the database connection on which it is\n** called.  This file control is the only mechanism to detect changes that\n** happen either internally or externally and that are associated with\n** a particular attached database.\n**\n** <li>[[SQLITE_FCNTL_CKPT_START]]\n** The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint\n** in wal mode before the client starts to copy pages from the wal\n** file to the database file.\n**\n** <li>[[SQLITE_FCNTL_CKPT_DONE]]\n** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint\n** in wal mode after the client has finished copying pages from the wal\n** file to the database file, but before the *-shm file is updated to\n** record the fact that the pages have been checkpointed.\n**\n** <li>[[SQLITE_FCNTL_EXTERNAL_READER]]\n** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect\n** whether or not there is a database client in another process with a wal-mode\n** transaction open on the database or not. It is only available on unix. The\n** (void*) argument passed with this file-control should be a pointer to a\n** value of type (int). The integer value is set to 1 if the database is a wal\n** mode database and there exists at least one client in another process that\n** currently has an SQL transaction open on the database. It is set to 0 if\n** the database is not a wal-mode db, or if there is no such connection in any\n** other process. This opcode cannot be used to detect transactions opened\n** by clients within the current process, only within other processes.\n**\n** <li>[[SQLITE_FCNTL_CKSM_FILE]]\n** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the\n** [checksum VFS shim] only.\n**\n** <li>[[SQLITE_FCNTL_RESET_CACHE]]\n** If there is currently no transaction open on the database, and the\n** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control\n** purges the contents of the in-memory page cache. If there is an open\n** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.\n**\n** <li>[[SQLITE_FCNTL_FILESTAT]]\n** The [SQLITE_FCNTL_FILESTAT] opcode returns low-level diagnostic information\n** about the [sqlite3_file] objects used access the database and journal files\n** for the given schema.  The fourth parameter to [sqlite3_file_control()]\n** should be an initialized [sqlite3_str] pointer.  JSON text describing\n** various aspects of the sqlite3_file object is appended to the sqlite3_str.\n** The SQLITE_FCNTL_FILESTAT opcode is usually a no-op, unless compile-time\n** options are used to enable it.\n** </ul>\n*/\n#define SQLITE_FCNTL_LOCKSTATE               1\n#define SQLITE_FCNTL_GET_LOCKPROXYFILE       2\n#define SQLITE_FCNTL_SET_LOCKPROXYFILE       3\n#define SQLITE_FCNTL_LAST_ERRNO              4\n#define SQLITE_FCNTL_SIZE_HINT               5\n#define SQLITE_FCNTL_CHUNK_SIZE              6\n#define SQLITE_FCNTL_FILE_POINTER            7\n#define SQLITE_FCNTL_SYNC_OMITTED            8\n#define SQLITE_FCNTL_WIN32_AV_RETRY          9\n#define SQLITE_FCNTL_PERSIST_WAL            10\n#define SQLITE_FCNTL_OVERWRITE              11\n#define SQLITE_FCNTL_VFSNAME                12\n#define SQLITE_FCNTL_POWERSAFE_OVERWRITE    13\n#define SQLITE_FCNTL_PRAGMA                 14\n#define SQLITE_FCNTL_BUSYHANDLER            15\n#define SQLITE_FCNTL_TEMPFILENAME           16\n#define SQLITE_FCNTL_MMAP_SIZE              18\n#define SQLITE_FCNTL_TRACE                  19\n#define SQLITE_FCNTL_HAS_MOVED              20\n#define SQLITE_FCNTL_SYNC                   21\n#define SQLITE_FCNTL_COMMIT_PHASETWO        22\n#define SQLITE_FCNTL_WIN32_SET_HANDLE       23\n#define SQLITE_FCNTL_WAL_BLOCK              24\n#define SQLITE_FCNTL_ZIPVFS                 25\n#define SQLITE_FCNTL_RBU                    26\n#define SQLITE_FCNTL_VFS_POINTER            27\n#define SQLITE_FCNTL_JOURNAL_POINTER        28\n#define SQLITE_FCNTL_WIN32_GET_HANDLE       29\n#define SQLITE_FCNTL_PDB                    30\n#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE     31\n#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE    32\n#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE  33\n#define SQLITE_FCNTL_LOCK_TIMEOUT           34\n#define SQLITE_FCNTL_DATA_VERSION           35\n#define SQLITE_FCNTL_SIZE_LIMIT             36\n#define SQLITE_FCNTL_CKPT_DONE              37\n#define SQLITE_FCNTL_RESERVE_BYTES          38\n#define SQLITE_FCNTL_CKPT_START             39\n#define SQLITE_FCNTL_EXTERNAL_READER        40\n#define SQLITE_FCNTL_CKSM_FILE              41\n#define SQLITE_FCNTL_RESET_CACHE            42\n#define SQLITE_FCNTL_NULL_IO                43\n#define SQLITE_FCNTL_BLOCK_ON_CONNECT       44\n#define SQLITE_FCNTL_FILESTAT               45\n\n/* deprecated names */\n#define SQLITE_GET_LOCKPROXYFILE      SQLITE_FCNTL_GET_LOCKPROXYFILE\n#define SQLITE_SET_LOCKPROXYFILE      SQLITE_FCNTL_SET_LOCKPROXYFILE\n#define SQLITE_LAST_ERRNO             SQLITE_FCNTL_LAST_ERRNO\n\n\n/*\n** CAPI3REF: Mutex Handle\n**\n** The mutex module within SQLite defines [sqlite3_mutex] to be an\n** abstract type for a mutex object.  The SQLite core never looks\n** at the internal representation of an [sqlite3_mutex].  It only\n** deals with pointers to the [sqlite3_mutex] object.\n**\n** Mutexes are created using [sqlite3_mutex_alloc()].\n*/\ntypedef struct sqlite3_mutex sqlite3_mutex;\n\n/*\n** CAPI3REF: Loadable Extension Thunk\n**\n** A pointer to the opaque sqlite3_api_routines structure is passed as\n** the third parameter to entry points of [loadable extensions].  This\n** structure must be typedefed in order to work around compiler warnings\n** on some platforms.\n*/\ntypedef struct sqlite3_api_routines sqlite3_api_routines;\n\n/*\n** CAPI3REF: File Name\n**\n** Type [sqlite3_filename] is used by SQLite to pass filenames to the\n** xOpen method of a [VFS]. It may be cast to (const char*) and treated\n** as a normal, nul-terminated, UTF-8 buffer containing the filename, but\n** may also be passed to special APIs such as:\n**\n** <ul>\n** <li>  sqlite3_filename_database()\n** <li>  sqlite3_filename_journal()\n** <li>  sqlite3_filename_wal()\n** <li>  sqlite3_uri_parameter()\n** <li>  sqlite3_uri_boolean()\n** <li>  sqlite3_uri_int64()\n** <li>  sqlite3_uri_key()\n** </ul>\n*/\ntypedef const char *sqlite3_filename;\n\n/*\n** CAPI3REF: OS Interface Object\n**\n** An instance of the sqlite3_vfs object defines the interface between\n** the SQLite core and the underlying operating system.  The \"vfs\"\n** in the name of the object stands for \"virtual file system\".  See\n** the [VFS | VFS documentation] for further information.\n**\n** The VFS interface is sometimes extended by adding new methods onto\n** the end.  Each time such an extension occurs, the iVersion field\n** is incremented.  The iVersion value started out as 1 in\n** SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2\n** with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased\n** to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields\n** may be appended to the sqlite3_vfs object and the iVersion value\n** may increase again in future versions of SQLite.\n** Note that due to an oversight, the structure\n** of the sqlite3_vfs object changed in the transition from\n** SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]\n** and yet the iVersion field was not increased.\n**\n** The szOsFile field is the size of the subclassed [sqlite3_file]\n** structure used by this VFS.  mxPathname is the maximum length of\n** a pathname in this VFS.\n**\n** Registered sqlite3_vfs objects are kept on a linked list formed by\n** the pNext pointer.  The [sqlite3_vfs_register()]\n** and [sqlite3_vfs_unregister()] interfaces manage this list\n** in a thread-safe way.  The [sqlite3_vfs_find()] interface\n** searches the list.  Neither the application code nor the VFS\n** implementation should use the pNext pointer.\n**\n** The pNext field is the only field in the sqlite3_vfs\n** structure that SQLite will ever modify.  SQLite will only access\n** or modify this field while holding a particular static mutex.\n** The application should never modify anything within the sqlite3_vfs\n** object once the object has been registered.\n**\n** The zName field holds the name of the VFS module.  The name must\n** be unique across all VFS modules.\n**\n** [[sqlite3_vfs.xOpen]]\n** ^SQLite guarantees that the zFilename parameter to xOpen\n** is either a NULL pointer or string obtained\n** from xFullPathname() with an optional suffix added.\n** ^If a suffix is added to the zFilename parameter, it will\n** consist of a single \"-\" character followed by no more than\n** 11 alphanumeric and/or \"-\" characters.\n** ^SQLite further guarantees that\n** the string will be valid and unchanged until xClose() is\n** called. Because of the previous sentence,\n** the [sqlite3_file] can safely store a pointer to the\n** filename if it needs to remember the filename for some reason.\n** If the zFilename parameter to xOpen is a NULL pointer then xOpen\n** must invent its own temporary name for the file.  ^Whenever the\n** xFilename parameter is NULL it will also be the case that the\n** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].\n**\n** The flags argument to xOpen() includes all bits set in\n** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]\n** or [sqlite3_open16()] is used, then flags includes at least\n** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].\n** If xOpen() opens a file read-only then it sets *pOutFlags to\n** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.\n**\n** ^(SQLite will also add one of the following flags to the xOpen()\n** call, depending on the object being opened:\n**\n** <ul>\n** <li>  [SQLITE_OPEN_MAIN_DB]\n** <li>  [SQLITE_OPEN_MAIN_JOURNAL]\n** <li>  [SQLITE_OPEN_TEMP_DB]\n** <li>  [SQLITE_OPEN_TEMP_JOURNAL]\n** <li>  [SQLITE_OPEN_TRANSIENT_DB]\n** <li>  [SQLITE_OPEN_SUBJOURNAL]\n** <li>  [SQLITE_OPEN_SUPER_JOURNAL]\n** <li>  [SQLITE_OPEN_WAL]\n** </ul>)^\n**\n** The file I/O implementation can use the object type flags to\n** change the way it deals with files.  For example, an application\n** that does not care about crash recovery or rollback might make\n** the open of a journal file a no-op.  Writes to this journal would\n** also be no-ops, and any attempt to read the journal would return\n** SQLITE_IOERR.  Or the implementation might recognize that a database\n** file will be doing page-aligned sector reads and writes in a random\n** order and set up its I/O subsystem accordingly.\n**\n** SQLite might also add one of the following flags to the xOpen method:\n**\n** <ul>\n** <li> [SQLITE_OPEN_DELETEONCLOSE]\n** <li> [SQLITE_OPEN_EXCLUSIVE]\n** </ul>\n**\n** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be\n** deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]\n** will be set for TEMP databases and their journals, transient\n** databases, and subjournals.\n**\n** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction\n** with the [SQLITE_OPEN_CREATE] flag, which are both directly\n** analogous to the O_EXCL and O_CREAT flags of the POSIX open()\n** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the\n** SQLITE_OPEN_CREATE, is used to indicate that file should always\n** be created, and that it is an error if it already exists.\n** It is <i>not</i> used to indicate the file should be opened\n** for exclusive access.\n**\n** ^At least szOsFile bytes of memory are allocated by SQLite\n** to hold the [sqlite3_file] structure passed as the third\n** argument to xOpen.  The xOpen method does not have to\n** allocate the structure; it should just fill it in.  Note that\n** the xOpen method must set the sqlite3_file.pMethods to either\n** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do\n** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods\n** element will be valid after xOpen returns regardless of the success\n** or failure of the xOpen call.\n**\n** [[sqlite3_vfs.xAccess]]\n** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]\n** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to\n** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]\n** to test whether a file is at least readable.  The SQLITE_ACCESS_READ\n** flag is never actually used and is not implemented in the built-in\n** VFSes of SQLite.  The file is named by the second argument and can be a\n** directory. The xAccess method returns [SQLITE_OK] on success or some\n** non-zero error code if there is an I/O error or if the name of\n** the file given in the second argument is illegal.  If SQLITE_OK\n** is returned, then non-zero or zero is written into *pResOut to indicate\n** whether or not the file is accessible.\n**\n** ^SQLite will always allocate at least mxPathname+1 bytes for the\n** output buffer xFullPathname.  The exact size of the output buffer\n** is also passed as a parameter to both  methods. If the output buffer\n** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is\n** handled as a fatal error by SQLite, vfs implementations should endeavor\n** to prevent this by setting mxPathname to a sufficiently large value.\n**\n** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()\n** interfaces are not strictly a part of the filesystem, but they are\n** included in the VFS structure for completeness.\n** The xRandomness() function attempts to return nBytes bytes\n** of good-quality randomness into zOut.  The return value is\n** the actual number of bytes of randomness obtained.\n** The xSleep() method causes the calling thread to sleep for at\n** least the number of microseconds given.  ^The xCurrentTime()\n** method returns a Julian Day Number for the current date and time as\n** a floating point value.\n** ^The xCurrentTimeInt64() method returns, as an integer, the Julian\n** Day Number multiplied by 86400000 (the number of milliseconds in\n** a 24-hour day).\n** ^SQLite will use the xCurrentTimeInt64() method to get the current\n** date and time if that method is available (if iVersion is 2 or\n** greater and the function pointer is not NULL) and will fall back\n** to xCurrentTime() if xCurrentTimeInt64() is unavailable.\n**\n** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces\n** are not used by the SQLite core.  These optional interfaces are provided\n** by some VFSes to facilitate testing of the VFS code. By overriding\n** system calls with functions under its control, a test program can\n** simulate faults and error conditions that would otherwise be difficult\n** or impossible to induce.  The set of system calls that can be overridden\n** varies from one VFS to another, and from one version of the same VFS to the\n** next.  Applications that use these interfaces must be prepared for any\n** or all of these interfaces to be NULL or for their behavior to change\n** from one release to the next.  Applications must not attempt to access\n** any of these methods if the iVersion of the VFS is less than 3.\n*/\ntypedef struct sqlite3_vfs sqlite3_vfs;\ntypedef void (*sqlite3_syscall_ptr)(void);\nstruct sqlite3_vfs {\n  int iVersion;            /* Structure version number (currently 3) */\n  int szOsFile;            /* Size of subclassed sqlite3_file */\n  int mxPathname;          /* Maximum file pathname length */\n  sqlite3_vfs *pNext;      /* Next registered VFS */\n  const char *zName;       /* Name of this virtual file system */\n  void *pAppData;          /* Pointer to application-specific data */\n  int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*,\n               int flags, int *pOutFlags);\n  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);\n  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);\n  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);\n  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);\n  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);\n  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);\n  void (*xDlClose)(sqlite3_vfs*, void*);\n  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);\n  int (*xSleep)(sqlite3_vfs*, int microseconds);\n  int (*xCurrentTime)(sqlite3_vfs*, double*);\n  int (*xGetLastError)(sqlite3_vfs*, int, char *);\n  /*\n  ** The methods above are in version 1 of the sqlite_vfs object\n  ** definition.  Those that follow are added in version 2 or later\n  */\n  int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);\n  /*\n  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.\n  ** Those below are for version 3 and greater.\n  */\n  int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);\n  sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);\n  const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);\n  /*\n  ** The methods above are in versions 1 through 3 of the sqlite_vfs object.\n  ** New fields may be appended in future versions.  The iVersion\n  ** value will increment whenever this happens.\n  */\n};\n\n/*\n** CAPI3REF: Flags for the xAccess VFS method\n**\n** These integer constants can be used as the third parameter to\n** the xAccess method of an [sqlite3_vfs] object.  They determine\n** what kind of permissions the xAccess method is looking for.\n** With SQLITE_ACCESS_EXISTS, the xAccess method\n** simply checks whether the file exists.\n** With SQLITE_ACCESS_READWRITE, the xAccess method\n** checks whether the named directory is both readable and writable\n** (in other words, if files can be added, removed, and renamed within\n** the directory).\n** The SQLITE_ACCESS_READWRITE constant is currently used only by the\n** [temp_store_directory pragma], though this could change in a future\n** release of SQLite.\n** With SQLITE_ACCESS_READ, the xAccess method\n** checks whether the file is readable.  The SQLITE_ACCESS_READ constant is\n** currently unused, though it might be used in a future release of\n** SQLite.\n*/\n#define SQLITE_ACCESS_EXISTS    0\n#define SQLITE_ACCESS_READWRITE 1   /* Used by PRAGMA temp_store_directory */\n#define SQLITE_ACCESS_READ      2   /* Unused */\n\n/*\n** CAPI3REF: Flags for the xShmLock VFS method\n**\n** These integer constants define the various locking operations\n** allowed by the xShmLock method of [sqlite3_io_methods].  The\n** following are the only legal combinations of flags to the\n** xShmLock method:\n**\n** <ul>\n** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_SHARED\n** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE\n** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED\n** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE\n** </ul>\n**\n** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as\n** was given on the corresponding lock.\n**\n** The xShmLock method can transition between unlocked and SHARED or\n** between unlocked and EXCLUSIVE.  It cannot transition between SHARED\n** and EXCLUSIVE.\n*/\n#define SQLITE_SHM_UNLOCK       1\n#define SQLITE_SHM_LOCK         2\n#define SQLITE_SHM_SHARED       4\n#define SQLITE_SHM_EXCLUSIVE    8\n\n/*\n** CAPI3REF: Maximum xShmLock index\n**\n** The xShmLock method on [sqlite3_io_methods] may use values\n** between 0 and this upper bound as its \"offset\" argument.\n** The SQLite core will never attempt to acquire or release a\n** lock outside of this range\n*/\n#define SQLITE_SHM_NLOCK        8\n\n\n/*\n** CAPI3REF: Initialize The SQLite Library\n**\n** ^The sqlite3_initialize() routine initializes the\n** SQLite library.  ^The sqlite3_shutdown() routine\n** deallocates any resources that were allocated by sqlite3_initialize().\n** These routines are designed to aid in process initialization and\n** shutdown on embedded systems.  Workstation applications using\n** SQLite normally do not need to invoke either of these routines.\n**\n** A call to sqlite3_initialize() is an \"effective\" call if it is\n** the first time sqlite3_initialize() is invoked during the lifetime of\n** the process, or if it is the first time sqlite3_initialize() is invoked\n** following a call to sqlite3_shutdown().  ^(Only an effective call\n** of sqlite3_initialize() does any initialization.  All other calls\n** are harmless no-ops.)^\n**\n** A call to sqlite3_shutdown() is an \"effective\" call if it is the first\n** call to sqlite3_shutdown() since the last sqlite3_initialize().  ^(Only\n** an effective call to sqlite3_shutdown() does any deinitialization.\n** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^\n**\n** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()\n** is not.  The sqlite3_shutdown() interface must only be called from a\n** single thread.  All open [database connections] must be closed and all\n** other SQLite resources must be deallocated prior to invoking\n** sqlite3_shutdown().\n**\n** Among other things, ^sqlite3_initialize() will invoke\n** sqlite3_os_init().  Similarly, ^sqlite3_shutdown()\n** will invoke sqlite3_os_end().\n**\n** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.\n** ^If for some reason, sqlite3_initialize() is unable to initialize\n** the library (perhaps it is unable to allocate a needed resource such\n** as a mutex) it returns an [error code] other than [SQLITE_OK].\n**\n** ^The sqlite3_initialize() routine is called internally by many other\n** SQLite interfaces so that an application usually does not need to\n** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]\n** calls sqlite3_initialize() so the SQLite library will be automatically\n** initialized when [sqlite3_open()] is called if it has not been initialized\n** already.  ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]\n** compile-time option, then the automatic calls to sqlite3_initialize()\n** are omitted and the application must call sqlite3_initialize() directly\n** prior to using any other SQLite interface.  For maximum portability,\n** it is recommended that applications always invoke sqlite3_initialize()\n** directly prior to using any other SQLite interface.  Future releases\n** of SQLite may require this.  In other words, the behavior exhibited\n** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the\n** default behavior in some future release of SQLite.\n**\n** The sqlite3_os_init() routine does operating-system specific\n** initialization of the SQLite library.  The sqlite3_os_end()\n** routine undoes the effect of sqlite3_os_init().  Typical tasks\n** performed by these routines include allocation or deallocation\n** of static resources, initialization of global variables,\n** setting up a default [sqlite3_vfs] module, or setting up\n** a default configuration using [sqlite3_config()].\n**\n** The application should never invoke either sqlite3_os_init()\n** or sqlite3_os_end() directly.  The application should only invoke\n** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()\n** interface is called automatically by sqlite3_initialize() and\n** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate\n** implementations for sqlite3_os_init() and sqlite3_os_end()\n** are built into SQLite when it is compiled for Unix, Windows, or OS/2.\n** When [custom builds | built for other platforms]\n** (using the [SQLITE_OS_OTHER=1] compile-time\n** option) the application must supply a suitable implementation for\n** sqlite3_os_init() and sqlite3_os_end().  An application-supplied\n** implementation of sqlite3_os_init() or sqlite3_os_end()\n** must return [SQLITE_OK] on success and some other [error code] upon\n** failure.\n*/\nSQLITE_API int sqlite3_initialize(void);\nSQLITE_API int sqlite3_shutdown(void);\nSQLITE_API int sqlite3_os_init(void);\nSQLITE_API int sqlite3_os_end(void);\n\n/*\n** CAPI3REF: Configuring The SQLite Library\n**\n** The sqlite3_config() interface is used to make global configuration\n** changes to SQLite in order to tune SQLite to the specific needs of\n** the application.  The default configuration is recommended for most\n** applications and so this routine is usually not necessary.  It is\n** provided to support rare applications with unusual needs.\n**\n** <b>The sqlite3_config() interface is not threadsafe. The application\n** must ensure that no other SQLite interfaces are invoked by other\n** threads while sqlite3_config() is running.</b>\n**\n** The first argument to sqlite3_config() is an integer\n** [configuration option] that determines\n** what property of SQLite is to be configured.  Subsequent arguments\n** vary depending on the [configuration option]\n** in the first argument.\n**\n** For most configuration options, the sqlite3_config() interface\n** may only be invoked prior to library initialization using\n** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].\n** The exceptional configuration options that may be invoked at any time\n** are called \"anytime configuration options\".\n** ^If sqlite3_config() is called after [sqlite3_initialize()] and before\n** [sqlite3_shutdown()] with a first argument that is not an anytime\n** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.\n** Note, however, that ^sqlite3_config() can be called as part of the\n** implementation of an application-defined [sqlite3_os_init()].\n**\n** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].\n** ^If the option is unknown or SQLite is unable to set the option\n** then this routine returns a non-zero [error code].\n*/\nSQLITE_API int sqlite3_config(int, ...);\n\n/*\n** CAPI3REF: Configure database connections\n** METHOD: sqlite3\n**\n** The sqlite3_db_config() interface is used to make configuration\n** changes to a [database connection].  The interface is similar to\n** [sqlite3_config()] except that the changes apply to a single\n** [database connection] (specified in the first argument).\n**\n** The second argument to sqlite3_db_config(D,V,...)  is the\n** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code\n** that indicates what aspect of the [database connection] is being configured.\n** Subsequent arguments vary depending on the configuration verb.\n**\n** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if\n** the call is considered successful.\n*/\nSQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);\n\n/*\n** CAPI3REF: Memory Allocation Routines\n**\n** An instance of this object defines the interface between SQLite\n** and low-level memory allocation routines.\n**\n** This object is used in only one place in the SQLite interface.\n** A pointer to an instance of this object is the argument to\n** [sqlite3_config()] when the configuration option is\n** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].\n** By creating an instance of this object\n** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])\n** during configuration, an application can specify an alternative\n** memory allocation subsystem for SQLite to use for all of its\n** dynamic memory needs.\n**\n** Note that SQLite comes with several [built-in memory allocators]\n** that are perfectly adequate for the overwhelming majority of applications\n** and that this object is only useful to a tiny minority of applications\n** with specialized memory allocation requirements.  This object is\n** also used during testing of SQLite in order to specify an alternative\n** memory allocator that simulates memory out-of-memory conditions in\n** order to verify that SQLite recovers gracefully from such\n** conditions.\n**\n** The xMalloc, xRealloc, and xFree methods must work like the\n** malloc(), realloc() and free() functions from the standard C library.\n** ^SQLite guarantees that the second argument to\n** xRealloc is always a value returned by a prior call to xRoundup.\n**\n** xSize should return the allocated size of a memory allocation\n** previously obtained from xMalloc or xRealloc.  The allocated size\n** is always at least as big as the requested size but may be larger.\n**\n** The xRoundup method returns what would be the allocated size of\n** a memory allocation given a particular requested size.  Most memory\n** allocators round up memory allocations at least to the next multiple\n** of 8.  Some allocators round up to a larger multiple or to a power of 2.\n** Every memory allocation request coming in through [sqlite3_malloc()]\n** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,\n** that causes the corresponding memory allocation to fail.\n**\n** The xInit method initializes the memory allocator.  For example,\n** it might allocate any required mutexes or initialize internal data\n** structures.  The xShutdown method is invoked (indirectly) by\n** [sqlite3_shutdown()] and should deallocate any resources acquired\n** by xInit.  The pAppData pointer is used as the only parameter to\n** xInit and xShutdown.\n**\n** SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes\n** the xInit method, so the xInit method need not be threadsafe.  The\n** xShutdown method is only called from [sqlite3_shutdown()] so it does\n** not need to be threadsafe either.  For all other methods, SQLite\n** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the\n** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which\n** it is by default) and so the methods are automatically serialized.\n** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other\n** methods must be threadsafe or else make their own arrangements for\n** serialization.\n**\n** SQLite will never invoke xInit() more than once without an intervening\n** call to xShutdown().\n*/\ntypedef struct sqlite3_mem_methods sqlite3_mem_methods;\nstruct sqlite3_mem_methods {\n  void *(*xMalloc)(int);         /* Memory allocation function */\n  void (*xFree)(void*);          /* Free a prior allocation */\n  void *(*xRealloc)(void*,int);  /* Resize an allocation */\n  int (*xSize)(void*);           /* Return the size of an allocation */\n  int (*xRoundup)(int);          /* Round up request size to allocation size */\n  int (*xInit)(void*);           /* Initialize the memory allocator */\n  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */\n  void *pAppData;                /* Argument to xInit() and xShutdown() */\n};\n\n/*\n** CAPI3REF: Configuration Options\n** KEYWORDS: {configuration option}\n**\n** These constants are the available integer configuration options that\n** can be passed as the first argument to the [sqlite3_config()] interface.\n**\n** Most of the configuration options for sqlite3_config()\n** will only work if invoked prior to [sqlite3_initialize()] or after\n** [sqlite3_shutdown()].  The few exceptions to this rule are called\n** \"anytime configuration options\".\n** ^Calling [sqlite3_config()] with a first argument that is not an\n** anytime configuration option in between calls to [sqlite3_initialize()] and\n** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE.\n**\n** The set of anytime configuration options can change (by insertions\n** and/or deletions) from one release of SQLite to the next.\n** As of SQLite version 3.42.0, the complete set of anytime configuration\n** options is:\n** <ul>\n** <li> SQLITE_CONFIG_LOG\n** <li> SQLITE_CONFIG_PCACHE_HDRSZ\n** </ul>\n**\n** New configuration options may be added in future releases of SQLite.\n** Existing configuration options might be discontinued.  Applications\n** should check the return code from [sqlite3_config()] to make sure that\n** the call worked.  The [sqlite3_config()] interface will return a\n** non-zero [error code] if a discontinued or unsupported configuration option\n** is invoked.\n**\n** <dl>\n** [[SQLITE_CONFIG_SINGLETHREAD]] <dt>SQLITE_CONFIG_SINGLETHREAD</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Single-thread.  In other words, it disables\n** all mutexing and puts SQLite into a mode where it can only be used\n** by a single thread.   ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to change the [threading mode] from its default\n** value of Single-thread and so [sqlite3_config()] will return\n** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD\n** configuration option.</dd>\n**\n** [[SQLITE_CONFIG_MULTITHREAD]] <dt>SQLITE_CONFIG_MULTITHREAD</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Multi-thread.  In other words, it disables\n** mutexing on [database connection] and [prepared statement] objects.\n** The application is responsible for serializing access to\n** [database connections] and [prepared statements].  But other mutexes\n** are enabled so that SQLite will be safe to use in a multi-threaded\n** environment as long as no two threads attempt to use the same\n** [database connection] at the same time.  ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to set the Multi-thread [threading mode] and\n** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\n** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>\n**\n** [[SQLITE_CONFIG_SERIALIZED]] <dt>SQLITE_CONFIG_SERIALIZED</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Serialized. In other words, this option enables\n** all mutexes including the recursive\n** mutexes on [database connection] and [prepared statement] objects.\n** In this mode (which is the default when SQLite is compiled with\n** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access\n** to [database connections] and [prepared statements] so that the\n** application is free to use the same [database connection] or the\n** same [prepared statement] in different threads at the same time.\n** ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to set the Serialized [threading mode] and\n** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\n** SQLITE_CONFIG_SERIALIZED configuration option.</dd>\n**\n** [[SQLITE_CONFIG_MALLOC]] <dt>SQLITE_CONFIG_MALLOC</dt>\n** <dd> ^(The SQLITE_CONFIG_MALLOC option takes a single argument which is\n** a pointer to an instance of the [sqlite3_mem_methods] structure.\n** The argument specifies\n** alternative low-level memory allocation routines to be used in place of\n** the memory allocation routines built into SQLite.)^ ^SQLite makes\n** its own private copy of the content of the [sqlite3_mem_methods] structure\n** before the [sqlite3_config()] call returns.</dd>\n**\n** [[SQLITE_CONFIG_GETMALLOC]] <dt>SQLITE_CONFIG_GETMALLOC</dt>\n** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which\n** is a pointer to an instance of the [sqlite3_mem_methods] structure.\n** The [sqlite3_mem_methods]\n** structure is filled with the currently defined memory allocation routines.)^\n** This option can be used to overload the default memory allocation\n** routines with a wrapper that simulates memory allocation failure or\n** tracks memory usage, for example. </dd>\n**\n** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt>\n** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of\n** type int, interpreted as a boolean, which if true provides a hint to\n** SQLite that it should avoid large memory allocations if possible.\n** SQLite will run faster if it is free to make large memory allocations,\n** but some applications might prefer to run slower in exchange for\n** guarantees about memory fragmentation that are possible if large\n** allocations are avoided.  This hint is normally off.\n** </dd>\n**\n** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt>\n** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int,\n** interpreted as a boolean, which enables or disables the collection of\n** memory allocation statistics. ^(When memory allocation statistics are\n** disabled, the following SQLite interfaces become non-operational:\n**   <ul>\n**   <li> [sqlite3_hard_heap_limit64()]\n**   <li> [sqlite3_memory_used()]\n**   <li> [sqlite3_memory_highwater()]\n**   <li> [sqlite3_soft_heap_limit64()]\n**   <li> [sqlite3_status64()]\n**   </ul>)^\n** ^Memory allocation statistics are enabled by default unless SQLite is\n** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory\n** allocation statistics are disabled by default.\n** </dd>\n**\n** [[SQLITE_CONFIG_SCRATCH]] <dt>SQLITE_CONFIG_SCRATCH</dt>\n** <dd> The SQLITE_CONFIG_SCRATCH option is no longer used.\n** </dd>\n**\n** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt>\n** <dd> ^The SQLITE_CONFIG_PAGECACHE option specifies a memory pool\n** that SQLite can use for the database page cache with the default page\n** cache implementation.\n** This configuration option is a no-op if an application-defined page\n** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2].\n** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to\n** 8-byte aligned memory (pMem), the size of each page cache line (sz),\n** and the number of cache lines (N).\n** The sz argument should be the size of the largest database page\n** (a power of two between 512 and 65536) plus some extra bytes for each\n** page header.  ^The number of extra bytes needed by the page header\n** can be determined using [SQLITE_CONFIG_PCACHE_HDRSZ].\n** ^It is harmless, apart from the wasted memory,\n** for the sz parameter to be larger than necessary.  The pMem\n** argument must be either a NULL pointer or a pointer to an 8-byte\n** aligned block of memory of at least sz*N bytes, otherwise\n** subsequent behavior is undefined.\n** ^When pMem is not NULL, SQLite will strive to use the memory provided\n** to satisfy page cache needs, falling back to [sqlite3_malloc()] if\n** a page cache line is larger than sz bytes or if all of the pMem buffer\n** is exhausted.\n** ^If pMem is NULL and N is non-zero, then each database connection\n** does an initial bulk allocation for page cache memory\n** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or\n** of -1024*N bytes if N is negative. ^If additional\n** page cache memory is needed beyond what is provided by the initial\n** allocation, then SQLite goes to [sqlite3_malloc()] separately for each\n** additional cache line. </dd>\n**\n** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt>\n** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer\n** that SQLite will use for all of its dynamic memory allocation needs\n** beyond those provided for by [SQLITE_CONFIG_PAGECACHE].\n** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled\n** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns\n** [SQLITE_ERROR] if invoked otherwise.\n** ^There are three arguments to SQLITE_CONFIG_HEAP:\n** An 8-byte aligned pointer to the memory,\n** the number of bytes in the memory buffer, and the minimum allocation size.\n** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts\n** to using its default memory allocator (the system malloc() implementation),\n** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  ^If the\n** memory pointer is not NULL then the alternative memory\n** allocator is engaged to handle all of SQLites memory allocation needs.\n** The first pointer (the memory pointer) must be aligned to an 8-byte\n** boundary or subsequent behavior of SQLite will be undefined.\n** The minimum allocation size is capped at 2**12. Reasonable values\n** for the minimum allocation size are 2**5 through 2**8.</dd>\n**\n** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt>\n** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a\n** pointer to an instance of the [sqlite3_mutex_methods] structure.\n** The argument specifies alternative low-level mutex routines to be used\n** in place of the mutex routines built into SQLite.)^  ^SQLite makes a copy of\n** the content of the [sqlite3_mutex_methods] structure before the call to\n** [sqlite3_config()] returns. ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** the entire mutexing subsystem is omitted from the build and hence calls to\n** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will\n** return [SQLITE_ERROR].</dd>\n**\n** [[SQLITE_CONFIG_GETMUTEX]] <dt>SQLITE_CONFIG_GETMUTEX</dt>\n** <dd> ^(The SQLITE_CONFIG_GETMUTEX option takes a single argument which\n** is a pointer to an instance of the [sqlite3_mutex_methods] structure.  The\n** [sqlite3_mutex_methods]\n** structure is filled with the currently defined mutex routines.)^\n** This option can be used to overload the default mutex allocation\n** routines with a wrapper used to track mutex usage for performance\n** profiling or testing, for example.   ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** the entire mutexing subsystem is omitted from the build and hence calls to\n** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will\n** return [SQLITE_ERROR].</dd>\n**\n** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>\n** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine\n** the default size of [lookaside memory] on each [database connection].\n** The first argument is the\n** size of each lookaside buffer slot (\"sz\") and the second is the number of\n** slots allocated to each database connection (\"cnt\").)^\n** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.\n** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can\n** be used to change the lookaside configuration on individual connections.)^\n** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the\n** default lookaside configuration at compile-time.\n** </dd>\n**\n** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>\n** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is\n** a pointer to an [sqlite3_pcache_methods2] object.  This object specifies\n** the interface to a custom page cache implementation.)^\n** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd>\n**\n** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt>\n** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which\n** is a pointer to an [sqlite3_pcache_methods2] object.  SQLite copies off\n** the current page cache implementation into that object.)^ </dd>\n**\n** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt>\n** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite\n** global [error log].\n** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a\n** function with a call signature of void(*)(void*,int,const char*),\n** and a pointer to void. ^If the function pointer is not NULL, it is\n** invoked by [sqlite3_log()] to process each logging event.  ^If the\n** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.\n** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is\n** passed through as the first parameter to the application-defined logger\n** function whenever that function is invoked.  ^The second parameter to\n** the logger function is a copy of the first parameter to the corresponding\n** [sqlite3_log()] call and is intended to be a [result code] or an\n** [extended result code].  ^The third parameter passed to the logger is\n** a log message after formatting via [sqlite3_snprintf()].\n** The SQLite logging interface is not reentrant; the logger function\n** supplied by the application must not invoke any SQLite interface.\n** In a multi-threaded application, the application-defined logger\n** function must be threadsafe. </dd>\n**\n** [[SQLITE_CONFIG_URI]] <dt>SQLITE_CONFIG_URI\n** <dd>^(The SQLITE_CONFIG_URI option takes a single argument of type int.\n** If non-zero, then URI handling is globally enabled. If the parameter is zero,\n** then URI handling is globally disabled.)^ ^If URI handling is globally\n** enabled, all filenames passed to [sqlite3_open()], [sqlite3_open_v2()],\n** [sqlite3_open16()] or\n** specified as part of [ATTACH] commands are interpreted as URIs, regardless\n** of whether or not the [SQLITE_OPEN_URI] flag is set when the database\n** connection is opened. ^If it is globally disabled, filenames are\n** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the\n** database connection is opened. ^(By default, URI handling is globally\n** disabled. The default value may be changed by compiling with the\n** [SQLITE_USE_URI] symbol defined.)^\n**\n** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN\n** <dd>^The SQLITE_CONFIG_COVERING_INDEX_SCAN option takes a single integer\n** argument which is interpreted as a boolean in order to enable or disable\n** the use of covering indices for full table scans in the query optimizer.\n** ^The default setting is determined\n** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is \"on\"\n** if that compile-time option is omitted.\n** The ability to disable the use of covering indices for full table scans\n** is because some incorrectly coded legacy applications might malfunction\n** when the optimization is enabled.  Providing the ability to\n** disable the optimization allows the older, buggy application code to work\n** without change even with newer versions of SQLite.\n**\n** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]]\n** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE\n** <dd> These options are obsolete and should not be used by new code.\n** They are retained for backwards compatibility but are now no-ops.\n** </dd>\n**\n** [[SQLITE_CONFIG_SQLLOG]]\n** <dt>SQLITE_CONFIG_SQLLOG\n** <dd>This option is only available if sqlite is compiled with the\n** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should\n** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).\n** The second should be of type (void*). The callback is invoked by the library\n** in three separate circumstances, identified by the value passed as the\n** fourth parameter. If the fourth parameter is 0, then the database connection\n** passed as the second argument has just been opened. The third argument\n** points to a buffer containing the name of the main database file. If the\n** fourth parameter is 1, then the SQL statement that the third parameter\n** points to has just been executed. Or, if the fourth parameter is 2, then\n** the connection being passed as the second parameter is being closed. The\n** third parameter is passed NULL In this case.  An example of using this\n** configuration option can be seen in the \"test_sqllog.c\" source file in\n** the canonical SQLite source tree.</dd>\n**\n** [[SQLITE_CONFIG_MMAP_SIZE]]\n** <dt>SQLITE_CONFIG_MMAP_SIZE\n** <dd>^SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values\n** that are the default mmap size limit (the default setting for\n** [PRAGMA mmap_size]) and the maximum allowed mmap size limit.\n** ^The default setting can be overridden by each database connection using\n** either the [PRAGMA mmap_size] command, or by using the\n** [SQLITE_FCNTL_MMAP_SIZE] file control.  ^(The maximum allowed mmap size\n** will be silently truncated if necessary so that it does not exceed the\n** compile-time maximum mmap size set by the\n** [SQLITE_MAX_MMAP_SIZE] compile-time option.)^\n** ^If either argument to this option is negative, then that argument is\n** changed to its compile-time default.\n**\n** [[SQLITE_CONFIG_WIN32_HEAPSIZE]]\n** <dt>SQLITE_CONFIG_WIN32_HEAPSIZE\n** <dd>^The SQLITE_CONFIG_WIN32_HEAPSIZE option is only available if SQLite is\n** compiled for Windows with the [SQLITE_WIN32_MALLOC] pre-processor macro\n** defined. ^SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value\n** that specifies the maximum size of the created heap.\n**\n** [[SQLITE_CONFIG_PCACHE_HDRSZ]]\n** <dt>SQLITE_CONFIG_PCACHE_HDRSZ\n** <dd>^The SQLITE_CONFIG_PCACHE_HDRSZ option takes a single parameter which\n** is a pointer to an integer and writes into that integer the number of extra\n** bytes per page required for each page in [SQLITE_CONFIG_PAGECACHE].\n** The amount of extra space required can change depending on the compiler,\n** target platform, and SQLite version.\n**\n** [[SQLITE_CONFIG_PMASZ]]\n** <dt>SQLITE_CONFIG_PMASZ\n** <dd>^The SQLITE_CONFIG_PMASZ option takes a single parameter which\n** is an unsigned integer and sets the \"Minimum PMA Size\" for the multithreaded\n** sorter to that integer.  The default minimum PMA Size is set by the\n** [SQLITE_SORTER_PMASZ] compile-time option.  New threads are launched\n** to help with sort operations when multithreaded sorting\n** is enabled (using the [PRAGMA threads] command) and the amount of content\n** to be sorted exceeds the page size times the minimum of the\n** [PRAGMA cache_size] setting and this value.\n**\n** [[SQLITE_CONFIG_STMTJRNL_SPILL]]\n** <dt>SQLITE_CONFIG_STMTJRNL_SPILL\n** <dd>^The SQLITE_CONFIG_STMTJRNL_SPILL option takes a single parameter which\n** becomes the [statement journal] spill-to-disk threshold.\n** [Statement journals] are held in memory until their size (in bytes)\n** exceeds this threshold, at which point they are written to disk.\n** Or if the threshold is -1, statement journals are always held\n** exclusively in memory.\n** Since many statement journals never become large, setting the spill\n** threshold to a value such as 64KiB can greatly reduce the amount of\n** I/O required to support statement rollback.\n** The default value for this setting is controlled by the\n** [SQLITE_STMTJRNL_SPILL] compile-time option.\n**\n** [[SQLITE_CONFIG_SORTERREF_SIZE]]\n** <dt>SQLITE_CONFIG_SORTERREF_SIZE\n** <dd>The SQLITE_CONFIG_SORTERREF_SIZE option accepts a single parameter\n** of type (int) - the new value of the sorter-reference size threshold.\n** Usually, when SQLite uses an external sort to order records according\n** to an ORDER BY clause, all fields required by the caller are present in the\n** sorted records. However, if SQLite determines based on the declared type\n** of a table column that its values are likely to be very large - larger\n** than the configured sorter-reference size threshold - then a reference\n** is stored in each sorted record and the required column values loaded\n** from the database as records are returned in sorted order. The default\n** value for this option is to never use this optimization. Specifying a\n** negative value for this option restores the default behavior.\n** This option is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.\n**\n** [[SQLITE_CONFIG_MEMDB_MAXSIZE]]\n** <dt>SQLITE_CONFIG_MEMDB_MAXSIZE\n** <dd>The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter\n** [sqlite3_int64] parameter which is the default maximum size for an in-memory\n** database created using [sqlite3_deserialize()].  This default maximum\n** size can be adjusted up or down for individual databases using the\n** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control].  If this\n** configuration setting is never used, then the default maximum is determined\n** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option.  If that\n** compile-time option is not set, then the default maximum is 1073741824.\n**\n** [[SQLITE_CONFIG_ROWID_IN_VIEW]]\n** <dt>SQLITE_CONFIG_ROWID_IN_VIEW\n** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability\n** for VIEWs to have a ROWID.  The capability can only be enabled if SQLite is\n** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability\n** defaults to on.  This configuration option queries the current setting or\n** changes the setting to off or on.  The argument is a pointer to an integer.\n** If that integer initially holds a value of 1, then the ability for VIEWs to\n** have ROWIDs is activated.  If the integer initially holds zero, then the\n** ability is deactivated.  Any other initial value for the integer leaves the\n** setting unchanged.  After changes, if any, the integer is written with\n** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off.  If SQLite\n** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and\n** recommended case) then the integer is always filled with zero, regardless\n** if its initial value.\n** </dl>\n*/\n#define SQLITE_CONFIG_SINGLETHREAD         1  /* nil */\n#define SQLITE_CONFIG_MULTITHREAD          2  /* nil */\n#define SQLITE_CONFIG_SERIALIZED           3  /* nil */\n#define SQLITE_CONFIG_MALLOC               4  /* sqlite3_mem_methods* */\n#define SQLITE_CONFIG_GETMALLOC            5  /* sqlite3_mem_methods* */\n#define SQLITE_CONFIG_SCRATCH              6  /* No longer used */\n#define SQLITE_CONFIG_PAGECACHE            7  /* void*, int sz, int N */\n#define SQLITE_CONFIG_HEAP                 8  /* void*, int nByte, int min */\n#define SQLITE_CONFIG_MEMSTATUS            9  /* boolean */\n#define SQLITE_CONFIG_MUTEX               10  /* sqlite3_mutex_methods* */\n#define SQLITE_CONFIG_GETMUTEX            11  /* sqlite3_mutex_methods* */\n/* previously SQLITE_CONFIG_CHUNKALLOC    12 which is now unused. */\n#define SQLITE_CONFIG_LOOKASIDE           13  /* int int */\n#define SQLITE_CONFIG_PCACHE              14  /* no-op */\n#define SQLITE_CONFIG_GETPCACHE           15  /* no-op */\n#define SQLITE_CONFIG_LOG                 16  /* xFunc, void* */\n#define SQLITE_CONFIG_URI                 17  /* int */\n#define SQLITE_CONFIG_PCACHE2             18  /* sqlite3_pcache_methods2* */\n#define SQLITE_CONFIG_GETPCACHE2          19  /* sqlite3_pcache_methods2* */\n#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20  /* int */\n#define SQLITE_CONFIG_SQLLOG              21  /* xSqllog, void* */\n#define SQLITE_CONFIG_MMAP_SIZE           22  /* sqlite3_int64, sqlite3_int64 */\n#define SQLITE_CONFIG_WIN32_HEAPSIZE      23  /* int nByte */\n#define SQLITE_CONFIG_PCACHE_HDRSZ        24  /* int *psz */\n#define SQLITE_CONFIG_PMASZ               25  /* unsigned int szPma */\n#define SQLITE_CONFIG_STMTJRNL_SPILL      26  /* int nByte */\n#define SQLITE_CONFIG_SMALL_MALLOC        27  /* boolean */\n#define SQLITE_CONFIG_SORTERREF_SIZE      28  /* int nByte */\n#define SQLITE_CONFIG_MEMDB_MAXSIZE       29  /* sqlite3_int64 */\n#define SQLITE_CONFIG_ROWID_IN_VIEW       30  /* int* */\n\n/*\n** CAPI3REF: Database Connection Configuration Options\n**\n** These constants are the available integer configuration options that\n** can be passed as the second parameter to the [sqlite3_db_config()] interface.\n**\n** The [sqlite3_db_config()] interface is a var-args function.  It takes a\n** variable number of parameters, though always at least two.  The number of\n** parameters passed into sqlite3_db_config() depends on which of these\n** constants is given as the second parameter.  This documentation page\n** refers to parameters beyond the second as \"arguments\".  Thus, when this\n** page says \"the N-th argument\" it means \"the N-th parameter past the\n** configuration option\" or \"the (N+2)-th parameter to sqlite3_db_config()\".\n**\n** New configuration options may be added in future releases of SQLite.\n** Existing configuration options might be discontinued.  Applications\n** should check the return code from [sqlite3_db_config()] to make sure that\n** the call worked.  ^The [sqlite3_db_config()] interface will return a\n** non-zero [error code] if a discontinued or unsupported configuration option\n** is invoked.\n**\n** <dl>\n** [[SQLITE_DBCONFIG_LOOKASIDE]]\n** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>\n** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the\n** configuration of the [lookaside memory allocator] within a database\n** connection.\n** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>\n** in the [DBCONFIG arguments|usual format].\n** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,\n** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE\n** should have a total of five parameters.\n** <ol>\n** <li><p>The first argument (\"buf\") is a\n** pointer to a memory buffer to use for lookaside memory.\n** The first argument may be NULL in which case SQLite will allocate the\n** lookaside buffer itself using [sqlite3_malloc()].\n** <li><P>The second argument (\"sz\") is the\n** size of each lookaside buffer slot.  Lookaside is disabled if \"sz\"\n** is less than 8.  The \"sz\" argument should be a multiple of 8 less than\n** 65536.  If \"sz\" does not meet this constraint, it is reduced in size until\n** it does.\n** <li><p>The third argument (\"cnt\") is the number of slots. Lookaside is disabled\n** if \"cnt\"is less than 1.  The \"cnt\" value will be reduced, if necessary, so\n** that the product of \"sz\" and \"cnt\" does not exceed 2,147,418,112.  The \"cnt\"\n** parameter is usually chosen so that the product of \"sz\" and \"cnt\" is less\n** than 1,000,000.\n** </ol>\n** <p>If the \"buf\" argument is not NULL, then it must\n** point to a memory buffer with a size that is greater than\n** or equal to the product of \"sz\" and \"cnt\".\n** The buffer must be aligned to an 8-byte boundary.\n** The lookaside memory\n** configuration for a database connection can only be changed when that\n** connection is not currently using lookaside memory, or in other words\n** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.\n** Any attempt to change the lookaside memory configuration when lookaside\n** memory is in use leaves the configuration unchanged and returns\n** [SQLITE_BUSY].\n** If the \"buf\" argument is NULL and an attempt\n** to allocate memory based on \"sz\" and \"cnt\" fails, then\n** lookaside is silently disabled.\n** <p>\n** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the\n** default lookaside configuration at initialization.  The\n** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside\n** configuration at compile-time.  Typical values for lookaside are 1200 for\n** \"sz\" and 40 to 100 for \"cnt\".\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_FKEY]]\n** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>\n** <dd> ^This option is used to enable or disable the enforcement of\n** [foreign key constraints].  This is the same setting that is\n** enabled or disabled by the [PRAGMA foreign_keys] statement.\n** The first argument is an integer which is 0 to disable FK enforcement,\n** positive to enable FK enforcement or negative to leave FK enforcement\n** unchanged.  The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether FK enforcement is off or on\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the FK enforcement setting is not reported back. </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]]\n** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>\n** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].\n** There should be two additional arguments.\n** The first argument is an integer which is 0 to disable triggers,\n** positive to enable triggers or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether triggers are disabled or enabled\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the trigger setting is not reported back.\n**\n** <p>Originally this option disabled all triggers.  ^(However, since\n** SQLite version 3.35.0, TEMP triggers are still allowed even if\n** this option is off.  So, in other words, this option now only disables\n** triggers in the main database schema or in the schemas of [ATTACH]-ed\n** databases.)^ </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_VIEW]]\n** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>\n** <dd> ^This option is used to enable or disable [CREATE VIEW | views].\n** There must be two additional arguments.\n** The first argument is an integer which is 0 to disable views,\n** positive to enable views or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether views are disabled or enabled\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the view setting is not reported back.\n**\n** <p>Originally this option disabled all views.  ^(However, since\n** SQLite version 3.35.0, TEMP views are still allowed even if\n** this option is off.  So, in other words, this option now only disables\n** views in the main database schema or in the schemas of ATTACH-ed\n** databases.)^ </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]\n** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>\n** <dd> ^This option is used to enable or disable using the\n** [fts3_tokenizer()] function - part of the [FTS3] full-text search engine\n** extension - without using bound parameters as the parameters. Doing so\n** is disabled by default. There must be two additional arguments. The first\n** argument is an integer. If it is passed 0, then using fts3_tokenizer()\n** without bound parameters is disabled. If it is passed a positive value,\n** then calling fts3_tokenizer without bound parameters is enabled. If it\n** is passed a negative value, this setting is not modified - this can be\n** used to query for the current setting. The second parameter is a pointer\n** to an integer into which is written 0 or 1 to indicate the current value\n** of this setting (after it is modified, if applicable).  The second\n** parameter may be a NULL pointer, in which case the value of the setting\n** is not reported back. Refer to [FTS3] documentation for further details.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]\n** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>\n** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]\n** interface independently of the [load_extension()] SQL function.\n** The [sqlite3_enable_load_extension()] API enables or disables both the\n** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].\n** There must be two additional arguments.\n** When the first argument to this interface is 1, then only the C-API is\n** enabled and the SQL function remains disabled.  If the first argument to\n** this interface is 0, then both the C-API and the SQL function are disabled.\n** If the first argument is -1, then no changes are made to the state of either\n** the C-API or the SQL function.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface\n** is disabled or enabled following this call.  The second parameter may\n** be a NULL pointer, in which case the new setting is not reported back.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>\n** <dd> ^This option is used to change the name of the \"main\" database\n** schema.  This option does not follow the\n** [DBCONFIG arguments|usual SQLITE_DBCONFIG argument format].\n** This option takes exactly one additional argument so that the\n** [sqlite3_db_config()] call has a total of three parameters.  The\n** extra argument must be a pointer to a constant UTF8 string which\n** will become the new schema name in place of \"main\".  ^SQLite does\n** not make a copy of the new main schema name string, so the application\n** must ensure that the argument passed into SQLITE_DBCONFIG MAINDBNAME\n** is unchanged until after the database connection closes.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]\n** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>\n** <dd> Usually, when a database in [WAL mode] is closed or detached from a\n** database handle, SQLite checks if if there are other connections to the\n** same database, and if there are no other database connection (if the\n** connection being closed is the last open connection to the database),\n** then SQLite performs a [checkpoint] before closing the connection and\n** deletes the WAL file.  The SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option can\n** be used to override that behavior. The first argument passed to this\n** operation (the third parameter to [sqlite3_db_config()]) is an integer\n** which is positive to disable checkpoints-on-close, or zero (the default)\n** to enable them, and negative to leave the setting unchanged.\n** The second argument (the fourth parameter) is a pointer to an integer\n** into which is written 0 or 1 to indicate whether checkpoints-on-close\n** have been disabled - 0 if they are not disabled, 1 if they are.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>\n** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates\n** the [query planner stability guarantee] (QPSG).  When the QPSG is active,\n** a single SQL query statement will always use the same algorithm regardless\n** of values of [bound parameters].)^ The QPSG disables some query optimizations\n** that look at the values of bound parameters, which can make some queries\n** slower.  But the QPSG has the advantage of more predictable behavior.  With\n** the QPSG active, SQLite will always use the same query plan in the field as\n** was used during testing in the lab.\n** The first argument to this setting is an integer which is 0 to disable\n** the QPSG, positive to enable QPSG, or negative to leave the setting\n** unchanged. The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether the QPSG is disabled or enabled\n** following this call.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>\n** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not\n** include output for any operations performed by trigger programs. This\n** option is used to set or clear (the default) a flag that governs this\n** behavior. The first parameter passed to this operation is an integer -\n** positive to enable output for trigger programs, or zero to disable it,\n** or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which is written\n** 0 or 1 to indicate whether output-for-triggers has been disabled - 0 if\n** it is not disabled, 1 if it is.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_RESET_DATABASE]] <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>\n** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run\n** [VACUUM] in order to reset a database back to an empty database\n** with no schema and no content. The following process works even for\n** a badly corrupted database file:\n** <ol>\n** <li> If the database connection is newly opened, make sure it has read the\n**      database schema by preparing then discarding some query against the\n**      database, or calling sqlite3_table_column_metadata(), ignoring any\n**      errors.  This step is only necessary if the application desires to keep\n**      the database in WAL mode after the reset if it was in WAL mode before\n**      the reset.\n** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 1, 0);\n** <li> [sqlite3_exec](db, \"[VACUUM]\", 0, 0, 0);\n** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0);\n** </ol>\n** Because resetting a database is destructive and irreversible, the\n** process requires the use of this obscure API and multiple steps to\n** help ensure that it does not happen by accident. Because this\n** feature must be capable of resetting corrupt databases, and\n** shutting down virtual tables may require access to that corrupt\n** storage, the library must abandon any installed virtual tables\n** without calling their xDestroy() methods.\n**\n** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>\n** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the\n** \"defensive\" flag for a database connection.  When the defensive\n** flag is enabled, language features that allow ordinary SQL to\n** deliberately corrupt the database file are disabled.  The disabled\n** features include but are not limited to the following:\n** <ul>\n** <li> The [PRAGMA writable_schema=ON] statement.\n** <li> The [PRAGMA journal_mode=OFF] statement.\n** <li> The [PRAGMA schema_version=N] statement.\n** <li> Writes to the [sqlite_dbpage] virtual table.\n** <li> Direct writes to [shadow tables].\n** </ul>\n** </dd>\n**\n** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>\n** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the\n** \"writable_schema\" flag. This has the same effect and is logically equivalent\n** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF].\n** The first argument to this setting is an integer which is 0 to disable\n** the writable_schema, positive to enable writable_schema, or negative to\n** leave the setting unchanged. The second parameter is a pointer to an\n** integer into which is written 0 or 1 to indicate whether the writable_schema\n** is enabled or disabled following this call.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]]\n** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt>\n** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates\n** the legacy behavior of the [ALTER TABLE RENAME] command such that it\n** behaves as it did prior to [version 3.24.0] (2018-06-04).  See the\n** \"Compatibility Notice\" on the [ALTER TABLE RENAME documentation] for\n** additional information. This feature can also be turned on and off\n** using the [PRAGMA legacy_alter_table] statement.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_DQS_DML]]\n** <dt>SQLITE_DBCONFIG_DQS_DML</dt>\n** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates\n** the legacy [double-quoted string literal] misfeature for DML statements\n** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The\n** default value of this setting is determined by the [-DSQLITE_DQS]\n** compile-time option.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_DQS_DDL]]\n** <dt>SQLITE_DBCONFIG_DQS_DDL</dt>\n** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates\n** the legacy [double-quoted string literal] misfeature for DDL statements,\n** such as CREATE TABLE and CREATE INDEX. The\n** default value of this setting is determined by the [-DSQLITE_DQS]\n** compile-time option.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]]\n** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</dt>\n** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to\n** assume that database schemas are untainted by malicious content.\n** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite\n** takes additional defensive steps to protect the application from harm\n** including:\n** <ul>\n** <li> Prohibit the use of SQL functions inside triggers, views,\n** CHECK constraints, DEFAULT clauses, expression indexes,\n** partial indexes, or generated columns\n** unless those functions are tagged with [SQLITE_INNOCUOUS].\n** <li> Prohibit the use of virtual tables inside of triggers or views\n** unless those virtual tables are tagged with [SQLITE_VTAB_INNOCUOUS].\n** </ul>\n** This setting defaults to \"on\" for legacy compatibility, however\n** all applications are advised to turn it off if possible. This setting\n** can also be controlled using the [PRAGMA trusted_schema] statement.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]]\n** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt>\n** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates\n** the legacy file format flag.  When activated, this flag causes all newly\n** created database files to have a schema format version number (the 4-byte\n** integer found at offset 44 into the database header) of 1.  This in turn\n** means that the resulting database file will be readable and writable by\n** any SQLite version back to 3.0.0 ([dateof:3.0.0]).  Without this setting,\n** newly created databases are generally not understandable by SQLite versions\n** prior to 3.3.0 ([dateof:3.3.0]).  As these words are written, there\n** is now scarcely any need to generate database files that are compatible\n** all the way back to version 3.0.0, and so this setting is of little\n** practical use, but is provided so that SQLite can continue to claim the\n** ability to generate new database files that are compatible with  version\n** 3.0.0.\n** <p>Note that when the SQLITE_DBCONFIG_LEGACY_FILE_FORMAT setting is on,\n** the [VACUUM] command will fail with an obscure error when attempting to\n** process a table with generated columns and a descending index.  This is\n** not considered a bug since SQLite versions 3.3.0 and earlier do not support\n** either generated columns or descending indexes.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]\n** <dt>SQLITE_DBCONFIG_STMT_SCANSTATUS</dt>\n** <dd>The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in\n** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears\n** a flag that enables collection of the sqlite3_stmt_scanstatus_v2()\n** statistics. For statistics to be collected, the flag must be set on\n** the database handle both when the SQL statement is prepared and when it\n** is stepped. The flag is set (collection of statistics is enabled)\n** by default. <p>This option takes two arguments: an integer and a pointer to\n** an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the statement scanstatus option.  If the second argument\n** is not NULL, then the value of the statement scanstatus setting after\n** processing the first argument is written into the integer that the second\n** argument points to.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]]\n** <dt>SQLITE_DBCONFIG_REVERSE_SCANORDER</dt>\n** <dd>The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order\n** in which tables and indexes are scanned so that the scans start at the end\n** and work toward the beginning rather than starting at the beginning and\n** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the\n** same as setting [PRAGMA reverse_unordered_selects]. <p>This option takes\n** two arguments which are an integer and a pointer to an integer.  The first\n** argument is 1, 0, or -1 to enable, disable, or leave unchanged the\n** reverse scan order flag, respectively.  If the second argument is not NULL,\n** then 0 or 1 is written into the integer that the second argument points to\n** depending on if the reverse scan order flag is set after processing the\n** first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]]\n** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE option enables or disables\n** the ability of the [ATTACH DATABASE] SQL command to create a new database\n** file if the database filed named in the ATTACH command does not already\n** exist.  This ability of ATTACH to create a new database is enabled by\n** default.  Applications can disable or reenable the ability for ATTACH to\n** create new database files using this DBCONFIG option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the attach-create flag, respectively.  If the second\n** argument is not NULL, then 0 or 1 is written into the integer that the\n** second argument points to depending on if the attach-create flag is set\n** after processing the first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]]\n** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the\n** ability of the [ATTACH DATABASE] SQL command to open a database for writing.\n** This capability is enabled by default.  Applications can disable or\n** reenable this capability using the current DBCONFIG option.  If\n** this capability is disabled, the [ATTACH] command will still work,\n** but the database will be opened read-only.  If this option is disabled,\n** then the ability to create a new database using [ATTACH] is also disabled,\n** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]\n** option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the ability to ATTACH another database for writing,\n** respectively.  If the second argument is not NULL, then 0 or 1 is written\n** into the integer to which the second argument points, depending on whether\n** the ability to ATTACH a read/write database is enabled or disabled\n** after processing the first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_COMMENTS]]\n** <dt>SQLITE_DBCONFIG_ENABLE_COMMENTS</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_COMMENTS option enables or disables the\n** ability to include comments in SQL text.  Comments are enabled by default.\n** An application can disable or reenable comments in SQL text using this\n** DBCONFIG option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the ability to use comments in SQL text,\n** respectively.  If the second argument is not NULL, then 0 or 1 is written\n** into the integer that the second argument points to depending on if\n** comments are allowed in SQL text after processing the first argument.\n** </dd>\n**\n** </dl>\n**\n** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3>\n**\n** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the\n** overall call to [sqlite3_db_config()] has a total of four parameters.\n** The first argument (the third parameter to sqlite3_db_config()) is an integer.\n** The second argument is a pointer to an integer.  If the first argument is 1,\n** then the option becomes enabled.  If the first integer argument is 0, then the\n** option is disabled.  If the first argument is -1, then the option setting\n** is unchanged.  The second argument, the pointer to an integer, may be NULL.\n** If the second argument is not NULL, then a value of 0 or 1 is written into\n** the integer to which the second argument points, depending on whether the\n** setting is disabled or enabled after applying any changes specified by\n** the first argument.\n**\n** <p>While most SQLITE_DBCONFIG options use the argument format\n** described in the previous paragraph, the [SQLITE_DBCONFIG_MAINDBNAME]\n** and [SQLITE_DBCONFIG_LOOKASIDE] options are different.  See the\n** documentation of those exceptional options for details.\n*/\n#define SQLITE_DBCONFIG_MAINDBNAME            1000 /* const char* */\n#define SQLITE_DBCONFIG_LOOKASIDE             1001 /* void* int int */\n#define SQLITE_DBCONFIG_ENABLE_FKEY           1002 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_TRIGGER        1003 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */\n#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE      1006 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_QPSG           1007 /* int int* */\n#define SQLITE_DBCONFIG_TRIGGER_EQP           1008 /* int int* */\n#define SQLITE_DBCONFIG_RESET_DATABASE        1009 /* int int* */\n#define SQLITE_DBCONFIG_DEFENSIVE             1010 /* int int* */\n#define SQLITE_DBCONFIG_WRITABLE_SCHEMA       1011 /* int int* */\n#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE    1012 /* int int* */\n#define SQLITE_DBCONFIG_DQS_DML               1013 /* int int* */\n#define SQLITE_DBCONFIG_DQS_DDL               1014 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_VIEW           1015 /* int int* */\n#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT    1016 /* int int* */\n#define SQLITE_DBCONFIG_TRUSTED_SCHEMA        1017 /* int int* */\n#define SQLITE_DBCONFIG_STMT_SCANSTATUS       1018 /* int int* */\n#define SQLITE_DBCONFIG_REVERSE_SCANORDER     1019 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE  1020 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE   1021 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_COMMENTS       1022 /* int int* */\n#define SQLITE_DBCONFIG_MAX                   1022 /* Largest DBCONFIG */\n\n/*\n** CAPI3REF: Enable Or Disable Extended Result Codes\n** METHOD: sqlite3\n**\n** ^The sqlite3_extended_result_codes() routine enables or disables the\n** [extended result codes] feature of SQLite. ^The extended result\n** codes are disabled by default for historical compatibility.\n*/\nSQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);\n\n/*\n** CAPI3REF: Last Insert Rowid\n** METHOD: sqlite3\n**\n** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables)\n** has a unique 64-bit signed\n** integer key called the [ROWID | \"rowid\"]. ^The rowid is always available\n** as an undeclared column named ROWID, OID, or _ROWID_ as long as those\n** names are not also used by explicitly declared columns. ^If\n** the table has a column of type [INTEGER PRIMARY KEY] then that column\n** is another alias for the rowid.\n**\n** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of\n** the most recent successful [INSERT] into a rowid table or [virtual table]\n** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not\n** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred\n** on the database connection D, then sqlite3_last_insert_rowid(D) returns\n** zero.\n**\n** As well as being set automatically as rows are inserted into database\n** tables, the value returned by this function may be set explicitly by\n** [sqlite3_set_last_insert_rowid()]\n**\n** Some virtual table implementations may INSERT rows into rowid tables as\n** part of committing a transaction (e.g. to flush data accumulated in memory\n** to disk). In this case subsequent calls to this function return the rowid\n** associated with these internal INSERT operations, which leads to\n** unintuitive results. Virtual table implementations that do write to rowid\n** tables in this way can avoid this problem by restoring the original\n** rowid value using [sqlite3_set_last_insert_rowid()] before returning\n** control to the user.\n**\n** ^(If an [INSERT] occurs within a trigger then this routine will\n** return the [rowid] of the inserted row as long as the trigger is\n** running. Once the trigger program ends, the value returned\n** by this routine reverts to what it was before the trigger was fired.)^\n**\n** ^An [INSERT] that fails due to a constraint violation is not a\n** successful [INSERT] and does not change the value returned by this\n** routine.  ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,\n** and INSERT OR ABORT make no changes to the return value of this\n** routine when their insertion fails.  ^(When INSERT OR REPLACE\n** encounters a constraint violation, it does not fail.  The\n** INSERT continues to completion after deleting rows that caused\n** the constraint problem so INSERT OR REPLACE will always change\n** the return value of this interface.)^\n**\n** ^For the purposes of this routine, an [INSERT] is considered to\n** be successful even if it is subsequently rolled back.\n**\n** This function is accessible to SQL statements via the\n** [last_insert_rowid() SQL function].\n**\n** If a separate thread performs a new [INSERT] on the same\n** database connection while the [sqlite3_last_insert_rowid()]\n** function is running and thus changes the last insert [rowid],\n** then the value returned by [sqlite3_last_insert_rowid()] is\n** unpredictable and might not equal either the old or the new\n** last insert [rowid].\n*/\nSQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);\n\n/*\n** CAPI3REF: Set the Last Insert Rowid value.\n** METHOD: sqlite3\n**\n** The sqlite3_set_last_insert_rowid(D, R) method allows the application to\n** set the value returned by calling sqlite3_last_insert_rowid(D) to R\n** without inserting a row into the database.\n*/\nSQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);\n\n/*\n** CAPI3REF: Count The Number Of Rows Modified\n** METHOD: sqlite3\n**\n** ^These functions return the number of rows modified, inserted or\n** deleted by the most recently completed INSERT, UPDATE or DELETE\n** statement on the database connection specified by the only parameter.\n** The two functions are identical except for the type of the return value\n** and that if the number of rows modified by the most recent INSERT, UPDATE,\n** or DELETE is greater than the maximum value supported by type \"int\", then\n** the return value of sqlite3_changes() is undefined. ^Executing any other\n** type of SQL statement does not modify the value returned by these functions.\n** For the purposes of this interface, a CREATE TABLE AS SELECT statement\n** does not count as an INSERT, UPDATE or DELETE statement and hence the rows\n** added to the new table by the CREATE TABLE AS SELECT statement are not\n** counted.\n**\n** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are\n** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],\n** [foreign key actions] or [REPLACE] constraint resolution are not counted.\n**\n** Changes to a view that are intercepted by\n** [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value\n** returned by sqlite3_changes() immediately after an INSERT, UPDATE or\n** DELETE statement run on a view is always zero. Only changes made to real\n** tables are counted.\n**\n** Things are more complicated if the sqlite3_changes() function is\n** executed while a trigger program is running. This may happen if the\n** program uses the [changes() SQL function], or if some other callback\n** function invokes sqlite3_changes() directly. Essentially:\n**\n** <ul>\n**   <li> ^(Before entering a trigger program the value returned by\n**        sqlite3_changes() function is saved. After the trigger program\n**        has finished, the original value is restored.)^\n**\n**   <li> ^(Within a trigger program each INSERT, UPDATE and DELETE\n**        statement sets the value returned by sqlite3_changes()\n**        upon completion as normal. Of course, this value will not include\n**        any changes performed by sub-triggers, as the sqlite3_changes()\n**        value will be saved and restored after each sub-trigger has run.)^\n** </ul>\n**\n** ^This means that if the changes() SQL function (or similar) is used\n** by the first INSERT, UPDATE or DELETE statement within a trigger, it\n** returns the value as set when the calling statement began executing.\n** ^If it is used by the second or subsequent such statement within a trigger\n** program, the value returned reflects the number of rows modified by the\n** previous INSERT, UPDATE or DELETE statement within the same trigger.\n**\n** If a separate thread makes changes on the same database connection\n** while [sqlite3_changes()] is running then the value returned\n** is unpredictable and not meaningful.\n**\n** See also:\n** <ul>\n** <li> the [sqlite3_total_changes()] interface\n** <li> the [count_changes pragma]\n** <li> the [changes() SQL function]\n** <li> the [data_version pragma]\n** </ul>\n*/\nSQLITE_API int sqlite3_changes(sqlite3*);\nSQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);\n\n/*\n** CAPI3REF: Total Number Of Rows Modified\n** METHOD: sqlite3\n**\n** ^These functions return the total number of rows inserted, modified or\n** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed\n** since the database connection was opened, including those executed as\n** part of trigger programs. The two functions are identical except for the\n** type of the return value and that if the number of rows modified by the\n** connection exceeds the maximum value supported by type \"int\", then\n** the return value of sqlite3_total_changes() is undefined. ^Executing\n** any other type of SQL statement does not affect the value returned by\n** sqlite3_total_changes().\n**\n** ^Changes made as part of [foreign key actions] are included in the\n** count, but those made as part of REPLACE constraint resolution are\n** not. ^Changes to a view that are intercepted by INSTEAD OF triggers\n** are not counted.\n**\n** The [sqlite3_total_changes(D)] interface only reports the number\n** of rows that changed due to SQL statement run against database\n** connection D.  Any changes by other database connections are ignored.\n** To detect changes against a database file from other database\n** connections use the [PRAGMA data_version] command or the\n** [SQLITE_FCNTL_DATA_VERSION] [file control].\n**\n** If a separate thread makes changes on the same database connection\n** while [sqlite3_total_changes()] is running then the value\n** returned is unpredictable and not meaningful.\n**\n** See also:\n** <ul>\n** <li> the [sqlite3_changes()] interface\n** <li> the [count_changes pragma]\n** <li> the [changes() SQL function]\n** <li> the [data_version pragma]\n** <li> the [SQLITE_FCNTL_DATA_VERSION] [file control]\n** </ul>\n*/\nSQLITE_API int sqlite3_total_changes(sqlite3*);\nSQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);\n\n/*\n** CAPI3REF: Interrupt A Long-Running Query\n** METHOD: sqlite3\n**\n** ^This function causes any pending database operation to abort and\n** return at its earliest opportunity. This routine is typically\n** called in response to a user action such as pressing \"Cancel\"\n** or Ctrl-C where the user wants a long query operation to halt\n** immediately.\n**\n** ^It is safe to call this routine from a thread different from the\n** thread that is currently running the database operation.  But it\n** is not safe to call this routine with a [database connection] that\n** is closed or might close before sqlite3_interrupt() returns.\n**\n** ^If an SQL operation is very nearly finished at the time when\n** sqlite3_interrupt() is called, then it might not have an opportunity\n** to be interrupted and might continue to completion.\n**\n** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].\n** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE\n** that is inside an explicit transaction, then the entire transaction\n** will be rolled back automatically.\n**\n** ^The sqlite3_interrupt(D) call is in effect until all currently running\n** SQL statements on [database connection] D complete.  ^Any new SQL statements\n** that are started after the sqlite3_interrupt() call and before the\n** running statement count reaches zero are interrupted as if they had been\n** running prior to the sqlite3_interrupt() call.  ^New SQL statements\n** that are started after the running statement count reaches zero are\n** not effected by the sqlite3_interrupt().\n** ^A call to sqlite3_interrupt(D) that occurs when there are no running\n** SQL statements is a no-op and has no effect on SQL statements\n** that are started after the sqlite3_interrupt() call returns.\n**\n** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether\n** or not an interrupt is currently in effect for [database connection] D.\n** It returns 1 if an interrupt is currently in effect, or 0 otherwise.\n*/\nSQLITE_API void sqlite3_interrupt(sqlite3*);\nSQLITE_API int sqlite3_is_interrupted(sqlite3*);\n\n/*\n** CAPI3REF: Determine If An SQL Statement Is Complete\n**\n** These routines are useful during command-line input to determine if the\n** currently entered text seems to form a complete SQL statement or\n** if additional input is needed before sending the text into\n** SQLite for parsing.  ^These routines return 1 if the input string\n** appears to be a complete SQL statement.  ^A statement is judged to be\n** complete if it ends with a semicolon token and is not a prefix of a\n** well-formed CREATE TRIGGER statement.  ^Semicolons that are embedded within\n** string literals or quoted identifier names or comments are not\n** independent tokens (they are part of the token in which they are\n** embedded) and thus do not count as a statement terminator.  ^Whitespace\n** and comments that follow the final semicolon are ignored.\n**\n** ^These routines return 0 if the statement is incomplete.  ^If a\n** memory allocation fails, then SQLITE_NOMEM is returned.\n**\n** ^These routines do not parse the SQL statements and thus\n** will not detect syntactically incorrect SQL.\n**\n** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior\n** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked\n** automatically by sqlite3_complete16().  If that initialization fails,\n** then the return value from sqlite3_complete16() will be non-zero\n** regardless of whether or not the input SQL is complete.)^\n**\n** The input to [sqlite3_complete()] must be a zero-terminated\n** UTF-8 string.\n**\n** The input to [sqlite3_complete16()] must be a zero-terminated\n** UTF-16 string in native byte order.\n*/\nSQLITE_API int sqlite3_complete(const char *sql);\nSQLITE_API int sqlite3_complete16(const void *sql);\n\n/*\n** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors\n** KEYWORDS: {busy-handler callback} {busy handler}\n** METHOD: sqlite3\n**\n** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X\n** that might be invoked with argument P whenever\n** an attempt is made to access a database table associated with\n** [database connection] D when another thread\n** or process has the table locked.\n** The sqlite3_busy_handler() interface is used to implement\n** [sqlite3_busy_timeout()] and [PRAGMA busy_timeout].\n**\n** ^If the busy callback is NULL, then [SQLITE_BUSY]\n** is returned immediately upon encountering the lock.  ^If the busy callback\n** is not NULL, then the callback might be invoked with two arguments.\n**\n** ^The first argument to the busy handler is a copy of the void* pointer which\n** is the third argument to sqlite3_busy_handler().  ^The second argument to\n** the busy handler callback is the number of times that the busy handler has\n** been invoked previously for the same locking event.  ^If the\n** busy callback returns 0, then no additional attempts are made to\n** access the database and [SQLITE_BUSY] is returned\n** to the application.\n** ^If the callback returns non-zero, then another attempt\n** is made to access the database and the cycle repeats.\n**\n** The presence of a busy handler does not guarantee that it will be invoked\n** when there is lock contention. ^If SQLite determines that invoking the busy\n** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]\n** to the application instead of invoking the\n** busy handler.\n** Consider a scenario where one process is holding a read lock that\n** it is trying to promote to a reserved lock and\n** a second process is holding a reserved lock that it is trying\n** to promote to an exclusive lock.  The first process cannot proceed\n** because it is blocked by the second and the second process cannot\n** proceed because it is blocked by the first.  If both processes\n** invoke the busy handlers, neither will make any progress.  Therefore,\n** SQLite returns [SQLITE_BUSY] for the first process, hoping that this\n** will induce the first process to release its read lock and allow\n** the second process to proceed.\n**\n** ^The default busy callback is NULL.\n**\n** ^(There can only be a single busy handler defined for each\n** [database connection].  Setting a new busy handler clears any\n** previously set handler.)^  ^Note that calling [sqlite3_busy_timeout()]\n** or evaluating [PRAGMA busy_timeout=N] will change the\n** busy handler and thus clear any previously set busy handler.\n**\n** The busy callback should not take any actions which modify the\n** database connection that invoked the busy handler.  In other words,\n** the busy handler is not reentrant.  Any such actions\n** result in undefined behavior.\n**\n** A busy handler must not close the database connection\n** or [prepared statement] that invoked the busy handler.\n*/\nSQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);\n\n/*\n** CAPI3REF: Set A Busy Timeout\n** METHOD: sqlite3\n**\n** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps\n** for a specified amount of time when a table is locked.  ^The handler\n** will sleep multiple times until at least \"ms\" milliseconds of sleeping\n** have accumulated.  ^After at least \"ms\" milliseconds of sleeping,\n** the handler returns 0 which causes [sqlite3_step()] to return\n** [SQLITE_BUSY].\n**\n** ^Calling this routine with an argument less than or equal to zero\n** turns off all busy handlers.\n**\n** ^(There can only be a single busy handler for a particular\n** [database connection] at any given moment.  If another busy handler\n** was defined  (using [sqlite3_busy_handler()]) prior to calling\n** this routine, that other busy handler is cleared.)^\n**\n** See also:  [PRAGMA busy_timeout]\n*/\nSQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);\n\n/*\n** CAPI3REF: Set the Setlk Timeout\n** METHOD: sqlite3\n**\n** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If\n** the VFS supports blocking locks, it sets the timeout in ms used by\n** eligible locks taken on wal mode databases by the specified database\n** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does\n** not support blocking locks, this function is a no-op.\n**\n** Passing 0 to this function disables blocking locks altogether. Passing\n** -1 to this function requests that the VFS blocks for a long time -\n** indefinitely if possible. The results of passing any other negative value\n** are undefined.\n**\n** Internally, each SQLite database handle stores two timeout values - the\n** busy-timeout (used for rollback mode databases, or if the VFS does not\n** support blocking locks) and the setlk-timeout (used for blocking locks\n** on wal-mode databases). The sqlite3_busy_timeout() method sets both\n** values, this function sets only the setlk-timeout value. Therefore,\n** to configure separate busy-timeout and setlk-timeout values for a single\n** database handle, call sqlite3_busy_timeout() followed by this function.\n**\n** Whenever the number of connections to a wal mode database falls from\n** 1 to 0, the last connection takes an exclusive lock on the database,\n** then checkpoints and deletes the wal file. While it is doing this, any\n** new connection that tries to read from the database fails with an\n** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is\n** passed to this API, the new connection blocks until the exclusive lock\n** has been released.\n*/\nSQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);\n\n/*\n** CAPI3REF: Flags for sqlite3_setlk_timeout()\n*/\n#define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01\n\n/*\n** CAPI3REF: Convenience Routines For Running Queries\n** METHOD: sqlite3\n**\n** This is a legacy interface that is preserved for backwards compatibility.\n** Use of this interface is not recommended.\n**\n** Definition: A <b>result table</b> is a memory data structure created by the\n** [sqlite3_get_table()] interface.  A result table records the\n** complete query results from one or more queries.\n**\n** The table conceptually has a number of rows and columns.  But\n** these numbers are not part of the result table itself.  These\n** numbers are obtained separately.  Let N be the number of rows\n** and M be the number of columns.\n**\n** A result table is an array of pointers to zero-terminated UTF-8 strings.\n** There are (N+1)*M elements in the array.  The first M pointers point\n** to zero-terminated strings that  contain the names of the columns.\n** The remaining entries all point to query results.  NULL values result\n** in NULL pointers.  All other values are in their UTF-8 zero-terminated\n** string representation as returned by [sqlite3_column_text()].\n**\n** A result table might consist of one or more memory allocations.\n** It is not safe to pass a result table directly to [sqlite3_free()].\n** A result table should be deallocated using [sqlite3_free_table()].\n**\n** ^(As an example of the result table format, suppose a query result\n** is as follows:\n**\n** <blockquote><pre>\n**        Name        | Age\n**        -----------------------\n**        Alice       | 43\n**        Bob         | 28\n**        Cindy       | 21\n** </pre></blockquote>\n**\n** There are two columns (M==2) and three rows (N==3).  Thus the\n** result table has 8 entries.  Suppose the result table is stored\n** in an array named azResult.  Then azResult holds this content:\n**\n** <blockquote><pre>\n**        azResult&#91;0] = \"Name\";\n**        azResult&#91;1] = \"Age\";\n**        azResult&#91;2] = \"Alice\";\n**        azResult&#91;3] = \"43\";\n**        azResult&#91;4] = \"Bob\";\n**        azResult&#91;5] = \"28\";\n**        azResult&#91;6] = \"Cindy\";\n**        azResult&#91;7] = \"21\";\n** </pre></blockquote>)^\n**\n** ^The sqlite3_get_table() function evaluates one or more\n** semicolon-separated SQL statements in the zero-terminated UTF-8\n** string of its 2nd parameter and returns a result table to the\n** pointer given in its 3rd parameter.\n**\n** After the application has finished with the result from sqlite3_get_table(),\n** it must pass the result table pointer to sqlite3_free_table() in order to\n** release the memory that was malloced.  Because of the way the\n** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling\n** function must not try to call [sqlite3_free()] directly.  Only\n** [sqlite3_free_table()] is able to release the memory properly and safely.\n**\n** The sqlite3_get_table() interface is implemented as a wrapper around\n** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access\n** to any internal data structures of SQLite.  It uses only the public\n** interface defined here.  As a consequence, errors that occur in the\n** wrapper layer outside of the internal [sqlite3_exec()] call are not\n** reflected in subsequent calls to [sqlite3_errcode()] or\n** [sqlite3_errmsg()].\n*/\nSQLITE_API int sqlite3_get_table(\n  sqlite3 *db,          /* An open database */\n  const char *zSql,     /* SQL to be evaluated */\n  char ***pazResult,    /* Results of the query */\n  int *pnRow,           /* Number of result rows written here */\n  int *pnColumn,        /* Number of result columns written here */\n  char **pzErrmsg       /* Error msg written here */\n);\nSQLITE_API void sqlite3_free_table(char **result);\n\n/*\n** CAPI3REF: Formatted String Printing Functions\n**\n** These routines are work-alikes of the \"printf()\" family of functions\n** from the standard C library.\n** These routines understand most of the common formatting options from\n** the standard library printf()\n** plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]).\n** See the [built-in printf()] documentation for details.\n**\n** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their\n** results into memory obtained from [sqlite3_malloc64()].\n** The strings returned by these two routines should be\n** released by [sqlite3_free()].  ^Both routines return a\n** NULL pointer if [sqlite3_malloc64()] is unable to allocate enough\n** memory to hold the resulting string.\n**\n** ^(The sqlite3_snprintf() routine is similar to \"snprintf()\" from\n** the standard C library.  The result is written into the\n** buffer supplied as the second parameter whose size is given by\n** the first parameter. Note that the order of the\n** first two parameters is reversed from snprintf().)^  This is an\n** historical accident that cannot be fixed without breaking\n** backwards compatibility.  ^(Note also that sqlite3_snprintf()\n** returns a pointer to its buffer instead of the number of\n** characters actually written into the buffer.)^  We admit that\n** the number of characters written would be a more useful return\n** value but we cannot change the implementation of sqlite3_snprintf()\n** now without breaking compatibility.\n**\n** ^As long as the buffer size is greater than zero, sqlite3_snprintf()\n** guarantees that the buffer is always zero-terminated.  ^The first\n** parameter \"n\" is the total size of the buffer, including space for\n** the zero terminator.  So the longest string that can be completely\n** written will be n-1 characters.\n**\n** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().\n**\n** See also:  [built-in printf()], [printf() SQL function]\n*/\nSQLITE_API char *sqlite3_mprintf(const char*,...);\nSQLITE_API char *sqlite3_vmprintf(const char*, va_list);\nSQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);\nSQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);\n\n/*\n** CAPI3REF: Memory Allocation Subsystem\n**\n** The SQLite core uses these three routines for all of its own\n** internal memory allocation needs. \"Core\" in the previous sentence\n** does not include operating-system specific [VFS] implementation.  The\n** Windows VFS uses native malloc() and free() for some operations.\n**\n** ^The sqlite3_malloc() routine returns a pointer to a block\n** of memory at least N bytes in length, where N is the parameter.\n** ^If sqlite3_malloc() is unable to obtain sufficient free\n** memory, it returns a NULL pointer.  ^If the parameter N to\n** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns\n** a NULL pointer.\n**\n** ^The sqlite3_malloc64(N) routine works just like\n** sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead\n** of a signed 32-bit integer.\n**\n** ^Calling sqlite3_free() with a pointer previously returned\n** by sqlite3_malloc() or sqlite3_realloc() releases that memory so\n** that it might be reused.  ^The sqlite3_free() routine is\n** a no-op if it is called with a NULL pointer.  Passing a NULL pointer\n** to sqlite3_free() is harmless.  After being freed, memory\n** should neither be read nor written.  Even reading previously freed\n** memory might result in a segmentation fault or other severe error.\n** Memory corruption, a segmentation fault, or other severe error\n** might result if sqlite3_free() is called with a non-NULL pointer that\n** was not obtained from sqlite3_malloc() or sqlite3_realloc().\n**\n** ^The sqlite3_realloc(X,N) interface attempts to resize a\n** prior memory allocation X to be at least N bytes.\n** ^If the X parameter to sqlite3_realloc(X,N)\n** is a NULL pointer then its behavior is identical to calling\n** sqlite3_malloc(N).\n** ^If the N parameter to sqlite3_realloc(X,N) is zero or\n** negative then the behavior is exactly the same as calling\n** sqlite3_free(X).\n** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation\n** of at least N bytes in size or NULL if insufficient memory is available.\n** ^If M is the size of the prior allocation, then min(N,M) bytes of the\n** prior allocation are copied into the beginning of the buffer returned\n** by sqlite3_realloc(X,N) and the prior allocation is freed.\n** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the\n** prior allocation is not freed.\n**\n** ^The sqlite3_realloc64(X,N) interface works the same as\n** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead\n** of a 32-bit signed integer.\n**\n** ^If X is a memory allocation previously obtained from sqlite3_malloc(),\n** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then\n** sqlite3_msize(X) returns the size of that memory allocation in bytes.\n** ^The value returned by sqlite3_msize(X) might be larger than the number\n** of bytes requested when X was allocated.  ^If X is a NULL pointer then\n** sqlite3_msize(X) returns zero.  If X points to something that is not\n** the beginning of memory allocation, or if it points to a formerly\n** valid memory allocation that has now been freed, then the behavior\n** of sqlite3_msize(X) is undefined and possibly harmful.\n**\n** ^The memory returned by sqlite3_malloc(), sqlite3_realloc(),\n** sqlite3_malloc64(), and sqlite3_realloc64()\n** is always aligned to at least an 8 byte boundary, or to a\n** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time\n** option is used.\n**\n** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]\n** must be either NULL or else pointers obtained from a prior\n** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have\n** not yet been released.\n**\n** The application must not read or write any part of\n** a block of memory after it has been released using\n** [sqlite3_free()] or [sqlite3_realloc()].\n*/\nSQLITE_API void *sqlite3_malloc(int);\nSQLITE_API void *sqlite3_malloc64(sqlite3_uint64);\nSQLITE_API void *sqlite3_realloc(void*, int);\nSQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);\nSQLITE_API void sqlite3_free(void*);\nSQLITE_API sqlite3_uint64 sqlite3_msize(void*);\n\n/*\n** CAPI3REF: Memory Allocator Statistics\n**\n** SQLite provides these two interfaces for reporting on the status\n** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]\n** routines, which form the built-in memory allocation subsystem.\n**\n** ^The [sqlite3_memory_used()] routine returns the number of bytes\n** of memory currently outstanding (malloced but not freed).\n** ^The [sqlite3_memory_highwater()] routine returns the maximum\n** value of [sqlite3_memory_used()] since the high-water mark\n** was last reset.  ^The values returned by [sqlite3_memory_used()] and\n** [sqlite3_memory_highwater()] include any overhead\n** added by SQLite in its implementation of [sqlite3_malloc()],\n** but not overhead added by any underlying system library\n** routines that [sqlite3_malloc()] may call.\n**\n** ^The memory high-water mark is reset to the current value of\n** [sqlite3_memory_used()] if and only if the parameter to\n** [sqlite3_memory_highwater()] is true.  ^The value returned\n** by [sqlite3_memory_highwater(1)] is the high-water mark\n** prior to the reset.\n*/\nSQLITE_API sqlite3_int64 sqlite3_memory_used(void);\nSQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);\n\n/*\n** CAPI3REF: Pseudo-Random Number Generator\n**\n** SQLite contains a high-quality pseudo-random number generator (PRNG) used to\n** select random [ROWID | ROWIDs] when inserting new records into a table that\n** already uses the largest possible [ROWID].  The PRNG is also used for\n** the built-in random() and randomblob() SQL functions.  This interface allows\n** applications to access the same PRNG for other purposes.\n**\n** ^A call to this routine stores N bytes of randomness into buffer P.\n** ^The P parameter can be a NULL pointer.\n**\n** ^If this routine has not been previously called or if the previous\n** call had N less than one or a NULL pointer for P, then the PRNG is\n** seeded using randomness obtained from the xRandomness method of\n** the default [sqlite3_vfs] object.\n** ^If the previous call to this routine had an N of 1 or more and a\n** non-NULL P then the pseudo-randomness is generated\n** internally and without recourse to the [sqlite3_vfs] xRandomness\n** method.\n*/\nSQLITE_API void sqlite3_randomness(int N, void *P);\n\n/*\n** CAPI3REF: Compile-Time Authorization Callbacks\n** METHOD: sqlite3\n** KEYWORDS: {authorizer callback}\n**\n** ^This routine registers an authorizer callback with a particular\n** [database connection], supplied in the first argument.\n** ^The authorizer callback is invoked as SQL statements are being compiled\n** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],\n** [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()],\n** and [sqlite3_prepare16_v3()].  ^At various\n** points during the compilation process, as logic is being created\n** to perform various actions, the authorizer callback is invoked to\n** see if those actions are allowed.  ^The authorizer callback should\n** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the\n** specific action but allow the SQL statement to continue to be\n** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be\n** rejected with an error.  ^If the authorizer callback returns\n** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]\n** then the [sqlite3_prepare_v2()] or equivalent call that triggered\n** the authorizer will fail with an error message.\n**\n** When the callback returns [SQLITE_OK], that means the operation\n** requested is ok.  ^When the callback returns [SQLITE_DENY], the\n** [sqlite3_prepare_v2()] or equivalent call that triggered the\n** authorizer will fail with an error message explaining that\n** access is denied.\n**\n** ^The first parameter to the authorizer callback is a copy of the third\n** parameter to the sqlite3_set_authorizer() interface. ^The second parameter\n** to the callback is an integer [SQLITE_COPY | action code] that specifies\n** the particular action to be authorized. ^The third through sixth parameters\n** to the callback are either NULL pointers or zero-terminated strings\n** that contain additional details about the action to be authorized.\n** Applications must always be prepared to encounter a NULL pointer in any\n** of the third through the sixth parameters of the authorization callback.\n**\n** ^If the action code is [SQLITE_READ]\n** and the callback returns [SQLITE_IGNORE] then the\n** [prepared statement] statement is constructed to substitute\n** a NULL value in place of the table column that would have\n** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]\n** return can be used to deny an untrusted user access to individual\n** columns of a table.\n** ^When a table is referenced by a [SELECT] but no column values are\n** extracted from that table (for example in a query like\n** \"SELECT count(*) FROM tab\") then the [SQLITE_READ] authorizer callback\n** is invoked once for that table with a column name that is an empty string.\n** ^If the action code is [SQLITE_DELETE] and the callback returns\n** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the\n** [truncate optimization] is disabled and all rows are deleted individually.\n**\n** An authorizer is used when [sqlite3_prepare | preparing]\n** SQL statements from an untrusted source, to ensure that the SQL statements\n** do not try to access data they are not allowed to see, or that they do not\n** try to execute malicious statements that damage the database.  For\n** example, an application may allow a user to enter arbitrary\n** SQL queries for evaluation by a database.  But the application does\n** not want the user to be able to make arbitrary changes to the\n** database.  An authorizer could then be put in place while the\n** user-entered SQL is being [sqlite3_prepare | prepared] that\n** disallows everything except [SELECT] statements.\n**\n** Applications that need to process SQL from untrusted sources\n** might also consider lowering resource limits using [sqlite3_limit()]\n** and limiting database size using the [max_page_count] [PRAGMA]\n** in addition to using an authorizer.\n**\n** ^(Only a single authorizer can be in place on a database connection\n** at a time.  Each call to sqlite3_set_authorizer overrides the\n** previous call.)^  ^Disable the authorizer by installing a NULL callback.\n** The authorizer is disabled by default.\n**\n** The authorizer callback must not do anything that will modify\n** the database connection that invoked the authorizer callback.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the\n** statement might be re-prepared during [sqlite3_step()] due to a\n** schema change.  Hence, the application should ensure that the\n** correct authorizer callback remains in place during the [sqlite3_step()].\n**\n** ^Note that the authorizer callback is invoked only during\n** [sqlite3_prepare()] or its variants.  Authorization is not\n** performed during statement evaluation in [sqlite3_step()], unless\n** as stated in the previous paragraph, sqlite3_step() invokes\n** sqlite3_prepare_v2() to reprepare a statement after a schema change.\n*/\nSQLITE_API int sqlite3_set_authorizer(\n  sqlite3*,\n  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\n  void *pUserData\n);\n\n/*\n** CAPI3REF: Authorizer Return Codes\n**\n** The [sqlite3_set_authorizer | authorizer callback function] must\n** return either [SQLITE_OK] or one of these two constants in order\n** to signal SQLite whether or not the action is permitted.  See the\n** [sqlite3_set_authorizer | authorizer documentation] for additional\n** information.\n**\n** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]\n** returned from the [sqlite3_vtab_on_conflict()] interface.\n*/\n#define SQLITE_DENY   1   /* Abort the SQL statement with an error */\n#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */\n\n/*\n** CAPI3REF: Authorizer Action Codes\n**\n** The [sqlite3_set_authorizer()] interface registers a callback function\n** that is invoked to authorize certain SQL statement actions.  The\n** second parameter to the callback is an integer code that specifies\n** what action is being authorized.  These are the integer action codes that\n** the authorizer callback may be passed.\n**\n** These action code values signify what kind of operation is to be\n** authorized.  The 3rd and 4th parameters to the authorization\n** callback function will be parameters or NULL depending on which of these\n** codes is used as the second parameter.  ^(The 5th parameter to the\n** authorizer callback is the name of the database (\"main\", \"temp\",\n** etc.) if applicable.)^  ^The 6th parameter to the authorizer callback\n** is the name of the inner-most trigger or view that is responsible for\n** the access attempt or NULL if this access attempt is directly from\n** top-level SQL code.\n*/\n/******************************************* 3rd ************ 4th ***********/\n#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */\n#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */\n#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */\n#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */\n#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */\n#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */\n#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */\n#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */\n#define SQLITE_DELETE                9   /* Table Name      NULL            */\n#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */\n#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */\n#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */\n#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */\n#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */\n#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */\n#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */\n#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */\n#define SQLITE_INSERT               18   /* Table Name      NULL            */\n#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */\n#define SQLITE_READ                 20   /* Table Name      Column Name     */\n#define SQLITE_SELECT               21   /* NULL            NULL            */\n#define SQLITE_TRANSACTION          22   /* Operation       NULL            */\n#define SQLITE_UPDATE               23   /* Table Name      Column Name     */\n#define SQLITE_ATTACH               24   /* Filename        NULL            */\n#define SQLITE_DETACH               25   /* Database Name   NULL            */\n#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */\n#define SQLITE_REINDEX              27   /* Index Name      NULL            */\n#define SQLITE_ANALYZE              28   /* Table Name      NULL            */\n#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */\n#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */\n#define SQLITE_FUNCTION             31   /* NULL            Function Name   */\n#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */\n#define SQLITE_COPY                  0   /* No longer used */\n#define SQLITE_RECURSIVE            33   /* NULL            NULL            */\n\n/*\n** CAPI3REF: Deprecated Tracing And Profiling Functions\n** DEPRECATED\n**\n** These routines are deprecated. Use the [sqlite3_trace_v2()] interface\n** instead of the routines described here.\n**\n** These routines register callback functions that can be used for\n** tracing and profiling the execution of SQL statements.\n**\n** ^The callback function registered by sqlite3_trace() is invoked at\n** various times when an SQL statement is being run by [sqlite3_step()].\n** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the\n** SQL statement text as the statement first begins executing.\n** ^(Additional sqlite3_trace() callbacks might occur\n** as each triggered subprogram is entered.  The callbacks for triggers\n** contain a UTF-8 SQL comment that identifies the trigger.)^\n**\n** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit\n** the length of [bound parameter] expansion in the output of sqlite3_trace().\n**\n** ^The callback function registered by sqlite3_profile() is invoked\n** as each SQL statement finishes.  ^The profile callback contains\n** the original statement text and an estimate of wall-clock time\n** of how long that statement took to run.  ^The profile callback\n** time is in units of nanoseconds, however the current implementation\n** is only capable of millisecond resolution so the six least significant\n** digits in the time are meaningless.  Future versions of SQLite\n** might provide greater resolution on the profiler callback.  Invoking\n** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the\n** profile callback.\n*/\nSQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,\n   void(*xTrace)(void*,const char*), void*);\nSQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,\n   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);\n\n/*\n** CAPI3REF: SQL Trace Event Codes\n** KEYWORDS: SQLITE_TRACE\n**\n** These constants identify classes of events that can be monitored\n** using the [sqlite3_trace_v2()] tracing logic.  The M argument\n** to [sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of\n** the following constants.  ^The first argument to the trace callback\n** is one of the following constants.\n**\n** New tracing constants may be added in future releases.\n**\n** ^A trace callback has four arguments: xCallback(T,C,P,X).\n** ^The T argument is one of the integer type codes above.\n** ^The C argument is a copy of the context pointer passed in as the\n** fourth argument to [sqlite3_trace_v2()].\n** The P and X arguments are pointers whose meanings depend on T.\n**\n** <dl>\n** [[SQLITE_TRACE_STMT]] <dt>SQLITE_TRACE_STMT</dt>\n** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement\n** first begins running and possibly at other times during the\n** execution of the prepared statement, such as at the start of each\n** trigger subprogram. ^The P argument is a pointer to the\n** [prepared statement]. ^The X argument is a pointer to a string which\n** is the unexpanded SQL text of the prepared statement or an SQL comment\n** that indicates the invocation of a trigger.  ^The callback can compute\n** the same text that would have been returned by the legacy [sqlite3_trace()]\n** interface by using the X argument when X begins with \"--\" and invoking\n** [sqlite3_expanded_sql(P)] otherwise.\n**\n** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>\n** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same\n** information as is provided by the [sqlite3_profile()] callback.\n** ^The P argument is a pointer to the [prepared statement] and the\n** X argument points to a 64-bit integer which is approximately\n** the number of nanoseconds that the prepared statement took to run.\n** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes.\n**\n** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt>\n** <dd>^An SQLITE_TRACE_ROW callback is invoked whenever a prepared\n** statement generates a single row of result.\n** ^The P argument is a pointer to the [prepared statement] and the\n** X argument is unused.\n**\n** [[SQLITE_TRACE_CLOSE]] <dt>SQLITE_TRACE_CLOSE</dt>\n** <dd>^An SQLITE_TRACE_CLOSE callback is invoked when a database\n** connection closes.\n** ^The P argument is a pointer to the [database connection] object\n** and the X argument is unused.\n** </dl>\n*/\n#define SQLITE_TRACE_STMT       0x01\n#define SQLITE_TRACE_PROFILE    0x02\n#define SQLITE_TRACE_ROW        0x04\n#define SQLITE_TRACE_CLOSE      0x08\n\n/*\n** CAPI3REF: SQL Trace Hook\n** METHOD: sqlite3\n**\n** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback\n** function X against [database connection] D, using property mask M\n** and context pointer P.  ^If the X callback is\n** NULL or if the M mask is zero, then tracing is disabled.  The\n** M argument should be the bitwise OR-ed combination of\n** zero or more [SQLITE_TRACE] constants.\n**\n** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)\n** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or\n** sqlite3_trace_v2(D,M,X,P) for the [database connection] D.  Each\n** database connection may have at most one trace callback.\n**\n** ^The X callback is invoked whenever any of the events identified by\n** mask M occur.  ^The integer return value from the callback is currently\n** ignored, though this may change in future releases.  Callback\n** implementations should return zero to ensure future compatibility.\n**\n** ^A trace callback is invoked with four arguments: callback(T,C,P,X).\n** ^The T argument is one of the [SQLITE_TRACE]\n** constants to indicate why the callback was invoked.\n** ^The C argument is a copy of the context pointer.\n** The P and X arguments are pointers whose meanings depend on T.\n**\n** The sqlite3_trace_v2() interface is intended to replace the legacy\n** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which\n** are deprecated.\n*/\nSQLITE_API int sqlite3_trace_v2(\n  sqlite3*,\n  unsigned uMask,\n  int(*xCallback)(unsigned,void*,void*,void*),\n  void *pCtx\n);\n\n/*\n** CAPI3REF: Query Progress Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback\n** function X to be invoked periodically during long running calls to\n** [sqlite3_step()] and [sqlite3_prepare()] and similar for\n** database connection D.  An example use for this\n** interface is to keep a GUI updated during a large query.\n**\n** ^The parameter P is passed through as the only parameter to the\n** callback function X.  ^The parameter N is the approximate number of\n** [virtual machine instructions] that are evaluated between successive\n** invocations of the callback X.  ^If N is less than one then the progress\n** handler is disabled.\n**\n** ^Only a single progress handler may be defined at one time per\n** [database connection]; setting a new progress handler cancels the\n** old one.  ^Setting parameter X to NULL disables the progress handler.\n** ^The progress handler is also disabled by setting N to a value less\n** than 1.\n**\n** ^If the progress callback returns non-zero, the operation is\n** interrupted.  This feature can be used to implement a\n** \"Cancel\" button on a GUI progress dialog box.\n**\n** The progress handler callback must not do anything that will modify\n** the database connection that invoked the progress handler.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** The progress handler callback would originally only be invoked from the\n** bytecode engine.  It still might be invoked during [sqlite3_prepare()]\n** and similar because those routines might force a reparse of the schema\n** which involves running the bytecode engine.  However, beginning with\n** SQLite version 3.41.0, the progress handler callback might also be\n** invoked directly from [sqlite3_prepare()] while analyzing and generating\n** code for complex queries.\n*/\nSQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);\n\n/*\n** CAPI3REF: Opening A New Database Connection\n** CONSTRUCTOR: sqlite3\n**\n** ^These routines open an SQLite database file as specified by the\n** filename argument. ^The filename argument is interpreted as UTF-8 for\n** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte\n** order for sqlite3_open16(). ^(A [database connection] handle is usually\n** returned in *ppDb, even if an error occurs.  The only exception is that\n** if SQLite is unable to allocate memory to hold the [sqlite3] object,\n** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]\n** object.)^ ^(If the database is opened (and/or created) successfully, then\n** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.)^ ^The\n** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain\n** an English language description of the error following a failure of any\n** of the sqlite3_open() routines.\n**\n** ^The default encoding will be UTF-8 for databases created using\n** sqlite3_open() or sqlite3_open_v2().  ^The default encoding for databases\n** created using sqlite3_open16() will be UTF-16 in the native byte order.\n**\n** Whether or not an error occurs when it is opened, resources\n** associated with the [database connection] handle should be released by\n** passing it to [sqlite3_close()] when it is no longer required.\n**\n** The sqlite3_open_v2() interface works like sqlite3_open()\n** except that it accepts two additional parameters for additional control\n** over the new database connection.  ^(The flags parameter to\n** sqlite3_open_v2() must include, at a minimum, one of the following\n** three flag combinations:)^\n**\n** <dl>\n** ^(<dt>[SQLITE_OPEN_READONLY]</dt>\n** <dd>The database is opened in read-only mode.  If the database does\n** not already exist, an error is returned.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>\n** <dd>The database is opened for reading and writing if possible, or\n** reading only if the file is write protected by the operating\n** system.  In either case the database must already exist, otherwise\n** an error is returned.  For historical reasons, if opening in\n** read-write mode fails due to OS-level permissions, an attempt is\n** made to open it in read-only mode. [sqlite3_db_readonly()] can be\n** used to determine whether the database is actually\n** read-write.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>\n** <dd>The database is opened for reading and writing, and is created if\n** it does not already exist. This is the behavior that is always used for\n** sqlite3_open() and sqlite3_open16().</dd>)^\n** </dl>\n**\n** In addition to the required flags, the following optional flags are\n** also supported:\n**\n** <dl>\n** ^(<dt>[SQLITE_OPEN_URI]</dt>\n** <dd>The filename can be interpreted as a URI if this flag is set.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_MEMORY]</dt>\n** <dd>The database will be opened as an in-memory database.  The database\n** is named by the \"filename\" argument for the purposes of cache-sharing,\n** if shared cache mode is enabled, but the \"filename\" is otherwise ignored.\n** </dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_NOMUTEX]</dt>\n** <dd>The new database connection will use the \"multi-thread\"\n** [threading mode].)^  This means that separate threads are allowed\n** to use SQLite at the same time, as long as each thread is using\n** a different [database connection].\n**\n** ^(<dt>[SQLITE_OPEN_FULLMUTEX]</dt>\n** <dd>The new database connection will use the \"serialized\"\n** [threading mode].)^  This means the multiple threads can safely\n** attempt to use the same database connection at the same time.\n** (Mutexes will block any actual concurrency, but in this mode\n** there is no harm in trying.)\n**\n** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt>\n** <dd>The database is opened with [shared cache] enabled, overriding\n** the default shared cache setting provided by\n** [sqlite3_enable_shared_cache()].)^\n** The [use of shared cache mode is discouraged] and hence shared cache\n** capabilities may be omitted from many builds of SQLite.  In such cases,\n** this option is a no-op.\n**\n** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt>\n** <dd>The database is opened with [shared cache] disabled, overriding\n** the default shared cache setting provided by\n** [sqlite3_enable_shared_cache()].)^\n**\n** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt>\n** <dd>The database connection comes up in \"extended result code mode\".\n** In other words, the database behaves as if\n** [sqlite3_extended_result_codes(db,1)] were called on the database\n** connection as soon as the connection is created. In addition to setting\n** the extended result code mode, this flag also causes [sqlite3_open_v2()]\n** to return an extended result code.</dd>\n**\n** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt>\n** <dd>The database filename is not allowed to contain a symbolic link</dd>\n** </dl>)^\n**\n** If the 3rd parameter to sqlite3_open_v2() is not one of the\n** required combinations shown above optionally combined with other\n** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits]\n** then the behavior is undefined.  Historic versions of SQLite\n** have silently ignored surplus bits in the flags parameter to\n** sqlite3_open_v2(), however that behavior might not be carried through\n** into future versions of SQLite and so applications should not rely\n** upon it.  Note in particular that the SQLITE_OPEN_EXCLUSIVE flag is a no-op\n** for sqlite3_open_v2().  The SQLITE_OPEN_EXCLUSIVE does *not* cause\n** the open to fail if the database already exists.  The SQLITE_OPEN_EXCLUSIVE\n** flag is intended for use by the [sqlite3_vfs|VFS interface] only, and not\n** by sqlite3_open_v2().\n**\n** ^The fourth parameter to sqlite3_open_v2() is the name of the\n** [sqlite3_vfs] object that defines the operating system interface that\n** the new database connection should use.  ^If the fourth parameter is\n** a NULL pointer then the default [sqlite3_vfs] object is used.\n**\n** ^If the filename is \":memory:\", then a private, temporary in-memory database\n** is created for the connection.  ^This in-memory database will vanish when\n** the database connection is closed.  Future versions of SQLite might\n** make use of additional special filenames that begin with the \":\" character.\n** It is recommended that when a database filename actually does begin with\n** a \":\" character you should prefix the filename with a pathname such as\n** \"./\" to avoid ambiguity.\n**\n** ^If the filename is an empty string, then a private, temporary\n** on-disk database will be created.  ^This private database will be\n** automatically deleted as soon as the database connection is closed.\n**\n** [[URI filenames in sqlite3_open()]] <h3>URI Filenames</h3>\n**\n** ^If [URI filename] interpretation is enabled, and the filename argument\n** begins with \"file:\", then the filename is interpreted as a URI. ^URI\n** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is\n** set in the third argument to sqlite3_open_v2(), or if it has\n** been enabled globally using the [SQLITE_CONFIG_URI] option with the\n** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option.\n** URI filename interpretation is turned off\n** by default, but future releases of SQLite might enable URI filename\n** interpretation by default.  See \"[URI filenames]\" for additional\n** information.\n**\n** URI filenames are parsed according to RFC 3986. ^If the URI contains an\n** authority, then it must be either an empty string or the string\n** \"localhost\". ^If the authority is not an empty string or \"localhost\", an\n** error is returned to the caller. ^The fragment component of a URI, if\n** present, is ignored.\n**\n** ^SQLite uses the path component of the URI as the name of the disk file\n** which contains the database. ^If the path begins with a '/' character,\n** then it is interpreted as an absolute path. ^If the path does not begin\n** with a '/' (meaning that the authority section is omitted from the URI)\n** then the path is interpreted as a relative path.\n** ^(On windows, the first component of an absolute path\n** is a drive specification (e.g. \"C:\").)^\n**\n** [[core URI query parameters]]\n** The query component of a URI may contain parameters that are interpreted\n** either by SQLite itself, or by a [VFS | custom VFS implementation].\n** SQLite and its built-in [VFSes] interpret the\n** following query parameters:\n**\n** <ul>\n**   <li> <b>vfs</b>: ^The \"vfs\" parameter may be used to specify the name of\n**     a VFS object that provides the operating system interface that should\n**     be used to access the database file on disk. ^If this option is set to\n**     an empty string the default VFS object is used. ^Specifying an unknown\n**     VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is\n**     present, then the VFS specified by the option takes precedence over\n**     the value passed as the fourth parameter to sqlite3_open_v2().\n**\n**   <li> <b>mode</b>: ^(The mode parameter may be set to either \"ro\", \"rw\",\n**     \"rwc\", or \"memory\". Attempting to set it to any other value is\n**     an error)^.\n**     ^If \"ro\" is specified, then the database is opened for read-only\n**     access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the\n**     third argument to sqlite3_open_v2(). ^If the mode option is set to\n**     \"rw\", then the database is opened for read-write (but not create)\n**     access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had\n**     been set. ^Value \"rwc\" is equivalent to setting both\n**     SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE.  ^If the mode option is\n**     set to \"memory\" then a pure [in-memory database] that never reads\n**     or writes from disk is used. ^It is an error to specify a value for\n**     the mode parameter that is less restrictive than that specified by\n**     the flags passed in the third parameter to sqlite3_open_v2().\n**\n**   <li> <b>cache</b>: ^The cache parameter may be set to either \"shared\" or\n**     \"private\". ^Setting it to \"shared\" is equivalent to setting the\n**     SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to\n**     sqlite3_open_v2(). ^Setting the cache parameter to \"private\" is\n**     equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.\n**     ^If sqlite3_open_v2() is used and the \"cache\" parameter is present in\n**     a URI filename, its value overrides any behavior requested by setting\n**     SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.\n**\n**  <li> <b>psow</b>: ^The psow parameter indicates whether or not the\n**     [powersafe overwrite] property does or does not apply to the\n**     storage media on which the database file resides.\n**\n**  <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter\n**     which if set disables file locking in rollback journal modes.  This\n**     is useful for accessing a database on a filesystem that does not\n**     support locking.  Caution:  Database corruption might result if two\n**     or more processes write to the same database and any one of those\n**     processes uses nolock=1.\n**\n**  <li> <b>immutable</b>: ^The immutable parameter is a boolean query\n**     parameter that indicates that the database file is stored on\n**     read-only media.  ^When immutable is set, SQLite assumes that the\n**     database file cannot be changed, even by a process with higher\n**     privilege, and so the database is opened read-only and all locking\n**     and change detection is disabled.  Caution: Setting the immutable\n**     property on a database file that does in fact change can result\n**     in incorrect query results and/or [SQLITE_CORRUPT] errors.\n**     See also: [SQLITE_IOCAP_IMMUTABLE].\n**\n** </ul>\n**\n** ^Specifying an unknown parameter in the query component of a URI is not an\n** error.  Future versions of SQLite might understand additional query\n** parameters.  See \"[query parameters with special meaning to SQLite]\" for\n** additional information.\n**\n** [[URI filename examples]] <h3>URI filename examples</h3>\n**\n** <table border=\"1\" align=center cellpadding=5>\n** <tr><th> URI filenames <th> Results\n** <tr><td> file:data.db <td>\n**          Open the file \"data.db\" in the current directory.\n** <tr><td> file:/home/fred/data.db<br>\n**          file:///home/fred/data.db <br>\n**          file://localhost/home/fred/data.db <br> <td>\n**          Open the database file \"/home/fred/data.db\".\n** <tr><td> file://darkstar/home/fred/data.db <td>\n**          An error. \"darkstar\" is not a recognized authority.\n** <tr><td style=\"white-space:nowrap\">\n**          file:///C:/Documents%20and%20Settings/fred/Desktop/data.db\n**     <td> Windows only: Open the file \"data.db\" on fred's desktop on drive\n**          C:. Note that the %20 escaping in this example is not strictly\n**          necessary - space characters can be used literally\n**          in URI filenames.\n** <tr><td> file:data.db?mode=ro&cache=private <td>\n**          Open file \"data.db\" in the current directory for read-only access.\n**          Regardless of whether or not shared-cache mode is enabled by\n**          default, use a private cache.\n** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td>\n**          Open file \"/home/fred/data.db\". Use the special VFS \"unix-dotfile\"\n**          that uses dot-files in place of posix advisory locking.\n** <tr><td> file:data.db?mode=readonly <td>\n**          An error. \"readonly\" is not a valid option for the \"mode\" parameter.\n**          Use \"ro\" instead:  \"file:data.db?mode=ro\".\n** </table>\n**\n** ^URI hexadecimal escape sequences (%HH) are supported within the path and\n** query components of a URI. A hexadecimal escape sequence consists of a\n** percent sign - \"%\" - followed by exactly two hexadecimal digits\n** specifying an octet value. ^Before the path or query components of a\n** URI filename are interpreted, they are encoded using UTF-8 and all\n** hexadecimal escape sequences replaced by a single byte containing the\n** corresponding octet. If this process generates an invalid UTF-8 encoding,\n** the results are undefined.\n**\n** <b>Note to Windows users:</b>  The encoding used for the filename argument\n** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever\n** codepage is currently defined.  Filenames containing international\n** characters must be converted to UTF-8 prior to passing them into\n** sqlite3_open() or sqlite3_open_v2().\n**\n** <b>Note to Windows Runtime users:</b>  The temporary directory must be set\n** prior to calling sqlite3_open() or sqlite3_open_v2().  Otherwise, various\n** features that require the use of temporary files may fail.\n**\n** See also: [sqlite3_temp_directory]\n*/\nSQLITE_API int sqlite3_open(\n  const char *filename,   /* Database filename (UTF-8) */\n  sqlite3 **ppDb          /* OUT: SQLite db handle */\n);\nSQLITE_API int sqlite3_open16(\n  const void *filename,   /* Database filename (UTF-16) */\n  sqlite3 **ppDb          /* OUT: SQLite db handle */\n);\nSQLITE_API int sqlite3_open_v2(\n  const char *filename,   /* Database filename (UTF-8) */\n  sqlite3 **ppDb,         /* OUT: SQLite db handle */\n  int flags,              /* Flags */\n  const char *zVfs        /* Name of VFS module to use */\n);\n\n/*\n** CAPI3REF: Obtain Values For URI Parameters\n**\n** These are utility routines, useful to [VFS|custom VFS implementations],\n** that check if a database file was a URI that contained a specific query\n** parameter, and if so obtains the value of that query parameter.\n**\n** The first parameter to these interfaces (hereafter referred to\n** as F) must be one of:\n** <ul>\n** <li> A database filename pointer created by the SQLite core and\n** passed into the xOpen() method of a VFS implementation, or\n** <li> A filename obtained from [sqlite3_db_filename()], or\n** <li> A new filename constructed using [sqlite3_create_filename()].\n** </ul>\n** If the F parameter is not one of the above, then the behavior is\n** undefined and probably undesirable.  Older versions of SQLite were\n** more tolerant of invalid F parameters than newer versions.\n**\n** If F is a suitable filename (as described in the previous paragraph)\n** and if P is the name of the query parameter, then\n** sqlite3_uri_parameter(F,P) returns the value of the P\n** parameter if it exists or a NULL pointer if P does not appear as a\n** query parameter on F.  If P is a query parameter of F and it\n** has no explicit value, then sqlite3_uri_parameter(F,P) returns\n** a pointer to an empty string.\n**\n** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean\n** parameter and returns true (1) or false (0) according to the value\n** of P.  The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the\n** value of query parameter P is one of \"yes\", \"true\", or \"on\" in any\n** case or if the value begins with a non-zero number.  The\n** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of\n** query parameter P is one of \"no\", \"false\", or \"off\" in any case or\n** if the value begins with a numeric zero.  If P is not a query\n** parameter on F or if the value of P does not match any of the\n** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0).\n**\n** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a\n** 64-bit signed integer and returns that integer, or D if P does not\n** exist.  If the value of P is something other than an integer, then\n** zero is returned.\n**\n** The sqlite3_uri_key(F,N) returns a pointer to the name (not\n** the value) of the N-th query parameter for filename F, or a NULL\n** pointer if N is less than zero or greater than the number of query\n** parameters minus 1.  The N value is zero-based so N should be 0 to obtain\n** the name of the first query parameter, 1 for the second parameter, and\n** so forth.\n**\n** If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and\n** sqlite3_uri_boolean(F,P,B) returns B.  If F is not a NULL pointer and\n** is not a database file pathname pointer that the SQLite core passed\n** into the xOpen VFS method, then the behavior of this routine is undefined\n** and probably undesirable.\n**\n** Beginning with SQLite [version 3.31.0] ([dateof:3.31.0]) the input F\n** parameter can also be the name of a rollback journal file or WAL file\n** in addition to the main database file.  Prior to version 3.31.0, these\n** routines would only work if F was the name of the main database file.\n** When the F parameter is the name of the rollback journal or WAL file,\n** it has access to all the same query parameters as were found on the\n** main database file.\n**\n** See the [URI filename] documentation for additional information.\n*/\nSQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z, const char *zParam);\nSQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam, int bDefault);\nSQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char*, sqlite3_int64);\nSQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N);\n\n/*\n** CAPI3REF:  Translate filenames\n**\n** These routines are available to [VFS|custom VFS implementations] for\n** translating filenames between the main database file, the journal file,\n** and the WAL file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** passed by the SQLite core into the VFS, then sqlite3_filename_database(F)\n** returns the name of the corresponding database file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** passed by the SQLite core into the VFS, or if F is a database filename\n** obtained from [sqlite3_db_filename()], then sqlite3_filename_journal(F)\n** returns the name of the corresponding rollback journal file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** that was passed by the SQLite core into the VFS, or if F is a database\n** filename obtained from [sqlite3_db_filename()], then\n** sqlite3_filename_wal(F) returns the name of the corresponding\n** WAL file.\n**\n** In all of the above, if F is not the name of a database, journal or WAL\n** filename passed into the VFS from the SQLite core and F is not the\n** return value from [sqlite3_db_filename()], then the result is\n** undefined and is likely a memory access violation.\n*/\nSQLITE_API const char *sqlite3_filename_database(sqlite3_filename);\nSQLITE_API const char *sqlite3_filename_journal(sqlite3_filename);\nSQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);\n\n/*\n** CAPI3REF:  Database File Corresponding To A Journal\n**\n** ^If X is the name of a rollback or WAL-mode journal file that is\n** passed into the xOpen method of [sqlite3_vfs], then\n** sqlite3_database_file_object(X) returns a pointer to the [sqlite3_file]\n** object that represents the main database file.\n**\n** This routine is intended for use in custom [VFS] implementations\n** only.  It is not a general-purpose interface.\n** The argument sqlite3_file_object(X) must be a filename pointer that\n** has been passed into [sqlite3_vfs].xOpen method where the\n** flags parameter to xOpen contains one of the bits\n** [SQLITE_OPEN_MAIN_JOURNAL] or [SQLITE_OPEN_WAL].  Any other use\n** of this routine results in undefined and probably undesirable\n** behavior.\n*/\nSQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);\n\n/*\n** CAPI3REF: Create and Destroy VFS Filenames\n**\n** These interfaces are provided for use by [VFS shim] implementations and\n** are not useful outside of that context.\n**\n** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of\n** database filename D with corresponding journal file J and WAL file W and\n** an array P of N URI Key/Value pairs.  The result from\n** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that\n** is safe to pass to routines like:\n** <ul>\n** <li> [sqlite3_uri_parameter()],\n** <li> [sqlite3_uri_boolean()],\n** <li> [sqlite3_uri_int64()],\n** <li> [sqlite3_uri_key()],\n** <li> [sqlite3_filename_database()],\n** <li> [sqlite3_filename_journal()], or\n** <li> [sqlite3_filename_wal()].\n** </ul>\n** If a memory allocation error occurs, sqlite3_create_filename() might\n** return a NULL pointer.  The memory obtained from sqlite3_create_filename(X)\n** must be released by a corresponding call to sqlite3_free_filename(Y).\n**\n** The P parameter in sqlite3_create_filename(D,J,W,N,P) should be an array\n** of 2*N pointers to strings.  Each pair of pointers in this array corresponds\n** to a key and value for a query parameter.  The P parameter may be a NULL\n** pointer if N is zero.  None of the 2*N pointers in the P array may be\n** NULL pointers and key pointers should not be empty strings.\n** None of the D, J, or W parameters to sqlite3_create_filename(D,J,W,N,P) may\n** be NULL pointers, though they can be empty strings.\n**\n** The sqlite3_free_filename(Y) routine releases a memory allocation\n** previously obtained from sqlite3_create_filename().  Invoking\n** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.\n**\n** If the Y parameter to sqlite3_free_filename(Y) is anything other\n** than a NULL pointer or a pointer previously acquired from\n** sqlite3_create_filename(), then bad things such as heap\n** corruption or segfaults may occur. The value Y should not be\n** used again after sqlite3_free_filename(Y) has been called.  This means\n** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,\n** then the corresponding [sqlite3_module.xClose() method should also be\n** invoked prior to calling sqlite3_free_filename(Y).\n*/\nSQLITE_API sqlite3_filename sqlite3_create_filename(\n  const char *zDatabase,\n  const char *zJournal,\n  const char *zWal,\n  int nParam,\n  const char **azParam\n);\nSQLITE_API void sqlite3_free_filename(sqlite3_filename);\n\n/*\n** CAPI3REF: Error Codes And Messages\n** METHOD: sqlite3\n**\n** ^If the most recent sqlite3_* API call associated with\n** [database connection] D failed, then the sqlite3_errcode(D) interface\n** returns the numeric [result code] or [extended result code] for that\n** API call.\n** ^The sqlite3_extended_errcode()\n** interface is the same except that it always returns the\n** [extended result code] even when extended result codes are\n** disabled.\n**\n** The values returned by sqlite3_errcode() and/or\n** sqlite3_extended_errcode() might change with each API call.\n** Except, there are some interfaces that are guaranteed to never\n** change the value of the error code.  The error-code preserving\n** interfaces include the following:\n**\n** <ul>\n** <li> sqlite3_errcode()\n** <li> sqlite3_extended_errcode()\n** <li> sqlite3_errmsg()\n** <li> sqlite3_errmsg16()\n** <li> sqlite3_error_offset()\n** </ul>\n**\n** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language\n** text that describes the error, as either UTF-8 or UTF-16 respectively,\n** or NULL if no error message is available.\n** (See how SQLite handles [invalid UTF] for exceptions to this rule.)\n** ^(Memory to hold the error message string is managed internally.\n** The application does not need to worry about freeing the result.\n** However, the error string might be overwritten or deallocated by\n** subsequent calls to other SQLite interface functions.)^\n**\n** ^The sqlite3_errstr(E) interface returns the English-language text\n** that describes the [result code] E, as UTF-8, or NULL if E is not a\n** result code for which a text error message is available.\n** ^(Memory to hold the error message string is managed internally\n** and must not be freed by the application)^.\n**\n** ^If the most recent error references a specific token in the input\n** SQL, the sqlite3_error_offset() interface returns the byte offset\n** of the start of that token.  ^The byte offset returned by\n** sqlite3_error_offset() assumes that the input SQL is UTF-8.\n** ^If the most recent error does not reference a specific token in the input\n** SQL, then the sqlite3_error_offset() function returns -1.\n**\n** When the serialized [threading mode] is in use, it might be the\n** case that a second error occurs on a separate thread in between\n** the time of the first error and the call to these interfaces.\n** When that happens, the second error will be reported since these\n** interfaces always report the most recent result.  To avoid\n** this, each thread can obtain exclusive use of the [database connection] D\n** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning\n** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after\n** all calls to the interfaces listed here are completed.\n**\n** If an interface fails with SQLITE_MISUSE, that means the interface\n** was invoked incorrectly by the application.  In that case, the\n** error code and message may or may not be set.\n*/\nSQLITE_API int sqlite3_errcode(sqlite3 *db);\nSQLITE_API int sqlite3_extended_errcode(sqlite3 *db);\nSQLITE_API const char *sqlite3_errmsg(sqlite3*);\nSQLITE_API const void *sqlite3_errmsg16(sqlite3*);\nSQLITE_API const char *sqlite3_errstr(int);\nSQLITE_API int sqlite3_error_offset(sqlite3 *db);\n\n/*\n** CAPI3REF: Set Error Codes And Message\n** METHOD: sqlite3\n**\n** Set the error code of the database handle passed as the first argument\n** to errcode, and the error message to a copy of nul-terminated string\n** zErrMsg. If zErrMsg is passed NULL, then the error message is set to\n** the default message associated with the supplied error code.  Subsequent\n** calls to [sqlite3_errcode()] and [sqlite3_errmsg()] and similar will\n** return the values set by this routine in place of what was previously\n** set by SQLite itself.\n**\n** This function returns SQLITE_OK if the error code and error message are\n** successfully set, SQLITE_NOMEM if an OOM occurs, and SQLITE_MISUSE if\n** the database handle is NULL or invalid.\n**\n** The error code and message set by this routine remains in effect until\n** they are changed, either by another call to this routine or until they are\n** changed to by SQLite itself to reflect the result of some subsquent\n** API call.\n**\n** This function is intended for use by SQLite extensions or wrappers.  The\n** idea is that an extension or wrapper can use this routine to set error\n** messages and error codes and thus behave more like a core SQLite\n** feature from the point of view of an application.\n*/\nSQLITE_API int sqlite3_set_errmsg(sqlite3 *db, int errcode, const char *zErrMsg);\n\n/*\n** CAPI3REF: Prepared Statement Object\n** KEYWORDS: {prepared statement} {prepared statements}\n**\n** An instance of this object represents a single SQL statement that\n** has been compiled into binary form and is ready to be evaluated.\n**\n** Think of each SQL statement as a separate computer program.  The\n** original SQL text is source code.  A prepared statement object\n** is the compiled object code.  All SQL must be converted into a\n** prepared statement before it can be run.\n**\n** The life-cycle of a prepared statement object usually goes like this:\n**\n** <ol>\n** <li> Create the prepared statement object using [sqlite3_prepare_v2()].\n** <li> Bind values to [parameters] using the sqlite3_bind_*()\n**      interfaces.\n** <li> Run the SQL by calling [sqlite3_step()] one or more times.\n** <li> Reset the prepared statement using [sqlite3_reset()] then go back\n**      to step 2.  Do this zero or more times.\n** <li> Destroy the object using [sqlite3_finalize()].\n** </ol>\n*/\ntypedef struct sqlite3_stmt sqlite3_stmt;\n\n/*\n** CAPI3REF: Run-time Limits\n** METHOD: sqlite3\n**\n** ^(This interface allows the size of various constructs to be limited\n** on a connection by connection basis.  The first parameter is the\n** [database connection] whose limit is to be set or queried.  The\n** second parameter is one of the [limit categories] that define a\n** class of constructs to be size limited.  The third parameter is the\n** new limit for that construct.)^\n**\n** ^If the new limit is a negative number, the limit is unchanged.\n** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a\n** [limits | hard upper bound]\n** set at compile-time by a C preprocessor macro called\n** [limits | SQLITE_MAX_<i>NAME</i>].\n** (The \"_LIMIT_\" in the name is changed to \"_MAX_\".))^\n** ^Attempts to increase a limit above its hard upper bound are\n** silently truncated to the hard upper bound.\n**\n** ^Regardless of whether or not the limit was changed, the\n** [sqlite3_limit()] interface returns the prior value of the limit.\n** ^Hence, to find the current value of a limit without changing it,\n** simply invoke this interface with the third parameter set to -1.\n**\n** Run-time limits are intended for use in applications that manage\n** both their own internal database and also databases that are controlled\n** by untrusted external sources.  An example application might be a\n** web browser that has its own databases for storing history and\n** separate databases controlled by JavaScript applications downloaded\n** off the Internet.  The internal databases can be given the\n** large, default limits.  Databases managed by external sources can\n** be given much smaller limits designed to prevent a denial of service\n** attack.  Developers might also want to use the [sqlite3_set_authorizer()]\n** interface to further control untrusted SQL.  The size of the database\n** created by an untrusted script can be contained using the\n** [max_page_count] [PRAGMA].\n**\n** New run-time limit categories may be added in future releases.\n*/\nSQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);\n\n/*\n** CAPI3REF: Run-Time Limit Categories\n** KEYWORDS: {limit category} {*limit categories}\n**\n** These constants define various performance limits\n** that can be lowered at run-time using [sqlite3_limit()].\n** A concise description of these limits follows, and additional information\n** is available at [limits | Limits in SQLite].\n**\n** <dl>\n** [[SQLITE_LIMIT_LENGTH]] ^(<dt>SQLITE_LIMIT_LENGTH</dt>\n** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^\n**\n** [[SQLITE_LIMIT_SQL_LENGTH]] ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>\n** <dd>The maximum length of an SQL statement, in bytes.</dd>)^\n**\n** [[SQLITE_LIMIT_COLUMN]] ^(<dt>SQLITE_LIMIT_COLUMN</dt>\n** <dd>The maximum number of columns in a table definition or in the\n** result set of a [SELECT] or the maximum number of columns in an index\n** or in an ORDER BY or GROUP BY clause.</dd>)^\n**\n** [[SQLITE_LIMIT_EXPR_DEPTH]] ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>\n** <dd>The maximum depth of the parse tree on any expression.</dd>)^\n**\n** [[SQLITE_LIMIT_COMPOUND_SELECT]] ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>\n** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^\n**\n** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>\n** <dd>The maximum number of instructions in a virtual machine program\n** used to implement an SQL statement.  If [sqlite3_prepare_v2()] or\n** the equivalent tries to allocate space for more than this many opcodes\n** in a single prepared statement, an SQLITE_NOMEM error is returned.</dd>)^\n**\n** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>\n** <dd>The maximum number of arguments on a function.</dd>)^\n**\n** [[SQLITE_LIMIT_ATTACHED]] ^(<dt>SQLITE_LIMIT_ATTACHED</dt>\n** <dd>The maximum number of [ATTACH | attached databases].)^</dd>\n**\n** [[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]]\n** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>\n** <dd>The maximum length of the pattern argument to the [LIKE] or\n** [GLOB] operators.</dd>)^\n**\n** [[SQLITE_LIMIT_VARIABLE_NUMBER]]\n** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>\n** <dd>The maximum index number of any [parameter] in an SQL statement.)^\n**\n** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>\n** <dd>The maximum depth of recursion for triggers.</dd>)^\n**\n** [[SQLITE_LIMIT_WORKER_THREADS]] ^(<dt>SQLITE_LIMIT_WORKER_THREADS</dt>\n** <dd>The maximum number of auxiliary worker threads that a single\n** [prepared statement] may start.</dd>)^\n** </dl>\n*/\n#define SQLITE_LIMIT_LENGTH                    0\n#define SQLITE_LIMIT_SQL_LENGTH                1\n#define SQLITE_LIMIT_COLUMN                    2\n#define SQLITE_LIMIT_EXPR_DEPTH                3\n#define SQLITE_LIMIT_COMPOUND_SELECT           4\n#define SQLITE_LIMIT_VDBE_OP                   5\n#define SQLITE_LIMIT_FUNCTION_ARG              6\n#define SQLITE_LIMIT_ATTACHED                  7\n#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8\n#define SQLITE_LIMIT_VARIABLE_NUMBER           9\n#define SQLITE_LIMIT_TRIGGER_DEPTH            10\n#define SQLITE_LIMIT_WORKER_THREADS           11\n\n/*\n** CAPI3REF: Prepare Flags\n**\n** These constants define various flags that can be passed into the\n** \"prepFlags\" parameter of the [sqlite3_prepare_v3()] and\n** [sqlite3_prepare16_v3()] interfaces.\n**\n** New flags may be added in future releases of SQLite.\n**\n** <dl>\n** [[SQLITE_PREPARE_PERSISTENT]] ^(<dt>SQLITE_PREPARE_PERSISTENT</dt>\n** <dd>The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner\n** that the prepared statement will be retained for a long time and\n** probably reused many times.)^ ^Without this flag, [sqlite3_prepare_v3()]\n** and [sqlite3_prepare16_v3()] assume that the prepared statement will\n** be used just once or at most a few times and then destroyed using\n** [sqlite3_finalize()] relatively soon. The current implementation acts\n** on this hint by avoiding the use of [lookaside memory] so as not to\n** deplete the limited store of lookaside memory. Future versions of\n** SQLite may act on this hint differently.\n**\n** [[SQLITE_PREPARE_NORMALIZE]] <dt>SQLITE_PREPARE_NORMALIZE</dt>\n** <dd>The SQLITE_PREPARE_NORMALIZE flag is a no-op. This flag used\n** to be required for any prepared statement that wanted to use the\n** [sqlite3_normalized_sql()] interface.  However, the\n** [sqlite3_normalized_sql()] interface is now available to all\n** prepared statements, regardless of whether or not they use this\n** flag.\n**\n** [[SQLITE_PREPARE_NO_VTAB]] <dt>SQLITE_PREPARE_NO_VTAB</dt>\n** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler\n** to return an error (error code SQLITE_ERROR) if the statement uses\n** any virtual tables.\n**\n** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>\n** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler\n** errors from being sent to the error log defined by\n** [SQLITE_CONFIG_LOG].  This can be used, for example, to do test\n** compiles to see if some SQL syntax is well-formed, without generating\n** messages on the global error log when it is not.  If the test compile\n** fails, the sqlite3_prepare_v3() call returns the same error indications\n** with or without this flag; it just omits the call to [sqlite3_log()] that\n** logs the error.\n** </dl>\n*/\n#define SQLITE_PREPARE_PERSISTENT              0x01\n#define SQLITE_PREPARE_NORMALIZE               0x02\n#define SQLITE_PREPARE_NO_VTAB                 0x04\n#define SQLITE_PREPARE_DONT_LOG                0x10\n\n/*\n** CAPI3REF: Compiling An SQL Statement\n** KEYWORDS: {SQL statement compiler}\n** METHOD: sqlite3\n** CONSTRUCTOR: sqlite3_stmt\n**\n** To execute an SQL statement, it must first be compiled into a byte-code\n** program using one of these routines.  Or, in other words, these routines\n** are constructors for the [prepared statement] object.\n**\n** The preferred routine to use is [sqlite3_prepare_v2()].  The\n** [sqlite3_prepare()] interface is legacy and should be avoided.\n** [sqlite3_prepare_v3()] has an extra \"prepFlags\" option that is used\n** for special purposes.\n**\n** The use of the UTF-8 interfaces is preferred, as SQLite currently\n** does all parsing using UTF-8.  The UTF-16 interfaces are provided\n** as a convenience.  The UTF-16 interfaces work by converting the\n** input text into UTF-8, then invoking the corresponding UTF-8 interface.\n**\n** The first argument, \"db\", is a [database connection] obtained from a\n** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or\n** [sqlite3_open16()].  The database connection must not have been closed.\n**\n** The second argument, \"zSql\", is the statement to be compiled, encoded\n** as either UTF-8 or UTF-16.  The sqlite3_prepare(), sqlite3_prepare_v2(),\n** and sqlite3_prepare_v3()\n** interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(),\n** and sqlite3_prepare16_v3() use UTF-16.\n**\n** ^If the nByte argument is negative, then zSql is read up to the\n** first zero terminator. ^If nByte is positive, then it is the maximum\n** number of bytes read from zSql.  When nByte is positive, zSql is read\n** up to the first zero terminator or until the nByte bytes have been read,\n** whichever comes first.  ^If nByte is zero, then no prepared\n** statement is generated.\n** If the caller knows that the supplied string is nul-terminated, then\n** there is a small performance advantage to passing an nByte parameter that\n** is the number of bytes in the input string <i>including</i>\n** the nul-terminator.\n** Note that nByte measures the length of the input in bytes, not\n** characters, even for the UTF-16 interfaces.\n**\n** ^If pzTail is not NULL then *pzTail is made to point to the first byte\n** past the end of the first SQL statement in zSql.  These routines only\n** compile the first statement in zSql, so *pzTail is left pointing to\n** what remains uncompiled.\n**\n** ^*ppStmt is left pointing to a compiled [prepared statement] that can be\n** executed using [sqlite3_step()].  ^If there is an error, *ppStmt is set\n** to NULL.  ^If the input text contains no SQL (if the input is an empty\n** string or a comment) then *ppStmt is set to NULL.\n** The calling procedure is responsible for deleting the compiled\n** SQL statement using [sqlite3_finalize()] after it has finished with it.\n** ppStmt may not be NULL.\n**\n** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];\n** otherwise an [error code] is returned.\n**\n** The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(),\n** and sqlite3_prepare16_v3() interfaces are recommended for all new programs.\n** The older interfaces (sqlite3_prepare() and sqlite3_prepare16())\n** are retained for backwards compatibility, but their use is discouraged.\n** ^In the \"vX\" interfaces, the prepared statement\n** that is returned (the [sqlite3_stmt] object) contains a copy of the\n** original SQL text. This causes the [sqlite3_step()] interface to\n** behave differently in three ways:\n**\n** <ol>\n** <li>\n** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it\n** always used to do, [sqlite3_step()] will automatically recompile the SQL\n** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY]\n** retries will occur before sqlite3_step() gives up and returns an error.\n** </li>\n**\n** <li>\n** ^When an error occurs, [sqlite3_step()] will return one of the detailed\n** [error codes] or [extended error codes].  ^The legacy behavior was that\n** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code\n** and the application would have to make a second call to [sqlite3_reset()]\n** in order to find the underlying cause of the problem. With the \"v2\" prepare\n** interfaces, the underlying reason for the error is returned immediately.\n** </li>\n**\n** <li>\n** ^If the specific value bound to a [parameter | host parameter] in the\n** WHERE clause might influence the choice of query plan for a statement,\n** then the statement will be automatically recompiled, as if there had been\n** a schema change, on the first [sqlite3_step()] call following any change\n** to the [sqlite3_bind_text | bindings] of that [parameter].\n** ^The specific value of a WHERE-clause [parameter] might influence the\n** choice of query plan if the parameter is the left-hand side of a [LIKE]\n** or [GLOB] operator or if the parameter is compared to an indexed column\n** and the [SQLITE_ENABLE_STAT4] compile-time option is enabled.\n** </li>\n** </ol>\n**\n** <p>^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having\n** the extra prepFlags parameter, which is a bit array consisting of zero or\n** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags.  ^The\n** sqlite3_prepare_v2() interface works exactly the same as\n** sqlite3_prepare_v3() with a zero prepFlags parameter.\n*/\nSQLITE_API int sqlite3_prepare(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare_v2(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare_v3(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16_v2(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16_v3(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\n\n/*\n** CAPI3REF: Retrieving Statement SQL\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8\n** SQL text used to create [prepared statement] P if P was\n** created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()],\n** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].\n** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8\n** string containing the SQL text of prepared statement P with\n** [bound parameters] expanded.\n** ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8\n** string containing the normalized SQL text of prepared statement P.  The\n** semantics used to normalize a SQL statement are unspecified and subject\n** to change.  At a minimum, literal values will be replaced with suitable\n** placeholders.\n**\n** ^(For example, if a prepared statement is created using the SQL\n** text \"SELECT $abc,:xyz\" and if parameter $abc is bound to integer 2345\n** and parameter :xyz is unbound, then sqlite3_sql() will return\n** the original string, \"SELECT $abc,:xyz\" but sqlite3_expanded_sql()\n** will return \"SELECT 2345,NULL\".)^\n**\n** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory\n** is available to hold the result, or if the result would exceed the\n** maximum string length determined by the [SQLITE_LIMIT_LENGTH].\n**\n** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of\n** bound parameter expansions.  ^The [SQLITE_OMIT_TRACE] compile-time\n** option causes sqlite3_expanded_sql() to always return NULL.\n**\n** ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P)\n** are managed by SQLite and are automatically freed when the prepared\n** statement is finalized.\n** ^The string returned by sqlite3_expanded_sql(P), on the other hand,\n** is obtained from [sqlite3_malloc()] and must be freed by the application\n** by passing it to [sqlite3_free()].\n**\n** ^The sqlite3_normalized_sql() interface is only available if\n** the [SQLITE_ENABLE_NORMALIZE] compile-time option is defined.\n*/\nSQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);\nSQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);\n#ifdef SQLITE_ENABLE_NORMALIZE\nSQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);\n#endif\n\n/*\n** CAPI3REF: Determine If An SQL Statement Writes The Database\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if\n** and only if the [prepared statement] X makes no direct changes to\n** the content of the database file.\n**\n** Note that [application-defined SQL functions] or\n** [virtual tables] might change the database indirectly as a side effect.\n** ^(For example, if an application defines a function \"eval()\" that\n** calls [sqlite3_exec()], then the following SQL statement would\n** change the database file through side-effects:\n**\n** <blockquote><pre>\n**    SELECT eval('DELETE FROM t1') FROM t2;\n** </pre></blockquote>\n**\n** But because the [SELECT] statement does not change the database file\n** directly, sqlite3_stmt_readonly() would still return true.)^\n**\n** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK],\n** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true,\n** since the statements themselves do not actually modify the database but\n** rather they control the timing of when other statements modify the\n** database.  ^The [ATTACH] and [DETACH] statements also cause\n** sqlite3_stmt_readonly() to return true since, while those statements\n** change the configuration of a database connection, they do not make\n** changes to the content of the database files on disk.\n** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since\n** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and\n** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so\n** sqlite3_stmt_readonly() returns false for those commands.\n**\n** ^This routine returns false if there is any possibility that the\n** statement might change the database file.  ^A false return does\n** not guarantee that the statement will change the database file.\n** ^For example, an UPDATE statement might have a WHERE clause that\n** makes it a no-op, but the sqlite3_stmt_readonly() result would still\n** be false.  ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a\n** read-only no-op if the table already exists, but\n** sqlite3_stmt_readonly() still returns false for such a statement.\n**\n** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]\n** statement, then sqlite3_stmt_readonly(X) returns the same value as\n** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.\n*/\nSQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the\n** prepared statement S is an EXPLAIN statement, or 2 if the\n** statement S is an EXPLAIN QUERY PLAN.\n** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is\n** an ordinary statement or a NULL pointer.\n*/\nSQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN\n** setting for [prepared statement] S.  If E is zero, then S becomes\n** a normal prepared statement.  If E is 1, then S behaves as if\n** its SQL text began with \"[EXPLAIN]\".  If E is 2, then S behaves as if\n** its SQL text began with \"[EXPLAIN QUERY PLAN]\".\n**\n** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.\n** SQLite tries to avoid a reprepare, but a reprepare might be necessary\n** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.\n**\n** Because of the potential need to reprepare, a call to\n** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be\n** reprepared because it was created using [sqlite3_prepare()] instead of\n** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and\n** hence has no saved SQL text with which to reprepare.\n**\n** Changing the explain setting for a prepared statement does not change\n** the original SQL text for the statement.  Hence, if the SQL text originally\n** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)\n** is called to convert the statement into an ordinary statement, the EXPLAIN\n** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)\n** output, even though the statement now acts like a normal SQL statement.\n**\n** This routine returns SQLITE_OK if the explain mode is successfully\n** changed, or an error code if the explain mode could not be changed.\n** The explain mode cannot be changed while a statement is active.\n** Hence, it is good practice to call [sqlite3_reset(S)]\n** immediately prior to calling sqlite3_stmt_explain(S,E).\n*/\nSQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);\n\n/*\n** CAPI3REF: Determine If A Prepared Statement Has Been Reset\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the\n** [prepared statement] S has been stepped at least once using\n** [sqlite3_step(S)] but has neither run to completion (returned\n** [SQLITE_DONE] from [sqlite3_step(S)]) nor\n** been reset using [sqlite3_reset(S)].  ^The sqlite3_stmt_busy(S)\n** interface returns false if S is a NULL pointer.  If S is not a\n** NULL pointer and is not a pointer to a valid [prepared statement]\n** object, then the behavior is undefined and probably undesirable.\n**\n** This interface can be used in combination [sqlite3_next_stmt()]\n** to locate all prepared statements associated with a database\n** connection that are in need of being reset.  This can be used,\n** for example, in diagnostic routines to search for prepared\n** statements that are holding a transaction open.\n*/\nSQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Dynamically Typed Value Object\n** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}\n**\n** SQLite uses the sqlite3_value object to represent all values\n** that can be stored in a database table. SQLite uses dynamic typing\n** for the values it stores.  ^Values stored in sqlite3_value objects\n** can be integers, floating point values, strings, BLOBs, or NULL.\n**\n** An sqlite3_value object may be either \"protected\" or \"unprotected\".\n** Some interfaces require a protected sqlite3_value.  Other interfaces\n** will accept either a protected or an unprotected sqlite3_value.\n** Every interface that accepts sqlite3_value arguments specifies\n** whether or not it requires a protected sqlite3_value.  The\n** [sqlite3_value_dup()] interface can be used to construct a new\n** protected sqlite3_value from an unprotected sqlite3_value.\n**\n** The terms \"protected\" and \"unprotected\" refer to whether or not\n** a mutex is held.  An internal mutex is held for a protected\n** sqlite3_value object but no mutex is held for an unprotected\n** sqlite3_value object.  If SQLite is compiled to be single-threaded\n** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)\n** or if SQLite is run in one of reduced mutex modes\n** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]\n** then there is no distinction between protected and unprotected\n** sqlite3_value objects and they can be used interchangeably.  However,\n** for maximum code portability it is recommended that applications\n** still make the distinction between protected and unprotected\n** sqlite3_value objects even when not strictly required.\n**\n** ^The sqlite3_value objects that are passed as parameters into the\n** implementation of [application-defined SQL functions] are protected.\n** ^The sqlite3_value objects returned by [sqlite3_vtab_rhs_value()]\n** are protected.\n** ^The sqlite3_value object returned by\n** [sqlite3_column_value()] is unprotected.\n** Unprotected sqlite3_value objects may only be used as arguments\n** to [sqlite3_result_value()], [sqlite3_bind_value()], and\n** [sqlite3_value_dup()].\n** The [sqlite3_value_blob | sqlite3_value_type()] family of\n** interfaces require protected sqlite3_value objects.\n*/\ntypedef struct sqlite3_value sqlite3_value;\n\n/*\n** CAPI3REF: SQL Function Context Object\n**\n** The context in which an SQL function executes is stored in an\n** sqlite3_context object.  ^A pointer to an sqlite3_context object\n** is always the first parameter to [application-defined SQL functions].\n** The application-defined SQL function implementation will pass this\n** pointer through into calls to [sqlite3_result_int | sqlite3_result()],\n** [sqlite3_aggregate_context()], [sqlite3_user_data()],\n** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],\n** and/or [sqlite3_set_auxdata()].\n*/\ntypedef struct sqlite3_context sqlite3_context;\n\n/*\n** CAPI3REF: Binding Values To Prepared Statements\n** KEYWORDS: {host parameter} {host parameters} {host parameter name}\n** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}\n** METHOD: sqlite3_stmt\n**\n** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,\n** literals may be replaced by a [parameter] that matches one of the following\n** templates:\n**\n** <ul>\n** <li>  ?\n** <li>  ?NNN\n** <li>  :VVV\n** <li>  @VVV\n** <li>  $VVV\n** </ul>\n**\n** In the templates above, NNN represents an integer literal,\n** and VVV represents an alphanumeric identifier.)^  ^The values of these\n** parameters (also called \"host parameter names\" or \"SQL parameters\")\n** can be set using the sqlite3_bind_*() routines defined here.\n**\n** ^The first argument to the sqlite3_bind_*() routines is always\n** a pointer to the [sqlite3_stmt] object returned from\n** [sqlite3_prepare_v2()] or its variants.\n**\n** ^The second argument is the index of the SQL parameter to be set.\n** ^The leftmost SQL parameter has an index of 1.  ^When the same named\n** SQL parameter is used more than once, second and subsequent\n** occurrences have the same index as the first occurrence.\n** ^The index for named parameters can be looked up using the\n** [sqlite3_bind_parameter_index()] API if desired.  ^The index\n** for \"?NNN\" parameters is the value of NNN.\n** ^The NNN value must be between 1 and the [sqlite3_limit()]\n** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766).\n**\n** ^The third argument is the value to bind to the parameter.\n** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()\n** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter\n** is ignored and the end result is the same as sqlite3_bind_null().\n** ^If the third parameter to sqlite3_bind_text() is not NULL, then\n** it should be a pointer to well-formed UTF8 text.\n** ^If the third parameter to sqlite3_bind_text16() is not NULL, then\n** it should be a pointer to well-formed UTF16 text.\n** ^If the third parameter to sqlite3_bind_text64() is not NULL, then\n** it should be a pointer to a well-formed unicode string that is\n** either UTF8 if the sixth parameter is SQLITE_UTF8, or UTF16\n** otherwise.\n**\n** [[byte-order determination rules]] ^The byte-order of\n** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)\n** found in the first character, which is removed, or in the absence of a BOM\n** the byte order is the native byte order of the host\n** machine for sqlite3_bind_text16() or the byte order specified in\n** the 6th parameter for sqlite3_bind_text64().)^\n** ^If UTF16 input text contains invalid unicode\n** characters, then SQLite might change those invalid characters\n** into the unicode replacement character: U+FFFD.\n**\n** ^(In those routines that have a fourth argument, its value is the\n** number of bytes in the parameter.  To be clear: the value is the\n** number of <u>bytes</u> in the value, not the number of characters.)^\n** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16()\n** is negative, then the length of the string is\n** the number of bytes up to the first zero terminator.\n** If the fourth parameter to sqlite3_bind_blob() is negative, then\n** the behavior is undefined.\n** If a non-negative fourth parameter is provided to sqlite3_bind_text()\n** or sqlite3_bind_text16() or sqlite3_bind_text64() then\n** that parameter must be the byte offset\n** where the NUL terminator would occur assuming the string were NUL\n** terminated.  If any NUL characters occur at byte offsets less than\n** the value of the fourth parameter then the resulting string value will\n** contain embedded NULs.  The result of expressions involving strings\n** with embedded NULs is undefined.\n**\n** ^The fifth argument to the BLOB and string binding interfaces controls\n** or indicates the lifetime of the object referenced by the third parameter.\n** These three options exist:\n** ^ (1) A destructor to dispose of the BLOB or string after SQLite has finished\n** with it may be passed. ^It is called to dispose of the BLOB or string even\n** if the call to the bind API fails, except the destructor is not called if\n** the third parameter is a NULL pointer or the fourth parameter is negative.\n** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that\n** the application remains responsible for disposing of the object. ^In this\n** case, the object and the provided pointer to it must remain valid until\n** either the prepared statement is finalized or the same SQL parameter is\n** bound to something else, whichever occurs sooner.\n** ^ (3) The constant, [SQLITE_TRANSIENT], may be passed to indicate that the\n** object is to be copied prior to the return from sqlite3_bind_*(). ^The\n** object and pointer to it must remain valid until then. ^SQLite will then\n** manage the lifetime of its private copy.\n**\n** ^The sixth argument to sqlite3_bind_text64() must be one of\n** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]\n** to specify the encoding of the text in the third parameter.  If\n** the sixth argument to sqlite3_bind_text64() is not one of the\n** allowed values shown above, or if the text encoding is different\n** from the encoding specified by the sixth parameter, then the behavior\n** is undefined.\n**\n** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that\n** is filled with zeroes.  ^A zeroblob uses a fixed amount of memory\n** (just an integer to hold its size) while it is being processed.\n** Zeroblobs are intended to serve as placeholders for BLOBs whose\n** content is later written using\n** [sqlite3_blob_open | incremental BLOB I/O] routines.\n** ^A negative value for the zeroblob results in a zero-length BLOB.\n**\n** ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in\n** [prepared statement] S to have an SQL value of NULL, but to also be\n** associated with the pointer P of type T.  ^D is either a NULL pointer or\n** a pointer to a destructor function for P. ^SQLite will invoke the\n** destructor D with a single argument of P when it is finished using\n** P, even if the call to sqlite3_bind_pointer() fails.  Due to a\n** historical design quirk, results are undefined if D is\n** SQLITE_TRANSIENT. The T parameter should be a static string,\n** preferably a string literal. The sqlite3_bind_pointer() routine is\n** part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer\n** for the [prepared statement] or with a prepared statement for which\n** [sqlite3_step()] has been called more recently than [sqlite3_reset()],\n** then the call will return [SQLITE_MISUSE].  If any sqlite3_bind_()\n** routine is passed a [prepared statement] that has been finalized, the\n** result is undefined and probably harmful.\n**\n** ^Bindings are not cleared by the [sqlite3_reset()] routine.\n** ^Unbound parameters are interpreted as NULL.\n**\n** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an\n** [error code] if anything goes wrong.\n** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB\n** exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or\n** [SQLITE_MAX_LENGTH].\n** ^[SQLITE_RANGE] is returned if the parameter\n** index is out of range.  ^[SQLITE_NOMEM] is returned if malloc() fails.\n**\n** See also: [sqlite3_bind_parameter_count()],\n** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));\nSQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,\n                        void(*)(void*));\nSQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);\nSQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);\nSQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);\nSQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);\nSQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));\nSQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));\nSQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,\n                         void(*)(void*), unsigned char encoding);\nSQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);\nSQLITE_API int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*,void(*)(void*));\nSQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);\nSQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);\n\n/*\n** CAPI3REF: Number Of SQL Parameters\n** METHOD: sqlite3_stmt\n**\n** ^This routine can be used to find the number of [SQL parameters]\n** in a [prepared statement].  SQL parameters are tokens of the\n** form \"?\", \"?NNN\", \":AAA\", \"$AAA\", or \"@AAA\" that serve as\n** placeholders for values that are [sqlite3_bind_blob | bound]\n** to the parameters at a later time.\n**\n** ^(This routine actually returns the index of the largest (rightmost)\n** parameter. For all forms except ?NNN, this will correspond to the\n** number of unique parameters.  If parameters of the ?NNN form are used,\n** there may be gaps in the list.)^\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_name()], and\n** [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Name Of A Host Parameter\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_bind_parameter_name(P,N) interface returns\n** the name of the N-th [SQL parameter] in the [prepared statement] P.\n** ^(SQL parameters of the form \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n** have a name which is the string \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n** respectively.\n** In other words, the initial \":\" or \"$\" or \"@\" or \"?\"\n** is included as part of the name.)^\n** ^Parameters of the form \"?\" without a following integer have no name\n** and are referred to as \"nameless\" or \"anonymous parameters\".\n**\n** ^The first host parameter has an index of 1, not 0.\n**\n** ^If the value N is out of range or if the N-th parameter is\n** nameless, then NULL is returned.  ^The returned string is\n** always in UTF-8 encoding even if the named parameter was\n** originally specified as UTF-16 in [sqlite3_prepare16()],\n** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_count()], and\n** [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);\n\n/*\n** CAPI3REF: Index Of A Parameter With A Given Name\n** METHOD: sqlite3_stmt\n**\n** ^Return the index of an SQL parameter given its name.  ^The\n** index value returned is suitable for use as the second\n** parameter to [sqlite3_bind_blob|sqlite3_bind()].  ^A zero\n** is returned if no matching parameter is found.  ^The parameter\n** name must be given in UTF-8 even if the original statement\n** was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or\n** [sqlite3_prepare16_v3()].\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_count()], and\n** [sqlite3_bind_parameter_name()].\n*/\nSQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);\n\n/*\n** CAPI3REF: Reset All Bindings On A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset\n** the [sqlite3_bind_blob | bindings] on a [prepared statement].\n** ^Use this routine to reset all host parameters to NULL.\n*/\nSQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Number Of Columns In A Result Set\n** METHOD: sqlite3_stmt\n**\n** ^Return the number of columns in the result set returned by the\n** [prepared statement]. ^If this routine returns 0, that means the\n** [prepared statement] returns no data (for example an [UPDATE]).\n** ^However, just because this routine returns a positive number does not\n** mean that one or more rows of data will be returned.  ^A SELECT statement\n** will always have a positive sqlite3_column_count() but depending on the\n** WHERE clause constraints and the table content, it might return no rows.\n**\n** See also: [sqlite3_data_count()]\n*/\nSQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Column Names In A Result Set\n** METHOD: sqlite3_stmt\n**\n** ^These routines return the name assigned to a particular column\n** in the result set of a [SELECT] statement.  ^The sqlite3_column_name()\n** interface returns a pointer to a zero-terminated UTF-8 string\n** and sqlite3_column_name16() returns a pointer to a zero-terminated\n** UTF-16 string.  ^The first parameter is the [prepared statement]\n** that implements the [SELECT] statement. ^The second parameter is the\n** column number.  ^The leftmost column is number 0.\n**\n** ^The returned string pointer is valid until either the [prepared statement]\n** is destroyed by [sqlite3_finalize()] or until the statement is automatically\n** reprepared by the first call to [sqlite3_step()] for a particular run\n** or until the next call to\n** sqlite3_column_name() or sqlite3_column_name16() on the same column.\n**\n** ^If sqlite3_malloc() fails during the processing of either routine\n** (for example during a conversion from UTF-8 to UTF-16) then a\n** NULL pointer is returned.\n**\n** ^The name of a result column is the value of the \"AS\" clause for\n** that column, if there is an AS clause.  If there is no AS clause\n** then the name of the column is unspecified and may change from\n** one release of SQLite to the next.\n*/\nSQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);\nSQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);\n\n/*\n** CAPI3REF: Source Of Data In A Query Result\n** METHOD: sqlite3_stmt\n**\n** ^These routines provide a means to determine the database, table, and\n** table column that is the origin of a particular result column in a\n** [SELECT] statement.\n** ^The name of the database or table or column can be returned as\n** either a UTF-8 or UTF-16 string.  ^The _database_ routines return\n** the database name, the _table_ routines return the table name, and\n** the origin_ routines return the column name.\n** ^The returned string is valid until the [prepared statement] is destroyed\n** using [sqlite3_finalize()] or until the statement is automatically\n** reprepared by the first call to [sqlite3_step()] for a particular run\n** or until the same information is requested\n** again in a different encoding.\n**\n** ^The names returned are the original un-aliased names of the\n** database, table, and column.\n**\n** ^The first argument to these interfaces is a [prepared statement].\n** ^These functions return information about the Nth result column returned by\n** the statement, where N is the second function argument.\n** ^The left-most column is column 0 for these routines.\n**\n** ^If the Nth column returned by the statement is an expression or\n** subquery and is not a column value, then all of these functions return\n** NULL.  ^These routines might also return NULL if a memory allocation error\n** occurs.  ^Otherwise, they return the name of the attached database, table,\n** or column that query result column was extracted from.\n**\n** ^As with all other SQLite APIs, those whose names end with \"16\" return\n** UTF-16 encoded strings and the other functions return UTF-8.\n**\n** ^These APIs are only available if the library was compiled with the\n** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.\n**\n** If two or more threads call one or more\n** [sqlite3_column_database_name | column metadata interfaces]\n** for the same [prepared statement] and result column\n** at the same time then the results are undefined.\n*/\nSQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);\nSQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);\nSQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);\n\n/*\n** CAPI3REF: Declared Datatype Of A Query Result\n** METHOD: sqlite3_stmt\n**\n** ^(The first parameter is a [prepared statement].\n** If this statement is a [SELECT] statement and the Nth column of the\n** returned result set of that [SELECT] is a table column (not an\n** expression or subquery) then the declared type of the table\n** column is returned.)^  ^If the Nth column of the result set is an\n** expression or subquery, then a NULL pointer is returned.\n** ^The returned string is always UTF-8 encoded.\n**\n** ^(For example, given the database schema:\n**\n** CREATE TABLE t1(c1 VARIANT);\n**\n** and the following statement to be compiled:\n**\n** SELECT c1 + 1, c1 FROM t1;\n**\n** this routine would return the string \"VARIANT\" for the second result\n** column (i==1), and a NULL pointer for the first result column (i==0).)^\n**\n** ^SQLite uses dynamic run-time typing.  ^So just because a column\n** is declared to contain a particular type does not mean that the\n** data stored in that column is of the declared type.  SQLite is\n** strongly typed, but the typing is dynamic not static.  ^Type\n** is associated with individual values, not with the containers\n** used to hold those values.\n*/\nSQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);\n\n/*\n** CAPI3REF: Evaluate An SQL Statement\n** METHOD: sqlite3_stmt\n**\n** After a [prepared statement] has been prepared using any of\n** [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()],\n** or [sqlite3_prepare16_v3()] or one of the legacy\n** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function\n** must be called one or more times to evaluate the statement.\n**\n** The details of the behavior of the sqlite3_step() interface depend\n** on whether the statement was prepared using the newer \"vX\" interfaces\n** [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()],\n** [sqlite3_prepare16_v2()] or the older legacy\n** interfaces [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the\n** new \"vX\" interface is recommended for new applications but the legacy\n** interface will continue to be supported.\n**\n** ^In the legacy interface, the return value will be either [SQLITE_BUSY],\n** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].\n** ^With the \"v2\" interface, any of the other [result codes] or\n** [extended result codes] might be returned as well.\n**\n** ^[SQLITE_BUSY] means that the database engine was unable to acquire the\n** database locks it needs to do its job.  ^If the statement is a [COMMIT]\n** or occurs outside of an explicit transaction, then you can retry the\n** statement.  If the statement is not a [COMMIT] and occurs within an\n** explicit transaction then you should rollback the transaction before\n** continuing.\n**\n** ^[SQLITE_DONE] means that the statement has finished executing\n** successfully.  sqlite3_step() should not be called again on this virtual\n** machine without first calling [sqlite3_reset()] to reset the virtual\n** machine back to its initial state.\n**\n** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]\n** is returned each time a new row of data is ready for processing by the\n** caller. The values may be accessed using the [column access functions].\n** sqlite3_step() is called again to retrieve the next row of data.\n**\n** ^[SQLITE_ERROR] means that a run-time error (such as a constraint\n** violation) has occurred.  sqlite3_step() should not be called again on\n** the VM. More information may be found by calling [sqlite3_errmsg()].\n** ^With the legacy interface, a more specific error code (for example,\n** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)\n** can be obtained by calling [sqlite3_reset()] on the\n** [prepared statement].  ^In the \"v2\" interface,\n** the more specific error code is returned directly by sqlite3_step().\n**\n** [SQLITE_MISUSE] means that the this routine was called inappropriately.\n** Perhaps it was called on a [prepared statement] that has\n** already been [sqlite3_finalize | finalized] or on one that had\n** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could\n** be the case that the same database connection is being used by two or\n** more threads at the same moment in time.\n**\n** For all versions of SQLite up to and including 3.6.23.1, a call to\n** [sqlite3_reset()] was required after sqlite3_step() returned anything\n** other than [SQLITE_ROW] before any subsequent invocation of\n** sqlite3_step().  Failure to reset the prepared statement using\n** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from\n** sqlite3_step().  But after [version 3.6.23.1] ([dateof:3.6.23.1]),\n** sqlite3_step() began\n** calling [sqlite3_reset()] automatically in this circumstance rather\n** than returning [SQLITE_MISUSE].  This is not considered a compatibility\n** break because any application that ever receives an SQLITE_MISUSE error\n** is broken by definition.  The [SQLITE_OMIT_AUTORESET] compile-time option\n** can be used to restore the legacy behavior.\n**\n** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()\n** API always returns a generic error code, [SQLITE_ERROR], following any\n** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call\n** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the\n** specific [error codes] that better describes the error.\n** We admit that this is a goofy design.  The problem has been fixed\n** with the \"v2\" interface.  If you prepare all of your SQL statements\n** using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()]\n** or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead\n** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,\n** then the more specific [error codes] are returned directly\n** by sqlite3_step().  The use of the \"vX\" interfaces is recommended.\n*/\nSQLITE_API int sqlite3_step(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Number of columns in a result set\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_data_count(P) interface returns the number of columns in the\n** current row of the result set of [prepared statement] P.\n** ^If prepared statement P does not have results ready to return\n** (via calls to the [sqlite3_column_int | sqlite3_column()] family of\n** interfaces) then sqlite3_data_count(P) returns 0.\n** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.\n** ^The sqlite3_data_count(P) routine returns 0 if the previous call to\n** [sqlite3_step](P) returned [SQLITE_DONE].  ^The sqlite3_data_count(P)\n** will return non-zero if previous call to [sqlite3_step](P) returned\n** [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum]\n** where it always returns zero since each step of that multi-step\n** pragma returns 0 columns of data.\n**\n** See also: [sqlite3_column_count()]\n*/\nSQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Fundamental Datatypes\n** KEYWORDS: SQLITE_TEXT\n**\n** ^(Every value in SQLite has one of five fundamental datatypes:\n**\n** <ul>\n** <li> 64-bit signed integer\n** <li> 64-bit IEEE floating point number\n** <li> string\n** <li> BLOB\n** <li> NULL\n** </ul>)^\n**\n** These constants are codes for each of those types.\n**\n** Note that the SQLITE_TEXT constant was also used in SQLite version 2\n** for a completely different meaning.  Software that links against both\n** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not\n** SQLITE_TEXT.\n*/\n#define SQLITE_INTEGER  1\n#define SQLITE_FLOAT    2\n#define SQLITE_BLOB     4\n#define SQLITE_NULL     5\n#ifdef SQLITE_TEXT\n# undef SQLITE_TEXT\n#else\n# define SQLITE_TEXT     3\n#endif\n#define SQLITE3_TEXT     3\n\n/*\n** CAPI3REF: Result Values From A Query\n** KEYWORDS: {column access functions}\n** METHOD: sqlite3_stmt\n**\n** <b>Summary:</b>\n** <blockquote><table border=0 cellpadding=0 cellspacing=0>\n** <tr><td><b>sqlite3_column_blob</b><td>&rarr;<td>BLOB result\n** <tr><td><b>sqlite3_column_double</b><td>&rarr;<td>REAL result\n** <tr><td><b>sqlite3_column_int</b><td>&rarr;<td>32-bit INTEGER result\n** <tr><td><b>sqlite3_column_int64</b><td>&rarr;<td>64-bit INTEGER result\n** <tr><td><b>sqlite3_column_text</b><td>&rarr;<td>UTF-8 TEXT result\n** <tr><td><b>sqlite3_column_text16</b><td>&rarr;<td>UTF-16 TEXT result\n** <tr><td><b>sqlite3_column_value</b><td>&rarr;<td>The result as an\n** [sqlite3_value|unprotected sqlite3_value] object.\n** <tr><td>&nbsp;<td>&nbsp;<td>&nbsp;\n** <tr><td><b>sqlite3_column_bytes</b><td>&rarr;<td>Size of a BLOB\n** or a UTF-8 TEXT result in bytes\n** <tr><td><b>sqlite3_column_bytes16&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Size of UTF-16\n** TEXT in bytes\n** <tr><td><b>sqlite3_column_type</b><td>&rarr;<td>Default\n** datatype of the result\n** </table></blockquote>\n**\n** <b>Details:</b>\n**\n** ^These routines return information about a single column of the current\n** result row of a query.  ^In every case the first argument is a pointer\n** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]\n** that was returned from [sqlite3_prepare_v2()] or one of its variants)\n** and the second argument is the index of the column for which information\n** should be returned. ^The leftmost column of the result set has the index 0.\n** ^The number of columns in the result can be determined using\n** [sqlite3_column_count()].\n**\n** If the SQL statement does not currently point to a valid row, or if the\n** column index is out of range, the result is undefined.\n** These routines may only be called when the most recent call to\n** [sqlite3_step()] has returned [SQLITE_ROW] and neither\n** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.\n** If any of these routines are called after [sqlite3_reset()] or\n** [sqlite3_finalize()] or after [sqlite3_step()] has returned\n** something other than [SQLITE_ROW], the results are undefined.\n** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]\n** are called from a different thread while any of these routines\n** are pending, then the results are undefined.\n**\n** The first six interfaces (_blob, _double, _int, _int64, _text, and _text16)\n** each return the value of a result column in a specific data format.  If\n** the result column is not initially in the requested format (for example,\n** if the query returns an integer but the sqlite3_column_text() interface\n** is used to extract the value) then an automatic type conversion is performed.\n**\n** ^The sqlite3_column_type() routine returns the\n** [SQLITE_INTEGER | datatype code] for the initial data type\n** of the result column.  ^The returned value is one of [SQLITE_INTEGER],\n** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].\n** The return value of sqlite3_column_type() can be used to decide which\n** of the first six interface should be used to extract the column value.\n** The value returned by sqlite3_column_type() is only meaningful if no\n** automatic type conversions have occurred for the value in question.\n** After a type conversion, the result of calling sqlite3_column_type()\n** is undefined, though harmless.  Future\n** versions of SQLite may change the behavior of sqlite3_column_type()\n** following a type conversion.\n**\n** If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes()\n** or sqlite3_column_bytes16() interfaces can be used to determine the size\n** of that BLOB or string.\n**\n** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()\n** routine returns the number of bytes in that BLOB or string.\n** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts\n** the string to UTF-8 and then returns the number of bytes.\n** ^If the result is a numeric value then sqlite3_column_bytes() uses\n** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns\n** the number of bytes in that string.\n** ^If the result is NULL, then sqlite3_column_bytes() returns zero.\n**\n** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()\n** routine returns the number of bytes in that BLOB or string.\n** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts\n** the string to UTF-16 and then returns the number of bytes.\n** ^If the result is a numeric value then sqlite3_column_bytes16() uses\n** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns\n** the number of bytes in that string.\n** ^If the result is NULL, then sqlite3_column_bytes16() returns zero.\n**\n** ^The values returned by [sqlite3_column_bytes()] and\n** [sqlite3_column_bytes16()] do not include the zero terminators at the end\n** of the string.  ^For clarity: the values returned by\n** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of\n** bytes in the string, not the number of characters.\n**\n** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),\n** even empty strings, are always zero-terminated.  ^The return\n** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.\n**\n** ^Strings returned by sqlite3_column_text16() always have the endianness\n** which is native to the platform, regardless of the text encoding set\n** for the database.\n**\n** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an\n** [unprotected sqlite3_value] object.  In a multithreaded environment,\n** an unprotected sqlite3_value object may only be used safely with\n** [sqlite3_bind_value()] and [sqlite3_result_value()].\n** If the [unprotected sqlite3_value] object returned by\n** [sqlite3_column_value()] is used in any other way, including calls\n** to routines like [sqlite3_value_int()], [sqlite3_value_text()],\n** or [sqlite3_value_bytes()], the behavior is not threadsafe.\n** Hence, the sqlite3_column_value() interface\n** is normally only useful within the implementation of\n** [application-defined SQL functions] or [virtual tables], not within\n** top-level application code.\n**\n** These routines may attempt to convert the datatype of the result.\n** ^For example, if the internal representation is FLOAT and a text result\n** is requested, [sqlite3_snprintf()] is used internally to perform the\n** conversion automatically.  ^(The following table details the conversions\n** that are applied:\n**\n** <blockquote>\n** <table border=\"1\">\n** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion\n**\n** <tr><td>  NULL    <td> INTEGER   <td> Result is 0\n** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0\n** <tr><td>  NULL    <td>   TEXT    <td> Result is a NULL pointer\n** <tr><td>  NULL    <td>   BLOB    <td> Result is a NULL pointer\n** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float\n** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer\n** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT\n** <tr><td>  FLOAT   <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float\n** <tr><td>  FLOAT   <td>   BLOB    <td> [CAST] to BLOB\n** <tr><td>  TEXT    <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  TEXT    <td>  FLOAT    <td> [CAST] to REAL\n** <tr><td>  TEXT    <td>   BLOB    <td> No change\n** <tr><td>  BLOB    <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  BLOB    <td>  FLOAT    <td> [CAST] to REAL\n** <tr><td>  BLOB    <td>   TEXT    <td> [CAST] to TEXT, ensure zero terminator\n** </table>\n** </blockquote>)^\n**\n** Note that when type conversions occur, pointers returned by prior\n** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or\n** sqlite3_column_text16() may be invalidated.\n** Type conversions and pointer invalidations might occur\n** in the following cases:\n**\n** <ul>\n** <li> The initial content is a BLOB and sqlite3_column_text() or\n**      sqlite3_column_text16() is called.  A zero-terminator might\n**      need to be added to the string.</li>\n** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or\n**      sqlite3_column_text16() is called.  The content must be converted\n**      to UTF-16.</li>\n** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or\n**      sqlite3_column_text() is called.  The content must be converted\n**      to UTF-8.</li>\n** </ul>\n**\n** ^Conversions between UTF-16be and UTF-16le are always done in place and do\n** not invalidate a prior pointer, though of course the content of the buffer\n** that the prior pointer references will have been modified.  Other kinds\n** of conversion are done in place when it is possible, but sometimes they\n** are not possible and in those cases prior pointers are invalidated.\n**\n** The safest policy is to invoke these routines\n** in one of the following ways:\n**\n** <ul>\n**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>\n**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>\n**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>\n** </ul>\n**\n** In other words, you should call sqlite3_column_text(),\n** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result\n** into the desired format, then invoke sqlite3_column_bytes() or\n** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls\n** to sqlite3_column_text() or sqlite3_column_blob() with calls to\n** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()\n** with calls to sqlite3_column_bytes().\n**\n** ^The pointers returned are valid until a type conversion occurs as\n** described above, or until [sqlite3_step()] or [sqlite3_reset()] or\n** [sqlite3_finalize()] is called.  ^The memory space used to hold strings\n** and BLOBs is freed automatically.  Do not pass the pointers returned\n** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into\n** [sqlite3_free()].\n**\n** As long as the input parameters are correct, these routines will only\n** fail if an out-of-memory error occurs during a format conversion.\n** Only the following subset of interfaces are subject to out-of-memory\n** errors:\n**\n** <ul>\n** <li> sqlite3_column_blob()\n** <li> sqlite3_column_text()\n** <li> sqlite3_column_text16()\n** <li> sqlite3_column_bytes()\n** <li> sqlite3_column_bytes16()\n** </ul>\n**\n** If an out-of-memory error occurs, then the return value from these\n** routines is the same as if the column had contained an SQL NULL value.\n** Valid SQL NULL returns can be distinguished from out-of-memory errors\n** by invoking the [sqlite3_errcode()] immediately after the suspect\n** return value is obtained and before any\n** other SQLite interface is called on the same [database connection].\n*/\nSQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);\nSQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);\nSQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);\nSQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);\nSQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);\nSQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);\n\n/*\n** CAPI3REF: Destroy A Prepared Statement Object\n** DESTRUCTOR: sqlite3_stmt\n**\n** ^The sqlite3_finalize() function is called to delete a [prepared statement].\n** ^If the most recent evaluation of the statement encountered no errors\n** or if the statement has never been evaluated, then sqlite3_finalize() returns\n** SQLITE_OK.  ^If the most recent evaluation of statement S failed, then\n** sqlite3_finalize(S) returns the appropriate [error code] or\n** [extended error code].\n**\n** ^The sqlite3_finalize(S) routine can be called at any point during\n** the life cycle of [prepared statement] S:\n** before statement S is ever evaluated, after\n** one or more calls to [sqlite3_reset()], or after any call\n** to [sqlite3_step()] regardless of whether or not the statement has\n** completed execution.\n**\n** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.\n**\n** The application must finalize every [prepared statement] in order to avoid\n** resource leaks.  It is a grievous error for the application to try to use\n** a prepared statement after it has been finalized.  Any use of a prepared\n** statement after it has been finalized can result in undefined and\n** undesirable behavior such as segfaults and heap corruption.\n*/\nSQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Reset A Prepared Statement Object\n** METHOD: sqlite3_stmt\n**\n** The sqlite3_reset() function is called to reset a [prepared statement]\n** object back to its initial state, ready to be re-executed.\n** ^Any SQL statement variables that had values bound to them using\n** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.\n** Use [sqlite3_clear_bindings()] to reset the bindings.\n**\n** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S\n** back to the beginning of its program.\n**\n** ^The return code from [sqlite3_reset(S)] indicates whether or not\n** the previous evaluation of prepared statement S completed successfully.\n** ^If [sqlite3_step(S)] has never before been called on S or if\n** [sqlite3_step(S)] has not been called since the previous call\n** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return\n** [SQLITE_OK].\n**\n** ^If the most recent call to [sqlite3_step(S)] for the\n** [prepared statement] S indicated an error, then\n** [sqlite3_reset(S)] returns an appropriate [error code].\n** ^The [sqlite3_reset(S)] interface might also return an [error code]\n** if there were no prior errors but the process of resetting\n** the prepared statement caused a new error. ^For example, if an\n** [INSERT] statement with a [RETURNING] clause is only stepped one time,\n** that one call to [sqlite3_step(S)] might return SQLITE_ROW but\n** the overall statement might still fail and the [sqlite3_reset(S)] call\n** might return SQLITE_BUSY if locking constraints prevent the\n** database change from committing.  Therefore, it is important that\n** applications check the return code from [sqlite3_reset(S)] even if\n** no prior call to [sqlite3_step(S)] indicated a problem.\n**\n** ^The [sqlite3_reset(S)] interface does not change the values\n** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.\n*/\nSQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);\n\n\n/*\n** CAPI3REF: Create Or Redefine SQL Functions\n** KEYWORDS: {function creation routines}\n** METHOD: sqlite3\n**\n** ^These functions (collectively known as \"function creation routines\")\n** are used to add SQL functions or aggregates or to redefine the behavior\n** of existing SQL functions or aggregates. The only differences between\n** the three \"sqlite3_create_function*\" routines are the text encoding\n** expected for the second parameter (the name of the function being\n** created) and the presence or absence of a destructor callback for\n** the application data pointer. Function sqlite3_create_window_function()\n** is similar, but allows the user to supply the extra callback functions\n** needed by [aggregate window functions].\n**\n** ^The first parameter is the [database connection] to which the SQL\n** function is to be added.  ^If an application uses more than one database\n** connection then application-defined SQL functions must be added\n** to each database connection separately.\n**\n** ^The second parameter is the name of the SQL function to be created or\n** redefined.  ^The length of the name is limited to 255 bytes in a UTF-8\n** representation, exclusive of the zero-terminator.  ^Note that the name\n** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.\n** ^Any attempt to create a function with a longer name\n** will result in [SQLITE_MISUSE] being returned.\n**\n** ^The third parameter (nArg)\n** is the number of arguments that the SQL function or\n** aggregate takes. ^If this parameter is -1, then the SQL function or\n** aggregate may take any number of arguments between 0 and the limit\n** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third\n** parameter is less than -1 or greater than 127 then the behavior is\n** undefined.\n**\n** ^The fourth parameter, eTextRep, specifies what\n** [SQLITE_UTF8 | text encoding] this SQL function prefers for\n** its parameters.  The application should set this parameter to\n** [SQLITE_UTF16LE] if the function implementation invokes\n** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the\n** implementation invokes [sqlite3_value_text16be()] on an input, or\n** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8]\n** otherwise.  ^The same SQL function may be registered multiple times using\n** different preferred text encodings, with different implementations for\n** each encoding.\n** ^When multiple implementations of the same function are available, SQLite\n** will pick the one that involves the least amount of data conversion.\n**\n** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]\n** to signal that the function will always return the same result given\n** the same inputs within a single SQL statement.  Most SQL functions are\n** deterministic.  The built-in [random()] SQL function is an example of a\n** function that is not deterministic.  The SQLite query planner is able to\n** perform additional optimizations on deterministic functions, so use\n** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.\n**\n** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]\n** flag, which if present prevents the function from being invoked from\n** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,\n** index expressions, or the WHERE clause of partial indexes.\n**\n** For best security, the [SQLITE_DIRECTONLY] flag is recommended for\n** all application-defined SQL functions that do not need to be\n** used inside of triggers, views, CHECK constraints, or other elements of\n** the database schema.  This flag is especially recommended for SQL\n** functions that have side effects or reveal internal application state.\n** Without this flag, an attacker might be able to modify the schema of\n** a database file to include invocations of the function with parameters\n** chosen by the attacker, which the application will then execute when\n** the database file is opened and read.\n**\n** ^(The fifth parameter is an arbitrary pointer.  The implementation of the\n** function can gain access to this pointer using [sqlite3_user_data()].)^\n**\n** ^The sixth, seventh and eighth parameters passed to the three\n** \"sqlite3_create_function*\" functions, xFunc, xStep and xFinal, are\n** pointers to C-language functions that implement the SQL function or\n** aggregate. ^A scalar SQL function requires an implementation of the xFunc\n** callback only; NULL pointers must be passed as the xStep and xFinal\n** parameters. ^An aggregate SQL function requires an implementation of xStep\n** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing\n** SQL function or aggregate, pass NULL pointers for all three function\n** callbacks.\n**\n** ^The sixth, seventh, eighth and ninth parameters (xStep, xFinal, xValue\n** and xInverse) passed to sqlite3_create_window_function are pointers to\n** C-language callbacks that implement the new function. xStep and xFinal\n** must both be non-NULL. xValue and xInverse may either both be NULL, in\n** which case a regular aggregate function is created, or must both be\n** non-NULL, in which case the new function may be used as either an aggregate\n** or aggregate window function. More details regarding the implementation\n** of aggregate window functions are\n** [user-defined window functions|available here].\n**\n** ^(If the final parameter to sqlite3_create_function_v2() or\n** sqlite3_create_window_function() is not NULL, then it is the destructor for\n** the application data pointer. The destructor is invoked when the function\n** is deleted, either by being overloaded or when the database connection\n** closes.)^ ^The destructor is also invoked if the call to\n** sqlite3_create_function_v2() fails.  ^When the destructor callback is\n** invoked, it is passed a single argument which is a copy of the application\n** data pointer which was the fifth parameter to sqlite3_create_function_v2().\n**\n** ^It is permitted to register multiple implementations of the same\n** functions with the same name but with either differing numbers of\n** arguments or differing preferred text encodings.  ^SQLite will use\n** the implementation that most closely matches the way in which the\n** SQL function is used.  ^A function implementation with a non-negative\n** nArg parameter is a better match than a function implementation with\n** a negative nArg.  ^A function where the preferred text encoding\n** matches the database encoding is a better\n** match than a function where the encoding is different.\n** ^A function where the encoding difference is between UTF16le and UTF16be\n** is a closer match than a function where the encoding difference is\n** between UTF8 and UTF16.\n**\n** ^Built-in functions may be overloaded by new application-defined functions.\n**\n** ^An application-defined function is permitted to call other\n** SQLite interfaces.  However, such calls must not\n** close the database connection nor finalize or reset the prepared\n** statement in which the function is running.\n*/\nSQLITE_API int sqlite3_create_function(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n);\nSQLITE_API int sqlite3_create_function16(\n  sqlite3 *db,\n  const void *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n);\nSQLITE_API int sqlite3_create_function_v2(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*),\n  void(*xDestroy)(void*)\n);\nSQLITE_API int sqlite3_create_window_function(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*),\n  void (*xValue)(sqlite3_context*),\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value**),\n  void(*xDestroy)(void*)\n);\n\n/*\n** CAPI3REF: Text Encodings\n**\n** These constants define integer codes that represent the various\n** text encodings supported by SQLite.\n*/\n#define SQLITE_UTF8           1    /* IMP: R-37514-35566 */\n#define SQLITE_UTF16LE        2    /* IMP: R-03371-37637 */\n#define SQLITE_UTF16BE        3    /* IMP: R-51971-34154 */\n#define SQLITE_UTF16          4    /* Use native byte order */\n#define SQLITE_ANY            5    /* Deprecated */\n#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */\n\n/*\n** CAPI3REF: Function Flags\n**\n** These constants may be ORed together with the\n** [SQLITE_UTF8 | preferred text encoding] as the fourth argument\n** to [sqlite3_create_function()], [sqlite3_create_function16()], or\n** [sqlite3_create_function_v2()].\n**\n** <dl>\n** [[SQLITE_DETERMINISTIC]] <dt>SQLITE_DETERMINISTIC</dt><dd>\n** The SQLITE_DETERMINISTIC flag means that the new function always gives\n** the same output when the input parameters are the same.\n** The [abs|abs() function] is deterministic, for example, but\n** [randomblob|randomblob()] is not.  Functions must\n** be deterministic in order to be used in certain contexts such as\n** with the WHERE clause of [partial indexes] or in [generated columns].\n** SQLite might also optimize deterministic functions by factoring them\n** out of inner loops.\n** </dd>\n**\n** [[SQLITE_DIRECTONLY]] <dt>SQLITE_DIRECTONLY</dt><dd>\n** The SQLITE_DIRECTONLY flag means that the function may only be invoked\n** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in\n** schema structures such as [CHECK constraints], [DEFAULT clauses],\n** [expression indexes], [partial indexes], or [generated columns].\n** <p>\n** The SQLITE_DIRECTONLY flag is recommended for any\n** [application-defined SQL function]\n** that has side-effects or that could potentially leak sensitive information.\n** This will prevent attacks in which an application is tricked\n** into using a database file that has had its schema surreptitiously\n** modified to invoke the application-defined function in ways that are\n** harmful.\n** <p>\n** Some people say it is good practice to set SQLITE_DIRECTONLY on all\n** [application-defined SQL functions], regardless of whether or not they\n** are security sensitive, as doing so prevents those functions from being used\n** inside of the database schema, and thus ensures that the database\n** can be inspected and modified using generic tools (such as the [CLI])\n** that do not have access to the application-defined functions.\n** </dd>\n**\n** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd>\n** The SQLITE_INNOCUOUS flag means that the function is unlikely\n** to cause problems even if misused.  An innocuous function should have\n** no side effects and should not depend on any values other than its\n** input parameters. The [abs|abs() function] is an example of an\n** innocuous function.\n** The [load_extension() SQL function] is not innocuous because of its\n** side effects.\n** <p> SQLITE_INNOCUOUS is similar to SQLITE_DETERMINISTIC, but is not\n** exactly the same.  The [random|random() function] is an example of a\n** function that is innocuous but not deterministic.\n** <p>Some heightened security settings\n** ([SQLITE_DBCONFIG_TRUSTED_SCHEMA] and [PRAGMA trusted_schema=OFF])\n** disable the use of SQL functions inside views and triggers and in\n** schema structures such as [CHECK constraints], [DEFAULT clauses],\n** [expression indexes], [partial indexes], and [generated columns] unless\n** the function is tagged with SQLITE_INNOCUOUS.  Most built-in functions\n** are innocuous.  Developers are advised to avoid using the\n** SQLITE_INNOCUOUS flag for application-defined functions unless the\n** function has been carefully audited and found to be free of potentially\n** security-adverse side-effects and information-leaks.\n** </dd>\n**\n** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd>\n** The SQLITE_SUBTYPE flag indicates to SQLite that a function might call\n** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.\n** This flag instructs SQLite to omit some corner-case optimizations that\n** might disrupt the operation of the [sqlite3_value_subtype()] function,\n** causing it to return zero rather than the correct subtype().\n** All SQL functions that invoke [sqlite3_value_subtype()] should have this\n** property.  If the SQLITE_SUBTYPE property is omitted, then the return\n** value from [sqlite3_value_subtype()] might sometimes be zero even though\n** a non-zero subtype was specified by the function argument expression.\n**\n** [[SQLITE_RESULT_SUBTYPE]] <dt>SQLITE_RESULT_SUBTYPE</dt><dd>\n** The SQLITE_RESULT_SUBTYPE flag indicates to SQLite that a function might call\n** [sqlite3_result_subtype()] to cause a sub-type to be associated with its\n** result.\n** Every function that invokes [sqlite3_result_subtype()] should have this\n** property.  If it does not, then the call to [sqlite3_result_subtype()]\n** might become a no-op if the function is used as a term in an\n** [expression index].  On the other hand, SQL functions that never invoke\n** [sqlite3_result_subtype()] should avoid setting this property, as the\n** purpose of this property is to disable certain optimizations that are\n** incompatible with subtypes.\n**\n** [[SQLITE_SELFORDER1]] <dt>SQLITE_SELFORDER1</dt><dd>\n** The SQLITE_SELFORDER1 flag indicates that the function is an aggregate\n** that internally orders the values provided to the first argument.  The\n** ordered-set aggregate SQL notation with a single ORDER BY term can be\n** used to invoke this function.  If the ordered-set aggregate notation is\n** used on a function that lacks this flag, then an error is raised. Note\n** that the ordered-set aggregate syntax is only available if SQLite is\n** built using the -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES compile-time option.\n** </dd>\n** </dl>\n*/\n#define SQLITE_DETERMINISTIC    0x000000800\n#define SQLITE_DIRECTONLY       0x000080000\n#define SQLITE_SUBTYPE          0x000100000\n#define SQLITE_INNOCUOUS        0x000200000\n#define SQLITE_RESULT_SUBTYPE   0x001000000\n#define SQLITE_SELFORDER1       0x002000000\n\n/*\n** CAPI3REF: Deprecated Functions\n** DEPRECATED\n**\n** These functions are [deprecated].  In order to maintain\n** backwards compatibility with older code, these functions continue\n** to be supported.  However, new applications should avoid\n** the use of these functions.  To encourage programmers to avoid\n** these functions, we will not explain what they do.\n*/\n#ifndef SQLITE_OMIT_DEPRECATED\nSQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);\nSQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),\n                      void*,sqlite3_int64);\n#endif\n\n/*\n** CAPI3REF: Obtaining SQL Values\n** METHOD: sqlite3_value\n**\n** <b>Summary:</b>\n** <blockquote><table border=0 cellpadding=0 cellspacing=0>\n** <tr><td><b>sqlite3_value_blob</b><td>&rarr;<td>BLOB value\n** <tr><td><b>sqlite3_value_double</b><td>&rarr;<td>REAL value\n** <tr><td><b>sqlite3_value_int</b><td>&rarr;<td>32-bit INTEGER value\n** <tr><td><b>sqlite3_value_int64</b><td>&rarr;<td>64-bit INTEGER value\n** <tr><td><b>sqlite3_value_pointer</b><td>&rarr;<td>Pointer value\n** <tr><td><b>sqlite3_value_text</b><td>&rarr;<td>UTF-8 TEXT value\n** <tr><td><b>sqlite3_value_text16</b><td>&rarr;<td>UTF-16 TEXT value in\n** the native byteorder\n** <tr><td><b>sqlite3_value_text16be</b><td>&rarr;<td>UTF-16be TEXT value\n** <tr><td><b>sqlite3_value_text16le</b><td>&rarr;<td>UTF-16le TEXT value\n** <tr><td>&nbsp;<td>&nbsp;<td>&nbsp;\n** <tr><td><b>sqlite3_value_bytes</b><td>&rarr;<td>Size of a BLOB\n** or a UTF-8 TEXT in bytes\n** <tr><td><b>sqlite3_value_bytes16&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Size of UTF-16\n** TEXT in bytes\n** <tr><td><b>sqlite3_value_type</b><td>&rarr;<td>Default\n** datatype of the value\n** <tr><td><b>sqlite3_value_numeric_type&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Best numeric datatype of the value\n** <tr><td><b>sqlite3_value_nochange&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>True if the column is unchanged in an UPDATE\n** against a virtual table.\n** <tr><td><b>sqlite3_value_frombind&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>True if value originated from a [bound parameter]\n** </table></blockquote>\n**\n** <b>Details:</b>\n**\n** These routines extract type, size, and content information from\n** [protected sqlite3_value] objects.  Protected sqlite3_value objects\n** are used to pass parameter information into the functions that\n** implement [application-defined SQL functions] and [virtual tables].\n**\n** These routines work only with [protected sqlite3_value] objects.\n** Any attempt to use these routines on an [unprotected sqlite3_value]\n** is not threadsafe.\n**\n** ^These routines work just like the corresponding [column access functions]\n** except that these routines take a single [protected sqlite3_value] object\n** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.\n**\n** ^The sqlite3_value_text16() interface extracts a UTF-16 string\n** in the native byte-order of the host machine.  ^The\n** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces\n** extract UTF-16 strings as big-endian and little-endian respectively.\n**\n** ^If [sqlite3_value] object V was initialized\n** using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)]\n** and if X and Y are strings that compare equal according to strcmp(X,Y),\n** then sqlite3_value_pointer(V,Y) will return the pointer P.  ^Otherwise,\n** sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer()\n** routine is part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** ^(The sqlite3_value_type(V) interface returns the\n** [SQLITE_INTEGER | datatype code] for the initial datatype of the\n** [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER],\n** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^\n** Other interfaces might change the datatype for an sqlite3_value object.\n** For example, if the datatype is initially SQLITE_INTEGER and\n** sqlite3_value_text(V) is called to extract a text value for that\n** integer, then subsequent calls to sqlite3_value_type(V) might return\n** SQLITE_TEXT.  Whether or not a persistent internal datatype conversion\n** occurs is undefined and may change from one release of SQLite to the next.\n**\n** ^(The sqlite3_value_numeric_type() interface attempts to apply\n** numeric affinity to the value.  This means that an attempt is\n** made to convert the value to an integer or floating point.  If\n** such a conversion is possible without loss of information (in other\n** words, if the value is a string that looks like a number)\n** then the conversion is performed.  Otherwise no conversion occurs.\n** The [SQLITE_INTEGER | datatype] after conversion is returned.)^\n**\n** ^Within the [xUpdate] method of a [virtual table], the\n** sqlite3_value_nochange(X) interface returns true if and only if\n** the column corresponding to X is unchanged by the UPDATE operation\n** that the xUpdate method call was invoked to implement and if\n** the prior [xColumn] method call that was invoked to extract\n** the value for that column returned without setting a result (probably\n** because it queried [sqlite3_vtab_nochange()] and found that the column\n** was unchanging).  ^Within an [xUpdate] method, any value for which\n** sqlite3_value_nochange(X) is true will in all other respects appear\n** to be a NULL value.  If sqlite3_value_nochange(X) is invoked anywhere other\n** than within an [xUpdate] method call for an UPDATE statement, then\n** the return value is arbitrary and meaningless.\n**\n** ^The sqlite3_value_frombind(X) interface returns non-zero if the\n** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()]\n** interfaces.  ^If X comes from an SQL literal value, or a table column,\n** or an expression, then sqlite3_value_frombind(X) returns zero.\n**\n** Please pay particular attention to the fact that the pointer returned\n** from [sqlite3_value_blob()], [sqlite3_value_text()], or\n** [sqlite3_value_text16()] can be invalidated by a subsequent call to\n** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],\n** or [sqlite3_value_text16()].\n**\n** These routines must be called from the same thread as\n** the SQL function that supplied the [sqlite3_value*] parameters.\n**\n** As long as the input parameter is correct, these routines can only\n** fail if an out-of-memory error occurs during a format conversion.\n** Only the following subset of interfaces are subject to out-of-memory\n** errors:\n**\n** <ul>\n** <li> sqlite3_value_blob()\n** <li> sqlite3_value_text()\n** <li> sqlite3_value_text16()\n** <li> sqlite3_value_text16le()\n** <li> sqlite3_value_text16be()\n** <li> sqlite3_value_bytes()\n** <li> sqlite3_value_bytes16()\n** </ul>\n**\n** If an out-of-memory error occurs, then the return value from these\n** routines is the same as if the column had contained an SQL NULL value.\n** Valid SQL NULL returns can be distinguished from out-of-memory errors\n** by invoking the [sqlite3_errcode()] immediately after the suspect\n** return value is obtained and before any\n** other SQLite interface is called on the same [database connection].\n*/\nSQLITE_API const void *sqlite3_value_blob(sqlite3_value*);\nSQLITE_API double sqlite3_value_double(sqlite3_value*);\nSQLITE_API int sqlite3_value_int(sqlite3_value*);\nSQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);\nSQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);\nSQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);\nSQLITE_API int sqlite3_value_bytes(sqlite3_value*);\nSQLITE_API int sqlite3_value_bytes16(sqlite3_value*);\nSQLITE_API int sqlite3_value_type(sqlite3_value*);\nSQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);\nSQLITE_API int sqlite3_value_nochange(sqlite3_value*);\nSQLITE_API int sqlite3_value_frombind(sqlite3_value*);\n\n/*\n** CAPI3REF: Report the internal text encoding state of an sqlite3_value object\n** METHOD: sqlite3_value\n**\n** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8],\n** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding\n** of the value X, assuming that X has type TEXT.)^  If sqlite3_value_type(X)\n** returns something other than SQLITE_TEXT, then the return value from\n** sqlite3_value_encoding(X) is meaningless.  ^Calls to\n** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],\n** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or\n** [sqlite3_value_bytes16(X)] might change the encoding of the value X and\n** thus change the return from subsequent calls to sqlite3_value_encoding(X).\n**\n** This routine is intended for used by applications that test and validate\n** the SQLite implementation.  This routine is inquiring about the opaque\n** internal state of an [sqlite3_value] object.  Ordinary applications should\n** not need to know what the internal state of an sqlite3_value object is and\n** hence should not need to use this interface.\n*/\nSQLITE_API int sqlite3_value_encoding(sqlite3_value*);\n\n/*\n** CAPI3REF: Finding The Subtype Of SQL Values\n** METHOD: sqlite3_value\n**\n** The sqlite3_value_subtype(V) function returns the subtype for\n** an [application-defined SQL function] argument V.  The subtype\n** information can be used to pass a limited amount of context from\n** one SQL function to another.  Use the [sqlite3_result_subtype()]\n** routine to set the subtype for the return value of an SQL function.\n**\n** Every [application-defined SQL function] that invokes this interface\n** should include the [SQLITE_SUBTYPE] property in the text\n** encoding argument when the function is [sqlite3_create_function|registered].\n** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()\n** might return zero instead of the upstream subtype in some corner cases.\n*/\nSQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);\n\n/*\n** CAPI3REF: Copy And Free SQL Values\n** METHOD: sqlite3_value\n**\n** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]\n** object V and returns a pointer to that copy.  ^The [sqlite3_value] returned\n** is a [protected sqlite3_value] object even if the input is not.\n** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a\n** memory allocation fails. ^If V is a [pointer value], then the result\n** of sqlite3_value_dup(V) is a NULL value.\n**\n** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object\n** previously obtained from [sqlite3_value_dup()].  ^If V is a NULL pointer\n** then sqlite3_value_free(V) is a harmless no-op.\n*/\nSQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);\nSQLITE_API void sqlite3_value_free(sqlite3_value*);\n\n/*\n** CAPI3REF: Obtain Aggregate Function Context\n** METHOD: sqlite3_context\n**\n** Implementations of aggregate SQL functions use this\n** routine to allocate memory for storing their state.\n**\n** ^The first time the sqlite3_aggregate_context(C,N) routine is called\n** for a particular aggregate function, SQLite allocates\n** N bytes of memory, zeroes out that memory, and returns a pointer\n** to the new memory. ^On second and subsequent calls to\n** sqlite3_aggregate_context() for the same aggregate function instance,\n** the same buffer is returned.  Sqlite3_aggregate_context() is normally\n** called once for each invocation of the xStep callback and then one\n** last time when the xFinal callback is invoked.  ^(When no rows match\n** an aggregate query, the xStep() callback of the aggregate function\n** implementation is never called and xFinal() is called exactly once.\n** In those cases, sqlite3_aggregate_context() might be called for the\n** first time from within xFinal().)^\n**\n** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer\n** when first called if N is less than or equal to zero or if a memory\n** allocation error occurs.\n**\n** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is\n** determined by the N parameter on the first successful call.  Changing the\n** value of N in any subsequent call to sqlite3_aggregate_context() within\n** the same aggregate function instance will not resize the memory\n** allocation.)^  Within the xFinal callback, it is customary to set\n** N=0 in calls to sqlite3_aggregate_context(C,N) so that no\n** pointless memory allocations occur.\n**\n** ^SQLite automatically frees the memory allocated by\n** sqlite3_aggregate_context() when the aggregate query concludes.\n**\n** The first parameter must be a copy of the\n** [sqlite3_context | SQL function context] that is the first parameter\n** to the xStep or xFinal callback routine that implements the aggregate\n** function.\n**\n** This routine must be called from the same thread in which\n** the aggregate SQL function is running.\n*/\nSQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);\n\n/*\n** CAPI3REF: User Data For Functions\n** METHOD: sqlite3_context\n**\n** ^The sqlite3_user_data() interface returns a copy of\n** the pointer that was the pUserData parameter (the 5th parameter)\n** of the [sqlite3_create_function()]\n** and [sqlite3_create_function16()] routines that originally\n** registered the application defined function.\n**\n** This routine must be called from the same thread in which\n** the application-defined function is running.\n*/\nSQLITE_API void *sqlite3_user_data(sqlite3_context*);\n\n/*\n** CAPI3REF: Database Connection For Functions\n** METHOD: sqlite3_context\n**\n** ^The sqlite3_context_db_handle() interface returns a copy of\n** the pointer to the [database connection] (the 1st parameter)\n** of the [sqlite3_create_function()]\n** and [sqlite3_create_function16()] routines that originally\n** registered the application defined function.\n*/\nSQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);\n\n/*\n** CAPI3REF: Function Auxiliary Data\n** METHOD: sqlite3_context\n**\n** These functions may be used by (non-aggregate) SQL functions to\n** associate auxiliary data with argument values. If the same argument\n** value is passed to multiple invocations of the same SQL function during\n** query execution, under some circumstances the associated auxiliary data\n** might be preserved.  An example of where this might be useful is in a\n** regular-expression matching function. The compiled version of the regular\n** expression can be stored as auxiliary data associated with the pattern string.\n** Then as long as the pattern string remains the same,\n** the compiled regular expression can be reused on multiple\n** invocations of the same function.\n**\n** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data\n** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument\n** value to the application-defined function.  ^N is zero for the left-most\n** function argument.  ^If there is no auxiliary data\n** associated with the function argument, the sqlite3_get_auxdata(C,N) interface\n** returns a NULL pointer.\n**\n** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the\n** N-th argument of the application-defined function.  ^Subsequent\n** calls to sqlite3_get_auxdata(C,N) return P from the most recent\n** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or\n** NULL if the auxiliary data has been discarded.\n** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,\n** SQLite will invoke the destructor function X with parameter P exactly\n** once, when the auxiliary data is discarded.\n** SQLite is free to discard the auxiliary data at any time, including: <ul>\n** <li> ^(when the corresponding function parameter changes)^, or\n** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the\n**      SQL statement)^, or\n** <li> ^(when sqlite3_set_auxdata() is invoked again on the same\n**       parameter)^, or\n** <li> ^(during the original sqlite3_set_auxdata() call when a memory\n**      allocation error occurs.)^\n** <li> ^(during the original sqlite3_set_auxdata() call if the function\n**      is evaluated during query planning instead of during query execution,\n**      as sometimes happens with [SQLITE_ENABLE_STAT4].)^ </ul>\n**\n** Note the last two bullets in particular.  The destructor X in\n** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the\n** sqlite3_set_auxdata() interface even returns.  Hence sqlite3_set_auxdata()\n** should be called near the end of the function implementation and the\n** function implementation should not make any use of P after\n** sqlite3_set_auxdata() has been called.  Furthermore, a call to\n** sqlite3_get_auxdata() that occurs immediately after a corresponding call\n** to sqlite3_set_auxdata() might still return NULL if an out-of-memory\n** condition occurred during the sqlite3_set_auxdata() call or if the\n** function is being evaluated during query planning rather than during\n** query execution.\n**\n** ^(In practice, auxiliary data is preserved between function calls for\n** function parameters that are compile-time constants, including literal\n** values and [parameters] and expressions composed from the same.)^\n**\n** The value of the N parameter to these interfaces should be non-negative.\n** Future enhancements may make use of negative N values to define new\n** kinds of function caching behavior.\n**\n** These routines must be called from the same thread in which\n** the SQL function is running.\n**\n** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].\n*/\nSQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);\nSQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));\n\n/*\n** CAPI3REF: Database Connection Client Data\n** METHOD: sqlite3\n**\n** These functions are used to associate one or more named pointers\n** with a [database connection].\n** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P\n** to be attached to [database connection] D using name N.  Subsequent\n** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P\n** or a NULL pointer if there were no prior calls to\n** sqlite3_set_clientdata() with the same values of D and N.\n** Names are compared using strcmp() and are thus case sensitive.\n** It returns 0 on success and SQLITE_NOMEM on allocation failure.\n**\n** If P and X are both non-NULL, then the destructor X is invoked with\n** argument P on the first of the following occurrences:\n** <ul>\n** <li> An out-of-memory error occurs during the call to\n**      sqlite3_set_clientdata() which attempts to register pointer P.\n** <li> A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made\n**      with the same D and N parameters.\n** <li> The database connection closes.  SQLite does not make any guarantees\n**      about the order in which destructors are called, only that all\n**      destructors will be called exactly once at some point during the\n**      database connection closing process.\n** </ul>\n**\n** SQLite does not do anything with client data other than invoke\n** destructors on the client data at the appropriate time.  The intended\n** use for client data is to provide a mechanism for wrapper libraries\n** to store additional information about an SQLite database connection.\n**\n** There is no limit (other than available memory) on the number of different\n** client data pointers (with different names) that can be attached to a\n** single database connection.  However, the implementation is optimized\n** for the case of having only one or two different client data names.\n** Applications and wrapper libraries are discouraged from using more than\n** one client data name each.\n**\n** There is no way to enumerate the client data pointers\n** associated with a database connection.  The N parameter can be thought\n** of as a secret key such that only code that knows the secret key is able\n** to access the associated data.\n**\n** Security Warning:  These interfaces should not be exposed in scripting\n** languages or in other circumstances where it might be possible for an\n** attacker to invoke them.  Any agent that can invoke these interfaces\n** can probably also take control of the process.\n**\n** Database connection client data is only available for SQLite\n** version 3.44.0 ([dateof:3.44.0]) and later.\n**\n** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].\n*/\nSQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);\nSQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));\n\n/*\n** CAPI3REF: Constants Defining Special Destructor Behavior\n**\n** These are special values for the destructor that is passed in as the\n** final argument to routines like [sqlite3_result_blob()].  ^If the destructor\n** argument is SQLITE_STATIC, it means that the content pointer is constant\n** and will never change.  It does not need to be destroyed.  ^The\n** SQLITE_TRANSIENT value means that the content will likely change in\n** the near future and that SQLite should make its own private copy of\n** the content before returning.\n**\n** The typedef is necessary to work around problems in certain\n** C++ compilers.\n*/\ntypedef void (*sqlite3_destructor_type)(void*);\n#define SQLITE_STATIC      ((sqlite3_destructor_type)0)\n#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)\n\n/*\n** CAPI3REF: Setting The Result Of An SQL Function\n** METHOD: sqlite3_context\n**\n** These routines are used by the xFunc or xFinal callbacks that\n** implement SQL functions and aggregates.  See\n** [sqlite3_create_function()] and [sqlite3_create_function16()]\n** for additional information.\n**\n** These functions work very much like the [parameter binding] family of\n** functions used to bind values to host parameters in prepared statements.\n** Refer to the [SQL parameter] documentation for additional information.\n**\n** ^The sqlite3_result_blob() interface sets the result from\n** an application-defined function to be the BLOB whose content is pointed\n** to by the second parameter and which is N bytes long where N is the\n** third parameter.\n**\n** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)\n** interfaces set the result of the application-defined function to be\n** a BLOB containing all zero bytes and N bytes in size.\n**\n** ^The sqlite3_result_double() interface sets the result from\n** an application-defined function to be a floating point value specified\n** by its 2nd argument.\n**\n** ^The sqlite3_result_error() and sqlite3_result_error16() functions\n** cause the implemented SQL function to throw an exception.\n** ^SQLite uses the string pointed to by the\n** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()\n** as the text of an error message.  ^SQLite interprets the error\n** message string from sqlite3_result_error() as UTF-8. ^SQLite\n** interprets the string from sqlite3_result_error16() as UTF-16 using\n** the same [byte-order determination rules] as [sqlite3_bind_text16()].\n** ^If the third parameter to sqlite3_result_error()\n** or sqlite3_result_error16() is negative then SQLite takes as the error\n** message all text up through the first zero character.\n** ^If the third parameter to sqlite3_result_error() or\n** sqlite3_result_error16() is non-negative then SQLite takes that many\n** bytes (not characters) from the 2nd parameter as the error message.\n** ^The sqlite3_result_error() and sqlite3_result_error16()\n** routines make a private copy of the error message text before\n** they return.  Hence, the calling function can deallocate or\n** modify the text after they return without harm.\n** ^The sqlite3_result_error_code() function changes the error code\n** returned by SQLite as a result of an error in a function.  ^By default,\n** the error code is SQLITE_ERROR.  ^A subsequent call to sqlite3_result_error()\n** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.\n**\n** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an\n** error indicating that a string or BLOB is too long to represent.\n**\n** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an\n** error indicating that a memory allocation failed.\n**\n** ^The sqlite3_result_int() interface sets the return value\n** of the application-defined function to be the 32-bit signed integer\n** value given in the 2nd argument.\n** ^The sqlite3_result_int64() interface sets the return value\n** of the application-defined function to be the 64-bit signed integer\n** value given in the 2nd argument.\n**\n** ^The sqlite3_result_null() interface sets the return value\n** of the application-defined function to be NULL.\n**\n** ^The sqlite3_result_text(), sqlite3_result_text16(),\n** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces\n** set the return value of the application-defined function to be\n** a text string which is represented as UTF-8, UTF-16 native byte order,\n** UTF-16 little endian, or UTF-16 big endian, respectively.\n** ^The sqlite3_result_text64() interface sets the return value of an\n** application-defined function to be a text string in an encoding\n** specified by the fifth (and last) parameter, which must be one\n** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE].\n** ^SQLite takes the text result from the application from\n** the 2nd parameter of the sqlite3_result_text* interfaces.\n** ^If the 3rd parameter to any of the sqlite3_result_text* interfaces\n** other than sqlite3_result_text64() is negative, then SQLite computes\n** the string length itself by searching the 2nd parameter for the first\n** zero character.\n** ^If the 3rd parameter to the sqlite3_result_text* interfaces\n** is non-negative, then as many bytes (not characters) of the text\n** pointed to by the 2nd parameter are taken as the application-defined\n** function result.  If the 3rd parameter is non-negative, then it\n** must be the byte offset into the string where the NUL terminator would\n** appear if the string were NUL terminated.  If any NUL characters occur\n** in the string at a byte offset that is less than the value of the 3rd\n** parameter, then the resulting string will contain embedded NULs and the\n** result of expressions operating on strings with embedded NULs is undefined.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces\n** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that\n** function as the destructor on the text or BLOB result when it has\n** finished using that result.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces or to\n** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite\n** assumes that the text or BLOB result is in constant space and does not\n** copy the content of the parameter nor call a destructor on the content\n** when it has finished using that result.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces\n** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT\n** then SQLite makes a copy of the result into space obtained\n** from [sqlite3_malloc()] before it returns.\n**\n** ^For the sqlite3_result_text16(), sqlite3_result_text16le(), and\n** sqlite3_result_text16be() routines, and for sqlite3_result_text64()\n** when the encoding is not UTF8, if the input UTF16 begins with a\n** byte-order mark (BOM, U+FEFF) then the BOM is removed from the\n** string and the rest of the string is interpreted according to the\n** byte-order specified by the BOM.  ^The byte-order specified by\n** the BOM at the beginning of the text overrides the byte-order\n** specified by the interface procedure.  ^So, for example, if\n** sqlite3_result_text16le() is invoked with text that begins\n** with bytes 0xfe, 0xff (a big-endian byte-order mark) then the\n** first two bytes of input are skipped and the remaining input\n** is interpreted as UTF16BE text.\n**\n** ^For UTF16 input text to the sqlite3_result_text16(),\n** sqlite3_result_text16be(), sqlite3_result_text16le(), and\n** sqlite3_result_text64() routines, if the text contains invalid\n** UTF16 characters, the invalid characters might be converted\n** into the unicode replacement character, U+FFFD.\n**\n** ^The sqlite3_result_value() interface sets the result of\n** the application-defined function to be a copy of the\n** [unprotected sqlite3_value] object specified by the 2nd parameter.  ^The\n** sqlite3_result_value() interface makes a copy of the [sqlite3_value]\n** so that the [sqlite3_value] specified in the parameter may change or\n** be deallocated after sqlite3_result_value() returns without harm.\n** ^A [protected sqlite3_value] object may always be used where an\n** [unprotected sqlite3_value] object is required, so either\n** kind of [sqlite3_value] object can be used with this interface.\n**\n** ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an\n** SQL NULL value, just like [sqlite3_result_null(C)], except that it\n** also associates the host-language pointer P or type T with that\n** NULL value such that the pointer can be retrieved within an\n** [application-defined SQL function] using [sqlite3_value_pointer()].\n** ^If the D parameter is not NULL, then it is a pointer to a destructor\n** for the P parameter.  ^SQLite invokes D with P as its only argument\n** when SQLite is finished with P.  The T parameter should be a static\n** string and preferably a string literal. The sqlite3_result_pointer()\n** routine is part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** If these routines are called from within a different thread\n** than the one containing the application-defined function that received\n** the [sqlite3_context] pointer, the results are undefined.\n*/\nSQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,\n                           sqlite3_uint64,void(*)(void*));\nSQLITE_API void sqlite3_result_double(sqlite3_context*, double);\nSQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);\nSQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);\nSQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);\nSQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);\nSQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);\nSQLITE_API void sqlite3_result_int(sqlite3_context*, int);\nSQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);\nSQLITE_API void sqlite3_result_null(sqlite3_context*);\nSQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,\n                           void(*)(void*), unsigned char encoding);\nSQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));\nSQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));\nSQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);\nSQLITE_API void sqlite3_result_pointer(sqlite3_context*, void*,const char*,void(*)(void*));\nSQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);\nSQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);\n\n\n/*\n** CAPI3REF: Setting The Subtype Of An SQL Function\n** METHOD: sqlite3_context\n**\n** The sqlite3_result_subtype(C,T) function causes the subtype of\n** the result from the [application-defined SQL function] with\n** [sqlite3_context] C to be the value T.  Only the lower 8 bits\n** of the subtype T are preserved in current versions of SQLite;\n** higher order bits are discarded.\n** The number of subtype bytes preserved by SQLite might increase\n** in future releases of SQLite.\n**\n** Every [application-defined SQL function] that invokes this interface\n** should include the [SQLITE_RESULT_SUBTYPE] property in its\n** text encoding argument when the SQL function is\n** [sqlite3_create_function|registered].  If the [SQLITE_RESULT_SUBTYPE]\n** property is omitted from the function that invokes sqlite3_result_subtype(),\n** then in some cases the sqlite3_result_subtype() might fail to set\n** the result subtype.\n**\n** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any\n** SQL function that invokes the sqlite3_result_subtype() interface\n** and that does not have the SQLITE_RESULT_SUBTYPE property will raise\n** an error.  Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1\n** by default.\n*/\nSQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);\n\n/*\n** CAPI3REF: Define New Collating Sequences\n** METHOD: sqlite3\n**\n** ^These functions add, remove, or modify a [collation] associated\n** with the [database connection] specified as the first argument.\n**\n** ^The name of the collation is a UTF-8 string\n** for sqlite3_create_collation() and sqlite3_create_collation_v2()\n** and a UTF-16 string in native byte order for sqlite3_create_collation16().\n** ^Collation names that compare equal according to [sqlite3_strnicmp()] are\n** considered to be the same name.\n**\n** ^(The third argument (eTextRep) must be one of the constants:\n** <ul>\n** <li> [SQLITE_UTF8],\n** <li> [SQLITE_UTF16LE],\n** <li> [SQLITE_UTF16BE],\n** <li> [SQLITE_UTF16], or\n** <li> [SQLITE_UTF16_ALIGNED].\n** </ul>)^\n** ^The eTextRep argument determines the encoding of strings passed\n** to the collating function callback, xCompare.\n** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep\n** force strings to be UTF16 with native byte order.\n** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin\n** on an even byte address.\n**\n** ^The fourth argument, pArg, is an application data pointer that is passed\n** through as the first argument to the collating function callback.\n**\n** ^The fifth argument, xCompare, is a pointer to the collating function.\n** ^Multiple collating functions can be registered using the same name but\n** with different eTextRep parameters and SQLite will use whichever\n** function requires the least amount of data transformation.\n** ^If the xCompare argument is NULL then the collating function is\n** deleted.  ^When all collating functions having the same name are deleted,\n** that collation is no longer usable.\n**\n** ^The collating function callback is invoked with a copy of the pArg\n** application data pointer and with two strings in the encoding specified\n** by the eTextRep argument.  The two integer parameters to the collating\n** function callback are the length of the two strings, in bytes. The collating\n** function must return an integer that is negative, zero, or positive\n** if the first string is less than, equal to, or greater than the second,\n** respectively.  A collating function must always return the same answer\n** given the same inputs.  If two or more collating functions are registered\n** to the same collation name (using different eTextRep values) then all\n** must give an equivalent answer when invoked with equivalent strings.\n** The collating function must obey the following properties for all\n** strings A, B, and C:\n**\n** <ol>\n** <li> If A==B then B==A.\n** <li> If A==B and B==C then A==C.\n** <li> If A&lt;B THEN B&gt;A.\n** <li> If A&lt;B and B&lt;C then A&lt;C.\n** </ol>\n**\n** If a collating function fails any of the above constraints and that\n** collating function is registered and used, then the behavior of SQLite\n** is undefined.\n**\n** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()\n** with the addition that the xDestroy callback is invoked on pArg when\n** the collating function is deleted.\n** ^Collating functions are deleted when they are overridden by later\n** calls to the collation creation functions or when the\n** [database connection] is closed using [sqlite3_close()].\n**\n** ^The xDestroy callback is <u>not</u> called if the\n** sqlite3_create_collation_v2() function fails.  Applications that invoke\n** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should\n** check the return code and dispose of the application data pointer\n** themselves rather than expecting SQLite to deal with it for them.\n** This is different from every other SQLite interface.  The inconsistency\n** is unfortunate but cannot be changed without breaking backwards\n** compatibility.\n**\n** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].\n*/\nSQLITE_API int sqlite3_create_collation(\n  sqlite3*,\n  const char *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n);\nSQLITE_API int sqlite3_create_collation_v2(\n  sqlite3*,\n  const char *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*),\n  void(*xDestroy)(void*)\n);\nSQLITE_API int sqlite3_create_collation16(\n  sqlite3*,\n  const void *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n);\n\n/*\n** CAPI3REF: Collation Needed Callbacks\n** METHOD: sqlite3\n**\n** ^To avoid having to register all collation sequences before a database\n** can be used, a single callback function may be registered with the\n** [database connection] to be invoked whenever an undefined collation\n** sequence is required.\n**\n** ^If the function is registered using the sqlite3_collation_needed() API,\n** then it is passed the names of undefined collation sequences as strings\n** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,\n** the names are passed as UTF-16 in machine native byte order.\n** ^A call to either function replaces the existing collation-needed callback.\n**\n** ^(When the callback is invoked, the first argument passed is a copy\n** of the second argument to sqlite3_collation_needed() or\n** sqlite3_collation_needed16().  The second argument is the database\n** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],\n** or [SQLITE_UTF16LE], indicating the most desirable form of the collation\n** sequence function required.  The fourth parameter is the name of the\n** required collation sequence.)^\n**\n** The callback function should register the desired collation using\n** [sqlite3_create_collation()], [sqlite3_create_collation16()], or\n** [sqlite3_create_collation_v2()].\n*/\nSQLITE_API int sqlite3_collation_needed(\n  sqlite3*,\n  void*,\n  void(*)(void*,sqlite3*,int eTextRep,const char*)\n);\nSQLITE_API int sqlite3_collation_needed16(\n  sqlite3*,\n  void*,\n  void(*)(void*,sqlite3*,int eTextRep,const void*)\n);\n\n#ifdef SQLITE_ENABLE_CEROD\n/*\n** Specify the activation key for a CEROD database.  Unless\n** activated, none of the CEROD routines will work.\n*/\nSQLITE_API void sqlite3_activate_cerod(\n  const char *zPassPhrase        /* Activation phrase */\n);\n#endif\n\n/*\n** CAPI3REF: Suspend Execution For A Short Time\n**\n** The sqlite3_sleep() function causes the current thread to suspend execution\n** for at least a number of milliseconds specified in its parameter.\n**\n** If the operating system does not support sleep requests with\n** millisecond time resolution, then the time will be rounded up to\n** the nearest second. The number of milliseconds of sleep actually\n** requested from the operating system is returned.\n**\n** ^SQLite implements this interface by calling the xSleep()\n** method of the default [sqlite3_vfs] object.  If the xSleep() method\n** of the default VFS is not implemented correctly, or not implemented at\n** all, then the behavior of sqlite3_sleep() may deviate from the description\n** in the previous paragraphs.\n**\n** If a negative argument is passed to sqlite3_sleep() the results vary by\n** VFS and operating system.  Some system treat a negative argument as an\n** instruction to sleep forever.  Others understand it to mean do not sleep\n** at all. ^In SQLite version 3.42.0 and later, a negative\n** argument passed into sqlite3_sleep() is changed to zero before it is relayed\n** down into the xSleep method of the VFS.\n*/\nSQLITE_API int sqlite3_sleep(int);\n\n/*\n** CAPI3REF: Name Of The Folder Holding Temporary Files\n**\n** ^(If this global variable is made to point to a string which is\n** the name of a folder (a.k.a. directory), then all temporary files\n** created by SQLite when using a built-in [sqlite3_vfs | VFS]\n** will be placed in that directory.)^  ^If this variable\n** is a NULL pointer, then SQLite performs a search for an appropriate\n** temporary file directory.\n**\n** Applications are strongly discouraged from using this global variable.\n** It is required to set a temporary folder on Windows Runtime (WinRT).\n** But for all other platforms, it is highly recommended that applications\n** neither read nor write this variable.  This global variable is a relic\n** that exists for backwards compatibility of legacy applications and should\n** be avoided in new projects.\n**\n** It is not safe to read or modify this variable in more than one\n** thread at a time.  It is not safe to read or modify this variable\n** if a [database connection] is being used at the same time in a separate\n** thread.\n** It is intended that this variable be set once\n** as part of process initialization and before any SQLite interface\n** routines have been called and that this variable remain unchanged\n** thereafter.\n**\n** ^The [temp_store_directory pragma] may modify this variable and cause\n** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,\n** the [temp_store_directory pragma] always assumes that any string\n** that this variable points to is held in memory obtained from\n** [sqlite3_malloc] and the pragma may attempt to free that memory\n** using [sqlite3_free].\n** Hence, if this variable is modified directly, either it should be\n** made NULL or made to point to memory obtained from [sqlite3_malloc]\n** or else the use of the [temp_store_directory pragma] should be avoided.\n** Except when requested by the [temp_store_directory pragma], SQLite\n** does not free the memory that sqlite3_temp_directory points to.  If\n** the application wants that memory to be freed, it must do\n** so itself, taking care to only do so after all [database connection]\n** objects have been destroyed.\n**\n** <b>Note to Windows Runtime users:</b>  The temporary directory must be set\n** prior to calling [sqlite3_open] or [sqlite3_open_v2].  Otherwise, various\n** features that require the use of temporary files may fail.  Here is an\n** example of how to do this using C++ with the Windows Runtime:\n**\n** <blockquote><pre>\n** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->\n** &nbsp;     TemporaryFolder->Path->Data();\n** char zPathBuf&#91;MAX_PATH + 1&#93;;\n** memset(zPathBuf, 0, sizeof(zPathBuf));\n** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),\n** &nbsp;     NULL, NULL);\n** sqlite3_temp_directory = sqlite3_mprintf(\"%s\", zPathBuf);\n** </pre></blockquote>\n*/\nSQLITE_API char *sqlite3_temp_directory;\n\n/*\n** CAPI3REF: Name Of The Folder Holding Database Files\n**\n** ^(If this global variable is made to point to a string which is\n** the name of a folder (a.k.a. directory), then all database files\n** specified with a relative pathname and created or accessed by\n** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed\n** to be relative to that directory.)^ ^If this variable is a NULL\n** pointer, then SQLite assumes that all database files specified\n** with a relative pathname are relative to the current directory\n** for the process.  Only the windows VFS makes use of this global\n** variable; it is ignored by the unix VFS.\n**\n** Changing the value of this variable while a database connection is\n** open can result in a corrupt database.\n**\n** It is not safe to read or modify this variable in more than one\n** thread at a time.  It is not safe to read or modify this variable\n** if a [database connection] is being used at the same time in a separate\n** thread.\n** It is intended that this variable be set once\n** as part of process initialization and before any SQLite interface\n** routines have been called and that this variable remain unchanged\n** thereafter.\n**\n** ^The [data_store_directory pragma] may modify this variable and cause\n** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,\n** the [data_store_directory pragma] always assumes that any string\n** that this variable points to is held in memory obtained from\n** [sqlite3_malloc] and the pragma may attempt to free that memory\n** using [sqlite3_free].\n** Hence, if this variable is modified directly, either it should be\n** made NULL or made to point to memory obtained from [sqlite3_malloc]\n** or else the use of the [data_store_directory pragma] should be avoided.\n*/\nSQLITE_API char *sqlite3_data_directory;\n\n/*\n** CAPI3REF: Win32 Specific Interface\n**\n** These interfaces are available only on Windows.  The\n** [sqlite3_win32_set_directory] interface is used to set the value associated\n** with the [sqlite3_temp_directory] or [sqlite3_data_directory] variable, to\n** zValue, depending on the value of the type parameter.  The zValue parameter\n** should be NULL to cause the previous value to be freed via [sqlite3_free];\n** a non-NULL value will be copied into memory obtained from [sqlite3_malloc]\n** prior to being used.  The [sqlite3_win32_set_directory] interface returns\n** [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported,\n** or [SQLITE_NOMEM] if memory could not be allocated.  The value of the\n** [sqlite3_data_directory] variable is intended to act as a replacement for\n** the current directory on the sub-platforms of Win32 where that concept is\n** not present, e.g. WinRT and UWP.  The [sqlite3_win32_set_directory8] and\n** [sqlite3_win32_set_directory16] interfaces behave exactly the same as the\n** sqlite3_win32_set_directory interface except the string parameter must be\n** UTF-8 or UTF-16, respectively.\n*/\nSQLITE_API int sqlite3_win32_set_directory(\n  unsigned long type, /* Identifier for directory being set or reset */\n  void *zValue        /* New value for directory being set or reset */\n);\nSQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);\nSQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);\n\n/*\n** CAPI3REF: Win32 Directory Types\n**\n** These macros are only available on Windows.  They define the allowed values\n** for the type argument to the [sqlite3_win32_set_directory] interface.\n*/\n#define SQLITE_WIN32_DATA_DIRECTORY_TYPE  1\n#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE  2\n\n/*\n** CAPI3REF: Test For Auto-Commit Mode\n** KEYWORDS: {autocommit mode}\n** METHOD: sqlite3\n**\n** ^The sqlite3_get_autocommit() interface returns non-zero or\n** zero if the given database connection is or is not in autocommit mode,\n** respectively.  ^Autocommit mode is on by default.\n** ^Autocommit mode is disabled by a [BEGIN] statement.\n** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].\n**\n** If certain kinds of errors occur on a statement within a multi-statement\n** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],\n** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the\n** transaction might be rolled back automatically.  The only way to\n** find out whether SQLite automatically rolled back the transaction after\n** an error is to use this function.\n**\n** If another thread changes the autocommit status of the database\n** connection while this routine is running, then the return value\n** is undefined.\n*/\nSQLITE_API int sqlite3_get_autocommit(sqlite3*);\n\n/*\n** CAPI3REF: Find The Database Handle Of A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_db_handle interface returns the [database connection] handle\n** to which a [prepared statement] belongs.  ^The [database connection]\n** returned by sqlite3_db_handle is the same [database connection]\n** that was the first argument\n** to the [sqlite3_prepare_v2()] call (or its variants) that was used to\n** create the statement in the first place.\n*/\nSQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Return The Schema Name For A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name\n** for the N-th database on database connection D, or a NULL pointer if N is\n** out of range.  An N value of 0 means the main database file.  An N of 1 is\n** the \"temp\" schema.  Larger values of N correspond to various ATTACH-ed\n** databases.\n**\n** Space to hold the string that is returned by sqlite3_db_name() is managed\n** by SQLite itself.  The string might be deallocated by any operation that\n** changes the schema, including [ATTACH] or [DETACH] or calls to\n** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that\n** occur on a different thread.  Applications that need to\n** remember the string long-term should make their own copy.  Applications that\n** are accessing the same database connection simultaneously on multiple\n** threads should mutex-protect calls to this API and should make their own\n** private copy of the result prior to releasing the mutex.\n*/\nSQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);\n\n/*\n** CAPI3REF: Return The Filename For A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_filename(D,N) interface returns a pointer to the filename\n** associated with database N of connection D.\n** ^If there is no attached database N on the database\n** connection D, or if database N is a temporary or in-memory database, then\n** this function will return either a NULL pointer or an empty string.\n**\n** ^The string value returned by this routine is owned and managed by\n** the database connection.  ^The value will be valid until the database N\n** is [DETACH]-ed or until the database connection closes.\n**\n** ^The filename returned by this function is the output of the\n** xFullPathname method of the [VFS].  ^In other words, the filename\n** will be an absolute pathname, even if the filename used\n** to open the database originally was a URI or relative pathname.\n**\n** If the filename pointer returned by this routine is not NULL, then it\n** can be used as the filename input parameter to these routines:\n** <ul>\n** <li> [sqlite3_uri_parameter()]\n** <li> [sqlite3_uri_boolean()]\n** <li> [sqlite3_uri_int64()]\n** <li> [sqlite3_filename_database()]\n** <li> [sqlite3_filename_journal()]\n** <li> [sqlite3_filename_wal()]\n** </ul>\n*/\nSQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName);\n\n/*\n** CAPI3REF: Determine if a database is read-only\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N\n** of connection D is read-only, 0 if it is read/write, or -1 if N is not\n** the name of a database on connection D.\n*/\nSQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);\n\n/*\n** CAPI3REF: Determine the transaction state of a database\n** METHOD: sqlite3\n**\n** ^The sqlite3_txn_state(D,S) interface returns the current\n** [transaction state] of schema S in database connection D.  ^If S is NULL,\n** then the highest transaction state of any schema on database connection D\n** is returned.  Transaction states are (in order of lowest to highest):\n** <ol>\n** <li value=\"0\"> SQLITE_TXN_NONE\n** <li value=\"1\"> SQLITE_TXN_READ\n** <li value=\"2\"> SQLITE_TXN_WRITE\n** </ol>\n** ^If the S argument to sqlite3_txn_state(D,S) is not the name of\n** a valid schema, then -1 is returned.\n*/\nSQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);\n\n/*\n** CAPI3REF: Allowed return values from sqlite3_txn_state()\n** KEYWORDS: {transaction state}\n**\n** These constants define the current transaction state of a database file.\n** ^The [sqlite3_txn_state(D,S)] interface returns one of these\n** constants in order to describe the transaction state of schema S\n** in [database connection] D.\n**\n** <dl>\n** [[SQLITE_TXN_NONE]] <dt>SQLITE_TXN_NONE</dt>\n** <dd>The SQLITE_TXN_NONE state means that no transaction is currently\n** pending.</dd>\n**\n** [[SQLITE_TXN_READ]] <dt>SQLITE_TXN_READ</dt>\n** <dd>The SQLITE_TXN_READ state means that the database is currently\n** in a read transaction.  Content has been read from the database file\n** but nothing in the database file has changed.  The transaction state\n** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are\n** no other conflicting concurrent write transactions.  The transaction\n** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or\n** [COMMIT].</dd>\n**\n** [[SQLITE_TXN_WRITE]] <dt>SQLITE_TXN_WRITE</dt>\n** <dd>The SQLITE_TXN_WRITE state means that the database is currently\n** in a write transaction.  Content has been written to the database file\n** but has not yet committed.  The transaction state will change to\n** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>\n*/\n#define SQLITE_TXN_NONE  0\n#define SQLITE_TXN_READ  1\n#define SQLITE_TXN_WRITE 2\n\n/*\n** CAPI3REF: Find the next prepared statement\n** METHOD: sqlite3\n**\n** ^This interface returns a pointer to the next [prepared statement] after\n** pStmt associated with the [database connection] pDb.  ^If pStmt is NULL\n** then this interface returns a pointer to the first prepared statement\n** associated with the database connection pDb.  ^If no prepared statement\n** satisfies the conditions of this routine, it returns NULL.\n**\n** The [database connection] pointer D in a call to\n** [sqlite3_next_stmt(D,S)] must refer to an open database\n** connection and in particular must not be a NULL pointer.\n*/\nSQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Commit And Rollback Notification Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_commit_hook() interface registers a callback\n** function to be invoked whenever a transaction is [COMMIT | committed].\n** ^Any callback set by a previous call to sqlite3_commit_hook()\n** for the same database connection is overridden.\n** ^The sqlite3_rollback_hook() interface registers a callback\n** function to be invoked whenever a transaction is [ROLLBACK | rolled back].\n** ^Any callback set by a previous call to sqlite3_rollback_hook()\n** for the same database connection is overridden.\n** ^The pArg argument is passed through to the callback.\n** ^If the callback on a commit hook function returns non-zero,\n** then the commit is converted into a rollback.\n**\n** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions\n** return the P argument from the previous call of the same function\n** on the same [database connection] D, or NULL for\n** the first call for each function on D.\n**\n** The commit and rollback hook callbacks are not reentrant.\n** The callback implementation must not do anything that will modify\n** the database connection that invoked the callback.  Any actions\n** to modify the database connection must be deferred until after the\n** completion of the [sqlite3_step()] call that triggered the commit\n** or rollback hook in the first place.\n** Note that running any other SQL statements, including SELECT statements,\n** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify\n** the database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^Registering a NULL function disables the callback.\n**\n** ^When the commit hook callback routine returns zero, the [COMMIT]\n** operation is allowed to continue normally.  ^If the commit hook\n** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].\n** ^The rollback hook is invoked on a rollback that results from a commit\n** hook returning non-zero, just as it would be with any other rollback.\n**\n** ^For the purposes of this API, a transaction is said to have been\n** rolled back if an explicit \"ROLLBACK\" statement is executed, or\n** an error or constraint causes an implicit rollback to occur.\n** ^The rollback callback is not invoked if a transaction is\n** automatically rolled back because the database connection is closed.\n**\n** See also the [sqlite3_update_hook()] interface.\n*/\nSQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);\nSQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);\n\n/*\n** CAPI3REF: Autovacuum Compaction Amount Callback\n** METHOD: sqlite3\n**\n** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback\n** function C that is invoked prior to each autovacuum of the database\n** file.  ^The callback is passed a copy of the generic data pointer (P),\n** the schema-name of the attached database that is being autovacuumed,\n** the size of the database file in pages, the number of free pages,\n** and the number of bytes per page, respectively.  The callback should\n** return the number of free pages that should be removed by the\n** autovacuum.  ^If the callback returns zero, then no autovacuum happens.\n** ^If the value returned is greater than or equal to the number of\n** free pages, then a complete autovacuum happens.\n**\n** <p>^If there are multiple ATTACH-ed database files that are being\n** modified as part of a transaction commit, then the autovacuum pages\n** callback is invoked separately for each file.\n**\n** <p><b>The callback is not reentrant.</b> The callback function should\n** not attempt to invoke any other SQLite interface.  If it does, bad\n** things may happen, including segmentation faults and corrupt database\n** files.  The callback function should be a simple function that\n** does some arithmetic on its input parameters and returns a result.\n**\n** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional\n** destructor for the P parameter.  ^If X is not NULL, then X(P) is\n** invoked whenever the database connection closes or when the callback\n** is overwritten by another invocation of sqlite3_autovacuum_pages().\n**\n** <p>^There is only one autovacuum pages callback per database connection.\n** ^Each call to the sqlite3_autovacuum_pages() interface overrides all\n** previous invocations for that database connection.  ^If the callback\n** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,\n** then the autovacuum steps callback is canceled.  The return value\n** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might\n** be some other error code if something goes wrong.  The current\n** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other\n** return codes might be added in future releases.\n**\n** <p>If no autovacuum pages callback is specified (the usual case) or\n** a NULL pointer is provided for the callback,\n** then the default behavior is to vacuum all free pages.  So, in other\n** words, the default behavior is the same as if the callback function\n** were something like this:\n**\n** <blockquote><pre>\n** &nbsp;   unsigned int demonstration_autovac_pages_callback(\n** &nbsp;     void *pClientData,\n** &nbsp;     const char *zSchema,\n** &nbsp;     unsigned int nDbPage,\n** &nbsp;     unsigned int nFreePage,\n** &nbsp;     unsigned int nBytePerPage\n** &nbsp;   ){\n** &nbsp;     return nFreePage;\n** &nbsp;   }\n** </pre></blockquote>\n*/\nSQLITE_API int sqlite3_autovacuum_pages(\n  sqlite3 *db,\n  unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),\n  void*,\n  void(*)(void*)\n);\n\n\n/*\n** CAPI3REF: Data Change Notification Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_update_hook() interface registers a callback function\n** with the [database connection] identified by the first argument\n** to be invoked whenever a row is updated, inserted or deleted in\n** a [rowid table].\n** ^Any callback set by a previous call to this function\n** for the same database connection is overridden.\n**\n** ^The second argument is a pointer to the function to invoke when a\n** row is updated, inserted or deleted in a rowid table.\n** ^The update hook is disabled by invoking sqlite3_update_hook()\n** with a NULL pointer as the second parameter.\n** ^The first argument to the callback is a copy of the third argument\n** to sqlite3_update_hook().\n** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],\n** or [SQLITE_UPDATE], depending on the operation that caused the callback\n** to be invoked.\n** ^The third and fourth arguments to the callback contain pointers to the\n** database and table name containing the affected row.\n** ^The final callback parameter is the [rowid] of the row.\n** ^In the case of an update, this is the [rowid] after the update takes place.\n**\n** ^(The update hook is not invoked when internal system tables are\n** modified (i.e. sqlite_sequence).)^\n** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified.\n**\n** ^In the current implementation, the update hook\n** is not invoked when conflicting rows are deleted because of an\n** [ON CONFLICT | ON CONFLICT REPLACE] clause.  ^Nor is the update hook\n** invoked when rows are deleted using the [truncate optimization].\n** The exceptions defined in this paragraph might change in a future\n** release of SQLite.\n**\n** Whether the update hook is invoked before or after the\n** corresponding change is currently unspecified and may differ\n** depending on the type of change. Do not rely on the order of the\n** hook call with regards to the final result of the operation which\n** triggers the hook.\n**\n** The update hook implementation must not do anything that will modify\n** the database connection that invoked the update hook.  Any actions\n** to modify the database connection must be deferred until after the\n** completion of the [sqlite3_step()] call that triggered the update hook.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^The sqlite3_update_hook(D,C,P) function\n** returns the P argument from the previous call\n** on the same [database connection] D, or NULL for\n** the first call on D.\n**\n** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],\n** and [sqlite3_preupdate_hook()] interfaces.\n*/\nSQLITE_API void *sqlite3_update_hook(\n  sqlite3*,\n  void(*)(void *,int ,char const *,char const *,sqlite3_int64),\n  void*\n);\n\n/*\n** CAPI3REF: Enable Or Disable Shared Pager Cache\n**\n** ^(This routine enables or disables the sharing of the database cache\n** and schema data structures between [database connection | connections]\n** to the same database. Sharing is enabled if the argument is true\n** and disabled if the argument is false.)^\n**\n** This interface is omitted if SQLite is compiled with\n** [-DSQLITE_OMIT_SHARED_CACHE].  The [-DSQLITE_OMIT_SHARED_CACHE]\n** compile-time option is recommended because the\n** [use of shared cache mode is discouraged].\n**\n** ^Cache sharing is enabled and disabled for an entire process.\n** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]).\n** In prior versions of SQLite,\n** sharing was enabled or disabled for each thread separately.\n**\n** ^(The cache sharing mode set by this interface effects all subsequent\n** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].\n** Existing database connections continue to use the sharing mode\n** that was in effect at the time they were opened.)^\n**\n** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled\n** successfully.  An [error code] is returned otherwise.)^\n**\n** ^Shared cache is disabled by default. It is recommended that it stay\n** that way.  In other words, do not use this routine.  This interface\n** continues to be provided for historical compatibility, but its use is\n** discouraged.  Any use of shared cache is discouraged.  If shared cache\n** must be used, it is recommended that shared cache only be enabled for\n** individual database connections using the [sqlite3_open_v2()] interface\n** with the [SQLITE_OPEN_SHAREDCACHE] flag.\n**\n** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0\n** and will always return SQLITE_MISUSE. On those systems,\n** shared cache mode should be enabled per-database connection via\n** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE].\n**\n** This interface is threadsafe on processors where writing a\n** 32-bit integer is atomic.\n**\n** See Also:  [SQLite Shared-Cache Mode]\n*/\nSQLITE_API int sqlite3_enable_shared_cache(int);\n\n/*\n** CAPI3REF: Attempt To Free Heap Memory\n**\n** ^The sqlite3_release_memory() interface attempts to free N bytes\n** of heap memory by deallocating non-essential memory allocations\n** held by the database library.   Memory used to cache database\n** pages to improve performance is an example of non-essential memory.\n** ^sqlite3_release_memory() returns the number of bytes actually freed,\n** which might be more or less than the amount requested.\n** ^The sqlite3_release_memory() routine is a no-op returning zero\n** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].\n**\n** See also: [sqlite3_db_release_memory()]\n*/\nSQLITE_API int sqlite3_release_memory(int);\n\n/*\n** CAPI3REF: Free Memory Used By A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap\n** memory as possible from database connection D. Unlike the\n** [sqlite3_release_memory()] interface, this interface is in effect even\n** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is\n** omitted.\n**\n** See also: [sqlite3_release_memory()]\n*/\nSQLITE_API int sqlite3_db_release_memory(sqlite3*);\n\n/*\n** CAPI3REF: Impose A Limit On Heap Size\n**\n** These interfaces impose limits on the amount of heap memory that will be\n** used by all database connections within a single process.\n**\n** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the\n** soft limit on the amount of heap memory that may be allocated by SQLite.\n** ^SQLite strives to keep heap memory utilization below the soft heap\n** limit by reducing the number of pages held in the page cache\n** as heap memory usages approaches the limit.\n** ^The soft heap limit is \"soft\" because even though SQLite strives to stay\n** below the limit, it will exceed the limit rather than generate\n** an [SQLITE_NOMEM] error.  In other words, the soft heap limit\n** is advisory only.\n**\n** ^The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of\n** N bytes on the amount of memory that will be allocated.  ^The\n** sqlite3_hard_heap_limit64(N) interface is similar to\n** sqlite3_soft_heap_limit64(N) except that memory allocations will fail\n** when the hard heap limit is reached.\n**\n** ^The return value from both sqlite3_soft_heap_limit64() and\n** sqlite3_hard_heap_limit64() is the size of\n** the heap limit prior to the call, or negative in the case of an\n** error.  ^If the argument N is negative\n** then no change is made to the heap limit.  Hence, the current\n** size of heap limits can be determined by invoking\n** sqlite3_soft_heap_limit64(-1) or sqlite3_hard_heap_limit(-1).\n**\n** ^Setting the heap limits to zero disables the heap limiter mechanism.\n**\n** ^The soft heap limit may not be greater than the hard heap limit.\n** ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N)\n** is invoked with a value of N that is greater than the hard heap limit,\n** the soft heap limit is set to the value of the hard heap limit.\n** ^The soft heap limit is automatically enabled whenever the hard heap\n** limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and\n** the soft heap limit is outside the range of 1..N, then the soft heap\n** limit is set to N.  ^Invoking sqlite3_soft_heap_limit64(0) when the\n** hard heap limit is enabled makes the soft heap limit equal to the\n** hard heap limit.\n**\n** The memory allocation limits can also be adjusted using\n** [PRAGMA soft_heap_limit] and [PRAGMA hard_heap_limit].\n**\n** ^(The heap limits are not enforced in the current implementation\n** if one or more of following conditions are true:\n**\n** <ul>\n** <li> The limit value is set to zero.\n** <li> Memory accounting is disabled using a combination of the\n**      [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and\n**      the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.\n** <li> An alternative page cache implementation is specified using\n**      [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...).\n** <li> The page cache allocates from its own memory pool supplied\n**      by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than\n**      from the heap.\n** </ul>)^\n**\n** The circumstances under which SQLite will enforce the heap limits may\n** change in future releases of SQLite.\n*/\nSQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);\nSQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);\n\n/*\n** CAPI3REF: Deprecated Soft Heap Limit Interface\n** DEPRECATED\n**\n** This is a deprecated version of the [sqlite3_soft_heap_limit64()]\n** interface.  This routine is provided for historical compatibility\n** only.  All new applications should use the\n** [sqlite3_soft_heap_limit64()] interface rather than this one.\n*/\nSQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);\n\n\n/*\n** CAPI3REF: Extract Metadata About A Column Of A Table\n** METHOD: sqlite3\n**\n** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns\n** information about column C of table T in database D\n** on [database connection] X.)^  ^The sqlite3_table_column_metadata()\n** interface returns SQLITE_OK and fills in the non-NULL pointers in\n** the final five arguments with appropriate values if the specified\n** column exists.  ^The sqlite3_table_column_metadata() interface returns\n** SQLITE_ERROR if the specified column does not exist.\n** ^If the column-name parameter to sqlite3_table_column_metadata() is a\n** NULL pointer, then this routine simply checks for the existence of the\n** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it\n** does not.  If the table name parameter T in a call to\n** sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is\n** undefined behavior.\n**\n** ^The column is identified by the second, third and fourth parameters to\n** this function. ^(The second parameter is either the name of the database\n** (i.e. \"main\", \"temp\", or an attached database) containing the specified\n** table or NULL.)^ ^If it is NULL, then all attached databases are searched\n** for the table using the same algorithm used by the database engine to\n** resolve unqualified table references.\n**\n** ^The third and fourth parameters to this function are the table and column\n** name of the desired column, respectively.\n**\n** ^Metadata is returned by writing to the memory locations passed as the 5th\n** and subsequent parameters to this function. ^Any of these arguments may be\n** NULL, in which case the corresponding element of metadata is omitted.\n**\n** ^(<blockquote>\n** <table border=\"1\">\n** <tr><th> Parameter <th> Output<br>Type <th>  Description\n**\n** <tr><td> 5th <td> const char* <td> Data type\n** <tr><td> 6th <td> const char* <td> Name of default collation sequence\n** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint\n** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY\n** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]\n** </table>\n** </blockquote>)^\n**\n** ^The memory pointed to by the character pointers returned for the\n** declaration type and collation sequence is valid until the next\n** call to any SQLite API function.\n**\n** ^If the specified table is actually a view, an [error code] is returned.\n**\n** ^If the specified column is \"rowid\", \"oid\" or \"_rowid_\" and the table\n** is not a [WITHOUT ROWID] table and an\n** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output\n** parameters are set for the explicitly declared column. ^(If there is no\n** [INTEGER PRIMARY KEY] column, then the outputs\n** for the [rowid] are set as follows:\n**\n** <pre>\n**     data type: \"INTEGER\"\n**     collation sequence: \"BINARY\"\n**     not null: 0\n**     primary key: 1\n**     auto increment: 0\n** </pre>)^\n**\n** ^This function causes all database schemas to be read from disk and\n** parsed, if that has not already been done, and returns an error if\n** any errors are encountered while loading the schema.\n*/\nSQLITE_API int sqlite3_table_column_metadata(\n  sqlite3 *db,                /* Connection handle */\n  const char *zDbName,        /* Database name or NULL */\n  const char *zTableName,     /* Table name */\n  const char *zColumnName,    /* Column name */\n  char const **pzDataType,    /* OUTPUT: Declared data type */\n  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */\n  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */\n  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */\n  int *pAutoinc               /* OUTPUT: True if column is auto-increment */\n);\n\n/*\n** CAPI3REF: Load An Extension\n** METHOD: sqlite3\n**\n** ^This interface loads an SQLite extension library from the named file.\n**\n** ^The sqlite3_load_extension() interface attempts to load an\n** [SQLite extension] library contained in the file zFile.  If\n** the file cannot be loaded directly, attempts are made to load\n** with various operating-system specific extensions added.\n** So for example, if \"samplelib\" cannot be loaded, then names like\n** \"samplelib.so\" or \"samplelib.dylib\" or \"samplelib.dll\" might\n** be tried also.\n**\n** ^The entry point is zProc.\n** ^(zProc may be 0, in which case SQLite will try to come up with an\n** entry point name on its own.  It first tries \"sqlite3_extension_init\".\n** If that does not work, it constructs a name \"sqlite3_X_init\" where\n** X consists of the lower-case equivalent of all ASCII alphabetic\n** characters in the filename from the last \"/\" to the first following\n** \".\" and omitting any initial \"lib\".)^\n** ^The sqlite3_load_extension() interface returns\n** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.\n** ^If an error occurs and pzErrMsg is not 0, then the\n** [sqlite3_load_extension()] interface shall attempt to\n** fill *pzErrMsg with error message text stored in memory\n** obtained from [sqlite3_malloc()]. The calling function\n** should free this memory by calling [sqlite3_free()].\n**\n** ^Extension loading must be enabled using\n** [sqlite3_enable_load_extension()] or\n** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)\n** prior to calling this API,\n** otherwise an error will be returned.\n**\n** <b>Security warning:</b> It is recommended that the\n** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this\n** interface.  The use of the [sqlite3_enable_load_extension()] interface\n** should be avoided.  This will keep the SQL function [load_extension()]\n** disabled and prevent SQL injections from giving attackers\n** access to extension loading capabilities.\n**\n** See also the [load_extension() SQL function].\n*/\nSQLITE_API int sqlite3_load_extension(\n  sqlite3 *db,          /* Load the extension into this database connection */\n  const char *zFile,    /* Name of the shared library containing extension */\n  const char *zProc,    /* Entry point.  Derived from zFile if 0 */\n  char **pzErrMsg       /* Put error message here if not 0 */\n);\n\n/*\n** CAPI3REF: Enable Or Disable Extension Loading\n** METHOD: sqlite3\n**\n** ^So as not to open security holes in older applications that are\n** unprepared to deal with [extension loading], and as a means of disabling\n** [extension loading] while evaluating user-entered SQL, the following API\n** is provided to turn the [sqlite3_load_extension()] mechanism on and off.\n**\n** ^Extension loading is off by default.\n** ^Call the sqlite3_enable_load_extension() routine with onoff==1\n** to turn extension loading on and call it with onoff==0 to turn\n** it back off again.\n**\n** ^This interface enables or disables both the C-API\n** [sqlite3_load_extension()] and the SQL function [load_extension()].\n** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)\n** to enable or disable only the C-API.)^\n**\n** <b>Security warning:</b> It is recommended that extension loading\n** be enabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method\n** rather than this interface, so the [load_extension()] SQL function\n** remains disabled. This will prevent SQL injections from giving attackers\n** access to extension loading capabilities.\n*/\nSQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);\n\n/*\n** CAPI3REF: Automatically Load Statically Linked Extensions\n**\n** ^This interface causes the xEntryPoint() function to be invoked for\n** each new [database connection] that is created.  The idea here is that\n** xEntryPoint() is the entry point for a statically linked [SQLite extension]\n** that is to be automatically loaded into all new database connections.\n**\n** ^(Even though the function prototype shows that xEntryPoint() takes\n** no arguments and returns void, SQLite invokes xEntryPoint() with three\n** arguments and expects an integer result as if the signature of the\n** entry point were as follows:\n**\n** <blockquote><pre>\n** &nbsp;  int xEntryPoint(\n** &nbsp;    sqlite3 *db,\n** &nbsp;    const char **pzErrMsg,\n** &nbsp;    const struct sqlite3_api_routines *pThunk\n** &nbsp;  );\n** </pre></blockquote>)^\n**\n** If the xEntryPoint routine encounters an error, it should make *pzErrMsg\n** point to an appropriate error message (obtained from [sqlite3_mprintf()])\n** and return an appropriate [error code].  ^SQLite ensures that *pzErrMsg\n** is NULL before calling the xEntryPoint().  ^SQLite will invoke\n** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns.  ^If any\n** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],\n** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.\n**\n** ^Calling sqlite3_auto_extension(X) with an entry point X that is already\n** on the list of automatic extensions is a harmless no-op. ^No entry point\n** will be called more than once for each database connection that is opened.\n**\n** See also: [sqlite3_reset_auto_extension()]\n** and [sqlite3_cancel_auto_extension()]\n*/\nSQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));\n\n/*\n** CAPI3REF: Cancel Automatic Extension Loading\n**\n** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the\n** initialization routine X that was registered using a prior call to\n** [sqlite3_auto_extension(X)].  ^The [sqlite3_cancel_auto_extension(X)]\n** routine returns 1 if initialization routine X was successfully\n** unregistered and it returns 0 if X was not on the list of initialization\n** routines.\n*/\nSQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));\n\n/*\n** CAPI3REF: Reset Automatic Extension Loading\n**\n** ^This interface disables all automatic extensions previously\n** registered using [sqlite3_auto_extension()].\n*/\nSQLITE_API void sqlite3_reset_auto_extension(void);\n\n/*\n** Structures used by the virtual table interface\n*/\ntypedef struct sqlite3_vtab sqlite3_vtab;\ntypedef struct sqlite3_index_info sqlite3_index_info;\ntypedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;\ntypedef struct sqlite3_module sqlite3_module;\n\n/*\n** CAPI3REF: Virtual Table Object\n** KEYWORDS: sqlite3_module {virtual table module}\n**\n** This structure, sometimes called a \"virtual table module\",\n** defines the implementation of a [virtual table].\n** This structure consists mostly of methods for the module.\n**\n** ^A virtual table module is created by filling in a persistent\n** instance of this structure and passing a pointer to that instance\n** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].\n** ^The registration remains valid until it is replaced by a different\n** module or until the [database connection] closes.  The content\n** of this structure must not change while it is registered with\n** any database connection.\n*/\nstruct sqlite3_module {\n  int iVersion;\n  int (*xCreate)(sqlite3*, void *pAux,\n               int argc, const char *const*argv,\n               sqlite3_vtab **ppVTab, char**);\n  int (*xConnect)(sqlite3*, void *pAux,\n               int argc, const char *const*argv,\n               sqlite3_vtab **ppVTab, char**);\n  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);\n  int (*xDisconnect)(sqlite3_vtab *pVTab);\n  int (*xDestroy)(sqlite3_vtab *pVTab);\n  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);\n  int (*xClose)(sqlite3_vtab_cursor*);\n  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,\n                int argc, sqlite3_value **argv);\n  int (*xNext)(sqlite3_vtab_cursor*);\n  int (*xEof)(sqlite3_vtab_cursor*);\n  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);\n  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);\n  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);\n  int (*xBegin)(sqlite3_vtab *pVTab);\n  int (*xSync)(sqlite3_vtab *pVTab);\n  int (*xCommit)(sqlite3_vtab *pVTab);\n  int (*xRollback)(sqlite3_vtab *pVTab);\n  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,\n                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),\n                       void **ppArg);\n  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);\n  /* The methods above are in version 1 of the sqlite_module object. Those\n  ** below are for version 2 and greater. */\n  int (*xSavepoint)(sqlite3_vtab *pVTab, int);\n  int (*xRelease)(sqlite3_vtab *pVTab, int);\n  int (*xRollbackTo)(sqlite3_vtab *pVTab, int);\n  /* The methods above are in versions 1 and 2 of the sqlite_module object.\n  ** Those below are for version 3 and greater. */\n  int (*xShadowName)(const char*);\n  /* The methods above are in versions 1 through 3 of the sqlite_module object.\n  ** Those below are for version 4 and greater. */\n  int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,\n                    const char *zTabName, int mFlags, char **pzErr);\n};\n\n/*\n** CAPI3REF: Virtual Table Indexing Information\n** KEYWORDS: sqlite3_index_info\n**\n** The sqlite3_index_info structure and its substructures is used as part\n** of the [virtual table] interface to\n** pass information into and receive the reply from the [xBestIndex]\n** method of a [virtual table module].  The fields under **Inputs** are the\n** inputs to xBestIndex and are read-only.  xBestIndex inserts its\n** results into the **Outputs** fields.\n**\n** ^(The aConstraint[] array records WHERE clause constraints of the form:\n**\n** <blockquote>column OP expr</blockquote>\n**\n** where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is\n** stored in aConstraint[].op using one of the\n** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^\n** ^(The index of the column is stored in\n** aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the\n** expr on the right-hand side can be evaluated (and thus the constraint\n** is usable) and false if it cannot.)^\n**\n** ^The optimizer automatically inverts terms of the form \"expr OP column\"\n** and makes other simplifications to the WHERE clause in an attempt to\n** get as many WHERE clause terms into the form shown above as possible.\n** ^The aConstraint[] array only reports WHERE clause terms that are\n** relevant to the particular virtual table being queried.\n**\n** ^Information about the ORDER BY clause is stored in aOrderBy[].\n** ^Each term of aOrderBy records a column of the ORDER BY clause.\n**\n** The colUsed field indicates which columns of the virtual table may be\n** required by the current scan. Virtual table columns are numbered from\n** zero in the order in which they appear within the CREATE TABLE statement\n** passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),\n** the corresponding bit is set within the colUsed mask if the column may be\n** required by SQLite. If the table has at least 64 columns and any column\n** to the right of the first 63 is required, then bit 63 of colUsed is also\n** set. In other words, column iCol may be required if the expression\n** (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to\n** non-zero.\n**\n** The [xBestIndex] method must fill aConstraintUsage[] with information\n** about what parameters to pass to xFilter.  ^If argvIndex>0 then\n** the right-hand side of the corresponding aConstraint[] is evaluated\n** and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit\n** is true, then the constraint is assumed to be fully handled by the\n** virtual table and might not be checked again by the byte code.)^ ^(The\n** aConstraintUsage[].omit flag is an optimization hint. When the omit flag\n** is left in its default setting of false, the constraint will always be\n** checked separately in byte code.  If the omit flag is changed to true, then\n** the constraint may or may not be checked in byte code.  In other words,\n** when the omit flag is true there is no guarantee that the constraint will\n** not be checked again using byte code.)^\n**\n** ^The idxNum and idxStr values are recorded and passed into the\n** [xFilter] method.\n** ^[sqlite3_free()] is used to free idxStr if and only if\n** needToFreeIdxStr is true.\n**\n** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in\n** the correct order to satisfy the ORDER BY clause so that no separate\n** sorting step is required.\n**\n** ^The estimatedCost value is an estimate of the cost of a particular\n** strategy. A cost of N indicates that the cost of the strategy is similar\n** to a linear scan of an SQLite table with N rows. A cost of log(N)\n** indicates that the expense of the operation is similar to that of a\n** binary search on a unique indexed field of an SQLite table with N rows.\n**\n** ^The estimatedRows value is an estimate of the number of rows that\n** will be returned by the strategy.\n**\n** The xBestIndex method may optionally populate the idxFlags field with a\n** mask of SQLITE_INDEX_SCAN_* flags. One such flag is\n** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]\n** output to show the idxNum as hex instead of as decimal.  Another flag is\n** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will\n** return at most one row.\n**\n** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then\n** SQLite also assumes that if a call to the xUpdate() method is made as\n** part of the same statement to delete or update a virtual table row and the\n** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback\n** any database changes. In other words, if the xUpdate() returns\n** SQLITE_CONSTRAINT, the database contents must be exactly as they were\n** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not\n** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by\n** the xUpdate method are automatically rolled back by SQLite.\n**\n** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info\n** structure for SQLite [version 3.8.2] ([dateof:3.8.2]).\n** If a virtual table extension is\n** used with an SQLite version earlier than 3.8.2, the results of attempting\n** to read or write the estimatedRows field are undefined (but are likely\n** to include crashing the application). The estimatedRows field should\n** therefore only be used if [sqlite3_libversion_number()] returns a\n** value greater than or equal to 3008002. Similarly, the idxFlags field\n** was added for [version 3.9.0] ([dateof:3.9.0]).\n** It may therefore only be used if\n** sqlite3_libversion_number() returns a value greater than or equal to\n** 3009000.\n*/\nstruct sqlite3_index_info {\n  /* Inputs */\n  int nConstraint;           /* Number of entries in aConstraint */\n  struct sqlite3_index_constraint {\n     int iColumn;              /* Column constrained.  -1 for ROWID */\n     unsigned char op;         /* Constraint operator */\n     unsigned char usable;     /* True if this constraint is usable */\n     int iTermOffset;          /* Used internally - xBestIndex should ignore */\n  } *aConstraint;            /* Table of WHERE clause constraints */\n  int nOrderBy;              /* Number of terms in the ORDER BY clause */\n  struct sqlite3_index_orderby {\n     int iColumn;              /* Column number */\n     unsigned char desc;       /* True for DESC.  False for ASC. */\n  } *aOrderBy;               /* The ORDER BY clause */\n  /* Outputs */\n  struct sqlite3_index_constraint_usage {\n    int argvIndex;           /* if >0, constraint is part of argv to xFilter */\n    unsigned char omit;      /* Do not code a test for this constraint */\n  } *aConstraintUsage;\n  int idxNum;                /* Number used to identify the index */\n  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */\n  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */\n  int orderByConsumed;       /* True if output is already ordered */\n  double estimatedCost;           /* Estimated cost of using this index */\n  /* Fields below are only available in SQLite 3.8.2 and later */\n  sqlite3_int64 estimatedRows;    /* Estimated number of rows returned */\n  /* Fields below are only available in SQLite 3.9.0 and later */\n  int idxFlags;              /* Mask of SQLITE_INDEX_SCAN_* flags */\n  /* Fields below are only available in SQLite 3.10.0 and later */\n  sqlite3_uint64 colUsed;    /* Input: Mask of columns used by statement */\n};\n\n/*\n** CAPI3REF: Virtual Table Scan Flags\n**\n** Virtual table implementations are allowed to set the\n** [sqlite3_index_info].idxFlags field to some combination of\n** these bits.\n*/\n#define SQLITE_INDEX_SCAN_UNIQUE 0x00000001 /* Scan visits at most 1 row */\n#define SQLITE_INDEX_SCAN_HEX    0x00000002 /* Display idxNum as hex */\n                                            /* in EXPLAIN QUERY PLAN */\n\n/*\n** CAPI3REF: Virtual Table Constraint Operator Codes\n**\n** These macros define the allowed values for the\n** [sqlite3_index_info].aConstraint[].op field.  Each value represents\n** an operator that is part of a constraint term in the WHERE clause of\n** a query that uses a [virtual table].\n**\n** ^The left-hand operand of the operator is given by the corresponding\n** aConstraint[].iColumn field.  ^An iColumn of -1 indicates the left-hand\n** operand is the rowid.\n** The SQLITE_INDEX_CONSTRAINT_LIMIT and SQLITE_INDEX_CONSTRAINT_OFFSET\n** operators have no left-hand operand, and so for those operators the\n** corresponding aConstraint[].iColumn is meaningless and should not be\n** used.\n**\n** All operator values from SQLITE_INDEX_CONSTRAINT_FUNCTION through\n** value 255 are reserved to represent functions that are overloaded\n** by the [xFindFunction|xFindFunction method] of the virtual table\n** implementation.\n**\n** The right-hand operands for each constraint might be accessible using\n** the [sqlite3_vtab_rhs_value()] interface.  Usually the right-hand\n** operand is only available if it appears as a single constant literal\n** in the input SQL.  If the right-hand operand is another column or an\n** expression (even a constant expression) or a parameter, then the\n** sqlite3_vtab_rhs_value() probably will not be able to extract it.\n** ^The SQLITE_INDEX_CONSTRAINT_ISNULL and\n** SQLITE_INDEX_CONSTRAINT_ISNOTNULL operators have no right-hand operand\n** and hence calls to sqlite3_vtab_rhs_value() for those operators will\n** always return SQLITE_NOTFOUND.\n**\n** The collating sequence to be used for comparison can be found using\n** the [sqlite3_vtab_collation()] interface.  For most real-world virtual\n** tables, the collating sequence of constraints does not matter (for example\n** because the constraints are numeric) and so the sqlite3_vtab_collation()\n** interface is not commonly needed.\n*/\n#define SQLITE_INDEX_CONSTRAINT_EQ          2\n#define SQLITE_INDEX_CONSTRAINT_GT          4\n#define SQLITE_INDEX_CONSTRAINT_LE          8\n#define SQLITE_INDEX_CONSTRAINT_LT         16\n#define SQLITE_INDEX_CONSTRAINT_GE         32\n#define SQLITE_INDEX_CONSTRAINT_MATCH      64\n#define SQLITE_INDEX_CONSTRAINT_LIKE       65\n#define SQLITE_INDEX_CONSTRAINT_GLOB       66\n#define SQLITE_INDEX_CONSTRAINT_REGEXP     67\n#define SQLITE_INDEX_CONSTRAINT_NE         68\n#define SQLITE_INDEX_CONSTRAINT_ISNOT      69\n#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL  70\n#define SQLITE_INDEX_CONSTRAINT_ISNULL     71\n#define SQLITE_INDEX_CONSTRAINT_IS         72\n#define SQLITE_INDEX_CONSTRAINT_LIMIT      73\n#define SQLITE_INDEX_CONSTRAINT_OFFSET     74\n#define SQLITE_INDEX_CONSTRAINT_FUNCTION  150\n\n/*\n** CAPI3REF: Register A Virtual Table Implementation\n** METHOD: sqlite3\n**\n** ^These routines are used to register a new [virtual table module] name.\n** ^Module names must be registered before\n** creating a new [virtual table] using the module and before using a\n** preexisting [virtual table] for the module.\n**\n** ^The module name is registered on the [database connection] specified\n** by the first parameter.  ^The name of the module is given by the\n** second parameter.  ^The third parameter is a pointer to\n** the implementation of the [virtual table module].   ^The fourth\n** parameter is an arbitrary client data pointer that is passed through\n** into the [xCreate] and [xConnect] methods of the virtual table module\n** when a new virtual table is being created or reinitialized.\n**\n** ^The sqlite3_create_module_v2() interface has a fifth parameter which\n** is a pointer to a destructor for the pClientData.  ^SQLite will\n** invoke the destructor function (if it is not NULL) when SQLite\n** no longer needs the pClientData pointer.  ^The destructor will also\n** be invoked if the call to sqlite3_create_module_v2() fails.\n** ^The sqlite3_create_module()\n** interface is equivalent to sqlite3_create_module_v2() with a NULL\n** destructor.\n**\n** ^If the third parameter (the pointer to the sqlite3_module object) is\n** NULL then no new module is created and any existing modules with the\n** same name are dropped.\n**\n** See also: [sqlite3_drop_modules()]\n*/\nSQLITE_API int sqlite3_create_module(\n  sqlite3 *db,               /* SQLite connection to register module with */\n  const char *zName,         /* Name of the module */\n  const sqlite3_module *p,   /* Methods for the module */\n  void *pClientData          /* Client data for xCreate/xConnect */\n);\nSQLITE_API int sqlite3_create_module_v2(\n  sqlite3 *db,               /* SQLite connection to register module with */\n  const char *zName,         /* Name of the module */\n  const sqlite3_module *p,   /* Methods for the module */\n  void *pClientData,         /* Client data for xCreate/xConnect */\n  void(*xDestroy)(void*)     /* Module destructor function */\n);\n\n/*\n** CAPI3REF: Remove Unnecessary Virtual Table Implementations\n** METHOD: sqlite3\n**\n** ^The sqlite3_drop_modules(D,L) interface removes all virtual\n** table modules from database connection D except those named on list L.\n** The L parameter must be either NULL or a pointer to an array of pointers\n** to strings where the array is terminated by a single NULL pointer.\n** ^If the L parameter is NULL, then all virtual table modules are removed.\n**\n** See also: [sqlite3_create_module()]\n*/\nSQLITE_API int sqlite3_drop_modules(\n  sqlite3 *db,                /* Remove modules from this connection */\n  const char **azKeep         /* Except, do not remove the ones named here */\n);\n\n/*\n** CAPI3REF: Virtual Table Instance Object\n** KEYWORDS: sqlite3_vtab\n**\n** Every [virtual table module] implementation uses a subclass\n** of this object to describe a particular instance\n** of the [virtual table].  Each subclass will\n** be tailored to the specific needs of the module implementation.\n** The purpose of this superclass is to define certain fields that are\n** common to all module implementations.\n**\n** ^Virtual tables methods can set an error message by assigning a\n** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should\n** take care that any prior string is freed by a call to [sqlite3_free()]\n** prior to assigning a new string to zErrMsg.  ^After the error message\n** is delivered up to the client application, the string will be automatically\n** freed by sqlite3_free() and the zErrMsg field will be zeroed.\n*/\nstruct sqlite3_vtab {\n  const sqlite3_module *pModule;  /* The module for this virtual table */\n  int nRef;                       /* Number of open cursors */\n  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */\n  /* Virtual table implementations will typically add additional fields */\n};\n\n/*\n** CAPI3REF: Virtual Table Cursor Object\n** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}\n**\n** Every [virtual table module] implementation uses a subclass of the\n** following structure to describe cursors that point into the\n** [virtual table] and are used\n** to loop through the virtual table.  Cursors are created using the\n** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed\n** by the [sqlite3_module.xClose | xClose] method.  Cursors are used\n** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods\n** of the module.  Each module implementation will define\n** the content of a cursor structure to suit its own needs.\n**\n** This superclass exists in order to define fields of the cursor that\n** are common to all implementations.\n*/\nstruct sqlite3_vtab_cursor {\n  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */\n  /* Virtual table implementations will typically add additional fields */\n};\n\n/*\n** CAPI3REF: Declare The Schema Of A Virtual Table\n**\n** ^The [xCreate] and [xConnect] methods of a\n** [virtual table module] call this interface\n** to declare the format (the names and datatypes of the columns) of\n** the virtual tables they implement.\n*/\nSQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);\n\n/*\n** CAPI3REF: Overload A Function For A Virtual Table\n** METHOD: sqlite3\n**\n** ^(Virtual tables can provide alternative implementations of functions\n** using the [xFindFunction] method of the [virtual table module].\n** But global versions of those functions\n** must exist in order to be overloaded.)^\n**\n** ^(This API makes sure a global version of a function with a particular\n** name and number of parameters exists.  If no such function exists\n** before this API is called, a new function is created.)^  ^The implementation\n** of the new function always causes an exception to be thrown.  So\n** the new function is not good for anything by itself.  Its only\n** purpose is to be a placeholder function that can be overloaded\n** by a [virtual table].\n*/\nSQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);\n\n/*\n** CAPI3REF: A Handle To An Open BLOB\n** KEYWORDS: {BLOB handle} {BLOB handles}\n**\n** An instance of this object represents an open BLOB on which\n** [sqlite3_blob_open | incremental BLOB I/O] can be performed.\n** ^Objects of this type are created by [sqlite3_blob_open()]\n** and destroyed by [sqlite3_blob_close()].\n** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces\n** can be used to read or write small subsections of the BLOB.\n** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.\n*/\ntypedef struct sqlite3_blob sqlite3_blob;\n\n/*\n** CAPI3REF: Open A BLOB For Incremental I/O\n** METHOD: sqlite3\n** CONSTRUCTOR: sqlite3_blob\n**\n** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located\n** in row iRow, column zColumn, table zTable in database zDb;\n** in other words, the same BLOB that would be selected by:\n**\n** <pre>\n**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;\n** </pre>)^\n**\n** ^(Parameter zDb is not the filename that contains the database, but\n** rather the symbolic name of the database. For attached databases, this is\n** the name that appears after the AS keyword in the [ATTACH] statement.\n** For the main database file, the database name is \"main\". For TEMP\n** tables, the database name is \"temp\".)^\n**\n** ^If the flags parameter is non-zero, then the BLOB is opened for read\n** and write access. ^If the flags parameter is zero, the BLOB is opened for\n** read-only access.\n**\n** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored\n** in *ppBlob. Otherwise an [error code] is returned and, unless the error\n** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided\n** the API is not misused, it is always safe to call [sqlite3_blob_close()]\n** on *ppBlob after this function returns.\n**\n** This function fails with SQLITE_ERROR if any of the following are true:\n** <ul>\n**   <li> ^(Database zDb does not exist)^,\n**   <li> ^(Table zTable does not exist within database zDb)^,\n**   <li> ^(Table zTable is a WITHOUT ROWID table)^,\n**   <li> ^(Column zColumn does not exist)^,\n**   <li> ^(Row iRow is not present in the table)^,\n**   <li> ^(The specified column of row iRow contains a value that is not\n**         a TEXT or BLOB value)^,\n**   <li> ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE\n**         constraint and the blob is being opened for read/write access)^,\n**   <li> ^([foreign key constraints | Foreign key constraints] are enabled,\n**         column zColumn is part of a [child key] definition and the blob is\n**         being opened for read/write access)^.\n** </ul>\n**\n** ^Unless it returns SQLITE_MISUSE, this function sets the\n** [database connection] error code and message accessible via\n** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.\n**\n** A BLOB referenced by sqlite3_blob_open() may be read using the\n** [sqlite3_blob_read()] interface and modified by using\n** [sqlite3_blob_write()].  The [BLOB handle] can be moved to a\n** different row of the same table using the [sqlite3_blob_reopen()]\n** interface.  However, the column, table, or database of a [BLOB handle]\n** cannot be changed after the [BLOB handle] is opened.\n**\n** ^(If the row that a BLOB handle points to is modified by an\n** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects\n** then the BLOB handle is marked as \"expired\".\n** This is true if any column of the row is changed, even a column\n** other than the one the BLOB handle is open on.)^\n** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for\n** an expired BLOB handle fail with a return code of [SQLITE_ABORT].\n** ^(Changes written into a BLOB prior to the BLOB expiring are not\n** rolled back by the expiration of the BLOB.  Such changes will eventually\n** commit if the transaction continues to completion.)^\n**\n** ^Use the [sqlite3_blob_bytes()] interface to determine the size of\n** the opened blob.  ^The size of a blob may not be changed by this\n** interface.  Use the [UPDATE] SQL command to change the size of a\n** blob.\n**\n** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces\n** and the built-in [zeroblob] SQL function may be used to create a\n** zero-filled blob to read or write using the incremental-blob interface.\n**\n** To avoid a resource leak, every open [BLOB handle] should eventually\n** be released by a call to [sqlite3_blob_close()].\n**\n** See also: [sqlite3_blob_close()],\n** [sqlite3_blob_reopen()], [sqlite3_blob_read()],\n** [sqlite3_blob_bytes()], [sqlite3_blob_write()].\n*/\nSQLITE_API int sqlite3_blob_open(\n  sqlite3*,\n  const char *zDb,\n  const char *zTable,\n  const char *zColumn,\n  sqlite3_int64 iRow,\n  int flags,\n  sqlite3_blob **ppBlob\n);\n\n/*\n** CAPI3REF: Move a BLOB Handle to a New Row\n** METHOD: sqlite3_blob\n**\n** ^This function is used to move an existing [BLOB handle] so that it points\n** to a different row of the same database table. ^The new row is identified\n** by the rowid value passed as the second argument. Only the row can be\n** changed. ^The database, table and column on which the blob handle is open\n** remain the same. Moving an existing [BLOB handle] to a new row is\n** faster than closing the existing handle and opening a new one.\n**\n** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -\n** it must exist and there must be either a blob or text value stored in\n** the nominated column.)^ ^If the new row is not present in the table, or if\n** it does not contain a blob or text value, or if another error occurs, an\n** SQLite error code is returned and the blob handle is considered aborted.\n** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or\n** [sqlite3_blob_reopen()] on an aborted blob handle immediately return\n** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle\n** always returns zero.\n**\n** ^This function sets the database handle error code and message.\n*/\nSQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);\n\n/*\n** CAPI3REF: Close A BLOB Handle\n** DESTRUCTOR: sqlite3_blob\n**\n** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed\n** unconditionally.  Even if this routine returns an error code, the\n** handle is still closed.)^\n**\n** ^If the blob handle being closed was opened for read-write access, and if\n** the database is in auto-commit mode and there are no other open read-write\n** blob handles or active write statements, the current transaction is\n** committed. ^If an error occurs while committing the transaction, an error\n** code is returned and the transaction rolled back.\n**\n** Calling this function with an argument that is not a NULL pointer or an\n** open blob handle results in undefined behavior. ^Calling this routine\n** with a null pointer (such as would be returned by a failed call to\n** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function\n** is passed a valid open blob handle, the values returned by the\n** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.\n*/\nSQLITE_API int sqlite3_blob_close(sqlite3_blob *);\n\n/*\n** CAPI3REF: Return The Size Of An Open BLOB\n** METHOD: sqlite3_blob\n**\n** ^Returns the size in bytes of the BLOB accessible via the\n** successfully opened [BLOB handle] in its only argument.  ^The\n** incremental blob I/O routines can only read or overwrite existing\n** blob content; they cannot change the size of a blob.\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n*/\nSQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);\n\n/*\n** CAPI3REF: Read Data From A BLOB Incrementally\n** METHOD: sqlite3_blob\n**\n** ^(This function is used to read data from an open [BLOB handle] into a\n** caller-supplied buffer. N bytes of data are copied into buffer Z\n** from the open BLOB, starting at offset iOffset.)^\n**\n** ^If offset iOffset is less than N bytes from the end of the BLOB,\n** [SQLITE_ERROR] is returned and no data is read.  ^If N or iOffset is\n** less than zero, [SQLITE_ERROR] is returned and no data is read.\n** ^The size of the blob (and hence the maximum value of N+iOffset)\n** can be determined using the [sqlite3_blob_bytes()] interface.\n**\n** ^An attempt to read from an expired [BLOB handle] fails with an\n** error code of [SQLITE_ABORT].\n**\n** ^(On success, sqlite3_blob_read() returns SQLITE_OK.\n** Otherwise, an [error code] or an [extended error code] is returned.)^\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n**\n** See also: [sqlite3_blob_write()].\n*/\nSQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);\n\n/*\n** CAPI3REF: Write Data Into A BLOB Incrementally\n** METHOD: sqlite3_blob\n**\n** ^(This function is used to write data into an open [BLOB handle] from a\n** caller-supplied buffer. N bytes of data are copied from the buffer Z\n** into the open BLOB, starting at offset iOffset.)^\n**\n** ^(On success, sqlite3_blob_write() returns SQLITE_OK.\n** Otherwise, an  [error code] or an [extended error code] is returned.)^\n** ^Unless SQLITE_MISUSE is returned, this function sets the\n** [database connection] error code and message accessible via\n** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.\n**\n** ^If the [BLOB handle] passed as the first argument was not opened for\n** writing (the flags parameter to [sqlite3_blob_open()] was zero),\n** this function returns [SQLITE_READONLY].\n**\n** This function may only modify the contents of the BLOB; it is\n** not possible to increase the size of a BLOB using this API.\n** ^If offset iOffset is less than N bytes from the end of the BLOB,\n** [SQLITE_ERROR] is returned and no data is written. The size of the\n** BLOB (and hence the maximum value of N+iOffset) can be determined\n** using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less\n** than zero [SQLITE_ERROR] is returned and no data is written.\n**\n** ^An attempt to write to an expired [BLOB handle] fails with an\n** error code of [SQLITE_ABORT].  ^Writes to the BLOB that occurred\n** before the [BLOB handle] expired are not rolled back by the\n** expiration of the handle, though of course those changes might\n** have been overwritten by the statement that expired the BLOB handle\n** or by other independent statements.\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n**\n** See also: [sqlite3_blob_read()].\n*/\nSQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);\n\n/*\n** CAPI3REF: Virtual File System Objects\n**\n** A virtual filesystem (VFS) is an [sqlite3_vfs] object\n** that SQLite uses to interact\n** with the underlying operating system.  Most SQLite builds come with a\n** single default VFS that is appropriate for the host computer.\n** New VFSes can be registered and existing VFSes can be unregistered.\n** The following interfaces are provided.\n**\n** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.\n** ^Names are case sensitive.\n** ^Names are zero-terminated UTF-8 strings.\n** ^If there is no match, a NULL pointer is returned.\n** ^If zVfsName is NULL then the default VFS is returned.\n**\n** ^New VFSes are registered with sqlite3_vfs_register().\n** ^Each new VFS becomes the default VFS if the makeDflt flag is set.\n** ^The same VFS can be registered multiple times without injury.\n** ^To make an existing VFS into the default VFS, register it again\n** with the makeDflt flag set.  If two different VFSes with the\n** same name are registered, the behavior is undefined.  If a\n** VFS is registered with a name that is NULL or an empty string,\n** then the behavior is undefined.\n**\n** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.\n** ^(If the default VFS is unregistered, another VFS is chosen as\n** the default.  The choice for the new VFS is arbitrary.)^\n*/\nSQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);\nSQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);\nSQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);\n\n/*\n** CAPI3REF: Mutexes\n**\n** The SQLite core uses these routines for thread\n** synchronization. Though they are intended for internal\n** use by SQLite, code that links against SQLite is\n** permitted to use any of these routines.\n**\n** The SQLite source code contains multiple implementations\n** of these mutex routines.  An appropriate implementation\n** is selected automatically at compile-time.  The following\n** implementations are available in the SQLite core:\n**\n** <ul>\n** <li>   SQLITE_MUTEX_PTHREADS\n** <li>   SQLITE_MUTEX_W32\n** <li>   SQLITE_MUTEX_NOOP\n** </ul>\n**\n** The SQLITE_MUTEX_NOOP implementation is a set of routines\n** that does no real locking and is appropriate for use in\n** a single-threaded application.  The SQLITE_MUTEX_PTHREADS and\n** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix\n** and Windows.\n**\n** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor\n** macro defined (with \"-DSQLITE_MUTEX_APPDEF=1\"), then no mutex\n** implementation is included with the library. In this case the\n** application must supply a custom mutex implementation using the\n** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function\n** before calling sqlite3_initialize() or any other public sqlite3_\n** function that calls sqlite3_initialize().\n**\n** ^The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()\n** routine returns NULL if it is unable to allocate the requested\n** mutex.  The argument to sqlite3_mutex_alloc() must be one of these\n** integer constants:\n**\n** <ul>\n** <li>  SQLITE_MUTEX_FAST\n** <li>  SQLITE_MUTEX_RECURSIVE\n** <li>  SQLITE_MUTEX_STATIC_MAIN\n** <li>  SQLITE_MUTEX_STATIC_MEM\n** <li>  SQLITE_MUTEX_STATIC_OPEN\n** <li>  SQLITE_MUTEX_STATIC_PRNG\n** <li>  SQLITE_MUTEX_STATIC_LRU\n** <li>  SQLITE_MUTEX_STATIC_PMEM\n** <li>  SQLITE_MUTEX_STATIC_APP1\n** <li>  SQLITE_MUTEX_STATIC_APP2\n** <li>  SQLITE_MUTEX_STATIC_APP3\n** <li>  SQLITE_MUTEX_STATIC_VFS1\n** <li>  SQLITE_MUTEX_STATIC_VFS2\n** <li>  SQLITE_MUTEX_STATIC_VFS3\n** </ul>\n**\n** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)\n** cause sqlite3_mutex_alloc() to create\n** a new mutex.  ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\n** The mutex implementation does not need to make a distinction\n** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n** not want to.  SQLite will only request a recursive mutex in\n** cases where it really needs one.  If a faster non-recursive mutex\n** implementation is available on the host platform, the mutex subsystem\n** might return such a mutex in response to SQLITE_MUTEX_FAST.\n**\n** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other\n** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return\n** a pointer to a static preexisting mutex.  ^Nine static mutexes are\n** used by the current version of SQLite.  Future versions of SQLite\n** may add additional static mutexes.  Static mutexes are for internal\n** use by SQLite only.  Applications that use SQLite mutexes should\n** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n** SQLITE_MUTEX_RECURSIVE.\n**\n** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n** returns a different mutex on every call.  ^For the static\n** mutex types, the same mutex is returned on every call that has\n** the same type number.\n**\n** ^The sqlite3_mutex_free() routine deallocates a previously\n** allocated dynamic mutex.  Attempting to deallocate a static\n** mutex results in undefined behavior.\n**\n** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  ^If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  ^The sqlite3_mutex_try() interface returns [SQLITE_OK]\n** upon successful entry.  ^(Mutexes created using\n** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.\n** In such cases, the\n** mutex must be exited an equal number of times before another thread\n** can enter.)^  If the same thread tries to enter any mutex other\n** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined.\n**\n** ^(Some systems (for example, Windows 95) do not support the operation\n** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()\n** will always return SQLITE_BUSY. In most cases the SQLite core only uses\n** sqlite3_mutex_try() as an optimization, so this is acceptable\n** behavior. The exceptions are unix builds that set the\n** SQLITE_ENABLE_SETLK_TIMEOUT build option. In that case a working\n** sqlite3_mutex_try() is required.)^\n**\n** ^The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.   The behavior\n** is undefined if the mutex is not currently entered by the\n** calling thread or is not currently allocated.\n**\n** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(),\n** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer,\n** then any of the four routines behaves as a no-op.\n**\n** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].\n*/\nSQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);\nSQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);\nSQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);\nSQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);\nSQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);\n\n/*\n** CAPI3REF: Mutex Methods Object\n**\n** An instance of this structure defines the low-level routines\n** used to allocate and use mutexes.\n**\n** Usually, the default mutex implementations provided by SQLite are\n** sufficient, however the application has the option of substituting a custom\n** implementation for specialized deployments or systems for which SQLite\n** does not provide a suitable implementation. In this case, the application\n** creates and populates an instance of this structure to pass\n** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.\n** Additionally, an instance of this structure can be used as an\n** output variable when querying the system for the current mutex\n** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.\n**\n** ^The xMutexInit method defined by this structure is invoked as\n** part of system initialization by the sqlite3_initialize() function.\n** ^The xMutexInit routine is called by SQLite exactly once for each\n** effective call to [sqlite3_initialize()].\n**\n** ^The xMutexEnd method defined by this structure is invoked as\n** part of system shutdown by the sqlite3_shutdown() function. The\n** implementation of this method is expected to release all outstanding\n** resources obtained by the mutex methods implementation, especially\n** those obtained by the xMutexInit method.  ^The xMutexEnd()\n** interface is invoked exactly once for each call to [sqlite3_shutdown()].\n**\n** ^(The remaining seven methods defined by this structure (xMutexAlloc,\n** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and\n** xMutexNotheld) implement the following interfaces (respectively):\n**\n** <ul>\n**   <li>  [sqlite3_mutex_alloc()] </li>\n**   <li>  [sqlite3_mutex_free()] </li>\n**   <li>  [sqlite3_mutex_enter()] </li>\n**   <li>  [sqlite3_mutex_try()] </li>\n**   <li>  [sqlite3_mutex_leave()] </li>\n**   <li>  [sqlite3_mutex_held()] </li>\n**   <li>  [sqlite3_mutex_notheld()] </li>\n** </ul>)^\n**\n** The only difference is that the public sqlite3_XXX functions enumerated\n** above silently ignore any invocations that pass a NULL pointer instead\n** of a valid mutex handle. The implementations of the methods defined\n** by this structure are not required to handle this case. The results\n** of passing a NULL pointer instead of a valid mutex handle are undefined\n** (i.e. it is acceptable to provide an implementation that segfaults if\n** it is passed a NULL pointer).\n**\n** The xMutexInit() method must be threadsafe.  It must be harmless to\n** invoke xMutexInit() multiple times within the same process and without\n** intervening calls to xMutexEnd().  Second and subsequent calls to\n** xMutexInit() must be no-ops.\n**\n** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]\n** and its associates).  Similarly, xMutexAlloc() must not use SQLite memory\n** allocation for a static mutex.  ^However xMutexAlloc() may use SQLite\n** memory allocation for a fast or recursive mutex.\n**\n** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is\n** called, but only if the prior call to xMutexInit returned SQLITE_OK.\n** If xMutexInit fails in any way, it is expected to clean up after itself\n** prior to returning.\n*/\ntypedef struct sqlite3_mutex_methods sqlite3_mutex_methods;\nstruct sqlite3_mutex_methods {\n  int (*xMutexInit)(void);\n  int (*xMutexEnd)(void);\n  sqlite3_mutex *(*xMutexAlloc)(int);\n  void (*xMutexFree)(sqlite3_mutex *);\n  void (*xMutexEnter)(sqlite3_mutex *);\n  int (*xMutexTry)(sqlite3_mutex *);\n  void (*xMutexLeave)(sqlite3_mutex *);\n  int (*xMutexHeld)(sqlite3_mutex *);\n  int (*xMutexNotheld)(sqlite3_mutex *);\n};\n\n/*\n** CAPI3REF: Mutex Verification Routines\n**\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines\n** are intended for use inside assert() statements.  The SQLite core\n** never uses these routines except inside an assert() and applications\n** are advised to follow the lead of the core.  The SQLite core only\n** provides implementations for these routines when it is compiled\n** with the SQLITE_DEBUG flag.  External mutex implementations\n** are only required to provide these routines if SQLITE_DEBUG is\n** defined and if NDEBUG is not defined.\n**\n** These routines should return true if the mutex in their argument\n** is held or not held, respectively, by the calling thread.\n**\n** The implementation is not required to provide versions of these\n** routines that actually work. If the implementation does not provide working\n** versions of these routines, it should at least provide stubs that always\n** return true so that one does not get spurious assertion failures.\n**\n** If the argument to sqlite3_mutex_held() is a NULL pointer then\n** the routine should return 1.   This seems counter-intuitive since\n** clearly the mutex cannot be held if it does not exist.  But\n** the reason the mutex does not exist is because the build is not\n** using mutexes.  And we do not want the assert() containing the\n** call to sqlite3_mutex_held() to fail, so a non-zero return is\n** the appropriate thing to do.  The sqlite3_mutex_notheld()\n** interface should also return 1 when given a NULL pointer.\n*/\n#ifndef NDEBUG\nSQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);\nSQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);\n#endif\n\n/*\n** CAPI3REF: Mutex Types\n**\n** The [sqlite3_mutex_alloc()] interface takes a single argument\n** which is one of these integer constants.\n**\n** The set of static mutexes may change from one SQLite release to the\n** next.  Applications that override the built-in mutex logic must be\n** prepared to accommodate additional static mutexes.\n*/\n#define SQLITE_MUTEX_FAST             0\n#define SQLITE_MUTEX_RECURSIVE        1\n#define SQLITE_MUTEX_STATIC_MAIN      2\n#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */\n#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */\n#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */\n#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_randomness() */\n#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */\n#define SQLITE_MUTEX_STATIC_LRU2      7  /* NOT USED */\n#define SQLITE_MUTEX_STATIC_PMEM      7  /* sqlite3PageMalloc() */\n#define SQLITE_MUTEX_STATIC_APP1      8  /* For use by application */\n#define SQLITE_MUTEX_STATIC_APP2      9  /* For use by application */\n#define SQLITE_MUTEX_STATIC_APP3     10  /* For use by application */\n#define SQLITE_MUTEX_STATIC_VFS1     11  /* For use by built-in VFS */\n#define SQLITE_MUTEX_STATIC_VFS2     12  /* For use by extension VFS */\n#define SQLITE_MUTEX_STATIC_VFS3     13  /* For use by application VFS */\n\n/* Legacy compatibility: */\n#define SQLITE_MUTEX_STATIC_MASTER    2\n\n\n/*\n** CAPI3REF: Retrieve the mutex for a database connection\n** METHOD: sqlite3\n**\n** ^This interface returns a pointer to the [sqlite3_mutex] object that\n** serializes access to the [database connection] given in the argument\n** when the [threading mode] is Serialized.\n** ^If the [threading mode] is Single-thread or Multi-thread then this\n** routine returns a NULL pointer.\n*/\nSQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);\n\n/*\n** CAPI3REF: Low-Level Control Of Database Files\n** METHOD: sqlite3\n** KEYWORDS: {file control}\n**\n** ^The [sqlite3_file_control()] interface makes a direct call to the\n** xFileControl method for the [sqlite3_io_methods] object associated\n** with a particular database identified by the second argument. ^The\n** name of the database is \"main\" for the main database or \"temp\" for the\n** TEMP database, or the name that appears after the AS keyword for\n** databases that are added using the [ATTACH] SQL command.\n** ^A NULL pointer can be used in place of \"main\" to refer to the\n** main database file.\n** ^The third and fourth parameters to this routine\n** are passed directly through to the second and third parameters of\n** the xFileControl method.  ^The return value of the xFileControl\n** method becomes the return value of this routine.\n**\n** A few opcodes for [sqlite3_file_control()] are handled directly\n** by the SQLite core and never invoke the\n** sqlite3_io_methods.xFileControl method.\n** ^The [SQLITE_FCNTL_FILE_POINTER] value for the op parameter causes\n** a pointer to the underlying [sqlite3_file] object to be written into\n** the space pointed to by the 4th parameter.  The\n** [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns\n** the [sqlite3_file] object associated with the journal file instead of\n** the main database.  The [SQLITE_FCNTL_VFS_POINTER] opcode returns\n** a pointer to the underlying [sqlite3_vfs] object for the file.\n** The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter\n** from the pager.\n**\n** ^If the second parameter (zDbName) does not match the name of any\n** open database file, then SQLITE_ERROR is returned.  ^This error\n** code is not remembered and will not be recalled by [sqlite3_errcode()]\n** or [sqlite3_errmsg()].  The underlying xFileControl method might\n** also return SQLITE_ERROR.  There is no way to distinguish between\n** an incorrect zDbName and an SQLITE_ERROR return from the underlying\n** xFileControl method.\n**\n** See also: [file control opcodes]\n*/\nSQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);\n\n/*\n** CAPI3REF: Testing Interface\n**\n** ^The sqlite3_test_control() interface is used to read out internal\n** state of SQLite and to inject faults into SQLite for testing\n** purposes.  ^The first parameter is an operation code that determines\n** the number, meaning, and operation of all subsequent parameters.\n**\n** This interface is not for use by applications.  It exists solely\n** for verifying the correct operation of the SQLite library.  Depending\n** on how the SQLite library is compiled, this interface might not exist.\n**\n** The details of the operation codes, their meanings, the parameters\n** they take, and what they do are all subject to change without notice.\n** Unlike most of the SQLite API, this function is not guaranteed to\n** operate consistently from one release to the next.\n*/\nSQLITE_API int sqlite3_test_control(int op, ...);\n\n/*\n** CAPI3REF: Testing Interface Operation Codes\n**\n** These constants are the valid operation code parameters used\n** as the first argument to [sqlite3_test_control()].\n**\n** These parameters and their meanings are subject to change\n** without notice.  These values are for testing purposes only.\n** Applications should not use any of these parameters or the\n** [sqlite3_test_control()] interface.\n*/\n#define SQLITE_TESTCTRL_FIRST                    5\n#define SQLITE_TESTCTRL_PRNG_SAVE                5\n#define SQLITE_TESTCTRL_PRNG_RESTORE             6\n#define SQLITE_TESTCTRL_PRNG_RESET               7  /* NOT USED */\n#define SQLITE_TESTCTRL_FK_NO_ACTION             7\n#define SQLITE_TESTCTRL_BITVEC_TEST              8\n#define SQLITE_TESTCTRL_FAULT_INSTALL            9\n#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10\n#define SQLITE_TESTCTRL_PENDING_BYTE            11\n#define SQLITE_TESTCTRL_ASSERT                  12\n#define SQLITE_TESTCTRL_ALWAYS                  13\n#define SQLITE_TESTCTRL_RESERVE                 14  /* NOT USED */\n#define SQLITE_TESTCTRL_JSON_SELFCHECK          14\n#define SQLITE_TESTCTRL_OPTIMIZATIONS           15\n#define SQLITE_TESTCTRL_ISKEYWORD               16  /* NOT USED */\n#define SQLITE_TESTCTRL_GETOPT                  16\n#define SQLITE_TESTCTRL_SCRATCHMALLOC           17  /* NOT USED */\n#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS      17\n#define SQLITE_TESTCTRL_LOCALTIME_FAULT         18\n#define SQLITE_TESTCTRL_EXPLAIN_STMT            19  /* NOT USED */\n#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD    19\n#define SQLITE_TESTCTRL_NEVER_CORRUPT           20\n#define SQLITE_TESTCTRL_VDBE_COVERAGE           21\n#define SQLITE_TESTCTRL_BYTEORDER               22\n#define SQLITE_TESTCTRL_ISINIT                  23\n#define SQLITE_TESTCTRL_SORTER_MMAP             24\n#define SQLITE_TESTCTRL_IMPOSTER                25\n#define SQLITE_TESTCTRL_PARSER_COVERAGE         26\n#define SQLITE_TESTCTRL_RESULT_INTREAL          27\n#define SQLITE_TESTCTRL_PRNG_SEED               28\n#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS     29\n#define SQLITE_TESTCTRL_SEEK_COUNT              30\n#define SQLITE_TESTCTRL_TRACEFLAGS              31\n#define SQLITE_TESTCTRL_TUNE                    32\n#define SQLITE_TESTCTRL_LOGEST                  33\n#define SQLITE_TESTCTRL_USELONGDOUBLE           34  /* NOT USED */\n#define SQLITE_TESTCTRL_LAST                    34  /* Largest TESTCTRL */\n\n/*\n** CAPI3REF: SQL Keyword Checking\n**\n** These routines provide access to the set of SQL language keywords\n** recognized by SQLite.  Applications can use these routines to determine\n** whether or not a specific identifier needs to be escaped (for example,\n** by enclosing in double-quotes) so as not to confuse the parser.\n**\n** The sqlite3_keyword_count() interface returns the number of distinct\n** keywords understood by SQLite.\n**\n** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and\n** makes *Z point to that keyword expressed as UTF8 and writes the number\n** of bytes in the keyword into *L.  The string that *Z points to is not\n** zero-terminated.  The sqlite3_keyword_name(N,Z,L) routine returns\n** SQLITE_OK if N is within bounds and SQLITE_ERROR if not. If either Z\n** or L are NULL or invalid pointers then calls to\n** sqlite3_keyword_name(N,Z,L) result in undefined behavior.\n**\n** The sqlite3_keyword_check(Z,L) interface checks to see whether or not\n** the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero\n** if it is and zero if not.\n**\n** The parser used by SQLite is forgiving.  It is often possible to use\n** a keyword as an identifier as long as such use does not result in a\n** parsing ambiguity.  For example, the statement\n** \"CREATE TABLE BEGIN(REPLACE,PRAGMA,END);\" is accepted by SQLite, and\n** creates a new table named \"BEGIN\" with three columns named\n** \"REPLACE\", \"PRAGMA\", and \"END\".  Nevertheless, best practice is to avoid\n** using keywords as identifiers.  Common techniques used to avoid keyword\n** name collisions include:\n** <ul>\n** <li> Put all identifier names inside double-quotes.  This is the official\n**      SQL way to escape identifier names.\n** <li> Put identifier names inside &#91;...&#93;.  This is not standard SQL,\n**      but it is what SQL Server does and so lots of programmers use this\n**      technique.\n** <li> Begin every identifier with the letter \"Z\" as no SQL keywords start\n**      with \"Z\".\n** <li> Include a digit somewhere in every identifier name.\n** </ul>\n**\n** Note that the number of keywords understood by SQLite can depend on\n** compile-time options.  For example, \"VACUUM\" is not a keyword if\n** SQLite is compiled with the [-DSQLITE_OMIT_VACUUM] option.  Also,\n** new keywords may be added to future releases of SQLite.\n*/\nSQLITE_API int sqlite3_keyword_count(void);\nSQLITE_API int sqlite3_keyword_name(int,const char**,int*);\nSQLITE_API int sqlite3_keyword_check(const char*,int);\n\n/*\n** CAPI3REF: Dynamic String Object\n** KEYWORDS: {dynamic string}\n**\n** An instance of the sqlite3_str object contains a dynamically-sized\n** string under construction.\n**\n** The lifecycle of an sqlite3_str object is as follows:\n** <ol>\n** <li> ^The sqlite3_str object is created using [sqlite3_str_new()].\n** <li> ^Text is appended to the sqlite3_str object using various\n** methods, such as [sqlite3_str_appendf()].\n** <li> ^The sqlite3_str object is destroyed and the string it created\n** is returned using the [sqlite3_str_finish()] interface.\n** </ol>\n*/\ntypedef struct sqlite3_str sqlite3_str;\n\n/*\n** CAPI3REF: Create A New Dynamic String Object\n** CONSTRUCTOR: sqlite3_str\n**\n** ^The [sqlite3_str_new(D)] interface allocates and initializes\n** a new [sqlite3_str] object.  To avoid memory leaks, the object returned by\n** [sqlite3_str_new()] must be freed by a subsequent call to\n** [sqlite3_str_finish(X)].\n**\n** ^The [sqlite3_str_new(D)] interface always returns a pointer to a\n** valid [sqlite3_str] object, though in the event of an out-of-memory\n** error the returned object might be a special singleton that will\n** silently reject new text, always return SQLITE_NOMEM from\n** [sqlite3_str_errcode()], always return 0 for\n** [sqlite3_str_length()], and always return NULL from\n** [sqlite3_str_finish(X)].  It is always safe to use the value\n** returned by [sqlite3_str_new(D)] as the sqlite3_str parameter\n** to any of the other [sqlite3_str] methods.\n**\n** The D parameter to [sqlite3_str_new(D)] may be NULL.  If the\n** D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum\n** length of the string contained in the [sqlite3_str] object will be\n** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead\n** of [SQLITE_MAX_LENGTH].\n*/\nSQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);\n\n/*\n** CAPI3REF: Finalize A Dynamic String\n** DESTRUCTOR: sqlite3_str\n**\n** ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X\n** and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()]\n** that contains the constructed string.  The calling application should\n** pass the returned value to [sqlite3_free()] to avoid a memory leak.\n** ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any\n** errors were encountered during construction of the string.  ^The\n** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the\n** string in [sqlite3_str] object X is zero bytes long.\n*/\nSQLITE_API char *sqlite3_str_finish(sqlite3_str*);\n\n/*\n** CAPI3REF: Add Content To A Dynamic String\n** METHOD: sqlite3_str\n**\n** These interfaces add content to an sqlite3_str object previously obtained\n** from [sqlite3_str_new()].\n**\n** ^The [sqlite3_str_appendf(X,F,...)] and\n** [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf]\n** functionality of SQLite to append formatted text onto the end of\n** [sqlite3_str] object X.\n**\n** ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S\n** onto the end of the [sqlite3_str] object X.  N must be non-negative.\n** S must contain at least N non-zero bytes of content.  To append a\n** zero-terminated string in its entirety, use the [sqlite3_str_appendall()]\n** method instead.\n**\n** ^The [sqlite3_str_appendall(X,S)] method appends the complete content of\n** zero-terminated string S onto the end of [sqlite3_str] object X.\n**\n** ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the\n** single-byte character C onto the end of [sqlite3_str] object X.\n** ^This method can be used, for example, to add whitespace indentation.\n**\n** ^The [sqlite3_str_reset(X)] method resets the string under construction\n** inside [sqlite3_str] object X back to zero bytes in length.\n**\n** These methods do not return a result code.  ^If an error occurs, that fact\n** is recorded in the [sqlite3_str] object and can be recovered by a\n** subsequent call to [sqlite3_str_errcode(X)].\n*/\nSQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);\nSQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);\nSQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);\nSQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);\nSQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);\nSQLITE_API void sqlite3_str_reset(sqlite3_str*);\n\n/*\n** CAPI3REF: Status Of A Dynamic String\n** METHOD: sqlite3_str\n**\n** These interfaces return the current status of an [sqlite3_str] object.\n**\n** ^If any prior errors have occurred while constructing the dynamic string\n** in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return\n** an appropriate error code.  ^The [sqlite3_str_errcode(X)] method returns\n** [SQLITE_NOMEM] following any out-of-memory error, or\n** [SQLITE_TOOBIG] if the size of the dynamic string exceeds\n** [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors.\n**\n** ^The [sqlite3_str_length(X)] method returns the current length, in bytes,\n** of the dynamic string under construction in [sqlite3_str] object X.\n** ^The length returned by [sqlite3_str_length(X)] does not include the\n** zero-termination byte.\n**\n** ^The [sqlite3_str_value(X)] method returns a pointer to the current\n** content of the dynamic string under construction in X.  The value\n** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X\n** and might be freed or altered by any subsequent method on the same\n** [sqlite3_str] object.  Applications must not use the pointer returned by\n** [sqlite3_str_value(X)] after any subsequent method call on the same\n** object.  ^Applications may change the content of the string returned\n** by [sqlite3_str_value(X)] as long as they do not write into any bytes\n** outside the range of 0 to [sqlite3_str_length(X)] and do not read or\n** write any byte after any subsequent sqlite3_str method call.\n*/\nSQLITE_API int sqlite3_str_errcode(sqlite3_str*);\nSQLITE_API int sqlite3_str_length(sqlite3_str*);\nSQLITE_API char *sqlite3_str_value(sqlite3_str*);\n\n/*\n** CAPI3REF: SQLite Runtime Status\n**\n** ^These interfaces are used to retrieve runtime status information\n** about the performance of SQLite, and optionally to reset various\n** highwater marks.  ^The first argument is an integer code for\n** the specific parameter to measure.  ^(Recognized integer codes\n** are of the form [status parameters | SQLITE_STATUS_...].)^\n** ^The current value of the parameter is returned into *pCurrent.\n** ^The highest recorded value is returned in *pHighwater.  ^If the\n** resetFlag is true, then the highest record value is reset after\n** *pHighwater is written.  ^(Some parameters do not record the highest\n** value.  For those parameters\n** nothing is written into *pHighwater and the resetFlag is ignored.)^\n** ^(Other parameters record only the highwater mark and not the current\n** value.  For these latter parameters nothing is written into *pCurrent.)^\n**\n** ^The sqlite3_status() and sqlite3_status64() routines return\n** SQLITE_OK on success and a non-zero [error code] on failure.\n**\n** If either the current value or the highwater mark is too large to\n** be represented by a 32-bit integer, then the values returned by\n** sqlite3_status() are undefined.\n**\n** See also: [sqlite3_db_status()]\n*/\nSQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);\nSQLITE_API int sqlite3_status64(\n  int op,\n  sqlite3_int64 *pCurrent,\n  sqlite3_int64 *pHighwater,\n  int resetFlag\n);\n\n\n/*\n** CAPI3REF: Status Parameters\n** KEYWORDS: {status parameters}\n**\n** These integer constants designate various run-time status parameters\n** that can be returned by [sqlite3_status()].\n**\n** <dl>\n** [[SQLITE_STATUS_MEMORY_USED]] ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>\n** <dd>This parameter is the current amount of memory checked out\n** using [sqlite3_malloc()], either directly or indirectly.  The\n** figure includes calls made to [sqlite3_malloc()] by the application\n** and internal memory usage by the SQLite library.  Auxiliary page-cache\n** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in\n** this parameter.  The amount returned is the sum of the allocation\n** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^\n**\n** [[SQLITE_STATUS_MALLOC_SIZE]] ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>\n** <dd>This parameter records the largest memory allocation request\n** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their\n** internal equivalents).  Only the value returned in the\n** *pHighwater parameter to [sqlite3_status()] is of interest.\n** The value written into the *pCurrent parameter is undefined.</dd>)^\n**\n** [[SQLITE_STATUS_MALLOC_COUNT]] ^(<dt>SQLITE_STATUS_MALLOC_COUNT</dt>\n** <dd>This parameter records the number of separate memory allocations\n** currently checked out.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_USED]] ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>\n** <dd>This parameter returns the number of pages used out of the\n** [pagecache memory allocator] that was configured using\n** [SQLITE_CONFIG_PAGECACHE].  The\n** value returned is in pages, not in bytes.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_OVERFLOW]]\n** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>\n** <dd>This parameter returns the number of bytes of page cache\n** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]\n** buffer and where forced to overflow to [sqlite3_malloc()].  The\n** returned value includes allocations that overflowed because they\n** were too large (they were larger than the \"sz\" parameter to\n** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because\n** no space was left in the page cache.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_SIZE]] ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>\n** <dd>This parameter records the largest memory allocation request\n** handed to the [pagecache memory allocator].  Only the value returned in the\n** *pHighwater parameter to [sqlite3_status()] is of interest.\n** The value written into the *pCurrent parameter is undefined.</dd>)^\n**\n** [[SQLITE_STATUS_SCRATCH_USED]] <dt>SQLITE_STATUS_SCRATCH_USED</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_SCRATCH_SIZE]] <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_PARSER_STACK]] ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>\n** <dd>The *pHighwater parameter records the deepest parser stack.\n** The *pCurrent value is undefined.  The *pHighwater value is only\n** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^\n** </dl>\n**\n** New status parameters may be added from time to time.\n*/\n#define SQLITE_STATUS_MEMORY_USED          0\n#define SQLITE_STATUS_PAGECACHE_USED       1\n#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2\n#define SQLITE_STATUS_SCRATCH_USED         3  /* NOT USED */\n#define SQLITE_STATUS_SCRATCH_OVERFLOW     4  /* NOT USED */\n#define SQLITE_STATUS_MALLOC_SIZE          5\n#define SQLITE_STATUS_PARSER_STACK         6\n#define SQLITE_STATUS_PAGECACHE_SIZE       7\n#define SQLITE_STATUS_SCRATCH_SIZE         8  /* NOT USED */\n#define SQLITE_STATUS_MALLOC_COUNT         9\n\n/*\n** CAPI3REF: Database Connection Status\n** METHOD: sqlite3\n**\n** ^This interface is used to retrieve runtime status information\n** about a single [database connection].  ^The first argument is the\n** database connection object to be interrogated.  ^The second argument\n** is an integer constant, taken from the set of\n** [SQLITE_DBSTATUS options], that\n** determines the parameter to interrogate.  The set of\n** [SQLITE_DBSTATUS options] is likely\n** to grow in future releases of SQLite.\n**\n** ^The current value of the requested parameter is written into *pCur\n** and the highest instantaneous value is written into *pHiwtr.  ^If\n** the resetFlg is true, then the highest instantaneous value is\n** reset back down to the current value.\n**\n** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a\n** non-zero [error code] on failure.\n**\n** ^The sqlite3_db_status64(D,O,C,H,R) routine works exactly the same\n** way as sqlite3_db_status(D,O,C,H,R) routine except that the C and H\n** parameters are pointer to 64-bit integers (type: sqlite3_int64) instead\n** of pointers to 32-bit integers, which allows larger status values\n** to be returned.  If a status value exceeds 2,147,483,647 then\n** sqlite3_db_status() will truncate the value whereas sqlite3_db_status64()\n** will return the full value.\n**\n** See also: [sqlite3_status()] and [sqlite3_stmt_status()].\n*/\nSQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);\nSQLITE_API int sqlite3_db_status64(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);\n\n/*\n** CAPI3REF: Status Parameters for database connections\n** KEYWORDS: {SQLITE_DBSTATUS options}\n**\n** These constants are the available integer \"verbs\" that can be passed as\n** the second argument to the [sqlite3_db_status()] interface.\n**\n** New verbs may be added in future releases of SQLite. Existing verbs\n** might be discontinued. Applications should check the return code from\n** [sqlite3_db_status()] to make sure that the call worked.\n** The [sqlite3_db_status()] interface will return a non-zero error code\n** if a discontinued or unsupported verb is invoked.\n**\n** <dl>\n** [[SQLITE_DBSTATUS_LOOKASIDE_USED]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>\n** <dd>This parameter returns the number of lookaside memory slots currently\n** checked out.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>\n** <dd>This parameter returns the number of malloc attempts that were\n** satisfied using lookaside memory. Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]\n** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>\n** <dd>This parameter returns the number of malloc attempts that might have\n** been satisfied using lookaside memory but failed due to the amount of\n** memory requested being larger than the lookaside slot size.\n** Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]\n** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>\n** <dd>This parameter returns the number of malloc attempts that might have\n** been satisfied using lookaside memory but failed due to all lookaside\n** memory already being in use.\n** Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** memory used by all pager caches associated with the database connection.)^\n** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]\n** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>\n** <dd>This parameter is similar to DBSTATUS_CACHE_USED, except that if a\n** pager cache is shared between two or more connections the bytes of heap\n** memory used by that pager cache is divided evenly between the attached\n** connections.)^  In other words, if none of the pager caches associated\n** with the database connection are shared, this request returns the same\n** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are\n** shared, the value returned by this call will be smaller than that returned\n** by DBSTATUS_CACHE_USED. ^The highwater mark associated with\n** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>\n**\n** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** memory used to store the schema for all databases associated\n** with the connection - main, temp, and any [ATTACH]-ed databases.)^\n** ^The full amount of memory used by the schemas is reported, even if the\n** schema memory is shared with other database connections due to\n** [shared cache mode] being enabled.\n** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** and lookaside memory used by all prepared statements associated with\n** the database connection.)^\n** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_HIT]] ^(<dt>SQLITE_DBSTATUS_CACHE_HIT</dt>\n** <dd>This parameter returns the number of pager cache hits that have\n** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_HIT\n** is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_MISS]] ^(<dt>SQLITE_DBSTATUS_CACHE_MISS</dt>\n** <dd>This parameter returns the number of pager cache misses that have\n** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS\n** is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_WRITE]] ^(<dt>SQLITE_DBSTATUS_CACHE_WRITE</dt>\n** <dd>This parameter returns the number of dirty cache entries that have\n** been written to disk. Specifically, the number of pages written to the\n** wal file in wal mode databases, or the number of pages written to the\n** database file in rollback mode databases. Any pages written as part of\n** transaction rollback or database recovery operations are not included.\n** If an IO or other error occurs while writing a page to disk, the effect\n** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The\n** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0.\n** <p>\n** ^(There is overlap between the quantities measured by this parameter\n** (SQLITE_DBSTATUS_CACHE_WRITE) and SQLITE_DBSTATUS_TEMPBUF_SPILL.\n** Resetting one will reduce the other.)^\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_SPILL]] ^(<dt>SQLITE_DBSTATUS_CACHE_SPILL</dt>\n** <dd>This parameter returns the number of dirty cache entries that have\n** been written to disk in the middle of a transaction due to the page\n** cache overflowing. Transactions are more efficient if they are written\n** to disk all at once. When pages spill mid-transaction, that introduces\n** additional overhead. This parameter can be used to help identify\n** inefficiencies that can be resolved by increasing the cache size.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_DEFERRED_FKS]] ^(<dt>SQLITE_DBSTATUS_DEFERRED_FKS</dt>\n** <dd>This parameter returns zero for the current value if and only if\n** all foreign key constraints (deferred or immediate) have been\n** resolved.)^  ^The highwater mark is always 0.\n**\n** [[SQLITE_DBSTATUS_TEMPBUF_SPILL] ^(<dt>SQLITE_DBSTATUS_TEMPBUF_SPILL</dt>\n** <dd>^(This parameter returns the number of bytes written to temporary\n** files on disk that could have been kept in memory had sufficient memory\n** been available.  This value includes writes to intermediate tables that\n** are part of complex queries, external sorts that spill to disk, and\n** writes to TEMP tables.)^\n** ^The highwater mark is always 0.\n** <p>\n** ^(There is overlap between the quantities measured by this parameter\n** (SQLITE_DBSTATUS_TEMPBUF_SPILL) and SQLITE_DBSTATUS_CACHE_WRITE.\n** Resetting one will reduce the other.)^\n** </dd>\n** </dl>\n*/\n#define SQLITE_DBSTATUS_LOOKASIDE_USED       0\n#define SQLITE_DBSTATUS_CACHE_USED           1\n#define SQLITE_DBSTATUS_SCHEMA_USED          2\n#define SQLITE_DBSTATUS_STMT_USED            3\n#define SQLITE_DBSTATUS_LOOKASIDE_HIT        4\n#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE  5\n#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL  6\n#define SQLITE_DBSTATUS_CACHE_HIT            7\n#define SQLITE_DBSTATUS_CACHE_MISS           8\n#define SQLITE_DBSTATUS_CACHE_WRITE          9\n#define SQLITE_DBSTATUS_DEFERRED_FKS        10\n#define SQLITE_DBSTATUS_CACHE_USED_SHARED   11\n#define SQLITE_DBSTATUS_CACHE_SPILL         12\n#define SQLITE_DBSTATUS_TEMPBUF_SPILL       13\n#define SQLITE_DBSTATUS_MAX                 13   /* Largest defined DBSTATUS */\n\n\n/*\n** CAPI3REF: Prepared Statement Status\n** METHOD: sqlite3_stmt\n**\n** ^(Each prepared statement maintains various\n** [SQLITE_STMTSTATUS counters] that measure the number\n** of times it has performed specific operations.)^  These counters can\n** be used to monitor the performance characteristics of the prepared\n** statements.  For example, if the number of table steps greatly exceeds\n** the number of table searches or result rows, that would tend to indicate\n** that the prepared statement is using a full table scan rather than\n** an index.\n**\n** ^(This interface is used to retrieve and reset counter values from\n** a [prepared statement].  The first argument is the prepared statement\n** object to be interrogated.  The second argument\n** is an integer code for a specific [SQLITE_STMTSTATUS counter]\n** to be interrogated.)^\n** ^The current value of the requested counter is returned.\n** ^If the resetFlg is true, then the counter is reset to zero after this\n** interface call returns.\n**\n** See also: [sqlite3_status()] and [sqlite3_db_status()].\n*/\nSQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);\n\n/*\n** CAPI3REF: Status Parameters for prepared statements\n** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}\n**\n** These preprocessor macros define integer codes that name counter\n** values associated with the [sqlite3_stmt_status()] interface.\n** The meanings of the various counters are as follows:\n**\n** <dl>\n** [[SQLITE_STMTSTATUS_FULLSCAN_STEP]] <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>\n** <dd>^This is the number of times that SQLite has stepped forward in\n** a table as part of a full table scan.  Large numbers for this counter\n** may indicate opportunities for performance improvement through\n** careful use of indices.</dd>\n**\n** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>\n** <dd>^This is the number of sort operations that have occurred.\n** A non-zero value in this counter may indicate an opportunity to\n** improve performance through careful use of indices.</dd>\n**\n** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>\n** <dd>^This is the number of rows inserted into transient indices that\n** were created automatically in order to help joins run faster.\n** A non-zero value in this counter may indicate an opportunity to\n** improve performance by adding permanent indices that do not\n** need to be reinitialized each time the statement is run.</dd>\n**\n** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>\n** <dd>^This is the number of virtual machine operations executed\n** by the prepared statement if that number is less than or equal\n** to 2147483647.  The number of virtual machine operations can be\n** used as a proxy for the total work done by the prepared statement.\n** If the number of virtual machine operations exceeds 2147483647\n** then the value returned by this statement status code is undefined.</dd>\n**\n** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>\n** <dd>^This is the number of times that the prepare statement has been\n** automatically regenerated due to schema changes or changes to\n** [bound parameters] that might affect the query plan.</dd>\n**\n** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>\n** <dd>^This is the number of times that the prepared statement has\n** been run.  A single \"run\" for the purposes of this counter is one\n** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].\n** The counter is incremented on the first [sqlite3_step()] call of each\n** cycle.</dd>\n**\n** [[SQLITE_STMTSTATUS_FILTER_MISS]]\n** [[SQLITE_STMTSTATUS_FILTER HIT]]\n** <dt>SQLITE_STMTSTATUS_FILTER_HIT<br>\n** SQLITE_STMTSTATUS_FILTER_MISS</dt>\n** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join\n** step was bypassed because a Bloom filter returned not-found.  The\n** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of\n** times that the Bloom filter returned a find, and thus the join step\n** had to be processed as normal.</dd>\n**\n** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>\n** <dd>^This is the approximate number of bytes of heap memory\n** used to store the prepared statement.  ^This value is not actually\n** a counter, and so the resetFlg parameter to sqlite3_stmt_status()\n** is ignored when the opcode is SQLITE_STMTSTATUS_MEMUSED.\n** </dd>\n** </dl>\n*/\n#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1\n#define SQLITE_STMTSTATUS_SORT              2\n#define SQLITE_STMTSTATUS_AUTOINDEX         3\n#define SQLITE_STMTSTATUS_VM_STEP           4\n#define SQLITE_STMTSTATUS_REPREPARE         5\n#define SQLITE_STMTSTATUS_RUN               6\n#define SQLITE_STMTSTATUS_FILTER_MISS       7\n#define SQLITE_STMTSTATUS_FILTER_HIT        8\n#define SQLITE_STMTSTATUS_MEMUSED           99\n\n/*\n** CAPI3REF: Custom Page Cache Object\n**\n** The sqlite3_pcache type is opaque.  It is implemented by\n** the pluggable module.  The SQLite core has no knowledge of\n** its size or internal structure and never deals with the\n** sqlite3_pcache object except by holding and passing pointers\n** to the object.\n**\n** See [sqlite3_pcache_methods2] for additional information.\n*/\ntypedef struct sqlite3_pcache sqlite3_pcache;\n\n/*\n** CAPI3REF: Custom Page Cache Object\n**\n** The sqlite3_pcache_page object represents a single page in the\n** page cache.  The page cache will allocate instances of this\n** object.  Various methods of the page cache use pointers to instances\n** of this object as parameters or as their return value.\n**\n** See [sqlite3_pcache_methods2] for additional information.\n*/\ntypedef struct sqlite3_pcache_page sqlite3_pcache_page;\nstruct sqlite3_pcache_page {\n  void *pBuf;        /* The content of the page */\n  void *pExtra;      /* Extra information associated with the page */\n};\n\n/*\n** CAPI3REF: Application Defined Page Cache.\n** KEYWORDS: {page cache}\n**\n** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can\n** register an alternative page cache implementation by passing in an\n** instance of the sqlite3_pcache_methods2 structure.)^\n** In many applications, most of the heap memory allocated by\n** SQLite is used for the page cache.\n** By implementing a\n** custom page cache using this API, an application can better control\n** the amount of memory consumed by SQLite, the way in which\n** that memory is allocated and released, and the policies used to\n** determine exactly which parts of a database file are cached and for\n** how long.\n**\n** The alternative page cache mechanism is an\n** extreme measure that is only needed by the most demanding applications.\n** The built-in page cache is recommended for most uses.\n**\n** ^(The contents of the sqlite3_pcache_methods2 structure are copied to an\n** internal buffer by SQLite within the call to [sqlite3_config].  Hence\n** the application may discard the parameter after the call to\n** [sqlite3_config()] returns.)^\n**\n** [[the xInit() page cache method]]\n** ^(The xInit() method is called once for each effective\n** call to [sqlite3_initialize()])^\n** (usually only once during the lifetime of the process). ^(The xInit()\n** method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^\n** The intent of the xInit() method is to set up global data structures\n** required by the custom page cache implementation.\n** ^(If the xInit() method is NULL, then the\n** built-in default page cache is used instead of the application defined\n** page cache.)^\n**\n** [[the xShutdown() page cache method]]\n** ^The xShutdown() method is called by [sqlite3_shutdown()].\n** It can be used to clean up\n** any outstanding resources before process shutdown, if required.\n** ^The xShutdown() method may be NULL.\n**\n** ^SQLite automatically serializes calls to the xInit method,\n** so the xInit method need not be threadsafe.  ^The\n** xShutdown method is only called from [sqlite3_shutdown()] so it does\n** not need to be threadsafe either.  All other methods must be threadsafe\n** in multithreaded applications.\n**\n** ^SQLite will never invoke xInit() more than once without an intervening\n** call to xShutdown().\n**\n** [[the xCreate() page cache methods]]\n** ^SQLite invokes the xCreate() method to construct a new cache instance.\n** SQLite will typically create one cache instance for each open database file,\n** though this is not guaranteed. ^The\n** first parameter, szPage, is the size in bytes of the pages that must\n** be allocated by the cache.  ^szPage will always be a power of two.  ^The\n** second parameter szExtra is a number of bytes of extra storage\n** associated with each page cache entry.  ^The szExtra parameter will be\n** a number less than 250.  SQLite will use the\n** extra szExtra bytes on each page to store metadata about the underlying\n** database page on disk.  The value passed into szExtra depends\n** on the SQLite version, the target platform, and how SQLite was compiled.\n** ^The third argument to xCreate(), bPurgeable, is true if the cache being\n** created will be used to cache database pages of a file stored on disk, or\n** false if it is used for an in-memory database. The cache implementation\n** does not have to do anything special based upon the value of bPurgeable;\n** it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will\n** never invoke xUnpin() except to deliberately delete a page.\n** ^In other words, calls to xUnpin() on a cache with bPurgeable set to\n** false will always have the \"discard\" flag set to true.\n** ^Hence, a cache created with bPurgeable set to false will\n** never contain any unpinned pages.\n**\n** [[the xCachesize() page cache method]]\n** ^(The xCachesize() method may be called at any time by SQLite to set the\n** suggested maximum cache-size (number of pages stored) for the cache\n** instance passed as the first argument. This is the value configured using\n** the SQLite \"[PRAGMA cache_size]\" command.)^  As with the bPurgeable\n** parameter, the implementation is not required to do anything with this\n** value; it is advisory only.\n**\n** [[the xPagecount() page cache methods]]\n** The xPagecount() method must return the number of pages currently\n** stored in the cache, both pinned and unpinned.\n**\n** [[the xFetch() page cache methods]]\n** The xFetch() method locates a page in the cache and returns a pointer to\n** an sqlite3_pcache_page object associated with that page, or a NULL pointer.\n** The pBuf element of the returned sqlite3_pcache_page object will be a\n** pointer to a buffer of szPage bytes used to store the content of a\n** single database page.  The pExtra element of sqlite3_pcache_page will be\n** a pointer to the szExtra bytes of extra storage that SQLite has requested\n** for each entry in the page cache.\n**\n** The page to be fetched is determined by the key. ^The minimum key value\n** is 1.  After it has been retrieved using xFetch, the page is considered\n** to be \"pinned\".\n**\n** If the requested page is already in the page cache, then the page cache\n** implementation must return a pointer to the page buffer with its content\n** intact.  If the requested page is not already in the cache, then the\n** cache implementation should use the value of the createFlag\n** parameter to help it determine what action to take:\n**\n** <table border=1 width=85% align=center>\n** <tr><th> createFlag <th> Behavior when page is not already in cache\n** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.\n** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.\n**                 Otherwise return NULL.\n** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return\n**                 NULL if allocating a new page is effectively impossible.\n** </table>\n**\n** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite\n** will only use a createFlag of 2 after a prior call with a createFlag of 1\n** failed.)^  In between the xFetch() calls, SQLite may\n** attempt to unpin one or more cache pages by spilling the content of\n** pinned pages to disk and synching the operating system disk cache.\n**\n** [[the xUnpin() page cache method]]\n** ^xUnpin() is called by SQLite with a pointer to a currently pinned page\n** as its second argument.  If the third parameter, discard, is non-zero,\n** then the page must be evicted from the cache.\n** ^If the discard parameter is\n** zero, then the page may be discarded or retained at the discretion of the\n** page cache implementation. ^The page cache implementation\n** may choose to evict unpinned pages at any time.\n**\n** The cache must not perform any reference counting. A single\n** call to xUnpin() unpins the page regardless of the number of prior calls\n** to xFetch().\n**\n** [[the xRekey() page cache methods]]\n** The xRekey() method is used to change the key value associated with the\n** page passed as the second argument. If the cache\n** previously contains an entry associated with newKey, it must be\n** discarded. ^Any prior cache entry associated with newKey is guaranteed not\n** to be pinned.\n**\n** When SQLite calls the xTruncate() method, the cache must discard all\n** existing cache entries with page numbers (keys) greater than or equal\n** to the value of the iLimit parameter passed to xTruncate(). If any\n** of these pages are pinned, they become implicitly unpinned, meaning that\n** they can be safely discarded.\n**\n** [[the xDestroy() page cache method]]\n** ^The xDestroy() method is used to delete a cache allocated by xCreate().\n** All resources associated with the specified cache should be freed. ^After\n** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]\n** handle invalid, and will not use it with any other sqlite3_pcache_methods2\n** functions.\n**\n** [[the xShrink() page cache method]]\n** ^SQLite invokes the xShrink() method when it wants the page cache to\n** free up as much of heap memory as possible.  The page cache implementation\n** is not obligated to free any memory, but well-behaved implementations should\n** do their best.\n*/\ntypedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;\nstruct sqlite3_pcache_methods2 {\n  int iVersion;\n  void *pArg;\n  int (*xInit)(void*);\n  void (*xShutdown)(void*);\n  sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable);\n  void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n  int (*xPagecount)(sqlite3_pcache*);\n  sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n  void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard);\n  void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*,\n      unsigned oldKey, unsigned newKey);\n  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n  void (*xDestroy)(sqlite3_pcache*);\n  void (*xShrink)(sqlite3_pcache*);\n};\n\n/*\n** This is the obsolete pcache_methods object that has now been replaced\n** by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is\n** retained in the header file for backwards compatibility only.\n*/\ntypedef struct sqlite3_pcache_methods sqlite3_pcache_methods;\nstruct sqlite3_pcache_methods {\n  void *pArg;\n  int (*xInit)(void*);\n  void (*xShutdown)(void*);\n  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);\n  void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n  int (*xPagecount)(sqlite3_pcache*);\n  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n  void (*xUnpin)(sqlite3_pcache*, void*, int discard);\n  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);\n  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n  void (*xDestroy)(sqlite3_pcache*);\n};\n\n\n/*\n** CAPI3REF: Online Backup Object\n**\n** The sqlite3_backup object records state information about an ongoing\n** online backup operation.  ^The sqlite3_backup object is created by\n** a call to [sqlite3_backup_init()] and is destroyed by a call to\n** [sqlite3_backup_finish()].\n**\n** See Also: [Using the SQLite Online Backup API]\n*/\ntypedef struct sqlite3_backup sqlite3_backup;\n\n/*\n** CAPI3REF: Online Backup API.\n**\n** The backup API copies the content of one database into another.\n** It is useful either for creating backups of databases or\n** for copying in-memory databases to or from persistent files.\n**\n** See Also: [Using the SQLite Online Backup API]\n**\n** ^SQLite holds a write transaction open on the destination database file\n** for the duration of the backup operation.\n** ^The source database is read-locked only while it is being read;\n** it is not locked continuously for the entire backup operation.\n** ^Thus, the backup may be performed on a live source database without\n** preventing other database connections from\n** reading or writing to the source database while the backup is underway.\n**\n** ^(To perform a backup operation:\n**   <ol>\n**     <li><b>sqlite3_backup_init()</b> is called once to initialize the\n**         backup,\n**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer\n**         the data between the two databases, and finally\n**     <li><b>sqlite3_backup_finish()</b> is called to release all resources\n**         associated with the backup operation.\n**   </ol>)^\n** There should be exactly one call to sqlite3_backup_finish() for each\n** successful call to sqlite3_backup_init().\n**\n** [[sqlite3_backup_init()]] <b>sqlite3_backup_init()</b>\n**\n** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the\n** [database connection] associated with the destination database\n** and the database name, respectively.\n** ^The database name is \"main\" for the main database, \"temp\" for the\n** temporary database, or the name specified after the AS keyword in\n** an [ATTACH] statement for an attached database.\n** ^The S and M arguments passed to\n** sqlite3_backup_init(D,N,S,M) identify the [database connection]\n** and database name of the source database, respectively.\n** ^The source and destination [database connections] (parameters S and D)\n** must be different or else sqlite3_backup_init(D,N,S,M) will fail with\n** an error.\n**\n** ^A call to sqlite3_backup_init() will fail, returning NULL, if\n** there is already a read or read-write transaction open on the\n** destination database.\n**\n** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is\n** returned and an error code and error message are stored in the\n** destination [database connection] D.\n** ^The error code and message for the failed call to sqlite3_backup_init()\n** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or\n** [sqlite3_errmsg16()] functions.\n** ^A successful call to sqlite3_backup_init() returns a pointer to an\n** [sqlite3_backup] object.\n** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and\n** sqlite3_backup_finish() functions to perform the specified backup\n** operation.\n**\n** [[sqlite3_backup_step()]] <b>sqlite3_backup_step()</b>\n**\n** ^Function sqlite3_backup_step(B,N) will copy up to N pages between\n** the source and destination databases specified by [sqlite3_backup] object B.\n** ^If N is negative, all remaining source pages are copied.\n** ^If sqlite3_backup_step(B,N) successfully copies N pages and there\n** are still more pages to be copied, then the function returns [SQLITE_OK].\n** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages\n** from source to destination, then it returns [SQLITE_DONE].\n** ^If an error occurs while running sqlite3_backup_step(B,N),\n** then an [error code] is returned. ^As well as [SQLITE_OK] and\n** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],\n** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an\n** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.\n**\n** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if\n** <ol>\n** <li> the destination database was opened read-only, or\n** <li> the destination database is using write-ahead-log journaling\n** and the destination and source page sizes differ, or\n** <li> the destination database is an in-memory database and the\n** destination and source page sizes differ.\n** </ol>)^\n**\n** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then\n** the [sqlite3_busy_handler | busy-handler function]\n** is invoked (if one is specified). ^If the\n** busy-handler returns non-zero before the lock is available, then\n** [SQLITE_BUSY] is returned to the caller. ^In this case the call to\n** sqlite3_backup_step() can be retried later. ^If the source\n** [database connection]\n** is being used to write to the source database when sqlite3_backup_step()\n** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this\n** case the call to sqlite3_backup_step() can be retried later on. ^(If\n** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or\n** [SQLITE_READONLY] is returned, then\n** there is no point in retrying the call to sqlite3_backup_step(). These\n** errors are considered fatal.)^  The application must accept\n** that the backup operation has failed and pass the backup operation handle\n** to the sqlite3_backup_finish() to release associated resources.\n**\n** ^The first call to sqlite3_backup_step() obtains an exclusive lock\n** on the destination file. ^The exclusive lock is not released until either\n** sqlite3_backup_finish() is called or the backup operation is complete\n** and sqlite3_backup_step() returns [SQLITE_DONE].  ^Every call to\n** sqlite3_backup_step() obtains a [shared lock] on the source database that\n** lasts for the duration of the sqlite3_backup_step() call.\n** ^Because the source database is not locked between calls to\n** sqlite3_backup_step(), the source database may be modified mid-way\n** through the backup process.  ^If the source database is modified by an\n** external process or via a database connection other than the one being\n** used by the backup operation, then the backup will be automatically\n** restarted by the next call to sqlite3_backup_step(). ^If the source\n** database is modified by using the same database connection as is used\n** by the backup operation, then the backup database is automatically\n** updated at the same time.\n**\n** [[sqlite3_backup_finish()]] <b>sqlite3_backup_finish()</b>\n**\n** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the\n** application wishes to abandon the backup operation, the application\n** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().\n** ^The sqlite3_backup_finish() interfaces releases all\n** resources associated with the [sqlite3_backup] object.\n** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any\n** active write-transaction on the destination database is rolled back.\n** The [sqlite3_backup] object is invalid\n** and may not be used following a call to sqlite3_backup_finish().\n**\n** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no\n** sqlite3_backup_step() errors occurred, regardless of whether or not\n** sqlite3_backup_step() completed.\n** ^If an out-of-memory condition or IO error occurred during any prior\n** sqlite3_backup_step() call on the same [sqlite3_backup] object, then\n** sqlite3_backup_finish() returns the corresponding [error code].\n**\n** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()\n** is not a permanent error and does not affect the return value of\n** sqlite3_backup_finish().\n**\n** [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]]\n** <b>sqlite3_backup_remaining() and sqlite3_backup_pagecount()</b>\n**\n** ^The sqlite3_backup_remaining() routine returns the number of pages still\n** to be backed up at the conclusion of the most recent sqlite3_backup_step().\n** ^The sqlite3_backup_pagecount() routine returns the total number of pages\n** in the source database at the conclusion of the most recent\n** sqlite3_backup_step().\n** ^(The values returned by these functions are only updated by\n** sqlite3_backup_step(). If the source database is modified in a way that\n** changes the size of the source database or the number of pages remaining,\n** those changes are not reflected in the output of sqlite3_backup_pagecount()\n** and sqlite3_backup_remaining() until after the next\n** sqlite3_backup_step().)^\n**\n** <b>Concurrent Usage of Database Handles</b>\n**\n** ^The source [database connection] may be used by the application for other\n** purposes while a backup operation is underway or being initialized.\n** ^If SQLite is compiled and configured to support threadsafe database\n** connections, then the source database connection may be used concurrently\n** from within other threads.\n**\n** However, the application must guarantee that the destination\n** [database connection] is not passed to any other API (by any thread) after\n** sqlite3_backup_init() is called and before the corresponding call to\n** sqlite3_backup_finish().  SQLite does not currently check to see\n** if the application incorrectly accesses the destination [database connection]\n** and so no error code is reported, but the operations may malfunction\n** nevertheless.  Use of the destination database connection while a\n** backup is in progress might also cause a mutex deadlock.\n**\n** If running in [shared cache mode], the application must\n** guarantee that the shared cache used by the destination database\n** is not accessed while the backup is running. In practice this means\n** that the application must guarantee that the disk file being\n** backed up to is not accessed by any connection within the process,\n** not just the specific connection that was passed to sqlite3_backup_init().\n**\n** The [sqlite3_backup] object itself is partially threadsafe. Multiple\n** threads may safely make multiple concurrent calls to sqlite3_backup_step().\n** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()\n** APIs are not strictly speaking threadsafe. If they are invoked at the\n** same time as another thread is invoking sqlite3_backup_step() it is\n** possible that they return invalid values.\n**\n** <b>Alternatives To Using The Backup API</b>\n**\n** Other techniques for safely creating a consistent backup of an SQLite\n** database include:\n**\n** <ul>\n** <li> The [VACUUM INTO] command.\n** <li> The [sqlite3_rsync] utility program.\n** </ul>\n*/\nSQLITE_API sqlite3_backup *sqlite3_backup_init(\n  sqlite3 *pDest,                        /* Destination database handle */\n  const char *zDestName,                 /* Destination database name */\n  sqlite3 *pSource,                      /* Source database handle */\n  const char *zSourceName                /* Source database name */\n);\nSQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);\nSQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);\nSQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);\nSQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);\n\n/*\n** CAPI3REF: Unlock Notification\n** METHOD: sqlite3\n**\n** ^When running in shared-cache mode, a database operation may fail with\n** an [SQLITE_LOCKED] error if the required locks on the shared-cache or\n** individual tables within the shared-cache cannot be obtained. See\n** [SQLite Shared-Cache Mode] for a description of shared-cache locking.\n** ^This API may be used to register a callback that SQLite will invoke\n** when the connection currently holding the required lock relinquishes it.\n** ^This API is only available if the library was compiled with the\n** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.\n**\n** See Also: [Using the SQLite Unlock Notification Feature].\n**\n** ^Shared-cache locks are released when a database connection concludes\n** its current transaction, either by committing it or rolling it back.\n**\n** ^When a connection (known as the blocked connection) fails to obtain a\n** shared-cache lock and SQLITE_LOCKED is returned to the caller, the\n** identity of the database connection (the blocking connection) that\n** has locked the required resource is stored internally. ^After an\n** application receives an SQLITE_LOCKED error, it may call the\n** sqlite3_unlock_notify() method with the blocked connection handle as\n** the first argument to register for a callback that will be invoked\n** when the blocking connection's current transaction is concluded. ^The\n** callback is invoked from within the [sqlite3_step] or [sqlite3_close]\n** call that concludes the blocking connection's transaction.\n**\n** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,\n** there is a chance that the blocking connection will have already\n** concluded its transaction by the time sqlite3_unlock_notify() is invoked.\n** If this happens, then the specified callback is invoked immediately,\n** from within the call to sqlite3_unlock_notify().)^\n**\n** ^If the blocked connection is attempting to obtain a write-lock on a\n** shared-cache table, and more than one other connection currently holds\n** a read-lock on the same table, then SQLite arbitrarily selects one of\n** the other connections to use as the blocking connection.\n**\n** ^(There may be at most one unlock-notify callback registered by a\n** blocked connection. If sqlite3_unlock_notify() is called when the\n** blocked connection already has a registered unlock-notify callback,\n** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is\n** called with a NULL pointer as its second argument, then any existing\n** unlock-notify callback is canceled. ^The blocked connection's\n** unlock-notify callback may also be canceled by closing the blocked\n** connection using [sqlite3_close()].\n**\n** The unlock-notify callback is not reentrant. If an application invokes\n** any sqlite3_xxx API functions from within an unlock-notify callback, a\n** crash or deadlock may be the result.\n**\n** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always\n** returns SQLITE_OK.\n**\n** <b>Callback Invocation Details</b>\n**\n** When an unlock-notify callback is registered, the application provides a\n** single void* pointer that is passed to the callback when it is invoked.\n** However, the signature of the callback function allows SQLite to pass\n** it an array of void* context pointers. The first argument passed to\n** an unlock-notify callback is a pointer to an array of void* pointers,\n** and the second is the number of entries in the array.\n**\n** When a blocking connection's transaction is concluded, there may be\n** more than one blocked connection that has registered for an unlock-notify\n** callback. ^If two or more such blocked connections have specified the\n** same callback function, then instead of invoking the callback function\n** multiple times, it is invoked once with the set of void* context pointers\n** specified by the blocked connections bundled together into an array.\n** This gives the application an opportunity to prioritize any actions\n** related to the set of unblocked database connections.\n**\n** <b>Deadlock Detection</b>\n**\n** Assuming that after registering for an unlock-notify callback a\n** database waits for the callback to be issued before taking any further\n** action (a reasonable assumption), then using this API may cause the\n** application to deadlock. For example, if connection X is waiting for\n** connection Y's transaction to be concluded, and similarly connection\n** Y is waiting on connection X's transaction, then neither connection\n** will proceed and the system may remain deadlocked indefinitely.\n**\n** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock\n** detection. ^If a given call to sqlite3_unlock_notify() would put the\n** system in a deadlocked state, then SQLITE_LOCKED is returned and no\n** unlock-notify callback is registered. The system is said to be in\n** a deadlocked state if connection A has registered for an unlock-notify\n** callback on the conclusion of connection B's transaction, and connection\n** B has itself registered for an unlock-notify callback when connection\n** A's transaction is concluded. ^Indirect deadlock is also detected, so\n** the system is also considered to be deadlocked if connection B has\n** registered for an unlock-notify callback on the conclusion of connection\n** C's transaction, where connection C is waiting on connection A. ^Any\n** number of levels of indirection are allowed.\n**\n** <b>The \"DROP TABLE\" Exception</b>\n**\n** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost\n** always appropriate to call sqlite3_unlock_notify(). There is however,\n** one exception. When executing a \"DROP TABLE\" or \"DROP INDEX\" statement,\n** SQLite checks if there are any currently executing SELECT statements\n** that belong to the same connection. If there are, SQLITE_LOCKED is\n** returned. In this case there is no \"blocking connection\", so invoking\n** sqlite3_unlock_notify() results in the unlock-notify callback being\n** invoked immediately. If the application then re-attempts the \"DROP TABLE\"\n** or \"DROP INDEX\" query, an infinite loop might be the result.\n**\n** One way around this problem is to check the extended error code returned\n** by an sqlite3_step() call. ^(If there is a blocking connection, then the\n** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in\n** the special \"DROP TABLE/INDEX\" case, the extended error code is just\n** SQLITE_LOCKED.)^\n*/\nSQLITE_API int sqlite3_unlock_notify(\n  sqlite3 *pBlocked,                          /* Waiting connection */\n  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */\n  void *pNotifyArg                            /* Argument to pass to xNotify */\n);\n\n\n/*\n** CAPI3REF: String Comparison\n**\n** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications\n** and extensions to compare the contents of two buffers containing UTF-8\n** strings in a case-independent fashion, using the same definition of \"case\n** independence\" that SQLite uses internally when comparing identifiers.\n*/\nSQLITE_API int sqlite3_stricmp(const char *, const char *);\nSQLITE_API int sqlite3_strnicmp(const char *, const char *, int);\n\n/*\n** CAPI3REF: String Globbing\n*\n** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if\n** string X matches the [GLOB] pattern P.\n** ^The definition of [GLOB] pattern matching used in\n** [sqlite3_strglob(P,X)] is the same as for the \"X GLOB P\" operator in the\n** SQL dialect understood by SQLite.  ^The [sqlite3_strglob(P,X)] function\n** is case sensitive.\n**\n** Note that this routine returns zero on a match and non-zero if the strings\n** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].\n**\n** See also: [sqlite3_strlike()].\n*/\nSQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);\n\n/*\n** CAPI3REF: String LIKE Matching\n*\n** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if\n** string X matches the [LIKE] pattern P with escape character E.\n** ^The definition of [LIKE] pattern matching used in\n** [sqlite3_strlike(P,X,E)] is the same as for the \"X LIKE P ESCAPE E\"\n** operator in the SQL dialect understood by SQLite.  ^For \"X LIKE P\" without\n** the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0.\n** ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case\n** insensitive - equivalent upper and lower case ASCII characters match\n** one another.\n**\n** ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though\n** only ASCII characters are case folded.\n**\n** Note that this routine returns zero on a match and non-zero if the strings\n** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].\n**\n** See also: [sqlite3_strglob()].\n*/\nSQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);\n\n/*\n** CAPI3REF: Error Logging Interface\n**\n** ^The [sqlite3_log()] interface writes a message into the [error log]\n** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].\n** ^If logging is enabled, the zFormat string and subsequent arguments are\n** used with [sqlite3_snprintf()] to generate the final output string.\n**\n** The sqlite3_log() interface is intended for use by extensions such as\n** virtual tables, collating functions, and SQL functions.  While there is\n** nothing to prevent an application from calling sqlite3_log(), doing so\n** is considered bad form.\n**\n** The zFormat string must not be NULL.\n**\n** To avoid deadlocks and other threading problems, the sqlite3_log() routine\n** will not use dynamically allocated memory.  The log message is stored in\n** a fixed-length buffer on the stack.  If the log message is longer than\n** a few hundred characters, it will be truncated to the length of the\n** buffer.\n*/\nSQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);\n\n/*\n** CAPI3REF: Write-Ahead Log Commit Hook\n** METHOD: sqlite3\n**\n** ^The [sqlite3_wal_hook()] function is used to register a callback that\n** is invoked each time data is committed to a database in wal mode.\n**\n** ^(The callback is invoked by SQLite after the commit has taken place and\n** the associated write-lock on the database released)^, so the implementation\n** may read, write or [checkpoint] the database as required.\n**\n** ^The first parameter passed to the callback function when it is invoked\n** is a copy of the third parameter passed to sqlite3_wal_hook() when\n** registering the callback. ^The second is a copy of the database handle.\n** ^The third parameter is the name of the database that was written to -\n** either \"main\" or the name of an [ATTACH]-ed database. ^The fourth parameter\n** is the number of pages currently in the write-ahead log file,\n** including those that were just committed.\n**\n** ^The callback function should normally return [SQLITE_OK].  ^If an error\n** code is returned, that error will propagate back up through the\n** SQLite code base to cause the statement that provoked the callback\n** to report an error, though the commit will have still occurred. If the\n** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value\n** that does not correspond to any valid SQLite error code, the results\n** are undefined.\n**\n** ^A single database handle may have at most a single write-ahead log\n** callback registered at one time. ^Calling [sqlite3_wal_hook()]\n** replaces the default behavior or previously registered write-ahead\n** log callback.\n**\n** ^The return value is a copy of the third parameter from the\n** previous call, if any, or 0.\n**\n** ^The [sqlite3_wal_autocheckpoint()] interface and the\n** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and\n** will overwrite any prior [sqlite3_wal_hook()] settings.\n**\n** ^If a write-ahead log callback is set using this function then\n** [sqlite3_wal_checkpoint_v2()] or [PRAGMA wal_checkpoint]\n** should be invoked periodically to keep the write-ahead log file\n** from growing without bound.\n**\n** ^Passing a NULL pointer for the callback disables automatic\n** checkpointing entirely. To re-enable the default behavior, call\n** sqlite3_wal_autocheckpoint(db,1000) or use [PRAGMA wal_checkpoint].\n*/\nSQLITE_API void *sqlite3_wal_hook(\n  sqlite3*,\n  int(*)(void *,sqlite3*,const char*,int),\n  void*\n);\n\n/*\n** CAPI3REF: Configure an auto-checkpoint\n** METHOD: sqlite3\n**\n** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around\n** [sqlite3_wal_hook()] that causes any database on [database connection] D\n** to automatically [checkpoint]\n** after committing a transaction if there are N or\n** more frames in the [write-ahead log] file.  ^Passing zero or\n** a negative value as the N parameter disables automatic\n** checkpoints entirely.\n**\n** ^The callback registered by this function replaces any existing callback\n** registered using [sqlite3_wal_hook()].  ^Likewise, registering a callback\n** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism\n** configured by this function.\n**\n** ^The [wal_autocheckpoint pragma] can be used to invoke this interface\n** from SQL.\n**\n** ^Checkpoints initiated by this mechanism are\n** [sqlite3_wal_checkpoint_v2|PASSIVE].\n**\n** ^Every new [database connection] defaults to having the auto-checkpoint\n** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]\n** pages.\n**\n** ^The use of this interface is only necessary if the default setting\n** is found to be suboptimal for a particular application.\n*/\nSQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);\n\n/*\n** CAPI3REF: Checkpoint a database\n** METHOD: sqlite3\n**\n** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to\n** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^\n**\n** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the\n** [write-ahead log] for database X on [database connection] D to be\n** transferred into the database file and for the write-ahead log to\n** be reset.  See the [checkpointing] documentation for addition\n** information.\n**\n** This interface used to be the only way to cause a checkpoint to\n** occur.  But then the newer and more powerful [sqlite3_wal_checkpoint_v2()]\n** interface was added.  This interface is retained for backwards\n** compatibility and as a convenience for applications that need to manually\n** start a callback but which do not need the full power (and corresponding\n** complication) of [sqlite3_wal_checkpoint_v2()].\n*/\nSQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);\n\n/*\n** CAPI3REF: Checkpoint a database\n** METHOD: sqlite3\n**\n** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint\n** operation on database X of [database connection] D in mode M.  Status\n** information is written back into integers pointed to by L and C.)^\n** ^(The M parameter must be a valid [checkpoint mode]:)^\n**\n** <dl>\n** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>\n**   ^Checkpoint as many frames as possible without waiting for any database\n**   readers or writers to finish, then sync the database file if all frames\n**   in the log were checkpointed. ^The [busy-handler callback]\n**   is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode.\n**   ^On the other hand, passive mode might leave the checkpoint unfinished\n**   if there are concurrent readers or writers.\n**\n** <dt>SQLITE_CHECKPOINT_FULL<dd>\n**   ^This mode blocks (it invokes the\n**   [sqlite3_busy_handler|busy-handler callback]) until there is no\n**   database writer and all readers are reading from the most recent database\n**   snapshot. ^It then checkpoints all frames in the log file and syncs the\n**   database file. ^This mode blocks new database writers while it is pending,\n**   but new database readers are allowed to continue unimpeded.\n**\n** <dt>SQLITE_CHECKPOINT_RESTART<dd>\n**   ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition\n**   that after checkpointing the log file it blocks (calls the\n**   [busy-handler callback])\n**   until all readers are reading from the database file only. ^This ensures\n**   that the next writer will restart the log file from the beginning.\n**   ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new\n**   database writer attempts while it is pending, but does not impede readers.\n**\n** <dt>SQLITE_CHECKPOINT_TRUNCATE<dd>\n**   ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the\n**   addition that it also truncates the log file to zero bytes just prior\n**   to a successful return.\n**\n** <dt>SQLITE_CHECKPOINT_NOOP<dd>\n**   ^This mode always checkpoints zero frames. The only reason to invoke\n**   a NOOP checkpoint is to access the values returned by\n**   sqlite3_wal_checkpoint_v2() via output parameters *pnLog and *pnCkpt.\n** </dl>\n**\n** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in\n** the log file or to -1 if the checkpoint could not run because\n** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not\n** NULL,then *pnCkpt is set to the total number of checkpointed frames in the\n** log file (including any that were already checkpointed before the function\n** was called) or to -1 if the checkpoint could not run due to an error or\n** because the database is not in WAL mode. ^Note that upon successful\n** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been\n** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero.\n**\n** ^All calls obtain an exclusive \"checkpoint\" lock on the database file. ^If\n** any other process is running a checkpoint operation at the same time, the\n** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a\n** busy-handler configured, it will not be invoked in this case.\n**\n** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the\n** exclusive \"writer\" lock on the database file. ^If the writer lock cannot be\n** obtained immediately, and a busy-handler is configured, it is invoked and\n** the writer lock retried until either the busy-handler returns 0 or the lock\n** is successfully obtained. ^The busy-handler is also invoked while waiting for\n** database readers as described above. ^If the busy-handler returns 0 before\n** the writer lock is obtained or while waiting for database readers, the\n** checkpoint operation proceeds from that point in the same way as\n** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible\n** without blocking any further. ^SQLITE_BUSY is returned in this case.\n**\n** ^If parameter zDb is NULL or points to a zero length string, then the\n** specified operation is attempted on all WAL databases [attached] to\n** [database connection] db.  In this case the\n** values written to output parameters *pnLog and *pnCkpt are undefined. ^If\n** an SQLITE_BUSY error is encountered when processing one or more of the\n** attached WAL databases, the operation is still attempted on any remaining\n** attached databases and SQLITE_BUSY is returned at the end. ^If any other\n** error occurs while processing an attached database, processing is abandoned\n** and the error code is returned to the caller immediately. ^If no error\n** (SQLITE_BUSY or otherwise) is encountered while processing the attached\n** databases, SQLITE_OK is returned.\n**\n** ^If database zDb is the name of an attached database that is not in WAL\n** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If\n** zDb is not NULL (or a zero length string) and is not the name of any\n** attached database, SQLITE_ERROR is returned to the caller.\n**\n** ^Unless it returns SQLITE_MISUSE,\n** the sqlite3_wal_checkpoint_v2() interface\n** sets the error information that is queried by\n** [sqlite3_errcode()] and [sqlite3_errmsg()].\n**\n** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface\n** from SQL.\n*/\nSQLITE_API int sqlite3_wal_checkpoint_v2(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of attached database (or NULL) */\n  int eMode,                      /* SQLITE_CHECKPOINT_* value */\n  int *pnLog,                     /* OUT: Size of WAL log in frames */\n  int *pnCkpt                     /* OUT: Total number of frames checkpointed */\n);\n\n/*\n** CAPI3REF: Checkpoint Mode Values\n** KEYWORDS: {checkpoint mode}\n**\n** These constants define all valid values for the \"checkpoint mode\" passed\n** as the third parameter to the [sqlite3_wal_checkpoint_v2()] interface.\n** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the\n** meaning of each of these checkpoint modes.\n*/\n#define SQLITE_CHECKPOINT_NOOP    -1  /* Do no work at all */\n#define SQLITE_CHECKPOINT_PASSIVE  0  /* Do as much as possible w/o blocking */\n#define SQLITE_CHECKPOINT_FULL     1  /* Wait for writers, then checkpoint */\n#define SQLITE_CHECKPOINT_RESTART  2  /* Like FULL but wait for readers */\n#define SQLITE_CHECKPOINT_TRUNCATE 3  /* Like RESTART but also truncate WAL */\n\n/*\n** CAPI3REF: Virtual Table Interface Configuration\n**\n** This function may be called by either the [xConnect] or [xCreate] method\n** of a [virtual table] implementation to configure\n** various facets of the virtual table interface.\n**\n** If this interface is invoked outside the context of an xConnect or\n** xCreate virtual table method then the behavior is undefined.\n**\n** In the call sqlite3_vtab_config(D,C,...) the D parameter is the\n** [database connection] in which the virtual table is being created and\n** which is passed in as the first argument to the [xConnect] or [xCreate]\n** method that is invoking sqlite3_vtab_config().  The C parameter is one\n** of the [virtual table configuration options].  The presence and meaning\n** of parameters after C depend on which [virtual table configuration option]\n** is used.\n*/\nSQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);\n\n/*\n** CAPI3REF: Virtual Table Configuration Options\n** KEYWORDS: {virtual table configuration options}\n** KEYWORDS: {virtual table configuration option}\n**\n** These macros define the various options to the\n** [sqlite3_vtab_config()] interface that [virtual table] implementations\n** can use to customize and optimize their behavior.\n**\n** <dl>\n** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]]\n** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,\n** where X is an integer.  If X is zero, then the [virtual table] whose\n** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not\n** support constraints.  In this configuration (which is the default) if\n** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire\n** statement is rolled back as if [ON CONFLICT | OR ABORT] had been\n** specified as part of the user's SQL statement, regardless of the actual\n** ON CONFLICT mode specified.\n**\n** If X is non-zero, then the virtual table implementation guarantees\n** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before\n** any modifications to internal or persistent data structures have been made.\n** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite\n** is able to roll back a statement or database transaction, and abandon\n** or continue processing the current SQL statement as appropriate.\n** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns\n** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode\n** had been ABORT.\n**\n** Virtual table implementations that are required to handle OR REPLACE\n** must do so within the [xUpdate] method. If a call to the\n** [sqlite3_vtab_on_conflict()] function indicates that the current ON\n** CONFLICT policy is REPLACE, the virtual table implementation should\n** silently replace the appropriate rows within the xUpdate callback and\n** return SQLITE_OK. Or, if this is not possible, it may return\n** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT\n** constraint handling.\n** </dd>\n**\n** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the\n** the [xConnect] or [xCreate] methods of a [virtual table] implementation\n** prohibits that virtual table from being used from within triggers and\n** views.\n** </dd>\n**\n** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the\n** [xConnect] or [xCreate] methods of a [virtual table] implementation\n** identify that virtual table as being safe to use from within triggers\n** and views.  Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the\n** virtual table can do no serious harm even if it is controlled by a\n** malicious hacker.  Developers should avoid setting the SQLITE_VTAB_INNOCUOUS\n** flag unless absolutely necessary.\n** </dd>\n**\n** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]<dt>SQLITE_VTAB_USES_ALL_SCHEMAS</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the\n** the [xConnect] or [xCreate] methods of a [virtual table] implementation\n** instruct the query planner to begin at least a read transaction on\n** all schemas (\"main\", \"temp\", and any ATTACH-ed databases) whenever the\n** virtual table is used.\n** </dd>\n** </dl>\n*/\n#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1\n#define SQLITE_VTAB_INNOCUOUS          2\n#define SQLITE_VTAB_DIRECTONLY         3\n#define SQLITE_VTAB_USES_ALL_SCHEMAS   4\n\n/*\n** CAPI3REF: Determine The Virtual Table Conflict Policy\n**\n** This function may only be called from within a call to the [xUpdate] method\n** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The\n** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],\n** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode\n** of the SQL statement that triggered the call to the [xUpdate] method of the\n** [virtual table].\n*/\nSQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);\n\n/*\n** CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE\n**\n** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]\n** method of a [virtual table], then it might return true if the\n** column is being fetched as part of an UPDATE operation during which the\n** column value will not change.  The virtual table implementation can use\n** this hint as permission to substitute a return value that is less\n** expensive to compute and that the corresponding\n** [xUpdate] method understands as a \"no-change\" value.\n**\n** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that\n** the column is not changed by the UPDATE statement, then the xColumn\n** method can optionally return without setting a result, without calling\n** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].\n** In that case, [sqlite3_value_nochange(X)] will return true for the\n** same column in the [xUpdate] method.\n**\n** The sqlite3_vtab_nochange() routine is an optimization.  Virtual table\n** implementations should continue to give a correct answer even if the\n** sqlite3_vtab_nochange() interface were to always return false.  In the\n** current implementation, the sqlite3_vtab_nochange() interface does always\n** returns false for the enhanced [UPDATE FROM] statement.\n*/\nSQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);\n\n/*\n** CAPI3REF: Determine The Collation For a Virtual Table Constraint\n** METHOD: sqlite3_index_info\n**\n** This function may only be called from within a call to the [xBestIndex]\n** method of a [virtual table].  This function returns a pointer to a string\n** that is the name of the appropriate collation sequence to use for text\n** comparisons on the constraint identified by its arguments.\n**\n** The first argument must be the pointer to the [sqlite3_index_info] object\n** that is the first parameter to the xBestIndex() method. The second argument\n** must be an index into the aConstraint[] array belonging to the\n** sqlite3_index_info structure passed to xBestIndex.\n**\n** Important:\n** The first parameter must be the same pointer that is passed into the\n** xBestMethod() method.  The first parameter may not be a pointer to a\n** different [sqlite3_index_info] object, even an exact copy.\n**\n** The return value is computed as follows:\n**\n** <ol>\n** <li><p> If the constraint comes from a WHERE clause expression that contains\n**         a [COLLATE operator], then the name of the collation specified by\n**         that COLLATE operator is returned.\n** <li><p> If there is no COLLATE operator, but the column that is the subject\n**         of the constraint specifies an alternative collating sequence via\n**         a [COLLATE clause] on the column definition within the CREATE TABLE\n**         statement that was passed into [sqlite3_declare_vtab()], then the\n**         name of that alternative collating sequence is returned.\n** <li><p> Otherwise, \"BINARY\" is returned.\n** </ol>\n*/\nSQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);\n\n/*\n** CAPI3REF: Determine if a virtual table query is DISTINCT\n** METHOD: sqlite3_index_info\n**\n** This API may only be used from within an [xBestIndex|xBestIndex method]\n** of a [virtual table] implementation. The result of calling this\n** interface from outside of xBestIndex() is undefined and probably harmful.\n**\n** ^The sqlite3_vtab_distinct() interface returns an integer between 0 and\n** 3.  The integer returned by sqlite3_vtab_distinct()\n** gives the virtual table additional information about how the query\n** planner wants the output to be ordered. As long as the virtual table\n** can meet the ordering requirements of the query planner, it may set\n** the \"orderByConsumed\" flag.\n**\n** <ol><li value=\"0\"><p>\n** ^If the sqlite3_vtab_distinct() interface returns 0, that means\n** that the query planner needs the virtual table to return all rows in the\n** sort order defined by the \"nOrderBy\" and \"aOrderBy\" fields of the\n** [sqlite3_index_info] object.  This is the default expectation.  If the\n** virtual table outputs all rows in sorted order, then it is always safe for\n** the xBestIndex method to set the \"orderByConsumed\" flag, regardless of\n** the return value from sqlite3_vtab_distinct().\n** <li value=\"1\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 1, that means\n** that the query planner does not need the rows to be returned in sorted order\n** as long as all rows with the same values in all columns identified by the\n** \"aOrderBy\" field are adjacent.)^  This mode is used when the query planner\n** is doing a GROUP BY.\n** <li value=\"2\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 2, that means\n** that the query planner does not need the rows returned in any particular\n** order, as long as rows with the same values in all columns identified\n** by \"aOrderBy\" are adjacent.)^  ^(Furthermore, when two or more rows\n** contain the same values for all columns identified by \"colUsed\", all but\n** one such row may optionally be omitted from the result.)^\n** The virtual table is not required to omit rows that are duplicates\n** over the \"colUsed\" columns, but if the virtual table can do that without\n** too much extra effort, it could potentially help the query to run faster.\n** This mode is used for a DISTINCT query.\n** <li value=\"3\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the\n** virtual table must return rows in the order defined by \"aOrderBy\" as\n** if the sqlite3_vtab_distinct() interface had returned 0.  However if\n** two or more rows in the result have the same values for all columns\n** identified by \"colUsed\", then all but one such row may optionally be\n** omitted.)^  Like when the return value is 2, the virtual table\n** is not required to omit rows that are duplicates over the \"colUsed\"\n** columns, but if the virtual table can do that without\n** too much extra effort, it could potentially help the query to run faster.\n** This mode is used for queries\n** that have both DISTINCT and ORDER BY clauses.\n** </ol>\n**\n** <p>The following table summarizes the conditions under which the\n** virtual table is allowed to set the \"orderByConsumed\" flag based on\n** the value returned by sqlite3_vtab_distinct().  This table is a\n** restatement of the previous four paragraphs:\n**\n** <table border=1 cellspacing=0 cellpadding=10 width=\"90%\">\n** <tr>\n** <td valign=\"top\">sqlite3_vtab_distinct() return value\n** <td valign=\"top\">Rows are returned in aOrderBy order\n** <td valign=\"top\">Rows with the same value in all aOrderBy columns are adjacent\n** <td valign=\"top\">Duplicates over all colUsed columns may be omitted\n** <tr><td>0<td>yes<td>yes<td>no\n** <tr><td>1<td>no<td>yes<td>no\n** <tr><td>2<td>no<td>yes<td>yes\n** <tr><td>3<td>yes<td>yes<td>yes\n** </table>\n**\n** ^For the purposes of comparing virtual table output values to see if the\n** values are the same value for sorting purposes, two NULL values are considered\n** to be the same.  In other words, the comparison operator is \"IS\"\n** (or \"IS NOT DISTINCT FROM\") and not \"==\".\n**\n** If a virtual table implementation is unable to meet the requirements\n** specified above, then it must not set the \"orderByConsumed\" flag in the\n** [sqlite3_index_info] object or an incorrect answer may result.\n**\n** ^A virtual table implementation is always free to return rows in any order\n** it wants, as long as the \"orderByConsumed\" flag is not set.  ^When the\n** \"orderByConsumed\" flag is unset, the query planner will add extra\n** [bytecode] to ensure that the final results returned by the SQL query are\n** ordered correctly.  The use of the \"orderByConsumed\" flag and the\n** sqlite3_vtab_distinct() interface is merely an optimization.  ^Careful\n** use of the sqlite3_vtab_distinct() interface and the \"orderByConsumed\"\n** flag might help queries against a virtual table to run faster.  Being\n** overly aggressive and setting the \"orderByConsumed\" flag when it is not\n** valid to do so, on the other hand, might cause SQLite to return incorrect\n** results.\n*/\nSQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);\n\n/*\n** CAPI3REF: Identify and handle IN constraints in xBestIndex\n**\n** This interface may only be used from within an\n** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.\n** The result of invoking this interface from any other context is\n** undefined and probably harmful.\n**\n** ^(A constraint on a virtual table of the form\n** \"[IN operator|column IN (...)]\" is\n** communicated to the xBestIndex method as a\n** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^  If xBestIndex wants to use\n** this constraint, it must set the corresponding\n** aConstraintUsage[].argvIndex to a positive integer.  ^(Then, under\n** the usual mode of handling IN operators, SQLite generates [bytecode]\n** that invokes the [xFilter|xFilter() method] once for each value\n** on the right-hand side of the IN operator.)^  Thus the virtual table\n** only sees a single value from the right-hand side of the IN operator\n** at a time.\n**\n** In some cases, however, it would be advantageous for the virtual\n** table to see all values on the right-hand of the IN operator all at\n** once.  The sqlite3_vtab_in() interfaces facilitates this in two ways:\n**\n** <ol>\n** <li><p>\n**   ^A call to sqlite3_vtab_in(P,N,-1) will return true (non-zero)\n**   if and only if the [sqlite3_index_info|P->aConstraint][N] constraint\n**   is an [IN operator] that can be processed all at once.  ^In other words,\n**   sqlite3_vtab_in() with -1 in the third argument is a mechanism\n**   by which the virtual table can ask SQLite if all-at-once processing\n**   of the IN operator is even possible.\n**\n** <li><p>\n**   ^A call to sqlite3_vtab_in(P,N,F) with F==1 or F==0 indicates\n**   to SQLite that the virtual table does or does not want to process\n**   the IN operator all-at-once, respectively.  ^Thus when the third\n**   parameter (F) is non-negative, this interface is the mechanism by\n**   which the virtual table tells SQLite how it wants to process the\n**   IN operator.\n** </ol>\n**\n** ^The sqlite3_vtab_in(P,N,F) interface can be invoked multiple times\n** within the same xBestIndex method call.  ^For any given P,N pair,\n** the return value from sqlite3_vtab_in(P,N,F) will always be the same\n** within the same xBestIndex call.  ^If the interface returns true\n** (non-zero), that means that the constraint is an IN operator\n** that can be processed all-at-once.  ^If the constraint is not an IN\n** operator or cannot be processed all-at-once, then the interface returns\n** false.\n**\n** ^(All-at-once processing of the IN operator is selected if both of the\n** following conditions are met:\n**\n** <ol>\n** <li><p> The P->aConstraintUsage[N].argvIndex value is set to a positive\n** integer.  This is how the virtual table tells SQLite that it wants to\n** use the N-th constraint.\n**\n** <li><p> The last call to sqlite3_vtab_in(P,N,F) for which F was\n** non-negative had F>=1.\n** </ol>)^\n**\n** ^If either or both of the conditions above are false, then SQLite uses\n** the traditional one-at-a-time processing strategy for the IN constraint.\n** ^If both conditions are true, then the argvIndex-th parameter to the\n** xFilter method will be an [sqlite3_value] that appears to be NULL,\n** but which can be passed to [sqlite3_vtab_in_first()] and\n** [sqlite3_vtab_in_next()] to find all values on the right-hand side\n** of the IN constraint.\n*/\nSQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);\n\n/*\n** CAPI3REF: Find all elements on the right-hand side of an IN constraint.\n**\n** These interfaces are only useful from within the\n** [xFilter|xFilter() method] of a [virtual table] implementation.\n** The result of invoking these interfaces from any other context\n** is undefined and probably harmful.\n**\n** The X parameter in a call to sqlite3_vtab_in_first(X,P) or\n** sqlite3_vtab_in_next(X,P) should be one of the parameters to the\n** xFilter method which invokes these routines, and specifically\n** a parameter that was previously selected for all-at-once IN constraint\n** processing using the [sqlite3_vtab_in()] interface in the\n** [xBestIndex|xBestIndex method].  ^(If the X parameter is not\n** an xFilter argument that was selected for all-at-once IN constraint\n** processing, then these routines return [SQLITE_ERROR].)^\n**\n** ^(Use these routines to access all values on the right-hand side\n** of the IN constraint using code like the following:\n**\n** <blockquote><pre>\n** &nbsp;  for(rc=sqlite3_vtab_in_first(pList, &pVal);\n** &nbsp;      rc==SQLITE_OK && pVal;\n** &nbsp;      rc=sqlite3_vtab_in_next(pList, &pVal)\n** &nbsp;  ){\n** &nbsp;    // do something with pVal\n** &nbsp;  }\n** &nbsp;  if( rc!=SQLITE_DONE ){\n** &nbsp;    // an error has occurred\n** &nbsp;  }\n** </pre></blockquote>)^\n**\n** ^On success, the sqlite3_vtab_in_first(X,P) and sqlite3_vtab_in_next(X,P)\n** routines return SQLITE_OK and set *P to point to the first or next value\n** on the RHS of the IN constraint.  ^If there are no more values on the\n** right hand side of the IN constraint, then *P is set to NULL and these\n** routines return [SQLITE_DONE].  ^The return value might be\n** some other value, such as SQLITE_NOMEM, in the event of a malfunction.\n**\n** The *ppOut values returned by these routines are only valid until the\n** next call to either of these routines or until the end of the xFilter\n** method from which these routines were called.  If the virtual table\n** implementation needs to retain the *ppOut values for longer, it must make\n** copies.  The *ppOut values are [protected sqlite3_value|protected].\n*/\nSQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut);\nSQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);\n\n/*\n** CAPI3REF: Constraint values in xBestIndex()\n** METHOD: sqlite3_index_info\n**\n** This API may only be used from within the [xBestIndex|xBestIndex method]\n** of a [virtual table] implementation. The result of calling this interface\n** from outside of an xBestIndex method are undefined and probably harmful.\n**\n** ^When the sqlite3_vtab_rhs_value(P,J,V) interface is invoked from within\n** the [xBestIndex] method of a [virtual table] implementation, with P being\n** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and\n** J being a 0-based index into P->aConstraint[], then this routine\n** attempts to set *V to the value of the right-hand operand of\n** that constraint if the right-hand operand is known.  ^If the\n** right-hand operand is not known, then *V is set to a NULL pointer.\n** ^The sqlite3_vtab_rhs_value(P,J,V) interface returns SQLITE_OK if\n** and only if *V is set to a value.  ^The sqlite3_vtab_rhs_value(P,J,V)\n** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th\n** constraint is not available.  ^The sqlite3_vtab_rhs_value() interface\n** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if\n** something goes wrong.\n**\n** The sqlite3_vtab_rhs_value() interface is usually only successful if\n** the right-hand operand of a constraint is a literal value in the original\n** SQL statement.  If the right-hand operand is an expression or a reference\n** to some other column or a [host parameter], then sqlite3_vtab_rhs_value()\n** will probably return [SQLITE_NOTFOUND].\n**\n** ^(Some constraints, such as [SQLITE_INDEX_CONSTRAINT_ISNULL] and\n** [SQLITE_INDEX_CONSTRAINT_ISNOTNULL], have no right-hand operand.  For such\n** constraints, sqlite3_vtab_rhs_value() always returns SQLITE_NOTFOUND.)^\n**\n** ^The [sqlite3_value] object returned in *V is a protected sqlite3_value\n** and remains valid for the duration of the xBestIndex method call.\n** ^When xBestIndex returns, the sqlite3_value object returned by\n** sqlite3_vtab_rhs_value() is automatically deallocated.\n**\n** The \"_rhs_\" in the name of this routine is an abbreviation for\n** \"Right-Hand Side\".\n*/\nSQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **ppVal);\n\n/*\n** CAPI3REF: Conflict resolution modes\n** KEYWORDS: {conflict resolution mode}\n**\n** These constants are returned by [sqlite3_vtab_on_conflict()] to\n** inform a [virtual table] implementation of the [ON CONFLICT] mode\n** for the SQL statement being evaluated.\n**\n** Note that the [SQLITE_IGNORE] constant is also used as a potential\n** return value from the [sqlite3_set_authorizer()] callback and that\n** [SQLITE_ABORT] is also a [result code].\n*/\n#define SQLITE_ROLLBACK 1\n/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */\n#define SQLITE_FAIL     3\n/* #define SQLITE_ABORT 4  // Also an error code */\n#define SQLITE_REPLACE  5\n\n/*\n** CAPI3REF: Prepared Statement Scan Status Opcodes\n** KEYWORDS: {scanstatus options}\n**\n** The following constants can be used for the T parameter to the\n** [sqlite3_stmt_scanstatus(S,X,T,V)] interface.  Each constant designates a\n** different metric for sqlite3_stmt_scanstatus() to return.\n**\n** When the value returned to V is a string, space to hold that string is\n** managed by the prepared statement S and will be automatically freed when\n** S is finalized.\n**\n** Not all values are available for all query elements. When a value is\n** not available, the output variable is set to -1 if the value is numeric,\n** or to NULL if it is a string (SQLITE_SCANSTAT_NAME).\n**\n** <dl>\n** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt>\n** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be\n** set to the total number of times that the X-th loop has run.</dd>\n**\n** [[SQLITE_SCANSTAT_NVISIT]] <dt>SQLITE_SCANSTAT_NVISIT</dt>\n** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be set\n** to the total number of rows examined by all iterations of the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>\n** <dd>^The \"double\" variable pointed to by the V parameter will be set to the\n** query planner's estimate for the average number of rows output from each\n** iteration of the X-th loop.  If the query planner's estimate was accurate,\n** then this value will approximate the quotient NVISIT/NLOOP and the\n** product of this value for all prior loops with the same SELECTID will\n** be the NLOOP value for the current loop.</dd>\n**\n** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>\n** <dd>^The \"const char *\" variable pointed to by the V parameter will be set\n** to a zero-terminated UTF-8 string containing the name of the index or table\n** used for the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>\n** <dd>^The \"const char *\" variable pointed to by the V parameter will be set\n** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]\n** description for the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>\n** <dd>^The \"int\" variable pointed to by the V parameter will be set to the\n** id for the X-th query plan element. The id value is unique within the\n** statement. The select-id is the same value as is output in the first\n** column of an [EXPLAIN QUERY PLAN] query.</dd>\n**\n** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>\n** <dd>The \"int\" variable pointed to by the V parameter will be set to the\n** id of the parent of the current query element, if applicable, or\n** to zero if the query element has no parent. This is the same value as\n** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>\n**\n** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>\n** <dd>The sqlite3_int64 output value is set to the number of cycles,\n** according to the processor time-stamp counter, that elapsed while the\n** query element was being processed. This value is not available for\n** all query elements - if it is unavailable the output variable is\n** set to -1.</dd>\n** </dl>\n*/\n#define SQLITE_SCANSTAT_NLOOP    0\n#define SQLITE_SCANSTAT_NVISIT   1\n#define SQLITE_SCANSTAT_EST      2\n#define SQLITE_SCANSTAT_NAME     3\n#define SQLITE_SCANSTAT_EXPLAIN  4\n#define SQLITE_SCANSTAT_SELECTID 5\n#define SQLITE_SCANSTAT_PARENTID 6\n#define SQLITE_SCANSTAT_NCYCLE   7\n\n/*\n** CAPI3REF: Prepared Statement Scan Status\n** METHOD: sqlite3_stmt\n**\n** These interfaces return information about the predicted and measured\n** performance for pStmt.  Advanced applications can use this\n** interface to compare the predicted and the measured performance and\n** issue warnings and/or rerun [ANALYZE] if discrepancies are found.\n**\n** Since this interface is expected to be rarely used, it is only\n** available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS]\n** compile-time option.\n**\n** The \"iScanStatusOp\" parameter determines which status information to return.\n** The \"iScanStatusOp\" must be one of the [scanstatus options] or the behavior\n** of this interface is undefined. ^The requested measurement is written into\n** a variable pointed to by the \"pOut\" parameter.\n**\n** The \"flags\" parameter must be passed a mask of flags. At present only\n** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX\n** is specified, then status information is available for all elements\n** of a query plan that are reported by \"EXPLAIN QUERY PLAN\" output. If\n** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements\n** that correspond to query loops (the \"SCAN...\" and \"SEARCH...\" elements of\n** the EXPLAIN QUERY PLAN output) are available. Invoking API\n** sqlite3_stmt_scanstatus() is equivalent to calling\n** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.\n**\n** Parameter \"idx\" identifies the specific query element to retrieve statistics\n** for. Query elements are numbered starting from zero. A value of -1 may\n** retrieve statistics for the entire query. ^If idx is out of range\n** - less than -1 or greater than or equal to the total number of query\n** elements used to implement the statement - a non-zero value is returned and\n** the variable that pOut points to is unchanged.\n**\n** See also: [sqlite3_stmt_scanstatus_reset()]\n*/\nSQLITE_API int sqlite3_stmt_scanstatus(\n  sqlite3_stmt *pStmt,      /* Prepared statement for which info desired */\n  int idx,                  /* Index of loop to report on */\n  int iScanStatusOp,        /* Information desired.  SQLITE_SCANSTAT_* */\n  void *pOut                /* Result written here */\n);\nSQLITE_API int sqlite3_stmt_scanstatus_v2(\n  sqlite3_stmt *pStmt,      /* Prepared statement for which info desired */\n  int idx,                  /* Index of loop to report on */\n  int iScanStatusOp,        /* Information desired.  SQLITE_SCANSTAT_* */\n  int flags,                /* Mask of flags defined below */\n  void *pOut                /* Result written here */\n);\n\n/*\n** CAPI3REF: Prepared Statement Scan Status\n** KEYWORDS: {scan status flags}\n*/\n#define SQLITE_SCANSTAT_COMPLEX 0x0001\n\n/*\n** CAPI3REF: Zero Scan-Status Counters\n** METHOD: sqlite3_stmt\n**\n** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.\n**\n** This API is only available if the library is built with pre-processor\n** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.\n*/\nSQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Flush caches to disk mid-transaction\n** METHOD: sqlite3\n**\n** ^If a write-transaction is open on [database connection] D when the\n** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty\n** pages in the pager-cache that are not currently in use are written out\n** to disk. A dirty page may be in use if a database cursor created by an\n** active SQL statement is reading from it, or if it is page 1 of a database\n** file (page 1 is always \"in use\").  ^The [sqlite3_db_cacheflush(D)]\n** interface flushes caches for all schemas - \"main\", \"temp\", and\n** any [attached] databases.\n**\n** ^If this function needs to obtain extra database locks before dirty pages\n** can be flushed to disk, it does so. ^If those locks cannot be obtained\n** immediately and there is a busy-handler callback configured, it is invoked\n** in the usual manner. ^If the required lock still cannot be obtained, then\n** the database is skipped and an attempt made to flush any dirty pages\n** belonging to the next (if any) database. ^If any databases are skipped\n** because locks cannot be obtained, but no other error occurs, this\n** function returns SQLITE_BUSY.\n**\n** ^If any other error occurs while flushing dirty pages to disk (for\n** example an IO error or out-of-memory condition), then processing is\n** abandoned and an SQLite [error code] is returned to the caller immediately.\n**\n** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.\n**\n** ^This function does not set the database handle error code or message\n** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.\n*/\nSQLITE_API int sqlite3_db_cacheflush(sqlite3*);\n\n/*\n** CAPI3REF: The pre-update hook.\n** METHOD: sqlite3\n**\n** ^These interfaces are only available if SQLite is compiled using the\n** [SQLITE_ENABLE_PREUPDATE_HOOK] compile-time option.\n**\n** ^The [sqlite3_preupdate_hook()] interface registers a callback function\n** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation\n** on a database table.\n** ^At most one preupdate hook may be registered at a time on a single\n** [database connection]; each call to [sqlite3_preupdate_hook()] overrides\n** the previous setting.\n** ^The preupdate hook is disabled by invoking [sqlite3_preupdate_hook()]\n** with a NULL pointer as the second parameter.\n** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as\n** the first parameter to callbacks.\n**\n** ^The preupdate hook only fires for changes to real database tables; the\n** preupdate hook is not invoked for changes to [virtual tables] or to\n** system tables like sqlite_sequence or sqlite_stat1.\n**\n** ^The second parameter to the preupdate callback is a pointer to\n** the [database connection] that registered the preupdate hook.\n** ^The third parameter to the preupdate callback is one of the constants\n** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the\n** kind of update operation that is about to occur.\n** ^(The fourth parameter to the preupdate callback is the name of the\n** database within the database connection that is being modified.  This\n** will be \"main\" for the main database or \"temp\" for TEMP tables or\n** the name given after the AS keyword in the [ATTACH] statement for attached\n** databases.)^\n** ^The fifth parameter to the preupdate callback is the name of the\n** table that is being modified.\n**\n** For an UPDATE or DELETE operation on a [rowid table], the sixth\n** parameter passed to the preupdate callback is the initial [rowid] of the\n** row being modified or deleted. For an INSERT operation on a rowid table,\n** or any operation on a WITHOUT ROWID table, the value of the sixth\n** parameter is undefined. For an INSERT or UPDATE on a rowid table the\n** seventh parameter is the final rowid value of the row being inserted\n** or updated. The value of the seventh parameter passed to the callback\n** function is not defined for operations on WITHOUT ROWID tables, or for\n** DELETE operations on rowid tables.\n**\n** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from\n** the previous call on the same [database connection] D, or NULL for\n** the first call on D.\n**\n** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()],\n** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces\n** provide additional information about a preupdate event. These routines\n** may only be called from within a preupdate callback.  Invoking any of\n** these routines from outside of a preupdate callback or with a\n** [database connection] pointer that is different from the one supplied\n** to the preupdate callback results in undefined and probably undesirable\n** behavior.\n**\n** ^The [sqlite3_preupdate_count(D)] interface returns the number of columns\n** in the row that is being inserted, updated, or deleted.\n**\n** ^The [sqlite3_preupdate_old(D,N,P)] interface writes into P a pointer to\n** a [protected sqlite3_value] that contains the value of the Nth column of\n** the table row before it is updated.  The N parameter must be between 0\n** and one less than the number of columns or the behavior will be\n** undefined. This must only be used within SQLITE_UPDATE and SQLITE_DELETE\n** preupdate callbacks; if it is used by an SQLITE_INSERT callback then the\n** behavior is undefined.  The [sqlite3_value] that P points to\n** will be destroyed when the preupdate callback returns.\n**\n** ^The [sqlite3_preupdate_new(D,N,P)] interface writes into P a pointer to\n** a [protected sqlite3_value] that contains the value of the Nth column of\n** the table row after it is updated.  The N parameter must be between 0\n** and one less than the number of columns or the behavior will be\n** undefined. This must only be used within SQLITE_INSERT and SQLITE_UPDATE\n** preupdate callbacks; if it is used by an SQLITE_DELETE callback then the\n** behavior is undefined.  The [sqlite3_value] that P points to\n** will be destroyed when the preupdate callback returns.\n**\n** ^The [sqlite3_preupdate_depth(D)] interface returns 0 if the preupdate\n** callback was invoked as a result of a direct insert, update, or delete\n** operation; or 1 for inserts, updates, or deletes invoked by top-level\n** triggers; or 2 for changes resulting from triggers called by top-level\n** triggers; and so forth.\n**\n** When the [sqlite3_blob_write()] API is used to update a blob column,\n** the pre-update hook is invoked with SQLITE_DELETE, because\n** the new values are not yet available. In this case, when a\n** callback made with op==SQLITE_DELETE is actually a write using the\n** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns\n** the index of the column being written. In other cases, where the\n** pre-update hook is being invoked for some other reason, including a\n** regular DELETE, sqlite3_preupdate_blobwrite() returns -1.\n**\n** See also:  [sqlite3_update_hook()]\n*/\n#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)\nSQLITE_API void *sqlite3_preupdate_hook(\n  sqlite3 *db,\n  void(*xPreUpdate)(\n    void *pCtx,                   /* Copy of third arg to preupdate_hook() */\n    sqlite3 *db,                  /* Database handle */\n    int op,                       /* SQLITE_UPDATE, DELETE or INSERT */\n    char const *zDb,              /* Database name */\n    char const *zName,            /* Table name */\n    sqlite3_int64 iKey1,          /* Rowid of row about to be deleted/updated */\n    sqlite3_int64 iKey2           /* New rowid value (for a rowid UPDATE) */\n  ),\n  void*\n);\nSQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);\nSQLITE_API int sqlite3_preupdate_count(sqlite3 *);\nSQLITE_API int sqlite3_preupdate_depth(sqlite3 *);\nSQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);\nSQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);\n#endif\n\n/*\n** CAPI3REF: Low-level system error code\n** METHOD: sqlite3\n**\n** ^Attempt to return the underlying operating system error code or error\n** number that caused the most recent I/O error or failure to open a file.\n** The return value is OS-dependent.  For example, on unix systems, after\n** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be\n** called to get back the underlying \"errno\" that caused the problem, such\n** as ENOSPC, EAUTH, EISDIR, and so forth.\n*/\nSQLITE_API int sqlite3_system_errno(sqlite3*);\n\n/*\n** CAPI3REF: Database Snapshot\n** KEYWORDS: {snapshot} {sqlite3_snapshot}\n**\n** An instance of the snapshot object records the state of a [WAL mode]\n** database for some specific point in history.\n**\n** In [WAL mode], multiple [database connections] that are open on the\n** same database file can each be reading a different historical version\n** of the database file.  When a [database connection] begins a read\n** transaction, that connection sees an unchanging copy of the database\n** as it existed for the point in time when the transaction first started.\n** Subsequent changes to the database from other connections are not seen\n** by the reader until a new read transaction is started.\n**\n** The sqlite3_snapshot object records state information about an historical\n** version of the database file so that it is possible to later open a new read\n** transaction that sees that historical version of the database rather than\n** the most recent version.\n*/\ntypedef struct sqlite3_snapshot {\n  unsigned char hidden[48];\n} sqlite3_snapshot;\n\n/*\n** CAPI3REF: Record A Database Snapshot\n** CONSTRUCTOR: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a\n** new [sqlite3_snapshot] object that records the current state of\n** schema S in database connection D.  ^On success, the\n** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly\n** created [sqlite3_snapshot] object into *P and returns SQLITE_OK.\n** If there is not already a read-transaction open on schema S when\n** this function is called, one is opened automatically.\n**\n** If a read-transaction is opened by this function, then it is guaranteed\n** that the returned snapshot object may not be invalidated by a database\n** writer or checkpointer until after the read-transaction is closed. This\n** is not guaranteed if a read-transaction is already open when this\n** function is called. In that case, any subsequent write or checkpoint\n** operation on the database may invalidate the returned snapshot handle,\n** even while the read-transaction remains open.\n**\n** The following must be true for this function to succeed. If any of\n** the following statements are false when sqlite3_snapshot_get() is\n** called, SQLITE_ERROR is returned. The final value of *P is undefined\n** in this case.\n**\n** <ul>\n**   <li> The database handle must not be in [autocommit mode].\n**\n**   <li> Schema S of [database connection] D must be a [WAL mode] database.\n**\n**   <li> There must not be a write transaction open on schema S of database\n**        connection D.\n**\n**   <li> One or more transactions must have been written to the current wal\n**        file since it was created on disk (by any connection). This means\n**        that a snapshot cannot be taken on a wal mode database with no wal\n**        file immediately after it is first opened. At least one transaction\n**        must be written to it first.\n** </ul>\n**\n** This function may also return SQLITE_NOMEM.  If it is called with the\n** database handle in autocommit mode but fails for some other reason,\n** whether or not a read transaction is opened on schema S is undefined.\n**\n** The [sqlite3_snapshot] object returned from a successful call to\n** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]\n** to avoid a memory leak.\n**\n** The [sqlite3_snapshot_get()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API int sqlite3_snapshot_get(\n  sqlite3 *db,\n  const char *zSchema,\n  sqlite3_snapshot **ppSnapshot\n);\n\n/*\n** CAPI3REF: Start a read transaction on an historical snapshot\n** METHOD: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read\n** transaction or upgrades an existing one for schema S of\n** [database connection] D such that the read transaction refers to\n** historical [snapshot] P, rather than the most recent change to the\n** database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK\n** on success or an appropriate [error code] if it fails.\n**\n** ^In order to succeed, the database connection must not be in\n** [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there\n** is already a read transaction open on schema S, then the database handle\n** must have no active statements (SELECT statements that have been passed\n** to sqlite3_step() but not sqlite3_reset() or sqlite3_finalize()).\n** SQLITE_ERROR is returned if either of these conditions is violated, or\n** if schema S does not exist, or if the snapshot object is invalid.\n**\n** ^A call to sqlite3_snapshot_open() will fail to open if the specified\n** snapshot has been overwritten by a [checkpoint]. In this case\n** SQLITE_ERROR_SNAPSHOT is returned.\n**\n** If there is already a read transaction open when this function is\n** invoked, then the same read transaction remains open (on the same\n** database snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT\n** is returned. If another error code - for example SQLITE_PROTOCOL or an\n** SQLITE_IOERR error code - is returned, then the final state of the\n** read transaction is undefined. If SQLITE_OK is returned, then the\n** read transaction is now open on database snapshot P.\n**\n** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the\n** database connection D does not know that the database file for\n** schema S is in [WAL mode].  A database connection might not know\n** that the database file is in [WAL mode] if there has been no prior\n** I/O on that database connection, or if the database entered [WAL mode]\n** after the most recent I/O on the database connection.)^\n** (Hint: Run \"[PRAGMA application_id]\" against a newly opened\n** database connection in order to make it ready to use snapshots.)\n**\n** The [sqlite3_snapshot_open()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API int sqlite3_snapshot_open(\n  sqlite3 *db,\n  const char *zSchema,\n  sqlite3_snapshot *pSnapshot\n);\n\n/*\n** CAPI3REF: Destroy a snapshot\n** DESTRUCTOR: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.\n** The application must eventually free every [sqlite3_snapshot] object\n** using this routine to avoid a memory leak.\n**\n** The [sqlite3_snapshot_free()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot*);\n\n/*\n** CAPI3REF: Compare the ages of two snapshot handles.\n** METHOD: sqlite3_snapshot\n**\n** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages\n** of two valid snapshot handles.\n**\n** If the two snapshot handles are not associated with the same database\n** file, the result of the comparison is undefined.\n**\n** Additionally, the result of the comparison is only valid if both of the\n** snapshot handles were obtained by calling sqlite3_snapshot_get() since the\n** last time the wal file was deleted. The wal file is deleted when the\n** database is changed back to rollback mode or when the number of database\n** clients drops to zero. If either snapshot handle was obtained before the\n** wal file was last deleted, the value returned by this function\n** is undefined.\n**\n** Otherwise, this API returns a negative value if P1 refers to an older\n** snapshot than P2, zero if the two handles refer to the same database\n** snapshot, and a positive value if P1 is a newer snapshot than P2.\n**\n** This interface is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SNAPSHOT] option.\n*/\nSQLITE_API int sqlite3_snapshot_cmp(\n  sqlite3_snapshot *p1,\n  sqlite3_snapshot *p2\n);\n\n/*\n** CAPI3REF: Recover snapshots from a wal file\n** METHOD: sqlite3_snapshot\n**\n** If a [WAL file] remains on disk after all database connections close\n** (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control]\n** or because the last process to have the database opened exited without\n** calling [sqlite3_close()]) and a new connection is subsequently opened\n** on that database and [WAL file], the [sqlite3_snapshot_open()] interface\n** will only be able to open the last transaction added to the WAL file\n** even though the WAL file contains other valid transactions.\n**\n** This function attempts to scan the WAL file associated with database zDb\n** of database handle db and make all valid snapshots available to\n** sqlite3_snapshot_open(). It is an error if there is already a read\n** transaction open on the database, or if the database is not a WAL mode\n** database.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n**\n** This interface is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SNAPSHOT] option.\n*/\nSQLITE_API int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);\n\n/*\n** CAPI3REF: Serialize a database\n**\n** The sqlite3_serialize(D,S,P,F) interface returns a pointer to\n** memory that is a serialization of the S database on\n** [database connection] D.  If S is a NULL pointer, the main database is used.\n** If P is not a NULL pointer, then the size of the database in bytes\n** is written into *P.\n**\n** For an ordinary on-disk database file, the serialization is just a\n** copy of the disk file.  For an in-memory database or a \"TEMP\" database,\n** the serialization is the same sequence of bytes which would be written\n** to disk if that database were backed up to disk.\n**\n** The usual case is that sqlite3_serialize() copies the serialization of\n** the database into memory obtained from [sqlite3_malloc64()] and returns\n** a pointer to that memory.  The caller is responsible for freeing the\n** returned value to avoid a memory leak.  However, if the F argument\n** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations\n** are made, and the sqlite3_serialize() function will return a pointer\n** to the contiguous memory representation of the database that SQLite\n** is currently using for that database, or NULL if no such contiguous\n** memory representation of the database exists.  A contiguous memory\n** representation of the database will usually only exist if there has\n** been a prior call to [sqlite3_deserialize(D,S,...)] with the same\n** values of D and S.\n** The size of the database is written into *P even if the\n** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy\n** of the database exists.\n**\n** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,\n** the returned buffer content will remain accessible and unchanged\n** until either the next write operation on the connection or when\n** the connection is closed, and applications must not modify the\n** buffer. If the bit had been clear, the returned buffer will not\n** be accessed by SQLite after the call.\n**\n** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the\n** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory\n** allocation error occurs.\n**\n** This interface is omitted if SQLite is compiled with the\n** [SQLITE_OMIT_DESERIALIZE] option.\n*/\nSQLITE_API unsigned char *sqlite3_serialize(\n  sqlite3 *db,           /* The database connection */\n  const char *zSchema,   /* Which DB to serialize. ex: \"main\", \"temp\", ... */\n  sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */\n  unsigned int mFlags    /* Zero or more SQLITE_SERIALIZE_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3_serialize\n**\n** Zero or more of the following constants can be OR-ed together for\n** the F argument to [sqlite3_serialize(D,S,P,F)].\n**\n** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return\n** a pointer to contiguous in-memory database that it is currently using,\n** without making a copy of the database.  If SQLite is not currently using\n** a contiguous in-memory database, then this option causes\n** [sqlite3_serialize()] to return a NULL pointer.  SQLite will only be\n** using a contiguous in-memory database if it has been initialized by a\n** prior call to [sqlite3_deserialize()].\n*/\n#define SQLITE_SERIALIZE_NOCOPY 0x001   /* Do no memory allocations */\n\n/*\n** CAPI3REF: Deserialize a database\n**\n** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the\n** [database connection] D to disconnect from database S and then\n** reopen S as an in-memory database based on the serialization\n** contained in P.  If S is a NULL pointer, the main database is\n** used. The serialized database P is N bytes in size.  M is the size\n** of the buffer P, which might be larger than N.  If M is larger than\n** N, and the SQLITE_DESERIALIZE_READONLY bit is not set in F, then\n** SQLite is permitted to add content to the in-memory database as\n** long as the total size does not exceed M bytes.\n**\n** If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will\n** invoke sqlite3_free() on the serialization buffer when the database\n** connection closes.  If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then\n** SQLite will try to increase the buffer size using sqlite3_realloc64()\n** if writes on the database cause it to grow larger than M bytes.\n**\n** Applications must not modify the buffer P or invalidate it before\n** the database connection D is closed.\n**\n** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the\n** database is currently in a read transaction or is involved in a backup\n** operation.\n**\n** It is not possible to deserialize into the TEMP database.  If the\n** S argument to sqlite3_deserialize(D,S,P,N,M,F) is \"temp\" then the\n** function returns SQLITE_ERROR.\n**\n** The deserialized database should not be in [WAL mode].  If the database\n** is in WAL mode, then any attempt to use the database file will result\n** in an [SQLITE_CANTOPEN] error.  The application can set the\n** [file format version numbers] (bytes 18 and 19) of the input database P\n** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the\n** database file into rollback mode and work around this limitation.\n**\n** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the\n** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then\n** [sqlite3_free()] is invoked on argument P prior to returning.\n**\n** This interface is omitted if SQLite is compiled with the\n** [SQLITE_OMIT_DESERIALIZE] option.\n*/\nSQLITE_API int sqlite3_deserialize(\n  sqlite3 *db,            /* The database connection */\n  const char *zSchema,    /* Which DB to reopen with the deserialization */\n  unsigned char *pData,   /* The serialized database content */\n  sqlite3_int64 szDb,     /* Number of bytes in the deserialization */\n  sqlite3_int64 szBuf,    /* Total size of buffer pData[] */\n  unsigned mFlags         /* Zero or more SQLITE_DESERIALIZE_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3_deserialize()\n**\n** The following are allowed values for the 6th argument (the F argument) to\n** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.\n**\n** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization\n** in the P argument is held in memory obtained from [sqlite3_malloc64()]\n** and that SQLite should take ownership of this memory and automatically\n** free it when it has finished using it.  Without this flag, the caller\n** is responsible for freeing any dynamically allocated memory.\n**\n** The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to\n** grow the size of the database using calls to [sqlite3_realloc64()].  This\n** flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.\n** Without this flag, the deserialized database cannot increase in size beyond\n** the number of bytes specified by the M parameter.\n**\n** The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database\n** should be treated as read-only.\n*/\n#define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */\n#define SQLITE_DESERIALIZE_RESIZEABLE  2 /* Resize using sqlite3_realloc64() */\n#define SQLITE_DESERIALIZE_READONLY    4 /* Database is read-only */\n\n/*\n** CAPI3REF: Bind array values to the CARRAY table-valued function\n**\n** The sqlite3_carray_bind(S,I,P,N,F,X) interface binds an array value to\n** one of the first argument of the [carray() table-valued function].  The\n** S parameter is a pointer to the [prepared statement] that uses the carray()\n** functions.  I is the parameter index to be bound.  P is a pointer to the\n** array to be bound, and N is the number of eements in the array.  The\n** F argument is one of constants [SQLITE_CARRAY_INT32], [SQLITE_CARRAY_INT64],\n** [SQLITE_CARRAY_DOUBLE], [SQLITE_CARRAY_TEXT], or [SQLITE_CARRAY_BLOB] to\n** indicate the datatype of the array being bound.  The X argument is not a\n** NULL pointer, then SQLite will invoke the function X on the P parameter\n** after it has finished using P, even if the call to\n** sqlite3_carray_bind() fails. The special-case finalizer\n** SQLITE_TRANSIENT has no effect here.\n*/\nSQLITE_API int sqlite3_carray_bind(\n  sqlite3_stmt *pStmt,        /* Statement to be bound */\n  int i,                      /* Parameter index */\n  void *aData,                /* Pointer to array data */\n  int nData,                  /* Number of data elements */\n  int mFlags,                 /* CARRAY flags */\n  void (*xDel)(void*)         /* Destructor for aData */\n);\n\n/*\n** CAPI3REF: Datatypes for the CARRAY table-valued function\n**\n** The fifth argument to the [sqlite3_carray_bind()] interface musts be\n** one of the following constants, to specify the datatype of the array\n** that is being bound into the [carray table-valued function].\n*/\n#define SQLITE_CARRAY_INT32     0    /* Data is 32-bit signed integers */\n#define SQLITE_CARRAY_INT64     1    /* Data is 64-bit signed integers */\n#define SQLITE_CARRAY_DOUBLE    2    /* Data is doubles */\n#define SQLITE_CARRAY_TEXT      3    /* Data is char* */\n#define SQLITE_CARRAY_BLOB      4    /* Data is struct iovec */\n\n/*\n** Versions of the above #defines that omit the initial SQLITE_, for\n** legacy compatibility.\n*/\n#define CARRAY_INT32     0    /* Data is 32-bit signed integers */\n#define CARRAY_INT64     1    /* Data is 64-bit signed integers */\n#define CARRAY_DOUBLE    2    /* Data is doubles */\n#define CARRAY_TEXT      3    /* Data is char* */\n#define CARRAY_BLOB      4    /* Data is struct iovec */\n\n/*\n** Undo the hack that converts floating point types to integer for\n** builds on processors without floating point support.\n*/\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# undef double\n#endif\n\n#if defined(__wasi__)\n# undef SQLITE_WASI\n# define SQLITE_WASI 1\n# ifndef SQLITE_OMIT_LOAD_EXTENSION\n#  define SQLITE_OMIT_LOAD_EXTENSION\n# endif\n# ifndef SQLITE_THREADSAFE\n#  define SQLITE_THREADSAFE 0\n# endif\n#endif\n\n#if 0\n}  /* End of the 'extern \"C\"' block */\n#endif\n/* #endif for SQLITE3_H will be added by mksqlite3.tcl */\n\n/******** Begin file sqlite3rtree.h *********/\n/*\n** 2010 August 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n*/\n\n#ifndef _SQLITE3RTREE_H_\n#define _SQLITE3RTREE_H_\n\n\n#if 0\nextern \"C\" {\n#endif\n\ntypedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;\ntypedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;\n\n/* The double-precision datatype used by RTree depends on the\n** SQLITE_RTREE_INT_ONLY compile-time option.\n*/\n#ifdef SQLITE_RTREE_INT_ONLY\n  typedef sqlite3_int64 sqlite3_rtree_dbl;\n#else\n  typedef double sqlite3_rtree_dbl;\n#endif\n\n/*\n** Register a geometry callback named zGeom that can be used as part of an\n** R-Tree geometry query as follows:\n**\n**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)\n*/\nSQLITE_API int sqlite3_rtree_geometry_callback(\n  sqlite3 *db,\n  const char *zGeom,\n  int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),\n  void *pContext\n);\n\n\n/*\n** A pointer to a structure of the following type is passed as the first\n** argument to callbacks registered using rtree_geometry_callback().\n*/\nstruct sqlite3_rtree_geometry {\n  void *pContext;                 /* Copy of pContext passed to s_r_g_c() */\n  int nParam;                     /* Size of array aParam[] */\n  sqlite3_rtree_dbl *aParam;      /* Parameters passed to SQL geom function */\n  void *pUser;                    /* Callback implementation user data */\n  void (*xDelUser)(void *);       /* Called by SQLite to clean up pUser */\n};\n\n/*\n** Register a 2nd-generation geometry callback named zScore that can be\n** used as part of an R-Tree geometry query as follows:\n**\n**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)\n*/\nSQLITE_API int sqlite3_rtree_query_callback(\n  sqlite3 *db,\n  const char *zQueryFunc,\n  int (*xQueryFunc)(sqlite3_rtree_query_info*),\n  void *pContext,\n  void (*xDestructor)(void*)\n);\n\n\n/*\n** A pointer to a structure of the following type is passed as the\n** argument to scored geometry callback registered using\n** sqlite3_rtree_query_callback().\n**\n** Note that the first 5 fields of this structure are identical to\n** sqlite3_rtree_geometry.  This structure is a subclass of\n** sqlite3_rtree_geometry.\n*/\nstruct sqlite3_rtree_query_info {\n  void *pContext;                   /* pContext from when function registered */\n  int nParam;                       /* Number of function parameters */\n  sqlite3_rtree_dbl *aParam;        /* value of function parameters */\n  void *pUser;                      /* callback can use this, if desired */\n  void (*xDelUser)(void*);          /* function to free pUser */\n  sqlite3_rtree_dbl *aCoord;        /* Coordinates of node or entry to check */\n  unsigned int *anQueue;            /* Number of pending entries in the queue */\n  int nCoord;                       /* Number of coordinates */\n  int iLevel;                       /* Level of current node or entry */\n  int mxLevel;                      /* The largest iLevel value in the tree */\n  sqlite3_int64 iRowid;             /* Rowid for current entry */\n  sqlite3_rtree_dbl rParentScore;   /* Score of parent node */\n  int eParentWithin;                /* Visibility of parent node */\n  int eWithin;                      /* OUT: Visibility */\n  sqlite3_rtree_dbl rScore;         /* OUT: Write the score here */\n  /* The following fields are only available in 3.8.11 and later */\n  sqlite3_value **apSqlParam;       /* Original SQL values of parameters */\n};\n\n/*\n** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.\n*/\n#define NOT_WITHIN       0   /* Object completely outside of query region */\n#define PARTLY_WITHIN    1   /* Object partially overlaps query region */\n#define FULLY_WITHIN     2   /* Object fully contained within query region */\n\n\n#if 0\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif  /* ifndef _SQLITE3RTREE_H_ */\n\n/******** End of sqlite3rtree.h *********/\n/******** Begin file sqlite3session.h *********/\n\n#if !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION)\n#define __SQLITESESSION_H_ 1\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#if 0\nextern \"C\" {\n#endif\n\n\n/*\n** CAPI3REF: Session Object Handle\n**\n** An instance of this object is a [session] that can be used to\n** record changes to a database.\n*/\ntypedef struct sqlite3_session sqlite3_session;\n\n/*\n** CAPI3REF: Changeset Iterator Handle\n**\n** An instance of this object acts as a cursor for iterating\n** over the elements of a [changeset] or [patchset].\n*/\ntypedef struct sqlite3_changeset_iter sqlite3_changeset_iter;\n\n/*\n** CAPI3REF: Create A New Session Object\n** CONSTRUCTOR: sqlite3_session\n**\n** Create a new session object attached to database handle db. If successful,\n** a pointer to the new object is written to *ppSession and SQLITE_OK is\n** returned. If an error occurs, *ppSession is set to NULL and an SQLite\n** error code (e.g. SQLITE_NOMEM) is returned.\n**\n** It is possible to create multiple session objects attached to a single\n** database handle.\n**\n** Session objects created using this function should be deleted using the\n** [sqlite3session_delete()] function before the database handle that they\n** are attached to is itself closed. If the database handle is closed before\n** the session object is deleted, then the results of calling any session\n** module function, including [sqlite3session_delete()] on the session object\n** are undefined.\n**\n** Because the session module uses the [sqlite3_preupdate_hook()] API, it\n** is not possible for an application to register a pre-update hook on a\n** database handle that has one or more session objects attached. Nor is\n** it possible to create a session object attached to a database handle for\n** which a pre-update hook is already defined. The results of attempting\n** either of these things are undefined.\n**\n** The session object will be used to create changesets for tables in\n** database zDb, where zDb is either \"main\", or \"temp\", or the name of an\n** attached database. It is not an error if database zDb is not attached\n** to the database when the session object is created.\n*/\nSQLITE_API int sqlite3session_create(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of db (e.g. \"main\") */\n  sqlite3_session **ppSession     /* OUT: New session object */\n);\n\n/*\n** CAPI3REF: Delete A Session Object\n** DESTRUCTOR: sqlite3_session\n**\n** Delete a session object previously allocated using\n** [sqlite3session_create()]. Once a session object has been deleted, the\n** results of attempting to use pSession with any other session module\n** function are undefined.\n**\n** Session objects must be deleted before the database handle to which they\n** are attached is closed. Refer to the documentation for\n** [sqlite3session_create()] for details.\n*/\nSQLITE_API void sqlite3session_delete(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Configure a Session Object\n** METHOD: sqlite3_session\n**\n** This method is used to configure a session object after it has been\n** created. At present the only valid values for the second parameter are\n** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].\n**\n*/\nSQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);\n\n/*\n** CAPI3REF: Options for sqlite3session_object_config\n**\n** The following values may passed as the the 2nd parameter to\n** sqlite3session_object_config().\n**\n** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd>\n**   This option is used to set, clear or query the flag that enables\n**   the [sqlite3session_changeset_size()] API. Because it imposes some\n**   computational overhead, this API is disabled by default. Argument\n**   pArg must point to a value of type (int). If the value is initially\n**   0, then the sqlite3session_changeset_size() API is disabled. If it\n**   is greater than 0, then the same API is enabled. Or, if the initial\n**   value is less than zero, no change is made. In all cases the (int)\n**   variable is set to 1 if the sqlite3session_changeset_size() API is\n**   enabled following the current call, or 0 otherwise.\n**\n**   It is an error (SQLITE_MISUSE) to attempt to modify this setting after\n**   the first table has been attached to the session object.\n**\n** <dt>SQLITE_SESSION_OBJCONFIG_ROWID <dd>\n**   This option is used to set, clear or query the flag that enables\n**   collection of data for tables with no explicit PRIMARY KEY.\n**\n**   Normally, tables with no explicit PRIMARY KEY are simply ignored\n**   by the sessions module. However, if this flag is set, it behaves\n**   as if such tables have a column \"_rowid_ INTEGER PRIMARY KEY\" inserted\n**   as their leftmost columns.\n**\n**   It is an error (SQLITE_MISUSE) to attempt to modify this setting after\n**   the first table has been attached to the session object.\n*/\n#define SQLITE_SESSION_OBJCONFIG_SIZE  1\n#define SQLITE_SESSION_OBJCONFIG_ROWID 2\n\n/*\n** CAPI3REF: Enable Or Disable A Session Object\n** METHOD: sqlite3_session\n**\n** Enable or disable the recording of changes by a session object. When\n** enabled, a session object records changes made to the database. When\n** disabled - it does not. A newly created session object is enabled.\n** Refer to the documentation for [sqlite3session_changeset()] for further\n** details regarding how enabling and disabling a session object affects\n** the eventual changesets.\n**\n** Passing zero to this function disables the session. Passing a value\n** greater than zero enables it. Passing a value less than zero is a\n** no-op, and may be used to query the current state of the session.\n**\n** The return value indicates the final state of the session object: 0 if\n** the session is disabled, or 1 if it is enabled.\n*/\nSQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);\n\n/*\n** CAPI3REF: Set Or Clear the Indirect Change Flag\n** METHOD: sqlite3_session\n**\n** Each change recorded by a session object is marked as either direct or\n** indirect. A change is marked as indirect if either:\n**\n** <ul>\n**   <li> The session object \"indirect\" flag is set when the change is\n**        made, or\n**   <li> The change is made by an SQL trigger or foreign key action\n**        instead of directly as a result of a users SQL statement.\n** </ul>\n**\n** If a single row is affected by more than one operation within a session,\n** then the change is considered indirect if all operations meet the criteria\n** for an indirect change above, or direct otherwise.\n**\n** This function is used to set, clear or query the session object indirect\n** flag.  If the second argument passed to this function is zero, then the\n** indirect flag is cleared. If it is greater than zero, the indirect flag\n** is set. Passing a value less than zero does not modify the current value\n** of the indirect flag, and may be used to query the current state of the\n** indirect flag for the specified session object.\n**\n** The return value indicates the final state of the indirect flag: 0 if\n** it is clear, or 1 if it is set.\n*/\nSQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);\n\n/*\n** CAPI3REF: Attach A Table To A Session Object\n** METHOD: sqlite3_session\n**\n** If argument zTab is not NULL, then it is the name of a table to attach\n** to the session object passed as the first argument. All subsequent changes\n** made to the table while the session object is enabled will be recorded. See\n** documentation for [sqlite3session_changeset()] for further details.\n**\n** Or, if argument zTab is NULL, then changes are recorded for all tables\n** in the database. If additional tables are added to the database (by\n** executing \"CREATE TABLE\" statements) after this call is made, changes for\n** the new tables are also recorded.\n**\n** Changes can only be recorded for tables that have a PRIMARY KEY explicitly\n** defined as part of their CREATE TABLE statement. It does not matter if the\n** PRIMARY KEY is an \"INTEGER PRIMARY KEY\" (rowid alias) or not. The PRIMARY\n** KEY may consist of a single column, or may be a composite key.\n**\n** It is not an error if the named table does not exist in the database. Nor\n** is it an error if the named table does not have a PRIMARY KEY. However,\n** no changes will be recorded in either of these scenarios.\n**\n** Changes are not recorded for individual rows that have NULL values stored\n** in one or more of their PRIMARY KEY columns.\n**\n** SQLITE_OK is returned if the call completes without error. Or, if an error\n** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.\n**\n** <h3>Special sqlite_stat1 Handling</h3>\n**\n** As of SQLite version 3.22.0, the \"sqlite_stat1\" table is an exception to\n** some of the rules above. In SQLite, the schema of sqlite_stat1 is:\n**  <pre>\n**  &nbsp;     CREATE TABLE sqlite_stat1(tbl,idx,stat)\n**  </pre>\n**\n** Even though sqlite_stat1 does not have a PRIMARY KEY, changes are\n** recorded for it as if the PRIMARY KEY is (tbl,idx). Additionally, changes\n** are recorded for rows for which (idx IS NULL) is true. However, for such\n** rows a zero-length blob (SQL value X'') is stored in the changeset or\n** patchset instead of a NULL value. This allows such changesets to be\n** manipulated by legacy implementations of sqlite3changeset_invert(),\n** concat() and similar.\n**\n** The sqlite3changeset_apply() function automatically converts the\n** zero-length blob back to a NULL value when updating the sqlite_stat1\n** table. However, if the application calls sqlite3changeset_new(),\n** sqlite3changeset_old() or sqlite3changeset_conflict on a changeset\n** iterator directly (including on a changeset iterator passed to a\n** conflict-handler callback) then the X'' value is returned. The application\n** must translate X'' to NULL itself if required.\n**\n** Legacy (older than 3.22.0) versions of the sessions module cannot capture\n** changes made to the sqlite_stat1 table. Legacy versions of the\n** sqlite3changeset_apply() function silently ignore any modifications to the\n** sqlite_stat1 table that are part of a changeset or patchset.\n*/\nSQLITE_API int sqlite3session_attach(\n  sqlite3_session *pSession,      /* Session object */\n  const char *zTab                /* Table name */\n);\n\n/*\n** CAPI3REF: Set a table filter on a Session Object.\n** METHOD: sqlite3_session\n**\n** The second argument (xFilter) is the \"filter callback\". For changes to rows\n** in tables that are not attached to the Session object, the filter is called\n** to determine whether changes to the table's rows should be tracked or not.\n** If xFilter returns 0, changes are not tracked. Note that once a table is\n** attached, xFilter will not be called again.\n*/\nSQLITE_API void sqlite3session_table_filter(\n  sqlite3_session *pSession,      /* Session object */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of third arg to _filter_table() */\n    const char *zTab              /* Table name */\n  ),\n  void *pCtx                      /* First argument passed to xFilter */\n);\n\n/*\n** CAPI3REF: Generate A Changeset From A Session Object\n** METHOD: sqlite3_session\n**\n** Obtain a changeset containing changes to the tables attached to the\n** session object passed as the first argument. If successful,\n** set *ppChangeset to point to a buffer containing the changeset\n** and *pnChangeset to the size of the changeset in bytes before returning\n** SQLITE_OK. If an error occurs, set both *ppChangeset and *pnChangeset to\n** zero and return an SQLite error code.\n**\n** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes,\n** each representing a change to a single row of an attached table. An INSERT\n** change contains the values of each field of a new database row. A DELETE\n** contains the original values of each field of a deleted database row. An\n** UPDATE change contains the original values of each field of an updated\n** database row along with the updated values for each updated non-primary-key\n** column. It is not possible for an UPDATE change to represent a change that\n** modifies the values of primary key columns. If such a change is made, it\n** is represented in a changeset as a DELETE followed by an INSERT.\n**\n** Changes are not recorded for rows that have NULL values stored in one or\n** more of their PRIMARY KEY columns. If such a row is inserted or deleted,\n** no corresponding change is present in the changesets returned by this\n** function. If an existing row with one or more NULL values stored in\n** PRIMARY KEY columns is updated so that all PRIMARY KEY columns are non-NULL,\n** only an INSERT is appears in the changeset. Similarly, if an existing row\n** with non-NULL PRIMARY KEY values is updated so that one or more of its\n** PRIMARY KEY columns are set to NULL, the resulting changeset contains a\n** DELETE change only.\n**\n** The contents of a changeset may be traversed using an iterator created\n** using the [sqlite3changeset_start()] API. A changeset may be applied to\n** a database with a compatible schema using the [sqlite3changeset_apply()]\n** API.\n**\n** Within a changeset generated by this function, all changes related to a\n** single table are grouped together. In other words, when iterating through\n** a changeset or when applying a changeset to a database, all changes related\n** to a single table are processed before moving on to the next table. Tables\n** are sorted in the same order in which they were attached (or auto-attached)\n** to the sqlite3_session object. The order in which the changes related to\n** a single table are stored is undefined.\n**\n** Following a successful call to this function, it is the responsibility of\n** the caller to eventually free the buffer that *ppChangeset points to using\n** [sqlite3_free()].\n**\n** <h3>Changeset Generation</h3>\n**\n** Once a table has been attached to a session object, the session object\n** records the primary key values of all new rows inserted into the table.\n** It also records the original primary key and other column values of any\n** deleted or updated rows. For each unique primary key value, data is only\n** recorded once - the first time a row with said primary key is inserted,\n** updated or deleted in the lifetime of the session.\n**\n** There is one exception to the previous paragraph: when a row is inserted,\n** updated or deleted, if one or more of its primary key columns contain a\n** NULL value, no record of the change is made.\n**\n** The session object therefore accumulates two types of records - those\n** that consist of primary key values only (created when the user inserts\n** a new record) and those that consist of the primary key values and the\n** original values of other table columns (created when the users deletes\n** or updates a record).\n**\n** When this function is called, the requested changeset is created using\n** both the accumulated records and the current contents of the database\n** file. Specifically:\n**\n** <ul>\n**   <li> For each record generated by an insert, the database is queried\n**        for a row with a matching primary key. If one is found, an INSERT\n**        change is added to the changeset. If no such row is found, no change\n**        is added to the changeset.\n**\n**   <li> For each record generated by an update or delete, the database is\n**        queried for a row with a matching primary key. If such a row is\n**        found and one or more of the non-primary key fields have been\n**        modified from their original values, an UPDATE change is added to\n**        the changeset. Or, if no such row is found in the table, a DELETE\n**        change is added to the changeset. If there is a row with a matching\n**        primary key in the database, but all fields contain their original\n**        values, no change is added to the changeset.\n** </ul>\n**\n** This means, amongst other things, that if a row is inserted and then later\n** deleted while a session object is active, neither the insert nor the delete\n** will be present in the changeset. Or if a row is deleted and then later a\n** row with the same primary key values inserted while a session object is\n** active, the resulting changeset will contain an UPDATE change instead of\n** a DELETE and an INSERT.\n**\n** When a session object is disabled (see the [sqlite3session_enable()] API),\n** it does not accumulate records when rows are inserted, updated or deleted.\n** This may appear to have some counter-intuitive effects if a single row\n** is written to more than once during a session. For example, if a row\n** is inserted while a session object is enabled, then later deleted while\n** the same session object is disabled, no INSERT record will appear in the\n** changeset, even though the delete took place while the session was disabled.\n** Or, if one field of a row is updated while a session is enabled, and\n** then another field of the same row is updated while the session is disabled,\n** the resulting changeset will contain an UPDATE change that updates both\n** fields.\n*/\nSQLITE_API int sqlite3session_changeset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnChangeset,               /* OUT: Size of buffer at *ppChangeset */\n  void **ppChangeset              /* OUT: Buffer containing changeset */\n);\n\n/*\n** CAPI3REF: Return An Upper-limit For The Size Of The Changeset\n** METHOD: sqlite3_session\n**\n** By default, this function always returns 0. For it to return\n** a useful result, the sqlite3_session object must have been configured\n** to enable this API using sqlite3session_object_config() with the\n** SQLITE_SESSION_OBJCONFIG_SIZE verb.\n**\n** When enabled, this function returns an upper limit, in bytes, for the size\n** of the changeset that might be produced if sqlite3session_changeset() were\n** called. The final changeset size might be equal to or smaller than the\n** size in bytes returned by this function.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Load The Difference Between Tables Into A Session\n** METHOD: sqlite3_session\n**\n** If it is not already attached to the session object passed as the first\n** argument, this function attaches table zTbl in the same manner as the\n** [sqlite3session_attach()] function. If zTbl does not exist, or if it\n** does not have a primary key, this function is a no-op (but does not return\n** an error).\n**\n** Argument zFromDb must be the name of a database (\"main\", \"temp\" etc.)\n** attached to the same database handle as the session object that contains\n** a table compatible with the table attached to the session by this function.\n** A table is considered compatible if it:\n**\n** <ul>\n**   <li> Has the same name,\n**   <li> Has the same set of columns declared in the same order, and\n**   <li> Has the same PRIMARY KEY definition.\n** </ul>\n**\n** If the tables are not compatible, SQLITE_SCHEMA is returned. If the tables\n** are compatible but do not have any PRIMARY KEY columns, it is not an error\n** but no changes are added to the session object. As with other session\n** APIs, tables without PRIMARY KEYs are simply ignored.\n**\n** This function adds a set of changes to the session object that could be\n** used to update the table in database zFrom (call this the \"from-table\")\n** so that its content is the same as the table attached to the session\n** object (call this the \"to-table\"). Specifically:\n**\n** <ul>\n**   <li> For each row (primary key) that exists in the to-table but not in\n**     the from-table, an INSERT record is added to the session object.\n**\n**   <li> For each row (primary key) that exists in the to-table but not in\n**     the from-table, a DELETE record is added to the session object.\n**\n**   <li> For each row (primary key) that exists in both tables, but features\n**     different non-PK values in each, an UPDATE record is added to the\n**     session.\n** </ul>\n**\n** To clarify, if this function is called and then a changeset constructed\n** using [sqlite3session_changeset()], then after applying that changeset to\n** database zFrom the contents of the two compatible tables would be\n** identical.\n**\n** Unless the call to this function is a no-op as described above, it is an\n** error if database zFrom does not exist or does not contain the required\n** compatible table.\n**\n** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite\n** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg\n** may be set to point to a buffer containing an English language error\n** message. It is the responsibility of the caller to free this buffer using\n** sqlite3_free().\n*/\nSQLITE_API int sqlite3session_diff(\n  sqlite3_session *pSession,\n  const char *zFromDb,\n  const char *zTbl,\n  char **pzErrMsg\n);\n\n\n/*\n** CAPI3REF: Generate A Patchset From A Session Object\n** METHOD: sqlite3_session\n**\n** The differences between a patchset and a changeset are that:\n**\n** <ul>\n**   <li> DELETE records consist of the primary key fields only. The\n**        original values of other fields are omitted.\n**   <li> The original values of any modified fields are omitted from\n**        UPDATE records.\n** </ul>\n**\n** A patchset blob may be used with up to date versions of all\n** sqlite3changeset_xxx API functions except for sqlite3changeset_invert(),\n** which returns SQLITE_CORRUPT if it is passed a patchset. Similarly,\n** attempting to use a patchset blob with old versions of the\n** sqlite3changeset_xxx APIs also provokes an SQLITE_CORRUPT error.\n**\n** Because the non-primary key \"old.*\" fields are omitted, no\n** SQLITE_CHANGESET_DATA conflicts can be detected or reported if a patchset\n** is passed to the sqlite3changeset_apply() API. Other conflict types work\n** in the same way as for changesets.\n**\n** Changes within a patchset are ordered in the same way as for changesets\n** generated by the sqlite3session_changeset() function (i.e. all changes for\n** a single table are grouped together, tables appear in the order in which\n** they were attached to the session object).\n*/\nSQLITE_API int sqlite3session_patchset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnPatchset,                /* OUT: Size of buffer at *ppPatchset */\n  void **ppPatchset               /* OUT: Buffer containing patchset */\n);\n\n/*\n** CAPI3REF: Test if a changeset has recorded any changes.\n**\n** Return non-zero if no changes to attached tables have been recorded by\n** the session object passed as the first argument. Otherwise, if one or\n** more changes have been recorded, return zero.\n**\n** Even if this function returns zero, it is possible that calling\n** [sqlite3session_changeset()] on the session handle may still return a\n** changeset that contains no changes. This can happen when a row in\n** an attached table is modified and then later on the original values\n** are restored. However, if this function returns non-zero, then it is\n** guaranteed that a call to sqlite3session_changeset() will return a\n** changeset containing zero changes.\n*/\nSQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Query for the amount of heap memory used by a session object.\n**\n** This API returns the total amount of heap memory in bytes currently\n** used by the session object passed as the only argument.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Create An Iterator To Traverse A Changeset\n** CONSTRUCTOR: sqlite3_changeset_iter\n**\n** Create an iterator used to iterate through the contents of a changeset.\n** If successful, *pp is set to point to the iterator handle and SQLITE_OK\n** is returned. Otherwise, if an error occurs, *pp is set to zero and an\n** SQLite error code is returned.\n**\n** The following functions can be used to advance and query a changeset\n** iterator created by this function:\n**\n** <ul>\n**   <li> [sqlite3changeset_next()]\n**   <li> [sqlite3changeset_op()]\n**   <li> [sqlite3changeset_new()]\n**   <li> [sqlite3changeset_old()]\n** </ul>\n**\n** It is the responsibility of the caller to eventually destroy the iterator\n** by passing it to [sqlite3changeset_finalize()]. The buffer containing the\n** changeset (pChangeset) must remain valid until after the iterator is\n** destroyed.\n**\n** Assuming the changeset blob was created by one of the\n** [sqlite3session_changeset()], [sqlite3changeset_concat()] or\n** [sqlite3changeset_invert()] functions, all changes within the changeset\n** that apply to a single table are grouped together. This means that when\n** an application iterates through a changeset using an iterator created by\n** this function, all changes that relate to a single table are visited\n** consecutively. There is no chance that the iterator will visit a change\n** the applies to table X, then one for table Y, and then later on visit\n** another change for table X.\n**\n** The behavior of sqlite3changeset_start_v2() and its streaming equivalent\n** may be modified by passing a combination of\n** [SQLITE_CHANGESETSTART_INVERT | supported flags] as the 4th parameter.\n**\n** Note that the sqlite3changeset_start_v2() API is still <b>experimental</b>\n** and therefore subject to change.\n*/\nSQLITE_API int sqlite3changeset_start(\n  sqlite3_changeset_iter **pp,    /* OUT: New changeset iterator handle */\n  int nChangeset,                 /* Size of changeset blob in bytes */\n  void *pChangeset                /* Pointer to blob containing changeset */\n);\nSQLITE_API int sqlite3changeset_start_v2(\n  sqlite3_changeset_iter **pp,    /* OUT: New changeset iterator handle */\n  int nChangeset,                 /* Size of changeset blob in bytes */\n  void *pChangeset,               /* Pointer to blob containing changeset */\n  int flags                       /* SESSION_CHANGESETSTART_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3changeset_start_v2\n**\n** The following flags may passed via the 4th parameter to\n** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:\n**\n** <dt>SQLITE_CHANGESETSTART_INVERT <dd>\n**   Invert the changeset while iterating through it. This is equivalent to\n**   inverting a changeset using sqlite3changeset_invert() before applying it.\n**   It is an error to specify this flag with a patchset.\n*/\n#define SQLITE_CHANGESETSTART_INVERT        0x0002\n\n\n/*\n** CAPI3REF: Advance A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function may only be used with iterators created by the function\n** [sqlite3changeset_start()]. If it is called on an iterator passed to\n** a conflict-handler callback by [sqlite3changeset_apply()], SQLITE_MISUSE\n** is returned and the call has no effect.\n**\n** Immediately after an iterator is created by sqlite3changeset_start(), it\n** does not point to any change in the changeset. Assuming the changeset\n** is not empty, the first call to this function advances the iterator to\n** point to the first change in the changeset. Each subsequent call advances\n** the iterator to point to the next change in the changeset (if any). If\n** no error occurs and the iterator points to a valid change after a call\n** to sqlite3changeset_next() has advanced it, SQLITE_ROW is returned.\n** Otherwise, if all changes in the changeset have already been visited,\n** SQLITE_DONE is returned.\n**\n** If an error occurs, an SQLite error code is returned. Possible error\n** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or\n** SQLITE_NOMEM.\n*/\nSQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);\n\n/*\n** CAPI3REF: Obtain The Current Operation From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this\n** is not the case, this function returns [SQLITE_MISUSE].\n**\n** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three\n** outputs are set through these pointers:\n**\n** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],\n** depending on the type of change that the iterator currently points to;\n**\n** *pnCol is set to the number of columns in the table affected by the change; and\n**\n** *pzTab is set to point to a nul-terminated utf-8 encoded string containing\n** the name of the table affected by the current change. The buffer remains\n** valid until either sqlite3changeset_next() is called on the iterator\n** or until the conflict-handler function returns.\n**\n** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change\n** is an indirect change, or false (0) otherwise. See the documentation for\n** [sqlite3session_indirect()] for a description of direct and indirect\n** changes.\n**\n** If no error occurs, SQLITE_OK is returned. If an error does occur, an\n** SQLite error code is returned. The values of the output variables may not\n** be trusted in this case.\n*/\nSQLITE_API int sqlite3changeset_op(\n  sqlite3_changeset_iter *pIter,  /* Iterator object */\n  const char **pzTab,             /* OUT: Pointer to table name */\n  int *pnCol,                     /* OUT: Number of columns in table */\n  int *pOp,                       /* OUT: SQLITE_INSERT, DELETE or UPDATE */\n  int *pbIndirect                 /* OUT: True for an 'indirect' change */\n);\n\n/*\n** CAPI3REF: Obtain The Primary Key Definition Of A Table\n** METHOD: sqlite3_changeset_iter\n**\n** For each modified table, a changeset includes the following:\n**\n** <ul>\n**   <li> The number of columns in the table, and\n**   <li> Which of those columns make up the tables PRIMARY KEY.\n** </ul>\n**\n** This function is used to find which columns comprise the PRIMARY KEY of\n** the table modified by the change that iterator pIter currently points to.\n** If successful, *pabPK is set to point to an array of nCol entries, where\n** nCol is the number of columns in the table. Elements of *pabPK are set to\n** 0x01 if the corresponding column is part of the tables primary key, or\n** 0x00 if it is not.\n**\n** If argument pnCol is not NULL, then *pnCol is set to the number of columns\n** in the table.\n**\n** If this function is called when the iterator does not point to a valid\n** entry, SQLITE_MISUSE is returned and the output variables zeroed. Otherwise,\n** SQLITE_OK is returned and the output variables populated as described\n** above.\n*/\nSQLITE_API int sqlite3changeset_pk(\n  sqlite3_changeset_iter *pIter,  /* Iterator object */\n  unsigned char **pabPK,          /* OUT: Array of boolean - true for PK cols */\n  int *pnCol                      /* OUT: Number of entries in output array */\n);\n\n/*\n** CAPI3REF: Obtain old.* Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.\n** Furthermore, it may only be called if the type of change that the iterator\n** currently points to is either [SQLITE_DELETE] or [SQLITE_UPDATE]. Otherwise,\n** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the vector of\n** original row values stored as part of the UPDATE or DELETE change and\n** returns SQLITE_OK. The name of the function comes from the fact that this\n** is similar to the \"old.*\" columns available to update or delete triggers.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_old(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: Old value (or NULL pointer) */\n);\n\n/*\n** CAPI3REF: Obtain new.* Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.\n** Furthermore, it may only be called if the type of change that the iterator\n** currently points to is either [SQLITE_UPDATE] or [SQLITE_INSERT]. Otherwise,\n** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the vector of\n** new row values stored as part of the UPDATE or INSERT change and\n** returns SQLITE_OK. If the change is an UPDATE and does not include\n** a new value for the requested column, *ppValue is set to NULL and\n** SQLITE_OK returned. The name of the function comes from the fact that\n** this is similar to the \"new.*\" columns available to update or delete\n** triggers.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_new(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: New value (or NULL pointer) */\n);\n\n/*\n** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function should only be used with iterator objects passed to a\n** conflict-handler callback by [sqlite3changeset_apply()] with either\n** [SQLITE_CHANGESET_DATA] or [SQLITE_CHANGESET_CONFLICT]. If this function\n** is called on any other iterator, [SQLITE_MISUSE] is returned and *ppValue\n** is set to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the\n** \"conflicting row\" associated with the current conflict-handler callback\n** and returns SQLITE_OK.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_conflict(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: Value from conflicting row */\n);\n\n/*\n** CAPI3REF: Determine The Number Of Foreign Key Constraint Violations\n** METHOD: sqlite3_changeset_iter\n**\n** This function may only be called with an iterator passed to an\n** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case\n** it sets the output variable to the total number of known foreign key\n** violations in the destination database and returns SQLITE_OK.\n**\n** In all other cases this function returns SQLITE_MISUSE.\n*/\nSQLITE_API int sqlite3changeset_fk_conflicts(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int *pnOut                      /* OUT: Number of FK violations */\n);\n\n\n/*\n** CAPI3REF: Finalize A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function is used to finalize an iterator allocated with\n** [sqlite3changeset_start()].\n**\n** This function should only be called on iterators created using the\n** [sqlite3changeset_start()] function. If an application calls this\n** function with an iterator passed to a conflict-handler by\n** [sqlite3changeset_apply()], [SQLITE_MISUSE] is immediately returned and the\n** call has no effect.\n**\n** If an error was encountered within a call to an sqlite3changeset_xxx()\n** function (for example an [SQLITE_CORRUPT] in [sqlite3changeset_next()] or an\n** [SQLITE_NOMEM] in [sqlite3changeset_new()]) then an error code corresponding\n** to that error is returned by this function. Otherwise, SQLITE_OK is\n** returned. This is to allow the following pattern (pseudo-code):\n**\n** <pre>\n**   sqlite3changeset_start();\n**   while( SQLITE_ROW==sqlite3changeset_next() ){\n**     // Do something with change.\n**   }\n**   rc = sqlite3changeset_finalize();\n**   if( rc!=SQLITE_OK ){\n**     // An error has occurred\n**   }\n** </pre>\n*/\nSQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);\n\n/*\n** CAPI3REF: Invert A Changeset\n**\n** This function is used to \"invert\" a changeset object. Applying an inverted\n** changeset to a database reverses the effects of applying the uninverted\n** changeset. Specifically:\n**\n** <ul>\n**   <li> Each DELETE change is changed to an INSERT, and\n**   <li> Each INSERT change is changed to a DELETE, and\n**   <li> For each UPDATE change, the old.* and new.* values are exchanged.\n** </ul>\n**\n** This function does not change the order in which changes appear within\n** the changeset. It merely reverses the sense of each individual change.\n**\n** If successful, a pointer to a buffer containing the inverted changeset\n** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and\n** SQLITE_OK is returned. If an error occurs, both *pnOut and *ppOut are\n** zeroed and an SQLite error code returned.\n**\n** It is the responsibility of the caller to eventually call sqlite3_free()\n** on the *ppOut pointer to free the buffer allocation following a successful\n** call to this function.\n**\n** WARNING/TODO: This function currently assumes that the input is a valid\n** changeset. If it is not, the results are undefined.\n*/\nSQLITE_API int sqlite3changeset_invert(\n  int nIn, const void *pIn,       /* Input changeset */\n  int *pnOut, void **ppOut        /* OUT: Inverse of input */\n);\n\n/*\n** CAPI3REF: Concatenate Two Changeset Objects\n**\n** This function is used to concatenate two changesets, A and B, into a\n** single changeset. The result is a changeset equivalent to applying\n** changeset A followed by changeset B.\n**\n** This function combines the two input changesets using an\n** sqlite3_changegroup object. Calling it produces similar results as the\n** following code fragment:\n**\n** <pre>\n**   sqlite3_changegroup *pGrp;\n**   rc = sqlite3_changegroup_new(&pGrp);\n**   if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nA, pA);\n**   if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nB, pB);\n**   if( rc==SQLITE_OK ){\n**     rc = sqlite3changegroup_output(pGrp, pnOut, ppOut);\n**   }else{\n**     *ppOut = 0;\n**     *pnOut = 0;\n**   }\n** </pre>\n**\n** Refer to the sqlite3_changegroup documentation below for details.\n*/\nSQLITE_API int sqlite3changeset_concat(\n  int nA,                         /* Number of bytes in buffer pA */\n  void *pA,                       /* Pointer to buffer containing changeset A */\n  int nB,                         /* Number of bytes in buffer pB */\n  void *pB,                       /* Pointer to buffer containing changeset B */\n  int *pnOut,                     /* OUT: Number of bytes in output changeset */\n  void **ppOut                    /* OUT: Buffer containing output changeset */\n);\n\n/*\n** CAPI3REF: Changegroup Handle\n**\n** A changegroup is an object used to combine two or more\n** [changesets] or [patchsets]\n*/\ntypedef struct sqlite3_changegroup sqlite3_changegroup;\n\n/*\n** CAPI3REF: Create A New Changegroup Object\n** CONSTRUCTOR: sqlite3_changegroup\n**\n** An sqlite3_changegroup object is used to combine two or more changesets\n** (or patchsets) into a single changeset (or patchset). A single changegroup\n** object may combine changesets or patchsets, but not both. The output is\n** always in the same format as the input.\n**\n** If successful, this function returns SQLITE_OK and populates (*pp) with\n** a pointer to a new sqlite3_changegroup object before returning. The caller\n** should eventually free the returned object using a call to\n** sqlite3changegroup_delete(). If an error occurs, an SQLite error code\n** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL.\n**\n** The usual usage pattern for an sqlite3_changegroup object is as follows:\n**\n** <ul>\n**   <li> It is created using a call to sqlite3changegroup_new().\n**\n**   <li> Zero or more changesets (or patchsets) are added to the object\n**        by calling sqlite3changegroup_add().\n**\n**   <li> The result of combining all input changesets together is obtained\n**        by the application via a call to sqlite3changegroup_output().\n**\n**   <li> The object is deleted using a call to sqlite3changegroup_delete().\n** </ul>\n**\n** Any number of calls to add() and output() may be made between the calls to\n** new() and delete(), and in any order.\n**\n** As well as the regular sqlite3changegroup_add() and\n** sqlite3changegroup_output() functions, also available are the streaming\n** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm().\n*/\nSQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);\n\n/*\n** CAPI3REF: Add a Schema to a Changegroup\n** METHOD: sqlite3_changegroup_schema\n**\n** This method may be used to optionally enforce the rule that the changesets\n** added to the changegroup handle must match the schema of database zDb\n** (\"main\", \"temp\", or the name of an attached database). If\n** sqlite3changegroup_add() is called to add a changeset that is not compatible\n** with the configured schema, SQLITE_SCHEMA is returned and the changegroup\n** object is left in an undefined state.\n**\n** A changeset schema is considered compatible with the database schema in\n** the same way as for sqlite3changeset_apply(). Specifically, for each\n** table in the changeset, there exists a database table with:\n**\n** <ul>\n**   <li> The name identified by the changeset, and\n**   <li> at least as many columns as recorded in the changeset, and\n**   <li> the primary key columns in the same position as recorded in\n**        the changeset.\n** </ul>\n**\n** The output of the changegroup object always has the same schema as the\n** database nominated using this function. In cases where changesets passed\n** to sqlite3changegroup_add() have fewer columns than the corresponding table\n** in the database schema, these are filled in using the default column\n** values from the database schema. This makes it possible to combined\n** changesets that have different numbers of columns for a single table\n** within a changegroup, provided that they are otherwise compatible.\n*/\nSQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);\n\n/*\n** CAPI3REF: Add A Changeset To A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** Add all changes within the changeset (or patchset) in buffer pData (size\n** nData bytes) to the changegroup.\n**\n** If the buffer contains a patchset, then all prior calls to this function\n** on the same changegroup object must also have specified patchsets. Or, if\n** the buffer contains a changeset, so must have the earlier calls to this\n** function. Otherwise, SQLITE_ERROR is returned and no changes are added\n** to the changegroup.\n**\n** Rows within the changeset and changegroup are identified by the values in\n** their PRIMARY KEY columns. A change in the changeset is considered to\n** apply to the same row as a change already present in the changegroup if\n** the two rows have the same primary key.\n**\n** Changes to rows that do not already appear in the changegroup are\n** simply copied into it. Or, if both the new changeset and the changegroup\n** contain changes that apply to a single row, the final contents of the\n** changegroup depends on the type of each change, as follows:\n**\n** <table border=1 style=\"margin-left:8ex;margin-right:8ex\">\n**   <tr><th style=\"white-space:pre\">Existing Change  </th>\n**       <th style=\"white-space:pre\">New Change       </th>\n**       <th>Output Change\n**   <tr><td>INSERT <td>INSERT <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>INSERT <td>UPDATE <td>\n**       The INSERT change remains in the changegroup. The values in the\n**       INSERT change are modified as if the row was inserted by the\n**       existing change and then updated according to the new change.\n**   <tr><td>INSERT <td>DELETE <td>\n**       The existing INSERT is removed from the changegroup. The DELETE is\n**       not added.\n**   <tr><td>UPDATE <td>INSERT <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>UPDATE <td>UPDATE <td>\n**       The existing UPDATE remains within the changegroup. It is amended\n**       so that the accompanying values are as if the row was updated once\n**       by the existing change and then again by the new change.\n**   <tr><td>UPDATE <td>DELETE <td>\n**       The existing UPDATE is replaced by the new DELETE within the\n**       changegroup.\n**   <tr><td>DELETE <td>INSERT <td>\n**       If one or more of the column values in the row inserted by the\n**       new change differ from those in the row deleted by the existing\n**       change, the existing DELETE is replaced by an UPDATE within the\n**       changegroup. Otherwise, if the inserted row is exactly the same\n**       as the deleted row, the existing DELETE is simply discarded.\n**   <tr><td>DELETE <td>UPDATE <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>DELETE <td>DELETE <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n** </table>\n**\n** If the new changeset contains changes to a table that is already present\n** in the changegroup, then the number of columns and the position of the\n** primary key columns for the table must be consistent. If this is not the\n** case, this function fails with SQLITE_SCHEMA. Except, if the changegroup\n** object has been configured with a database schema using the\n** sqlite3changegroup_schema() API, then it is possible to combine changesets\n** with different numbers of columns for a single table, provided that\n** they are otherwise compatible.\n**\n** If the input changeset appears to be corrupt and the corruption is\n** detected, SQLITE_CORRUPT is returned. Or, if an out-of-memory condition\n** occurs during processing, this function returns SQLITE_NOMEM.\n**\n** In all cases, if an error occurs the state of the final contents of the\n** changegroup is undefined. If no error occurs, SQLITE_OK is returned.\n*/\nSQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);\n\n/*\n** CAPI3REF: Add A Single Change To A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** This function adds the single change currently indicated by the iterator\n** passed as the second argument to the changegroup object. The rules for\n** adding the change are just as described for [sqlite3changegroup_add()].\n**\n** If the change is successfully added to the changegroup, SQLITE_OK is\n** returned. Otherwise, an SQLite error code is returned.\n**\n** The iterator must point to a valid entry when this function is called.\n** If it does not, SQLITE_ERROR is returned and no change is added to the\n** changegroup. Additionally, the iterator must not have been opened with\n** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also\n** returned.\n*/\nSQLITE_API int sqlite3changegroup_add_change(\n  sqlite3_changegroup*,\n  sqlite3_changeset_iter*\n);\n\n\n\n/*\n** CAPI3REF: Obtain A Composite Changeset From A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** Obtain a buffer containing a changeset (or patchset) representing the\n** current contents of the changegroup. If the inputs to the changegroup\n** were themselves changesets, the output is a changeset. Or, if the\n** inputs were patchsets, the output is also a patchset.\n**\n** As with the output of the sqlite3session_changeset() and\n** sqlite3session_patchset() functions, all changes related to a single\n** table are grouped together in the output of this function. Tables appear\n** in the same order as for the very first changeset added to the changegroup.\n** If the second or subsequent changesets added to the changegroup contain\n** changes for tables that do not appear in the first changeset, they are\n** appended onto the end of the output changeset, again in the order in\n** which they are first encountered.\n**\n** If an error occurs, an SQLite error code is returned and the output\n** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK\n** is returned and the output variables are set to the size of and a\n** pointer to the output buffer, respectively. In this case it is the\n** responsibility of the caller to eventually free the buffer using a\n** call to sqlite3_free().\n*/\nSQLITE_API int sqlite3changegroup_output(\n  sqlite3_changegroup*,\n  int *pnData,                    /* OUT: Size of output buffer in bytes */\n  void **ppData                   /* OUT: Pointer to output buffer */\n);\n\n/*\n** CAPI3REF: Delete A Changegroup Object\n** DESTRUCTOR: sqlite3_changegroup\n*/\nSQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);\n\n/*\n** CAPI3REF: Apply A Changeset To A Database\n**\n** Apply a changeset or patchset to a database. These functions attempt to\n** update the \"main\" database attached to handle db with the changes found in\n** the changeset passed via the second and third arguments.\n**\n** All changes made by these functions are enclosed in a savepoint transaction.\n** If any other error (aside from a constraint failure when attempting to\n** write to the target database) occurs, then the savepoint transaction is\n** rolled back, restoring the target database to its original state, and an\n** SQLite error code returned. Additionally, starting with version 3.51.0,\n** an error code and error message that may be accessed using the\n** [sqlite3_errcode()] and [sqlite3_errmsg()] APIs are left in the database\n** handle.\n**\n** The fourth argument (xFilter) passed to these functions is the \"filter\n** callback\". This may be passed NULL, in which case all changes in the\n** changeset are applied to the database. For sqlite3changeset_apply() and\n** sqlite3_changeset_apply_v2(), if it is not NULL, then it is invoked once\n** for each table affected by at least one change in the changeset. In this\n** case the table name is passed as the second argument, and a copy of\n** the context pointer passed as the sixth argument to apply() or apply_v2()\n** as the first. If the \"filter callback\" returns zero, then no attempt is\n** made to apply any changes to the table. Otherwise, if the return value is\n** non-zero, all changes related to the table are attempted.\n**\n** For sqlite3_changeset_apply_v3(), the xFilter callback is invoked once\n** per change. The second argument in this case is an sqlite3_changeset_iter\n** that may be queried using the usual APIs for the details of the current\n** change. If the \"filter callback\" returns zero in this case, then no attempt\n** is made to apply the current change. If it returns non-zero, the change\n** is applied.\n**\n** For each table that is not excluded by the filter callback, this function\n** tests that the target database contains a compatible table. A table is\n** considered compatible if all of the following are true:\n**\n** <ul>\n**   <li> The table has the same name as the name recorded in the\n**        changeset, and\n**   <li> The table has at least as many columns as recorded in the\n**        changeset, and\n**   <li> The table has primary key columns in the same position as\n**        recorded in the changeset.\n** </ul>\n**\n** If there is no compatible table, it is not an error, but none of the\n** changes associated with the table are applied. A warning message is issued\n** via the sqlite3_log() mechanism with the error code SQLITE_SCHEMA. At most\n** one such warning is issued for each table in the changeset.\n**\n** For each change for which there is a compatible table, an attempt is made\n** to modify the table contents according to each UPDATE, INSERT or DELETE\n** change that is not excluded by a filter callback. If a change cannot be\n** applied cleanly, the conflict handler function passed as the fifth argument\n** to sqlite3changeset_apply() may be invoked. A description of exactly when\n** the conflict handler is invoked for each type of change is below.\n**\n** Unlike the xFilter argument, xConflict may not be passed NULL. The results\n** of passing anything other than a valid function pointer as the xConflict\n** argument are undefined.\n**\n** Each time the conflict handler function is invoked, it must return one\n** of [SQLITE_CHANGESET_OMIT], [SQLITE_CHANGESET_ABORT] or\n** [SQLITE_CHANGESET_REPLACE]. SQLITE_CHANGESET_REPLACE may only be returned\n** if the second argument passed to the conflict handler is either\n** SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If the conflict-handler\n** returns an illegal value, any changes already made are rolled back and\n** the call to sqlite3changeset_apply() returns SQLITE_MISUSE. Different\n** actions are taken by sqlite3changeset_apply() depending on the value\n** returned by each invocation of the conflict-handler function. Refer to\n** the documentation for the three\n** [SQLITE_CHANGESET_OMIT|available return values] for details.\n**\n** <dl>\n** <dt>DELETE Changes<dd>\n**   For each DELETE change, the function checks if the target database\n**   contains a row with the same primary key value (or values) as the\n**   original row values stored in the changeset. If it does, and the values\n**   stored in all non-primary key columns also match the values stored in\n**   the changeset the row is deleted from the target database.\n**\n**   If a row with matching primary key values is found, but one or more of\n**   the non-primary key fields contains a value different from the original\n**   row value stored in the changeset, the conflict-handler function is\n**   invoked with [SQLITE_CHANGESET_DATA] as the second argument. If the\n**   database table has more columns than are recorded in the changeset,\n**   only the values of those non-primary key fields are compared against\n**   the current database contents - any trailing database table columns\n**   are ignored.\n**\n**   If no row with matching primary key values is found in the database,\n**   the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]\n**   passed as the second argument.\n**\n**   If the DELETE operation is attempted, but SQLite returns SQLITE_CONSTRAINT\n**   (which can only happen if a foreign key constraint is violated), the\n**   conflict-handler function is invoked with [SQLITE_CHANGESET_CONSTRAINT]\n**   passed as the second argument. This includes the case where the DELETE\n**   operation is attempted because an earlier call to the conflict handler\n**   function returned [SQLITE_CHANGESET_REPLACE].\n**\n** <dt>INSERT Changes<dd>\n**   For each INSERT change, an attempt is made to insert the new row into\n**   the database. If the changeset row contains fewer fields than the\n**   database table, the trailing fields are populated with their default\n**   values.\n**\n**   If the attempt to insert the row fails because the database already\n**   contains a row with the same primary key values, the conflict handler\n**   function is invoked with the second argument set to\n**   [SQLITE_CHANGESET_CONFLICT].\n**\n**   If the attempt to insert the row fails because of some other constraint\n**   violation (e.g. NOT NULL or UNIQUE), the conflict handler function is\n**   invoked with the second argument set to [SQLITE_CHANGESET_CONSTRAINT].\n**   This includes the case where the INSERT operation is re-attempted because\n**   an earlier call to the conflict handler function returned\n**   [SQLITE_CHANGESET_REPLACE].\n**\n** <dt>UPDATE Changes<dd>\n**   For each UPDATE change, the function checks if the target database\n**   contains a row with the same primary key value (or values) as the\n**   original row values stored in the changeset. If it does, and the values\n**   stored in all modified non-primary key columns also match the values\n**   stored in the changeset the row is updated within the target database.\n**\n**   If a row with matching primary key values is found, but one or more of\n**   the modified non-primary key fields contains a value different from an\n**   original row value stored in the changeset, the conflict-handler function\n**   is invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since\n**   UPDATE changes only contain values for non-primary key fields that are\n**   to be modified, only those fields need to match the original values to\n**   avoid the SQLITE_CHANGESET_DATA conflict-handler callback.\n**\n**   If no row with matching primary key values is found in the database,\n**   the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]\n**   passed as the second argument.\n**\n**   If the UPDATE operation is attempted, but SQLite returns\n**   SQLITE_CONSTRAINT, the conflict-handler function is invoked with\n**   [SQLITE_CHANGESET_CONSTRAINT] passed as the second argument.\n**   This includes the case where the UPDATE operation is attempted after\n**   an earlier call to the conflict handler function returned\n**   [SQLITE_CHANGESET_REPLACE].\n** </dl>\n**\n** It is safe to execute SQL statements, including those that write to the\n** table that the callback related to, from within the xConflict callback.\n** This can be used to further customize the application's conflict\n** resolution strategy.\n**\n** If the output parameters (ppRebase) and (pnRebase) are non-NULL and\n** the input is a changeset (not a patchset), then sqlite3changeset_apply_v2()\n** may set (*ppRebase) to point to a \"rebase\" that may be used with the\n** sqlite3_rebaser APIs buffer before returning. In this case (*pnRebase)\n** is set to the size of the buffer in bytes. It is the responsibility of the\n** caller to eventually free any such buffer using sqlite3_free(). The buffer\n** is only allocated and populated if one or more conflicts were encountered\n** while applying the patchset. See comments surrounding the sqlite3_rebaser\n** APIs for further details.\n**\n** The behavior of sqlite3changeset_apply_v2() and its streaming equivalent\n** may be modified by passing a combination of\n** [SQLITE_CHANGESETAPPLY_NOSAVEPOINT | supported flags] as the 9th parameter.\n**\n** Note that the sqlite3changeset_apply_v2() API is still <b>experimental</b>\n** and therefore subject to change.\n*/\nSQLITE_API int sqlite3changeset_apply(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n);\nSQLITE_API int sqlite3changeset_apply_v2(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase, /* OUT: Rebase data */\n  int flags                       /* SESSION_CHANGESETAPPLY_* flags */\n);\nSQLITE_API int sqlite3changeset_apply_v3(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p     /* Handle describing change */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase, /* OUT: Rebase data */\n  int flags                       /* SESSION_CHANGESETAPPLY_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3changeset_apply_v2\n**\n** The following flags may passed via the 9th parameter to\n** [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]:\n**\n** <dl>\n** <dt>SQLITE_CHANGESETAPPLY_NOSAVEPOINT <dd>\n**   Usually, the sessions module encloses all operations performed by\n**   a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The\n**   SAVEPOINT is committed if the changeset or patchset is successfully\n**   applied, or rolled back if an error occurs. Specifying this flag\n**   causes the sessions module to omit this savepoint. In this case, if the\n**   caller has an open transaction or savepoint when apply_v2() is called,\n**   it may revert the partially applied changeset by rolling it back.\n**\n** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>\n**   Invert the changeset before applying it. This is equivalent to inverting\n**   a changeset using sqlite3changeset_invert() before applying it. It is\n**   an error to specify this flag with a patchset.\n**\n** <dt>SQLITE_CHANGESETAPPLY_IGNORENOOP <dd>\n**   Do not invoke the conflict handler callback for any changes that\n**   would not actually modify the database even if they were applied.\n**   Specifically, this means that the conflict handler is not invoked\n**   for:\n**    <ul>\n**    <li>a delete change if the row being deleted cannot be found,\n**    <li>an update change if the modified fields are already set to\n**        their new values in the conflicting row, or\n**    <li>an insert change if all fields of the conflicting row match\n**        the row being inserted.\n**    </ul>\n**\n** <dt>SQLITE_CHANGESETAPPLY_FKNOACTION <dd>\n**   If this flag it set, then all foreign key constraints in the target\n**   database behave as if they were declared with \"ON UPDATE NO ACTION ON\n**   DELETE NO ACTION\", even if they are actually CASCADE, RESTRICT, SET NULL\n**   or SET DEFAULT.\n*/\n#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT   0x0001\n#define SQLITE_CHANGESETAPPLY_INVERT        0x0002\n#define SQLITE_CHANGESETAPPLY_IGNORENOOP    0x0004\n#define SQLITE_CHANGESETAPPLY_FKNOACTION    0x0008\n\n/*\n** CAPI3REF: Constants Passed To The Conflict Handler\n**\n** Values that may be passed as the second argument to a conflict-handler.\n**\n** <dl>\n** <dt>SQLITE_CHANGESET_DATA<dd>\n**   The conflict handler is invoked with CHANGESET_DATA as the second argument\n**   when processing a DELETE or UPDATE change if a row with the required\n**   PRIMARY KEY fields is present in the database, but one or more other\n**   (non primary-key) fields modified by the update do not contain the\n**   expected \"before\" values.\n**\n**   The conflicting row, in this case, is the database row with the matching\n**   primary key.\n**\n** <dt>SQLITE_CHANGESET_NOTFOUND<dd>\n**   The conflict handler is invoked with CHANGESET_NOTFOUND as the second\n**   argument when processing a DELETE or UPDATE change if a row with the\n**   required PRIMARY KEY fields is not present in the database.\n**\n**   There is no conflicting row in this case. The results of invoking the\n**   sqlite3changeset_conflict() API are undefined.\n**\n** <dt>SQLITE_CHANGESET_CONFLICT<dd>\n**   CHANGESET_CONFLICT is passed as the second argument to the conflict\n**   handler while processing an INSERT change if the operation would result\n**   in duplicate primary key values.\n**\n**   The conflicting row in this case is the database row with the matching\n**   primary key.\n**\n** <dt>SQLITE_CHANGESET_FOREIGN_KEY<dd>\n**   If foreign key handling is enabled, and applying a changeset leaves the\n**   database in a state containing foreign key violations, the conflict\n**   handler is invoked with CHANGESET_FOREIGN_KEY as the second argument\n**   exactly once before the changeset is committed. If the conflict handler\n**   returns CHANGESET_OMIT, the changes, including those that caused the\n**   foreign key constraint violation, are committed. Or, if it returns\n**   CHANGESET_ABORT, the changeset is rolled back.\n**\n**   No current or conflicting row information is provided. The only function\n**   it is possible to call on the supplied sqlite3_changeset_iter handle\n**   is sqlite3changeset_fk_conflicts().\n**\n** <dt>SQLITE_CHANGESET_CONSTRAINT<dd>\n**   If any other constraint violation occurs while applying a change (i.e.\n**   a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is\n**   invoked with CHANGESET_CONSTRAINT as the second argument.\n**\n**   There is no conflicting row in this case. The results of invoking the\n**   sqlite3changeset_conflict() API are undefined.\n**\n** </dl>\n*/\n#define SQLITE_CHANGESET_DATA        1\n#define SQLITE_CHANGESET_NOTFOUND    2\n#define SQLITE_CHANGESET_CONFLICT    3\n#define SQLITE_CHANGESET_CONSTRAINT  4\n#define SQLITE_CHANGESET_FOREIGN_KEY 5\n\n/*\n** CAPI3REF: Constants Returned By The Conflict Handler\n**\n** A conflict handler callback must return one of the following three values.\n**\n** <dl>\n** <dt>SQLITE_CHANGESET_OMIT<dd>\n**   If a conflict handler returns this value no special action is taken. The\n**   change that caused the conflict is not applied. The session module\n**   continues to the next change in the changeset.\n**\n** <dt>SQLITE_CHANGESET_REPLACE<dd>\n**   This value may only be returned if the second argument to the conflict\n**   handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this\n**   is not the case, any changes applied so far are rolled back and the\n**   call to sqlite3changeset_apply() returns SQLITE_MISUSE.\n**\n**   If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict\n**   handler, then the conflicting row is either updated or deleted, depending\n**   on the type of change.\n**\n**   If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict\n**   handler, then the conflicting row is removed from the database and a\n**   second attempt to apply the change is made. If this second attempt fails,\n**   the original row is restored to the database before continuing.\n**\n** <dt>SQLITE_CHANGESET_ABORT<dd>\n**   If this value is returned, any changes applied so far are rolled back\n**   and the call to sqlite3changeset_apply() returns SQLITE_ABORT.\n** </dl>\n*/\n#define SQLITE_CHANGESET_OMIT       0\n#define SQLITE_CHANGESET_REPLACE    1\n#define SQLITE_CHANGESET_ABORT      2\n\n/*\n** CAPI3REF: Rebasing changesets\n** EXPERIMENTAL\n**\n** Suppose there is a site hosting a database in state S0. And that\n** modifications are made that move that database to state S1 and a\n** changeset recorded (the \"local\" changeset). Then, a changeset based\n** on S0 is received from another site (the \"remote\" changeset) and\n** applied to the database. The database is then in state\n** (S1+\"remote\"), where the exact state depends on any conflict\n** resolution decisions (OMIT or REPLACE) made while applying \"remote\".\n** Rebasing a changeset is to update it to take those conflict\n** resolution decisions into account, so that the same conflicts\n** do not have to be resolved elsewhere in the network.\n**\n** For example, if both the local and remote changesets contain an\n** INSERT of the same key on \"CREATE TABLE t1(a PRIMARY KEY, b)\":\n**\n**   local:  INSERT INTO t1 VALUES(1, 'v1');\n**   remote: INSERT INTO t1 VALUES(1, 'v2');\n**\n** and the conflict resolution is REPLACE, then the INSERT change is\n** removed from the local changeset (it was overridden). Or, if the\n** conflict resolution was \"OMIT\", then the local changeset is modified\n** to instead contain:\n**\n**           UPDATE t1 SET b = 'v2' WHERE a=1;\n**\n** Changes within the local changeset are rebased as follows:\n**\n** <dl>\n** <dt>Local INSERT<dd>\n**   This may only conflict with a remote INSERT. If the conflict\n**   resolution was OMIT, then add an UPDATE change to the rebased\n**   changeset. Or, if the conflict resolution was REPLACE, add\n**   nothing to the rebased changeset.\n**\n** <dt>Local DELETE<dd>\n**   This may conflict with a remote UPDATE or DELETE. In both cases the\n**   only possible resolution is OMIT. If the remote operation was a\n**   DELETE, then add no change to the rebased changeset. If the remote\n**   operation was an UPDATE, then the old.* fields of change are updated\n**   to reflect the new.* values in the UPDATE.\n**\n** <dt>Local UPDATE<dd>\n**   This may conflict with a remote UPDATE or DELETE. If it conflicts\n**   with a DELETE, and the conflict resolution was OMIT, then the update\n**   is changed into an INSERT. Any undefined values in the new.* record\n**   from the update change are filled in using the old.* values from\n**   the conflicting DELETE. Or, if the conflict resolution was REPLACE,\n**   the UPDATE change is simply omitted from the rebased changeset.\n**\n**   If conflict is with a remote UPDATE and the resolution is OMIT, then\n**   the old.* values are rebased using the new.* values in the remote\n**   change. Or, if the resolution is REPLACE, then the change is copied\n**   into the rebased changeset with updates to columns also updated by\n**   the conflicting remote UPDATE removed. If this means no columns would\n**   be updated, the change is omitted.\n** </dl>\n**\n** A local change may be rebased against multiple remote changes\n** simultaneously. If a single key is modified by multiple remote\n** changesets, they are combined as follows before the local changeset\n** is rebased:\n**\n** <ul>\n**    <li> If there has been one or more REPLACE resolutions on a\n**         key, it is rebased according to a REPLACE.\n**\n**    <li> If there have been no REPLACE resolutions on a key, then\n**         the local changeset is rebased according to the most recent\n**         of the OMIT resolutions.\n** </ul>\n**\n** Note that conflict resolutions from multiple remote changesets are\n** combined on a per-field basis, not per-row. This means that in the\n** case of multiple remote UPDATE operations, some fields of a single\n** local change may be rebased for REPLACE while others are rebased for\n** OMIT.\n**\n** In order to rebase a local changeset, the remote changeset must first\n** be applied to the local database using sqlite3changeset_apply_v2() and\n** the buffer of rebase information captured. Then:\n**\n** <ol>\n**   <li> An sqlite3_rebaser object is created by calling\n**        sqlite3rebaser_create().\n**   <li> The new object is configured with the rebase buffer obtained from\n**        sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure().\n**        If the local changeset is to be rebased against multiple remote\n**        changesets, then sqlite3rebaser_configure() should be called\n**        multiple times, in the same order that the multiple\n**        sqlite3changeset_apply_v2() calls were made.\n**   <li> Each local changeset is rebased by calling sqlite3rebaser_rebase().\n**   <li> The sqlite3_rebaser object is deleted by calling\n**        sqlite3rebaser_delete().\n** </ol>\n*/\ntypedef struct sqlite3_rebaser sqlite3_rebaser;\n\n/*\n** CAPI3REF: Create a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Allocate a new changeset rebaser object. If successful, set (*ppNew) to\n** point to the new object and return SQLITE_OK. Otherwise, if an error\n** occurs, return an SQLite error code (e.g. SQLITE_NOMEM) and set (*ppNew)\n** to NULL.\n*/\nSQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);\n\n/*\n** CAPI3REF: Configure a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Configure the changeset rebaser object to rebase changesets according\n** to the conflict resolutions described by buffer pRebase (size nRebase\n** bytes), which must have been obtained from a previous call to\n** sqlite3changeset_apply_v2().\n*/\nSQLITE_API int sqlite3rebaser_configure(\n  sqlite3_rebaser*,\n  int nRebase, const void *pRebase\n);\n\n/*\n** CAPI3REF: Rebase a changeset\n** EXPERIMENTAL\n**\n** Argument pIn must point to a buffer containing a changeset nIn bytes\n** in size. This function allocates and populates a buffer with a copy\n** of the changeset rebased according to the configuration of the\n** rebaser object passed as the first argument. If successful, (*ppOut)\n** is set to point to the new buffer containing the rebased changeset and\n** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the\n** responsibility of the caller to eventually free the new buffer using\n** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)\n** are set to zero and an SQLite error code returned.\n*/\nSQLITE_API int sqlite3rebaser_rebase(\n  sqlite3_rebaser*,\n  int nIn, const void *pIn,\n  int *pnOut, void **ppOut\n);\n\n/*\n** CAPI3REF: Delete a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Delete the changeset rebaser object and all associated resources. There\n** should be one call to this function for each successful invocation\n** of sqlite3rebaser_create().\n*/\nSQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);\n\n/*\n** CAPI3REF: Streaming Versions of API functions.\n**\n** The six streaming API xxx_strm() functions serve similar purposes to the\n** corresponding non-streaming API functions:\n**\n** <table border=1 style=\"margin-left:8ex;margin-right:8ex\">\n**   <tr><th>Streaming function<th>Non-streaming equivalent</th>\n**   <tr><td>sqlite3changeset_apply_strm<td>[sqlite3changeset_apply]\n**   <tr><td>sqlite3changeset_apply_strm_v2<td>[sqlite3changeset_apply_v2]\n**   <tr><td>sqlite3changeset_concat_strm<td>[sqlite3changeset_concat]\n**   <tr><td>sqlite3changeset_invert_strm<td>[sqlite3changeset_invert]\n**   <tr><td>sqlite3changeset_start_strm<td>[sqlite3changeset_start]\n**   <tr><td>sqlite3session_changeset_strm<td>[sqlite3session_changeset]\n**   <tr><td>sqlite3session_patchset_strm<td>[sqlite3session_patchset]\n** </table>\n**\n** Non-streaming functions that accept changesets (or patchsets) as input\n** require that the entire changeset be stored in a single buffer in memory.\n** Similarly, those that return a changeset or patchset do so by returning\n** a pointer to a single large buffer allocated using sqlite3_malloc().\n** Normally this is convenient. However, if an application running in a\n** low-memory environment is required to handle very large changesets, the\n** large contiguous memory allocations required can become onerous.\n**\n** In order to avoid this problem, instead of a single large buffer, input\n** is passed to a streaming API functions by way of a callback function that\n** the sessions module invokes to incrementally request input data as it is\n** required. In all cases, a pair of API function parameters such as\n**\n**  <pre>\n**  &nbsp;     int nChangeset,\n**  &nbsp;     void *pChangeset,\n**  </pre>\n**\n** Is replaced by:\n**\n**  <pre>\n**  &nbsp;     int (*xInput)(void *pIn, void *pData, int *pnData),\n**  &nbsp;     void *pIn,\n**  </pre>\n**\n** Each time the xInput callback is invoked by the sessions module, the first\n** argument passed is a copy of the supplied pIn context pointer. The second\n** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no\n** error occurs the xInput method should copy up to (*pnData) bytes of data\n** into the buffer and set (*pnData) to the actual number of bytes copied\n** before returning SQLITE_OK. If the input is completely exhausted, (*pnData)\n** should be set to zero to indicate this. Or, if an error occurs, an SQLite\n** error code should be returned. In all cases, if an xInput callback returns\n** an error, all processing is abandoned and the streaming API function\n** returns a copy of the error code to the caller.\n**\n** In the case of sqlite3changeset_start_strm(), the xInput callback may be\n** invoked by the sessions module at any point during the lifetime of the\n** iterator. If such an xInput callback returns an error, the iterator enters\n** an error state, whereby all subsequent calls to iterator functions\n** immediately fail with the same error code as returned by xInput.\n**\n** Similarly, streaming API functions that return changesets (or patchsets)\n** return them in chunks by way of a callback function instead of via a\n** pointer to a single large buffer. In this case, a pair of parameters such\n** as:\n**\n**  <pre>\n**  &nbsp;     int *pnChangeset,\n**  &nbsp;     void **ppChangeset,\n**  </pre>\n**\n** Is replaced by:\n**\n**  <pre>\n**  &nbsp;     int (*xOutput)(void *pOut, const void *pData, int nData),\n**  &nbsp;     void *pOut\n**  </pre>\n**\n** The xOutput callback is invoked zero or more times to return data to\n** the application. The first parameter passed to each call is a copy of the\n** pOut pointer supplied by the application. The second parameter, pData,\n** points to a buffer nData bytes in size containing the chunk of output\n** data being returned. If the xOutput callback successfully processes the\n** supplied data, it should return SQLITE_OK to indicate success. Otherwise,\n** it should return some other SQLite error code. In this case processing\n** is immediately abandoned and the streaming API function returns a copy\n** of the xOutput error code to the application.\n**\n** The sessions module never invokes an xOutput callback with the third\n** parameter set to a value less than or equal to zero. Other than this,\n** no guarantees are made as to the size of the chunks of data returned.\n*/\nSQLITE_API int sqlite3changeset_apply_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n);\nSQLITE_API int sqlite3changeset_apply_v2_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n);\nSQLITE_API int sqlite3changeset_apply_v3_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n);\nSQLITE_API int sqlite3changeset_concat_strm(\n  int (*xInputA)(void *pIn, void *pData, int *pnData),\n  void *pInA,\n  int (*xInputB)(void *pIn, void *pData, int *pnData),\n  void *pInB,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changeset_invert_strm(\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changeset_start_strm(\n  sqlite3_changeset_iter **pp,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn\n);\nSQLITE_API int sqlite3changeset_start_v2_strm(\n  sqlite3_changeset_iter **pp,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int flags\n);\nSQLITE_API int sqlite3session_changeset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3session_patchset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*,\n    int (*xInput)(void *pIn, void *pData, int *pnData),\n    void *pIn\n);\nSQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,\n    int (*xOutput)(void *pOut, const void *pData, int nData),\n    void *pOut\n);\nSQLITE_API int sqlite3rebaser_rebase_strm(\n  sqlite3_rebaser *pRebaser,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\n\n/*\n** CAPI3REF: Configure global parameters\n**\n** The sqlite3session_config() interface is used to make global configuration\n** changes to the sessions module in order to tune it to the specific needs\n** of the application.\n**\n** The sqlite3session_config() interface is not threadsafe. If it is invoked\n** while any other thread is inside any other sessions method then the\n** results are undefined. Furthermore, if it is invoked after any sessions\n** related objects have been created, the results are also undefined.\n**\n** The first argument to the sqlite3session_config() function must be one\n** of the SQLITE_SESSION_CONFIG_XXX constants defined below. The\n** interpretation of the (void*) value passed as the second parameter and\n** the effect of calling this function depends on the value of the first\n** parameter.\n**\n** <dl>\n** <dt>SQLITE_SESSION_CONFIG_STRMSIZE<dd>\n**    By default, the sessions module streaming interfaces attempt to input\n**    and output data in approximately 1 KiB chunks. This operand may be used\n**    to set and query the value of this configuration setting. The pointer\n**    passed as the second argument must point to a value of type (int).\n**    If this value is greater than 0, it is used as the new streaming data\n**    chunk size for both input and output. Before returning, the (int) value\n**    pointed to by pArg is set to the final value of the streaming interface\n**    chunk size.\n** </dl>\n**\n** This function returns SQLITE_OK if successful, or an SQLite error code\n** otherwise.\n*/\nSQLITE_API int sqlite3session_config(int op, void *pArg);\n\n/*\n** CAPI3REF: Values for sqlite3session_config().\n*/\n#define SQLITE_SESSION_CONFIG_STRMSIZE 1\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#if 0\n}\n#endif\n\n#endif  /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */\n\n/******** End of sqlite3session.h *********/\n/******** Begin file fts5.h *********/\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Interfaces to extend FTS5. Using the interfaces defined in this file,\n** FTS5 may be extended with:\n**\n**     * custom tokenizers, and\n**     * custom auxiliary functions.\n*/\n\n\n#ifndef _FTS5_H\n#define _FTS5_H\n\n\n#if 0\nextern \"C\" {\n#endif\n\n/*************************************************************************\n** CUSTOM AUXILIARY FUNCTIONS\n**\n** Virtual table implementations may overload SQL functions by implementing\n** the sqlite3_module.xFindFunction() method.\n*/\n\ntypedef struct Fts5ExtensionApi Fts5ExtensionApi;\ntypedef struct Fts5Context Fts5Context;\ntypedef struct Fts5PhraseIter Fts5PhraseIter;\n\ntypedef void (*fts5_extension_function)(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n);\n\nstruct Fts5PhraseIter {\n  const unsigned char *a;\n  const unsigned char *b;\n};\n\n/*\n** EXTENSION API FUNCTIONS\n**\n** xUserData(pFts):\n**   Return a copy of the pUserData pointer passed to the xCreateFunction()\n**   API when the extension function was registered.\n**\n** xColumnTotalSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the FTS5 table. Or, if iCol is\n**   non-negative but less than the number of columns in the table, return\n**   the total number of tokens in column iCol, considering all rows in\n**   the FTS5 table.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n** xColumnCount(pFts):\n**   Return the number of columns in the table.\n**\n** xColumnSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the current row. Or, if iCol is\n**   non-negative but less than the number of columns in the table, set\n**   *pnToken to the number of tokens in column iCol of the current row.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n**   This function may be quite inefficient if used with an FTS5 table\n**   created with the \"columnsize=0\" option.\n**\n** xColumnText:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the text of column iCol of\n**   the current document. If successful, (*pz) is set to point to a buffer\n**   containing the text in utf-8 encoding, (*pn) is set to the size in bytes\n**   (not characters) of the buffer and SQLITE_OK is returned. Otherwise,\n**   if an error occurs, an SQLite error code is returned and the final values\n**   of (*pz) and (*pn) are undefined.\n**\n** xPhraseCount:\n**   Returns the number of phrases in the current query expression.\n**\n** xPhraseSize:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of phrases in the current query, as returned by xPhraseCount,\n**   0 is returned. Otherwise, this function returns the number of tokens in\n**   phrase iPhrase of the query. Phrases are numbered starting from zero.\n**\n** xInstCount:\n**   Set *pnInst to the total number of occurrences of all phrases within\n**   the query within the current row. Return SQLITE_OK if successful, or\n**   an error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always returns 0.\n**\n** xInst:\n**   Query for the details of phrase match iIdx within the current row.\n**   Phrase matches are numbered starting from zero, so the iIdx argument\n**   should be greater than or equal to zero and smaller than the value\n**   output by xInstCount(). If iIdx is less than zero or greater than\n**   or equal to the value returned by xInstCount(), SQLITE_RANGE is returned.\n**\n**   Otherwise, output parameter *piPhrase is set to the phrase number, *piCol\n**   to the column in which it occurs and *piOff the token offset of the\n**   first token of the phrase. SQLITE_OK is returned if successful, or an\n**   error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xRowid:\n**   Returns the rowid of the current row.\n**\n** xTokenize:\n**   Tokenize text using the tokenizer belonging to the FTS5 table.\n**\n** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):\n**   This API function is used to query the FTS table for phrase iPhrase\n**   of the current query. Specifically, a query equivalent to:\n**\n**       ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid\n**\n**   with $p set to a phrase equivalent to the phrase iPhrase of the\n**   current query is executed. Any column filter that applies to\n**   phrase iPhrase of the current query is included in $p. For each\n**   row visited, the callback function passed as the fourth argument\n**   is invoked. The context and API objects passed to the callback\n**   function may be used to access the properties of each matched row.\n**   Invoking Api.xUserData() returns a copy of the pointer passed as\n**   the third argument to pUserData.\n**\n**   If parameter iPhrase is less than zero, or greater than or equal to\n**   the number of phrases in the query, as returned by xPhraseCount(),\n**   this function returns SQLITE_RANGE.\n**\n**   If the callback function returns any value other than SQLITE_OK, the\n**   query is abandoned and the xQueryPhrase function returns immediately.\n**   If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.\n**   Otherwise, the error code is propagated upwards.\n**\n**   If the query runs to completion without incident, SQLITE_OK is returned.\n**   Or, if some error occurs before the query completes or is aborted by\n**   the callback, an SQLite error code is returned.\n**\n**\n** xSetAuxdata(pFts5, pAux, xDelete)\n**\n**   Save the pointer passed as the second argument as the extension function's\n**   \"auxiliary data\". The pointer may then be retrieved by the current or any\n**   future invocation of the same fts5 extension function made as part of\n**   the same MATCH query using the xGetAuxdata() API.\n**\n**   Each extension function is allocated a single auxiliary data slot for\n**   each FTS query (MATCH expression). If the extension function is invoked\n**   more than once for a single FTS query, then all invocations share a\n**   single auxiliary data context.\n**\n**   If there is already an auxiliary data pointer when this function is\n**   invoked, then it is replaced by the new pointer. If an xDelete callback\n**   was specified along with the original pointer, it is invoked at this\n**   point.\n**\n**   The xDelete callback, if one is specified, is also invoked on the\n**   auxiliary data pointer after the FTS5 query has finished.\n**\n**   If an error (e.g. an OOM condition) occurs within this function,\n**   the auxiliary data is set to NULL and an error code returned. If the\n**   xDelete parameter was not NULL, it is invoked on the auxiliary data\n**   pointer before returning.\n**\n**\n** xGetAuxdata(pFts5, bClear)\n**\n**   Returns the current auxiliary data pointer for the fts5 extension\n**   function. See the xSetAuxdata() method for details.\n**\n**   If the bClear argument is non-zero, then the auxiliary data is cleared\n**   (set to NULL) before this function returns. In this case the xDelete,\n**   if any, is not invoked.\n**\n**\n** xRowCount(pFts5, pnRow)\n**\n**   This function is used to retrieve the total number of rows in the table.\n**   In other words, the same value that would be returned by:\n**\n**        SELECT count(*) FROM ftstable;\n**\n** xPhraseFirst()\n**   This function is used, along with type Fts5PhraseIter and the xPhraseNext\n**   method, to iterate through all instances of a single query phrase within\n**   the current row. This is the same information as is accessible via the\n**   xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient\n**   to use, this API may be faster under some circumstances. To iterate\n**   through instances of phrase iPhrase, use the following code:\n**\n**       Fts5PhraseIter iter;\n**       int iCol, iOff;\n**       for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);\n**           iCol>=0;\n**           pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)\n**       ){\n**         // An instance of phrase iPhrase at offset iOff of column iCol\n**       }\n**\n**   The Fts5PhraseIter structure is defined above. Applications should not\n**   modify this structure directly - it should only be used as shown above\n**   with the xPhraseFirst() and xPhraseNext() API methods (and by\n**   xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below).\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always iterates\n**   through an empty set (all calls to xPhraseFirst() set iCol to -1).\n**\n**   In all cases, matches are visited in (column ASC, offset ASC) order.\n**   i.e. all those in column 0, sorted by offset, followed by those in\n**   column 1, etc.\n**\n** xPhraseNext()\n**   See xPhraseFirst above.\n**\n** xPhraseFirstColumn()\n**   This function and xPhraseNextColumn() are similar to the xPhraseFirst()\n**   and xPhraseNext() APIs described above. The difference is that instead\n**   of iterating through all instances of a phrase in the current row, these\n**   APIs are used to iterate through the set of columns in the current row\n**   that contain one or more instances of a specified phrase. For example:\n**\n**       Fts5PhraseIter iter;\n**       int iCol;\n**       for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);\n**           iCol>=0;\n**           pApi->xPhraseNextColumn(pFts, &iter, &iCol)\n**       ){\n**         // Column iCol contains at least one instance of phrase iPhrase\n**       }\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" option. If the FTS5 table is created with either\n**   \"detail=none\" \"content=\" option (i.e. if it is a contentless table),\n**   then this API always iterates through an empty set (all calls to\n**   xPhraseFirstColumn() set iCol to -1).\n**\n**   The information accessed using this API and its companion\n**   xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext\n**   (or xInst/xInstCount). The chief advantage of this API is that it is\n**   significantly more efficient than those alternatives when used with\n**   \"detail=column\" tables.\n**\n** xPhraseNextColumn()\n**   See xPhraseFirstColumn above.\n**\n** xQueryToken(pFts5, iPhrase, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase iPhrase of the current\n**   query. Before returning, output parameter *ppToken is set to point\n**   to a buffer containing the requested token, and *pnToken to the\n**   size of this buffer in bytes.\n**\n**   If iPhrase or iToken are less than zero, or if iPhrase is greater than\n**   or equal to the number of phrases in the query as reported by\n**   xPhraseCount(), or if iToken is equal to or greater than the number of\n**   tokens in the phrase, SQLITE_RANGE is returned and *ppToken and *pnToken\n     are both zeroed.\n**\n**   The output text is not a copy of the query text that specified the\n**   token. It is the output of the tokenizer module. For tokendata=1\n**   tables, this includes any embedded 0x00 and trailing data.\n**\n** xInstToken(pFts5, iIdx, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase hit iIdx within the\n**   current row. If iIdx is less than zero or greater than or equal to the\n**   value returned by xInstCount(), SQLITE_RANGE is returned.  Otherwise,\n**   output variable (*ppToken) is set to point to a buffer containing the\n**   matching document token, and (*pnToken) to the size of that buffer in\n**   bytes.\n**\n**   The output text is not a copy of the document text that was tokenized.\n**   It is the output of the tokenizer module. For tokendata=1 tables, this\n**   includes any embedded 0x00 and trailing data.\n**\n**   This API may be slow in some cases if the token identified by parameters\n**   iIdx and iToken matched a prefix token in the query. In most cases, the\n**   first call to this API for each prefix token in the query is forced\n**   to scan the portion of the full-text index that matches the prefix\n**   token to collect the extra data required by this API. If the prefix\n**   token matches a large number of token instances in the document set,\n**   this may be a performance problem.\n**\n**   If the user knows in advance that a query may use this API for a\n**   prefix token, FTS5 may be configured to collect all required data as part\n**   of the initial querying of the full-text index, avoiding the second scan\n**   entirely. This also causes prefix queries that do not use this API to\n**   run more slowly and use more memory. FTS5 may be configured in this way\n**   either on a per-table basis using the [FTS5 insttoken | 'insttoken']\n**   option, or on a per-query basis using the\n**   [fts5_insttoken | fts5_insttoken()] user function.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xColumnLocale(pFts5, iIdx, pzLocale, pnLocale)\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the locale associated\n**   with column iCol of the current row. Usually, there is no associated\n**   locale, and output parameters (*pzLocale) and (*pnLocale) are set\n**   to NULL and 0, respectively. However, if the fts5_locale() function\n**   was used to associate a locale with the value when it was inserted\n**   into the fts5 table, then (*pzLocale) is set to point to a nul-terminated\n**   buffer containing the name of the locale in utf-8 encoding. (*pnLocale)\n**   is set to the size in bytes of the buffer, not including the\n**   nul-terminator.\n**\n**   If successful, SQLITE_OK is returned. Or, if an error occurs, an\n**   SQLite error code is returned. The final value of the output parameters\n**   is undefined in this case.\n**\n** xTokenize_v2:\n**   Tokenize text using the tokenizer belonging to the FTS5 table. This\n**   API is the same as the xTokenize() API, except that it allows a tokenizer\n**   locale to be specified.\n*/\nstruct Fts5ExtensionApi {\n  int iVersion;                   /* Currently always set to 4 */\n\n  void *(*xUserData)(Fts5Context*);\n\n  int (*xColumnCount)(Fts5Context*);\n  int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);\n  int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);\n\n  int (*xTokenize)(Fts5Context*,\n    const char *pText, int nText, /* Text to tokenize */\n    void *pCtx,                   /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n\n  int (*xPhraseCount)(Fts5Context*);\n  int (*xPhraseSize)(Fts5Context*, int iPhrase);\n\n  int (*xInstCount)(Fts5Context*, int *pnInst);\n  int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);\n\n  sqlite3_int64 (*xRowid)(Fts5Context*);\n  int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);\n\n  int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,\n    int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)\n  );\n  int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));\n  void *(*xGetAuxdata)(Fts5Context*, int bClear);\n\n  int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);\n  void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);\n\n  int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);\n  void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);\n\n  /* Below this point are iVersion>=3 only */\n  int (*xQueryToken)(Fts5Context*,\n      int iPhrase, int iToken,\n      const char **ppToken, int *pnToken\n  );\n  int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);\n\n  /* Below this point are iVersion>=4 only */\n  int (*xColumnLocale)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xTokenize_v2)(Fts5Context*,\n    const char *pText, int nText,      /* Text to tokenize */\n    const char *pLocale, int nLocale,  /* Locale to pass to tokenizer */\n    void *pCtx,                        /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n};\n\n/*\n** CUSTOM AUXILIARY FUNCTIONS\n*************************************************************************/\n\n/*************************************************************************\n** CUSTOM TOKENIZERS\n**\n** Applications may also register custom tokenizer types. A tokenizer\n** is registered by providing fts5 with a populated instance of the\n** following structure. All structure methods must be defined, setting\n** any member of the fts5_tokenizer struct to NULL leads to undefined\n** behaviour. The structure methods are expected to function as follows:\n**\n** xCreate:\n**   This function is used to allocate and initialize a tokenizer instance.\n**   A tokenizer instance is required to actually tokenize text.\n**\n**   The first argument passed to this function is a copy of the (void*)\n**   pointer provided by the application when the fts5_tokenizer_v2 object\n**   was registered with FTS5 (the third argument to xCreateTokenizer()).\n**   The second and third arguments are an array of nul-terminated strings\n**   containing the tokenizer arguments, if any, specified following the\n**   tokenizer name as part of the CREATE VIRTUAL TABLE statement used\n**   to create the FTS5 table.\n**\n**   The final argument is an output variable. If successful, (*ppOut)\n**   should be set to point to the new tokenizer handle and SQLITE_OK\n**   returned. If an error occurs, some value other than SQLITE_OK should\n**   be returned. In this case, fts5 assumes that the final value of *ppOut\n**   is undefined.\n**\n** xDelete:\n**   This function is invoked to delete a tokenizer handle previously\n**   allocated using xCreate(). Fts5 guarantees that this function will\n**   be invoked exactly once for each successful call to xCreate().\n**\n** xTokenize:\n**   This function is expected to tokenize the nText byte string indicated\n**   by argument pText. pText may or may not be nul-terminated. The first\n**   argument passed to this function is a pointer to an Fts5Tokenizer object\n**   returned by an earlier call to xCreate().\n**\n**   The third argument indicates the reason that FTS5 is requesting\n**   tokenization of the supplied text. This is always one of the following\n**   four values:\n**\n**   <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into\n**            or removed from the FTS table. The tokenizer is being invoked to\n**            determine the set of tokens to add to (or delete from) the\n**            FTS index.\n**\n**       <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed\n**            against the FTS index. The tokenizer is being called to tokenize\n**            a bareword or quoted string specified as part of the query.\n**\n**       <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as\n**            FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is\n**            followed by a \"*\" character, indicating that the last token\n**            returned by the tokenizer will be treated as a token prefix.\n**\n**       <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to\n**            satisfy an fts5_api.xTokenize() request made by an auxiliary\n**            function. Or an fts5_api.xColumnSize() request made by the same\n**            on a columnsize=0 database.\n**   </ul>\n**\n**   The sixth and seventh arguments passed to xTokenize() - pLocale and\n**   nLocale - are a pointer to a buffer containing the locale to use for\n**   tokenization (e.g. \"en_US\") and its size in bytes, respectively. The\n**   pLocale buffer is not nul-terminated. pLocale may be passed NULL (in\n**   which case nLocale is always 0) to indicate that the tokenizer should\n**   use its default locale.\n**\n**   For each token in the input string, the supplied callback xToken() must\n**   be invoked. The first argument to it should be a copy of the pointer\n**   passed as the second argument to xTokenize(). The third and fourth\n**   arguments are a pointer to a buffer containing the token text, and the\n**   size of the token in bytes. The 4th and 5th arguments are the byte offsets\n**   of the first byte of and first byte immediately following the text from\n**   which the token is derived within the input.\n**\n**   The second argument passed to the xToken() callback (\"tflags\") should\n**   normally be set to 0. The exception is if the tokenizer supports\n**   synonyms. In this case see the discussion below for details.\n**\n**   FTS5 assumes the xToken() callback is invoked for each token in the\n**   order that they occur within the input text.\n**\n**   If an xToken() callback returns any value other than SQLITE_OK, then\n**   the tokenization should be abandoned and the xTokenize() method should\n**   immediately return a copy of the xToken() return value. Or, if the\n**   input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,\n**   if an error occurs with the xTokenize() implementation itself, it\n**   may abandon the tokenization and return any error code other than\n**   SQLITE_OK or SQLITE_DONE.\n**\n**   If the tokenizer is registered using an fts5_tokenizer_v2 object,\n**   then the xTokenize() method has two additional arguments - pLocale\n**   and nLocale. These specify the locale that the tokenizer should use\n**   for the current request. If pLocale and nLocale are both 0, then the\n**   tokenizer should use its default locale. Otherwise, pLocale points to\n**   an nLocale byte buffer containing the name of the locale to use as utf-8\n**   text. pLocale is not nul-terminated.\n**\n** FTS5_TOKENIZER\n**\n** There is also an fts5_tokenizer object. This is an older, deprecated,\n** version of fts5_tokenizer_v2. It is similar except that:\n**\n**  <ul>\n**    <li> There is no \"iVersion\" field, and\n**    <li> The xTokenize() method does not take a locale argument.\n**  </ul>\n**\n** Legacy fts5_tokenizer tokenizers must be registered using the\n** legacy xCreateTokenizer() function, instead of xCreateTokenizer_v2().\n**\n** Tokenizer implementations registered using either API may be retrieved\n** using both xFindTokenizer() and xFindTokenizer_v2().\n**\n** SYNONYM SUPPORT\n**\n**   Custom tokenizers may also support synonyms. Consider a case in which a\n**   user wishes to query for a phrase such as \"first place\". Using the\n**   built-in tokenizers, the FTS5 query 'first + place' will match instances\n**   of \"first place\" within the document set, but not alternative forms\n**   such as \"1st place\". In some applications, it would be better to match\n**   all instances of \"first place\" or \"1st place\" regardless of which form\n**   the user specified in the MATCH query text.\n**\n**   There are several ways to approach this in FTS5:\n**\n**   <ol><li> By mapping all synonyms to a single token. In this case, using\n**            the above example, this means that the tokenizer returns the\n**            same token for inputs \"first\" and \"1st\". Say that token is in\n**            fact \"first\", so that when the user inserts the document \"I won\n**            1st place\" entries are added to the index for tokens \"i\", \"won\",\n**            \"first\" and \"place\". If the user then queries for '1st + place',\n**            the tokenizer substitutes \"first\" for \"1st\" and the query works\n**            as expected.\n**\n**       <li> By querying the index for all synonyms of each query term\n**            separately. In this case, when tokenizing query text, the\n**            tokenizer may provide multiple synonyms for a single term\n**            within the document. FTS5 then queries the index for each\n**            synonym individually. For example, faced with the query:\n**\n**   <codeblock>\n**     ... MATCH 'first place'</codeblock>\n**\n**            the tokenizer offers both \"1st\" and \"first\" as synonyms for the\n**            first token in the MATCH query and FTS5 effectively runs a query\n**            similar to:\n**\n**   <codeblock>\n**     ... MATCH '(first OR 1st) place'</codeblock>\n**\n**            except that, for the purposes of auxiliary functions, the query\n**            still appears to contain just two phrases - \"(first OR 1st)\"\n**            being treated as a single phrase.\n**\n**       <li> By adding multiple synonyms for a single term to the FTS index.\n**            Using this method, when tokenizing document text, the tokenizer\n**            provides multiple synonyms for each token. So that when a\n**            document such as \"I won first place\" is tokenized, entries are\n**            added to the FTS index for \"i\", \"won\", \"first\", \"1st\" and\n**            \"place\".\n**\n**            This way, even if the tokenizer does not provide synonyms\n**            when tokenizing query text (it should not - to do so would be\n**            inefficient), it doesn't matter if the user queries for\n**            'first + place' or '1st + place', as there are entries in the\n**            FTS index corresponding to both forms of the first token.\n**   </ol>\n**\n**   Whether it is parsing document or query text, any call to xToken that\n**   specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit\n**   is considered to supply a synonym for the previous token. For example,\n**   when parsing the document \"I won first place\", a tokenizer that supports\n**   synonyms would call xToken() 5 times, as follows:\n**\n**   <codeblock>\n**       xToken(pCtx, 0, \"i\",                      1,  0,  1);\n**       xToken(pCtx, 0, \"won\",                    3,  2,  5);\n**       xToken(pCtx, 0, \"first\",                  5,  6, 11);\n**       xToken(pCtx, FTS5_TOKEN_COLOCATED, \"1st\", 3,  6, 11);\n**       xToken(pCtx, 0, \"place\",                  5, 12, 17);\n**</codeblock>\n**\n**   It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time\n**   xToken() is called. Multiple synonyms may be specified for a single token\n**   by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.\n**   There is no limit to the number of synonyms that may be provided for a\n**   single token.\n**\n**   In many cases, method (1) above is the best approach. It does not add\n**   extra data to the FTS index or require FTS5 to query for multiple terms,\n**   so it is efficient in terms of disk space and query speed. However, it\n**   does not support prefix queries very well. If, as suggested above, the\n**   token \"first\" is substituted for \"1st\" by the tokenizer, then the query:\n**\n**   <codeblock>\n**     ... MATCH '1s*'</codeblock>\n**\n**   will not match documents that contain the token \"1st\" (as the tokenizer\n**   will probably not map \"1s\" to any prefix of \"first\").\n**\n**   For full prefix support, method (3) may be preferred. In this case,\n**   because the index contains entries for both \"first\" and \"1st\", prefix\n**   queries such as 'fi*' or '1s*' will match correctly. However, because\n**   extra entries are added to the FTS index, this method uses more space\n**   within the database.\n**\n**   Method (2) offers a midpoint between (1) and (3). Using this method,\n**   a query such as '1s*' will match documents that contain the literal\n**   token \"1st\", but not \"first\" (assuming the tokenizer is not able to\n**   provide synonyms for prefixes). However, a non-prefix query like '1st'\n**   will match against \"1st\" and \"first\". This method does not require\n**   extra disk space, as no extra entries are added to the FTS index.\n**   On the other hand, it may require more CPU cycles to run MATCH queries,\n**   as separate queries of the FTS index are required for each synonym.\n**\n**   When using methods (2) or (3), it is important that the tokenizer only\n**   provide synonyms when tokenizing document text (method (3)) or query\n**   text (method (2)), not both. Doing so will not cause any errors, but is\n**   inefficient.\n*/\ntypedef struct Fts5Tokenizer Fts5Tokenizer;\ntypedef struct fts5_tokenizer_v2 fts5_tokenizer_v2;\nstruct fts5_tokenizer_v2 {\n  int iVersion;             /* Currently always 2 */\n\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      const char *pLocale, int nLocale,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n/*\n** New code should use the fts5_tokenizer_v2 type to define tokenizer\n** implementations. The following type is included for legacy applications\n** that still use it.\n*/\ntypedef struct fts5_tokenizer fts5_tokenizer;\nstruct fts5_tokenizer {\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n\n/* Flags that may be passed as the third argument to xTokenize() */\n#define FTS5_TOKENIZE_QUERY     0x0001\n#define FTS5_TOKENIZE_PREFIX    0x0002\n#define FTS5_TOKENIZE_DOCUMENT  0x0004\n#define FTS5_TOKENIZE_AUX       0x0008\n\n/* Flags that may be passed by the tokenizer implementation back to FTS5\n** as the third argument to the supplied xToken callback. */\n#define FTS5_TOKEN_COLOCATED    0x0001      /* Same position as prev. token */\n\n/*\n** END OF CUSTOM TOKENIZERS\n*************************************************************************/\n\n/*************************************************************************\n** FTS5 EXTENSION REGISTRATION API\n*/\ntypedef struct fts5_api fts5_api;\nstruct fts5_api {\n  int iVersion;                   /* Currently always set to 3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer *pTokenizer\n  );\n\n  /* Create a new auxiliary function */\n  int (*xCreateFunction)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_extension_function xFunction,\n    void (*xDestroy)(void*)\n  );\n\n  /* APIs below this point are only available if iVersion>=3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer_v2 *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer_v2 **ppTokenizer\n  );\n};\n\n/*\n** END OF REGISTRATION API\n*************************************************************************/\n\n#if 0\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif /* _FTS5_H */\n\n/******** End of fts5.h *********/\n#endif /* SQLITE3_H */\n\n/************** End of sqlite3.h *********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n\n/*\n** Reuse the STATIC_LRU for mutex access to sqlite3_temp_directory.\n*/\n#define SQLITE_MUTEX_STATIC_TEMPDIR SQLITE_MUTEX_STATIC_VFS1\n\n/*\n** Include the configuration header output by 'configure' if we're using the\n** autoconf-based build\n*/\n#if defined(_HAVE_SQLITE_CONFIG_H) && !defined(SQLITECONFIG_H)\n#include \"sqlite_cfg.h\"\n#define SQLITECONFIG_H 1\n#endif\n\n/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/\n/************** Begin file sqliteLimit.h *************************************/\n/*\n** 2007 May 7\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file defines various limits of what SQLite can process.\n*/\n\n/*\n** The maximum length of a TEXT or BLOB in bytes.   This also\n** limits the size of a row in a table or index.\n**\n** The hard limit is the ability of a 32-bit signed integer\n** to count the size: 2^31-1 or 2147483647.\n*/\n#ifndef SQLITE_MAX_LENGTH\n# define SQLITE_MAX_LENGTH 1000000000\n#endif\n#define SQLITE_MIN_LENGTH 30   /* Minimum value for the length limit */\n\n/*\n** This is the maximum number of\n**\n**    * Columns in a table\n**    * Columns in an index\n**    * Columns in a view\n**    * Terms in the SET clause of an UPDATE statement\n**    * Terms in the result set of a SELECT statement\n**    * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.\n**    * Terms in the VALUES clause of an INSERT statement\n**\n** The hard upper limit here is 32767.  Most database people will\n** tell you that in a well-normalized database, you usually should\n** not have more than a dozen or so columns in any table.  And if\n** that is the case, there is no point in having more than a few\n** dozen values in any of the other situations described above.\n**\n** An index can only have SQLITE_MAX_COLUMN columns from the user\n** point of view, but the underlying b-tree that implements the index\n** might have up to twice as many columns in a WITHOUT ROWID table,\n** since must also store the primary key at the end.  Hence the\n** column count for Index is u16 instead of i16.\n*/\n#if !defined(SQLITE_MAX_COLUMN)\n# define SQLITE_MAX_COLUMN 2000\n#elif SQLITE_MAX_COLUMN>32767\n# error SQLITE_MAX_COLUMN may not exceed 32767\n#endif\n\n/*\n** The maximum length of a single SQL statement in bytes.\n**\n** It used to be the case that setting this value to zero would\n** turn the limit off.  That is no longer true.  It is not possible\n** to turn this limit off.\n*/\n#ifndef SQLITE_MAX_SQL_LENGTH\n# define SQLITE_MAX_SQL_LENGTH 1000000000\n#endif\n\n/*\n** The maximum depth of an expression tree. This is limited to\n** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might\n** want to place more severe limits on the complexity of an\n** expression. A value of 0 means that there is no limit.\n*/\n#ifndef SQLITE_MAX_EXPR_DEPTH\n# define SQLITE_MAX_EXPR_DEPTH 1000\n#endif\n\n/*\n** The maximum number of terms in a compound SELECT statement.\n** The code generator for compound SELECT statements does one\n** level of recursion for each term.  A stack overflow can result\n** if the number of terms is too large.  In practice, most SQL\n** never has more than 3 or 4 terms.  Use a value of 0 to disable\n** any limit on the number of terms in a compound SELECT.\n*/\n#ifndef SQLITE_MAX_COMPOUND_SELECT\n# define SQLITE_MAX_COMPOUND_SELECT 500\n#endif\n\n/*\n** The maximum number of opcodes in a VDBE program.\n** Not currently enforced.\n*/\n#ifndef SQLITE_MAX_VDBE_OP\n# define SQLITE_MAX_VDBE_OP 250000000\n#endif\n\n/*\n** The maximum number of arguments to an SQL function.\n**\n** This value has a hard upper limit of 32767 due to storage\n** constraints (it needs to fit inside a i16).  We keep it\n** lower than that to prevent abuse.\n*/\n#ifndef SQLITE_MAX_FUNCTION_ARG\n# define SQLITE_MAX_FUNCTION_ARG 1000\n#endif\n\n/*\n** The suggested maximum number of in-memory pages to use for\n** the main database table and for temporary tables.\n**\n** IMPLEMENTATION-OF: R-30185-15359 The default suggested cache size is -2000,\n** which means the cache size is limited to 2048000 bytes of memory.\n** IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be\n** altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.\n*/\n#ifndef SQLITE_DEFAULT_CACHE_SIZE\n# define SQLITE_DEFAULT_CACHE_SIZE  -2000\n#endif\n\n/*\n** The default number of frames to accumulate in the log file before\n** checkpointing the database in WAL mode.\n*/\n#ifndef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT\n# define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT  1000\n#endif\n\n/*\n** The maximum number of attached databases.  This must be between 0\n** and 125.  The upper bound of 125 is because the attached databases are\n** counted using a signed 8-bit integer which has a maximum value of 127\n** and we have to allow 2 extra counts for the \"main\" and \"temp\" databases.\n*/\n#ifndef SQLITE_MAX_ATTACHED\n# define SQLITE_MAX_ATTACHED 10\n#endif\n\n\n/*\n** The maximum value of a ?nnn wildcard that the parser will accept.\n** If the value exceeds 32767 then extra space is required for the Expr\n** structure.  But otherwise, we believe that the number can be as large\n** as a signed 32-bit integer can hold.\n*/\n#ifndef SQLITE_MAX_VARIABLE_NUMBER\n# define SQLITE_MAX_VARIABLE_NUMBER 32766\n#endif\n\n/* Maximum page size.  The upper bound on this value is 65536.  This a limit\n** imposed by the use of 16-bit offsets within each page.\n**\n** Earlier versions of SQLite allowed the user to change this value at\n** compile time. This is no longer permitted, on the grounds that it creates\n** a library that is technically incompatible with an SQLite library\n** compiled with a different limit. If a process operating on a database\n** with a page-size of 65536 bytes crashes, then an instance of SQLite\n** compiled with the default page-size limit will not be able to rollback\n** the aborted transaction. This could lead to database corruption.\n*/\n#ifdef SQLITE_MAX_PAGE_SIZE\n# undef SQLITE_MAX_PAGE_SIZE\n#endif\n#define SQLITE_MAX_PAGE_SIZE 65536\n\n\n/*\n** The default size of a database page.\n*/\n#ifndef SQLITE_DEFAULT_PAGE_SIZE\n# define SQLITE_DEFAULT_PAGE_SIZE 4096\n#endif\n#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE\n# undef SQLITE_DEFAULT_PAGE_SIZE\n# define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE\n#endif\n\n/*\n** Ordinarily, if no value is explicitly provided, SQLite creates databases\n** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain\n** device characteristics (sector-size and atomic write() support),\n** SQLite may choose a larger value. This constant is the maximum value\n** SQLite will choose on its own.\n*/\n#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE\n# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192\n#endif\n#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE\n# undef SQLITE_MAX_DEFAULT_PAGE_SIZE\n# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE\n#endif\n\n\n/*\n** Maximum number of pages in one database file.\n**\n** This is really just the default value for the max_page_count pragma.\n** This value can be lowered (or raised) at run-time using the\n** max_page_count macro.\n*/\n#ifndef SQLITE_MAX_PAGE_COUNT\n# define SQLITE_MAX_PAGE_COUNT 0xfffffffe /* 4294967294 */\n#endif\n\n/*\n** Maximum length (in bytes) of the pattern in a LIKE or GLOB\n** operator.\n*/\n#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH\n# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000\n#endif\n\n/*\n** Maximum depth of recursion for triggers.\n**\n** A value of 1 means that a trigger program will not be able to itself\n** fire any triggers. A value of 0 means that no trigger programs at all\n** may be executed.\n*/\n#ifndef SQLITE_MAX_TRIGGER_DEPTH\n# define SQLITE_MAX_TRIGGER_DEPTH 1000\n#endif\n\n/************** End of sqliteLimit.h *****************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n\n/* Disable nuisance warnings on Borland compilers */\n#if defined(__BORLANDC__)\n#pragma warn -rch /* unreachable code */\n#pragma warn -ccc /* Condition is always true or false */\n#pragma warn -aus /* Assigned value is never used */\n#pragma warn -csu /* Comparing signed and unsigned */\n#pragma warn -spa /* Suspicious pointer arithmetic */\n#endif\n\n/*\n** A few places in the code require atomic load/store of aligned\n** integer values.\n*/\n#ifndef __has_extension\n# define __has_extension(x) 0     /* compatibility with non-clang compilers */\n#endif\n#if GCC_VERSION>=4007000 || __has_extension(c_atomic)\n# define SQLITE_ATOMIC_INTRINSICS 1\n# define AtomicLoad(PTR)       __atomic_load_n((PTR),__ATOMIC_RELAXED)\n# define AtomicStore(PTR,VAL)  __atomic_store_n((PTR),(VAL),__ATOMIC_RELAXED)\n#else\n# define SQLITE_ATOMIC_INTRINSICS 0\n# define AtomicLoad(PTR)       (*(PTR))\n# define AtomicStore(PTR,VAL)  (*(PTR) = (VAL))\n#endif\n\n/*\n** Include standard header files as necessary\n*/\n#ifdef HAVE_STDINT_H\n#include <stdint.h>\n#endif\n#ifdef HAVE_INTTYPES_H\n#include <inttypes.h>\n#endif\n\n/*\n** The following macros are used to cast pointers to integers and\n** integers to pointers.  The way you do this varies from one compiler\n** to the next, so we have developed the following set of #if statements\n** to generate appropriate macros for a wide range of compilers.\n**\n** The correct \"ANSI\" way to do this is to use the intptr_t type.\n** Unfortunately, that typedef is not available on all compilers, or\n** if it is available, it requires an #include of specific headers\n** that vary from one machine to the next.\n**\n** Ticket #3860:  The llvm-gcc-4.2 compiler from Apple chokes on\n** the ((void*)&((char*)0)[X]) construct.  But MSVC chokes on ((void*)(X)).\n** So we have to define the macros in different ways depending on the\n** compiler.\n*/\n#if defined(HAVE_STDINT_H)   /* Use this case if we have ANSI headers */\n# define SQLITE_INT_TO_PTR(X)  ((void*)(intptr_t)(X))\n# define SQLITE_PTR_TO_INT(X)  ((int)(intptr_t)(X))\n#elif defined(__PTRDIFF_TYPE__)  /* This case should work for GCC */\n# define SQLITE_INT_TO_PTR(X)  ((void*)(__PTRDIFF_TYPE__)(X))\n# define SQLITE_PTR_TO_INT(X)  ((int)(__PTRDIFF_TYPE__)(X))\n#elif !defined(__GNUC__)       /* Works for compilers other than LLVM */\n# define SQLITE_INT_TO_PTR(X)  ((void*)&((char*)0)[X])\n# define SQLITE_PTR_TO_INT(X)  ((int)(((char*)X)-(char*)0))\n#else                          /* Generates a warning - but it always works */\n# define SQLITE_INT_TO_PTR(X)  ((void*)(X))\n# define SQLITE_PTR_TO_INT(X)  ((int)(X))\n#endif\n\n/*\n** Macros to hint to the compiler that a function should or should not be\n** inlined.\n*/\n#if defined(__GNUC__)\n#  define SQLITE_NOINLINE  __attribute__((noinline))\n#  define SQLITE_INLINE    __attribute__((always_inline)) inline\n#elif defined(_MSC_VER) && _MSC_VER>=1310\n#  define SQLITE_NOINLINE  __declspec(noinline)\n#  define SQLITE_INLINE    __forceinline\n#else\n#  define SQLITE_NOINLINE\n#  define SQLITE_INLINE\n#endif\n#if defined(SQLITE_COVERAGE_TEST) || defined(__STRICT_ANSI__)\n# undef SQLITE_INLINE\n# define SQLITE_INLINE\n#endif\n\n/*\n** Make sure that the compiler intrinsics we desire are enabled when\n** compiling with an appropriate version of MSVC unless prevented by\n** the SQLITE_DISABLE_INTRINSIC define.\n*/\n#if !defined(SQLITE_DISABLE_INTRINSIC)\n#  if defined(_MSC_VER) && _MSC_VER>=1400\n#    if !defined(_WIN32_WCE)\n#      include <intrin.h>\n#      pragma intrinsic(_byteswap_ushort)\n#      pragma intrinsic(_byteswap_ulong)\n#      pragma intrinsic(_byteswap_uint64)\n#      pragma intrinsic(_ReadWriteBarrier)\n#    else\n#      include <cmnintrin.h>\n#    endif\n#  endif\n#endif\n\n/*\n** Enable SQLITE_USE_SEH by default on MSVC builds.  Only omit\n** SEH support if the -DSQLITE_OMIT_SEH option is given.\n*/\n#if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH)\n# define SQLITE_USE_SEH 1\n#else\n# undef SQLITE_USE_SEH\n#endif\n\n/*\n** Enable SQLITE_DIRECT_OVERFLOW_READ, unless the build explicitly\n** disables it using -DSQLITE_DIRECT_OVERFLOW_READ=0\n*/\n#if defined(SQLITE_DIRECT_OVERFLOW_READ) && SQLITE_DIRECT_OVERFLOW_READ+1==1\n  /* Disable if -DSQLITE_DIRECT_OVERFLOW_READ=0 */\n# undef SQLITE_DIRECT_OVERFLOW_READ\n#else\n  /* In all other cases, enable */\n# define SQLITE_DIRECT_OVERFLOW_READ 1\n#endif\n\n\n/*\n** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.\n** 0 means mutexes are permanently disable and the library is never\n** threadsafe.  1 means the library is serialized which is the highest\n** level of threadsafety.  2 means the library is multithreaded - multiple\n** threads can use SQLite as long as no two threads try to use the same\n** database connection at the same time.\n**\n** Older versions of SQLite used an optional THREADSAFE macro.\n** We support that for legacy.\n**\n** To ensure that the correct value of \"THREADSAFE\" is reported when querying\n** for compile-time options at runtime (e.g. \"PRAGMA compile_options\"), this\n** logic is partially replicated in ctime.c. If it is updated here, it should\n** also be updated there.\n*/\n#if !defined(SQLITE_THREADSAFE)\n# if defined(THREADSAFE)\n#   define SQLITE_THREADSAFE THREADSAFE\n# else\n#   define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */\n# endif\n#endif\n\n/*\n** Powersafe overwrite is on by default.  But can be turned off using\n** the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option.\n*/\n#ifndef SQLITE_POWERSAFE_OVERWRITE\n# define SQLITE_POWERSAFE_OVERWRITE 1\n#endif\n\n/*\n** EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by\n** default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in\n** which case memory allocation statistics are disabled by default.\n*/\n#if !defined(SQLITE_DEFAULT_MEMSTATUS)\n# define SQLITE_DEFAULT_MEMSTATUS 1\n#endif\n\n/*\n** Exactly one of the following macros must be defined in order to\n** specify which memory allocation subsystem to use.\n**\n**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()\n**     SQLITE_WIN32_MALLOC           // Use Win32 native heap API\n**     SQLITE_ZERO_MALLOC            // Use a stub allocator that always fails\n**     SQLITE_MEMDEBUG               // Debugging version of system malloc()\n**\n** On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the\n** assert() macro is enabled, each call into the Win32 native heap subsystem\n** will cause HeapValidate to be called.  If heap validation should fail, an\n** assertion will be triggered.\n**\n** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as\n** the default.\n*/\n#if defined(SQLITE_SYSTEM_MALLOC) \\\n  + defined(SQLITE_WIN32_MALLOC) \\\n  + defined(SQLITE_ZERO_MALLOC) \\\n  + defined(SQLITE_MEMDEBUG)>1\n# error \"Two or more of the following compile-time configuration options\\\n are defined but at most one is allowed:\\\n SQLITE_SYSTEM_MALLOC, SQLITE_WIN32_MALLOC, SQLITE_MEMDEBUG,\\\n SQLITE_ZERO_MALLOC\"\n#endif\n#if defined(SQLITE_SYSTEM_MALLOC) \\\n  + defined(SQLITE_WIN32_MALLOC) \\\n  + defined(SQLITE_ZERO_MALLOC) \\\n  + defined(SQLITE_MEMDEBUG)==0\n# define SQLITE_SYSTEM_MALLOC 1\n#endif\n\n/*\n** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the\n** sizes of memory allocations below this value where possible.\n*/\n#if !defined(SQLITE_MALLOC_SOFT_LIMIT)\n# define SQLITE_MALLOC_SOFT_LIMIT 1024\n#endif\n\n/*\n** We need to define _XOPEN_SOURCE as follows in order to enable\n** recursive mutexes on most Unix systems and fchmod() on OpenBSD.\n** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit\n** it.\n*/\n#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)\n#  define _XOPEN_SOURCE 600\n#endif\n\n/*\n** NDEBUG and SQLITE_DEBUG are opposites.  It should always be true that\n** defined(NDEBUG)==!defined(SQLITE_DEBUG).  If this is not currently true,\n** make it true by defining or undefining NDEBUG.\n**\n** Setting NDEBUG makes the code smaller and faster by disabling the\n** assert() statements in the code.  So we want the default action\n** to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG\n** is set.  Thus NDEBUG becomes an opt-in rather than an opt-out\n** feature.\n*/\n#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)\n# define NDEBUG 1\n#endif\n#if defined(NDEBUG) && defined(SQLITE_DEBUG)\n# undef NDEBUG\n#endif\n\n/*\n** Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on.\n*/\n#if !defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) && defined(SQLITE_DEBUG)\n# define SQLITE_ENABLE_EXPLAIN_COMMENTS 1\n#endif\n\n/*\n** The testcase() macro is used to aid in coverage testing.  When\n** doing coverage testing, the condition inside the argument to\n** testcase() must be evaluated both true and false in order to\n** get full branch coverage.  The testcase() macro is inserted\n** to help ensure adequate test coverage in places where simple\n** condition/decision coverage is inadequate.  For example, testcase()\n** can be used to make sure boundary values are tested.  For\n** bitmask tests, testcase() can be used to make sure each bit\n** is significant and used at least once.  On switch statements\n** where multiple cases go to the same block of code, testcase()\n** can insure that all cases are evaluated.\n*/\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)\n# ifndef SQLITE_AMALGAMATION\n    extern unsigned int sqlite3CoverageCounter;\n# endif\n# define testcase(X)  if( X ){ sqlite3CoverageCounter += (unsigned)__LINE__; }\n#else\n# define testcase(X)\n#endif\n\n/*\n** The TESTONLY macro is used to enclose variable declarations or\n** other bits of code that are needed to support the arguments\n** within testcase() and assert() macros.\n*/\n#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST)\n# define TESTONLY(X)  X\n#else\n# define TESTONLY(X)\n#endif\n\n/*\n** Sometimes we need a small amount of code such as a variable initialization\n** to setup for a later assert() statement.  We do not want this code to\n** appear when assert() is disabled.  The following macro is therefore\n** used to contain that setup code.  The \"VVA\" acronym stands for\n** \"Verification, Validation, and Accreditation\".  In other words, the\n** code within VVA_ONLY() will only run during verification processes.\n*/\n#ifndef NDEBUG\n# define VVA_ONLY(X)  X\n#else\n# define VVA_ONLY(X)\n#endif\n\n/*\n** Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage\n** and mutation testing\n*/\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)\n# define SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS  1\n#endif\n\n/*\n** The ALWAYS and NEVER macros surround boolean expressions which\n** are intended to always be true or false, respectively.  Such\n** expressions could be omitted from the code completely.  But they\n** are included in a few cases in order to enhance the resilience\n** of SQLite to unexpected behavior - to make the code \"self-healing\"\n** or \"ductile\" rather than being \"brittle\" and crashing at the first\n** hint of unplanned behavior.\n**\n** In other words, ALWAYS and NEVER are added for defensive code.\n**\n** When doing coverage testing ALWAYS and NEVER are hard-coded to\n** be true and false so that the unreachable code they specify will\n** not be counted as untested code.\n*/\n#if defined(SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS)\n# define ALWAYS(X)      (1)\n# define NEVER(X)       (0)\n#elif !defined(NDEBUG)\n# define ALWAYS(X)      ((X)?1:(assert(0),0))\n# define NEVER(X)       ((X)?(assert(0),1):0)\n#else\n# define ALWAYS(X)      (X)\n# define NEVER(X)       (X)\n#endif\n\n/*\n** Some conditionals are optimizations only.  In other words, if the\n** conditionals are replaced with a constant 1 (true) or 0 (false) then\n** the correct answer is still obtained, though perhaps not as quickly.\n**\n** The following macros mark these optimizations conditionals.\n*/\n#if defined(SQLITE_MUTATION_TEST)\n# define OK_IF_ALWAYS_TRUE(X)  (1)\n# define OK_IF_ALWAYS_FALSE(X) (0)\n#else\n# define OK_IF_ALWAYS_TRUE(X)  (X)\n# define OK_IF_ALWAYS_FALSE(X) (X)\n#endif\n\n/*\n** Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is\n** defined.  We need to defend against those failures when testing with\n** SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches\n** during a normal build.  The following macro can be used to disable tests\n** that are always false except when SQLITE_TEST_REALLOC_STRESS is set.\n*/\n#if defined(SQLITE_TEST_REALLOC_STRESS)\n# define ONLY_IF_REALLOC_STRESS(X)  (X)\n#elif !defined(NDEBUG)\n# define ONLY_IF_REALLOC_STRESS(X)  ((X)?(assert(0),1):0)\n#else\n# define ONLY_IF_REALLOC_STRESS(X)  (0)\n#endif\n\n/*\n** Declarations used for tracing the operating system interfaces.\n*/\n#if defined(SQLITE_FORCE_OS_TRACE) || defined(SQLITE_TEST) || \\\n    (defined(SQLITE_DEBUG) && SQLITE_OS_WIN)\n  extern int sqlite3OSTrace;\n# define OSTRACE(X)          if( sqlite3OSTrace ) sqlite3DebugPrintf X\n# define SQLITE_HAVE_OS_TRACE\n#else\n# define OSTRACE(X)\n# undef  SQLITE_HAVE_OS_TRACE\n#endif\n\n/*\n** Is the sqlite3ErrName() function needed in the build?  Currently,\n** it is needed by \"mutex_w32.c\" (when debugging), \"os_win.c\" (when\n** OSTRACE is enabled), and by several \"test*.c\" files (which are\n** compiled using SQLITE_TEST).\n*/\n#if defined(SQLITE_HAVE_OS_TRACE) || defined(SQLITE_TEST) || \\\n    (defined(SQLITE_DEBUG) && SQLITE_OS_WIN)\n# define SQLITE_NEED_ERR_NAME\n#else\n# undef  SQLITE_NEED_ERR_NAME\n#endif\n\n/*\n** SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN\n*/\n#ifdef SQLITE_OMIT_EXPLAIN\n# undef SQLITE_ENABLE_EXPLAIN_COMMENTS\n#endif\n\n/*\n** SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTERTABLE\n*/\n#if defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_ALTERTABLE)\n# define SQLITE_OMIT_ALTERTABLE\n#endif\n\n#define SQLITE_DIGIT_SEPARATOR '_'\n\n/*\n** Return true (non-zero) if the input is an integer that is too large\n** to fit in 32-bits.  This macro is used inside of various testcase()\n** macros to verify that we have tested SQLite for large-file support.\n*/\n#define IS_BIG_INT(X)  (((X)&~(i64)0xffffffff)!=0)\n\n/*\n** The macro unlikely() is a hint that surrounds a boolean\n** expression that is usually false.  Macro likely() surrounds\n** a boolean expression that is usually true.  These hints could,\n** in theory, be used by the compiler to generate better code, but\n** currently they are just comments for human readers.\n*/\n#define likely(X)    (X)\n#define unlikely(X)  (X)\n\n/************** Include hash.h in the middle of sqliteInt.h ******************/\n/************** Begin file hash.h ********************************************/\n/*\n** 2001 September 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the header file for the generic hash-table implementation\n** used in SQLite.\n*/\n#ifndef SQLITE_HASH_H\n#define SQLITE_HASH_H\n\n/* Forward declarations of structures. */\ntypedef struct Hash Hash;\ntypedef struct HashElem HashElem;\n\n/* A complete hash table is an instance of the following structure.\n** The internals of this structure are intended to be opaque -- client\n** code should not attempt to access or modify the fields of this structure\n** directly.  Change this structure only by using the routines below.\n** However, some of the \"procedures\" and \"functions\" for modifying and\n** accessing this structure are really macros, so we can't really make\n** this structure opaque.\n**\n** All elements of the hash table are on a single doubly-linked list.\n** Hash.first points to the head of this list.\n**\n** There are Hash.htsize buckets.  Each bucket points to a spot in\n** the global doubly-linked list.  The contents of the bucket are the\n** element pointed to plus the next _ht.count-1 elements in the list.\n**\n** Hash.htsize and Hash.ht may be zero.  In that case lookup is done\n** by a linear search of the global list.  For small tables, the\n** Hash.ht table is never allocated because if there are few elements\n** in the table, it is faster to do a linear search than to manage\n** the hash table.\n*/\nstruct Hash {\n  unsigned int htsize;      /* Number of buckets in the hash table */\n  unsigned int count;       /* Number of entries in this table */\n  HashElem *first;          /* The first element of the array */\n  struct _ht {              /* the hash table */\n    unsigned int count;        /* Number of entries with this hash */\n    HashElem *chain;           /* Pointer to first entry with this hash */\n  } *ht;\n};\n\n/* Each element in the hash table is an instance of the following\n** structure.  All elements are stored on a single doubly-linked list.\n**\n** Again, this structure is intended to be opaque, but it can't really\n** be opaque because it is used by macros.\n*/\nstruct HashElem {\n  HashElem *next, *prev;       /* Next and previous elements in the table */\n  void *data;                  /* Data associated with this element */\n  const char *pKey;            /* Key associated with this element */\n  unsigned int h;              /* hash for pKey */\n};\n\n/*\n** Access routines.  To delete, insert a NULL pointer.\n*/\nSQLITE_PRIVATE void sqlite3HashInit(Hash*);\nSQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, void *pData);\nSQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey);\nSQLITE_PRIVATE void sqlite3HashClear(Hash*);\n\n/*\n** Macros for looping over all elements of a hash table.  The idiom is\n** like this:\n**\n**   Hash h;\n**   HashElem *p;\n**   ...\n**   for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){\n**     SomeStructure *pData = sqliteHashData(p);\n**     // do something with pData\n**   }\n*/\n#define sqliteHashFirst(H)  ((H)->first)\n#define sqliteHashNext(E)   ((E)->next)\n#define sqliteHashData(E)   ((E)->data)\n/* #define sqliteHashKey(E)    ((E)->pKey) // NOT USED */\n/* #define sqliteHashKeysize(E) ((E)->nKey)  // NOT USED */\n\n/*\n** Number of entries in a hash table\n*/\n#define sqliteHashCount(H)  ((H)->count)\n\n#endif /* SQLITE_HASH_H */\n\n/************** End of hash.h ************************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include parse.h in the middle of sqliteInt.h *****************/\n/************** Begin file parse.h *******************************************/\n#define TK_SEMI                             1\n#define TK_EXPLAIN                          2\n#define TK_QUERY                            3\n#define TK_PLAN                             4\n#define TK_BEGIN                            5\n#define TK_TRANSACTION                      6\n#define TK_DEFERRED                         7\n#define TK_IMMEDIATE                        8\n#define TK_EXCLUSIVE                        9\n#define TK_COMMIT                          10\n#define TK_END                             11\n#define TK_ROLLBACK                        12\n#define TK_SAVEPOINT                       13\n#define TK_RELEASE                         14\n#define TK_TO                              15\n#define TK_TABLE                           16\n#define TK_CREATE                          17\n#define TK_IF                              18\n#define TK_NOT                             19\n#define TK_EXISTS                          20\n#define TK_TEMP                            21\n#define TK_LP                              22\n#define TK_RP                              23\n#define TK_AS                              24\n#define TK_COMMA                           25\n#define TK_WITHOUT                         26\n#define TK_ABORT                           27\n#define TK_ACTION                          28\n#define TK_AFTER                           29\n#define TK_ANALYZE                         30\n#define TK_ASC                             31\n#define TK_ATTACH                          32\n#define TK_BEFORE                          33\n#define TK_BY                              34\n#define TK_CASCADE                         35\n#define TK_CAST                            36\n#define TK_CONFLICT                        37\n#define TK_DATABASE                        38\n#define TK_DESC                            39\n#define TK_DETACH                          40\n#define TK_EACH                            41\n#define TK_FAIL                            42\n#define TK_OR                              43\n#define TK_AND                             44\n#define TK_IS                              45\n#define TK_ISNOT                           46\n#define TK_MATCH                           47\n#define TK_LIKE_KW                         48\n#define TK_BETWEEN                         49\n#define TK_IN                              50\n#define TK_ISNULL                          51\n#define TK_NOTNULL                         52\n#define TK_NE                              53\n#define TK_EQ                              54\n#define TK_GT                              55\n#define TK_LE                              56\n#define TK_LT                              57\n#define TK_GE                              58\n#define TK_ESCAPE                          59\n#define TK_ID                              60\n#define TK_COLUMNKW                        61\n#define TK_DO                              62\n#define TK_FOR                             63\n#define TK_IGNORE                          64\n#define TK_INITIALLY                       65\n#define TK_INSTEAD                         66\n#define TK_NO                              67\n#define TK_KEY                             68\n#define TK_OF                              69\n#define TK_OFFSET                          70\n#define TK_PRAGMA                          71\n#define TK_RAISE                           72\n#define TK_RECURSIVE                       73\n#define TK_REPLACE                         74\n#define TK_RESTRICT                        75\n#define TK_ROW                             76\n#define TK_ROWS                            77\n#define TK_TRIGGER                         78\n#define TK_VACUUM                          79\n#define TK_VIEW                            80\n#define TK_VIRTUAL                         81\n#define TK_WITH                            82\n#define TK_NULLS                           83\n#define TK_FIRST                           84\n#define TK_LAST                            85\n#define TK_CURRENT                         86\n#define TK_FOLLOWING                       87\n#define TK_PARTITION                       88\n#define TK_PRECEDING                       89\n#define TK_RANGE                           90\n#define TK_UNBOUNDED                       91\n#define TK_EXCLUDE                         92\n#define TK_GROUPS                          93\n#define TK_OTHERS                          94\n#define TK_TIES                            95\n#define TK_GENERATED                       96\n#define TK_ALWAYS                          97\n#define TK_MATERIALIZED                    98\n#define TK_REINDEX                         99\n#define TK_RENAME                         100\n#define TK_CTIME_KW                       101\n#define TK_ANY                            102\n#define TK_BITAND                         103\n#define TK_BITOR                          104\n#define TK_LSHIFT                         105\n#define TK_RSHIFT                         106\n#define TK_PLUS                           107\n#define TK_MINUS                          108\n#define TK_STAR                           109\n#define TK_SLASH                          110\n#define TK_REM                            111\n#define TK_CONCAT                         112\n#define TK_PTR                            113\n#define TK_COLLATE                        114\n#define TK_BITNOT                         115\n#define TK_ON                             116\n#define TK_INDEXED                        117\n#define TK_STRING                         118\n#define TK_JOIN_KW                        119\n#define TK_CONSTRAINT                     120\n#define TK_DEFAULT                        121\n#define TK_NULL                           122\n#define TK_PRIMARY                        123\n#define TK_UNIQUE                         124\n#define TK_CHECK                          125\n#define TK_REFERENCES                     126\n#define TK_AUTOINCR                       127\n#define TK_INSERT                         128\n#define TK_DELETE                         129\n#define TK_UPDATE                         130\n#define TK_SET                            131\n#define TK_DEFERRABLE                     132\n#define TK_FOREIGN                        133\n#define TK_DROP                           134\n#define TK_UNION                          135\n#define TK_ALL                            136\n#define TK_EXCEPT                         137\n#define TK_INTERSECT                      138\n#define TK_SELECT                         139\n#define TK_VALUES                         140\n#define TK_DISTINCT                       141\n#define TK_DOT                            142\n#define TK_FROM                           143\n#define TK_JOIN                           144\n#define TK_USING                          145\n#define TK_ORDER                          146\n#define TK_GROUP                          147\n#define TK_HAVING                         148\n#define TK_LIMIT                          149\n#define TK_WHERE                          150\n#define TK_RETURNING                      151\n#define TK_INTO                           152\n#define TK_NOTHING                        153\n#define TK_FLOAT                          154\n#define TK_BLOB                           155\n#define TK_INTEGER                        156\n#define TK_VARIABLE                       157\n#define TK_CASE                           158\n#define TK_WHEN                           159\n#define TK_THEN                           160\n#define TK_ELSE                           161\n#define TK_INDEX                          162\n#define TK_ALTER                          163\n#define TK_ADD                            164\n#define TK_WINDOW                         165\n#define TK_OVER                           166\n#define TK_FILTER                         167\n#define TK_COLUMN                         168\n#define TK_AGG_FUNCTION                   169\n#define TK_AGG_COLUMN                     170\n#define TK_TRUEFALSE                      171\n#define TK_FUNCTION                       172\n#define TK_UPLUS                          173\n#define TK_UMINUS                         174\n#define TK_TRUTH                          175\n#define TK_REGISTER                       176\n#define TK_VECTOR                         177\n#define TK_SELECT_COLUMN                  178\n#define TK_IF_NULL_ROW                    179\n#define TK_ASTERISK                       180\n#define TK_SPAN                           181\n#define TK_ERROR                          182\n#define TK_QNUMBER                        183\n#define TK_SPACE                          184\n#define TK_COMMENT                        185\n#define TK_ILLEGAL                        186\n\n/************** End of parse.h ***********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n#include <stddef.h>\n#include <ctype.h>\n\n/*\n** Use a macro to replace memcpy() if compiled with SQLITE_INLINE_MEMCPY.\n** This allows better measurements of where memcpy() is used when running\n** cachegrind.  But this macro version of memcpy() is very slow so it\n** should not be used in production.  This is a performance measurement\n** hack only.\n*/\n#ifdef SQLITE_INLINE_MEMCPY\n# define memcpy(D,S,N) {char*xxd=(char*)(D);const char*xxs=(const char*)(S);\\\n                        int xxn=(N);while(xxn-->0)*(xxd++)=*(xxs++);}\n#endif\n\n/*\n** If compiling for a processor that lacks floating point support,\n** substitute integer for floating-point\n*/\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# define double sqlite_int64\n# define float sqlite_int64\n# define fabs(X) ((X)<0?-(X):(X))\n# define sqlite3IsOverflow(X) 0\n# ifndef SQLITE_BIG_DBL\n#   define SQLITE_BIG_DBL (((sqlite3_int64)1)<<50)\n# endif\n# define SQLITE_OMIT_DATETIME_FUNCS 1\n# define SQLITE_OMIT_TRACE 1\n# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT\n# undef SQLITE_HAVE_ISNAN\n#endif\n#ifndef SQLITE_BIG_DBL\n# define SQLITE_BIG_DBL (1e99)\n#endif\n\n/*\n** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0\n** afterward. Having this macro allows us to cause the C compiler\n** to omit code used by TEMP tables without messy #ifndef statements.\n*/\n#ifdef SQLITE_OMIT_TEMPDB\n#define OMIT_TEMPDB 1\n#else\n#define OMIT_TEMPDB 0\n#endif\n\n/*\n** The \"file format\" number is an integer that is incremented whenever\n** the VDBE-level file format changes.  The following macros define the\n** the default file format for new databases and the maximum file format\n** that the library can read.\n*/\n#define SQLITE_MAX_FILE_FORMAT 4\n#ifndef SQLITE_DEFAULT_FILE_FORMAT\n# define SQLITE_DEFAULT_FILE_FORMAT 4\n#endif\n\n/*\n** Determine whether triggers are recursive by default.  This can be\n** changed at run-time using a pragma.\n*/\n#ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS\n# define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0\n#endif\n\n/*\n** Provide a default value for SQLITE_TEMP_STORE in case it is not specified\n** on the command-line\n*/\n#ifndef SQLITE_TEMP_STORE\n# define SQLITE_TEMP_STORE 1\n#endif\n\n/*\n** If no value has been provided for SQLITE_MAX_WORKER_THREADS, or if\n** SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it\n** to zero.\n*/\n#if SQLITE_TEMP_STORE==3 || SQLITE_THREADSAFE==0\n# undef SQLITE_MAX_WORKER_THREADS\n# define SQLITE_MAX_WORKER_THREADS 0\n#endif\n#ifndef SQLITE_MAX_WORKER_THREADS\n# define SQLITE_MAX_WORKER_THREADS 8\n#endif\n#ifndef SQLITE_DEFAULT_WORKER_THREADS\n# define SQLITE_DEFAULT_WORKER_THREADS 0\n#endif\n#if SQLITE_DEFAULT_WORKER_THREADS>SQLITE_MAX_WORKER_THREADS\n# undef SQLITE_MAX_WORKER_THREADS\n# define SQLITE_MAX_WORKER_THREADS SQLITE_DEFAULT_WORKER_THREADS\n#endif\n\n/*\n** The default initial allocation for the pagecache when using separate\n** pagecaches for each database connection.  A positive number is the\n** number of pages.  A negative number N translations means that a buffer\n** of -1024*N bytes is allocated and used for as many pages as it will hold.\n**\n** The default value of \"20\" was chosen to minimize the run-time of the\n** speedtest1 test program with options: --shrink-memory --reprepare\n*/\n#ifndef SQLITE_DEFAULT_PCACHE_INITSZ\n# define SQLITE_DEFAULT_PCACHE_INITSZ 20\n#endif\n\n/*\n** Default value for the SQLITE_CONFIG_SORTERREF_SIZE option.\n*/\n#ifndef SQLITE_DEFAULT_SORTERREF_SIZE\n# define SQLITE_DEFAULT_SORTERREF_SIZE 0x7fffffff\n#endif\n\n/*\n** The compile-time options SQLITE_MMAP_READWRITE and\n** SQLITE_ENABLE_BATCH_ATOMIC_WRITE are not compatible with one another.\n** You must choose one or the other (or neither) but not both.\n*/\n#if defined(SQLITE_MMAP_READWRITE) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n#error Cannot use both SQLITE_MMAP_READWRITE and SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n#endif\n\n/*\n** GCC does not define the offsetof() macro so we'll have to do it\n** ourselves.\n*/\n#ifndef offsetof\n# define offsetof(ST,M) ((size_t)((char*)&((ST*)0)->M - (char*)0))\n#endif\n\n/*\n** Work around C99 \"flex-array\" syntax for pre-C99 compilers, so as\n** to avoid complaints from -fsanitize=strict-bounds.\n*/\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)\n# define FLEXARRAY\n#else\n# define FLEXARRAY 1\n#endif\n\n/*\n** Macros to compute minimum and maximum of two numbers.\n*/\n#ifndef MIN\n# define MIN(A,B) ((A)<(B)?(A):(B))\n#endif\n#ifndef MAX\n# define MAX(A,B) ((A)>(B)?(A):(B))\n#endif\n\n/*\n** Swap two objects of type TYPE.\n*/\n#define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}\n\n/*\n** Check to see if this machine uses EBCDIC.  (Yes, believe it or\n** not, there are still machines out there that use EBCDIC.)\n*/\n#if 'A' == '\\301'\n# define SQLITE_EBCDIC 1\n#else\n# define SQLITE_ASCII 1\n#endif\n\n/*\n** Integers of known sizes.  These typedefs might change for architectures\n** where the sizes very.  Preprocessor macros are available so that the\n** types can be conveniently redefined at compile-type.  Like this:\n**\n**         cc '-DUINTPTR_TYPE=long long int' ...\n*/\n#ifndef UINT32_TYPE\n# ifdef HAVE_UINT32_T\n#  define UINT32_TYPE uint32_t\n# else\n#  define UINT32_TYPE unsigned int\n# endif\n#endif\n#ifndef UINT16_TYPE\n# ifdef HAVE_UINT16_T\n#  define UINT16_TYPE uint16_t\n# else\n#  define UINT16_TYPE unsigned short int\n# endif\n#endif\n#ifndef INT16_TYPE\n# ifdef HAVE_INT16_T\n#  define INT16_TYPE int16_t\n# else\n#  define INT16_TYPE short int\n# endif\n#endif\n#ifndef UINT8_TYPE\n# ifdef HAVE_UINT8_T\n#  define UINT8_TYPE uint8_t\n# else\n#  define UINT8_TYPE unsigned char\n# endif\n#endif\n#ifndef INT8_TYPE\n# ifdef HAVE_INT8_T\n#  define INT8_TYPE int8_t\n# else\n#  define INT8_TYPE signed char\n# endif\n#endif\ntypedef sqlite_int64 i64;          /* 8-byte signed integer */\ntypedef sqlite_uint64 u64;         /* 8-byte unsigned integer */\ntypedef UINT32_TYPE u32;           /* 4-byte unsigned integer */\ntypedef UINT16_TYPE u16;           /* 2-byte unsigned integer */\ntypedef INT16_TYPE i16;            /* 2-byte signed integer */\ntypedef UINT8_TYPE u8;             /* 1-byte unsigned integer */\ntypedef INT8_TYPE i8;              /* 1-byte signed integer */\n\n/* A bitfield type for use inside of structures.  Always follow with :N where\n** N is the number of bits.\n*/\ntypedef unsigned bft;  /* Bit Field Type */\n\n/*\n** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value\n** that can be stored in a u32 without loss of data.  The value\n** is 0x00000000ffffffff.  But because of quirks of some compilers, we\n** have to specify the value in the less intuitive manner shown:\n*/\n#define SQLITE_MAX_U32  ((((u64)1)<<32)-1)\n\n/*\n** The datatype used to store estimates of the number of rows in a\n** table or index.\n*/\ntypedef u64 tRowcnt;\n\n/*\n** Estimated quantities used for query planning are stored as 16-bit\n** logarithms.  For quantity X, the value stored is 10*log2(X).  This\n** gives a possible range of values of approximately 1.0e986 to 1e-986.\n** But the allowed values are \"grainy\".  Not every value is representable.\n** For example, quantities 16 and 17 are both represented by a LogEst\n** of 40.  However, since LogEst quantities are suppose to be estimates,\n** not exact values, this imprecision is not a problem.\n**\n** \"LogEst\" is short for \"Logarithmic Estimate\".\n**\n** Examples:\n**      1 -> 0              20 -> 43          10000 -> 132\n**      2 -> 10             25 -> 46          25000 -> 146\n**      3 -> 16            100 -> 66        1000000 -> 199\n**      4 -> 20           1000 -> 99        1048576 -> 200\n**     10 -> 33           1024 -> 100    4294967296 -> 320\n**\n** The LogEst can be negative to indicate fractional values.\n** Examples:\n**\n**    0.5 -> -10           0.1 -> -33        0.0625 -> -40\n*/\ntypedef INT16_TYPE LogEst;\n#define LOGEST_MIN (-32768)\n#define LOGEST_MAX (32767)\n\n/*\n** Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer\n*/\n#ifndef SQLITE_PTRSIZE\n# if defined(__SIZEOF_POINTER__)\n#   define SQLITE_PTRSIZE __SIZEOF_POINTER__\n# elif defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \\\n       defined(_M_ARM)   || defined(__arm__)    || defined(__x86)   ||    \\\n      (defined(__APPLE__) && defined(__ppc__)) ||                         \\\n      (defined(__TOS_AIX__) && !defined(__64BIT__))\n#   define SQLITE_PTRSIZE 4\n# else\n#   define SQLITE_PTRSIZE 8\n# endif\n#endif\n\n/* The uptr type is an unsigned integer large enough to hold a pointer\n*/\n#if defined(HAVE_STDINT_H)\n  typedef uintptr_t uptr;\n#elif SQLITE_PTRSIZE==4\n  typedef u32 uptr;\n#else\n  typedef u64 uptr;\n#endif\n\n/*\n** The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to\n** something between S (inclusive) and E (exclusive).\n**\n** In other words, S is a buffer and E is a pointer to the first byte after\n** the end of buffer S.  This macro returns true if P points to something\n** contained within the buffer S.\n*/\n#define SQLITE_WITHIN(P,S,E)   (((uptr)(P)>=(uptr)(S))&&((uptr)(P)<(uptr)(E)))\n\n/*\n** P is one byte past the end of a large buffer. Return true if a span of bytes\n** between S..E crosses the end of that buffer.  In other words, return true\n** if the sub-buffer S..E-1 overflows the buffer whose last byte is P-1.\n**\n** S is the start of the span.  E is one byte past the end of end of span.\n**\n**                        P\n**     |-----------------|                FALSE\n**               |-------|\n**               S        E\n**\n**                        P\n**     |-----------------|\n**                    |-------|           TRUE\n**                    S        E\n**\n**                        P\n**     |-----------------|\n**                        |-------|       FALSE\n**                        S        E\n*/\n#define SQLITE_OVERFLOW(P,S,E) (((uptr)(S)<(uptr)(P))&&((uptr)(E)>(uptr)(P)))\n\n/*\n** Macros to determine whether the machine is big or little endian,\n** and whether or not that determination is run-time or compile-time.\n**\n** For best performance, an attempt is made to guess at the byte-order\n** using C-preprocessor macros.  If that is unsuccessful, or if\n** -DSQLITE_BYTEORDER=0 is set, then byte-order is determined\n** at run-time.\n**\n** If you are building SQLite on some obscure platform for which the\n** following ifdef magic does not work, you can always include either:\n**\n**    -DSQLITE_BYTEORDER=1234\n**\n** or\n**\n**    -DSQLITE_BYTEORDER=4321\n**\n** to cause the build to work for little-endian or big-endian processors,\n** respectively.\n*/\n#ifndef SQLITE_BYTEORDER  /* Replicate changes at tag-20230904a */\n# if defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__\n#   define SQLITE_BYTEORDER 4321\n# elif defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__\n#   define SQLITE_BYTEORDER 1234\n# elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1\n#   define SQLITE_BYTEORDER 4321\n# elif defined(i386)    || defined(__i386__)      || defined(_M_IX86) ||    \\\n     defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \\\n     defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \\\n     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)\n#   define SQLITE_BYTEORDER 1234\n# elif defined(sparc)   || defined(__ARMEB__)     || defined(__AARCH64EB__)\n#   define SQLITE_BYTEORDER 4321\n# else\n#   define SQLITE_BYTEORDER 0\n# endif\n#endif\n#if SQLITE_BYTEORDER==4321\n# define SQLITE_BIGENDIAN    1\n# define SQLITE_LITTLEENDIAN 0\n# define SQLITE_UTF16NATIVE  SQLITE_UTF16BE\n#elif SQLITE_BYTEORDER==1234\n# define SQLITE_BIGENDIAN    0\n# define SQLITE_LITTLEENDIAN 1\n# define SQLITE_UTF16NATIVE  SQLITE_UTF16LE\n#else\n# ifdef SQLITE_AMALGAMATION\n  const int sqlite3one = 1;\n# else\n  extern const int sqlite3one;\n# endif\n# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)\n# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)\n# define SQLITE_UTF16NATIVE  (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)\n#endif\n\n/*\n** Constants for the largest and smallest possible 64-bit signed integers.\n** These macros are designed to work correctly on both 32-bit and 64-bit\n** compilers.\n*/\n#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))\n#define LARGEST_UINT64 (0xffffffff|(((u64)0xffffffff)<<32))\n#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)\n\n/*\n** Macro SMXV(n) return the maximum value that can be held in variable n,\n** assuming n is a signed integer type.  UMXV(n) is similar for unsigned\n** integer types.\n*/\n#define SMXV(n) ((((i64)1)<<(sizeof(n)*8-1))-1)\n#define UMXV(n) ((((i64)1)<<(sizeof(n)*8))-1)\n\n/*\n** Round up a number to the next larger multiple of 8.  This is used\n** to force 8-byte alignment on 64-bit architectures.\n**\n** ROUND8() always does the rounding, for any argument.\n**\n** ROUND8P() assumes that the argument is already an integer number of\n** pointers in size, and so it is a no-op on systems where the pointer\n** size is 8.\n*/\n#define ROUND8(x)     (((x)+7)&~7)\n#if SQLITE_PTRSIZE==8\n# define ROUND8P(x)   (x)\n#else\n# define ROUND8P(x)   (((x)+7)&~7)\n#endif\n\n/*\n** Round down to the nearest multiple of 8\n*/\n#define ROUNDDOWN8(x) ((x)&~7)\n\n/*\n** Assert that the pointer X is aligned to an 8-byte boundary.  This\n** macro is used only within assert() to verify that the code gets\n** all alignment restrictions correct.\n**\n** Except, if SQLITE_4_BYTE_ALIGNED_MALLOC is defined, then the\n** underlying malloc() implementation might return us 4-byte aligned\n** pointers.  In that case, only verify 4-byte alignment.\n*/\n#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC\n# define EIGHT_BYTE_ALIGNMENT(X)   ((((uptr)(X) - (uptr)0)&3)==0)\n#else\n# define EIGHT_BYTE_ALIGNMENT(X)   ((((uptr)(X) - (uptr)0)&7)==0)\n#endif\n\n/*\n** Disable MMAP on platforms where it is known to not work\n*/\n#if defined(__OpenBSD__) || defined(__QNXNTO__)\n# undef SQLITE_MAX_MMAP_SIZE\n# define SQLITE_MAX_MMAP_SIZE 0\n#endif\n\n/*\n** Default maximum size of memory used by memory-mapped I/O in the VFS\n*/\n#ifdef __APPLE__\n# include <TargetConditionals.h>\n#endif\n#ifndef SQLITE_MAX_MMAP_SIZE\n# if defined(__linux__) \\\n  || defined(_WIN32) \\\n  || (defined(__APPLE__) && defined(__MACH__)) \\\n  || defined(__sun) \\\n  || defined(__FreeBSD__) \\\n  || defined(__DragonFly__)\n#   define SQLITE_MAX_MMAP_SIZE 0x7fff0000  /* 2147418112 */\n# else\n#   define SQLITE_MAX_MMAP_SIZE 0\n# endif\n#endif\n\n/*\n** The default MMAP_SIZE is zero on all platforms.  Or, even if a larger\n** default MMAP_SIZE is specified at compile-time, make sure that it does\n** not exceed the maximum mmap size.\n*/\n#ifndef SQLITE_DEFAULT_MMAP_SIZE\n# define SQLITE_DEFAULT_MMAP_SIZE 0\n#endif\n#if SQLITE_DEFAULT_MMAP_SIZE>SQLITE_MAX_MMAP_SIZE\n# undef SQLITE_DEFAULT_MMAP_SIZE\n# define SQLITE_DEFAULT_MMAP_SIZE SQLITE_MAX_MMAP_SIZE\n#endif\n\n/*\n** TREETRACE_ENABLED will be either 1 or 0 depending on whether or not\n** the Abstract Syntax Tree tracing logic is turned on.\n*/\n#if !defined(SQLITE_AMALGAMATION)\nSQLITE_PRIVATE u32 sqlite3TreeTrace;\n#endif\n#if defined(SQLITE_DEBUG) \\\n    && (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_SELECTTRACE) \\\n                             || defined(SQLITE_ENABLE_TREETRACE))\n# define TREETRACE_ENABLED 1\n# define TREETRACE(K,P,S,X)  \\\n  if(sqlite3TreeTrace&(K))   \\\n    sqlite3DebugPrintf(\"%u/%d/%p: \",(S)->selId,(P)->addrExplain,(S)),\\\n    sqlite3DebugPrintf X\n#else\n# define TREETRACE(K,P,S,X)\n# define TREETRACE_ENABLED 0\n#endif\n\n/* TREETRACE flag meanings:\n**\n**   0x00000001     Beginning and end of SELECT processing\n**   0x00000002     WHERE clause processing\n**   0x00000004     Query flattener\n**   0x00000008     Result-set wildcard expansion\n**   0x00000010     Query name resolution\n**   0x00000020     Aggregate analysis\n**   0x00000040     Window functions\n**   0x00000080     Generated column names\n**   0x00000100     Move HAVING terms into WHERE\n**   0x00000200     Count-of-view optimization\n**   0x00000400     Compound SELECT processing\n**   0x00000800     Drop superfluous ORDER BY\n**   0x00001000     LEFT JOIN simplifies to JOIN\n**   0x00002000     Constant propagation\n**   0x00004000     Push-down optimization\n**   0x00008000     After all FROM-clause analysis\n**   0x00010000     Beginning of DELETE/INSERT/UPDATE processing\n**   0x00020000     Transform DISTINCT into GROUP BY\n**   0x00040000     SELECT tree dump after all code has been generated\n**   0x00080000     NOT NULL strength reduction\n**   0x00100000     Pointers are all shown as zero\n**   0x00200000     EXISTS-to-JOIN optimization\n*/\n\n/*\n** Macros for \"wheretrace\"\n*/\nSQLITE_PRIVATE u32 sqlite3WhereTrace;\n#if defined(SQLITE_DEBUG) \\\n    && (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_WHERETRACE))\n# define WHERETRACE(K,X)  if(sqlite3WhereTrace&(K)) sqlite3DebugPrintf X\n# define WHERETRACE_ENABLED 1\n#else\n# define WHERETRACE(K,X)\n#endif\n\n/*\n** Bits for the sqlite3WhereTrace mask:\n**\n** (---any--)   Top-level block structure\n** 0x-------F   High-level debug messages\n** 0x----FFF-   More detail\n** 0xFFFF----   Low-level debug messages\n**\n** 0x00000001   Code generation\n** 0x00000002   Solver (Use 0x40000 for less detail)\n** 0x00000004   Solver costs\n** 0x00000008   WhereLoop inserts\n**\n** 0x00000010   Display sqlite3_index_info xBestIndex calls\n** 0x00000020   Range an equality scan metrics\n** 0x00000040   IN operator decisions\n** 0x00000080   WhereLoop cost adjustments\n** 0x00000100\n** 0x00000200   Covering index decisions\n** 0x00000400   OR optimization\n** 0x00000800   Index scanner\n** 0x00001000   More details associated with code generation\n** 0x00002000\n** 0x00004000   Show all WHERE terms at key points\n** 0x00008000   Show the full SELECT statement at key places\n**\n** 0x00010000   Show more detail when printing WHERE terms\n** 0x00020000   Show WHERE terms returned from whereScanNext()\n** 0x00040000   Solver overview messages\n** 0x00080000   Star-query heuristic\n** 0x00100000   Pointers are all shown as zero\n*/\n\n\n/*\n** An instance of the following structure is used to store the busy-handler\n** callback for a given sqlite handle.\n**\n** The sqlite.busyHandler member of the sqlite struct contains the busy\n** callback for the database handle. Each pager opened via the sqlite\n** handle is passed a pointer to sqlite.busyHandler. The busy-handler\n** callback is currently invoked only from within pager.c.\n*/\ntypedef struct BusyHandler BusyHandler;\nstruct BusyHandler {\n  int (*xBusyHandler)(void *,int);  /* The busy callback */\n  void *pBusyArg;                   /* First arg to busy callback */\n  int nBusy;                        /* Incremented with each busy call */\n};\n\n/*\n** Name of table that holds the database schema.\n**\n** The PREFERRED names are used wherever possible.  But LEGACY is also\n** used for backwards compatibility.\n**\n**  1.  Queries can use either the PREFERRED or the LEGACY names\n**  2.  The sqlite3_set_authorizer() callback uses the LEGACY name\n**  3.  The PRAGMA table_list statement uses the PREFERRED name\n**\n** The LEGACY names are stored in the internal symbol hash table\n** in support of (2).  Names are translated using sqlite3PreferredTableName()\n** for (3).  The sqlite3FindTable() function takes care of translating\n** names for (1).\n**\n** Note that \"sqlite_temp_schema\" can also be called \"temp.sqlite_schema\".\n*/\n#define LEGACY_SCHEMA_TABLE          \"sqlite_master\"\n#define LEGACY_TEMP_SCHEMA_TABLE     \"sqlite_temp_master\"\n#define PREFERRED_SCHEMA_TABLE       \"sqlite_schema\"\n#define PREFERRED_TEMP_SCHEMA_TABLE  \"sqlite_temp_schema\"\n\n\n/*\n** The root-page of the schema table.\n*/\n#define SCHEMA_ROOT    1\n\n/*\n** The name of the schema table.  The name is different for TEMP.\n*/\n#define SCHEMA_TABLE(x) \\\n    ((!OMIT_TEMPDB)&&(x==1)?LEGACY_TEMP_SCHEMA_TABLE:LEGACY_SCHEMA_TABLE)\n\n/*\n** A convenience macro that returns the number of elements in\n** an array.\n*/\n#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))\n\n/*\n** Determine if the argument is a power of two\n*/\n#define IsPowerOfTwo(X) (((X)&((X)-1))==0)\n\n/*\n** The following value as a destructor means to use sqlite3DbFree().\n** The sqlite3DbFree() routine requires two parameters instead of the\n** one parameter that destructors normally want.  So we have to introduce\n** this magic value that the code knows to handle differently.  Any\n** pointer will work here as long as it is distinct from SQLITE_STATIC\n** and SQLITE_TRANSIENT.\n*/\n#define SQLITE_DYNAMIC   ((sqlite3_destructor_type)sqlite3RowSetClear)\n\n/*\n** When SQLITE_OMIT_WSD is defined, it means that the target platform does\n** not support Writable Static Data (WSD) such as global and static variables.\n** All variables must either be on the stack or dynamically allocated from\n** the heap.  When WSD is unsupported, the variable declarations scattered\n** throughout the SQLite code must become constants instead.  The SQLITE_WSD\n** macro is used for this purpose.  And instead of referencing the variable\n** directly, we use its constant as a key to lookup the run-time allocated\n** buffer that holds real variable.  The constant is also the initializer\n** for the run-time allocated buffer.\n**\n** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL\n** macros become no-ops and have zero performance impact.\n*/\n#ifdef SQLITE_OMIT_WSD\n  #define SQLITE_WSD const\n  #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))\n  #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)\nSQLITE_API int sqlite3_wsd_init(int N, int J);\nSQLITE_API void *sqlite3_wsd_find(void *K, int L);\n#else\n  #define SQLITE_WSD\n  #define GLOBAL(t,v) v\n  #define sqlite3GlobalConfig sqlite3Config\n#endif\n\n/*\n** The following macros are used to suppress compiler warnings and to\n** make it clear to human readers when a function parameter is deliberately\n** left unused within the body of a function. This usually happens when\n** a function is called via a function pointer. For example the\n** implementation of an SQL aggregate step callback may not use the\n** parameter indicating the number of arguments passed to the aggregate,\n** if it knows that this is enforced elsewhere.\n**\n** When a function parameter is not used at all within the body of a function,\n** it is generally named \"NotUsed\" or \"NotUsed2\" to make things even clearer.\n** However, these macros may also be used to suppress warnings related to\n** parameters that may or may not be used depending on compilation options.\n** For example those parameters only used in assert() statements. In these\n** cases the parameters are named as per the usual conventions.\n*/\n#define UNUSED_PARAMETER(x) (void)(x)\n#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y)\n\n/*\n** Forward references to structures\n*/\ntypedef struct AggInfo AggInfo;\ntypedef struct AuthContext AuthContext;\ntypedef struct AutoincInfo AutoincInfo;\ntypedef struct Bitvec Bitvec;\ntypedef struct CollSeq CollSeq;\ntypedef struct Column Column;\ntypedef struct Cte Cte;\ntypedef struct CteUse CteUse;\ntypedef struct Db Db;\ntypedef struct DbClientData DbClientData;\ntypedef struct DbFixer DbFixer;\ntypedef struct Schema Schema;\ntypedef struct Expr Expr;\ntypedef struct ExprList ExprList;\ntypedef struct FKey FKey;\ntypedef struct FpDecode FpDecode;\ntypedef struct FuncDestructor FuncDestructor;\ntypedef struct FuncDef FuncDef;\ntypedef struct FuncDefHash FuncDefHash;\ntypedef struct IdList IdList;\ntypedef struct Index Index;\ntypedef struct IndexedExpr IndexedExpr;\ntypedef struct IndexSample IndexSample;\ntypedef struct KeyClass KeyClass;\ntypedef struct KeyInfo KeyInfo;\ntypedef struct Lookaside Lookaside;\ntypedef struct LookasideSlot LookasideSlot;\ntypedef struct Module Module;\ntypedef struct NameContext NameContext;\ntypedef struct OnOrUsing OnOrUsing;\ntypedef struct Parse Parse;\ntypedef struct ParseCleanup ParseCleanup;\ntypedef struct PreUpdate PreUpdate;\ntypedef struct PrintfArguments PrintfArguments;\ntypedef struct RCStr RCStr;\ntypedef struct RenameToken RenameToken;\ntypedef struct Returning Returning;\ntypedef struct RowSet RowSet;\ntypedef struct Savepoint Savepoint;\ntypedef struct Select Select;\ntypedef struct SQLiteThread SQLiteThread;\ntypedef struct SelectDest SelectDest;\ntypedef struct Subquery Subquery;\ntypedef struct SrcItem SrcItem;\ntypedef struct SrcList SrcList;\ntypedef struct sqlite3_str StrAccum; /* Internal alias for sqlite3_str */\ntypedef struct Table Table;\ntypedef struct TableLock TableLock;\ntypedef struct Token Token;\ntypedef struct TreeView TreeView;\ntypedef struct Trigger Trigger;\ntypedef struct TriggerPrg TriggerPrg;\ntypedef struct TriggerStep TriggerStep;\ntypedef struct UnpackedRecord UnpackedRecord;\ntypedef struct Upsert Upsert;\ntypedef struct VTable VTable;\ntypedef struct VtabCtx VtabCtx;\ntypedef struct Walker Walker;\ntypedef struct WhereInfo WhereInfo;\ntypedef struct Window Window;\ntypedef struct With With;\n\n\n/*\n** The bitmask datatype defined below is used for various optimizations.\n**\n** Changing this from a 64-bit to a 32-bit type limits the number of\n** tables in a join to 32 instead of 64.  But it also reduces the size\n** of the library by 738 bytes on ix86.\n*/\n#ifdef SQLITE_BITMASK_TYPE\n  typedef SQLITE_BITMASK_TYPE Bitmask;\n#else\n  typedef u64 Bitmask;\n#endif\n\n/*\n** The number of bits in a Bitmask.  \"BMS\" means \"BitMask Size\".\n*/\n#define BMS  ((int)(sizeof(Bitmask)*8))\n\n/*\n** A bit in a Bitmask\n*/\n#define MASKBIT(n)    (((Bitmask)1)<<(n))\n#define MASKBIT64(n)  (((u64)1)<<(n))\n#define MASKBIT32(n)  (((unsigned int)1)<<(n))\n#define SMASKBIT32(n) ((n)<=31?((unsigned int)1)<<(n):0)\n#define ALLBITS       ((Bitmask)-1)\n#define TOPBIT        (((Bitmask)1)<<(BMS-1))\n\n/* A VList object records a mapping between parameters/variables/wildcards\n** in the SQL statement (such as $abc, @pqr, or :xyz) and the integer\n** variable number associated with that parameter.  See the format description\n** on the sqlite3VListAdd() routine for more information.  A VList is really\n** just an array of integers.\n*/\ntypedef int VList;\n\n/*\n** Defer sourcing vdbe.h and btree.h until after the \"u8\" and\n** \"BusyHandler\" typedefs. vdbe.h also requires a few of the opaque\n** pointer types (i.e. FuncDef) defined above.\n*/\n/************** Include os.h in the middle of sqliteInt.h ********************/\n/************** Begin file os.h **********************************************/\n/*\n** 2001 September 16\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This header file (together with is companion C source-code file\n** \"os.c\") attempt to abstract the underlying operating system so that\n** the SQLite library will work on both POSIX and windows systems.\n**\n** This header file is #include-ed by sqliteInt.h and thus ends up\n** being included by every source file.\n*/\n#ifndef _SQLITE_OS_H_\n#define _SQLITE_OS_H_\n\n/*\n** Attempt to automatically detect the operating system and setup the\n** necessary pre-processor macros for it.\n*/\n/************** Include os_setup.h in the middle of os.h *********************/\n/************** Begin file os_setup.h ****************************************/\n/*\n** 2013 November 25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains pre-processor directives related to operating system\n** detection and/or setup.\n*/\n#ifndef SQLITE_OS_SETUP_H\n#define SQLITE_OS_SETUP_H\n\n/*\n** Figure out if we are dealing with Unix, Windows, or some other operating\n** system.\n**\n** After the following block of preprocess macros, all of\n**\n**    SQLITE_OS_KV\n**    SQLITE_OS_OTHER\n**    SQLITE_OS_UNIX\n**    SQLITE_OS_WIN\n**\n** will defined to either 1 or 0. One of them will be 1. The others will be 0.\n** If none of the macros are initially defined, then select either\n** SQLITE_OS_UNIX or SQLITE_OS_WIN depending on the target platform.\n**\n** If SQLITE_OS_OTHER=1 is specified at compile-time, then the application\n** must provide its own VFS implementation together with sqlite3_os_init()\n** and sqlite3_os_end() routines.\n*/\n#if SQLITE_OS_KV+1<=1  && SQLITE_OS_OTHER+1<=1 &&  \\\n    SQLITE_OS_WIN+1<=1 && SQLITE_OS_UNIX+1<=1\n#  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \\\n          defined(__MINGW32__) || defined(__BORLANDC__)\n#    define SQLITE_OS_WIN 1\n#    define SQLITE_OS_UNIX 0\n#  else\n#    define SQLITE_OS_WIN 0\n#    define SQLITE_OS_UNIX 1\n#  endif\n#endif\n#if SQLITE_OS_OTHER+1>1\n#  undef SQLITE_OS_KV\n#  define SQLITE_OS_KV 0\n#  undef SQLITE_OS_UNIX\n#  define SQLITE_OS_UNIX 0\n#  undef SQLITE_OS_WIN\n#  define SQLITE_OS_WIN 0\n#endif\n#if SQLITE_OS_KV+1>1\n#  undef SQLITE_OS_OTHER\n#  define SQLITE_OS_OTHER 0\n#  undef SQLITE_OS_UNIX\n#  define SQLITE_OS_UNIX 0\n#  undef SQLITE_OS_WIN\n#  define SQLITE_OS_WIN 0\n#  define SQLITE_OMIT_LOAD_EXTENSION 1\n#  define SQLITE_OMIT_WAL 1\n#  define SQLITE_OMIT_DEPRECATED 1\n#  undef SQLITE_TEMP_STORE\n#  define SQLITE_TEMP_STORE 3  /* Always use memory for temporary storage */\n#  define SQLITE_DQS 0\n#  define SQLITE_OMIT_SHARED_CACHE 1\n#  define SQLITE_OMIT_AUTOINIT 1\n#endif\n#if SQLITE_OS_UNIX+1>1\n#  undef SQLITE_OS_KV\n#  define SQLITE_OS_KV 0\n#  undef SQLITE_OS_OTHER\n#  define SQLITE_OS_OTHER 0\n#  undef SQLITE_OS_WIN\n#  define SQLITE_OS_WIN 0\n#endif\n#if SQLITE_OS_WIN+1>1\n#  undef SQLITE_OS_KV\n#  define SQLITE_OS_KV 0\n#  undef SQLITE_OS_OTHER\n#  define SQLITE_OS_OTHER 0\n#  undef SQLITE_OS_UNIX\n#  define SQLITE_OS_UNIX 0\n#endif\n\n\n#endif /* SQLITE_OS_SETUP_H */\n\n/************** End of os_setup.h ********************************************/\n/************** Continuing where we left off in os.h *************************/\n\n/* If the SET_FULLSYNC macro is not defined above, then make it\n** a no-op\n*/\n#ifndef SET_FULLSYNC\n# define SET_FULLSYNC(x,y)\n#endif\n\n/* Maximum pathname length.  Note: FILENAME_MAX defined by stdio.h\n*/\n#ifndef SQLITE_MAX_PATHLEN\n# define SQLITE_MAX_PATHLEN FILENAME_MAX\n#endif\n\n/* Maximum number of symlinks that will be resolved while trying to\n** expand a filename in xFullPathname() in the VFS.\n*/\n#ifndef SQLITE_MAX_SYMLINK\n# define SQLITE_MAX_SYMLINK 200\n#endif\n\n/*\n** The default size of a disk sector\n*/\n#ifndef SQLITE_DEFAULT_SECTOR_SIZE\n# define SQLITE_DEFAULT_SECTOR_SIZE 4096\n#endif\n\n/*\n** Temporary files are named starting with this prefix followed by 16 random\n** alphanumeric characters, and no file extension. They are stored in the\n** OS's standard temporary file directory, and are deleted prior to exit.\n** If sqlite is being embedded in another program, you may wish to change the\n** prefix to reflect your program's name, so that if your program exits\n** prematurely, old temporary files can be easily identified. This can be done\n** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line.\n**\n** 2006-10-31:  The default prefix used to be \"sqlite_\".  But then\n** Mcafee started using SQLite in their anti-virus product and it\n** started putting files with the \"sqlite\" name in the c:/temp folder.\n** This annoyed many windows users.  Those users would then do a\n** Google search for \"sqlite\", find the telephone numbers of the\n** developers and call to wake them up at night and complain.\n** For this reason, the default name prefix is changed to be \"sqlite\"\n** spelled backwards.  So the temp files are still identified, but\n** anybody smart enough to figure out the code is also likely smart\n** enough to know that calling the developer will not help get rid\n** of the file.\n*/\n#ifndef SQLITE_TEMP_FILE_PREFIX\n# define SQLITE_TEMP_FILE_PREFIX \"etilqs_\"\n#endif\n\n/*\n** The following values may be passed as the second argument to\n** sqlite3OsLock(). The various locks exhibit the following semantics:\n**\n** SHARED:    Any number of processes may hold a SHARED lock simultaneously.\n** RESERVED:  A single process may hold a RESERVED lock on a file at\n**            any time. Other processes may hold and obtain new SHARED locks.\n** PENDING:   A single process may hold a PENDING lock on a file at\n**            any one time. Existing SHARED locks may persist, but no new\n**            SHARED locks may be obtained by other processes.\n** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.\n**\n** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a\n** process that requests an EXCLUSIVE lock may actually obtain a PENDING\n** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to\n** sqlite3OsLock().\n*/\n#define NO_LOCK         0\n#define SHARED_LOCK     1\n#define RESERVED_LOCK   2\n#define PENDING_LOCK    3\n#define EXCLUSIVE_LOCK  4\n\n/*\n** File Locking Notes:  (Mostly about windows but also some info for Unix)\n**\n** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because\n** those functions are not available.  So we use only LockFile() and\n** UnlockFile().\n**\n** LockFile() prevents not just writing but also reading by other processes.\n** A SHARED_LOCK is obtained by locking a single randomly-chosen\n** byte out of a specific range of bytes. The lock byte is obtained at\n** random so two separate readers can probably access the file at the\n** same time, unless they are unlucky and choose the same lock byte.\n** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.\n** There can only be one writer.  A RESERVED_LOCK is obtained by locking\n** a single byte of the file that is designated as the reserved lock byte.\n** A PENDING_LOCK is obtained by locking a designated byte different from\n** the RESERVED_LOCK byte.\n**\n** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available,\n** which means we can use reader/writer locks.  When reader/writer locks\n** are used, the lock is placed on the same range of bytes that is used\n** for probabilistic locking in Win95/98/ME.  Hence, the locking scheme\n** will support two or more Win95 readers or two or more WinNT readers.\n** But a single Win95 reader will lock out all WinNT readers and a single\n** WinNT reader will lock out all other Win95 readers.\n**\n** The following #defines specify the range of bytes used for locking.\n** SHARED_SIZE is the number of bytes available in the pool from which\n** a random byte is selected for a shared lock.  The pool of bytes for\n** shared locks begins at SHARED_FIRST.\n**\n** The same locking strategy and\n** byte ranges are used for Unix.  This leaves open the possibility of having\n** clients on win95, winNT, and unix all talking to the same shared file\n** and all locking correctly.  To do so would require that samba (or whatever\n** tool is being used for file sharing) implements locks correctly between\n** windows and unix.  I'm guessing that isn't likely to happen, but by\n** using the same locking range we are at least open to the possibility.\n**\n** Locking in windows is manditory.  For this reason, we cannot store\n** actual data in the bytes used for locking.  The pager never allocates\n** the pages involved in locking therefore.  SHARED_SIZE is selected so\n** that all locks will fit on a single page even at the minimum page size.\n** PENDING_BYTE defines the beginning of the locks.  By default PENDING_BYTE\n** is set high so that we don't have to allocate an unused page except\n** for very large databases.  But one should test the page skipping logic\n** by setting PENDING_BYTE low and running the entire regression suite.\n**\n** Changing the value of PENDING_BYTE results in a subtly incompatible\n** file format.  Depending on how it is changed, you might not notice\n** the incompatibility right away, even running a full regression test.\n** The default location of PENDING_BYTE is the first byte past the\n** 1GB boundary.\n**\n*/\n#ifdef SQLITE_OMIT_WSD\n# define PENDING_BYTE     (0x40000000)\n#else\n# define PENDING_BYTE      sqlite3PendingByte\n#endif\n#define RESERVED_BYTE     (PENDING_BYTE+1)\n#define SHARED_FIRST      (PENDING_BYTE+2)\n#define SHARED_SIZE       510\n\n/*\n** Wrapper around OS specific sqlite3_os_init() function.\n*/\nSQLITE_PRIVATE int sqlite3OsInit(void);\n\n/*\n** Functions for accessing sqlite3_file methods\n*/\nSQLITE_PRIVATE void sqlite3OsClose(sqlite3_file*);\nSQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);\nSQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);\nSQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);\nSQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);\nSQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);\nSQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);\nSQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);\nSQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);\nSQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);\nSQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file*,int,void*);\n#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0\nSQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);\nSQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);\nSQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int);\nSQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id);\nSQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int);\n#endif /* SQLITE_OMIT_WAL */\nSQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64, int, void **);\nSQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *, i64, void *);\n\n\n/*\n** Functions for accessing sqlite3_vfs methods\n*/\nSQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);\nSQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int);\nSQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut);\nSQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\nSQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);\nSQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *);\nSQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void);\nSQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *);\n#endif /* SQLITE_OMIT_LOAD_EXTENSION */\nSQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *);\nSQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int);\nSQLITE_PRIVATE int sqlite3OsGetLastError(sqlite3_vfs*);\nSQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*);\n\n/*\n** Convenience functions for opening and closing files using\n** sqlite3_malloc() to obtain space for the file-handle structure.\n*/\nSQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);\nSQLITE_PRIVATE void sqlite3OsCloseFree(sqlite3_file *);\n\n#endif /* _SQLITE_OS_H_ */\n\n/************** End of os.h **************************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include pager.h in the middle of sqliteInt.h *****************/\n/************** Begin file pager.h *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface that the sqlite page cache\n** subsystem.  The page cache subsystem reads and writes a file a page\n** at a time and provides a journal for rollback.\n*/\n\n#ifndef SQLITE_PAGER_H\n#define SQLITE_PAGER_H\n\n/*\n** Default maximum size for persistent journal files. A negative\n** value means no limit. This value may be overridden using the\n** sqlite3PagerJournalSizeLimit() API. See also \"PRAGMA journal_size_limit\".\n*/\n#ifndef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT\n  #define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1\n#endif\n\n/*\n** The type used to represent a page number.  The first page in a file\n** is called page 1.  0 is used to represent \"not a page\".\n*/\ntypedef u32 Pgno;\n\n/*\n** Each open file is managed by a separate instance of the \"Pager\" structure.\n*/\ntypedef struct Pager Pager;\n\n/*\n** Handle type for pages.\n*/\ntypedef struct PgHdr DbPage;\n\n/*\n** Page number PAGER_SJ_PGNO is never used in an SQLite database (it is\n** reserved for working around a windows/posix incompatibility). It is\n** used in the journal to signify that the remainder of the journal file\n** is devoted to storing a super-journal name - there are no more pages to\n** roll back. See comments for function writeSuperJournal() in pager.c\n** for details.\n*/\n#define PAGER_SJ_PGNO_COMPUTED(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))\n#define PAGER_SJ_PGNO(x)          ((x)->lckPgno)\n\n/*\n** Allowed values for the flags parameter to sqlite3PagerOpen().\n**\n** NOTE: These values must match the corresponding BTREE_ values in btree.h.\n*/\n#define PAGER_OMIT_JOURNAL  0x0001    /* Do not use a rollback journal */\n#define PAGER_MEMORY        0x0002    /* In-memory database */\n\n/*\n** Valid values for the second argument to sqlite3PagerLockingMode().\n*/\n#define PAGER_LOCKINGMODE_QUERY      -1\n#define PAGER_LOCKINGMODE_NORMAL      0\n#define PAGER_LOCKINGMODE_EXCLUSIVE   1\n\n/*\n** Numeric constants that encode the journalmode.\n**\n** The numeric values encoded here (other than PAGER_JOURNALMODE_QUERY)\n** are exposed in the API via the \"PRAGMA journal_mode\" command and\n** therefore cannot be changed without a compatibility break.\n*/\n#define PAGER_JOURNALMODE_QUERY     (-1)  /* Query the value of journalmode */\n#define PAGER_JOURNALMODE_DELETE      0   /* Commit by deleting journal file */\n#define PAGER_JOURNALMODE_PERSIST     1   /* Commit by zeroing journal header */\n#define PAGER_JOURNALMODE_OFF         2   /* Journal omitted.  */\n#define PAGER_JOURNALMODE_TRUNCATE    3   /* Commit by truncating journal */\n#define PAGER_JOURNALMODE_MEMORY      4   /* In-memory journal file */\n#define PAGER_JOURNALMODE_WAL         5   /* Use write-ahead logging */\n\n#define isWalMode(x) ((x)==PAGER_JOURNALMODE_WAL)\n\n/*\n** The argument to this macro is a file descriptor (type sqlite3_file*).\n** Return 0 if it is not open, or non-zero (but not 1) if it is.\n**\n** This is so that expressions can be written as:\n**\n**   if( isOpen(pPager->jfd) ){ ...\n**\n** instead of\n**\n**   if( pPager->jfd->pMethods ){ ...\n*/\n#define isOpen(pFd) ((pFd)->pMethods!=0)\n\n/*\n** Flags that make up the mask passed to sqlite3PagerGet().\n*/\n#define PAGER_GET_NOCONTENT     0x01  /* Do not load data from disk */\n#define PAGER_GET_READONLY      0x02  /* Read-only page is acceptable */\n\n/*\n** Flags for sqlite3PagerSetFlags()\n**\n** Value constraints (enforced via assert()):\n**    PAGER_FULLFSYNC      == SQLITE_FullFSync\n**    PAGER_CKPT_FULLFSYNC == SQLITE_CkptFullFSync\n**    PAGER_CACHE_SPILL    == SQLITE_CacheSpill\n*/\n#define PAGER_SYNCHRONOUS_OFF       0x01  /* PRAGMA synchronous=OFF */\n#define PAGER_SYNCHRONOUS_NORMAL    0x02  /* PRAGMA synchronous=NORMAL */\n#define PAGER_SYNCHRONOUS_FULL      0x03  /* PRAGMA synchronous=FULL */\n#define PAGER_SYNCHRONOUS_EXTRA     0x04  /* PRAGMA synchronous=EXTRA */\n#define PAGER_SYNCHRONOUS_MASK      0x07  /* Mask for four values above */\n#define PAGER_FULLFSYNC             0x08  /* PRAGMA fullfsync=ON */\n#define PAGER_CKPT_FULLFSYNC        0x10  /* PRAGMA checkpoint_fullfsync=ON */\n#define PAGER_CACHESPILL            0x20  /* PRAGMA cache_spill=ON */\n#define PAGER_FLAGS_MASK            0x38  /* All above except SYNCHRONOUS */\n\n/*\n** The remainder of this file contains the declarations of the functions\n** that make up the Pager sub-system API. See source code comments for\n** a detailed description of each routine.\n*/\n\n/* Open and close a Pager connection. */\nSQLITE_PRIVATE int sqlite3PagerOpen(\n  sqlite3_vfs*,\n  Pager **ppPager,\n  const char*,\n  int,\n  int,\n  int,\n  void(*)(DbPage*)\n);\nSQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager, sqlite3*);\nSQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);\n\n/* Functions used to configure a Pager object. */\nSQLITE_PRIVATE void sqlite3PagerSetBusyHandler(Pager*, int(*)(void *), void *);\nSQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);\nSQLITE_PRIVATE Pgno sqlite3PagerMaxPageCount(Pager*, Pgno);\nSQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int);\nSQLITE_PRIVATE int sqlite3PagerSetSpillsize(Pager*, int);\nSQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *, sqlite3_int64);\nSQLITE_PRIVATE void sqlite3PagerShrink(Pager*);\nSQLITE_PRIVATE void sqlite3PagerSetFlags(Pager*,unsigned);\nSQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int);\nSQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *, int);\nSQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager*);\nSQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager*);\nSQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64);\nSQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*);\nSQLITE_PRIVATE int sqlite3PagerFlush(Pager*);\n\n/* Functions used to obtain and release page references. */\nSQLITE_PRIVATE int sqlite3PagerGet(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);\nSQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);\nSQLITE_PRIVATE void sqlite3PagerRef(DbPage*);\nSQLITE_PRIVATE void sqlite3PagerUnref(DbPage*);\nSQLITE_PRIVATE void sqlite3PagerUnrefNotNull(DbPage*);\nSQLITE_PRIVATE void sqlite3PagerUnrefPageOne(DbPage*);\n\n/* Operations on page references. */\nSQLITE_PRIVATE int sqlite3PagerWrite(DbPage*);\nSQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*);\nSQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);\nSQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*);\nSQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *);\nSQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *);\n\n/* Functions used to manage pager transactions and savepoints. */\nSQLITE_PRIVATE void sqlite3PagerPagecount(Pager*, int*);\nSQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int);\nSQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zSuper, int);\nSQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager*);\nSQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager, const char *zSuper);\nSQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*);\nSQLITE_PRIVATE int sqlite3PagerRollback(Pager*);\nSQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n);\nSQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);\nSQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager);\n\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE   int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*);\nSQLITE_PRIVATE   int sqlite3PagerWalSupported(Pager *pPager);\nSQLITE_PRIVATE   int sqlite3PagerWalCallback(Pager *pPager);\nSQLITE_PRIVATE   int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);\nSQLITE_PRIVATE   int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);\n# ifdef SQLITE_ENABLE_SNAPSHOT\nSQLITE_PRIVATE   int sqlite3PagerSnapshotGet(Pager*, sqlite3_snapshot **ppSnapshot);\nSQLITE_PRIVATE   int sqlite3PagerSnapshotOpen(Pager*, sqlite3_snapshot *pSnapshot);\nSQLITE_PRIVATE   int sqlite3PagerSnapshotRecover(Pager *pPager);\nSQLITE_PRIVATE   int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot);\nSQLITE_PRIVATE   void sqlite3PagerSnapshotUnlock(Pager *pPager);\n# endif\n#endif\n\n#if !defined(SQLITE_OMIT_WAL) && defined(SQLITE_ENABLE_SETLK_TIMEOUT)\nSQLITE_PRIVATE   int sqlite3PagerWalWriteLock(Pager*, int);\nSQLITE_PRIVATE   void sqlite3PagerWalDb(Pager*, sqlite3*);\n#else\n# define sqlite3PagerWalWriteLock(y,z) SQLITE_OK\n# define sqlite3PagerWalDb(x,y)\n#endif\n\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\nSQLITE_PRIVATE   int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno);\n#endif\n\n#ifdef SQLITE_ENABLE_ZIPVFS\nSQLITE_PRIVATE   int sqlite3PagerWalFramesize(Pager *pPager);\n#endif\n\n/* Functions used to query pager state and configuration. */\nSQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*);\nSQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   int sqlite3PagerRefcount(Pager*);\n#endif\nSQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*);\nSQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager*, int);\nSQLITE_PRIVATE sqlite3_vfs *sqlite3PagerVfs(Pager*);\nSQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);\nSQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);\nSQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);\nSQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);\nSQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);\nSQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, u64*);\nSQLITE_PRIVATE void sqlite3PagerClearCache(Pager*);\nSQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);\n\n/* Functions used to truncate the database file. */\nSQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);\n\nSQLITE_PRIVATE void sqlite3PagerRekey(DbPage*, Pgno, u16);\n\n/* Functions to support testing and debugging. */\n#if !defined(NDEBUG) || defined(SQLITE_TEST)\nSQLITE_PRIVATE   Pgno sqlite3PagerPagenumber(DbPage*);\nSQLITE_PRIVATE   int sqlite3PagerIswriteable(DbPage*);\n#endif\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE   int *sqlite3PagerStats(Pager*);\nSQLITE_PRIVATE   void sqlite3PagerRefdump(Pager*);\n  void disable_simulated_io_errors(void);\n  void enable_simulated_io_errors(void);\n#else\n# define disable_simulated_io_errors()\n# define enable_simulated_io_errors()\n#endif\n\n#if defined(SQLITE_USE_SEH) && !defined(SQLITE_OMIT_WAL)\nSQLITE_PRIVATE int sqlite3PagerWalSystemErrno(Pager*);\n#endif\n\n#endif /* SQLITE_PAGER_H */\n\n/************** End of pager.h ***********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include btree.h in the middle of sqliteInt.h *****************/\n/************** Begin file btree.h *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface that the sqlite B-Tree file\n** subsystem.  See comments in the source code for a detailed description\n** of what each interface routine does.\n*/\n#ifndef SQLITE_BTREE_H\n#define SQLITE_BTREE_H\n\n/* TODO: This definition is just included so other modules compile. It\n** needs to be revisited.\n*/\n#define SQLITE_N_BTREE_META 16\n\n/*\n** If defined as non-zero, auto-vacuum is enabled by default. Otherwise\n** it must be turned on for each database using \"PRAGMA auto_vacuum = 1\".\n*/\n#ifndef SQLITE_DEFAULT_AUTOVACUUM\n  #define SQLITE_DEFAULT_AUTOVACUUM 0\n#endif\n\n#define BTREE_AUTOVACUUM_NONE 0        /* Do not do auto-vacuum */\n#define BTREE_AUTOVACUUM_FULL 1        /* Do full auto-vacuum */\n#define BTREE_AUTOVACUUM_INCR 2        /* Incremental vacuum */\n\n/*\n** Forward declarations of structure\n*/\ntypedef struct Btree Btree;\ntypedef struct BtCursor BtCursor;\ntypedef struct BtShared BtShared;\ntypedef struct BtreePayload BtreePayload;\n\n\nSQLITE_PRIVATE int sqlite3BtreeOpen(\n  sqlite3_vfs *pVfs,       /* VFS to use with this b-tree */\n  const char *zFilename,   /* Name of database file to open */\n  sqlite3 *db,             /* Associated database connection */\n  Btree **ppBtree,         /* Return open Btree* here */\n  int flags,               /* Flags */\n  int vfsFlags             /* Flags passed through to VFS open */\n);\n\n/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the\n** following values.\n**\n** NOTE:  These values must match the corresponding PAGER_ values in\n** pager.h.\n*/\n#define BTREE_OMIT_JOURNAL  1  /* Do not create or use a rollback journal */\n#define BTREE_MEMORY        2  /* This is an in-memory DB */\n#define BTREE_SINGLE        4  /* The file contains at most 1 b-tree */\n#define BTREE_UNORDERED     8  /* Use of a hash implementation is OK */\n\nSQLITE_PRIVATE int sqlite3BtreeClose(Btree*);\nSQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);\nSQLITE_PRIVATE int sqlite3BtreeSetSpillSize(Btree*,int);\n#if SQLITE_MAX_MMAP_SIZE>0\nSQLITE_PRIVATE   int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);\n#endif\nSQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);\nSQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);\nSQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);\nSQLITE_PRIVATE Pgno sqlite3BtreeMaxPageCount(Btree*,Pgno);\nSQLITE_PRIVATE Pgno sqlite3BtreeLastPage(Btree*);\nSQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);\nSQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree*);\nSQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p);\nSQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);\nSQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);\nSQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int,int*);\nSQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char*);\nSQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int);\nSQLITE_PRIVATE int sqlite3BtreeCommit(Btree*);\nSQLITE_PRIVATE int sqlite3BtreeRollback(Btree*,int,int);\nSQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int);\nSQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, Pgno*, int flags);\nSQLITE_PRIVATE int sqlite3BtreeTxnState(Btree*);\nSQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*);\n\nSQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *));\nSQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);\n#ifndef SQLITE_OMIT_SHARED_CACHE\nSQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);\n#endif\n\n/* Savepoints are named, nestable SQL transactions mostly implemented */\n/* in vdbe.c and pager.c See https://sqlite.org/lang_savepoint.html */\nSQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int);\n\n/* \"Checkpoint\" only refers to WAL. See https://sqlite.org/wal.html#ckpt */\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE   int sqlite3BtreeCheckpoint(Btree*, int, int *, int *);\n#endif\n\nSQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);\nSQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *);\nSQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *);\n\nSQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);\n\n/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR\n** of the flags shown below.\n**\n** Every SQLite table must have either BTREE_INTKEY or BTREE_BLOBKEY set.\n** With BTREE_INTKEY, the table key is a 64-bit integer and arbitrary data\n** is stored in the leaves.  (BTREE_INTKEY is used for SQL tables.)  With\n** BTREE_BLOBKEY, the key is an arbitrary BLOB and no content is stored\n** anywhere - the key is the content.  (BTREE_BLOBKEY is used for SQL\n** indices.)\n*/\n#define BTREE_INTKEY     1    /* Table has only 64-bit signed integer keys */\n#define BTREE_BLOBKEY    2    /* Table has keys only - no data */\n\nSQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*);\nSQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, i64*);\nSQLITE_PRIVATE int sqlite3BtreeClearTableOfCursor(BtCursor*);\nSQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree*, int, int);\n\nSQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);\nSQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);\n\nSQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);\n\n/*\n** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta\n** should be one of the following values. The integer values are assigned\n** to constants so that the offset of the corresponding field in an\n** SQLite database header may be found using the following formula:\n**\n**   offset = 36 + (idx * 4)\n**\n** For example, the free-page-count field is located at byte offset 36 of\n** the database file header. The incr-vacuum-flag field is located at\n** byte offset 64 (== 36+4*7).\n**\n** The BTREE_DATA_VERSION value is not really a value stored in the header.\n** It is a read-only number computed by the pager.  But we merge it with\n** the header value access routines since its access pattern is the same.\n** Call it a \"virtual meta value\".\n*/\n#define BTREE_FREE_PAGE_COUNT     0\n#define BTREE_SCHEMA_VERSION      1\n#define BTREE_FILE_FORMAT         2\n#define BTREE_DEFAULT_CACHE_SIZE  3\n#define BTREE_LARGEST_ROOT_PAGE   4\n#define BTREE_TEXT_ENCODING       5\n#define BTREE_USER_VERSION        6\n#define BTREE_INCR_VACUUM         7\n#define BTREE_APPLICATION_ID      8\n#define BTREE_DATA_VERSION        15  /* A virtual meta-value */\n\n/*\n** Kinds of hints that can be passed into the sqlite3BtreeCursorHint()\n** interface.\n**\n** BTREE_HINT_RANGE  (arguments: Expr*, Mem*)\n**\n**     The first argument is an Expr* (which is guaranteed to be constant for\n**     the lifetime of the cursor) that defines constraints on which rows\n**     might be fetched with this cursor.  The Expr* tree may contain\n**     TK_REGISTER nodes that refer to values stored in the array of registers\n**     passed as the second parameter.  In other words, if Expr.op==TK_REGISTER\n**     then the value of the node is the value in Mem[pExpr.iTable].  Any\n**     TK_COLUMN node in the expression tree refers to the Expr.iColumn-th\n**     column of the b-tree of the cursor.  The Expr tree will not contain\n**     any function calls nor subqueries nor references to b-trees other than\n**     the cursor being hinted.\n**\n**     The design of the _RANGE hint is aid b-tree implementations that try\n**     to prefetch content from remote machines - to provide those\n**     implementations with limits on what needs to be prefetched and thereby\n**     reduce network bandwidth.\n**\n** Note that BTREE_HINT_FLAGS with BTREE_BULKLOAD is the only hint used by\n** standard SQLite.  The other hints are provided for extensions that use\n** the SQLite parser and code generator but substitute their own storage\n** engine.\n*/\n#define BTREE_HINT_RANGE 0       /* Range constraints on queries */\n\n/*\n** Values that may be OR'd together to form the argument to the\n** BTREE_HINT_FLAGS hint for sqlite3BtreeCursorHint():\n**\n** The BTREE_BULKLOAD flag is set on index cursors when the index is going\n** to be filled with content that is already in sorted order.\n**\n** The BTREE_SEEK_EQ flag is set on cursors that will get OP_SeekGE or\n** OP_SeekLE opcodes for a range search, but where the range of entries\n** selected will all have the same key.  In other words, the cursor will\n** be used only for equality key searches.\n**\n*/\n#define BTREE_BULKLOAD 0x00000001  /* Used to full index in sorted order */\n#define BTREE_SEEK_EQ  0x00000002  /* EQ seeks only - no range seeks */\n\n/*\n** Flags passed as the third argument to sqlite3BtreeCursor().\n**\n** For read-only cursors the wrFlag argument is always zero. For read-write\n** cursors it may be set to either (BTREE_WRCSR|BTREE_FORDELETE) or just\n** (BTREE_WRCSR). If the BTREE_FORDELETE bit is set, then the cursor will\n** only be used by SQLite for the following:\n**\n**   * to seek to and then delete specific entries, and/or\n**\n**   * to read values that will be used to create keys that other\n**     BTREE_FORDELETE cursors will seek to and delete.\n**\n** The BTREE_FORDELETE flag is an optimization hint.  It is not used by\n** by this, the native b-tree engine of SQLite, but it is available to\n** alternative storage engines that might be substituted in place of this\n** b-tree system.  For alternative storage engines in which a delete of\n** the main table row automatically deletes corresponding index rows,\n** the FORDELETE flag hint allows those alternative storage engines to\n** skip a lot of work.  Namely:  FORDELETE cursors may treat all SEEK\n** and DELETE operations as no-ops, and any READ operation against a\n** FORDELETE cursor may return a null row: 0x01 0x00.\n*/\n#define BTREE_WRCSR     0x00000004     /* read-write cursor */\n#define BTREE_FORDELETE 0x00000008     /* Cursor is for seek/delete only */\n\nSQLITE_PRIVATE int sqlite3BtreeCursor(\n  Btree*,                              /* BTree containing table to open */\n  Pgno iTable,                         /* Index of root page */\n  int wrFlag,                          /* 1 for writing.  0 for read-only */\n  struct KeyInfo*,                     /* First argument to compare function */\n  BtCursor *pCursor                    /* Space to write cursor structure */\n);\nSQLITE_PRIVATE BtCursor *sqlite3BtreeFakeValidCursor(void);\nSQLITE_PRIVATE int sqlite3BtreeCursorSize(void);\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3BtreeClosesWithCursor(Btree*,BtCursor*);\n#endif\nSQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor*);\nSQLITE_PRIVATE void sqlite3BtreeCursorHintFlags(BtCursor*, unsigned);\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\nSQLITE_PRIVATE void sqlite3BtreeCursorHint(BtCursor*, int, ...);\n#endif\n\nSQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*);\nSQLITE_PRIVATE int sqlite3BtreeTableMoveto(\n  BtCursor*,\n  i64 intKey,\n  int bias,\n  int *pRes\n);\nSQLITE_PRIVATE int sqlite3BtreeIndexMoveto(\n  BtCursor*,\n  UnpackedRecord *pUnKey,\n  int *pRes\n);\nSQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*);\nSQLITE_PRIVATE int sqlite3BtreeCursorRestore(BtCursor*, int*);\nSQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*, u8 flags);\n\n/* Allowed flags for sqlite3BtreeDelete() and sqlite3BtreeInsert() */\n#define BTREE_SAVEPOSITION 0x02  /* Leave cursor pointing at NEXT or PREV */\n#define BTREE_AUXDELETE    0x04  /* not the primary delete operation */\n#define BTREE_APPEND       0x08  /* Insert is likely an append */\n#define BTREE_PREFORMAT    0x80  /* Inserted data is a preformated cell */\n\n/* An instance of the BtreePayload object describes the content of a single\n** entry in either an index or table btree.\n**\n** Index btrees (used for indexes and also WITHOUT ROWID tables) contain\n** an arbitrary key and no data.  These btrees have pKey,nKey set to the\n** key and the pData,nData,nZero fields are uninitialized.  The aMem,nMem\n** fields give an array of Mem objects that are a decomposition of the key.\n** The nMem field might be zero, indicating that no decomposition is available.\n**\n** Table btrees (used for rowid tables) contain an integer rowid used as\n** the key and passed in the nKey field.  The pKey field is zero.\n** pData,nData hold the content of the new entry.  nZero extra zero bytes\n** are appended to the end of the content when constructing the entry.\n** The aMem,nMem fields are uninitialized for table btrees.\n**\n** Field usage summary:\n**\n**               Table BTrees                   Index Btrees\n**\n**   pKey        always NULL                    encoded key\n**   nKey        the ROWID                      length of pKey\n**   pData       data                           not used\n**   aMem        not used                       decomposed key value\n**   nMem        not used                       entries in aMem\n**   nData       length of pData                not used\n**   nZero       extra zeros after pData        not used\n**\n** This object is used to pass information into sqlite3BtreeInsert().  The\n** same information used to be passed as five separate parameters.  But placing\n** the information into this object helps to keep the interface more\n** organized and understandable, and it also helps the resulting code to\n** run a little faster by using fewer registers for parameter passing.\n*/\nstruct BtreePayload {\n  const void *pKey;       /* Key content for indexes.  NULL for tables */\n  sqlite3_int64 nKey;     /* Size of pKey for indexes.  PRIMARY KEY for tabs */\n  const void *pData;      /* Data for tables. */\n  sqlite3_value *aMem;    /* First of nMem value in the unpacked pKey */\n  u16 nMem;               /* Number of aMem[] value.  Might be zero */\n  int nData;              /* Size of pData.  0 if none. */\n  int nZero;              /* Extra zero data appended after pData,nData */\n};\n\nSQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload,\n                       int flags, int seekResult);\nSQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes);\nSQLITE_PRIVATE int sqlite3BtreeIsEmpty(BtCursor *pCur, int *pRes);\nSQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes);\nSQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int flags);\nSQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*);\nSQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int flags);\nSQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor*);\nSQLITE_PRIVATE void sqlite3BtreeCursorPin(BtCursor*);\nSQLITE_PRIVATE void sqlite3BtreeCursorUnpin(BtCursor*);\nSQLITE_PRIVATE i64 sqlite3BtreeOffset(BtCursor*);\nSQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*);\nSQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt);\nSQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*);\nSQLITE_PRIVATE sqlite3_int64 sqlite3BtreeMaxRecordSize(BtCursor*);\n\nSQLITE_PRIVATE int sqlite3BtreeIntegrityCheck(\n  sqlite3 *db,  /* Database connection that is running the check */\n  Btree *p,     /* The btree to be checked */\n  Pgno *aRoot,  /* An array of root pages numbers for individual trees */\n  sqlite3_value *aCnt,  /* OUT: entry counts for each btree in aRoot[] */\n  int nRoot,    /* Number of entries in aRoot[] */\n  int mxErr,    /* Stop reporting errors after this many */\n  int *pnErr,   /* OUT: Write number of errors seen to this variable */\n  char **pzOut  /* OUT: Write the error message string here */\n);\nSQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*);\nSQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor*);\n\n#ifndef SQLITE_OMIT_INCRBLOB\nSQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor*, u32 offset, u32 amt, void*);\nSQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);\nSQLITE_PRIVATE void sqlite3BtreeIncrblobCursor(BtCursor *);\n#endif\nSQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *);\nSQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion);\nSQLITE_PRIVATE int sqlite3BtreeCursorHasHint(BtCursor*, unsigned int mask);\nSQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *pBt);\nSQLITE_PRIVATE int sqlite3HeaderSizeBtree(void);\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE sqlite3_uint64 sqlite3BtreeSeekCount(Btree*);\n#else\n# define sqlite3BtreeSeekCount(X) 0\n#endif\n\n#ifndef NDEBUG\nSQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*);\n#endif\nSQLITE_PRIVATE int sqlite3BtreeCursorIsValidNN(BtCursor*);\n\nSQLITE_PRIVATE int sqlite3BtreeCount(sqlite3*, BtCursor*, i64*);\n\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int);\nSQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*);\n#endif\n\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE   int sqlite3BtreeCheckpoint(Btree*, int, int *, int *);\n#endif\n\nSQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor*, BtCursor*, i64);\n\nSQLITE_PRIVATE void sqlite3BtreeClearCache(Btree*);\n\n/*\n** If we are not using shared cache, then there is no need to\n** use mutexes to access the BtShared structures.  So make the\n** Enter and Leave procedures no-ops.\n*/\n#ifndef SQLITE_OMIT_SHARED_CACHE\nSQLITE_PRIVATE   void sqlite3BtreeEnter(Btree*);\nSQLITE_PRIVATE   void sqlite3BtreeEnterAll(sqlite3*);\nSQLITE_PRIVATE   int sqlite3BtreeSharable(Btree*);\nSQLITE_PRIVATE   void sqlite3BtreeEnterCursor(BtCursor*);\nSQLITE_PRIVATE   int sqlite3BtreeConnectionCount(Btree*);\n#else\n# define sqlite3BtreeEnter(X)\n# define sqlite3BtreeEnterAll(X)\n# define sqlite3BtreeSharable(X) 0\n# define sqlite3BtreeEnterCursor(X)\n# define sqlite3BtreeConnectionCount(X) 1\n#endif\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE\nSQLITE_PRIVATE   void sqlite3BtreeLeave(Btree*);\nSQLITE_PRIVATE   void sqlite3BtreeLeaveCursor(BtCursor*);\nSQLITE_PRIVATE   void sqlite3BtreeLeaveAll(sqlite3*);\n#ifndef NDEBUG\n  /* These routines are used inside assert() statements only. */\nSQLITE_PRIVATE   int sqlite3BtreeHoldsMutex(Btree*);\nSQLITE_PRIVATE   int sqlite3BtreeHoldsAllMutexes(sqlite3*);\nSQLITE_PRIVATE   int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);\n#endif\n#else\n\n# define sqlite3BtreeLeave(X)\n# define sqlite3BtreeLeaveCursor(X)\n# define sqlite3BtreeLeaveAll(X)\n\n# define sqlite3BtreeHoldsMutex(X) 1\n# define sqlite3BtreeHoldsAllMutexes(X) 1\n# define sqlite3SchemaMutexHeld(X,Y,Z) 1\n#endif\n\n\n#endif /* SQLITE_BTREE_H */\n\n/************** End of btree.h ***********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include vdbe.h in the middle of sqliteInt.h ******************/\n/************** Begin file vdbe.h ********************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Header file for the Virtual DataBase Engine (VDBE)\n**\n** This header defines the interface to the virtual database engine\n** or VDBE.  The VDBE implements an abstract machine that runs a\n** simple program to access and modify the underlying database.\n*/\n#ifndef SQLITE_VDBE_H\n#define SQLITE_VDBE_H\n/* #include <stdio.h> */\n\n/*\n** A single VDBE is an opaque structure named \"Vdbe\".  Only routines\n** in the source file sqliteVdbe.c are allowed to see the insides\n** of this structure.\n*/\ntypedef struct Vdbe Vdbe;\n\n/*\n** The names of the following types declared in vdbeInt.h are required\n** for the VdbeOp definition.\n*/\ntypedef struct sqlite3_value Mem;\ntypedef struct SubProgram SubProgram;\ntypedef struct SubrtnSig SubrtnSig;\n\n/*\n** A signature for a reusable subroutine that materializes the RHS of\n** an IN operator.\n*/\nstruct SubrtnSig {\n  int selId;          /* SELECT-id for the SELECT statement on the RHS */\n  u8 bComplete;       /* True if fully coded and available for reusable */\n  char *zAff;         /* Affinity of the overall IN expression */\n  int iTable;         /* Ephemeral table generated by the subroutine */\n  int iAddr;          /* Subroutine entry address */\n  int regReturn;      /* Register used to hold return address */\n};\n\n/*\n** A single instruction of the virtual machine has an opcode\n** and as many as three operands.  The instruction is recorded\n** as an instance of the following structure:\n*/\nstruct VdbeOp {\n  u8 opcode;          /* What operation to perform */\n  signed char p4type; /* One of the P4_xxx constants for p4 */\n  u16 p5;             /* Fifth parameter is an unsigned 16-bit integer */\n  int p1;             /* First operand */\n  int p2;             /* Second parameter (often the jump destination) */\n  int p3;             /* The third parameter */\n  union p4union {     /* fourth parameter */\n    int i;                 /* Integer value if p4type==P4_INT32 */\n    void *p;               /* Generic pointer */\n    char *z;               /* Pointer to data for string (char array) types */\n    i64 *pI64;             /* Used when p4type is P4_INT64 */\n    double *pReal;         /* Used when p4type is P4_REAL */\n    FuncDef *pFunc;        /* Used when p4type is P4_FUNCDEF */\n    sqlite3_context *pCtx; /* Used when p4type is P4_FUNCCTX */\n    CollSeq *pColl;        /* Used when p4type is P4_COLLSEQ */\n    Mem *pMem;             /* Used when p4type is P4_MEM */\n    VTable *pVtab;         /* Used when p4type is P4_VTAB */\n    KeyInfo *pKeyInfo;     /* Used when p4type is P4_KEYINFO */\n    u32 *ai;               /* Used when p4type is P4_INTARRAY */\n    SubProgram *pProgram;  /* Used when p4type is P4_SUBPROGRAM */\n    Table *pTab;           /* Used when p4type is P4_TABLE */\n    SubrtnSig *pSubrtnSig; /* Used when p4type is P4_SUBRTNSIG */\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n    Expr *pExpr;           /* Used when p4type is P4_EXPR */\n#endif\n  } p4;\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  char *zComment;          /* Comment to improve readability */\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n  u32 iSrcLine;            /* Source-code line that generated this opcode\n                           ** with flags in the upper 8 bits */\n#endif\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE)\n  u64 nExec;\n  u64 nCycle;\n#endif\n};\ntypedef struct VdbeOp VdbeOp;\n\n\n/*\n** A sub-routine used to implement a trigger program.\n*/\nstruct SubProgram {\n  VdbeOp *aOp;                  /* Array of opcodes for sub-program */\n  int nOp;                      /* Elements in aOp[] */\n  int nMem;                     /* Number of memory cells required */\n  int nCsr;                     /* Number of cursors required */\n  u8 *aOnce;                    /* Array of OP_Once flags */\n  void *token;                  /* id that may be used to recursive triggers */\n  SubProgram *pNext;            /* Next sub-program already visited */\n};\n\n/*\n** A smaller version of VdbeOp used for the VdbeAddOpList() function because\n** it takes up less space.\n*/\nstruct VdbeOpList {\n  u8 opcode;          /* What operation to perform */\n  signed char p1;     /* First operand */\n  signed char p2;     /* Second parameter (often the jump destination) */\n  signed char p3;     /* Third parameter */\n};\ntypedef struct VdbeOpList VdbeOpList;\n\n/*\n** Allowed values of VdbeOp.p4type\n*/\n#define P4_NOTUSED      0   /* The P4 parameter is not used */\n#define P4_TRANSIENT    0   /* P4 is a pointer to a transient string */\n#define P4_STATIC     (-1)  /* Pointer to a static string */\n#define P4_COLLSEQ    (-2)  /* P4 is a pointer to a CollSeq structure */\n#define P4_INT32      (-3)  /* P4 is a 32-bit signed integer */\n#define P4_SUBPROGRAM (-4)  /* P4 is a pointer to a SubProgram structure */\n#define P4_TABLE      (-5)  /* P4 is a pointer to a Table structure */\n/* Above do not own any resources.  Must free those below */\n#define P4_FREE_IF_LE (-6)\n#define P4_DYNAMIC    (-6)  /* Pointer to memory from sqliteMalloc() */\n#define P4_FUNCDEF    (-7)  /* P4 is a pointer to a FuncDef structure */\n#define P4_KEYINFO    (-8)  /* P4 is a pointer to a KeyInfo structure */\n#define P4_EXPR       (-9) /* P4 is a pointer to an Expr tree */\n#define P4_MEM        (-10) /* P4 is a pointer to a Mem*    structure */\n#define P4_VTAB       (-11) /* P4 is a pointer to an sqlite3_vtab structure */\n#define P4_REAL       (-12) /* P4 is a 64-bit floating point value */\n#define P4_INT64      (-13) /* P4 is a 64-bit signed integer */\n#define P4_INTARRAY   (-14) /* P4 is a vector of 32-bit integers */\n#define P4_FUNCCTX    (-15) /* P4 is a pointer to an sqlite3_context object */\n#define P4_TABLEREF   (-16) /* Like P4_TABLE, but reference counted */\n#define P4_SUBRTNSIG  (-17) /* P4 is a SubrtnSig pointer */\n\n/* Error message codes for OP_Halt */\n#define P5_ConstraintNotNull 1\n#define P5_ConstraintUnique  2\n#define P5_ConstraintCheck   3\n#define P5_ConstraintFK      4\n\n/*\n** The Vdbe.aColName array contains 5n Mem structures, where n is the\n** number of columns of data returned by the statement.\n*/\n#define COLNAME_NAME     0\n#define COLNAME_DECLTYPE 1\n#define COLNAME_DATABASE 2\n#define COLNAME_TABLE    3\n#define COLNAME_COLUMN   4\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n# define COLNAME_N        5      /* Number of COLNAME_xxx symbols */\n#else\n# ifdef SQLITE_OMIT_DECLTYPE\n#   define COLNAME_N      1      /* Store only the name */\n# else\n#   define COLNAME_N      2      /* Store the name and decltype */\n# endif\n#endif\n\n/*\n** The following macro converts a label returned by sqlite3VdbeMakeLabel()\n** into an index into the Parse.aLabel[] array that contains the resolved\n** address of that label.\n*/\n#define ADDR(X)  (~(X))\n\n/*\n** The makefile scans the vdbe.c source file and creates the \"opcodes.h\"\n** header file that defines a number for each opcode used by the VDBE.\n*/\n/************** Include opcodes.h in the middle of vdbe.h ********************/\n/************** Begin file opcodes.h *****************************************/\n/* Automatically generated.  Do not edit */\n/* See the tool/mkopcodeh.tcl script for details */\n#define OP_Savepoint       0\n#define OP_AutoCommit      1\n#define OP_Transaction     2\n#define OP_Checkpoint      3\n#define OP_JournalMode     4\n#define OP_Vacuum          5\n#define OP_VFilter         6 /* jump, synopsis: iplan=r[P3] zplan='P4'     */\n#define OP_VUpdate         7 /* synopsis: data=r[P3@P2]                    */\n#define OP_Init            8 /* jump0, synopsis: Start at P2               */\n#define OP_Goto            9 /* jump                                       */\n#define OP_Gosub          10 /* jump                                       */\n#define OP_InitCoroutine  11 /* jump0                                      */\n#define OP_Yield          12 /* jump0                                      */\n#define OP_MustBeInt      13 /* jump0                                      */\n#define OP_Jump           14 /* jump                                       */\n#define OP_Once           15 /* jump                                       */\n#define OP_If             16 /* jump                                       */\n#define OP_IfNot          17 /* jump                                       */\n#define OP_IsType         18 /* jump, synopsis: if typeof(P1.P3) in P5 goto P2 */\n#define OP_Not            19 /* same as TK_NOT, synopsis: r[P2]= !r[P1]    */\n#define OP_IfNullRow      20 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */\n#define OP_SeekLT         21 /* jump0, synopsis: key=r[P3@P4]              */\n#define OP_SeekLE         22 /* jump0, synopsis: key=r[P3@P4]              */\n#define OP_SeekGE         23 /* jump0, synopsis: key=r[P3@P4]              */\n#define OP_SeekGT         24 /* jump0, synopsis: key=r[P3@P4]              */\n#define OP_IfNotOpen      25 /* jump, synopsis: if( !csr[P1] ) goto P2     */\n#define OP_IfNoHope       26 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_NoConflict     27 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_NotFound       28 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_Found          29 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_SeekRowid      30 /* jump0, synopsis: intkey=r[P3]              */\n#define OP_NotExists      31 /* jump, synopsis: intkey=r[P3]               */\n#define OP_Last           32 /* jump0                                      */\n#define OP_IfSizeBetween  33 /* jump                                       */\n#define OP_SorterSort     34 /* jump                                       */\n#define OP_Sort           35 /* jump                                       */\n#define OP_Rewind         36 /* jump0                                      */\n#define OP_IfEmpty        37 /* jump, synopsis: if( empty(P1) ) goto P2    */\n#define OP_SorterNext     38 /* jump                                       */\n#define OP_Prev           39 /* jump                                       */\n#define OP_Next           40 /* jump                                       */\n#define OP_IdxLE          41 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_IdxGT          42 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_Or             43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */\n#define OP_And            44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */\n#define OP_IdxLT          45 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_IdxGE          46 /* jump, synopsis: key=r[P3@P4]               */\n#define OP_RowSetRead     47 /* jump, synopsis: r[P3]=rowset(P1)           */\n#define OP_RowSetTest     48 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */\n#define OP_Program        49 /* jump0                                      */\n#define OP_FkIfZero       50 /* jump, synopsis: if fkctr[P1]==0 goto P2    */\n#define OP_IsNull         51 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */\n#define OP_NotNull        52 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */\n#define OP_Ne             53 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */\n#define OP_Eq             54 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */\n#define OP_Gt             55 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */\n#define OP_Le             56 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */\n#define OP_Lt             57 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */\n#define OP_Ge             58 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */\n#define OP_ElseEq         59 /* jump, same as TK_ESCAPE                    */\n#define OP_IfPos          60 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */\n#define OP_IfNotZero      61 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */\n#define OP_DecrJumpZero   62 /* jump, synopsis: if (--r[P1])==0 goto P2    */\n#define OP_IncrVacuum     63 /* jump                                       */\n#define OP_VNext          64 /* jump                                       */\n#define OP_Filter         65 /* jump, synopsis: if key(P3@P4) not in filter(P1) goto P2 */\n#define OP_PureFunc       66 /* synopsis: r[P3]=func(r[P2@NP])             */\n#define OP_Function       67 /* synopsis: r[P3]=func(r[P2@NP])             */\n#define OP_Return         68\n#define OP_EndCoroutine   69\n#define OP_HaltIfNull     70 /* synopsis: if r[P3]=null halt               */\n#define OP_Halt           71\n#define OP_Integer        72 /* synopsis: r[P2]=P1                         */\n#define OP_Int64          73 /* synopsis: r[P2]=P4                         */\n#define OP_String         74 /* synopsis: r[P2]='P4' (len=P1)              */\n#define OP_BeginSubrtn    75 /* synopsis: r[P2]=NULL                       */\n#define OP_Null           76 /* synopsis: r[P2..P3]=NULL                   */\n#define OP_SoftNull       77 /* synopsis: r[P1]=NULL                       */\n#define OP_Blob           78 /* synopsis: r[P2]=P4 (len=P1)                */\n#define OP_Variable       79 /* synopsis: r[P2]=parameter(P1)              */\n#define OP_Move           80 /* synopsis: r[P2@P3]=r[P1@P3]                */\n#define OP_Copy           81 /* synopsis: r[P2@P3+1]=r[P1@P3+1]            */\n#define OP_SCopy          82 /* synopsis: r[P2]=r[P1]                      */\n#define OP_IntCopy        83 /* synopsis: r[P2]=r[P1]                      */\n#define OP_FkCheck        84\n#define OP_ResultRow      85 /* synopsis: output=r[P1@P2]                  */\n#define OP_CollSeq        86\n#define OP_AddImm         87 /* synopsis: r[P1]=r[P1]+P2                   */\n#define OP_RealAffinity   88\n#define OP_Cast           89 /* synopsis: affinity(r[P1])                  */\n#define OP_Permutation    90\n#define OP_Compare        91 /* synopsis: r[P1@P3] <-> r[P2@P3]            */\n#define OP_IsTrue         92 /* synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 */\n#define OP_ZeroOrNull     93 /* synopsis: r[P2] = 0 OR NULL                */\n#define OP_Offset         94 /* synopsis: r[P3] = sqlite_offset(P1)        */\n#define OP_Column         95 /* synopsis: r[P3]=PX cursor P1 column P2     */\n#define OP_TypeCheck      96 /* synopsis: typecheck(r[P1@P2])              */\n#define OP_Affinity       97 /* synopsis: affinity(r[P1@P2])               */\n#define OP_MakeRecord     98 /* synopsis: r[P3]=mkrec(r[P1@P2])            */\n#define OP_Count          99 /* synopsis: r[P2]=count()                    */\n#define OP_ReadCookie    100\n#define OP_SetCookie     101\n#define OP_ReopenIdx     102 /* synopsis: root=P2 iDb=P3                   */\n#define OP_BitAnd        103 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */\n#define OP_BitOr         104 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */\n#define OP_ShiftLeft     105 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */\n#define OP_ShiftRight    106 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */\n#define OP_Add           107 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */\n#define OP_Subtract      108 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */\n#define OP_Multiply      109 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */\n#define OP_Divide        110 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */\n#define OP_Remainder     111 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */\n#define OP_Concat        112 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */\n#define OP_OpenRead      113 /* synopsis: root=P2 iDb=P3                   */\n#define OP_OpenWrite     114 /* synopsis: root=P2 iDb=P3                   */\n#define OP_BitNot        115 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */\n#define OP_OpenDup       116\n#define OP_OpenAutoindex 117 /* synopsis: nColumn=P2                       */\n#define OP_String8       118 /* same as TK_STRING, synopsis: r[P2]='P4'    */\n#define OP_OpenEphemeral 119 /* synopsis: nColumn=P2                       */\n#define OP_SorterOpen    120\n#define OP_SequenceTest  121 /* synopsis: if( cursor[P1].ctr++ ) pc = P2   */\n#define OP_OpenPseudo    122 /* synopsis: P3 columns in r[P2]              */\n#define OP_Close         123\n#define OP_ColumnsUsed   124\n#define OP_SeekScan      125 /* synopsis: Scan-ahead up to P1 rows         */\n#define OP_SeekHit       126 /* synopsis: set P2<=seekHit<=P3              */\n#define OP_Sequence      127 /* synopsis: r[P2]=cursor[P1].ctr++           */\n#define OP_NewRowid      128 /* synopsis: r[P2]=rowid                      */\n#define OP_Insert        129 /* synopsis: intkey=r[P3] data=r[P2]          */\n#define OP_RowCell       130\n#define OP_Delete        131\n#define OP_ResetCount    132\n#define OP_SorterCompare 133 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */\n#define OP_SorterData    134 /* synopsis: r[P2]=data                       */\n#define OP_RowData       135 /* synopsis: r[P2]=data                       */\n#define OP_Rowid         136 /* synopsis: r[P2]=PX rowid of P1             */\n#define OP_NullRow       137\n#define OP_SeekEnd       138\n#define OP_IdxInsert     139 /* synopsis: key=r[P2]                        */\n#define OP_SorterInsert  140 /* synopsis: key=r[P2]                        */\n#define OP_IdxDelete     141 /* synopsis: key=r[P2@P3]                     */\n#define OP_DeferredSeek  142 /* synopsis: Move P3 to P1.rowid if needed    */\n#define OP_IdxRowid      143 /* synopsis: r[P2]=rowid                      */\n#define OP_FinishSeek    144\n#define OP_Destroy       145\n#define OP_Clear         146\n#define OP_ResetSorter   147\n#define OP_CreateBtree   148 /* synopsis: r[P2]=root iDb=P1 flags=P3       */\n#define OP_SqlExec       149\n#define OP_ParseSchema   150\n#define OP_LoadAnalysis  151\n#define OP_DropTable     152\n#define OP_DropIndex     153\n#define OP_Real          154 /* same as TK_FLOAT, synopsis: r[P2]=P4       */\n#define OP_DropTrigger   155\n#define OP_IntegrityCk   156\n#define OP_RowSetAdd     157 /* synopsis: rowset(P1)=r[P2]                 */\n#define OP_Param         158\n#define OP_FkCounter     159 /* synopsis: fkctr[P1]+=P2                    */\n#define OP_MemMax        160 /* synopsis: r[P1]=max(r[P1],r[P2])           */\n#define OP_OffsetLimit   161 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */\n#define OP_AggInverse    162 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */\n#define OP_AggStep       163 /* synopsis: accum=r[P3] step(r[P2@P5])       */\n#define OP_AggStep1      164 /* synopsis: accum=r[P3] step(r[P2@P5])       */\n#define OP_AggValue      165 /* synopsis: r[P3]=value N=P2                 */\n#define OP_AggFinal      166 /* synopsis: accum=r[P1] N=P2                 */\n#define OP_Expire        167\n#define OP_CursorLock    168\n#define OP_CursorUnlock  169\n#define OP_TableLock     170 /* synopsis: iDb=P1 root=P2 write=P3          */\n#define OP_VBegin        171\n#define OP_VCreate       172\n#define OP_VDestroy      173\n#define OP_VOpen         174\n#define OP_VCheck        175\n#define OP_VInitIn       176 /* synopsis: r[P2]=ValueList(P1,P3)           */\n#define OP_VColumn       177 /* synopsis: r[P3]=vcolumn(P2)                */\n#define OP_VRename       178\n#define OP_Pagecount     179\n#define OP_MaxPgcnt      180\n#define OP_ClrSubtype    181 /* synopsis: r[P1].subtype = 0                */\n#define OP_GetSubtype    182 /* synopsis: r[P2] = r[P1].subtype            */\n#define OP_SetSubtype    183 /* synopsis: r[P2].subtype = r[P1]            */\n#define OP_FilterAdd     184 /* synopsis: filter(P1) += key(P3@P4)         */\n#define OP_Trace         185\n#define OP_CursorHint    186\n#define OP_ReleaseReg    187 /* synopsis: release r[P1@P2] mask P3         */\n#define OP_Noop          188\n#define OP_Explain       189\n#define OP_Abortable     190\n\n/* Properties such as \"out2\" or \"jump\" that are specified in\n** comments following the \"case\" for each opcode in the vdbe.c\n** are encoded into bitvectors as follows:\n*/\n#define OPFLG_JUMP        0x01  /* jump:  P2 holds jmp target */\n#define OPFLG_IN1         0x02  /* in1:   P1 is an input */\n#define OPFLG_IN2         0x04  /* in2:   P2 is an input */\n#define OPFLG_IN3         0x08  /* in3:   P3 is an input */\n#define OPFLG_OUT2        0x10  /* out2:  P2 is an output */\n#define OPFLG_OUT3        0x20  /* out3:  P3 is an output */\n#define OPFLG_NCYCLE      0x40  /* ncycle:Cycles count against P1 */\n#define OPFLG_JUMP0       0x80  /* jump0:  P2 might be zero */\n#define OPFLG_INITIALIZER {\\\n/*   0 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x41, 0x00,\\\n/*   8 */ 0x81, 0x01, 0x01, 0x81, 0x83, 0x83, 0x01, 0x01,\\\n/*  16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0xc9, 0xc9, 0xc9,\\\n/*  24 */ 0xc9, 0x01, 0x49, 0x49, 0x49, 0x49, 0xc9, 0x49,\\\n/*  32 */ 0xc1, 0x01, 0x41, 0x41, 0xc1, 0x01, 0x01, 0x41,\\\n/*  40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x41, 0x23,\\\n/*  48 */ 0x0b, 0x81, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b,\\\n/*  56 */ 0x0b, 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01,\\\n/*  64 */ 0x41, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00,\\\n/*  72 */ 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10,\\\n/*  80 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02,\\\n/*  88 */ 0x02, 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40,\\\n/*  96 */ 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x26,\\\n/* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\\\n/* 112 */ 0x26, 0x40, 0x00, 0x12, 0x40, 0x40, 0x10, 0x40,\\\n/* 120 */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10,\\\n/* 128 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,\\\n/* 136 */ 0x50, 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50,\\\n/* 144 */ 0x40, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\\\n/* 152 */ 0x00, 0x00, 0x10, 0x00, 0x00, 0x06, 0x10, 0x00,\\\n/* 160 */ 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\\\n/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10,\\\n/* 176 */ 0x50, 0x40, 0x00, 0x10, 0x10, 0x02, 0x12, 0x12,\\\n/* 184 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}\n\n/* The resolve3P2Values() routine is able to run faster if it knows\n** the value of the largest JUMP opcode.  The smaller the maximum\n** JUMP opcode the better, so the mkopcodeh.tcl script that\n** generated this include file strives to group all JUMP opcodes\n** together near the beginning of the list.\n*/\n#define SQLITE_MX_JUMP_OPCODE  65  /* Maximum JUMP opcode */\n\n/************** End of opcodes.h *********************************************/\n/************** Continuing where we left off in vdbe.h ***********************/\n\n/*\n** Additional non-public SQLITE_PREPARE_* flags\n*/\n#define SQLITE_PREPARE_SAVESQL  0x80  /* Preserve SQL text */\n#define SQLITE_PREPARE_MASK     0x1f  /* Mask of public flags */\n\n/*\n** Prototypes for the VDBE interface.  See comments on the implementation\n** for a description of what each of these routines does.\n*/\nSQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse*);\nSQLITE_PRIVATE Parse *sqlite3VdbeParser(Vdbe*);\nSQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int);\nSQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int);\nSQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int);\nSQLITE_PRIVATE int sqlite3VdbeGoto(Vdbe*,int);\nSQLITE_PRIVATE int sqlite3VdbeLoadString(Vdbe*,int,const char*);\nSQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe*,int,const char*,...);\nSQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);\nSQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);\nSQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(Vdbe*,int,int,int,int,const u8*,int);\nSQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int);\nSQLITE_PRIVATE int sqlite3VdbeAddFunctionCall(Parse*,int,int,int,int,const FuncDef*,int);\nSQLITE_PRIVATE void sqlite3VdbeEndCoroutine(Vdbe*,int);\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)\nSQLITE_PRIVATE   void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N);\nSQLITE_PRIVATE   void sqlite3VdbeVerifyNoResultRow(Vdbe *p);\n#else\n# define sqlite3VdbeVerifyNoMallocRequired(A,B)\n# define sqlite3VdbeVerifyNoResultRow(A)\n#endif\n#if defined(SQLITE_DEBUG)\nSQLITE_PRIVATE   void sqlite3VdbeVerifyAbortable(Vdbe *p, int);\nSQLITE_PRIVATE   void sqlite3VdbeNoJumpsOutsideSubrtn(Vdbe*,int,int,int);\n#else\n# define sqlite3VdbeVerifyAbortable(A,B)\n# define sqlite3VdbeNoJumpsOutsideSubrtn(A,B,C,D)\n#endif\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp,int iLineno);\n#ifndef SQLITE_OMIT_EXPLAIN\nSQLITE_PRIVATE   int sqlite3VdbeExplain(Parse*,u8,const char*,...);\nSQLITE_PRIVATE   void sqlite3VdbeExplainPop(Parse*);\nSQLITE_PRIVATE   int sqlite3VdbeExplainParent(Parse*);\n# define ExplainQueryPlan(P)        sqlite3VdbeExplain P\n# ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n#  define ExplainQueryPlan2(V,P)     (V = sqlite3VdbeExplain P)\n# else\n#  define ExplainQueryPlan2(V,P)     ExplainQueryPlan(P)\n# endif\n# define ExplainQueryPlanPop(P)     sqlite3VdbeExplainPop(P)\n# define ExplainQueryPlanParent(P)  sqlite3VdbeExplainParent(P)\n#else\n# define ExplainQueryPlan(P)\n# define ExplainQueryPlan2(V,P)\n# define ExplainQueryPlanPop(P)\n# define ExplainQueryPlanParent(P) 0\n# define sqlite3ExplainBreakpoint(A,B) /*no-op*/\n#endif\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)\nSQLITE_PRIVATE   void sqlite3ExplainBreakpoint(const char*,const char*);\n#else\n# define sqlite3ExplainBreakpoint(A,B) /*no-op*/\n#endif\nSQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*, int, char*, u16);\nSQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, int addr, u8);\nSQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);\nSQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);\nSQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);\nSQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5);\nSQLITE_PRIVATE void sqlite3VdbeTypeofColumn(Vdbe*, int);\nSQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);\nSQLITE_PRIVATE void sqlite3VdbeJumpHereOrPopInst(Vdbe*, int addr);\nSQLITE_PRIVATE int sqlite3VdbeChangeToNoop(Vdbe*, int addr);\nSQLITE_PRIVATE int sqlite3VdbeDeletePriorOpcode(Vdbe*, u8 op);\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   void sqlite3VdbeReleaseRegisters(Parse*,int addr, int n, u32 mask, int);\n#else\n# define sqlite3VdbeReleaseRegisters(P,A,N,M,F)\n#endif\nSQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);\nSQLITE_PRIVATE void sqlite3VdbeAppendP4(Vdbe*, void *pP4, int p4type);\nSQLITE_PRIVATE void sqlite3VdbeSetP4KeyInfo(Parse*, Index*);\nSQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeGetLastOp(Vdbe*);\nSQLITE_PRIVATE int sqlite3VdbeMakeLabel(Parse*);\nSQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeReusable(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,Parse*);\nSQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int);\nSQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*);\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   int sqlite3VdbeAssertMayAbort(Vdbe *, int);\n#endif\nSQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe*);\nSQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int);\nSQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));\nSQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*);\nSQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);\nSQLITE_PRIVATE u8 sqlite3VdbePrepareFlags(Vdbe*);\nSQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, u8);\n#ifdef SQLITE_ENABLE_NORMALIZE\nSQLITE_PRIVATE void sqlite3VdbeAddDblquoteStr(sqlite3*,Vdbe*,const char*);\nSQLITE_PRIVATE int sqlite3VdbeUsesDoubleQuotedString(Vdbe*,const char*);\n#endif\nSQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*);\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);\nSQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe*, int, u8);\nSQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe*, int);\n#ifndef SQLITE_OMIT_TRACE\nSQLITE_PRIVATE   char *sqlite3VdbeExpandSql(Vdbe*, const char*);\n#endif\nSQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);\nSQLITE_PRIVATE int sqlite3BlobCompare(const Mem*, const Mem*);\n#ifdef SQLITE_ENABLE_PERCENTILE\nSQLITE_PRIVATE   const char *sqlite3VdbeFuncName(const sqlite3_context*);\n#endif\n\nSQLITE_PRIVATE void sqlite3VdbeRecordUnpack(int,const void*,UnpackedRecord*);\nSQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);\nSQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(int, const void *, UnpackedRecord *, int);\nSQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo*);\n\ntypedef int (*RecordCompare)(int,const void*,UnpackedRecord*);\nSQLITE_PRIVATE RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*);\n\nSQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *);\nSQLITE_PRIVATE int sqlite3VdbeHasSubProgram(Vdbe*);\n\nSQLITE_PRIVATE void sqlite3MemSetArrayInt64(sqlite3_value *aMem, int iIdx, i64 val);\n\n#ifndef SQLITE_OMIT_DATETIME_FUNCS\nSQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context*);\n#endif\n#ifdef SQLITE_ENABLE_BYTECODE_VTAB\nSQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3*);\n#endif\n\n/* Use SQLITE_ENABLE_EXPLAIN_COMMENTS to enable generation of extra\n** comments on each VDBE opcode.\n**\n** Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op\n** comments in VDBE programs that show key decision points in the code\n** generator.\n*/\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\nSQLITE_PRIVATE   void sqlite3VdbeComment(Vdbe*, const char*, ...);\n# define VdbeComment(X)  sqlite3VdbeComment X\nSQLITE_PRIVATE   void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);\n# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X\n# ifdef SQLITE_ENABLE_MODULE_COMMENTS\n#   define VdbeModuleComment(X)  sqlite3VdbeNoopComment X\n# else\n#   define VdbeModuleComment(X)\n# endif\n#else\n# define VdbeComment(X)\n# define VdbeNoopComment(X)\n# define VdbeModuleComment(X)\n#endif\n\n/*\n** The VdbeCoverage macros are used to set a coverage testing point\n** for VDBE branch instructions.  The coverage testing points are line\n** numbers in the sqlite3.c source file.  VDBE branch coverage testing\n** only works with an amalgamation build.  That's ok since a VDBE branch\n** coverage build designed for testing the test suite only.  No application\n** should ever ship with VDBE branch coverage measuring turned on.\n**\n**    VdbeCoverage(v)                  // Mark the previously coded instruction\n**                                     // as a branch\n**\n**    VdbeCoverageIf(v, conditional)   // Mark previous if conditional true\n**\n**    VdbeCoverageAlwaysTaken(v)       // Previous branch is always taken\n**\n**    VdbeCoverageNeverTaken(v)        // Previous branch is never taken\n**\n**    VdbeCoverageNeverNull(v)         // Previous three-way branch is only\n**                                     // taken on the first two ways.  The\n**                                     // NULL option is not possible\n**\n**    VdbeCoverageEqNe(v)              // Previous OP_Jump is only interested\n**                                     // in distinguishing equal and not-equal.\n**\n** Every VDBE branch operation must be tagged with one of the macros above.\n** If not, then when \"make test\" is run with -DSQLITE_VDBE_COVERAGE and\n** -DSQLITE_DEBUG then an ALWAYS() will fail in the vdbeTakeBranch()\n** routine in vdbe.c, alerting the developer to the missed tag.\n**\n** During testing, the test application will invoke\n** sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE,...) to set a callback\n** routine that is invoked as each bytecode branch is taken.  The callback\n** contains the sqlite3.c source line number of the VdbeCoverage macro and\n** flags to indicate whether or not the branch was taken.  The test application\n** is responsible for keeping track of this and reporting byte-code branches\n** that are never taken.\n**\n** See the VdbeBranchTaken() macro and vdbeTakeBranch() function in the\n** vdbe.c source file for additional information.\n*/\n#ifdef SQLITE_VDBE_COVERAGE\nSQLITE_PRIVATE   void sqlite3VdbeSetLineNumber(Vdbe*,int);\n# define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__)\n# define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__)\n# define VdbeCoverageAlwaysTaken(v) \\\n         sqlite3VdbeSetLineNumber(v,__LINE__|0x5000000);\n# define VdbeCoverageNeverTaken(v) \\\n         sqlite3VdbeSetLineNumber(v,__LINE__|0x6000000);\n# define VdbeCoverageNeverNull(v) \\\n         sqlite3VdbeSetLineNumber(v,__LINE__|0x4000000);\n# define VdbeCoverageNeverNullIf(v,x) \\\n         if(x)sqlite3VdbeSetLineNumber(v,__LINE__|0x4000000);\n# define VdbeCoverageEqNe(v) \\\n         sqlite3VdbeSetLineNumber(v,__LINE__|0x8000000);\n# define VDBE_OFFSET_LINENO(x) (__LINE__+x)\n#else\n# define VdbeCoverage(v)\n# define VdbeCoverageIf(v,x)\n# define VdbeCoverageAlwaysTaken(v)\n# define VdbeCoverageNeverTaken(v)\n# define VdbeCoverageNeverNull(v)\n# define VdbeCoverageNeverNullIf(v,x)\n# define VdbeCoverageEqNe(v)\n# define VDBE_OFFSET_LINENO(x) 0\n#endif\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\nSQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const char*);\nSQLITE_PRIVATE void sqlite3VdbeScanStatusRange(Vdbe*, int, int, int);\nSQLITE_PRIVATE void sqlite3VdbeScanStatusCounters(Vdbe*, int, int, int);\n#else\n# define sqlite3VdbeScanStatus(a,b,c,d,e,f)\n# define sqlite3VdbeScanStatusRange(a,b,c,d)\n# define sqlite3VdbeScanStatusCounters(a,b,c,d)\n#endif\n\n#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)\nSQLITE_PRIVATE void sqlite3VdbePrintOp(FILE*, int, VdbeOp*);\n#endif\n\n#if defined(SQLITE_ENABLE_CURSOR_HINTS) && defined(SQLITE_DEBUG)\nSQLITE_PRIVATE int sqlite3CursorRangeHintExprCheck(Walker *pWalker, Expr *pExpr);\n#endif\n\n#endif /* SQLITE_VDBE_H */\n\n/************** End of vdbe.h ************************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include pcache.h in the middle of sqliteInt.h ****************/\n/************** Begin file pcache.h ******************************************/\n/*\n** 2008 August 05\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface that the sqlite page cache\n** subsystem.\n*/\n\n#ifndef _PCACHE_H_\n\ntypedef struct PgHdr PgHdr;\ntypedef struct PCache PCache;\n\n/*\n** Every page in the cache is controlled by an instance of the following\n** structure.\n*/\nstruct PgHdr {\n  sqlite3_pcache_page *pPage;    /* Pcache object page handle */\n  void *pData;                   /* Page data */\n  void *pExtra;                  /* Extra content */\n  PCache *pCache;                /* PRIVATE: Cache that owns this page */\n  PgHdr *pDirty;                 /* Transient list of dirty sorted by pgno */\n  Pager *pPager;                 /* The pager this page is part of */\n  Pgno pgno;                     /* Page number for this page */\n#ifdef SQLITE_CHECK_PAGES\n  u32 pageHash;                  /* Hash of page content */\n#endif\n  u16 flags;                     /* PGHDR flags defined below */\n\n  /**********************************************************************\n  ** Elements above, except pCache, are public.  All that follow are\n  ** private to pcache.c and should not be accessed by other modules.\n  ** pCache is grouped with the public elements for efficiency.\n  */\n  i64 nRef;                      /* Number of users of this page */\n  PgHdr *pDirtyNext;             /* Next element in list of dirty pages */\n  PgHdr *pDirtyPrev;             /* Previous element in list of dirty pages */\n                          /* NB: pDirtyNext and pDirtyPrev are undefined if the\n                          ** PgHdr object is not dirty */\n};\n\n/* Bit values for PgHdr.flags */\n#define PGHDR_CLEAN           0x001  /* Page not on the PCache.pDirty list */\n#define PGHDR_DIRTY           0x002  /* Page is on the PCache.pDirty list */\n#define PGHDR_WRITEABLE       0x004  /* Journaled and ready to modify */\n#define PGHDR_NEED_SYNC       0x008  /* Fsync the rollback journal before\n                                     ** writing this page to the database */\n#define PGHDR_DONT_WRITE      0x010  /* Do not write content to disk */\n#define PGHDR_MMAP            0x020  /* This is an mmap page object */\n\n#define PGHDR_WAL_APPEND      0x040  /* Appended to wal file */\n\n/* Initialize and shutdown the page cache subsystem */\nSQLITE_PRIVATE int sqlite3PcacheInitialize(void);\nSQLITE_PRIVATE void sqlite3PcacheShutdown(void);\n\n/* Page cache buffer management:\n** These routines implement SQLITE_CONFIG_PAGECACHE.\n*/\nSQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n);\n\n/* Create a new pager cache.\n** Under memory stress, invoke xStress to try to make pages clean.\n** Only clean and unpinned pages can be reclaimed.\n*/\nSQLITE_PRIVATE int sqlite3PcacheOpen(\n  int szPage,                    /* Size of every page */\n  int szExtra,                   /* Extra space associated with each page */\n  int bPurgeable,                /* True if pages are on backing store */\n  int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */\n  void *pStress,                 /* Argument to xStress */\n  PCache *pToInit                /* Preallocated space for the PCache */\n);\n\n/* Modify the page-size after the cache has been created. */\nSQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *, int);\n\n/* Return the size in bytes of a PCache object.  Used to preallocate\n** storage space.\n*/\nSQLITE_PRIVATE int sqlite3PcacheSize(void);\n\n/* One release per successful fetch.  Page is pinned until released.\n** Reference counted.\n*/\nSQLITE_PRIVATE sqlite3_pcache_page *sqlite3PcacheFetch(PCache*, Pgno, int createFlag);\nSQLITE_PRIVATE int sqlite3PcacheFetchStress(PCache*, Pgno, sqlite3_pcache_page**);\nSQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(PCache*, Pgno, sqlite3_pcache_page *pPage);\nSQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr*);\n\nSQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*);         /* Remove page from cache */\nSQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*);    /* Make sure page is marked dirty */\nSQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*);    /* Mark a single page as clean */\nSQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*);    /* Mark all dirty list pages as clean */\nSQLITE_PRIVATE void sqlite3PcacheClearWritable(PCache*);\n\n/* Change a page number.  Used by incr-vacuum. */\nSQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno);\n\n/* Remove all pages with pgno>x.  Reset the cache if x==0 */\nSQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x);\n\n/* Get a list of all dirty pages in the cache, sorted by page number */\nSQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache*);\n\n/* Reset and close the cache object */\nSQLITE_PRIVATE void sqlite3PcacheClose(PCache*);\n\n/* Clear flags from pages of the page cache */\nSQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *);\n\n/* Discard the contents of the cache */\nSQLITE_PRIVATE void sqlite3PcacheClear(PCache*);\n\n/* Return the total number of outstanding page references */\nSQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache*);\n\n/* Increment the reference count of an existing page */\nSQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*);\n\nSQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr*);\n\n/* Return the total number of pages stored in the cache */\nSQLITE_PRIVATE int sqlite3PcachePagecount(PCache*);\n\n#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)\n/* Iterate through all dirty pages currently stored in the cache. This\n** interface is only available if SQLITE_CHECK_PAGES is defined when the\n** library is built.\n*/\nSQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *));\n#endif\n\n#if defined(SQLITE_DEBUG)\n/* Check invariants on a PgHdr object */\nSQLITE_PRIVATE int sqlite3PcachePageSanity(PgHdr*);\n#endif\n\n/* Set and get the suggested cache-size for the specified pager-cache.\n**\n** If no global maximum is configured, then the system attempts to limit\n** the total number of pages cached by purgeable pager-caches to the sum\n** of the suggested cache-sizes.\n*/\nSQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *, int);\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *);\n#endif\n\n/* Set or get the suggested spill-size for the specified pager-cache.\n**\n** The spill-size is the minimum number of pages in cache before the cache\n** will attempt to spill dirty pages by calling xStress.\n*/\nSQLITE_PRIVATE int sqlite3PcacheSetSpillsize(PCache *, int);\n\n/* Free up as much memory as possible from the page cache */\nSQLITE_PRIVATE void sqlite3PcacheShrink(PCache*);\n\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n/* Try to return memory used by the pcache module to the main memory heap */\nSQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int);\n#endif\n\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*);\n#endif\n\nSQLITE_PRIVATE void sqlite3PCacheSetDefault(void);\n\n/* Return the header size */\nSQLITE_PRIVATE int sqlite3HeaderSizePcache(void);\nSQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);\n\n/* Number of dirty pages as a percentage of the configured cache size */\nSQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*);\n\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\nSQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache);\n#endif\n\n#endif /* _PCACHE_H_ */\n\n/************** End of pcache.h **********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n/************** Include mutex.h in the middle of sqliteInt.h *****************/\n/************** Begin file mutex.h *******************************************/\n/*\n** 2007 August 28\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains the common header for all mutex implementations.\n** The sqliteInt.h header #includes this file so that it is available\n** to all source files.  We break it out in an effort to keep the code\n** better organized.\n**\n** NOTE:  source files should *not* #include this header file directly.\n** Source files should #include the sqliteInt.h file and let that file\n** include this one indirectly.\n*/\n\n\n/*\n** Figure out what version of the code to use.  The choices are\n**\n**   SQLITE_MUTEX_OMIT         No mutex logic.  Not even stubs.  The\n**                             mutexes implementation cannot be overridden\n**                             at start-time.\n**\n**   SQLITE_MUTEX_NOOP         For single-threaded applications.  No\n**                             mutual exclusion is provided.  But this\n**                             implementation can be overridden at\n**                             start-time.\n**\n**   SQLITE_MUTEX_PTHREADS     For multi-threaded applications on Unix.\n**\n**   SQLITE_MUTEX_W32          For multi-threaded applications on Win32.\n*/\n#if !SQLITE_THREADSAFE\n# define SQLITE_MUTEX_OMIT\n#endif\n#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP)\n#  if SQLITE_OS_UNIX\n#    define SQLITE_MUTEX_PTHREADS\n#  elif SQLITE_OS_WIN\n#    define SQLITE_MUTEX_W32\n#  else\n#    define SQLITE_MUTEX_NOOP\n#  endif\n#endif\n\n#ifdef SQLITE_MUTEX_OMIT\n/*\n** If this is a no-op implementation, implement everything as macros.\n*/\n#define sqlite3_mutex_alloc(X)    ((sqlite3_mutex*)8)\n#define sqlite3_mutex_free(X)\n#define sqlite3_mutex_enter(X)\n#define sqlite3_mutex_try(X)      SQLITE_OK\n#define sqlite3_mutex_leave(X)\n#define sqlite3_mutex_held(X)     ((void)(X),1)\n#define sqlite3_mutex_notheld(X)  ((void)(X),1)\n#define sqlite3MutexAlloc(X)      ((sqlite3_mutex*)8)\n#define sqlite3MutexInit()        SQLITE_OK\n#define sqlite3MutexEnd()\n#define MUTEX_LOGIC(X)\n#else\n#define MUTEX_LOGIC(X)            X\nSQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);\n#endif /* defined(SQLITE_MUTEX_OMIT) */\n\n/************** End of mutex.h ***********************************************/\n/************** Continuing where we left off in sqliteInt.h ******************/\n\n/* The SQLITE_EXTRA_DURABLE compile-time option used to set the default\n** synchronous setting to EXTRA.  It is no longer supported.\n*/\n#ifdef SQLITE_EXTRA_DURABLE\n# warning Use SQLITE_DEFAULT_SYNCHRONOUS=3 instead of SQLITE_EXTRA_DURABLE\n# define SQLITE_DEFAULT_SYNCHRONOUS 3\n#endif\n\n/*\n** Default synchronous levels.\n**\n** Note that (for historical reasons) the PAGER_SYNCHRONOUS_* macros differ\n** from the SQLITE_DEFAULT_SYNCHRONOUS value by 1.\n**\n**           PAGER_SYNCHRONOUS       DEFAULT_SYNCHRONOUS\n**   OFF           1                         0\n**   NORMAL        2                         1\n**   FULL          3                         2\n**   EXTRA         4                         3\n**\n** The \"PRAGMA synchronous\" statement also uses the zero-based numbers.\n** In other words, the zero-based numbers are used for all external interfaces\n** and the one-based values are used internally.\n*/\n#ifndef SQLITE_DEFAULT_SYNCHRONOUS\n# define SQLITE_DEFAULT_SYNCHRONOUS 2\n#endif\n#ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS\n# define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS\n#endif\n\n/*\n** Each database file to be accessed by the system is an instance\n** of the following structure.  There are normally two of these structures\n** in the sqlite.aDb[] array.  aDb[0] is the main database file and\n** aDb[1] is the database file used to hold temporary tables.  Additional\n** databases may be attached.\n*/\nstruct Db {\n  char *zDbSName;      /* Name of this database. (schema name, not filename) */\n  Btree *pBt;          /* The B*Tree structure for this database file */\n  u8 safety_level;     /* How aggressive at syncing data to disk */\n  u8 bSyncSet;         /* True if \"PRAGMA synchronous=N\" has been run */\n  Schema *pSchema;     /* Pointer to database schema (possibly shared) */\n};\n\n/*\n** An instance of the following structure stores a database schema.\n**\n** Most Schema objects are associated with a Btree.  The exception is\n** the Schema for the TEMP database (sqlite3.aDb[1]) which is free-standing.\n** In shared cache mode, a single Schema object can be shared by multiple\n** Btrees that refer to the same underlying BtShared object.\n**\n** Schema objects are automatically deallocated when the last Btree that\n** references them is destroyed.   The TEMP Schema is manually freed by\n** sqlite3_close().\n*\n** A thread must be holding a mutex on the corresponding Btree in order\n** to access Schema content.  This implies that the thread must also be\n** holding a mutex on the sqlite3 connection pointer that owns the Btree.\n** For a TEMP Schema, only the connection mutex is required.\n*/\nstruct Schema {\n  int schema_cookie;   /* Database schema version number for this file */\n  int iGeneration;     /* Generation counter.  Incremented with each change */\n  Hash tblHash;        /* All tables indexed by name */\n  Hash idxHash;        /* All (named) indices indexed by name */\n  Hash trigHash;       /* All triggers indexed by name */\n  Hash fkeyHash;       /* All foreign keys by referenced table name */\n  Table *pSeqTab;      /* The sqlite_sequence table used by AUTOINCREMENT */\n  u8 file_format;      /* Schema format version for this file */\n  u8 enc;              /* Text encoding used by this database */\n  u16 schemaFlags;     /* Flags associated with this schema */\n  int cache_size;      /* Number of pages to use in the cache */\n};\n\n/*\n** These macros can be used to test, set, or clear bits in the\n** Db.pSchema->flags field.\n*/\n#define DbHasProperty(D,I,P)     (((D)->aDb[I].pSchema->schemaFlags&(P))==(P))\n#define DbHasAnyProperty(D,I,P)  (((D)->aDb[I].pSchema->schemaFlags&(P))!=0)\n#define DbSetProperty(D,I,P)     (D)->aDb[I].pSchema->schemaFlags|=(P)\n#define DbClearProperty(D,I,P)   (D)->aDb[I].pSchema->schemaFlags&=~(P)\n\n/*\n** Allowed values for the DB.pSchema->flags field.\n**\n** The DB_SchemaLoaded flag is set after the database schema has been\n** read into internal hash tables.\n**\n** DB_UnresetViews means that one or more views have column names that\n** have been filled out.  If the schema changes, these column names might\n** changes and so the view will need to be reset.\n*/\n#define DB_SchemaLoaded    0x0001  /* The schema has been loaded */\n#define DB_UnresetViews    0x0002  /* Some views have defined column names */\n#define DB_ResetWanted     0x0008  /* Reset the schema when nSchemaLock==0 */\n\n/*\n** The number of different kinds of things that can be limited\n** using the sqlite3_limit() interface.\n*/\n#define SQLITE_N_LIMIT (SQLITE_LIMIT_WORKER_THREADS+1)\n\n/*\n** Lookaside malloc is a set of fixed-size buffers that can be used\n** to satisfy small transient memory allocation requests for objects\n** associated with a particular database connection.  The use of\n** lookaside malloc provides a significant performance enhancement\n** (approx 10%) by avoiding numerous malloc/free requests while parsing\n** SQL statements.\n**\n** The Lookaside structure holds configuration information about the\n** lookaside malloc subsystem.  Each available memory allocation in\n** the lookaside subsystem is stored on a linked list of LookasideSlot\n** objects.\n**\n** Lookaside allocations are only allowed for objects that are associated\n** with a particular database connection.  Hence, schema information cannot\n** be stored in lookaside because in shared cache mode the schema information\n** is shared by multiple database connections.  Therefore, while parsing\n** schema information, the Lookaside.bEnabled flag is cleared so that\n** lookaside allocations are not used to construct the schema objects.\n**\n** New lookaside allocations are only allowed if bDisable==0.  When\n** bDisable is greater than zero, sz is set to zero which effectively\n** disables lookaside without adding a new test for the bDisable flag\n** in a performance-critical path.  sz should be set by to szTrue whenever\n** bDisable changes back to zero.\n**\n** Lookaside buffers are initially held on the pInit list.  As they are\n** used and freed, they are added back to the pFree list.  New allocations\n** come off of pFree first, then pInit as a fallback.  This dual-list\n** allows use to compute a high-water mark - the maximum number of allocations\n** outstanding at any point in the past - by subtracting the number of\n** allocations on the pInit list from the total number of allocations.\n**\n** Enhancement on 2019-12-12:  Two-size-lookaside\n** The default lookaside configuration is 100 slots of 1200 bytes each.\n** The larger slot sizes are important for performance, but they waste\n** a lot of space, as most lookaside allocations are less than 128 bytes.\n** The two-size-lookaside enhancement breaks up the lookaside allocation\n** into two pools:  One of 128-byte slots and the other of the default size\n** (1200-byte) slots.   Allocations are filled from the small-pool first,\n** failing over to the full-size pool if that does not work.  Thus more\n** lookaside slots are available while also using less memory.\n** This enhancement can be omitted by compiling with\n** SQLITE_OMIT_TWOSIZE_LOOKASIDE.\n*/\nstruct Lookaside {\n  u32 bDisable;           /* Only operate the lookaside when zero */\n  u16 sz;                 /* Size of each buffer in bytes */\n  u16 szTrue;             /* True value of sz, even if disabled */\n  u8 bMalloced;           /* True if pStart obtained from sqlite3_malloc() */\n  u32 nSlot;              /* Number of lookaside slots allocated */\n  u32 anStat[3];          /* 0: hits.  1: size misses.  2: full misses */\n  LookasideSlot *pInit;   /* List of buffers not previously used */\n  LookasideSlot *pFree;   /* List of available buffers */\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n  LookasideSlot *pSmallInit; /* List of small buffers not previously used */\n  LookasideSlot *pSmallFree; /* List of available small buffers */\n  void *pMiddle;          /* First byte past end of full-size buffers and\n                          ** the first byte of LOOKASIDE_SMALL buffers */\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n  void *pStart;           /* First byte of available memory space */\n  void *pEnd;             /* First byte past end of available space */\n  void *pTrueEnd;         /* True value of pEnd, when db->pnBytesFreed!=0 */\n};\nstruct LookasideSlot {\n  LookasideSlot *pNext;    /* Next buffer in the list of free buffers */\n};\n\n#define DisableLookaside  db->lookaside.bDisable++;db->lookaside.sz=0\n#define EnableLookaside   db->lookaside.bDisable--;\\\n   db->lookaside.sz=db->lookaside.bDisable?0:db->lookaside.szTrue\n\n/* Size of the smaller allocations in two-size lookaside */\n#ifdef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n#  define LOOKASIDE_SMALL           0\n#else\n#  define LOOKASIDE_SMALL         128\n#endif\n\n/*\n** A hash table for built-in function definitions.  (Application-defined\n** functions use a regular table table from hash.h.)\n**\n** Hash each FuncDef structure into one of the FuncDefHash.a[] slots.\n** Collisions are on the FuncDef.u.pHash chain.  Use the SQLITE_FUNC_HASH()\n** macro to compute a hash on the function name.\n*/\n#define SQLITE_FUNC_HASH_SZ 23\nstruct FuncDefHash {\n  FuncDef *a[SQLITE_FUNC_HASH_SZ];       /* Hash table for functions */\n};\n#define SQLITE_FUNC_HASH(C,L) (((C)+(L))%SQLITE_FUNC_HASH_SZ)\n\n/*\n** typedef for the authorization callback function.\n*/\ntypedef int (*sqlite3_xauth)(void*,int,const char*,const char*,const char*,\n                             const char*);\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/* This is an extra SQLITE_TRACE macro that indicates \"legacy\" tracing\n** in the style of sqlite3_trace()\n*/\n#define SQLITE_TRACE_LEGACY          0x40     /* Use the legacy xTrace */\n#define SQLITE_TRACE_XPROFILE        0x80     /* Use the legacy xProfile */\n#else\n#define SQLITE_TRACE_LEGACY          0\n#define SQLITE_TRACE_XPROFILE        0\n#endif /* SQLITE_OMIT_DEPRECATED */\n#define SQLITE_TRACE_NONLEGACY_MASK  0x0f     /* Normal flags */\n\n/*\n** Maximum number of sqlite3.aDb[] entries.  This is the number of attached\n** databases plus 2 for \"main\" and \"temp\".\n*/\n#define SQLITE_MAX_DB (SQLITE_MAX_ATTACHED+2)\n\n/*\n** Each database connection is an instance of the following structure.\n*/\nstruct sqlite3 {\n  sqlite3_vfs *pVfs;            /* OS Interface */\n  struct Vdbe *pVdbe;           /* List of active virtual machines */\n  CollSeq *pDfltColl;           /* BINARY collseq for the database encoding */\n  sqlite3_mutex *mutex;         /* Connection mutex */\n  Db *aDb;                      /* All backends */\n  int nDb;                      /* Number of backends currently in use */\n  u32 mDbFlags;                 /* flags recording internal state */\n  u64 flags;                    /* flags settable by pragmas. See below */\n  i64 lastRowid;                /* ROWID of most recent insert (see above) */\n  i64 szMmap;                   /* Default mmap_size setting */\n  u32 nSchemaLock;              /* Do not reset the schema when non-zero */\n  unsigned int openFlags;       /* Flags passed to sqlite3_vfs.xOpen() */\n  int errCode;                  /* Most recent error code (SQLITE_*) */\n  int errByteOffset;            /* Byte offset of error in SQL statement */\n  int errMask;                  /* & result codes with this before returning */\n  int iSysErrno;                /* Errno value from last system error */\n  u32 dbOptFlags;               /* Flags to enable/disable optimizations */\n  u8 enc;                       /* Text encoding */\n  u8 autoCommit;                /* The auto-commit flag. */\n  u8 temp_store;                /* 1: file 2: memory 0: default */\n  u8 mallocFailed;              /* True if we have seen a malloc failure */\n  u8 bBenignMalloc;             /* Do not require OOMs if true */\n  u8 dfltLockMode;              /* Default locking-mode for attached dbs */\n  signed char nextAutovac;      /* Autovac setting after VACUUM if >=0 */\n  u8 suppressErr;               /* Do not issue error messages if true */\n  u8 vtabOnConflict;            /* Value to return for s3_vtab_on_conflict() */\n  u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */\n  u8 mTrace;                    /* zero or more SQLITE_TRACE flags */\n  u8 noSharedCache;             /* True if no shared-cache backends */\n  u8 nSqlExec;                  /* Number of pending OP_SqlExec opcodes */\n  u8 eOpenState;                /* Current condition of the connection */\n  int nextPagesize;             /* Pagesize after VACUUM if >0 */\n  i64 nChange;                  /* Value returned by sqlite3_changes() */\n  i64 nTotalChange;             /* Value returned by sqlite3_total_changes() */\n  int aLimit[SQLITE_N_LIMIT];   /* Limits */\n  int nMaxSorterMmap;           /* Maximum size of regions mapped by sorter */\n  struct sqlite3InitInfo {      /* Information used during initialization */\n    Pgno newTnum;               /* Rootpage of table being initialized */\n    u8 iDb;                     /* Which db file is being initialized */\n    u8 busy;                    /* TRUE if currently initializing */\n    unsigned orphanTrigger : 1; /* Last statement is orphaned TEMP trigger */\n    unsigned imposterTable : 2; /* Building an imposter table */\n    unsigned reopenMemdb : 1;   /* ATTACH is really a reopen using MemDB */\n    const char **azInit;        /* \"type\", \"name\", and \"tbl_name\" columns */\n  } init;\n  int nVdbeActive;              /* Number of VDBEs currently running */\n  int nVdbeRead;                /* Number of active VDBEs that read or write */\n  int nVdbeWrite;               /* Number of active VDBEs that read and write */\n  int nVdbeExec;                /* Number of nested calls to VdbeExec() */\n  int nVDestroy;                /* Number of active OP_VDestroy operations */\n  int nExtension;               /* Number of loaded extensions */\n  void **aExtension;            /* Array of shared library handles */\n  union {\n    void (*xLegacy)(void*,const char*);   /* mTrace==SQLITE_TRACE_LEGACY */\n    int (*xV2)(u32,void*,void*,void*);    /* All other mTrace values */\n  } trace;\n  void *pTraceArg;                        /* Argument to the trace function */\n#ifndef SQLITE_OMIT_DEPRECATED\n  void (*xProfile)(void*,const char*,u64);  /* Profiling function */\n  void *pProfileArg;                        /* Argument to profile function */\n#endif\n  void *pCommitArg;                 /* Argument to xCommitCallback() */\n  int (*xCommitCallback)(void*);    /* Invoked at every commit. */\n  void *pRollbackArg;               /* Argument to xRollbackCallback() */\n  void (*xRollbackCallback)(void*); /* Invoked at every commit. */\n  void *pUpdateArg;\n  void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64);\n  void *pAutovacPagesArg;           /* Client argument to autovac_pages */\n  void (*xAutovacDestr)(void*);     /* Destructor for pAutovacPAgesArg */\n  unsigned int (*xAutovacPages)(void*,const char*,u32,u32,u32);\n  Parse *pParse;                /* Current parse */\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  void *pPreUpdateArg;          /* First argument to xPreUpdateCallback */\n  void (*xPreUpdateCallback)(   /* Registered using sqlite3_preupdate_hook() */\n    void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64\n  );\n  PreUpdate *pPreUpdate;        /* Context for active pre-update callback */\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n#ifndef SQLITE_OMIT_WAL\n  int (*xWalCallback)(void *, sqlite3 *, const char *, int);\n  void *pWalArg;\n#endif\n  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);\n  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);\n  void *pCollNeededArg;\n  sqlite3_value *pErr;          /* Most recent error message */\n  union {\n    volatile int isInterrupted; /* True if sqlite3_interrupt has been called */\n    double notUsed1;            /* Spacer */\n  } u1;\n  Lookaside lookaside;          /* Lookaside malloc configuration */\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth;          /* Access authorization function */\n  void *pAuthArg;               /* 1st argument to the access auth function */\n#endif\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  int (*xProgress)(void *);     /* The progress callback */\n  void *pProgressArg;           /* Argument to the progress callback */\n  unsigned nProgressOps;        /* Number of opcodes for progress callback */\n#endif\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  int nVTrans;                  /* Allocated size of aVTrans */\n  Hash aModule;                 /* populated by sqlite3_create_module() */\n  VtabCtx *pVtabCtx;            /* Context for active vtab connect/create */\n  VTable **aVTrans;             /* Virtual tables with open transactions */\n  VTable *pDisconnect;          /* Disconnect these in next sqlite3_prepare() */\n#endif\n  Hash aFunc;                   /* Hash table of connection functions */\n  Hash aCollSeq;                /* All collating sequences */\n  BusyHandler busyHandler;      /* Busy callback */\n  Db aDbStatic[2];              /* Static space for the 2 default backends */\n  Savepoint *pSavepoint;        /* List of active savepoints */\n  int nAnalysisLimit;           /* Number of index rows to ANALYZE */\n  int busyTimeout;              /* Busy handler timeout, in msec */\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  int setlkTimeout;             /* Blocking lock timeout, in msec. -1 -> inf. */\n  int setlkFlags;               /* Flags passed to setlk_timeout() */\n#endif\n  int nSavepoint;               /* Number of non-transaction savepoints */\n  int nStatement;               /* Number of nested statement-transactions  */\n  i64 nDeferredCons;            /* Net deferred constraints this transaction. */\n  i64 nDeferredImmCons;         /* Net deferred immediate constraints */\n  int *pnBytesFreed;            /* If not NULL, increment this in DbFree() */\n  DbClientData *pDbData;        /* sqlite3_set_clientdata() content */\n  u64 nSpill;                   /* TEMP content spilled to disk */\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\n  /* The following variables are all protected by the STATIC_MAIN\n  ** mutex, not by sqlite3.mutex. They are used by code in notify.c.\n  **\n  ** When X.pUnlockConnection==Y, that means that X is waiting for Y to\n  ** unlock so that it can proceed.\n  **\n  ** When X.pBlockingConnection==Y, that means that something that X tried\n  ** tried to do recently failed with an SQLITE_LOCKED error due to locks\n  ** held by Y.\n  */\n  sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */\n  sqlite3 *pUnlockConnection;           /* Connection to watch for unlock */\n  void *pUnlockArg;                     /* Argument to xUnlockNotify */\n  void (*xUnlockNotify)(void **, int);  /* Unlock notify callback */\n  sqlite3 *pNextBlocked;        /* Next in list of all blocked connections */\n#endif\n};\n\n/*\n** A macro to discover the encoding of a database.\n*/\n#define SCHEMA_ENC(db) ((db)->aDb[0].pSchema->enc)\n#define ENC(db)        ((db)->enc)\n\n/*\n** A u64 constant where the lower 32 bits are all zeros.  Only the\n** upper 32 bits are included in the argument.  Necessary because some\n** C-compilers still do not accept LL integer literals.\n*/\n#define HI(X)  ((u64)(X)<<32)\n\n/*\n** Possible values for the sqlite3.flags.\n**\n** Value constraints (enforced via assert()):\n**      SQLITE_FullFSync     == PAGER_FULLFSYNC\n**      SQLITE_CkptFullFSync == PAGER_CKPT_FULLFSYNC\n**      SQLITE_CacheSpill    == PAGER_CACHE_SPILL\n*/\n#define SQLITE_WriteSchema    0x00000001  /* OK to update SQLITE_SCHEMA */\n#define SQLITE_LegacyFileFmt  0x00000002  /* Create new databases in format 1 */\n#define SQLITE_FullColNames   0x00000004  /* Show full column names on SELECT */\n#define SQLITE_FullFSync      0x00000008  /* Use full fsync on the backend */\n#define SQLITE_CkptFullFSync  0x00000010  /* Use full fsync for checkpoint */\n#define SQLITE_CacheSpill     0x00000020  /* OK to spill pager cache */\n#define SQLITE_ShortColNames  0x00000040  /* Show short columns names */\n#define SQLITE_TrustedSchema  0x00000080  /* Allow unsafe functions and\n                                          ** vtabs in the schema definition */\n#define SQLITE_NullCallback   0x00000100  /* Invoke the callback once if the */\n                                          /*   result set is empty */\n#define SQLITE_IgnoreChecks   0x00000200  /* Do not enforce check constraints */\n#define SQLITE_StmtScanStatus 0x00000400  /* Enable stmt_scanstats() counters */\n#define SQLITE_NoCkptOnClose  0x00000800  /* No checkpoint on close()/DETACH */\n#define SQLITE_ReverseOrder   0x00001000  /* Reverse unordered SELECTs */\n#define SQLITE_RecTriggers    0x00002000  /* Enable recursive triggers */\n#define SQLITE_ForeignKeys    0x00004000  /* Enforce foreign key constraints  */\n#define SQLITE_AutoIndex      0x00008000  /* Enable automatic indexes */\n#define SQLITE_LoadExtension  0x00010000  /* Enable load_extension */\n#define SQLITE_LoadExtFunc    0x00020000  /* Enable load_extension() SQL func */\n#define SQLITE_EnableTrigger  0x00040000  /* True to enable triggers */\n#define SQLITE_DeferFKs       0x00080000  /* Defer all FK constraints */\n#define SQLITE_QueryOnly      0x00100000  /* Disable database changes */\n#define SQLITE_CellSizeCk     0x00200000  /* Check btree cell sizes on load */\n#define SQLITE_Fts3Tokenizer  0x00400000  /* Enable fts3_tokenizer(2) */\n#define SQLITE_EnableQPSG     0x00800000  /* Query Planner Stability Guarantee*/\n#define SQLITE_TriggerEQP     0x01000000  /* Show trigger EXPLAIN QUERY PLAN */\n#define SQLITE_ResetDatabase  0x02000000  /* Reset the database */\n#define SQLITE_LegacyAlter    0x04000000  /* Legacy ALTER TABLE behaviour */\n#define SQLITE_NoSchemaError  0x08000000  /* Do not report schema parse errors*/\n#define SQLITE_Defensive      0x10000000  /* Input SQL is likely hostile */\n#define SQLITE_DqsDDL         0x20000000  /* dbl-quoted strings allowed in DDL*/\n#define SQLITE_DqsDML         0x40000000  /* dbl-quoted strings allowed in DML*/\n#define SQLITE_EnableView     0x80000000  /* Enable the use of views */\n#define SQLITE_CountRows      HI(0x00001) /* Count rows changed by INSERT, */\n                                          /*   DELETE, or UPDATE and return */\n                                          /*   the count using a callback. */\n#define SQLITE_CorruptRdOnly  HI(0x00002) /* Prohibit writes due to error */\n#define SQLITE_ReadUncommit   HI(0x00004) /* READ UNCOMMITTED in shared-cache */\n#define SQLITE_FkNoAction     HI(0x00008) /* Treat all FK as NO ACTION */\n#define SQLITE_AttachCreate   HI(0x00010) /* ATTACH allowed to create new dbs */\n#define SQLITE_AttachWrite    HI(0x00020) /* ATTACH allowed to open for write */\n#define SQLITE_Comments       HI(0x00040) /* Enable SQL comments */\n\n/* Flags used only if debugging */\n#ifdef SQLITE_DEBUG\n#define SQLITE_SqlTrace       HI(0x0100000) /* Debug print SQL as it executes */\n#define SQLITE_VdbeListing    HI(0x0200000) /* Debug listings of VDBE progs */\n#define SQLITE_VdbeTrace      HI(0x0400000) /* True to trace VDBE execution */\n#define SQLITE_VdbeAddopTrace HI(0x0800000) /* Trace sqlite3VdbeAddOp() calls */\n#define SQLITE_VdbeEQP        HI(0x1000000) /* Debug EXPLAIN QUERY PLAN */\n#define SQLITE_ParserTrace    HI(0x2000000) /* PRAGMA parser_trace=ON */\n#endif\n\n/*\n** Allowed values for sqlite3.mDbFlags\n*/\n#define DBFLAG_SchemaChange   0x0001  /* Uncommitted Hash table changes */\n#define DBFLAG_PreferBuiltin  0x0002  /* Preference to built-in funcs */\n#define DBFLAG_Vacuum         0x0004  /* Currently in a VACUUM */\n#define DBFLAG_VacuumInto     0x0008  /* Currently running VACUUM INTO */\n#define DBFLAG_SchemaKnownOk  0x0010  /* Schema is known to be valid */\n#define DBFLAG_InternalFunc   0x0020  /* Allow use of internal functions */\n#define DBFLAG_EncodingFixed  0x0040  /* No longer possible to change enc. */\n\n/*\n** Bits of the sqlite3.dbOptFlags field that are used by the\n** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface to\n** selectively disable various optimizations.\n*/\n#define SQLITE_QueryFlattener 0x00000001 /* Query flattening */\n#define SQLITE_WindowFunc     0x00000002 /* Use xInverse for window functions */\n#define SQLITE_GroupByOrder   0x00000004 /* GROUPBY cover of ORDERBY */\n#define SQLITE_FactorOutConst 0x00000008 /* Constant factoring */\n#define SQLITE_DistinctOpt    0x00000010 /* DISTINCT using indexes */\n#define SQLITE_CoverIdxScan   0x00000020 /* Covering index scans */\n#define SQLITE_OrderByIdxJoin 0x00000040 /* ORDER BY of joins via index */\n#define SQLITE_Transitive     0x00000080 /* Transitive constraints */\n#define SQLITE_OmitNoopJoin   0x00000100 /* Omit unused tables in joins */\n#define SQLITE_CountOfView    0x00000200 /* The count-of-view optimization */\n#define SQLITE_CursorHints    0x00000400 /* Add OP_CursorHint opcodes */\n#define SQLITE_Stat4          0x00000800 /* Use STAT4 data */\n   /* TH3 expects this value  ^^^^^^^^^^ to be 0x0000800. Don't change it */\n#define SQLITE_PushDown       0x00001000 /* WHERE-clause push-down opt */\n#define SQLITE_SimplifyJoin   0x00002000 /* Convert LEFT JOIN to JOIN */\n#define SQLITE_SkipScan       0x00004000 /* Skip-scans */\n#define SQLITE_PropagateConst 0x00008000 /* The constant propagation opt */\n#define SQLITE_MinMaxOpt      0x00010000 /* The min/max optimization */\n#define SQLITE_SeekScan       0x00020000 /* The OP_SeekScan optimization */\n#define SQLITE_OmitOrderBy    0x00040000 /* Omit pointless ORDER BY */\n   /* TH3 expects this value  ^^^^^^^^^^ to be 0x40000. Coordinate any change */\n#define SQLITE_BloomFilter    0x00080000 /* Use a Bloom filter on searches */\n#define SQLITE_BloomPulldown  0x00100000 /* Run Bloom filters early */\n#define SQLITE_BalancedMerge  0x00200000 /* Balance multi-way merges */\n#define SQLITE_ReleaseReg     0x00400000 /* Use OP_ReleaseReg for testing */\n#define SQLITE_FlttnUnionAll  0x00800000 /* Disable the UNION ALL flattener */\n   /* TH3 expects this value  ^^^^^^^^^^ See flatten04.test */\n#define SQLITE_IndexedExpr    0x01000000 /* Pull exprs from index when able */\n#define SQLITE_Coroutines     0x02000000 /* Co-routines for subqueries */\n#define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */\n#define SQLITE_OnePass        0x08000000 /* Single-pass DELETE and UPDATE */\n#define SQLITE_OrderBySubq    0x10000000 /* ORDER BY in subquery helps outer */\n#define SQLITE_StarQuery      0x20000000 /* Heurists for star queries */\n#define SQLITE_ExistsToJoin   0x40000000 /* The EXISTS-to-JOIN optimization */\n#define SQLITE_AllOpts        0xffffffff /* All optimizations */\n\n/*\n** Macros for testing whether or not optimizations are enabled or disabled.\n*/\n#define OptimizationDisabled(db, mask)  (((db)->dbOptFlags&(mask))!=0)\n#define OptimizationEnabled(db, mask)   (((db)->dbOptFlags&(mask))==0)\n\n/*\n** Return true if it OK to factor constant expressions into the initialization\n** code. The argument is a Parse object for the code generator.\n*/\n#define ConstFactorOk(P) ((P)->okConstFactor)\n\n/* Possible values for the sqlite3.eOpenState field.\n** The numbers are randomly selected such that a minimum of three bits must\n** change to convert any number to another or to zero\n*/\n#define SQLITE_STATE_OPEN     0x76  /* Database is open */\n#define SQLITE_STATE_CLOSED   0xce  /* Database is closed */\n#define SQLITE_STATE_SICK     0xba  /* Error and awaiting close */\n#define SQLITE_STATE_BUSY     0x6d  /* Database currently in use */\n#define SQLITE_STATE_ERROR    0xd5  /* An SQLITE_MISUSE error occurred */\n#define SQLITE_STATE_ZOMBIE   0xa7  /* Close with last statement close */\n\n/*\n** Each SQL function is defined by an instance of the following\n** structure.  For global built-in functions (ex: substr(), max(), count())\n** a pointer to this structure is held in the sqlite3BuiltinFunctions object.\n** For per-connection application-defined functions, a pointer to this\n** structure is held in the db->aHash hash table.\n**\n** The u.pHash field is used by the global built-ins.  The u.pDestructor\n** field is used by per-connection app-def functions.\n*/\nstruct FuncDef {\n  i16 nArg;            /* Number of arguments.  -1 means unlimited */\n  u32 funcFlags;       /* Some combination of SQLITE_FUNC_* */\n  void *pUserData;     /* User data parameter */\n  FuncDef *pNext;      /* Next function with same name */\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value**); /* func or agg-step */\n  void (*xFinalize)(sqlite3_context*);                  /* Agg finalizer */\n  void (*xValue)(sqlite3_context*);                     /* Current agg value */\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value**); /* inverse agg-step */\n  const char *zName;   /* SQL name of the function. */\n  union {\n    FuncDef *pHash;      /* Next with a different name but the same hash */\n    FuncDestructor *pDestructor;   /* Reference counted destructor function */\n  } u; /* pHash if SQLITE_FUNC_BUILTIN, pDestructor otherwise */\n};\n\n/*\n** This structure encapsulates a user-function destructor callback (as\n** configured using create_function_v2()) and a reference counter. When\n** create_function_v2() is called to create a function with a destructor,\n** a single object of this type is allocated. FuncDestructor.nRef is set to\n** the number of FuncDef objects created (either 1 or 3, depending on whether\n** or not the specified encoding is SQLITE_ANY). The FuncDef.pDestructor\n** member of each of the new FuncDef objects is set to point to the allocated\n** FuncDestructor.\n**\n** Thereafter, when one of the FuncDef objects is deleted, the reference\n** count on this object is decremented. When it reaches 0, the destructor\n** is invoked and the FuncDestructor structure freed.\n*/\nstruct FuncDestructor {\n  int nRef;\n  void (*xDestroy)(void *);\n  void *pUserData;\n};\n\n/*\n** Possible values for FuncDef.flags.  Note that the _LENGTH and _TYPEOF\n** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG.  And\n** SQLITE_FUNC_CONSTANT must be the same as SQLITE_DETERMINISTIC.  There\n** are assert() statements in the code to verify this.\n**\n** Value constraints (enforced via assert()):\n**     SQLITE_FUNC_MINMAX      ==  NC_MinMaxAgg      == SF_MinMaxAgg\n**     SQLITE_FUNC_ANYORDER    ==  NC_OrderAgg       == SF_OrderByReqd\n**     SQLITE_FUNC_LENGTH      ==  OPFLAG_LENGTHARG\n**     SQLITE_FUNC_TYPEOF      ==  OPFLAG_TYPEOFARG\n**     SQLITE_FUNC_BYTELEN     ==  OPFLAG_BYTELENARG\n**     SQLITE_FUNC_CONSTANT    ==  SQLITE_DETERMINISTIC from the API\n**     SQLITE_FUNC_DIRECT      ==  SQLITE_DIRECTONLY from the API\n**     SQLITE_FUNC_UNSAFE      ==  SQLITE_INNOCUOUS  -- opposite meanings!!!\n**     SQLITE_FUNC_ENCMASK   depends on SQLITE_UTF* macros in the API\n**\n** Note that even though SQLITE_FUNC_UNSAFE and SQLITE_INNOCUOUS have the\n** same bit value, their meanings are inverted.  SQLITE_FUNC_UNSAFE is\n** used internally and if set means that the function has side effects.\n** SQLITE_INNOCUOUS is used by application code and means \"not unsafe\".\n** See multiple instances of tag-20230109-1.\n*/\n#define SQLITE_FUNC_ENCMASK  0x0003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */\n#define SQLITE_FUNC_LIKE     0x0004 /* Candidate for the LIKE optimization */\n#define SQLITE_FUNC_CASE     0x0008 /* Case-sensitive LIKE-type function */\n#define SQLITE_FUNC_EPHEM    0x0010 /* Ephemeral.  Delete with VDBE */\n#define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/\n#define SQLITE_FUNC_LENGTH   0x0040 /* Built-in length() function */\n#define SQLITE_FUNC_TYPEOF   0x0080 /* Built-in typeof() function */\n#define SQLITE_FUNC_BYTELEN  0x00c0 /* Built-in octet_length() function */\n#define SQLITE_FUNC_COUNT    0x0100 /* Built-in count(*) aggregate */\n/*                           0x0200 -- available for reuse */\n#define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */\n#define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */\n#define SQLITE_FUNC_MINMAX   0x1000 /* True for min() and max() aggregates */\n#define SQLITE_FUNC_SLOCHNG  0x2000 /* \"Slow Change\". Value constant during a\n                                    ** single query - might change over time */\n#define SQLITE_FUNC_TEST     0x4000 /* Built-in testing functions */\n#define SQLITE_FUNC_RUNONLY  0x8000 /* Cannot be used by valueFromFunction */\n#define SQLITE_FUNC_WINDOW   0x00010000 /* Built-in window-only function */\n#define SQLITE_FUNC_INTERNAL 0x00040000 /* For use by NestedParse() only */\n#define SQLITE_FUNC_DIRECT   0x00080000 /* Not for use in TRIGGERs or VIEWs */\n/* SQLITE_SUBTYPE            0x00100000 // Consumer of subtypes */\n#define SQLITE_FUNC_UNSAFE   0x00200000 /* Function has side effects */\n#define SQLITE_FUNC_INLINE   0x00400000 /* Functions implemented in-line */\n#define SQLITE_FUNC_BUILTIN  0x00800000 /* This is a built-in function */\n/*  SQLITE_RESULT_SUBTYPE    0x01000000 // Generator of subtypes */\n#define SQLITE_FUNC_ANYORDER 0x08000000 /* count/min/max aggregate */\n\n/* Identifier numbers for each in-line function */\n#define INLINEFUNC_coalesce             0\n#define INLINEFUNC_implies_nonnull_row  1\n#define INLINEFUNC_expr_implies_expr    2\n#define INLINEFUNC_expr_compare         3\n#define INLINEFUNC_affinity             4\n#define INLINEFUNC_iif                  5\n#define INLINEFUNC_sqlite_offset        6\n#define INLINEFUNC_unlikely            99  /* Default case */\n\n/*\n** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are\n** used to create the initializers for the FuncDef structures.\n**\n**   FUNCTION(zName, nArg, iArg, bNC, xFunc)\n**     Used to create a scalar function definition of a function zName\n**     implemented by C function xFunc that accepts nArg arguments. The\n**     value passed as iArg is cast to a (void*) and made available\n**     as the user-data (sqlite3_user_data()) for the function. If\n**     argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set.\n**\n**   VFUNCTION(zName, nArg, iArg, bNC, xFunc)\n**     Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag.\n**\n**   SFUNCTION(zName, nArg, iArg, bNC, xFunc)\n**     Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and\n**     adds the SQLITE_DIRECTONLY flag.\n**\n**   INLINE_FUNC(zName, nArg, iFuncId, mFlags)\n**     zName is the name of a function that is implemented by in-line\n**     byte code rather than by the usual callbacks. The iFuncId\n**     parameter determines the function id.  The mFlags parameter is\n**     optional SQLITE_FUNC_ flags for this function.\n**\n**   TEST_FUNC(zName, nArg, iFuncId, mFlags)\n**     zName is the name of a test-only function implemented by in-line\n**     byte code rather than by the usual callbacks. The iFuncId\n**     parameter determines the function id.  The mFlags parameter is\n**     optional SQLITE_FUNC_ flags for this function.\n**\n**   DFUNCTION(zName, nArg, iArg, bNC, xFunc)\n**     Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and\n**     adds the SQLITE_FUNC_SLOCHNG flag.  Used for date & time functions\n**     and functions like sqlite_version() that can change, but not during\n**     a single query.  The iArg is ignored.  The user-data is always set\n**     to a NULL pointer.  The bNC parameter is not used.\n**\n**   MFUNCTION(zName, nArg, xPtr, xFunc)\n**     For math-library functions.  xPtr is an arbitrary pointer.\n**\n**   PURE_DATE(zName, nArg, iArg, bNC, xFunc)\n**     Used for \"pure\" date/time functions, this macro is like DFUNCTION\n**     except that it does set the SQLITE_FUNC_CONSTANT flags.  iArg is\n**     ignored and the user-data for these functions is set to an\n**     arbitrary non-NULL pointer.  The bNC parameter is not used.\n**\n**   AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)\n**     Used to create an aggregate function definition implemented by\n**     the C functions xStep and xFinal. The first four parameters\n**     are interpreted in the same way as the first 4 parameters to\n**     FUNCTION().\n**\n**   WAGGREGATE(zName, nArg, iArg, xStep, xFinal, xValue, xInverse)\n**     Used to create an aggregate function definition implemented by\n**     the C functions xStep and xFinal. The first four parameters\n**     are interpreted in the same way as the first 4 parameters to\n**     FUNCTION().\n**\n**   LIKEFUNC(zName, nArg, pArg, flags)\n**     Used to create a scalar function definition of a function zName\n**     that accepts nArg arguments and is implemented by a call to C\n**     function likeFunc. Argument pArg is cast to a (void *) and made\n**     available as the function user-data (sqlite3_user_data()). The\n**     FuncDef.flags variable is set to the value passed as the flags\n**     parameter.\n*/\n#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n   SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \\\n   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} }\n#define VFUNCTION(zName, nArg, iArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \\\n   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} }\n#define SFUNCTION(zName, nArg, iArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_UTF8|SQLITE_DIRECTONLY|SQLITE_FUNC_UNSAFE, \\\n   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} }\n#define MFUNCTION(zName, nArg, xPtr, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_FUNC_CONSTANT|SQLITE_UTF8, \\\n   xPtr, 0, xFunc, 0, 0, 0, #zName, {0} }\n#define JFUNCTION(zName, nArg, bUseCache, bWS, bRS, bJsonB, iArg, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_DETERMINISTIC|SQLITE_FUNC_CONSTANT|\\\n   SQLITE_UTF8|((bUseCache)*SQLITE_FUNC_RUNONLY)|\\\n   ((bRS)*SQLITE_SUBTYPE)|((bWS)*SQLITE_RESULT_SUBTYPE), \\\n   SQLITE_INT_TO_PTR(iArg|((bJsonB)*JSON_BLOB)),0,xFunc,0, 0, 0, #zName, {0} }\n#define INLINE_FUNC(zName, nArg, iArg, mFlags) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n   SQLITE_UTF8|SQLITE_FUNC_INLINE|SQLITE_FUNC_CONSTANT|(mFlags), \\\n   SQLITE_INT_TO_PTR(iArg), 0, noopFunc, 0, 0, 0, #zName, {0} }\n#define TEST_FUNC(zName, nArg, iArg, mFlags) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n         SQLITE_UTF8|SQLITE_FUNC_INTERNAL|SQLITE_FUNC_TEST| \\\n         SQLITE_FUNC_INLINE|SQLITE_FUNC_CONSTANT|(mFlags), \\\n   SQLITE_INT_TO_PTR(iArg), 0, noopFunc, 0, 0, 0, #zName, {0} }\n#define DFUNCTION(zName, nArg, iArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_FUNC_SLOCHNG|SQLITE_UTF8, \\\n   0, 0, xFunc, 0, 0, 0, #zName, {0} }\n#define PURE_DATE(zName, nArg, iArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n         SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|SQLITE_FUNC_CONSTANT, \\\n   (void*)&sqlite3Config, 0, xFunc, 0, 0, 0, #zName, {0} }\n#define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n   SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL)|extraFlags,\\\n   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} }\n#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n   SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \\\n   pArg, 0, xFunc, 0, 0, 0, #zName, {0} }\n#define LIKEFUNC(zName, nArg, arg, flags) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_FUNC_CONSTANT|SQLITE_UTF8|flags, \\\n   (void *)arg, 0, likeFunc, 0, 0, 0, #zName, {0} }\n#define WAGGREGATE(zName, nArg, arg, nc, xStep, xFinal, xValue, xInverse, f) \\\n  {nArg, SQLITE_FUNC_BUILTIN|SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|f, \\\n   SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,xValue,xInverse,#zName, {0}}\n#define INTERNAL_FUNCTION(zName, nArg, xFunc) \\\n  {nArg, SQLITE_FUNC_BUILTIN|\\\n   SQLITE_FUNC_INTERNAL|SQLITE_UTF8|SQLITE_FUNC_CONSTANT, \\\n   0, 0, xFunc, 0, 0, 0, #zName, {0} }\n\n\n/*\n** All current savepoints are stored in a linked list starting at\n** sqlite3.pSavepoint. The first element in the list is the most recently\n** opened savepoint. Savepoints are added to the list by the vdbe\n** OP_Savepoint instruction.\n*/\nstruct Savepoint {\n  char *zName;                        /* Savepoint name (nul-terminated) */\n  i64 nDeferredCons;                  /* Number of deferred fk violations */\n  i64 nDeferredImmCons;               /* Number of deferred imm fk. */\n  Savepoint *pNext;                   /* Parent savepoint (if any) */\n};\n\n/*\n** The following are used as the second parameter to sqlite3Savepoint(),\n** and as the P1 argument to the OP_Savepoint instruction.\n*/\n#define SAVEPOINT_BEGIN      0\n#define SAVEPOINT_RELEASE    1\n#define SAVEPOINT_ROLLBACK   2\n\n\n/*\n** Each SQLite module (virtual table definition) is defined by an\n** instance of the following structure, stored in the sqlite3.aModule\n** hash table.\n*/\nstruct Module {\n  const sqlite3_module *pModule;       /* Callback pointers */\n  const char *zName;                   /* Name passed to create_module() */\n  int nRefModule;                      /* Number of pointers to this object */\n  void *pAux;                          /* pAux passed to create_module() */\n  void (*xDestroy)(void *);            /* Module destructor function */\n  Table *pEpoTab;                      /* Eponymous table for this module */\n};\n\n/*\n** Information about each column of an SQL table is held in an instance\n** of the Column structure, in the Table.aCol[] array.\n**\n** Definitions:\n**\n**   \"table column index\"     This is the index of the column in the\n**                            Table.aCol[] array, and also the index of\n**                            the column in the original CREATE TABLE stmt.\n**\n**   \"storage column index\"   This is the index of the column in the\n**                            record BLOB generated by the OP_MakeRecord\n**                            opcode.  The storage column index is less than\n**                            or equal to the table column index.  It is\n**                            equal if and only if there are no VIRTUAL\n**                            columns to the left.\n**\n** Notes on zCnName:\n** The zCnName field stores the name of the column, the datatype of the\n** column, and the collating sequence for the column, in that order, all in\n** a single allocation.  Each string is 0x00 terminated.  The datatype\n** is only included if the COLFLAG_HASTYPE bit of colFlags is set and the\n** collating sequence name is only included if the COLFLAG_HASCOLL bit is\n** set.\n*/\nstruct Column {\n  char *zCnName;        /* Name of this column */\n  unsigned notNull :4;  /* An OE_ code for handling a NOT NULL constraint */\n  unsigned eCType :4;   /* One of the standard types */\n  char affinity;        /* One of the SQLITE_AFF_... values */\n  u8 szEst;             /* Est size of value in this column. sizeof(INT)==1 */\n  u8 hName;             /* Column name hash for faster lookup */\n  u16 iDflt;            /* 1-based index of DEFAULT.  0 means \"none\" */\n  u16 colFlags;         /* Boolean properties.  See COLFLAG_ defines below */\n};\n\n/* Allowed values for Column.eCType.\n**\n** Values must match entries in the global constant arrays\n** sqlite3StdTypeLen[] and sqlite3StdType[].  Each value is one more\n** than the offset into these arrays for the corresponding name.\n** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.\n*/\n#define COLTYPE_CUSTOM      0   /* Type appended to zName */\n#define COLTYPE_ANY         1\n#define COLTYPE_BLOB        2\n#define COLTYPE_INT         3\n#define COLTYPE_INTEGER     4\n#define COLTYPE_REAL        5\n#define COLTYPE_TEXT        6\n#define SQLITE_N_STDTYPE    6  /* Number of standard types */\n\n/* Allowed values for Column.colFlags.\n**\n** Constraints:\n**         TF_HasVirtual == COLFLAG_VIRTUAL\n**         TF_HasStored  == COLFLAG_STORED\n**         TF_HasHidden  == COLFLAG_HIDDEN\n*/\n#define COLFLAG_PRIMKEY   0x0001   /* Column is part of the primary key */\n#define COLFLAG_HIDDEN    0x0002   /* A hidden column in a virtual table */\n#define COLFLAG_HASTYPE   0x0004   /* Type name follows column name */\n#define COLFLAG_UNIQUE    0x0008   /* Column def contains \"UNIQUE\" or \"PK\" */\n#define COLFLAG_SORTERREF 0x0010   /* Use sorter-refs with this column */\n#define COLFLAG_VIRTUAL   0x0020   /* GENERATED ALWAYS AS ... VIRTUAL */\n#define COLFLAG_STORED    0x0040   /* GENERATED ALWAYS AS ... STORED */\n#define COLFLAG_NOTAVAIL  0x0080   /* STORED column not yet calculated */\n#define COLFLAG_BUSY      0x0100   /* Blocks recursion on GENERATED columns */\n#define COLFLAG_HASCOLL   0x0200   /* Has collating sequence name in zCnName */\n#define COLFLAG_NOEXPAND  0x0400   /* Omit this column when expanding \"*\" */\n#define COLFLAG_GENERATED 0x0060   /* Combo: _STORED, _VIRTUAL */\n#define COLFLAG_NOINSERT  0x0062   /* Combo: _HIDDEN, _STORED, _VIRTUAL */\n\n/*\n** A \"Collating Sequence\" is defined by an instance of the following\n** structure. Conceptually, a collating sequence consists of a name and\n** a comparison routine that defines the order of that sequence.\n**\n** If CollSeq.xCmp is NULL, it means that the\n** collating sequence is undefined.  Indices built on an undefined\n** collating sequence may not be read or written.\n*/\nstruct CollSeq {\n  char *zName;          /* Name of the collating sequence, UTF-8 encoded */\n  u8 enc;               /* Text encoding handled by xCmp() */\n  void *pUser;          /* First argument to xCmp() */\n  int (*xCmp)(void*,int, const void*, int, const void*);\n  void (*xDel)(void*);  /* Destructor for pUser */\n};\n\n/*\n** A sort order can be either ASC or DESC.\n*/\n#define SQLITE_SO_ASC       0  /* Sort in ascending order */\n#define SQLITE_SO_DESC      1  /* Sort in ascending order */\n#define SQLITE_SO_UNDEFINED -1 /* No sort order specified */\n\n/*\n** Column affinity types.\n**\n** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and\n** 't' for SQLITE_AFF_TEXT.  But we can save a little space and improve\n** the speed a little by numbering the values consecutively.\n**\n** But rather than start with 0 or 1, we begin with 'A'.  That way,\n** when multiple affinity types are concatenated into a string and\n** used as the P4 operand, they will be more readable.\n**\n** Note also that the numeric types are grouped together so that testing\n** for a numeric type is a single comparison.  And the BLOB type is first.\n*/\n#define SQLITE_AFF_NONE     0x40  /* '@' */\n#define SQLITE_AFF_BLOB     0x41  /* 'A' */\n#define SQLITE_AFF_TEXT     0x42  /* 'B' */\n#define SQLITE_AFF_NUMERIC  0x43  /* 'C' */\n#define SQLITE_AFF_INTEGER  0x44  /* 'D' */\n#define SQLITE_AFF_REAL     0x45  /* 'E' */\n#define SQLITE_AFF_FLEXNUM  0x46  /* 'F' */\n#define SQLITE_AFF_DEFER    0x58  /* 'X'  - defer computation until later */\n\n#define sqlite3IsNumericAffinity(X)  ((X)>=SQLITE_AFF_NUMERIC)\n\n/*\n** The SQLITE_AFF_MASK values masks off the significant bits of an\n** affinity value.\n*/\n#define SQLITE_AFF_MASK     0x47\n\n/*\n** Additional bit values that can be ORed with an affinity without\n** changing the affinity.\n**\n** The SQLITE_NOTNULL flag is a combination of NULLEQ and JUMPIFNULL.\n** It causes an assert() to fire if either operand to a comparison\n** operator is NULL.  It is added to certain comparison operators to\n** prove that the operands are always NOT NULL.\n*/\n#define SQLITE_JUMPIFNULL   0x10  /* jumps if either operand is NULL */\n#define SQLITE_NULLEQ       0x80  /* NULL=NULL */\n#define SQLITE_NOTNULL      0x90  /* Assert that operands are never NULL */\n\n/*\n** An object of this type is created for each virtual table present in\n** the database schema.\n**\n** If the database schema is shared, then there is one instance of this\n** structure for each database connection (sqlite3*) that uses the shared\n** schema. This is because each database connection requires its own unique\n** instance of the sqlite3_vtab* handle used to access the virtual table\n** implementation. sqlite3_vtab* handles can not be shared between\n** database connections, even when the rest of the in-memory database\n** schema is shared, as the implementation often stores the database\n** connection handle passed to it via the xConnect() or xCreate() method\n** during initialization internally. This database connection handle may\n** then be used by the virtual table implementation to access real tables\n** within the database. So that they appear as part of the callers\n** transaction, these accesses need to be made via the same database\n** connection as that used to execute SQL operations on the virtual table.\n**\n** All VTable objects that correspond to a single table in a shared\n** database schema are initially stored in a linked-list pointed to by\n** the Table.pVTable member variable of the corresponding Table object.\n** When an sqlite3_prepare() operation is required to access the virtual\n** table, it searches the list for the VTable that corresponds to the\n** database connection doing the preparing so as to use the correct\n** sqlite3_vtab* handle in the compiled query.\n**\n** When an in-memory Table object is deleted (for example when the\n** schema is being reloaded for some reason), the VTable objects are not\n** deleted and the sqlite3_vtab* handles are not xDisconnect()ed\n** immediately. Instead, they are moved from the Table.pVTable list to\n** another linked list headed by the sqlite3.pDisconnect member of the\n** corresponding sqlite3 structure. They are then deleted/xDisconnected\n** next time a statement is prepared using said sqlite3*. This is done\n** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.\n** Refer to comments above function sqlite3VtabUnlockList() for an\n** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect\n** list without holding the corresponding sqlite3.mutex mutex.\n**\n** The memory for objects of this type is always allocated by\n** sqlite3DbMalloc(), using the connection handle stored in VTable.db as\n** the first argument.\n*/\nstruct VTable {\n  sqlite3 *db;              /* Database connection associated with this table */\n  Module *pMod;             /* Pointer to module implementation */\n  sqlite3_vtab *pVtab;      /* Pointer to vtab instance */\n  int nRef;                 /* Number of pointers to this structure */\n  u8 bConstraint;           /* True if constraints are supported */\n  u8 bAllSchemas;           /* True if might use any attached schema */\n  u8 eVtabRisk;             /* Riskiness of allowing hacker access */\n  int iSavepoint;           /* Depth of the SAVEPOINT stack */\n  VTable *pNext;            /* Next in linked list (see above) */\n};\n\n/* Allowed values for VTable.eVtabRisk\n*/\n#define SQLITE_VTABRISK_Low          0\n#define SQLITE_VTABRISK_Normal       1\n#define SQLITE_VTABRISK_High         2\n\n/*\n** The schema for each SQL table, virtual table, and view is represented\n** in memory by an instance of the following structure.\n*/\nstruct Table {\n  char *zName;         /* Name of the table or view */\n  Column *aCol;        /* Information about each column */\n  Index *pIndex;       /* List of SQL indexes on this table. */\n  char *zColAff;       /* String defining the affinity of each column */\n  ExprList *pCheck;    /* All CHECK constraints */\n                       /*   ... also used as column name list in a VIEW */\n  Pgno tnum;           /* Root BTree page for this table */\n  u32 nTabRef;         /* Number of pointers to this Table */\n  u32 tabFlags;        /* Mask of TF_* values */\n  i16 iPKey;           /* If not negative, use aCol[iPKey] as the rowid */\n  i16 nCol;            /* Number of columns in this table */\n  i16 nNVCol;          /* Number of columns that are not VIRTUAL */\n  LogEst nRowLogEst;   /* Estimated rows in table - from sqlite_stat1 table */\n  LogEst szTabRow;     /* Estimated size of each table row in bytes */\n#ifdef SQLITE_ENABLE_COSTMULT\n  LogEst costMult;     /* Cost multiplier for using this table */\n#endif\n  u8 keyConf;          /* What to do in case of uniqueness conflict on iPKey */\n  u8 eTabType;         /* 0: normal, 1: virtual, 2: view */\n  union {\n    struct {             /* Used by ordinary tables: */\n      int addColOffset;    /* Offset in CREATE TABLE stmt to add a new column */\n      FKey *pFKey;         /* Linked list of all foreign keys in this table */\n      ExprList *pDfltList; /* DEFAULT clauses on various columns.\n                           ** Or the AS clause for generated columns. */\n    } tab;\n    struct {             /* Used by views: */\n      Select *pSelect;     /* View definition */\n    } view;\n    struct {             /* Used by virtual tables only: */\n      int nArg;            /* Number of arguments to the module */\n      char **azArg;        /* 0: module 1: schema 2: vtab name 3...: args */\n      VTable *p;           /* List of VTable objects. */\n    } vtab;\n  } u;\n  Trigger *pTrigger;   /* List of triggers on this object */\n  Schema *pSchema;     /* Schema that contains this table */\n  u8 aHx[16];          /* Column aHt[K%sizeof(aHt)] might have hash K */\n};\n\n/*\n** Allowed values for Table.tabFlags.\n**\n** TF_OOOHidden applies to tables or view that have hidden columns that are\n** followed by non-hidden columns.  Example:  \"CREATE VIRTUAL TABLE x USING\n** vtab1(a HIDDEN, b);\".  Since \"b\" is a non-hidden column but \"a\" is hidden,\n** the TF_OOOHidden attribute would apply in this case.  Such tables require\n** special handling during INSERT processing. The \"OOO\" means \"Out Of Order\".\n**\n** Constraints:\n**\n**         TF_HasVirtual == COLFLAG_VIRTUAL\n**         TF_HasStored  == COLFLAG_STORED\n**         TF_HasHidden  == COLFLAG_HIDDEN\n*/\n#define TF_Readonly       0x00000001 /* Read-only system table */\n#define TF_HasHidden      0x00000002 /* Has one or more hidden columns */\n#define TF_HasPrimaryKey  0x00000004 /* Table has a primary key */\n#define TF_Autoincrement  0x00000008 /* Integer primary key is autoincrement */\n#define TF_HasStat1       0x00000010 /* nRowLogEst set from sqlite_stat1 */\n#define TF_HasVirtual     0x00000020 /* Has one or more VIRTUAL columns */\n#define TF_HasStored      0x00000040 /* Has one or more STORED columns */\n#define TF_HasGenerated   0x00000060 /* Combo: HasVirtual + HasStored */\n#define TF_WithoutRowid   0x00000080 /* No rowid.  PRIMARY KEY is the key */\n#define TF_MaybeReanalyze 0x00000100 /* Maybe run ANALYZE on this table */\n#define TF_NoVisibleRowid 0x00000200 /* No user-visible \"rowid\" column */\n#define TF_OOOHidden      0x00000400 /* Out-of-Order hidden columns */\n#define TF_HasNotNull     0x00000800 /* Contains NOT NULL constraints */\n#define TF_Shadow         0x00001000 /* True for a shadow table */\n#define TF_HasStat4       0x00002000 /* STAT4 info available for this table */\n#define TF_Ephemeral      0x00004000 /* An ephemeral table */\n#define TF_Eponymous      0x00008000 /* An eponymous virtual table */\n#define TF_Strict         0x00010000 /* STRICT mode */\n#define TF_Imposter       0x00020000 /* An imposter table */\n\n/*\n** Allowed values for Table.eTabType\n*/\n#define TABTYP_NORM      0     /* Ordinary table */\n#define TABTYP_VTAB      1     /* Virtual table */\n#define TABTYP_VIEW      2     /* A view */\n\n#define IsView(X)           ((X)->eTabType==TABTYP_VIEW)\n#define IsOrdinaryTable(X)  ((X)->eTabType==TABTYP_NORM)\n\n/*\n** Test to see whether or not a table is a virtual table.  This is\n** done as a macro so that it will be optimized out when virtual\n** table support is omitted from the build.\n*/\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n#  define IsVirtual(X)      ((X)->eTabType==TABTYP_VTAB)\n#  define ExprIsVtab(X)  \\\n   ((X)->op==TK_COLUMN && (X)->y.pTab->eTabType==TABTYP_VTAB)\n#else\n#  define IsVirtual(X)      0\n#  define ExprIsVtab(X)     0\n#endif\n\n/*\n** Macros to determine if a column is hidden.  IsOrdinaryHiddenColumn()\n** only works for non-virtual tables (ordinary tables and views) and is\n** always false unless SQLITE_ENABLE_HIDDEN_COLUMNS is defined.  The\n** IsHiddenColumn() macro is general purpose.\n*/\n#if defined(SQLITE_ENABLE_HIDDEN_COLUMNS)\n#  define IsHiddenColumn(X)         (((X)->colFlags & COLFLAG_HIDDEN)!=0)\n#  define IsOrdinaryHiddenColumn(X) (((X)->colFlags & COLFLAG_HIDDEN)!=0)\n#elif !defined(SQLITE_OMIT_VIRTUALTABLE)\n#  define IsHiddenColumn(X)         (((X)->colFlags & COLFLAG_HIDDEN)!=0)\n#  define IsOrdinaryHiddenColumn(X) 0\n#else\n#  define IsHiddenColumn(X)         0\n#  define IsOrdinaryHiddenColumn(X) 0\n#endif\n\n\n/* Does the table have a rowid */\n#define HasRowid(X)     (((X)->tabFlags & TF_WithoutRowid)==0)\n#define VisibleRowid(X) (((X)->tabFlags & TF_NoVisibleRowid)==0)\n\n/* Macro is true if the SQLITE_ALLOW_ROWID_IN_VIEW (mis-)feature is\n** available.  By default, this macro is false\n*/\n#ifndef SQLITE_ALLOW_ROWID_IN_VIEW\n# define ViewCanHaveRowid     0\n#else\n# define ViewCanHaveRowid     (sqlite3Config.mNoVisibleRowid==0)\n#endif\n\n/*\n** Each foreign key constraint is an instance of the following structure.\n**\n** A foreign key is associated with two tables.  The \"from\" table is\n** the table that contains the REFERENCES clause that creates the foreign\n** key.  The \"to\" table is the table that is named in the REFERENCES clause.\n** Consider this example:\n**\n**     CREATE TABLE ex1(\n**       a INTEGER PRIMARY KEY,\n**       b INTEGER CONSTRAINT fk1 REFERENCES ex2(x)\n**     );\n**\n** For foreign key \"fk1\", the from-table is \"ex1\" and the to-table is \"ex2\".\n** Equivalent names:\n**\n**     from-table == child-table\n**       to-table == parent-table\n**\n** Each REFERENCES clause generates an instance of the following structure\n** which is attached to the from-table.  The to-table need not exist when\n** the from-table is created.  The existence of the to-table is not checked.\n**\n** The list of all parents for child Table X is held at X.pFKey.\n**\n** A list of all children for a table named Z (which might not even exist)\n** is held in Schema.fkeyHash with a hash key of Z.\n*/\nstruct FKey {\n  Table *pFrom;     /* Table containing the REFERENCES clause (aka: Child) */\n  FKey *pNextFrom;  /* Next FKey with the same in pFrom. Next parent of pFrom */\n  char *zTo;        /* Name of table that the key points to (aka: Parent) */\n  FKey *pNextTo;    /* Next with the same zTo. Next child of zTo. */\n  FKey *pPrevTo;    /* Previous with the same zTo */\n  int nCol;         /* Number of columns in this key */\n  /* EV: R-30323-21917 */\n  u8 isDeferred;       /* True if constraint checking is deferred till COMMIT */\n  u8 aAction[2];        /* ON DELETE and ON UPDATE actions, respectively */\n  Trigger *apTrigger[2];/* Triggers for aAction[] actions */\n  struct sColMap {      /* Mapping of columns in pFrom to columns in zTo */\n    int iFrom;            /* Index of column in pFrom */\n    char *zCol;           /* Name of column in zTo.  If NULL use PRIMARY KEY */\n  } aCol[FLEXARRAY];      /* One entry for each of nCol columns */\n};\n\n/* The size (in bytes) of an FKey object holding N columns.  The answer\n** does NOT include space to hold the zTo name. */\n#define SZ_FKEY(N)  (offsetof(FKey,aCol)+(N)*sizeof(struct sColMap))\n\n/*\n** SQLite supports many different ways to resolve a constraint\n** error.  ROLLBACK processing means that a constraint violation\n** causes the operation in process to fail and for the current transaction\n** to be rolled back.  ABORT processing means the operation in process\n** fails and any prior changes from that one operation are backed out,\n** but the transaction is not rolled back.  FAIL processing means that\n** the operation in progress stops and returns an error code.  But prior\n** changes due to the same operation are not backed out and no rollback\n** occurs.  IGNORE means that the particular row that caused the constraint\n** error is not inserted or updated.  Processing continues and no error\n** is returned.  REPLACE means that preexisting database rows that caused\n** a UNIQUE constraint violation are removed so that the new insert or\n** update can proceed.  Processing continues and no error is reported.\n** UPDATE applies to insert operations only and means that the insert\n** is omitted and the DO UPDATE clause of an upsert is run instead.\n**\n** RESTRICT, SETNULL, SETDFLT, and CASCADE actions apply only to foreign keys.\n** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the\n** same as ROLLBACK for DEFERRED keys.  SETNULL means that the foreign\n** key is set to NULL.  SETDFLT means that the foreign key is set\n** to its default value.  CASCADE means that a DELETE or UPDATE of the\n** referenced table row is propagated into the row that holds the\n** foreign key.\n**\n** The OE_Default value is a place holder that means to use whatever\n** conflict resolution algorithm is required from context.\n**\n** The following symbolic values are used to record which type\n** of conflict resolution action to take.\n*/\n#define OE_None     0   /* There is no constraint to check */\n#define OE_Rollback 1   /* Fail the operation and rollback the transaction */\n#define OE_Abort    2   /* Back out changes but do no rollback transaction */\n#define OE_Fail     3   /* Stop the operation but leave all prior changes */\n#define OE_Ignore   4   /* Ignore the error. Do not do the INSERT or UPDATE */\n#define OE_Replace  5   /* Delete existing record, then do INSERT or UPDATE */\n#define OE_Update   6   /* Process as a DO UPDATE in an upsert */\n#define OE_Restrict 7   /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */\n#define OE_SetNull  8   /* Set the foreign key value to NULL */\n#define OE_SetDflt  9   /* Set the foreign key value to its default */\n#define OE_Cascade  10  /* Cascade the changes */\n#define OE_Default  11  /* Do whatever the default action is */\n\n\n/*\n** An instance of the following structure is passed as the first\n** argument to sqlite3VdbeKeyCompare and is used to control the\n** comparison of the two index keys.\n**\n** The aSortOrder[] and aColl[] arrays have nAllField slots each. There\n** are nKeyField slots for the columns of an index then extra slots\n** for the rowid or key at the end.  The aSortOrder array is located after\n** the aColl[] array.\n**\n** If SQLITE_ENABLE_PREUPDATE_HOOK is defined, then aSortFlags might be NULL\n** to indicate that this object is for use by a preupdate hook.  When aSortFlags\n** is NULL, then nAllField is uninitialized and no space is allocated for\n** aColl[], so those fields may not be used.\n*/\nstruct KeyInfo {\n  u32 nRef;           /* Number of references to this KeyInfo object */\n  u8 enc;             /* Text encoding - one of the SQLITE_UTF* values */\n  u16 nKeyField;      /* Number of key columns in the index */\n  u16 nAllField;      /* Total columns, including key plus others */\n  sqlite3 *db;        /* The database connection */\n  u8 *aSortFlags;     /* Sort order for each column. */\n  CollSeq *aColl[FLEXARRAY]; /* Collating sequence for each term of the key */\n};\n\n/* The size (in bytes) of a KeyInfo object with up to N fields.  This includes\n** the main body of the KeyInfo object and the aColl[] array of N elements,\n** but does not count the memory used to hold aSortFlags[]. */\n#define SZ_KEYINFO(N)  (offsetof(KeyInfo,aColl) + (N)*sizeof(CollSeq*))\n\n/* The size of a bare KeyInfo with no aColl[] entries */\n#if FLEXARRAY+1 > 1\n# define SZ_KEYINFO_0   offsetof(KeyInfo,aColl)\n#else\n# define SZ_KEYINFO_0   sizeof(KeyInfo)\n#endif\n\n/*\n** Allowed bit values for entries in the KeyInfo.aSortFlags[] array.\n*/\n#define KEYINFO_ORDER_DESC    0x01    /* DESC sort order */\n#define KEYINFO_ORDER_BIGNULL 0x02    /* NULL is larger than any other value */\n\n/*\n** This object holds a record which has been parsed out into individual\n** fields, for the purposes of doing a comparison.\n**\n** A record is an object that contains one or more fields of data.\n** Records are used to store the content of a table row and to store\n** the key of an index.  A blob encoding of a record is created by\n** the OP_MakeRecord opcode of the VDBE and is disassembled by the\n** OP_Column opcode.\n**\n** An instance of this object serves as a \"key\" for doing a search on\n** an index b+tree. The goal of the search is to find the entry that\n** is closest to the key described by this object.  This object might hold\n** just a prefix of the key.  The number of fields is given by nField.\n**\n** The r1 and r2 fields are the values to return if this key is less than\n** or greater than a key in the btree, respectively.  These are normally\n** -1 and +1 respectively, but might be inverted to +1 and -1 if the b-tree\n** is in DESC order.\n**\n** The key comparison functions actually return default_rc when they find\n** an equals comparison.  default_rc can be -1, 0, or +1.  If there are\n** multiple entries in the b-tree with the same key (when only looking\n** at the first nField elements) then default_rc can be set to -1 to\n** cause the search to find the last match, or +1 to cause the search to\n** find the first match.\n**\n** The key comparison functions will set eqSeen to true if they ever\n** get and equal results when comparing this structure to a b-tree record.\n** When default_rc!=0, the search might end up on the record immediately\n** before the first match or immediately after the last match.  The\n** eqSeen field will indicate whether or not an exact match exists in the\n** b-tree.\n*/\nstruct UnpackedRecord {\n  KeyInfo *pKeyInfo;  /* Comparison info for the index that is unpacked */\n  Mem *aMem;          /* Values for columns of the index */\n  union {\n    char *z;            /* Cache of aMem[0].z for vdbeRecordCompareString() */\n    i64 i;              /* Cache of aMem[0].u.i for vdbeRecordCompareInt() */\n  } u;\n  int n;              /* Cache of aMem[0].n used by vdbeRecordCompareString() */\n  u16 nField;         /* Number of entries in apMem[] */\n  i8 default_rc;      /* Comparison result if keys are equal */\n  u8 errCode;         /* Error detected by xRecordCompare (CORRUPT or NOMEM) */\n  i8 r1;              /* Value to return if (lhs < rhs) */\n  i8 r2;              /* Value to return if (lhs > rhs) */\n  u8 eqSeen;          /* True if an equality comparison has been seen */\n};\n\n\n/*\n** Each SQL index is represented in memory by an\n** instance of the following structure.\n**\n** The columns of the table that are to be indexed are described\n** by the aiColumn[] field of this structure.  For example, suppose\n** we have the following table and index:\n**\n**     CREATE TABLE Ex1(c1 int, c2 int, c3 text);\n**     CREATE INDEX Ex2 ON Ex1(c3,c1);\n**\n** In the Table structure describing Ex1, nCol==3 because there are\n** three columns in the table.  In the Index structure describing\n** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed.\n** The value of aiColumn is {2, 0}.  aiColumn[0]==2 because the\n** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].\n** The second column to be indexed (c1) has an index of 0 in\n** Ex1.aCol[], hence Ex2.aiColumn[1]==0.\n**\n** The Index.onError field determines whether or not the indexed columns\n** must be unique and what to do if they are not.  When Index.onError=OE_None,\n** it means this is not a unique index.  Otherwise it is a unique index\n** and the value of Index.onError indicates which conflict resolution\n** algorithm to employ when an attempt is made to insert a non-unique\n** element.\n**\n** The colNotIdxed bitmask is used in combination with SrcItem.colUsed\n** for a fast test to see if an index can serve as a covering index.\n** colNotIdxed has a 1 bit for every column of the original table that\n** is *not* available in the index.  Thus the expression\n** \"colUsed & colNotIdxed\" will be non-zero if the index is not a\n** covering index.  The most significant bit of of colNotIdxed will always\n** be true (note-20221022-a).  If a column beyond the 63rd column of the\n** table is used, the \"colUsed & colNotIdxed\" test will always be non-zero\n** and we have to assume either that the index is not covering, or use\n** an alternative (slower) algorithm to determine whether or not\n** the index is covering.\n**\n** While parsing a CREATE TABLE or CREATE INDEX statement in order to\n** generate VDBE code (as opposed to parsing one read from an sqlite_schema\n** table as part of parsing an existing database schema), transient instances\n** of this structure may be created. In this case the Index.tnum variable is\n** used to store the address of a VDBE instruction, not a database page\n** number (it cannot - the database page is not allocated until the VDBE\n** program is executed). See convertToWithoutRowidTable() for details.\n*/\nstruct Index {\n  char *zName;             /* Name of this index */\n  i16 *aiColumn;           /* Which columns are used by this index.  1st is 0 */\n  LogEst *aiRowLogEst;     /* From ANALYZE: Est. rows selected by each column */\n  Table *pTable;           /* The SQL table being indexed */\n  char *zColAff;           /* String defining the affinity of each column */\n  Index *pNext;            /* The next index associated with the same table */\n  Schema *pSchema;         /* Schema containing this index */\n  u8 *aSortOrder;          /* for each column: True==DESC, False==ASC */\n  const char **azColl;     /* Array of collation sequence names for index */\n  Expr *pPartIdxWhere;     /* WHERE clause for partial indices */\n  ExprList *aColExpr;      /* Column expressions */\n  Pgno tnum;               /* DB Page containing root of this index */\n  LogEst szIdxRow;         /* Estimated average row size in bytes */\n  u16 nKeyCol;             /* Number of columns forming the key */\n  u16 nColumn;             /* Nr columns in btree. Can be 2*Table.nCol */\n  u8 onError;              /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */\n  unsigned idxType:2;      /* 0:Normal 1:UNIQUE, 2:PRIMARY KEY, 3:IPK */\n  unsigned bUnordered:1;   /* Use this index for == or IN queries only */\n  unsigned uniqNotNull:1;  /* True if UNIQUE and NOT NULL for all columns */\n  unsigned isResized:1;    /* True if resizeIndexObject() has been called */\n  unsigned isCovering:1;   /* True if this is a covering index */\n  unsigned noSkipScan:1;   /* Do not try to use skip-scan if true */\n  unsigned hasStat1:1;     /* aiRowLogEst values come from sqlite_stat1 */\n  unsigned bNoQuery:1;     /* Do not use this index to optimize queries */\n  unsigned bAscKeyBug:1;   /* True if the bba7b69f9849b5bf bug applies */\n  unsigned bHasVCol:1;     /* Index references one or more VIRTUAL columns */\n  unsigned bHasExpr:1;     /* Index contains an expression, either a literal\n                           ** expression, or a reference to a VIRTUAL column */\n#ifdef SQLITE_ENABLE_STAT4\n  int nSample;             /* Number of elements in aSample[] */\n  int mxSample;            /* Number of slots allocated to aSample[] */\n  int nSampleCol;          /* Size of IndexSample.anEq[] and so on */\n  tRowcnt *aAvgEq;         /* Average nEq values for keys not in aSample */\n  IndexSample *aSample;    /* Samples of the left-most key */\n  tRowcnt *aiRowEst;       /* Non-logarithmic stat1 data for this index */\n  tRowcnt nRowEst0;        /* Non-logarithmic number of rows in the index */\n#endif\n  Bitmask colNotIdxed;     /* Unindexed columns in pTab */\n};\n\n/*\n** Allowed values for Index.idxType\n*/\n#define SQLITE_IDXTYPE_APPDEF      0   /* Created using CREATE INDEX */\n#define SQLITE_IDXTYPE_UNIQUE      1   /* Implements a UNIQUE constraint */\n#define SQLITE_IDXTYPE_PRIMARYKEY  2   /* Is the PRIMARY KEY for the table */\n#define SQLITE_IDXTYPE_IPK         3   /* INTEGER PRIMARY KEY index */\n\n/* Return true if index X is a PRIMARY KEY index */\n#define IsPrimaryKeyIndex(X)  ((X)->idxType==SQLITE_IDXTYPE_PRIMARYKEY)\n\n/* Return true if index X is a UNIQUE index */\n#define IsUniqueIndex(X)      ((X)->onError!=OE_None)\n\n/* The Index.aiColumn[] values are normally positive integer.  But\n** there are some negative values that have special meaning:\n*/\n#define XN_ROWID     (-1)     /* Indexed column is the rowid */\n#define XN_EXPR      (-2)     /* Indexed column is an expression */\n\n/*\n** Each sample stored in the sqlite_stat4 table is represented in memory\n** using a structure of this type.  See documentation at the top of the\n** analyze.c source file for additional information.\n*/\nstruct IndexSample {\n  void *p;          /* Pointer to sampled record */\n  int n;            /* Size of record in bytes */\n  tRowcnt *anEq;    /* Est. number of rows where the key equals this sample */\n  tRowcnt *anLt;    /* Est. number of rows where key is less than this sample */\n  tRowcnt *anDLt;   /* Est. number of distinct keys less than this sample */\n};\n\n/*\n** Possible values to use within the flags argument to sqlite3GetToken().\n*/\n#define SQLITE_TOKEN_QUOTED    0x1 /* Token is a quoted identifier. */\n#define SQLITE_TOKEN_KEYWORD   0x2 /* Token is a keyword. */\n\n/*\n** Each token coming out of the lexer is an instance of\n** this structure.  Tokens are also used as part of an expression.\n**\n** The memory that \"z\" points to is owned by other objects.  Take care\n** that the owner of the \"z\" string does not deallocate the string before\n** the Token goes out of scope!  Very often, the \"z\" points to some place\n** in the middle of the Parse.zSql text.  But it might also point to a\n** static string.\n*/\nstruct Token {\n  const char *z;     /* Text of the token.  Not NULL-terminated! */\n  unsigned int n;    /* Number of characters in this token */\n};\n\n/*\n** An instance of this structure contains information needed to generate\n** code for a SELECT that contains aggregate functions.\n**\n** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a\n** pointer to this structure.  The Expr.iAgg field is the index in\n** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate\n** code for that node.\n**\n** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the\n** original Select structure that describes the SELECT statement.  These\n** fields do not need to be freed when deallocating the AggInfo structure.\n*/\nstruct AggInfo {\n  u8 directMode;          /* Direct rendering mode means take data directly\n                          ** from source tables rather than from accumulators */\n  u8 useSortingIdx;       /* In direct mode, reference the sorting index rather\n                          ** than the source table */\n  u32 nSortingColumn;     /* Number of columns in the sorting index */\n  int sortingIdx;         /* Cursor number of the sorting index */\n  int sortingIdxPTab;     /* Cursor number of pseudo-table */\n  int iFirstReg;          /* First register in range for aCol[] and aFunc[] */\n  ExprList *pGroupBy;     /* The group by clause */\n  struct AggInfo_col {    /* For each column used in source tables */\n    Table *pTab;             /* Source table */\n    Expr *pCExpr;            /* The original expression */\n    int iTable;              /* Cursor number of the source table */\n    int iColumn;             /* Column number within the source table */\n    int iSorterColumn;       /* Column number in the sorting index */\n  } *aCol;\n  int nColumn;            /* Number of used entries in aCol[] */\n  int nAccumulator;       /* Number of columns that show through to the output.\n                          ** Additional columns are used only as parameters to\n                          ** aggregate functions */\n  struct AggInfo_func {   /* For each aggregate function */\n    Expr *pFExpr;            /* Expression encoding the function */\n    FuncDef *pFunc;          /* The aggregate function implementation */\n    int iDistinct;           /* Ephemeral table used to enforce DISTINCT */\n    int iDistAddr;           /* Address of OP_OpenEphemeral */\n    int iOBTab;              /* Ephemeral table to implement ORDER BY */\n    u8 bOBPayload;           /* iOBTab has payload columns separate from key */\n    u8 bOBUnique;            /* Enforce uniqueness on iOBTab keys */\n    u8 bUseSubtype;          /* Transfer subtype info through sorter */\n  } *aFunc;\n  int nFunc;              /* Number of entries in aFunc[] */\n  u32 selId;              /* Select to which this AggInfo belongs */\n#ifdef SQLITE_DEBUG\n  Select *pSelect;        /* SELECT statement that this AggInfo supports */\n#endif\n};\n\n/*\n** Macros to compute aCol[] and aFunc[] register numbers.\n**\n** These macros should not be used prior to the call to\n** assignAggregateRegisters() that computes the value of pAggInfo->iFirstReg.\n** The assert()s that are part of this macro verify that constraint.\n*/\n#ifndef NDEBUG\n#define AggInfoColumnReg(A,I)  (assert((A)->iFirstReg),(A)->iFirstReg+(I))\n#define AggInfoFuncReg(A,I)    \\\n                      (assert((A)->iFirstReg),(A)->iFirstReg+(A)->nColumn+(I))\n#else\n#define AggInfoColumnReg(A,I)  ((A)->iFirstReg+(I))\n#define AggInfoFuncReg(A,I)    \\\n                      ((A)->iFirstReg+(A)->nColumn+(I))\n#endif\n\n/*\n** The datatype ynVar is a signed integer, either 16-bit or 32-bit.\n** Usually it is 16-bits.  But if SQLITE_MAX_VARIABLE_NUMBER is greater\n** than 32767 we have to make it 32-bit.  16-bit is preferred because\n** it uses less memory in the Expr object, which is a big memory user\n** in systems with lots of prepared statements.  And few applications\n** need more than about 10 or 20 variables.  But some extreme users want\n** to have prepared statements with over 32766 variables, and for them\n** the option is available (at compile-time).\n*/\n#if SQLITE_MAX_VARIABLE_NUMBER<32767\ntypedef i16 ynVar;\n#else\ntypedef int ynVar;\n#endif\n\n/*\n** Each node of an expression in the parse tree is an instance\n** of this structure.\n**\n** Expr.op is the opcode. The integer parser token codes are reused\n** as opcodes here. For example, the parser defines TK_GE to be an integer\n** code representing the \">=\" operator. This same integer code is reused\n** to represent the greater-than-or-equal-to operator in the expression\n** tree.\n**\n** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB,\n** or TK_STRING), then Expr.u.zToken contains the text of the SQL literal. If\n** the expression is a variable (TK_VARIABLE), then Expr.u.zToken contains the\n** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),\n** then Expr.u.zToken contains the name of the function.\n**\n** Expr.pRight and Expr.pLeft are the left and right subexpressions of a\n** binary operator. Either or both may be NULL.\n**\n** Expr.x.pList is a list of arguments if the expression is an SQL function,\n** a CASE expression or an IN expression of the form \"<lhs> IN (<y>, <z>...)\".\n** Expr.x.pSelect is used if the expression is a sub-select or an expression of\n** the form \"<lhs> IN (SELECT ...)\". If the EP_xIsSelect bit is set in the\n** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is\n** valid.\n**\n** An expression of the form ID or ID.ID refers to a column in a table.\n** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is\n** the integer cursor number of a VDBE cursor pointing to that table and\n** Expr.iColumn is the column number for the specific column.  If the\n** expression is used as a result in an aggregate SELECT, then the\n** value is also stored in the Expr.iAgg column in the aggregate so that\n** it can be accessed after all aggregates are computed.\n**\n** If the expression is an unbound variable marker (a question mark\n** character '?' in the original SQL) then the Expr.iTable holds the index\n** number for that variable.\n**\n** If the expression is a subquery then Expr.iColumn holds an integer\n** register number containing the result of the subquery.  If the\n** subquery gives a constant result, then iTable is -1.  If the subquery\n** gives a different answer at different times during statement processing\n** then iTable is the address of a subroutine that computes the subquery.\n**\n** If the Expr is of type OP_Column, and the table it is selecting from\n** is a disk table or the \"old.*\" pseudo-table, then pTab points to the\n** corresponding table definition.\n**\n** ALLOCATION NOTES:\n**\n** Expr objects can use a lot of memory space in database schema.  To\n** help reduce memory requirements, sometimes an Expr object will be\n** truncated.  And to reduce the number of memory allocations, sometimes\n** two or more Expr objects will be stored in a single memory allocation,\n** together with Expr.u.zToken strings.\n**\n** If the EP_Reduced and EP_TokenOnly flags are set when\n** an Expr object is truncated.  When EP_Reduced is set, then all\n** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees\n** are contained within the same memory allocation.  Note, however, that\n** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately\n** allocated, regardless of whether or not EP_Reduced is set.\n*/\nstruct Expr {\n  u8 op;                 /* Operation performed by this node */\n  char affExpr;          /* affinity, or RAISE type */\n  u8 op2;                /* TK_REGISTER/TK_TRUTH: original value of Expr.op\n                         ** TK_COLUMN: the value of p5 for OP_Column\n                         ** TK_AGG_FUNCTION: nesting depth\n                         ** TK_FUNCTION: NC_SelfRef flag if needs OP_PureFunc */\n#ifdef SQLITE_DEBUG\n  u8 vvaFlags;           /* Verification flags. */\n#endif\n  u32 flags;             /* Various flags.  EP_* See below */\n  union {\n    char *zToken;          /* Token value. Zero terminated and dequoted */\n    int iValue;            /* Non-negative integer value if EP_IntValue */\n  } u;\n\n  /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no\n  ** space is allocated for the fields below this point. An attempt to\n  ** access them will result in a segfault or malfunction.\n  *********************************************************************/\n\n  Expr *pLeft;           /* Left subnode */\n  Expr *pRight;          /* Right subnode */\n  union {\n    ExprList *pList;     /* op = IN, EXISTS, SELECT, CASE, FUNCTION, BETWEEN */\n    Select *pSelect;     /* EP_xIsSelect and op = IN, EXISTS, SELECT */\n  } x;\n\n  /* If the EP_Reduced flag is set in the Expr.flags mask, then no\n  ** space is allocated for the fields below this point. An attempt to\n  ** access them will result in a segfault or malfunction.\n  *********************************************************************/\n\n#if SQLITE_MAX_EXPR_DEPTH>0\n  int nHeight;           /* Height of the tree headed by this node */\n#endif\n  int iTable;            /* TK_COLUMN: cursor number of table holding column\n                         ** TK_REGISTER: register number\n                         ** TK_TRIGGER: 1 -> new, 0 -> old\n                         ** EP_Unlikely:  134217728 times likelihood\n                         ** TK_IN: ephemeral table holding RHS\n                         ** TK_SELECT_COLUMN: Number of columns on the LHS\n                         ** TK_SELECT: 1st register of result vector */\n  ynVar iColumn;         /* TK_COLUMN: column index.  -1 for rowid.\n                         ** TK_VARIABLE: variable number (always >= 1).\n                         ** TK_SELECT_COLUMN: column of the result vector */\n  i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */\n  union {\n    int iJoin;             /* If EP_OuterON or EP_InnerON, the right table */\n    int iOfst;             /* else: start of token from start of statement */\n  } w;\n  AggInfo *pAggInfo;     /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */\n  union {\n    Table *pTab;           /* TK_COLUMN: Table containing column. Can be NULL\n                           ** for a column of an index on an expression */\n    Window *pWin;          /* EP_WinFunc: Window/Filter defn for a function */\n    int nReg;              /* TK_NULLS: Number of registers to NULL out */\n    struct {               /* TK_IN, TK_SELECT, and TK_EXISTS */\n      int iAddr;             /* Subroutine entry address */\n      int regReturn;         /* Register used to hold return address */\n    } sub;\n  } y;\n};\n\n/* The following are the meanings of bits in the Expr.flags field.\n** Value restrictions:\n**\n**          EP_Agg == NC_HasAgg == SF_HasAgg\n**          EP_Win == NC_HasWin\n*/\n#define EP_OuterON    0x000001 /* Originates in ON/USING clause of outer join */\n#define EP_InnerON    0x000002 /* Originates in ON/USING of an inner join */\n#define EP_Distinct   0x000004 /* Aggregate function with DISTINCT keyword */\n#define EP_HasFunc    0x000008 /* Contains one or more functions of any kind */\n#define EP_Agg        0x000010 /* Contains one or more aggregate functions */\n#define EP_FixedCol   0x000020 /* TK_Column with a known fixed value */\n#define EP_VarSelect  0x000040 /* pSelect is correlated, not constant */\n#define EP_DblQuoted  0x000080 /* token.z was originally in \"...\" */\n#define EP_InfixFunc  0x000100 /* True for an infix function: LIKE, GLOB, etc */\n#define EP_Collate    0x000200 /* Tree contains a TK_COLLATE operator */\n#define EP_Commuted   0x000400 /* Comparison operator has been commuted */\n#define EP_IntValue   0x000800 /* Integer value contained in u.iValue */\n#define EP_xIsSelect  0x001000 /* x.pSelect is valid (otherwise x.pList is) */\n#define EP_Skip       0x002000 /* Operator does not contribute to affinity */\n#define EP_Reduced    0x004000 /* Expr struct EXPR_REDUCEDSIZE bytes only */\n#define EP_Win        0x008000 /* Contains window functions */\n#define EP_TokenOnly  0x010000 /* Expr struct EXPR_TOKENONLYSIZE bytes only */\n#define EP_FullSize   0x020000 /* Expr structure must remain full sized */\n#define EP_IfNullRow  0x040000 /* The TK_IF_NULL_ROW opcode */\n#define EP_Unlikely   0x080000 /* unlikely() or likelihood() function */\n#define EP_ConstFunc  0x100000 /* A SQLITE_FUNC_CONSTANT or _SLOCHNG function */\n#define EP_CanBeNull  0x200000 /* Can be null despite NOT NULL constraint */\n#define EP_Subquery   0x400000 /* Tree contains a TK_SELECT operator */\n#define EP_Leaf       0x800000 /* Expr.pLeft, .pRight, .u.pSelect all NULL */\n#define EP_WinFunc   0x1000000 /* TK_FUNCTION with Expr.y.pWin set */\n#define EP_Subrtn    0x2000000 /* Uses Expr.y.sub. TK_IN, _SELECT, or _EXISTS */\n#define EP_Quoted    0x4000000 /* TK_ID was originally quoted */\n#define EP_Static    0x8000000 /* Held in memory not obtained from malloc() */\n#define EP_IsTrue   0x10000000 /* Always has boolean value of TRUE */\n#define EP_IsFalse  0x20000000 /* Always has boolean value of FALSE */\n#define EP_FromDDL  0x40000000 /* Originates from sqlite_schema */\n#define EP_SubtArg  0x80000000 /* Is argument to SQLITE_SUBTYPE function */\n\n/* The EP_Propagate mask is a set of properties that automatically propagate\n** upwards into parent nodes.\n*/\n#define EP_Propagate (EP_Collate|EP_Subquery|EP_HasFunc)\n\n/* Macros can be used to test, set, or clear bits in the\n** Expr.flags field.\n*/\n#define ExprHasProperty(E,P)     (((E)->flags&(u32)(P))!=0)\n#define ExprHasAllProperty(E,P)  (((E)->flags&(u32)(P))==(u32)(P))\n#define ExprSetProperty(E,P)     (E)->flags|=(u32)(P)\n#define ExprClearProperty(E,P)   (E)->flags&=~(u32)(P)\n#define ExprAlwaysTrue(E)   (((E)->flags&(EP_OuterON|EP_IsTrue))==EP_IsTrue)\n#define ExprAlwaysFalse(E)  (((E)->flags&(EP_OuterON|EP_IsFalse))==EP_IsFalse)\n#define ExprIsFullSize(E)   (((E)->flags&(EP_Reduced|EP_TokenOnly))==0)\n\n/* Macros used to ensure that the correct members of unions are accessed\n** in Expr.\n*/\n#define ExprUseUToken(E)    (((E)->flags&EP_IntValue)==0)\n#define ExprUseUValue(E)    (((E)->flags&EP_IntValue)!=0)\n#define ExprUseWOfst(E)     (((E)->flags&(EP_InnerON|EP_OuterON))==0)\n#define ExprUseWJoin(E)     (((E)->flags&(EP_InnerON|EP_OuterON))!=0)\n#define ExprUseXList(E)     (((E)->flags&EP_xIsSelect)==0)\n#define ExprUseXSelect(E)   (((E)->flags&EP_xIsSelect)!=0)\n#define ExprUseYTab(E)      (((E)->flags&(EP_WinFunc|EP_Subrtn))==0)\n#define ExprUseYWin(E)      (((E)->flags&EP_WinFunc)!=0)\n#define ExprUseYSub(E)      (((E)->flags&EP_Subrtn)!=0)\n\n/* Flags for use with Expr.vvaFlags\n*/\n#define EP_NoReduce   0x01  /* Cannot EXPRDUP_REDUCE this Expr */\n#define EP_Immutable  0x02  /* Do not change this Expr node */\n\n/* The ExprSetVVAProperty() macro is used for Verification, Validation,\n** and Accreditation only.  It works like ExprSetProperty() during VVA\n** processes but is a no-op for delivery.\n*/\n#ifdef SQLITE_DEBUG\n# define ExprSetVVAProperty(E,P)   (E)->vvaFlags|=(P)\n# define ExprHasVVAProperty(E,P)   (((E)->vvaFlags&(P))!=0)\n# define ExprClearVVAProperties(E) (E)->vvaFlags = 0\n#else\n# define ExprSetVVAProperty(E,P)\n# define ExprHasVVAProperty(E,P)   0\n# define ExprClearVVAProperties(E)\n#endif\n\n/*\n** Macros to determine the number of bytes required by a normal Expr\n** struct, an Expr struct with the EP_Reduced flag set in Expr.flags\n** and an Expr struct with the EP_TokenOnly flag set.\n*/\n#define EXPR_FULLSIZE           sizeof(Expr)           /* Full size */\n#define EXPR_REDUCEDSIZE        offsetof(Expr,iTable)  /* Common features */\n#define EXPR_TOKENONLYSIZE      offsetof(Expr,pLeft)   /* Fewer features */\n\n/*\n** Flags passed to the sqlite3ExprDup() function. See the header comment\n** above sqlite3ExprDup() for details.\n*/\n#define EXPRDUP_REDUCE         0x0001  /* Used reduced-size Expr nodes */\n\n/*\n** True if the expression passed as an argument was a function with\n** an OVER() clause (a window function).\n*/\n#ifdef SQLITE_OMIT_WINDOWFUNC\n# define IsWindowFunc(p) 0\n#else\n# define IsWindowFunc(p) ( \\\n    ExprHasProperty((p), EP_WinFunc) && p->y.pWin->eFrmType!=TK_FILTER \\\n )\n#endif\n\n/*\n** A list of expressions.  Each expression may optionally have a\n** name.  An expr/name combination can be used in several ways, such\n** as the list of \"expr AS ID\" fields following a \"SELECT\" or in the\n** list of \"ID = expr\" items in an UPDATE.  A list of expressions can\n** also be used as the argument to a function, in which case the a.zName\n** field is not used.\n**\n** In order to try to keep memory usage down, the Expr.a.zEName field\n** is used for multiple purposes:\n**\n**     eEName          Usage\n**    ----------       -------------------------\n**    ENAME_NAME       (1) the AS of result set column\n**                     (2) COLUMN= of an UPDATE\n**\n**    ENAME_TAB        DB.TABLE.NAME used to resolve names\n**                     of subqueries\n**\n**    ENAME_SPAN       Text of the original result set\n**                     expression.\n*/\nstruct ExprList {\n  int nExpr;             /* Number of expressions on the list */\n  int nAlloc;            /* Number of a[] slots allocated */\n  struct ExprList_item { /* For each expression in the list */\n    Expr *pExpr;            /* The parse tree for this expression */\n    char *zEName;           /* Token associated with this expression */\n    struct {\n      u8 sortFlags;           /* Mask of KEYINFO_ORDER_* flags */\n      unsigned eEName :2;     /* Meaning of zEName */\n      unsigned done :1;       /* Indicates when processing is finished */\n      unsigned reusable :1;   /* Constant expression is reusable */\n      unsigned bSorterRef :1; /* Defer evaluation until after sorting */\n      unsigned bNulls :1;     /* True if explicit \"NULLS FIRST/LAST\" */\n      unsigned bUsed :1;      /* This column used in a SF_NestedFrom subquery */\n      unsigned bUsingTerm:1;  /* Term from the USING clause of a NestedFrom */\n      unsigned bNoExpand: 1;  /* Term is an auxiliary in NestedFrom and should\n                              ** not be expanded by \"*\" in parent queries */\n    } fg;\n    union {\n      struct {             /* Used by any ExprList other than Parse.pConsExpr */\n        u16 iOrderByCol;      /* For ORDER BY, column number in result set */\n        u16 iAlias;           /* Index into Parse.aAlias[] for zName */\n      } x;\n      int iConstExprReg;   /* Register in which Expr value is cached. Used only\n                           ** by Parse.pConstExpr */\n    } u;\n  } a[FLEXARRAY];          /* One slot for each expression in the list */\n};\n\n/* The size (in bytes) of an ExprList object that is big enough to hold\n** as many as N expressions. */\n#define SZ_EXPRLIST(N)  \\\n             (offsetof(ExprList,a) + (N)*sizeof(struct ExprList_item))\n\n/*\n** Allowed values for Expr.a.eEName\n*/\n#define ENAME_NAME  0       /* The AS clause of a result set */\n#define ENAME_SPAN  1       /* Complete text of the result set expression */\n#define ENAME_TAB   2       /* \"DB.TABLE.NAME\" for the result set */\n#define ENAME_ROWID 3       /* \"DB.TABLE._rowid_\" for * expansion of rowid */\n\n/*\n** An instance of this structure can hold a simple list of identifiers,\n** such as the list \"a,b,c\" in the following statements:\n**\n**      INSERT INTO t(a,b,c) VALUES ...;\n**      CREATE INDEX idx ON t(a,b,c);\n**      CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...;\n**\n** The IdList.a.idx field is used when the IdList represents the list of\n** column names after a table name in an INSERT statement.  In the statement\n**\n**     INSERT INTO t(a,b,c) ...\n**\n** If \"a\" is the k-th column of table \"t\", then IdList.a[0].idx==k.\n*/\nstruct IdList {\n  int nId;         /* Number of identifiers on the list */\n  struct IdList_item {\n    char *zName;      /* Name of the identifier */\n  } a[FLEXARRAY];\n};\n\n/* The size (in bytes) of an IdList object that can hold up to N IDs. */\n#define SZ_IDLIST(N)  (offsetof(IdList,a)+(N)*sizeof(struct IdList_item))\n\n/*\n** Allowed values for IdList.eType, which determines which value of the a.u4\n** is valid.\n*/\n#define EU4_NONE   0   /* Does not use IdList.a.u4 */\n#define EU4_IDX    1   /* Uses IdList.a.u4.idx */\n#define EU4_EXPR   2   /* Uses IdList.a.u4.pExpr -- NOT CURRENTLY USED */\n\n/*\n** Details of the implementation of a subquery.\n*/\nstruct Subquery {\n  Select *pSelect;  /* A SELECT statement used in place of a table name */\n  int addrFillSub;  /* Address of subroutine to initialize a subquery */\n  int regReturn;    /* Register holding return address of addrFillSub */\n  int regResult;    /* Registers holding results of a co-routine */\n};\n\n/*\n** The SrcItem object represents a single term in the FROM clause of a query.\n** The SrcList object is mostly an array of SrcItems.\n**\n** The jointype starts out showing the join type between the current table\n** and the next table on the list.  The parser builds the list this way.\n** But sqlite3SrcListShiftJoinType() later shifts the jointypes so that each\n** jointype expresses the join between the table and the previous table.\n**\n** In the colUsed field, the high-order bit (bit 63) is set if the table\n** contains more than 63 columns and the 64-th or later column is used.\n**\n** Aggressive use of \"union\" helps keep the size of the object small.  This\n** has been shown to boost performance, in addition to saving memory.\n** Access to union elements is gated by the following rules which should\n** always be checked, either by an if-statement or by an assert().\n**\n**    Field              Only access if this is true\n**    ---------------    -----------------------------------\n**    u1.zIndexedBy      fg.isIndexedBy\n**    u1.pFuncArg        fg.isTabFunc\n**    u1.nRow            !fg.isTabFunc  && !fg.isIndexedBy\n**\n**    u2.pIBIndex        fg.isIndexedBy\n**    u2.pCteUse         fg.isCte\n**\n**    u3.pOn             !fg.isUsing\n**    u3.pUsing          fg.isUsing\n**\n**    u4.zDatabase       !fg.fixedSchema && !fg.isSubquery\n**    u4.pSchema         fg.fixedSchema\n**    u4.pSubq           fg.isSubquery\n**\n** See also the sqlite3SrcListDelete() routine for assert() statements that\n** check invariants on the fields of this object, especially the flags\n** inside the fg struct.\n*/\nstruct SrcItem {\n  char *zName;      /* Name of the table */\n  char *zAlias;     /* The \"B\" part of a \"A AS B\" phrase.  zName is the \"A\" */\n  Table *pSTab;     /* Table object for zName. Mnemonic: Srcitem-TABle */\n  struct {\n    u8 jointype;      /* Type of join between this table and the previous */\n    unsigned notIndexed :1;    /* True if there is a NOT INDEXED clause */\n    unsigned isIndexedBy :1;   /* True if there is an INDEXED BY clause */\n    unsigned isSubquery :1;    /* True if this term is a subquery */\n    unsigned isTabFunc :1;     /* True if table-valued-function syntax */\n    unsigned isCorrelated :1;  /* True if sub-query is correlated */\n    unsigned isMaterialized:1; /* This is a materialized view */\n    unsigned viaCoroutine :1;  /* Implemented as a co-routine */\n    unsigned isRecursive :1;   /* True for recursive reference in WITH */\n    unsigned fromDDL :1;       /* Comes from sqlite_schema */\n    unsigned isCte :1;         /* This is a CTE */\n    unsigned notCte :1;        /* This item may not match a CTE */\n    unsigned isUsing :1;       /* u3.pUsing is valid */\n    unsigned isOn :1;          /* u3.pOn was once valid and non-NULL */\n    unsigned isSynthUsing :1;  /* u3.pUsing is synthesized from NATURAL */\n    unsigned isNestedFrom :1;  /* pSelect is a SF_NestedFrom subquery */\n    unsigned rowidUsed :1;     /* The ROWID of this table is referenced */\n    unsigned fixedSchema :1;   /* Uses u4.pSchema, not u4.zDatabase */\n    unsigned hadSchema :1;     /* Had u4.zDatabase before u4.pSchema */\n    unsigned fromExists :1;    /* Comes from WHERE EXISTS(...) */\n  } fg;\n  int iCursor;      /* The VDBE cursor number used to access this table */\n  Bitmask colUsed;  /* Bit N set if column N used. Details above for N>62 */\n  union {\n    char *zIndexedBy;    /* Identifier from \"INDEXED BY <zIndex>\" clause */\n    ExprList *pFuncArg;  /* Arguments to table-valued-function */\n    u32 nRow;            /* Number of rows in a VALUES clause */\n  } u1;\n  union {\n    Index *pIBIndex;  /* Index structure corresponding to u1.zIndexedBy */\n    CteUse *pCteUse;  /* CTE Usage info when fg.isCte is true */\n  } u2;\n  union {\n    Expr *pOn;        /* fg.isUsing==0 =>  The ON clause of a join */\n    IdList *pUsing;   /* fg.isUsing==1 =>  The USING clause of a join */\n  } u3;\n  union {\n    Schema *pSchema;  /* Schema to which this item is fixed */\n    char *zDatabase;  /* Name of database holding this table */\n    Subquery *pSubq;  /* Description of a subquery */\n  } u4;\n};\n\n/*\n** The OnOrUsing object represents either an ON clause or a USING clause.\n** It can never be both at the same time, but it can be neither.\n*/\nstruct OnOrUsing {\n  Expr *pOn;         /* The ON clause of a join */\n  IdList *pUsing;    /* The USING clause of a join */\n};\n\n/*\n** This object represents one or more tables that are the source of\n** content for an SQL statement.  For example, a single SrcList object\n** is used to hold the FROM clause of a SELECT statement.  SrcList also\n** represents the target tables for DELETE, INSERT, and UPDATE statements.\n**\n*/\nstruct SrcList {\n  int nSrc;             /* Number of tables or subqueries in the FROM clause */\n  u32 nAlloc;           /* Number of entries allocated in a[] below */\n  SrcItem a[FLEXARRAY]; /* One entry for each identifier on the list */\n};\n\n/* Size (in bytes) of a SrcList object that can hold as many as N\n** SrcItem objects. */\n#define SZ_SRCLIST(N) (offsetof(SrcList,a)+(N)*sizeof(SrcItem))\n\n/* Size (in bytes( of a SrcList object that holds 1 SrcItem.  This is a\n** special case of SZ_SRCITEM(1) that comes up often. */\n#define SZ_SRCLIST_1  (offsetof(SrcList,a)+sizeof(SrcItem))\n\n/*\n** Permitted values of the SrcList.a.jointype field\n*/\n#define JT_INNER     0x01    /* Any kind of inner or cross join */\n#define JT_CROSS     0x02    /* Explicit use of the CROSS keyword */\n#define JT_NATURAL   0x04    /* True for a \"natural\" join */\n#define JT_LEFT      0x08    /* Left outer join */\n#define JT_RIGHT     0x10    /* Right outer join */\n#define JT_OUTER     0x20    /* The \"OUTER\" keyword is present */\n#define JT_LTORJ     0x40    /* One of the LEFT operands of a RIGHT JOIN\n                             ** Mnemonic: Left Table Of Right Join */\n#define JT_ERROR     0x80    /* unknown or unsupported join type */\n\n/*\n** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()\n** and the WhereInfo.wctrlFlags member.\n**\n** Value constraints (enforced via assert()):\n**     WHERE_USE_LIMIT  == SF_FixedLimit\n*/\n#define WHERE_ORDERBY_NORMAL   0x0000 /* No-op */\n#define WHERE_ORDERBY_MIN      0x0001 /* ORDER BY processing for min() func */\n#define WHERE_ORDERBY_MAX      0x0002 /* ORDER BY processing for max() func */\n#define WHERE_ONEPASS_DESIRED  0x0004 /* Want to do one-pass UPDATE/DELETE */\n#define WHERE_ONEPASS_MULTIROW 0x0008 /* ONEPASS is ok with multiple rows */\n#define WHERE_DUPLICATES_OK    0x0010 /* Ok to return a row more than once */\n#define WHERE_OR_SUBCLAUSE     0x0020 /* Processing a sub-WHERE as part of\n                                      ** the OR optimization  */\n#define WHERE_GROUPBY          0x0040 /* pOrderBy is really a GROUP BY */\n#define WHERE_DISTINCTBY       0x0080 /* pOrderby is really a DISTINCT clause */\n#define WHERE_WANT_DISTINCT    0x0100 /* All output needs to be distinct */\n#define WHERE_SORTBYGROUP      0x0200 /* Support sqlite3WhereIsSorted() */\n#define WHERE_AGG_DISTINCT     0x0400 /* Query is \"SELECT agg(DISTINCT ...)\" */\n#define WHERE_ORDERBY_LIMIT    0x0800 /* ORDERBY+LIMIT on the inner loop */\n#define WHERE_RIGHT_JOIN       0x1000 /* Processing a RIGHT JOIN */\n#define WHERE_KEEP_ALL_JOINS   0x2000 /* Do not do the omit-noop-join opt */\n#define WHERE_USE_LIMIT        0x4000 /* Use the LIMIT in cost estimates */\n                        /*     0x8000    not currently used */\n\n/* Allowed return values from sqlite3WhereIsDistinct()\n*/\n#define WHERE_DISTINCT_NOOP      0  /* DISTINCT keyword not used */\n#define WHERE_DISTINCT_UNIQUE    1  /* No duplicates */\n#define WHERE_DISTINCT_ORDERED   2  /* All duplicates are adjacent */\n#define WHERE_DISTINCT_UNORDERED 3  /* Duplicates are scattered */\n\n/*\n** A NameContext defines a context in which to resolve table and column\n** names.  The context consists of a list of tables (the pSrcList) field and\n** a list of named expression (pEList).  The named expression list may\n** be NULL.  The pSrc corresponds to the FROM clause of a SELECT or\n** to the table being operated on by INSERT, UPDATE, or DELETE.  The\n** pEList corresponds to the result set of a SELECT and is NULL for\n** other statements.\n**\n** NameContexts can be nested.  When resolving names, the inner-most\n** context is searched first.  If no match is found, the next outer\n** context is checked.  If there is still no match, the next context\n** is checked.  This process continues until either a match is found\n** or all contexts are check.  When a match is found, the nRef member of\n** the context containing the match is incremented.\n**\n** Each subquery gets a new NameContext.  The pNext field points to the\n** NameContext in the parent query.  Thus the process of scanning the\n** NameContext list corresponds to searching through successively outer\n** subqueries looking for a match.\n*/\nstruct NameContext {\n  Parse *pParse;       /* The parser */\n  SrcList *pSrcList;   /* One or more tables used to resolve names */\n  union {\n    ExprList *pEList;    /* Optional list of result-set columns */\n    AggInfo *pAggInfo;   /* Information about aggregates at this level */\n    Upsert *pUpsert;     /* ON CONFLICT clause information from an upsert */\n    int iBaseReg;        /* For TK_REGISTER when parsing RETURNING */\n  } uNC;\n  NameContext *pNext;  /* Next outer name context.  NULL for outermost */\n  int nRef;            /* Number of names resolved by this context */\n  int nNcErr;          /* Number of errors encountered while resolving names */\n  int ncFlags;         /* Zero or more NC_* flags defined below */\n  u32 nNestedSelect;   /* Number of nested selects using this NC */\n  Select *pWinSelect;  /* SELECT statement for any window functions */\n};\n\n/*\n** Allowed values for the NameContext, ncFlags field.\n**\n** Value constraints (all checked via assert()):\n**    NC_HasAgg    == SF_HasAgg       == EP_Agg\n**    NC_MinMaxAgg == SF_MinMaxAgg    == SQLITE_FUNC_MINMAX\n**    NC_OrderAgg  == SF_OrderByReqd  == SQLITE_FUNC_ANYORDER\n**    NC_HasWin    == EP_Win\n**\n*/\n#define NC_AllowAgg  0x000001 /* Aggregate functions are allowed here */\n#define NC_PartIdx   0x000002 /* True if resolving a partial index WHERE */\n#define NC_IsCheck   0x000004 /* True if resolving a CHECK constraint */\n#define NC_GenCol    0x000008 /* True for a GENERATED ALWAYS AS clause */\n#define NC_HasAgg    0x000010 /* One or more aggregate functions seen */\n#define NC_IdxExpr   0x000020 /* True if resolving columns of CREATE INDEX */\n#define NC_SelfRef   0x00002e /* Combo: PartIdx, isCheck, GenCol, and IdxExpr */\n#define NC_Subquery  0x000040 /* A subquery has been seen */\n#define NC_UEList    0x000080 /* True if uNC.pEList is used */\n#define NC_UAggInfo  0x000100 /* True if uNC.pAggInfo is used */\n#define NC_UUpsert   0x000200 /* True if uNC.pUpsert is used */\n#define NC_UBaseReg  0x000400 /* True if uNC.iBaseReg is used */\n#define NC_MinMaxAgg 0x001000 /* min/max aggregates seen.  See note above */\n/*                   0x002000 // available for reuse */\n#define NC_AllowWin  0x004000 /* Window functions are allowed here */\n#define NC_HasWin    0x008000 /* One or more window functions seen */\n#define NC_IsDDL     0x010000 /* Resolving names in a CREATE statement */\n#define NC_InAggFunc 0x020000 /* True if analyzing arguments to an agg func */\n#define NC_FromDDL   0x040000 /* SQL text comes from sqlite_schema */\n#define NC_NoSelect  0x080000 /* Do not descend into sub-selects */\n#define NC_Where     0x100000 /* Processing WHERE clause of a SELECT */\n#define NC_OrderAgg 0x8000000 /* Has an aggregate other than count/min/max */\n\n/*\n** An instance of the following object describes a single ON CONFLICT\n** clause in an upsert.\n**\n** The pUpsertTarget field is only set if the ON CONFLICT clause includes\n** conflict-target clause.  (In \"ON CONFLICT(a,b)\" the \"(a,b)\" is the\n** conflict-target clause.)  The pUpsertTargetWhere is the optional\n** WHERE clause used to identify partial unique indexes.\n**\n** pUpsertSet is the list of column=expr terms of the UPDATE statement.\n** The pUpsertSet field is NULL for a ON CONFLICT DO NOTHING.  The\n** pUpsertWhere is the WHERE clause for the UPDATE and is NULL if the\n** WHERE clause is omitted.\n*/\nstruct Upsert {\n  ExprList *pUpsertTarget;  /* Optional description of conflict target */\n  Expr *pUpsertTargetWhere; /* WHERE clause for partial index targets */\n  ExprList *pUpsertSet;     /* The SET clause from an ON CONFLICT UPDATE */\n  Expr *pUpsertWhere;       /* WHERE clause for the ON CONFLICT UPDATE */\n  Upsert *pNextUpsert;      /* Next ON CONFLICT clause in the list */\n  u8 isDoUpdate;            /* True for DO UPDATE.  False for DO NOTHING */\n  u8 isDup;                 /* True if 2nd or later with same pUpsertIdx */\n  /* Above this point is the parse tree for the ON CONFLICT clauses.\n  ** The next group of fields stores intermediate data. */\n  void *pToFree;            /* Free memory when deleting the Upsert object */\n  /* All fields above are owned by the Upsert object and must be freed\n  ** when the Upsert is destroyed.  The fields below are used to transfer\n  ** information from the INSERT processing down into the UPDATE processing\n  ** while generating code.  The fields below are owned by the INSERT\n  ** statement and will be freed by INSERT processing. */\n  Index *pUpsertIdx;        /* UNIQUE constraint specified by pUpsertTarget */\n  SrcList *pUpsertSrc;      /* Table to be updated */\n  int regData;              /* First register holding array of VALUES */\n  int iDataCur;             /* Index of the data cursor */\n  int iIdxCur;              /* Index of the first index cursor */\n};\n\n/*\n** An instance of the following structure contains all information\n** needed to generate code for a single SELECT statement.\n**\n** See the header comment on the computeLimitRegisters() routine for a\n** detailed description of the meaning of the iLimit and iOffset fields.\n**\n** addrOpenEphm[] entries contain the address of OP_OpenEphemeral opcodes.\n** These addresses must be stored so that we can go back and fill in\n** the P4_KEYINFO and P2 parameters later.  Neither the KeyInfo nor\n** the number of columns in P2 can be computed at the same time\n** as the OP_OpenEphm instruction is coded because not\n** enough information about the compound query is known at that point.\n** The KeyInfo for addrOpenTran[0] and [1] contains collating sequences\n** for the result set.  The KeyInfo for addrOpenEphm[2] contains collating\n** sequences for the ORDER BY clause.\n*/\nstruct Select {\n  u8 op;                 /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */\n  LogEst nSelectRow;     /* Estimated number of result rows */\n  u32 selFlags;          /* Various SF_* values */\n  int iLimit, iOffset;   /* Memory registers holding LIMIT & OFFSET counters */\n  u32 selId;             /* Unique identifier number for this SELECT */\n  int addrOpenEphm[2];   /* OP_OpenEphem opcodes related to this select */\n  ExprList *pEList;      /* The fields of the result */\n  SrcList *pSrc;         /* The FROM clause */\n  Expr *pWhere;          /* The WHERE clause */\n  ExprList *pGroupBy;    /* The GROUP BY clause */\n  Expr *pHaving;         /* The HAVING clause */\n  ExprList *pOrderBy;    /* The ORDER BY clause */\n  Select *pPrior;        /* Prior select in a compound select statement */\n  Select *pNext;         /* Next select to the left in a compound */\n  Expr *pLimit;          /* LIMIT expression. NULL means not used. */\n  With *pWith;           /* WITH clause attached to this select. Or NULL. */\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  Window *pWin;          /* List of window functions */\n  Window *pWinDefn;      /* List of named window definitions */\n#endif\n};\n\n/*\n** Allowed values for Select.selFlags.  The \"SF\" prefix stands for\n** \"Select Flag\".\n**\n** Value constraints (all checked via assert())\n**     SF_HasAgg      == NC_HasAgg\n**     SF_MinMaxAgg   == NC_MinMaxAgg     == SQLITE_FUNC_MINMAX\n**     SF_OrderByReqd == NC_OrderAgg      == SQLITE_FUNC_ANYORDER\n**     SF_FixedLimit  == WHERE_USE_LIMIT\n*/\n#define SF_Distinct      0x0000001 /* Output should be DISTINCT */\n#define SF_All           0x0000002 /* Includes the ALL keyword */\n#define SF_Resolved      0x0000004 /* Identifiers have been resolved */\n#define SF_Aggregate     0x0000008 /* Contains agg functions or a GROUP BY */\n#define SF_HasAgg        0x0000010 /* Contains aggregate functions */\n#define SF_UsesEphemeral 0x0000020 /* Uses the OpenEphemeral opcode */\n#define SF_Expanded      0x0000040 /* sqlite3SelectExpand() called on this */\n#define SF_HasTypeInfo   0x0000080 /* FROM subqueries have Table metadata */\n#define SF_Compound      0x0000100 /* Part of a compound query */\n#define SF_Values        0x0000200 /* Synthesized from VALUES clause */\n#define SF_MultiValue    0x0000400 /* Single VALUES term with multiple rows */\n#define SF_NestedFrom    0x0000800 /* Part of a parenthesized FROM clause */\n#define SF_MinMaxAgg     0x0001000 /* Aggregate containing min() or max() */\n#define SF_Recursive     0x0002000 /* The recursive part of a recursive CTE */\n#define SF_FixedLimit    0x0004000 /* nSelectRow set by a constant LIMIT */\n#define SF_MaybeConvert  0x0008000 /* Need convertCompoundSelectToSubquery() */\n#define SF_Converted     0x0010000 /* By convertCompoundSelectToSubquery() */\n#define SF_IncludeHidden 0x0020000 /* Include hidden columns in output */\n#define SF_ComplexResult 0x0040000 /* Result contains subquery or function */\n#define SF_WhereBegin    0x0080000 /* Really a WhereBegin() call.  Debug Only */\n#define SF_WinRewrite    0x0100000 /* Window function rewrite accomplished */\n#define SF_View          0x0200000 /* SELECT statement is a view */\n#define SF_NoopOrderBy   0x0400000 /* ORDER BY is ignored for this query */\n#define SF_UFSrcCheck    0x0800000 /* Check pSrc as required by UPDATE...FROM */\n#define SF_PushDown      0x1000000 /* Modified by WHERE-clause push-down opt */\n#define SF_MultiPart     0x2000000 /* Has multiple incompatible PARTITIONs */\n#define SF_CopyCte       0x4000000 /* SELECT statement is a copy of a CTE */\n#define SF_OrderByReqd   0x8000000 /* The ORDER BY clause may not be omitted */\n#define SF_UpdateFrom   0x10000000 /* Query originates with UPDATE FROM */\n#define SF_Correlated   0x20000000 /* True if references the outer context */\n#define SF_OnToWhere    0x40000000 /* One or more ON clauses moved to WHERE */\n\n/* True if SrcItem X is a subquery that has SF_NestedFrom */\n#define IsNestedFrom(X) \\\n   ((X)->fg.isSubquery && \\\n    ((X)->u4.pSubq->pSelect->selFlags&SF_NestedFrom)!=0)\n\n/*\n** The results of a SELECT can be distributed in several ways, as defined\n** by one of the following macros.  The \"SRT\" prefix means \"SELECT Result\n** Type\".\n**\n**     SRT_Union       Store results as a key in a temporary index\n**                     identified by pDest->iSDParm.\n**\n**     SRT_Except      Remove results from the temporary index pDest->iSDParm.\n**\n**     SRT_Exists      Store a 1 in memory cell pDest->iSDParm if the result\n**                     set is not empty.\n**\n**     SRT_Discard     Throw the results away.  This is used by SELECT\n**                     statements within triggers whose only purpose is\n**                     the side-effects of functions.\n**\n**     SRT_Output      Generate a row of output (using the OP_ResultRow\n**                     opcode) for each row in the result set.\n**\n**     SRT_Mem         Only valid if the result is a single column.\n**                     Store the first column of the first result row\n**                     in register pDest->iSDParm then abandon the rest\n**                     of the query.  This destination implies \"LIMIT 1\".\n**\n**     SRT_Set         The result must be a single column.  Store each\n**                     row of result as the key in table pDest->iSDParm.\n**                     Apply the affinity pDest->affSdst before storing\n**                     results.  if pDest->iSDParm2 is positive, then it is\n**                     a register holding a Bloom filter for the IN operator\n**                     that should be populated in addition to the\n**                     pDest->iSDParm table.  This SRT is used to\n**                     implement \"IN (SELECT ...)\".\n**\n**     SRT_EphemTab    Create an temporary table pDest->iSDParm and store\n**                     the result there. The cursor is left open after\n**                     returning.  This is like SRT_Table except that\n**                     this destination uses OP_OpenEphemeral to create\n**                     the table first.\n**\n**     SRT_Coroutine   Generate a co-routine that returns a new row of\n**                     results each time it is invoked.  The entry point\n**                     of the co-routine is stored in register pDest->iSDParm\n**                     and the result row is stored in pDest->nDest registers\n**                     starting with pDest->iSdst.\n**\n**     SRT_Table       Store results in temporary table pDest->iSDParm.\n**     SRT_Fifo        This is like SRT_EphemTab except that the table\n**                     is assumed to already be open.  SRT_Fifo has\n**                     the additional property of being able to ignore\n**                     the ORDER BY clause.\n**\n**     SRT_DistFifo    Store results in a temporary table pDest->iSDParm.\n**                     But also use temporary table pDest->iSDParm+1 as\n**                     a record of all prior results and ignore any duplicate\n**                     rows.  Name means:  \"Distinct Fifo\".\n**\n**     SRT_Queue       Store results in priority queue pDest->iSDParm (really\n**                     an index).  Append a sequence number so that all entries\n**                     are distinct.\n**\n**     SRT_DistQueue   Store results in priority queue pDest->iSDParm only if\n**                     the same record has never been stored before.  The\n**                     index at pDest->iSDParm+1 hold all prior stores.\n**\n**     SRT_Upfrom      Store results in the temporary table already opened by\n**                     pDest->iSDParm. If (pDest->iSDParm<0), then the temp\n**                     table is an intkey table - in this case the first\n**                     column returned by the SELECT is used as the integer\n**                     key. If (pDest->iSDParm>0), then the table is an index\n**                     table. (pDest->iSDParm) is the number of key columns in\n**                     each index record in this case.\n*/\n#define SRT_Union        1  /* Store result as keys in an index */\n#define SRT_Except       2  /* Remove result from a UNION index */\n#define SRT_Exists       3  /* Store 1 if the result is not empty */\n#define SRT_Discard      4  /* Do not save the results anywhere */\n#define SRT_DistFifo     5  /* Like SRT_Fifo, but unique results only */\n#define SRT_DistQueue    6  /* Like SRT_Queue, but unique results only */\n\n/* The DISTINCT clause is ignored for all of the above.  Not that\n** IgnorableDistinct() implies IgnorableOrderby() */\n#define IgnorableDistinct(X) ((X->eDest)<=SRT_DistQueue)\n\n#define SRT_Queue        7  /* Store result in an queue */\n#define SRT_Fifo         8  /* Store result as data with an automatic rowid */\n\n/* The ORDER BY clause is ignored for all of the above */\n#define IgnorableOrderby(X) ((X->eDest)<=SRT_Fifo)\n\n#define SRT_Output       9  /* Output each row of result */\n#define SRT_Mem         10  /* Store result in a memory cell */\n#define SRT_Set         11  /* Store results as keys in an index */\n#define SRT_EphemTab    12  /* Create transient tab and store like SRT_Table */\n#define SRT_Coroutine   13  /* Generate a single row of result */\n#define SRT_Table       14  /* Store result as data with an automatic rowid */\n#define SRT_Upfrom      15  /* Store result as data with rowid */\n\n/*\n** An instance of this object describes where to put of the results of\n** a SELECT statement.\n*/\nstruct SelectDest {\n  u8 eDest;            /* How to dispose of the results.  One of SRT_* above. */\n  int iSDParm;         /* A parameter used by the eDest disposal method */\n  int iSDParm2;        /* A second parameter for the eDest disposal method */\n  int iSdst;           /* Base register where results are written */\n  int nSdst;           /* Number of registers allocated */\n  char *zAffSdst;      /* Affinity used for SRT_Set */\n  ExprList *pOrderBy;  /* Key columns for SRT_Queue and SRT_DistQueue */\n};\n\n/*\n** During code generation of statements that do inserts into AUTOINCREMENT\n** tables, the following information is attached to the Table.u.autoInc.p\n** pointer of each autoincrement table to record some side information that\n** the code generator needs.  We have to keep per-table autoincrement\n** information in case inserts are done within triggers.  Triggers do not\n** normally coordinate their activities, but we do need to coordinate the\n** loading and saving of autoincrement information.\n*/\nstruct AutoincInfo {\n  AutoincInfo *pNext;   /* Next info block in a list of them all */\n  Table *pTab;          /* Table this info block refers to */\n  int iDb;              /* Index in sqlite3.aDb[] of database holding pTab */\n  int regCtr;           /* Memory register holding the rowid counter */\n};\n\n/*\n** At least one instance of the following structure is created for each\n** trigger that may be fired while parsing an INSERT, UPDATE or DELETE\n** statement. All such objects are stored in the linked list headed at\n** Parse.pTriggerPrg and deleted once statement compilation has been\n** completed.\n**\n** A Vdbe sub-program that implements the body and WHEN clause of trigger\n** TriggerPrg.pTrigger, assuming a default ON CONFLICT clause of\n** TriggerPrg.orconf, is stored in the TriggerPrg.pProgram variable.\n** The Parse.pTriggerPrg list never contains two entries with the same\n** values for both pTrigger and orconf.\n**\n** The TriggerPrg.aColmask[0] variable is set to a mask of old.* columns\n** accessed (or set to 0 for triggers fired as a result of INSERT\n** statements). Similarly, the TriggerPrg.aColmask[1] variable is set to\n** a mask of new.* columns used by the program.\n*/\nstruct TriggerPrg {\n  Trigger *pTrigger;      /* Trigger this program was coded from */\n  TriggerPrg *pNext;      /* Next entry in Parse.pTriggerPrg list */\n  SubProgram *pProgram;   /* Program implementing pTrigger/orconf */\n  int orconf;             /* Default ON CONFLICT policy */\n  u32 aColmask[2];        /* Masks of old.*, new.* columns accessed */\n};\n\n/*\n** The yDbMask datatype for the bitmask of all attached databases.\n*/\n#if SQLITE_MAX_ATTACHED>30\n  typedef unsigned char yDbMask[(SQLITE_MAX_ATTACHED+9)/8];\n# define DbMaskTest(M,I)    (((M)[(I)/8]&(1<<((I)&7)))!=0)\n# define DbMaskZero(M)      memset((M),0,sizeof(M))\n# define DbMaskSet(M,I)     (M)[(I)/8]|=(1<<((I)&7))\n# define DbMaskAllZero(M)   sqlite3DbMaskAllZero(M)\n# define DbMaskNonZero(M)   (sqlite3DbMaskAllZero(M)==0)\n#else\n  typedef unsigned int yDbMask;\n# define DbMaskTest(M,I)    (((M)&(((yDbMask)1)<<(I)))!=0)\n# define DbMaskZero(M)      ((M)=0)\n# define DbMaskSet(M,I)     ((M)|=(((yDbMask)1)<<(I)))\n# define DbMaskAllZero(M)   ((M)==0)\n# define DbMaskNonZero(M)   ((M)!=0)\n#endif\n\n/*\n** For each index X that has as one of its arguments either an expression\n** or the name of a virtual generated column, and if X is in scope such that\n** the value of the expression can simply be read from the index, then\n** there is an instance of this object on the Parse.pIdxExpr list.\n**\n** During code generation, while generating code to evaluate expressions,\n** this list is consulted and if a matching expression is found, the value\n** is read from the index rather than being recomputed.\n*/\nstruct IndexedExpr {\n  Expr *pExpr;            /* The expression contained in the index */\n  int iDataCur;           /* The data cursor associated with the index */\n  int iIdxCur;            /* The index cursor */\n  int iIdxCol;            /* The index column that contains value of pExpr */\n  u8 bMaybeNullRow;       /* True if we need an OP_IfNullRow check */\n  u8 aff;                 /* Affinity of the pExpr expression */\n  IndexedExpr *pIENext;   /* Next in a list of all indexed expressions */\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  const char *zIdxName;   /* Name of index, used only for bytecode comments */\n#endif\n};\n\n/*\n** An instance of the ParseCleanup object specifies an operation that\n** should be performed after parsing to deallocation resources obtained\n** during the parse and which are no longer needed.\n*/\nstruct ParseCleanup {\n  ParseCleanup *pNext;               /* Next cleanup task */\n  void *pPtr;                        /* Pointer to object to deallocate */\n  void (*xCleanup)(sqlite3*,void*);  /* Deallocation routine */\n};\n\n/*\n** An SQL parser context.  A copy of this structure is passed through\n** the parser and down into all the parser action routine in order to\n** carry around information that is global to the entire parse.\n**\n** The structure is divided into two parts.  When the parser and code\n** generate call themselves recursively, the first part of the structure\n** is constant but the second part is reset at the beginning and end of\n** each recursion.\n**\n** The nTableLock and aTableLock variables are only used if the shared-cache\n** feature is enabled (if sqlite3Tsd()->useSharedData is true). They are\n** used to store the set of table-locks required by the statement being\n** compiled. Function sqlite3TableLock() is used to add entries to the\n** list.\n*/\nstruct Parse {\n  sqlite3 *db;         /* The main database structure */\n  char *zErrMsg;       /* An error message */\n  Vdbe *pVdbe;         /* An engine for executing database bytecode */\n  int rc;              /* Return code from execution */\n  LogEst nQueryLoop;   /* Est number of iterations of a query (10*log2(N)) */\n  u8 nested;           /* Number of nested calls to the parser/code generator */\n  u8 nTempReg;         /* Number of temporary registers in aTempReg[] */\n  u8 isMultiWrite;     /* True if statement may modify/insert multiple rows */\n  u8 mayAbort;         /* True if statement may throw an ABORT exception */\n  u8 hasCompound;      /* Need to invoke convertCompoundSelectToSubquery() */\n  u8 disableLookaside; /* Number of times lookaside has been disabled */\n  u8 prepFlags;        /* SQLITE_PREPARE_* flags */\n  u8 withinRJSubrtn;   /* Nesting level for RIGHT JOIN body subroutines */\n  u8 bHasExists;       /* Has a correlated \"EXISTS (SELECT ....)\" expression */\n  u8 mSubrtnSig;       /* mini Bloom filter on available SubrtnSig.selId */\n  u8 eTriggerOp;       /* TK_UPDATE, TK_INSERT or TK_DELETE */\n  u8 bReturning;       /* Coding a RETURNING trigger */\n  u8 eOrconf;          /* Default ON CONFLICT policy for trigger steps */\n  u8 disableTriggers;  /* True to disable triggers */\n#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)\n  u8 earlyCleanup;     /* OOM inside sqlite3ParserAddCleanup() */\n#endif\n#ifdef SQLITE_DEBUG\n  u8 ifNotExists;      /* Might be true if IF NOT EXISTS.  Assert()s only */\n  u8 isCreate;         /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER)\n                       ** and ALTER TABLE ADD COLUMN. */\n#endif\n  bft colNamesSet :1;   /* TRUE after OP_ColumnName has been issued to pVdbe */\n  bft bHasWith :1;      /* True if statement contains WITH */\n  bft okConstFactor :1; /* OK to factor out constants */\n  bft checkSchema :1;   /* Causes schema cookie check after an error */\n  int nRangeReg;       /* Size of the temporary register block */\n  int iRangeReg;       /* First register in temporary register block */\n  int nErr;            /* Number of errors seen */\n  int nTab;            /* Number of previously allocated VDBE cursors */\n  int nMem;            /* Number of memory cells used so far */\n  int szOpAlloc;       /* Bytes of memory space allocated for Vdbe.aOp[] */\n  int iSelfTab;        /* Table associated with an index on expr, or negative\n                       ** of the base register during check-constraint eval */\n  int nLabel;          /* The *negative* of the number of labels used */\n  int nLabelAlloc;     /* Number of slots in aLabel */\n  int *aLabel;         /* Space to hold the labels */\n  ExprList *pConstExpr;/* Constant expressions */\n  IndexedExpr *pIdxEpr;/* List of expressions used by active indexes */\n  IndexedExpr *pIdxPartExpr; /* Exprs constrained by index WHERE clauses */\n  yDbMask writeMask;   /* Start a write transaction on these databases */\n  yDbMask cookieMask;  /* Bitmask of schema verified databases */\n  int nMaxArg;         /* Max args to xUpdate and xFilter vtab methods */\n  int nSelect;         /* Number of SELECT stmts. Counter for Select.selId */\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  u32 nProgressSteps;  /* xProgress steps taken during sqlite3_prepare() */\n#endif\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  int nTableLock;        /* Number of locks in aTableLock */\n  TableLock *aTableLock; /* Required table locks for shared-cache mode */\n#endif\n  AutoincInfo *pAinc;  /* Information about AUTOINCREMENT counters */\n  Parse *pToplevel;    /* Parse structure for main program (or NULL) */\n  Table *pTriggerTab;  /* Table triggers are being coded for */\n  TriggerPrg *pTriggerPrg;  /* Linked list of coded triggers */\n  ParseCleanup *pCleanup;   /* List of cleanup operations to run after parse */\n\n  /**************************************************************************\n  ** Fields above must be initialized to zero.  The fields that follow,\n  ** down to the beginning of the recursive section, do not need to be\n  ** initialized as they will be set before being used.  The boundary is\n  ** determined by offsetof(Parse,aTempReg).\n  **************************************************************************/\n\n  int aTempReg[8];        /* Holding area for temporary registers */\n  Parse *pOuterParse;     /* Outer Parse object when nested */\n  Token sNameToken;       /* Token with unqualified schema object name */\n  u32 oldmask;            /* Mask of old.* columns referenced */\n  u32 newmask;            /* Mask of new.* columns referenced */\n  union {\n    struct {  /* These fields available when isCreate is true */\n      int addrCrTab;        /* Address of OP_CreateBtree on CREATE TABLE */\n      int regRowid;         /* Register holding rowid of CREATE TABLE entry */\n      int regRoot;          /* Register holding root page for new objects */\n      Token constraintName; /* Name of the constraint currently being parsed */\n    } cr;\n    struct {  /* These fields available to all other statements */\n      Returning *pReturning; /* The RETURNING clause */\n    } d;\n  } u1;\n\n  /************************************************************************\n  ** Above is constant between recursions.  Below is reset before and after\n  ** each recursion.  The boundary between these two regions is determined\n  ** using offsetof(Parse,sLastToken) so the sLastToken field must be the\n  ** first field in the recursive region.\n  ************************************************************************/\n\n  Token sLastToken;       /* The last token parsed */\n  ynVar nVar;               /* Number of '?' variables seen in the SQL so far */\n  u8 iPkSortOrder;          /* ASC or DESC for INTEGER PRIMARY KEY */\n  u8 explain;               /* True if the EXPLAIN flag is found on the query */\n  u8 eParseMode;            /* PARSE_MODE_XXX constant */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  int nVtabLock;            /* Number of virtual tables to lock */\n#endif\n  int nHeight;              /* Expression tree height of current sub-select */\n  int addrExplain;          /* Address of current OP_Explain opcode */\n  VList *pVList;            /* Mapping between variable names and numbers */\n  Vdbe *pReprepare;         /* VM being reprepared (sqlite3Reprepare()) */\n  const char *zTail;        /* All SQL text past the last semicolon parsed */\n  Table *pNewTable;         /* A table being constructed by CREATE TABLE */\n  Index *pNewIndex;         /* An index being constructed by CREATE INDEX.\n                            ** Also used to hold redundant UNIQUE constraints\n                            ** during a RENAME COLUMN */\n  Trigger *pNewTrigger;     /* Trigger under construct by a CREATE TRIGGER */\n  const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  Token sArg;               /* Complete text of a module argument */\n  Table **apVtabLock;       /* Pointer to virtual tables needing locking */\n#endif\n  With *pWith;              /* Current WITH clause, or NULL */\n#ifndef SQLITE_OMIT_ALTERTABLE\n  RenameToken *pRename;     /* Tokens subject to renaming by ALTER TABLE */\n#endif\n};\n\n/* Allowed values for Parse.eParseMode\n*/\n#define PARSE_MODE_NORMAL        0\n#define PARSE_MODE_DECLARE_VTAB  1\n#define PARSE_MODE_RENAME        2\n#define PARSE_MODE_UNMAP         3\n\n/*\n** Sizes and pointers of various parts of the Parse object.\n*/\n#define PARSE_HDR(X)  (((char*)(X))+offsetof(Parse,zErrMsg))\n#define PARSE_HDR_SZ (offsetof(Parse,aTempReg)-offsetof(Parse,zErrMsg)) /* Recursive part w/o aColCache*/\n#define PARSE_RECURSE_SZ offsetof(Parse,sLastToken)    /* Recursive part */\n#define PARSE_TAIL_SZ (sizeof(Parse)-PARSE_RECURSE_SZ) /* Non-recursive part */\n#define PARSE_TAIL(X) (((char*)(X))+PARSE_RECURSE_SZ)  /* Pointer to tail */\n\n/*\n** Return true if currently inside an sqlite3_declare_vtab() call.\n*/\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n  #define IN_DECLARE_VTAB 0\n#else\n  #define IN_DECLARE_VTAB (pParse->eParseMode==PARSE_MODE_DECLARE_VTAB)\n#endif\n\n#if defined(SQLITE_OMIT_ALTERTABLE)\n  #define IN_RENAME_OBJECT 0\n#else\n  #define IN_RENAME_OBJECT (pParse->eParseMode>=PARSE_MODE_RENAME)\n#endif\n\n#if defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_OMIT_ALTERTABLE)\n  #define IN_SPECIAL_PARSE 0\n#else\n  #define IN_SPECIAL_PARSE (pParse->eParseMode!=PARSE_MODE_NORMAL)\n#endif\n\n/*\n** An instance of the following structure can be declared on a stack and used\n** to save the Parse.zAuthContext value so that it can be restored later.\n*/\nstruct AuthContext {\n  const char *zAuthContext;   /* Put saved Parse.zAuthContext here */\n  Parse *pParse;              /* The Parse structure */\n};\n\n/*\n** Bitfield flags for P5 value in various opcodes.\n**\n** Value constraints (enforced via assert()):\n**    OPFLAG_LENGTHARG    == SQLITE_FUNC_LENGTH\n**    OPFLAG_TYPEOFARG    == SQLITE_FUNC_TYPEOF\n**    OPFLAG_BULKCSR      == BTREE_BULKLOAD\n**    OPFLAG_SEEKEQ       == BTREE_SEEK_EQ\n**    OPFLAG_FORDELETE    == BTREE_FORDELETE\n**    OPFLAG_SAVEPOSITION == BTREE_SAVEPOSITION\n**    OPFLAG_AUXDELETE    == BTREE_AUXDELETE\n*/\n#define OPFLAG_NCHANGE       0x01    /* OP_Insert: Set to update db->nChange */\n                                     /* Also used in P2 (not P5) of OP_Delete */\n#define OPFLAG_NOCHNG        0x01    /* OP_VColumn nochange for UPDATE */\n#define OPFLAG_EPHEM         0x01    /* OP_Column: Ephemeral output is ok */\n#define OPFLAG_LASTROWID     0x20    /* Set to update db->lastRowid */\n#define OPFLAG_ISUPDATE      0x04    /* This OP_Insert is an sql UPDATE */\n#define OPFLAG_APPEND        0x08    /* This is likely to be an append */\n#define OPFLAG_USESEEKRESULT 0x10    /* Try to avoid a seek in BtreeInsert() */\n#define OPFLAG_ISNOOP        0x40    /* OP_Delete does pre-update-hook only */\n#define OPFLAG_LENGTHARG     0x40    /* OP_Column only used for length() */\n#define OPFLAG_TYPEOFARG     0x80    /* OP_Column only used for typeof() */\n#define OPFLAG_BYTELENARG    0xc0    /* OP_Column only for octet_length() */\n#define OPFLAG_BULKCSR       0x01    /* OP_Open** used to open bulk cursor */\n#define OPFLAG_SEEKEQ        0x02    /* OP_Open** cursor uses EQ seek only */\n#define OPFLAG_FORDELETE     0x08    /* OP_Open should use BTREE_FORDELETE */\n#define OPFLAG_P2ISREG       0x10    /* P2 to OP_Open** is a register number */\n#define OPFLAG_PERMUTE       0x01    /* OP_Compare: use the permutation */\n#define OPFLAG_SAVEPOSITION  0x02    /* OP_Delete/Insert: save cursor pos */\n#define OPFLAG_AUXDELETE     0x04    /* OP_Delete: index in a DELETE op */\n#define OPFLAG_NOCHNG_MAGIC  0x6d    /* OP_MakeRecord: serialtype 10 is ok */\n#define OPFLAG_PREFORMAT     0x80    /* OP_Insert uses preformatted cell */\n\n/*\n** Each trigger present in the database schema is stored as an instance of\n** struct Trigger.\n**\n** Pointers to instances of struct Trigger are stored in two ways.\n** 1. In the \"trigHash\" hash table (part of the sqlite3* that represents the\n**    database). This allows Trigger structures to be retrieved by name.\n** 2. All triggers associated with a single table form a linked list, using the\n**    pNext member of struct Trigger. A pointer to the first element of the\n**    linked list is stored as the \"pTrigger\" member of the associated\n**    struct Table.\n**\n** The \"step_list\" member points to the first element of a linked list\n** containing the SQL statements specified as the trigger program.\n*/\nstruct Trigger {\n  char *zName;            /* The name of the trigger                        */\n  char *table;            /* The table or view to which the trigger applies */\n  u8 op;                  /* One of TK_DELETE, TK_UPDATE, TK_INSERT         */\n  u8 tr_tm;               /* One of TRIGGER_BEFORE, TRIGGER_AFTER */\n  u8 bReturning;          /* This trigger implements a RETURNING clause */\n  Expr *pWhen;            /* The WHEN clause of the expression (may be NULL) */\n  IdList *pColumns;       /* If this is an UPDATE OF <column-list> trigger,\n                             the <column-list> is stored here */\n  Schema *pSchema;        /* Schema containing the trigger */\n  Schema *pTabSchema;     /* Schema containing the table */\n  TriggerStep *step_list; /* Link list of trigger program steps             */\n  Trigger *pNext;         /* Next trigger associated with the table */\n};\n\n/*\n** A trigger is either a BEFORE or an AFTER trigger.  The following constants\n** determine which.\n**\n** If there are multiple triggers, you might of some BEFORE and some AFTER.\n** In that cases, the constants below can be ORed together.\n*/\n#define TRIGGER_BEFORE  1\n#define TRIGGER_AFTER   2\n\n/*\n** An instance of struct TriggerStep is used to store a single SQL statement\n** that is a part of a trigger-program.\n**\n** Instances of struct TriggerStep are stored in a singly linked list (linked\n** using the \"pNext\" member) referenced by the \"step_list\" member of the\n** associated struct Trigger instance. The first element of the linked list is\n** the first step of the trigger-program.\n**\n** The \"op\" member indicates whether this is a \"DELETE\", \"INSERT\", \"UPDATE\" or\n** \"SELECT\" statement. The meanings of the other members is determined by the\n** value of \"op\" as follows:\n**\n** (op == TK_INSERT)\n** orconf    -> stores the ON CONFLICT algorithm\n** pSelect   -> The content to be inserted - either a SELECT statement or\n**              a VALUES clause.\n** zTarget   -> Dequoted name of the table to insert into.\n** pIdList   -> If this is an INSERT INTO ... (<column-names>) VALUES ...\n**              statement, then this stores the column-names to be\n**              inserted into.\n** pUpsert   -> The ON CONFLICT clauses for an Upsert\n**\n** (op == TK_DELETE)\n** zTarget   -> Dequoted name of the table to delete from.\n** pWhere    -> The WHERE clause of the DELETE statement if one is specified.\n**              Otherwise NULL.\n**\n** (op == TK_UPDATE)\n** zTarget   -> Dequoted name of the table to update.\n** pWhere    -> The WHERE clause of the UPDATE statement if one is specified.\n**              Otherwise NULL.\n** pExprList -> A list of the columns to update and the expressions to update\n**              them to. See sqlite3Update() documentation of \"pChanges\"\n**              argument.\n**\n** (op == TK_SELECT)\n** pSelect   -> The SELECT statement\n**\n** (op == TK_RETURNING)\n** pExprList -> The list of expressions that follow the RETURNING keyword.\n**\n*/\nstruct TriggerStep {\n  u8 op;               /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT,\n                       ** or TK_RETURNING */\n  u8 orconf;           /* OE_Rollback etc. */\n  Trigger *pTrig;      /* The trigger that this step is a part of */\n  Select *pSelect;     /* SELECT statement or RHS of INSERT INTO SELECT ... */\n  char *zTarget;       /* Target table for DELETE, UPDATE, INSERT */\n  SrcList *pFrom;      /* FROM clause for UPDATE statement (if any) */\n  Expr *pWhere;        /* The WHERE clause for DELETE or UPDATE steps */\n  ExprList *pExprList; /* SET clause for UPDATE, or RETURNING clause */\n  IdList *pIdList;     /* Column names for INSERT */\n  Upsert *pUpsert;     /* Upsert clauses on an INSERT */\n  char *zSpan;         /* Original SQL text of this command */\n  TriggerStep *pNext;  /* Next in the link-list */\n  TriggerStep *pLast;  /* Last element in link-list. Valid for 1st elem only */\n};\n\n/*\n** Information about a RETURNING clause\n*/\nstruct Returning {\n  Parse *pParse;        /* The parse that includes the RETURNING clause */\n  ExprList *pReturnEL;  /* List of expressions to return */\n  Trigger retTrig;      /* The transient trigger that implements RETURNING */\n  TriggerStep retTStep; /* The trigger step */\n  int iRetCur;          /* Transient table holding RETURNING results */\n  int nRetCol;          /* Number of in pReturnEL after expansion */\n  int iRetReg;          /* Register array for holding a row of RETURNING */\n  char zName[40];       /* Name of trigger: \"sqlite_returning_%p\" */\n};\n\n/*\n** An object used to accumulate the text of a string where we\n** do not necessarily know how big the string will be in the end.\n*/\nstruct sqlite3_str {\n  sqlite3 *db;         /* Optional database for lookaside.  Can be NULL */\n  char *zText;         /* The string collected so far */\n  u32  nAlloc;         /* Amount of space allocated in zText */\n  u32  mxAlloc;        /* Maximum allowed allocation.  0 for no malloc usage */\n  u32  nChar;          /* Length of the string so far */\n  u8   accError;       /* SQLITE_NOMEM or SQLITE_TOOBIG */\n  u8   printfFlags;    /* SQLITE_PRINTF flags below */\n};\n#define SQLITE_PRINTF_INTERNAL 0x01  /* Internal-use-only converters allowed */\n#define SQLITE_PRINTF_SQLFUNC  0x02  /* SQL function arguments to VXPrintf */\n#define SQLITE_PRINTF_MALLOCED 0x04  /* True if zText is allocated space */\n\n#define isMalloced(X)  (((X)->printfFlags & SQLITE_PRINTF_MALLOCED)!=0)\n\n/*\n** The following object is the header for an \"RCStr\" or \"reference-counted\n** string\".  An RCStr is passed around and used like any other char*\n** that has been dynamically allocated.  The important interface\n** differences:\n**\n**   1.  RCStr strings are reference counted.  They are deallocated\n**       when the reference count reaches zero.\n**\n**   2.  Use sqlite3RCStrUnref() to free an RCStr string rather than\n**       sqlite3_free()\n**\n**   3.  Make a (read-only) copy of a read-only RCStr string using\n**       sqlite3RCStrRef().\n**\n** \"String\" is in the name, but an RCStr object can also be used to hold\n** binary data.\n*/\nstruct RCStr {\n  u64 nRCRef;            /* Number of references */\n  /* Total structure size should be a multiple of 8 bytes for alignment */\n};\n\n/*\n** A pointer to this structure is used to communicate information\n** from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.\n*/\ntypedef struct {\n  sqlite3 *db;        /* The database being initialized */\n  char **pzErrMsg;    /* Error message stored here */\n  int iDb;            /* 0 for main database.  1 for TEMP, 2.. for ATTACHed */\n  int rc;             /* Result code stored here */\n  u32 mInitFlags;     /* Flags controlling error messages */\n  u32 nInitRow;       /* Number of rows processed */\n  Pgno mxPage;        /* Maximum page number.  0 for no limit. */\n} InitData;\n\n/*\n** Allowed values for mInitFlags\n*/\n#define INITFLAG_AlterMask     0x0003  /* Types of ALTER */\n#define INITFLAG_AlterRename   0x0001  /* Reparse after a RENAME */\n#define INITFLAG_AlterDrop     0x0002  /* Reparse after a DROP COLUMN */\n#define INITFLAG_AlterAdd      0x0003  /* Reparse after an ADD COLUMN */\n\n/* Tuning parameters are set using SQLITE_TESTCTRL_TUNE and are controlled\n** on debug-builds of the CLI using \".testctrl tune ID VALUE\".  Tuning\n** parameters are for temporary use during development, to help find\n** optimal values for parameters in the query planner.  The should not\n** be used on trunk check-ins.  They are a temporary mechanism available\n** for transient development builds only.\n**\n** Tuning parameters are numbered starting with 1.\n*/\n#define SQLITE_NTUNE  6             /* Should be zero for all trunk check-ins */\n#ifdef SQLITE_DEBUG\n# define Tuning(X)  (sqlite3Config.aTune[(X)-1])\n#else\n# define Tuning(X)  0\n#endif\n\n/*\n** Structure containing global configuration data for the SQLite library.\n**\n** This structure also contains some state information.\n*/\nstruct Sqlite3Config {\n  int bMemstat;                     /* True to enable memory status */\n  u8 bCoreMutex;                    /* True to enable core mutexing */\n  u8 bFullMutex;                    /* True to enable full mutexing */\n  u8 bOpenUri;                      /* True to interpret filenames as URIs */\n  u8 bUseCis;                       /* Use covering indices for full-scans */\n  u8 bSmallMalloc;                  /* Avoid large memory allocations if true */\n  u8 bExtraSchemaChecks;            /* Verify type,name,tbl_name in schema */\n#ifdef SQLITE_DEBUG\n  u8 bJsonSelfcheck;                /* Double-check JSON parsing */\n#endif\n  int mxStrlen;                     /* Maximum string length */\n  int neverCorrupt;                 /* Database is always well-formed */\n  int szLookaside;                  /* Default lookaside buffer size */\n  int nLookaside;                   /* Default lookaside buffer count */\n  int nStmtSpill;                   /* Stmt-journal spill-to-disk threshold */\n  sqlite3_mem_methods m;            /* Low-level memory allocation interface */\n  sqlite3_mutex_methods mutex;      /* Low-level mutex interface */\n  sqlite3_pcache_methods2 pcache2;  /* Low-level page-cache interface */\n  void *pHeap;                      /* Heap storage space */\n  int nHeap;                        /* Size of pHeap[] */\n  int mnReq, mxReq;                 /* Min and max heap requests sizes */\n  sqlite3_int64 szMmap;             /* mmap() space per open file */\n  sqlite3_int64 mxMmap;             /* Maximum value for szMmap */\n  void *pPage;                      /* Page cache memory */\n  int szPage;                       /* Size of each page in pPage[] */\n  int nPage;                        /* Number of pages in pPage[] */\n  int mxParserStack;                /* maximum depth of the parser stack */\n  int sharedCacheEnabled;           /* true if shared-cache mode enabled */\n  u32 szPma;                        /* Maximum Sorter PMA size */\n  /* The above might be initialized to non-zero.  The following need to always\n  ** initially be zero, however. */\n  int isInit;                       /* True after initialization has finished */\n  int inProgress;                   /* True while initialization in progress */\n  int isMutexInit;                  /* True after mutexes are initialized */\n  int isMallocInit;                 /* True after malloc is initialized */\n  int isPCacheInit;                 /* True after malloc is initialized */\n  int nRefInitMutex;                /* Number of users of pInitMutex */\n  sqlite3_mutex *pInitMutex;        /* Mutex used by sqlite3_initialize() */\n  void (*xLog)(void*,int,const char*); /* Function for logging */\n  void *pLogArg;                       /* First argument to xLog() */\n#ifdef SQLITE_ENABLE_SQLLOG\n  void(*xSqllog)(void*,sqlite3*,const char*, int);\n  void *pSqllogArg;\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n  /* The following callback (if not NULL) is invoked on every VDBE branch\n  ** operation.  Set the callback using SQLITE_TESTCTRL_VDBE_COVERAGE.\n  */\n  void (*xVdbeBranch)(void*,unsigned iSrcLine,u8 eThis,u8 eMx);  /* Callback */\n  void *pVdbeBranchArg;                                     /* 1st argument */\n#endif\n#ifndef SQLITE_OMIT_DESERIALIZE\n  sqlite3_int64 mxMemdbSize;        /* Default max memdb size */\n#endif\n#ifndef SQLITE_UNTESTABLE\n  int (*xTestCallback)(int);        /* Invoked by sqlite3FaultSim() */\n#endif\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n  u32 mNoVisibleRowid;              /* TF_NoVisibleRowid if the ROWID_IN_VIEW\n                                    ** feature is disabled.  0 if rowids can\n                                    ** occur in views. */\n#endif\n  int bLocaltimeFault;              /* True to fail localtime() calls */\n  int (*xAltLocaltime)(const void*,void*); /* Alternative localtime() routine */\n  int iOnceResetThreshold;          /* When to reset OP_Once counters */\n  u32 szSorterRef;                  /* Min size in bytes to use sorter-refs */\n  unsigned int iPrngSeed;           /* Alternative fixed seed for the PRNG */\n  /* vvvv--- must be last ---vvv */\n#ifdef SQLITE_DEBUG\n  sqlite3_int64 aTune[SQLITE_NTUNE]; /* Tuning parameters */\n#endif\n};\n\n/*\n** This macro is used inside of assert() statements to indicate that\n** the assert is only valid on a well-formed database.  Instead of:\n**\n**     assert( X );\n**\n** One writes:\n**\n**     assert( X || CORRUPT_DB );\n**\n** CORRUPT_DB is true during normal operation.  CORRUPT_DB does not indicate\n** that the database is definitely corrupt, only that it might be corrupt.\n** For most test cases, CORRUPT_DB is set to false using a special\n** sqlite3_test_control().  This enables assert() statements to prove\n** things that are always true for well-formed databases.\n*/\n#define CORRUPT_DB  (sqlite3Config.neverCorrupt==0)\n\n/*\n** Context pointer passed down through the tree-walk.\n*/\nstruct Walker {\n  Parse *pParse;                            /* Parser context.  */\n  int (*xExprCallback)(Walker*, Expr*);     /* Callback for expressions */\n  int (*xSelectCallback)(Walker*,Select*);  /* Callback for SELECTs */\n  void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */\n  int walkerDepth;                          /* Number of subqueries */\n  u16 eCode;                                /* A small processing code */\n  u16 mWFlags;                              /* Use-dependent flags */\n  union {                                   /* Extra data for callback */\n    NameContext *pNC;                         /* Naming context */\n    int n;                                    /* A counter */\n    int iCur;                                 /* A cursor number */\n    SrcList *pSrcList;                        /* FROM clause */\n    struct CCurHint *pCCurHint;               /* Used by codeCursorHint() */\n    struct RefSrcList *pRefSrcList;           /* sqlite3ReferencesSrcList() */\n    int *aiCol;                               /* array of column indexes */\n    struct IdxCover *pIdxCover;               /* Check for index coverage */\n    ExprList *pGroupBy;                       /* GROUP BY clause */\n    Select *pSelect;                          /* HAVING to WHERE clause ctx */\n    struct WindowRewrite *pRewrite;           /* Window rewrite context */\n    struct WhereConst *pConst;                /* WHERE clause constants */\n    struct RenameCtx *pRename;                /* RENAME COLUMN context */\n    struct Table *pTab;                       /* Table of generated column */\n    struct CoveringIndexCheck *pCovIdxCk;     /* Check for covering index */\n    SrcItem *pSrcItem;                        /* A single FROM clause item */\n    DbFixer *pFix;                            /* See sqlite3FixSelect() */\n    Mem *aMem;                                /* See sqlite3BtreeCursorHint() */\n    struct CheckOnCtx *pCheckOnCtx;           /* See selectCheckOnClauses() */\n  } u;\n};\n\n/*\n** The following structure contains information used by the sqliteFix...\n** routines as they walk the parse tree to make database references\n** explicit.\n*/\nstruct DbFixer {\n  Parse *pParse;      /* The parsing context.  Error messages written here */\n  Walker w;           /* Walker object */\n  Schema *pSchema;    /* Fix items to this schema */\n  u8 bTemp;           /* True for TEMP schema entries */\n  const char *zDb;    /* Make sure all objects are contained in this database */\n  const char *zType;  /* Type of the container - used for error messages */\n  const Token *pName; /* Name of the container - used for error messages */\n};\n\n/* Forward declarations */\nSQLITE_PRIVATE int sqlite3WalkExpr(Walker*, Expr*);\nSQLITE_PRIVATE int sqlite3WalkExprNN(Walker*, Expr*);\nSQLITE_PRIVATE int sqlite3WalkExprList(Walker*, ExprList*);\nSQLITE_PRIVATE int sqlite3WalkSelect(Walker*, Select*);\nSQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker*, Select*);\nSQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker*, Select*);\nSQLITE_PRIVATE int sqlite3ExprWalkNoop(Walker*, Expr*);\nSQLITE_PRIVATE int sqlite3SelectWalkNoop(Walker*, Select*);\nSQLITE_PRIVATE int sqlite3SelectWalkFail(Walker*, Select*);\nSQLITE_PRIVATE int sqlite3WalkerDepthIncrease(Walker*,Select*);\nSQLITE_PRIVATE void sqlite3WalkerDepthDecrease(Walker*,Select*);\nSQLITE_PRIVATE void sqlite3WalkWinDefnDummyCallback(Walker*,Select*);\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE void sqlite3SelectWalkAssert2(Walker*, Select*);\n#endif\n\n#ifndef SQLITE_OMIT_CTE\nSQLITE_PRIVATE void sqlite3SelectPopWith(Walker*, Select*);\n#else\n# define sqlite3SelectPopWith 0\n#endif\n\n/*\n** Return code from the parse-tree walking primitives and their\n** callbacks.\n*/\n#define WRC_Continue    0   /* Continue down into children */\n#define WRC_Prune       1   /* Omit children but continue walking siblings */\n#define WRC_Abort       2   /* Abandon the tree walk */\n\n/*\n** A single common table expression\n*/\nstruct Cte {\n  char *zName;            /* Name of this CTE */\n  ExprList *pCols;        /* List of explicit column names, or NULL */\n  Select *pSelect;        /* The definition of this CTE */\n  const char *zCteErr;    /* Error message for circular references */\n  CteUse *pUse;           /* Usage information for this CTE */\n  u8 eM10d;               /* The MATERIALIZED flag */\n};\n\n/*\n** Allowed values for the materialized flag (eM10d):\n*/\n#define M10d_Yes       0  /* AS MATERIALIZED */\n#define M10d_Any       1  /* Not specified.  Query planner's choice */\n#define M10d_No        2  /* AS NOT MATERIALIZED */\n\n/*\n** An instance of the With object represents a WITH clause containing\n** one or more CTEs (common table expressions).\n*/\nstruct With {\n  int nCte;               /* Number of CTEs in the WITH clause */\n  int bView;              /* Belongs to the outermost Select of a view */\n  With *pOuter;           /* Containing WITH clause, or NULL */\n  Cte a[FLEXARRAY];       /* For each CTE in the WITH clause.... */\n};\n\n/* The size (in bytes) of a With object that can hold as many\n** as N different CTEs. */\n#define SZ_WITH(N)  (offsetof(With,a) + (N)*sizeof(Cte))\n\n/*\n** The Cte object is not guaranteed to persist for the entire duration\n** of code generation.  (The query flattener or other parser tree\n** edits might delete it.)  The following object records information\n** about each Common Table Expression that must be preserved for the\n** duration of the parse.\n**\n** The CteUse objects are freed using sqlite3ParserAddCleanup() rather\n** than sqlite3SelectDelete(), which is what enables them to persist\n** until the end of code generation.\n*/\nstruct CteUse {\n  int nUse;              /* Number of users of this CTE */\n  int addrM9e;           /* Start of subroutine to compute materialization */\n  int regRtn;            /* Return address register for addrM9e subroutine */\n  int iCur;              /* Ephemeral table holding the materialization */\n  LogEst nRowEst;        /* Estimated number of rows in the table */\n  u8 eM10d;              /* The MATERIALIZED flag */\n};\n\n\n/* Client data associated with sqlite3_set_clientdata() and\n** sqlite3_get_clientdata().\n*/\nstruct DbClientData {\n  DbClientData *pNext;        /* Next in a linked list */\n  void *pData;                /* The data */\n  void (*xDestructor)(void*); /* Destructor.  Might be NULL */\n  char zName[FLEXARRAY];      /* Name of this client data. MUST BE LAST */\n};\n\n/* The size (in bytes) of a DbClientData object that can has a name\n** that is N bytes long, including the zero-terminator. */\n#define SZ_DBCLIENTDATA(N) (offsetof(DbClientData,zName)+(N))\n\n#ifdef SQLITE_DEBUG\n/*\n** An instance of the TreeView object is used for printing the content of\n** data structures on sqlite3DebugPrintf() using a tree-like view.\n*/\nstruct TreeView {\n  int iLevel;             /* Which level of the tree we are on */\n  u8  bLine[100];         /* Draw vertical in column i if bLine[i] is true */\n};\n#endif /* SQLITE_DEBUG */\n\n/*\n** This object is used in various ways, most (but not all) related to window\n** functions.\n**\n**   (1) A single instance of this structure is attached to the\n**       the Expr.y.pWin field for each window function in an expression tree.\n**       This object holds the information contained in the OVER clause,\n**       plus additional fields used during code generation.\n**\n**   (2) All window functions in a single SELECT form a linked-list\n**       attached to Select.pWin.  The Window.pFunc and Window.pExpr\n**       fields point back to the expression that is the window function.\n**\n**   (3) The terms of the WINDOW clause of a SELECT are instances of this\n**       object on a linked list attached to Select.pWinDefn.\n**\n**   (4) For an aggregate function with a FILTER clause, an instance\n**       of this object is stored in Expr.y.pWin with eFrmType set to\n**       TK_FILTER. In this case the only field used is Window.pFilter.\n**\n** The uses (1) and (2) are really the same Window object that just happens\n** to be accessible in two different ways.  Use case (3) are separate objects.\n*/\nstruct Window {\n  char *zName;            /* Name of window (may be NULL) */\n  char *zBase;            /* Name of base window for chaining (may be NULL) */\n  ExprList *pPartition;   /* PARTITION BY clause */\n  ExprList *pOrderBy;     /* ORDER BY clause */\n  u8 eFrmType;            /* TK_RANGE, TK_GROUPS, TK_ROWS, or 0 */\n  u8 eStart;              /* UNBOUNDED, CURRENT, PRECEDING or FOLLOWING */\n  u8 eEnd;                /* UNBOUNDED, CURRENT, PRECEDING or FOLLOWING */\n  u8 bImplicitFrame;      /* True if frame was implicitly specified */\n  u8 eExclude;            /* TK_NO, TK_CURRENT, TK_TIES, TK_GROUP, or 0 */\n  Expr *pStart;           /* Expression for \"<expr> PRECEDING\" */\n  Expr *pEnd;             /* Expression for \"<expr> FOLLOWING\" */\n  Window **ppThis;        /* Pointer to this object in Select.pWin list */\n  Window *pNextWin;       /* Next window function belonging to this SELECT */\n  Expr *pFilter;          /* The FILTER expression */\n  FuncDef *pWFunc;        /* The function */\n  int iEphCsr;            /* Partition buffer or Peer buffer */\n  int regAccum;           /* Accumulator */\n  int regResult;          /* Interim result */\n  int csrApp;             /* Function cursor (used by min/max) */\n  int regApp;             /* Function register (also used by min/max) */\n  int regPart;            /* Array of registers for PARTITION BY values */\n  Expr *pOwner;           /* Expression object this window is attached to */\n  int nBufferCol;         /* Number of columns in buffer table */\n  int iArgCol;            /* Offset of first argument for this function */\n  int regOne;             /* Register containing constant value 1 */\n  int regStartRowid;\n  int regEndRowid;\n  u8 bExprArgs;           /* Defer evaluation of window function arguments\n                          ** due to the SQLITE_SUBTYPE flag */\n};\n\nSQLITE_PRIVATE Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow);\nSQLITE_PRIVATE void sqlite3MultiValuesEnd(Parse *pParse, Select *pVal);\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE void sqlite3WindowDelete(sqlite3*, Window*);\nSQLITE_PRIVATE void sqlite3WindowUnlinkFromSelect(Window*);\nSQLITE_PRIVATE void sqlite3WindowListDelete(sqlite3 *db, Window *p);\nSQLITE_PRIVATE Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*, u8);\nSQLITE_PRIVATE void sqlite3WindowAttach(Parse*, Expr*, Window*);\nSQLITE_PRIVATE void sqlite3WindowLink(Select *pSel, Window *pWin);\nSQLITE_PRIVATE int sqlite3WindowCompare(const Parse*, const Window*, const Window*, int);\nSQLITE_PRIVATE void sqlite3WindowCodeInit(Parse*, Select*);\nSQLITE_PRIVATE void sqlite3WindowCodeStep(Parse*, Select*, WhereInfo*, int, int);\nSQLITE_PRIVATE int sqlite3WindowRewrite(Parse*, Select*);\nSQLITE_PRIVATE void sqlite3WindowUpdate(Parse*, Window*, Window*, FuncDef*);\nSQLITE_PRIVATE Window *sqlite3WindowDup(sqlite3 *db, Expr *pOwner, Window *p);\nSQLITE_PRIVATE Window *sqlite3WindowListDup(sqlite3 *db, Window *p);\nSQLITE_PRIVATE void sqlite3WindowFunctions(void);\nSQLITE_PRIVATE void sqlite3WindowChain(Parse*, Window*, Window*);\nSQLITE_PRIVATE Window *sqlite3WindowAssemble(Parse*, Window*, ExprList*, ExprList*, Token*);\n#else\n# define sqlite3WindowDelete(a,b)\n# define sqlite3WindowFunctions()\n# define sqlite3WindowAttach(a,b,c)\n#endif\n\n/*\n** Assuming zIn points to the first byte of a UTF-8 character,\n** advance zIn to point to the first byte of the next UTF-8 character.\n*/\n#define SQLITE_SKIP_UTF8(zIn) {                        \\\n  if( (*(zIn++))>=0xc0 ){                              \\\n    while( (*zIn & 0xc0)==0x80 ){ zIn++; }             \\\n  }                                                    \\\n}\n\n/*\n** The SQLITE_*_BKPT macros are substitutes for the error codes with\n** the same name but without the _BKPT suffix.  These macros invoke\n** routines that report the line-number on which the error originated\n** using sqlite3_log().  The routines also provide a convenient place\n** to set a debugger breakpoint.\n*/\nSQLITE_PRIVATE int sqlite3ReportError(int iErr, int lineno, const char *zType);\nSQLITE_PRIVATE int sqlite3CorruptError(int);\nSQLITE_PRIVATE int sqlite3MisuseError(int);\nSQLITE_PRIVATE int sqlite3CantopenError(int);\n#define SQLITE_CORRUPT_BKPT sqlite3CorruptError(__LINE__)\n#define SQLITE_MISUSE_BKPT sqlite3MisuseError(__LINE__)\n#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__)\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   int sqlite3NomemError(int);\nSQLITE_PRIVATE   int sqlite3IoerrnomemError(int);\n# define SQLITE_NOMEM_BKPT sqlite3NomemError(__LINE__)\n# define SQLITE_IOERR_NOMEM_BKPT sqlite3IoerrnomemError(__LINE__)\n#else\n# define SQLITE_NOMEM_BKPT SQLITE_NOMEM\n# define SQLITE_IOERR_NOMEM_BKPT SQLITE_IOERR_NOMEM\n#endif\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_CORRUPT_PGNO)\nSQLITE_PRIVATE   int sqlite3CorruptPgnoError(int,Pgno);\n# define SQLITE_CORRUPT_PGNO(P) sqlite3CorruptPgnoError(__LINE__,(P))\n#else\n# define SQLITE_CORRUPT_PGNO(P) sqlite3CorruptError(__LINE__)\n#endif\n\n/*\n** FTS3 and FTS4 both require virtual table support\n*/\n#if defined(SQLITE_OMIT_VIRTUALTABLE)\n# undef SQLITE_ENABLE_FTS3\n# undef SQLITE_ENABLE_FTS4\n#endif\n\n/*\n** FTS4 is really an extension for FTS3.  It is enabled using the\n** SQLITE_ENABLE_FTS3 macro.  But to avoid confusion we also call\n** the SQLITE_ENABLE_FTS4 macro to serve as an alias for SQLITE_ENABLE_FTS3.\n*/\n#if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3)\n# define SQLITE_ENABLE_FTS3 1\n#endif\n\n/*\n** The following macros mimic the standard library functions toupper(),\n** isspace(), isalnum(), isdigit() and isxdigit(), respectively. The\n** sqlite versions only work for ASCII characters, regardless of locale.\n*/\n#ifdef SQLITE_ASCII\n# define sqlite3Toupper(x)  ((x)&~(sqlite3CtypeMap[(unsigned char)(x)]&0x20))\n# define sqlite3Isspace(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x01)\n# define sqlite3Isalnum(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x06)\n# define sqlite3Isalpha(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x02)\n# define sqlite3Isdigit(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x04)\n# define sqlite3Isxdigit(x)  (sqlite3CtypeMap[(unsigned char)(x)]&0x08)\n# define sqlite3Tolower(x)   (sqlite3UpperToLower[(unsigned char)(x)])\n# define sqlite3Isquote(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x80)\n# define sqlite3JsonId1(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x42)\n# define sqlite3JsonId2(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x46)\n#else\n# define sqlite3Toupper(x)   toupper((unsigned char)(x))\n# define sqlite3Isspace(x)   isspace((unsigned char)(x))\n# define sqlite3Isalnum(x)   isalnum((unsigned char)(x))\n# define sqlite3Isalpha(x)   isalpha((unsigned char)(x))\n# define sqlite3Isdigit(x)   isdigit((unsigned char)(x))\n# define sqlite3Isxdigit(x)  isxdigit((unsigned char)(x))\n# define sqlite3Tolower(x)   tolower((unsigned char)(x))\n# define sqlite3Isquote(x)   ((x)=='\"'||(x)=='\\''||(x)=='['||(x)=='`')\n# define sqlite3JsonId1(x)   (sqlite3IsIdChar(x)&&(x)<'0')\n# define sqlite3JsonId2(x)   sqlite3IsIdChar(x)\n#endif\nSQLITE_PRIVATE int sqlite3IsIdChar(u8);\n\n/*\n** Internal function prototypes\n*/\nSQLITE_PRIVATE int sqlite3StrICmp(const char*,const char*);\nSQLITE_PRIVATE int sqlite3Strlen30(const char*);\n#define sqlite3Strlen30NN(C) (strlen(C)&0x3fffffff)\nSQLITE_PRIVATE char *sqlite3ColumnType(Column*,char*);\n#define sqlite3StrNICmp sqlite3_strnicmp\n\nSQLITE_PRIVATE int sqlite3MallocInit(void);\nSQLITE_PRIVATE void sqlite3MallocEnd(void);\nSQLITE_PRIVATE void *sqlite3Malloc(u64);\nSQLITE_PRIVATE void *sqlite3MallocZero(u64);\nSQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, u64);\nSQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, u64);\nSQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3*, u64);\nSQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);\nSQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, u64);\nSQLITE_PRIVATE char *sqlite3DbSpanDup(sqlite3*,const char*,const char*);\nSQLITE_PRIVATE void *sqlite3Realloc(void*, u64);\nSQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, u64);\nSQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, u64);\nSQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);\nSQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3*, void*);\nSQLITE_PRIVATE void sqlite3DbNNFreeNN(sqlite3*, void*);\nSQLITE_PRIVATE int sqlite3MallocSize(const void*);\nSQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, const void*);\nSQLITE_PRIVATE void *sqlite3PageMalloc(int);\nSQLITE_PRIVATE void sqlite3PageFree(void*);\nSQLITE_PRIVATE void sqlite3MemSetDefault(void);\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));\n#endif\nSQLITE_PRIVATE int sqlite3HeapNearlyFull(void);\n\n/*\n** On systems with ample stack space and that support alloca(), make\n** use of alloca() to obtain space for large automatic objects.  By default,\n** obtain space from malloc().\n**\n** The alloca() routine never returns NULL.  This will cause code paths\n** that deal with sqlite3StackAlloc() failures to be unreachable.\n*/\n#ifdef SQLITE_USE_ALLOCA\n# define sqlite3StackAllocRaw(D,N)   alloca(N)\n# define sqlite3StackAllocRawNN(D,N) alloca(N)\n# define sqlite3StackFree(D,P)\n# define sqlite3StackFreeNN(D,P)\n#else\n# define sqlite3StackAllocRaw(D,N)   sqlite3DbMallocRaw(D,N)\n# define sqlite3StackAllocRawNN(D,N) sqlite3DbMallocRawNN(D,N)\n# define sqlite3StackFree(D,P)       sqlite3DbFree(D,P)\n# define sqlite3StackFreeNN(D,P)     sqlite3DbFreeNN(D,P)\n#endif\n\n/* Do not allow both MEMSYS5 and MEMSYS3 to be defined together.  If they\n** are, disable MEMSYS3\n*/\n#ifdef SQLITE_ENABLE_MEMSYS5\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);\n#undef SQLITE_ENABLE_MEMSYS3\n#endif\n#ifdef SQLITE_ENABLE_MEMSYS3\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);\n#endif\n\n\n#ifndef SQLITE_MUTEX_OMIT\nSQLITE_PRIVATE   sqlite3_mutex_methods const *sqlite3DefaultMutex(void);\nSQLITE_PRIVATE   sqlite3_mutex_methods const *sqlite3NoopMutex(void);\nSQLITE_PRIVATE   sqlite3_mutex *sqlite3MutexAlloc(int);\nSQLITE_PRIVATE   int sqlite3MutexInit(void);\nSQLITE_PRIVATE   int sqlite3MutexEnd(void);\n#endif\n#if !defined(SQLITE_MUTEX_OMIT) && !defined(SQLITE_MUTEX_NOOP)\nSQLITE_PRIVATE   void sqlite3MemoryBarrier(void);\n#else\n# define sqlite3MemoryBarrier()\n#endif\n\nSQLITE_PRIVATE sqlite3_int64 sqlite3StatusValue(int);\nSQLITE_PRIVATE void sqlite3StatusUp(int, int);\nSQLITE_PRIVATE void sqlite3StatusDown(int, int);\nSQLITE_PRIVATE void sqlite3StatusHighwater(int, int);\nSQLITE_PRIVATE int sqlite3LookasideUsed(sqlite3*,int*);\n\n/* Access to mutexes used by sqlite3_status() */\nSQLITE_PRIVATE sqlite3_mutex *sqlite3Pcache1Mutex(void);\nSQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void);\n\n#if defined(SQLITE_ENABLE_MULTITHREADED_CHECKS) && !defined(SQLITE_MUTEX_OMIT)\nSQLITE_PRIVATE void sqlite3MutexWarnOnContention(sqlite3_mutex*);\n#else\n# define sqlite3MutexWarnOnContention(x)\n#endif\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n# define EXP754 (((u64)0x7ff)<<52)\n# define MAN754 ((((u64)1)<<52)-1)\n# define IsNaN(X) (((X)&EXP754)==EXP754 && ((X)&MAN754)!=0)\n# define IsOvfl(X) (((X)&EXP754)==EXP754)\nSQLITE_PRIVATE   int sqlite3IsNaN(double);\nSQLITE_PRIVATE   int sqlite3IsOverflow(double);\n#else\n# define IsNaN(X)             0\n# define sqlite3IsNaN(X)      0\n# define sqlite3IsOVerflow(X) 0\n#endif\n\n/*\n** An instance of the following structure holds information about SQL\n** functions arguments that are the parameters to the printf() function.\n*/\nstruct PrintfArguments {\n  int nArg;                /* Total number of arguments */\n  int nUsed;               /* Number of arguments used so far */\n  sqlite3_value **apArg;   /* The argument values */\n};\n\n/*\n** An instance of this object receives the decoding of a floating point\n** value into an approximate decimal representation.\n*/\nstruct FpDecode {\n  char sign;           /* '+' or '-' */\n  char isSpecial;      /* 1: Infinity  2: NaN */\n  int n;               /* Significant digits in the decode */\n  int iDP;             /* Location of the decimal point */\n  char *z;             /* Start of significant digits */\n  char zBuf[24];       /* Storage for significant digits */\n};\n\nSQLITE_PRIVATE void sqlite3FpDecode(FpDecode*,double,int,int);\nSQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);\nSQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)\nSQLITE_PRIVATE   void sqlite3DebugPrintf(const char*, ...);\n#endif\n#if defined(SQLITE_TEST)\nSQLITE_PRIVATE   void *sqlite3TestTextToPtr(const char*);\n#endif\n\n#if defined(SQLITE_DEBUG)\nSQLITE_PRIVATE   void sqlite3TreeViewLine(TreeView*, const char *zFormat, ...);\nSQLITE_PRIVATE   void sqlite3TreeViewExpr(TreeView*, const Expr*, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewBareExprList(TreeView*, const ExprList*, const char*);\nSQLITE_PRIVATE   void sqlite3TreeViewExprList(TreeView*, const ExprList*, u8, const char*);\nSQLITE_PRIVATE   void sqlite3TreeViewBareIdList(TreeView*, const IdList*, const char*);\nSQLITE_PRIVATE   void sqlite3TreeViewIdList(TreeView*, const IdList*, u8, const char*);\nSQLITE_PRIVATE   void sqlite3TreeViewColumnList(TreeView*, const Column*, int, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewSrcList(TreeView*, const SrcList*);\nSQLITE_PRIVATE   void sqlite3TreeViewSelect(TreeView*, const Select*, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewWith(TreeView*, const With*, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewUpsert(TreeView*, const Upsert*, u8);\n#if TREETRACE_ENABLED\nSQLITE_PRIVATE   void sqlite3TreeViewDelete(const With*, const SrcList*, const Expr*,\n                             const ExprList*,const Expr*, const Trigger*);\nSQLITE_PRIVATE   void sqlite3TreeViewInsert(const With*, const SrcList*,\n                             const IdList*, const Select*, const ExprList*,\n                             int, const Upsert*, const Trigger*);\nSQLITE_PRIVATE   void sqlite3TreeViewUpdate(const With*, const SrcList*, const ExprList*,\n                             const Expr*, int, const ExprList*, const Expr*,\n                             const Upsert*, const Trigger*);\n#endif\n#ifndef SQLITE_OMIT_TRIGGER\nSQLITE_PRIVATE   void sqlite3TreeViewTriggerStep(TreeView*, const TriggerStep*, u8, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewTrigger(TreeView*, const Trigger*, u8, u8);\n#endif\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE   void sqlite3TreeViewWindow(TreeView*, const Window*, u8);\nSQLITE_PRIVATE   void sqlite3TreeViewWinFunc(TreeView*, const Window*, u8);\n#endif\nSQLITE_PRIVATE   void sqlite3ShowExpr(const Expr*);\nSQLITE_PRIVATE   void sqlite3ShowExprList(const ExprList*);\nSQLITE_PRIVATE   void sqlite3ShowIdList(const IdList*);\nSQLITE_PRIVATE   void sqlite3ShowSrcList(const SrcList*);\nSQLITE_PRIVATE   void sqlite3ShowSelect(const Select*);\nSQLITE_PRIVATE   void sqlite3ShowWith(const With*);\nSQLITE_PRIVATE   void sqlite3ShowUpsert(const Upsert*);\n#ifndef SQLITE_OMIT_TRIGGER\nSQLITE_PRIVATE   void sqlite3ShowTriggerStep(const TriggerStep*);\nSQLITE_PRIVATE   void sqlite3ShowTriggerStepList(const TriggerStep*);\nSQLITE_PRIVATE   void sqlite3ShowTrigger(const Trigger*);\nSQLITE_PRIVATE   void sqlite3ShowTriggerList(const Trigger*);\n#endif\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE   void sqlite3ShowWindow(const Window*);\nSQLITE_PRIVATE   void sqlite3ShowWinFunc(const Window*);\n#endif\nSQLITE_PRIVATE   void sqlite3ShowBitvec(Bitvec*);\n#endif\n\nSQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*);\nSQLITE_PRIVATE void sqlite3ProgressCheck(Parse*);\nSQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);\nSQLITE_PRIVATE int sqlite3ErrorToParser(sqlite3*,int);\nSQLITE_PRIVATE void sqlite3Dequote(char*);\nSQLITE_PRIVATE void sqlite3DequoteExpr(Expr*);\nSQLITE_PRIVATE void sqlite3DequoteToken(Token*);\nSQLITE_PRIVATE void sqlite3DequoteNumber(Parse*, Expr*);\nSQLITE_PRIVATE void sqlite3TokenInit(Token*,char*);\nSQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);\nSQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*);\nSQLITE_PRIVATE void sqlite3FinishCoding(Parse*);\nSQLITE_PRIVATE int sqlite3GetTempReg(Parse*);\nSQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse*,int);\nSQLITE_PRIVATE int sqlite3GetTempRange(Parse*,int);\nSQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse*,int,int);\nSQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse*);\nSQLITE_PRIVATE void sqlite3TouchRegister(Parse*,int);\n#if defined(SQLITE_ENABLE_STAT4) || defined(SQLITE_DEBUG)\nSQLITE_PRIVATE int sqlite3FirstAvailableRegister(Parse*,int);\n#endif\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3NoTempsInRange(Parse*,int,int);\n#endif\nSQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);\nSQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);\nSQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);\nSQLITE_PRIVATE Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*);\nSQLITE_PRIVATE void sqlite3PExprAddSelect(Parse*, Expr*, Select*);\nSQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse*,Expr*, Expr*);\nSQLITE_PRIVATE Expr *sqlite3ExprSimplifiedAndOr(Expr*);\nSQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse*,ExprList*, const Token*, int);\nSQLITE_PRIVATE void sqlite3ExprAddFunctionOrderBy(Parse*,Expr*,ExprList*);\nSQLITE_PRIVATE void sqlite3ExprOrderByAggregateError(Parse*,Expr*);\nSQLITE_PRIVATE void sqlite3ExprFunctionUsable(Parse*,const Expr*,const FuncDef*);\nSQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32);\nSQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);\nSQLITE_PRIVATE void sqlite3ExprDeleteGeneric(sqlite3*,void*);\nSQLITE_PRIVATE int sqlite3ExprDeferredDelete(Parse*, Expr*);\nSQLITE_PRIVATE void sqlite3ExprUnmapAndDelete(Parse*, Expr*);\nSQLITE_PRIVATE ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);\nSQLITE_PRIVATE ExprList *sqlite3ExprListAppendVector(Parse*,ExprList*,IdList*,Expr*);\nSQLITE_PRIVATE Select *sqlite3ExprListToValues(Parse*, int, ExprList*);\nSQLITE_PRIVATE void sqlite3ExprListSetSortOrder(ExprList*,int,int);\nSQLITE_PRIVATE void sqlite3ExprListSetName(Parse*,ExprList*,const Token*,int);\nSQLITE_PRIVATE void sqlite3ExprListSetSpan(Parse*,ExprList*,const char*,const char*);\nSQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);\nSQLITE_PRIVATE void sqlite3ExprListDeleteGeneric(sqlite3*,void*);\nSQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList*);\nSQLITE_PRIVATE int sqlite3IndexHasDuplicateRootPage(Index*);\nSQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);\nSQLITE_PRIVATE int sqlite3InitCallback(void*, int, char**, char**);\nSQLITE_PRIVATE int sqlite3InitOne(sqlite3*, int, char**, u32);\nSQLITE_PRIVATE void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\nSQLITE_PRIVATE Module *sqlite3PragmaVtabRegister(sqlite3*,const char *zName);\n#endif\nSQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3*);\nSQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3*,int);\nSQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3*);\nSQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);\nSQLITE_PRIVATE void sqlite3ColumnSetExpr(Parse*,Table*,Column*,Expr*);\nSQLITE_PRIVATE Expr *sqlite3ColumnExpr(Table*,Column*);\nSQLITE_PRIVATE void sqlite3ColumnSetColl(sqlite3*,Column*,const char*zColl);\nSQLITE_PRIVATE const char *sqlite3ColumnColl(Column*);\nSQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3*,Table*);\nSQLITE_PRIVATE void sqlite3GenerateColumnNames(Parse *pParse, Select *pSelect);\nSQLITE_PRIVATE int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**);\nSQLITE_PRIVATE void sqlite3SubqueryColumnTypes(Parse*,Table*,Select*,char);\nSQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*,char);\nSQLITE_PRIVATE void sqlite3OpenSchemaTable(Parse *, int);\nSQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table*);\nSQLITE_PRIVATE int sqlite3TableColumnToIndex(Index*, int);\n#ifdef SQLITE_OMIT_GENERATED_COLUMNS\n# define sqlite3TableColumnToStorage(T,X) (X)  /* No-op pass-through */\n# define sqlite3StorageColumnToTable(T,X) (X)  /* No-op pass-through */\n#else\nSQLITE_PRIVATE   i16 sqlite3TableColumnToStorage(Table*, i16);\nSQLITE_PRIVATE   i16 sqlite3StorageColumnToTable(Table*, i16);\n#endif\nSQLITE_PRIVATE void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);\n#if SQLITE_ENABLE_HIDDEN_COLUMNS\nSQLITE_PRIVATE   void sqlite3ColumnPropertiesFromName(Table*, Column*);\n#else\n# define sqlite3ColumnPropertiesFromName(T,C) /* no-op */\n#endif\nSQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token,Token);\nSQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);\nSQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);\nSQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*, const char*, const char*);\nSQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,Expr*,const char*,const char*);\nSQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);\nSQLITE_PRIVATE void sqlite3AddGenerated(Parse*,Expr*,Token*);\nSQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,u32,Select*);\nSQLITE_PRIVATE void sqlite3AddReturning(Parse*,ExprList*);\nSQLITE_PRIVATE int sqlite3ParseUri(const char*,const char*,unsigned int*,\n                    sqlite3_vfs**,char**,char **);\n#define sqlite3CodecQueryParameters(A,B,C) 0\nSQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);\n\n#ifdef SQLITE_UNTESTABLE\n# define sqlite3FaultSim(X) SQLITE_OK\n#else\nSQLITE_PRIVATE   int sqlite3FaultSim(int);\n#endif\n\nSQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);\nSQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);\nSQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec*, u32);\nSQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);\nSQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);\nSQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec*);\nSQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int,int*);\n#endif\n\nSQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*);\nSQLITE_PRIVATE void sqlite3RowSetDelete(void*);\nSQLITE_PRIVATE void sqlite3RowSetClear(void*);\nSQLITE_PRIVATE void sqlite3RowSetInsert(RowSet*, i64);\nSQLITE_PRIVATE int sqlite3RowSetTest(RowSet*, int iBatch, i64);\nSQLITE_PRIVATE int sqlite3RowSetNext(RowSet*, i64*);\n\nSQLITE_PRIVATE void sqlite3CreateView(Parse*,Token*,Token*,Token*,ExprList*,Select*,int,int);\n\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)\nSQLITE_PRIVATE   int sqlite3ViewGetColumnNames(Parse*,Table*);\n#else\n# define sqlite3ViewGetColumnNames(A,B) 0\n#endif\n\n#if SQLITE_MAX_ATTACHED>30\nSQLITE_PRIVATE   int sqlite3DbMaskAllZero(yDbMask);\n#endif\nSQLITE_PRIVATE void sqlite3DropTable(Parse*, SrcList*, int, int);\nSQLITE_PRIVATE void sqlite3CodeDropTable(Parse*, Table*, int, int);\nSQLITE_PRIVATE void sqlite3DeleteTable(sqlite3*, Table*);\nSQLITE_PRIVATE void sqlite3DeleteTableGeneric(sqlite3*, void*);\nSQLITE_PRIVATE void sqlite3FreeIndex(sqlite3*, Index*);\n#ifndef SQLITE_OMIT_AUTOINCREMENT\nSQLITE_PRIVATE   void sqlite3AutoincrementBegin(Parse *pParse);\nSQLITE_PRIVATE   void sqlite3AutoincrementEnd(Parse *pParse);\n#else\n# define sqlite3AutoincrementBegin(X)\n# define sqlite3AutoincrementEnd(X)\n#endif\nSQLITE_PRIVATE void sqlite3Insert(Parse*, SrcList*, Select*, IdList*, int, Upsert*);\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\nSQLITE_PRIVATE   void sqlite3ComputeGeneratedColumns(Parse*, int, Table*);\n#endif\nSQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int*,int*);\nSQLITE_PRIVATE IdList *sqlite3IdListAppend(Parse*, IdList*, Token*);\nSQLITE_PRIVATE int sqlite3IdListIndex(IdList*,const char*);\nSQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(Parse*, SrcList*, int, int);\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppendList(Parse *pParse, SrcList *p1, SrcList *p2);\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppend(Parse*, SrcList*, Token*, Token*);\nSQLITE_PRIVATE void sqlite3SubqueryDelete(sqlite3*,Subquery*);\nSQLITE_PRIVATE Select *sqlite3SubqueryDetach(sqlite3*,SrcItem*);\nSQLITE_PRIVATE int sqlite3SrcItemAttachSubquery(Parse*, SrcItem*, Select*, int);\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(Parse*, SrcList*, Token*, Token*,\n                                      Token*, Select*, OnOrUsing*);\nSQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *, SrcList *, Token *);\nSQLITE_PRIVATE void sqlite3SrcListFuncArgs(Parse*, SrcList*, ExprList*);\nSQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *, SrcItem *);\nSQLITE_PRIVATE void sqlite3SrcListShiftJoinType(Parse*,SrcList*);\nSQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*);\nSQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);\nSQLITE_PRIVATE void sqlite3ClearOnOrUsing(sqlite3*, OnOrUsing*);\nSQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);\nSQLITE_PRIVATE Index *sqlite3AllocateIndexObject(sqlite3*,int,int,char**);\nSQLITE_PRIVATE void sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,\n                          Expr*, int, int, u8);\nSQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);\nSQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);\nSQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,\n                         Expr*,ExprList*,u32,Expr*);\nSQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);\nSQLITE_PRIVATE void sqlite3SelectDeleteGeneric(sqlite3*,void*);\nSQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);\nSQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, Trigger*);\nSQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);\n#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)\nSQLITE_PRIVATE Expr *sqlite3LimitWhere(Parse*,SrcList*,Expr*,ExprList*,Expr*,char*);\n#endif\nSQLITE_PRIVATE void sqlite3CodeChangeCount(Vdbe*,int,const char*);\nSQLITE_PRIVATE void sqlite3DeleteFrom(Parse*, SrcList*, Expr*, ExprList*, Expr*);\nSQLITE_PRIVATE void sqlite3Update(Parse*, SrcList*, ExprList*,Expr*,int,ExprList*,Expr*,\n                   Upsert*);\nSQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(Parse*,SrcList*,Expr*,ExprList*,\n                             ExprList*,Select*,u16,int);\nSQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo*);\nSQLITE_PRIVATE LogEst sqlite3WhereOutputRowCount(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereOrderByLimitOptLabel(WhereInfo*);\nSQLITE_PRIVATE void sqlite3WhereMinMaxOptEarlyOut(Vdbe*,WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereIsSorted(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo*);\nSQLITE_PRIVATE int sqlite3WhereOkOnePass(WhereInfo*, int*);\n#define ONEPASS_OFF      0        /* Use of ONEPASS not allowed */\n#define ONEPASS_SINGLE   1        /* ONEPASS valid for a single row update */\n#define ONEPASS_MULTI    2        /* ONEPASS is valid for multiple rows */\nSQLITE_PRIVATE int sqlite3WhereUsesDeferredSeek(WhereInfo*);\nSQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(Parse*, Index*, int, int, int);\nSQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, u8);\nSQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int);\nSQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int);\nSQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg);\nSQLITE_PRIVATE void sqlite3ExprCode(Parse*, Expr*, int);\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\nSQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int);\n#endif\nSQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int);\nSQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse*, Expr*, int);\nSQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(Parse*, Expr*, int);\nSQLITE_PRIVATE void sqlite3ExprNullRegisterRange(Parse*, int, int);\nSQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);\nSQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);\nSQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);\n#define SQLITE_ECEL_DUP      0x01  /* Deep, not shallow copies */\n#define SQLITE_ECEL_FACTOR   0x02  /* Factor out constant terms */\n#define SQLITE_ECEL_REF      0x04  /* Use ExprList.u.x.iOrderByCol */\n#define SQLITE_ECEL_OMITREF  0x08  /* Omit if ExprList.u.x.iOrderByCol */\nSQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int);\nSQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int);\nSQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse*, Expr*, int, int);\nSQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);\n#define LOCATE_VIEW    0x01\n#define LOCATE_NOERR   0x02\nSQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*);\nSQLITE_PRIVATE const char *sqlite3PreferredTableName(const char*);\nSQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,SrcItem *);\nSQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);\nSQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);\nSQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);\nSQLITE_PRIVATE void sqlite3Vacuum(Parse*,Token*,Expr*);\nSQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*, int, sqlite3_value*);\nSQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, const Token*);\nSQLITE_PRIVATE int sqlite3ExprCompare(const Parse*,const Expr*,const Expr*, int);\nSQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr*,Expr*,int);\nSQLITE_PRIVATE int sqlite3ExprListCompare(const ExprList*,const ExprList*, int);\nSQLITE_PRIVATE int sqlite3ExprImpliesExpr(const Parse*,const Expr*,const Expr*, int);\nSQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr*,int,int);\nSQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker*,Parse*);\nSQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);\nSQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);\nSQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx);\nSQLITE_PRIVATE int sqlite3ReferencesSrcList(Parse*, Expr*, SrcList*);\nSQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*);\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE void sqlite3PrngSaveState(void);\nSQLITE_PRIVATE void sqlite3PrngRestoreState(void);\n#endif\nSQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*,int);\nSQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse*, int);\nSQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);\nSQLITE_PRIVATE void sqlite3BeginTransaction(Parse*, int);\nSQLITE_PRIVATE void sqlite3EndTransaction(Parse*,int);\nSQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*);\nSQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);\nSQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*);\nSQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char*);\nSQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr*);\nSQLITE_PRIVATE int sqlite3ExprTruthValue(const Expr*);\nSQLITE_PRIVATE int sqlite3ExprIsConstant(Parse*,Expr*);\nSQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*, u8);\nSQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*);\nSQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int,int);\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\nSQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*);\n#endif\nSQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr*, int*, Parse*);\nSQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);\nSQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);\nSQLITE_PRIVATE int sqlite3IsRowid(const char*);\nSQLITE_PRIVATE const char *sqlite3RowidAlias(Table *pTab);\nSQLITE_PRIVATE void sqlite3GenerateRowDelete(\n    Parse*,Table*,Trigger*,int,int,int,i16,u8,u8,u8,int);\nSQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int, int*, int);\nSQLITE_PRIVATE int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int, int*,Index*,int);\nSQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse*,int);\nSQLITE_PRIVATE int sqlite3ExprReferencesUpdatedColumn(Expr*,int*,int);\nSQLITE_PRIVATE void sqlite3GenerateConstraintChecks(Parse*,Table*,int*,int,int,int,int,\n                                     u8,u8,int,int*,int*,Upsert*);\n#ifdef SQLITE_ENABLE_NULL_TRIM\nSQLITE_PRIVATE   void sqlite3SetMakeRecordP5(Vdbe*,Table*);\n#else\n# define sqlite3SetMakeRecordP5(A,B)\n#endif\nSQLITE_PRIVATE void sqlite3CompleteInsertion(Parse*,Table*,int,int,int,int*,int,int,int);\nSQLITE_PRIVATE int sqlite3OpenTableAndIndices(Parse*, Table*, int, u8, int, u8*, int*, int*);\nSQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse*, int, int);\nSQLITE_PRIVATE void sqlite3MultiWrite(Parse*);\nSQLITE_PRIVATE void sqlite3MayAbort(Parse*);\nSQLITE_PRIVATE void sqlite3HaltConstraint(Parse*, int, int, char*, i8, u8);\nSQLITE_PRIVATE void sqlite3UniqueConstraint(Parse*, int, Index*);\nSQLITE_PRIVATE void sqlite3RowidConstraint(Parse*, int, Table*);\nSQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,const Expr*,int);\nSQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,const ExprList*,int);\nSQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,const SrcList*,int);\nSQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,const IdList*);\nSQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,const Select*,int);\nSQLITE_PRIVATE FuncDef *sqlite3FunctionSearch(int,const char*);\nSQLITE_PRIVATE void sqlite3InsertBuiltinFuncs(FuncDef*,int);\nSQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,u8,u8);\nSQLITE_PRIVATE void sqlite3QuoteValue(StrAccum*,sqlite3_value*,int);\nSQLITE_PRIVATE int sqlite3AppendOneUtf8Character(char*, u32);\nSQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void);\nSQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void);\nSQLITE_PRIVATE void sqlite3RegisterJsonFunctions(void);\nSQLITE_PRIVATE void sqlite3RegisterPerConnectionBuiltinFunctions(sqlite3*);\n#if !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON)\nSQLITE_PRIVATE   Module *sqlite3JsonVtabRegister(sqlite3*,const char*);\n#endif\nSQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);\nSQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);\nSQLITE_PRIVATE void sqlite3ChangeCookie(Parse*, int);\nSQLITE_PRIVATE With *sqlite3WithDup(sqlite3 *db, With *p);\n\n#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_CARRAY)\nSQLITE_PRIVATE   Module *sqlite3CarrayRegister(sqlite3*);\n#endif\n\n#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)\nSQLITE_PRIVATE void sqlite3MaterializeView(Parse*, Table*, Expr*, ExprList*,Expr*,int);\n#endif\n\n#ifndef SQLITE_OMIT_TRIGGER\nSQLITE_PRIVATE   void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,\n                           Expr*,int, int);\nSQLITE_PRIVATE   void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);\nSQLITE_PRIVATE   void sqlite3DropTrigger(Parse*, SrcList*, int);\nSQLITE_PRIVATE   void sqlite3DropTriggerPtr(Parse*, Trigger*);\nSQLITE_PRIVATE   Trigger *sqlite3TriggersExist(Parse *, Table*, int, ExprList*, int *pMask);\nSQLITE_PRIVATE   Trigger *sqlite3TriggerList(Parse *, Table *);\nSQLITE_PRIVATE   void sqlite3CodeRowTrigger(Parse*, Trigger *, int, ExprList*, int, Table *,\n                            int, int, int);\nSQLITE_PRIVATE   void sqlite3CodeRowTriggerDirect(Parse *, Trigger *, Table *, int, int, int);\n  void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*);\nSQLITE_PRIVATE   void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);\nSQLITE_PRIVATE   TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*,\n                                        const char*,const char*);\nSQLITE_PRIVATE   TriggerStep *sqlite3TriggerInsertStep(Parse*,Token*, IdList*,\n                                        Select*,u8,Upsert*,\n                                        const char*,const char*);\nSQLITE_PRIVATE   TriggerStep *sqlite3TriggerUpdateStep(Parse*,Token*,SrcList*,ExprList*,\n                                        Expr*, u8, const char*,const char*);\nSQLITE_PRIVATE   TriggerStep *sqlite3TriggerDeleteStep(Parse*,Token*, Expr*,\n                                        const char*,const char*);\nSQLITE_PRIVATE   void sqlite3DeleteTrigger(sqlite3*, Trigger*);\nSQLITE_PRIVATE   void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);\nSQLITE_PRIVATE   u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);\nSQLITE_PRIVATE   SrcList *sqlite3TriggerStepSrc(Parse*, TriggerStep*);\n# define sqlite3ParseToplevel(p) ((p)->pToplevel ? (p)->pToplevel : (p))\n# define sqlite3IsToplevel(p) ((p)->pToplevel==0)\n#else\n# define sqlite3TriggersExist(B,C,D,E,F) 0\n# define sqlite3DeleteTrigger(A,B)\n# define sqlite3DropTriggerPtr(A,B)\n# define sqlite3UnlinkAndDeleteTrigger(A,B,C)\n# define sqlite3CodeRowTrigger(A,B,C,D,E,F,G,H,I)\n# define sqlite3CodeRowTriggerDirect(A,B,C,D,E,F)\n# define sqlite3TriggerList(X, Y) 0\n# define sqlite3ParseToplevel(p) p\n# define sqlite3IsToplevel(p) 1\n# define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0\n# define sqlite3TriggerStepSrc(A,B) 0\n#endif\n\nSQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);\nSQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol);\nSQLITE_PRIVATE void sqlite3SrcItemColumnUsed(SrcItem*,int);\nSQLITE_PRIVATE void sqlite3SetJoinExpr(Expr*,int,u32);\nSQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);\nSQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);\n#ifndef SQLITE_OMIT_AUTHORIZATION\nSQLITE_PRIVATE   void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);\nSQLITE_PRIVATE   int sqlite3AuthCheck(Parse*,int, const char*, const char*, const char*);\nSQLITE_PRIVATE   void sqlite3AuthContextPush(Parse*, AuthContext*, const char*);\nSQLITE_PRIVATE   void sqlite3AuthContextPop(AuthContext*);\nSQLITE_PRIVATE   int sqlite3AuthReadCol(Parse*, const char *, const char *, int);\n#else\n# define sqlite3AuthRead(a,b,c,d)\n# define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK\n# define sqlite3AuthContextPush(a,b,c)\n# define sqlite3AuthContextPop(a)  ((void)(a))\n#endif\nSQLITE_PRIVATE int sqlite3DbIsNamed(sqlite3 *db, int iDb, const char *zName);\nSQLITE_PRIVATE void sqlite3Attach(Parse*, Expr*, Expr*, Expr*);\nSQLITE_PRIVATE void sqlite3Detach(Parse*, Expr*);\nSQLITE_PRIVATE void sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);\nSQLITE_PRIVATE int sqlite3FixSrcList(DbFixer*, SrcList*);\nSQLITE_PRIVATE int sqlite3FixSelect(DbFixer*, Select*);\nSQLITE_PRIVATE int sqlite3FixExpr(DbFixer*, Expr*);\nSQLITE_PRIVATE int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);\n\nSQLITE_PRIVATE int sqlite3RealSameAsInt(double,sqlite3_int64);\nSQLITE_PRIVATE i64 sqlite3RealToI64(double);\nSQLITE_PRIVATE int sqlite3Int64ToText(i64,char*);\nSQLITE_PRIVATE int sqlite3AtoF(const char *z, double*, int, u8);\nSQLITE_PRIVATE int sqlite3GetInt32(const char *, int*);\nSQLITE_PRIVATE int sqlite3GetUInt32(const char*, u32*);\nSQLITE_PRIVATE int sqlite3Atoi(const char*);\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *pData, int nByte, int nChar);\n#endif\nSQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);\nSQLITE_PRIVATE u32 sqlite3Utf8Read(const u8**);\nSQLITE_PRIVATE int sqlite3Utf8ReadLimited(const u8*, int, u32*);\nSQLITE_PRIVATE LogEst sqlite3LogEst(u64);\nSQLITE_PRIVATE LogEst sqlite3LogEstAdd(LogEst,LogEst);\nSQLITE_PRIVATE LogEst sqlite3LogEstFromDouble(double);\nSQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst);\nSQLITE_PRIVATE VList *sqlite3VListAdd(sqlite3*,VList*,const char*,int,int);\nSQLITE_PRIVATE const char *sqlite3VListNumToName(VList*,int);\nSQLITE_PRIVATE int sqlite3VListNameToNum(VList*,const char*,int);\n\n/*\n** Routines to read and write variable-length integers.  These used to\n** be defined locally, but now we use the varint routines in the util.c\n** file.\n*/\nSQLITE_PRIVATE int sqlite3PutVarint(unsigned char*, u64);\nSQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *, u64 *);\nSQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);\nSQLITE_PRIVATE int sqlite3VarintLen(u64 v);\n\n/*\n** The common case is for a varint to be a single byte.  They following\n** macros handle the common case without a procedure call, but then call\n** the procedure for larger varints.\n*/\n#define getVarint32(A,B)  \\\n  (u8)((*(A)<(u8)0x80)?((B)=(u32)*(A)),1:sqlite3GetVarint32((A),(u32 *)&(B)))\n#define getVarint32NR(A,B) \\\n  B=(u32)*(A);if(B>=0x80)sqlite3GetVarint32((A),(u32*)&(B))\n#define putVarint32(A,B)  \\\n  (u8)(((u32)(B)<(u32)0x80)?(*(A)=(unsigned char)(B)),1:\\\n  sqlite3PutVarint((A),(B)))\n#define getVarint    sqlite3GetVarint\n#define putVarint    sqlite3PutVarint\n\n\nSQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3*, Index*);\nSQLITE_PRIVATE char *sqlite3TableAffinityStr(sqlite3*,const Table*);\nSQLITE_PRIVATE void sqlite3TableAffinity(Vdbe*, Table*, int);\nSQLITE_PRIVATE char sqlite3CompareAffinity(const Expr *pExpr, char aff2);\nSQLITE_PRIVATE int sqlite3IndexAffinityOk(const Expr *pExpr, char idx_affinity);\nSQLITE_PRIVATE char sqlite3TableColumnAffinity(const Table*,int);\nSQLITE_PRIVATE char sqlite3ExprAffinity(const Expr *pExpr);\nSQLITE_PRIVATE int sqlite3ExprDataType(const Expr *pExpr);\nSQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*, int, u8);\nSQLITE_PRIVATE int sqlite3DecOrHexToI64(const char*, i64*);\nSQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3*, int, const char*,...);\nSQLITE_PRIVATE void sqlite3Error(sqlite3*,int);\nSQLITE_PRIVATE void sqlite3ErrorClear(sqlite3*);\nSQLITE_PRIVATE void sqlite3SystemError(sqlite3*,int);\n#if !defined(SQLITE_OMIT_BLOB_LITERAL)\nSQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);\n#endif\nSQLITE_PRIVATE u8 sqlite3HexToInt(int h);\nSQLITE_PRIVATE int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);\n\n#if defined(SQLITE_NEED_ERR_NAME)\nSQLITE_PRIVATE const char *sqlite3ErrName(int);\n#endif\n\n#ifndef SQLITE_OMIT_DESERIALIZE\nSQLITE_PRIVATE int sqlite3MemdbInit(void);\nSQLITE_PRIVATE int sqlite3IsMemdb(const sqlite3_vfs*);\n#else\n# define sqlite3IsMemdb(X) 0\n#endif\n\nSQLITE_PRIVATE const char *sqlite3ErrStr(int);\nSQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse);\nSQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);\nSQLITE_PRIVATE int sqlite3IsBinary(const CollSeq*);\nSQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);\nSQLITE_PRIVATE void sqlite3SetTextEncoding(sqlite3 *db, u8);\nSQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr);\nSQLITE_PRIVATE CollSeq *sqlite3ExprNNCollSeq(Parse *pParse, const Expr *pExpr);\nSQLITE_PRIVATE int sqlite3ExprCollSeqMatch(Parse*,const Expr*,const Expr*);\nSQLITE_PRIVATE Expr *sqlite3ExprAddCollateToken(const Parse *pParse, Expr*, const Token*, int);\nSQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(const Parse*,Expr*,const char*);\nSQLITE_PRIVATE Expr *sqlite3ExprSkipCollate(Expr*);\nSQLITE_PRIVATE Expr *sqlite3ExprSkipCollateAndLikely(Expr*);\nSQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *, CollSeq *);\nSQLITE_PRIVATE int sqlite3WritableSchema(sqlite3*);\nSQLITE_PRIVATE int sqlite3CheckObjectName(Parse*, const char*,const char*,const char*);\nSQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, i64);\nSQLITE_PRIVATE int sqlite3AddInt64(i64*,i64);\nSQLITE_PRIVATE int sqlite3SubInt64(i64*,i64);\nSQLITE_PRIVATE int sqlite3MulInt64(i64*,i64);\nSQLITE_PRIVATE int sqlite3AbsInt32(int);\n#ifdef SQLITE_ENABLE_8_3_NAMES\nSQLITE_PRIVATE void sqlite3FileSuffix3(const char*, char*);\n#else\n# define sqlite3FileSuffix3(X,Y)\n#endif\nSQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z,u8);\n\nSQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8);\nSQLITE_PRIVATE int sqlite3ValueIsOfClass(const sqlite3_value*, void(*)(void*));\nSQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8);\nSQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8,\n                        void(*)(void*));\nSQLITE_PRIVATE void sqlite3ValueSetNull(sqlite3_value*);\nSQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value*);\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE void sqlite3ResultIntReal(sqlite3_context*);\n#endif\nSQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);\n#endif\nSQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, const Expr *, u8, u8, sqlite3_value **);\nSQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);\n#ifndef SQLITE_AMALGAMATION\nSQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[];\nSQLITE_PRIVATE const char sqlite3StrBINARY[];\nSQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[];\nSQLITE_PRIVATE const char sqlite3StdTypeAffinity[];\nSQLITE_PRIVATE const char *sqlite3StdType[];\nSQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];\nSQLITE_PRIVATE const unsigned char *sqlite3aLTb;\nSQLITE_PRIVATE const unsigned char *sqlite3aEQb;\nSQLITE_PRIVATE const unsigned char *sqlite3aGTb;\nSQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];\nSQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;\nSQLITE_PRIVATE FuncDefHash sqlite3BuiltinFunctions;\n#ifndef SQLITE_OMIT_WSD\nSQLITE_PRIVATE int sqlite3PendingByte;\n#endif\n#endif /* SQLITE_AMALGAMATION */\n#ifdef VDBE_PROFILE\nSQLITE_PRIVATE sqlite3_uint64 sqlite3NProfileCnt;\n#endif\nSQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, Pgno, Pgno);\nSQLITE_PRIVATE void sqlite3Reindex(Parse*, Token*, Token*);\nSQLITE_PRIVATE void sqlite3AlterFunctions(void);\nSQLITE_PRIVATE void sqlite3AlterRenameTable(Parse*, SrcList*, Token*);\nSQLITE_PRIVATE void sqlite3AlterRenameColumn(Parse*, SrcList*, Token*, Token*);\nSQLITE_PRIVATE i64 sqlite3GetToken(const unsigned char *, int *);\nSQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);\nSQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*, int);\nSQLITE_PRIVATE void sqlite3CodeRhsOfIN(Parse*, Expr*, int);\nSQLITE_PRIVATE int sqlite3CodeSubselect(Parse*, Expr*);\nSQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);\nSQLITE_PRIVATE int sqlite3ExpandSubquery(Parse*, SrcItem*);\nSQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);\nSQLITE_PRIVATE int sqlite3MatchEName(\n  const struct ExprList_item*,\n  const char*,\n  const char*,\n  const char*,\n  int*\n);\nSQLITE_PRIVATE Bitmask sqlite3ExprColUsed(Expr*);\nSQLITE_PRIVATE u8 sqlite3StrIHash(const char*);\nSQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);\nSQLITE_PRIVATE int sqlite3ResolveExprListNames(NameContext*, ExprList*);\nSQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);\nSQLITE_PRIVATE int sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);\nSQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);\nSQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);\nSQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);\nSQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);\nSQLITE_PRIVATE void sqlite3AlterDropColumn(Parse*, SrcList*, const Token*);\nSQLITE_PRIVATE const void *sqlite3RenameTokenMap(Parse*, const void*, const Token*);\nSQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse*, const void *pTo, const void *pFrom);\nSQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse*, Expr*);\nSQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse*, ExprList*);\nSQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(Parse*, u8, CollSeq *, const char*);\nSQLITE_PRIVATE char sqlite3AffinityType(const char*, Column*);\nSQLITE_PRIVATE void sqlite3Analyze(Parse*, Token*, Token*);\nSQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler*);\nSQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);\nSQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);\nSQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);\nSQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);\nSQLITE_PRIVATE void sqlite3DefaultRowEst(Index*);\nSQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);\nSQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);\nSQLITE_PRIVATE void sqlite3SchemaClear(void *);\nSQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);\nSQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3*,int,int);\nSQLITE_PRIVATE void sqlite3KeyInfoUnref(KeyInfo*);\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoRef(KeyInfo*);\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoOfIndex(Parse*, Index*);\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoFromExprList(Parse*, ExprList*, int, int);\nSQLITE_PRIVATE const char *sqlite3SelectOpName(int);\nSQLITE_PRIVATE int sqlite3HasExplicitNulls(Parse*, ExprList*);\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3KeyInfoIsWriteable(KeyInfo*);\n#endif\nSQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,\n  void (*)(sqlite3_context*,int,sqlite3_value **),\n  void (*)(sqlite3_context*,int,sqlite3_value **),\n  void (*)(sqlite3_context*),\n  void (*)(sqlite3_context*),\n  void (*)(sqlite3_context*,int,sqlite3_value **),\n  FuncDestructor *pDestructor\n);\nSQLITE_PRIVATE void sqlite3NoopDestructor(void*);\nSQLITE_PRIVATE void *sqlite3OomFault(sqlite3*);\nSQLITE_PRIVATE void sqlite3OomClear(sqlite3*);\nSQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);\nSQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *);\n\nSQLITE_PRIVATE char *sqlite3RCStrRef(char*);\nSQLITE_PRIVATE void sqlite3RCStrUnref(void*);\nSQLITE_PRIVATE char *sqlite3RCStrNew(u64);\nSQLITE_PRIVATE char *sqlite3RCStrResize(char*,u64);\n\nSQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, sqlite3*, char*, int, int);\nSQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum*, i64);\nSQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*);\nSQLITE_PRIVATE void sqlite3StrAccumSetError(StrAccum*, u8);\nSQLITE_PRIVATE void sqlite3ResultStrAccum(sqlite3_context*,StrAccum*);\nSQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest*,int,int);\nSQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);\nSQLITE_PRIVATE void sqlite3RecordErrorByteOffset(sqlite3*,const char*);\nSQLITE_PRIVATE void sqlite3RecordErrorOffsetOfExpr(sqlite3*,const Expr*);\n\nSQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *);\nSQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);\n\n#ifndef SQLITE_OMIT_SUBQUERY\nSQLITE_PRIVATE int sqlite3ExprCheckIN(Parse*, Expr*);\n#else\n# define sqlite3ExprCheckIN(x,y) SQLITE_OK\n#endif\n\n#ifdef SQLITE_ENABLE_STAT4\nSQLITE_PRIVATE int sqlite3Stat4ProbeSetValue(\n    Parse*,Index*,UnpackedRecord**,Expr*,int,int,int*);\nSQLITE_PRIVATE int sqlite3Stat4ValueFromExpr(Parse*, Expr*, u8, sqlite3_value**);\nSQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord*);\nSQLITE_PRIVATE int sqlite3Stat4Column(sqlite3*, const void*, int, int, sqlite3_value**);\nSQLITE_PRIVATE char sqlite3IndexColumnAffinity(sqlite3*, Index*, int);\n#endif\n\n/*\n** The interface to the LEMON-generated parser\n*/\n#ifndef SQLITE_AMALGAMATION\nSQLITE_PRIVATE   void *sqlite3ParserAlloc(void*(*)(u64), Parse*);\nSQLITE_PRIVATE   void sqlite3ParserFree(void*, void(*)(void*));\n#endif\nSQLITE_PRIVATE void sqlite3Parser(void*, int, Token);\nSQLITE_PRIVATE int sqlite3ParserFallback(int);\n#ifdef YYTRACKMAXSTACKDEPTH\nSQLITE_PRIVATE   int sqlite3ParserStackPeak(void*);\n#endif\n\nSQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\nSQLITE_PRIVATE   void sqlite3CloseExtensions(sqlite3*);\n#else\n# define sqlite3CloseExtensions(X)\n#endif\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\nSQLITE_PRIVATE   void sqlite3TableLock(Parse *, int, Pgno, u8, const char *);\n#else\n  #define sqlite3TableLock(v,w,x,y,z)\n#endif\n\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE   int sqlite3Utf8To8(unsigned char*);\n#endif\n\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n#  define sqlite3VtabClear(D,T)\n#  define sqlite3VtabSync(X,Y) SQLITE_OK\n#  define sqlite3VtabRollback(X)\n#  define sqlite3VtabCommit(X)\n#  define sqlite3VtabInSync(db) 0\n#  define sqlite3VtabLock(X)\n#  define sqlite3VtabUnlock(X)\n#  define sqlite3VtabModuleUnref(D,X)\n#  define sqlite3VtabUnlockList(X)\n#  define sqlite3VtabSavepoint(X, Y, Z) SQLITE_OK\n#  define sqlite3GetVTable(X,Y)  ((VTable*)0)\n#else\nSQLITE_PRIVATE    void sqlite3VtabClear(sqlite3 *db, Table*);\nSQLITE_PRIVATE    void sqlite3VtabDisconnect(sqlite3 *db, Table *p);\nSQLITE_PRIVATE    int sqlite3VtabSync(sqlite3 *db, Vdbe*);\nSQLITE_PRIVATE    int sqlite3VtabRollback(sqlite3 *db);\nSQLITE_PRIVATE    int sqlite3VtabCommit(sqlite3 *db);\nSQLITE_PRIVATE    void sqlite3VtabLock(VTable *);\nSQLITE_PRIVATE    void sqlite3VtabUnlock(VTable *);\nSQLITE_PRIVATE    void sqlite3VtabModuleUnref(sqlite3*,Module*);\nSQLITE_PRIVATE    void sqlite3VtabUnlockList(sqlite3*);\nSQLITE_PRIVATE    int sqlite3VtabSavepoint(sqlite3 *, int, int);\nSQLITE_PRIVATE    void sqlite3VtabImportErrmsg(Vdbe*, sqlite3_vtab*);\nSQLITE_PRIVATE    VTable *sqlite3GetVTable(sqlite3*, Table*);\nSQLITE_PRIVATE    Module *sqlite3VtabCreateModule(\n     sqlite3*,\n     const char*,\n     const sqlite3_module*,\n     void*,\n     void(*)(void*)\n   );\n#  define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)\n#endif\nSQLITE_PRIVATE int sqlite3ReadOnlyShadowTables(sqlite3 *db);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\nSQLITE_PRIVATE   int sqlite3ShadowTableName(sqlite3 *db, const char *zName);\nSQLITE_PRIVATE   int sqlite3IsShadowTableOf(sqlite3*,Table*,const char*);\nSQLITE_PRIVATE   void sqlite3MarkAllShadowTablesOf(sqlite3*, Table*);\n#else\n# define sqlite3ShadowTableName(A,B) 0\n# define sqlite3IsShadowTableOf(A,B,C) 0\n# define sqlite3MarkAllShadowTablesOf(A,B)\n#endif\nSQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse*,Module*);\nSQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3*,Module*);\nSQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse*,Table*);\nSQLITE_PRIVATE void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*, int);\nSQLITE_PRIVATE void sqlite3VtabFinishParse(Parse*, Token*);\nSQLITE_PRIVATE void sqlite3VtabArgInit(Parse*);\nSQLITE_PRIVATE void sqlite3VtabArgExtend(Parse*, Token*);\nSQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);\nSQLITE_PRIVATE int sqlite3VtabCallConnect(Parse*, Table*);\nSQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);\nSQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);\n\nSQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);\nSQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(Parse*);\nSQLITE_PRIVATE sqlite3_int64 sqlite3StmtCurrentTime(sqlite3_context*);\nSQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe*, const char*, int);\nSQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *, sqlite3_stmt *);\nSQLITE_PRIVATE void sqlite3ParseObjectInit(Parse*,sqlite3*);\nSQLITE_PRIVATE void sqlite3ParseObjectReset(Parse*);\nSQLITE_PRIVATE void *sqlite3ParserAddCleanup(Parse*,void(*)(sqlite3*,void*),void*);\n#ifdef SQLITE_ENABLE_NORMALIZE\nSQLITE_PRIVATE char *sqlite3Normalize(Vdbe*, const char*);\n#endif\nSQLITE_PRIVATE int sqlite3Reprepare(Vdbe*);\nSQLITE_PRIVATE void sqlite3ExprListCheckLength(Parse*, ExprList*, const char*);\nSQLITE_PRIVATE CollSeq *sqlite3ExprCompareCollSeq(Parse*,const Expr*);\nSQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(Parse *, const Expr*, const Expr*);\nSQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);\nSQLITE_PRIVATE const char *sqlite3JournalModename(int);\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE   int sqlite3Checkpoint(sqlite3*, int, int, int*, int*);\nSQLITE_PRIVATE   int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);\n#endif\n#ifndef SQLITE_OMIT_CTE\nSQLITE_PRIVATE   Cte *sqlite3CteNew(Parse*,Token*,ExprList*,Select*,u8);\nSQLITE_PRIVATE   void sqlite3CteDelete(sqlite3*,Cte*);\nSQLITE_PRIVATE   With *sqlite3WithAdd(Parse*,With*,Cte*);\nSQLITE_PRIVATE   void sqlite3WithDelete(sqlite3*,With*);\nSQLITE_PRIVATE   void sqlite3WithDeleteGeneric(sqlite3*,void*);\nSQLITE_PRIVATE   With *sqlite3WithPush(Parse*, With*, u8);\n#else\n# define sqlite3CteNew(P,T,E,S)   ((void*)0)\n# define sqlite3CteDelete(D,C)\n# define sqlite3CteWithAdd(P,W,C) ((void*)0)\n# define sqlite3WithDelete(x,y)\n# define sqlite3WithPush(x,y,z) ((void*)0)\n#endif\n#ifndef SQLITE_OMIT_UPSERT\nSQLITE_PRIVATE   Upsert *sqlite3UpsertNew(sqlite3*,ExprList*,Expr*,ExprList*,Expr*,Upsert*);\nSQLITE_PRIVATE   void sqlite3UpsertDelete(sqlite3*,Upsert*);\nSQLITE_PRIVATE   Upsert *sqlite3UpsertDup(sqlite3*,Upsert*);\nSQLITE_PRIVATE   int sqlite3UpsertAnalyzeTarget(Parse*,SrcList*,Upsert*,Upsert*);\nSQLITE_PRIVATE   void sqlite3UpsertDoUpdate(Parse*,Upsert*,Table*,Index*,int);\nSQLITE_PRIVATE   Upsert *sqlite3UpsertOfIndex(Upsert*,Index*);\nSQLITE_PRIVATE   int sqlite3UpsertNextIsIPK(Upsert*);\n#else\n#define sqlite3UpsertNew(u,v,w,x,y,z) ((Upsert*)0)\n#define sqlite3UpsertDelete(x,y)\n#define sqlite3UpsertDup(x,y)         ((Upsert*)0)\n#define sqlite3UpsertOfIndex(x,y)     ((Upsert*)0)\n#define sqlite3UpsertNextIsIPK(x)     0\n#endif\n\n\n/* Declarations for functions in fkey.c. All of these are replaced by\n** no-op macros if OMIT_FOREIGN_KEY is defined. In this case no foreign\n** key functionality is available. If OMIT_TRIGGER is defined but\n** OMIT_FOREIGN_KEY is not, only some of the functions are no-oped. In\n** this case foreign keys are parsed, but no other functionality is\n** provided (enforcement of FK constraints requires the triggers sub-system).\n*/\n#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)\nSQLITE_PRIVATE   void sqlite3FkCheck(Parse*, Table*, int, int, int*, int);\nSQLITE_PRIVATE   void sqlite3FkDropTable(Parse*, SrcList *, Table*);\nSQLITE_PRIVATE   void sqlite3FkActions(Parse*, Table*, ExprList*, int, int*, int);\nSQLITE_PRIVATE   int sqlite3FkRequired(Parse*, Table*, int*, int);\nSQLITE_PRIVATE   u32 sqlite3FkOldmask(Parse*, Table*);\nSQLITE_PRIVATE   FKey *sqlite3FkReferences(Table *);\nSQLITE_PRIVATE   void sqlite3FkClearTriggerCache(sqlite3*,int);\n#else\n  #define sqlite3FkActions(a,b,c,d,e,f)\n  #define sqlite3FkCheck(a,b,c,d,e,f)\n  #define sqlite3FkDropTable(a,b,c)\n  #define sqlite3FkOldmask(a,b)         0\n  #define sqlite3FkRequired(a,b,c,d)    0\n  #define sqlite3FkReferences(a)        0\n  #define sqlite3FkClearTriggerCache(a,b)\n#endif\n#ifndef SQLITE_OMIT_FOREIGN_KEY\nSQLITE_PRIVATE   void sqlite3FkDelete(sqlite3 *, Table*);\nSQLITE_PRIVATE   int sqlite3FkLocateIndex(Parse*,Table*,FKey*,Index**,int**);\n#else\n  #define sqlite3FkDelete(a,b)\n  #define sqlite3FkLocateIndex(a,b,c,d,e)\n#endif\n\n\n/*\n** Available fault injectors.  Should be numbered beginning with 0.\n*/\n#define SQLITE_FAULTINJECTOR_MALLOC     0\n#define SQLITE_FAULTINJECTOR_COUNT      1\n\n/*\n** The interface to the code in fault.c used for identifying \"benign\"\n** malloc failures. This is only present if SQLITE_UNTESTABLE\n** is not defined.\n*/\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE   void sqlite3BeginBenignMalloc(void);\nSQLITE_PRIVATE   void sqlite3EndBenignMalloc(void);\n#else\n  #define sqlite3BeginBenignMalloc()\n  #define sqlite3EndBenignMalloc()\n#endif\n\n/*\n** Allowed return values from sqlite3FindInIndex()\n*/\n#define IN_INDEX_ROWID        1   /* Search the rowid of the table */\n#define IN_INDEX_EPH          2   /* Search an ephemeral b-tree */\n#define IN_INDEX_INDEX_ASC    3   /* Existing index ASCENDING */\n#define IN_INDEX_INDEX_DESC   4   /* Existing index DESCENDING */\n#define IN_INDEX_NOOP         5   /* No table available. Use comparisons */\n/*\n** Allowed flags for the 3rd parameter to sqlite3FindInIndex().\n*/\n#define IN_INDEX_NOOP_OK     0x0001  /* OK to return IN_INDEX_NOOP */\n#define IN_INDEX_MEMBERSHIP  0x0002  /* IN operator used for membership test */\n#define IN_INDEX_LOOP        0x0004  /* IN operator used as a loop */\nSQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*, int*);\n\nSQLITE_PRIVATE int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);\nSQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *);\n#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \\\n || defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\nSQLITE_PRIVATE   int sqlite3JournalCreate(sqlite3_file *);\n#endif\n\nSQLITE_PRIVATE int sqlite3JournalIsInMemory(sqlite3_file *p);\nSQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *);\n\nSQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p);\n#if SQLITE_MAX_EXPR_DEPTH>0\nSQLITE_PRIVATE   int sqlite3SelectExprHeight(const Select *);\nSQLITE_PRIVATE   int sqlite3ExprCheckHeight(Parse*, int);\n#else\n  #define sqlite3SelectExprHeight(x) 0\n  #define sqlite3ExprCheckHeight(x,y)\n#endif\nSQLITE_PRIVATE void sqlite3ExprSetErrorOffset(Expr*,int);\n\nSQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);\nSQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);\n\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\nSQLITE_PRIVATE   void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);\nSQLITE_PRIVATE   void sqlite3ConnectionUnlocked(sqlite3 *db);\nSQLITE_PRIVATE   void sqlite3ConnectionClosed(sqlite3 *db);\n#else\n  #define sqlite3ConnectionBlocked(x,y)\n  #define sqlite3ConnectionUnlocked(x)\n  #define sqlite3ConnectionClosed(x)\n#endif\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   void sqlite3ParserTrace(FILE*, char *);\n#endif\n#if defined(YYCOVERAGE)\nSQLITE_PRIVATE   int sqlite3ParserCoverage(FILE*);\n#endif\n\n/*\n** If the SQLITE_ENABLE IOTRACE exists then the global variable\n** sqlite3IoTrace is a pointer to a printf-like routine used to\n** print I/O tracing messages.\n*/\n#ifdef SQLITE_ENABLE_IOTRACE\n# define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }\nSQLITE_PRIVATE   void sqlite3VdbeIOTraceSql(Vdbe*);\nSQLITE_API SQLITE_EXTERN void (SQLITE_CDECL *sqlite3IoTrace)(const char*,...);\n#else\n# define IOTRACE(A)\n# define sqlite3VdbeIOTraceSql(X)\n#endif\n\n/*\n** These routines are available for the mem2.c debugging memory allocator\n** only.  They are used to verify that different \"types\" of memory\n** allocations are properly tracked by the system.\n**\n** sqlite3MemdebugSetType() sets the \"type\" of an allocation to one of\n** the MEMTYPE_* macros defined below.  The type must be a bitmask with\n** a single bit set.\n**\n** sqlite3MemdebugHasType() returns true if any of the bits in its second\n** argument match the type set by the previous sqlite3MemdebugSetType().\n** sqlite3MemdebugHasType() is intended for use inside assert() statements.\n**\n** sqlite3MemdebugNoType() returns true if none of the bits in its second\n** argument match the type set by the previous sqlite3MemdebugSetType().\n**\n** Perhaps the most important point is the difference between MEMTYPE_HEAP\n** and MEMTYPE_LOOKASIDE.  If an allocation is MEMTYPE_LOOKASIDE, that means\n** it might have been allocated by lookaside, except the allocation was\n** too large or lookaside was already full.  It is important to verify\n** that allocations that might have been satisfied by lookaside are not\n** passed back to non-lookaside free() routines.  Asserts such as the\n** example above are placed on the non-lookaside free() routines to verify\n** this constraint.\n**\n** All of this is no-op for a production build.  It only comes into\n** play when the SQLITE_MEMDEBUG compile-time option is used.\n*/\n#ifdef SQLITE_MEMDEBUG\nSQLITE_PRIVATE   void sqlite3MemdebugSetType(void*,u8);\nSQLITE_PRIVATE   int sqlite3MemdebugHasType(const void*,u8);\nSQLITE_PRIVATE   int sqlite3MemdebugNoType(const void*,u8);\n#else\n# define sqlite3MemdebugSetType(X,Y)  /* no-op */\n# define sqlite3MemdebugHasType(X,Y)  1\n# define sqlite3MemdebugNoType(X,Y)   1\n#endif\n#define MEMTYPE_HEAP       0x01  /* General heap allocations */\n#define MEMTYPE_LOOKASIDE  0x02  /* Heap that might have been lookaside */\n#define MEMTYPE_PCACHE     0x04  /* Page cache allocations */\n\n/*\n** Threading interface\n*/\n#if SQLITE_MAX_WORKER_THREADS>0\nSQLITE_PRIVATE int sqlite3ThreadCreate(SQLiteThread**,void*(*)(void*),void*);\nSQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread*, void**);\n#endif\n\n#if defined(SQLITE_ENABLE_DBPAGE_VTAB) || defined(SQLITE_TEST)\nSQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3*);\n#endif\n#if defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)\nSQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3*);\n#endif\n\nSQLITE_PRIVATE int sqlite3ExprVectorSize(const Expr *pExpr);\nSQLITE_PRIVATE int sqlite3ExprIsVector(const Expr *pExpr);\nSQLITE_PRIVATE Expr *sqlite3VectorFieldSubexpr(Expr*, int);\nSQLITE_PRIVATE Expr *sqlite3ExprForVectorField(Parse*,Expr*,int,int);\nSQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse*, Expr*);\n\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\nSQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt);\n#endif\n\n#if SQLITE_OS_UNIX && defined(SQLITE_OS_KV_OPTIONAL)\nSQLITE_PRIVATE int sqlite3KvvfsInit(void);\n#endif\n\n#if defined(VDBE_PROFILE) \\\n || defined(SQLITE_PERFORMANCE_TRACE) \\\n || defined(SQLITE_ENABLE_STMT_SCANSTATUS)\nSQLITE_PRIVATE sqlite3_uint64 sqlite3Hwtime(void);\n#endif\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n# define IS_STMT_SCANSTATUS(db) (db->flags & SQLITE_StmtScanStatus)\n#else\n# define IS_STMT_SCANSTATUS(db) 0\n#endif\n\n#endif /* SQLITEINT_H */\n\n/************** End of sqliteInt.h *******************************************/\n/************** Begin file os_common.h ***************************************/\n/*\n** 2004 May 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains macros and a little bit of code that is common to\n** all of the platform-specific files (os_*.c) and is #included into those\n** files.\n**\n** This file should be #included by the os_*.c files only.  It is not a\n** general purpose header file.\n*/\n#ifndef _OS_COMMON_H_\n#define _OS_COMMON_H_\n\n/*\n** At least two bugs have slipped in because we changed the MEMORY_DEBUG\n** macro to SQLITE_DEBUG and some older makefiles have not yet made the\n** switch.  The following code should catch this problem at compile-time.\n*/\n#ifdef MEMORY_DEBUG\n# error \"The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead.\"\n#endif\n\n/*\n** Macros for performance tracing.  Normally turned off.  Only works\n** on i486 hardware.\n*/\n#ifdef SQLITE_PERFORMANCE_TRACE\n\nstatic sqlite_uint64 g_start;\nstatic sqlite_uint64 g_elapsed;\n#define TIMER_START       g_start=sqlite3Hwtime()\n#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start\n#define TIMER_ELAPSED     g_elapsed\n#else\n#define TIMER_START\n#define TIMER_END\n#define TIMER_ELAPSED     ((sqlite_uint64)0)\n#endif\n\n/*\n** If we compile with the SQLITE_TEST macro set, then the following block\n** of code will give us the ability to simulate a disk I/O error.  This\n** is used for testing the I/O recovery logic.\n*/\n#if defined(SQLITE_TEST)\nSQLITE_API extern int sqlite3_io_error_hit;\nSQLITE_API extern int sqlite3_io_error_hardhit;\nSQLITE_API extern int sqlite3_io_error_pending;\nSQLITE_API extern int sqlite3_io_error_persist;\nSQLITE_API extern int sqlite3_io_error_benign;\nSQLITE_API extern int sqlite3_diskfull_pending;\nSQLITE_API extern int sqlite3_diskfull;\n#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)\n#define SimulateIOError(CODE)  \\\n  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \\\n       || sqlite3_io_error_pending-- == 1 )  \\\n              { local_ioerr(); CODE; }\nstatic void local_ioerr(){\n  IOTRACE((\"IOERR\\n\"));\n  sqlite3_io_error_hit++;\n  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;\n}\n#define SimulateDiskfullError(CODE) \\\n   if( sqlite3_diskfull_pending ){ \\\n     if( sqlite3_diskfull_pending == 1 ){ \\\n       local_ioerr(); \\\n       sqlite3_diskfull = 1; \\\n       sqlite3_io_error_hit = 1; \\\n       CODE; \\\n     }else{ \\\n       sqlite3_diskfull_pending--; \\\n     } \\\n   }\n#else\n#define SimulateIOErrorBenign(X)\n#define SimulateIOError(A)\n#define SimulateDiskfullError(A)\n#endif /* defined(SQLITE_TEST) */\n\n/*\n** When testing, keep a count of the number of open files.\n*/\n#if defined(SQLITE_TEST)\nSQLITE_API extern int sqlite3_open_file_count;\n#define OpenCounter(X)  sqlite3_open_file_count+=(X)\n#else\n#define OpenCounter(X)\n#endif /* defined(SQLITE_TEST) */\n\n#endif /* !defined(_OS_COMMON_H_) */\n\n/************** End of os_common.h *******************************************/\n/************** Begin file ctime.c *******************************************/\n/* DO NOT EDIT!\n** This file is automatically generated by the script in the canonical\n** SQLite source tree at tool/mkctimec.tcl.\n**\n** To modify this header, edit any of the various lists in that script\n** which specify categories of generated conditionals in this file.\n*/\n\n/*\n** 2010 February 23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file implements routines used to report what compile-time options\n** SQLite was built with.\n*/\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS /* IMP: R-16824-07538 */\n\n/*\n** Include the configuration header output by 'configure' if we're using the\n** autoconf-based build\n*/\n#if defined(_HAVE_SQLITE_CONFIG_H) && !defined(SQLITECONFIG_H)\n/* #include \"sqlite_cfg.h\" */\n#define SQLITECONFIG_H 1\n#endif\n\n/* These macros are provided to \"stringify\" the value of the define\n** for those options in which the value is meaningful. */\n#define CTIMEOPT_VAL_(opt) #opt\n#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)\n\n/* Like CTIMEOPT_VAL, but especially for SQLITE_DEFAULT_LOOKASIDE. This\n** option requires a separate macro because legal values contain a single\n** comma. e.g. (-DSQLITE_DEFAULT_LOOKASIDE=\"100,100\") */\n#define CTIMEOPT_VAL2_(opt1,opt2) #opt1 \",\" #opt2\n#define CTIMEOPT_VAL2(opt) CTIMEOPT_VAL2_(opt)\n/* #include \"sqliteInt.h\" */\n\n/*\n** An array of names of all compile-time options.  This array should\n** be sorted A-Z.\n**\n** This array looks large, but in a typical installation actually uses\n** only a handful of compile-time options, so most times this array is usually\n** rather short and uses little memory space.\n*/\nstatic const char * const sqlite3azCompileOpt[] = {\n\n#ifdef SQLITE_32BIT_ROWID\n  \"32BIT_ROWID\",\n#endif\n#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC\n  \"4_BYTE_ALIGNED_MALLOC\",\n#endif\n#ifdef SQLITE_ALLOW_COVERING_INDEX_SCAN\n# if SQLITE_ALLOW_COVERING_INDEX_SCAN != 1\n  \"ALLOW_COVERING_INDEX_SCAN=\" CTIMEOPT_VAL(SQLITE_ALLOW_COVERING_INDEX_SCAN),\n# endif\n#endif\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n  \"ALLOW_ROWID_IN_VIEW\",\n#endif\n#ifdef SQLITE_ALLOW_URI_AUTHORITY\n  \"ALLOW_URI_AUTHORITY\",\n#endif\n#ifdef SQLITE_ATOMIC_INTRINSICS\n  \"ATOMIC_INTRINSICS=\" CTIMEOPT_VAL(SQLITE_ATOMIC_INTRINSICS),\n#endif\n#ifdef SQLITE_BITMASK_TYPE\n  \"BITMASK_TYPE=\" CTIMEOPT_VAL(SQLITE_BITMASK_TYPE),\n#endif\n#ifdef SQLITE_BUG_COMPATIBLE_20160819\n  \"BUG_COMPATIBLE_20160819\",\n#endif\n#ifdef SQLITE_BUG_COMPATIBLE_20250510\n  \"BUG_COMPATIBLE_20250510\",\n#endif\n#ifdef SQLITE_CASE_SENSITIVE_LIKE\n  \"CASE_SENSITIVE_LIKE\",\n#endif\n#ifdef SQLITE_CHECK_PAGES\n  \"CHECK_PAGES\",\n#endif\n#if defined(__clang__) && defined(__clang_major__)\n  \"COMPILER=clang-\" CTIMEOPT_VAL(__clang_major__) \".\"\n                    CTIMEOPT_VAL(__clang_minor__) \".\"\n                    CTIMEOPT_VAL(__clang_patchlevel__),\n#elif defined(_MSC_VER)\n  \"COMPILER=msvc-\" CTIMEOPT_VAL(_MSC_VER),\n#elif defined(__GNUC__) && defined(__VERSION__)\n  \"COMPILER=gcc-\" __VERSION__,\n#endif\n#ifdef SQLITE_COVERAGE_TEST\n  \"COVERAGE_TEST\",\n#endif\n#ifdef SQLITE_DEBUG\n  \"DEBUG\",\n#endif\n#ifdef SQLITE_DEFAULT_AUTOMATIC_INDEX\n  \"DEFAULT_AUTOMATIC_INDEX\",\n#endif\n#ifdef SQLITE_DEFAULT_AUTOVACUUM\n  \"DEFAULT_AUTOVACUUM\",\n#endif\n#ifdef SQLITE_DEFAULT_CACHE_SIZE\n  \"DEFAULT_CACHE_SIZE=\" CTIMEOPT_VAL(SQLITE_DEFAULT_CACHE_SIZE),\n#endif\n#ifdef SQLITE_DEFAULT_CKPTFULLFSYNC\n  \"DEFAULT_CKPTFULLFSYNC\",\n#endif\n#ifdef SQLITE_DEFAULT_FILE_FORMAT\n  \"DEFAULT_FILE_FORMAT=\" CTIMEOPT_VAL(SQLITE_DEFAULT_FILE_FORMAT),\n#endif\n#ifdef SQLITE_DEFAULT_FILE_PERMISSIONS\n  \"DEFAULT_FILE_PERMISSIONS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_FILE_PERMISSIONS),\n#endif\n#ifdef SQLITE_DEFAULT_FOREIGN_KEYS\n  \"DEFAULT_FOREIGN_KEYS\",\n#endif\n#ifdef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT\n  \"DEFAULT_JOURNAL_SIZE_LIMIT=\" CTIMEOPT_VAL(SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT),\n#endif\n#ifdef SQLITE_DEFAULT_LOCKING_MODE\n  \"DEFAULT_LOCKING_MODE=\" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),\n#endif\n#ifdef SQLITE_DEFAULT_LOOKASIDE\n  \"DEFAULT_LOOKASIDE=\" CTIMEOPT_VAL2(SQLITE_DEFAULT_LOOKASIDE),\n#endif\n#ifdef SQLITE_DEFAULT_MEMSTATUS\n# if SQLITE_DEFAULT_MEMSTATUS != 1\n  \"DEFAULT_MEMSTATUS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_MEMSTATUS),\n# endif\n#endif\n#ifdef SQLITE_DEFAULT_MMAP_SIZE\n  \"DEFAULT_MMAP_SIZE=\" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),\n#endif\n#ifdef SQLITE_DEFAULT_PAGE_SIZE\n  \"DEFAULT_PAGE_SIZE=\" CTIMEOPT_VAL(SQLITE_DEFAULT_PAGE_SIZE),\n#endif\n#ifdef SQLITE_DEFAULT_PCACHE_INITSZ\n  \"DEFAULT_PCACHE_INITSZ=\" CTIMEOPT_VAL(SQLITE_DEFAULT_PCACHE_INITSZ),\n#endif\n#ifdef SQLITE_DEFAULT_PROXYDIR_PERMISSIONS\n  \"DEFAULT_PROXYDIR_PERMISSIONS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_PROXYDIR_PERMISSIONS),\n#endif\n#ifdef SQLITE_DEFAULT_RECURSIVE_TRIGGERS\n  \"DEFAULT_RECURSIVE_TRIGGERS\",\n#endif\n#ifdef SQLITE_DEFAULT_ROWEST\n  \"DEFAULT_ROWEST=\" CTIMEOPT_VAL(SQLITE_DEFAULT_ROWEST),\n#endif\n#ifdef SQLITE_DEFAULT_SECTOR_SIZE\n  \"DEFAULT_SECTOR_SIZE=\" CTIMEOPT_VAL(SQLITE_DEFAULT_SECTOR_SIZE),\n#endif\n#ifdef SQLITE_DEFAULT_SYNCHRONOUS\n  \"DEFAULT_SYNCHRONOUS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_SYNCHRONOUS),\n#endif\n#ifdef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT\n  \"DEFAULT_WAL_AUTOCHECKPOINT=\" CTIMEOPT_VAL(SQLITE_DEFAULT_WAL_AUTOCHECKPOINT),\n#endif\n#ifdef SQLITE_DEFAULT_WAL_SYNCHRONOUS\n  \"DEFAULT_WAL_SYNCHRONOUS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_WAL_SYNCHRONOUS),\n#endif\n#ifdef SQLITE_DEFAULT_WORKER_THREADS\n  \"DEFAULT_WORKER_THREADS=\" CTIMEOPT_VAL(SQLITE_DEFAULT_WORKER_THREADS),\n#endif\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\n  \"DIRECT_OVERFLOW_READ\",\n#endif\n#ifdef SQLITE_DISABLE_DIRSYNC\n  \"DISABLE_DIRSYNC\",\n#endif\n#ifdef SQLITE_DISABLE_FTS3_UNICODE\n  \"DISABLE_FTS3_UNICODE\",\n#endif\n#ifdef SQLITE_DISABLE_FTS4_DEFERRED\n  \"DISABLE_FTS4_DEFERRED\",\n#endif\n#ifdef SQLITE_DISABLE_INTRINSIC\n  \"DISABLE_INTRINSIC\",\n#endif\n#ifdef SQLITE_DISABLE_LFS\n  \"DISABLE_LFS\",\n#endif\n#ifdef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS\n  \"DISABLE_PAGECACHE_OVERFLOW_STATS\",\n#endif\n#ifdef SQLITE_DISABLE_SKIPAHEAD_DISTINCT\n  \"DISABLE_SKIPAHEAD_DISTINCT\",\n#endif\n#ifdef SQLITE_DQS\n  \"DQS=\" CTIMEOPT_VAL(SQLITE_DQS),\n#endif\n#ifdef SQLITE_ENABLE_8_3_NAMES\n  \"ENABLE_8_3_NAMES=\" CTIMEOPT_VAL(SQLITE_ENABLE_8_3_NAMES),\n#endif\n#ifdef SQLITE_ENABLE_API_ARMOR\n  \"ENABLE_API_ARMOR\",\n#endif\n#ifdef SQLITE_ENABLE_ATOMIC_WRITE\n  \"ENABLE_ATOMIC_WRITE\",\n#endif\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n  \"ENABLE_BATCH_ATOMIC_WRITE\",\n#endif\n#ifdef SQLITE_ENABLE_BYTECODE_VTAB\n  \"ENABLE_BYTECODE_VTAB\",\n#endif\n#ifdef SQLITE_ENABLE_CARRAY\n  \"ENABLE_CARRAY\",\n#endif\n#ifdef SQLITE_ENABLE_CEROD\n  \"ENABLE_CEROD=\" CTIMEOPT_VAL(SQLITE_ENABLE_CEROD),\n#endif\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n  \"ENABLE_COLUMN_METADATA\",\n#endif\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n  \"ENABLE_COLUMN_USED_MASK\",\n#endif\n#ifdef SQLITE_ENABLE_COSTMULT\n  \"ENABLE_COSTMULT\",\n#endif\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n  \"ENABLE_CURSOR_HINTS\",\n#endif\n#ifdef SQLITE_ENABLE_DBPAGE_VTAB\n  \"ENABLE_DBPAGE_VTAB\",\n#endif\n#ifdef SQLITE_ENABLE_DBSTAT_VTAB\n  \"ENABLE_DBSTAT_VTAB\",\n#endif\n#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT\n  \"ENABLE_EXPENSIVE_ASSERT\",\n#endif\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  \"ENABLE_EXPLAIN_COMMENTS\",\n#endif\n#ifdef SQLITE_ENABLE_FTS3\n  \"ENABLE_FTS3\",\n#endif\n#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS\n  \"ENABLE_FTS3_PARENTHESIS\",\n#endif\n#ifdef SQLITE_ENABLE_FTS3_TOKENIZER\n  \"ENABLE_FTS3_TOKENIZER\",\n#endif\n#ifdef SQLITE_ENABLE_FTS4\n  \"ENABLE_FTS4\",\n#endif\n#ifdef SQLITE_ENABLE_FTS5\n  \"ENABLE_FTS5\",\n#endif\n#ifdef SQLITE_ENABLE_GEOPOLY\n  \"ENABLE_GEOPOLY\",\n#endif\n#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS\n  \"ENABLE_HIDDEN_COLUMNS\",\n#endif\n#ifdef SQLITE_ENABLE_ICU\n  \"ENABLE_ICU\",\n#endif\n#ifdef SQLITE_ENABLE_IOTRACE\n  \"ENABLE_IOTRACE\",\n#endif\n#ifdef SQLITE_ENABLE_LOAD_EXTENSION\n  \"ENABLE_LOAD_EXTENSION\",\n#endif\n#ifdef SQLITE_ENABLE_LOCKING_STYLE\n  \"ENABLE_LOCKING_STYLE=\" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE),\n#endif\n#ifdef SQLITE_ENABLE_MATH_FUNCTIONS\n  \"ENABLE_MATH_FUNCTIONS\",\n#endif\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n  \"ENABLE_MEMORY_MANAGEMENT\",\n#endif\n#ifdef SQLITE_ENABLE_MEMSYS3\n  \"ENABLE_MEMSYS3\",\n#endif\n#ifdef SQLITE_ENABLE_MEMSYS5\n  \"ENABLE_MEMSYS5\",\n#endif\n#ifdef SQLITE_ENABLE_MULTIPLEX\n  \"ENABLE_MULTIPLEX\",\n#endif\n#ifdef SQLITE_ENABLE_NORMALIZE\n  \"ENABLE_NORMALIZE\",\n#endif\n#ifdef SQLITE_ENABLE_NULL_TRIM\n  \"ENABLE_NULL_TRIM\",\n#endif\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n  \"ENABLE_OFFSET_SQL_FUNC\",\n#endif\n#ifdef SQLITE_ENABLE_ORDERED_SET_AGGREGATES\n  \"ENABLE_ORDERED_SET_AGGREGATES\",\n#endif\n#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK\n  \"ENABLE_OVERSIZE_CELL_CHECK\",\n#endif\n#ifdef SQLITE_ENABLE_PERCENTILE\n  \"ENABLE_PERCENTILE\",\n#endif\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  \"ENABLE_PREUPDATE_HOOK\",\n#endif\n#ifdef SQLITE_ENABLE_QPSG\n  \"ENABLE_QPSG\",\n#endif\n#ifdef SQLITE_ENABLE_RBU\n  \"ENABLE_RBU\",\n#endif\n#ifdef SQLITE_ENABLE_RTREE\n  \"ENABLE_RTREE\",\n#endif\n#ifdef SQLITE_ENABLE_SESSION\n  \"ENABLE_SESSION\",\n#endif\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  \"ENABLE_SETLK_TIMEOUT\",\n#endif\n#ifdef SQLITE_ENABLE_SNAPSHOT\n  \"ENABLE_SNAPSHOT\",\n#endif\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  \"ENABLE_SORTER_REFERENCES\",\n#endif\n#ifdef SQLITE_ENABLE_SQLLOG\n  \"ENABLE_SQLLOG\",\n#endif\n#ifdef SQLITE_ENABLE_STAT4\n  \"ENABLE_STAT4\",\n#endif\n#ifdef SQLITE_ENABLE_STMTVTAB\n  \"ENABLE_STMTVTAB\",\n#endif\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  \"ENABLE_STMT_SCANSTATUS\",\n#endif\n#ifdef SQLITE_ENABLE_TREETRACE\n  \"ENABLE_TREETRACE\",\n#endif\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n  \"ENABLE_UNKNOWN_SQL_FUNCTION\",\n#endif\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\n  \"ENABLE_UNLOCK_NOTIFY\",\n#endif\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n  \"ENABLE_UPDATE_DELETE_LIMIT\",\n#endif\n#ifdef SQLITE_ENABLE_URI_00_ERROR\n  \"ENABLE_URI_00_ERROR\",\n#endif\n#ifdef SQLITE_ENABLE_VFSTRACE\n  \"ENABLE_VFSTRACE\",\n#endif\n#ifdef SQLITE_ENABLE_WHERETRACE\n  \"ENABLE_WHERETRACE\",\n#endif\n#ifdef SQLITE_ENABLE_ZIPVFS\n  \"ENABLE_ZIPVFS\",\n#endif\n#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS\n  \"EXPLAIN_ESTIMATED_ROWS\",\n#endif\n#ifdef SQLITE_EXTRA_AUTOEXT\n  \"EXTRA_AUTOEXT=\" CTIMEOPT_VAL(SQLITE_EXTRA_AUTOEXT),\n#endif\n#ifdef SQLITE_EXTRA_IFNULLROW\n  \"EXTRA_IFNULLROW\",\n#endif\n#ifdef SQLITE_EXTRA_INIT\n  \"EXTRA_INIT=\" CTIMEOPT_VAL(SQLITE_EXTRA_INIT),\n#endif\n#ifdef SQLITE_EXTRA_INIT_MUTEXED\n  \"EXTRA_INIT_MUTEXED=\" CTIMEOPT_VAL(SQLITE_EXTRA_INIT_MUTEXED),\n#endif\n#ifdef SQLITE_EXTRA_SHUTDOWN\n  \"EXTRA_SHUTDOWN=\" CTIMEOPT_VAL(SQLITE_EXTRA_SHUTDOWN),\n#endif\n#ifdef SQLITE_FTS3_MAX_EXPR_DEPTH\n  \"FTS3_MAX_EXPR_DEPTH=\" CTIMEOPT_VAL(SQLITE_FTS3_MAX_EXPR_DEPTH),\n#endif\n#ifdef SQLITE_FTS5_ENABLE_TEST_MI\n  \"FTS5_ENABLE_TEST_MI\",\n#endif\n#ifdef SQLITE_FTS5_NO_WITHOUT_ROWID\n  \"FTS5_NO_WITHOUT_ROWID\",\n#endif\n#if HAVE_ISNAN || SQLITE_HAVE_ISNAN\n  \"HAVE_ISNAN\",\n#endif\n#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX\n# if SQLITE_HOMEGROWN_RECURSIVE_MUTEX != 1\n  \"HOMEGROWN_RECURSIVE_MUTEX=\" CTIMEOPT_VAL(SQLITE_HOMEGROWN_RECURSIVE_MUTEX),\n# endif\n#endif\n#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS\n  \"IGNORE_AFP_LOCK_ERRORS\",\n#endif\n#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS\n  \"IGNORE_FLOCK_LOCK_ERRORS\",\n#endif\n#ifdef SQLITE_INLINE_MEMCPY\n  \"INLINE_MEMCPY\",\n#endif\n#ifdef SQLITE_INT64_TYPE\n  \"INT64_TYPE\",\n#endif\n#ifdef SQLITE_INTEGRITY_CHECK_ERROR_MAX\n  \"INTEGRITY_CHECK_ERROR_MAX=\" CTIMEOPT_VAL(SQLITE_INTEGRITY_CHECK_ERROR_MAX),\n#endif\n#ifdef SQLITE_LEGACY_JSON_VALID\n  \"LEGACY_JSON_VALID\",\n#endif\n#ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n  \"LIKE_DOESNT_MATCH_BLOBS\",\n#endif\n#ifdef SQLITE_LOCK_TRACE\n  \"LOCK_TRACE\",\n#endif\n#ifdef SQLITE_LOG_CACHE_SPILL\n  \"LOG_CACHE_SPILL\",\n#endif\n#ifdef SQLITE_MALLOC_SOFT_LIMIT\n  \"MALLOC_SOFT_LIMIT=\" CTIMEOPT_VAL(SQLITE_MALLOC_SOFT_LIMIT),\n#endif\n#ifdef SQLITE_MAX_ATTACHED\n  \"MAX_ATTACHED=\" CTIMEOPT_VAL(SQLITE_MAX_ATTACHED),\n#endif\n#ifdef SQLITE_MAX_COLUMN\n  \"MAX_COLUMN=\" CTIMEOPT_VAL(SQLITE_MAX_COLUMN),\n#endif\n#ifdef SQLITE_MAX_COMPOUND_SELECT\n  \"MAX_COMPOUND_SELECT=\" CTIMEOPT_VAL(SQLITE_MAX_COMPOUND_SELECT),\n#endif\n#ifdef SQLITE_MAX_DEFAULT_PAGE_SIZE\n  \"MAX_DEFAULT_PAGE_SIZE=\" CTIMEOPT_VAL(SQLITE_MAX_DEFAULT_PAGE_SIZE),\n#endif\n#ifdef SQLITE_MAX_EXPR_DEPTH\n  \"MAX_EXPR_DEPTH=\" CTIMEOPT_VAL(SQLITE_MAX_EXPR_DEPTH),\n#endif\n#ifdef SQLITE_MAX_FUNCTION_ARG\n  \"MAX_FUNCTION_ARG=\" CTIMEOPT_VAL(SQLITE_MAX_FUNCTION_ARG),\n#endif\n#ifdef SQLITE_MAX_LENGTH\n  \"MAX_LENGTH=\" CTIMEOPT_VAL(SQLITE_MAX_LENGTH),\n#endif\n#ifdef SQLITE_MAX_LIKE_PATTERN_LENGTH\n  \"MAX_LIKE_PATTERN_LENGTH=\" CTIMEOPT_VAL(SQLITE_MAX_LIKE_PATTERN_LENGTH),\n#endif\n#ifdef SQLITE_MAX_MEMORY\n  \"MAX_MEMORY=\" CTIMEOPT_VAL(SQLITE_MAX_MEMORY),\n#endif\n#ifdef SQLITE_MAX_MMAP_SIZE\n  \"MAX_MMAP_SIZE=\" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE),\n#endif\n#ifdef SQLITE_MAX_MMAP_SIZE_\n  \"MAX_MMAP_SIZE_=\" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE_),\n#endif\n#ifdef SQLITE_MAX_PAGE_COUNT\n  \"MAX_PAGE_COUNT=\" CTIMEOPT_VAL(SQLITE_MAX_PAGE_COUNT),\n#endif\n#ifdef SQLITE_MAX_PAGE_SIZE\n  \"MAX_PAGE_SIZE=\" CTIMEOPT_VAL(SQLITE_MAX_PAGE_SIZE),\n#endif\n#ifdef SQLITE_MAX_SCHEMA_RETRY\n  \"MAX_SCHEMA_RETRY=\" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),\n#endif\n#ifdef SQLITE_MAX_SQL_LENGTH\n  \"MAX_SQL_LENGTH=\" CTIMEOPT_VAL(SQLITE_MAX_SQL_LENGTH),\n#endif\n#ifdef SQLITE_MAX_TRIGGER_DEPTH\n  \"MAX_TRIGGER_DEPTH=\" CTIMEOPT_VAL(SQLITE_MAX_TRIGGER_DEPTH),\n#endif\n#ifdef SQLITE_MAX_VARIABLE_NUMBER\n  \"MAX_VARIABLE_NUMBER=\" CTIMEOPT_VAL(SQLITE_MAX_VARIABLE_NUMBER),\n#endif\n#ifdef SQLITE_MAX_VDBE_OP\n  \"MAX_VDBE_OP=\" CTIMEOPT_VAL(SQLITE_MAX_VDBE_OP),\n#endif\n#ifdef SQLITE_MAX_WORKER_THREADS\n  \"MAX_WORKER_THREADS=\" CTIMEOPT_VAL(SQLITE_MAX_WORKER_THREADS),\n#endif\n#ifdef SQLITE_MEMDEBUG\n  \"MEMDEBUG\",\n#endif\n#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT\n  \"MIXED_ENDIAN_64BIT_FLOAT\",\n#endif\n#ifdef SQLITE_MMAP_READWRITE\n  \"MMAP_READWRITE\",\n#endif\n#ifdef SQLITE_MUTEX_NOOP\n  \"MUTEX_NOOP\",\n#endif\n#ifdef SQLITE_MUTEX_OMIT\n  \"MUTEX_OMIT\",\n#endif\n#ifdef SQLITE_MUTEX_PTHREADS\n  \"MUTEX_PTHREADS\",\n#endif\n#ifdef SQLITE_MUTEX_W32\n  \"MUTEX_W32\",\n#endif\n#ifdef SQLITE_NEED_ERR_NAME\n  \"NEED_ERR_NAME\",\n#endif\n#ifdef SQLITE_NO_SYNC\n  \"NO_SYNC\",\n#endif\n#ifdef SQLITE_OMIT_ALTERTABLE\n  \"OMIT_ALTERTABLE\",\n#endif\n#ifdef SQLITE_OMIT_ANALYZE\n  \"OMIT_ANALYZE\",\n#endif\n#ifdef SQLITE_OMIT_ATTACH\n  \"OMIT_ATTACH\",\n#endif\n#ifdef SQLITE_OMIT_AUTHORIZATION\n  \"OMIT_AUTHORIZATION\",\n#endif\n#ifdef SQLITE_OMIT_AUTOINCREMENT\n  \"OMIT_AUTOINCREMENT\",\n#endif\n#ifdef SQLITE_OMIT_AUTOINIT\n  \"OMIT_AUTOINIT\",\n#endif\n#ifdef SQLITE_OMIT_AUTOMATIC_INDEX\n  \"OMIT_AUTOMATIC_INDEX\",\n#endif\n#ifdef SQLITE_OMIT_AUTORESET\n  \"OMIT_AUTORESET\",\n#endif\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  \"OMIT_AUTOVACUUM\",\n#endif\n#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION\n  \"OMIT_BETWEEN_OPTIMIZATION\",\n#endif\n#ifdef SQLITE_OMIT_BLOB_LITERAL\n  \"OMIT_BLOB_LITERAL\",\n#endif\n#ifdef SQLITE_OMIT_CAST\n  \"OMIT_CAST\",\n#endif\n#ifdef SQLITE_OMIT_CHECK\n  \"OMIT_CHECK\",\n#endif\n#ifdef SQLITE_OMIT_COMPLETE\n  \"OMIT_COMPLETE\",\n#endif\n#ifdef SQLITE_OMIT_COMPOUND_SELECT\n  \"OMIT_COMPOUND_SELECT\",\n#endif\n#ifdef SQLITE_OMIT_CONFLICT_CLAUSE\n  \"OMIT_CONFLICT_CLAUSE\",\n#endif\n#ifdef SQLITE_OMIT_CTE\n  \"OMIT_CTE\",\n#endif\n#if defined(SQLITE_OMIT_DATETIME_FUNCS) || defined(SQLITE_OMIT_FLOATING_POINT)\n  \"OMIT_DATETIME_FUNCS\",\n#endif\n#ifdef SQLITE_OMIT_DECLTYPE\n  \"OMIT_DECLTYPE\",\n#endif\n#ifdef SQLITE_OMIT_DEPRECATED\n  \"OMIT_DEPRECATED\",\n#endif\n#ifdef SQLITE_OMIT_DESERIALIZE\n  \"OMIT_DESERIALIZE\",\n#endif\n#ifdef SQLITE_OMIT_DISKIO\n  \"OMIT_DISKIO\",\n#endif\n#ifdef SQLITE_OMIT_EXPLAIN\n  \"OMIT_EXPLAIN\",\n#endif\n#ifdef SQLITE_OMIT_FLAG_PRAGMAS\n  \"OMIT_FLAG_PRAGMAS\",\n#endif\n#ifdef SQLITE_OMIT_FLOATING_POINT\n  \"OMIT_FLOATING_POINT\",\n#endif\n#ifdef SQLITE_OMIT_FOREIGN_KEY\n  \"OMIT_FOREIGN_KEY\",\n#endif\n#ifdef SQLITE_OMIT_GET_TABLE\n  \"OMIT_GET_TABLE\",\n#endif\n#ifdef SQLITE_OMIT_HEX_INTEGER\n  \"OMIT_HEX_INTEGER\",\n#endif\n#ifdef SQLITE_OMIT_INCRBLOB\n  \"OMIT_INCRBLOB\",\n#endif\n#ifdef SQLITE_OMIT_INTEGRITY_CHECK\n  \"OMIT_INTEGRITY_CHECK\",\n#endif\n#ifdef SQLITE_OMIT_INTROSPECTION_PRAGMAS\n  \"OMIT_INTROSPECTION_PRAGMAS\",\n#endif\n#ifdef SQLITE_OMIT_JSON\n  \"OMIT_JSON\",\n#endif\n#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION\n  \"OMIT_LIKE_OPTIMIZATION\",\n#endif\n#ifdef SQLITE_OMIT_LOAD_EXTENSION\n  \"OMIT_LOAD_EXTENSION\",\n#endif\n#ifdef SQLITE_OMIT_LOCALTIME\n  \"OMIT_LOCALTIME\",\n#endif\n#ifdef SQLITE_OMIT_LOOKASIDE\n  \"OMIT_LOOKASIDE\",\n#endif\n#ifdef SQLITE_OMIT_MEMORYDB\n  \"OMIT_MEMORYDB\",\n#endif\n#ifdef SQLITE_OMIT_OR_OPTIMIZATION\n  \"OMIT_OR_OPTIMIZATION\",\n#endif\n#ifdef SQLITE_OMIT_PAGER_PRAGMAS\n  \"OMIT_PAGER_PRAGMAS\",\n#endif\n#ifdef SQLITE_OMIT_PARSER_TRACE\n  \"OMIT_PARSER_TRACE\",\n#endif\n#ifdef SQLITE_OMIT_POPEN\n  \"OMIT_POPEN\",\n#endif\n#ifdef SQLITE_OMIT_PRAGMA\n  \"OMIT_PRAGMA\",\n#endif\n#ifdef SQLITE_OMIT_PROGRESS_CALLBACK\n  \"OMIT_PROGRESS_CALLBACK\",\n#endif\n#ifdef SQLITE_OMIT_QUICKBALANCE\n  \"OMIT_QUICKBALANCE\",\n#endif\n#ifdef SQLITE_OMIT_REINDEX\n  \"OMIT_REINDEX\",\n#endif\n#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS\n  \"OMIT_SCHEMA_PRAGMAS\",\n#endif\n#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS\n  \"OMIT_SCHEMA_VERSION_PRAGMAS\",\n#endif\n#ifdef SQLITE_OMIT_SEH\n  \"OMIT_SEH\",\n#endif\n#ifdef SQLITE_OMIT_SHARED_CACHE\n  \"OMIT_SHARED_CACHE\",\n#endif\n#ifdef SQLITE_OMIT_SHUTDOWN_DIRECTORIES\n  \"OMIT_SHUTDOWN_DIRECTORIES\",\n#endif\n#ifdef SQLITE_OMIT_SUBQUERY\n  \"OMIT_SUBQUERY\",\n#endif\n#ifdef SQLITE_OMIT_TCL_VARIABLE\n  \"OMIT_TCL_VARIABLE\",\n#endif\n#ifdef SQLITE_OMIT_TEMPDB\n  \"OMIT_TEMPDB\",\n#endif\n#ifdef SQLITE_OMIT_TEST_CONTROL\n  \"OMIT_TEST_CONTROL\",\n#endif\n#ifdef SQLITE_OMIT_TRACE\n# if SQLITE_OMIT_TRACE != 1\n  \"OMIT_TRACE=\" CTIMEOPT_VAL(SQLITE_OMIT_TRACE),\n# endif\n#endif\n#ifdef SQLITE_OMIT_TRIGGER\n  \"OMIT_TRIGGER\",\n#endif\n#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION\n  \"OMIT_TRUNCATE_OPTIMIZATION\",\n#endif\n#ifdef SQLITE_OMIT_UTF16\n  \"OMIT_UTF16\",\n#endif\n#ifdef SQLITE_OMIT_VACUUM\n  \"OMIT_VACUUM\",\n#endif\n#ifdef SQLITE_OMIT_VIEW\n  \"OMIT_VIEW\",\n#endif\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n  \"OMIT_VIRTUALTABLE\",\n#endif\n#ifdef SQLITE_OMIT_WAL\n  \"OMIT_WAL\",\n#endif\n#ifdef SQLITE_OMIT_WSD\n  \"OMIT_WSD\",\n#endif\n#ifdef SQLITE_OMIT_XFER_OPT\n  \"OMIT_XFER_OPT\",\n#endif\n#ifdef SQLITE_PERFORMANCE_TRACE\n  \"PERFORMANCE_TRACE\",\n#endif\n#ifdef SQLITE_POWERSAFE_OVERWRITE\n# if SQLITE_POWERSAFE_OVERWRITE != 1\n  \"POWERSAFE_OVERWRITE=\" CTIMEOPT_VAL(SQLITE_POWERSAFE_OVERWRITE),\n# endif\n#endif\n#ifdef SQLITE_PREFER_PROXY_LOCKING\n  \"PREFER_PROXY_LOCKING\",\n#endif\n#ifdef SQLITE_PROXY_DEBUG\n  \"PROXY_DEBUG\",\n#endif\n#ifdef SQLITE_REVERSE_UNORDERED_SELECTS\n  \"REVERSE_UNORDERED_SELECTS\",\n#endif\n#ifdef SQLITE_RTREE_INT_ONLY\n  \"RTREE_INT_ONLY\",\n#endif\n#ifdef SQLITE_SECURE_DELETE\n  \"SECURE_DELETE\",\n#endif\n#ifdef SQLITE_SMALL_STACK\n  \"SMALL_STACK\",\n#endif\n#ifdef SQLITE_SORTER_PMASZ\n  \"SORTER_PMASZ=\" CTIMEOPT_VAL(SQLITE_SORTER_PMASZ),\n#endif\n#ifdef SQLITE_SOUNDEX\n  \"SOUNDEX\",\n#endif\n#ifdef SQLITE_STAT4_SAMPLES\n  \"STAT4_SAMPLES=\" CTIMEOPT_VAL(SQLITE_STAT4_SAMPLES),\n#endif\n#ifdef SQLITE_STMTJRNL_SPILL\n  \"STMTJRNL_SPILL=\" CTIMEOPT_VAL(SQLITE_STMTJRNL_SPILL),\n#endif\n#ifdef SQLITE_SUBSTR_COMPATIBILITY\n  \"SUBSTR_COMPATIBILITY\",\n#endif\n#if (!defined(SQLITE_WIN32_MALLOC) \\\n     && !defined(SQLITE_ZERO_MALLOC) \\\n     && !defined(SQLITE_MEMDEBUG) \\\n    ) || defined(SQLITE_SYSTEM_MALLOC)\n  \"SYSTEM_MALLOC\",\n#endif\n#ifdef SQLITE_TCL\n  \"TCL\",\n#endif\n#ifdef SQLITE_TEMP_STORE\n  \"TEMP_STORE=\" CTIMEOPT_VAL(SQLITE_TEMP_STORE),\n#endif\n#ifdef SQLITE_TEST\n  \"TEST\",\n#endif\n#if defined(SQLITE_THREADSAFE)\n  \"THREADSAFE=\" CTIMEOPT_VAL(SQLITE_THREADSAFE),\n#elif defined(THREADSAFE)\n  \"THREADSAFE=\" CTIMEOPT_VAL(THREADSAFE),\n#else\n  \"THREADSAFE=1\",\n#endif\n#ifdef SQLITE_UNLINK_AFTER_CLOSE\n  \"UNLINK_AFTER_CLOSE\",\n#endif\n#ifdef SQLITE_UNTESTABLE\n  \"UNTESTABLE\",\n#endif\n#ifdef SQLITE_USE_ALLOCA\n  \"USE_ALLOCA\",\n#endif\n#ifdef SQLITE_USE_FCNTL_TRACE\n  \"USE_FCNTL_TRACE\",\n#endif\n#ifdef SQLITE_USE_URI\n  \"USE_URI\",\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n  \"VDBE_COVERAGE\",\n#endif\n#ifdef SQLITE_WIN32_MALLOC\n  \"WIN32_MALLOC\",\n#endif\n#ifdef SQLITE_ZERO_MALLOC\n  \"ZERO_MALLOC\",\n#endif\n\n} ;\n\nSQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt){\n  *pnOpt = sizeof(sqlite3azCompileOpt) / sizeof(sqlite3azCompileOpt[0]);\n  return (const char**)sqlite3azCompileOpt;\n}\n\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n\n/************** End of ctime.c ***********************************************/\n/************** Begin file global.c ******************************************/\n/*\n** 2008 June 13\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains definitions of global variables and constants.\n*/\n/* #include \"sqliteInt.h\" */\n\n/* An array to map all upper-case characters into their corresponding\n** lower-case character.\n**\n** SQLite only considers US-ASCII (or EBCDIC) characters.  We do not\n** handle case conversions for the UTF character set since the tables\n** involved are nearly as big or bigger than SQLite itself.\n*/\nSQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {\n#ifdef SQLITE_ASCII\n      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n     18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n     36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,\n     54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99,100,101,102,103,\n    104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,\n    122, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,\n    108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,\n    126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,\n    144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,\n    162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,\n    180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,\n    198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,\n    216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,\n    234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,\n    252,253,254,255,\n#endif\n#ifdef SQLITE_EBCDIC\n      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, /* 0x */\n     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */\n     32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */\n     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */\n     64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */\n     80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */\n     96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, /* 6x */\n    112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, /* 7x */\n    128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */\n    144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, /* 9x */\n    160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */\n    176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */\n    192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */\n    208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */\n    224,225,162,163,164,165,166,167,168,169,234,235,236,237,238,239, /* Ex */\n    240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, /* Fx */\n#endif\n/* All of the upper-to-lower conversion data is above.  The following\n** 18 integers are completely unrelated.  They are appended to the\n** sqlite3UpperToLower[] array to avoid UBSAN warnings.  Here's what is\n** going on:\n**\n** The SQL comparison operators (<>, =, >, <=, <, and >=) are implemented\n** by invoking sqlite3MemCompare(A,B) which compares values A and B and\n** returns negative, zero, or positive if A is less then, equal to, or\n** greater than B, respectively.  Then the true false results is found by\n** consulting sqlite3aLTb[opcode], sqlite3aEQb[opcode], or\n** sqlite3aGTb[opcode] depending on whether the result of compare(A,B)\n** is negative, zero, or positive, where opcode is the specific opcode.\n** The only works because the comparison opcodes are consecutive and in\n** this order: NE EQ GT LE LT GE.  Various assert()s throughout the code\n** ensure that is the case.\n**\n** These elements must be appended to another array.  Otherwise the\n** index (here shown as [256-OP_Ne]) would be out-of-bounds and thus\n** be undefined behavior.  That's goofy, but the C-standards people thought\n** it was a good idea, so here we are.\n*/\n/* NE  EQ  GT  LE  LT  GE  */\n   1,  0,  0,  1,  1,  0,  /* aLTb[]: Use when compare(A,B) less than zero */\n   0,  1,  0,  1,  0,  1,  /* aEQb[]: Use when compare(A,B) equals zero */\n   1,  0,  1,  0,  0,  1   /* aGTb[]: Use when compare(A,B) greater than zero*/\n};\nSQLITE_PRIVATE const unsigned char *sqlite3aLTb = &sqlite3UpperToLower[256-OP_Ne];\nSQLITE_PRIVATE const unsigned char *sqlite3aEQb = &sqlite3UpperToLower[256+6-OP_Ne];\nSQLITE_PRIVATE const unsigned char *sqlite3aGTb = &sqlite3UpperToLower[256+12-OP_Ne];\n\n/*\n** The following 256 byte lookup table is used to support SQLites built-in\n** equivalents to the following standard library functions:\n**\n**   isspace()                        0x01\n**   isalpha()                        0x02\n**   isdigit()                        0x04\n**   isalnum()                        0x06\n**   isxdigit()                       0x08\n**   toupper()                        0x20\n**   SQLite identifier character      0x40   $, _, or non-ascii\n**   Quote character                  0x80\n**\n** Bit 0x20 is set if the mapped character requires translation to upper\n** case. i.e. if the character is a lower-case ASCII character.\n** If x is a lower-case ASCII character, then its upper-case equivalent\n** is (x - 0x20). Therefore toupper() can be implemented as:\n**\n**   (x & ~(map[x]&0x20))\n**\n** The equivalent of tolower() is implemented using the sqlite3UpperToLower[]\n** array. tolower() is used more often than toupper() by SQLite.\n**\n** Bit 0x40 is set if the character is non-alphanumeric and can be used in an\n** SQLite identifier.  Identifiers are alphanumerics, \"_\", \"$\", and any\n** non-ASCII UTF character. Hence the test for whether or not a character is\n** part of an identifier is 0x46.\n*/\nSQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {\n  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 00..07    ........ */\n  0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,  /* 08..0f    ........ */\n  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 10..17    ........ */\n  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 18..1f    ........ */\n  0x01, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x80,  /* 20..27     !\"#$%&' */\n  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 28..2f    ()*+,-./ */\n  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,  /* 30..37    01234567 */\n  0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 38..3f    89:;<=>? */\n\n  0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02,  /* 40..47    @ABCDEFG */\n  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 48..4f    HIJKLMNO */\n  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 50..57    PQRSTUVW */\n  0x02, 0x02, 0x02, 0x80, 0x00, 0x00, 0x00, 0x40,  /* 58..5f    XYZ[\\]^_ */\n  0x80, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22,  /* 60..67    `abcdefg */\n  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 68..6f    hijklmno */\n  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 70..77    pqrstuvw */\n  0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 78..7f    xyz{|}~. */\n\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 80..87    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 88..8f    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 90..97    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 98..9f    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* a0..a7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* a8..af    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* b0..b7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* b8..bf    ........ */\n\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* c0..c7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* c8..cf    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* d0..d7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* d8..df    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e0..e7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e8..ef    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* f0..f7    ........ */\n  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40   /* f8..ff    ........ */\n};\n\n/* EVIDENCE-OF: R-02982-34736 In order to maintain full backwards\n** compatibility for legacy applications, the URI filename capability is\n** disabled by default.\n**\n** EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled\n** using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options.\n**\n** EVIDENCE-OF: R-43642-56306 By default, URI handling is globally\n** disabled. The default value may be changed by compiling with the\n** SQLITE_USE_URI symbol defined.\n*/\n#ifndef SQLITE_USE_URI\n# define SQLITE_USE_URI 0\n#endif\n\n/* EVIDENCE-OF: R-38720-18127 The default setting is determined by the\n** SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option, or is \"on\" if\n** that compile-time option is omitted.\n*/\n#if !defined(SQLITE_ALLOW_COVERING_INDEX_SCAN)\n# define SQLITE_ALLOW_COVERING_INDEX_SCAN 1\n#else\n# if !SQLITE_ALLOW_COVERING_INDEX_SCAN\n#   error \"Compile-time disabling of covering index scan using the\\\n -DSQLITE_ALLOW_COVERING_INDEX_SCAN=0 option is deprecated.\\\n Contact SQLite developers if this is a problem for you, and\\\n delete this #error macro to continue with your build.\"\n# endif\n#endif\n\n/* The minimum PMA size is set to this value multiplied by the database\n** page size in bytes.\n*/\n#ifndef SQLITE_SORTER_PMASZ\n# define SQLITE_SORTER_PMASZ 250\n#endif\n\n/* Statement journals spill to disk when their size exceeds the following\n** threshold (in bytes). 0 means that statement journals are created and\n** written to disk immediately (the default behavior for SQLite versions\n** before 3.12.0).  -1 means always keep the entire statement journal in\n** memory.  (The statement journal is also always held entirely in memory\n** if journal_mode=MEMORY or if temp_store=MEMORY, regardless of this\n** setting.)\n*/\n#ifndef SQLITE_STMTJRNL_SPILL\n# define SQLITE_STMTJRNL_SPILL (64*1024)\n#endif\n\n/*\n** The default lookaside-configuration, the format \"SZ,N\".  SZ is the\n** number of bytes in each lookaside slot (should be a multiple of 8)\n** and N is the number of slots.  The lookaside-configuration can be\n** changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE)\n** or at run-time for an individual database connection using\n** sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE);\n**\n** With the two-size-lookaside enhancement, less lookaside is required.\n** The default configuration of 1200,40 actually provides 30 1200-byte slots\n** and 93 128-byte slots, which is more lookaside than is available\n** using the older 1200,100 configuration without two-size-lookaside.\n*/\n#ifndef SQLITE_DEFAULT_LOOKASIDE\n# ifdef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n#   define SQLITE_DEFAULT_LOOKASIDE 1200,100  /* 120KB of memory */\n# else\n#   define SQLITE_DEFAULT_LOOKASIDE 1200,40   /* 48KB of memory */\n# endif\n#endif\n\n\n/* The default maximum size of an in-memory database created using\n** sqlite3_deserialize()\n*/\n#ifndef SQLITE_MEMDB_DEFAULT_MAXSIZE\n# define SQLITE_MEMDB_DEFAULT_MAXSIZE 1073741824\n#endif\n\n/*\n** The following singleton contains the global configuration for\n** the SQLite library.\n*/\nSQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {\n   SQLITE_DEFAULT_MEMSTATUS,  /* bMemstat */\n   1,                         /* bCoreMutex */\n   SQLITE_THREADSAFE==1,      /* bFullMutex */\n   SQLITE_USE_URI,            /* bOpenUri */\n   SQLITE_ALLOW_COVERING_INDEX_SCAN,   /* bUseCis */\n   0,                         /* bSmallMalloc */\n   1,                         /* bExtraSchemaChecks */\n#ifdef SQLITE_DEBUG\n   0,                         /* bJsonSelfcheck */\n#endif\n   0x7ffffffe,                /* mxStrlen */\n   0,                         /* neverCorrupt */\n   SQLITE_DEFAULT_LOOKASIDE,  /* szLookaside, nLookaside */\n   SQLITE_STMTJRNL_SPILL,     /* nStmtSpill */\n   {0,0,0,0,0,0,0,0},         /* m */\n   {0,0,0,0,0,0,0,0,0},       /* mutex */\n   {0,0,0,0,0,0,0,0,0,0,0,0,0},/* pcache2 */\n   (void*)0,                  /* pHeap */\n   0,                         /* nHeap */\n   0, 0,                      /* mnHeap, mxHeap */\n   SQLITE_DEFAULT_MMAP_SIZE,  /* szMmap */\n   SQLITE_MAX_MMAP_SIZE,      /* mxMmap */\n   (void*)0,                  /* pPage */\n   0,                         /* szPage */\n   SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */\n   0,                         /* mxParserStack */\n   0,                         /* sharedCacheEnabled */\n   SQLITE_SORTER_PMASZ,       /* szPma */\n   /* All the rest should always be initialized to zero */\n   0,                         /* isInit */\n   0,                         /* inProgress */\n   0,                         /* isMutexInit */\n   0,                         /* isMallocInit */\n   0,                         /* isPCacheInit */\n   0,                         /* nRefInitMutex */\n   0,                         /* pInitMutex */\n   0,                         /* xLog */\n   0,                         /* pLogArg */\n#ifdef SQLITE_ENABLE_SQLLOG\n   0,                         /* xSqllog */\n   0,                         /* pSqllogArg */\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n   0,                         /* xVdbeBranch */\n   0,                         /* pVbeBranchArg */\n#endif\n#ifndef SQLITE_OMIT_DESERIALIZE\n   SQLITE_MEMDB_DEFAULT_MAXSIZE,   /* mxMemdbSize */\n#endif\n#ifndef SQLITE_UNTESTABLE\n   0,                         /* xTestCallback */\n#endif\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n   0,                         /* mNoVisibleRowid.  0 == allow rowid-in-view */\n#endif\n   0,                         /* bLocaltimeFault */\n   0,                         /* xAltLocaltime */\n   0x7ffffffe,                /* iOnceResetThreshold */\n   SQLITE_DEFAULT_SORTERREF_SIZE,   /* szSorterRef */\n   0,                         /* iPrngSeed */\n#ifdef SQLITE_DEBUG\n   {0,0,0,0,0,0},             /* aTune */\n#endif\n};\n\n/*\n** Hash table for global functions - functions common to all\n** database connections.  After initialization, this table is\n** read-only.\n*/\nSQLITE_PRIVATE FuncDefHash sqlite3BuiltinFunctions;\n\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)\n/*\n** Counter used for coverage testing.  Does not come into play for\n** release builds.\n**\n** Access to this global variable is not mutex protected.  This might\n** result in TSAN warnings.  But as the variable does not exist in\n** release builds, that should not be a concern.\n*/\nSQLITE_PRIVATE unsigned int sqlite3CoverageCounter;\n#endif /* SQLITE_COVERAGE_TEST || SQLITE_DEBUG */\n\n#ifdef VDBE_PROFILE\n/*\n** The following performance counter can be used in place of\n** sqlite3Hwtime() for profiling.  This is a no-op on standard builds.\n*/\nSQLITE_PRIVATE sqlite3_uint64 sqlite3NProfileCnt = 0;\n#endif\n\n/*\n** The value of the \"pending\" byte must be 0x40000000 (1 byte past the\n** 1-gibabyte boundary) in a compatible database.  SQLite never uses\n** the database page that contains the pending byte.  It never attempts\n** to read or write that page.  The pending byte page is set aside\n** for use by the VFS layers as space for managing file locks.\n**\n** During testing, it is often desirable to move the pending byte to\n** a different position in the file.  This allows code that has to\n** deal with the pending byte to run on files that are much smaller\n** than 1 GiB.  The sqlite3_test_control() interface can be used to\n** move the pending byte.\n**\n** IMPORTANT:  Changing the pending byte to any value other than\n** 0x40000000 results in an incompatible database file format!\n** Changing the pending byte during operation will result in undefined\n** and incorrect behavior.\n*/\n#ifndef SQLITE_OMIT_WSD\nSQLITE_PRIVATE int sqlite3PendingByte = 0x40000000;\n#endif\n\n/*\n** Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS.\n*/\nSQLITE_PRIVATE u32 sqlite3TreeTrace = 0;\nSQLITE_PRIVATE u32 sqlite3WhereTrace = 0;\n\n/* #include \"opcodes.h\" */\n/*\n** Properties of opcodes.  The OPFLG_INITIALIZER macro is\n** created by mkopcodeh.awk during compilation.  Data is obtained\n** from the comments following the \"case OP_xxxx:\" statements in\n** the vdbe.c file.\n*/\nSQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;\n\n/*\n** Name of the default collating sequence\n*/\nSQLITE_PRIVATE const char sqlite3StrBINARY[] = \"BINARY\";\n\n/*\n** Standard typenames.  These names must match the COLTYPE_* definitions.\n** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.\n**\n**    sqlite3StdType[]            The actual names of the datatypes.\n**\n**    sqlite3StdTypeLen[]         The length (in bytes) of each entry\n**                                in sqlite3StdType[].\n**\n**    sqlite3StdTypeAffinity[]    The affinity associated with each entry\n**                                in sqlite3StdType[].\n*/\nSQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[] = { 3, 4, 3, 7, 4, 4 };\nSQLITE_PRIVATE const char sqlite3StdTypeAffinity[] = {\n  SQLITE_AFF_NUMERIC,\n  SQLITE_AFF_BLOB,\n  SQLITE_AFF_INTEGER,\n  SQLITE_AFF_INTEGER,\n  SQLITE_AFF_REAL,\n  SQLITE_AFF_TEXT\n};\nSQLITE_PRIVATE const char *sqlite3StdType[] = {\n  \"ANY\",\n  \"BLOB\",\n  \"INT\",\n  \"INTEGER\",\n  \"REAL\",\n  \"TEXT\"\n};\n\n/************** End of global.c **********************************************/\n/************** Begin file status.c ******************************************/\n/*\n** 2008 June 18\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This module implements the sqlite3_status() interface and related\n** functionality.\n*/\n/* #include \"sqliteInt.h\" */\n/************** Include vdbeInt.h in the middle of status.c ******************/\n/************** Begin file vdbeInt.h *****************************************/\n/*\n** 2003 September 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the header file for information that is private to the\n** VDBE.  This information used to all be at the top of the single\n** source code file \"vdbe.c\".  When that file became too big (over\n** 6000 lines long) it was split up into several smaller files and\n** this header information was factored out.\n*/\n#ifndef SQLITE_VDBEINT_H\n#define SQLITE_VDBEINT_H\n\n/*\n** The maximum number of times that a statement will try to reparse\n** itself before giving up and returning SQLITE_SCHEMA.\n*/\n#ifndef SQLITE_MAX_SCHEMA_RETRY\n# define SQLITE_MAX_SCHEMA_RETRY 50\n#endif\n\n/*\n** VDBE_DISPLAY_P4 is true or false depending on whether or not the\n** \"explain\" P4 display logic is enabled.\n*/\n#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) \\\n     || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG) \\\n     || defined(SQLITE_ENABLE_BYTECODE_VTAB)\n# define VDBE_DISPLAY_P4 1\n#else\n# define VDBE_DISPLAY_P4 0\n#endif\n\n/*\n** SQL is translated into a sequence of instructions to be\n** executed by a virtual machine.  Each instruction is an instance\n** of the following structure.\n*/\ntypedef struct VdbeOp Op;\n\n/*\n** Boolean values\n*/\ntypedef unsigned Bool;\n\n/* Opaque type used by code in vdbesort.c */\ntypedef struct VdbeSorter VdbeSorter;\n\n/* Elements of the linked list at Vdbe.pAuxData */\ntypedef struct AuxData AuxData;\n\n/* A cache of large TEXT or BLOB values in a VdbeCursor */\ntypedef struct VdbeTxtBlbCache VdbeTxtBlbCache;\n\n/* Types of VDBE cursors */\n#define CURTYPE_BTREE       0\n#define CURTYPE_SORTER      1\n#define CURTYPE_VTAB        2\n#define CURTYPE_PSEUDO      3\n\n/*\n** A VdbeCursor is an superclass (a wrapper) for various cursor objects:\n**\n**      * A b-tree cursor\n**          -  In the main database or in an ephemeral database\n**          -  On either an index or a table\n**      * A sorter\n**      * A virtual table\n**      * A one-row \"pseudotable\" stored in a single register\n*/\ntypedef struct VdbeCursor VdbeCursor;\nstruct VdbeCursor {\n  u8 eCurType;            /* One of the CURTYPE_* values above */\n  i8 iDb;                 /* Index of cursor database in db->aDb[] */\n  u8 nullRow;             /* True if pointing to a row with no data */\n  u8 deferredMoveto;      /* A call to sqlite3BtreeMoveto() is needed */\n  u8 isTable;             /* True for rowid tables.  False for indexes */\n#ifdef SQLITE_DEBUG\n  u8 seekOp;              /* Most recent seek operation on this cursor */\n  u8 wrFlag;              /* The wrFlag argument to sqlite3BtreeCursor() */\n#endif\n  Bool isEphemeral:1;     /* True for an ephemeral table */\n  Bool useRandomRowid:1;  /* Generate new record numbers semi-randomly */\n  Bool isOrdered:1;       /* True if the table is not BTREE_UNORDERED */\n  Bool noReuse:1;         /* OpenEphemeral may not reuse this cursor */\n  Bool colCache:1;        /* pCache pointer is initialized and non-NULL */\n  u16 seekHit;            /* See the OP_SeekHit and OP_IfNoHope opcodes */\n  union {                 /* pBtx for isEphermeral.  pAltMap otherwise */\n    Btree *pBtx;            /* Separate file holding temporary table */\n    u32 *aAltMap;           /* Mapping from table to index column numbers */\n  } ub;\n  i64 seqCount;           /* Sequence counter */\n\n  /* Cached OP_Column parse information is only valid if cacheStatus matches\n  ** Vdbe.cacheCtr.  Vdbe.cacheCtr will never take on the value of\n  ** CACHE_STALE (0) and so setting cacheStatus=CACHE_STALE guarantees that\n  ** the cache is out of date. */\n  u32 cacheStatus;        /* Cache is valid if this matches Vdbe.cacheCtr */\n  int seekResult;         /* Result of previous sqlite3BtreeMoveto() or 0\n                          ** if there have been no prior seeks on the cursor. */\n  /* seekResult does not distinguish between \"no seeks have ever occurred\n  ** on this cursor\" and \"the most recent seek was an exact match\".\n  ** For CURTYPE_PSEUDO, seekResult is the register holding the record */\n\n  /* When a new VdbeCursor is allocated, only the fields above are zeroed.\n  ** The fields that follow are uninitialized, and must be individually\n  ** initialized prior to first use. */\n  VdbeCursor *pAltCursor; /* Associated index cursor from which to read */\n  union {\n    BtCursor *pCursor;          /* CURTYPE_BTREE or _PSEUDO.  Btree cursor */\n    sqlite3_vtab_cursor *pVCur; /* CURTYPE_VTAB.              Vtab cursor */\n    VdbeSorter *pSorter;        /* CURTYPE_SORTER.            Sorter object */\n  } uc;\n  KeyInfo *pKeyInfo;      /* Info about index keys needed by index cursors */\n  u32 iHdrOffset;         /* Offset to next unparsed byte of the header */\n  Pgno pgnoRoot;          /* Root page of the open btree cursor */\n  i16 nField;             /* Number of fields in the header */\n  u16 nHdrParsed;         /* Number of header fields parsed so far */\n  i64 movetoTarget;       /* Argument to the deferred sqlite3BtreeMoveto() */\n  u32 *aOffset;           /* Pointer to aType[nField] */\n  const u8 *aRow;         /* Data for the current row, if all on one page */\n  u32 payloadSize;        /* Total number of bytes in the record */\n  u32 szRow;              /* Byte available in aRow */\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n  u64 maskUsed;           /* Mask of columns used by this cursor */\n#endif\n  VdbeTxtBlbCache *pCache; /* Cache of large TEXT or BLOB values */\n\n  /* Space is allocated for aType to hold at least 2*nField+1 entries:\n  ** nField slots for aType[] and nField+1 array slots for aOffset[] */\n  u32 aType[FLEXARRAY];    /* Type values record decode.  MUST BE LAST */\n};\n\n/*\n** The size (in bytes) of a VdbeCursor object that has an nField value of N\n** or less.  The value of SZ_VDBECURSOR(n) is guaranteed to be a multiple\n** of 8.\n*/\n#define SZ_VDBECURSOR(N) \\\n    (ROUND8(offsetof(VdbeCursor,aType)) + ((N)+1)*sizeof(u64))\n\n/* Return true if P is a null-only cursor\n*/\n#define IsNullCursor(P) \\\n  ((P)->eCurType==CURTYPE_PSEUDO && (P)->nullRow && (P)->seekResult==0)\n\n/*\n** A value for VdbeCursor.cacheStatus that means the cache is always invalid.\n*/\n#define CACHE_STALE 0\n\n/*\n** Large TEXT or BLOB values can be slow to load, so we want to avoid\n** loading them more than once.  For that reason, large TEXT and BLOB values\n** can be stored in a cache defined by this object, and attached to the\n** VdbeCursor using the pCache field.\n*/\nstruct VdbeTxtBlbCache {\n  char *pCValue;        /* A RCStr buffer to hold the value */\n  i64 iOffset;          /* File offset of the row being cached */\n  int iCol;             /* Column for which the cache is valid */\n  u32 cacheStatus;      /* Vdbe.cacheCtr value */\n  u32 colCacheCtr;      /* Column cache counter */\n};\n\n/*\n** When a sub-program is executed (OP_Program), a structure of this type\n** is allocated to store the current value of the program counter, as\n** well as the current memory cell array and various other frame specific\n** values stored in the Vdbe struct. When the sub-program is finished,\n** these values are copied back to the Vdbe from the VdbeFrame structure,\n** restoring the state of the VM to as it was before the sub-program\n** began executing.\n**\n** The memory for a VdbeFrame object is allocated and managed by a memory\n** cell in the parent (calling) frame. When the memory cell is deleted or\n** overwritten, the VdbeFrame object is not freed immediately. Instead, it\n** is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame\n** list is deleted when the VM is reset in VdbeHalt(). The reason for doing\n** this instead of deleting the VdbeFrame immediately is to avoid recursive\n** calls to sqlite3VdbeMemRelease() when the memory cells belonging to the\n** child frame are released.\n**\n** The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is\n** set to NULL if the currently executing frame is the main program.\n*/\ntypedef struct VdbeFrame VdbeFrame;\nstruct VdbeFrame {\n  Vdbe *v;                /* VM this frame belongs to */\n  VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */\n  Op *aOp;                /* Program instructions for parent frame */\n  Mem *aMem;              /* Array of memory cells for parent frame */\n  VdbeCursor **apCsr;     /* Array of Vdbe cursors for parent frame */\n  u8 *aOnce;              /* Bitmask used by OP_Once */\n  void *token;            /* Copy of SubProgram.token */\n  i64 lastRowid;          /* Last insert rowid (sqlite3.lastRowid) */\n  AuxData *pAuxData;      /* Linked list of auxdata allocations */\n#if SQLITE_DEBUG\n  u32 iFrameMagic;        /* magic number for sanity checking */\n#endif\n  int nCursor;            /* Number of entries in apCsr */\n  int pc;                 /* Program Counter in parent (calling) frame */\n  int nOp;                /* Size of aOp array */\n  int nMem;               /* Number of entries in aMem */\n  int nChildMem;          /* Number of memory cells for child frame */\n  int nChildCsr;          /* Number of cursors for child frame */\n  i64 nChange;            /* Statement changes (Vdbe.nChange)     */\n  i64 nDbChange;          /* Value of db->nChange */\n};\n\n/* Magic number for sanity checking on VdbeFrame objects */\n#define SQLITE_FRAME_MAGIC 0x879fb71e\n\n/*\n** Return a pointer to the array of registers allocated for use\n** by a VdbeFrame.\n*/\n#define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])\n\n/*\n** Internally, the vdbe manipulates nearly all SQL values as Mem\n** structures. Each Mem struct may cache multiple representations (string,\n** integer etc.) of the same value.\n*/\nstruct sqlite3_value {\n  union MemValue {\n    double r;           /* Real value used when MEM_Real is set in flags */\n    i64 i;              /* Integer value used when MEM_Int is set in flags */\n    int nZero;          /* Extra zero bytes when MEM_Zero and MEM_Blob set */\n    const char *zPType; /* Pointer type when MEM_Term|MEM_Subtype|MEM_Null */\n    FuncDef *pDef;      /* Used only when flags==MEM_Agg */\n  } u;\n  char *z;            /* String or BLOB value */\n  int n;              /* Number of characters in string value, excluding '\\0' */\n  u16 flags;          /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */\n  u8  enc;            /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */\n  u8  eSubtype;       /* Subtype for this value */\n  /* ShallowCopy only needs to copy the information above */\n  sqlite3 *db;        /* The associated database connection */\n  int szMalloc;       /* Size of the zMalloc allocation */\n  u32 uTemp;          /* Transient storage for serial_type in OP_MakeRecord */\n  char *zMalloc;      /* Space to hold MEM_Str or MEM_Blob if szMalloc>0 */\n  void (*xDel)(void*);/* Destructor for Mem.z - only valid if MEM_Dyn */\n#ifdef SQLITE_DEBUG\n  Mem *pScopyFrom;    /* This Mem is a shallow copy of pScopyFrom */\n  u16 mScopyFlags;    /* flags value immediately after the shallow copy */\n  u8  bScopy;         /* The pScopyFrom of some other Mem *might* point here */\n#endif\n};\n\n/*\n** Size of struct Mem not including the Mem.zMalloc member or anything that\n** follows.\n*/\n#define MEMCELLSIZE offsetof(Mem,db)\n\n/* One or more of the following flags are set to indicate the\n** representations of the value stored in the Mem struct.\n**\n**  *  MEM_Null                An SQL NULL value\n**\n**  *  MEM_Null|MEM_Zero       An SQL NULL with the virtual table\n**                             UPDATE no-change flag set\n**\n**  *  MEM_Null|MEM_Term|      An SQL NULL, but also contains a\n**        MEM_Subtype          pointer accessible using\n**                             sqlite3_value_pointer().\n**\n**  *  MEM_Null|MEM_Cleared    Special SQL NULL that compares non-equal\n**                             to other NULLs even using the IS operator.\n**\n**  *  MEM_Str                 A string, stored in Mem.z with\n**                             length Mem.n.  Zero-terminated if\n**                             MEM_Term is set.  This flag is\n**                             incompatible with MEM_Blob and\n**                             MEM_Null, but can appear with MEM_Int,\n**                             MEM_Real, and MEM_IntReal.\n**\n**  *  MEM_Blob                A blob, stored in Mem.z length Mem.n.\n**                             Incompatible with MEM_Str, MEM_Null,\n**                             MEM_Int, MEM_Real, and MEM_IntReal.\n**\n**  *  MEM_Blob|MEM_Zero       A blob in Mem.z of length Mem.n plus\n**                             Mem.u.nZero extra 0x00 bytes at the end.\n**\n**  *  MEM_Int                 Integer stored in Mem.u.i.\n**\n**  *  MEM_Real                Real stored in Mem.u.r.\n**\n**  *  MEM_IntReal             Real stored as an integer in Mem.u.i.\n**\n** If the MEM_Null flag is set, then the value is an SQL NULL value.\n** For a pointer type created using sqlite3_bind_pointer() or\n** sqlite3_result_pointer() the MEM_Term and MEM_Subtype flags are also set.\n**\n** If the MEM_Str flag is set then Mem.z points at a string representation.\n** Usually this is encoded in the same unicode encoding as the main\n** database (see below for exceptions). If the MEM_Term flag is also\n** set, then the string is nul terminated. The MEM_Int and MEM_Real\n** flags may coexist with the MEM_Str flag.\n*/\n#define MEM_Undefined 0x0000   /* Value is undefined */\n#define MEM_Null      0x0001   /* Value is NULL (or a pointer) */\n#define MEM_Str       0x0002   /* Value is a string */\n#define MEM_Int       0x0004   /* Value is an integer */\n#define MEM_Real      0x0008   /* Value is a real number */\n#define MEM_Blob      0x0010   /* Value is a BLOB */\n#define MEM_IntReal   0x0020   /* MEM_Int that stringifies like MEM_Real */\n#define MEM_AffMask   0x003f   /* Mask of affinity bits */\n\n/* Extra bits that modify the meanings of the core datatypes above\n*/\n#define MEM_FromBind  0x0040   /* Value originates from sqlite3_bind() */\n /*                   0x0080   // Available */\n#define MEM_Cleared   0x0100   /* NULL set by OP_Null, not from data */\n#define MEM_Term      0x0200   /* String in Mem.z is zero terminated */\n#define MEM_Zero      0x0400   /* Mem.i contains count of 0s appended to blob */\n#define MEM_Subtype   0x0800   /* Mem.eSubtype is valid */\n#define MEM_TypeMask  0x0dbf   /* Mask of type bits */\n\n/* Bits that determine the storage for Mem.z for a string or blob or\n** aggregate accumulator.\n*/\n#define MEM_Dyn       0x1000   /* Need to call Mem.xDel() on Mem.z */\n#define MEM_Static    0x2000   /* Mem.z points to a static string */\n#define MEM_Ephem     0x4000   /* Mem.z points to an ephemeral string */\n#define MEM_Agg       0x8000   /* Mem.z points to an agg function context */\n\n/* Return TRUE if Mem X contains dynamically allocated content - anything\n** that needs to be deallocated to avoid a leak.\n*/\n#define VdbeMemDynamic(X)  \\\n  (((X)->flags&(MEM_Agg|MEM_Dyn))!=0)\n\n/*\n** Clear any existing type flags from a Mem and replace them with f\n*/\n#define MemSetTypeFlag(p, f) \\\n   ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f)\n\n/*\n** True if Mem X is a NULL-nochng type.\n*/\n#define MemNullNochng(X) \\\n  (((X)->flags&MEM_TypeMask)==(MEM_Null|MEM_Zero) \\\n    && (X)->n==0 && (X)->u.nZero==0)\n\n/*\n** Return true if a memory cell has been initialized and is valid.\n** is for use inside assert() statements only.\n**\n** A Memory cell is initialized if at least one of the\n** MEM_Null, MEM_Str, MEM_Int, MEM_Real, MEM_Blob, or MEM_IntReal bits\n** is set.  It is \"undefined\" if all those bits are zero.\n*/\n#ifdef SQLITE_DEBUG\n#define memIsValid(M)  ((M)->flags & MEM_AffMask)!=0\n#endif\n\n/*\n** Each auxiliary data pointer stored by a user defined function\n** implementation calling sqlite3_set_auxdata() is stored in an instance\n** of this structure. All such structures associated with a single VM\n** are stored in a linked list headed at Vdbe.pAuxData. All are destroyed\n** when the VM is halted (if not before).\n*/\nstruct AuxData {\n  int iAuxOp;                     /* Instruction number of OP_Function opcode */\n  int iAuxArg;                    /* Index of function argument. */\n  void *pAux;                     /* Aux data pointer */\n  void (*xDeleteAux)(void*);      /* Destructor for the aux data */\n  AuxData *pNextAux;              /* Next element in list */\n};\n\n/*\n** The \"context\" argument for an installable function.  A pointer to an\n** instance of this structure is the first argument to the routines used\n** implement the SQL functions.\n**\n** There is a typedef for this structure in sqlite.h.  So all routines,\n** even the public interface to SQLite, can use a pointer to this structure.\n** But this file is the only place where the internal details of this\n** structure are known.\n**\n** This structure is defined inside of vdbeInt.h because it uses substructures\n** (Mem) which are only defined there.\n*/\nstruct sqlite3_context {\n  Mem *pOut;              /* The return value is stored here */\n  FuncDef *pFunc;         /* Pointer to function information */\n  Mem *pMem;              /* Memory cell used to store aggregate context */\n  Vdbe *pVdbe;            /* The VM that owns this context */\n  int iOp;                /* Instruction number of OP_Function */\n  int isError;            /* Error code returned by the function. */\n  u8 enc;                 /* Encoding to use for results */\n  u8 skipFlag;            /* Skip accumulator loading if true */\n  u16 argc;               /* Number of arguments */\n  sqlite3_value *argv[FLEXARRAY]; /* Argument set */\n};\n\n/*\n** The size (in bytes) of an sqlite3_context object that holds N\n** argv[] arguments.\n*/\n#define SZ_CONTEXT(N)  \\\n   (offsetof(sqlite3_context,argv)+(N)*sizeof(sqlite3_value*))\n\n\n/* The ScanStatus object holds a single value for the\n** sqlite3_stmt_scanstatus() interface.\n**\n** aAddrRange[]:\n**   This array is used by ScanStatus elements associated with EQP\n**   notes that make an SQLITE_SCANSTAT_NCYCLE value available. It is\n**   an array of up to 3 ranges of VM addresses for which the Vdbe.anCycle[]\n**   values should be summed to calculate the NCYCLE value. Each pair of\n**   integer addresses is a start and end address (both inclusive) for a range\n**   instructions. A start value of 0 indicates an empty range.\n*/\ntypedef struct ScanStatus ScanStatus;\nstruct ScanStatus {\n  int addrExplain;                /* OP_Explain for loop */\n  int aAddrRange[6];\n  int addrLoop;                   /* Address of \"loops\" counter */\n  int addrVisit;                  /* Address of \"rows visited\" counter */\n  int iSelectID;                  /* The \"Select-ID\" for this loop */\n  LogEst nEst;                    /* Estimated output rows per loop */\n  char *zName;                    /* Name of table or index */\n};\n\n/* The DblquoteStr object holds the text of a double-quoted\n** string for a prepared statement.  A linked list of these objects\n** is constructed during statement parsing and is held on Vdbe.pDblStr.\n** When computing a normalized SQL statement for an SQL statement, that\n** list is consulted for each double-quoted identifier to see if the\n** identifier should really be a string literal.\n*/\ntypedef struct DblquoteStr DblquoteStr;\nstruct DblquoteStr {\n  DblquoteStr *pNextStr;   /* Next string literal in the list */\n  char z[8];               /* Dequoted value for the string */\n};\n\n/*\n** An instance of the virtual machine.  This structure contains the complete\n** state of the virtual machine.\n**\n** The \"sqlite3_stmt\" structure pointer that is returned by sqlite3_prepare()\n** is really a pointer to an instance of this structure.\n*/\nstruct Vdbe {\n  sqlite3 *db;            /* The database connection that owns this statement */\n  Vdbe **ppVPrev,*pVNext; /* Linked list of VDBEs with the same Vdbe.db */\n  Parse *pParse;          /* Parsing context used to create this Vdbe */\n  ynVar nVar;             /* Number of entries in aVar[] */\n  int nMem;               /* Number of memory locations currently allocated */\n  int nCursor;            /* Number of slots in apCsr[] */\n  u32 cacheCtr;           /* VdbeCursor row cache generation counter */\n  int pc;                 /* The program counter */\n  int rc;                 /* Value to return */\n  i64 nChange;            /* Number of db changes made since last reset */\n  int iStatement;         /* Statement number (or 0 if has no opened stmt) */\n  i64 iCurrentTime;       /* Value of julianday('now') for this statement */\n  i64 nFkConstraint;      /* Number of imm. FK constraints this VM */\n  i64 nStmtDefCons;       /* Number of def. constraints when stmt started */\n  i64 nStmtDefImmCons;    /* Number of def. imm constraints when stmt started */\n  Mem *aMem;              /* The memory locations */\n  Mem **apArg;            /* Arguments xUpdate and xFilter vtab methods */\n  VdbeCursor **apCsr;     /* One element of this array for each open cursor */\n  Mem *aVar;              /* Values for the OP_Variable opcode. */\n\n  /* When allocating a new Vdbe object, all of the fields below should be\n  ** initialized to zero or NULL */\n\n  Op *aOp;                /* Space to hold the virtual machine's program */\n  int nOp;                /* Number of instructions in the program */\n  int nOpAlloc;           /* Slots allocated for aOp[] */\n  Mem *aColName;          /* Column names to return */\n  Mem *pResultRow;        /* Current output row */\n  char *zErrMsg;          /* Error message written here */\n  VList *pVList;          /* Name of variables */\n#ifndef SQLITE_OMIT_TRACE\n  i64 startTime;          /* Time when query started - used for profiling */\n#endif\n#ifdef SQLITE_DEBUG\n  int rcApp;              /* errcode set by sqlite3_result_error_code() */\n  u32 nWrite;             /* Number of write operations that have occurred */\n  int napArg;             /* Size of the apArg[] array */\n#endif\n  u16 nResColumn;         /* Number of columns in one row of the result set */\n  u16 nResAlloc;          /* Column slots allocated to aColName[] */\n  u8 errorAction;         /* Recovery action to do in case of an error */\n  u8 minWriteFileFormat;  /* Minimum file format for writable database files */\n  u8 prepFlags;           /* SQLITE_PREPARE_* flags */\n  u8 eVdbeState;          /* On of the VDBE_*_STATE values */\n  bft expired:2;          /* 1: recompile VM immediately  2: when convenient */\n  bft explain:2;          /* 0: normal, 1: EXPLAIN, 2: EXPLAIN QUERY PLAN */\n  bft changeCntOn:1;      /* True to update the change-counter */\n  bft usesStmtJournal:1;  /* True if uses a statement journal */\n  bft readOnly:1;         /* True for statements that do not write */\n  bft bIsReader:1;        /* True for statements that read */\n  bft haveEqpOps:1;       /* Bytecode supports EXPLAIN QUERY PLAN */\n  yDbMask btreeMask;      /* Bitmask of db->aDb[] entries referenced */\n  yDbMask lockMask;       /* Subset of btreeMask that requires a lock */\n  u32 aCounter[9];        /* Counters used by sqlite3_stmt_status() */\n  char *zSql;             /* Text of the SQL statement that generated this */\n#ifdef SQLITE_ENABLE_NORMALIZE\n  char *zNormSql;         /* Normalization of the associated SQL statement */\n  DblquoteStr *pDblStr;   /* List of double-quoted string literals */\n#endif\n  void *pFree;            /* Free this when deleting the vdbe */\n  VdbeFrame *pFrame;      /* Parent frame */\n  VdbeFrame *pDelFrame;   /* List of frame objects to free on VM reset */\n  int nFrame;             /* Number of frames in pFrame list */\n  u32 expmask;            /* Binding to these vars invalidates VM */\n  SubProgram *pProgram;   /* Linked list of all sub-programs used by VM */\n  AuxData *pAuxData;      /* Linked list of auxdata allocations */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int nScan;              /* Entries in aScan[] */\n  ScanStatus *aScan;      /* Scan definitions for sqlite3_stmt_scanstatus() */\n#endif\n};\n\n/*\n** The following are allowed values for Vdbe.eVdbeState\n*/\n#define VDBE_INIT_STATE     0   /* Prepared statement under construction */\n#define VDBE_READY_STATE    1   /* Ready to run but not yet started */\n#define VDBE_RUN_STATE      2   /* Run in progress */\n#define VDBE_HALT_STATE     3   /* Finished.  Need reset() or finalize() */\n\n/*\n** Structure used to store the context required by the\n** sqlite3_preupdate_*() API functions.\n*/\nstruct PreUpdate {\n  Vdbe *v;\n  VdbeCursor *pCsr;               /* Cursor to read old values from */\n  int op;                         /* One of SQLITE_INSERT, UPDATE, DELETE */\n  u8 *aRecord;                    /* old.* database record */\n  KeyInfo *pKeyinfo;              /* Key information */\n  UnpackedRecord *pUnpacked;      /* Unpacked version of aRecord[] */\n  UnpackedRecord *pNewUnpacked;   /* Unpacked version of new.* record */\n  int iNewReg;                    /* Register for new.* values */\n  int iBlobWrite;                 /* Value returned by preupdate_blobwrite() */\n  i64 iKey1;                      /* First key value passed to hook */\n  i64 iKey2;                      /* Second key value passed to hook */\n  Mem oldipk;                     /* Memory cell holding \"old\" IPK value */\n  Mem *aNew;                      /* Array of new.* values */\n  Table *pTab;                    /* Schema object being updated */\n  Index *pPk;                     /* PK index if pTab is WITHOUT ROWID */\n  sqlite3_value **apDflt;         /* Array of default values, if required */\n  struct {\n    u8 keyinfoSpace[SZ_KEYINFO_0];  /* Space to hold pKeyinfo[0] content */\n  } uKey;\n};\n\n/*\n** An instance of this object is used to pass an vector of values into\n** OP_VFilter, the xFilter method of a virtual table.  The vector is the\n** set of values on the right-hand side of an IN constraint.\n**\n** The value as passed into xFilter is an sqlite3_value with a \"pointer\"\n** type, such as is generated by sqlite3_result_pointer() and read by\n** sqlite3_value_pointer.  Such values have MEM_Term|MEM_Subtype|MEM_Null\n** and a subtype of 'p'.  The sqlite3_vtab_in_first() and _next() interfaces\n** know how to use this object to step through all the values in the\n** right operand of the IN constraint.\n*/\ntypedef struct ValueList ValueList;\nstruct ValueList {\n  BtCursor *pCsr;          /* An ephemeral table holding all values */\n  sqlite3_value *pOut;     /* Register to hold each decoded output value */\n};\n\n/* Size of content associated with serial types that fit into a\n** single-byte varint.\n*/\n#ifndef SQLITE_AMALGAMATION\nSQLITE_PRIVATE const u8 sqlite3SmallTypeSizes[];\n#endif\n\n/*\n** Function prototypes\n*/\nSQLITE_PRIVATE void sqlite3VdbeError(Vdbe*, const char *, ...);\nSQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);\nSQLITE_PRIVATE void sqlite3VdbeFreeCursorNN(Vdbe*,VdbeCursor*);\nvoid sqliteVdbePopStack(Vdbe*,int);\nSQLITE_PRIVATE int SQLITE_NOINLINE sqlite3VdbeHandleMovedCursor(VdbeCursor *p);\nSQLITE_PRIVATE int SQLITE_NOINLINE sqlite3VdbeFinishMoveto(VdbeCursor*);\nSQLITE_PRIVATE int sqlite3VdbeCursorRestore(VdbeCursor*);\nSQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);\nSQLITE_PRIVATE u8 sqlite3VdbeOneByteSerialTypeLen(u8);\n#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nSQLITE_PRIVATE   u64 sqlite3FloatSwap(u64 in);\n# define swapMixedEndianFloat(X)  X = sqlite3FloatSwap(X)\n#else\n# define swapMixedEndianFloat(X)\n#endif\nSQLITE_PRIVATE void sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);\nSQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(sqlite3*, AuxData**, int, int);\n\nint sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);\nSQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);\nSQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor*, i64*);\nSQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);\n#if !defined(SQLITE_OMIT_EXPLAIN) || defined(SQLITE_ENABLE_BYTECODE_VTAB)\nSQLITE_PRIVATE int sqlite3VdbeNextOpcode(Vdbe*,Mem*,int,int*,int*,Op**);\nSQLITE_PRIVATE char *sqlite3VdbeDisplayP4(sqlite3*,Op*);\n#endif\n#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS)\nSQLITE_PRIVATE char *sqlite3VdbeDisplayComment(sqlite3*,const Op*,const char*);\n#endif\n#if !defined(SQLITE_OMIT_EXPLAIN)\nSQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);\n#endif\nSQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);\nSQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);\nSQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);\nSQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);\nSQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, i64, u8, void(*)(void*));\nSQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# define sqlite3VdbeMemSetDouble sqlite3VdbeMemSetInt64\n#else\nSQLITE_PRIVATE   void sqlite3VdbeMemSetDouble(Mem*, double);\n#endif\nSQLITE_PRIVATE void sqlite3VdbeMemSetPointer(Mem*, void*, const char*, void(*)(void*));\nSQLITE_PRIVATE void sqlite3VdbeMemInit(Mem*,sqlite3*,u16);\nSQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);\n#ifndef SQLITE_OMIT_INCRBLOB\nSQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);\n#else\nSQLITE_PRIVATE int sqlite3VdbeMemSetZeroBlob(Mem*,int);\n#endif\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3VdbeMemIsRowSet(const Mem*);\n#endif\nSQLITE_PRIVATE int sqlite3VdbeMemSetRowSet(Mem*);\nSQLITE_PRIVATE void sqlite3VdbeMemZeroTerminateIfAble(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, u8, u8);\nSQLITE_PRIVATE int sqlite3IntFloatCompare(i64,double);\nSQLITE_PRIVATE i64 sqlite3VdbeIntValue(const Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem*);\nSQLITE_PRIVATE double sqlite3VdbeRealValue(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeBooleanValue(Mem*, int ifNull);\nSQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemCast(Mem*,u8,u8);\nSQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,Mem*);\nSQLITE_PRIVATE int sqlite3VdbeMemFromBtreeZeroOffset(BtCursor*,u32,Mem*);\nSQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);\nSQLITE_PRIVATE void sqlite3VdbeMemReleaseMalloc(Mem*p);\nSQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem*, Mem*, FuncDef*);\n#endif\n#if !defined(SQLITE_OMIT_EXPLAIN) || defined(SQLITE_ENABLE_BYTECODE_VTAB)\nSQLITE_PRIVATE const char *sqlite3OpcodeName(int);\n#endif\nSQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);\nSQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int n);\nSQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3VdbeFrameIsValid(VdbeFrame*);\n#endif\nSQLITE_PRIVATE void sqlite3VdbeFrameMemDel(void*);      /* Destructor on Mem */\nSQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame*); /* Actually deletes the Frame */\nSQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *);\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\nSQLITE_PRIVATE void sqlite3VdbePreUpdateHook(\n    Vdbe*,VdbeCursor*,int,const char*,Table*,i64,int,int);\n#endif\nSQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p);\n\nSQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *, int, VdbeCursor *);\nSQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *, VdbeSorter *);\nSQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *, VdbeCursor *);\nSQLITE_PRIVATE int sqlite3VdbeSorterRowkey(const VdbeCursor *, Mem *);\nSQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, const VdbeCursor *);\nSQLITE_PRIVATE int sqlite3VdbeSorterRewind(const VdbeCursor *, int *);\nSQLITE_PRIVATE int sqlite3VdbeSorterWrite(const VdbeCursor *, Mem *);\nSQLITE_PRIVATE int sqlite3VdbeSorterCompare(const VdbeCursor *, Mem *, int, int *);\n\nSQLITE_PRIVATE void sqlite3VdbeValueListFree(void*);\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   void sqlite3VdbeIncrWriteCounter(Vdbe*, VdbeCursor*);\nSQLITE_PRIVATE   void sqlite3VdbeAssertAbortable(Vdbe*);\n#else\n# define sqlite3VdbeIncrWriteCounter(V,C)\n# define sqlite3VdbeAssertAbortable(V)\n#endif\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE)\nSQLITE_PRIVATE   void sqlite3VdbeEnter(Vdbe*);\n#else\n# define sqlite3VdbeEnter(X)\n#endif\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0\nSQLITE_PRIVATE   void sqlite3VdbeLeave(Vdbe*);\n#else\n# define sqlite3VdbeLeave(X)\n#endif\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe*,Mem*);\nSQLITE_PRIVATE int sqlite3VdbeCheckMemInvariants(Mem*);\n#endif\n\n#ifndef SQLITE_OMIT_FOREIGN_KEY\nSQLITE_PRIVATE int sqlite3VdbeCheckFkImmediate(Vdbe*);\nSQLITE_PRIVATE int sqlite3VdbeCheckFkDeferred(Vdbe*);\n#else\n# define sqlite3VdbeCheckFkImmediate(p) 0\n# define sqlite3VdbeCheckFkDeferred(p) 0\n#endif\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE   void sqlite3VdbePrintSql(Vdbe*);\nSQLITE_PRIVATE   void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr);\n#endif\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_PRIVATE   int sqlite3VdbeMemTranslate(Mem*, u8);\nSQLITE_PRIVATE   int sqlite3VdbeMemHandleBom(Mem *pMem);\n#endif\n\n#ifndef SQLITE_OMIT_INCRBLOB\nSQLITE_PRIVATE   int sqlite3VdbeMemExpandBlob(Mem *);\n  #define ExpandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)\n#else\n  #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK\n  #define ExpandBlob(P) SQLITE_OK\n#endif\n\n#endif /* !defined(SQLITE_VDBEINT_H) */\n\n/************** End of vdbeInt.h *********************************************/\n/************** Continuing where we left off in status.c *********************/\n\n/*\n** Variables in which to record status information.\n*/\n#if SQLITE_PTRSIZE>4\ntypedef sqlite3_int64 sqlite3StatValueType;\n#else\ntypedef u32 sqlite3StatValueType;\n#endif\ntypedef struct sqlite3StatType sqlite3StatType;\nstatic SQLITE_WSD struct sqlite3StatType {\n  sqlite3StatValueType nowValue[10];  /* Current value */\n  sqlite3StatValueType mxValue[10];   /* Maximum value */\n} sqlite3Stat = { {0,}, {0,} };\n\n/*\n** Elements of sqlite3Stat[] are protected by either the memory allocator\n** mutex, or by the pcache1 mutex.  The following array determines which.\n*/\nstatic const char statMutex[] = {\n  0,  /* SQLITE_STATUS_MEMORY_USED */\n  1,  /* SQLITE_STATUS_PAGECACHE_USED */\n  1,  /* SQLITE_STATUS_PAGECACHE_OVERFLOW */\n  0,  /* SQLITE_STATUS_SCRATCH_USED */\n  0,  /* SQLITE_STATUS_SCRATCH_OVERFLOW */\n  0,  /* SQLITE_STATUS_MALLOC_SIZE */\n  0,  /* SQLITE_STATUS_PARSER_STACK */\n  1,  /* SQLITE_STATUS_PAGECACHE_SIZE */\n  0,  /* SQLITE_STATUS_SCRATCH_SIZE */\n  0,  /* SQLITE_STATUS_MALLOC_COUNT */\n};\n\n\n/* The \"wsdStat\" macro will resolve to the status information\n** state vector.  If writable static data is unsupported on the target,\n** we have to locate the state vector at run-time.  In the more common\n** case where writable static data is supported, wsdStat can refer directly\n** to the \"sqlite3Stat\" state vector declared above.\n*/\n#ifdef SQLITE_OMIT_WSD\n# define wsdStatInit  sqlite3StatType *x = &GLOBAL(sqlite3StatType,sqlite3Stat)\n# define wsdStat x[0]\n#else\n# define wsdStatInit\n# define wsdStat sqlite3Stat\n#endif\n\n/*\n** Return the current value of a status parameter.  The caller must\n** be holding the appropriate mutex.\n*/\nSQLITE_PRIVATE sqlite3_int64 sqlite3StatusValue(int op){\n  wsdStatInit;\n  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );\n  assert( op>=0 && op<ArraySize(statMutex) );\n  assert( sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex()\n                                           : sqlite3MallocMutex()) );\n  return wsdStat.nowValue[op];\n}\n\n/*\n** Add N to the value of a status record.  The caller must hold the\n** appropriate mutex.  (Locking is checked by assert()).\n**\n** The StatusUp() routine can accept positive or negative values for N.\n** The value of N is added to the current status value and the high-water\n** mark is adjusted if necessary.\n**\n** The StatusDown() routine lowers the current value by N.  The highwater\n** mark is unchanged.  N must be non-negative for StatusDown().\n*/\nSQLITE_PRIVATE void sqlite3StatusUp(int op, int N){\n  wsdStatInit;\n  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );\n  assert( op>=0 && op<ArraySize(statMutex) );\n  assert( sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex()\n                                           : sqlite3MallocMutex()) );\n  wsdStat.nowValue[op] += N;\n  if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){\n    wsdStat.mxValue[op] = wsdStat.nowValue[op];\n  }\n}\nSQLITE_PRIVATE void sqlite3StatusDown(int op, int N){\n  wsdStatInit;\n  assert( N>=0 );\n  assert( op>=0 && op<ArraySize(statMutex) );\n  assert( sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex()\n                                           : sqlite3MallocMutex()) );\n  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );\n  wsdStat.nowValue[op] -= N;\n}\n\n/*\n** Adjust the highwater mark if necessary.\n** The caller must hold the appropriate mutex.\n*/\nSQLITE_PRIVATE void sqlite3StatusHighwater(int op, int X){\n  sqlite3StatValueType newValue;\n  wsdStatInit;\n  assert( X>=0 );\n  newValue = (sqlite3StatValueType)X;\n  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );\n  assert( op>=0 && op<ArraySize(statMutex) );\n  assert( sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex()\n                                           : sqlite3MallocMutex()) );\n  assert( op==SQLITE_STATUS_MALLOC_SIZE\n          || op==SQLITE_STATUS_PAGECACHE_SIZE\n          || op==SQLITE_STATUS_PARSER_STACK );\n  if( newValue>wsdStat.mxValue[op] ){\n    wsdStat.mxValue[op] = newValue;\n  }\n}\n\n/*\n** Query status information.\n*/\nSQLITE_API int sqlite3_status64(\n  int op,\n  sqlite3_int64 *pCurrent,\n  sqlite3_int64 *pHighwater,\n  int resetFlag\n){\n  sqlite3_mutex *pMutex;\n  wsdStatInit;\n  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  pMutex = statMutex[op] ? sqlite3Pcache1Mutex() : sqlite3MallocMutex();\n  sqlite3_mutex_enter(pMutex);\n  *pCurrent = wsdStat.nowValue[op];\n  *pHighwater = wsdStat.mxValue[op];\n  if( resetFlag ){\n    wsdStat.mxValue[op] = wsdStat.nowValue[op];\n  }\n  sqlite3_mutex_leave(pMutex);\n  (void)pMutex;  /* Prevent warning when SQLITE_THREADSAFE=0 */\n  return SQLITE_OK;\n}\nSQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){\n  sqlite3_int64 iCur = 0, iHwtr = 0;\n  int rc;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  rc = sqlite3_status64(op, &iCur, &iHwtr, resetFlag);\n  if( rc==0 ){\n    *pCurrent = (int)iCur;\n    *pHighwater = (int)iHwtr;\n  }\n  return rc;\n}\n\n/*\n** Return the number of LookasideSlot elements on the linked list\n*/\nstatic u32 countLookasideSlots(LookasideSlot *p){\n  u32 cnt = 0;\n  while( p ){\n    p = p->pNext;\n    cnt++;\n  }\n  return cnt;\n}\n\n/*\n** Count the number of slots of lookaside memory that are outstanding\n*/\nSQLITE_PRIVATE int sqlite3LookasideUsed(sqlite3 *db, int *pHighwater){\n  u32 nInit = countLookasideSlots(db->lookaside.pInit);\n  u32 nFree = countLookasideSlots(db->lookaside.pFree);\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n  nInit += countLookasideSlots(db->lookaside.pSmallInit);\n  nFree += countLookasideSlots(db->lookaside.pSmallFree);\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n  assert( db->lookaside.nSlot >= nInit+nFree );\n  if( pHighwater ) *pHighwater = (int)(db->lookaside.nSlot - nInit);\n  return (int)(db->lookaside.nSlot - (nInit+nFree));\n}\n\n/*\n** Query status information for a single database connection\n*/\nSQLITE_API int sqlite3_db_status64(\n  sqlite3 *db,             /* The database connection whose status is desired */\n  int op,                  /* Status verb */\n  sqlite3_int64 *pCurrent, /* Write current value here */\n  sqlite3_int64 *pHighwtr, /* Write high-water mark here */\n  int resetFlag            /* Reset high-water mark if true */\n){\n  int rc = SQLITE_OK;   /* Return code */\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || pCurrent==0|| pHighwtr==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  switch( op ){\n    case SQLITE_DBSTATUS_LOOKASIDE_USED: {\n      int H = 0;\n      *pCurrent = sqlite3LookasideUsed(db, &H);\n      *pHighwtr = H;\n      if( resetFlag ){\n        LookasideSlot *p = db->lookaside.pFree;\n        if( p ){\n          while( p->pNext ) p = p->pNext;\n          p->pNext = db->lookaside.pInit;\n          db->lookaside.pInit = db->lookaside.pFree;\n          db->lookaside.pFree = 0;\n        }\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n        p = db->lookaside.pSmallFree;\n        if( p ){\n          while( p->pNext ) p = p->pNext;\n          p->pNext = db->lookaside.pSmallInit;\n          db->lookaside.pSmallInit = db->lookaside.pSmallFree;\n          db->lookaside.pSmallFree = 0;\n        }\n#endif\n      }\n      break;\n    }\n\n    case SQLITE_DBSTATUS_LOOKASIDE_HIT:\n    case SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE:\n    case SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: {\n      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_HIT );\n      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE );\n      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL );\n      assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)>=0 );\n      assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)<3 );\n      *pCurrent = 0;\n      *pHighwtr = db->lookaside.anStat[op-SQLITE_DBSTATUS_LOOKASIDE_HIT];\n      if( resetFlag ){\n        db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;\n      }\n      break;\n    }\n\n    /*\n    ** Return an approximation for the amount of memory currently used\n    ** by all pagers associated with the given database connection.  The\n    ** highwater mark is meaningless and is returned as zero.\n    */\n    case SQLITE_DBSTATUS_CACHE_USED_SHARED:\n    case SQLITE_DBSTATUS_CACHE_USED: {\n      sqlite3_int64 totalUsed = 0;\n      int i;\n      sqlite3BtreeEnterAll(db);\n      for(i=0; i<db->nDb; i++){\n        Btree *pBt = db->aDb[i].pBt;\n        if( pBt ){\n          Pager *pPager = sqlite3BtreePager(pBt);\n          int nByte = sqlite3PagerMemUsed(pPager);\n          if( op==SQLITE_DBSTATUS_CACHE_USED_SHARED ){\n            nByte = nByte / sqlite3BtreeConnectionCount(pBt);\n          }\n          totalUsed += nByte;\n        }\n      }\n      sqlite3BtreeLeaveAll(db);\n      *pCurrent = totalUsed;\n      *pHighwtr = 0;\n      break;\n    }\n\n    /*\n    ** *pCurrent gets an accurate estimate of the amount of memory used\n    ** to store the schema for all databases (main, temp, and any ATTACHed\n    ** databases.  *pHighwtr is set to zero.\n    */\n    case SQLITE_DBSTATUS_SCHEMA_USED: {\n      int i;          /* Used to iterate through schemas */\n      int nByte = 0;  /* Used to accumulate return value */\n\n      sqlite3BtreeEnterAll(db);\n      db->pnBytesFreed = &nByte;\n      assert( db->lookaside.pEnd==db->lookaside.pTrueEnd );\n      db->lookaside.pEnd = db->lookaside.pStart;\n      for(i=0; i<db->nDb; i++){\n        Schema *pSchema = db->aDb[i].pSchema;\n        if( ALWAYS(pSchema!=0) ){\n          HashElem *p;\n\n          nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (\n              pSchema->tblHash.count\n            + pSchema->trigHash.count\n            + pSchema->idxHash.count\n            + pSchema->fkeyHash.count\n          );\n          nByte += sqlite3_msize(pSchema->tblHash.ht);\n          nByte += sqlite3_msize(pSchema->trigHash.ht);\n          nByte += sqlite3_msize(pSchema->idxHash.ht);\n          nByte += sqlite3_msize(pSchema->fkeyHash.ht);\n\n          for(p=sqliteHashFirst(&pSchema->trigHash); p; p=sqliteHashNext(p)){\n            sqlite3DeleteTrigger(db, (Trigger*)sqliteHashData(p));\n          }\n          for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){\n            sqlite3DeleteTable(db, (Table *)sqliteHashData(p));\n          }\n        }\n      }\n      db->pnBytesFreed = 0;\n      db->lookaside.pEnd = db->lookaside.pTrueEnd;\n      sqlite3BtreeLeaveAll(db);\n\n      *pHighwtr = 0;\n      *pCurrent = nByte;\n      break;\n    }\n\n    /*\n    ** *pCurrent gets an accurate estimate of the amount of memory used\n    ** to store all prepared statements.\n    ** *pHighwtr is set to zero.\n    */\n    case SQLITE_DBSTATUS_STMT_USED: {\n      struct Vdbe *pVdbe;         /* Used to iterate through VMs */\n      int nByte = 0;              /* Used to accumulate return value */\n\n      db->pnBytesFreed = &nByte;\n      assert( db->lookaside.pEnd==db->lookaside.pTrueEnd );\n      db->lookaside.pEnd = db->lookaside.pStart;\n      for(pVdbe=db->pVdbe; pVdbe; pVdbe=pVdbe->pVNext){\n        sqlite3VdbeDelete(pVdbe);\n      }\n      db->lookaside.pEnd = db->lookaside.pTrueEnd;\n      db->pnBytesFreed = 0;\n\n      *pHighwtr = 0;  /* IMP: R-64479-57858 */\n      *pCurrent = nByte;\n\n      break;\n    }\n\n    /*\n    ** Set *pCurrent to the total cache hits or misses encountered by all\n    ** pagers the database handle is connected to. *pHighwtr is always set\n    ** to zero.\n    */\n    case SQLITE_DBSTATUS_CACHE_SPILL:\n      op = SQLITE_DBSTATUS_CACHE_WRITE+1;\n      /* no break */ deliberate_fall_through\n    case SQLITE_DBSTATUS_CACHE_HIT:\n    case SQLITE_DBSTATUS_CACHE_MISS:\n    case SQLITE_DBSTATUS_CACHE_WRITE:{\n      int i;\n      u64 nRet = 0;\n      assert( SQLITE_DBSTATUS_CACHE_MISS==SQLITE_DBSTATUS_CACHE_HIT+1 );\n      assert( SQLITE_DBSTATUS_CACHE_WRITE==SQLITE_DBSTATUS_CACHE_HIT+2 );\n\n      for(i=0; i<db->nDb; i++){\n        if( db->aDb[i].pBt ){\n          Pager *pPager = sqlite3BtreePager(db->aDb[i].pBt);\n          sqlite3PagerCacheStat(pPager, op, resetFlag, &nRet);\n        }\n      }\n      *pHighwtr = 0; /* IMP: R-42420-56072 */\n                       /* IMP: R-54100-20147 */\n                       /* IMP: R-29431-39229 */\n      *pCurrent = nRet;\n      break;\n    }\n\n    /* Set *pCurrent to the number of bytes that the db database connection\n    ** has spilled to the filesystem in temporary files that could have been\n    ** stored in memory, had sufficient memory been available.\n    ** The *pHighwater is always set to zero.\n    */\n    case SQLITE_DBSTATUS_TEMPBUF_SPILL: {\n      u64 nRet = 0;\n      if( db->aDb[1].pBt ){\n        Pager *pPager = sqlite3BtreePager(db->aDb[1].pBt);\n        sqlite3PagerCacheStat(pPager, SQLITE_DBSTATUS_CACHE_WRITE,\n                              resetFlag, &nRet);\n        nRet *= sqlite3BtreeGetPageSize(db->aDb[1].pBt);\n      }\n      nRet += db->nSpill;\n      if( resetFlag ) db->nSpill = 0;\n      *pHighwtr = 0;\n      *pCurrent = nRet;\n      break;\n    }\n\n    /* Set *pCurrent to non-zero if there are unresolved deferred foreign\n    ** key constraints.  Set *pCurrent to zero if all foreign key constraints\n    ** have been satisfied.  The *pHighwtr is always set to zero.\n    */\n    case SQLITE_DBSTATUS_DEFERRED_FKS: {\n      *pHighwtr = 0;  /* IMP: R-11967-56545 */\n      *pCurrent = db->nDeferredImmCons>0 || db->nDeferredCons>0;\n      break;\n    }\n\n    default: {\n      rc = SQLITE_ERROR;\n    }\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** 32-bit variant of sqlite3_db_status64()\n*/\nSQLITE_API int sqlite3_db_status(\n  sqlite3 *db,             /* The database connection whose status is desired */\n  int op,                  /* Status verb */\n  int *pCurrent,           /* Write current value here */\n  int *pHighwtr,           /* Write high-water mark here */\n  int resetFlag            /* Reset high-water mark if true */\n){\n  sqlite3_int64 C = 0, H = 0;\n  int rc;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || pCurrent==0|| pHighwtr==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  rc = sqlite3_db_status64(db, op, &C, &H, resetFlag);\n  if( rc==0 ){\n    *pCurrent = C & 0x7fffffff;\n    *pHighwtr = H & 0x7fffffff;\n  }\n  return rc;\n}\n\n/************** End of status.c **********************************************/\n/************** Begin file date.c ********************************************/\n/*\n** 2003 October 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement date and time\n** functions for SQLite.\n**\n** There is only one exported symbol in this file - the function\n** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.\n** All other code has file scope.\n**\n** SQLite processes all times and dates as julian day numbers.  The\n** dates and times are stored as the number of days since noon\n** in Greenwich on November 24, 4714 B.C. according to the Gregorian\n** calendar system.\n**\n** 1970-01-01 00:00:00 is JD 2440587.5\n** 2000-01-01 00:00:00 is JD 2451544.5\n**\n** This implementation requires years to be expressed as a 4-digit number\n** which means that only dates between 0000-01-01 and 9999-12-31 can\n** be represented, even though julian day numbers allow a much wider\n** range of dates.\n**\n** The Gregorian calendar system is used for all dates and times,\n** even those that predate the Gregorian calendar.  Historians usually\n** use the julian calendar for dates prior to 1582-10-15 and for some\n** dates afterwards, depending on locale.  Beware of this difference.\n**\n** The conversion algorithms are implemented based on descriptions\n** in the following text:\n**\n**      Jean Meeus\n**      Astronomical Algorithms, 2nd Edition, 1998\n**      ISBN 0-943396-61-1\n**      Willmann-Bell, Inc\n**      Richmond, Virginia (USA)\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdlib.h> */\n/* #include <assert.h> */\n#include <time.h>\n\n#ifndef SQLITE_OMIT_DATETIME_FUNCS\n\n/*\n** The MSVC CRT on Windows CE may not have a localtime() function.\n** So declare a substitute.  The substitute function itself is\n** defined in \"os_win.c\".\n*/\n#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \\\n    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)\nstruct tm *__cdecl localtime(const time_t *);\n#endif\n\n/*\n** A structure for holding a single date and time.\n*/\ntypedef struct DateTime DateTime;\nstruct DateTime {\n  sqlite3_int64 iJD;  /* The julian day number times 86400000 */\n  int Y, M, D;        /* Year, month, and day */\n  int h, m;           /* Hour and minutes */\n  int tz;             /* Timezone offset in minutes */\n  double s;           /* Seconds */\n  char validJD;       /* True (1) if iJD is valid */\n  char validYMD;      /* True (1) if Y,M,D are valid */\n  char validHMS;      /* True (1) if h,m,s are valid */\n  char nFloor;            /* Days to implement \"floor\" */\n  unsigned rawS      : 1; /* Raw numeric value stored in s */\n  unsigned isError   : 1; /* An overflow has occurred */\n  unsigned useSubsec : 1; /* Display subsecond precision */\n  unsigned isUtc     : 1; /* Time is known to be UTC */\n  unsigned isLocal   : 1; /* Time is known to be localtime */\n};\n\n\n/*\n** Convert zDate into one or more integers according to the conversion\n** specifier zFormat.\n**\n** zFormat[] contains 4 characters for each integer converted, except for\n** the last integer which is specified by three characters.  The meaning\n** of a four-character format specifiers ABCD is:\n**\n**    A:   number of digits to convert.  Always \"2\" or \"4\".\n**    B:   minimum value.  Always \"0\" or \"1\".\n**    C:   maximum value, decoded as:\n**           a:  12\n**           b:  14\n**           c:  24\n**           d:  31\n**           e:  59\n**           f:  9999\n**    D:   the separator character, or \\000 to indicate this is the\n**         last number to convert.\n**\n** Example:  To translate an ISO-8601 date YYYY-MM-DD, the format would\n** be \"40f-21a-20c\".  The \"40f-\" indicates the 4-digit year followed by \"-\".\n** The \"21a-\" indicates the 2-digit month followed by \"-\".  The \"20c\" indicates\n** the 2-digit day which is the last integer in the set.\n**\n** The function returns the number of successful conversions.\n*/\nstatic int getDigits(const char *zDate, const char *zFormat, ...){\n  /* The aMx[] array translates the 3rd character of each format\n  ** spec into a max size:    a   b   c   d   e      f */\n  static const u16 aMx[] = { 12, 14, 24, 31, 59, 14712 };\n  va_list ap;\n  int cnt = 0;\n  char nextC;\n  va_start(ap, zFormat);\n  do{\n    char N = zFormat[0] - '0';\n    char min = zFormat[1] - '0';\n    int val = 0;\n    u16 max;\n\n    assert( zFormat[2]>='a' && zFormat[2]<='f' );\n    max = aMx[zFormat[2] - 'a'];\n    nextC = zFormat[3];\n    val = 0;\n    while( N-- ){\n      if( !sqlite3Isdigit(*zDate) ){\n        goto end_getDigits;\n      }\n      val = val*10 + *zDate - '0';\n      zDate++;\n    }\n    if( val<(int)min || val>(int)max || (nextC!=0 && nextC!=*zDate) ){\n      goto end_getDigits;\n    }\n    *va_arg(ap,int*) = val;\n    zDate++;\n    cnt++;\n    zFormat += 4;\n  }while( nextC );\nend_getDigits:\n  va_end(ap);\n  return cnt;\n}\n\n/*\n** Parse a timezone extension on the end of a date-time.\n** The extension is of the form:\n**\n**        (+/-)HH:MM\n**\n** Or the \"zulu\" notation:\n**\n**        Z\n**\n** If the parse is successful, write the number of minutes\n** of change in p->tz and return 0.  If a parser error occurs,\n** return non-zero.\n**\n** A missing specifier is not considered an error.\n*/\nstatic int parseTimezone(const char *zDate, DateTime *p){\n  int sgn = 0;\n  int nHr, nMn;\n  int c;\n  while( sqlite3Isspace(*zDate) ){ zDate++; }\n  p->tz = 0;\n  c = *zDate;\n  if( c=='-' ){\n    sgn = -1;\n  }else if( c=='+' ){\n    sgn = +1;\n  }else if( c=='Z' || c=='z' ){\n    zDate++;\n    p->isLocal = 0;\n    p->isUtc = 1;\n    goto zulu_time;\n  }else{\n    return c!=0;\n  }\n  zDate++;\n  if( getDigits(zDate, \"20b:20e\", &nHr, &nMn)!=2 ){\n    return 1;\n  }\n  zDate += 5;\n  p->tz = sgn*(nMn + nHr*60);\n  if( p->tz==0 ){   /* Forum post 2025-09-17T10:12:14z */\n    p->isLocal = 0;\n    p->isUtc = 1;\n  }\nzulu_time:\n  while( sqlite3Isspace(*zDate) ){ zDate++; }\n  return *zDate!=0;\n}\n\n/*\n** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.\n** The HH, MM, and SS must each be exactly 2 digits.  The\n** fractional seconds FFFF can be one or more digits.\n**\n** Return 1 if there is a parsing error and 0 on success.\n*/\nstatic int parseHhMmSs(const char *zDate, DateTime *p){\n  int h, m, s;\n  double ms = 0.0;\n  if( getDigits(zDate, \"20c:20e\", &h, &m)!=2 ){\n    return 1;\n  }\n  zDate += 5;\n  if( *zDate==':' ){\n    zDate++;\n    if( getDigits(zDate, \"20e\", &s)!=1 ){\n      return 1;\n    }\n    zDate += 2;\n    if( *zDate=='.' && sqlite3Isdigit(zDate[1]) ){\n      double rScale = 1.0;\n      zDate++;\n      while( sqlite3Isdigit(*zDate) ){\n        ms = ms*10.0 + *zDate - '0';\n        rScale *= 10.0;\n        zDate++;\n      }\n      ms /= rScale;\n      /* Truncate to avoid problems with sub-milliseconds\n      ** rounding. https://sqlite.org/forum/forumpost/766a2c9231 */\n      if( ms>0.999 ) ms = 0.999;\n    }\n  }else{\n    s = 0;\n  }\n  p->validJD = 0;\n  p->rawS = 0;\n  p->validHMS = 1;\n  p->h = h;\n  p->m = m;\n  p->s = s + ms;\n  if( parseTimezone(zDate, p) ) return 1;\n  return 0;\n}\n\n/*\n** Put the DateTime object into its error state.\n*/\nstatic void datetimeError(DateTime *p){\n  memset(p, 0, sizeof(*p));\n  p->isError = 1;\n}\n\n/*\n** Convert from YYYY-MM-DD HH:MM:SS to julian day.  We always assume\n** that the YYYY-MM-DD is according to the Gregorian calendar.\n**\n** Reference:  Meeus page 61\n*/\nstatic void computeJD(DateTime *p){\n  int Y, M, D, A, B, X1, X2;\n\n  if( p->validJD ) return;\n  if( p->validYMD ){\n    Y = p->Y;\n    M = p->M;\n    D = p->D;\n  }else{\n    Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */\n    M = 1;\n    D = 1;\n  }\n  if( Y<-4713 || Y>9999 || p->rawS ){\n    datetimeError(p);\n    return;\n  }\n  if( M<=2 ){\n    Y--;\n    M += 12;\n  }\n  A = (Y+4800)/100;\n  B = 38 - A + (A/4);\n  X1 = 36525*(Y+4716)/100;\n  X2 = 306001*(M+1)/10000;\n  p->iJD = (sqlite3_int64)((X1 + X2 + D + B - 1524.5 ) * 86400000);\n  p->validJD = 1;\n  if( p->validHMS ){\n    p->iJD += p->h*3600000 + p->m*60000 + (sqlite3_int64)(p->s*1000 + 0.5);\n    if( p->tz ){\n      p->iJD -= p->tz*60000;\n      p->validYMD = 0;\n      p->validHMS = 0;\n      p->tz = 0;\n      p->isUtc = 1;\n      p->isLocal = 0;\n    }\n  }\n}\n\n/*\n** Given the YYYY-MM-DD information current in p, determine if there\n** is day-of-month overflow and set nFloor to the number of days that\n** would need to be subtracted from the date in order to bring the\n** date back to the end of the month.\n*/\nstatic void computeFloor(DateTime *p){\n  assert( p->validYMD || p->isError );\n  assert( p->D>=0 && p->D<=31 );\n  assert( p->M>=0 && p->M<=12 );\n  if( p->D<=28 ){\n    p->nFloor = 0;\n  }else if( (1<<p->M) & 0x15aa ){\n    p->nFloor = 0;\n  }else if( p->M!=2 ){\n    p->nFloor = (p->D==31);\n  }else if( p->Y%4!=0 || (p->Y%100==0 && p->Y%400!=0) ){\n    p->nFloor = p->D - 28;\n  }else{\n    p->nFloor = p->D - 29;\n  }\n}\n\n/*\n** Parse dates of the form\n**\n**     YYYY-MM-DD HH:MM:SS.FFF\n**     YYYY-MM-DD HH:MM:SS\n**     YYYY-MM-DD HH:MM\n**     YYYY-MM-DD\n**\n** Write the result into the DateTime structure and return 0\n** on success and 1 if the input string is not a well-formed\n** date.\n*/\nstatic int parseYyyyMmDd(const char *zDate, DateTime *p){\n  int Y, M, D, neg;\n\n  if( zDate[0]=='-' ){\n    zDate++;\n    neg = 1;\n  }else{\n    neg = 0;\n  }\n  if( getDigits(zDate, \"40f-21a-21d\", &Y, &M, &D)!=3 ){\n    return 1;\n  }\n  zDate += 10;\n  while( sqlite3Isspace(*zDate) || 'T'==*(u8*)zDate ){ zDate++; }\n  if( parseHhMmSs(zDate, p)==0 ){\n    /* We got the time */\n  }else if( *zDate==0 ){\n    p->validHMS = 0;\n  }else{\n    return 1;\n  }\n  p->validJD = 0;\n  p->validYMD = 1;\n  p->Y = neg ? -Y : Y;\n  p->M = M;\n  p->D = D;\n  computeFloor(p);\n  if( p->tz ){\n    computeJD(p);\n  }\n  return 0;\n}\n\n\nstatic void clearYMD_HMS_TZ(DateTime *p);  /* Forward declaration */\n\n/*\n** Set the time to the current time reported by the VFS.\n**\n** Return the number of errors.\n*/\nstatic int setDateTimeToCurrent(sqlite3_context *context, DateTime *p){\n  p->iJD = sqlite3StmtCurrentTime(context);\n  if( p->iJD>0 ){\n    p->validJD = 1;\n    p->isUtc = 1;\n    p->isLocal = 0;\n    clearYMD_HMS_TZ(p);\n    return 0;\n  }else{\n    return 1;\n  }\n}\n\n/*\n** Input \"r\" is a numeric quantity which might be a julian day number,\n** or the number of seconds since 1970.  If the value if r is within\n** range of a julian day number, install it as such and set validJD.\n** If the value is a valid unix timestamp, put it in p->s and set p->rawS.\n*/\nstatic void setRawDateNumber(DateTime *p, double r){\n  p->s = r;\n  p->rawS = 1;\n  if( r>=0.0 && r<5373484.5 ){\n    p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);\n    p->validJD = 1;\n  }\n}\n\n/*\n** Attempt to parse the given string into a julian day number.  Return\n** the number of errors.\n**\n** The following are acceptable forms for the input string:\n**\n**      YYYY-MM-DD HH:MM:SS.FFF  +/-HH:MM\n**      DDDD.DD\n**      now\n**\n** In the first form, the +/-HH:MM is always optional.  The fractional\n** seconds extension (the \".FFF\") is optional.  The seconds portion\n** (\":SS.FFF\") is option.  The year and date can be omitted as long\n** as there is a time string.  The time string can be omitted as long\n** as there is a year and date.\n*/\nstatic int parseDateOrTime(\n  sqlite3_context *context,\n  const char *zDate,\n  DateTime *p\n){\n  double r;\n  if( parseYyyyMmDd(zDate,p)==0 ){\n    return 0;\n  }else if( parseHhMmSs(zDate, p)==0 ){\n    return 0;\n  }else if( sqlite3StrICmp(zDate,\"now\")==0 && sqlite3NotPureFunc(context) ){\n    return setDateTimeToCurrent(context, p);\n  }else if( sqlite3AtoF(zDate, &r, sqlite3Strlen30(zDate), SQLITE_UTF8)>0 ){\n    setRawDateNumber(p, r);\n    return 0;\n  }else if( (sqlite3StrICmp(zDate,\"subsec\")==0\n             || sqlite3StrICmp(zDate,\"subsecond\")==0)\n           && sqlite3NotPureFunc(context) ){\n    p->useSubsec = 1;\n    return setDateTimeToCurrent(context, p);\n  }\n  return 1;\n}\n\n/* The julian day number for 9999-12-31 23:59:59.999 is 5373484.4999999.\n** Multiplying this by 86400000 gives 464269060799999 as the maximum value\n** for DateTime.iJD.\n**\n** But some older compilers (ex: gcc 4.2.1 on older Macs) cannot deal with\n** such a large integer literal, so we have to encode it.\n*/\n#define INT_464269060799999  ((((i64)0x1a640)<<32)|0x1072fdff)\n\n/*\n** Return TRUE if the given julian day number is within range.\n**\n** The input is the JulianDay times 86400000.\n*/\nstatic int validJulianDay(sqlite3_int64 iJD){\n  return iJD>=0 && iJD<=INT_464269060799999;\n}\n\n/*\n** Compute the Year, Month, and Day from the julian day number.\n*/\nstatic void computeYMD(DateTime *p){\n  int Z, alpha, A, B, C, D, E, X1;\n  if( p->validYMD ) return;\n  if( !p->validJD ){\n    p->Y = 2000;\n    p->M = 1;\n    p->D = 1;\n  }else if( !validJulianDay(p->iJD) ){\n    datetimeError(p);\n    return;\n  }else{\n    Z = (int)((p->iJD + 43200000)/86400000);\n    alpha = (int)((Z + 32044.75)/36524.25) - 52;\n    A = Z + 1 + alpha - ((alpha+100)/4) + 25;\n    B = A + 1524;\n    C = (int)((B - 122.1)/365.25);\n    D = (36525*(C&32767))/100;\n    E = (int)((B-D)/30.6001);\n    X1 = (int)(30.6001*E);\n    p->D = B - D - X1;\n    p->M = E<14 ? E-1 : E-13;\n    p->Y = p->M>2 ? C - 4716 : C - 4715;\n  }\n  p->validYMD = 1;\n}\n\n/*\n** Compute the Hour, Minute, and Seconds from the julian day number.\n*/\nstatic void computeHMS(DateTime *p){\n  int day_ms, day_min; /* milliseconds, minutes into the day */\n  if( p->validHMS ) return;\n  computeJD(p);\n  day_ms = (int)((p->iJD + 43200000) % 86400000);\n  p->s = (day_ms % 60000)/1000.0;\n  day_min = day_ms/60000;\n  p->m = day_min % 60;\n  p->h = day_min / 60;\n  p->rawS = 0;\n  p->validHMS = 1;\n}\n\n/*\n** Compute both YMD and HMS\n*/\nstatic void computeYMD_HMS(DateTime *p){\n  computeYMD(p);\n  computeHMS(p);\n}\n\n/*\n** Clear the YMD and HMS and the TZ\n*/\nstatic void clearYMD_HMS_TZ(DateTime *p){\n  p->validYMD = 0;\n  p->validHMS = 0;\n  p->tz = 0;\n}\n\n#ifndef SQLITE_OMIT_LOCALTIME\n/*\n** On recent Windows platforms, the localtime_s() function is available\n** as part of the \"Secure CRT\". It is essentially equivalent to\n** localtime_r() available under most POSIX platforms, except that the\n** order of the parameters is reversed.\n**\n** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.\n**\n** If the user has not indicated to use localtime_r() or localtime_s()\n** already, check for an MSVC build environment that provides\n** localtime_s().\n*/\n#if !HAVE_LOCALTIME_R && !HAVE_LOCALTIME_S \\\n    && defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)\n#undef  HAVE_LOCALTIME_S\n#define HAVE_LOCALTIME_S 1\n#endif\n\n/*\n** The following routine implements the rough equivalent of localtime_r()\n** using whatever operating-system specific localtime facility that\n** is available.  This routine returns 0 on success and\n** non-zero on any kind of error.\n**\n** If the sqlite3GlobalConfig.bLocaltimeFault variable is non-zero then this\n** routine will always fail.  If bLocaltimeFault is nonzero and\n** sqlite3GlobalConfig.xAltLocaltime is not NULL, then xAltLocaltime() is\n** invoked in place of the OS-defined localtime() function.\n**\n** EVIDENCE-OF: R-62172-00036 In this implementation, the standard C\n** library function localtime_r() is used to assist in the calculation of\n** local time.\n*/\nstatic int osLocaltime(time_t *t, struct tm *pTm){\n  int rc;\n#if !HAVE_LOCALTIME_R && !HAVE_LOCALTIME_S\n  struct tm *pX;\n#if SQLITE_THREADSAFE>0\n  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n  sqlite3_mutex_enter(mutex);\n  pX = localtime(t);\n#ifndef SQLITE_UNTESTABLE\n  if( sqlite3GlobalConfig.bLocaltimeFault ){\n    if( sqlite3GlobalConfig.xAltLocaltime!=0\n     && 0==sqlite3GlobalConfig.xAltLocaltime((const void*)t,(void*)pTm)\n    ){\n      pX = pTm;\n    }else{\n      pX = 0;\n    }\n  }\n#endif\n  if( pX ) *pTm = *pX;\n#if SQLITE_THREADSAFE>0\n  sqlite3_mutex_leave(mutex);\n#endif\n  rc = pX==0;\n#else\n#ifndef SQLITE_UNTESTABLE\n  if( sqlite3GlobalConfig.bLocaltimeFault ){\n    if( sqlite3GlobalConfig.xAltLocaltime!=0 ){\n      return sqlite3GlobalConfig.xAltLocaltime((const void*)t,(void*)pTm);\n    }else{\n      return 1;\n    }\n  }\n#endif\n#if HAVE_LOCALTIME_R\n  rc = localtime_r(t, pTm)==0;\n#else\n  rc = localtime_s(pTm, t);\n#endif /* HAVE_LOCALTIME_R */\n#endif /* HAVE_LOCALTIME_R || HAVE_LOCALTIME_S */\n  return rc;\n}\n#endif /* SQLITE_OMIT_LOCALTIME */\n\n\n#ifndef SQLITE_OMIT_LOCALTIME\n/*\n** Assuming the input DateTime is UTC, move it to its localtime equivalent.\n*/\nstatic int toLocaltime(\n  DateTime *p,                   /* Date at which to calculate offset */\n  sqlite3_context *pCtx          /* Write error here if one occurs */\n){\n  time_t t;\n  struct tm sLocal;\n  int iYearDiff;\n\n  /* Initialize the contents of sLocal to avoid a compiler warning. */\n  memset(&sLocal, 0, sizeof(sLocal));\n\n  computeJD(p);\n  if( p->iJD<2108667600*(i64)100000 /* 1970-01-01 */\n   || p->iJD>2130141456*(i64)100000 /* 2038-01-18 */\n  ){\n    /* EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only\n    ** works for years between 1970 and 2037. For dates outside this range,\n    ** SQLite attempts to map the year into an equivalent year within this\n    ** range, do the calculation, then map the year back.\n    */\n    DateTime x = *p;\n    computeYMD_HMS(&x);\n    iYearDiff = (2000 + x.Y%4) - x.Y;\n    x.Y += iYearDiff;\n    x.validJD = 0;\n    computeJD(&x);\n    t = (time_t)(x.iJD/1000 -  21086676*(i64)10000);\n  }else{\n    iYearDiff = 0;\n    t = (time_t)(p->iJD/1000 -  21086676*(i64)10000);\n  }\n  if( osLocaltime(&t, &sLocal) ){\n    sqlite3_result_error(pCtx, \"local time unavailable\", -1);\n    return SQLITE_ERROR;\n  }\n  p->Y = sLocal.tm_year + 1900 - iYearDiff;\n  p->M = sLocal.tm_mon + 1;\n  p->D = sLocal.tm_mday;\n  p->h = sLocal.tm_hour;\n  p->m = sLocal.tm_min;\n  p->s = sLocal.tm_sec + (p->iJD%1000)*0.001;\n  p->validYMD = 1;\n  p->validHMS = 1;\n  p->validJD = 0;\n  p->rawS = 0;\n  p->tz = 0;\n  p->isError = 0;\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OMIT_LOCALTIME */\n\n/*\n** The following table defines various date transformations of the form\n**\n**            'NNN days'\n**\n** Where NNN is an arbitrary floating-point number and \"days\" can be one\n** of several units of time.\n*/\nstatic const struct {\n  u8 nName;           /* Length of the name */\n  char zName[7];      /* Name of the transformation */\n  float rLimit;       /* Maximum NNN value for this transform */\n  float rXform;       /* Constant used for this transform */\n} aXformType[] = {\n  /* 0 */ { 6, \"second\",   4.6427e+14,         1.0  },\n  /* 1 */ { 6, \"minute\",   7.7379e+12,        60.0  },\n  /* 2 */ { 4, \"hour\",     1.2897e+11,      3600.0  },\n  /* 3 */ { 3, \"day\",      5373485.0,      86400.0  },\n  /* 4 */ { 5, \"month\",    176546.0,     2592000.0  },\n  /* 5 */ { 4, \"year\",     14713.0,     31536000.0  },\n};\n\n/*\n** If the DateTime p is raw number, try to figure out if it is\n** a julian day number of a unix timestamp.  Set the p value\n** appropriately.\n*/\nstatic void autoAdjustDate(DateTime *p){\n  if( !p->rawS || p->validJD ){\n    p->rawS = 0;\n  }else if( p->s>=-21086676*(i64)10000        /* -4713-11-24 12:00:00 */\n         && p->s<=(25340230*(i64)10000)+799   /*  9999-12-31 23:59:59 */\n  ){\n    double r = p->s*1000.0 + 210866760000000.0;\n    clearYMD_HMS_TZ(p);\n    p->iJD = (sqlite3_int64)(r + 0.5);\n    p->validJD = 1;\n    p->rawS = 0;\n  }\n}\n\n/*\n** Process a modifier to a date-time stamp.  The modifiers are\n** as follows:\n**\n**     NNN days\n**     NNN hours\n**     NNN minutes\n**     NNN.NNNN seconds\n**     NNN months\n**     NNN years\n**     +/-YYYY-MM-DD HH:MM:SS.SSS\n**     ceiling\n**     floor\n**     start of month\n**     start of year\n**     start of week\n**     start of day\n**     weekday N\n**     unixepoch\n**     auto\n**     localtime\n**     utc\n**     subsec\n**     subsecond\n**\n** Return 0 on success and 1 if there is any kind of error. If the error\n** is in a system call (i.e. localtime()), then an error message is written\n** to context pCtx. If the error is an unrecognized modifier, no error is\n** written to pCtx.\n*/\nstatic int parseModifier(\n  sqlite3_context *pCtx,      /* Function context */\n  const char *z,              /* The text of the modifier */\n  int n,                      /* Length of zMod in bytes */\n  DateTime *p,                /* The date/time value to be modified */\n  int idx                     /* Parameter index of the modifier */\n){\n  int rc = 1;\n  double r;\n  switch(sqlite3UpperToLower[(u8)z[0]] ){\n    case 'a': {\n      /*\n      **    auto\n      **\n      ** If rawS is available, then interpret as a julian day number, or\n      ** a unix timestamp, depending on its magnitude.\n      */\n      if( sqlite3_stricmp(z, \"auto\")==0 ){\n        if( idx>1 ) return 1; /* IMP: R-33611-57934 */\n        autoAdjustDate(p);\n        rc = 0;\n      }\n      break;\n    }\n    case 'c': {\n      /*\n      **    ceiling\n      **\n      ** Resolve day-of-month overflow by rolling forward into the next\n      ** month.  As this is the default action, this modifier is really\n      ** a no-op that is only included for symmetry.  See \"floor\".\n      */\n      if( sqlite3_stricmp(z, \"ceiling\")==0 ){\n        computeJD(p);\n        clearYMD_HMS_TZ(p);\n        rc = 0;\n        p->nFloor = 0;\n      }\n      break;\n    }\n    case 'f': {\n      /*\n      **    floor\n      **\n      ** Resolve day-of-month overflow by rolling back to the end of the\n      ** previous month.\n      */\n      if( sqlite3_stricmp(z, \"floor\")==0 ){\n        computeJD(p);\n        p->iJD -= p->nFloor*86400000;\n        clearYMD_HMS_TZ(p);\n        rc = 0;\n      }\n      break;\n    }\n    case 'j': {\n      /*\n      **    julianday\n      **\n      ** Always interpret the prior number as a julian-day value.  If this\n      ** is not the first modifier, or if the prior argument is not a numeric\n      ** value in the allowed range of julian day numbers understood by\n      ** SQLite (0..5373484.5) then the result will be NULL.\n      */\n      if( sqlite3_stricmp(z, \"julianday\")==0 ){\n        if( idx>1 ) return 1;  /* IMP: R-31176-64601 */\n        if( p->validJD && p->rawS ){\n          rc = 0;\n          p->rawS = 0;\n        }\n      }\n      break;\n    }\n#ifndef SQLITE_OMIT_LOCALTIME\n    case 'l': {\n      /*    localtime\n      **\n      ** Assuming the current time value is UTC (a.k.a. GMT), shift it to\n      ** show local time.\n      */\n      if( sqlite3_stricmp(z, \"localtime\")==0 && sqlite3NotPureFunc(pCtx) ){\n        rc = p->isLocal ? SQLITE_OK : toLocaltime(p, pCtx);\n        p->isUtc = 0;\n        p->isLocal = 1;\n      }\n      break;\n    }\n#endif\n    case 'u': {\n      /*\n      **    unixepoch\n      **\n      ** Treat the current value of p->s as the number of\n      ** seconds since 1970.  Convert to a real julian day number.\n      */\n      if( sqlite3_stricmp(z, \"unixepoch\")==0 && p->rawS ){\n        if( idx>1 ) return 1;  /* IMP: R-49255-55373 */\n        r = p->s*1000.0 + 210866760000000.0;\n        if( r>=0.0 && r<464269060800000.0 ){\n          clearYMD_HMS_TZ(p);\n          p->iJD = (sqlite3_int64)(r + 0.5);\n          p->validJD = 1;\n          p->rawS = 0;\n          rc = 0;\n        }\n      }\n#ifndef SQLITE_OMIT_LOCALTIME\n      else if( sqlite3_stricmp(z, \"utc\")==0 && sqlite3NotPureFunc(pCtx) ){\n        if( p->isUtc==0 ){\n          i64 iOrigJD;              /* Original localtime */\n          i64 iGuess;               /* Guess at the corresponding utc time */\n          int cnt = 0;              /* Safety to prevent infinite loop */\n          i64 iErr;                 /* Guess is off by this much */\n\n          computeJD(p);\n          iGuess = iOrigJD = p->iJD;\n          iErr = 0;\n          do{\n            DateTime new;\n            memset(&new, 0, sizeof(new));\n            iGuess -= iErr;\n            new.iJD = iGuess;\n            new.validJD = 1;\n            rc = toLocaltime(&new, pCtx);\n            if( rc ) return rc;\n            computeJD(&new);\n            iErr = new.iJD - iOrigJD;\n          }while( iErr && cnt++<3 );\n          memset(p, 0, sizeof(*p));\n          p->iJD = iGuess;\n          p->validJD = 1;\n          p->isUtc = 1;\n          p->isLocal = 0;\n        }\n        rc = SQLITE_OK;\n      }\n#endif\n      break;\n    }\n    case 'w': {\n      /*\n      **    weekday N\n      **\n      ** Move the date to the same time on the next occurrence of\n      ** weekday N where 0==Sunday, 1==Monday, and so forth.  If the\n      ** date is already on the appropriate weekday, this is a no-op.\n      */\n      if( sqlite3_strnicmp(z, \"weekday \", 8)==0\n               && sqlite3AtoF(&z[8], &r, sqlite3Strlen30(&z[8]), SQLITE_UTF8)>0\n               && r>=0.0 && r<7.0 && (n=(int)r)==r ){\n        sqlite3_int64 Z;\n        computeYMD_HMS(p);\n        p->tz = 0;\n        p->validJD = 0;\n        computeJD(p);\n        Z = ((p->iJD + 129600000)/86400000) % 7;\n        if( Z>n ) Z -= 7;\n        p->iJD += (n - Z)*86400000;\n        clearYMD_HMS_TZ(p);\n        rc = 0;\n      }\n      break;\n    }\n    case 's': {\n      /*\n      **    start of TTTTT\n      **\n      ** Move the date backwards to the beginning of the current day,\n      ** or month or year.\n      **\n      **    subsecond\n      **    subsec\n      **\n      ** Show subsecond precision in the output of datetime() and\n      ** unixepoch() and strftime('%s').\n      */\n      if( sqlite3_strnicmp(z, \"start of \", 9)!=0 ){\n        if( sqlite3_stricmp(z, \"subsec\")==0\n         || sqlite3_stricmp(z, \"subsecond\")==0\n        ){\n          p->useSubsec = 1;\n          rc = 0;\n        }\n        break;\n      }\n      if( !p->validJD && !p->validYMD && !p->validHMS ) break;\n      z += 9;\n      computeYMD(p);\n      p->validHMS = 1;\n      p->h = p->m = 0;\n      p->s = 0.0;\n      p->rawS = 0;\n      p->tz = 0;\n      p->validJD = 0;\n      if( sqlite3_stricmp(z,\"month\")==0 ){\n        p->D = 1;\n        rc = 0;\n      }else if( sqlite3_stricmp(z,\"year\")==0 ){\n        p->M = 1;\n        p->D = 1;\n        rc = 0;\n      }else if( sqlite3_stricmp(z,\"day\")==0 ){\n        rc = 0;\n      }\n      break;\n    }\n    case '+':\n    case '-':\n    case '0':\n    case '1':\n    case '2':\n    case '3':\n    case '4':\n    case '5':\n    case '6':\n    case '7':\n    case '8':\n    case '9': {\n      double rRounder;\n      int i;\n      int Y,M,D,h,m,x;\n      const char *z2 = z;\n      char z0 = z[0];\n      for(n=1; z[n]; n++){\n        if( z[n]==':' ) break;\n        if( sqlite3Isspace(z[n]) ) break;\n        if( z[n]=='-' ){\n          if( n==5 && getDigits(&z[1], \"40f\", &Y)==1 ) break;\n          if( n==6 && getDigits(&z[1], \"50f\", &Y)==1 ) break;\n        }\n      }\n      if( sqlite3AtoF(z, &r, n, SQLITE_UTF8)<=0 ){\n        assert( rc==1 );\n        break;\n      }\n      if( z[n]=='-' ){\n        /* A modifier of the form (+|-)YYYY-MM-DD adds or subtracts the\n        ** specified number of years, months, and days.  MM is limited to\n        ** the range 0-11 and DD is limited to 0-30.\n        */\n        if( z0!='+' && z0!='-' ) break;  /* Must start with +/- */\n        if( n==5 ){\n          if( getDigits(&z[1], \"40f-20a-20d\", &Y, &M, &D)!=3 ) break;\n        }else{\n          assert( n==6 );\n          if( getDigits(&z[1], \"50f-20a-20d\", &Y, &M, &D)!=3 ) break;\n          z++;\n        }\n        if( M>=12 ) break;                   /* M range 0..11 */\n        if( D>=31 ) break;                   /* D range 0..30 */\n        computeYMD_HMS(p);\n        p->validJD = 0;\n        if( z0=='-' ){\n          p->Y -= Y;\n          p->M -= M;\n          D = -D;\n        }else{\n          p->Y += Y;\n          p->M += M;\n        }\n        x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;\n        p->Y += x;\n        p->M -= x*12;\n        computeFloor(p);\n        computeJD(p);\n        p->validHMS = 0;\n        p->validYMD = 0;\n        p->iJD += (i64)D*86400000;\n        if( z[11]==0 ){\n          rc = 0;\n          break;\n        }\n        if( sqlite3Isspace(z[11])\n         && getDigits(&z[12], \"20c:20e\", &h, &m)==2\n        ){\n          z2 = &z[12];\n          n = 2;\n        }else{\n          break;\n        }\n      }\n      if( z2[n]==':' ){\n        /* A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the\n        ** specified number of hours, minutes, seconds, and fractional seconds\n        ** to the time.  The \".FFF\" may be omitted.  The \":SS.FFF\" may be\n        ** omitted.\n        */\n\n        DateTime tx;\n        sqlite3_int64 day;\n        if( !sqlite3Isdigit(*z2) ) z2++;\n        memset(&tx, 0, sizeof(tx));\n        if( parseHhMmSs(z2, &tx) ) break;\n        computeJD(&tx);\n        tx.iJD -= 43200000;\n        day = tx.iJD/86400000;\n        tx.iJD -= day*86400000;\n        if( z0=='-' ) tx.iJD = -tx.iJD;\n        computeJD(p);\n        clearYMD_HMS_TZ(p);\n        p->iJD += tx.iJD;\n        rc = 0;\n        break;\n      }\n\n      /* If control reaches this point, it means the transformation is\n      ** one of the forms like \"+NNN days\".  */\n      z += n;\n      while( sqlite3Isspace(*z) ) z++;\n      n = sqlite3Strlen30(z);\n      if( n<3 || n>10 ) break;\n      if( sqlite3UpperToLower[(u8)z[n-1]]=='s' ) n--;\n      computeJD(p);\n      assert( rc==1 );\n      rRounder = r<0 ? -0.5 : +0.5;\n      p->nFloor = 0;\n      for(i=0; i<ArraySize(aXformType); i++){\n        if( aXformType[i].nName==n\n         && sqlite3_strnicmp(aXformType[i].zName, z, n)==0\n         && r>-aXformType[i].rLimit && r<aXformType[i].rLimit\n        ){\n          switch( i ){\n            case 4: { /* Special processing to add months */\n              assert( strcmp(aXformType[4].zName,\"month\")==0 );\n              computeYMD_HMS(p);\n              p->M += (int)r;\n              x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;\n              p->Y += x;\n              p->M -= x*12;\n              computeFloor(p);\n              p->validJD = 0;\n              r -= (int)r;\n              break;\n            }\n            case 5: { /* Special processing to add years */\n              int y = (int)r;\n              assert( strcmp(aXformType[5].zName,\"year\")==0 );\n              computeYMD_HMS(p);\n              assert( p->M>=0 && p->M<=12 );\n              p->Y += y;\n              computeFloor(p);\n              p->validJD = 0;\n              r -= (int)r;\n              break;\n            }\n          }\n          computeJD(p);\n          p->iJD += (sqlite3_int64)(r*1000.0*aXformType[i].rXform + rRounder);\n          rc = 0;\n          break;\n        }\n      }\n      clearYMD_HMS_TZ(p);\n      break;\n    }\n    default: {\n      break;\n    }\n  }\n  return rc;\n}\n\n/*\n** Process time function arguments.  argv[0] is a date-time stamp.\n** argv[1] and following are modifiers.  Parse them all and write\n** the resulting time into the DateTime structure p.  Return 0\n** on success and 1 if there are any errors.\n**\n** If there are zero parameters (if even argv[0] is undefined)\n** then assume a default value of \"now\" for argv[0].\n*/\nstatic int isDate(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv,\n  DateTime *p\n){\n  int i, n;\n  const unsigned char *z;\n  int eType;\n  memset(p, 0, sizeof(*p));\n  if( argc==0 ){\n    if( !sqlite3NotPureFunc(context) ) return 1;\n    return setDateTimeToCurrent(context, p);\n  }\n  if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT\n                   || eType==SQLITE_INTEGER ){\n    setRawDateNumber(p, sqlite3_value_double(argv[0]));\n  }else{\n    z = sqlite3_value_text(argv[0]);\n    if( !z || parseDateOrTime(context, (char*)z, p) ){\n      return 1;\n    }\n  }\n  for(i=1; i<argc; i++){\n    z = sqlite3_value_text(argv[i]);\n    n = sqlite3_value_bytes(argv[i]);\n    if( z==0 || parseModifier(context, (char*)z, n, p, i) ) return 1;\n  }\n  computeJD(p);\n  if( p->isError || !validJulianDay(p->iJD) ) return 1;\n  if( argc==1 && p->validYMD && p->D>28 ){\n    /* Make sure a YYYY-MM-DD is normalized.\n    ** Example: 2023-02-31 -> 2023-03-03 */\n    assert( p->validJD );\n    p->validYMD = 0;\n  }\n  return 0;\n}\n\n\n/*\n** The following routines implement the various date and time functions\n** of SQLite.\n*/\n\n/*\n**    julianday( TIMESTRING, MOD, MOD, ...)\n**\n** Return the julian day number of the date specified in the arguments\n*/\nstatic void juliandayFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    computeJD(&x);\n    sqlite3_result_double(context, x.iJD/86400000.0);\n  }\n}\n\n/*\n**    unixepoch( TIMESTRING, MOD, MOD, ...)\n**\n** Return the number of seconds (including fractional seconds) since\n** the unix epoch of 1970-01-01 00:00:00 GMT.\n*/\nstatic void unixepochFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    computeJD(&x);\n    if( x.useSubsec ){\n      sqlite3_result_double(context, (x.iJD - 21086676*(i64)10000000)/1000.0);\n    }else{\n      sqlite3_result_int64(context, x.iJD/1000 - 21086676*(i64)10000);\n    }\n  }\n}\n\n/*\n**    datetime( TIMESTRING, MOD, MOD, ...)\n**\n** Return YYYY-MM-DD HH:MM:SS\n*/\nstatic void datetimeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    int Y, s, n;\n    char zBuf[32];\n    computeYMD_HMS(&x);\n    Y = x.Y;\n    if( Y<0 ) Y = -Y;\n    zBuf[1] = '0' + (Y/1000)%10;\n    zBuf[2] = '0' + (Y/100)%10;\n    zBuf[3] = '0' + (Y/10)%10;\n    zBuf[4] = '0' + (Y)%10;\n    zBuf[5] = '-';\n    zBuf[6] = '0' + (x.M/10)%10;\n    zBuf[7] = '0' + (x.M)%10;\n    zBuf[8] = '-';\n    zBuf[9] = '0' + (x.D/10)%10;\n    zBuf[10] = '0' + (x.D)%10;\n    zBuf[11] = ' ';\n    zBuf[12] = '0' + (x.h/10)%10;\n    zBuf[13] = '0' + (x.h)%10;\n    zBuf[14] = ':';\n    zBuf[15] = '0' + (x.m/10)%10;\n    zBuf[16] = '0' + (x.m)%10;\n    zBuf[17] = ':';\n    if( x.useSubsec ){\n      s = (int)(1000.0*x.s + 0.5);\n      zBuf[18] = '0' + (s/10000)%10;\n      zBuf[19] = '0' + (s/1000)%10;\n      zBuf[20] = '.';\n      zBuf[21] = '0' + (s/100)%10;\n      zBuf[22] = '0' + (s/10)%10;\n      zBuf[23] = '0' + (s)%10;\n      zBuf[24] = 0;\n      n = 24;\n    }else{\n      s = (int)x.s;\n      zBuf[18] = '0' + (s/10)%10;\n      zBuf[19] = '0' + (s)%10;\n      zBuf[20] = 0;\n      n = 20;\n    }\n    if( x.Y<0 ){\n      zBuf[0] = '-';\n      sqlite3_result_text(context, zBuf, n, SQLITE_TRANSIENT);\n    }else{\n      sqlite3_result_text(context, &zBuf[1], n-1, SQLITE_TRANSIENT);\n    }\n  }\n}\n\n/*\n**    time( TIMESTRING, MOD, MOD, ...)\n**\n** Return HH:MM:SS\n*/\nstatic void timeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    int s, n;\n    char zBuf[16];\n    computeHMS(&x);\n    zBuf[0] = '0' + (x.h/10)%10;\n    zBuf[1] = '0' + (x.h)%10;\n    zBuf[2] = ':';\n    zBuf[3] = '0' + (x.m/10)%10;\n    zBuf[4] = '0' + (x.m)%10;\n    zBuf[5] = ':';\n    if( x.useSubsec ){\n      s = (int)(1000.0*x.s + 0.5);\n      zBuf[6] = '0' + (s/10000)%10;\n      zBuf[7] = '0' + (s/1000)%10;\n      zBuf[8] = '.';\n      zBuf[9] = '0' + (s/100)%10;\n      zBuf[10] = '0' + (s/10)%10;\n      zBuf[11] = '0' + (s)%10;\n      zBuf[12] = 0;\n      n = 12;\n    }else{\n      s = (int)x.s;\n      zBuf[6] = '0' + (s/10)%10;\n      zBuf[7] = '0' + (s)%10;\n      zBuf[8] = 0;\n      n = 8;\n    }\n    sqlite3_result_text(context, zBuf, n, SQLITE_TRANSIENT);\n  }\n}\n\n/*\n**    date( TIMESTRING, MOD, MOD, ...)\n**\n** Return YYYY-MM-DD\n*/\nstatic void dateFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    int Y;\n    char zBuf[16];\n    computeYMD(&x);\n    Y = x.Y;\n    if( Y<0 ) Y = -Y;\n    zBuf[1] = '0' + (Y/1000)%10;\n    zBuf[2] = '0' + (Y/100)%10;\n    zBuf[3] = '0' + (Y/10)%10;\n    zBuf[4] = '0' + (Y)%10;\n    zBuf[5] = '-';\n    zBuf[6] = '0' + (x.M/10)%10;\n    zBuf[7] = '0' + (x.M)%10;\n    zBuf[8] = '-';\n    zBuf[9] = '0' + (x.D/10)%10;\n    zBuf[10] = '0' + (x.D)%10;\n    zBuf[11] = 0;\n    if( x.Y<0 ){\n      zBuf[0] = '-';\n      sqlite3_result_text(context, zBuf, 11, SQLITE_TRANSIENT);\n    }else{\n      sqlite3_result_text(context, &zBuf[1], 10, SQLITE_TRANSIENT);\n    }\n  }\n}\n\n/*\n** Compute the number of days after the most recent January 1.\n**\n** In other words, compute the zero-based day number for the\n** current year:\n**\n**   Jan01 = 0,  Jan02 = 1, ..., Jan31 = 30, Feb01 = 31, ...\n**   Dec31 = 364 or 365.\n*/\nstatic int daysAfterJan01(DateTime *pDate){\n  DateTime jan01 = *pDate;\n  assert( jan01.validYMD );\n  assert( jan01.validHMS );\n  assert( pDate->validJD );\n  jan01.validJD = 0;\n  jan01.M = 1;\n  jan01.D = 1;\n  computeJD(&jan01);\n  return (int)((pDate->iJD-jan01.iJD+43200000)/86400000);\n}\n\n/*\n** Return the number of days after the most recent Monday.\n**\n** In other words, return the day of the week according\n** to this code:\n**\n**   0=Monday, 1=Tuesday, 2=Wednesday, ..., 6=Sunday.\n*/\nstatic int daysAfterMonday(DateTime *pDate){\n  assert( pDate->validJD );\n  return (int)((pDate->iJD+43200000)/86400000) % 7;\n}\n\n/*\n** Return the number of days after the most recent Sunday.\n**\n** In other words, return the day of the week according\n** to this code:\n**\n**   0=Sunday, 1=Monday, 2=Tuesday, ..., 6=Saturday\n*/\nstatic int daysAfterSunday(DateTime *pDate){\n  assert( pDate->validJD );\n  return (int)((pDate->iJD+129600000)/86400000) % 7;\n}\n\n/*\n**    strftime( FORMAT, TIMESTRING, MOD, MOD, ...)\n**\n** Return a string described by FORMAT.  Conversions as follows:\n**\n**   %d  day of month  01-31\n**   %e  day of month  1-31\n**   %f  ** fractional seconds  SS.SSS\n**   %F  ISO date.  YYYY-MM-DD\n**   %G  ISO year corresponding to %V 0000-9999.\n**   %g  2-digit ISO year corresponding to %V 00-99\n**   %H  hour 00-24\n**   %k  hour  0-24  (leading zero converted to space)\n**   %I  hour 01-12\n**   %j  day of year 001-366\n**   %J  ** julian day number\n**   %l  hour  1-12  (leading zero converted to space)\n**   %m  month 01-12\n**   %M  minute 00-59\n**   %p  \"AM\" or \"PM\"\n**   %P  \"am\" or \"pm\"\n**   %R  time as HH:MM\n**   %s  seconds since 1970-01-01\n**   %S  seconds 00-59\n**   %T  time as HH:MM:SS\n**   %u  day of week 1-7  Monday==1, Sunday==7\n**   %w  day of week 0-6  Sunday==0, Monday==1\n**   %U  week of year 00-53  (First Sunday is start of week 01)\n**   %V  week of year 01-53  (First week containing Thursday is week 01)\n**   %W  week of year 00-53  (First Monday is start of week 01)\n**   %Y  year 0000-9999\n**   %%  %\n*/\nstatic void strftimeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  size_t i,j;\n  sqlite3 *db;\n  const char *zFmt;\n  sqlite3_str sRes;\n\n\n  if( argc==0 ) return;\n  zFmt = (const char*)sqlite3_value_text(argv[0]);\n  if( zFmt==0 || isDate(context, argc-1, argv+1, &x) ) return;\n  db = sqlite3_context_db_handle(context);\n  sqlite3StrAccumInit(&sRes, 0, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);\n\n  computeJD(&x);\n  computeYMD_HMS(&x);\n  for(i=j=0; zFmt[i]; i++){\n    char cf;\n    if( zFmt[i]!='%' ) continue;\n    if( j<i ) sqlite3_str_append(&sRes, zFmt+j, (int)(i-j));\n    i++;\n    j = i + 1;\n    cf = zFmt[i];\n    switch( cf ){\n      case 'd':  /* Fall thru */\n      case 'e': {\n        sqlite3_str_appendf(&sRes, cf=='d' ? \"%02d\" : \"%2d\", x.D);\n        break;\n      }\n      case 'f': {  /* Fractional seconds.  (Non-standard) */\n        double s = x.s;\n        if( NEVER(s>59.999) ) s = 59.999;\n        sqlite3_str_appendf(&sRes, \"%06.3f\", s);\n        break;\n      }\n      case 'F': {\n        sqlite3_str_appendf(&sRes, \"%04d-%02d-%02d\", x.Y, x.M, x.D);\n        break;\n      }\n      case 'G': /* Fall thru */\n      case 'g': {\n        DateTime y = x;\n        assert( y.validJD );\n        /* Move y so that it is the Thursday in the same week as x */\n        y.iJD += (3 - daysAfterMonday(&x))*86400000;\n        y.validYMD = 0;\n        computeYMD(&y);\n        if( cf=='g' ){\n          sqlite3_str_appendf(&sRes, \"%02d\", y.Y%100);\n        }else{\n          sqlite3_str_appendf(&sRes, \"%04d\", y.Y);\n        }\n        break;\n      }\n      case 'H':\n      case 'k': {\n        sqlite3_str_appendf(&sRes, cf=='H' ? \"%02d\" : \"%2d\", x.h);\n        break;\n      }\n      case 'I': /* Fall thru */\n      case 'l': {\n        int h = x.h;\n        if( h>12 ) h -= 12;\n        if( h==0 ) h = 12;\n        sqlite3_str_appendf(&sRes, cf=='I' ? \"%02d\" : \"%2d\", h);\n        break;\n      }\n      case 'j': {  /* Day of year.  Jan01==1, Jan02==2, and so forth */\n        sqlite3_str_appendf(&sRes,\"%03d\",daysAfterJan01(&x)+1);\n        break;\n      }\n      case 'J': {  /* Julian day number.  (Non-standard) */\n        sqlite3_str_appendf(&sRes,\"%.16g\",x.iJD/86400000.0);\n        break;\n      }\n      case 'm': {\n        sqlite3_str_appendf(&sRes,\"%02d\",x.M);\n        break;\n      }\n      case 'M': {\n        sqlite3_str_appendf(&sRes,\"%02d\",x.m);\n        break;\n      }\n      case 'p': /* Fall thru */\n      case 'P': {\n        if( x.h>=12 ){\n          sqlite3_str_append(&sRes, cf=='p' ? \"PM\" : \"pm\", 2);\n        }else{\n          sqlite3_str_append(&sRes, cf=='p' ? \"AM\" : \"am\", 2);\n        }\n        break;\n      }\n      case 'R': {\n        sqlite3_str_appendf(&sRes, \"%02d:%02d\", x.h, x.m);\n        break;\n      }\n      case 's': {\n        if( x.useSubsec ){\n          sqlite3_str_appendf(&sRes,\"%.3f\",\n                (x.iJD - 21086676*(i64)10000000)/1000.0);\n        }else{\n          i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000);\n          sqlite3_str_appendf(&sRes,\"%lld\",iS);\n        }\n        break;\n      }\n      case 'S': {\n        sqlite3_str_appendf(&sRes,\"%02d\",(int)x.s);\n        break;\n      }\n      case 'T': {\n        sqlite3_str_appendf(&sRes,\"%02d:%02d:%02d\", x.h, x.m, (int)x.s);\n        break;\n      }\n      case 'u':    /* Day of week.  1 to 7.  Monday==1, Sunday==7 */\n      case 'w': {  /* Day of week.  0 to 6.  Sunday==0, Monday==1 */\n        char c = (char)daysAfterSunday(&x) + '0';\n        if( c=='0' && cf=='u' ) c = '7';\n        sqlite3_str_appendchar(&sRes, 1, c);\n        break;\n      }\n      case 'U': {  /* Week num. 00-53. First Sun of the year is week 01 */\n        sqlite3_str_appendf(&sRes,\"%02d\",\n              (daysAfterJan01(&x)-daysAfterSunday(&x)+7)/7);\n        break;\n      }\n      case 'V': {  /* Week num. 01-53. First week with a Thur is week 01 */\n        DateTime y = x;\n        /* Adjust y so that is the Thursday in the same week as x */\n        assert( y.validJD );\n        y.iJD += (3 - daysAfterMonday(&x))*86400000;\n        y.validYMD = 0;\n        computeYMD(&y);\n        sqlite3_str_appendf(&sRes,\"%02d\", daysAfterJan01(&y)/7+1);\n        break;\n      }\n      case 'W': {  /* Week num. 00-53. First Mon of the year is week 01 */\n        sqlite3_str_appendf(&sRes,\"%02d\",\n           (daysAfterJan01(&x)-daysAfterMonday(&x)+7)/7);\n        break;\n      }\n      case 'Y': {\n        sqlite3_str_appendf(&sRes,\"%04d\",x.Y);\n        break;\n      }\n      case '%': {\n        sqlite3_str_appendchar(&sRes, 1, '%');\n        break;\n      }\n      default: {\n        sqlite3_str_reset(&sRes);\n        return;\n      }\n    }\n  }\n  if( j<i ) sqlite3_str_append(&sRes, zFmt+j, (int)(i-j));\n  sqlite3ResultStrAccum(context, &sRes);\n}\n\n/*\n** current_time()\n**\n** This function returns the same value as time('now').\n*/\nstatic void ctimeFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  timeFunc(context, 0, 0);\n}\n\n/*\n** current_date()\n**\n** This function returns the same value as date('now').\n*/\nstatic void cdateFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  dateFunc(context, 0, 0);\n}\n\n/*\n** timediff(DATE1, DATE2)\n**\n** Return the amount of time that must be added to DATE2 in order to\n** convert it into DATE2.  The time difference format is:\n**\n**     +YYYY-MM-DD HH:MM:SS.SSS\n**\n** The initial \"+\" becomes \"-\" if DATE1 occurs before DATE2.  For\n** date/time values A and B, the following invariant should hold:\n**\n**     datetime(A) == (datetime(B, timediff(A,B))\n**\n** Both DATE arguments must be either a julian day number, or an\n** ISO-8601 string.  The unix timestamps are not supported by this\n** routine.\n*/\nstatic void timediffFunc(\n  sqlite3_context *context,\n  int NotUsed1,\n  sqlite3_value **argv\n){\n  char sign;\n  int Y, M;\n  DateTime d1, d2;\n  sqlite3_str sRes;\n  UNUSED_PARAMETER(NotUsed1);\n  if( isDate(context, 1, &argv[0], &d1) ) return;\n  if( isDate(context, 1, &argv[1], &d2) ) return;\n  computeYMD_HMS(&d1);\n  computeYMD_HMS(&d2);\n  if( d1.iJD>=d2.iJD ){\n    sign = '+';\n    Y = d1.Y - d2.Y;\n    if( Y ){\n      d2.Y = d1.Y;\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    M = d1.M - d2.M;\n    if( M<0 ){\n      Y--;\n      M += 12;\n    }\n    if( M!=0 ){\n      d2.M = d1.M;\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    while( d1.iJD<d2.iJD ){\n      M--;\n      if( M<0 ){\n        M = 11;\n        Y--;\n      }\n      d2.M--;\n      if( d2.M<1 ){\n        d2.M = 12;\n        d2.Y--;\n      }\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    d1.iJD -= d2.iJD;\n    d1.iJD += (u64)1486995408 * (u64)100000;\n  }else /* d1<d2 */{\n    sign = '-';\n    Y = d2.Y - d1.Y;\n    if( Y ){\n      d2.Y = d1.Y;\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    M = d2.M - d1.M;\n    if( M<0 ){\n      Y--;\n      M += 12;\n    }\n    if( M!=0 ){\n      d2.M = d1.M;\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    while( d1.iJD>d2.iJD ){\n      M--;\n      if( M<0 ){\n        M = 11;\n        Y--;\n      }\n      d2.M++;\n      if( d2.M>12 ){\n        d2.M = 1;\n        d2.Y++;\n      }\n      d2.validJD = 0;\n      computeJD(&d2);\n    }\n    d1.iJD = d2.iJD - d1.iJD;\n    d1.iJD += (u64)1486995408 * (u64)100000;\n  }\n  clearYMD_HMS_TZ(&d1);\n  computeYMD_HMS(&d1);\n  sqlite3StrAccumInit(&sRes, 0, 0, 0, 100);\n  sqlite3_str_appendf(&sRes, \"%c%04d-%02d-%02d %02d:%02d:%06.3f\",\n       sign, Y, M, d1.D-1, d1.h, d1.m, d1.s);\n  sqlite3ResultStrAccum(context, &sRes);\n}\n\n\n/*\n** current_timestamp()\n**\n** This function returns the same value as datetime('now').\n*/\nstatic void ctimestampFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  datetimeFunc(context, 0, 0);\n}\n#endif /* !defined(SQLITE_OMIT_DATETIME_FUNCS) */\n\n#ifdef SQLITE_OMIT_DATETIME_FUNCS\n/*\n** If the library is compiled to omit the full-scale date and time\n** handling (to get a smaller binary), the following minimal version\n** of the functions current_time(), current_date() and current_timestamp()\n** are included instead. This is to support column declarations that\n** include \"DEFAULT CURRENT_TIME\" etc.\n**\n** This function uses the C-library functions time(), gmtime()\n** and strftime(). The format string to pass to strftime() is supplied\n** as the user-data for the function.\n*/\nstatic void currentTimeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  time_t t;\n  char *zFormat = (char *)sqlite3_user_data(context);\n  sqlite3_int64 iT;\n  struct tm *pTm;\n  struct tm sNow;\n  char zBuf[20];\n\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(argv);\n\n  iT = sqlite3StmtCurrentTime(context);\n  if( iT<=0 ) return;\n  t = iT/1000 - 10000*(sqlite3_int64)21086676;\n#if HAVE_GMTIME_R\n  pTm = gmtime_r(&t, &sNow);\n#else\n  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN));\n  pTm = gmtime(&t);\n  if( pTm ) memcpy(&sNow, pTm, sizeof(sNow));\n  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN));\n#endif\n  if( pTm ){\n    strftime(zBuf, 20, zFormat, &sNow);\n    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);\n  }\n}\n#endif\n\n#if !defined(SQLITE_OMIT_DATETIME_FUNCS) && defined(SQLITE_DEBUG)\n/*\n**   datedebug(...)\n**\n** This routine returns JSON that describes the internal DateTime object.\n** Used for debugging and testing only.  Subject to change.\n*/\nstatic void datedebugFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  DateTime x;\n  if( isDate(context, argc, argv, &x)==0 ){\n    char *zJson;\n    zJson = sqlite3_mprintf(\n      \"{iJD:%lld,Y:%d,M:%d,D:%d,h:%d,m:%d,tz:%d,\"\n      \"s:%.3f,validJD:%d,validYMS:%d,validHMS:%d,\"\n      \"nFloor:%d,rawS:%d,isError:%d,useSubsec:%d,\"\n      \"isUtc:%d,isLocal:%d}\",\n      x.iJD, x.Y, x.M, x.D, x.h, x.m, x.tz,\n      x.s, x.validJD, x.validYMD, x.validHMS,\n      x.nFloor, x.rawS, x.isError, x.useSubsec,\n      x.isUtc, x.isLocal);\n    sqlite3_result_text(context, zJson, -1, sqlite3_free);\n  }\n}\n#endif /* !SQLITE_OMIT_DATETIME_FUNCS && SQLITE_DEBUG */\n\n\n/*\n** This function registered all of the above C functions as SQL\n** functions.  This should be the only routine in this file with\n** external linkage.\n*/\nSQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){\n  static FuncDef aDateTimeFuncs[] = {\n#ifndef SQLITE_OMIT_DATETIME_FUNCS\n    PURE_DATE(julianday,        -1, 0, 0, juliandayFunc ),\n    PURE_DATE(unixepoch,        -1, 0, 0, unixepochFunc ),\n    PURE_DATE(date,             -1, 0, 0, dateFunc      ),\n    PURE_DATE(time,             -1, 0, 0, timeFunc      ),\n    PURE_DATE(datetime,         -1, 0, 0, datetimeFunc  ),\n    PURE_DATE(strftime,         -1, 0, 0, strftimeFunc  ),\n    PURE_DATE(timediff,          2, 0, 0, timediffFunc  ),\n#ifdef SQLITE_DEBUG\n    PURE_DATE(datedebug,        -1, 0, 0, datedebugFunc ),\n#endif\n    DFUNCTION(current_time,      0, 0, 0, ctimeFunc     ),\n    DFUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),\n    DFUNCTION(current_date,      0, 0, 0, cdateFunc     ),\n#else\n    STR_FUNCTION(current_time,      0, \"%H:%M:%S\",          0, currentTimeFunc),\n    STR_FUNCTION(current_date,      0, \"%Y-%m-%d\",          0, currentTimeFunc),\n    STR_FUNCTION(current_timestamp, 0, \"%Y-%m-%d %H:%M:%S\", 0, currentTimeFunc),\n#endif\n  };\n  sqlite3InsertBuiltinFuncs(aDateTimeFuncs, ArraySize(aDateTimeFuncs));\n}\n\n/************** End of date.c ************************************************/\n/************** Begin file os.c **********************************************/\n/*\n** 2005 November 29\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains OS interface code that is common to all\n** architectures.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** If we compile with the SQLITE_TEST macro set, then the following block\n** of code will give us the ability to simulate a disk I/O error.  This\n** is used for testing the I/O recovery logic.\n*/\n#if defined(SQLITE_TEST)\nSQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */\nSQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */\nSQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */\nSQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */\nSQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */\nSQLITE_API int sqlite3_diskfull_pending = 0;\nSQLITE_API int sqlite3_diskfull = 0;\n#endif /* defined(SQLITE_TEST) */\n\n/*\n** When testing, also keep a count of the number of open files.\n*/\n#if defined(SQLITE_TEST)\nSQLITE_API int sqlite3_open_file_count = 0;\n#endif /* defined(SQLITE_TEST) */\n\n/*\n** The default SQLite sqlite3_vfs implementations do not allocate\n** memory (actually, os_unix.c allocates a small amount of memory\n** from within OsOpen()), but some third-party implementations may.\n** So we test the effects of a malloc() failing and the sqlite3OsXXX()\n** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.\n**\n** The following functions are instrumented for malloc() failure\n** testing:\n**\n**     sqlite3OsRead()\n**     sqlite3OsWrite()\n**     sqlite3OsSync()\n**     sqlite3OsFileSize()\n**     sqlite3OsLock()\n**     sqlite3OsCheckReservedLock()\n**     sqlite3OsFileControl()\n**     sqlite3OsShmMap()\n**     sqlite3OsOpen()\n**     sqlite3OsDelete()\n**     sqlite3OsAccess()\n**     sqlite3OsFullPathname()\n**\n*/\n#if defined(SQLITE_TEST)\nSQLITE_API int sqlite3_memdebug_vfs_oom_test = 1;\n  #define DO_OS_MALLOC_TEST(x)                                       \\\n  if (sqlite3_memdebug_vfs_oom_test && (!x || !sqlite3JournalIsInMemory(x))) { \\\n    void *pTstAlloc = sqlite3Malloc(10);                             \\\n    if (!pTstAlloc) return SQLITE_IOERR_NOMEM_BKPT;                  \\\n    sqlite3_free(pTstAlloc);                                         \\\n  }\n#else\n  #define DO_OS_MALLOC_TEST(x)\n#endif\n\n/*\n** The following routines are convenience wrappers around methods\n** of the sqlite3_file object.  This is mostly just syntactic sugar. All\n** of this would be completely automatic if SQLite were coded using\n** C++ instead of plain old C.\n*/\nSQLITE_PRIVATE void sqlite3OsClose(sqlite3_file *pId){\n  if( pId->pMethods ){\n    pId->pMethods->xClose(pId);\n    pId->pMethods = 0;\n  }\n}\nSQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xRead(id, pBuf, amt, offset);\n}\nSQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xWrite(id, pBuf, amt, offset);\n}\nSQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){\n  return id->pMethods->xTruncate(id, size);\n}\nSQLITE_PRIVATE int sqlite3OsSync(sqlite3_file *id, int flags){\n  DO_OS_MALLOC_TEST(id);\n  return flags ? id->pMethods->xSync(id, flags) : SQLITE_OK;\n}\nSQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xFileSize(id, pSize);\n}\nSQLITE_PRIVATE int sqlite3OsLock(sqlite3_file *id, int lockType){\n  DO_OS_MALLOC_TEST(id);\n  assert( lockType>=SQLITE_LOCK_SHARED && lockType<=SQLITE_LOCK_EXCLUSIVE );\n  return id->pMethods->xLock(id, lockType);\n}\nSQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file *id, int lockType){\n  assert( lockType==SQLITE_LOCK_NONE || lockType==SQLITE_LOCK_SHARED );\n  return id->pMethods->xUnlock(id, lockType);\n}\nSQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xCheckReservedLock(id, pResOut);\n}\n\n/*\n** Use sqlite3OsFileControl() when we are doing something that might fail\n** and we need to know about the failures.  Use sqlite3OsFileControlHint()\n** when simply tossing information over the wall to the VFS and we do not\n** really care if the VFS receives and understands the information since it\n** is only a hint and can be safely ignored.  The sqlite3OsFileControlHint()\n** routine has no return value since the return value would be meaningless.\n*/\nSQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){\n  if( id->pMethods==0 ) return SQLITE_NOTFOUND;\n#ifdef SQLITE_TEST\n  if( op!=SQLITE_FCNTL_COMMIT_PHASETWO\n   && op!=SQLITE_FCNTL_LOCK_TIMEOUT\n   && op!=SQLITE_FCNTL_CKPT_DONE\n   && op!=SQLITE_FCNTL_CKPT_START\n  ){\n    /* Faults are not injected into COMMIT_PHASETWO because, assuming SQLite\n    ** is using a regular VFS, it is called after the corresponding\n    ** transaction has been committed. Injecting a fault at this point\n    ** confuses the test scripts - the COMMIT command returns SQLITE_NOMEM\n    ** but the transaction is committed anyway.\n    **\n    ** The core must call OsFileControl() though, not OsFileControlHint(),\n    ** as if a custom VFS (e.g. zipvfs) returns an error here, it probably\n    ** means the commit really has failed and an error should be returned\n    ** to the user.\n    **\n    ** The CKPT_DONE and CKPT_START file-controls are write-only signals\n    ** to the cksumvfs.  Their return code is meaningless and is ignored\n    ** by the SQLite core, so there is no point in simulating OOMs for them.\n    */\n    DO_OS_MALLOC_TEST(id);\n  }\n#endif\n  return id->pMethods->xFileControl(id, op, pArg);\n}\nSQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file *id, int op, void *pArg){\n  if( id->pMethods ) (void)id->pMethods->xFileControl(id, op, pArg);\n}\n\nSQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id){\n  int (*xSectorSize)(sqlite3_file*) = id->pMethods->xSectorSize;\n  return (xSectorSize ? xSectorSize(id) : SQLITE_DEFAULT_SECTOR_SIZE);\n}\nSQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id){\n  if( NEVER(id->pMethods==0) ) return 0;\n  return id->pMethods->xDeviceCharacteristics(id);\n}\n#ifndef SQLITE_OMIT_WAL\nSQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int offset, int n, int flags){\n  return id->pMethods->xShmLock(id, offset, n, flags);\n}\nSQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id){\n  id->pMethods->xShmBarrier(id);\n}\nSQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int deleteFlag){\n  return id->pMethods->xShmUnmap(id, deleteFlag);\n}\nSQLITE_PRIVATE int sqlite3OsShmMap(\n  sqlite3_file *id,               /* Database file handle */\n  int iPage,\n  int pgsz,\n  int bExtend,                    /* True to extend file if necessary */\n  void volatile **pp              /* OUT: Pointer to mapping */\n){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);\n}\n#endif /* SQLITE_OMIT_WAL */\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/* The real implementation of xFetch and xUnfetch */\nSQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){\n  DO_OS_MALLOC_TEST(id);\n  return id->pMethods->xFetch(id, iOff, iAmt, pp);\n}\nSQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){\n  return id->pMethods->xUnfetch(id, iOff, p);\n}\n#else\n/* No-op stubs to use when memory-mapped I/O is disabled */\nSQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64 iOff, int iAmt, void **pp){\n  *pp = 0;\n  return SQLITE_OK;\n}\nSQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** The next group of routines are convenience wrappers around the\n** VFS methods.\n*/\nSQLITE_PRIVATE int sqlite3OsOpen(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  sqlite3_file *pFile,\n  int flags,\n  int *pFlagsOut\n){\n  int rc;\n  DO_OS_MALLOC_TEST(0);\n  /* 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed\n  ** down into the VFS layer.  Some SQLITE_OPEN_ flags (for example,\n  ** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before\n  ** reaching the VFS. */\n  assert( zPath || (flags & SQLITE_OPEN_EXCLUSIVE) );\n  rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x1087f7f, pFlagsOut);\n  assert( rc==SQLITE_OK || pFile->pMethods==0 );\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){\n  DO_OS_MALLOC_TEST(0);\n  assert( dirSync==0 || dirSync==1 );\n  return pVfs->xDelete!=0 ? pVfs->xDelete(pVfs, zPath, dirSync) : SQLITE_OK;\n}\nSQLITE_PRIVATE int sqlite3OsAccess(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int flags,\n  int *pResOut\n){\n  DO_OS_MALLOC_TEST(0);\n  return pVfs->xAccess(pVfs, zPath, flags, pResOut);\n}\nSQLITE_PRIVATE int sqlite3OsFullPathname(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int nPathOut,\n  char *zPathOut\n){\n  DO_OS_MALLOC_TEST(0);\n  zPathOut[0] = 0;\n  return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);\n}\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\nSQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){\n  assert( zPath!=0 );\n  assert( strlen(zPath)<=SQLITE_MAX_PATHLEN );  /* tag-20210611-1 */\n  return pVfs->xDlOpen(pVfs, zPath);\n}\nSQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){\n  pVfs->xDlError(pVfs, nByte, zBufOut);\n}\nSQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *pVfs, void *pHdle, const char *zSym))(void){\n  return pVfs->xDlSym(pVfs, pHdle, zSym);\n}\nSQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *pVfs, void *pHandle){\n  pVfs->xDlClose(pVfs, pHandle);\n}\n#endif /* SQLITE_OMIT_LOAD_EXTENSION */\nSQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){\n  if( sqlite3Config.iPrngSeed ){\n    memset(zBufOut, 0, nByte);\n    if( ALWAYS(nByte>(signed)sizeof(unsigned)) ) nByte = sizeof(unsigned int);\n    memcpy(zBufOut, &sqlite3Config.iPrngSeed, nByte);\n    return SQLITE_OK;\n  }else{\n    return pVfs->xRandomness(pVfs, nByte, zBufOut);\n  }\n\n}\nSQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *pVfs, int nMicro){\n  return pVfs->xSleep(pVfs, nMicro);\n}\nSQLITE_PRIVATE int sqlite3OsGetLastError(sqlite3_vfs *pVfs){\n  return pVfs->xGetLastError ? pVfs->xGetLastError(pVfs, 0, 0) : 0;\n}\nSQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *pTimeOut){\n  int rc;\n  /* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()\n  ** method to get the current date and time if that method is available\n  ** (if iVersion is 2 or greater and the function pointer is not NULL) and\n  ** will fall back to xCurrentTime() if xCurrentTimeInt64() is\n  ** unavailable.\n  */\n  if( pVfs->iVersion>=2 && pVfs->xCurrentTimeInt64 ){\n    rc = pVfs->xCurrentTimeInt64(pVfs, pTimeOut);\n  }else{\n    double r;\n    rc = pVfs->xCurrentTime(pVfs, &r);\n    *pTimeOut = (sqlite3_int64)(r*86400000.0);\n  }\n  return rc;\n}\n\nSQLITE_PRIVATE int sqlite3OsOpenMalloc(\n  sqlite3_vfs *pVfs,\n  const char *zFile,\n  sqlite3_file **ppFile,\n  int flags,\n  int *pOutFlags\n){\n  int rc;\n  sqlite3_file *pFile;\n  pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);\n  if( pFile ){\n    rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);\n    if( rc!=SQLITE_OK ){\n      sqlite3_free(pFile);\n      *ppFile = 0;\n    }else{\n      *ppFile = pFile;\n    }\n  }else{\n    *ppFile = 0;\n    rc = SQLITE_NOMEM_BKPT;\n  }\n  assert( *ppFile!=0 || rc!=SQLITE_OK );\n  return rc;\n}\nSQLITE_PRIVATE void sqlite3OsCloseFree(sqlite3_file *pFile){\n  assert( pFile );\n  sqlite3OsClose(pFile);\n  sqlite3_free(pFile);\n}\n\n/*\n** This function is a wrapper around the OS specific implementation of\n** sqlite3_os_init(). The purpose of the wrapper is to provide the\n** ability to simulate a malloc failure, so that the handling of an\n** error in sqlite3_os_init() by the upper layers can be tested.\n*/\nSQLITE_PRIVATE int sqlite3OsInit(void){\n  void *p = sqlite3_malloc(10);\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  sqlite3_free(p);\n  return sqlite3_os_init();\n}\n\n/*\n** The list of all registered VFS implementations.\n*/\nstatic sqlite3_vfs * SQLITE_WSD vfsList = 0;\n#define vfsList GLOBAL(sqlite3_vfs *, vfsList)\n\n/*\n** Locate a VFS by name.  If no name is given, simply return the\n** first VFS on the list.\n*/\nSQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){\n  sqlite3_vfs *pVfs = 0;\n#if SQLITE_THREADSAFE\n  sqlite3_mutex *mutex;\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  int rc = sqlite3_initialize();\n  if( rc ) return 0;\n#endif\n#if SQLITE_THREADSAFE\n  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n  sqlite3_mutex_enter(mutex);\n  for(pVfs = vfsList; pVfs; pVfs=pVfs->pNext){\n    if( zVfs==0 ) break;\n    if( strcmp(zVfs, pVfs->zName)==0 ) break;\n  }\n  sqlite3_mutex_leave(mutex);\n  return pVfs;\n}\n\n/*\n** Unlink a VFS from the linked list\n*/\nstatic void vfsUnlink(sqlite3_vfs *pVfs){\n  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN)) );\n  if( pVfs==0 ){\n    /* No-op */\n  }else if( vfsList==pVfs ){\n    vfsList = pVfs->pNext;\n  }else if( vfsList ){\n    sqlite3_vfs *p = vfsList;\n    while( p->pNext && p->pNext!=pVfs ){\n      p = p->pNext;\n    }\n    if( p->pNext==pVfs ){\n      p->pNext = pVfs->pNext;\n    }\n  }\n}\n\n/*\n** Register a VFS with the system.  It is harmless to register the same\n** VFS multiple times.  The new VFS becomes the default if makeDflt is\n** true.\n*/\nSQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){\n  MUTEX_LOGIC(sqlite3_mutex *mutex;)\n#ifndef SQLITE_OMIT_AUTOINIT\n  int rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pVfs==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n\n  MUTEX_LOGIC( mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )\n  sqlite3_mutex_enter(mutex);\n  vfsUnlink(pVfs);\n  if( makeDflt || vfsList==0 ){\n    pVfs->pNext = vfsList;\n    vfsList = pVfs;\n  }else{\n    pVfs->pNext = vfsList->pNext;\n    vfsList->pNext = pVfs;\n  }\n  assert(vfsList);\n  sqlite3_mutex_leave(mutex);\n  return SQLITE_OK;\n}\n\n/*\n** Unregister a VFS so that it is no longer accessible.\n*/\nSQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){\n  MUTEX_LOGIC(sqlite3_mutex *mutex;)\n#ifndef SQLITE_OMIT_AUTOINIT\n  int rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n  MUTEX_LOGIC( mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )\n  sqlite3_mutex_enter(mutex);\n  vfsUnlink(pVfs);\n  sqlite3_mutex_leave(mutex);\n  return SQLITE_OK;\n}\n\n/************** End of os.c **************************************************/\n/************** Begin file fault.c *******************************************/\n/*\n** 2008 Jan 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code to support the concept of \"benign\"\n** malloc failures (when the xMalloc() or xRealloc() method of the\n** sqlite3_mem_methods structure fails to allocate a block of memory\n** and returns 0).\n**\n** Most malloc failures are non-benign. After they occur, SQLite\n** abandons the current operation and returns an error code (usually\n** SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily\n** fatal. For example, if a malloc fails while resizing a hash table, this\n** is completely recoverable simply by not carrying out the resize. The\n** hash table will continue to function normally.  So a malloc failure\n** during a hash table resize is a benign fault.\n*/\n\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_UNTESTABLE\n\n/*\n** Global variables.\n*/\ntypedef struct BenignMallocHooks BenignMallocHooks;\nstatic SQLITE_WSD struct BenignMallocHooks {\n  void (*xBenignBegin)(void);\n  void (*xBenignEnd)(void);\n} sqlite3Hooks = { 0, 0 };\n\n/* The \"wsdHooks\" macro will resolve to the appropriate BenignMallocHooks\n** structure.  If writable static data is unsupported on the target,\n** we have to locate the state vector at run-time.  In the more common\n** case where writable static data is supported, wsdHooks can refer directly\n** to the \"sqlite3Hooks\" state vector declared above.\n*/\n#ifdef SQLITE_OMIT_WSD\n# define wsdHooksInit \\\n  BenignMallocHooks *x = &GLOBAL(BenignMallocHooks,sqlite3Hooks)\n# define wsdHooks x[0]\n#else\n# define wsdHooksInit\n# define wsdHooks sqlite3Hooks\n#endif\n\n\n/*\n** Register hooks to call when sqlite3BeginBenignMalloc() and\n** sqlite3EndBenignMalloc() are called, respectively.\n*/\nSQLITE_PRIVATE void sqlite3BenignMallocHooks(\n  void (*xBenignBegin)(void),\n  void (*xBenignEnd)(void)\n){\n  wsdHooksInit;\n  wsdHooks.xBenignBegin = xBenignBegin;\n  wsdHooks.xBenignEnd = xBenignEnd;\n}\n\n/*\n** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that\n** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()\n** indicates that subsequent malloc failures are non-benign.\n*/\nSQLITE_PRIVATE void sqlite3BeginBenignMalloc(void){\n  wsdHooksInit;\n  if( wsdHooks.xBenignBegin ){\n    wsdHooks.xBenignBegin();\n  }\n}\nSQLITE_PRIVATE void sqlite3EndBenignMalloc(void){\n  wsdHooksInit;\n  if( wsdHooks.xBenignEnd ){\n    wsdHooks.xBenignEnd();\n  }\n}\n\n#endif   /* #ifndef SQLITE_UNTESTABLE */\n\n/************** End of fault.c ***********************************************/\n/************** Begin file mem0.c ********************************************/\n/*\n** 2008 October 28\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains a no-op memory allocation drivers for use when\n** SQLITE_ZERO_MALLOC is defined.  The allocation drivers implemented\n** here always fail.  SQLite will not operate with these drivers.  These\n** are merely placeholders.  Real drivers must be substituted using\n** sqlite3_config() before SQLite will operate.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** This version of the memory allocator is the default.  It is\n** used when no other memory allocator is specified using compile-time\n** macros.\n*/\n#ifdef SQLITE_ZERO_MALLOC\n\n/*\n** No-op versions of all memory allocation routines\n*/\nstatic void *sqlite3MemMalloc(int nByte){ return 0; }\nstatic void sqlite3MemFree(void *pPrior){ return; }\nstatic void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }\nstatic int sqlite3MemSize(void *pPrior){ return 0; }\nstatic int sqlite3MemRoundup(int n){ return n; }\nstatic int sqlite3MemInit(void *NotUsed){ return SQLITE_OK; }\nstatic void sqlite3MemShutdown(void *NotUsed){ return; }\n\n/*\n** This routine is the only routine in this file with external linkage.\n**\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file.\n*/\nSQLITE_PRIVATE void sqlite3MemSetDefault(void){\n  static const sqlite3_mem_methods defaultMethods = {\n     sqlite3MemMalloc,\n     sqlite3MemFree,\n     sqlite3MemRealloc,\n     sqlite3MemSize,\n     sqlite3MemRoundup,\n     sqlite3MemInit,\n     sqlite3MemShutdown,\n     0\n  };\n  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);\n}\n\n#endif /* SQLITE_ZERO_MALLOC */\n\n/************** End of mem0.c ************************************************/\n/************** Begin file mem1.c ********************************************/\n/*\n** 2007 August 14\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains low-level memory allocation drivers for when\n** SQLite will use the standard C-library malloc/realloc/free interface\n** to obtain the memory it needs.\n**\n** This file contains implementations of the low-level memory allocation\n** routines specified in the sqlite3_mem_methods object.  The content of\n** this file is only used if SQLITE_SYSTEM_MALLOC is defined.  The\n** SQLITE_SYSTEM_MALLOC macro is defined automatically if neither the\n** SQLITE_MEMDEBUG nor the SQLITE_WIN32_MALLOC macros are defined.  The\n** default configuration is to use memory allocation routines in this\n** file.\n**\n** C-preprocessor macro summary:\n**\n**    HAVE_MALLOC_USABLE_SIZE     The configure script sets this symbol if\n**                                the malloc_usable_size() interface exists\n**                                on the target platform.  Or, this symbol\n**                                can be set manually, if desired.\n**                                If an equivalent interface exists by\n**                                a different name, using a separate -D\n**                                option to rename it.\n**\n**    SQLITE_WITHOUT_ZONEMALLOC   Some older macs lack support for the zone\n**                                memory allocator.  Set this symbol to enable\n**                                building on older macs.\n**\n**    SQLITE_WITHOUT_MSIZE        Set this symbol to disable the use of\n**                                _msize() on windows systems.  This might\n**                                be necessary when compiling for Delphi,\n**                                for example.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** This version of the memory allocator is the default.  It is\n** used when no other memory allocator is specified using compile-time\n** macros.\n*/\n#ifdef SQLITE_SYSTEM_MALLOC\n#if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC)\n\n/*\n** Use the zone allocator available on apple products unless the\n** SQLITE_WITHOUT_ZONEMALLOC symbol is defined.\n*/\n#include <sys/sysctl.h>\n#include <malloc/malloc.h>\n#ifdef SQLITE_MIGHT_BE_SINGLE_CORE\n#include <libkern/OSAtomic.h>\n#endif /* SQLITE_MIGHT_BE_SINGLE_CORE */\nstatic malloc_zone_t* _sqliteZone_;\n#define SQLITE_MALLOC(x) malloc_zone_malloc(_sqliteZone_, (x))\n#define SQLITE_FREE(x) malloc_zone_free(_sqliteZone_, (x));\n#define SQLITE_REALLOC(x,y) malloc_zone_realloc(_sqliteZone_, (x), (y))\n#define SQLITE_MALLOCSIZE(x) \\\n        (_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))\n\n#else /* if not __APPLE__ */\n\n/*\n** Use standard C library malloc and free on non-Apple systems.\n** Also used by Apple systems if SQLITE_WITHOUT_ZONEMALLOC is defined.\n*/\n#define SQLITE_MALLOC(x)             malloc(x)\n#define SQLITE_FREE(x)               free(x)\n#define SQLITE_REALLOC(x,y)          realloc((x),(y))\n\n/*\n** The malloc.h header file is needed for malloc_usable_size() function\n** on some systems (e.g. Linux).\n*/\n#if HAVE_MALLOC_H && HAVE_MALLOC_USABLE_SIZE\n#  define SQLITE_USE_MALLOC_H 1\n#  define SQLITE_USE_MALLOC_USABLE_SIZE 1\n/*\n** The MSVCRT has malloc_usable_size(), but it is called _msize().  The\n** use of _msize() is automatic, but can be disabled by compiling with\n** -DSQLITE_WITHOUT_MSIZE.  Using the _msize() function also requires\n** the malloc.h header file.\n*/\n#elif defined(_MSC_VER) && !defined(SQLITE_WITHOUT_MSIZE)\n#  define SQLITE_USE_MALLOC_H\n#  define SQLITE_USE_MSIZE\n#endif\n\n/*\n** Include the malloc.h header file, if necessary.  Also set define macro\n** SQLITE_MALLOCSIZE to the appropriate function name, which is _msize()\n** for MSVC and malloc_usable_size() for most other systems (e.g. Linux).\n** The memory size function can always be overridden manually by defining\n** the macro SQLITE_MALLOCSIZE to the desired function name.\n*/\n#if defined(SQLITE_USE_MALLOC_H)\n#  include <malloc.h>\n#  if defined(SQLITE_USE_MALLOC_USABLE_SIZE)\n#    if !defined(SQLITE_MALLOCSIZE)\n#      define SQLITE_MALLOCSIZE(x)   malloc_usable_size(x)\n#    endif\n#  elif defined(SQLITE_USE_MSIZE)\n#    if !defined(SQLITE_MALLOCSIZE)\n#      define SQLITE_MALLOCSIZE      _msize\n#    endif\n#  endif\n#endif /* defined(SQLITE_USE_MALLOC_H) */\n\n#endif /* __APPLE__ or not __APPLE__ */\n\n/*\n** Like malloc(), but remember the size of the allocation\n** so that we can find it later using sqlite3MemSize().\n**\n** For this low-level routine, we are guaranteed that nByte>0 because\n** cases of nByte<=0 will be intercepted and dealt with by higher level\n** routines.\n*/\nstatic void *sqlite3MemMalloc(int nByte){\n#ifdef SQLITE_MALLOCSIZE\n  void *p;\n  testcase( ROUND8(nByte)==nByte );\n  p = SQLITE_MALLOC( nByte );\n  if( p==0 ){\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    sqlite3_log(SQLITE_NOMEM, \"failed to allocate %u bytes of memory\", nByte);\n  }\n  return p;\n#else\n  sqlite3_int64 *p;\n  assert( nByte>0 );\n  testcase( ROUND8(nByte)!=nByte );\n  p = SQLITE_MALLOC( nByte+8 );\n  if( p ){\n    p[0] = nByte;\n    p++;\n  }else{\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    sqlite3_log(SQLITE_NOMEM, \"failed to allocate %u bytes of memory\", nByte);\n  }\n  return (void *)p;\n#endif\n}\n\n/*\n** Like free() but works for allocations obtained from sqlite3MemMalloc()\n** or sqlite3MemRealloc().\n**\n** For this low-level routine, we already know that pPrior!=0 since\n** cases where pPrior==0 will have been intercepted and dealt with\n** by higher-level routines.\n*/\nstatic void sqlite3MemFree(void *pPrior){\n#ifdef SQLITE_MALLOCSIZE\n  SQLITE_FREE(pPrior);\n#else\n  sqlite3_int64 *p = (sqlite3_int64*)pPrior;\n  assert( pPrior!=0 );\n  p--;\n  SQLITE_FREE(p);\n#endif\n}\n\n/*\n** Report the allocated size of a prior return from xMalloc()\n** or xRealloc().\n*/\nstatic int sqlite3MemSize(void *pPrior){\n#ifdef SQLITE_MALLOCSIZE\n  assert( pPrior!=0 );\n  return (int)SQLITE_MALLOCSIZE(pPrior);\n#else\n  sqlite3_int64 *p;\n  assert( pPrior!=0 );\n  p = (sqlite3_int64*)pPrior;\n  p--;\n  return (int)p[0];\n#endif\n}\n\n/*\n** Like realloc().  Resize an allocation previously obtained from\n** sqlite3MemMalloc().\n**\n** For this low-level interface, we know that pPrior!=0.  Cases where\n** pPrior==0 while have been intercepted by higher-level routine and\n** redirected to xMalloc.  Similarly, we know that nByte>0 because\n** cases where nByte<=0 will have been intercepted by higher-level\n** routines and redirected to xFree.\n*/\nstatic void *sqlite3MemRealloc(void *pPrior, int nByte){\n#ifdef SQLITE_MALLOCSIZE\n  void *p = SQLITE_REALLOC(pPrior, nByte);\n  if( p==0 ){\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    sqlite3_log(SQLITE_NOMEM,\n      \"failed memory resize %u to %u bytes\",\n      SQLITE_MALLOCSIZE(pPrior), nByte);\n  }\n  return p;\n#else\n  sqlite3_int64 *p = (sqlite3_int64*)pPrior;\n  assert( pPrior!=0 && nByte>0 );\n  assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */\n  p--;\n  p = SQLITE_REALLOC(p, nByte+8 );\n  if( p ){\n    p[0] = nByte;\n    p++;\n  }else{\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    sqlite3_log(SQLITE_NOMEM,\n      \"failed memory resize %u to %u bytes\",\n      sqlite3MemSize(pPrior), nByte);\n  }\n  return (void*)p;\n#endif\n}\n\n/*\n** Round up a request size to the next valid allocation size.\n*/\nstatic int sqlite3MemRoundup(int n){\n  return ROUND8(n);\n}\n\n/*\n** Initialize this module.\n*/\nstatic int sqlite3MemInit(void *NotUsed){\n#if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC)\n  int cpuCount;\n  size_t len;\n  if( _sqliteZone_ ){\n    return SQLITE_OK;\n  }\n  len = sizeof(cpuCount);\n  /* One usually wants to use hw.activecpu for MT decisions, but not here */\n  sysctlbyname(\"hw.ncpu\", &cpuCount, &len, NULL, 0);\n  if( cpuCount>1 ){\n    /* defer MT decisions to system malloc */\n    _sqliteZone_ = malloc_default_zone();\n  }else{\n    /* only 1 core, use our own zone to contention over global locks,\n    ** e.g. we have our own dedicated locks */\n    _sqliteZone_ = malloc_create_zone(4096, 0);\n    malloc_set_zone_name(_sqliteZone_, \"Sqlite_Heap\");\n  }\n#endif /*  defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC) */\n  UNUSED_PARAMETER(NotUsed);\n  return SQLITE_OK;\n}\n\n/*\n** Deinitialize this module.\n*/\nstatic void sqlite3MemShutdown(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  return;\n}\n\n/*\n** This routine is the only routine in this file with external linkage.\n**\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file.\n*/\nSQLITE_PRIVATE void sqlite3MemSetDefault(void){\n  static const sqlite3_mem_methods defaultMethods = {\n     sqlite3MemMalloc,\n     sqlite3MemFree,\n     sqlite3MemRealloc,\n     sqlite3MemSize,\n     sqlite3MemRoundup,\n     sqlite3MemInit,\n     sqlite3MemShutdown,\n     0\n  };\n  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);\n}\n\n#endif /* SQLITE_SYSTEM_MALLOC */\n\n/************** End of mem1.c ************************************************/\n/************** Begin file mem2.c ********************************************/\n/*\n** 2007 August 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains low-level memory allocation drivers for when\n** SQLite will use the standard C-library malloc/realloc/free interface\n** to obtain the memory it needs while adding lots of additional debugging\n** information to each allocation in order to help detect and fix memory\n** leaks and memory usage errors.\n**\n** This file contains implementations of the low-level memory allocation\n** routines specified in the sqlite3_mem_methods object.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** This version of the memory allocator is used only if the\n** SQLITE_MEMDEBUG macro is defined\n*/\n#ifdef SQLITE_MEMDEBUG\n\n/*\n** The backtrace functionality is only available with GLIBC\n*/\n#ifdef __GLIBC__\n  extern int backtrace(void**,int);\n  extern void backtrace_symbols_fd(void*const*,int,int);\n#else\n# define backtrace(A,B) 1\n# define backtrace_symbols_fd(A,B,C)\n#endif\n/* #include <stdio.h> */\n\n/*\n** Each memory allocation looks like this:\n**\n**  ------------------------------------------------------------------------\n**  | Title |  backtrace pointers |  MemBlockHdr |  allocation |  EndGuard |\n**  ------------------------------------------------------------------------\n**\n** The application code sees only a pointer to the allocation.  We have\n** to back up from the allocation pointer to find the MemBlockHdr.  The\n** MemBlockHdr tells us the size of the allocation and the number of\n** backtrace pointers.  There is also a guard word at the end of the\n** MemBlockHdr.\n*/\nstruct MemBlockHdr {\n  i64 iSize;                          /* Size of this allocation */\n  struct MemBlockHdr *pNext, *pPrev;  /* Linked list of all unfreed memory */\n  char nBacktrace;                    /* Number of backtraces on this alloc */\n  char nBacktraceSlots;               /* Available backtrace slots */\n  u8 nTitle;                          /* Bytes of title; includes '\\0' */\n  u8 eType;                           /* Allocation type code */\n  int iForeGuard;                     /* Guard word for sanity */\n};\n\n/*\n** Guard words\n*/\n#define FOREGUARD 0x80F5E153\n#define REARGUARD 0xE4676B53\n\n/*\n** Number of malloc size increments to track.\n*/\n#define NCSIZE  1000\n\n/*\n** All of the static variables used by this module are collected\n** into a single structure named \"mem\".  This is to keep the\n** static variables organized and to reduce namespace pollution\n** when this module is combined with other in the amalgamation.\n*/\nstatic struct {\n\n  /*\n  ** Mutex to control access to the memory allocation subsystem.\n  */\n  sqlite3_mutex *mutex;\n\n  /*\n  ** Head and tail of a linked list of all outstanding allocations\n  */\n  struct MemBlockHdr *pFirst;\n  struct MemBlockHdr *pLast;\n\n  /*\n  ** The number of levels of backtrace to save in new allocations.\n  */\n  int nBacktrace;\n  void (*xBacktrace)(int, int, void **);\n\n  /*\n  ** Title text to insert in front of each block\n  */\n  int nTitle;        /* Bytes of zTitle to save.  Includes '\\0' and padding */\n  char zTitle[100];  /* The title text */\n\n  /*\n  ** sqlite3MallocDisallow() increments the following counter.\n  ** sqlite3MallocAllow() decrements it.\n  */\n  int disallow; /* Do not allow memory allocation */\n\n  /*\n  ** Gather statistics on the sizes of memory allocations.\n  ** nAlloc[i] is the number of allocation attempts of i*8\n  ** bytes.  i==NCSIZE is the number of allocation attempts for\n  ** sizes more than NCSIZE*8 bytes.\n  */\n  int nAlloc[NCSIZE];      /* Total number of allocations */\n  int nCurrent[NCSIZE];    /* Current number of allocations */\n  int mxCurrent[NCSIZE];   /* Highwater mark for nCurrent */\n\n} mem;\n\n\n/*\n** Adjust memory usage statistics\n*/\nstatic void adjustStats(int iSize, int increment){\n  int i = ROUND8(iSize)/8;\n  if( i>NCSIZE-1 ){\n    i = NCSIZE - 1;\n  }\n  if( increment>0 ){\n    mem.nAlloc[i]++;\n    mem.nCurrent[i]++;\n    if( mem.nCurrent[i]>mem.mxCurrent[i] ){\n      mem.mxCurrent[i] = mem.nCurrent[i];\n    }\n  }else{\n    mem.nCurrent[i]--;\n    assert( mem.nCurrent[i]>=0 );\n  }\n}\n\n/*\n** Given an allocation, find the MemBlockHdr for that allocation.\n**\n** This routine checks the guards at either end of the allocation and\n** if they are incorrect it asserts.\n*/\nstatic struct MemBlockHdr *sqlite3MemsysGetHeader(const void *pAllocation){\n  struct MemBlockHdr *p;\n  int *pInt;\n  u8 *pU8;\n  int nReserve;\n\n  p = (struct MemBlockHdr*)pAllocation;\n  p--;\n  assert( p->iForeGuard==(int)FOREGUARD );\n  nReserve = ROUND8(p->iSize);\n  pInt = (int*)pAllocation;\n  pU8 = (u8*)pAllocation;\n  assert( pInt[nReserve/sizeof(int)]==(int)REARGUARD );\n  /* This checks any of the \"extra\" bytes allocated due\n  ** to rounding up to an 8 byte boundary to ensure\n  ** they haven't been overwritten.\n  */\n  while( nReserve-- > p->iSize ) assert( pU8[nReserve]==0x65 );\n  return p;\n}\n\n/*\n** Return the number of bytes currently allocated at address p.\n*/\nstatic int sqlite3MemSize(void *p){\n  struct MemBlockHdr *pHdr;\n  if( !p ){\n    return 0;\n  }\n  pHdr = sqlite3MemsysGetHeader(p);\n  return (int)pHdr->iSize;\n}\n\n/*\n** Initialize the memory allocation subsystem.\n*/\nstatic int sqlite3MemInit(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  assert( (sizeof(struct MemBlockHdr)&7) == 0 );\n  if( !sqlite3GlobalConfig.bMemstat ){\n    /* If memory status is enabled, then the malloc.c wrapper will already\n    ** hold the STATIC_MEM mutex when the routines here are invoked. */\n    mem.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Deinitialize the memory allocation subsystem.\n*/\nstatic void sqlite3MemShutdown(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  mem.mutex = 0;\n}\n\n/*\n** Round up a request size to the next valid allocation size.\n*/\nstatic int sqlite3MemRoundup(int n){\n  return ROUND8(n);\n}\n\n/*\n** Fill a buffer with pseudo-random bytes.  This is used to preset\n** the content of a new memory allocation to unpredictable values and\n** to clear the content of a freed allocation to unpredictable values.\n*/\nstatic void randomFill(char *pBuf, int nByte){\n  unsigned int x, y, r;\n  x = SQLITE_PTR_TO_INT(pBuf);\n  y = nByte | 1;\n  while( nByte >= 4 ){\n    x = (x>>1) ^ (-(int)(x&1) & 0xd0000001);\n    y = y*1103515245 + 12345;\n    r = x ^ y;\n    *(int*)pBuf = r;\n    pBuf += 4;\n    nByte -= 4;\n  }\n  while( nByte-- > 0 ){\n    x = (x>>1) ^ (-(int)(x&1) & 0xd0000001);\n    y = y*1103515245 + 12345;\n    r = x ^ y;\n    *(pBuf++) = r & 0xff;\n  }\n}\n\n/*\n** Allocate nByte bytes of memory.\n*/\nstatic void *sqlite3MemMalloc(int nByte){\n  struct MemBlockHdr *pHdr;\n  void **pBt;\n  char *z;\n  int *pInt;\n  void *p = 0;\n  int totalSize;\n  int nReserve;\n  sqlite3_mutex_enter(mem.mutex);\n  assert( mem.disallow==0 );\n  nReserve = ROUND8(nByte);\n  totalSize = nReserve + sizeof(*pHdr) + sizeof(int) +\n               mem.nBacktrace*sizeof(void*) + mem.nTitle;\n  p = malloc(totalSize);\n  if( p ){\n    z = p;\n    pBt = (void**)&z[mem.nTitle];\n    pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];\n    pHdr->pNext = 0;\n    pHdr->pPrev = mem.pLast;\n    if( mem.pLast ){\n      mem.pLast->pNext = pHdr;\n    }else{\n      mem.pFirst = pHdr;\n    }\n    mem.pLast = pHdr;\n    pHdr->iForeGuard = FOREGUARD;\n    pHdr->eType = MEMTYPE_HEAP;\n    pHdr->nBacktraceSlots = mem.nBacktrace;\n    pHdr->nTitle = mem.nTitle;\n    if( mem.nBacktrace ){\n      void *aAddr[40];\n      pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;\n      memcpy(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));\n      assert(pBt[0]);\n      if( mem.xBacktrace ){\n        mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);\n      }\n    }else{\n      pHdr->nBacktrace = 0;\n    }\n    if( mem.nTitle ){\n      memcpy(z, mem.zTitle, mem.nTitle);\n    }\n    pHdr->iSize = nByte;\n    adjustStats(nByte, +1);\n    pInt = (int*)&pHdr[1];\n    pInt[nReserve/sizeof(int)] = REARGUARD;\n    randomFill((char*)pInt, nByte);\n    memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);\n    p = (void*)pInt;\n  }\n  sqlite3_mutex_leave(mem.mutex);\n  return p;\n}\n\n/*\n** Free memory.\n*/\nstatic void sqlite3MemFree(void *pPrior){\n  struct MemBlockHdr *pHdr;\n  void **pBt;\n  char *z;\n  assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0\n       || mem.mutex!=0 );\n  pHdr = sqlite3MemsysGetHeader(pPrior);\n  pBt = (void**)pHdr;\n  pBt -= pHdr->nBacktraceSlots;\n  sqlite3_mutex_enter(mem.mutex);\n  if( pHdr->pPrev ){\n    assert( pHdr->pPrev->pNext==pHdr );\n    pHdr->pPrev->pNext = pHdr->pNext;\n  }else{\n    assert( mem.pFirst==pHdr );\n    mem.pFirst = pHdr->pNext;\n  }\n  if( pHdr->pNext ){\n    assert( pHdr->pNext->pPrev==pHdr );\n    pHdr->pNext->pPrev = pHdr->pPrev;\n  }else{\n    assert( mem.pLast==pHdr );\n    mem.pLast = pHdr->pPrev;\n  }\n  z = (char*)pBt;\n  z -= pHdr->nTitle;\n  adjustStats((int)pHdr->iSize, -1);\n  randomFill(z, sizeof(void*)*pHdr->nBacktraceSlots + sizeof(*pHdr) +\n                (int)pHdr->iSize + sizeof(int) + pHdr->nTitle);\n  free(z);\n  sqlite3_mutex_leave(mem.mutex);\n}\n\n/*\n** Change the size of an existing memory allocation.\n**\n** For this debugging implementation, we *always* make a copy of the\n** allocation into a new place in memory.  In this way, if the\n** higher level code is using pointer to the old allocation, it is\n** much more likely to break and we are much more liking to find\n** the error.\n*/\nstatic void *sqlite3MemRealloc(void *pPrior, int nByte){\n  struct MemBlockHdr *pOldHdr;\n  void *pNew;\n  assert( mem.disallow==0 );\n  assert( (nByte & 7)==0 );     /* EV: R-46199-30249 */\n  pOldHdr = sqlite3MemsysGetHeader(pPrior);\n  pNew = sqlite3MemMalloc(nByte);\n  if( pNew ){\n    memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize));\n    if( nByte>pOldHdr->iSize ){\n      randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - (int)pOldHdr->iSize);\n    }\n    sqlite3MemFree(pPrior);\n  }\n  return pNew;\n}\n\n/*\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file.\n*/\nSQLITE_PRIVATE void sqlite3MemSetDefault(void){\n  static const sqlite3_mem_methods defaultMethods = {\n     sqlite3MemMalloc,\n     sqlite3MemFree,\n     sqlite3MemRealloc,\n     sqlite3MemSize,\n     sqlite3MemRoundup,\n     sqlite3MemInit,\n     sqlite3MemShutdown,\n     0\n  };\n  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);\n}\n\n/*\n** Set the \"type\" of an allocation.\n*/\nSQLITE_PRIVATE void sqlite3MemdebugSetType(void *p, u8 eType){\n  if( p && sqlite3GlobalConfig.m.xFree==sqlite3MemFree ){\n    struct MemBlockHdr *pHdr;\n    pHdr = sqlite3MemsysGetHeader(p);\n    assert( pHdr->iForeGuard==FOREGUARD );\n    pHdr->eType = eType;\n  }\n}\n\n/*\n** Return TRUE if the mask of type in eType matches the type of the\n** allocation p.  Also return true if p==NULL.\n**\n** This routine is designed for use within an assert() statement, to\n** verify the type of an allocation.  For example:\n**\n**     assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );\n*/\nSQLITE_PRIVATE int sqlite3MemdebugHasType(const void *p, u8 eType){\n  int rc = 1;\n  if( p && sqlite3GlobalConfig.m.xFree==sqlite3MemFree ){\n    struct MemBlockHdr *pHdr;\n    pHdr = sqlite3MemsysGetHeader(p);\n    assert( pHdr->iForeGuard==FOREGUARD );         /* Allocation is valid */\n    if( (pHdr->eType&eType)==0 ){\n      rc = 0;\n    }\n  }\n  return rc;\n}\n\n/*\n** Return TRUE if the mask of type in eType matches no bits of the type of the\n** allocation p.  Also return true if p==NULL.\n**\n** This routine is designed for use within an assert() statement, to\n** verify the type of an allocation.  For example:\n**\n**     assert( sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );\n*/\nSQLITE_PRIVATE int sqlite3MemdebugNoType(const void *p, u8 eType){\n  int rc = 1;\n  if( p && sqlite3GlobalConfig.m.xFree==sqlite3MemFree ){\n    struct MemBlockHdr *pHdr;\n    pHdr = sqlite3MemsysGetHeader(p);\n    assert( pHdr->iForeGuard==FOREGUARD );         /* Allocation is valid */\n    if( (pHdr->eType&eType)!=0 ){\n      rc = 0;\n    }\n  }\n  return rc;\n}\n\n/*\n** Set the number of backtrace levels kept for each allocation.\n** A value of zero turns off backtracing.  The number is always rounded\n** up to a multiple of 2.\n*/\nSQLITE_PRIVATE void sqlite3MemdebugBacktrace(int depth){\n  if( depth<0 ){ depth = 0; }\n  if( depth>20 ){ depth = 20; }\n  depth = (depth+1)&0xfe;\n  mem.nBacktrace = depth;\n}\n\nSQLITE_PRIVATE void sqlite3MemdebugBacktraceCallback(void (*xBacktrace)(int, int, void **)){\n  mem.xBacktrace = xBacktrace;\n}\n\n/*\n** Set the title string for subsequent allocations.\n*/\nSQLITE_PRIVATE void sqlite3MemdebugSettitle(const char *zTitle){\n  unsigned int n = sqlite3Strlen30(zTitle) + 1;\n  sqlite3_mutex_enter(mem.mutex);\n  if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;\n  memcpy(mem.zTitle, zTitle, n);\n  mem.zTitle[n] = 0;\n  mem.nTitle = ROUND8(n);\n  sqlite3_mutex_leave(mem.mutex);\n}\n\nSQLITE_PRIVATE void sqlite3MemdebugSync(){\n  struct MemBlockHdr *pHdr;\n  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){\n    void **pBt = (void**)pHdr;\n    pBt -= pHdr->nBacktraceSlots;\n    mem.xBacktrace((int)pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);\n  }\n}\n\n/*\n** Open the file indicated and write a log of all unfreed memory\n** allocations into that log.\n*/\nSQLITE_PRIVATE void sqlite3MemdebugDump(const char *zFilename){\n  FILE *out;\n  struct MemBlockHdr *pHdr;\n  void **pBt;\n  int i;\n  out = fopen(zFilename, \"w\");\n  if( out==0 ){\n    fprintf(stderr, \"** Unable to output memory debug output log: %s **\\n\",\n                    zFilename);\n    return;\n  }\n  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){\n    char *z = (char*)pHdr;\n    z -= pHdr->nBacktraceSlots*sizeof(void*) + pHdr->nTitle;\n    fprintf(out, \"**** %lld bytes at %p from %s ****\\n\",\n            pHdr->iSize, &pHdr[1], pHdr->nTitle ? z : \"???\");\n    if( pHdr->nBacktrace ){\n      fflush(out);\n      pBt = (void**)pHdr;\n      pBt -= pHdr->nBacktraceSlots;\n      backtrace_symbols_fd(pBt, pHdr->nBacktrace, fileno(out));\n      fprintf(out, \"\\n\");\n    }\n  }\n  fprintf(out, \"COUNTS:\\n\");\n  for(i=0; i<NCSIZE-1; i++){\n    if( mem.nAlloc[i] ){\n      fprintf(out, \"   %5d: %10d %10d %10d\\n\",\n            i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]);\n    }\n  }\n  if( mem.nAlloc[NCSIZE-1] ){\n    fprintf(out, \"   %5d: %10d %10d %10d\\n\",\n             NCSIZE*8-8, mem.nAlloc[NCSIZE-1],\n             mem.nCurrent[NCSIZE-1], mem.mxCurrent[NCSIZE-1]);\n  }\n  fclose(out);\n}\n\n/*\n** Return the number of times sqlite3MemMalloc() has been called.\n*/\nSQLITE_PRIVATE int sqlite3MemdebugMallocCount(){\n  int i;\n  int nTotal = 0;\n  for(i=0; i<NCSIZE; i++){\n    nTotal += mem.nAlloc[i];\n  }\n  return nTotal;\n}\n\n\n#endif /* SQLITE_MEMDEBUG */\n\n/************** End of mem2.c ************************************************/\n/************** Begin file mem3.c ********************************************/\n/*\n** 2007 October 14\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement a memory\n** allocation subsystem for use by SQLite.\n**\n** This version of the memory allocation subsystem omits all\n** use of malloc(). The SQLite user supplies a block of memory\n** before calling sqlite3_initialize() from which allocations\n** are made and returned by the xMalloc() and xRealloc()\n** implementations. Once sqlite3_initialize() has been called,\n** the amount of memory available to SQLite is fixed and cannot\n** be changed.\n**\n** This version of the memory allocation subsystem is included\n** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** This version of the memory allocator is only built into the library\n** SQLITE_ENABLE_MEMSYS3 is defined. Defining this symbol does not\n** mean that the library will use a memory-pool by default, just that\n** it is available. The mempool allocator is activated by calling\n** sqlite3_config().\n*/\n#ifdef SQLITE_ENABLE_MEMSYS3\n\n/*\n** Maximum size (in Mem3Blocks) of a \"small\" chunk.\n*/\n#define MX_SMALL 10\n\n\n/*\n** Number of freelist hash slots\n*/\n#define N_HASH  61\n\n/*\n** A memory allocation (also called a \"chunk\") consists of two or\n** more blocks where each block is 8 bytes.  The first 8 bytes are\n** a header that is not returned to the user.\n**\n** A chunk is two or more blocks that is either checked out or\n** free.  The first block has format u.hdr.  u.hdr.size4x is 4 times the\n** size of the allocation in blocks if the allocation is free.\n** The u.hdr.size4x&1 bit is true if the chunk is checked out and\n** false if the chunk is on the freelist.  The u.hdr.size4x&2 bit\n** is true if the previous chunk is checked out and false if the\n** previous chunk is free.  The u.hdr.prevSize field is the size of\n** the previous chunk in blocks if the previous chunk is on the\n** freelist. If the previous chunk is checked out, then\n** u.hdr.prevSize can be part of the data for that chunk and should\n** not be read or written.\n**\n** We often identify a chunk by its index in mem3.aPool[].  When\n** this is done, the chunk index refers to the second block of\n** the chunk.  In this way, the first chunk has an index of 1.\n** A chunk index of 0 means \"no such chunk\" and is the equivalent\n** of a NULL pointer.\n**\n** The second block of free chunks is of the form u.list.  The\n** two fields form a double-linked list of chunks of related sizes.\n** Pointers to the head of the list are stored in mem3.aiSmall[]\n** for smaller chunks and mem3.aiHash[] for larger chunks.\n**\n** The second block of a chunk is user data if the chunk is checked\n** out.  If a chunk is checked out, the user data may extend into\n** the u.hdr.prevSize value of the following chunk.\n*/\ntypedef struct Mem3Block Mem3Block;\nstruct Mem3Block {\n  union {\n    struct {\n      u32 prevSize;   /* Size of previous chunk in Mem3Block elements */\n      u32 size4x;     /* 4x the size of current chunk in Mem3Block elements */\n    } hdr;\n    struct {\n      u32 next;       /* Index in mem3.aPool[] of next free chunk */\n      u32 prev;       /* Index in mem3.aPool[] of previous free chunk */\n    } list;\n  } u;\n};\n\n/*\n** All of the static variables used by this module are collected\n** into a single structure named \"mem3\".  This is to keep the\n** static variables organized and to reduce namespace pollution\n** when this module is combined with other in the amalgamation.\n*/\nstatic SQLITE_WSD struct Mem3Global {\n  /*\n  ** Memory available for allocation. nPool is the size of the array\n  ** (in Mem3Blocks) pointed to by aPool less 2.\n  */\n  u32 nPool;\n  Mem3Block *aPool;\n\n  /*\n  ** True if we are evaluating an out-of-memory callback.\n  */\n  int alarmBusy;\n\n  /*\n  ** Mutex to control access to the memory allocation subsystem.\n  */\n  sqlite3_mutex *mutex;\n\n  /*\n  ** The minimum amount of free space that we have seen.\n  */\n  u32 mnKeyBlk;\n\n  /*\n  ** iKeyBlk is the index of the key chunk.  Most new allocations\n  ** occur off of this chunk.  szKeyBlk is the size (in Mem3Blocks)\n  ** of the current key chunk.  iKeyBlk is 0 if there is no key chunk.\n  ** The key chunk is not in either the aiHash[] or aiSmall[].\n  */\n  u32 iKeyBlk;\n  u32 szKeyBlk;\n\n  /*\n  ** Array of lists of free blocks according to the block size\n  ** for smaller chunks, or a hash on the block size for larger\n  ** chunks.\n  */\n  u32 aiSmall[MX_SMALL-1];   /* For sizes 2 through MX_SMALL, inclusive */\n  u32 aiHash[N_HASH];        /* For sizes MX_SMALL+1 and larger */\n} mem3 = { 97535575 };\n\n#define mem3 GLOBAL(struct Mem3Global, mem3)\n\n/*\n** Unlink the chunk at mem3.aPool[i] from list it is currently\n** on.  *pRoot is the list that i is a member of.\n*/\nstatic void memsys3UnlinkFromList(u32 i, u32 *pRoot){\n  u32 next = mem3.aPool[i].u.list.next;\n  u32 prev = mem3.aPool[i].u.list.prev;\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  if( prev==0 ){\n    *pRoot = next;\n  }else{\n    mem3.aPool[prev].u.list.next = next;\n  }\n  if( next ){\n    mem3.aPool[next].u.list.prev = prev;\n  }\n  mem3.aPool[i].u.list.next = 0;\n  mem3.aPool[i].u.list.prev = 0;\n}\n\n/*\n** Unlink the chunk at index i from\n** whatever list is currently a member of.\n*/\nstatic void memsys3Unlink(u32 i){\n  u32 size, hash;\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );\n  assert( i>=1 );\n  size = mem3.aPool[i-1].u.hdr.size4x/4;\n  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );\n  assert( size>=2 );\n  if( size <= MX_SMALL ){\n    memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]);\n  }else{\n    hash = size % N_HASH;\n    memsys3UnlinkFromList(i, &mem3.aiHash[hash]);\n  }\n}\n\n/*\n** Link the chunk at mem3.aPool[i] so that is on the list rooted\n** at *pRoot.\n*/\nstatic void memsys3LinkIntoList(u32 i, u32 *pRoot){\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  mem3.aPool[i].u.list.next = *pRoot;\n  mem3.aPool[i].u.list.prev = 0;\n  if( *pRoot ){\n    mem3.aPool[*pRoot].u.list.prev = i;\n  }\n  *pRoot = i;\n}\n\n/*\n** Link the chunk at index i into either the appropriate\n** small chunk list, or into the large chunk hash table.\n*/\nstatic void memsys3Link(u32 i){\n  u32 size, hash;\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( i>=1 );\n  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );\n  size = mem3.aPool[i-1].u.hdr.size4x/4;\n  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );\n  assert( size>=2 );\n  if( size <= MX_SMALL ){\n    memsys3LinkIntoList(i, &mem3.aiSmall[size-2]);\n  }else{\n    hash = size % N_HASH;\n    memsys3LinkIntoList(i, &mem3.aiHash[hash]);\n  }\n}\n\n/*\n** If the STATIC_MEM mutex is not already held, obtain it now. The mutex\n** will already be held (obtained by code in malloc.c) if\n** sqlite3GlobalConfig.bMemStat is true.\n*/\nstatic void memsys3Enter(void){\n  if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){\n    mem3.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);\n  }\n  sqlite3_mutex_enter(mem3.mutex);\n}\nstatic void memsys3Leave(void){\n  sqlite3_mutex_leave(mem3.mutex);\n}\n\n/*\n** Called when we are unable to satisfy an allocation of nBytes.\n*/\nstatic void memsys3OutOfMemory(int nByte){\n  if( !mem3.alarmBusy ){\n    mem3.alarmBusy = 1;\n    assert( sqlite3_mutex_held(mem3.mutex) );\n    sqlite3_mutex_leave(mem3.mutex);\n    sqlite3_release_memory(nByte);\n    sqlite3_mutex_enter(mem3.mutex);\n    mem3.alarmBusy = 0;\n  }\n}\n\n\n/*\n** Chunk i is a free chunk that has been unlinked.  Adjust its\n** size parameters for check-out and return a pointer to the\n** user portion of the chunk.\n*/\nstatic void *memsys3Checkout(u32 i, u32 nBlock){\n  u32 x;\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( i>=1 );\n  assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );\n  assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );\n  x = mem3.aPool[i-1].u.hdr.size4x;\n  mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2);\n  mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock;\n  mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2;\n  return &mem3.aPool[i];\n}\n\n/*\n** Carve a piece off of the end of the mem3.iKeyBlk free chunk.\n** Return a pointer to the new allocation.  Or, if the key chunk\n** is not large enough, return 0.\n*/\nstatic void *memsys3FromKeyBlk(u32 nBlock){\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( mem3.szKeyBlk>=nBlock );\n  if( nBlock>=mem3.szKeyBlk-1 ){\n    /* Use the entire key chunk */\n    void *p = memsys3Checkout(mem3.iKeyBlk, mem3.szKeyBlk);\n    mem3.iKeyBlk = 0;\n    mem3.szKeyBlk = 0;\n    mem3.mnKeyBlk = 0;\n    return p;\n  }else{\n    /* Split the key block.  Return the tail. */\n    u32 newi, x;\n    newi = mem3.iKeyBlk + mem3.szKeyBlk - nBlock;\n    assert( newi > mem3.iKeyBlk+1 );\n    mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.prevSize = nBlock;\n    mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.size4x |= 2;\n    mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1;\n    mem3.szKeyBlk -= nBlock;\n    mem3.aPool[newi-1].u.hdr.prevSize = mem3.szKeyBlk;\n    x = mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x & 2;\n    mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x = mem3.szKeyBlk*4 | x;\n    if( mem3.szKeyBlk < mem3.mnKeyBlk ){\n      mem3.mnKeyBlk = mem3.szKeyBlk;\n    }\n    return (void*)&mem3.aPool[newi];\n  }\n}\n\n/*\n** *pRoot is the head of a list of free chunks of the same size\n** or same size hash.  In other words, *pRoot is an entry in either\n** mem3.aiSmall[] or mem3.aiHash[].\n**\n** This routine examines all entries on the given list and tries\n** to coalesce each entries with adjacent free chunks.\n**\n** If it sees a chunk that is larger than mem3.iKeyBlk, it replaces\n** the current mem3.iKeyBlk with the new larger chunk.  In order for\n** this mem3.iKeyBlk replacement to work, the key chunk must be\n** linked into the hash tables.  That is not the normal state of\n** affairs, of course.  The calling routine must link the key\n** chunk before invoking this routine, then must unlink the (possibly\n** changed) key chunk once this routine has finished.\n*/\nstatic void memsys3Merge(u32 *pRoot){\n  u32 iNext, prev, size, i, x;\n\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  for(i=*pRoot; i>0; i=iNext){\n    iNext = mem3.aPool[i].u.list.next;\n    size = mem3.aPool[i-1].u.hdr.size4x;\n    assert( (size&1)==0 );\n    if( (size&2)==0 ){\n      memsys3UnlinkFromList(i, pRoot);\n      assert( i > mem3.aPool[i-1].u.hdr.prevSize );\n      prev = i - mem3.aPool[i-1].u.hdr.prevSize;\n      if( prev==iNext ){\n        iNext = mem3.aPool[prev].u.list.next;\n      }\n      memsys3Unlink(prev);\n      size = i + size/4 - prev;\n      x = mem3.aPool[prev-1].u.hdr.size4x & 2;\n      mem3.aPool[prev-1].u.hdr.size4x = size*4 | x;\n      mem3.aPool[prev+size-1].u.hdr.prevSize = size;\n      memsys3Link(prev);\n      i = prev;\n    }else{\n      size /= 4;\n    }\n    if( size>mem3.szKeyBlk ){\n      mem3.iKeyBlk = i;\n      mem3.szKeyBlk = size;\n    }\n  }\n}\n\n/*\n** Return a block of memory of at least nBytes in size.\n** Return NULL if unable.\n**\n** This function assumes that the necessary mutexes, if any, are\n** already held by the caller. Hence \"Unsafe\".\n*/\nstatic void *memsys3MallocUnsafe(int nByte){\n  u32 i;\n  u32 nBlock;\n  u32 toFree;\n\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( sizeof(Mem3Block)==8 );\n  if( nByte<=12 ){\n    nBlock = 2;\n  }else{\n    nBlock = (nByte + 11)/8;\n  }\n  assert( nBlock>=2 );\n\n  /* STEP 1:\n  ** Look for an entry of the correct size in either the small\n  ** chunk table or in the large chunk hash table.  This is\n  ** successful most of the time (about 9 times out of 10).\n  */\n  if( nBlock <= MX_SMALL ){\n    i = mem3.aiSmall[nBlock-2];\n    if( i>0 ){\n      memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]);\n      return memsys3Checkout(i, nBlock);\n    }\n  }else{\n    int hash = nBlock % N_HASH;\n    for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){\n      if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){\n        memsys3UnlinkFromList(i, &mem3.aiHash[hash]);\n        return memsys3Checkout(i, nBlock);\n      }\n    }\n  }\n\n  /* STEP 2:\n  ** Try to satisfy the allocation by carving a piece off of the end\n  ** of the key chunk.  This step usually works if step 1 fails.\n  */\n  if( mem3.szKeyBlk>=nBlock ){\n    return memsys3FromKeyBlk(nBlock);\n  }\n\n\n  /* STEP 3:\n  ** Loop through the entire memory pool.  Coalesce adjacent free\n  ** chunks.  Recompute the key chunk as the largest free chunk.\n  ** Then try again to satisfy the allocation by carving a piece off\n  ** of the end of the key chunk.  This step happens very\n  ** rarely (we hope!)\n  */\n  for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){\n    memsys3OutOfMemory(toFree);\n    if( mem3.iKeyBlk ){\n      memsys3Link(mem3.iKeyBlk);\n      mem3.iKeyBlk = 0;\n      mem3.szKeyBlk = 0;\n    }\n    for(i=0; i<N_HASH; i++){\n      memsys3Merge(&mem3.aiHash[i]);\n    }\n    for(i=0; i<MX_SMALL-1; i++){\n      memsys3Merge(&mem3.aiSmall[i]);\n    }\n    if( mem3.szKeyBlk ){\n      memsys3Unlink(mem3.iKeyBlk);\n      if( mem3.szKeyBlk>=nBlock ){\n        return memsys3FromKeyBlk(nBlock);\n      }\n    }\n  }\n\n  /* If none of the above worked, then we fail. */\n  return 0;\n}\n\n/*\n** Free an outstanding memory allocation.\n**\n** This function assumes that the necessary mutexes, if any, are\n** already held by the caller. Hence \"Unsafe\".\n*/\nstatic void memsys3FreeUnsafe(void *pOld){\n  Mem3Block *p = (Mem3Block*)pOld;\n  int i;\n  u32 size, x;\n  assert( sqlite3_mutex_held(mem3.mutex) );\n  assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );\n  i = p - mem3.aPool;\n  assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );\n  size = mem3.aPool[i-1].u.hdr.size4x/4;\n  assert( i+size<=mem3.nPool+1 );\n  mem3.aPool[i-1].u.hdr.size4x &= ~1;\n  mem3.aPool[i+size-1].u.hdr.prevSize = size;\n  mem3.aPool[i+size-1].u.hdr.size4x &= ~2;\n  memsys3Link(i);\n\n  /* Try to expand the key using the newly freed chunk */\n  if( mem3.iKeyBlk ){\n    while( (mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x&2)==0 ){\n      size = mem3.aPool[mem3.iKeyBlk-1].u.hdr.prevSize;\n      mem3.iKeyBlk -= size;\n      mem3.szKeyBlk += size;\n      memsys3Unlink(mem3.iKeyBlk);\n      x = mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x & 2;\n      mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x = mem3.szKeyBlk*4 | x;\n      mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.prevSize = mem3.szKeyBlk;\n    }\n    x = mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x & 2;\n    while( (mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.size4x&1)==0 ){\n      memsys3Unlink(mem3.iKeyBlk+mem3.szKeyBlk);\n      mem3.szKeyBlk += mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.size4x/4;\n      mem3.aPool[mem3.iKeyBlk-1].u.hdr.size4x = mem3.szKeyBlk*4 | x;\n      mem3.aPool[mem3.iKeyBlk+mem3.szKeyBlk-1].u.hdr.prevSize = mem3.szKeyBlk;\n    }\n  }\n}\n\n/*\n** Return the size of an outstanding allocation, in bytes.  The\n** size returned omits the 8-byte header overhead.  This only\n** works for chunks that are currently checked out.\n*/\nstatic int memsys3Size(void *p){\n  Mem3Block *pBlock;\n  assert( p!=0 );\n  pBlock = (Mem3Block*)p;\n  assert( (pBlock[-1].u.hdr.size4x&1)!=0 );\n  return (pBlock[-1].u.hdr.size4x&~3)*2 - 4;\n}\n\n/*\n** Round up a request size to the next valid allocation size.\n*/\nstatic int memsys3Roundup(int n){\n  if( n<=12 ){\n    return 12;\n  }else{\n    return ((n+11)&~7) - 4;\n  }\n}\n\n/*\n** Allocate nBytes of memory.\n*/\nstatic void *memsys3Malloc(int nBytes){\n  sqlite3_int64 *p;\n  assert( nBytes>0 );          /* malloc.c filters out 0 byte requests */\n  memsys3Enter();\n  p = memsys3MallocUnsafe(nBytes);\n  memsys3Leave();\n  return (void*)p;\n}\n\n/*\n** Free memory.\n*/\nstatic void memsys3Free(void *pPrior){\n  assert( pPrior );\n  memsys3Enter();\n  memsys3FreeUnsafe(pPrior);\n  memsys3Leave();\n}\n\n/*\n** Change the size of an existing memory allocation\n*/\nstatic void *memsys3Realloc(void *pPrior, int nBytes){\n  int nOld;\n  void *p;\n  if( pPrior==0 ){\n    return sqlite3_malloc(nBytes);\n  }\n  if( nBytes<=0 ){\n    sqlite3_free(pPrior);\n    return 0;\n  }\n  nOld = memsys3Size(pPrior);\n  if( nBytes<=nOld && nBytes>=nOld-128 ){\n    return pPrior;\n  }\n  memsys3Enter();\n  p = memsys3MallocUnsafe(nBytes);\n  if( p ){\n    if( nOld<nBytes ){\n      memcpy(p, pPrior, nOld);\n    }else{\n      memcpy(p, pPrior, nBytes);\n    }\n    memsys3FreeUnsafe(pPrior);\n  }\n  memsys3Leave();\n  return p;\n}\n\n/*\n** Initialize this module.\n*/\nstatic int memsys3Init(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  if( !sqlite3GlobalConfig.pHeap ){\n    return SQLITE_ERROR;\n  }\n\n  /* Store a pointer to the memory block in global structure mem3. */\n  assert( sizeof(Mem3Block)==8 );\n  mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap;\n  mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2;\n\n  /* Initialize the key block. */\n  mem3.szKeyBlk = mem3.nPool;\n  mem3.mnKeyBlk = mem3.szKeyBlk;\n  mem3.iKeyBlk = 1;\n  mem3.aPool[0].u.hdr.size4x = (mem3.szKeyBlk<<2) + 2;\n  mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool;\n  mem3.aPool[mem3.nPool].u.hdr.size4x = 1;\n\n  return SQLITE_OK;\n}\n\n/*\n** Deinitialize this module.\n*/\nstatic void memsys3Shutdown(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  mem3.mutex = 0;\n  return;\n}\n\n\n\n/*\n** Open the file indicated and write a log of all unfreed memory\n** allocations into that log.\n*/\nSQLITE_PRIVATE void sqlite3Memsys3Dump(const char *zFilename){\n#ifdef SQLITE_DEBUG\n  FILE *out;\n  u32 i, j;\n  u32 size;\n  if( zFilename==0 || zFilename[0]==0 ){\n    out = stdout;\n  }else{\n    out = fopen(zFilename, \"w\");\n    if( out==0 ){\n      fprintf(stderr, \"** Unable to output memory debug output log: %s **\\n\",\n                      zFilename);\n      return;\n    }\n  }\n  memsys3Enter();\n  fprintf(out, \"CHUNKS:\\n\");\n  for(i=1; i<=mem3.nPool; i+=size/4){\n    size = mem3.aPool[i-1].u.hdr.size4x;\n    if( size/4<=1 ){\n      fprintf(out, \"%p size error\\n\", &mem3.aPool[i]);\n      assert( 0 );\n      break;\n    }\n    if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){\n      fprintf(out, \"%p tail size does not match\\n\", &mem3.aPool[i]);\n      assert( 0 );\n      break;\n    }\n    if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){\n      fprintf(out, \"%p tail checkout bit is incorrect\\n\", &mem3.aPool[i]);\n      assert( 0 );\n      break;\n    }\n    if( size&1 ){\n      fprintf(out, \"%p %6d bytes checked out\\n\", &mem3.aPool[i], (size/4)*8-8);\n    }else{\n      fprintf(out, \"%p %6d bytes free%s\\n\", &mem3.aPool[i], (size/4)*8-8,\n                  i==mem3.iKeyBlk ? \" **key**\" : \"\");\n    }\n  }\n  for(i=0; i<MX_SMALL-1; i++){\n    if( mem3.aiSmall[i]==0 ) continue;\n    fprintf(out, \"small(%2d):\", i);\n    for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){\n      fprintf(out, \" %p(%d)\", &mem3.aPool[j],\n              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);\n    }\n    fprintf(out, \"\\n\");\n  }\n  for(i=0; i<N_HASH; i++){\n    if( mem3.aiHash[i]==0 ) continue;\n    fprintf(out, \"hash(%2d):\", i);\n    for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){\n      fprintf(out, \" %p(%d)\", &mem3.aPool[j],\n              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);\n    }\n    fprintf(out, \"\\n\");\n  }\n  fprintf(out, \"key=%d\\n\", mem3.iKeyBlk);\n  fprintf(out, \"nowUsed=%d\\n\", mem3.nPool*8 - mem3.szKeyBlk*8);\n  fprintf(out, \"mxUsed=%d\\n\", mem3.nPool*8 - mem3.mnKeyBlk*8);\n  sqlite3_mutex_leave(mem3.mutex);\n  if( out==stdout ){\n    fflush(stdout);\n  }else{\n    fclose(out);\n  }\n#else\n  UNUSED_PARAMETER(zFilename);\n#endif\n}\n\n/*\n** This routine is the only routine in this file with external\n** linkage.\n**\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file. The\n** arguments specify the block of memory to manage.\n**\n** This routine is only called by sqlite3_config(), and therefore\n** is not required to be threadsafe (it is not).\n*/\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void){\n  static const sqlite3_mem_methods mempoolMethods = {\n     memsys3Malloc,\n     memsys3Free,\n     memsys3Realloc,\n     memsys3Size,\n     memsys3Roundup,\n     memsys3Init,\n     memsys3Shutdown,\n     0\n  };\n  return &mempoolMethods;\n}\n\n#endif /* SQLITE_ENABLE_MEMSYS3 */\n\n/************** End of mem3.c ************************************************/\n/************** Begin file mem5.c ********************************************/\n/*\n** 2007 October 14\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement a memory\n** allocation subsystem for use by SQLite.\n**\n** This version of the memory allocation subsystem omits all\n** use of malloc(). The application gives SQLite a block of memory\n** before calling sqlite3_initialize() from which allocations\n** are made and returned by the xMalloc() and xRealloc()\n** implementations. Once sqlite3_initialize() has been called,\n** the amount of memory available to SQLite is fixed and cannot\n** be changed.\n**\n** This version of the memory allocation subsystem is included\n** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.\n**\n** This memory allocator uses the following algorithm:\n**\n**   1.  All memory allocation sizes are rounded up to a power of 2.\n**\n**   2.  If two adjacent free blocks are the halves of a larger block,\n**       then the two blocks are coalesced into the single larger block.\n**\n**   3.  New memory is allocated from the first available free block.\n**\n** This algorithm is described in: J. M. Robson. \"Bounds for Some Functions\n** Concerning Dynamic Storage Allocation\". Journal of the Association for\n** Computing Machinery, Volume 21, Number 8, July 1974, pages 491-499.\n**\n** Let n be the size of the largest allocation divided by the minimum\n** allocation size (after rounding all sizes up to a power of 2.)  Let M\n** be the maximum amount of memory ever outstanding at one time.  Let\n** N be the total amount of memory available for allocation.  Robson\n** proved that this memory allocator will never breakdown due to\n** fragmentation as long as the following constraint holds:\n**\n**      N >=  M*(1 + log2(n)/2) - n + 1\n**\n** The sqlite3_status() logic tracks the maximum values of n and M so\n** that an application can, at any time, verify this constraint.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** This version of the memory allocator is used only when\n** SQLITE_ENABLE_MEMSYS5 is defined.\n*/\n#ifdef SQLITE_ENABLE_MEMSYS5\n\n/*\n** A minimum allocation is an instance of the following structure.\n** Larger allocations are an array of these structures where the\n** size of the array is a power of 2.\n**\n** The size of this object must be a power of two.  That fact is\n** verified in memsys5Init().\n*/\ntypedef struct Mem5Link Mem5Link;\nstruct Mem5Link {\n  int next;       /* Index of next free chunk */\n  int prev;       /* Index of previous free chunk */\n};\n\n/*\n** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since\n** mem5.szAtom is always at least 8 and 32-bit integers are used,\n** it is not actually possible to reach this limit.\n*/\n#define LOGMAX 30\n\n/*\n** Masks used for mem5.aCtrl[] elements.\n*/\n#define CTRL_LOGSIZE  0x1f    /* Log2 Size of this block */\n#define CTRL_FREE     0x20    /* True if not checked out */\n\n/*\n** All of the static variables used by this module are collected\n** into a single structure named \"mem5\".  This is to keep the\n** static variables organized and to reduce namespace pollution\n** when this module is combined with other in the amalgamation.\n*/\nstatic SQLITE_WSD struct Mem5Global {\n  /*\n  ** Memory available for allocation\n  */\n  int szAtom;      /* Smallest possible allocation in bytes */\n  int nBlock;      /* Number of szAtom sized blocks in zPool */\n  u8 *zPool;       /* Memory available to be allocated */\n\n  /*\n  ** Mutex to control access to the memory allocation subsystem.\n  */\n  sqlite3_mutex *mutex;\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  /*\n  ** Performance statistics\n  */\n  u64 nAlloc;         /* Total number of calls to malloc */\n  u64 totalAlloc;     /* Total of all malloc calls - includes internal frag */\n  u64 totalExcess;    /* Total internal fragmentation */\n  u32 currentOut;     /* Current checkout, including internal fragmentation */\n  u32 currentCount;   /* Current number of distinct checkouts */\n  u32 maxOut;         /* Maximum instantaneous currentOut */\n  u32 maxCount;       /* Maximum instantaneous currentCount */\n  u32 maxRequest;     /* Largest allocation (exclusive of internal frag) */\n#endif\n\n  /*\n  ** Lists of free blocks.  aiFreelist[0] is a list of free blocks of\n  ** size mem5.szAtom.  aiFreelist[1] holds blocks of size szAtom*2.\n  ** aiFreelist[2] holds free blocks of size szAtom*4.  And so forth.\n  */\n  int aiFreelist[LOGMAX+1];\n\n  /*\n  ** Space for tracking which blocks are checked out and the size\n  ** of each block.  One byte per block.\n  */\n  u8 *aCtrl;\n\n} mem5;\n\n/*\n** Access the static variable through a macro for SQLITE_OMIT_WSD.\n*/\n#define mem5 GLOBAL(struct Mem5Global, mem5)\n\n/*\n** Assuming mem5.zPool is divided up into an array of Mem5Link\n** structures, return a pointer to the idx-th such link.\n*/\n#define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))\n\n/*\n** Unlink the chunk at mem5.aPool[i] from list it is currently\n** on.  It should be found on mem5.aiFreelist[iLogsize].\n*/\nstatic void memsys5Unlink(int i, int iLogsize){\n  int next, prev;\n  assert( i>=0 && i<mem5.nBlock );\n  assert( iLogsize>=0 && iLogsize<=LOGMAX );\n  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );\n\n  next = MEM5LINK(i)->next;\n  prev = MEM5LINK(i)->prev;\n  if( prev<0 ){\n    mem5.aiFreelist[iLogsize] = next;\n  }else{\n    MEM5LINK(prev)->next = next;\n  }\n  if( next>=0 ){\n    MEM5LINK(next)->prev = prev;\n  }\n}\n\n/*\n** Link the chunk at mem5.aPool[i] so that is on the iLogsize\n** free list.\n*/\nstatic void memsys5Link(int i, int iLogsize){\n  int x;\n  assert( sqlite3_mutex_held(mem5.mutex) );\n  assert( i>=0 && i<mem5.nBlock );\n  assert( iLogsize>=0 && iLogsize<=LOGMAX );\n  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );\n\n  x = MEM5LINK(i)->next = mem5.aiFreelist[iLogsize];\n  MEM5LINK(i)->prev = -1;\n  if( x>=0 ){\n    assert( x<mem5.nBlock );\n    MEM5LINK(x)->prev = i;\n  }\n  mem5.aiFreelist[iLogsize] = i;\n}\n\n/*\n** Obtain or release the mutex needed to access global data structures.\n*/\nstatic void memsys5Enter(void){\n  sqlite3_mutex_enter(mem5.mutex);\n}\nstatic void memsys5Leave(void){\n  sqlite3_mutex_leave(mem5.mutex);\n}\n\n/*\n** Return the size of an outstanding allocation, in bytes.\n** This only works for chunks that are currently checked out.\n*/\nstatic int memsys5Size(void *p){\n  int iSize, i;\n  assert( p!=0 );\n  i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom);\n  assert( i>=0 && i<mem5.nBlock );\n  iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));\n  return iSize;\n}\n\n/*\n** Return a block of memory of at least nBytes in size.\n** Return NULL if unable.  Return NULL if nBytes==0.\n**\n** The caller guarantees that nByte is positive.\n**\n** The caller has obtained a mutex prior to invoking this\n** routine so there is never any chance that two or more\n** threads can be in this routine at the same time.\n*/\nstatic void *memsys5MallocUnsafe(int nByte){\n  int i;           /* Index of a mem5.aPool[] slot */\n  int iBin;        /* Index into mem5.aiFreelist[] */\n  int iFullSz;     /* Size of allocation rounded up to power of 2 */\n  int iLogsize;    /* Log2 of iFullSz/POW2_MIN */\n\n  /* nByte must be a positive */\n  assert( nByte>0 );\n\n  /* No more than 1GiB per allocation */\n  if( nByte > 0x40000000 ) return 0;\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  /* Keep track of the maximum allocation request.  Even unfulfilled\n  ** requests are counted */\n  if( (u32)nByte>mem5.maxRequest ){\n    mem5.maxRequest = nByte;\n  }\n#endif\n\n\n  /* Round nByte up to the next valid power of two */\n  for(iFullSz=mem5.szAtom,iLogsize=0; iFullSz<nByte; iFullSz*=2,iLogsize++){}\n\n  /* Make sure mem5.aiFreelist[iLogsize] contains at least one free\n  ** block.  If not, then split a block of the next larger power of\n  ** two in order to create a new free block of size iLogsize.\n  */\n  for(iBin=iLogsize; iBin<=LOGMAX && mem5.aiFreelist[iBin]<0; iBin++){}\n  if( iBin>LOGMAX ){\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    sqlite3_log(SQLITE_NOMEM, \"failed to allocate %u bytes\", nByte);\n    return 0;\n  }\n  i = mem5.aiFreelist[iBin];\n  memsys5Unlink(i, iBin);\n  while( iBin>iLogsize ){\n    int newSize;\n\n    iBin--;\n    newSize = 1 << iBin;\n    mem5.aCtrl[i+newSize] = CTRL_FREE | iBin;\n    memsys5Link(i+newSize, iBin);\n  }\n  mem5.aCtrl[i] = iLogsize;\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  /* Update allocator performance statistics. */\n  mem5.nAlloc++;\n  mem5.totalAlloc += iFullSz;\n  mem5.totalExcess += iFullSz - nByte;\n  mem5.currentCount++;\n  mem5.currentOut += iFullSz;\n  if( mem5.maxCount<mem5.currentCount ) mem5.maxCount = mem5.currentCount;\n  if( mem5.maxOut<mem5.currentOut ) mem5.maxOut = mem5.currentOut;\n#endif\n\n#ifdef SQLITE_DEBUG\n  /* Make sure the allocated memory does not assume that it is set to zero\n  ** or retains a value from a previous allocation */\n  memset(&mem5.zPool[i*mem5.szAtom], 0xAA, iFullSz);\n#endif\n\n  /* Return a pointer to the allocated memory. */\n  return (void*)&mem5.zPool[i*mem5.szAtom];\n}\n\n/*\n** Free an outstanding memory allocation.\n*/\nstatic void memsys5FreeUnsafe(void *pOld){\n  u32 size, iLogsize;\n  int iBlock;\n\n  /* Set iBlock to the index of the block pointed to by pOld in\n  ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.\n  */\n  iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom);\n\n  /* Check that the pointer pOld points to a valid, non-free block. */\n  assert( iBlock>=0 && iBlock<mem5.nBlock );\n  assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );\n  assert( (mem5.aCtrl[iBlock] & CTRL_FREE)==0 );\n\n  iLogsize = mem5.aCtrl[iBlock] & CTRL_LOGSIZE;\n  size = 1<<iLogsize;\n  assert( iBlock+size-1<(u32)mem5.nBlock );\n\n  mem5.aCtrl[iBlock] |= CTRL_FREE;\n  mem5.aCtrl[iBlock+size-1] |= CTRL_FREE;\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  assert( mem5.currentCount>0 );\n  assert( mem5.currentOut>=(size*mem5.szAtom) );\n  mem5.currentCount--;\n  mem5.currentOut -= size*mem5.szAtom;\n  assert( mem5.currentOut>0 || mem5.currentCount==0 );\n  assert( mem5.currentCount>0 || mem5.currentOut==0 );\n#endif\n\n  mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;\n  while( ALWAYS(iLogsize<LOGMAX) ){\n    int iBuddy;\n    if( (iBlock>>iLogsize) & 1 ){\n      iBuddy = iBlock - size;\n      assert( iBuddy>=0 );\n    }else{\n      iBuddy = iBlock + size;\n      if( iBuddy>=mem5.nBlock ) break;\n    }\n    if( mem5.aCtrl[iBuddy]!=(CTRL_FREE | iLogsize) ) break;\n    memsys5Unlink(iBuddy, iLogsize);\n    iLogsize++;\n    if( iBuddy<iBlock ){\n      mem5.aCtrl[iBuddy] = CTRL_FREE | iLogsize;\n      mem5.aCtrl[iBlock] = 0;\n      iBlock = iBuddy;\n    }else{\n      mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;\n      mem5.aCtrl[iBuddy] = 0;\n    }\n    size *= 2;\n  }\n\n#ifdef SQLITE_DEBUG\n  /* Overwrite freed memory with the 0x55 bit pattern to verify that it is\n  ** not used after being freed */\n  memset(&mem5.zPool[iBlock*mem5.szAtom], 0x55, size);\n#endif\n\n  memsys5Link(iBlock, iLogsize);\n}\n\n/*\n** Allocate nBytes of memory.\n*/\nstatic void *memsys5Malloc(int nBytes){\n  sqlite3_int64 *p = 0;\n  if( nBytes>0 ){\n    memsys5Enter();\n    p = memsys5MallocUnsafe(nBytes);\n    memsys5Leave();\n  }\n  return (void*)p;\n}\n\n/*\n** Free memory.\n**\n** The outer layer memory allocator prevents this routine from\n** being called with pPrior==0.\n*/\nstatic void memsys5Free(void *pPrior){\n  assert( pPrior!=0 );\n  memsys5Enter();\n  memsys5FreeUnsafe(pPrior);\n  memsys5Leave();\n}\n\n/*\n** Change the size of an existing memory allocation.\n**\n** The outer layer memory allocator prevents this routine from\n** being called with pPrior==0.\n**\n** nBytes is always a value obtained from a prior call to\n** memsys5Round().  Hence nBytes is always a non-negative power\n** of two.  If nBytes==0 that means that an oversize allocation\n** (an allocation larger than 0x40000000) was requested and this\n** routine should return 0 without freeing pPrior.\n*/\nstatic void *memsys5Realloc(void *pPrior, int nBytes){\n  int nOld;\n  void *p;\n  assert( pPrior!=0 );\n  assert( (nBytes&(nBytes-1))==0 );  /* EV: R-46199-30249 */\n  assert( nBytes>=0 );\n  if( nBytes==0 ){\n    return 0;\n  }\n  nOld = memsys5Size(pPrior);\n  if( nBytes<=nOld ){\n    return pPrior;\n  }\n  p = memsys5Malloc(nBytes);\n  if( p ){\n    memcpy(p, pPrior, nOld);\n    memsys5Free(pPrior);\n  }\n  return p;\n}\n\n/*\n** Round up a request size to the next valid allocation size.  If\n** the allocation is too large to be handled by this allocation system,\n** return 0.\n**\n** All allocations must be a power of two and must be expressed by a\n** 32-bit signed integer.  Hence the largest allocation is 0x40000000\n** or 1073741824 bytes.\n*/\nstatic int memsys5Roundup(int n){\n  int iFullSz;\n  if( n<=mem5.szAtom*2 ){\n    if( n<=mem5.szAtom ) return mem5.szAtom;\n    return mem5.szAtom*2;\n  }\n  if( n>0x10000000 ){\n    if( n>0x40000000 ) return 0;\n    if( n>0x20000000 ) return 0x40000000;\n    return 0x20000000;\n  }\n  for(iFullSz=mem5.szAtom*8; iFullSz<n; iFullSz *= 4);\n  if( (iFullSz/2)>=(i64)n ) return iFullSz/2;\n  return iFullSz;\n}\n\n/*\n** Return the ceiling of the logarithm base 2 of iValue.\n**\n** Examples:   memsys5Log(1) -> 0\n**             memsys5Log(2) -> 1\n**             memsys5Log(4) -> 2\n**             memsys5Log(5) -> 3\n**             memsys5Log(8) -> 3\n**             memsys5Log(9) -> 4\n*/\nstatic int memsys5Log(int iValue){\n  int iLog;\n  for(iLog=0; (iLog<(int)((sizeof(int)*8)-1)) && (1<<iLog)<iValue; iLog++);\n  return iLog;\n}\n\n/*\n** Initialize the memory allocator.\n**\n** This routine is not threadsafe.  The caller must be holding a mutex\n** to prevent multiple threads from entering at the same time.\n*/\nstatic int memsys5Init(void *NotUsed){\n  int ii;            /* Loop counter */\n  int nByte;         /* Number of bytes of memory available to this allocator */\n  u8 *zByte;         /* Memory usable by this allocator */\n  int nMinLog;       /* Log base 2 of minimum allocation size in bytes */\n  int iOffset;       /* An offset into mem5.aCtrl[] */\n\n  UNUSED_PARAMETER(NotUsed);\n\n  /* For the purposes of this routine, disable the mutex */\n  mem5.mutex = 0;\n\n  /* The size of a Mem5Link object must be a power of two.  Verify that\n  ** this is case.\n  */\n  assert( (sizeof(Mem5Link)&(sizeof(Mem5Link)-1))==0 );\n\n  nByte = sqlite3GlobalConfig.nHeap;\n  zByte = (u8*)sqlite3GlobalConfig.pHeap;\n  assert( zByte!=0 );  /* sqlite3_config() does not allow otherwise */\n\n  /* boundaries on sqlite3GlobalConfig.mnReq are enforced in sqlite3_config() */\n  nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq);\n  mem5.szAtom = (1<<nMinLog);\n  while( (int)sizeof(Mem5Link)>mem5.szAtom ){\n    mem5.szAtom = mem5.szAtom << 1;\n  }\n\n  mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));\n  mem5.zPool = zByte;\n  mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];\n\n  for(ii=0; ii<=LOGMAX; ii++){\n    mem5.aiFreelist[ii] = -1;\n  }\n\n  iOffset = 0;\n  for(ii=LOGMAX; ii>=0; ii--){\n    int nAlloc = (1<<ii);\n    if( (iOffset+nAlloc)<=mem5.nBlock ){\n      mem5.aCtrl[iOffset] = ii | CTRL_FREE;\n      memsys5Link(iOffset, ii);\n      iOffset += nAlloc;\n    }\n    assert((iOffset+nAlloc)>mem5.nBlock);\n  }\n\n  /* If a mutex is required for normal operation, allocate one */\n  if( sqlite3GlobalConfig.bMemstat==0 ){\n    mem5.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Deinitialize this module.\n*/\nstatic void memsys5Shutdown(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  mem5.mutex = 0;\n  return;\n}\n\n#ifdef SQLITE_TEST\n/*\n** Open the file indicated and write a log of all unfreed memory\n** allocations into that log.\n*/\nSQLITE_PRIVATE void sqlite3Memsys5Dump(const char *zFilename){\n  FILE *out;\n  int i, j, n;\n  int nMinLog;\n\n  if( zFilename==0 || zFilename[0]==0 ){\n    out = stdout;\n  }else{\n    out = fopen(zFilename, \"w\");\n    if( out==0 ){\n      fprintf(stderr, \"** Unable to output memory debug output log: %s **\\n\",\n                      zFilename);\n      return;\n    }\n  }\n  memsys5Enter();\n  nMinLog = memsys5Log(mem5.szAtom);\n  for(i=0; i<=LOGMAX && i+nMinLog<32; i++){\n    for(n=0, j=mem5.aiFreelist[i]; j>=0; j = MEM5LINK(j)->next, n++){}\n    fprintf(out, \"freelist items of size %d: %d\\n\", mem5.szAtom << i, n);\n  }\n  fprintf(out, \"mem5.nAlloc       = %llu\\n\", mem5.nAlloc);\n  fprintf(out, \"mem5.totalAlloc   = %llu\\n\", mem5.totalAlloc);\n  fprintf(out, \"mem5.totalExcess  = %llu\\n\", mem5.totalExcess);\n  fprintf(out, \"mem5.currentOut   = %u\\n\", mem5.currentOut);\n  fprintf(out, \"mem5.currentCount = %u\\n\", mem5.currentCount);\n  fprintf(out, \"mem5.maxOut       = %u\\n\", mem5.maxOut);\n  fprintf(out, \"mem5.maxCount     = %u\\n\", mem5.maxCount);\n  fprintf(out, \"mem5.maxRequest   = %u\\n\", mem5.maxRequest);\n  memsys5Leave();\n  if( out==stdout ){\n    fflush(stdout);\n  }else{\n    fclose(out);\n  }\n}\n#endif\n\n/*\n** This routine is the only routine in this file with external\n** linkage. It returns a pointer to a static sqlite3_mem_methods\n** struct populated with the memsys5 methods.\n*/\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void){\n  static const sqlite3_mem_methods memsys5Methods = {\n     memsys5Malloc,\n     memsys5Free,\n     memsys5Realloc,\n     memsys5Size,\n     memsys5Roundup,\n     memsys5Init,\n     memsys5Shutdown,\n     0\n  };\n  return &memsys5Methods;\n}\n\n#endif /* SQLITE_ENABLE_MEMSYS5 */\n\n/************** End of mem5.c ************************************************/\n/************** Begin file mutex.c *******************************************/\n/*\n** 2007 August 14\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement mutexes.\n**\n** This file contains code that is common across all mutex implementations.\n*/\n/* #include \"sqliteInt.h\" */\n\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_MUTEX_OMIT)\n/*\n** For debugging purposes, record when the mutex subsystem is initialized\n** and uninitialized so that we can assert() if there is an attempt to\n** allocate a mutex while the system is uninitialized.\n*/\nstatic SQLITE_WSD int mutexIsInit = 0;\n#endif /* SQLITE_DEBUG && !defined(SQLITE_MUTEX_OMIT) */\n\n\n#ifndef SQLITE_MUTEX_OMIT\n\n#ifdef SQLITE_ENABLE_MULTITHREADED_CHECKS\n/*\n** This block (enclosed by SQLITE_ENABLE_MULTITHREADED_CHECKS) contains\n** the implementation of a wrapper around the system default mutex\n** implementation (sqlite3DefaultMutex()).\n**\n** Most calls are passed directly through to the underlying default\n** mutex implementation. Except, if a mutex is configured by calling\n** sqlite3MutexWarnOnContention() on it, then if contention is ever\n** encountered within xMutexEnter() a warning is emitted via sqlite3_log().\n**\n** This type of mutex is used as the database handle mutex when testing\n** apps that usually use SQLITE_CONFIG_MULTITHREAD mode.\n*/\n\n/*\n** Type for all mutexes used when SQLITE_ENABLE_MULTITHREADED_CHECKS\n** is defined. Variable CheckMutex.mutex is a pointer to the real mutex\n** allocated by the system mutex implementation. Variable iType is usually set\n** to the type of mutex requested - SQLITE_MUTEX_RECURSIVE, SQLITE_MUTEX_FAST\n** or one of the static mutex identifiers. Or, if this is a recursive mutex\n** that has been configured using sqlite3MutexWarnOnContention(), it is\n** set to SQLITE_MUTEX_WARNONCONTENTION.\n*/\ntypedef struct CheckMutex CheckMutex;\nstruct CheckMutex {\n  int iType;\n  sqlite3_mutex *mutex;\n};\n\n#define SQLITE_MUTEX_WARNONCONTENTION  (-1)\n\n/*\n** Pointer to real mutex methods object used by the CheckMutex\n** implementation. Set by checkMutexInit().\n*/\nstatic SQLITE_WSD const sqlite3_mutex_methods *pGlobalMutexMethods;\n\n#ifdef SQLITE_DEBUG\nstatic int checkMutexHeld(sqlite3_mutex *p){\n  return pGlobalMutexMethods->xMutexHeld(((CheckMutex*)p)->mutex);\n}\nstatic int checkMutexNotheld(sqlite3_mutex *p){\n  return pGlobalMutexMethods->xMutexNotheld(((CheckMutex*)p)->mutex);\n}\n#endif\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic int checkMutexInit(void){\n  pGlobalMutexMethods = sqlite3DefaultMutex();\n  return SQLITE_OK;\n}\nstatic int checkMutexEnd(void){\n  pGlobalMutexMethods = 0;\n  return SQLITE_OK;\n}\n\n/*\n** Allocate a mutex.\n*/\nstatic sqlite3_mutex *checkMutexAlloc(int iType){\n  static CheckMutex staticMutexes[] = {\n    {2, 0}, {3, 0}, {4, 0}, {5, 0},\n    {6, 0}, {7, 0}, {8, 0}, {9, 0},\n    {10, 0}, {11, 0}, {12, 0}, {13, 0}\n  };\n  CheckMutex *p = 0;\n\n  assert( SQLITE_MUTEX_RECURSIVE==1 && SQLITE_MUTEX_FAST==0 );\n  if( iType<2 ){\n    p = sqlite3MallocZero(sizeof(CheckMutex));\n    if( p==0 ) return 0;\n    p->iType = iType;\n  }else{\n#ifdef SQLITE_ENABLE_API_ARMOR\n    if( iType-2>=ArraySize(staticMutexes) ){\n      (void)SQLITE_MISUSE_BKPT;\n      return 0;\n    }\n#endif\n    p = &staticMutexes[iType-2];\n  }\n\n  if( p->mutex==0 ){\n    p->mutex = pGlobalMutexMethods->xMutexAlloc(iType);\n    if( p->mutex==0 ){\n      if( iType<2 ){\n        sqlite3_free(p);\n      }\n      p = 0;\n    }\n  }\n\n  return (sqlite3_mutex*)p;\n}\n\n/*\n** Free a mutex.\n*/\nstatic void checkMutexFree(sqlite3_mutex *p){\n  assert( SQLITE_MUTEX_RECURSIVE<2 );\n  assert( SQLITE_MUTEX_FAST<2 );\n  assert( SQLITE_MUTEX_WARNONCONTENTION<2 );\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ((CheckMutex*)p)->iType<2 )\n#endif\n  {\n    CheckMutex *pCheck = (CheckMutex*)p;\n    pGlobalMutexMethods->xMutexFree(pCheck->mutex);\n    sqlite3_free(pCheck);\n  }\n#ifdef SQLITE_ENABLE_API_ARMOR\n  else{\n    (void)SQLITE_MISUSE_BKPT;\n  }\n#endif\n}\n\n/*\n** Enter the mutex.\n*/\nstatic void checkMutexEnter(sqlite3_mutex *p){\n  CheckMutex *pCheck = (CheckMutex*)p;\n  if( pCheck->iType==SQLITE_MUTEX_WARNONCONTENTION ){\n    if( SQLITE_OK==pGlobalMutexMethods->xMutexTry(pCheck->mutex) ){\n      return;\n    }\n    sqlite3_log(SQLITE_MISUSE,\n        \"illegal multi-threaded access to database connection\"\n    );\n  }\n  pGlobalMutexMethods->xMutexEnter(pCheck->mutex);\n}\n\n/*\n** Enter the mutex (do not block).\n*/\nstatic int checkMutexTry(sqlite3_mutex *p){\n  CheckMutex *pCheck = (CheckMutex*)p;\n  return pGlobalMutexMethods->xMutexTry(pCheck->mutex);\n}\n\n/*\n** Leave the mutex.\n*/\nstatic void checkMutexLeave(sqlite3_mutex *p){\n  CheckMutex *pCheck = (CheckMutex*)p;\n  pGlobalMutexMethods->xMutexLeave(pCheck->mutex);\n}\n\nsqlite3_mutex_methods const *multiThreadedCheckMutex(void){\n  static const sqlite3_mutex_methods sMutex = {\n    checkMutexInit,\n    checkMutexEnd,\n    checkMutexAlloc,\n    checkMutexFree,\n    checkMutexEnter,\n    checkMutexTry,\n    checkMutexLeave,\n#ifdef SQLITE_DEBUG\n    checkMutexHeld,\n    checkMutexNotheld\n#else\n    0,\n    0\n#endif\n  };\n  return &sMutex;\n}\n\n/*\n** Mark the SQLITE_MUTEX_RECURSIVE mutex passed as the only argument as\n** one on which there should be no contention.\n*/\nSQLITE_PRIVATE void sqlite3MutexWarnOnContention(sqlite3_mutex *p){\n  if( sqlite3GlobalConfig.mutex.xMutexAlloc==checkMutexAlloc ){\n    CheckMutex *pCheck = (CheckMutex*)p;\n    assert( pCheck->iType==SQLITE_MUTEX_RECURSIVE );\n    pCheck->iType = SQLITE_MUTEX_WARNONCONTENTION;\n  }\n}\n#endif   /* ifdef SQLITE_ENABLE_MULTITHREADED_CHECKS */\n\n/*\n** Initialize the mutex system.\n*/\nSQLITE_PRIVATE int sqlite3MutexInit(void){\n  int rc = SQLITE_OK;\n  if( !sqlite3GlobalConfig.mutex.xMutexAlloc ){\n    /* If the xMutexAlloc method has not been set, then the user did not\n    ** install a mutex implementation via sqlite3_config() prior to\n    ** sqlite3_initialize() being called. This block copies pointers to\n    ** the default implementation into the sqlite3GlobalConfig structure.\n    */\n    sqlite3_mutex_methods const *pFrom;\n    sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex;\n\n    if( sqlite3GlobalConfig.bCoreMutex ){\n#ifdef SQLITE_ENABLE_MULTITHREADED_CHECKS\n      pFrom = multiThreadedCheckMutex();\n#else\n      pFrom = sqlite3DefaultMutex();\n#endif\n    }else{\n      pFrom = sqlite3NoopMutex();\n    }\n    pTo->xMutexInit = pFrom->xMutexInit;\n    pTo->xMutexEnd = pFrom->xMutexEnd;\n    pTo->xMutexFree = pFrom->xMutexFree;\n    pTo->xMutexEnter = pFrom->xMutexEnter;\n    pTo->xMutexTry = pFrom->xMutexTry;\n    pTo->xMutexLeave = pFrom->xMutexLeave;\n    pTo->xMutexHeld = pFrom->xMutexHeld;\n    pTo->xMutexNotheld = pFrom->xMutexNotheld;\n    sqlite3MemoryBarrier();\n    pTo->xMutexAlloc = pFrom->xMutexAlloc;\n  }\n  assert( sqlite3GlobalConfig.mutex.xMutexInit );\n  rc = sqlite3GlobalConfig.mutex.xMutexInit();\n\n#ifdef SQLITE_DEBUG\n  GLOBAL(int, mutexIsInit) = 1;\n#endif\n\n  sqlite3MemoryBarrier();\n  return rc;\n}\n\n/*\n** Shutdown the mutex system. This call frees resources allocated by\n** sqlite3MutexInit().\n*/\nSQLITE_PRIVATE int sqlite3MutexEnd(void){\n  int rc = SQLITE_OK;\n  if( sqlite3GlobalConfig.mutex.xMutexEnd ){\n    rc = sqlite3GlobalConfig.mutex.xMutexEnd();\n  }\n\n#ifdef SQLITE_DEBUG\n  GLOBAL(int, mutexIsInit) = 0;\n#endif\n\n  return rc;\n}\n\n/*\n** Retrieve a pointer to a static mutex or allocate a new dynamic one.\n*/\nSQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;\n  if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;\n#endif\n  assert( sqlite3GlobalConfig.mutex.xMutexAlloc );\n  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);\n}\n\nSQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){\n  if( !sqlite3GlobalConfig.bCoreMutex ){\n    return 0;\n  }\n  assert( GLOBAL(int, mutexIsInit) );\n  assert( sqlite3GlobalConfig.mutex.xMutexAlloc );\n  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);\n}\n\n/*\n** Free a dynamic mutex.\n*/\nSQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){\n  if( p ){\n    assert( sqlite3GlobalConfig.mutex.xMutexFree );\n    sqlite3GlobalConfig.mutex.xMutexFree(p);\n  }\n}\n\n/*\n** Obtain the mutex p. If some other thread already has the mutex, block\n** until it can be obtained.\n*/\nSQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){\n  if( p ){\n    assert( sqlite3GlobalConfig.mutex.xMutexEnter );\n    sqlite3GlobalConfig.mutex.xMutexEnter(p);\n  }\n}\n\n/*\n** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another\n** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.\n*/\nSQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){\n  int rc = SQLITE_OK;\n  if( p ){\n    assert( sqlite3GlobalConfig.mutex.xMutexTry );\n    return sqlite3GlobalConfig.mutex.xMutexTry(p);\n  }\n  return rc;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was previously\n** entered by the same thread.  The behavior is undefined if the mutex\n** is not currently entered. If a NULL pointer is passed as an argument\n** this function is a no-op.\n*/\nSQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){\n  if( p ){\n    assert( sqlite3GlobalConfig.mutex.xMutexLeave );\n    sqlite3GlobalConfig.mutex.xMutexLeave(p);\n  }\n}\n\n#ifndef NDEBUG\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use inside assert() statements.\n**\n** Because these routines raise false-positive alerts in TSAN, disable\n** them (make them always return 1) when compiling with TSAN.\n*/\nSQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){\n# if defined(__has_feature)\n#   if __has_feature(thread_sanitizer)\n      p = 0;\n#   endif\n# endif\n  assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );\n  return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);\n}\nSQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){\n# if defined(__has_feature)\n#   if __has_feature(thread_sanitizer)\n      p = 0;\n#   endif\n# endif\n  assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );\n  return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);\n}\n#endif /* NDEBUG */\n\n#endif /* !defined(SQLITE_MUTEX_OMIT) */\n\n/************** End of mutex.c ***********************************************/\n/************** Begin file mutex_noop.c **************************************/\n/*\n** 2008 October 07\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement mutexes.\n**\n** This implementation in this file does not provide any mutual\n** exclusion and is thus suitable for use only in applications\n** that use SQLite in a single thread.  The routines defined\n** here are place-holders.  Applications can substitute working\n** mutex routines at start-time using the\n**\n**     sqlite3_config(SQLITE_CONFIG_MUTEX,...)\n**\n** interface.\n**\n** If compiled with SQLITE_DEBUG, then additional logic is inserted\n** that does error checking on mutexes to make sure they are being\n** called correctly.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_MUTEX_OMIT\n\n#ifndef SQLITE_DEBUG\n/*\n** Stub routines for all mutex methods.\n**\n** This routines provide no mutual exclusion or error checking.\n*/\nstatic int noopMutexInit(void){ return SQLITE_OK; }\nstatic int noopMutexEnd(void){ return SQLITE_OK; }\nstatic sqlite3_mutex *noopMutexAlloc(int id){\n  UNUSED_PARAMETER(id);\n  return (sqlite3_mutex*)8;\n}\nstatic void noopMutexFree(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }\nstatic void noopMutexEnter(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }\nstatic int noopMutexTry(sqlite3_mutex *p){\n  UNUSED_PARAMETER(p);\n  return SQLITE_OK;\n}\nstatic void noopMutexLeave(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }\n\nSQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3NoopMutex(void){\n  static const sqlite3_mutex_methods sMutex = {\n    noopMutexInit,\n    noopMutexEnd,\n    noopMutexAlloc,\n    noopMutexFree,\n    noopMutexEnter,\n    noopMutexTry,\n    noopMutexLeave,\n\n    0,\n    0,\n  };\n\n  return &sMutex;\n}\n#endif /* !SQLITE_DEBUG */\n\n#ifdef SQLITE_DEBUG\n/*\n** In this implementation, error checking is provided for testing\n** and debugging purposes.  The mutexes still do not provide any\n** mutual exclusion.\n*/\n\n/*\n** The mutex object\n*/\ntypedef struct sqlite3_debug_mutex {\n  int id;     /* The mutex type */\n  int cnt;    /* Number of entries without a matching leave */\n} sqlite3_debug_mutex;\n\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use inside assert() statements.\n*/\nstatic int debugMutexHeld(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  return p==0 || p->cnt>0;\n}\nstatic int debugMutexNotheld(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  return p==0 || p->cnt==0;\n}\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic int debugMutexInit(void){ return SQLITE_OK; }\nstatic int debugMutexEnd(void){ return SQLITE_OK; }\n\n/*\n** The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it.  If it returns NULL\n** that means that a mutex could not be allocated.\n*/\nstatic sqlite3_mutex *debugMutexAlloc(int id){\n  static sqlite3_debug_mutex aStatic[SQLITE_MUTEX_STATIC_VFS3 - 1];\n  sqlite3_debug_mutex *pNew = 0;\n  switch( id ){\n    case SQLITE_MUTEX_FAST:\n    case SQLITE_MUTEX_RECURSIVE: {\n      pNew = sqlite3Malloc(sizeof(*pNew));\n      if( pNew ){\n        pNew->id = id;\n        pNew->cnt = 0;\n      }\n      break;\n    }\n    default: {\n#ifdef SQLITE_ENABLE_API_ARMOR\n      if( id-2<0 || id-2>=ArraySize(aStatic) ){\n        (void)SQLITE_MISUSE_BKPT;\n        return 0;\n      }\n#endif\n      pNew = &aStatic[id-2];\n      pNew->id = id;\n      break;\n    }\n  }\n  return (sqlite3_mutex*)pNew;\n}\n\n/*\n** This routine deallocates a previously allocated mutex.\n*/\nstatic void debugMutexFree(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  assert( p->cnt==0 );\n  if( p->id==SQLITE_MUTEX_RECURSIVE || p->id==SQLITE_MUTEX_FAST ){\n    sqlite3_free(p);\n  }else{\n#ifdef SQLITE_ENABLE_API_ARMOR\n    (void)SQLITE_MISUSE_BKPT;\n#endif\n  }\n}\n\n/*\n** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK\n** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can\n** be entered multiple times by the same thread.  In such cases the,\n** mutex must be exited an equal number of times before another thread\n** can enter.  If the same thread tries to enter any other kind of mutex\n** more than once, the behavior is undefined.\n*/\nstatic void debugMutexEnter(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );\n  p->cnt++;\n}\nstatic int debugMutexTry(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );\n  p->cnt++;\n  return SQLITE_OK;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.  The behavior\n** is undefined if the mutex is not currently entered or\n** is not currently allocated.  SQLite will never do either.\n*/\nstatic void debugMutexLeave(sqlite3_mutex *pX){\n  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;\n  assert( debugMutexHeld(pX) );\n  p->cnt--;\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );\n}\n\nSQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3NoopMutex(void){\n  static const sqlite3_mutex_methods sMutex = {\n    debugMutexInit,\n    debugMutexEnd,\n    debugMutexAlloc,\n    debugMutexFree,\n    debugMutexEnter,\n    debugMutexTry,\n    debugMutexLeave,\n\n    debugMutexHeld,\n    debugMutexNotheld\n  };\n\n  return &sMutex;\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation\n** is used regardless of the run-time threadsafety setting.\n*/\n#ifdef SQLITE_MUTEX_NOOP\nSQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){\n  return sqlite3NoopMutex();\n}\n#endif /* defined(SQLITE_MUTEX_NOOP) */\n#endif /* !defined(SQLITE_MUTEX_OMIT) */\n\n/************** End of mutex_noop.c ******************************************/\n/************** Begin file mutex_unix.c **************************************/\n/*\n** 2007 August 28\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement mutexes for pthreads\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** The code in this file is only used if we are compiling threadsafe\n** under unix with pthreads.\n**\n** Note that this implementation requires a version of pthreads that\n** supports recursive mutexes.\n*/\n#ifdef SQLITE_MUTEX_PTHREADS\n\n#include <pthread.h>\n\n/*\n** The sqlite3_mutex.id, sqlite3_mutex.nRef, and sqlite3_mutex.owner fields\n** are necessary under two conditions:  (1) Debug builds and (2) using\n** home-grown mutexes.  Encapsulate these conditions into a single #define.\n*/\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HOMEGROWN_RECURSIVE_MUTEX)\n# define SQLITE_MUTEX_NREF 1\n#else\n# define SQLITE_MUTEX_NREF 0\n#endif\n\n/*\n** Each recursive mutex is an instance of the following structure.\n*/\nstruct sqlite3_mutex {\n  pthread_mutex_t mutex;     /* Mutex controlling the lock */\n#if SQLITE_MUTEX_NREF || defined(SQLITE_ENABLE_API_ARMOR)\n  int id;                    /* Mutex type */\n#endif\n#if SQLITE_MUTEX_NREF\n  volatile int nRef;         /* Number of entrances */\n  volatile pthread_t owner;  /* Thread that is within this mutex */\n  int trace;                 /* True to trace changes */\n#endif\n};\n#if SQLITE_MUTEX_NREF\n# define SQLITE3_MUTEX_INITIALIZER(id) \\\n     {PTHREAD_MUTEX_INITIALIZER,id,0,(pthread_t)0,0}\n#elif defined(SQLITE_ENABLE_API_ARMOR)\n# define SQLITE3_MUTEX_INITIALIZER(id) { PTHREAD_MUTEX_INITIALIZER, id }\n#else\n#define SQLITE3_MUTEX_INITIALIZER(id) { PTHREAD_MUTEX_INITIALIZER }\n#endif\n\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use only inside assert() statements.  On some platforms,\n** there might be race conditions that can cause these routines to\n** deliver incorrect results.  In particular, if pthread_equal() is\n** not an atomic operation, then these routines might delivery\n** incorrect results.  On most platforms, pthread_equal() is a\n** comparison of two integers and is therefore atomic.  But we are\n** told that HPUX is not such a platform.  If so, then these routines\n** will not always work correctly on HPUX.\n**\n** On those platforms where pthread_equal() is not atomic, SQLite\n** should be compiled without -DSQLITE_DEBUG and with -DNDEBUG to\n** make sure no assert() statements are evaluated and hence these\n** routines are never called.\n*/\n#if !defined(NDEBUG) || defined(SQLITE_DEBUG)\nstatic int pthreadMutexHeld(sqlite3_mutex *p){\n  return (p->nRef!=0 && pthread_equal(p->owner, pthread_self()));\n}\nstatic int pthreadMutexNotheld(sqlite3_mutex *p){\n  return p->nRef==0 || pthread_equal(p->owner, pthread_self())==0;\n}\n#endif\n\n/*\n** Try to provide a memory barrier operation, needed for initialization\n** and also for the implementation of xShmBarrier in the VFS in cases\n** where SQLite is compiled without mutexes.\n*/\nSQLITE_PRIVATE void sqlite3MemoryBarrier(void){\n#if defined(SQLITE_MEMORY_BARRIER)\n  SQLITE_MEMORY_BARRIER;\n#elif defined(__GNUC__) && GCC_VERSION>=4001000\n  __sync_synchronize();\n#endif\n}\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic int pthreadMutexInit(void){ return SQLITE_OK; }\nstatic int pthreadMutexEnd(void){ return SQLITE_OK; }\n\n/*\n** The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it.  If it returns NULL\n** that means that a mutex could not be allocated.  SQLite\n** will unwind its stack and return an error.  The argument\n** to sqlite3_mutex_alloc() is one of these integer constants:\n**\n** <ul>\n** <li>  SQLITE_MUTEX_FAST\n** <li>  SQLITE_MUTEX_RECURSIVE\n** <li>  SQLITE_MUTEX_STATIC_MAIN\n** <li>  SQLITE_MUTEX_STATIC_MEM\n** <li>  SQLITE_MUTEX_STATIC_OPEN\n** <li>  SQLITE_MUTEX_STATIC_PRNG\n** <li>  SQLITE_MUTEX_STATIC_LRU\n** <li>  SQLITE_MUTEX_STATIC_PMEM\n** <li>  SQLITE_MUTEX_STATIC_APP1\n** <li>  SQLITE_MUTEX_STATIC_APP2\n** <li>  SQLITE_MUTEX_STATIC_APP3\n** <li>  SQLITE_MUTEX_STATIC_VFS1\n** <li>  SQLITE_MUTEX_STATIC_VFS2\n** <li>  SQLITE_MUTEX_STATIC_VFS3\n** </ul>\n**\n** The first two constants cause sqlite3_mutex_alloc() to create\n** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\n** The mutex implementation does not need to make a distinction\n** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n** not want to.  But SQLite will only request a recursive mutex in\n** cases where it really needs one.  If a faster non-recursive mutex\n** implementation is available on the host platform, the mutex subsystem\n** might return such a mutex in response to SQLITE_MUTEX_FAST.\n**\n** The other allowed parameters to sqlite3_mutex_alloc() each return\n** a pointer to a static preexisting mutex.  Six static mutexes are\n** used by the current version of SQLite.  Future versions of SQLite\n** may add additional static mutexes.  Static mutexes are for internal\n** use by SQLite only.  Applications that use SQLite mutexes should\n** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n** SQLITE_MUTEX_RECURSIVE.\n**\n** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n** returns a different mutex on every call.  But for the static\n** mutex types, the same mutex is returned on every call that has\n** the same type number.\n*/\nstatic sqlite3_mutex *pthreadMutexAlloc(int iType){\n  static sqlite3_mutex staticMutexes[] = {\n    SQLITE3_MUTEX_INITIALIZER(2),\n    SQLITE3_MUTEX_INITIALIZER(3),\n    SQLITE3_MUTEX_INITIALIZER(4),\n    SQLITE3_MUTEX_INITIALIZER(5),\n    SQLITE3_MUTEX_INITIALIZER(6),\n    SQLITE3_MUTEX_INITIALIZER(7),\n    SQLITE3_MUTEX_INITIALIZER(8),\n    SQLITE3_MUTEX_INITIALIZER(9),\n    SQLITE3_MUTEX_INITIALIZER(10),\n    SQLITE3_MUTEX_INITIALIZER(11),\n    SQLITE3_MUTEX_INITIALIZER(12),\n    SQLITE3_MUTEX_INITIALIZER(13)\n  };\n  sqlite3_mutex *p;\n  switch( iType ){\n    case SQLITE_MUTEX_RECURSIVE: {\n      p = sqlite3MallocZero( sizeof(*p) );\n      if( p ){\n#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX\n        /* If recursive mutexes are not available, we will have to\n        ** build our own.  See below. */\n        pthread_mutex_init(&p->mutex, 0);\n#else\n        /* Use a recursive mutex if it is available */\n        pthread_mutexattr_t recursiveAttr;\n        pthread_mutexattr_init(&recursiveAttr);\n        pthread_mutexattr_settype(&recursiveAttr, PTHREAD_MUTEX_RECURSIVE);\n        pthread_mutex_init(&p->mutex, &recursiveAttr);\n        pthread_mutexattr_destroy(&recursiveAttr);\n#endif\n#if SQLITE_MUTEX_NREF || defined(SQLITE_ENABLE_API_ARMOR)\n        p->id = SQLITE_MUTEX_RECURSIVE;\n#endif\n      }\n      break;\n    }\n    case SQLITE_MUTEX_FAST: {\n      p = sqlite3MallocZero( sizeof(*p) );\n      if( p ){\n        pthread_mutex_init(&p->mutex, 0);\n#if SQLITE_MUTEX_NREF || defined(SQLITE_ENABLE_API_ARMOR)\n        p->id = SQLITE_MUTEX_FAST;\n#endif\n      }\n      break;\n    }\n    default: {\n#ifdef SQLITE_ENABLE_API_ARMOR\n      if( iType-2<0 || iType-2>=ArraySize(staticMutexes) ){\n        (void)SQLITE_MISUSE_BKPT;\n        return 0;\n      }\n#endif\n      p = &staticMutexes[iType-2];\n      break;\n    }\n  }\n#if SQLITE_MUTEX_NREF || defined(SQLITE_ENABLE_API_ARMOR)\n  assert( p==0 || p->id==iType );\n#endif\n  return p;\n}\n\n\n/*\n** This routine deallocates a previously\n** allocated mutex.  SQLite is careful to deallocate every\n** mutex that it allocates.\n*/\nstatic void pthreadMutexFree(sqlite3_mutex *p){\n  assert( p->nRef==0 );\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE )\n#endif\n  {\n    pthread_mutex_destroy(&p->mutex);\n    sqlite3_free(p);\n  }\n#ifdef SQLITE_ENABLE_API_ARMOR\n  else{\n    (void)SQLITE_MISUSE_BKPT;\n  }\n#endif\n}\n\n/*\n** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK\n** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can\n** be entered multiple times by the same thread.  In such cases the,\n** mutex must be exited an equal number of times before another thread\n** can enter.  If the same thread tries to enter any other kind of mutex\n** more than once, the behavior is undefined.\n*/\nstatic void pthreadMutexEnter(sqlite3_mutex *p){\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );\n\n#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX\n  /* If recursive mutexes are not available, then we have to grow\n  ** our own.  This implementation assumes that pthread_equal()\n  ** is atomic - that it cannot be deceived into thinking self\n  ** and p->owner are equal if p->owner changes between two values\n  ** that are not equal to self while the comparison is taking place.\n  ** This implementation also assumes a coherent cache - that\n  ** separate processes cannot read different values from the same\n  ** address at the same time.  If either of these two conditions\n  ** are not met, then the mutexes will fail and problems will result.\n  */\n  {\n    pthread_t self = pthread_self();\n    if( p->nRef>0 && pthread_equal(p->owner, self) ){\n      p->nRef++;\n    }else{\n      pthread_mutex_lock(&p->mutex);\n      assert( p->nRef==0 );\n      p->owner = self;\n      p->nRef = 1;\n    }\n  }\n#else\n  /* Use the built-in recursive mutexes if they are available.\n  */\n  pthread_mutex_lock(&p->mutex);\n#if SQLITE_MUTEX_NREF\n  assert( p->nRef>0 || p->owner==0 );\n  p->owner = pthread_self();\n  p->nRef++;\n#endif\n#endif\n\n#ifdef SQLITE_DEBUG\n  if( p->trace ){\n    printf(\"enter mutex %p (%d) with nRef=%d\\n\", p, p->trace, p->nRef);\n  }\n#endif\n}\nstatic int pthreadMutexTry(sqlite3_mutex *p){\n  int rc;\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );\n\n#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX\n  /* If recursive mutexes are not available, then we have to grow\n  ** our own.  This implementation assumes that pthread_equal()\n  ** is atomic - that it cannot be deceived into thinking self\n  ** and p->owner are equal if p->owner changes between two values\n  ** that are not equal to self while the comparison is taking place.\n  ** This implementation also assumes a coherent cache - that\n  ** separate processes cannot read different values from the same\n  ** address at the same time.  If either of these two conditions\n  ** are not met, then the mutexes will fail and problems will result.\n  */\n  {\n    pthread_t self = pthread_self();\n    if( p->nRef>0 && pthread_equal(p->owner, self) ){\n      p->nRef++;\n      rc = SQLITE_OK;\n    }else if( pthread_mutex_trylock(&p->mutex)==0 ){\n      assert( p->nRef==0 );\n      p->owner = self;\n      p->nRef = 1;\n      rc = SQLITE_OK;\n    }else{\n      rc = SQLITE_BUSY;\n    }\n  }\n#else\n  /* Use the built-in recursive mutexes if they are available.\n  */\n  if( pthread_mutex_trylock(&p->mutex)==0 ){\n#if SQLITE_MUTEX_NREF\n    p->owner = pthread_self();\n    p->nRef++;\n#endif\n    rc = SQLITE_OK;\n  }else{\n    rc = SQLITE_BUSY;\n  }\n#endif\n\n#ifdef SQLITE_DEBUG\n  if( rc==SQLITE_OK && p->trace ){\n    printf(\"enter mutex %p (%d) with nRef=%d\\n\", p, p->trace, p->nRef);\n  }\n#endif\n  return rc;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.  The behavior\n** is undefined if the mutex is not currently entered or\n** is not currently allocated.  SQLite will never do either.\n*/\nstatic void pthreadMutexLeave(sqlite3_mutex *p){\n  assert( pthreadMutexHeld(p) );\n#if SQLITE_MUTEX_NREF\n  p->nRef--;\n  if( p->nRef==0 ) p->owner = 0;\n#endif\n  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );\n\n#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX\n  if( p->nRef==0 ){\n    pthread_mutex_unlock(&p->mutex);\n  }\n#else\n  pthread_mutex_unlock(&p->mutex);\n#endif\n\n#ifdef SQLITE_DEBUG\n  if( p->trace ){\n    printf(\"leave mutex %p (%d) with nRef=%d\\n\", p, p->trace, p->nRef);\n  }\n#endif\n}\n\nSQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){\n  static const sqlite3_mutex_methods sMutex = {\n    pthreadMutexInit,\n    pthreadMutexEnd,\n    pthreadMutexAlloc,\n    pthreadMutexFree,\n    pthreadMutexEnter,\n    pthreadMutexTry,\n    pthreadMutexLeave,\n#ifdef SQLITE_DEBUG\n    pthreadMutexHeld,\n    pthreadMutexNotheld\n#else\n    0,\n    0\n#endif\n  };\n\n  return &sMutex;\n}\n\n#endif /* SQLITE_MUTEX_PTHREADS */\n\n/************** End of mutex_unix.c ******************************************/\n/************** Begin file mutex_w32.c ***************************************/\n/*\n** 2007 August 14\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C functions that implement mutexes for Win32.\n*/\n/* #include \"sqliteInt.h\" */\n\n#if SQLITE_OS_WIN\n/*\n** Include code that is common to all os_*.c files\n*/\n/* #include \"os_common.h\" */\n\n/*\n** Include the header file for the Windows VFS.\n*/\n/************** Include os_win.h in the middle of mutex_w32.c ****************/\n/************** Begin file os_win.h ******************************************/\n/*\n** 2013 November 25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains code that is specific to Windows.\n*/\n#ifndef SQLITE_OS_WIN_H\n#define SQLITE_OS_WIN_H\n\n/*\n** Include the primary Windows SDK header file.\n*/\n#include \"windows.h\"\n\n#ifdef __CYGWIN__\n# include <sys/cygwin.h>\n# include <sys/stat.h> /* amalgamator: dontcache */\n# include <unistd.h> /* amalgamator: dontcache */\n# include <errno.h> /* amalgamator: dontcache */\n#endif\n\n/*\n** Determine if we are dealing with Windows NT.\n**\n** We ought to be able to determine if we are compiling for Windows 9x or\n** Windows NT using the _WIN32_WINNT macro as follows:\n**\n** #if defined(_WIN32_WINNT)\n** # define SQLITE_OS_WINNT 1\n** #else\n** # define SQLITE_OS_WINNT 0\n** #endif\n**\n** However, Visual Studio 2005 does not set _WIN32_WINNT by default, as\n** it ought to, so the above test does not work.  We'll just assume that\n** everything is Windows NT unless the programmer explicitly says otherwise\n** by setting SQLITE_OS_WINNT to 0.\n*/\n#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT)\n# define SQLITE_OS_WINNT 1\n#endif\n\n/*\n** Determine if we are dealing with Windows CE - which has a much reduced\n** API.\n*/\n#if defined(_WIN32_WCE)\n# define SQLITE_OS_WINCE 1\n#else\n# define SQLITE_OS_WINCE 0\n#endif\n\n/*\n** Determine if we are dealing with WinRT, which provides only a subset of\n** the full Win32 API.\n*/\n#if !defined(SQLITE_OS_WINRT)\n# define SQLITE_OS_WINRT 0\n#endif\n\n/*\n** For WinCE, some API function parameters do not appear to be declared as\n** volatile.\n*/\n#if SQLITE_OS_WINCE\n# define SQLITE_WIN32_VOLATILE\n#else\n# define SQLITE_WIN32_VOLATILE volatile\n#endif\n\n/*\n** For some Windows sub-platforms, the _beginthreadex() / _endthreadex()\n** functions are not available (e.g. those not using MSVC, Cygwin, etc).\n*/\n#if SQLITE_OS_WIN && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \\\n    SQLITE_THREADSAFE>0 && !defined(__CYGWIN__)\n# define SQLITE_OS_WIN_THREADS 1\n#else\n# define SQLITE_OS_WIN_THREADS 0\n#endif\n\n#endif /* SQLITE_OS_WIN_H */\n\n/************** End of os_win.h **********************************************/\n/************** Continuing where we left off in mutex_w32.c ******************/\n#endif\n\n/*\n** The code in this file is only used if we are compiling multithreaded\n** on a Win32 system.\n*/\n#ifdef SQLITE_MUTEX_W32\n\n/*\n** Each recursive mutex is an instance of the following structure.\n*/\nstruct sqlite3_mutex {\n  CRITICAL_SECTION mutex;    /* Mutex controlling the lock */\n  int id;                    /* Mutex type */\n#ifdef SQLITE_DEBUG\n  volatile int nRef;         /* Number of entrances */\n  volatile DWORD owner;      /* Thread holding this mutex */\n  volatile LONG trace;       /* True to trace changes */\n#endif\n};\n\n/*\n** These are the initializer values used when declaring a \"static\" mutex\n** on Win32.  It should be noted that all mutexes require initialization\n** on the Win32 platform.\n*/\n#define SQLITE_W32_MUTEX_INITIALIZER { 0 }\n\n#ifdef SQLITE_DEBUG\n#define SQLITE3_MUTEX_INITIALIZER(id) { SQLITE_W32_MUTEX_INITIALIZER, id, \\\n                                    0L, (DWORD)0, 0 }\n#else\n#define SQLITE3_MUTEX_INITIALIZER(id) { SQLITE_W32_MUTEX_INITIALIZER, id }\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use only inside assert() statements.\n*/\nstatic int winMutexHeld(sqlite3_mutex *p){\n  return p->nRef!=0 && p->owner==GetCurrentThreadId();\n}\n\nstatic int winMutexNotheld2(sqlite3_mutex *p, DWORD tid){\n  return p->nRef==0 || p->owner!=tid;\n}\n\nstatic int winMutexNotheld(sqlite3_mutex *p){\n  DWORD tid = GetCurrentThreadId();\n  return winMutexNotheld2(p, tid);\n}\n#endif\n\n/*\n** Try to provide a memory barrier operation, needed for initialization\n** and also for the xShmBarrier method of the VFS in cases when SQLite is\n** compiled without mutexes (SQLITE_THREADSAFE=0).\n*/\nSQLITE_PRIVATE void sqlite3MemoryBarrier(void){\n#if defined(SQLITE_MEMORY_BARRIER)\n  SQLITE_MEMORY_BARRIER;\n#elif defined(__GNUC__)\n  __sync_synchronize();\n#elif MSVC_VERSION>=1400\n  _ReadWriteBarrier();\n#elif defined(MemoryBarrier)\n  MemoryBarrier();\n#endif\n}\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic sqlite3_mutex winMutex_staticMutexes[] = {\n  SQLITE3_MUTEX_INITIALIZER(2),\n  SQLITE3_MUTEX_INITIALIZER(3),\n  SQLITE3_MUTEX_INITIALIZER(4),\n  SQLITE3_MUTEX_INITIALIZER(5),\n  SQLITE3_MUTEX_INITIALIZER(6),\n  SQLITE3_MUTEX_INITIALIZER(7),\n  SQLITE3_MUTEX_INITIALIZER(8),\n  SQLITE3_MUTEX_INITIALIZER(9),\n  SQLITE3_MUTEX_INITIALIZER(10),\n  SQLITE3_MUTEX_INITIALIZER(11),\n  SQLITE3_MUTEX_INITIALIZER(12),\n  SQLITE3_MUTEX_INITIALIZER(13)\n};\n\nstatic int winMutex_isInit = 0;\nstatic int winMutex_isNt = -1; /* <0 means \"need to query\" */\n\n/* As the winMutexInit() and winMutexEnd() functions are called as part\n** of the sqlite3_initialize() and sqlite3_shutdown() processing, the\n** \"interlocked\" magic used here is probably not strictly necessary.\n*/\nstatic LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;\n\nSQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */\nSQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */\n\nstatic int winMutexInit(void){\n  /* The first to increment to 1 does actual initialization */\n  if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){\n    int i;\n    for(i=0; i<ArraySize(winMutex_staticMutexes); i++){\n#if SQLITE_OS_WINRT\n      InitializeCriticalSectionEx(&winMutex_staticMutexes[i].mutex, 0, 0);\n#else\n      InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);\n#endif\n    }\n    winMutex_isInit = 1;\n  }else{\n    /* Another thread is (in the process of) initializing the static\n    ** mutexes */\n    while( !winMutex_isInit ){\n      sqlite3_win32_sleep(1);\n    }\n  }\n  return SQLITE_OK;\n}\n\nstatic int winMutexEnd(void){\n  /* The first to decrement to 0 does actual shutdown\n  ** (which should be the last to shutdown.) */\n  if( InterlockedCompareExchange(&winMutex_lock, 0, 1)==1 ){\n    if( winMutex_isInit==1 ){\n      int i;\n      for(i=0; i<ArraySize(winMutex_staticMutexes); i++){\n        DeleteCriticalSection(&winMutex_staticMutexes[i].mutex);\n      }\n      winMutex_isInit = 0;\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it.  If it returns NULL\n** that means that a mutex could not be allocated.  SQLite\n** will unwind its stack and return an error.  The argument\n** to sqlite3_mutex_alloc() is one of these integer constants:\n**\n** <ul>\n** <li>  SQLITE_MUTEX_FAST\n** <li>  SQLITE_MUTEX_RECURSIVE\n** <li>  SQLITE_MUTEX_STATIC_MAIN\n** <li>  SQLITE_MUTEX_STATIC_MEM\n** <li>  SQLITE_MUTEX_STATIC_OPEN\n** <li>  SQLITE_MUTEX_STATIC_PRNG\n** <li>  SQLITE_MUTEX_STATIC_LRU\n** <li>  SQLITE_MUTEX_STATIC_PMEM\n** <li>  SQLITE_MUTEX_STATIC_APP1\n** <li>  SQLITE_MUTEX_STATIC_APP2\n** <li>  SQLITE_MUTEX_STATIC_APP3\n** <li>  SQLITE_MUTEX_STATIC_VFS1\n** <li>  SQLITE_MUTEX_STATIC_VFS2\n** <li>  SQLITE_MUTEX_STATIC_VFS3\n** </ul>\n**\n** The first two constants cause sqlite3_mutex_alloc() to create\n** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\n** The mutex implementation does not need to make a distinction\n** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n** not want to.  But SQLite will only request a recursive mutex in\n** cases where it really needs one.  If a faster non-recursive mutex\n** implementation is available on the host platform, the mutex subsystem\n** might return such a mutex in response to SQLITE_MUTEX_FAST.\n**\n** The other allowed parameters to sqlite3_mutex_alloc() each return\n** a pointer to a static preexisting mutex.  Six static mutexes are\n** used by the current version of SQLite.  Future versions of SQLite\n** may add additional static mutexes.  Static mutexes are for internal\n** use by SQLite only.  Applications that use SQLite mutexes should\n** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n** SQLITE_MUTEX_RECURSIVE.\n**\n** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n** returns a different mutex on every call.  But for the static\n** mutex types, the same mutex is returned on every call that has\n** the same type number.\n*/\nstatic sqlite3_mutex *winMutexAlloc(int iType){\n  sqlite3_mutex *p;\n\n  switch( iType ){\n    case SQLITE_MUTEX_FAST:\n    case SQLITE_MUTEX_RECURSIVE: {\n      p = sqlite3MallocZero( sizeof(*p) );\n      if( p ){\n        p->id = iType;\n#ifdef SQLITE_DEBUG\n#ifdef SQLITE_WIN32_MUTEX_TRACE_DYNAMIC\n        p->trace = 1;\n#endif\n#endif\n#if SQLITE_OS_WINRT\n        InitializeCriticalSectionEx(&p->mutex, 0, 0);\n#else\n        InitializeCriticalSection(&p->mutex);\n#endif\n      }\n      break;\n    }\n    default: {\n#ifdef SQLITE_ENABLE_API_ARMOR\n      if( iType-2<0 || iType-2>=ArraySize(winMutex_staticMutexes) ){\n        (void)SQLITE_MISUSE_BKPT;\n        return 0;\n      }\n#endif\n      p = &winMutex_staticMutexes[iType-2];\n#ifdef SQLITE_DEBUG\n#ifdef SQLITE_WIN32_MUTEX_TRACE_STATIC\n      InterlockedCompareExchange(&p->trace, 1, 0);\n#endif\n#endif\n      break;\n    }\n  }\n  assert( p==0 || p->id==iType );\n  return p;\n}\n\n\n/*\n** This routine deallocates a previously\n** allocated mutex.  SQLite is careful to deallocate every\n** mutex that it allocates.\n*/\nstatic void winMutexFree(sqlite3_mutex *p){\n  assert( p );\n  assert( p->nRef==0 && p->owner==0 );\n  if( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE ){\n    DeleteCriticalSection(&p->mutex);\n    sqlite3_free(p);\n  }else{\n#ifdef SQLITE_ENABLE_API_ARMOR\n    (void)SQLITE_MISUSE_BKPT;\n#endif\n  }\n}\n\n/*\n** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK\n** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can\n** be entered multiple times by the same thread.  In such cases the,\n** mutex must be exited an equal number of times before another thread\n** can enter.  If the same thread tries to enter any other kind of mutex\n** more than once, the behavior is undefined.\n*/\nstatic void winMutexEnter(sqlite3_mutex *p){\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  DWORD tid = GetCurrentThreadId();\n#endif\n#ifdef SQLITE_DEBUG\n  assert( p );\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) );\n#else\n  assert( p );\n#endif\n  assert( winMutex_isInit==1 );\n  EnterCriticalSection(&p->mutex);\n#ifdef SQLITE_DEBUG\n  assert( p->nRef>0 || p->owner==0 );\n  p->owner = tid;\n  p->nRef++;\n  if( p->trace ){\n    OSTRACE((\"ENTER-MUTEX tid=%lu, mutex(%d)=%p (%d), nRef=%d\\n\",\n             tid, p->id, p, p->trace, p->nRef));\n  }\n#endif\n}\n\nstatic int winMutexTry(sqlite3_mutex *p){\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  DWORD tid = GetCurrentThreadId();\n#endif\n  int rc = SQLITE_BUSY;\n  assert( p );\n  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) );\n  /*\n  ** The sqlite3_mutex_try() routine is very rarely used, and when it\n  ** is used it is merely an optimization.  So it is OK for it to always\n  ** fail.\n  **\n  ** The TryEnterCriticalSection() interface is only available on WinNT.\n  ** And some windows compilers complain if you try to use it without\n  ** first doing some #defines that prevent SQLite from building on Win98.\n  ** For that reason, we will omit this optimization for now.  See\n  ** ticket #2685.\n  */\n#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400\n  assert( winMutex_isInit==1 );\n  assert( winMutex_isNt>=-1 && winMutex_isNt<=1 );\n  if( winMutex_isNt<0 ){\n    winMutex_isNt = sqlite3_win32_is_nt();\n  }\n  assert( winMutex_isNt==0 || winMutex_isNt==1 );\n  if( winMutex_isNt && TryEnterCriticalSection(&p->mutex) ){\n#ifdef SQLITE_DEBUG\n    p->owner = tid;\n    p->nRef++;\n#endif\n    rc = SQLITE_OK;\n  }\n#else\n  UNUSED_PARAMETER(p);\n#endif\n#ifdef SQLITE_DEBUG\n  if( p->trace ){\n    OSTRACE((\"TRY-MUTEX tid=%lu, mutex(%d)=%p (%d), owner=%lu, nRef=%d, rc=%s\\n\",\n             tid, p->id, p, p->trace, p->owner, p->nRef, sqlite3ErrName(rc)));\n  }\n#endif\n  return rc;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.  The behavior\n** is undefined if the mutex is not currently entered or\n** is not currently allocated.  SQLite will never do either.\n*/\nstatic void winMutexLeave(sqlite3_mutex *p){\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  DWORD tid = GetCurrentThreadId();\n#endif\n  assert( p );\n#ifdef SQLITE_DEBUG\n  assert( p->nRef>0 );\n  assert( p->owner==tid );\n  p->nRef--;\n  if( p->nRef==0 ) p->owner = 0;\n  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );\n#endif\n  assert( winMutex_isInit==1 );\n  LeaveCriticalSection(&p->mutex);\n#ifdef SQLITE_DEBUG\n  if( p->trace ){\n    OSTRACE((\"LEAVE-MUTEX tid=%lu, mutex(%d)=%p (%d), nRef=%d\\n\",\n             tid, p->id, p, p->trace, p->nRef));\n  }\n#endif\n}\n\nSQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){\n  static const sqlite3_mutex_methods sMutex = {\n    winMutexInit,\n    winMutexEnd,\n    winMutexAlloc,\n    winMutexFree,\n    winMutexEnter,\n    winMutexTry,\n    winMutexLeave,\n#ifdef SQLITE_DEBUG\n    winMutexHeld,\n    winMutexNotheld\n#else\n    0,\n    0\n#endif\n  };\n  return &sMutex;\n}\n\n#endif /* SQLITE_MUTEX_W32 */\n\n/************** End of mutex_w32.c *******************************************/\n/************** Begin file malloc.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** Memory allocation functions used throughout sqlite.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdarg.h> */\n\n/*\n** Attempt to release up to n bytes of non-essential memory currently\n** held by SQLite. An example of non-essential memory is memory used to\n** cache database pages that are not currently in use.\n*/\nSQLITE_API int sqlite3_release_memory(int n){\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n  return sqlite3PcacheReleaseMemory(n);\n#else\n  /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine\n  ** is a no-op returning zero if SQLite is not compiled with\n  ** SQLITE_ENABLE_MEMORY_MANAGEMENT. */\n  UNUSED_PARAMETER(n);\n  return 0;\n#endif\n}\n\n/*\n** Default value of the hard heap limit.  0 means \"no limit\".\n*/\n#ifndef SQLITE_MAX_MEMORY\n# define SQLITE_MAX_MEMORY 0\n#endif\n\n/*\n** State information local to the memory allocation subsystem.\n*/\nstatic SQLITE_WSD struct Mem0Global {\n  sqlite3_mutex *mutex;         /* Mutex to serialize access */\n  sqlite3_int64 alarmThreshold; /* The soft heap limit */\n  sqlite3_int64 hardLimit;      /* The hard upper bound on memory */\n\n  /*\n  ** True if heap is nearly \"full\" where \"full\" is defined by the\n  ** sqlite3_soft_heap_limit() setting.\n  */\n  int nearlyFull;\n} mem0 = { 0, SQLITE_MAX_MEMORY, SQLITE_MAX_MEMORY, 0 };\n\n#define mem0 GLOBAL(struct Mem0Global, mem0)\n\n/*\n** Return the memory allocator mutex. sqlite3_status() needs it.\n*/\nSQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void){\n  return mem0.mutex;\n}\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Deprecated external interface.  It used to set an alarm callback\n** that was invoked when memory usage grew too large.  Now it is a\n** no-op.\n*/\nSQLITE_API int sqlite3_memory_alarm(\n  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),\n  void *pArg,\n  sqlite3_int64 iThreshold\n){\n  (void)xCallback;\n  (void)pArg;\n  (void)iThreshold;\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** Set the soft heap-size limit for the library.  An argument of\n** zero disables the limit.  A negative argument is a no-op used to\n** obtain the return value.\n**\n** The return value is the value of the heap limit just before this\n** interface was called.\n**\n** If the hard heap limit is enabled, then the soft heap limit cannot\n** be disabled nor raised above the hard heap limit.\n*/\nSQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){\n  sqlite3_int64 priorLimit;\n  sqlite3_int64 excess;\n  sqlite3_int64 nUsed;\n#ifndef SQLITE_OMIT_AUTOINIT\n  int rc = sqlite3_initialize();\n  if( rc ) return -1;\n#endif\n  sqlite3_mutex_enter(mem0.mutex);\n  priorLimit = mem0.alarmThreshold;\n  if( n<0 ){\n    sqlite3_mutex_leave(mem0.mutex);\n    return priorLimit;\n  }\n  if( mem0.hardLimit>0 && (n>mem0.hardLimit || n==0) ){\n    n = mem0.hardLimit;\n  }\n  mem0.alarmThreshold = n;\n  nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);\n  AtomicStore(&mem0.nearlyFull, n>0 && n<=nUsed);\n  sqlite3_mutex_leave(mem0.mutex);\n  excess = sqlite3_memory_used() - n;\n  if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));\n  return priorLimit;\n}\nSQLITE_API void sqlite3_soft_heap_limit(int n){\n  if( n<0 ) n = 0;\n  sqlite3_soft_heap_limit64(n);\n}\n\n/*\n** Set the hard heap-size limit for the library. An argument of zero\n** disables the hard heap limit.  A negative argument is a no-op used\n** to obtain the return value without affecting the hard heap limit.\n**\n** The return value is the value of the hard heap limit just prior to\n** calling this interface.\n**\n** Setting the hard heap limit will also activate the soft heap limit\n** and constrain the soft heap limit to be no more than the hard heap\n** limit.\n*/\nSQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 n){\n  sqlite3_int64 priorLimit;\n#ifndef SQLITE_OMIT_AUTOINIT\n  int rc = sqlite3_initialize();\n  if( rc ) return -1;\n#endif\n  sqlite3_mutex_enter(mem0.mutex);\n  priorLimit = mem0.hardLimit;\n  if( n>=0 ){\n    mem0.hardLimit = n;\n    if( n<mem0.alarmThreshold || mem0.alarmThreshold==0 ){\n      mem0.alarmThreshold = n;\n    }\n  }\n  sqlite3_mutex_leave(mem0.mutex);\n  return priorLimit;\n}\n\n\n/*\n** Initialize the memory allocation subsystem.\n*/\nSQLITE_PRIVATE int sqlite3MallocInit(void){\n  int rc;\n  if( sqlite3GlobalConfig.m.xMalloc==0 ){\n    sqlite3MemSetDefault();\n  }\n  mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);\n  if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512\n      || sqlite3GlobalConfig.nPage<=0 ){\n    sqlite3GlobalConfig.pPage = 0;\n    sqlite3GlobalConfig.szPage = 0;\n  }\n  rc = sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);\n  if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));\n  return rc;\n}\n\n/*\n** Return true if the heap is currently under memory pressure - in other\n** words if the amount of heap used is close to the limit set by\n** sqlite3_soft_heap_limit().\n*/\nSQLITE_PRIVATE int sqlite3HeapNearlyFull(void){\n  return AtomicLoad(&mem0.nearlyFull);\n}\n\n/*\n** Deinitialize the memory allocation subsystem.\n*/\nSQLITE_PRIVATE void sqlite3MallocEnd(void){\n  if( sqlite3GlobalConfig.m.xShutdown ){\n    sqlite3GlobalConfig.m.xShutdown(sqlite3GlobalConfig.m.pAppData);\n  }\n  memset(&mem0, 0, sizeof(mem0));\n}\n\n/*\n** Return the amount of memory currently checked out.\n*/\nSQLITE_API sqlite3_int64 sqlite3_memory_used(void){\n  sqlite3_int64 res, mx;\n  sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);\n  return res;\n}\n\n/*\n** Return the maximum amount of memory that has ever been\n** checked out since either the beginning of this process\n** or since the most recent reset.\n*/\nSQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){\n  sqlite3_int64 res, mx;\n  sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);\n  return mx;\n}\n\n/*\n** Trigger the alarm\n*/\nstatic void sqlite3MallocAlarm(int nByte){\n  if( mem0.alarmThreshold<=0 ) return;\n  sqlite3_mutex_leave(mem0.mutex);\n  sqlite3_release_memory(nByte);\n  sqlite3_mutex_enter(mem0.mutex);\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** This routine is called whenever an out-of-memory condition is seen,\n** It's only purpose to to serve as a breakpoint for gdb or similar\n** code debuggers when working on out-of-memory conditions, for example\n** caused by PRAGMA hard_heap_limit=N.\n*/\nstatic SQLITE_NOINLINE void test_oom_breakpoint(u64 n){\n  static u64 nOomFault = 0;\n  nOomFault += n;\n  /* The assert() is never reached in a human lifetime.  It  is here mostly\n  ** to prevent code optimizers from optimizing out this function. */\n  assert( (nOomFault>>32) < 0xffffffff );\n}\n#else\n# define test_oom_breakpoint(X)   /* No-op for production builds */\n#endif\n\n/*\n** Do a memory allocation with statistics and alarms.  Assume the\n** lock is already held.\n*/\nstatic void mallocWithAlarm(int n, void **pp){\n  void *p;\n  int nFull;\n  assert( sqlite3_mutex_held(mem0.mutex) );\n  assert( n>0 );\n\n  /* In Firefox (circa 2017-02-08), xRoundup() is remapped to an internal\n  ** implementation of malloc_good_size(), which must be called in debug\n  ** mode and specifically when the DMD \"Dark Matter Detector\" is enabled\n  ** or else a crash results.  Hence, do not attempt to optimize out the\n  ** following xRoundup() call. */\n  nFull = sqlite3GlobalConfig.m.xRoundup(n);\n\n  sqlite3StatusHighwater(SQLITE_STATUS_MALLOC_SIZE, n);\n  if( mem0.alarmThreshold>0 ){\n    sqlite3_int64 nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);\n    if( nUsed >= mem0.alarmThreshold - nFull ){\n      AtomicStore(&mem0.nearlyFull, 1);\n      sqlite3MallocAlarm(nFull);\n      if( mem0.hardLimit ){\n        nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);\n        if( nUsed >= mem0.hardLimit - nFull ){\n          test_oom_breakpoint(1);\n          *pp = 0;\n          return;\n        }\n      }\n    }else{\n      AtomicStore(&mem0.nearlyFull, 0);\n    }\n  }\n  p = sqlite3GlobalConfig.m.xMalloc(nFull);\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n  if( p==0 && mem0.alarmThreshold>0 ){\n    sqlite3MallocAlarm(nFull);\n    p = sqlite3GlobalConfig.m.xMalloc(nFull);\n  }\n#endif\n  if( p ){\n    nFull = sqlite3MallocSize(p);\n    sqlite3StatusUp(SQLITE_STATUS_MEMORY_USED, nFull);\n    sqlite3StatusUp(SQLITE_STATUS_MALLOC_COUNT, 1);\n  }\n  *pp = p;\n}\n\n/*\n** Maximum size of any single memory allocation.\n**\n** This is not a limit on the total amount of memory used.  This is\n** a limit on the size parameter to sqlite3_malloc() and sqlite3_realloc().\n**\n** The upper bound is slightly less than 2GiB:  0x7ffffeff == 2,147,483,391\n** This provides a 256-byte safety margin for defense against 32-bit\n** signed integer overflow bugs when computing memory allocation sizes.\n** Paranoid applications might want to reduce the maximum allocation size\n** further for an even larger safety margin.  0x3fffffff or 0x0fffffff\n** or even smaller would be reasonable upper bounds on the size of a memory\n** allocations for most applications.\n*/\n#ifndef SQLITE_MAX_ALLOCATION_SIZE\n# define SQLITE_MAX_ALLOCATION_SIZE  2147483391\n#endif\n#if SQLITE_MAX_ALLOCATION_SIZE>2147483391\n# error Maximum size for SQLITE_MAX_ALLOCATION_SIZE is 2147483391\n#endif\n\n/*\n** Allocate memory.  This routine is like sqlite3_malloc() except that it\n** assumes the memory subsystem has already been initialized.\n*/\nSQLITE_PRIVATE void *sqlite3Malloc(u64 n){\n  void *p;\n  if( n==0 || n>SQLITE_MAX_ALLOCATION_SIZE ){\n    p = 0;\n  }else if( sqlite3GlobalConfig.bMemstat ){\n    sqlite3_mutex_enter(mem0.mutex);\n    mallocWithAlarm((int)n, &p);\n    sqlite3_mutex_leave(mem0.mutex);\n  }else{\n    p = sqlite3GlobalConfig.m.xMalloc((int)n);\n  }\n  assert( EIGHT_BYTE_ALIGNMENT(p) );  /* IMP: R-11148-40995 */\n  return p;\n}\n\n/*\n** This version of the memory allocation is for use by the application.\n** First make sure the memory subsystem is initialized, then do the\n** allocation.\n*/\nSQLITE_API void *sqlite3_malloc(int n){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return n<=0 ? 0 : sqlite3Malloc(n);\n}\nSQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return sqlite3Malloc(n);\n}\n\n/*\n** TRUE if p is a lookaside memory allocation from db\n*/\n#ifndef SQLITE_OMIT_LOOKASIDE\nstatic int isLookaside(sqlite3 *db, const void *p){\n  return SQLITE_WITHIN(p, db->lookaside.pStart, db->lookaside.pTrueEnd);\n}\n#else\n#define isLookaside(A,B) 0\n#endif\n\n/*\n** Return the size of a memory allocation previously obtained from\n** sqlite3Malloc() or sqlite3_malloc().\n*/\nSQLITE_PRIVATE int sqlite3MallocSize(const void *p){\n  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );\n  return sqlite3GlobalConfig.m.xSize((void*)p);\n}\nstatic int lookasideMallocSize(sqlite3 *db, const void *p){\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n  return p<db->lookaside.pMiddle ? db->lookaside.szTrue : LOOKASIDE_SMALL;\n#else\n  return db->lookaside.szTrue;\n#endif\n}\nSQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, const void *p){\n  assert( p!=0 );\n#ifdef SQLITE_DEBUG\n  if( db==0 ){\n    assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );\n    assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );\n  }else if( !isLookaside(db,p) ){\n    assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n    assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n  }\n#endif\n  if( db ){\n    if( ((uptr)p)<(uptr)(db->lookaside.pTrueEnd) ){\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n      if( ((uptr)p)>=(uptr)(db->lookaside.pMiddle) ){\n        assert( sqlite3_mutex_held(db->mutex) );\n        return LOOKASIDE_SMALL;\n      }\n#endif\n      if( ((uptr)p)>=(uptr)(db->lookaside.pStart) ){\n        assert( sqlite3_mutex_held(db->mutex) );\n        return db->lookaside.szTrue;\n      }\n    }\n  }\n  return sqlite3GlobalConfig.m.xSize((void*)p);\n}\nSQLITE_API sqlite3_uint64 sqlite3_msize(void *p){\n  assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );\n  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );\n  return p ? sqlite3GlobalConfig.m.xSize(p) : 0;\n}\n\n/*\n** Free memory previously obtained from sqlite3Malloc().\n*/\nSQLITE_API void sqlite3_free(void *p){\n  if( p==0 ) return;  /* IMP: R-49053-54554 */\n  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );\n  assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );\n  if( sqlite3GlobalConfig.bMemstat ){\n    sqlite3_mutex_enter(mem0.mutex);\n    sqlite3StatusDown(SQLITE_STATUS_MEMORY_USED, sqlite3MallocSize(p));\n    sqlite3StatusDown(SQLITE_STATUS_MALLOC_COUNT, 1);\n    sqlite3GlobalConfig.m.xFree(p);\n    sqlite3_mutex_leave(mem0.mutex);\n  }else{\n    sqlite3GlobalConfig.m.xFree(p);\n  }\n}\n\n/*\n** Add the size of memory allocation \"p\" to the count in\n** *db->pnBytesFreed.\n*/\nstatic SQLITE_NOINLINE void measureAllocationSize(sqlite3 *db, void *p){\n  *db->pnBytesFreed += sqlite3DbMallocSize(db,p);\n}\n\n/*\n** Free memory that might be associated with a particular database\n** connection.  Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op.\n** The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.\n*/\nSQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){\n  assert( db==0 || sqlite3_mutex_held(db->mutex) );\n  assert( p!=0 );\n  if( db ){\n    if( ((uptr)p)<(uptr)(db->lookaside.pEnd) ){\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n      if( ((uptr)p)>=(uptr)(db->lookaside.pMiddle) ){\n        LookasideSlot *pBuf = (LookasideSlot*)p;\n        assert( db->pnBytesFreed==0 );\n#ifdef SQLITE_DEBUG\n        memset(p, 0xaa, LOOKASIDE_SMALL);  /* Trash freed content */\n#endif\n        pBuf->pNext = db->lookaside.pSmallFree;\n        db->lookaside.pSmallFree = pBuf;\n        return;\n      }\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n      if( ((uptr)p)>=(uptr)(db->lookaside.pStart) ){\n        LookasideSlot *pBuf = (LookasideSlot*)p;\n        assert( db->pnBytesFreed==0 );\n#ifdef SQLITE_DEBUG\n        memset(p, 0xaa, db->lookaside.szTrue);  /* Trash freed content */\n#endif\n        pBuf->pNext = db->lookaside.pFree;\n        db->lookaside.pFree = pBuf;\n        return;\n      }\n    }\n    if( db->pnBytesFreed ){\n      measureAllocationSize(db, p);\n      return;\n    }\n  }\n  assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n  assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n  assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );\n  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n  sqlite3_free(p);\n}\nSQLITE_PRIVATE void sqlite3DbNNFreeNN(sqlite3 *db, void *p){\n  assert( db!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( p!=0 );\n  if( ((uptr)p)<(uptr)(db->lookaside.pEnd) ){\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n    if( ((uptr)p)>=(uptr)(db->lookaside.pMiddle) ){\n      LookasideSlot *pBuf = (LookasideSlot*)p;\n      assert( db->pnBytesFreed==0 );\n#ifdef SQLITE_DEBUG\n      memset(p, 0xaa, LOOKASIDE_SMALL);  /* Trash freed content */\n#endif\n      pBuf->pNext = db->lookaside.pSmallFree;\n      db->lookaside.pSmallFree = pBuf;\n      return;\n    }\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n    if( ((uptr)p)>=(uptr)(db->lookaside.pStart) ){\n      LookasideSlot *pBuf = (LookasideSlot*)p;\n      assert( db->pnBytesFreed==0 );\n#ifdef SQLITE_DEBUG\n      memset(p, 0xaa, db->lookaside.szTrue);  /* Trash freed content */\n#endif\n      pBuf->pNext = db->lookaside.pFree;\n      db->lookaside.pFree = pBuf;\n      return;\n    }\n  }\n  if( db->pnBytesFreed ){\n    measureAllocationSize(db, p);\n    return;\n  }\n  assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n  assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n  sqlite3_free(p);\n}\nSQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){\n  assert( db==0 || sqlite3_mutex_held(db->mutex) );\n  if( p ) sqlite3DbFreeNN(db, p);\n}\n\n/*\n** Change the size of an existing memory allocation\n*/\nSQLITE_PRIVATE void *sqlite3Realloc(void *pOld, u64 nBytes){\n  int nOld, nNew, nDiff;\n  void *pNew;\n  assert( sqlite3MemdebugHasType(pOld, MEMTYPE_HEAP) );\n  assert( sqlite3MemdebugNoType(pOld, (u8)~MEMTYPE_HEAP) );\n  if( pOld==0 ){\n    return sqlite3Malloc(nBytes); /* IMP: R-04300-56712 */\n  }\n  if( nBytes==0 ){\n    sqlite3_free(pOld); /* IMP: R-26507-47431 */\n    return 0;\n  }\n  if( nBytes>=0x7fffff00 ){\n    /* The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() */\n    return 0;\n  }\n  nOld = sqlite3MallocSize(pOld);\n  /* IMPLEMENTATION-OF: R-46199-30249 SQLite guarantees that the second\n  ** argument to xRealloc is always a value returned by a prior call to\n  ** xRoundup. */\n  nNew = sqlite3GlobalConfig.m.xRoundup((int)nBytes);\n  if( nOld==nNew ){\n    pNew = pOld;\n  }else if( sqlite3GlobalConfig.bMemstat ){\n    sqlite3_int64 nUsed;\n    sqlite3_mutex_enter(mem0.mutex);\n    sqlite3StatusHighwater(SQLITE_STATUS_MALLOC_SIZE, (int)nBytes);\n    nDiff = nNew - nOld;\n    if( nDiff>0 && (nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)) >=\n          mem0.alarmThreshold-nDiff ){\n      sqlite3MallocAlarm(nDiff);\n      if( mem0.hardLimit>0 && nUsed >= mem0.hardLimit - nDiff ){\n        sqlite3_mutex_leave(mem0.mutex);\n        test_oom_breakpoint(1);\n        return 0;\n      }\n    }\n    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n    if( pNew==0 && mem0.alarmThreshold>0 ){\n      sqlite3MallocAlarm((int)nBytes);\n      pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);\n    }\n#endif\n    if( pNew ){\n      nNew = sqlite3MallocSize(pNew);\n      sqlite3StatusUp(SQLITE_STATUS_MEMORY_USED, nNew-nOld);\n    }\n    sqlite3_mutex_leave(mem0.mutex);\n  }else{\n    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);\n  }\n  assert( EIGHT_BYTE_ALIGNMENT(pNew) ); /* IMP: R-11148-40995 */\n  return pNew;\n}\n\n/*\n** The public interface to sqlite3Realloc.  Make sure that the memory\n** subsystem is initialized prior to invoking sqliteRealloc.\n*/\nSQLITE_API void *sqlite3_realloc(void *pOld, int n){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  if( n<0 ) n = 0;  /* IMP: R-26507-47431 */\n  return sqlite3Realloc(pOld, n);\n}\nSQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return sqlite3Realloc(pOld, n);\n}\n\n\n/*\n** Allocate and zero memory.\n*/\nSQLITE_PRIVATE void *sqlite3MallocZero(u64 n){\n  void *p = sqlite3Malloc(n);\n  if( p ){\n    memset(p, 0, (size_t)n);\n  }\n  return p;\n}\n\n/*\n** Allocate and zero memory.  If the allocation fails, make\n** the mallocFailed flag in the connection pointer.\n*/\nSQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, u64 n){\n  void *p;\n  testcase( db==0 );\n  p = sqlite3DbMallocRaw(db, n);\n  if( p ) memset(p, 0, (size_t)n);\n  return p;\n}\n\n\n/* Finish the work of sqlite3DbMallocRawNN for the unusual and\n** slower case when the allocation cannot be fulfilled using lookaside.\n*/\nstatic SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){\n  void *p;\n  assert( db!=0 );\n  p = sqlite3Malloc(n);\n  if( !p ) sqlite3OomFault(db);\n  sqlite3MemdebugSetType(p,\n         (db->lookaside.bDisable==0) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);\n  return p;\n}\n\n/*\n** Allocate memory, either lookaside (if possible) or heap.\n** If the allocation fails, set the mallocFailed flag in\n** the connection pointer.\n**\n** If db!=0 and db->mallocFailed is true (indicating a prior malloc\n** failure on the same database connection) then always return 0.\n** Hence for a particular database connection, once malloc starts\n** failing, it fails consistently until mallocFailed is reset.\n** This is an important assumption.  There are many places in the\n** code that do things like this:\n**\n**         int *a = (int*)sqlite3DbMallocRaw(db, 100);\n**         int *b = (int*)sqlite3DbMallocRaw(db, 200);\n**         if( b ) a[10] = 9;\n**\n** In other words, if a subsequent malloc (ex: \"b\") worked, it is assumed\n** that all prior mallocs (ex: \"a\") worked too.\n**\n** The sqlite3MallocRawNN() variant guarantees that the \"db\" parameter is\n** not a NULL pointer.\n*/\nSQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){\n  void *p;\n  if( db ) return sqlite3DbMallocRawNN(db, n);\n  p = sqlite3Malloc(n);\n  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n  return p;\n}\nSQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){\n#ifndef SQLITE_OMIT_LOOKASIDE\n  LookasideSlot *pBuf;\n  assert( db!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( db->pnBytesFreed==0 );\n  if( n>db->lookaside.sz ){\n    if( !db->lookaside.bDisable ){\n      db->lookaside.anStat[1]++;\n    }else if( db->mallocFailed ){\n      return 0;\n    }\n    return dbMallocRawFinish(db, n);\n  }\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n  if( n<=LOOKASIDE_SMALL ){\n    if( (pBuf = db->lookaside.pSmallFree)!=0 ){\n      db->lookaside.pSmallFree = pBuf->pNext;\n      db->lookaside.anStat[0]++;\n      return (void*)pBuf;\n    }else if( (pBuf = db->lookaside.pSmallInit)!=0 ){\n      db->lookaside.pSmallInit = pBuf->pNext;\n      db->lookaside.anStat[0]++;\n      return (void*)pBuf;\n    }\n  }\n#endif\n  if( (pBuf = db->lookaside.pFree)!=0 ){\n    db->lookaside.pFree = pBuf->pNext;\n    db->lookaside.anStat[0]++;\n    return (void*)pBuf;\n  }else if( (pBuf = db->lookaside.pInit)!=0 ){\n    db->lookaside.pInit = pBuf->pNext;\n    db->lookaside.anStat[0]++;\n    return (void*)pBuf;\n  }else{\n    db->lookaside.anStat[2]++;\n  }\n#else\n  assert( db!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( db->pnBytesFreed==0 );\n  if( db->mallocFailed ){\n    return 0;\n  }\n#endif\n  return dbMallocRawFinish(db, n);\n}\n\n/* Forward declaration */\nstatic SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n);\n\n/*\n** Resize the block of memory pointed to by p to n bytes. If the\n** resize fails, set the mallocFailed flag in the connection object.\n*/\nSQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){\n  assert( db!=0 );\n  if( p==0 ) return sqlite3DbMallocRawNN(db, n);\n  assert( sqlite3_mutex_held(db->mutex) );\n  if( ((uptr)p)<(uptr)db->lookaside.pEnd ){\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n    if( ((uptr)p)>=(uptr)db->lookaside.pMiddle ){\n      if( n<=LOOKASIDE_SMALL ) return p;\n    }else\n#endif\n    if( ((uptr)p)>=(uptr)db->lookaside.pStart ){\n      if( n<=db->lookaside.szTrue ) return p;\n    }\n  }\n  return dbReallocFinish(db, p, n);\n}\nstatic SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n){\n  void *pNew = 0;\n  assert( db!=0 );\n  assert( p!=0 );\n  if( db->mallocFailed==0 ){\n    if( isLookaside(db, p) ){\n      pNew = sqlite3DbMallocRawNN(db, n);\n      if( pNew ){\n        memcpy(pNew, p, lookasideMallocSize(db, p));\n        sqlite3DbFree(db, p);\n      }\n    }else{\n      assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n      assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );\n      sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n      pNew = sqlite3Realloc(p, n);\n      if( !pNew ){\n        sqlite3OomFault(db);\n      }\n      sqlite3MemdebugSetType(pNew,\n            (db->lookaside.bDisable==0 ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));\n    }\n  }\n  return pNew;\n}\n\n/*\n** Attempt to reallocate p.  If the reallocation fails, then free p\n** and set the mallocFailed flag in the database connection.\n*/\nSQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, u64 n){\n  void *pNew;\n  pNew = sqlite3DbRealloc(db, p, n);\n  if( !pNew ){\n    sqlite3DbFree(db, p);\n  }\n  return pNew;\n}\n\n/*\n** Make a copy of a string in memory obtained from sqliteMalloc(). These\n** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This\n** is because when memory debugging is turned on, these two functions are\n** called via macros that record the current file and line number in the\n** ThreadData structure.\n*/\nSQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){\n  char *zNew;\n  size_t n;\n  if( z==0 ){\n    return 0;\n  }\n  n = strlen(z) + 1;\n  zNew = sqlite3DbMallocRaw(db, n);\n  if( zNew ){\n    memcpy(zNew, z, n);\n  }\n  return zNew;\n}\nSQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){\n  char *zNew;\n  assert( db!=0 );\n  assert( z!=0 || n==0 );\n  assert( (n&0x7fffffff)==n );\n  zNew = z ? sqlite3DbMallocRawNN(db, n+1) : 0;\n  if( zNew ){\n    memcpy(zNew, z, (size_t)n);\n    zNew[n] = 0;\n  }\n  return zNew;\n}\n\n/*\n** The text between zStart and zEnd represents a phrase within a larger\n** SQL statement.  Make a copy of this phrase in space obtained form\n** sqlite3DbMalloc().  Omit leading and trailing whitespace.\n*/\nSQLITE_PRIVATE char *sqlite3DbSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){\n  int n;\n#ifdef SQLITE_DEBUG\n  /* Because of the way the parser works, the span is guaranteed to contain\n  ** at least one non-space character */\n  for(n=0; sqlite3Isspace(zStart[n]); n++){ assert( &zStart[n]<zEnd ); }\n#endif\n  while( sqlite3Isspace(zStart[0]) ) zStart++;\n  n = (int)(zEnd - zStart);\n  while( sqlite3Isspace(zStart[n-1]) ) n--;\n  return sqlite3DbStrNDup(db, zStart, n);\n}\n\n/*\n** Free any prior content in *pz and replace it with a copy of zNew.\n*/\nSQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){\n  char *z = sqlite3DbStrDup(db, zNew);\n  sqlite3DbFree(db, *pz);\n  *pz = z;\n}\n\n/*\n** Call this routine to record the fact that an OOM (out-of-memory) error\n** has happened.  This routine will set db->mallocFailed, and also\n** temporarily disable the lookaside memory allocator and interrupt\n** any running VDBEs.\n**\n** Always return a NULL pointer so that this routine can be invoked using\n**\n**      return sqlite3OomFault(db);\n**\n** and thereby avoid unnecessary stack frame allocations for the overwhelmingly\n** common case where no OOM occurs.\n*/\nSQLITE_PRIVATE void *sqlite3OomFault(sqlite3 *db){\n  if( db->mallocFailed==0 && db->bBenignMalloc==0 ){\n    db->mallocFailed = 1;\n    if( db->nVdbeExec>0 ){\n      AtomicStore(&db->u1.isInterrupted, 1);\n    }\n    DisableLookaside;\n    if( db->pParse ){\n      Parse *pParse;\n      sqlite3ErrorMsg(db->pParse, \"out of memory\");\n      db->pParse->rc = SQLITE_NOMEM_BKPT;\n      for(pParse=db->pParse->pOuterParse; pParse; pParse = pParse->pOuterParse){\n        pParse->nErr++;\n        pParse->rc = SQLITE_NOMEM;\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** This routine reactivates the memory allocator and clears the\n** db->mallocFailed flag as necessary.\n**\n** The memory allocator is not restarted if there are running\n** VDBEs.\n*/\nSQLITE_PRIVATE void sqlite3OomClear(sqlite3 *db){\n  if( db->mallocFailed && db->nVdbeExec==0 ){\n    db->mallocFailed = 0;\n    AtomicStore(&db->u1.isInterrupted, 0);\n    assert( db->lookaside.bDisable>0 );\n    EnableLookaside;\n  }\n}\n\n/*\n** Take actions at the end of an API call to deal with error codes.\n*/\nstatic SQLITE_NOINLINE int apiHandleError(sqlite3 *db, int rc){\n  if( db->mallocFailed || rc==SQLITE_IOERR_NOMEM ){\n    sqlite3OomClear(db);\n    sqlite3Error(db, SQLITE_NOMEM);\n    return SQLITE_NOMEM_BKPT;\n  }\n  return rc & db->errMask;\n}\n\n/*\n** This function must be called before exiting any API function (i.e.\n** returning control to the user) that has called sqlite3_malloc or\n** sqlite3_realloc.\n**\n** The returned value is normally a copy of the second argument to this\n** function. However, if a malloc() failure has occurred since the previous\n** invocation SQLITE_NOMEM is returned instead.\n**\n** If an OOM as occurred, then the connection error-code (the value\n** returned by sqlite3_errcode()) is set to SQLITE_NOMEM.\n*/\nSQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){\n  /* If the db handle must hold the connection handle mutex here.\n  ** Otherwise the read (and possible write) of db->mallocFailed\n  ** is unsafe, as is the call to sqlite3Error().\n  */\n  assert( db!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  if( db->mallocFailed || rc ){\n    return apiHandleError(db, rc);\n  }\n  return 0;\n}\n\n/************** End of malloc.c **********************************************/\n/************** Begin file printf.c ******************************************/\n/*\n** The \"printf\" code that follows dates from the 1980's.  It is in\n** the public domain.\n**\n**************************************************************************\n**\n** This file contains code for a set of \"printf\"-like routines.  These\n** routines format strings much like the printf() from the standard C\n** library, though the implementation here has enhancements to support\n** SQLite.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** Conversion types fall into various categories as defined by the\n** following enumeration.\n*/\n#define etRADIX       0 /* non-decimal integer types.  %x %o */\n#define etFLOAT       1 /* Floating point.  %f */\n#define etEXP         2 /* Exponentional notation. %e and %E */\n#define etGENERIC     3 /* Floating or exponential, depending on exponent. %g */\n#define etSIZE        4 /* Return number of characters processed so far. %n */\n#define etSTRING      5 /* Strings. %s */\n#define etDYNSTRING   6 /* Dynamically allocated strings. %z */\n#define etPERCENT     7 /* Percent symbol. %% */\n#define etCHARX       8 /* Characters. %c */\n/* The rest are extensions, not normally found in printf() */\n#define etESCAPE_q    9  /* Strings with '\\'' doubled.  %q */\n#define etESCAPE_Q    10 /* Strings with '\\'' doubled and enclosed in '',\n                            NULL pointers replaced by SQL NULL.  %Q */\n#define etTOKEN       11 /* a pointer to a Token structure */\n#define etSRCITEM     12 /* a pointer to a SrcItem */\n#define etPOINTER     13 /* The %p conversion */\n#define etESCAPE_w    14 /* %w -> Strings with '\\\"' doubled */\n#define etORDINAL     15 /* %r -> 1st, 2nd, 3rd, 4th, etc.  English only */\n#define etDECIMAL     16 /* %d or %u, but not %x, %o */\n\n#define etINVALID     17 /* Any unrecognized conversion type */\n\n\n/*\n** An \"etByte\" is an 8-bit unsigned value.\n*/\ntypedef unsigned char etByte;\n\n/*\n** Each builtin conversion character (ex: the 'd' in \"%d\") is described\n** by an instance of the following structure\n*/\ntypedef struct et_info {   /* Information about each format field */\n  char fmttype;            /* The format field code letter */\n  etByte base;             /* The base for radix conversion */\n  etByte flags;            /* One or more of FLAG_ constants below */\n  etByte type;             /* Conversion paradigm */\n  etByte charset;          /* Offset into aDigits[] of the digits string */\n  etByte prefix;           /* Offset into aPrefix[] of the prefix string */\n  char iNxt;               /* Next with same hash, or 0 for end of chain */\n} et_info;\n\n/*\n** Allowed values for et_info.flags\n*/\n#define FLAG_SIGNED    1     /* True if the value to convert is signed */\n#define FLAG_STRING    4     /* Allow infinite precision */\n\n/*\n** The table is searched by hash.  In the case of %C where C is the character\n** and that character has ASCII value j, then the hash is j%23.\n**\n** The order of the entries in fmtinfo[] and the hash chain was entered\n** manually, but based on the output of the following TCL script:\n*/\n#if 0  /*****  Beginning of script ******/\nforeach c {d s g z q Q w c o u x X f e E G i n % p T S r} {\n  scan $c %c x\n  set n($c) $x\n}\nset mx [llength [array names n]]\nputs \"count: $mx\"\n\nset mx 27\nputs \"*********** mx=$mx ************\"\nfor {set r 0} {$r<$mx} {incr r} {\n  puts -nonewline [format %2d: $r]\n  foreach c [array names n] {\n    if {($n($c))%$mx==$r} {puts -nonewline \" $c\"}\n  }\n  puts \"\"\n}\n#endif /***** End of script ********/\n\nstatic const char aDigits[] = \"0123456789ABCDEF0123456789abcdef\";\nstatic const char aPrefix[] = \"-x0\\000X0\";\nstatic const et_info fmtinfo[23] = {\n  /*  0 */  {  's',  0, 4, etSTRING,     0,  0,  1 },\n  /*  1 */  {  'E',  0, 1, etEXP,        14, 0,  0 },  /* Hash: 0 */\n  /*  2 */  {  'u', 10, 0, etDECIMAL,    0,  0,  3 },\n  /*  3 */  {  'G',  0, 1, etGENERIC,    14, 0,  0 },  /* Hash: 2 */\n  /*  4 */  {  'w',  0, 4, etESCAPE_w,   0,  0,  0 },\n  /*  5 */  {  'x', 16, 0, etRADIX,      16, 1,  0 },\n  /*  6 */  {  'c',  0, 0, etCHARX,      0,  0,  0 },  /* Hash: 7 */\n  /*  7 */  {  'z',  0, 4, etDYNSTRING,  0,  0,  6 },\n  /*  8 */  {  'd', 10, 1, etDECIMAL,    0,  0,  0 },\n  /*  9 */  {  'e',  0, 1, etEXP,        30, 0,  0 },\n  /* 10 */  {  'f',  0, 1, etFLOAT,      0,  0,  0 },\n  /* 11 */  {  'g',  0, 1, etGENERIC,    30, 0,  0 },\n  /* 12 */  {  'Q',  0, 4, etESCAPE_Q,   0,  0,  0 },\n  /* 13 */  {  'i', 10, 1, etDECIMAL,    0,  0,  0 },\n  /* 14 */  {  '%',  0, 0, etPERCENT,    0,  0, 16 },\n  /* 15 */  {  'T',  0, 0, etTOKEN,      0,  0,  0 },\n  /* 16 */  {  'S',  0, 0, etSRCITEM,    0,  0,  0 },  /* Hash: 14 */\n  /* 17 */  {  'X', 16, 0, etRADIX,      0,  4,  0 },  /* Hash: 19 */\n  /* 18 */  {  'n',  0, 0, etSIZE,       0,  0,  0 },\n  /* 19 */  {  'o',  8, 0, etRADIX,      0,  2, 17 },\n  /* 20 */  {  'p', 16, 0, etPOINTER,    0,  1,  0 },\n  /* 21 */  {  'q',  0, 4, etESCAPE_q,   0,  0,  0 },\n  /* 22 */  {  'r', 10, 1, etORDINAL,    0,  0,  0 }\n};\n\n/* Additional Notes:\n**\n**    %S    Takes a pointer to SrcItem.  Shows name or database.name\n**    %!S   Like %S but prefer the zName over the zAlias\n*/\n\n/*\n** Set the StrAccum object to an error mode.\n*/\nSQLITE_PRIVATE void sqlite3StrAccumSetError(StrAccum *p, u8 eError){\n  assert( eError==SQLITE_NOMEM || eError==SQLITE_TOOBIG );\n  p->accError = eError;\n  if( p->mxAlloc ) sqlite3_str_reset(p);\n  if( eError==SQLITE_TOOBIG ) sqlite3ErrorToParser(p->db, eError);\n}\n\n/*\n** Extra argument values from a PrintfArguments object\n*/\nstatic sqlite3_int64 getIntArg(PrintfArguments *p){\n  if( p->nArg<=p->nUsed ) return 0;\n  return sqlite3_value_int64(p->apArg[p->nUsed++]);\n}\nstatic double getDoubleArg(PrintfArguments *p){\n  if( p->nArg<=p->nUsed ) return 0.0;\n  return sqlite3_value_double(p->apArg[p->nUsed++]);\n}\nstatic char *getTextArg(PrintfArguments *p){\n  if( p->nArg<=p->nUsed ) return 0;\n  return (char*)sqlite3_value_text(p->apArg[p->nUsed++]);\n}\n\n/*\n** Allocate memory for a temporary buffer needed for printf rendering.\n**\n** If the requested size of the temp buffer is larger than the size\n** of the output buffer in pAccum, then cause an SQLITE_TOOBIG error.\n** Do the size check before the memory allocation to prevent rogue\n** SQL from requesting large allocations using the precision or width\n** field of the printf() function.\n*/\nstatic char *printfTempBuf(sqlite3_str *pAccum, sqlite3_int64 n){\n  char *z;\n  if( pAccum->accError ) return 0;\n  if( n>pAccum->nAlloc && n>pAccum->mxAlloc ){\n    sqlite3StrAccumSetError(pAccum, SQLITE_TOOBIG);\n    return 0;\n  }\n  z = sqlite3DbMallocRaw(pAccum->db, n);\n  if( z==0 ){\n    sqlite3StrAccumSetError(pAccum, SQLITE_NOMEM);\n  }\n  return z;\n}\n\n/*\n** On machines with a small stack size, you can redefine the\n** SQLITE_PRINT_BUF_SIZE to be something smaller, if desired.\n*/\n#ifndef SQLITE_PRINT_BUF_SIZE\n# define SQLITE_PRINT_BUF_SIZE 70\n#endif\n#define etBUFSIZE SQLITE_PRINT_BUF_SIZE  /* Size of the output buffer */\n\n/*\n** Hard limit on the precision of floating-point conversions.\n*/\n#ifndef SQLITE_PRINTF_PRECISION_LIMIT\n# define SQLITE_FP_PRECISION_LIMIT 100000000\n#endif\n\n/*\n** Render a string given by \"fmt\" into the StrAccum object.\n*/\nSQLITE_API void sqlite3_str_vappendf(\n  sqlite3_str *pAccum,       /* Accumulate results here */\n  const char *fmt,           /* Format string */\n  va_list ap                 /* arguments */\n){\n  int c;                     /* Next character in the format string */\n  char *bufpt;               /* Pointer to the conversion buffer */\n  int precision;             /* Precision of the current field */\n  int length;                /* Length of the field */\n  int idx;                   /* A general purpose loop counter */\n  int width;                 /* Width of the current field */\n  etByte flag_leftjustify;   /* True if \"-\" flag is present */\n  etByte flag_prefix;        /* '+' or ' ' or 0 for prefix */\n  etByte flag_alternateform; /* True if \"#\" flag is present */\n  etByte flag_altform2;      /* True if \"!\" flag is present */\n  etByte flag_zeropad;       /* True if field width constant starts with zero */\n  etByte flag_long;          /* 1 for the \"l\" flag, 2 for \"ll\", 0 by default */\n  etByte done;               /* Loop termination flag */\n  etByte cThousand;          /* Thousands separator for %d and %u */\n  etByte xtype = etINVALID;  /* Conversion paradigm */\n  u8 bArgList;               /* True for SQLITE_PRINTF_SQLFUNC */\n  char prefix;               /* Prefix character.  \"+\" or \"-\" or \" \" or '\\0'. */\n  sqlite_uint64 longvalue;   /* Value for integer types */\n  double realvalue;          /* Value for real types */\n  const et_info *infop;      /* Pointer to the appropriate info structure */\n  char *zOut;                /* Rendering buffer */\n  int nOut;                  /* Size of the rendering buffer */\n  char *zExtra = 0;          /* Malloced memory used by some conversion */\n  int exp, e2;               /* exponent of real numbers */\n  etByte flag_dp;            /* True if decimal point should be shown */\n  etByte flag_rtz;           /* True if trailing zeros should be removed */\n\n  PrintfArguments *pArgList = 0; /* Arguments for SQLITE_PRINTF_SQLFUNC */\n  char buf[etBUFSIZE];       /* Conversion buffer */\n\n  /* pAccum never starts out with an empty buffer that was obtained from\n  ** malloc().  This precondition is required by the mprintf(\"%z...\")\n  ** optimization. */\n  assert( pAccum->nChar>0 || (pAccum->printfFlags&SQLITE_PRINTF_MALLOCED)==0 );\n\n  bufpt = 0;\n  if( (pAccum->printfFlags & SQLITE_PRINTF_SQLFUNC)!=0 ){\n    pArgList = va_arg(ap, PrintfArguments*);\n    bArgList = 1;\n  }else{\n    bArgList = 0;\n  }\n  for(; (c=(*fmt))!=0; ++fmt){\n    if( c!='%' ){\n      bufpt = (char *)fmt;\n#if HAVE_STRCHRNUL\n      fmt = strchrnul(fmt, '%');\n#else\n      fmt = strchr(fmt, '%');\n      if( fmt==0 ){\n        fmt = bufpt + strlen(bufpt);\n      }\n#endif\n      sqlite3_str_append(pAccum, bufpt, (int)(fmt - bufpt));\n      if( *fmt==0 ) break;\n    }\n    if( (c=(*++fmt))==0 ){\n      sqlite3_str_append(pAccum, \"%\", 1);\n      break;\n    }\n    /* Find out what flags are present */\n    flag_leftjustify = flag_prefix = cThousand =\n     flag_alternateform = flag_altform2 = flag_zeropad = 0;\n    done = 0;\n    width = 0;\n    flag_long = 0;\n    precision = -1;\n    do{\n      switch( c ){\n        case '-':   flag_leftjustify = 1;     break;\n        case '+':   flag_prefix = '+';        break;\n        case ' ':   flag_prefix = ' ';        break;\n        case '#':   flag_alternateform = 1;   break;\n        case '!':   flag_altform2 = 1;        break;\n        case '0':   flag_zeropad = 1;         break;\n        case ',':   cThousand = ',';          break;\n        default:    done = 1;                 break;\n        case 'l': {\n          flag_long = 1;\n          c = *++fmt;\n          if( c=='l' ){\n            c = *++fmt;\n            flag_long = 2;\n          }\n          done = 1;\n          break;\n        }\n        case '1': case '2': case '3': case '4': case '5':\n        case '6': case '7': case '8': case '9': {\n          unsigned wx = c - '0';\n          while( (c = *++fmt)>='0' && c<='9' ){\n            wx = wx*10 + c - '0';\n          }\n          testcase( wx>0x7fffffff );\n          width = wx & 0x7fffffff;\n#ifdef SQLITE_PRINTF_PRECISION_LIMIT\n          if( width>SQLITE_PRINTF_PRECISION_LIMIT ){\n            width = SQLITE_PRINTF_PRECISION_LIMIT;\n          }\n#endif\n          if( c!='.' && c!='l' ){\n            done = 1;\n          }else{\n            fmt--;\n          }\n          break;\n        }\n        case '*': {\n          if( bArgList ){\n            width = (int)getIntArg(pArgList);\n          }else{\n            width = va_arg(ap,int);\n          }\n          if( width<0 ){\n            flag_leftjustify = 1;\n            width = width >= -2147483647 ? -width : 0;\n          }\n#ifdef SQLITE_PRINTF_PRECISION_LIMIT\n          if( width>SQLITE_PRINTF_PRECISION_LIMIT ){\n            width = SQLITE_PRINTF_PRECISION_LIMIT;\n          }\n#endif\n          if( (c = fmt[1])!='.' && c!='l' ){\n            c = *++fmt;\n            done = 1;\n          }\n          break;\n        }\n        case '.': {\n          c = *++fmt;\n          if( c=='*' ){\n            if( bArgList ){\n              precision = (int)getIntArg(pArgList);\n            }else{\n              precision = va_arg(ap,int);\n            }\n            if( precision<0 ){\n              precision = precision >= -2147483647 ? -precision : -1;\n            }\n            c = *++fmt;\n          }else{\n            unsigned px = 0;\n            while( c>='0' && c<='9' ){\n              px = px*10 + c - '0';\n              c = *++fmt;\n            }\n            testcase( px>0x7fffffff );\n            precision = px & 0x7fffffff;\n          }\n#ifdef SQLITE_PRINTF_PRECISION_LIMIT\n          if( precision>SQLITE_PRINTF_PRECISION_LIMIT ){\n            precision = SQLITE_PRINTF_PRECISION_LIMIT;\n          }\n#endif\n          if( c=='l' ){\n            --fmt;\n          }else{\n            done = 1;\n          }\n          break;\n        }\n      }\n    }while( !done && (c=(*++fmt))!=0 );\n\n    /* Fetch the info entry for the field */\n#ifdef SQLITE_EBCDIC\n    /* The hash table only works for ASCII.  For EBCDIC, we need to do\n    ** a linear search of the table */\n    infop = &fmtinfo[0];\n    xtype = etINVALID;\n    for(idx=0; idx<ArraySize(fmtinfo); idx++){\n      if( c==fmtinfo[idx].fmttype ){\n        infop = &fmtinfo[idx];\n        xtype = infop->type;\n        break;\n      }\n    }\n#else\n    /* Fast hash-table lookup */\n    assert( ArraySize(fmtinfo)==23 );\n    idx = ((unsigned)c) % 23;\n    if( fmtinfo[idx].fmttype==c\n     || fmtinfo[idx = fmtinfo[idx].iNxt].fmttype==c\n    ){\n      infop = &fmtinfo[idx];\n      xtype = infop->type;\n    }else{\n      infop = &fmtinfo[0];\n      xtype = etINVALID;\n    }\n#endif\n\n    /*\n    ** At this point, variables are initialized as follows:\n    **\n    **   flag_alternateform          TRUE if a '#' is present.\n    **   flag_altform2               TRUE if a '!' is present.\n    **   flag_prefix                 '+' or ' ' or zero\n    **   flag_leftjustify            TRUE if a '-' is present or if the\n    **                               field width was negative.\n    **   flag_zeropad                TRUE if the width began with 0.\n    **   flag_long                   1 for \"l\", 2 for \"ll\"\n    **   width                       The specified field width.  This is\n    **                               always non-negative.  Zero is the default.\n    **   precision                   The specified precision.  The default\n    **                               is -1.\n    **   xtype                       The class of the conversion.\n    **   infop                       Pointer to the appropriate info struct.\n    */\n    assert( width>=0 );\n    assert( precision>=(-1) );\n    switch( xtype ){\n      case etPOINTER:\n        flag_long = sizeof(char*)==sizeof(i64) ? 2 :\n                     sizeof(char*)==sizeof(long int) ? 1 : 0;\n        /* no break */ deliberate_fall_through\n      case etORDINAL:\n      case etRADIX:\n        cThousand = 0;\n        /* no break */ deliberate_fall_through\n      case etDECIMAL:\n        if( infop->flags & FLAG_SIGNED ){\n          i64 v;\n          if( bArgList ){\n            v = getIntArg(pArgList);\n          }else if( flag_long ){\n            if( flag_long==2 ){\n              v = va_arg(ap,i64) ;\n            }else{\n              v = va_arg(ap,long int);\n            }\n          }else{\n            v = va_arg(ap,int);\n          }\n          if( v<0 ){\n            testcase( v==SMALLEST_INT64 );\n            testcase( v==(-1) );\n            longvalue = ~v;\n            longvalue++;\n            prefix = '-';\n          }else{\n            longvalue = v;\n            prefix = flag_prefix;\n          }\n        }else{\n          if( bArgList ){\n            longvalue = (u64)getIntArg(pArgList);\n          }else if( flag_long ){\n            if( flag_long==2 ){\n              longvalue = va_arg(ap,u64);\n            }else{\n              longvalue = va_arg(ap,unsigned long int);\n            }\n          }else{\n            longvalue = va_arg(ap,unsigned int);\n          }\n          prefix = 0;\n        }\n\n#if WHERETRACE_ENABLED\n        if( xtype==etPOINTER && sqlite3WhereTrace & 0x100000 ) longvalue = 0;\n#endif\n#if TREETRACE_ENABLED\n        if( xtype==etPOINTER && sqlite3TreeTrace & 0x100000 ) longvalue = 0;\n#endif\n\n        if( longvalue==0 ) flag_alternateform = 0;\n        if( flag_zeropad && precision<width-(prefix!=0) ){\n          precision = width-(prefix!=0);\n        }\n        if( precision<etBUFSIZE-10-etBUFSIZE/3 ){\n          nOut = etBUFSIZE;\n          zOut = buf;\n        }else{\n          u64 n;\n          n = (u64)precision + 10;\n          if( cThousand ) n += precision/3;\n          zOut = zExtra = printfTempBuf(pAccum, n);\n          if( zOut==0 ) return;\n          nOut = (int)n;\n        }\n        bufpt = &zOut[nOut-1];\n        if( xtype==etORDINAL ){\n          static const char zOrd[] = \"thstndrd\";\n          int x = (int)(longvalue % 10);\n          if( x>=4 || (longvalue/10)%10==1 ){\n            x = 0;\n          }\n          *(--bufpt) = zOrd[x*2+1];\n          *(--bufpt) = zOrd[x*2];\n        }\n        {\n          const char *cset = &aDigits[infop->charset];\n          u8 base = infop->base;\n          do{                                           /* Convert to ascii */\n            *(--bufpt) = cset[longvalue%base];\n            longvalue = longvalue/base;\n          }while( longvalue>0 );\n        }\n        length = (int)(&zOut[nOut-1]-bufpt);\n        while( precision>length ){\n          *(--bufpt) = '0';                             /* Zero pad */\n          length++;\n        }\n        if( cThousand ){\n          int nn = (length - 1)/3;  /* Number of \",\" to insert */\n          int ix = (length - 1)%3 + 1;\n          bufpt -= nn;\n          for(idx=0; nn>0; idx++){\n            bufpt[idx] = bufpt[idx+nn];\n            ix--;\n            if( ix==0 ){\n              bufpt[++idx] = cThousand;\n              nn--;\n              ix = 3;\n            }\n          }\n        }\n        if( prefix ) *(--bufpt) = prefix;               /* Add sign */\n        if( flag_alternateform && infop->prefix ){      /* Add \"0\" or \"0x\" */\n          const char *pre;\n          char x;\n          pre = &aPrefix[infop->prefix];\n          for(; (x=(*pre))!=0; pre++) *(--bufpt) = x;\n        }\n        length = (int)(&zOut[nOut-1]-bufpt);\n        break;\n      case etFLOAT:\n      case etEXP:\n      case etGENERIC: {\n        FpDecode s;\n        int iRound;\n        int j;\n\n        if( bArgList ){\n          realvalue = getDoubleArg(pArgList);\n        }else{\n          realvalue = va_arg(ap,double);\n        }\n        if( precision<0 ) precision = 6;         /* Set default precision */\n#ifdef SQLITE_FP_PRECISION_LIMIT\n        if( precision>SQLITE_FP_PRECISION_LIMIT ){\n          precision = SQLITE_FP_PRECISION_LIMIT;\n        }\n#endif\n        if( xtype==etFLOAT ){\n          iRound = -precision;\n        }else if( xtype==etGENERIC ){\n          if( precision==0 ) precision = 1;\n          iRound = precision;\n        }else{\n          iRound = precision+1;\n        }\n        sqlite3FpDecode(&s, realvalue, iRound, flag_altform2 ? 26 : 16);\n        if( s.isSpecial ){\n          if( s.isSpecial==2 ){\n            bufpt = flag_zeropad ? \"null\" : \"NaN\";\n            length = sqlite3Strlen30(bufpt);\n            break;\n          }else if( flag_zeropad ){\n            s.z[0] = '9';\n            s.iDP = 1000;\n            s.n = 1;\n          }else{\n            memcpy(buf, \"-Inf\", 5);\n            bufpt = buf;\n            if( s.sign=='-' ){\n              /* no-op */\n            }else if( flag_prefix ){\n              buf[0] = flag_prefix;\n            }else{\n              bufpt++;\n            }\n            length = sqlite3Strlen30(bufpt);\n            break;\n          }\n        }\n        if( s.sign=='-' ){\n          if( flag_alternateform\n           && !flag_prefix\n           && xtype==etFLOAT\n           && s.iDP<=iRound\n          ){\n            /* Suppress the minus sign if all of the following are true:\n            **   *  The value displayed is zero\n            **   *  The '#' flag is used\n            **   *  The '+' flag is not used, and\n            **   *  The format is %f\n            */\n            prefix = 0;\n          }else{\n            prefix = '-';\n          }\n        }else{\n          prefix = flag_prefix;\n        }\n\n        exp = s.iDP-1;\n\n        /*\n        ** If the field type is etGENERIC, then convert to either etEXP\n        ** or etFLOAT, as appropriate.\n        */\n        if( xtype==etGENERIC ){\n          assert( precision>0 );\n          precision--;\n          flag_rtz = !flag_alternateform;\n          if( exp<-4 || exp>precision ){\n            xtype = etEXP;\n          }else{\n            precision = precision - exp;\n            xtype = etFLOAT;\n          }\n        }else{\n          flag_rtz = flag_altform2;\n        }\n        if( xtype==etEXP ){\n          e2 = 0;\n        }else{\n          e2 = s.iDP - 1;\n        }\n        bufpt = buf;\n        {\n          i64 szBufNeeded;           /* Size of a temporary buffer needed */\n          szBufNeeded = MAX(e2,0)+(i64)precision+(i64)width+15;\n          if( cThousand && e2>0 ) szBufNeeded += (e2+2)/3;\n          if( szBufNeeded > etBUFSIZE ){\n            bufpt = zExtra = printfTempBuf(pAccum, szBufNeeded);\n            if( bufpt==0 ) return;\n          }\n        }\n        zOut = bufpt;\n        flag_dp = (precision>0 ?1:0) | flag_alternateform | flag_altform2;\n        /* The sign in front of the number */\n        if( prefix ){\n          *(bufpt++) = prefix;\n        }\n        /* Digits prior to the decimal point */\n        j = 0;\n        if( e2<0 ){\n          *(bufpt++) = '0';\n        }else{\n          for(; e2>=0; e2--){\n            *(bufpt++) = j<s.n ? s.z[j++] : '0';\n            if( cThousand && (e2%3)==0 && e2>1 ) *(bufpt++) = ',';\n          }\n        }\n        /* The decimal point */\n        if( flag_dp ){\n          *(bufpt++) = '.';\n        }\n        /* \"0\" digits after the decimal point but before the first\n        ** significant digit of the number */\n        for(e2++; e2<0 && precision>0; precision--, e2++){\n          *(bufpt++) = '0';\n        }\n        /* Significant digits after the decimal point */\n        while( (precision--)>0 ){\n          *(bufpt++) = j<s.n ? s.z[j++] : '0';\n        }\n        /* Remove trailing zeros and the \".\" if no digits follow the \".\" */\n        if( flag_rtz && flag_dp ){\n          while( bufpt[-1]=='0' ) *(--bufpt) = 0;\n          assert( bufpt>zOut );\n          if( bufpt[-1]=='.' ){\n            if( flag_altform2 ){\n              *(bufpt++) = '0';\n            }else{\n              *(--bufpt) = 0;\n            }\n          }\n        }\n        /* Add the \"eNNN\" suffix */\n        if( xtype==etEXP ){\n          exp = s.iDP - 1;\n          *(bufpt++) = aDigits[infop->charset];\n          if( exp<0 ){\n            *(bufpt++) = '-'; exp = -exp;\n          }else{\n            *(bufpt++) = '+';\n          }\n          if( exp>=100 ){\n            *(bufpt++) = (char)((exp/100)+'0');        /* 100's digit */\n            exp %= 100;\n          }\n          *(bufpt++) = (char)(exp/10+'0');             /* 10's digit */\n          *(bufpt++) = (char)(exp%10+'0');             /* 1's digit */\n        }\n        *bufpt = 0;\n\n        /* The converted number is in buf[] and zero terminated. Output it.\n        ** Note that the number is in the usual order, not reversed as with\n        ** integer conversions. */\n        length = (int)(bufpt-zOut);\n        bufpt = zOut;\n\n        /* Special case:  Add leading zeros if the flag_zeropad flag is\n        ** set and we are not left justified */\n        if( flag_zeropad && !flag_leftjustify && length < width){\n          int i;\n          int nPad = width - length;\n          for(i=width; i>=nPad; i--){\n            bufpt[i] = bufpt[i-nPad];\n          }\n          i = prefix!=0;\n          while( nPad-- ) bufpt[i++] = '0';\n          length = width;\n        }\n        break;\n      }\n      case etSIZE:\n        if( !bArgList ){\n          *(va_arg(ap,int*)) = pAccum->nChar;\n        }\n        length = width = 0;\n        break;\n      case etPERCENT:\n        buf[0] = '%';\n        bufpt = buf;\n        length = 1;\n        break;\n      case etCHARX:\n        if( bArgList ){\n          bufpt = getTextArg(pArgList);\n          length = 1;\n          if( bufpt ){\n            buf[0] = c = *(bufpt++);\n            if( (c&0xc0)==0xc0 ){\n              while( length<4 && (bufpt[0]&0xc0)==0x80 ){\n                buf[length++] = *(bufpt++);\n              }\n            }\n          }else{\n            buf[0] = 0;\n          }\n        }else{\n          unsigned int ch = va_arg(ap,unsigned int);\n          length = sqlite3AppendOneUtf8Character(buf, ch);\n        }\n        if( precision>1 ){\n          i64 nPrior = 1;\n          width -= precision-1;\n          if( width>1 && !flag_leftjustify ){\n            sqlite3_str_appendchar(pAccum, width-1, ' ');\n            width = 0;\n          }\n          sqlite3_str_append(pAccum, buf, length);\n          precision--;\n          while( precision > 1 ){\n            i64 nCopyBytes;\n            if( nPrior > precision-1 ) nPrior = precision - 1;\n            nCopyBytes = length*nPrior;\n            if( nCopyBytes + pAccum->nChar >= pAccum->nAlloc ){\n              sqlite3StrAccumEnlarge(pAccum, nCopyBytes);\n            }\n            if( pAccum->accError ) break;\n            sqlite3_str_append(pAccum,\n                 &pAccum->zText[pAccum->nChar-nCopyBytes], nCopyBytes);\n            precision -= nPrior;\n            nPrior *= 2;\n          }\n        }\n        bufpt = buf;\n        flag_altform2 = 1;\n        goto adjust_width_for_utf8;\n      case etSTRING:\n      case etDYNSTRING:\n        if( bArgList ){\n          bufpt = getTextArg(pArgList);\n          xtype = etSTRING;\n        }else{\n          bufpt = va_arg(ap,char*);\n        }\n        if( bufpt==0 ){\n          bufpt = \"\";\n        }else if( xtype==etDYNSTRING ){\n          if( pAccum->nChar==0\n           && pAccum->mxAlloc\n           && width==0\n           && precision<0\n           && pAccum->accError==0\n          ){\n            /* Special optimization for sqlite3_mprintf(\"%z...\"):\n            ** Extend an existing memory allocation rather than creating\n            ** a new one. */\n            assert( (pAccum->printfFlags&SQLITE_PRINTF_MALLOCED)==0 );\n            pAccum->zText = bufpt;\n            pAccum->nAlloc = sqlite3DbMallocSize(pAccum->db, bufpt);\n            pAccum->nChar = 0x7fffffff & (int)strlen(bufpt);\n            pAccum->printfFlags |= SQLITE_PRINTF_MALLOCED;\n            length = 0;\n            break;\n          }\n          zExtra = bufpt;\n        }\n        if( precision>=0 ){\n          if( flag_altform2 ){\n            /* Set length to the number of bytes needed in order to display\n            ** precision characters */\n            unsigned char *z = (unsigned char*)bufpt;\n            while( precision-- > 0 && z[0] ){\n              SQLITE_SKIP_UTF8(z);\n            }\n            length = (int)(z - (unsigned char*)bufpt);\n          }else{\n            for(length=0; length<precision && bufpt[length]; length++){}\n          }\n        }else{\n          length = 0x7fffffff & (int)strlen(bufpt);\n        }\n      adjust_width_for_utf8:\n        if( flag_altform2 && width>0 ){\n          /* Adjust width to account for extra bytes in UTF-8 characters */\n          int ii = length - 1;\n          while( ii>=0 ) if( (bufpt[ii--] & 0xc0)==0x80 ) width++;\n        }\n        break;\n      case etESCAPE_q:          /* %q: Escape ' characters */\n      case etESCAPE_Q:          /* %Q: Escape ' and enclose in '...' */\n      case etESCAPE_w: {        /* %w: Escape \" characters */\n        i64 i, j, k, n;\n        int needQuote = 0;\n        char ch;\n        char *escarg;\n        char q;\n\n        if( bArgList ){\n          escarg = getTextArg(pArgList);\n        }else{\n          escarg = va_arg(ap,char*);\n        }\n        if( escarg==0 ){\n          escarg = (xtype==etESCAPE_Q ? \"NULL\" : \"(NULL)\");\n        }else if( xtype==etESCAPE_Q ){\n          needQuote = 1;\n        }\n        if( xtype==etESCAPE_w ){\n          q = '\"';\n          flag_alternateform = 0;\n        }else{\n          q = '\\'';\n        }\n        /* For %q, %Q, and %w, the precision is the number of bytes (or\n        ** characters if the ! flags is present) to use from the input.\n        ** Because of the extra quoting characters inserted, the number\n        ** of output characters may be larger than the precision.\n        */\n        k = precision;\n        for(i=n=0; k!=0 && (ch=escarg[i])!=0; i++, k--){\n          if( ch==q )  n++;\n          if( flag_altform2 && (ch&0xc0)==0xc0 ){\n            while( (escarg[i+1]&0xc0)==0x80 ){ i++; }\n          }\n        }\n        if( flag_alternateform ){\n          /* For %#q, do unistr()-style backslash escapes for\n          ** all control characters, and for backslash itself.\n          ** For %#Q, do the same but only if there is at least\n          ** one control character. */\n          u32 nBack = 0;\n          u32 nCtrl = 0;\n          for(k=0; k<i; k++){\n            if( escarg[k]=='\\\\' ){\n              nBack++;\n            }else if( ((u8*)escarg)[k]<=0x1f ){\n              nCtrl++;\n            }\n          }\n          if( nCtrl || xtype==etESCAPE_q ){\n            n += nBack + 5*nCtrl;\n            if( xtype==etESCAPE_Q ){\n              n += 10;\n              needQuote = 2;\n            }\n          }else{\n            flag_alternateform = 0;\n          }\n        }\n        n += i + 3;\n        if( n>etBUFSIZE ){\n          bufpt = zExtra = printfTempBuf(pAccum, n);\n          if( bufpt==0 ) return;\n        }else{\n          bufpt = buf;\n        }\n        j = 0;\n        if( needQuote ){\n          if( needQuote==2 ){\n            memcpy(&bufpt[j], \"unistr('\", 8);\n            j += 8;\n          }else{\n            bufpt[j++] = '\\'';\n          }\n        }\n        k = i;\n        if( flag_alternateform ){\n          for(i=0; i<k; i++){\n            bufpt[j++] = ch = escarg[i];\n            if( ch==q ){\n              bufpt[j++] = ch;\n            }else if( ch=='\\\\' ){\n              bufpt[j++] = '\\\\';\n            }else if( ((unsigned char)ch)<=0x1f ){\n              bufpt[j-1] = '\\\\';\n              bufpt[j++] = 'u';\n              bufpt[j++] = '0';\n              bufpt[j++] = '0';\n              bufpt[j++] = ch>=0x10 ? '1' : '0';\n              bufpt[j++] = \"0123456789abcdef\"[ch&0xf];\n            }\n          }\n        }else{\n          for(i=0; i<k; i++){\n            bufpt[j++] = ch = escarg[i];\n            if( ch==q ) bufpt[j++] = ch;\n          }\n        }\n        if( needQuote ){\n          bufpt[j++] = '\\'';\n          if( needQuote==2 ) bufpt[j++] = ')';\n        }\n        bufpt[j] = 0;\n        length = j;\n        goto adjust_width_for_utf8;\n      }\n      case etTOKEN: {\n        if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;\n        if( flag_alternateform ){\n          /* %#T means an Expr pointer that uses Expr.u.zToken */\n          Expr *pExpr = va_arg(ap,Expr*);\n          if( ALWAYS(pExpr) && ALWAYS(!ExprHasProperty(pExpr,EP_IntValue)) ){\n            sqlite3_str_appendall(pAccum, (const char*)pExpr->u.zToken);\n            sqlite3RecordErrorOffsetOfExpr(pAccum->db, pExpr);\n          }\n        }else{\n          /* %T means a Token pointer */\n          Token *pToken = va_arg(ap, Token*);\n          assert( bArgList==0 );\n          if( pToken && pToken->n ){\n            sqlite3_str_append(pAccum, (const char*)pToken->z, pToken->n);\n            sqlite3RecordErrorByteOffset(pAccum->db, pToken->z);\n          }\n        }\n        length = width = 0;\n        break;\n      }\n      case etSRCITEM: {\n        SrcItem *pItem;\n        if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;\n        pItem = va_arg(ap, SrcItem*);\n        assert( bArgList==0 );\n        if( pItem->zAlias && !flag_altform2 ){\n          sqlite3_str_appendall(pAccum, pItem->zAlias);\n        }else if( pItem->zName ){\n          if( pItem->fg.fixedSchema==0\n           && pItem->fg.isSubquery==0\n           && pItem->u4.zDatabase!=0\n          ){\n            sqlite3_str_appendall(pAccum, pItem->u4.zDatabase);\n            sqlite3_str_append(pAccum, \".\", 1);\n          }\n          sqlite3_str_appendall(pAccum, pItem->zName);\n        }else if( pItem->zAlias ){\n          sqlite3_str_appendall(pAccum, pItem->zAlias);\n        }else if( ALWAYS(pItem->fg.isSubquery) ){/* Because of tag-20240424-1 */\n          Select *pSel = pItem->u4.pSubq->pSelect;\n          assert( pSel!=0 );\n          if( pSel->selFlags & SF_NestedFrom ){\n            sqlite3_str_appendf(pAccum, \"(join-%u)\", pSel->selId);\n          }else if( pSel->selFlags & SF_MultiValue ){\n            assert( !pItem->fg.isTabFunc && !pItem->fg.isIndexedBy );\n            sqlite3_str_appendf(pAccum, \"%u-ROW VALUES CLAUSE\",\n                                pItem->u1.nRow);\n          }else{\n            sqlite3_str_appendf(pAccum, \"(subquery-%u)\", pSel->selId);\n          }\n        }\n        length = width = 0;\n        break;\n      }\n      default: {\n        assert( xtype==etINVALID );\n        return;\n      }\n    }/* End switch over the format type */\n    /*\n    ** The text of the conversion is pointed to by \"bufpt\" and is\n    ** \"length\" characters long.  The field width is \"width\".  Do\n    ** the output.  Both length and width are in bytes, not characters,\n    ** at this point.  If the \"!\" flag was present on string conversions\n    ** indicating that width and precision should be expressed in characters,\n    ** then the values have been translated prior to reaching this point.\n    */\n    width -= length;\n    if( width>0 ){\n      if( !flag_leftjustify ) sqlite3_str_appendchar(pAccum, width, ' ');\n      sqlite3_str_append(pAccum, bufpt, length);\n      if( flag_leftjustify ) sqlite3_str_appendchar(pAccum, width, ' ');\n    }else{\n      sqlite3_str_append(pAccum, bufpt, length);\n    }\n\n    if( zExtra ){\n      sqlite3DbFree(pAccum->db, zExtra);\n      zExtra = 0;\n    }\n  }/* End for loop over the format string */\n} /* End of function */\n\n\n/*\n** The z string points to the first character of a token that is\n** associated with an error.  If db does not already have an error\n** byte offset recorded, try to compute the error byte offset for\n** z and set the error byte offset in db.\n*/\nSQLITE_PRIVATE void sqlite3RecordErrorByteOffset(sqlite3 *db, const char *z){\n  const Parse *pParse;\n  const char *zText;\n  const char *zEnd;\n  assert( z!=0 );\n  if( NEVER(db==0) ) return;\n  if( db->errByteOffset!=(-2) ) return;\n  pParse = db->pParse;\n  if( NEVER(pParse==0) ) return;\n  zText =pParse->zTail;\n  if( NEVER(zText==0) ) return;\n  zEnd = &zText[strlen(zText)];\n  if( SQLITE_WITHIN(z,zText,zEnd) ){\n    db->errByteOffset = (int)(z-zText);\n  }\n}\n\n/*\n** If pExpr has a byte offset for the start of a token, record that as\n** as the error offset.\n*/\nSQLITE_PRIVATE void sqlite3RecordErrorOffsetOfExpr(sqlite3 *db, const Expr *pExpr){\n  while( pExpr\n     && (ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) || pExpr->w.iOfst<=0)\n  ){\n    pExpr = pExpr->pLeft;\n  }\n  if( pExpr==0 ) return;\n  if( ExprHasProperty(pExpr, EP_FromDDL) ) return;\n  db->errByteOffset = pExpr->w.iOfst;\n}\n\n/*\n** Enlarge the memory allocation on a StrAccum object so that it is\n** able to accept at least N more bytes of text.\n**\n** Return the number of bytes of text that StrAccum is able to accept\n** after the attempted enlargement.  The value returned might be zero.\n*/\nSQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum *p, i64 N){\n  char *zNew;\n  assert( p->nChar+N >= p->nAlloc ); /* Only called if really needed */\n  if( p->accError ){\n    testcase(p->accError==SQLITE_TOOBIG);\n    testcase(p->accError==SQLITE_NOMEM);\n    return 0;\n  }\n  if( p->mxAlloc==0 ){\n    sqlite3StrAccumSetError(p, SQLITE_TOOBIG);\n    return p->nAlloc - p->nChar - 1;\n  }else{\n    char *zOld = isMalloced(p) ? p->zText : 0;\n    i64 szNew = p->nChar + N + 1;\n    if( szNew+p->nChar<=p->mxAlloc ){\n      /* Force exponential buffer size growth as long as it does not overflow,\n      ** to avoid having to call this routine too often */\n      szNew += p->nChar;\n    }\n    if( szNew > p->mxAlloc ){\n      sqlite3_str_reset(p);\n      sqlite3StrAccumSetError(p, SQLITE_TOOBIG);\n      return 0;\n    }else{\n      p->nAlloc = (int)szNew;\n    }\n    if( p->db ){\n      zNew = sqlite3DbRealloc(p->db, zOld, p->nAlloc);\n    }else{\n      zNew = sqlite3Realloc(zOld, p->nAlloc);\n    }\n    if( zNew ){\n      assert( p->zText!=0 || p->nChar==0 );\n      if( !isMalloced(p) && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);\n      p->zText = zNew;\n      p->nAlloc = sqlite3DbMallocSize(p->db, zNew);\n      p->printfFlags |= SQLITE_PRINTF_MALLOCED;\n    }else{\n      sqlite3_str_reset(p);\n      sqlite3StrAccumSetError(p, SQLITE_NOMEM);\n      return 0;\n    }\n  }\n  assert( N>=0 && N<=0x7fffffff );\n  return (int)N;\n}\n\n/*\n** Append N copies of character c to the given string buffer.\n*/\nSQLITE_API void sqlite3_str_appendchar(sqlite3_str *p, int N, char c){\n  testcase( p->nChar + (i64)N > 0x7fffffff );\n  if( p->nChar+(i64)N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ){\n    return;\n  }\n  while( (N--)>0 ) p->zText[p->nChar++] = c;\n}\n\n/*\n** The StrAccum \"p\" is not large enough to accept N new bytes of z[].\n** So enlarge if first, then do the append.\n**\n** This is a helper routine to sqlite3_str_append() that does special-case\n** work (enlarging the buffer) using tail recursion, so that the\n** sqlite3_str_append() routine can use fast calling semantics.\n*/\nstatic void SQLITE_NOINLINE enlargeAndAppend(StrAccum *p, const char *z, int N){\n  N = sqlite3StrAccumEnlarge(p, N);\n  if( N>0 ){\n    memcpy(&p->zText[p->nChar], z, N);\n    p->nChar += N;\n  }\n}\n\n/*\n** Append N bytes of text from z to the StrAccum object.  Increase the\n** size of the memory allocation for StrAccum if necessary.\n*/\nSQLITE_API void sqlite3_str_append(sqlite3_str *p, const char *z, int N){\n  assert( z!=0 || N==0 );\n  assert( p->zText!=0 || p->nChar==0 || p->accError );\n  assert( N>=0 );\n  assert( p->accError==0 || p->nAlloc==0 || p->mxAlloc==0 );\n  if( p->nChar+N >= p->nAlloc ){\n    enlargeAndAppend(p,z,N);\n  }else if( N ){\n    assert( p->zText );\n    p->nChar += N;\n    memcpy(&p->zText[p->nChar-N], z, N);\n  }\n}\n\n/*\n** Append the complete text of zero-terminated string z[] to the p string.\n*/\nSQLITE_API void sqlite3_str_appendall(sqlite3_str *p, const char *z){\n  sqlite3_str_append(p, z, sqlite3Strlen30(z));\n}\n\n\n/*\n** Finish off a string by making sure it is zero-terminated.\n** Return a pointer to the resulting string.  Return a NULL\n** pointer if any kind of error was encountered.\n*/\nstatic SQLITE_NOINLINE char *strAccumFinishRealloc(StrAccum *p){\n  char *zText;\n  assert( p->mxAlloc>0 && !isMalloced(p) );\n  zText = sqlite3DbMallocRaw(p->db, 1+(u64)p->nChar );\n  if( zText ){\n    memcpy(zText, p->zText, p->nChar+1);\n    p->printfFlags |= SQLITE_PRINTF_MALLOCED;\n  }else{\n    sqlite3StrAccumSetError(p, SQLITE_NOMEM);\n  }\n  p->zText = zText;\n  return zText;\n}\nSQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){\n  if( p->zText ){\n    p->zText[p->nChar] = 0;\n    if( p->mxAlloc>0 && !isMalloced(p) ){\n      return strAccumFinishRealloc(p);\n    }\n  }\n  return p->zText;\n}\n\n/*\n** Use the content of the StrAccum passed as the second argument\n** as the result of an SQL function.\n*/\nSQLITE_PRIVATE void sqlite3ResultStrAccum(sqlite3_context *pCtx, StrAccum *p){\n  if( p->accError ){\n    sqlite3_result_error_code(pCtx, p->accError);\n    sqlite3_str_reset(p);\n  }else if( isMalloced(p) ){\n    sqlite3_result_text(pCtx, p->zText, p->nChar, SQLITE_DYNAMIC);\n  }else{\n    sqlite3_result_text(pCtx, \"\", 0, SQLITE_STATIC);\n    sqlite3_str_reset(p);\n  }\n}\n\n/*\n** This singleton is an sqlite3_str object that is returned if\n** sqlite3_malloc() fails to provide space for a real one.  This\n** sqlite3_str object accepts no new text and always returns\n** an SQLITE_NOMEM error.\n*/\nstatic sqlite3_str sqlite3OomStr = {\n   0, 0, 0, 0, 0, SQLITE_NOMEM, 0\n};\n\n/* Finalize a string created using sqlite3_str_new().\n*/\nSQLITE_API char *sqlite3_str_finish(sqlite3_str *p){\n  char *z;\n  if( p!=0 && p!=&sqlite3OomStr ){\n    z = sqlite3StrAccumFinish(p);\n    sqlite3_free(p);\n  }else{\n    z = 0;\n  }\n  return z;\n}\n\n/* Return any error code associated with p */\nSQLITE_API int sqlite3_str_errcode(sqlite3_str *p){\n  return p ? p->accError : SQLITE_NOMEM;\n}\n\n/* Return the current length of p in bytes */\nSQLITE_API int sqlite3_str_length(sqlite3_str *p){\n  return p ? p->nChar : 0;\n}\n\n/* Return the current value for p */\nSQLITE_API char *sqlite3_str_value(sqlite3_str *p){\n  if( p==0 || p->nChar==0 ) return 0;\n  p->zText[p->nChar] = 0;\n  return p->zText;\n}\n\n/*\n** Reset an StrAccum string.  Reclaim all malloced memory.\n*/\nSQLITE_API void sqlite3_str_reset(StrAccum *p){\n  if( isMalloced(p) ){\n    sqlite3DbFree(p->db, p->zText);\n    p->printfFlags &= ~SQLITE_PRINTF_MALLOCED;\n  }\n  p->nAlloc = 0;\n  p->nChar = 0;\n  p->zText = 0;\n}\n\n/*\n** Initialize a string accumulator.\n**\n** p:     The accumulator to be initialized.\n** db:    Pointer to a database connection.  May be NULL.  Lookaside\n**        memory is used if not NULL. db->mallocFailed is set appropriately\n**        when not NULL.\n** zBase: An initial buffer.  May be NULL in which case the initial buffer\n**        is malloced.\n** n:     Size of zBase in bytes.  If total space requirements never exceed\n**        n then no memory allocations ever occur.\n** mx:    Maximum number of bytes to accumulate.  If mx==0 then no memory\n**        allocations will ever occur.\n*/\nSQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum *p, sqlite3 *db, char *zBase, int n, int mx){\n  p->zText = zBase;\n  p->db = db;\n  p->nAlloc = n;\n  p->mxAlloc = mx;\n  p->nChar = 0;\n  p->accError = 0;\n  p->printfFlags = 0;\n}\n\n/* Allocate and initialize a new dynamic string object */\nSQLITE_API sqlite3_str *sqlite3_str_new(sqlite3 *db){\n  sqlite3_str *p = sqlite3_malloc64(sizeof(*p));\n  if( p ){\n    sqlite3StrAccumInit(p, 0, 0, 0,\n            db ? db->aLimit[SQLITE_LIMIT_LENGTH] : SQLITE_MAX_LENGTH);\n  }else{\n    p = &sqlite3OomStr;\n  }\n  return p;\n}\n\n/*\n** Print into memory obtained from sqliteMalloc().  Use the internal\n** %-conversion extensions.\n*/\nSQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){\n  char *z;\n  char zBase[SQLITE_PRINT_BUF_SIZE];\n  StrAccum acc;\n  assert( db!=0 );\n  sqlite3StrAccumInit(&acc, db, zBase, sizeof(zBase),\n                      db->aLimit[SQLITE_LIMIT_LENGTH]);\n  acc.printfFlags = SQLITE_PRINTF_INTERNAL;\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  z = sqlite3StrAccumFinish(&acc);\n  if( acc.accError==SQLITE_NOMEM ){\n    sqlite3OomFault(db);\n  }\n  return z;\n}\n\n/*\n** Print into memory obtained from sqliteMalloc().  Use the internal\n** %-conversion extensions.\n*/\nSQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){\n  va_list ap;\n  char *z;\n  va_start(ap, zFormat);\n  z = sqlite3VMPrintf(db, zFormat, ap);\n  va_end(ap);\n  return z;\n}\n\n/*\n** Print into memory obtained from sqlite3_malloc().  Omit the internal\n** %-conversion extensions.\n*/\nSQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){\n  char *z;\n  char zBase[SQLITE_PRINT_BUF_SIZE];\n  StrAccum acc;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( zFormat==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  z = sqlite3StrAccumFinish(&acc);\n  return z;\n}\n\n/*\n** Print into memory obtained from sqlite3_malloc()().  Omit the internal\n** %-conversion extensions.\n*/\nSQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){\n  va_list ap;\n  char *z;\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  va_start(ap, zFormat);\n  z = sqlite3_vmprintf(zFormat, ap);\n  va_end(ap);\n  return z;\n}\n\n/*\n** sqlite3_snprintf() works like snprintf() except that it ignores the\n** current locale settings.  This is important for SQLite because we\n** are not able to use a \",\" as the decimal point in place of \".\" as\n** specified by some locales.\n**\n** Oops:  The first two arguments of sqlite3_snprintf() are backwards\n** from the snprintf() standard.  Unfortunately, it is too late to change\n** this without breaking compatibility, so we just have to live with the\n** mistake.\n**\n** sqlite3_vsnprintf() is the varargs version.\n*/\nSQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){\n  StrAccum acc;\n  if( n<=0 ) return zBuf;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( zBuf==0 || zFormat==0 ) {\n    (void)SQLITE_MISUSE_BKPT;\n    if( zBuf ) zBuf[0] = 0;\n    return zBuf;\n  }\n#endif\n  sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  zBuf[acc.nChar] = 0;\n  return zBuf;\n}\nSQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){\n  StrAccum acc;\n  va_list ap;\n  if( n<=0 ) return zBuf;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( zBuf==0 || zFormat==0 ) {\n    (void)SQLITE_MISUSE_BKPT;\n    if( zBuf ) zBuf[0] = 0;\n    return zBuf;\n  }\n#endif\n  sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);\n  va_start(ap,zFormat);\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  va_end(ap);\n  zBuf[acc.nChar] = 0;\n  return zBuf;\n}\n\n/* Maximum size of an sqlite3_log() message. */\n#if defined(SQLITE_MAX_LOG_MESSAGE)\n  /* Leave the definition as supplied */\n#elif SQLITE_PRINT_BUF_SIZE*10>10000\n# define SQLITE_MAX_LOG_MESSAGE 10000\n#else\n# define SQLITE_MAX_LOG_MESSAGE (SQLITE_PRINT_BUF_SIZE*10)\n#endif\n\n/*\n** This is the routine that actually formats the sqlite3_log() message.\n** We house it in a separate routine from sqlite3_log() to avoid using\n** stack space on small-stack systems when logging is disabled.\n**\n** sqlite3_log() must render into a static buffer.  It cannot dynamically\n** allocate memory because it might be called while the memory allocator\n** mutex is held.\n**\n** sqlite3_str_vappendf() might ask for *temporary* memory allocations for\n** certain format characters (%q) or for very large precisions or widths.\n** Care must be taken that any sqlite3_log() calls that occur while the\n** memory mutex is held do not use these mechanisms.\n*/\nstatic void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){\n  StrAccum acc;                          /* String accumulator */\n  char zMsg[SQLITE_MAX_LOG_MESSAGE];     /* Complete log message */\n\n  sqlite3StrAccumInit(&acc, 0, zMsg, sizeof(zMsg), 0);\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode,\n                           sqlite3StrAccumFinish(&acc));\n}\n\n/*\n** Format and write a message to the log if logging is enabled.\n*/\nSQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){\n  va_list ap;                             /* Vararg list */\n  if( sqlite3GlobalConfig.xLog ){\n    va_start(ap, zFormat);\n    renderLogMsg(iErrCode, zFormat, ap);\n    va_end(ap);\n  }\n}\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)\n/*\n** A version of printf() that understands %lld.  Used for debugging.\n** The printf() built into some versions of windows does not understand %lld\n** and segfaults if you give it a long long int.\n*/\nSQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){\n  va_list ap;\n  StrAccum acc;\n  char zBuf[SQLITE_PRINT_BUF_SIZE*10];\n  sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n  va_start(ap,zFormat);\n  sqlite3_str_vappendf(&acc, zFormat, ap);\n  va_end(ap);\n  sqlite3StrAccumFinish(&acc);\n#ifdef SQLITE_OS_TRACE_PROC\n  {\n    extern void SQLITE_OS_TRACE_PROC(const char *zBuf, int nBuf);\n    SQLITE_OS_TRACE_PROC(zBuf, sizeof(zBuf));\n  }\n#else\n  fprintf(stdout,\"%s\", zBuf);\n  fflush(stdout);\n#endif\n}\n#endif\n\n\n/*\n** variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument\n** can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.\n*/\nSQLITE_API void sqlite3_str_appendf(StrAccum *p, const char *zFormat, ...){\n  va_list ap;\n  va_start(ap,zFormat);\n  sqlite3_str_vappendf(p, zFormat, ap);\n  va_end(ap);\n}\n\n\n/*****************************************************************************\n** Reference counted string/blob storage\n*****************************************************************************/\n\n/*\n** Increase the reference count of the string by one.\n**\n** The input parameter is returned.\n*/\nSQLITE_PRIVATE char *sqlite3RCStrRef(char *z){\n  RCStr *p = (RCStr*)z;\n  assert( p!=0 );\n  p--;\n  p->nRCRef++;\n  return z;\n}\n\n/*\n** Decrease the reference count by one.  Free the string when the\n** reference count reaches zero.\n*/\nSQLITE_PRIVATE void sqlite3RCStrUnref(void *z){\n  RCStr *p = (RCStr*)z;\n  assert( p!=0 );\n  p--;\n  assert( p->nRCRef>0 );\n  if( p->nRCRef>=2 ){\n    p->nRCRef--;\n  }else{\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Create a new string that is capable of holding N bytes of text, not counting\n** the zero byte at the end.  The string is uninitialized.\n**\n** The reference count is initially 1.  Call sqlite3RCStrUnref() to free the\n** newly allocated string.\n**\n** This routine returns 0 on an OOM.\n*/\nSQLITE_PRIVATE char *sqlite3RCStrNew(u64 N){\n  RCStr *p = sqlite3_malloc64( N + sizeof(*p) + 1 );\n  if( p==0 ) return 0;\n  p->nRCRef = 1;\n  return (char*)&p[1];\n}\n\n/*\n** Change the size of the string so that it is able to hold N bytes.\n** The string might be reallocated, so return the new allocation.\n*/\nSQLITE_PRIVATE char *sqlite3RCStrResize(char *z, u64 N){\n  RCStr *p = (RCStr*)z;\n  RCStr *pNew;\n  assert( p!=0 );\n  p--;\n  assert( p->nRCRef==1 );\n  pNew = sqlite3_realloc64(p, N+sizeof(RCStr)+1);\n  if( pNew==0 ){\n    sqlite3_free(p);\n    return 0;\n  }else{\n    return (char*)&pNew[1];\n  }\n}\n\n/************** End of printf.c **********************************************/\n/************** Begin file treeview.c ****************************************/\n/*\n** 2015-06-08\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains C code to implement the TreeView debugging routines.\n** These routines print a parse tree to standard output for debugging and\n** analysis.\n**\n** The interfaces in this file is only available when compiling\n** with SQLITE_DEBUG.\n*/\n/* #include \"sqliteInt.h\" */\n#ifdef SQLITE_DEBUG\n\n/*\n** Add a new subitem to the tree.  The moreToFollow flag indicates that this\n** is not the last item in the tree.\n*/\nstatic void sqlite3TreeViewPush(TreeView **pp, u8 moreToFollow){\n  TreeView *p = *pp;\n  if( p==0 ){\n    *pp = p = sqlite3_malloc64( sizeof(*p) );\n    if( p==0 ) return;\n    memset(p, 0, sizeof(*p));\n  }else{\n    p->iLevel++;\n  }\n  assert( moreToFollow==0 || moreToFollow==1 );\n  if( p->iLevel<(int)sizeof(p->bLine) ) p->bLine[p->iLevel] = moreToFollow;\n}\n\n/*\n** Finished with one layer of the tree\n*/\nstatic void sqlite3TreeViewPop(TreeView **pp){\n  TreeView *p = *pp;\n  if( p==0 ) return;\n  p->iLevel--;\n  if( p->iLevel<0 ){\n    sqlite3_free(p);\n    *pp = 0;\n  }\n}\n\n/*\n** Generate a single line of output for the tree, with a prefix that contains\n** all the appropriate tree lines\n*/\nSQLITE_PRIVATE void sqlite3TreeViewLine(TreeView *p, const char *zFormat, ...){\n  va_list ap;\n  int i;\n  StrAccum acc;\n  char zBuf[1000];\n  sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n  if( p ){\n    for(i=0; i<p->iLevel && i<(int)sizeof(p->bLine)-1; i++){\n      sqlite3_str_append(&acc, p->bLine[i] ? \"|   \" : \"    \", 4);\n    }\n    sqlite3_str_append(&acc, p->bLine[i] ? \"|-- \" : \"'-- \", 4);\n  }\n  if( zFormat!=0 ){\n    va_start(ap, zFormat);\n    sqlite3_str_vappendf(&acc, zFormat, ap);\n    va_end(ap);\n    assert( acc.nChar>0 || acc.accError );\n    sqlite3_str_append(&acc, \"\\n\", 1);\n  }\n  sqlite3StrAccumFinish(&acc);\n  fprintf(stdout,\"%s\", zBuf);\n  fflush(stdout);\n}\n\n/*\n** Shorthand for starting a new tree item that consists of a single label\n*/\nstatic void sqlite3TreeViewItem(TreeView *p, const char *zLabel,u8 moreFollows){\n  sqlite3TreeViewPush(&p, moreFollows);\n  sqlite3TreeViewLine(p, \"%s\", zLabel);\n}\n\n/*\n** Show a list of Column objects in tree format.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewColumnList(\n  TreeView *pView,\n  const Column *aCol,\n  int nCol,\n  u8 moreToFollow\n){\n  int i;\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  sqlite3TreeViewLine(pView, \"COLUMNS\");\n  for(i=0; i<nCol; i++){\n    u16 flg = aCol[i].colFlags;\n    int colMoreToFollow = i<(nCol - 1);\n    sqlite3TreeViewPush(&pView, colMoreToFollow);\n    sqlite3TreeViewLine(pView, 0);\n    printf(\" %s\", aCol[i].zCnName);\n    switch( aCol[i].eCType ){\n      case COLTYPE_ANY:      printf(\" ANY\");        break;\n      case COLTYPE_BLOB:     printf(\" BLOB\");       break;\n      case COLTYPE_INT:      printf(\" INT\");        break;\n      case COLTYPE_INTEGER:  printf(\" INTEGER\");    break;\n      case COLTYPE_REAL:     printf(\" REAL\");       break;\n      case COLTYPE_TEXT:     printf(\" TEXT\");       break;\n      case COLTYPE_CUSTOM: {\n        if( flg & COLFLAG_HASTYPE ){\n          const char *z = aCol[i].zCnName;\n          z += strlen(z)+1;\n          printf(\" X-%s\", z);\n          break;\n        }\n      }\n    }\n    if( flg & COLFLAG_PRIMKEY ) printf(\" PRIMARY KEY\");\n    if( flg & COLFLAG_HIDDEN ) printf(\" HIDDEN\");\n#ifdef COLFLAG_NOEXPAND\n    if( flg & COLFLAG_NOEXPAND ) printf(\" NO-EXPAND\");\n#endif\n    if( flg ) printf(\" flags=%04x\", flg);\n    printf(\"\\n\");\n    fflush(stdout);\n    sqlite3TreeViewPop(&pView);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n\n/*\n** Generate a human-readable description of a WITH clause.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){\n  int i;\n  if( pWith==0 ) return;\n  if( pWith->nCte==0 ) return;\n  if( pWith->pOuter ){\n    sqlite3TreeViewLine(pView, \"WITH (0x%p, pOuter=0x%p)\",pWith,pWith->pOuter);\n  }else{\n    sqlite3TreeViewLine(pView, \"WITH (0x%p)\", pWith);\n  }\n  if( pWith->nCte>0 ){\n    sqlite3TreeViewPush(&pView, moreToFollow);\n    for(i=0; i<pWith->nCte; i++){\n      StrAccum x;\n      char zLine[1000];\n      const struct Cte *pCte = &pWith->a[i];\n      sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);\n      sqlite3_str_appendf(&x, \"%s\", pCte->zName);\n      if( pCte->pCols && pCte->pCols->nExpr>0 ){\n        char cSep = '(';\n        int j;\n        for(j=0; j<pCte->pCols->nExpr; j++){\n          sqlite3_str_appendf(&x, \"%c%s\", cSep, pCte->pCols->a[j].zEName);\n          cSep = ',';\n        }\n        sqlite3_str_appendf(&x, \")\");\n      }\n      if( pCte->eM10d!=M10d_Any ){\n        sqlite3_str_appendf(&x, \" %sMATERIALIZED\",\n           pCte->eM10d==M10d_No ? \"NOT \" : \"\");\n      }\n      if( pCte->pUse ){\n        sqlite3_str_appendf(&x, \" (pUse=0x%p, nUse=%d)\", pCte->pUse,\n                 pCte->pUse->nUse);\n      }\n      sqlite3StrAccumFinish(&x);\n      sqlite3TreeViewItem(pView, zLine, i<pWith->nCte-1);\n      sqlite3TreeViewSelect(pView, pCte->pSelect, 0);\n      sqlite3TreeViewPop(&pView);\n    }\n    sqlite3TreeViewPop(&pView);\n  }\n}\n\n/*\n** Generate a human-readable description of a SrcList object.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){\n  int i;\n  if( pSrc==0 ) return;\n  for(i=0; i<pSrc->nSrc; i++){\n    const SrcItem *pItem = &pSrc->a[i];\n    StrAccum x;\n    int n = 0;\n    char zLine[1000];\n    sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);\n    x.printfFlags |= SQLITE_PRINTF_INTERNAL;\n    sqlite3_str_appendf(&x, \"{%d:*} %!S\", pItem->iCursor, pItem);\n    if( pItem->pSTab ){\n      sqlite3_str_appendf(&x, \" tab=%Q nCol=%d ptr=%p used=%llx%s\",\n           pItem->pSTab->zName, pItem->pSTab->nCol, pItem->pSTab,\n           pItem->colUsed,\n           pItem->fg.rowidUsed ? \"+rowid\" : \"\");\n    }\n    if( (pItem->fg.jointype & (JT_LEFT|JT_RIGHT))==(JT_LEFT|JT_RIGHT) ){\n      sqlite3_str_appendf(&x, \" FULL-OUTER-JOIN\");\n    }else if( pItem->fg.jointype & JT_LEFT ){\n      sqlite3_str_appendf(&x, \" LEFT-JOIN\");\n    }else if( pItem->fg.jointype & JT_RIGHT ){\n      sqlite3_str_appendf(&x, \" RIGHT-JOIN\");\n    }else if( pItem->fg.jointype & JT_CROSS ){\n      sqlite3_str_appendf(&x, \" CROSS-JOIN\");\n    }\n    if( pItem->fg.jointype & JT_LTORJ ){\n      sqlite3_str_appendf(&x, \" LTORJ\");\n    }\n    if( pItem->fg.fromDDL ){\n      sqlite3_str_appendf(&x, \" DDL\");\n    }\n    if( pItem->fg.isCte ){\n      static const char *aMat[] = {\",MAT\", \"\", \",NO-MAT\"};\n      sqlite3_str_appendf(&x, \" CteUse=%d%s\",\n                          pItem->u2.pCteUse->nUse,\n                          aMat[pItem->u2.pCteUse->eM10d]);\n    }\n    if( pItem->fg.isOn || (pItem->fg.isUsing==0 && pItem->u3.pOn!=0) ){\n      sqlite3_str_appendf(&x, \" isOn\");\n    }\n    if( pItem->fg.isTabFunc )      sqlite3_str_appendf(&x, \" isTabFunc\");\n    if( pItem->fg.isCorrelated )   sqlite3_str_appendf(&x, \" isCorrelated\");\n    if( pItem->fg.isMaterialized ) sqlite3_str_appendf(&x, \" isMaterialized\");\n    if( pItem->fg.viaCoroutine )   sqlite3_str_appendf(&x, \" viaCoroutine\");\n    if( pItem->fg.notCte )         sqlite3_str_appendf(&x, \" notCte\");\n    if( pItem->fg.isNestedFrom )   sqlite3_str_appendf(&x, \" isNestedFrom\");\n    if( pItem->fg.fixedSchema )    sqlite3_str_appendf(&x, \" fixedSchema\");\n    if( pItem->fg.hadSchema )      sqlite3_str_appendf(&x, \" hadSchema\");\n    if( pItem->fg.isSubquery )     sqlite3_str_appendf(&x, \" isSubquery\");\n\n    sqlite3StrAccumFinish(&x);\n    sqlite3TreeViewItem(pView, zLine, i<pSrc->nSrc-1);\n    n = 0;\n    if( pItem->fg.isSubquery ) n++;\n    if( pItem->fg.isTabFunc ) n++;\n    if( pItem->fg.isUsing || pItem->u3.pOn!=0 ) n++;\n    if( pItem->fg.isUsing ){\n      sqlite3TreeViewIdList(pView, pItem->u3.pUsing, (--n)>0, \"USING\");\n    }else if( pItem->u3.pOn!=0 ){\n      sqlite3TreeViewItem(pView, \"ON\", (--n)>0);\n      sqlite3TreeViewExpr(pView, pItem->u3.pOn, 0);\n      sqlite3TreeViewPop(&pView);\n    }\n    if( pItem->fg.isSubquery ){\n      assert( n==1 );\n      if( pItem->pSTab ){\n        Table *pTab = pItem->pSTab;\n        sqlite3TreeViewColumnList(pView, pTab->aCol, pTab->nCol, 1);\n      }\n      assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem) );\n      sqlite3TreeViewSelect(pView, pItem->u4.pSubq->pSelect, 0);\n    }\n    if( pItem->fg.isTabFunc ){\n      sqlite3TreeViewExprList(pView, pItem->u1.pFuncArg, 0, \"func-args:\");\n    }\n    sqlite3TreeViewPop(&pView);\n  }\n}\n\n/*\n** Generate a human-readable description of a Select object.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 moreToFollow){\n  int n = 0;\n  int cnt = 0;\n  if( p==0 ){\n    sqlite3TreeViewLine(pView, \"nil-SELECT\");\n    return;\n  }\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  if( p->pWith ){\n    sqlite3TreeViewWith(pView, p->pWith, 1);\n    cnt = 1;\n    sqlite3TreeViewPush(&pView, 1);\n  }\n  do{\n    if( p->selFlags & SF_WhereBegin ){\n      sqlite3TreeViewLine(pView, \"sqlite3WhereBegin()\");\n    }else{\n      sqlite3TreeViewLine(pView,\n        \"SELECT%s%s (%u/%p) selFlags=0x%x nSelectRow=%d\",\n        ((p->selFlags & SF_Distinct) ? \" DISTINCT\" : \"\"),\n        ((p->selFlags & SF_Aggregate) ? \" agg_flag\" : \"\"),\n        p->selId, p, p->selFlags,\n        (int)p->nSelectRow\n      );\n    }\n    if( cnt++ ) sqlite3TreeViewPop(&pView);\n    if( p->pPrior ){\n      n = 1000;\n    }else{\n      n = 0;\n      if( p->pSrc && p->pSrc->nSrc && p->pSrc->nAlloc ) n++;\n      if( p->pWhere ) n++;\n      if( p->pGroupBy ) n++;\n      if( p->pHaving ) n++;\n      if( p->pOrderBy ) n++;\n      if( p->pLimit ) n++;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( p->pWin ) n++;\n      if( p->pWinDefn ) n++;\n#endif\n    }\n    if( p->pEList ){\n      sqlite3TreeViewExprList(pView, p->pEList, n>0, \"result-set\");\n    }\n    n--;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( p->pWin ){\n      Window *pX;\n      sqlite3TreeViewPush(&pView, (n--)>0);\n      sqlite3TreeViewLine(pView, \"window-functions\");\n      for(pX=p->pWin; pX; pX=pX->pNextWin){\n        sqlite3TreeViewWinFunc(pView, pX, pX->pNextWin!=0);\n      }\n      sqlite3TreeViewPop(&pView);\n    }\n#endif\n    if( p->pSrc && p->pSrc->nSrc && p->pSrc->nAlloc ){\n      sqlite3TreeViewPush(&pView, (n--)>0);\n      sqlite3TreeViewLine(pView, \"FROM\");\n      sqlite3TreeViewSrcList(pView, p->pSrc);\n      sqlite3TreeViewPop(&pView);\n    }\n    if( p->pWhere ){\n      sqlite3TreeViewItem(pView, \"WHERE\", (n--)>0);\n      sqlite3TreeViewExpr(pView, p->pWhere, 0);\n      sqlite3TreeViewPop(&pView);\n    }\n    if( p->pGroupBy ){\n      sqlite3TreeViewExprList(pView, p->pGroupBy, (n--)>0, \"GROUPBY\");\n    }\n    if( p->pHaving ){\n      sqlite3TreeViewItem(pView, \"HAVING\", (n--)>0);\n      sqlite3TreeViewExpr(pView, p->pHaving, 0);\n      sqlite3TreeViewPop(&pView);\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( p->pWinDefn ){\n      Window *pX;\n      sqlite3TreeViewItem(pView, \"WINDOW\", (n--)>0);\n      for(pX=p->pWinDefn; pX; pX=pX->pNextWin){\n        sqlite3TreeViewWindow(pView, pX, pX->pNextWin!=0);\n      }\n      sqlite3TreeViewPop(&pView);\n    }\n#endif\n    if( p->pOrderBy ){\n      sqlite3TreeViewExprList(pView, p->pOrderBy, (n--)>0, \"ORDERBY\");\n    }\n    if( p->pLimit ){\n      sqlite3TreeViewItem(pView, \"LIMIT\", (n--)>0);\n      sqlite3TreeViewExpr(pView, p->pLimit->pLeft, p->pLimit->pRight!=0);\n      if( p->pLimit->pRight ){\n        sqlite3TreeViewItem(pView, \"OFFSET\", 0);\n        sqlite3TreeViewExpr(pView, p->pLimit->pRight, 0);\n        sqlite3TreeViewPop(&pView);\n      }\n      sqlite3TreeViewPop(&pView);\n    }\n    if( p->pPrior ){\n      const char *zOp = \"UNION\";\n      switch( p->op ){\n        case TK_ALL:         zOp = \"UNION ALL\";  break;\n        case TK_INTERSECT:   zOp = \"INTERSECT\";  break;\n        case TK_EXCEPT:      zOp = \"EXCEPT\";     break;\n      }\n      sqlite3TreeViewItem(pView, zOp, 1);\n    }\n    p = p->pPrior;\n  }while( p!=0 );\n  sqlite3TreeViewPop(&pView);\n}\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** Generate a description of starting or stopping bounds\n*/\nSQLITE_PRIVATE void sqlite3TreeViewBound(\n  TreeView *pView,        /* View context */\n  u8 eBound,              /* UNBOUNDED, CURRENT, PRECEDING, FOLLOWING */\n  Expr *pExpr,            /* Value for PRECEDING or FOLLOWING */\n  u8 moreToFollow         /* True if more to follow */\n){\n  switch( eBound ){\n    case TK_UNBOUNDED: {\n      sqlite3TreeViewItem(pView, \"UNBOUNDED\", moreToFollow);\n      sqlite3TreeViewPop(&pView);\n      break;\n    }\n    case TK_CURRENT: {\n      sqlite3TreeViewItem(pView, \"CURRENT\", moreToFollow);\n      sqlite3TreeViewPop(&pView);\n      break;\n    }\n    case TK_PRECEDING: {\n      sqlite3TreeViewItem(pView, \"PRECEDING\", moreToFollow);\n      sqlite3TreeViewExpr(pView, pExpr, 0);\n      sqlite3TreeViewPop(&pView);\n      break;\n    }\n    case TK_FOLLOWING: {\n      sqlite3TreeViewItem(pView, \"FOLLOWING\", moreToFollow);\n      sqlite3TreeViewExpr(pView, pExpr, 0);\n      sqlite3TreeViewPop(&pView);\n      break;\n    }\n  }\n}\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** Generate a human-readable explanation for a Window object\n*/\nSQLITE_PRIVATE void sqlite3TreeViewWindow(TreeView *pView, const Window *pWin, u8 more){\n  int nElement = 0;\n  if( pWin==0 ) return;\n  if( pWin->pFilter ){\n    sqlite3TreeViewItem(pView, \"FILTER\", 1);\n    sqlite3TreeViewExpr(pView, pWin->pFilter, 0);\n    sqlite3TreeViewPop(&pView);\n    if( pWin->eFrmType==TK_FILTER ) return;\n  }\n  sqlite3TreeViewPush(&pView, more);\n  if( pWin->zName ){\n    sqlite3TreeViewLine(pView, \"OVER %s (%p)\", pWin->zName, pWin);\n  }else{\n    sqlite3TreeViewLine(pView, \"OVER (%p)\", pWin);\n  }\n  if( pWin->zBase )    nElement++;\n  if( pWin->pOrderBy ) nElement++;\n  if( pWin->eFrmType!=0 && pWin->eFrmType!=TK_FILTER ) nElement++;\n  if( pWin->eExclude ) nElement++;\n  if( pWin->zBase ){\n    sqlite3TreeViewPush(&pView, (--nElement)>0);\n    sqlite3TreeViewLine(pView, \"window: %s\", pWin->zBase);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pWin->pPartition ){\n    sqlite3TreeViewExprList(pView, pWin->pPartition, nElement>0,\"PARTITION-BY\");\n  }\n  if( pWin->pOrderBy ){\n    sqlite3TreeViewExprList(pView, pWin->pOrderBy, (--nElement)>0, \"ORDER-BY\");\n  }\n  if( pWin->eFrmType!=0 && pWin->eFrmType!=TK_FILTER ){\n    char zBuf[30];\n    const char *zFrmType = \"ROWS\";\n    if( pWin->eFrmType==TK_RANGE ) zFrmType = \"RANGE\";\n    if( pWin->eFrmType==TK_GROUPS ) zFrmType = \"GROUPS\";\n    sqlite3_snprintf(sizeof(zBuf),zBuf,\"%s%s\",zFrmType,\n        pWin->bImplicitFrame ? \" (implied)\" : \"\");\n    sqlite3TreeViewItem(pView, zBuf, (--nElement)>0);\n    sqlite3TreeViewBound(pView, pWin->eStart, pWin->pStart, 1);\n    sqlite3TreeViewBound(pView, pWin->eEnd, pWin->pEnd, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pWin->eExclude ){\n    char zBuf[30];\n    const char *zExclude;\n    switch( pWin->eExclude ){\n      case TK_NO:      zExclude = \"NO OTHERS\";   break;\n      case TK_CURRENT: zExclude = \"CURRENT ROW\"; break;\n      case TK_GROUP:   zExclude = \"GROUP\";       break;\n      case TK_TIES:    zExclude = \"TIES\";        break;\n      default:\n        sqlite3_snprintf(sizeof(zBuf),zBuf,\"invalid(%d)\", pWin->eExclude);\n        zExclude = zBuf;\n        break;\n    }\n    sqlite3TreeViewPush(&pView, 0);\n    sqlite3TreeViewLine(pView, \"EXCLUDE %s\", zExclude);\n    sqlite3TreeViewPop(&pView);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** Generate a human-readable explanation for a Window Function object\n*/\nSQLITE_PRIVATE void sqlite3TreeViewWinFunc(TreeView *pView, const Window *pWin, u8 more){\n  if( pWin==0 ) return;\n  sqlite3TreeViewPush(&pView, more);\n  sqlite3TreeViewLine(pView, \"WINFUNC %s(%d)\",\n                       pWin->pWFunc->zName, pWin->pWFunc->nArg);\n  sqlite3TreeViewWindow(pView, pWin, 0);\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** Generate a human-readable explanation of an expression tree.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){\n  const char *zBinOp = 0;   /* Binary operator */\n  const char *zUniOp = 0;   /* Unary operator */\n  char zFlgs[200];\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  if( pExpr==0 ){\n    sqlite3TreeViewLine(pView, \"nil\");\n    sqlite3TreeViewPop(&pView);\n    return;\n  }\n  if( pExpr->flags || pExpr->affExpr || pExpr->vvaFlags || pExpr->pAggInfo ){\n    StrAccum x;\n    sqlite3StrAccumInit(&x, 0, zFlgs, sizeof(zFlgs), 0);\n    sqlite3_str_appendf(&x, \" fg.af=%x.%c\",\n      pExpr->flags, pExpr->affExpr ? pExpr->affExpr : 'n');\n    if( ExprHasProperty(pExpr, EP_OuterON) ){\n      sqlite3_str_appendf(&x, \" outer.iJoin=%d\", pExpr->w.iJoin);\n    }\n    if( ExprHasProperty(pExpr, EP_InnerON) ){\n      sqlite3_str_appendf(&x, \" inner.iJoin=%d\", pExpr->w.iJoin);\n    }\n    if( ExprHasProperty(pExpr, EP_FromDDL) ){\n      sqlite3_str_appendf(&x, \" DDL\");\n    }\n    if( ExprHasVVAProperty(pExpr, EP_Immutable) ){\n      sqlite3_str_appendf(&x, \" IMMUTABLE\");\n    }\n    if( pExpr->pAggInfo!=0 ){\n      sqlite3_str_appendf(&x, \" agg-column[%d]\", pExpr->iAgg);\n    }\n    sqlite3StrAccumFinish(&x);\n  }else{\n    zFlgs[0] = 0;\n  }\n  switch( pExpr->op ){\n    case TK_AGG_COLUMN: {\n      sqlite3TreeViewLine(pView, \"AGG{%d:%d}%s\",\n            pExpr->iTable, pExpr->iColumn, zFlgs);\n      break;\n    }\n    case TK_COLUMN: {\n      if( pExpr->iTable<0 ){\n        /* This only happens when coding check constraints */\n        char zOp2[16];\n        if( pExpr->op2 ){\n          sqlite3_snprintf(sizeof(zOp2),zOp2,\" op2=0x%02x\",pExpr->op2);\n        }else{\n          zOp2[0] = 0;\n        }\n        sqlite3TreeViewLine(pView, \"COLUMN(%d)%s%s\",\n                                    pExpr->iColumn, zFlgs, zOp2);\n      }else{\n        assert( ExprUseYTab(pExpr) );\n        sqlite3TreeViewLine(pView, \"{%d:%d} pTab=%p%s\",\n                        pExpr->iTable, pExpr->iColumn,\n                        pExpr->y.pTab, zFlgs);\n      }\n      if( ExprHasProperty(pExpr, EP_FixedCol) ){\n        sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      }\n      break;\n    }\n    case TK_INTEGER: {\n      if( pExpr->flags & EP_IntValue ){\n        sqlite3TreeViewLine(pView, \"%d\", pExpr->u.iValue);\n      }else{\n        sqlite3TreeViewLine(pView, \"%s\", pExpr->u.zToken);\n      }\n      break;\n    }\n#ifndef SQLITE_OMIT_FLOATING_POINT\n    case TK_FLOAT: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"%s\", pExpr->u.zToken);\n      break;\n    }\n#endif\n    case TK_STRING: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"%Q\", pExpr->u.zToken);\n      break;\n    }\n    case TK_NULL: {\n      sqlite3TreeViewLine(pView,\"NULL\");\n      break;\n    }\n    case TK_TRUEFALSE: {\n      sqlite3TreeViewLine(pView,\"%s%s\",\n         sqlite3ExprTruthValue(pExpr) ? \"TRUE\" : \"FALSE\", zFlgs);\n      break;\n    }\n#ifndef SQLITE_OMIT_BLOB_LITERAL\n    case TK_BLOB: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"%s\", pExpr->u.zToken);\n      break;\n    }\n#endif\n    case TK_VARIABLE: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"VARIABLE(%s,%d)\",\n                          pExpr->u.zToken, pExpr->iColumn);\n      break;\n    }\n    case TK_REGISTER: {\n      sqlite3TreeViewLine(pView,\"REGISTER(%d)\", pExpr->iTable);\n      break;\n    }\n    case TK_ID: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"ID \\\"%w\\\"\", pExpr->u.zToken);\n      break;\n    }\n#ifndef SQLITE_OMIT_CAST\n    case TK_CAST: {\n      /* Expressions of the form:   CAST(pLeft AS token) */\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView,\"CAST %Q\", pExpr->u.zToken);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      break;\n    }\n#endif /* SQLITE_OMIT_CAST */\n    case TK_LT:      zBinOp = \"LT\";     break;\n    case TK_LE:      zBinOp = \"LE\";     break;\n    case TK_GT:      zBinOp = \"GT\";     break;\n    case TK_GE:      zBinOp = \"GE\";     break;\n    case TK_NE:      zBinOp = \"NE\";     break;\n    case TK_EQ:      zBinOp = \"EQ\";     break;\n    case TK_IS:      zBinOp = \"IS\";     break;\n    case TK_ISNOT:   zBinOp = \"ISNOT\";  break;\n    case TK_AND:     zBinOp = \"AND\";    break;\n    case TK_OR:      zBinOp = \"OR\";     break;\n    case TK_PLUS:    zBinOp = \"ADD\";    break;\n    case TK_STAR:    zBinOp = \"MUL\";    break;\n    case TK_MINUS:   zBinOp = \"SUB\";    break;\n    case TK_REM:     zBinOp = \"REM\";    break;\n    case TK_BITAND:  zBinOp = \"BITAND\"; break;\n    case TK_BITOR:   zBinOp = \"BITOR\";  break;\n    case TK_SLASH:   zBinOp = \"DIV\";    break;\n    case TK_LSHIFT:  zBinOp = \"LSHIFT\"; break;\n    case TK_RSHIFT:  zBinOp = \"RSHIFT\"; break;\n    case TK_CONCAT:  zBinOp = \"CONCAT\"; break;\n    case TK_DOT:     zBinOp = \"DOT\";    break;\n    case TK_LIMIT:   zBinOp = \"LIMIT\";  break;\n\n    case TK_UMINUS:  zUniOp = \"UMINUS\"; break;\n    case TK_UPLUS:   zUniOp = \"UPLUS\";  break;\n    case TK_BITNOT:  zUniOp = \"BITNOT\"; break;\n    case TK_NOT:     zUniOp = \"NOT\";    break;\n    case TK_ISNULL:  zUniOp = \"ISNULL\"; break;\n    case TK_NOTNULL: zUniOp = \"NOTNULL\"; break;\n\n    case TK_TRUTH: {\n      int x;\n      const char *azOp[] = {\n         \"IS-FALSE\", \"IS-TRUE\", \"IS-NOT-FALSE\", \"IS-NOT-TRUE\"\n      };\n      assert( pExpr->op2==TK_IS || pExpr->op2==TK_ISNOT );\n      assert( pExpr->pRight );\n      assert( sqlite3ExprSkipCollateAndLikely(pExpr->pRight)->op\n                  == TK_TRUEFALSE );\n      x = (pExpr->op2==TK_ISNOT)*2 + sqlite3ExprTruthValue(pExpr->pRight);\n      zUniOp = azOp[x];\n      break;\n    }\n\n    case TK_SPAN: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView, \"SPAN %Q\", pExpr->u.zToken);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      break;\n    }\n\n    case TK_COLLATE: {\n      /* COLLATE operators without the EP_Collate flag are intended to\n      ** emulate collation associated with a table column.  These show\n      ** up in the treeview output as \"SOFT-COLLATE\".  Explicit COLLATE\n      ** operators that appear in the original SQL always have the\n      ** EP_Collate bit set and appear in treeview output as just \"COLLATE\" */\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView, \"%sCOLLATE %Q%s\",\n        !ExprHasProperty(pExpr, EP_Collate) ? \"SOFT-\" : \"\",\n        pExpr->u.zToken, zFlgs);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      break;\n    }\n\n    case TK_AGG_FUNCTION:\n    case TK_FUNCTION: {\n      ExprList *pFarg;       /* List of function arguments */\n      Window *pWin;\n      if( ExprHasProperty(pExpr, EP_TokenOnly) ){\n        pFarg = 0;\n        pWin = 0;\n      }else{\n        assert( ExprUseXList(pExpr) );\n        pFarg = pExpr->x.pList;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        pWin = IsWindowFunc(pExpr) ? pExpr->y.pWin : 0;\n#else\n        pWin = 0;\n#endif\n      }\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      if( pExpr->op==TK_AGG_FUNCTION ){\n        sqlite3TreeViewLine(pView, \"AGG_FUNCTION%d %Q%s agg=%d[%d]/%p\",\n                             pExpr->op2, pExpr->u.zToken, zFlgs,\n                             pExpr->pAggInfo ? pExpr->pAggInfo->selId : 0,\n                             pExpr->iAgg, pExpr->pAggInfo);\n      }else if( pExpr->op2!=0 ){\n        const char *zOp2;\n        char zBuf[8];\n        sqlite3_snprintf(sizeof(zBuf),zBuf,\"0x%02x\",pExpr->op2);\n        zOp2 = zBuf;\n        if( pExpr->op2==NC_IsCheck ) zOp2 = \"NC_IsCheck\";\n        if( pExpr->op2==NC_IdxExpr ) zOp2 = \"NC_IdxExpr\";\n        if( pExpr->op2==NC_PartIdx ) zOp2 = \"NC_PartIdx\";\n        if( pExpr->op2==NC_GenCol ) zOp2 = \"NC_GenCol\";\n        sqlite3TreeViewLine(pView, \"FUNCTION %Q%s op2=%s\",\n                            pExpr->u.zToken, zFlgs, zOp2);\n      }else{\n        sqlite3TreeViewLine(pView, \"FUNCTION %Q%s\", pExpr->u.zToken, zFlgs);\n      }\n      if( pFarg ){\n        sqlite3TreeViewExprList(pView, pFarg, pWin!=0 || pExpr->pLeft, 0);\n        if( pExpr->pLeft ){\n          Expr *pOB = pExpr->pLeft;\n          assert( pOB->op==TK_ORDER );\n          assert( ExprUseXList(pOB) );\n          sqlite3TreeViewExprList(pView, pOB->x.pList, pWin!=0, \"ORDERBY\");\n        }\n      }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( pWin ){\n        sqlite3TreeViewWindow(pView, pWin, 0);\n      }\n#endif\n      break;\n    }\n    case TK_ORDER: {\n      sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, \"ORDERBY\");\n      break;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_EXISTS: {\n      assert( ExprUseXSelect(pExpr) );\n      sqlite3TreeViewLine(pView, \"EXISTS-expr flags=0x%x\", pExpr->flags);\n      sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);\n      break;\n    }\n    case TK_SELECT: {\n      assert( ExprUseXSelect(pExpr) );\n      sqlite3TreeViewLine(pView, \"subquery-expr flags=0x%x\", pExpr->flags);\n      sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);\n      break;\n    }\n    case TK_IN: {\n      sqlite3_str *pStr = sqlite3_str_new(0);\n      char *z;\n      sqlite3_str_appendf(pStr, \"IN flags=0x%x\", pExpr->flags);\n      if( pExpr->iTable ) sqlite3_str_appendf(pStr, \" iTable=%d\",pExpr->iTable);\n      if( ExprHasProperty(pExpr, EP_Subrtn) ){\n        sqlite3_str_appendf(pStr, \" subrtn(%d,%d)\",\n            pExpr->y.sub.regReturn, pExpr->y.sub.iAddr);\n      }\n      z = sqlite3_str_finish(pStr);\n      sqlite3TreeViewLine(pView, z);\n      sqlite3_free(z);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);\n      if( ExprUseXSelect(pExpr) ){\n        sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);\n      }else{\n        sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);\n      }\n      break;\n    }\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n    /*\n    **    x BETWEEN y AND z\n    **\n    ** This is equivalent to\n    **\n    **    x>=y AND x<=z\n    **\n    ** X is stored in pExpr->pLeft.\n    ** Y is stored in pExpr->pList->a[0].pExpr.\n    ** Z is stored in pExpr->pList->a[1].pExpr.\n    */\n    case TK_BETWEEN: {\n      const Expr *pX, *pY, *pZ;\n      pX = pExpr->pLeft;\n      assert( ExprUseXList(pExpr) );\n      assert( pExpr->x.pList->nExpr==2 );\n      pY = pExpr->x.pList->a[0].pExpr;\n      pZ = pExpr->x.pList->a[1].pExpr;\n      sqlite3TreeViewLine(pView, \"BETWEEN%s\", zFlgs);\n      sqlite3TreeViewExpr(pView, pX, 1);\n      sqlite3TreeViewExpr(pView, pY, 1);\n      sqlite3TreeViewExpr(pView, pZ, 0);\n      break;\n    }\n    case TK_TRIGGER: {\n      /* If the opcode is TK_TRIGGER, then the expression is a reference\n      ** to a column in the new.* or old.* pseudo-tables available to\n      ** trigger programs. In this case Expr.iTable is set to 1 for the\n      ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn\n      ** is set to the column of the pseudo-table to read, or to -1 to\n      ** read the rowid field.\n      */\n      sqlite3TreeViewLine(pView, \"%s(%d)\",\n          pExpr->iTable ? \"NEW\" : \"OLD\", pExpr->iColumn);\n      break;\n    }\n    case TK_CASE: {\n      sqlite3TreeViewLine(pView, \"CASE\");\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);\n      assert( ExprUseXList(pExpr) );\n      sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);\n      break;\n    }\n#ifndef SQLITE_OMIT_TRIGGER\n    case TK_RAISE: {\n      const char *zType = \"unk\";\n      switch( pExpr->affExpr ){\n        case OE_Rollback:   zType = \"rollback\";  break;\n        case OE_Abort:      zType = \"abort\";     break;\n        case OE_Fail:       zType = \"fail\";      break;\n        case OE_Ignore:     zType = \"ignore\";    break;\n      }\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3TreeViewLine(pView, \"RAISE %s\", zType);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      break;\n    }\n#endif\n    case TK_MATCH: {\n      sqlite3TreeViewLine(pView, \"MATCH {%d:%d}%s\",\n                          pExpr->iTable, pExpr->iColumn, zFlgs);\n      sqlite3TreeViewExpr(pView, pExpr->pRight, 0);\n      break;\n    }\n    case TK_VECTOR: {\n      char *z = sqlite3_mprintf(\"VECTOR%s\",zFlgs);\n      assert( ExprUseXList(pExpr) );\n      sqlite3TreeViewBareExprList(pView, pExpr->x.pList, z);\n      sqlite3_free(z);\n      break;\n    }\n    case TK_SELECT_COLUMN: {\n      sqlite3TreeViewLine(pView, \"SELECT-COLUMN %d of [0..%d]%s\",\n              pExpr->iColumn, pExpr->iTable-1,\n              pExpr->pRight==pExpr->pLeft ? \" (SELECT-owner)\" : \"\");\n      assert( ExprUseXSelect(pExpr->pLeft) );\n      sqlite3TreeViewSelect(pView, pExpr->pLeft->x.pSelect, 0);\n      break;\n    }\n    case TK_IF_NULL_ROW: {\n      sqlite3TreeViewLine(pView, \"IF-NULL-ROW %d\", pExpr->iTable);\n      sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n      break;\n    }\n    case TK_ERROR: {\n      Expr tmp;\n      sqlite3TreeViewLine(pView, \"ERROR\");\n      tmp = *pExpr;\n      tmp.op = pExpr->op2;\n      sqlite3TreeViewExpr(pView, &tmp, 0);\n      break;\n    }\n    case TK_ROW: {\n      if( pExpr->iColumn<=0 ){\n        sqlite3TreeViewLine(pView, \"First FROM table rowid\");\n      }else{\n        sqlite3TreeViewLine(pView, \"First FROM table column %d\",\n            pExpr->iColumn-1);\n      }\n      break;\n    }\n    default: {\n      sqlite3TreeViewLine(pView, \"op=%d\", pExpr->op);\n      break;\n    }\n  }\n  if( zBinOp ){\n    sqlite3TreeViewLine(pView, \"%s%s\", zBinOp, zFlgs);\n    sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);\n    sqlite3TreeViewExpr(pView, pExpr->pRight, 0);\n  }else if( zUniOp ){\n    sqlite3TreeViewLine(pView, \"%s%s\", zUniOp, zFlgs);\n   sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n\n\n/*\n** Generate a human-readable explanation of an expression list.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewBareExprList(\n  TreeView *pView,\n  const ExprList *pList,\n  const char *zLabel\n){\n  if( zLabel==0 || zLabel[0]==0 ) zLabel = \"LIST\";\n  if( pList==0 ){\n    sqlite3TreeViewLine(pView, \"%s (empty)\", zLabel);\n  }else{\n    int i;\n    sqlite3TreeViewLine(pView, \"%s\", zLabel);\n    for(i=0; i<pList->nExpr; i++){\n      int j = pList->a[i].u.x.iOrderByCol;\n      u8 sortFlags = pList->a[i].fg.sortFlags;\n      char *zName = pList->a[i].zEName;\n      int moreToFollow = i<pList->nExpr - 1;\n      if( j || zName || sortFlags ){\n        sqlite3TreeViewPush(&pView, moreToFollow);\n        moreToFollow = 0;\n        sqlite3TreeViewLine(pView, 0);\n        if( zName ){\n          switch( pList->a[i].fg.eEName ){\n            default:\n              fprintf(stdout, \"AS %s \", zName);\n              break;\n            case ENAME_TAB:\n              fprintf(stdout, \"TABLE-ALIAS-NAME(\\\"%s\\\") \", zName);\n              if( pList->a[i].fg.bUsed ) fprintf(stdout, \"(used) \");\n              if( pList->a[i].fg.bUsingTerm ) fprintf(stdout, \"(USING-term) \");\n              if( pList->a[i].fg.bNoExpand ) fprintf(stdout, \"(NoExpand) \");\n              break;\n            case ENAME_SPAN:\n              fprintf(stdout, \"SPAN(\\\"%s\\\") \", zName);\n              break;\n          }\n        }\n        if( j ){\n          fprintf(stdout, \"iOrderByCol=%d \", j);\n        }\n        if( sortFlags & KEYINFO_ORDER_DESC ){\n          fprintf(stdout, \"DESC \");\n        }else if( sortFlags & KEYINFO_ORDER_BIGNULL ){\n          fprintf(stdout, \"NULLS-LAST\");\n        }\n        fprintf(stdout, \"\\n\");\n        fflush(stdout);\n      }\n      sqlite3TreeViewExpr(pView, pList->a[i].pExpr, moreToFollow);\n      if( j || zName || sortFlags ){\n        sqlite3TreeViewPop(&pView);\n      }\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3TreeViewExprList(\n  TreeView *pView,\n  const ExprList *pList,\n  u8 moreToFollow,\n  const char *zLabel\n){\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  sqlite3TreeViewBareExprList(pView, pList, zLabel);\n  sqlite3TreeViewPop(&pView);\n}\n\n/*\n** Generate a human-readable explanation of an id-list.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewBareIdList(\n  TreeView *pView,\n  const IdList *pList,\n  const char *zLabel\n){\n  if( zLabel==0 || zLabel[0]==0 ) zLabel = \"LIST\";\n  if( pList==0 ){\n    sqlite3TreeViewLine(pView, \"%s (empty)\", zLabel);\n  }else{\n    int i;\n    sqlite3TreeViewLine(pView, \"%s\", zLabel);\n    for(i=0; i<pList->nId; i++){\n      char *zName = pList->a[i].zName;\n      int moreToFollow = i<pList->nId - 1;\n      if( zName==0 ) zName = \"(null)\";\n      sqlite3TreeViewPush(&pView, moreToFollow);\n      sqlite3TreeViewLine(pView, 0);\n      fprintf(stdout, \"%s\\n\", zName);\n      sqlite3TreeViewPop(&pView);\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3TreeViewIdList(\n  TreeView *pView,\n  const IdList *pList,\n  u8 moreToFollow,\n  const char *zLabel\n){\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  sqlite3TreeViewBareIdList(pView, pList, zLabel);\n  sqlite3TreeViewPop(&pView);\n}\n\n/*\n** Generate a human-readable explanation of a list of Upsert objects\n*/\nSQLITE_PRIVATE void sqlite3TreeViewUpsert(\n  TreeView *pView,\n  const Upsert *pUpsert,\n  u8 moreToFollow\n){\n  if( pUpsert==0 ) return;\n  sqlite3TreeViewPush(&pView, moreToFollow);\n  while( pUpsert ){\n    int n;\n    sqlite3TreeViewPush(&pView, pUpsert->pNextUpsert!=0 || moreToFollow);\n    sqlite3TreeViewLine(pView, \"ON CONFLICT DO %s\",\n         pUpsert->isDoUpdate ? \"UPDATE\" : \"NOTHING\");\n    n = (pUpsert->pUpsertSet!=0) + (pUpsert->pUpsertWhere!=0);\n    sqlite3TreeViewExprList(pView, pUpsert->pUpsertTarget, (n--)>0, \"TARGET\");\n    sqlite3TreeViewExprList(pView, pUpsert->pUpsertSet, (n--)>0, \"SET\");\n    if( pUpsert->pUpsertWhere ){\n      sqlite3TreeViewItem(pView, \"WHERE\", (n--)>0);\n      sqlite3TreeViewExpr(pView, pUpsert->pUpsertWhere, 0);\n      sqlite3TreeViewPop(&pView);\n    }\n    sqlite3TreeViewPop(&pView);\n    pUpsert = pUpsert->pNextUpsert;\n  }\n  sqlite3TreeViewPop(&pView);\n}\n\n#if TREETRACE_ENABLED\n/*\n** Generate a human-readable diagram of the data structure that go\n** into generating an DELETE statement.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewDelete(\n  const With *pWith,\n  const SrcList *pTabList,\n  const Expr *pWhere,\n  const ExprList *pOrderBy,\n  const Expr *pLimit,\n  const Trigger *pTrigger\n){\n  int n = 0;\n  TreeView *pView = 0;\n  sqlite3TreeViewPush(&pView, 0);\n  sqlite3TreeViewLine(pView, \"DELETE\");\n  if( pWith ) n++;\n  if( pTabList ) n++;\n  if( pWhere ) n++;\n  if( pOrderBy ) n++;\n  if( pLimit ) n++;\n  if( pTrigger ) n++;\n  if( pWith ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewWith(pView, pWith, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTabList ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"FROM\");\n    sqlite3TreeViewSrcList(pView, pTabList);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pWhere ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"WHERE\");\n    sqlite3TreeViewExpr(pView, pWhere, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pOrderBy ){\n    sqlite3TreeViewExprList(pView, pOrderBy, (--n)>0, \"ORDER-BY\");\n  }\n  if( pLimit ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"LIMIT\");\n    sqlite3TreeViewExpr(pView, pLimit, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTrigger ){\n    sqlite3TreeViewTrigger(pView, pTrigger, (--n)>0, 1);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* TREETRACE_ENABLED */\n\n#if TREETRACE_ENABLED\n/*\n** Generate a human-readable diagram of the data structure that go\n** into generating an INSERT statement.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewInsert(\n  const With *pWith,\n  const SrcList *pTabList,\n  const IdList *pColumnList,\n  const Select *pSelect,\n  const ExprList *pExprList,\n  int onError,\n  const Upsert *pUpsert,\n  const Trigger *pTrigger\n){\n  TreeView *pView = 0;\n  int n = 0;\n  const char *zLabel = \"INSERT\";\n  switch( onError ){\n    case OE_Replace:  zLabel = \"REPLACE\";             break;\n    case OE_Ignore:   zLabel = \"INSERT OR IGNORE\";    break;\n    case OE_Rollback: zLabel = \"INSERT OR ROLLBACK\";  break;\n    case OE_Abort:    zLabel = \"INSERT OR ABORT\";     break;\n    case OE_Fail:     zLabel = \"INSERT OR FAIL\";      break;\n  }\n  sqlite3TreeViewPush(&pView, 0);\n  sqlite3TreeViewLine(pView, zLabel);\n  if( pWith ) n++;\n  if( pTabList ) n++;\n  if( pColumnList ) n++;\n  if( pSelect ) n++;\n  if( pExprList ) n++;\n  if( pUpsert ) n++;\n  if( pTrigger ) n++;\n  if( pWith ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewWith(pView, pWith, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTabList ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"INTO\");\n    sqlite3TreeViewSrcList(pView, pTabList);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pColumnList ){\n    sqlite3TreeViewIdList(pView, pColumnList, (--n)>0, \"COLUMNS\");\n  }\n  if( pSelect ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"DATA-SOURCE\");\n    sqlite3TreeViewSelect(pView, pSelect, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pExprList ){\n    sqlite3TreeViewExprList(pView, pExprList, (--n)>0, \"VALUES\");\n  }\n  if( pUpsert ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"UPSERT\");\n    sqlite3TreeViewUpsert(pView, pUpsert, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTrigger ){\n    sqlite3TreeViewTrigger(pView, pTrigger, (--n)>0, 1);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* TREETRACE_ENABLED */\n\n#if TREETRACE_ENABLED\n/*\n** Generate a human-readable diagram of the data structure that go\n** into generating an UPDATE statement.\n*/\nSQLITE_PRIVATE void sqlite3TreeViewUpdate(\n  const With *pWith,\n  const SrcList *pTabList,\n  const ExprList *pChanges,\n  const Expr *pWhere,\n  int onError,\n  const ExprList *pOrderBy,\n  const Expr *pLimit,\n  const Upsert *pUpsert,\n  const Trigger *pTrigger\n){\n  int n = 0;\n  TreeView *pView = 0;\n  const char *zLabel = \"UPDATE\";\n  switch( onError ){\n    case OE_Replace:  zLabel = \"UPDATE OR REPLACE\";   break;\n    case OE_Ignore:   zLabel = \"UPDATE OR IGNORE\";    break;\n    case OE_Rollback: zLabel = \"UPDATE OR ROLLBACK\";  break;\n    case OE_Abort:    zLabel = \"UPDATE OR ABORT\";     break;\n    case OE_Fail:     zLabel = \"UPDATE OR FAIL\";      break;\n  }\n  sqlite3TreeViewPush(&pView, 0);\n  sqlite3TreeViewLine(pView, zLabel);\n  if( pWith ) n++;\n  if( pTabList ) n++;\n  if( pChanges ) n++;\n  if( pWhere ) n++;\n  if( pOrderBy ) n++;\n  if( pLimit ) n++;\n  if( pUpsert ) n++;\n  if( pTrigger ) n++;\n  if( pWith ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewWith(pView, pWith, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTabList ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"FROM\");\n    sqlite3TreeViewSrcList(pView, pTabList);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pChanges ){\n    sqlite3TreeViewExprList(pView, pChanges, (--n)>0, \"SET\");\n  }\n  if( pWhere ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"WHERE\");\n    sqlite3TreeViewExpr(pView, pWhere, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pOrderBy ){\n    sqlite3TreeViewExprList(pView, pOrderBy, (--n)>0, \"ORDER-BY\");\n  }\n  if( pLimit ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"LIMIT\");\n    sqlite3TreeViewExpr(pView, pLimit, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pUpsert ){\n    sqlite3TreeViewPush(&pView, (--n)>0);\n    sqlite3TreeViewLine(pView, \"UPSERT\");\n    sqlite3TreeViewUpsert(pView, pUpsert, 0);\n    sqlite3TreeViewPop(&pView);\n  }\n  if( pTrigger ){\n    sqlite3TreeViewTrigger(pView, pTrigger, (--n)>0, 1);\n  }\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* TREETRACE_ENABLED */\n\n#ifndef SQLITE_OMIT_TRIGGER\n/*\n** Show a human-readable graph of a TriggerStep\n*/\nSQLITE_PRIVATE void sqlite3TreeViewTriggerStep(\n  TreeView *pView,\n  const TriggerStep *pStep,\n  u8 moreToFollow,\n  u8 showFullList\n){\n  int cnt = 0;\n  if( pStep==0 ) return;\n  sqlite3TreeViewPush(&pView,\n      moreToFollow || (showFullList && pStep->pNext!=0));\n  do{\n    if( cnt++ && pStep->pNext==0 ){\n      sqlite3TreeViewPop(&pView);\n      sqlite3TreeViewPush(&pView, 0);\n    }\n    sqlite3TreeViewLine(pView, \"%s\", pStep->zSpan ? pStep->zSpan : \"RETURNING\");\n  }while( showFullList && (pStep = pStep->pNext)!=0 );\n  sqlite3TreeViewPop(&pView);\n}\n\n/*\n** Show a human-readable graph of a Trigger\n*/\nSQLITE_PRIVATE void sqlite3TreeViewTrigger(\n  TreeView *pView,\n  const Trigger *pTrigger,\n  u8 moreToFollow,\n  u8 showFullList\n){\n  int cnt = 0;\n  if( pTrigger==0 ) return;\n  sqlite3TreeViewPush(&pView,\n     moreToFollow || (showFullList && pTrigger->pNext!=0));\n  do{\n    if( cnt++ && pTrigger->pNext==0 ){\n      sqlite3TreeViewPop(&pView);\n      sqlite3TreeViewPush(&pView, 0);\n    }\n    sqlite3TreeViewLine(pView, \"TRIGGER %s\", pTrigger->zName);\n    sqlite3TreeViewPush(&pView, 0);\n    sqlite3TreeViewTriggerStep(pView, pTrigger->step_list, 0, 1);\n    sqlite3TreeViewPop(&pView);\n  }while( showFullList && (pTrigger = pTrigger->pNext)!=0 );\n  sqlite3TreeViewPop(&pView);\n}\n#endif /* SQLITE_OMIT_TRIGGER */\n\n\n/*\n** These simplified versions of the tree-view routines omit unnecessary\n** parameters.  These variants are intended to be used from a symbolic\n** debugger, such as \"gdb\", during interactive debugging sessions.\n**\n** This routines are given external linkage so that they will always be\n** accessible to the debugging, and to avoid warnings about unused\n** functions.  But these routines only exist in debugging builds, so they\n** do not contaminate the interface.\n**\n** See Also:\n**\n**     sqlite3ShowWhereTerm() in where.c\n*/\nSQLITE_PRIVATE void sqlite3ShowExpr(const Expr *p){ sqlite3TreeViewExpr(0,p,0); }\nSQLITE_PRIVATE void sqlite3ShowExprList(const ExprList *p){ sqlite3TreeViewExprList(0,p,0,0);}\nSQLITE_PRIVATE void sqlite3ShowIdList(const IdList *p){ sqlite3TreeViewIdList(0,p,0,0); }\nSQLITE_PRIVATE void sqlite3ShowSrcList(const SrcList *p){ sqlite3TreeViewSrcList(0,p); }\nSQLITE_PRIVATE void sqlite3ShowSelect(const Select *p){ sqlite3TreeViewSelect(0,p,0); }\nSQLITE_PRIVATE void sqlite3ShowWith(const With *p){ sqlite3TreeViewWith(0,p,0); }\nSQLITE_PRIVATE void sqlite3ShowUpsert(const Upsert *p){ sqlite3TreeViewUpsert(0,p,0); }\n#ifndef SQLITE_OMIT_TRIGGER\nSQLITE_PRIVATE void sqlite3ShowTriggerStep(const TriggerStep *p){\n  sqlite3TreeViewTriggerStep(0,p,0,0);\n}\nSQLITE_PRIVATE void sqlite3ShowTriggerStepList(const TriggerStep *p){\n  sqlite3TreeViewTriggerStep(0,p,0,1);\n}\nSQLITE_PRIVATE void sqlite3ShowTrigger(const Trigger *p){ sqlite3TreeViewTrigger(0,p,0,0); }\nSQLITE_PRIVATE void sqlite3ShowTriggerList(const Trigger *p){ sqlite3TreeViewTrigger(0,p,0,1);}\n#endif\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE void sqlite3ShowWindow(const Window *p){ sqlite3TreeViewWindow(0,p,0); }\nSQLITE_PRIVATE void sqlite3ShowWinFunc(const Window *p){ sqlite3TreeViewWinFunc(0,p,0); }\n#endif\n\n#endif /* SQLITE_DEBUG */\n\n/************** End of treeview.c ********************************************/\n/************** Begin file random.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code to implement a pseudo-random number\n** generator (PRNG) for SQLite.\n**\n** Random numbers are used by some of the database backends in order\n** to generate random integer keys for tables or random filenames.\n*/\n/* #include \"sqliteInt.h\" */\n\n\n/* All threads share a single random number generator.\n** This structure is the current state of the generator.\n*/\nstatic SQLITE_WSD struct sqlite3PrngType {\n  u32 s[16];                 /* 64 bytes of chacha20 state */\n  u8 out[64];                /* Output bytes */\n  u8 n;                      /* Output bytes remaining */\n} sqlite3Prng;\n\n\n/* The RFC-7539 ChaCha20 block function\n*/\n#define ROTL(a,b) (((a) << (b)) | ((a) >> (32 - (b))))\n#define QR(a, b, c, d) ( \\\n    a += b, d ^= a, d = ROTL(d,16), \\\n    c += d, b ^= c, b = ROTL(b,12), \\\n    a += b, d ^= a, d = ROTL(d, 8), \\\n    c += d, b ^= c, b = ROTL(b, 7))\nstatic void chacha_block(u32 *out, const u32 *in){\n  int i;\n  u32 x[16];\n  memcpy(x, in, 64);\n  for(i=0; i<10; i++){\n    QR(x[0], x[4], x[ 8], x[12]);\n    QR(x[1], x[5], x[ 9], x[13]);\n    QR(x[2], x[6], x[10], x[14]);\n    QR(x[3], x[7], x[11], x[15]);\n    QR(x[0], x[5], x[10], x[15]);\n    QR(x[1], x[6], x[11], x[12]);\n    QR(x[2], x[7], x[ 8], x[13]);\n    QR(x[3], x[4], x[ 9], x[14]);\n  }\n  for(i=0; i<16; i++) out[i] = x[i]+in[i];\n}\n\n/*\n** Return N random bytes.\n*/\nSQLITE_API void sqlite3_randomness(int N, void *pBuf){\n  unsigned char *zBuf = pBuf;\n\n  /* The \"wsdPrng\" macro will resolve to the pseudo-random number generator\n  ** state vector.  If writable static data is unsupported on the target,\n  ** we have to locate the state vector at run-time.  In the more common\n  ** case where writable static data is supported, wsdPrng can refer directly\n  ** to the \"sqlite3Prng\" state vector declared above.\n  */\n#ifdef SQLITE_OMIT_WSD\n  struct sqlite3PrngType *p = &GLOBAL(struct sqlite3PrngType, sqlite3Prng);\n# define wsdPrng p[0]\n#else\n# define wsdPrng sqlite3Prng\n#endif\n\n#if SQLITE_THREADSAFE\n  sqlite3_mutex *mutex;\n#endif\n\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return;\n#endif\n\n#if SQLITE_THREADSAFE\n  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);\n#endif\n\n  sqlite3_mutex_enter(mutex);\n  if( N<=0 || pBuf==0 ){\n    wsdPrng.s[0] = 0;\n    sqlite3_mutex_leave(mutex);\n    return;\n  }\n\n  /* Initialize the state of the random number generator once,\n  ** the first time this routine is called.\n  */\n  if( wsdPrng.s[0]==0 ){\n    sqlite3_vfs *pVfs = sqlite3_vfs_find(0);\n    static const u32 chacha20_init[] = {\n      0x61707865, 0x3320646e, 0x79622d32, 0x6b206574\n    };\n    memcpy(&wsdPrng.s[0], chacha20_init, 16);\n    if( NEVER(pVfs==0) ){\n      memset(&wsdPrng.s[4], 0, 44);\n    }else{\n      sqlite3OsRandomness(pVfs, 44, (char*)&wsdPrng.s[4]);\n    }\n    wsdPrng.s[15] = wsdPrng.s[12];\n    wsdPrng.s[12] = 0;\n    wsdPrng.n = 0;\n  }\n\n  assert( N>0 );\n  while( 1 /* exit by break */ ){\n    if( N<=wsdPrng.n ){\n      memcpy(zBuf, &wsdPrng.out[wsdPrng.n-N], N);\n      wsdPrng.n -= N;\n      break;\n    }\n    if( wsdPrng.n>0 ){\n      memcpy(zBuf, wsdPrng.out, wsdPrng.n);\n      N -= wsdPrng.n;\n      zBuf += wsdPrng.n;\n    }\n    wsdPrng.s[12]++;\n    chacha_block((u32*)wsdPrng.out, wsdPrng.s);\n    wsdPrng.n = 64;\n  }\n  sqlite3_mutex_leave(mutex);\n}\n\n#ifndef SQLITE_UNTESTABLE\n/*\n** For testing purposes, we sometimes want to preserve the state of\n** PRNG and restore the PRNG to its saved state at a later time, or\n** to reset the PRNG to its initial state.  These routines accomplish\n** those tasks.\n**\n** The sqlite3_test_control() interface calls these routines to\n** control the PRNG.\n*/\nstatic SQLITE_WSD struct sqlite3PrngType sqlite3SavedPrng;\nSQLITE_PRIVATE void sqlite3PrngSaveState(void){\n  memcpy(\n    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),\n    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),\n    sizeof(sqlite3Prng)\n  );\n}\nSQLITE_PRIVATE void sqlite3PrngRestoreState(void){\n  memcpy(\n    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),\n    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),\n    sizeof(sqlite3Prng)\n  );\n}\n#endif /* SQLITE_UNTESTABLE */\n\n/************** End of random.c **********************************************/\n/************** Begin file threads.c *****************************************/\n/*\n** 2012 July 21\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file presents a simple cross-platform threading interface for\n** use internally by SQLite.\n**\n** A \"thread\" can be created using sqlite3ThreadCreate().  This thread\n** runs independently of its creator until it is joined using\n** sqlite3ThreadJoin(), at which point it terminates.\n**\n** Threads do not have to be real.  It could be that the work of the\n** \"thread\" is done by the main thread at either the sqlite3ThreadCreate()\n** or sqlite3ThreadJoin() call.  This is, in fact, what happens in\n** single threaded systems.  Nothing in SQLite requires multiple threads.\n** This interface exists so that applications that want to take advantage\n** of multiple cores can do so, while also allowing applications to stay\n** single-threaded if desired.\n*/\n/* #include \"sqliteInt.h\" */\n#if SQLITE_OS_WIN\n/* #  include \"os_win.h\" */\n#endif\n\n#if SQLITE_MAX_WORKER_THREADS>0\n\n/********************************* Unix Pthreads ****************************/\n#if SQLITE_OS_UNIX && defined(SQLITE_MUTEX_PTHREADS) && SQLITE_THREADSAFE>0\n\n#define SQLITE_THREADS_IMPLEMENTED 1  /* Prevent the single-thread code below */\n/* #include <pthread.h> */\n\n/* A running thread */\nstruct SQLiteThread {\n  pthread_t tid;                 /* Thread ID */\n  int done;                      /* Set to true when thread finishes */\n  void *pOut;                    /* Result returned by the thread */\n  void *(*xTask)(void*);         /* The thread routine */\n  void *pIn;                     /* Argument to the thread */\n};\n\n/* Create a new thread */\nSQLITE_PRIVATE int sqlite3ThreadCreate(\n  SQLiteThread **ppThread,  /* OUT: Write the thread object here */\n  void *(*xTask)(void*),    /* Routine to run in a separate thread */\n  void *pIn                 /* Argument passed into xTask() */\n){\n  SQLiteThread *p;\n  int rc;\n\n  assert( ppThread!=0 );\n  assert( xTask!=0 );\n  /* This routine is never used in single-threaded mode */\n  assert( sqlite3GlobalConfig.bCoreMutex!=0 );\n\n  *ppThread = 0;\n  p = sqlite3Malloc(sizeof(*p));\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  memset(p, 0, sizeof(*p));\n  p->xTask = xTask;\n  p->pIn = pIn;\n  /* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a\n  ** function that returns SQLITE_ERROR when passed the argument 200, that\n  ** forces worker threads to run sequentially and deterministically\n  ** for testing purposes. */\n  if( sqlite3FaultSim(200) ){\n    rc = 1;\n  }else{\n    rc = pthread_create(&p->tid, 0, xTask, pIn);\n  }\n  if( rc ){\n    p->done = 1;\n    p->pOut = xTask(pIn);\n  }\n  *ppThread = p;\n  return SQLITE_OK;\n}\n\n/* Get the results of the thread */\nSQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){\n  int rc;\n\n  assert( ppOut!=0 );\n  if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;\n  if( p->done ){\n    *ppOut = p->pOut;\n    rc = SQLITE_OK;\n  }else{\n    rc = pthread_join(p->tid, ppOut) ? SQLITE_ERROR : SQLITE_OK;\n  }\n  sqlite3_free(p);\n  return rc;\n}\n\n#endif /* SQLITE_OS_UNIX && defined(SQLITE_MUTEX_PTHREADS) */\n/******************************** End Unix Pthreads *************************/\n\n\n/********************************* Win32 Threads ****************************/\n#if SQLITE_OS_WIN_THREADS\n\n#define SQLITE_THREADS_IMPLEMENTED 1  /* Prevent the single-thread code below */\n#include <process.h>\n\n/* A running thread */\nstruct SQLiteThread {\n  void *tid;               /* The thread handle */\n  unsigned id;             /* The thread identifier */\n  void *(*xTask)(void*);   /* The routine to run as a thread */\n  void *pIn;               /* Argument to xTask */\n  void *pResult;           /* Result of xTask */\n};\n\n/* Thread procedure Win32 compatibility shim */\nstatic unsigned __stdcall sqlite3ThreadProc(\n  void *pArg  /* IN: Pointer to the SQLiteThread structure */\n){\n  SQLiteThread *p = (SQLiteThread *)pArg;\n\n  assert( p!=0 );\n#if 0\n  /*\n  ** This assert appears to trigger spuriously on certain\n  ** versions of Windows, possibly due to _beginthreadex()\n  ** and/or CreateThread() not fully setting their thread\n  ** ID parameter before starting the thread.\n  */\n  assert( p->id==GetCurrentThreadId() );\n#endif\n  assert( p->xTask!=0 );\n  p->pResult = p->xTask(p->pIn);\n\n  _endthreadex(0);\n  return 0; /* NOT REACHED */\n}\n\n/* Create a new thread */\nSQLITE_PRIVATE int sqlite3ThreadCreate(\n  SQLiteThread **ppThread,  /* OUT: Write the thread object here */\n  void *(*xTask)(void*),    /* Routine to run in a separate thread */\n  void *pIn                 /* Argument passed into xTask() */\n){\n  SQLiteThread *p;\n\n  assert( ppThread!=0 );\n  assert( xTask!=0 );\n  *ppThread = 0;\n  p = sqlite3Malloc(sizeof(*p));\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  /* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a\n  ** function that returns SQLITE_ERROR when passed the argument 200, that\n  ** forces worker threads to run sequentially and deterministically\n  ** (via the sqlite3FaultSim() term of the conditional) for testing\n  ** purposes. */\n  if( sqlite3GlobalConfig.bCoreMutex==0 || sqlite3FaultSim(200) ){\n    memset(p, 0, sizeof(*p));\n  }else{\n    p->xTask = xTask;\n    p->pIn = pIn;\n    p->tid = (void*)_beginthreadex(0, 0, sqlite3ThreadProc, p, 0, &p->id);\n    if( p->tid==0 ){\n      memset(p, 0, sizeof(*p));\n    }\n  }\n  if( p->xTask==0 ){\n    p->id = GetCurrentThreadId();\n    p->pResult = xTask(pIn);\n  }\n  *ppThread = p;\n  return SQLITE_OK;\n}\n\nSQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject); /* os_win.c */\n\n/* Get the results of the thread */\nSQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){\n  DWORD rc;\n  BOOL bRc;\n\n  assert( ppOut!=0 );\n  if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;\n  if( p->xTask==0 ){\n    /* assert( p->id==GetCurrentThreadId() ); */\n    rc = WAIT_OBJECT_0;\n    assert( p->tid==0 );\n  }else{\n    assert( p->id!=0 && p->id!=GetCurrentThreadId() );\n    rc = sqlite3Win32Wait((HANDLE)p->tid);\n    assert( rc!=WAIT_IO_COMPLETION );\n    bRc = CloseHandle((HANDLE)p->tid);\n    assert( bRc );\n  }\n  if( rc==WAIT_OBJECT_0 ) *ppOut = p->pResult;\n  sqlite3_free(p);\n  return (rc==WAIT_OBJECT_0) ? SQLITE_OK : SQLITE_ERROR;\n}\n\n#endif /* SQLITE_OS_WIN_THREADS */\n/******************************** End Win32 Threads *************************/\n\n\n/********************************* Single-Threaded **************************/\n#ifndef SQLITE_THREADS_IMPLEMENTED\n/*\n** This implementation does not actually create a new thread.  It does the\n** work of the thread in the main thread, when either the thread is created\n** or when it is joined\n*/\n\n/* A running thread */\nstruct SQLiteThread {\n  void *(*xTask)(void*);   /* The routine to run as a thread */\n  void *pIn;               /* Argument to xTask */\n  void *pResult;           /* Result of xTask */\n};\n\n/* Create a new thread */\nSQLITE_PRIVATE int sqlite3ThreadCreate(\n  SQLiteThread **ppThread,  /* OUT: Write the thread object here */\n  void *(*xTask)(void*),    /* Routine to run in a separate thread */\n  void *pIn                 /* Argument passed into xTask() */\n){\n  SQLiteThread *p;\n\n  assert( ppThread!=0 );\n  assert( xTask!=0 );\n  *ppThread = 0;\n  p = sqlite3Malloc(sizeof(*p));\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  if( (SQLITE_PTR_TO_INT(p)/17)&1 ){\n    p->xTask = xTask;\n    p->pIn = pIn;\n  }else{\n    p->xTask = 0;\n    p->pResult = xTask(pIn);\n  }\n  *ppThread = p;\n  return SQLITE_OK;\n}\n\n/* Get the results of the thread */\nSQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){\n\n  assert( ppOut!=0 );\n  if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;\n  if( p->xTask ){\n    *ppOut = p->xTask(p->pIn);\n  }else{\n    *ppOut = p->pResult;\n  }\n  sqlite3_free(p);\n\n#if defined(SQLITE_TEST)\n  {\n    void *pTstAlloc = sqlite3Malloc(10);\n    if (!pTstAlloc) return SQLITE_NOMEM_BKPT;\n    sqlite3_free(pTstAlloc);\n  }\n#endif\n\n  return SQLITE_OK;\n}\n\n#endif /* !defined(SQLITE_THREADS_IMPLEMENTED) */\n/****************************** End Single-Threaded *************************/\n#endif /* SQLITE_MAX_WORKER_THREADS>0 */\n\n/************** End of threads.c *********************************************/\n/************** Begin file utf.c *********************************************/\n/*\n** 2004 April 13\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains routines used to translate between UTF-8,\n** UTF-16, UTF-16BE, and UTF-16LE.\n**\n** Notes on UTF-8:\n**\n**   Byte-0    Byte-1    Byte-2    Byte-3    Value\n**  0xxxxxxx                                 00000000 00000000 0xxxxxxx\n**  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx\n**  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx\n**  11110uuu  10uuzzzz  10yyyyyy  10xxxxxx   000uuuuu zzzzyyyy yyxxxxxx\n**\n**\n** Notes on UTF-16:  (with wwww+1==uuuuu)\n**\n**      Word-0               Word-1          Value\n**  110110ww wwzzzzyy   110111yy yyxxxxxx    000uuuuu zzzzyyyy yyxxxxxx\n**  zzzzyyyy yyxxxxxx                        00000000 zzzzyyyy yyxxxxxx\n**\n**\n** BOM or Byte Order Mark:\n**     0xff 0xfe   little-endian utf-16 follows\n**     0xfe 0xff   big-endian utf-16 follows\n**\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <assert.h> */\n/* #include \"vdbeInt.h\" */\n\n#if !defined(SQLITE_AMALGAMATION) && SQLITE_BYTEORDER==0\n/*\n** The following constant value is used by the SQLITE_BIGENDIAN and\n** SQLITE_LITTLEENDIAN macros.\n*/\nSQLITE_PRIVATE const int sqlite3one = 1;\n#endif /* SQLITE_AMALGAMATION && SQLITE_BYTEORDER==0 */\n\n/*\n** This lookup table is used to help decode the first byte of\n** a multi-byte UTF8 character.\n*/\nstatic const unsigned char sqlite3Utf8Trans1[] = {\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,\n};\n\n\n#define WRITE_UTF8(zOut, c) {                          \\\n  if( c<0x00080 ){                                     \\\n    *zOut++ = (u8)(c&0xFF);                            \\\n  }                                                    \\\n  else if( c<0x00800 ){                                \\\n    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }                                                    \\\n  else if( c<0x10000 ){                                \\\n    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \\\n    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }else{                                               \\\n    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \\\n    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \\\n    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }                                                    \\\n}\n\n#define WRITE_UTF16LE(zOut, c) {                                    \\\n  if( c<=0xFFFF ){                                                  \\\n    *zOut++ = (u8)(c&0x00FF);                                       \\\n    *zOut++ = (u8)((c>>8)&0x00FF);                                  \\\n  }else{                                                            \\\n    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \\\n    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \\\n    *zOut++ = (u8)(c&0x00FF);                                       \\\n    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \\\n  }                                                                 \\\n}\n\n#define WRITE_UTF16BE(zOut, c) {                                    \\\n  if( c<=0xFFFF ){                                                  \\\n    *zOut++ = (u8)((c>>8)&0x00FF);                                  \\\n    *zOut++ = (u8)(c&0x00FF);                                       \\\n  }else{                                                            \\\n    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \\\n    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \\\n    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \\\n    *zOut++ = (u8)(c&0x00FF);                                       \\\n  }                                                                 \\\n}\n\n/*\n** Write a single UTF8 character whose value is v into the\n** buffer starting at zOut.  zOut must be sized to hold at\n** least four bytes.  Return the number of bytes needed\n** to encode the new character.\n*/\nSQLITE_PRIVATE int sqlite3AppendOneUtf8Character(char *zOut, u32 v){\n  if( v<0x00080 ){\n    zOut[0] = (u8)(v & 0xff);\n    return 1;\n  }\n  if( v<0x00800 ){\n    zOut[0] = 0xc0 + (u8)((v>>6) & 0x1f);\n    zOut[1] = 0x80 + (u8)(v & 0x3f);\n    return 2;\n  }\n  if( v<0x10000 ){\n    zOut[0] = 0xe0 + (u8)((v>>12) & 0x0f);\n    zOut[1] = 0x80 + (u8)((v>>6) & 0x3f);\n    zOut[2] = 0x80 + (u8)(v & 0x3f);\n    return 3;\n  }\n  zOut[0] = 0xf0 + (u8)((v>>18) & 0x07);\n  zOut[1] = 0x80 + (u8)((v>>12) & 0x3f);\n  zOut[2] = 0x80 + (u8)((v>>6) & 0x3f);\n  zOut[3] = 0x80 + (u8)(v & 0x3f);\n  return 4;\n}\n\n/*\n** Translate a single UTF-8 character.  Return the unicode value.\n**\n** During translation, assume that the byte that zTerm points\n** is a 0x00.\n**\n** Write a pointer to the next unread byte back into *pzNext.\n**\n** Notes On Invalid UTF-8:\n**\n**  *  This routine never allows a 7-bit character (0x00 through 0x7f) to\n**     be encoded as a multi-byte character.  Any multi-byte character that\n**     attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd.\n**\n**  *  This routine never allows a UTF16 surrogate value to be encoded.\n**     If a multi-byte character attempts to encode a value between\n**     0xd800 and 0xe000 then it is rendered as 0xfffd.\n**\n**  *  Bytes in the range of 0x80 through 0xbf which occur as the first\n**     byte of a character are interpreted as single-byte characters\n**     and rendered as themselves even though they are technically\n**     invalid characters.\n**\n**  *  This routine accepts over-length UTF8 encodings\n**     for unicode values 0x80 and greater.  It does not change over-length\n**     encodings to 0xfffd as some systems recommend.\n*/\n#define READ_UTF8(zIn, zTerm, c)                           \\\n  c = *(zIn++);                                            \\\n  if( c>=0xc0 ){                                           \\\n    c = sqlite3Utf8Trans1[c-0xc0];                         \\\n    while( zIn<zTerm && (*zIn & 0xc0)==0x80 ){             \\\n      c = (c<<6) + (0x3f & *(zIn++));                      \\\n    }                                                      \\\n    if( c<0x80                                             \\\n        || (c&0xFFFFF800)==0xD800                          \\\n        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \\\n  }\nSQLITE_PRIVATE u32 sqlite3Utf8Read(\n  const unsigned char **pz    /* Pointer to string from which to read char */\n){\n  unsigned int c;\n\n  /* Same as READ_UTF8() above but without the zTerm parameter.\n  ** For this routine, we assume the UTF8 string is always zero-terminated.\n  */\n  c = *((*pz)++);\n  if( c>=0xc0 ){\n    c = sqlite3Utf8Trans1[c-0xc0];\n    while( (*(*pz) & 0xc0)==0x80 ){\n      c = (c<<6) + (0x3f & *((*pz)++));\n    }\n    if( c<0x80\n        || (c&0xFFFFF800)==0xD800\n        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }\n  }\n  return c;\n}\n\n/*\n** Read a single UTF8 character out of buffer z[], but reading no\n** more than n characters from the buffer.  z[] is not zero-terminated.\n**\n** Return the number of bytes used to construct the character.\n**\n** Invalid UTF8 might generate a strange result.  No effort is made\n** to detect invalid UTF8.\n**\n** At most 4 bytes will be read out of z[].  The return value will always\n** be between 1 and 4.\n*/\nSQLITE_PRIVATE int sqlite3Utf8ReadLimited(\n  const u8 *z,\n  int n,\n  u32 *piOut\n){\n  u32 c;\n  int i = 1;\n  assert( n>0 );\n  c = z[0];\n  if( c>=0xc0 ){\n    c = sqlite3Utf8Trans1[c-0xc0];\n    if( n>4 ) n = 4;\n    while( i<n && (z[i] & 0xc0)==0x80 ){\n      c = (c<<6) + (0x3f & z[i]);\n      i++;\n    }\n  }\n  *piOut = c;\n  return i;\n}\n\n\n/*\n** If the TRANSLATE_TRACE macro is defined, the value of each Mem is\n** printed on stderr on the way into and out of sqlite3VdbeMemTranslate().\n*/\n/* #define TRANSLATE_TRACE 1 */\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** This routine transforms the internal text encoding used by pMem to\n** desiredEnc. It is an error if the string is already of the desired\n** encoding, or if *pMem does not contain a string value.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){\n  sqlite3_int64 len;          /* Maximum length of output string in bytes */\n  unsigned char *zOut;        /* Output buffer */\n  unsigned char *zIn;         /* Input iterator */\n  unsigned char *zTerm;       /* End of input */\n  unsigned char *z;           /* Output iterator */\n  unsigned int c;\n\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( pMem->flags&MEM_Str );\n  assert( pMem->enc!=desiredEnc );\n  assert( pMem->enc!=0 );\n  assert( pMem->n>=0 );\n\n#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)\n  {\n    StrAccum acc;\n    char zBuf[1000];\n    sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n    sqlite3VdbeMemPrettyPrint(pMem, &acc);\n    fprintf(stderr, \"INPUT:  %s\\n\", sqlite3StrAccumFinish(&acc));\n  }\n#endif\n\n  /* If the translation is between UTF-16 little and big endian, then\n  ** all that is required is to swap the byte order. This case is handled\n  ** differently from the others.\n  */\n  if( pMem->enc!=SQLITE_UTF8 && desiredEnc!=SQLITE_UTF8 ){\n    u8 temp;\n    int rc;\n    rc = sqlite3VdbeMemMakeWriteable(pMem);\n    if( rc!=SQLITE_OK ){\n      assert( rc==SQLITE_NOMEM );\n      return SQLITE_NOMEM_BKPT;\n    }\n    zIn = (u8*)pMem->z;\n    zTerm = &zIn[pMem->n&~1];\n    while( zIn<zTerm ){\n      temp = *zIn;\n      *zIn = *(zIn+1);\n      zIn++;\n      *zIn++ = temp;\n    }\n    pMem->enc = desiredEnc;\n    goto translate_out;\n  }\n\n  /* Set len to the maximum number of bytes required in the output buffer. */\n  if( desiredEnc==SQLITE_UTF8 ){\n    /* When converting from UTF-16, the maximum growth results from\n    ** translating a 2-byte character to a 4-byte UTF-8 character.\n    ** A single byte is required for the output string\n    ** nul-terminator.\n    */\n    pMem->n &= ~1;\n    len = 2 * (sqlite3_int64)pMem->n + 1;\n  }else{\n    /* When converting from UTF-8 to UTF-16 the maximum growth is caused\n    ** when a 1-byte UTF-8 character is translated into a 2-byte UTF-16\n    ** character. Two bytes are required in the output buffer for the\n    ** nul-terminator.\n    */\n    len = 2 * (sqlite3_int64)pMem->n + 2;\n  }\n\n  /* Set zIn to point at the start of the input buffer and zTerm to point 1\n  ** byte past the end.\n  **\n  ** Variable zOut is set to point at the output buffer, space obtained\n  ** from sqlite3_malloc().\n  */\n  zIn = (u8*)pMem->z;\n  zTerm = &zIn[pMem->n];\n  zOut = sqlite3DbMallocRaw(pMem->db, len);\n  if( !zOut ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  z = zOut;\n\n  if( pMem->enc==SQLITE_UTF8 ){\n    if( desiredEnc==SQLITE_UTF16LE ){\n      /* UTF-8 -> UTF-16 Little-endian */\n      while( zIn<zTerm ){\n        READ_UTF8(zIn, zTerm, c);\n        WRITE_UTF16LE(z, c);\n      }\n    }else{\n      assert( desiredEnc==SQLITE_UTF16BE );\n      /* UTF-8 -> UTF-16 Big-endian */\n      while( zIn<zTerm ){\n        READ_UTF8(zIn, zTerm, c);\n        WRITE_UTF16BE(z, c);\n      }\n    }\n    pMem->n = (int)(z - zOut);\n    *z++ = 0;\n  }else{\n    assert( desiredEnc==SQLITE_UTF8 );\n    if( pMem->enc==SQLITE_UTF16LE ){\n      /* UTF-16 Little-endian -> UTF-8 */\n      while( zIn<zTerm ){\n        c = *(zIn++);\n        c += (*(zIn++))<<8;\n        if( c>=0xd800 && c<0xe000 ){\n#ifdef SQLITE_REPLACE_INVALID_UTF\n          if( c>=0xdc00 || zIn>=zTerm ){\n            c = 0xfffd;\n          }else{\n            int c2 = *(zIn++);\n            c2 += (*(zIn++))<<8;\n            if( c2<0xdc00 || c2>=0xe000 ){\n              zIn -= 2;\n              c = 0xfffd;\n            }else{\n              c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;\n            }\n          }\n#else\n          if( zIn<zTerm ){\n            int c2 = (*zIn++);\n            c2 += ((*zIn++)<<8);\n            c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);\n          }\n#endif\n        }\n        WRITE_UTF8(z, c);\n      }\n    }else{\n      /* UTF-16 Big-endian -> UTF-8 */\n      while( zIn<zTerm ){\n        c = (*(zIn++))<<8;\n        c += *(zIn++);\n        if( c>=0xd800 && c<0xe000 ){\n#ifdef SQLITE_REPLACE_INVALID_UTF\n          if( c>=0xdc00 || zIn>=zTerm ){\n            c = 0xfffd;\n          }else{\n            int c2 = (*(zIn++))<<8;\n            c2 += *(zIn++);\n            if( c2<0xdc00 || c2>=0xe000 ){\n              zIn -= 2;\n              c = 0xfffd;\n            }else{\n              c = ((c&0x3ff)<<10) + (c2&0x3ff) + 0x10000;\n            }\n          }\n#else\n          if( zIn<zTerm ){\n            int c2 = ((*zIn++)<<8);\n            c2 += (*zIn++);\n            c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);\n          }\n#endif\n        }\n        WRITE_UTF8(z, c);\n      }\n    }\n    pMem->n = (int)(z - zOut);\n  }\n  *z = 0;\n  assert( (pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len );\n\n  c = MEM_Str|MEM_Term|(pMem->flags&(MEM_AffMask|MEM_Subtype));\n  sqlite3VdbeMemRelease(pMem);\n  pMem->flags = c;\n  pMem->enc = desiredEnc;\n  pMem->z = (char*)zOut;\n  pMem->zMalloc = pMem->z;\n  pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->z);\n\ntranslate_out:\n#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)\n  {\n    StrAccum acc;\n    char zBuf[1000];\n    sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n    sqlite3VdbeMemPrettyPrint(pMem, &acc);\n    fprintf(stderr, \"OUTPUT: %s\\n\", sqlite3StrAccumFinish(&acc));\n  }\n#endif\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** This routine checks for a byte-order mark at the beginning of the\n** UTF-16 string stored in *pMem. If one is present, it is removed and\n** the encoding of the Mem adjusted. This routine does not do any\n** byte-swapping, it just sets Mem.enc appropriately.\n**\n** The allocation (static, dynamic etc.) and encoding of the Mem may be\n** changed by this function.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem){\n  int rc = SQLITE_OK;\n  u8 bom = 0;\n\n  assert( pMem->n>=0 );\n  if( pMem->n>1 ){\n    u8 b1 = *(u8 *)pMem->z;\n    u8 b2 = *(((u8 *)pMem->z) + 1);\n    if( b1==0xFE && b2==0xFF ){\n      bom = SQLITE_UTF16BE;\n    }\n    if( b1==0xFF && b2==0xFE ){\n      bom = SQLITE_UTF16LE;\n    }\n  }\n\n  if( bom ){\n    rc = sqlite3VdbeMemMakeWriteable(pMem);\n    if( rc==SQLITE_OK ){\n      pMem->n -= 2;\n      memmove(pMem->z, &pMem->z[2], pMem->n);\n      pMem->z[pMem->n] = '\\0';\n      pMem->z[pMem->n+1] = '\\0';\n      pMem->flags |= MEM_Term;\n      pMem->enc = bom;\n    }\n  }\n  return rc;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,\n** return the number of unicode characters in pZ up to (but not including)\n** the first 0x00 byte. If nByte is not less than zero, return the\n** number of unicode characters in the first nByte of pZ (or up to\n** the first 0x00, whichever comes first).\n*/\nSQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){\n  int r = 0;\n  const u8 *z = (const u8*)zIn;\n  const u8 *zTerm;\n  if( nByte>=0 ){\n    zTerm = &z[nByte];\n  }else{\n    zTerm = (const u8*)(-1);\n  }\n  assert( z<=zTerm );\n  while( *z!=0 && z<zTerm ){\n    SQLITE_SKIP_UTF8(z);\n    r++;\n  }\n  return r;\n}\n\n/* This test function is not currently used by the automated test-suite.\n** Hence it is only available in debug builds.\n*/\n#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)\n/*\n** Translate UTF-8 to UTF-8.\n**\n** This has the effect of making sure that the string is well-formed\n** UTF-8.  Miscoded characters are removed.\n**\n** The translation is done in-place and aborted if the output\n** overruns the input.\n*/\nSQLITE_PRIVATE int sqlite3Utf8To8(unsigned char *zIn){\n  unsigned char *zOut = zIn;\n  unsigned char *zStart = zIn;\n  u32 c;\n\n  while( zIn[0] && zOut<=zIn ){\n    c = sqlite3Utf8Read((const u8**)&zIn);\n    if( c!=0xfffd ){\n      WRITE_UTF8(zOut, c);\n    }\n  }\n  *zOut = 0;\n  return (int)(zOut - zStart);\n}\n#endif\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Convert a UTF-16 string in the native encoding into a UTF-8 string.\n** Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must\n** be freed by the calling function.\n**\n** NULL is returned if there is an allocation error.\n*/\nSQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){\n  Mem m;\n  memset(&m, 0, sizeof(m));\n  m.db = db;\n  sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);\n  sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8);\n  if( db->mallocFailed ){\n    sqlite3VdbeMemRelease(&m);\n    m.z = 0;\n  }\n  assert( (m.flags & MEM_Term)!=0 || db->mallocFailed );\n  assert( (m.flags & MEM_Str)!=0 || db->mallocFailed );\n  assert( m.z || db->mallocFailed );\n  return m.z;\n}\n\n/*\n** zIn is a UTF-16 encoded unicode string at least nByte bytes long.\n** Return the number of bytes in the first nChar unicode characters\n** in pZ.  nChar must be non-negative.  Surrogate pairs count as a single\n** character.\n*/\nSQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nByte, int nChar){\n  int c;\n  unsigned char const *z = zIn;\n  unsigned char const *zEnd = &z[nByte-1];\n  int n = 0;\n\n  if( SQLITE_UTF16NATIVE==SQLITE_UTF16LE ) z++;\n  while( n<nChar && z<=zEnd ){\n    c = z[0];\n    z += 2;\n    if( c>=0xd8 && c<0xdc && z<=zEnd && z[0]>=0xdc && z[0]<0xe0 ) z += 2;\n    n++;\n  }\n  return (int)(z-(unsigned char const *)zIn)\n              - (SQLITE_UTF16NATIVE==SQLITE_UTF16LE);\n}\n\n#if defined(SQLITE_TEST)\n/*\n** This routine is called from the TCL test function \"translate_selftest\".\n** It checks that the primitives for serializing and deserializing\n** characters in each encoding are inverses of each other.\n*/\nSQLITE_PRIVATE void sqlite3UtfSelfTest(void){\n  unsigned int i, t;\n  unsigned char zBuf[20];\n  unsigned char *z;\n  int n;\n  unsigned int c;\n\n  for(i=0; i<0x00110000; i++){\n    z = zBuf;\n    WRITE_UTF8(z, i);\n    n = (int)(z-zBuf);\n    assert( n>0 && n<=4 );\n    z[0] = 0;\n    z = zBuf;\n    c = sqlite3Utf8Read((const u8**)&z);\n    t = i;\n    if( i>=0xD800 && i<=0xDFFF ) t = 0xFFFD;\n    if( (i&0xFFFFFFFE)==0xFFFE ) t = 0xFFFD;\n    assert( c==t );\n    assert( (z-zBuf)==n );\n  }\n}\n#endif /* SQLITE_TEST */\n#endif /* SQLITE_OMIT_UTF16 */\n\n/************** End of utf.c *************************************************/\n/************** Begin file util.c ********************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Utility functions used throughout sqlite.\n**\n** This file contains functions for allocating memory, comparing\n** strings, and stuff like that.\n**\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdarg.h> */\n#ifndef SQLITE_OMIT_FLOATING_POINT\n#include <math.h>\n#endif\n\n/*\n** Calls to sqlite3FaultSim() are used to simulate a failure during testing,\n** or to bypass normal error detection during testing in order to let\n** execute proceed further downstream.\n**\n** In deployment, sqlite3FaultSim() *always* return SQLITE_OK (0).  The\n** sqlite3FaultSim() function only returns non-zero during testing.\n**\n** During testing, if the test harness has set a fault-sim callback using\n** a call to sqlite3_test_control(SQLITE_TESTCTRL_FAULT_INSTALL), then\n** each call to sqlite3FaultSim() is relayed to that application-supplied\n** callback and the integer return value form the application-supplied\n** callback is returned by sqlite3FaultSim().\n**\n** The integer argument to sqlite3FaultSim() is a code to identify which\n** sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim()\n** should have a unique code.  To prevent legacy testing applications from\n** breaking, the codes should not be changed or reused.\n*/\n#ifndef SQLITE_UNTESTABLE\nSQLITE_PRIVATE int sqlite3FaultSim(int iTest){\n  int (*xCallback)(int) = sqlite3GlobalConfig.xTestCallback;\n  return xCallback ? xCallback(iTest) : SQLITE_OK;\n}\n#endif\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/*\n** Return true if the floating point value is Not a Number (NaN).\n**\n** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.\n** Otherwise, we have our own implementation that works on most systems.\n*/\nSQLITE_PRIVATE int sqlite3IsNaN(double x){\n  int rc;   /* The value return */\n#if !SQLITE_HAVE_ISNAN && !HAVE_ISNAN\n  u64 y;\n  memcpy(&y,&x,sizeof(y));\n  rc = IsNaN(y);\n#else\n  rc = isnan(x);\n#endif /* HAVE_ISNAN */\n  testcase( rc );\n  return rc;\n}\n#endif /* SQLITE_OMIT_FLOATING_POINT */\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/*\n** Return true if the floating point value is NaN or +Inf or -Inf.\n*/\nSQLITE_PRIVATE int sqlite3IsOverflow(double x){\n  int rc;   /* The value return */\n  u64 y;\n  memcpy(&y,&x,sizeof(y));\n  rc = IsOvfl(y);\n  return rc;\n}\n#endif /* SQLITE_OMIT_FLOATING_POINT */\n\n/*\n** Compute a string length that is limited to what can be stored in\n** lower 30 bits of a 32-bit signed integer.\n**\n** The value returned will never be negative.  Nor will it ever be greater\n** than the actual length of the string.  For very long strings (greater\n** than 1GiB) the value returned might be less than the true string length.\n*/\nSQLITE_PRIVATE int sqlite3Strlen30(const char *z){\n  if( z==0 ) return 0;\n  return 0x3fffffff & (int)strlen(z);\n}\n\n/*\n** Return the declared type of a column.  Or return zDflt if the column\n** has no declared type.\n**\n** The column type is an extra string stored after the zero-terminator on\n** the column name if and only if the COLFLAG_HASTYPE flag is set.\n*/\nSQLITE_PRIVATE char *sqlite3ColumnType(Column *pCol, char *zDflt){\n  if( pCol->colFlags & COLFLAG_HASTYPE ){\n    return pCol->zCnName + strlen(pCol->zCnName) + 1;\n  }else if( pCol->eCType ){\n    assert( pCol->eCType<=SQLITE_N_STDTYPE );\n    return (char*)sqlite3StdType[pCol->eCType-1];\n  }else{\n    return zDflt;\n  }\n}\n\n/*\n** Helper function for sqlite3Error() - called rarely.  Broken out into\n** a separate routine to avoid unnecessary register saves on entry to\n** sqlite3Error().\n*/\nstatic SQLITE_NOINLINE void  sqlite3ErrorFinish(sqlite3 *db, int err_code){\n  if( db->pErr ) sqlite3ValueSetNull(db->pErr);\n  sqlite3SystemError(db, err_code);\n}\n\n/*\n** Set the current error code to err_code and clear any prior error message.\n** Also set iSysErrno (by calling sqlite3System) if the err_code indicates\n** that would be appropriate.\n*/\nSQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code){\n  assert( db!=0 );\n  db->errCode = err_code;\n  if( err_code || db->pErr ){\n    sqlite3ErrorFinish(db, err_code);\n  }else{\n    db->errByteOffset = -1;\n  }\n}\n\n/*\n** The equivalent of sqlite3Error(db, SQLITE_OK).  Clear the error state\n** and error message.\n*/\nSQLITE_PRIVATE void sqlite3ErrorClear(sqlite3 *db){\n  assert( db!=0 );\n  db->errCode = SQLITE_OK;\n  db->errByteOffset = -1;\n  if( db->pErr ) sqlite3ValueSetNull(db->pErr);\n}\n\n/*\n** Load the sqlite3.iSysErrno field if that is an appropriate thing\n** to do based on the SQLite error code in rc.\n*/\nSQLITE_PRIVATE void sqlite3SystemError(sqlite3 *db, int rc){\n  if( rc==SQLITE_IOERR_NOMEM ) return;\n#if defined(SQLITE_USE_SEH) && !defined(SQLITE_OMIT_WAL)\n  if( rc==SQLITE_IOERR_IN_PAGE ){\n    int ii;\n    int iErr;\n    sqlite3BtreeEnterAll(db);\n    for(ii=0; ii<db->nDb; ii++){\n      if( db->aDb[ii].pBt ){\n        iErr = sqlite3PagerWalSystemErrno(sqlite3BtreePager(db->aDb[ii].pBt));\n        if( iErr ){\n          db->iSysErrno = iErr;\n        }\n      }\n    }\n    sqlite3BtreeLeaveAll(db);\n    return;\n  }\n#endif\n  rc &= 0xff;\n  if( rc==SQLITE_CANTOPEN || rc==SQLITE_IOERR ){\n    db->iSysErrno = sqlite3OsGetLastError(db->pVfs);\n  }\n}\n\n/*\n** Set the most recent error code and error string for the sqlite\n** handle \"db\". The error code is set to \"err_code\".\n**\n** If it is not NULL, string zFormat specifies the format of the\n** error string.  zFormat and any string tokens that follow it are\n** assumed to be encoded in UTF-8.\n**\n** To clear the most recent error for sqlite handle \"db\", sqlite3Error\n** should be called with err_code set to SQLITE_OK and zFormat set\n** to NULL.\n*/\nSQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3 *db, int err_code, const char *zFormat, ...){\n  assert( db!=0 );\n  db->errCode = err_code;\n  sqlite3SystemError(db, err_code);\n  if( zFormat==0 ){\n    sqlite3Error(db, err_code);\n  }else if( db->pErr || (db->pErr = sqlite3ValueNew(db))!=0 ){\n    char *z;\n    va_list ap;\n    va_start(ap, zFormat);\n    z = sqlite3VMPrintf(db, zFormat, ap);\n    va_end(ap);\n    sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);\n  }\n}\n\n/*\n** Check for interrupts and invoke progress callback.\n*/\nSQLITE_PRIVATE void sqlite3ProgressCheck(Parse *p){\n  sqlite3 *db = p->db;\n  if( AtomicLoad(&db->u1.isInterrupted) ){\n    p->nErr++;\n    p->rc = SQLITE_INTERRUPT;\n  }\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  if( db->xProgress ){\n    if( p->rc==SQLITE_INTERRUPT ){\n      p->nProgressSteps = 0;\n    }else if( (++p->nProgressSteps)>=db->nProgressOps ){\n      if( db->xProgress(db->pProgressArg) ){\n        p->nErr++;\n        p->rc = SQLITE_INTERRUPT;\n      }\n      p->nProgressSteps = 0;\n    }\n  }\n#endif\n}\n\n/*\n** Add an error message to pParse->zErrMsg and increment pParse->nErr.\n**\n** This function should be used to report any error that occurs while\n** compiling an SQL statement (i.e. within sqlite3_prepare()). The\n** last thing the sqlite3_prepare() function does is copy the error\n** stored by this function into the database handle using sqlite3Error().\n** Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used\n** during statement execution (sqlite3_step() etc.).\n*/\nSQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){\n  char *zMsg;\n  va_list ap;\n  sqlite3 *db = pParse->db;\n  assert( db!=0 );\n  assert( db->pParse==pParse || db->pParse->pToplevel==pParse );\n  db->errByteOffset = -2;\n  va_start(ap, zFormat);\n  zMsg = sqlite3VMPrintf(db, zFormat, ap);\n  va_end(ap);\n  if( db->errByteOffset<-1 ) db->errByteOffset = -1;\n  if( db->suppressErr ){\n    sqlite3DbFree(db, zMsg);\n    if( db->mallocFailed ){\n      pParse->nErr++;\n      pParse->rc = SQLITE_NOMEM;\n    }\n  }else{\n    pParse->nErr++;\n    sqlite3DbFree(db, pParse->zErrMsg);\n    pParse->zErrMsg = zMsg;\n    pParse->rc = SQLITE_ERROR;\n    pParse->pWith = 0;\n  }\n}\n\n/*\n** If database connection db is currently parsing SQL, then transfer\n** error code errCode to that parser if the parser has not already\n** encountered some other kind of error.\n*/\nSQLITE_PRIVATE int sqlite3ErrorToParser(sqlite3 *db, int errCode){\n  Parse *pParse;\n  if( db==0 || (pParse = db->pParse)==0 ) return errCode;\n  pParse->rc = errCode;\n  pParse->nErr++;\n  return errCode;\n}\n\n/*\n** Convert an SQL-style quoted string into a normal string by removing\n** the quote characters.  The conversion is done in-place.  If the\n** input does not begin with a quote character, then this routine\n** is a no-op.\n**\n** The input string must be zero-terminated.  A new zero-terminator\n** is added to the dequoted string.\n**\n** The return value is -1 if no dequoting occurs or the length of the\n** dequoted string, exclusive of the zero terminator, if dequoting does\n** occur.\n**\n** 2002-02-14: This routine is extended to remove MS-Access style\n** brackets from around identifiers.  For example:  \"[a-b-c]\" becomes\n** \"a-b-c\".\n*/\nSQLITE_PRIVATE void sqlite3Dequote(char *z){\n  char quote;\n  int i, j;\n  if( z==0 ) return;\n  quote = z[0];\n  if( !sqlite3Isquote(quote) ) return;\n  if( quote=='[' ) quote = ']';\n  for(i=1, j=0;; i++){\n    assert( z[i] );\n    if( z[i]==quote ){\n      if( z[i+1]==quote ){\n        z[j++] = quote;\n        i++;\n      }else{\n        break;\n      }\n    }else{\n      z[j++] = z[i];\n    }\n  }\n  z[j] = 0;\n}\nSQLITE_PRIVATE void sqlite3DequoteExpr(Expr *p){\n  assert( !ExprHasProperty(p, EP_IntValue) );\n  assert( sqlite3Isquote(p->u.zToken[0]) );\n  p->flags |= p->u.zToken[0]=='\"' ? EP_Quoted|EP_DblQuoted : EP_Quoted;\n  sqlite3Dequote(p->u.zToken);\n}\n\n/*\n** Expression p is a QNUMBER (quoted number). Dequote the value in p->u.zToken\n** and set the type to INTEGER or FLOAT. \"Quoted\" integers or floats are those\n** that contain '_' characters that must be removed before further processing.\n*/\nSQLITE_PRIVATE void sqlite3DequoteNumber(Parse *pParse, Expr *p){\n  assert( p!=0 || pParse->db->mallocFailed );\n  if( p ){\n    const char *pIn = p->u.zToken;\n    char *pOut = p->u.zToken;\n    int bHex = (pIn[0]=='0' && (pIn[1]=='x' || pIn[1]=='X'));\n    int iValue;\n    assert( p->op==TK_QNUMBER );\n    p->op = TK_INTEGER;\n    do {\n      if( *pIn!=SQLITE_DIGIT_SEPARATOR ){\n        *pOut++ = *pIn;\n        if( *pIn=='e' || *pIn=='E' || *pIn=='.' ) p->op = TK_FLOAT;\n      }else{\n        if( (bHex==0 && (!sqlite3Isdigit(pIn[-1]) || !sqlite3Isdigit(pIn[1])))\n         || (bHex==1 && (!sqlite3Isxdigit(pIn[-1]) || !sqlite3Isxdigit(pIn[1])))\n        ){\n          sqlite3ErrorMsg(pParse, \"unrecognized token: \\\"%s\\\"\", p->u.zToken);\n        }\n      }\n    }while( *pIn++ );\n    if( bHex ) p->op = TK_INTEGER;\n\n    /* tag-20240227-a: If after dequoting, the number is an integer that\n    ** fits in 32 bits, then it must be converted into EP_IntValue.  Other\n    ** parts of the code expect this.  See also tag-20240227-b. */\n    if( p->op==TK_INTEGER && sqlite3GetInt32(p->u.zToken, &iValue) ){\n      p->u.iValue = iValue;\n      p->flags |= EP_IntValue;\n    }\n  }\n}\n\n/*\n** If the input token p is quoted, try to adjust the token to remove\n** the quotes.  This is not always possible:\n**\n**     \"abc\"     ->   abc\n**     \"ab\"\"cd\"  ->   (not possible because of the interior \"\")\n**\n** Remove the quotes if possible.  This is a optimization.  The overall\n** system should still return the correct answer even if this routine\n** is always a no-op.\n*/\nSQLITE_PRIVATE void sqlite3DequoteToken(Token *p){\n  unsigned int i;\n  if( p->n<2 ) return;\n  if( !sqlite3Isquote(p->z[0]) ) return;\n  for(i=1; i<p->n-1; i++){\n    if( sqlite3Isquote(p->z[i]) ) return;\n  }\n  p->n -= 2;\n  p->z++;\n}\n\n/*\n** Generate a Token object from a string\n*/\nSQLITE_PRIVATE void sqlite3TokenInit(Token *p, char *z){\n  p->z = z;\n  p->n = sqlite3Strlen30(z);\n}\n\n/* Convenient short-hand */\n#define UpperToLower sqlite3UpperToLower\n\n/*\n** Some systems have stricmp().  Others have strcasecmp().  Because\n** there is no consistency, we will define our own.\n**\n** IMPLEMENTATION-OF: R-30243-02494 The sqlite3_stricmp() and\n** sqlite3_strnicmp() APIs allow applications and extensions to compare\n** the contents of two buffers containing UTF-8 strings in a\n** case-independent fashion, using the same definition of \"case\n** independence\" that SQLite uses internally when comparing identifiers.\n*/\nSQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){\n  if( zLeft==0 ){\n    return zRight ? -1 : 0;\n  }else if( zRight==0 ){\n    return 1;\n  }\n  return sqlite3StrICmp(zLeft, zRight);\n}\nSQLITE_PRIVATE int sqlite3StrICmp(const char *zLeft, const char *zRight){\n  unsigned char *a, *b;\n  int c, x;\n  a = (unsigned char *)zLeft;\n  b = (unsigned char *)zRight;\n  for(;;){\n    c = *a;\n    x = *b;\n    if( c==x ){\n      if( c==0 ) break;\n    }else{\n      c = (int)UpperToLower[c] - (int)UpperToLower[x];\n      if( c ) break;\n    }\n    a++;\n    b++;\n  }\n  return c;\n}\nSQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){\n  register unsigned char *a, *b;\n  if( zLeft==0 ){\n    return zRight ? -1 : 0;\n  }else if( zRight==0 ){\n    return 1;\n  }\n  a = (unsigned char *)zLeft;\n  b = (unsigned char *)zRight;\n  while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }\n  return N<0 ? 0 : UpperToLower[*a] - UpperToLower[*b];\n}\n\n/*\n** Compute an 8-bit hash on a string that is insensitive to case differences\n*/\nSQLITE_PRIVATE u8 sqlite3StrIHash(const char *z){\n  u8 h = 0;\n  if( z==0 ) return 0;\n  while( z[0] ){\n    h += UpperToLower[(unsigned char)z[0]];\n    z++;\n  }\n  return h;\n}\n\n/* Double-Double multiplication.  (x[0],x[1]) *= (y,yy)\n**\n** Reference:\n**   T. J. Dekker, \"A Floating-Point Technique for Extending the\n**   Available Precision\".  1971-07-26.\n*/\nstatic void dekkerMul2(volatile double *x, double y, double yy){\n  /*\n  ** The \"volatile\" keywords on parameter x[] and on local variables\n  ** below are needed force intermediate results to be truncated to\n  ** binary64 rather than be carried around in an extended-precision\n  ** format.  The truncation is necessary for the Dekker algorithm to\n  ** work.  Intel x86 floating point might omit the truncation without\n  ** the use of volatile.\n  */\n  volatile double tx, ty, p, q, c, cc;\n  double hx, hy;\n  u64 m;\n  memcpy(&m, (void*)&x[0], 8);\n  m &= 0xfffffffffc000000LL;\n  memcpy(&hx, &m, 8);\n  tx = x[0] - hx;\n  memcpy(&m, &y, 8);\n  m &= 0xfffffffffc000000LL;\n  memcpy(&hy, &m, 8);\n  ty = y - hy;\n  p = hx*hy;\n  q = hx*ty + tx*hy;\n  c = p+q;\n  cc = p - c + q + tx*ty;\n  cc = x[0]*yy + x[1]*y + cc;\n  x[0] = c + cc;\n  x[1] = c - x[0];\n  x[1] += cc;\n}\n\n/*\n** The string z[] is an text representation of a real number.\n** Convert this string to a double and write it into *pResult.\n**\n** The string z[] is length bytes in length (bytes, not characters) and\n** uses the encoding enc.  The string is not necessarily zero-terminated.\n**\n** Return TRUE if the result is a valid real number (or integer) and FALSE\n** if the string is empty or contains extraneous text.  More specifically\n** return\n**      1          =>  The input string is a pure integer\n**      2 or more  =>  The input has a decimal point or eNNN clause\n**      0 or less  =>  The input string is not a valid number\n**     -1          =>  Not a valid number, but has a valid prefix which\n**                     includes a decimal point and/or an eNNN clause\n**\n** Valid numbers are in one of these formats:\n**\n**    [+-]digits[E[+-]digits]\n**    [+-]digits.[digits][E[+-]digits]\n**    [+-].digits[E[+-]digits]\n**\n** Leading and trailing whitespace is ignored for the purpose of determining\n** validity.\n**\n** If some prefix of the input string is a valid number, this routine\n** returns FALSE but it still converts the prefix and writes the result\n** into *pResult.\n*/\n#if defined(_MSC_VER)\n#pragma warning(disable : 4756)\n#endif\nSQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){\n#ifndef SQLITE_OMIT_FLOATING_POINT\n  int incr;\n  const char *zEnd;\n  /* sign * significand * (10 ^ (esign * exponent)) */\n  int sign = 1;    /* sign of significand */\n  u64 s = 0;       /* significand */\n  int d = 0;       /* adjust exponent for shifting decimal point */\n  int esign = 1;   /* sign of exponent */\n  int e = 0;       /* exponent */\n  int eValid = 1;  /* True exponent is either not used or is well-formed */\n  int nDigit = 0;  /* Number of digits processed */\n  int eType = 1;   /* 1: pure integer,  2+: fractional  -1 or less: bad UTF16 */\n  u64 s2;          /* round-tripped significand */\n  double rr[2];\n\n  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );\n  *pResult = 0.0;   /* Default return value, in case of an error */\n  if( length==0 ) return 0;\n\n  if( enc==SQLITE_UTF8 ){\n    incr = 1;\n    zEnd = z + length;\n  }else{\n    int i;\n    incr = 2;\n    length &= ~1;\n    assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );\n    testcase( enc==SQLITE_UTF16LE );\n    testcase( enc==SQLITE_UTF16BE );\n    for(i=3-enc; i<length && z[i]==0; i+=2){}\n    if( i<length ) eType = -100;\n    zEnd = &z[i^1];\n    z += (enc&1);\n  }\n\n  /* skip leading spaces */\n  while( z<zEnd && sqlite3Isspace(*z) ) z+=incr;\n  if( z>=zEnd ) return 0;\n\n  /* get sign of significand */\n  if( *z=='-' ){\n    sign = -1;\n    z+=incr;\n  }else if( *z=='+' ){\n    z+=incr;\n  }\n\n  /* copy max significant digits to significand */\n  while( z<zEnd && sqlite3Isdigit(*z) ){\n    s = s*10 + (*z - '0');\n    z+=incr; nDigit++;\n    if( s>=((LARGEST_UINT64-9)/10) ){\n      /* skip non-significant significand digits\n      ** (increase exponent by d to shift decimal left) */\n      while( z<zEnd && sqlite3Isdigit(*z) ){ z+=incr; d++; }\n    }\n  }\n  if( z>=zEnd ) goto do_atof_calc;\n\n  /* if decimal point is present */\n  if( *z=='.' ){\n    z+=incr;\n    eType++;\n    /* copy digits from after decimal to significand\n    ** (decrease exponent by d to shift decimal right) */\n    while( z<zEnd && sqlite3Isdigit(*z) ){\n      if( s<((LARGEST_UINT64-9)/10) ){\n        s = s*10 + (*z - '0');\n        d--;\n        nDigit++;\n      }\n      z+=incr;\n    }\n  }\n  if( z>=zEnd ) goto do_atof_calc;\n\n  /* if exponent is present */\n  if( *z=='e' || *z=='E' ){\n    z+=incr;\n    eValid = 0;\n    eType++;\n\n    /* This branch is needed to avoid a (harmless) buffer overread.  The\n    ** special comment alerts the mutation tester that the correct answer\n    ** is obtained even if the branch is omitted */\n    if( z>=zEnd ) goto do_atof_calc;              /*PREVENTS-HARMLESS-OVERREAD*/\n\n    /* get sign of exponent */\n    if( *z=='-' ){\n      esign = -1;\n      z+=incr;\n    }else if( *z=='+' ){\n      z+=incr;\n    }\n    /* copy digits to exponent */\n    while( z<zEnd && sqlite3Isdigit(*z) ){\n      e = e<10000 ? (e*10 + (*z - '0')) : 10000;\n      z+=incr;\n      eValid = 1;\n    }\n  }\n\n  /* skip trailing spaces */\n  while( z<zEnd && sqlite3Isspace(*z) ) z+=incr;\n\ndo_atof_calc:\n  /* Zero is a special case */\n  if( s==0 ){\n    *pResult = sign<0 ? -0.0 : +0.0;\n    goto atof_return;\n  }\n\n  /* adjust exponent by d, and update sign */\n  e = (e*esign) + d;\n\n  /* Try to adjust the exponent to make it smaller */\n  while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){\n    s *= 10;\n    e--;\n  }\n  while( e<0 && (s%10)==0 ){\n    s /= 10;\n    e++;\n  }\n\n  rr[0] = (double)s;\n  assert( sizeof(s2)==sizeof(rr[0]) );\n#ifdef SQLITE_DEBUG\n  rr[1] = 18446744073709549568.0;\n  memcpy(&s2, &rr[1], sizeof(s2));\n  assert( s2==0x43efffffffffffffLL );\n#endif\n  /* Largest double that can be safely converted to u64\n  **         vvvvvvvvvvvvvvvvvvvvvv   */\n  if( rr[0]<=18446744073709549568.0 ){\n    s2 = (u64)rr[0];\n    rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);\n  }else{\n    rr[1] = 0.0;\n  }\n  assert( rr[1]<=1.0e-10*rr[0] );  /* Equal only when rr[0]==0.0 */\n\n  if( e>0 ){\n    while( e>=100  ){\n      e -= 100;\n      dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);\n    }\n    while( e>=10   ){\n      e -= 10;\n      dekkerMul2(rr, 1.0e+10, 0.0);\n    }\n    while( e>=1    ){\n      e -= 1;\n      dekkerMul2(rr, 1.0e+01, 0.0);\n    }\n  }else{\n    while( e<=-100 ){\n      e += 100;\n      dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);\n    }\n    while( e<=-10  ){\n      e += 10;\n      dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);\n    }\n    while( e<=-1   ){\n      e += 1;\n      dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);\n    }\n  }\n  *pResult = rr[0]+rr[1];\n  if( sqlite3IsNaN(*pResult) ) *pResult = 1e300*1e300;\n  if( sign<0 ) *pResult = -*pResult;\n  assert( !sqlite3IsNaN(*pResult) );\n\natof_return:\n  /* return true if number and no extra non-whitespace characters after */\n  if( z==zEnd && nDigit>0 && eValid && eType>0 ){\n    return eType;\n  }else if( eType>=2 && (eType==3 || eValid) && nDigit>0 ){\n    return -1;\n  }else{\n    return 0;\n  }\n#else\n  return !sqlite3Atoi64(z, pResult, length, enc);\n#endif /* SQLITE_OMIT_FLOATING_POINT */\n}\n#if defined(_MSC_VER)\n#pragma warning(default : 4756)\n#endif\n\n/*\n** Render an signed 64-bit integer as text.  Store the result in zOut[] and\n** return the length of the string that was stored, in bytes.  The value\n** returned does not include the zero terminator at the end of the output\n** string.\n**\n** The caller must ensure that zOut[] is at least 21 bytes in size.\n*/\nSQLITE_PRIVATE int sqlite3Int64ToText(i64 v, char *zOut){\n  int i;\n  u64 x;\n  char zTemp[22];\n  if( v<0 ){\n    x = (v==SMALLEST_INT64) ? ((u64)1)<<63 : (u64)-v;\n  }else{\n    x = v;\n  }\n  i = sizeof(zTemp)-2;\n  zTemp[sizeof(zTemp)-1] = 0;\n  while( 1 /*exit-by-break*/ ){\n    zTemp[i] = (x%10) + '0';\n    x = x/10;\n    if( x==0 ) break;\n    i--;\n  };\n  if( v<0 ) zTemp[--i] = '-';\n  memcpy(zOut, &zTemp[i], sizeof(zTemp)-i);\n  return sizeof(zTemp)-1-i;\n}\n\n/*\n** Compare the 19-character string zNum against the text representation\n** value 2^63:  9223372036854775808.  Return negative, zero, or positive\n** if zNum is less than, equal to, or greater than the string.\n** Note that zNum must contain exactly 19 characters.\n**\n** Unlike memcmp() this routine is guaranteed to return the difference\n** in the values of the last digit if the only difference is in the\n** last digit.  So, for example,\n**\n**      compare2pow63(\"9223372036854775800\", 1)\n**\n** will return -8.\n*/\nstatic int compare2pow63(const char *zNum, int incr){\n  int c = 0;\n  int i;\n                    /* 012345678901234567 */\n  const char *pow63 = \"922337203685477580\";\n  for(i=0; c==0 && i<18; i++){\n    c = (zNum[i*incr]-pow63[i])*10;\n  }\n  if( c==0 ){\n    c = zNum[18*incr] - '8';\n    testcase( c==(-1) );\n    testcase( c==0 );\n    testcase( c==(+1) );\n  }\n  return c;\n}\n\n/*\n** Convert zNum to a 64-bit signed integer.  zNum must be decimal. This\n** routine does *not* accept hexadecimal notation.\n**\n** Returns:\n**\n**    -1    Not even a prefix of the input text looks like an integer\n**     0    Successful transformation.  Fits in a 64-bit signed integer.\n**     1    Excess non-space text after the integer value\n**     2    Integer too large for a 64-bit signed integer or is malformed\n**     3    Special case of 9223372036854775808\n**\n** length is the number of bytes in the string (bytes, not characters).\n** The string is not necessarily zero-terminated.  The encoding is\n** given by enc.\n*/\nSQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){\n  int incr;\n  u64 u = 0;\n  int neg = 0; /* assume positive */\n  int i;\n  int c = 0;\n  int nonNum = 0;  /* True if input contains UTF16 with high byte non-zero */\n  int rc;          /* Baseline return code */\n  const char *zStart;\n  const char *zEnd = zNum + length;\n  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );\n  if( enc==SQLITE_UTF8 ){\n    incr = 1;\n  }else{\n    incr = 2;\n    length &= ~1;\n    assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );\n    for(i=3-enc; i<length && zNum[i]==0; i+=2){}\n    nonNum = i<length;\n    zEnd = &zNum[i^1];\n    zNum += (enc&1);\n  }\n  while( zNum<zEnd && sqlite3Isspace(*zNum) ) zNum+=incr;\n  if( zNum<zEnd ){\n    if( *zNum=='-' ){\n      neg = 1;\n      zNum+=incr;\n    }else if( *zNum=='+' ){\n      zNum+=incr;\n    }\n  }\n  zStart = zNum;\n  while( zNum<zEnd && zNum[0]=='0' ){ zNum+=incr; } /* Skip leading zeros. */\n  for(i=0; &zNum[i]<zEnd && (c=zNum[i])>='0' && c<='9'; i+=incr){\n    u = u*10 + c - '0';\n  }\n  testcase( i==18*incr );\n  testcase( i==19*incr );\n  testcase( i==20*incr );\n  if( u>LARGEST_INT64 ){\n    /* This test and assignment is needed only to suppress UB warnings\n    ** from clang and -fsanitize=undefined.  This test and assignment make\n    ** the code a little larger and slower, and no harm comes from omitting\n    ** them, but we must appease the undefined-behavior pharisees. */\n    *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64;\n  }else if( neg ){\n    *pNum = -(i64)u;\n  }else{\n    *pNum = (i64)u;\n  }\n  rc = 0;\n  if( i==0 && zStart==zNum ){    /* No digits */\n    rc = -1;\n  }else if( nonNum ){            /* UTF16 with high-order bytes non-zero */\n    rc = 1;\n  }else if( &zNum[i]<zEnd ){     /* Extra bytes at the end */\n    int jj = i;\n    do{\n      if( !sqlite3Isspace(zNum[jj]) ){\n        rc = 1;          /* Extra non-space text after the integer */\n        break;\n      }\n      jj += incr;\n    }while( &zNum[jj]<zEnd );\n  }\n  if( i<19*incr ){\n    /* Less than 19 digits, so we know that it fits in 64 bits */\n    assert( u<=LARGEST_INT64 );\n    return rc;\n  }else{\n    /* zNum is a 19-digit numbers.  Compare it against 9223372036854775808. */\n    c = i>19*incr ? 1 : compare2pow63(zNum, incr);\n    if( c<0 ){\n      /* zNum is less than 9223372036854775808 so it fits */\n      assert( u<=LARGEST_INT64 );\n      return rc;\n    }else{\n      *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64;\n      if( c>0 ){\n        /* zNum is greater than 9223372036854775808 so it overflows */\n        return 2;\n      }else{\n        /* zNum is exactly 9223372036854775808.  Fits if negative.  The\n        ** special case 2 overflow if positive */\n        assert( u-1==LARGEST_INT64 );\n        return neg ? rc : 3;\n      }\n    }\n  }\n}\n\n/*\n** Transform a UTF-8 integer literal, in either decimal or hexadecimal,\n** into a 64-bit signed integer.  This routine accepts hexadecimal literals,\n** whereas sqlite3Atoi64() does not.\n**\n** Returns:\n**\n**     0    Successful transformation.  Fits in a 64-bit signed integer.\n**     1    Excess text after the integer value\n**     2    Integer too large for a 64-bit signed integer or is malformed\n**     3    Special case of 9223372036854775808\n*/\nSQLITE_PRIVATE int sqlite3DecOrHexToI64(const char *z, i64 *pOut){\n#ifndef SQLITE_OMIT_HEX_INTEGER\n  if( z[0]=='0'\n   && (z[1]=='x' || z[1]=='X')\n  ){\n    u64 u = 0;\n    int i, k;\n    for(i=2; z[i]=='0'; i++){}\n    for(k=i; sqlite3Isxdigit(z[k]); k++){\n      u = u*16 + sqlite3HexToInt(z[k]);\n    }\n    memcpy(pOut, &u, 8);\n    if( k-i>16 ) return 2;\n    if( z[k]!=0 ) return 1;\n    return 0;\n  }else\n#endif /* SQLITE_OMIT_HEX_INTEGER */\n  {\n    int n = (int)(0x3fffffff&strspn(z,\"+- \\n\\t0123456789\"));\n    if( z[n] ) n++;\n    return sqlite3Atoi64(z, pOut, n, SQLITE_UTF8);\n  }\n}\n\n/*\n** If zNum represents an integer that will fit in 32-bits, then set\n** *pValue to that integer and return true.  Otherwise return false.\n**\n** This routine accepts both decimal and hexadecimal notation for integers.\n**\n** Any non-numeric characters that following zNum are ignored.\n** This is different from sqlite3Atoi64() which requires the\n** input number to be zero-terminated.\n*/\nSQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){\n  sqlite_int64 v = 0;\n  int i, c;\n  int neg = 0;\n  if( zNum[0]=='-' ){\n    neg = 1;\n    zNum++;\n  }else if( zNum[0]=='+' ){\n    zNum++;\n  }\n#ifndef SQLITE_OMIT_HEX_INTEGER\n  else if( zNum[0]=='0'\n        && (zNum[1]=='x' || zNum[1]=='X')\n        && sqlite3Isxdigit(zNum[2])\n  ){\n    u32 u = 0;\n    zNum += 2;\n    while( zNum[0]=='0' ) zNum++;\n    for(i=0; i<8 && sqlite3Isxdigit(zNum[i]); i++){\n      u = u*16 + sqlite3HexToInt(zNum[i]);\n    }\n    if( (u&0x80000000)==0 && sqlite3Isxdigit(zNum[i])==0 ){\n      memcpy(pValue, &u, 4);\n      return 1;\n    }else{\n      return 0;\n    }\n  }\n#endif\n  if( !sqlite3Isdigit(zNum[0]) ) return 0;\n  while( zNum[0]=='0' ) zNum++;\n  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){\n    v = v*10 + c;\n  }\n\n  /* The longest decimal representation of a 32 bit integer is 10 digits:\n  **\n  **             1234567890\n  **     2^31 -> 2147483648\n  */\n  testcase( i==10 );\n  if( i>10 ){\n    return 0;\n  }\n  testcase( v-neg==2147483647 );\n  if( v-neg>2147483647 ){\n    return 0;\n  }\n  if( neg ){\n    v = -v;\n  }\n  *pValue = (int)v;\n  return 1;\n}\n\n/*\n** Return a 32-bit integer value extracted from a string.  If the\n** string is not an integer, just return 0.\n*/\nSQLITE_PRIVATE int sqlite3Atoi(const char *z){\n  int x = 0;\n  sqlite3GetInt32(z, &x);\n  return x;\n}\n\n/*\n** Decode a floating-point value into an approximate decimal\n** representation.\n**\n** If iRound<=0 then round to -iRound significant digits to the\n** the left of the decimal point, or to a maximum of mxRound total\n** significant digits.\n**\n** If iRound>0 round to min(iRound,mxRound) significant digits total.\n**\n** mxRound must be positive.\n**\n** The significant digits of the decimal representation are\n** stored in p->z[] which is a often (but not always) a pointer\n** into the middle of p->zBuf[].  There are p->n significant digits.\n** The p->z[] array is *not* zero-terminated.\n*/\nSQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){\n  int i;\n  u64 v;\n  int e, exp = 0;\n  double rr[2];\n\n  p->isSpecial = 0;\n  p->z = p->zBuf;\n  assert( mxRound>0 );\n\n  /* Convert negative numbers to positive.  Deal with Infinity, 0.0, and\n  ** NaN. */\n  if( r<0.0 ){\n    p->sign = '-';\n    r = -r;\n  }else if( r==0.0 ){\n    p->sign = '+';\n    p->n = 1;\n    p->iDP = 1;\n    p->z = \"0\";\n    return;\n  }else{\n    p->sign = '+';\n  }\n  memcpy(&v,&r,8);\n  e = v>>52;\n  if( (e&0x7ff)==0x7ff ){\n    p->isSpecial = 1 + (v!=0x7ff0000000000000LL);\n    p->n = 0;\n    p->iDP = 0;\n    return;\n  }\n\n  /* Multiply r by powers of ten until it lands somewhere in between\n  ** 1.0e+19 and 1.0e+17.\n  **\n  ** Use Dekker-style double-double computation to increase the\n  ** precision.\n  **\n  ** The error terms on constants like 1.0e+100 computed using the\n  ** decimal extension, for example as follows:\n  **\n  **   SELECT decimal_exp(decimal_sub('1.0e+100',decimal(1.0e+100)));\n  */\n  rr[0] = r;\n  rr[1] = 0.0;\n  if( rr[0]>9.223372036854774784e+18 ){\n    while( rr[0]>9.223372036854774784e+118 ){\n      exp += 100;\n      dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117);\n    }\n    while( rr[0]>9.223372036854774784e+28 ){\n      exp += 10;\n      dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27);\n    }\n    while( rr[0]>9.223372036854774784e+18 ){\n      exp += 1;\n      dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18);\n    }\n  }else{\n    while( rr[0]<9.223372036854774784e-83  ){\n      exp -= 100;\n      dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83);\n    }\n    while( rr[0]<9.223372036854774784e+07  ){\n      exp -= 10;\n      dekkerMul2(rr, 1.0e+10, 0.0);\n    }\n    while( rr[0]<9.22337203685477478e+17  ){\n      exp -= 1;\n      dekkerMul2(rr, 1.0e+01, 0.0);\n    }\n  }\n  v = rr[1]<0.0 ? (u64)rr[0]-(u64)(-rr[1]) : (u64)rr[0]+(u64)rr[1];\n\n  /* Extract significant digits. */\n  i = sizeof(p->zBuf)-1;\n  assert( v>0 );\n  while( v ){  p->zBuf[i--] = (v%10) + '0'; v /= 10; }\n  assert( i>=0 && i<sizeof(p->zBuf)-1 );\n  p->n = sizeof(p->zBuf) - 1 - i;\n  assert( p->n>0 );\n  assert( p->n<sizeof(p->zBuf) );\n  p->iDP = p->n + exp;\n  if( iRound<=0 ){\n    iRound = p->iDP - iRound;\n    if( iRound==0 && p->zBuf[i+1]>='5' ){\n      iRound = 1;\n      p->zBuf[i--] = '0';\n      p->n++;\n      p->iDP++;\n    }\n  }\n  if( iRound>0 && (iRound<p->n || p->n>mxRound) ){\n    char *z = &p->zBuf[i+1];\n    if( iRound>mxRound ) iRound = mxRound;\n    p->n = iRound;\n    if( z[iRound]>='5' ){\n      int j = iRound-1;\n      while( 1 /*exit-by-break*/ ){\n        z[j]++;\n        if( z[j]<='9' ) break;\n        z[j] = '0';\n        if( j==0 ){\n          p->z[i--] = '1';\n          p->n++;\n          p->iDP++;\n          break;\n        }else{\n          j--;\n        }\n      }\n    }\n  }\n  p->z = &p->zBuf[i+1];\n  assert( i+p->n < sizeof(p->zBuf) );\n  assert( p->n>0 );\n  while( p->z[p->n-1]=='0' ){\n    p->n--;\n    assert( p->n>0 );\n  }\n}\n\n/*\n** Try to convert z into an unsigned 32-bit integer.  Return true on\n** success and false if there is an error.\n**\n** Only decimal notation is accepted.\n*/\nSQLITE_PRIVATE int sqlite3GetUInt32(const char *z, u32 *pI){\n  u64 v = 0;\n  int i;\n  for(i=0; sqlite3Isdigit(z[i]); i++){\n    v = v*10 + z[i] - '0';\n    if( v>4294967296LL ){ *pI = 0; return 0; }\n  }\n  if( i==0 || z[i]!=0 ){ *pI = 0; return 0; }\n  *pI = (u32)v;\n  return 1;\n}\n\n/*\n** The variable-length integer encoding is as follows:\n**\n** KEY:\n**         A = 0xxxxxxx    7 bits of data and one flag bit\n**         B = 1xxxxxxx    7 bits of data and one flag bit\n**         C = xxxxxxxx    8 bits of data\n**\n**  7 bits - A\n** 14 bits - BA\n** 21 bits - BBA\n** 28 bits - BBBA\n** 35 bits - BBBBA\n** 42 bits - BBBBBA\n** 49 bits - BBBBBBA\n** 56 bits - BBBBBBBA\n** 64 bits - BBBBBBBBC\n*/\n\n/*\n** Write a 64-bit variable-length integer to memory starting at p[0].\n** The length of data write will be between 1 and 9 bytes.  The number\n** of bytes written is returned.\n**\n** A variable-length integer consists of the lower 7 bits of each byte\n** for all bytes that have the 8th bit set and one byte with the 8th\n** bit clear.  Except, if we get to the 9th byte, it stores the full\n** 8 bits and is the last byte.\n*/\nstatic int SQLITE_NOINLINE putVarint64(unsigned char *p, u64 v){\n  int i, j, n;\n  u8 buf[10];\n  if( v & (((u64)0xff000000)<<32) ){\n    p[8] = (u8)v;\n    v >>= 8;\n    for(i=7; i>=0; i--){\n      p[i] = (u8)((v & 0x7f) | 0x80);\n      v >>= 7;\n    }\n    return 9;\n  }\n  n = 0;\n  do{\n    buf[n++] = (u8)((v & 0x7f) | 0x80);\n    v >>= 7;\n  }while( v!=0 );\n  buf[0] &= 0x7f;\n  assert( n<=9 );\n  for(i=0, j=n-1; j>=0; j--, i++){\n    p[i] = buf[j];\n  }\n  return n;\n}\nSQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){\n  if( v<=0x7f ){\n    p[0] = v&0x7f;\n    return 1;\n  }\n  if( v<=0x3fff ){\n    p[0] = ((v>>7)&0x7f)|0x80;\n    p[1] = v&0x7f;\n    return 2;\n  }\n  return putVarint64(p,v);\n}\n\n/*\n** Bitmasks used by sqlite3GetVarint().  These precomputed constants\n** are defined here rather than simply putting the constant expressions\n** inline in order to work around bugs in the RVT compiler.\n**\n** SLOT_2_0     A mask for  (0x7f<<14) | 0x7f\n**\n** SLOT_4_2_0   A mask for  (0x7f<<28) | SLOT_2_0\n*/\n#define SLOT_2_0     0x001fc07f\n#define SLOT_4_2_0   0xf01fc07f\n\n\n/*\n** Read a 64-bit variable-length integer from memory starting at p[0].\n** Return the number of bytes read.  The value is stored in *v.\n*/\nSQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){\n  u32 a,b,s;\n\n  if( ((signed char*)p)[0]>=0 ){\n    *v = *p;\n    return 1;\n  }\n  if( ((signed char*)p)[1]>=0 ){\n    *v = ((u32)(p[0]&0x7f)<<7) | p[1];\n    return 2;\n  }\n\n  /* Verify that constants are precomputed correctly */\n  assert( SLOT_2_0 == ((0x7f<<14) | (0x7f)) );\n  assert( SLOT_4_2_0 == ((0xfU<<28) | (0x7f<<14) | (0x7f)) );\n\n  a = ((u32)p[0])<<14;\n  b = p[1];\n  p += 2;\n  a |= *p;\n  /* a: p0<<14 | p2 (unmasked) */\n  if (!(a&0x80))\n  {\n    a &= SLOT_2_0;\n    b &= 0x7f;\n    b = b<<7;\n    a |= b;\n    *v = a;\n    return 3;\n  }\n\n  /* CSE1 from below */\n  a &= SLOT_2_0;\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p1<<14 | p3 (unmasked) */\n  if (!(b&0x80))\n  {\n    b &= SLOT_2_0;\n    /* moved CSE1 up */\n    /* a &= (0x7f<<14)|(0x7f); */\n    a = a<<7;\n    a |= b;\n    *v = a;\n    return 4;\n  }\n\n  /* a: p0<<14 | p2 (masked) */\n  /* b: p1<<14 | p3 (unmasked) */\n  /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n  /* moved CSE1 up */\n  /* a &= (0x7f<<14)|(0x7f); */\n  b &= SLOT_2_0;\n  s = a;\n  /* s: p0<<14 | p2 (masked) */\n\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p0<<28 | p2<<14 | p4 (unmasked) */\n  if (!(a&0x80))\n  {\n    /* we can skip these cause they were (effectively) done above\n    ** while calculating s */\n    /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */\n    /* b &= (0x7f<<14)|(0x7f); */\n    b = b<<7;\n    a |= b;\n    s = s>>18;\n    *v = ((u64)s)<<32 | a;\n    return 5;\n  }\n\n  /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n  s = s<<7;\n  s |= b;\n  /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p1<<28 | p3<<14 | p5 (unmasked) */\n  if (!(b&0x80))\n  {\n    /* we can skip this cause it was (effectively) done above in calc'ing s */\n    /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */\n    a &= SLOT_2_0;\n    a = a<<7;\n    a |= b;\n    s = s>>18;\n    *v = ((u64)s)<<32 | a;\n    return 6;\n  }\n\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p2<<28 | p4<<14 | p6 (unmasked) */\n  if (!(a&0x80))\n  {\n    a &= SLOT_4_2_0;\n    b &= SLOT_2_0;\n    b = b<<7;\n    a |= b;\n    s = s>>11;\n    *v = ((u64)s)<<32 | a;\n    return 7;\n  }\n\n  /* CSE2 from below */\n  a &= SLOT_2_0;\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p3<<28 | p5<<14 | p7 (unmasked) */\n  if (!(b&0x80))\n  {\n    b &= SLOT_4_2_0;\n    /* moved CSE2 up */\n    /* a &= (0x7f<<14)|(0x7f); */\n    a = a<<7;\n    a |= b;\n    s = s>>4;\n    *v = ((u64)s)<<32 | a;\n    return 8;\n  }\n\n  p++;\n  a = a<<15;\n  a |= *p;\n  /* a: p4<<29 | p6<<15 | p8 (unmasked) */\n\n  /* moved CSE2 up */\n  /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */\n  b &= SLOT_2_0;\n  b = b<<8;\n  a |= b;\n\n  s = s<<4;\n  b = p[-4];\n  b &= 0x7f;\n  b = b>>3;\n  s |= b;\n\n  *v = ((u64)s)<<32 | a;\n\n  return 9;\n}\n\n/*\n** Read a 32-bit variable-length integer from memory starting at p[0].\n** Return the number of bytes read.  The value is stored in *v.\n**\n** If the varint stored in p[0] is larger than can fit in a 32-bit unsigned\n** integer, then set *v to 0xffffffff.\n**\n** A MACRO version, getVarint32, is provided which inlines the\n** single-byte case.  All code should use the MACRO version as\n** this function assumes the single-byte case has already been handled.\n*/\nSQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){\n  u64 v64;\n  u8 n;\n\n  /* Assume that the single-byte case has already been handled by\n  ** the getVarint32() macro */\n  assert( (p[0] & 0x80)!=0 );\n\n  if( (p[1] & 0x80)==0 ){\n    /* This is the two-byte case */\n    *v = ((p[0]&0x7f)<<7) | p[1];\n    return 2;\n  }\n  if( (p[2] & 0x80)==0 ){\n    /* This is the three-byte case */\n    *v = ((p[0]&0x7f)<<14) | ((p[1]&0x7f)<<7) | p[2];\n    return 3;\n  }\n  /* four or more bytes */\n  n = sqlite3GetVarint(p, &v64);\n  assert( n>3 && n<=9 );\n  if( (v64 & SQLITE_MAX_U32)!=v64 ){\n    *v = 0xffffffff;\n  }else{\n    *v = (u32)v64;\n  }\n  return n;\n}\n\n/*\n** Return the number of bytes that will be needed to store the given\n** 64-bit integer.\n*/\nSQLITE_PRIVATE int sqlite3VarintLen(u64 v){\n  int i;\n  for(i=1; (v >>= 7)!=0; i++){ assert( i<10 ); }\n  return i;\n}\n\n\n/*\n** Read or write a four-byte big-endian integer value.\n*/\nSQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){\n#if SQLITE_BYTEORDER==4321\n  u32 x;\n  memcpy(&x,p,4);\n  return x;\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  u32 x;\n  memcpy(&x,p,4);\n  return __builtin_bswap32(x);\n#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  u32 x;\n  memcpy(&x,p,4);\n  return _byteswap_ulong(x);\n#else\n  testcase( p[0]&0x80 );\n  return ((unsigned)p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];\n#endif\n}\nSQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){\n#if SQLITE_BYTEORDER==4321\n  memcpy(p,&v,4);\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  u32 x = __builtin_bswap32(v);\n  memcpy(p,&x,4);\n#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  u32 x = _byteswap_ulong(v);\n  memcpy(p,&x,4);\n#else\n  p[0] = (u8)(v>>24);\n  p[1] = (u8)(v>>16);\n  p[2] = (u8)(v>>8);\n  p[3] = (u8)v;\n#endif\n}\n\n\n\n/*\n** Translate a single byte of Hex into an integer.\n** This routine only works if h really is a valid hexadecimal\n** character:  0..9a..fA..F\n*/\nSQLITE_PRIVATE u8 sqlite3HexToInt(int h){\n  assert( (h>='0' && h<='9') ||  (h>='a' && h<='f') ||  (h>='A' && h<='F') );\n#ifdef SQLITE_ASCII\n  h += 9*(1&(h>>6));\n#endif\n#ifdef SQLITE_EBCDIC\n  h += 9*(1&~(h>>4));\n#endif\n  return (u8)(h & 0xf);\n}\n\n#if !defined(SQLITE_OMIT_BLOB_LITERAL)\n/*\n** Convert a BLOB literal of the form \"x'hhhhhh'\" into its binary\n** value.  Return a pointer to its binary value.  Space to hold the\n** binary value has been obtained from malloc and must be freed by\n** the calling routine.\n*/\nSQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){\n  char *zBlob;\n  int i;\n\n  zBlob = (char *)sqlite3DbMallocRawNN(db, n/2 + 1);\n  n--;\n  if( zBlob ){\n    for(i=0; i<n; i+=2){\n      zBlob[i/2] = (sqlite3HexToInt(z[i])<<4) | sqlite3HexToInt(z[i+1]);\n    }\n    zBlob[i/2] = 0;\n  }\n  return zBlob;\n}\n#endif /* !SQLITE_OMIT_BLOB_LITERAL */\n\n/*\n** Log an error that is an API call on a connection pointer that should\n** not have been used.  The \"type\" of connection pointer is given as the\n** argument.  The zType is a word like \"NULL\" or \"closed\" or \"invalid\".\n*/\nstatic void logBadConnection(const char *zType){\n  sqlite3_log(SQLITE_MISUSE,\n     \"API call with %s database connection pointer\",\n     zType\n  );\n}\n\n/*\n** Check to make sure we have a valid db pointer.  This test is not\n** foolproof but it does provide some measure of protection against\n** misuse of the interface such as passing in db pointers that are\n** NULL or which have been previously closed.  If this routine returns\n** 1 it means that the db pointer is valid and 0 if it should not be\n** dereferenced for any reason.  The calling function should invoke\n** SQLITE_MISUSE immediately.\n**\n** sqlite3SafetyCheckOk() requires that the db pointer be valid for\n** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to\n** open properly and is not fit for general use but which can be\n** used as an argument to sqlite3_errmsg() or sqlite3_close().\n*/\nSQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){\n  u8 eOpenState;\n  if( db==0 ){\n    logBadConnection(\"NULL\");\n    return 0;\n  }\n  eOpenState = db->eOpenState;\n  if( eOpenState!=SQLITE_STATE_OPEN ){\n    if( sqlite3SafetyCheckSickOrOk(db) ){\n      testcase( sqlite3GlobalConfig.xLog!=0 );\n      logBadConnection(\"unopened\");\n    }\n    return 0;\n  }else{\n    return 1;\n  }\n}\nSQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){\n  u8 eOpenState;\n  eOpenState = db->eOpenState;\n  if( eOpenState!=SQLITE_STATE_SICK &&\n      eOpenState!=SQLITE_STATE_OPEN &&\n      eOpenState!=SQLITE_STATE_BUSY ){\n    testcase( sqlite3GlobalConfig.xLog!=0 );\n    logBadConnection(\"invalid\");\n    return 0;\n  }else{\n    return 1;\n  }\n}\n\n/*\n** Attempt to add, subtract, or multiply the 64-bit signed value iB against\n** the other 64-bit signed integer at *pA and store the result in *pA.\n** Return 0 on success.  Or if the operation would have resulted in an\n** overflow, leave *pA unchanged and return 1.\n*/\nSQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){\n#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)\n  return __builtin_add_overflow(*pA, iB, pA);\n#else\n  i64 iA = *pA;\n  testcase( iA==0 ); testcase( iA==1 );\n  testcase( iB==-1 ); testcase( iB==0 );\n  if( iB>=0 ){\n    testcase( iA>0 && LARGEST_INT64 - iA == iB );\n    testcase( iA>0 && LARGEST_INT64 - iA == iB - 1 );\n    if( iA>0 && LARGEST_INT64 - iA < iB ) return 1;\n  }else{\n    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 1 );\n    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 2 );\n    if( iA<0 && -(iA + LARGEST_INT64) > iB + 1 ) return 1;\n  }\n  *pA += iB;\n  return 0;\n#endif\n}\nSQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){\n#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)\n  return __builtin_sub_overflow(*pA, iB, pA);\n#else\n  testcase( iB==SMALLEST_INT64+1 );\n  if( iB==SMALLEST_INT64 ){\n    testcase( (*pA)==(-1) ); testcase( (*pA)==0 );\n    if( (*pA)>=0 ) return 1;\n    *pA -= iB;\n    return 0;\n  }else{\n    return sqlite3AddInt64(pA, -iB);\n  }\n#endif\n}\nSQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){\n#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)\n  return __builtin_mul_overflow(*pA, iB, pA);\n#else\n  i64 iA = *pA;\n  if( iB>0 ){\n    if( iA>LARGEST_INT64/iB ) return 1;\n    if( iA<SMALLEST_INT64/iB ) return 1;\n  }else if( iB<0 ){\n    if( iA>0 ){\n      if( iB<SMALLEST_INT64/iA ) return 1;\n    }else if( iA<0 ){\n      if( iB==SMALLEST_INT64 ) return 1;\n      if( iA==SMALLEST_INT64 ) return 1;\n      if( -iA>LARGEST_INT64/-iB ) return 1;\n    }\n  }\n  *pA = iA*iB;\n  return 0;\n#endif\n}\n\n/*\n** Compute the absolute value of a 32-bit signed integer, if possible.  Or\n** if the integer has a value of -2147483648, return +2147483647\n*/\nSQLITE_PRIVATE int sqlite3AbsInt32(int x){\n  if( x>=0 ) return x;\n  if( x==(int)0x80000000 ) return 0x7fffffff;\n  return -x;\n}\n\n#ifdef SQLITE_ENABLE_8_3_NAMES\n/*\n** If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database\n** filename in zBaseFilename is a URI with the \"8_3_names=1\" parameter and\n** if filename in z[] has a suffix (a.k.a. \"extension\") that is longer than\n** three characters, then shorten the suffix on z[] to be the last three\n** characters of the original suffix.\n**\n** If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always\n** do the suffix shortening regardless of URI parameter.\n**\n** Examples:\n**\n**     test.db-journal    =>   test.nal\n**     test.db-wal        =>   test.wal\n**     test.db-shm        =>   test.shm\n**     test.db-mj7f3319fa =>   test.9fa\n*/\nSQLITE_PRIVATE void sqlite3FileSuffix3(const char *zBaseFilename, char *z){\n#if SQLITE_ENABLE_8_3_NAMES<2\n  if( sqlite3_uri_boolean(zBaseFilename, \"8_3_names\", 0) )\n#endif\n  {\n    int i, sz;\n    sz = sqlite3Strlen30(z);\n    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}\n    if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4);\n  }\n}\n#endif\n\n/*\n** Find (an approximate) sum of two LogEst values.  This computation is\n** not a simple \"+\" operator because LogEst is stored as a logarithmic\n** value.\n**\n*/\nSQLITE_PRIVATE LogEst sqlite3LogEstAdd(LogEst a, LogEst b){\n  static const unsigned char x[] = {\n     10, 10,                         /* 0,1 */\n      9, 9,                          /* 2,3 */\n      8, 8,                          /* 4,5 */\n      7, 7, 7,                       /* 6,7,8 */\n      6, 6, 6,                       /* 9,10,11 */\n      5, 5, 5,                       /* 12-14 */\n      4, 4, 4, 4,                    /* 15-18 */\n      3, 3, 3, 3, 3, 3,              /* 19-24 */\n      2, 2, 2, 2, 2, 2, 2,           /* 25-31 */\n  };\n  if( a>=b ){\n    if( a>b+49 ) return a;\n    if( a>b+31 ) return a+1;\n    return a+x[a-b];\n  }else{\n    if( b>a+49 ) return b;\n    if( b>a+31 ) return b+1;\n    return b+x[b-a];\n  }\n}\n\n/*\n** Convert an integer into a LogEst.  In other words, compute an\n** approximation for 10*log2(x).\n*/\nSQLITE_PRIVATE LogEst sqlite3LogEst(u64 x){\n  static LogEst a[] = { 0, 2, 3, 5, 6, 7, 8, 9 };\n  LogEst y = 40;\n  if( x<8 ){\n    if( x<2 ) return 0;\n    while( x<8 ){  y -= 10; x <<= 1; }\n  }else{\n#if GCC_VERSION>=5004000\n    int i = 60 - __builtin_clzll(x);\n    y += i*10;\n    x >>= i;\n#else\n    while( x>255 ){ y += 40; x >>= 4; }  /*OPTIMIZATION-IF-TRUE*/\n    while( x>15 ){  y += 10; x >>= 1; }\n#endif\n  }\n  return a[x&7] + y - 10;\n}\n\n/*\n** Convert a double into a LogEst\n** In other words, compute an approximation for 10*log2(x).\n*/\nSQLITE_PRIVATE LogEst sqlite3LogEstFromDouble(double x){\n  u64 a;\n  LogEst e;\n  assert( sizeof(x)==8 && sizeof(a)==8 );\n  if( x<=1 ) return 0;\n  if( x<=2000000000 ) return sqlite3LogEst((u64)x);\n  memcpy(&a, &x, 8);\n  e = (a>>52) - 1022;\n  return e*10;\n}\n\n/*\n** Convert a LogEst into an integer.\n*/\nSQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst x){\n  u64 n;\n  n = x%10;\n  x /= 10;\n  if( n>=5 ) n -= 2;\n  else if( n>=1 ) n -= 1;\n  if( x>60 ) return (u64)LARGEST_INT64;\n  return x>=3 ? (n+8)<<(x-3) : (n+8)>>(3-x);\n}\n\n/*\n** Add a new name/number pair to a VList.  This might require that the\n** VList object be reallocated, so return the new VList.  If an OOM\n** error occurs, the original VList returned and the\n** db->mallocFailed flag is set.\n**\n** A VList is really just an array of integers.  To destroy a VList,\n** simply pass it to sqlite3DbFree().\n**\n** The first integer is the number of integers allocated for the whole\n** VList.  The second integer is the number of integers actually used.\n** Each name/number pair is encoded by subsequent groups of 3 or more\n** integers.\n**\n** Each name/number pair starts with two integers which are the numeric\n** value for the pair and the size of the name/number pair, respectively.\n** The text name overlays one or more following integers.  The text name\n** is always zero-terminated.\n**\n** Conceptually:\n**\n**    struct VList {\n**      int nAlloc;   // Number of allocated slots\n**      int nUsed;    // Number of used slots\n**      struct VListEntry {\n**        int iValue;    // Value for this entry\n**        int nSlot;     // Slots used by this entry\n**        // ... variable name goes here\n**      } a[0];\n**    }\n**\n** During code generation, pointers to the variable names within the\n** VList are taken.  When that happens, nAlloc is set to zero as an\n** indication that the VList may never again be enlarged, since the\n** accompanying realloc() would invalidate the pointers.\n*/\nSQLITE_PRIVATE VList *sqlite3VListAdd(\n  sqlite3 *db,           /* The database connection used for malloc() */\n  VList *pIn,            /* The input VList.  Might be NULL */\n  const char *zName,     /* Name of symbol to add */\n  int nName,             /* Bytes of text in zName */\n  int iVal               /* Value to associate with zName */\n){\n  int nInt;              /* number of sizeof(int) objects needed for zName */\n  char *z;               /* Pointer to where zName will be stored */\n  int i;                 /* Index in pIn[] where zName is stored */\n\n  nInt = nName/4 + 3;\n  assert( pIn==0 || pIn[0]>=3 );  /* Verify ok to add new elements */\n  if( pIn==0 || pIn[1]+nInt > pIn[0] ){\n    /* Enlarge the allocation */\n    sqlite3_int64 nAlloc = (pIn ? 2*(sqlite3_int64)pIn[0] : 10) + nInt;\n    VList *pOut = sqlite3DbRealloc(db, pIn, nAlloc*sizeof(int));\n    if( pOut==0 ) return pIn;\n    if( pIn==0 ) pOut[1] = 2;\n    pIn = pOut;\n    pIn[0] = nAlloc;\n  }\n  i = pIn[1];\n  pIn[i] = iVal;\n  pIn[i+1] = nInt;\n  z = (char*)&pIn[i+2];\n  pIn[1] = i+nInt;\n  assert( pIn[1]<=pIn[0] );\n  memcpy(z, zName, nName);\n  z[nName] = 0;\n  return pIn;\n}\n\n/*\n** Return a pointer to the name of a variable in the given VList that\n** has the value iVal.  Or return a NULL if there is no such variable in\n** the list\n*/\nSQLITE_PRIVATE const char *sqlite3VListNumToName(VList *pIn, int iVal){\n  int i, mx;\n  if( pIn==0 ) return 0;\n  mx = pIn[1];\n  i = 2;\n  do{\n    if( pIn[i]==iVal ) return (char*)&pIn[i+2];\n    i += pIn[i+1];\n  }while( i<mx );\n  return 0;\n}\n\n/*\n** Return the number of the variable named zName, if it is in VList.\n** or return 0 if there is no such variable.\n*/\nSQLITE_PRIVATE int sqlite3VListNameToNum(VList *pIn, const char *zName, int nName){\n  int i, mx;\n  if( pIn==0 ) return 0;\n  mx = pIn[1];\n  i = 2;\n  do{\n    const char *z = (const char*)&pIn[i+2];\n    if( strncmp(z,zName,nName)==0 && z[nName]==0 ) return pIn[i];\n    i += pIn[i+1];\n  }while( i<mx );\n  return 0;\n}\n\n/************** End of util.c ************************************************/\n/************** Begin file hash.c ********************************************/\n/*\n** 2001 September 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the implementation of generic hash-tables\n** used in SQLite.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <assert.h> */\n\n/* Turn bulk memory into a hash table object by initializing the\n** fields of the Hash structure.\n**\n** \"pNew\" is a pointer to the hash table that is to be initialized.\n*/\nSQLITE_PRIVATE void sqlite3HashInit(Hash *pNew){\n  assert( pNew!=0 );\n  pNew->first = 0;\n  pNew->count = 0;\n  pNew->htsize = 0;\n  pNew->ht = 0;\n}\n\n/* Remove all entries from a hash table.  Reclaim all memory.\n** Call this routine to delete a hash table or to reset a hash table\n** to the empty state.\n*/\nSQLITE_PRIVATE void sqlite3HashClear(Hash *pH){\n  HashElem *elem;         /* For looping over all elements of the table */\n\n  assert( pH!=0 );\n  elem = pH->first;\n  pH->first = 0;\n  sqlite3_free(pH->ht);\n  pH->ht = 0;\n  pH->htsize = 0;\n  while( elem ){\n    HashElem *next_elem = elem->next;\n    sqlite3_free(elem);\n    elem = next_elem;\n  }\n  pH->count = 0;\n}\n\n/*\n** The hashing function.\n*/\nstatic unsigned int strHash(const char *z){\n  unsigned int h = 0;\n  while( z[0] ){     /*OPTIMIZATION-IF-TRUE*/\n    /* Knuth multiplicative hashing.  (Sorting & Searching, p. 510).\n    ** 0x9e3779b1 is 2654435761 which is the closest prime number to\n    ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2.\n    **\n    ** Only bits 0xdf for ASCII and bits 0xbf for EBCDIC each octet are\n    ** hashed since the omitted bits determine the upper/lower case difference.\n    */\n#ifdef SQLITE_EBCDIC\n    h += 0xbf & (unsigned char)*(z++);\n#else\n    h += 0xdf & (unsigned char)*(z++);\n#endif\n    h *= 0x9e3779b1;\n  }\n  return h;\n}\n\n\n/* Link pNew element into the hash table pH.  If pEntry!=0 then also\n** insert pNew into the pEntry hash bucket.\n*/\nstatic void insertElement(\n  Hash *pH,              /* The complete hash table */\n  struct _ht *pEntry,    /* The entry into which pNew is inserted */\n  HashElem *pNew         /* The element to be inserted */\n){\n  HashElem *pHead;       /* First element already in pEntry */\n  if( pEntry ){\n    pHead = pEntry->count ? pEntry->chain : 0;\n    pEntry->count++;\n    pEntry->chain = pNew;\n  }else{\n    pHead = 0;\n  }\n  if( pHead ){\n    pNew->next = pHead;\n    pNew->prev = pHead->prev;\n    if( pHead->prev ){ pHead->prev->next = pNew; }\n    else             { pH->first = pNew; }\n    pHead->prev = pNew;\n  }else{\n    pNew->next = pH->first;\n    if( pH->first ){ pH->first->prev = pNew; }\n    pNew->prev = 0;\n    pH->first = pNew;\n  }\n}\n\n\n/* Resize the hash table so that it contains \"new_size\" buckets.\n**\n** The hash table might fail to resize if sqlite3_malloc() fails or\n** if the new size is the same as the prior size.\n** Return TRUE if the resize occurs and false if not.\n*/\nstatic int rehash(Hash *pH, unsigned int new_size){\n  struct _ht *new_ht;            /* The new hash table */\n  HashElem *elem, *next_elem;    /* For looping over existing elements */\n\n#if SQLITE_MALLOC_SOFT_LIMIT>0\n  if( new_size*sizeof(struct _ht)>SQLITE_MALLOC_SOFT_LIMIT ){\n    new_size = SQLITE_MALLOC_SOFT_LIMIT/sizeof(struct _ht);\n  }\n  if( new_size==pH->htsize ) return 0;\n#endif\n\n  /* The inability to allocates space for a larger hash table is\n  ** a performance hit but it is not a fatal error.  So mark the\n  ** allocation as a benign. Use sqlite3Malloc()/memset(0) instead of\n  ** sqlite3MallocZero() to make the allocation, as sqlite3MallocZero()\n  ** only zeroes the requested number of bytes whereas this module will\n  ** use the actual amount of space allocated for the hash table (which\n  ** may be larger than the requested amount).\n  */\n  sqlite3BeginBenignMalloc();\n  new_ht = (struct _ht *)sqlite3Malloc( new_size*sizeof(struct _ht) );\n  sqlite3EndBenignMalloc();\n\n  if( new_ht==0 ) return 0;\n  sqlite3_free(pH->ht);\n  pH->ht = new_ht;\n  pH->htsize = new_size = sqlite3MallocSize(new_ht)/sizeof(struct _ht);\n  memset(new_ht, 0, new_size*sizeof(struct _ht));\n  for(elem=pH->first, pH->first=0; elem; elem = next_elem){\n    next_elem = elem->next;\n    insertElement(pH, &new_ht[elem->h % new_size], elem);\n  }\n  return 1;\n}\n\n/* This function (for internal use only) locates an element in an\n** hash table that matches the given key.  If no element is found,\n** a pointer to a static null element with HashElem.data==0 is returned.\n** If pH is not NULL, then the hash for this key is written to *pH.\n*/\nstatic HashElem *findElementWithHash(\n  const Hash *pH,     /* The pH to be searched */\n  const char *pKey,   /* The key we are searching for */\n  unsigned int *pHash /* Write the hash value here */\n){\n  HashElem *elem;                /* Used to loop thru the element list */\n  unsigned int count;            /* Number of elements left to test */\n  unsigned int h;                /* The computed hash */\n  static HashElem nullElement = { 0, 0, 0, 0, 0 };\n\n  h = strHash(pKey);\n  if( pH->ht ){   /*OPTIMIZATION-IF-TRUE*/\n    struct _ht *pEntry;\n    pEntry = &pH->ht[h % pH->htsize];\n    elem = pEntry->chain;\n    count = pEntry->count;\n  }else{\n    elem = pH->first;\n    count = pH->count;\n  }\n  if( pHash ) *pHash = h;\n  while( count ){\n    assert( elem!=0 );\n    if( h==elem->h && sqlite3StrICmp(elem->pKey,pKey)==0 ){\n      return elem;\n    }\n    elem = elem->next;\n    count--;\n  }\n  return &nullElement;\n}\n\n/* Remove a single entry from the hash table given a pointer to that\n** element and a hash on the element's key.\n*/\nstatic void removeElement(\n  Hash *pH,         /* The pH containing \"elem\" */\n  HashElem *elem    /* The element to be removed from the pH */\n){\n  struct _ht *pEntry;\n  if( elem->prev ){\n    elem->prev->next = elem->next;\n  }else{\n    pH->first = elem->next;\n  }\n  if( elem->next ){\n    elem->next->prev = elem->prev;\n  }\n  if( pH->ht ){\n    pEntry = &pH->ht[elem->h % pH->htsize];\n    if( pEntry->chain==elem ){\n      pEntry->chain = elem->next;\n    }\n    assert( pEntry->count>0 );\n    pEntry->count--;\n  }\n  sqlite3_free( elem );\n  pH->count--;\n  if( pH->count==0 ){\n    assert( pH->first==0 );\n    assert( pH->count==0 );\n    sqlite3HashClear(pH);\n  }\n}\n\n/* Attempt to locate an element of the hash table pH with a key\n** that matches pKey.  Return the data for this element if it is\n** found, or NULL if there is no match.\n*/\nSQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey){\n  assert( pH!=0 );\n  assert( pKey!=0 );\n  return findElementWithHash(pH, pKey, 0)->data;\n}\n\n/* Insert an element into the hash table pH.  The key is pKey\n** and the data is \"data\".\n**\n** If no element exists with a matching key, then a new\n** element is created and NULL is returned.\n**\n** If another element already exists with the same key, then the\n** new data replaces the old data and the old data is returned.\n** The key is not copied in this instance.  If a malloc fails, then\n** the new data is returned and the hash table is unchanged.\n**\n** If the \"data\" parameter to this function is NULL, then the\n** element corresponding to \"key\" is removed from the hash table.\n*/\nSQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){\n  unsigned int h;       /* the hash of the key modulo hash table size */\n  HashElem *elem;       /* Used to loop thru the element list */\n  HashElem *new_elem;   /* New element added to the pH */\n\n  assert( pH!=0 );\n  assert( pKey!=0 );\n  elem = findElementWithHash(pH,pKey,&h);\n  if( elem->data ){\n    void *old_data = elem->data;\n    if( data==0 ){\n      removeElement(pH,elem);\n    }else{\n      elem->data = data;\n      elem->pKey = pKey;\n    }\n    return old_data;\n  }\n  if( data==0 ) return 0;\n  new_elem = (HashElem*)sqlite3Malloc( sizeof(HashElem) );\n  if( new_elem==0 ) return data;\n  new_elem->pKey = pKey;\n  new_elem->h = h;\n  new_elem->data = data;\n  pH->count++;\n  if( pH->count>=5 && pH->count > 2*pH->htsize ){\n    rehash(pH, pH->count*3);\n  }\n  insertElement(pH, pH->ht ? &pH->ht[new_elem->h % pH->htsize] : 0, new_elem);\n  return 0;\n}\n\n\n/************** End of hash.c ************************************************/\n/************** Begin file opcodes.c *****************************************/\n/* Automatically generated.  Do not edit */\n/* See the tool/mkopcodec.tcl script for details. */\n#if !defined(SQLITE_OMIT_EXPLAIN) \\\n || defined(VDBE_PROFILE) \\\n || defined(SQLITE_DEBUG)\n#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)\n# define OpHelp(X) \"\\0\" X\n#else\n# define OpHelp(X)\n#endif\nSQLITE_PRIVATE const char *sqlite3OpcodeName(int i){\n static const char *const azName[] = {\n    /*   0 */ \"Savepoint\"        OpHelp(\"\"),\n    /*   1 */ \"AutoCommit\"       OpHelp(\"\"),\n    /*   2 */ \"Transaction\"      OpHelp(\"\"),\n    /*   3 */ \"Checkpoint\"       OpHelp(\"\"),\n    /*   4 */ \"JournalMode\"      OpHelp(\"\"),\n    /*   5 */ \"Vacuum\"           OpHelp(\"\"),\n    /*   6 */ \"VFilter\"          OpHelp(\"iplan=r[P3] zplan='P4'\"),\n    /*   7 */ \"VUpdate\"          OpHelp(\"data=r[P3@P2]\"),\n    /*   8 */ \"Init\"             OpHelp(\"Start at P2\"),\n    /*   9 */ \"Goto\"             OpHelp(\"\"),\n    /*  10 */ \"Gosub\"            OpHelp(\"\"),\n    /*  11 */ \"InitCoroutine\"    OpHelp(\"\"),\n    /*  12 */ \"Yield\"            OpHelp(\"\"),\n    /*  13 */ \"MustBeInt\"        OpHelp(\"\"),\n    /*  14 */ \"Jump\"             OpHelp(\"\"),\n    /*  15 */ \"Once\"             OpHelp(\"\"),\n    /*  16 */ \"If\"               OpHelp(\"\"),\n    /*  17 */ \"IfNot\"            OpHelp(\"\"),\n    /*  18 */ \"IsType\"           OpHelp(\"if typeof(P1.P3) in P5 goto P2\"),\n    /*  19 */ \"Not\"              OpHelp(\"r[P2]= !r[P1]\"),\n    /*  20 */ \"IfNullRow\"        OpHelp(\"if P1.nullRow then r[P3]=NULL, goto P2\"),\n    /*  21 */ \"SeekLT\"           OpHelp(\"key=r[P3@P4]\"),\n    /*  22 */ \"SeekLE\"           OpHelp(\"key=r[P3@P4]\"),\n    /*  23 */ \"SeekGE\"           OpHelp(\"key=r[P3@P4]\"),\n    /*  24 */ \"SeekGT\"           OpHelp(\"key=r[P3@P4]\"),\n    /*  25 */ \"IfNotOpen\"        OpHelp(\"if( !csr[P1] ) goto P2\"),\n    /*  26 */ \"IfNoHope\"         OpHelp(\"key=r[P3@P4]\"),\n    /*  27 */ \"NoConflict\"       OpHelp(\"key=r[P3@P4]\"),\n    /*  28 */ \"NotFound\"         OpHelp(\"key=r[P3@P4]\"),\n    /*  29 */ \"Found\"            OpHelp(\"key=r[P3@P4]\"),\n    /*  30 */ \"SeekRowid\"        OpHelp(\"intkey=r[P3]\"),\n    /*  31 */ \"NotExists\"        OpHelp(\"intkey=r[P3]\"),\n    /*  32 */ \"Last\"             OpHelp(\"\"),\n    /*  33 */ \"IfSizeBetween\"    OpHelp(\"\"),\n    /*  34 */ \"SorterSort\"       OpHelp(\"\"),\n    /*  35 */ \"Sort\"             OpHelp(\"\"),\n    /*  36 */ \"Rewind\"           OpHelp(\"\"),\n    /*  37 */ \"IfEmpty\"          OpHelp(\"if( empty(P1) ) goto P2\"),\n    /*  38 */ \"SorterNext\"       OpHelp(\"\"),\n    /*  39 */ \"Prev\"             OpHelp(\"\"),\n    /*  40 */ \"Next\"             OpHelp(\"\"),\n    /*  41 */ \"IdxLE\"            OpHelp(\"key=r[P3@P4]\"),\n    /*  42 */ \"IdxGT\"            OpHelp(\"key=r[P3@P4]\"),\n    /*  43 */ \"Or\"               OpHelp(\"r[P3]=(r[P1] || r[P2])\"),\n    /*  44 */ \"And\"              OpHelp(\"r[P3]=(r[P1] && r[P2])\"),\n    /*  45 */ \"IdxLT\"            OpHelp(\"key=r[P3@P4]\"),\n    /*  46 */ \"IdxGE\"            OpHelp(\"key=r[P3@P4]\"),\n    /*  47 */ \"RowSetRead\"       OpHelp(\"r[P3]=rowset(P1)\"),\n    /*  48 */ \"RowSetTest\"       OpHelp(\"if r[P3] in rowset(P1) goto P2\"),\n    /*  49 */ \"Program\"          OpHelp(\"\"),\n    /*  50 */ \"FkIfZero\"         OpHelp(\"if fkctr[P1]==0 goto P2\"),\n    /*  51 */ \"IsNull\"           OpHelp(\"if r[P1]==NULL goto P2\"),\n    /*  52 */ \"NotNull\"          OpHelp(\"if r[P1]!=NULL goto P2\"),\n    /*  53 */ \"Ne\"               OpHelp(\"IF r[P3]!=r[P1]\"),\n    /*  54 */ \"Eq\"               OpHelp(\"IF r[P3]==r[P1]\"),\n    /*  55 */ \"Gt\"               OpHelp(\"IF r[P3]>r[P1]\"),\n    /*  56 */ \"Le\"               OpHelp(\"IF r[P3]<=r[P1]\"),\n    /*  57 */ \"Lt\"               OpHelp(\"IF r[P3]<r[P1]\"),\n    /*  58 */ \"Ge\"               OpHelp(\"IF r[P3]>=r[P1]\"),\n    /*  59 */ \"ElseEq\"           OpHelp(\"\"),\n    /*  60 */ \"IfPos\"            OpHelp(\"if r[P1]>0 then r[P1]-=P3, goto P2\"),\n    /*  61 */ \"IfNotZero\"        OpHelp(\"if r[P1]!=0 then r[P1]--, goto P2\"),\n    /*  62 */ \"DecrJumpZero\"     OpHelp(\"if (--r[P1])==0 goto P2\"),\n    /*  63 */ \"IncrVacuum\"       OpHelp(\"\"),\n    /*  64 */ \"VNext\"            OpHelp(\"\"),\n    /*  65 */ \"Filter\"           OpHelp(\"if key(P3@P4) not in filter(P1) goto P2\"),\n    /*  66 */ \"PureFunc\"         OpHelp(\"r[P3]=func(r[P2@NP])\"),\n    /*  67 */ \"Function\"         OpHelp(\"r[P3]=func(r[P2@NP])\"),\n    /*  68 */ \"Return\"           OpHelp(\"\"),\n    /*  69 */ \"EndCoroutine\"     OpHelp(\"\"),\n    /*  70 */ \"HaltIfNull\"       OpHelp(\"if r[P3]=null halt\"),\n    /*  71 */ \"Halt\"             OpHelp(\"\"),\n    /*  72 */ \"Integer\"          OpHelp(\"r[P2]=P1\"),\n    /*  73 */ \"Int64\"            OpHelp(\"r[P2]=P4\"),\n    /*  74 */ \"String\"           OpHelp(\"r[P2]='P4' (len=P1)\"),\n    /*  75 */ \"BeginSubrtn\"      OpHelp(\"r[P2]=NULL\"),\n    /*  76 */ \"Null\"             OpHelp(\"r[P2..P3]=NULL\"),\n    /*  77 */ \"SoftNull\"         OpHelp(\"r[P1]=NULL\"),\n    /*  78 */ \"Blob\"             OpHelp(\"r[P2]=P4 (len=P1)\"),\n    /*  79 */ \"Variable\"         OpHelp(\"r[P2]=parameter(P1)\"),\n    /*  80 */ \"Move\"             OpHelp(\"r[P2@P3]=r[P1@P3]\"),\n    /*  81 */ \"Copy\"             OpHelp(\"r[P2@P3+1]=r[P1@P3+1]\"),\n    /*  82 */ \"SCopy\"            OpHelp(\"r[P2]=r[P1]\"),\n    /*  83 */ \"IntCopy\"          OpHelp(\"r[P2]=r[P1]\"),\n    /*  84 */ \"FkCheck\"          OpHelp(\"\"),\n    /*  85 */ \"ResultRow\"        OpHelp(\"output=r[P1@P2]\"),\n    /*  86 */ \"CollSeq\"          OpHelp(\"\"),\n    /*  87 */ \"AddImm\"           OpHelp(\"r[P1]=r[P1]+P2\"),\n    /*  88 */ \"RealAffinity\"     OpHelp(\"\"),\n    /*  89 */ \"Cast\"             OpHelp(\"affinity(r[P1])\"),\n    /*  90 */ \"Permutation\"      OpHelp(\"\"),\n    /*  91 */ \"Compare\"          OpHelp(\"r[P1@P3] <-> r[P2@P3]\"),\n    /*  92 */ \"IsTrue\"           OpHelp(\"r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4\"),\n    /*  93 */ \"ZeroOrNull\"       OpHelp(\"r[P2] = 0 OR NULL\"),\n    /*  94 */ \"Offset\"           OpHelp(\"r[P3] = sqlite_offset(P1)\"),\n    /*  95 */ \"Column\"           OpHelp(\"r[P3]=PX cursor P1 column P2\"),\n    /*  96 */ \"TypeCheck\"        OpHelp(\"typecheck(r[P1@P2])\"),\n    /*  97 */ \"Affinity\"         OpHelp(\"affinity(r[P1@P2])\"),\n    /*  98 */ \"MakeRecord\"       OpHelp(\"r[P3]=mkrec(r[P1@P2])\"),\n    /*  99 */ \"Count\"            OpHelp(\"r[P2]=count()\"),\n    /* 100 */ \"ReadCookie\"       OpHelp(\"\"),\n    /* 101 */ \"SetCookie\"        OpHelp(\"\"),\n    /* 102 */ \"ReopenIdx\"        OpHelp(\"root=P2 iDb=P3\"),\n    /* 103 */ \"BitAnd\"           OpHelp(\"r[P3]=r[P1]&r[P2]\"),\n    /* 104 */ \"BitOr\"            OpHelp(\"r[P3]=r[P1]|r[P2]\"),\n    /* 105 */ \"ShiftLeft\"        OpHelp(\"r[P3]=r[P2]<<r[P1]\"),\n    /* 106 */ \"ShiftRight\"       OpHelp(\"r[P3]=r[P2]>>r[P1]\"),\n    /* 107 */ \"Add\"              OpHelp(\"r[P3]=r[P1]+r[P2]\"),\n    /* 108 */ \"Subtract\"         OpHelp(\"r[P3]=r[P2]-r[P1]\"),\n    /* 109 */ \"Multiply\"         OpHelp(\"r[P3]=r[P1]*r[P2]\"),\n    /* 110 */ \"Divide\"           OpHelp(\"r[P3]=r[P2]/r[P1]\"),\n    /* 111 */ \"Remainder\"        OpHelp(\"r[P3]=r[P2]%r[P1]\"),\n    /* 112 */ \"Concat\"           OpHelp(\"r[P3]=r[P2]+r[P1]\"),\n    /* 113 */ \"OpenRead\"         OpHelp(\"root=P2 iDb=P3\"),\n    /* 114 */ \"OpenWrite\"        OpHelp(\"root=P2 iDb=P3\"),\n    /* 115 */ \"BitNot\"           OpHelp(\"r[P2]= ~r[P1]\"),\n    /* 116 */ \"OpenDup\"          OpHelp(\"\"),\n    /* 117 */ \"OpenAutoindex\"    OpHelp(\"nColumn=P2\"),\n    /* 118 */ \"String8\"          OpHelp(\"r[P2]='P4'\"),\n    /* 119 */ \"OpenEphemeral\"    OpHelp(\"nColumn=P2\"),\n    /* 120 */ \"SorterOpen\"       OpHelp(\"\"),\n    /* 121 */ \"SequenceTest\"     OpHelp(\"if( cursor[P1].ctr++ ) pc = P2\"),\n    /* 122 */ \"OpenPseudo\"       OpHelp(\"P3 columns in r[P2]\"),\n    /* 123 */ \"Close\"            OpHelp(\"\"),\n    /* 124 */ \"ColumnsUsed\"      OpHelp(\"\"),\n    /* 125 */ \"SeekScan\"         OpHelp(\"Scan-ahead up to P1 rows\"),\n    /* 126 */ \"SeekHit\"          OpHelp(\"set P2<=seekHit<=P3\"),\n    /* 127 */ \"Sequence\"         OpHelp(\"r[P2]=cursor[P1].ctr++\"),\n    /* 128 */ \"NewRowid\"         OpHelp(\"r[P2]=rowid\"),\n    /* 129 */ \"Insert\"           OpHelp(\"intkey=r[P3] data=r[P2]\"),\n    /* 130 */ \"RowCell\"          OpHelp(\"\"),\n    /* 131 */ \"Delete\"           OpHelp(\"\"),\n    /* 132 */ \"ResetCount\"       OpHelp(\"\"),\n    /* 133 */ \"SorterCompare\"    OpHelp(\"if key(P1)!=trim(r[P3],P4) goto P2\"),\n    /* 134 */ \"SorterData\"       OpHelp(\"r[P2]=data\"),\n    /* 135 */ \"RowData\"          OpHelp(\"r[P2]=data\"),\n    /* 136 */ \"Rowid\"            OpHelp(\"r[P2]=PX rowid of P1\"),\n    /* 137 */ \"NullRow\"          OpHelp(\"\"),\n    /* 138 */ \"SeekEnd\"          OpHelp(\"\"),\n    /* 139 */ \"IdxInsert\"        OpHelp(\"key=r[P2]\"),\n    /* 140 */ \"SorterInsert\"     OpHelp(\"key=r[P2]\"),\n    /* 141 */ \"IdxDelete\"        OpHelp(\"key=r[P2@P3]\"),\n    /* 142 */ \"DeferredSeek\"     OpHelp(\"Move P3 to P1.rowid if needed\"),\n    /* 143 */ \"IdxRowid\"         OpHelp(\"r[P2]=rowid\"),\n    /* 144 */ \"FinishSeek\"       OpHelp(\"\"),\n    /* 145 */ \"Destroy\"          OpHelp(\"\"),\n    /* 146 */ \"Clear\"            OpHelp(\"\"),\n    /* 147 */ \"ResetSorter\"      OpHelp(\"\"),\n    /* 148 */ \"CreateBtree\"      OpHelp(\"r[P2]=root iDb=P1 flags=P3\"),\n    /* 149 */ \"SqlExec\"          OpHelp(\"\"),\n    /* 150 */ \"ParseSchema\"      OpHelp(\"\"),\n    /* 151 */ \"LoadAnalysis\"     OpHelp(\"\"),\n    /* 152 */ \"DropTable\"        OpHelp(\"\"),\n    /* 153 */ \"DropIndex\"        OpHelp(\"\"),\n    /* 154 */ \"Real\"             OpHelp(\"r[P2]=P4\"),\n    /* 155 */ \"DropTrigger\"      OpHelp(\"\"),\n    /* 156 */ \"IntegrityCk\"      OpHelp(\"\"),\n    /* 157 */ \"RowSetAdd\"        OpHelp(\"rowset(P1)=r[P2]\"),\n    /* 158 */ \"Param\"            OpHelp(\"\"),\n    /* 159 */ \"FkCounter\"        OpHelp(\"fkctr[P1]+=P2\"),\n    /* 160 */ \"MemMax\"           OpHelp(\"r[P1]=max(r[P1],r[P2])\"),\n    /* 161 */ \"OffsetLimit\"      OpHelp(\"if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)\"),\n    /* 162 */ \"AggInverse\"       OpHelp(\"accum=r[P3] inverse(r[P2@P5])\"),\n    /* 163 */ \"AggStep\"          OpHelp(\"accum=r[P3] step(r[P2@P5])\"),\n    /* 164 */ \"AggStep1\"         OpHelp(\"accum=r[P3] step(r[P2@P5])\"),\n    /* 165 */ \"AggValue\"         OpHelp(\"r[P3]=value N=P2\"),\n    /* 166 */ \"AggFinal\"         OpHelp(\"accum=r[P1] N=P2\"),\n    /* 167 */ \"Expire\"           OpHelp(\"\"),\n    /* 168 */ \"CursorLock\"       OpHelp(\"\"),\n    /* 169 */ \"CursorUnlock\"     OpHelp(\"\"),\n    /* 170 */ \"TableLock\"        OpHelp(\"iDb=P1 root=P2 write=P3\"),\n    /* 171 */ \"VBegin\"           OpHelp(\"\"),\n    /* 172 */ \"VCreate\"          OpHelp(\"\"),\n    /* 173 */ \"VDestroy\"         OpHelp(\"\"),\n    /* 174 */ \"VOpen\"            OpHelp(\"\"),\n    /* 175 */ \"VCheck\"           OpHelp(\"\"),\n    /* 176 */ \"VInitIn\"          OpHelp(\"r[P2]=ValueList(P1,P3)\"),\n    /* 177 */ \"VColumn\"          OpHelp(\"r[P3]=vcolumn(P2)\"),\n    /* 178 */ \"VRename\"          OpHelp(\"\"),\n    /* 179 */ \"Pagecount\"        OpHelp(\"\"),\n    /* 180 */ \"MaxPgcnt\"         OpHelp(\"\"),\n    /* 181 */ \"ClrSubtype\"       OpHelp(\"r[P1].subtype = 0\"),\n    /* 182 */ \"GetSubtype\"       OpHelp(\"r[P2] = r[P1].subtype\"),\n    /* 183 */ \"SetSubtype\"       OpHelp(\"r[P2].subtype = r[P1]\"),\n    /* 184 */ \"FilterAdd\"        OpHelp(\"filter(P1) += key(P3@P4)\"),\n    /* 185 */ \"Trace\"            OpHelp(\"\"),\n    /* 186 */ \"CursorHint\"       OpHelp(\"\"),\n    /* 187 */ \"ReleaseReg\"       OpHelp(\"release r[P1@P2] mask P3\"),\n    /* 188 */ \"Noop\"             OpHelp(\"\"),\n    /* 189 */ \"Explain\"          OpHelp(\"\"),\n    /* 190 */ \"Abortable\"        OpHelp(\"\"),\n  };\n  return azName[i];\n}\n#endif\n\n/************** End of opcodes.c *********************************************/\n/************** Begin file os_kv.c *******************************************/\n/*\n** 2022-09-06\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains an experimental VFS layer that operates on a\n** Key/Value storage engine where both keys and values must be pure\n** text.\n*/\n/* #include <sqliteInt.h> */\n#if SQLITE_OS_KV || (SQLITE_OS_UNIX && defined(SQLITE_OS_KV_OPTIONAL))\n\n/*****************************************************************************\n** Debugging logic\n*/\n\n/* SQLITE_KV_TRACE() is used for tracing calls to kvstorage routines. */\n#if 0\n#define SQLITE_KV_TRACE(X)  printf X\n#else\n#define SQLITE_KV_TRACE(X)\n#endif\n\n/* SQLITE_KV_LOG() is used for tracing calls to the VFS interface */\n#if 0\n#define SQLITE_KV_LOG(X)  printf X\n#else\n#define SQLITE_KV_LOG(X)\n#endif\n\n\n/*\n** Forward declaration of objects used by this VFS implementation\n*/\ntypedef struct KVVfsFile KVVfsFile;\n\n/* A single open file.  There are only two files represented by this\n** VFS - the database and the rollback journal.\n*/\nstruct KVVfsFile {\n  sqlite3_file base;              /* IO methods */\n  const char *zClass;             /* Storage class */\n  int isJournal;                  /* True if this is a journal file */\n  unsigned int nJrnl;             /* Space allocated for aJrnl[] */\n  char *aJrnl;                    /* Journal content */\n  int szPage;                     /* Last known page size */\n  sqlite3_int64 szDb;             /* Database file size.  -1 means unknown */\n  char *aData;                    /* Buffer to hold page data */\n};\n#define SQLITE_KVOS_SZ 133073\n\n/*\n** Methods for KVVfsFile\n*/\nstatic int kvvfsClose(sqlite3_file*);\nstatic int kvvfsReadDb(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\nstatic int kvvfsReadJrnl(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\nstatic int kvvfsWriteDb(sqlite3_file*,const void*,int iAmt, sqlite3_int64);\nstatic int kvvfsWriteJrnl(sqlite3_file*,const void*,int iAmt, sqlite3_int64);\nstatic int kvvfsTruncateDb(sqlite3_file*, sqlite3_int64 size);\nstatic int kvvfsTruncateJrnl(sqlite3_file*, sqlite3_int64 size);\nstatic int kvvfsSyncDb(sqlite3_file*, int flags);\nstatic int kvvfsSyncJrnl(sqlite3_file*, int flags);\nstatic int kvvfsFileSizeDb(sqlite3_file*, sqlite3_int64 *pSize);\nstatic int kvvfsFileSizeJrnl(sqlite3_file*, sqlite3_int64 *pSize);\nstatic int kvvfsLock(sqlite3_file*, int);\nstatic int kvvfsUnlock(sqlite3_file*, int);\nstatic int kvvfsCheckReservedLock(sqlite3_file*, int *pResOut);\nstatic int kvvfsFileControlDb(sqlite3_file*, int op, void *pArg);\nstatic int kvvfsFileControlJrnl(sqlite3_file*, int op, void *pArg);\nstatic int kvvfsSectorSize(sqlite3_file*);\nstatic int kvvfsDeviceCharacteristics(sqlite3_file*);\n\n/*\n** Methods for sqlite3_vfs\n*/\nstatic int kvvfsOpen(sqlite3_vfs*, const char *, sqlite3_file*, int , int *);\nstatic int kvvfsDelete(sqlite3_vfs*, const char *zName, int syncDir);\nstatic int kvvfsAccess(sqlite3_vfs*, const char *zName, int flags, int *);\nstatic int kvvfsFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);\nstatic void *kvvfsDlOpen(sqlite3_vfs*, const char *zFilename);\nstatic int kvvfsRandomness(sqlite3_vfs*, int nByte, char *zOut);\nstatic int kvvfsSleep(sqlite3_vfs*, int microseconds);\nstatic int kvvfsCurrentTime(sqlite3_vfs*, double*);\nstatic int kvvfsCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*);\n\nstatic sqlite3_vfs sqlite3OsKvvfsObject = {\n  1,                              /* iVersion */\n  sizeof(KVVfsFile),              /* szOsFile */\n  1024,                           /* mxPathname */\n  0,                              /* pNext */\n  \"kvvfs\",                        /* zName */\n  0,                              /* pAppData */\n  kvvfsOpen,                      /* xOpen */\n  kvvfsDelete,                    /* xDelete */\n  kvvfsAccess,                    /* xAccess */\n  kvvfsFullPathname,              /* xFullPathname */\n  kvvfsDlOpen,                    /* xDlOpen */\n  0,                              /* xDlError */\n  0,                              /* xDlSym */\n  0,                              /* xDlClose */\n  kvvfsRandomness,                /* xRandomness */\n  kvvfsSleep,                     /* xSleep */\n  kvvfsCurrentTime,               /* xCurrentTime */\n  0,                              /* xGetLastError */\n  kvvfsCurrentTimeInt64           /* xCurrentTimeInt64 */\n};\n\n/* Methods for sqlite3_file objects referencing a database file\n*/\nstatic sqlite3_io_methods kvvfs_db_io_methods = {\n  1,                              /* iVersion */\n  kvvfsClose,                     /* xClose */\n  kvvfsReadDb,                    /* xRead */\n  kvvfsWriteDb,                   /* xWrite */\n  kvvfsTruncateDb,                /* xTruncate */\n  kvvfsSyncDb,                    /* xSync */\n  kvvfsFileSizeDb,                /* xFileSize */\n  kvvfsLock,                      /* xLock */\n  kvvfsUnlock,                    /* xUnlock */\n  kvvfsCheckReservedLock,         /* xCheckReservedLock */\n  kvvfsFileControlDb,             /* xFileControl */\n  kvvfsSectorSize,                /* xSectorSize */\n  kvvfsDeviceCharacteristics,     /* xDeviceCharacteristics */\n  0,                              /* xShmMap */\n  0,                              /* xShmLock */\n  0,                              /* xShmBarrier */\n  0,                              /* xShmUnmap */\n  0,                              /* xFetch */\n  0                               /* xUnfetch */\n};\n\n/* Methods for sqlite3_file objects referencing a rollback journal\n*/\nstatic sqlite3_io_methods kvvfs_jrnl_io_methods = {\n  1,                              /* iVersion */\n  kvvfsClose,                     /* xClose */\n  kvvfsReadJrnl,                  /* xRead */\n  kvvfsWriteJrnl,                 /* xWrite */\n  kvvfsTruncateJrnl,              /* xTruncate */\n  kvvfsSyncJrnl,                  /* xSync */\n  kvvfsFileSizeJrnl,              /* xFileSize */\n  kvvfsLock,                      /* xLock */\n  kvvfsUnlock,                    /* xUnlock */\n  kvvfsCheckReservedLock,         /* xCheckReservedLock */\n  kvvfsFileControlJrnl,           /* xFileControl */\n  kvvfsSectorSize,                /* xSectorSize */\n  kvvfsDeviceCharacteristics,     /* xDeviceCharacteristics */\n  0,                              /* xShmMap */\n  0,                              /* xShmLock */\n  0,                              /* xShmBarrier */\n  0,                              /* xShmUnmap */\n  0,                              /* xFetch */\n  0                               /* xUnfetch */\n};\n\n/****** Storage subsystem **************************************************/\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n/* Forward declarations for the low-level storage engine\n*/\nstatic int kvstorageWrite(const char*, const char *zKey, const char *zData);\nstatic int kvstorageDelete(const char*, const char *zKey);\nstatic int kvstorageRead(const char*, const char *zKey, char *zBuf, int nBuf);\n#define KVSTORAGE_KEY_SZ  32\n\n/* Expand the key name with an appropriate prefix and put the result\n** in zKeyOut[].  The zKeyOut[] buffer is assumed to hold at least\n** KVSTORAGE_KEY_SZ bytes.\n*/\nstatic void kvstorageMakeKey(\n  const char *zClass,\n  const char *zKeyIn,\n  char *zKeyOut\n){\n  sqlite3_snprintf(KVSTORAGE_KEY_SZ, zKeyOut, \"kvvfs-%s-%s\", zClass, zKeyIn);\n}\n\n/* Write content into a key.  zClass is the particular namespace of the\n** underlying key/value store to use - either \"local\" or \"session\".\n**\n** Both zKey and zData are zero-terminated pure text strings.\n**\n** Return the number of errors.\n*/\nstatic int kvstorageWrite(\n  const char *zClass,\n  const char *zKey,\n  const char *zData\n){\n  FILE *fd;\n  char zXKey[KVSTORAGE_KEY_SZ];\n  kvstorageMakeKey(zClass, zKey, zXKey);\n  fd = fopen(zXKey, \"wb\");\n  if( fd ){\n    SQLITE_KV_TRACE((\"KVVFS-WRITE  %-15s (%d) %.50s%s\\n\", zXKey,\n                 (int)strlen(zData), zData,\n                 strlen(zData)>50 ? \"...\" : \"\"));\n    fputs(zData, fd);\n    fclose(fd);\n    return 0;\n  }else{\n    return 1;\n  }\n}\n\n/* Delete a key (with its corresponding data) from the key/value\n** namespace given by zClass.  If the key does not previously exist,\n** this routine is a no-op.\n*/\nstatic int kvstorageDelete(const char *zClass, const char *zKey){\n  char zXKey[KVSTORAGE_KEY_SZ];\n  kvstorageMakeKey(zClass, zKey, zXKey);\n  unlink(zXKey);\n  SQLITE_KV_TRACE((\"KVVFS-DELETE %-15s\\n\", zXKey));\n  return 0;\n}\n\n/* Read the value associated with a zKey from the key/value namespace given\n** by zClass and put the text data associated with that key in the first\n** nBuf bytes of zBuf[].  The value might be truncated if zBuf is not large\n** enough to hold it all.  The value put into zBuf must always be zero\n** terminated, even if it gets truncated because nBuf is not large enough.\n**\n** Return the total number of bytes in the data, without truncation, and\n** not counting the final zero terminator.   Return -1 if the key does\n** not exist or its key cannot be read.\n**\n** If nBuf<=0 then this routine simply returns the size of the data\n** without actually reading it.  Similarly, if nBuf==1 then it\n** zero-terminates zBuf at zBuf[0] and returns the size of the data\n** without reading it.\n*/\nstatic int kvstorageRead(\n  const char *zClass,\n  const char *zKey,\n  char *zBuf,\n  int nBuf\n){\n  FILE *fd;\n  struct stat buf;\n  char zXKey[KVSTORAGE_KEY_SZ];\n  kvstorageMakeKey(zClass, zKey, zXKey);\n  if( access(zXKey, R_OK)!=0\n   || stat(zXKey, &buf)!=0\n   || !S_ISREG(buf.st_mode)\n  ){\n    SQLITE_KV_TRACE((\"KVVFS-READ   %-15s (-1)\\n\", zXKey));\n    return -1;\n  }\n  if( nBuf<=0 ){\n    return (int)buf.st_size;\n  }else if( nBuf==1 ){\n    zBuf[0] = 0;\n    SQLITE_KV_TRACE((\"KVVFS-READ   %-15s (%d)\\n\", zXKey,\n                 (int)buf.st_size));\n    return (int)buf.st_size;\n  }\n  if( nBuf > buf.st_size + 1 ){\n    nBuf = buf.st_size + 1;\n  }\n  fd = fopen(zXKey, \"rb\");\n  if( fd==0 ){\n    SQLITE_KV_TRACE((\"KVVFS-READ   %-15s (-1)\\n\", zXKey));\n    return -1;\n  }else{\n    sqlite3_int64 n = fread(zBuf, 1, nBuf-1, fd);\n    fclose(fd);\n    zBuf[n] = 0;\n    SQLITE_KV_TRACE((\"KVVFS-READ   %-15s (%lld) %.50s%s\\n\", zXKey,\n                 n, zBuf, n>50 ? \"...\" : \"\"));\n    return (int)n;\n  }\n}\n\n/*\n** An internal level of indirection which enables us to replace the\n** kvvfs i/o methods with JavaScript implementations in WASM builds.\n** Maintenance reminder: if this struct changes in any way, the JSON\n** rendering of its structure must be updated in\n** sqlite3-wasm.c:sqlite3__wasm_enum_json(). There are no binary\n** compatibility concerns, so it does not need an iVersion\n** member.\n*/\ntypedef struct sqlite3_kvvfs_methods sqlite3_kvvfs_methods;\nstruct sqlite3_kvvfs_methods {\n  int (*xRead)(const char *zClass, const char *zKey, char *zBuf, int nBuf);\n  int (*xWrite)(const char *zClass, const char *zKey, const char *zData);\n  int (*xDelete)(const char *zClass, const char *zKey);\n  const int nKeySize;\n};\n\n/*\n** This object holds the kvvfs I/O methods which may be swapped out\n** for JavaScript-side implementations in WASM builds. In such builds\n** it cannot be const, but in native builds it should be so that\n** the compiler can hopefully optimize this level of indirection out.\n** That said, kvvfs is intended primarily for use in WASM builds.\n**\n** This is not explicitly flagged as static because the amalgamation\n** build will tag it with SQLITE_PRIVATE.\n*/\n#ifndef SQLITE_WASM\nconst\n#endif\nSQLITE_PRIVATE sqlite3_kvvfs_methods sqlite3KvvfsMethods = {\nkvstorageRead,\nkvstorageWrite,\nkvstorageDelete,\nKVSTORAGE_KEY_SZ\n};\n\n/****** Utility subroutines ************************************************/\n\n/*\n** Encode binary into the text encoded used to persist on disk.\n** The output text is stored in aOut[], which must be at least\n** nData+1 bytes in length.\n**\n** Return the actual length of the encoded text, not counting the\n** zero terminator at the end.\n**\n** Encoding format\n** ---------------\n**\n**   *  Non-zero bytes are encoded as upper-case hexadecimal\n**\n**   *  A sequence of one or more zero-bytes that are not at the\n**      beginning of the buffer are encoded as a little-endian\n**      base-26 number using a..z.  \"a\" means 0.  \"b\" means 1,\n**      \"z\" means 25.  \"ab\" means 26.  \"ac\" means 52.  And so forth.\n**\n**   *  Because there is no overlap between the encoding characters\n**      of hexadecimal and base-26 numbers, it is always clear where\n**      one stops and the next begins.\n*/\nstatic int kvvfsEncode(const char *aData, int nData, char *aOut){\n  int i, j;\n  const unsigned char *a = (const unsigned char*)aData;\n  for(i=j=0; i<nData; i++){\n    unsigned char c = a[i];\n    if( c!=0 ){\n      aOut[j++] = \"0123456789ABCDEF\"[c>>4];\n      aOut[j++] = \"0123456789ABCDEF\"[c&0xf];\n    }else{\n      /* A sequence of 1 or more zeros is stored as a little-endian\n      ** base-26 number using a..z as the digits. So one zero is \"b\".\n      ** Two zeros is \"c\". 25 zeros is \"z\", 26 zeros is \"ab\", 27 is \"bb\",\n      ** and so forth.\n      */\n      int k;\n      for(k=1; i+k<nData && a[i+k]==0; k++){}\n      i += k-1;\n      while( k>0 ){\n        aOut[j++] = 'a'+(k%26);\n        k /= 26;\n      }\n    }\n  }\n  aOut[j] = 0;\n  return j;\n}\n\nstatic const signed char kvvfsHexValue[256] = {\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n   0,  1,  2,  3,  4,  5,  6,  7,    8,  9, -1, -1, -1, -1, -1, -1,\n  -1, 10, 11, 12, 13, 14, 15, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n  -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1\n};\n\n/*\n** Decode the text encoding back to binary.  The binary content is\n** written into pOut, which must be at least nOut bytes in length.\n**\n** The return value is the number of bytes actually written into aOut[].\n*/\nstatic int kvvfsDecode(const char *a, char *aOut, int nOut){\n  int i, j;\n  int c;\n  const unsigned char *aIn = (const unsigned char*)a;\n  i = 0;\n  j = 0;\n  while( 1 ){\n    c = kvvfsHexValue[aIn[i]];\n    if( c<0 ){\n      int n = 0;\n      int mult = 1;\n      c = aIn[i];\n      if( c==0 ) break;\n      while( c>='a' && c<='z' ){\n        n += (c - 'a')*mult;\n        mult *= 26;\n        c = aIn[++i];\n      }\n      if( j+n>nOut ) return -1;\n      memset(&aOut[j], 0, n);\n      j += n;\n      if( c==0 || mult==1 ) break; /* progress stalled if mult==1 */\n    }else{\n      aOut[j] = c<<4;\n      c = kvvfsHexValue[aIn[++i]];\n      if( c<0 ) break;\n      aOut[j++] += c;\n      i++;\n    }\n  }\n  return j;\n}\n\n/*\n** Decode a complete journal file.  Allocate space in pFile->aJrnl\n** and store the decoding there.  Or leave pFile->aJrnl set to NULL\n** if an error is encountered.\n**\n** The first few characters of the text encoding will be a little-endian\n** base-26 number (digits a..z) that is the total number of bytes\n** in the decoded journal file image.  This base-26 number is followed\n** by a single space, then the encoding of the journal.  The space\n** separator is required to act as a terminator for the base-26 number.\n*/\nstatic void kvvfsDecodeJournal(\n  KVVfsFile *pFile,      /* Store decoding in pFile->aJrnl */\n  const char *zTxt,      /* Text encoding.  Zero-terminated */\n  int nTxt               /* Bytes in zTxt, excluding zero terminator */\n){\n  unsigned int n = 0;\n  int c, i, mult;\n  i = 0;\n  mult = 1;\n  while( (c = zTxt[i++])>='a' && c<='z' ){\n    n += (zTxt[i] - 'a')*mult;\n    mult *= 26;\n  }\n  sqlite3_free(pFile->aJrnl);\n  pFile->aJrnl = sqlite3_malloc64( n );\n  if( pFile->aJrnl==0 ){\n    pFile->nJrnl = 0;\n    return;\n  }\n  pFile->nJrnl = n;\n  n = kvvfsDecode(zTxt+i, pFile->aJrnl, pFile->nJrnl);\n  if( n<pFile->nJrnl ){\n    sqlite3_free(pFile->aJrnl);\n    pFile->aJrnl = 0;\n    pFile->nJrnl = 0;\n  }\n}\n\n/*\n** Read or write the \"sz\" element, containing the database file size.\n*/\nstatic sqlite3_int64 kvvfsReadFileSize(KVVfsFile *pFile){\n  char zData[50];\n  zData[0] = 0;\n  sqlite3KvvfsMethods.xRead(pFile->zClass, \"sz\", zData, sizeof(zData)-1);\n  return strtoll(zData, 0, 0);\n}\nstatic int kvvfsWriteFileSize(KVVfsFile *pFile, sqlite3_int64 sz){\n  char zData[50];\n  sqlite3_snprintf(sizeof(zData), zData, \"%lld\", sz);\n  return sqlite3KvvfsMethods.xWrite(pFile->zClass, \"sz\", zData);\n}\n\n/****** sqlite3_io_methods methods ******************************************/\n\n/*\n** Close an kvvfs-file.\n*/\nstatic int kvvfsClose(sqlite3_file *pProtoFile){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n\n  SQLITE_KV_LOG((\"xClose %s %s\\n\", pFile->zClass,\n             pFile->isJournal ? \"journal\" : \"db\"));\n  sqlite3_free(pFile->aJrnl);\n  sqlite3_free(pFile->aData);\n  return SQLITE_OK;\n}\n\n/*\n** Read from the -journal file.\n*/\nstatic int kvvfsReadJrnl(\n  sqlite3_file *pProtoFile,\n  void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  KVVfsFile *pFile = (KVVfsFile*)pProtoFile;\n  assert( pFile->isJournal );\n  SQLITE_KV_LOG((\"xRead('%s-journal',%d,%lld)\\n\", pFile->zClass, iAmt, iOfst));\n  if( pFile->aJrnl==0 ){\n    int szTxt = kvstorageRead(pFile->zClass, \"jrnl\", 0, 0);\n    char *aTxt;\n    if( szTxt<=4 ){\n      return SQLITE_IOERR;\n    }\n    aTxt = sqlite3_malloc64( szTxt+1 );\n    if( aTxt==0 ) return SQLITE_NOMEM;\n    kvstorageRead(pFile->zClass, \"jrnl\", aTxt, szTxt+1);\n    kvvfsDecodeJournal(pFile, aTxt, szTxt);\n    sqlite3_free(aTxt);\n    if( pFile->aJrnl==0 ) return SQLITE_IOERR;\n  }\n  if( iOfst+iAmt>pFile->nJrnl ){\n    return SQLITE_IOERR_SHORT_READ;\n  }\n  memcpy(zBuf, pFile->aJrnl+iOfst, iAmt);\n  return SQLITE_OK;\n}\n\n/*\n** Read from the database file.\n*/\nstatic int kvvfsReadDb(\n  sqlite3_file *pProtoFile,\n  void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  KVVfsFile *pFile = (KVVfsFile*)pProtoFile;\n  unsigned int pgno;\n  int got, n;\n  char zKey[30];\n  char *aData = pFile->aData;\n  assert( iOfst>=0 );\n  assert( iAmt>=0 );\n  SQLITE_KV_LOG((\"xRead('%s-db',%d,%lld)\\n\", pFile->zClass, iAmt, iOfst));\n  if( iOfst+iAmt>=512 ){\n    if( (iOfst % iAmt)!=0 ){\n      return SQLITE_IOERR_READ;\n    }\n    if( (iAmt & (iAmt-1))!=0 || iAmt<512 || iAmt>65536 ){\n      return SQLITE_IOERR_READ;\n    }\n    pFile->szPage = iAmt;\n    pgno = 1 + iOfst/iAmt;\n  }else{\n    pgno = 1;\n  }\n  sqlite3_snprintf(sizeof(zKey), zKey, \"%u\", pgno);\n  got = sqlite3KvvfsMethods.xRead(pFile->zClass, zKey,\n                                  aData, SQLITE_KVOS_SZ-1);\n  if( got<0 ){\n    n = 0;\n  }else{\n    aData[got] = 0;\n    if( iOfst+iAmt<512 ){\n      int k = iOfst+iAmt;\n      aData[k*2] = 0;\n      n = kvvfsDecode(aData, &aData[2000], SQLITE_KVOS_SZ-2000);\n      if( n>=iOfst+iAmt ){\n        memcpy(zBuf, &aData[2000+iOfst], iAmt);\n        n = iAmt;\n      }else{\n        n = 0;\n      }\n    }else{\n      n = kvvfsDecode(aData, zBuf, iAmt);\n    }\n  }\n  if( n<iAmt ){\n    memset(zBuf+n, 0, iAmt-n);\n    return SQLITE_IOERR_SHORT_READ;\n  }\n  return SQLITE_OK;\n}\n\n\n/*\n** Write into the -journal file.\n*/\nstatic int kvvfsWriteJrnl(\n  sqlite3_file *pProtoFile,\n  const void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  KVVfsFile *pFile = (KVVfsFile*)pProtoFile;\n  sqlite3_int64 iEnd = iOfst+iAmt;\n  SQLITE_KV_LOG((\"xWrite('%s-journal',%d,%lld)\\n\", pFile->zClass, iAmt, iOfst));\n  if( iEnd>=0x10000000 ) return SQLITE_FULL;\n  if( pFile->aJrnl==0 || pFile->nJrnl<iEnd ){\n    char *aNew = sqlite3_realloc(pFile->aJrnl, iEnd);\n    if( aNew==0 ){\n      return SQLITE_IOERR_NOMEM;\n    }\n    pFile->aJrnl = aNew;\n    if( pFile->nJrnl<iOfst ){\n      memset(pFile->aJrnl+pFile->nJrnl, 0, iOfst-pFile->nJrnl);\n    }\n    pFile->nJrnl = iEnd;\n  }\n  memcpy(pFile->aJrnl+iOfst, zBuf, iAmt);\n  return SQLITE_OK;\n}\n\n/*\n** Write into the database file.\n*/\nstatic int kvvfsWriteDb(\n  sqlite3_file *pProtoFile,\n  const void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  KVVfsFile *pFile = (KVVfsFile*)pProtoFile;\n  unsigned int pgno;\n  char zKey[30];\n  char *aData = pFile->aData;\n  SQLITE_KV_LOG((\"xWrite('%s-db',%d,%lld)\\n\", pFile->zClass, iAmt, iOfst));\n  assert( iAmt>=512 && iAmt<=65536 );\n  assert( (iAmt & (iAmt-1))==0 );\n  assert( pFile->szPage<0 || pFile->szPage==iAmt );\n  pFile->szPage = iAmt;\n  pgno = 1 + iOfst/iAmt;\n  sqlite3_snprintf(sizeof(zKey), zKey, \"%u\", pgno);\n  kvvfsEncode(zBuf, iAmt, aData);\n  if( sqlite3KvvfsMethods.xWrite(pFile->zClass, zKey, aData) ){\n    return SQLITE_IOERR;\n  }\n  if( iOfst+iAmt > pFile->szDb ){\n    pFile->szDb = iOfst + iAmt;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Truncate an kvvfs-file.\n*/\nstatic int kvvfsTruncateJrnl(sqlite3_file *pProtoFile, sqlite_int64 size){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  SQLITE_KV_LOG((\"xTruncate('%s-journal',%lld)\\n\", pFile->zClass, size));\n  assert( size==0 );\n  sqlite3KvvfsMethods.xDelete(pFile->zClass, \"jrnl\");\n  sqlite3_free(pFile->aJrnl);\n  pFile->aJrnl = 0;\n  pFile->nJrnl = 0;\n  return SQLITE_OK;\n}\nstatic int kvvfsTruncateDb(sqlite3_file *pProtoFile, sqlite_int64 size){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  if( pFile->szDb>size\n   && pFile->szPage>0\n   && (size % pFile->szPage)==0\n  ){\n    char zKey[50];\n    unsigned int pgno, pgnoMax;\n    SQLITE_KV_LOG((\"xTruncate('%s-db',%lld)\\n\", pFile->zClass, size));\n    pgno = 1 + size/pFile->szPage;\n    pgnoMax = 2 + pFile->szDb/pFile->szPage;\n    while( pgno<=pgnoMax ){\n      sqlite3_snprintf(sizeof(zKey), zKey, \"%u\", pgno);\n      sqlite3KvvfsMethods.xDelete(pFile->zClass, zKey);\n      pgno++;\n    }\n    pFile->szDb = size;\n    return kvvfsWriteFileSize(pFile, size) ? SQLITE_IOERR : SQLITE_OK;\n  }\n  return SQLITE_IOERR;\n}\n\n/*\n** Sync an kvvfs-file.\n*/\nstatic int kvvfsSyncJrnl(sqlite3_file *pProtoFile, int flags){\n  int i, n;\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  char *zOut;\n  SQLITE_KV_LOG((\"xSync('%s-journal')\\n\", pFile->zClass));\n  if( pFile->nJrnl<=0 ){\n    return kvvfsTruncateJrnl(pProtoFile, 0);\n  }\n  zOut = sqlite3_malloc64( pFile->nJrnl*2 + 50 );\n  if( zOut==0 ){\n    return SQLITE_IOERR_NOMEM;\n  }\n  n = pFile->nJrnl;\n  i = 0;\n  do{\n    zOut[i++] = 'a' + (n%26);\n    n /= 26;\n  }while( n>0 );\n  zOut[i++] = ' ';\n  kvvfsEncode(pFile->aJrnl, pFile->nJrnl, &zOut[i]);\n  i = sqlite3KvvfsMethods.xWrite(pFile->zClass, \"jrnl\", zOut);\n  sqlite3_free(zOut);\n  return i ? SQLITE_IOERR : SQLITE_OK;\n}\nstatic int kvvfsSyncDb(sqlite3_file *pProtoFile, int flags){\n  return SQLITE_OK;\n}\n\n/*\n** Return the current file-size of an kvvfs-file.\n*/\nstatic int kvvfsFileSizeJrnl(sqlite3_file *pProtoFile, sqlite_int64 *pSize){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  SQLITE_KV_LOG((\"xFileSize('%s-journal')\\n\", pFile->zClass));\n  *pSize = pFile->nJrnl;\n  return SQLITE_OK;\n}\nstatic int kvvfsFileSizeDb(sqlite3_file *pProtoFile, sqlite_int64 *pSize){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  SQLITE_KV_LOG((\"xFileSize('%s-db')\\n\", pFile->zClass));\n  if( pFile->szDb>=0 ){\n    *pSize = pFile->szDb;\n  }else{\n    *pSize = kvvfsReadFileSize(pFile);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Lock an kvvfs-file.\n*/\nstatic int kvvfsLock(sqlite3_file *pProtoFile, int eLock){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  assert( !pFile->isJournal );\n  SQLITE_KV_LOG((\"xLock(%s,%d)\\n\", pFile->zClass, eLock));\n\n  if( eLock!=SQLITE_LOCK_NONE ){\n    pFile->szDb = kvvfsReadFileSize(pFile);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Unlock an kvvfs-file.\n*/\nstatic int kvvfsUnlock(sqlite3_file *pProtoFile, int eLock){\n  KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n  assert( !pFile->isJournal );\n  SQLITE_KV_LOG((\"xUnlock(%s,%d)\\n\", pFile->zClass, eLock));\n  if( eLock==SQLITE_LOCK_NONE ){\n    pFile->szDb = -1;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Check if another file-handle holds a RESERVED lock on an kvvfs-file.\n*/\nstatic int kvvfsCheckReservedLock(sqlite3_file *pProtoFile, int *pResOut){\n  SQLITE_KV_LOG((\"xCheckReservedLock\\n\"));\n  *pResOut = 0;\n  return SQLITE_OK;\n}\n\n/*\n** File control method. For custom operations on an kvvfs-file.\n*/\nstatic int kvvfsFileControlJrnl(sqlite3_file *pProtoFile, int op, void *pArg){\n  SQLITE_KV_LOG((\"xFileControl(%d) on journal\\n\", op));\n  return SQLITE_NOTFOUND;\n}\nstatic int kvvfsFileControlDb(sqlite3_file *pProtoFile, int op, void *pArg){\n  SQLITE_KV_LOG((\"xFileControl(%d) on database\\n\", op));\n  if( op==SQLITE_FCNTL_SYNC ){\n    KVVfsFile *pFile = (KVVfsFile *)pProtoFile;\n    int rc = SQLITE_OK;\n    SQLITE_KV_LOG((\"xSync('%s-db')\\n\", pFile->zClass));\n    if( pFile->szDb>0 && 0!=kvvfsWriteFileSize(pFile, pFile->szDb) ){\n      rc = SQLITE_IOERR;\n    }\n    return rc;\n  }\n  return SQLITE_NOTFOUND;\n}\n\n/*\n** Return the sector-size in bytes for an kvvfs-file.\n*/\nstatic int kvvfsSectorSize(sqlite3_file *pFile){\n  return 512;\n}\n\n/*\n** Return the device characteristic flags supported by an kvvfs-file.\n*/\nstatic int kvvfsDeviceCharacteristics(sqlite3_file *pProtoFile){\n  return 0;\n}\n\n/****** sqlite3_vfs methods *************************************************/\n\n/*\n** Open an kvvfs file handle.\n*/\nstatic int kvvfsOpen(\n  sqlite3_vfs *pProtoVfs,\n  const char *zName,\n  sqlite3_file *pProtoFile,\n  int flags,\n  int *pOutFlags\n){\n  KVVfsFile *pFile = (KVVfsFile*)pProtoFile;\n  if( zName==0 ) zName = \"\";\n  SQLITE_KV_LOG((\"xOpen(\\\"%s\\\")\\n\", zName));\n  if( strcmp(zName, \"local\")==0\n   || strcmp(zName, \"session\")==0\n  ){\n    pFile->isJournal = 0;\n    pFile->base.pMethods = &kvvfs_db_io_methods;\n  }else\n  if( strcmp(zName, \"local-journal\")==0\n   || strcmp(zName, \"session-journal\")==0\n  ){\n    pFile->isJournal = 1;\n    pFile->base.pMethods = &kvvfs_jrnl_io_methods;\n  }else{\n    return SQLITE_CANTOPEN;\n  }\n  if( zName[0]=='s' ){\n    pFile->zClass = \"session\";\n  }else{\n    pFile->zClass = \"local\";\n  }\n  pFile->aData = sqlite3_malloc64(SQLITE_KVOS_SZ);\n  if( pFile->aData==0 ){\n    return SQLITE_NOMEM;\n  }\n  pFile->aJrnl = 0;\n  pFile->nJrnl = 0;\n  pFile->szPage = -1;\n  pFile->szDb = -1;\n  return SQLITE_OK;\n}\n\n/*\n** Delete the file located at zPath. If the dirSync argument is true,\n** ensure the file-system modifications are synced to disk before\n** returning.\n*/\nstatic int kvvfsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){\n  if( strcmp(zPath, \"local-journal\")==0 ){\n    sqlite3KvvfsMethods.xDelete(\"local\", \"jrnl\");\n  }else\n  if( strcmp(zPath, \"session-journal\")==0 ){\n    sqlite3KvvfsMethods.xDelete(\"session\", \"jrnl\");\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Test for access permissions. Return true if the requested permission\n** is available, or false otherwise.\n*/\nstatic int kvvfsAccess(\n  sqlite3_vfs *pProtoVfs,\n  const char *zPath,\n  int flags,\n  int *pResOut\n){\n  SQLITE_KV_LOG((\"xAccess(\\\"%s\\\")\\n\", zPath));\n  if( strcmp(zPath, \"local-journal\")==0 ){\n    *pResOut = sqlite3KvvfsMethods.xRead(\"local\", \"jrnl\", 0, 0)>0;\n  }else\n  if( strcmp(zPath, \"session-journal\")==0 ){\n    *pResOut = sqlite3KvvfsMethods.xRead(\"session\", \"jrnl\", 0, 0)>0;\n  }else\n  if( strcmp(zPath, \"local\")==0 ){\n    *pResOut = sqlite3KvvfsMethods.xRead(\"local\", \"sz\", 0, 0)>0;\n  }else\n  if( strcmp(zPath, \"session\")==0 ){\n    *pResOut = sqlite3KvvfsMethods.xRead(\"session\", \"sz\", 0, 0)>0;\n  }else\n  {\n    *pResOut = 0;\n  }\n  SQLITE_KV_LOG((\"xAccess returns %d\\n\",*pResOut));\n  return SQLITE_OK;\n}\n\n/*\n** Populate buffer zOut with the full canonical pathname corresponding\n** to the pathname in zPath. zOut is guaranteed to point to a buffer\n** of at least (INST_MAX_PATHNAME+1) bytes.\n*/\nstatic int kvvfsFullPathname(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int nOut,\n  char *zOut\n){\n  size_t nPath;\n#ifdef SQLITE_OS_KV_ALWAYS_LOCAL\n  zPath = \"local\";\n#endif\n  nPath = strlen(zPath);\n  SQLITE_KV_LOG((\"xFullPathname(\\\"%s\\\")\\n\", zPath));\n  if( nOut<nPath+1 ) nPath = nOut - 1;\n  memcpy(zOut, zPath, nPath);\n  zOut[nPath] = 0;\n  return SQLITE_OK;\n}\n\n/*\n** Open the dynamic library located at zPath and return a handle.\n*/\nstatic void *kvvfsDlOpen(sqlite3_vfs *pVfs, const char *zPath){\n  return 0;\n}\n\n/*\n** Populate the buffer pointed to by zBufOut with nByte bytes of\n** random data.\n*/\nstatic int kvvfsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){\n  memset(zBufOut, 0, nByte);\n  return nByte;\n}\n\n/*\n** Sleep for nMicro microseconds. Return the number of microseconds\n** actually slept.\n*/\nstatic int kvvfsSleep(sqlite3_vfs *pVfs, int nMicro){\n  return SQLITE_OK;\n}\n\n/*\n** Return the current time as a Julian Day number in *pTimeOut.\n*/\nstatic int kvvfsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){\n  sqlite3_int64 i = 0;\n  int rc;\n  rc = kvvfsCurrentTimeInt64(0, &i);\n  *pTimeOut = i/86400000.0;\n  return rc;\n}\n#include <sys/time.h>\nstatic int kvvfsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *pTimeOut){\n  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;\n  struct timeval sNow;\n  (void)gettimeofday(&sNow, 0);  /* Cannot fail given valid arguments */\n  *pTimeOut = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OS_KV || SQLITE_OS_UNIX */\n\n#if SQLITE_OS_KV\n/*\n** This routine is called initialize the KV-vfs as the default VFS.\n*/\nSQLITE_API int sqlite3_os_init(void){\n  return sqlite3_vfs_register(&sqlite3OsKvvfsObject, 1);\n}\nSQLITE_API int sqlite3_os_end(void){\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OS_KV */\n\n#if SQLITE_OS_UNIX && defined(SQLITE_OS_KV_OPTIONAL)\nSQLITE_PRIVATE int sqlite3KvvfsInit(void){\n  return sqlite3_vfs_register(&sqlite3OsKvvfsObject, 0);\n}\n#endif\n\n/************** End of os_kv.c ***********************************************/\n/************** Begin file os_unix.c *****************************************/\n/*\n** 2004 May 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains the VFS implementation for unix-like operating systems\n** include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others.\n**\n** There are actually several different VFS implementations in this file.\n** The differences are in the way that file locking is done.  The default\n** implementation uses Posix Advisory Locks.  Alternative implementations\n** use flock(), dot-files, various proprietary locking schemas, or simply\n** skip locking all together.\n**\n** This source file is organized into divisions where the logic for various\n** subfunctions is contained within the appropriate division.  PLEASE\n** KEEP THE STRUCTURE OF THIS FILE INTACT.  New code should be placed\n** in the correct division and should be clearly labelled.\n**\n** The layout of divisions is as follows:\n**\n**   *  General-purpose declarations and utility functions.\n**   *  Unique file ID logic used by VxWorks.\n**   *  Various locking primitive implementations (all except proxy locking):\n**      + for Posix Advisory Locks\n**      + for no-op locks\n**      + for dot-file locks\n**      + for flock() locking\n**      + for named semaphore locks (VxWorks only)\n**      + for AFP filesystem locks (MacOSX only)\n**   *  sqlite3_file methods not associated with locking.\n**   *  Definitions of sqlite3_io_methods objects for all locking\n**      methods plus \"finder\" functions for each locking method.\n**   *  sqlite3_vfs method implementations.\n**   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)\n**   *  Definitions of sqlite3_vfs objects for all locking methods\n**      plus implementations of sqlite3_os_init() and sqlite3_os_end().\n*/\n/* #include \"sqliteInt.h\" */\n#if SQLITE_OS_UNIX              /* This file is used on unix only */\n\n/*\n** There are various methods for file locking used for concurrency\n** control:\n**\n**   1. POSIX locking (the default),\n**   2. No locking,\n**   3. Dot-file locking,\n**   4. flock() locking,\n**   5. AFP locking (OSX only),\n**   6. Named POSIX semaphores (VXWorks only),\n**   7. proxy locking. (OSX only)\n**\n** Styles 4, 5, and 7 are only available of SQLITE_ENABLE_LOCKING_STYLE\n** is defined to 1.  The SQLITE_ENABLE_LOCKING_STYLE also enables automatic\n** selection of the appropriate locking style based on the filesystem\n** where the database is located.\n*/\n#if !defined(SQLITE_ENABLE_LOCKING_STYLE)\n#  if defined(__APPLE__)\n#    define SQLITE_ENABLE_LOCKING_STYLE 1\n#  else\n#    define SQLITE_ENABLE_LOCKING_STYLE 0\n#  endif\n#endif\n\n/* Use pread() and pwrite() if they are available */\n#if defined(__APPLE__) || defined(__linux__)\n# define HAVE_PREAD 1\n# define HAVE_PWRITE 1\n#endif\n#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)\n# undef USE_PREAD\n# define USE_PREAD64 1\n#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)\n# undef USE_PREAD64\n# define USE_PREAD 1\n#endif\n\n/*\n** standard include files.\n*/\n#include <sys/types.h>   /* amalgamator: keep */\n#include <sys/stat.h>    /* amalgamator: keep */\n#include <fcntl.h>\n#include <sys/ioctl.h>\n#include <unistd.h>      /* amalgamator: keep */\n/* #include <time.h> */\n#include <sys/time.h>    /* amalgamator: keep */\n#include <errno.h>\n#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \\\n  && !defined(SQLITE_WASI)\n# include <sys/mman.h>\n#endif\n\n#if SQLITE_ENABLE_LOCKING_STYLE\n/* # include <sys/ioctl.h> */\n# include <sys/file.h>\n# include <sys/param.h>\n#endif /* SQLITE_ENABLE_LOCKING_STYLE */\n\n/*\n** Try to determine if gethostuuid() is available based on standard\n** macros.  This might sometimes compute the wrong value for some\n** obscure platforms.  For those cases, simply compile with one of\n** the following:\n**\n**    -DHAVE_GETHOSTUUID=0\n**    -DHAVE_GETHOSTUUID=1\n**\n** None if this matters except when building on Apple products with\n** -DSQLITE_ENABLE_LOCKING_STYLE.\n*/\n#ifndef HAVE_GETHOSTUUID\n# define HAVE_GETHOSTUUID 0\n# if defined(__APPLE__) && ((__MAC_OS_X_VERSION_MIN_REQUIRED > 1050) || \\\n                            (__IPHONE_OS_VERSION_MIN_REQUIRED > 2000))\n#    if (!defined(TARGET_OS_EMBEDDED) || (TARGET_OS_EMBEDDED==0)) \\\n        && (!defined(TARGET_IPHONE_SIMULATOR) || (TARGET_IPHONE_SIMULATOR==0))\\\n        && (!defined(TARGET_OS_MACCATALYST) || (TARGET_OS_MACCATALYST==0))\n#      undef HAVE_GETHOSTUUID\n#      define HAVE_GETHOSTUUID 1\n#    else\n#      warning \"gethostuuid() is disabled.\"\n#    endif\n#  endif\n#endif\n\n\n#if OS_VXWORKS\n/* # include <sys/ioctl.h> */\n# include <semaphore.h>\n# include <limits.h>\n#endif /* OS_VXWORKS */\n\n#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE\n# include <sys/mount.h>\n#endif\n\n#ifdef HAVE_UTIME\n# include <utime.h>\n#endif\n\n/*\n** Allowed values of unixFile.fsFlags\n*/\n#define SQLITE_FSFLAGS_IS_MSDOS     0x1\n\n/*\n** If we are to be thread-safe, include the pthreads header.\n*/\n#if SQLITE_THREADSAFE\n/* # include <pthread.h> */\n#endif\n\n/*\n** Default permissions when creating a new file\n*/\n#ifndef SQLITE_DEFAULT_FILE_PERMISSIONS\n# define SQLITE_DEFAULT_FILE_PERMISSIONS 0644\n#endif\n\n/*\n** Default permissions when creating auto proxy dir\n*/\n#ifndef SQLITE_DEFAULT_PROXYDIR_PERMISSIONS\n# define SQLITE_DEFAULT_PROXYDIR_PERMISSIONS 0755\n#endif\n\n/*\n** Maximum supported path-length.\n*/\n#define MAX_PATHNAME 512\n\n/*\n** Maximum supported symbolic links\n*/\n#define SQLITE_MAX_SYMLINKS 100\n\n/*\n** Remove and stub certain info for WASI (WebAssembly System\n** Interface) builds.\n*/\n#ifdef SQLITE_WASI\n# undef HAVE_FCHMOD\n# undef HAVE_FCHOWN\n# undef HAVE_MREMAP\n# define HAVE_MREMAP 0\n# ifndef SQLITE_DEFAULT_UNIX_VFS\n#  define SQLITE_DEFAULT_UNIX_VFS \"unix-dotfile\"\n   /* ^^^ should SQLITE_DEFAULT_UNIX_VFS be \"unix-none\"? */\n# endif\n# ifndef F_RDLCK\n#  define F_RDLCK 0\n#  define F_WRLCK 1\n#  define F_UNLCK 2\n#  if __LONG_MAX == 0x7fffffffL\n#   define F_GETLK 12\n#   define F_SETLK 13\n#   define F_SETLKW 14\n#  else\n#   define F_GETLK 5\n#   define F_SETLK 6\n#   define F_SETLKW 7\n#  endif\n# endif\n#else /* !SQLITE_WASI */\n# ifndef HAVE_FCHMOD\n#  define HAVE_FCHMOD 1\n# endif\n#endif /* SQLITE_WASI */\n\n#ifdef SQLITE_WASI\n# define osGetpid(X) (pid_t)1\n#else\n/* Always cast the getpid() return type for compatibility with\n** kernel modules in VxWorks. */\n# define osGetpid(X) (pid_t)getpid()\n#endif\n\n/*\n** Only set the lastErrno if the error code is a real error and not\n** a normal expected return code of SQLITE_BUSY or SQLITE_OK\n*/\n#define IS_LOCK_ERROR(x)  ((x != SQLITE_OK) && (x != SQLITE_BUSY))\n\n/* Forward references */\ntypedef struct unixShm unixShm;               /* Connection shared memory */\ntypedef struct unixShmNode unixShmNode;       /* Shared memory instance */\ntypedef struct unixInodeInfo unixInodeInfo;   /* An i-node */\ntypedef struct UnixUnusedFd UnixUnusedFd;     /* An unused file descriptor */\n\n/*\n** Sometimes, after a file handle is closed by SQLite, the file descriptor\n** cannot be closed immediately. In these cases, instances of the following\n** structure are used to store the file descriptor while waiting for an\n** opportunity to either close or reuse it.\n*/\nstruct UnixUnusedFd {\n  int fd;                   /* File descriptor to close */\n  int flags;                /* Flags this file descriptor was opened with */\n  UnixUnusedFd *pNext;      /* Next unused file descriptor on same file */\n};\n\n/*\n** The unixFile structure is subclass of sqlite3_file specific to the unix\n** VFS implementations.\n*/\ntypedef struct unixFile unixFile;\nstruct unixFile {\n  sqlite3_io_methods const *pMethod;  /* Always the first entry */\n  sqlite3_vfs *pVfs;                  /* The VFS that created this unixFile */\n  unixInodeInfo *pInode;              /* Info about locks on this inode */\n  int h;                              /* The file descriptor */\n  unsigned char eFileLock;            /* The type of lock held on this fd */\n  unsigned short int ctrlFlags;       /* Behavioral bits.  UNIXFILE_* flags */\n  int lastErrno;                      /* The unix errno from last I/O error */\n  void *lockingContext;               /* Locking style specific state */\n  UnixUnusedFd *pPreallocatedUnused;  /* Pre-allocated UnixUnusedFd */\n  const char *zPath;                  /* Name of the file */\n  unixShm *pShm;                      /* Shared memory segment information */\n  int szChunk;                        /* Configured by FCNTL_CHUNK_SIZE */\n#if SQLITE_MAX_MMAP_SIZE>0\n  int nFetchOut;                      /* Number of outstanding xFetch refs */\n  sqlite3_int64 mmapSize;             /* Usable size of mapping at pMapRegion */\n  sqlite3_int64 mmapSizeActual;       /* Actual size of mapping at pMapRegion */\n  sqlite3_int64 mmapSizeMax;          /* Configured FCNTL_MMAP_SIZE value */\n  void *pMapRegion;                   /* Memory mapped region */\n#endif\n  int sectorSize;                     /* Device sector size */\n  int deviceCharacteristics;          /* Precomputed device characteristics */\n#if SQLITE_ENABLE_LOCKING_STYLE\n  int openFlags;                      /* The flags specified at open() */\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE || defined(__APPLE__)\n  unsigned fsFlags;                   /* cached details from statfs() */\n#endif\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  unsigned iBusyTimeout;              /* Wait this many millisec on locks */\n  int bBlockOnConnect;                /* True to block for SHARED locks */\n#endif\n#if OS_VXWORKS\n  struct vxworksFileId *pId;          /* Unique file ID */\n#endif\n#ifdef SQLITE_DEBUG\n  /* The next group of variables are used to track whether or not the\n  ** transaction counter in bytes 24-27 of database files are updated\n  ** whenever any part of the database changes.  An assertion fault will\n  ** occur if a file is updated without also updating the transaction\n  ** counter.  This test is made to avoid new problems similar to the\n  ** one described by ticket #3584.\n  */\n  unsigned char transCntrChng;   /* True if the transaction counter changed */\n  unsigned char dbUpdate;        /* True if any part of database file changed */\n  unsigned char inNormalWrite;   /* True if in a normal write operation */\n\n#endif\n\n#ifdef SQLITE_TEST\n  /* In test mode, increase the size of this structure a bit so that\n  ** it is larger than the struct CrashFile defined in test6.c.\n  */\n  char aPadding[32];\n#endif\n};\n\n/* This variable holds the process id (pid) from when the xRandomness()\n** method was called.  If xOpen() is called from a different process id,\n** indicating that a fork() has occurred, the PRNG will be reset.\n*/\nstatic pid_t randomnessPid = 0;\n\n/*\n** Allowed values for the unixFile.ctrlFlags bitmask:\n*/\n#define UNIXFILE_EXCL        0x01     /* Connections from one process only */\n#define UNIXFILE_RDONLY      0x02     /* Connection is read only */\n#define UNIXFILE_PERSIST_WAL 0x04     /* Persistent WAL mode */\n#if !defined(SQLITE_DISABLE_DIRSYNC) && !defined(_AIX)\n# define UNIXFILE_DIRSYNC    0x08     /* Directory sync needed */\n#else\n# define UNIXFILE_DIRSYNC    0x00\n#endif\n#define UNIXFILE_PSOW        0x10     /* SQLITE_IOCAP_POWERSAFE_OVERWRITE */\n#define UNIXFILE_DELETE      0x20     /* Delete on close */\n#define UNIXFILE_URI         0x40     /* Filename might have query parameters */\n#define UNIXFILE_NOLOCK      0x80     /* Do no file locking */\n\n/*\n** Include code that is common to all os_*.c files\n*/\n/* #include \"os_common.h\" */\n\n/*\n** Define various macros that are missing from some systems.\n*/\n#ifndef O_LARGEFILE\n# define O_LARGEFILE 0\n#endif\n#ifdef SQLITE_DISABLE_LFS\n# undef O_LARGEFILE\n# define O_LARGEFILE 0\n#endif\n#ifndef O_NOFOLLOW\n# define O_NOFOLLOW 0\n#endif\n#ifndef O_BINARY\n# define O_BINARY 0\n#endif\n\n/*\n** The threadid macro resolves to the thread-id or to 0.  Used for\n** testing and debugging only.\n*/\n#if SQLITE_THREADSAFE\n#define threadid pthread_self()\n#else\n#define threadid 0\n#endif\n\n/*\n** HAVE_MREMAP defaults to true on Linux and false everywhere else.\n*/\n#if !defined(HAVE_MREMAP)\n# if defined(__linux__) && defined(_GNU_SOURCE)\n#  define HAVE_MREMAP 1\n# else\n#  define HAVE_MREMAP 0\n# endif\n#endif\n\n/*\n** Explicitly call the 64-bit version of lseek() on Android. Otherwise, lseek()\n** is the 32-bit version, even if _FILE_OFFSET_BITS=64 is defined.\n*/\n#ifdef __ANDROID__\n# define lseek lseek64\n#endif\n\n#ifdef __linux__\n/*\n** Linux-specific IOCTL magic numbers used for controlling F2FS\n*/\n#define F2FS_IOCTL_MAGIC        0xf5\n#define F2FS_IOC_START_ATOMIC_WRITE     _IO(F2FS_IOCTL_MAGIC, 1)\n#define F2FS_IOC_COMMIT_ATOMIC_WRITE    _IO(F2FS_IOCTL_MAGIC, 2)\n#define F2FS_IOC_START_VOLATILE_WRITE   _IO(F2FS_IOCTL_MAGIC, 3)\n#define F2FS_IOC_ABORT_VOLATILE_WRITE   _IO(F2FS_IOCTL_MAGIC, 5)\n#define F2FS_IOC_GET_FEATURES           _IOR(F2FS_IOCTL_MAGIC, 12, u32)\n#define F2FS_FEATURE_ATOMIC_WRITE 0x0004\n#endif /* __linux__ */\n\n\n/*\n** Different Unix systems declare open() in different ways.  Same use\n** open(const char*,int,mode_t).  Others use open(const char*,int,...).\n** The difference is important when using a pointer to the function.\n**\n** The safest way to deal with the problem is to always use this wrapper\n** which always has the same well-defined interface.\n*/\nstatic int posixOpen(const char *zFile, int flags, int mode){\n  return open(zFile, flags, mode);\n}\n\n/* Forward reference */\nstatic int openDirectory(const char*, int*);\nstatic int unixGetpagesize(void);\n\n/*\n** Many system calls are accessed through pointer-to-functions so that\n** they may be overridden at runtime to facilitate fault injection during\n** testing and sandboxing.  The following array holds the names and pointers\n** to all overrideable system calls.\n*/\nstatic struct unix_syscall {\n  const char *zName;            /* Name of the system call */\n  sqlite3_syscall_ptr pCurrent; /* Current value of the system call */\n  sqlite3_syscall_ptr pDefault; /* Default value */\n} aSyscall[] = {\n  { \"open\",         (sqlite3_syscall_ptr)posixOpen,  0  },\n#define osOpen      ((int(*)(const char*,int,int))aSyscall[0].pCurrent)\n\n  { \"close\",        (sqlite3_syscall_ptr)close,      0  },\n#define osClose     ((int(*)(int))aSyscall[1].pCurrent)\n\n  { \"access\",       (sqlite3_syscall_ptr)access,     0  },\n#define osAccess    ((int(*)(const char*,int))aSyscall[2].pCurrent)\n\n  { \"getcwd\",       (sqlite3_syscall_ptr)getcwd,     0  },\n#define osGetcwd    ((char*(*)(char*,size_t))aSyscall[3].pCurrent)\n\n  { \"stat\",         (sqlite3_syscall_ptr)stat,       0  },\n#define osStat      ((int(*)(const char*,struct stat*))aSyscall[4].pCurrent)\n\n/*\n** The DJGPP compiler environment looks mostly like Unix, but it\n** lacks the fcntl() system call.  So redefine fcntl() to be something\n** that always succeeds.  This means that locking does not occur under\n** DJGPP.  But it is DOS - what did you expect?\n*/\n#ifdef __DJGPP__\n  { \"fstat\",        0,                 0  },\n#define osFstat(a,b,c)    0\n#else\n  { \"fstat\",        (sqlite3_syscall_ptr)fstat,      0  },\n#define osFstat     ((int(*)(int,struct stat*))aSyscall[5].pCurrent)\n#endif\n\n  { \"ftruncate\",    (sqlite3_syscall_ptr)ftruncate,  0  },\n#define osFtruncate ((int(*)(int,off_t))aSyscall[6].pCurrent)\n\n  { \"fcntl\",        (sqlite3_syscall_ptr)fcntl,      0  },\n#define osFcntl     ((int(*)(int,int,...))aSyscall[7].pCurrent)\n\n  { \"read\",         (sqlite3_syscall_ptr)read,       0  },\n#define osRead      ((ssize_t(*)(int,void*,size_t))aSyscall[8].pCurrent)\n\n#if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE\n  { \"pread\",        (sqlite3_syscall_ptr)pread,      0  },\n#else\n  { \"pread\",        (sqlite3_syscall_ptr)0,          0  },\n#endif\n#define osPread     ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[9].pCurrent)\n\n#if defined(USE_PREAD64)\n  { \"pread64\",      (sqlite3_syscall_ptr)pread64,    0  },\n#else\n  { \"pread64\",      (sqlite3_syscall_ptr)0,          0  },\n#endif\n#define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)\n\n  { \"write\",        (sqlite3_syscall_ptr)write,      0  },\n#define osWrite     ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent)\n\n#if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE\n  { \"pwrite\",       (sqlite3_syscall_ptr)pwrite,     0  },\n#else\n  { \"pwrite\",       (sqlite3_syscall_ptr)0,          0  },\n#endif\n#define osPwrite    ((ssize_t(*)(int,const void*,size_t,off_t))\\\n                    aSyscall[12].pCurrent)\n\n#if defined(USE_PREAD64)\n  { \"pwrite64\",     (sqlite3_syscall_ptr)pwrite64,   0  },\n#else\n  { \"pwrite64\",     (sqlite3_syscall_ptr)0,          0  },\n#endif\n#define osPwrite64  ((ssize_t(*)(int,const void*,size_t,off64_t))\\\n                    aSyscall[13].pCurrent)\n\n#if defined(HAVE_FCHMOD)\n  { \"fchmod\",       (sqlite3_syscall_ptr)fchmod,          0  },\n#define osFchmod    ((int(*)(int,mode_t))aSyscall[14].pCurrent)\n#else\n  { \"fchmod\",       (sqlite3_syscall_ptr)0,               0  },\n#define osFchmod(FID,MODE) 0\n#endif\n\n#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE\n  { \"fallocate\",    (sqlite3_syscall_ptr)posix_fallocate,  0 },\n#else\n  { \"fallocate\",    (sqlite3_syscall_ptr)0,                0 },\n#endif\n#define osFallocate ((int(*)(int,off_t,off_t))aSyscall[15].pCurrent)\n\n  { \"unlink\",       (sqlite3_syscall_ptr)unlink,           0 },\n#define osUnlink    ((int(*)(const char*))aSyscall[16].pCurrent)\n\n  { \"openDirectory\",    (sqlite3_syscall_ptr)openDirectory,      0 },\n#define osOpenDirectory ((int(*)(const char*,int*))aSyscall[17].pCurrent)\n\n  { \"mkdir\",        (sqlite3_syscall_ptr)mkdir,           0 },\n#define osMkdir     ((int(*)(const char*,mode_t))aSyscall[18].pCurrent)\n\n  { \"rmdir\",        (sqlite3_syscall_ptr)rmdir,           0 },\n#define osRmdir     ((int(*)(const char*))aSyscall[19].pCurrent)\n\n#if defined(HAVE_FCHOWN)\n  { \"fchown\",       (sqlite3_syscall_ptr)fchown,          0 },\n#else\n  { \"fchown\",       (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osFchown    ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)\n\n#if defined(HAVE_FCHOWN)\n  { \"geteuid\",      (sqlite3_syscall_ptr)geteuid,         0 },\n#else\n  { \"geteuid\",      (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osGeteuid   ((uid_t(*)(void))aSyscall[21].pCurrent)\n\n#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \\\n  && !defined(SQLITE_WASI)\n  { \"mmap\",         (sqlite3_syscall_ptr)mmap,            0 },\n#else\n  { \"mmap\",         (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent)\n\n#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \\\n  && !defined(SQLITE_WASI)\n  { \"munmap\",       (sqlite3_syscall_ptr)munmap,          0 },\n#else\n  { \"munmap\",       (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osMunmap ((int(*)(void*,size_t))aSyscall[23].pCurrent)\n\n#if HAVE_MREMAP && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)\n  { \"mremap\",       (sqlite3_syscall_ptr)mremap,          0 },\n#else\n  { \"mremap\",       (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[24].pCurrent)\n\n#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0\n  { \"getpagesize\",  (sqlite3_syscall_ptr)unixGetpagesize, 0 },\n#else\n  { \"getpagesize\",  (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osGetpagesize ((int(*)(void))aSyscall[25].pCurrent)\n\n#if defined(HAVE_READLINK)\n  { \"readlink\",     (sqlite3_syscall_ptr)readlink,        0 },\n#else\n  { \"readlink\",     (sqlite3_syscall_ptr)0,               0 },\n#endif\n#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[26].pCurrent)\n\n#if defined(HAVE_LSTAT)\n  { \"lstat\",         (sqlite3_syscall_ptr)lstat,          0 },\n#else\n  { \"lstat\",         (sqlite3_syscall_ptr)0,              0 },\n#endif\n#define osLstat      ((int(*)(const char*,struct stat*))aSyscall[27].pCurrent)\n\n#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n# ifdef __ANDROID__\n  { \"ioctl\", (sqlite3_syscall_ptr)(int(*)(int, int, ...))ioctl, 0 },\n#define osIoctl ((int(*)(int,int,...))aSyscall[28].pCurrent)\n# else\n  { \"ioctl\",         (sqlite3_syscall_ptr)ioctl,          0 },\n#define osIoctl ((int(*)(int,unsigned long,...))aSyscall[28].pCurrent)\n# endif\n#else\n  { \"ioctl\",         (sqlite3_syscall_ptr)0,              0 },\n#endif\n\n}; /* End of the overrideable system calls */\n\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n/*\n** Extract Posix Advisory Locking information about file description fd\n** from the /proc/PID/fdinfo/FD pseudo-file.  Fill the string buffer a[16]\n** with characters to indicate which SQLite-relevant locks are held.\n** a[16] will be a 15-character zero-terminated string with the following\n** schema:\n**\n**     AAA/B.DDD.DDDDD\n**\n** Each of character A-D will be \"w\" or \"r\" or \"-\" to indicate either a\n** write-lock, a read-lock, or no-lock, respectively.  The \".\" and \"/\"\n** characters are delimiters intended to make the string more easily\n** readable by humans.  Here are the meaning of the specific letters:\n**\n**     AAA   ->    The main database locks.  PENDING_BYTE, RESERVED_BYTE,\n**                 and SHARED_FIRST, respectively.\n**\n**     B     ->    The deadman switch lock.  Offset 128 of the -shm file.\n**\n**     CCC   ->    WAL locks:  WRITE, CKPT, RECOVER\n**\n**     DDDDD ->    WAL read-locks 0 through 5\n**\n** Note that elements before the \"/\" apply to the main database file and\n** elements after the \"/\" apply to the -shm file in WAL mode.\n**\n** Here is another way of thinking about the meaning of the result string:\n**\n**           AAA/B.CCC.DDDDD\n**           ||| | ||| \\___/\n**  PENDING--'|| | |||   `----- READ 0-5\n**  RESERVED--'| | ||`---- RECOVER\n**  SHARED ----' | |`----- CKPT\n**     DMS ------' `------ WRITE\n**\n** Return SQLITE_OK on success and SQLITE_ERROR_UNABLE if the /proc\n** pseudo-filesystem is unavailable.\n*/\nstatic int unixPosixAdvisoryLocks(\n  int fd,        /* The file descriptor to analyze */\n  char a[16]     /* Write a text description of PALs here */\n){\n  int in;\n  ssize_t n;\n  char *p, *pNext, *x;\n  char z[2000];\n\n        /*             1     */\n        /*   012 4 678 01234 */\n  memcpy(a, \"---/-.---.-----\", 16);\n  sqlite3_snprintf(sizeof(z), z, \"/proc/%d/fdinfo/%d\", getpid(), fd);\n  in = osOpen(z, O_RDONLY, 0);\n  if( in<0 ){\n    return SQLITE_ERROR_UNABLE;\n  }\n  n = osRead(in, z, sizeof(z)-1);\n  osClose(in);\n  if( n<=0 ) return SQLITE_ERROR_UNABLE;\n  z[n] = 0;\n\n  /* We are looking for lines that begin with \"lock:\\t\".  Examples:\n  **\n  ** lock: 1: POSIX  ADVISORY  READ 494716 08:02:5277597 1073741826 1073742335\n  ** lock: 1: POSIX  ADVISORY  WRITE 494716 08:02:5282282 120 120\n  ** lock: 2: POSIX  ADVISORY  READ 494716 08:02:5282282 123 123\n  ** lock: 3: POSIX  ADVISORY  READ 494716 08:02:5282282 128 128\n  */\n  pNext = strstr(z, \"lock:\\t\");\n  while( pNext ){\n    char cType = 0;\n    sqlite3_int64 iFirst, iLast;\n    p = pNext+6;\n    pNext = strstr(p, \"lock:\\t\");\n    if( pNext ) pNext[-1] = 0;\n    if( (x = strstr(p, \" READ \"))!=0 ){\n      cType = 'r';\n      x += 6;\n    }else if( (x = strstr(p, \" WRITE \"))!=0 ){\n      cType = 'w';\n      x += 7;\n    }else{\n      continue;\n    }\n    x = strrchr(x, ' ');\n    if( x==0 ) continue;\n    iLast = strtoll(x+1, 0, 10);\n    *x = 0;\n    x = strrchr(p, ' ');\n    if( x==0 ) continue;\n    iFirst = strtoll(x+1, 0, 10);\n    if( iLast>=PENDING_BYTE ){\n      if( iFirst<=PENDING_BYTE && iLast>=PENDING_BYTE )     a[0] = cType;\n      if( iFirst<=PENDING_BYTE+1 && iLast>=PENDING_BYTE+1 ) a[1] = cType;\n      if( iFirst<=PENDING_BYTE+2 && iLast>=PENDING_BYTE+510 ) a[2] = cType;\n    }else if( iLast<=128 ){\n      if( iFirst<=128 && iLast>=128 ) a[4] = cType;\n      if( iFirst<=120 && iLast>=120 ) a[6] = cType;\n      if( iFirst<=121 && iLast>=121 ) a[7] = cType;\n      if( iFirst<=122 && iLast>=122 ) a[8] = cType;\n      if( iFirst<=123 && iLast>=123 ) a[10] = cType;\n      if( iFirst<=124 && iLast>=124 ) a[11] = cType;\n      if( iFirst<=125 && iLast>=125 ) a[12] = cType;\n      if( iFirst<=126 && iLast>=126 ) a[13] = cType;\n      if( iFirst<=127 && iLast>=127 ) a[14] = cType;\n    }\n  }\n  return SQLITE_OK;\n}\n#else\n#  define unixPosixAdvisoryLocks(A,B) SQLITE_ERROR_UNABLE\n#endif /* SQLITE_DEBUG || SQLITE_ENABLE_FILESTAT */\n\n/*\n** On some systems, calls to fchown() will trigger a message in a security\n** log if they come from non-root processes.  So avoid calling fchown() if\n** we are not running as root.\n*/\nstatic int robustFchown(int fd, uid_t uid, gid_t gid){\n#if defined(HAVE_FCHOWN)\n  return osGeteuid() ? 0 : osFchown(fd,uid,gid);\n#else\n  return 0;\n#endif\n}\n\n/*\n** This is the xSetSystemCall() method of sqlite3_vfs for all of the\n** \"unix\" VFSes.  Return SQLITE_OK upon successfully updating the\n** system call pointer, or SQLITE_NOTFOUND if there is no configurable\n** system call named zName.\n*/\nstatic int unixSetSystemCall(\n  sqlite3_vfs *pNotUsed,        /* The VFS pointer.  Not used */\n  const char *zName,            /* Name of system call to override */\n  sqlite3_syscall_ptr pNewFunc  /* Pointer to new system call value */\n){\n  unsigned int i;\n  int rc = SQLITE_NOTFOUND;\n\n  UNUSED_PARAMETER(pNotUsed);\n  if( zName==0 ){\n    /* If no zName is given, restore all system calls to their default\n    ** settings and return NULL\n    */\n    rc = SQLITE_OK;\n    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n      if( aSyscall[i].pDefault ){\n        aSyscall[i].pCurrent = aSyscall[i].pDefault;\n      }\n    }\n  }else{\n    /* If zName is specified, operate on only the one system call\n    ** specified.\n    */\n    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n      if( strcmp(zName, aSyscall[i].zName)==0 ){\n        if( aSyscall[i].pDefault==0 ){\n          aSyscall[i].pDefault = aSyscall[i].pCurrent;\n        }\n        rc = SQLITE_OK;\n        if( pNewFunc==0 ) pNewFunc = aSyscall[i].pDefault;\n        aSyscall[i].pCurrent = pNewFunc;\n        break;\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Return the value of a system call.  Return NULL if zName is not a\n** recognized system call name.  NULL is also returned if the system call\n** is currently undefined.\n*/\nstatic sqlite3_syscall_ptr unixGetSystemCall(\n  sqlite3_vfs *pNotUsed,\n  const char *zName\n){\n  unsigned int i;\n\n  UNUSED_PARAMETER(pNotUsed);\n  for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n    if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;\n  }\n  return 0;\n}\n\n/*\n** Return the name of the first system call after zName.  If zName==NULL\n** then return the name of the first system call.  Return NULL if zName\n** is the last system call or if zName is not the name of a valid\n** system call.\n*/\nstatic const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){\n  int i = -1;\n\n  UNUSED_PARAMETER(p);\n  if( zName ){\n    for(i=0; i<ArraySize(aSyscall)-1; i++){\n      if( strcmp(zName, aSyscall[i].zName)==0 ) break;\n    }\n  }\n  for(i++; i<ArraySize(aSyscall); i++){\n    if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;\n  }\n  return 0;\n}\n\n/*\n** Do not accept any file descriptor less than this value, in order to avoid\n** opening database file using file descriptors that are commonly used for\n** standard input, output, and error.\n*/\n#ifndef SQLITE_MINIMUM_FILE_DESCRIPTOR\n# define SQLITE_MINIMUM_FILE_DESCRIPTOR 3\n#endif\n\n/*\n** Invoke open().  Do so multiple times, until it either succeeds or\n** fails for some reason other than EINTR.\n**\n** If the file creation mode \"m\" is 0 then set it to the default for\n** SQLite.  The default is SQLITE_DEFAULT_FILE_PERMISSIONS (normally\n** 0644) as modified by the system umask.  If m is not 0, then\n** make the file creation mode be exactly m ignoring the umask.\n**\n** The m parameter will be non-zero only when creating -wal, -journal,\n** and -shm files.  We want those files to have *exactly* the same\n** permissions as their original database, unadulterated by the umask.\n** In that way, if a database file is -rw-rw-rw or -rw-rw-r-, and a\n** transaction crashes and leaves behind hot journals, then any\n** process that is able to write to the database will also be able to\n** recover the hot journals.\n*/\nstatic int robust_open(const char *z, int f, mode_t m){\n  int fd;\n  mode_t m2 = m ? m : SQLITE_DEFAULT_FILE_PERMISSIONS;\n  while(1){\n#if defined(O_CLOEXEC)\n    fd = osOpen(z,f|O_CLOEXEC,m2);\n#else\n    fd = osOpen(z,f,m2);\n#endif\n    if( fd<0 ){\n      if( errno==EINTR ) continue;\n      break;\n    }\n    if( fd>=SQLITE_MINIMUM_FILE_DESCRIPTOR ) break;\n    if( (f & (O_EXCL|O_CREAT))==(O_EXCL|O_CREAT) ){\n      (void)osUnlink(z);\n    }\n    osClose(fd);\n    sqlite3_log(SQLITE_WARNING,\n                \"attempt to open \\\"%s\\\" as file descriptor %d\", z, fd);\n    fd = -1;\n    if( osOpen(\"/dev/null\", O_RDONLY, m)<0 ) break;\n  }\n  if( fd>=0 ){\n    if( m!=0 ){\n      struct stat statbuf;\n      if( osFstat(fd, &statbuf)==0\n       && statbuf.st_size==0\n       && (statbuf.st_mode&0777)!=m\n      ){\n        osFchmod(fd, m);\n      }\n    }\n#if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)\n    osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);\n#endif\n  }\n  return fd;\n}\n\n/*\n** Helper functions to obtain and relinquish the global mutex. The\n** global mutex is used to protect the unixInodeInfo objects used by\n** this file, all of which may be shared by multiple threads.\n**\n** Function unixMutexHeld() is used to assert() that the global mutex\n** is held when required. This function is only used as part of assert()\n** statements. e.g.\n**\n**   unixEnterMutex()\n**     assert( unixMutexHeld() );\n**   unixEnterLeave()\n**\n** To prevent deadlock, the global unixBigLock must must be acquired\n** before the unixInodeInfo.pLockMutex mutex, if both are held.  It is\n** OK to get the pLockMutex without holding unixBigLock first, but if\n** that happens, the unixBigLock mutex must not be acquired until after\n** pLockMutex is released.\n**\n**      OK:     enter(unixBigLock),  enter(pLockInfo)\n**      OK:     enter(unixBigLock)\n**      OK:     enter(pLockInfo)\n**   ERROR:     enter(pLockInfo), enter(unixBigLock)\n*/\nstatic sqlite3_mutex *unixBigLock = 0;\nstatic void unixEnterMutex(void){\n  assert( sqlite3_mutex_notheld(unixBigLock) );  /* Not a recursive mutex */\n  sqlite3_mutex_enter(unixBigLock);\n}\nstatic void unixLeaveMutex(void){\n  assert( sqlite3_mutex_held(unixBigLock) );\n  sqlite3_mutex_leave(unixBigLock);\n}\n#ifdef SQLITE_DEBUG\nstatic int unixMutexHeld(void) {\n  return sqlite3_mutex_held(unixBigLock);\n}\n#endif\n\n\n#ifdef SQLITE_HAVE_OS_TRACE\n/*\n** Helper function for printing out trace information from debugging\n** binaries. This returns the string representation of the supplied\n** integer lock-type.\n*/\nstatic const char *azFileLock(int eFileLock){\n  switch( eFileLock ){\n    case NO_LOCK: return \"NONE\";\n    case SHARED_LOCK: return \"SHARED\";\n    case RESERVED_LOCK: return \"RESERVED\";\n    case PENDING_LOCK: return \"PENDING\";\n    case EXCLUSIVE_LOCK: return \"EXCLUSIVE\";\n  }\n  return \"ERROR\";\n}\n#endif\n\n#ifdef SQLITE_LOCK_TRACE\n/*\n** Print out information about all locking operations.\n**\n** This routine is used for troubleshooting locks on multithreaded\n** platforms.  Enable by compiling with the -DSQLITE_LOCK_TRACE\n** command-line option on the compiler.  This code is normally\n** turned off.\n*/\nstatic int lockTrace(int fd, int op, struct flock *p){\n  char *zOpName, *zType;\n  int s;\n  int savedErrno;\n  if( op==F_GETLK ){\n    zOpName = \"GETLK\";\n  }else if( op==F_SETLK ){\n    zOpName = \"SETLK\";\n  }else{\n    s = osFcntl(fd, op, p);\n    sqlite3DebugPrintf(\"fcntl unknown %d %d %d\\n\", fd, op, s);\n    return s;\n  }\n  if( p->l_type==F_RDLCK ){\n    zType = \"RDLCK\";\n  }else if( p->l_type==F_WRLCK ){\n    zType = \"WRLCK\";\n  }else if( p->l_type==F_UNLCK ){\n    zType = \"UNLCK\";\n  }else{\n    assert( 0 );\n  }\n  assert( p->l_whence==SEEK_SET );\n  s = osFcntl(fd, op, p);\n  savedErrno = errno;\n  sqlite3DebugPrintf(\"fcntl %d %d %s %s %d %d %d %d\\n\",\n     threadid, fd, zOpName, zType, (int)p->l_start, (int)p->l_len,\n     (int)p->l_pid, s);\n  if( s==(-1) && op==F_SETLK && (p->l_type==F_RDLCK || p->l_type==F_WRLCK) ){\n    struct flock l2;\n    l2 = *p;\n    osFcntl(fd, F_GETLK, &l2);\n    if( l2.l_type==F_RDLCK ){\n      zType = \"RDLCK\";\n    }else if( l2.l_type==F_WRLCK ){\n      zType = \"WRLCK\";\n    }else if( l2.l_type==F_UNLCK ){\n      zType = \"UNLCK\";\n    }else{\n      assert( 0 );\n    }\n    sqlite3DebugPrintf(\"fcntl-failure-reason: %s %d %d %d\\n\",\n       zType, (int)l2.l_start, (int)l2.l_len, (int)l2.l_pid);\n  }\n  errno = savedErrno;\n  return s;\n}\n#undef osFcntl\n#define osFcntl lockTrace\n#endif /* SQLITE_LOCK_TRACE */\n\n/*\n** Retry ftruncate() calls that fail due to EINTR\n**\n** All calls to ftruncate() within this file should be made through\n** this wrapper.  On the Android platform, bypassing the logic below\n** could lead to a corrupt database.\n*/\nstatic int robust_ftruncate(int h, sqlite3_int64 sz){\n  int rc;\n#ifdef __ANDROID__\n  /* On Android, ftruncate() always uses 32-bit offsets, even if\n  ** _FILE_OFFSET_BITS=64 is defined. This means it is unsafe to attempt to\n  ** truncate a file to any size larger than 2GiB. Silently ignore any\n  ** such attempts.  */\n  if( sz>(sqlite3_int64)0x7FFFFFFF ){\n    rc = SQLITE_OK;\n  }else\n#endif\n  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );\n  return rc;\n}\n\n/*\n** This routine translates a standard POSIX errno code into something\n** useful to the clients of the sqlite3 functions.  Specifically, it is\n** intended to translate a variety of \"try again\" errors into SQLITE_BUSY\n** and a variety of \"please close the file descriptor NOW\" errors into\n** SQLITE_IOERR\n**\n** Errors during initialization of locks, or file system support for locks,\n** should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.\n*/\nstatic int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {\n  assert( (sqliteIOErr == SQLITE_IOERR_LOCK) ||\n          (sqliteIOErr == SQLITE_IOERR_UNLOCK) ||\n          (sqliteIOErr == SQLITE_IOERR_RDLOCK) ||\n          (sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK) );\n  switch (posixError) {\n  case EACCES:\n  case EAGAIN:\n  case ETIMEDOUT:\n  case EBUSY:\n  case EINTR:\n  case ENOLCK:\n    /* random NFS retry error, unless during file system support\n     * introspection, in which it actually means what it says */\n    return SQLITE_BUSY;\n\n  case EPERM:\n    return SQLITE_PERM;\n\n  default:\n    return sqliteIOErr;\n  }\n}\n\n\n/******************************************************************************\n****************** Begin Unique File ID Utility Used By VxWorks ***************\n**\n** On most versions of unix, we can get a unique ID for a file by concatenating\n** the device number and the inode number.  But this does not work on VxWorks.\n** On VxWorks, a unique file id must be based on the canonical filename.\n**\n** A pointer to an instance of the following structure can be used as a\n** unique file ID in VxWorks.  Each instance of this structure contains\n** a copy of the canonical filename.  There is also a reference count.\n** The structure is reclaimed when the number of pointers to it drops to\n** zero.\n**\n** There are never very many files open at one time and lookups are not\n** a performance-critical path, so it is sufficient to put these\n** structures on a linked list.\n*/\nstruct vxworksFileId {\n  struct vxworksFileId *pNext;  /* Next in a list of them all */\n  int nRef;                     /* Number of references to this one */\n  int nName;                    /* Length of the zCanonicalName[] string */\n  char *zCanonicalName;         /* Canonical filename */\n};\n\n#if OS_VXWORKS\n/*\n** All unique filenames are held on a linked list headed by this\n** variable:\n*/\nstatic struct vxworksFileId *vxworksFileList = 0;\nstatic sqlite3_mutex *vxworksMutex = 0;\n\n/*\n** Simplify a filename into its canonical form\n** by making the following changes:\n**\n**  * removing any trailing and duplicate /\n**  * convert /./ into just /\n**  * convert /A/../ where A is any simple name into just /\n**\n** Changes are made in-place.  Return the new name length.\n**\n** The original filename is in z[0..n-1].  Return the number of\n** characters in the simplified name.\n*/\nstatic int vxworksSimplifyName(char *z, int n){\n  int i, j;\n  while( n>1 && z[n-1]=='/' ){ n--; }\n  for(i=j=0; i<n; i++){\n    if( z[i]=='/' ){\n      if( z[i+1]=='/' ) continue;\n      if( z[i+1]=='.' && i+2<n && z[i+2]=='/' ){\n        i += 1;\n        continue;\n      }\n      if( z[i+1]=='.' && i+3<n && z[i+2]=='.' && z[i+3]=='/' ){\n        while( j>0 && z[j-1]!='/' ){ j--; }\n        if( j>0 ){ j--; }\n        i += 2;\n        continue;\n      }\n    }\n    z[j++] = z[i];\n  }\n  z[j] = 0;\n  return j;\n}\n\n/*\n** Find a unique file ID for the given absolute pathname.  Return\n** a pointer to the vxworksFileId object.  This pointer is the unique\n** file ID.\n**\n** The nRef field of the vxworksFileId object is incremented before\n** the object is returned.  A new vxworksFileId object is created\n** and added to the global list if necessary.\n**\n** If a memory allocation error occurs, return NULL.\n*/\nstatic struct vxworksFileId *vxworksFindFileId(const char *zAbsoluteName){\n  struct vxworksFileId *pNew;         /* search key and new file ID */\n  struct vxworksFileId *pCandidate;   /* For looping over existing file IDs */\n  int n;                              /* Length of zAbsoluteName string */\n\n  assert( zAbsoluteName[0]=='/' );\n  n = (int)strlen(zAbsoluteName);\n  pNew = sqlite3_malloc64( sizeof(*pNew) + (n+1) );\n  if( pNew==0 ) return 0;\n  pNew->zCanonicalName = (char*)&pNew[1];\n  memcpy(pNew->zCanonicalName, zAbsoluteName, n+1);\n  n = vxworksSimplifyName(pNew->zCanonicalName, n);\n\n  /* Search for an existing entry that matching the canonical name.\n  ** If found, increment the reference count and return a pointer to\n  ** the existing file ID.\n  */\n  sqlite3_mutex_enter(vxworksMutex);\n  for(pCandidate=vxworksFileList; pCandidate; pCandidate=pCandidate->pNext){\n    if( pCandidate->nName==n\n     && memcmp(pCandidate->zCanonicalName, pNew->zCanonicalName, n)==0\n    ){\n       sqlite3_free(pNew);\n       pCandidate->nRef++;\n       sqlite3_mutex_leave(vxworksMutex);\n       return pCandidate;\n    }\n  }\n\n  /* No match was found.  We will make a new file ID */\n  pNew->nRef = 1;\n  pNew->nName = n;\n  pNew->pNext = vxworksFileList;\n  vxworksFileList = pNew;\n  sqlite3_mutex_leave(vxworksMutex);\n  return pNew;\n}\n\n/*\n** Decrement the reference count on a vxworksFileId object.  Free\n** the object when the reference count reaches zero.\n*/\nstatic void vxworksReleaseFileId(struct vxworksFileId *pId){\n  sqlite3_mutex_enter(vxworksMutex);\n  assert( pId->nRef>0 );\n  pId->nRef--;\n  if( pId->nRef==0 ){\n    struct vxworksFileId **pp;\n    for(pp=&vxworksFileList; *pp && *pp!=pId; pp = &((*pp)->pNext)){}\n    assert( *pp==pId );\n    *pp = pId->pNext;\n    sqlite3_free(pId);\n  }\n  sqlite3_mutex_leave(vxworksMutex);\n}\n#endif /* OS_VXWORKS */\n/*************** End of Unique File ID Utility Used By VxWorks ****************\n******************************************************************************/\n\n\n/******************************************************************************\n*************************** Posix Advisory Locking ****************************\n**\n** POSIX advisory locks are broken by design.  ANSI STD 1003.1 (1996)\n** section 6.5.2.2 lines 483 through 490 specify that when a process\n** sets or clears a lock, that operation overrides any prior locks set\n** by the same process.  It does not explicitly say so, but this implies\n** that it overrides locks set by the same process using a different\n** file descriptor.  Consider this test case:\n**\n**       int fd1 = open(\"./file1\", O_RDWR|O_CREAT, 0644);\n**       int fd2 = open(\"./file2\", O_RDWR|O_CREAT, 0644);\n**\n** Suppose ./file1 and ./file2 are really the same file (because\n** one is a hard or symbolic link to the other) then if you set\n** an exclusive lock on fd1, then try to get an exclusive lock\n** on fd2, it works.  I would have expected the second lock to\n** fail since there was already a lock on the file due to fd1.\n** But not so.  Since both locks came from the same process, the\n** second overrides the first, even though they were on different\n** file descriptors opened on different file names.\n**\n** This means that we cannot use POSIX locks to synchronize file access\n** among competing threads of the same process.  POSIX locks will work fine\n** to synchronize access for threads in separate processes, but not\n** threads within the same process.\n**\n** To work around the problem, SQLite has to manage file locks internally\n** on its own.  Whenever a new database is opened, we have to find the\n** specific inode of the database file (the inode is determined by the\n** st_dev and st_ino fields of the stat structure that fstat() fills in)\n** and check for locks already existing on that inode.  When locks are\n** created or removed, we have to look at our own internal record of the\n** locks to see if another thread has previously set a lock on that same\n** inode.\n**\n** (Aside: The use of inode numbers as unique IDs does not work on VxWorks.\n** For VxWorks, we have to use the alternative unique ID system based on\n** canonical filename and implemented in the previous division.)\n**\n** The sqlite3_file structure for POSIX is no longer just an integer file\n** descriptor.  It is now a structure that holds the integer file\n** descriptor and a pointer to a structure that describes the internal\n** locks on the corresponding inode.  There is one locking structure\n** per inode, so if the same inode is opened twice, both unixFile structures\n** point to the same locking structure.  The locking structure keeps\n** a reference count (so we will know when to delete it) and a \"cnt\"\n** field that tells us its internal lock status.  cnt==0 means the\n** file is unlocked.  cnt==-1 means the file has an exclusive lock.\n** cnt>0 means there are cnt shared locks on the file.\n**\n** Any attempt to lock or unlock a file first checks the locking\n** structure.  The fcntl() system call is only invoked to set a\n** POSIX lock if the internal lock structure transitions between\n** a locked and an unlocked state.\n**\n** But wait:  there are yet more problems with POSIX advisory locks.\n**\n** If you close a file descriptor that points to a file that has locks,\n** all locks on that file that are owned by the current process are\n** released.  To work around this problem, each unixInodeInfo object\n** maintains a count of the number of pending locks on the inode.\n** When an attempt is made to close an unixFile, if there are\n** other unixFile open on the same inode that are holding locks, the call\n** to close() the file descriptor is deferred until all of the locks clear.\n** The unixInodeInfo structure keeps a list of file descriptors that need to\n** be closed and that list is walked (and cleared) when the last lock\n** clears.\n**\n** Yet another problem:  LinuxThreads do not play well with posix locks.\n**\n** Many older versions of linux use the LinuxThreads library which is\n** not posix compliant.  Under LinuxThreads, a lock created by thread\n** A cannot be modified or overridden by a different thread B.\n** Only thread A can modify the lock.  Locking behavior is correct\n** if the application uses the newer Native Posix Thread Library (NPTL)\n** on linux - with NPTL a lock created by thread A can override locks\n** in thread B.  But there is no way to know at compile-time which\n** threading library is being used.  So there is no way to know at\n** compile-time whether or not thread A can override locks on thread B.\n** One has to do a run-time check to discover the behavior of the\n** current process.\n**\n** SQLite used to support LinuxThreads.  But support for LinuxThreads\n** was dropped beginning with version 3.7.0.  SQLite will still work with\n** LinuxThreads provided that (1) there is no more than one connection\n** per database file in the same process and (2) database connections\n** do not move across threads.\n*/\n\n/*\n** An instance of the following structure serves as the key used\n** to locate a particular unixInodeInfo object.\n*/\nstruct unixFileId {\n  dev_t dev;                  /* Device number */\n#if OS_VXWORKS\n  struct vxworksFileId *pId;  /* Unique file ID for vxworks. */\n#else\n  /* We are told that some versions of Android contain a bug that\n  ** sizes ino_t at only 32-bits instead of 64-bits. (See\n  ** https://android-review.googlesource.com/#/c/115351/3/dist/sqlite3.c)\n  ** To work around this, always allocate 64-bits for the inode number.\n  ** On small machines that only have 32-bit inodes, this wastes 4 bytes,\n  ** but that should not be a big deal. */\n  /* WAS:  ino_t ino;   */\n  u64 ino;                   /* Inode number */\n#endif\n};\n\n/*\n** An instance of the following structure is allocated for each open\n** inode.\n**\n** A single inode can have multiple file descriptors, so each unixFile\n** structure contains a pointer to an instance of this object and this\n** object keeps a count of the number of unixFile pointing to it.\n**\n** Mutex rules:\n**\n**  (1) Only the pLockMutex mutex must be held in order to read or write\n**      any of the locking fields:\n**          nShared, nLock, eFileLock, bProcessLock, pUnused\n**\n**  (2) When nRef>0, then the following fields are unchanging and can\n**      be read (but not written) without holding any mutex:\n**          fileId, pLockMutex\n**\n**  (3) With the exceptions above, all the fields may only be read\n**      or written while holding the global unixBigLock mutex.\n**\n** Deadlock prevention:  The global unixBigLock mutex may not\n** be acquired while holding the pLockMutex mutex.  If both unixBigLock\n** and pLockMutex are needed, then unixBigLock must be acquired first.\n*/\nstruct unixInodeInfo {\n  struct unixFileId fileId;       /* The lookup key */\n  sqlite3_mutex *pLockMutex;      /* Hold this mutex for... */\n  int nShared;                      /* Number of SHARED locks held */\n  int nLock;                        /* Number of outstanding file locks */\n  unsigned char eFileLock;          /* One of SHARED_LOCK, RESERVED_LOCK etc. */\n  unsigned char bProcessLock;       /* An exclusive process lock is held */\n  UnixUnusedFd *pUnused;            /* Unused file descriptors to close */\n  int nRef;                       /* Number of pointers to this structure */\n  unixShmNode *pShmNode;          /* Shared memory associated with this inode */\n  unixInodeInfo *pNext;           /* List of all unixInodeInfo objects */\n  unixInodeInfo *pPrev;           /*    .... doubly linked */\n#if SQLITE_ENABLE_LOCKING_STYLE\n  unsigned long long sharedByte;  /* for AFP simulated shared lock */\n#endif\n#if OS_VXWORKS\n  sem_t *pSem;                    /* Named POSIX semaphore */\n  char aSemName[MAX_PATHNAME+2];  /* Name of that semaphore */\n#endif\n};\n\n/*\n** A lists of all unixInodeInfo objects.\n**\n** Must hold unixBigLock in order to read or write this variable.\n*/\nstatic unixInodeInfo *inodeList = 0;  /* All unixInodeInfo objects */\n\n#ifdef SQLITE_DEBUG\n/*\n** True if the inode mutex (on the unixFile.pFileMutex field) is held, or not.\n** This routine is used only within assert() to help verify correct mutex\n** usage.\n*/\nint unixFileMutexHeld(unixFile *pFile){\n  assert( pFile->pInode );\n  return sqlite3_mutex_held(pFile->pInode->pLockMutex);\n}\nint unixFileMutexNotheld(unixFile *pFile){\n  assert( pFile->pInode );\n  return sqlite3_mutex_notheld(pFile->pInode->pLockMutex);\n}\n#endif\n\n/*\n**\n** This function - unixLogErrorAtLine(), is only ever called via the macro\n** unixLogError().\n**\n** It is invoked after an error occurs in an OS function and errno has been\n** set. It logs a message using sqlite3_log() containing the current value of\n** errno and, if possible, the human-readable equivalent from strerror() or\n** strerror_r().\n**\n** The first argument passed to the macro should be the error code that\n** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).\n** The two subsequent arguments should be the name of the OS function that\n** failed (e.g. \"unlink\", \"open\") and the associated file-system path,\n** if any.\n*/\n#define unixLogError(a,b,c)     unixLogErrorAtLine(a,b,c,__LINE__)\nstatic int unixLogErrorAtLine(\n  int errcode,                    /* SQLite error code */\n  const char *zFunc,              /* Name of OS function that failed */\n  const char *zPath,              /* File path associated with error */\n  int iLine                       /* Source line number where error occurred */\n){\n  char *zErr;                     /* Message from strerror() or equivalent */\n  int iErrno = errno;             /* Saved syscall error number */\n\n  /* If this is not a threadsafe build (SQLITE_THREADSAFE==0), then use\n  ** the strerror() function to obtain the human-readable error message\n  ** equivalent to errno. Otherwise, use strerror_r().\n  */\n#if SQLITE_THREADSAFE && defined(HAVE_STRERROR_R)\n  char aErr[80];\n  memset(aErr, 0, sizeof(aErr));\n  zErr = aErr;\n\n  /* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined,\n  ** assume that the system provides the GNU version of strerror_r() that\n  ** returns a pointer to a buffer containing the error message. That pointer\n  ** may point to aErr[], or it may point to some static storage somewhere.\n  ** Otherwise, assume that the system provides the POSIX version of\n  ** strerror_r(), which always writes an error message into aErr[].\n  **\n  ** If the code incorrectly assumes that it is the POSIX version that is\n  ** available, the error message will often be an empty string. Not a\n  ** huge problem. Incorrectly concluding that the GNU version is available\n  ** could lead to a segfault though.\n  **\n  ** Forum post 3f13857fa4062301 reports that the Android SDK may use\n  ** int-type return, depending on its version.\n  */\n#if (defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)) \\\n  && !defined(ANDROID) && !defined(__ANDROID__)\n  zErr =\n# endif\n  strerror_r(iErrno, aErr, sizeof(aErr)-1);\n\n#elif SQLITE_THREADSAFE\n  /* This is a threadsafe build, but strerror_r() is not available. */\n  zErr = \"\";\n#else\n  /* Non-threadsafe build, use strerror(). */\n  zErr = strerror(iErrno);\n#endif\n\n  if( zPath==0 ) zPath = \"\";\n  sqlite3_log(errcode,\n      \"os_unix.c:%d: (%d) %s(%s) - %s\",\n      iLine, iErrno, zFunc, zPath, zErr\n  );\n\n  return errcode;\n}\n\n/*\n** Close a file descriptor.\n**\n** We assume that close() almost always works, since it is only in a\n** very sick application or on a very sick platform that it might fail.\n** If it does fail, simply leak the file descriptor, but do log the\n** error.\n**\n** Note that it is not safe to retry close() after EINTR since the\n** file descriptor might have already been reused by another thread.\n** So we don't even try to recover from an EINTR.  Just log the error\n** and move on.\n*/\nstatic void robust_close(unixFile *pFile, int h, int lineno){\n  if( osClose(h) ){\n    unixLogErrorAtLine(SQLITE_IOERR_CLOSE, \"close\",\n                       pFile ? pFile->zPath : 0, lineno);\n  }\n}\n\n/*\n** Set the pFile->lastErrno.  Do this in a subroutine as that provides\n** a convenient place to set a breakpoint.\n*/\nstatic void storeLastErrno(unixFile *pFile, int error){\n  pFile->lastErrno = error;\n}\n\n/*\n** Close all file descriptors accumulated in the unixInodeInfo->pUnused list.\n*/\nstatic void closePendingFds(unixFile *pFile){\n  unixInodeInfo *pInode = pFile->pInode;\n  UnixUnusedFd *p;\n  UnixUnusedFd *pNext;\n  assert( unixFileMutexHeld(pFile) );\n  for(p=pInode->pUnused; p; p=pNext){\n    pNext = p->pNext;\n    robust_close(pFile, p->fd, __LINE__);\n    sqlite3_free(p);\n  }\n  pInode->pUnused = 0;\n}\n\n/*\n** Release a unixInodeInfo structure previously allocated by findInodeInfo().\n**\n** The global mutex must be held when this routine is called, but the mutex\n** on the inode being deleted must NOT be held.\n*/\nstatic void releaseInodeInfo(unixFile *pFile){\n  unixInodeInfo *pInode = pFile->pInode;\n  assert( unixMutexHeld() );\n  assert( unixFileMutexNotheld(pFile) );\n  if( ALWAYS(pInode) ){\n    pInode->nRef--;\n    if( pInode->nRef==0 ){\n      assert( pInode->pShmNode==0 );\n      sqlite3_mutex_enter(pInode->pLockMutex);\n      closePendingFds(pFile);\n      sqlite3_mutex_leave(pInode->pLockMutex);\n      if( pInode->pPrev ){\n        assert( pInode->pPrev->pNext==pInode );\n        pInode->pPrev->pNext = pInode->pNext;\n      }else{\n        assert( inodeList==pInode );\n        inodeList = pInode->pNext;\n      }\n      if( pInode->pNext ){\n        assert( pInode->pNext->pPrev==pInode );\n        pInode->pNext->pPrev = pInode->pPrev;\n      }\n      sqlite3_mutex_free(pInode->pLockMutex);\n      sqlite3_free(pInode);\n    }\n  }\n}\n\n/*\n** Given a file descriptor, locate the unixInodeInfo object that\n** describes that file descriptor.  Create a new one if necessary.  The\n** return value might be uninitialized if an error occurs.\n**\n** The global mutex must held when calling this routine.\n**\n** Return an appropriate error code.\n*/\nstatic int findInodeInfo(\n  unixFile *pFile,               /* Unix file with file desc used in the key */\n  unixInodeInfo **ppInode        /* Return the unixInodeInfo object here */\n){\n  int rc;                        /* System call return code */\n  int fd;                        /* The file descriptor for pFile */\n  struct unixFileId fileId;      /* Lookup key for the unixInodeInfo */\n  struct stat statbuf;           /* Low-level file information */\n  unixInodeInfo *pInode = 0;     /* Candidate unixInodeInfo object */\n\n  assert( unixMutexHeld() );\n\n  /* Get low-level information about the file that we can used to\n  ** create a unique name for the file.\n  */\n  fd = pFile->h;\n  rc = osFstat(fd, &statbuf);\n  if( rc!=0 ){\n    storeLastErrno(pFile, errno);\n#if defined(EOVERFLOW) && defined(SQLITE_DISABLE_LFS)\n    if( pFile->lastErrno==EOVERFLOW ) return SQLITE_NOLFS;\n#endif\n    return SQLITE_IOERR;\n  }\n\n#ifdef __APPLE__\n  /* On OS X on an msdos filesystem, the inode number is reported\n  ** incorrectly for zero-size files.  See ticket #3260.  To work\n  ** around this problem (we consider it a bug in OS X, not SQLite)\n  ** we always increase the file size to 1 by writing a single byte\n  ** prior to accessing the inode number.  The one byte written is\n  ** an ASCII 'S' character which also happens to be the first byte\n  ** in the header of every SQLite database.  In this way, if there\n  ** is a race condition such that another thread has already populated\n  ** the first page of the database, no damage is done.\n  */\n  if( statbuf.st_size==0 && (pFile->fsFlags & SQLITE_FSFLAGS_IS_MSDOS)!=0 ){\n    do{ rc = osWrite(fd, \"S\", 1); }while( rc<0 && errno==EINTR );\n    if( rc!=1 ){\n      storeLastErrno(pFile, errno);\n      return SQLITE_IOERR;\n    }\n    if( fsync(fd) ){\n      storeLastErrno(pFile, errno);\n      return SQLITE_IOERR_FSYNC;\n    }\n    rc = osFstat(fd, &statbuf);\n    if( rc!=0 ){\n      storeLastErrno(pFile, errno);\n      return SQLITE_IOERR;\n    }\n  }\n#endif\n\n  memset(&fileId, 0, sizeof(fileId));\n  fileId.dev = statbuf.st_dev;\n#if OS_VXWORKS\n  fileId.pId = pFile->pId;\n#else\n  fileId.ino = (u64)statbuf.st_ino;\n#endif\n  assert( unixMutexHeld() );\n  pInode = inodeList;\n  while( pInode && memcmp(&fileId, &pInode->fileId, sizeof(fileId)) ){\n    pInode = pInode->pNext;\n  }\n  if( pInode==0 ){\n    pInode = sqlite3_malloc64( sizeof(*pInode) );\n    if( pInode==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    memset(pInode, 0, sizeof(*pInode));\n    memcpy(&pInode->fileId, &fileId, sizeof(fileId));\n    if( sqlite3GlobalConfig.bCoreMutex ){\n      pInode->pLockMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);\n      if( pInode->pLockMutex==0 ){\n        sqlite3_free(pInode);\n        return SQLITE_NOMEM_BKPT;\n      }\n    }\n    pInode->nRef = 1;\n    assert( unixMutexHeld() );\n    pInode->pNext = inodeList;\n    pInode->pPrev = 0;\n    if( inodeList ) inodeList->pPrev = pInode;\n    inodeList = pInode;\n  }else{\n    pInode->nRef++;\n  }\n  *ppInode = pInode;\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if pFile has been renamed or unlinked since it was first opened.\n*/\nstatic int fileHasMoved(unixFile *pFile){\n#if OS_VXWORKS\n  return pFile->pInode!=0 && pFile->pId!=pFile->pInode->fileId.pId;\n#else\n  struct stat buf;\n  return pFile->pInode!=0 &&\n      (osStat(pFile->zPath, &buf)!=0\n         || (u64)buf.st_ino!=pFile->pInode->fileId.ino);\n#endif\n}\n\n\n/*\n** Check a unixFile that is a database.  Verify the following:\n**\n** (1) There is exactly one hard link on the file\n** (2) The file is not a symbolic link\n** (3) The file has not been renamed or unlinked\n**\n** Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right.\n*/\nstatic void verifyDbFile(unixFile *pFile){\n  struct stat buf;\n  int rc;\n\n  /* These verifications occurs for the main database only */\n  if( pFile->ctrlFlags & UNIXFILE_NOLOCK ) return;\n\n  rc = osFstat(pFile->h, &buf);\n  if( rc!=0 ){\n    sqlite3_log(SQLITE_WARNING, \"cannot fstat db file %s\", pFile->zPath);\n    return;\n  }\n  if( buf.st_nlink==0 ){\n    sqlite3_log(SQLITE_WARNING, \"file unlinked while open: %s\", pFile->zPath);\n    return;\n  }\n  if( buf.st_nlink>1 ){\n    sqlite3_log(SQLITE_WARNING, \"multiple links to file: %s\", pFile->zPath);\n    return;\n  }\n  if( fileHasMoved(pFile) ){\n    sqlite3_log(SQLITE_WARNING, \"file renamed while open: %s\", pFile->zPath);\n    return;\n  }\n}\n\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, set *pResOut\n** to a non-zero value otherwise *pResOut is set to zero.  The return value\n** is set to SQLITE_OK unless an I/O error occurs during lock checking.\n*/\nstatic int unixCheckReservedLock(sqlite3_file *id, int *pResOut){\n  int rc = SQLITE_OK;\n  int reserved = 0;\n  unixFile *pFile = (unixFile*)id;\n\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n\n  assert( pFile );\n  assert( pFile->eFileLock<=SHARED_LOCK );\n  sqlite3_mutex_enter(pFile->pInode->pLockMutex);\n\n  /* Check if a thread in this process holds such a lock */\n  if( pFile->pInode->eFileLock>SHARED_LOCK ){\n    reserved = 1;\n  }\n\n  /* Otherwise see if some other process holds it.\n  */\n#ifndef __DJGPP__\n  if( !reserved && !pFile->pInode->bProcessLock ){\n    struct flock lock;\n    lock.l_whence = SEEK_SET;\n    lock.l_start = RESERVED_BYTE;\n    lock.l_len = 1;\n    lock.l_type = F_WRLCK;\n    if( osFcntl(pFile->h, F_GETLK, &lock) ){\n      rc = SQLITE_IOERR_CHECKRESERVEDLOCK;\n      storeLastErrno(pFile, errno);\n    } else if( lock.l_type!=F_UNLCK ){\n      reserved = 1;\n    }\n  }\n#endif\n\n  sqlite3_mutex_leave(pFile->pInode->pLockMutex);\n  OSTRACE((\"TEST WR-LOCK %d %d %d (unix)\\n\", pFile->h, rc, reserved));\n\n  *pResOut = reserved;\n  return rc;\n}\n\n/* Forward declaration*/\nstatic int unixSleep(sqlite3_vfs*,int);\n\n/*\n** Set a posix-advisory-lock.\n**\n** There are two versions of this routine.  If compiled with\n** SQLITE_ENABLE_SETLK_TIMEOUT then the routine has an extra parameter\n** which is a pointer to a unixFile.  If the unixFile->iBusyTimeout\n** value is set, then it is the number of milliseconds to wait before\n** failing the lock.  The iBusyTimeout value is always reset back to\n** zero on each call.\n**\n** If SQLITE_ENABLE_SETLK_TIMEOUT is not defined, then do a non-blocking\n** attempt to set the lock.\n*/\n#ifndef SQLITE_ENABLE_SETLK_TIMEOUT\n# define osSetPosixAdvisoryLock(h,x,t) osFcntl(h,F_SETLK,x)\n#else\nstatic int osSetPosixAdvisoryLock(\n  int h,                /* The file descriptor on which to take the lock */\n  struct flock *pLock,  /* The description of the lock */\n  unixFile *pFile       /* Structure holding timeout value */\n){\n  int rc = 0;\n\n  if( pFile->iBusyTimeout==0 ){\n    /* unixFile->iBusyTimeout is set to 0. In this case, attempt a\n    ** non-blocking lock. */\n    rc = osFcntl(h,F_SETLK,pLock);\n  }else{\n    /* unixFile->iBusyTimeout is set to greater than zero. In this case,\n    ** attempt a blocking-lock with a unixFile->iBusyTimeout ms timeout.\n    **\n    ** On systems that support some kind of blocking file lock operation,\n    ** this block should be replaced by code to attempt a blocking lock\n    ** with a timeout of unixFile->iBusyTimeout ms. The code below is\n    ** placeholder code. If SQLITE_TEST is defined, the placeholder code\n    ** retries the lock once every 1ms until it succeeds or the timeout\n    ** is reached. Or, if SQLITE_TEST is not defined, the placeholder\n    ** code attempts a non-blocking lock and sets unixFile->iBusyTimeout\n    ** to 0. This causes the caller to return SQLITE_BUSY, instead of\n    ** SQLITE_BUSY_TIMEOUT to SQLite - as required by a VFS that does not\n    ** support blocking locks.\n    */\n#ifdef SQLITE_TEST\n    int tm = pFile->iBusyTimeout;\n    while( tm>0 ){\n      rc = osFcntl(h,F_SETLK,pLock);\n      if( rc==0 ) break;\n      unixSleep(0,1000);\n      tm--;\n    }\n#else\n    rc = osFcntl(h,F_SETLK,pLock);\n    pFile->iBusyTimeout = 0;\n#endif\n    /* End of code to replace with real blocking-locks code. */\n  }\n\n  return rc;\n}\n#endif /* SQLITE_ENABLE_SETLK_TIMEOUT */\n\n\n/*\n** Attempt to set a system-lock on the file pFile.  The lock is\n** described by pLock.\n**\n** If the pFile was opened read/write from unix-excl, then the only lock\n** ever obtained is an exclusive lock, and it is obtained exactly once\n** the first time any lock is attempted.  All subsequent system locking\n** operations become no-ops.  Locking operations still happen internally,\n** in order to coordinate access between separate database connections\n** within this process, but all of that is handled in memory and the\n** operating system does not participate.\n**\n** This function is a pass-through to fcntl(F_SETLK) if pFile is using\n** any VFS other than \"unix-excl\" or if pFile is opened on \"unix-excl\"\n** and is read-only.\n**\n** Zero is returned if the call completes successfully, or -1 if a call\n** to fcntl() fails. In this case, errno is set appropriately (by fcntl()).\n*/\nstatic int unixFileLock(unixFile *pFile, struct flock *pLock){\n  int rc;\n  unixInodeInfo *pInode = pFile->pInode;\n  assert( pInode!=0 );\n  assert( sqlite3_mutex_held(pInode->pLockMutex) );\n  if( (pFile->ctrlFlags & (UNIXFILE_EXCL|UNIXFILE_RDONLY))==UNIXFILE_EXCL ){\n    if( pInode->bProcessLock==0 ){\n      struct flock lock;\n      /* assert( pInode->nLock==0 ); <-- Not true if unix-excl READONLY used */\n      lock.l_whence = SEEK_SET;\n      lock.l_start = SHARED_FIRST;\n      lock.l_len = SHARED_SIZE;\n      lock.l_type = F_WRLCK;\n      rc = osSetPosixAdvisoryLock(pFile->h, &lock, pFile);\n      if( rc<0 ) return rc;\n      pInode->bProcessLock = 1;\n      pInode->nLock++;\n    }else{\n      rc = 0;\n    }\n  }else{\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    if( pFile->bBlockOnConnect && pLock->l_type==F_RDLCK\n     && pLock->l_start==SHARED_FIRST && pLock->l_len==SHARED_SIZE\n    ){\n      rc = osFcntl(pFile->h, F_SETLKW, pLock);\n    }else\n#endif\n    rc = osSetPosixAdvisoryLock(pFile->h, pLock, pFile);\n  }\n  return rc;\n}\n\n#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)\n/* Forward reference */\nstatic int unixIsSharingShmNode(unixFile*);\n#else\n#define unixIsSharingShmNode(pFile) (0)\n#endif\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n*/\nstatic int unixLock(sqlite3_file *id, int eFileLock){\n  /* The following describes the implementation of the various locks and\n  ** lock transitions in terms of the POSIX advisory shared and exclusive\n  ** lock primitives (called read-locks and write-locks below, to avoid\n  ** confusion with SQLite lock names). The algorithms are complicated\n  ** slightly in order to be compatible with Windows95 systems simultaneously\n  ** accessing the same database file, in case that is ever required.\n  **\n  ** Symbols defined in os.h identify the 'pending byte' and the 'reserved\n  ** byte', each single bytes at well known offsets, and the 'shared byte\n  ** range', a range of 510 bytes at a well known offset.\n  **\n  ** To obtain a SHARED lock, a read-lock is obtained on the 'pending\n  ** byte'.  If this is successful, 'shared byte range' is read-locked\n  ** and the lock on the 'pending byte' released.  (Legacy note:  When\n  ** SQLite was first developed, Windows95 systems were still very common,\n  ** and Windows95 lacks a shared-lock capability.  So on Windows95, a\n  ** single randomly selected by from the 'shared byte range' is locked.\n  ** Windows95 is now pretty much extinct, but this work-around for the\n  ** lack of shared-locks on Windows95 lives on, for backwards\n  ** compatibility.)\n  **\n  ** A process may only obtain a RESERVED lock after it has a SHARED lock.\n  ** A RESERVED lock is implemented by grabbing a write-lock on the\n  ** 'reserved byte'.\n  **\n  ** An EXCLUSIVE lock may only be requested after either a SHARED or\n  ** RESERVED lock is held. An EXCLUSIVE lock is implemented by obtaining\n  ** a write-lock on the entire 'shared byte range'. Since all other locks\n  ** require a read-lock on one of the bytes within this range, this ensures\n  ** that no other locks are held on the database.\n  **\n  ** If a process that holds a RESERVED lock requests an EXCLUSIVE, then\n  ** a PENDING lock is obtained first. A PENDING lock is implemented by\n  ** obtaining a write-lock on the 'pending byte'. This ensures that no new\n  ** SHARED locks can be obtained, but existing SHARED locks are allowed to\n  ** persist. If the call to this function fails to obtain the EXCLUSIVE\n  ** lock in this case, it holds the PENDING lock instead. The client may\n  ** then re-attempt the EXCLUSIVE lock later on, after existing SHARED\n  ** locks have cleared.\n  */\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile*)id;\n  unixInodeInfo *pInode;\n  struct flock lock;\n  int tErrno = 0;\n\n  assert( pFile );\n  OSTRACE((\"LOCK    %d %s was %s(%s,%d) pid=%d (unix)\\n\", pFile->h,\n      azFileLock(eFileLock), azFileLock(pFile->eFileLock),\n      azFileLock(pFile->pInode->eFileLock), pFile->pInode->nShared,\n      osGetpid(0)));\n\n  /* If there is already a lock of this type or more restrictive on the\n  ** unixFile, do nothing. Don't use the end_lock: exit path, as\n  ** unixEnterMutex() hasn't been called yet.\n  */\n  if( pFile->eFileLock>=eFileLock ){\n    OSTRACE((\"LOCK    %d %s ok (already held) (unix)\\n\", pFile->h,\n            azFileLock(eFileLock)));\n    return SQLITE_OK;\n  }\n\n  /* Make sure the locking sequence is correct.\n  **  (1) We never move from unlocked to anything higher than shared lock.\n  **  (2) SQLite never explicitly requests a pending lock.\n  **  (3) A shared lock is always held when a reserve lock is requested.\n  */\n  assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );\n  assert( eFileLock!=PENDING_LOCK );\n  assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );\n\n  /* This mutex is needed because pFile->pInode is shared across threads\n  */\n  pInode = pFile->pInode;\n  sqlite3_mutex_enter(pInode->pLockMutex);\n\n  /* If some thread using this PID has a lock via a different unixFile*\n  ** handle that precludes the requested lock, return BUSY.\n  */\n  if( (pFile->eFileLock!=pInode->eFileLock &&\n          (pInode->eFileLock>=PENDING_LOCK || eFileLock>SHARED_LOCK))\n  ){\n    rc = SQLITE_BUSY;\n    goto end_lock;\n  }\n\n  /* If a SHARED lock is requested, and some thread using this PID already\n  ** has a SHARED or RESERVED lock, then increment reference counts and\n  ** return SQLITE_OK.\n  */\n  if( eFileLock==SHARED_LOCK &&\n      (pInode->eFileLock==SHARED_LOCK || pInode->eFileLock==RESERVED_LOCK) ){\n    assert( eFileLock==SHARED_LOCK );\n    assert( pFile->eFileLock==0 );\n    assert( pInode->nShared>0 );\n    pFile->eFileLock = SHARED_LOCK;\n    pInode->nShared++;\n    pInode->nLock++;\n    goto end_lock;\n  }\n\n\n  /* A PENDING lock is needed before acquiring a SHARED lock and before\n  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will\n  ** be released.\n  */\n  lock.l_len = 1L;\n  lock.l_whence = SEEK_SET;\n  if( eFileLock==SHARED_LOCK\n   || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock==RESERVED_LOCK)\n  ){\n    lock.l_type = (eFileLock==SHARED_LOCK?F_RDLCK:F_WRLCK);\n    lock.l_start = PENDING_BYTE;\n    if( unixFileLock(pFile, &lock) ){\n      tErrno = errno;\n      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);\n      if( rc!=SQLITE_BUSY ){\n        storeLastErrno(pFile, tErrno);\n      }\n      goto end_lock;\n    }else if( eFileLock==EXCLUSIVE_LOCK ){\n      pFile->eFileLock = PENDING_LOCK;\n      pInode->eFileLock = PENDING_LOCK;\n    }\n  }\n\n\n  /* If control gets to this point, then actually go ahead and make\n  ** operating system calls for the specified lock.\n  */\n  if( eFileLock==SHARED_LOCK ){\n    assert( pInode->nShared==0 );\n    assert( pInode->eFileLock==0 );\n    assert( rc==SQLITE_OK );\n\n    /* Now get the read-lock */\n    lock.l_start = SHARED_FIRST;\n    lock.l_len = SHARED_SIZE;\n    if( unixFileLock(pFile, &lock) ){\n      tErrno = errno;\n      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);\n    }\n\n    /* Drop the temporary PENDING lock */\n    lock.l_start = PENDING_BYTE;\n    lock.l_len = 1L;\n    lock.l_type = F_UNLCK;\n    if( unixFileLock(pFile, &lock) && rc==SQLITE_OK ){\n      /* This could happen with a network mount */\n      tErrno = errno;\n      rc = SQLITE_IOERR_UNLOCK;\n    }\n\n    if( rc ){\n      if( rc!=SQLITE_BUSY ){\n        storeLastErrno(pFile, tErrno);\n      }\n      goto end_lock;\n    }else{\n      pFile->eFileLock = SHARED_LOCK;\n      pInode->nLock++;\n      pInode->nShared = 1;\n    }\n  }else if( eFileLock==EXCLUSIVE_LOCK && pInode->nShared>1 ){\n    /* We are trying for an exclusive lock but another thread in this\n    ** same process is still holding a shared lock. */\n    rc = SQLITE_BUSY;\n  }else if( unixIsSharingShmNode(pFile) ){\n    /* We are in WAL mode and attempting to delete the SHM and WAL\n    ** files due to closing the connection or changing out of WAL mode,\n    ** but another process still holds locks on the SHM file, thus\n    ** indicating that database locks have been broken, perhaps due\n    ** to a rogue close(open(dbFile)) or similar.\n    */\n    rc = SQLITE_BUSY;\n  }else{\n    /* The request was for a RESERVED or EXCLUSIVE lock.  It is\n    ** assumed that there is a SHARED or greater lock on the file\n    ** already.\n    */\n    assert( 0!=pFile->eFileLock );\n    lock.l_type = F_WRLCK;\n\n    assert( eFileLock==RESERVED_LOCK || eFileLock==EXCLUSIVE_LOCK );\n    if( eFileLock==RESERVED_LOCK ){\n      lock.l_start = RESERVED_BYTE;\n      lock.l_len = 1L;\n    }else{\n      lock.l_start = SHARED_FIRST;\n      lock.l_len = SHARED_SIZE;\n    }\n\n    if( unixFileLock(pFile, &lock) ){\n      tErrno = errno;\n      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);\n      if( rc!=SQLITE_BUSY ){\n        storeLastErrno(pFile, tErrno);\n      }\n    }\n  }\n\n\n#ifdef SQLITE_DEBUG\n  /* Set up the transaction-counter change checking flags when\n  ** transitioning from a SHARED to a RESERVED lock.  The change\n  ** from SHARED to RESERVED marks the beginning of a normal\n  ** write operation (not a hot journal rollback).\n  */\n  if( rc==SQLITE_OK\n   && pFile->eFileLock<=SHARED_LOCK\n   && eFileLock==RESERVED_LOCK\n  ){\n    pFile->transCntrChng = 0;\n    pFile->dbUpdate = 0;\n    pFile->inNormalWrite = 1;\n  }\n#endif\n\n  if( rc==SQLITE_OK ){\n    pFile->eFileLock = eFileLock;\n    pInode->eFileLock = eFileLock;\n  }\n\nend_lock:\n  sqlite3_mutex_leave(pInode->pLockMutex);\n  OSTRACE((\"LOCK    %d %s %s (unix)\\n\", pFile->h, azFileLock(eFileLock),\n      rc==SQLITE_OK ? \"ok\" : \"failed\"));\n  return rc;\n}\n\n/*\n** Add the file descriptor used by file handle pFile to the corresponding\n** pUnused list.\n*/\nstatic void setPendingFd(unixFile *pFile){\n  unixInodeInfo *pInode = pFile->pInode;\n  UnixUnusedFd *p = pFile->pPreallocatedUnused;\n  assert( unixFileMutexHeld(pFile) );\n  p->pNext = pInode->pUnused;\n  pInode->pUnused = p;\n  pFile->h = -1;\n  pFile->pPreallocatedUnused = 0;\n}\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n**\n** If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED\n** the byte range is divided into 2 parts and the first part is unlocked then\n** set to a read lock, then the other part is simply unlocked.  This works\n** around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to\n** remove the write lock on a region when a read lock is set.\n*/\nstatic int posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){\n  unixFile *pFile = (unixFile*)id;\n  unixInodeInfo *pInode;\n  struct flock lock;\n  int rc = SQLITE_OK;\n\n  assert( pFile );\n  OSTRACE((\"UNLOCK  %d %d was %d(%d,%d) pid=%d (unix)\\n\", pFile->h, eFileLock,\n      pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,\n      osGetpid(0)));\n\n  assert( eFileLock<=SHARED_LOCK );\n  if( pFile->eFileLock<=eFileLock ){\n    return SQLITE_OK;\n  }\n  pInode = pFile->pInode;\n  sqlite3_mutex_enter(pInode->pLockMutex);\n  assert( pInode->nShared!=0 );\n  if( pFile->eFileLock>SHARED_LOCK ){\n    assert( pInode->eFileLock==pFile->eFileLock );\n\n#ifdef SQLITE_DEBUG\n    /* When reducing a lock such that other processes can start\n    ** reading the database file again, make sure that the\n    ** transaction counter was updated if any part of the database\n    ** file changed.  If the transaction counter is not updated,\n    ** other connections to the same file might not realize that\n    ** the file has changed and hence might not know to flush their\n    ** cache.  The use of a stale cache can lead to database corruption.\n    */\n    pFile->inNormalWrite = 0;\n#endif\n\n    /* downgrading to a shared lock on NFS involves clearing the write lock\n    ** before establishing the readlock - to avoid a race condition we downgrade\n    ** the lock in 2 blocks, so that part of the range will be covered by a\n    ** write lock until the rest is covered by a read lock:\n    **  1:   [WWWWW]\n    **  2:   [....W]\n    **  3:   [RRRRW]\n    **  4:   [RRRR.]\n    */\n    if( eFileLock==SHARED_LOCK ){\n#if !defined(__APPLE__) || !SQLITE_ENABLE_LOCKING_STYLE\n      (void)handleNFSUnlock;\n      assert( handleNFSUnlock==0 );\n#endif\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n      if( handleNFSUnlock ){\n        int tErrno;               /* Error code from system call errors */\n        off_t divSize = SHARED_SIZE - 1;\n\n        lock.l_type = F_UNLCK;\n        lock.l_whence = SEEK_SET;\n        lock.l_start = SHARED_FIRST;\n        lock.l_len = divSize;\n        if( unixFileLock(pFile, &lock)==(-1) ){\n          tErrno = errno;\n          rc = SQLITE_IOERR_UNLOCK;\n          storeLastErrno(pFile, tErrno);\n          goto end_unlock;\n        }\n        lock.l_type = F_RDLCK;\n        lock.l_whence = SEEK_SET;\n        lock.l_start = SHARED_FIRST;\n        lock.l_len = divSize;\n        if( unixFileLock(pFile, &lock)==(-1) ){\n          tErrno = errno;\n          rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK);\n          if( IS_LOCK_ERROR(rc) ){\n            storeLastErrno(pFile, tErrno);\n          }\n          goto end_unlock;\n        }\n        lock.l_type = F_UNLCK;\n        lock.l_whence = SEEK_SET;\n        lock.l_start = SHARED_FIRST+divSize;\n        lock.l_len = SHARED_SIZE-divSize;\n        if( unixFileLock(pFile, &lock)==(-1) ){\n          tErrno = errno;\n          rc = SQLITE_IOERR_UNLOCK;\n          storeLastErrno(pFile, tErrno);\n          goto end_unlock;\n        }\n      }else\n#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */\n      {\n        lock.l_type = F_RDLCK;\n        lock.l_whence = SEEK_SET;\n        lock.l_start = SHARED_FIRST;\n        lock.l_len = SHARED_SIZE;\n        if( unixFileLock(pFile, &lock) ){\n          /* In theory, the call to unixFileLock() cannot fail because another\n          ** process is holding an incompatible lock. If it does, this\n          ** indicates that the other process is not following the locking\n          ** protocol. If this happens, return SQLITE_IOERR_RDLOCK. Returning\n          ** SQLITE_BUSY would confuse the upper layer (in practice it causes\n          ** an assert to fail). */\n          rc = SQLITE_IOERR_RDLOCK;\n          storeLastErrno(pFile, errno);\n          goto end_unlock;\n        }\n      }\n    }\n    lock.l_type = F_UNLCK;\n    lock.l_whence = SEEK_SET;\n    lock.l_start = PENDING_BYTE;\n    lock.l_len = 2L;  assert( PENDING_BYTE+1==RESERVED_BYTE );\n    if( unixFileLock(pFile, &lock)==0 ){\n      pInode->eFileLock = SHARED_LOCK;\n    }else{\n      rc = SQLITE_IOERR_UNLOCK;\n      storeLastErrno(pFile, errno);\n      goto end_unlock;\n    }\n  }\n  if( eFileLock==NO_LOCK ){\n    /* Decrement the shared lock counter.  Release the lock using an\n    ** OS call only when all threads in this same process have released\n    ** the lock.\n    */\n    pInode->nShared--;\n    if( pInode->nShared==0 ){\n      lock.l_type = F_UNLCK;\n      lock.l_whence = SEEK_SET;\n      lock.l_start = lock.l_len = 0L;\n      if( unixFileLock(pFile, &lock)==0 ){\n        pInode->eFileLock = NO_LOCK;\n      }else{\n        rc = SQLITE_IOERR_UNLOCK;\n        storeLastErrno(pFile, errno);\n        pInode->eFileLock = NO_LOCK;\n        pFile->eFileLock = NO_LOCK;\n      }\n    }\n\n    /* Decrement the count of locks against this same file.  When the\n    ** count reaches zero, close any other file descriptors whose close\n    ** was deferred because of outstanding locks.\n    */\n    pInode->nLock--;\n    assert( pInode->nLock>=0 );\n    if( pInode->nLock==0 ) closePendingFds(pFile);\n  }\n\nend_unlock:\n  sqlite3_mutex_leave(pInode->pLockMutex);\n  if( rc==SQLITE_OK ){\n    pFile->eFileLock = eFileLock;\n  }\n  return rc;\n}\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n*/\nstatic int unixUnlock(sqlite3_file *id, int eFileLock){\n#if SQLITE_MAX_MMAP_SIZE>0\n  assert( eFileLock==SHARED_LOCK || ((unixFile *)id)->nFetchOut==0 );\n#endif\n  return posixUnlock(id, eFileLock, 0);\n}\n\n#if SQLITE_MAX_MMAP_SIZE>0\nstatic int unixMapfile(unixFile *pFd, i64 nByte);\nstatic void unixUnmapfile(unixFile *pFd);\n#endif\n\n/*\n** This function performs the parts of the \"close file\" operation\n** common to all locking schemes. It closes the directory and file\n** handles, if they are valid, and sets all fields of the unixFile\n** structure to 0.\n**\n** It is *not* necessary to hold the mutex when this routine is called,\n** even on VxWorks.  A mutex will be acquired on VxWorks by the\n** vxworksReleaseFileId() routine.\n*/\nstatic int closeUnixFile(sqlite3_file *id){\n  unixFile *pFile = (unixFile*)id;\n#if SQLITE_MAX_MMAP_SIZE>0\n  unixUnmapfile(pFile);\n#endif\n  if( pFile->h>=0 ){\n    robust_close(pFile, pFile->h, __LINE__);\n    pFile->h = -1;\n  }\n#if OS_VXWORKS\n  if( pFile->pId ){\n    if( pFile->ctrlFlags & UNIXFILE_DELETE ){\n      osUnlink(pFile->pId->zCanonicalName);\n    }\n    vxworksReleaseFileId(pFile->pId);\n    pFile->pId = 0;\n  }\n#endif\n#ifdef SQLITE_UNLINK_AFTER_CLOSE\n  if( pFile->ctrlFlags & UNIXFILE_DELETE ){\n    osUnlink(pFile->zPath);\n    sqlite3_free(*(char**)&pFile->zPath);\n    pFile->zPath = 0;\n  }\n#endif\n  OSTRACE((\"CLOSE   %-3d\\n\", pFile->h));\n  OpenCounter(-1);\n  sqlite3_free(pFile->pPreallocatedUnused);\n  memset(pFile, 0, sizeof(unixFile));\n  return SQLITE_OK;\n}\n\n/*\n** Close a file.\n*/\nstatic int unixClose(sqlite3_file *id){\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile *)id;\n  unixInodeInfo *pInode = pFile->pInode;\n\n  assert( pInode!=0 );\n  verifyDbFile(pFile);\n  unixUnlock(id, NO_LOCK);\n  assert( unixFileMutexNotheld(pFile) );\n  unixEnterMutex();\n\n  /* unixFile.pInode is always valid here. Otherwise, a different close\n  ** routine (e.g. nolockClose()) would be called instead.\n  */\n  assert( pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0 );\n  sqlite3_mutex_enter(pInode->pLockMutex);\n  if( pInode->nLock ){\n    /* If there are outstanding locks, do not actually close the file just\n    ** yet because that would clear those locks.  Instead, add the file\n    ** descriptor to pInode->pUnused list.  It will be automatically closed\n    ** when the last lock is cleared.\n    */\n    setPendingFd(pFile);\n  }\n  sqlite3_mutex_leave(pInode->pLockMutex);\n  releaseInodeInfo(pFile);\n  assert( pFile->pShm==0 );\n  rc = closeUnixFile(id);\n  unixLeaveMutex();\n  return rc;\n}\n\n/************** End of the posix advisory lock implementation *****************\n******************************************************************************/\n\n/******************************************************************************\n****************************** No-op Locking **********************************\n**\n** Of the various locking implementations available, this is by far the\n** simplest:  locking is ignored.  No attempt is made to lock the database\n** file for reading or writing.\n**\n** This locking mode is appropriate for use on read-only databases\n** (ex: databases that are burned into CD-ROM, for example.)  It can\n** also be used if the application employs some external mechanism to\n** prevent simultaneous access of the same database by two or more\n** database connections.  But there is a serious risk of database\n** corruption if this locking mode is used in situations where multiple\n** database connections are accessing the same database file at the same\n** time and one or more of those connections are writing.\n*/\n\nstatic int nolockCheckReservedLock(sqlite3_file *NotUsed, int *pResOut){\n  UNUSED_PARAMETER(NotUsed);\n  *pResOut = 0;\n  return SQLITE_OK;\n}\nstatic int nolockLock(sqlite3_file *NotUsed, int NotUsed2){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  return SQLITE_OK;\n}\nstatic int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  return SQLITE_OK;\n}\n\n/*\n** Close the file.\n*/\nstatic int nolockClose(sqlite3_file *id) {\n  return closeUnixFile(id);\n}\n\n/******************* End of the no-op lock implementation *********************\n******************************************************************************/\n\n/******************************************************************************\n************************* Begin dot-file Locking ******************************\n**\n** The dotfile locking implementation uses the existence of separate lock\n** files (really a directory) to control access to the database.  This works\n** on just about every filesystem imaginable.  But there are serious downsides:\n**\n**    (1)  There is zero concurrency.  A single reader blocks all other\n**         connections from reading or writing the database.\n**\n**    (2)  An application crash or power loss can leave stale lock files\n**         sitting around that need to be cleared manually.\n**\n** Nevertheless, a dotlock is an appropriate locking mode for use if no\n** other locking strategy is available.\n**\n** Dotfile locking works by creating a subdirectory in the same directory as\n** the database and with the same name but with a \".lock\" extension added.\n** The existence of a lock directory implies an EXCLUSIVE lock.  All other\n** lock types (SHARED, RESERVED, PENDING) are mapped into EXCLUSIVE.\n*/\n\n/*\n** The file suffix added to the data base filename in order to create the\n** lock directory.\n*/\n#define DOTLOCK_SUFFIX \".lock\"\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If the caller holds a SHARED\n** or greater lock when it is called, then it is assumed that no other\n** client may hold RESERVED. Or, if the caller holds no lock, then it\n** is assumed another client holds RESERVED if the lock-file exists.\n*/\nstatic int dotlockCheckReservedLock(sqlite3_file *id, int *pResOut) {\n  unixFile *pFile = (unixFile*)id;\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n\n  if( pFile->eFileLock>=SHARED_LOCK ){\n    *pResOut = 0;\n  }else{\n    *pResOut = osAccess((const char*)pFile->lockingContext, 0)==0;\n  }\n  OSTRACE((\"TEST WR-LOCK %d %d %d (dotlock)\\n\", pFile->h, 0, *pResOut));\n  return SQLITE_OK;\n}\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n**\n** With dotfile locking, we really only support state (4): EXCLUSIVE.\n** But we track the other locking levels internally.\n*/\nstatic int dotlockLock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  char *zLockFile = (char *)pFile->lockingContext;\n  int rc = SQLITE_OK;\n\n\n  /* If we have any lock, then the lock file already exists.  All we have\n  ** to do is adjust our internal record of the lock level.\n  */\n  if( pFile->eFileLock > NO_LOCK ){\n    pFile->eFileLock = eFileLock;\n    /* Always update the timestamp on the old file */\n#ifdef HAVE_UTIME\n    utime(zLockFile, NULL);\n#else\n    utimes(zLockFile, NULL);\n#endif\n    return SQLITE_OK;\n  }\n\n  /* grab an exclusive lock */\n  rc = osMkdir(zLockFile, 0777);\n  if( rc<0 ){\n    /* failed to open/create the lock directory */\n    int tErrno = errno;\n    if( EEXIST == tErrno ){\n      rc = SQLITE_BUSY;\n    } else {\n      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);\n      if( rc!=SQLITE_BUSY ){\n        storeLastErrno(pFile, tErrno);\n      }\n    }\n    return rc;\n  }\n\n  /* got it, set the type and return ok */\n  pFile->eFileLock = eFileLock;\n  return rc;\n}\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n**\n** When the locking level reaches NO_LOCK, delete the lock file.\n*/\nstatic int dotlockUnlock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  char *zLockFile = (char *)pFile->lockingContext;\n  int rc;\n\n  assert( pFile );\n  OSTRACE((\"UNLOCK  %d %d was %d pid=%d (dotlock)\\n\", pFile->h, eFileLock,\n           pFile->eFileLock, osGetpid(0)));\n  assert( eFileLock<=SHARED_LOCK );\n\n  /* no-op if possible */\n  if( pFile->eFileLock==eFileLock ){\n    return SQLITE_OK;\n  }\n\n  /* To downgrade to shared, simply update our internal notion of the\n  ** lock state.  No need to mess with the file on disk.\n  */\n  if( eFileLock==SHARED_LOCK ){\n    pFile->eFileLock = SHARED_LOCK;\n    return SQLITE_OK;\n  }\n\n  /* To fully unlock the database, delete the lock file */\n  assert( eFileLock==NO_LOCK );\n  rc = osRmdir(zLockFile);\n  if( rc<0 ){\n    int tErrno = errno;\n    if( tErrno==ENOENT ){\n      rc = SQLITE_OK;\n    }else{\n      rc = SQLITE_IOERR_UNLOCK;\n      storeLastErrno(pFile, tErrno);\n    }\n    return rc;\n  }\n  pFile->eFileLock = NO_LOCK;\n  return SQLITE_OK;\n}\n\n/*\n** Close a file.  Make sure the lock has been released before closing.\n*/\nstatic int dotlockClose(sqlite3_file *id) {\n  unixFile *pFile = (unixFile*)id;\n  assert( id!=0 );\n  dotlockUnlock(id, NO_LOCK);\n  sqlite3_free(pFile->lockingContext);\n  return closeUnixFile(id);\n}\n/****************** End of the dot-file lock implementation *******************\n******************************************************************************/\n\n/******************************************************************************\n************************** Begin flock Locking ********************************\n**\n** Use the flock() system call to do file locking.\n**\n** flock() locking is like dot-file locking in that the various\n** fine-grain locking levels supported by SQLite are collapsed into\n** a single exclusive lock.  In other words, SHARED, RESERVED, and\n** PENDING locks are the same thing as an EXCLUSIVE lock.  SQLite\n** still works when you do this, but concurrency is reduced since\n** only a single process can be reading the database at a time.\n**\n** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off\n*/\n#if SQLITE_ENABLE_LOCKING_STYLE\n\n/*\n** Retry flock() calls that fail with EINTR\n*/\n#ifdef EINTR\nstatic int robust_flock(int fd, int op){\n  int rc;\n  do{ rc = flock(fd,op); }while( rc<0 && errno==EINTR );\n  return rc;\n}\n#else\n# define robust_flock(a,b) flock(a,b)\n#endif\n\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, set *pResOut\n** to a non-zero value otherwise *pResOut is set to zero.  The return value\n** is set to SQLITE_OK unless an I/O error occurs during lock checking.\n*/\nstatic int flockCheckReservedLock(sqlite3_file *id, int *pResOut){\n#ifdef SQLITE_DEBUG\n  unixFile *pFile = (unixFile*)id;\n#else\n  UNUSED_PARAMETER(id);\n#endif\n\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n\n  assert( pFile );\n  assert( pFile->eFileLock<=SHARED_LOCK );\n\n  /* The flock VFS only ever takes exclusive locks (see function flockLock).\n  ** Therefore, if this connection is holding any lock at all, no other\n  ** connection may be holding a RESERVED lock. So set *pResOut to 0\n  ** in this case.\n  **\n  ** Or, this connection may be holding no lock. In that case, set *pResOut to\n  ** 0 as well. The caller will then attempt to take an EXCLUSIVE lock on the\n  ** db in order to roll the hot journal back. If there is another connection\n  ** holding a lock, that attempt will fail and an SQLITE_BUSY returned to\n  ** the user. With other VFS, we try to avoid this, in order to allow a reader\n  ** to proceed while a writer is preparing its transaction. But that won't\n  ** work with the flock VFS - as it always takes EXCLUSIVE locks - so it is\n  ** not a problem in this case.  */\n  *pResOut = 0;\n\n  return SQLITE_OK;\n}\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** flock() only really support EXCLUSIVE locks.  We track intermediate\n** lock states in the sqlite3_file structure, but all locks SHARED or\n** above are really EXCLUSIVE locks and exclude all other processes from\n** access the file.\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n*/\nstatic int flockLock(sqlite3_file *id, int eFileLock) {\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile*)id;\n\n  assert( pFile );\n\n  /* if we already have a lock, it is exclusive.\n  ** Just adjust level and punt on outta here. */\n  if (pFile->eFileLock > NO_LOCK) {\n    pFile->eFileLock = eFileLock;\n    return SQLITE_OK;\n  }\n\n  /* grab an exclusive lock */\n\n  if (robust_flock(pFile->h, LOCK_EX | LOCK_NB)) {\n    int tErrno = errno;\n    /* didn't get, must be busy */\n    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);\n    if( IS_LOCK_ERROR(rc) ){\n      storeLastErrno(pFile, tErrno);\n    }\n  } else {\n    /* got it, set the type and return ok */\n    pFile->eFileLock = eFileLock;\n  }\n  OSTRACE((\"LOCK    %d %s %s (flock)\\n\", pFile->h, azFileLock(eFileLock),\n           rc==SQLITE_OK ? \"ok\" : \"failed\"));\n#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS\n  if( (rc & 0xff) == SQLITE_IOERR ){\n    rc = SQLITE_BUSY;\n  }\n#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */\n  return rc;\n}\n\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n*/\nstatic int flockUnlock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n\n  assert( pFile );\n  OSTRACE((\"UNLOCK  %d %d was %d pid=%d (flock)\\n\", pFile->h, eFileLock,\n           pFile->eFileLock, osGetpid(0)));\n  assert( eFileLock<=SHARED_LOCK );\n\n  /* no-op if possible */\n  if( pFile->eFileLock==eFileLock ){\n    return SQLITE_OK;\n  }\n\n  /* shared can just be set because we always have an exclusive */\n  if (eFileLock==SHARED_LOCK) {\n    pFile->eFileLock = eFileLock;\n    return SQLITE_OK;\n  }\n\n  /* no, really, unlock. */\n  if( robust_flock(pFile->h, LOCK_UN) ){\n#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS\n    return SQLITE_OK;\n#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */\n    return SQLITE_IOERR_UNLOCK;\n  }else{\n    pFile->eFileLock = NO_LOCK;\n    return SQLITE_OK;\n  }\n}\n\n/*\n** Close a file.\n*/\nstatic int flockClose(sqlite3_file *id) {\n  assert( id!=0 );\n  flockUnlock(id, NO_LOCK);\n  return closeUnixFile(id);\n}\n\n#endif /* SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORK */\n\n/******************* End of the flock lock implementation *********************\n******************************************************************************/\n\n/******************************************************************************\n************************ Begin Named Semaphore Locking ************************\n**\n** Named semaphore locking is only supported on VxWorks.\n**\n** Semaphore locking is like dot-lock and flock in that it really only\n** supports EXCLUSIVE locking.  Only a single process can read or write\n** the database file at a time.  This reduces potential concurrency, but\n** makes the lock implementation much easier.\n*/\n#if OS_VXWORKS\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, set *pResOut\n** to a non-zero value otherwise *pResOut is set to zero.  The return value\n** is set to SQLITE_OK unless an I/O error occurs during lock checking.\n*/\nstatic int semXCheckReservedLock(sqlite3_file *id, int *pResOut) {\n  int rc = SQLITE_OK;\n  int reserved = 0;\n  unixFile *pFile = (unixFile*)id;\n\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n\n  assert( pFile );\n\n  /* Check if a thread in this process holds such a lock */\n  if( pFile->eFileLock>SHARED_LOCK ){\n    reserved = 1;\n  }\n\n  /* Otherwise see if some other process holds it. */\n  if( !reserved ){\n    sem_t *pSem = pFile->pInode->pSem;\n\n    if( sem_trywait(pSem)==-1 ){\n      int tErrno = errno;\n      if( EAGAIN != tErrno ){\n        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_CHECKRESERVEDLOCK);\n        storeLastErrno(pFile, tErrno);\n      } else {\n        /* someone else has the lock when we are in NO_LOCK */\n        reserved = (pFile->eFileLock < SHARED_LOCK);\n      }\n    }else{\n      /* we could have it if we want it */\n      sem_post(pSem);\n    }\n  }\n  OSTRACE((\"TEST WR-LOCK %d %d %d (sem)\\n\", pFile->h, rc, reserved));\n\n  *pResOut = reserved;\n  return rc;\n}\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** Semaphore locks only really support EXCLUSIVE locks.  We track intermediate\n** lock states in the sqlite3_file structure, but all locks SHARED or\n** above are really EXCLUSIVE locks and exclude all other processes from\n** access the file.\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n*/\nstatic int semXLock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  sem_t *pSem = pFile->pInode->pSem;\n  int rc = SQLITE_OK;\n\n  /* if we already have a lock, it is exclusive.\n  ** Just adjust level and punt on outta here. */\n  if (pFile->eFileLock > NO_LOCK) {\n    pFile->eFileLock = eFileLock;\n    rc = SQLITE_OK;\n    goto sem_end_lock;\n  }\n\n  /* lock semaphore now but bail out when already locked. */\n  if( sem_trywait(pSem)==-1 ){\n    rc = SQLITE_BUSY;\n    goto sem_end_lock;\n  }\n\n  /* got it, set the type and return ok */\n  pFile->eFileLock = eFileLock;\n\n sem_end_lock:\n  return rc;\n}\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n*/\nstatic int semXUnlock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  sem_t *pSem = pFile->pInode->pSem;\n\n  assert( pFile );\n  assert( pSem );\n  OSTRACE((\"UNLOCK  %d %d was %d pid=%d (sem)\\n\", pFile->h, eFileLock,\n           pFile->eFileLock, osGetpid(0)));\n  assert( eFileLock<=SHARED_LOCK );\n\n  /* no-op if possible */\n  if( pFile->eFileLock==eFileLock ){\n    return SQLITE_OK;\n  }\n\n  /* shared can just be set because we always have an exclusive */\n  if (eFileLock==SHARED_LOCK) {\n    pFile->eFileLock = eFileLock;\n    return SQLITE_OK;\n  }\n\n  /* no, really unlock. */\n  if ( sem_post(pSem)==-1 ) {\n    int rc, tErrno = errno;\n    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);\n    if( IS_LOCK_ERROR(rc) ){\n      storeLastErrno(pFile, tErrno);\n    }\n    return rc;\n  }\n  pFile->eFileLock = NO_LOCK;\n  return SQLITE_OK;\n}\n\n/*\n ** Close a file.\n */\nstatic int semXClose(sqlite3_file *id) {\n  if( id ){\n    unixFile *pFile = (unixFile*)id;\n    semXUnlock(id, NO_LOCK);\n    assert( pFile );\n    assert( unixFileMutexNotheld(pFile) );\n    unixEnterMutex();\n    releaseInodeInfo(pFile);\n    unixLeaveMutex();\n    closeUnixFile(id);\n  }\n  return SQLITE_OK;\n}\n\n#endif /* OS_VXWORKS */\n/*\n** Named semaphore locking is only available on VxWorks.\n**\n*************** End of the named semaphore lock implementation ****************\n******************************************************************************/\n\n\n/******************************************************************************\n*************************** Begin AFP Locking *********************************\n**\n** AFP is the Apple Filing Protocol.  AFP is a network filesystem found\n** on Apple Macintosh computers - both OS9 and OSX.\n**\n** Third-party implementations of AFP are available.  But this code here\n** only works on OSX.\n*/\n\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n/*\n** The afpLockingContext structure contains all afp lock specific state\n*/\ntypedef struct afpLockingContext afpLockingContext;\nstruct afpLockingContext {\n  int reserved;\n  const char *dbPath;             /* Name of the open file */\n};\n\nstruct ByteRangeLockPB2\n{\n  unsigned long long offset;        /* offset to first byte to lock */\n  unsigned long long length;        /* nbr of bytes to lock */\n  unsigned long long retRangeStart; /* nbr of 1st byte locked if successful */\n  unsigned char unLockFlag;         /* 1 = unlock, 0 = lock */\n  unsigned char startEndFlag;       /* 1=rel to end of fork, 0=rel to start */\n  int fd;                           /* file desc to assoc this lock with */\n};\n\n#define afpfsByteRangeLock2FSCTL        _IOWR('z', 23, struct ByteRangeLockPB2)\n\n/*\n** This is a utility for setting or clearing a bit-range lock on an\n** AFP filesystem.\n**\n** Return SQLITE_OK on success, SQLITE_BUSY on failure.\n*/\nstatic int afpSetLock(\n  const char *path,              /* Name of the file to be locked or unlocked */\n  unixFile *pFile,               /* Open file descriptor on path */\n  unsigned long long offset,     /* First byte to be locked */\n  unsigned long long length,     /* Number of bytes to lock */\n  int setLockFlag                /* True to set lock.  False to clear lock */\n){\n  struct ByteRangeLockPB2 pb;\n  int err;\n\n  pb.unLockFlag = setLockFlag ? 0 : 1;\n  pb.startEndFlag = 0;\n  pb.offset = offset;\n  pb.length = length;\n  pb.fd = pFile->h;\n\n  OSTRACE((\"AFPSETLOCK [%s] for %d%s in range %llx:%llx\\n\",\n    (setLockFlag?\"ON\":\"OFF\"), pFile->h, (pb.fd==-1?\"[testval-1]\":\"\"),\n    offset, length));\n  err = fsctl(path, afpfsByteRangeLock2FSCTL, &pb, 0);\n  if ( err==-1 ) {\n    int rc;\n    int tErrno = errno;\n    OSTRACE((\"AFPSETLOCK failed to fsctl() '%s' %d %s\\n\",\n             path, tErrno, strerror(tErrno)));\n#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS\n    rc = SQLITE_BUSY;\n#else\n    rc = sqliteErrorFromPosixError(tErrno,\n                    setLockFlag ? SQLITE_IOERR_LOCK : SQLITE_IOERR_UNLOCK);\n#endif /* SQLITE_IGNORE_AFP_LOCK_ERRORS */\n    if( IS_LOCK_ERROR(rc) ){\n      storeLastErrno(pFile, tErrno);\n    }\n    return rc;\n  } else {\n    return SQLITE_OK;\n  }\n}\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, set *pResOut\n** to a non-zero value otherwise *pResOut is set to zero.  The return value\n** is set to SQLITE_OK unless an I/O error occurs during lock checking.\n*/\nstatic int afpCheckReservedLock(sqlite3_file *id, int *pResOut){\n  int rc = SQLITE_OK;\n  int reserved = 0;\n  unixFile *pFile = (unixFile*)id;\n  afpLockingContext *context;\n\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n\n  assert( pFile );\n  context = (afpLockingContext *) pFile->lockingContext;\n  if( context->reserved ){\n    *pResOut = 1;\n    return SQLITE_OK;\n  }\n  sqlite3_mutex_enter(pFile->pInode->pLockMutex);\n  /* Check if a thread in this process holds such a lock */\n  if( pFile->pInode->eFileLock>SHARED_LOCK ){\n    reserved = 1;\n  }\n\n  /* Otherwise see if some other process holds it.\n   */\n  if( !reserved ){\n    /* lock the RESERVED byte */\n    int lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);\n    if( SQLITE_OK==lrc ){\n      /* if we succeeded in taking the reserved lock, unlock it to restore\n      ** the original state */\n      lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);\n    } else {\n      /* if we failed to get the lock then someone else must have it */\n      reserved = 1;\n    }\n    if( IS_LOCK_ERROR(lrc) ){\n      rc=lrc;\n    }\n  }\n\n  sqlite3_mutex_leave(pFile->pInode->pLockMutex);\n  OSTRACE((\"TEST WR-LOCK %d %d %d (afp)\\n\", pFile->h, rc, reserved));\n\n  *pResOut = reserved;\n  return rc;\n}\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n*/\nstatic int afpLock(sqlite3_file *id, int eFileLock){\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile*)id;\n  unixInodeInfo *pInode = pFile->pInode;\n  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;\n\n  assert( pFile );\n  OSTRACE((\"LOCK    %d %s was %s(%s,%d) pid=%d (afp)\\n\", pFile->h,\n           azFileLock(eFileLock), azFileLock(pFile->eFileLock),\n           azFileLock(pInode->eFileLock), pInode->nShared , osGetpid(0)));\n\n  /* If there is already a lock of this type or more restrictive on the\n  ** unixFile, do nothing. Don't use the afp_end_lock: exit path, as\n  ** unixEnterMutex() hasn't been called yet.\n  */\n  if( pFile->eFileLock>=eFileLock ){\n    OSTRACE((\"LOCK    %d %s ok (already held) (afp)\\n\", pFile->h,\n           azFileLock(eFileLock)));\n    return SQLITE_OK;\n  }\n\n  /* Make sure the locking sequence is correct\n  **  (1) We never move from unlocked to anything higher than shared lock.\n  **  (2) SQLite never explicitly requests a pending lock.\n  **  (3) A shared lock is always held when a reserve lock is requested.\n  */\n  assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );\n  assert( eFileLock!=PENDING_LOCK );\n  assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );\n\n  /* This mutex is needed because pFile->pInode is shared across threads\n  */\n  pInode = pFile->pInode;\n  sqlite3_mutex_enter(pInode->pLockMutex);\n\n  /* If some thread using this PID has a lock via a different unixFile*\n  ** handle that precludes the requested lock, return BUSY.\n  */\n  if( (pFile->eFileLock!=pInode->eFileLock &&\n       (pInode->eFileLock>=PENDING_LOCK || eFileLock>SHARED_LOCK))\n     ){\n    rc = SQLITE_BUSY;\n    goto afp_end_lock;\n  }\n\n  /* If a SHARED lock is requested, and some thread using this PID already\n  ** has a SHARED or RESERVED lock, then increment reference counts and\n  ** return SQLITE_OK.\n  */\n  if( eFileLock==SHARED_LOCK &&\n     (pInode->eFileLock==SHARED_LOCK || pInode->eFileLock==RESERVED_LOCK) ){\n    assert( eFileLock==SHARED_LOCK );\n    assert( pFile->eFileLock==0 );\n    assert( pInode->nShared>0 );\n    pFile->eFileLock = SHARED_LOCK;\n    pInode->nShared++;\n    pInode->nLock++;\n    goto afp_end_lock;\n  }\n\n  /* A PENDING lock is needed before acquiring a SHARED lock and before\n  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will\n  ** be released.\n  */\n  if( eFileLock==SHARED_LOCK\n      || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock<PENDING_LOCK)\n  ){\n    int failed;\n    failed = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 1);\n    if (failed) {\n      rc = failed;\n      goto afp_end_lock;\n    }\n  }\n\n  /* If control gets to this point, then actually go ahead and make\n  ** operating system calls for the specified lock.\n  */\n  if( eFileLock==SHARED_LOCK ){\n    int lrc1, lrc2, lrc1Errno = 0;\n    long lk, mask;\n\n    assert( pInode->nShared==0 );\n    assert( pInode->eFileLock==0 );\n\n    mask = (sizeof(long)==8) ? LARGEST_INT64 : 0x7fffffff;\n    /* Now get the read-lock SHARED_LOCK */\n    /* note that the quality of the randomness doesn't matter that much */\n    lk = random();\n    pInode->sharedByte = (lk & mask)%(SHARED_SIZE - 1);\n    lrc1 = afpSetLock(context->dbPath, pFile,\n          SHARED_FIRST+pInode->sharedByte, 1, 1);\n    if( IS_LOCK_ERROR(lrc1) ){\n      lrc1Errno = pFile->lastErrno;\n    }\n    /* Drop the temporary PENDING lock */\n    lrc2 = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);\n\n    if( IS_LOCK_ERROR(lrc1) ) {\n      storeLastErrno(pFile, lrc1Errno);\n      rc = lrc1;\n      goto afp_end_lock;\n    } else if( IS_LOCK_ERROR(lrc2) ){\n      rc = lrc2;\n      goto afp_end_lock;\n    } else if( lrc1 != SQLITE_OK ) {\n      rc = lrc1;\n    } else {\n      pFile->eFileLock = SHARED_LOCK;\n      pInode->nLock++;\n      pInode->nShared = 1;\n    }\n  }else if( eFileLock==EXCLUSIVE_LOCK && pInode->nShared>1 ){\n    /* We are trying for an exclusive lock but another thread in this\n     ** same process is still holding a shared lock. */\n    rc = SQLITE_BUSY;\n  }else{\n    /* The request was for a RESERVED or EXCLUSIVE lock.  It is\n    ** assumed that there is a SHARED or greater lock on the file\n    ** already.\n    */\n    int failed = 0;\n    assert( 0!=pFile->eFileLock );\n    if (eFileLock >= RESERVED_LOCK && pFile->eFileLock < RESERVED_LOCK) {\n        /* Acquire a RESERVED lock */\n        failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);\n      if( !failed ){\n        context->reserved = 1;\n      }\n    }\n    if (!failed && eFileLock == EXCLUSIVE_LOCK) {\n      /* Acquire an EXCLUSIVE lock */\n\n      /* Remove the shared lock before trying the range.  we'll need to\n      ** reestablish the shared lock if we can't get the  afpUnlock\n      */\n      if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST +\n                         pInode->sharedByte, 1, 0)) ){\n        int failed2 = SQLITE_OK;\n        /* now attempt to get the exclusive lock range */\n        failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST,\n                               SHARED_SIZE, 1);\n        if( failed && (failed2 = afpSetLock(context->dbPath, pFile,\n                       SHARED_FIRST + pInode->sharedByte, 1, 1)) ){\n          /* Can't reestablish the shared lock.  Sqlite can't deal, this is\n          ** a critical I/O error\n          */\n          rc = ((failed & 0xff) == SQLITE_IOERR) ? failed2 :\n               SQLITE_IOERR_LOCK;\n          goto afp_end_lock;\n        }\n      }else{\n        rc = failed;\n      }\n    }\n    if( failed ){\n      rc = failed;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    pFile->eFileLock = eFileLock;\n    pInode->eFileLock = eFileLock;\n  }else if( eFileLock==EXCLUSIVE_LOCK ){\n    pFile->eFileLock = PENDING_LOCK;\n    pInode->eFileLock = PENDING_LOCK;\n  }\n\nafp_end_lock:\n  sqlite3_mutex_leave(pInode->pLockMutex);\n  OSTRACE((\"LOCK    %d %s %s (afp)\\n\", pFile->h, azFileLock(eFileLock),\n         rc==SQLITE_OK ? \"ok\" : \"failed\"));\n  return rc;\n}\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n*/\nstatic int afpUnlock(sqlite3_file *id, int eFileLock) {\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile*)id;\n  unixInodeInfo *pInode;\n  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;\n  int skipShared = 0;\n\n  assert( pFile );\n  OSTRACE((\"UNLOCK  %d %d was %d(%d,%d) pid=%d (afp)\\n\", pFile->h, eFileLock,\n           pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,\n           osGetpid(0)));\n\n  assert( eFileLock<=SHARED_LOCK );\n  if( pFile->eFileLock<=eFileLock ){\n    return SQLITE_OK;\n  }\n  pInode = pFile->pInode;\n  sqlite3_mutex_enter(pInode->pLockMutex);\n  assert( pInode->nShared!=0 );\n  if( pFile->eFileLock>SHARED_LOCK ){\n    assert( pInode->eFileLock==pFile->eFileLock );\n\n#ifdef SQLITE_DEBUG\n    /* When reducing a lock such that other processes can start\n    ** reading the database file again, make sure that the\n    ** transaction counter was updated if any part of the database\n    ** file changed.  If the transaction counter is not updated,\n    ** other connections to the same file might not realize that\n    ** the file has changed and hence might not know to flush their\n    ** cache.  The use of a stale cache can lead to database corruption.\n    */\n    assert( pFile->inNormalWrite==0\n           || pFile->dbUpdate==0\n           || pFile->transCntrChng==1 );\n    pFile->inNormalWrite = 0;\n#endif\n\n    if( pFile->eFileLock==EXCLUSIVE_LOCK ){\n      rc = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0);\n      if( rc==SQLITE_OK && (eFileLock==SHARED_LOCK || pInode->nShared>1) ){\n        /* only re-establish the shared lock if necessary */\n        int sharedLockByte = SHARED_FIRST+pInode->sharedByte;\n        rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 1);\n      } else {\n        skipShared = 1;\n      }\n    }\n    if( rc==SQLITE_OK && pFile->eFileLock>=PENDING_LOCK ){\n      rc = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);\n    }\n    if( rc==SQLITE_OK && pFile->eFileLock>=RESERVED_LOCK && context->reserved ){\n      rc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);\n      if( !rc ){\n        context->reserved = 0;\n      }\n    }\n    if( rc==SQLITE_OK && (eFileLock==SHARED_LOCK || pInode->nShared>1)){\n      pInode->eFileLock = SHARED_LOCK;\n    }\n  }\n  if( rc==SQLITE_OK && eFileLock==NO_LOCK ){\n\n    /* Decrement the shared lock counter.  Release the lock using an\n    ** OS call only when all threads in this same process have released\n    ** the lock.\n    */\n    unsigned long long sharedLockByte = SHARED_FIRST+pInode->sharedByte;\n    pInode->nShared--;\n    if( pInode->nShared==0 ){\n      if( !skipShared ){\n        rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 0);\n      }\n      if( !rc ){\n        pInode->eFileLock = NO_LOCK;\n        pFile->eFileLock = NO_LOCK;\n      }\n    }\n    if( rc==SQLITE_OK ){\n      pInode->nLock--;\n      assert( pInode->nLock>=0 );\n      if( pInode->nLock==0 ) closePendingFds(pFile);\n    }\n  }\n\n  sqlite3_mutex_leave(pInode->pLockMutex);\n  if( rc==SQLITE_OK ){\n    pFile->eFileLock = eFileLock;\n  }\n  return rc;\n}\n\n/*\n** Close a file & cleanup AFP specific locking context\n*/\nstatic int afpClose(sqlite3_file *id) {\n  int rc = SQLITE_OK;\n  unixFile *pFile = (unixFile*)id;\n  assert( id!=0 );\n  afpUnlock(id, NO_LOCK);\n  assert( unixFileMutexNotheld(pFile) );\n  unixEnterMutex();\n  if( pFile->pInode ){\n    unixInodeInfo *pInode = pFile->pInode;\n    sqlite3_mutex_enter(pInode->pLockMutex);\n    if( pInode->nLock ){\n      /* If there are outstanding locks, do not actually close the file just\n      ** yet because that would clear those locks.  Instead, add the file\n      ** descriptor to pInode->aPending.  It will be automatically closed when\n      ** the last lock is cleared.\n      */\n      setPendingFd(pFile);\n    }\n    sqlite3_mutex_leave(pInode->pLockMutex);\n  }\n  releaseInodeInfo(pFile);\n  sqlite3_free(pFile->lockingContext);\n  rc = closeUnixFile(id);\n  unixLeaveMutex();\n  return rc;\n}\n\n#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */\n/*\n** The code above is the AFP lock implementation.  The code is specific\n** to MacOSX and does not work on other unix platforms.  No alternative\n** is available.  If you don't compile for a mac, then the \"unix-afp\"\n** VFS is not available.\n**\n********************* End of the AFP lock implementation **********************\n******************************************************************************/\n\n/******************************************************************************\n*************************** Begin NFS Locking ********************************/\n\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n/*\n ** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n ** must be either NO_LOCK or SHARED_LOCK.\n **\n ** If the locking level of the file descriptor is already at or below\n ** the requested locking level, this routine is a no-op.\n */\nstatic int nfsUnlock(sqlite3_file *id, int eFileLock){\n  return posixUnlock(id, eFileLock, 1);\n}\n\n#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */\n/*\n** The code above is the NFS lock implementation.  The code is specific\n** to MacOSX and does not work on other unix platforms.  No alternative\n** is available.\n**\n********************* End of the NFS lock implementation **********************\n******************************************************************************/\n\n/******************************************************************************\n**************** Non-locking sqlite3_file methods *****************************\n**\n** The next division contains implementations for all methods of the\n** sqlite3_file object other than the locking methods.  The locking\n** methods were defined in divisions above (one locking method per\n** division).  Those methods that are common to all locking modes\n** are gather together into this division.\n*/\n\n/*\n** Seek to the offset passed as the second argument, then read cnt\n** bytes into pBuf. Return the number of bytes actually read.\n**\n** To avoid stomping the errno value on a failed read the lastErrno value\n** is set before returning.\n*/\nstatic int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){\n  int got;\n  int prior = 0;\n#if (!defined(USE_PREAD) && !defined(USE_PREAD64))\n  i64 newOffset;\n#endif\n  TIMER_START;\n  assert( cnt==(cnt&0x1ffff) );\n  assert( id->h>2 );\n  do{\n#if defined(USE_PREAD)\n    got = osPread(id->h, pBuf, cnt, offset);\n    SimulateIOError( got = -1 );\n#elif defined(USE_PREAD64)\n    got = osPread64(id->h, pBuf, cnt, offset);\n    SimulateIOError( got = -1 );\n#else\n    newOffset = lseek(id->h, offset, SEEK_SET);\n    SimulateIOError( newOffset = -1 );\n    if( newOffset<0 ){\n      storeLastErrno((unixFile*)id, errno);\n      return -1;\n    }\n    got = osRead(id->h, pBuf, cnt);\n#endif\n    if( got==cnt ) break;\n    if( got<0 ){\n      if( errno==EINTR ){ got = 1; continue; }\n      prior = 0;\n      storeLastErrno((unixFile*)id,  errno);\n      break;\n    }else if( got>0 ){\n      cnt -= got;\n      offset += got;\n      prior += got;\n      pBuf = (void*)(got + (char*)pBuf);\n    }\n  }while( got>0 );\n  TIMER_END;\n  OSTRACE((\"READ    %-3d %5d %7lld %llu\\n\",\n            id->h, got+prior, offset-prior, TIMER_ELAPSED));\n  return got+prior;\n}\n\n/*\n** Read data from a file into a buffer.  Return SQLITE_OK if all\n** bytes were read successfully and SQLITE_IOERR if anything goes\n** wrong.\n*/\nstatic int unixRead(\n  sqlite3_file *id,\n  void *pBuf,\n  int amt,\n  sqlite3_int64 offset\n){\n  unixFile *pFile = (unixFile *)id;\n  int got;\n  assert( id );\n  assert( offset>=0 );\n  assert( amt>0 );\n\n  /* If this is a database file (not a journal, super-journal or temp\n  ** file), the bytes in the locking range should never be read or written. */\n#if 0\n  assert( pFile->pPreallocatedUnused==0\n       || offset>=PENDING_BYTE+512\n       || offset+amt<=PENDING_BYTE\n  );\n#endif\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  /* Deal with as much of this read request as possible by transferring\n  ** data from the memory mapping using memcpy().  */\n  if( offset<pFile->mmapSize ){\n    if( offset+amt <= pFile->mmapSize ){\n      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);\n      return SQLITE_OK;\n    }else{\n      int nCopy = pFile->mmapSize - offset;\n      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);\n      pBuf = &((u8 *)pBuf)[nCopy];\n      amt -= nCopy;\n      offset += nCopy;\n    }\n  }\n#endif\n\n  got = seekAndRead(pFile, offset, pBuf, amt);\n  if( got==amt ){\n    return SQLITE_OK;\n  }else if( got<0 ){\n    /* pFile->lastErrno has been set by seekAndRead().\n    ** Usually we return SQLITE_IOERR_READ here, though for some\n    ** kinds of errors we return SQLITE_IOERR_CORRUPTFS.  The\n    ** SQLITE_IOERR_CORRUPTFS will be converted into SQLITE_CORRUPT\n    ** prior to returning to the application by the sqlite3ApiExit()\n    ** routine.\n    */\n    switch( pFile->lastErrno ){\n      case ERANGE:\n      case EIO:\n#ifdef ENXIO\n      case ENXIO:\n#endif\n#ifdef EDEVERR\n      case EDEVERR:\n#endif\n        return SQLITE_IOERR_CORRUPTFS;\n    }\n    return SQLITE_IOERR_READ;\n  }else{\n    storeLastErrno(pFile, 0);   /* not a system error */\n    /* Unread parts of the buffer must be zero-filled */\n    memset(&((char*)pBuf)[got], 0, amt-got);\n    return SQLITE_IOERR_SHORT_READ;\n  }\n}\n\n/*\n** Attempt to seek the file-descriptor passed as the first argument to\n** absolute offset iOff, then attempt to write nBuf bytes of data from\n** pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,\n** return the actual number of bytes written (which may be less than\n** nBuf).\n*/\nstatic int seekAndWriteFd(\n  int fd,                         /* File descriptor to write to */\n  i64 iOff,                       /* File offset to begin writing at */\n  const void *pBuf,               /* Copy data from this buffer to the file */\n  int nBuf,                       /* Size of buffer pBuf in bytes */\n  int *piErrno                    /* OUT: Error number if error occurs */\n){\n  int rc = 0;                     /* Value returned by system call */\n\n  assert( nBuf==(nBuf&0x1ffff) );\n  assert( fd>2 );\n  assert( piErrno!=0 );\n  nBuf &= 0x1ffff;\n  TIMER_START;\n\n#if defined(USE_PREAD)\n  do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );\n#elif defined(USE_PREAD64)\n  do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);\n#else\n  do{\n    i64 iSeek = lseek(fd, iOff, SEEK_SET);\n    SimulateIOError( iSeek = -1 );\n    if( iSeek<0 ){\n      rc = -1;\n      break;\n    }\n    rc = osWrite(fd, pBuf, nBuf);\n  }while( rc<0 && errno==EINTR );\n#endif\n\n  TIMER_END;\n  OSTRACE((\"WRITE   %-3d %5d %7lld %llu\\n\", fd, rc, iOff, TIMER_ELAPSED));\n\n  if( rc<0 ) *piErrno = errno;\n  return rc;\n}\n\n\n/*\n** Seek to the offset in id->offset then read cnt bytes into pBuf.\n** Return the number of bytes actually read.  Update the offset.\n**\n** To avoid stomping the errno value on a failed write the lastErrno value\n** is set before returning.\n*/\nstatic int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){\n  return seekAndWriteFd(id->h, offset, pBuf, cnt, &id->lastErrno);\n}\n\n\n/*\n** Write data from a buffer into a file.  Return SQLITE_OK on success\n** or some other error code on failure.\n*/\nstatic int unixWrite(\n  sqlite3_file *id,\n  const void *pBuf,\n  int amt,\n  sqlite3_int64 offset\n){\n  unixFile *pFile = (unixFile*)id;\n  int wrote = 0;\n  assert( id );\n  assert( amt>0 );\n\n  /* If this is a database file (not a journal, super-journal or temp\n  ** file), the bytes in the locking range should never be read or written. */\n#if 0\n  assert( pFile->pPreallocatedUnused==0\n       || offset>=PENDING_BYTE+512\n       || offset+amt<=PENDING_BYTE\n  );\n#endif\n\n#ifdef SQLITE_DEBUG\n  /* If we are doing a normal write to a database file (as opposed to\n  ** doing a hot-journal rollback or a write to some file other than a\n  ** normal database file) then record the fact that the database\n  ** has changed.  If the transaction counter is modified, record that\n  ** fact too.\n  */\n  if( pFile->inNormalWrite ){\n    pFile->dbUpdate = 1;  /* The database has been modified */\n    if( offset<=24 && offset+amt>=27 ){\n      int rc;\n      char oldCntr[4];\n      SimulateIOErrorBenign(1);\n      rc = seekAndRead(pFile, 24, oldCntr, 4);\n      SimulateIOErrorBenign(0);\n      if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){\n        pFile->transCntrChng = 1;  /* The transaction counter has changed */\n      }\n    }\n  }\n#endif\n\n#if defined(SQLITE_MMAP_READWRITE) && SQLITE_MAX_MMAP_SIZE>0\n  /* Deal with as much of this write request as possible by transferring\n  ** data from the memory mapping using memcpy().  */\n  if( offset<pFile->mmapSize ){\n    if( offset+amt <= pFile->mmapSize ){\n      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);\n      return SQLITE_OK;\n    }else{\n      int nCopy = pFile->mmapSize - offset;\n      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);\n      pBuf = &((u8 *)pBuf)[nCopy];\n      amt -= nCopy;\n      offset += nCopy;\n    }\n  }\n#endif\n\n  while( (wrote = seekAndWrite(pFile, offset, pBuf, amt))<amt && wrote>0 ){\n    amt -= wrote;\n    offset += wrote;\n    pBuf = &((char*)pBuf)[wrote];\n  }\n  SimulateIOError(( wrote=(-1), amt=1 ));\n  SimulateDiskfullError(( wrote=0, amt=1 ));\n\n  if( amt>wrote ){\n    if( wrote<0 && pFile->lastErrno!=ENOSPC ){\n      /* lastErrno set by seekAndWrite */\n      return SQLITE_IOERR_WRITE;\n    }else{\n      storeLastErrno(pFile, 0); /* not a system error */\n      return SQLITE_FULL;\n    }\n  }\n\n  return SQLITE_OK;\n}\n\n#ifdef SQLITE_TEST\n/*\n** Count the number of fullsyncs and normal syncs.  This is used to test\n** that syncs and fullsyncs are occurring at the right times.\n*/\nSQLITE_API int sqlite3_sync_count = 0;\nSQLITE_API int sqlite3_fullsync_count = 0;\n#endif\n\n/*\n** We do not trust systems to provide a working fdatasync().  Some do.\n** Others do no.  To be safe, we will stick with the (slightly slower)\n** fsync(). If you know that your system does support fdatasync() correctly,\n** then simply compile with -Dfdatasync=fdatasync or -DHAVE_FDATASYNC\n*/\n#if !defined(fdatasync) && !HAVE_FDATASYNC\n# define fdatasync fsync\n#endif\n\n/*\n** Define HAVE_FULLFSYNC to 0 or 1 depending on whether or not\n** the F_FULLFSYNC macro is defined.  F_FULLFSYNC is currently\n** only available on Mac OS X.  But that could change.\n*/\n#ifdef F_FULLFSYNC\n# define HAVE_FULLFSYNC 1\n#else\n# define HAVE_FULLFSYNC 0\n#endif\n\n\n/*\n** The fsync() system call does not work as advertised on many\n** unix systems.  The following procedure is an attempt to make\n** it work better.\n**\n** The SQLITE_NO_SYNC macro disables all fsync()s.  This is useful\n** for testing when we want to run through the test suite quickly.\n** You are strongly advised *not* to deploy with SQLITE_NO_SYNC\n** enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash\n** or power failure will likely corrupt the database file.\n**\n** SQLite sets the dataOnly flag if the size of the file is unchanged.\n** The idea behind dataOnly is that it should only write the file content\n** to disk, not the inode.  We only set dataOnly if the file size is\n** unchanged since the file size is part of the inode.  However,\n** Ted Ts'o tells us that fdatasync() will also write the inode if the\n** file size has changed.  The only real difference between fdatasync()\n** and fsync(), Ted tells us, is that fdatasync() will not flush the\n** inode if the mtime or owner or other inode attributes have changed.\n** We only care about the file size, not the other file attributes, so\n** as far as SQLite is concerned, an fdatasync() is always adequate.\n** So, we always use fdatasync() if it is available, regardless of\n** the value of the dataOnly flag.\n*/\nstatic int full_fsync(int fd, int fullSync, int dataOnly){\n  int rc;\n\n  /* The following \"ifdef/elif/else/\" block has the same structure as\n  ** the one below. It is replicated here solely to avoid cluttering\n  ** up the real code with the UNUSED_PARAMETER() macros.\n  */\n#ifdef SQLITE_NO_SYNC\n  UNUSED_PARAMETER(fd);\n  UNUSED_PARAMETER(fullSync);\n  UNUSED_PARAMETER(dataOnly);\n#elif HAVE_FULLFSYNC\n  UNUSED_PARAMETER(dataOnly);\n#else\n  UNUSED_PARAMETER(fullSync);\n  UNUSED_PARAMETER(dataOnly);\n#endif\n\n  /* Record the number of times that we do a normal fsync() and\n  ** FULLSYNC.  This is used during testing to verify that this procedure\n  ** gets called with the correct arguments.\n  */\n#ifdef SQLITE_TEST\n  if( fullSync ) sqlite3_fullsync_count++;\n  sqlite3_sync_count++;\n#endif\n\n  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a\n  ** no-op.  But go ahead and call fstat() to validate the file\n  ** descriptor as we need a method to provoke a failure during\n  ** coverage testing.\n  */\n#ifdef SQLITE_NO_SYNC\n  {\n    struct stat buf;\n    rc = osFstat(fd, &buf);\n  }\n#elif HAVE_FULLFSYNC\n  if( fullSync ){\n    rc = osFcntl(fd, F_FULLFSYNC, 0);\n  }else{\n    rc = 1;\n  }\n  /* If the FULLFSYNC failed, fall back to attempting an fsync().\n  ** It shouldn't be possible for fullfsync to fail on the local\n  ** file system (on OSX), so failure indicates that FULLFSYNC\n  ** isn't supported for this file system. So, attempt an fsync\n  ** and (for now) ignore the overhead of a superfluous fcntl call.\n  ** It'd be better to detect fullfsync support once and avoid\n  ** the fcntl call every time sync is called.\n  */\n  if( rc ) rc = fsync(fd);\n\n#elif defined(__APPLE__)\n  /* fdatasync() on HFS+ doesn't yet flush the file size if it changed correctly\n  ** so currently we default to the macro that redefines fdatasync to fsync\n  */\n  rc = fsync(fd);\n#else\n  rc = fdatasync(fd);\n#if OS_VXWORKS\n  if( rc==-1 && errno==ENOTSUP ){\n    rc = fsync(fd);\n  }\n#endif /* OS_VXWORKS */\n#endif /* ifdef SQLITE_NO_SYNC elif HAVE_FULLFSYNC */\n\n  if( OS_VXWORKS && rc!= -1 ){\n    rc = 0;\n  }\n  return rc;\n}\n\n/*\n** Open a file descriptor to the directory containing file zFilename.\n** If successful, *pFd is set to the opened file descriptor and\n** SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM\n** or SQLITE_CANTOPEN is returned and *pFd is set to an undefined\n** value.\n**\n** The directory file descriptor is used for only one thing - to\n** fsync() a directory to make sure file creation and deletion events\n** are flushed to disk.  Such fsyncs are not needed on newer\n** journaling filesystems, but are required on older filesystems.\n**\n** This routine can be overridden using the xSetSysCall interface.\n** The ability to override this routine was added in support of the\n** chromium sandbox.  Opening a directory is a security risk (we are\n** told) so making it overrideable allows the chromium sandbox to\n** replace this routine with a harmless no-op.  To make this routine\n** a no-op, replace it with a stub that returns SQLITE_OK but leaves\n** *pFd set to a negative number.\n**\n** If SQLITE_OK is returned, the caller is responsible for closing\n** the file descriptor *pFd using close().\n*/\nstatic int openDirectory(const char *zFilename, int *pFd){\n  int ii;\n  int fd = -1;\n  char zDirname[MAX_PATHNAME+1];\n\n  sqlite3_snprintf(MAX_PATHNAME, zDirname, \"%s\", zFilename);\n  for(ii=(int)strlen(zDirname); ii>0 && zDirname[ii]!='/'; ii--);\n  if( ii>0 ){\n    zDirname[ii] = '\\0';\n  }else{\n    if( zDirname[0]!='/' ) zDirname[0] = '.';\n    zDirname[1] = 0;\n  }\n  fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0);\n  if( fd>=0 ){\n    OSTRACE((\"OPENDIR %-3d %s\\n\", fd, zDirname));\n  }\n  *pFd = fd;\n  if( fd>=0 ) return SQLITE_OK;\n  return unixLogError(SQLITE_CANTOPEN_BKPT, \"openDirectory\", zDirname);\n}\n\n/*\n** Make sure all writes to a particular file are committed to disk.\n**\n** If dataOnly==0 then both the file itself and its metadata (file\n** size, access time, etc) are synced.  If dataOnly!=0 then only the\n** file data is synced.\n**\n** Under Unix, also make sure that the directory entry for the file\n** has been created by fsync-ing the directory that contains the file.\n** If we do not do this and we encounter a power failure, the directory\n** entry for the journal might not exist after we reboot.  The next\n** SQLite to access the file will not know that the journal exists (because\n** the directory entry for the journal was never created) and the transaction\n** will not roll back - possibly leading to database corruption.\n*/\nstatic int unixSync(sqlite3_file *id, int flags){\n  int rc;\n  unixFile *pFile = (unixFile*)id;\n\n  int isDataOnly = (flags&SQLITE_SYNC_DATAONLY);\n  int isFullsync = (flags&0x0F)==SQLITE_SYNC_FULL;\n\n  /* Check that one of SQLITE_SYNC_NORMAL or FULL was passed */\n  assert((flags&0x0F)==SQLITE_SYNC_NORMAL\n      || (flags&0x0F)==SQLITE_SYNC_FULL\n  );\n\n  /* Unix cannot, but some systems may return SQLITE_FULL from here. This\n  ** line is to test that doing so does not cause any problems.\n  */\n  SimulateDiskfullError( return SQLITE_FULL );\n\n  assert( pFile );\n  OSTRACE((\"SYNC    %-3d\\n\", pFile->h));\n  rc = full_fsync(pFile->h, isFullsync, isDataOnly);\n  SimulateIOError( rc=1 );\n  if( rc ){\n    storeLastErrno(pFile, errno);\n    return unixLogError(SQLITE_IOERR_FSYNC, \"full_fsync\", pFile->zPath);\n  }\n\n  /* Also fsync the directory containing the file if the DIRSYNC flag\n  ** is set.  This is a one-time occurrence.  Many systems (examples: AIX)\n  ** are unable to fsync a directory, so ignore errors on the fsync.\n  */\n  if( pFile->ctrlFlags & UNIXFILE_DIRSYNC ){\n    int dirfd;\n    OSTRACE((\"DIRSYNC %s (have_fullfsync=%d fullsync=%d)\\n\", pFile->zPath,\n            HAVE_FULLFSYNC, isFullsync));\n    rc = osOpenDirectory(pFile->zPath, &dirfd);\n    if( rc==SQLITE_OK ){\n      full_fsync(dirfd, 0, 0);\n      robust_close(pFile, dirfd, __LINE__);\n    }else{\n      assert( rc==SQLITE_CANTOPEN );\n      rc = SQLITE_OK;\n    }\n    pFile->ctrlFlags &= ~UNIXFILE_DIRSYNC;\n  }\n  return rc;\n}\n\n/*\n** Truncate an open file to a specified size\n*/\nstatic int unixTruncate(sqlite3_file *id, i64 nByte){\n  unixFile *pFile = (unixFile *)id;\n  int rc;\n  assert( pFile );\n  SimulateIOError( return SQLITE_IOERR_TRUNCATE );\n\n  /* If the user has configured a chunk-size for this file, truncate the\n  ** file so that it consists of an integer number of chunks (i.e. the\n  ** actual file size after the operation may be larger than the requested\n  ** size).\n  */\n  if( pFile->szChunk>0 ){\n    nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;\n  }\n\n  rc = robust_ftruncate(pFile->h, nByte);\n  if( rc ){\n    storeLastErrno(pFile, errno);\n    return unixLogError(SQLITE_IOERR_TRUNCATE, \"ftruncate\", pFile->zPath);\n  }else{\n#ifdef SQLITE_DEBUG\n    /* If we are doing a normal write to a database file (as opposed to\n    ** doing a hot-journal rollback or a write to some file other than a\n    ** normal database file) and we truncate the file to zero length,\n    ** that effectively updates the change counter.  This might happen\n    ** when restoring a database using the backup API from a zero-length\n    ** source.\n    */\n    if( pFile->inNormalWrite && nByte==0 ){\n      pFile->transCntrChng = 1;\n    }\n#endif\n\n#if SQLITE_MAX_MMAP_SIZE>0\n    /* If the file was just truncated to a size smaller than the currently\n    ** mapped region, reduce the effective mapping size as well. SQLite will\n    ** use read() and write() to access data beyond this point from now on.\n    */\n    if( nByte<pFile->mmapSize ){\n      pFile->mmapSize = nByte;\n    }\n#endif\n\n    return SQLITE_OK;\n  }\n}\n\n/*\n** Determine the current size of a file in bytes\n*/\nstatic int unixFileSize(sqlite3_file *id, i64 *pSize){\n  int rc;\n  struct stat buf;\n  assert( id );\n  rc = osFstat(((unixFile*)id)->h, &buf);\n  SimulateIOError( rc=1 );\n  if( rc!=0 ){\n    storeLastErrno((unixFile*)id, errno);\n    return SQLITE_IOERR_FSTAT;\n  }\n  *pSize = buf.st_size;\n\n  /* When opening a zero-size database, the findInodeInfo() procedure\n  ** writes a single byte into that file in order to work around a bug\n  ** in the OS-X msdos filesystem.  In order to avoid problems with upper\n  ** layers, we need to report this file size as zero even though it is\n  ** really 1.   Ticket #3260.\n  */\n  if( *pSize==1 ) *pSize = 0;\n\n\n  return SQLITE_OK;\n}\n\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n/*\n** Handler for proxy-locking file-control verbs.  Defined below in the\n** proxying locking division.\n*/\nstatic int proxyFileControl(sqlite3_file*,int,void*);\n#endif\n\n/*\n** This function is called to handle the SQLITE_FCNTL_SIZE_HINT\n** file-control operation.  Enlarge the database to nBytes in size\n** (rounded up to the next chunk-size).  If the database is already\n** nBytes or larger, this routine is a no-op.\n*/\nstatic int fcntlSizeHint(unixFile *pFile, i64 nByte){\n  if( pFile->szChunk>0 ){\n    i64 nSize;                    /* Required file size */\n    struct stat buf;              /* Used to hold return values of fstat() */\n\n    if( osFstat(pFile->h, &buf) ){\n      return SQLITE_IOERR_FSTAT;\n    }\n\n    nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;\n    if( nSize>(i64)buf.st_size ){\n\n#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE\n      /* The code below is handling the return value of osFallocate()\n      ** correctly. posix_fallocate() is defined to \"returns zero on success,\n      ** or an error number on  failure\". See the manpage for details. */\n      int err;\n      do{\n        err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);\n      }while( err==EINTR );\n      if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;\n#else\n      /* If the OS does not have posix_fallocate(), fake it. Write a\n      ** single byte to the last byte in each block that falls entirely\n      ** within the extended region. Then, if required, a single byte\n      ** at offset (nSize-1), to set the size of the file correctly.\n      ** This is a similar technique to that used by glibc on systems\n      ** that do not have a real fallocate() call.\n      */\n      int nBlk = buf.st_blksize;  /* File-system block size */\n      int nWrite = 0;             /* Number of bytes written by seekAndWrite */\n      i64 iWrite;                 /* Next offset to write to */\n\n      iWrite = (buf.st_size/nBlk)*nBlk + nBlk - 1;\n      assert( iWrite>=buf.st_size );\n      assert( ((iWrite+1)%nBlk)==0 );\n      for(/*no-op*/; iWrite<nSize+nBlk-1; iWrite+=nBlk ){\n        if( iWrite>=nSize ) iWrite = nSize - 1;\n        nWrite = seekAndWrite(pFile, iWrite, \"\", 1);\n        if( nWrite!=1 ) return SQLITE_IOERR_WRITE;\n      }\n#endif\n    }\n  }\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( pFile->mmapSizeMax>0 && nByte>pFile->mmapSize ){\n    int rc;\n    if( pFile->szChunk<=0 ){\n      if( robust_ftruncate(pFile->h, nByte) ){\n        storeLastErrno(pFile, errno);\n        return unixLogError(SQLITE_IOERR_TRUNCATE, \"ftruncate\", pFile->zPath);\n      }\n    }\n\n    rc = unixMapfile(pFile, nByte);\n    return rc;\n  }\n#endif\n\n  return SQLITE_OK;\n}\n\n/*\n** If *pArg is initially negative then this is a query.  Set *pArg to\n** 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.\n**\n** If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags.\n*/\nstatic void unixModeBit(unixFile *pFile, unsigned char mask, int *pArg){\n  if( *pArg<0 ){\n    *pArg = (pFile->ctrlFlags & mask)!=0;\n  }else if( (*pArg)==0 ){\n    pFile->ctrlFlags &= ~mask;\n  }else{\n    pFile->ctrlFlags |= mask;\n  }\n}\n\n/* Forward declaration */\nstatic int unixGetTempname(int nBuf, char *zBuf);\n#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)\n static int unixFcntlExternalReader(unixFile*, int*);\n#endif\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n static void unixDescribeShm(sqlite3_str*,unixShm*);\n#endif\n\n\n/*\n** Information and control of an open file handle.\n*/\nstatic int unixFileControl(sqlite3_file *id, int op, void *pArg){\n  unixFile *pFile = (unixFile*)id;\n  switch( op ){\n#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n    case SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: {\n      int rc = osIoctl(pFile->h, F2FS_IOC_START_ATOMIC_WRITE);\n      return rc ? SQLITE_IOERR_BEGIN_ATOMIC : SQLITE_OK;\n    }\n    case SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: {\n      int rc = osIoctl(pFile->h, F2FS_IOC_COMMIT_ATOMIC_WRITE);\n      return rc ? SQLITE_IOERR_COMMIT_ATOMIC : SQLITE_OK;\n    }\n    case SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: {\n      int rc = osIoctl(pFile->h, F2FS_IOC_ABORT_VOLATILE_WRITE);\n      return rc ? SQLITE_IOERR_ROLLBACK_ATOMIC : SQLITE_OK;\n    }\n#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */\n\n    case SQLITE_FCNTL_NULL_IO: {\n      osClose(pFile->h);\n      pFile->h = -1;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_LOCKSTATE: {\n      *(int*)pArg = pFile->eFileLock;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_LAST_ERRNO: {\n      *(int*)pArg = pFile->lastErrno;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_CHUNK_SIZE: {\n      pFile->szChunk = *(int *)pArg;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_SIZE_HINT: {\n      int rc;\n      SimulateIOErrorBenign(1);\n      rc = fcntlSizeHint(pFile, *(i64 *)pArg);\n      SimulateIOErrorBenign(0);\n      return rc;\n    }\n    case SQLITE_FCNTL_PERSIST_WAL: {\n      unixModeBit(pFile, UNIXFILE_PERSIST_WAL, (int*)pArg);\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {\n      unixModeBit(pFile, UNIXFILE_PSOW, (int*)pArg);\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_VFSNAME: {\n      *(char**)pArg = sqlite3_mprintf(\"%s\", pFile->pVfs->zName);\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_TEMPFILENAME: {\n      char *zTFile = sqlite3_malloc64( pFile->pVfs->mxPathname );\n      if( zTFile ){\n        unixGetTempname(pFile->pVfs->mxPathname, zTFile);\n        *(char**)pArg = zTFile;\n      }\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_HAS_MOVED: {\n      *(int*)pArg = fileHasMoved(pFile);\n      return SQLITE_OK;\n    }\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    case SQLITE_FCNTL_LOCK_TIMEOUT: {\n      int iOld = pFile->iBusyTimeout;\n      int iNew = *(int*)pArg;\n#if SQLITE_ENABLE_SETLK_TIMEOUT==1\n      pFile->iBusyTimeout = iNew<0 ? 0x7FFFFFFF : (unsigned)iNew;\n#elif SQLITE_ENABLE_SETLK_TIMEOUT==2\n      pFile->iBusyTimeout = !!(*(int*)pArg);\n#else\n# error \"SQLITE_ENABLE_SETLK_TIMEOUT must be set to 1 or 2\"\n#endif\n      *(int*)pArg = iOld;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_BLOCK_ON_CONNECT: {\n      int iNew = *(int*)pArg;\n      pFile->bBlockOnConnect = iNew;\n      return SQLITE_OK;\n    }\n#endif /* SQLITE_ENABLE_SETLK_TIMEOUT */\n#if SQLITE_MAX_MMAP_SIZE>0\n    case SQLITE_FCNTL_MMAP_SIZE: {\n      i64 newLimit = *(i64*)pArg;\n      int rc = SQLITE_OK;\n      if( newLimit>sqlite3GlobalConfig.mxMmap ){\n        newLimit = sqlite3GlobalConfig.mxMmap;\n      }\n\n      /* The value of newLimit may be eventually cast to (size_t) and passed\n      ** to mmap(). Restrict its value to 2GB if (size_t) is not at least a\n      ** 64-bit type. */\n      if( newLimit>0 && sizeof(size_t)<8 ){\n        newLimit = (newLimit & 0x7FFFFFFF);\n      }\n\n      *(i64*)pArg = pFile->mmapSizeMax;\n      if( newLimit>=0 && newLimit!=pFile->mmapSizeMax && pFile->nFetchOut==0 ){\n        pFile->mmapSizeMax = newLimit;\n        if( pFile->mmapSize>0 ){\n          unixUnmapfile(pFile);\n          rc = unixMapfile(pFile, -1);\n        }\n      }\n      return rc;\n    }\n#endif\n#ifdef SQLITE_DEBUG\n    /* The pager calls this method to signal that it has done\n    ** a rollback and that the database is therefore unchanged and\n    ** it hence it is OK for the transaction change counter to be\n    ** unchanged.\n    */\n    case SQLITE_FCNTL_DB_UNCHANGED: {\n      ((unixFile*)id)->dbUpdate = 0;\n      return SQLITE_OK;\n    }\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n    case SQLITE_FCNTL_SET_LOCKPROXYFILE:\n    case SQLITE_FCNTL_GET_LOCKPROXYFILE: {\n      return proxyFileControl(id,op,pArg);\n    }\n#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */\n\n    case SQLITE_FCNTL_EXTERNAL_READER: {\n#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)\n      return unixFcntlExternalReader((unixFile*)id, (int*)pArg);\n#else\n      *(int*)pArg = 0;\n      return SQLITE_OK;\n#endif\n    }\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n    case SQLITE_FCNTL_FILESTAT: {\n      sqlite3_str *pStr = (sqlite3_str*)pArg;\n      char aLck[16];\n      unixInodeInfo *pInode;\n      static const char *azLock[] = { \"SHARED\", \"RESERVED\",\n                                      \"PENDING\", \"EXCLUSIVE\" };\n      sqlite3_str_appendf(pStr, \"{\\\"h\\\":%d\", pFile->h);\n      sqlite3_str_appendf(pStr, \",\\\"vfs\\\":\\\"%s\\\"\", pFile->pVfs->zName);\n      if( pFile->eFileLock ){\n        sqlite3_str_appendf(pStr, \",\\\"eFileLock\\\":\\\"%s\\\"\",\n                                  azLock[pFile->eFileLock-1]);\n        if( unixPosixAdvisoryLocks(pFile->h, aLck)==SQLITE_OK ){\n          sqlite3_str_appendf(pStr, \",\\\"pal\\\":\\\"%s\\\"\", aLck);\n        }\n      }\n      unixEnterMutex();\n      if( pFile->pShm ){\n        sqlite3_str_appendall(pStr, \",\\\"shm\\\":\");\n        unixDescribeShm(pStr, pFile->pShm);\n      }\n#if SQLITE_MAX_MMAP_SIZE>0\n      if( pFile->mmapSize ){\n        sqlite3_str_appendf(pStr, \",\\\"mmapSize\\\":%lld\", pFile->mmapSize);\n        sqlite3_str_appendf(pStr, \",\\\"nFetchOut\\\":%d\", pFile->nFetchOut);\n      }\n#endif\n      if( (pInode = pFile->pInode)!=0 ){\n        sqlite3_str_appendf(pStr, \",\\\"inode\\\":{\\\"nRef\\\":%d\",pInode->nRef);\n        sqlite3_mutex_enter(pInode->pLockMutex);\n        sqlite3_str_appendf(pStr, \",\\\"nShared\\\":%d\", pInode->nShared);\n        if( pInode->eFileLock ){\n          sqlite3_str_appendf(pStr, \",\\\"eFileLock\\\":\\\"%s\\\"\",\n                                  azLock[pInode->eFileLock-1]);\n        }\n        if( pInode->pUnused ){\n          char cSep = '[';\n          UnixUnusedFd *pUFd = pFile->pInode->pUnused;\n          sqlite3_str_appendall(pStr, \",\\\"unusedFd\\\":\");\n          while( pUFd ){\n            sqlite3_str_appendf(pStr, \"%c{\\\"fd\\\":%d,\\\"flags\\\":%d\",\n                                cSep, pUFd->fd, pUFd->flags);\n            cSep = ',';\n            if( unixPosixAdvisoryLocks(pUFd->fd, aLck)==SQLITE_OK ){\n              sqlite3_str_appendf(pStr, \",\\\"pal\\\":\\\"%s\\\"\", aLck);\n            }\n            sqlite3_str_append(pStr, \"}\", 1);\n            pUFd = pUFd->pNext;\n          }\n          sqlite3_str_append(pStr, \"]\", 1);\n        }\n        sqlite3_mutex_leave(pInode->pLockMutex);\n        sqlite3_str_append(pStr, \"}\", 1);\n      }\n      unixLeaveMutex();\n      sqlite3_str_append(pStr, \"}\", 1);\n      return SQLITE_OK;\n    }\n#endif /* SQLITE_DEBUG || SQLITE_ENABLE_FILESTAT */\n  }\n  return SQLITE_NOTFOUND;\n}\n\n/*\n** If pFd->sectorSize is non-zero when this function is called, it is a\n** no-op. Otherwise, the values of pFd->sectorSize and\n** pFd->deviceCharacteristics are set according to the file-system\n** characteristics.\n**\n** There are two versions of this function. One for QNX and one for all\n** other systems.\n*/\n#ifndef __QNXNTO__\nstatic void setDeviceCharacteristics(unixFile *pFd){\n  assert( pFd->deviceCharacteristics==0 || pFd->sectorSize!=0 );\n  if( pFd->sectorSize==0 ){\n#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n    int res;\n    u32 f = 0;\n\n    /* Check for support for F2FS atomic batch writes. */\n    res = osIoctl(pFd->h, F2FS_IOC_GET_FEATURES, &f);\n    if( res==0 && (f & F2FS_FEATURE_ATOMIC_WRITE) ){\n      pFd->deviceCharacteristics = SQLITE_IOCAP_BATCH_ATOMIC;\n    }\n#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */\n\n    /* Set the POWERSAFE_OVERWRITE flag if requested. */\n    if( pFd->ctrlFlags & UNIXFILE_PSOW ){\n      pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;\n    }\n    pFd->deviceCharacteristics |= SQLITE_IOCAP_SUBPAGE_READ;\n\n    pFd->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;\n  }\n}\n#else\n#include <sys/dcmd_blk.h>\n#include <sys/statvfs.h>\nstatic void setDeviceCharacteristics(unixFile *pFile){\n  if( pFile->sectorSize == 0 ){\n    struct statvfs fsInfo;\n\n    /* Set defaults for non-supported filesystems */\n    pFile->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;\n    pFile->deviceCharacteristics = 0;\n    if( fstatvfs(pFile->h, &fsInfo) == -1 ) {\n      return;\n    }\n\n    if( !strcmp(fsInfo.f_basetype, \"tmp\") ) {\n      pFile->sectorSize = fsInfo.f_bsize;\n      pFile->deviceCharacteristics =\n        SQLITE_IOCAP_ATOMIC4K |       /* All ram filesystem writes are atomic */\n        SQLITE_IOCAP_SAFE_APPEND |    /* growing the file does not occur until\n                                      ** the write succeeds */\n        SQLITE_IOCAP_SEQUENTIAL |     /* The ram filesystem has no write behind\n                                      ** so it is ordered */\n        0;\n    }else if( strstr(fsInfo.f_basetype, \"etfs\") ){\n      pFile->sectorSize = fsInfo.f_bsize;\n      pFile->deviceCharacteristics =\n        /* etfs cluster size writes are atomic */\n        (pFile->sectorSize / 512 * SQLITE_IOCAP_ATOMIC512) |\n        SQLITE_IOCAP_SAFE_APPEND |    /* growing the file does not occur until\n                                      ** the write succeeds */\n        SQLITE_IOCAP_SEQUENTIAL |     /* The ram filesystem has no write behind\n                                      ** so it is ordered */\n        0;\n    }else if( !strcmp(fsInfo.f_basetype, \"qnx6\") ){\n      pFile->sectorSize = fsInfo.f_bsize;\n      pFile->deviceCharacteristics =\n        SQLITE_IOCAP_ATOMIC |         /* All filesystem writes are atomic */\n        SQLITE_IOCAP_SAFE_APPEND |    /* growing the file does not occur until\n                                      ** the write succeeds */\n        SQLITE_IOCAP_SEQUENTIAL |     /* The ram filesystem has no write behind\n                                      ** so it is ordered */\n        0;\n    }else if( !strcmp(fsInfo.f_basetype, \"qnx4\") ){\n      pFile->sectorSize = fsInfo.f_bsize;\n      pFile->deviceCharacteristics =\n        /* full bitset of atomics from max sector size and smaller */\n        (((pFile->sectorSize / 512 * SQLITE_IOCAP_ATOMIC512) << 1) - 2) |\n        SQLITE_IOCAP_SEQUENTIAL |     /* The ram filesystem has no write behind\n                                      ** so it is ordered */\n        0;\n    }else if( strstr(fsInfo.f_basetype, \"dos\") ){\n      pFile->sectorSize = fsInfo.f_bsize;\n      pFile->deviceCharacteristics =\n        /* full bitset of atomics from max sector size and smaller */\n        (((pFile->sectorSize / 512 * SQLITE_IOCAP_ATOMIC512) << 1) - 2) |\n        SQLITE_IOCAP_SEQUENTIAL |     /* The ram filesystem has no write behind\n                                      ** so it is ordered */\n        0;\n    }else{\n      pFile->deviceCharacteristics =\n        SQLITE_IOCAP_ATOMIC512 |      /* blocks are atomic */\n        SQLITE_IOCAP_SAFE_APPEND |    /* growing the file does not occur until\n                                      ** the write succeeds */\n        0;\n    }\n  }\n  /* Last chance verification.  If the sector size isn't a multiple of 512\n  ** then it isn't valid.*/\n  if( pFile->sectorSize % 512 != 0 ){\n    pFile->deviceCharacteristics = 0;\n    pFile->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;\n  }\n}\n#endif\n\n/*\n** Return the sector size in bytes of the underlying block device for\n** the specified file. This is almost always 512 bytes, but may be\n** larger for some devices.\n**\n** SQLite code assumes this function cannot fail. It also assumes that\n** if two files are created in the same file-system directory (i.e.\n** a database and its journal file) that the sector size will be the\n** same for both.\n*/\nstatic int unixSectorSize(sqlite3_file *id){\n  unixFile *pFd = (unixFile*)id;\n  setDeviceCharacteristics(pFd);\n  return pFd->sectorSize;\n}\n\n/*\n** Return the device characteristics for the file.\n**\n** This VFS is set up to return SQLITE_IOCAP_POWERSAFE_OVERWRITE by default.\n** However, that choice is controversial since technically the underlying\n** file system does not always provide powersafe overwrites.  (In other\n** words, after a power-loss event, parts of the file that were never\n** written might end up being altered.)  However, non-PSOW behavior is very,\n** very rare.  And asserting PSOW makes a large reduction in the amount\n** of required I/O for journaling, since a lot of padding is eliminated.\n**  Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control\n** available to turn it off and URI query parameter available to turn it off.\n*/\nstatic int unixDeviceCharacteristics(sqlite3_file *id){\n  unixFile *pFd = (unixFile*)id;\n  setDeviceCharacteristics(pFd);\n  return pFd->deviceCharacteristics;\n}\n\n#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0\n\n/*\n** Return the system page size.\n**\n** This function should not be called directly by other code in this file.\n** Instead, it should be called via macro osGetpagesize().\n*/\nstatic int unixGetpagesize(void){\n#if OS_VXWORKS\n  return 1024;\n#elif defined(_BSD_SOURCE)\n  return getpagesize();\n#else\n  return (int)sysconf(_SC_PAGESIZE);\n#endif\n}\n\n#endif /* !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 */\n\n#if !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL)\n\n/*\n** Object used to represent an shared memory buffer.\n**\n** When multiple threads all reference the same wal-index, each thread\n** has its own unixShm object, but they all point to a single instance\n** of this unixShmNode object.  In other words, each wal-index is opened\n** only once per process.\n**\n** Each unixShmNode object is connected to a single unixInodeInfo object.\n** We could coalesce this object into unixInodeInfo, but that would mean\n** every open file that does not use shared memory (in other words, most\n** open files) would have to carry around this extra information.  So\n** the unixInodeInfo object contains a pointer to this unixShmNode object\n** and the unixShmNode object is created only when needed.\n**\n** unixMutexHeld() must be true when creating or destroying\n** this object or while reading or writing the following fields:\n**\n**      nRef\n**\n** The following fields are read-only after the object is created:\n**\n**      hShm\n**      zFilename\n**\n** Either unixShmNode.pShmMutex must be held or unixShmNode.nRef==0 and\n** unixMutexHeld() is true when reading or writing any other field\n** in this structure.\n**\n** aLock[SQLITE_SHM_NLOCK]:\n**   This array records the various locks held by clients on each of the\n**   SQLITE_SHM_NLOCK slots. If the aLock[] entry is set to 0, then no\n**   locks are held by the process on this slot. If it is set to -1, then\n**   some client holds an EXCLUSIVE lock on the locking slot. If the aLock[]\n**   value is set to a positive value, then it is the number of shared\n**   locks currently held on the slot.\n**\n** aMutex[SQLITE_SHM_NLOCK]:\n**   Normally, when SQLITE_ENABLE_SETLK_TIMEOUT is not defined, mutex\n**   pShmMutex is used to protect the aLock[] array and the right to\n**   call fcntl() on unixShmNode.hShm to obtain or release locks.\n**\n**   If SQLITE_ENABLE_SETLK_TIMEOUT is defined though, we use an array\n**   of mutexes - one for each locking slot. To read or write locking\n**   slot aLock[iSlot], the caller must hold the corresponding mutex\n**   aMutex[iSlot]. Similarly, to call fcntl() to obtain or release a\n**   lock corresponding to slot iSlot, mutex aMutex[iSlot] must be held.\n*/\nstruct unixShmNode {\n  unixInodeInfo *pInode;     /* unixInodeInfo that owns this SHM node */\n  sqlite3_mutex *pShmMutex;  /* Mutex to access this object */\n  char *zFilename;           /* Name of the mmapped file */\n  int hShm;                  /* Open file descriptor */\n  int szRegion;              /* Size of shared-memory regions */\n  u16 nRegion;               /* Size of array apRegion */\n  u8 isReadonly;             /* True if read-only */\n  u8 isUnlocked;             /* True if no DMS lock held */\n  char **apRegion;           /* Array of mapped shared-memory regions */\n  int nRef;                  /* Number of unixShm objects pointing to this */\n  unixShm *pFirst;           /* All unixShm objects pointing to this */\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  sqlite3_mutex *aMutex[SQLITE_SHM_NLOCK];\n#endif\n  int aLock[SQLITE_SHM_NLOCK];  /* # shared locks on slot, -1==excl lock */\n#ifdef SQLITE_DEBUG\n  u8 nextShmId;              /* Next available unixShm.id value */\n#endif\n};\n\n/*\n** Structure used internally by this VFS to record the state of an\n** open shared memory connection.\n**\n** The following fields are initialized when this object is created and\n** are read-only thereafter:\n**\n**    unixShm.pShmNode\n**    unixShm.id\n**\n** All other fields are read/write.  The unixShm.pShmNode->pShmMutex must\n** be held while accessing any read/write fields.\n*/\nstruct unixShm {\n  unixShmNode *pShmNode;     /* The underlying unixShmNode object */\n  unixShm *pNext;            /* Next unixShm with the same unixShmNode */\n  u8 hasMutex;               /* True if holding the unixShmNode->pShmMutex */\n  u8 id;                     /* Id of this connection within its unixShmNode */\n  u16 sharedMask;            /* Mask of shared locks held */\n  u16 exclMask;              /* Mask of exclusive locks held */\n};\n\n/*\n** Constants used for locking\n*/\n#define UNIX_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)         /* first lock byte */\n#define UNIX_SHM_DMS    (UNIX_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n/*\n** Describe the pShm object using JSON.  Used for diagnostics only.\n*/\nstatic void unixDescribeShm(sqlite3_str *pStr, unixShm *pShm){\n  unixShmNode *pNode = pShm->pShmNode;\n  char aLck[16];\n  sqlite3_str_appendf(pStr, \"{\\\"h\\\":%d\", pNode->hShm);\n  assert( unixMutexHeld() );\n  sqlite3_str_appendf(pStr, \",\\\"nRef\\\":%d\", pNode->nRef);\n  sqlite3_str_appendf(pStr, \",\\\"id\\\":%d\", pShm->id);\n  sqlite3_str_appendf(pStr, \",\\\"sharedMask\\\":%d\", pShm->sharedMask);\n  sqlite3_str_appendf(pStr, \",\\\"exclMask\\\":%d\", pShm->exclMask);\n  if( unixPosixAdvisoryLocks(pNode->hShm, aLck)==SQLITE_OK ){\n    sqlite3_str_appendf(pStr, \",\\\"pal\\\":\\\"%s\\\"\", aLck);\n  }\n  sqlite3_str_append(pStr, \"}\", 1);\n}\n#endif /* SQLITE_DEBUG || SQLITE_ENABLE_FILESTAT */\n\n/*\n** Use F_GETLK to check whether or not there are any readers with open\n** wal-mode transactions in other processes on database file pFile. If\n** no error occurs, return SQLITE_OK and set (*piOut) to 1 if there are\n** such transactions, or 0 otherwise. If an error occurs, return an\n** SQLite error code. The final value of *piOut is undefined in this\n** case.\n*/\nstatic int unixFcntlExternalReader(unixFile *pFile, int *piOut){\n  int rc = SQLITE_OK;\n  *piOut = 0;\n  if( pFile->pShm){\n    unixShmNode *pShmNode = pFile->pShm->pShmNode;\n    struct flock f;\n\n    memset(&f, 0, sizeof(f));\n    f.l_type = F_WRLCK;\n    f.l_whence = SEEK_SET;\n    f.l_start = UNIX_SHM_BASE + 3;\n    f.l_len = SQLITE_SHM_NLOCK - 3;\n\n    sqlite3_mutex_enter(pShmNode->pShmMutex);\n    if( osFcntl(pShmNode->hShm, F_GETLK, &f)<0 ){\n      rc = SQLITE_IOERR_LOCK;\n    }else{\n      *piOut = (f.l_type!=F_UNLCK);\n    }\n    sqlite3_mutex_leave(pShmNode->pShmMutex);\n  }\n\n  return rc;\n}\n\n/*\n** If pFile has a -shm file open and it is sharing that file with some\n** other connection, either in the same process or in a separate process,\n** then return true.  Return false if either pFile does not have a -shm\n** file open or if it is the only connection to that -shm file across the\n** entire system.\n**\n** This routine is not required for correct operation.  It can always return\n** false and SQLite will continue to operate according to spec.  However,\n** when this routine does its job, it adds extra robustness in cases\n** where database file locks have been erroneously deleted in a WAL-mode\n** database by doing close(open(DATABASE_PATHNAME)) or similar.\n**\n** With false negatives, SQLite still operates to spec, though with less\n** robustness.  With false positives, the last database connection on a\n** WAL-mode database will fail to unlink the -wal and -shm files, which\n** is annoying but harmless.  False positives will also prevent a database\n** connection from running \"PRAGMA journal_mode=DELETE\" in order to take\n** the database out of WAL mode, which is perhaps more serious, but is\n** still not a disaster.\n*/\nstatic int unixIsSharingShmNode(unixFile *pFile){\n  unixShmNode *pShmNode;\n  struct flock lock;\n  if( pFile->pShm==0 ) return 0;\n  if( pFile->ctrlFlags & UNIXFILE_EXCL ) return 0;\n  pShmNode = pFile->pShm->pShmNode;\n#if SQLITE_ATOMIC_INTRINSICS\n  assert( AtomicLoad(&pShmNode->nRef)==1 );\n#endif\n  memset(&lock, 0, sizeof(lock));\n  lock.l_whence = SEEK_SET;\n  lock.l_start = UNIX_SHM_DMS;\n  lock.l_len = 1;\n  lock.l_type = F_WRLCK;\n  osFcntl(pShmNode->hShm, F_GETLK, &lock);\n  return (lock.l_type!=F_UNLCK);\n}\n\n/*\n** Apply posix advisory locks for all bytes from ofst through ofst+n-1.\n**\n** Locks block if the mask is exactly UNIX_SHM_C and are non-blocking\n** otherwise.\n*/\nstatic int unixShmSystemLock(\n  unixFile *pFile,       /* Open connection to the WAL file */\n  int lockType,          /* F_UNLCK, F_RDLCK, or F_WRLCK */\n  int ofst,              /* First byte of the locking range */\n  int n                  /* Number of bytes to lock */\n){\n  unixShmNode *pShmNode; /* Apply locks to this open shared-memory segment */\n  struct flock f;        /* The posix advisory locking structure */\n  int rc = SQLITE_OK;    /* Result code form fcntl() */\n\n  pShmNode = pFile->pInode->pShmNode;\n\n  /* Assert that the parameters are within expected range and that the\n  ** correct mutex or mutexes are held. */\n  assert( pShmNode->nRef>=0 );\n  assert( (ofst==UNIX_SHM_DMS && n==1)\n       || (ofst>=UNIX_SHM_BASE && ofst+n<=(UNIX_SHM_BASE+SQLITE_SHM_NLOCK))\n  );\n  if( ofst==UNIX_SHM_DMS ){\n    assert( pShmNode->nRef>0 || unixMutexHeld() );\n    assert( pShmNode->nRef==0 || sqlite3_mutex_held(pShmNode->pShmMutex) );\n  }else{\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    int ii;\n    for(ii=ofst-UNIX_SHM_BASE; ii<ofst-UNIX_SHM_BASE+n; ii++){\n      assert( sqlite3_mutex_held(pShmNode->aMutex[ii]) );\n    }\n#else\n    assert( sqlite3_mutex_held(pShmNode->pShmMutex) );\n    assert( pShmNode->nRef>0 );\n#endif\n  }\n\n  /* Shared locks never span more than one byte */\n  assert( n==1 || lockType!=F_RDLCK );\n\n  /* Locks are within range */\n  assert( n>=1 && n<=SQLITE_SHM_NLOCK );\n  assert( ofst>=UNIX_SHM_BASE && ofst<=UNIX_SHM_DMS );\n  assert( ofst+n-1<=UNIX_SHM_DMS );\n\n  if( pShmNode->hShm>=0 ){\n    int res;\n    /* Initialize the locking parameters */\n    f.l_type = lockType;\n    f.l_whence = SEEK_SET;\n    f.l_start = ofst;\n    f.l_len = n;\n    res = osSetPosixAdvisoryLock(pShmNode->hShm, &f, pFile);\n    if( res==-1 ){\n#if defined(SQLITE_ENABLE_SETLK_TIMEOUT) && SQLITE_ENABLE_SETLK_TIMEOUT==1\n      rc = (pFile->iBusyTimeout ? SQLITE_BUSY_TIMEOUT : SQLITE_BUSY);\n#else\n      rc = SQLITE_BUSY;\n#endif\n    }\n  }\n\n  /* Do debug tracing */\n#ifdef SQLITE_DEBUG\n  OSTRACE((\"SHM-LOCK \"));\n  if( rc==SQLITE_OK ){\n    if( lockType==F_UNLCK ){\n      OSTRACE((\"unlock %d..%d ok\\n\", ofst, ofst+n-1));\n    }else if( lockType==F_RDLCK ){\n      OSTRACE((\"read-lock %d..%d ok\\n\", ofst, ofst+n-1));\n    }else{\n      assert( lockType==F_WRLCK );\n      OSTRACE((\"write-lock %d..%d ok\\n\", ofst, ofst+n-1));\n    }\n  }else{\n    if( lockType==F_UNLCK ){\n      OSTRACE((\"unlock %d..%d failed\\n\", ofst, ofst+n-1));\n    }else if( lockType==F_RDLCK ){\n      OSTRACE((\"read-lock %d..%d failed\\n\", ofst, ofst+n-1));\n    }else{\n      assert( lockType==F_WRLCK );\n      OSTRACE((\"write-lock %d..%d failed\\n\", ofst, ofst+n-1));\n    }\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** Return the minimum number of 32KB shm regions that should be mapped at\n** a time, assuming that each mapping must be an integer multiple of the\n** current system page-size.\n**\n** Usually, this is 1. The exception seems to be systems that are configured\n** to use 64KB pages - in this case each mapping must cover at least two\n** shm regions.\n*/\nstatic int unixShmRegionPerMap(void){\n  int shmsz = 32*1024;            /* SHM region size */\n  int pgsz = osGetpagesize();   /* System page size */\n  assert( ((pgsz-1)&pgsz)==0 );   /* Page size must be a power of 2 */\n  if( pgsz<shmsz ) return 1;\n  return pgsz/shmsz;\n}\n\n/*\n** Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0.\n**\n** This is not a VFS shared-memory method; it is a utility function called\n** by VFS shared-memory methods.\n*/\nstatic void unixShmPurge(unixFile *pFd){\n  unixShmNode *p = pFd->pInode->pShmNode;\n  assert( unixMutexHeld() );\n  if( p && ALWAYS(p->nRef==0) ){\n    int nShmPerMap = unixShmRegionPerMap();\n    int i;\n    assert( p->pInode==pFd->pInode );\n    sqlite3_mutex_free(p->pShmMutex);\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    for(i=0; i<SQLITE_SHM_NLOCK; i++){\n      sqlite3_mutex_free(p->aMutex[i]);\n    }\n#endif\n    for(i=0; i<p->nRegion; i+=nShmPerMap){\n      if( p->hShm>=0 ){\n        osMunmap(p->apRegion[i], p->szRegion);\n      }else{\n        sqlite3_free(p->apRegion[i]);\n      }\n    }\n    sqlite3_free(p->apRegion);\n    if( p->hShm>=0 ){\n      robust_close(pFd, p->hShm, __LINE__);\n      p->hShm = -1;\n    }\n    p->pInode->pShmNode = 0;\n    sqlite3_free(p);\n  }\n}\n\n/*\n** The DMS lock has not yet been taken on shm file pShmNode. Attempt to\n** take it now. Return SQLITE_OK if successful, or an SQLite error\n** code otherwise.\n**\n** If the DMS cannot be locked because this is a readonly_shm=1\n** connection and no other process already holds a lock, return\n** SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1.\n*/\nstatic int unixLockSharedMemory(unixFile *pDbFd, unixShmNode *pShmNode){\n  struct flock lock;\n  int rc = SQLITE_OK;\n\n  /* Use F_GETLK to determine the locks other processes are holding\n  ** on the DMS byte. If it indicates that another process is holding\n  ** a SHARED lock, then this process may also take a SHARED lock\n  ** and proceed with opening the *-shm file.\n  **\n  ** Or, if no other process is holding any lock, then this process\n  ** is the first to open it. In this case take an EXCLUSIVE lock on the\n  ** DMS byte and truncate the *-shm file to zero bytes in size. Then\n  ** downgrade to a SHARED lock on the DMS byte.\n  **\n  ** If another process is holding an EXCLUSIVE lock on the DMS byte,\n  ** return SQLITE_BUSY to the caller (it will try again). An earlier\n  ** version of this code attempted the SHARED lock at this point. But\n  ** this introduced a subtle race condition: if the process holding\n  ** EXCLUSIVE failed just before truncating the *-shm file, then this\n  ** process might open and use the *-shm file without truncating it.\n  ** And if the *-shm file has been corrupted by a power failure or\n  ** system crash, the database itself may also become corrupt.  */\n  lock.l_whence = SEEK_SET;\n  lock.l_start = UNIX_SHM_DMS;\n  lock.l_len = 1;\n  lock.l_type = F_WRLCK;\n  if( osFcntl(pShmNode->hShm, F_GETLK, &lock)!=0 ) {\n    rc = SQLITE_IOERR_LOCK;\n  }else if( lock.l_type==F_UNLCK ){\n    if( pShmNode->isReadonly ){\n      pShmNode->isUnlocked = 1;\n      rc = SQLITE_READONLY_CANTINIT;\n    }else{\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n      /* Do not use a blocking lock here. If the lock cannot be obtained\n      ** immediately, it means some other connection is truncating the\n      ** *-shm file. And after it has done so, it will not release its\n      ** lock, but only downgrade it to a shared lock. So no point in\n      ** blocking here. The call below to obtain the shared DMS lock may\n      ** use a blocking lock. */\n      int iSaveTimeout = pDbFd->iBusyTimeout;\n      pDbFd->iBusyTimeout = 0;\n#endif\n      rc = unixShmSystemLock(pDbFd, F_WRLCK, UNIX_SHM_DMS, 1);\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n      pDbFd->iBusyTimeout = iSaveTimeout;\n#endif\n      /* The first connection to attach must truncate the -shm file.  We\n      ** truncate to 3 bytes (an arbitrary small number, less than the\n      ** -shm header size) rather than 0 as a system debugging aid, to\n      ** help detect if a -shm file truncation is legitimate or is the work\n      ** or a rogue process. */\n      if( rc==SQLITE_OK && robust_ftruncate(pShmNode->hShm, 3) ){\n        rc = unixLogError(SQLITE_IOERR_SHMOPEN,\"ftruncate\",pShmNode->zFilename);\n      }\n    }\n  }else if( lock.l_type==F_WRLCK ){\n    rc = SQLITE_BUSY;\n  }\n\n  if( rc==SQLITE_OK ){\n    assert( lock.l_type==F_UNLCK || lock.l_type==F_RDLCK );\n    rc = unixShmSystemLock(pDbFd, F_RDLCK, UNIX_SHM_DMS, 1);\n  }\n  return rc;\n}\n\n/*\n** Open a shared-memory area associated with open database file pDbFd.\n** This particular implementation uses mmapped files.\n**\n** The file used to implement shared-memory is in the same directory\n** as the open database file and has the same name as the open database\n** file with the \"-shm\" suffix added.  For example, if the database file\n** is \"/home/user1/config.db\" then the file that is created and mmapped\n** for shared memory will be called \"/home/user1/config.db-shm\".\n**\n** Another approach to is to use files in /dev/shm or /dev/tmp or an\n** some other tmpfs mount. But if a file in a different directory\n** from the database file is used, then differing access permissions\n** or a chroot() might cause two different processes on the same\n** database to end up using different files for shared memory -\n** meaning that their memory would not really be shared - resulting\n** in database corruption.  Nevertheless, this tmpfs file usage\n** can be enabled at compile-time using -DSQLITE_SHM_DIRECTORY=\"/dev/shm\"\n** or the equivalent.  The use of the SQLITE_SHM_DIRECTORY compile-time\n** option results in an incompatible build of SQLite;  builds of SQLite\n** that with differing SQLITE_SHM_DIRECTORY settings attempt to use the\n** same database file at the same time, database corruption will likely\n** result. The SQLITE_SHM_DIRECTORY compile-time option is considered\n** \"unsupported\" and may go away in a future SQLite release.\n**\n** When opening a new shared-memory file, if no other instances of that\n** file are currently open, in this process or in other processes, then\n** the file must be truncated to zero length or have its header cleared.\n**\n** If the original database file (pDbFd) is using the \"unix-excl\" VFS\n** that means that an exclusive lock is held on the database file and\n** that no other processes are able to read or write the database.  In\n** that case, we do not really need shared memory.  No shared memory\n** file is created.  The shared memory will be simulated with heap memory.\n*/\nstatic int unixOpenSharedMemory(unixFile *pDbFd){\n  struct unixShm *p = 0;          /* The connection to be opened */\n  struct unixShmNode *pShmNode;   /* The underlying mmapped file */\n  int rc = SQLITE_OK;             /* Result code */\n  unixInodeInfo *pInode;          /* The inode of fd */\n  char *zShm;             /* Name of the file used for SHM */\n  int nShmFilename;               /* Size of the SHM filename in bytes */\n\n  /* Allocate space for the new unixShm object. */\n  p = sqlite3_malloc64( sizeof(*p) );\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  memset(p, 0, sizeof(*p));\n  assert( pDbFd->pShm==0 );\n\n  /* Check to see if a unixShmNode object already exists. Reuse an existing\n  ** one if present. Create a new one if necessary.\n  */\n  assert( unixFileMutexNotheld(pDbFd) );\n  unixEnterMutex();\n  pInode = pDbFd->pInode;\n  pShmNode = pInode->pShmNode;\n  if( pShmNode==0 ){\n    struct stat sStat;                 /* fstat() info for database file */\n#ifndef SQLITE_SHM_DIRECTORY\n    const char *zBasePath = pDbFd->zPath;\n#endif\n\n    /* Call fstat() to figure out the permissions on the database file. If\n    ** a new *-shm file is created, an attempt will be made to create it\n    ** with the same permissions.\n    */\n    if( osFstat(pDbFd->h, &sStat) ){\n      rc = SQLITE_IOERR_FSTAT;\n      goto shm_open_err;\n    }\n\n#ifdef SQLITE_SHM_DIRECTORY\n    nShmFilename = sizeof(SQLITE_SHM_DIRECTORY) + 31;\n#else\n    nShmFilename = 6 + (int)strlen(zBasePath);\n#endif\n    pShmNode = sqlite3_malloc64( sizeof(*pShmNode) + nShmFilename );\n    if( pShmNode==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto shm_open_err;\n    }\n    memset(pShmNode, 0, sizeof(*pShmNode)+nShmFilename);\n    zShm = pShmNode->zFilename = (char*)&pShmNode[1];\n#ifdef SQLITE_SHM_DIRECTORY\n    sqlite3_snprintf(nShmFilename, zShm,\n                     SQLITE_SHM_DIRECTORY \"/sqlite-shm-%x-%x\",\n                     (u32)sStat.st_ino, (u32)sStat.st_dev);\n#else\n    sqlite3_snprintf(nShmFilename, zShm, \"%s-shm\", zBasePath);\n    sqlite3FileSuffix3(pDbFd->zPath, zShm);\n#endif\n    pShmNode->hShm = -1;\n    pDbFd->pInode->pShmNode = pShmNode;\n    pShmNode->pInode = pDbFd->pInode;\n    if( sqlite3GlobalConfig.bCoreMutex ){\n      pShmNode->pShmMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);\n      if( pShmNode->pShmMutex==0 ){\n        rc = SQLITE_NOMEM_BKPT;\n        goto shm_open_err;\n      }\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n      {\n        int ii;\n        for(ii=0; ii<SQLITE_SHM_NLOCK; ii++){\n          pShmNode->aMutex[ii] = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);\n          if( pShmNode->aMutex[ii]==0 ){\n            rc = SQLITE_NOMEM_BKPT;\n            goto shm_open_err;\n          }\n        }\n      }\n#endif\n    }\n\n    if( pInode->bProcessLock==0 ){\n      if( 0==sqlite3_uri_boolean(pDbFd->zPath, \"readonly_shm\", 0) ){\n        pShmNode->hShm = robust_open(zShm, O_RDWR|O_CREAT|O_NOFOLLOW,\n                                     (sStat.st_mode&0777));\n      }\n      if( pShmNode->hShm<0 ){\n        pShmNode->hShm = robust_open(zShm, O_RDONLY|O_NOFOLLOW,\n                                     (sStat.st_mode&0777));\n        if( pShmNode->hShm<0 ){\n          rc = unixLogError(SQLITE_CANTOPEN_BKPT, \"open\", zShm);\n          goto shm_open_err;\n        }\n        pShmNode->isReadonly = 1;\n      }\n\n      /* If this process is running as root, make sure that the SHM file\n      ** is owned by the same user that owns the original database.  Otherwise,\n      ** the original owner will not be able to connect.\n      */\n      robustFchown(pShmNode->hShm, sStat.st_uid, sStat.st_gid);\n\n      rc = unixLockSharedMemory(pDbFd, pShmNode);\n      if( rc!=SQLITE_OK && rc!=SQLITE_READONLY_CANTINIT ) goto shm_open_err;\n    }\n  }\n\n  /* Make the new connection a child of the unixShmNode */\n  p->pShmNode = pShmNode;\n#ifdef SQLITE_DEBUG\n  p->id = pShmNode->nextShmId++;\n#endif\n  pShmNode->nRef++;\n  pDbFd->pShm = p;\n  unixLeaveMutex();\n\n  /* The reference count on pShmNode has already been incremented under\n  ** the cover of the unixEnterMutex() mutex and the pointer from the\n  ** new (struct unixShm) object to the pShmNode has been set. All that is\n  ** left to do is to link the new object into the linked list starting\n  ** at pShmNode->pFirst. This must be done while holding the\n  ** pShmNode->pShmMutex.\n  */\n  sqlite3_mutex_enter(pShmNode->pShmMutex);\n  p->pNext = pShmNode->pFirst;\n  pShmNode->pFirst = p;\n  sqlite3_mutex_leave(pShmNode->pShmMutex);\n  return rc;\n\n  /* Jump here on any error */\nshm_open_err:\n  unixShmPurge(pDbFd);       /* This call frees pShmNode if required */\n  sqlite3_free(p);\n  unixLeaveMutex();\n  return rc;\n}\n\n/*\n** This function is called to obtain a pointer to region iRegion of the\n** shared-memory associated with the database file fd. Shared-memory regions\n** are numbered starting from zero. Each shared-memory region is szRegion\n** bytes in size.\n**\n** If an error occurs, an error code is returned and *pp is set to NULL.\n**\n** Otherwise, if the bExtend parameter is 0 and the requested shared-memory\n** region has not been allocated (by any client, including one running in a\n** separate process), then *pp is set to NULL and SQLITE_OK returned. If\n** bExtend is non-zero and the requested shared-memory region has not yet\n** been allocated, it is allocated by this function.\n**\n** If the shared-memory region has already been allocated or is allocated by\n** this call as described above, then it is mapped into this processes\n** address space (if it is not already), *pp is set to point to the mapped\n** memory and SQLITE_OK returned.\n*/\nstatic int unixShmMap(\n  sqlite3_file *fd,               /* Handle open on database file */\n  int iRegion,                    /* Region to retrieve */\n  int szRegion,                   /* Size of regions */\n  int bExtend,                    /* True to extend file if necessary */\n  void volatile **pp              /* OUT: Mapped memory */\n){\n  unixFile *pDbFd = (unixFile*)fd;\n  unixShm *p;\n  unixShmNode *pShmNode;\n  int rc = SQLITE_OK;\n  int nShmPerMap = unixShmRegionPerMap();\n  int nReqRegion;\n\n  /* If the shared-memory file has not yet been opened, open it now. */\n  if( pDbFd->pShm==0 ){\n    rc = unixOpenSharedMemory(pDbFd);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n\n  p = pDbFd->pShm;\n  pShmNode = p->pShmNode;\n  sqlite3_mutex_enter(pShmNode->pShmMutex);\n  if( pShmNode->isUnlocked ){\n    rc = unixLockSharedMemory(pDbFd, pShmNode);\n    if( rc!=SQLITE_OK ) goto shmpage_out;\n    pShmNode->isUnlocked = 0;\n  }\n  assert( szRegion==pShmNode->szRegion || pShmNode->nRegion==0 );\n  assert( pShmNode->pInode==pDbFd->pInode );\n  assert( pShmNode->hShm>=0 || pDbFd->pInode->bProcessLock==1 );\n  assert( pShmNode->hShm<0 || pDbFd->pInode->bProcessLock==0 );\n\n  /* Minimum number of regions required to be mapped. */\n  nReqRegion = ((iRegion+nShmPerMap) / nShmPerMap) * nShmPerMap;\n\n  if( pShmNode->nRegion<nReqRegion ){\n    char **apNew;                      /* New apRegion[] array */\n    int nByte = nReqRegion*szRegion;   /* Minimum required file size */\n    struct stat sStat;                 /* Used by fstat() */\n\n    pShmNode->szRegion = szRegion;\n\n    if( pShmNode->hShm>=0 ){\n      /* The requested region is not mapped into this processes address space.\n      ** Check to see if it has been allocated (i.e. if the wal-index file is\n      ** large enough to contain the requested region).\n      */\n      if( osFstat(pShmNode->hShm, &sStat) ){\n        rc = SQLITE_IOERR_SHMSIZE;\n        goto shmpage_out;\n      }\n\n      if( sStat.st_size<nByte ){\n        /* The requested memory region does not exist. If bExtend is set to\n        ** false, exit early. *pp will be set to NULL and SQLITE_OK returned.\n        */\n        if( !bExtend ){\n          goto shmpage_out;\n        }\n\n        /* Alternatively, if bExtend is true, extend the file. Do this by\n        ** writing a single byte to the end of each (OS) page being\n        ** allocated or extended. Technically, we need only write to the\n        ** last page in order to extend the file. But writing to all new\n        ** pages forces the OS to allocate them immediately, which reduces\n        ** the chances of SIGBUS while accessing the mapped region later on.\n        */\n        else{\n          static const int pgsz = 4096;\n          int iPg;\n\n          /* Write to the last byte of each newly allocated or extended page */\n          assert( (nByte % pgsz)==0 );\n          for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){\n            int x = 0;\n            if( seekAndWriteFd(pShmNode->hShm, iPg*pgsz + pgsz-1,\"\",1,&x)!=1 ){\n              const char *zFile = pShmNode->zFilename;\n              rc = unixLogError(SQLITE_IOERR_SHMSIZE, \"write\", zFile);\n              goto shmpage_out;\n            }\n          }\n        }\n      }\n    }\n\n    /* Map the requested memory region into this processes address space. */\n    apNew = (char **)sqlite3_realloc(\n        pShmNode->apRegion, nReqRegion*sizeof(char *)\n    );\n    if( !apNew ){\n      rc = SQLITE_IOERR_NOMEM_BKPT;\n      goto shmpage_out;\n    }\n    pShmNode->apRegion = apNew;\n    while( pShmNode->nRegion<nReqRegion ){\n      int nMap = szRegion*nShmPerMap;\n      int i;\n      void *pMem;\n      if( pShmNode->hShm>=0 ){\n        pMem = osMmap(0, nMap,\n            pShmNode->isReadonly ? PROT_READ : PROT_READ|PROT_WRITE,\n            MAP_SHARED, pShmNode->hShm, szRegion*(i64)pShmNode->nRegion\n        );\n        if( pMem==MAP_FAILED ){\n          rc = unixLogError(SQLITE_IOERR_SHMMAP, \"mmap\", pShmNode->zFilename);\n          goto shmpage_out;\n        }\n      }else{\n        pMem = sqlite3_malloc64(nMap);\n        if( pMem==0 ){\n          rc = SQLITE_NOMEM_BKPT;\n          goto shmpage_out;\n        }\n        memset(pMem, 0, nMap);\n      }\n\n      for(i=0; i<nShmPerMap; i++){\n        pShmNode->apRegion[pShmNode->nRegion+i] = &((char*)pMem)[szRegion*i];\n      }\n      pShmNode->nRegion += nShmPerMap;\n    }\n  }\n\nshmpage_out:\n  if( pShmNode->nRegion>iRegion ){\n    *pp = pShmNode->apRegion[iRegion];\n  }else{\n    *pp = 0;\n  }\n  if( pShmNode->isReadonly && rc==SQLITE_OK ) rc = SQLITE_READONLY;\n  sqlite3_mutex_leave(pShmNode->pShmMutex);\n  return rc;\n}\n\n/*\n** Check that the pShmNode->aLock[] array comports with the locking bitmasks\n** held by each client. Return true if it does, or false otherwise. This\n** is to be used in an assert(). e.g.\n**\n**     assert( assertLockingArrayOk(pShmNode) );\n*/\n#ifdef SQLITE_DEBUG\nstatic int assertLockingArrayOk(unixShmNode *pShmNode){\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  return 1;\n#else\n  unixShm *pX;\n  int aLock[SQLITE_SHM_NLOCK];\n\n  memset(aLock, 0, sizeof(aLock));\n  for(pX=pShmNode->pFirst; pX; pX=pX->pNext){\n    int i;\n    for(i=0; i<SQLITE_SHM_NLOCK; i++){\n      if( pX->exclMask & (1<<i) ){\n        assert( aLock[i]==0 );\n        aLock[i] = -1;\n      }else if( pX->sharedMask & (1<<i) ){\n        assert( aLock[i]>=0 );\n        aLock[i]++;\n      }\n    }\n  }\n\n  assert( 0==memcmp(pShmNode->aLock, aLock, sizeof(aLock)) );\n  return (memcmp(pShmNode->aLock, aLock, sizeof(aLock))==0);\n#endif\n}\n#endif /* !defined(SQLITE_WASI) && !defined(SQLITE_OMIT_WAL) */\n\n/*\n** Change the lock state for a shared-memory segment.\n**\n** Note that the relationship between SHARED and EXCLUSIVE locks is a little\n** different here than in posix.  In xShmLock(), one can go from unlocked\n** to shared and back or from unlocked to exclusive and back.  But one may\n** not go from shared to exclusive or from exclusive to shared.\n*/\nstatic int unixShmLock(\n  sqlite3_file *fd,          /* Database file holding the shared memory */\n  int ofst,                  /* First lock to acquire or release */\n  int n,                     /* Number of locks to acquire or release */\n  int flags                  /* What to do with the lock */\n){\n  unixFile *pDbFd = (unixFile*)fd;      /* Connection holding shared memory */\n  unixShm *p;                           /* The shared memory being locked */\n  unixShmNode *pShmNode;                /* The underlying file iNode */\n  int rc = SQLITE_OK;                   /* Result code */\n  u16 mask = (1<<(ofst+n)) - (1<<ofst); /* Mask of locks to take or release */\n  int *aLock;\n\n  p = pDbFd->pShm;\n  if( p==0 ) return SQLITE_IOERR_SHMLOCK;\n  pShmNode = p->pShmNode;\n  if( NEVER(pShmNode==0) ) return SQLITE_IOERR_SHMLOCK;\n  aLock = pShmNode->aLock;\n\n  assert( pShmNode==pDbFd->pInode->pShmNode );\n  assert( pShmNode->pInode==pDbFd->pInode );\n  assert( ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK );\n  assert( n>=1 );\n  assert( flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED)\n       || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)\n       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED)\n       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) );\n  assert( n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0 );\n  assert( pShmNode->hShm>=0 || pDbFd->pInode->bProcessLock==1 );\n  assert( pShmNode->hShm<0 || pDbFd->pInode->bProcessLock==0 );\n\n  /* Check that, if this to be a blocking lock, no locks that occur later\n  ** in the following list than the lock being obtained are already held:\n  **\n  **   1. Recovery lock (ofst==2).\n  **   2. Checkpointer lock (ofst==1).\n  **   3. Write lock (ofst==0).\n  **   4. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK).\n  **\n  ** In other words, if this is a blocking lock, none of the locks that\n  ** occur later in the above list than the lock being obtained may be\n  ** held.\n  */\n#if defined(SQLITE_ENABLE_SETLK_TIMEOUT) && defined(SQLITE_DEBUG)\n  {\n    u16 lockMask = (p->exclMask|p->sharedMask);\n    assert( (flags & SQLITE_SHM_UNLOCK) || pDbFd->iBusyTimeout==0 || (\n          (ofst!=2 || lockMask==0)\n       && (ofst!=1 || lockMask==0 || lockMask==2)\n       && (ofst!=0 || lockMask<3)\n       && (ofst<3  || lockMask<(1<<ofst))\n    ));\n  }\n#endif\n\n  /* Check if there is any work to do. There are three cases:\n  **\n  **    a) An unlock operation where there are locks to unlock,\n  **    b) An shared lock where the requested lock is not already held\n  **    c) An exclusive lock where the requested lock is not already held\n  **\n  ** The SQLite core never requests an exclusive lock that it already holds.\n  ** This is assert()ed below.\n  */\n  assert( flags!=(SQLITE_SHM_EXCLUSIVE|SQLITE_SHM_LOCK)\n       || 0==(p->exclMask & mask)\n  );\n  if( ((flags & SQLITE_SHM_UNLOCK) && ((p->exclMask|p->sharedMask) & mask))\n   || (flags==(SQLITE_SHM_SHARED|SQLITE_SHM_LOCK) && 0==(p->sharedMask & mask))\n   || (flags==(SQLITE_SHM_EXCLUSIVE|SQLITE_SHM_LOCK))\n  ){\n\n    /* Take the required mutexes. In SETLK_TIMEOUT mode (blocking locks), if\n    ** this is an attempt on an exclusive lock use sqlite3_mutex_try(). If any\n    ** other thread is holding this mutex, then it is either holding or about\n    ** to hold a lock exclusive to the one being requested, and we may\n    ** therefore return SQLITE_BUSY to the caller.\n    **\n    ** Doing this prevents some deadlock scenarios. For example, thread 1 may\n    ** be a checkpointer blocked waiting on the WRITER lock. And thread 2\n    ** may be a normal SQL client upgrading to a write transaction. In this\n    ** case thread 2 does a non-blocking request for the WRITER lock. But -\n    ** if it were to use sqlite3_mutex_enter() then it would effectively\n    ** become a (doomed) blocking request, as thread 2 would block until thread\n    ** 1 obtained WRITER and released the mutex. Since thread 2 already holds\n    ** a lock on a read-locking slot at this point, this breaks the\n    ** anti-deadlock rules (see above).  */\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    int iMutex;\n    for(iMutex=ofst; iMutex<ofst+n; iMutex++){\n      if( flags==(SQLITE_SHM_LOCK|SQLITE_SHM_EXCLUSIVE) ){\n        rc = sqlite3_mutex_try(pShmNode->aMutex[iMutex]);\n        if( rc!=SQLITE_OK ) goto leave_shmnode_mutexes;\n      }else{\n        sqlite3_mutex_enter(pShmNode->aMutex[iMutex]);\n      }\n    }\n#else\n    sqlite3_mutex_enter(pShmNode->pShmMutex);\n#endif\n\n    if( ALWAYS(rc==SQLITE_OK) ){\n      if( flags & SQLITE_SHM_UNLOCK ){\n        /* Case (a) - unlock.  */\n        int bUnlock = 1;\n        assert( (p->exclMask & p->sharedMask)==0 );\n        assert( !(flags & SQLITE_SHM_EXCLUSIVE) || (p->exclMask & mask)==mask );\n        assert( !(flags & SQLITE_SHM_SHARED) || (p->sharedMask & mask)==mask );\n\n        /* If this is a SHARED lock being unlocked, it is possible that other\n        ** clients within this process are holding the same SHARED lock. In\n        ** this case, set bUnlock to 0 so that the posix lock is not removed\n        ** from the file-descriptor below.  */\n        if( flags & SQLITE_SHM_SHARED ){\n          assert( n==1 );\n          assert( aLock[ofst]>=1 );\n          if( aLock[ofst]>1 ){\n            bUnlock = 0;\n            aLock[ofst]--;\n            p->sharedMask &= ~mask;\n          }\n        }\n\n        if( bUnlock ){\n          rc = unixShmSystemLock(pDbFd, F_UNLCK, ofst+UNIX_SHM_BASE, n);\n          if( rc==SQLITE_OK ){\n            memset(&aLock[ofst], 0, sizeof(int)*n);\n            p->sharedMask &= ~mask;\n            p->exclMask &= ~mask;\n          }\n        }\n      }else if( flags & SQLITE_SHM_SHARED ){\n        /* Case (b) - a shared lock.  */\n\n        if( aLock[ofst]<0 ){\n          /* An exclusive lock is held by some other connection. BUSY. */\n          rc = SQLITE_BUSY;\n        }else if( aLock[ofst]==0 ){\n          rc = unixShmSystemLock(pDbFd, F_RDLCK, ofst+UNIX_SHM_BASE, n);\n        }\n\n        /* Get the local shared locks */\n        if( rc==SQLITE_OK ){\n          p->sharedMask |= mask;\n          aLock[ofst]++;\n        }\n      }else{\n        /* Case (c) - an exclusive lock.  */\n        int ii;\n\n        assert( flags==(SQLITE_SHM_LOCK|SQLITE_SHM_EXCLUSIVE) );\n        assert( (p->sharedMask & mask)==0 );\n        assert( (p->exclMask & mask)==0 );\n\n        /* Make sure no sibling connections hold locks that will block this\n        ** lock.  If any do, return SQLITE_BUSY right away.  */\n        for(ii=ofst; ii<ofst+n; ii++){\n          if( aLock[ii] ){\n            rc = SQLITE_BUSY;\n            break;\n          }\n        }\n\n        /* Get the exclusive locks at the system level. Then if successful\n        ** also update the in-memory values. */\n        if( rc==SQLITE_OK ){\n          rc = unixShmSystemLock(pDbFd, F_WRLCK, ofst+UNIX_SHM_BASE, n);\n          if( rc==SQLITE_OK ){\n            p->exclMask |= mask;\n            for(ii=ofst; ii<ofst+n; ii++){\n              aLock[ii] = -1;\n            }\n          }\n        }\n      }\n      assert( assertLockingArrayOk(pShmNode) );\n    }\n\n    /* Drop the mutexes acquired above. */\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  leave_shmnode_mutexes:\n    for(iMutex--; iMutex>=ofst; iMutex--){\n      sqlite3_mutex_leave(pShmNode->aMutex[iMutex]);\n    }\n#else\n    sqlite3_mutex_leave(pShmNode->pShmMutex);\n#endif\n  }\n\n  OSTRACE((\"SHM-LOCK shmid-%d, pid-%d got %03x,%03x\\n\",\n           p->id, osGetpid(0), p->sharedMask, p->exclMask));\n  return rc;\n}\n\n/*\n** Implement a memory barrier or memory fence on shared memory.\n**\n** All loads and stores begun before the barrier must complete before\n** any load or store begun after the barrier.\n*/\nstatic void unixShmBarrier(\n  sqlite3_file *fd                /* Database file holding the shared memory */\n){\n  UNUSED_PARAMETER(fd);\n  sqlite3MemoryBarrier();         /* compiler-defined memory barrier */\n  assert( fd->pMethods->xLock==nolockLock\n       || unixFileMutexNotheld((unixFile*)fd)\n  );\n  unixEnterMutex();               /* Also mutex, for redundancy */\n  unixLeaveMutex();\n}\n\n/*\n** Close a connection to shared-memory.  Delete the underlying\n** storage if deleteFlag is true.\n**\n** If there is no shared memory associated with the connection then this\n** routine is a harmless no-op.\n*/\nstatic int unixShmUnmap(\n  sqlite3_file *fd,               /* The underlying database file */\n  int deleteFlag                  /* Delete shared-memory if true */\n){\n  unixShm *p;                     /* The connection to be closed */\n  unixShmNode *pShmNode;          /* The underlying shared-memory file */\n  unixShm **pp;                   /* For looping over sibling connections */\n  unixFile *pDbFd;                /* The underlying database file */\n\n  pDbFd = (unixFile*)fd;\n  p = pDbFd->pShm;\n  if( p==0 ) return SQLITE_OK;\n  pShmNode = p->pShmNode;\n\n  assert( pShmNode==pDbFd->pInode->pShmNode );\n  assert( pShmNode->pInode==pDbFd->pInode );\n\n  /* Remove connection p from the set of connections associated\n  ** with pShmNode */\n  sqlite3_mutex_enter(pShmNode->pShmMutex);\n  for(pp=&pShmNode->pFirst; (*pp)!=p; pp = &(*pp)->pNext){}\n  *pp = p->pNext;\n\n  /* Free the connection p */\n  sqlite3_free(p);\n  pDbFd->pShm = 0;\n  sqlite3_mutex_leave(pShmNode->pShmMutex);\n\n  /* If pShmNode->nRef has reached 0, then close the underlying\n  ** shared-memory file, too */\n  assert( unixFileMutexNotheld(pDbFd) );\n  unixEnterMutex();\n  assert( pShmNode->nRef>0 );\n  pShmNode->nRef--;\n  if( pShmNode->nRef==0 ){\n    if( deleteFlag && pShmNode->hShm>=0 ){\n      osUnlink(pShmNode->zFilename);\n    }\n    unixShmPurge(pDbFd);\n  }\n  unixLeaveMutex();\n\n  return SQLITE_OK;\n}\n\n\n#else\n# define unixShmMap     0\n# define unixShmLock    0\n# define unixShmBarrier 0\n# define unixShmUnmap   0\n#endif /* #ifndef SQLITE_OMIT_WAL */\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/*\n** If it is currently memory mapped, unmap file pFd.\n*/\nstatic void unixUnmapfile(unixFile *pFd){\n  assert( pFd->nFetchOut==0 );\n  if( pFd->pMapRegion ){\n    osMunmap(pFd->pMapRegion, pFd->mmapSizeActual);\n    pFd->pMapRegion = 0;\n    pFd->mmapSize = 0;\n    pFd->mmapSizeActual = 0;\n  }\n}\n\n/*\n** Attempt to set the size of the memory mapping maintained by file\n** descriptor pFd to nNew bytes. Any existing mapping is discarded.\n**\n** If successful, this function sets the following variables:\n**\n**       unixFile.pMapRegion\n**       unixFile.mmapSize\n**       unixFile.mmapSizeActual\n**\n** If unsuccessful, an error message is logged via sqlite3_log() and\n** the three variables above are zeroed. In this case SQLite should\n** continue accessing the database using the xRead() and xWrite()\n** methods.\n*/\nstatic void unixRemapfile(\n  unixFile *pFd,                  /* File descriptor object */\n  i64 nNew                        /* Required mapping size */\n){\n  const char *zErr = \"mmap\";\n  int h = pFd->h;                      /* File descriptor open on db file */\n  u8 *pOrig = (u8 *)pFd->pMapRegion;   /* Pointer to current file mapping */\n  i64 nOrig = pFd->mmapSizeActual;     /* Size of pOrig region in bytes */\n  u8 *pNew = 0;                        /* Location of new mapping */\n  int flags = PROT_READ;               /* Flags to pass to mmap() */\n\n  assert( pFd->nFetchOut==0 );\n  assert( nNew>pFd->mmapSize );\n  assert( nNew<=pFd->mmapSizeMax );\n  assert( nNew>0 );\n  assert( pFd->mmapSizeActual>=pFd->mmapSize );\n  assert( MAP_FAILED!=0 );\n\n#ifdef SQLITE_MMAP_READWRITE\n  if( (pFd->ctrlFlags & UNIXFILE_RDONLY)==0 ) flags |= PROT_WRITE;\n#endif\n\n  if( pOrig ){\n#if HAVE_MREMAP\n    i64 nReuse = pFd->mmapSize;\n#else\n    const int szSyspage = osGetpagesize();\n    i64 nReuse = (pFd->mmapSize & ~(szSyspage-1));\n#endif\n    u8 *pReq = &pOrig[nReuse];\n\n    /* Unmap any pages of the existing mapping that cannot be reused. */\n    if( nReuse!=nOrig ){\n      osMunmap(pReq, nOrig-nReuse);\n    }\n\n#if HAVE_MREMAP\n    pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);\n    zErr = \"mremap\";\n#else\n    pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);\n    if( pNew!=MAP_FAILED ){\n      if( pNew!=pReq ){\n        osMunmap(pNew, nNew - nReuse);\n        pNew = 0;\n      }else{\n        pNew = pOrig;\n      }\n    }\n#endif\n\n    /* The attempt to extend the existing mapping failed. Free it. */\n    if( pNew==MAP_FAILED || pNew==0 ){\n      osMunmap(pOrig, nReuse);\n    }\n  }\n\n  /* If pNew is still NULL, try to create an entirely new mapping. */\n  if( pNew==0 ){\n    pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);\n  }\n\n  if( pNew==MAP_FAILED ){\n    pNew = 0;\n    nNew = 0;\n    unixLogError(SQLITE_OK, zErr, pFd->zPath);\n\n    /* If the mmap() above failed, assume that all subsequent mmap() calls\n    ** will probably fail too. Fall back to using xRead/xWrite exclusively\n    ** in this case.  */\n    pFd->mmapSizeMax = 0;\n  }\n  pFd->pMapRegion = (void *)pNew;\n  pFd->mmapSize = pFd->mmapSizeActual = nNew;\n}\n\n/*\n** Memory map or remap the file opened by file-descriptor pFd (if the file\n** is already mapped, the existing mapping is replaced by the new). Or, if\n** there already exists a mapping for this file, and there are still\n** outstanding xFetch() references to it, this function is a no-op.\n**\n** If parameter nByte is non-negative, then it is the requested size of\n** the mapping to create. Otherwise, if nByte is less than zero, then the\n** requested size is the size of the file on disk. The actual size of the\n** created mapping is either the requested size or the value configured\n** using SQLITE_FCNTL_MMAP_LIMIT, whichever is smaller.\n**\n** SQLITE_OK is returned if no error occurs (even if the mapping is not\n** recreated as a result of outstanding references) or an SQLite error\n** code otherwise.\n*/\nstatic int unixMapfile(unixFile *pFd, i64 nMap){\n  assert( nMap>=0 || pFd->nFetchOut==0 );\n  assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) );\n  if( pFd->nFetchOut>0 ) return SQLITE_OK;\n\n  if( nMap<0 ){\n    struct stat statbuf;          /* Low-level file information */\n    if( osFstat(pFd->h, &statbuf) ){\n      return SQLITE_IOERR_FSTAT;\n    }\n    nMap = statbuf.st_size;\n  }\n  if( nMap>pFd->mmapSizeMax ){\n    nMap = pFd->mmapSizeMax;\n  }\n\n  assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) );\n  if( nMap!=pFd->mmapSize ){\n    unixRemapfile(pFd, nMap);\n  }\n\n  return SQLITE_OK;\n}\n#endif /* SQLITE_MAX_MMAP_SIZE>0 */\n\n/*\n** If possible, return a pointer to a mapping of file fd starting at offset\n** iOff. The mapping must be valid for at least nAmt bytes.\n**\n** If such a pointer can be obtained, store it in *pp and return SQLITE_OK.\n** Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.\n** Finally, if an error does occur, return an SQLite error code. The final\n** value of *pp is undefined in this case.\n**\n** If this function does return a pointer, the caller must eventually\n** release the reference by calling unixUnfetch().\n*/\nstatic int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){\n#if SQLITE_MAX_MMAP_SIZE>0\n  unixFile *pFd = (unixFile *)fd;   /* The underlying database file */\n#endif\n  *pp = 0;\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( pFd->mmapSizeMax>0 ){\n    /* Ensure that there is always at least a 256 byte buffer of addressable\n    ** memory following the returned page. If the database is corrupt,\n    ** SQLite may overread the page slightly (in practice only a few bytes,\n    ** but 256 is safe, round, number).  */\n    const int nEofBuffer = 256;\n    if( pFd->pMapRegion==0 ){\n      int rc = unixMapfile(pFd, -1);\n      if( rc!=SQLITE_OK ) return rc;\n    }\n    if( pFd->mmapSize >= (iOff+nAmt+nEofBuffer) ){\n      *pp = &((u8 *)pFd->pMapRegion)[iOff];\n      pFd->nFetchOut++;\n    }\n  }\n#endif\n  return SQLITE_OK;\n}\n\n/*\n** If the third argument is non-NULL, then this function releases a\n** reference obtained by an earlier call to unixFetch(). The second\n** argument passed to this function must be the same as the corresponding\n** argument that was passed to the unixFetch() invocation.\n**\n** Or, if the third argument is NULL, then this function is being called\n** to inform the VFS layer that, according to POSIX, any existing mapping\n** may now be invalid and should be unmapped.\n*/\nstatic int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){\n#if SQLITE_MAX_MMAP_SIZE>0\n  unixFile *pFd = (unixFile *)fd;   /* The underlying database file */\n  UNUSED_PARAMETER(iOff);\n\n  /* If p==0 (unmap the entire file) then there must be no outstanding\n  ** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),\n  ** then there must be at least one outstanding.  */\n  assert( (p==0)==(pFd->nFetchOut==0) );\n\n  /* If p!=0, it must match the iOff value. */\n  assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );\n\n  if( p ){\n    pFd->nFetchOut--;\n  }else{\n    unixUnmapfile(pFd);\n  }\n\n  assert( pFd->nFetchOut>=0 );\n#else\n  UNUSED_PARAMETER(fd);\n  UNUSED_PARAMETER(p);\n  UNUSED_PARAMETER(iOff);\n#endif\n  return SQLITE_OK;\n}\n\n/*\n** Here ends the implementation of all sqlite3_file methods.\n**\n********************** End sqlite3_file Methods *******************************\n******************************************************************************/\n\n/*\n** This division contains definitions of sqlite3_io_methods objects that\n** implement various file locking strategies.  It also contains definitions\n** of \"finder\" functions.  A finder-function is used to locate the appropriate\n** sqlite3_io_methods object for a particular database file.  The pAppData\n** field of the sqlite3_vfs VFS objects are initialized to be pointers to\n** the correct finder-function for that VFS.\n**\n** Most finder functions return a pointer to a fixed sqlite3_io_methods\n** object.  The only interesting finder-function is autolockIoFinder, which\n** looks at the filesystem type and tries to guess the best locking\n** strategy from that.\n**\n** For finder-function F, two objects are created:\n**\n**    (1) The real finder-function named \"FImpt()\".\n**\n**    (2) A constant pointer to this function named just \"F\".\n**\n**\n** A pointer to the F pointer is used as the pAppData value for VFS\n** objects.  We have to do this instead of letting pAppData point\n** directly at the finder-function since C90 rules prevent a void*\n** from be cast into a function pointer.\n**\n**\n** Each instance of this macro generates two objects:\n**\n**   *  A constant sqlite3_io_methods object call METHOD that has locking\n**      methods CLOSE, LOCK, UNLOCK, CKRESLOCK.\n**\n**   *  An I/O method finder function called FINDER that returns a pointer\n**      to the METHOD object in the previous bullet.\n*/\n#define IOMETHODS(FINDER,METHOD,VERSION,CLOSE,LOCK,UNLOCK,CKLOCK,SHMMAP)     \\\nstatic const sqlite3_io_methods METHOD = {                                   \\\n   VERSION,                    /* iVersion */                                \\\n   CLOSE,                      /* xClose */                                  \\\n   unixRead,                   /* xRead */                                   \\\n   unixWrite,                  /* xWrite */                                  \\\n   unixTruncate,               /* xTruncate */                               \\\n   unixSync,                   /* xSync */                                   \\\n   unixFileSize,               /* xFileSize */                               \\\n   LOCK,                       /* xLock */                                   \\\n   UNLOCK,                     /* xUnlock */                                 \\\n   CKLOCK,                     /* xCheckReservedLock */                      \\\n   unixFileControl,            /* xFileControl */                            \\\n   unixSectorSize,             /* xSectorSize */                             \\\n   unixDeviceCharacteristics,  /* xDeviceCapabilities */                     \\\n   SHMMAP,                     /* xShmMap */                                 \\\n   unixShmLock,                /* xShmLock */                                \\\n   unixShmBarrier,             /* xShmBarrier */                             \\\n   unixShmUnmap,               /* xShmUnmap */                               \\\n   unixFetch,                  /* xFetch */                                  \\\n   unixUnfetch,                /* xUnfetch */                                \\\n};                                                                           \\\nstatic const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){   \\\n  UNUSED_PARAMETER(z); UNUSED_PARAMETER(p);                                  \\\n  return &METHOD;                                                            \\\n}                                                                            \\\nstatic const sqlite3_io_methods *(*const FINDER)(const char*,unixFile *p)    \\\n    = FINDER##Impl;\n\n/*\n** Here are all of the sqlite3_io_methods objects for each of the\n** locking strategies.  Functions that return pointers to these methods\n** are also created.\n*/\nIOMETHODS(\n  posixIoFinder,            /* Finder function name */\n  posixIoMethods,           /* sqlite3_io_methods object name */\n  3,                        /* shared memory and mmap are enabled */\n  unixClose,                /* xClose method */\n  unixLock,                 /* xLock method */\n  unixUnlock,               /* xUnlock method */\n  unixCheckReservedLock,    /* xCheckReservedLock method */\n  unixShmMap                /* xShmMap method */\n)\nIOMETHODS(\n  nolockIoFinder,           /* Finder function name */\n  nolockIoMethods,          /* sqlite3_io_methods object name */\n  3,                        /* shared memory and mmap are enabled */\n  nolockClose,              /* xClose method */\n  nolockLock,               /* xLock method */\n  nolockUnlock,             /* xUnlock method */\n  nolockCheckReservedLock,  /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\nIOMETHODS(\n  dotlockIoFinder,          /* Finder function name */\n  dotlockIoMethods,         /* sqlite3_io_methods object name */\n  1,                        /* shared memory is disabled */\n  dotlockClose,             /* xClose method */\n  dotlockLock,              /* xLock method */\n  dotlockUnlock,            /* xUnlock method */\n  dotlockCheckReservedLock, /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\n\n#if SQLITE_ENABLE_LOCKING_STYLE\nIOMETHODS(\n  flockIoFinder,            /* Finder function name */\n  flockIoMethods,           /* sqlite3_io_methods object name */\n  1,                        /* shared memory is disabled */\n  flockClose,               /* xClose method */\n  flockLock,                /* xLock method */\n  flockUnlock,              /* xUnlock method */\n  flockCheckReservedLock,   /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\n#endif\n\n#if OS_VXWORKS\nIOMETHODS(\n  semIoFinder,              /* Finder function name */\n  semIoMethods,             /* sqlite3_io_methods object name */\n  1,                        /* shared memory is disabled */\n  semXClose,                /* xClose method */\n  semXLock,                 /* xLock method */\n  semXUnlock,               /* xUnlock method */\n  semXCheckReservedLock,    /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\n#endif\n\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\nIOMETHODS(\n  afpIoFinder,              /* Finder function name */\n  afpIoMethods,             /* sqlite3_io_methods object name */\n  1,                        /* shared memory is disabled */\n  afpClose,                 /* xClose method */\n  afpLock,                  /* xLock method */\n  afpUnlock,                /* xUnlock method */\n  afpCheckReservedLock,     /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\n#endif\n\n/*\n** The proxy locking method is a \"super-method\" in the sense that it\n** opens secondary file descriptors for the conch and lock files and\n** it uses proxy, dot-file, AFP, and flock() locking methods on those\n** secondary files.  For this reason, the division that implements\n** proxy locking is located much further down in the file.  But we need\n** to go ahead and define the sqlite3_io_methods and finder function\n** for proxy locking here.  So we forward declare the I/O methods.\n*/\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\nstatic int proxyClose(sqlite3_file*);\nstatic int proxyLock(sqlite3_file*, int);\nstatic int proxyUnlock(sqlite3_file*, int);\nstatic int proxyCheckReservedLock(sqlite3_file*, int*);\nIOMETHODS(\n  proxyIoFinder,            /* Finder function name */\n  proxyIoMethods,           /* sqlite3_io_methods object name */\n  1,                        /* shared memory is disabled */\n  proxyClose,               /* xClose method */\n  proxyLock,                /* xLock method */\n  proxyUnlock,              /* xUnlock method */\n  proxyCheckReservedLock,   /* xCheckReservedLock method */\n  0                         /* xShmMap method */\n)\n#endif\n\n/* nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set */\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\nIOMETHODS(\n  nfsIoFinder,               /* Finder function name */\n  nfsIoMethods,              /* sqlite3_io_methods object name */\n  1,                         /* shared memory is disabled */\n  unixClose,                 /* xClose method */\n  unixLock,                  /* xLock method */\n  nfsUnlock,                 /* xUnlock method */\n  unixCheckReservedLock,     /* xCheckReservedLock method */\n  0                          /* xShmMap method */\n)\n#endif\n\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n/*\n** This \"finder\" function attempts to determine the best locking strategy\n** for the database file \"filePath\".  It then returns the sqlite3_io_methods\n** object that implements that strategy.\n**\n** This is for MacOSX only.\n*/\nstatic const sqlite3_io_methods *autolockIoFinderImpl(\n  const char *filePath,    /* name of the database file */\n  unixFile *pNew           /* open file object for the database file */\n){\n  static const struct Mapping {\n    const char *zFilesystem;              /* Filesystem type name */\n    const sqlite3_io_methods *pMethods;   /* Appropriate locking method */\n  } aMap[] = {\n    { \"hfs\",    &posixIoMethods },\n    { \"ufs\",    &posixIoMethods },\n    { \"afpfs\",  &afpIoMethods },\n    { \"smbfs\",  &afpIoMethods },\n    { \"webdav\", &nolockIoMethods },\n    { 0, 0 }\n  };\n  int i;\n  struct statfs fsInfo;\n  struct flock lockInfo;\n\n  if( !filePath ){\n    /* If filePath==NULL that means we are dealing with a transient file\n    ** that does not need to be locked. */\n    return &nolockIoMethods;\n  }\n  if( statfs(filePath, &fsInfo) != -1 ){\n    if( fsInfo.f_flags & MNT_RDONLY ){\n      return &nolockIoMethods;\n    }\n    for(i=0; aMap[i].zFilesystem; i++){\n      if( strcmp(fsInfo.f_fstypename, aMap[i].zFilesystem)==0 ){\n        return aMap[i].pMethods;\n      }\n    }\n  }\n\n  /* Default case. Handles, amongst others, \"nfs\".\n  ** Test byte-range lock using fcntl(). If the call succeeds,\n  ** assume that the file-system supports POSIX style locks.\n  */\n  lockInfo.l_len = 1;\n  lockInfo.l_start = 0;\n  lockInfo.l_whence = SEEK_SET;\n  lockInfo.l_type = F_RDLCK;\n  if( osFcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {\n    if( strcmp(fsInfo.f_fstypename, \"nfs\")==0 ){\n      return &nfsIoMethods;\n    } else {\n      return &posixIoMethods;\n    }\n  }else{\n    return &dotlockIoMethods;\n  }\n}\nstatic const sqlite3_io_methods\n  *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;\n\n#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */\n\n#if OS_VXWORKS\n/*\n** This \"finder\" function for VxWorks checks to see if posix advisory\n** locking works.  If it does, then that is what is used.  If it does not\n** work, then fallback to named semaphore locking.\n*/\nstatic const sqlite3_io_methods *vxworksIoFinderImpl(\n  const char *filePath,    /* name of the database file */\n  unixFile *pNew           /* the open file object */\n){\n  struct flock lockInfo;\n\n  if( !filePath ){\n    /* If filePath==NULL that means we are dealing with a transient file\n    ** that does not need to be locked. */\n    return &nolockIoMethods;\n  }\n\n  /* Test if fcntl() is supported and use POSIX style locks.\n  ** Otherwise fall back to the named semaphore method.\n  */\n  lockInfo.l_len = 1;\n  lockInfo.l_start = 0;\n  lockInfo.l_whence = SEEK_SET;\n  lockInfo.l_type = F_RDLCK;\n  if( osFcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {\n    return &posixIoMethods;\n  }else{\n    return &semIoMethods;\n  }\n}\nstatic const sqlite3_io_methods\n  *(*const vxworksIoFinder)(const char*,unixFile*) = vxworksIoFinderImpl;\n\n#endif /* OS_VXWORKS */\n\n/*\n** An abstract type for a pointer to an IO method finder function:\n*/\ntypedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);\n\n\n/****************************************************************************\n**************************** sqlite3_vfs methods ****************************\n**\n** This division contains the implementation of methods on the\n** sqlite3_vfs object.\n*/\n\n/*\n** Initialize the contents of the unixFile structure pointed to by pId.\n*/\nstatic int fillInUnixFile(\n  sqlite3_vfs *pVfs,      /* Pointer to vfs object */\n  int h,                  /* Open file descriptor of file being opened */\n  sqlite3_file *pId,      /* Write to the unixFile structure here */\n  const char *zFilename,  /* Name of the file being opened */\n  int ctrlFlags           /* Zero or more UNIXFILE_* values */\n){\n  const sqlite3_io_methods *pLockingStyle;\n  unixFile *pNew = (unixFile *)pId;\n  int rc = SQLITE_OK;\n\n  assert( pNew->pInode==NULL );\n\n  /* No locking occurs in temporary files */\n  assert( zFilename!=0 || (ctrlFlags & UNIXFILE_NOLOCK)!=0 );\n\n  OSTRACE((\"OPEN    %-3d %s\\n\", h, zFilename));\n  pNew->h = h;\n  pNew->pVfs = pVfs;\n  pNew->zPath = zFilename;\n  pNew->ctrlFlags = (u8)ctrlFlags;\n#if SQLITE_MAX_MMAP_SIZE>0\n  pNew->mmapSizeMax = sqlite3GlobalConfig.szMmap;\n#endif\n  if( sqlite3_uri_boolean(((ctrlFlags & UNIXFILE_URI) ? zFilename : 0),\n                           \"psow\", SQLITE_POWERSAFE_OVERWRITE) ){\n    pNew->ctrlFlags |= UNIXFILE_PSOW;\n  }\n  if( strcmp(pVfs->zName,\"unix-excl\")==0 ){\n    pNew->ctrlFlags |= UNIXFILE_EXCL;\n  }\n\n#if OS_VXWORKS\n  pNew->pId = vxworksFindFileId(zFilename);\n  if( pNew->pId==0 ){\n    ctrlFlags |= UNIXFILE_NOLOCK;\n    rc = SQLITE_NOMEM_BKPT;\n  }\n#endif\n\n  if( ctrlFlags & UNIXFILE_NOLOCK ){\n    pLockingStyle = &nolockIoMethods;\n  }else{\n    pLockingStyle = (**(finder_type*)pVfs->pAppData)(zFilename, pNew);\n#if SQLITE_ENABLE_LOCKING_STYLE\n    /* Cache zFilename in the locking context (AFP and dotlock override) for\n    ** proxyLock activation is possible (remote proxy is based on db name)\n    ** zFilename remains valid until file is closed, to support */\n    pNew->lockingContext = (void*)zFilename;\n#endif\n  }\n\n  if( pLockingStyle == &posixIoMethods\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n    || pLockingStyle == &nfsIoMethods\n#endif\n  ){\n    unixEnterMutex();\n    rc = findInodeInfo(pNew, &pNew->pInode);\n    if( rc!=SQLITE_OK ){\n      /* If an error occurred in findInodeInfo(), close the file descriptor\n      ** immediately, before releasing the mutex. findInodeInfo() may fail\n      ** in two scenarios:\n      **\n      **   (a) A call to fstat() failed.\n      **   (b) A malloc failed.\n      **\n      ** Scenario (b) may only occur if the process is holding no other\n      ** file descriptors open on the same file. If there were other file\n      ** descriptors on this file, then no malloc would be required by\n      ** findInodeInfo(). If this is the case, it is quite safe to close\n      ** handle h - as it is guaranteed that no posix locks will be released\n      ** by doing so.\n      **\n      ** If scenario (a) caused the error then things are not so safe. The\n      ** implicit assumption here is that if fstat() fails, things are in\n      ** such bad shape that dropping a lock or two doesn't matter much.\n      */\n      robust_close(pNew, h, __LINE__);\n      h = -1;\n    }\n    unixLeaveMutex();\n  }\n\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n  else if( pLockingStyle == &afpIoMethods ){\n    /* AFP locking uses the file path so it needs to be included in\n    ** the afpLockingContext.\n    */\n    afpLockingContext *pCtx;\n    pNew->lockingContext = pCtx = sqlite3_malloc64( sizeof(*pCtx) );\n    if( pCtx==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n    }else{\n      /* NB: zFilename exists and remains valid until the file is closed\n      ** according to requirement F11141.  So we do not need to make a\n      ** copy of the filename. */\n      pCtx->dbPath = zFilename;\n      pCtx->reserved = 0;\n      srandomdev();\n      unixEnterMutex();\n      rc = findInodeInfo(pNew, &pNew->pInode);\n      if( rc!=SQLITE_OK ){\n        sqlite3_free(pNew->lockingContext);\n        robust_close(pNew, h, __LINE__);\n        h = -1;\n      }\n      unixLeaveMutex();\n    }\n  }\n#endif\n\n  else if( pLockingStyle == &dotlockIoMethods ){\n    /* Dotfile locking uses the file path so it needs to be included in\n    ** the dotlockLockingContext\n    */\n    char *zLockFile;\n    int nFilename;\n    assert( zFilename!=0 );\n    nFilename = (int)strlen(zFilename) + 6;\n    zLockFile = (char *)sqlite3_malloc64(nFilename);\n    if( zLockFile==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n    }else{\n      sqlite3_snprintf(nFilename, zLockFile, \"%s\" DOTLOCK_SUFFIX, zFilename);\n    }\n    pNew->lockingContext = zLockFile;\n  }\n\n#if OS_VXWORKS\n  else if( pLockingStyle == &semIoMethods ){\n    /* Named semaphore locking uses the file path so it needs to be\n    ** included in the semLockingContext\n    */\n    unixEnterMutex();\n    rc = findInodeInfo(pNew, &pNew->pInode);\n    if( (rc==SQLITE_OK) && (pNew->pInode->pSem==NULL) ){\n      char *zSemName = pNew->pInode->aSemName;\n      int n;\n      sqlite3_snprintf(MAX_PATHNAME, zSemName, \"/%s.sem\",\n                       pNew->pId->zCanonicalName);\n      for( n=1; zSemName[n]; n++ )\n        if( zSemName[n]=='/' ) zSemName[n] = '_';\n      pNew->pInode->pSem = sem_open(zSemName, O_CREAT, 0666, 1);\n      if( pNew->pInode->pSem == SEM_FAILED ){\n        rc = SQLITE_NOMEM_BKPT;\n        pNew->pInode->aSemName[0] = '\\0';\n      }\n    }\n    unixLeaveMutex();\n  }\n#endif\n\n  storeLastErrno(pNew, 0);\n#if OS_VXWORKS\n  if( rc!=SQLITE_OK ){\n    if( h>=0 ){\n      robust_close(pNew, h, __LINE__);\n      h = -1;\n    }\n    if( pNew->ctrlFlags & UNIXFILE_DELETE ){\n      osUnlink(zFilename);\n    }\n    if( pNew->pId ){\n      vxworksReleaseFileId(pNew->pId);\n      pNew->pId = 0;\n    }\n  }\n#endif\n  if( rc!=SQLITE_OK ){\n    if( h>=0 ) robust_close(pNew, h, __LINE__);\n  }else{\n    pId->pMethods = pLockingStyle;\n    OpenCounter(+1);\n    verifyDbFile(pNew);\n  }\n  return rc;\n}\n\n/*\n** Directories to consider for temp files.\n*/\nstatic const char *azTempDirs[] = {\n  0,\n  0,\n  \"/var/tmp\",\n  \"/usr/tmp\",\n  \"/tmp\",\n  \".\"\n};\n\n/*\n** Initialize first two members of azTempDirs[] array.\n*/\nstatic void unixTempFileInit(void){\n  azTempDirs[0] = getenv(\"SQLITE_TMPDIR\");\n  azTempDirs[1] = getenv(\"TMPDIR\");\n}\n\n/*\n** Return the name of a directory in which to put temporary files.\n** If no suitable temporary file directory can be found, return NULL.\n*/\nstatic const char *unixTempFileDir(void){\n  unsigned int i = 0;\n  struct stat buf;\n  const char *zDir = sqlite3_temp_directory;\n\n  while(1){\n    if( zDir!=0\n#if OS_VXWORKS\n     && zDir[0]=='/'\n#endif\n     && osStat(zDir, &buf)==0\n     && S_ISDIR(buf.st_mode)\n     && osAccess(zDir, 03)==0\n    ){\n      return zDir;\n    }\n    if( i>=sizeof(azTempDirs)/sizeof(azTempDirs[0]) ) break;\n    zDir = azTempDirs[i++];\n  }\n  return 0;\n}\n\n/*\n** Create a temporary file name in zBuf.  zBuf must be allocated\n** by the calling process and must be big enough to hold at least\n** pVfs->mxPathname bytes.\n*/\nstatic int unixGetTempname(int nBuf, char *zBuf){\n  const char *zDir;\n  int iLimit = 0;\n  int rc = SQLITE_OK;\n\n  /* It's odd to simulate an io-error here, but really this is just\n  ** using the io-error infrastructure to test that SQLite handles this\n  ** function failing.\n  */\n  zBuf[0] = 0;\n  SimulateIOError( return SQLITE_IOERR );\n\n  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  zDir = unixTempFileDir();\n  if( zDir==0 ){\n    rc = SQLITE_IOERR_GETTEMPPATH;\n  }else{\n    do{\n      u64 r;\n      sqlite3_randomness(sizeof(r), &r);\n      assert( nBuf>2 );\n      zBuf[nBuf-2] = 0;\n      sqlite3_snprintf(nBuf, zBuf, \"%s/\"SQLITE_TEMP_FILE_PREFIX\"%llx%c\",\n                       zDir, r, 0);\n      if( zBuf[nBuf-2]!=0 || (iLimit++)>10 ){\n        rc = SQLITE_ERROR;\n        break;\n      }\n    }while( osAccess(zBuf,0)==0 );\n  }\n  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  return rc;\n}\n\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n/*\n** Routine to transform a unixFile into a proxy-locking unixFile.\n** Implementation in the proxy-lock division, but used by unixOpen()\n** if SQLITE_PREFER_PROXY_LOCKING is defined.\n*/\nstatic int proxyTransformUnixFile(unixFile*, const char*);\n#endif\n\n/*\n** Search for an unused file descriptor that was opened on the database\n** file (not a journal or super-journal file) identified by pathname\n** zPath with SQLITE_OPEN_XXX flags matching those passed as the second\n** argument to this function.\n**\n** Such a file descriptor may exist if a database connection was closed\n** but the associated file descriptor could not be closed because some\n** other file descriptor open on the same file is holding a file-lock.\n** Refer to comments in the unixClose() function and the lengthy comment\n** describing \"Posix Advisory Locking\" at the start of this file for\n** further details. Also, ticket #4018.\n**\n** If a suitable file descriptor is found, then it is returned. If no\n** such file descriptor is located, -1 is returned.\n*/\nstatic UnixUnusedFd *findReusableFd(const char *zPath, int flags){\n  UnixUnusedFd *pUnused = 0;\n\n  /* Do not search for an unused file descriptor on vxworks. Not because\n  ** vxworks would not benefit from the change (it might, we're not sure),\n  ** but because no way to test it is currently available. It is better\n  ** not to risk breaking vxworks support for the sake of such an obscure\n  ** feature.  */\n#if !OS_VXWORKS\n  struct stat sStat;                   /* Results of stat() call */\n\n  unixEnterMutex();\n\n  /* A stat() call may fail for various reasons. If this happens, it is\n  ** almost certain that an open() call on the same path will also fail.\n  ** For this reason, if an error occurs in the stat() call here, it is\n  ** ignored and -1 is returned. The caller will try to open a new file\n  ** descriptor on the same path, fail, and return an error to SQLite.\n  **\n  ** Even if a subsequent open() call does succeed, the consequences of\n  ** not searching for a reusable file descriptor are not dire.  */\n  if( inodeList!=0 && 0==osStat(zPath, &sStat) ){\n    unixInodeInfo *pInode;\n\n    pInode = inodeList;\n    while( pInode && (pInode->fileId.dev!=sStat.st_dev\n                     || pInode->fileId.ino!=(u64)sStat.st_ino) ){\n       pInode = pInode->pNext;\n    }\n    if( pInode ){\n      UnixUnusedFd **pp;\n      assert( sqlite3_mutex_notheld(pInode->pLockMutex) );\n      sqlite3_mutex_enter(pInode->pLockMutex);\n      flags &= (SQLITE_OPEN_READONLY|SQLITE_OPEN_READWRITE);\n      for(pp=&pInode->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));\n      pUnused = *pp;\n      if( pUnused ){\n        *pp = pUnused->pNext;\n      }\n      sqlite3_mutex_leave(pInode->pLockMutex);\n    }\n  }\n  unixLeaveMutex();\n#endif    /* if !OS_VXWORKS */\n  return pUnused;\n}\n\n/*\n** Find the mode, uid and gid of file zFile.\n*/\nstatic int getFileMode(\n  const char *zFile,              /* File name */\n  mode_t *pMode,                  /* OUT: Permissions of zFile */\n  uid_t *pUid,                    /* OUT: uid of zFile. */\n  gid_t *pGid                     /* OUT: gid of zFile. */\n){\n  struct stat sStat;              /* Output of stat() on database file */\n  int rc = SQLITE_OK;\n  if( 0==osStat(zFile, &sStat) ){\n    *pMode = sStat.st_mode & 0777;\n    *pUid = sStat.st_uid;\n    *pGid = sStat.st_gid;\n  }else{\n    rc = SQLITE_IOERR_FSTAT;\n  }\n  return rc;\n}\n\n/*\n** This function is called by unixOpen() to determine the unix permissions\n** to create new files with. If no error occurs, then SQLITE_OK is returned\n** and a value suitable for passing as the third argument to open(2) is\n** written to *pMode. If an IO error occurs, an SQLite error code is\n** returned and the value of *pMode is not modified.\n**\n** In most cases, this routine sets *pMode to 0, which will become\n** an indication to robust_open() to create the file using\n** SQLITE_DEFAULT_FILE_PERMISSIONS adjusted by the umask.\n** But if the file being opened is a WAL or regular journal file, then\n** this function queries the file-system for the permissions on the\n** corresponding database file and sets *pMode to this value. Whenever\n** possible, WAL and journal files are created using the same permissions\n** as the associated database file.\n**\n** If the SQLITE_ENABLE_8_3_NAMES option is enabled, then the\n** original filename is unavailable.  But 8_3_NAMES is only used for\n** FAT filesystems and permissions do not matter there, so just use\n** the default permissions.  In 8_3_NAMES mode, leave *pMode set to zero.\n*/\nstatic int findCreateFileMode(\n  const char *zPath,              /* Path of file (possibly) being created */\n  int flags,                      /* Flags passed as 4th argument to xOpen() */\n  mode_t *pMode,                  /* OUT: Permissions to open file with */\n  uid_t *pUid,                    /* OUT: uid to set on the file */\n  gid_t *pGid                     /* OUT: gid to set on the file */\n){\n  int rc = SQLITE_OK;             /* Return Code */\n  *pMode = 0;\n  *pUid = 0;\n  *pGid = 0;\n  if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){\n    char zDb[MAX_PATHNAME+1];     /* Database file path */\n    int nDb;                      /* Number of valid bytes in zDb */\n\n    /* zPath is a path to a WAL or journal file. The following block derives\n    ** the path to the associated database file from zPath. This block handles\n    ** the following naming conventions:\n    **\n    **   \"<path to db>-journal\"\n    **   \"<path to db>-wal\"\n    **   \"<path to db>-journalNN\"\n    **   \"<path to db>-walNN\"\n    **\n    ** where NN is a decimal number. The NN naming schemes are\n    ** used by the test_multiplex.c module.\n    **\n    ** In normal operation, the journal file name will always contain\n    ** a '-' character.  However in 8+3 filename mode, or if a corrupt\n    ** rollback journal specifies a super-journal with a goofy name, then\n    ** the '-' might be missing or the '-' might be the first character in\n    ** the filename.  In that case, just return SQLITE_OK with *pMode==0.\n    */\n    nDb = sqlite3Strlen30(zPath) - 1;\n    while( nDb>0 && zPath[nDb]!='.' ){\n      if( zPath[nDb]=='-' ){\n        memcpy(zDb, zPath, nDb);\n        zDb[nDb] = '\\0';\n        rc = getFileMode(zDb, pMode, pUid, pGid);\n        break;\n      }\n      nDb--;\n    }\n  }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){\n    *pMode = 0600;\n  }else if( flags & SQLITE_OPEN_URI ){\n    /* If this is a main database file and the file was opened using a URI\n    ** filename, check for the \"modeof\" parameter. If present, interpret\n    ** its value as a filename and try to copy the mode, uid and gid from\n    ** that file.  */\n    const char *z = sqlite3_uri_parameter(zPath, \"modeof\");\n    if( z ){\n      rc = getFileMode(z, pMode, pUid, pGid);\n    }\n  }\n  return rc;\n}\n\n/*\n** Open the file zPath.\n**\n** Previously, the SQLite OS layer used three functions in place of this\n** one:\n**\n**     sqlite3OsOpenReadWrite();\n**     sqlite3OsOpenReadOnly();\n**     sqlite3OsOpenExclusive();\n**\n** These calls correspond to the following combinations of flags:\n**\n**     ReadWrite() ->     (READWRITE | CREATE)\n**     ReadOnly()  ->     (READONLY)\n**     OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE)\n**\n** The old OpenExclusive() accepted a boolean argument - \"delFlag\". If\n** true, the file was configured to be automatically deleted when the\n** file handle closed. To achieve the same effect using this new\n** interface, add the DELETEONCLOSE flag to those specified above for\n** OpenExclusive().\n*/\nstatic int unixOpen(\n  sqlite3_vfs *pVfs,           /* The VFS for which this is the xOpen method */\n  const char *zPath,           /* Pathname of file to be opened */\n  sqlite3_file *pFile,         /* The file descriptor to be filled in */\n  int flags,                   /* Input flags to control the opening */\n  int *pOutFlags               /* Output flags returned to SQLite core */\n){\n  unixFile *p = (unixFile *)pFile;\n  int fd = -1;                   /* File descriptor returned by open() */\n  int openFlags = 0;             /* Flags to pass to open() */\n  int eType = flags&0x0FFF00;  /* Type of file to open */\n  int noLock;                    /* True to omit locking primitives */\n  int rc = SQLITE_OK;            /* Function Return Code */\n  int ctrlFlags = 0;             /* UNIXFILE_* flags */\n\n  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);\n  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);\n  int isCreate     = (flags & SQLITE_OPEN_CREATE);\n  int isReadonly   = (flags & SQLITE_OPEN_READONLY);\n  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);\n#if SQLITE_ENABLE_LOCKING_STYLE\n  int isAutoProxy  = (flags & SQLITE_OPEN_AUTOPROXY);\n#endif\n#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE\n  struct statfs fsInfo;\n#endif\n\n  /* If creating a super- or main-file journal, this function will open\n  ** a file-descriptor on the directory too. The first time unixSync()\n  ** is called the directory file descriptor will be fsync()ed and close()d.\n  */\n  int isNewJrnl = (isCreate && (\n        eType==SQLITE_OPEN_SUPER_JOURNAL\n     || eType==SQLITE_OPEN_MAIN_JOURNAL\n     || eType==SQLITE_OPEN_WAL\n  ));\n\n  /* If argument zPath is a NULL pointer, this function is required to open\n  ** a temporary file. Use this buffer to store the file name in.\n  */\n  char zTmpname[MAX_PATHNAME+2];\n  const char *zName = zPath;\n\n  /* Check the following statements are true:\n  **\n  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and\n  **   (b) if CREATE is set, then READWRITE must also be set, and\n  **   (c) if EXCLUSIVE is set, then CREATE must also be set.\n  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.\n  */\n  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));\n  assert(isCreate==0 || isReadWrite);\n  assert(isExclusive==0 || isCreate);\n  assert(isDelete==0 || isCreate);\n\n  /* The main DB, main journal, WAL file and super-journal are never\n  ** automatically deleted. Nor are they ever temporary files.  */\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_SUPER_JOURNAL );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );\n\n  /* Assert that the upper layer has set one of the \"file-type\" flags. */\n  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB\n       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL\n       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_SUPER_JOURNAL\n       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL\n  );\n\n#if OS_VXWORKS\n  /* The file-ID mechanism used in Vxworks requires that all pathnames\n  ** provided to unixOpen must be absolute pathnames. */\n  if( zPath!=0 && zPath[0]!='/' ){ return SQLITE_CANTOPEN; }\n#endif\n\n  /* Detect a pid change and reset the PRNG.  There is a race condition\n  ** here such that two or more threads all trying to open databases at\n  ** the same instant might all reset the PRNG.  But multiple resets\n  ** are harmless.\n  */\n  if( randomnessPid!=osGetpid(0) ){\n    randomnessPid = osGetpid(0);\n    sqlite3_randomness(0,0);\n  }\n  memset(p, 0, sizeof(unixFile));\n\n#ifdef SQLITE_ASSERT_NO_FILES\n  /* Applications that never read or write a persistent disk files */\n  assert( zName==0 );\n#endif\n\n  if( eType==SQLITE_OPEN_MAIN_DB ){\n    UnixUnusedFd *pUnused;\n    pUnused = findReusableFd(zName, flags);\n    if( pUnused ){\n      fd = pUnused->fd;\n    }else{\n      pUnused = sqlite3_malloc64(sizeof(*pUnused));\n      if( !pUnused ){\n        return SQLITE_NOMEM_BKPT;\n      }\n    }\n    p->pPreallocatedUnused = pUnused;\n\n    /* Database filenames are double-zero terminated if they are not\n    ** URIs with parameters.  Hence, they can always be passed into\n    ** sqlite3_uri_parameter(). */\n    assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );\n\n  }else if( !zName ){\n    /* If zName is NULL, the upper layer is requesting a temp file. */\n    assert(isDelete && !isNewJrnl);\n    rc = unixGetTempname(pVfs->mxPathname, zTmpname);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    zName = zTmpname;\n\n    /* Generated temporary filenames are always double-zero terminated\n    ** for use by sqlite3_uri_parameter(). */\n    assert( zName[strlen(zName)+1]==0 );\n  }\n\n  /* Determine the value of the flags parameter passed to POSIX function\n  ** open(). These must be calculated even if open() is not called, as\n  ** they may be stored as part of the file handle and used by the\n  ** 'conch file' locking functions later on.  */\n  if( isReadonly )  openFlags |= O_RDONLY;\n  if( isReadWrite ) openFlags |= O_RDWR;\n  if( isCreate )    openFlags |= O_CREAT;\n  if( isExclusive ) openFlags |= (O_EXCL|O_NOFOLLOW);\n  openFlags |= (O_LARGEFILE|O_BINARY|O_NOFOLLOW);\n\n  if( fd<0 ){\n    mode_t openMode;              /* Permissions to create file with */\n    uid_t uid;                    /* Userid for the file */\n    gid_t gid;                    /* Groupid for the file */\n    rc = findCreateFileMode(zName, flags, &openMode, &uid, &gid);\n    if( rc!=SQLITE_OK ){\n      assert( !p->pPreallocatedUnused );\n      assert( eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL );\n      return rc;\n    }\n    fd = robust_open(zName, openFlags, openMode);\n    OSTRACE((\"OPENX   %-3d %s 0%o\\n\", fd, zName, openFlags));\n    assert( !isExclusive || (openFlags & O_CREAT)!=0 );\n    if( fd<0 ){\n      if( isNewJrnl && errno==EACCES && osAccess(zName, F_OK) ){\n        /* If unable to create a journal because the directory is not\n        ** writable, change the error code to indicate that. */\n        rc = SQLITE_READONLY_DIRECTORY;\n      }else if( errno!=EISDIR && isReadWrite ){\n        /* Failed to open the file for read/write access. Try read-only. */\n        UnixUnusedFd *pReadonly = 0;\n        flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);\n        openFlags &= ~(O_RDWR|O_CREAT);\n        flags |= SQLITE_OPEN_READONLY;\n        openFlags |= O_RDONLY;\n        isReadonly = 1;\n        pReadonly = findReusableFd(zName, flags);\n        if( pReadonly ){\n          fd = pReadonly->fd;\n          sqlite3_free(pReadonly);\n        }else{\n          fd = robust_open(zName, openFlags, openMode);\n        }\n      }\n    }\n    if( fd<0 ){\n      int rc2 = unixLogError(SQLITE_CANTOPEN_BKPT, \"open\", zName);\n      if( rc==SQLITE_OK ) rc = rc2;\n      goto open_finished;\n    }\n\n    /* The owner of the rollback journal or WAL file should always be the\n    ** same as the owner of the database file.  Try to ensure that this is\n    ** the case.  The chown() system call will be a no-op if the current\n    ** process lacks root privileges, be we should at least try.  Without\n    ** this step, if a root process opens a database file, it can leave\n    ** behinds a journal/WAL that is owned by root and hence make the\n    ** database inaccessible to unprivileged processes.\n    **\n    ** If openMode==0, then that means uid and gid are not set correctly\n    ** (probably because SQLite is configured to use 8+3 filename mode) and\n    ** in that case we do not want to attempt the chown().\n    */\n    if( openMode && (flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL))!=0 ){\n      robustFchown(fd, uid, gid);\n    }\n  }\n  assert( fd>=0 );\n  if( pOutFlags ){\n    *pOutFlags = flags;\n  }\n\n  if( p->pPreallocatedUnused ){\n    p->pPreallocatedUnused->fd = fd;\n    p->pPreallocatedUnused->flags =\n                          flags & (SQLITE_OPEN_READONLY|SQLITE_OPEN_READWRITE);\n  }\n\n  if( isDelete ){\n#if OS_VXWORKS\n    zPath = zName;\n#elif defined(SQLITE_UNLINK_AFTER_CLOSE)\n    zPath = sqlite3_mprintf(\"%s\", zName);\n    if( zPath==0 ){\n      robust_close(p, fd, __LINE__);\n      return SQLITE_NOMEM_BKPT;\n    }\n#else\n    osUnlink(zName);\n#endif\n  }\n#if SQLITE_ENABLE_LOCKING_STYLE\n  else{\n    p->openFlags = openFlags;\n  }\n#endif\n\n#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE\n  if( fstatfs(fd, &fsInfo) == -1 ){\n    storeLastErrno(p, errno);\n    robust_close(p, fd, __LINE__);\n    return SQLITE_IOERR_ACCESS;\n  }\n  if (0 == strncmp(\"msdos\", fsInfo.f_fstypename, 5)) {\n    ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;\n  }\n  if (0 == strncmp(\"exfat\", fsInfo.f_fstypename, 5)) {\n    ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;\n  }\n#endif\n\n  /* Set up appropriate ctrlFlags */\n  if( isDelete )                ctrlFlags |= UNIXFILE_DELETE;\n  if( isReadonly )              ctrlFlags |= UNIXFILE_RDONLY;\n  noLock = eType!=SQLITE_OPEN_MAIN_DB;\n  if( noLock )                  ctrlFlags |= UNIXFILE_NOLOCK;\n  if( isNewJrnl )               ctrlFlags |= UNIXFILE_DIRSYNC;\n  if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI;\n\n#if SQLITE_ENABLE_LOCKING_STYLE\n#if SQLITE_PREFER_PROXY_LOCKING\n  isAutoProxy = 1;\n#endif\n  if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){\n    char *envforce = getenv(\"SQLITE_FORCE_PROXY_LOCKING\");\n    int useProxy = 0;\n\n    /* SQLITE_FORCE_PROXY_LOCKING==1 means force always use proxy, 0 means\n    ** never use proxy, NULL means use proxy for non-local files only.  */\n    if( envforce!=NULL ){\n      useProxy = atoi(envforce)>0;\n    }else{\n      useProxy = !(fsInfo.f_flags&MNT_LOCAL);\n    }\n    if( useProxy ){\n      rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);\n      if( rc==SQLITE_OK ){\n        rc = proxyTransformUnixFile((unixFile*)pFile, \":auto:\");\n        if( rc!=SQLITE_OK ){\n          /* Use unixClose to clean up the resources added in fillInUnixFile\n          ** and clear all the structure's references.  Specifically,\n          ** pFile->pMethods will be NULL so sqlite3OsClose will be a no-op\n          */\n          unixClose(pFile);\n          return rc;\n        }\n      }\n      goto open_finished;\n    }\n  }\n#endif\n\n  assert( zPath==0\n       || zPath[0]=='/'\n       || eType==SQLITE_OPEN_SUPER_JOURNAL\n       || eType==SQLITE_OPEN_MAIN_JOURNAL\n       || eType==SQLITE_OPEN_TEMP_JOURNAL\n  );\n  rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);\n\nopen_finished:\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(p->pPreallocatedUnused);\n  }\n  return rc;\n}\n\n\n/*\n** Delete the file at zPath. If the dirSync argument is true, fsync()\n** the directory after deleting the file.\n*/\nstatic int unixDelete(\n  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */\n  const char *zPath,        /* Name of file to be deleted */\n  int dirSync               /* If true, fsync() directory after deleting file */\n){\n  int rc = SQLITE_OK;\n  UNUSED_PARAMETER(NotUsed);\n  SimulateIOError(return SQLITE_IOERR_DELETE);\n  if( osUnlink(zPath)==(-1) ){\n    if( errno==ENOENT\n#if OS_VXWORKS\n        || osAccess(zPath,0)!=0\n#endif\n    ){\n      rc = SQLITE_IOERR_DELETE_NOENT;\n    }else{\n      rc = unixLogError(SQLITE_IOERR_DELETE, \"unlink\", zPath);\n    }\n    return rc;\n  }\n#ifndef SQLITE_DISABLE_DIRSYNC\n  if( (dirSync & 1)!=0 ){\n    int fd;\n    rc = osOpenDirectory(zPath, &fd);\n    if( rc==SQLITE_OK ){\n      if( full_fsync(fd,0,0) ){\n        rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, \"fsync\", zPath);\n      }\n      robust_close(0, fd, __LINE__);\n    }else{\n      assert( rc==SQLITE_CANTOPEN );\n      rc = SQLITE_OK;\n    }\n  }\n#endif\n  return rc;\n}\n\n/*\n** Test the existence of or access permissions of file zPath. The\n** test performed depends on the value of flags:\n**\n**     SQLITE_ACCESS_EXISTS: Return 1 if the file exists\n**     SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.\n**     SQLITE_ACCESS_READONLY: Return 1 if the file is readable.\n**\n** Otherwise return 0.\n*/\nstatic int unixAccess(\n  sqlite3_vfs *NotUsed,   /* The VFS containing this xAccess method */\n  const char *zPath,      /* Path of the file to examine */\n  int flags,              /* What do we want to learn about the zPath file? */\n  int *pResOut            /* Write result boolean here */\n){\n  UNUSED_PARAMETER(NotUsed);\n  SimulateIOError( return SQLITE_IOERR_ACCESS; );\n  assert( pResOut!=0 );\n\n  /* The spec says there are three possible values for flags.  But only\n  ** two of them are actually used */\n  assert( flags==SQLITE_ACCESS_EXISTS || flags==SQLITE_ACCESS_READWRITE );\n\n  if( flags==SQLITE_ACCESS_EXISTS ){\n    struct stat buf;\n    *pResOut = 0==osStat(zPath, &buf) &&\n                (!S_ISREG(buf.st_mode) || buf.st_size>0);\n  }else{\n    *pResOut = osAccess(zPath, W_OK|R_OK)==0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** A pathname under construction\n*/\ntypedef struct DbPath DbPath;\nstruct DbPath {\n  int rc;           /* Non-zero following any error */\n  int nSymlink;     /* Number of symlinks resolved */\n  char *zOut;       /* Write the pathname here */\n  int nOut;         /* Bytes of space available to zOut[] */\n  int nUsed;        /* Bytes of zOut[] currently being used */\n};\n\n/* Forward reference */\nstatic void appendAllPathElements(DbPath*,const char*);\n\n/*\n** Append a single path element to the DbPath under construction\n*/\nstatic void appendOnePathElement(\n  DbPath *pPath,       /* Path under construction, to which to append zName */\n  const char *zName,   /* Name to append to pPath.  Not zero-terminated */\n  int nName            /* Number of significant bytes in zName */\n){\n  assert( nName>0 );\n  assert( zName!=0 );\n  if( zName[0]=='.' ){\n    if( nName==1 ) return;\n    if( zName[1]=='.' && nName==2 ){\n      if( pPath->nUsed>1 ){\n        assert( pPath->zOut[0]=='/' );\n        while( pPath->zOut[--pPath->nUsed]!='/' ){}\n      }\n      return;\n    }\n  }\n  if( pPath->nUsed + nName + 2 >= pPath->nOut ){\n    pPath->rc = SQLITE_ERROR;\n    return;\n  }\n  pPath->zOut[pPath->nUsed++] = '/';\n  memcpy(&pPath->zOut[pPath->nUsed], zName, nName);\n  pPath->nUsed += nName;\n#if defined(HAVE_READLINK) && defined(HAVE_LSTAT)\n  if( pPath->rc==SQLITE_OK ){\n    const char *zIn;\n    struct stat buf;\n    pPath->zOut[pPath->nUsed] = 0;\n    zIn = pPath->zOut;\n    if( osLstat(zIn, &buf)!=0 ){\n      if( errno!=ENOENT ){\n        pPath->rc = unixLogError(SQLITE_CANTOPEN_BKPT, \"lstat\", zIn);\n      }\n    }else if( S_ISLNK(buf.st_mode) ){\n      ssize_t got;\n      char zLnk[SQLITE_MAX_PATHLEN+2];\n      if( pPath->nSymlink++ > SQLITE_MAX_SYMLINK ){\n        pPath->rc = SQLITE_CANTOPEN_BKPT;\n        return;\n      }\n      got = osReadlink(zIn, zLnk, sizeof(zLnk)-2);\n      if( got<=0 || got>=(ssize_t)sizeof(zLnk)-2 ){\n        pPath->rc = unixLogError(SQLITE_CANTOPEN_BKPT, \"readlink\", zIn);\n        return;\n      }\n      zLnk[got] = 0;\n      if( zLnk[0]=='/' ){\n        pPath->nUsed = 0;\n      }else{\n        pPath->nUsed -= nName + 1;\n      }\n      appendAllPathElements(pPath, zLnk);\n    }\n  }\n#endif\n}\n\n/*\n** Append all path elements in zPath to the DbPath under construction.\n*/\nstatic void appendAllPathElements(\n  DbPath *pPath,       /* Path under construction, to which to append zName */\n  const char *zPath    /* Path to append to pPath.  Is zero-terminated */\n){\n  int i = 0;\n  int j = 0;\n  do{\n    while( zPath[i] && zPath[i]!='/' ){ i++; }\n    if( i>j ){\n      appendOnePathElement(pPath, &zPath[j], i-j);\n    }\n    j = i+1;\n  }while( zPath[i++] );\n}\n\n/*\n** Turn a relative pathname into a full pathname. The relative path\n** is stored as a nul-terminated string in the buffer pointed to by\n** zPath.\n**\n** zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes\n** (in this case, MAX_PATHNAME bytes). The full-path is written to\n** this buffer before returning.\n*/\nstatic int unixFullPathname(\n  sqlite3_vfs *pVfs,            /* Pointer to vfs object */\n  const char *zPath,            /* Possibly relative input path */\n  int nOut,                     /* Size of output buffer in bytes */\n  char *zOut                    /* Output buffer */\n){\n  DbPath path;\n  UNUSED_PARAMETER(pVfs);\n  path.rc = 0;\n  path.nUsed = 0;\n  path.nSymlink = 0;\n  path.nOut = nOut;\n  path.zOut = zOut;\n  if( zPath[0]!='/' ){\n    char zPwd[SQLITE_MAX_PATHLEN+2];\n    if( osGetcwd(zPwd, sizeof(zPwd)-2)==0 ){\n      return unixLogError(SQLITE_CANTOPEN_BKPT, \"getcwd\", zPath);\n    }\n    appendAllPathElements(&path, zPwd);\n  }\n  appendAllPathElements(&path, zPath);\n  zOut[path.nUsed] = 0;\n  if( path.rc || path.nUsed<2 ) return SQLITE_CANTOPEN_BKPT;\n  if( path.nSymlink ) return SQLITE_OK_SYMLINK;\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n/*\n** Interfaces for opening a shared library, finding entry points\n** within the shared library, and closing the shared library.\n*/\n#include <dlfcn.h>\nstatic void *unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename){\n  UNUSED_PARAMETER(NotUsed);\n  return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);\n}\n\n/*\n** SQLite calls this function immediately after a call to unixDlSym() or\n** unixDlOpen() fails (returns a null pointer). If a more detailed error\n** message is available, it is written to zBufOut. If no error message\n** is available, zBufOut is left unmodified and SQLite uses a default\n** error message.\n*/\nstatic void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){\n  const char *zErr;\n  UNUSED_PARAMETER(NotUsed);\n  unixEnterMutex();\n  zErr = dlerror();\n  if( zErr ){\n    sqlite3_snprintf(nBuf, zBufOut, \"%s\", zErr);\n  }\n  unixLeaveMutex();\n}\nstatic void (*unixDlSym(sqlite3_vfs *NotUsed, void *p, const char*zSym))(void){\n  /*\n  ** GCC with -pedantic-errors says that C90 does not allow a void* to be\n  ** cast into a pointer to a function.  And yet the library dlsym() routine\n  ** returns a void* which is really a pointer to a function.  So how do we\n  ** use dlsym() with -pedantic-errors?\n  **\n  ** Variable x below is defined to be a pointer to a function taking\n  ** parameters void* and const char* and returning a pointer to a function.\n  ** We initialize x by assigning it a pointer to the dlsym() function.\n  ** (That assignment requires a cast.)  Then we call the function that\n  ** x points to.\n  **\n  ** This work-around is unlikely to work correctly on any system where\n  ** you really cannot cast a function pointer into void*.  But then, on the\n  ** other hand, dlsym() will not work on such a system either, so we have\n  ** not really lost anything.\n  */\n  void (*(*x)(void*,const char*))(void);\n  UNUSED_PARAMETER(NotUsed);\n  x = (void(*(*)(void*,const char*))(void))dlsym;\n  return (*x)(p, zSym);\n}\nstatic void unixDlClose(sqlite3_vfs *NotUsed, void *pHandle){\n  UNUSED_PARAMETER(NotUsed);\n  dlclose(pHandle);\n}\n#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */\n  #define unixDlOpen  0\n  #define unixDlError 0\n  #define unixDlSym   0\n  #define unixDlClose 0\n#endif\n\n/*\n** Write nBuf bytes of random data to the supplied buffer zBuf.\n*/\nstatic int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){\n  UNUSED_PARAMETER(NotUsed);\n  assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));\n\n  /* We have to initialize zBuf to prevent valgrind from reporting\n  ** errors.  The reports issued by valgrind are incorrect - we would\n  ** prefer that the randomness be increased by making use of the\n  ** uninitialized space in zBuf - but valgrind errors tend to worry\n  ** some users.  Rather than argue, it seems easier just to initialize\n  ** the whole array and silence valgrind, even if that means less randomness\n  ** in the random seed.\n  **\n  ** When testing, initializing zBuf[] to zero is all we do.  That means\n  ** that we always use the same random number sequence.  This makes the\n  ** tests repeatable.\n  */\n  memset(zBuf, 0, nBuf);\n  randomnessPid = osGetpid(0);\n#if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)\n  {\n    int fd, got;\n    fd = robust_open(\"/dev/urandom\", O_RDONLY, 0);\n    if( fd<0 ){\n      time_t t;\n      time(&t);\n      memcpy(zBuf, &t, sizeof(t));\n      memcpy(&zBuf[sizeof(t)], &randomnessPid, sizeof(randomnessPid));\n      assert( sizeof(t)+sizeof(randomnessPid)<=(size_t)nBuf );\n      nBuf = sizeof(t) + sizeof(randomnessPid);\n    }else{\n      do{ got = osRead(fd, zBuf, nBuf); }while( got<0 && errno==EINTR );\n      robust_close(0, fd, __LINE__);\n    }\n  }\n#endif\n  return nBuf;\n}\n\n\n/*\n** Sleep for a little while.  Return the amount of time slept.\n** The argument is the number of microseconds we want to sleep.\n** The return value is the number of microseconds of sleep actually\n** requested from the underlying operating system, a number which\n** might be greater than or equal to the argument, but not less\n** than the argument.\n*/\nstatic int unixSleep(sqlite3_vfs *NotUsed, int microseconds){\n#if !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP+0\n  struct timespec sp;\n  sp.tv_sec = microseconds / 1000000;\n  sp.tv_nsec = (microseconds % 1000000) * 1000;\n\n  /* Almost all modern unix systems support nanosleep().  But if you are\n  ** compiling for one of the rare exceptions, you can use\n  ** -DHAVE_NANOSLEEP=0 (perhaps in conjunction with -DHAVE_USLEEP if\n  ** usleep() is available) in order to bypass the use of nanosleep() */\n  nanosleep(&sp, NULL);\n\n  UNUSED_PARAMETER(NotUsed);\n  return microseconds;\n#elif defined(HAVE_USLEEP) && HAVE_USLEEP\n  if( microseconds>=1000000 ) sleep(microseconds/1000000);\n  if( microseconds%1000000 ) usleep(microseconds%1000000);\n  UNUSED_PARAMETER(NotUsed);\n  return microseconds;\n#else\n  int seconds = (microseconds+999999)/1000000;\n  sleep(seconds);\n  UNUSED_PARAMETER(NotUsed);\n  return seconds*1000000;\n#endif\n}\n\n/*\n** The following variable, if set to a non-zero value, is interpreted as\n** the number of seconds since 1970 and is used to set the result of\n** sqlite3OsCurrentTime() during testing.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_current_time = 0;  /* Fake system time in seconds since 1970. */\n#endif\n\n/*\n** Find the current time (in Universal Coordinated Time).  Write into *piNow\n** the current time and date as a Julian Day number times 86_400_000.  In\n** other words, write into *piNow the number of milliseconds since the Julian\n** epoch of noon in Greenwich on November 24, 4714 B.C according to the\n** proleptic Gregorian calendar.\n**\n** On success, return SQLITE_OK.  Return SQLITE_ERROR if the time and date\n** cannot be found.\n*/\nstatic int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){\n  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;\n  int rc = SQLITE_OK;\n#if defined(NO_GETTOD)\n  time_t t;\n  time(&t);\n  *piNow = ((sqlite3_int64)t)*1000 + unixEpoch;\n#elif OS_VXWORKS\n  struct timespec sNow;\n  clock_gettime(CLOCK_REALTIME, &sNow);\n  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_nsec/1000000;\n#else\n  struct timeval sNow;\n  (void)gettimeofday(&sNow, 0);  /* Cannot fail given valid arguments */\n  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;\n#endif\n\n#ifdef SQLITE_TEST\n  if( sqlite3_current_time ){\n    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;\n  }\n#endif\n  UNUSED_PARAMETER(NotUsed);\n  return rc;\n}\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Find the current time (in Universal Coordinated Time).  Write the\n** current time and date as a Julian Day number into *prNow and\n** return 0.  Return 1 if the time and date cannot be found.\n*/\nstatic int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){\n  sqlite3_int64 i = 0;\n  int rc;\n  UNUSED_PARAMETER(NotUsed);\n  rc = unixCurrentTimeInt64(0, &i);\n  *prNow = i/86400000.0;\n  return rc;\n}\n#else\n# define unixCurrentTime 0\n#endif\n\n/*\n** The xGetLastError() method is designed to return a better\n** low-level error message when operating-system problems come up\n** during SQLite operation.  Only the integer return code is currently\n** used.\n*/\nstatic int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){\n  UNUSED_PARAMETER(NotUsed);\n  UNUSED_PARAMETER(NotUsed2);\n  UNUSED_PARAMETER(NotUsed3);\n  return errno;\n}\n\n\n/*\n************************ End of sqlite3_vfs methods ***************************\n******************************************************************************/\n\n/******************************************************************************\n************************** Begin Proxy Locking ********************************\n**\n** Proxy locking is a \"uber-locking-method\" in this sense:  It uses the\n** other locking methods on secondary lock files.  Proxy locking is a\n** meta-layer over top of the primitive locking implemented above.  For\n** this reason, the division that implements of proxy locking is deferred\n** until late in the file (here) after all of the other I/O methods have\n** been defined - so that the primitive locking methods are available\n** as services to help with the implementation of proxy locking.\n**\n****\n**\n** The default locking schemes in SQLite use byte-range locks on the\n** database file to coordinate safe, concurrent access by multiple readers\n** and writers [http://sqlite.org/lockingv3.html].  The five file locking\n** states (UNLOCKED, PENDING, SHARED, RESERVED, EXCLUSIVE) are implemented\n** as POSIX read & write locks over fixed set of locations (via fsctl),\n** on AFP and SMB only exclusive byte-range locks are available via fsctl\n** with _IOWR('z', 23, struct ByteRangeLockPB2) to track the same 5 states.\n** To simulate a F_RDLCK on the shared range, on AFP a randomly selected\n** address in the shared range is taken for a SHARED lock, the entire\n** shared range is taken for an EXCLUSIVE lock):\n**\n**      PENDING_BYTE        0x40000000\n**      RESERVED_BYTE       0x40000001\n**      SHARED_RANGE        0x40000002 -> 0x40000200\n**\n** This works well on the local file system, but shows a nearly 100x\n** slowdown in read performance on AFP because the AFP client disables\n** the read cache when byte-range locks are present.  Enabling the read\n** cache exposes a cache coherency problem that is present on all OS X\n** supported network file systems.  NFS and AFP both observe the\n** close-to-open semantics for ensuring cache coherency\n** [http://nfs.sourceforge.net/#faq_a8], which does not effectively\n** address the requirements for concurrent database access by multiple\n** readers and writers\n** [http://www.nabble.com/SQLite-on-NFS-cache-coherency-td15655701.html].\n**\n** To address the performance and cache coherency issues, proxy file locking\n** changes the way database access is controlled by limiting access to a\n** single host at a time and moving file locks off of the database file\n** and onto a proxy file on the local file system.\n**\n**\n** Using proxy locks\n** -----------------\n**\n** C APIs\n**\n**  sqlite3_file_control(db, dbname, SQLITE_FCNTL_SET_LOCKPROXYFILE,\n**                       <proxy_path> | \":auto:\");\n**  sqlite3_file_control(db, dbname, SQLITE_FCNTL_GET_LOCKPROXYFILE,\n**                       &<proxy_path>);\n**\n**\n** SQL pragmas\n**\n**  PRAGMA [database.]lock_proxy_file=<proxy_path> | :auto:\n**  PRAGMA [database.]lock_proxy_file\n**\n** Specifying \":auto:\" means that if there is a conch file with a matching\n** host ID in it, the proxy path in the conch file will be used, otherwise\n** a proxy path based on the user's temp dir\n** (via confstr(_CS_DARWIN_USER_TEMP_DIR,...)) will be used and the\n** actual proxy file name is generated from the name and path of the\n** database file.  For example:\n**\n**       For database path \"/Users/me/foo.db\"\n**       The lock path will be \"<tmpdir>/sqliteplocks/_Users_me_foo.db:auto:\")\n**\n** Once a lock proxy is configured for a database connection, it can not\n** be removed, however it may be switched to a different proxy path via\n** the above APIs (assuming the conch file is not being held by another\n** connection or process).\n**\n**\n** How proxy locking works\n** -----------------------\n**\n** Proxy file locking relies primarily on two new supporting files:\n**\n**   *  conch file to limit access to the database file to a single host\n**      at a time\n**\n**   *  proxy file to act as a proxy for the advisory locks normally\n**      taken on the database\n**\n** The conch file - to use a proxy file, sqlite must first \"hold the conch\"\n** by taking an sqlite-style shared lock on the conch file, reading the\n** contents and comparing the host's unique host ID (see below) and lock\n** proxy path against the values stored in the conch.  The conch file is\n** stored in the same directory as the database file and the file name\n** is patterned after the database file name as \".<databasename>-conch\".\n** If the conch file does not exist, or its contents do not match the\n** host ID and/or proxy path, then the lock is escalated to an exclusive\n** lock and the conch file contents is updated with the host ID and proxy\n** path and the lock is downgraded to a shared lock again.  If the conch\n** is held by another process (with a shared lock), the exclusive lock\n** will fail and SQLITE_BUSY is returned.\n**\n** The proxy file - a single-byte file used for all advisory file locks\n** normally taken on the database file.   This allows for safe sharing\n** of the database file for multiple readers and writers on the same\n** host (the conch ensures that they all use the same local lock file).\n**\n** Requesting the lock proxy does not immediately take the conch, it is\n** only taken when the first request to lock database file is made.\n** This matches the semantics of the traditional locking behavior, where\n** opening a connection to a database file does not take a lock on it.\n** The shared lock and an open file descriptor are maintained until\n** the connection to the database is closed.\n**\n** The proxy file and the lock file are never deleted so they only need\n** to be created the first time they are used.\n**\n** Configuration options\n** ---------------------\n**\n**  SQLITE_PREFER_PROXY_LOCKING\n**\n**       Database files accessed on non-local file systems are\n**       automatically configured for proxy locking, lock files are\n**       named automatically using the same logic as\n**       PRAGMA lock_proxy_file=\":auto:\"\n**\n**  SQLITE_PROXY_DEBUG\n**\n**       Enables the logging of error messages during host id file\n**       retrieval and creation\n**\n**  LOCKPROXYDIR\n**\n**       Overrides the default directory used for lock proxy files that\n**       are named automatically via the \":auto:\" setting\n**\n**  SQLITE_DEFAULT_PROXYDIR_PERMISSIONS\n**\n**       Permissions to use when creating a directory for storing the\n**       lock proxy files, only used when LOCKPROXYDIR is not set.\n**\n**\n** As mentioned above, when compiled with SQLITE_PREFER_PROXY_LOCKING,\n** setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will\n** force proxy locking to be used for every database file opened, and 0\n** will force automatic proxy locking to be disabled for all database\n** files (explicitly calling the SQLITE_FCNTL_SET_LOCKPROXYFILE pragma or\n** sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING).\n*/\n\n/*\n** Proxy locking is only available on MacOSX\n*/\n#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE\n\n/*\n** The proxyLockingContext has the path and file structures for the remote\n** and local proxy files in it\n*/\ntypedef struct proxyLockingContext proxyLockingContext;\nstruct proxyLockingContext {\n  unixFile *conchFile;         /* Open conch file */\n  char *conchFilePath;         /* Name of the conch file */\n  unixFile *lockProxy;         /* Open proxy lock file */\n  char *lockProxyPath;         /* Name of the proxy lock file */\n  char *dbPath;                /* Name of the open file */\n  int conchHeld;               /* 1 if the conch is held, -1 if lockless */\n  int nFails;                  /* Number of conch taking failures */\n  void *oldLockingContext;     /* Original lockingcontext to restore on close */\n  sqlite3_io_methods const *pOldMethod;     /* Original I/O methods for close */\n};\n\n/*\n** The proxy lock file path for the database at dbPath is written into lPath,\n** which must point to valid, writable memory large enough for a maxLen length\n** file path.\n*/\nstatic int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){\n  int len;\n  int dbLen;\n  int i;\n\n#ifdef LOCKPROXYDIR\n  len = strlcpy(lPath, LOCKPROXYDIR, maxLen);\n#else\n# ifdef _CS_DARWIN_USER_TEMP_DIR\n  {\n    if( !confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) ){\n      OSTRACE((\"GETLOCKPATH  failed %s errno=%d pid=%d\\n\",\n               lPath, errno, osGetpid(0)));\n      return SQLITE_IOERR_LOCK;\n    }\n    len = strlcat(lPath, \"sqliteplocks\", maxLen);\n  }\n# else\n  len = strlcpy(lPath, \"/tmp/\", maxLen);\n# endif\n#endif\n\n  if( lPath[len-1]!='/' ){\n    len = strlcat(lPath, \"/\", maxLen);\n  }\n\n  /* transform the db path to a unique cache name */\n  dbLen = (int)strlen(dbPath);\n  for( i=0; i<dbLen && (i+len+7)<(int)maxLen; i++){\n    char c = dbPath[i];\n    lPath[i+len] = (c=='/')?'_':c;\n  }\n  lPath[i+len]='\\0';\n  strlcat(lPath, \":auto:\", maxLen);\n  OSTRACE((\"GETLOCKPATH  proxy lock path=%s pid=%d\\n\", lPath, osGetpid(0)));\n  return SQLITE_OK;\n}\n\n/*\n ** Creates the lock file and any missing directories in lockPath\n */\nstatic int proxyCreateLockPath(const char *lockPath){\n  int i, len;\n  char buf[MAXPATHLEN];\n  int start = 0;\n\n  assert(lockPath!=NULL);\n  /* try to create all the intermediate directories */\n  len = (int)strlen(lockPath);\n  buf[0] = lockPath[0];\n  for( i=1; i<len; i++ ){\n    if( lockPath[i] == '/' && (i - start > 0) ){\n      /* only mkdir if leaf dir != \".\" or \"/\" or \"..\" */\n      if( i-start>2 || (i-start==1 && buf[start] != '.' && buf[start] != '/')\n         || (i-start==2 && buf[start] != '.' && buf[start+1] != '.') ){\n        buf[i]='\\0';\n        if( osMkdir(buf, SQLITE_DEFAULT_PROXYDIR_PERMISSIONS) ){\n          int err=errno;\n          if( err!=EEXIST ) {\n            OSTRACE((\"CREATELOCKPATH  FAILED creating %s, \"\n                     \"'%s' proxy lock path=%s pid=%d\\n\",\n                     buf, strerror(err), lockPath, osGetpid(0)));\n            return err;\n          }\n        }\n      }\n      start=i+1;\n    }\n    buf[i] = lockPath[i];\n  }\n  OSTRACE((\"CREATELOCKPATH  proxy lock path=%s pid=%d\\n\",lockPath,osGetpid(0)));\n  return 0;\n}\n\n/*\n** Create a new VFS file descriptor (stored in memory obtained from\n** sqlite3_malloc) and open the file named \"path\" in the file descriptor.\n**\n** The caller is responsible not only for closing the file descriptor\n** but also for freeing the memory associated with the file descriptor.\n*/\nstatic int proxyCreateUnixFile(\n    const char *path,        /* path for the new unixFile */\n    unixFile **ppFile,       /* unixFile created and returned by ref */\n    int islockfile           /* if non zero missing dirs will be created */\n) {\n  int fd = -1;\n  unixFile *pNew;\n  int rc = SQLITE_OK;\n  int openFlags = O_RDWR | O_CREAT | O_NOFOLLOW;\n  sqlite3_vfs dummyVfs;\n  int terrno = 0;\n  UnixUnusedFd *pUnused = NULL;\n\n  /* 1. first try to open/create the file\n  ** 2. if that fails, and this is a lock file (not-conch), try creating\n  ** the parent directories and then try again.\n  ** 3. if that fails, try to open the file read-only\n  ** otherwise return BUSY (if lock file) or CANTOPEN for the conch file\n  */\n  pUnused = findReusableFd(path, openFlags);\n  if( pUnused ){\n    fd = pUnused->fd;\n  }else{\n    pUnused = sqlite3_malloc64(sizeof(*pUnused));\n    if( !pUnused ){\n      return SQLITE_NOMEM_BKPT;\n    }\n  }\n  if( fd<0 ){\n    fd = robust_open(path, openFlags, 0);\n    terrno = errno;\n    if( fd<0 && errno==ENOENT && islockfile ){\n      if( proxyCreateLockPath(path) == SQLITE_OK ){\n        fd = robust_open(path, openFlags, 0);\n      }\n    }\n  }\n  if( fd<0 ){\n    openFlags = O_RDONLY | O_NOFOLLOW;\n    fd = robust_open(path, openFlags, 0);\n    terrno = errno;\n  }\n  if( fd<0 ){\n    if( islockfile ){\n      return SQLITE_BUSY;\n    }\n    switch (terrno) {\n      case EACCES:\n        return SQLITE_PERM;\n      case EIO:\n        return SQLITE_IOERR_LOCK; /* even though it is the conch */\n      default:\n        return SQLITE_CANTOPEN_BKPT;\n    }\n  }\n\n  pNew = (unixFile *)sqlite3_malloc64(sizeof(*pNew));\n  if( pNew==NULL ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto end_create_proxy;\n  }\n  memset(pNew, 0, sizeof(unixFile));\n  pNew->openFlags = openFlags;\n  memset(&dummyVfs, 0, sizeof(dummyVfs));\n  dummyVfs.pAppData = (void*)&autolockIoFinder;\n  dummyVfs.zName = \"dummy\";\n  pUnused->fd = fd;\n  pUnused->flags = openFlags;\n  pNew->pPreallocatedUnused = pUnused;\n\n  rc = fillInUnixFile(&dummyVfs, fd, (sqlite3_file*)pNew, path, 0);\n  if( rc==SQLITE_OK ){\n    *ppFile = pNew;\n    return SQLITE_OK;\n  }\nend_create_proxy:\n  robust_close(pNew, fd, __LINE__);\n  sqlite3_free(pNew);\n  sqlite3_free(pUnused);\n  return rc;\n}\n\n#ifdef SQLITE_TEST\n/* simulate multiple hosts by creating unique hostid file paths */\nSQLITE_API int sqlite3_hostid_num = 0;\n#endif\n\n#define PROXY_HOSTIDLEN    16  /* conch file host id length */\n\n#if HAVE_GETHOSTUUID\n/* Not always defined in the headers as it ought to be */\nextern int gethostuuid(uuid_t id, const struct timespec *wait);\n#endif\n\n/* get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN\n** bytes of writable memory.\n*/\nstatic int proxyGetHostID(unsigned char *pHostID, int *pError){\n  assert(PROXY_HOSTIDLEN == sizeof(uuid_t));\n  memset(pHostID, 0, PROXY_HOSTIDLEN);\n#if HAVE_GETHOSTUUID\n  {\n    struct timespec timeout = {1, 0}; /* 1 sec timeout */\n    if( gethostuuid(pHostID, &timeout) ){\n      int err = errno;\n      if( pError ){\n        *pError = err;\n      }\n      return SQLITE_IOERR;\n    }\n  }\n#else\n  UNUSED_PARAMETER(pError);\n#endif\n#ifdef SQLITE_TEST\n  /* simulate multiple hosts by creating unique hostid file paths */\n  if( sqlite3_hostid_num != 0){\n    pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));\n  }\n#endif\n\n  return SQLITE_OK;\n}\n\n/* The conch file contains the header, host id and lock file path\n */\n#define PROXY_CONCHVERSION 2   /* 1-byte header, 16-byte host id, path */\n#define PROXY_HEADERLEN    1   /* conch file header length */\n#define PROXY_PATHINDEX    (PROXY_HEADERLEN+PROXY_HOSTIDLEN)\n#define PROXY_MAXCONCHLEN  (PROXY_HEADERLEN+PROXY_HOSTIDLEN+MAXPATHLEN)\n\n/*\n** Takes an open conch file, copies the contents to a new path and then moves\n** it back.  The newly created file's file descriptor is assigned to the\n** conch file structure and finally the original conch file descriptor is\n** closed.  Returns zero if successful.\n*/\nstatic int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){\n  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n  unixFile *conchFile = pCtx->conchFile;\n  char tPath[MAXPATHLEN];\n  char buf[PROXY_MAXCONCHLEN];\n  char *cPath = pCtx->conchFilePath;\n  size_t readLen = 0;\n  size_t pathLen = 0;\n  char errmsg[64] = \"\";\n  int fd = -1;\n  int rc = -1;\n  UNUSED_PARAMETER(myHostID);\n\n  /* create a new path by replace the trailing '-conch' with '-break' */\n  pathLen = strlcpy(tPath, cPath, MAXPATHLEN);\n  if( pathLen>MAXPATHLEN || pathLen<6 ||\n     (strlcpy(&tPath[pathLen-5], \"break\", 6) != 5) ){\n    sqlite3_snprintf(sizeof(errmsg),errmsg,\"path error (len %d)\",(int)pathLen);\n    goto end_breaklock;\n  }\n  /* read the conch content */\n  readLen = osPread(conchFile->h, buf, PROXY_MAXCONCHLEN, 0);\n  if( readLen<PROXY_PATHINDEX ){\n    sqlite3_snprintf(sizeof(errmsg),errmsg,\"read error (len %d)\",(int)readLen);\n    goto end_breaklock;\n  }\n  /* write it out to the temporary break file */\n  fd = robust_open(tPath, (O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW), 0);\n  if( fd<0 ){\n    sqlite3_snprintf(sizeof(errmsg), errmsg, \"create failed (%d)\", errno);\n    goto end_breaklock;\n  }\n  if( osPwrite(fd, buf, readLen, 0) != (ssize_t)readLen ){\n    sqlite3_snprintf(sizeof(errmsg), errmsg, \"write failed (%d)\", errno);\n    goto end_breaklock;\n  }\n  if( rename(tPath, cPath) ){\n    sqlite3_snprintf(sizeof(errmsg), errmsg, \"rename failed (%d)\", errno);\n    goto end_breaklock;\n  }\n  rc = 0;\n  fprintf(stderr, \"broke stale lock on %s\\n\", cPath);\n  robust_close(pFile, conchFile->h, __LINE__);\n  conchFile->h = fd;\n  conchFile->openFlags = O_RDWR | O_CREAT;\n\nend_breaklock:\n  if( rc ){\n    if( fd>=0 ){\n      osUnlink(tPath);\n      robust_close(pFile, fd, __LINE__);\n    }\n    fprintf(stderr, \"failed to break stale lock on %s, %s\\n\", cPath, errmsg);\n  }\n  return rc;\n}\n\n/* Take the requested lock on the conch file and break a stale lock if the\n** host id matches.\n*/\nstatic int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){\n  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n  unixFile *conchFile = pCtx->conchFile;\n  int rc = SQLITE_OK;\n  int nTries = 0;\n  struct timespec conchModTime;\n\n  memset(&conchModTime, 0, sizeof(conchModTime));\n  do {\n    rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);\n    nTries ++;\n    if( rc==SQLITE_BUSY ){\n      /* If the lock failed (busy):\n       * 1st try: get the mod time of the conch, wait 0.5s and try again.\n       * 2nd try: fail if the mod time changed or host id is different, wait\n       *           10 sec and try again\n       * 3rd try: break the lock unless the mod time has changed.\n       */\n      struct stat buf;\n      if( osFstat(conchFile->h, &buf) ){\n        storeLastErrno(pFile, errno);\n        return SQLITE_IOERR_LOCK;\n      }\n\n      if( nTries==1 ){\n        conchModTime = buf.st_mtimespec;\n        unixSleep(0,500000); /* wait 0.5 sec and try the lock again*/\n        continue;\n      }\n\n      assert( nTries>1 );\n      if( conchModTime.tv_sec != buf.st_mtimespec.tv_sec ||\n         conchModTime.tv_nsec != buf.st_mtimespec.tv_nsec ){\n        return SQLITE_BUSY;\n      }\n\n      if( nTries==2 ){\n        char tBuf[PROXY_MAXCONCHLEN];\n        int len = osPread(conchFile->h, tBuf, PROXY_MAXCONCHLEN, 0);\n        if( len<0 ){\n          storeLastErrno(pFile, errno);\n          return SQLITE_IOERR_LOCK;\n        }\n        if( len>PROXY_PATHINDEX && tBuf[0]==(char)PROXY_CONCHVERSION){\n          /* don't break the lock if the host id doesn't match */\n          if( 0!=memcmp(&tBuf[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN) ){\n            return SQLITE_BUSY;\n          }\n        }else{\n          /* don't break the lock on short read or a version mismatch */\n          return SQLITE_BUSY;\n        }\n        unixSleep(0,10000000); /* wait 10 sec and try the lock again */\n        continue;\n      }\n\n      assert( nTries==3 );\n      if( 0==proxyBreakConchLock(pFile, myHostID) ){\n        rc = SQLITE_OK;\n        if( lockType==EXCLUSIVE_LOCK ){\n          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);\n        }\n        if( !rc ){\n          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);\n        }\n      }\n    }\n  } while( rc==SQLITE_BUSY && nTries<3 );\n\n  return rc;\n}\n\n/* Takes the conch by taking a shared lock and read the contents conch, if\n** lockPath is non-NULL, the host ID and lock file path must match.  A NULL\n** lockPath means that the lockPath in the conch file will be used if the\n** host IDs match, or a new lock path will be generated automatically\n** and written to the conch file.\n*/\nstatic int proxyTakeConch(unixFile *pFile){\n  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n\n  if( pCtx->conchHeld!=0 ){\n    return SQLITE_OK;\n  }else{\n    unixFile *conchFile = pCtx->conchFile;\n    uuid_t myHostID;\n    int pError = 0;\n    char readBuf[PROXY_MAXCONCHLEN];\n    char lockPath[MAXPATHLEN];\n    char *tempLockPath = NULL;\n    int rc = SQLITE_OK;\n    int createConch = 0;\n    int hostIdMatch = 0;\n    int readLen = 0;\n    int tryOldLockPath = 0;\n    int forceNewLockPath = 0;\n\n    OSTRACE((\"TAKECONCH  %d for %s pid=%d\\n\", conchFile->h,\n             (pCtx->lockProxyPath ? pCtx->lockProxyPath : \":auto:\"),\n             osGetpid(0)));\n\n    rc = proxyGetHostID(myHostID, &pError);\n    if( (rc&0xff)==SQLITE_IOERR ){\n      storeLastErrno(pFile, pError);\n      goto end_takeconch;\n    }\n    rc = proxyConchLock(pFile, myHostID, SHARED_LOCK);\n    if( rc!=SQLITE_OK ){\n      goto end_takeconch;\n    }\n    /* read the existing conch file */\n    readLen = seekAndRead((unixFile*)conchFile, 0, readBuf, PROXY_MAXCONCHLEN);\n    if( readLen<0 ){\n      /* I/O error: lastErrno set by seekAndRead */\n      storeLastErrno(pFile, conchFile->lastErrno);\n      rc = SQLITE_IOERR_READ;\n      goto end_takeconch;\n    }else if( readLen<=(PROXY_HEADERLEN+PROXY_HOSTIDLEN) ||\n             readBuf[0]!=(char)PROXY_CONCHVERSION ){\n      /* a short read or version format mismatch means we need to create a new\n      ** conch file.\n      */\n      createConch = 1;\n    }\n    /* if the host id matches and the lock path already exists in the conch\n    ** we'll try to use the path there, if we can't open that path, we'll\n    ** retry with a new auto-generated path\n    */\n    do { /* in case we need to try again for an :auto: named lock file */\n\n      if( !createConch && !forceNewLockPath ){\n        hostIdMatch = !memcmp(&readBuf[PROXY_HEADERLEN], myHostID,\n                                  PROXY_HOSTIDLEN);\n        /* if the conch has data compare the contents */\n        if( !pCtx->lockProxyPath ){\n          /* for auto-named local lock file, just check the host ID and we'll\n           ** use the local lock file path that's already in there\n           */\n          if( hostIdMatch ){\n            size_t pathLen = (readLen - PROXY_PATHINDEX);\n\n            if( pathLen>=MAXPATHLEN ){\n              pathLen=MAXPATHLEN-1;\n            }\n            memcpy(lockPath, &readBuf[PROXY_PATHINDEX], pathLen);\n            lockPath[pathLen] = 0;\n            tempLockPath = lockPath;\n            tryOldLockPath = 1;\n            /* create a copy of the lock path if the conch is taken */\n            goto end_takeconch;\n          }\n        }else if( hostIdMatch\n               && !strncmp(pCtx->lockProxyPath, &readBuf[PROXY_PATHINDEX],\n                           readLen-PROXY_PATHINDEX)\n        ){\n          /* conch host and lock path match */\n          goto end_takeconch;\n        }\n      }\n\n      /* if the conch isn't writable and doesn't match, we can't take it */\n      if( (conchFile->openFlags&O_RDWR) == 0 ){\n        rc = SQLITE_BUSY;\n        goto end_takeconch;\n      }\n\n      /* either the conch didn't match or we need to create a new one */\n      if( !pCtx->lockProxyPath ){\n        proxyGetLockPath(pCtx->dbPath, lockPath, MAXPATHLEN);\n        tempLockPath = lockPath;\n        /* create a copy of the lock path _only_ if the conch is taken */\n      }\n\n      /* update conch with host and path (this will fail if other process\n      ** has a shared lock already), if the host id matches, use the big\n      ** stick.\n      */\n      futimes(conchFile->h, NULL);\n      if( hostIdMatch && !createConch ){\n        if( conchFile->pInode && conchFile->pInode->nShared>1 ){\n          /* We are trying for an exclusive lock but another thread in this\n           ** same process is still holding a shared lock. */\n          rc = SQLITE_BUSY;\n        } else {\n          rc = proxyConchLock(pFile, myHostID, EXCLUSIVE_LOCK);\n        }\n      }else{\n        rc = proxyConchLock(pFile, myHostID, EXCLUSIVE_LOCK);\n      }\n      if( rc==SQLITE_OK ){\n        char writeBuffer[PROXY_MAXCONCHLEN];\n        int writeSize = 0;\n\n        writeBuffer[0] = (char)PROXY_CONCHVERSION;\n        memcpy(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN);\n        if( pCtx->lockProxyPath!=NULL ){\n          strlcpy(&writeBuffer[PROXY_PATHINDEX], pCtx->lockProxyPath,\n                  MAXPATHLEN);\n        }else{\n          strlcpy(&writeBuffer[PROXY_PATHINDEX], tempLockPath, MAXPATHLEN);\n        }\n        writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);\n        robust_ftruncate(conchFile->h, writeSize);\n        rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0);\n        full_fsync(conchFile->h,0,0);\n        /* If we created a new conch file (not just updated the contents of a\n         ** valid conch file), try to match the permissions of the database\n         */\n        if( rc==SQLITE_OK && createConch ){\n          struct stat buf;\n          int err = osFstat(pFile->h, &buf);\n          if( err==0 ){\n            mode_t cmode = buf.st_mode&(S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP |\n                                        S_IROTH|S_IWOTH);\n            /* try to match the database file R/W permissions, ignore failure */\n#ifndef SQLITE_PROXY_DEBUG\n            osFchmod(conchFile->h, cmode);\n#else\n            do{\n              rc = osFchmod(conchFile->h, cmode);\n            }while( rc==(-1) && errno==EINTR );\n            if( rc!=0 ){\n              int code = errno;\n              fprintf(stderr, \"fchmod %o FAILED with %d %s\\n\",\n                      cmode, code, strerror(code));\n            } else {\n              fprintf(stderr, \"fchmod %o SUCCEDED\\n\",cmode);\n            }\n          }else{\n            int code = errno;\n            fprintf(stderr, \"STAT FAILED[%d] with %d %s\\n\",\n                    err, code, strerror(code));\n#endif\n          }\n        }\n      }\n      conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK);\n\n    end_takeconch:\n      OSTRACE((\"TRANSPROXY: CLOSE  %d\\n\", pFile->h));\n      if( rc==SQLITE_OK && pFile->openFlags ){\n        int fd;\n        if( pFile->h>=0 ){\n          robust_close(pFile, pFile->h, __LINE__);\n        }\n        pFile->h = -1;\n        fd = robust_open(pCtx->dbPath, pFile->openFlags, 0);\n        OSTRACE((\"TRANSPROXY: OPEN  %d\\n\", fd));\n        if( fd>=0 ){\n          pFile->h = fd;\n        }else{\n          rc=SQLITE_CANTOPEN_BKPT; /* SQLITE_BUSY? proxyTakeConch called\n           during locking */\n        }\n      }\n      if( rc==SQLITE_OK && !pCtx->lockProxy ){\n        char *path = tempLockPath ? tempLockPath : pCtx->lockProxyPath;\n        rc = proxyCreateUnixFile(path, &pCtx->lockProxy, 1);\n        if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM && tryOldLockPath ){\n          /* we couldn't create the proxy lock file with the old lock file path\n           ** so try again via auto-naming\n           */\n          forceNewLockPath = 1;\n          tryOldLockPath = 0;\n          continue; /* go back to the do {} while start point, try again */\n        }\n      }\n      if( rc==SQLITE_OK ){\n        /* Need to make a copy of path if we extracted the value\n         ** from the conch file or the path was allocated on the stack\n         */\n        if( tempLockPath ){\n          pCtx->lockProxyPath = sqlite3DbStrDup(0, tempLockPath);\n          if( !pCtx->lockProxyPath ){\n            rc = SQLITE_NOMEM_BKPT;\n          }\n        }\n      }\n      if( rc==SQLITE_OK ){\n        pCtx->conchHeld = 1;\n\n        if( pCtx->lockProxy->pMethod == &afpIoMethods ){\n          afpLockingContext *afpCtx;\n          afpCtx = (afpLockingContext *)pCtx->lockProxy->lockingContext;\n          afpCtx->dbPath = pCtx->lockProxyPath;\n        }\n      } else {\n        conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);\n      }\n      OSTRACE((\"TAKECONCH  %d %s\\n\", conchFile->h,\n               rc==SQLITE_OK?\"ok\":\"failed\"));\n      return rc;\n    } while (1); /* in case we need to retry the :auto: lock file -\n                 ** we should never get here except via the 'continue' call. */\n  }\n}\n\n/*\n** If pFile holds a lock on a conch file, then release that lock.\n*/\nstatic int proxyReleaseConch(unixFile *pFile){\n  int rc = SQLITE_OK;         /* Subroutine return code */\n  proxyLockingContext *pCtx;  /* The locking context for the proxy lock */\n  unixFile *conchFile;        /* Name of the conch file */\n\n  pCtx = (proxyLockingContext *)pFile->lockingContext;\n  conchFile = pCtx->conchFile;\n  OSTRACE((\"RELEASECONCH  %d for %s pid=%d\\n\", conchFile->h,\n           (pCtx->lockProxyPath ? pCtx->lockProxyPath : \":auto:\"),\n           osGetpid(0)));\n  if( pCtx->conchHeld>0 ){\n    rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);\n  }\n  pCtx->conchHeld = 0;\n  OSTRACE((\"RELEASECONCH  %d %s\\n\", conchFile->h,\n           (rc==SQLITE_OK ? \"ok\" : \"failed\")));\n  return rc;\n}\n\n/*\n** Given the name of a database file, compute the name of its conch file.\n** Store the conch filename in memory obtained from sqlite3_malloc64().\n** Make *pConchPath point to the new name.  Return SQLITE_OK on success\n** or SQLITE_NOMEM if unable to obtain memory.\n**\n** The caller is responsible for ensuring that the allocated memory\n** space is eventually freed.\n**\n** *pConchPath is set to NULL if a memory allocation error occurs.\n*/\nstatic int proxyCreateConchPathname(char *dbPath, char **pConchPath){\n  int i;                        /* Loop counter */\n  int len = (int)strlen(dbPath); /* Length of database filename - dbPath */\n  char *conchPath;              /* buffer in which to construct conch name */\n\n  /* Allocate space for the conch filename and initialize the name to\n  ** the name of the original database file. */\n  *pConchPath = conchPath = (char *)sqlite3_malloc64(len + 8);\n  if( conchPath==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  memcpy(conchPath, dbPath, len+1);\n\n  /* now insert a \".\" before the last / character */\n  for( i=(len-1); i>=0; i-- ){\n    if( conchPath[i]=='/' ){\n      i++;\n      break;\n    }\n  }\n  conchPath[i]='.';\n  while ( i<len ){\n    conchPath[i+1]=dbPath[i];\n    i++;\n  }\n\n  /* append the \"-conch\" suffix to the file */\n  memcpy(&conchPath[i+1], \"-conch\", 7);\n  assert( (int)strlen(conchPath) == len+7 );\n\n  return SQLITE_OK;\n}\n\n\n/* Takes a fully configured proxy locking-style unix file and switches\n** the local lock file path\n*/\nstatic int switchLockProxyPath(unixFile *pFile, const char *path) {\n  proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;\n  char *oldPath = pCtx->lockProxyPath;\n  int rc = SQLITE_OK;\n\n  if( pFile->eFileLock!=NO_LOCK ){\n    return SQLITE_BUSY;\n  }\n\n  /* nothing to do if the path is NULL, :auto: or matches the existing path */\n  if( !path || path[0]=='\\0' || !strcmp(path, \":auto:\") ||\n    (oldPath && !strncmp(oldPath, path, MAXPATHLEN)) ){\n    return SQLITE_OK;\n  }else{\n    unixFile *lockProxy = pCtx->lockProxy;\n    pCtx->lockProxy=NULL;\n    pCtx->conchHeld = 0;\n    if( lockProxy!=NULL ){\n      rc=lockProxy->pMethod->xClose((sqlite3_file *)lockProxy);\n      if( rc ) return rc;\n      sqlite3_free(lockProxy);\n    }\n    sqlite3_free(oldPath);\n    pCtx->lockProxyPath = sqlite3DbStrDup(0, path);\n  }\n\n  return rc;\n}\n\n/*\n** pFile is a file that has been opened by a prior xOpen call.  dbPath\n** is a string buffer at least MAXPATHLEN+1 characters in size.\n**\n** This routine find the filename associated with pFile and writes it\n** int dbPath.\n*/\nstatic int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){\n#if defined(__APPLE__)\n  if( pFile->pMethod == &afpIoMethods ){\n    /* afp style keeps a reference to the db path in the filePath field\n    ** of the struct */\n    assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );\n    strlcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath,\n            MAXPATHLEN);\n  } else\n#endif\n  if( pFile->pMethod == &dotlockIoMethods ){\n    /* dot lock style uses the locking context to store the dot lock\n    ** file path */\n    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);\n    memcpy(dbPath, (char *)pFile->lockingContext, len + 1);\n  }else{\n    /* all other styles use the locking context to store the db file path */\n    assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );\n    strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Takes an already filled in unix file and alters it so all file locking\n** will be performed on the local proxy lock file.  The following fields\n** are preserved in the locking context so that they can be restored and\n** the unix structure properly cleaned up at close time:\n**  ->lockingContext\n**  ->pMethod\n*/\nstatic int proxyTransformUnixFile(unixFile *pFile, const char *path) {\n  proxyLockingContext *pCtx;\n  char dbPath[MAXPATHLEN+1];       /* Name of the database file */\n  char *lockPath=NULL;\n  int rc = SQLITE_OK;\n\n  if( pFile->eFileLock!=NO_LOCK ){\n    return SQLITE_BUSY;\n  }\n  proxyGetDbPathForUnixFile(pFile, dbPath);\n  if( !path || path[0]=='\\0' || !strcmp(path, \":auto:\") ){\n    lockPath=NULL;\n  }else{\n    lockPath=(char *)path;\n  }\n\n  OSTRACE((\"TRANSPROXY  %d for %s pid=%d\\n\", pFile->h,\n           (lockPath ? lockPath : \":auto:\"), osGetpid(0)));\n\n  pCtx = sqlite3_malloc64( sizeof(*pCtx) );\n  if( pCtx==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  memset(pCtx, 0, sizeof(*pCtx));\n\n  rc = proxyCreateConchPathname(dbPath, &pCtx->conchFilePath);\n  if( rc==SQLITE_OK ){\n    rc = proxyCreateUnixFile(pCtx->conchFilePath, &pCtx->conchFile, 0);\n    if( rc==SQLITE_CANTOPEN && ((pFile->openFlags&O_RDWR) == 0) ){\n      /* if (a) the open flags are not O_RDWR, (b) the conch isn't there, and\n      ** (c) the file system is read-only, then enable no-locking access.\n      ** Ugh, since O_RDONLY==0x0000 we test for !O_RDWR since unixOpen asserts\n      ** that openFlags will have only one of O_RDONLY or O_RDWR.\n      */\n      struct statfs fsInfo;\n      struct stat conchInfo;\n      int goLockless = 0;\n\n      if( osStat(pCtx->conchFilePath, &conchInfo) == -1 ) {\n        int err = errno;\n        if( (err==ENOENT) && (statfs(dbPath, &fsInfo) != -1) ){\n          goLockless = (fsInfo.f_flags&MNT_RDONLY) == MNT_RDONLY;\n        }\n      }\n      if( goLockless ){\n        pCtx->conchHeld = -1; /* read only FS/ lockless */\n        rc = SQLITE_OK;\n      }\n    }\n  }\n  if( rc==SQLITE_OK && lockPath ){\n    pCtx->lockProxyPath = sqlite3DbStrDup(0, lockPath);\n  }\n\n  if( rc==SQLITE_OK ){\n    pCtx->dbPath = sqlite3DbStrDup(0, dbPath);\n    if( pCtx->dbPath==NULL ){\n      rc = SQLITE_NOMEM_BKPT;\n    }\n  }\n  if( rc==SQLITE_OK ){\n    /* all memory is allocated, proxys are created and assigned,\n    ** switch the locking context and pMethod then return.\n    */\n    pCtx->oldLockingContext = pFile->lockingContext;\n    pFile->lockingContext = pCtx;\n    pCtx->pOldMethod = pFile->pMethod;\n    pFile->pMethod = &proxyIoMethods;\n  }else{\n    if( pCtx->conchFile ){\n      pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile);\n      sqlite3_free(pCtx->conchFile);\n    }\n    sqlite3DbFree(0, pCtx->lockProxyPath);\n    sqlite3_free(pCtx->conchFilePath);\n    sqlite3_free(pCtx);\n  }\n  OSTRACE((\"TRANSPROXY  %d %s\\n\", pFile->h,\n           (rc==SQLITE_OK ? \"ok\" : \"failed\")));\n  return rc;\n}\n\n\n/*\n** This routine handles sqlite3_file_control() calls that are specific\n** to proxy locking.\n*/\nstatic int proxyFileControl(sqlite3_file *id, int op, void *pArg){\n  switch( op ){\n    case SQLITE_FCNTL_GET_LOCKPROXYFILE: {\n      unixFile *pFile = (unixFile*)id;\n      if( pFile->pMethod == &proxyIoMethods ){\n        proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;\n        proxyTakeConch(pFile);\n        if( pCtx->lockProxyPath ){\n          *(const char **)pArg = pCtx->lockProxyPath;\n        }else{\n          *(const char **)pArg = \":auto: (not held)\";\n        }\n      } else {\n        *(const char **)pArg = NULL;\n      }\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_SET_LOCKPROXYFILE: {\n      unixFile *pFile = (unixFile*)id;\n      int rc = SQLITE_OK;\n      int isProxyStyle = (pFile->pMethod == &proxyIoMethods);\n      if( pArg==NULL || (const char *)pArg==0 ){\n        if( isProxyStyle ){\n          /* turn off proxy locking - not supported.  If support is added for\n          ** switching proxy locking mode off then it will need to fail if\n          ** the journal mode is WAL mode.\n          */\n          rc = SQLITE_ERROR /*SQLITE_PROTOCOL? SQLITE_MISUSE?*/;\n        }else{\n          /* turn off proxy locking - already off - NOOP */\n          rc = SQLITE_OK;\n        }\n      }else{\n        const char *proxyPath = (const char *)pArg;\n        if( isProxyStyle ){\n          proxyLockingContext *pCtx =\n            (proxyLockingContext*)pFile->lockingContext;\n          if( !strcmp(pArg, \":auto:\")\n           || (pCtx->lockProxyPath &&\n               !strncmp(pCtx->lockProxyPath, proxyPath, MAXPATHLEN))\n          ){\n            rc = SQLITE_OK;\n          }else{\n            rc = switchLockProxyPath(pFile, proxyPath);\n          }\n        }else{\n          /* turn on proxy file locking */\n          rc = proxyTransformUnixFile(pFile, proxyPath);\n        }\n      }\n      return rc;\n    }\n    default: {\n      assert( 0 );  /* The call assures that only valid opcodes are sent */\n    }\n  }\n  /*NOTREACHED*/ assert(0);\n  return SQLITE_ERROR;\n}\n\n/*\n** Within this division (the proxying locking implementation) the procedures\n** above this point are all utilities.  The lock-related methods of the\n** proxy-locking sqlite3_io_method object follow.\n*/\n\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, set *pResOut\n** to a non-zero value otherwise *pResOut is set to zero.  The return value\n** is set to SQLITE_OK unless an I/O error occurs during lock checking.\n*/\nstatic int proxyCheckReservedLock(sqlite3_file *id, int *pResOut) {\n  unixFile *pFile = (unixFile*)id;\n  int rc = proxyTakeConch(pFile);\n  if( rc==SQLITE_OK ){\n    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n    if( pCtx->conchHeld>0 ){\n      unixFile *proxy = pCtx->lockProxy;\n      return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut);\n    }else{ /* conchHeld < 0 is lockless */\n      pResOut=0;\n    }\n  }\n  return rc;\n}\n\n/*\n** Lock the file with the lock specified by parameter eFileLock - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** This routine will only increase a lock.  Use the sqlite3OsUnlock()\n** routine to lower a locking level.\n*/\nstatic int proxyLock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  int rc = proxyTakeConch(pFile);\n  if( rc==SQLITE_OK ){\n    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n    if( pCtx->conchHeld>0 ){\n      unixFile *proxy = pCtx->lockProxy;\n      rc = proxy->pMethod->xLock((sqlite3_file*)proxy, eFileLock);\n      pFile->eFileLock = proxy->eFileLock;\n    }else{\n      /* conchHeld < 0 is lockless */\n    }\n  }\n  return rc;\n}\n\n\n/*\n** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n*/\nstatic int proxyUnlock(sqlite3_file *id, int eFileLock) {\n  unixFile *pFile = (unixFile*)id;\n  int rc = proxyTakeConch(pFile);\n  if( rc==SQLITE_OK ){\n    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n    if( pCtx->conchHeld>0 ){\n      unixFile *proxy = pCtx->lockProxy;\n      rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, eFileLock);\n      pFile->eFileLock = proxy->eFileLock;\n    }else{\n      /* conchHeld < 0 is lockless */\n    }\n  }\n  return rc;\n}\n\n/*\n** Close a file that uses proxy locks.\n*/\nstatic int proxyClose(sqlite3_file *id) {\n  if( ALWAYS(id) ){\n    unixFile *pFile = (unixFile*)id;\n    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;\n    unixFile *lockProxy = pCtx->lockProxy;\n    unixFile *conchFile = pCtx->conchFile;\n    int rc = SQLITE_OK;\n\n    if( lockProxy ){\n      rc = lockProxy->pMethod->xUnlock((sqlite3_file*)lockProxy, NO_LOCK);\n      if( rc ) return rc;\n      rc = lockProxy->pMethod->xClose((sqlite3_file*)lockProxy);\n      if( rc ) return rc;\n      sqlite3_free(lockProxy);\n      pCtx->lockProxy = 0;\n    }\n    if( conchFile ){\n      if( pCtx->conchHeld ){\n        rc = proxyReleaseConch(pFile);\n        if( rc ) return rc;\n      }\n      rc = conchFile->pMethod->xClose((sqlite3_file*)conchFile);\n      if( rc ) return rc;\n      sqlite3_free(conchFile);\n    }\n    sqlite3DbFree(0, pCtx->lockProxyPath);\n    sqlite3_free(pCtx->conchFilePath);\n    sqlite3DbFree(0, pCtx->dbPath);\n    /* restore the original locking context and pMethod then close it */\n    pFile->lockingContext = pCtx->oldLockingContext;\n    pFile->pMethod = pCtx->pOldMethod;\n    sqlite3_free(pCtx);\n    return pFile->pMethod->xClose(id);\n  }\n  return SQLITE_OK;\n}\n\n\n\n#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */\n/*\n** The proxy locking style is intended for use with AFP filesystems.\n** And since AFP is only supported on MacOSX, the proxy locking is also\n** restricted to MacOSX.\n**\n**\n******************* End of the proxy lock implementation **********************\n******************************************************************************/\n\n/*\n** Initialize the operating system interface.\n**\n** This routine registers all VFS implementations for unix-like operating\n** systems.  This routine, and the sqlite3_os_end() routine that follows,\n** should be the only routines in this file that are visible from other\n** files.\n**\n** This routine is called once during SQLite initialization and by a\n** single thread.  The memory allocation and mutex subsystems have not\n** necessarily been initialized when this routine is called, and so they\n** should not be used.\n*/\nSQLITE_API int sqlite3_os_init(void){\n  /*\n  ** The following macro defines an initializer for an sqlite3_vfs object.\n  ** The name of the VFS is NAME.  The pAppData is a pointer to a pointer\n  ** to the \"finder\" function.  (pAppData is a pointer to a pointer because\n  ** silly C90 rules prohibit a void* from being cast to a function pointer\n  ** and so we have to go through the intermediate pointer to avoid problems\n  ** when compiling with -pedantic-errors on GCC.)\n  **\n  ** The FINDER parameter to this macro is the name of the pointer to the\n  ** finder-function.  The finder-function returns a pointer to the\n  ** sqlite_io_methods object that implements the desired locking\n  ** behaviors.  See the division above that contains the IOMETHODS\n  ** macro for addition information on finder-functions.\n  **\n  ** Most finders simply return a pointer to a fixed sqlite3_io_methods\n  ** object.  But the \"autolockIoFinder\" available on MacOSX does a little\n  ** more than that; it looks at the filesystem type that hosts the\n  ** database file and tries to choose an locking method appropriate for\n  ** that filesystem time.\n  */\n  #define UNIXVFS(VFSNAME, FINDER) {                        \\\n    3,                    /* iVersion */                    \\\n    sizeof(unixFile),     /* szOsFile */                    \\\n    MAX_PATHNAME,         /* mxPathname */                  \\\n    0,                    /* pNext */                       \\\n    VFSNAME,              /* zName */                       \\\n    (void*)&FINDER,       /* pAppData */                    \\\n    unixOpen,             /* xOpen */                       \\\n    unixDelete,           /* xDelete */                     \\\n    unixAccess,           /* xAccess */                     \\\n    unixFullPathname,     /* xFullPathname */               \\\n    unixDlOpen,           /* xDlOpen */                     \\\n    unixDlError,          /* xDlError */                    \\\n    unixDlSym,            /* xDlSym */                      \\\n    unixDlClose,          /* xDlClose */                    \\\n    unixRandomness,       /* xRandomness */                 \\\n    unixSleep,            /* xSleep */                      \\\n    unixCurrentTime,      /* xCurrentTime */                \\\n    unixGetLastError,     /* xGetLastError */               \\\n    unixCurrentTimeInt64, /* xCurrentTimeInt64 */           \\\n    unixSetSystemCall,    /* xSetSystemCall */              \\\n    unixGetSystemCall,    /* xGetSystemCall */              \\\n    unixNextSystemCall,   /* xNextSystemCall */             \\\n  }\n\n  /*\n  ** All default VFSes for unix are contained in the following array.\n  **\n  ** Note that the sqlite3_vfs.pNext field of the VFS object is modified\n  ** by the SQLite core when the VFS is registered.  So the following\n  ** array cannot be const.\n  */\n  static sqlite3_vfs aVfs[] = {\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n    UNIXVFS(\"unix\",          autolockIoFinder ),\n#elif OS_VXWORKS\n    UNIXVFS(\"unix\",          vxworksIoFinder ),\n#else\n    UNIXVFS(\"unix\",          posixIoFinder ),\n#endif\n    UNIXVFS(\"unix-none\",     nolockIoFinder ),\n    UNIXVFS(\"unix-dotfile\",  dotlockIoFinder ),\n    UNIXVFS(\"unix-excl\",     posixIoFinder ),\n#if OS_VXWORKS\n    UNIXVFS(\"unix-namedsem\", semIoFinder ),\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS\n    UNIXVFS(\"unix-posix\",    posixIoFinder ),\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE\n    UNIXVFS(\"unix-flock\",    flockIoFinder ),\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)\n    UNIXVFS(\"unix-afp\",      afpIoFinder ),\n    UNIXVFS(\"unix-nfs\",      nfsIoFinder ),\n    UNIXVFS(\"unix-proxy\",    proxyIoFinder ),\n#endif\n  };\n  unsigned int i;          /* Loop counter */\n\n  /* Double-check that the aSyscall[] array has been constructed\n  ** correctly.  See ticket [bb3a86e890c8e96ab] */\n  assert( ArraySize(aSyscall)==29 );\n\n  /* Register all VFSes defined in the aVfs[] array */\n  for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){\n#ifdef SQLITE_DEFAULT_UNIX_VFS\n    sqlite3_vfs_register(&aVfs[i],\n           0==strcmp(aVfs[i].zName,SQLITE_DEFAULT_UNIX_VFS));\n#else\n    sqlite3_vfs_register(&aVfs[i], i==0);\n#endif\n  }\n#ifdef SQLITE_OS_KV_OPTIONAL\n  sqlite3KvvfsInit();\n#endif\n  unixBigLock = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1);\n#if OS_VXWORKS\n  vxworksMutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS2);\n#endif\n\n#ifndef SQLITE_OMIT_WAL\n  /* Validate lock assumptions */\n  assert( SQLITE_SHM_NLOCK==8 );  /* Number of available locks */\n  assert( UNIX_SHM_BASE==120  );  /* Start of locking area */\n  /* Locks:\n  **    WRITE       UNIX_SHM_BASE      120\n  **    CKPT        UNIX_SHM_BASE+1    121\n  **    RECOVER     UNIX_SHM_BASE+2    122\n  **    READ-0      UNIX_SHM_BASE+3    123\n  **    READ-1      UNIX_SHM_BASE+4    124\n  **    READ-2      UNIX_SHM_BASE+5    125\n  **    READ-3      UNIX_SHM_BASE+6    126\n  **    READ-4      UNIX_SHM_BASE+7    127\n  **    DMS         UNIX_SHM_BASE+8    128\n  */\n  assert( UNIX_SHM_DMS==128   );  /* Byte offset of the deadman-switch */\n#endif\n\n  /* Initialize temp file dir array. */\n  unixTempFileInit();\n\n  return SQLITE_OK;\n}\n\n/*\n** Shutdown the operating system interface.\n**\n** Some operating systems might need to do some cleanup in this routine,\n** to release dynamically allocated objects.  But not on unix.\n** This routine is a no-op for unix.\n*/\nSQLITE_API int sqlite3_os_end(void){\n  unixBigLock = 0;\n#if OS_VXWORKS\n  vxworksMutex = 0;\n#endif\n  return SQLITE_OK;\n}\n\n#endif /* SQLITE_OS_UNIX */\n\n/************** End of os_unix.c *********************************************/\n/************** Begin file os_win.c ******************************************/\n/*\n** 2004 May 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains code that is specific to Windows.\n*/\n/* #include \"sqliteInt.h\" */\n#if SQLITE_OS_WIN               /* This file is used for Windows only */\n\n/*\n** Include code that is common to all os_*.c files\n*/\n/* #include \"os_common.h\" */\n\n/*\n** Include the header file for the Windows VFS.\n*/\n/* #include \"os_win.h\" */\n\n/*\n** Compiling and using WAL mode requires several APIs that are only\n** available in Windows platforms based on the NT kernel.\n*/\n#if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)\n#  error \"WAL mode requires support from the Windows NT kernel, compile\\\n with SQLITE_OMIT_WAL.\"\n#endif\n\n#if !SQLITE_OS_WINNT && SQLITE_MAX_MMAP_SIZE>0\n#  error \"Memory mapped files require support from the Windows NT kernel,\\\n compile with SQLITE_MAX_MMAP_SIZE=0.\"\n#endif\n\n/*\n** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions\n** based on the sub-platform)?\n*/\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI)\n#  define SQLITE_WIN32_HAS_ANSI\n#endif\n\n/*\n** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions\n** based on the sub-platform)?\n*/\n#if (SQLITE_OS_WINCE || SQLITE_OS_WINNT || SQLITE_OS_WINRT) && \\\n    !defined(SQLITE_WIN32_NO_WIDE)\n#  define SQLITE_WIN32_HAS_WIDE\n#endif\n\n/*\n** Make sure at least one set of Win32 APIs is available.\n*/\n#if !defined(SQLITE_WIN32_HAS_ANSI) && !defined(SQLITE_WIN32_HAS_WIDE)\n#  error \"At least one of SQLITE_WIN32_HAS_ANSI and SQLITE_WIN32_HAS_WIDE\\\n must be defined.\"\n#endif\n\n/*\n** Define the required Windows SDK version constants if they are not\n** already available.\n*/\n#ifndef NTDDI_WIN8\n#  define NTDDI_WIN8                        0x06020000\n#endif\n\n#ifndef NTDDI_WINBLUE\n#  define NTDDI_WINBLUE                     0x06030000\n#endif\n\n#ifndef NTDDI_WINTHRESHOLD\n#  define NTDDI_WINTHRESHOLD                0x06040000\n#endif\n\n/*\n** Check to see if the GetVersionEx[AW] functions are deprecated on the\n** target system.  GetVersionEx was first deprecated in Win8.1.\n*/\n#ifndef SQLITE_WIN32_GETVERSIONEX\n#  if defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WINBLUE\n#    define SQLITE_WIN32_GETVERSIONEX   0   /* GetVersionEx() is deprecated */\n#  else\n#    define SQLITE_WIN32_GETVERSIONEX   1   /* GetVersionEx() is current */\n#  endif\n#endif\n\n/*\n** Check to see if the CreateFileMappingA function is supported on the\n** target system.  It is unavailable when using \"mincore.lib\" on Win10.\n** When compiling for Windows 10, always assume \"mincore.lib\" is in use.\n*/\n#ifndef SQLITE_WIN32_CREATEFILEMAPPINGA\n#  if defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WINTHRESHOLD\n#    define SQLITE_WIN32_CREATEFILEMAPPINGA   0\n#  else\n#    define SQLITE_WIN32_CREATEFILEMAPPINGA   1\n#  endif\n#endif\n\n/*\n** This constant should already be defined (in the \"WinDef.h\" SDK file).\n*/\n#ifndef MAX_PATH\n#  define MAX_PATH                      (260)\n#endif\n\n/*\n** Maximum pathname length (in chars) for Win32.  This should normally be\n** MAX_PATH.\n*/\n#ifndef SQLITE_WIN32_MAX_PATH_CHARS\n#  define SQLITE_WIN32_MAX_PATH_CHARS   (MAX_PATH)\n#endif\n\n/*\n** This constant should already be defined (in the \"WinNT.h\" SDK file).\n*/\n#ifndef UNICODE_STRING_MAX_CHARS\n#  define UNICODE_STRING_MAX_CHARS      (32767)\n#endif\n\n/*\n** Maximum pathname length (in chars) for WinNT.  This should normally be\n** UNICODE_STRING_MAX_CHARS.\n*/\n#ifndef SQLITE_WINNT_MAX_PATH_CHARS\n#  define SQLITE_WINNT_MAX_PATH_CHARS   (UNICODE_STRING_MAX_CHARS)\n#endif\n\n/*\n** Maximum pathname length (in bytes) for Win32.  The MAX_PATH macro is in\n** characters, so we allocate 4 bytes per character assuming worst-case of\n** 4-bytes-per-character for UTF8.\n*/\n#ifndef SQLITE_WIN32_MAX_PATH_BYTES\n#  define SQLITE_WIN32_MAX_PATH_BYTES   (SQLITE_WIN32_MAX_PATH_CHARS*4)\n#endif\n\n/*\n** Maximum pathname length (in bytes) for WinNT.  This should normally be\n** UNICODE_STRING_MAX_CHARS * sizeof(WCHAR).\n*/\n#ifndef SQLITE_WINNT_MAX_PATH_BYTES\n#  define SQLITE_WINNT_MAX_PATH_BYTES   \\\n                            (sizeof(WCHAR) * SQLITE_WINNT_MAX_PATH_CHARS)\n#endif\n\n/*\n** Maximum error message length (in chars) for WinRT.\n*/\n#ifndef SQLITE_WIN32_MAX_ERRMSG_CHARS\n#  define SQLITE_WIN32_MAX_ERRMSG_CHARS (1024)\n#endif\n\n/*\n** Returns non-zero if the character should be treated as a directory\n** separator.\n*/\n#ifndef winIsDirSep\n#  define winIsDirSep(a)                (((a) == '/') || ((a) == '\\\\'))\n#endif\n\n/*\n** This macro is used when a local variable is set to a value that is\n** [sometimes] not used by the code (e.g. via conditional compilation).\n*/\n#ifndef UNUSED_VARIABLE_VALUE\n#  define UNUSED_VARIABLE_VALUE(x)      (void)(x)\n#endif\n\n/*\n** Returns the character that should be used as the directory separator.\n*/\n#ifndef winGetDirSep\n#  define winGetDirSep()                '\\\\'\n#endif\n\n/*\n** Do we need to manually define the Win32 file mapping APIs for use with WAL\n** mode or memory mapped files (e.g. these APIs are available in the Windows\n** CE SDK; however, they are not present in the header file)?\n*/\n#if SQLITE_WIN32_FILEMAPPING_API && \\\n        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)\n/*\n** Two of the file mapping APIs are different under WinRT.  Figure out which\n** set we need.\n*/\n#if SQLITE_OS_WINRT\nWINBASEAPI HANDLE WINAPI CreateFileMappingFromApp(HANDLE, \\\n        LPSECURITY_ATTRIBUTES, ULONG, ULONG64, LPCWSTR);\n\nWINBASEAPI LPVOID WINAPI MapViewOfFileFromApp(HANDLE, ULONG, ULONG64, SIZE_T);\n#else\n#if defined(SQLITE_WIN32_HAS_ANSI)\nWINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE, LPSECURITY_ATTRIBUTES, \\\n        DWORD, DWORD, DWORD, LPCSTR);\n#endif /* defined(SQLITE_WIN32_HAS_ANSI) */\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\nWINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE, LPSECURITY_ATTRIBUTES, \\\n        DWORD, DWORD, DWORD, LPCWSTR);\n#endif /* defined(SQLITE_WIN32_HAS_WIDE) */\n\nWINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE, DWORD, DWORD, DWORD, SIZE_T);\n#endif /* SQLITE_OS_WINRT */\n\n/*\n** These file mapping APIs are common to both Win32 and WinRT.\n*/\n\nWINBASEAPI BOOL WINAPI FlushViewOfFile(LPCVOID, SIZE_T);\nWINBASEAPI BOOL WINAPI UnmapViewOfFile(LPCVOID);\n#endif /* SQLITE_WIN32_FILEMAPPING_API */\n\n/*\n** Some Microsoft compilers lack this definition.\n*/\n#ifndef INVALID_FILE_ATTRIBUTES\n# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)\n#endif\n\n#ifndef FILE_FLAG_MASK\n# define FILE_FLAG_MASK          (0xFF3C0000)\n#endif\n\n#ifndef FILE_ATTRIBUTE_MASK\n# define FILE_ATTRIBUTE_MASK     (0x0003FFF7)\n#endif\n\n#ifndef SQLITE_OMIT_WAL\n/* Forward references to structures used for WAL */\ntypedef struct winShm winShm;           /* A connection to shared-memory */\ntypedef struct winShmNode winShmNode;   /* A region of shared-memory */\n#endif\n\n/*\n** WinCE lacks native support for file locking so we have to fake it\n** with some code of our own.\n*/\n#if SQLITE_OS_WINCE\ntypedef struct winceLock {\n  int nReaders;       /* Number of reader locks obtained */\n  BOOL bPending;      /* Indicates a pending lock has been obtained */\n  BOOL bReserved;     /* Indicates a reserved lock has been obtained */\n  BOOL bExclusive;    /* Indicates an exclusive lock has been obtained */\n} winceLock;\n#endif\n\n/*\n** The winFile structure is a subclass of sqlite3_file* specific to the win32\n** portability layer.\n*/\ntypedef struct winFile winFile;\nstruct winFile {\n  const sqlite3_io_methods *pMethod; /*** Must be first ***/\n  sqlite3_vfs *pVfs;      /* The VFS used to open this file */\n  HANDLE h;               /* Handle for accessing the file */\n  u8 locktype;            /* Type of lock currently held on this file */\n  short sharedLockByte;   /* Randomly chosen byte used as a shared lock */\n  u8 ctrlFlags;           /* Flags.  See WINFILE_* below */\n  DWORD lastErrno;        /* The Windows errno from the last I/O error */\n#ifndef SQLITE_OMIT_WAL\n  winShm *pShm;           /* Instance of shared memory on this file */\n#endif\n  const char *zPath;      /* Full pathname of this file */\n  int szChunk;            /* Chunk size configured by FCNTL_CHUNK_SIZE */\n#if SQLITE_OS_WINCE\n  LPWSTR zDeleteOnClose;  /* Name of file to delete when closing */\n  HANDLE hMutex;          /* Mutex used to control access to shared lock */\n  HANDLE hShared;         /* Shared memory segment used for locking */\n  winceLock local;        /* Locks obtained by this instance of winFile */\n  winceLock *shared;      /* Global shared lock memory for the file  */\n#endif\n#if SQLITE_MAX_MMAP_SIZE>0\n  int nFetchOut;                /* Number of outstanding xFetch references */\n  HANDLE hMap;                  /* Handle for accessing memory mapping */\n  void *pMapRegion;             /* Area memory mapped */\n  sqlite3_int64 mmapSize;       /* Size of mapped region */\n  sqlite3_int64 mmapSizeMax;    /* Configured FCNTL_MMAP_SIZE value */\n#endif\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  DWORD iBusyTimeout;        /* Wait this many millisec on locks */\n  int bBlockOnConnect;\n#endif\n};\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n# define winFileBusyTimeout(pDbFd) pDbFd->iBusyTimeout\n#else\n# define winFileBusyTimeout(pDbFd) 0\n#endif\n\n/*\n** The winVfsAppData structure is used for the pAppData member for all of the\n** Win32 VFS variants.\n*/\ntypedef struct winVfsAppData winVfsAppData;\nstruct winVfsAppData {\n  const sqlite3_io_methods *pMethod; /* The file I/O methods to use. */\n  void *pAppData;                    /* The extra pAppData, if any. */\n  BOOL bNoLock;                      /* Non-zero if locking is disabled. */\n};\n\n/*\n** Allowed values for winFile.ctrlFlags\n*/\n#define WINFILE_RDONLY          0x02   /* Connection is read only */\n#define WINFILE_PERSIST_WAL     0x04   /* Persistent WAL mode */\n#define WINFILE_PSOW            0x10   /* SQLITE_IOCAP_POWERSAFE_OVERWRITE */\n\n/*\n * The size of the buffer used by sqlite3_win32_write_debug().\n */\n#ifndef SQLITE_WIN32_DBG_BUF_SIZE\n#  define SQLITE_WIN32_DBG_BUF_SIZE   ((int)(4096-sizeof(DWORD)))\n#endif\n\n/*\n * If compiled with SQLITE_WIN32_MALLOC on Windows, we will use the\n * various Win32 API heap functions instead of our own.\n */\n#ifdef SQLITE_WIN32_MALLOC\n\n/*\n * If this is non-zero, an isolated heap will be created by the native Win32\n * allocator subsystem; otherwise, the default process heap will be used.  This\n * setting has no effect when compiling for WinRT.  By default, this is enabled\n * and an isolated heap will be created to store all allocated data.\n *\n ******************************************************************************\n * WARNING: It is important to note that when this setting is non-zero and the\n *          winMemShutdown function is called (e.g. by the sqlite3_shutdown\n *          function), all data that was allocated using the isolated heap will\n *          be freed immediately and any attempt to access any of that freed\n *          data will almost certainly result in an immediate access violation.\n ******************************************************************************\n */\n#ifndef SQLITE_WIN32_HEAP_CREATE\n#  define SQLITE_WIN32_HEAP_CREATE        (TRUE)\n#endif\n\n/*\n * This is the maximum possible initial size of the Win32-specific heap, in\n * bytes.\n */\n#ifndef SQLITE_WIN32_HEAP_MAX_INIT_SIZE\n#  define SQLITE_WIN32_HEAP_MAX_INIT_SIZE (4294967295U)\n#endif\n\n/*\n * This is the extra space for the initial size of the Win32-specific heap,\n * in bytes.  This value may be zero.\n */\n#ifndef SQLITE_WIN32_HEAP_INIT_EXTRA\n#  define SQLITE_WIN32_HEAP_INIT_EXTRA  (4194304)\n#endif\n\n/*\n * Calculate the maximum legal cache size, in pages, based on the maximum\n * possible initial heap size and the default page size, setting aside the\n * needed extra space.\n */\n#ifndef SQLITE_WIN32_MAX_CACHE_SIZE\n#  define SQLITE_WIN32_MAX_CACHE_SIZE   (((SQLITE_WIN32_HEAP_MAX_INIT_SIZE) - \\\n                                          (SQLITE_WIN32_HEAP_INIT_EXTRA)) / \\\n                                         (SQLITE_DEFAULT_PAGE_SIZE))\n#endif\n\n/*\n * This is cache size used in the calculation of the initial size of the\n * Win32-specific heap.  It cannot be negative.\n */\n#ifndef SQLITE_WIN32_CACHE_SIZE\n#  if SQLITE_DEFAULT_CACHE_SIZE>=0\n#    define SQLITE_WIN32_CACHE_SIZE     (SQLITE_DEFAULT_CACHE_SIZE)\n#  else\n#    define SQLITE_WIN32_CACHE_SIZE     (-(SQLITE_DEFAULT_CACHE_SIZE))\n#  endif\n#endif\n\n/*\n * Make sure that the calculated cache size, in pages, cannot cause the\n * initial size of the Win32-specific heap to exceed the maximum amount\n * of memory that can be specified in the call to HeapCreate.\n */\n#if SQLITE_WIN32_CACHE_SIZE>SQLITE_WIN32_MAX_CACHE_SIZE\n#  undef SQLITE_WIN32_CACHE_SIZE\n#  define SQLITE_WIN32_CACHE_SIZE       (2000)\n#endif\n\n/*\n * The initial size of the Win32-specific heap.  This value may be zero.\n */\n#ifndef SQLITE_WIN32_HEAP_INIT_SIZE\n#  define SQLITE_WIN32_HEAP_INIT_SIZE   ((SQLITE_WIN32_CACHE_SIZE) * \\\n                                         (SQLITE_DEFAULT_PAGE_SIZE) + \\\n                                         (SQLITE_WIN32_HEAP_INIT_EXTRA))\n#endif\n\n/*\n * The maximum size of the Win32-specific heap.  This value may be zero.\n */\n#ifndef SQLITE_WIN32_HEAP_MAX_SIZE\n#  define SQLITE_WIN32_HEAP_MAX_SIZE    (0)\n#endif\n\n/*\n * The extra flags to use in calls to the Win32 heap APIs.  This value may be\n * zero for the default behavior.\n */\n#ifndef SQLITE_WIN32_HEAP_FLAGS\n#  define SQLITE_WIN32_HEAP_FLAGS       (0)\n#endif\n\n\n/*\n** The winMemData structure stores information required by the Win32-specific\n** sqlite3_mem_methods implementation.\n*/\ntypedef struct winMemData winMemData;\nstruct winMemData {\n#ifndef NDEBUG\n  u32 magic1;   /* Magic number to detect structure corruption. */\n#endif\n  HANDLE hHeap; /* The handle to our heap. */\n  BOOL bOwned;  /* Do we own the heap (i.e. destroy it on shutdown)? */\n#ifndef NDEBUG\n  u32 magic2;   /* Magic number to detect structure corruption. */\n#endif\n};\n\n#ifndef NDEBUG\n#define WINMEM_MAGIC1     0x42b2830b\n#define WINMEM_MAGIC2     0xbd4d7cf4\n#endif\n\nstatic struct winMemData win_mem_data = {\n#ifndef NDEBUG\n  WINMEM_MAGIC1,\n#endif\n  NULL, FALSE\n#ifndef NDEBUG\n  ,WINMEM_MAGIC2\n#endif\n};\n\n#ifndef NDEBUG\n#define winMemAssertMagic1() assert( win_mem_data.magic1==WINMEM_MAGIC1 )\n#define winMemAssertMagic2() assert( win_mem_data.magic2==WINMEM_MAGIC2 )\n#define winMemAssertMagic()  winMemAssertMagic1(); winMemAssertMagic2();\n#else\n#define winMemAssertMagic()\n#endif\n\n#define winMemGetDataPtr()  &win_mem_data\n#define winMemGetHeap()     win_mem_data.hHeap\n#define winMemGetOwned()    win_mem_data.bOwned\n\nstatic void *winMemMalloc(int nBytes);\nstatic void winMemFree(void *pPrior);\nstatic void *winMemRealloc(void *pPrior, int nBytes);\nstatic int winMemSize(void *p);\nstatic int winMemRoundup(int n);\nstatic int winMemInit(void *pAppData);\nstatic void winMemShutdown(void *pAppData);\n\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetWin32(void);\n#endif /* SQLITE_WIN32_MALLOC */\n\n/*\n** The following variable is (normally) set once and never changes\n** thereafter.  It records whether the operating system is Win9x\n** or WinNT.\n**\n** 0:   Operating system unknown.\n** 1:   Operating system is Win9x.\n** 2:   Operating system is WinNT.\n**\n** In order to facilitate testing on a WinNT system, the test fixture\n** can manually set this value to 1 to emulate Win98 behavior.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0;\n#else\nstatic LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0;\n#endif\n\n#ifndef SYSCALL\n#  define SYSCALL sqlite3_syscall_ptr\n#endif\n\n/*\n** This function is not available on Windows CE or WinRT.\n */\n\n#if SQLITE_OS_WINCE || SQLITE_OS_WINRT\n#  define osAreFileApisANSI()       1\n#endif\n\n/*\n** Many system calls are accessed through pointer-to-functions so that\n** they may be overridden at runtime to facilitate fault injection during\n** testing and sandboxing.  The following array holds the names and pointers\n** to all overrideable system calls.\n*/\nstatic struct win_syscall {\n  const char *zName;            /* Name of the system call */\n  sqlite3_syscall_ptr pCurrent; /* Current value of the system call */\n  sqlite3_syscall_ptr pDefault; /* Default value */\n} aSyscall[] = {\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  { \"AreFileApisANSI\",         (SYSCALL)AreFileApisANSI,         0 },\n#else\n  { \"AreFileApisANSI\",         (SYSCALL)0,                       0 },\n#endif\n\n#ifndef osAreFileApisANSI\n#define osAreFileApisANSI ((BOOL(WINAPI*)(VOID))aSyscall[0].pCurrent)\n#endif\n\n#if SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"CharLowerW\",              (SYSCALL)CharLowerW,              0 },\n#else\n  { \"CharLowerW\",              (SYSCALL)0,                       0 },\n#endif\n\n#define osCharLowerW ((LPWSTR(WINAPI*)(LPWSTR))aSyscall[1].pCurrent)\n\n#if SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"CharUpperW\",              (SYSCALL)CharUpperW,              0 },\n#else\n  { \"CharUpperW\",              (SYSCALL)0,                       0 },\n#endif\n\n#define osCharUpperW ((LPWSTR(WINAPI*)(LPWSTR))aSyscall[2].pCurrent)\n\n  { \"CloseHandle\",             (SYSCALL)CloseHandle,             0 },\n\n#define osCloseHandle ((BOOL(WINAPI*)(HANDLE))aSyscall[3].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"CreateFileA\",             (SYSCALL)CreateFileA,             0 },\n#else\n  { \"CreateFileA\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateFileA ((HANDLE(WINAPI*)(LPCSTR,DWORD,DWORD, \\\n        LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE))aSyscall[4].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"CreateFileW\",             (SYSCALL)CreateFileW,             0 },\n#else\n  { \"CreateFileW\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateFileW ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD, \\\n        LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE))aSyscall[5].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_ANSI) && \\\n        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) && \\\n        SQLITE_WIN32_CREATEFILEMAPPINGA\n  { \"CreateFileMappingA\",      (SYSCALL)CreateFileMappingA,      0 },\n#else\n  { \"CreateFileMappingA\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateFileMappingA ((HANDLE(WINAPI*)(HANDLE,LPSECURITY_ATTRIBUTES, \\\n        DWORD,DWORD,DWORD,LPCSTR))aSyscall[6].pCurrent)\n\n#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \\\n        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))\n  { \"CreateFileMappingW\",      (SYSCALL)CreateFileMappingW,      0 },\n#else\n  { \"CreateFileMappingW\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateFileMappingW ((HANDLE(WINAPI*)(HANDLE,LPSECURITY_ATTRIBUTES, \\\n        DWORD,DWORD,DWORD,LPCWSTR))aSyscall[7].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"CreateMutexW\",            (SYSCALL)CreateMutexW,            0 },\n#else\n  { \"CreateMutexW\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateMutexW ((HANDLE(WINAPI*)(LPSECURITY_ATTRIBUTES,BOOL, \\\n        LPCWSTR))aSyscall[8].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"DeleteFileA\",             (SYSCALL)DeleteFileA,             0 },\n#else\n  { \"DeleteFileA\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osDeleteFileA ((BOOL(WINAPI*)(LPCSTR))aSyscall[9].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  { \"DeleteFileW\",             (SYSCALL)DeleteFileW,             0 },\n#else\n  { \"DeleteFileW\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osDeleteFileW ((BOOL(WINAPI*)(LPCWSTR))aSyscall[10].pCurrent)\n\n#if SQLITE_OS_WINCE\n  { \"FileTimeToLocalFileTime\", (SYSCALL)FileTimeToLocalFileTime, 0 },\n#else\n  { \"FileTimeToLocalFileTime\", (SYSCALL)0,                       0 },\n#endif\n\n#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(const FILETIME*, \\\n        LPFILETIME))aSyscall[11].pCurrent)\n\n#if SQLITE_OS_WINCE\n  { \"FileTimeToSystemTime\",    (SYSCALL)FileTimeToSystemTime,    0 },\n#else\n  { \"FileTimeToSystemTime\",    (SYSCALL)0,                       0 },\n#endif\n\n#define osFileTimeToSystemTime ((BOOL(WINAPI*)(const FILETIME*, \\\n        LPSYSTEMTIME))aSyscall[12].pCurrent)\n\n  { \"FlushFileBuffers\",        (SYSCALL)FlushFileBuffers,        0 },\n\n#define osFlushFileBuffers ((BOOL(WINAPI*)(HANDLE))aSyscall[13].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"FormatMessageA\",          (SYSCALL)FormatMessageA,          0 },\n#else\n  { \"FormatMessageA\",          (SYSCALL)0,                       0 },\n#endif\n\n#define osFormatMessageA ((DWORD(WINAPI*)(DWORD,LPCVOID,DWORD,DWORD,LPSTR, \\\n        DWORD,va_list*))aSyscall[14].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  { \"FormatMessageW\",          (SYSCALL)FormatMessageW,          0 },\n#else\n  { \"FormatMessageW\",          (SYSCALL)0,                       0 },\n#endif\n\n#define osFormatMessageW ((DWORD(WINAPI*)(DWORD,LPCVOID,DWORD,DWORD,LPWSTR, \\\n        DWORD,va_list*))aSyscall[15].pCurrent)\n\n#if !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  { \"FreeLibrary\",             (SYSCALL)FreeLibrary,             0 },\n#else\n  { \"FreeLibrary\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osFreeLibrary ((BOOL(WINAPI*)(HMODULE))aSyscall[16].pCurrent)\n\n  { \"GetCurrentProcessId\",     (SYSCALL)GetCurrentProcessId,     0 },\n\n#define osGetCurrentProcessId ((DWORD(WINAPI*)(VOID))aSyscall[17].pCurrent)\n\n#if !SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_ANSI)\n  { \"GetDiskFreeSpaceA\",       (SYSCALL)GetDiskFreeSpaceA,       0 },\n#else\n  { \"GetDiskFreeSpaceA\",       (SYSCALL)0,                       0 },\n#endif\n\n#define osGetDiskFreeSpaceA ((BOOL(WINAPI*)(LPCSTR,LPDWORD,LPDWORD,LPDWORD, \\\n        LPDWORD))aSyscall[18].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"GetDiskFreeSpaceW\",       (SYSCALL)GetDiskFreeSpaceW,       0 },\n#else\n  { \"GetDiskFreeSpaceW\",       (SYSCALL)0,                       0 },\n#endif\n\n#define osGetDiskFreeSpaceW ((BOOL(WINAPI*)(LPCWSTR,LPDWORD,LPDWORD,LPDWORD, \\\n        LPDWORD))aSyscall[19].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"GetFileAttributesA\",      (SYSCALL)GetFileAttributesA,      0 },\n#else\n  { \"GetFileAttributesA\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFileAttributesA ((DWORD(WINAPI*)(LPCSTR))aSyscall[20].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"GetFileAttributesW\",      (SYSCALL)GetFileAttributesW,      0 },\n#else\n  { \"GetFileAttributesW\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFileAttributesW ((DWORD(WINAPI*)(LPCWSTR))aSyscall[21].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  { \"GetFileAttributesExW\",    (SYSCALL)GetFileAttributesExW,    0 },\n#else\n  { \"GetFileAttributesExW\",    (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFileAttributesExW ((BOOL(WINAPI*)(LPCWSTR,GET_FILEEX_INFO_LEVELS, \\\n        LPVOID))aSyscall[22].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"GetFileSize\",             (SYSCALL)GetFileSize,             0 },\n#else\n  { \"GetFileSize\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFileSize ((DWORD(WINAPI*)(HANDLE,LPDWORD))aSyscall[23].pCurrent)\n\n#if !SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_ANSI)\n  { \"GetFullPathNameA\",        (SYSCALL)GetFullPathNameA,        0 },\n#else\n  { \"GetFullPathNameA\",        (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFullPathNameA ((DWORD(WINAPI*)(LPCSTR,DWORD,LPSTR, \\\n        LPSTR*))aSyscall[24].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"GetFullPathNameW\",        (SYSCALL)GetFullPathNameW,        0 },\n#else\n  { \"GetFullPathNameW\",        (SYSCALL)0,                       0 },\n#endif\n\n#define osGetFullPathNameW ((DWORD(WINAPI*)(LPCWSTR,DWORD,LPWSTR, \\\n        LPWSTR*))aSyscall[25].pCurrent)\n\n/*\n** For GetLastError(), MSDN says:\n**\n** Minimum supported client: Windows XP [desktop apps | UWP apps]\n** Minimum supported server: Windows Server 2003 [desktop apps | UWP apps]\n*/\n  { \"GetLastError\",            (SYSCALL)GetLastError,            0 },\n\n#define osGetLastError ((DWORD(WINAPI*)(VOID))aSyscall[26].pCurrent)\n\n#if !defined(SQLITE_OMIT_LOAD_EXTENSION)\n#if SQLITE_OS_WINCE\n  /* The GetProcAddressA() routine is only available on Windows CE. */\n  { \"GetProcAddressA\",         (SYSCALL)GetProcAddressA,         0 },\n#else\n  /* All other Windows platforms expect GetProcAddress() to take\n  ** an ANSI string regardless of the _UNICODE setting */\n  { \"GetProcAddressA\",         (SYSCALL)GetProcAddress,          0 },\n#endif\n#else\n  { \"GetProcAddressA\",         (SYSCALL)0,                       0 },\n#endif\n\n#define osGetProcAddressA ((FARPROC(WINAPI*)(HMODULE, \\\n        LPCSTR))aSyscall[27].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"GetSystemInfo\",           (SYSCALL)GetSystemInfo,           0 },\n#else\n  { \"GetSystemInfo\",           (SYSCALL)0,                       0 },\n#endif\n\n#define osGetSystemInfo ((VOID(WINAPI*)(LPSYSTEM_INFO))aSyscall[28].pCurrent)\n\n  { \"GetSystemTime\",           (SYSCALL)GetSystemTime,           0 },\n\n#define osGetSystemTime ((VOID(WINAPI*)(LPSYSTEMTIME))aSyscall[29].pCurrent)\n\n#if !SQLITE_OS_WINCE\n  { \"GetSystemTimeAsFileTime\", (SYSCALL)GetSystemTimeAsFileTime, 0 },\n#else\n  { \"GetSystemTimeAsFileTime\", (SYSCALL)0,                       0 },\n#endif\n\n#define osGetSystemTimeAsFileTime ((VOID(WINAPI*)( \\\n        LPFILETIME))aSyscall[30].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"GetTempPathA\",            (SYSCALL)GetTempPathA,            0 },\n#else\n  { \"GetTempPathA\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osGetTempPathA ((DWORD(WINAPI*)(DWORD,LPSTR))aSyscall[31].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)\n  { \"GetTempPathW\",            (SYSCALL)GetTempPathW,            0 },\n#else\n  { \"GetTempPathW\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osGetTempPathW ((DWORD(WINAPI*)(DWORD,LPWSTR))aSyscall[32].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"GetTickCount\",            (SYSCALL)GetTickCount,            0 },\n#else\n  { \"GetTickCount\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osGetTickCount ((DWORD(WINAPI*)(VOID))aSyscall[33].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_GETVERSIONEX\n  { \"GetVersionExA\",           (SYSCALL)GetVersionExA,           0 },\n#else\n  { \"GetVersionExA\",           (SYSCALL)0,                       0 },\n#endif\n\n#define osGetVersionExA ((BOOL(WINAPI*)( \\\n        LPOSVERSIONINFOA))aSyscall[34].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \\\n        SQLITE_WIN32_GETVERSIONEX\n  { \"GetVersionExW\",           (SYSCALL)GetVersionExW,           0 },\n#else\n  { \"GetVersionExW\",           (SYSCALL)0,                       0 },\n#endif\n\n#define osGetVersionExW ((BOOL(WINAPI*)( \\\n        LPOSVERSIONINFOW))aSyscall[35].pCurrent)\n\n  { \"HeapAlloc\",               (SYSCALL)HeapAlloc,               0 },\n\n#define osHeapAlloc ((LPVOID(WINAPI*)(HANDLE,DWORD, \\\n        SIZE_T))aSyscall[36].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"HeapCreate\",              (SYSCALL)HeapCreate,              0 },\n#else\n  { \"HeapCreate\",              (SYSCALL)0,                       0 },\n#endif\n\n#define osHeapCreate ((HANDLE(WINAPI*)(DWORD,SIZE_T, \\\n        SIZE_T))aSyscall[37].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"HeapDestroy\",             (SYSCALL)HeapDestroy,             0 },\n#else\n  { \"HeapDestroy\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osHeapDestroy ((BOOL(WINAPI*)(HANDLE))aSyscall[38].pCurrent)\n\n  { \"HeapFree\",                (SYSCALL)HeapFree,                0 },\n\n#define osHeapFree ((BOOL(WINAPI*)(HANDLE,DWORD,LPVOID))aSyscall[39].pCurrent)\n\n  { \"HeapReAlloc\",             (SYSCALL)HeapReAlloc,             0 },\n\n#define osHeapReAlloc ((LPVOID(WINAPI*)(HANDLE,DWORD,LPVOID, \\\n        SIZE_T))aSyscall[40].pCurrent)\n\n  { \"HeapSize\",                (SYSCALL)HeapSize,                0 },\n\n#define osHeapSize ((SIZE_T(WINAPI*)(HANDLE,DWORD, \\\n        LPCVOID))aSyscall[41].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"HeapValidate\",            (SYSCALL)HeapValidate,            0 },\n#else\n  { \"HeapValidate\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osHeapValidate ((BOOL(WINAPI*)(HANDLE,DWORD, \\\n        LPCVOID))aSyscall[42].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  { \"HeapCompact\",             (SYSCALL)HeapCompact,             0 },\n#else\n  { \"HeapCompact\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osHeapCompact ((UINT(WINAPI*)(HANDLE,DWORD))aSyscall[43].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI) && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  { \"LoadLibraryA\",            (SYSCALL)LoadLibraryA,            0 },\n#else\n  { \"LoadLibraryA\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osLoadLibraryA ((HMODULE(WINAPI*)(LPCSTR))aSyscall[44].pCurrent)\n\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \\\n        !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  { \"LoadLibraryW\",            (SYSCALL)LoadLibraryW,            0 },\n#else\n  { \"LoadLibraryW\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osLoadLibraryW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[45].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"LocalFree\",               (SYSCALL)LocalFree,               0 },\n#else\n  { \"LocalFree\",               (SYSCALL)0,                       0 },\n#endif\n\n#define osLocalFree ((HLOCAL(WINAPI*)(HLOCAL))aSyscall[46].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  { \"LockFile\",                (SYSCALL)LockFile,                0 },\n#else\n  { \"LockFile\",                (SYSCALL)0,                       0 },\n#endif\n\n#if !defined(osLockFile) && defined(SQLITE_WIN32_HAS_ANSI)\n#define osLockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \\\n        DWORD))aSyscall[47].pCurrent)\n#endif\n\n#if !SQLITE_OS_WINCE\n  { \"LockFileEx\",              (SYSCALL)LockFileEx,              0 },\n#else\n  { \"LockFileEx\",              (SYSCALL)0,                       0 },\n#endif\n\n#ifndef osLockFileEx\n#define osLockFileEx ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD,DWORD, \\\n        LPOVERLAPPED))aSyscall[48].pCurrent)\n#endif\n\n#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && \\\n        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))\n  { \"MapViewOfFile\",           (SYSCALL)MapViewOfFile,           0 },\n#else\n  { \"MapViewOfFile\",           (SYSCALL)0,                       0 },\n#endif\n\n#define osMapViewOfFile ((LPVOID(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \\\n        SIZE_T))aSyscall[49].pCurrent)\n\n  { \"MultiByteToWideChar\",     (SYSCALL)MultiByteToWideChar,     0 },\n\n#define osMultiByteToWideChar ((int(WINAPI*)(UINT,DWORD,LPCSTR,int,LPWSTR, \\\n        int))aSyscall[50].pCurrent)\n\n  { \"QueryPerformanceCounter\", (SYSCALL)QueryPerformanceCounter, 0 },\n\n#define osQueryPerformanceCounter ((BOOL(WINAPI*)( \\\n        LARGE_INTEGER*))aSyscall[51].pCurrent)\n\n  { \"ReadFile\",                (SYSCALL)ReadFile,                0 },\n\n#define osReadFile ((BOOL(WINAPI*)(HANDLE,LPVOID,DWORD,LPDWORD, \\\n        LPOVERLAPPED))aSyscall[52].pCurrent)\n\n  { \"SetEndOfFile\",            (SYSCALL)SetEndOfFile,            0 },\n\n#define osSetEndOfFile ((BOOL(WINAPI*)(HANDLE))aSyscall[53].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"SetFilePointer\",          (SYSCALL)SetFilePointer,          0 },\n#else\n  { \"SetFilePointer\",          (SYSCALL)0,                       0 },\n#endif\n\n#define osSetFilePointer ((DWORD(WINAPI*)(HANDLE,LONG,PLONG, \\\n        DWORD))aSyscall[54].pCurrent)\n\n#if !SQLITE_OS_WINRT\n  { \"Sleep\",                   (SYSCALL)Sleep,                   0 },\n#else\n  { \"Sleep\",                   (SYSCALL)0,                       0 },\n#endif\n\n#define osSleep ((VOID(WINAPI*)(DWORD))aSyscall[55].pCurrent)\n\n  { \"SystemTimeToFileTime\",    (SYSCALL)SystemTimeToFileTime,    0 },\n\n#define osSystemTimeToFileTime ((BOOL(WINAPI*)(const SYSTEMTIME*, \\\n        LPFILETIME))aSyscall[56].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  { \"UnlockFile\",              (SYSCALL)UnlockFile,              0 },\n#else\n  { \"UnlockFile\",              (SYSCALL)0,                       0 },\n#endif\n\n#if !defined(osUnlockFile) && defined(SQLITE_WIN32_HAS_ANSI)\n#define osUnlockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \\\n        DWORD))aSyscall[57].pCurrent)\n#endif\n\n#if !SQLITE_OS_WINCE\n  { \"UnlockFileEx\",            (SYSCALL)UnlockFileEx,            0 },\n#else\n  { \"UnlockFileEx\",            (SYSCALL)0,                       0 },\n#endif\n\n#define osUnlockFileEx ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \\\n        LPOVERLAPPED))aSyscall[58].pCurrent)\n\n#if SQLITE_OS_WINCE || !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0\n  { \"UnmapViewOfFile\",         (SYSCALL)UnmapViewOfFile,         0 },\n#else\n  { \"UnmapViewOfFile\",         (SYSCALL)0,                       0 },\n#endif\n\n#define osUnmapViewOfFile ((BOOL(WINAPI*)(LPCVOID))aSyscall[59].pCurrent)\n\n  { \"WideCharToMultiByte\",     (SYSCALL)WideCharToMultiByte,     0 },\n\n#define osWideCharToMultiByte ((int(WINAPI*)(UINT,DWORD,LPCWSTR,int,LPSTR,int, \\\n        LPCSTR,LPBOOL))aSyscall[60].pCurrent)\n\n  { \"WriteFile\",               (SYSCALL)WriteFile,               0 },\n\n#define osWriteFile ((BOOL(WINAPI*)(HANDLE,LPCVOID,DWORD,LPDWORD, \\\n        LPOVERLAPPED))aSyscall[61].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"CreateEventExW\",          (SYSCALL)CreateEventExW,          0 },\n#else\n  { \"CreateEventExW\",          (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateEventExW ((HANDLE(WINAPI*)(LPSECURITY_ATTRIBUTES,LPCWSTR, \\\n        DWORD,DWORD))aSyscall[62].pCurrent)\n\n/*\n** For WaitForSingleObject(), MSDN says:\n**\n** Minimum supported client: Windows XP [desktop apps | UWP apps]\n** Minimum supported server: Windows Server 2003 [desktop apps | UWP apps]\n*/\n  { \"WaitForSingleObject\",     (SYSCALL)WaitForSingleObject,     0 },\n\n#define osWaitForSingleObject ((DWORD(WINAPI*)(HANDLE, \\\n        DWORD))aSyscall[63].pCurrent)\n\n#if !SQLITE_OS_WINCE\n  { \"WaitForSingleObjectEx\",   (SYSCALL)WaitForSingleObjectEx,   0 },\n#else\n  { \"WaitForSingleObjectEx\",   (SYSCALL)0,                       0 },\n#endif\n\n#define osWaitForSingleObjectEx ((DWORD(WINAPI*)(HANDLE,DWORD, \\\n        BOOL))aSyscall[64].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"SetFilePointerEx\",        (SYSCALL)SetFilePointerEx,        0 },\n#else\n  { \"SetFilePointerEx\",        (SYSCALL)0,                       0 },\n#endif\n\n#define osSetFilePointerEx ((BOOL(WINAPI*)(HANDLE,LARGE_INTEGER, \\\n        PLARGE_INTEGER,DWORD))aSyscall[65].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"GetFileInformationByHandleEx\", (SYSCALL)GetFileInformationByHandleEx, 0 },\n#else\n  { \"GetFileInformationByHandleEx\", (SYSCALL)0,                  0 },\n#endif\n\n#define osGetFileInformationByHandleEx ((BOOL(WINAPI*)(HANDLE, \\\n        FILE_INFO_BY_HANDLE_CLASS,LPVOID,DWORD))aSyscall[66].pCurrent)\n\n#if SQLITE_OS_WINRT && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)\n  { \"MapViewOfFileFromApp\",    (SYSCALL)MapViewOfFileFromApp,    0 },\n#else\n  { \"MapViewOfFileFromApp\",    (SYSCALL)0,                       0 },\n#endif\n\n#define osMapViewOfFileFromApp ((LPVOID(WINAPI*)(HANDLE,ULONG,ULONG64, \\\n        SIZE_T))aSyscall[67].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"CreateFile2\",             (SYSCALL)CreateFile2,             0 },\n#else\n  { \"CreateFile2\",             (SYSCALL)0,                       0 },\n#endif\n\n#define osCreateFile2 ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD,DWORD, \\\n        LPCREATEFILE2_EXTENDED_PARAMETERS))aSyscall[68].pCurrent)\n\n#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  { \"LoadPackagedLibrary\",     (SYSCALL)LoadPackagedLibrary,     0 },\n#else\n  { \"LoadPackagedLibrary\",     (SYSCALL)0,                       0 },\n#endif\n\n#define osLoadPackagedLibrary ((HMODULE(WINAPI*)(LPCWSTR, \\\n        DWORD))aSyscall[69].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"GetTickCount64\",          (SYSCALL)GetTickCount64,          0 },\n#else\n  { \"GetTickCount64\",          (SYSCALL)0,                       0 },\n#endif\n\n#define osGetTickCount64 ((ULONGLONG(WINAPI*)(VOID))aSyscall[70].pCurrent)\n\n#if SQLITE_OS_WINRT\n  { \"GetNativeSystemInfo\",     (SYSCALL)GetNativeSystemInfo,     0 },\n#else\n  { \"GetNativeSystemInfo\",     (SYSCALL)0,                       0 },\n#endif\n\n#define osGetNativeSystemInfo ((VOID(WINAPI*)( \\\n        LPSYSTEM_INFO))aSyscall[71].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  { \"OutputDebugStringA\",      (SYSCALL)OutputDebugStringA,      0 },\n#else\n  { \"OutputDebugStringA\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osOutputDebugStringA ((VOID(WINAPI*)(LPCSTR))aSyscall[72].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  { \"OutputDebugStringW\",      (SYSCALL)OutputDebugStringW,      0 },\n#else\n  { \"OutputDebugStringW\",      (SYSCALL)0,                       0 },\n#endif\n\n#define osOutputDebugStringW ((VOID(WINAPI*)(LPCWSTR))aSyscall[73].pCurrent)\n\n  { \"GetProcessHeap\",          (SYSCALL)GetProcessHeap,          0 },\n\n#define osGetProcessHeap ((HANDLE(WINAPI*)(VOID))aSyscall[74].pCurrent)\n\n#if SQLITE_OS_WINRT && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)\n  { \"CreateFileMappingFromApp\", (SYSCALL)CreateFileMappingFromApp, 0 },\n#else\n  { \"CreateFileMappingFromApp\", (SYSCALL)0,                      0 },\n#endif\n\n#define osCreateFileMappingFromApp ((HANDLE(WINAPI*)(HANDLE, \\\n        LPSECURITY_ATTRIBUTES,ULONG,ULONG64,LPCWSTR))aSyscall[75].pCurrent)\n\n/*\n** NOTE: On some sub-platforms, the InterlockedCompareExchange \"function\"\n**       is really just a macro that uses a compiler intrinsic (e.g. x64).\n**       So do not try to make this is into a redefinable interface.\n*/\n#if defined(InterlockedCompareExchange)\n  { \"InterlockedCompareExchange\", (SYSCALL)0,                    0 },\n\n#define osInterlockedCompareExchange InterlockedCompareExchange\n#else\n  { \"InterlockedCompareExchange\", (SYSCALL)InterlockedCompareExchange, 0 },\n\n#define osInterlockedCompareExchange ((LONG(WINAPI*)(LONG \\\n        SQLITE_WIN32_VOLATILE*, LONG,LONG))aSyscall[76].pCurrent)\n#endif /* defined(InterlockedCompareExchange) */\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID\n  { \"UuidCreate\",               (SYSCALL)UuidCreate,             0 },\n#else\n  { \"UuidCreate\",               (SYSCALL)0,                      0 },\n#endif\n\n#define osUuidCreate ((RPC_STATUS(RPC_ENTRY*)(UUID*))aSyscall[77].pCurrent)\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID\n  { \"UuidCreateSequential\",     (SYSCALL)UuidCreateSequential,   0 },\n#else\n  { \"UuidCreateSequential\",     (SYSCALL)0,                      0 },\n#endif\n\n#define osUuidCreateSequential \\\n        ((RPC_STATUS(RPC_ENTRY*)(UUID*))aSyscall[78].pCurrent)\n\n#if !defined(SQLITE_NO_SYNC) && SQLITE_MAX_MMAP_SIZE>0\n  { \"FlushViewOfFile\",          (SYSCALL)FlushViewOfFile,        0 },\n#else\n  { \"FlushViewOfFile\",          (SYSCALL)0,                      0 },\n#endif\n\n#define osFlushViewOfFile \\\n        ((BOOL(WINAPI*)(LPCVOID,SIZE_T))aSyscall[79].pCurrent)\n\n/*\n** If SQLITE_ENABLE_SETLK_TIMEOUT is defined, we require CreateEvent()\n** to implement blocking locks with timeouts. MSDN says:\n**\n** Minimum supported client: Windows XP [desktop apps | UWP apps]\n** Minimum supported server: Windows Server 2003 [desktop apps | UWP apps]\n*/\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  { \"CreateEvent\",              (SYSCALL)CreateEvent,            0 },\n#else\n  { \"CreateEvent\",              (SYSCALL)0,                      0 },\n#endif\n\n#define osCreateEvent ( \\\n    (HANDLE(WINAPI*) (LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR)) \\\n    aSyscall[80].pCurrent \\\n)\n\n/*\n** If SQLITE_ENABLE_SETLK_TIMEOUT is defined, we require CancelIo()\n** for the case where a timeout expires and a lock request must be\n** cancelled.\n**\n** Minimum supported client: Windows XP [desktop apps | UWP apps]\n** Minimum supported server: Windows Server 2003 [desktop apps | UWP apps]\n*/\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  { \"CancelIo\",                 (SYSCALL)CancelIo,               0 },\n#else\n  { \"CancelIo\",                 (SYSCALL)0,                      0 },\n#endif\n\n#define osCancelIo ((BOOL(WINAPI*)(HANDLE))aSyscall[81].pCurrent)\n\n#if defined(SQLITE_WIN32_HAS_WIDE) && defined(_WIN32)\n  { \"GetModuleHandleW\",         (SYSCALL)GetModuleHandleW,       0 },\n#else\n  { \"GetModuleHandleW\",         (SYSCALL)0,                      0 },\n#endif\n\n#define osGetModuleHandleW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[82].pCurrent)\n\n#ifndef _WIN32\n  { \"getenv\",                   (SYSCALL)getenv,                 0 },\n#else\n  { \"getenv\",                   (SYSCALL)0,                      0 },\n#endif\n\n#define osGetenv ((const char *(*)(const char *))aSyscall[83].pCurrent)\n\n#ifndef _WIN32\n  { \"getcwd\",                   (SYSCALL)getcwd,                 0 },\n#else\n  { \"getcwd\",                   (SYSCALL)0,                      0 },\n#endif\n\n#define osGetcwd ((char*(*)(char*,size_t))aSyscall[84].pCurrent)\n\n#ifndef _WIN32\n  { \"readlink\",                 (SYSCALL)readlink,               0 },\n#else\n  { \"readlink\",                 (SYSCALL)0,                      0 },\n#endif\n\n#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[85].pCurrent)\n\n#ifndef _WIN32\n  { \"lstat\",                    (SYSCALL)lstat,                  0 },\n#else\n  { \"lstat\",                    (SYSCALL)0,                      0 },\n#endif\n\n#define osLstat ((int(*)(const char*,struct stat*))aSyscall[86].pCurrent)\n\n#ifndef _WIN32\n  { \"__errno\",                  (SYSCALL)__errno,                0 },\n#else\n  { \"__errno\",                  (SYSCALL)0,                      0 },\n#endif\n\n#define osErrno (*((int*(*)(void))aSyscall[87].pCurrent)())\n\n#ifndef _WIN32\n  { \"cygwin_conv_path\",         (SYSCALL)cygwin_conv_path,       0 },\n#else\n  { \"cygwin_conv_path\",         (SYSCALL)0,                      0 },\n#endif\n\n#define osCygwin_conv_path ((size_t(*)(unsigned int, \\\n    const void *, void *, size_t))aSyscall[88].pCurrent)\n\n}; /* End of the overrideable system calls */\n\n/*\n** This is the xSetSystemCall() method of sqlite3_vfs for all of the\n** \"win32\" VFSes.  Return SQLITE_OK upon successfully updating the\n** system call pointer, or SQLITE_NOTFOUND if there is no configurable\n** system call named zName.\n*/\nstatic int winSetSystemCall(\n  sqlite3_vfs *pNotUsed,        /* The VFS pointer.  Not used */\n  const char *zName,            /* Name of system call to override */\n  sqlite3_syscall_ptr pNewFunc  /* Pointer to new system call value */\n){\n  unsigned int i;\n  int rc = SQLITE_NOTFOUND;\n\n  UNUSED_PARAMETER(pNotUsed);\n  if( zName==0 ){\n    /* If no zName is given, restore all system calls to their default\n    ** settings and return NULL\n    */\n    rc = SQLITE_OK;\n    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n      if( aSyscall[i].pDefault ){\n        aSyscall[i].pCurrent = aSyscall[i].pDefault;\n      }\n    }\n  }else{\n    /* If zName is specified, operate on only the one system call\n    ** specified.\n    */\n    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n      if( strcmp(zName, aSyscall[i].zName)==0 ){\n        if( aSyscall[i].pDefault==0 ){\n          aSyscall[i].pDefault = aSyscall[i].pCurrent;\n        }\n        rc = SQLITE_OK;\n        if( pNewFunc==0 ) pNewFunc = aSyscall[i].pDefault;\n        aSyscall[i].pCurrent = pNewFunc;\n        break;\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Return the value of a system call.  Return NULL if zName is not a\n** recognized system call name.  NULL is also returned if the system call\n** is currently undefined.\n*/\nstatic sqlite3_syscall_ptr winGetSystemCall(\n  sqlite3_vfs *pNotUsed,\n  const char *zName\n){\n  unsigned int i;\n\n  UNUSED_PARAMETER(pNotUsed);\n  for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){\n    if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;\n  }\n  return 0;\n}\n\n/*\n** Return the name of the first system call after zName.  If zName==NULL\n** then return the name of the first system call.  Return NULL if zName\n** is the last system call or if zName is not the name of a valid\n** system call.\n*/\nstatic const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){\n  int i = -1;\n\n  UNUSED_PARAMETER(p);\n  if( zName ){\n    for(i=0; i<ArraySize(aSyscall)-1; i++){\n      if( strcmp(zName, aSyscall[i].zName)==0 ) break;\n    }\n  }\n  for(i++; i<ArraySize(aSyscall); i++){\n    if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;\n  }\n  return 0;\n}\n\n#ifdef SQLITE_WIN32_MALLOC\n/*\n** If a Win32 native heap has been configured, this function will attempt to\n** compact it.  Upon success, SQLITE_OK will be returned.  Upon failure, one\n** of SQLITE_NOMEM, SQLITE_ERROR, or SQLITE_NOTFOUND will be returned.  The\n** \"pnLargest\" argument, if non-zero, will be used to return the size of the\n** largest committed free block in the heap, in bytes.\n*/\nSQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){\n  int rc = SQLITE_OK;\n  UINT nLargest = 0;\n  HANDLE hHeap;\n\n  winMemAssertMagic();\n  hHeap = winMemGetHeap();\n  assert( hHeap!=0 );\n  assert( hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(hHeap, SQLITE_WIN32_HEAP_FLAGS, NULL) );\n#endif\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  if( (nLargest=osHeapCompact(hHeap, SQLITE_WIN32_HEAP_FLAGS))==0 ){\n    DWORD lastErrno = osGetLastError();\n    if( lastErrno==NO_ERROR ){\n      sqlite3_log(SQLITE_NOMEM, \"failed to HeapCompact (no space), heap=%p\",\n                  (void*)hHeap);\n      rc = SQLITE_NOMEM_BKPT;\n    }else{\n      sqlite3_log(SQLITE_ERROR, \"failed to HeapCompact (%lu), heap=%p\",\n                  osGetLastError(), (void*)hHeap);\n      rc = SQLITE_ERROR;\n    }\n  }\n#else\n  sqlite3_log(SQLITE_NOTFOUND, \"failed to HeapCompact, heap=%p\",\n              (void*)hHeap);\n  rc = SQLITE_NOTFOUND;\n#endif\n  if( pnLargest ) *pnLargest = nLargest;\n  return rc;\n}\n\n/*\n** If a Win32 native heap has been configured, this function will attempt to\n** destroy and recreate it.  If the Win32 native heap is not isolated and/or\n** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will\n** be returned and no changes will be made to the Win32 native heap.\n*/\nSQLITE_API int sqlite3_win32_reset_heap(){\n  int rc;\n  MUTEX_LOGIC( sqlite3_mutex *pMainMtx; ) /* The main static mutex */\n  MUTEX_LOGIC( sqlite3_mutex *pMem; )    /* The memsys static mutex */\n  MUTEX_LOGIC( pMainMtx = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )\n  MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )\n  sqlite3_mutex_enter(pMainMtx);\n  sqlite3_mutex_enter(pMem);\n  winMemAssertMagic();\n  if( winMemGetHeap()!=NULL && winMemGetOwned() && sqlite3_memory_used()==0 ){\n    /*\n    ** At this point, there should be no outstanding memory allocations on\n    ** the heap.  Also, since both the main and memsys locks are currently\n    ** being held by us, no other function (i.e. from another thread) should\n    ** be able to even access the heap.  Attempt to destroy and recreate our\n    ** isolated Win32 native heap now.\n    */\n    assert( winMemGetHeap()!=NULL );\n    assert( winMemGetOwned() );\n    assert( sqlite3_memory_used()==0 );\n    winMemShutdown(winMemGetDataPtr());\n    assert( winMemGetHeap()==NULL );\n    assert( !winMemGetOwned() );\n    assert( sqlite3_memory_used()==0 );\n    rc = winMemInit(winMemGetDataPtr());\n    assert( rc!=SQLITE_OK || winMemGetHeap()!=NULL );\n    assert( rc!=SQLITE_OK || winMemGetOwned() );\n    assert( rc!=SQLITE_OK || sqlite3_memory_used()==0 );\n  }else{\n    /*\n    ** The Win32 native heap cannot be modified because it may be in use.\n    */\n    rc = SQLITE_BUSY;\n  }\n  sqlite3_mutex_leave(pMem);\n  sqlite3_mutex_leave(pMainMtx);\n  return rc;\n}\n#endif /* SQLITE_WIN32_MALLOC */\n\n#ifdef _WIN32\n/*\n** This function outputs the specified (ANSI) string to the Win32 debugger\n** (if available).\n*/\n\nSQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){\n  char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];\n  int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */\n  if( nMin<-1 ) nMin = -1; /* all negative values become -1. */\n  assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zBuf ){\n    (void)SQLITE_MISUSE_BKPT;\n    return;\n  }\n#endif\n#if defined(SQLITE_WIN32_HAS_ANSI)\n  if( nMin>0 ){\n    memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);\n    memcpy(zDbgBuf, zBuf, nMin);\n    osOutputDebugStringA(zDbgBuf);\n  }else{\n    osOutputDebugStringA(zBuf);\n  }\n#elif defined(SQLITE_WIN32_HAS_WIDE)\n  memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);\n  if ( osMultiByteToWideChar(\n          osAreFileApisANSI() ? CP_ACP : CP_OEMCP, 0, zBuf,\n          nMin, (LPWSTR)zDbgBuf, SQLITE_WIN32_DBG_BUF_SIZE/sizeof(WCHAR))<=0 ){\n    return;\n  }\n  osOutputDebugStringW((LPCWSTR)zDbgBuf);\n#else\n  if( nMin>0 ){\n    memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);\n    memcpy(zDbgBuf, zBuf, nMin);\n    fprintf(stderr, \"%s\", zDbgBuf);\n  }else{\n    fprintf(stderr, \"%s\", zBuf);\n  }\n#endif\n}\n#endif /* _WIN32 */\n\n/*\n** The following routine suspends the current thread for at least ms\n** milliseconds.  This is equivalent to the Win32 Sleep() interface.\n*/\n#if SQLITE_OS_WINRT\nstatic HANDLE sleepObj = NULL;\n#endif\n\nSQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){\n#if SQLITE_OS_WINRT\n  if ( sleepObj==NULL ){\n    sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,\n                                SYNCHRONIZE);\n  }\n  assert( sleepObj!=NULL );\n  osWaitForSingleObjectEx(sleepObj, milliseconds, FALSE);\n#else\n  osSleep(milliseconds);\n#endif\n}\n\n#if SQLITE_MAX_WORKER_THREADS>0 && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \\\n        SQLITE_THREADSAFE>0\nSQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject){\n  DWORD rc;\n  while( (rc = osWaitForSingleObjectEx(hObject, INFINITE,\n                                       TRUE))==WAIT_IO_COMPLETION ){}\n  return rc;\n}\n#endif\n\n/*\n** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,\n** or WinCE.  Return false (zero) for Win95, Win98, or WinME.\n**\n** Here is an interesting observation:  Win95, Win98, and WinME lack\n** the LockFileEx() API.  But we can still statically link against that\n** API as long as we don't call it when running Win95/98/ME.  A call to\n** this routine is used to determine if the host is Win95/98/ME or\n** WinNT/2K/XP so that we will know whether or not we can safely call\n** the LockFileEx() API.\n*/\n\n#if !SQLITE_WIN32_GETVERSIONEX\n# define osIsNT()  (1)\n#elif SQLITE_OS_WINCE || SQLITE_OS_WINRT || !defined(SQLITE_WIN32_HAS_ANSI)\n# define osIsNT()  (1)\n#elif !defined(SQLITE_WIN32_HAS_WIDE)\n# define osIsNT()  (0)\n#else\n# define osIsNT()  ((sqlite3_os_type==2) || sqlite3_win32_is_nt())\n#endif\n\n/*\n** This function determines if the machine is running a version of Windows\n** based on the NT kernel.\n*/\nSQLITE_API int sqlite3_win32_is_nt(void){\n#if SQLITE_OS_WINRT\n  /*\n  ** NOTE: The WinRT sub-platform is always assumed to be based on the NT\n  **       kernel.\n  */\n  return 1;\n#elif SQLITE_WIN32_GETVERSIONEX\n  if( osInterlockedCompareExchange(&sqlite3_os_type, 0, 0)==0 ){\n#if defined(SQLITE_WIN32_HAS_ANSI)\n    OSVERSIONINFOA sInfo;\n    sInfo.dwOSVersionInfoSize = sizeof(sInfo);\n    osGetVersionExA(&sInfo);\n    osInterlockedCompareExchange(&sqlite3_os_type,\n        (sInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) ? 2 : 1, 0);\n#elif defined(SQLITE_WIN32_HAS_WIDE)\n    OSVERSIONINFOW sInfo;\n    sInfo.dwOSVersionInfoSize = sizeof(sInfo);\n    osGetVersionExW(&sInfo);\n    osInterlockedCompareExchange(&sqlite3_os_type,\n        (sInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) ? 2 : 1, 0);\n#endif\n  }\n  return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2;\n#elif SQLITE_TEST\n  return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2\n      || osInterlockedCompareExchange(&sqlite3_os_type, 0, 0)==0\n  ;\n#else\n  /*\n  ** NOTE: All sub-platforms where the GetVersionEx[AW] functions are\n  **       deprecated are always assumed to be based on the NT kernel.\n  */\n  return 1;\n#endif\n}\n\n#ifdef SQLITE_WIN32_MALLOC\n/*\n** Allocate nBytes of memory.\n*/\nstatic void *winMemMalloc(int nBytes){\n  HANDLE hHeap;\n  void *p;\n\n  winMemAssertMagic();\n  hHeap = winMemGetHeap();\n  assert( hHeap!=0 );\n  assert( hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(hHeap, SQLITE_WIN32_HEAP_FLAGS, NULL) );\n#endif\n  assert( nBytes>=0 );\n  p = osHeapAlloc(hHeap, SQLITE_WIN32_HEAP_FLAGS, (SIZE_T)nBytes);\n  if( !p ){\n    sqlite3_log(SQLITE_NOMEM, \"failed to HeapAlloc %u bytes (%lu), heap=%p\",\n                nBytes, osGetLastError(), (void*)hHeap);\n  }\n  return p;\n}\n\n/*\n** Free memory.\n*/\nstatic void winMemFree(void *pPrior){\n  HANDLE hHeap;\n\n  winMemAssertMagic();\n  hHeap = winMemGetHeap();\n  assert( hHeap!=0 );\n  assert( hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(hHeap, SQLITE_WIN32_HEAP_FLAGS, pPrior) );\n#endif\n  if( !pPrior ) return; /* Passing NULL to HeapFree is undefined. */\n  if( !osHeapFree(hHeap, SQLITE_WIN32_HEAP_FLAGS, pPrior) ){\n    sqlite3_log(SQLITE_NOMEM, \"failed to HeapFree block %p (%lu), heap=%p\",\n                pPrior, osGetLastError(), (void*)hHeap);\n  }\n}\n\n/*\n** Change the size of an existing memory allocation\n*/\nstatic void *winMemRealloc(void *pPrior, int nBytes){\n  HANDLE hHeap;\n  void *p;\n\n  winMemAssertMagic();\n  hHeap = winMemGetHeap();\n  assert( hHeap!=0 );\n  assert( hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(hHeap, SQLITE_WIN32_HEAP_FLAGS, pPrior) );\n#endif\n  assert( nBytes>=0 );\n  if( !pPrior ){\n    p = osHeapAlloc(hHeap, SQLITE_WIN32_HEAP_FLAGS, (SIZE_T)nBytes);\n  }else{\n    p = osHeapReAlloc(hHeap, SQLITE_WIN32_HEAP_FLAGS, pPrior, (SIZE_T)nBytes);\n  }\n  if( !p ){\n    sqlite3_log(SQLITE_NOMEM, \"failed to %s %u bytes (%lu), heap=%p\",\n                pPrior ? \"HeapReAlloc\" : \"HeapAlloc\", nBytes, osGetLastError(),\n                (void*)hHeap);\n  }\n  return p;\n}\n\n/*\n** Return the size of an outstanding allocation, in bytes.\n*/\nstatic int winMemSize(void *p){\n  HANDLE hHeap;\n  SIZE_T n;\n\n  winMemAssertMagic();\n  hHeap = winMemGetHeap();\n  assert( hHeap!=0 );\n  assert( hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(hHeap, SQLITE_WIN32_HEAP_FLAGS, p) );\n#endif\n  if( !p ) return 0;\n  n = osHeapSize(hHeap, SQLITE_WIN32_HEAP_FLAGS, p);\n  if( n==(SIZE_T)-1 ){\n    sqlite3_log(SQLITE_NOMEM, \"failed to HeapSize block %p (%lu), heap=%p\",\n                p, osGetLastError(), (void*)hHeap);\n    return 0;\n  }\n  return (int)n;\n}\n\n/*\n** Round up a request size to the next valid allocation size.\n*/\nstatic int winMemRoundup(int n){\n  return n;\n}\n\n/*\n** Initialize this module.\n*/\nstatic int winMemInit(void *pAppData){\n  winMemData *pWinMemData = (winMemData *)pAppData;\n\n  if( !pWinMemData ) return SQLITE_ERROR;\n  assert( pWinMemData->magic1==WINMEM_MAGIC1 );\n  assert( pWinMemData->magic2==WINMEM_MAGIC2 );\n\n#if !SQLITE_OS_WINRT && SQLITE_WIN32_HEAP_CREATE\n  if( !pWinMemData->hHeap ){\n    DWORD dwInitialSize = SQLITE_WIN32_HEAP_INIT_SIZE;\n    DWORD dwMaximumSize = (DWORD)sqlite3GlobalConfig.nHeap;\n    if( dwMaximumSize==0 ){\n      dwMaximumSize = SQLITE_WIN32_HEAP_MAX_SIZE;\n    }else if( dwInitialSize>dwMaximumSize ){\n      dwInitialSize = dwMaximumSize;\n    }\n    pWinMemData->hHeap = osHeapCreate(SQLITE_WIN32_HEAP_FLAGS,\n                                      dwInitialSize, dwMaximumSize);\n    if( !pWinMemData->hHeap ){\n      sqlite3_log(SQLITE_NOMEM,\n          \"failed to HeapCreate (%lu), flags=%u, initSize=%lu, maxSize=%lu\",\n          osGetLastError(), SQLITE_WIN32_HEAP_FLAGS, dwInitialSize,\n          dwMaximumSize);\n      return SQLITE_NOMEM_BKPT;\n    }\n    pWinMemData->bOwned = TRUE;\n    assert( pWinMemData->bOwned );\n  }\n#else\n  pWinMemData->hHeap = osGetProcessHeap();\n  if( !pWinMemData->hHeap ){\n    sqlite3_log(SQLITE_NOMEM,\n        \"failed to GetProcessHeap (%lu)\", osGetLastError());\n    return SQLITE_NOMEM_BKPT;\n  }\n  pWinMemData->bOwned = FALSE;\n  assert( !pWinMemData->bOwned );\n#endif\n  assert( pWinMemData->hHeap!=0 );\n  assert( pWinMemData->hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n  assert( osHeapValidate(pWinMemData->hHeap, SQLITE_WIN32_HEAP_FLAGS, NULL) );\n#endif\n  return SQLITE_OK;\n}\n\n/*\n** Deinitialize this module.\n*/\nstatic void winMemShutdown(void *pAppData){\n  winMemData *pWinMemData = (winMemData *)pAppData;\n\n  if( !pWinMemData ) return;\n  assert( pWinMemData->magic1==WINMEM_MAGIC1 );\n  assert( pWinMemData->magic2==WINMEM_MAGIC2 );\n\n  if( pWinMemData->hHeap ){\n    assert( pWinMemData->hHeap!=INVALID_HANDLE_VALUE );\n#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_MALLOC_VALIDATE)\n    assert( osHeapValidate(pWinMemData->hHeap, SQLITE_WIN32_HEAP_FLAGS, NULL) );\n#endif\n    if( pWinMemData->bOwned ){\n      if( !osHeapDestroy(pWinMemData->hHeap) ){\n        sqlite3_log(SQLITE_NOMEM, \"failed to HeapDestroy (%lu), heap=%p\",\n                    osGetLastError(), (void*)pWinMemData->hHeap);\n      }\n      pWinMemData->bOwned = FALSE;\n    }\n    pWinMemData->hHeap = NULL;\n  }\n}\n\n/*\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file. The\n** arguments specify the block of memory to manage.\n**\n** This routine is only called by sqlite3_config(), and therefore\n** is not required to be threadsafe (it is not).\n*/\nSQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetWin32(void){\n  static const sqlite3_mem_methods winMemMethods = {\n    winMemMalloc,\n    winMemFree,\n    winMemRealloc,\n    winMemSize,\n    winMemRoundup,\n    winMemInit,\n    winMemShutdown,\n    &win_mem_data\n  };\n  return &winMemMethods;\n}\n\nSQLITE_PRIVATE void sqlite3MemSetDefault(void){\n  sqlite3_config(SQLITE_CONFIG_MALLOC, sqlite3MemGetWin32());\n}\n#endif /* SQLITE_WIN32_MALLOC */\n\n#ifdef _WIN32\n/*\n** Convert a UTF-8 string to Microsoft Unicode.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic LPWSTR winUtf8ToUnicode(const char *zText){\n  int nChar;\n  LPWSTR zWideText;\n\n  nChar = osMultiByteToWideChar(CP_UTF8, 0, zText, -1, NULL, 0);\n  if( nChar==0 ){\n    return 0;\n  }\n  zWideText = sqlite3MallocZero( nChar*sizeof(WCHAR) );\n  if( zWideText==0 ){\n    return 0;\n  }\n  nChar = osMultiByteToWideChar(CP_UTF8, 0, zText, -1, zWideText,\n                                nChar);\n  if( nChar==0 ){\n    sqlite3_free(zWideText);\n    zWideText = 0;\n  }\n  return zWideText;\n}\n#endif /* _WIN32 */\n\n/*\n** Convert a Microsoft Unicode string to UTF-8.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic char *winUnicodeToUtf8(LPCWSTR zWideText){\n  int nByte;\n  char *zText;\n\n  nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, 0, 0, 0, 0);\n  if( nByte == 0 ){\n    return 0;\n  }\n  zText = sqlite3MallocZero( nByte );\n  if( zText==0 ){\n    return 0;\n  }\n  nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, zText, nByte,\n                                0, 0);\n  if( nByte == 0 ){\n    sqlite3_free(zText);\n    zText = 0;\n  }\n  return zText;\n}\n\n/*\n** Convert an ANSI string to Microsoft Unicode, using the ANSI or OEM\n** code page.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic LPWSTR winMbcsToUnicode(const char *zText, int useAnsi){\n  int nWideChar;\n  LPWSTR zMbcsText;\n  int codepage = useAnsi ? CP_ACP : CP_OEMCP;\n\n  nWideChar = osMultiByteToWideChar(codepage, 0, zText, -1, NULL,\n                                0);\n  if( nWideChar==0 ){\n    return 0;\n  }\n  zMbcsText = sqlite3MallocZero( nWideChar*sizeof(WCHAR) );\n  if( zMbcsText==0 ){\n    return 0;\n  }\n  nWideChar = osMultiByteToWideChar(codepage, 0, zText, -1, zMbcsText,\n                                nWideChar);\n  if( nWideChar==0 ){\n    sqlite3_free(zMbcsText);\n    zMbcsText = 0;\n  }\n  return zMbcsText;\n}\n\n#ifdef _WIN32\n/*\n** Convert a Microsoft Unicode string to a multi-byte character string,\n** using the ANSI or OEM code page.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic char *winUnicodeToMbcs(LPCWSTR zWideText, int useAnsi){\n  int nByte;\n  char *zText;\n  int codepage = useAnsi ? CP_ACP : CP_OEMCP;\n\n  nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, 0, 0, 0, 0);\n  if( nByte == 0 ){\n    return 0;\n  }\n  zText = sqlite3MallocZero( nByte );\n  if( zText==0 ){\n    return 0;\n  }\n  nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, zText,\n                                nByte, 0, 0);\n  if( nByte == 0 ){\n    sqlite3_free(zText);\n    zText = 0;\n  }\n  return zText;\n}\n#endif /* _WIN32 */\n\n/*\n** Convert a multi-byte character string to UTF-8.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic char *winMbcsToUtf8(const char *zText, int useAnsi){\n  char *zTextUtf8;\n  LPWSTR zTmpWide;\n\n  zTmpWide = winMbcsToUnicode(zText, useAnsi);\n  if( zTmpWide==0 ){\n    return 0;\n  }\n  zTextUtf8 = winUnicodeToUtf8(zTmpWide);\n  sqlite3_free(zTmpWide);\n  return zTextUtf8;\n}\n\n#ifdef _WIN32\n/*\n** Convert a UTF-8 string to a multi-byte character string.\n**\n** Space to hold the returned string is obtained from sqlite3_malloc().\n*/\nstatic char *winUtf8ToMbcs(const char *zText, int useAnsi){\n  char *zTextMbcs;\n  LPWSTR zTmpWide;\n\n  zTmpWide = winUtf8ToUnicode(zText);\n  if( zTmpWide==0 ){\n    return 0;\n  }\n  zTextMbcs = winUnicodeToMbcs(zTmpWide, useAnsi);\n  sqlite3_free(zTmpWide);\n  return zTextMbcs;\n}\n\n/*\n** This is a public wrapper for the winUtf8ToUnicode() function.\n*/\nSQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winUtf8ToUnicode(zText);\n}\n\n/*\n** This is a public wrapper for the winUnicodeToUtf8() function.\n*/\nSQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zWideText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winUnicodeToUtf8(zWideText);\n}\n#endif /* _WIN32 */\n\n/*\n** This is a public wrapper for the winMbcsToUtf8() function.\n*/\nSQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winMbcsToUtf8(zText, osAreFileApisANSI());\n}\n\n#ifdef _WIN32\n/*\n** This is a public wrapper for the winMbcsToUtf8() function.\n*/\nSQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winMbcsToUtf8(zText, useAnsi);\n}\n\n/*\n** This is a public wrapper for the winUtf8ToMbcs() function.\n*/\nSQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winUtf8ToMbcs(zText, osAreFileApisANSI());\n}\n\n/*\n** This is a public wrapper for the winUtf8ToMbcs() function.\n*/\nSQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !zText ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize() ) return 0;\n#endif\n  return winUtf8ToMbcs(zText, useAnsi);\n}\n\n/*\n** This function is the same as sqlite3_win32_set_directory (below); however,\n** it accepts a UTF-8 string.\n*/\nSQLITE_API int sqlite3_win32_set_directory8(\n  unsigned long type, /* Identifier for directory being set or reset */\n  const char *zValue  /* New value for directory being set or reset */\n){\n  char **ppDirectory = 0;\n  int rc;\n#ifndef SQLITE_OMIT_AUTOINIT\n  rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  if( type==SQLITE_WIN32_DATA_DIRECTORY_TYPE ){\n    ppDirectory = &sqlite3_data_directory;\n  }else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){\n    ppDirectory = &sqlite3_temp_directory;\n  }\n  assert( !ppDirectory || type==SQLITE_WIN32_DATA_DIRECTORY_TYPE\n          || type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE\n  );\n  assert( !ppDirectory || sqlite3MemdebugHasType(*ppDirectory, MEMTYPE_HEAP) );\n  if( ppDirectory ){\n    char *zCopy = 0;\n    if( zValue && zValue[0] ){\n      zCopy = sqlite3_mprintf(\"%s\", zValue);\n      if ( zCopy==0 ){\n        rc = SQLITE_NOMEM_BKPT;\n        goto set_directory8_done;\n      }\n    }\n    sqlite3_free(*ppDirectory);\n    *ppDirectory = zCopy;\n    rc = SQLITE_OK;\n  }else{\n    rc = SQLITE_ERROR;\n  }\nset_directory8_done:\n  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  return rc;\n}\n\n/*\n** This function is the same as sqlite3_win32_set_directory (below); however,\n** it accepts a UTF-16 string.\n*/\nSQLITE_API int sqlite3_win32_set_directory16(\n  unsigned long type, /* Identifier for directory being set or reset */\n  const void *zValue  /* New value for directory being set or reset */\n){\n  int rc;\n  char *zUtf8 = 0;\n  if( zValue ){\n    zUtf8 = sqlite3_win32_unicode_to_utf8(zValue);\n    if( zUtf8==0 ) return SQLITE_NOMEM_BKPT;\n  }\n  rc = sqlite3_win32_set_directory8(type, zUtf8);\n  if( zUtf8 ) sqlite3_free(zUtf8);\n  return rc;\n}\n\n/*\n** This function sets the data directory or the temporary directory based on\n** the provided arguments.  The type argument must be 1 in order to set the\n** data directory or 2 in order to set the temporary directory.  The zValue\n** argument is the name of the directory to use.  The return value will be\n** SQLITE_OK if successful.\n*/\nSQLITE_API int sqlite3_win32_set_directory(\n  unsigned long type, /* Identifier for directory being set or reset */\n  void *zValue        /* New value for directory being set or reset */\n){\n  return sqlite3_win32_set_directory16(type, zValue);\n}\n#endif /* _WIN32 */\n\n/*\n** The return value of winGetLastErrorMsg\n** is zero if the error message fits in the buffer, or non-zero\n** otherwise (if the message was truncated).\n*/\nstatic int winGetLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){\n  /* FormatMessage returns 0 on failure.  Otherwise it\n  ** returns the number of TCHARs written to the output\n  ** buffer, excluding the terminating null char.\n  */\n  DWORD dwLen = 0;\n  char *zOut = 0;\n\n  if( osIsNT() ){\n#if SQLITE_OS_WINRT\n    WCHAR zTempWide[SQLITE_WIN32_MAX_ERRMSG_CHARS+1];\n    dwLen = osFormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM |\n                             FORMAT_MESSAGE_IGNORE_INSERTS,\n                             NULL,\n                             lastErrno,\n                             0,\n                             zTempWide,\n                             SQLITE_WIN32_MAX_ERRMSG_CHARS,\n                             0);\n#else\n    LPWSTR zTempWide = NULL;\n    dwLen = osFormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |\n                             FORMAT_MESSAGE_FROM_SYSTEM |\n                             FORMAT_MESSAGE_IGNORE_INSERTS,\n                             NULL,\n                             lastErrno,\n                             0,\n                             (LPWSTR) &zTempWide,\n                             0,\n                             0);\n#endif\n    if( dwLen > 0 ){\n      /* allocate a buffer and convert to UTF8 */\n      sqlite3BeginBenignMalloc();\n      zOut = winUnicodeToUtf8(zTempWide);\n      sqlite3EndBenignMalloc();\n#if !SQLITE_OS_WINRT\n      /* free the system buffer allocated by FormatMessage */\n      osLocalFree(zTempWide);\n#endif\n    }\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    char *zTemp = NULL;\n    dwLen = osFormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |\n                             FORMAT_MESSAGE_FROM_SYSTEM |\n                             FORMAT_MESSAGE_IGNORE_INSERTS,\n                             NULL,\n                             lastErrno,\n                             0,\n                             (LPSTR) &zTemp,\n                             0,\n                             0);\n    if( dwLen > 0 ){\n      /* allocate a buffer and convert to UTF8 */\n      sqlite3BeginBenignMalloc();\n      zOut = winMbcsToUtf8(zTemp, osAreFileApisANSI());\n      sqlite3EndBenignMalloc();\n      /* free the system buffer allocated by FormatMessage */\n      osLocalFree(zTemp);\n    }\n  }\n#endif\n  if( 0 == dwLen ){\n    sqlite3_snprintf(nBuf, zBuf, \"OsError 0x%lx (%lu)\", lastErrno, lastErrno);\n  }else{\n    /* copy a maximum of nBuf chars to output buffer */\n    sqlite3_snprintf(nBuf, zBuf, \"%s\", zOut);\n    /* free the UTF8 buffer */\n    sqlite3_free(zOut);\n  }\n  return 0;\n}\n\n/*\n**\n** This function - winLogErrorAtLine() - is only ever called via the macro\n** winLogError().\n**\n** This routine is invoked after an error occurs in an OS function.\n** It logs a message using sqlite3_log() containing the current value of\n** error code and, if possible, the human-readable equivalent from\n** FormatMessage.\n**\n** The first argument passed to the macro should be the error code that\n** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).\n** The two subsequent arguments should be the name of the OS function that\n** failed and the associated file-system path, if any.\n*/\n#define winLogError(a,b,c,d)   winLogErrorAtLine(a,b,c,d,__LINE__)\nstatic int winLogErrorAtLine(\n  int errcode,                    /* SQLite error code */\n  DWORD lastErrno,                /* Win32 last error */\n  const char *zFunc,              /* Name of OS function that failed */\n  const char *zPath,              /* File path associated with error */\n  int iLine                       /* Source line number where error occurred */\n){\n  char zMsg[500];                 /* Human readable error text */\n  int i;                          /* Loop counter */\n\n  zMsg[0] = 0;\n  winGetLastErrorMsg(lastErrno, sizeof(zMsg), zMsg);\n  assert( errcode!=SQLITE_OK );\n  if( zPath==0 ) zPath = \"\";\n  for(i=0; zMsg[i] && zMsg[i]!='\\r' && zMsg[i]!='\\n'; i++){}\n  zMsg[i] = 0;\n  sqlite3_log(errcode,\n      \"os_win.c:%d: (%lu) %s(%s) - %s\",\n      iLine, lastErrno, zFunc, zPath, zMsg\n  );\n\n  return errcode;\n}\n\n/*\n** The number of times that a ReadFile(), WriteFile(), and DeleteFile()\n** will be retried following a locking error - probably caused by\n** antivirus software.  Also the initial delay before the first retry.\n** The delay increases linearly with each retry.\n*/\n#ifndef SQLITE_WIN32_IOERR_RETRY\n# define SQLITE_WIN32_IOERR_RETRY 10\n#endif\n#ifndef SQLITE_WIN32_IOERR_RETRY_DELAY\n# define SQLITE_WIN32_IOERR_RETRY_DELAY 25\n#endif\nstatic int winIoerrRetry = SQLITE_WIN32_IOERR_RETRY;\nstatic int winIoerrRetryDelay = SQLITE_WIN32_IOERR_RETRY_DELAY;\n\n/*\n** The \"winIoerrCanRetry1\" macro is used to determine if a particular I/O\n** error code obtained via GetLastError() is eligible to be retried.  It\n** must accept the error code DWORD as its only argument and should return\n** non-zero if the error code is transient in nature and the operation\n** responsible for generating the original error might succeed upon being\n** retried.  The argument to this macro should be a variable.\n**\n** Additionally, a macro named \"winIoerrCanRetry2\" may be defined.  If it\n** is defined, it will be consulted only when the macro \"winIoerrCanRetry1\"\n** returns zero.  The \"winIoerrCanRetry2\" macro is completely optional and\n** may be used to include additional error codes in the set that should\n** result in the failing I/O operation being retried by the caller.  If\n** defined, the \"winIoerrCanRetry2\" macro must exhibit external semantics\n** identical to those of the \"winIoerrCanRetry1\" macro.\n*/\n#if !defined(winIoerrCanRetry1)\n#define winIoerrCanRetry1(a) (((a)==ERROR_ACCESS_DENIED)        || \\\n                              ((a)==ERROR_SHARING_VIOLATION)    || \\\n                              ((a)==ERROR_LOCK_VIOLATION)       || \\\n                              ((a)==ERROR_DEV_NOT_EXIST)        || \\\n                              ((a)==ERROR_NETNAME_DELETED)      || \\\n                              ((a)==ERROR_SEM_TIMEOUT)          || \\\n                              ((a)==ERROR_NETWORK_UNREACHABLE))\n#endif\n\n/*\n** If a ReadFile() or WriteFile() error occurs, invoke this routine\n** to see if it should be retried.  Return TRUE to retry.  Return FALSE\n** to give up with an error.\n*/\nstatic int winRetryIoerr(int *pnRetry, DWORD *pError){\n  DWORD e = osGetLastError();\n  if( *pnRetry>=winIoerrRetry ){\n    if( pError ){\n      *pError = e;\n    }\n    return 0;\n  }\n  if( winIoerrCanRetry1(e) ){\n    sqlite3_win32_sleep(winIoerrRetryDelay*(1+*pnRetry));\n    ++*pnRetry;\n    return 1;\n  }\n#if defined(winIoerrCanRetry2)\n  else if( winIoerrCanRetry2(e) ){\n    sqlite3_win32_sleep(winIoerrRetryDelay*(1+*pnRetry));\n    ++*pnRetry;\n    return 1;\n  }\n#endif\n  if( pError ){\n    *pError = e;\n  }\n  return 0;\n}\n\n/*\n** Log a I/O error retry episode.\n*/\nstatic void winLogIoerr(int nRetry, int lineno){\n  if( nRetry ){\n    sqlite3_log(SQLITE_NOTICE,\n      \"delayed %dms for lock/sharing conflict at line %d\",\n      winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno\n    );\n  }\n}\n\n/*\n** This #if does not rely on the SQLITE_OS_WINCE define because the\n** corresponding section in \"date.c\" cannot use it.\n*/\n#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \\\n    (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)\n/*\n** The MSVC CRT on Windows CE may not have a localtime() function.\n** So define a substitute.\n*/\n/* #  include <time.h> */\nstruct tm *__cdecl localtime(const time_t *t)\n{\n  static struct tm y;\n  FILETIME uTm, lTm;\n  SYSTEMTIME pTm;\n  sqlite3_int64 t64;\n  t64 = *t;\n  t64 = (t64 + 11644473600)*10000000;\n  uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF);\n  uTm.dwHighDateTime= (DWORD)(t64 >> 32);\n  osFileTimeToLocalFileTime(&uTm,&lTm);\n  osFileTimeToSystemTime(&lTm,&pTm);\n  y.tm_year = pTm.wYear - 1900;\n  y.tm_mon = pTm.wMonth - 1;\n  y.tm_wday = pTm.wDayOfWeek;\n  y.tm_mday = pTm.wDay;\n  y.tm_hour = pTm.wHour;\n  y.tm_min = pTm.wMinute;\n  y.tm_sec = pTm.wSecond;\n  return &y;\n}\n#endif\n\n#if SQLITE_OS_WINCE\n/*************************************************************************\n** This section contains code for WinCE only.\n*/\n#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]\n\n/*\n** Acquire a lock on the handle h\n*/\nstatic void winceMutexAcquire(HANDLE h){\n   DWORD dwErr;\n   do {\n     dwErr = osWaitForSingleObject(h, INFINITE);\n   } while (dwErr != WAIT_OBJECT_0 && dwErr != WAIT_ABANDONED);\n}\n/*\n** Release a lock acquired by winceMutexAcquire()\n*/\n#define winceMutexRelease(h) ReleaseMutex(h)\n\n/*\n** Create the mutex and shared memory used for locking in the file\n** descriptor pFile\n*/\nstatic int winceCreateLock(const char *zFilename, winFile *pFile){\n  LPWSTR zTok;\n  LPWSTR zName;\n  DWORD lastErrno;\n  BOOL bLogged = FALSE;\n  BOOL bInit = TRUE;\n\n  zName = winUtf8ToUnicode(zFilename);\n  if( zName==0 ){\n    /* out of memory */\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n\n  /* Initialize the local lockdata */\n  memset(&pFile->local, 0, sizeof(pFile->local));\n\n  /* Replace the backslashes from the filename and lowercase it\n  ** to derive a mutex name. */\n  zTok = osCharLowerW(zName);\n  for (;*zTok;zTok++){\n    if (*zTok == '\\\\') *zTok = '_';\n  }\n\n  /* Create/open the named mutex */\n  pFile->hMutex = osCreateMutexW(NULL, FALSE, zName);\n  if (!pFile->hMutex){\n    pFile->lastErrno = osGetLastError();\n    sqlite3_free(zName);\n    return winLogError(SQLITE_IOERR, pFile->lastErrno,\n                       \"winceCreateLock1\", zFilename);\n  }\n\n  /* Acquire the mutex before continuing */\n  winceMutexAcquire(pFile->hMutex);\n\n  /* Since the names of named mutexes, semaphores, file mappings etc are\n  ** case-sensitive, take advantage of that by uppercasing the mutex name\n  ** and using that as the shared filemapping name.\n  */\n  osCharUpperW(zName);\n  pFile->hShared = osCreateFileMappingW(INVALID_HANDLE_VALUE, NULL,\n                                        PAGE_READWRITE, 0, sizeof(winceLock),\n                                        zName);\n\n  /* Set a flag that indicates we're the first to create the memory so it\n  ** must be zero-initialized */\n  lastErrno = osGetLastError();\n  if (lastErrno == ERROR_ALREADY_EXISTS){\n    bInit = FALSE;\n  }\n\n  sqlite3_free(zName);\n\n  /* If we succeeded in making the shared memory handle, map it. */\n  if( pFile->hShared ){\n    pFile->shared = (winceLock*)osMapViewOfFile(pFile->hShared,\n             FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, sizeof(winceLock));\n    /* If mapping failed, close the shared memory handle and erase it */\n    if( !pFile->shared ){\n      pFile->lastErrno = osGetLastError();\n      winLogError(SQLITE_IOERR, pFile->lastErrno,\n                  \"winceCreateLock2\", zFilename);\n      bLogged = TRUE;\n      osCloseHandle(pFile->hShared);\n      pFile->hShared = NULL;\n    }\n  }\n\n  /* If shared memory could not be created, then close the mutex and fail */\n  if( pFile->hShared==NULL ){\n    if( !bLogged ){\n      pFile->lastErrno = lastErrno;\n      winLogError(SQLITE_IOERR, pFile->lastErrno,\n                  \"winceCreateLock3\", zFilename);\n      bLogged = TRUE;\n    }\n    winceMutexRelease(pFile->hMutex);\n    osCloseHandle(pFile->hMutex);\n    pFile->hMutex = NULL;\n    return SQLITE_IOERR;\n  }\n\n  /* Initialize the shared memory if we're supposed to */\n  if( bInit ){\n    memset(pFile->shared, 0, sizeof(winceLock));\n  }\n\n  winceMutexRelease(pFile->hMutex);\n  return SQLITE_OK;\n}\n\n/*\n** Destroy the part of winFile that deals with wince locks\n*/\nstatic void winceDestroyLock(winFile *pFile){\n  if (pFile->hMutex){\n    /* Acquire the mutex */\n    winceMutexAcquire(pFile->hMutex);\n\n    /* The following blocks should probably assert in debug mode, but they\n       are to cleanup in case any locks remained open */\n    if (pFile->local.nReaders){\n      pFile->shared->nReaders --;\n    }\n    if (pFile->local.bReserved){\n      pFile->shared->bReserved = FALSE;\n    }\n    if (pFile->local.bPending){\n      pFile->shared->bPending = FALSE;\n    }\n    if (pFile->local.bExclusive){\n      pFile->shared->bExclusive = FALSE;\n    }\n\n    /* De-reference and close our copy of the shared memory handle */\n    osUnmapViewOfFile(pFile->shared);\n    osCloseHandle(pFile->hShared);\n\n    /* Done with the mutex */\n    winceMutexRelease(pFile->hMutex);\n    osCloseHandle(pFile->hMutex);\n    pFile->hMutex = NULL;\n  }\n}\n\n/*\n** An implementation of the LockFile() API of Windows for CE\n*/\nstatic BOOL winceLockFile(\n  LPHANDLE phFile,\n  DWORD dwFileOffsetLow,\n  DWORD dwFileOffsetHigh,\n  DWORD nNumberOfBytesToLockLow,\n  DWORD nNumberOfBytesToLockHigh\n){\n  winFile *pFile = HANDLE_TO_WINFILE(phFile);\n  BOOL bReturn = FALSE;\n\n  UNUSED_PARAMETER(dwFileOffsetHigh);\n  UNUSED_PARAMETER(nNumberOfBytesToLockHigh);\n\n  if (!pFile->hMutex) return TRUE;\n  winceMutexAcquire(pFile->hMutex);\n\n  /* Wanting an exclusive lock? */\n  if (dwFileOffsetLow == (DWORD)SHARED_FIRST\n       && nNumberOfBytesToLockLow == (DWORD)SHARED_SIZE){\n    if (pFile->shared->nReaders == 0 && pFile->shared->bExclusive == 0){\n       pFile->shared->bExclusive = TRUE;\n       pFile->local.bExclusive = TRUE;\n       bReturn = TRUE;\n    }\n  }\n\n  /* Want a read-only lock? */\n  else if (dwFileOffsetLow == (DWORD)SHARED_FIRST &&\n           nNumberOfBytesToLockLow == 1){\n    if (pFile->shared->bExclusive == 0){\n      pFile->local.nReaders ++;\n      if (pFile->local.nReaders == 1){\n        pFile->shared->nReaders ++;\n      }\n      bReturn = TRUE;\n    }\n  }\n\n  /* Want a pending lock? */\n  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE\n           && nNumberOfBytesToLockLow == 1){\n    /* If no pending lock has been acquired, then acquire it */\n    if (pFile->shared->bPending == 0) {\n      pFile->shared->bPending = TRUE;\n      pFile->local.bPending = TRUE;\n      bReturn = TRUE;\n    }\n  }\n\n  /* Want a reserved lock? */\n  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE\n           && nNumberOfBytesToLockLow == 1){\n    if (pFile->shared->bReserved == 0) {\n      pFile->shared->bReserved = TRUE;\n      pFile->local.bReserved = TRUE;\n      bReturn = TRUE;\n    }\n  }\n\n  winceMutexRelease(pFile->hMutex);\n  return bReturn;\n}\n\n/*\n** An implementation of the UnlockFile API of Windows for CE\n*/\nstatic BOOL winceUnlockFile(\n  LPHANDLE phFile,\n  DWORD dwFileOffsetLow,\n  DWORD dwFileOffsetHigh,\n  DWORD nNumberOfBytesToUnlockLow,\n  DWORD nNumberOfBytesToUnlockHigh\n){\n  winFile *pFile = HANDLE_TO_WINFILE(phFile);\n  BOOL bReturn = FALSE;\n\n  UNUSED_PARAMETER(dwFileOffsetHigh);\n  UNUSED_PARAMETER(nNumberOfBytesToUnlockHigh);\n\n  if (!pFile->hMutex) return TRUE;\n  winceMutexAcquire(pFile->hMutex);\n\n  /* Releasing a reader lock or an exclusive lock */\n  if (dwFileOffsetLow == (DWORD)SHARED_FIRST){\n    /* Did we have an exclusive lock? */\n    if (pFile->local.bExclusive){\n      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE);\n      pFile->local.bExclusive = FALSE;\n      pFile->shared->bExclusive = FALSE;\n      bReturn = TRUE;\n    }\n\n    /* Did we just have a reader lock? */\n    else if (pFile->local.nReaders){\n      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE\n             || nNumberOfBytesToUnlockLow == 1);\n      pFile->local.nReaders --;\n      if (pFile->local.nReaders == 0)\n      {\n        pFile->shared->nReaders --;\n      }\n      bReturn = TRUE;\n    }\n  }\n\n  /* Releasing a pending lock */\n  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE\n           && nNumberOfBytesToUnlockLow == 1){\n    if (pFile->local.bPending){\n      pFile->local.bPending = FALSE;\n      pFile->shared->bPending = FALSE;\n      bReturn = TRUE;\n    }\n  }\n  /* Releasing a reserved lock */\n  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE\n           && nNumberOfBytesToUnlockLow == 1){\n    if (pFile->local.bReserved) {\n      pFile->local.bReserved = FALSE;\n      pFile->shared->bReserved = FALSE;\n      bReturn = TRUE;\n    }\n  }\n\n  winceMutexRelease(pFile->hMutex);\n  return bReturn;\n}\n/*\n** End of the special code for wince\n*****************************************************************************/\n#endif /* SQLITE_OS_WINCE */\n\n/*\n** Lock a file region.\n*/\nstatic BOOL winLockFile(\n  LPHANDLE phFile,\n  DWORD flags,\n  DWORD offsetLow,\n  DWORD offsetHigh,\n  DWORD numBytesLow,\n  DWORD numBytesHigh\n){\n#if SQLITE_OS_WINCE\n  /*\n  ** NOTE: Windows CE is handled differently here due its lack of the Win32\n  **       API LockFile.\n  */\n  return winceLockFile(phFile, offsetLow, offsetHigh,\n                       numBytesLow, numBytesHigh);\n#else\n  if( osIsNT() ){\n    OVERLAPPED ovlp;\n    memset(&ovlp, 0, sizeof(OVERLAPPED));\n    ovlp.Offset = offsetLow;\n    ovlp.OffsetHigh = offsetHigh;\n    return osLockFileEx(*phFile, flags, 0, numBytesLow, numBytesHigh, &ovlp);\n#ifdef SQLITE_WIN32_HAS_ANSI\n  }else{\n    return osLockFile(*phFile, offsetLow, offsetHigh, numBytesLow,\n                      numBytesHigh);\n#endif\n  }\n#endif\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Lock a region of nByte bytes starting at offset offset of file hFile.\n** Take an EXCLUSIVE lock if parameter bExclusive is true, or a SHARED lock\n** otherwise. If nMs is greater than zero and the lock cannot be obtained\n** immediately, block for that many ms before giving up.\n**\n** This function returns SQLITE_OK if the lock is obtained successfully. If\n** some other process holds the lock, SQLITE_BUSY is returned if nMs==0, or\n** SQLITE_BUSY_TIMEOUT otherwise. Or, if an error occurs, SQLITE_IOERR.\n*/\nstatic int winHandleLockTimeout(\n  HANDLE hFile,\n  DWORD offset,\n  DWORD nByte,\n  int bExcl,\n  DWORD nMs\n){\n  DWORD flags = LOCKFILE_FAIL_IMMEDIATELY | (bExcl?LOCKFILE_EXCLUSIVE_LOCK:0);\n  int rc = SQLITE_OK;\n  BOOL ret;\n\n  if( !osIsNT() ){\n    ret = winLockFile(&hFile, flags, offset, 0, nByte, 0);\n  }else{\n    OVERLAPPED ovlp;\n    memset(&ovlp, 0, sizeof(OVERLAPPED));\n    ovlp.Offset = offset;\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    if( nMs!=0 ){\n      flags &= ~LOCKFILE_FAIL_IMMEDIATELY;\n    }\n    ovlp.hEvent = osCreateEvent(NULL, TRUE, FALSE, NULL);\n    if( ovlp.hEvent==NULL ){\n      return SQLITE_IOERR_LOCK;\n    }\n#endif\n\n    ret = osLockFileEx(hFile, flags, 0, nByte, 0, &ovlp);\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    /* If SQLITE_ENABLE_SETLK_TIMEOUT is defined, then the file-handle was\n    ** opened with FILE_FLAG_OVERHEAD specified. In this case, the call to\n    ** LockFileEx() may fail because the request is still pending. This can\n    ** happen even if LOCKFILE_FAIL_IMMEDIATELY was specified.\n    **\n    ** If nMs is 0, then LOCKFILE_FAIL_IMMEDIATELY was set in the flags\n    ** passed to LockFileEx(). In this case, if the operation is pending,\n    ** block indefinitely until it is finished.\n    **\n    ** Otherwise, wait for up to nMs ms for the operation to finish. nMs\n    ** may be set to INFINITE.\n    */\n    if( !ret && GetLastError()==ERROR_IO_PENDING ){\n      DWORD nDelay = (nMs==0 ? INFINITE : nMs);\n      DWORD res = osWaitForSingleObject(ovlp.hEvent, nDelay);\n      if( res==WAIT_OBJECT_0 ){\n        ret = TRUE;\n      }else if( res==WAIT_TIMEOUT ){\n#if SQLITE_ENABLE_SETLK_TIMEOUT==1\n        rc = SQLITE_BUSY_TIMEOUT;\n#else\n        rc = SQLITE_BUSY;\n#endif\n      }else{\n        /* Some other error has occurred */\n        rc = SQLITE_IOERR_LOCK;\n      }\n\n      /* If it is still pending, cancel the LockFileEx() call. */\n      osCancelIo(hFile);\n    }\n\n    osCloseHandle(ovlp.hEvent);\n#endif\n  }\n\n  if( rc==SQLITE_OK && !ret ){\n    rc = SQLITE_BUSY;\n  }\n  return rc;\n}\n#endif /* #ifndef SQLITE_OMIT_WAL */\n\n/*\n** Unlock a file region.\n */\nstatic BOOL winUnlockFile(\n  LPHANDLE phFile,\n  DWORD offsetLow,\n  DWORD offsetHigh,\n  DWORD numBytesLow,\n  DWORD numBytesHigh\n){\n#if SQLITE_OS_WINCE\n  /*\n  ** NOTE: Windows CE is handled differently here due its lack of the Win32\n  **       API UnlockFile.\n  */\n  return winceUnlockFile(phFile, offsetLow, offsetHigh,\n                         numBytesLow, numBytesHigh);\n#else\n  if( osIsNT() ){\n    OVERLAPPED ovlp;\n    memset(&ovlp, 0, sizeof(OVERLAPPED));\n    ovlp.Offset = offsetLow;\n    ovlp.OffsetHigh = offsetHigh;\n    return osUnlockFileEx(*phFile, 0, numBytesLow, numBytesHigh, &ovlp);\n#ifdef SQLITE_WIN32_HAS_ANSI\n  }else{\n    return osUnlockFile(*phFile, offsetLow, offsetHigh, numBytesLow,\n                        numBytesHigh);\n#endif\n  }\n#endif\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Remove an nByte lock starting at offset iOff from HANDLE h.\n*/\nstatic int winHandleUnlock(HANDLE h, int iOff, int nByte){\n  BOOL ret = winUnlockFile(&h, iOff, 0, nByte, 0);\n  return (ret ? SQLITE_OK : SQLITE_IOERR_UNLOCK);\n}\n#endif\n\n/*****************************************************************************\n** The next group of routines implement the I/O methods specified\n** by the sqlite3_io_methods object.\n******************************************************************************/\n\n/*\n** Some Microsoft compilers lack this definition.\n*/\n#ifndef INVALID_SET_FILE_POINTER\n# define INVALID_SET_FILE_POINTER ((DWORD)-1)\n#endif\n\n/*\n** Seek the file handle h to offset nByte of the file.\n**\n** If successful, return SQLITE_OK. Or, if an error occurs, return an SQLite\n** error code.\n*/\nstatic int winHandleSeek(HANDLE h, sqlite3_int64 iOffset){\n  int rc = SQLITE_OK;             /* Return value */\n\n#if !SQLITE_OS_WINRT\n  LONG upperBits;                 /* Most sig. 32 bits of new offset */\n  LONG lowerBits;                 /* Least sig. 32 bits of new offset */\n  DWORD dwRet;                    /* Value returned by SetFilePointer() */\n\n  upperBits = (LONG)((iOffset>>32) & 0x7fffffff);\n  lowerBits = (LONG)(iOffset & 0xffffffff);\n\n  dwRet = osSetFilePointer(h, lowerBits, &upperBits, FILE_BEGIN);\n\n  /* API oddity: If successful, SetFilePointer() returns a dword\n  ** containing the lower 32-bits of the new file-offset. Or, if it fails,\n  ** it returns INVALID_SET_FILE_POINTER. However according to MSDN,\n  ** INVALID_SET_FILE_POINTER may also be a valid new offset. So to determine\n  ** whether an error has actually occurred, it is also necessary to call\n  ** GetLastError().  */\n  if( dwRet==INVALID_SET_FILE_POINTER ){\n    DWORD lastErrno = osGetLastError();\n    if( lastErrno!=NO_ERROR ){\n      rc = SQLITE_IOERR_SEEK;\n    }\n  }\n#else\n  /* This implementation works for WinRT. */\n  LARGE_INTEGER x;                /* The new offset */\n  BOOL bRet;                      /* Value returned by SetFilePointerEx() */\n\n  x.QuadPart = iOffset;\n  bRet = osSetFilePointerEx(h, x, 0, FILE_BEGIN);\n\n  if(!bRet){\n    rc = SQLITE_IOERR_SEEK;\n  }\n#endif\n\n  OSTRACE((\"SEEK file=%p, offset=%lld rc=%s\\n\", h, iOffset, sqlite3ErrName(rc)));\n  return rc;\n}\n\n/*\n** Move the current position of the file handle passed as the first\n** argument to offset iOffset within the file. If successful, return 0.\n** Otherwise, set pFile->lastErrno and return non-zero.\n*/\nstatic int winSeekFile(winFile *pFile, sqlite3_int64 iOffset){\n  int rc;\n\n  rc = winHandleSeek(pFile->h, iOffset);\n  if( rc!=SQLITE_OK ){\n    pFile->lastErrno = osGetLastError();\n    winLogError(rc, pFile->lastErrno, \"winSeekFile\", pFile->zPath);\n  }\n  return rc;\n}\n\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/* Forward references to VFS helper methods used for memory mapped files */\nstatic int winMapfile(winFile*, sqlite3_int64);\nstatic int winUnmapfile(winFile*);\n#endif\n\n/*\n** Close a file.\n**\n** It is reported that an attempt to close a handle might sometimes\n** fail.  This is a very unreasonable result, but Windows is notorious\n** for being unreasonable so I do not doubt that it might happen.  If\n** the close fails, we pause for 100 milliseconds and try again.  As\n** many as MX_CLOSE_ATTEMPT attempts to close the handle are made before\n** giving up and returning an error.\n*/\n#define MX_CLOSE_ATTEMPT 3\nstatic int winClose(sqlite3_file *id){\n  int rc, cnt = 0;\n  winFile *pFile = (winFile*)id;\n\n  assert( id!=0 );\n#ifndef SQLITE_OMIT_WAL\n  assert( pFile->pShm==0 );\n#endif\n  assert( pFile->h!=NULL && pFile->h!=INVALID_HANDLE_VALUE );\n  OSTRACE((\"CLOSE pid=%lu, pFile=%p, file=%p\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h));\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  winUnmapfile(pFile);\n#endif\n\n  do{\n    rc = osCloseHandle(pFile->h);\n    /* SimulateIOError( rc=0; cnt=MX_CLOSE_ATTEMPT; ); */\n  }while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (sqlite3_win32_sleep(100), 1) );\n#if SQLITE_OS_WINCE\n#define WINCE_DELETION_ATTEMPTS 3\n  {\n    winVfsAppData *pAppData = (winVfsAppData*)pFile->pVfs->pAppData;\n    if( pAppData==NULL || !pAppData->bNoLock ){\n      winceDestroyLock(pFile);\n    }\n  }\n  if( pFile->zDeleteOnClose ){\n    int cnt = 0;\n    while(\n           osDeleteFileW(pFile->zDeleteOnClose)==0\n        && osGetFileAttributesW(pFile->zDeleteOnClose)!=0xffffffff\n        && cnt++ < WINCE_DELETION_ATTEMPTS\n    ){\n       sqlite3_win32_sleep(100);  /* Wait a little before trying again */\n    }\n    sqlite3_free(pFile->zDeleteOnClose);\n  }\n#endif\n  if( rc ){\n    pFile->h = NULL;\n  }\n  OpenCounter(-1);\n  OSTRACE((\"CLOSE pid=%lu, pFile=%p, file=%p, rc=%s\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h, rc ? \"ok\" : \"failed\"));\n  return rc ? SQLITE_OK\n            : winLogError(SQLITE_IOERR_CLOSE, osGetLastError(),\n                          \"winClose\", pFile->zPath);\n}\n\n/*\n** Read data from a file into a buffer.  Return SQLITE_OK if all\n** bytes were read successfully and SQLITE_IOERR if anything goes\n** wrong.\n*/\nstatic int winRead(\n  sqlite3_file *id,          /* File to read from */\n  void *pBuf,                /* Write content into this buffer */\n  int amt,                   /* Number of bytes to read */\n  sqlite3_int64 offset       /* Begin reading at this offset */\n){\n#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)\n  OVERLAPPED overlapped;          /* The offset for ReadFile. */\n#endif\n  winFile *pFile = (winFile*)id;  /* file handle */\n  DWORD nRead;                    /* Number of bytes actually read from file */\n  int nRetry = 0;                 /* Number of retrys */\n\n  assert( id!=0 );\n  assert( amt>0 );\n  assert( offset>=0 );\n  SimulateIOError(return SQLITE_IOERR_READ);\n  OSTRACE((\"READ pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, \"\n           \"offset=%lld, lock=%d\\n\", osGetCurrentProcessId(), pFile,\n           pFile->h, pBuf, amt, offset, pFile->locktype));\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  /* Deal with as much of this read request as possible by transferring\n  ** data from the memory mapping using memcpy().  */\n  if( offset<pFile->mmapSize ){\n    if( offset+amt <= pFile->mmapSize ){\n      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);\n      OSTRACE((\"READ-MMAP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n               osGetCurrentProcessId(), pFile, pFile->h));\n      return SQLITE_OK;\n    }else{\n      int nCopy = (int)(pFile->mmapSize - offset);\n      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);\n      pBuf = &((u8 *)pBuf)[nCopy];\n      amt -= nCopy;\n      offset += nCopy;\n    }\n  }\n#endif\n\n#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)\n  if( winSeekFile(pFile, offset) ){\n    OSTRACE((\"READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_FULL\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return SQLITE_FULL;\n  }\n  while( !osReadFile(pFile->h, pBuf, amt, &nRead, 0) ){\n#else\n  memset(&overlapped, 0, sizeof(OVERLAPPED));\n  overlapped.Offset = (LONG)(offset & 0xffffffff);\n  overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);\n  while( !osReadFile(pFile->h, pBuf, amt, &nRead, &overlapped) &&\n         osGetLastError()!=ERROR_HANDLE_EOF ){\n#endif\n    DWORD lastErrno;\n    if( winRetryIoerr(&nRetry, &lastErrno) ) continue;\n    pFile->lastErrno = lastErrno;\n    OSTRACE((\"READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_READ\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return winLogError(SQLITE_IOERR_READ, pFile->lastErrno,\n                       \"winRead\", pFile->zPath);\n  }\n  winLogIoerr(nRetry, __LINE__);\n  if( nRead<(DWORD)amt ){\n    /* Unread parts of the buffer must be zero-filled */\n    memset(&((char*)pBuf)[nRead], 0, amt-nRead);\n    OSTRACE((\"READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_SHORT_READ\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return SQLITE_IOERR_SHORT_READ;\n  }\n\n  OSTRACE((\"READ pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h));\n  return SQLITE_OK;\n}\n\n/*\n** Write data from a buffer into a file.  Return SQLITE_OK on success\n** or some other error code on failure.\n*/\nstatic int winWrite(\n  sqlite3_file *id,               /* File to write into */\n  const void *pBuf,               /* The bytes to be written */\n  int amt,                        /* Number of bytes to write */\n  sqlite3_int64 offset            /* Offset into the file to begin writing at */\n){\n  int rc = 0;                     /* True if error has occurred, else false */\n  winFile *pFile = (winFile*)id;  /* File handle */\n  int nRetry = 0;                 /* Number of retries */\n\n  assert( amt>0 );\n  assert( pFile );\n  SimulateIOError(return SQLITE_IOERR_WRITE);\n  SimulateDiskfullError(return SQLITE_FULL);\n\n  OSTRACE((\"WRITE pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, \"\n           \"offset=%lld, lock=%d\\n\", osGetCurrentProcessId(), pFile,\n           pFile->h, pBuf, amt, offset, pFile->locktype));\n\n#if defined(SQLITE_MMAP_READWRITE) && SQLITE_MAX_MMAP_SIZE>0\n  /* Deal with as much of this write request as possible by transferring\n  ** data from the memory mapping using memcpy().  */\n  if( offset<pFile->mmapSize ){\n    if( offset+amt <= pFile->mmapSize ){\n      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);\n      OSTRACE((\"WRITE-MMAP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n               osGetCurrentProcessId(), pFile, pFile->h));\n      return SQLITE_OK;\n    }else{\n      int nCopy = (int)(pFile->mmapSize - offset);\n      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);\n      pBuf = &((u8 *)pBuf)[nCopy];\n      amt -= nCopy;\n      offset += nCopy;\n    }\n  }\n#endif\n\n#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)\n  rc = winSeekFile(pFile, offset);\n  if( rc==0 ){\n#else\n  {\n#endif\n#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)\n    OVERLAPPED overlapped;        /* The offset for WriteFile. */\n#endif\n    u8 *aRem = (u8 *)pBuf;        /* Data yet to be written */\n    int nRem = amt;               /* Number of bytes yet to be written */\n    DWORD nWrite;                 /* Bytes written by each WriteFile() call */\n    DWORD lastErrno = NO_ERROR;   /* Value returned by GetLastError() */\n\n#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)\n    memset(&overlapped, 0, sizeof(OVERLAPPED));\n    overlapped.Offset = (LONG)(offset & 0xffffffff);\n    overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);\n#endif\n\n    while( nRem>0 ){\n#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)\n      if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, 0) ){\n#else\n      if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, &overlapped) ){\n#endif\n        if( winRetryIoerr(&nRetry, &lastErrno) ) continue;\n        break;\n      }\n      assert( nWrite==0 || nWrite<=(DWORD)nRem );\n      if( nWrite==0 || nWrite>(DWORD)nRem ){\n        lastErrno = osGetLastError();\n        break;\n      }\n#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)\n      offset += nWrite;\n      overlapped.Offset = (LONG)(offset & 0xffffffff);\n      overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);\n#endif\n      aRem += nWrite;\n      nRem -= nWrite;\n    }\n    if( nRem>0 ){\n      pFile->lastErrno = lastErrno;\n      rc = 1;\n    }\n  }\n\n  if( rc ){\n    if(   ( pFile->lastErrno==ERROR_HANDLE_DISK_FULL )\n       || ( pFile->lastErrno==ERROR_DISK_FULL )){\n      OSTRACE((\"WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_FULL\\n\",\n               osGetCurrentProcessId(), pFile, pFile->h));\n      return winLogError(SQLITE_FULL, pFile->lastErrno,\n                         \"winWrite1\", pFile->zPath);\n    }\n    OSTRACE((\"WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_WRITE\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return winLogError(SQLITE_IOERR_WRITE, pFile->lastErrno,\n                       \"winWrite2\", pFile->zPath);\n  }else{\n    winLogIoerr(nRetry, __LINE__);\n  }\n  OSTRACE((\"WRITE pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h));\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Truncate the file opened by handle h to nByte bytes in size.\n*/\nstatic int winHandleTruncate(HANDLE h, sqlite3_int64 nByte){\n  int rc = SQLITE_OK;             /* Return code */\n  rc = winHandleSeek(h, nByte);\n  if( rc==SQLITE_OK ){\n    if( 0==osSetEndOfFile(h) ){\n      rc = SQLITE_IOERR_TRUNCATE;\n    }\n  }\n  return rc;\n}\n\n/*\n** Determine the size in bytes of the file opened by the handle passed as\n** the first argument.\n*/\nstatic int winHandleSize(HANDLE h, sqlite3_int64 *pnByte){\n  int rc = SQLITE_OK;\n\n#if SQLITE_OS_WINRT\n  FILE_STANDARD_INFO info;\n  BOOL b;\n  b = osGetFileInformationByHandleEx(h, FileStandardInfo, &info, sizeof(info));\n  if( b ){\n    *pnByte = info.EndOfFile.QuadPart;\n  }else{\n    rc = SQLITE_IOERR_FSTAT;\n  }\n#else\n  DWORD upperBits = 0;\n  DWORD lowerBits = 0;\n\n  assert( pnByte );\n  lowerBits = osGetFileSize(h, &upperBits);\n  *pnByte = (((sqlite3_int64)upperBits)<<32) + lowerBits;\n  if( lowerBits==INVALID_FILE_SIZE && osGetLastError()!=NO_ERROR ){\n    rc = SQLITE_IOERR_FSTAT;\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** Close the handle passed as the only argument.\n*/\nstatic void winHandleClose(HANDLE h){\n  if( h!=INVALID_HANDLE_VALUE ){\n    osCloseHandle(h);\n  }\n}\n#endif /* #ifndef SQLITE_OMIT_WAL */\n\n/*\n** Truncate an open file to a specified size\n*/\nstatic int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){\n  winFile *pFile = (winFile*)id;  /* File handle object */\n  int rc = SQLITE_OK;             /* Return code for this function */\n  DWORD lastErrno;\n#if SQLITE_MAX_MMAP_SIZE>0\n  sqlite3_int64 oldMmapSize;\n  if( pFile->nFetchOut>0 ){\n    /* File truncation is a no-op if there are outstanding memory mapped\n    ** pages.  This is because truncating the file means temporarily unmapping\n    ** the file, and that might delete memory out from under existing cursors.\n    **\n    ** This can result in incremental vacuum not truncating the file,\n    ** if there is an active read cursor when the incremental vacuum occurs.\n    ** No real harm comes of this - the database file is not corrupted,\n    ** though some folks might complain that the file is bigger than it\n    ** needs to be.\n    **\n    ** The only feasible work-around is to defer the truncation until after\n    ** all references to memory-mapped content are closed.  That is doable,\n    ** but involves adding a few branches in the common write code path which\n    ** could slow down normal operations slightly.  Hence, we have decided for\n    ** now to simply make transactions a no-op if there are pending reads.  We\n    ** can maybe revisit this decision in the future.\n    */\n    return SQLITE_OK;\n  }\n#endif\n\n  assert( pFile );\n  SimulateIOError(return SQLITE_IOERR_TRUNCATE);\n  OSTRACE((\"TRUNCATE pid=%lu, pFile=%p, file=%p, size=%lld, lock=%d\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h, nByte, pFile->locktype));\n\n  /* If the user has configured a chunk-size for this file, truncate the\n  ** file so that it consists of an integer number of chunks (i.e. the\n  ** actual file size after the operation may be larger than the requested\n  ** size).\n  */\n  if( pFile->szChunk>0 ){\n    nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;\n  }\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( pFile->pMapRegion ){\n    oldMmapSize = pFile->mmapSize;\n  }else{\n    oldMmapSize = 0;\n  }\n  winUnmapfile(pFile);\n#endif\n\n  /* SetEndOfFile() returns non-zero when successful, or zero when it fails. */\n  if( winSeekFile(pFile, nByte) ){\n    rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,\n                     \"winTruncate1\", pFile->zPath);\n  }else if( 0==osSetEndOfFile(pFile->h) &&\n            ((lastErrno = osGetLastError())!=ERROR_USER_MAPPED_FILE) ){\n    pFile->lastErrno = lastErrno;\n    rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,\n                     \"winTruncate2\", pFile->zPath);\n  }\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( rc==SQLITE_OK && oldMmapSize>0 ){\n    if( oldMmapSize>nByte ){\n      winMapfile(pFile, -1);\n    }else{\n      winMapfile(pFile, oldMmapSize);\n    }\n  }\n#endif\n\n  OSTRACE((\"TRUNCATE pid=%lu, pFile=%p, file=%p, rc=%s\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h, sqlite3ErrName(rc)));\n  return rc;\n}\n\n#ifdef SQLITE_TEST\n/*\n** Count the number of fullsyncs and normal syncs.  This is used to test\n** that syncs and fullsyncs are occurring at the right times.\n*/\nSQLITE_API int sqlite3_sync_count = 0;\nSQLITE_API int sqlite3_fullsync_count = 0;\n#endif\n\n/*\n** Make sure all writes to a particular file are committed to disk.\n*/\nstatic int winSync(sqlite3_file *id, int flags){\n#ifndef SQLITE_NO_SYNC\n  /*\n  ** Used only when SQLITE_NO_SYNC is not defined.\n   */\n  BOOL rc;\n#endif\n#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \\\n    defined(SQLITE_HAVE_OS_TRACE)\n  /*\n  ** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or\n  ** OSTRACE() macros.\n   */\n  winFile *pFile = (winFile*)id;\n#else\n  UNUSED_PARAMETER(id);\n#endif\n\n  assert( pFile );\n  /* Check that one of SQLITE_SYNC_NORMAL or FULL was passed */\n  assert((flags&0x0F)==SQLITE_SYNC_NORMAL\n      || (flags&0x0F)==SQLITE_SYNC_FULL\n  );\n\n  /* Unix cannot, but some systems may return SQLITE_FULL from here. This\n  ** line is to test that doing so does not cause any problems.\n  */\n  SimulateDiskfullError( return SQLITE_FULL );\n\n  OSTRACE((\"SYNC pid=%lu, pFile=%p, file=%p, flags=%x, lock=%d\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h, flags,\n           pFile->locktype));\n\n#ifndef SQLITE_TEST\n  UNUSED_PARAMETER(flags);\n#else\n  if( (flags&0x0F)==SQLITE_SYNC_FULL ){\n    sqlite3_fullsync_count++;\n  }\n  sqlite3_sync_count++;\n#endif\n\n  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a\n  ** no-op\n  */\n#ifdef SQLITE_NO_SYNC\n  OSTRACE((\"SYNC-NOP pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), pFile, pFile->h));\n  return SQLITE_OK;\n#else\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( pFile->pMapRegion ){\n    if( osFlushViewOfFile(pFile->pMapRegion, 0) ){\n      OSTRACE((\"SYNC-MMAP pid=%lu, pFile=%p, pMapRegion=%p, \"\n               \"rc=SQLITE_OK\\n\", osGetCurrentProcessId(),\n               pFile, pFile->pMapRegion));\n    }else{\n      pFile->lastErrno = osGetLastError();\n      OSTRACE((\"SYNC-MMAP pid=%lu, pFile=%p, pMapRegion=%p, \"\n               \"rc=SQLITE_IOERR_MMAP\\n\", osGetCurrentProcessId(),\n               pFile, pFile->pMapRegion));\n      return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,\n                         \"winSync1\", pFile->zPath);\n    }\n  }\n#endif\n  rc = osFlushFileBuffers(pFile->h);\n  SimulateIOError( rc=FALSE );\n  if( rc ){\n    OSTRACE((\"SYNC pid=%lu, pFile=%p, file=%p, rc=SQLITE_OK\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return SQLITE_OK;\n  }else{\n    pFile->lastErrno = osGetLastError();\n    OSTRACE((\"SYNC pid=%lu, pFile=%p, file=%p, rc=SQLITE_IOERR_FSYNC\\n\",\n             osGetCurrentProcessId(), pFile, pFile->h));\n    return winLogError(SQLITE_IOERR_FSYNC, pFile->lastErrno,\n                       \"winSync2\", pFile->zPath);\n  }\n#endif\n}\n\n/*\n** Determine the current size of a file in bytes\n*/\nstatic int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){\n  winFile *pFile = (winFile*)id;\n  int rc = SQLITE_OK;\n\n  assert( id!=0 );\n  assert( pSize!=0 );\n  SimulateIOError(return SQLITE_IOERR_FSTAT);\n  OSTRACE((\"SIZE file=%p, pSize=%p\\n\", pFile->h, pSize));\n\n#if SQLITE_OS_WINRT\n  {\n    FILE_STANDARD_INFO info;\n    if( osGetFileInformationByHandleEx(pFile->h, FileStandardInfo,\n                                     &info, sizeof(info)) ){\n      *pSize = info.EndOfFile.QuadPart;\n    }else{\n      pFile->lastErrno = osGetLastError();\n      rc = winLogError(SQLITE_IOERR_FSTAT, pFile->lastErrno,\n                       \"winFileSize\", pFile->zPath);\n    }\n  }\n#else\n  {\n    DWORD upperBits;\n    DWORD lowerBits;\n    DWORD lastErrno;\n\n    lowerBits = osGetFileSize(pFile->h, &upperBits);\n    *pSize = (((sqlite3_int64)upperBits)<<32) + lowerBits;\n    if(   (lowerBits == INVALID_FILE_SIZE)\n       && ((lastErrno = osGetLastError())!=NO_ERROR) ){\n      pFile->lastErrno = lastErrno;\n      rc = winLogError(SQLITE_IOERR_FSTAT, pFile->lastErrno,\n                       \"winFileSize\", pFile->zPath);\n    }\n  }\n#endif\n  OSTRACE((\"SIZE file=%p, pSize=%p, *pSize=%lld, rc=%s\\n\",\n           pFile->h, pSize, *pSize, sqlite3ErrName(rc)));\n  return rc;\n}\n\n/*\n** LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems.\n*/\n#ifndef LOCKFILE_FAIL_IMMEDIATELY\n# define LOCKFILE_FAIL_IMMEDIATELY 1\n#endif\n\n#ifndef LOCKFILE_EXCLUSIVE_LOCK\n# define LOCKFILE_EXCLUSIVE_LOCK 2\n#endif\n\n/*\n** Historically, SQLite has used both the LockFile and LockFileEx functions.\n** When the LockFile function was used, it was always expected to fail\n** immediately if the lock could not be obtained.  Also, it always expected to\n** obtain an exclusive lock.  These flags are used with the LockFileEx function\n** and reflect those expectations; therefore, they should not be changed.\n*/\n#ifndef SQLITE_LOCKFILE_FLAGS\n# define SQLITE_LOCKFILE_FLAGS   (LOCKFILE_FAIL_IMMEDIATELY | \\\n                                  LOCKFILE_EXCLUSIVE_LOCK)\n#endif\n\n/*\n** Currently, SQLite never calls the LockFileEx function without wanting the\n** call to fail immediately if the lock cannot be obtained.\n*/\n#ifndef SQLITE_LOCKFILEEX_FLAGS\n# define SQLITE_LOCKFILEEX_FLAGS (LOCKFILE_FAIL_IMMEDIATELY)\n#endif\n\n/*\n** Acquire a reader lock.\n** Different API routines are called depending on whether or not this\n** is Win9x or WinNT.\n*/\nstatic int winGetReadLock(winFile *pFile, int bBlock){\n  int res;\n  DWORD mask = ~(bBlock ? LOCKFILE_FAIL_IMMEDIATELY : 0);\n  OSTRACE((\"READ-LOCK file=%p, lock=%d\\n\", pFile->h, pFile->locktype));\n  if( osIsNT() ){\n#if SQLITE_OS_WINCE\n    /*\n    ** NOTE: Windows CE is handled differently here due its lack of the Win32\n    **       API LockFileEx.\n    */\n    res = winceLockFile(&pFile->h, SHARED_FIRST, 0, 1, 0);\n#else\n    res = winLockFile(&pFile->h, SQLITE_LOCKFILEEX_FLAGS&mask, SHARED_FIRST, 0,\n                      SHARED_SIZE, 0);\n#endif\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    int lk;\n    sqlite3_randomness(sizeof(lk), &lk);\n    pFile->sharedLockByte = (short)((lk & 0x7fffffff)%(SHARED_SIZE - 1));\n    res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS&mask,\n                      SHARED_FIRST+pFile->sharedLockByte, 0, 1, 0);\n  }\n#endif\n  if( res == 0 ){\n    pFile->lastErrno = osGetLastError();\n    /* No need to log a failure to lock */\n  }\n  OSTRACE((\"READ-LOCK file=%p, result=%d\\n\", pFile->h, res));\n  return res;\n}\n\n/*\n** Undo a readlock\n*/\nstatic int winUnlockReadLock(winFile *pFile){\n  int res;\n  DWORD lastErrno;\n  OSTRACE((\"READ-UNLOCK file=%p, lock=%d\\n\", pFile->h, pFile->locktype));\n  if( osIsNT() ){\n    res = winUnlockFile(&pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    res = winUnlockFile(&pFile->h, SHARED_FIRST+pFile->sharedLockByte, 0, 1, 0);\n  }\n#endif\n  if( res==0 && ((lastErrno = osGetLastError())!=ERROR_NOT_LOCKED) ){\n    pFile->lastErrno = lastErrno;\n    winLogError(SQLITE_IOERR_UNLOCK, pFile->lastErrno,\n                \"winUnlockReadLock\", pFile->zPath);\n  }\n  OSTRACE((\"READ-UNLOCK file=%p, result=%d\\n\", pFile->h, res));\n  return res;\n}\n\n/*\n** Lock the file with the lock specified by parameter locktype - one\n** of the following:\n**\n**     (1) SHARED_LOCK\n**     (2) RESERVED_LOCK\n**     (3) PENDING_LOCK\n**     (4) EXCLUSIVE_LOCK\n**\n** Sometimes when requesting one lock state, additional lock states\n** are inserted in between.  The locking might fail on one of the later\n** transitions leaving the lock state different from what it started but\n** still short of its goal.  The following chart shows the allowed\n** transitions and the inserted intermediate states:\n**\n**    UNLOCKED -> SHARED\n**    SHARED -> RESERVED\n**    SHARED -> (PENDING) -> EXCLUSIVE\n**    RESERVED -> (PENDING) -> EXCLUSIVE\n**    PENDING -> EXCLUSIVE\n**\n** This routine will only increase a lock.  The winUnlock() routine\n** erases all locks at once and returns us immediately to locking level 0.\n** It is not possible to lower the locking level one step at a time.  You\n** must go straight to locking level 0.\n*/\nstatic int winLock(sqlite3_file *id, int locktype){\n  int rc = SQLITE_OK;    /* Return code from subroutines */\n  int res = 1;           /* Result of a Windows lock call */\n  int newLocktype;       /* Set pFile->locktype to this value before exiting */\n  int gotPendingLock = 0;/* True if we acquired a PENDING lock this time */\n  winFile *pFile = (winFile*)id;\n  DWORD lastErrno = NO_ERROR;\n\n  assert( id!=0 );\n  OSTRACE((\"LOCK file=%p, oldLock=%d(%d), newLock=%d\\n\",\n           pFile->h, pFile->locktype, pFile->sharedLockByte, locktype));\n\n  /* If there is already a lock of this type or more restrictive on the\n  ** OsFile, do nothing. Don't use the end_lock: exit path, as\n  ** sqlite3OsEnterMutex() hasn't been called yet.\n  */\n  if( pFile->locktype>=locktype ){\n    OSTRACE((\"LOCK-HELD file=%p, rc=SQLITE_OK\\n\", pFile->h));\n    return SQLITE_OK;\n  }\n\n  /* Do not allow any kind of write-lock on a read-only database\n  */\n  if( (pFile->ctrlFlags & WINFILE_RDONLY)!=0 && locktype>=RESERVED_LOCK ){\n    return SQLITE_IOERR_LOCK;\n  }\n\n  /* Make sure the locking sequence is correct\n  */\n  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );\n  assert( locktype!=PENDING_LOCK );\n  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );\n\n  /* Lock the PENDING_LOCK byte if we need to acquire an EXCLUSIVE lock or\n  ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of\n  ** the PENDING_LOCK byte is temporary.\n  */\n  newLocktype = pFile->locktype;\n  if( locktype==SHARED_LOCK\n   || (locktype==EXCLUSIVE_LOCK && pFile->locktype==RESERVED_LOCK)\n  ){\n    int cnt = 3;\n\n    /* Flags for the LockFileEx() call. This should be an exclusive lock if\n    ** this call is to obtain EXCLUSIVE, or a shared lock if this call is to\n    ** obtain SHARED.  */\n    int flags = LOCKFILE_FAIL_IMMEDIATELY;\n    if( locktype==EXCLUSIVE_LOCK ){\n      flags |= LOCKFILE_EXCLUSIVE_LOCK;\n    }\n    while( cnt>0 ){\n      /* Try 3 times to get the pending lock.  This is needed to work\n      ** around problems caused by indexing and/or anti-virus software on\n      ** Windows systems.\n      **\n      ** If you are using this code as a model for alternative VFSes, do not\n      ** copy this retry logic.  It is a hack intended for Windows only.  */\n      res = winLockFile(&pFile->h, flags, PENDING_BYTE, 0, 1, 0);\n      if( res ) break;\n\n      lastErrno = osGetLastError();\n      OSTRACE((\"LOCK-PENDING-FAIL file=%p, count=%d, result=%d\\n\",\n            pFile->h, cnt, res\n      ));\n\n      if( lastErrno==ERROR_INVALID_HANDLE ){\n        pFile->lastErrno = lastErrno;\n        rc = SQLITE_IOERR_LOCK;\n        OSTRACE((\"LOCK-FAIL file=%p, count=%d, rc=%s\\n\",\n              pFile->h, cnt, sqlite3ErrName(rc)\n        ));\n        return rc;\n      }\n\n      cnt--;\n      if( cnt>0 ) sqlite3_win32_sleep(1);\n    }\n    gotPendingLock = res;\n  }\n\n  /* Acquire a shared lock\n  */\n  if( locktype==SHARED_LOCK && res ){\n    assert( pFile->locktype==NO_LOCK );\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    res = winGetReadLock(pFile, pFile->bBlockOnConnect);\n#else\n    res = winGetReadLock(pFile, 0);\n#endif\n    if( res ){\n      newLocktype = SHARED_LOCK;\n    }else{\n      lastErrno = osGetLastError();\n    }\n  }\n\n  /* Acquire a RESERVED lock\n  */\n  if( locktype==RESERVED_LOCK && res ){\n    assert( pFile->locktype==SHARED_LOCK );\n    res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, RESERVED_BYTE, 0, 1, 0);\n    if( res ){\n      newLocktype = RESERVED_LOCK;\n    }else{\n      lastErrno = osGetLastError();\n    }\n  }\n\n  /* Acquire a PENDING lock\n  */\n  if( locktype==EXCLUSIVE_LOCK && res ){\n    newLocktype = PENDING_LOCK;\n    gotPendingLock = 0;\n  }\n\n  /* Acquire an EXCLUSIVE lock\n  */\n  if( locktype==EXCLUSIVE_LOCK && res ){\n    assert( pFile->locktype>=SHARED_LOCK );\n    (void)winUnlockReadLock(pFile);\n    res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, SHARED_FIRST, 0,\n                      SHARED_SIZE, 0);\n    if( res ){\n      newLocktype = EXCLUSIVE_LOCK;\n    }else{\n      lastErrno = osGetLastError();\n      winGetReadLock(pFile, 0);\n    }\n  }\n\n  /* If we are holding a PENDING lock that ought to be released, then\n  ** release it now.\n  */\n  if( gotPendingLock && locktype==SHARED_LOCK ){\n    winUnlockFile(&pFile->h, PENDING_BYTE, 0, 1, 0);\n  }\n\n  /* Update the state of the lock has held in the file descriptor then\n  ** return the appropriate result code.\n  */\n  if( res ){\n    rc = SQLITE_OK;\n  }else{\n    pFile->lastErrno = lastErrno;\n    rc = SQLITE_BUSY;\n    OSTRACE((\"LOCK-FAIL file=%p, wanted=%d, got=%d\\n\",\n             pFile->h, locktype, newLocktype));\n  }\n  pFile->locktype = (u8)newLocktype;\n  OSTRACE((\"LOCK file=%p, lock=%d, rc=%s\\n\",\n           pFile->h, pFile->locktype, sqlite3ErrName(rc)));\n  return rc;\n}\n\n/*\n** This routine checks if there is a RESERVED lock held on the specified\n** file by this or any other process. If such a lock is held, return\n** non-zero, otherwise zero.\n*/\nstatic int winCheckReservedLock(sqlite3_file *id, int *pResOut){\n  int res;\n  winFile *pFile = (winFile*)id;\n\n  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );\n  OSTRACE((\"TEST-WR-LOCK file=%p, pResOut=%p\\n\", pFile->h, pResOut));\n\n  assert( id!=0 );\n  if( pFile->locktype>=RESERVED_LOCK ){\n    res = 1;\n    OSTRACE((\"TEST-WR-LOCK file=%p, result=%d (local)\\n\", pFile->h, res));\n  }else{\n    res = winLockFile(&pFile->h, SQLITE_LOCKFILEEX_FLAGS,RESERVED_BYTE,0,1,0);\n    if( res ){\n      winUnlockFile(&pFile->h, RESERVED_BYTE, 0, 1, 0);\n    }\n    res = !res;\n    OSTRACE((\"TEST-WR-LOCK file=%p, result=%d (remote)\\n\", pFile->h, res));\n  }\n  *pResOut = res;\n  OSTRACE((\"TEST-WR-LOCK file=%p, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\\n\",\n           pFile->h, pResOut, *pResOut));\n  return SQLITE_OK;\n}\n\n/*\n** Lower the locking level on file descriptor id to locktype.  locktype\n** must be either NO_LOCK or SHARED_LOCK.\n**\n** If the locking level of the file descriptor is already at or below\n** the requested locking level, this routine is a no-op.\n**\n** It is not possible for this routine to fail if the second argument\n** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine\n** might return SQLITE_IOERR;\n*/\nstatic int winUnlock(sqlite3_file *id, int locktype){\n  int type;\n  winFile *pFile = (winFile*)id;\n  int rc = SQLITE_OK;\n  assert( pFile!=0 );\n  assert( locktype<=SHARED_LOCK );\n  OSTRACE((\"UNLOCK file=%p, oldLock=%d(%d), newLock=%d\\n\",\n           pFile->h, pFile->locktype, pFile->sharedLockByte, locktype));\n  type = pFile->locktype;\n  if( type>=EXCLUSIVE_LOCK ){\n    winUnlockFile(&pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);\n    if( locktype==SHARED_LOCK && !winGetReadLock(pFile, 0) ){\n      /* This should never happen.  We should always be able to\n      ** reacquire the read lock */\n      rc = winLogError(SQLITE_IOERR_UNLOCK, osGetLastError(),\n                       \"winUnlock\", pFile->zPath);\n    }\n  }\n  if( type>=RESERVED_LOCK ){\n    winUnlockFile(&pFile->h, RESERVED_BYTE, 0, 1, 0);\n  }\n  if( locktype==NO_LOCK && type>=SHARED_LOCK ){\n    winUnlockReadLock(pFile);\n  }\n  if( type>=PENDING_LOCK ){\n    winUnlockFile(&pFile->h, PENDING_BYTE, 0, 1, 0);\n  }\n  pFile->locktype = (u8)locktype;\n  OSTRACE((\"UNLOCK file=%p, lock=%d, rc=%s\\n\",\n           pFile->h, pFile->locktype, sqlite3ErrName(rc)));\n  return rc;\n}\n\n/******************************************************************************\n****************************** No-op Locking **********************************\n**\n** Of the various locking implementations available, this is by far the\n** simplest:  locking is ignored.  No attempt is made to lock the database\n** file for reading or writing.\n**\n** This locking mode is appropriate for use on read-only databases\n** (ex: databases that are burned into CD-ROM, for example.)  It can\n** also be used if the application employs some external mechanism to\n** prevent simultaneous access of the same database by two or more\n** database connections.  But there is a serious risk of database\n** corruption if this locking mode is used in situations where multiple\n** database connections are accessing the same database file at the same\n** time and one or more of those connections are writing.\n*/\n\nstatic int winNolockLock(sqlite3_file *id, int locktype){\n  UNUSED_PARAMETER(id);\n  UNUSED_PARAMETER(locktype);\n  return SQLITE_OK;\n}\n\nstatic int winNolockCheckReservedLock(sqlite3_file *id, int *pResOut){\n  UNUSED_PARAMETER(id);\n  UNUSED_PARAMETER(pResOut);\n  return SQLITE_OK;\n}\n\nstatic int winNolockUnlock(sqlite3_file *id, int locktype){\n  UNUSED_PARAMETER(id);\n  UNUSED_PARAMETER(locktype);\n  return SQLITE_OK;\n}\n\n/******************* End of the no-op lock implementation *********************\n******************************************************************************/\n\n/*\n** If *pArg is initially negative then this is a query.  Set *pArg to\n** 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.\n**\n** If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags.\n*/\nstatic void winModeBit(winFile *pFile, unsigned char mask, int *pArg){\n  if( *pArg<0 ){\n    *pArg = (pFile->ctrlFlags & mask)!=0;\n  }else if( (*pArg)==0 ){\n    pFile->ctrlFlags &= ~mask;\n  }else{\n    pFile->ctrlFlags |= mask;\n  }\n}\n\n/* Forward references to VFS helper methods used for temporary files */\nstatic int winGetTempname(sqlite3_vfs *, char **);\nstatic int winIsDir(const void *);\nstatic BOOL winIsLongPathPrefix(const char *);\nstatic BOOL winIsDriveLetterAndColon(const char *);\n\n/*\n** Control and query of the open file handle.\n*/\nstatic int winFileControl(sqlite3_file *id, int op, void *pArg){\n  winFile *pFile = (winFile*)id;\n  OSTRACE((\"FCNTL file=%p, op=%d, pArg=%p\\n\", pFile->h, op, pArg));\n  switch( op ){\n    case SQLITE_FCNTL_LOCKSTATE: {\n      *(int*)pArg = pFile->locktype;\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_LAST_ERRNO: {\n      *(int*)pArg = (int)pFile->lastErrno;\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_CHUNK_SIZE: {\n      pFile->szChunk = *(int *)pArg;\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_SIZE_HINT: {\n      if( pFile->szChunk>0 ){\n        sqlite3_int64 oldSz;\n        int rc = winFileSize(id, &oldSz);\n        if( rc==SQLITE_OK ){\n          sqlite3_int64 newSz = *(sqlite3_int64*)pArg;\n          if( newSz>oldSz ){\n            SimulateIOErrorBenign(1);\n            rc = winTruncate(id, newSz);\n            SimulateIOErrorBenign(0);\n          }\n        }\n        OSTRACE((\"FCNTL file=%p, rc=%s\\n\", pFile->h, sqlite3ErrName(rc)));\n        return rc;\n      }\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_PERSIST_WAL: {\n      winModeBit(pFile, WINFILE_PERSIST_WAL, (int*)pArg);\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_POWERSAFE_OVERWRITE: {\n      winModeBit(pFile, WINFILE_PSOW, (int*)pArg);\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_VFSNAME: {\n      *(char**)pArg = sqlite3_mprintf(\"%s\", pFile->pVfs->zName);\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_WIN32_AV_RETRY: {\n      int *a = (int*)pArg;\n      if( a[0]>0 ){\n        winIoerrRetry = a[0];\n      }else{\n        a[0] = winIoerrRetry;\n      }\n      if( a[1]>0 ){\n        winIoerrRetryDelay = a[1];\n      }else{\n        a[1] = winIoerrRetryDelay;\n      }\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_WIN32_GET_HANDLE: {\n      LPHANDLE phFile = (LPHANDLE)pArg;\n      *phFile = pFile->h;\n      OSTRACE((\"FCNTL file=%p, rc=SQLITE_OK\\n\", pFile->h));\n      return SQLITE_OK;\n    }\n#ifdef SQLITE_TEST\n    case SQLITE_FCNTL_WIN32_SET_HANDLE: {\n      LPHANDLE phFile = (LPHANDLE)pArg;\n      HANDLE hOldFile = pFile->h;\n      pFile->h = *phFile;\n      *phFile = hOldFile;\n      OSTRACE((\"FCNTL oldFile=%p, newFile=%p, rc=SQLITE_OK\\n\",\n               hOldFile, pFile->h));\n      return SQLITE_OK;\n    }\n#endif\n    case SQLITE_FCNTL_NULL_IO: {\n      (void)osCloseHandle(pFile->h);\n      pFile->h = NULL;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_TEMPFILENAME: {\n      char *zTFile = 0;\n      int rc = winGetTempname(pFile->pVfs, &zTFile);\n      if( rc==SQLITE_OK ){\n        *(char**)pArg = zTFile;\n      }\n      OSTRACE((\"FCNTL file=%p, rc=%s\\n\", pFile->h, sqlite3ErrName(rc)));\n      return rc;\n    }\n#if SQLITE_MAX_MMAP_SIZE>0\n    case SQLITE_FCNTL_MMAP_SIZE: {\n      i64 newLimit = *(i64*)pArg;\n      int rc = SQLITE_OK;\n      if( newLimit>sqlite3GlobalConfig.mxMmap ){\n        newLimit = sqlite3GlobalConfig.mxMmap;\n      }\n\n      /* The value of newLimit may be eventually cast to (SIZE_T) and passed\n      ** to MapViewOfFile(). Restrict its value to 2GB if (SIZE_T) is not at\n      ** least a 64-bit type. */\n      if( newLimit>0 && sizeof(SIZE_T)<8 ){\n        newLimit = (newLimit & 0x7FFFFFFF);\n      }\n\n      *(i64*)pArg = pFile->mmapSizeMax;\n      if( newLimit>=0 && newLimit!=pFile->mmapSizeMax && pFile->nFetchOut==0 ){\n        pFile->mmapSizeMax = newLimit;\n        if( pFile->mmapSize>0 ){\n          winUnmapfile(pFile);\n          rc = winMapfile(pFile, -1);\n        }\n      }\n      OSTRACE((\"FCNTL file=%p, rc=%s\\n\", pFile->h, sqlite3ErrName(rc)));\n      return rc;\n    }\n#endif\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    case SQLITE_FCNTL_LOCK_TIMEOUT: {\n      int iOld = pFile->iBusyTimeout;\n      int iNew = *(int*)pArg;\n#if SQLITE_ENABLE_SETLK_TIMEOUT==1\n      pFile->iBusyTimeout = (iNew < 0) ? INFINITE : (DWORD)iNew;\n#elif SQLITE_ENABLE_SETLK_TIMEOUT==2\n      pFile->iBusyTimeout = (DWORD)(!!iNew);\n#else\n# error \"SQLITE_ENABLE_SETLK_TIMEOUT must be set to 1 or 2\"\n#endif\n      *(int*)pArg = iOld;\n      return SQLITE_OK;\n    }\n    case SQLITE_FCNTL_BLOCK_ON_CONNECT: {\n      int iNew = *(int*)pArg;\n      pFile->bBlockOnConnect = iNew;\n      return SQLITE_OK;\n    }\n#endif /* SQLITE_ENABLE_SETLK_TIMEOUT */\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n    case SQLITE_FCNTL_FILESTAT: {\n      sqlite3_str *pStr = (sqlite3_str*)pArg;\n      sqlite3_str_appendf(pStr, \"{\\\"h\\\":%llu\", (sqlite3_uint64)pFile->h);\n      sqlite3_str_appendf(pStr, \",\\\"vfs\\\":\\\"%s\\\"\", pFile->pVfs->zName);\n      if( pFile->locktype ){\n        static const char *azLock[] = { \"SHARED\", \"RESERVED\",\n                                      \"PENDING\", \"EXCLUSIVE\" };\n        sqlite3_str_appendf(pStr, \",\\\"locktype\\\":\\\"%s\\\"\",\n                                  azLock[pFile->locktype-1]);\n      }\n#if SQLITE_MAX_MMAP_SIZE>0\n      if( pFile->mmapSize ){\n        sqlite3_str_appendf(pStr, \",\\\"mmapSize\\\":%lld\", pFile->mmapSize);\n        sqlite3_str_appendf(pStr, \",\\\"nFetchOut\\\":%d\", pFile->nFetchOut);\n      }\n#endif\n      sqlite3_str_append(pStr, \"}\", 1);\n      return SQLITE_OK;\n    }\n#endif /* SQLITE_DEBUG || SQLITE_ENABLE_FILESTAT */\n\n  }\n  OSTRACE((\"FCNTL file=%p, rc=SQLITE_NOTFOUND\\n\", pFile->h));\n  return SQLITE_NOTFOUND;\n}\n\n/*\n** Return the sector size in bytes of the underlying block device for\n** the specified file. This is almost always 512 bytes, but may be\n** larger for some devices.\n**\n** SQLite code assumes this function cannot fail. It also assumes that\n** if two files are created in the same file-system directory (i.e.\n** a database and its journal file) that the sector size will be the\n** same for both.\n*/\nstatic int winSectorSize(sqlite3_file *id){\n  (void)id;\n  return SQLITE_DEFAULT_SECTOR_SIZE;\n}\n\n/*\n** Return a vector of device characteristics.\n*/\nstatic int winDeviceCharacteristics(sqlite3_file *id){\n  winFile *p = (winFile*)id;\n  return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | SQLITE_IOCAP_SUBPAGE_READ |\n         ((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0);\n}\n\n/*\n** Windows will only let you create file view mappings\n** on allocation size granularity boundaries.\n** During sqlite3_os_init() we do a GetSystemInfo()\n** to get the granularity size.\n*/\nstatic SYSTEM_INFO winSysInfo;\n\n/*\n** Convert a UTF-8 filename into whatever form the underlying\n** operating system wants filenames in.  Space to hold the result\n** is obtained from malloc and must be freed by the calling\n** function\n**\n** On Cygwin, 3 possible input forms are accepted:\n** - If the filename starts with \"<drive>:/\" or \"<drive>:\\\",\n**   it is converted to UTF-16 as-is.\n** - If the filename contains '/', it is assumed to be a\n**   Cygwin absolute path, it is converted to a win32\n**   absolute path in UTF-16.\n** - Otherwise it must be a filename only, the win32 filename\n**   is returned in UTF-16.\n** Note: If the function cygwin_conv_path() fails, only\n**   UTF-8 -> UTF-16 conversion will be done. This can only\n**   happen when the file path >32k, in which case winUtf8ToUnicode()\n**   will fail too.\n*/\nstatic void *winConvertFromUtf8Filename(const char *zFilename){\n  void *zConverted = 0;\n  if( osIsNT() ){\n#ifdef __CYGWIN__\n    int nChar;\n    LPWSTR zWideFilename;\n\n    if( osCygwin_conv_path && !(winIsDriveLetterAndColon(zFilename)\n        && winIsDirSep(zFilename[2])) ){\n      i64 nByte;\n      int convertflag = CCP_POSIX_TO_WIN_W;\n      if( !strchr(zFilename, '/') ) convertflag |= CCP_RELATIVE;\n      nByte = (i64)osCygwin_conv_path(convertflag,\n          zFilename, 0, 0);\n      if( nByte>0 ){\n        zConverted = sqlite3MallocZero(12+(u64)nByte);\n        if ( zConverted==0 ){\n          return zConverted;\n        }\n        zWideFilename = zConverted;\n        /* Filenames should be prefixed, except when converted\n         * full path already starts with \"\\\\?\\\". */\n        if( osCygwin_conv_path(convertflag, zFilename,\n                             zWideFilename+4, nByte)==0 ){\n          if( (convertflag&CCP_RELATIVE) ){\n            memmove(zWideFilename, zWideFilename+4, nByte);\n          }else if( memcmp(zWideFilename+4, L\"\\\\\\\\\", 4) ){\n            memcpy(zWideFilename, L\"\\\\\\\\?\\\\\", 8);\n          }else if( zWideFilename[6]!='?' ){\n            memmove(zWideFilename+6, zWideFilename+4, nByte);\n            memcpy(zWideFilename, L\"\\\\\\\\?\\\\UNC\", 14);\n          }else{\n            memmove(zWideFilename, zWideFilename+4, nByte);\n          }\n          return zConverted;\n        }\n        sqlite3_free(zConverted);\n      }\n    }\n    nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);\n    if( nChar==0 ){\n      return 0;\n    }\n    zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR)+12 );\n    if( zWideFilename==0 ){\n      return 0;\n    }\n    nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,\n                                  zWideFilename, nChar);\n    if( nChar==0 ){\n      sqlite3_free(zWideFilename);\n      zWideFilename = 0;\n    }else if( nChar>MAX_PATH\n        && winIsDriveLetterAndColon(zFilename)\n        && winIsDirSep(zFilename[2]) ){\n      memmove(zWideFilename+4, zWideFilename, nChar*sizeof(WCHAR));\n      zWideFilename[2] = '\\\\';\n      memcpy(zWideFilename, L\"\\\\\\\\?\\\\\", 8);\n    }else if( nChar>MAX_PATH\n        && winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])\n        && zFilename[2] != '?' ){\n      memmove(zWideFilename+6, zWideFilename, nChar*sizeof(WCHAR));\n      memcpy(zWideFilename, L\"\\\\\\\\?\\\\UNC\", 14);\n    }\n    zConverted = zWideFilename;\n#else\n    zConverted = winUtf8ToUnicode(zFilename);\n#endif /* __CYGWIN__ */\n  }\n#if defined(SQLITE_WIN32_HAS_ANSI) && defined(_WIN32)\n  else{\n    zConverted = winUtf8ToMbcs(zFilename, osAreFileApisANSI());\n  }\n#endif\n  /* caller will handle out of memory */\n  return zConverted;\n}\n\n#ifndef SQLITE_OMIT_WAL\n\n/*\n** Helper functions to obtain and relinquish the global mutex. The\n** global mutex is used to protect the winLockInfo objects used by\n** this file, all of which may be shared by multiple threads.\n**\n** Function winShmMutexHeld() is used to assert() that the global mutex\n** is held when required. This function is only used as part of assert()\n** statements. e.g.\n**\n**   winShmEnterMutex()\n**     assert( winShmMutexHeld() );\n**   winShmLeaveMutex()\n*/\nstatic sqlite3_mutex *winBigLock = 0;\nstatic void winShmEnterMutex(void){\n  sqlite3_mutex_enter(winBigLock);\n}\nstatic void winShmLeaveMutex(void){\n  sqlite3_mutex_leave(winBigLock);\n}\n#ifndef NDEBUG\nstatic int winShmMutexHeld(void) {\n  return sqlite3_mutex_held(winBigLock);\n}\n#endif\n\n/*\n** Object used to represent a single file opened and mmapped to provide\n** shared memory.  When multiple threads all reference the same\n** log-summary, each thread has its own winFile object, but they all\n** point to a single instance of this object.  In other words, each\n** log-summary is opened only once per process.\n**\n** winShmMutexHeld() must be true when creating or destroying\n** this object, or while editing the global linked list that starts\n** at winShmNodeList.\n**\n** When reading or writing the linked list starting at winShmNode.pWinShmList,\n** pShmNode->mutex must be held.\n**\n** The following fields are constant after the object is created:\n**\n**      zFilename\n**      hSharedShm\n**      mutex\n**      bUseSharedLockHandle\n**\n** Either winShmNode.mutex must be held or winShmNode.pWinShmList==0 and\n** winShmMutexHeld() is true when reading or writing any other field\n** in this structure.\n**\n** File-handle hSharedShm is always used to (a) take the DMS lock, (b)\n** truncate the *-shm file if the DMS-locking protocol demands it, and\n** (c) map regions of the *-shm file into memory using MapViewOfFile()\n** or similar. If bUseSharedLockHandle is true, then other locks are also\n** taken on hSharedShm. Or, if bUseSharedLockHandle is false, then other\n** locks are taken using each connection's winShm.hShm handles.\n*/\nstruct winShmNode {\n  sqlite3_mutex *mutex;      /* Mutex to access this object */\n  char *zFilename;           /* Name of the file */\n  HANDLE hSharedShm;         /* File handle open on zFilename */\n  int bUseSharedLockHandle;  /* True to use hSharedShm for everything */\n\n  int isUnlocked;            /* DMS lock has not yet been obtained */\n  int isReadonly;            /* True if read-only */\n  int szRegion;              /* Size of shared-memory regions */\n  int nRegion;               /* Size of array apRegion */\n\n  struct ShmRegion {\n    HANDLE hMap;             /* File handle from CreateFileMapping */\n    void *pMap;\n  } *aRegion;\n  DWORD lastErrno;           /* The Windows errno from the last I/O error */\n\n  winShm *pWinShmList;       /* List of winShm objects with ptrs to this */\n\n  winShmNode *pNext;         /* Next in list of all winShmNode objects */\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)\n  u8 nextShmId;              /* Next available winShm.id value */\n#endif\n};\n\n/*\n** A global array of all winShmNode objects.\n**\n** The winShmMutexHeld() must be true while reading or writing this list.\n*/\nstatic winShmNode *winShmNodeList = 0;\n\n/*\n** Structure used internally by this VFS to record the state of an\n** open shared memory connection. There is one such structure for each\n** winFile open on a wal mode database.\n*/\nstruct winShm {\n  winShmNode *pShmNode;      /* The underlying winShmNode object */\n  u16 sharedMask;            /* Mask of shared locks held */\n  u16 exclMask;              /* Mask of exclusive locks held */\n  HANDLE hShm;               /* File-handle on *-shm file. For locking. */\n  int bReadonly;             /* True if hShm is opened read-only */\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)\n  u8 id;                     /* Id of this connection with its winShmNode */\n#endif\n  winShm *pWinShmNext;       /* Next winShm object on same winShmNode */\n};\n\n/*\n** Constants used for locking\n*/\n#define WIN_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)        /* first lock byte */\n#define WIN_SHM_DMS    (WIN_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */\n\n/* Forward references to VFS methods */\nstatic int winOpen(sqlite3_vfs*,const char*,sqlite3_file*,int,int*);\nstatic int winDelete(sqlite3_vfs *,const char*,int);\n\n/*\n** Purge the winShmNodeList list of all entries with winShmNode.pWinShmList==0.\n**\n** This is not a VFS shared-memory method; it is a utility function called\n** by VFS shared-memory methods.\n*/\nstatic void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){\n  winShmNode **pp;\n  winShmNode *p;\n  assert( winShmMutexHeld() );\n  OSTRACE((\"SHM-PURGE pid=%lu, deleteFlag=%d\\n\",\n           osGetCurrentProcessId(), deleteFlag));\n  pp = &winShmNodeList;\n  while( (p = *pp)!=0 ){\n    if( p->pWinShmList==0 ){\n      int i;\n      if( p->mutex ){ sqlite3_mutex_free(p->mutex); }\n      for(i=0; i<p->nRegion; i++){\n        BOOL bRc = osUnmapViewOfFile(p->aRegion[i].pMap);\n        OSTRACE((\"SHM-PURGE-UNMAP pid=%lu, region=%d, rc=%s\\n\",\n                 osGetCurrentProcessId(), i, bRc ? \"ok\" : \"failed\"));\n        UNUSED_VARIABLE_VALUE(bRc);\n        bRc = osCloseHandle(p->aRegion[i].hMap);\n        OSTRACE((\"SHM-PURGE-CLOSE pid=%lu, region=%d, rc=%s\\n\",\n                 osGetCurrentProcessId(), i, bRc ? \"ok\" : \"failed\"));\n        UNUSED_VARIABLE_VALUE(bRc);\n      }\n      winHandleClose(p->hSharedShm);\n      if( deleteFlag ){\n        SimulateIOErrorBenign(1);\n        sqlite3BeginBenignMalloc();\n        winDelete(pVfs, p->zFilename, 0);\n        sqlite3EndBenignMalloc();\n        SimulateIOErrorBenign(0);\n      }\n      *pp = p->pNext;\n      sqlite3_free(p->aRegion);\n      sqlite3_free(p);\n    }else{\n      pp = &p->pNext;\n    }\n  }\n}\n\n/*\n** The DMS lock has not yet been taken on the shm file associated with\n** pShmNode. Take the lock. Truncate the *-shm file if required.\n** Return SQLITE_OK if successful, or an SQLite error code otherwise.\n*/\nstatic int winLockSharedMemory(winShmNode *pShmNode, DWORD nMs){\n  HANDLE h = pShmNode->hSharedShm;\n  int rc = SQLITE_OK;\n\n  assert( sqlite3_mutex_held(pShmNode->mutex) );\n  rc = winHandleLockTimeout(h, WIN_SHM_DMS, 1, 1, 0);\n  if( rc==SQLITE_OK ){\n    /* We have an EXCLUSIVE lock on the DMS byte. This means that this\n    ** is the first process to open the file. Truncate it to zero bytes\n    ** in this case.  */\n    if( pShmNode->isReadonly ){\n      rc = SQLITE_READONLY_CANTINIT;\n    }else{\n      rc = winHandleTruncate(h, 0);\n    }\n\n    /* Release the EXCLUSIVE lock acquired above. */\n    winUnlockFile(&h, WIN_SHM_DMS, 0, 1, 0);\n  }else if( (rc & 0xFF)==SQLITE_BUSY ){\n    rc = SQLITE_OK;\n  }\n\n  if( rc==SQLITE_OK ){\n    /* Take a SHARED lock on the DMS byte. */\n    rc = winHandleLockTimeout(h, WIN_SHM_DMS, 1, 0, nMs);\n    if( rc==SQLITE_OK ){\n      pShmNode->isUnlocked = 0;\n    }\n  }\n\n  return rc;\n}\n\n\n/*\n** This function is used to open a handle on a *-shm file.\n**\n** If SQLITE_ENABLE_SETLK_TIMEOUT is defined at build time, then the file\n** is opened with FILE_FLAG_OVERLAPPED specified. If not, it is not.\n*/\nstatic int winHandleOpen(\n  const char *zUtf8,              /* File to open */\n  int *pbReadonly,                /* IN/OUT: True for readonly handle */\n  HANDLE *ph                      /* OUT: New HANDLE for file */\n){\n  int rc = SQLITE_OK;\n  void *zConverted = 0;\n  int bReadonly = *pbReadonly;\n  HANDLE h = INVALID_HANDLE_VALUE;\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  const DWORD flag_overlapped = FILE_FLAG_OVERLAPPED;\n#else\n  const DWORD flag_overlapped = 0;\n#endif\n\n  /* Convert the filename to the system encoding. */\n  zConverted = winConvertFromUtf8Filename(zUtf8);\n  if( zConverted==0 ){\n    OSTRACE((\"OPEN name=%s, rc=SQLITE_IOERR_NOMEM\", zUtf8));\n    rc = SQLITE_IOERR_NOMEM_BKPT;\n    goto winopenfile_out;\n  }\n\n  /* Ensure the file we are trying to open is not actually a directory. */\n  if( winIsDir(zConverted) ){\n    OSTRACE((\"OPEN name=%s, rc=SQLITE_CANTOPEN_ISDIR\", zUtf8));\n    rc = SQLITE_CANTOPEN_ISDIR;\n    goto winopenfile_out;\n  }\n\n  /* TODO: platforms.\n  ** TODO: retry-on-ioerr.\n  */\n  if( osIsNT() ){\n#if SQLITE_OS_WINRT\n    CREATEFILE2_EXTENDED_PARAMETERS extendedParameters;\n    memset(&extendedParameters, 0, sizeof(extendedParameters));\n    extendedParameters.dwSize = sizeof(extendedParameters);\n    extendedParameters.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;\n    extendedParameters.dwFileFlags = flag_overlapped;\n    extendedParameters.dwSecurityQosFlags = SECURITY_ANONYMOUS;\n    h = osCreateFile2((LPCWSTR)zConverted,\n        (GENERIC_READ | (bReadonly ? 0 : GENERIC_WRITE)),/* dwDesiredAccess */\n        FILE_SHARE_READ | FILE_SHARE_WRITE,      /* dwShareMode */\n        OPEN_ALWAYS,                             /* dwCreationDisposition */\n        &extendedParameters\n    );\n#else\n    h = osCreateFileW((LPCWSTR)zConverted,         /* lpFileName */\n        (GENERIC_READ | (bReadonly ? 0 : GENERIC_WRITE)),  /* dwDesiredAccess */\n        FILE_SHARE_READ | FILE_SHARE_WRITE,        /* dwShareMode */\n        NULL,                                      /* lpSecurityAttributes */\n        OPEN_ALWAYS,                               /* dwCreationDisposition */\n        FILE_ATTRIBUTE_NORMAL|flag_overlapped,\n        NULL\n    );\n#endif\n  }else{\n    /* Due to pre-processor directives earlier in this file,\n    ** SQLITE_WIN32_HAS_ANSI is always defined if osIsNT() is false. */\n#ifdef SQLITE_WIN32_HAS_ANSI\n    h = osCreateFileA((LPCSTR)zConverted,\n        (GENERIC_READ | (bReadonly ? 0 : GENERIC_WRITE)),  /* dwDesiredAccess */\n        FILE_SHARE_READ | FILE_SHARE_WRITE,        /* dwShareMode */\n        NULL,                                      /* lpSecurityAttributes */\n        OPEN_ALWAYS,                               /* dwCreationDisposition */\n        FILE_ATTRIBUTE_NORMAL|flag_overlapped,\n        NULL\n    );\n#endif\n  }\n\n  if( h==INVALID_HANDLE_VALUE ){\n    if( bReadonly==0 ){\n      bReadonly = 1;\n      rc = winHandleOpen(zUtf8, &bReadonly, &h);\n    }else{\n      rc = SQLITE_CANTOPEN_BKPT;\n    }\n  }\n\n winopenfile_out:\n  sqlite3_free(zConverted);\n  *pbReadonly = bReadonly;\n  *ph = h;\n  return rc;\n}\n\n/*\n** Close pDbFd's connection to shared-memory.  Delete the underlying\n** *-shm file if deleteFlag is true.\n*/\nstatic int winCloseSharedMemory(winFile *pDbFd, int deleteFlag){\n  winShm *p;            /* The connection to be closed */\n  winShm **pp;          /* Iterator for pShmNode->pWinShmList */\n  winShmNode *pShmNode; /* The underlying shared-memory file */\n\n  p = pDbFd->pShm;\n  if( p==0 ) return SQLITE_OK;\n  if( p->hShm!=INVALID_HANDLE_VALUE ){\n    osCloseHandle(p->hShm);\n  }\n\n  winShmEnterMutex();\n  pShmNode = p->pShmNode;\n\n  /* Remove this connection from the winShmNode.pWinShmList list */\n  sqlite3_mutex_enter(pShmNode->mutex);\n  for(pp=&pShmNode->pWinShmList; *pp!=p; pp=&(*pp)->pWinShmNext){}\n  *pp = p->pWinShmNext;\n  sqlite3_mutex_leave(pShmNode->mutex);\n\n  winShmPurge(pDbFd->pVfs, deleteFlag);\n  winShmLeaveMutex();\n\n  /* Free the connection p */\n  sqlite3_free(p);\n  pDbFd->pShm = 0;\n  return SQLITE_OK;\n}\n\n/*\n** testfixture builds may set this global variable to true via a\n** Tcl interface. This forces the VFS to use the locking normally\n** only used for UNC paths for all files.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_win_test_unc_locking = 0;\n#else\n# define sqlite3_win_test_unc_locking 0\n#endif\n\n/*\n** Return true if the string passed as the only argument is likely\n** to be a UNC path. In other words, if it starts with \"\\\\\".\n*/\nstatic int winIsUNCPath(const char *zFile){\n  if( zFile[0]=='\\\\' && zFile[1]=='\\\\' ){\n    return 1;\n  }\n  return sqlite3_win_test_unc_locking;\n}\n\n/*\n** Open the shared-memory area associated with database file pDbFd.\n*/\nstatic int winOpenSharedMemory(winFile *pDbFd){\n  struct winShm *p;                  /* The connection to be opened */\n  winShmNode *pShmNode = 0;          /* The underlying mmapped file */\n  int rc = SQLITE_OK;                /* Result code */\n  winShmNode *pNew;                  /* Newly allocated winShmNode */\n  int nName;                         /* Size of zName in bytes */\n\n  assert( pDbFd->pShm==0 );    /* Not previously opened */\n\n  /* Allocate space for the new sqlite3_shm object.  Also speculatively\n  ** allocate space for a new winShmNode and filename.  */\n  p = sqlite3MallocZero( sizeof(*p) );\n  if( p==0 ) return SQLITE_IOERR_NOMEM_BKPT;\n  nName = sqlite3Strlen30(pDbFd->zPath);\n  pNew = sqlite3MallocZero( sizeof(*pShmNode) + (i64)nName + 17 );\n  if( pNew==0 ){\n    sqlite3_free(p);\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n  pNew->zFilename = (char*)&pNew[1];\n  pNew->hSharedShm = INVALID_HANDLE_VALUE;\n  pNew->isUnlocked = 1;\n  pNew->bUseSharedLockHandle = winIsUNCPath(pDbFd->zPath);\n  sqlite3_snprintf(nName+15, pNew->zFilename, \"%s-shm\", pDbFd->zPath);\n  sqlite3FileSuffix3(pDbFd->zPath, pNew->zFilename);\n\n  /* Look to see if there is an existing winShmNode that can be used.\n  ** If no matching winShmNode currently exists, then create a new one.  */\n  winShmEnterMutex();\n  for(pShmNode = winShmNodeList; pShmNode; pShmNode=pShmNode->pNext){\n    /* TBD need to come up with better match here.  Perhaps\n    ** use FILE_ID_BOTH_DIR_INFO Structure.  */\n    if( sqlite3StrICmp(pShmNode->zFilename, pNew->zFilename)==0 ) break;\n  }\n  if( pShmNode==0 ){\n    pShmNode = pNew;\n\n    /* Allocate a mutex for this winShmNode object, if one is required. */\n    if( sqlite3GlobalConfig.bCoreMutex ){\n      pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);\n      if( pShmNode->mutex==0 ) rc = SQLITE_IOERR_NOMEM_BKPT;\n    }\n\n    /* Open a file-handle to use for mappings, and for the DMS lock. */\n    if( rc==SQLITE_OK ){\n      HANDLE h = INVALID_HANDLE_VALUE;\n      pShmNode->isReadonly = sqlite3_uri_boolean(pDbFd->zPath,\"readonly_shm\",0);\n      rc = winHandleOpen(pNew->zFilename, &pShmNode->isReadonly, &h);\n      pShmNode->hSharedShm = h;\n    }\n\n    /* If successful, link the new winShmNode into the global list. If an\n    ** error occurred, free the object. */\n    if( rc==SQLITE_OK ){\n      pShmNode->pNext = winShmNodeList;\n      winShmNodeList = pShmNode;\n      pNew = 0;\n    }else{\n      sqlite3_mutex_free(pShmNode->mutex);\n      if( pShmNode->hSharedShm!=INVALID_HANDLE_VALUE ){\n        osCloseHandle(pShmNode->hSharedShm);\n      }\n    }\n  }\n\n  /* If no error has occurred, link the winShm object to the winShmNode and\n  ** the winShm to pDbFd.  */\n  if( rc==SQLITE_OK ){\n    sqlite3_mutex_enter(pShmNode->mutex);\n    p->pShmNode = pShmNode;\n    p->pWinShmNext = pShmNode->pWinShmList;\n    pShmNode->pWinShmList = p;\n#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)\n    p->id = pShmNode->nextShmId++;\n#endif\n    pDbFd->pShm = p;\n    sqlite3_mutex_leave(pShmNode->mutex);\n  }else if( p ){\n    sqlite3_free(p);\n  }\n\n  assert( rc!=SQLITE_OK || pShmNode->isUnlocked==0 || pShmNode->nRegion==0 );\n  winShmLeaveMutex();\n  sqlite3_free(pNew);\n\n  /* Open a file-handle on the *-shm file for this connection. This file-handle\n  ** is only used for locking. The mapping of the *-shm file is created using\n  ** the shared file handle in winShmNode.hSharedShm.  */\n  if( rc==SQLITE_OK && pShmNode->bUseSharedLockHandle==0 ){\n    p->bReadonly = sqlite3_uri_boolean(pDbFd->zPath, \"readonly_shm\", 0);\n    rc = winHandleOpen(pShmNode->zFilename, &p->bReadonly, &p->hShm);\n    if( rc!=SQLITE_OK ){\n      assert( p->hShm==INVALID_HANDLE_VALUE );\n      winCloseSharedMemory(pDbFd, 0);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Close a connection to shared-memory.  Delete the underlying\n** storage if deleteFlag is true.\n*/\nstatic int winShmUnmap(\n  sqlite3_file *fd,          /* Database holding shared memory */\n  int deleteFlag             /* Delete after closing if true */\n){\n  return winCloseSharedMemory((winFile*)fd, deleteFlag);\n}\n\n/*\n** Change the lock state for a shared-memory segment.\n*/\nstatic int winShmLock(\n  sqlite3_file *fd,          /* Database file holding the shared memory */\n  int ofst,                  /* First lock to acquire or release */\n  int n,                     /* Number of locks to acquire or release */\n  int flags                  /* What to do with the lock */\n){\n  winFile *pDbFd = (winFile*)fd;        /* Connection holding shared memory */\n  winShm *p = pDbFd->pShm;              /* The shared memory being locked */\n  winShmNode *pShmNode;\n  int rc = SQLITE_OK;                   /* Result code */\n  u16 mask = (u16)((1U<<(ofst+n)) - (1U<<ofst)); /* Mask of locks to [un]take */\n\n  if( p==0 ) return SQLITE_IOERR_SHMLOCK;\n  pShmNode = p->pShmNode;\n  if( NEVER(pShmNode==0) ) return SQLITE_IOERR_SHMLOCK;\n\n  assert( ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK );\n  assert( n>=1 );\n  assert( flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED)\n       || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)\n       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED)\n       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) );\n  assert( n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0 );\n\n  /* Check that, if this to be a blocking lock, no locks that occur later\n  ** in the following list than the lock being obtained are already held:\n  **\n  **   1. Recovery lock (ofst==2).\n  **   2. Checkpointer lock (ofst==1).\n  **   3. Write lock (ofst==0).\n  **   4. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK).\n  **\n  ** In other words, if this is a blocking lock, none of the locks that\n  ** occur later in the above list than the lock being obtained may be\n  ** held.\n  */\n#if defined(SQLITE_ENABLE_SETLK_TIMEOUT) && defined(SQLITE_DEBUG)\n  {\n    u16 lockMask = (p->exclMask|p->sharedMask);\n    assert( (flags & SQLITE_SHM_UNLOCK) || pDbFd->iBusyTimeout==0 || (\n          (ofst!=2 || lockMask==0)\n       && (ofst!=1 || lockMask==0 || lockMask==2)\n       && (ofst!=0 || lockMask<3)\n       && (ofst<3  || lockMask<(1<<ofst))\n    ));\n  }\n#endif\n\n  /* Check if there is any work to do. There are three cases:\n  **\n  **    a) An unlock operation where there are locks to unlock,\n  **    b) An shared lock where the requested lock is not already held\n  **    c) An exclusive lock where the requested lock is not already held\n  **\n  ** The SQLite core never requests an exclusive lock that it already holds.\n  ** This is assert()ed immediately below.  */\n  assert( flags!=(SQLITE_SHM_EXCLUSIVE|SQLITE_SHM_LOCK)\n       || 0==(p->exclMask & mask)\n  );\n  if( ((flags & SQLITE_SHM_UNLOCK) && ((p->exclMask|p->sharedMask) & mask))\n   || (flags==(SQLITE_SHM_SHARED|SQLITE_SHM_LOCK) && 0==(p->sharedMask & mask))\n   || (flags==(SQLITE_SHM_EXCLUSIVE|SQLITE_SHM_LOCK))\n  ){\n    HANDLE h = p->hShm;\n\n    if( flags & SQLITE_SHM_UNLOCK ){\n      /* Case (a) - unlock.  */\n\n      assert( (p->exclMask & p->sharedMask)==0 );\n      assert( !(flags & SQLITE_SHM_EXCLUSIVE) || (p->exclMask & mask)==mask );\n      assert( !(flags & SQLITE_SHM_SHARED) || (p->sharedMask & mask)==mask );\n\n      assert( !(flags & SQLITE_SHM_SHARED) || n==1 );\n      if( pShmNode->bUseSharedLockHandle ){\n        h = pShmNode->hSharedShm;\n        if( flags & SQLITE_SHM_SHARED ){\n          winShm *pShm;\n          sqlite3_mutex_enter(pShmNode->mutex);\n          for(pShm=pShmNode->pWinShmList; pShm; pShm=pShm->pWinShmNext){\n            if( pShm!=p && (pShm->sharedMask & mask) ){\n              /* Another connection within this process is also holding this\n              ** SHARED lock. So do not actually release the OS lock.  */\n              h = INVALID_HANDLE_VALUE;\n              break;\n            }\n          }\n          sqlite3_mutex_leave(pShmNode->mutex);\n        }\n      }\n\n      if( h!=INVALID_HANDLE_VALUE ){\n        rc = winHandleUnlock(h, ofst+WIN_SHM_BASE, n);\n      }\n\n      /* If successful, also clear the bits in sharedMask/exclMask */\n      if( rc==SQLITE_OK ){\n        p->exclMask = (p->exclMask & ~mask);\n        p->sharedMask = (p->sharedMask & ~mask);\n      }\n    }else{\n      int bExcl = ((flags & SQLITE_SHM_EXCLUSIVE) ? 1 : 0);\n      DWORD nMs = winFileBusyTimeout(pDbFd);\n\n      if( pShmNode->bUseSharedLockHandle ){\n        winShm *pShm;\n        h = pShmNode->hSharedShm;\n        sqlite3_mutex_enter(pShmNode->mutex);\n        for(pShm=pShmNode->pWinShmList; pShm; pShm=pShm->pWinShmNext){\n          if( bExcl ){\n            if( (pShm->sharedMask|pShm->exclMask) & mask ){\n              rc = SQLITE_BUSY;\n              h = INVALID_HANDLE_VALUE;\n            }\n          }else{\n            if( pShm->sharedMask & mask ){\n              h = INVALID_HANDLE_VALUE;\n            }else if( pShm->exclMask & mask ){\n              rc = SQLITE_BUSY;\n              h = INVALID_HANDLE_VALUE;\n            }\n          }\n        }\n        sqlite3_mutex_leave(pShmNode->mutex);\n      }\n\n      if( h!=INVALID_HANDLE_VALUE ){\n        rc = winHandleLockTimeout(h, ofst+WIN_SHM_BASE, n, bExcl, nMs);\n      }\n      if( rc==SQLITE_OK ){\n        if( bExcl ){\n          p->exclMask = (p->exclMask | mask);\n        }else{\n          p->sharedMask = (p->sharedMask | mask);\n        }\n      }\n    }\n  }\n\n  OSTRACE((\n      \"SHM-LOCK(%d,%d,%d) pid=%lu, id=%d, sharedMask=%03x, exclMask=%03x,\"\n      \" rc=%s\\n\",\n      ofst, n, flags,\n      osGetCurrentProcessId(), p->id, p->sharedMask, p->exclMask,\n      sqlite3ErrName(rc))\n  );\n  return rc;\n}\n\n/*\n** Implement a memory barrier or memory fence on shared memory.\n**\n** All loads and stores begun before the barrier must complete before\n** any load or store begun after the barrier.\n*/\nstatic void winShmBarrier(\n  sqlite3_file *fd          /* Database holding the shared memory */\n){\n  UNUSED_PARAMETER(fd);\n  sqlite3MemoryBarrier();   /* compiler-defined memory barrier */\n  winShmEnterMutex();       /* Also mutex, for redundancy */\n  winShmLeaveMutex();\n}\n\n/*\n** This function is called to obtain a pointer to region iRegion of the\n** shared-memory associated with the database file fd. Shared-memory regions\n** are numbered starting from zero. Each shared-memory region is szRegion\n** bytes in size.\n**\n** If an error occurs, an error code is returned and *pp is set to NULL.\n**\n** Otherwise, if the isWrite parameter is 0 and the requested shared-memory\n** region has not been allocated (by any client, including one running in a\n** separate process), then *pp is set to NULL and SQLITE_OK returned. If\n** isWrite is non-zero and the requested shared-memory region has not yet\n** been allocated, it is allocated by this function.\n**\n** If the shared-memory region has already been allocated or is allocated by\n** this call as described above, then it is mapped into this processes\n** address space (if it is not already), *pp is set to point to the mapped\n** memory and SQLITE_OK returned.\n*/\nstatic int winShmMap(\n  sqlite3_file *fd,               /* Handle open on database file */\n  int iRegion,                    /* Region to retrieve */\n  int szRegion,                   /* Size of regions */\n  int isWrite,                    /* True to extend file if necessary */\n  void volatile **pp              /* OUT: Mapped memory */\n){\n  winFile *pDbFd = (winFile*)fd;\n  winShm *pShm = pDbFd->pShm;\n  winShmNode *pShmNode;\n  DWORD protect = PAGE_READWRITE;\n  DWORD flags = FILE_MAP_WRITE | FILE_MAP_READ;\n  int rc = SQLITE_OK;\n\n  if( !pShm ){\n    rc = winOpenSharedMemory(pDbFd);\n    if( rc!=SQLITE_OK ) return rc;\n    pShm = pDbFd->pShm;\n    assert( pShm!=0 );\n  }\n  pShmNode = pShm->pShmNode;\n\n  sqlite3_mutex_enter(pShmNode->mutex);\n  if( pShmNode->isUnlocked ){\n    /* Take the DMS lock. */\n    assert( pShmNode->nRegion==0 );\n    rc = winLockSharedMemory(pShmNode, winFileBusyTimeout(pDbFd));\n    if( rc!=SQLITE_OK ) goto shmpage_out;\n  }\n\n  assert( szRegion==pShmNode->szRegion || pShmNode->nRegion==0 );\n  if( pShmNode->nRegion<=iRegion ){\n    HANDLE hShared = pShmNode->hSharedShm;\n    struct ShmRegion *apNew;           /* New aRegion[] array */\n    int nByte = (iRegion+1)*szRegion;  /* Minimum required file size */\n    sqlite3_int64 sz;                  /* Current size of wal-index file */\n\n    pShmNode->szRegion = szRegion;\n\n    /* The requested region is not mapped into this processes address space.\n    ** Check to see if it has been allocated (i.e. if the wal-index file is\n    ** large enough to contain the requested region).\n    */\n    rc = winHandleSize(hShared, &sz);\n    if( rc!=SQLITE_OK ){\n      rc = winLogError(rc, osGetLastError(), \"winShmMap1\", pDbFd->zPath);\n      goto shmpage_out;\n    }\n\n    if( sz<nByte ){\n      /* The requested memory region does not exist. If isWrite is set to\n      ** zero, exit early. *pp will be set to NULL and SQLITE_OK returned.\n      **\n      ** Alternatively, if isWrite is non-zero, use ftruncate() to allocate\n      ** the requested memory region.  */\n      if( !isWrite ) goto shmpage_out;\n      rc = winHandleTruncate(hShared, nByte);\n      if( rc!=SQLITE_OK ){\n        rc = winLogError(rc, osGetLastError(), \"winShmMap2\", pDbFd->zPath);\n        goto shmpage_out;\n      }\n    }\n\n    /* Map the requested memory region into this processes address space. */\n    apNew = (struct ShmRegion*)sqlite3_realloc64(\n        pShmNode->aRegion, (iRegion+1)*sizeof(apNew[0])\n    );\n    if( !apNew ){\n      rc = SQLITE_IOERR_NOMEM_BKPT;\n      goto shmpage_out;\n    }\n    pShmNode->aRegion = apNew;\n\n    if( pShmNode->isReadonly ){\n      protect = PAGE_READONLY;\n      flags = FILE_MAP_READ;\n    }\n\n    while( pShmNode->nRegion<=iRegion ){\n      HANDLE hMap = NULL;         /* file-mapping handle */\n      void *pMap = 0;             /* Mapped memory region */\n\n#if SQLITE_OS_WINRT\n      hMap = osCreateFileMappingFromApp(hShared, NULL, protect, nByte, NULL);\n#elif defined(SQLITE_WIN32_HAS_WIDE)\n      hMap = osCreateFileMappingW(hShared, NULL, protect, 0, nByte, NULL);\n#elif defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_CREATEFILEMAPPINGA\n      hMap = osCreateFileMappingA(hShared, NULL, protect, 0, nByte, NULL);\n#endif\n\n      OSTRACE((\"SHM-MAP-CREATE pid=%lu, region=%d, size=%d, rc=%s\\n\",\n               osGetCurrentProcessId(), pShmNode->nRegion, nByte,\n               hMap ? \"ok\" : \"failed\"));\n      if( hMap ){\n        int iOffset = pShmNode->nRegion*szRegion;\n        int iOffsetShift = iOffset % winSysInfo.dwAllocationGranularity;\n#if SQLITE_OS_WINRT\n        pMap = osMapViewOfFileFromApp(hMap, flags,\n            iOffset - iOffsetShift, szRegion + iOffsetShift\n        );\n#else\n        pMap = osMapViewOfFile(hMap, flags,\n            0, iOffset - iOffsetShift, szRegion + iOffsetShift\n        );\n#endif\n        OSTRACE((\"SHM-MAP-MAP pid=%lu, region=%d, offset=%d, size=%d, rc=%s\\n\",\n                 osGetCurrentProcessId(), pShmNode->nRegion, iOffset,\n                 szRegion, pMap ? \"ok\" : \"failed\"));\n      }\n      if( !pMap ){\n        pShmNode->lastErrno = osGetLastError();\n        rc = winLogError(SQLITE_IOERR_SHMMAP, pShmNode->lastErrno,\n                         \"winShmMap3\", pDbFd->zPath);\n        if( hMap ) osCloseHandle(hMap);\n        goto shmpage_out;\n      }\n\n      pShmNode->aRegion[pShmNode->nRegion].pMap = pMap;\n      pShmNode->aRegion[pShmNode->nRegion].hMap = hMap;\n      pShmNode->nRegion++;\n    }\n  }\n\nshmpage_out:\n  if( pShmNode->nRegion>iRegion ){\n    int iOffset = iRegion*szRegion;\n    int iOffsetShift = iOffset % winSysInfo.dwAllocationGranularity;\n    char *p = (char *)pShmNode->aRegion[iRegion].pMap;\n    *pp = (void *)&p[iOffsetShift];\n  }else{\n    *pp = 0;\n  }\n  if( pShmNode->isReadonly && rc==SQLITE_OK ){\n    rc = SQLITE_READONLY;\n  }\n  sqlite3_mutex_leave(pShmNode->mutex);\n  return rc;\n}\n\n#else\n# define winShmMap     0\n# define winShmLock    0\n# define winShmBarrier 0\n# define winShmUnmap   0\n#endif /* #ifndef SQLITE_OMIT_WAL */\n\n/*\n** Cleans up the mapped region of the specified file, if any.\n*/\n#if SQLITE_MAX_MMAP_SIZE>0\nstatic int winUnmapfile(winFile *pFile){\n  assert( pFile!=0 );\n  OSTRACE((\"UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, pMapRegion=%p, \"\n           \"mmapSize=%lld, mmapSizeMax=%lld\\n\",\n           osGetCurrentProcessId(), pFile, pFile->hMap, pFile->pMapRegion,\n           pFile->mmapSize, pFile->mmapSizeMax));\n  if( pFile->pMapRegion ){\n    if( !osUnmapViewOfFile(pFile->pMapRegion) ){\n      pFile->lastErrno = osGetLastError();\n      OSTRACE((\"UNMAP-FILE pid=%lu, pFile=%p, pMapRegion=%p, \"\n               \"rc=SQLITE_IOERR_MMAP\\n\", osGetCurrentProcessId(), pFile,\n               pFile->pMapRegion));\n      return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,\n                         \"winUnmapfile1\", pFile->zPath);\n    }\n    pFile->pMapRegion = 0;\n    pFile->mmapSize = 0;\n  }\n  if( pFile->hMap!=NULL ){\n    if( !osCloseHandle(pFile->hMap) ){\n      pFile->lastErrno = osGetLastError();\n      OSTRACE((\"UNMAP-FILE pid=%lu, pFile=%p, hMap=%p, rc=SQLITE_IOERR_MMAP\\n\",\n               osGetCurrentProcessId(), pFile, pFile->hMap));\n      return winLogError(SQLITE_IOERR_MMAP, pFile->lastErrno,\n                         \"winUnmapfile2\", pFile->zPath);\n    }\n    pFile->hMap = NULL;\n  }\n  OSTRACE((\"UNMAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), pFile));\n  return SQLITE_OK;\n}\n\n/*\n** Memory map or remap the file opened by file-descriptor pFd (if the file\n** is already mapped, the existing mapping is replaced by the new). Or, if\n** there already exists a mapping for this file, and there are still\n** outstanding xFetch() references to it, this function is a no-op.\n**\n** If parameter nByte is non-negative, then it is the requested size of\n** the mapping to create. Otherwise, if nByte is less than zero, then the\n** requested size is the size of the file on disk. The actual size of the\n** created mapping is either the requested size or the value configured\n** using SQLITE_FCNTL_MMAP_SIZE, whichever is smaller.\n**\n** SQLITE_OK is returned if no error occurs (even if the mapping is not\n** recreated as a result of outstanding references) or an SQLite error\n** code otherwise.\n*/\nstatic int winMapfile(winFile *pFd, sqlite3_int64 nByte){\n  sqlite3_int64 nMap = nByte;\n  int rc;\n\n  assert( nMap>=0 || pFd->nFetchOut==0 );\n  OSTRACE((\"MAP-FILE pid=%lu, pFile=%p, size=%lld\\n\",\n           osGetCurrentProcessId(), pFd, nByte));\n\n  if( pFd->nFetchOut>0 ) return SQLITE_OK;\n\n  if( nMap<0 ){\n    rc = winFileSize((sqlite3_file*)pFd, &nMap);\n    if( rc ){\n      OSTRACE((\"MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_IOERR_FSTAT\\n\",\n               osGetCurrentProcessId(), pFd));\n      return SQLITE_IOERR_FSTAT;\n    }\n  }\n  if( nMap>pFd->mmapSizeMax ){\n    nMap = pFd->mmapSizeMax;\n  }\n  nMap &= ~(sqlite3_int64)(winSysInfo.dwPageSize - 1);\n\n  if( nMap==0 && pFd->mmapSize>0 ){\n    winUnmapfile(pFd);\n  }\n  if( nMap!=pFd->mmapSize ){\n    void *pNew = 0;\n    DWORD protect = PAGE_READONLY;\n    DWORD flags = FILE_MAP_READ;\n\n    winUnmapfile(pFd);\n#ifdef SQLITE_MMAP_READWRITE\n    if( (pFd->ctrlFlags & WINFILE_RDONLY)==0 ){\n      protect = PAGE_READWRITE;\n      flags |= FILE_MAP_WRITE;\n    }\n#endif\n#if SQLITE_OS_WINRT\n    pFd->hMap = osCreateFileMappingFromApp(pFd->h, NULL, protect, nMap, NULL);\n#elif defined(SQLITE_WIN32_HAS_WIDE)\n    pFd->hMap = osCreateFileMappingW(pFd->h, NULL, protect,\n                                (DWORD)((nMap>>32) & 0xffffffff),\n                                (DWORD)(nMap & 0xffffffff), NULL);\n#elif defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_CREATEFILEMAPPINGA\n    pFd->hMap = osCreateFileMappingA(pFd->h, NULL, protect,\n                                (DWORD)((nMap>>32) & 0xffffffff),\n                                (DWORD)(nMap & 0xffffffff), NULL);\n#endif\n    if( pFd->hMap==NULL ){\n      pFd->lastErrno = osGetLastError();\n      rc = winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,\n                       \"winMapfile1\", pFd->zPath);\n      /* Log the error, but continue normal operation using xRead/xWrite */\n      OSTRACE((\"MAP-FILE-CREATE pid=%lu, pFile=%p, rc=%s\\n\",\n               osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));\n      return SQLITE_OK;\n    }\n    assert( (nMap % winSysInfo.dwPageSize)==0 );\n    assert( sizeof(SIZE_T)==sizeof(sqlite3_int64) || nMap<=0xffffffff );\n#if SQLITE_OS_WINRT\n    pNew = osMapViewOfFileFromApp(pFd->hMap, flags, 0, (SIZE_T)nMap);\n#else\n    pNew = osMapViewOfFile(pFd->hMap, flags, 0, 0, (SIZE_T)nMap);\n#endif\n    if( pNew==NULL ){\n      osCloseHandle(pFd->hMap);\n      pFd->hMap = NULL;\n      pFd->lastErrno = osGetLastError();\n      rc = winLogError(SQLITE_IOERR_MMAP, pFd->lastErrno,\n                       \"winMapfile2\", pFd->zPath);\n      /* Log the error, but continue normal operation using xRead/xWrite */\n      OSTRACE((\"MAP-FILE-MAP pid=%lu, pFile=%p, rc=%s\\n\",\n               osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));\n      return SQLITE_OK;\n    }\n    pFd->pMapRegion = pNew;\n    pFd->mmapSize = nMap;\n  }\n\n  OSTRACE((\"MAP-FILE pid=%lu, pFile=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), pFd));\n  return SQLITE_OK;\n}\n#endif /* SQLITE_MAX_MMAP_SIZE>0 */\n\n/*\n** If possible, return a pointer to a mapping of file fd starting at offset\n** iOff. The mapping must be valid for at least nAmt bytes.\n**\n** If such a pointer can be obtained, store it in *pp and return SQLITE_OK.\n** Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK.\n** Finally, if an error does occur, return an SQLite error code. The final\n** value of *pp is undefined in this case.\n**\n** If this function does return a pointer, the caller must eventually\n** release the reference by calling winUnfetch().\n*/\nstatic int winFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){\n#if SQLITE_MAX_MMAP_SIZE>0\n  winFile *pFd = (winFile*)fd;   /* The underlying database file */\n#endif\n  *pp = 0;\n\n  OSTRACE((\"FETCH pid=%lu, pFile=%p, offset=%lld, amount=%d, pp=%p\\n\",\n           osGetCurrentProcessId(), fd, iOff, nAmt, pp));\n\n#if SQLITE_MAX_MMAP_SIZE>0\n  if( pFd->mmapSizeMax>0 ){\n    /* Ensure that there is always at least a 256 byte buffer of addressable\n    ** memory following the returned page. If the database is corrupt,\n    ** SQLite may overread the page slightly (in practice only a few bytes,\n    ** but 256 is safe, round, number).  */\n    const int nEofBuffer = 256;\n    if( pFd->pMapRegion==0 ){\n      int rc = winMapfile(pFd, -1);\n      if( rc!=SQLITE_OK ){\n        OSTRACE((\"FETCH pid=%lu, pFile=%p, rc=%s\\n\",\n                 osGetCurrentProcessId(), pFd, sqlite3ErrName(rc)));\n        return rc;\n      }\n    }\n    if( pFd->mmapSize >= (iOff+nAmt+nEofBuffer) ){\n      assert( pFd->pMapRegion!=0 );\n      *pp = &((u8 *)pFd->pMapRegion)[iOff];\n      pFd->nFetchOut++;\n    }\n  }\n#endif\n\n  OSTRACE((\"FETCH pid=%lu, pFile=%p, pp=%p, *pp=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), fd, pp, *pp));\n  return SQLITE_OK;\n}\n\n/*\n** If the third argument is non-NULL, then this function releases a\n** reference obtained by an earlier call to winFetch(). The second\n** argument passed to this function must be the same as the corresponding\n** argument that was passed to the winFetch() invocation.\n**\n** Or, if the third argument is NULL, then this function is being called\n** to inform the VFS layer that, according to POSIX, any existing mapping\n** may now be invalid and should be unmapped.\n*/\nstatic int winUnfetch(sqlite3_file *fd, i64 iOff, void *p){\n#if SQLITE_MAX_MMAP_SIZE>0\n  winFile *pFd = (winFile*)fd;   /* The underlying database file */\n\n  /* If p==0 (unmap the entire file) then there must be no outstanding\n  ** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),\n  ** then there must be at least one outstanding.  */\n  assert( (p==0)==(pFd->nFetchOut==0) );\n\n  /* If p!=0, it must match the iOff value. */\n  assert( p==0 || p==&((u8 *)pFd->pMapRegion)[iOff] );\n\n  OSTRACE((\"UNFETCH pid=%lu, pFile=%p, offset=%lld, p=%p\\n\",\n           osGetCurrentProcessId(), pFd, iOff, p));\n\n  if( p ){\n    pFd->nFetchOut--;\n  }else{\n    /* FIXME:  If Windows truly always prevents truncating or deleting a\n    ** file while a mapping is held, then the following winUnmapfile() call\n    ** is unnecessary can be omitted - potentially improving\n    ** performance.  */\n    winUnmapfile(pFd);\n  }\n\n  assert( pFd->nFetchOut>=0 );\n#endif\n\n  OSTRACE((\"UNFETCH pid=%lu, pFile=%p, rc=SQLITE_OK\\n\",\n           osGetCurrentProcessId(), fd));\n  return SQLITE_OK;\n}\n\n/*\n** Here ends the implementation of all sqlite3_file methods.\n**\n********************** End sqlite3_file Methods *******************************\n******************************************************************************/\n\n/*\n** This vector defines all the methods that can operate on an\n** sqlite3_file for win32.\n*/\nstatic const sqlite3_io_methods winIoMethod = {\n  3,                              /* iVersion */\n  winClose,                       /* xClose */\n  winRead,                        /* xRead */\n  winWrite,                       /* xWrite */\n  winTruncate,                    /* xTruncate */\n  winSync,                        /* xSync */\n  winFileSize,                    /* xFileSize */\n  winLock,                        /* xLock */\n  winUnlock,                      /* xUnlock */\n  winCheckReservedLock,           /* xCheckReservedLock */\n  winFileControl,                 /* xFileControl */\n  winSectorSize,                  /* xSectorSize */\n  winDeviceCharacteristics,       /* xDeviceCharacteristics */\n  winShmMap,                      /* xShmMap */\n  winShmLock,                     /* xShmLock */\n  winShmBarrier,                  /* xShmBarrier */\n  winShmUnmap,                    /* xShmUnmap */\n  winFetch,                       /* xFetch */\n  winUnfetch                      /* xUnfetch */\n};\n\n/*\n** This vector defines all the methods that can operate on an\n** sqlite3_file for win32 without performing any locking.\n*/\nstatic const sqlite3_io_methods winIoNolockMethod = {\n  3,                              /* iVersion */\n  winClose,                       /* xClose */\n  winRead,                        /* xRead */\n  winWrite,                       /* xWrite */\n  winTruncate,                    /* xTruncate */\n  winSync,                        /* xSync */\n  winFileSize,                    /* xFileSize */\n  winNolockLock,                  /* xLock */\n  winNolockUnlock,                /* xUnlock */\n  winNolockCheckReservedLock,     /* xCheckReservedLock */\n  winFileControl,                 /* xFileControl */\n  winSectorSize,                  /* xSectorSize */\n  winDeviceCharacteristics,       /* xDeviceCharacteristics */\n  winShmMap,                      /* xShmMap */\n  winShmLock,                     /* xShmLock */\n  winShmBarrier,                  /* xShmBarrier */\n  winShmUnmap,                    /* xShmUnmap */\n  winFetch,                       /* xFetch */\n  winUnfetch                      /* xUnfetch */\n};\n\nstatic winVfsAppData winAppData = {\n  &winIoMethod,       /* pMethod */\n  0,                  /* pAppData */\n  0                   /* bNoLock */\n};\n\nstatic winVfsAppData winNolockAppData = {\n  &winIoNolockMethod, /* pMethod */\n  0,                  /* pAppData */\n  1                   /* bNoLock */\n};\n\n/****************************************************************************\n**************************** sqlite3_vfs methods ****************************\n**\n** This division contains the implementation of methods on the\n** sqlite3_vfs object.\n*/\n\n/*\n** This function returns non-zero if the specified UTF-8 string buffer\n** ends with a directory separator character or one was successfully\n** added to it.\n*/\nstatic int winMakeEndInDirSep(int nBuf, char *zBuf){\n  if( zBuf ){\n    int nLen = sqlite3Strlen30(zBuf);\n    if( nLen>0 ){\n      if( winIsDirSep(zBuf[nLen-1]) ){\n        return 1;\n      }else if( nLen+1<nBuf ){\n        if( !osGetenv ){\n          zBuf[nLen] = winGetDirSep();\n        }else if( winIsDriveLetterAndColon(zBuf) && winIsDirSep(zBuf[2]) ){\n          zBuf[nLen] = '\\\\';\n          zBuf[2]='\\\\';\n        }else{\n          zBuf[nLen] = '/';\n        }\n        zBuf[nLen+1] = '\\0';\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** If sqlite3_temp_directory is defined, take the mutex and return true.\n**\n** If sqlite3_temp_directory is NULL (undefined), omit the mutex and\n** return false.\n*/\nstatic int winTempDirDefined(void){\n  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  if( sqlite3_temp_directory!=0 ) return 1;\n  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  return 0;\n}\n\n/*\n** Create a temporary file name and store the resulting pointer into pzBuf.\n** The pointer returned in pzBuf must be freed via sqlite3_free().\n*/\nstatic int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){\n  static const char zChars[] =\n    \"abcdefghijklmnopqrstuvwxyz\"\n    \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n    \"0123456789\";\n  size_t i, j;\n  DWORD pid;\n  int nPre = sqlite3Strlen30(SQLITE_TEMP_FILE_PREFIX);\n  i64 nMax, nBuf, nDir, nLen;\n  char *zBuf;\n\n  /* It's odd to simulate an io-error here, but really this is just\n  ** using the io-error infrastructure to test that SQLite handles this\n  ** function failing.\n  */\n  SimulateIOError( return SQLITE_IOERR );\n\n  /* Allocate a temporary buffer to store the fully qualified file\n  ** name for the temporary file.  If this fails, we cannot continue.\n  */\n  nMax = pVfs->mxPathname;\n  nBuf = 2 + (i64)nMax;\n  zBuf = sqlite3MallocZero( nBuf );\n  if( !zBuf ){\n    OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n\n  /* Figure out the effective temporary directory.  First, check if one\n  ** has been explicitly set by the application; otherwise, use the one\n  ** configured by the operating system.\n  */\n  nDir = nMax - (nPre + 15);\n  assert( nDir>0 );\n  if( winTempDirDefined() ){\n    int nDirLen = sqlite3Strlen30(sqlite3_temp_directory);\n    if( nDirLen>0 ){\n      if( !winIsDirSep(sqlite3_temp_directory[nDirLen-1]) ){\n        nDirLen++;\n      }\n      if( nDirLen>nDir ){\n        sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n        sqlite3_free(zBuf);\n        OSTRACE((\"TEMP-FILENAME rc=SQLITE_ERROR\\n\"));\n        return winLogError(SQLITE_ERROR, 0, \"winGetTempname1\", 0);\n      }\n      sqlite3_snprintf(nMax, zBuf, \"%s\", sqlite3_temp_directory);\n    }\n    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n  }\n\n#if defined(__CYGWIN__)\n  else if( osGetenv!=NULL ){\n    static const char *azDirs[] = {\n       0, /* getenv(\"SQLITE_TMPDIR\") */\n       0, /* getenv(\"TMPDIR\") */\n       0, /* getenv(\"TMP\") */\n       0, /* getenv(\"TEMP\") */\n       0, /* getenv(\"USERPROFILE\") */\n       \"/var/tmp\",\n       \"/usr/tmp\",\n       \"/tmp\",\n       \".\",\n       0        /* List terminator */\n    };\n    unsigned int i;\n    const char *zDir = 0;\n\n    if( !azDirs[0] ) azDirs[0] = osGetenv(\"SQLITE_TMPDIR\");\n    if( !azDirs[1] ) azDirs[1] = osGetenv(\"TMPDIR\");\n    if( !azDirs[2] ) azDirs[2] = osGetenv(\"TMP\");\n    if( !azDirs[3] ) azDirs[3] = osGetenv(\"TEMP\");\n    if( !azDirs[4] ) azDirs[4] = osGetenv(\"USERPROFILE\");\n    for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){\n      void *zConverted;\n      if( zDir==0 ) continue;\n      /* If the path starts with a drive letter followed by the colon\n      ** character, assume it is already a native Win32 path; otherwise,\n      ** it must be converted to a native Win32 path via the Cygwin API\n      ** prior to using it.\n      */\n      {\n        zConverted = winConvertFromUtf8Filename(zDir);\n        if( !zConverted ){\n          sqlite3_free(zBuf);\n          OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n          return SQLITE_IOERR_NOMEM_BKPT;\n        }\n        if( winIsDir(zConverted) ){\n          sqlite3_snprintf(nMax, zBuf, \"%s\", zDir);\n          sqlite3_free(zConverted);\n          break;\n        }\n        sqlite3_free(zConverted);\n      }\n    }\n  }\n#endif\n\n#if !SQLITE_OS_WINRT && defined(_WIN32)\n  else if( osIsNT() ){\n    char *zMulti;\n    LPWSTR zWidePath = sqlite3MallocZero( nMax*sizeof(WCHAR) );\n    if( !zWidePath ){\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n    if( osGetTempPathW(nMax, zWidePath)==0 ){\n      sqlite3_free(zWidePath);\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_GETTEMPPATH\\n\"));\n      return winLogError(SQLITE_IOERR_GETTEMPPATH, osGetLastError(),\n                         \"winGetTempname2\", 0);\n    }\n    zMulti = winUnicodeToUtf8(zWidePath);\n    if( zMulti ){\n      sqlite3_snprintf(nMax, zBuf, \"%s\", zMulti);\n      sqlite3_free(zMulti);\n      sqlite3_free(zWidePath);\n    }else{\n      sqlite3_free(zWidePath);\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    char *zUtf8;\n    char *zMbcsPath = sqlite3MallocZero( nMax );\n    if( !zMbcsPath ){\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n    if( osGetTempPathA(nMax, zMbcsPath)==0 ){\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_GETTEMPPATH\\n\"));\n      return winLogError(SQLITE_IOERR_GETTEMPPATH, osGetLastError(),\n                         \"winGetTempname3\", 0);\n    }\n    zUtf8 = winMbcsToUtf8(zMbcsPath, osAreFileApisANSI());\n    if( zUtf8 ){\n      sqlite3_snprintf(nMax, zBuf, \"%s\", zUtf8);\n      sqlite3_free(zUtf8);\n    }else{\n      sqlite3_free(zBuf);\n      OSTRACE((\"TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\\n\"));\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n  }\n#endif /* SQLITE_WIN32_HAS_ANSI */\n#endif /* !SQLITE_OS_WINRT */\n\n  /*\n  ** Check to make sure the temporary directory ends with an appropriate\n  ** separator.  If it does not and there is not enough space left to add\n  ** one, fail.\n  */\n  if( !winMakeEndInDirSep(nDir+1, zBuf) ){\n    sqlite3_free(zBuf);\n    OSTRACE((\"TEMP-FILENAME rc=SQLITE_ERROR\\n\"));\n    return winLogError(SQLITE_ERROR, 0, \"winGetTempname4\", 0);\n  }\n\n  /*\n  ** Check that the output buffer is large enough for the temporary file\n  ** name in the following format:\n  **\n  **   \"<temporary_directory>/etilqs_XXXXXXXXXXXXXXX\\0\\0\"\n  **\n  ** If not, return SQLITE_ERROR.  The number 17 is used here in order to\n  ** account for the space used by the 15 character random suffix and the\n  ** two trailing NUL characters.  The final directory separator character\n  ** has already added if it was not already present.\n  */\n  nLen = sqlite3Strlen30(zBuf);\n  if( (nLen + nPre + 17) > nBuf ){\n    sqlite3_free(zBuf);\n    OSTRACE((\"TEMP-FILENAME rc=SQLITE_ERROR\\n\"));\n    return winLogError(SQLITE_ERROR, 0, \"winGetTempname5\", 0);\n  }\n\n  sqlite3_snprintf(nBuf-16-nLen, zBuf+nLen, SQLITE_TEMP_FILE_PREFIX);\n\n  j = sqlite3Strlen30(zBuf);\n  sqlite3_randomness(15, &zBuf[j]);\n  pid = osGetCurrentProcessId();\n  for(i=0; i<15; i++, j++){\n    zBuf[j] += pid & 0xff;\n    pid >>= 8;\n    zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];\n  }\n  zBuf[j] = 0;\n  zBuf[j+1] = 0;\n  *pzBuf = zBuf;\n\n  OSTRACE((\"TEMP-FILENAME name=%s, rc=SQLITE_OK\\n\", zBuf));\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if the named file is really a directory.  Return false if\n** it is something other than a directory, or if there is any kind of memory\n** allocation failure.\n*/\nstatic int winIsDir(const void *zConverted){\n  DWORD attr;\n  int rc = 0;\n  DWORD lastErrno;\n\n  if( osIsNT() ){\n    int cnt = 0;\n    WIN32_FILE_ATTRIBUTE_DATA sAttrData;\n    memset(&sAttrData, 0, sizeof(sAttrData));\n    while( !(rc = osGetFileAttributesExW((LPCWSTR)zConverted,\n                             GetFileExInfoStandard,\n                             &sAttrData)) && winRetryIoerr(&cnt, &lastErrno) ){}\n    if( !rc ){\n      return 0; /* Invalid name? */\n    }\n    attr = sAttrData.dwFileAttributes;\n#if SQLITE_OS_WINCE==0 && defined(SQLITE_WIN32_HAS_ANSI)\n  }else{\n    attr = osGetFileAttributesA((char*)zConverted);\n#endif\n  }\n  return (attr!=INVALID_FILE_ATTRIBUTES) && (attr&FILE_ATTRIBUTE_DIRECTORY);\n}\n\n/* forward reference */\nstatic int winAccess(\n  sqlite3_vfs *pVfs,         /* Not used on win32 */\n  const char *zFilename,     /* Name of file to check */\n  int flags,                 /* Type of test to make on this file */\n  int *pResOut               /* OUT: Result */\n);\n\n/*\n** The Windows version of xAccess() accepts an extra bit in the flags\n** parameter that prevents an anti-virus retry loop.\n*/\n#define NORETRY 0x4000\n\n/*\n** Open a file.\n*/\nstatic int winOpen(\n  sqlite3_vfs *pVfs,        /* Used to get maximum path length and AppData */\n  const char *zName,        /* Name of the file (UTF-8) */\n  sqlite3_file *id,         /* Write the SQLite file handle here */\n  int flags,                /* Open mode flags */\n  int *pOutFlags            /* Status return flags */\n){\n  HANDLE h;\n  DWORD lastErrno = 0;\n  DWORD dwDesiredAccess;\n  DWORD dwShareMode;\n  DWORD dwCreationDisposition;\n  DWORD dwFlagsAndAttributes = 0;\n#if SQLITE_OS_WINCE\n  int isTemp = 0;\n#endif\n  winVfsAppData *pAppData;\n  winFile *pFile = (winFile*)id;\n  void *zConverted;              /* Filename in OS encoding */\n  const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */\n  int cnt = 0;\n  int isRO = 0;              /* file is known to be accessible readonly */\n\n  /* If argument zPath is a NULL pointer, this function is required to open\n  ** a temporary file. Use this buffer to store the file name in.\n  */\n  char *zTmpname = 0; /* For temporary filename, if necessary. */\n\n  int rc = SQLITE_OK;            /* Function Return Code */\n#if !defined(NDEBUG) || SQLITE_OS_WINCE\n  int eType = flags&0x0FFF00;  /* Type of file to open */\n#endif\n\n  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);\n  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);\n  int isCreate     = (flags & SQLITE_OPEN_CREATE);\n  int isReadonly   = (flags & SQLITE_OPEN_READONLY);\n  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);\n\n#ifndef NDEBUG\n  int isOpenJournal = (isCreate && (\n        eType==SQLITE_OPEN_SUPER_JOURNAL\n     || eType==SQLITE_OPEN_MAIN_JOURNAL\n     || eType==SQLITE_OPEN_WAL\n  ));\n#endif\n\n  OSTRACE((\"OPEN name=%s, pFile=%p, flags=%x, pOutFlags=%p\\n\",\n           zUtf8Name, id, flags, pOutFlags));\n\n  /* Check the following statements are true:\n  **\n  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and\n  **   (b) if CREATE is set, then READWRITE must also be set, and\n  **   (c) if EXCLUSIVE is set, then CREATE must also be set.\n  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.\n  */\n  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));\n  assert(isCreate==0 || isReadWrite);\n  assert(isExclusive==0 || isCreate);\n  assert(isDelete==0 || isCreate);\n\n  /* The main DB, main journal, WAL file and super-journal are never\n  ** automatically deleted. Nor are they ever temporary files.  */\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_SUPER_JOURNAL );\n  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );\n\n  /* Assert that the upper layer has set one of the \"file-type\" flags. */\n  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB\n       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL\n       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_SUPER_JOURNAL\n       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL\n  );\n\n  assert( pFile!=0 );\n  memset(pFile, 0, sizeof(winFile));\n  pFile->h = INVALID_HANDLE_VALUE;\n\n#if SQLITE_OS_WINRT\n  if( !zUtf8Name && !sqlite3_temp_directory ){\n    sqlite3_log(SQLITE_ERROR,\n        \"sqlite3_temp_directory variable should be set for WinRT\");\n  }\n#endif\n\n  /* If the second argument to this function is NULL, generate a\n  ** temporary file name to use\n  */\n  if( !zUtf8Name ){\n    assert( isDelete && !isOpenJournal );\n    rc = winGetTempname(pVfs, &zTmpname);\n    if( rc!=SQLITE_OK ){\n      OSTRACE((\"OPEN name=%s, rc=%s\", zUtf8Name, sqlite3ErrName(rc)));\n      return rc;\n    }\n    zUtf8Name = zTmpname;\n  }\n\n  /* Database filenames are double-zero terminated if they are not\n  ** URIs with parameters.  Hence, they can always be passed into\n  ** sqlite3_uri_parameter().\n  */\n  assert( (eType!=SQLITE_OPEN_MAIN_DB) || (flags & SQLITE_OPEN_URI) ||\n       zUtf8Name[sqlite3Strlen30(zUtf8Name)+1]==0 );\n\n  /* Convert the filename to the system encoding. */\n  zConverted = winConvertFromUtf8Filename(zUtf8Name);\n  if( zConverted==0 ){\n    sqlite3_free(zTmpname);\n    OSTRACE((\"OPEN name=%s, rc=SQLITE_IOERR_NOMEM\", zUtf8Name));\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n\n  if( winIsDir(zConverted) ){\n    sqlite3_free(zConverted);\n    sqlite3_free(zTmpname);\n    OSTRACE((\"OPEN name=%s, rc=SQLITE_CANTOPEN_ISDIR\", zUtf8Name));\n    return SQLITE_CANTOPEN_ISDIR;\n  }\n\n  if( isReadWrite ){\n    dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;\n  }else{\n    dwDesiredAccess = GENERIC_READ;\n  }\n\n  /* SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is\n  ** created. SQLite doesn't use it to indicate \"exclusive access\"\n  ** as it is usually understood.\n  */\n  if( isExclusive ){\n    /* Creates a new file, only if it does not already exist. */\n    /* If the file exists, it fails. */\n    dwCreationDisposition = CREATE_NEW;\n  }else if( isCreate ){\n    /* Open existing file, or create if it doesn't exist */\n    dwCreationDisposition = OPEN_ALWAYS;\n  }else{\n    /* Opens a file, only if it exists. */\n    dwCreationDisposition = OPEN_EXISTING;\n  }\n\n  if( 0==sqlite3_uri_boolean(zName, \"exclusive\", 0) ){\n    dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;\n  }else{\n    dwShareMode = 0;\n  }\n\n  if( isDelete ){\n#if SQLITE_OS_WINCE\n    dwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;\n    isTemp = 1;\n#else\n    dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY\n                               | FILE_ATTRIBUTE_HIDDEN\n                               | FILE_FLAG_DELETE_ON_CLOSE;\n#endif\n  }else{\n    dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;\n  }\n  /* Reports from the internet are that performance is always\n  ** better if FILE_FLAG_RANDOM_ACCESS is used.  Ticket #2699. */\n#if SQLITE_OS_WINCE\n  dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;\n#endif\n\n  if( osIsNT() ){\n#if SQLITE_OS_WINRT\n    CREATEFILE2_EXTENDED_PARAMETERS extendedParameters;\n    extendedParameters.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);\n    extendedParameters.dwFileAttributes =\n            dwFlagsAndAttributes & FILE_ATTRIBUTE_MASK;\n    extendedParameters.dwFileFlags = dwFlagsAndAttributes & FILE_FLAG_MASK;\n    extendedParameters.dwSecurityQosFlags = SECURITY_ANONYMOUS;\n    extendedParameters.lpSecurityAttributes = NULL;\n    extendedParameters.hTemplateFile = NULL;\n    do{\n      h = osCreateFile2((LPCWSTR)zConverted,\n                        dwDesiredAccess,\n                        dwShareMode,\n                        dwCreationDisposition,\n                        &extendedParameters);\n      if( h!=INVALID_HANDLE_VALUE ) break;\n      if( isReadWrite ){\n        int rc2;\n        sqlite3BeginBenignMalloc();\n        rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);\n        sqlite3EndBenignMalloc();\n        if( rc2==SQLITE_OK && isRO ) break;\n      }\n    }while( winRetryIoerr(&cnt, &lastErrno) );\n#else\n    do{\n      h = osCreateFileW((LPCWSTR)zConverted,\n                        dwDesiredAccess,\n                        dwShareMode, NULL,\n                        dwCreationDisposition,\n                        dwFlagsAndAttributes,\n                        NULL);\n      if( h!=INVALID_HANDLE_VALUE ) break;\n      if( isReadWrite ){\n        int rc2;\n        sqlite3BeginBenignMalloc();\n        rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);\n        sqlite3EndBenignMalloc();\n        if( rc2==SQLITE_OK && isRO ) break;\n      }\n    }while( winRetryIoerr(&cnt, &lastErrno) );\n#endif\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    do{\n      h = osCreateFileA((LPCSTR)zConverted,\n                        dwDesiredAccess,\n                        dwShareMode, NULL,\n                        dwCreationDisposition,\n                        dwFlagsAndAttributes,\n                        NULL);\n      if( h!=INVALID_HANDLE_VALUE ) break;\n      if( isReadWrite ){\n        int rc2;\n        sqlite3BeginBenignMalloc();\n        rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);\n        sqlite3EndBenignMalloc();\n        if( rc2==SQLITE_OK && isRO ) break;\n      }\n    }while( winRetryIoerr(&cnt, &lastErrno) );\n  }\n#endif\n  winLogIoerr(cnt, __LINE__);\n\n  OSTRACE((\"OPEN file=%p, name=%s, access=%lx, rc=%s\\n\", h, zUtf8Name,\n           dwDesiredAccess, (h==INVALID_HANDLE_VALUE) ? \"failed\" : \"ok\"));\n\n  if( h==INVALID_HANDLE_VALUE ){\n    sqlite3_free(zConverted);\n    sqlite3_free(zTmpname);\n    if( isReadWrite && isRO && !isExclusive ){\n      return winOpen(pVfs, zName, id,\n         ((flags|SQLITE_OPEN_READONLY) &\n                     ~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)),\n         pOutFlags);\n    }else{\n      pFile->lastErrno = lastErrno;\n      winLogError(SQLITE_CANTOPEN, pFile->lastErrno, \"winOpen\", zUtf8Name);\n      return SQLITE_CANTOPEN_BKPT;\n    }\n  }\n\n  if( pOutFlags ){\n    if( isReadWrite ){\n      *pOutFlags = SQLITE_OPEN_READWRITE;\n    }else{\n      *pOutFlags = SQLITE_OPEN_READONLY;\n    }\n  }\n\n  OSTRACE((\"OPEN file=%p, name=%s, access=%lx, pOutFlags=%p, *pOutFlags=%d, \"\n           \"rc=%s\\n\", h, zUtf8Name, dwDesiredAccess, pOutFlags, pOutFlags ?\n           *pOutFlags : 0, (h==INVALID_HANDLE_VALUE) ? \"failed\" : \"ok\"));\n\n  pAppData = (winVfsAppData*)pVfs->pAppData;\n\n#if SQLITE_OS_WINCE\n  {\n    if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB\n         && ((pAppData==NULL) || !pAppData->bNoLock)\n         && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK\n    ){\n      osCloseHandle(h);\n      sqlite3_free(zConverted);\n      sqlite3_free(zTmpname);\n      OSTRACE((\"OPEN-CE-LOCK name=%s, rc=%s\\n\", zName, sqlite3ErrName(rc)));\n      return rc;\n    }\n  }\n  if( isTemp ){\n    pFile->zDeleteOnClose = zConverted;\n  }else\n#endif\n  {\n    sqlite3_free(zConverted);\n  }\n\n  sqlite3_free(zTmpname);\n  id->pMethods = pAppData ? pAppData->pMethod : &winIoMethod;\n  pFile->pVfs = pVfs;\n  pFile->h = h;\n  if( isReadonly ){\n    pFile->ctrlFlags |= WINFILE_RDONLY;\n  }\n  if( (flags & SQLITE_OPEN_MAIN_DB)\n   && sqlite3_uri_boolean(zName, \"psow\", SQLITE_POWERSAFE_OVERWRITE)\n  ){\n    pFile->ctrlFlags |= WINFILE_PSOW;\n  }\n  pFile->lastErrno = NO_ERROR;\n  pFile->zPath = zName;\n#if SQLITE_MAX_MMAP_SIZE>0\n  pFile->hMap = NULL;\n  pFile->pMapRegion = 0;\n  pFile->mmapSize = 0;\n  pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;\n#endif\n\n  OpenCounter(+1);\n  return rc;\n}\n\n/*\n** Delete the named file.\n**\n** Note that Windows does not allow a file to be deleted if some other\n** process has it open.  Sometimes a virus scanner or indexing program\n** will open a journal file shortly after it is created in order to do\n** whatever it does.  While this other process is holding the\n** file open, we will be unable to delete it.  To work around this\n** problem, we delay 100 milliseconds and try to delete again.  Up\n** to MX_DELETION_ATTEMPTs deletion attempts are run before giving\n** up and returning an error.\n*/\nstatic int winDelete(\n  sqlite3_vfs *pVfs,          /* Not used on win32 */\n  const char *zFilename,      /* Name of file to delete */\n  int syncDir                 /* Not used on win32 */\n){\n  int cnt = 0;\n  int rc;\n  DWORD attr;\n  DWORD lastErrno = 0;\n  void *zConverted;\n  UNUSED_PARAMETER(pVfs);\n  UNUSED_PARAMETER(syncDir);\n\n  SimulateIOError(return SQLITE_IOERR_DELETE);\n  OSTRACE((\"DELETE name=%s, syncDir=%d\\n\", zFilename, syncDir));\n\n  zConverted = winConvertFromUtf8Filename(zFilename);\n  if( zConverted==0 ){\n    OSTRACE((\"DELETE name=%s, rc=SQLITE_IOERR_NOMEM\\n\", zFilename));\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n  if( osIsNT() ){\n    do {\n#if SQLITE_OS_WINRT\n      WIN32_FILE_ATTRIBUTE_DATA sAttrData;\n      memset(&sAttrData, 0, sizeof(sAttrData));\n      if ( osGetFileAttributesExW(zConverted, GetFileExInfoStandard,\n                                  &sAttrData) ){\n        attr = sAttrData.dwFileAttributes;\n      }else{\n        lastErrno = osGetLastError();\n        if( lastErrno==ERROR_FILE_NOT_FOUND\n         || lastErrno==ERROR_PATH_NOT_FOUND ){\n          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */\n        }else{\n          rc = SQLITE_ERROR;\n        }\n        break;\n      }\n#else\n      attr = osGetFileAttributesW(zConverted);\n#endif\n      if ( attr==INVALID_FILE_ATTRIBUTES ){\n        lastErrno = osGetLastError();\n        if( lastErrno==ERROR_FILE_NOT_FOUND\n         || lastErrno==ERROR_PATH_NOT_FOUND ){\n          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */\n        }else{\n          rc = SQLITE_ERROR;\n        }\n        break;\n      }\n      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){\n        rc = SQLITE_ERROR; /* Files only. */\n        break;\n      }\n      if ( osDeleteFileW(zConverted) ){\n        rc = SQLITE_OK; /* Deleted OK. */\n        break;\n      }\n      if ( !winRetryIoerr(&cnt, &lastErrno) ){\n        rc = SQLITE_ERROR; /* No more retries. */\n        break;\n      }\n    } while(1);\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    do {\n      attr = osGetFileAttributesA(zConverted);\n      if ( attr==INVALID_FILE_ATTRIBUTES ){\n        lastErrno = osGetLastError();\n        if( lastErrno==ERROR_FILE_NOT_FOUND\n         || lastErrno==ERROR_PATH_NOT_FOUND ){\n          rc = SQLITE_IOERR_DELETE_NOENT; /* Already gone? */\n        }else{\n          rc = SQLITE_ERROR;\n        }\n        break;\n      }\n      if ( attr&FILE_ATTRIBUTE_DIRECTORY ){\n        rc = SQLITE_ERROR; /* Files only. */\n        break;\n      }\n      if ( osDeleteFileA(zConverted) ){\n        rc = SQLITE_OK; /* Deleted OK. */\n        break;\n      }\n      if ( !winRetryIoerr(&cnt, &lastErrno) ){\n        rc = SQLITE_ERROR; /* No more retries. */\n        break;\n      }\n    } while(1);\n  }\n#endif\n  if( rc && rc!=SQLITE_IOERR_DELETE_NOENT ){\n    rc = winLogError(SQLITE_IOERR_DELETE, lastErrno, \"winDelete\", zFilename);\n  }else{\n    winLogIoerr(cnt, __LINE__);\n  }\n  sqlite3_free(zConverted);\n  OSTRACE((\"DELETE name=%s, rc=%s\\n\", zFilename, sqlite3ErrName(rc)));\n  return rc;\n}\n\n/*\n** Check the existence and status of a file.\n*/\nstatic int winAccess(\n  sqlite3_vfs *pVfs,         /* Not used on win32 */\n  const char *zFilename,     /* Name of file to check */\n  int flags,                 /* Type of test to make on this file */\n  int *pResOut               /* OUT: Result */\n){\n  DWORD attr;\n  int rc = 0;\n  DWORD lastErrno = 0;\n  void *zConverted;\n  int noRetry = 0;           /* Do not use winRetryIoerr() */\n  UNUSED_PARAMETER(pVfs);\n\n  if( (flags & NORETRY)!=0 ){\n    noRetry = 1;\n    flags &= ~NORETRY;\n  }\n\n  SimulateIOError( return SQLITE_IOERR_ACCESS; );\n  OSTRACE((\"ACCESS name=%s, flags=%x, pResOut=%p\\n\",\n           zFilename, flags, pResOut));\n\n  if( zFilename==0 ){\n    *pResOut = 0;\n    OSTRACE((\"ACCESS name=%s, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\\n\",\n             zFilename, pResOut, *pResOut));\n    return SQLITE_OK;\n  }\n\n  zConverted = winConvertFromUtf8Filename(zFilename);\n  if( zConverted==0 ){\n    OSTRACE((\"ACCESS name=%s, rc=SQLITE_IOERR_NOMEM\\n\", zFilename));\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n  if( osIsNT() ){\n    int cnt = 0;\n    WIN32_FILE_ATTRIBUTE_DATA sAttrData;\n    memset(&sAttrData, 0, sizeof(sAttrData));\n    while( !(rc = osGetFileAttributesExW((LPCWSTR)zConverted,\n                             GetFileExInfoStandard,\n                             &sAttrData))\n       && !noRetry\n       && winRetryIoerr(&cnt, &lastErrno)\n    ){ /* Loop until true */}\n    if( rc ){\n      /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file\n      ** as if it does not exist.\n      */\n      if(    flags==SQLITE_ACCESS_EXISTS\n          && sAttrData.nFileSizeHigh==0\n          && sAttrData.nFileSizeLow==0 ){\n        attr = INVALID_FILE_ATTRIBUTES;\n      }else{\n        attr = sAttrData.dwFileAttributes;\n      }\n    }else{\n      winLogIoerr(cnt, __LINE__);\n      if( lastErrno!=ERROR_FILE_NOT_FOUND && lastErrno!=ERROR_PATH_NOT_FOUND ){\n        sqlite3_free(zConverted);\n        return winLogError(SQLITE_IOERR_ACCESS, lastErrno, \"winAccess\",\n                           zFilename);\n      }else{\n        attr = INVALID_FILE_ATTRIBUTES;\n      }\n    }\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    attr = osGetFileAttributesA((char*)zConverted);\n  }\n#endif\n  sqlite3_free(zConverted);\n  switch( flags ){\n    case SQLITE_ACCESS_READ:\n    case SQLITE_ACCESS_EXISTS:\n      rc = attr!=INVALID_FILE_ATTRIBUTES;\n      break;\n    case SQLITE_ACCESS_READWRITE:\n      rc = attr!=INVALID_FILE_ATTRIBUTES &&\n             (attr & FILE_ATTRIBUTE_READONLY)==0;\n      break;\n    default:\n      assert(!\"Invalid flags argument\");\n  }\n  *pResOut = rc;\n  OSTRACE((\"ACCESS name=%s, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\\n\",\n           zFilename, pResOut, *pResOut));\n  return SQLITE_OK;\n}\n\n/*\n** Returns non-zero if the specified path name starts with the \"long path\"\n** prefix.\n*/\nstatic BOOL winIsLongPathPrefix(\n  const char *zPathname\n){\n  return ( zPathname[0]=='\\\\' && zPathname[1]=='\\\\'\n        && zPathname[2]=='?'  && zPathname[3]=='\\\\' );\n}\n\n/*\n** Returns non-zero if the specified path name starts with a drive letter\n** followed by a colon character.\n*/\nstatic BOOL winIsDriveLetterAndColon(\n  const char *zPathname\n){\n  return ( sqlite3Isalpha(zPathname[0]) && zPathname[1]==':' );\n}\n\n#ifdef _WIN32\n/*\n** Returns non-zero if the specified path name should be used verbatim.  If\n** non-zero is returned from this function, the calling function must simply\n** use the provided path name verbatim -OR- resolve it into a full path name\n** using the GetFullPathName Win32 API function (if available).\n*/\nstatic BOOL winIsVerbatimPathname(\n  const char *zPathname\n){\n  /*\n  ** If the path name starts with a forward slash or a backslash, it is either\n  ** a legal UNC name, a volume relative path, or an absolute path name in the\n  ** \"Unix\" format on Windows.  There is no easy way to differentiate between\n  ** the final two cases; therefore, we return the safer return value of TRUE\n  ** so that callers of this function will simply use it verbatim.\n  */\n  if ( winIsDirSep(zPathname[0]) ){\n    return TRUE;\n  }\n\n  /*\n  ** If the path name starts with a letter and a colon it is either a volume\n  ** relative path or an absolute path.  Callers of this function must not\n  ** attempt to treat it as a relative path name (i.e. they should simply use\n  ** it verbatim).\n  */\n  if ( winIsDriveLetterAndColon(zPathname) ){\n    return TRUE;\n  }\n\n  /*\n  ** If we get to this point, the path name should almost certainly be a purely\n  ** relative one (i.e. not a UNC name, not absolute, and not volume relative).\n  */\n  return FALSE;\n}\n#endif /* _WIN32 */\n\n#ifdef __CYGWIN__\n/*\n** Simplify a filename into its canonical form\n** by making the following changes:\n**\n**  * convert any '/' to '\\' (win32) or reverse (Cygwin)\n**  * removing any trailing and duplicate / (except for UNC paths)\n**  * convert /./ into just /\n**\n** Changes are made in-place.  Return the new name length.\n**\n** The original filename is in z[0..]. If the path is shortened,\n** no-longer used bytes will be written by '\\0'.\n*/\nstatic void winSimplifyName(char *z){\n  int i, j;\n  for(i=j=0; z[i]; ++i){\n    if( winIsDirSep(z[i]) ){\n#if !defined(SQLITE_TEST)\n      /* Some test-cases assume that \"./foo\" and \"foo\" are different */\n      if( z[i+1]=='.' && winIsDirSep(z[i+2]) ){\n        ++i;\n        continue;\n      }\n#endif\n      if( !z[i+1] || (winIsDirSep(z[i+1]) && (i!=0)) ){\n        continue;\n      }\n      z[j++] = osGetenv?'/':'\\\\';\n    }else{\n      z[j++] = z[i];\n    }\n  }\n  while(j<i) z[j++] = '\\0';\n}\n\n#define SQLITE_MAX_SYMLINKS 100\n\nstatic int mkFullPathname(\n  const char *zPath,              /* Input path */\n  char *zOut,                     /* Output buffer */\n  int nOut                        /* Allocated size of buffer zOut */\n){\n  int nPath = sqlite3Strlen30(zPath);\n  int iOff = 0;\n  if( zPath[0]!='/' ){\n    if( osGetcwd(zOut, nOut-2)==0 ){\n      return winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)osErrno, \"getcwd\", zPath);\n    }\n    iOff = sqlite3Strlen30(zOut);\n    zOut[iOff++] = '/';\n  }\n  if( (iOff+nPath+1)>nOut ){\n    /* SQLite assumes that xFullPathname() nul-terminates the output buffer\n    ** even if it returns an error.  */\n    zOut[iOff] = '\\0';\n    return SQLITE_CANTOPEN_BKPT;\n  }\n  sqlite3_snprintf(nOut-iOff, &zOut[iOff], \"%s\", zPath);\n  return SQLITE_OK;\n}\n#endif /* __CYGWIN__ */\n\n/*\n** Turn a relative pathname into a full pathname.  Write the full\n** pathname into zOut[].  zOut[] will be at least pVfs->mxPathname\n** bytes in size.\n*/\nstatic int winFullPathnameNoMutex(\n  sqlite3_vfs *pVfs,            /* Pointer to vfs object */\n  const char *zRelative,        /* Possibly relative input path */\n  int nFull,                    /* Size of output buffer in bytes */\n  char *zFull                   /* Output buffer */\n){\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n  int nByte;\n  void *zConverted;\n  char *zOut;\n#endif\n\n  /* If this path name begins with \"/X:\" or \"\\\\?\\\", where \"X\" is any\n  ** alphabetic character, discard the initial \"/\" from the pathname.\n  */\n  if( zRelative[0]=='/' && (winIsDriveLetterAndColon(zRelative+1)\n       || winIsLongPathPrefix(zRelative+1)) ){\n    zRelative++;\n  }\n\n  SimulateIOError( return SQLITE_ERROR );\n\n#ifdef __CYGWIN__\n  if( osGetcwd ){\n    zFull[nFull-1] = '\\0';\n    if( !winIsDriveLetterAndColon(zRelative) || !winIsDirSep(zRelative[2]) ){\n      int rc = SQLITE_OK;\n      int nLink = 1;                /* Number of symbolic links followed so far */\n      const char *zIn = zRelative;      /* Input path for each iteration of loop */\n      char *zDel = 0;\n      struct stat buf;\n\n      UNUSED_PARAMETER(pVfs);\n\n      do {\n        /* Call lstat() on path zIn. Set bLink to true if the path is a symbolic\n        ** link, or false otherwise.  */\n        int bLink = 0;\n        if( osLstat && osReadlink ) {\n          if( osLstat(zIn, &buf)!=0 ){\n            int myErrno = osErrno;\n            if( myErrno!=ENOENT ){\n              rc = winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)myErrno, \"lstat\", zIn);\n            }\n          }else{\n            bLink = ((buf.st_mode & 0170000) == 0120000);\n          }\n\n          if( bLink ){\n            if( zDel==0 ){\n              zDel = sqlite3MallocZero(nFull);\n              if( zDel==0 ) rc = SQLITE_NOMEM;\n            }else if( ++nLink>SQLITE_MAX_SYMLINKS ){\n              rc = SQLITE_CANTOPEN_BKPT;\n            }\n\n            if( rc==SQLITE_OK ){\n              nByte = osReadlink(zIn, zDel, nFull-1);\n              if( nByte ==(DWORD)-1 ){\n                rc = winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)osErrno, \"readlink\", zIn);\n              }else{\n                if( zDel[0]!='/' ){\n                  int n;\n                  for(n = sqlite3Strlen30(zIn); n>0 && zIn[n-1]!='/'; n--);\n                  if( nByte+n+1>nFull ){\n                    rc = SQLITE_CANTOPEN_BKPT;\n                  }else{\n                    memmove(&zDel[n], zDel, nByte+1);\n                    memcpy(zDel, zIn, n);\n                    nByte += n;\n                  }\n                }\n                zDel[nByte] = '\\0';\n              }\n            }\n\n            zIn = zDel;\n          }\n        }\n\n        assert( rc!=SQLITE_OK || zIn!=zFull || zIn[0]=='/' );\n        if( rc==SQLITE_OK && zIn!=zFull ){\n          rc = mkFullPathname(zIn, zFull, nFull);\n        }\n        if( bLink==0 ) break;\n        zIn = zFull;\n      }while( rc==SQLITE_OK );\n\n      sqlite3_free(zDel);\n      winSimplifyName(zFull);\n      return rc;\n    }\n  }\n#endif /* __CYGWIN__ */\n\n#if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && defined(_WIN32)\n  SimulateIOError( return SQLITE_ERROR );\n  /* WinCE has no concept of a relative pathname, or so I am told. */\n  /* WinRT has no way to convert a relative path to an absolute one. */\n  if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){\n    /*\n    ** NOTE: We are dealing with a relative path name and the data\n    **       directory has been set.  Therefore, use it as the basis\n    **       for converting the relative path name to an absolute\n    **       one by prepending the data directory and a backslash.\n    */\n    sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s%c%s\",\n                     sqlite3_data_directory, winGetDirSep(), zRelative);\n  }else{\n    sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s\", zRelative);\n  }\n  return SQLITE_OK;\n#endif\n\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT\n#if defined(_WIN32)\n  /* It's odd to simulate an io-error here, but really this is just\n  ** using the io-error infrastructure to test that SQLite handles this\n  ** function failing. This function could fail if, for example, the\n  ** current working directory has been unlinked.\n  */\n  SimulateIOError( return SQLITE_ERROR );\n  if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){\n    /*\n    ** NOTE: We are dealing with a relative path name and the data\n    **       directory has been set.  Therefore, use it as the basis\n    **       for converting the relative path name to an absolute\n    **       one by prepending the data directory and a backslash.\n    */\n    sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s%c%s\",\n                     sqlite3_data_directory, winGetDirSep(), zRelative);\n    return SQLITE_OK;\n  }\n#endif\n  zConverted = winConvertFromUtf8Filename(zRelative);\n  if( zConverted==0 ){\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n  if( osIsNT() ){\n    LPWSTR zTemp;\n    nByte = osGetFullPathNameW((LPCWSTR)zConverted, 0, 0, 0);\n    if( nByte==0 ){\n      sqlite3_free(zConverted);\n      return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),\n                         \"winFullPathname1\", zRelative);\n    }\n    nByte += 3;\n    zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );\n    if( zTemp==0 ){\n      sqlite3_free(zConverted);\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n    nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);\n    if( nByte==0 ){\n      sqlite3_free(zConverted);\n      sqlite3_free(zTemp);\n      return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),\n                         \"winFullPathname2\", zRelative);\n    }\n    sqlite3_free(zConverted);\n    zOut = winUnicodeToUtf8(zTemp);\n    sqlite3_free(zTemp);\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    char *zTemp;\n    nByte = osGetFullPathNameA((char*)zConverted, 0, 0, 0);\n    if( nByte==0 ){\n      sqlite3_free(zConverted);\n      return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),\n                         \"winFullPathname3\", zRelative);\n    }\n    zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) + 3*sizeof(zTemp[0]) );\n    if( zTemp==0 ){\n      sqlite3_free(zConverted);\n      return SQLITE_IOERR_NOMEM_BKPT;\n    }\n    nByte = osGetFullPathNameA((char*)zConverted, nByte+3, zTemp, 0);\n    if( nByte==0 ){\n      sqlite3_free(zConverted);\n      sqlite3_free(zTemp);\n      return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),\n                         \"winFullPathname4\", zRelative);\n    }\n    sqlite3_free(zConverted);\n    zOut = winMbcsToUtf8(zTemp, osAreFileApisANSI());\n    sqlite3_free(zTemp);\n  }\n#endif\n  if( zOut ){\n#ifdef __CYGWIN__\n    if( memcmp(zOut, \"\\\\\\\\?\\\\\", 4) ){\n      sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s\", zOut);\n    }else if( memcmp(zOut+4, \"UNC\\\\\", 4) ){\n      sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s\", zOut+4);\n    }else{\n      char *p = zOut+6;\n      *p = '\\\\';\n      if( osGetcwd ){\n        /* On Cygwin, UNC paths use forward slashes */\n        while( *p ){\n          if( *p=='\\\\' ) *p = '/';\n          ++p;\n        }\n      }\n      sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s\", zOut+6);\n    }\n#else\n    sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, \"%s\", zOut);\n#endif /* __CYGWIN__ */\n    sqlite3_free(zOut);\n    return SQLITE_OK;\n  }else{\n    return SQLITE_IOERR_NOMEM_BKPT;\n  }\n#endif\n}\nstatic int winFullPathname(\n  sqlite3_vfs *pVfs,            /* Pointer to vfs object */\n  const char *zRelative,        /* Possibly relative input path */\n  int nFull,                    /* Size of output buffer in bytes */\n  char *zFull                   /* Output buffer */\n){\n  int rc;\n  MUTEX_LOGIC( sqlite3_mutex *pMutex; )\n  MUTEX_LOGIC( pMutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR); )\n  sqlite3_mutex_enter(pMutex);\n  rc = winFullPathnameNoMutex(pVfs, zRelative, nFull, zFull);\n  sqlite3_mutex_leave(pMutex);\n  return rc;\n}\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n/*\n** Interfaces for opening a shared library, finding entry points\n** within the shared library, and closing the shared library.\n*/\nstatic void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){\n  HANDLE h;\n  void *zConverted = winConvertFromUtf8Filename(zFilename);\n  UNUSED_PARAMETER(pVfs);\n  if( zConverted==0 ){\n    OSTRACE((\"DLOPEN name=%s, handle=%p\\n\", zFilename, (void*)0));\n    return 0;\n  }\n  if( osIsNT() ){\n#if SQLITE_OS_WINRT\n    h = osLoadPackagedLibrary((LPCWSTR)zConverted, 0);\n#else\n    h = osLoadLibraryW((LPCWSTR)zConverted);\n#endif\n  }\n#ifdef SQLITE_WIN32_HAS_ANSI\n  else{\n    h = osLoadLibraryA((char*)zConverted);\n  }\n#endif\n  OSTRACE((\"DLOPEN name=%s, handle=%p\\n\", zFilename, (void*)h));\n  sqlite3_free(zConverted);\n  return (void*)h;\n}\nstatic void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){\n  UNUSED_PARAMETER(pVfs);\n  winGetLastErrorMsg(osGetLastError(), nBuf, zBufOut);\n}\nstatic void (*winDlSym(sqlite3_vfs *pVfs,void *pH,const char *zSym))(void){\n  FARPROC proc;\n  UNUSED_PARAMETER(pVfs);\n  proc = osGetProcAddressA((HANDLE)pH, zSym);\n  OSTRACE((\"DLSYM handle=%p, symbol=%s, address=%p\\n\",\n           (void*)pH, zSym, (void*)proc));\n  return (void(*)(void))proc;\n}\nstatic void winDlClose(sqlite3_vfs *pVfs, void *pHandle){\n  UNUSED_PARAMETER(pVfs);\n  osFreeLibrary((HANDLE)pHandle);\n  OSTRACE((\"DLCLOSE handle=%p\\n\", (void*)pHandle));\n}\n#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */\n  #define winDlOpen  0\n  #define winDlError 0\n  #define winDlSym   0\n  #define winDlClose 0\n#endif\n\n/* State information for the randomness gatherer. */\ntypedef struct EntropyGatherer EntropyGatherer;\nstruct EntropyGatherer {\n  unsigned char *a;   /* Gather entropy into this buffer */\n  int na;             /* Size of a[] in bytes */\n  int i;              /* XOR next input into a[i] */\n  int nXor;           /* Number of XOR operations done */\n};\n\n#if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)\n/* Mix sz bytes of entropy into p. */\nstatic void xorMemory(EntropyGatherer *p, unsigned char *x, int sz){\n  int j, k;\n  for(j=0, k=p->i; j<sz; j++){\n    p->a[k++] ^= x[j];\n    if( k>=p->na ) k = 0;\n  }\n  p->i = k;\n  p->nXor += sz;\n}\n#endif /* !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) */\n\n/*\n** Write up to nBuf bytes of randomness into zBuf.\n*/\nstatic int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){\n#if defined(SQLITE_TEST) || defined(SQLITE_OMIT_RANDOMNESS)\n  UNUSED_PARAMETER(pVfs);\n  memset(zBuf, 0, nBuf);\n  return nBuf;\n#else\n  EntropyGatherer e;\n  UNUSED_PARAMETER(pVfs);\n  memset(zBuf, 0, nBuf);\n  e.a = (unsigned char*)zBuf;\n  e.na = nBuf;\n  e.nXor = 0;\n  e.i = 0;\n  {\n    SYSTEMTIME x;\n    osGetSystemTime(&x);\n    xorMemory(&e, (unsigned char*)&x, sizeof(SYSTEMTIME));\n  }\n  {\n    DWORD pid = osGetCurrentProcessId();\n    xorMemory(&e, (unsigned char*)&pid, sizeof(DWORD));\n  }\n#if SQLITE_OS_WINRT\n  {\n    ULONGLONG cnt = osGetTickCount64();\n    xorMemory(&e, (unsigned char*)&cnt, sizeof(ULONGLONG));\n  }\n#else\n  {\n    DWORD cnt = osGetTickCount();\n    xorMemory(&e, (unsigned char*)&cnt, sizeof(DWORD));\n  }\n#endif /* SQLITE_OS_WINRT */\n  {\n    LARGE_INTEGER i;\n    osQueryPerformanceCounter(&i);\n    xorMemory(&e, (unsigned char*)&i, sizeof(LARGE_INTEGER));\n  }\n#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID\n  {\n    UUID id;\n    memset(&id, 0, sizeof(UUID));\n    osUuidCreate(&id);\n    xorMemory(&e, (unsigned char*)&id, sizeof(UUID));\n    memset(&id, 0, sizeof(UUID));\n    osUuidCreateSequential(&id);\n    xorMemory(&e, (unsigned char*)&id, sizeof(UUID));\n  }\n#endif /* !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID */\n  return e.nXor>nBuf ? nBuf : e.nXor;\n#endif /* defined(SQLITE_TEST) || defined(SQLITE_OMIT_RANDOMNESS) */\n}\n\n\n/*\n** Sleep for a little while.  Return the amount of time slept.\n*/\nstatic int winSleep(sqlite3_vfs *pVfs, int microsec){\n  sqlite3_win32_sleep((microsec+999)/1000);\n  UNUSED_PARAMETER(pVfs);\n  return ((microsec+999)/1000)*1000;\n}\n\n/*\n** The following variable, if set to a non-zero value, is interpreted as\n** the number of seconds since 1970 and is used to set the result of\n** sqlite3OsCurrentTime() during testing.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_current_time = 0;  /* Fake system time in seconds since 1970. */\n#endif\n\n/*\n** Find the current time (in Universal Coordinated Time).  Write into *piNow\n** the current time and date as a Julian Day number times 86_400_000.  In\n** other words, write into *piNow the number of milliseconds since the Julian\n** epoch of noon in Greenwich on November 24, 4714 B.C according to the\n** proleptic Gregorian calendar.\n**\n** On success, return SQLITE_OK.  Return SQLITE_ERROR if the time and date\n** cannot be found.\n*/\nstatic int winCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *piNow){\n  /* FILETIME structure is a 64-bit value representing the number of\n     100-nanosecond intervals since January 1, 1601 (= JD 2305813.5).\n  */\n  FILETIME ft;\n  static const sqlite3_int64 winFiletimeEpoch = 23058135*(sqlite3_int64)8640000;\n#ifdef SQLITE_TEST\n  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;\n#endif\n  /* 2^32 - to avoid use of LL and warnings in gcc */\n  static const sqlite3_int64 max32BitValue =\n      (sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 +\n      (sqlite3_int64)294967296;\n\n#if SQLITE_OS_WINCE\n  SYSTEMTIME time;\n  osGetSystemTime(&time);\n  /* if SystemTimeToFileTime() fails, it returns zero. */\n  if (!osSystemTimeToFileTime(&time,&ft)){\n    return SQLITE_ERROR;\n  }\n#else\n  osGetSystemTimeAsFileTime( &ft );\n#endif\n\n  *piNow = winFiletimeEpoch +\n            ((((sqlite3_int64)ft.dwHighDateTime)*max32BitValue) +\n               (sqlite3_int64)ft.dwLowDateTime)/(sqlite3_int64)10000;\n\n#ifdef SQLITE_TEST\n  if( sqlite3_current_time ){\n    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;\n  }\n#endif\n  UNUSED_PARAMETER(pVfs);\n  return SQLITE_OK;\n}\n\n/*\n** Find the current time (in Universal Coordinated Time).  Write the\n** current time and date as a Julian Day number into *prNow and\n** return 0.  Return 1 if the time and date cannot be found.\n*/\nstatic int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){\n  int rc;\n  sqlite3_int64 i;\n  rc = winCurrentTimeInt64(pVfs, &i);\n  if( !rc ){\n    *prNow = i/86400000.0;\n  }\n  return rc;\n}\n\n/*\n** The idea is that this function works like a combination of\n** GetLastError() and FormatMessage() on Windows (or errno and\n** strerror_r() on Unix). After an error is returned by an OS\n** function, SQLite calls this function with zBuf pointing to\n** a buffer of nBuf bytes. The OS layer should populate the\n** buffer with a nul-terminated UTF-8 encoded error message\n** describing the last IO error to have occurred within the calling\n** thread.\n**\n** If the error message is too large for the supplied buffer,\n** it should be truncated. The return value of xGetLastError\n** is zero if the error message fits in the buffer, or non-zero\n** otherwise (if the message was truncated). If non-zero is returned,\n** then it is not necessary to include the nul-terminator character\n** in the output buffer.\n**\n** Not supplying an error message will have no adverse effect\n** on SQLite. It is fine to have an implementation that never\n** returns an error message:\n**\n**   int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){\n**     assert(zBuf[0]=='\\0');\n**     return 0;\n**   }\n**\n** However if an error message is supplied, it will be incorporated\n** by sqlite into the error message available to the user using\n** sqlite3_errmsg(), possibly making IO errors easier to debug.\n*/\nstatic int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){\n  DWORD e = osGetLastError();\n  UNUSED_PARAMETER(pVfs);\n  if( nBuf>0 ) winGetLastErrorMsg(e, nBuf, zBuf);\n  return e;\n}\n\n/*\n** Initialize and deinitialize the operating system interface.\n*/\nSQLITE_API int sqlite3_os_init(void){\n  static sqlite3_vfs winVfs = {\n    3,                     /* iVersion */\n    sizeof(winFile),       /* szOsFile */\n    SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */\n    0,                     /* pNext */\n    \"win32\",               /* zName */\n    &winAppData,           /* pAppData */\n    winOpen,               /* xOpen */\n    winDelete,             /* xDelete */\n    winAccess,             /* xAccess */\n    winFullPathname,       /* xFullPathname */\n    winDlOpen,             /* xDlOpen */\n    winDlError,            /* xDlError */\n    winDlSym,              /* xDlSym */\n    winDlClose,            /* xDlClose */\n    winRandomness,         /* xRandomness */\n    winSleep,              /* xSleep */\n    winCurrentTime,        /* xCurrentTime */\n    winGetLastError,       /* xGetLastError */\n    winCurrentTimeInt64,   /* xCurrentTimeInt64 */\n    winSetSystemCall,      /* xSetSystemCall */\n    winGetSystemCall,      /* xGetSystemCall */\n    winNextSystemCall,     /* xNextSystemCall */\n  };\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  static sqlite3_vfs winLongPathVfs = {\n    3,                     /* iVersion */\n    sizeof(winFile),       /* szOsFile */\n    SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */\n    0,                     /* pNext */\n    \"win32-longpath\",      /* zName */\n    &winAppData,           /* pAppData */\n    winOpen,               /* xOpen */\n    winDelete,             /* xDelete */\n    winAccess,             /* xAccess */\n    winFullPathname,       /* xFullPathname */\n    winDlOpen,             /* xDlOpen */\n    winDlError,            /* xDlError */\n    winDlSym,              /* xDlSym */\n    winDlClose,            /* xDlClose */\n    winRandomness,         /* xRandomness */\n    winSleep,              /* xSleep */\n    winCurrentTime,        /* xCurrentTime */\n    winGetLastError,       /* xGetLastError */\n    winCurrentTimeInt64,   /* xCurrentTimeInt64 */\n    winSetSystemCall,      /* xSetSystemCall */\n    winGetSystemCall,      /* xGetSystemCall */\n    winNextSystemCall,     /* xNextSystemCall */\n  };\n#endif\n  static sqlite3_vfs winNolockVfs = {\n    3,                     /* iVersion */\n    sizeof(winFile),       /* szOsFile */\n    SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */\n    0,                     /* pNext */\n    \"win32-none\",          /* zName */\n    &winNolockAppData,     /* pAppData */\n    winOpen,               /* xOpen */\n    winDelete,             /* xDelete */\n    winAccess,             /* xAccess */\n    winFullPathname,       /* xFullPathname */\n    winDlOpen,             /* xDlOpen */\n    winDlError,            /* xDlError */\n    winDlSym,              /* xDlSym */\n    winDlClose,            /* xDlClose */\n    winRandomness,         /* xRandomness */\n    winSleep,              /* xSleep */\n    winCurrentTime,        /* xCurrentTime */\n    winGetLastError,       /* xGetLastError */\n    winCurrentTimeInt64,   /* xCurrentTimeInt64 */\n    winSetSystemCall,      /* xSetSystemCall */\n    winGetSystemCall,      /* xGetSystemCall */\n    winNextSystemCall,     /* xNextSystemCall */\n  };\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  static sqlite3_vfs winLongPathNolockVfs = {\n    3,                     /* iVersion */\n    sizeof(winFile),       /* szOsFile */\n    SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */\n    0,                     /* pNext */\n    \"win32-longpath-none\", /* zName */\n    &winNolockAppData,     /* pAppData */\n    winOpen,               /* xOpen */\n    winDelete,             /* xDelete */\n    winAccess,             /* xAccess */\n    winFullPathname,       /* xFullPathname */\n    winDlOpen,             /* xDlOpen */\n    winDlError,            /* xDlError */\n    winDlSym,              /* xDlSym */\n    winDlClose,            /* xDlClose */\n    winRandomness,         /* xRandomness */\n    winSleep,              /* xSleep */\n    winCurrentTime,        /* xCurrentTime */\n    winGetLastError,       /* xGetLastError */\n    winCurrentTimeInt64,   /* xCurrentTimeInt64 */\n    winSetSystemCall,      /* xSetSystemCall */\n    winGetSystemCall,      /* xGetSystemCall */\n    winNextSystemCall,     /* xNextSystemCall */\n  };\n#endif\n\n  /* Double-check that the aSyscall[] array has been constructed\n  ** correctly.  See ticket [bb3a86e890c8e96ab] */\n  assert( ArraySize(aSyscall)==89 );\n\n  /* get memory map allocation granularity */\n  memset(&winSysInfo, 0, sizeof(SYSTEM_INFO));\n#if SQLITE_OS_WINRT\n  osGetNativeSystemInfo(&winSysInfo);\n#else\n  osGetSystemInfo(&winSysInfo);\n#endif\n  assert( winSysInfo.dwAllocationGranularity>0 );\n  assert( winSysInfo.dwPageSize>0 );\n\n  sqlite3_vfs_register(&winVfs, 1);\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  sqlite3_vfs_register(&winLongPathVfs, 0);\n#endif\n\n  sqlite3_vfs_register(&winNolockVfs, 0);\n\n#if defined(SQLITE_WIN32_HAS_WIDE)\n  sqlite3_vfs_register(&winLongPathNolockVfs, 0);\n#endif\n\n#ifndef SQLITE_OMIT_WAL\n  winBigLock = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1);\n#endif\n\n  return SQLITE_OK;\n}\n\nSQLITE_API int sqlite3_os_end(void){\n#if SQLITE_OS_WINRT\n  if( sleepObj!=NULL ){\n    osCloseHandle(sleepObj);\n    sleepObj = NULL;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_WAL\n  winBigLock = 0;\n#endif\n\n  return SQLITE_OK;\n}\n\n#endif /* SQLITE_OS_WIN */\n\n/************** End of os_win.c **********************************************/\n/************** Begin file memdb.c *******************************************/\n/*\n** 2016-09-07\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file implements an in-memory VFS. A database is held as a contiguous\n** block of memory.\n**\n** This file also implements interface sqlite3_serialize() and\n** sqlite3_deserialize().\n*/\n/* #include \"sqliteInt.h\" */\n#ifndef SQLITE_OMIT_DESERIALIZE\n\n/*\n** Forward declaration of objects used by this utility\n*/\ntypedef struct sqlite3_vfs MemVfs;\ntypedef struct MemFile MemFile;\ntypedef struct MemStore MemStore;\n\n/* Access to a lower-level VFS that (might) implement dynamic loading,\n** access to randomness, etc.\n*/\n#define ORIGVFS(p) ((sqlite3_vfs*)((p)->pAppData))\n\n/* Storage for a memdb file.\n**\n** An memdb object can be shared or separate.  Shared memdb objects can be\n** used by more than one database connection.  Mutexes are used by shared\n** memdb objects to coordinate access.  Separate memdb objects are only\n** connected to a single database connection and do not require additional\n** mutexes.\n**\n** Shared memdb objects have .zFName!=0 and .pMutex!=0.  They are created\n** using \"file:/name?vfs=memdb\".  The first character of the name must be\n** \"/\" or else the object will be a separate memdb object.  All shared\n** memdb objects are stored in memdb_g.apMemStore[] in an arbitrary order.\n**\n** Separate memdb objects are created using a name that does not begin\n** with \"/\" or using sqlite3_deserialize().\n**\n** Access rules for shared MemStore objects:\n**\n**   *  .zFName is initialized when the object is created and afterwards\n**      is unchanged until the object is destroyed.  So it can be accessed\n**      at any time as long as we know the object is not being destroyed,\n**      which means while either the SQLITE_MUTEX_STATIC_VFS1 or\n**      .pMutex is held or the object is not part of memdb_g.apMemStore[].\n**\n**   *  Can .pMutex can only be changed while holding the\n**      SQLITE_MUTEX_STATIC_VFS1 mutex or while the object is not part\n**      of memdb_g.apMemStore[].\n**\n**   *  Other fields can only be changed while holding the .pMutex mutex\n**      or when the .nRef is less than zero and the object is not part of\n**      memdb_g.apMemStore[].\n**\n**   *  The .aData pointer has the added requirement that it can can only\n**      be changed (for resizing) when nMmap is zero.\n**\n*/\nstruct MemStore {\n  sqlite3_int64 sz;               /* Size of the file */\n  sqlite3_int64 szAlloc;          /* Space allocated to aData */\n  sqlite3_int64 szMax;            /* Maximum allowed size of the file */\n  unsigned char *aData;           /* content of the file */\n  sqlite3_mutex *pMutex;          /* Used by shared stores only */\n  int nMmap;                      /* Number of memory mapped pages */\n  unsigned mFlags;                /* Flags */\n  int nRdLock;                    /* Number of readers */\n  int nWrLock;                    /* Number of writers.  (Always 0 or 1) */\n  int nRef;                       /* Number of users of this MemStore */\n  char *zFName;                   /* The filename for shared stores */\n};\n\n/* An open file */\nstruct MemFile {\n  sqlite3_file base;              /* IO methods */\n  MemStore *pStore;               /* The storage */\n  int eLock;                      /* Most recent lock against this file */\n};\n\n/*\n** File-scope variables for holding the memdb files that are accessible\n** to multiple database connections in separate threads.\n**\n** Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object.\n*/\nstatic struct MemFS {\n  int nMemStore;                  /* Number of shared MemStore objects */\n  MemStore **apMemStore;          /* Array of all shared MemStore objects */\n} memdb_g;\n\n/*\n** Methods for MemFile\n*/\nstatic int memdbClose(sqlite3_file*);\nstatic int memdbRead(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\nstatic int memdbWrite(sqlite3_file*,const void*,int iAmt, sqlite3_int64 iOfst);\nstatic int memdbTruncate(sqlite3_file*, sqlite3_int64 size);\nstatic int memdbSync(sqlite3_file*, int flags);\nstatic int memdbFileSize(sqlite3_file*, sqlite3_int64 *pSize);\nstatic int memdbLock(sqlite3_file*, int);\nstatic int memdbUnlock(sqlite3_file*, int);\n/* static int memdbCheckReservedLock(sqlite3_file*, int *pResOut);// not used */\nstatic int memdbFileControl(sqlite3_file*, int op, void *pArg);\n/* static int memdbSectorSize(sqlite3_file*); // not used */\nstatic int memdbDeviceCharacteristics(sqlite3_file*);\nstatic int memdbFetch(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);\nstatic int memdbUnfetch(sqlite3_file*, sqlite3_int64 iOfst, void *p);\n\n/*\n** Methods for MemVfs\n*/\nstatic int memdbOpen(sqlite3_vfs*, const char *, sqlite3_file*, int , int *);\n/* static int memdbDelete(sqlite3_vfs*, const char *zName, int syncDir); */\nstatic int memdbAccess(sqlite3_vfs*, const char *zName, int flags, int *);\nstatic int memdbFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);\nstatic void *memdbDlOpen(sqlite3_vfs*, const char *zFilename);\nstatic void memdbDlError(sqlite3_vfs*, int nByte, char *zErrMsg);\nstatic void (*memdbDlSym(sqlite3_vfs *pVfs, void *p, const char*zSym))(void);\nstatic void memdbDlClose(sqlite3_vfs*, void*);\nstatic int memdbRandomness(sqlite3_vfs*, int nByte, char *zOut);\nstatic int memdbSleep(sqlite3_vfs*, int microseconds);\n/* static int memdbCurrentTime(sqlite3_vfs*, double*); */\nstatic int memdbGetLastError(sqlite3_vfs*, int, char *);\nstatic int memdbCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*);\n\nstatic sqlite3_vfs memdb_vfs = {\n  2,                           /* iVersion */\n  0,                           /* szOsFile (set when registered) */\n  1024,                        /* mxPathname */\n  0,                           /* pNext */\n  \"memdb\",                     /* zName */\n  0,                           /* pAppData (set when registered) */\n  memdbOpen,                   /* xOpen */\n  0, /* memdbDelete, */        /* xDelete */\n  memdbAccess,                 /* xAccess */\n  memdbFullPathname,           /* xFullPathname */\n  memdbDlOpen,                 /* xDlOpen */\n  memdbDlError,                /* xDlError */\n  memdbDlSym,                  /* xDlSym */\n  memdbDlClose,                /* xDlClose */\n  memdbRandomness,             /* xRandomness */\n  memdbSleep,                  /* xSleep */\n  0, /* memdbCurrentTime, */   /* xCurrentTime */\n  memdbGetLastError,           /* xGetLastError */\n  memdbCurrentTimeInt64,       /* xCurrentTimeInt64 */\n  0,                           /* xSetSystemCall */\n  0,                           /* xGetSystemCall */\n  0,                           /* xNextSystemCall */\n};\n\nstatic const sqlite3_io_methods memdb_io_methods = {\n  3,                              /* iVersion */\n  memdbClose,                      /* xClose */\n  memdbRead,                       /* xRead */\n  memdbWrite,                      /* xWrite */\n  memdbTruncate,                   /* xTruncate */\n  memdbSync,                       /* xSync */\n  memdbFileSize,                   /* xFileSize */\n  memdbLock,                       /* xLock */\n  memdbUnlock,                     /* xUnlock */\n  0, /* memdbCheckReservedLock, */ /* xCheckReservedLock */\n  memdbFileControl,                /* xFileControl */\n  0, /* memdbSectorSize,*/         /* xSectorSize */\n  memdbDeviceCharacteristics,      /* xDeviceCharacteristics */\n  0,                               /* xShmMap */\n  0,                               /* xShmLock */\n  0,                               /* xShmBarrier */\n  0,                               /* xShmUnmap */\n  memdbFetch,                      /* xFetch */\n  memdbUnfetch                     /* xUnfetch */\n};\n\n/*\n** Enter/leave the mutex on a MemStore\n*/\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE==0\nstatic void memdbEnter(MemStore *p){\n  UNUSED_PARAMETER(p);\n}\nstatic void memdbLeave(MemStore *p){\n  UNUSED_PARAMETER(p);\n}\n#else\nstatic void memdbEnter(MemStore *p){\n  sqlite3_mutex_enter(p->pMutex);\n}\nstatic void memdbLeave(MemStore *p){\n  sqlite3_mutex_leave(p->pMutex);\n}\n#endif\n\n\n\n/*\n** Close an memdb-file.\n** Free the underlying MemStore object when its refcount drops to zero\n** or less.\n*/\nstatic int memdbClose(sqlite3_file *pFile){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  if( p->zFName ){\n    int i;\n#ifndef SQLITE_MUTEX_OMIT\n    sqlite3_mutex *pVfsMutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1);\n#endif\n    sqlite3_mutex_enter(pVfsMutex);\n    for(i=0; ALWAYS(i<memdb_g.nMemStore); i++){\n      if( memdb_g.apMemStore[i]==p ){\n        memdbEnter(p);\n        if( p->nRef==1 ){\n          memdb_g.apMemStore[i] = memdb_g.apMemStore[--memdb_g.nMemStore];\n          if( memdb_g.nMemStore==0 ){\n            sqlite3_free(memdb_g.apMemStore);\n            memdb_g.apMemStore = 0;\n          }\n        }\n        break;\n      }\n    }\n    sqlite3_mutex_leave(pVfsMutex);\n  }else{\n    memdbEnter(p);\n  }\n  p->nRef--;\n  if( p->nRef<=0 ){\n    if( p->mFlags & SQLITE_DESERIALIZE_FREEONCLOSE ){\n      sqlite3_free(p->aData);\n    }\n    memdbLeave(p);\n    sqlite3_mutex_free(p->pMutex);\n    sqlite3_free(p);\n  }else{\n    memdbLeave(p);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Read data from an memdb-file.\n*/\nstatic int memdbRead(\n  sqlite3_file *pFile,\n  void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  memdbEnter(p);\n  if( iOfst+iAmt>p->sz ){\n    memset(zBuf, 0, iAmt);\n    if( iOfst<p->sz ) memcpy(zBuf, p->aData+iOfst, p->sz - iOfst);\n    memdbLeave(p);\n    return SQLITE_IOERR_SHORT_READ;\n  }\n  memcpy(zBuf, p->aData+iOfst, iAmt);\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Try to enlarge the memory allocation to hold at least sz bytes\n*/\nstatic int memdbEnlarge(MemStore *p, sqlite3_int64 newSz){\n  unsigned char *pNew;\n  if( (p->mFlags & SQLITE_DESERIALIZE_RESIZEABLE)==0 || NEVER(p->nMmap>0) ){\n    return SQLITE_FULL;\n  }\n  if( newSz>p->szMax ){\n    return SQLITE_FULL;\n  }\n  newSz *= 2;\n  if( newSz>p->szMax ) newSz = p->szMax;\n  pNew = sqlite3Realloc(p->aData, newSz);\n  if( pNew==0 ) return SQLITE_IOERR_NOMEM;\n  p->aData = pNew;\n  p->szAlloc = newSz;\n  return SQLITE_OK;\n}\n\n/*\n** Write data to an memdb-file.\n*/\nstatic int memdbWrite(\n  sqlite3_file *pFile,\n  const void *z,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  memdbEnter(p);\n  if( NEVER(p->mFlags & SQLITE_DESERIALIZE_READONLY) ){\n    /* Can't happen: memdbLock() will return SQLITE_READONLY before\n    ** reaching this point */\n    memdbLeave(p);\n    return SQLITE_IOERR_WRITE;\n  }\n  if( iOfst+iAmt>p->sz ){\n    int rc;\n    if( iOfst+iAmt>p->szAlloc\n     && (rc = memdbEnlarge(p, iOfst+iAmt))!=SQLITE_OK\n    ){\n      memdbLeave(p);\n      return rc;\n    }\n    if( iOfst>p->sz ) memset(p->aData+p->sz, 0, iOfst-p->sz);\n    p->sz = iOfst+iAmt;\n  }\n  memcpy(p->aData+iOfst, z, iAmt);\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Truncate an memdb-file.\n**\n** In rollback mode (which is always the case for memdb, as it does not\n** support WAL mode) the truncate() method is only used to reduce\n** the size of a file, never to increase the size.\n*/\nstatic int memdbTruncate(sqlite3_file *pFile, sqlite_int64 size){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  int rc = SQLITE_OK;\n  memdbEnter(p);\n  if( size>p->sz ){\n    /* This can only happen with a corrupt wal mode db */\n    rc = SQLITE_CORRUPT;\n  }else{\n    p->sz = size;\n  }\n  memdbLeave(p);\n  return rc;\n}\n\n/*\n** Sync an memdb-file.\n*/\nstatic int memdbSync(sqlite3_file *pFile, int flags){\n  UNUSED_PARAMETER(pFile);\n  UNUSED_PARAMETER(flags);\n  return SQLITE_OK;\n}\n\n/*\n** Return the current file-size of an memdb-file.\n*/\nstatic int memdbFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  memdbEnter(p);\n  *pSize = p->sz;\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Lock an memdb-file.\n*/\nstatic int memdbLock(sqlite3_file *pFile, int eLock){\n  MemFile *pThis = (MemFile*)pFile;\n  MemStore *p = pThis->pStore;\n  int rc = SQLITE_OK;\n  if( eLock<=pThis->eLock ) return SQLITE_OK;\n  memdbEnter(p);\n\n  assert( p->nWrLock==0 || p->nWrLock==1 );\n  assert( pThis->eLock<=SQLITE_LOCK_SHARED || p->nWrLock==1 );\n  assert( pThis->eLock==SQLITE_LOCK_NONE || p->nRdLock>=1 );\n\n  if( eLock>SQLITE_LOCK_SHARED && (p->mFlags & SQLITE_DESERIALIZE_READONLY) ){\n    rc = SQLITE_READONLY;\n  }else{\n    switch( eLock ){\n      case SQLITE_LOCK_SHARED: {\n        assert( pThis->eLock==SQLITE_LOCK_NONE );\n        if( p->nWrLock>0 ){\n          rc = SQLITE_BUSY;\n        }else{\n          p->nRdLock++;\n        }\n        break;\n      };\n\n      case SQLITE_LOCK_RESERVED:\n      case SQLITE_LOCK_PENDING: {\n        assert( pThis->eLock>=SQLITE_LOCK_SHARED );\n        if( ALWAYS(pThis->eLock==SQLITE_LOCK_SHARED) ){\n          if( p->nWrLock>0 ){\n            rc = SQLITE_BUSY;\n          }else{\n            p->nWrLock = 1;\n          }\n        }\n        break;\n      }\n\n      default: {\n        assert(  eLock==SQLITE_LOCK_EXCLUSIVE );\n        assert( pThis->eLock>=SQLITE_LOCK_SHARED );\n        if( p->nRdLock>1 ){\n          rc = SQLITE_BUSY;\n        }else if( pThis->eLock==SQLITE_LOCK_SHARED ){\n          p->nWrLock = 1;\n        }\n        break;\n      }\n    }\n  }\n  if( rc==SQLITE_OK ) pThis->eLock = eLock;\n  memdbLeave(p);\n  return rc;\n}\n\n/*\n** Unlock an memdb-file.\n*/\nstatic int memdbUnlock(sqlite3_file *pFile, int eLock){\n  MemFile *pThis = (MemFile*)pFile;\n  MemStore *p = pThis->pStore;\n  if( eLock>=pThis->eLock ) return SQLITE_OK;\n  memdbEnter(p);\n\n  assert( eLock==SQLITE_LOCK_SHARED || eLock==SQLITE_LOCK_NONE );\n  if( eLock==SQLITE_LOCK_SHARED ){\n    if( ALWAYS(pThis->eLock>SQLITE_LOCK_SHARED) ){\n      p->nWrLock--;\n    }\n  }else{\n    if( pThis->eLock>SQLITE_LOCK_SHARED ){\n      p->nWrLock--;\n    }\n    p->nRdLock--;\n  }\n\n  pThis->eLock = eLock;\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n#if 0\n/*\n** This interface is only used for crash recovery, which does not\n** occur on an in-memory database.\n*/\nstatic int memdbCheckReservedLock(sqlite3_file *pFile, int *pResOut){\n  *pResOut = 0;\n  return SQLITE_OK;\n}\n#endif\n\n\n/*\n** File control method. For custom operations on an memdb-file.\n*/\nstatic int memdbFileControl(sqlite3_file *pFile, int op, void *pArg){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  int rc = SQLITE_NOTFOUND;\n  memdbEnter(p);\n  if( op==SQLITE_FCNTL_VFSNAME ){\n    *(char**)pArg = sqlite3_mprintf(\"memdb(%p,%lld)\", p->aData, p->sz);\n    rc = SQLITE_OK;\n  }\n  if( op==SQLITE_FCNTL_SIZE_LIMIT ){\n    sqlite3_int64 iLimit = *(sqlite3_int64*)pArg;\n    if( iLimit<p->sz ){\n      if( iLimit<0 ){\n        iLimit = p->szMax;\n      }else{\n        iLimit = p->sz;\n      }\n    }\n    p->szMax = iLimit;\n    *(sqlite3_int64*)pArg = iLimit;\n    rc = SQLITE_OK;\n  }\n  memdbLeave(p);\n  return rc;\n}\n\n#if 0  /* Not used because of SQLITE_IOCAP_POWERSAFE_OVERWRITE */\n/*\n** Return the sector-size in bytes for an memdb-file.\n*/\nstatic int memdbSectorSize(sqlite3_file *pFile){\n  return 1024;\n}\n#endif\n\n/*\n** Return the device characteristic flags supported by an memdb-file.\n*/\nstatic int memdbDeviceCharacteristics(sqlite3_file *pFile){\n  UNUSED_PARAMETER(pFile);\n  return SQLITE_IOCAP_ATOMIC |\n         SQLITE_IOCAP_POWERSAFE_OVERWRITE |\n         SQLITE_IOCAP_SAFE_APPEND |\n         SQLITE_IOCAP_SEQUENTIAL;\n}\n\n/* Fetch a page of a memory-mapped file */\nstatic int memdbFetch(\n  sqlite3_file *pFile,\n  sqlite3_int64 iOfst,\n  int iAmt,\n  void **pp\n){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  memdbEnter(p);\n  if( iOfst+iAmt>p->sz || (p->mFlags & SQLITE_DESERIALIZE_RESIZEABLE)!=0 ){\n    *pp = 0;\n  }else{\n    p->nMmap++;\n    *pp = (void*)(p->aData + iOfst);\n  }\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n/* Release a memory-mapped page */\nstatic int memdbUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){\n  MemStore *p = ((MemFile*)pFile)->pStore;\n  UNUSED_PARAMETER(iOfst);\n  UNUSED_PARAMETER(pPage);\n  memdbEnter(p);\n  p->nMmap--;\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Open an mem file handle.\n*/\nstatic int memdbOpen(\n  sqlite3_vfs *pVfs,\n  const char *zName,\n  sqlite3_file *pFd,\n  int flags,\n  int *pOutFlags\n){\n  MemFile *pFile = (MemFile*)pFd;\n  MemStore *p = 0;\n  int szName;\n  UNUSED_PARAMETER(pVfs);\n\n  memset(pFile, 0, sizeof(*pFile));\n  szName = sqlite3Strlen30(zName);\n  if( szName>1 && (zName[0]=='/' || zName[0]=='\\\\') ){\n    int i;\n#ifndef SQLITE_MUTEX_OMIT\n    sqlite3_mutex *pVfsMutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1);\n#endif\n    sqlite3_mutex_enter(pVfsMutex);\n    for(i=0; i<memdb_g.nMemStore; i++){\n      if( strcmp(memdb_g.apMemStore[i]->zFName,zName)==0 ){\n        p = memdb_g.apMemStore[i];\n        break;\n      }\n    }\n    if( p==0 ){\n      MemStore **apNew;\n      p = sqlite3Malloc( sizeof(*p) + (i64)szName + 3 );\n      if( p==0 ){\n        sqlite3_mutex_leave(pVfsMutex);\n        return SQLITE_NOMEM;\n      }\n      apNew = sqlite3Realloc(memdb_g.apMemStore,\n                             sizeof(apNew[0])*(1+(i64)memdb_g.nMemStore) );\n      if( apNew==0 ){\n        sqlite3_free(p);\n        sqlite3_mutex_leave(pVfsMutex);\n        return SQLITE_NOMEM;\n      }\n      apNew[memdb_g.nMemStore++] = p;\n      memdb_g.apMemStore = apNew;\n      memset(p, 0, sizeof(*p));\n      p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE|SQLITE_DESERIALIZE_FREEONCLOSE;\n      p->szMax = sqlite3GlobalConfig.mxMemdbSize;\n      p->zFName = (char*)&p[1];\n      memcpy(p->zFName, zName, szName+1);\n      p->pMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);\n      if( p->pMutex==0 ){\n        memdb_g.nMemStore--;\n        sqlite3_free(p);\n        sqlite3_mutex_leave(pVfsMutex);\n        return SQLITE_NOMEM;\n      }\n      p->nRef = 1;\n      memdbEnter(p);\n    }else{\n      memdbEnter(p);\n      p->nRef++;\n    }\n    sqlite3_mutex_leave(pVfsMutex);\n  }else{\n    p = sqlite3Malloc( sizeof(*p) );\n    if( p==0 ){\n      return SQLITE_NOMEM;\n    }\n    memset(p, 0, sizeof(*p));\n    p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE;\n    p->szMax = sqlite3GlobalConfig.mxMemdbSize;\n  }\n  pFile->pStore = p;\n  if( pOutFlags!=0 ){\n    *pOutFlags = flags | SQLITE_OPEN_MEMORY;\n  }\n  pFd->pMethods = &memdb_io_methods;\n  memdbLeave(p);\n  return SQLITE_OK;\n}\n\n#if 0 /* Only used to delete rollback journals, super-journals, and WAL\n      ** files, none of which exist in memdb.  So this routine is never used */\n/*\n** Delete the file located at zPath. If the dirSync argument is true,\n** ensure the file-system modifications are synced to disk before\n** returning.\n*/\nstatic int memdbDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){\n  return SQLITE_IOERR_DELETE;\n}\n#endif\n\n/*\n** Test for access permissions. Return true if the requested permission\n** is available, or false otherwise.\n**\n** With memdb, no files ever exist on disk.  So always return false.\n*/\nstatic int memdbAccess(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int flags,\n  int *pResOut\n){\n  UNUSED_PARAMETER(pVfs);\n  UNUSED_PARAMETER(zPath);\n  UNUSED_PARAMETER(flags);\n  *pResOut = 0;\n  return SQLITE_OK;\n}\n\n/*\n** Populate buffer zOut with the full canonical pathname corresponding\n** to the pathname in zPath. zOut is guaranteed to point to a buffer\n** of at least (INST_MAX_PATHNAME+1) bytes.\n*/\nstatic int memdbFullPathname(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int nOut,\n  char *zOut\n){\n  UNUSED_PARAMETER(pVfs);\n  sqlite3_snprintf(nOut, zOut, \"%s\", zPath);\n  return SQLITE_OK;\n}\n\n/*\n** Open the dynamic library located at zPath and return a handle.\n*/\nstatic void *memdbDlOpen(sqlite3_vfs *pVfs, const char *zPath){\n  return ORIGVFS(pVfs)->xDlOpen(ORIGVFS(pVfs), zPath);\n}\n\n/*\n** Populate the buffer zErrMsg (size nByte bytes) with a human readable\n** utf-8 string describing the most recent error encountered associated\n** with dynamic libraries.\n*/\nstatic void memdbDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){\n  ORIGVFS(pVfs)->xDlError(ORIGVFS(pVfs), nByte, zErrMsg);\n}\n\n/*\n** Return a pointer to the symbol zSymbol in the dynamic library pHandle.\n*/\nstatic void (*memdbDlSym(sqlite3_vfs *pVfs, void *p, const char *zSym))(void){\n  return ORIGVFS(pVfs)->xDlSym(ORIGVFS(pVfs), p, zSym);\n}\n\n/*\n** Close the dynamic library handle pHandle.\n*/\nstatic void memdbDlClose(sqlite3_vfs *pVfs, void *pHandle){\n  ORIGVFS(pVfs)->xDlClose(ORIGVFS(pVfs), pHandle);\n}\n\n/*\n** Populate the buffer pointed to by zBufOut with nByte bytes of\n** random data.\n*/\nstatic int memdbRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){\n  return ORIGVFS(pVfs)->xRandomness(ORIGVFS(pVfs), nByte, zBufOut);\n}\n\n/*\n** Sleep for nMicro microseconds. Return the number of microseconds\n** actually slept.\n*/\nstatic int memdbSleep(sqlite3_vfs *pVfs, int nMicro){\n  return ORIGVFS(pVfs)->xSleep(ORIGVFS(pVfs), nMicro);\n}\n\n#if 0  /* Never used.  Modern cores only call xCurrentTimeInt64() */\n/*\n** Return the current time as a Julian Day number in *pTimeOut.\n*/\nstatic int memdbCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){\n  return ORIGVFS(pVfs)->xCurrentTime(ORIGVFS(pVfs), pTimeOut);\n}\n#endif\n\nstatic int memdbGetLastError(sqlite3_vfs *pVfs, int a, char *b){\n  return ORIGVFS(pVfs)->xGetLastError(ORIGVFS(pVfs), a, b);\n}\nstatic int memdbCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){\n  return ORIGVFS(pVfs)->xCurrentTimeInt64(ORIGVFS(pVfs), p);\n}\n\n/*\n** Translate a database connection pointer and schema name into a\n** MemFile pointer.\n*/\nstatic MemFile *memdbFromDbSchema(sqlite3 *db, const char *zSchema){\n  MemFile *p = 0;\n  MemStore *pStore;\n  int rc = sqlite3_file_control(db, zSchema, SQLITE_FCNTL_FILE_POINTER, &p);\n  if( rc ) return 0;\n  if( p->base.pMethods!=&memdb_io_methods ) return 0;\n  pStore = p->pStore;\n  memdbEnter(pStore);\n  if( pStore->zFName!=0 ) p = 0;\n  memdbLeave(pStore);\n  return p;\n}\n\n/*\n** Return the serialization of a database\n*/\nSQLITE_API unsigned char *sqlite3_serialize(\n  sqlite3 *db,              /* The database connection */\n  const char *zSchema,      /* Which database within the connection */\n  sqlite3_int64 *piSize,    /* Write size here, if not NULL */\n  unsigned int mFlags       /* Maybe SQLITE_SERIALIZE_NOCOPY */\n){\n  MemFile *p;\n  int iDb;\n  Btree *pBt;\n  sqlite3_int64 sz;\n  int szPage = 0;\n  sqlite3_stmt *pStmt = 0;\n  unsigned char *pOut;\n  char *zSql;\n  int rc;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n\n  if( zSchema==0 ) zSchema = db->aDb[0].zDbSName;\n  p = memdbFromDbSchema(db, zSchema);\n  iDb = sqlite3FindDbName(db, zSchema);\n  if( piSize ) *piSize = -1;\n  if( iDb<0 ) return 0;\n  if( p ){\n    MemStore *pStore = p->pStore;\n    assert( pStore->pMutex==0 );\n    if( piSize ) *piSize = pStore->sz;\n    if( mFlags & SQLITE_SERIALIZE_NOCOPY ){\n      pOut = pStore->aData;\n    }else{\n      pOut = sqlite3_malloc64( pStore->sz );\n      if( pOut ) memcpy(pOut, pStore->aData, pStore->sz);\n    }\n    return pOut;\n  }\n  pBt = db->aDb[iDb].pBt;\n  if( pBt==0 ) return 0;\n  szPage = sqlite3BtreeGetPageSize(pBt);\n  zSql = sqlite3_mprintf(\"PRAGMA \\\"%w\\\".page_count\", zSchema);\n  rc = zSql ? sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0) : SQLITE_NOMEM;\n  sqlite3_free(zSql);\n  if( rc ) return 0;\n  rc = sqlite3_step(pStmt);\n  if( rc!=SQLITE_ROW ){\n    pOut = 0;\n  }else{\n    sz = sqlite3_column_int64(pStmt, 0)*szPage;\n    if( sz==0 ){\n      sqlite3_reset(pStmt);\n      sqlite3_exec(db, \"BEGIN IMMEDIATE; COMMIT;\", 0, 0, 0);\n      rc = sqlite3_step(pStmt);\n      if( rc==SQLITE_ROW ){\n        sz = sqlite3_column_int64(pStmt, 0)*szPage;\n      }\n    }\n    if( piSize ) *piSize = sz;\n    if( mFlags & SQLITE_SERIALIZE_NOCOPY ){\n      pOut = 0;\n    }else{\n      pOut = sqlite3_malloc64( sz );\n      if( pOut ){\n        int nPage = sqlite3_column_int(pStmt, 0);\n        Pager *pPager = sqlite3BtreePager(pBt);\n        int pgno;\n        for(pgno=1; pgno<=nPage; pgno++){\n          DbPage *pPage = 0;\n          unsigned char *pTo = pOut + szPage*(sqlite3_int64)(pgno-1);\n          rc = sqlite3PagerGet(pPager, pgno, (DbPage**)&pPage, 0);\n          if( rc==SQLITE_OK ){\n            memcpy(pTo, sqlite3PagerGetData(pPage), szPage);\n          }else{\n            memset(pTo, 0, szPage);\n          }\n          sqlite3PagerUnref(pPage);\n        }\n      }\n    }\n  }\n  sqlite3_finalize(pStmt);\n  return pOut;\n}\n\n/* Convert zSchema to a MemDB and initialize its content.\n*/\nSQLITE_API int sqlite3_deserialize(\n  sqlite3 *db,            /* The database connection */\n  const char *zSchema,    /* Which DB to reopen with the deserialization */\n  unsigned char *pData,   /* The serialized database content */\n  sqlite3_int64 szDb,     /* Number bytes in the deserialization */\n  sqlite3_int64 szBuf,    /* Total size of buffer pData[] */\n  unsigned mFlags         /* Zero or more SQLITE_DESERIALIZE_* flags */\n){\n  MemFile *p;\n  char *zSql;\n  sqlite3_stmt *pStmt = 0;\n  int rc;\n  int iDb;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  if( szDb<0 ) return SQLITE_MISUSE_BKPT;\n  if( szBuf<0 ) return SQLITE_MISUSE_BKPT;\n#endif\n\n  sqlite3_mutex_enter(db->mutex);\n  if( zSchema==0 ) zSchema = db->aDb[0].zDbSName;\n  iDb = sqlite3FindDbName(db, zSchema);\n  testcase( iDb==1 );\n  if( iDb<2 && iDb!=0 ){\n    rc = SQLITE_ERROR;\n    goto end_deserialize;\n  }\n  zSql = sqlite3_mprintf(\"ATTACH x AS %Q\", zSchema);\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);\n    sqlite3_free(zSql);\n  }\n  if( rc ) goto end_deserialize;\n  db->init.iDb = (u8)iDb;\n  db->init.reopenMemdb = 1;\n  rc = sqlite3_step(pStmt);\n  db->init.reopenMemdb = 0;\n  if( rc!=SQLITE_DONE ){\n    rc = SQLITE_ERROR;\n    goto end_deserialize;\n  }\n  p = memdbFromDbSchema(db, zSchema);\n  if( p==0 ){\n    rc = SQLITE_ERROR;\n  }else{\n    MemStore *pStore = p->pStore;\n    pStore->aData = pData;\n    pData = 0;\n    pStore->sz = szDb;\n    pStore->szAlloc = szBuf;\n    pStore->szMax = szBuf;\n    if( pStore->szMax<sqlite3GlobalConfig.mxMemdbSize ){\n      pStore->szMax = sqlite3GlobalConfig.mxMemdbSize;\n    }\n    pStore->mFlags = mFlags;\n    rc = SQLITE_OK;\n  }\n\nend_deserialize:\n  sqlite3_finalize(pStmt);\n  if( pData && (mFlags & SQLITE_DESERIALIZE_FREEONCLOSE)!=0 ){\n    sqlite3_free(pData);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Return true if the VFS is the memvfs.\n*/\nSQLITE_PRIVATE int sqlite3IsMemdb(const sqlite3_vfs *pVfs){\n  return pVfs==&memdb_vfs;\n}\n\n/*\n** This routine is called when the extension is loaded.\n** Register the new VFS.\n*/\nSQLITE_PRIVATE int sqlite3MemdbInit(void){\n  sqlite3_vfs *pLower = sqlite3_vfs_find(0);\n  unsigned int sz;\n  if( NEVER(pLower==0) ) return SQLITE_ERROR;\n  sz = pLower->szOsFile;\n  memdb_vfs.pAppData = pLower;\n  /* The following conditional can only be true when compiled for\n  ** Windows x86 and SQLITE_MAX_MMAP_SIZE=0.  We always leave\n  ** it in, to be safe, but it is marked as NO_TEST since there\n  ** is no way to reach it under most builds. */\n  if( sz<sizeof(MemFile) ) sz = sizeof(MemFile); /*NO_TEST*/\n  memdb_vfs.szOsFile = sz;\n  return sqlite3_vfs_register(&memdb_vfs, 0);\n}\n#endif /* SQLITE_OMIT_DESERIALIZE */\n\n/************** End of memdb.c ***********************************************/\n/************** Begin file bitvec.c ******************************************/\n/*\n** 2008 February 16\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file implements an object that represents a fixed-length\n** bitmap.  Bits are numbered starting with 1.\n**\n** A bitmap is used to record which pages of a database file have been\n** journalled during a transaction, or which pages have the \"dont-write\"\n** property.  Usually only a few pages are meet either condition.\n** So the bitmap is usually sparse and has low cardinality.\n** But sometimes (for example when during a DROP of a large table) most\n** or all of the pages in a database can get journalled.  In those cases,\n** the bitmap becomes dense with high cardinality.  The algorithm needs\n** to handle both cases well.\n**\n** The size of the bitmap is fixed when the object is created.\n**\n** All bits are clear when the bitmap is created.  Individual bits\n** may be set or cleared one at a time.\n**\n** Test operations are about 100 times more common that set operations.\n** Clear operations are exceedingly rare.  There are usually between\n** 5 and 500 set operations per Bitvec object, though the number of sets can\n** sometimes grow into tens of thousands or larger.  The size of the\n** Bitvec object is the number of pages in the database file at the\n** start of a transaction, and is thus usually less than a few thousand,\n** but can be as large as 2 billion for a really big database.\n*/\n/* #include \"sqliteInt.h\" */\n\n/* Size of the Bitvec structure in bytes. */\n#define BITVEC_SZ        512\n\n/* Round the union size down to the nearest pointer boundary, since that's how\n** it will be aligned within the Bitvec struct. */\n#define BITVEC_USIZE \\\n    (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))\n\n/* Type of the array \"element\" for the bitmap representation.\n** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE.\n** Setting this to the \"natural word\" size of your CPU may improve\n** performance. */\n#define BITVEC_TELEM     u8\n/* Size, in bits, of the bitmap element. */\n#define BITVEC_SZELEM    8\n/* Number of elements in a bitmap array. */\n#define BITVEC_NELEM     (BITVEC_USIZE/sizeof(BITVEC_TELEM))\n/* Number of bits in the bitmap array. */\n#define BITVEC_NBIT      (BITVEC_NELEM*BITVEC_SZELEM)\n\n/* Number of u32 values in hash table. */\n#define BITVEC_NINT      (BITVEC_USIZE/sizeof(u32))\n/* Maximum number of entries in hash table before\n** sub-dividing and re-hashing. */\n#define BITVEC_MXHASH    (BITVEC_NINT/2)\n/* Hashing function for the aHash representation.\n** Empirical testing showed that the *37 multiplier\n** (an arbitrary prime)in the hash function provided\n** no fewer collisions than the no-op *1. */\n#define BITVEC_HASH(X)   (((X)*1)%BITVEC_NINT)\n\n#define BITVEC_NPTR      ((u32)(BITVEC_USIZE/sizeof(Bitvec *)))\n\n\n/*\n** A bitmap is an instance of the following structure.\n**\n** This bitmap records the existence of zero or more bits\n** with values between 1 and iSize, inclusive.\n**\n** There are three possible representations of the bitmap.\n** If iSize<=BITVEC_NBIT, then Bitvec.u.aBitmap[] is a straight\n** bitmap.  The least significant bit is bit 1.\n**\n** If iSize>BITVEC_NBIT and iDivisor==0 then Bitvec.u.aHash[] is\n** a hash table that will hold up to BITVEC_MXHASH distinct values.\n**\n** Otherwise, the value i is redirected into one of BITVEC_NPTR\n** sub-bitmaps pointed to by Bitvec.u.apSub[].  Each subbitmap\n** handles up to iDivisor separate values of i.  apSub[0] holds\n** values between 1 and iDivisor.  apSub[1] holds values between\n** iDivisor+1 and 2*iDivisor.  apSub[N] holds values between\n** N*iDivisor+1 and (N+1)*iDivisor.  Each subbitmap is normalized\n** to hold deal with values between 1 and iDivisor.\n*/\nstruct Bitvec {\n  u32 iSize;      /* Maximum bit index.  Max iSize is 4,294,967,296. */\n  u32 nSet;       /* Number of bits that are set - only valid for aHash\n                  ** element.  Max is BITVEC_NINT.  For BITVEC_SZ of 512,\n                  ** this would be 125. */\n  u32 iDivisor;   /* Number of bits handled by each apSub[] entry. */\n                  /* Should >=0 for apSub element. */\n                  /* Max iDivisor is max(u32) / BITVEC_NPTR + 1.  */\n                  /* For a BITVEC_SZ of 512, this would be 34,359,739. */\n  union {\n    BITVEC_TELEM aBitmap[BITVEC_NELEM];    /* Bitmap representation */\n    u32 aHash[BITVEC_NINT];      /* Hash table representation */\n    Bitvec *apSub[BITVEC_NPTR];  /* Recursive representation */\n  } u;\n};\n\n\n/*\n** Create a new bitmap object able to handle bits between 0 and iSize,\n** inclusive.  Return a pointer to the new object.  Return NULL if\n** malloc fails.\n*/\nSQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){\n  Bitvec *p;\n  assert( sizeof(*p)==BITVEC_SZ );\n  p = sqlite3MallocZero( sizeof(*p) );\n  if( p ){\n    p->iSize = iSize;\n  }\n  return p;\n}\n\n/*\n** Check to see if the i-th bit is set.  Return true or false.\n** If p is NULL (if the bitmap has not been created) or if\n** i is out of range, then return false.\n*/\nSQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){\n  assert( p!=0 );\n  i--;\n  if( i>=p->iSize ) return 0;\n  while( p->iDivisor ){\n    u32 bin = i/p->iDivisor;\n    i = i%p->iDivisor;\n    p = p->u.apSub[bin];\n    if (!p) {\n      return 0;\n    }\n  }\n  if( p->iSize<=BITVEC_NBIT ){\n    return (p->u.aBitmap[i/BITVEC_SZELEM] & (1<<(i&(BITVEC_SZELEM-1))))!=0;\n  } else{\n    u32 h = BITVEC_HASH(i++);\n    while( p->u.aHash[h] ){\n      if( p->u.aHash[h]==i ) return 1;\n      h = (h+1) % BITVEC_NINT;\n    }\n    return 0;\n  }\n}\nSQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){\n  return p!=0 && sqlite3BitvecTestNotNull(p,i);\n}\n\n/*\n** Set the i-th bit.  Return 0 on success and an error code if\n** anything goes wrong.\n**\n** This routine might cause sub-bitmaps to be allocated.  Failing\n** to get the memory needed to hold the sub-bitmap is the only\n** that can go wrong with an insert, assuming p and i are valid.\n**\n** The calling function must ensure that p is a valid Bitvec object\n** and that the value for \"i\" is within range of the Bitvec object.\n** Otherwise the behavior is undefined.\n*/\nSQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){\n  u32 h;\n  if( p==0 ) return SQLITE_OK;\n  assert( i>0 );\n  assert( i<=p->iSize );\n  i--;\n  while((p->iSize > BITVEC_NBIT) && p->iDivisor) {\n    u32 bin = i/p->iDivisor;\n    i = i%p->iDivisor;\n    if( p->u.apSub[bin]==0 ){\n      p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor );\n      if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM_BKPT;\n    }\n    p = p->u.apSub[bin];\n  }\n  if( p->iSize<=BITVEC_NBIT ){\n    p->u.aBitmap[i/BITVEC_SZELEM] |= 1 << (i&(BITVEC_SZELEM-1));\n    return SQLITE_OK;\n  }\n  h = BITVEC_HASH(i++);\n  /* if there wasn't a hash collision, and this doesn't */\n  /* completely fill the hash, then just add it without */\n  /* worrying about sub-dividing and re-hashing. */\n  if( !p->u.aHash[h] ){\n    if (p->nSet<(BITVEC_NINT-1)) {\n      goto bitvec_set_end;\n    } else {\n      goto bitvec_set_rehash;\n    }\n  }\n  /* there was a collision, check to see if it's already */\n  /* in hash, if not, try to find a spot for it */\n  do {\n    if( p->u.aHash[h]==i ) return SQLITE_OK;\n    h++;\n    if( h>=BITVEC_NINT ) h = 0;\n  } while( p->u.aHash[h] );\n  /* we didn't find it in the hash.  h points to the first */\n  /* available free spot. check to see if this is going to */\n  /* make our hash too \"full\".  */\nbitvec_set_rehash:\n  if( p->nSet>=BITVEC_MXHASH ){\n    unsigned int j;\n    int rc;\n    u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));\n    if( aiValues==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }else{\n      memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));\n      memset(p->u.apSub, 0, sizeof(p->u.apSub));\n      p->iDivisor = p->iSize/BITVEC_NPTR;\n      if( (p->iSize%BITVEC_NPTR)!=0 ) p->iDivisor++;\n      if( p->iDivisor<BITVEC_NBIT ) p->iDivisor = BITVEC_NBIT;\n      rc = sqlite3BitvecSet(p, i);\n      for(j=0; j<BITVEC_NINT; j++){\n        if( aiValues[j] ) rc |= sqlite3BitvecSet(p, aiValues[j]);\n      }\n      sqlite3StackFree(0, aiValues);\n      return rc;\n    }\n  }\nbitvec_set_end:\n  p->nSet++;\n  p->u.aHash[h] = i;\n  return SQLITE_OK;\n}\n\n/*\n** Clear the i-th bit.\n**\n** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage\n** that BitvecClear can use to rebuilt its hash table.\n*/\nSQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){\n  if( p==0 ) return;\n  assert( i>0 );\n  i--;\n  while( p->iDivisor ){\n    u32 bin = i/p->iDivisor;\n    i = i%p->iDivisor;\n    p = p->u.apSub[bin];\n    if (!p) {\n      return;\n    }\n  }\n  if( p->iSize<=BITVEC_NBIT ){\n    p->u.aBitmap[i/BITVEC_SZELEM] &= ~(BITVEC_TELEM)(1<<(i&(BITVEC_SZELEM-1)));\n  }else{\n    unsigned int j;\n    u32 *aiValues = pBuf;\n    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));\n    memset(p->u.aHash, 0, sizeof(p->u.aHash));\n    p->nSet = 0;\n    for(j=0; j<BITVEC_NINT; j++){\n      if( aiValues[j] && aiValues[j]!=(i+1) ){\n        u32 h = BITVEC_HASH(aiValues[j]-1);\n        p->nSet++;\n        while( p->u.aHash[h] ){\n          h++;\n          if( h>=BITVEC_NINT ) h = 0;\n        }\n        p->u.aHash[h] = aiValues[j];\n      }\n    }\n  }\n}\n\n/*\n** Destroy a bitmap object.  Reclaim all memory used.\n*/\nSQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec *p){\n  if( p==0 ) return;\n  if( p->iDivisor ){\n    unsigned int i;\n    for(i=0; i<BITVEC_NPTR; i++){\n      sqlite3BitvecDestroy(p->u.apSub[i]);\n    }\n  }\n  sqlite3_free(p);\n}\n\n/*\n** Return the value of the iSize parameter specified when Bitvec *p\n** was created.\n*/\nSQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){\n  return p->iSize;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Show the content of a Bitvec option and its children.  Indent\n** everything by n spaces.  Add x to each bitvec value.\n**\n** From a debugger such as gdb, one can type:\n**\n**    call sqlite3ShowBitvec(p)\n**\n** For some Bitvec p and see a recursive view of the Bitvec's content.\n*/\nstatic void showBitvec(Bitvec *p, int n, unsigned x){\n  int i;\n  if( p==0 ){\n    printf(\"NULL\\n\");\n    return;\n  }\n  printf(\"Bitvec 0x%p iSize=%u\", p, p->iSize);\n  if( p->iSize<=BITVEC_NBIT ){\n    printf(\" bitmap\\n\");\n    printf(\"%*s   bits:\", n, \"\");\n    for(i=1; i<=BITVEC_NBIT; i++){\n      if( sqlite3BitvecTest(p,i) ) printf(\" %u\", x+(unsigned)i);\n    }\n    printf(\"\\n\");\n  }else if( p->iDivisor==0 ){\n    printf(\" hash with %u entries\\n\", p->nSet);\n    printf(\"%*s   bits:\", n, \"\");\n    for(i=0; i<BITVEC_NINT; i++){\n      if( p->u.aHash[i] ) printf(\" %u\", x+(unsigned)p->u.aHash[i]);\n    }\n    printf(\"\\n\");\n  }else{\n    printf(\" sub-bitvec with iDivisor=%u\\n\", p->iDivisor);\n    for(i=0; i<BITVEC_NPTR; i++){\n      if( p->u.apSub[i]==0 ) continue;\n      printf(\"%*s   apSub[%d]=\", n, \"\", i);\n      showBitvec(p->u.apSub[i], n+4, i*p->iDivisor);\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3ShowBitvec(Bitvec *p){\n  showBitvec(p, 0, 0);\n}\n#endif\n\n#ifndef SQLITE_UNTESTABLE\n/*\n** Let V[] be an array of unsigned characters sufficient to hold\n** up to N bits.  Let I be an integer between 0 and N.  0<=I<N.\n** Then the following macros can be used to set, clear, or test\n** individual bits within V.\n*/\n#define SETBIT(V,I)      V[I>>3] |= (1<<(I&7))\n#define CLEARBIT(V,I)    V[I>>3] &= ~(BITVEC_TELEM)(1<<(I&7))\n#define TESTBIT(V,I)     (V[I>>3]&(1<<(I&7)))!=0\n\n\n/*\n** This routine runs an extensive test of the Bitvec code.\n**\n** The input is an array of integers that acts as a program\n** to test the Bitvec.  The integers are opcodes followed\n** by 0, 1, or 3 operands, depending on the opcode.  Another\n** opcode follows immediately after the last operand.\n**\n** There are opcodes numbered starting with 0.  0 is the\n** \"halt\" opcode and causes the test to end.\n**\n**    0          Halt and return the number of errors\n**    1 N S X    Set N bits beginning with S and incrementing by X\n**    2 N S X    Clear N bits beginning with S and incrementing by X\n**    3 N        Set N randomly chosen bits\n**    4 N        Clear N randomly chosen bits\n**    5 N S X    Set N bits from S increment X in array only, not in bitvec\n**    6          Invoice sqlite3ShowBitvec() on the Bitvec object so far\n**    7 X        Show compile-time parameters and the hash of X\n**\n** The opcodes 1 through 4 perform set and clear operations are performed\n** on both a Bitvec object and on a linear array of bits obtained from malloc.\n** Opcode 5 works on the linear array only, not on the Bitvec.\n** Opcode 5 is used to deliberately induce a fault in order to\n** confirm that error detection works.  Opcodes 6 and greater are\n** state output opcodes.  Opcodes 6 and greater are no-ops unless\n** SQLite has been compiled with SQLITE_DEBUG.\n**\n** At the conclusion of the test the linear array is compared\n** against the Bitvec object.  If there are any differences,\n** an error is returned.  If they are the same, zero is returned.\n**\n** If a memory allocation error occurs, return -1.\n**\n** sz is the size of the Bitvec.  Or if sz is negative, make the size\n** 2*(unsigned)(-sz) and disabled the linear vector check.\n*/\nSQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int sz, int *aOp){\n  Bitvec *pBitvec = 0;\n  unsigned char *pV = 0;\n  int rc = -1;\n  int i, nx, pc, op;\n  void *pTmpSpace;\n\n  /* Allocate the Bitvec to be tested and a linear array of\n  ** bits to act as the reference */\n  if( sz<=0 ){\n    pBitvec = sqlite3BitvecCreate( 2*(unsigned)(-sz) );\n    pV = 0;\n  }else{\n    pBitvec = sqlite3BitvecCreate( sz );\n    pV = sqlite3MallocZero( (7+(i64)sz)/8 + 1 );\n  }\n  pTmpSpace = sqlite3_malloc64(BITVEC_SZ);\n  if( pBitvec==0 || pTmpSpace==0 || (pV==0 && sz>0) ) goto bitvec_end;\n\n  /* NULL pBitvec tests */\n  sqlite3BitvecSet(0, 1);\n  sqlite3BitvecClear(0, 1, pTmpSpace);\n\n  /* Run the program */\n  pc = i = 0;\n  while( (op = aOp[pc])!=0 ){\n    if( op>=6 ){\n#ifdef SQLITE_DEBUG\n      if( op==6 ){\n        sqlite3ShowBitvec(pBitvec);\n      }else if( op==7 ){\n        printf(\"BITVEC_SZ     = %d (%d by sizeof)\\n\",\n               BITVEC_SZ, (int)sizeof(Bitvec));\n        printf(\"BITVEC_USIZE  = %d\\n\", (int)BITVEC_USIZE);\n        printf(\"BITVEC_NELEM  = %d\\n\", (int)BITVEC_NELEM);\n        printf(\"BITVEC_NBIT   = %d\\n\", (int)BITVEC_NBIT);\n        printf(\"BITVEC_NINT   = %d\\n\", (int)BITVEC_NINT);\n        printf(\"BITVEC_MXHASH = %d\\n\", (int)BITVEC_MXHASH);\n        printf(\"BITVEC_NPTR   = %d\\n\", (int)BITVEC_NPTR);\n      }\n#endif\n      pc++;\n      continue;\n    }\n    switch( op ){\n      case 1:\n      case 2:\n      case 5: {\n        nx = 4;\n        i = aOp[pc+2] - 1;\n        aOp[pc+2] += aOp[pc+3];\n        break;\n      }\n      case 3:\n      case 4:\n      default: {\n        nx = 2;\n        sqlite3_randomness(sizeof(i), &i);\n        break;\n      }\n    }\n    if( (--aOp[pc+1]) > 0 ) nx = 0;\n    pc += nx;\n    i = (i & 0x7fffffff)%sz;\n    if( (op & 1)!=0 ){\n      if( pV ) SETBIT(pV, (i+1));\n      if( op!=5 ){\n        if( sqlite3BitvecSet(pBitvec, i+1) ) goto bitvec_end;\n      }\n    }else{\n      if( pV ) CLEARBIT(pV, (i+1));\n      sqlite3BitvecClear(pBitvec, i+1, pTmpSpace);\n    }\n  }\n\n  /* Test to make sure the linear array exactly matches the\n  ** Bitvec object.  Start with the assumption that they do\n  ** match (rc==0).  Change rc to non-zero if a discrepancy\n  ** is found.\n  */\n  if( pV ){\n    rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1)\n            + sqlite3BitvecTest(pBitvec, 0)\n            + (sqlite3BitvecSize(pBitvec) - sz);\n    for(i=1; i<=sz; i++){\n      if( (TESTBIT(pV,i))!=sqlite3BitvecTest(pBitvec,i) ){\n        rc = i;\n        break;\n      }\n    }\n  }else{\n    rc = 0;\n  }\n\n  /* Free allocated structure */\nbitvec_end:\n  sqlite3_free(pTmpSpace);\n  sqlite3_free(pV);\n  sqlite3BitvecDestroy(pBitvec);\n  return rc;\n}\n#endif /* SQLITE_UNTESTABLE */\n\n/************** End of bitvec.c **********************************************/\n/************** Begin file pcache.c ******************************************/\n/*\n** 2008 August 05\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file implements that page cache.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** A complete page cache is an instance of this structure.  Every\n** entry in the cache holds a single page of the database file.  The\n** btree layer only operates on the cached copy of the database pages.\n**\n** A page cache entry is \"clean\" if it exactly matches what is currently\n** on disk.  A page is \"dirty\" if it has been modified and needs to be\n** persisted to disk.\n**\n** pDirty, pDirtyTail, pSynced:\n**   All dirty pages are linked into the doubly linked list using\n**   PgHdr.pDirtyNext and pDirtyPrev. The list is maintained in LRU order\n**   such that p was added to the list more recently than p->pDirtyNext.\n**   PCache.pDirty points to the first (newest) element in the list and\n**   pDirtyTail to the last (oldest).\n**\n**   The PCache.pSynced variable is used to optimize searching for a dirty\n**   page to eject from the cache mid-transaction. It is better to eject\n**   a page that does not require a journal sync than one that does.\n**   Therefore, pSynced is maintained so that it *almost* always points\n**   to either the oldest page in the pDirty/pDirtyTail list that has a\n**   clear PGHDR_NEED_SYNC flag or to a page that is older than this one\n**   (so that the right page to eject can be found by following pDirtyPrev\n**   pointers).\n*/\nstruct PCache {\n  PgHdr *pDirty, *pDirtyTail;         /* List of dirty pages in LRU order */\n  PgHdr *pSynced;                     /* Last synced page in dirty page list */\n  i64 nRefSum;                        /* Sum of ref counts over all pages */\n  int szCache;                        /* Configured cache size */\n  int szSpill;                        /* Size before spilling occurs */\n  int szPage;                         /* Size of every page in this cache */\n  int szExtra;                        /* Size of extra space for each page */\n  u8 bPurgeable;                      /* True if pages are on backing store */\n  u8 eCreate;                         /* eCreate value for for xFetch() */\n  int (*xStress)(void*,PgHdr*);       /* Call to try make a page clean */\n  void *pStress;                      /* Argument to xStress */\n  sqlite3_pcache *pCache;             /* Pluggable cache module */\n};\n\n/********************************** Test and Debug Logic **********************/\n/*\n** Debug tracing macros.  Enable by by changing the \"0\" to \"1\" and\n** recompiling.\n**\n** When sqlite3PcacheTrace is 1, single line trace messages are issued.\n** When sqlite3PcacheTrace is 2, a dump of the pcache showing all cache entries\n** is displayed for many operations, resulting in a lot of output.\n*/\n#if defined(SQLITE_DEBUG) && 0\n  int sqlite3PcacheTrace = 2;       /* 0: off  1: simple  2: cache dumps */\n  int sqlite3PcacheMxDump = 9999;   /* Max cache entries for pcacheDump() */\n# define pcacheTrace(X) if(sqlite3PcacheTrace){sqlite3DebugPrintf X;}\n  static void pcachePageTrace(int i, sqlite3_pcache_page *pLower){\n    PgHdr *pPg;\n    unsigned char *a;\n    int j;\n    if( pLower==0 ){\n      printf(\"%3d: NULL\\n\", i);\n    }else{\n      pPg = (PgHdr*)pLower->pExtra;\n      printf(\"%3d: nRef %2lld flgs %02x data \", i, pPg->nRef, pPg->flags);\n      a = (unsigned char *)pLower->pBuf;\n      for(j=0; j<12; j++) printf(\"%02x\", a[j]);\n      printf(\" ptr %p\\n\", pPg);\n    }\n  }\n  static void pcacheDump(PCache *pCache){\n    int N;\n    int i;\n    sqlite3_pcache_page *pLower;\n\n    if( sqlite3PcacheTrace<2 ) return;\n    if( pCache->pCache==0 ) return;\n    N = sqlite3PcachePagecount(pCache);\n    if( N>sqlite3PcacheMxDump ) N = sqlite3PcacheMxDump;\n    for(i=1; i<=N; i++){\n       pLower = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, i, 0);\n       pcachePageTrace(i, pLower);\n       if( pLower && ((PgHdr*)pLower)->pPage==0 ){\n         sqlite3GlobalConfig.pcache2.xUnpin(pCache->pCache, pLower, 0);\n       }\n    }\n  }\n#else\n# define pcacheTrace(X)\n# define pcachePageTrace(PGNO, X)\n# define pcacheDump(X)\n#endif\n\n/*\n** Return 1 if pPg is on the dirty list for pCache.  Return 0 if not.\n** This routine runs inside of assert() statements only.\n*/\n#if defined(SQLITE_ENABLE_EXPENSIVE_ASSERT)\nstatic int pageOnDirtyList(PCache *pCache, PgHdr *pPg){\n  PgHdr *p;\n  for(p=pCache->pDirty; p; p=p->pDirtyNext){\n    if( p==pPg ) return 1;\n  }\n  return 0;\n}\nstatic int pageNotOnDirtyList(PCache *pCache, PgHdr *pPg){\n  PgHdr *p;\n  for(p=pCache->pDirty; p; p=p->pDirtyNext){\n    if( p==pPg ) return 0;\n  }\n  return 1;\n}\n#else\n# define pageOnDirtyList(A,B)    1\n# define pageNotOnDirtyList(A,B) 1\n#endif\n\n/*\n** Check invariants on a PgHdr entry.  Return true if everything is OK.\n** Return false if any invariant is violated.\n**\n** This routine is for use inside of assert() statements only.  For\n** example:\n**\n**          assert( sqlite3PcachePageSanity(pPg) );\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3PcachePageSanity(PgHdr *pPg){\n  PCache *pCache;\n  assert( pPg!=0 );\n  assert( pPg->pgno>0 || pPg->pPager==0 );    /* Page number is 1 or more */\n  pCache = pPg->pCache;\n  assert( pCache!=0 );      /* Every page has an associated PCache */\n  if( pPg->flags & PGHDR_CLEAN ){\n    assert( (pPg->flags & PGHDR_DIRTY)==0 );/* Cannot be both CLEAN and DIRTY */\n    assert( pageNotOnDirtyList(pCache, pPg) );/* CLEAN pages not on dirtylist */\n  }else{\n    assert( (pPg->flags & PGHDR_DIRTY)!=0 );/* If not CLEAN must be DIRTY */\n    assert( pPg->pDirtyNext==0 || pPg->pDirtyNext->pDirtyPrev==pPg );\n    assert( pPg->pDirtyPrev==0 || pPg->pDirtyPrev->pDirtyNext==pPg );\n    assert( pPg->pDirtyPrev!=0 || pCache->pDirty==pPg );\n    assert( pageOnDirtyList(pCache, pPg) );\n  }\n  /* WRITEABLE pages must also be DIRTY */\n  if( pPg->flags & PGHDR_WRITEABLE ){\n    assert( pPg->flags & PGHDR_DIRTY );     /* WRITEABLE implies DIRTY */\n  }\n  /* NEED_SYNC can be set independently of WRITEABLE.  This can happen,\n  ** for example, when using the sqlite3PagerDontWrite() optimization:\n  **    (1)  Page X is journalled, and gets WRITEABLE and NEED_SEEK.\n  **    (2)  Page X moved to freelist, WRITEABLE is cleared\n  **    (3)  Page X reused, WRITEABLE is set again\n  ** If NEED_SYNC had been cleared in step 2, then it would not be reset\n  ** in step 3, and page might be written into the database without first\n  ** syncing the rollback journal, which might cause corruption on a power\n  ** loss.\n  **\n  ** Another example is when the database page size is smaller than the\n  ** disk sector size.  When any page of a sector is journalled, all pages\n  ** in that sector are marked NEED_SYNC even if they are still CLEAN, just\n  ** in case they are later modified, since all pages in the same sector\n  ** must be journalled and synced before any of those pages can be safely\n  ** written.\n  */\n  return 1;\n}\n#endif /* SQLITE_DEBUG */\n\n\n/********************************** Linked List Management ********************/\n\n/* Allowed values for second argument to pcacheManageDirtyList() */\n#define PCACHE_DIRTYLIST_REMOVE   1    /* Remove pPage from dirty list */\n#define PCACHE_DIRTYLIST_ADD      2    /* Add pPage to the dirty list */\n#define PCACHE_DIRTYLIST_FRONT    3    /* Move pPage to the front of the list */\n\n/*\n** Manage pPage's participation on the dirty list.  Bits of the addRemove\n** argument determines what operation to do.  The 0x01 bit means first\n** remove pPage from the dirty list.  The 0x02 means add pPage back to\n** the dirty list.  Doing both moves pPage to the front of the dirty list.\n*/\nstatic void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){\n  PCache *p = pPage->pCache;\n\n  pcacheTrace((\"%p.DIRTYLIST.%s %d\\n\", p,\n                addRemove==1 ? \"REMOVE\" : addRemove==2 ? \"ADD\" : \"FRONT\",\n                pPage->pgno));\n  if( addRemove & PCACHE_DIRTYLIST_REMOVE ){\n    assert( pPage->pDirtyNext || pPage==p->pDirtyTail );\n    assert( pPage->pDirtyPrev || pPage==p->pDirty );\n\n    /* Update the PCache1.pSynced variable if necessary. */\n    if( p->pSynced==pPage ){\n      p->pSynced = pPage->pDirtyPrev;\n    }\n\n    if( pPage->pDirtyNext ){\n      pPage->pDirtyNext->pDirtyPrev = pPage->pDirtyPrev;\n    }else{\n      assert( pPage==p->pDirtyTail );\n      p->pDirtyTail = pPage->pDirtyPrev;\n    }\n    if( pPage->pDirtyPrev ){\n      pPage->pDirtyPrev->pDirtyNext = pPage->pDirtyNext;\n    }else{\n      /* If there are now no dirty pages in the cache, set eCreate to 2.\n      ** This is an optimization that allows sqlite3PcacheFetch() to skip\n      ** searching for a dirty page to eject from the cache when it might\n      ** otherwise have to.  */\n      assert( pPage==p->pDirty );\n      p->pDirty = pPage->pDirtyNext;\n      assert( p->bPurgeable || p->eCreate==2 );\n      if( p->pDirty==0 ){         /*OPTIMIZATION-IF-TRUE*/\n        assert( p->bPurgeable==0 || p->eCreate==1 );\n        p->eCreate = 2;\n      }\n    }\n  }\n  if( addRemove & PCACHE_DIRTYLIST_ADD ){\n    pPage->pDirtyPrev = 0;\n    pPage->pDirtyNext = p->pDirty;\n    if( pPage->pDirtyNext ){\n      assert( pPage->pDirtyNext->pDirtyPrev==0 );\n      pPage->pDirtyNext->pDirtyPrev = pPage;\n    }else{\n      p->pDirtyTail = pPage;\n      if( p->bPurgeable ){\n        assert( p->eCreate==2 );\n        p->eCreate = 1;\n      }\n    }\n    p->pDirty = pPage;\n\n    /* If pSynced is NULL and this page has a clear NEED_SYNC flag, set\n    ** pSynced to point to it. Checking the NEED_SYNC flag is an\n    ** optimization, as if pSynced points to a page with the NEED_SYNC\n    ** flag set sqlite3PcacheFetchStress() searches through all newer\n    ** entries of the dirty-list for a page with NEED_SYNC clear anyway.  */\n    if( !p->pSynced\n     && 0==(pPage->flags&PGHDR_NEED_SYNC)   /*OPTIMIZATION-IF-FALSE*/\n    ){\n      p->pSynced = pPage;\n    }\n  }\n  pcacheDump(p);\n}\n\n/*\n** Wrapper around the pluggable caches xUnpin method. If the cache is\n** being used for an in-memory database, this function is a no-op.\n*/\nstatic void pcacheUnpin(PgHdr *p){\n  if( p->pCache->bPurgeable ){\n    pcacheTrace((\"%p.UNPIN %d\\n\", p->pCache, p->pgno));\n    sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 0);\n    pcacheDump(p->pCache);\n  }\n}\n\n/*\n** Compute the number of pages of cache requested.   p->szCache is the\n** cache size requested by the \"PRAGMA cache_size\" statement.\n*/\nstatic int numberOfCachePages(PCache *p){\n  if( p->szCache>=0 ){\n    /* IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the\n    ** suggested cache size is set to N. */\n    return p->szCache;\n  }else{\n    i64 n;\n    /* IMPLEMENTATION-OF: R-59858-46238 If the argument N is negative, then the\n    ** number of cache pages is adjusted to be a number of pages that would\n    ** use approximately abs(N*1024) bytes of memory based on the current\n    ** page size. */\n    n = ((-1024*(i64)p->szCache)/(p->szPage+p->szExtra));\n    if( n>1000000000 ) n = 1000000000;\n    return (int)n;\n  }\n}\n\n/*************************************************** General Interfaces ******\n**\n** Initialize and shutdown the page cache subsystem. Neither of these\n** functions are threadsafe.\n*/\nSQLITE_PRIVATE int sqlite3PcacheInitialize(void){\n  if( sqlite3GlobalConfig.pcache2.xInit==0 ){\n    /* IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the\n    ** built-in default page cache is used instead of the application defined\n    ** page cache. */\n    sqlite3PCacheSetDefault();\n    assert( sqlite3GlobalConfig.pcache2.xInit!=0 );\n  }\n  return sqlite3GlobalConfig.pcache2.xInit(sqlite3GlobalConfig.pcache2.pArg);\n}\nSQLITE_PRIVATE void sqlite3PcacheShutdown(void){\n  if( sqlite3GlobalConfig.pcache2.xShutdown ){\n    /* IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. */\n    sqlite3GlobalConfig.pcache2.xShutdown(sqlite3GlobalConfig.pcache2.pArg);\n  }\n}\n\n/*\n** Return the size in bytes of a PCache object.\n*/\nSQLITE_PRIVATE int sqlite3PcacheSize(void){ return sizeof(PCache); }\n\n/*\n** Create a new PCache object. Storage space to hold the object\n** has already been allocated and is passed in as the p pointer.\n** The caller discovers how much space needs to be allocated by\n** calling sqlite3PcacheSize().\n**\n** szExtra is some extra space allocated for each page.  The first\n** 8 bytes of the extra space will be zeroed as the page is allocated,\n** but remaining content will be uninitialized.  Though it is opaque\n** to this module, the extra space really ends up being the MemPage\n** structure in the pager.\n*/\nSQLITE_PRIVATE int sqlite3PcacheOpen(\n  int szPage,                  /* Size of every page */\n  int szExtra,                 /* Extra space associated with each page */\n  int bPurgeable,              /* True if pages are on backing store */\n  int (*xStress)(void*,PgHdr*),/* Call to try to make pages clean */\n  void *pStress,               /* Argument to xStress */\n  PCache *p                    /* Preallocated space for the PCache */\n){\n  memset(p, 0, sizeof(PCache));\n  p->szPage = 1;\n  p->szExtra = szExtra;\n  assert( szExtra>=8 );  /* First 8 bytes will be zeroed */\n  p->bPurgeable = bPurgeable;\n  p->eCreate = 2;\n  p->xStress = xStress;\n  p->pStress = pStress;\n  p->szCache = 100;\n  p->szSpill = 1;\n  pcacheTrace((\"%p.OPEN szPage %d bPurgeable %d\\n\",p,szPage,bPurgeable));\n  return sqlite3PcacheSetPageSize(p, szPage);\n}\n\n/*\n** Change the page size for PCache object. The caller must ensure that there\n** are no outstanding page references when this function is called.\n*/\nSQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){\n  assert( pCache->nRefSum==0 && pCache->pDirty==0 );\n  if( pCache->szPage ){\n    sqlite3_pcache *pNew;\n    pNew = sqlite3GlobalConfig.pcache2.xCreate(\n                szPage, pCache->szExtra + ROUND8(sizeof(PgHdr)),\n                pCache->bPurgeable\n    );\n    if( pNew==0 ) return SQLITE_NOMEM_BKPT;\n    sqlite3GlobalConfig.pcache2.xCachesize(pNew, numberOfCachePages(pCache));\n    if( pCache->pCache ){\n      sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);\n    }\n    pCache->pCache = pNew;\n    pCache->szPage = szPage;\n    pcacheTrace((\"%p.PAGESIZE %d\\n\",pCache,szPage));\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Try to obtain a page from the cache.\n**\n** This routine returns a pointer to an sqlite3_pcache_page object if\n** such an object is already in cache, or if a new one is created.\n** This routine returns a NULL pointer if the object was not in cache\n** and could not be created.\n**\n** The createFlags should be 0 to check for existing pages and should\n** be 3 (not 1, but 3) to try to create a new page.\n**\n** If the createFlag is 0, then NULL is always returned if the page\n** is not already in the cache.  If createFlag is 1, then a new page\n** is created only if that can be done without spilling dirty pages\n** and without exceeding the cache size limit.\n**\n** The caller needs to invoke sqlite3PcacheFetchFinish() to properly\n** initialize the sqlite3_pcache_page object and convert it into a\n** PgHdr object.  The sqlite3PcacheFetch() and sqlite3PcacheFetchFinish()\n** routines are split this way for performance reasons. When separated\n** they can both (usually) operate without having to push values to\n** the stack on entry and pop them back off on exit, which saves a\n** lot of pushing and popping.\n*/\nSQLITE_PRIVATE sqlite3_pcache_page *sqlite3PcacheFetch(\n  PCache *pCache,       /* Obtain the page from this cache */\n  Pgno pgno,            /* Page number to obtain */\n  int createFlag        /* If true, create page if it does not exist already */\n){\n  int eCreate;\n  sqlite3_pcache_page *pRes;\n\n  assert( pCache!=0 );\n  assert( pCache->pCache!=0 );\n  assert( createFlag==3 || createFlag==0 );\n  assert( pCache->eCreate==((pCache->bPurgeable && pCache->pDirty) ? 1 : 2) );\n\n  /* eCreate defines what to do if the page does not exist.\n  **    0     Do not allocate a new page.  (createFlag==0)\n  **    1     Allocate a new page if doing so is inexpensive.\n  **          (createFlag==1 AND bPurgeable AND pDirty)\n  **    2     Allocate a new page even it doing so is difficult.\n  **          (createFlag==1 AND !(bPurgeable AND pDirty)\n  */\n  eCreate = createFlag & pCache->eCreate;\n  assert( eCreate==0 || eCreate==1 || eCreate==2 );\n  assert( createFlag==0 || pCache->eCreate==eCreate );\n  assert( createFlag==0 || eCreate==1+(!pCache->bPurgeable||!pCache->pDirty) );\n  pRes = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, eCreate);\n  pcacheTrace((\"%p.FETCH %d%s (result: %p) \",pCache,pgno,\n               createFlag?\" create\":\"\",pRes));\n  pcachePageTrace(pgno, pRes);\n  return pRes;\n}\n\n/*\n** If the sqlite3PcacheFetch() routine is unable to allocate a new\n** page because no clean pages are available for reuse and the cache\n** size limit has been reached, then this routine can be invoked to\n** try harder to allocate a page.  This routine might invoke the stress\n** callback to spill dirty pages to the journal.  It will then try to\n** allocate the new page and will only fail to allocate a new page on\n** an OOM error.\n**\n** This routine should be invoked only after sqlite3PcacheFetch() fails.\n*/\nSQLITE_PRIVATE int sqlite3PcacheFetchStress(\n  PCache *pCache,                 /* Obtain the page from this cache */\n  Pgno pgno,                      /* Page number to obtain */\n  sqlite3_pcache_page **ppPage    /* Write result here */\n){\n  PgHdr *pPg;\n  if( pCache->eCreate==2 ) return 0;\n\n  if( sqlite3PcachePagecount(pCache)>pCache->szSpill ){\n    /* Find a dirty page to write-out and recycle. First try to find a\n    ** page that does not require a journal-sync (one with PGHDR_NEED_SYNC\n    ** cleared), but if that is not possible settle for any other\n    ** unreferenced dirty page.\n    **\n    ** If the LRU page in the dirty list that has a clear PGHDR_NEED_SYNC\n    ** flag is currently referenced, then the following may leave pSynced\n    ** set incorrectly (pointing to other than the LRU page with NEED_SYNC\n    ** cleared). This is Ok, as pSynced is just an optimization.  */\n    for(pPg=pCache->pSynced;\n        pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC));\n        pPg=pPg->pDirtyPrev\n    );\n    pCache->pSynced = pPg;\n    if( !pPg ){\n      for(pPg=pCache->pDirtyTail; pPg && pPg->nRef; pPg=pPg->pDirtyPrev);\n    }\n    if( pPg ){\n      int rc;\n#ifdef SQLITE_LOG_CACHE_SPILL\n      sqlite3_log(SQLITE_FULL,\n                  \"spill page %d making room for %d - cache used: %d/%d\",\n                  pPg->pgno, pgno,\n                  sqlite3GlobalConfig.pcache2.xPagecount(pCache->pCache),\n                numberOfCachePages(pCache));\n#endif\n      pcacheTrace((\"%p.SPILL %d\\n\",pCache,pPg->pgno));\n      rc = pCache->xStress(pCache->pStress, pPg);\n      pcacheDump(pCache);\n      if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){\n        return rc;\n      }\n    }\n  }\n  *ppPage = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, 2);\n  return *ppPage==0 ? SQLITE_NOMEM_BKPT : SQLITE_OK;\n}\n\n/*\n** This is a helper routine for sqlite3PcacheFetchFinish()\n**\n** In the uncommon case where the page being fetched has not been\n** initialized, this routine is invoked to do the initialization.\n** This routine is broken out into a separate function since it\n** requires extra stack manipulation that can be avoided in the common\n** case.\n*/\nstatic SQLITE_NOINLINE PgHdr *pcacheFetchFinishWithInit(\n  PCache *pCache,             /* Obtain the page from this cache */\n  Pgno pgno,                  /* Page number obtained */\n  sqlite3_pcache_page *pPage  /* Page obtained by prior PcacheFetch() call */\n){\n  PgHdr *pPgHdr;\n  assert( pPage!=0 );\n  pPgHdr = (PgHdr*)pPage->pExtra;\n  assert( pPgHdr->pPage==0 );\n  memset(&pPgHdr->pDirty, 0, sizeof(PgHdr) - offsetof(PgHdr,pDirty));\n  pPgHdr->pPage = pPage;\n  pPgHdr->pData = pPage->pBuf;\n  pPgHdr->pExtra = (void *)&pPgHdr[1];\n  memset(pPgHdr->pExtra, 0, 8);\n  assert( EIGHT_BYTE_ALIGNMENT( pPgHdr->pExtra ) );\n  pPgHdr->pCache = pCache;\n  pPgHdr->pgno = pgno;\n  pPgHdr->flags = PGHDR_CLEAN;\n  return sqlite3PcacheFetchFinish(pCache,pgno,pPage);\n}\n\n/*\n** This routine converts the sqlite3_pcache_page object returned by\n** sqlite3PcacheFetch() into an initialized PgHdr object.  This routine\n** must be called after sqlite3PcacheFetch() in order to get a usable\n** result.\n*/\nSQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(\n  PCache *pCache,             /* Obtain the page from this cache */\n  Pgno pgno,                  /* Page number obtained */\n  sqlite3_pcache_page *pPage  /* Page obtained by prior PcacheFetch() call */\n){\n  PgHdr *pPgHdr;\n\n  assert( pPage!=0 );\n  pPgHdr = (PgHdr *)pPage->pExtra;\n\n  if( !pPgHdr->pPage ){\n    return pcacheFetchFinishWithInit(pCache, pgno, pPage);\n  }\n  pCache->nRefSum++;\n  pPgHdr->nRef++;\n  assert( sqlite3PcachePageSanity(pPgHdr) );\n  return pPgHdr;\n}\n\n/*\n** Decrement the reference count on a page. If the page is clean and the\n** reference count drops to 0, then it is made eligible for recycling.\n*/\nSQLITE_PRIVATE void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){\n  assert( p->nRef>0 );\n  p->pCache->nRefSum--;\n  if( (--p->nRef)==0 ){\n    if( p->flags&PGHDR_CLEAN ){\n      pcacheUnpin(p);\n    }else{\n      pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);\n      assert( sqlite3PcachePageSanity(p) );\n    }\n  }\n}\n\n/*\n** Increase the reference count of a supplied page by 1.\n*/\nSQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){\n  assert(p->nRef>0);\n  assert( sqlite3PcachePageSanity(p) );\n  p->nRef++;\n  p->pCache->nRefSum++;\n}\n\n/*\n** Drop a page from the cache. There must be exactly one reference to the\n** page. This function deletes that reference, so after it returns the\n** page pointed to by p is invalid.\n*/\nSQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){\n  assert( p->nRef==1 );\n  assert( sqlite3PcachePageSanity(p) );\n  if( p->flags&PGHDR_DIRTY ){\n    pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);\n  }\n  p->pCache->nRefSum--;\n  sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 1);\n}\n\n/*\n** Make sure the page is marked as dirty. If it isn't dirty already,\n** make it so.\n*/\nSQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){\n  assert( p->nRef>0 );\n  assert( sqlite3PcachePageSanity(p) );\n  if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){    /*OPTIMIZATION-IF-FALSE*/\n    p->flags &= ~PGHDR_DONT_WRITE;\n    if( p->flags & PGHDR_CLEAN ){\n      p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);\n      pcacheTrace((\"%p.DIRTY %d\\n\",p->pCache,p->pgno));\n      assert( (p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY );\n      pcacheManageDirtyList(p, PCACHE_DIRTYLIST_ADD);\n      assert( sqlite3PcachePageSanity(p) );\n    }\n    assert( sqlite3PcachePageSanity(p) );\n  }\n}\n\n/*\n** Make sure the page is marked as clean. If it isn't clean already,\n** make it so.\n*/\nSQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){\n  assert( sqlite3PcachePageSanity(p) );\n  assert( (p->flags & PGHDR_DIRTY)!=0 );\n  assert( (p->flags & PGHDR_CLEAN)==0 );\n  pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);\n  p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC|PGHDR_WRITEABLE);\n  p->flags |= PGHDR_CLEAN;\n  pcacheTrace((\"%p.CLEAN %d\\n\",p->pCache,p->pgno));\n  assert( sqlite3PcachePageSanity(p) );\n  if( p->nRef==0 ){\n    pcacheUnpin(p);\n  }\n}\n\n/*\n** Make every page in the cache clean.\n*/\nSQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache *pCache){\n  PgHdr *p;\n  pcacheTrace((\"%p.CLEAN-ALL\\n\",pCache));\n  while( (p = pCache->pDirty)!=0 ){\n    sqlite3PcacheMakeClean(p);\n  }\n}\n\n/*\n** Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages.\n*/\nSQLITE_PRIVATE void sqlite3PcacheClearWritable(PCache *pCache){\n  PgHdr *p;\n  pcacheTrace((\"%p.CLEAR-WRITEABLE\\n\",pCache));\n  for(p=pCache->pDirty; p; p=p->pDirtyNext){\n    p->flags &= ~(PGHDR_NEED_SYNC|PGHDR_WRITEABLE);\n  }\n  pCache->pSynced = pCache->pDirtyTail;\n}\n\n/*\n** Clear the PGHDR_NEED_SYNC flag from all dirty pages.\n*/\nSQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *pCache){\n  PgHdr *p;\n  for(p=pCache->pDirty; p; p=p->pDirtyNext){\n    p->flags &= ~PGHDR_NEED_SYNC;\n  }\n  pCache->pSynced = pCache->pDirtyTail;\n}\n\n/*\n** Change the page number of page p to newPgno.\n*/\nSQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){\n  PCache *pCache = p->pCache;\n  sqlite3_pcache_page *pOther;\n  assert( p->nRef>0 );\n  assert( newPgno>0 );\n  assert( sqlite3PcachePageSanity(p) );\n  pcacheTrace((\"%p.MOVE %d -> %d\\n\",pCache,p->pgno,newPgno));\n  pOther = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, newPgno, 0);\n  if( pOther ){\n    PgHdr *pXPage = (PgHdr*)pOther->pExtra;\n    assert( pXPage->nRef==0 );\n    pXPage->nRef++;\n    pCache->nRefSum++;\n    sqlite3PcacheDrop(pXPage);\n  }\n  sqlite3GlobalConfig.pcache2.xRekey(pCache->pCache, p->pPage, p->pgno,newPgno);\n  p->pgno = newPgno;\n  if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){\n    pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);\n    assert( sqlite3PcachePageSanity(p) );\n  }\n}\n\n/*\n** Drop every cache entry whose page number is greater than \"pgno\". The\n** caller must ensure that there are no outstanding references to any pages\n** other than page 1 with a page number greater than pgno.\n**\n** If there is a reference to page 1 and the pgno parameter passed to this\n** function is 0, then the data area associated with page 1 is zeroed, but\n** the page object is not dropped.\n*/\nSQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){\n  if( pCache->pCache ){\n    PgHdr *p;\n    PgHdr *pNext;\n    pcacheTrace((\"%p.TRUNCATE %d\\n\",pCache,pgno));\n    for(p=pCache->pDirty; p; p=pNext){\n      pNext = p->pDirtyNext;\n      /* This routine never gets call with a positive pgno except right\n      ** after sqlite3PcacheCleanAll().  So if there are dirty pages,\n      ** it must be that pgno==0.\n      */\n      assert( p->pgno>0 );\n      if( p->pgno>pgno ){\n        assert( p->flags&PGHDR_DIRTY );\n        sqlite3PcacheMakeClean(p);\n      }\n    }\n    if( pgno==0 && pCache->nRefSum ){\n      sqlite3_pcache_page *pPage1;\n      pPage1 = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache,1,0);\n      if( ALWAYS(pPage1) ){  /* Page 1 is always available in cache, because\n                             ** pCache->nRefSum>0 */\n        memset(pPage1->pBuf, 0, pCache->szPage);\n        pgno = 1;\n      }\n    }\n    sqlite3GlobalConfig.pcache2.xTruncate(pCache->pCache, pgno+1);\n  }\n}\n\n/*\n** Close a cache.\n*/\nSQLITE_PRIVATE void sqlite3PcacheClose(PCache *pCache){\n  assert( pCache->pCache!=0 );\n  pcacheTrace((\"%p.CLOSE\\n\",pCache));\n  sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);\n}\n\n/*\n** Discard the contents of the cache.\n*/\nSQLITE_PRIVATE void sqlite3PcacheClear(PCache *pCache){\n  sqlite3PcacheTruncate(pCache, 0);\n}\n\n/*\n** Merge two lists of pages connected by pDirty and in pgno order.\n** Do not bother fixing the pDirtyPrev pointers.\n*/\nstatic PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){\n  PgHdr result, *pTail;\n  pTail = &result;\n  assert( pA!=0 && pB!=0 );\n  for(;;){\n    if( pA->pgno<pB->pgno ){\n      pTail->pDirty = pA;\n      pTail = pA;\n      pA = pA->pDirty;\n      if( pA==0 ){\n        pTail->pDirty = pB;\n        break;\n      }\n    }else{\n      pTail->pDirty = pB;\n      pTail = pB;\n      pB = pB->pDirty;\n      if( pB==0 ){\n        pTail->pDirty = pA;\n        break;\n      }\n    }\n  }\n  return result.pDirty;\n}\n\n/*\n** Sort the list of pages in ascending order by pgno.  Pages are\n** connected by pDirty pointers.  The pDirtyPrev pointers are\n** corrupted by this sort.\n**\n** Since there cannot be more than 2^31 distinct pages in a database,\n** there cannot be more than 31 buckets required by the merge sorter.\n** One extra bucket is added to catch overflow in case something\n** ever changes to make the previous sentence incorrect.\n*/\n#define N_SORT_BUCKET  32\nstatic PgHdr *pcacheSortDirtyList(PgHdr *pIn){\n  PgHdr *a[N_SORT_BUCKET], *p;\n  int i;\n  memset(a, 0, sizeof(a));\n  while( pIn ){\n    p = pIn;\n    pIn = p->pDirty;\n    p->pDirty = 0;\n    for(i=0; ALWAYS(i<N_SORT_BUCKET-1); i++){\n      if( a[i]==0 ){\n        a[i] = p;\n        break;\n      }else{\n        p = pcacheMergeDirtyList(a[i], p);\n        a[i] = 0;\n      }\n    }\n    if( NEVER(i==N_SORT_BUCKET-1) ){\n      /* To get here, there need to be 2^(N_SORT_BUCKET) elements in\n      ** the input list.  But that is impossible.\n      */\n      a[i] = pcacheMergeDirtyList(a[i], p);\n    }\n  }\n  p = a[0];\n  for(i=1; i<N_SORT_BUCKET; i++){\n    if( a[i]==0 ) continue;\n    p = p ? pcacheMergeDirtyList(p, a[i]) : a[i];\n  }\n  return p;\n}\n\n/*\n** Return a list of all dirty pages in the cache, sorted by page number.\n*/\nSQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){\n  PgHdr *p;\n  for(p=pCache->pDirty; p; p=p->pDirtyNext){\n    p->pDirty = p->pDirtyNext;\n  }\n  return pcacheSortDirtyList(pCache->pDirty);\n}\n\n/*\n** Return the total number of references to all pages held by the cache.\n**\n** This is not the total number of pages referenced, but the sum of the\n** reference count for all pages.\n*/\nSQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache *pCache){\n  return pCache->nRefSum;\n}\n\n/*\n** Return the number of references to the page supplied as an argument.\n*/\nSQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr *p){\n  return p->nRef;\n}\n\n/*\n** Return the total number of pages in the cache.\n*/\nSQLITE_PRIVATE int sqlite3PcachePagecount(PCache *pCache){\n  assert( pCache->pCache!=0 );\n  return sqlite3GlobalConfig.pcache2.xPagecount(pCache->pCache);\n}\n\n#ifdef SQLITE_TEST\n/*\n** Get the suggested cache-size value.\n*/\nSQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *pCache){\n  return numberOfCachePages(pCache);\n}\n#endif\n\n/*\n** Set the suggested cache-size value.\n*/\nSQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *pCache, int mxPage){\n  assert( pCache->pCache!=0 );\n  pCache->szCache = mxPage;\n  sqlite3GlobalConfig.pcache2.xCachesize(pCache->pCache,\n                                         numberOfCachePages(pCache));\n}\n\n/*\n** Set the suggested cache-spill value.  Make no changes if if the\n** argument is zero.  Return the effective cache-spill size, which will\n** be the larger of the szSpill and szCache.\n*/\nSQLITE_PRIVATE int sqlite3PcacheSetSpillsize(PCache *p, int mxPage){\n  int res;\n  assert( p->pCache!=0 );\n  if( mxPage ){\n    if( mxPage<0 ){\n      mxPage = (int)((-1024*(i64)mxPage)/(p->szPage+p->szExtra));\n    }\n    p->szSpill = mxPage;\n  }\n  res = numberOfCachePages(p);\n  if( res<p->szSpill ) res = p->szSpill;\n  return res;\n}\n\n/*\n** Free up as much memory as possible from the page cache.\n*/\nSQLITE_PRIVATE void sqlite3PcacheShrink(PCache *pCache){\n  assert( pCache->pCache!=0 );\n  sqlite3GlobalConfig.pcache2.xShrink(pCache->pCache);\n}\n\n/*\n** Return the size of the header added by this middleware layer\n** in the page-cache hierarchy.\n*/\nSQLITE_PRIVATE int sqlite3HeaderSizePcache(void){ return ROUND8(sizeof(PgHdr)); }\n\n/*\n** Return the number of dirty pages currently in the cache, as a percentage\n** of the configured cache size.\n*/\nSQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache *pCache){\n  PgHdr *pDirty;\n  int nDirty = 0;\n  int nCache = numberOfCachePages(pCache);\n  for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext) nDirty++;\n  return nCache ? (int)(((i64)nDirty * 100) / nCache) : 0;\n}\n\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\n/*\n** Return true if there are one or more dirty pages in the cache. Else false.\n*/\nSQLITE_PRIVATE int sqlite3PCacheIsDirty(PCache *pCache){\n  return (pCache->pDirty!=0);\n}\n#endif\n\n#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)\n/*\n** For all dirty pages currently in the cache, invoke the specified\n** callback. This is only used if the SQLITE_CHECK_PAGES macro is\n** defined.\n*/\nSQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *)){\n  PgHdr *pDirty;\n  for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext){\n    xIter(pDirty);\n  }\n}\n#endif\n\n/************** End of pcache.c **********************************************/\n/************** Begin file pcache1.c *****************************************/\n/*\n** 2008 November 05\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file implements the default page cache implementation (the\n** sqlite3_pcache interface). It also contains part of the implementation\n** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.\n** If the default page cache implementation is overridden, then neither of\n** these two features are available.\n**\n** A Page cache line looks like this:\n**\n**  -------------------------------------------------------------\n**  |  database page content   |  PgHdr1  |  MemPage  |  PgHdr  |\n**  -------------------------------------------------------------\n**\n** The database page content is up front (so that buffer overreads tend to\n** flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions).   MemPage\n** is the extension added by the btree.c module containing information such\n** as the database page number and how that database page is used.  PgHdr\n** is added by the pcache.c layer and contains information used to keep track\n** of which pages are \"dirty\".  PgHdr1 is an extension added by this\n** module (pcache1.c).  The PgHdr1 header is a subclass of sqlite3_pcache_page.\n** PgHdr1 contains information needed to look up a page by its page number.\n** The superclass sqlite3_pcache_page.pBuf points to the start of the\n** database page content and sqlite3_pcache_page.pExtra points to PgHdr.\n**\n** The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at\n** runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size).  The\n** sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this\n** size can vary according to architecture, compile-time options, and\n** SQLite library version number.\n**\n** Historical note:  It used to be that if the SQLITE_PCACHE_SEPARATE_HEADER\n** was defined, then the page content would be held in a separate memory\n** allocation from the PgHdr1.  This was intended to avoid clownshoe memory\n** allocations.  However, the btree layer needs a small (16-byte) overrun\n** area after the page content buffer.  The header serves as that overrun\n** area.  Therefore SQLITE_PCACHE_SEPARATE_HEADER was discontinued to avoid\n** any possibility of a memory error.\n**\n** This module tracks pointers to PgHdr1 objects.  Only pcache.c communicates\n** with this module.  Information is passed back and forth as PgHdr1 pointers.\n**\n** The pcache.c and pager.c modules deal pointers to PgHdr objects.\n** The btree.c module deals with pointers to MemPage objects.\n**\n** SOURCE OF PAGE CACHE MEMORY:\n**\n** Memory for a page might come from any of three sources:\n**\n**    (1)  The general-purpose memory allocator - sqlite3Malloc()\n**    (2)  Global page-cache memory provided using sqlite3_config() with\n**         SQLITE_CONFIG_PAGECACHE.\n**    (3)  PCache-local bulk allocation.\n**\n** The third case is a chunk of heap memory (defaulting to 100 pages worth)\n** that is allocated when the page cache is created.  The size of the local\n** bulk allocation can be adjusted using\n**\n**     sqlite3_config(SQLITE_CONFIG_PAGECACHE, (void*)0, 0, N).\n**\n** If N is positive, then N pages worth of memory are allocated using a single\n** sqlite3Malloc() call and that memory is used for the first N pages allocated.\n** Or if N is negative, then -1024*N bytes of memory are allocated and used\n** for as many pages as can be accommodated.\n**\n** Only one of (2) or (3) can be used.  Once the memory available to (2) or\n** (3) is exhausted, subsequent allocations fail over to the general-purpose\n** memory allocator (1).\n**\n** Earlier versions of SQLite used only methods (1) and (2).  But experiments\n** show that method (3) with N==100 provides about a 5% performance boost for\n** common workloads.\n*/\n/* #include \"sqliteInt.h\" */\n\ntypedef struct PCache1 PCache1;\ntypedef struct PgHdr1 PgHdr1;\ntypedef struct PgFreeslot PgFreeslot;\ntypedef struct PGroup PGroup;\n\n/*\n** Each cache entry is represented by an instance of the following\n** structure. A buffer of PgHdr1.pCache->szPage bytes is allocated\n** directly before this structure and is used to cache the page content.\n**\n** When reading a corrupt database file, it is possible that SQLite might\n** read a few bytes (no more than 16 bytes) past the end of the page buffer.\n** It will only read past the end of the page buffer, never write.  This\n** object is positioned immediately after the page buffer to serve as an\n** overrun area, so that overreads are harmless.\n**\n** Variables isBulkLocal and isAnchor were once type \"u8\". That works,\n** but causes a 2-byte gap in the structure for most architectures (since\n** pointers must be either 4 or 8-byte aligned). As this structure is located\n** in memory directly after the associated page data, if the database is\n** corrupt, code at the b-tree layer may overread the page buffer and\n** read part of this structure before the corruption is detected. This\n** can cause a valgrind error if the uninitialized gap is accessed. Using u16\n** ensures there is no such gap, and therefore no bytes of uninitialized\n** memory in the structure.\n**\n** The pLruNext and pLruPrev pointers form a double-linked circular list\n** of all pages that are unpinned.  The PGroup.lru element (which should be\n** the only element on the list with PgHdr1.isAnchor set to 1) forms the\n** beginning and the end of the list.\n*/\nstruct PgHdr1 {\n  sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */\n  unsigned int iKey;        /* Key value (page number) */\n  u16 isBulkLocal;          /* This page from bulk local storage */\n  u16 isAnchor;             /* This is the PGroup.lru element */\n  PgHdr1 *pNext;            /* Next in hash table chain */\n  PCache1 *pCache;          /* Cache that currently owns this page */\n  PgHdr1 *pLruNext;         /* Next in circular LRU list of unpinned pages */\n  PgHdr1 *pLruPrev;         /* Previous in LRU list of unpinned pages */\n                            /* NB: pLruPrev is only valid if pLruNext!=0 */\n};\n\n/*\n** A page is pinned if it is not on the LRU list.  To be \"pinned\" means\n** that the page is in active use and must not be deallocated.\n*/\n#define PAGE_IS_PINNED(p)    ((p)->pLruNext==0)\n#define PAGE_IS_UNPINNED(p)  ((p)->pLruNext!=0)\n\n/* Each page cache (or PCache) belongs to a PGroup.  A PGroup is a set\n** of one or more PCaches that are able to recycle each other's unpinned\n** pages when they are under memory pressure.  A PGroup is an instance of\n** the following object.\n**\n** This page cache implementation works in one of two modes:\n**\n**   (1)  Every PCache is the sole member of its own PGroup.  There is\n**        one PGroup per PCache.\n**\n**   (2)  There is a single global PGroup that all PCaches are a member\n**        of.\n**\n** Mode 1 uses more memory (since PCache instances are not able to rob\n** unused pages from other PCaches) but it also operates without a mutex,\n** and is therefore often faster.  Mode 2 requires a mutex in order to be\n** threadsafe, but recycles pages more efficiently.\n**\n** For mode (1), PGroup.mutex is NULL.  For mode (2) there is only a single\n** PGroup which is the pcache1.grp global variable and its mutex is\n** SQLITE_MUTEX_STATIC_LRU.\n*/\nstruct PGroup {\n  sqlite3_mutex *mutex;          /* MUTEX_STATIC_LRU or NULL */\n  unsigned int nMaxPage;         /* Sum of nMax for purgeable caches */\n  unsigned int nMinPage;         /* Sum of nMin for purgeable caches */\n  unsigned int mxPinned;         /* nMaxpage + 10 - nMinPage */\n  unsigned int nPurgeable;       /* Number of purgeable pages allocated */\n  PgHdr1 lru;                    /* The beginning and end of the LRU list */\n};\n\n/* Each page cache is an instance of the following object.  Every\n** open database file (including each in-memory database and each\n** temporary or transient database) has a single page cache which\n** is an instance of this object.\n**\n** Pointers to structures of this type are cast and returned as\n** opaque sqlite3_pcache* handles.\n*/\nstruct PCache1 {\n  /* Cache configuration parameters. Page size (szPage) and the purgeable\n  ** flag (bPurgeable) and the pnPurgeable pointer are all set when the\n  ** cache is created and are never changed thereafter. nMax may be\n  ** modified at any time by a call to the pcache1Cachesize() method.\n  ** The PGroup mutex must be held when accessing nMax.\n  */\n  PGroup *pGroup;                     /* PGroup this cache belongs to */\n  unsigned int *pnPurgeable;          /* Pointer to pGroup->nPurgeable */\n  int szPage;                         /* Size of database content section */\n  int szExtra;                        /* sizeof(MemPage)+sizeof(PgHdr) */\n  int szAlloc;                        /* Total size of one pcache line */\n  int bPurgeable;                     /* True if cache is purgeable */\n  unsigned int nMin;                  /* Minimum number of pages reserved */\n  unsigned int nMax;                  /* Configured \"cache_size\" value */\n  unsigned int n90pct;                /* nMax*9/10 */\n  unsigned int iMaxKey;               /* Largest key seen since xTruncate() */\n  unsigned int nPurgeableDummy;       /* pnPurgeable points here when not used*/\n\n  /* Hash table of all pages. The following variables may only be accessed\n  ** when the accessor is holding the PGroup mutex.\n  */\n  unsigned int nRecyclable;           /* Number of pages in the LRU list */\n  unsigned int nPage;                 /* Total number of pages in apHash */\n  unsigned int nHash;                 /* Number of slots in apHash[] */\n  PgHdr1 **apHash;                    /* Hash table for fast lookup by key */\n  PgHdr1 *pFree;                      /* List of unused pcache-local pages */\n  void *pBulk;                        /* Bulk memory used by pcache-local */\n};\n\n/*\n** Free slots in the allocator used to divide up the global page cache\n** buffer provided using the SQLITE_CONFIG_PAGECACHE mechanism.\n*/\nstruct PgFreeslot {\n  PgFreeslot *pNext;  /* Next free slot */\n};\n\n/*\n** Global data used by this cache.\n*/\nstatic SQLITE_WSD struct PCacheGlobal {\n  PGroup grp;                    /* The global PGroup for mode (2) */\n\n  /* Variables related to SQLITE_CONFIG_PAGECACHE settings.  The\n  ** szSlot, nSlot, pStart, pEnd, nReserve, and isInit values are all\n  ** fixed at sqlite3_initialize() time and do not require mutex protection.\n  ** The nFreeSlot and pFree values do require mutex protection.\n  */\n  int isInit;                    /* True if initialized */\n  int separateCache;             /* Use a new PGroup for each PCache */\n  int nInitPage;                 /* Initial bulk allocation size */\n  int szSlot;                    /* Size of each free slot */\n  int nSlot;                     /* The number of pcache slots */\n  int nReserve;                  /* Try to keep nFreeSlot above this */\n  void *pStart, *pEnd;           /* Bounds of global page cache memory */\n  /* Above requires no mutex.  Use mutex below for variable that follow. */\n  sqlite3_mutex *mutex;          /* Mutex for accessing the following: */\n  PgFreeslot *pFree;             /* Free page blocks */\n  int nFreeSlot;                 /* Number of unused pcache slots */\n  int bUnderPressure;            /* True if low on PAGECACHE memory */\n} pcache1_g;\n\n/*\n** All code in this file should access the global structure above via the\n** alias \"pcache1\". This ensures that the WSD emulation is used when\n** compiling for systems that do not support real WSD.\n*/\n#define pcache1 (GLOBAL(struct PCacheGlobal, pcache1_g))\n\n/*\n** Macros to enter and leave the PCache LRU mutex.\n*/\n#if !defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0\n# define pcache1EnterMutex(X)  assert((X)->mutex==0)\n# define pcache1LeaveMutex(X)  assert((X)->mutex==0)\n# define PCACHE1_MIGHT_USE_GROUP_MUTEX 0\n#else\n# define pcache1EnterMutex(X) sqlite3_mutex_enter((X)->mutex)\n# define pcache1LeaveMutex(X) sqlite3_mutex_leave((X)->mutex)\n# define PCACHE1_MIGHT_USE_GROUP_MUTEX 1\n#endif\n\n/******************************************************************************/\n/******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/\n\n\n/*\n** This function is called during initialization if a static buffer is\n** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE\n** verb to sqlite3_config(). Parameter pBuf points to an allocation large\n** enough to contain 'n' buffers of 'sz' bytes each.\n**\n** This routine is called from sqlite3_initialize() and so it is guaranteed\n** to be serialized already.  There is no need for further mutexing.\n*/\nSQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){\n  if( pcache1.isInit ){\n    PgFreeslot *p;\n    if( pBuf==0 ) sz = n = 0;\n    if( n==0 ) sz = 0;\n    sz = ROUNDDOWN8(sz);\n    pcache1.szSlot = sz;\n    pcache1.nSlot = pcache1.nFreeSlot = n;\n    pcache1.nReserve = n>90 ? 10 : (n/10 + 1);\n    pcache1.pStart = pBuf;\n    pcache1.pFree = 0;\n    AtomicStore(&pcache1.bUnderPressure,0);\n    while( n-- ){\n      p = (PgFreeslot*)pBuf;\n      p->pNext = pcache1.pFree;\n      pcache1.pFree = p;\n      pBuf = (void*)&((char*)pBuf)[sz];\n    }\n    pcache1.pEnd = pBuf;\n  }\n}\n\n/*\n** Try to initialize the pCache->pFree and pCache->pBulk fields.  Return\n** true if pCache->pFree ends up containing one or more free pages.\n*/\nstatic int pcache1InitBulk(PCache1 *pCache){\n  i64 szBulk;\n  char *zBulk;\n  if( pcache1.nInitPage==0 ) return 0;\n  /* Do not bother with a bulk allocation if the cache size very small */\n  if( pCache->nMax<3 ) return 0;\n  sqlite3BeginBenignMalloc();\n  if( pcache1.nInitPage>0 ){\n    szBulk = pCache->szAlloc * (i64)pcache1.nInitPage;\n  }else{\n    szBulk = -1024 * (i64)pcache1.nInitPage;\n  }\n  if( szBulk > pCache->szAlloc*(i64)pCache->nMax ){\n    szBulk = pCache->szAlloc*(i64)pCache->nMax;\n  }\n  zBulk = pCache->pBulk = sqlite3Malloc( szBulk );\n  sqlite3EndBenignMalloc();\n  if( zBulk ){\n    int nBulk = sqlite3MallocSize(zBulk)/pCache->szAlloc;\n    do{\n      PgHdr1 *pX = (PgHdr1*)&zBulk[pCache->szPage];\n      pX->page.pBuf = zBulk;\n      pX->page.pExtra = (u8*)pX + ROUND8(sizeof(*pX));\n      assert( EIGHT_BYTE_ALIGNMENT( pX->page.pExtra ) );\n      pX->isBulkLocal = 1;\n      pX->isAnchor = 0;\n      pX->pNext = pCache->pFree;\n      pX->pLruPrev = 0;           /* Initializing this saves a valgrind error */\n      pCache->pFree = pX;\n      zBulk += pCache->szAlloc;\n    }while( --nBulk );\n  }\n  return pCache->pFree!=0;\n}\n\n/*\n** Malloc function used within this file to allocate space from the buffer\n** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no\n** such buffer exists or there is no space left in it, this function falls\n** back to sqlite3Malloc().\n**\n** Multiple threads can run this routine at the same time.  Global variables\n** in pcache1 need to be protected via mutex.\n*/\nstatic void *pcache1Alloc(int nByte){\n  void *p = 0;\n  assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );\n  if( nByte<=pcache1.szSlot ){\n    sqlite3_mutex_enter(pcache1.mutex);\n    p = (PgHdr1 *)pcache1.pFree;\n    if( p ){\n      pcache1.pFree = pcache1.pFree->pNext;\n      pcache1.nFreeSlot--;\n      AtomicStore(&pcache1.bUnderPressure,pcache1.nFreeSlot<pcache1.nReserve);\n      assert( pcache1.nFreeSlot>=0 );\n      sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);\n      sqlite3StatusUp(SQLITE_STATUS_PAGECACHE_USED, 1);\n    }\n    sqlite3_mutex_leave(pcache1.mutex);\n  }\n  if( p==0 ){\n    /* Memory is not available in the SQLITE_CONFIG_PAGECACHE pool.  Get\n    ** it from sqlite3Malloc instead.\n    */\n    p = sqlite3Malloc(nByte);\n#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS\n    if( p ){\n      int sz = sqlite3MallocSize(p);\n      sqlite3_mutex_enter(pcache1.mutex);\n      sqlite3StatusHighwater(SQLITE_STATUS_PAGECACHE_SIZE, nByte);\n      sqlite3StatusUp(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);\n      sqlite3_mutex_leave(pcache1.mutex);\n    }\n#endif\n    sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);\n  }\n  return p;\n}\n\n/*\n** Free an allocated buffer obtained from pcache1Alloc().\n*/\nstatic void pcache1Free(void *p){\n  if( p==0 ) return;\n  if( SQLITE_WITHIN(p, pcache1.pStart, pcache1.pEnd) ){\n    PgFreeslot *pSlot;\n    sqlite3_mutex_enter(pcache1.mutex);\n    sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_USED, 1);\n    pSlot = (PgFreeslot*)p;\n    pSlot->pNext = pcache1.pFree;\n    pcache1.pFree = pSlot;\n    pcache1.nFreeSlot++;\n    AtomicStore(&pcache1.bUnderPressure,pcache1.nFreeSlot<pcache1.nReserve);\n    assert( pcache1.nFreeSlot<=pcache1.nSlot );\n    sqlite3_mutex_leave(pcache1.mutex);\n  }else{\n    assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );\n    sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS\n    {\n      int nFreed = 0;\n      nFreed = sqlite3MallocSize(p);\n      sqlite3_mutex_enter(pcache1.mutex);\n      sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);\n      sqlite3_mutex_leave(pcache1.mutex);\n    }\n#endif\n    sqlite3_free(p);\n  }\n}\n\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n/*\n** Return the size of a pcache allocation\n*/\nstatic int pcache1MemSize(void *p){\n  if( p>=pcache1.pStart && p<pcache1.pEnd ){\n    return pcache1.szSlot;\n  }else{\n    int iSize;\n    assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );\n    sqlite3MemdebugSetType(p, MEMTYPE_HEAP);\n    iSize = sqlite3MallocSize(p);\n    sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);\n    return iSize;\n  }\n}\n#endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */\n\n/*\n** Allocate a new page object initially associated with cache pCache.\n*/\nstatic PgHdr1 *pcache1AllocPage(PCache1 *pCache, int benignMalloc){\n  PgHdr1 *p = 0;\n  void *pPg;\n\n  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );\n  if( pCache->pFree || (pCache->nPage==0 && pcache1InitBulk(pCache)) ){\n    assert( pCache->pFree!=0 );\n    p = pCache->pFree;\n    pCache->pFree = p->pNext;\n    p->pNext = 0;\n  }else{\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n    /* The group mutex must be released before pcache1Alloc() is called. This\n    ** is because it might call sqlite3_release_memory(), which assumes that\n    ** this mutex is not held. */\n    assert( pcache1.separateCache==0 );\n    assert( pCache->pGroup==&pcache1.grp );\n    pcache1LeaveMutex(pCache->pGroup);\n#endif\n    if( benignMalloc ){ sqlite3BeginBenignMalloc(); }\n    pPg = pcache1Alloc(pCache->szAlloc);\n    if( benignMalloc ){ sqlite3EndBenignMalloc(); }\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n    pcache1EnterMutex(pCache->pGroup);\n#endif\n    if( pPg==0 ) return 0;\n    p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];\n    p->page.pBuf = pPg;\n    p->page.pExtra = (u8*)p + ROUND8(sizeof(*p));\n    assert( EIGHT_BYTE_ALIGNMENT( p->page.pExtra ) );\n    p->isBulkLocal = 0;\n    p->isAnchor = 0;\n    p->pLruPrev = 0;           /* Initializing this saves a valgrind error */\n  }\n  (*pCache->pnPurgeable)++;\n  return p;\n}\n\n/*\n** Free a page object allocated by pcache1AllocPage().\n*/\nstatic void pcache1FreePage(PgHdr1 *p){\n  PCache1 *pCache;\n  assert( p!=0 );\n  pCache = p->pCache;\n  assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );\n  if( p->isBulkLocal ){\n    p->pNext = pCache->pFree;\n    pCache->pFree = p;\n  }else{\n    pcache1Free(p->page.pBuf);\n  }\n  (*pCache->pnPurgeable)--;\n}\n\n/*\n** Malloc function used by SQLite to obtain space from the buffer configured\n** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer\n** exists, this function falls back to sqlite3Malloc().\n*/\nSQLITE_PRIVATE void *sqlite3PageMalloc(int sz){\n  assert( sz<=65536+8 ); /* These allocations are never very large */\n  return pcache1Alloc(sz);\n}\n\n/*\n** Free an allocated buffer obtained from sqlite3PageMalloc().\n*/\nSQLITE_PRIVATE void sqlite3PageFree(void *p){\n  pcache1Free(p);\n}\n\n\n/*\n** Return true if it desirable to avoid allocating a new page cache\n** entry.\n**\n** If memory was allocated specifically to the page cache using\n** SQLITE_CONFIG_PAGECACHE but that memory has all been used, then\n** it is desirable to avoid allocating a new page cache entry because\n** presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient\n** for all page cache needs and we should not need to spill the\n** allocation onto the heap.\n**\n** Or, the heap is used for all page cache memory but the heap is\n** under memory pressure, then again it is desirable to avoid\n** allocating a new page cache entry in order to avoid stressing\n** the heap even further.\n*/\nstatic int pcache1UnderMemoryPressure(PCache1 *pCache){\n  if( pcache1.nSlot && (pCache->szPage+pCache->szExtra)<=pcache1.szSlot ){\n    return AtomicLoad(&pcache1.bUnderPressure);\n  }else{\n    return sqlite3HeapNearlyFull();\n  }\n}\n\n/******************************************************************************/\n/******** General Implementation Functions ************************************/\n\n/*\n** This function is used to resize the hash table used by the cache passed\n** as the first argument.\n**\n** The PCache mutex must be held when this function is called.\n*/\nstatic void pcache1ResizeHash(PCache1 *p){\n  PgHdr1 **apNew;\n  u64 nNew;\n  u32 i;\n\n  assert( sqlite3_mutex_held(p->pGroup->mutex) );\n\n  nNew = 2*(u64)p->nHash;\n  if( nNew<256 ){\n    nNew = 256;\n  }\n\n  pcache1LeaveMutex(p->pGroup);\n  if( p->nHash ){ sqlite3BeginBenignMalloc(); }\n  apNew = (PgHdr1 **)sqlite3MallocZero(sizeof(PgHdr1 *)*nNew);\n  if( p->nHash ){ sqlite3EndBenignMalloc(); }\n  pcache1EnterMutex(p->pGroup);\n  if( apNew ){\n    for(i=0; i<p->nHash; i++){\n      PgHdr1 *pPage;\n      PgHdr1 *pNext = p->apHash[i];\n      while( (pPage = pNext)!=0 ){\n        unsigned int h = pPage->iKey % nNew;\n        pNext = pPage->pNext;\n        pPage->pNext = apNew[h];\n        apNew[h] = pPage;\n      }\n    }\n    sqlite3_free(p->apHash);\n    p->apHash = apNew;\n    p->nHash = nNew;\n  }\n}\n\n/*\n** This function is used internally to remove the page pPage from the\n** PGroup LRU list, if is part of it. If pPage is not part of the PGroup\n** LRU list, then this function is a no-op.\n**\n** The PGroup mutex must be held when this function is called.\n*/\nstatic PgHdr1 *pcache1PinPage(PgHdr1 *pPage){\n  assert( pPage!=0 );\n  assert( PAGE_IS_UNPINNED(pPage) );\n  assert( pPage->pLruNext );\n  assert( pPage->pLruPrev );\n  assert( sqlite3_mutex_held(pPage->pCache->pGroup->mutex) );\n  pPage->pLruPrev->pLruNext = pPage->pLruNext;\n  pPage->pLruNext->pLruPrev = pPage->pLruPrev;\n  pPage->pLruNext = 0;\n  /* pPage->pLruPrev = 0;\n  ** No need to clear pLruPrev as it is never accessed if pLruNext is 0 */\n  assert( pPage->isAnchor==0 );\n  assert( pPage->pCache->pGroup->lru.isAnchor==1 );\n  pPage->pCache->nRecyclable--;\n  return pPage;\n}\n\n\n/*\n** Remove the page supplied as an argument from the hash table\n** (PCache1.apHash structure) that it is currently stored in.\n** Also free the page if freePage is true.\n**\n** The PGroup mutex must be held when this function is called.\n*/\nstatic void pcache1RemoveFromHash(PgHdr1 *pPage, int freeFlag){\n  unsigned int h;\n  PCache1 *pCache = pPage->pCache;\n  PgHdr1 **pp;\n\n  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );\n  h = pPage->iKey % pCache->nHash;\n  for(pp=&pCache->apHash[h]; (*pp)!=pPage; pp=&(*pp)->pNext);\n  *pp = (*pp)->pNext;\n\n  pCache->nPage--;\n  if( freeFlag ) pcache1FreePage(pPage);\n}\n\n/*\n** If there are currently more than nMaxPage pages allocated, try\n** to recycle pages to reduce the number allocated to nMaxPage.\n*/\nstatic void pcache1EnforceMaxPage(PCache1 *pCache){\n  PGroup *pGroup = pCache->pGroup;\n  PgHdr1 *p;\n  assert( sqlite3_mutex_held(pGroup->mutex) );\n  while( pGroup->nPurgeable>pGroup->nMaxPage\n      && (p=pGroup->lru.pLruPrev)->isAnchor==0\n  ){\n    assert( p->pCache->pGroup==pGroup );\n    assert( PAGE_IS_UNPINNED(p) );\n    pcache1PinPage(p);\n    pcache1RemoveFromHash(p, 1);\n  }\n  if( pCache->nPage==0 && pCache->pBulk ){\n    sqlite3_free(pCache->pBulk);\n    pCache->pBulk = pCache->pFree = 0;\n  }\n}\n\n/*\n** Discard all pages from cache pCache with a page number (key value)\n** greater than or equal to iLimit. Any pinned pages that meet this\n** criteria are unpinned before they are discarded.\n**\n** The PCache mutex must be held when this function is called.\n*/\nstatic void pcache1TruncateUnsafe(\n  PCache1 *pCache,             /* The cache to truncate */\n  unsigned int iLimit          /* Drop pages with this pgno or larger */\n){\n  TESTONLY( int nPage = 0; )  /* To assert pCache->nPage is correct */\n  unsigned int h, iStop;\n  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );\n  assert( pCache->iMaxKey >= iLimit );\n  assert( pCache->nHash > 0 );\n  if( pCache->iMaxKey - iLimit < pCache->nHash ){\n    /* If we are just shaving the last few pages off the end of the\n    ** cache, then there is no point in scanning the entire hash table.\n    ** Only scan those hash slots that might contain pages that need to\n    ** be removed. */\n    h = iLimit % pCache->nHash;\n    iStop = pCache->iMaxKey % pCache->nHash;\n    TESTONLY( nPage = -10; )  /* Disable the pCache->nPage validity check */\n  }else{\n    /* This is the general case where many pages are being removed.\n    ** It is necessary to scan the entire hash table */\n    h = pCache->nHash/2;\n    iStop = h - 1;\n  }\n  for(;;){\n    PgHdr1 **pp;\n    PgHdr1 *pPage;\n    assert( h<pCache->nHash );\n    pp = &pCache->apHash[h];\n    while( (pPage = *pp)!=0 ){\n      if( pPage->iKey>=iLimit ){\n        pCache->nPage--;\n        *pp = pPage->pNext;\n        if( PAGE_IS_UNPINNED(pPage) ) pcache1PinPage(pPage);\n        pcache1FreePage(pPage);\n      }else{\n        pp = &pPage->pNext;\n        TESTONLY( if( nPage>=0 ) nPage++; )\n      }\n    }\n    if( h==iStop ) break;\n    h = (h+1) % pCache->nHash;\n  }\n  assert( nPage<0 || pCache->nPage==(unsigned)nPage );\n}\n\n/******************************************************************************/\n/******** sqlite3_pcache Methods **********************************************/\n\n/*\n** Implementation of the sqlite3_pcache.xInit method.\n*/\nstatic int pcache1Init(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  assert( pcache1.isInit==0 );\n  memset(&pcache1, 0, sizeof(pcache1));\n\n\n  /*\n  ** The pcache1.separateCache variable is true if each PCache has its own\n  ** private PGroup (mode-1).  pcache1.separateCache is false if the single\n  ** PGroup in pcache1.grp is used for all page caches (mode-2).\n  **\n  **   *  Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT\n  **\n  **   *  Use a unified cache in single-threaded applications that have\n  **      configured a start-time buffer for use as page-cache memory using\n  **      sqlite3_config(SQLITE_CONFIG_PAGECACHE, pBuf, sz, N) with non-NULL\n  **      pBuf argument.\n  **\n  **   *  Otherwise use separate caches (mode-1)\n  */\n#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)\n  pcache1.separateCache = 0;\n#elif SQLITE_THREADSAFE\n  pcache1.separateCache = sqlite3GlobalConfig.pPage==0\n                          || sqlite3GlobalConfig.bCoreMutex>0;\n#else\n  pcache1.separateCache = sqlite3GlobalConfig.pPage==0;\n#endif\n\n#if SQLITE_THREADSAFE\n  if( sqlite3GlobalConfig.bCoreMutex ){\n    pcache1.grp.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_LRU);\n    pcache1.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PMEM);\n  }\n#endif\n  if( pcache1.separateCache\n   && sqlite3GlobalConfig.nPage!=0\n   && sqlite3GlobalConfig.pPage==0\n  ){\n    pcache1.nInitPage = sqlite3GlobalConfig.nPage;\n  }else{\n    pcache1.nInitPage = 0;\n  }\n  pcache1.grp.mxPinned = 10;\n  pcache1.isInit = 1;\n  return SQLITE_OK;\n}\n\n/*\n** Implementation of the sqlite3_pcache.xShutdown method.\n** Note that the static mutex allocated in xInit does\n** not need to be freed.\n*/\nstatic void pcache1Shutdown(void *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  assert( pcache1.isInit!=0 );\n  memset(&pcache1, 0, sizeof(pcache1));\n}\n\n/* forward declaration */\nstatic void pcache1Destroy(sqlite3_pcache *p);\n\n/*\n** Implementation of the sqlite3_pcache.xCreate method.\n**\n** Allocate a new cache.\n*/\nstatic sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){\n  PCache1 *pCache;      /* The newly created page cache */\n  PGroup *pGroup;       /* The group the new page cache will belong to */\n  i64 sz;               /* Bytes of memory required to allocate the new cache */\n\n  assert( (szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536 );\n  assert( szExtra < 300 );\n\n  sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;\n  pCache = (PCache1 *)sqlite3MallocZero(sz);\n  if( pCache ){\n    if( pcache1.separateCache ){\n      pGroup = (PGroup*)&pCache[1];\n      pGroup->mxPinned = 10;\n    }else{\n      pGroup = &pcache1.grp;\n    }\n    pcache1EnterMutex(pGroup);\n    if( pGroup->lru.isAnchor==0 ){\n      pGroup->lru.isAnchor = 1;\n      pGroup->lru.pLruPrev = pGroup->lru.pLruNext = &pGroup->lru;\n    }\n    pCache->pGroup = pGroup;\n    pCache->szPage = szPage;\n    pCache->szExtra = szExtra;\n    pCache->szAlloc = szPage + szExtra + ROUND8(sizeof(PgHdr1));\n    pCache->bPurgeable = (bPurgeable ? 1 : 0);\n    pcache1ResizeHash(pCache);\n    if( bPurgeable ){\n      pCache->nMin = 10;\n      pGroup->nMinPage += pCache->nMin;\n      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;\n      pCache->pnPurgeable = &pGroup->nPurgeable;\n    }else{\n      pCache->pnPurgeable = &pCache->nPurgeableDummy;\n    }\n    pcache1LeaveMutex(pGroup);\n    if( pCache->nHash==0 ){\n      pcache1Destroy((sqlite3_pcache*)pCache);\n      pCache = 0;\n    }\n  }\n  return (sqlite3_pcache *)pCache;\n}\n\n/*\n** Implementation of the sqlite3_pcache.xCachesize method.\n**\n** Configure the cache_size limit for a cache.\n*/\nstatic void pcache1Cachesize(sqlite3_pcache *p, int nMax){\n  PCache1 *pCache = (PCache1 *)p;\n  u32 n;\n  assert( nMax>=0 );\n  if( pCache->bPurgeable ){\n    PGroup *pGroup = pCache->pGroup;\n    pcache1EnterMutex(pGroup);\n    n = (u32)nMax;\n    if( n > 0x7fff0000 - pGroup->nMaxPage + pCache->nMax ){\n      n = 0x7fff0000 - pGroup->nMaxPage + pCache->nMax;\n    }\n    pGroup->nMaxPage += (n - pCache->nMax);\n    pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;\n    pCache->nMax = n;\n    pCache->n90pct = pCache->nMax*9/10;\n    pcache1EnforceMaxPage(pCache);\n    pcache1LeaveMutex(pGroup);\n  }\n}\n\n/*\n** Implementation of the sqlite3_pcache.xShrink method.\n**\n** Free up as much memory as possible.\n*/\nstatic void pcache1Shrink(sqlite3_pcache *p){\n  PCache1 *pCache = (PCache1*)p;\n  if( pCache->bPurgeable ){\n    PGroup *pGroup = pCache->pGroup;\n    unsigned int savedMaxPage;\n    pcache1EnterMutex(pGroup);\n    savedMaxPage = pGroup->nMaxPage;\n    pGroup->nMaxPage = 0;\n    pcache1EnforceMaxPage(pCache);\n    pGroup->nMaxPage = savedMaxPage;\n    pcache1LeaveMutex(pGroup);\n  }\n}\n\n/*\n** Implementation of the sqlite3_pcache.xPagecount method.\n*/\nstatic int pcache1Pagecount(sqlite3_pcache *p){\n  int n;\n  PCache1 *pCache = (PCache1*)p;\n  pcache1EnterMutex(pCache->pGroup);\n  n = pCache->nPage;\n  pcache1LeaveMutex(pCache->pGroup);\n  return n;\n}\n\n\n/*\n** Implement steps 3, 4, and 5 of the pcache1Fetch() algorithm described\n** in the header of the pcache1Fetch() procedure.\n**\n** This steps are broken out into a separate procedure because they are\n** usually not needed, and by avoiding the stack initialization required\n** for these steps, the main pcache1Fetch() procedure can run faster.\n*/\nstatic SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(\n  PCache1 *pCache,\n  unsigned int iKey,\n  int createFlag\n){\n  unsigned int nPinned;\n  PGroup *pGroup = pCache->pGroup;\n  PgHdr1 *pPage = 0;\n\n  /* Step 3: Abort if createFlag is 1 but the cache is nearly full */\n  assert( pCache->nPage >= pCache->nRecyclable );\n  nPinned = pCache->nPage - pCache->nRecyclable;\n  assert( pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage );\n  assert( pCache->n90pct == pCache->nMax*9/10 );\n  if( createFlag==1 && (\n        nPinned>=pGroup->mxPinned\n     || nPinned>=pCache->n90pct\n     || (pcache1UnderMemoryPressure(pCache) && pCache->nRecyclable<nPinned)\n  )){\n    return 0;\n  }\n\n  if( pCache->nPage>=pCache->nHash ) pcache1ResizeHash(pCache);\n  assert( pCache->nHash>0 && pCache->apHash );\n\n  /* Step 4. Try to recycle a page. */\n  if( pCache->bPurgeable\n   && !pGroup->lru.pLruPrev->isAnchor\n   && ((pCache->nPage+1>=pCache->nMax) || pcache1UnderMemoryPressure(pCache))\n  ){\n    PCache1 *pOther;\n    pPage = pGroup->lru.pLruPrev;\n    assert( PAGE_IS_UNPINNED(pPage) );\n    pcache1RemoveFromHash(pPage, 0);\n    pcache1PinPage(pPage);\n    pOther = pPage->pCache;\n    if( pOther->szAlloc != pCache->szAlloc ){\n      pcache1FreePage(pPage);\n      pPage = 0;\n    }else{\n      pGroup->nPurgeable -= (pOther->bPurgeable - pCache->bPurgeable);\n    }\n  }\n\n  /* Step 5. If a usable page buffer has still not been found,\n  ** attempt to allocate a new one.\n  */\n  if( !pPage ){\n    pPage = pcache1AllocPage(pCache, createFlag==1);\n  }\n\n  if( pPage ){\n    unsigned int h = iKey % pCache->nHash;\n    pCache->nPage++;\n    pPage->iKey = iKey;\n    pPage->pNext = pCache->apHash[h];\n    pPage->pCache = pCache;\n    pPage->pLruNext = 0;\n    /* pPage->pLruPrev = 0;\n    ** No need to clear pLruPrev since it is not accessed when pLruNext==0 */\n    *(void **)pPage->page.pExtra = 0;\n    pCache->apHash[h] = pPage;\n    if( iKey>pCache->iMaxKey ){\n      pCache->iMaxKey = iKey;\n    }\n  }\n  return pPage;\n}\n\n/*\n** Implementation of the sqlite3_pcache.xFetch method.\n**\n** Fetch a page by key value.\n**\n** Whether or not a new page may be allocated by this function depends on\n** the value of the createFlag argument.  0 means do not allocate a new\n** page.  1 means allocate a new page if space is easily available.  2\n** means to try really hard to allocate a new page.\n**\n** For a non-purgeable cache (a cache used as the storage for an in-memory\n** database) there is really no difference between createFlag 1 and 2.  So\n** the calling function (pcache.c) will never have a createFlag of 1 on\n** a non-purgeable cache.\n**\n** There are three different approaches to obtaining space for a page,\n** depending on the value of parameter createFlag (which may be 0, 1 or 2).\n**\n**   1. Regardless of the value of createFlag, the cache is searched for a\n**      copy of the requested page. If one is found, it is returned.\n**\n**   2. If createFlag==0 and the page is not already in the cache, NULL is\n**      returned.\n**\n**   3. If createFlag is 1, and the page is not already in the cache, then\n**      return NULL (do not allocate a new page) if any of the following\n**      conditions are true:\n**\n**       (a) the number of pages pinned by the cache is greater than\n**           PCache1.nMax, or\n**\n**       (b) the number of pages pinned by the cache is greater than\n**           the sum of nMax for all purgeable caches, less the sum of\n**           nMin for all other purgeable caches, or\n**\n**   4. If none of the first three conditions apply and the cache is marked\n**      as purgeable, and if one of the following is true:\n**\n**       (a) The number of pages allocated for the cache is already\n**           PCache1.nMax, or\n**\n**       (b) The number of pages allocated for all purgeable caches is\n**           already equal to or greater than the sum of nMax for all\n**           purgeable caches,\n**\n**       (c) The system is under memory pressure and wants to avoid\n**           unnecessary pages cache entry allocations\n**\n**      then attempt to recycle a page from the LRU list. If it is the right\n**      size, return the recycled buffer. Otherwise, free the buffer and\n**      proceed to step 5.\n**\n**   5. Otherwise, allocate and return a new page buffer.\n**\n** There are two versions of this routine.  pcache1FetchWithMutex() is\n** the general case.  pcache1FetchNoMutex() is a faster implementation for\n** the common case where pGroup->mutex is NULL.  The pcache1Fetch() wrapper\n** invokes the appropriate routine.\n*/\nstatic PgHdr1 *pcache1FetchNoMutex(\n  sqlite3_pcache *p,\n  unsigned int iKey,\n  int createFlag\n){\n  PCache1 *pCache = (PCache1 *)p;\n  PgHdr1 *pPage = 0;\n\n  /* Step 1: Search the hash table for an existing entry. */\n  pPage = pCache->apHash[iKey % pCache->nHash];\n  while( pPage && pPage->iKey!=iKey ){ pPage = pPage->pNext; }\n\n  /* Step 2: If the page was found in the hash table, then return it.\n  ** If the page was not in the hash table and createFlag is 0, abort.\n  ** Otherwise (page not in hash and createFlag!=0) continue with\n  ** subsequent steps to try to create the page. */\n  if( pPage ){\n    if( PAGE_IS_UNPINNED(pPage) ){\n      return pcache1PinPage(pPage);\n    }else{\n      return pPage;\n    }\n  }else if( createFlag ){\n    /* Steps 3, 4, and 5 implemented by this subroutine */\n    return pcache1FetchStage2(pCache, iKey, createFlag);\n  }else{\n    return 0;\n  }\n}\n#if PCACHE1_MIGHT_USE_GROUP_MUTEX\nstatic PgHdr1 *pcache1FetchWithMutex(\n  sqlite3_pcache *p,\n  unsigned int iKey,\n  int createFlag\n){\n  PCache1 *pCache = (PCache1 *)p;\n  PgHdr1 *pPage;\n\n  pcache1EnterMutex(pCache->pGroup);\n  pPage = pcache1FetchNoMutex(p, iKey, createFlag);\n  assert( pPage==0 || pCache->iMaxKey>=iKey );\n  pcache1LeaveMutex(pCache->pGroup);\n  return pPage;\n}\n#endif\nstatic sqlite3_pcache_page *pcache1Fetch(\n  sqlite3_pcache *p,\n  unsigned int iKey,\n  int createFlag\n){\n#if PCACHE1_MIGHT_USE_GROUP_MUTEX || defined(SQLITE_DEBUG)\n  PCache1 *pCache = (PCache1 *)p;\n#endif\n\n  assert( offsetof(PgHdr1,page)==0 );\n  assert( pCache->bPurgeable || createFlag!=1 );\n  assert( pCache->bPurgeable || pCache->nMin==0 );\n  assert( pCache->bPurgeable==0 || pCache->nMin==10 );\n  assert( pCache->nMin==0 || pCache->bPurgeable );\n  assert( pCache->nHash>0 );\n#if PCACHE1_MIGHT_USE_GROUP_MUTEX\n  if( pCache->pGroup->mutex ){\n    return (sqlite3_pcache_page*)pcache1FetchWithMutex(p, iKey, createFlag);\n  }else\n#endif\n  {\n    return (sqlite3_pcache_page*)pcache1FetchNoMutex(p, iKey, createFlag);\n  }\n}\n\n\n/*\n** Implementation of the sqlite3_pcache.xUnpin method.\n**\n** Mark a page as unpinned (eligible for asynchronous recycling).\n*/\nstatic void pcache1Unpin(\n  sqlite3_pcache *p,\n  sqlite3_pcache_page *pPg,\n  int reuseUnlikely\n){\n  PCache1 *pCache = (PCache1 *)p;\n  PgHdr1 *pPage = (PgHdr1 *)pPg;\n  PGroup *pGroup = pCache->pGroup;\n\n  assert( pPage->pCache==pCache );\n  pcache1EnterMutex(pGroup);\n\n  /* It is an error to call this function if the page is already\n  ** part of the PGroup LRU list.\n  */\n  assert( pPage->pLruNext==0 );\n  assert( PAGE_IS_PINNED(pPage) );\n\n  if( reuseUnlikely || pGroup->nPurgeable>pGroup->nMaxPage ){\n    pcache1RemoveFromHash(pPage, 1);\n  }else{\n    /* Add the page to the PGroup LRU list. */\n    PgHdr1 **ppFirst = &pGroup->lru.pLruNext;\n    pPage->pLruPrev = &pGroup->lru;\n    (pPage->pLruNext = *ppFirst)->pLruPrev = pPage;\n    *ppFirst = pPage;\n    pCache->nRecyclable++;\n  }\n\n  pcache1LeaveMutex(pCache->pGroup);\n}\n\n/*\n** Implementation of the sqlite3_pcache.xRekey method.\n*/\nstatic void pcache1Rekey(\n  sqlite3_pcache *p,\n  sqlite3_pcache_page *pPg,\n  unsigned int iOld,\n  unsigned int iNew\n){\n  PCache1 *pCache = (PCache1 *)p;\n  PgHdr1 *pPage = (PgHdr1 *)pPg;\n  PgHdr1 **pp;\n  unsigned int hOld, hNew;\n  assert( pPage->iKey==iOld );\n  assert( pPage->pCache==pCache );\n  assert( iOld!=iNew );               /* The page number really is changing */\n\n  pcache1EnterMutex(pCache->pGroup);\n\n  assert( pcache1FetchNoMutex(p, iOld, 0)==pPage ); /* pPg really is iOld */\n  hOld = iOld%pCache->nHash;\n  pp = &pCache->apHash[hOld];\n  while( (*pp)!=pPage ){\n    pp = &(*pp)->pNext;\n  }\n  *pp = pPage->pNext;\n\n  assert( pcache1FetchNoMutex(p, iNew, 0)==0 ); /* iNew not in cache */\n  hNew = iNew%pCache->nHash;\n  pPage->iKey = iNew;\n  pPage->pNext = pCache->apHash[hNew];\n  pCache->apHash[hNew] = pPage;\n  if( iNew>pCache->iMaxKey ){\n    pCache->iMaxKey = iNew;\n  }\n\n  pcache1LeaveMutex(pCache->pGroup);\n}\n\n/*\n** Implementation of the sqlite3_pcache.xTruncate method.\n**\n** Discard all unpinned pages in the cache with a page number equal to\n** or greater than parameter iLimit. Any pinned pages with a page number\n** equal to or greater than iLimit are implicitly unpinned.\n*/\nstatic void pcache1Truncate(sqlite3_pcache *p, unsigned int iLimit){\n  PCache1 *pCache = (PCache1 *)p;\n  pcache1EnterMutex(pCache->pGroup);\n  if( iLimit<=pCache->iMaxKey ){\n    pcache1TruncateUnsafe(pCache, iLimit);\n    pCache->iMaxKey = iLimit-1;\n  }\n  pcache1LeaveMutex(pCache->pGroup);\n}\n\n/*\n** Implementation of the sqlite3_pcache.xDestroy method.\n**\n** Destroy a cache allocated using pcache1Create().\n*/\nstatic void pcache1Destroy(sqlite3_pcache *p){\n  PCache1 *pCache = (PCache1 *)p;\n  PGroup *pGroup = pCache->pGroup;\n  assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );\n  pcache1EnterMutex(pGroup);\n  if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0);\n  assert( pGroup->nMaxPage >= pCache->nMax );\n  pGroup->nMaxPage -= pCache->nMax;\n  assert( pGroup->nMinPage >= pCache->nMin );\n  pGroup->nMinPage -= pCache->nMin;\n  pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;\n  pcache1EnforceMaxPage(pCache);\n  pcache1LeaveMutex(pGroup);\n  sqlite3_free(pCache->pBulk);\n  sqlite3_free(pCache->apHash);\n  sqlite3_free(pCache);\n}\n\n/*\n** This function is called during initialization (sqlite3_initialize()) to\n** install the default pluggable cache module, assuming the user has not\n** already provided an alternative.\n*/\nSQLITE_PRIVATE void sqlite3PCacheSetDefault(void){\n  static const sqlite3_pcache_methods2 defaultMethods = {\n    1,                       /* iVersion */\n    0,                       /* pArg */\n    pcache1Init,             /* xInit */\n    pcache1Shutdown,         /* xShutdown */\n    pcache1Create,           /* xCreate */\n    pcache1Cachesize,        /* xCachesize */\n    pcache1Pagecount,        /* xPagecount */\n    pcache1Fetch,            /* xFetch */\n    pcache1Unpin,            /* xUnpin */\n    pcache1Rekey,            /* xRekey */\n    pcache1Truncate,         /* xTruncate */\n    pcache1Destroy,          /* xDestroy */\n    pcache1Shrink            /* xShrink */\n  };\n  sqlite3_config(SQLITE_CONFIG_PCACHE2, &defaultMethods);\n}\n\n/*\n** Return the size of the header on each page of this PCACHE implementation.\n*/\nSQLITE_PRIVATE int sqlite3HeaderSizePcache1(void){ return ROUND8(sizeof(PgHdr1)); }\n\n/*\n** Return the global mutex used by this PCACHE implementation.  The\n** sqlite3_status() routine needs access to this mutex.\n*/\nSQLITE_PRIVATE sqlite3_mutex *sqlite3Pcache1Mutex(void){\n  return pcache1.mutex;\n}\n\n#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT\n/*\n** This function is called to free superfluous dynamically allocated memory\n** held by the pager system. Memory in use by any SQLite pager allocated\n** by the current thread may be sqlite3_free()ed.\n**\n** nReq is the number of bytes of memory required. Once this much has\n** been released, the function returns. The return value is the total number\n** of bytes of memory released.\n*/\nSQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){\n  int nFree = 0;\n  assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );\n  assert( sqlite3_mutex_notheld(pcache1.mutex) );\n  if( sqlite3GlobalConfig.pPage==0 ){\n    PgHdr1 *p;\n    pcache1EnterMutex(&pcache1.grp);\n    while( (nReq<0 || nFree<nReq)\n       &&  (p=pcache1.grp.lru.pLruPrev)!=0\n       &&  p->isAnchor==0\n    ){\n      nFree += pcache1MemSize(p->page.pBuf);\n      assert( PAGE_IS_UNPINNED(p) );\n      pcache1PinPage(p);\n      pcache1RemoveFromHash(p, 1);\n    }\n    pcache1LeaveMutex(&pcache1.grp);\n  }\n  return nFree;\n}\n#endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */\n\n#ifdef SQLITE_TEST\n/*\n** This function is used by test procedures to inspect the internal state\n** of the global cache.\n*/\nSQLITE_PRIVATE void sqlite3PcacheStats(\n  int *pnCurrent,      /* OUT: Total number of pages cached */\n  int *pnMax,          /* OUT: Global maximum cache size */\n  int *pnMin,          /* OUT: Sum of PCache1.nMin for purgeable caches */\n  int *pnRecyclable    /* OUT: Total number of pages available for recycling */\n){\n  PgHdr1 *p;\n  int nRecyclable = 0;\n  for(p=pcache1.grp.lru.pLruNext; p && !p->isAnchor; p=p->pLruNext){\n    assert( PAGE_IS_UNPINNED(p) );\n    nRecyclable++;\n  }\n  *pnCurrent = pcache1.grp.nPurgeable;\n  *pnMax = (int)pcache1.grp.nMaxPage;\n  *pnMin = (int)pcache1.grp.nMinPage;\n  *pnRecyclable = nRecyclable;\n}\n#endif\n\n/************** End of pcache1.c *********************************************/\n/************** Begin file rowset.c ******************************************/\n/*\n** 2008 December 3\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This module implements an object we call a \"RowSet\".\n**\n** The RowSet object is a collection of rowids.  Rowids\n** are inserted into the RowSet in an arbitrary order.  Inserts\n** can be intermixed with tests to see if a given rowid has been\n** previously inserted into the RowSet.\n**\n** After all inserts are finished, it is possible to extract the\n** elements of the RowSet in sorted order.  Once this extraction\n** process has started, no new elements may be inserted.\n**\n** Hence, the primitive operations for a RowSet are:\n**\n**    CREATE\n**    INSERT\n**    TEST\n**    SMALLEST\n**    DESTROY\n**\n** The CREATE and DESTROY primitives are the constructor and destructor,\n** obviously.  The INSERT primitive adds a new element to the RowSet.\n** TEST checks to see if an element is already in the RowSet.  SMALLEST\n** extracts the least value from the RowSet.\n**\n** The INSERT primitive might allocate additional memory.  Memory is\n** allocated in chunks so most INSERTs do no allocation.  There is an\n** upper bound on the size of allocated memory.  No memory is freed\n** until DESTROY.\n**\n** The TEST primitive includes a \"batch\" number.  The TEST primitive\n** will only see elements that were inserted before the last change\n** in the batch number.  In other words, if an INSERT occurs between\n** two TESTs where the TESTs have the same batch number, then the\n** value added by the INSERT will not be visible to the second TEST.\n** The initial batch number is zero, so if the very first TEST contains\n** a non-zero batch number, it will see all prior INSERTs.\n**\n** No INSERTs may occurs after a SMALLEST.  An assertion will fail if\n** that is attempted.\n**\n** The cost of an INSERT is roughly constant.  (Sometimes new memory\n** has to be allocated on an INSERT.)  The cost of a TEST with a new\n** batch number is O(NlogN) where N is the number of elements in the RowSet.\n** The cost of a TEST using the same batch number is O(logN).  The cost\n** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST\n** primitives are constant time.  The cost of DESTROY is O(N).\n**\n** TEST and SMALLEST may not be used by the same RowSet.  This used to\n** be possible, but the feature was not used, so it was removed in order\n** to simplify the code.\n*/\n/* #include \"sqliteInt.h\" */\n\n\n/*\n** Target size for allocation chunks.\n*/\n#define ROWSET_ALLOCATION_SIZE 1024\n\n/*\n** The number of rowset entries per allocation chunk.\n*/\n#define ROWSET_ENTRY_PER_CHUNK  \\\n                       ((ROWSET_ALLOCATION_SIZE-8)/sizeof(struct RowSetEntry))\n\n/*\n** Each entry in a RowSet is an instance of the following object.\n**\n** This same object is reused to store a linked list of trees of RowSetEntry\n** objects.  In that alternative use, pRight points to the next entry\n** in the list, pLeft points to the tree, and v is unused.  The\n** RowSet.pForest value points to the head of this forest list.\n*/\nstruct RowSetEntry {\n  i64 v;                        /* ROWID value for this entry */\n  struct RowSetEntry *pRight;   /* Right subtree (larger entries) or list */\n  struct RowSetEntry *pLeft;    /* Left subtree (smaller entries) */\n};\n\n/*\n** RowSetEntry objects are allocated in large chunks (instances of the\n** following structure) to reduce memory allocation overhead.  The\n** chunks are kept on a linked list so that they can be deallocated\n** when the RowSet is destroyed.\n*/\nstruct RowSetChunk {\n  struct RowSetChunk *pNextChunk;        /* Next chunk on list of them all */\n  struct RowSetEntry aEntry[ROWSET_ENTRY_PER_CHUNK]; /* Allocated entries */\n};\n\n/*\n** A RowSet in an instance of the following structure.\n**\n** A typedef of this structure if found in sqliteInt.h.\n*/\nstruct RowSet {\n  struct RowSetChunk *pChunk;    /* List of all chunk allocations */\n  sqlite3 *db;                   /* The database connection */\n  struct RowSetEntry *pEntry;    /* List of entries using pRight */\n  struct RowSetEntry *pLast;     /* Last entry on the pEntry list */\n  struct RowSetEntry *pFresh;    /* Source of new entry objects */\n  struct RowSetEntry *pForest;   /* List of binary trees of entries */\n  u16 nFresh;                    /* Number of objects on pFresh */\n  u16 rsFlags;                   /* Various flags */\n  int iBatch;                    /* Current insert batch */\n};\n\n/*\n** Allowed values for RowSet.rsFlags\n*/\n#define ROWSET_SORTED  0x01   /* True if RowSet.pEntry is sorted */\n#define ROWSET_NEXT    0x02   /* True if sqlite3RowSetNext() has been called */\n\n/*\n** Allocate a RowSet object.  Return NULL if a memory allocation\n** error occurs.\n*/\nSQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db){\n  RowSet *p = sqlite3DbMallocRawNN(db, sizeof(*p));\n  if( p ){\n    int N = sqlite3DbMallocSize(db, p);\n    p->pChunk = 0;\n    p->db = db;\n    p->pEntry = 0;\n    p->pLast = 0;\n    p->pForest = 0;\n    p->pFresh = (struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);\n    p->nFresh = (u16)((N - ROUND8(sizeof(*p)))/sizeof(struct RowSetEntry));\n    p->rsFlags = ROWSET_SORTED;\n    p->iBatch = 0;\n  }\n  return p;\n}\n\n/*\n** Deallocate all chunks from a RowSet.  This frees all memory that\n** the RowSet has allocated over its lifetime.  This routine is\n** the destructor for the RowSet.\n*/\nSQLITE_PRIVATE void sqlite3RowSetClear(void *pArg){\n  RowSet *p = (RowSet*)pArg;\n  struct RowSetChunk *pChunk, *pNextChunk;\n  for(pChunk=p->pChunk; pChunk; pChunk = pNextChunk){\n    pNextChunk = pChunk->pNextChunk;\n    sqlite3DbFree(p->db, pChunk);\n  }\n  p->pChunk = 0;\n  p->nFresh = 0;\n  p->pEntry = 0;\n  p->pLast = 0;\n  p->pForest = 0;\n  p->rsFlags = ROWSET_SORTED;\n}\n\n/*\n** Deallocate all chunks from a RowSet.  This frees all memory that\n** the RowSet has allocated over its lifetime.  This routine is\n** the destructor for the RowSet.\n*/\nSQLITE_PRIVATE void sqlite3RowSetDelete(void *pArg){\n  sqlite3RowSetClear(pArg);\n  sqlite3DbFree(((RowSet*)pArg)->db, pArg);\n}\n\n/*\n** Allocate a new RowSetEntry object that is associated with the\n** given RowSet.  Return a pointer to the new and completely uninitialized\n** object.\n**\n** In an OOM situation, the RowSet.db->mallocFailed flag is set and this\n** routine returns NULL.\n*/\nstatic struct RowSetEntry *rowSetEntryAlloc(RowSet *p){\n  assert( p!=0 );\n  if( p->nFresh==0 ){  /*OPTIMIZATION-IF-FALSE*/\n    /* We could allocate a fresh RowSetEntry each time one is needed, but it\n    ** is more efficient to pull a preallocated entry from the pool */\n    struct RowSetChunk *pNew;\n    pNew = sqlite3DbMallocRawNN(p->db, sizeof(*pNew));\n    if( pNew==0 ){\n      return 0;\n    }\n    pNew->pNextChunk = p->pChunk;\n    p->pChunk = pNew;\n    p->pFresh = pNew->aEntry;\n    p->nFresh = ROWSET_ENTRY_PER_CHUNK;\n  }\n  p->nFresh--;\n  return p->pFresh++;\n}\n\n/*\n** Insert a new value into a RowSet.\n**\n** The mallocFailed flag of the database connection is set if a\n** memory allocation fails.\n*/\nSQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){\n  struct RowSetEntry *pEntry;  /* The new entry */\n  struct RowSetEntry *pLast;   /* The last prior entry */\n\n  /* This routine is never called after sqlite3RowSetNext() */\n  assert( p!=0 && (p->rsFlags & ROWSET_NEXT)==0 );\n\n  pEntry = rowSetEntryAlloc(p);\n  if( pEntry==0 ) return;\n  pEntry->v = rowid;\n  pEntry->pRight = 0;\n  pLast = p->pLast;\n  if( pLast ){\n    if( rowid<=pLast->v ){  /*OPTIMIZATION-IF-FALSE*/\n      /* Avoid unnecessary sorts by preserving the ROWSET_SORTED flags\n      ** where possible */\n      p->rsFlags &= ~ROWSET_SORTED;\n    }\n    pLast->pRight = pEntry;\n  }else{\n    p->pEntry = pEntry;\n  }\n  p->pLast = pEntry;\n}\n\n/*\n** Merge two lists of RowSetEntry objects.  Remove duplicates.\n**\n** The input lists are connected via pRight pointers and are\n** assumed to each already be in sorted order.\n*/\nstatic struct RowSetEntry *rowSetEntryMerge(\n  struct RowSetEntry *pA,    /* First sorted list to be merged */\n  struct RowSetEntry *pB     /* Second sorted list to be merged */\n){\n  struct RowSetEntry head;\n  struct RowSetEntry *pTail;\n\n  pTail = &head;\n  assert( pA!=0 && pB!=0 );\n  for(;;){\n    assert( pA->pRight==0 || pA->v<=pA->pRight->v );\n    assert( pB->pRight==0 || pB->v<=pB->pRight->v );\n    if( pA->v<=pB->v ){\n      if( pA->v<pB->v ) pTail = pTail->pRight = pA;\n      pA = pA->pRight;\n      if( pA==0 ){\n        pTail->pRight = pB;\n        break;\n      }\n    }else{\n      pTail = pTail->pRight = pB;\n      pB = pB->pRight;\n      if( pB==0 ){\n        pTail->pRight = pA;\n        break;\n      }\n    }\n  }\n  return head.pRight;\n}\n\n/*\n** Sort all elements on the list of RowSetEntry objects into order of\n** increasing v.\n*/\nstatic struct RowSetEntry *rowSetEntrySort(struct RowSetEntry *pIn){\n  unsigned int i;\n  struct RowSetEntry *pNext, *aBucket[40];\n\n  memset(aBucket, 0, sizeof(aBucket));\n  while( pIn ){\n    pNext = pIn->pRight;\n    pIn->pRight = 0;\n    for(i=0; aBucket[i]; i++){\n      pIn = rowSetEntryMerge(aBucket[i], pIn);\n      aBucket[i] = 0;\n    }\n    aBucket[i] = pIn;\n    pIn = pNext;\n  }\n  pIn = aBucket[0];\n  for(i=1; i<sizeof(aBucket)/sizeof(aBucket[0]); i++){\n    if( aBucket[i]==0 ) continue;\n    pIn = pIn ? rowSetEntryMerge(pIn, aBucket[i]) : aBucket[i];\n  }\n  return pIn;\n}\n\n\n/*\n** The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.\n** Convert this tree into a linked list connected by the pRight pointers\n** and return pointers to the first and last elements of the new list.\n*/\nstatic void rowSetTreeToList(\n  struct RowSetEntry *pIn,         /* Root of the input tree */\n  struct RowSetEntry **ppFirst,    /* Write head of the output list here */\n  struct RowSetEntry **ppLast      /* Write tail of the output list here */\n){\n  assert( pIn!=0 );\n  if( pIn->pLeft ){\n    struct RowSetEntry *p;\n    rowSetTreeToList(pIn->pLeft, ppFirst, &p);\n    p->pRight = pIn;\n  }else{\n    *ppFirst = pIn;\n  }\n  if( pIn->pRight ){\n    rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);\n  }else{\n    *ppLast = pIn;\n  }\n  assert( (*ppLast)->pRight==0 );\n}\n\n\n/*\n** Convert a sorted list of elements (connected by pRight) into a binary\n** tree with depth of iDepth.  A depth of 1 means the tree contains a single\n** node taken from the head of *ppList.  A depth of 2 means a tree with\n** three nodes.  And so forth.\n**\n** Use as many entries from the input list as required and update the\n** *ppList to point to the unused elements of the list.  If the input\n** list contains too few elements, then construct an incomplete tree\n** and leave *ppList set to NULL.\n**\n** Return a pointer to the root of the constructed binary tree.\n*/\nstatic struct RowSetEntry *rowSetNDeepTree(\n  struct RowSetEntry **ppList,\n  int iDepth\n){\n  struct RowSetEntry *p;         /* Root of the new tree */\n  struct RowSetEntry *pLeft;     /* Left subtree */\n  if( *ppList==0 ){ /*OPTIMIZATION-IF-TRUE*/\n    /* Prevent unnecessary deep recursion when we run out of entries */\n    return 0;\n  }\n  if( iDepth>1 ){   /*OPTIMIZATION-IF-TRUE*/\n    /* This branch causes a *balanced* tree to be generated.  A valid tree\n    ** is still generated without this branch, but the tree is wildly\n    ** unbalanced and inefficient. */\n    pLeft = rowSetNDeepTree(ppList, iDepth-1);\n    p = *ppList;\n    if( p==0 ){     /*OPTIMIZATION-IF-FALSE*/\n      /* It is safe to always return here, but the resulting tree\n      ** would be unbalanced */\n      return pLeft;\n    }\n    p->pLeft = pLeft;\n    *ppList = p->pRight;\n    p->pRight = rowSetNDeepTree(ppList, iDepth-1);\n  }else{\n    p = *ppList;\n    *ppList = p->pRight;\n    p->pLeft = p->pRight = 0;\n  }\n  return p;\n}\n\n/*\n** Convert a sorted list of elements into a binary tree. Make the tree\n** as deep as it needs to be in order to contain the entire list.\n*/\nstatic struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){\n  int iDepth;           /* Depth of the tree so far */\n  struct RowSetEntry *p;       /* Current tree root */\n  struct RowSetEntry *pLeft;   /* Left subtree */\n\n  assert( pList!=0 );\n  p = pList;\n  pList = p->pRight;\n  p->pLeft = p->pRight = 0;\n  for(iDepth=1; pList; iDepth++){\n    pLeft = p;\n    p = pList;\n    pList = p->pRight;\n    p->pLeft = pLeft;\n    p->pRight = rowSetNDeepTree(&pList, iDepth);\n  }\n  return p;\n}\n\n/*\n** Extract the smallest element from the RowSet.\n** Write the element into *pRowid.  Return 1 on success.  Return\n** 0 if the RowSet is already empty.\n**\n** After this routine has been called, the sqlite3RowSetInsert()\n** routine may not be called again.\n**\n** This routine may not be called after sqlite3RowSetTest() has\n** been used.  Older versions of RowSet allowed that, but as the\n** capability was not used by the code generator, it was removed\n** for code economy.\n*/\nSQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){\n  assert( p!=0 );\n  assert( p->pForest==0 );  /* Cannot be used with sqlite3RowSetText() */\n\n  /* Merge the forest into a single sorted list on first call */\n  if( (p->rsFlags & ROWSET_NEXT)==0 ){  /*OPTIMIZATION-IF-FALSE*/\n    if( (p->rsFlags & ROWSET_SORTED)==0 ){  /*OPTIMIZATION-IF-FALSE*/\n      p->pEntry = rowSetEntrySort(p->pEntry);\n    }\n    p->rsFlags |= ROWSET_SORTED|ROWSET_NEXT;\n  }\n\n  /* Return the next entry on the list */\n  if( p->pEntry ){\n    *pRowid = p->pEntry->v;\n    p->pEntry = p->pEntry->pRight;\n    if( p->pEntry==0 ){ /*OPTIMIZATION-IF-TRUE*/\n      /* Free memory immediately, rather than waiting on sqlite3_finalize() */\n      sqlite3RowSetClear(p);\n    }\n    return 1;\n  }else{\n    return 0;\n  }\n}\n\n/*\n** Check to see if element iRowid was inserted into the rowset as\n** part of any insert batch prior to iBatch.  Return 1 or 0.\n**\n** If this is the first test of a new batch and if there exist entries\n** on pRowSet->pEntry, then sort those entries into the forest at\n** pRowSet->pForest so that they can be tested.\n*/\nSQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64 iRowid){\n  struct RowSetEntry *p, *pTree;\n\n  /* This routine is never called after sqlite3RowSetNext() */\n  assert( pRowSet!=0 && (pRowSet->rsFlags & ROWSET_NEXT)==0 );\n\n  /* Sort entries into the forest on the first test of a new batch.\n  ** To save unnecessary work, only do this when the batch number changes.\n  */\n  if( iBatch!=pRowSet->iBatch ){  /*OPTIMIZATION-IF-FALSE*/\n    p = pRowSet->pEntry;\n    if( p ){\n      struct RowSetEntry **ppPrevTree = &pRowSet->pForest;\n      if( (pRowSet->rsFlags & ROWSET_SORTED)==0 ){ /*OPTIMIZATION-IF-FALSE*/\n        /* Only sort the current set of entries if they need it */\n        p = rowSetEntrySort(p);\n      }\n      for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){\n        ppPrevTree = &pTree->pRight;\n        if( pTree->pLeft==0 ){\n          pTree->pLeft = rowSetListToTree(p);\n          break;\n        }else{\n          struct RowSetEntry *pAux, *pTail;\n          rowSetTreeToList(pTree->pLeft, &pAux, &pTail);\n          pTree->pLeft = 0;\n          p = rowSetEntryMerge(pAux, p);\n        }\n      }\n      if( pTree==0 ){\n        *ppPrevTree = pTree = rowSetEntryAlloc(pRowSet);\n        if( pTree ){\n          pTree->v = 0;\n          pTree->pRight = 0;\n          pTree->pLeft = rowSetListToTree(p);\n        }\n      }\n      pRowSet->pEntry = 0;\n      pRowSet->pLast = 0;\n      pRowSet->rsFlags |= ROWSET_SORTED;\n    }\n    pRowSet->iBatch = iBatch;\n  }\n\n  /* Test to see if the iRowid value appears anywhere in the forest.\n  ** Return 1 if it does and 0 if not.\n  */\n  for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){\n    p = pTree->pLeft;\n    while( p ){\n      if( p->v<iRowid ){\n        p = p->pRight;\n      }else if( p->v>iRowid ){\n        p = p->pLeft;\n      }else{\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n/************** End of rowset.c **********************************************/\n/************** Begin file pager.c *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the implementation of the page cache subsystem or \"pager\".\n**\n** The pager is used to access a database disk file.  It implements\n** atomic commit and rollback through the use of a journal file that\n** is separate from the database file.  The pager also implements file\n** locking to prevent two processes from writing the same database\n** file simultaneously, or one process from reading the database while\n** another is writing.\n*/\n#ifndef SQLITE_OMIT_DISKIO\n/* #include \"sqliteInt.h\" */\n/************** Include wal.h in the middle of pager.c ***********************/\n/************** Begin file wal.h *********************************************/\n/*\n** 2010 February 1\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface to the write-ahead logging\n** system. Refer to the comments below and the header comment attached to\n** the implementation of each function in log.c for further details.\n*/\n\n#ifndef SQLITE_WAL_H\n#define SQLITE_WAL_H\n\n/* #include \"sqliteInt.h\" */\n\n/* Macros for extracting appropriate sync flags for either transaction\n** commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)):\n*/\n#define WAL_SYNC_FLAGS(X)   ((X)&0x03)\n#define CKPT_SYNC_FLAGS(X)  (((X)>>2)&0x03)\n\n#ifdef SQLITE_OMIT_WAL\n# define sqlite3WalOpen(x,y,z)                   0\n# define sqlite3WalLimit(x,y)\n# define sqlite3WalClose(v,w,x,y,z)              0\n# define sqlite3WalBeginReadTransaction(y,z)     0\n# define sqlite3WalEndReadTransaction(z)\n# define sqlite3WalDbsize(y)                     0\n# define sqlite3WalBeginWriteTransaction(y)      0\n# define sqlite3WalEndWriteTransaction(x)        0\n# define sqlite3WalUndo(x,y,z)                   0\n# define sqlite3WalSavepoint(y,z)\n# define sqlite3WalSavepointUndo(y,z)            0\n# define sqlite3WalFrames(u,v,w,x,y,z)           0\n# define sqlite3WalCheckpoint(q,r,s,t,u,v,w,x,y,z) 0\n# define sqlite3WalCallback(z)                   0\n# define sqlite3WalExclusiveMode(y,z)            0\n# define sqlite3WalHeapMemory(z)                 0\n# define sqlite3WalFramesize(z)                  0\n# define sqlite3WalFindFrame(x,y,z)              0\n# define sqlite3WalFile(x)                       0\n# undef SQLITE_USE_SEH\n#else\n\n#define WAL_SAVEPOINT_NDATA 4\n\n/* Connection to a write-ahead log (WAL) file.\n** There is one object of this type for each pager.\n*/\ntypedef struct Wal Wal;\n\n/* Open and close a connection to a write-ahead log. */\nSQLITE_PRIVATE int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**);\nSQLITE_PRIVATE int sqlite3WalClose(Wal *pWal, sqlite3*, int sync_flags, int, u8 *);\n\n/* Set the limiting size of a WAL file. */\nSQLITE_PRIVATE void sqlite3WalLimit(Wal*, i64);\n\n/* Used by readers to open (lock) and close (unlock) a snapshot.  A\n** snapshot is like a read-transaction.  It is the state of the database\n** at an instant in time.  sqlite3WalOpenSnapshot gets a read lock and\n** preserves the current state even if the other threads or processes\n** write to or checkpoint the WAL.  sqlite3WalCloseSnapshot() closes the\n** transaction and releases the lock.\n*/\nSQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *);\nSQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal);\n\n/* Read a page from the write-ahead log, if it is present. */\nSQLITE_PRIVATE int sqlite3WalFindFrame(Wal *, Pgno, u32 *);\nSQLITE_PRIVATE int sqlite3WalReadFrame(Wal *, u32, int, u8 *);\n\n/* If the WAL is not empty, return the size of the database. */\nSQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal);\n\n/* Obtain or release the WRITER lock. */\nSQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal);\nSQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal);\n\n/* Undo any frames written (but not committed) to the log */\nSQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx);\n\n/* Return an integer that records the current (uncommitted) write\n** position in the WAL */\nSQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData);\n\n/* Move the write position of the WAL back to iFrame.  Called in\n** response to a ROLLBACK TO command. */\nSQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData);\n\n/* Write a frame or frames to the log. */\nSQLITE_PRIVATE int sqlite3WalFrames(Wal *pWal, int, PgHdr *, Pgno, int, int);\n\n/* Copy pages from the log to the database file */\nSQLITE_PRIVATE int sqlite3WalCheckpoint(\n  Wal *pWal,                      /* Write-ahead log connection */\n  sqlite3 *db,                    /* Check this handle's interrupt flag */\n  int eMode,                      /* One of PASSIVE, FULL and RESTART */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int sync_flags,                 /* Flags to sync db file with (or 0) */\n  int nBuf,                       /* Size of buffer nBuf */\n  u8 *zBuf,                       /* Temporary buffer to use */\n  int *pnLog,                     /* OUT: Number of frames in WAL */\n  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */\n);\n\n/* Return the value to pass to a sqlite3_wal_hook callback, the\n** number of frames in the WAL at the point of the last commit since\n** sqlite3WalCallback() was called.  If no commits have occurred since\n** the last call, then return 0.\n*/\nSQLITE_PRIVATE int sqlite3WalCallback(Wal *pWal);\n\n/* Tell the wal layer that an EXCLUSIVE lock has been obtained (or released)\n** by the pager layer on the database file.\n*/\nSQLITE_PRIVATE int sqlite3WalExclusiveMode(Wal *pWal, int op);\n\n/* Return true if the argument is non-NULL and the WAL module is using\n** heap-memory for the wal-index. Otherwise, if the argument is NULL or the\n** WAL module is using shared-memory, return false.\n*/\nSQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal);\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\nSQLITE_PRIVATE int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot);\nSQLITE_PRIVATE void sqlite3WalSnapshotOpen(Wal *pWal, sqlite3_snapshot *pSnapshot);\nSQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal);\nSQLITE_PRIVATE int sqlite3WalSnapshotCheck(Wal *pWal, sqlite3_snapshot *pSnapshot);\nSQLITE_PRIVATE void sqlite3WalSnapshotUnlock(Wal *pWal);\n#endif\n\n#ifdef SQLITE_ENABLE_ZIPVFS\n/* If the WAL file is not empty, return the number of bytes of content\n** stored in each frame (i.e. the db page-size when the WAL was created).\n*/\nSQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal);\n#endif\n\n/* Return the sqlite3_file object for the WAL file */\nSQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal);\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\nSQLITE_PRIVATE int sqlite3WalWriteLock(Wal *pWal, int bLock);\nSQLITE_PRIVATE void sqlite3WalDb(Wal *pWal, sqlite3 *db);\n#endif\n\n#ifdef SQLITE_USE_SEH\nSQLITE_PRIVATE int sqlite3WalSystemErrno(Wal*);\n#endif\n\n#endif /* ifndef SQLITE_OMIT_WAL */\n#endif /* SQLITE_WAL_H */\n\n/************** End of wal.h *************************************************/\n/************** Continuing where we left off in pager.c **********************/\n\n\n/******************* NOTES ON THE DESIGN OF THE PAGER ************************\n**\n** This comment block describes invariants that hold when using a rollback\n** journal.  These invariants do not apply for journal_mode=WAL,\n** journal_mode=MEMORY, or journal_mode=OFF.\n**\n** Within this comment block, a page is deemed to have been synced\n** automatically as soon as it is written when PRAGMA synchronous=OFF.\n** Otherwise, the page is not synced until the xSync method of the VFS\n** is called successfully on the file containing the page.\n**\n** Definition:  A page of the database file is said to be \"overwriteable\" if\n** one or more of the following are true about the page:\n**\n**     (a)  The original content of the page as it was at the beginning of\n**          the transaction has been written into the rollback journal and\n**          synced.\n**\n**     (b)  The page was a freelist leaf page at the start of the transaction.\n**\n**     (c)  The page number is greater than the largest page that existed in\n**          the database file at the start of the transaction.\n**\n** (1) A page of the database file is never overwritten unless one of the\n**     following are true:\n**\n**     (a) The page and all other pages on the same sector are overwriteable.\n**\n**     (b) The atomic page write optimization is enabled, and the entire\n**         transaction other than the update of the transaction sequence\n**         number consists of a single page change.\n**\n** (2) The content of a page written into the rollback journal exactly matches\n**     both the content in the database when the rollback journal was written\n**     and the content in the database at the beginning of the current\n**     transaction.\n**\n** (3) Writes to the database file are an integer multiple of the page size\n**     in length and are aligned on a page boundary.\n**\n** (4) Reads from the database file are either aligned on a page boundary and\n**     an integer multiple of the page size in length or are taken from the\n**     first 100 bytes of the database file.\n**\n** (5) All writes to the database file are synced prior to the rollback journal\n**     being deleted, truncated, or zeroed.\n**\n** (6) If a super-journal file is used, then all writes to the database file\n**     are synced prior to the super-journal being deleted.\n**\n** Definition: Two databases (or the same database at two points it time)\n** are said to be \"logically equivalent\" if they give the same answer to\n** all queries.  Note in particular the content of freelist leaf\n** pages can be changed arbitrarily without affecting the logical equivalence\n** of the database.\n**\n** (7) At any time, if any subset, including the empty set and the total set,\n**     of the unsynced changes to a rollback journal are removed and the\n**     journal is rolled back, the resulting database file will be logically\n**     equivalent to the database file at the beginning of the transaction.\n**\n** (8) When a transaction is rolled back, the xTruncate method of the VFS\n**     is called to restore the database file to the same size it was at\n**     the beginning of the transaction.  (In some VFSes, the xTruncate\n**     method is a no-op, but that does not change the fact the SQLite will\n**     invoke it.)\n**\n** (9) Whenever the database file is modified, at least one bit in the range\n**     of bytes from 24 through 39 inclusive will be changed prior to releasing\n**     the EXCLUSIVE lock, thus signaling other connections on the same\n**     database to flush their caches.\n**\n** (10) The pattern of bits in bytes 24 through 39 shall not repeat in less\n**      than one billion transactions.\n**\n** (11) A database file is well-formed at the beginning and at the conclusion\n**      of every transaction.\n**\n** (12) An EXCLUSIVE lock is held on the database file when writing to\n**      the database file.\n**\n** (13) A SHARED lock is held on the database file while reading any\n**      content out of the database file.\n**\n******************************************************************************/\n\n/*\n** Macros for troubleshooting.  Normally turned off\n*/\n#if 0\nint sqlite3PagerTrace=1;  /* True to enable tracing */\n#define sqlite3DebugPrintf printf\n#define PAGERTRACE(X)     if( sqlite3PagerTrace ){ sqlite3DebugPrintf X; }\n#else\n#define PAGERTRACE(X)\n#endif\n\n/*\n** The following two macros are used within the PAGERTRACE() macros above\n** to print out file-descriptors.\n**\n** PAGERID() takes a pointer to a Pager struct as its argument. The\n** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file\n** struct as its argument.\n*/\n#define PAGERID(p) (SQLITE_PTR_TO_INT(p->fd))\n#define FILEHANDLEID(fd) (SQLITE_PTR_TO_INT(fd))\n\n/*\n** The Pager.eState variable stores the current 'state' of a pager. A\n** pager may be in any one of the seven states shown in the following\n** state diagram.\n**\n**                            OPEN <------+------+\n**                              |         |      |\n**                              V         |      |\n**               +---------> READER-------+      |\n**               |              |                |\n**               |              V                |\n**               |<-------WRITER_LOCKED------> ERROR\n**               |              |                ^\n**               |              V                |\n**               |<------WRITER_CACHEMOD-------->|\n**               |              |                |\n**               |              V                |\n**               |<-------WRITER_DBMOD---------->|\n**               |              |                |\n**               |              V                |\n**               +<------WRITER_FINISHED-------->+\n**\n**\n** List of state transitions and the C [function] that performs each:\n**\n**   OPEN              -> READER              [sqlite3PagerSharedLock]\n**   READER            -> OPEN                [pager_unlock]\n**\n**   READER            -> WRITER_LOCKED       [sqlite3PagerBegin]\n**   WRITER_LOCKED     -> WRITER_CACHEMOD     [pager_open_journal]\n**   WRITER_CACHEMOD   -> WRITER_DBMOD        [syncJournal]\n**   WRITER_DBMOD      -> WRITER_FINISHED     [sqlite3PagerCommitPhaseOne]\n**   WRITER_***        -> READER              [pager_end_transaction]\n**\n**   WRITER_***        -> ERROR               [pager_error]\n**   ERROR             -> OPEN                [pager_unlock]\n**\n**\n**  OPEN:\n**\n**    The pager starts up in this state. Nothing is guaranteed in this\n**    state - the file may or may not be locked and the database size is\n**    unknown. The database may not be read or written.\n**\n**    * No read or write transaction is active.\n**    * Any lock, or no lock at all, may be held on the database file.\n**    * The dbSize, dbOrigSize and dbFileSize variables may not be trusted.\n**\n**  READER:\n**\n**    In this state all the requirements for reading the database in\n**    rollback (non-WAL) mode are met. Unless the pager is (or recently\n**    was) in exclusive-locking mode, a user-level read transaction is\n**    open. The database size is known in this state.\n**\n**    A connection running with locking_mode=normal enters this state when\n**    it opens a read-transaction on the database and returns to state\n**    OPEN after the read-transaction is completed. However a connection\n**    running in locking_mode=exclusive (including temp databases) remains in\n**    this state even after the read-transaction is closed. The only way\n**    a locking_mode=exclusive connection can transition from READER to OPEN\n**    is via the ERROR state (see below).\n**\n**    * A read transaction may be active (but a write-transaction cannot).\n**    * A SHARED or greater lock is held on the database file.\n**    * The dbSize variable may be trusted (even if a user-level read\n**      transaction is not active). The dbOrigSize and dbFileSize variables\n**      may not be trusted at this point.\n**    * If the database is a WAL database, then the WAL connection is open.\n**    * Even if a read-transaction is not open, it is guaranteed that\n**      there is no hot-journal in the file-system.\n**\n**  WRITER_LOCKED:\n**\n**    The pager moves to this state from READER when a write-transaction\n**    is first opened on the database. In WRITER_LOCKED state, all locks\n**    required to start a write-transaction are held, but no actual\n**    modifications to the cache or database have taken place.\n**\n**    In rollback mode, a RESERVED or (if the transaction was opened with\n**    BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when\n**    moving to this state, but the journal file is not written to or opened\n**    to in this state. If the transaction is committed or rolled back while\n**    in WRITER_LOCKED state, all that is required is to unlock the database\n**    file.\n**\n**    IN WAL mode, WalBeginWriteTransaction() is called to lock the log file.\n**    If the connection is running with locking_mode=exclusive, an attempt\n**    is made to obtain an EXCLUSIVE lock on the database file.\n**\n**    * A write transaction is active.\n**    * If the connection is open in rollback-mode, a RESERVED or greater\n**      lock is held on the database file.\n**    * If the connection is open in WAL-mode, a WAL write transaction\n**      is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully\n**      called).\n**    * The dbSize, dbOrigSize and dbFileSize variables are all valid.\n**    * The contents of the pager cache have not been modified.\n**    * The journal file may or may not be open.\n**    * Nothing (not even the first header) has been written to the journal.\n**\n**  WRITER_CACHEMOD:\n**\n**    A pager moves from WRITER_LOCKED state to this state when a page is\n**    first modified by the upper layer. In rollback mode the journal file\n**    is opened (if it is not already open) and a header written to the\n**    start of it. The database file on disk has not been modified.\n**\n**    * A write transaction is active.\n**    * A RESERVED or greater lock is held on the database file.\n**    * The journal file is open and the first header has been written\n**      to it, but the header has not been synced to disk.\n**    * The contents of the page cache have been modified.\n**\n**  WRITER_DBMOD:\n**\n**    The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state\n**    when it modifies the contents of the database file. WAL connections\n**    never enter this state (since they do not modify the database file,\n**    just the log file).\n**\n**    * A write transaction is active.\n**    * An EXCLUSIVE or greater lock is held on the database file.\n**    * The journal file is open and the first header has been written\n**      and synced to disk.\n**    * The contents of the page cache have been modified (and possibly\n**      written to disk).\n**\n**  WRITER_FINISHED:\n**\n**    It is not possible for a WAL connection to enter this state.\n**\n**    A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD\n**    state after the entire transaction has been successfully written into the\n**    database file. In this state the transaction may be committed simply\n**    by finalizing the journal file. Once in WRITER_FINISHED state, it is\n**    not possible to modify the database further. At this point, the upper\n**    layer must either commit or rollback the transaction.\n**\n**    * A write transaction is active.\n**    * An EXCLUSIVE or greater lock is held on the database file.\n**    * All writing and syncing of journal and database data has finished.\n**      If no error occurred, all that remains is to finalize the journal to\n**      commit the transaction. If an error did occur, the caller will need\n**      to rollback the transaction.\n**\n**  ERROR:\n**\n**    The ERROR state is entered when an IO or disk-full error (including\n**    SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it\n**    difficult to be sure that the in-memory pager state (cache contents,\n**    db size etc.) are consistent with the contents of the file-system.\n**\n**    Temporary pager files may enter the ERROR state, but in-memory pagers\n**    cannot.\n**\n**    For example, if an IO error occurs while performing a rollback,\n**    the contents of the page-cache may be left in an inconsistent state.\n**    At this point it would be dangerous to change back to READER state\n**    (as usually happens after a rollback). Any subsequent readers might\n**    report database corruption (due to the inconsistent cache), and if\n**    they upgrade to writers, they may inadvertently corrupt the database\n**    file. To avoid this hazard, the pager switches into the ERROR state\n**    instead of READER following such an error.\n**\n**    Once it has entered the ERROR state, any attempt to use the pager\n**    to read or write data returns an error. Eventually, once all\n**    outstanding transactions have been abandoned, the pager is able to\n**    transition back to OPEN state, discarding the contents of the\n**    page-cache and any other in-memory state at the same time. Everything\n**    is reloaded from disk (and, if necessary, hot-journal rollback performed)\n**    when a read-transaction is next opened on the pager (transitioning\n**    the pager into READER state). At that point the system has recovered\n**    from the error.\n**\n**    Specifically, the pager jumps into the ERROR state if:\n**\n**      1. An error occurs while attempting a rollback. This happens in\n**         function sqlite3PagerRollback().\n**\n**      2. An error occurs while attempting to finalize a journal file\n**         following a commit in function sqlite3PagerCommitPhaseTwo().\n**\n**      3. An error occurs while attempting to write to the journal or\n**         database file in function pagerStress() in order to free up\n**         memory.\n**\n**    In other cases, the error is returned to the b-tree layer. The b-tree\n**    layer then attempts a rollback operation. If the error condition\n**    persists, the pager enters the ERROR state via condition (1) above.\n**\n**    Condition (3) is necessary because it can be triggered by a read-only\n**    statement executed within a transaction. In this case, if the error\n**    code were simply returned to the user, the b-tree layer would not\n**    automatically attempt a rollback, as it assumes that an error in a\n**    read-only statement cannot leave the pager in an internally inconsistent\n**    state.\n**\n**    * The Pager.errCode variable is set to something other than SQLITE_OK.\n**    * There are one or more outstanding references to pages (after the\n**      last reference is dropped the pager should move back to OPEN state).\n**    * The pager is not an in-memory pager.\n**\n**\n** Notes:\n**\n**   * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the\n**     connection is open in WAL mode. A WAL connection is always in one\n**     of the first four states.\n**\n**   * Normally, a connection open in exclusive mode is never in PAGER_OPEN\n**     state. There are two exceptions: immediately after exclusive-mode has\n**     been turned on (and before any read or write transactions are\n**     executed), and when the pager is leaving the \"error state\".\n**\n**   * See also: assert_pager_state().\n*/\n#define PAGER_OPEN                  0\n#define PAGER_READER                1\n#define PAGER_WRITER_LOCKED         2\n#define PAGER_WRITER_CACHEMOD       3\n#define PAGER_WRITER_DBMOD          4\n#define PAGER_WRITER_FINISHED       5\n#define PAGER_ERROR                 6\n\n/*\n** The Pager.eLock variable is almost always set to one of the\n** following locking-states, according to the lock currently held on\n** the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK.\n** This variable is kept up to date as locks are taken and released by\n** the pagerLockDb() and pagerUnlockDb() wrappers.\n**\n** If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY\n** (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not\n** the operation was successful. In these circumstances pagerLockDb() and\n** pagerUnlockDb() take a conservative approach - eLock is always updated\n** when unlocking the file, and only updated when locking the file if the\n** VFS call is successful. This way, the Pager.eLock variable may be set\n** to a less exclusive (lower) value than the lock that is actually held\n** at the system level, but it is never set to a more exclusive value.\n**\n** This is usually safe. If an xUnlock fails or appears to fail, there may\n** be a few redundant xLock() calls or a lock may be held for longer than\n** required, but nothing really goes wrong.\n**\n** The exception is when the database file is unlocked as the pager moves\n** from ERROR to OPEN state. At this point there may be a hot-journal file\n** in the file-system that needs to be rolled back (as part of an OPEN->SHARED\n** transition, by the same pager or any other). If the call to xUnlock()\n** fails at this point and the pager is left holding an EXCLUSIVE lock, this\n** can confuse the call to xCheckReservedLock() call made later as part\n** of hot-journal detection.\n**\n** xCheckReservedLock() is defined as returning true \"if there is a RESERVED\n** lock held by this process or any others\". So xCheckReservedLock may\n** return true because the caller itself is holding an EXCLUSIVE lock (but\n** doesn't know it because of a previous error in xUnlock). If this happens\n** a hot-journal may be mistaken for a journal being created by an active\n** transaction in another process, causing SQLite to read from the database\n** without rolling it back.\n**\n** To work around this, if a call to xUnlock() fails when unlocking the\n** database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It\n** is only changed back to a real locking state after a successful call\n** to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition\n** omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK\n** lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE\n** lock on the database file before attempting to roll it back. See function\n** PagerSharedLock() for more detail.\n**\n** Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in\n** PAGER_OPEN state.\n*/\n#define UNKNOWN_LOCK                (EXCLUSIVE_LOCK+1)\n\n/*\n** The maximum allowed sector size. 64KiB. If the xSectorsize() method\n** returns a value larger than this, then MAX_SECTOR_SIZE is used instead.\n** This could conceivably cause corruption following a power failure on\n** such a system. This is currently an undocumented limit.\n*/\n#define MAX_SECTOR_SIZE 0x10000\n\n\n/*\n** An instance of the following structure is allocated for each active\n** savepoint and statement transaction in the system. All such structures\n** are stored in the Pager.aSavepoint[] array, which is allocated and\n** resized using sqlite3Realloc().\n**\n** When a savepoint is created, the PagerSavepoint.iHdrOffset field is\n** set to 0. If a journal-header is written into the main journal while\n** the savepoint is active, then iHdrOffset is set to the byte offset\n** immediately following the last journal record written into the main\n** journal before the journal-header. This is required during savepoint\n** rollback (see pagerPlaybackSavepoint()).\n*/\ntypedef struct PagerSavepoint PagerSavepoint;\nstruct PagerSavepoint {\n  i64 iOffset;                 /* Starting offset in main journal */\n  i64 iHdrOffset;              /* See above */\n  Bitvec *pInSavepoint;        /* Set of pages in this savepoint */\n  Pgno nOrig;                  /* Original number of pages in file */\n  Pgno iSubRec;                /* Index of first record in sub-journal */\n  int bTruncateOnRelease;      /* If stmt journal may be truncated on RELEASE */\n#ifndef SQLITE_OMIT_WAL\n  u32 aWalData[WAL_SAVEPOINT_NDATA];        /* WAL savepoint context */\n#endif\n};\n\n/*\n** Bits of the Pager.doNotSpill flag.  See further description below.\n*/\n#define SPILLFLAG_OFF         0x01 /* Never spill cache.  Set via pragma */\n#define SPILLFLAG_ROLLBACK    0x02 /* Current rolling back, so do not spill */\n#define SPILLFLAG_NOSYNC      0x04 /* Spill is ok, but do not sync */\n\n/*\n** An open page cache is an instance of struct Pager. A description of\n** some of the more important member variables follows:\n**\n** eState\n**\n**   The current 'state' of the pager object. See the comment and state\n**   diagram above for a description of the pager state.\n**\n** eLock\n**\n**   For a real on-disk database, the current lock held on the database file -\n**   NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK.\n**\n**   For a temporary or in-memory database (neither of which require any\n**   locks), this variable is always set to EXCLUSIVE_LOCK. Since such\n**   databases always have Pager.exclusiveMode==1, this tricks the pager\n**   logic into thinking that it already has all the locks it will ever\n**   need (and no reason to release them).\n**\n**   In some (obscure) circumstances, this variable may also be set to\n**   UNKNOWN_LOCK. See the comment above the #define of UNKNOWN_LOCK for\n**   details.\n**\n** changeCountDone\n**\n**   This boolean variable is used to make sure that the change-counter\n**   (the 4-byte header field at byte offset 24 of the database file) is\n**   not updated more often than necessary.\n**\n**   It is set to true when the change-counter field is updated, which\n**   can only happen if an exclusive lock is held on the database file.\n**   It is cleared (set to false) whenever an exclusive lock is\n**   relinquished on the database file. Each time a transaction is committed,\n**   The changeCountDone flag is inspected. If it is true, the work of\n**   updating the change-counter is omitted for the current transaction.\n**\n**   This mechanism means that when running in exclusive mode, a connection\n**   need only update the change-counter once, for the first transaction\n**   committed.\n**\n** setSuper\n**\n**   When PagerCommitPhaseOne() is called to commit a transaction, it may\n**   (or may not) specify a super-journal name to be written into the\n**   journal file before it is synced to disk.\n**\n**   Whether or not a journal file contains a super-journal pointer affects\n**   the way in which the journal file is finalized after the transaction is\n**   committed or rolled back when running in \"journal_mode=PERSIST\" mode.\n**   If a journal file does not contain a super-journal pointer, it is\n**   finalized by overwriting the first journal header with zeroes. If\n**   it does contain a super-journal pointer the journal file is finalized\n**   by truncating it to zero bytes, just as if the connection were\n**   running in \"journal_mode=truncate\" mode.\n**\n**   Journal files that contain super-journal pointers cannot be finalized\n**   simply by overwriting the first journal-header with zeroes, as the\n**   super-journal pointer could interfere with hot-journal rollback of any\n**   subsequently interrupted transaction that reuses the journal file.\n**\n**   The flag is cleared as soon as the journal file is finalized (either\n**   by PagerCommitPhaseTwo or PagerRollback). If an IO error prevents the\n**   journal file from being successfully finalized, the setSuper flag\n**   is cleared anyway (and the pager will move to ERROR state).\n**\n** doNotSpill\n**\n**   This variables control the behavior of cache-spills  (calls made by\n**   the pcache module to the pagerStress() routine to write cached data\n**   to the file-system in order to free up memory).\n**\n**   When bits SPILLFLAG_OFF or SPILLFLAG_ROLLBACK of doNotSpill are set,\n**   writing to the database from pagerStress() is disabled altogether.\n**   The SPILLFLAG_ROLLBACK case is done in a very obscure case that\n**   comes up during savepoint rollback that requires the pcache module\n**   to allocate a new page to prevent the journal file from being written\n**   while it is being traversed by code in pager_playback().  The SPILLFLAG_OFF\n**   case is a user preference.\n**\n**   If the SPILLFLAG_NOSYNC bit is set, writing to the database from\n**   pagerStress() is permitted, but syncing the journal file is not.\n**   This flag is set by sqlite3PagerWrite() when the file-system sector-size\n**   is larger than the database page-size in order to prevent a journal sync\n**   from happening in between the journalling of two pages on the same sector.\n**\n** subjInMemory\n**\n**   This is a boolean variable. If true, then any required sub-journal\n**   is opened as an in-memory journal file. If false, then in-memory\n**   sub-journals are only used for in-memory pager files.\n**\n**   This variable is updated by the upper layer each time a new\n**   write-transaction is opened.\n**\n** dbSize, dbOrigSize, dbFileSize\n**\n**   Variable dbSize is set to the number of pages in the database file.\n**   It is valid in PAGER_READER and higher states (all states except for\n**   OPEN and ERROR).\n**\n**   dbSize is set based on the size of the database file, which may be\n**   larger than the size of the database (the value stored at offset\n**   28 of the database header by the btree). If the size of the file\n**   is not an integer multiple of the page-size, the value stored in\n**   dbSize is rounded down (i.e. a 5KB file with 2K page-size has dbSize==2).\n**   Except, any file that is greater than 0 bytes in size is considered\n**   to have at least one page. (i.e. a 1KB file with 2K page-size leads\n**   to dbSize==1).\n**\n**   During a write-transaction, if pages with page-numbers greater than\n**   dbSize are modified in the cache, dbSize is updated accordingly.\n**   Similarly, if the database is truncated using PagerTruncateImage(),\n**   dbSize is updated.\n**\n**   Variables dbOrigSize and dbFileSize are valid in states\n**   PAGER_WRITER_LOCKED and higher. dbOrigSize is a copy of the dbSize\n**   variable at the start of the transaction. It is used during rollback,\n**   and to determine whether or not pages need to be journalled before\n**   being modified.\n**\n**   Throughout a write-transaction, dbFileSize contains the size of\n**   the file on disk in pages. It is set to a copy of dbSize when the\n**   write-transaction is first opened, and updated when VFS calls are made\n**   to write or truncate the database file on disk.\n**\n**   The only reason the dbFileSize variable is required is to suppress\n**   unnecessary calls to xTruncate() after committing a transaction. If,\n**   when a transaction is committed, the dbFileSize variable indicates\n**   that the database file is larger than the database image (Pager.dbSize),\n**   pager_truncate() is called. The pager_truncate() call uses xFilesize()\n**   to measure the database file on disk, and then truncates it if required.\n**   dbFileSize is not used when rolling back a transaction. In this case\n**   pager_truncate() is called unconditionally (which means there may be\n**   a call to xFilesize() that is not strictly required). In either case,\n**   pager_truncate() may cause the file to become smaller or larger.\n**\n** dbHintSize\n**\n**   The dbHintSize variable is used to limit the number of calls made to\n**   the VFS xFileControl(FCNTL_SIZE_HINT) method.\n**\n**   dbHintSize is set to a copy of the dbSize variable when a\n**   write-transaction is opened (at the same time as dbFileSize and\n**   dbOrigSize). If the xFileControl(FCNTL_SIZE_HINT) method is called,\n**   dbHintSize is increased to the number of pages that correspond to the\n**   size-hint passed to the method call. See pager_write_pagelist() for\n**   details.\n**\n** errCode\n**\n**   The Pager.errCode variable is only ever used in PAGER_ERROR state. It\n**   is set to zero in all other states. In PAGER_ERROR state, Pager.errCode\n**   is always set to SQLITE_FULL, SQLITE_IOERR or one of the SQLITE_IOERR_XXX\n**   sub-codes.\n**\n** syncFlags, walSyncFlags\n**\n**   syncFlags is either SQLITE_SYNC_NORMAL (0x02) or SQLITE_SYNC_FULL (0x03).\n**   syncFlags is used for rollback mode.  walSyncFlags is used for WAL mode\n**   and contains the flags used to sync the checkpoint operations in the\n**   lower two bits, and sync flags used for transaction commits in the WAL\n**   file in bits 0x04 and 0x08.  In other words, to get the correct sync flags\n**   for checkpoint operations, use (walSyncFlags&0x03) and to get the correct\n**   sync flags for transaction commit, use ((walSyncFlags>>2)&0x03).  Note\n**   that with synchronous=NORMAL in WAL mode, transaction commit is not synced\n**   meaning that the 0x04 and 0x08 bits are both zero.\n*/\nstruct Pager {\n  sqlite3_vfs *pVfs;          /* OS functions to use for IO */\n  u8 exclusiveMode;           /* Boolean. True if locking_mode==EXCLUSIVE */\n  u8 journalMode;             /* One of the PAGER_JOURNALMODE_* values */\n  u8 useJournal;              /* Use a rollback journal on this file */\n  u8 noSync;                  /* Do not sync the journal if true */\n  u8 fullSync;                /* Do extra syncs of the journal for robustness */\n  u8 extraSync;               /* sync directory after journal delete */\n  u8 syncFlags;               /* SYNC_NORMAL or SYNC_FULL otherwise */\n  u8 walSyncFlags;            /* See description above */\n  u8 tempFile;                /* zFilename is a temporary or immutable file */\n  u8 noLock;                  /* Do not lock (except in WAL mode) */\n  u8 readOnly;                /* True for a read-only database */\n  u8 memDb;                   /* True to inhibit all file I/O */\n  u8 memVfs;                  /* VFS-implemented memory database */\n\n  /**************************************************************************\n  ** The following block contains those class members that change during\n  ** routine operation.  Class members not in this block are either fixed\n  ** when the pager is first created or else only change when there is a\n  ** significant mode change (such as changing the page_size, locking_mode,\n  ** or the journal_mode).  From another view, these class members describe\n  ** the \"state\" of the pager, while other class members describe the\n  ** \"configuration\" of the pager.\n  */\n  u8 eState;                  /* Pager state (OPEN, READER, WRITER_LOCKED..) */\n  u8 eLock;                   /* Current lock held on database file */\n  u8 changeCountDone;         /* Set after incrementing the change-counter */\n  u8 setSuper;                /* Super-jrnl name is written into jrnl */\n  u8 doNotSpill;              /* Do not spill the cache when non-zero */\n  u8 subjInMemory;            /* True to use in-memory sub-journals */\n  u8 bUseFetch;               /* True to use xFetch() */\n  u8 hasHeldSharedLock;       /* True if a shared lock has ever been held */\n  Pgno dbSize;                /* Number of pages in the database */\n  Pgno dbOrigSize;            /* dbSize before the current transaction */\n  Pgno dbFileSize;            /* Number of pages in the database file */\n  Pgno dbHintSize;            /* Value passed to FCNTL_SIZE_HINT call */\n  int errCode;                /* One of several kinds of errors */\n  int nRec;                   /* Pages journalled since last j-header written */\n  u32 cksumInit;              /* Quasi-random value added to every checksum */\n  u32 nSubRec;                /* Number of records written to sub-journal */\n  Bitvec *pInJournal;         /* One bit for each page in the database file */\n  sqlite3_file *fd;           /* File descriptor for database */\n  sqlite3_file *jfd;          /* File descriptor for main journal */\n  sqlite3_file *sjfd;         /* File descriptor for sub-journal */\n  i64 journalOff;             /* Current write offset in the journal file */\n  i64 journalHdr;             /* Byte offset to previous journal header */\n  sqlite3_backup *pBackup;    /* Pointer to list of ongoing backup processes */\n  PagerSavepoint *aSavepoint; /* Array of active savepoints */\n  int nSavepoint;             /* Number of elements in aSavepoint[] */\n  u32 iDataVersion;           /* Changes whenever database content changes */\n  char dbFileVers[16];        /* Changes whenever database file changes */\n\n  int nMmapOut;               /* Number of mmap pages currently outstanding */\n  sqlite3_int64 szMmap;       /* Desired maximum mmap size */\n  PgHdr *pMmapFreelist;       /* List of free mmap page headers (pDirty) */\n  /*\n  ** End of the routinely-changing class members\n  ***************************************************************************/\n\n  u16 nExtra;                 /* Add this many bytes to each in-memory page */\n  i16 nReserve;               /* Number of unused bytes at end of each page */\n  u32 vfsFlags;               /* Flags for sqlite3_vfs.xOpen() */\n  u32 sectorSize;             /* Assumed sector size during rollback */\n  Pgno mxPgno;                /* Maximum allowed size of the database */\n  Pgno lckPgno;               /* Page number for the locking page */\n  i64 pageSize;               /* Number of bytes in a page */\n  i64 journalSizeLimit;       /* Size limit for persistent journal files */\n  char *zFilename;            /* Name of the database file */\n  char *zJournal;             /* Name of the journal file */\n  int (*xBusyHandler)(void*); /* Function to call when busy */\n  void *pBusyHandlerArg;      /* Context argument for xBusyHandler */\n  u32 aStat[4];               /* Total cache hits, misses, writes, spills */\n#ifdef SQLITE_TEST\n  int nRead;                  /* Database pages read */\n#endif\n  void (*xReiniter)(DbPage*); /* Call this routine when reloading pages */\n  int (*xGet)(Pager*,Pgno,DbPage**,int); /* Routine to fetch a patch */\n  char *pTmpSpace;            /* Pager.pageSize bytes of space for tmp use */\n  PCache *pPCache;            /* Pointer to page cache object */\n#ifndef SQLITE_OMIT_WAL\n  Wal *pWal;                  /* Write-ahead log used by \"journal_mode=wal\" */\n  char *zWal;                 /* File name for write-ahead log */\n#endif\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  sqlite3 *dbWal;\n#endif\n};\n\n/*\n** Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains\n** the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS\n** or CACHE_WRITE to sqlite3_db_status().\n*/\n#define PAGER_STAT_HIT   0\n#define PAGER_STAT_MISS  1\n#define PAGER_STAT_WRITE 2\n#define PAGER_STAT_SPILL 3\n\n/*\n** The following global variables hold counters used for\n** testing purposes only.  These variables do not exist in\n** a non-testing build.  These variables are not thread-safe.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_pager_readdb_count = 0;    /* Number of full pages read from DB */\nSQLITE_API int sqlite3_pager_writedb_count = 0;   /* Number of full pages written to DB */\nSQLITE_API int sqlite3_pager_writej_count = 0;    /* Number of pages written to journal */\n# define PAGER_INCR(v)  v++\n#else\n# define PAGER_INCR(v)\n#endif\n\n\n\n/*\n** Journal files begin with the following magic string.  The data\n** was obtained from /dev/random.  It is used only as a sanity check.\n**\n** Since version 2.8.0, the journal format contains additional sanity\n** checking information.  If the power fails while the journal is being\n** written, semi-random garbage data might appear in the journal\n** file after power is restored.  If an attempt is then made\n** to roll the journal back, the database could be corrupted.  The additional\n** sanity checking data is an attempt to discover the garbage in the\n** journal and ignore it.\n**\n** The sanity checking information for the new journal format consists\n** of a 32-bit checksum on each page of data.  The checksum covers both\n** the page number and the pPager->pageSize bytes of data for the page.\n** This cksum is initialized to a 32-bit random value that appears in the\n** journal file right after the header.  The random initializer is important,\n** because garbage data that appears at the end of a journal is likely\n** data that was once in other files that have now been deleted.  If the\n** garbage data came from an obsolete journal file, the checksums might\n** be correct.  But by initializing the checksum to random value which\n** is different for every journal, we minimize that risk.\n*/\nstatic const unsigned char aJournalMagic[] = {\n  0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd7,\n};\n\n/*\n** The size of the of each page record in the journal is given by\n** the following macro.\n*/\n#define JOURNAL_PG_SZ(pPager)  ((pPager->pageSize) + 8)\n\n/*\n** The journal header size for this pager. This is usually the same\n** size as a single disk sector. See also setSectorSize().\n*/\n#define JOURNAL_HDR_SZ(pPager) (pPager->sectorSize)\n\n/*\n** The macro MEMDB is true if we are dealing with an in-memory database.\n** We do this as a macro so that if the SQLITE_OMIT_MEMORYDB macro is set,\n** the value of MEMDB will be a constant and the compiler will optimize\n** out code that would never execute.\n*/\n#ifdef SQLITE_OMIT_MEMORYDB\n# define MEMDB 0\n#else\n# define MEMDB pPager->memDb\n#endif\n\n/*\n** The macro USEFETCH is true if we are allowed to use the xFetch and xUnfetch\n** interfaces to access the database using memory-mapped I/O.\n*/\n#if SQLITE_MAX_MMAP_SIZE>0\n# define USEFETCH(x) ((x)->bUseFetch)\n#else\n# define USEFETCH(x) 0\n#endif\n\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\n/*\n** Return true if page pgno can be read directly from the database file\n** by the b-tree layer. This is the case if:\n**\n**   (1)  the database file is open\n**   (2)  the VFS for the database is able to do unaligned sub-page reads\n**   (3)  there are no dirty pages in the cache, and\n**   (4)  the desired page is not currently in the wal file.\n*/\nSQLITE_PRIVATE int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){\n  assert( pPager!=0 );\n  assert( pPager->fd!=0 );\n  if( pPager->fd->pMethods==0 ) return 0;  /* Case (1) */\n  if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0; /* Failed (3) */\n#ifndef SQLITE_OMIT_WAL\n  if( pPager->pWal ){\n    u32 iRead = 0;\n    (void)sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);\n    if( iRead ) return 0;  /* Case (4) */\n  }\n#endif\n  assert( pPager->fd->pMethods->xDeviceCharacteristics!=0 );\n  if( (pPager->fd->pMethods->xDeviceCharacteristics(pPager->fd)\n        & SQLITE_IOCAP_SUBPAGE_READ)==0 ){\n    return 0; /* Case (2) */\n  }\n  return 1;\n}\n#endif\n\n#ifndef SQLITE_OMIT_WAL\n# define pagerUseWal(x) ((x)->pWal!=0)\n#else\n# define pagerUseWal(x) 0\n# define pagerRollbackWal(x) 0\n# define pagerWalFrames(v,w,x,y) 0\n# define pagerOpenWalIfPresent(z) SQLITE_OK\n# define pagerBeginReadTransaction(z) SQLITE_OK\n#endif\n\n#ifndef NDEBUG\n/*\n** Usage:\n**\n**   assert( assert_pager_state(pPager) );\n**\n** This function runs many asserts to try to find inconsistencies in\n** the internal state of the Pager object.\n*/\nstatic int assert_pager_state(Pager *p){\n  Pager *pPager = p;\n\n  /* State must be valid. */\n  assert( p->eState==PAGER_OPEN\n       || p->eState==PAGER_READER\n       || p->eState==PAGER_WRITER_LOCKED\n       || p->eState==PAGER_WRITER_CACHEMOD\n       || p->eState==PAGER_WRITER_DBMOD\n       || p->eState==PAGER_WRITER_FINISHED\n       || p->eState==PAGER_ERROR\n  );\n\n  /* Regardless of the current state, a temp-file connection always behaves\n  ** as if it has an exclusive lock on the database file. It never updates\n  ** the change-counter field, so the changeCountDone flag is always set.\n  */\n  assert( p->tempFile==0 || p->eLock==EXCLUSIVE_LOCK );\n  assert( p->tempFile==0 || pPager->changeCountDone );\n\n  /* If the useJournal flag is clear, the journal-mode must be \"OFF\".\n  ** And if the journal-mode is \"OFF\", the journal file must not be open.\n  */\n  assert( p->journalMode==PAGER_JOURNALMODE_OFF || p->useJournal );\n  assert( p->journalMode!=PAGER_JOURNALMODE_OFF || !isOpen(p->jfd) );\n\n  /* Check that MEMDB implies noSync. And an in-memory journal. Since\n  ** this means an in-memory pager performs no IO at all, it cannot encounter\n  ** either SQLITE_IOERR or SQLITE_FULL during rollback or while finalizing\n  ** a journal file. (although the in-memory journal implementation may\n  ** return SQLITE_IOERR_NOMEM while the journal file is being written). It\n  ** is therefore not possible for an in-memory pager to enter the ERROR\n  ** state.\n  */\n  if( MEMDB ){\n    assert( !isOpen(p->fd) );\n    assert( p->noSync );\n    assert( p->journalMode==PAGER_JOURNALMODE_OFF\n         || p->journalMode==PAGER_JOURNALMODE_MEMORY\n    );\n    assert( p->eState!=PAGER_ERROR && p->eState!=PAGER_OPEN );\n    assert( pagerUseWal(p)==0 );\n  }\n\n  /* If changeCountDone is set, a RESERVED lock or greater must be held\n  ** on the file.\n  */\n  assert( pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK );\n  assert( p->eLock!=PENDING_LOCK );\n\n  switch( p->eState ){\n    case PAGER_OPEN:\n      assert( !MEMDB );\n      assert( pPager->errCode==SQLITE_OK );\n      assert( sqlite3PcacheRefCount(pPager->pPCache)==0 || pPager->tempFile );\n      break;\n\n    case PAGER_READER:\n      assert( pPager->errCode==SQLITE_OK );\n      assert( p->eLock!=UNKNOWN_LOCK );\n      assert( p->eLock>=SHARED_LOCK );\n      break;\n\n    case PAGER_WRITER_LOCKED:\n      assert( p->eLock!=UNKNOWN_LOCK );\n      assert( pPager->errCode==SQLITE_OK );\n      if( !pagerUseWal(pPager) ){\n        assert( p->eLock>=RESERVED_LOCK );\n      }\n      assert( pPager->dbSize==pPager->dbOrigSize );\n      assert( pPager->dbOrigSize==pPager->dbFileSize );\n      assert( pPager->dbOrigSize==pPager->dbHintSize );\n      assert( pPager->setSuper==0 );\n      break;\n\n    case PAGER_WRITER_CACHEMOD:\n      assert( p->eLock!=UNKNOWN_LOCK );\n      assert( pPager->errCode==SQLITE_OK );\n      if( !pagerUseWal(pPager) ){\n        /* It is possible that if journal_mode=wal here that neither the\n        ** journal file nor the WAL file are open. This happens during\n        ** a rollback transaction that switches from journal_mode=off\n        ** to journal_mode=wal.\n        */\n        assert( p->eLock>=RESERVED_LOCK );\n        assert( isOpen(p->jfd)\n             || p->journalMode==PAGER_JOURNALMODE_OFF\n             || p->journalMode==PAGER_JOURNALMODE_WAL\n        );\n      }\n      assert( pPager->dbOrigSize==pPager->dbFileSize );\n      assert( pPager->dbOrigSize==pPager->dbHintSize );\n      break;\n\n    case PAGER_WRITER_DBMOD:\n      assert( p->eLock==EXCLUSIVE_LOCK );\n      assert( pPager->errCode==SQLITE_OK );\n      assert( !pagerUseWal(pPager) );\n      assert( p->eLock>=EXCLUSIVE_LOCK );\n      assert( isOpen(p->jfd)\n           || p->journalMode==PAGER_JOURNALMODE_OFF\n           || p->journalMode==PAGER_JOURNALMODE_WAL\n           || (sqlite3OsDeviceCharacteristics(p->fd)&SQLITE_IOCAP_BATCH_ATOMIC)\n      );\n      assert( pPager->dbOrigSize<=pPager->dbHintSize );\n      break;\n\n    case PAGER_WRITER_FINISHED:\n      assert( p->eLock==EXCLUSIVE_LOCK );\n      assert( pPager->errCode==SQLITE_OK );\n      assert( !pagerUseWal(pPager) );\n      assert( isOpen(p->jfd)\n           || p->journalMode==PAGER_JOURNALMODE_OFF\n           || p->journalMode==PAGER_JOURNALMODE_WAL\n           || (sqlite3OsDeviceCharacteristics(p->fd)&SQLITE_IOCAP_BATCH_ATOMIC)\n      );\n      break;\n\n    case PAGER_ERROR:\n      /* There must be at least one outstanding reference to the pager if\n      ** in ERROR state. Otherwise the pager should have already dropped\n      ** back to OPEN state.\n      */\n      assert( pPager->errCode!=SQLITE_OK );\n      assert( sqlite3PcacheRefCount(pPager->pPCache)>0 || pPager->tempFile );\n      break;\n  }\n\n  return 1;\n}\n#endif /* ifndef NDEBUG */\n\n#ifdef SQLITE_DEBUG\n/*\n** Return a pointer to a human readable string in a static buffer\n** containing the state of the Pager object passed as an argument. This\n** is intended to be used within debuggers. For example, as an alternative\n** to \"print *pPager\" in gdb:\n**\n** (gdb) printf \"%s\", print_pager_state(pPager)\n**\n** This routine has external linkage in order to suppress compiler warnings\n** about an unused function.  It is enclosed within SQLITE_DEBUG and so does\n** not appear in normal builds.\n*/\nchar *print_pager_state(Pager *p){\n  static char zRet[1024];\n\n  sqlite3_snprintf(1024, zRet,\n      \"Filename:      %s\\n\"\n      \"State:         %s errCode=%d\\n\"\n      \"Lock:          %s\\n\"\n      \"Locking mode:  locking_mode=%s\\n\"\n      \"Journal mode:  journal_mode=%s\\n\"\n      \"Backing store: tempFile=%d memDb=%d useJournal=%d\\n\"\n      \"Journal:       journalOff=%lld journalHdr=%lld\\n\"\n      \"Size:          dbsize=%d dbOrigSize=%d dbFileSize=%d\\n\"\n      , p->zFilename\n      , p->eState==PAGER_OPEN            ? \"OPEN\" :\n        p->eState==PAGER_READER          ? \"READER\" :\n        p->eState==PAGER_WRITER_LOCKED   ? \"WRITER_LOCKED\" :\n        p->eState==PAGER_WRITER_CACHEMOD ? \"WRITER_CACHEMOD\" :\n        p->eState==PAGER_WRITER_DBMOD    ? \"WRITER_DBMOD\" :\n        p->eState==PAGER_WRITER_FINISHED ? \"WRITER_FINISHED\" :\n        p->eState==PAGER_ERROR           ? \"ERROR\" : \"?error?\"\n      , (int)p->errCode\n      , p->eLock==NO_LOCK         ? \"NO_LOCK\" :\n        p->eLock==RESERVED_LOCK   ? \"RESERVED\" :\n        p->eLock==EXCLUSIVE_LOCK  ? \"EXCLUSIVE\" :\n        p->eLock==SHARED_LOCK     ? \"SHARED\" :\n        p->eLock==UNKNOWN_LOCK    ? \"UNKNOWN\" : \"?error?\"\n      , p->exclusiveMode ? \"exclusive\" : \"normal\"\n      , p->journalMode==PAGER_JOURNALMODE_MEMORY   ? \"memory\" :\n        p->journalMode==PAGER_JOURNALMODE_OFF      ? \"off\" :\n        p->journalMode==PAGER_JOURNALMODE_DELETE   ? \"delete\" :\n        p->journalMode==PAGER_JOURNALMODE_PERSIST  ? \"persist\" :\n        p->journalMode==PAGER_JOURNALMODE_TRUNCATE ? \"truncate\" :\n        p->journalMode==PAGER_JOURNALMODE_WAL      ? \"wal\" : \"?error?\"\n      , (int)p->tempFile, (int)p->memDb, (int)p->useJournal\n      , p->journalOff, p->journalHdr\n      , (int)p->dbSize, (int)p->dbOrigSize, (int)p->dbFileSize\n  );\n\n  return zRet;\n}\n#endif\n\n/* Forward references to the various page getters */\nstatic int getPageNormal(Pager*,Pgno,DbPage**,int);\nstatic int getPageError(Pager*,Pgno,DbPage**,int);\n#if SQLITE_MAX_MMAP_SIZE>0\nstatic int getPageMMap(Pager*,Pgno,DbPage**,int);\n#endif\n\n/*\n** Set the Pager.xGet method for the appropriate routine used to fetch\n** content from the pager.\n*/\nstatic void setGetterMethod(Pager *pPager){\n  if( pPager->errCode ){\n    pPager->xGet = getPageError;\n#if SQLITE_MAX_MMAP_SIZE>0\n  }else if( USEFETCH(pPager) ){\n    pPager->xGet = getPageMMap;\n#endif /* SQLITE_MAX_MMAP_SIZE>0 */\n  }else{\n    pPager->xGet = getPageNormal;\n  }\n}\n\n/*\n** Return true if it is necessary to write page *pPg into the sub-journal.\n** A page needs to be written into the sub-journal if there exists one\n** or more open savepoints for which:\n**\n**   * The page-number is less than or equal to PagerSavepoint.nOrig, and\n**   * The bit corresponding to the page-number is not set in\n**     PagerSavepoint.pInSavepoint.\n*/\nstatic int subjRequiresPage(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  PagerSavepoint *p;\n  Pgno pgno = pPg->pgno;\n  int i;\n  for(i=0; i<pPager->nSavepoint; i++){\n    p = &pPager->aSavepoint[i];\n    if( p->nOrig>=pgno && 0==sqlite3BitvecTestNotNull(p->pInSavepoint, pgno) ){\n      for(i=i+1; i<pPager->nSavepoint; i++){\n        pPager->aSavepoint[i].bTruncateOnRelease = 0;\n      }\n      return 1;\n    }\n  }\n  return 0;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Return true if the page is already in the journal file.\n*/\nstatic int pageInJournal(Pager *pPager, PgHdr *pPg){\n  return sqlite3BitvecTest(pPager->pInJournal, pPg->pgno);\n}\n#endif\n\n/*\n** Read a 32-bit integer from the given file descriptor.  Store the integer\n** that is read in *pRes.  Return SQLITE_OK if everything worked, or an\n** error code is something goes wrong.\n**\n** All values are stored on disk as big-endian.\n*/\nstatic int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){\n  unsigned char ac[4];\n  int rc = sqlite3OsRead(fd, ac, sizeof(ac), offset);\n  if( rc==SQLITE_OK ){\n    *pRes = sqlite3Get4byte(ac);\n  }\n  return rc;\n}\n\n/*\n** Write a 32-bit integer into a string buffer in big-endian byte order.\n*/\n#define put32bits(A,B)  sqlite3Put4byte((u8*)A,B)\n\n\n/*\n** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK\n** on success or an error code is something goes wrong.\n*/\nstatic int write32bits(sqlite3_file *fd, i64 offset, u32 val){\n  char ac[4];\n  put32bits(ac, val);\n  return sqlite3OsWrite(fd, ac, 4, offset);\n}\n\n/*\n** Unlock the database file to level eLock, which must be either NO_LOCK\n** or SHARED_LOCK. Regardless of whether or not the call to xUnlock()\n** succeeds, set the Pager.eLock variable to match the (attempted) new lock.\n**\n** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is\n** called, do not modify it. See the comment above the #define of\n** UNKNOWN_LOCK for an explanation of this.\n*/\nstatic int pagerUnlockDb(Pager *pPager, int eLock){\n  int rc = SQLITE_OK;\n\n  assert( !pPager->exclusiveMode || pPager->eLock==eLock );\n  assert( eLock==NO_LOCK || eLock==SHARED_LOCK );\n  assert( eLock!=NO_LOCK || pagerUseWal(pPager)==0 );\n  if( isOpen(pPager->fd) ){\n    assert( pPager->eLock>=eLock );\n    rc = pPager->noLock ? SQLITE_OK : sqlite3OsUnlock(pPager->fd, eLock);\n    if( pPager->eLock!=UNKNOWN_LOCK ){\n      pPager->eLock = (u8)eLock;\n    }\n    IOTRACE((\"UNLOCK %p %d\\n\", pPager, eLock))\n  }\n  pPager->changeCountDone = pPager->tempFile; /* ticket fb3b3024ea238d5c */\n  return rc;\n}\n\n/*\n** Lock the database file to level eLock, which must be either SHARED_LOCK,\n** RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the\n** Pager.eLock variable to the new locking state.\n**\n** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is\n** called, do not modify it unless the new locking state is EXCLUSIVE_LOCK.\n** See the comment above the #define of UNKNOWN_LOCK for an explanation\n** of this.\n*/\nstatic int pagerLockDb(Pager *pPager, int eLock){\n  int rc = SQLITE_OK;\n\n  assert( eLock==SHARED_LOCK || eLock==RESERVED_LOCK || eLock==EXCLUSIVE_LOCK );\n  if( pPager->eLock<eLock || pPager->eLock==UNKNOWN_LOCK ){\n    rc = pPager->noLock ? SQLITE_OK : sqlite3OsLock(pPager->fd, eLock);\n    if( rc==SQLITE_OK && (pPager->eLock!=UNKNOWN_LOCK||eLock==EXCLUSIVE_LOCK) ){\n      pPager->eLock = (u8)eLock;\n      IOTRACE((\"LOCK %p %d\\n\", pPager, eLock))\n    }\n  }\n  return rc;\n}\n\n/*\n** This function determines whether or not the atomic-write or\n** atomic-batch-write optimizations can be used with this pager. The\n** atomic-write optimization can be used if:\n**\n**  (a) the value returned by OsDeviceCharacteristics() indicates that\n**      a database page may be written atomically, and\n**  (b) the value returned by OsSectorSize() is less than or equal\n**      to the page size.\n**\n** If it can be used, then the value returned is the size of the journal\n** file when it contains rollback data for exactly one page.\n**\n** The atomic-batch-write optimization can be used if OsDeviceCharacteristics()\n** returns a value with the SQLITE_IOCAP_BATCH_ATOMIC bit set. -1 is\n** returned in this case.\n**\n** If neither optimization can be used, 0 is returned.\n*/\nstatic int jrnlBufferSize(Pager *pPager){\n  assert( !MEMDB );\n\n#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \\\n || defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n  int dc;                           /* Device characteristics */\n\n  assert( isOpen(pPager->fd) );\n  dc = sqlite3OsDeviceCharacteristics(pPager->fd);\n#else\n  UNUSED_PARAMETER(pPager);\n#endif\n\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n  if( pPager->dbSize>0 && (dc&SQLITE_IOCAP_BATCH_ATOMIC) ){\n    return -1;\n  }\n#endif\n\n#ifdef SQLITE_ENABLE_ATOMIC_WRITE\n  {\n    int nSector = pPager->sectorSize;\n    int szPage = pPager->pageSize;\n\n    assert(SQLITE_IOCAP_ATOMIC512==(512>>8));\n    assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));\n    if( 0==(dc&(SQLITE_IOCAP_ATOMIC|(szPage>>8)) || nSector>szPage) ){\n      return 0;\n    }\n  }\n\n  return JOURNAL_HDR_SZ(pPager) + JOURNAL_PG_SZ(pPager);\n#endif\n\n  return 0;\n}\n\n/*\n** If SQLITE_CHECK_PAGES is defined then we do some sanity checking\n** on the cache using a hash function.  This is used for testing\n** and debugging only.\n*/\n#ifdef SQLITE_CHECK_PAGES\n/*\n** Return a 32-bit hash of the page data for pPage.\n*/\nstatic u32 pager_datahash(int nByte, unsigned char *pData){\n  u32 hash = 0;\n  int i;\n  for(i=0; i<nByte; i++){\n    hash = (hash*1039) + pData[i];\n  }\n  return hash;\n}\nstatic u32 pager_pagehash(PgHdr *pPage){\n  return pager_datahash(pPage->pPager->pageSize, (unsigned char *)pPage->pData);\n}\nstatic void pager_set_pagehash(PgHdr *pPage){\n  pPage->pageHash = pager_pagehash(pPage);\n}\n\n/*\n** The CHECK_PAGE macro takes a PgHdr* as an argument. If SQLITE_CHECK_PAGES\n** is defined, and NDEBUG is not defined, an assert() statement checks\n** that the page is either dirty or still matches the calculated page-hash.\n*/\n#define CHECK_PAGE(x) checkPage(x)\nstatic void checkPage(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  assert( pPager->eState!=PAGER_ERROR );\n  assert( (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );\n}\n\n#else\n#define pager_datahash(X,Y)  0\n#define pager_pagehash(X)  0\n#define pager_set_pagehash(X)\n#define CHECK_PAGE(x)\n#endif  /* SQLITE_CHECK_PAGES */\n\n/*\n** When this is called the journal file for pager pPager must be open.\n** This function attempts to read a super-journal file name from the\n** end of the file and, if successful, copies it into memory supplied\n** by the caller. See comments above writeSuperJournal() for the format\n** used to store a super-journal file name at the end of a journal file.\n**\n** zSuper must point to a buffer of at least nSuper bytes allocated by\n** the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is\n** enough space to write the super-journal name). If the super-journal\n** name in the journal is longer than nSuper bytes (including a\n** nul-terminator), then this is handled as if no super-journal name\n** were present in the journal.\n**\n** If a super-journal file name is present at the end of the journal\n** file, then it is copied into the buffer pointed to by zSuper. A\n** nul-terminator byte is appended to the buffer following the\n** super-journal file name.\n**\n** If it is determined that no super-journal file name is present\n** zSuper[0] is set to 0 and SQLITE_OK returned.\n**\n** If an error occurs while reading from the journal file, an SQLite\n** error code is returned.\n*/\nstatic int readSuperJournal(sqlite3_file *pJrnl, char *zSuper, u64 nSuper){\n  int rc;                    /* Return code */\n  u32 len;                   /* Length in bytes of super-journal name */\n  i64 szJ;                   /* Total size in bytes of journal file pJrnl */\n  u32 cksum;                 /* MJ checksum value read from journal */\n  u32 u;                     /* Unsigned loop counter */\n  unsigned char aMagic[8];   /* A buffer to hold the magic header */\n  zSuper[0] = '\\0';\n\n  if( SQLITE_OK!=(rc = sqlite3OsFileSize(pJrnl, &szJ))\n   || szJ<16\n   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))\n   || len>=nSuper\n   || len>szJ-16\n   || len==0\n   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))\n   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))\n   || memcmp(aMagic, aJournalMagic, 8)\n   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, zSuper, len, szJ-16-len))\n  ){\n    return rc;\n  }\n\n  /* See if the checksum matches the super-journal name */\n  for(u=0; u<len; u++){\n    cksum -= zSuper[u];\n  }\n  if( cksum ){\n    /* If the checksum doesn't add up, then one or more of the disk sectors\n    ** containing the super-journal filename is corrupted. This means\n    ** definitely roll back, so just return SQLITE_OK and report a (nul)\n    ** super-journal filename.\n    */\n    len = 0;\n  }\n  zSuper[len] = '\\0';\n  zSuper[len+1] = '\\0';\n\n  return SQLITE_OK;\n}\n\n/*\n** Return the offset of the sector boundary at or immediately\n** following the value in pPager->journalOff, assuming a sector\n** size of pPager->sectorSize bytes.\n**\n** i.e for a sector size of 512:\n**\n**   Pager.journalOff          Return value\n**   ---------------------------------------\n**   0                         0\n**   512                       512\n**   100                       512\n**   2000                      2048\n**\n*/\nstatic i64 journalHdrOffset(Pager *pPager){\n  i64 offset = 0;\n  i64 c = pPager->journalOff;\n  if( c ){\n    offset = ((c-1)/JOURNAL_HDR_SZ(pPager) + 1) * JOURNAL_HDR_SZ(pPager);\n  }\n  assert( offset%JOURNAL_HDR_SZ(pPager)==0 );\n  assert( offset>=c );\n  assert( (offset-c)<JOURNAL_HDR_SZ(pPager) );\n  return offset;\n}\n\n/*\n** The journal file must be open when this function is called.\n**\n** This function is a no-op if the journal file has not been written to\n** within the current transaction (i.e. if Pager.journalOff==0).\n**\n** If doTruncate is non-zero or the Pager.journalSizeLimit variable is\n** set to 0, then truncate the journal file to zero bytes in size. Otherwise,\n** zero the 28-byte header at the start of the journal file. In either case,\n** if the pager is not in no-sync mode, sync the journal file immediately\n** after writing or truncating it.\n**\n** If Pager.journalSizeLimit is set to a positive, non-zero value, and\n** following the truncation or zeroing described above the size of the\n** journal file in bytes is larger than this value, then truncate the\n** journal file to Pager.journalSizeLimit bytes. The journal file does\n** not need to be synced following this operation.\n**\n** If an IO error occurs, abandon processing and return the IO error code.\n** Otherwise, return SQLITE_OK.\n*/\nstatic int zeroJournalHdr(Pager *pPager, int doTruncate){\n  int rc = SQLITE_OK;                               /* Return code */\n  assert( isOpen(pPager->jfd) );\n  assert( !sqlite3JournalIsInMemory(pPager->jfd) );\n  if( pPager->journalOff ){\n    const i64 iLimit = pPager->journalSizeLimit;    /* Local cache of jsl */\n\n    IOTRACE((\"JZEROHDR %p\\n\", pPager))\n    if( doTruncate || iLimit==0 ){\n      rc = sqlite3OsTruncate(pPager->jfd, 0);\n    }else{\n      static const char zeroHdr[28] = {0};\n      rc = sqlite3OsWrite(pPager->jfd, zeroHdr, sizeof(zeroHdr), 0);\n    }\n    if( rc==SQLITE_OK && !pPager->noSync ){\n      rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_DATAONLY|pPager->syncFlags);\n    }\n\n    /* At this point the transaction is committed but the write lock\n    ** is still held on the file. If there is a size limit configured for\n    ** the persistent journal and the journal file currently consumes more\n    ** space than that limit allows for, truncate it now. There is no need\n    ** to sync the file following this operation.\n    */\n    if( rc==SQLITE_OK && iLimit>0 ){\n      i64 sz;\n      rc = sqlite3OsFileSize(pPager->jfd, &sz);\n      if( rc==SQLITE_OK && sz>iLimit ){\n        rc = sqlite3OsTruncate(pPager->jfd, iLimit);\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** The journal file must be open when this routine is called. A journal\n** header (JOURNAL_HDR_SZ bytes) is written into the journal file at the\n** current location.\n**\n** The format for the journal header is as follows:\n** - 8 bytes: Magic identifying journal format.\n** - 4 bytes: Number of records in journal, or -1 no-sync mode is on.\n** - 4 bytes: Random number used for page hash.\n** - 4 bytes: Initial database page count.\n** - 4 bytes: Sector size used by the process that wrote this journal.\n** - 4 bytes: Database page size.\n**\n** Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.\n*/\nstatic int writeJournalHdr(Pager *pPager){\n  int rc = SQLITE_OK;                 /* Return code */\n  char *zHeader = pPager->pTmpSpace;  /* Temporary space used to build header */\n  u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */\n  u32 nWrite;                         /* Bytes of header sector written */\n  int ii;                             /* Loop counter */\n\n  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */\n\n  if( nHeader>JOURNAL_HDR_SZ(pPager) ){\n    nHeader = JOURNAL_HDR_SZ(pPager);\n  }\n\n  /* If there are active savepoints and any of them were created\n  ** since the most recent journal header was written, update the\n  ** PagerSavepoint.iHdrOffset fields now.\n  */\n  for(ii=0; ii<pPager->nSavepoint; ii++){\n    if( pPager->aSavepoint[ii].iHdrOffset==0 ){\n      pPager->aSavepoint[ii].iHdrOffset = pPager->journalOff;\n    }\n  }\n\n  pPager->journalHdr = pPager->journalOff = journalHdrOffset(pPager);\n\n  /*\n  ** Write the nRec Field - the number of page records that follow this\n  ** journal header. Normally, zero is written to this value at this time.\n  ** After the records are added to the journal (and the journal synced,\n  ** if in full-sync mode), the zero is overwritten with the true number\n  ** of records (see syncJournal()).\n  **\n  ** A faster alternative is to write 0xFFFFFFFF to the nRec field. When\n  ** reading the journal this value tells SQLite to assume that the\n  ** rest of the journal file contains valid page records. This assumption\n  ** is dangerous, as if a failure occurred whilst writing to the journal\n  ** file it may contain some garbage data. There are two scenarios\n  ** where this risk can be ignored:\n  **\n  **   * When the pager is in no-sync mode. Corruption can follow a\n  **     power failure in this case anyway.\n  **\n  **   * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees\n  **     that garbage data is never appended to the journal file.\n  */\n  assert( isOpen(pPager->fd) || pPager->noSync );\n  if( pPager->noSync || (pPager->journalMode==PAGER_JOURNALMODE_MEMORY)\n   || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_SAFE_APPEND)\n  ){\n    memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));\n    put32bits(&zHeader[sizeof(aJournalMagic)], 0xffffffff);\n  }else{\n    memset(zHeader, 0, sizeof(aJournalMagic)+4);\n  }\n\n\n\n  /* The random check-hash initializer */\n  if( pPager->journalMode!=PAGER_JOURNALMODE_MEMORY ){\n    sqlite3_randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);\n  }\n#ifdef SQLITE_DEBUG\n  else{\n    /* The Pager.cksumInit variable is usually randomized above to protect\n    ** against there being existing records in the journal file. This is\n    ** dangerous, as following a crash they may be mistaken for records\n    ** written by the current transaction and rolled back into the database\n    ** file, causing corruption. The following assert statements verify\n    ** that this is not required in \"journal_mode=memory\" mode, as in that\n    ** case the journal file is always 0 bytes in size at this point.\n    ** It is advantageous to avoid the sqlite3_randomness() call if possible\n    ** as it takes the global PRNG mutex.  */\n    i64 sz = 0;\n    sqlite3OsFileSize(pPager->jfd, &sz);\n    assert( sz==0 );\n    assert( pPager->journalOff==journalHdrOffset(pPager) );\n    assert( sqlite3JournalIsInMemory(pPager->jfd) );\n  }\n#endif\n  put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);\n\n  /* The initial database size */\n  put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbOrigSize);\n  /* The assumed sector size for this process */\n  put32bits(&zHeader[sizeof(aJournalMagic)+12], pPager->sectorSize);\n\n  /* The page size */\n  put32bits(&zHeader[sizeof(aJournalMagic)+16], pPager->pageSize);\n\n  /* Initializing the tail of the buffer is not necessary.  Everything\n  ** works find if the following memset() is omitted.  But initializing\n  ** the memory prevents valgrind from complaining, so we are willing to\n  ** take the performance hit.\n  */\n  memset(&zHeader[sizeof(aJournalMagic)+20], 0,\n         nHeader-(sizeof(aJournalMagic)+20));\n\n  /* In theory, it is only necessary to write the 28 bytes that the\n  ** journal header consumes to the journal file here. Then increment the\n  ** Pager.journalOff variable by JOURNAL_HDR_SZ so that the next\n  ** record is written to the following sector (leaving a gap in the file\n  ** that will be implicitly filled in by the OS).\n  **\n  ** However it has been discovered that on some systems this pattern can\n  ** be significantly slower than contiguously writing data to the file,\n  ** even if that means explicitly writing data to the block of\n  ** (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what\n  ** is done.\n  **\n  ** The loop is required here in case the sector-size is larger than the\n  ** database page size. Since the zHeader buffer is only Pager.pageSize\n  ** bytes in size, more than one call to sqlite3OsWrite() may be required\n  ** to populate the entire journal header sector.\n  */\n  for(nWrite=0; rc==SQLITE_OK&&nWrite<JOURNAL_HDR_SZ(pPager); nWrite+=nHeader){\n    IOTRACE((\"JHDR %p %lld %d\\n\", pPager, pPager->journalHdr, nHeader))\n    rc = sqlite3OsWrite(pPager->jfd, zHeader, nHeader, pPager->journalOff);\n    assert( pPager->journalHdr <= pPager->journalOff );\n    pPager->journalOff += nHeader;\n  }\n\n  return rc;\n}\n\n/*\n** The journal file must be open when this is called. A journal header file\n** (JOURNAL_HDR_SZ bytes) is read from the current location in the journal\n** file. The current location in the journal file is given by\n** pPager->journalOff. See comments above function writeJournalHdr() for\n** a description of the journal header format.\n**\n** If the header is read successfully, *pNRec is set to the number of\n** page records following this header and *pDbSize is set to the size of the\n** database before the transaction began, in pages. Also, pPager->cksumInit\n** is set to the value read from the journal header. SQLITE_OK is returned\n** in this case.\n**\n** If the journal header file appears to be corrupted, SQLITE_DONE is\n** returned and *pNRec and *PDbSize are undefined.  If JOURNAL_HDR_SZ bytes\n** cannot be read from the journal file an error code is returned.\n*/\nstatic int readJournalHdr(\n  Pager *pPager,               /* Pager object */\n  int isHot,\n  i64 journalSize,             /* Size of the open journal file in bytes */\n  u32 *pNRec,                  /* OUT: Value read from the nRec field */\n  u32 *pDbSize                 /* OUT: Value of original database size field */\n){\n  int rc;                      /* Return code */\n  unsigned char aMagic[8];     /* A buffer to hold the magic header */\n  i64 iHdrOff;                 /* Offset of journal header being read */\n\n  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */\n\n  /* Advance Pager.journalOff to the start of the next sector. If the\n  ** journal file is too small for there to be a header stored at this\n  ** point, return SQLITE_DONE.\n  */\n  pPager->journalOff = journalHdrOffset(pPager);\n  if( pPager->journalOff+JOURNAL_HDR_SZ(pPager) > journalSize ){\n    return SQLITE_DONE;\n  }\n  iHdrOff = pPager->journalOff;\n\n  /* Read in the first 8 bytes of the journal header. If they do not match\n  ** the  magic string found at the start of each journal header, return\n  ** SQLITE_DONE. If an IO error occurs, return an error code. Otherwise,\n  ** proceed.\n  */\n  if( isHot || iHdrOff!=pPager->journalHdr ){\n    rc = sqlite3OsRead(pPager->jfd, aMagic, sizeof(aMagic), iHdrOff);\n    if( rc ){\n      return rc;\n    }\n    if( memcmp(aMagic, aJournalMagic, sizeof(aMagic))!=0 ){\n      return SQLITE_DONE;\n    }\n  }\n\n  /* Read the first three 32-bit fields of the journal header: The nRec\n  ** field, the checksum-initializer and the database size at the start\n  ** of the transaction. Return an error code if anything goes wrong.\n  */\n  if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+8, pNRec))\n   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+12, &pPager->cksumInit))\n   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+16, pDbSize))\n  ){\n    return rc;\n  }\n\n  if( pPager->journalOff==0 ){\n    u32 iPageSize;               /* Page-size field of journal header */\n    u32 iSectorSize;             /* Sector-size field of journal header */\n\n    /* Read the page-size and sector-size journal header fields. */\n    if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+20, &iSectorSize))\n     || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+24, &iPageSize))\n    ){\n      return rc;\n    }\n\n    /* Versions of SQLite prior to 3.5.8 set the page-size field of the\n    ** journal header to zero. In this case, assume that the Pager.pageSize\n    ** variable is already set to the correct page size.\n    */\n    if( iPageSize==0 ){\n      iPageSize = pPager->pageSize;\n    }\n\n    /* Check that the values read from the page-size and sector-size fields\n    ** are within range. To be 'in range', both values need to be a power\n    ** of two greater than or equal to 512 or 32, and not greater than their\n    ** respective compile time maximum limits.\n    */\n    if( iPageSize<512                  || iSectorSize<32\n     || iPageSize>SQLITE_MAX_PAGE_SIZE || iSectorSize>MAX_SECTOR_SIZE\n     || ((iPageSize-1)&iPageSize)!=0   || ((iSectorSize-1)&iSectorSize)!=0\n    ){\n      /* If the either the page-size or sector-size in the journal-header is\n      ** invalid, then the process that wrote the journal-header must have\n      ** crashed before the header was synced. In this case stop reading\n      ** the journal file here.\n      */\n      return SQLITE_DONE;\n    }\n\n    /* Update the page-size to match the value read from the journal.\n    ** Use a testcase() macro to make sure that malloc failure within\n    ** PagerSetPagesize() is tested.\n    */\n    rc = sqlite3PagerSetPagesize(pPager, &iPageSize, -1);\n    testcase( rc!=SQLITE_OK );\n\n    /* Update the assumed sector-size to match the value used by\n    ** the process that created this journal. If this journal was\n    ** created by a process other than this one, then this routine\n    ** is being called from within pager_playback(). The local value\n    ** of Pager.sectorSize is restored at the end of that routine.\n    */\n    pPager->sectorSize = iSectorSize;\n  }\n\n  pPager->journalOff += JOURNAL_HDR_SZ(pPager);\n  return rc;\n}\n\n\n/*\n** Write the supplied super-journal name into the journal file for pager\n** pPager at the current location. The super-journal name must be the last\n** thing written to a journal file. If the pager is in full-sync mode, the\n** journal file descriptor is advanced to the next sector boundary before\n** anything is written. The format is:\n**\n**   + 4 bytes: PAGER_SJ_PGNO.\n**   + N bytes: super-journal filename in utf-8.\n**   + 4 bytes: N (length of super-journal name in bytes, no nul-terminator).\n**   + 4 bytes: super-journal name checksum.\n**   + 8 bytes: aJournalMagic[].\n**\n** The super-journal page checksum is the sum of the bytes in the super-journal\n** name, where each byte is interpreted as a signed 8-bit integer.\n**\n** If zSuper is a NULL pointer (occurs for a single database transaction),\n** this call is a no-op.\n*/\nstatic int writeSuperJournal(Pager *pPager, const char *zSuper){\n  int rc;                          /* Return code */\n  int nSuper;                      /* Length of string zSuper */\n  i64 iHdrOff;                     /* Offset of header in journal file */\n  i64 jrnlSize;                    /* Size of journal file on disk */\n  u32 cksum = 0;                   /* Checksum of string zSuper */\n\n  assert( pPager->setSuper==0 );\n  assert( !pagerUseWal(pPager) );\n\n  if( !zSuper\n   || pPager->journalMode==PAGER_JOURNALMODE_MEMORY\n   || !isOpen(pPager->jfd)\n  ){\n    return SQLITE_OK;\n  }\n  pPager->setSuper = 1;\n  assert( pPager->journalHdr <= pPager->journalOff );\n\n  /* Calculate the length in bytes and the checksum of zSuper */\n  for(nSuper=0; zSuper[nSuper]; nSuper++){\n    cksum += zSuper[nSuper];\n  }\n\n  /* If in full-sync mode, advance to the next disk sector before writing\n  ** the super-journal name. This is in case the previous page written to\n  ** the journal has already been synced.\n  */\n  if( pPager->fullSync ){\n    pPager->journalOff = journalHdrOffset(pPager);\n  }\n  iHdrOff = pPager->journalOff;\n\n  /* Write the super-journal data to the end of the journal file. If\n  ** an error occurs, return the error code to the caller.\n  */\n  if( (0 != (rc = write32bits(pPager->jfd, iHdrOff, PAGER_SJ_PGNO(pPager))))\n   || (0 != (rc = sqlite3OsWrite(pPager->jfd, zSuper, nSuper, iHdrOff+4)))\n   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nSuper, nSuper)))\n   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nSuper+4, cksum)))\n   || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8,\n                                 iHdrOff+4+nSuper+8)))\n  ){\n    return rc;\n  }\n  pPager->journalOff += (nSuper+20);\n\n  /* If the pager is in persistent-journal mode, then the physical\n  ** journal-file may extend past the end of the super-journal name\n  ** and 8 bytes of magic data just written to the file. This is\n  ** dangerous because the code to rollback a hot-journal file\n  ** will not be able to find the super-journal name to determine\n  ** whether or not the journal is hot.\n  **\n  ** Easiest thing to do in this scenario is to truncate the journal\n  ** file to the required size.\n  */\n  if( SQLITE_OK==(rc = sqlite3OsFileSize(pPager->jfd, &jrnlSize))\n   && jrnlSize>pPager->journalOff\n  ){\n    rc = sqlite3OsTruncate(pPager->jfd, pPager->journalOff);\n  }\n  return rc;\n}\n\n/*\n** Discard the entire contents of the in-memory page-cache.\n*/\nstatic void pager_reset(Pager *pPager){\n  pPager->iDataVersion++;\n  sqlite3BackupRestart(pPager->pBackup);\n  sqlite3PcacheClear(pPager->pPCache);\n}\n\n/*\n** Return the pPager->iDataVersion value\n*/\nSQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager *pPager){\n  return pPager->iDataVersion;\n}\n\n/*\n** Free all structures in the Pager.aSavepoint[] array and set both\n** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal\n** if it is open and the pager is not in exclusive mode.\n*/\nstatic void releaseAllSavepoints(Pager *pPager){\n  int ii;               /* Iterator for looping through Pager.aSavepoint */\n  for(ii=0; ii<pPager->nSavepoint; ii++){\n    sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);\n  }\n  if( !pPager->exclusiveMode || sqlite3JournalIsInMemory(pPager->sjfd) ){\n    sqlite3OsClose(pPager->sjfd);\n  }\n  sqlite3_free(pPager->aSavepoint);\n  pPager->aSavepoint = 0;\n  pPager->nSavepoint = 0;\n  pPager->nSubRec = 0;\n}\n\n/*\n** Set the bit number pgno in the PagerSavepoint.pInSavepoint\n** bitvecs of all open savepoints. Return SQLITE_OK if successful\n** or SQLITE_NOMEM if a malloc failure occurs.\n*/\nstatic int addToSavepointBitvecs(Pager *pPager, Pgno pgno){\n  int ii;                   /* Loop counter */\n  int rc = SQLITE_OK;       /* Result code */\n\n  for(ii=0; ii<pPager->nSavepoint; ii++){\n    PagerSavepoint *p = &pPager->aSavepoint[ii];\n    if( pgno<=p->nOrig ){\n      rc |= sqlite3BitvecSet(p->pInSavepoint, pgno);\n      testcase( rc==SQLITE_NOMEM );\n      assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );\n    }\n  }\n  return rc;\n}\n\n/*\n** This function is a no-op if the pager is in exclusive mode and not\n** in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN\n** state.\n**\n** If the pager is not in exclusive-access mode, the database file is\n** completely unlocked. If the file is unlocked and the file-system does\n** not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is\n** closed (if it is open).\n**\n** If the pager is in ERROR state when this function is called, the\n** contents of the pager cache are discarded before switching back to\n** the OPEN state. Regardless of whether the pager is in exclusive-mode\n** or not, any journal file left in the file-system will be treated\n** as a hot-journal and rolled back the next time a read-transaction\n** is opened (by this or by any other connection).\n*/\nstatic void pager_unlock(Pager *pPager){\n\n  assert( pPager->eState==PAGER_READER\n       || pPager->eState==PAGER_OPEN\n       || pPager->eState==PAGER_ERROR\n  );\n\n  sqlite3BitvecDestroy(pPager->pInJournal);\n  pPager->pInJournal = 0;\n  releaseAllSavepoints(pPager);\n\n  if( pagerUseWal(pPager) ){\n    assert( !isOpen(pPager->jfd) );\n    if( pPager->eState==PAGER_ERROR ){\n      /* If an IO error occurs in wal.c while attempting to wrap the wal file,\n      ** then the Wal object may be holding a write-lock but no read-lock.\n      ** This call ensures that the write-lock is dropped as well. We cannot\n      ** have sqlite3WalEndReadTransaction() drop the write-lock, as it once\n      ** did, because this would break \"BEGIN EXCLUSIVE\" handling for\n      ** SQLITE_ENABLE_SETLK_TIMEOUT builds.  */\n      (void)sqlite3WalEndWriteTransaction(pPager->pWal);\n    }\n    sqlite3WalEndReadTransaction(pPager->pWal);\n    pPager->eState = PAGER_OPEN;\n  }else if( !pPager->exclusiveMode ){\n    int rc;                       /* Error code returned by pagerUnlockDb() */\n    int iDc = isOpen(pPager->fd)?sqlite3OsDeviceCharacteristics(pPager->fd):0;\n\n    /* If the operating system support deletion of open files, then\n    ** close the journal file when dropping the database lock.  Otherwise\n    ** another connection with journal_mode=delete might delete the file\n    ** out from under us.\n    */\n    assert( (PAGER_JOURNALMODE_MEMORY   & 5)!=1 );\n    assert( (PAGER_JOURNALMODE_OFF      & 5)!=1 );\n    assert( (PAGER_JOURNALMODE_WAL      & 5)!=1 );\n    assert( (PAGER_JOURNALMODE_DELETE   & 5)!=1 );\n    assert( (PAGER_JOURNALMODE_TRUNCATE & 5)==1 );\n    assert( (PAGER_JOURNALMODE_PERSIST  & 5)==1 );\n    if( 0==(iDc & SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN)\n     || 1!=(pPager->journalMode & 5)\n    ){\n      sqlite3OsClose(pPager->jfd);\n    }\n\n    /* If the pager is in the ERROR state and the call to unlock the database\n    ** file fails, set the current lock to UNKNOWN_LOCK. See the comment\n    ** above the #define for UNKNOWN_LOCK for an explanation of why this\n    ** is necessary.\n    */\n    rc = pagerUnlockDb(pPager, NO_LOCK);\n    if( rc!=SQLITE_OK && pPager->eState==PAGER_ERROR ){\n      pPager->eLock = UNKNOWN_LOCK;\n    }\n\n    /* The pager state may be changed from PAGER_ERROR to PAGER_OPEN here\n    ** without clearing the error code. This is intentional - the error\n    ** code is cleared and the cache reset in the block below.\n    */\n    assert( pPager->errCode || pPager->eState!=PAGER_ERROR );\n    pPager->eState = PAGER_OPEN;\n  }\n\n  /* If Pager.errCode is set, the contents of the pager cache cannot be\n  ** trusted. Now that there are no outstanding references to the pager,\n  ** it can safely move back to PAGER_OPEN state. This happens in both\n  ** normal and exclusive-locking mode.\n  */\n  assert( pPager->errCode==SQLITE_OK || !MEMDB );\n  if( pPager->errCode ){\n    if( pPager->tempFile==0 ){\n      pager_reset(pPager);\n      pPager->changeCountDone = 0;\n      pPager->eState = PAGER_OPEN;\n    }else{\n      pPager->eState = (isOpen(pPager->jfd) ? PAGER_OPEN : PAGER_READER);\n    }\n    if( USEFETCH(pPager) ) sqlite3OsUnfetch(pPager->fd, 0, 0);\n    pPager->errCode = SQLITE_OK;\n    setGetterMethod(pPager);\n  }\n\n  pPager->journalOff = 0;\n  pPager->journalHdr = 0;\n  pPager->setSuper = 0;\n}\n\n/*\n** This function is called whenever an IOERR or FULL error that requires\n** the pager to transition into the ERROR state may have occurred.\n** The first argument is a pointer to the pager structure, the second\n** the error-code about to be returned by a pager API function. The\n** value returned is a copy of the second argument to this function.\n**\n** If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the\n** IOERR sub-codes, the pager enters the ERROR state and the error code\n** is stored in Pager.errCode. While the pager remains in the ERROR state,\n** all major API calls on the Pager will immediately return Pager.errCode.\n**\n** The ERROR state indicates that the contents of the pager-cache\n** cannot be trusted. This state can be cleared by completely discarding\n** the contents of the pager-cache. If a transaction was active when\n** the persistent error occurred, then the rollback journal may need\n** to be replayed to restore the contents of the database file (as if\n** it were a hot-journal).\n*/\nstatic int pager_error(Pager *pPager, int rc){\n  int rc2 = rc & 0xff;\n  assert( rc==SQLITE_OK || !MEMDB );\n  assert(\n       pPager->errCode==SQLITE_FULL ||\n       pPager->errCode==SQLITE_OK ||\n       (pPager->errCode & 0xff)==SQLITE_IOERR\n  );\n  if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){\n    pPager->errCode = rc;\n    pPager->eState = PAGER_ERROR;\n    setGetterMethod(pPager);\n  }\n  return rc;\n}\n\nstatic int pager_truncate(Pager *pPager, Pgno nPage);\n\n/*\n** The write transaction open on pPager is being committed (bCommit==1)\n** or rolled back (bCommit==0).\n**\n** Return TRUE if and only if all dirty pages should be flushed to disk.\n**\n** Rules:\n**\n**   *  For non-TEMP databases, always sync to disk.  This is necessary\n**      for transactions to be durable.\n**\n**   *  Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing\n**      file has been created already (via a spill on pagerStress()) and\n**      when the number of dirty pages in memory exceeds 25% of the total\n**      cache size.\n*/\nstatic int pagerFlushOnCommit(Pager *pPager, int bCommit){\n  if( pPager->tempFile==0 ) return 1;\n  if( !bCommit ) return 0;\n  if( !isOpen(pPager->fd) ) return 0;\n  return (sqlite3PCachePercentDirty(pPager->pPCache)>=25);\n}\n\n/*\n** This routine ends a transaction. A transaction is usually ended by\n** either a COMMIT or a ROLLBACK operation. This routine may be called\n** after rollback of a hot-journal, or if an error occurs while opening\n** the journal file or writing the very first journal-header of a\n** database transaction.\n**\n** This routine is never called in PAGER_ERROR state. If it is called\n** in PAGER_NONE or PAGER_SHARED state and the lock held is less\n** exclusive than a RESERVED lock, it is a no-op.\n**\n** Otherwise, any active savepoints are released.\n**\n** If the journal file is open, then it is \"finalized\". Once a journal\n** file has been finalized it is not possible to use it to roll back a\n** transaction. Nor will it be considered to be a hot-journal by this\n** or any other database connection. Exactly how a journal is finalized\n** depends on whether or not the pager is running in exclusive mode and\n** the current journal-mode (Pager.journalMode value), as follows:\n**\n**   journalMode==MEMORY\n**     Journal file descriptor is simply closed. This destroys an\n**     in-memory journal.\n**\n**   journalMode==TRUNCATE\n**     Journal file is truncated to zero bytes in size.\n**\n**   journalMode==PERSIST\n**     The first 28 bytes of the journal file are zeroed. This invalidates\n**     the first journal header in the file, and hence the entire journal\n**     file. An invalid journal file cannot be rolled back.\n**\n**   journalMode==DELETE\n**     The journal file is closed and deleted using sqlite3OsDelete().\n**\n**     If the pager is running in exclusive mode, this method of finalizing\n**     the journal file is never used. Instead, if the journalMode is\n**     DELETE and the pager is in exclusive mode, the method described under\n**     journalMode==PERSIST is used instead.\n**\n** After the journal is finalized, the pager moves to PAGER_READER state.\n** If running in non-exclusive rollback mode, the lock on the file is\n** downgraded to a SHARED_LOCK.\n**\n** SQLITE_OK is returned if no error occurs. If an error occurs during\n** any of the IO operations to finalize the journal file or unlock the\n** database then the IO error code is returned to the user. If the\n** operation to finalize the journal file fails, then the code still\n** tries to unlock the database file if not in exclusive mode. If the\n** unlock operation fails as well, then the first error code related\n** to the first error encountered (the journal finalization one) is\n** returned.\n*/\nstatic int pager_end_transaction(Pager *pPager, int hasSuper, int bCommit){\n  int rc = SQLITE_OK;      /* Error code from journal finalization operation */\n  int rc2 = SQLITE_OK;     /* Error code from db file unlock operation */\n\n  /* Do nothing if the pager does not have an open write transaction\n  ** or at least a RESERVED lock. This function may be called when there\n  ** is no write-transaction active but a RESERVED or greater lock is\n  ** held under two circumstances:\n  **\n  **   1. After a successful hot-journal rollback, it is called with\n  **      eState==PAGER_NONE and eLock==EXCLUSIVE_LOCK.\n  **\n  **   2. If a connection with locking_mode=exclusive holding an EXCLUSIVE\n  **      lock switches back to locking_mode=normal and then executes a\n  **      read-transaction, this function is called with eState==PAGER_READER\n  **      and eLock==EXCLUSIVE_LOCK when the read-transaction is closed.\n  */\n  assert( assert_pager_state(pPager) );\n  assert( pPager->eState!=PAGER_ERROR );\n  if( pPager->eState<PAGER_WRITER_LOCKED && pPager->eLock<RESERVED_LOCK ){\n    return SQLITE_OK;\n  }\n\n  releaseAllSavepoints(pPager);\n  assert( isOpen(pPager->jfd) || pPager->pInJournal==0\n      || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_BATCH_ATOMIC)\n  );\n  if( isOpen(pPager->jfd) ){\n    assert( !pagerUseWal(pPager) );\n\n    /* Finalize the journal file. */\n    if( sqlite3JournalIsInMemory(pPager->jfd) ){\n      /* assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ); */\n      sqlite3OsClose(pPager->jfd);\n    }else if( pPager->journalMode==PAGER_JOURNALMODE_TRUNCATE ){\n      if( pPager->journalOff==0 ){\n        rc = SQLITE_OK;\n      }else{\n        rc = sqlite3OsTruncate(pPager->jfd, 0);\n        if( rc==SQLITE_OK && pPager->fullSync ){\n          /* Make sure the new file size is written into the inode right away.\n          ** Otherwise the journal might resurrect following a power loss and\n          ** cause the last transaction to roll back.  See\n          ** https://bugzilla.mozilla.org/show_bug.cgi?id=1072773\n          */\n          rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);\n        }\n      }\n      pPager->journalOff = 0;\n    }else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST\n      || (pPager->exclusiveMode && pPager->journalMode<PAGER_JOURNALMODE_WAL)\n    ){\n      rc = zeroJournalHdr(pPager, hasSuper||pPager->tempFile);\n      pPager->journalOff = 0;\n    }else{\n      /* This branch may be executed with Pager.journalMode==MEMORY if\n      ** a hot-journal was just rolled back. In this case the journal\n      ** file should be closed and deleted. If this connection writes to\n      ** the database file, it will do so using an in-memory journal.\n      */\n      int bDelete = !pPager->tempFile;\n      assert( sqlite3JournalIsInMemory(pPager->jfd)==0 );\n      assert( pPager->journalMode==PAGER_JOURNALMODE_DELETE\n           || pPager->journalMode==PAGER_JOURNALMODE_MEMORY\n           || pPager->journalMode==PAGER_JOURNALMODE_WAL\n      );\n      sqlite3OsClose(pPager->jfd);\n      if( bDelete ){\n        rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, pPager->extraSync);\n      }\n    }\n  }\n\n#ifdef SQLITE_CHECK_PAGES\n  sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);\n  if( pPager->dbSize==0 && sqlite3PcacheRefCount(pPager->pPCache)>0 ){\n    PgHdr *p = sqlite3PagerLookup(pPager, 1);\n    if( p ){\n      p->pageHash = 0;\n      sqlite3PagerUnrefNotNull(p);\n    }\n  }\n#endif\n\n  sqlite3BitvecDestroy(pPager->pInJournal);\n  pPager->pInJournal = 0;\n  pPager->nRec = 0;\n  if( rc==SQLITE_OK ){\n    if( MEMDB || pagerFlushOnCommit(pPager, bCommit) ){\n      sqlite3PcacheCleanAll(pPager->pPCache);\n    }else{\n      sqlite3PcacheClearWritable(pPager->pPCache);\n    }\n    sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);\n  }\n\n  if( pagerUseWal(pPager) ){\n    /* Drop the WAL write-lock, if any. Also, if the connection was in\n    ** locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE\n    ** lock held on the database file.\n    */\n    rc2 = sqlite3WalEndWriteTransaction(pPager->pWal);\n    assert( rc2==SQLITE_OK );\n  }else if( rc==SQLITE_OK && bCommit && pPager->dbFileSize>pPager->dbSize ){\n    /* This branch is taken when committing a transaction in rollback-journal\n    ** mode if the database file on disk is larger than the database image.\n    ** At this point the journal has been finalized and the transaction\n    ** successfully committed, but the EXCLUSIVE lock is still held on the\n    ** file. So it is safe to truncate the database file to its minimum\n    ** required size.  */\n    assert( pPager->eLock==EXCLUSIVE_LOCK );\n    rc = pager_truncate(pPager, pPager->dbSize);\n  }\n\n  if( rc==SQLITE_OK && bCommit ){\n    rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_COMMIT_PHASETWO, 0);\n    if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;\n  }\n\n  if( !pPager->exclusiveMode\n   && (!pagerUseWal(pPager) || sqlite3WalExclusiveMode(pPager->pWal, 0))\n  ){\n    rc2 = pagerUnlockDb(pPager, SHARED_LOCK);\n  }\n  pPager->eState = PAGER_READER;\n  pPager->setSuper = 0;\n\n  return (rc==SQLITE_OK?rc2:rc);\n}\n\n/* Forward reference */\nstatic int pager_playback(Pager *pPager, int isHot);\n\n/*\n** Execute a rollback if a transaction is active and unlock the\n** database file.\n**\n** If the pager has already entered the ERROR state, do not attempt\n** the rollback at this time. Instead, pager_unlock() is called. The\n** call to pager_unlock() will discard all in-memory pages, unlock\n** the database file and move the pager back to OPEN state. If this\n** means that there is a hot-journal left in the file-system, the next\n** connection to obtain a shared lock on the pager (which may be this one)\n** will roll it back.\n**\n** If the pager has not already entered the ERROR state, but an IO or\n** malloc error occurs during a rollback, then this will itself cause\n** the pager to enter the ERROR state. Which will be cleared by the\n** call to pager_unlock(), as described above.\n*/\nstatic void pagerUnlockAndRollback(Pager *pPager){\n  if( pPager->eState!=PAGER_ERROR && pPager->eState!=PAGER_OPEN ){\n    assert( assert_pager_state(pPager) );\n    if( pPager->eState>=PAGER_WRITER_LOCKED ){\n      sqlite3BeginBenignMalloc();\n      sqlite3PagerRollback(pPager);\n      sqlite3EndBenignMalloc();\n    }else if( !pPager->exclusiveMode ){\n      assert( pPager->eState==PAGER_READER );\n      pager_end_transaction(pPager, 0, 0);\n    }\n  }else if( pPager->eState==PAGER_ERROR\n         && pPager->journalMode==PAGER_JOURNALMODE_MEMORY\n         && isOpen(pPager->jfd)\n  ){\n    /* Special case for a ROLLBACK due to I/O error with an in-memory\n    ** journal:  We have to rollback immediately, before the journal is\n    ** closed, because once it is closed, all content is forgotten. */\n    int errCode = pPager->errCode;\n    u8 eLock = pPager->eLock;\n    pPager->eState = PAGER_OPEN;\n    pPager->errCode = SQLITE_OK;\n    pPager->eLock = EXCLUSIVE_LOCK;\n    pager_playback(pPager, 1);\n    pPager->errCode = errCode;\n    pPager->eLock = eLock;\n  }\n  pager_unlock(pPager);\n}\n\n/*\n** Parameter aData must point to a buffer of pPager->pageSize bytes\n** of data. Compute and return a checksum based on the contents of the\n** page of data and the current value of pPager->cksumInit.\n**\n** This is not a real checksum. It is really just the sum of the\n** random initial value (pPager->cksumInit) and every 200th byte\n** of the page data, starting with byte offset (pPager->pageSize%200).\n** Each byte is interpreted as an 8-bit unsigned integer.\n**\n** Changing the formula used to compute this checksum results in an\n** incompatible journal file format.\n**\n** If journal corruption occurs due to a power failure, the most likely\n** scenario is that one end or the other of the record will be changed.\n** It is much less likely that the two ends of the journal record will be\n** correct and the middle be corrupt.  Thus, this \"checksum\" scheme,\n** though fast and simple, catches the mostly likely kind of corruption.\n*/\nstatic u32 pager_cksum(Pager *pPager, const u8 *aData){\n  u32 cksum = pPager->cksumInit;         /* Checksum value to return */\n  int i = pPager->pageSize-200;          /* Loop counter */\n  while( i>0 ){\n    cksum += aData[i];\n    i -= 200;\n  }\n  return cksum;\n}\n\n/*\n** Read a single page from either the journal file (if isMainJrnl==1) or\n** from the sub-journal (if isMainJrnl==0) and playback that page.\n** The page begins at offset *pOffset into the file. The *pOffset\n** value is increased to the start of the next page in the journal.\n**\n** The main rollback journal uses checksums - the statement journal does\n** not.\n**\n** If the page number of the page record read from the (sub-)journal file\n** is greater than the current value of Pager.dbSize, then playback is\n** skipped and SQLITE_OK is returned.\n**\n** If pDone is not NULL, then it is a record of pages that have already\n** been played back.  If the page at *pOffset has already been played back\n** (if the corresponding pDone bit is set) then skip the playback.\n** Make sure the pDone bit corresponding to the *pOffset page is set\n** prior to returning.\n**\n** If the page record is successfully read from the (sub-)journal file\n** and played back, then SQLITE_OK is returned. If an IO error occurs\n** while reading the record from the (sub-)journal file or while writing\n** to the database file, then the IO error code is returned. If data\n** is successfully read from the (sub-)journal file but appears to be\n** corrupted, SQLITE_DONE is returned. Data is considered corrupted in\n** two circumstances:\n**\n**   * If the record page-number is illegal (0 or PAGER_SJ_PGNO), or\n**   * If the record is being rolled back from the main journal file\n**     and the checksum field does not match the record content.\n**\n** Neither of these two scenarios are possible during a savepoint rollback.\n**\n** If this is a savepoint rollback, then memory may have to be dynamically\n** allocated by this function. If this is the case and an allocation fails,\n** SQLITE_NOMEM is returned.\n*/\nstatic int pager_playback_one_page(\n  Pager *pPager,                /* The pager being played back */\n  i64 *pOffset,                 /* Offset of record to playback */\n  Bitvec *pDone,                /* Bitvec of pages already played back */\n  int isMainJrnl,               /* 1 -> main journal. 0 -> sub-journal. */\n  int isSavepnt                 /* True for a savepoint rollback */\n){\n  int rc;\n  PgHdr *pPg;                   /* An existing page in the cache */\n  Pgno pgno;                    /* The page number of a page in journal */\n  u32 cksum;                    /* Checksum used for sanity checking */\n  char *aData;                  /* Temporary storage for the page */\n  sqlite3_file *jfd;            /* The file descriptor for the journal file */\n  int isSynced;                 /* True if journal page is synced */\n\n  assert( (isMainJrnl&~1)==0 );      /* isMainJrnl is 0 or 1 */\n  assert( (isSavepnt&~1)==0 );       /* isSavepnt is 0 or 1 */\n  assert( isMainJrnl || pDone );     /* pDone always used on sub-journals */\n  assert( isSavepnt || pDone==0 );   /* pDone never used on non-savepoint */\n\n  aData = pPager->pTmpSpace;\n  assert( aData );         /* Temp storage must have already been allocated */\n  assert( pagerUseWal(pPager)==0 || (!isMainJrnl && isSavepnt) );\n\n  /* Either the state is greater than PAGER_WRITER_CACHEMOD (a transaction\n  ** or savepoint rollback done at the request of the caller) or this is\n  ** a hot-journal rollback. If it is a hot-journal rollback, the pager\n  ** is in state OPEN and holds an EXCLUSIVE lock. Hot-journal rollback\n  ** only reads from the main journal, not the sub-journal.\n  */\n  assert( pPager->eState>=PAGER_WRITER_CACHEMOD\n       || (pPager->eState==PAGER_OPEN && pPager->eLock==EXCLUSIVE_LOCK)\n  );\n  assert( pPager->eState>=PAGER_WRITER_CACHEMOD || isMainJrnl );\n\n  /* Read the page number and page data from the journal or sub-journal\n  ** file. Return an error code to the caller if an IO error occurs.\n  */\n  jfd = isMainJrnl ? pPager->jfd : pPager->sjfd;\n  rc = read32bits(jfd, *pOffset, &pgno);\n  if( rc!=SQLITE_OK ) return rc;\n  rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);\n  if( rc!=SQLITE_OK ) return rc;\n  *pOffset += pPager->pageSize + 4 + isMainJrnl*4;\n\n  /* Sanity checking on the page.  This is more important that I originally\n  ** thought.  If a power failure occurs while the journal is being written,\n  ** it could cause invalid data to be written into the journal.  We need to\n  ** detect this invalid data (with high probability) and ignore it.\n  */\n  if( pgno==0 || pgno==PAGER_SJ_PGNO(pPager) ){\n    assert( !isSavepnt );\n    return SQLITE_DONE;\n  }\n  if( pgno>(Pgno)pPager->dbSize || sqlite3BitvecTest(pDone, pgno) ){\n    return SQLITE_OK;\n  }\n  if( isMainJrnl ){\n    rc = read32bits(jfd, (*pOffset)-4, &cksum);\n    if( rc ) return rc;\n    if( !isSavepnt && pager_cksum(pPager, (u8*)aData)!=cksum ){\n      return SQLITE_DONE;\n    }\n  }\n\n  /* If this page has already been played back before during the current\n  ** rollback, then don't bother to play it back again.\n  */\n  if( pDone && (rc = sqlite3BitvecSet(pDone, pgno))!=SQLITE_OK ){\n    return rc;\n  }\n\n  /* When playing back page 1, restore the nReserve setting\n  */\n  if( pgno==1 && pPager->nReserve!=((u8*)aData)[20] ){\n    pPager->nReserve = ((u8*)aData)[20];\n  }\n\n  /* If the pager is in CACHEMOD state, then there must be a copy of this\n  ** page in the pager cache. In this case just update the pager cache,\n  ** not the database file. The page is left marked dirty in this case.\n  **\n  ** An exception to the above rule: If the database is in no-sync mode\n  ** and a page is moved during an incremental vacuum then the page may\n  ** not be in the pager cache. Later: if a malloc() or IO error occurs\n  ** during a Movepage() call, then the page may not be in the cache\n  ** either. So the condition described in the above paragraph is not\n  ** assert()able.\n  **\n  ** If in WRITER_DBMOD, WRITER_FINISHED or OPEN state, then we update the\n  ** pager cache if it exists and the main file. The page is then marked\n  ** not dirty. Since this code is only executed in PAGER_OPEN state for\n  ** a hot-journal rollback, it is guaranteed that the page-cache is empty\n  ** if the pager is in OPEN state.\n  **\n  ** Ticket #1171:  The statement journal might contain page content that is\n  ** different from the page content at the start of the transaction.\n  ** This occurs when a page is changed prior to the start of a statement\n  ** then changed again within the statement.  When rolling back such a\n  ** statement we must not write to the original database unless we know\n  ** for certain that original page contents are synced into the main rollback\n  ** journal.  Otherwise, a power loss might leave modified data in the\n  ** database file without an entry in the rollback journal that can\n  ** restore the database to its original form.  Two conditions must be\n  ** met before writing to the database files. (1) the database must be\n  ** locked.  (2) we know that the original page content is fully synced\n  ** in the main journal either because the page is not in cache or else\n  ** the page is marked as needSync==0.\n  **\n  ** 2008-04-14:  When attempting to vacuum a corrupt database file, it\n  ** is possible to fail a statement on a database that does not yet exist.\n  ** Do not attempt to write if database file has never been opened.\n  */\n  if( pagerUseWal(pPager) ){\n    pPg = 0;\n  }else{\n    pPg = sqlite3PagerLookup(pPager, pgno);\n  }\n  assert( pPg || !MEMDB );\n  assert( pPager->eState!=PAGER_OPEN || pPg==0 || pPager->tempFile );\n  PAGERTRACE((\"PLAYBACK %d page %d hash(%08x) %s\\n\",\n           PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),\n           (isMainJrnl?\"main-journal\":\"sub-journal\")\n  ));\n  if( isMainJrnl ){\n    isSynced = pPager->noSync || (*pOffset <= pPager->journalHdr);\n  }else{\n    isSynced = (pPg==0 || 0==(pPg->flags & PGHDR_NEED_SYNC));\n  }\n  if( isOpen(pPager->fd)\n   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)\n   && isSynced\n  ){\n    i64 ofst = (pgno-1)*(i64)pPager->pageSize;\n    testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 );\n    assert( !pagerUseWal(pPager) );\n\n    /* Write the data read from the journal back into the database file.\n    ** This is usually safe even for an encrypted database - as the data\n    ** was encrypted before it was written to the journal file. The exception\n    ** is if the data was just read from an in-memory sub-journal. In that\n    ** case it must be encrypted here before it is copied into the database\n    ** file.  */\n    rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);\n\n    if( pgno>pPager->dbFileSize ){\n      pPager->dbFileSize = pgno;\n    }\n    if( pPager->pBackup ){\n      sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);\n    }\n  }else if( !isMainJrnl && pPg==0 ){\n    /* If this is a rollback of a savepoint and data was not written to\n    ** the database and the page is not in-memory, there is a potential\n    ** problem. When the page is next fetched by the b-tree layer, it\n    ** will be read from the database file, which may or may not be\n    ** current.\n    **\n    ** There are a couple of different ways this can happen. All are quite\n    ** obscure. When running in synchronous mode, this can only happen\n    ** if the page is on the free-list at the start of the transaction, then\n    ** populated, then moved using sqlite3PagerMovepage().\n    **\n    ** The solution is to add an in-memory page to the cache containing\n    ** the data just read from the sub-journal. Mark the page as dirty\n    ** and if the pager requires a journal-sync, then mark the page as\n    ** requiring a journal-sync before it is written.\n    */\n    assert( isSavepnt );\n    assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)==0 );\n    pPager->doNotSpill |= SPILLFLAG_ROLLBACK;\n    rc = sqlite3PagerGet(pPager, pgno, &pPg, 1);\n    assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0 );\n    pPager->doNotSpill &= ~SPILLFLAG_ROLLBACK;\n    if( rc!=SQLITE_OK ) return rc;\n    sqlite3PcacheMakeDirty(pPg);\n  }\n  if( pPg ){\n    /* No page should ever be explicitly rolled back that is in use, except\n    ** for page 1 which is held in use in order to keep the lock on the\n    ** database active. However such a page may be rolled back as a result\n    ** of an internal error resulting in an automatic call to\n    ** sqlite3PagerRollback().\n    */\n    void *pData;\n    pData = pPg->pData;\n    memcpy(pData, (u8*)aData, pPager->pageSize);\n    pPager->xReiniter(pPg);\n    /* It used to be that sqlite3PcacheMakeClean(pPg) was called here.  But\n    ** that call was dangerous and had no detectable benefit since the cache\n    ** is normally cleaned by sqlite3PcacheCleanAll() after rollback and so\n    ** has been removed. */\n    pager_set_pagehash(pPg);\n\n    /* If this was page 1, then restore the value of Pager.dbFileVers.\n    ** Do this before any decoding. */\n    if( pgno==1 ){\n      memcpy(&pPager->dbFileVers, &((u8*)pData)[24],sizeof(pPager->dbFileVers));\n    }\n    sqlite3PcacheRelease(pPg);\n  }\n  return rc;\n}\n\n/*\n** Parameter zSuper is the name of a super-journal file. A single journal\n** file that referred to the super-journal file has just been rolled back.\n** This routine checks if it is possible to delete the super-journal file,\n** and does so if it is.\n**\n** Argument zSuper may point to Pager.pTmpSpace. So that buffer is not\n** available for use within this function.\n**\n** When a super-journal file is created, it is populated with the names\n** of all of its child journals, one after another, formatted as utf-8\n** encoded text. The end of each child journal file is marked with a\n** nul-terminator byte (0x00). i.e. the entire contents of a super-journal\n** file for a transaction involving two databases might be:\n**\n**   \"/home/bill/a.db-journal\\x00/home/bill/b.db-journal\\x00\"\n**\n** A super-journal file may only be deleted once all of its child\n** journals have been rolled back.\n**\n** This function reads the contents of the super-journal file into\n** memory and loops through each of the child journal names. For\n** each child journal, it checks if:\n**\n**   * if the child journal exists, and if so\n**   * if the child journal contains a reference to super-journal\n**     file zSuper\n**\n** If a child journal can be found that matches both of the criteria\n** above, this function returns without doing anything. Otherwise, if\n** no such child journal can be found, file zSuper is deleted from\n** the file-system using sqlite3OsDelete().\n**\n** If an IO error within this function, an error code is returned. This\n** function allocates memory by calling sqlite3Malloc(). If an allocation\n** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors\n** occur, SQLITE_OK is returned.\n**\n** TODO: This function allocates a single block of memory to load\n** the entire contents of the super-journal file. This could be\n** a couple of kilobytes or so - potentially larger than the page\n** size.\n*/\nstatic int pager_delsuper(Pager *pPager, const char *zSuper){\n  sqlite3_vfs *pVfs = pPager->pVfs;\n  int rc;                   /* Return code */\n  sqlite3_file *pSuper;     /* Malloc'd super-journal file descriptor */\n  sqlite3_file *pJournal;   /* Malloc'd child-journal file descriptor */\n  char *zSuperJournal = 0;  /* Contents of super-journal file */\n  i64 nSuperJournal;        /* Size of super-journal file */\n  char *zJournal;           /* Pointer to one journal within MJ file */\n  char *zSuperPtr;          /* Space to hold super-journal filename */\n  char *zFree = 0;          /* Free this buffer */\n  i64 nSuperPtr;            /* Amount of space allocated to zSuperPtr[] */\n\n  /* Allocate space for both the pJournal and pSuper file descriptors.\n  ** If successful, open the super-journal file for reading.\n  */\n  pSuper = (sqlite3_file *)sqlite3MallocZero(2 * (i64)pVfs->szOsFile);\n  if( !pSuper ){\n    rc = SQLITE_NOMEM_BKPT;\n    pJournal = 0;\n  }else{\n    const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_SUPER_JOURNAL);\n    rc = sqlite3OsOpen(pVfs, zSuper, pSuper, flags, 0);\n    pJournal = (sqlite3_file *)(((u8 *)pSuper) + pVfs->szOsFile);\n  }\n  if( rc!=SQLITE_OK ) goto delsuper_out;\n\n  /* Load the entire super-journal file into space obtained from\n  ** sqlite3_malloc() and pointed to by zSuperJournal.   Also obtain\n  ** sufficient space (in zSuperPtr) to hold the names of super-journal\n  ** files extracted from regular rollback-journals.\n  */\n  rc = sqlite3OsFileSize(pSuper, &nSuperJournal);\n  if( rc!=SQLITE_OK ) goto delsuper_out;\n  nSuperPtr = 1 + (i64)pVfs->mxPathname;\n  assert( nSuperJournal>=0 && nSuperPtr>0 );\n  zFree = sqlite3Malloc(4 + nSuperJournal + nSuperPtr + 2);\n  if( !zFree ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto delsuper_out;\n  }else{\n    assert( nSuperJournal<=0x7fffffff );\n  }\n  zFree[0] = zFree[1] = zFree[2] = zFree[3] = 0;\n  zSuperJournal = &zFree[4];\n  zSuperPtr = &zSuperJournal[nSuperJournal+2];\n  rc = sqlite3OsRead(pSuper, zSuperJournal, (int)nSuperJournal, 0);\n  if( rc!=SQLITE_OK ) goto delsuper_out;\n  zSuperJournal[nSuperJournal] = 0;\n  zSuperJournal[nSuperJournal+1] = 0;\n\n  zJournal = zSuperJournal;\n  while( (zJournal-zSuperJournal)<nSuperJournal ){\n    int exists;\n    rc = sqlite3OsAccess(pVfs, zJournal, SQLITE_ACCESS_EXISTS, &exists);\n    if( rc!=SQLITE_OK ){\n      goto delsuper_out;\n    }\n    if( exists ){\n      /* One of the journals pointed to by the super-journal exists.\n      ** Open it and check if it points at the super-journal. If\n      ** so, return without deleting the super-journal file.\n      ** NB:  zJournal is really a MAIN_JOURNAL.  But call it a\n      ** SUPER_JOURNAL here so that the VFS will not send the zJournal\n      ** name into sqlite3_database_file_object().\n      */\n      int c;\n      int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_SUPER_JOURNAL);\n      rc = sqlite3OsOpen(pVfs, zJournal, pJournal, flags, 0);\n      if( rc!=SQLITE_OK ){\n        goto delsuper_out;\n      }\n\n      rc = readSuperJournal(pJournal, zSuperPtr, nSuperPtr);\n      sqlite3OsClose(pJournal);\n      if( rc!=SQLITE_OK ){\n        goto delsuper_out;\n      }\n\n      c = zSuperPtr[0]!=0 && strcmp(zSuperPtr, zSuper)==0;\n      if( c ){\n        /* We have a match. Do not delete the super-journal file. */\n        goto delsuper_out;\n      }\n    }\n    zJournal += (sqlite3Strlen30(zJournal)+1);\n  }\n\n  sqlite3OsClose(pSuper);\n  rc = sqlite3OsDelete(pVfs, zSuper, 0);\n\ndelsuper_out:\n  sqlite3_free(zFree);\n  if( pSuper ){\n    sqlite3OsClose(pSuper);\n    assert( !isOpen(pJournal) );\n    sqlite3_free(pSuper);\n  }\n  return rc;\n}\n\n\n/*\n** This function is used to change the actual size of the database\n** file in the file-system. This only happens when committing a transaction,\n** or rolling back a transaction (including rolling back a hot-journal).\n**\n** If the main database file is not open, or the pager is not in either\n** DBMOD or OPEN state, this function is a no-op. Otherwise, the size\n** of the file is changed to nPage pages (nPage*pPager->pageSize bytes).\n** If the file on disk is currently larger than nPage pages, then use the VFS\n** xTruncate() method to truncate it.\n**\n** Or, it might be the case that the file on disk is smaller than\n** nPage pages. Some operating system implementations can get confused if\n** you try to truncate a file to some size that is larger than it\n** currently is, so detect this case and write a single zero byte to\n** the end of the new file instead.\n**\n** If successful, return SQLITE_OK. If an IO error occurs while modifying\n** the database file, return the error code to the caller.\n*/\nstatic int pager_truncate(Pager *pPager, Pgno nPage){\n  int rc = SQLITE_OK;\n  assert( pPager->eState!=PAGER_ERROR );\n  assert( pPager->eState!=PAGER_READER );\n  PAGERTRACE((\"Truncate %d npage %u\\n\", PAGERID(pPager), nPage));\n\n\n  if( isOpen(pPager->fd)\n   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)\n  ){\n    i64 currentSize, newSize;\n    int szPage = pPager->pageSize;\n    assert( pPager->eLock==EXCLUSIVE_LOCK );\n    /* TODO: Is it safe to use Pager.dbFileSize here? */\n    rc = sqlite3OsFileSize(pPager->fd, &currentSize);\n    newSize = szPage*(i64)nPage;\n    if( rc==SQLITE_OK && currentSize!=newSize ){\n      if( currentSize>newSize ){\n        rc = sqlite3OsTruncate(pPager->fd, newSize);\n      }else if( (currentSize+szPage)<=newSize ){\n        char *pTmp = pPager->pTmpSpace;\n        memset(pTmp, 0, szPage);\n        testcase( (newSize-szPage) == currentSize );\n        testcase( (newSize-szPage) >  currentSize );\n        sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &newSize);\n        rc = sqlite3OsWrite(pPager->fd, pTmp, szPage, newSize-szPage);\n      }\n      if( rc==SQLITE_OK ){\n        pPager->dbFileSize = nPage;\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Return a sanitized version of the sector-size of OS file pFile. The\n** return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE.\n*/\nSQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *pFile){\n  int iRet = sqlite3OsSectorSize(pFile);\n  if( iRet<32 ){\n    iRet = 512;\n  }else if( iRet>MAX_SECTOR_SIZE ){\n    assert( MAX_SECTOR_SIZE>=512 );\n    iRet = MAX_SECTOR_SIZE;\n  }\n  return iRet;\n}\n\n/*\n** Set the value of the Pager.sectorSize variable for the given\n** pager based on the value returned by the xSectorSize method\n** of the open database file. The sector size will be used\n** to determine the size and alignment of journal header and\n** super-journal pointers within created journal files.\n**\n** For temporary files the effective sector size is always 512 bytes.\n**\n** Otherwise, for non-temporary files, the effective sector size is\n** the value returned by the xSectorSize() method rounded up to 32 if\n** it is less than 32, or rounded down to MAX_SECTOR_SIZE if it\n** is greater than MAX_SECTOR_SIZE.\n**\n** If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set\n** the effective sector size to its minimum value (512).  The purpose of\n** pPager->sectorSize is to define the \"blast radius\" of bytes that\n** might change if a crash occurs while writing to a single byte in\n** that range.  But with POWERSAFE_OVERWRITE, the blast radius is zero\n** (that is what POWERSAFE_OVERWRITE means), so we minimize the sector\n** size.  For backwards compatibility of the rollback journal file format,\n** we cannot reduce the effective sector size below 512.\n*/\nstatic void setSectorSize(Pager *pPager){\n  assert( isOpen(pPager->fd) || pPager->tempFile );\n\n  if( pPager->tempFile\n   || (sqlite3OsDeviceCharacteristics(pPager->fd) &\n              SQLITE_IOCAP_POWERSAFE_OVERWRITE)!=0\n  ){\n    /* Sector size doesn't matter for temporary files. Also, the file\n    ** may not have been opened yet, in which case the OsSectorSize()\n    ** call will segfault. */\n    pPager->sectorSize = 512;\n  }else{\n    pPager->sectorSize = sqlite3SectorSize(pPager->fd);\n  }\n}\n\n/*\n** Playback the journal and thus restore the database file to\n** the state it was in before we started making changes.\n**\n** The journal file format is as follows:\n**\n**  (1)  8 byte prefix.  A copy of aJournalMagic[].\n**  (2)  4 byte big-endian integer which is the number of valid page records\n**       in the journal.  If this value is 0xffffffff, then compute the\n**       number of page records from the journal size.\n**  (3)  4 byte big-endian integer which is the initial value for the\n**       sanity checksum.\n**  (4)  4 byte integer which is the number of pages to truncate the\n**       database to during a rollback.\n**  (5)  4 byte big-endian integer which is the sector size.  The header\n**       is this many bytes in size.\n**  (6)  4 byte big-endian integer which is the page size.\n**  (7)  zero padding out to the next sector size.\n**  (8)  Zero or more pages instances, each as follows:\n**        +  4 byte page number.\n**        +  pPager->pageSize bytes of data.\n**        +  4 byte checksum\n**\n** When we speak of the journal header, we mean the first 7 items above.\n** Each entry in the journal is an instance of the 8th item.\n**\n** Call the value from the second bullet \"nRec\".  nRec is the number of\n** valid page entries in the journal.  In most cases, you can compute the\n** value of nRec from the size of the journal file.  But if a power\n** failure occurred while the journal was being written, it could be the\n** case that the size of the journal file had already been increased but\n** the extra entries had not yet made it safely to disk.  In such a case,\n** the value of nRec computed from the file size would be too large.  For\n** that reason, we always use the nRec value in the header.\n**\n** If the nRec value is 0xffffffff it means that nRec should be computed\n** from the file size.  This value is used when the user selects the\n** no-sync option for the journal.  A power failure could lead to corruption\n** in this case.  But for things like temporary table (which will be\n** deleted when the power is restored) we don't care.\n**\n** If the file opened as the journal file is not a well-formed\n** journal file then all pages up to the first corrupted page are rolled\n** back (or no pages if the journal header is corrupted). The journal file\n** is then deleted and SQLITE_OK returned, just as if no corruption had\n** been encountered.\n**\n** If an I/O or malloc() error occurs, the journal-file is not deleted\n** and an error code is returned.\n**\n** The isHot parameter indicates that we are trying to rollback a journal\n** that might be a hot journal.  Or, it could be that the journal is\n** preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.\n** If the journal really is hot, reset the pager cache prior rolling\n** back any content.  If the journal is merely persistent, no reset is\n** needed.\n*/\nstatic int pager_playback(Pager *pPager, int isHot){\n  sqlite3_vfs *pVfs = pPager->pVfs;\n  i64 szJ;                 /* Size of the journal file in bytes */\n  u32 nRec;                /* Number of Records in the journal */\n  u32 u;                   /* Unsigned loop counter */\n  Pgno mxPg = 0;           /* Size of the original file in pages */\n  int rc;                  /* Result code of a subroutine */\n  int res = 1;             /* Value returned by sqlite3OsAccess() */\n  char *zSuper = 0;        /* Name of super-journal file if any */\n  int needPagerReset;      /* True to reset page prior to first page rollback */\n  int nPlayback = 0;       /* Total number of pages restored from journal */\n  u32 savedPageSize = pPager->pageSize;\n\n  /* Figure out how many records are in the journal.  Abort early if\n  ** the journal is empty.\n  */\n  assert( isOpen(pPager->jfd) );\n  rc = sqlite3OsFileSize(pPager->jfd, &szJ);\n  if( rc!=SQLITE_OK ){\n    goto end_playback;\n  }\n\n  /* Read the super-journal name from the journal, if it is present.\n  ** If a super-journal file name is specified, but the file is not\n  ** present on disk, then the journal is not hot and does not need to be\n  ** played back.\n  **\n  ** TODO: Technically the following is an error because it assumes that\n  ** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that\n  ** (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c,\n  ** mxPathname is 512, which is the same as the minimum allowable value\n  ** for pageSize.\n  */\n  zSuper = pPager->pTmpSpace;\n  rc = readSuperJournal(pPager->jfd, zSuper, 1+(i64)pPager->pVfs->mxPathname);\n  if( rc==SQLITE_OK && zSuper[0] ){\n    rc = sqlite3OsAccess(pVfs, zSuper, SQLITE_ACCESS_EXISTS, &res);\n  }\n  zSuper = 0;\n  if( rc!=SQLITE_OK || !res ){\n    goto end_playback;\n  }\n  pPager->journalOff = 0;\n  needPagerReset = isHot;\n\n  /* This loop terminates either when a readJournalHdr() or\n  ** pager_playback_one_page() call returns SQLITE_DONE or an IO error\n  ** occurs.\n  */\n  while( 1 ){\n    /* Read the next journal header from the journal file.  If there are\n    ** not enough bytes left in the journal file for a complete header, or\n    ** it is corrupted, then a process must have failed while writing it.\n    ** This indicates nothing more needs to be rolled back.\n    */\n    rc = readJournalHdr(pPager, isHot, szJ, &nRec, &mxPg);\n    if( rc!=SQLITE_OK ){\n      if( rc==SQLITE_DONE ){\n        rc = SQLITE_OK;\n      }\n      goto end_playback;\n    }\n\n    /* If nRec is 0xffffffff, then this journal was created by a process\n    ** working in no-sync mode. This means that the rest of the journal\n    ** file consists of pages, there are no more journal headers. Compute\n    ** the value of nRec based on this assumption.\n    */\n    if( nRec==0xffffffff ){\n      assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) );\n      nRec = (int)((szJ - JOURNAL_HDR_SZ(pPager))/JOURNAL_PG_SZ(pPager));\n    }\n\n    /* If nRec is 0 and this rollback is of a transaction created by this\n    ** process and if this is the final header in the journal, then it means\n    ** that this part of the journal was being filled but has not yet been\n    ** synced to disk.  Compute the number of pages based on the remaining\n    ** size of the file.\n    **\n    ** The third term of the test was added to fix ticket #2565.\n    ** When rolling back a hot journal, nRec==0 always means that the next\n    ** chunk of the journal contains zero pages to be rolled back.  But\n    ** when doing a ROLLBACK and the nRec==0 chunk is the last chunk in\n    ** the journal, it means that the journal might contain additional\n    ** pages that need to be rolled back and that the number of pages\n    ** should be computed based on the journal file size.\n    */\n    if( nRec==0 && !isHot &&\n        pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff ){\n      nRec = (int)((szJ - pPager->journalOff) / JOURNAL_PG_SZ(pPager));\n    }\n\n    /* If this is the first header read from the journal, truncate the\n    ** database file back to its original size.\n    */\n    if( pPager->journalOff==JOURNAL_HDR_SZ(pPager) ){\n      rc = pager_truncate(pPager, mxPg);\n      if( rc!=SQLITE_OK ){\n        goto end_playback;\n      }\n      pPager->dbSize = mxPg;\n      if( pPager->mxPgno<mxPg ){\n        pPager->mxPgno = mxPg;\n      }\n    }\n\n    /* Copy original pages out of the journal and back into the\n    ** database file and/or page cache.\n    */\n    for(u=0; u<nRec; u++){\n      if( needPagerReset ){\n        pager_reset(pPager);\n        needPagerReset = 0;\n      }\n      rc = pager_playback_one_page(pPager,&pPager->journalOff,0,1,0);\n      if( rc==SQLITE_OK ){\n        nPlayback++;\n      }else{\n        if( rc==SQLITE_DONE ){\n          pPager->journalOff = szJ;\n          break;\n        }else if( rc==SQLITE_IOERR_SHORT_READ ){\n          /* If the journal has been truncated, simply stop reading and\n          ** processing the journal. This might happen if the journal was\n          ** not completely written and synced prior to a crash.  In that\n          ** case, the database should have never been written in the\n          ** first place so it is OK to simply abandon the rollback. */\n          rc = SQLITE_OK;\n          goto end_playback;\n        }else{\n          /* If we are unable to rollback, quit and return the error\n          ** code.  This will cause the pager to enter the error state\n          ** so that no further harm will be done.  Perhaps the next\n          ** process to come along will be able to rollback the database.\n          */\n          goto end_playback;\n        }\n      }\n    }\n  }\n  /*NOTREACHED*/\n  assert( 0 );\n\nend_playback:\n  if( rc==SQLITE_OK ){\n    rc = sqlite3PagerSetPagesize(pPager, &savedPageSize, -1);\n  }\n  /* Following a rollback, the database file should be back in its original\n  ** state prior to the start of the transaction, so invoke the\n  ** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the\n  ** assertion that the transaction counter was modified.\n  */\n#ifdef SQLITE_DEBUG\n  sqlite3OsFileControlHint(pPager->fd,SQLITE_FCNTL_DB_UNCHANGED,0);\n#endif\n\n  /* If this playback is happening automatically as a result of an IO or\n  ** malloc error that occurred after the change-counter was updated but\n  ** before the transaction was committed, then the change-counter\n  ** modification may just have been reverted. If this happens in exclusive\n  ** mode, then subsequent transactions performed by the connection will not\n  ** update the change-counter at all. This may lead to cache inconsistency\n  ** problems for other processes at some point in the future. So, just\n  ** in case this has happened, clear the changeCountDone flag now.\n  */\n  pPager->changeCountDone = pPager->tempFile;\n\n  if( rc==SQLITE_OK ){\n    /* Leave 4 bytes of space before the super-journal filename in memory.\n    ** This is because it may end up being passed to sqlite3OsOpen(), in\n    ** which case it requires 4 0x00 bytes in memory immediately before\n    ** the filename. */\n    zSuper = &pPager->pTmpSpace[4];\n    rc = readSuperJournal(pPager->jfd, zSuper, 1+(i64)pPager->pVfs->mxPathname);\n    testcase( rc!=SQLITE_OK );\n  }\n  if( rc==SQLITE_OK\n   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)\n  ){\n    rc = sqlite3PagerSync(pPager, 0);\n  }\n  if( rc==SQLITE_OK ){\n    rc = pager_end_transaction(pPager, zSuper[0]!='\\0', 0);\n    testcase( rc!=SQLITE_OK );\n  }\n  if( rc==SQLITE_OK && zSuper[0] && res ){\n    /* If there was a super-journal and this routine will return success,\n    ** see if it is possible to delete the super-journal.\n    */\n    assert( zSuper==&pPager->pTmpSpace[4] );\n    memset(pPager->pTmpSpace, 0, 4);\n    rc = pager_delsuper(pPager, zSuper);\n    testcase( rc!=SQLITE_OK );\n  }\n  if( isHot && nPlayback ){\n    sqlite3_log(SQLITE_NOTICE_RECOVER_ROLLBACK, \"recovered %d pages from %s\",\n                nPlayback, pPager->zJournal);\n  }\n\n  /* The Pager.sectorSize variable may have been updated while rolling\n  ** back a journal created by a process with a different sector size\n  ** value. Reset it to the correct value for this process.\n  */\n  setSectorSize(pPager);\n  return rc;\n}\n\n\n/*\n** Read the content for page pPg out of the database file (or out of\n** the WAL if that is where the most recent copy if found) into\n** pPg->pData. A shared lock or greater must be held on the database\n** file before this function is called.\n**\n** If page 1 is read, then the value of Pager.dbFileVers[] is set to\n** the value read from the database file.\n**\n** If an IO error occurs, then the IO error is returned to the caller.\n** Otherwise, SQLITE_OK is returned.\n*/\nstatic int readDbPage(PgHdr *pPg){\n  Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */\n  int rc = SQLITE_OK;          /* Return code */\n\n#ifndef SQLITE_OMIT_WAL\n  u32 iFrame = 0;              /* Frame of WAL containing pgno */\n\n  assert( pPager->eState>=PAGER_READER && !MEMDB );\n  assert( isOpen(pPager->fd) );\n\n  if( pagerUseWal(pPager) ){\n    rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);\n    if( rc ) return rc;\n  }\n  if( iFrame ){\n    rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);\n  }else\n#endif\n  {\n    i64 iOffset = (pPg->pgno-1)*(i64)pPager->pageSize;\n    rc = sqlite3OsRead(pPager->fd, pPg->pData, pPager->pageSize, iOffset);\n    if( rc==SQLITE_IOERR_SHORT_READ ){\n      rc = SQLITE_OK;\n    }\n  }\n\n  if( pPg->pgno==1 ){\n    if( rc ){\n      /* If the read is unsuccessful, set the dbFileVers[] to something\n      ** that will never be a valid file version.  dbFileVers[] is a copy\n      ** of bytes 24..39 of the database.  Bytes 28..31 should always be\n      ** zero or the size of the database in page. Bytes 32..35 and 35..39\n      ** should be page numbers which are never 0xffffffff.  So filling\n      ** pPager->dbFileVers[] with all 0xff bytes should suffice.\n      **\n      ** For an encrypted database, the situation is more complex:  bytes\n      ** 24..39 of the database are white noise.  But the probability of\n      ** white noise equaling 16 bytes of 0xff is vanishingly small so\n      ** we should still be ok.\n      */\n      memset(pPager->dbFileVers, 0xff, sizeof(pPager->dbFileVers));\n    }else{\n      u8 *dbFileVers = &((u8*)pPg->pData)[24];\n      memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers));\n    }\n  }\n  PAGER_INCR(sqlite3_pager_readdb_count);\n  PAGER_INCR(pPager->nRead);\n  IOTRACE((\"PGIN %p %d\\n\", pPager, pPg->pgno));\n  PAGERTRACE((\"FETCH %d page %d hash(%08x)\\n\",\n               PAGERID(pPager), pPg->pgno, pager_pagehash(pPg)));\n\n  return rc;\n}\n\n/*\n** Update the value of the change-counter at offsets 24 and 92 in\n** the header and the sqlite version number at offset 96.\n**\n** This is an unconditional update.  See also the pager_incr_changecounter()\n** routine which only updates the change-counter if the update is actually\n** needed, as determined by the pPager->changeCountDone state variable.\n*/\nstatic void pager_write_changecounter(PgHdr *pPg){\n  u32 change_counter;\n  if( NEVER(pPg==0) ) return;\n\n  /* Increment the value just read and write it back to byte 24. */\n  change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1;\n  put32bits(((char*)pPg->pData)+24, change_counter);\n\n  /* Also store the SQLite version number in bytes 96..99 and in\n  ** bytes 92..95 store the change counter for which the version number\n  ** is valid. */\n  put32bits(((char*)pPg->pData)+92, change_counter);\n  put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER);\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** This function is invoked once for each page that has already been\n** written into the log file when a WAL transaction is rolled back.\n** Parameter iPg is the page number of said page. The pCtx argument\n** is actually a pointer to the Pager structure.\n**\n** If page iPg is present in the cache, and has no outstanding references,\n** it is discarded. Otherwise, if there are one or more outstanding\n** references, the page content is reloaded from the database. If the\n** attempt to reload content from the database is required and fails,\n** return an SQLite error code. Otherwise, SQLITE_OK.\n*/\nstatic int pagerUndoCallback(void *pCtx, Pgno iPg){\n  int rc = SQLITE_OK;\n  Pager *pPager = (Pager *)pCtx;\n  PgHdr *pPg;\n\n  assert( pagerUseWal(pPager) );\n  pPg = sqlite3PagerLookup(pPager, iPg);\n  if( pPg ){\n    if( sqlite3PcachePageRefcount(pPg)==1 ){\n      sqlite3PcacheDrop(pPg);\n    }else{\n      rc = readDbPage(pPg);\n      if( rc==SQLITE_OK ){\n        pPager->xReiniter(pPg);\n      }\n      sqlite3PagerUnrefNotNull(pPg);\n    }\n  }\n\n  /* Normally, if a transaction is rolled back, any backup processes are\n  ** updated as data is copied out of the rollback journal and into the\n  ** database. This is not generally possible with a WAL database, as\n  ** rollback involves simply truncating the log file. Therefore, if one\n  ** or more frames have already been written to the log (and therefore\n  ** also copied into the backup databases) as part of this transaction,\n  ** the backups must be restarted.\n  */\n  sqlite3BackupRestart(pPager->pBackup);\n\n  return rc;\n}\n\n/*\n** This function is called to rollback a transaction on a WAL database.\n*/\nstatic int pagerRollbackWal(Pager *pPager){\n  int rc;                         /* Return Code */\n  PgHdr *pList;                   /* List of dirty pages to revert */\n\n  /* For all pages in the cache that are currently dirty or have already\n  ** been written (but not committed) to the log file, do one of the\n  ** following:\n  **\n  **   + Discard the cached page (if refcount==0), or\n  **   + Reload page content from the database (if refcount>0).\n  */\n  pPager->dbSize = pPager->dbOrigSize;\n  rc = sqlite3WalUndo(pPager->pWal, pagerUndoCallback, (void *)pPager);\n  pList = sqlite3PcacheDirtyList(pPager->pPCache);\n  while( pList && rc==SQLITE_OK ){\n    PgHdr *pNext = pList->pDirty;\n    rc = pagerUndoCallback((void *)pPager, pList->pgno);\n    pList = pNext;\n  }\n\n  return rc;\n}\n\n/*\n** This function is a wrapper around sqlite3WalFrames(). As well as logging\n** the contents of the list of pages headed by pList (connected by pDirty),\n** this function notifies any active backup processes that the pages have\n** changed.\n**\n** The list of pages passed into this routine is always sorted by page number.\n** Hence, if page 1 appears anywhere on the list, it will be the first page.\n*/\nstatic int pagerWalFrames(\n  Pager *pPager,                  /* Pager object */\n  PgHdr *pList,                   /* List of frames to log */\n  Pgno nTruncate,                 /* Database size after this commit */\n  int isCommit                    /* True if this is a commit */\n){\n  int rc;                         /* Return code */\n  int nList;                      /* Number of pages in pList */\n  PgHdr *p;                       /* For looping over pages */\n\n  assert( pPager->pWal );\n  assert( pList );\n#ifdef SQLITE_DEBUG\n  /* Verify that the page list is in ascending order */\n  for(p=pList; p && p->pDirty; p=p->pDirty){\n    assert( p->pgno < p->pDirty->pgno );\n  }\n#endif\n\n  assert( pList->pDirty==0 || isCommit );\n  if( isCommit ){\n    /* If a WAL transaction is being committed, there is no point in writing\n    ** any pages with page numbers greater than nTruncate into the WAL file.\n    ** They will never be read by any client. So remove them from the pDirty\n    ** list here. */\n    PgHdr **ppNext = &pList;\n    nList = 0;\n    for(p=pList; (*ppNext = p)!=0; p=p->pDirty){\n      if( p->pgno<=nTruncate ){\n        ppNext = &p->pDirty;\n        nList++;\n      }\n    }\n    assert( pList );\n  }else{\n    nList = 1;\n  }\n  pPager->aStat[PAGER_STAT_WRITE] += nList;\n\n  if( pList->pgno==1 ) pager_write_changecounter(pList);\n  rc = sqlite3WalFrames(pPager->pWal,\n      pPager->pageSize, pList, nTruncate, isCommit, pPager->walSyncFlags\n  );\n  if( rc==SQLITE_OK && pPager->pBackup ){\n    for(p=pList; p; p=p->pDirty){\n      sqlite3BackupUpdate(pPager->pBackup, p->pgno, (u8 *)p->pData);\n    }\n  }\n\n#ifdef SQLITE_CHECK_PAGES\n  pList = sqlite3PcacheDirtyList(pPager->pPCache);\n  for(p=pList; p; p=p->pDirty){\n    pager_set_pagehash(p);\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** Begin a read transaction on the WAL.\n**\n** This routine used to be called \"pagerOpenSnapshot()\" because it essentially\n** makes a snapshot of the database at the current point in time and preserves\n** that snapshot for use by the reader in spite of concurrently changes by\n** other writers or checkpointers.\n*/\nstatic int pagerBeginReadTransaction(Pager *pPager){\n  int rc;                         /* Return code */\n  int changed = 0;                /* True if cache must be reset */\n\n  assert( pagerUseWal(pPager) );\n  assert( pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER );\n\n  /* sqlite3WalEndReadTransaction() was not called for the previous\n  ** transaction in locking_mode=EXCLUSIVE.  So call it now.  If we\n  ** are in locking_mode=NORMAL and EndRead() was previously called,\n  ** the duplicate call is harmless.\n  */\n  sqlite3WalEndReadTransaction(pPager->pWal);\n\n  rc = sqlite3WalBeginReadTransaction(pPager->pWal, &changed);\n  if( rc!=SQLITE_OK || changed ){\n    pager_reset(pPager);\n    if( USEFETCH(pPager) ) sqlite3OsUnfetch(pPager->fd, 0, 0);\n  }\n\n  return rc;\n}\n#endif\n\n/*\n** This function is called as part of the transition from PAGER_OPEN\n** to PAGER_READER state to determine the size of the database file\n** in pages (assuming the page size currently stored in Pager.pageSize).\n**\n** If no error occurs, SQLITE_OK is returned and the size of the database\n** in pages is stored in *pnPage. Otherwise, an error code (perhaps\n** SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified.\n*/\nstatic int pagerPagecount(Pager *pPager, Pgno *pnPage){\n  Pgno nPage;                     /* Value to return via *pnPage */\n\n  /* Query the WAL sub-system for the database size. The WalDbsize()\n  ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or\n  ** if the database size is not available. The database size is not\n  ** available from the WAL sub-system if the log file is empty or\n  ** contains no valid committed transactions.\n  */\n  assert( pPager->eState==PAGER_OPEN );\n  assert( pPager->eLock>=SHARED_LOCK );\n  assert( isOpen(pPager->fd) );\n  assert( pPager->tempFile==0 );\n  nPage = sqlite3WalDbsize(pPager->pWal);\n\n  /* If the number of pages in the database is not available from the\n  ** WAL sub-system, determine the page count based on the size of\n  ** the database file.  If the size of the database file is not an\n  ** integer multiple of the page-size, round up the result.\n  */\n  if( nPage==0 && ALWAYS(isOpen(pPager->fd)) ){\n    i64 n = 0;                    /* Size of db file in bytes */\n    int rc = sqlite3OsFileSize(pPager->fd, &n);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    nPage = (Pgno)((n+pPager->pageSize-1) / pPager->pageSize);\n  }\n\n  /* If the current number of pages in the file is greater than the\n  ** configured maximum pager number, increase the allowed limit so\n  ** that the file can be read.\n  */\n  if( nPage>pPager->mxPgno ){\n    pPager->mxPgno = (Pgno)nPage;\n  }\n\n  *pnPage = nPage;\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Check if the *-wal file that corresponds to the database opened by pPager\n** exists if the database is not empty, or verify that the *-wal file does\n** not exist (by deleting it) if the database file is empty.\n**\n** If the database is not empty and the *-wal file exists, open the pager\n** in WAL mode.  If the database is empty or if no *-wal file exists and\n** if no error occurs, make sure Pager.journalMode is not set to\n** PAGER_JOURNALMODE_WAL.\n**\n** Return SQLITE_OK or an error code.\n**\n** The caller must hold a SHARED lock on the database file to call this\n** function. Because an EXCLUSIVE lock on the db file is required to delete\n** a WAL on a none-empty database, this ensures there is no race condition\n** between the xAccess() below and an xDelete() being executed by some\n** other connection.\n*/\nstatic int pagerOpenWalIfPresent(Pager *pPager){\n  int rc = SQLITE_OK;\n  assert( pPager->eState==PAGER_OPEN );\n  assert( pPager->eLock>=SHARED_LOCK );\n\n  if( !pPager->tempFile ){\n    int isWal;                    /* True if WAL file exists */\n    rc = sqlite3OsAccess(\n        pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &isWal\n    );\n    if( rc==SQLITE_OK ){\n      if( isWal ){\n        Pgno nPage;                   /* Size of the database file */\n\n        rc = pagerPagecount(pPager, &nPage);\n        if( rc ) return rc;\n        if( nPage==0 ){\n          rc = sqlite3OsDelete(pPager->pVfs, pPager->zWal, 0);\n        }else{\n          testcase( sqlite3PcachePagecount(pPager->pPCache)==0 );\n          rc = sqlite3PagerOpenWal(pPager, 0);\n        }\n      }else if( pPager->journalMode==PAGER_JOURNALMODE_WAL ){\n        pPager->journalMode = PAGER_JOURNALMODE_DELETE;\n      }\n    }\n  }\n  return rc;\n}\n#endif\n\n/*\n** Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback\n** the entire super-journal file. The case pSavepoint==NULL occurs when\n** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction\n** savepoint.\n**\n** When pSavepoint is not NULL (meaning a non-transaction savepoint is\n** being rolled back), then the rollback consists of up to three stages,\n** performed in the order specified:\n**\n**   * Pages are played back from the main journal starting at byte\n**     offset PagerSavepoint.iOffset and continuing to\n**     PagerSavepoint.iHdrOffset, or to the end of the main journal\n**     file if PagerSavepoint.iHdrOffset is zero.\n**\n**   * If PagerSavepoint.iHdrOffset is not zero, then pages are played\n**     back starting from the journal header immediately following\n**     PagerSavepoint.iHdrOffset to the end of the main journal file.\n**\n**   * Pages are then played back from the sub-journal file, starting\n**     with the PagerSavepoint.iSubRec and continuing to the end of\n**     the journal file.\n**\n** Throughout the rollback process, each time a page is rolled back, the\n** corresponding bit is set in a bitvec structure (variable pDone in the\n** implementation below). This is used to ensure that a page is only\n** rolled back the first time it is encountered in either journal.\n**\n** If pSavepoint is NULL, then pages are only played back from the main\n** journal file. There is no need for a bitvec in this case.\n**\n** In either case, before playback commences the Pager.dbSize variable\n** is reset to the value that it held at the start of the savepoint\n** (or transaction). No page with a page-number greater than this value\n** is played back. If one is encountered it is simply skipped.\n*/\nstatic int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){\n  i64 szJ;                 /* Effective size of the main journal */\n  i64 iHdrOff;             /* End of first segment of main-journal records */\n  int rc = SQLITE_OK;      /* Return code */\n  Bitvec *pDone = 0;       /* Bitvec to ensure pages played back only once */\n\n  assert( pPager->eState!=PAGER_ERROR );\n  assert( pPager->eState>=PAGER_WRITER_LOCKED );\n\n  /* Allocate a bitvec to use to store the set of pages rolled back */\n  if( pSavepoint ){\n    pDone = sqlite3BitvecCreate(pSavepoint->nOrig);\n    if( !pDone ){\n      return SQLITE_NOMEM_BKPT;\n    }\n  }\n\n  /* Set the database size back to the value it was before the savepoint\n  ** being reverted was opened.\n  */\n  pPager->dbSize = pSavepoint ? pSavepoint->nOrig : pPager->dbOrigSize;\n  pPager->changeCountDone = pPager->tempFile;\n\n  if( !pSavepoint && pagerUseWal(pPager) ){\n    return pagerRollbackWal(pPager);\n  }\n\n  /* Use pPager->journalOff as the effective size of the main rollback\n  ** journal.  The actual file might be larger than this in\n  ** PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST.  But anything\n  ** past pPager->journalOff is off-limits to us.\n  */\n  szJ = pPager->journalOff;\n  assert( pagerUseWal(pPager)==0 || szJ==0 );\n\n  /* Begin by rolling back records from the main journal starting at\n  ** PagerSavepoint.iOffset and continuing to the next journal header.\n  ** There might be records in the main journal that have a page number\n  ** greater than the current database size (pPager->dbSize) but those\n  ** will be skipped automatically.  Pages are added to pDone as they\n  ** are played back.\n  */\n  if( pSavepoint && !pagerUseWal(pPager) ){\n    iHdrOff = pSavepoint->iHdrOffset ? pSavepoint->iHdrOffset : szJ;\n    pPager->journalOff = pSavepoint->iOffset;\n    while( rc==SQLITE_OK && pPager->journalOff<iHdrOff ){\n      rc = pager_playback_one_page(pPager, &pPager->journalOff, pDone, 1, 1);\n    }\n    assert( rc!=SQLITE_DONE );\n  }else{\n    pPager->journalOff = 0;\n  }\n\n  /* Continue rolling back records out of the main journal starting at\n  ** the first journal header seen and continuing until the effective end\n  ** of the main journal file.  Continue to skip out-of-range pages and\n  ** continue adding pages rolled back to pDone.\n  */\n  while( rc==SQLITE_OK && pPager->journalOff<szJ ){\n    u32 ii;            /* Loop counter */\n    u32 nJRec = 0;     /* Number of Journal Records */\n    u32 dummy;\n    rc = readJournalHdr(pPager, 0, szJ, &nJRec, &dummy);\n    assert( rc!=SQLITE_DONE );\n\n    /*\n    ** The \"pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff\"\n    ** test is related to ticket #2565.  See the discussion in the\n    ** pager_playback() function for additional information.\n    */\n    if( nJRec==0\n     && pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff\n    ){\n      nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));\n    }\n    for(ii=0; rc==SQLITE_OK && ii<nJRec && pPager->journalOff<szJ; ii++){\n      rc = pager_playback_one_page(pPager, &pPager->journalOff, pDone, 1, 1);\n    }\n    assert( rc!=SQLITE_DONE );\n  }\n  assert( rc!=SQLITE_OK || pPager->journalOff>=szJ );\n\n  /* Finally,  rollback pages from the sub-journal.  Page that were\n  ** previously rolled back out of the main journal (and are hence in pDone)\n  ** will be skipped.  Out-of-range pages are also skipped.\n  */\n  if( pSavepoint ){\n    u32 ii;            /* Loop counter */\n    i64 offset = (i64)pSavepoint->iSubRec*(4+pPager->pageSize);\n\n    if( pagerUseWal(pPager) ){\n      rc = sqlite3WalSavepointUndo(pPager->pWal, pSavepoint->aWalData);\n    }\n    for(ii=pSavepoint->iSubRec; rc==SQLITE_OK && ii<pPager->nSubRec; ii++){\n      assert( offset==(i64)ii*(4+pPager->pageSize) );\n      rc = pager_playback_one_page(pPager, &offset, pDone, 0, 1);\n    }\n    assert( rc!=SQLITE_DONE );\n  }\n\n  sqlite3BitvecDestroy(pDone);\n  if( rc==SQLITE_OK ){\n    pPager->journalOff = szJ;\n  }\n\n  return rc;\n}\n\n/*\n** Change the maximum number of in-memory pages that are allowed\n** before attempting to recycle clean and unused pages.\n*/\nSQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager *pPager, int mxPage){\n  sqlite3PcacheSetCachesize(pPager->pPCache, mxPage);\n}\n\n/*\n** Change the maximum number of in-memory pages that are allowed\n** before attempting to spill pages to journal.\n*/\nSQLITE_PRIVATE int sqlite3PagerSetSpillsize(Pager *pPager, int mxPage){\n  return sqlite3PcacheSetSpillsize(pPager->pPCache, mxPage);\n}\n\n/*\n** Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.\n*/\nstatic void pagerFixMaplimit(Pager *pPager){\n#if SQLITE_MAX_MMAP_SIZE>0\n  sqlite3_file *fd = pPager->fd;\n  if( isOpen(fd) && fd->pMethods->iVersion>=3 ){\n    sqlite3_int64 sz;\n    sz = pPager->szMmap;\n    pPager->bUseFetch = (sz>0);\n    setGetterMethod(pPager);\n    sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_SIZE, &sz);\n  }\n#endif\n}\n\n/*\n** Change the maximum size of any memory mapping made of the database file.\n*/\nSQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *pPager, sqlite3_int64 szMmap){\n  pPager->szMmap = szMmap;\n  pagerFixMaplimit(pPager);\n}\n\n/*\n** Free as much memory as possible from the pager.\n*/\nSQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){\n  sqlite3PcacheShrink(pPager->pPCache);\n}\n\n/*\n** Adjust settings of the pager to those specified in the pgFlags parameter.\n**\n** The \"level\" in pgFlags & PAGER_SYNCHRONOUS_MASK sets the robustness\n** of the database to damage due to OS crashes or power failures by\n** changing the number of syncs()s when writing the journals.\n** There are four levels:\n**\n**    OFF       sqlite3OsSync() is never called.  This is the default\n**              for temporary and transient files.\n**\n**    NORMAL    The journal is synced once before writes begin on the\n**              database.  This is normally adequate protection, but\n**              it is theoretically possible, though very unlikely,\n**              that an inopertune power failure could leave the journal\n**              in a state which would cause damage to the database\n**              when it is rolled back.\n**\n**    FULL      The journal is synced twice before writes begin on the\n**              database (with some additional information - the nRec field\n**              of the journal header - being written in between the two\n**              syncs).  If we assume that writing a\n**              single disk sector is atomic, then this mode provides\n**              assurance that the journal will not be corrupted to the\n**              point of causing damage to the database during rollback.\n**\n**    EXTRA     This is like FULL except that is also syncs the directory\n**              that contains the rollback journal after the rollback\n**              journal is unlinked.\n**\n** The above is for a rollback-journal mode.  For WAL mode, OFF continues\n** to mean that no syncs ever occur.  NORMAL means that the WAL is synced\n** prior to the start of checkpoint and that the database file is synced\n** at the conclusion of the checkpoint if the entire content of the WAL\n** was written back into the database.  But no sync operations occur for\n** an ordinary commit in NORMAL mode with WAL.  FULL means that the WAL\n** file is synced following each commit operation, in addition to the\n** syncs associated with NORMAL.  There is no difference between FULL\n** and EXTRA for WAL mode.\n**\n** Do not confuse synchronous=FULL with SQLITE_SYNC_FULL.  The\n** SQLITE_SYNC_FULL macro means to use the MacOSX-style full-fsync\n** using fcntl(F_FULLFSYNC).  SQLITE_SYNC_NORMAL means to do an\n** ordinary fsync() call.  There is no difference between SQLITE_SYNC_FULL\n** and SQLITE_SYNC_NORMAL on platforms other than MacOSX.  But the\n** synchronous=FULL versus synchronous=NORMAL setting determines when\n** the xSync primitive is called and is relevant to all platforms.\n**\n** Numeric values associated with these states are OFF==1, NORMAL=2,\n** and FULL=3.\n*/\nSQLITE_PRIVATE void sqlite3PagerSetFlags(\n  Pager *pPager,        /* The pager to set safety level for */\n  unsigned pgFlags      /* Various flags */\n){\n  unsigned level = pgFlags & PAGER_SYNCHRONOUS_MASK;\n  if( pPager->tempFile || level==PAGER_SYNCHRONOUS_OFF ){\n    pPager->noSync = 1;\n    pPager->fullSync = 0;\n    pPager->extraSync = 0;\n  }else{\n    pPager->noSync =  0;\n    pPager->fullSync = level>=PAGER_SYNCHRONOUS_FULL ?1:0;\n\n    /* Set Pager.extraSync if \"PRAGMA synchronous=EXTRA\" is requested, or\n    ** if the file-system supports F2FS style atomic writes. If this flag\n    ** is set, SQLite syncs the directory to disk immediately after deleting\n    ** a journal file in \"PRAGMA journal_mode=DELETE\" mode.  */\n    if( level==PAGER_SYNCHRONOUS_EXTRA\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n     || (sqlite3OsDeviceCharacteristics(pPager->fd) & SQLITE_IOCAP_BATCH_ATOMIC)\n#endif\n    ){\n      pPager->extraSync = 1;\n    }else{\n      pPager->extraSync = 0;\n    }\n  }\n  if( pPager->noSync ){\n    pPager->syncFlags = 0;\n  }else if( pgFlags & PAGER_FULLFSYNC ){\n    pPager->syncFlags = SQLITE_SYNC_FULL;\n  }else{\n    pPager->syncFlags = SQLITE_SYNC_NORMAL;\n  }\n  pPager->walSyncFlags = (pPager->syncFlags<<2);\n  if( pPager->fullSync ){\n    pPager->walSyncFlags |= pPager->syncFlags;\n  }\n  if( (pgFlags & PAGER_CKPT_FULLFSYNC) && !pPager->noSync ){\n    pPager->walSyncFlags |= (SQLITE_SYNC_FULL<<2);\n  }\n  if( pgFlags & PAGER_CACHESPILL ){\n    pPager->doNotSpill &= ~SPILLFLAG_OFF;\n  }else{\n    pPager->doNotSpill |= SPILLFLAG_OFF;\n  }\n}\n\n/*\n** The following global variable is incremented whenever the library\n** attempts to open a temporary file.  This information is used for\n** testing and analysis only.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_opentemp_count = 0;\n#endif\n\n/*\n** Open a temporary file.\n**\n** Write the file descriptor into *pFile. Return SQLITE_OK on success\n** or some other error code if we fail. The OS will automatically\n** delete the temporary file when it is closed.\n**\n** The flags passed to the VFS layer xOpen() call are those specified\n** by parameter vfsFlags ORed with the following:\n**\n**     SQLITE_OPEN_READWRITE\n**     SQLITE_OPEN_CREATE\n**     SQLITE_OPEN_EXCLUSIVE\n**     SQLITE_OPEN_DELETEONCLOSE\n*/\nstatic int pagerOpentemp(\n  Pager *pPager,        /* The pager object */\n  sqlite3_file *pFile,  /* Write the file descriptor here */\n  int vfsFlags          /* Flags passed through to the VFS */\n){\n  int rc;               /* Return code */\n\n#ifdef SQLITE_TEST\n  sqlite3_opentemp_count++;  /* Used for testing and analysis only */\n#endif\n\n  vfsFlags |=  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |\n            SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;\n  rc = sqlite3OsOpen(pPager->pVfs, 0, pFile, vfsFlags, 0);\n  assert( rc!=SQLITE_OK || isOpen(pFile) );\n  return rc;\n}\n\n/*\n** Set the busy handler function.\n**\n** The pager invokes the busy-handler if sqlite3OsLock() returns\n** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,\n** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE\n** lock. It does *not* invoke the busy handler when upgrading from\n** SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE\n** (which occurs during hot-journal rollback). Summary:\n**\n**   Transition                        | Invokes xBusyHandler\n**   --------------------------------------------------------\n**   NO_LOCK       -> SHARED_LOCK      | Yes\n**   SHARED_LOCK   -> RESERVED_LOCK    | No\n**   SHARED_LOCK   -> EXCLUSIVE_LOCK   | No\n**   RESERVED_LOCK -> EXCLUSIVE_LOCK   | Yes\n**\n** If the busy-handler callback returns non-zero, the lock is\n** retried. If it returns zero, then the SQLITE_BUSY error is\n** returned to the caller of the pager API function.\n*/\nSQLITE_PRIVATE void sqlite3PagerSetBusyHandler(\n  Pager *pPager,                       /* Pager object */\n  int (*xBusyHandler)(void *),         /* Pointer to busy-handler function */\n  void *pBusyHandlerArg                /* Argument to pass to xBusyHandler */\n){\n  void **ap;\n  pPager->xBusyHandler = xBusyHandler;\n  pPager->pBusyHandlerArg = pBusyHandlerArg;\n  ap = (void **)&pPager->xBusyHandler;\n  assert( ((int(*)(void *))(ap[0]))==xBusyHandler );\n  assert( ap[1]==pBusyHandlerArg );\n  sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_BUSYHANDLER, (void *)ap);\n}\n\n/*\n** Change the page size used by the Pager object. The new page size\n** is passed in *pPageSize.\n**\n** If the pager is in the error state when this function is called, it\n** is a no-op. The value returned is the error state error code (i.e.\n** one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL).\n**\n** Otherwise, if all of the following are true:\n**\n**   * the new page size (value of *pPageSize) is valid (a power\n**     of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and\n**\n**   * there are no outstanding page references, and\n**\n**   * the database is either not an in-memory database or it is\n**     an in-memory database that currently consists of zero pages.\n**\n** then the pager object page size is set to *pPageSize.\n**\n** If the page size is changed, then this function uses sqlite3PagerMalloc()\n** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt\n** fails, SQLITE_NOMEM is returned and the page size remains unchanged.\n** In all other cases, SQLITE_OK is returned.\n**\n** If the page size is not changed, either because one of the enumerated\n** conditions above is not true, the pager was in error state when this\n** function was called, or because the memory allocation attempt failed,\n** then *pPageSize is set to the old, retained page size before returning.\n*/\nSQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){\n  int rc = SQLITE_OK;\n\n  /* It is not possible to do a full assert_pager_state() here, as this\n  ** function may be called from within PagerOpen(), before the state\n  ** of the Pager object is internally consistent.\n  **\n  ** At one point this function returned an error if the pager was in\n  ** PAGER_ERROR state. But since PAGER_ERROR state guarantees that\n  ** there is at least one outstanding page reference, this function\n  ** is a no-op for that case anyhow.\n  */\n\n  u32 pageSize = *pPageSize;\n  assert( pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE) );\n  if( (pPager->memDb==0 || pPager->dbSize==0)\n   && sqlite3PcacheRefCount(pPager->pPCache)==0\n   && pageSize && pageSize!=(u32)pPager->pageSize\n  ){\n    char *pNew = NULL;             /* New temp space */\n    i64 nByte = 0;\n\n    if( pPager->eState>PAGER_OPEN && isOpen(pPager->fd) ){\n      rc = sqlite3OsFileSize(pPager->fd, &nByte);\n    }\n    if( rc==SQLITE_OK ){\n      /* 8 bytes of zeroed overrun space is sufficient so that the b-tree\n      * cell header parser will never run off the end of the allocation */\n      pNew = (char *)sqlite3PageMalloc(pageSize+8);\n      if( !pNew ){\n        rc = SQLITE_NOMEM_BKPT;\n      }else{\n        memset(pNew+pageSize, 0, 8);\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      pager_reset(pPager);\n      rc = sqlite3PcacheSetPageSize(pPager->pPCache, pageSize);\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3PageFree(pPager->pTmpSpace);\n      pPager->pTmpSpace = pNew;\n      pPager->dbSize = (Pgno)((nByte+pageSize-1)/pageSize);\n      pPager->pageSize = pageSize;\n      pPager->lckPgno = (Pgno)(PENDING_BYTE/pageSize) + 1;\n    }else{\n      sqlite3PageFree(pNew);\n    }\n  }\n\n  *pPageSize = pPager->pageSize;\n  if( rc==SQLITE_OK ){\n    if( nReserve<0 ) nReserve = pPager->nReserve;\n    assert( nReserve>=0 && nReserve<1000 );\n    pPager->nReserve = (i16)nReserve;\n    pagerFixMaplimit(pPager);\n  }\n  return rc;\n}\n\n/*\n** Return a pointer to the \"temporary page\" buffer held internally\n** by the pager.  This is a buffer that is big enough to hold the\n** entire content of a database page.  This buffer is used internally\n** during rollback and will be overwritten whenever a rollback\n** occurs.  But other modules are free to use it too, as long as\n** no rollbacks are happening.\n*/\nSQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager *pPager){\n  return pPager->pTmpSpace;\n}\n\n/*\n** Attempt to set the maximum database page count if mxPage is positive.\n** Make no changes if mxPage is zero or negative.  And never reduce the\n** maximum page count below the current size of the database.\n**\n** Regardless of mxPage, return the current maximum page count.\n*/\nSQLITE_PRIVATE Pgno sqlite3PagerMaxPageCount(Pager *pPager, Pgno mxPage){\n  if( mxPage>0 ){\n    pPager->mxPgno = mxPage;\n  }\n  assert( pPager->eState!=PAGER_OPEN );      /* Called only by OP_MaxPgcnt */\n  /* assert( pPager->mxPgno>=pPager->dbSize ); */\n  /* OP_MaxPgcnt ensures that the parameter passed to this function is not\n  ** less than the total number of valid pages in the database. But this\n  ** may be less than Pager.dbSize, and so the assert() above is not valid */\n  return pPager->mxPgno;\n}\n\n/*\n** The following set of routines are used to disable the simulated\n** I/O error mechanism.  These routines are used to avoid simulated\n** errors in places where we do not care about errors.\n**\n** Unless -DSQLITE_TEST=1 is used, these routines are all no-ops\n** and generate no code.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API extern int sqlite3_io_error_pending;\nSQLITE_API extern int sqlite3_io_error_hit;\nstatic int saved_cnt;\nvoid disable_simulated_io_errors(void){\n  saved_cnt = sqlite3_io_error_pending;\n  sqlite3_io_error_pending = -1;\n}\nvoid enable_simulated_io_errors(void){\n  sqlite3_io_error_pending = saved_cnt;\n}\n#else\n# define disable_simulated_io_errors()\n# define enable_simulated_io_errors()\n#endif\n\n/*\n** Read the first N bytes from the beginning of the file into memory\n** that pDest points to.\n**\n** If the pager was opened on a transient file (zFilename==\"\"), or\n** opened on a file less than N bytes in size, the output buffer is\n** zeroed and SQLITE_OK returned. The rationale for this is that this\n** function is used to read database headers, and a new transient or\n** zero sized database has a header than consists entirely of zeroes.\n**\n** If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,\n** the error code is returned to the caller and the contents of the\n** output buffer undefined.\n*/\nSQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){\n  int rc = SQLITE_OK;\n  memset(pDest, 0, N);\n  assert( isOpen(pPager->fd) || pPager->tempFile );\n\n  /* This routine is only called by btree immediately after creating\n  ** the Pager object.  There has not been an opportunity to transition\n  ** to WAL mode yet.\n  */\n  assert( !pagerUseWal(pPager) );\n\n  if( isOpen(pPager->fd) ){\n    IOTRACE((\"DBHDR %p 0 %d\\n\", pPager, N))\n    rc = sqlite3OsRead(pPager->fd, pDest, N, 0);\n    if( rc==SQLITE_IOERR_SHORT_READ ){\n      rc = SQLITE_OK;\n    }\n  }\n  return rc;\n}\n\n/*\n** This function may only be called when a read-transaction is open on\n** the pager. It returns the total number of pages in the database.\n**\n** However, if the file is between 1 and <page-size> bytes in size, then\n** this is considered a 1 page file.\n*/\nSQLITE_PRIVATE void sqlite3PagerPagecount(Pager *pPager, int *pnPage){\n  assert( pPager->eState>=PAGER_READER );\n  assert( pPager->eState!=PAGER_WRITER_FINISHED );\n  *pnPage = (int)pPager->dbSize;\n}\n\n\n/*\n** Try to obtain a lock of type locktype on the database file. If\n** a similar or greater lock is already held, this function is a no-op\n** (returning SQLITE_OK immediately).\n**\n** Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke\n** the busy callback if the lock is currently not available. Repeat\n** until the busy callback returns false or until the attempt to\n** obtain the lock succeeds.\n**\n** Return SQLITE_OK on success and an error code if we cannot obtain\n** the lock. If the lock is obtained successfully, set the Pager.state\n** variable to locktype before returning.\n*/\nstatic int pager_wait_on_lock(Pager *pPager, int locktype){\n  int rc;                              /* Return code */\n\n  /* Check that this is either a no-op (because the requested lock is\n  ** already held), or one of the transitions that the busy-handler\n  ** may be invoked during, according to the comment above\n  ** sqlite3PagerSetBusyhandler().\n  */\n  assert( (pPager->eLock>=locktype)\n       || (pPager->eLock==NO_LOCK && locktype==SHARED_LOCK)\n       || (pPager->eLock==RESERVED_LOCK && locktype==EXCLUSIVE_LOCK)\n  );\n\n  do {\n    rc = pagerLockDb(pPager, locktype);\n  }while( rc==SQLITE_BUSY && pPager->xBusyHandler(pPager->pBusyHandlerArg) );\n  return rc;\n}\n\n/*\n** Function assertTruncateConstraint(pPager) checks that one of the\n** following is true for all dirty pages currently in the page-cache:\n**\n**   a) The page number is less than or equal to the size of the\n**      current database image, in pages, OR\n**\n**   b) if the page content were written at this time, it would not\n**      be necessary to write the current content out to the sub-journal.\n**\n** If the condition asserted by this function were not true, and the\n** dirty page were to be discarded from the cache via the pagerStress()\n** routine, pagerStress() would not write the current page content to\n** the database file. If a savepoint transaction were rolled back after\n** this happened, the correct behavior would be to restore the current\n** content of the page. However, since this content is not present in either\n** the database file or the portion of the rollback journal and\n** sub-journal rolled back the content could not be restored and the\n** database image would become corrupt. It is therefore fortunate that\n** this circumstance cannot arise.\n*/\n#if defined(SQLITE_DEBUG)\nstatic void assertTruncateConstraintCb(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  assert( pPg->flags&PGHDR_DIRTY );\n  if( pPg->pgno>pPager->dbSize ){      /* if (a) is false */\n    Pgno pgno = pPg->pgno;\n    int i;\n    for(i=0; i<pPg->pPager->nSavepoint; i++){\n      PagerSavepoint *p = &pPager->aSavepoint[i];\n      assert( p->nOrig<pgno || sqlite3BitvecTestNotNull(p->pInSavepoint,pgno) );\n    }\n  }\n}\nstatic void assertTruncateConstraint(Pager *pPager){\n  sqlite3PcacheIterateDirty(pPager->pPCache, assertTruncateConstraintCb);\n}\n#else\n# define assertTruncateConstraint(pPager)\n#endif\n\n/*\n** Truncate the in-memory database file image to nPage pages. This\n** function does not actually modify the database file on disk. It\n** just sets the internal state of the pager object so that the\n** truncation will be done when the current transaction is committed.\n**\n** This function is only called right before committing a transaction.\n** Once this function has been called, the transaction must either be\n** rolled back or committed. It is not safe to call this function and\n** then continue writing to the database.\n*/\nSQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){\n  assert( pPager->dbSize>=nPage || CORRUPT_DB );\n  assert( pPager->eState>=PAGER_WRITER_CACHEMOD );\n  pPager->dbSize = nPage;\n\n  /* At one point the code here called assertTruncateConstraint() to\n  ** ensure that all pages being truncated away by this operation are,\n  ** if one or more savepoints are open, present in the savepoint\n  ** journal so that they can be restored if the savepoint is rolled\n  ** back. This is no longer necessary as this function is now only\n  ** called right before committing a transaction. So although the\n  ** Pager object may still have open savepoints (Pager.nSavepoint!=0),\n  ** they cannot be rolled back. So the assertTruncateConstraint() call\n  ** is no longer correct. */\n}\n\n\n/*\n** This function is called before attempting a hot-journal rollback. It\n** syncs the journal file to disk, then sets pPager->journalHdr to the\n** size of the journal file so that the pager_playback() routine knows\n** that the entire journal file has been synced.\n**\n** Syncing a hot-journal to disk before attempting to roll it back ensures\n** that if a power-failure occurs during the rollback, the process that\n** attempts rollback following system recovery sees the same journal\n** content as this process.\n**\n** If everything goes as planned, SQLITE_OK is returned. Otherwise,\n** an SQLite error code.\n*/\nstatic int pagerSyncHotJournal(Pager *pPager){\n  int rc = SQLITE_OK;\n  if( !pPager->noSync ){\n    rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_NORMAL);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3OsFileSize(pPager->jfd, &pPager->journalHdr);\n  }\n  return rc;\n}\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/*\n** Obtain a reference to a memory mapped page object for page number pgno.\n** The new object will use the pointer pData, obtained from xFetch().\n** If successful, set *ppPage to point to the new page reference\n** and return SQLITE_OK. Otherwise, return an SQLite error code and set\n** *ppPage to zero.\n**\n** Page references obtained by calling this function should be released\n** by calling pagerReleaseMapPage().\n*/\nstatic int pagerAcquireMapPage(\n  Pager *pPager,                  /* Pager object */\n  Pgno pgno,                      /* Page number */\n  void *pData,                    /* xFetch()'d data for this page */\n  PgHdr **ppPage                  /* OUT: Acquired page object */\n){\n  PgHdr *p;                       /* Memory mapped page to return */\n\n  if( pPager->pMmapFreelist ){\n    *ppPage = p = pPager->pMmapFreelist;\n    pPager->pMmapFreelist = p->pDirty;\n    p->pDirty = 0;\n    assert( pPager->nExtra>=8 );\n    memset(p->pExtra, 0, 8);\n  }else{\n    *ppPage = p = (PgHdr *)sqlite3MallocZero(sizeof(PgHdr) + pPager->nExtra);\n    if( p==0 ){\n      sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1) * pPager->pageSize, pData);\n      return SQLITE_NOMEM_BKPT;\n    }\n    p->pExtra = (void *)&p[1];\n    assert( EIGHT_BYTE_ALIGNMENT( p->pExtra ) );\n    p->flags = PGHDR_MMAP;\n    p->nRef = 1;\n    p->pPager = pPager;\n  }\n\n  assert( p->pExtra==(void *)&p[1] );\n  assert( p->pPage==0 );\n  assert( p->flags==PGHDR_MMAP );\n  assert( p->pPager==pPager );\n  assert( p->nRef==1 );\n\n  p->pgno = pgno;\n  p->pData = pData;\n  pPager->nMmapOut++;\n\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** Release a reference to page pPg. pPg must have been returned by an\n** earlier call to pagerAcquireMapPage().\n*/\nstatic void pagerReleaseMapPage(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  pPager->nMmapOut--;\n  pPg->pDirty = pPager->pMmapFreelist;\n  pPager->pMmapFreelist = pPg;\n\n  assert( pPager->fd->pMethods->iVersion>=3 );\n  sqlite3OsUnfetch(pPager->fd, (i64)(pPg->pgno-1)*pPager->pageSize, pPg->pData);\n}\n\n/*\n** Free all PgHdr objects stored in the Pager.pMmapFreelist list.\n*/\nstatic void pagerFreeMapHdrs(Pager *pPager){\n  PgHdr *p;\n  PgHdr *pNext;\n  for(p=pPager->pMmapFreelist; p; p=pNext){\n    pNext = p->pDirty;\n    sqlite3_free(p);\n  }\n}\n\n/* Verify that the database file has not be deleted or renamed out from\n** under the pager.  Return SQLITE_OK if the database is still where it ought\n** to be on disk.  Return non-zero (SQLITE_READONLY_DBMOVED or some other error\n** code from sqlite3OsAccess()) if the database has gone missing.\n*/\nstatic int databaseIsUnmoved(Pager *pPager){\n  int bHasMoved = 0;\n  int rc;\n\n  if( pPager->tempFile ) return SQLITE_OK;\n  if( pPager->dbSize==0 ) return SQLITE_OK;\n  assert( pPager->zFilename && pPager->zFilename[0] );\n  rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_HAS_MOVED, &bHasMoved);\n  if( rc==SQLITE_NOTFOUND ){\n    /* If the HAS_MOVED file-control is unimplemented, assume that the file\n    ** has not been moved.  That is the historical behavior of SQLite: prior to\n    ** version 3.8.3, it never checked */\n    rc = SQLITE_OK;\n  }else if( rc==SQLITE_OK && bHasMoved ){\n    rc = SQLITE_READONLY_DBMOVED;\n  }\n  return rc;\n}\n\n\n/*\n** Shutdown the page cache.  Free all memory and close all files.\n**\n** If a transaction was in progress when this routine is called, that\n** transaction is rolled back.  All outstanding pages are invalidated\n** and their memory is freed.  Any attempt to use a page associated\n** with this page cache after this function returns will likely\n** result in a coredump.\n**\n** This function always succeeds. If a transaction is active an attempt\n** is made to roll it back. If an error occurs during the rollback\n** a hot journal may be left in the filesystem but no error is returned\n** to the caller.\n*/\nSQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager, sqlite3 *db){\n  u8 *pTmp = (u8*)pPager->pTmpSpace;\n  assert( db || pagerUseWal(pPager)==0 );\n  assert( assert_pager_state(pPager) );\n  disable_simulated_io_errors();\n  sqlite3BeginBenignMalloc();\n  pagerFreeMapHdrs(pPager);\n  /* pPager->errCode = 0; */\n  pPager->exclusiveMode = 0;\n#ifndef SQLITE_OMIT_WAL\n  {\n    u8 *a = 0;\n    assert( db || pPager->pWal==0 );\n    if( db && 0==(db->flags & SQLITE_NoCkptOnClose)\n     && SQLITE_OK==databaseIsUnmoved(pPager)\n    ){\n      a = pTmp;\n    }\n    sqlite3WalClose(pPager->pWal, db, pPager->walSyncFlags, pPager->pageSize,a);\n    pPager->pWal = 0;\n  }\n#endif\n  pager_reset(pPager);\n  if( MEMDB ){\n    pager_unlock(pPager);\n  }else{\n    /* If it is open, sync the journal file before calling UnlockAndRollback.\n    ** If this is not done, then an unsynced portion of the open journal\n    ** file may be played back into the database. If a power failure occurs\n    ** while this is happening, the database could become corrupt.\n    **\n    ** If an error occurs while trying to sync the journal, shift the pager\n    ** into the ERROR state. This causes UnlockAndRollback to unlock the\n    ** database and close the journal file without attempting to roll it\n    ** back or finalize it. The next database user will have to do hot-journal\n    ** rollback before accessing the database file.\n    */\n    if( isOpen(pPager->jfd) ){\n      pager_error(pPager, pagerSyncHotJournal(pPager));\n    }\n    pagerUnlockAndRollback(pPager);\n  }\n  sqlite3EndBenignMalloc();\n  enable_simulated_io_errors();\n  PAGERTRACE((\"CLOSE %d\\n\", PAGERID(pPager)));\n  IOTRACE((\"CLOSE %p\\n\", pPager))\n  sqlite3OsClose(pPager->jfd);\n  sqlite3OsClose(pPager->fd);\n  sqlite3PageFree(pTmp);\n  sqlite3PcacheClose(pPager->pPCache);\n  assert( !pPager->aSavepoint && !pPager->pInJournal );\n  assert( !isOpen(pPager->jfd) && !isOpen(pPager->sjfd) );\n\n  sqlite3_free(pPager);\n  return SQLITE_OK;\n}\n\n#if !defined(NDEBUG) || defined(SQLITE_TEST)\n/*\n** Return the page number for page pPg.\n*/\nSQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage *pPg){\n  return pPg->pgno;\n}\n#endif\n\n/*\n** Increment the reference count for page pPg.\n*/\nSQLITE_PRIVATE void sqlite3PagerRef(DbPage *pPg){\n  sqlite3PcacheRef(pPg);\n}\n\n/*\n** Sync the journal. In other words, make sure all the pages that have\n** been written to the journal have actually reached the surface of the\n** disk and can be restored in the event of a hot-journal rollback.\n**\n** If the Pager.noSync flag is set, then this function is a no-op.\n** Otherwise, the actions required depend on the journal-mode and the\n** device characteristics of the file-system, as follows:\n**\n**   * If the journal file is an in-memory journal file, no action need\n**     be taken.\n**\n**   * Otherwise, if the device does not support the SAFE_APPEND property,\n**     then the nRec field of the most recently written journal header\n**     is updated to contain the number of journal records that have\n**     been written following it. If the pager is operating in full-sync\n**     mode, then the journal file is synced before this field is updated.\n**\n**   * If the device does not support the SEQUENTIAL property, then\n**     journal file is synced.\n**\n** Or, in pseudo-code:\n**\n**   if( NOT <in-memory journal> ){\n**     if( NOT SAFE_APPEND ){\n**       if( <full-sync mode> ) xSync(<journal file>);\n**       <update nRec field>\n**     }\n**     if( NOT SEQUENTIAL ) xSync(<journal file>);\n**   }\n**\n** If successful, this routine clears the PGHDR_NEED_SYNC flag of every\n** page currently held in memory before returning SQLITE_OK. If an IO\n** error is encountered, then the IO error code is returned to the caller.\n*/\nstatic int syncJournal(Pager *pPager, int newHdr){\n  int rc;                         /* Return code */\n\n  assert( pPager->eState==PAGER_WRITER_CACHEMOD\n       || pPager->eState==PAGER_WRITER_DBMOD\n  );\n  assert( assert_pager_state(pPager) );\n  assert( !pagerUseWal(pPager) );\n\n  rc = sqlite3PagerExclusiveLock(pPager);\n  if( rc!=SQLITE_OK ) return rc;\n\n  if( !pPager->noSync ){\n    assert( !pPager->tempFile );\n    if( isOpen(pPager->jfd) && pPager->journalMode!=PAGER_JOURNALMODE_MEMORY ){\n      const int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);\n      assert( isOpen(pPager->jfd) );\n\n      if( 0==(iDc&SQLITE_IOCAP_SAFE_APPEND) ){\n        /* This block deals with an obscure problem. If the last connection\n        ** that wrote to this database was operating in persistent-journal\n        ** mode, then the journal file may at this point actually be larger\n        ** than Pager.journalOff bytes. If the next thing in the journal\n        ** file happens to be a journal-header (written as part of the\n        ** previous connection's transaction), and a crash or power-failure\n        ** occurs after nRec is updated but before this connection writes\n        ** anything else to the journal file (or commits/rolls back its\n        ** transaction), then SQLite may become confused when doing the\n        ** hot-journal rollback following recovery. It may roll back all\n        ** of this connections data, then proceed to rolling back the old,\n        ** out-of-date data that follows it. Database corruption.\n        **\n        ** To work around this, if the journal file does appear to contain\n        ** a valid header following Pager.journalOff, then write a 0x00\n        ** byte to the start of it to prevent it from being recognized.\n        **\n        ** Variable iNextHdrOffset is set to the offset at which this\n        ** problematic header will occur, if it exists. aMagic is used\n        ** as a temporary buffer to inspect the first couple of bytes of\n        ** the potential journal header.\n        */\n        i64 iNextHdrOffset;\n        u8 aMagic[8];\n        u8 zHeader[sizeof(aJournalMagic)+4];\n\n        memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));\n        put32bits(&zHeader[sizeof(aJournalMagic)], pPager->nRec);\n\n        iNextHdrOffset = journalHdrOffset(pPager);\n        rc = sqlite3OsRead(pPager->jfd, aMagic, 8, iNextHdrOffset);\n        if( rc==SQLITE_OK && 0==memcmp(aMagic, aJournalMagic, 8) ){\n          static const u8 zerobyte = 0;\n          rc = sqlite3OsWrite(pPager->jfd, &zerobyte, 1, iNextHdrOffset);\n        }\n        if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){\n          return rc;\n        }\n\n        /* Write the nRec value into the journal file header. If in\n        ** full-synchronous mode, sync the journal first. This ensures that\n        ** all data has really hit the disk before nRec is updated to mark\n        ** it as a candidate for rollback.\n        **\n        ** This is not required if the persistent media supports the\n        ** SAFE_APPEND property. Because in this case it is not possible\n        ** for garbage data to be appended to the file, the nRec field\n        ** is populated with 0xFFFFFFFF when the journal header is written\n        ** and never needs to be updated.\n        */\n        if( pPager->fullSync && 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){\n          PAGERTRACE((\"SYNC journal of %d\\n\", PAGERID(pPager)));\n          IOTRACE((\"JSYNC %p\\n\", pPager))\n          rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);\n          if( rc!=SQLITE_OK ) return rc;\n        }\n        IOTRACE((\"JHDR %p %lld\\n\", pPager, pPager->journalHdr));\n        rc = sqlite3OsWrite(\n            pPager->jfd, zHeader, sizeof(zHeader), pPager->journalHdr\n        );\n        if( rc!=SQLITE_OK ) return rc;\n      }\n      if( 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){\n        PAGERTRACE((\"SYNC journal of %d\\n\", PAGERID(pPager)));\n        IOTRACE((\"JSYNC %p\\n\", pPager))\n        rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags|\n          (pPager->syncFlags==SQLITE_SYNC_FULL?SQLITE_SYNC_DATAONLY:0)\n        );\n        if( rc!=SQLITE_OK ) return rc;\n      }\n\n      pPager->journalHdr = pPager->journalOff;\n      if( newHdr && 0==(iDc&SQLITE_IOCAP_SAFE_APPEND) ){\n        pPager->nRec = 0;\n        rc = writeJournalHdr(pPager);\n        if( rc!=SQLITE_OK ) return rc;\n      }\n    }else{\n      pPager->journalHdr = pPager->journalOff;\n    }\n  }\n\n  /* Unless the pager is in noSync mode, the journal file was just\n  ** successfully synced. Either way, clear the PGHDR_NEED_SYNC flag on\n  ** all pages.\n  */\n  sqlite3PcacheClearSyncFlags(pPager->pPCache);\n  pPager->eState = PAGER_WRITER_DBMOD;\n  assert( assert_pager_state(pPager) );\n  return SQLITE_OK;\n}\n\n/*\n** The argument is the first in a linked list of dirty pages connected\n** by the PgHdr.pDirty pointer. This function writes each one of the\n** in-memory pages in the list to the database file. The argument may\n** be NULL, representing an empty list. In this case this function is\n** a no-op.\n**\n** The pager must hold at least a RESERVED lock when this function\n** is called. Before writing anything to the database file, this lock\n** is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,\n** SQLITE_BUSY is returned and no data is written to the database file.\n**\n** If the pager is a temp-file pager and the actual file-system file\n** is not yet open, it is created and opened before any data is\n** written out.\n**\n** Once the lock has been upgraded and, if necessary, the file opened,\n** the pages are written out to the database file in list order. Writing\n** a page is skipped if it meets either of the following criteria:\n**\n**   * The page number is greater than Pager.dbSize, or\n**   * The PGHDR_DONT_WRITE flag is set on the page.\n**\n** If writing out a page causes the database file to grow, Pager.dbFileSize\n** is updated accordingly. If page 1 is written out, then the value cached\n** in Pager.dbFileVers[] is updated to match the new value stored in\n** the database file.\n**\n** If everything is successful, SQLITE_OK is returned. If an IO error\n** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot\n** be obtained, SQLITE_BUSY is returned.\n*/\nstatic int pager_write_pagelist(Pager *pPager, PgHdr *pList){\n  int rc = SQLITE_OK;                  /* Return code */\n\n  /* This function is only called for rollback pagers in WRITER_DBMOD state. */\n  assert( !pagerUseWal(pPager) );\n  assert( pPager->tempFile || pPager->eState==PAGER_WRITER_DBMOD );\n  assert( pPager->eLock==EXCLUSIVE_LOCK );\n  assert( isOpen(pPager->fd) || pList->pDirty==0 );\n\n  /* If the file is a temp-file has not yet been opened, open it now. It\n  ** is not possible for rc to be other than SQLITE_OK if this branch\n  ** is taken, as pager_wait_on_lock() is a no-op for temp-files.\n  */\n  if( !isOpen(pPager->fd) ){\n    assert( pPager->tempFile && rc==SQLITE_OK );\n    rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags);\n  }\n\n  /* Before the first write, give the VFS a hint of what the final\n  ** file size will be.\n  */\n  assert( rc!=SQLITE_OK || isOpen(pPager->fd) );\n  if( rc==SQLITE_OK\n   && pPager->dbHintSize<pPager->dbSize\n   && (pList->pDirty || pList->pgno>pPager->dbHintSize)\n  ){\n    sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;\n    sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);\n    pPager->dbHintSize = pPager->dbSize;\n  }\n\n  while( rc==SQLITE_OK && pList ){\n    Pgno pgno = pList->pgno;\n\n    /* If there are dirty pages in the page cache with page numbers greater\n    ** than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to\n    ** make the file smaller (presumably by auto-vacuum code). Do not write\n    ** any such pages to the file.\n    **\n    ** Also, do not write out any page that has the PGHDR_DONT_WRITE flag\n    ** set (set by sqlite3PagerDontWrite()).\n    */\n    if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){\n      i64 offset = (pgno-1)*(i64)pPager->pageSize;   /* Offset to write */\n      char *pData;                                   /* Data to write */\n\n      assert( (pList->flags&PGHDR_NEED_SYNC)==0 );\n      if( pList->pgno==1 ) pager_write_changecounter(pList);\n\n      pData = pList->pData;\n\n      /* Write out the page data. */\n      rc = sqlite3OsWrite(pPager->fd, pData, pPager->pageSize, offset);\n\n      /* If page 1 was just written, update Pager.dbFileVers to match\n      ** the value now stored in the database file. If writing this\n      ** page caused the database file to grow, update dbFileSize.\n      */\n      if( pgno==1 ){\n        memcpy(&pPager->dbFileVers, &pData[24], sizeof(pPager->dbFileVers));\n      }\n      if( pgno>pPager->dbFileSize ){\n        pPager->dbFileSize = pgno;\n      }\n      pPager->aStat[PAGER_STAT_WRITE]++;\n\n      /* Update any backup objects copying the contents of this pager. */\n      sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)pList->pData);\n\n      PAGERTRACE((\"STORE %d page %d hash(%08x)\\n\",\n                   PAGERID(pPager), pgno, pager_pagehash(pList)));\n      IOTRACE((\"PGOUT %p %d\\n\", pPager, pgno));\n      PAGER_INCR(sqlite3_pager_writedb_count);\n    }else{\n      PAGERTRACE((\"NOSTORE %d page %d\\n\", PAGERID(pPager), pgno));\n    }\n    pager_set_pagehash(pList);\n    pList = pList->pDirty;\n  }\n\n  return rc;\n}\n\n/*\n** Ensure that the sub-journal file is open. If it is already open, this\n** function is a no-op.\n**\n** SQLITE_OK is returned if everything goes according to plan. An\n** SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen()\n** fails.\n*/\nstatic int openSubJournal(Pager *pPager){\n  int rc = SQLITE_OK;\n  if( !isOpen(pPager->sjfd) ){\n    const int flags =  SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE\n      | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE\n      | SQLITE_OPEN_DELETEONCLOSE;\n    int nStmtSpill = sqlite3Config.nStmtSpill;\n    if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->subjInMemory ){\n      nStmtSpill = -1;\n    }\n    rc = sqlite3JournalOpen(pPager->pVfs, 0, pPager->sjfd, flags, nStmtSpill);\n  }\n  return rc;\n}\n\n/*\n** Append a record of the current state of page pPg to the sub-journal.\n**\n** If successful, set the bit corresponding to pPg->pgno in the bitvecs\n** for all open savepoints before returning.\n**\n** This function returns SQLITE_OK if everything is successful, an IO\n** error code if the attempt to write to the sub-journal fails, or\n** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint\n** bitvec.\n*/\nstatic int subjournalPage(PgHdr *pPg){\n  int rc = SQLITE_OK;\n  Pager *pPager = pPg->pPager;\n  if( pPager->journalMode!=PAGER_JOURNALMODE_OFF ){\n\n    /* Open the sub-journal, if it has not already been opened */\n    assert( pPager->useJournal );\n    assert( isOpen(pPager->jfd) || pagerUseWal(pPager) );\n    assert( isOpen(pPager->sjfd) || pPager->nSubRec==0 );\n    assert( pagerUseWal(pPager)\n         || pageInJournal(pPager, pPg)\n         || pPg->pgno>pPager->dbOrigSize\n    );\n    rc = openSubJournal(pPager);\n\n    /* If the sub-journal was opened successfully (or was already open),\n    ** write the journal record into the file.  */\n    if( rc==SQLITE_OK ){\n      void *pData = pPg->pData;\n      i64 offset = (i64)pPager->nSubRec*(4+pPager->pageSize);\n      char *pData2;\n      pData2 = pData;\n      PAGERTRACE((\"STMT-JOURNAL %d page %d\\n\", PAGERID(pPager), pPg->pgno));\n      rc = write32bits(pPager->sjfd, offset, pPg->pgno);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3OsWrite(pPager->sjfd, pData2, pPager->pageSize, offset+4);\n      }\n    }\n  }\n  if( rc==SQLITE_OK ){\n    pPager->nSubRec++;\n    assert( pPager->nSavepoint>0 );\n    rc = addToSavepointBitvecs(pPager, pPg->pgno);\n  }\n  return rc;\n}\nstatic int subjournalPageIfRequired(PgHdr *pPg){\n  if( subjRequiresPage(pPg) ){\n    return subjournalPage(pPg);\n  }else{\n    return SQLITE_OK;\n  }\n}\n\n/*\n** This function is called by the pcache layer when it has reached some\n** soft memory limit. The first argument is a pointer to a Pager object\n** (cast as a void*). The pager is always 'purgeable' (not an in-memory\n** database). The second argument is a reference to a page that is\n** currently dirty but has no outstanding references. The page\n** is always associated with the Pager object passed as the first\n** argument.\n**\n** The job of this function is to make pPg clean by writing its contents\n** out to the database file, if possible. This may involve syncing the\n** journal file.\n**\n** If successful, sqlite3PcacheMakeClean() is called on the page and\n** SQLITE_OK returned. If an IO error occurs while trying to make the\n** page clean, the IO error code is returned. If the page cannot be\n** made clean for some other reason, but no error occurs, then SQLITE_OK\n** is returned by sqlite3PcacheMakeClean() is not called.\n*/\nstatic int pagerStress(void *p, PgHdr *pPg){\n  Pager *pPager = (Pager *)p;\n  int rc = SQLITE_OK;\n\n  assert( pPg->pPager==pPager );\n  assert( pPg->flags&PGHDR_DIRTY );\n\n  /* The doNotSpill NOSYNC bit is set during times when doing a sync of\n  ** journal (and adding a new header) is not allowed.  This occurs\n  ** during calls to sqlite3PagerWrite() while trying to journal multiple\n  ** pages belonging to the same sector.\n  **\n  ** The doNotSpill ROLLBACK and OFF bits inhibits all cache spilling\n  ** regardless of whether or not a sync is required.  This is set during\n  ** a rollback or by user request, respectively.\n  **\n  ** Spilling is also prohibited when in an error state since that could\n  ** lead to database corruption.   In the current implementation it\n  ** is impossible for sqlite3PcacheFetch() to be called with createFlag==3\n  ** while in the error state, hence it is impossible for this routine to\n  ** be called in the error state.  Nevertheless, we include a NEVER()\n  ** test for the error state as a safeguard against future changes.\n  */\n  if( NEVER(pPager->errCode) ) return SQLITE_OK;\n  testcase( pPager->doNotSpill & SPILLFLAG_ROLLBACK );\n  testcase( pPager->doNotSpill & SPILLFLAG_OFF );\n  testcase( pPager->doNotSpill & SPILLFLAG_NOSYNC );\n  if( pPager->doNotSpill\n   && ((pPager->doNotSpill & (SPILLFLAG_ROLLBACK|SPILLFLAG_OFF))!=0\n      || (pPg->flags & PGHDR_NEED_SYNC)!=0)\n  ){\n    return SQLITE_OK;\n  }\n\n  pPager->aStat[PAGER_STAT_SPILL]++;\n  pPg->pDirty = 0;\n  if( pagerUseWal(pPager) ){\n    /* Write a single frame for this page to the log. */\n    rc = subjournalPageIfRequired(pPg);\n    if( rc==SQLITE_OK ){\n      rc = pagerWalFrames(pPager, pPg, 0, 0);\n    }\n  }else{\n\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n    if( pPager->tempFile==0 ){\n      rc = sqlite3JournalCreate(pPager->jfd);\n      if( rc!=SQLITE_OK ) return pager_error(pPager, rc);\n    }\n#endif\n\n    /* Sync the journal file if required. */\n    if( pPg->flags&PGHDR_NEED_SYNC\n     || pPager->eState==PAGER_WRITER_CACHEMOD\n    ){\n      rc = syncJournal(pPager, 1);\n    }\n\n    /* Write the contents of the page out to the database file. */\n    if( rc==SQLITE_OK ){\n      assert( (pPg->flags&PGHDR_NEED_SYNC)==0 );\n      rc = pager_write_pagelist(pPager, pPg);\n    }\n  }\n\n  /* Mark the page as clean. */\n  if( rc==SQLITE_OK ){\n    PAGERTRACE((\"STRESS %d page %d\\n\", PAGERID(pPager), pPg->pgno));\n    sqlite3PcacheMakeClean(pPg);\n  }\n\n  return pager_error(pPager, rc);\n}\n\n/*\n** Flush all unreferenced dirty pages to disk.\n*/\nSQLITE_PRIVATE int sqlite3PagerFlush(Pager *pPager){\n  int rc = pPager->errCode;\n  if( !MEMDB ){\n    PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);\n    assert( assert_pager_state(pPager) );\n    while( rc==SQLITE_OK && pList ){\n      PgHdr *pNext = pList->pDirty;\n      if( pList->nRef==0 ){\n        rc = pagerStress((void*)pPager, pList);\n      }\n      pList = pNext;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Allocate and initialize a new Pager object and put a pointer to it\n** in *ppPager. The pager should eventually be freed by passing it\n** to sqlite3PagerClose().\n**\n** The zFilename argument is the path to the database file to open.\n** If zFilename is NULL then a randomly-named temporary file is created\n** and used as the file to be cached. Temporary files are be deleted\n** automatically when they are closed. If zFilename is \":memory:\" then\n** all information is held in cache. It is never written to disk.\n** This can be used to implement an in-memory database.\n**\n** The nExtra parameter specifies the number of bytes of space allocated\n** along with each page reference. This space is available to the user\n** via the sqlite3PagerGetExtra() API.  When a new page is allocated, the\n** first 8 bytes of this space are zeroed but the remainder is uninitialized.\n** (The extra space is used by btree as the MemPage object.)\n**\n** The flags argument is used to specify properties that affect the\n** operation of the pager. It should be passed some bitwise combination\n** of the PAGER_* flags.\n**\n** The vfsFlags parameter is a bitmask to pass to the flags parameter\n** of the xOpen() method of the supplied VFS when opening files.\n**\n** If the pager object is allocated and the specified file opened\n** successfully, SQLITE_OK is returned and *ppPager set to point to\n** the new pager object. If an error occurs, *ppPager is set to NULL\n** and error code returned. This function may return SQLITE_NOMEM\n** (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or\n** various SQLITE_IO_XXX errors.\n*/\nSQLITE_PRIVATE int sqlite3PagerOpen(\n  sqlite3_vfs *pVfs,       /* The virtual file system to use */\n  Pager **ppPager,         /* OUT: Return the Pager structure here */\n  const char *zFilename,   /* Name of the database file to open */\n  int nExtra,              /* Extra bytes append to each in-memory page */\n  int flags,               /* flags controlling this file */\n  int vfsFlags,            /* flags passed through to sqlite3_vfs.xOpen() */\n  void (*xReinit)(DbPage*) /* Function to reinitialize pages */\n){\n  u8 *pPtr;\n  Pager *pPager = 0;       /* Pager object to allocate and return */\n  int rc = SQLITE_OK;      /* Return code */\n  int tempFile = 0;        /* True for temp files (incl. in-memory files) */\n  int memDb = 0;           /* True if this is an in-memory file */\n  int memJM = 0;           /* Memory journal mode */\n  int readOnly = 0;        /* True if this is a read-only file */\n  int journalFileSize;     /* Bytes to allocate for each journal fd */\n  char *zPathname = 0;     /* Full path to database file */\n  int nPathname = 0;       /* Number of bytes in zPathname */\n  int useJournal = (flags & PAGER_OMIT_JOURNAL)==0; /* False to omit journal */\n  int pcacheSize = sqlite3PcacheSize();       /* Bytes to allocate for PCache */\n  u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE;  /* Default page size */\n  const char *zUri = 0;    /* URI args to copy */\n  int nUriByte = 1;        /* Number of bytes of URI args at *zUri */\n\n\n  /* Figure out how much space is required for each journal file-handle\n  ** (there are two of them, the main journal and the sub-journal).  */\n  journalFileSize = ROUND8(sqlite3JournalSize(pVfs));\n\n  /* Set the output variable to NULL in case an error occurs. */\n  *ppPager = 0;\n\n#ifndef SQLITE_OMIT_MEMORYDB\n  if( flags & PAGER_MEMORY ){\n    memDb = 1;\n    if( zFilename && zFilename[0] ){\n      zPathname = sqlite3DbStrDup(0, zFilename);\n      if( zPathname==0  ) return SQLITE_NOMEM_BKPT;\n      nPathname = sqlite3Strlen30(zPathname);\n      zFilename = 0;\n    }\n  }\n#endif\n\n  /* Compute and store the full pathname in an allocated buffer pointed\n  ** to by zPathname, length nPathname. Or, if this is a temporary file,\n  ** leave both nPathname and zPathname set to 0.\n  */\n  if( zFilename && zFilename[0] ){\n    const char *z;\n    nPathname = pVfs->mxPathname + 1;\n    zPathname = sqlite3DbMallocRaw(0, 2*(i64)nPathname);\n    if( zPathname==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */\n    rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);\n    if( rc!=SQLITE_OK ){\n      if( rc==SQLITE_OK_SYMLINK ){\n        if( vfsFlags & SQLITE_OPEN_NOFOLLOW ){\n          rc = SQLITE_CANTOPEN_SYMLINK;\n        }else{\n          rc = SQLITE_OK;\n        }\n      }\n    }\n    nPathname = sqlite3Strlen30(zPathname);\n    z = zUri = &zFilename[sqlite3Strlen30(zFilename)+1];\n    while( *z ){\n      z += strlen(z)+1;\n      z += strlen(z)+1;\n    }\n    nUriByte = (int)(&z[1] - zUri);\n    assert( nUriByte>=1 );\n    if( rc==SQLITE_OK && nPathname+8>pVfs->mxPathname ){\n      /* This branch is taken when the journal path required by\n      ** the database being opened will be more than pVfs->mxPathname\n      ** bytes in length. This means the database cannot be opened,\n      ** as it will not be possible to open the journal file or even\n      ** check for a hot-journal before reading.\n      */\n      rc = SQLITE_CANTOPEN_BKPT;\n    }\n    if( rc!=SQLITE_OK ){\n      sqlite3DbFree(0, zPathname);\n      return rc;\n    }\n  }\n\n  /* Allocate memory for the Pager structure, PCache object, the\n  ** three file descriptors, the database file name and the journal\n  ** file name. The layout in memory is as follows:\n  **\n  **     Pager object                    (sizeof(Pager) bytes)\n  **     PCache object                   (sqlite3PcacheSize() bytes)\n  **     Database file handle            (pVfs->szOsFile bytes)\n  **     Sub-journal file handle         (journalFileSize bytes)\n  **     Main journal file handle        (journalFileSize bytes)\n  **     Ptr back to the Pager           (sizeof(Pager*) bytes)\n  **     \\0\\0\\0\\0 database prefix        (4 bytes)\n  **     Database file name              (nPathname+1 bytes)\n  **     URI query parameters            (nUriByte bytes)\n  **     Journal filename                (nPathname+8+1 bytes)\n  **     WAL filename                    (nPathname+4+1 bytes)\n  **     \\0\\0\\0 terminator               (3 bytes)\n  **\n  ** Some 3rd-party software, over which we have no control, depends on\n  ** the specific order of the filenames and the \\0 separators between them\n  ** so that it can (for example) find the database filename given the WAL\n  ** filename without using the sqlite3_filename_database() API.  This is a\n  ** misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party\n  ** software is in widespread use, so we try to avoid changing the filename\n  ** order and formatting if possible.  In particular, the details of the\n  ** filename format expected by 3rd-party software should be as follows:\n  **\n  **   - Main Database Path\n  **   - \\0\n  **   - Multiple URI components consisting of:\n  **     - Key\n  **     - \\0\n  **     - Value\n  **     - \\0\n  **   - \\0\n  **   - Journal Path\n  **   - \\0\n  **   - WAL Path (zWALName)\n  **   - \\0\n  **\n  ** The sqlite3_create_filename() interface and the databaseFilename() utility\n  ** that is used by sqlite3_filename_database() and kin also depend on the\n  ** specific formatting and order of the various filenames, so if the format\n  ** changes here, be sure to change it there as well.\n  */\n  assert( SQLITE_PTRSIZE==sizeof(Pager*) );\n  pPtr = (u8 *)sqlite3MallocZero(\n    ROUND8(sizeof(*pPager)) +            /* Pager structure */\n    ROUND8(pcacheSize) +                 /* PCache object */\n    ROUND8(pVfs->szOsFile) +             /* The main db file */\n    (u64)journalFileSize * 2 +           /* The two journal files */\n    SQLITE_PTRSIZE +                     /* Space to hold a pointer */\n    4 +                                  /* Database prefix */\n    (u64)nPathname + 1 +                 /* database filename */\n    (u64)nUriByte +                      /* query parameters */\n    (u64)nPathname + 8 + 1 +             /* Journal filename */\n#ifndef SQLITE_OMIT_WAL\n    (u64)nPathname + 4 + 1 +             /* WAL filename */\n#endif\n    3                                    /* Terminator */\n  );\n  assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) );\n  if( !pPtr ){\n    sqlite3DbFree(0, zPathname);\n    return SQLITE_NOMEM_BKPT;\n  }\n  pPager = (Pager*)pPtr;                  pPtr += ROUND8(sizeof(*pPager));\n  pPager->pPCache = (PCache*)pPtr;        pPtr += ROUND8(pcacheSize);\n  pPager->fd = (sqlite3_file*)pPtr;       pPtr += ROUND8(pVfs->szOsFile);\n  pPager->sjfd = (sqlite3_file*)pPtr;     pPtr += journalFileSize;\n  pPager->jfd =  (sqlite3_file*)pPtr;     pPtr += journalFileSize;\n  assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );\n  memcpy(pPtr, &pPager, SQLITE_PTRSIZE);  pPtr += SQLITE_PTRSIZE;\n\n  /* Fill in the Pager.zFilename and pPager.zQueryParam fields */\n                                          pPtr += 4;  /* Skip zero prefix */\n  pPager->zFilename = (char*)pPtr;\n  if( nPathname>0 ){\n    memcpy(pPtr, zPathname, nPathname);   pPtr += nPathname + 1;\n    if( zUri ){\n      memcpy(pPtr, zUri, nUriByte);       pPtr += nUriByte;\n    }else{\n                                          pPtr++;\n    }\n  }\n\n\n  /* Fill in Pager.zJournal */\n  if( nPathname>0 ){\n    pPager->zJournal = (char*)pPtr;\n    memcpy(pPtr, zPathname, nPathname);   pPtr += nPathname;\n    memcpy(pPtr, \"-journal\",8);           pPtr += 8 + 1;\n#ifdef SQLITE_ENABLE_8_3_NAMES\n    sqlite3FileSuffix3(zFilename,pPager->zJournal);\n    pPtr = (u8*)(pPager->zJournal + sqlite3Strlen30(pPager->zJournal)+1);\n#endif\n  }else{\n    pPager->zJournal = 0;\n  }\n\n#ifndef SQLITE_OMIT_WAL\n  /* Fill in Pager.zWal */\n  if( nPathname>0 ){\n    pPager->zWal = (char*)pPtr;\n    memcpy(pPtr, zPathname, nPathname);   pPtr += nPathname;\n    memcpy(pPtr, \"-wal\", 4);              pPtr += 4 + 1;\n#ifdef SQLITE_ENABLE_8_3_NAMES\n    sqlite3FileSuffix3(zFilename, pPager->zWal);\n    pPtr = (u8*)(pPager->zWal + sqlite3Strlen30(pPager->zWal)+1);\n#endif\n  }else{\n    pPager->zWal = 0;\n  }\n#endif\n  (void)pPtr;  /* Suppress warning about unused pPtr value */\n\n  if( nPathname ) sqlite3DbFree(0, zPathname);\n  pPager->pVfs = pVfs;\n  pPager->vfsFlags = vfsFlags;\n\n  /* Open the pager file.\n  */\n  if( zFilename && zFilename[0] ){\n    int fout = 0;                    /* VFS flags returned by xOpen() */\n    rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout);\n    assert( !memDb );\n    pPager->memVfs = memJM = (fout&SQLITE_OPEN_MEMORY)!=0;\n    readOnly = (fout&SQLITE_OPEN_READONLY)!=0;\n\n    /* If the file was successfully opened for read/write access,\n    ** choose a default page size in case we have to create the\n    ** database file. The default page size is the maximum of:\n    **\n    **    + SQLITE_DEFAULT_PAGE_SIZE,\n    **    + The value returned by sqlite3OsSectorSize()\n    **    + The largest page size that can be written atomically.\n    */\n    if( rc==SQLITE_OK ){\n      int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);\n      if( !readOnly ){\n        setSectorSize(pPager);\n        assert(SQLITE_DEFAULT_PAGE_SIZE<=SQLITE_MAX_DEFAULT_PAGE_SIZE);\n        if( szPageDflt<pPager->sectorSize ){\n          if( pPager->sectorSize>SQLITE_MAX_DEFAULT_PAGE_SIZE ){\n            szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;\n          }else{\n            szPageDflt = (u32)pPager->sectorSize;\n          }\n        }\n#ifdef SQLITE_ENABLE_ATOMIC_WRITE\n        {\n          int ii;\n          assert(SQLITE_IOCAP_ATOMIC512==(512>>8));\n          assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));\n          assert(SQLITE_MAX_DEFAULT_PAGE_SIZE<=65536);\n          for(ii=szPageDflt; ii<=SQLITE_MAX_DEFAULT_PAGE_SIZE; ii=ii*2){\n            if( iDc&(SQLITE_IOCAP_ATOMIC|(ii>>8)) ){\n              szPageDflt = ii;\n            }\n          }\n        }\n#endif\n      }\n      pPager->noLock = sqlite3_uri_boolean(pPager->zFilename, \"nolock\", 0);\n      if( (iDc & SQLITE_IOCAP_IMMUTABLE)!=0\n       || sqlite3_uri_boolean(pPager->zFilename, \"immutable\", 0) ){\n          vfsFlags |= SQLITE_OPEN_READONLY;\n          goto act_like_temp_file;\n      }\n    }\n  }else{\n    /* If a temporary file is requested, it is not opened immediately.\n    ** In this case we accept the default page size and delay actually\n    ** opening the file until the first call to OsWrite().\n    **\n    ** This branch is also run for an in-memory database. An in-memory\n    ** database is the same as a temp-file that is never written out to\n    ** disk and uses an in-memory rollback journal.\n    **\n    ** This branch also runs for files marked as immutable.\n    */\nact_like_temp_file:\n    tempFile = 1;\n    pPager->eState = PAGER_READER;     /* Pretend we already have a lock */\n    pPager->eLock = EXCLUSIVE_LOCK;    /* Pretend we are in EXCLUSIVE mode */\n    pPager->noLock = 1;                /* Do no locking */\n    readOnly = (vfsFlags&SQLITE_OPEN_READONLY);\n  }\n\n  /* The following call to PagerSetPagesize() serves to set the value of\n  ** Pager.pageSize and to allocate the Pager.pTmpSpace buffer.\n  */\n  if( rc==SQLITE_OK ){\n    assert( pPager->memDb==0 );\n    rc = sqlite3PagerSetPagesize(pPager, &szPageDflt, -1);\n    testcase( rc!=SQLITE_OK );\n  }\n\n  /* Initialize the PCache object. */\n  if( rc==SQLITE_OK ){\n    nExtra = ROUND8(nExtra);\n    assert( nExtra>=8 && nExtra<1000 );\n    rc = sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,\n                       !memDb?pagerStress:0, (void *)pPager, pPager->pPCache);\n  }\n\n  /* If an error occurred above, free the  Pager structure and close the file.\n  */\n  if( rc!=SQLITE_OK ){\n    sqlite3OsClose(pPager->fd);\n    sqlite3PageFree(pPager->pTmpSpace);\n    sqlite3_free(pPager);\n    return rc;\n  }\n\n  PAGERTRACE((\"OPEN %d %s\\n\", FILEHANDLEID(pPager->fd), pPager->zFilename));\n  IOTRACE((\"OPEN %p %s\\n\", pPager, pPager->zFilename))\n\n  pPager->useJournal = (u8)useJournal;\n  /* pPager->stmtOpen = 0; */\n  /* pPager->stmtInUse = 0; */\n  /* pPager->nRef = 0; */\n  /* pPager->stmtSize = 0; */\n  /* pPager->stmtJSize = 0; */\n  /* pPager->nPage = 0; */\n  pPager->mxPgno = SQLITE_MAX_PAGE_COUNT;\n  /* pPager->state = PAGER_UNLOCK; */\n  /* pPager->errMask = 0; */\n  pPager->tempFile = (u8)tempFile;\n  assert( tempFile==PAGER_LOCKINGMODE_NORMAL\n          || tempFile==PAGER_LOCKINGMODE_EXCLUSIVE );\n  assert( PAGER_LOCKINGMODE_EXCLUSIVE==1 );\n  pPager->exclusiveMode = (u8)tempFile;\n  pPager->changeCountDone = pPager->tempFile;\n  pPager->memDb = (u8)memDb;\n  pPager->readOnly = (u8)readOnly;\n  assert( useJournal || pPager->tempFile );\n  sqlite3PagerSetFlags(pPager, (SQLITE_DEFAULT_SYNCHRONOUS+1)|PAGER_CACHESPILL);\n  /* pPager->pFirst = 0; */\n  /* pPager->pFirstSynced = 0; */\n  /* pPager->pLast = 0; */\n  pPager->nExtra = (u16)nExtra;\n  pPager->journalSizeLimit = SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT;\n  assert( isOpen(pPager->fd) || tempFile );\n  setSectorSize(pPager);\n  if( !useJournal ){\n    pPager->journalMode = PAGER_JOURNALMODE_OFF;\n  }else if( memDb || memJM ){\n    pPager->journalMode = PAGER_JOURNALMODE_MEMORY;\n  }\n  /* pPager->xBusyHandler = 0; */\n  /* pPager->pBusyHandlerArg = 0; */\n  pPager->xReiniter = xReinit;\n  setGetterMethod(pPager);\n  /* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */\n  /* pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c */\n\n  *ppPager = pPager;\n  return SQLITE_OK;\n}\n\n/*\n** Return the sqlite3_file for the main database given the name\n** of the corresponding WAL or Journal name as passed into\n** xOpen.\n*/\nSQLITE_API sqlite3_file *sqlite3_database_file_object(const char *zName){\n  Pager *pPager;\n  const char *p;\n  while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){\n    zName--;\n  }\n  p = zName - 4 - sizeof(Pager*);\n  assert( EIGHT_BYTE_ALIGNMENT(p) );\n  pPager = *(Pager**)p;\n  return pPager->fd;\n}\n\n\n/*\n** This function is called after transitioning from PAGER_UNLOCK to\n** PAGER_SHARED state. It tests if there is a hot journal present in\n** the file-system for the given pager. A hot journal is one that\n** needs to be played back. According to this function, a hot-journal\n** file exists if the following criteria are met:\n**\n**   * The journal file exists in the file system, and\n**   * No process holds a RESERVED or greater lock on the database file, and\n**   * The database file itself is greater than 0 bytes in size, and\n**   * The first byte of the journal file exists and is not 0x00.\n**\n** If the current size of the database file is 0 but a journal file\n** exists, that is probably an old journal left over from a prior\n** database with the same name. In this case the journal file is\n** just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK\n** is returned.\n**\n** This routine does not check if there is a super-journal filename\n** at the end of the file. If there is, and that super-journal file\n** does not exist, then the journal file is not really hot. In this\n** case this routine will return a false-positive. The pager_playback()\n** routine will discover that the journal file is not really hot and\n** will not roll it back.\n**\n** If a hot-journal file is found to exist, *pExists is set to 1 and\n** SQLITE_OK returned. If no hot-journal file is present, *pExists is\n** set to 0 and SQLITE_OK returned. If an IO error occurs while trying\n** to determine whether or not a hot-journal file exists, the IO error\n** code is returned and the value of *pExists is undefined.\n*/\nstatic int hasHotJournal(Pager *pPager, int *pExists){\n  sqlite3_vfs * const pVfs = pPager->pVfs;\n  int rc = SQLITE_OK;           /* Return code */\n  int exists = 1;               /* True if a journal file is present */\n  int jrnlOpen = !!isOpen(pPager->jfd);\n\n  assert( pPager->useJournal );\n  assert( isOpen(pPager->fd) );\n  assert( pPager->eState==PAGER_OPEN );\n\n  assert( jrnlOpen==0 || ( sqlite3OsDeviceCharacteristics(pPager->jfd) &\n    SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN\n  ));\n\n  *pExists = 0;\n  if( !jrnlOpen ){\n    rc = sqlite3OsAccess(pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &exists);\n  }\n  if( rc==SQLITE_OK && exists ){\n    int locked = 0;             /* True if some process holds a RESERVED lock */\n\n    /* Race condition here:  Another process might have been holding the\n    ** the RESERVED lock and have a journal open at the sqlite3OsAccess()\n    ** call above, but then delete the journal and drop the lock before\n    ** we get to the following sqlite3OsCheckReservedLock() call.  If that\n    ** is the case, this routine might think there is a hot journal when\n    ** in fact there is none.  This results in a false-positive which will\n    ** be dealt with by the playback routine.  Ticket #3883.\n    */\n    rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);\n    if( rc==SQLITE_OK && !locked ){\n      Pgno nPage;                 /* Number of pages in database file */\n\n      assert( pPager->tempFile==0 );\n      rc = pagerPagecount(pPager, &nPage);\n      if( rc==SQLITE_OK ){\n        /* If the database is zero pages in size, that means that either (1) the\n        ** journal is a remnant from a prior database with the same name where\n        ** the database file but not the journal was deleted, or (2) the initial\n        ** transaction that populates a new database is being rolled back.\n        ** In either case, the journal file can be deleted.  However, take care\n        ** not to delete the journal file if it is already open due to\n        ** journal_mode=PERSIST.\n        */\n        if( nPage==0 && !jrnlOpen ){\n          sqlite3BeginBenignMalloc();\n          if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){\n            sqlite3OsDelete(pVfs, pPager->zJournal, 0);\n            if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);\n          }\n          sqlite3EndBenignMalloc();\n        }else{\n          /* The journal file exists and no other connection has a reserved\n          ** or greater lock on the database file. Now check that there is\n          ** at least one non-zero bytes at the start of the journal file.\n          ** If there is, then we consider this journal to be hot. If not,\n          ** it can be ignored.\n          */\n          if( !jrnlOpen ){\n            int f = SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL;\n            rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &f);\n          }\n          if( rc==SQLITE_OK ){\n            u8 first = 0;\n            rc = sqlite3OsRead(pPager->jfd, (void *)&first, 1, 0);\n            if( rc==SQLITE_IOERR_SHORT_READ ){\n              rc = SQLITE_OK;\n            }\n            if( !jrnlOpen ){\n              sqlite3OsClose(pPager->jfd);\n            }\n            *pExists = (first!=0);\n          }else if( rc==SQLITE_CANTOPEN ){\n            /* If we cannot open the rollback journal file in order to see if\n            ** it has a zero header, that might be due to an I/O error, or\n            ** it might be due to the race condition described above and in\n            ** ticket #3883.  Either way, assume that the journal is hot.\n            ** This might be a false positive.  But if it is, then the\n            ** automatic journal playback and recovery mechanism will deal\n            ** with it under an EXCLUSIVE lock where we do not need to\n            ** worry so much with race conditions.\n            */\n            *pExists = 1;\n            rc = SQLITE_OK;\n          }\n        }\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is called to obtain a shared lock on the database file.\n** It is illegal to call sqlite3PagerGet() until after this function\n** has been successfully called. If a shared-lock is already held when\n** this function is called, it is a no-op.\n**\n** The following operations are also performed by this function.\n**\n**   1) If the pager is currently in PAGER_OPEN state (no lock held\n**      on the database file), then an attempt is made to obtain a\n**      SHARED lock on the database file. Immediately after obtaining\n**      the SHARED lock, the file-system is checked for a hot-journal,\n**      which is played back if present. Following any hot-journal\n**      rollback, the contents of the cache are validated by checking\n**      the 'change-counter' field of the database file header and\n**      discarded if they are found to be invalid.\n**\n**   2) If the pager is running in exclusive-mode, and there are currently\n**      no outstanding references to any pages, and is in the error state,\n**      then an attempt is made to clear the error state by discarding\n**      the contents of the page cache and rolling back any open journal\n**      file.\n**\n** If everything is successful, SQLITE_OK is returned. If an IO error\n** occurs while locking the database, checking for a hot-journal file or\n** rolling back a journal file, the IO error code is returned.\n*/\nSQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){\n  int rc = SQLITE_OK;                /* Return code */\n\n  /* This routine is only called from b-tree and only when there are no\n  ** outstanding pages. This implies that the pager state should either\n  ** be OPEN or READER. READER is only possible if the pager is or was in\n  ** exclusive access mode.  */\n  assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );\n  assert( assert_pager_state(pPager) );\n  assert( pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER );\n  assert( pPager->errCode==SQLITE_OK );\n\n  if( !pagerUseWal(pPager) && pPager->eState==PAGER_OPEN ){\n    int bHotJournal = 1;          /* True if there exists a hot journal-file */\n\n    assert( !MEMDB );\n    assert( pPager->tempFile==0 || pPager->eLock==EXCLUSIVE_LOCK );\n\n    rc = pager_wait_on_lock(pPager, SHARED_LOCK);\n    if( rc!=SQLITE_OK ){\n      assert( pPager->eLock==NO_LOCK || pPager->eLock==UNKNOWN_LOCK );\n      goto failed;\n    }\n\n    /* If a journal file exists, and there is no RESERVED lock on the\n    ** database file, then it either needs to be played back or deleted.\n    */\n    if( pPager->eLock<=SHARED_LOCK ){\n      rc = hasHotJournal(pPager, &bHotJournal);\n    }\n    if( rc!=SQLITE_OK ){\n      goto failed;\n    }\n    if( bHotJournal ){\n      if( pPager->readOnly ){\n        rc = SQLITE_READONLY_ROLLBACK;\n        goto failed;\n      }\n\n      /* Get an EXCLUSIVE lock on the database file. At this point it is\n      ** important that a RESERVED lock is not obtained on the way to the\n      ** EXCLUSIVE lock. If it were, another process might open the\n      ** database file, detect the RESERVED lock, and conclude that the\n      ** database is safe to read while this process is still rolling the\n      ** hot-journal back.\n      **\n      ** Because the intermediate RESERVED lock is not requested, any\n      ** other process attempting to access the database file will get to\n      ** this point in the code and fail to obtain its own EXCLUSIVE lock\n      ** on the database file.\n      **\n      ** Unless the pager is in locking_mode=exclusive mode, the lock is\n      ** downgraded to SHARED_LOCK before this function returns.\n      */\n      rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);\n      if( rc!=SQLITE_OK ){\n        goto failed;\n      }\n\n      /* If it is not already open and the file exists on disk, open the\n      ** journal for read/write access. Write access is required because\n      ** in exclusive-access mode the file descriptor will be kept open\n      ** and possibly used for a transaction later on. Also, write-access\n      ** is usually required to finalize the journal in journal_mode=persist\n      ** mode (and also for journal_mode=truncate on some systems).\n      **\n      ** If the journal does not exist, it usually means that some\n      ** other connection managed to get in and roll it back before\n      ** this connection obtained the exclusive lock above. Or, it\n      ** may mean that the pager was in the error-state when this\n      ** function was called and the journal file does not exist.\n      */\n      if( !isOpen(pPager->jfd) && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){\n        sqlite3_vfs * const pVfs = pPager->pVfs;\n        int bExists;              /* True if journal file exists */\n        rc = sqlite3OsAccess(\n            pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &bExists);\n        if( rc==SQLITE_OK && bExists ){\n          int fout = 0;\n          int f = SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_JOURNAL;\n          assert( !pPager->tempFile );\n          rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout);\n          assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );\n          if( rc==SQLITE_OK && fout&SQLITE_OPEN_READONLY ){\n            rc = SQLITE_CANTOPEN_BKPT;\n            sqlite3OsClose(pPager->jfd);\n          }\n        }\n      }\n\n      /* Playback and delete the journal.  Drop the database write\n      ** lock and reacquire the read lock. Purge the cache before\n      ** playing back the hot-journal so that we don't end up with\n      ** an inconsistent cache.  Sync the hot journal before playing\n      ** it back since the process that crashed and left the hot journal\n      ** probably did not sync it and we are required to always sync\n      ** the journal before playing it back.\n      */\n      if( isOpen(pPager->jfd) ){\n        assert( rc==SQLITE_OK );\n        rc = pagerSyncHotJournal(pPager);\n        if( rc==SQLITE_OK ){\n          rc = pager_playback(pPager, !pPager->tempFile);\n          pPager->eState = PAGER_OPEN;\n        }\n      }else if( !pPager->exclusiveMode ){\n        pagerUnlockDb(pPager, SHARED_LOCK);\n      }\n\n      if( rc!=SQLITE_OK ){\n        /* This branch is taken if an error occurs while trying to open\n        ** or roll back a hot-journal while holding an EXCLUSIVE lock. The\n        ** pager_unlock() routine will be called before returning to unlock\n        ** the file. If the unlock attempt fails, then Pager.eLock must be\n        ** set to UNKNOWN_LOCK (see the comment above the #define for\n        ** UNKNOWN_LOCK above for an explanation).\n        **\n        ** In order to get pager_unlock() to do this, set Pager.eState to\n        ** PAGER_ERROR now. This is not actually counted as a transition\n        ** to ERROR state in the state diagram at the top of this file,\n        ** since we know that the same call to pager_unlock() will very\n        ** shortly transition the pager object to the OPEN state. Calling\n        ** assert_pager_state() would fail now, as it should not be possible\n        ** to be in ERROR state when there are zero outstanding page\n        ** references.\n        */\n        pager_error(pPager, rc);\n        goto failed;\n      }\n\n      assert( pPager->eState==PAGER_OPEN );\n      assert( (pPager->eLock==SHARED_LOCK)\n           || (pPager->exclusiveMode && pPager->eLock>SHARED_LOCK)\n      );\n    }\n\n    if( !pPager->tempFile && pPager->hasHeldSharedLock ){\n      /* The shared-lock has just been acquired then check to\n      ** see if the database has been modified.  If the database has changed,\n      ** flush the cache.  The hasHeldSharedLock flag prevents this from\n      ** occurring on the very first access to a file, in order to save a\n      ** single unnecessary sqlite3OsRead() call at the start-up.\n      **\n      ** Database changes are detected by looking at 15 bytes beginning\n      ** at offset 24 into the file.  The first 4 of these 16 bytes are\n      ** a 32-bit counter that is incremented with each change.  The\n      ** other bytes change randomly with each file change when\n      ** a codec is in use.\n      **\n      ** There is a vanishingly small chance that a change will not be\n      ** detected.  The chance of an undetected change is so small that\n      ** it can be neglected.\n      */\n      char dbFileVers[sizeof(pPager->dbFileVers)];\n\n      IOTRACE((\"CKVERS %p %d\\n\", pPager, sizeof(dbFileVers)));\n      rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);\n      if( rc!=SQLITE_OK ){\n        if( rc!=SQLITE_IOERR_SHORT_READ ){\n          goto failed;\n        }\n        memset(dbFileVers, 0, sizeof(dbFileVers));\n      }\n\n      if( memcmp(pPager->dbFileVers, dbFileVers, sizeof(dbFileVers))!=0 ){\n        pager_reset(pPager);\n\n        /* Unmap the database file. It is possible that external processes\n        ** may have truncated the database file and then extended it back\n        ** to its original size while this process was not holding a lock.\n        ** In this case there may exist a Pager.pMap mapping that appears\n        ** to be the right size but is not actually valid. Avoid this\n        ** possibility by unmapping the db here. */\n        if( USEFETCH(pPager) ){\n          sqlite3OsUnfetch(pPager->fd, 0, 0);\n        }\n      }\n    }\n\n    /* If there is a WAL file in the file-system, open this database in WAL\n    ** mode. Otherwise, the following function call is a no-op.\n    */\n    rc = pagerOpenWalIfPresent(pPager);\n#ifndef SQLITE_OMIT_WAL\n    assert( pPager->pWal==0 || rc==SQLITE_OK );\n#endif\n  }\n\n  if( pagerUseWal(pPager) ){\n    assert( rc==SQLITE_OK );\n    rc = pagerBeginReadTransaction(pPager);\n  }\n\n  if( pPager->tempFile==0 && pPager->eState==PAGER_OPEN && rc==SQLITE_OK ){\n    rc = pagerPagecount(pPager, &pPager->dbSize);\n  }\n\n failed:\n  if( rc!=SQLITE_OK ){\n    assert( !MEMDB );\n    pager_unlock(pPager);\n    assert( pPager->eState==PAGER_OPEN );\n  }else{\n    pPager->eState = PAGER_READER;\n    pPager->hasHeldSharedLock = 1;\n  }\n  return rc;\n}\n\n/*\n** If the reference count has reached zero, rollback any active\n** transaction and unlock the pager.\n**\n** Except, in locking_mode=EXCLUSIVE when there is nothing to in\n** the rollback journal, the unlock is not performed and there is\n** nothing to rollback, so this routine is a no-op.\n*/\nstatic void pagerUnlockIfUnused(Pager *pPager){\n  if( sqlite3PcacheRefCount(pPager->pPCache)==0 ){\n    assert( pPager->nMmapOut==0 ); /* because page1 is never memory mapped */\n    pagerUnlockAndRollback(pPager);\n  }\n}\n\n/*\n** The page getter methods each try to acquire a reference to a\n** page with page number pgno. If the requested reference is\n** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.\n**\n** There are different implementations of the getter method depending\n** on the current state of the pager.\n**\n**     getPageNormal()         --  The normal getter\n**     getPageError()          --  Used if the pager is in an error state\n**     getPageMmap()           --  Used if memory-mapped I/O is enabled\n**\n** If the requested page is already in the cache, it is returned.\n** Otherwise, a new page object is allocated and populated with data\n** read from the database file. In some cases, the pcache module may\n** choose not to allocate a new page object and may reuse an existing\n** object with no outstanding references.\n**\n** The extra data appended to a page is always initialized to zeros the\n** first time a page is loaded into memory. If the page requested is\n** already in the cache when this function is called, then the extra\n** data is left as it was when the page object was last used.\n**\n** If the database image is smaller than the requested page or if\n** the flags parameter contains the PAGER_GET_NOCONTENT bit and the\n** requested page is not already stored in the cache, then no\n** actual disk read occurs. In this case the memory image of the\n** page is initialized to all zeros.\n**\n** If PAGER_GET_NOCONTENT is true, it means that we do not care about\n** the contents of the page. This occurs in two scenarios:\n**\n**   a) When reading a free-list leaf page from the database, and\n**\n**   b) When a savepoint is being rolled back and we need to load\n**      a new page into the cache to be filled with the data read\n**      from the savepoint journal.\n**\n** If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead\n** of being read from the database. Additionally, the bits corresponding\n** to pgno in Pager.pInJournal (bitvec of pages already written to the\n** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open\n** savepoints are set. This means if the page is made writable at any\n** point in the future, using a call to sqlite3PagerWrite(), its contents\n** will not be journaled. This saves IO.\n**\n** The acquisition might fail for several reasons.  In all cases,\n** an appropriate error code is returned and *ppPage is set to NULL.\n**\n** See also sqlite3PagerLookup().  Both this routine and Lookup() attempt\n** to find a page in the in-memory cache first.  If the page is not already\n** in memory, this routine goes to disk to read it in whereas Lookup()\n** just returns 0.  This routine acquires a read-lock the first time it\n** has to go to disk, and could also playback an old journal if necessary.\n** Since Lookup() never goes to disk, it never has to deal with locks\n** or journal files.\n*/\nstatic int getPageNormal(\n  Pager *pPager,      /* The pager open on the database file */\n  Pgno pgno,          /* Page number to fetch */\n  DbPage **ppPage,    /* Write a pointer to the page here */\n  int flags           /* PAGER_GET_XXX flags */\n){\n  int rc = SQLITE_OK;\n  PgHdr *pPg;\n  u8 noContent;                   /* True if PAGER_GET_NOCONTENT is set */\n  sqlite3_pcache_page *pBase;\n\n  assert( pPager->errCode==SQLITE_OK );\n  assert( pPager->eState>=PAGER_READER );\n  assert( assert_pager_state(pPager) );\n  assert( pPager->hasHeldSharedLock==1 );\n\n  if( pgno==0 ) return SQLITE_CORRUPT_BKPT;\n  pBase = sqlite3PcacheFetch(pPager->pPCache, pgno, 3);\n  if( pBase==0 ){\n    pPg = 0;\n    rc = sqlite3PcacheFetchStress(pPager->pPCache, pgno, &pBase);\n    if( rc!=SQLITE_OK ) goto pager_acquire_err;\n    if( pBase==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto pager_acquire_err;\n    }\n  }\n  pPg = *ppPage = sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pBase);\n  assert( pPg==(*ppPage) );\n  assert( pPg->pgno==pgno );\n  assert( pPg->pPager==pPager || pPg->pPager==0 );\n\n  noContent = (flags & PAGER_GET_NOCONTENT)!=0;\n  if( pPg->pPager && !noContent ){\n    /* In this case the pcache already contains an initialized copy of\n    ** the page. Return without further ado.  */\n    assert( pgno!=PAGER_SJ_PGNO(pPager) );\n    pPager->aStat[PAGER_STAT_HIT]++;\n    return SQLITE_OK;\n\n  }else{\n    /* The pager cache has created a new page. Its content needs to\n    ** be initialized. But first some error checks:\n    **\n    ** (*) obsolete.  Was: maximum page number is 2^31\n    ** (2) Never try to fetch the locking page\n    */\n    if( pgno==PAGER_SJ_PGNO(pPager) ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto pager_acquire_err;\n    }\n\n    pPg->pPager = pPager;\n\n    assert( !isOpen(pPager->fd) || !MEMDB );\n    if( !isOpen(pPager->fd) || pPager->dbSize<pgno || noContent ){\n      if( pgno>pPager->mxPgno ){\n        rc = SQLITE_FULL;\n        if( pgno<=pPager->dbSize ){\n          sqlite3PcacheRelease(pPg);\n          pPg = 0;\n        }\n        goto pager_acquire_err;\n      }\n      if( noContent ){\n        /* Failure to set the bits in the InJournal bit-vectors is benign.\n        ** It merely means that we might do some extra work to journal a\n        ** page that does not need to be journaled.  Nevertheless, be sure\n        ** to test the case where a malloc error occurs while trying to set\n        ** a bit in a bit vector.\n        */\n        sqlite3BeginBenignMalloc();\n        if( pgno<=pPager->dbOrigSize ){\n          TESTONLY( rc = ) sqlite3BitvecSet(pPager->pInJournal, pgno);\n          testcase( rc==SQLITE_NOMEM );\n        }\n        TESTONLY( rc = ) addToSavepointBitvecs(pPager, pgno);\n        testcase( rc==SQLITE_NOMEM );\n        sqlite3EndBenignMalloc();\n      }\n      memset(pPg->pData, 0, pPager->pageSize);\n      IOTRACE((\"ZERO %p %d\\n\", pPager, pgno));\n    }else{\n      assert( pPg->pPager==pPager );\n      pPager->aStat[PAGER_STAT_MISS]++;\n      rc = readDbPage(pPg);\n      if( rc!=SQLITE_OK ){\n        goto pager_acquire_err;\n      }\n    }\n    pager_set_pagehash(pPg);\n  }\n  return SQLITE_OK;\n\npager_acquire_err:\n  assert( rc!=SQLITE_OK );\n  if( pPg ){\n    sqlite3PcacheDrop(pPg);\n  }\n  pagerUnlockIfUnused(pPager);\n  *ppPage = 0;\n  return rc;\n}\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/* The page getter for when memory-mapped I/O is enabled */\nstatic int getPageMMap(\n  Pager *pPager,      /* The pager open on the database file */\n  Pgno pgno,          /* Page number to fetch */\n  DbPage **ppPage,    /* Write a pointer to the page here */\n  int flags           /* PAGER_GET_XXX flags */\n){\n  int rc = SQLITE_OK;\n  PgHdr *pPg = 0;\n  u32 iFrame = 0;                 /* Frame to read from WAL file */\n\n  /* It is acceptable to use a read-only (mmap) page for any page except\n  ** page 1 if there is no write-transaction open or the ACQUIRE_READONLY\n  ** flag was specified by the caller. And so long as the db is not a\n  ** temporary or in-memory database.  */\n  const int bMmapOk = (pgno>1\n   && (pPager->eState==PAGER_READER || (flags & PAGER_GET_READONLY))\n  );\n\n  assert( USEFETCH(pPager) );\n\n  /* Optimization note:  Adding the \"pgno<=1\" term before \"pgno==0\" here\n  ** allows the compiler optimizer to reuse the results of the \"pgno>1\"\n  ** test in the previous statement, and avoid testing pgno==0 in the\n  ** common case where pgno is large. */\n  if( pgno<=1 && pgno==0 ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  assert( pPager->eState>=PAGER_READER );\n  assert( assert_pager_state(pPager) );\n  assert( pPager->hasHeldSharedLock==1 );\n  assert( pPager->errCode==SQLITE_OK );\n\n  if( bMmapOk && pagerUseWal(pPager) ){\n    rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);\n    if( rc!=SQLITE_OK ){\n      *ppPage = 0;\n      return rc;\n    }\n  }\n  if( bMmapOk && iFrame==0 ){\n    void *pData = 0;\n    rc = sqlite3OsFetch(pPager->fd,\n        (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData\n    );\n    if( rc==SQLITE_OK && pData ){\n      if( pPager->eState>PAGER_READER || pPager->tempFile ){\n        pPg = sqlite3PagerLookup(pPager, pgno);\n      }\n      if( pPg==0 ){\n        rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);\n      }else{\n        sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1)*pPager->pageSize, pData);\n      }\n      if( pPg ){\n        assert( rc==SQLITE_OK );\n        *ppPage = pPg;\n        return SQLITE_OK;\n      }\n    }\n    if( rc!=SQLITE_OK ){\n      *ppPage = 0;\n      return rc;\n    }\n  }\n  return getPageNormal(pPager, pgno, ppPage, flags);\n}\n#endif /* SQLITE_MAX_MMAP_SIZE>0 */\n\n/* The page getter method for when the pager is an error state */\nstatic int getPageError(\n  Pager *pPager,      /* The pager open on the database file */\n  Pgno pgno,          /* Page number to fetch */\n  DbPage **ppPage,    /* Write a pointer to the page here */\n  int flags           /* PAGER_GET_XXX flags */\n){\n  UNUSED_PARAMETER(pgno);\n  UNUSED_PARAMETER(flags);\n  assert( pPager->errCode!=SQLITE_OK );\n  *ppPage = 0;\n  return pPager->errCode;\n}\n\n\n/* Dispatch all page fetch requests to the appropriate getter method.\n*/\nSQLITE_PRIVATE int sqlite3PagerGet(\n  Pager *pPager,      /* The pager open on the database file */\n  Pgno pgno,          /* Page number to fetch */\n  DbPage **ppPage,    /* Write a pointer to the page here */\n  int flags           /* PAGER_GET_XXX flags */\n){\n#if 0   /* Trace page fetch by setting to 1 */\n  int rc;\n  printf(\"PAGE %u\\n\", pgno);\n  fflush(stdout);\n  rc = pPager->xGet(pPager, pgno, ppPage, flags);\n  if( rc ){\n    printf(\"PAGE %u failed with 0x%02x\\n\", pgno, rc);\n    fflush(stdout);\n  }\n  return rc;\n#else\n  /* Normal, high-speed version of sqlite3PagerGet() */\n  return pPager->xGet(pPager, pgno, ppPage, flags);\n#endif\n}\n\n/*\n** Acquire a page if it is already in the in-memory cache.  Do\n** not read the page from disk.  Return a pointer to the page,\n** or 0 if the page is not in cache.\n**\n** See also sqlite3PagerGet().  The difference between this routine\n** and sqlite3PagerGet() is that _get() will go to the disk and read\n** in the page if the page is not already in cache.  This routine\n** returns NULL if the page is not in cache or if a disk I/O error\n** has ever happened.\n*/\nSQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){\n  sqlite3_pcache_page *pPage;\n  assert( pPager!=0 );\n  assert( pgno!=0 );\n  assert( pPager->pPCache!=0 );\n  pPage = sqlite3PcacheFetch(pPager->pPCache, pgno, 0);\n  assert( pPage==0 || pPager->hasHeldSharedLock );\n  if( pPage==0 ) return 0;\n  return sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pPage);\n}\n\n/*\n** Release a page reference.\n**\n** The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be used\n** if we know that the page being released is not the last reference to page1.\n** The btree layer always holds page1 open until the end, so these first\n** two routines can be used to release any page other than BtShared.pPage1.\n** The assert() at tag-20230419-2 proves that this constraint is always\n** honored.\n**\n** Use sqlite3PagerUnrefPageOne() to release page1.  This latter routine\n** checks the total number of outstanding pages and if the number of\n** pages reaches zero it drops the database lock.\n*/\nSQLITE_PRIVATE void sqlite3PagerUnrefNotNull(DbPage *pPg){\n  TESTONLY( Pager *pPager = pPg->pPager; )\n  assert( pPg!=0 );\n  if( pPg->flags & PGHDR_MMAP ){\n    assert( pPg->pgno!=1 );  /* Page1 is never memory mapped */\n    pagerReleaseMapPage(pPg);\n  }else{\n    sqlite3PcacheRelease(pPg);\n  }\n  /* Do not use this routine to release the last reference to page1 */\n  assert( sqlite3PcacheRefCount(pPager->pPCache)>0 ); /* tag-20230419-2 */\n}\nSQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){\n  if( pPg ) sqlite3PagerUnrefNotNull(pPg);\n}\nSQLITE_PRIVATE void sqlite3PagerUnrefPageOne(DbPage *pPg){\n  Pager *pPager;\n  assert( pPg!=0 );\n  assert( pPg->pgno==1 );\n  assert( (pPg->flags & PGHDR_MMAP)==0 ); /* Page1 is never memory mapped */\n  pPager = pPg->pPager;\n  sqlite3PcacheRelease(pPg);\n  pagerUnlockIfUnused(pPager);\n}\n\n/*\n** This function is called at the start of every write transaction.\n** There must already be a RESERVED or EXCLUSIVE lock on the database\n** file when this routine is called.\n**\n** Open the journal file for pager pPager and write a journal header\n** to the start of it. If there are active savepoints, open the sub-journal\n** as well. This function is only used when the journal file is being\n** opened to write a rollback log for a transaction. It is not used\n** when opening a hot journal file to roll it back.\n**\n** If the journal file is already open (as it may be in exclusive mode),\n** then this function just writes a journal header to the start of the\n** already open file.\n**\n** Whether or not the journal file is opened by this function, the\n** Pager.pInJournal bitvec structure is allocated.\n**\n** Return SQLITE_OK if everything is successful. Otherwise, return\n** SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or\n** an IO error code if opening or writing the journal file fails.\n*/\nstatic int pager_open_journal(Pager *pPager){\n  int rc = SQLITE_OK;                        /* Return code */\n  sqlite3_vfs * const pVfs = pPager->pVfs;   /* Local cache of vfs pointer */\n\n  assert( pPager->eState==PAGER_WRITER_LOCKED );\n  assert( assert_pager_state(pPager) );\n  assert( pPager->pInJournal==0 );\n\n  /* If already in the error state, this function is a no-op.  But on\n  ** the other hand, this routine is never called if we are already in\n  ** an error state. */\n  if( NEVER(pPager->errCode) ) return pPager->errCode;\n\n  if( !pagerUseWal(pPager) && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){\n    pPager->pInJournal = sqlite3BitvecCreate(pPager->dbSize);\n    if( pPager->pInJournal==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }\n\n    /* Open the journal file if it is not already open. */\n    if( !isOpen(pPager->jfd) ){\n      if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ){\n        sqlite3MemJournalOpen(pPager->jfd);\n      }else{\n        int flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;\n        int nSpill;\n\n        if( pPager->tempFile ){\n          flags |= (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL);\n          flags |= SQLITE_OPEN_EXCLUSIVE;\n          nSpill = sqlite3Config.nStmtSpill;\n        }else{\n          flags |= SQLITE_OPEN_MAIN_JOURNAL;\n          nSpill = jrnlBufferSize(pPager);\n        }\n\n        /* Verify that the database still has the same name as it did when\n        ** it was originally opened. */\n        rc = databaseIsUnmoved(pPager);\n        if( rc==SQLITE_OK ){\n          rc = sqlite3JournalOpen (\n              pVfs, pPager->zJournal, pPager->jfd, flags, nSpill\n          );\n        }\n      }\n      assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );\n    }\n\n\n    /* Write the first journal header to the journal file and open\n    ** the sub-journal if necessary.\n    */\n    if( rc==SQLITE_OK ){\n      /* TODO: Check if all of these are really required. */\n      pPager->nRec = 0;\n      pPager->journalOff = 0;\n      pPager->setSuper = 0;\n      pPager->journalHdr = 0;\n      rc = writeJournalHdr(pPager);\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3BitvecDestroy(pPager->pInJournal);\n    pPager->pInJournal = 0;\n    pPager->journalOff = 0;\n  }else{\n    assert( pPager->eState==PAGER_WRITER_LOCKED );\n    pPager->eState = PAGER_WRITER_CACHEMOD;\n  }\n\n  return rc;\n}\n\n/*\n** Begin a write-transaction on the specified pager object. If a\n** write-transaction has already been opened, this function is a no-op.\n**\n** If the exFlag argument is false, then acquire at least a RESERVED\n** lock on the database file. If exFlag is true, then acquire at least\n** an EXCLUSIVE lock. If such a lock is already held, no locking\n** functions need be called.\n**\n** If the subjInMemory argument is non-zero, then any sub-journal opened\n** within this transaction will be opened as an in-memory file. This\n** has no effect if the sub-journal is already opened (as it may be when\n** running in exclusive mode) or if the transaction does not require a\n** sub-journal. If the subjInMemory argument is zero, then any required\n** sub-journal is implemented in-memory if pPager is an in-memory database,\n** or using a temporary file otherwise.\n*/\nSQLITE_PRIVATE int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory){\n  int rc = SQLITE_OK;\n\n  if( pPager->errCode ) return pPager->errCode;\n  assert( pPager->eState>=PAGER_READER && pPager->eState<PAGER_ERROR );\n  pPager->subjInMemory = (u8)subjInMemory;\n\n  if( pPager->eState==PAGER_READER ){\n    assert( pPager->pInJournal==0 );\n\n    if( pagerUseWal(pPager) ){\n      /* If the pager is configured to use locking_mode=exclusive, and an\n      ** exclusive lock on the database is not already held, obtain it now.\n      */\n      if( pPager->exclusiveMode && sqlite3WalExclusiveMode(pPager->pWal, -1) ){\n        rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);\n        if( rc!=SQLITE_OK ){\n          return rc;\n        }\n        (void)sqlite3WalExclusiveMode(pPager->pWal, 1);\n      }\n\n      /* Grab the write lock on the log file. If successful, upgrade to\n      ** PAGER_RESERVED state. Otherwise, return an error code to the caller.\n      ** The busy-handler is not invoked if another connection already\n      ** holds the write-lock. If possible, the upper layer will call it.\n      */\n      rc = sqlite3WalBeginWriteTransaction(pPager->pWal);\n    }else{\n      /* Obtain a RESERVED lock on the database file. If the exFlag parameter\n      ** is true, then immediately upgrade this to an EXCLUSIVE lock. The\n      ** busy-handler callback can be used when upgrading to the EXCLUSIVE\n      ** lock, but not when obtaining the RESERVED lock.\n      */\n      rc = pagerLockDb(pPager, RESERVED_LOCK);\n      if( rc==SQLITE_OK && exFlag ){\n        rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      /* Change to WRITER_LOCKED state.\n      **\n      ** WAL mode sets Pager.eState to PAGER_WRITER_LOCKED or CACHEMOD\n      ** when it has an open transaction, but never to DBMOD or FINISHED.\n      ** This is because in those states the code to roll back savepoint\n      ** transactions may copy data from the sub-journal into the database\n      ** file as well as into the page cache. Which would be incorrect in\n      ** WAL mode.\n      */\n      pPager->eState = PAGER_WRITER_LOCKED;\n      pPager->dbHintSize = pPager->dbSize;\n      pPager->dbFileSize = pPager->dbSize;\n      pPager->dbOrigSize = pPager->dbSize;\n      pPager->journalOff = 0;\n    }\n\n    assert( rc==SQLITE_OK || pPager->eState==PAGER_READER );\n    assert( rc!=SQLITE_OK || pPager->eState==PAGER_WRITER_LOCKED );\n    assert( assert_pager_state(pPager) );\n  }\n\n  PAGERTRACE((\"TRANSACTION %d\\n\", PAGERID(pPager)));\n  return rc;\n}\n\n/*\n** Write page pPg onto the end of the rollback journal.\n*/\nstatic SQLITE_NOINLINE int pagerAddPageToRollbackJournal(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  int rc;\n  u32 cksum;\n  char *pData2;\n  i64 iOff = pPager->journalOff;\n\n  /* We should never write to the journal file the page that\n  ** contains the database locks.  The following assert verifies\n  ** that we do not. */\n  assert( pPg->pgno!=PAGER_SJ_PGNO(pPager) );\n\n  assert( pPager->journalHdr<=pPager->journalOff );\n  pData2 = pPg->pData;\n  cksum = pager_cksum(pPager, (u8*)pData2);\n\n  /* Even if an IO or diskfull error occurs while journalling the\n  ** page in the block above, set the need-sync flag for the page.\n  ** Otherwise, when the transaction is rolled back, the logic in\n  ** playback_one_page() will think that the page needs to be restored\n  ** in the database file. And if an IO error occurs while doing so,\n  ** then corruption may follow.\n  */\n  pPg->flags |= PGHDR_NEED_SYNC;\n\n  rc = write32bits(pPager->jfd, iOff, pPg->pgno);\n  if( rc!=SQLITE_OK ) return rc;\n  rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);\n  if( rc!=SQLITE_OK ) return rc;\n  rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);\n  if( rc!=SQLITE_OK ) return rc;\n\n  IOTRACE((\"JOUT %p %d %lld %d\\n\", pPager, pPg->pgno,\n           pPager->journalOff, pPager->pageSize));\n  PAGER_INCR(sqlite3_pager_writej_count);\n  PAGERTRACE((\"JOURNAL %d page %d needSync=%d hash(%08x)\\n\",\n       PAGERID(pPager), pPg->pgno,\n       ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));\n\n  pPager->journalOff += 8 + pPager->pageSize;\n  pPager->nRec++;\n  assert( pPager->pInJournal!=0 );\n  rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);\n  testcase( rc==SQLITE_NOMEM );\n  assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );\n  rc |= addToSavepointBitvecs(pPager, pPg->pgno);\n  assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );\n  return rc;\n}\n\n/*\n** Mark a single data page as writeable. The page is written into the\n** main journal or sub-journal as required. If the page is written into\n** one of the journals, the corresponding bit is set in the\n** Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs\n** of any open savepoints as appropriate.\n*/\nstatic int pager_write(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  int rc = SQLITE_OK;\n\n  /* This routine is not called unless a write-transaction has already\n  ** been started. The journal file may or may not be open at this point.\n  ** It is never called in the ERROR state.\n  */\n  assert( pPager->eState==PAGER_WRITER_LOCKED\n       || pPager->eState==PAGER_WRITER_CACHEMOD\n       || pPager->eState==PAGER_WRITER_DBMOD\n  );\n  assert( assert_pager_state(pPager) );\n  assert( pPager->errCode==0 );\n  assert( pPager->readOnly==0 );\n  CHECK_PAGE(pPg);\n\n  /* The journal file needs to be opened. Higher level routines have already\n  ** obtained the necessary locks to begin the write-transaction, but the\n  ** rollback journal might not yet be open. Open it now if this is the case.\n  **\n  ** This is done before calling sqlite3PcacheMakeDirty() on the page.\n  ** Otherwise, if it were done after calling sqlite3PcacheMakeDirty(), then\n  ** an error might occur and the pager would end up in WRITER_LOCKED state\n  ** with pages marked as dirty in the cache.\n  */\n  if( pPager->eState==PAGER_WRITER_LOCKED ){\n    rc = pager_open_journal(pPager);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  assert( pPager->eState>=PAGER_WRITER_CACHEMOD );\n  assert( assert_pager_state(pPager) );\n\n  /* Mark the page that is about to be modified as dirty. */\n  sqlite3PcacheMakeDirty(pPg);\n\n  /* If a rollback journal is in use, them make sure the page that is about\n  ** to change is in the rollback journal, or if the page is a new page off\n  ** then end of the file, make sure it is marked as PGHDR_NEED_SYNC.\n  */\n  assert( (pPager->pInJournal!=0) == isOpen(pPager->jfd) );\n  if( pPager->pInJournal!=0\n   && sqlite3BitvecTestNotNull(pPager->pInJournal, pPg->pgno)==0\n  ){\n    assert( pagerUseWal(pPager)==0 );\n    if( pPg->pgno<=pPager->dbOrigSize ){\n      rc = pagerAddPageToRollbackJournal(pPg);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n    }else{\n      if( pPager->eState!=PAGER_WRITER_DBMOD ){\n        pPg->flags |= PGHDR_NEED_SYNC;\n      }\n      PAGERTRACE((\"APPEND %d page %d needSync=%d\\n\",\n              PAGERID(pPager), pPg->pgno,\n             ((pPg->flags&PGHDR_NEED_SYNC)?1:0)));\n    }\n  }\n\n  /* The PGHDR_DIRTY bit is set above when the page was added to the dirty-list\n  ** and before writing the page into the rollback journal.  Wait until now,\n  ** after the page has been successfully journalled, before setting the\n  ** PGHDR_WRITEABLE bit that indicates that the page can be safely modified.\n  */\n  pPg->flags |= PGHDR_WRITEABLE;\n\n  /* If the statement journal is open and the page is not in it,\n  ** then write the page into the statement journal.\n  */\n  if( pPager->nSavepoint>0 ){\n    rc = subjournalPageIfRequired(pPg);\n  }\n\n  /* Update the database size and return. */\n  if( pPager->dbSize<pPg->pgno ){\n    pPager->dbSize = pPg->pgno;\n  }\n  return rc;\n}\n\n/*\n** This is a variant of sqlite3PagerWrite() that runs when the sector size\n** is larger than the page size.  SQLite makes the (reasonable) assumption that\n** all bytes of a sector are written together by hardware.  Hence, all bytes of\n** a sector need to be journalled in case of a power loss in the middle of\n** a write.\n**\n** Usually, the sector size is less than or equal to the page size, in which\n** case pages can be individually written.  This routine only runs in the\n** exceptional case where the page size is smaller than the sector size.\n*/\nstatic SQLITE_NOINLINE int pagerWriteLargeSector(PgHdr *pPg){\n  int rc = SQLITE_OK;          /* Return code */\n  Pgno nPageCount;             /* Total number of pages in database file */\n  Pgno pg1;                    /* First page of the sector pPg is located on. */\n  int nPage = 0;               /* Number of pages starting at pg1 to journal */\n  int ii;                      /* Loop counter */\n  int needSync = 0;            /* True if any page has PGHDR_NEED_SYNC */\n  Pager *pPager = pPg->pPager; /* The pager that owns pPg */\n  Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);\n\n  /* Set the doNotSpill NOSYNC bit to 1. This is because we cannot allow\n  ** a journal header to be written between the pages journaled by\n  ** this function.\n  */\n  assert( !MEMDB );\n  assert( (pPager->doNotSpill & SPILLFLAG_NOSYNC)==0 );\n  pPager->doNotSpill |= SPILLFLAG_NOSYNC;\n\n  /* This trick assumes that both the page-size and sector-size are\n  ** an integer power of 2. It sets variable pg1 to the identifier\n  ** of the first page of the sector pPg is located on.\n  */\n  pg1 = ((pPg->pgno-1) & ~(nPagePerSector-1)) + 1;\n\n  nPageCount = pPager->dbSize;\n  if( pPg->pgno>nPageCount ){\n    nPage = (pPg->pgno - pg1)+1;\n  }else if( (pg1+nPagePerSector-1)>nPageCount ){\n    nPage = nPageCount+1-pg1;\n  }else{\n    nPage = nPagePerSector;\n  }\n  assert(nPage>0);\n  assert(pg1<=pPg->pgno);\n  assert((pg1+nPage)>pPg->pgno);\n\n  for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){\n    Pgno pg = pg1+ii;\n    PgHdr *pPage;\n    if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){\n      if( pg!=PAGER_SJ_PGNO(pPager) ){\n        rc = sqlite3PagerGet(pPager, pg, &pPage, 0);\n        if( rc==SQLITE_OK ){\n          rc = pager_write(pPage);\n          if( pPage->flags&PGHDR_NEED_SYNC ){\n            needSync = 1;\n          }\n          sqlite3PagerUnrefNotNull(pPage);\n        }\n      }\n    }else if( (pPage = sqlite3PagerLookup(pPager, pg))!=0 ){\n      if( pPage->flags&PGHDR_NEED_SYNC ){\n        needSync = 1;\n      }\n      sqlite3PagerUnrefNotNull(pPage);\n    }\n  }\n\n  /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages\n  ** starting at pg1, then it needs to be set for all of them. Because\n  ** writing to any of these nPage pages may damage the others, the\n  ** journal file must contain sync()ed copies of all of them\n  ** before any of them can be written out to the database file.\n  */\n  if( rc==SQLITE_OK && needSync ){\n    assert( !MEMDB );\n    for(ii=0; ii<nPage; ii++){\n      PgHdr *pPage = sqlite3PagerLookup(pPager, pg1+ii);\n      if( pPage ){\n        pPage->flags |= PGHDR_NEED_SYNC;\n        sqlite3PagerUnrefNotNull(pPage);\n      }\n    }\n  }\n\n  assert( (pPager->doNotSpill & SPILLFLAG_NOSYNC)!=0 );\n  pPager->doNotSpill &= ~SPILLFLAG_NOSYNC;\n  return rc;\n}\n\n/*\n** Mark a data page as writeable. This routine must be called before\n** making changes to a page. The caller must check the return value\n** of this function and be careful not to change any page data unless\n** this routine returns SQLITE_OK.\n**\n** The difference between this function and pager_write() is that this\n** function also deals with the special case where 2 or more pages\n** fit on a single disk sector. In this case all co-resident pages\n** must have been written to the journal file before returning.\n**\n** If an error occurs, SQLITE_NOMEM or an IO error code is returned\n** as appropriate. Otherwise, SQLITE_OK.\n*/\nSQLITE_PRIVATE int sqlite3PagerWrite(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  assert( (pPg->flags & PGHDR_MMAP)==0 );\n  assert( pPager->eState>=PAGER_WRITER_LOCKED );\n  assert( assert_pager_state(pPager) );\n  if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){\n    if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);\n    return SQLITE_OK;\n  }else if( pPager->errCode ){\n    return pPager->errCode;\n  }else if( pPager->sectorSize > (u32)pPager->pageSize ){\n    assert( pPager->tempFile==0 );\n    return pagerWriteLargeSector(pPg);\n  }else{\n    return pager_write(pPg);\n  }\n}\n\n/*\n** Return TRUE if the page given in the argument was previously passed\n** to sqlite3PagerWrite().  In other words, return TRUE if it is ok\n** to change the content of the page.\n*/\n#ifndef NDEBUG\nSQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){\n  return pPg->flags & PGHDR_WRITEABLE;\n}\n#endif\n\n/*\n** A call to this routine tells the pager that it is not necessary to\n** write the information on page pPg back to the disk, even though\n** that page might be marked as dirty.  This happens, for example, when\n** the page has been added as a leaf of the freelist and so its\n** content no longer matters.\n**\n** The overlying software layer calls this routine when all of the data\n** on the given page is unused. The pager marks the page as clean so\n** that it does not get written to disk.\n**\n** Tests show that this optimization can quadruple the speed of large\n** DELETE operations.\n**\n** This optimization cannot be used with a temp-file, as the page may\n** have been dirty at the start of the transaction. In that case, if\n** memory pressure forces page pPg out of the cache, the data does need\n** to be written out to disk so that it may be read back in if the\n** current transaction is rolled back.\n*/\nSQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){\n  Pager *pPager = pPg->pPager;\n  if( !pPager->tempFile && (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){\n    PAGERTRACE((\"DONT_WRITE page %d of %d\\n\", pPg->pgno, PAGERID(pPager)));\n    IOTRACE((\"CLEAN %p %d\\n\", pPager, pPg->pgno))\n    pPg->flags |= PGHDR_DONT_WRITE;\n    pPg->flags &= ~PGHDR_WRITEABLE;\n    testcase( pPg->flags & PGHDR_NEED_SYNC );\n    pager_set_pagehash(pPg);\n  }\n}\n\n/*\n** This routine is called to increment the value of the database file\n** change-counter, stored as a 4-byte big-endian integer starting at\n** byte offset 24 of the pager file.  The secondary change counter at\n** 92 is also updated, as is the SQLite version number at offset 96.\n**\n** But this only happens if the pPager->changeCountDone flag is false.\n** To avoid excess churning of page 1, the update only happens once.\n** See also the pager_write_changecounter() routine that does an\n** unconditional update of the change counters.\n**\n** If the isDirectMode flag is zero, then this is done by calling\n** sqlite3PagerWrite() on page 1, then modifying the contents of the\n** page data. In this case the file will be updated when the current\n** transaction is committed.\n**\n** The isDirectMode flag may only be non-zero if the library was compiled\n** with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,\n** if isDirect is non-zero, then the database file is updated directly\n** by writing an updated version of page 1 using a call to the\n** sqlite3OsWrite() function.\n*/\nstatic int pager_incr_changecounter(Pager *pPager, int isDirectMode){\n  int rc = SQLITE_OK;\n\n  assert( pPager->eState==PAGER_WRITER_CACHEMOD\n       || pPager->eState==PAGER_WRITER_DBMOD\n  );\n  assert( assert_pager_state(pPager) );\n\n  /* Declare and initialize constant integer 'isDirect'. If the\n  ** atomic-write optimization is enabled in this build, then isDirect\n  ** is initialized to the value passed as the isDirectMode parameter\n  ** to this function. Otherwise, it is always set to zero.\n  **\n  ** The idea is that if the atomic-write optimization is not\n  ** enabled at compile time, the compiler can omit the tests of\n  ** 'isDirect' below, as well as the block enclosed in the\n  ** \"if( isDirect )\" condition.\n  */\n#ifndef SQLITE_ENABLE_ATOMIC_WRITE\n# define DIRECT_MODE 0\n  assert( isDirectMode==0 );\n  UNUSED_PARAMETER(isDirectMode);\n#else\n# define DIRECT_MODE isDirectMode\n#endif\n\n  if( !pPager->changeCountDone && pPager->dbSize>0 ){\n    PgHdr *pPgHdr;                /* Reference to page 1 */\n\n    assert( !pPager->tempFile && isOpen(pPager->fd) );\n\n    /* Open page 1 of the file for writing. */\n    rc = sqlite3PagerGet(pPager, 1, &pPgHdr, 0);\n    assert( pPgHdr==0 || rc==SQLITE_OK );\n\n    /* If page one was fetched successfully, and this function is not\n    ** operating in direct-mode, make page 1 writable.  When not in\n    ** direct mode, page 1 is always held in cache and hence the PagerGet()\n    ** above is always successful - hence the ALWAYS on rc==SQLITE_OK.\n    */\n    if( !DIRECT_MODE && ALWAYS(rc==SQLITE_OK) ){\n      rc = sqlite3PagerWrite(pPgHdr);\n    }\n\n    if( rc==SQLITE_OK ){\n      /* Actually do the update of the change counter */\n      pager_write_changecounter(pPgHdr);\n\n      /* If running in direct mode, write the contents of page 1 to the file. */\n      if( DIRECT_MODE ){\n        const void *zBuf;\n        assert( pPager->dbFileSize>0 );\n        zBuf = pPgHdr->pData;\n        if( rc==SQLITE_OK ){\n          rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);\n          pPager->aStat[PAGER_STAT_WRITE]++;\n        }\n        if( rc==SQLITE_OK ){\n          /* Update the pager's copy of the change-counter. Otherwise, the\n          ** next time a read transaction is opened the cache will be\n          ** flushed (as the change-counter values will not match).  */\n          const void *pCopy = (const void *)&((const char *)zBuf)[24];\n          memcpy(&pPager->dbFileVers, pCopy, sizeof(pPager->dbFileVers));\n          pPager->changeCountDone = 1;\n        }\n      }else{\n        pPager->changeCountDone = 1;\n      }\n    }\n\n    /* Release the page reference. */\n    sqlite3PagerUnref(pPgHdr);\n  }\n  return rc;\n}\n\n/*\n** Sync the database file to disk. This is a no-op for in-memory databases\n** or pages with the Pager.noSync flag set.\n**\n** If successful, or if called on a pager for which it is a no-op, this\n** function returns SQLITE_OK. Otherwise, an IO error code is returned.\n*/\nSQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager, const char *zSuper){\n  int rc = SQLITE_OK;\n  void *pArg = (void*)zSuper;\n  rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC, pArg);\n  if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;\n  if( rc==SQLITE_OK && !pPager->noSync ){\n    assert( !MEMDB );\n    rc = sqlite3OsSync(pPager->fd, pPager->syncFlags);\n  }\n  return rc;\n}\n\n/*\n** This function may only be called while a write-transaction is active in\n** rollback. If the connection is in WAL mode, this call is a no-op.\n** Otherwise, if the connection does not already have an EXCLUSIVE lock on\n** the database file, an attempt is made to obtain one.\n**\n** If the EXCLUSIVE lock is already held or the attempt to obtain it is\n** successful, or the connection is in WAL mode, SQLITE_OK is returned.\n** Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is\n** returned.\n*/\nSQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager *pPager){\n  int rc = pPager->errCode;\n  assert( assert_pager_state(pPager) );\n  if( rc==SQLITE_OK ){\n    assert( pPager->eState==PAGER_WRITER_CACHEMOD\n         || pPager->eState==PAGER_WRITER_DBMOD\n         || pPager->eState==PAGER_WRITER_LOCKED\n    );\n    assert( assert_pager_state(pPager) );\n    if( 0==pagerUseWal(pPager) ){\n      rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);\n    }\n  }\n  return rc;\n}\n\n/*\n** Sync the database file for the pager pPager. zSuper points to the name\n** of a super-journal file that should be written into the individual\n** journal file. zSuper may be NULL, which is interpreted as no\n** super-journal (a single database transaction).\n**\n** This routine ensures that:\n**\n**   * The database file change-counter is updated,\n**   * the journal is synced (unless the atomic-write optimization is used),\n**   * all dirty pages are written to the database file,\n**   * the database file is truncated (if required), and\n**   * the database file synced.\n**\n** The only thing that remains to commit the transaction is to finalize\n** (delete, truncate or zero the first part of) the journal file (or\n** delete the super-journal file if specified).\n**\n** Note that if zSuper==NULL, this does not overwrite a previous value\n** passed to an sqlite3PagerCommitPhaseOne() call.\n**\n** If the final parameter - noSync - is true, then the database file itself\n** is not synced. The caller must call sqlite3PagerSync() directly to\n** sync the database file before calling CommitPhaseTwo() to delete the\n** journal file in this case.\n*/\nSQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(\n  Pager *pPager,                  /* Pager object */\n  const char *zSuper,            /* If not NULL, the super-journal name */\n  int noSync                      /* True to omit the xSync on the db file */\n){\n  int rc = SQLITE_OK;             /* Return code */\n\n  assert( pPager->eState==PAGER_WRITER_LOCKED\n       || pPager->eState==PAGER_WRITER_CACHEMOD\n       || pPager->eState==PAGER_WRITER_DBMOD\n       || pPager->eState==PAGER_ERROR\n  );\n  assert( assert_pager_state(pPager) );\n\n  /* If a prior error occurred, report that error again. */\n  if( NEVER(pPager->errCode) ) return pPager->errCode;\n\n  /* Provide the ability to easily simulate an I/O error during testing */\n  if( sqlite3FaultSim(400) ) return SQLITE_IOERR;\n\n  PAGERTRACE((\"DATABASE SYNC: File=%s zSuper=%s nSize=%d\\n\",\n      pPager->zFilename, zSuper, pPager->dbSize));\n\n  /* If no database changes have been made, return early. */\n  if( pPager->eState<PAGER_WRITER_CACHEMOD ) return SQLITE_OK;\n\n  assert( MEMDB==0 || pPager->tempFile );\n  assert( isOpen(pPager->fd) || pPager->tempFile );\n  if( 0==pagerFlushOnCommit(pPager, 1) ){\n    /* If this is an in-memory db, or no pages have been written to, or this\n    ** function has already been called, it is mostly a no-op.  However, any\n    ** backup in progress needs to be restarted.  */\n    sqlite3BackupRestart(pPager->pBackup);\n  }else{\n    PgHdr *pList;\n    if( pagerUseWal(pPager) ){\n      PgHdr *pPageOne = 0;\n      pList = sqlite3PcacheDirtyList(pPager->pPCache);\n      if( pList==0 ){\n        /* Must have at least one page for the WAL commit flag.\n        ** Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 */\n        rc = sqlite3PagerGet(pPager, 1, &pPageOne, 0);\n        pList = pPageOne;\n        pList->pDirty = 0;\n      }\n      assert( rc==SQLITE_OK );\n      if( ALWAYS(pList) ){\n        rc = pagerWalFrames(pPager, pList, pPager->dbSize, 1);\n      }\n      sqlite3PagerUnref(pPageOne);\n      if( rc==SQLITE_OK ){\n        sqlite3PcacheCleanAll(pPager->pPCache);\n      }\n    }else{\n      /* The bBatch boolean is true if the batch-atomic-write commit method\n      ** should be used.  No rollback journal is created if batch-atomic-write\n      ** is enabled.\n      */\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n      sqlite3_file *fd = pPager->fd;\n      int bBatch = zSuper==0    /* An SQLITE_IOCAP_BATCH_ATOMIC commit */\n        && (sqlite3OsDeviceCharacteristics(fd) & SQLITE_IOCAP_BATCH_ATOMIC)\n        && !pPager->noSync\n        && sqlite3JournalIsInMemory(pPager->jfd);\n#else\n#     define bBatch 0\n#endif\n\n#ifdef SQLITE_ENABLE_ATOMIC_WRITE\n      /* The following block updates the change-counter. Exactly how it\n      ** does this depends on whether or not the atomic-update optimization\n      ** was enabled at compile time, and if this transaction meets the\n      ** runtime criteria to use the operation:\n      **\n      **    * The file-system supports the atomic-write property for\n      **      blocks of size page-size, and\n      **    * This commit is not part of a multi-file transaction, and\n      **    * Exactly one page has been modified and store in the journal file.\n      **\n      ** If the optimization was not enabled at compile time, then the\n      ** pager_incr_changecounter() function is called to update the change\n      ** counter in 'indirect-mode'. If the optimization is compiled in but\n      ** is not applicable to this transaction, call sqlite3JournalCreate()\n      ** to make sure the journal file has actually been created, then call\n      ** pager_incr_changecounter() to update the change-counter in indirect\n      ** mode.\n      **\n      ** Otherwise, if the optimization is both enabled and applicable,\n      ** then call pager_incr_changecounter() to update the change-counter\n      ** in 'direct' mode. In this case the journal file will never be\n      ** created for this transaction.\n      */\n      if( bBatch==0 ){\n        PgHdr *pPg;\n        assert( isOpen(pPager->jfd)\n            || pPager->journalMode==PAGER_JOURNALMODE_OFF\n            || pPager->journalMode==PAGER_JOURNALMODE_WAL\n            );\n        if( !zSuper && isOpen(pPager->jfd)\n         && pPager->journalOff==jrnlBufferSize(pPager)\n         && pPager->dbSize>=pPager->dbOrigSize\n         && (!(pPg = sqlite3PcacheDirtyList(pPager->pPCache)) || 0==pPg->pDirty)\n        ){\n          /* Update the db file change counter via the direct-write method. The\n          ** following call will modify the in-memory representation of page 1\n          ** to include the updated change counter and then write page 1\n          ** directly to the database file. Because of the atomic-write\n          ** property of the host file-system, this is safe.\n          */\n          rc = pager_incr_changecounter(pPager, 1);\n        }else{\n          rc = sqlite3JournalCreate(pPager->jfd);\n          if( rc==SQLITE_OK ){\n            rc = pager_incr_changecounter(pPager, 0);\n          }\n        }\n      }\n#else  /* SQLITE_ENABLE_ATOMIC_WRITE */\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n      if( zSuper ){\n        rc = sqlite3JournalCreate(pPager->jfd);\n        if( rc!=SQLITE_OK ) goto commit_phase_one_exit;\n        assert( bBatch==0 );\n      }\n#endif\n      rc = pager_incr_changecounter(pPager, 0);\n#endif /* !SQLITE_ENABLE_ATOMIC_WRITE */\n      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;\n\n      /* Write the super-journal name into the journal file. If a\n      ** super-journal file name has already been written to the journal file,\n      ** or if zSuper is NULL (no super-journal), then this call is a no-op.\n      */\n      rc = writeSuperJournal(pPager, zSuper);\n      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;\n\n      /* Sync the journal file and write all dirty pages to the database.\n      ** If the atomic-update optimization is being used, this sync will not\n      ** create the journal file or perform any real IO.\n      **\n      ** Because the change-counter page was just modified, unless the\n      ** atomic-update optimization is used it is almost certain that the\n      ** journal requires a sync here. However, in locking_mode=exclusive\n      ** on a system under memory pressure it is just possible that this is\n      ** not the case. In this case it is likely enough that the redundant\n      ** xSync() call will be changed to a no-op by the OS anyhow.\n      */\n      rc = syncJournal(pPager, 0);\n      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;\n\n      pList = sqlite3PcacheDirtyList(pPager->pPCache);\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n      if( bBatch ){\n        rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_BEGIN_ATOMIC_WRITE, 0);\n        if( rc==SQLITE_OK ){\n          rc = pager_write_pagelist(pPager, pList);\n          if( rc==SQLITE_OK && pPager->dbSize>pPager->dbFileSize ){\n            char *pTmp = pPager->pTmpSpace;\n            int szPage = (int)pPager->pageSize;\n            memset(pTmp, 0, szPage);\n            rc = sqlite3OsWrite(pPager->fd, pTmp, szPage,\n                      ((i64)pPager->dbSize*pPager->pageSize)-szPage);\n          }\n          if( rc==SQLITE_OK ){\n            rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);\n          }\n          if( rc!=SQLITE_OK ){\n            sqlite3OsFileControlHint(fd, SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE, 0);\n          }\n        }\n\n        if( (rc&0xFF)==SQLITE_IOERR && rc!=SQLITE_IOERR_NOMEM ){\n          rc = sqlite3JournalCreate(pPager->jfd);\n          if( rc!=SQLITE_OK ){\n            sqlite3OsClose(pPager->jfd);\n            goto commit_phase_one_exit;\n          }\n          bBatch = 0;\n        }else{\n          sqlite3OsClose(pPager->jfd);\n        }\n      }\n#endif /* SQLITE_ENABLE_BATCH_ATOMIC_WRITE */\n\n      if( bBatch==0 ){\n        rc = pager_write_pagelist(pPager, pList);\n      }\n      if( rc!=SQLITE_OK ){\n        assert( rc!=SQLITE_IOERR_BLOCKED );\n        goto commit_phase_one_exit;\n      }\n      sqlite3PcacheCleanAll(pPager->pPCache);\n\n      /* If the file on disk is smaller than the database image, use\n      ** pager_truncate to grow the file here. This can happen if the database\n      ** image was extended as part of the current transaction and then the\n      ** last page in the db image moved to the free-list. In this case the\n      ** last page is never written out to disk, leaving the database file\n      ** undersized. Fix this now if it is the case.  */\n      if( pPager->dbSize>pPager->dbFileSize ){\n        Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_SJ_PGNO(pPager));\n        assert( pPager->eState==PAGER_WRITER_DBMOD );\n        rc = pager_truncate(pPager, nNew);\n        if( rc!=SQLITE_OK ) goto commit_phase_one_exit;\n      }\n\n      /* Finally, sync the database file. */\n      if( !noSync ){\n        rc = sqlite3PagerSync(pPager, zSuper);\n      }\n      IOTRACE((\"DBSYNC %p\\n\", pPager))\n    }\n  }\n\ncommit_phase_one_exit:\n  if( rc==SQLITE_OK && !pagerUseWal(pPager) ){\n    pPager->eState = PAGER_WRITER_FINISHED;\n  }\n  return rc;\n}\n\n\n/*\n** When this function is called, the database file has been completely\n** updated to reflect the changes made by the current transaction and\n** synced to disk. The journal file still exists in the file-system\n** though, and if a failure occurs at this point it will eventually\n** be used as a hot-journal and the current transaction rolled back.\n**\n** This function finalizes the journal file, either by deleting,\n** truncating or partially zeroing it, so that it cannot be used\n** for hot-journal rollback. Once this is done the transaction is\n** irrevocably committed.\n**\n** If an error occurs, an IO error code is returned and the pager\n** moves into the error state. Otherwise, SQLITE_OK is returned.\n*/\nSQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager *pPager){\n  int rc = SQLITE_OK;                  /* Return code */\n\n  /* This routine should not be called if a prior error has occurred.\n  ** But if (due to a coding error elsewhere in the system) it does get\n  ** called, just return the same error code without doing anything. */\n  if( NEVER(pPager->errCode) ) return pPager->errCode;\n  pPager->iDataVersion++;\n\n  assert( pPager->eState==PAGER_WRITER_LOCKED\n       || pPager->eState==PAGER_WRITER_FINISHED\n       || (pagerUseWal(pPager) && pPager->eState==PAGER_WRITER_CACHEMOD)\n  );\n  assert( assert_pager_state(pPager) );\n\n  /* An optimization. If the database was not actually modified during\n  ** this transaction, the pager is running in exclusive-mode and is\n  ** using persistent journals, then this function is a no-op.\n  **\n  ** The start of the journal file currently contains a single journal\n  ** header with the nRec field set to 0. If such a journal is used as\n  ** a hot-journal during hot-journal rollback, 0 changes will be made\n  ** to the database file. So there is no need to zero the journal\n  ** header. Since the pager is in exclusive mode, there is no need\n  ** to drop any locks either.\n  */\n  if( pPager->eState==PAGER_WRITER_LOCKED\n   && pPager->exclusiveMode\n   && pPager->journalMode==PAGER_JOURNALMODE_PERSIST\n  ){\n    assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) || !pPager->journalOff );\n    pPager->eState = PAGER_READER;\n    return SQLITE_OK;\n  }\n\n  PAGERTRACE((\"COMMIT %d\\n\", PAGERID(pPager)));\n  rc = pager_end_transaction(pPager, pPager->setSuper, 1);\n  return pager_error(pPager, rc);\n}\n\n/*\n** If a write transaction is open, then all changes made within the\n** transaction are reverted and the current write-transaction is closed.\n** The pager falls back to PAGER_READER state if successful, or PAGER_ERROR\n** state if an error occurs.\n**\n** If the pager is already in PAGER_ERROR state when this function is called,\n** it returns Pager.errCode immediately. No work is performed in this case.\n**\n** Otherwise, in rollback mode, this function performs two functions:\n**\n**   1) It rolls back the journal file, restoring all database file and\n**      in-memory cache pages to the state they were in when the transaction\n**      was opened, and\n**\n**   2) It finalizes the journal file, so that it is not used for hot\n**      rollback at any point in the future.\n**\n** Finalization of the journal file (task 2) is only performed if the\n** rollback is successful.\n**\n** In WAL mode, all cache-entries containing data modified within the\n** current transaction are either expelled from the cache or reverted to\n** their pre-transaction state by re-reading data from the database or\n** WAL files. The WAL transaction is then closed.\n*/\nSQLITE_PRIVATE int sqlite3PagerRollback(Pager *pPager){\n  int rc = SQLITE_OK;                  /* Return code */\n  PAGERTRACE((\"ROLLBACK %d\\n\", PAGERID(pPager)));\n\n  /* PagerRollback() is a no-op if called in READER or OPEN state. If\n  ** the pager is already in the ERROR state, the rollback is not\n  ** attempted here. Instead, the error code is returned to the caller.\n  */\n  assert( assert_pager_state(pPager) );\n  if( pPager->eState==PAGER_ERROR ) return pPager->errCode;\n  if( pPager->eState<=PAGER_READER ) return SQLITE_OK;\n\n  if( pagerUseWal(pPager) ){\n    int rc2;\n    rc = sqlite3PagerSavepoint(pPager, SAVEPOINT_ROLLBACK, -1);\n    rc2 = pager_end_transaction(pPager, pPager->setSuper, 0);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }else if( !isOpen(pPager->jfd) || pPager->eState==PAGER_WRITER_LOCKED ){\n    int eState = pPager->eState;\n    rc = pager_end_transaction(pPager, 0, 0);\n    if( !MEMDB && eState>PAGER_WRITER_LOCKED ){\n      /* This can happen using journal_mode=off. Move the pager to the error\n      ** state to indicate that the contents of the cache may not be trusted.\n      ** Any active readers will get SQLITE_ABORT.\n      */\n      pPager->errCode = SQLITE_ABORT;\n      pPager->eState = PAGER_ERROR;\n      setGetterMethod(pPager);\n      return rc;\n    }\n  }else{\n    rc = pager_playback(pPager, 0);\n  }\n\n  assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK );\n  assert( rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT\n          || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR\n          || rc==SQLITE_CANTOPEN\n  );\n\n  /* If an error occurs during a ROLLBACK, we can no longer trust the pager\n  ** cache. So call pager_error() on the way out to make any error persistent.\n  */\n  return pager_error(pPager, rc);\n}\n\n/*\n** Return TRUE if the database file is opened read-only.  Return FALSE\n** if the database is (in theory) writable.\n*/\nSQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager *pPager){\n  return pPager->readOnly;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Return the sum of the reference counts for all pages held by pPager.\n*/\nSQLITE_PRIVATE int sqlite3PagerRefcount(Pager *pPager){\n  return sqlite3PcacheRefCount(pPager->pPCache);\n}\n#endif\n\n/*\n** Return the approximate number of bytes of memory currently\n** used by the pager and its associated cache.\n*/\nSQLITE_PRIVATE int sqlite3PagerMemUsed(Pager *pPager){\n  int perPageSize = pPager->pageSize + pPager->nExtra\n    + (int)(sizeof(PgHdr) + 5*sizeof(void*));\n  return perPageSize*sqlite3PcachePagecount(pPager->pPCache)\n           + sqlite3MallocSize(pPager)\n           + pPager->pageSize;\n}\n\n/*\n** Return the number of references to the specified page.\n*/\nSQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage *pPage){\n  return sqlite3PcachePageRefcount(pPage);\n}\n\n#ifdef SQLITE_TEST\n/*\n** This routine is used for testing and analysis only.\n*/\nSQLITE_PRIVATE int *sqlite3PagerStats(Pager *pPager){\n  static int a[11];\n  a[0] = sqlite3PcacheRefCount(pPager->pPCache);\n  a[1] = sqlite3PcachePagecount(pPager->pPCache);\n  a[2] = sqlite3PcacheGetCachesize(pPager->pPCache);\n  a[3] = pPager->eState==PAGER_OPEN ? -1 : (int) pPager->dbSize;\n  a[4] = pPager->eState;\n  a[5] = pPager->errCode;\n  a[6] = (int)pPager->aStat[PAGER_STAT_HIT] & 0x7fffffff;\n  a[7] = (int)pPager->aStat[PAGER_STAT_MISS] & 0x7fffffff;\n  a[8] = 0;  /* Used to be pPager->nOvfl */\n  a[9] = pPager->nRead;\n  a[10] = (int)pPager->aStat[PAGER_STAT_WRITE] & 0x7fffffff;\n  return a;\n}\n#endif\n\n/*\n** Parameter eStat must be one of SQLITE_DBSTATUS_CACHE_HIT, _MISS, _WRITE,\n** or _WRITE+1.  The SQLITE_DBSTATUS_CACHE_WRITE+1 case is a translation\n** of SQLITE_DBSTATUS_CACHE_SPILL.  The _SPILL case is not contiguous because\n** it was added later.\n**\n** Before returning, *pnVal is incremented by the\n** current cache hit or miss count, according to the value of eStat. If the\n** reset parameter is non-zero, the cache hit or miss count is zeroed before\n** returning.\n*/\nSQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *pPager, int eStat, int reset, u64 *pnVal){\n\n  assert( eStat==SQLITE_DBSTATUS_CACHE_HIT\n       || eStat==SQLITE_DBSTATUS_CACHE_MISS\n       || eStat==SQLITE_DBSTATUS_CACHE_WRITE\n       || eStat==SQLITE_DBSTATUS_CACHE_WRITE+1\n  );\n\n  assert( SQLITE_DBSTATUS_CACHE_HIT+1==SQLITE_DBSTATUS_CACHE_MISS );\n  assert( SQLITE_DBSTATUS_CACHE_HIT+2==SQLITE_DBSTATUS_CACHE_WRITE );\n  assert( PAGER_STAT_HIT==0 && PAGER_STAT_MISS==1\n           && PAGER_STAT_WRITE==2 && PAGER_STAT_SPILL==3 );\n\n  eStat -= SQLITE_DBSTATUS_CACHE_HIT;\n  *pnVal += pPager->aStat[eStat];\n  if( reset ){\n    pPager->aStat[eStat] = 0;\n  }\n}\n\n/*\n** Return true if this is an in-memory or temp-file backed pager.\n*/\nSQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager *pPager){\n  return pPager->tempFile || pPager->memVfs;\n}\n\n/*\n** Check that there are at least nSavepoint savepoints open. If there are\n** currently less than nSavepoints open, then open one or more savepoints\n** to make up the difference. If the number of savepoints is already\n** equal to nSavepoint, then this function is a no-op.\n**\n** If a memory allocation fails, SQLITE_NOMEM is returned. If an error\n** occurs while opening the sub-journal file, then an IO error code is\n** returned. Otherwise, SQLITE_OK.\n*/\nstatic SQLITE_NOINLINE int pagerOpenSavepoint(Pager *pPager, int nSavepoint){\n  int rc = SQLITE_OK;                       /* Return code */\n  int nCurrent = pPager->nSavepoint;        /* Current number of savepoints */\n  int ii;                                   /* Iterator variable */\n  PagerSavepoint *aNew;                     /* New Pager.aSavepoint array */\n\n  assert( pPager->eState>=PAGER_WRITER_LOCKED );\n  assert( assert_pager_state(pPager) );\n  assert( nSavepoint>nCurrent && pPager->useJournal );\n\n  /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM\n  ** if the allocation fails. Otherwise, zero the new portion in case a\n  ** malloc failure occurs while populating it in the for(...) loop below.\n  */\n  aNew = (PagerSavepoint *)sqlite3Realloc(\n      pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint\n  );\n  if( !aNew ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));\n  pPager->aSavepoint = aNew;\n\n  /* Populate the PagerSavepoint structures just allocated. */\n  for(ii=nCurrent; ii<nSavepoint; ii++){\n    aNew[ii].nOrig = pPager->dbSize;\n    if( isOpen(pPager->jfd) && pPager->journalOff>0 ){\n      aNew[ii].iOffset = pPager->journalOff;\n    }else{\n      aNew[ii].iOffset = JOURNAL_HDR_SZ(pPager);\n    }\n    aNew[ii].iSubRec = pPager->nSubRec;\n    aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);\n    aNew[ii].bTruncateOnRelease = 1;\n    if( !aNew[ii].pInSavepoint ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    if( pagerUseWal(pPager) ){\n      sqlite3WalSavepoint(pPager->pWal, aNew[ii].aWalData);\n    }\n    pPager->nSavepoint = ii+1;\n  }\n  assert( pPager->nSavepoint==nSavepoint );\n  assertTruncateConstraint(pPager);\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){\n  assert( pPager->eState>=PAGER_WRITER_LOCKED );\n  assert( assert_pager_state(pPager) );\n\n  if( nSavepoint>pPager->nSavepoint && pPager->useJournal ){\n    return pagerOpenSavepoint(pPager, nSavepoint);\n  }else{\n    return SQLITE_OK;\n  }\n}\n\n\n/*\n** This function is called to rollback or release (commit) a savepoint.\n** The savepoint to release or rollback need not be the most recently\n** created savepoint.\n**\n** Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE.\n** If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with\n** index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes\n** that have occurred since the specified savepoint was created.\n**\n** The savepoint to rollback or release is identified by parameter\n** iSavepoint. A value of 0 means to operate on the outermost savepoint\n** (the first created). A value of (Pager.nSavepoint-1) means operate\n** on the most recently created savepoint. If iSavepoint is greater than\n** (Pager.nSavepoint-1), then this function is a no-op.\n**\n** If a negative value is passed to this function, then the current\n** transaction is rolled back. This is different to calling\n** sqlite3PagerRollback() because this function does not terminate\n** the transaction or unlock the database, it just restores the\n** contents of the database to its original state.\n**\n** In any case, all savepoints with an index greater than iSavepoint\n** are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE),\n** then savepoint iSavepoint is also destroyed.\n**\n** This function may return SQLITE_NOMEM if a memory allocation fails,\n** or an IO error code if an IO error occurs while rolling back a\n** savepoint. If no errors occur, SQLITE_OK is returned.\n*/\nSQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){\n  int rc = pPager->errCode;\n\n#ifdef SQLITE_ENABLE_ZIPVFS\n  if( op==SAVEPOINT_RELEASE ) rc = SQLITE_OK;\n#endif\n\n  assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );\n  assert( iSavepoint>=0 || op==SAVEPOINT_ROLLBACK );\n\n  if( rc==SQLITE_OK && iSavepoint<pPager->nSavepoint ){\n    int ii;            /* Iterator variable */\n    int nNew;          /* Number of remaining savepoints after this op. */\n\n    /* Figure out how many savepoints will still be active after this\n    ** operation. Store this value in nNew. Then free resources associated\n    ** with any savepoints that are destroyed by this operation.\n    */\n    nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1);\n    for(ii=nNew; ii<pPager->nSavepoint; ii++){\n      sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);\n    }\n    pPager->nSavepoint = nNew;\n\n    /* Truncate the sub-journal so that it only includes the parts\n    ** that are still in use. */\n    if( op==SAVEPOINT_RELEASE ){\n      PagerSavepoint *pRel = &pPager->aSavepoint[nNew];\n      if( pRel->bTruncateOnRelease && isOpen(pPager->sjfd) ){\n        /* Only truncate if it is an in-memory sub-journal. */\n        if( sqlite3JournalIsInMemory(pPager->sjfd) ){\n          i64 sz = (pPager->pageSize+4)*(i64)pRel->iSubRec;\n          rc = sqlite3OsTruncate(pPager->sjfd, sz);\n          assert( rc==SQLITE_OK );\n        }\n        pPager->nSubRec = pRel->iSubRec;\n      }\n    }\n    /* Else this is a rollback operation, playback the specified savepoint.\n    ** If this is a temp-file, it is possible that the journal file has\n    ** not yet been opened. In this case there have been no changes to\n    ** the database file, so the playback operation can be skipped.\n    */\n    else if( pagerUseWal(pPager) || isOpen(pPager->jfd) ){\n      PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];\n      rc = pagerPlaybackSavepoint(pPager, pSavepoint);\n      assert(rc!=SQLITE_DONE);\n    }\n\n#ifdef SQLITE_ENABLE_ZIPVFS\n    /* If the cache has been modified but the savepoint cannot be rolled\n    ** back journal_mode=off, put the pager in the error state. This way,\n    ** if the VFS used by this pager includes ZipVFS, the entire transaction\n    ** can be rolled back at the ZipVFS level.  */\n    else if(\n        pPager->journalMode==PAGER_JOURNALMODE_OFF\n     && pPager->eState>=PAGER_WRITER_CACHEMOD\n    ){\n      pPager->errCode = SQLITE_ABORT;\n      pPager->eState = PAGER_ERROR;\n      setGetterMethod(pPager);\n    }\n#endif\n  }\n\n  return rc;\n}\n\n/*\n** Return the full pathname of the database file.\n**\n** Except, if the pager is in-memory only, then return an empty string if\n** nullIfMemDb is true.  This routine is called with nullIfMemDb==1 when\n** used to report the filename to the user, for compatibility with legacy\n** behavior.  But when the Btree needs to know the filename for matching to\n** shared cache, it uses nullIfMemDb==0 so that in-memory databases can\n** participate in shared-cache.\n**\n** The return value to this routine is always safe to use with\n** sqlite3_uri_parameter() and sqlite3_filename_database() and friends.\n*/\nSQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){\n  static const char zFake[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };\n  if( nullIfMemDb && (pPager->memDb || sqlite3IsMemdb(pPager->pVfs)) ){\n    return &zFake[4];\n  }else{\n    return pPager->zFilename;\n  }\n}\n\n/*\n** Return the VFS structure for the pager.\n*/\nSQLITE_PRIVATE sqlite3_vfs *sqlite3PagerVfs(Pager *pPager){\n  return pPager->pVfs;\n}\n\n/*\n** Return the file handle for the database file associated\n** with the pager.  This might return NULL if the file has\n** not yet been opened.\n*/\nSQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager *pPager){\n  return pPager->fd;\n}\n\n/*\n** Return the file handle for the journal file (if it exists).\n** This will be either the rollback journal or the WAL file.\n*/\nSQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager *pPager){\n#ifdef SQLITE_OMIT_WAL\n  return pPager->jfd;\n#else\n  return pPager->pWal ? sqlite3WalFile(pPager->pWal) : pPager->jfd;\n#endif\n}\n\n/*\n** Return the full pathname of the journal file.\n*/\nSQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager *pPager){\n  return pPager->zJournal;\n}\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n/*\n** Move the page pPg to location pgno in the file.\n**\n** There must be no references to the page previously located at\n** pgno (which we call pPgOld) though that page is allowed to be\n** in cache.  If the page previously located at pgno is not already\n** in the rollback journal, it is not put there by by this routine.\n**\n** References to the page pPg remain valid. Updating any\n** meta-data associated with pPg (i.e. data stored in the nExtra bytes\n** allocated along with the page) is the responsibility of the caller.\n**\n** A transaction must be active when this routine is called. It used to be\n** required that a statement transaction was not active, but this restriction\n** has been removed (CREATE INDEX needs to move a page when a statement\n** transaction is active).\n**\n** If the fourth argument, isCommit, is non-zero, then this page is being\n** moved as part of a database reorganization just before the transaction\n** is being committed. In this case, it is guaranteed that the database page\n** pPg refers to will not be written to again within this transaction.\n**\n** This function may return SQLITE_NOMEM or an IO error code if an error\n** occurs. Otherwise, it returns SQLITE_OK.\n*/\nSQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){\n  PgHdr *pPgOld;               /* The page being overwritten. */\n  Pgno needSyncPgno = 0;       /* Old value of pPg->pgno, if sync is required */\n  int rc;                      /* Return code */\n  Pgno origPgno;               /* The original page number */\n\n  assert( pPg->nRef>0 );\n  assert( pPager->eState==PAGER_WRITER_CACHEMOD\n       || pPager->eState==PAGER_WRITER_DBMOD\n  );\n  assert( assert_pager_state(pPager) );\n\n  /* In order to be able to rollback, an in-memory database must journal\n  ** the page we are moving from.\n  */\n  assert( pPager->tempFile || !MEMDB );\n  if( pPager->tempFile ){\n    rc = sqlite3PagerWrite(pPg);\n    if( rc ) return rc;\n  }\n\n  /* If the page being moved is dirty and has not been saved by the latest\n  ** savepoint, then save the current contents of the page into the\n  ** sub-journal now. This is required to handle the following scenario:\n  **\n  **   BEGIN;\n  **     <journal page X, then modify it in memory>\n  **     SAVEPOINT one;\n  **       <Move page X to location Y>\n  **     ROLLBACK TO one;\n  **\n  ** If page X were not written to the sub-journal here, it would not\n  ** be possible to restore its contents when the \"ROLLBACK TO one\"\n  ** statement were is processed.\n  **\n  ** subjournalPage() may need to allocate space to store pPg->pgno into\n  ** one or more savepoint bitvecs. This is the reason this function\n  ** may return SQLITE_NOMEM.\n  */\n  if( (pPg->flags & PGHDR_DIRTY)!=0\n   && SQLITE_OK!=(rc = subjournalPageIfRequired(pPg))\n  ){\n    return rc;\n  }\n\n  PAGERTRACE((\"MOVE %d page %d (needSync=%d) moves to %d\\n\",\n      PAGERID(pPager), pPg->pgno, (pPg->flags&PGHDR_NEED_SYNC)?1:0, pgno));\n  IOTRACE((\"MOVE %p %d %d\\n\", pPager, pPg->pgno, pgno))\n\n  /* If the journal needs to be sync()ed before page pPg->pgno can\n  ** be written to, store pPg->pgno in local variable needSyncPgno.\n  **\n  ** If the isCommit flag is set, there is no need to remember that\n  ** the journal needs to be sync()ed before database page pPg->pgno\n  ** can be written to. The caller has already promised not to write to it.\n  */\n  if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){\n    needSyncPgno = pPg->pgno;\n    assert( pPager->journalMode==PAGER_JOURNALMODE_OFF ||\n            pageInJournal(pPager, pPg) || pPg->pgno>pPager->dbOrigSize );\n    assert( pPg->flags&PGHDR_DIRTY );\n  }\n\n  /* If the cache contains a page with page-number pgno, remove it\n  ** from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for\n  ** page pgno before the 'move' operation, it needs to be retained\n  ** for the page moved there.\n  */\n  pPg->flags &= ~PGHDR_NEED_SYNC;\n  pPgOld = sqlite3PagerLookup(pPager, pgno);\n  assert( !pPgOld || pPgOld->nRef==1 || CORRUPT_DB );\n  if( pPgOld ){\n    if( NEVER(pPgOld->nRef>1) ){\n      sqlite3PagerUnrefNotNull(pPgOld);\n      return SQLITE_CORRUPT_BKPT;\n    }\n    pPg->flags |= (pPgOld->flags&PGHDR_NEED_SYNC);\n    if( pPager->tempFile ){\n      /* Do not discard pages from an in-memory database since we might\n      ** need to rollback later.  Just move the page out of the way. */\n      sqlite3PcacheMove(pPgOld, pPager->dbSize+1);\n    }else{\n      sqlite3PcacheDrop(pPgOld);\n    }\n  }\n\n  origPgno = pPg->pgno;\n  sqlite3PcacheMove(pPg, pgno);\n  sqlite3PcacheMakeDirty(pPg);\n\n  /* For an in-memory database, make sure the original page continues\n  ** to exist, in case the transaction needs to roll back.  Use pPgOld\n  ** as the original page since it has already been allocated.\n  */\n  if( pPager->tempFile && pPgOld ){\n    sqlite3PcacheMove(pPgOld, origPgno);\n    sqlite3PagerUnrefNotNull(pPgOld);\n  }\n\n  if( needSyncPgno ){\n    /* If needSyncPgno is non-zero, then the journal file needs to be\n    ** sync()ed before any data is written to database file page needSyncPgno.\n    ** Currently, no such page exists in the page-cache and the\n    ** \"is journaled\" bitvec flag has been set. This needs to be remedied by\n    ** loading the page into the pager-cache and setting the PGHDR_NEED_SYNC\n    ** flag.\n    **\n    ** If the attempt to load the page into the page-cache fails, (due\n    ** to a malloc() or IO failure), clear the bit in the pInJournal[]\n    ** array. Otherwise, if the page is loaded and written again in\n    ** this transaction, it may be written to the database file before\n    ** it is synced into the journal file. This way, it may end up in\n    ** the journal file twice, but that is not a problem.\n    */\n    PgHdr *pPgHdr;\n    rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr, 0);\n    if( rc!=SQLITE_OK ){\n      if( needSyncPgno<=pPager->dbOrigSize ){\n        assert( pPager->pTmpSpace!=0 );\n        sqlite3BitvecClear(pPager->pInJournal, needSyncPgno, pPager->pTmpSpace);\n      }\n      return rc;\n    }\n    pPgHdr->flags |= PGHDR_NEED_SYNC;\n    sqlite3PcacheMakeDirty(pPgHdr);\n    sqlite3PagerUnrefNotNull(pPgHdr);\n  }\n\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** The page handle passed as the first argument refers to a dirty page\n** with a page number other than iNew. This function changes the page's\n** page number to iNew and sets the value of the PgHdr.flags field to\n** the value passed as the third parameter.\n*/\nSQLITE_PRIVATE void sqlite3PagerRekey(DbPage *pPg, Pgno iNew, u16 flags){\n  assert( pPg->pgno!=iNew );\n  pPg->flags = flags;\n  sqlite3PcacheMove(pPg, iNew);\n}\n\n/*\n** Return a pointer to the data for the specified page.\n*/\nSQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *pPg){\n  assert( pPg->nRef>0 || pPg->pPager->memDb );\n  return pPg->pData;\n}\n\n/*\n** Return a pointer to the Pager.nExtra bytes of \"extra\" space\n** allocated along with the specified page.\n*/\nSQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *pPg){\n  return pPg->pExtra;\n}\n\n/*\n** Get/set the locking-mode for this pager. Parameter eMode must be one\n** of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or\n** PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then\n** the locking-mode is set to the value specified.\n**\n** The returned value is either PAGER_LOCKINGMODE_NORMAL or\n** PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)\n** locking-mode.\n*/\nSQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *pPager, int eMode){\n  assert( eMode==PAGER_LOCKINGMODE_QUERY\n            || eMode==PAGER_LOCKINGMODE_NORMAL\n            || eMode==PAGER_LOCKINGMODE_EXCLUSIVE );\n  assert( PAGER_LOCKINGMODE_QUERY<0 );\n  assert( PAGER_LOCKINGMODE_NORMAL>=0 && PAGER_LOCKINGMODE_EXCLUSIVE>=0 );\n  assert( pPager->exclusiveMode || 0==sqlite3WalHeapMemory(pPager->pWal) );\n  if( eMode>=0 && !pPager->tempFile && !sqlite3WalHeapMemory(pPager->pWal) ){\n    pPager->exclusiveMode = (u8)eMode;\n  }\n  return (int)pPager->exclusiveMode;\n}\n\n/*\n** Set the journal-mode for this pager. Parameter eMode must be one of:\n**\n**    PAGER_JOURNALMODE_DELETE\n**    PAGER_JOURNALMODE_TRUNCATE\n**    PAGER_JOURNALMODE_PERSIST\n**    PAGER_JOURNALMODE_OFF\n**    PAGER_JOURNALMODE_MEMORY\n**    PAGER_JOURNALMODE_WAL\n**\n** The journalmode is set to the value specified if the change is allowed.\n** The change may be disallowed for the following reasons:\n**\n**   *  An in-memory database can only have its journal_mode set to _OFF\n**      or _MEMORY.\n**\n**   *  Temporary databases cannot have _WAL journalmode.\n**\n** The returned indicate the current (possibly updated) journal-mode.\n*/\nSQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){\n  u8 eOld = pPager->journalMode;    /* Prior journalmode */\n\n  /* The eMode parameter is always valid */\n  assert(      eMode==PAGER_JOURNALMODE_DELETE    /* 0 */\n            || eMode==PAGER_JOURNALMODE_PERSIST   /* 1 */\n            || eMode==PAGER_JOURNALMODE_OFF       /* 2 */\n            || eMode==PAGER_JOURNALMODE_TRUNCATE  /* 3 */\n            || eMode==PAGER_JOURNALMODE_MEMORY    /* 4 */\n            || eMode==PAGER_JOURNALMODE_WAL       /* 5 */ );\n\n  /* This routine is only called from the OP_JournalMode opcode, and\n  ** the logic there will never allow a temporary file to be changed\n  ** to WAL mode.\n  */\n  assert( pPager->tempFile==0 || eMode!=PAGER_JOURNALMODE_WAL );\n\n  /* Do allow the journalmode of an in-memory database to be set to\n  ** anything other than MEMORY or OFF\n  */\n  if( MEMDB ){\n    assert( eOld==PAGER_JOURNALMODE_MEMORY || eOld==PAGER_JOURNALMODE_OFF );\n    if( eMode!=PAGER_JOURNALMODE_MEMORY && eMode!=PAGER_JOURNALMODE_OFF ){\n      eMode = eOld;\n    }\n  }\n\n  if( eMode!=eOld ){\n\n    /* Change the journal mode. */\n    assert( pPager->eState!=PAGER_ERROR );\n    pPager->journalMode = (u8)eMode;\n\n    /* When transitioning from TRUNCATE or PERSIST to any other journal\n    ** mode except WAL, unless the pager is in locking_mode=exclusive mode,\n    ** delete the journal file.\n    */\n    assert( (PAGER_JOURNALMODE_TRUNCATE & 5)==1 );\n    assert( (PAGER_JOURNALMODE_PERSIST & 5)==1 );\n    assert( (PAGER_JOURNALMODE_DELETE & 5)==0 );\n    assert( (PAGER_JOURNALMODE_MEMORY & 5)==4 );\n    assert( (PAGER_JOURNALMODE_OFF & 5)==0 );\n    assert( (PAGER_JOURNALMODE_WAL & 5)==5 );\n\n    assert( isOpen(pPager->fd) || pPager->exclusiveMode );\n    if( !pPager->exclusiveMode && (eOld & 5)==1 && (eMode & 1)==0 ){\n      /* In this case we would like to delete the journal file. If it is\n      ** not possible, then that is not a problem. Deleting the journal file\n      ** here is an optimization only.\n      **\n      ** Before deleting the journal file, obtain a RESERVED lock on the\n      ** database file. This ensures that the journal file is not deleted\n      ** while it is in use by some other client.\n      */\n      sqlite3OsClose(pPager->jfd);\n      if( pPager->eLock>=RESERVED_LOCK ){\n        sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);\n      }else{\n        int rc = SQLITE_OK;\n        int state = pPager->eState;\n        assert( state==PAGER_OPEN || state==PAGER_READER );\n        if( state==PAGER_OPEN ){\n          rc = sqlite3PagerSharedLock(pPager);\n        }\n        if( pPager->eState==PAGER_READER ){\n          assert( rc==SQLITE_OK );\n          rc = pagerLockDb(pPager, RESERVED_LOCK);\n        }\n        if( rc==SQLITE_OK ){\n          sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);\n        }\n        if( rc==SQLITE_OK && state==PAGER_READER ){\n          pagerUnlockDb(pPager, SHARED_LOCK);\n        }else if( state==PAGER_OPEN ){\n          pager_unlock(pPager);\n        }\n        assert( state==pPager->eState );\n      }\n    }else if( eMode==PAGER_JOURNALMODE_OFF || eMode==PAGER_JOURNALMODE_MEMORY ){\n      sqlite3OsClose(pPager->jfd);\n    }\n  }\n\n  /* Return the new journal mode */\n  return (int)pPager->journalMode;\n}\n\n/*\n** Return the current journal mode.\n*/\nSQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager *pPager){\n  return (int)pPager->journalMode;\n}\n\n/*\n** Return TRUE if the pager is in a state where it is OK to change the\n** journalmode.  Journalmode changes can only happen when the database\n** is unmodified.\n*/\nSQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager *pPager){\n  assert( assert_pager_state(pPager) );\n  if( pPager->eState>=PAGER_WRITER_CACHEMOD ) return 0;\n  if( NEVER(isOpen(pPager->jfd) && pPager->journalOff>0) ) return 0;\n  return 1;\n}\n\n/*\n** Get/set the size-limit used for persistent journal files.\n**\n** Setting the size limit to -1 means no limit is enforced.\n** An attempt to set a limit smaller than -1 is a no-op.\n*/\nSQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){\n  if( iLimit>=-1 ){\n    pPager->journalSizeLimit = iLimit;\n    sqlite3WalLimit(pPager->pWal, iLimit);\n  }\n  return pPager->journalSizeLimit;\n}\n\n/*\n** Return a pointer to the pPager->pBackup variable. The backup module\n** in backup.c maintains the content of this variable. This module\n** uses it opaquely as an argument to sqlite3BackupRestart() and\n** sqlite3BackupUpdate() only.\n*/\nSQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){\n  return &pPager->pBackup;\n}\n\n#ifndef SQLITE_OMIT_VACUUM\n/*\n** Unless this is an in-memory or temporary database, clear the pager cache.\n*/\nSQLITE_PRIVATE void sqlite3PagerClearCache(Pager *pPager){\n  assert( MEMDB==0 || pPager->tempFile );\n  if( pPager->tempFile==0 ) pager_reset(pPager);\n}\n#endif\n\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** This function is called when the user invokes \"PRAGMA wal_checkpoint\",\n** \"PRAGMA wal_blocking_checkpoint\" or calls the sqlite3_wal_checkpoint()\n** or wal_blocking_checkpoint() API functions.\n**\n** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.\n*/\nSQLITE_PRIVATE int sqlite3PagerCheckpoint(\n  Pager *pPager,                  /* Checkpoint on this pager */\n  sqlite3 *db,                    /* Db handle used to check for interrupts */\n  int eMode,                      /* Type of checkpoint */\n  int *pnLog,                     /* OUT: Final number of frames in log */\n  int *pnCkpt                     /* OUT: Final number of checkpointed frames */\n){\n  int rc = SQLITE_OK;\n  if( pPager->pWal==0 && pPager->journalMode==PAGER_JOURNALMODE_WAL ){\n    /* This only happens when a database file is zero bytes in size opened and\n    ** then \"PRAGMA journal_mode=WAL\" is run and then sqlite3_wal_checkpoint()\n    ** is invoked without any intervening transactions.  We need to start\n    ** a transaction to initialize pWal.  The PRAGMA table_list statement is\n    ** used for this since it starts transactions on every database file,\n    ** including all ATTACHed databases.  This seems expensive for a single\n    ** sqlite3_wal_checkpoint() call, but it happens very rarely.\n    ** https://sqlite.org/forum/forumpost/fd0f19d229156939\n    */\n    sqlite3_exec(db, \"PRAGMA table_list\",0,0,0);\n  }\n  if( pPager->pWal ){\n    rc = sqlite3WalCheckpoint(pPager->pWal, db, eMode,\n        (eMode<=SQLITE_CHECKPOINT_PASSIVE ? 0 : pPager->xBusyHandler),\n        pPager->pBusyHandlerArg,\n        pPager->walSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,\n        pnLog, pnCkpt\n    );\n  }\n  return rc;\n}\n\nSQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager){\n  return sqlite3WalCallback(pPager->pWal);\n}\n\n/*\n** Return true if the underlying VFS for the given pager supports the\n** primitives necessary for write-ahead logging.\n*/\nSQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager){\n  const sqlite3_io_methods *pMethods = pPager->fd->pMethods;\n  if( pPager->noLock ) return 0;\n  return pPager->exclusiveMode || (pMethods->iVersion>=2 && pMethods->xShmMap);\n}\n\n/*\n** Attempt to take an exclusive lock on the database file. If a PENDING lock\n** is obtained instead, immediately release it.\n*/\nstatic int pagerExclusiveLock(Pager *pPager){\n  int rc;                         /* Return code */\n  u8 eOrigLock;                   /* Original lock */\n\n  assert( pPager->eLock>=SHARED_LOCK );\n  eOrigLock = pPager->eLock;\n  rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);\n  if( rc!=SQLITE_OK ){\n    /* If the attempt to grab the exclusive lock failed, release the\n    ** pending lock that may have been obtained instead.  */\n    pagerUnlockDb(pPager, eOrigLock);\n  }\n\n  return rc;\n}\n\n/*\n** Call sqlite3WalOpen() to open the WAL handle. If the pager is in\n** exclusive-locking mode when this function is called, take an EXCLUSIVE\n** lock on the database file and use heap-memory to store the wal-index\n** in. Otherwise, use the normal shared-memory.\n*/\nstatic int pagerOpenWal(Pager *pPager){\n  int rc = SQLITE_OK;\n\n  assert( pPager->pWal==0 && pPager->tempFile==0 );\n  assert( pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK );\n\n  /* If the pager is already in exclusive-mode, the WAL module will use\n  ** heap-memory for the wal-index instead of the VFS shared-memory\n  ** implementation. Take the exclusive lock now, before opening the WAL\n  ** file, to make sure this is safe.\n  */\n  if( pPager->exclusiveMode ){\n    rc = pagerExclusiveLock(pPager);\n  }\n\n  /* Open the connection to the log file. If this operation fails,\n  ** (e.g. due to malloc() failure), return an error code.\n  */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3WalOpen(pPager->pVfs,\n        pPager->fd, pPager->zWal, pPager->exclusiveMode,\n        pPager->journalSizeLimit, &pPager->pWal\n    );\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    if( rc==SQLITE_OK ){\n      sqlite3WalDb(pPager->pWal, pPager->dbWal);\n    }\n#endif\n  }\n  pagerFixMaplimit(pPager);\n\n  return rc;\n}\n\n\n/*\n** The caller must be holding a SHARED lock on the database file to call\n** this function.\n**\n** If the pager passed as the first argument is open on a real database\n** file (not a temp file or an in-memory database), and the WAL file\n** is not already open, make an attempt to open it now. If successful,\n** return SQLITE_OK. If an error occurs or the VFS used by the pager does\n** not support the xShmXXX() methods, return an error code. *pbOpen is\n** not modified in either case.\n**\n** If the pager is open on a temp-file (or in-memory database), or if\n** the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK\n** without doing anything.\n*/\nSQLITE_PRIVATE int sqlite3PagerOpenWal(\n  Pager *pPager,                  /* Pager object */\n  int *pbOpen                     /* OUT: Set to true if call is a no-op */\n){\n  int rc = SQLITE_OK;             /* Return code */\n\n  assert( assert_pager_state(pPager) );\n  assert( pPager->eState==PAGER_OPEN   || pbOpen );\n  assert( pPager->eState==PAGER_READER || !pbOpen );\n  assert( pbOpen==0 || *pbOpen==0 );\n  assert( pbOpen!=0 || (!pPager->tempFile && !pPager->pWal) );\n\n  if( !pPager->tempFile && !pPager->pWal ){\n    if( !sqlite3PagerWalSupported(pPager) ) return SQLITE_CANTOPEN;\n\n    /* Close any rollback journal previously open */\n    sqlite3OsClose(pPager->jfd);\n\n    rc = pagerOpenWal(pPager);\n    if( rc==SQLITE_OK ){\n      pPager->journalMode = PAGER_JOURNALMODE_WAL;\n      pPager->eState = PAGER_OPEN;\n    }\n  }else{\n    *pbOpen = 1;\n  }\n\n  return rc;\n}\n\n/*\n** This function is called to close the connection to the log file prior\n** to switching from WAL to rollback mode.\n**\n** Before closing the log file, this function attempts to take an\n** EXCLUSIVE lock on the database file. If this cannot be obtained, an\n** error (SQLITE_BUSY) is returned and the log connection is not closed.\n** If successful, the EXCLUSIVE lock is not released before returning.\n*/\nSQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3 *db){\n  int rc = SQLITE_OK;\n\n  assert( pPager->journalMode==PAGER_JOURNALMODE_WAL );\n\n  /* If the log file is not already open, but does exist in the file-system,\n  ** it may need to be checkpointed before the connection can switch to\n  ** rollback mode. Open it now so this can happen.\n  */\n  if( !pPager->pWal ){\n    int logexists = 0;\n    rc = pagerLockDb(pPager, SHARED_LOCK);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3OsAccess(\n          pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &logexists\n      );\n    }\n    if( rc==SQLITE_OK && logexists ){\n      rc = pagerOpenWal(pPager);\n    }\n  }\n\n  /* Checkpoint and close the log. Because an EXCLUSIVE lock is held on\n  ** the database file, the log and log-summary files will be deleted.\n  */\n  if( rc==SQLITE_OK && pPager->pWal ){\n    rc = pagerExclusiveLock(pPager);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3WalClose(pPager->pWal, db, pPager->walSyncFlags,\n                           pPager->pageSize, (u8*)pPager->pTmpSpace);\n      pPager->pWal = 0;\n      pagerFixMaplimit(pPager);\n      if( rc && !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);\n    }\n  }\n  return rc;\n}\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n/*\n** If pager pPager is a wal-mode database not in exclusive locking mode,\n** invoke the sqlite3WalWriteLock() function on the associated Wal object\n** with the same db and bLock parameters as were passed to this function.\n** Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.\n*/\nSQLITE_PRIVATE int sqlite3PagerWalWriteLock(Pager *pPager, int bLock){\n  int rc = SQLITE_OK;\n  if( pagerUseWal(pPager) && pPager->exclusiveMode==0 ){\n    rc = sqlite3WalWriteLock(pPager->pWal, bLock);\n  }\n  return rc;\n}\n\n/*\n** Set the database handle used by the wal layer to determine if\n** blocking locks are required.\n*/\nSQLITE_PRIVATE void sqlite3PagerWalDb(Pager *pPager, sqlite3 *db){\n  pPager->dbWal = db;\n  if( pagerUseWal(pPager) ){\n    sqlite3WalDb(pPager->pWal, db);\n  }\n}\n#endif\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n/*\n** If this is a WAL database, obtain a snapshot handle for the snapshot\n** currently open. Otherwise, return an error.\n*/\nSQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot){\n  int rc = SQLITE_ERROR;\n  if( pPager->pWal ){\n    rc = sqlite3WalSnapshotGet(pPager->pWal, ppSnapshot);\n  }\n  return rc;\n}\n\n/*\n** If this is a WAL database, store a pointer to pSnapshot. Next time a\n** read transaction is opened, attempt to read from the snapshot it\n** identifies. If this is not a WAL database, return an error.\n*/\nSQLITE_PRIVATE int sqlite3PagerSnapshotOpen(\n  Pager *pPager,\n  sqlite3_snapshot *pSnapshot\n){\n  int rc = SQLITE_OK;\n  if( pPager->pWal ){\n    sqlite3WalSnapshotOpen(pPager->pWal, pSnapshot);\n  }else{\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/*\n** If this is a WAL database, call sqlite3WalSnapshotRecover(). If this\n** is not a WAL database, return an error.\n*/\nSQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager){\n  int rc;\n  if( pPager->pWal ){\n    rc = sqlite3WalSnapshotRecover(pPager->pWal);\n  }else{\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/*\n** The caller currently has a read transaction open on the database.\n** If this is not a WAL database, SQLITE_ERROR is returned. Otherwise,\n** this function takes a SHARED lock on the CHECKPOINTER slot and then\n** checks if the snapshot passed as the second argument is still\n** available. If so, SQLITE_OK is returned.\n**\n** If the snapshot is not available, SQLITE_ERROR is returned. Or, if\n** the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error\n** occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER\n** lock is released before returning.\n*/\nSQLITE_PRIVATE int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot){\n  int rc;\n  if( pPager->pWal ){\n    rc = sqlite3WalSnapshotCheck(pPager->pWal, pSnapshot);\n  }else{\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/*\n** Release a lock obtained by an earlier successful call to\n** sqlite3PagerSnapshotCheck().\n*/\nSQLITE_PRIVATE void sqlite3PagerSnapshotUnlock(Pager *pPager){\n  assert( pPager->pWal );\n  sqlite3WalSnapshotUnlock(pPager->pWal);\n}\n\n#endif /* SQLITE_ENABLE_SNAPSHOT */\n#endif /* !SQLITE_OMIT_WAL */\n\n#ifdef SQLITE_ENABLE_ZIPVFS\n/*\n** A read-lock must be held on the pager when this function is called. If\n** the pager is in WAL mode and the WAL file currently contains one or more\n** frames, return the size in bytes of the page images stored within the\n** WAL frames. Otherwise, if this is not a WAL database or the WAL file\n** is empty, return 0.\n*/\nSQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){\n  assert( pPager->eState>=PAGER_READER );\n  return sqlite3WalFramesize(pPager->pWal);\n}\n#endif\n\n#if defined(SQLITE_USE_SEH) && !defined(SQLITE_OMIT_WAL)\nSQLITE_PRIVATE int sqlite3PagerWalSystemErrno(Pager *pPager){\n  return sqlite3WalSystemErrno(pPager->pWal);\n}\n#endif\n\n#endif /* SQLITE_OMIT_DISKIO */\n\n/************** End of pager.c ***********************************************/\n/************** Begin file wal.c *********************************************/\n/*\n** 2010 February 1\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains the implementation of a write-ahead log (WAL) used in\n** \"journal_mode=WAL\" mode.\n**\n** WRITE-AHEAD LOG (WAL) FILE FORMAT\n**\n** A WAL file consists of a header followed by zero or more \"frames\".\n** Each frame records the revised content of a single page from the\n** database file.  All changes to the database are recorded by writing\n** frames into the WAL.  Transactions commit when a frame is written that\n** contains a commit marker.  A single WAL can and usually does record\n** multiple transactions.  Periodically, the content of the WAL is\n** transferred back into the database file in an operation called a\n** \"checkpoint\".\n**\n** A single WAL file can be used multiple times.  In other words, the\n** WAL can fill up with frames and then be checkpointed and then new\n** frames can overwrite the old ones.  A WAL always grows from beginning\n** toward the end.  Checksums and counters attached to each frame are\n** used to determine which frames within the WAL are valid and which\n** are leftovers from prior checkpoints.\n**\n** The WAL header is 32 bytes in size and consists of the following eight\n** big-endian 32-bit unsigned integer values:\n**\n**     0: Magic number.  0x377f0682 or 0x377f0683\n**     4: File format version.  Currently 3007000\n**     8: Database page size.  Example: 1024\n**    12: Checkpoint sequence number\n**    16: Salt-1, random integer incremented with each checkpoint\n**    20: Salt-2, a different random integer changing with each ckpt\n**    24: Checksum-1 (first part of checksum for first 24 bytes of header).\n**    28: Checksum-2 (second part of checksum for first 24 bytes of header).\n**\n** Immediately following the wal-header are zero or more frames. Each\n** frame consists of a 24-byte frame-header followed by <page-size> bytes\n** of page data. The frame-header is six big-endian 32-bit unsigned\n** integer values, as follows:\n**\n**     0: Page number.\n**     4: For commit records, the size of the database image in pages\n**        after the commit. For all other records, zero.\n**     8: Salt-1 (copied from the header)\n**    12: Salt-2 (copied from the header)\n**    16: Checksum-1.\n**    20: Checksum-2.\n**\n** A frame is considered valid if and only if the following conditions are\n** true:\n**\n**    (1) The salt-1 and salt-2 values in the frame-header match\n**        salt values in the wal-header\n**\n**    (2) The checksum values in the final 8 bytes of the frame-header\n**        exactly match the checksum computed consecutively on the\n**        WAL header and the first 8 bytes and the content of all frames\n**        up to and including the current frame.\n**\n** The checksum is computed using 32-bit big-endian integers if the\n** magic number in the first 4 bytes of the WAL is 0x377f0683 and it\n** is computed using little-endian if the magic number is 0x377f0682.\n** The checksum values are always stored in the frame header in a\n** big-endian format regardless of which byte order is used to compute\n** the checksum.  The checksum is computed by interpreting the input as\n** an even number of unsigned 32-bit integers: x[0] through x[N].  The\n** algorithm used for the checksum is as follows:\n**\n**   for i from 0 to n-1 step 2:\n**     s0 += x[i] + s1;\n**     s1 += x[i+1] + s0;\n**   endfor\n**\n** Note that s0 and s1 are both weighted checksums using fibonacci weights\n** in reverse order (the largest fibonacci weight occurs on the first element\n** of the sequence being summed.)  The s1 value spans all 32-bit\n** terms of the sequence whereas s0 omits the final term.\n**\n** On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the\n** WAL is transferred into the database, then the database is VFS.xSync-ed.\n** The VFS.xSync operations serve as write barriers - all writes launched\n** before the xSync must complete before any write that launches after the\n** xSync begins.\n**\n** After each checkpoint, the salt-1 value is incremented and the salt-2\n** value is randomized.  This prevents old and new frames in the WAL from\n** being considered valid at the same time and being checkpointing together\n** following a crash.\n**\n** READER ALGORITHM\n**\n** To read a page from the database (call it page number P), a reader\n** first checks the WAL to see if it contains page P.  If so, then the\n** last valid instance of page P that is a followed by a commit frame\n** or is a commit frame itself becomes the value read.  If the WAL\n** contains no copies of page P that are valid and which are a commit\n** frame or are followed by a commit frame, then page P is read from\n** the database file.\n**\n** To start a read transaction, the reader records the index of the last\n** valid frame in the WAL.  The reader uses this recorded \"mxFrame\" value\n** for all subsequent read operations.  New transactions can be appended\n** to the WAL, but as long as the reader uses its original mxFrame value\n** and ignores the newly appended content, it will see a consistent snapshot\n** of the database from a single point in time.  This technique allows\n** multiple concurrent readers to view different versions of the database\n** content simultaneously.\n**\n** The reader algorithm in the previous paragraphs works correctly, but\n** because frames for page P can appear anywhere within the WAL, the\n** reader has to scan the entire WAL looking for page P frames.  If the\n** WAL is large (multiple megabytes is typical) that scan can be slow,\n** and read performance suffers.  To overcome this problem, a separate\n** data structure called the wal-index is maintained to expedite the\n** search for frames of a particular page.\n**\n** WAL-INDEX FORMAT\n**\n** Conceptually, the wal-index is shared memory, though VFS implementations\n** might choose to implement the wal-index using a mmapped file.  Because\n** the wal-index is shared memory, SQLite does not support journal_mode=WAL\n** on a network filesystem.  All users of the database must be able to\n** share memory.\n**\n** In the default unix and windows implementation, the wal-index is a mmapped\n** file whose name is the database name with a \"-shm\" suffix added.  For that\n** reason, the wal-index is sometimes called the \"shm\" file.\n**\n** The wal-index is transient.  After a crash, the wal-index can (and should\n** be) reconstructed from the original WAL file.  In fact, the VFS is required\n** to either truncate or zero the header of the wal-index when the last\n** connection to it closes.  Because the wal-index is transient, it can\n** use an architecture-specific format; it does not have to be cross-platform.\n** Hence, unlike the database and WAL file formats which store all values\n** as big endian, the wal-index can store multi-byte values in the native\n** byte order of the host computer.\n**\n** The purpose of the wal-index is to answer this question quickly:  Given\n** a page number P and a maximum frame index M, return the index of the\n** last frame in the wal before frame M for page P in the WAL, or return\n** NULL if there are no frames for page P in the WAL prior to M.\n**\n** The wal-index consists of a header region, followed by an one or\n** more index blocks.\n**\n** The wal-index header contains the total number of frames within the WAL\n** in the mxFrame field.\n**\n** Each index block except for the first contains information on\n** HASHTABLE_NPAGE frames. The first index block contains information on\n** HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and\n** HASHTABLE_NPAGE are selected so that together the wal-index header and\n** first index block are the same size as all other index blocks in the\n** wal-index.  The values are:\n**\n**   HASHTABLE_NPAGE      4096\n**   HASHTABLE_NPAGE_ONE  4062\n**\n** Each index block contains two sections, a page-mapping that contains the\n** database page number associated with each wal frame, and a hash-table\n** that allows readers to query an index block for a specific page number.\n** The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE\n** for the first index block) 32-bit page numbers. The first entry in the\n** first index-block contains the database page number corresponding to the\n** first frame in the WAL file. The first entry in the second index block\n** in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in\n** the log, and so on.\n**\n** The last index block in a wal-index usually contains less than the full\n** complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers,\n** depending on the contents of the WAL file. This does not change the\n** allocated size of the page-mapping array - the page-mapping array merely\n** contains unused entries.\n**\n** Even without using the hash table, the last frame for page P\n** can be found by scanning the page-mapping sections of each index block\n** starting with the last index block and moving toward the first, and\n** within each index block, starting at the end and moving toward the\n** beginning.  The first entry that equals P corresponds to the frame\n** holding the content for that page.\n**\n** The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers.\n** HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the\n** hash table for each page number in the mapping section, so the hash\n** table is never more than half full.  The expected number of collisions\n** prior to finding a match is 1.  Each entry of the hash table is an\n** 1-based index of an entry in the mapping section of the same\n** index block.   Let K be the 1-based index of the largest entry in\n** the mapping section.  (For index blocks other than the last, K will\n** always be exactly HASHTABLE_NPAGE (4096) and for the last index block\n** K will be (mxFrame%HASHTABLE_NPAGE).)  Unused slots of the hash table\n** contain a value of 0.\n**\n** To look for page P in the hash table, first compute a hash iKey on\n** P as follows:\n**\n**      iKey = (P * 383) % HASHTABLE_NSLOT\n**\n** Then start scanning entries of the hash table, starting with iKey\n** (wrapping around to the beginning when the end of the hash table is\n** reached) until an unused hash slot is found. Let the first unused slot\n** be at index iUnused.  (iUnused might be less than iKey if there was\n** wrap-around.) Because the hash table is never more than half full,\n** the search is guaranteed to eventually hit an unused entry.  Let\n** iMax be the value between iKey and iUnused, closest to iUnused,\n** where aHash[iMax]==P.  If there is no iMax entry (if there exists\n** no hash slot such that aHash[i]==p) then page P is not in the\n** current index block.  Otherwise the iMax-th mapping entry of the\n** current index block corresponds to the last entry that references\n** page P.\n**\n** A hash search begins with the last index block and moves toward the\n** first index block, looking for entries corresponding to page P.  On\n** average, only two or three slots in each index block need to be\n** examined in order to either find the last entry for page P, or to\n** establish that no such entry exists in the block.  Each index block\n** holds over 4000 entries.  So two or three index blocks are sufficient\n** to cover a typical 10 megabyte WAL file, assuming 1K pages.  8 or 10\n** comparisons (on average) suffice to either locate a frame in the\n** WAL or to establish that the frame does not exist in the WAL.  This\n** is much faster than scanning the entire 10MB WAL.\n**\n** Note that entries are added in order of increasing K.  Hence, one\n** reader might be using some value K0 and a second reader that started\n** at a later time (after additional transactions were added to the WAL\n** and to the wal-index) might be using a different value K1, where K1>K0.\n** Both readers can use the same hash table and mapping section to get\n** the correct result.  There may be entries in the hash table with\n** K>K0 but to the first reader, those entries will appear to be unused\n** slots in the hash table and so the first reader will get an answer as\n** if no values greater than K0 had ever been inserted into the hash table\n** in the first place - which is what reader one wants.  Meanwhile, the\n** second reader using K1 will see additional values that were inserted\n** later, which is exactly what reader two wants.\n**\n** When a rollback occurs, the value of K is decreased. Hash table entries\n** that correspond to frames greater than the new K value are removed\n** from the hash table at this point.\n*/\n#ifndef SQLITE_OMIT_WAL\n\n/* #include \"wal.h\" */\n\n/*\n** Trace output macros\n*/\n#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)\nSQLITE_PRIVATE int sqlite3WalTrace = 0;\n# define WALTRACE(X)  if(sqlite3WalTrace) sqlite3DebugPrintf X\n#else\n# define WALTRACE(X)\n#endif\n\n/*\n** The maximum (and only) versions of the wal and wal-index formats\n** that may be interpreted by this version of SQLite.\n**\n** If a client begins recovering a WAL file and finds that (a) the checksum\n** values in the wal-header are correct and (b) the version field is not\n** WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN.\n**\n** Similarly, if a client successfully reads a wal-index header (i.e. the\n** checksum test is successful) and finds that the version field is not\n** WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite\n** returns SQLITE_CANTOPEN.\n*/\n#define WAL_MAX_VERSION      3007000\n#define WALINDEX_MAX_VERSION 3007000\n\n/*\n** Index numbers for various locking bytes.   WAL_NREADER is the number\n** of available reader locks and should be at least 3.  The default\n** is SQLITE_SHM_NLOCK==8 and  WAL_NREADER==5.\n**\n** Technically, the various VFSes are free to implement these locks however\n** they see fit.  However, compatibility is encouraged so that VFSes can\n** interoperate.  The standard implementation used on both unix and windows\n** is for the index number to indicate a byte offset into the\n** WalCkptInfo.aLock[] array in the wal-index header.  In other words, all\n** locks are on the shm file.  The WALINDEX_LOCK_OFFSET constant (which\n** should be 120) is the location in the shm file for the first locking\n** byte.\n*/\n#define WAL_WRITE_LOCK         0\n#define WAL_ALL_BUT_WRITE      1\n#define WAL_CKPT_LOCK          1\n#define WAL_RECOVER_LOCK       2\n#define WAL_READ_LOCK(I)       (3+(I))\n#define WAL_NREADER            (SQLITE_SHM_NLOCK-3)\n\n\n/* Object declarations */\ntypedef struct WalIndexHdr WalIndexHdr;\ntypedef struct WalIterator WalIterator;\ntypedef struct WalCkptInfo WalCkptInfo;\n\n\n/*\n** The following object holds a copy of the wal-index header content.\n**\n** The actual header in the wal-index consists of two copies of this\n** object followed by one instance of the WalCkptInfo object.\n** For all versions of SQLite through 3.10.0 and probably beyond,\n** the locking bytes (WalCkptInfo.aLock) start at offset 120 and\n** the total header size is 136 bytes.\n**\n** The szPage value can be any power of 2 between 512 and 32768, inclusive.\n** Or it can be 1 to represent a 65536-byte page.  The latter case was\n** added in 3.7.1 when support for 64K pages was added.\n*/\nstruct WalIndexHdr {\n  u32 iVersion;                   /* Wal-index version */\n  u32 unused;                     /* Unused (padding) field */\n  u32 iChange;                    /* Counter incremented each transaction */\n  u8 isInit;                      /* 1 when initialized */\n  u8 bigEndCksum;                 /* True if checksums in WAL are big-endian */\n  u16 szPage;                     /* Database page size in bytes. 1==64K */\n  u32 mxFrame;                    /* Index of last valid frame in the WAL */\n  u32 nPage;                      /* Size of database in pages */\n  u32 aFrameCksum[2];             /* Checksum of last frame in log */\n  u32 aSalt[2];                   /* Two salt values copied from WAL header */\n  u32 aCksum[2];                  /* Checksum over all prior fields */\n};\n\n/*\n** A copy of the following object occurs in the wal-index immediately\n** following the second copy of the WalIndexHdr.  This object stores\n** information used by checkpoint.\n**\n** nBackfill is the number of frames in the WAL that have been written\n** back into the database. (We call the act of moving content from WAL to\n** database \"backfilling\".)  The nBackfill number is never greater than\n** WalIndexHdr.mxFrame.  nBackfill can only be increased by threads\n** holding the WAL_CKPT_LOCK lock (which includes a recovery thread).\n** However, a WAL_WRITE_LOCK thread can move the value of nBackfill from\n** mxFrame back to zero when the WAL is reset.\n**\n** nBackfillAttempted is the largest value of nBackfill that a checkpoint\n** has attempted to achieve.  Normally nBackfill==nBackfillAtempted, however\n** the nBackfillAttempted is set before any backfilling is done and the\n** nBackfill is only set after all backfilling completes.  So if a checkpoint\n** crashes, nBackfillAttempted might be larger than nBackfill.  The\n** WalIndexHdr.mxFrame must never be less than nBackfillAttempted.\n**\n** The aLock[] field is a set of bytes used for locking.  These bytes should\n** never be read or written.\n**\n** There is one entry in aReadMark[] for each reader lock.  If a reader\n** holds read-lock K, then the value in aReadMark[K] is no greater than\n** the mxFrame for that reader.  The value READMARK_NOT_USED (0xffffffff)\n** for any aReadMark[] means that entry is unused.  aReadMark[0] is\n** a special case; its value is never used and it exists as a place-holder\n** to avoid having to offset aReadMark[] indexes by one.  Readers holding\n** WAL_READ_LOCK(0) always ignore the entire WAL and read all content\n** directly from the database.\n**\n** The value of aReadMark[K] may only be changed by a thread that\n** is holding an exclusive lock on WAL_READ_LOCK(K).  Thus, the value of\n** aReadMark[K] cannot changed while there is a reader is using that mark\n** since the reader will be holding a shared lock on WAL_READ_LOCK(K).\n**\n** The checkpointer may only transfer frames from WAL to database where\n** the frame numbers are less than or equal to every aReadMark[] that is\n** in use (that is, every aReadMark[j] for which there is a corresponding\n** WAL_READ_LOCK(j)).  New readers (usually) pick the aReadMark[] with the\n** largest value and will increase an unused aReadMark[] to mxFrame if there\n** is not already an aReadMark[] equal to mxFrame.  The exception to the\n** previous sentence is when nBackfill equals mxFrame (meaning that everything\n** in the WAL has been backfilled into the database) then new readers\n** will choose aReadMark[0] which has value 0 and hence such reader will\n** get all their all content directly from the database file and ignore\n** the WAL.\n**\n** Writers normally append new frames to the end of the WAL.  However,\n** if nBackfill equals mxFrame (meaning that all WAL content has been\n** written back into the database) and if no readers are using the WAL\n** (in other words, if there are no WAL_READ_LOCK(i) where i>0) then\n** the writer will first \"reset\" the WAL back to the beginning and start\n** writing new content beginning at frame 1.\n**\n** We assume that 32-bit loads are atomic and so no locks are needed in\n** order to read from any aReadMark[] entries.\n*/\nstruct WalCkptInfo {\n  u32 nBackfill;                  /* Number of WAL frames backfilled into DB */\n  u32 aReadMark[WAL_NREADER];     /* Reader marks */\n  u8 aLock[SQLITE_SHM_NLOCK];     /* Reserved space for locks */\n  u32 nBackfillAttempted;         /* WAL frames perhaps written, or maybe not */\n  u32 notUsed0;                   /* Available for future enhancements */\n};\n#define READMARK_NOT_USED  0xffffffff\n\n/*\n** This is a schematic view of the complete 136-byte header of the\n** wal-index file (also known as the -shm file):\n**\n**      +-----------------------------+\n**   0: | iVersion                    | \\\n**      +-----------------------------+  |\n**   4: | (unused padding)            |  |\n**      +-----------------------------+  |\n**   8: | iChange                     |  |\n**      +-------+-------+-------------+  |\n**  12: | bInit |  bBig |   szPage    |  |\n**      +-------+-------+-------------+  |\n**  16: | mxFrame                     |  |  First copy of the\n**      +-----------------------------+  |  WalIndexHdr object\n**  20: | nPage                       |  |\n**      +-----------------------------+  |\n**  24: | aFrameCksum                 |  |\n**      |                             |  |\n**      +-----------------------------+  |\n**  32: | aSalt                       |  |\n**      |                             |  |\n**      +-----------------------------+  |\n**  40: | aCksum                      |  |\n**      |                             | /\n**      +-----------------------------+\n**  48: | iVersion                    | \\\n**      +-----------------------------+  |\n**  52: | (unused padding)            |  |\n**      +-----------------------------+  |\n**  56: | iChange                     |  |\n**      +-------+-------+-------------+  |\n**  60: | bInit |  bBig |   szPage    |  |\n**      +-------+-------+-------------+  |  Second copy of the\n**  64: | mxFrame                     |  |  WalIndexHdr\n**      +-----------------------------+  |\n**  68: | nPage                       |  |\n**      +-----------------------------+  |\n**  72: | aFrameCksum                 |  |\n**      |                             |  |\n**      +-----------------------------+  |\n**  80: | aSalt                       |  |\n**      |                             |  |\n**      +-----------------------------+  |\n**  88: | aCksum                      |  |\n**      |                             | /\n**      +-----------------------------+\n**  96: | nBackfill                   |\n**      +-----------------------------+\n** 100: | 5 read marks                |\n**      |                             |\n**      |                             |\n**      |                             |\n**      |                             |\n**      +-------+-------+------+------+\n** 120: | Write | Ckpt  | Rcvr | Rd0  | \\\n**      +-------+-------+------+------+  ) 8 lock bytes\n**      | Read1 | Read2 | Rd3  | Rd4  | /\n**      +-------+-------+------+------+\n** 128: | nBackfillAttempted          |\n**      +-----------------------------+\n** 132: | (unused padding)            |\n**      +-----------------------------+\n*/\n\n/* A block of WALINDEX_LOCK_RESERVED bytes beginning at\n** WALINDEX_LOCK_OFFSET is reserved for locks. Since some systems\n** only support mandatory file-locks, we do not read or write data\n** from the region of the file on which locks are applied.\n*/\n#define WALINDEX_LOCK_OFFSET (sizeof(WalIndexHdr)*2+offsetof(WalCkptInfo,aLock))\n#define WALINDEX_HDR_SIZE    (sizeof(WalIndexHdr)*2+sizeof(WalCkptInfo))\n\n/* Size of header before each frame in wal */\n#define WAL_FRAME_HDRSIZE 24\n\n/* Size of write ahead log header, including checksum. */\n#define WAL_HDRSIZE 32\n\n/* WAL magic value. Either this value, or the same value with the least\n** significant bit also set (WAL_MAGIC | 0x00000001) is stored in 32-bit\n** big-endian format in the first 4 bytes of a WAL file.\n**\n** If the LSB is set, then the checksums for each frame within the WAL\n** file are calculated by treating all data as an array of 32-bit\n** big-endian words. Otherwise, they are calculated by interpreting\n** all data as 32-bit little-endian words.\n*/\n#define WAL_MAGIC 0x377f0682\n\n/*\n** Return the offset of frame iFrame in the write-ahead log file,\n** assuming a database page size of szPage bytes. The offset returned\n** is to the start of the write-ahead log frame-header.\n*/\n#define walFrameOffset(iFrame, szPage) (                               \\\n  WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE)         \\\n)\n\n/*\n** An open write-ahead log file is represented by an instance of the\n** following object.\n**\n** writeLock:\n**   This is usually set to 1 whenever the WRITER lock is held. However,\n**   if it is set to 2, then the WRITER lock is held but must be released\n**   by walHandleException() if a SEH exception is thrown.\n*/\nstruct Wal {\n  sqlite3_vfs *pVfs;         /* The VFS used to create pDbFd */\n  sqlite3_file *pDbFd;       /* File handle for the database file */\n  sqlite3_file *pWalFd;      /* File handle for WAL file */\n  u32 iCallback;             /* Value to pass to log callback (or 0) */\n  i64 mxWalSize;             /* Truncate WAL to this size upon reset */\n  int nWiData;               /* Size of array apWiData */\n  int szFirstBlock;          /* Size of first block written to WAL file */\n  volatile u32 **apWiData;   /* Pointer to wal-index content in memory */\n  u32 szPage;                /* Database page size */\n  i16 readLock;              /* Which read lock is being held.  -1 for none */\n  u8 syncFlags;              /* Flags to use to sync header writes */\n  u8 exclusiveMode;          /* Non-zero if connection is in exclusive mode */\n  u8 writeLock;              /* True if in a write transaction */\n  u8 ckptLock;               /* True if holding a checkpoint lock */\n  u8 readOnly;               /* WAL_RDWR, WAL_RDONLY, or WAL_SHM_RDONLY */\n  u8 truncateOnCommit;       /* True to truncate WAL file on commit */\n  u8 syncHeader;             /* Fsync the WAL header if true */\n  u8 padToSectorBoundary;    /* Pad transactions out to the next sector */\n  u8 bShmUnreliable;         /* SHM content is read-only and unreliable */\n  WalIndexHdr hdr;           /* Wal-index header for current transaction */\n  u32 minFrame;              /* Ignore wal frames before this one */\n  u32 iReCksum;              /* On commit, recalculate checksums from here */\n  const char *zWalName;      /* Name of WAL file */\n  u32 nCkpt;                 /* Checkpoint sequence counter in the wal-header */\n#ifdef SQLITE_USE_SEH\n  u32 lockMask;              /* Mask of locks held */\n  void *pFree;               /* Pointer to sqlite3_free() if exception thrown */\n  u32 *pWiValue;             /* Value to write into apWiData[iWiPg] */\n  int iWiPg;                 /* Write pWiValue into apWiData[iWiPg] */\n  int iSysErrno;             /* System error code following exception */\n#endif\n#ifdef SQLITE_DEBUG\n  int nSehTry;               /* Number of nested SEH_TRY{} blocks */\n  u8 lockError;              /* True if a locking error has occurred */\n#endif\n#ifdef SQLITE_ENABLE_SNAPSHOT\n  WalIndexHdr *pSnapshot;    /* Start transaction here if not NULL */\n  int bGetSnapshot;          /* Transaction opened for sqlite3_get_snapshot() */\n#endif\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  sqlite3 *db;\n#endif\n};\n\n/*\n** Candidate values for Wal.exclusiveMode.\n*/\n#define WAL_NORMAL_MODE     0\n#define WAL_EXCLUSIVE_MODE  1\n#define WAL_HEAPMEMORY_MODE 2\n\n/*\n** Possible values for WAL.readOnly\n*/\n#define WAL_RDWR        0    /* Normal read/write connection */\n#define WAL_RDONLY      1    /* The WAL file is readonly */\n#define WAL_SHM_RDONLY  2    /* The SHM file is readonly */\n\n/*\n** Each page of the wal-index mapping contains a hash-table made up of\n** an array of HASHTABLE_NSLOT elements of the following type.\n*/\ntypedef u16 ht_slot;\n\n/*\n** This structure is used to implement an iterator that loops through\n** all frames in the WAL in database page order. Where two or more frames\n** correspond to the same database page, the iterator visits only the\n** frame most recently written to the WAL (in other words, the frame with\n** the largest index).\n**\n** The internals of this structure are only accessed by:\n**\n**   walIteratorInit() - Create a new iterator,\n**   walIteratorNext() - Step an iterator,\n**   walIteratorFree() - Free an iterator.\n**\n** This functionality is used by the checkpoint code (see walCheckpoint()).\n*/\nstruct WalIterator {\n  u32 iPrior;                     /* Last result returned from the iterator */\n  int nSegment;                   /* Number of entries in aSegment[] */\n  struct WalSegment {\n    int iNext;                    /* Next slot in aIndex[] not yet returned */\n    ht_slot *aIndex;              /* i0, i1, i2... such that aPgno[iN] ascend */\n    u32 *aPgno;                   /* Array of page numbers. */\n    int nEntry;                   /* Nr. of entries in aPgno[] and aIndex[] */\n    int iZero;                    /* Frame number associated with aPgno[0] */\n  } aSegment[FLEXARRAY];          /* One for every 32KB page in the wal-index */\n};\n\n/* Size (in bytes) of a WalIterator object suitable for N or fewer segments */\n#define SZ_WALITERATOR(N)  \\\n     (offsetof(WalIterator,aSegment)+(N)*sizeof(struct WalSegment))\n\n/*\n** Define the parameters of the hash tables in the wal-index file. There\n** is a hash-table following every HASHTABLE_NPAGE page numbers in the\n** wal-index.\n**\n** Changing any of these constants will alter the wal-index format and\n** create incompatibilities.\n*/\n#define HASHTABLE_NPAGE      4096                 /* Must be power of 2 */\n#define HASHTABLE_HASH_1     383                  /* Should be prime */\n#define HASHTABLE_NSLOT      (HASHTABLE_NPAGE*2)  /* Must be a power of 2 */\n\n/*\n** The block of page numbers associated with the first hash-table in a\n** wal-index is smaller than usual. This is so that there is a complete\n** hash-table on each aligned 32KB page of the wal-index.\n*/\n#define HASHTABLE_NPAGE_ONE  (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))\n\n/* The wal-index is divided into pages of WALINDEX_PGSZ bytes each. */\n#define WALINDEX_PGSZ   (                                         \\\n    sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \\\n)\n\n/*\n** Structured Exception Handling (SEH) is a Windows-specific technique\n** for catching exceptions raised while accessing memory-mapped files.\n**\n** The -DSQLITE_USE_SEH compile-time option means to use SEH to catch and\n** deal with system-level errors that arise during WAL -shm file processing.\n** Without this compile-time option, any system-level faults that appear\n** while accessing the memory-mapped -shm file will cause a process-wide\n** signal to be deliver, which will more than likely cause the entire\n** process to exit.\n*/\n#ifdef SQLITE_USE_SEH\n#include <Windows.h>\n\n/* Beginning of a block of code in which an exception might occur */\n# define SEH_TRY    __try { \\\n   assert( walAssertLockmask(pWal) && pWal->nSehTry==0 ); \\\n   VVA_ONLY(pWal->nSehTry++);\n\n/* The end of a block of code in which an exception might occur */\n# define SEH_EXCEPT(X) \\\n   VVA_ONLY(pWal->nSehTry--); \\\n   assert( pWal->nSehTry==0 ); \\\n   } __except( sehExceptionFilter(pWal, GetExceptionCode(), GetExceptionInformation() ) ){ X }\n\n/* Simulate a memory-mapping fault in the -shm file for testing purposes */\n# define SEH_INJECT_FAULT sehInjectFault(pWal)\n\n/*\n** The second argument is the return value of GetExceptionCode() for the\n** current exception. Return EXCEPTION_EXECUTE_HANDLER if the exception code\n** indicates that the exception may have been caused by accessing the *-shm\n** file mapping. Or EXCEPTION_CONTINUE_SEARCH otherwise.\n*/\nstatic int sehExceptionFilter(Wal *pWal, int eCode, EXCEPTION_POINTERS *p){\n  VVA_ONLY(pWal->nSehTry--);\n  if( eCode==EXCEPTION_IN_PAGE_ERROR ){\n    if( p && p->ExceptionRecord && p->ExceptionRecord->NumberParameters>=3 ){\n      /* From MSDN: For this type of exception, the first element of the\n      ** ExceptionInformation[] array is a read-write flag - 0 if the exception\n      ** was thrown while reading, 1 if while writing. The second element is\n      ** the virtual address being accessed. The \"third array element specifies\n      ** the underlying NTSTATUS code that resulted in the exception\". */\n      pWal->iSysErrno = (int)p->ExceptionRecord->ExceptionInformation[2];\n    }\n    return EXCEPTION_EXECUTE_HANDLER;\n  }\n  return EXCEPTION_CONTINUE_SEARCH;\n}\n\n/*\n** If one is configured, invoke the xTestCallback callback with 650 as\n** the argument. If it returns true, throw the same exception that is\n** thrown by the system if the *-shm file mapping is accessed after it\n** has been invalidated.\n*/\nstatic void sehInjectFault(Wal *pWal){\n  int res;\n  assert( pWal->nSehTry>0 );\n\n  res = sqlite3FaultSim(650);\n  if( res!=0 ){\n    ULONG_PTR aArg[3];\n    aArg[0] = 0;\n    aArg[1] = 0;\n    aArg[2] = (ULONG_PTR)res;\n    RaiseException(EXCEPTION_IN_PAGE_ERROR, 0, 3, (const ULONG_PTR*)aArg);\n  }\n}\n\n/*\n** There are two ways to use this macro. To set a pointer to be freed\n** if an exception is thrown:\n**\n**   SEH_FREE_ON_ERROR(0, pPtr);\n**\n** and to cancel the same:\n**\n**   SEH_FREE_ON_ERROR(pPtr, 0);\n**\n** In the first case, there must not already be a pointer registered to\n** be freed. In the second case, pPtr must be the registered pointer.\n*/\n#define SEH_FREE_ON_ERROR(X,Y) \\\n  assert( (X==0 || Y==0) && pWal->pFree==X ); pWal->pFree = Y\n\n/*\n** There are two ways to use this macro. To arrange for pWal->apWiData[iPg]\n** to be set to pValue if an exception is thrown:\n**\n**   SEH_SET_ON_ERROR(iPg, pValue);\n**\n** and to cancel the same:\n**\n**   SEH_SET_ON_ERROR(0, 0);\n*/\n#define SEH_SET_ON_ERROR(X,Y)  pWal->iWiPg = X; pWal->pWiValue = Y\n\n#else\n# define SEH_TRY          VVA_ONLY(pWal->nSehTry++);\n# define SEH_EXCEPT(X)    VVA_ONLY(pWal->nSehTry--); assert( pWal->nSehTry==0 );\n# define SEH_INJECT_FAULT assert( pWal->nSehTry>0 );\n# define SEH_FREE_ON_ERROR(X,Y)\n# define SEH_SET_ON_ERROR(X,Y)\n#endif /* ifdef SQLITE_USE_SEH */\n\n\n/*\n** Obtain a pointer to the iPage'th page of the wal-index. The wal-index\n** is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are\n** numbered from zero.\n**\n** If the wal-index is currently smaller the iPage pages then the size\n** of the wal-index might be increased, but only if it is safe to do\n** so.  It is safe to enlarge the wal-index if pWal->writeLock is true\n** or pWal->exclusiveMode==WAL_HEAPMEMORY_MODE.\n**\n** Three possible result scenarios:\n**\n**   (1)  rc==SQLITE_OK    and *ppPage==Requested-Wal-Index-Page\n**   (2)  rc>=SQLITE_ERROR and *ppPage==NULL\n**   (3)  rc==SQLITE_OK    and *ppPage==NULL  // only if iPage==0\n**\n** Scenario (3) can only occur when pWal->writeLock is false and iPage==0\n*/\nstatic SQLITE_NOINLINE int walIndexPageRealloc(\n  Wal *pWal,               /* The WAL context */\n  int iPage,               /* The page we seek */\n  volatile u32 **ppPage    /* Write the page pointer here */\n){\n  int rc = SQLITE_OK;\n\n  /* Enlarge the pWal->apWiData[] array if required */\n  if( pWal->nWiData<=iPage ){\n    sqlite3_int64 nByte = sizeof(u32*)*(1+(i64)iPage);\n    volatile u32 **apNew;\n    apNew = (volatile u32 **)sqlite3Realloc((void *)pWal->apWiData, nByte);\n    if( !apNew ){\n      *ppPage = 0;\n      return SQLITE_NOMEM_BKPT;\n    }\n    memset((void*)&apNew[pWal->nWiData], 0,\n           sizeof(u32*)*(iPage+1-pWal->nWiData));\n    pWal->apWiData = apNew;\n    pWal->nWiData = iPage+1;\n  }\n\n  /* Request a pointer to the required page from the VFS */\n  assert( pWal->apWiData[iPage]==0 );\n  if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE ){\n    pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);\n    if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM_BKPT;\n  }else{\n    rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ,\n        pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]\n    );\n    assert( pWal->apWiData[iPage]!=0\n         || rc!=SQLITE_OK\n         || (pWal->writeLock==0 && iPage==0) );\n    testcase( pWal->apWiData[iPage]==0 && rc==SQLITE_OK );\n    if( rc==SQLITE_OK ){\n      if( iPage>0 && sqlite3FaultSim(600) ) rc = SQLITE_NOMEM;\n    }else if( (rc&0xff)==SQLITE_READONLY ){\n      pWal->readOnly |= WAL_SHM_RDONLY;\n      if( rc==SQLITE_READONLY ){\n        rc = SQLITE_OK;\n      }\n    }\n  }\n\n  *ppPage = pWal->apWiData[iPage];\n  assert( iPage==0 || *ppPage || rc!=SQLITE_OK );\n  return rc;\n}\nstatic int walIndexPage(\n  Wal *pWal,               /* The WAL context */\n  int iPage,               /* The page we seek */\n  volatile u32 **ppPage    /* Write the page pointer here */\n){\n  SEH_INJECT_FAULT;\n  if( pWal->nWiData<=iPage || (*ppPage = pWal->apWiData[iPage])==0 ){\n    return walIndexPageRealloc(pWal, iPage, ppPage);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return a pointer to the WalCkptInfo structure in the wal-index.\n*/\nstatic volatile WalCkptInfo *walCkptInfo(Wal *pWal){\n  assert( pWal->nWiData>0 && pWal->apWiData[0] );\n  SEH_INJECT_FAULT;\n  return (volatile WalCkptInfo*)&(pWal->apWiData[0][sizeof(WalIndexHdr)/2]);\n}\n\n/*\n** Return a pointer to the WalIndexHdr structure in the wal-index.\n*/\nstatic volatile WalIndexHdr *walIndexHdr(Wal *pWal){\n  assert( pWal->nWiData>0 && pWal->apWiData[0] );\n  SEH_INJECT_FAULT;\n  return (volatile WalIndexHdr*)pWal->apWiData[0];\n}\n\n/*\n** The argument to this macro must be of type u32. On a little-endian\n** architecture, it returns the u32 value that results from interpreting\n** the 4 bytes as a big-endian value. On a big-endian architecture, it\n** returns the value that would be produced by interpreting the 4 bytes\n** of the input value as a little-endian integer.\n*/\n#define BYTESWAP32(x) ( \\\n    (((x)&0x000000FF)<<24) + (((x)&0x0000FF00)<<8)  \\\n  + (((x)&0x00FF0000)>>8)  + (((x)&0xFF000000)>>24) \\\n)\n\n/*\n** Generate or extend an 8 byte checksum based on the data in\n** array aByte[] and the initial values of aIn[0] and aIn[1] (or\n** initial values of 0 and 0 if aIn==NULL).\n**\n** The checksum is written back into aOut[] before returning.\n**\n** nByte must be a positive multiple of 8.\n*/\nstatic void walChecksumBytes(\n  int nativeCksum, /* True for native byte-order, false for non-native */\n  u8 *a,           /* Content to be checksummed */\n  int nByte,       /* Bytes of content in a[].  Must be a multiple of 8. */\n  const u32 *aIn,  /* Initial checksum value input */\n  u32 *aOut        /* OUT: Final checksum value output */\n){\n  u32 s1, s2;\n  u32 *aData = (u32 *)a;\n  u32 *aEnd = (u32 *)&a[nByte];\n\n  if( aIn ){\n    s1 = aIn[0];\n    s2 = aIn[1];\n  }else{\n    s1 = s2 = 0;\n  }\n\n  /* nByte is a multiple of 8 between 8 and 65536 */\n  assert( nByte>=8 && (nByte&7)==0 && nByte<=65536 );\n\n  if( !nativeCksum ){\n    do {\n      s1 += BYTESWAP32(aData[0]) + s2;\n      s2 += BYTESWAP32(aData[1]) + s1;\n      aData += 2;\n    }while( aData<aEnd );\n  }else if( nByte%64==0 ){\n    do {\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n    }while( aData<aEnd );\n  }else{\n    do {\n      s1 += *aData++ + s2;\n      s2 += *aData++ + s1;\n    }while( aData<aEnd );\n  }\n  assert( aData==aEnd );\n\n  aOut[0] = s1;\n  aOut[1] = s2;\n}\n\n/*\n** If there is the possibility of concurrent access to the SHM file\n** from multiple threads and/or processes, then do a memory barrier.\n*/\nstatic void walShmBarrier(Wal *pWal){\n  if( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE ){\n    sqlite3OsShmBarrier(pWal->pDbFd);\n  }\n}\n\n/*\n** Add the SQLITE_NO_TSAN as part of the return-type of a function\n** definition as a hint that the function contains constructs that\n** might give false-positive TSAN warnings.\n**\n** See tag-20200519-1.\n*/\n#if defined(__clang__) && !defined(SQLITE_NO_TSAN)\n# define SQLITE_NO_TSAN __attribute__((no_sanitize_thread))\n#else\n# define SQLITE_NO_TSAN\n#endif\n\n/*\n** Write the header information in pWal->hdr into the wal-index.\n**\n** The checksum on pWal->hdr is updated before it is written.\n*/\nstatic SQLITE_NO_TSAN void walIndexWriteHdr(Wal *pWal){\n  volatile WalIndexHdr *aHdr = walIndexHdr(pWal);\n  const int nCksum = offsetof(WalIndexHdr, aCksum);\n\n  assert( pWal->writeLock );\n  pWal->hdr.isInit = 1;\n  pWal->hdr.iVersion = WALINDEX_MAX_VERSION;\n  walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);\n  /* Possible TSAN false-positive.  See tag-20200519-1 */\n  memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));\n  walShmBarrier(pWal);\n  memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));\n}\n\n/*\n** This function encodes a single frame header and writes it to a buffer\n** supplied by the caller. A frame-header is made up of a series of\n** 4-byte big-endian integers, as follows:\n**\n**     0: Page number.\n**     4: For commit records, the size of the database image in pages\n**        after the commit. For all other records, zero.\n**     8: Salt-1 (copied from the wal-header)\n**    12: Salt-2 (copied from the wal-header)\n**    16: Checksum-1.\n**    20: Checksum-2.\n*/\nstatic void walEncodeFrame(\n  Wal *pWal,                      /* The write-ahead log */\n  u32 iPage,                      /* Database page number for frame */\n  u32 nTruncate,                  /* New db size (or 0 for non-commit frames) */\n  u8 *aData,                      /* Pointer to page data */\n  u8 *aFrame                      /* OUT: Write encoded frame here */\n){\n  int nativeCksum;                /* True for native byte-order checksums */\n  u32 *aCksum = pWal->hdr.aFrameCksum;\n  assert( WAL_FRAME_HDRSIZE==24 );\n  sqlite3Put4byte(&aFrame[0], iPage);\n  sqlite3Put4byte(&aFrame[4], nTruncate);\n  if( pWal->iReCksum==0 ){\n    memcpy(&aFrame[8], pWal->hdr.aSalt, 8);\n\n    nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);\n    walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);\n    walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);\n\n    sqlite3Put4byte(&aFrame[16], aCksum[0]);\n    sqlite3Put4byte(&aFrame[20], aCksum[1]);\n  }else{\n    memset(&aFrame[8], 0, 16);\n  }\n}\n\n/*\n** Check to see if the frame with header in aFrame[] and content\n** in aData[] is valid.  If it is a valid frame, fill *piPage and\n** *pnTruncate and return true.  Return if the frame is not valid.\n*/\nstatic int walDecodeFrame(\n  Wal *pWal,                      /* The write-ahead log */\n  u32 *piPage,                    /* OUT: Database page number for frame */\n  u32 *pnTruncate,                /* OUT: New db size (or 0 if not commit) */\n  u8 *aData,                      /* Pointer to page data (for checksum) */\n  u8 *aFrame                      /* Frame data */\n){\n  int nativeCksum;                /* True for native byte-order checksums */\n  u32 *aCksum = pWal->hdr.aFrameCksum;\n  u32 pgno;                       /* Page number of the frame */\n  assert( WAL_FRAME_HDRSIZE==24 );\n\n  /* A frame is only valid if the salt values in the frame-header\n  ** match the salt values in the wal-header.\n  */\n  if( memcmp(&pWal->hdr.aSalt, &aFrame[8], 8)!=0 ){\n    return 0;\n  }\n\n  /* A frame is only valid if the page number is greater than zero.\n  */\n  pgno = sqlite3Get4byte(&aFrame[0]);\n  if( pgno==0 ){\n    return 0;\n  }\n\n  /* A frame is only valid if a checksum of the WAL header,\n  ** all prior frames, the first 16 bytes of this frame-header,\n  ** and the frame-data matches the checksum in the last 8\n  ** bytes of this frame-header.\n  */\n  nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);\n  walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);\n  walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);\n  if( aCksum[0]!=sqlite3Get4byte(&aFrame[16])\n   || aCksum[1]!=sqlite3Get4byte(&aFrame[20])\n  ){\n    /* Checksum failed. */\n    return 0;\n  }\n\n  /* If we reach this point, the frame is valid.  Return the page number\n  ** and the new database size.\n  */\n  *piPage = pgno;\n  *pnTruncate = sqlite3Get4byte(&aFrame[4]);\n  return 1;\n}\n\n\n#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)\n/*\n** Names of locks.  This routine is used to provide debugging output and is not\n** a part of an ordinary build.\n*/\nstatic const char *walLockName(int lockIdx){\n  if( lockIdx==WAL_WRITE_LOCK ){\n    return \"WRITE-LOCK\";\n  }else if( lockIdx==WAL_CKPT_LOCK ){\n    return \"CKPT-LOCK\";\n  }else if( lockIdx==WAL_RECOVER_LOCK ){\n    return \"RECOVER-LOCK\";\n  }else{\n    static char zName[15];\n    sqlite3_snprintf(sizeof(zName), zName, \"READ-LOCK[%d]\",\n                     lockIdx-WAL_READ_LOCK(0));\n    return zName;\n  }\n}\n#endif /*defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */\n\n\n/*\n** Set or release locks on the WAL.  Locks are either shared or exclusive.\n** A lock cannot be moved directly between shared and exclusive - it must go\n** through the unlocked state first.\n**\n** In locking_mode=EXCLUSIVE, all of these routines become no-ops.\n*/\nstatic int walLockShared(Wal *pWal, int lockIdx){\n  int rc;\n  if( pWal->exclusiveMode ) return SQLITE_OK;\n  rc = sqlite3OsShmLock(pWal->pDbFd, lockIdx, 1,\n                        SQLITE_SHM_LOCK | SQLITE_SHM_SHARED);\n  WALTRACE((\"WAL%p: acquire SHARED-%s %s\\n\", pWal,\n            walLockName(lockIdx), rc ? \"failed\" : \"ok\"));\n  VVA_ONLY( pWal->lockError = (u8)(rc!=SQLITE_OK && (rc&0xFF)!=SQLITE_BUSY); )\n#ifdef SQLITE_USE_SEH\n  if( rc==SQLITE_OK ) pWal->lockMask |= (1 << lockIdx);\n#endif\n  return rc;\n}\nstatic void walUnlockShared(Wal *pWal, int lockIdx){\n  if( pWal->exclusiveMode ) return;\n  (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, 1,\n                         SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED);\n#ifdef SQLITE_USE_SEH\n  pWal->lockMask &= ~(1 << lockIdx);\n#endif\n  WALTRACE((\"WAL%p: release SHARED-%s\\n\", pWal, walLockName(lockIdx)));\n}\nstatic int walLockExclusive(Wal *pWal, int lockIdx, int n){\n  int rc;\n  if( pWal->exclusiveMode ) return SQLITE_OK;\n  rc = sqlite3OsShmLock(pWal->pDbFd, lockIdx, n,\n                        SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE);\n  WALTRACE((\"WAL%p: acquire EXCLUSIVE-%s cnt=%d %s\\n\", pWal,\n            walLockName(lockIdx), n, rc ? \"failed\" : \"ok\"));\n  VVA_ONLY( pWal->lockError = (u8)(rc!=SQLITE_OK && (rc&0xFF)!=SQLITE_BUSY); )\n#ifdef SQLITE_USE_SEH\n  if( rc==SQLITE_OK ){\n    pWal->lockMask |= (((1<<n)-1) << (SQLITE_SHM_NLOCK+lockIdx));\n  }\n#endif\n  return rc;\n}\nstatic void walUnlockExclusive(Wal *pWal, int lockIdx, int n){\n  if( pWal->exclusiveMode ) return;\n  (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, n,\n                         SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE);\n#ifdef SQLITE_USE_SEH\n  pWal->lockMask &= ~(((1<<n)-1) << (SQLITE_SHM_NLOCK+lockIdx));\n#endif\n  WALTRACE((\"WAL%p: release EXCLUSIVE-%s cnt=%d\\n\", pWal,\n             walLockName(lockIdx), n));\n}\n\n/*\n** Compute a hash on a page number.  The resulting hash value must land\n** between 0 and (HASHTABLE_NSLOT-1).  The walHashNext() function advances\n** the hash to the next value in the event of a collision.\n*/\nstatic int walHash(u32 iPage){\n  assert( iPage>0 );\n  assert( (HASHTABLE_NSLOT & (HASHTABLE_NSLOT-1))==0 );\n  return (iPage*HASHTABLE_HASH_1) & (HASHTABLE_NSLOT-1);\n}\nstatic int walNextHash(int iPriorHash){\n  return (iPriorHash+1)&(HASHTABLE_NSLOT-1);\n}\n\n/*\n** An instance of the WalHashLoc object is used to describe the location\n** of a page hash table in the wal-index.  This becomes the return value\n** from walHashGet().\n*/\ntypedef struct WalHashLoc WalHashLoc;\nstruct WalHashLoc {\n  volatile ht_slot *aHash;  /* Start of the wal-index hash table */\n  volatile u32 *aPgno;      /* aPgno[1] is the page of first frame indexed */\n  u32 iZero;                /* One less than the frame number of first indexed*/\n};\n\n/*\n** Return pointers to the hash table and page number array stored on\n** page iHash of the wal-index. The wal-index is broken into 32KB pages\n** numbered starting from 0.\n**\n** Set output variable pLoc->aHash to point to the start of the hash table\n** in the wal-index file. Set pLoc->iZero to one less than the frame\n** number of the first frame indexed by this hash table. If a\n** slot in the hash table is set to N, it refers to frame number\n** (pLoc->iZero+N) in the log.\n**\n** Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the\n** first frame indexed by the hash table, frame (pLoc->iZero).\n*/\nstatic int walHashGet(\n  Wal *pWal,                      /* WAL handle */\n  int iHash,                      /* Find the iHash'th table */\n  WalHashLoc *pLoc                /* OUT: Hash table location */\n){\n  int rc;                         /* Return code */\n\n  rc = walIndexPage(pWal, iHash, &pLoc->aPgno);\n  assert( rc==SQLITE_OK || iHash>0 );\n\n  if( pLoc->aPgno ){\n    pLoc->aHash = (volatile ht_slot *)&pLoc->aPgno[HASHTABLE_NPAGE];\n    if( iHash==0 ){\n      pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];\n      pLoc->iZero = 0;\n    }else{\n      pLoc->iZero = HASHTABLE_NPAGE_ONE + (iHash-1)*HASHTABLE_NPAGE;\n    }\n  }else if( NEVER(rc==SQLITE_OK) ){\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/*\n** Return the number of the wal-index page that contains the hash-table\n** and page-number array that contain entries corresponding to WAL frame\n** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages\n** are numbered starting from 0.\n*/\nstatic int walFramePage(u32 iFrame){\n  int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;\n  assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)\n       && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)\n       && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))\n       && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)\n       && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))\n  );\n  assert( iHash>=0 );\n  return iHash;\n}\n\n/*\n** Return the page number associated with frame iFrame in this WAL.\n*/\nstatic u32 walFramePgno(Wal *pWal, u32 iFrame){\n  int iHash = walFramePage(iFrame);\n  SEH_INJECT_FAULT;\n  if( iHash==0 ){\n    return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];\n  }\n  return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];\n}\n\n/*\n** Remove entries from the hash table that point to WAL slots greater\n** than pWal->hdr.mxFrame.\n**\n** This function is called whenever pWal->hdr.mxFrame is decreased due\n** to a rollback or savepoint.\n**\n** At most only the hash table containing pWal->hdr.mxFrame needs to be\n** updated.  Any later hash tables will be automatically cleared when\n** pWal->hdr.mxFrame advances to the point where those hash tables are\n** actually needed.\n*/\nstatic void walCleanupHash(Wal *pWal){\n  WalHashLoc sLoc;                /* Hash table location */\n  int iLimit = 0;                 /* Zero values greater than this */\n  int nByte;                      /* Number of bytes to zero in aPgno[] */\n  int i;                          /* Used to iterate through aHash[] */\n\n  assert( pWal->writeLock );\n  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE-1 );\n  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE );\n  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE+1 );\n\n  if( pWal->hdr.mxFrame==0 ) return;\n\n  /* Obtain pointers to the hash-table and page-number array containing\n  ** the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed\n  ** that the page said hash-table and array reside on is already mapped.(1)\n  */\n  assert( pWal->nWiData>walFramePage(pWal->hdr.mxFrame) );\n  assert( pWal->apWiData[walFramePage(pWal->hdr.mxFrame)] );\n  i = walHashGet(pWal, walFramePage(pWal->hdr.mxFrame), &sLoc);\n  if( NEVER(i) ) return; /* Defense-in-depth, in case (1) above is wrong */\n\n  /* Zero all hash-table entries that correspond to frame numbers greater\n  ** than pWal->hdr.mxFrame.\n  */\n  iLimit = pWal->hdr.mxFrame - sLoc.iZero;\n  assert( iLimit>0 );\n  for(i=0; i<HASHTABLE_NSLOT; i++){\n    if( sLoc.aHash[i]>iLimit ){\n      sLoc.aHash[i] = 0;\n    }\n  }\n\n  /* Zero the entries in the aPgno array that correspond to frames with\n  ** frame numbers greater than pWal->hdr.mxFrame.\n  */\n  nByte = (int)((char *)sLoc.aHash - (char *)&sLoc.aPgno[iLimit]);\n  assert( nByte>=0 );\n  memset((void *)&sLoc.aPgno[iLimit], 0, nByte);\n\n#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT\n  /* Verify that the every entry in the mapping region is still reachable\n  ** via the hash table even after the cleanup.\n  */\n  if( iLimit ){\n    int j;           /* Loop counter */\n    int iKey;        /* Hash key */\n    for(j=0; j<iLimit; j++){\n      for(iKey=walHash(sLoc.aPgno[j]);sLoc.aHash[iKey];iKey=walNextHash(iKey)){\n        if( sLoc.aHash[iKey]==j+1 ) break;\n      }\n      assert( sLoc.aHash[iKey]==j+1 );\n    }\n  }\n#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */\n}\n\n\n/*\n** Set an entry in the wal-index that will map database page number\n** pPage into WAL frame iFrame.\n*/\nstatic int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){\n  int rc;                         /* Return code */\n  WalHashLoc sLoc;                /* Wal-index hash table location */\n\n  rc = walHashGet(pWal, walFramePage(iFrame), &sLoc);\n\n  /* Assuming the wal-index file was successfully mapped, populate the\n  ** page number array and hash table entry.\n  */\n  if( rc==SQLITE_OK ){\n    int iKey;                     /* Hash table key */\n    int idx;                      /* Value to write to hash-table slot */\n    int nCollide;                 /* Number of hash collisions */\n\n    idx = iFrame - sLoc.iZero;\n    assert( idx <= HASHTABLE_NSLOT/2 + 1 );\n\n    /* If this is the first entry to be added to this hash-table, zero the\n    ** entire hash table and aPgno[] array before proceeding.\n    */\n    if( idx==1 ){\n      int nByte = (int)((u8*)&sLoc.aHash[HASHTABLE_NSLOT] - (u8*)sLoc.aPgno);\n      assert( nByte>=0 );\n      memset((void*)sLoc.aPgno, 0, nByte);\n    }\n\n    /* If the entry in aPgno[] is already set, then the previous writer\n    ** must have exited unexpectedly in the middle of a transaction (after\n    ** writing one or more dirty pages to the WAL to free up memory).\n    ** Remove the remnants of that writers uncommitted transaction from\n    ** the hash-table before writing any new entries.\n    */\n    if( sLoc.aPgno[idx-1] ){\n      walCleanupHash(pWal);\n      assert( !sLoc.aPgno[idx-1] );\n    }\n\n    /* Write the aPgno[] array entry and the hash-table slot. */\n    nCollide = idx;\n    for(iKey=walHash(iPage); sLoc.aHash[iKey]; iKey=walNextHash(iKey)){\n      if( (nCollide--)==0 ) return SQLITE_CORRUPT_BKPT;\n    }\n    sLoc.aPgno[idx-1] = iPage;\n    AtomicStore(&sLoc.aHash[iKey], (ht_slot)idx);\n\n#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT\n    /* Verify that the number of entries in the hash table exactly equals\n    ** the number of entries in the mapping region.\n    */\n    {\n      int i;           /* Loop counter */\n      int nEntry = 0;  /* Number of entries in the hash table */\n      for(i=0; i<HASHTABLE_NSLOT; i++){ if( sLoc.aHash[i] ) nEntry++; }\n      assert( nEntry==idx );\n    }\n\n    /* Verify that the every entry in the mapping region is reachable\n    ** via the hash table.  This turns out to be a really, really expensive\n    ** thing to check, so only do this occasionally - not on every\n    ** iteration.\n    */\n    if( (idx&0x3ff)==0 ){\n      int i;           /* Loop counter */\n      for(i=0; i<idx; i++){\n        for(iKey=walHash(sLoc.aPgno[i]);\n            sLoc.aHash[iKey];\n            iKey=walNextHash(iKey)){\n          if( sLoc.aHash[iKey]==i+1 ) break;\n        }\n        assert( sLoc.aHash[iKey]==i+1 );\n      }\n    }\n#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */\n  }\n\n  return rc;\n}\n\n\n/*\n** Recover the wal-index by reading the write-ahead log file.\n**\n** This routine first tries to establish an exclusive lock on the\n** wal-index to prevent other threads/processes from doing anything\n** with the WAL or wal-index while recovery is running.  The\n** WAL_RECOVER_LOCK is also held so that other threads will know\n** that this thread is running recovery.  If unable to establish\n** the necessary locks, this routine returns SQLITE_BUSY.\n*/\nstatic int walIndexRecover(Wal *pWal){\n  int rc;                         /* Return Code */\n  i64 nSize;                      /* Size of log file */\n  u32 aFrameCksum[2] = {0, 0};\n  int iLock;                      /* Lock offset to lock for checkpoint */\n\n  /* Obtain an exclusive lock on all byte in the locking range not already\n  ** locked by the caller. The caller is guaranteed to have locked the\n  ** WAL_WRITE_LOCK byte, and may have also locked the WAL_CKPT_LOCK byte.\n  ** If successful, the same bytes that are locked here are unlocked before\n  ** this function returns.\n  */\n  assert( pWal->ckptLock==1 || pWal->ckptLock==0 );\n  assert( WAL_ALL_BUT_WRITE==WAL_WRITE_LOCK+1 );\n  assert( WAL_CKPT_LOCK==WAL_ALL_BUT_WRITE );\n  assert( pWal->writeLock );\n  iLock = WAL_ALL_BUT_WRITE + pWal->ckptLock;\n  rc = walLockExclusive(pWal, iLock, WAL_READ_LOCK(0)-iLock);\n  if( rc ){\n    return rc;\n  }\n\n  WALTRACE((\"WAL%p: recovery begin...\\n\", pWal));\n\n  memset(&pWal->hdr, 0, sizeof(WalIndexHdr));\n\n  rc = sqlite3OsFileSize(pWal->pWalFd, &nSize);\n  if( rc!=SQLITE_OK ){\n    goto recovery_error;\n  }\n\n  if( nSize>WAL_HDRSIZE ){\n    u8 aBuf[WAL_HDRSIZE];         /* Buffer to load WAL header into */\n    u32 *aPrivate = 0;            /* Heap copy of *-shm hash being populated */\n    u8 *aFrame = 0;               /* Malloc'd buffer to load entire frame */\n    int szFrame;                  /* Number of bytes in buffer aFrame[] */\n    u8 *aData;                    /* Pointer to data part of aFrame buffer */\n    int szPage;                   /* Page size according to the log */\n    u32 magic;                    /* Magic value read from WAL header */\n    u32 version;                  /* Magic value read from WAL header */\n    int isValid;                  /* True if this frame is valid */\n    u32 iPg;                      /* Current 32KB wal-index page */\n    u32 iLastFrame;               /* Last frame in wal, based on nSize alone */\n\n    /* Read in the WAL header. */\n    rc = sqlite3OsRead(pWal->pWalFd, aBuf, WAL_HDRSIZE, 0);\n    if( rc!=SQLITE_OK ){\n      goto recovery_error;\n    }\n\n    /* If the database page size is not a power of two, or is greater than\n    ** SQLITE_MAX_PAGE_SIZE, conclude that the WAL file contains no valid\n    ** data. Similarly, if the 'magic' value is invalid, ignore the whole\n    ** WAL file.\n    */\n    magic = sqlite3Get4byte(&aBuf[0]);\n    szPage = sqlite3Get4byte(&aBuf[8]);\n    if( (magic&0xFFFFFFFE)!=WAL_MAGIC\n     || szPage&(szPage-1)\n     || szPage>SQLITE_MAX_PAGE_SIZE\n     || szPage<512\n    ){\n      goto finished;\n    }\n    pWal->hdr.bigEndCksum = (u8)(magic&0x00000001);\n    pWal->szPage = szPage;\n    pWal->nCkpt = sqlite3Get4byte(&aBuf[12]);\n    memcpy(&pWal->hdr.aSalt, &aBuf[16], 8);\n\n    /* Verify that the WAL header checksum is correct */\n    walChecksumBytes(pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN,\n        aBuf, WAL_HDRSIZE-2*4, 0, pWal->hdr.aFrameCksum\n    );\n    if( pWal->hdr.aFrameCksum[0]!=sqlite3Get4byte(&aBuf[24])\n     || pWal->hdr.aFrameCksum[1]!=sqlite3Get4byte(&aBuf[28])\n    ){\n      goto finished;\n    }\n\n    /* Verify that the version number on the WAL format is one that\n    ** are able to understand */\n    version = sqlite3Get4byte(&aBuf[4]);\n    if( version!=WAL_MAX_VERSION ){\n      rc = SQLITE_CANTOPEN_BKPT;\n      goto finished;\n    }\n\n    /* Malloc a buffer to read frames into. */\n    szFrame = szPage + WAL_FRAME_HDRSIZE;\n    aFrame = (u8 *)sqlite3_malloc64(szFrame + WALINDEX_PGSZ);\n    SEH_FREE_ON_ERROR(0, aFrame);\n    if( !aFrame ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto recovery_error;\n    }\n    aData = &aFrame[WAL_FRAME_HDRSIZE];\n    aPrivate = (u32*)&aData[szPage];\n\n    /* Read all frames from the log file. */\n    iLastFrame = (nSize - WAL_HDRSIZE) / szFrame;\n    for(iPg=0; iPg<=(u32)walFramePage(iLastFrame); iPg++){\n      u32 *aShare;\n      u32 iFrame;                 /* Index of last frame read */\n      u32 iLast = MIN(iLastFrame, HASHTABLE_NPAGE_ONE+iPg*HASHTABLE_NPAGE);\n      u32 iFirst = 1 + (iPg==0?0:HASHTABLE_NPAGE_ONE+(iPg-1)*HASHTABLE_NPAGE);\n      u32 nHdr, nHdr32;\n      rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare);\n      assert( aShare!=0 || rc!=SQLITE_OK );\n      if( aShare==0 ) break;\n      SEH_SET_ON_ERROR(iPg, aShare);\n      pWal->apWiData[iPg] = aPrivate;\n\n      for(iFrame=iFirst; iFrame<=iLast; iFrame++){\n        i64 iOffset = walFrameOffset(iFrame, szPage);\n        u32 pgno;                 /* Database page number for frame */\n        u32 nTruncate;            /* dbsize field from frame header */\n\n        /* Read and decode the next log frame. */\n        rc = sqlite3OsRead(pWal->pWalFd, aFrame, szFrame, iOffset);\n        if( rc!=SQLITE_OK ) break;\n        isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);\n        if( !isValid ) break;\n        rc = walIndexAppend(pWal, iFrame, pgno);\n        if( NEVER(rc!=SQLITE_OK) ) break;\n\n        /* If nTruncate is non-zero, this is a commit record. */\n        if( nTruncate ){\n          pWal->hdr.mxFrame = iFrame;\n          pWal->hdr.nPage = nTruncate;\n          pWal->hdr.szPage = (u16)((szPage&0xff00) | (szPage>>16));\n          testcase( szPage<=32768 );\n          testcase( szPage>=65536 );\n          aFrameCksum[0] = pWal->hdr.aFrameCksum[0];\n          aFrameCksum[1] = pWal->hdr.aFrameCksum[1];\n        }\n      }\n      pWal->apWiData[iPg] = aShare;\n      SEH_SET_ON_ERROR(0,0);\n      nHdr = (iPg==0 ? WALINDEX_HDR_SIZE : 0);\n      nHdr32 = nHdr / sizeof(u32);\n#ifndef SQLITE_SAFER_WALINDEX_RECOVERY\n      /* Memcpy() should work fine here, on all reasonable implementations.\n      ** Technically, memcpy() might change the destination to some\n      ** intermediate value before setting to the final value, and that might\n      ** cause a concurrent reader to malfunction.  Memcpy() is allowed to\n      ** do that, according to the spec, but no memcpy() implementation that\n      ** we know of actually does that, which is why we say that memcpy()\n      ** is safe for this.  Memcpy() is certainly a lot faster.\n      */\n      memcpy(&aShare[nHdr32], &aPrivate[nHdr32], WALINDEX_PGSZ-nHdr);\n#else\n      /* In the event that some platform is found for which memcpy()\n      ** changes the destination to some intermediate value before\n      ** setting the final value, this alternative copy routine is\n      ** provided.\n      */\n      {\n        int i;\n        for(i=nHdr32; i<WALINDEX_PGSZ/sizeof(u32); i++){\n          if( aShare[i]!=aPrivate[i] ){\n            /* Atomic memory operations are not required here because if\n            ** the value needs to be changed, that means it is not being\n            ** accessed concurrently. */\n            aShare[i] = aPrivate[i];\n          }\n        }\n      }\n#endif\n      SEH_INJECT_FAULT;\n      if( iFrame<=iLast ) break;\n    }\n\n    SEH_FREE_ON_ERROR(aFrame, 0);\n    sqlite3_free(aFrame);\n  }\n\nfinished:\n  if( rc==SQLITE_OK ){\n    volatile WalCkptInfo *pInfo;\n    int i;\n    pWal->hdr.aFrameCksum[0] = aFrameCksum[0];\n    pWal->hdr.aFrameCksum[1] = aFrameCksum[1];\n    walIndexWriteHdr(pWal);\n\n    /* Reset the checkpoint-header. This is safe because this thread is\n    ** currently holding locks that exclude all other writers and\n    ** checkpointers. Then set the values of read-mark slots 1 through N.\n    */\n    pInfo = walCkptInfo(pWal);\n    pInfo->nBackfill = 0;\n    pInfo->nBackfillAttempted = pWal->hdr.mxFrame;\n    pInfo->aReadMark[0] = 0;\n    for(i=1; i<WAL_NREADER; i++){\n      rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);\n      if( rc==SQLITE_OK ){\n        if( i==1 && pWal->hdr.mxFrame ){\n          pInfo->aReadMark[i] = pWal->hdr.mxFrame;\n        }else{\n          pInfo->aReadMark[i] = READMARK_NOT_USED;\n        }\n        SEH_INJECT_FAULT;\n        walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);\n      }else if( rc!=SQLITE_BUSY ){\n        goto recovery_error;\n      }\n    }\n\n    /* If more than one frame was recovered from the log file, report an\n    ** event via sqlite3_log(). This is to help with identifying performance\n    ** problems caused by applications routinely shutting down without\n    ** checkpointing the log file.\n    */\n    if( pWal->hdr.nPage ){\n      sqlite3_log(SQLITE_NOTICE_RECOVER_WAL,\n          \"recovered %d frames from WAL file %s\",\n          pWal->hdr.mxFrame, pWal->zWalName\n      );\n    }\n  }\n\nrecovery_error:\n  WALTRACE((\"WAL%p: recovery %s\\n\", pWal, rc ? \"failed\" : \"ok\"));\n  walUnlockExclusive(pWal, iLock, WAL_READ_LOCK(0)-iLock);\n  return rc;\n}\n\n/*\n** Close an open wal-index.\n*/\nstatic void walIndexClose(Wal *pWal, int isDelete){\n  if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE || pWal->bShmUnreliable ){\n    int i;\n    for(i=0; i<pWal->nWiData; i++){\n      sqlite3_free((void *)pWal->apWiData[i]);\n      pWal->apWiData[i] = 0;\n    }\n  }\n  if( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE ){\n    sqlite3OsShmUnmap(pWal->pDbFd, isDelete);\n  }\n}\n\n/*\n** Open a connection to the WAL file zWalName. The database file must\n** already be opened on connection pDbFd. The buffer that zWalName points\n** to must remain valid for the lifetime of the returned Wal* handle.\n**\n** A SHARED lock should be held on the database file when this function\n** is called. The purpose of this SHARED lock is to prevent any other\n** client from unlinking the WAL or wal-index file. If another process\n** were to do this just after this client opened one of these files, the\n** system would be badly broken.\n**\n** If the log file is successfully opened, SQLITE_OK is returned and\n** *ppWal is set to point to a new WAL handle. If an error occurs,\n** an SQLite error code is returned and *ppWal is left unmodified.\n*/\nSQLITE_PRIVATE int sqlite3WalOpen(\n  sqlite3_vfs *pVfs,              /* vfs module to open wal and wal-index */\n  sqlite3_file *pDbFd,            /* The open database file */\n  const char *zWalName,           /* Name of the WAL file */\n  int bNoShm,                     /* True to run in heap-memory mode */\n  i64 mxWalSize,                  /* Truncate WAL to this size on reset */\n  Wal **ppWal                     /* OUT: Allocated Wal handle */\n){\n  int rc;                         /* Return Code */\n  Wal *pRet;                      /* Object to allocate and return */\n  int flags;                      /* Flags passed to OsOpen() */\n\n  assert( zWalName && zWalName[0] );\n  assert( pDbFd );\n\n  /* Verify the values of various constants.  Any changes to the values\n  ** of these constants would result in an incompatible on-disk format\n  ** for the -shm file.  Any change that causes one of these asserts to\n  ** fail is a backward compatibility problem, even if the change otherwise\n  ** works.\n  **\n  ** This table also serves as a helpful cross-reference when trying to\n  ** interpret hex dumps of the -shm file.\n  */\n  assert(    48 ==  sizeof(WalIndexHdr)  );\n  assert(    40 ==  sizeof(WalCkptInfo)  );\n  assert(   120 ==  WALINDEX_LOCK_OFFSET );\n  assert(   136 ==  WALINDEX_HDR_SIZE    );\n  assert(  4096 ==  HASHTABLE_NPAGE      );\n  assert(  4062 ==  HASHTABLE_NPAGE_ONE  );\n  assert(  8192 ==  HASHTABLE_NSLOT      );\n  assert(   383 ==  HASHTABLE_HASH_1     );\n  assert( 32768 ==  WALINDEX_PGSZ        );\n  assert(     8 ==  SQLITE_SHM_NLOCK     );\n  assert(     5 ==  WAL_NREADER          );\n  assert(    24 ==  WAL_FRAME_HDRSIZE    );\n  assert(    32 ==  WAL_HDRSIZE          );\n  assert(   120 ==  WALINDEX_LOCK_OFFSET + WAL_WRITE_LOCK   );\n  assert(   121 ==  WALINDEX_LOCK_OFFSET + WAL_CKPT_LOCK    );\n  assert(   122 ==  WALINDEX_LOCK_OFFSET + WAL_RECOVER_LOCK );\n  assert(   123 ==  WALINDEX_LOCK_OFFSET + WAL_READ_LOCK(0) );\n  assert(   124 ==  WALINDEX_LOCK_OFFSET + WAL_READ_LOCK(1) );\n  assert(   125 ==  WALINDEX_LOCK_OFFSET + WAL_READ_LOCK(2) );\n  assert(   126 ==  WALINDEX_LOCK_OFFSET + WAL_READ_LOCK(3) );\n  assert(   127 ==  WALINDEX_LOCK_OFFSET + WAL_READ_LOCK(4) );\n\n  /* In the amalgamation, the os_unix.c and os_win.c source files come before\n  ** this source file.  Verify that the #defines of the locking byte offsets\n  ** in os_unix.c and os_win.c agree with the WALINDEX_LOCK_OFFSET value.\n  ** For that matter, if the lock offset ever changes from its initial design\n  ** value of 120, we need to know that so there is an assert() to check it.\n  */\n#ifdef WIN_SHM_BASE\n  assert( WIN_SHM_BASE==WALINDEX_LOCK_OFFSET );\n#endif\n#ifdef UNIX_SHM_BASE\n  assert( UNIX_SHM_BASE==WALINDEX_LOCK_OFFSET );\n#endif\n\n\n  /* Allocate an instance of struct Wal to return. */\n  *ppWal = 0;\n  pRet = (Wal*)sqlite3MallocZero(sizeof(Wal) + pVfs->szOsFile);\n  if( !pRet ){\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  pRet->pVfs = pVfs;\n  pRet->pWalFd = (sqlite3_file *)&pRet[1];\n  pRet->pDbFd = pDbFd;\n  pRet->readLock = -1;\n  pRet->mxWalSize = mxWalSize;\n  pRet->zWalName = zWalName;\n  pRet->syncHeader = 1;\n  pRet->padToSectorBoundary = 1;\n  pRet->exclusiveMode = (bNoShm ? WAL_HEAPMEMORY_MODE: WAL_NORMAL_MODE);\n\n  /* Open file handle on the write-ahead log file. */\n  flags = (SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_WAL);\n  rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, flags, &flags);\n  if( rc==SQLITE_OK && flags&SQLITE_OPEN_READONLY ){\n    pRet->readOnly = WAL_RDONLY;\n  }\n\n  if( rc!=SQLITE_OK ){\n    walIndexClose(pRet, 0);\n    sqlite3OsClose(pRet->pWalFd);\n    sqlite3_free(pRet);\n  }else{\n    int iDC = sqlite3OsDeviceCharacteristics(pDbFd);\n    if( iDC & SQLITE_IOCAP_SEQUENTIAL ){ pRet->syncHeader = 0; }\n    if( iDC & SQLITE_IOCAP_POWERSAFE_OVERWRITE ){\n      pRet->padToSectorBoundary = 0;\n    }\n    *ppWal = pRet;\n    WALTRACE((\"WAL%d: opened\\n\", pRet));\n  }\n  return rc;\n}\n\n/*\n** Change the size to which the WAL file is truncated on each reset.\n*/\nSQLITE_PRIVATE void sqlite3WalLimit(Wal *pWal, i64 iLimit){\n  if( pWal ) pWal->mxWalSize = iLimit;\n}\n\n/*\n** Find the smallest page number out of all pages held in the WAL that\n** has not been returned by any prior invocation of this method on the\n** same WalIterator object.   Write into *piFrame the frame index where\n** that page was last written into the WAL.  Write into *piPage the page\n** number.\n**\n** Return 0 on success.  If there are no pages in the WAL with a page\n** number larger than *piPage, then return 1.\n*/\nstatic int walIteratorNext(\n  WalIterator *p,               /* Iterator */\n  u32 *piPage,                  /* OUT: The page number of the next page */\n  u32 *piFrame                  /* OUT: Wal frame index of next page */\n){\n  u32 iMin;                     /* Result pgno must be greater than iMin */\n  u32 iRet = 0xFFFFFFFF;        /* 0xffffffff is never a valid page number */\n  int i;                        /* For looping through segments */\n\n  iMin = p->iPrior;\n  assert( iMin<0xffffffff );\n  for(i=p->nSegment-1; i>=0; i--){\n    struct WalSegment *pSegment = &p->aSegment[i];\n    while( pSegment->iNext<pSegment->nEntry ){\n      u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]];\n      if( iPg>iMin ){\n        if( iPg<iRet ){\n          iRet = iPg;\n          *piFrame = pSegment->iZero + pSegment->aIndex[pSegment->iNext];\n        }\n        break;\n      }\n      pSegment->iNext++;\n    }\n  }\n\n  *piPage = p->iPrior = iRet;\n  return (iRet==0xFFFFFFFF);\n}\n\n/*\n** This function merges two sorted lists into a single sorted list.\n**\n** aLeft[] and aRight[] are arrays of indices.  The sort key is\n** aContent[aLeft[]] and aContent[aRight[]].  Upon entry, the following\n** is guaranteed for all J<K:\n**\n**        aContent[aLeft[J]] < aContent[aLeft[K]]\n**        aContent[aRight[J]] < aContent[aRight[K]]\n**\n** This routine overwrites aRight[] with a new (probably longer) sequence\n** of indices such that the aRight[] contains every index that appears in\n** either aLeft[] or the old aRight[] and such that the second condition\n** above is still met.\n**\n** The aContent[aLeft[X]] values will be unique for all X.  And the\n** aContent[aRight[X]] values will be unique too.  But there might be\n** one or more combinations of X and Y such that\n**\n**      aLeft[X]!=aRight[Y]  &&  aContent[aLeft[X]] == aContent[aRight[Y]]\n**\n** When that happens, omit the aLeft[X] and use the aRight[Y] index.\n*/\nstatic void walMerge(\n  const u32 *aContent,            /* Pages in wal - keys for the sort */\n  ht_slot *aLeft,                 /* IN: Left hand input list */\n  int nLeft,                      /* IN: Elements in array *paLeft */\n  ht_slot **paRight,              /* IN/OUT: Right hand input list */\n  int *pnRight,                   /* IN/OUT: Elements in *paRight */\n  ht_slot *aTmp                   /* Temporary buffer */\n){\n  int iLeft = 0;                  /* Current index in aLeft */\n  int iRight = 0;                 /* Current index in aRight */\n  int iOut = 0;                   /* Current index in output buffer */\n  int nRight = *pnRight;\n  ht_slot *aRight = *paRight;\n\n  assert( nLeft>0 && nRight>0 );\n  while( iRight<nRight || iLeft<nLeft ){\n    ht_slot logpage;\n    Pgno dbpage;\n\n    if( (iLeft<nLeft)\n     && (iRight>=nRight || aContent[aLeft[iLeft]]<aContent[aRight[iRight]])\n    ){\n      logpage = aLeft[iLeft++];\n    }else{\n      logpage = aRight[iRight++];\n    }\n    dbpage = aContent[logpage];\n\n    aTmp[iOut++] = logpage;\n    if( iLeft<nLeft && aContent[aLeft[iLeft]]==dbpage ) iLeft++;\n\n    assert( iLeft>=nLeft || aContent[aLeft[iLeft]]>dbpage );\n    assert( iRight>=nRight || aContent[aRight[iRight]]>dbpage );\n  }\n\n  *paRight = aLeft;\n  *pnRight = iOut;\n  memcpy(aLeft, aTmp, sizeof(aTmp[0])*iOut);\n}\n\n/*\n** Sort the elements in list aList using aContent[] as the sort key.\n** Remove elements with duplicate keys, preferring to keep the\n** larger aList[] values.\n**\n** The aList[] entries are indices into aContent[].  The values in\n** aList[] are to be sorted so that for all J<K:\n**\n**      aContent[aList[J]] < aContent[aList[K]]\n**\n** For any X and Y such that\n**\n**      aContent[aList[X]] == aContent[aList[Y]]\n**\n** Keep the larger of the two values aList[X] and aList[Y] and discard\n** the smaller.\n*/\nstatic void walMergesort(\n  const u32 *aContent,            /* Pages in wal */\n  ht_slot *aBuffer,               /* Buffer of at least *pnList items to use */\n  ht_slot *aList,                 /* IN/OUT: List to sort */\n  int *pnList                     /* IN/OUT: Number of elements in aList[] */\n){\n  struct Sublist {\n    int nList;                    /* Number of elements in aList */\n    ht_slot *aList;               /* Pointer to sub-list content */\n  };\n\n  const int nList = *pnList;      /* Size of input list */\n  int nMerge = 0;                 /* Number of elements in list aMerge */\n  ht_slot *aMerge = 0;            /* List to be merged */\n  int iList;                      /* Index into input list */\n  u32 iSub = 0;                   /* Index into aSub array */\n  struct Sublist aSub[13];        /* Array of sub-lists */\n\n  memset(aSub, 0, sizeof(aSub));\n  assert( nList<=HASHTABLE_NPAGE && nList>0 );\n  assert( HASHTABLE_NPAGE==(1<<(ArraySize(aSub)-1)) );\n\n  for(iList=0; iList<nList; iList++){\n    nMerge = 1;\n    aMerge = &aList[iList];\n    for(iSub=0; iList & (1<<iSub); iSub++){\n      struct Sublist *p;\n      assert( iSub<ArraySize(aSub) );\n      p = &aSub[iSub];\n      assert( p->aList && p->nList<=(1<<iSub) );\n      assert( p->aList==&aList[iList&~((2<<iSub)-1)] );\n      walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);\n    }\n    aSub[iSub].aList = aMerge;\n    aSub[iSub].nList = nMerge;\n  }\n\n  for(iSub++; iSub<ArraySize(aSub); iSub++){\n    if( nList & (1<<iSub) ){\n      struct Sublist *p;\n      assert( iSub<ArraySize(aSub) );\n      p = &aSub[iSub];\n      assert( p->nList<=(1<<iSub) );\n      assert( p->aList==&aList[nList&~((2<<iSub)-1)] );\n      walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);\n    }\n  }\n  assert( aMerge==aList );\n  *pnList = nMerge;\n\n#ifdef SQLITE_DEBUG\n  {\n    int i;\n    for(i=1; i<*pnList; i++){\n      assert( aContent[aList[i]] > aContent[aList[i-1]] );\n    }\n  }\n#endif\n}\n\n/*\n** Free an iterator allocated by walIteratorInit().\n*/\nstatic void walIteratorFree(WalIterator *p){\n  sqlite3_free(p);\n}\n\n/*\n** Construct a WalInterator object that can be used to loop over all\n** pages in the WAL following frame nBackfill in ascending order. Frames\n** nBackfill or earlier may be included - excluding them is an optimization\n** only. The caller must hold the checkpoint lock.\n**\n** On success, make *pp point to the newly allocated WalInterator object\n** return SQLITE_OK. Otherwise, return an error code. If this routine\n** returns an error, the value of *pp is undefined.\n**\n** The calling routine should invoke walIteratorFree() to destroy the\n** WalIterator object when it has finished with it.\n*/\nstatic int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){\n  WalIterator *p;                 /* Return value */\n  int nSegment;                   /* Number of segments to merge */\n  u32 iLast;                      /* Last frame in log */\n  sqlite3_int64 nByte;            /* Number of bytes to allocate */\n  int i;                          /* Iterator variable */\n  ht_slot *aTmp;                  /* Temp space used by merge-sort */\n  int rc = SQLITE_OK;             /* Return Code */\n\n  /* This routine only runs while holding the checkpoint lock. And\n  ** it only runs if there is actually content in the log (mxFrame>0).\n  */\n  assert( pWal->ckptLock && pWal->hdr.mxFrame>0 );\n  iLast = pWal->hdr.mxFrame;\n\n  /* Allocate space for the WalIterator object. */\n  nSegment = walFramePage(iLast) + 1;\n  nByte = SZ_WALITERATOR(nSegment)\n        + iLast*sizeof(ht_slot);\n  p = (WalIterator *)sqlite3_malloc64(nByte\n      + sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast)\n  );\n  if( !p ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  memset(p, 0, nByte);\n  p->nSegment = nSegment;\n  aTmp = (ht_slot*)&(((u8*)p)[nByte]);\n  SEH_FREE_ON_ERROR(0, p);\n  for(i=walFramePage(nBackfill+1); rc==SQLITE_OK && i<nSegment; i++){\n    WalHashLoc sLoc;\n\n    rc = walHashGet(pWal, i, &sLoc);\n    if( rc==SQLITE_OK ){\n      int j;                      /* Counter variable */\n      int nEntry;                 /* Number of entries in this segment */\n      ht_slot *aIndex;            /* Sorted index for this segment */\n\n      if( (i+1)==nSegment ){\n        nEntry = (int)(iLast - sLoc.iZero);\n      }else{\n        nEntry = (int)((u32*)sLoc.aHash - (u32*)sLoc.aPgno);\n      }\n      aIndex = &((ht_slot *)&p->aSegment[p->nSegment])[sLoc.iZero];\n      sLoc.iZero++;\n\n      for(j=0; j<nEntry; j++){\n        aIndex[j] = (ht_slot)j;\n      }\n      walMergesort((u32 *)sLoc.aPgno, aTmp, aIndex, &nEntry);\n      p->aSegment[i].iZero = sLoc.iZero;\n      p->aSegment[i].nEntry = nEntry;\n      p->aSegment[i].aIndex = aIndex;\n      p->aSegment[i].aPgno = (u32 *)sLoc.aPgno;\n    }\n  }\n  if( rc!=SQLITE_OK ){\n    SEH_FREE_ON_ERROR(p, 0);\n    walIteratorFree(p);\n    p = 0;\n  }\n  *pp = p;\n  return rc;\n}\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n\n\n/*\n** Attempt to enable blocking locks that block for nMs ms. Return 1 if\n** blocking locks are successfully enabled, or 0 otherwise.\n*/\nstatic int walEnableBlockingMs(Wal *pWal, int nMs){\n  int rc = sqlite3OsFileControl(\n      pWal->pDbFd, SQLITE_FCNTL_LOCK_TIMEOUT, (void*)&nMs\n  );\n  return (rc==SQLITE_OK);\n}\n\n/*\n** Attempt to enable blocking locks. Blocking locks are enabled only if (a)\n** they are supported by the VFS, and (b) the database handle is configured\n** with a busy-timeout. Return 1 if blocking locks are successfully enabled,\n** or 0 otherwise.\n*/\nstatic int walEnableBlocking(Wal *pWal){\n  int res = 0;\n  if( pWal->db ){\n    int tmout = pWal->db->setlkTimeout;\n    if( tmout ){\n      res = walEnableBlockingMs(pWal, tmout);\n    }\n  }\n  return res;\n}\n\n/*\n** Disable blocking locks.\n*/\nstatic void walDisableBlocking(Wal *pWal){\n  int tmout = 0;\n  sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_LOCK_TIMEOUT, (void*)&tmout);\n}\n\n/*\n** If parameter bLock is true, attempt to enable blocking locks, take\n** the WRITER lock, and then disable blocking locks. If blocking locks\n** cannot be enabled, no attempt to obtain the WRITER lock is made. Return\n** an SQLite error code if an error occurs, or SQLITE_OK otherwise. It is not\n** an error if blocking locks can not be enabled.\n**\n** If the bLock parameter is false and the WRITER lock is held, release it.\n*/\nSQLITE_PRIVATE int sqlite3WalWriteLock(Wal *pWal, int bLock){\n  int rc = SQLITE_OK;\n  assert( pWal->readLock<0 || bLock==0 );\n  if( bLock ){\n    assert( pWal->db );\n    if( walEnableBlocking(pWal) ){\n      rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);\n      if( rc==SQLITE_OK ){\n        pWal->writeLock = 1;\n      }\n      walDisableBlocking(pWal);\n    }\n  }else if( pWal->writeLock ){\n    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);\n    pWal->writeLock = 0;\n  }\n  return rc;\n}\n\n/*\n** Set the database handle used to determine if blocking locks are required.\n*/\nSQLITE_PRIVATE void sqlite3WalDb(Wal *pWal, sqlite3 *db){\n  pWal->db = db;\n}\n\n#else\n# define walEnableBlocking(x) 0\n# define walDisableBlocking(x)\n# define walEnableBlockingMs(pWal, ms) 0\n# define sqlite3WalDb(pWal, db)\n#endif   /* ifdef SQLITE_ENABLE_SETLK_TIMEOUT */\n\n\n/*\n** Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and\n** n. If the attempt fails and parameter xBusy is not NULL, then it is a\n** busy-handler function. Invoke it and retry the lock until either the\n** lock is successfully obtained or the busy-handler returns 0.\n*/\nstatic int walBusyLock(\n  Wal *pWal,                      /* WAL connection */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int lockIdx,                    /* Offset of first byte to lock */\n  int n                           /* Number of bytes to lock */\n){\n  int rc;\n  do {\n    rc = walLockExclusive(pWal, lockIdx, n);\n  }while( xBusy && rc==SQLITE_BUSY && xBusy(pBusyArg) );\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  if( rc==SQLITE_BUSY_TIMEOUT ){\n    walDisableBlocking(pWal);\n    rc = SQLITE_BUSY;\n  }\n#endif\n  return rc;\n}\n\n/*\n** The cache of the wal-index header must be valid to call this function.\n** Return the page-size in bytes used by the database.\n*/\nstatic int walPagesize(Wal *pWal){\n  return (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);\n}\n\n/*\n** The following is guaranteed when this function is called:\n**\n**   a) the WRITER lock is held,\n**   b) the entire log file has been checkpointed, and\n**   c) any existing readers are reading exclusively from the database\n**      file - there are no readers that may attempt to read a frame from\n**      the log file.\n**\n** This function updates the shared-memory structures so that the next\n** client to write to the database (which may be this one) does so by\n** writing frames into the start of the log file.\n**\n** The value of parameter salt1 is used as the aSalt[1] value in the\n** new wal-index header. It should be passed a pseudo-random value (i.e.\n** one obtained from sqlite3_randomness()).\n*/\nstatic void walRestartHdr(Wal *pWal, u32 salt1){\n  volatile WalCkptInfo *pInfo = walCkptInfo(pWal);\n  int i;                          /* Loop counter */\n  u32 *aSalt = pWal->hdr.aSalt;   /* Big-endian salt values */\n  pWal->nCkpt++;\n  pWal->hdr.mxFrame = 0;\n  sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));\n  memcpy(&pWal->hdr.aSalt[1], &salt1, 4);\n  walIndexWriteHdr(pWal);\n  AtomicStore(&pInfo->nBackfill, 0);\n  pInfo->nBackfillAttempted = 0;\n  pInfo->aReadMark[1] = 0;\n  for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;\n  assert( pInfo->aReadMark[0]==0 );\n}\n\n/*\n** Copy as much content as we can from the WAL back into the database file\n** in response to an sqlite3_wal_checkpoint() request or the equivalent.\n**\n** The amount of information copies from WAL to database might be limited\n** by active readers.  This routine will never overwrite a database page\n** that a concurrent reader might be using.\n**\n** All I/O barrier operations (a.k.a fsyncs) occur in this routine when\n** SQLite is in WAL-mode in synchronous=NORMAL.  That means that if\n** checkpoints are always run by a background thread or background\n** process, foreground threads will never block on a lengthy fsync call.\n**\n** Fsync is called on the WAL before writing content out of the WAL and\n** into the database.  This ensures that if the new content is persistent\n** in the WAL and can be recovered following a power-loss or hard reset.\n**\n** Fsync is also called on the database file if (and only if) the entire\n** WAL content is copied into the database file.  This second fsync makes\n** it safe to delete the WAL since the new content will persist in the\n** database file.\n**\n** This routine uses and updates the nBackfill field of the wal-index header.\n** This is the only routine that will increase the value of nBackfill.\n** (A WAL reset or recovery will revert nBackfill to zero, but not increase\n** its value.)\n**\n** The caller must be holding sufficient locks to ensure that no other\n** checkpoint is running (in any other thread or process) at the same\n** time.\n*/\nstatic int walCheckpoint(\n  Wal *pWal,                      /* Wal connection */\n  sqlite3 *db,                    /* Check for interrupts on this handle */\n  int eMode,                      /* One of PASSIVE, FULL or RESTART */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int sync_flags,                 /* Flags for OsSync() (or 0) */\n  u8 *zBuf                        /* Temporary buffer to use */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  int szPage;                     /* Database page-size */\n  WalIterator *pIter = 0;         /* Wal iterator context */\n  u32 iDbpage = 0;                /* Next database page to write */\n  u32 iFrame = 0;                 /* Wal frame containing data for iDbpage */\n  u32 mxSafeFrame;                /* Max frame that can be backfilled */\n  u32 mxPage;                     /* Max database page to write */\n  int i;                          /* Loop counter */\n  volatile WalCkptInfo *pInfo;    /* The checkpoint status information */\n\n  szPage = walPagesize(pWal);\n  testcase( szPage<=32768 );\n  testcase( szPage>=65536 );\n  pInfo = walCkptInfo(pWal);\n  if( pInfo->nBackfill<pWal->hdr.mxFrame ){\n\n    /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked\n    ** in the SQLITE_CHECKPOINT_PASSIVE mode. */\n    assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );\n\n    /* Compute in mxSafeFrame the index of the last frame of the WAL that is\n    ** safe to write into the database.  Frames beyond mxSafeFrame might\n    ** overwrite database pages that are in use by active readers and thus\n    ** cannot be backfilled from the WAL.\n    */\n    mxSafeFrame = pWal->hdr.mxFrame;\n    mxPage = pWal->hdr.nPage;\n    for(i=1; i<WAL_NREADER; i++){\n      u32 y = AtomicLoad(pInfo->aReadMark+i); SEH_INJECT_FAULT;\n      if( mxSafeFrame>y ){\n        assert( y<=pWal->hdr.mxFrame );\n        rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(i), 1);\n        if( rc==SQLITE_OK ){\n          u32 iMark = (i==1 ? mxSafeFrame : READMARK_NOT_USED);\n          AtomicStore(pInfo->aReadMark+i, iMark); SEH_INJECT_FAULT;\n          walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);\n        }else if( rc==SQLITE_BUSY ){\n          mxSafeFrame = y;\n          xBusy = 0;\n        }else{\n          goto walcheckpoint_out;\n        }\n      }\n    }\n\n    /* Allocate the iterator */\n    if( pInfo->nBackfill<mxSafeFrame ){\n      rc = walIteratorInit(pWal, pInfo->nBackfill, &pIter);\n      assert( rc==SQLITE_OK || pIter==0 );\n    }\n\n    if( pIter\n     && (rc = walBusyLock(pWal,xBusy,pBusyArg,WAL_READ_LOCK(0),1))==SQLITE_OK\n    ){\n      u32 nBackfill = pInfo->nBackfill;\n      pInfo->nBackfillAttempted = mxSafeFrame; SEH_INJECT_FAULT;\n\n      /* Sync the WAL to disk */\n      rc = sqlite3OsSync(pWal->pWalFd, CKPT_SYNC_FLAGS(sync_flags));\n\n      /* If the database may grow as a result of this checkpoint, hint\n      ** about the eventual size of the db file to the VFS layer.\n      */\n      if( rc==SQLITE_OK ){\n        i64 nReq = ((i64)mxPage * szPage);\n        i64 nSize;                    /* Current size of database file */\n        sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_START, 0);\n        rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);\n        if( rc==SQLITE_OK && nSize<nReq ){\n          if( (nSize+65536+(i64)pWal->hdr.mxFrame*szPage)<nReq ){\n            /* If the size of the final database is larger than the current\n            ** database plus the amount of data in the wal file, plus the\n            ** maximum size of the pending-byte page (65536 bytes), then\n            ** must be corruption somewhere.  */\n            rc = SQLITE_CORRUPT_BKPT;\n          }else{\n            sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT,&nReq);\n          }\n        }\n\n      }\n\n      /* Iterate through the contents of the WAL, copying data to the db file */\n      while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){\n        i64 iOffset;\n        assert( walFramePgno(pWal, iFrame)==iDbpage );\n        SEH_INJECT_FAULT;\n        if( AtomicLoad(&db->u1.isInterrupted) ){\n          rc = db->mallocFailed ? SQLITE_NOMEM_BKPT : SQLITE_INTERRUPT;\n          break;\n        }\n        if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){\n          continue;\n        }\n        iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;\n        /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file */\n        rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);\n        if( rc!=SQLITE_OK ) break;\n        iOffset = (iDbpage-1)*(i64)szPage;\n        testcase( IS_BIG_INT(iOffset) );\n        rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);\n        if( rc!=SQLITE_OK ) break;\n      }\n      sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_DONE, 0);\n\n      /* If work was actually accomplished... */\n      if( rc==SQLITE_OK ){\n        if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){\n          i64 szDb = pWal->hdr.nPage*(i64)szPage;\n          testcase( IS_BIG_INT(szDb) );\n          rc = sqlite3OsTruncate(pWal->pDbFd, szDb);\n          if( rc==SQLITE_OK ){\n            rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));\n          }\n        }\n        if( rc==SQLITE_OK ){\n          AtomicStore(&pInfo->nBackfill, mxSafeFrame); SEH_INJECT_FAULT;\n        }\n      }\n\n      /* Release the reader lock held while backfilling */\n      walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);\n    }\n\n    if( rc==SQLITE_BUSY ){\n      /* Reset the return code so as not to report a checkpoint failure\n      ** just because there are active readers.  */\n      rc = SQLITE_OK;\n    }\n  }\n\n  /* If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the\n  ** entire wal file has been copied into the database file, then block\n  ** until all readers have finished using the wal file. This ensures that\n  ** the next process to write to the database restarts the wal file.\n  */\n  if( rc==SQLITE_OK && eMode!=SQLITE_CHECKPOINT_PASSIVE ){\n    assert( pWal->writeLock );\n    SEH_INJECT_FAULT;\n    if( pInfo->nBackfill<pWal->hdr.mxFrame ){\n      rc = SQLITE_BUSY;\n    }else if( eMode>=SQLITE_CHECKPOINT_RESTART ){\n      u32 salt1;\n      sqlite3_randomness(4, &salt1);\n      assert( pInfo->nBackfill==pWal->hdr.mxFrame );\n      rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(1), WAL_NREADER-1);\n      if( rc==SQLITE_OK ){\n        if( eMode==SQLITE_CHECKPOINT_TRUNCATE ){\n          /* IMPLEMENTATION-OF: R-44699-57140 This mode works the same way as\n          ** SQLITE_CHECKPOINT_RESTART with the addition that it also\n          ** truncates the log file to zero bytes just prior to a\n          ** successful return.\n          **\n          ** In theory, it might be safe to do this without updating the\n          ** wal-index header in shared memory, as all subsequent reader or\n          ** writer clients should see that the entire log file has been\n          ** checkpointed and behave accordingly. This seems unsafe though,\n          ** as it would leave the system in a state where the contents of\n          ** the wal-index header do not match the contents of the\n          ** file-system. To avoid this, update the wal-index header to\n          ** indicate that the log file contains zero valid frames.  */\n          walRestartHdr(pWal, salt1);\n          rc = sqlite3OsTruncate(pWal->pWalFd, 0);\n        }\n        walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);\n      }\n    }\n  }\n\n walcheckpoint_out:\n  SEH_FREE_ON_ERROR(pIter, 0);\n  walIteratorFree(pIter);\n  return rc;\n}\n\n/*\n** If the WAL file is currently larger than nMax bytes in size, truncate\n** it to exactly nMax bytes. If an error occurs while doing so, ignore it.\n*/\nstatic void walLimitSize(Wal *pWal, i64 nMax){\n  i64 sz;\n  int rx;\n  sqlite3BeginBenignMalloc();\n  rx = sqlite3OsFileSize(pWal->pWalFd, &sz);\n  if( rx==SQLITE_OK && (sz > nMax ) ){\n    rx = sqlite3OsTruncate(pWal->pWalFd, nMax);\n  }\n  sqlite3EndBenignMalloc();\n  if( rx ){\n    sqlite3_log(rx, \"cannot limit WAL size: %s\", pWal->zWalName);\n  }\n}\n\n#ifdef SQLITE_USE_SEH\n/*\n** This is the \"standard\" exception handler used in a few places to handle\n** an exception thrown by reading from the *-shm mapping after it has become\n** invalid in SQLITE_USE_SEH builds. It is used as follows:\n**\n**   SEH_TRY { ... }\n**   SEH_EXCEPT( rc = walHandleException(pWal); )\n**\n** This function does three things:\n**\n**   1) Determines the locks that should be held, based on the contents of\n**      the Wal.readLock, Wal.writeLock and Wal.ckptLock variables. All other\n**      held locks are assumed to be transient locks that would have been\n**      released had the exception not been thrown and are dropped.\n**\n**   2) Frees the pointer at Wal.pFree, if any, using sqlite3_free().\n**\n**   3) Set pWal->apWiData[pWal->iWiPg] to pWal->pWiValue if not NULL\n**\n**   4) Returns SQLITE_IOERR.\n*/\nstatic int walHandleException(Wal *pWal){\n  if( pWal->exclusiveMode==0 ){\n    static const int S = 1;\n    static const int E = (1<<SQLITE_SHM_NLOCK);\n    int ii;\n    u32 mUnlock;\n    if( pWal->writeLock==2 ) pWal->writeLock = 0;\n    mUnlock = pWal->lockMask & ~(\n        (pWal->readLock<0 ? 0 : (S << WAL_READ_LOCK(pWal->readLock)))\n        | (pWal->writeLock ? (E << WAL_WRITE_LOCK) : 0)\n        | (pWal->ckptLock ? (E << WAL_CKPT_LOCK) : 0)\n        );\n    for(ii=0; ii<SQLITE_SHM_NLOCK; ii++){\n      if( (S<<ii) & mUnlock ) walUnlockShared(pWal, ii);\n      if( (E<<ii) & mUnlock ) walUnlockExclusive(pWal, ii, 1);\n    }\n  }\n  sqlite3_free(pWal->pFree);\n  pWal->pFree = 0;\n  if( pWal->pWiValue ){\n    pWal->apWiData[pWal->iWiPg] = pWal->pWiValue;\n    pWal->pWiValue = 0;\n  }\n  return SQLITE_IOERR_IN_PAGE;\n}\n\n/*\n** Assert that the Wal.lockMask mask, which indicates the locks held\n** by the connection, is consistent with the Wal.readLock, Wal.writeLock\n** and Wal.ckptLock variables. To be used as:\n**\n**   assert( walAssertLockmask(pWal) );\n*/\nstatic int walAssertLockmask(Wal *pWal){\n  if( pWal->exclusiveMode==0 ){\n    static const int S = 1;\n    static const int E = (1<<SQLITE_SHM_NLOCK);\n    u32 mExpect = (\n        (pWal->readLock<0 ? 0 : (S << WAL_READ_LOCK(pWal->readLock)))\n      | (pWal->writeLock ? (E << WAL_WRITE_LOCK) : 0)\n      | (pWal->ckptLock ? (E << WAL_CKPT_LOCK) : 0)\n#ifdef SQLITE_ENABLE_SNAPSHOT\n      | (pWal->pSnapshot ? (pWal->lockMask & (1 << WAL_CKPT_LOCK)) : 0)\n#endif\n    );\n    assert( mExpect==pWal->lockMask );\n  }\n  return 1;\n}\n\n/*\n** Return and zero the \"system error\" field set when an\n** EXCEPTION_IN_PAGE_ERROR exception is caught.\n*/\nSQLITE_PRIVATE int sqlite3WalSystemErrno(Wal *pWal){\n  int iRet = 0;\n  if( pWal ){\n    iRet = pWal->iSysErrno;\n    pWal->iSysErrno = 0;\n  }\n  return iRet;\n}\n\n#else\n# define walAssertLockmask(x) 1\n#endif /* ifdef SQLITE_USE_SEH */\n\n/*\n** Close a connection to a log file.\n*/\nSQLITE_PRIVATE int sqlite3WalClose(\n  Wal *pWal,                      /* Wal to close */\n  sqlite3 *db,                    /* For interrupt flag */\n  int sync_flags,                 /* Flags to pass to OsSync() (or 0) */\n  int nBuf,\n  u8 *zBuf                        /* Buffer of at least nBuf bytes */\n){\n  int rc = SQLITE_OK;\n  if( pWal ){\n    int isDelete = 0;             /* True to unlink wal and wal-index files */\n\n    assert( walAssertLockmask(pWal) );\n\n    /* If an EXCLUSIVE lock can be obtained on the database file (using the\n    ** ordinary, rollback-mode locking methods, this guarantees that the\n    ** connection associated with this log file is the only connection to\n    ** the database. In this case checkpoint the database and unlink both\n    ** the wal and wal-index files.\n    **\n    ** The EXCLUSIVE lock is not released before returning.\n    */\n    if( zBuf!=0\n     && SQLITE_OK==(rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE))\n    ){\n      if( pWal->exclusiveMode==WAL_NORMAL_MODE ){\n        pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;\n      }\n      rc = sqlite3WalCheckpoint(pWal, db,\n          SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0\n      );\n      if( rc==SQLITE_OK ){\n        int bPersist = -1;\n        sqlite3OsFileControlHint(\n            pWal->pDbFd, SQLITE_FCNTL_PERSIST_WAL, &bPersist\n        );\n        if( bPersist!=1 ){\n          /* Try to delete the WAL file if the checkpoint completed and\n          ** fsynced (rc==SQLITE_OK) and if we are not in persistent-wal\n          ** mode (!bPersist) */\n          isDelete = 1;\n        }else if( pWal->mxWalSize>=0 ){\n          /* Try to truncate the WAL file to zero bytes if the checkpoint\n          ** completed and fsynced (rc==SQLITE_OK) and we are in persistent\n          ** WAL mode (bPersist) and if the PRAGMA journal_size_limit is a\n          ** non-negative value (pWal->mxWalSize>=0).  Note that we truncate\n          ** to zero bytes as truncating to the journal_size_limit might\n          ** leave a corrupt WAL file on disk. */\n          walLimitSize(pWal, 0);\n        }\n      }\n    }\n\n    walIndexClose(pWal, isDelete);\n    sqlite3OsClose(pWal->pWalFd);\n    if( isDelete ){\n      sqlite3BeginBenignMalloc();\n      sqlite3OsDelete(pWal->pVfs, pWal->zWalName, 0);\n      sqlite3EndBenignMalloc();\n    }\n    WALTRACE((\"WAL%p: closed\\n\", pWal));\n    sqlite3_free((void *)pWal->apWiData);\n    sqlite3_free(pWal);\n  }\n  return rc;\n}\n\n/*\n** Try to read the wal-index header.  Return 0 on success and 1 if\n** there is a problem.\n**\n** The wal-index is in shared memory.  Another thread or process might\n** be writing the header at the same time this procedure is trying to\n** read it, which might result in inconsistency.  A dirty read is detected\n** by verifying that both copies of the header are the same and also by\n** a checksum on the header.\n**\n** If and only if the read is consistent and the header is different from\n** pWal->hdr, then pWal->hdr is updated to the content of the new header\n** and *pChanged is set to 1.\n**\n** If the checksum cannot be verified return non-zero. If the header\n** is read successfully and the checksum verified, return zero.\n*/\nstatic SQLITE_NO_TSAN int walIndexTryHdr(Wal *pWal, int *pChanged){\n  u32 aCksum[2];                  /* Checksum on the header content */\n  WalIndexHdr h1, h2;             /* Two copies of the header content */\n  WalIndexHdr volatile *aHdr;     /* Header in shared memory */\n\n  /* The first page of the wal-index must be mapped at this point. */\n  assert( pWal->nWiData>0 && pWal->apWiData[0] );\n\n  /* Read the header. This might happen concurrently with a write to the\n  ** same area of shared memory on a different CPU in a SMP,\n  ** meaning it is possible that an inconsistent snapshot is read\n  ** from the file. If this happens, return non-zero.\n  **\n  ** tag-20200519-1:\n  ** There are two copies of the header at the beginning of the wal-index.\n  ** When reading, read [0] first then [1].  Writes are in the reverse order.\n  ** Memory barriers are used to prevent the compiler or the hardware from\n  ** reordering the reads and writes.  TSAN and similar tools can sometimes\n  ** give false-positive warnings about these accesses because the tools do not\n  ** account for the double-read and the memory barrier. The use of mutexes\n  ** here would be problematic as the memory being accessed is potentially\n  ** shared among multiple processes and not all mutex implementations work\n  ** reliably in that environment.\n  */\n  aHdr = walIndexHdr(pWal);\n  memcpy(&h1, (void *)&aHdr[0], sizeof(h1)); /* Possible TSAN false-positive */\n  walShmBarrier(pWal);\n  memcpy(&h2, (void *)&aHdr[1], sizeof(h2));\n\n  if( memcmp(&h1, &h2, sizeof(h1))!=0 ){\n    return 1;   /* Dirty read */\n  }\n  if( h1.isInit==0 ){\n    return 1;   /* Malformed header - probably all zeros */\n  }\n  walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum);\n  if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){\n    return 1;   /* Checksum does not match */\n  }\n\n  if( memcmp(&pWal->hdr, &h1, sizeof(WalIndexHdr)) ){\n    *pChanged = 1;\n    memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));\n    pWal->szPage = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);\n    testcase( pWal->szPage<=32768 );\n    testcase( pWal->szPage>=65536 );\n  }\n\n  /* The header was successfully read. Return zero. */\n  return 0;\n}\n\n/*\n** This is the value that walTryBeginRead returns when it needs to\n** be retried.\n*/\n#define WAL_RETRY  (-1)\n\n/*\n** Read the wal-index header from the wal-index and into pWal->hdr.\n** If the wal-header appears to be corrupt, try to reconstruct the\n** wal-index from the WAL before returning.\n**\n** Set *pChanged to 1 if the wal-index header value in pWal->hdr is\n** changed by this operation.  If pWal->hdr is unchanged, set *pChanged\n** to 0.\n**\n** If the wal-index header is successfully read, return SQLITE_OK.\n** Otherwise an SQLite error code.\n*/\nstatic int walIndexReadHdr(Wal *pWal, int *pChanged){\n  int rc;                         /* Return code */\n  int badHdr;                     /* True if a header read failed */\n  volatile u32 *page0;            /* Chunk of wal-index containing header */\n\n  /* Ensure that page 0 of the wal-index (the page that contains the\n  ** wal-index header) is mapped. Return early if an error occurs here.\n  */\n  assert( pChanged );\n  rc = walIndexPage(pWal, 0, &page0);\n  if( rc!=SQLITE_OK ){\n    assert( rc!=SQLITE_READONLY ); /* READONLY changed to OK in walIndexPage */\n    if( rc==SQLITE_READONLY_CANTINIT ){\n      /* The SQLITE_READONLY_CANTINIT return means that the shared-memory\n      ** was openable but is not writable, and this thread is unable to\n      ** confirm that another write-capable connection has the shared-memory\n      ** open, and hence the content of the shared-memory is unreliable,\n      ** since the shared-memory might be inconsistent with the WAL file\n      ** and there is no writer on hand to fix it. */\n      assert( page0==0 );\n      assert( pWal->writeLock==0 );\n      assert( pWal->readOnly & WAL_SHM_RDONLY );\n      pWal->bShmUnreliable = 1;\n      pWal->exclusiveMode = WAL_HEAPMEMORY_MODE;\n      *pChanged = 1;\n    }else{\n      return rc; /* Any other non-OK return is just an error */\n    }\n  }else{\n    /* page0 can be NULL if the SHM is zero bytes in size and pWal->writeLock\n    ** is zero, which prevents the SHM from growing */\n    testcase( page0!=0 );\n  }\n  assert( page0!=0 || pWal->writeLock==0 );\n\n  /* If the first page of the wal-index has been mapped, try to read the\n  ** wal-index header immediately, without holding any lock. This usually\n  ** works, but may fail if the wal-index header is corrupt or currently\n  ** being modified by another thread or process.\n  */\n  badHdr = (page0 ? walIndexTryHdr(pWal, pChanged) : 1);\n\n  /* If the first attempt failed, it might have been due to a race\n  ** with a writer.  So get a WRITE lock and try again.\n  */\n  if( badHdr ){\n    if( pWal->bShmUnreliable==0 && (pWal->readOnly & WAL_SHM_RDONLY) ){\n      if( SQLITE_OK==(rc = walLockShared(pWal, WAL_WRITE_LOCK)) ){\n        walUnlockShared(pWal, WAL_WRITE_LOCK);\n        rc = SQLITE_READONLY_RECOVERY;\n      }\n    }else{\n      int bWriteLock = pWal->writeLock;\n      if( bWriteLock\n       || SQLITE_OK==(rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1))\n      ){\n        /* If the write-lock was just obtained, set writeLock to 2 instead of\n        ** the usual 1. This causes walIndexPage() to behave as if the\n        ** write-lock were held (so that it allocates new pages as required),\n        ** and walHandleException() to unlock the write-lock if a SEH exception\n        ** is thrown.  */\n        if( !bWriteLock ) pWal->writeLock = 2;\n        if( SQLITE_OK==(rc = walIndexPage(pWal, 0, &page0)) ){\n          badHdr = walIndexTryHdr(pWal, pChanged);\n          if( badHdr ){\n            /* If the wal-index header is still malformed even while holding\n            ** a WRITE lock, it can only mean that the header is corrupted and\n            ** needs to be reconstructed.  So run recovery to do exactly that.\n            ** Disable blocking locks first.  */\n            walDisableBlocking(pWal);\n            rc = walIndexRecover(pWal);\n            *pChanged = 1;\n          }\n        }\n        if( bWriteLock==0 ){\n          pWal->writeLock = 0;\n          walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);\n        }\n      }\n    }\n  }\n\n  /* If the header is read successfully, check the version number to make\n  ** sure the wal-index was not constructed with some future format that\n  ** this version of SQLite cannot understand.\n  */\n  if( badHdr==0 && pWal->hdr.iVersion!=WALINDEX_MAX_VERSION ){\n    rc = SQLITE_CANTOPEN_BKPT;\n  }\n  if( pWal->bShmUnreliable ){\n    if( rc!=SQLITE_OK ){\n      walIndexClose(pWal, 0);\n      pWal->bShmUnreliable = 0;\n      assert( pWal->nWiData>0 && pWal->apWiData[0]==0 );\n      /* walIndexRecover() might have returned SHORT_READ if a concurrent\n      ** writer truncated the WAL out from under it.  If that happens, it\n      ** indicates that a writer has fixed the SHM file for us, so retry */\n      if( rc==SQLITE_IOERR_SHORT_READ ) rc = WAL_RETRY;\n    }\n    pWal->exclusiveMode = WAL_NORMAL_MODE;\n  }\n\n  return rc;\n}\n\n/*\n** Open a transaction in a connection where the shared-memory is read-only\n** and where we cannot verify that there is a separate write-capable connection\n** on hand to keep the shared-memory up-to-date with the WAL file.\n**\n** This can happen, for example, when the shared-memory is implemented by\n** memory-mapping a *-shm file, where a prior writer has shut down and\n** left the *-shm file on disk, and now the present connection is trying\n** to use that database but lacks write permission on the *-shm file.\n** Other scenarios are also possible, depending on the VFS implementation.\n**\n** Precondition:\n**\n**    The *-wal file has been read and an appropriate wal-index has been\n**    constructed in pWal->apWiData[] using heap memory instead of shared\n**    memory.\n**\n** If this function returns SQLITE_OK, then the read transaction has\n** been successfully opened. In this case output variable (*pChanged)\n** is set to true before returning if the caller should discard the\n** contents of the page cache before proceeding. Or, if it returns\n** WAL_RETRY, then the heap memory wal-index has been discarded and\n** the caller should retry opening the read transaction from the\n** beginning (including attempting to map the *-shm file).\n**\n** If an error occurs, an SQLite error code is returned.\n*/\nstatic int walBeginShmUnreliable(Wal *pWal, int *pChanged){\n  i64 szWal;                      /* Size of wal file on disk in bytes */\n  i64 iOffset;                    /* Current offset when reading wal file */\n  u8 aBuf[WAL_HDRSIZE];           /* Buffer to load WAL header into */\n  u8 *aFrame = 0;                 /* Malloc'd buffer to load entire frame */\n  int szFrame;                    /* Number of bytes in buffer aFrame[] */\n  u8 *aData;                      /* Pointer to data part of aFrame buffer */\n  volatile void *pDummy;          /* Dummy argument for xShmMap */\n  int rc;                         /* Return code */\n  u32 aSaveCksum[2];              /* Saved copy of pWal->hdr.aFrameCksum */\n\n  assert( pWal->bShmUnreliable );\n  assert( pWal->readOnly & WAL_SHM_RDONLY );\n  assert( pWal->nWiData>0 && pWal->apWiData[0] );\n\n  /* Take WAL_READ_LOCK(0). This has the effect of preventing any\n  ** writers from running a checkpoint, but does not stop them\n  ** from running recovery.  */\n  rc = walLockShared(pWal, WAL_READ_LOCK(0));\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_BUSY ) rc = WAL_RETRY;\n    goto begin_unreliable_shm_out;\n  }\n  pWal->readLock = 0;\n\n  /* Check to see if a separate writer has attached to the shared-memory area,\n  ** thus making the shared-memory \"reliable\" again.  Do this by invoking\n  ** the xShmMap() routine of the VFS and looking to see if the return\n  ** is SQLITE_READONLY instead of SQLITE_READONLY_CANTINIT.\n  **\n  ** If the shared-memory is now \"reliable\" return WAL_RETRY, which will\n  ** cause the heap-memory WAL-index to be discarded and the actual\n  ** shared memory to be used in its place.\n  **\n  ** This step is important because, even though this connection is holding\n  ** the WAL_READ_LOCK(0) which prevents a checkpoint, a writer might\n  ** have already checkpointed the WAL file and, while the current\n  ** is active, wrap the WAL and start overwriting frames that this\n  ** process wants to use.\n  **\n  ** Once sqlite3OsShmMap() has been called for an sqlite3_file and has\n  ** returned any SQLITE_READONLY value, it must return only SQLITE_READONLY\n  ** or SQLITE_READONLY_CANTINIT or some error for all subsequent invocations,\n  ** even if some external agent does a \"chmod\" to make the shared-memory\n  ** writable by us, until sqlite3OsShmUnmap() has been called.\n  ** This is a requirement on the VFS implementation.\n   */\n  rc = sqlite3OsShmMap(pWal->pDbFd, 0, WALINDEX_PGSZ, 0, &pDummy);\n  assert( rc!=SQLITE_OK ); /* SQLITE_OK not possible for read-only connection */\n  if( rc!=SQLITE_READONLY_CANTINIT ){\n    rc = (rc==SQLITE_READONLY ? WAL_RETRY : rc);\n    goto begin_unreliable_shm_out;\n  }\n\n  /* We reach this point only if the real shared-memory is still unreliable.\n  ** Assume the in-memory WAL-index substitute is correct and load it\n  ** into pWal->hdr.\n  */\n  memcpy(&pWal->hdr, (void*)walIndexHdr(pWal), sizeof(WalIndexHdr));\n\n  /* Make sure some writer hasn't come in and changed the WAL file out\n  ** from under us, then disconnected, while we were not looking.\n  */\n  rc = sqlite3OsFileSize(pWal->pWalFd, &szWal);\n  if( rc!=SQLITE_OK ){\n    goto begin_unreliable_shm_out;\n  }\n  if( szWal<WAL_HDRSIZE ){\n    /* If the wal file is too small to contain a wal-header and the\n    ** wal-index header has mxFrame==0, then it must be safe to proceed\n    ** reading the database file only. However, the page cache cannot\n    ** be trusted, as a read/write connection may have connected, written\n    ** the db, run a checkpoint, truncated the wal file and disconnected\n    ** since this client's last read transaction.  */\n    *pChanged = 1;\n    rc = (pWal->hdr.mxFrame==0 ? SQLITE_OK : WAL_RETRY);\n    goto begin_unreliable_shm_out;\n  }\n\n  /* Check the salt keys at the start of the wal file still match. */\n  rc = sqlite3OsRead(pWal->pWalFd, aBuf, WAL_HDRSIZE, 0);\n  if( rc!=SQLITE_OK ){\n    goto begin_unreliable_shm_out;\n  }\n  if( memcmp(&pWal->hdr.aSalt, &aBuf[16], 8) ){\n    /* Some writer has wrapped the WAL file while we were not looking.\n    ** Return WAL_RETRY which will cause the in-memory WAL-index to be\n    ** rebuilt. */\n    rc = WAL_RETRY;\n    goto begin_unreliable_shm_out;\n  }\n\n  /* Allocate a buffer to read frames into */\n  assert( (pWal->szPage & (pWal->szPage-1))==0 );\n  assert( pWal->szPage>=512 && pWal->szPage<=65536 );\n  szFrame = pWal->szPage + WAL_FRAME_HDRSIZE;\n  aFrame = (u8 *)sqlite3_malloc64(szFrame);\n  if( aFrame==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto begin_unreliable_shm_out;\n  }\n  aData = &aFrame[WAL_FRAME_HDRSIZE];\n\n  /* Check to see if a complete transaction has been appended to the\n  ** wal file since the heap-memory wal-index was created. If so, the\n  ** heap-memory wal-index is discarded and WAL_RETRY returned to\n  ** the caller.  */\n  aSaveCksum[0] = pWal->hdr.aFrameCksum[0];\n  aSaveCksum[1] = pWal->hdr.aFrameCksum[1];\n  for(iOffset=walFrameOffset(pWal->hdr.mxFrame+1, pWal->szPage);\n      iOffset+szFrame<=szWal;\n      iOffset+=szFrame\n  ){\n    u32 pgno;                   /* Database page number for frame */\n    u32 nTruncate;              /* dbsize field from frame header */\n\n    /* Read and decode the next log frame. */\n    rc = sqlite3OsRead(pWal->pWalFd, aFrame, szFrame, iOffset);\n    if( rc!=SQLITE_OK ) break;\n    if( !walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame) ) break;\n\n    /* If nTruncate is non-zero, then a complete transaction has been\n    ** appended to this wal file. Set rc to WAL_RETRY and break out of\n    ** the loop.  */\n    if( nTruncate ){\n      rc = WAL_RETRY;\n      break;\n    }\n  }\n  pWal->hdr.aFrameCksum[0] = aSaveCksum[0];\n  pWal->hdr.aFrameCksum[1] = aSaveCksum[1];\n\n begin_unreliable_shm_out:\n  sqlite3_free(aFrame);\n  if( rc!=SQLITE_OK ){\n    int i;\n    for(i=0; i<pWal->nWiData; i++){\n      sqlite3_free((void*)pWal->apWiData[i]);\n      pWal->apWiData[i] = 0;\n    }\n    pWal->bShmUnreliable = 0;\n    sqlite3WalEndReadTransaction(pWal);\n    *pChanged = 1;\n  }\n  return rc;\n}\n\n/*\n** The final argument passed to walTryBeginRead() is of type (int*). The\n** caller should invoke walTryBeginRead as follows:\n**\n**   int cnt = 0;\n**   do {\n**     rc = walTryBeginRead(..., &cnt);\n**   }while( rc==WAL_RETRY );\n**\n** The final value of \"cnt\" is of no use to the caller. It is used by\n** the implementation of walTryBeginRead() as follows:\n**\n**   + Each time walTryBeginRead() is called, it is incremented. Once\n**     it reaches WAL_RETRY_PROTOCOL_LIMIT - indicating that walTryBeginRead()\n**     has many times been invoked and failed with WAL_RETRY - walTryBeginRead()\n**     returns SQLITE_PROTOCOL.\n**\n**   + If SQLITE_ENABLE_SETLK_TIMEOUT is defined and walTryBeginRead() failed\n**     because a blocking lock timed out (SQLITE_BUSY_TIMEOUT from the OS\n**     layer), the WAL_RETRY_BLOCKED_MASK bit is set in \"cnt\". In this case\n**     the next invocation of walTryBeginRead() may omit an expected call to\n**     sqlite3OsSleep(). There has already been a delay when the previous call\n**     waited on a lock.\n*/\n#define WAL_RETRY_PROTOCOL_LIMIT 100\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n# define WAL_RETRY_BLOCKED_MASK    0x10000000\n#else\n# define WAL_RETRY_BLOCKED_MASK    0\n#endif\n\n/*\n** Attempt to start a read transaction.  This might fail due to a race or\n** other transient condition.  When that happens, it returns WAL_RETRY to\n** indicate to the caller that it is safe to retry immediately.\n**\n** On success return SQLITE_OK.  On a permanent failure (such an\n** I/O error or an SQLITE_BUSY because another process is running\n** recovery) return a positive error code.\n**\n** The useWal parameter is true to force the use of the WAL and disable\n** the case where the WAL is bypassed because it has been completely\n** checkpointed.  If useWal==0 then this routine calls walIndexReadHdr()\n** to make a copy of the wal-index header into pWal->hdr.  If the\n** wal-index header has changed, *pChanged is set to 1 (as an indication\n** to the caller that the local page cache is obsolete and needs to be\n** flushed.)  When useWal==1, the wal-index header is assumed to already\n** be loaded and the pChanged parameter is unused.\n**\n** The caller must set the cnt parameter to the number of prior calls to\n** this routine during the current read attempt that returned WAL_RETRY.\n** This routine will start taking more aggressive measures to clear the\n** race conditions after multiple WAL_RETRY returns, and after an excessive\n** number of errors will ultimately return SQLITE_PROTOCOL.  The\n** SQLITE_PROTOCOL return indicates that some other process has gone rogue\n** and is not honoring the locking protocol.  There is a vanishingly small\n** chance that SQLITE_PROTOCOL could be returned because of a run of really\n** bad luck when there is lots of contention for the wal-index, but that\n** possibility is so small that it can be safely neglected, we believe.\n**\n** On success, this routine obtains a read lock on\n** WAL_READ_LOCK(pWal->readLock).  The pWal->readLock integer is\n** in the range 0 <= pWal->readLock < WAL_NREADER.  If pWal->readLock==(-1)\n** that means the Wal does not hold any read lock.  The reader must not\n** access any database page that is modified by a WAL frame up to and\n** including frame number aReadMark[pWal->readLock].  The reader will\n** use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0\n** Or if pWal->readLock==0, then the reader will ignore the WAL\n** completely and get all content directly from the database file.\n** If the useWal parameter is 1 then the WAL will never be ignored and\n** this routine will always set pWal->readLock>0 on success.\n** When the read transaction is completed, the caller must release the\n** lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1.\n**\n** This routine uses the nBackfill and aReadMark[] fields of the header\n** to select a particular WAL_READ_LOCK() that strives to let the\n** checkpoint process do as much work as possible.  This routine might\n** update values of the aReadMark[] array in the header, but if it does\n** so it takes care to hold an exclusive lock on the corresponding\n** WAL_READ_LOCK() while changing values.\n*/\nstatic int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int *pCnt){\n  volatile WalCkptInfo *pInfo;    /* Checkpoint information in wal-index */\n  int rc = SQLITE_OK;             /* Return code  */\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  int nBlockTmout = 0;\n#endif\n\n  assert( pWal->readLock<0 );     /* Not currently locked */\n\n  /* useWal may only be set for read/write connections */\n  assert( (pWal->readOnly & WAL_SHM_RDONLY)==0 || useWal==0 );\n\n  /* Take steps to avoid spinning forever if there is a protocol error.\n  **\n  ** Circumstances that cause a RETRY should only last for the briefest\n  ** instances of time.  No I/O or other system calls are done while the\n  ** locks are held, so the locks should not be held for very long. But\n  ** if we are unlucky, another process that is holding a lock might get\n  ** paged out or take a page-fault that is time-consuming to resolve,\n  ** during the few nanoseconds that it is holding the lock.  In that case,\n  ** it might take longer than normal for the lock to free.\n  **\n  ** After 5 RETRYs, we begin calling sqlite3OsSleep().  The first few\n  ** calls to sqlite3OsSleep() have a delay of 1 microsecond.  Really this\n  ** is more of a scheduler yield than an actual delay.  But on the 10th\n  ** an subsequent retries, the delays start becoming longer and longer,\n  ** so that on the 100th (and last) RETRY we delay for 323 milliseconds.\n  ** The total delay time before giving up is less than 10 seconds.\n  */\n  (*pCnt)++;\n  if( *pCnt>5 ){\n    int nDelay = 1;                      /* Pause time in microseconds */\n    int cnt = (*pCnt & ~WAL_RETRY_BLOCKED_MASK);\n    if( cnt>WAL_RETRY_PROTOCOL_LIMIT ){\n      VVA_ONLY( pWal->lockError = 1; )\n      return SQLITE_PROTOCOL;\n    }\n    if( *pCnt>=10 ) nDelay = (cnt-9)*(cnt-9)*39;\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    /* In SQLITE_ENABLE_SETLK_TIMEOUT builds, configure the file-descriptor\n    ** to block for locks for approximately nDelay us. This affects three\n    ** locks: (a) the shared lock taken on the DMS slot in os_unix.c (if\n    ** using os_unix.c), (b) the WRITER lock taken in walIndexReadHdr() if the\n    ** first attempted read fails, and (c) the shared lock taken on the\n    ** read-mark.\n    **\n    ** If the previous call failed due to an SQLITE_BUSY_TIMEOUT error,\n    ** then sleep for the minimum of 1us. The previous call already provided\n    ** an extra delay while it was blocking on the lock.\n    */\n    nBlockTmout = (nDelay+998) / 1000;\n    if( !useWal && walEnableBlockingMs(pWal, nBlockTmout) ){\n      if( *pCnt & WAL_RETRY_BLOCKED_MASK ) nDelay = 1;\n    }\n#endif\n    sqlite3OsSleep(pWal->pVfs, nDelay);\n    *pCnt &= ~WAL_RETRY_BLOCKED_MASK;\n  }\n\n  if( !useWal ){\n    assert( rc==SQLITE_OK );\n    if( pWal->bShmUnreliable==0 ){\n      rc = walIndexReadHdr(pWal, pChanged);\n    }\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    if( rc==SQLITE_BUSY_TIMEOUT ){\n      rc = SQLITE_BUSY;\n      *pCnt |= WAL_RETRY_BLOCKED_MASK;\n    }\n#endif\n    if( rc==SQLITE_BUSY ){\n      /* If there is not a recovery running in another thread or process\n      ** then convert BUSY errors to WAL_RETRY.  If recovery is known to\n      ** be running, convert BUSY to BUSY_RECOVERY.  There is a race here\n      ** which might cause WAL_RETRY to be returned even if BUSY_RECOVERY\n      ** would be technically correct.  But the race is benign since with\n      ** WAL_RETRY this routine will be called again and will probably be\n      ** right on the second iteration.\n      */\n      (void)walEnableBlocking(pWal);\n      if( pWal->apWiData[0]==0 ){\n        /* This branch is taken when the xShmMap() method returns SQLITE_BUSY.\n        ** We assume this is a transient condition, so return WAL_RETRY. The\n        ** xShmMap() implementation used by the default unix and win32 VFS\n        ** modules may return SQLITE_BUSY due to a race condition in the\n        ** code that determines whether or not the shared-memory region\n        ** must be zeroed before the requested page is returned.\n        */\n        rc = WAL_RETRY;\n      }else if( SQLITE_OK==(rc = walLockShared(pWal, WAL_RECOVER_LOCK)) ){\n        walUnlockShared(pWal, WAL_RECOVER_LOCK);\n        rc = WAL_RETRY;\n      }else if( rc==SQLITE_BUSY ){\n        rc = SQLITE_BUSY_RECOVERY;\n      }\n    }\n    walDisableBlocking(pWal);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    else if( pWal->bShmUnreliable ){\n      return walBeginShmUnreliable(pWal, pChanged);\n    }\n  }\n\n  assert( pWal->nWiData>0 );\n  assert( pWal->apWiData[0]!=0 );\n  pInfo = walCkptInfo(pWal);\n  SEH_INJECT_FAULT;\n  {\n    u32 mxReadMark;               /* Largest aReadMark[] value */\n    int mxI;                      /* Index of largest aReadMark[] value */\n    int i;                        /* Loop counter */\n    u32 mxFrame;                  /* Wal frame to lock to */\n    if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame\n#ifdef SQLITE_ENABLE_SNAPSHOT\n     && ((pWal->bGetSnapshot==0 && pWal->pSnapshot==0) || pWal->hdr.mxFrame==0)\n#endif\n    ){\n      /* The WAL has been completely backfilled (or it is empty).\n      ** and can be safely ignored.\n      */\n      rc = walLockShared(pWal, WAL_READ_LOCK(0));\n      walShmBarrier(pWal);\n      if( rc==SQLITE_OK ){\n        if( memcmp((void *)walIndexHdr(pWal), &pWal->hdr,sizeof(WalIndexHdr)) ){\n          /* It is not safe to allow the reader to continue here if frames\n          ** may have been appended to the log before READ_LOCK(0) was obtained.\n          ** When holding READ_LOCK(0), the reader ignores the entire log file,\n          ** which implies that the database file contains a trustworthy\n          ** snapshot. Since holding READ_LOCK(0) prevents a checkpoint from\n          ** happening, this is usually correct.\n          **\n          ** However, if frames have been appended to the log (or if the log\n          ** is wrapped and written for that matter) before the READ_LOCK(0)\n          ** is obtained, that is not necessarily true. A checkpointer may\n          ** have started to backfill the appended frames but crashed before\n          ** it finished. Leaving a corrupt image in the database file.\n          */\n          walUnlockShared(pWal, WAL_READ_LOCK(0));\n          return WAL_RETRY;\n        }\n        pWal->readLock = 0;\n        return SQLITE_OK;\n      }else if( rc!=SQLITE_BUSY ){\n        return rc;\n      }\n    }\n\n    /* If we get this far, it means that the reader will want to use\n    ** the WAL to get at content from recent commits.  The job now is\n    ** to select one of the aReadMark[] entries that is closest to\n    ** but not exceeding pWal->hdr.mxFrame and lock that entry.\n    */\n    mxReadMark = 0;\n    mxI = 0;\n    mxFrame = pWal->hdr.mxFrame;\n#ifdef SQLITE_ENABLE_SNAPSHOT\n    if( pWal->pSnapshot && pWal->pSnapshot->mxFrame<mxFrame ){\n      mxFrame = pWal->pSnapshot->mxFrame;\n    }\n#endif\n    for(i=1; i<WAL_NREADER; i++){\n      u32 thisMark = AtomicLoad(pInfo->aReadMark+i); SEH_INJECT_FAULT;\n      if( mxReadMark<=thisMark && thisMark<=mxFrame ){\n        assert( thisMark!=READMARK_NOT_USED );\n        mxReadMark = thisMark;\n        mxI = i;\n      }\n    }\n    if( (pWal->readOnly & WAL_SHM_RDONLY)==0\n     && (mxReadMark<mxFrame || mxI==0)\n    ){\n      for(i=1; i<WAL_NREADER; i++){\n        rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);\n        if( rc==SQLITE_OK ){\n          AtomicStore(pInfo->aReadMark+i,mxFrame);\n          mxReadMark = mxFrame;\n          mxI = i;\n          walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);\n          break;\n        }else if( rc!=SQLITE_BUSY ){\n          return rc;\n        }\n      }\n    }\n    if( mxI==0 ){\n      assert( rc==SQLITE_BUSY || (pWal->readOnly & WAL_SHM_RDONLY)!=0 );\n      return rc==SQLITE_BUSY ? WAL_RETRY : SQLITE_READONLY_CANTINIT;\n    }\n\n    (void)walEnableBlockingMs(pWal, nBlockTmout);\n    rc = walLockShared(pWal, WAL_READ_LOCK(mxI));\n    walDisableBlocking(pWal);\n    if( rc ){\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n      if( rc==SQLITE_BUSY_TIMEOUT ){\n        *pCnt |= WAL_RETRY_BLOCKED_MASK;\n      }\n#else\n      assert( rc!=SQLITE_BUSY_TIMEOUT );\n#endif\n      assert((rc&0xFF)!=SQLITE_BUSY||rc==SQLITE_BUSY||rc==SQLITE_BUSY_TIMEOUT);\n      return (rc&0xFF)==SQLITE_BUSY ? WAL_RETRY : rc;\n    }\n    /* Now that the read-lock has been obtained, check that neither the\n    ** value in the aReadMark[] array or the contents of the wal-index\n    ** header have changed.\n    **\n    ** It is necessary to check that the wal-index header did not change\n    ** between the time it was read and when the shared-lock was obtained\n    ** on WAL_READ_LOCK(mxI) was obtained to account for the possibility\n    ** that the log file may have been wrapped by a writer, or that frames\n    ** that occur later in the log than pWal->hdr.mxFrame may have been\n    ** copied into the database by a checkpointer. If either of these things\n    ** happened, then reading the database with the current value of\n    ** pWal->hdr.mxFrame risks reading a corrupted snapshot. So, retry\n    ** instead.\n    **\n    ** Before checking that the live wal-index header has not changed\n    ** since it was read, set Wal.minFrame to the first frame in the wal\n    ** file that has not yet been checkpointed. This client will not need\n    ** to read any frames earlier than minFrame from the wal file - they\n    ** can be safely read directly from the database file.\n    **\n    ** Because a ShmBarrier() call is made between taking the copy of\n    ** nBackfill and checking that the wal-header in shared-memory still\n    ** matches the one cached in pWal->hdr, it is guaranteed that the\n    ** checkpointer that set nBackfill was not working with a wal-index\n    ** header newer than that cached in pWal->hdr. If it were, that could\n    ** cause a problem. The checkpointer could omit to checkpoint\n    ** a version of page X that lies before pWal->minFrame (call that version\n    ** A) on the basis that there is a newer version (version B) of the same\n    ** page later in the wal file. But if version B happens to like past\n    ** frame pWal->hdr.mxFrame - then the client would incorrectly assume\n    ** that it can read version A from the database file. However, since\n    ** we can guarantee that the checkpointer that set nBackfill could not\n    ** see any pages past pWal->hdr.mxFrame, this problem does not come up.\n    */\n    pWal->minFrame = AtomicLoad(&pInfo->nBackfill)+1; SEH_INJECT_FAULT;\n    walShmBarrier(pWal);\n    if( AtomicLoad(pInfo->aReadMark+mxI)!=mxReadMark\n     || memcmp((void *)walIndexHdr(pWal), &pWal->hdr, sizeof(WalIndexHdr))\n    ){\n      walUnlockShared(pWal, WAL_READ_LOCK(mxI));\n      return WAL_RETRY;\n    }else{\n      assert( mxReadMark<=pWal->hdr.mxFrame );\n      pWal->readLock = (i16)mxI;\n    }\n  }\n  return rc;\n}\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n/*\n** This function does the work of sqlite3WalSnapshotRecover().\n*/\nstatic int walSnapshotRecover(\n  Wal *pWal,                      /* WAL handle */\n  void *pBuf1,                    /* Temp buffer pWal->szPage bytes in size */\n  void *pBuf2                     /* Temp buffer pWal->szPage bytes in size */\n){\n  int szPage = (int)pWal->szPage;\n  int rc;\n  i64 szDb;                       /* Size of db file in bytes */\n\n  rc = sqlite3OsFileSize(pWal->pDbFd, &szDb);\n  if( rc==SQLITE_OK ){\n    volatile WalCkptInfo *pInfo = walCkptInfo(pWal);\n    u32 i = pInfo->nBackfillAttempted;\n    for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){\n      WalHashLoc sLoc;          /* Hash table location */\n      u32 pgno;                 /* Page number in db file */\n      i64 iDbOff;               /* Offset of db file entry */\n      i64 iWalOff;              /* Offset of wal file entry */\n\n      rc = walHashGet(pWal, walFramePage(i), &sLoc);\n      if( rc!=SQLITE_OK ) break;\n      assert( i - sLoc.iZero - 1 >=0 );\n      pgno = sLoc.aPgno[i-sLoc.iZero-1];\n      iDbOff = (i64)(pgno-1) * szPage;\n\n      if( iDbOff+szPage<=szDb ){\n        iWalOff = walFrameOffset(i, szPage) + WAL_FRAME_HDRSIZE;\n        rc = sqlite3OsRead(pWal->pWalFd, pBuf1, szPage, iWalOff);\n\n        if( rc==SQLITE_OK ){\n          rc = sqlite3OsRead(pWal->pDbFd, pBuf2, szPage, iDbOff);\n        }\n\n        if( rc!=SQLITE_OK || 0==memcmp(pBuf1, pBuf2, szPage) ){\n          break;\n        }\n      }\n\n      pInfo->nBackfillAttempted = i-1;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Attempt to reduce the value of the WalCkptInfo.nBackfillAttempted\n** variable so that older snapshots can be accessed. To do this, loop\n** through all wal frames from nBackfillAttempted to (nBackfill+1),\n** comparing their content to the corresponding page with the database\n** file, if any. Set nBackfillAttempted to the frame number of the\n** first frame for which the wal file content matches the db file.\n**\n** This is only really safe if the file-system is such that any page\n** writes made by earlier checkpointers were atomic operations, which\n** is not always true. It is also possible that nBackfillAttempted\n** may be left set to a value larger than expected, if a wal frame\n** contains content that duplicate of an earlier version of the same\n** page.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code if an\n** error occurs. It is not an error if nBackfillAttempted cannot be\n** decreased at all.\n*/\nSQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal){\n  int rc;\n\n  assert( pWal->readLock>=0 );\n  rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);\n  if( rc==SQLITE_OK ){\n    void *pBuf1 = sqlite3_malloc(pWal->szPage);\n    void *pBuf2 = sqlite3_malloc(pWal->szPage);\n    if( pBuf1==0 || pBuf2==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      pWal->ckptLock = 1;\n      SEH_TRY {\n        rc = walSnapshotRecover(pWal, pBuf1, pBuf2);\n      }\n      SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )\n      pWal->ckptLock = 0;\n    }\n\n    sqlite3_free(pBuf1);\n    sqlite3_free(pBuf2);\n    walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);\n  }\n\n  return rc;\n}\n#endif /* SQLITE_ENABLE_SNAPSHOT */\n\n/*\n** This function does the work of sqlite3WalBeginReadTransaction() (see\n** below). That function simply calls this one inside an SEH_TRY{...} block.\n*/\nstatic int walBeginReadTransaction(Wal *pWal, int *pChanged){\n  int rc;                         /* Return code */\n  int cnt = 0;                    /* Number of TryBeginRead attempts */\n#ifdef SQLITE_ENABLE_SNAPSHOT\n  int ckptLock = 0;\n  int bChanged = 0;\n  WalIndexHdr *pSnapshot = pWal->pSnapshot;\n#endif\n\n  assert( pWal->ckptLock==0 );\n  assert( pWal->nSehTry>0 );\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n  if( pSnapshot ){\n    if( memcmp(pSnapshot, &pWal->hdr, sizeof(WalIndexHdr))!=0 ){\n      bChanged = 1;\n    }\n\n    /* It is possible that there is a checkpointer thread running\n    ** concurrent with this code. If this is the case, it may be that the\n    ** checkpointer has already determined that it will checkpoint\n    ** snapshot X, where X is later in the wal file than pSnapshot, but\n    ** has not yet set the pInfo->nBackfillAttempted variable to indicate\n    ** its intent. To avoid the race condition this leads to, ensure that\n    ** there is no checkpointer process by taking a shared CKPT lock\n    ** before checking pInfo->nBackfillAttempted.  */\n    (void)walEnableBlocking(pWal);\n    rc = walLockShared(pWal, WAL_CKPT_LOCK);\n    walDisableBlocking(pWal);\n\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    ckptLock = 1;\n  }\n#endif\n\n  do{\n    rc = walTryBeginRead(pWal, pChanged, 0, &cnt);\n  }while( rc==WAL_RETRY );\n  testcase( (rc&0xff)==SQLITE_BUSY );\n  testcase( (rc&0xff)==SQLITE_IOERR );\n  testcase( rc==SQLITE_PROTOCOL );\n  testcase( rc==SQLITE_OK );\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n  if( rc==SQLITE_OK ){\n    if( pSnapshot && memcmp(pSnapshot, &pWal->hdr, sizeof(WalIndexHdr))!=0 ){\n      /* At this point the client has a lock on an aReadMark[] slot holding\n      ** a value equal to or smaller than pSnapshot->mxFrame, but pWal->hdr\n      ** is populated with the wal-index header corresponding to the head\n      ** of the wal file. Verify that pSnapshot is still valid before\n      ** continuing.  Reasons why pSnapshot might no longer be valid:\n      **\n      **    (1)  The WAL file has been reset since the snapshot was taken.\n      **         In this case, the salt will have changed.\n      **\n      **    (2)  A checkpoint as been attempted that wrote frames past\n      **         pSnapshot->mxFrame into the database file.  Note that the\n      **         checkpoint need not have completed for this to cause problems.\n      */\n      volatile WalCkptInfo *pInfo = walCkptInfo(pWal);\n\n      assert( pWal->readLock>0 || pWal->hdr.mxFrame==0 );\n      assert( pInfo->aReadMark[pWal->readLock]<=pSnapshot->mxFrame );\n\n      /* Check that the wal file has not been wrapped. Assuming that it has\n      ** not, also check that no checkpointer has attempted to checkpoint any\n      ** frames beyond pSnapshot->mxFrame. If either of these conditions are\n      ** true, return SQLITE_ERROR_SNAPSHOT. Otherwise, overwrite pWal->hdr\n      ** with *pSnapshot and set *pChanged as appropriate for opening the\n      ** snapshot.  */\n      if( !memcmp(pSnapshot->aSalt, pWal->hdr.aSalt, sizeof(pWal->hdr.aSalt))\n       && pSnapshot->mxFrame>=pInfo->nBackfillAttempted\n      ){\n        assert( pWal->readLock>0 );\n        memcpy(&pWal->hdr, pSnapshot, sizeof(WalIndexHdr));\n        *pChanged = bChanged;\n      }else{\n        rc = SQLITE_ERROR_SNAPSHOT;\n      }\n\n      /* A client using a non-current snapshot may not ignore any frames\n      ** from the start of the wal file. This is because, for a system\n      ** where (minFrame < iSnapshot < maxFrame), a checkpointer may\n      ** have omitted to checkpoint a frame earlier than minFrame in\n      ** the file because there exists a frame after iSnapshot that\n      ** is the same database page.  */\n      pWal->minFrame = 1;\n\n      if( rc!=SQLITE_OK ){\n        sqlite3WalEndReadTransaction(pWal);\n      }\n    }\n  }\n\n  /* Release the shared CKPT lock obtained above. */\n  if( ckptLock ){\n    assert( pSnapshot );\n    walUnlockShared(pWal, WAL_CKPT_LOCK);\n  }\n#endif\n  return rc;\n}\n\n/*\n** Begin a read transaction on the database.\n**\n** This routine used to be called sqlite3OpenSnapshot() and with good reason:\n** it takes a snapshot of the state of the WAL and wal-index for the current\n** instant in time.  The current thread will continue to use this snapshot.\n** Other threads might append new content to the WAL and wal-index but\n** that extra content is ignored by the current thread.\n**\n** If the database contents have changes since the previous read\n** transaction, then *pChanged is set to 1 before returning.  The\n** Pager layer will use this to know that its cache is stale and\n** needs to be flushed.\n*/\nSQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){\n  int rc;\n  SEH_TRY {\n    rc = walBeginReadTransaction(pWal, pChanged);\n  }\n  SEH_EXCEPT( rc = walHandleException(pWal); )\n  return rc;\n}\n\n/*\n** Finish with a read transaction.  All this does is release the\n** read-lock.\n*/\nSQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal){\n#ifndef SQLITE_ENABLE_SETLK_TIMEOUT\n  assert( pWal->writeLock==0 || pWal->readLock<0 );\n#endif\n  if( pWal->readLock>=0 ){\n    (void)sqlite3WalEndWriteTransaction(pWal);\n    walUnlockShared(pWal, WAL_READ_LOCK(pWal->readLock));\n    pWal->readLock = -1;\n  }\n}\n\n/*\n** Search the wal file for page pgno. If found, set *piRead to the frame that\n** contains the page. Otherwise, if pgno is not in the wal file, set *piRead\n** to zero.\n**\n** Return SQLITE_OK if successful, or an error code if an error occurs. If an\n** error does occur, the final value of *piRead is undefined.\n*/\nstatic int walFindFrame(\n  Wal *pWal,                      /* WAL handle */\n  Pgno pgno,                      /* Database page number to read data for */\n  u32 *piRead                     /* OUT: Frame number (or zero) */\n){\n  u32 iRead = 0;                  /* If !=0, WAL frame to return data from */\n  u32 iLast = pWal->hdr.mxFrame;  /* Last page in WAL for this reader */\n  int iHash;                      /* Used to loop through N hash tables */\n  int iMinHash;\n\n  /* This routine is only be called from within a read transaction. */\n  assert( pWal->readLock>=0 || pWal->lockError );\n\n  /* If the \"last page\" field of the wal-index header snapshot is 0, then\n  ** no data will be read from the wal under any circumstances. Return early\n  ** in this case as an optimization.  Likewise, if pWal->readLock==0,\n  ** then the WAL is ignored by the reader so return early, as if the\n  ** WAL were empty.\n  */\n  if( iLast==0 || (pWal->readLock==0 && pWal->bShmUnreliable==0) ){\n    *piRead = 0;\n    return SQLITE_OK;\n  }\n\n  /* Search the hash table or tables for an entry matching page number\n  ** pgno. Each iteration of the following for() loop searches one\n  ** hash table (each hash table indexes up to HASHTABLE_NPAGE frames).\n  **\n  ** This code might run concurrently to the code in walIndexAppend()\n  ** that adds entries to the wal-index (and possibly to this hash\n  ** table). This means the value just read from the hash\n  ** slot (aHash[iKey]) may have been added before or after the\n  ** current read transaction was opened. Values added after the\n  ** read transaction was opened may have been written incorrectly -\n  ** i.e. these slots may contain garbage data. However, we assume\n  ** that any slots written before the current read transaction was\n  ** opened remain unmodified.\n  **\n  ** For the reasons above, the if(...) condition featured in the inner\n  ** loop of the following block is more stringent that would be required\n  ** if we had exclusive access to the hash-table:\n  **\n  **   (aPgno[iFrame]==pgno):\n  **     This condition filters out normal hash-table collisions.\n  **\n  **   (iFrame<=iLast):\n  **     This condition filters out entries that were added to the hash\n  **     table after the current read-transaction had started.\n  */\n  iMinHash = walFramePage(pWal->minFrame);\n  for(iHash=walFramePage(iLast); iHash>=iMinHash; iHash--){\n    WalHashLoc sLoc;              /* Hash table location */\n    int iKey;                     /* Hash slot index */\n    int nCollide;                 /* Number of hash collisions remaining */\n    int rc;                       /* Error code */\n    u32 iH;\n\n    rc = walHashGet(pWal, iHash, &sLoc);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    nCollide = HASHTABLE_NSLOT;\n    iKey = walHash(pgno);\n    SEH_INJECT_FAULT;\n    while( (iH = AtomicLoad(&sLoc.aHash[iKey]))!=0 ){\n      u32 iFrame = iH + sLoc.iZero;\n      if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH-1]==pgno ){\n        assert( iFrame>iRead || CORRUPT_DB );\n        iRead = iFrame;\n      }\n      if( (nCollide--)==0 ){\n        *piRead = 0;\n        return SQLITE_CORRUPT_BKPT;\n      }\n      iKey = walNextHash(iKey);\n    }\n    if( iRead ) break;\n  }\n\n#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT\n  /* If expensive assert() statements are available, do a linear search\n  ** of the wal-index file content. Make sure the results agree with the\n  ** result obtained using the hash indexes above.  */\n  {\n    u32 iRead2 = 0;\n    u32 iTest;\n    assert( pWal->bShmUnreliable || pWal->minFrame>0 );\n    for(iTest=iLast; iTest>=pWal->minFrame && iTest>0; iTest--){\n      if( walFramePgno(pWal, iTest)==pgno ){\n        iRead2 = iTest;\n        break;\n      }\n    }\n    assert( iRead==iRead2 );\n  }\n#endif\n\n  *piRead = iRead;\n  return SQLITE_OK;\n}\n\n/*\n** Search the wal file for page pgno. If found, set *piRead to the frame that\n** contains the page. Otherwise, if pgno is not in the wal file, set *piRead\n** to zero.\n**\n** Return SQLITE_OK if successful, or an error code if an error occurs. If an\n** error does occur, the final value of *piRead is undefined.\n**\n** The difference between this function and walFindFrame() is that this\n** function wraps walFindFrame() in an SEH_TRY{...} block.\n*/\nSQLITE_PRIVATE int sqlite3WalFindFrame(\n  Wal *pWal,                      /* WAL handle */\n  Pgno pgno,                      /* Database page number to read data for */\n  u32 *piRead                     /* OUT: Frame number (or zero) */\n){\n  int rc;\n  SEH_TRY {\n    rc = walFindFrame(pWal, pgno, piRead);\n  }\n  SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )\n  return rc;\n}\n\n/*\n** Read the contents of frame iRead from the wal file into buffer pOut\n** (which is nOut bytes in size). Return SQLITE_OK if successful, or an\n** error code otherwise.\n*/\nSQLITE_PRIVATE int sqlite3WalReadFrame(\n  Wal *pWal,                      /* WAL handle */\n  u32 iRead,                      /* Frame to read */\n  int nOut,                       /* Size of buffer pOut in bytes */\n  u8 *pOut                        /* Buffer to write page data to */\n){\n  int sz;\n  i64 iOffset;\n  sz = pWal->hdr.szPage;\n  sz = (sz&0xfe00) + ((sz&0x0001)<<16);\n  testcase( sz<=32768 );\n  testcase( sz>=65536 );\n  iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;\n  /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */\n  return sqlite3OsRead(pWal->pWalFd, pOut, (nOut>sz ? sz : nOut), iOffset);\n}\n\n/*\n** Return the size of the database in pages (or zero, if unknown).\n*/\nSQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal){\n  if( pWal && ALWAYS(pWal->readLock>=0) ){\n    return pWal->hdr.nPage;\n  }\n  return 0;\n}\n\n\n/*\n** This function starts a write transaction on the WAL.\n**\n** A read transaction must have already been started by a prior call\n** to sqlite3WalBeginReadTransaction().\n**\n** If another thread or process has written into the database since\n** the read transaction was started, then it is not possible for this\n** thread to write as doing so would cause a fork.  So this routine\n** returns SQLITE_BUSY in that case and no write transaction is started.\n**\n** There can only be a single writer active at a time.\n*/\nSQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal){\n  int rc;\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  /* If the write-lock is already held, then it was obtained before the\n  ** read-transaction was even opened, making this call a no-op.\n  ** Return early. */\n  if( pWal->writeLock ){\n    assert( !memcmp(&pWal->hdr,(void*)pWal->apWiData[0],sizeof(WalIndexHdr)) );\n    return SQLITE_OK;\n  }\n#endif\n\n  /* Cannot start a write transaction without first holding a read\n  ** transaction. */\n  assert( pWal->readLock>=0 );\n  assert( pWal->writeLock==0 && pWal->iReCksum==0 );\n\n  if( pWal->readOnly ){\n    return SQLITE_READONLY;\n  }\n\n  /* Only one writer allowed at a time.  Get the write lock.  Return\n  ** SQLITE_BUSY if unable.\n  */\n  rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);\n  if( rc ){\n    return rc;\n  }\n  pWal->writeLock = 1;\n\n  /* If another connection has written to the database file since the\n  ** time the read transaction on this connection was started, then\n  ** the write is disallowed.\n  */\n  SEH_TRY {\n    if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){\n      rc = SQLITE_BUSY_SNAPSHOT;\n    }\n  }\n  SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )\n\n  if( rc!=SQLITE_OK ){\n    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);\n    pWal->writeLock = 0;\n  }\n  return rc;\n}\n\n/*\n** End a write transaction.  The commit has already been done.  This\n** routine merely releases the lock.\n*/\nSQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal){\n  if( pWal->writeLock ){\n    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);\n    pWal->writeLock = 0;\n    pWal->iReCksum = 0;\n    pWal->truncateOnCommit = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** If any data has been written (but not committed) to the log file, this\n** function moves the write-pointer back to the start of the transaction.\n**\n** Additionally, the callback function is invoked for each frame written\n** to the WAL since the start of the transaction. If the callback returns\n** other than SQLITE_OK, it is not invoked again and the error code is\n** returned to the caller.\n**\n** Otherwise, if the callback function does not return an error, this\n** function returns SQLITE_OK.\n*/\nSQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){\n  int rc = SQLITE_OK;\n  if( ALWAYS(pWal->writeLock) ){\n    Pgno iMax = pWal->hdr.mxFrame;\n    Pgno iFrame;\n\n    SEH_TRY {\n      /* Restore the clients cache of the wal-index header to the state it\n      ** was in before the client began writing to the database.\n      */\n      memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr));\n\n      for(iFrame=pWal->hdr.mxFrame+1;\n          ALWAYS(rc==SQLITE_OK) && iFrame<=iMax;\n          iFrame++\n      ){\n        /* This call cannot fail. Unless the page for which the page number\n        ** is passed as the second argument is (a) in the cache and\n        ** (b) has an outstanding reference, then xUndo is either a no-op\n        ** (if (a) is false) or simply expels the page from the cache (if (b)\n        ** is false).\n        **\n        ** If the upper layer is doing a rollback, it is guaranteed that there\n        ** are no outstanding references to any page other than page 1. And\n        ** page 1 is never written to the log until the transaction is\n        ** committed. As a result, the call to xUndo may not fail.\n        */\n        assert( walFramePgno(pWal, iFrame)!=1 );\n        rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));\n      }\n      if( iMax!=pWal->hdr.mxFrame ) walCleanupHash(pWal);\n    }\n    SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )\n    pWal->iReCksum = 0;\n  }\n  return rc;\n}\n\n/*\n** Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32\n** values. This function populates the array with values required to\n** \"rollback\" the write position of the WAL handle back to the current\n** point in the event of a savepoint rollback (via WalSavepointUndo()).\n*/\nSQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){\n  assert( pWal->writeLock );\n  aWalData[0] = pWal->hdr.mxFrame;\n  aWalData[1] = pWal->hdr.aFrameCksum[0];\n  aWalData[2] = pWal->hdr.aFrameCksum[1];\n  aWalData[3] = pWal->nCkpt;\n}\n\n/*\n** Move the write position of the WAL back to the point identified by\n** the values in the aWalData[] array. aWalData must point to an array\n** of WAL_SAVEPOINT_NDATA u32 values that has been previously populated\n** by a call to WalSavepoint().\n*/\nSQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){\n  int rc = SQLITE_OK;\n\n  assert( pWal->writeLock );\n  assert( aWalData[3]!=pWal->nCkpt || aWalData[0]<=pWal->hdr.mxFrame );\n\n  if( aWalData[3]!=pWal->nCkpt ){\n    /* This savepoint was opened immediately after the write-transaction\n    ** was started. Right after that, the writer decided to wrap around\n    ** to the start of the log. Update the savepoint values to match.\n    */\n    aWalData[0] = 0;\n    aWalData[3] = pWal->nCkpt;\n  }\n\n  if( aWalData[0]<pWal->hdr.mxFrame ){\n    pWal->hdr.mxFrame = aWalData[0];\n    pWal->hdr.aFrameCksum[0] = aWalData[1];\n    pWal->hdr.aFrameCksum[1] = aWalData[2];\n    SEH_TRY {\n      walCleanupHash(pWal);\n    }\n    SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )\n    if( pWal->iReCksum>pWal->hdr.mxFrame ){\n      pWal->iReCksum = 0;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is called just before writing a set of frames to the log\n** file (see sqlite3WalFrames()). It checks to see if, instead of appending\n** to the current log file, it is possible to overwrite the start of the\n** existing log file with the new frames (i.e. \"reset\" the log). If so,\n** it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left\n** unchanged.\n**\n** SQLITE_OK is returned if no error is encountered (regardless of whether\n** or not pWal->hdr.mxFrame is modified). An SQLite error code is returned\n** if an error occurs.\n*/\nstatic int walRestartLog(Wal *pWal){\n  int rc = SQLITE_OK;\n  int cnt;\n\n  if( pWal->readLock==0 ){\n    volatile WalCkptInfo *pInfo = walCkptInfo(pWal);\n    assert( pInfo->nBackfill==pWal->hdr.mxFrame );\n    if( pInfo->nBackfill>0 ){\n      u32 salt1;\n      sqlite3_randomness(4, &salt1);\n      rc = walLockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);\n      if( rc==SQLITE_OK ){\n        /* If all readers are using WAL_READ_LOCK(0) (in other words if no\n        ** readers are currently using the WAL), then the transactions\n        ** frames will overwrite the start of the existing log. Update the\n        ** wal-index header to reflect this.\n        **\n        ** In theory it would be Ok to update the cache of the header only\n        ** at this point. But updating the actual wal-index header is also\n        ** safe and means there is no special case for sqlite3WalUndo()\n        ** to handle if this transaction is rolled back.  */\n        walRestartHdr(pWal, salt1);\n        walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);\n      }else if( rc!=SQLITE_BUSY ){\n        return rc;\n      }\n    }\n    walUnlockShared(pWal, WAL_READ_LOCK(0));\n    pWal->readLock = -1;\n    cnt = 0;\n    do{\n      int notUsed;\n      rc = walTryBeginRead(pWal, &notUsed, 1, &cnt);\n    }while( rc==WAL_RETRY );\n    assert( (rc&0xff)!=SQLITE_BUSY ); /* BUSY not possible when useWal==1 */\n    testcase( (rc&0xff)==SQLITE_IOERR );\n    testcase( rc==SQLITE_PROTOCOL );\n    testcase( rc==SQLITE_OK );\n  }\n  return rc;\n}\n\n/*\n** Information about the current state of the WAL file and where\n** the next fsync should occur - passed from sqlite3WalFrames() into\n** walWriteToLog().\n*/\ntypedef struct WalWriter {\n  Wal *pWal;                   /* The complete WAL information */\n  sqlite3_file *pFd;           /* The WAL file to which we write */\n  sqlite3_int64 iSyncPoint;    /* Fsync at this offset */\n  int syncFlags;               /* Flags for the fsync */\n  int szPage;                  /* Size of one page */\n} WalWriter;\n\n/*\n** Write iAmt bytes of content into the WAL file beginning at iOffset.\n** Do a sync when crossing the p->iSyncPoint boundary.\n**\n** In other words, if iSyncPoint is in between iOffset and iOffset+iAmt,\n** first write the part before iSyncPoint, then sync, then write the\n** rest.\n*/\nstatic int walWriteToLog(\n  WalWriter *p,              /* WAL to write to */\n  void *pContent,            /* Content to be written */\n  int iAmt,                  /* Number of bytes to write */\n  sqlite3_int64 iOffset      /* Start writing at this offset */\n){\n  int rc;\n  if( iOffset<p->iSyncPoint && iOffset+iAmt>=p->iSyncPoint ){\n    int iFirstAmt = (int)(p->iSyncPoint - iOffset);\n    rc = sqlite3OsWrite(p->pFd, pContent, iFirstAmt, iOffset);\n    if( rc ) return rc;\n    iOffset += iFirstAmt;\n    iAmt -= iFirstAmt;\n    pContent = (void*)(iFirstAmt + (char*)pContent);\n    assert( WAL_SYNC_FLAGS(p->syncFlags)!=0 );\n    rc = sqlite3OsSync(p->pFd, WAL_SYNC_FLAGS(p->syncFlags));\n    if( iAmt==0 || rc ) return rc;\n  }\n  rc = sqlite3OsWrite(p->pFd, pContent, iAmt, iOffset);\n  return rc;\n}\n\n/*\n** Write out a single frame of the WAL\n*/\nstatic int walWriteOneFrame(\n  WalWriter *p,               /* Where to write the frame */\n  PgHdr *pPage,               /* The page of the frame to be written */\n  int nTruncate,              /* The commit flag.  Usually 0.  >0 for commit */\n  sqlite3_int64 iOffset       /* Byte offset at which to write */\n){\n  int rc;                         /* Result code from subfunctions */\n  void *pData;                    /* Data actually written */\n  u8 aFrame[WAL_FRAME_HDRSIZE];   /* Buffer to assemble frame-header in */\n  pData = pPage->pData;\n  walEncodeFrame(p->pWal, pPage->pgno, nTruncate, pData, aFrame);\n  rc = walWriteToLog(p, aFrame, sizeof(aFrame), iOffset);\n  if( rc ) return rc;\n  /* Write the page data */\n  rc = walWriteToLog(p, pData, p->szPage, iOffset+sizeof(aFrame));\n  return rc;\n}\n\n/*\n** This function is called as part of committing a transaction within which\n** one or more frames have been overwritten. It updates the checksums for\n** all frames written to the wal file by the current transaction starting\n** with the earliest to have been overwritten.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nstatic int walRewriteChecksums(Wal *pWal, u32 iLast){\n  const int szPage = pWal->szPage;/* Database page size */\n  int rc = SQLITE_OK;             /* Return code */\n  u8 *aBuf;                       /* Buffer to load data from wal file into */\n  u8 aFrame[WAL_FRAME_HDRSIZE];   /* Buffer to assemble frame-headers in */\n  u32 iRead;                      /* Next frame to read from wal file */\n  i64 iCksumOff;\n\n  aBuf = sqlite3_malloc(szPage + WAL_FRAME_HDRSIZE);\n  if( aBuf==0 ) return SQLITE_NOMEM_BKPT;\n\n  /* Find the checksum values to use as input for the recalculating the\n  ** first checksum. If the first frame is frame 1 (implying that the current\n  ** transaction restarted the wal file), these values must be read from the\n  ** wal-file header. Otherwise, read them from the frame header of the\n  ** previous frame.  */\n  assert( pWal->iReCksum>0 );\n  if( pWal->iReCksum==1 ){\n    iCksumOff = 24;\n  }else{\n    iCksumOff = walFrameOffset(pWal->iReCksum-1, szPage) + 16;\n  }\n  rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff);\n  pWal->hdr.aFrameCksum[0] = sqlite3Get4byte(aBuf);\n  pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]);\n\n  iRead = pWal->iReCksum;\n  pWal->iReCksum = 0;\n  for(; rc==SQLITE_OK && iRead<=iLast; iRead++){\n    i64 iOff = walFrameOffset(iRead, szPage);\n    rc = sqlite3OsRead(pWal->pWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff);\n    if( rc==SQLITE_OK ){\n      u32 iPgno, nDbSize;\n      iPgno = sqlite3Get4byte(aBuf);\n      nDbSize = sqlite3Get4byte(&aBuf[4]);\n\n      walEncodeFrame(pWal, iPgno, nDbSize, &aBuf[WAL_FRAME_HDRSIZE], aFrame);\n      rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOff);\n    }\n  }\n\n  sqlite3_free(aBuf);\n  return rc;\n}\n\n/*\n** Write a set of frames to the log. The caller must hold the write-lock\n** on the log file (obtained using sqlite3WalBeginWriteTransaction()).\n*/\nstatic int walFrames(\n  Wal *pWal,                      /* Wal handle to write to */\n  int szPage,                     /* Database page-size in bytes */\n  PgHdr *pList,                   /* List of dirty pages to write */\n  Pgno nTruncate,                 /* Database size after this commit */\n  int isCommit,                   /* True if this is a commit */\n  int sync_flags                  /* Flags to pass to OsSync() (or 0) */\n){\n  int rc;                         /* Used to catch return codes */\n  u32 iFrame;                     /* Next frame address */\n  PgHdr *p;                       /* Iterator to run through pList with. */\n  PgHdr *pLast = 0;               /* Last frame in list */\n  int nExtra = 0;                 /* Number of extra copies of last page */\n  int szFrame;                    /* The size of a single frame */\n  i64 iOffset;                    /* Next byte to write in WAL file */\n  WalWriter w;                    /* The writer */\n  u32 iFirst = 0;                 /* First frame that may be overwritten */\n  WalIndexHdr *pLive;             /* Pointer to shared header */\n\n  assert( pList );\n  assert( pWal->writeLock );\n\n  /* If this frame set completes a transaction, then nTruncate>0.  If\n  ** nTruncate==0 then this frame set does not complete the transaction. */\n  assert( (isCommit!=0)==(nTruncate!=0) );\n\n#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)\n  { int cnt; for(cnt=0, p=pList; p; p=p->pDirty, cnt++){}\n    WALTRACE((\"WAL%p: frame write begin. %d frames. mxFrame=%d. %s\\n\",\n              pWal, cnt, pWal->hdr.mxFrame, isCommit ? \"Commit\" : \"Spill\"));\n  }\n#endif\n\n  pLive = (WalIndexHdr*)walIndexHdr(pWal);\n  if( memcmp(&pWal->hdr, (void *)pLive, sizeof(WalIndexHdr))!=0 ){\n    iFirst = pLive->mxFrame+1;\n  }\n\n  /* See if it is possible to write these frames into the start of the\n  ** log file, instead of appending to it at pWal->hdr.mxFrame.\n  */\n  if( SQLITE_OK!=(rc = walRestartLog(pWal)) ){\n    return rc;\n  }\n\n  /* If this is the first frame written into the log, write the WAL\n  ** header to the start of the WAL file. See comments at the top of\n  ** this source file for a description of the WAL header format.\n  */\n  iFrame = pWal->hdr.mxFrame;\n  if( iFrame==0 ){\n    u8 aWalHdr[WAL_HDRSIZE];      /* Buffer to assemble wal-header in */\n    u32 aCksum[2];                /* Checksum for wal-header */\n\n    sqlite3Put4byte(&aWalHdr[0], (WAL_MAGIC | SQLITE_BIGENDIAN));\n    sqlite3Put4byte(&aWalHdr[4], WAL_MAX_VERSION);\n    sqlite3Put4byte(&aWalHdr[8], szPage);\n    sqlite3Put4byte(&aWalHdr[12], pWal->nCkpt);\n    if( pWal->nCkpt==0 ) sqlite3_randomness(8, pWal->hdr.aSalt);\n    memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);\n    walChecksumBytes(1, aWalHdr, WAL_HDRSIZE-2*4, 0, aCksum);\n    sqlite3Put4byte(&aWalHdr[24], aCksum[0]);\n    sqlite3Put4byte(&aWalHdr[28], aCksum[1]);\n\n    pWal->szPage = szPage;\n    pWal->hdr.bigEndCksum = SQLITE_BIGENDIAN;\n    pWal->hdr.aFrameCksum[0] = aCksum[0];\n    pWal->hdr.aFrameCksum[1] = aCksum[1];\n    pWal->truncateOnCommit = 1;\n\n    rc = sqlite3OsWrite(pWal->pWalFd, aWalHdr, sizeof(aWalHdr), 0);\n    WALTRACE((\"WAL%p: wal-header write %s\\n\", pWal, rc ? \"failed\" : \"ok\"));\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n\n    /* Sync the header (unless SQLITE_IOCAP_SEQUENTIAL is true or unless\n    ** all syncing is turned off by PRAGMA synchronous=OFF).  Otherwise\n    ** an out-of-order write following a WAL restart could result in\n    ** database corruption.  See the ticket:\n    **\n    **     https://sqlite.org/src/info/ff5be73dee\n    */\n    if( pWal->syncHeader ){\n      rc = sqlite3OsSync(pWal->pWalFd, CKPT_SYNC_FLAGS(sync_flags));\n      if( rc ) return rc;\n    }\n  }\n  if( (int)pWal->szPage!=szPage ){\n    return SQLITE_CORRUPT_BKPT;  /* TH3 test case: cov1/corrupt155.test */\n  }\n\n  /* Setup information needed to write frames into the WAL */\n  w.pWal = pWal;\n  w.pFd = pWal->pWalFd;\n  w.iSyncPoint = 0;\n  w.syncFlags = sync_flags;\n  w.szPage = szPage;\n  iOffset = walFrameOffset(iFrame+1, szPage);\n  szFrame = szPage + WAL_FRAME_HDRSIZE;\n\n  /* Write all frames into the log file exactly once */\n  for(p=pList; p; p=p->pDirty){\n    int nDbSize;   /* 0 normally.  Positive == commit flag */\n\n    /* Check if this page has already been written into the wal file by\n    ** the current transaction. If so, overwrite the existing frame and\n    ** set Wal.writeLock to WAL_WRITELOCK_RECKSUM - indicating that\n    ** checksums must be recomputed when the transaction is committed.  */\n    if( iFirst && (p->pDirty || isCommit==0) ){\n      u32 iWrite = 0;\n      VVA_ONLY(rc =) walFindFrame(pWal, p->pgno, &iWrite);\n      assert( rc==SQLITE_OK || iWrite==0 );\n      if( iWrite>=iFirst ){\n        i64 iOff = walFrameOffset(iWrite, szPage) + WAL_FRAME_HDRSIZE;\n        void *pData;\n        if( pWal->iReCksum==0 || iWrite<pWal->iReCksum ){\n          pWal->iReCksum = iWrite;\n        }\n        pData = p->pData;\n        rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOff);\n        if( rc ) return rc;\n        p->flags &= ~PGHDR_WAL_APPEND;\n        continue;\n      }\n    }\n\n    iFrame++;\n    assert( iOffset==walFrameOffset(iFrame, szPage) );\n    nDbSize = (isCommit && p->pDirty==0) ? nTruncate : 0;\n    rc = walWriteOneFrame(&w, p, nDbSize, iOffset);\n    if( rc ) return rc;\n    pLast = p;\n    iOffset += szFrame;\n    p->flags |= PGHDR_WAL_APPEND;\n  }\n\n  /* Recalculate checksums within the wal file if required. */\n  if( isCommit && pWal->iReCksum ){\n    rc = walRewriteChecksums(pWal, iFrame);\n    if( rc ) return rc;\n  }\n\n  /* If this is the end of a transaction, then we might need to pad\n  ** the transaction and/or sync the WAL file.\n  **\n  ** Padding and syncing only occur if this set of frames complete a\n  ** transaction and if PRAGMA synchronous=FULL.  If synchronous==NORMAL\n  ** or synchronous==OFF, then no padding or syncing are needed.\n  **\n  ** If SQLITE_IOCAP_POWERSAFE_OVERWRITE is defined, then padding is not\n  ** needed and only the sync is done.  If padding is needed, then the\n  ** final frame is repeated (with its commit mark) until the next sector\n  ** boundary is crossed.  Only the part of the WAL prior to the last\n  ** sector boundary is synced; the part of the last frame that extends\n  ** past the sector boundary is written after the sync.\n  */\n  if( isCommit && WAL_SYNC_FLAGS(sync_flags)!=0 ){\n    int bSync = 1;\n    if( pWal->padToSectorBoundary ){\n      int sectorSize = sqlite3SectorSize(pWal->pWalFd);\n      w.iSyncPoint = ((iOffset+sectorSize-1)/sectorSize)*sectorSize;\n      bSync = (w.iSyncPoint==iOffset);\n      testcase( bSync );\n      while( iOffset<w.iSyncPoint ){\n        rc = walWriteOneFrame(&w, pLast, nTruncate, iOffset);\n        if( rc ) return rc;\n        iOffset += szFrame;\n        nExtra++;\n        assert( pLast!=0 );\n      }\n    }\n    if( bSync ){\n      assert( rc==SQLITE_OK );\n      rc = sqlite3OsSync(w.pFd, WAL_SYNC_FLAGS(sync_flags));\n    }\n  }\n\n  /* If this frame set completes the first transaction in the WAL and\n  ** if PRAGMA journal_size_limit is set, then truncate the WAL to the\n  ** journal size limit, if possible.\n  */\n  if( isCommit && pWal->truncateOnCommit && pWal->mxWalSize>=0 ){\n    i64 sz = pWal->mxWalSize;\n    if( walFrameOffset(iFrame+nExtra+1, szPage)>pWal->mxWalSize ){\n      sz = walFrameOffset(iFrame+nExtra+1, szPage);\n    }\n    walLimitSize(pWal, sz);\n    pWal->truncateOnCommit = 0;\n  }\n\n  /* Append data to the wal-index. It is not necessary to lock the\n  ** wal-index to do this as the SQLITE_SHM_WRITE lock held on the wal-index\n  ** guarantees that there are no other writers, and no data that may\n  ** be in use by existing readers is being overwritten.\n  */\n  iFrame = pWal->hdr.mxFrame;\n  for(p=pList; p && rc==SQLITE_OK; p=p->pDirty){\n    if( (p->flags & PGHDR_WAL_APPEND)==0 ) continue;\n    iFrame++;\n    rc = walIndexAppend(pWal, iFrame, p->pgno);\n  }\n  assert( pLast!=0 || nExtra==0 );\n  while( rc==SQLITE_OK && nExtra>0 ){\n    iFrame++;\n    nExtra--;\n    rc = walIndexAppend(pWal, iFrame, pLast->pgno);\n  }\n\n  if( rc==SQLITE_OK ){\n    /* Update the private copy of the header. */\n    pWal->hdr.szPage = (u16)((szPage&0xff00) | (szPage>>16));\n    testcase( szPage<=32768 );\n    testcase( szPage>=65536 );\n    pWal->hdr.mxFrame = iFrame;\n    if( isCommit ){\n      pWal->hdr.iChange++;\n      pWal->hdr.nPage = nTruncate;\n    }\n    /* If this is a commit, update the wal-index header too. */\n    if( isCommit ){\n      walIndexWriteHdr(pWal);\n      pWal->iCallback = iFrame;\n    }\n  }\n\n  WALTRACE((\"WAL%p: frame write %s\\n\", pWal, rc ? \"failed\" : \"ok\"));\n  return rc;\n}\n\n/*\n** Write a set of frames to the log. The caller must hold the write-lock\n** on the log file (obtained using sqlite3WalBeginWriteTransaction()).\n**\n** The difference between this function and walFrames() is that this\n** function wraps walFrames() in an SEH_TRY{...} block.\n*/\nSQLITE_PRIVATE int sqlite3WalFrames(\n  Wal *pWal,                      /* Wal handle to write to */\n  int szPage,                     /* Database page-size in bytes */\n  PgHdr *pList,                   /* List of dirty pages to write */\n  Pgno nTruncate,                 /* Database size after this commit */\n  int isCommit,                   /* True if this is a commit */\n  int sync_flags                  /* Flags to pass to OsSync() (or 0) */\n){\n  int rc;\n  SEH_TRY {\n    rc = walFrames(pWal, szPage, pList, nTruncate, isCommit, sync_flags);\n  }\n  SEH_EXCEPT( rc = walHandleException(pWal); )\n  return rc;\n}\n\n/*\n** This routine is called to implement sqlite3_wal_checkpoint() and\n** related interfaces.\n**\n** Obtain a CHECKPOINT lock and then backfill as much information as\n** we can from WAL into the database.\n**\n** If parameter xBusy is not NULL, it is a pointer to a busy-handler\n** callback. In this case this function runs a blocking checkpoint.\n*/\nSQLITE_PRIVATE int sqlite3WalCheckpoint(\n  Wal *pWal,                      /* Wal connection */\n  sqlite3 *db,                    /* Check this handle's interrupt flag */\n  int eMode,                      /* PASSIVE, FULL, RESTART, or TRUNCATE */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int sync_flags,                 /* Flags to sync db file with (or 0) */\n  int nBuf,                       /* Size of temporary buffer */\n  u8 *zBuf,                       /* Temporary buffer to use */\n  int *pnLog,                     /* OUT: Number of frames in WAL */\n  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */\n){\n  int rc;                         /* Return code */\n  int isChanged = 0;              /* True if a new wal-index header is loaded */\n  int eMode2 = eMode;             /* Mode to pass to walCheckpoint() */\n  int (*xBusy2)(void*) = xBusy;   /* Busy handler for eMode2 */\n\n  assert( pWal->ckptLock==0 );\n  assert( pWal->writeLock==0 );\n\n  /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked\n  ** in the SQLITE_CHECKPOINT_PASSIVE mode. */\n  assert( SQLITE_CHECKPOINT_NOOP<SQLITE_CHECKPOINT_PASSIVE );\n  assert( eMode>SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );\n\n  if( pWal->readOnly ) return SQLITE_READONLY;\n  WALTRACE((\"WAL%p: checkpoint begins\\n\", pWal));\n\n  /* Enable blocking locks, if possible. */\n  sqlite3WalDb(pWal, db);\n  if( xBusy2 ) (void)walEnableBlocking(pWal);\n\n  /* IMPLEMENTATION-OF: R-62028-47212 All calls obtain an exclusive\n  ** \"checkpoint\" lock on the database file.\n  ** EVIDENCE-OF: R-10421-19736 If any other process is running a\n  ** checkpoint operation at the same time, the lock cannot be obtained and\n  ** SQLITE_BUSY is returned.\n  ** EVIDENCE-OF: R-53820-33897 Even if there is a busy-handler configured,\n  ** it will not be invoked in this case.\n  */\n  if( eMode!=SQLITE_CHECKPOINT_NOOP ){\n    rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);\n    testcase( rc==SQLITE_BUSY );\n    testcase( rc!=SQLITE_OK && xBusy2!=0 );\n    if( rc==SQLITE_OK ){\n      pWal->ckptLock = 1;\n\n      /* IMPLEMENTATION-OF: R-59782-36818 The SQLITE_CHECKPOINT_FULL, RESTART\n      ** and TRUNCATE modes also obtain the exclusive \"writer\" lock on the\n      ** database file.\n      **\n      ** EVIDENCE-OF: R-60642-04082 If the writer lock cannot be obtained\n      ** immediately, and a busy-handler is configured, it is invoked and the\n      ** writer lock retried until either the busy-handler returns 0 or the\n      ** lock is successfully obtained.\n      */\n      if( eMode!=SQLITE_CHECKPOINT_PASSIVE ){\n        rc = walBusyLock(pWal, xBusy2, pBusyArg, WAL_WRITE_LOCK, 1);\n        if( rc==SQLITE_OK ){\n          pWal->writeLock = 1;\n        }else if( rc==SQLITE_BUSY ){\n          eMode2 = SQLITE_CHECKPOINT_PASSIVE;\n          xBusy2 = 0;\n          rc = SQLITE_OK;\n        }\n      }\n    }\n  }else{\n    rc = SQLITE_OK;\n  }\n\n\n  /* Read the wal-index header. */\n  SEH_TRY {\n    if( rc==SQLITE_OK ){\n      /* For a passive checkpoint, do not re-enable blocking locks after\n      ** reading the wal-index header. A passive checkpoint should not block\n      ** or invoke the busy handler. The only lock such a checkpoint may\n      ** attempt to obtain is a lock on a read-slot, and it should give up\n      ** immediately and do a partial checkpoint if it cannot obtain it. */\n      walDisableBlocking(pWal);\n      rc = walIndexReadHdr(pWal, &isChanged);\n      if( eMode2>SQLITE_CHECKPOINT_PASSIVE ) (void)walEnableBlocking(pWal);\n      if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){\n        sqlite3OsUnfetch(pWal->pDbFd, 0, 0);\n      }\n    }\n\n    /* Copy data from the log to the database file. */\n    if( rc==SQLITE_OK ){\n      if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){\n        rc = SQLITE_CORRUPT_BKPT;\n      }else if( eMode2!=SQLITE_CHECKPOINT_NOOP ){\n        rc = walCheckpoint(pWal, db, eMode2, xBusy2, pBusyArg, sync_flags,zBuf);\n      }\n\n      /* If no error occurred, set the output variables. */\n      if( rc==SQLITE_OK || rc==SQLITE_BUSY ){\n        if( pnLog ) *pnLog = (int)pWal->hdr.mxFrame;\n        SEH_INJECT_FAULT;\n        if( pnCkpt ) *pnCkpt = (int)(walCkptInfo(pWal)->nBackfill);\n      }\n    }\n  }\n  SEH_EXCEPT( rc = walHandleException(pWal); )\n\n  if( isChanged ){\n    /* If a new wal-index header was loaded before the checkpoint was\n    ** performed, then the pager-cache associated with pWal is now\n    ** out of date. So zero the cached wal-index header to ensure that\n    ** next time the pager opens a snapshot on this database it knows that\n    ** the cache needs to be reset.\n    */\n    memset(&pWal->hdr, 0, sizeof(WalIndexHdr));\n  }\n\n  walDisableBlocking(pWal);\n  sqlite3WalDb(pWal, 0);\n\n  /* Release the locks. */\n  (void)sqlite3WalEndWriteTransaction(pWal);\n  if( pWal->ckptLock ){\n    walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);\n    pWal->ckptLock = 0;\n  }\n  WALTRACE((\"WAL%p: checkpoint %s\\n\", pWal, rc ? \"failed\" : \"ok\"));\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  if( rc==SQLITE_BUSY_TIMEOUT ) rc = SQLITE_BUSY;\n#endif\n  return (rc==SQLITE_OK && eMode!=eMode2 ? SQLITE_BUSY : rc);\n}\n\n/* Return the value to pass to a sqlite3_wal_hook callback, the\n** number of frames in the WAL at the point of the last commit since\n** sqlite3WalCallback() was called.  If no commits have occurred since\n** the last call, then return 0.\n*/\nSQLITE_PRIVATE int sqlite3WalCallback(Wal *pWal){\n  u32 ret = 0;\n  if( pWal ){\n    ret = pWal->iCallback;\n    pWal->iCallback = 0;\n  }\n  return (int)ret;\n}\n\n/*\n** This function is called to change the WAL subsystem into or out\n** of locking_mode=EXCLUSIVE.\n**\n** If op is zero, then attempt to change from locking_mode=EXCLUSIVE\n** into locking_mode=NORMAL.  This means that we must acquire a lock\n** on the pWal->readLock byte.  If the WAL is already in locking_mode=NORMAL\n** or if the acquisition of the lock fails, then return 0.  If the\n** transition out of exclusive-mode is successful, return 1.  This\n** operation must occur while the pager is still holding the exclusive\n** lock on the main database file.\n**\n** If op is one, then change from locking_mode=NORMAL into\n** locking_mode=EXCLUSIVE.  This means that the pWal->readLock must\n** be released.  Return 1 if the transition is made and 0 if the\n** WAL is already in exclusive-locking mode - meaning that this\n** routine is a no-op.  The pager must already hold the exclusive lock\n** on the main database file before invoking this operation.\n**\n** If op is negative, then do a dry-run of the op==1 case but do\n** not actually change anything. The pager uses this to see if it\n** should acquire the database exclusive lock prior to invoking\n** the op==1 case.\n*/\nSQLITE_PRIVATE int sqlite3WalExclusiveMode(Wal *pWal, int op){\n  int rc;\n  assert( pWal->writeLock==0 );\n  assert( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE || op==-1 );\n\n  /* pWal->readLock is usually set, but might be -1 if there was a\n  ** prior error while attempting to acquire are read-lock. This cannot\n  ** happen if the connection is actually in exclusive mode (as no xShmLock\n  ** locks are taken in this case). Nor should the pager attempt to\n  ** upgrade to exclusive-mode following such an error.\n  */\n#ifndef SQLITE_USE_SEH\n  assert( pWal->readLock>=0 || pWal->lockError );\n#endif\n  assert( pWal->readLock>=0 || (op<=0 && pWal->exclusiveMode==0) );\n\n  if( op==0 ){\n    if( pWal->exclusiveMode!=WAL_NORMAL_MODE ){\n      pWal->exclusiveMode = WAL_NORMAL_MODE;\n      if( walLockShared(pWal, WAL_READ_LOCK(pWal->readLock))!=SQLITE_OK ){\n        pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;\n      }\n      rc = pWal->exclusiveMode==WAL_NORMAL_MODE;\n    }else{\n      /* Already in locking_mode=NORMAL */\n      rc = 0;\n    }\n  }else if( op>0 ){\n    assert( pWal->exclusiveMode==WAL_NORMAL_MODE );\n    assert( pWal->readLock>=0 );\n    walUnlockShared(pWal, WAL_READ_LOCK(pWal->readLock));\n    pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;\n    rc = 1;\n  }else{\n    rc = pWal->exclusiveMode==WAL_NORMAL_MODE;\n  }\n  return rc;\n}\n\n/*\n** Return true if the argument is non-NULL and the WAL module is using\n** heap-memory for the wal-index. Otherwise, if the argument is NULL or the\n** WAL module is using shared-memory, return false.\n*/\nSQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal){\n  return (pWal && pWal->exclusiveMode==WAL_HEAPMEMORY_MODE );\n}\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n/* Create a snapshot object.  The content of a snapshot is opaque to\n** every other subsystem, so the WAL module can put whatever it needs\n** in the object.\n*/\nSQLITE_PRIVATE int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot){\n  int rc = SQLITE_OK;\n  WalIndexHdr *pRet;\n  static const u32 aZero[4] = { 0, 0, 0, 0 };\n\n  assert( pWal->readLock>=0 && pWal->writeLock==0 );\n\n  if( memcmp(&pWal->hdr.aFrameCksum[0],aZero,16)==0 ){\n    *ppSnapshot = 0;\n    return SQLITE_ERROR;\n  }\n  pRet = (WalIndexHdr*)sqlite3_malloc(sizeof(WalIndexHdr));\n  if( pRet==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n  }else{\n    memcpy(pRet, &pWal->hdr, sizeof(WalIndexHdr));\n    *ppSnapshot = (sqlite3_snapshot*)pRet;\n  }\n\n  return rc;\n}\n\n/* Try to open on pSnapshot when the next read-transaction starts\n*/\nSQLITE_PRIVATE void sqlite3WalSnapshotOpen(\n  Wal *pWal,\n  sqlite3_snapshot *pSnapshot\n){\n  if( pSnapshot && ((WalIndexHdr*)pSnapshot)->iVersion==0 ){\n    /* iVersion==0 means that this is a call to sqlite3_snapshot_get().  In\n    ** this case set the bGetSnapshot flag so that if the call to\n    ** sqlite3_snapshot_get() is about to read transaction on this wal\n    ** file, it does not take read-lock 0 if the wal file has been completely\n    ** checkpointed. Taking read-lock 0 would work, but then it would be\n    ** possible for a subsequent writer to destroy the snapshot even while\n    ** this connection is holding its read-transaction open. This is contrary\n    ** to user expectations, so we avoid it by not taking read-lock 0. */\n    pWal->bGetSnapshot = 1;\n  }else{\n    pWal->pSnapshot = (WalIndexHdr*)pSnapshot;\n    pWal->bGetSnapshot = 0;\n  }\n}\n\n/*\n** Return a +ve value if snapshot p1 is newer than p2. A -ve value if\n** p1 is older than p2 and zero if p1 and p2 are the same snapshot.\n*/\nSQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){\n  WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;\n  WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;\n\n  /* aSalt[0] is a copy of the value stored in the wal file header. It\n  ** is incremented each time the wal file is restarted.  */\n  if( pHdr1->aSalt[0]<pHdr2->aSalt[0] ) return -1;\n  if( pHdr1->aSalt[0]>pHdr2->aSalt[0] ) return +1;\n  if( pHdr1->mxFrame<pHdr2->mxFrame ) return -1;\n  if( pHdr1->mxFrame>pHdr2->mxFrame ) return +1;\n  return 0;\n}\n\n/*\n** The caller currently has a read transaction open on the database.\n** This function takes a SHARED lock on the CHECKPOINTER slot and then\n** checks if the snapshot passed as the second argument is still\n** available. If so, SQLITE_OK is returned.\n**\n** If the snapshot is not available, SQLITE_ERROR is returned. Or, if\n** the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error\n** occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER\n** lock is released before returning.\n*/\nSQLITE_PRIVATE int sqlite3WalSnapshotCheck(Wal *pWal, sqlite3_snapshot *pSnapshot){\n  int rc;\n  SEH_TRY {\n    rc = walLockShared(pWal, WAL_CKPT_LOCK);\n    if( rc==SQLITE_OK ){\n      WalIndexHdr *pNew = (WalIndexHdr*)pSnapshot;\n      if( memcmp(pNew->aSalt, pWal->hdr.aSalt, sizeof(pWal->hdr.aSalt))\n       || pNew->mxFrame<walCkptInfo(pWal)->nBackfillAttempted\n      ){\n        rc = SQLITE_ERROR_SNAPSHOT;\n        walUnlockShared(pWal, WAL_CKPT_LOCK);\n      }\n    }\n  }\n  SEH_EXCEPT( rc = walHandleException(pWal); )\n  return rc;\n}\n\n/*\n** Release a lock obtained by an earlier successful call to\n** sqlite3WalSnapshotCheck().\n*/\nSQLITE_PRIVATE void sqlite3WalSnapshotUnlock(Wal *pWal){\n  assert( pWal );\n  walUnlockShared(pWal, WAL_CKPT_LOCK);\n}\n\n\n#endif /* SQLITE_ENABLE_SNAPSHOT */\n\n#ifdef SQLITE_ENABLE_ZIPVFS\n/*\n** If the argument is not NULL, it points to a Wal object that holds a\n** read-lock. This function returns the database page-size if it is known,\n** or zero if it is not (or if pWal is NULL).\n*/\nSQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal){\n  assert( pWal==0 || pWal->readLock>=0 );\n  return (pWal ? pWal->szPage : 0);\n}\n#endif\n\n/* Return the sqlite3_file object for the WAL file\n*/\nSQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal){\n  return pWal->pWalFd;\n}\n\n#endif /* #ifndef SQLITE_OMIT_WAL */\n\n/************** End of wal.c *************************************************/\n/************** Begin file btmutex.c *****************************************/\n/*\n** 2007 August 27\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code used to implement mutexes on Btree objects.\n** This code really belongs in btree.c.  But btree.c is getting too\n** big and we want to break it down some.  This packaged seemed like\n** a good breakout.\n*/\n/************** Include btreeInt.h in the middle of btmutex.c ****************/\n/************** Begin file btreeInt.h ****************************************/\n/*\n** 2004 April 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file implements an external (disk-based) database using BTrees.\n** For a detailed discussion of BTrees, refer to\n**\n**     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:\n**     \"Sorting And Searching\", pages 473-480. Addison-Wesley\n**     Publishing Company, Reading, Massachusetts.\n**\n** The basic idea is that each page of the file contains N database\n** entries and N+1 pointers to subpages.\n**\n**   ----------------------------------------------------------------\n**   |  Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) |\n**   ----------------------------------------------------------------\n**\n** All of the keys on the page that Ptr(0) points to have values less\n** than Key(0).  All of the keys on page Ptr(1) and its subpages have\n** values greater than Key(0) and less than Key(1).  All of the keys\n** on Ptr(N) and its subpages have values greater than Key(N-1).  And\n** so forth.\n**\n** Finding a particular key requires reading O(log(M)) pages from the\n** disk where M is the number of entries in the tree.\n**\n** In this implementation, a single file can hold one or more separate\n** BTrees.  Each BTree is identified by the index of its root page.  The\n** key and data for any entry are combined to form the \"payload\".  A\n** fixed amount of payload can be carried directly on the database\n** page.  If the payload is larger than the preset amount then surplus\n** bytes are stored on overflow pages.  The payload for an entry\n** and the preceding pointer are combined to form a \"Cell\".  Each\n** page has a small header which contains the Ptr(N) pointer and other\n** information such as the size of key and data.\n**\n** FORMAT DETAILS\n**\n** The file is divided into pages.  The first page is called page 1,\n** the second is page 2, and so forth.  A page number of zero indicates\n** \"no such page\".  The page size can be any power of 2 between 512 and 65536.\n** Each page can be either a btree page, a freelist page, an overflow\n** page, or a pointer-map page.\n**\n** The first page is always a btree page.  The first 100 bytes of the first\n** page contain a special header (the \"file header\") that describes the file.\n** The format of the file header is as follows:\n**\n**   OFFSET   SIZE    DESCRIPTION\n**      0      16     Header string: \"SQLite format 3\\000\"\n**     16       2     Page size in bytes.  (1 means 65536)\n**     18       1     File format write version\n**     19       1     File format read version\n**     20       1     Bytes of unused space at the end of each page\n**     21       1     Max embedded payload fraction (must be 64)\n**     22       1     Min embedded payload fraction (must be 32)\n**     23       1     Min leaf payload fraction (must be 32)\n**     24       4     File change counter\n**     28       4     The size of the database in pages\n**     32       4     First freelist page\n**     36       4     Number of freelist pages in the file\n**     40      60     15 4-byte meta values passed to higher layers\n**\n**     40       4     Schema cookie\n**     44       4     File format of schema layer\n**     48       4     Size of page cache\n**     52       4     Largest root-page (auto/incr_vacuum)\n**     56       4     1=UTF-8 2=UTF16le 3=UTF16be\n**     60       4     User version\n**     64       4     Incremental vacuum mode\n**     68       4     Application-ID\n**     72      20     unused\n**     92       4     The version-valid-for number\n**     96       4     SQLITE_VERSION_NUMBER\n**\n** All of the integer values are big-endian (most significant byte first).\n**\n** The file change counter is incremented when the database is changed\n** This counter allows other processes to know when the file has changed\n** and thus when they need to flush their cache.\n**\n** The max embedded payload fraction is the amount of the total usable\n** space in a page that can be consumed by a single cell for standard\n** B-tree (non-LEAFDATA) tables.  A value of 255 means 100%.  The default\n** is to limit the maximum cell size so that at least 4 cells will fit\n** on one page.  Thus the default max embedded payload fraction is 64.\n**\n** If the payload for a cell is larger than the max payload, then extra\n** payload is spilled to overflow pages.  Once an overflow page is allocated,\n** as many bytes as possible are moved into the overflow pages without letting\n** the cell size drop below the min embedded payload fraction.\n**\n** The min leaf payload fraction is like the min embedded payload fraction\n** except that it applies to leaf nodes in a LEAFDATA tree.  The maximum\n** payload fraction for a LEAFDATA tree is always 100% (or 255) and it\n** not specified in the header.\n**\n** Each btree pages is divided into three sections:  The header, the\n** cell pointer array, and the cell content area.  Page 1 also has a 100-byte\n** file header that occurs before the page header.\n**\n**      |----------------|\n**      | file header    |   100 bytes.  Page 1 only.\n**      |----------------|\n**      | page header    |   8 bytes for leaves.  12 bytes for interior nodes\n**      |----------------|\n**      | cell pointer   |   |  2 bytes per cell.  Sorted order.\n**      | array          |   |  Grows downward\n**      |                |   v\n**      |----------------|\n**      | unallocated    |\n**      | space          |\n**      |----------------|   ^  Grows upwards\n**      | cell content   |   |  Arbitrary order interspersed with freeblocks.\n**      | area           |   |  and free space fragments.\n**      |----------------|\n**\n** The page headers looks like this:\n**\n**   OFFSET   SIZE     DESCRIPTION\n**      0       1      Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf\n**      1       2      byte offset to the first freeblock\n**      3       2      number of cells on this page\n**      5       2      first byte of the cell content area\n**      7       1      number of fragmented free bytes\n**      8       4      Right child (the Ptr(N) value).  Omitted on leaves.\n**\n** The flags define the format of this btree page.  The leaf flag means that\n** this page has no children.  The zerodata flag means that this page carries\n** only keys and no data.  The intkey flag means that the key is an integer\n** which is stored in the key size entry of the cell header rather than in\n** the payload area.\n**\n** The cell pointer array begins on the first byte after the page header.\n** The cell pointer array contains zero or more 2-byte numbers which are\n** offsets from the beginning of the page to the cell content in the cell\n** content area.  The cell pointers occur in sorted order.  The system strives\n** to keep free space after the last cell pointer so that new cells can\n** be easily added without having to defragment the page.\n**\n** Cell content is stored at the very end of the page and grows toward the\n** beginning of the page.\n**\n** Unused space within the cell content area is collected into a linked list of\n** freeblocks.  Each freeblock is at least 4 bytes in size.  The byte offset\n** to the first freeblock is given in the header.  Freeblocks occur in\n** increasing order.  Because a freeblock must be at least 4 bytes in size,\n** any group of 3 or fewer unused bytes in the cell content area cannot\n** exist on the freeblock chain.  A group of 3 or fewer free bytes is called\n** a fragment.  The total number of bytes in all fragments is recorded.\n** in the page header at offset 7.\n**\n**    SIZE    DESCRIPTION\n**      2     Byte offset of the next freeblock\n**      2     Bytes in this freeblock\n**\n** Cells are of variable length.  Cells are stored in the cell content area at\n** the end of the page.  Pointers to the cells are in the cell pointer array\n** that immediately follows the page header.  Cells is not necessarily\n** contiguous or in order, but cell pointers are contiguous and in order.\n**\n** Cell content makes use of variable length integers.  A variable\n** length integer is 1 to 9 bytes where the lower 7 bits of each\n** byte are used.  The integer consists of all bytes that have bit 8 set and\n** the first byte with bit 8 clear.  The most significant byte of the integer\n** appears first.  A variable-length integer may not be more than 9 bytes long.\n** As a special case, all 8 bits of the 9th byte are used as data.  This\n** allows a 64-bit integer to be encoded in 9 bytes.\n**\n**    0x00                      becomes  0x00000000\n**    0x7f                      becomes  0x0000007f\n**    0x81 0x00                 becomes  0x00000080\n**    0x82 0x00                 becomes  0x00000100\n**    0x80 0x7f                 becomes  0x0000007f\n**    0x81 0x91 0xd1 0xac 0x78  becomes  0x12345678\n**    0x81 0x81 0x81 0x81 0x01  becomes  0x10204081\n**\n** Variable length integers are used for rowids and to hold the number of\n** bytes of key and data in a btree cell.\n**\n** The content of a cell looks like this:\n**\n**    SIZE    DESCRIPTION\n**      4     Page number of the left child. Omitted if leaf flag is set.\n**     var    Number of bytes of data. Omitted if the zerodata flag is set.\n**     var    Number of bytes of key. Or the key itself if intkey flag is set.\n**      *     Payload\n**      4     First page of the overflow chain.  Omitted if no overflow\n**\n** Overflow pages form a linked list.  Each page except the last is completely\n** filled with data (pagesize - 4 bytes).  The last page can have as little\n** as 1 byte of data.\n**\n**    SIZE    DESCRIPTION\n**      4     Page number of next overflow page\n**      *     Data\n**\n** Freelist pages come in two subtypes: trunk pages and leaf pages.  The\n** file header points to the first in a linked list of trunk page.  Each trunk\n** page points to multiple leaf pages.  The content of a leaf page is\n** unspecified.  A trunk page looks like this:\n**\n**    SIZE    DESCRIPTION\n**      4     Page number of next trunk page\n**      4     Number of leaf pointers on this page\n**      *     zero or more pages numbers of leaves\n*/\n/* #include \"sqliteInt.h\" */\n\n\n/* The following value is the maximum cell size assuming a maximum page\n** size give above.\n*/\n#define MX_CELL_SIZE(pBt)  ((int)(pBt->pageSize-8))\n\n/* The maximum number of cells on a single page of the database.  This\n** assumes a minimum cell size of 6 bytes  (4 bytes for the cell itself\n** plus 2 bytes for the index to the cell in the page header).  Such\n** small cells will be rare, but they are possible.\n*/\n#define MX_CELL(pBt) ((pBt->pageSize-8)/6)\n\n/* Forward declarations */\ntypedef struct MemPage MemPage;\ntypedef struct BtLock BtLock;\ntypedef struct CellInfo CellInfo;\n\n/*\n** This is a magic string that appears at the beginning of every\n** SQLite database in order to identify the file as a real database.\n**\n** You can change this value at compile-time by specifying a\n** -DSQLITE_FILE_HEADER=\"...\" on the compiler command-line.  The\n** header must be exactly 16 bytes including the zero-terminator so\n** the string itself should be 15 characters long.  If you change\n** the header, then your custom library will not be able to read\n** databases generated by the standard tools and the standard tools\n** will not be able to read databases created by your custom library.\n*/\n#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */\n#  define SQLITE_FILE_HEADER \"SQLite format 3\"\n#endif\n\n/*\n** Page type flags.  An ORed combination of these flags appear as the\n** first byte of on-disk image of every BTree page.\n*/\n#define PTF_INTKEY    0x01\n#define PTF_ZERODATA  0x02\n#define PTF_LEAFDATA  0x04\n#define PTF_LEAF      0x08\n\n/*\n** An instance of this object stores information about each a single database\n** page that has been loaded into memory.  The information in this object\n** is derived from the raw on-disk page content.\n**\n** As each database page is loaded into memory, the pager allocates an\n** instance of this object and zeros the first 8 bytes.  (This is the\n** \"extra\" information associated with each page of the pager.)\n**\n** Access to all fields of this structure is controlled by the mutex\n** stored in MemPage.pBt->mutex.\n*/\nstruct MemPage {\n  u8 isInit;           /* True if previously initialized. MUST BE FIRST! */\n  u8 intKey;           /* True if table b-trees.  False for index b-trees */\n  u8 intKeyLeaf;       /* True if the leaf of an intKey table */\n  Pgno pgno;           /* Page number for this page */\n  /* Only the first 8 bytes (above) are zeroed by pager.c when a new page\n  ** is allocated. All fields that follow must be initialized before use */\n  u8 leaf;             /* True if a leaf page */\n  u8 hdrOffset;        /* 100 for page 1.  0 otherwise */\n  u8 childPtrSize;     /* 0 if leaf==1.  4 if leaf==0 */\n  u8 max1bytePayload;  /* min(maxLocal,127) */\n  u8 nOverflow;        /* Number of overflow cell bodies in aCell[] */\n  u16 maxLocal;        /* Copy of BtShared.maxLocal or BtShared.maxLeaf */\n  u16 minLocal;        /* Copy of BtShared.minLocal or BtShared.minLeaf */\n  u16 cellOffset;      /* Index in aData of first cell pointer */\n  int nFree;           /* Number of free bytes on the page. -1 for unknown */\n  u16 nCell;           /* Number of cells on this page, local and ovfl */\n  u16 maskPage;        /* Mask for page offset */\n  u16 aiOvfl[4];       /* Insert the i-th overflow cell before the aiOvfl-th\n                       ** non-overflow cell */\n  u8 *apOvfl[4];       /* Pointers to the body of overflow cells */\n  BtShared *pBt;       /* Pointer to BtShared that this page is part of */\n  u8 *aData;           /* Pointer to disk image of the page data */\n  u8 *aDataEnd;        /* One byte past the end of the entire page - not just\n                       ** the usable space, the entire page.  Used to prevent\n                       ** corruption-induced buffer overflow. */\n  u8 *aCellIdx;        /* The cell index area */\n  u8 *aDataOfst;       /* Same as aData for leaves.  aData+4 for interior */\n  DbPage *pDbPage;     /* Pager page handle */\n  u16 (*xCellSize)(MemPage*,u8*);             /* cellSizePtr method */\n  void (*xParseCell)(MemPage*,u8*,CellInfo*); /* btreeParseCell method */\n};\n\n/*\n** A linked list of the following structures is stored at BtShared.pLock.\n** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor\n** is opened on the table with root page BtShared.iTable. Locks are removed\n** from this list when a transaction is committed or rolled back, or when\n** a btree handle is closed.\n*/\nstruct BtLock {\n  Btree *pBtree;        /* Btree handle holding this lock */\n  Pgno iTable;          /* Root page of table */\n  u8 eLock;             /* READ_LOCK or WRITE_LOCK */\n  BtLock *pNext;        /* Next in BtShared.pLock list */\n};\n\n/* Candidate values for BtLock.eLock */\n#define READ_LOCK     1\n#define WRITE_LOCK    2\n\n/* A Btree handle\n**\n** A database connection contains a pointer to an instance of\n** this object for every database file that it has open.  This structure\n** is opaque to the database connection.  The database connection cannot\n** see the internals of this structure and only deals with pointers to\n** this structure.\n**\n** For some database files, the same underlying database cache might be\n** shared between multiple connections.  In that case, each connection\n** has it own instance of this object.  But each instance of this object\n** points to the same BtShared object.  The database cache and the\n** schema associated with the database file are all contained within\n** the BtShared object.\n**\n** All fields in this structure are accessed under sqlite3.mutex.\n** The pBt pointer itself may not be changed while there exists cursors\n** in the referenced BtShared that point back to this Btree since those\n** cursors have to go through this Btree to find their BtShared and\n** they often do so without holding sqlite3.mutex.\n*/\nstruct Btree {\n  sqlite3 *db;       /* The database connection holding this btree */\n  BtShared *pBt;     /* Sharable content of this btree */\n  u8 inTrans;        /* TRANS_NONE, TRANS_READ or TRANS_WRITE */\n  u8 sharable;       /* True if we can share pBt with another db */\n  u8 locked;         /* True if db currently has pBt locked */\n  u8 hasIncrblobCur; /* True if there are one or more Incrblob cursors */\n  int wantToLock;    /* Number of nested calls to sqlite3BtreeEnter() */\n  int nBackup;       /* Number of backup operations reading this btree */\n  u32 iBDataVersion; /* Combines with pBt->pPager->iDataVersion */\n  Btree *pNext;      /* List of other sharable Btrees from the same db */\n  Btree *pPrev;      /* Back pointer of the same list */\n#ifdef SQLITE_DEBUG\n  u64 nSeek;         /* Calls to sqlite3BtreeMovetoUnpacked() */\n#endif\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  BtLock lock;       /* Object used to lock page 1 */\n#endif\n};\n\n/*\n** Btree.inTrans may take one of the following values.\n**\n** If the shared-data extension is enabled, there may be multiple users\n** of the Btree structure. At most one of these may open a write transaction,\n** but any number may have active read transactions.\n**\n** These values must match SQLITE_TXN_NONE, SQLITE_TXN_READ, and\n** SQLITE_TXN_WRITE\n*/\n#define TRANS_NONE  0\n#define TRANS_READ  1\n#define TRANS_WRITE 2\n\n#if TRANS_NONE!=SQLITE_TXN_NONE\n# error wrong numeric code for no-transaction\n#endif\n#if TRANS_READ!=SQLITE_TXN_READ\n# error wrong numeric code for read-transaction\n#endif\n#if TRANS_WRITE!=SQLITE_TXN_WRITE\n# error wrong numeric code for write-transaction\n#endif\n\n\n/*\n** An instance of this object represents a single database file.\n**\n** A single database file can be in use at the same time by two\n** or more database connections.  When two or more connections are\n** sharing the same database file, each connection has it own\n** private Btree object for the file and each of those Btrees points\n** to this one BtShared object.  BtShared.nRef is the number of\n** connections currently sharing this database file.\n**\n** Fields in this structure are accessed under the BtShared.mutex\n** mutex, except for nRef and pNext which are accessed under the\n** global SQLITE_MUTEX_STATIC_MAIN mutex.  The pPager field\n** may not be modified once it is initially set as long as nRef>0.\n** The pSchema field may be set once under BtShared.mutex and\n** thereafter is unchanged as long as nRef>0.\n**\n** isPending:\n**\n**   If a BtShared client fails to obtain a write-lock on a database\n**   table (because there exists one or more read-locks on the table),\n**   the shared-cache enters 'pending-lock' state and isPending is\n**   set to true.\n**\n**   The shared-cache leaves the 'pending lock' state when either of\n**   the following occur:\n**\n**     1) The current writer (BtShared.pWriter) concludes its transaction, OR\n**     2) The number of locks held by other connections drops to zero.\n**\n**   while in the 'pending-lock' state, no connection may start a new\n**   transaction.\n**\n**   This feature is included to help prevent writer-starvation.\n*/\nstruct BtShared {\n  Pager *pPager;        /* The page cache */\n  sqlite3 *db;          /* Database connection currently using this Btree */\n  BtCursor *pCursor;    /* A list of all open cursors */\n  MemPage *pPage1;      /* First page of the database */\n  u8 openFlags;         /* Flags to sqlite3BtreeOpen() */\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  u8 autoVacuum;        /* True if auto-vacuum is enabled */\n  u8 incrVacuum;        /* True if incr-vacuum is enabled */\n  u8 bDoTruncate;       /* True to truncate db on commit */\n#endif\n  u8 inTransaction;     /* Transaction state */\n  u8 max1bytePayload;   /* Maximum first byte of cell for a 1-byte payload */\n  u8 nReserveWanted;    /* Desired number of extra bytes per page */\n  u16 btsFlags;         /* Boolean parameters.  See BTS_* macros below */\n  u16 maxLocal;         /* Maximum local payload in non-LEAFDATA tables */\n  u16 minLocal;         /* Minimum local payload in non-LEAFDATA tables */\n  u16 maxLeaf;          /* Maximum local payload in a LEAFDATA table */\n  u16 minLeaf;          /* Minimum local payload in a LEAFDATA table */\n  u32 pageSize;         /* Total number of bytes on a page */\n  u32 usableSize;       /* Number of usable bytes on each page */\n  int nTransaction;     /* Number of open transactions (read + write) */\n  u32 nPage;            /* Number of pages in the database */\n  void *pSchema;        /* Pointer to space allocated by sqlite3BtreeSchema() */\n  void (*xFreeSchema)(void*);  /* Destructor for BtShared.pSchema */\n  sqlite3_mutex *mutex; /* Non-recursive mutex required to access this object */\n  Bitvec *pHasContent;  /* Set of pages moved to free-list this transaction */\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  int nRef;             /* Number of references to this structure */\n  BtShared *pNext;      /* Next on a list of sharable BtShared structs */\n  BtLock *pLock;        /* List of locks held on this shared-btree struct */\n  Btree *pWriter;       /* Btree with currently open write transaction */\n#endif\n  u8 *pTmpSpace;        /* Temp space sufficient to hold a single cell */\n  int nPreformatSize;   /* Size of last cell written by TransferRow() */\n};\n\n/*\n** Allowed values for BtShared.btsFlags\n*/\n#define BTS_READ_ONLY        0x0001   /* Underlying file is readonly */\n#define BTS_PAGESIZE_FIXED   0x0002   /* Page size can no longer be changed */\n#define BTS_SECURE_DELETE    0x0004   /* PRAGMA secure_delete is enabled */\n#define BTS_OVERWRITE        0x0008   /* Overwrite deleted content with zeros */\n#define BTS_FAST_SECURE      0x000c   /* Combination of the previous two */\n#define BTS_INITIALLY_EMPTY  0x0010   /* Database was empty at trans start */\n#define BTS_NO_WAL           0x0020   /* Do not open write-ahead-log files */\n#define BTS_EXCLUSIVE        0x0040   /* pWriter has an exclusive lock */\n#define BTS_PENDING          0x0080   /* Waiting for read-locks to clear */\n\n/*\n** An instance of the following structure is used to hold information\n** about a cell.  The parseCellPtr() function fills in this structure\n** based on information extract from the raw disk page.\n*/\nstruct CellInfo {\n  i64 nKey;      /* The key for INTKEY tables, or nPayload otherwise */\n  u8 *pPayload;  /* Pointer to the start of payload */\n  u32 nPayload;  /* Bytes of payload */\n  u16 nLocal;    /* Amount of payload held locally, not on overflow */\n  u16 nSize;     /* Size of the cell content on the main b-tree page */\n};\n\n/*\n** Maximum depth of an SQLite B-Tree structure. Any B-Tree deeper than\n** this will be declared corrupt. This value is calculated based on a\n** maximum database size of 2^31 pages a minimum fanout of 2 for a\n** root-node and 3 for all other internal nodes.\n**\n** If a tree that appears to be taller than this is encountered, it is\n** assumed that the database is corrupt.\n*/\n#define BTCURSOR_MAX_DEPTH 20\n\n/*\n** Maximum amount of storage local to a database page, regardless of\n** page size.\n*/\n#define BT_MAX_LOCAL  65501  /* 65536 - 35 */\n\n/*\n** A cursor is a pointer to a particular entry within a particular\n** b-tree within a database file.\n**\n** The entry is identified by its MemPage and the index in\n** MemPage.aCell[] of the entry.\n**\n** A single database file can be shared by two more database connections,\n** but cursors cannot be shared.  Each cursor is associated with a\n** particular database connection identified BtCursor.pBtree.db.\n**\n** Fields in this structure are accessed under the BtShared.mutex\n** found at self->pBt->mutex.\n**\n** skipNext meaning:\n** The meaning of skipNext depends on the value of eState:\n**\n**   eState            Meaning of skipNext\n**   VALID             skipNext is meaningless and is ignored\n**   INVALID           skipNext is meaningless and is ignored\n**   SKIPNEXT          sqlite3BtreeNext() is a no-op if skipNext>0 and\n**                     sqlite3BtreePrevious() is no-op if skipNext<0.\n**   REQUIRESEEK       restoreCursorPosition() restores the cursor to\n**                     eState=SKIPNEXT if skipNext!=0\n**   FAULT             skipNext holds the cursor fault error code.\n*/\nstruct BtCursor {\n  u8 eState;                /* One of the CURSOR_XXX constants (see below) */\n  u8 curFlags;              /* zero or more BTCF_* flags defined below */\n  u8 curPagerFlags;         /* Flags to send to sqlite3PagerGet() */\n  u8 hints;                 /* As configured by CursorSetHints() */\n  int skipNext;    /* Prev() is noop if negative. Next() is noop if positive.\n                   ** Error code if eState==CURSOR_FAULT */\n  Btree *pBtree;            /* The Btree to which this cursor belongs */\n  Pgno *aOverflow;          /* Cache of overflow page locations */\n  void *pKey;               /* Saved key that was cursor last known position */\n  /* All fields above are zeroed when the cursor is allocated.  See\n  ** sqlite3BtreeCursorZero().  Fields that follow must be manually\n  ** initialized. */\n#define BTCURSOR_FIRST_UNINIT pBt   /* Name of first uninitialized field */\n  BtShared *pBt;            /* The BtShared this cursor points to */\n  BtCursor *pNext;          /* Forms a linked list of all cursors */\n  CellInfo info;            /* A parse of the cell we are pointing at */\n  i64 nKey;                 /* Size of pKey, or last integer key */\n  Pgno pgnoRoot;            /* The root page of this tree */\n  i8 iPage;                 /* Index of current page in apPage */\n  u8 curIntKey;             /* Value of apPage[0]->intKey */\n  u16 ix;                   /* Current index for apPage[iPage] */\n  u16 aiIdx[BTCURSOR_MAX_DEPTH-1];     /* Current index in apPage[i] */\n  struct KeyInfo *pKeyInfo;            /* Arg passed to comparison function */\n  MemPage *pPage;                        /* Current page */\n  MemPage *apPage[BTCURSOR_MAX_DEPTH-1]; /* Stack of parents of current page */\n};\n\n/*\n** Legal values for BtCursor.curFlags\n*/\n#define BTCF_WriteFlag    0x01   /* True if a write cursor */\n#define BTCF_ValidNKey    0x02   /* True if info.nKey is valid */\n#define BTCF_ValidOvfl    0x04   /* True if aOverflow is valid */\n#define BTCF_AtLast       0x08   /* Cursor is pointing to the last entry */\n#define BTCF_Incrblob     0x10   /* True if an incremental I/O handle */\n#define BTCF_Multiple     0x20   /* Maybe another cursor on the same btree */\n#define BTCF_Pinned       0x40   /* Cursor is busy and cannot be moved */\n\n/*\n** Potential values for BtCursor.eState.\n**\n** CURSOR_INVALID:\n**   Cursor does not point to a valid entry. This can happen (for example)\n**   because the table is empty or because BtreeCursorFirst() has not been\n**   called.\n**\n** CURSOR_VALID:\n**   Cursor points to a valid entry. getPayload() etc. may be called.\n**\n** CURSOR_SKIPNEXT:\n**   Cursor is valid except that the Cursor.skipNext field is non-zero\n**   indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious()\n**   operation should be a no-op.\n**\n** CURSOR_REQUIRESEEK:\n**   The table that this cursor was opened on still exists, but has been\n**   modified since the cursor was last used. The cursor position is saved\n**   in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in\n**   this state, restoreCursorPosition() can be called to attempt to\n**   seek the cursor to the saved position.\n**\n** CURSOR_FAULT:\n**   An unrecoverable error (an I/O error or a malloc failure) has occurred\n**   on a different connection that shares the BtShared cache with this\n**   cursor.  The error has left the cache in an inconsistent state.\n**   Do nothing else with this cursor.  Any attempt to use the cursor\n**   should return the error code stored in BtCursor.skipNext\n*/\n#define CURSOR_VALID             0\n#define CURSOR_INVALID           1\n#define CURSOR_SKIPNEXT          2\n#define CURSOR_REQUIRESEEK       3\n#define CURSOR_FAULT             4\n\n/*\n** The database page the PENDING_BYTE occupies. This page is never used.\n*/\n#define PENDING_BYTE_PAGE(pBt)  ((Pgno)((PENDING_BYTE/((pBt)->pageSize))+1))\n\n/*\n** These macros define the location of the pointer-map entry for a\n** database page. The first argument to each is the number of usable\n** bytes on each page of the database (often 1024). The second is the\n** page number to look up in the pointer map.\n**\n** PTRMAP_PAGENO returns the database page number of the pointer-map\n** page that stores the required pointer. PTRMAP_PTROFFSET returns\n** the offset of the requested map entry.\n**\n** If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page,\n** then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be\n** used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements\n** this test.\n*/\n#define PTRMAP_PAGENO(pBt, pgno) ptrmapPageno(pBt, pgno)\n#define PTRMAP_PTROFFSET(pgptrmap, pgno) (5*(pgno-pgptrmap-1))\n#define PTRMAP_ISPAGE(pBt, pgno) (PTRMAP_PAGENO((pBt),(pgno))==(pgno))\n\n/*\n** The pointer map is a lookup table that identifies the parent page for\n** each child page in the database file.  The parent page is the page that\n** contains a pointer to the child.  Every page in the database contains\n** 0 or 1 parent pages.  (In this context 'database page' refers\n** to any page that is not part of the pointer map itself.)  Each pointer map\n** entry consists of a single byte 'type' and a 4 byte parent page number.\n** The PTRMAP_XXX identifiers below are the valid types.\n**\n** The purpose of the pointer map is to facility moving pages from one\n** position in the file to another as part of autovacuum.  When a page\n** is moved, the pointer in its parent must be updated to point to the\n** new location.  The pointer map is used to locate the parent page quickly.\n**\n** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not\n**                  used in this case.\n**\n** PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number\n**                  is not used in this case.\n**\n** PTRMAP_OVERFLOW1: The database page is the first page in a list of\n**                   overflow pages. The page number identifies the page that\n**                   contains the cell with a pointer to this overflow page.\n**\n** PTRMAP_OVERFLOW2: The database page is the second or later page in a list of\n**                   overflow pages. The page-number identifies the previous\n**                   page in the overflow page list.\n**\n** PTRMAP_BTREE: The database page is a non-root btree page. The page number\n**               identifies the parent page in the btree.\n*/\n#define PTRMAP_ROOTPAGE 1\n#define PTRMAP_FREEPAGE 2\n#define PTRMAP_OVERFLOW1 3\n#define PTRMAP_OVERFLOW2 4\n#define PTRMAP_BTREE 5\n\n/* A bunch of assert() statements to check the transaction state variables\n** of handle p (type Btree*) are internally consistent.\n*/\n#define btreeIntegrity(p) \\\n  assert( p->pBt->inTransaction!=TRANS_NONE || p->pBt->nTransaction==0 ); \\\n  assert( p->pBt->inTransaction>=p->inTrans );\n\n\n/*\n** The ISAUTOVACUUM macro is used within balance_nonroot() to determine\n** if the database supports auto-vacuum or not. Because it is used\n** within an expression that is an argument to another macro\n** (sqliteMallocRaw), it is not possible to use conditional compilation.\n** So, this macro is defined instead.\n*/\n#ifndef SQLITE_OMIT_AUTOVACUUM\n#define ISAUTOVACUUM(pBt) (pBt->autoVacuum)\n#else\n#define ISAUTOVACUUM(pBt) 0\n#endif\n\n\n/*\n** This structure is passed around through all the PRAGMA integrity_check\n** checking routines in order to keep track of some global state information.\n**\n** The aRef[] array is allocated so that there is 1 bit for each page in\n** the database. As the integrity-check proceeds, for each page used in\n** the database the corresponding bit is set. This allows integrity-check to\n** detect pages that are used twice and orphaned pages (both of which\n** indicate corruption).\n*/\ntypedef struct IntegrityCk IntegrityCk;\nstruct IntegrityCk {\n  BtShared *pBt;    /* The tree being checked out */\n  Pager *pPager;    /* The associated pager.  Also accessible by pBt->pPager */\n  u8 *aPgRef;       /* 1 bit per page in the db (see above) */\n  Pgno nCkPage;     /* Pages in the database.  0 for partial check */\n  int mxErr;        /* Stop accumulating errors when this reaches zero */\n  int nErr;         /* Number of messages written to zErrMsg so far */\n  int rc;           /* SQLITE_OK, SQLITE_NOMEM, or SQLITE_INTERRUPT */\n  u32 nStep;        /* Number of steps into the integrity_check process */\n  const char *zPfx; /* Error message prefix */\n  Pgno v0;          /* Value for first %u substitution in zPfx (root page) */\n  Pgno v1;          /* Value for second %u substitution in zPfx (current pg) */\n  int v2;           /* Value for third %d substitution in zPfx */\n  StrAccum errMsg;  /* Accumulate the error message text here */\n  u32 *heap;        /* Min-heap used for analyzing cell coverage */\n  sqlite3 *db;      /* Database connection running the check */\n  i64 nRow;         /* Number of rows visited in current tree */\n};\n\n/*\n** Routines to read or write a two- and four-byte big-endian integer values.\n*/\n#define get2byte(x)   ((x)[0]<<8 | (x)[1])\n#define put2byte(p,v) ((p)[0] = (u8)((v)>>8), (p)[1] = (u8)(v))\n#define get4byte sqlite3Get4byte\n#define put4byte sqlite3Put4byte\n\n/*\n** get2byteAligned(), unlike get2byte(), requires that its argument point to a\n** two-byte aligned address.  get2byteAligned() is only used for accessing the\n** cell addresses in a btree header.\n*/\n#if SQLITE_BYTEORDER==4321\n# define get2byteAligned(x)  (*(u16*)(x))\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4008000\n# define get2byteAligned(x)  __builtin_bswap16(*(u16*)(x))\n#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n# define get2byteAligned(x)  _byteswap_ushort(*(u16*)(x))\n#else\n# define get2byteAligned(x)  ((x)[0]<<8 | (x)[1])\n#endif\n\n/************** End of btreeInt.h ********************************************/\n/************** Continuing where we left off in btmutex.c ********************/\n#ifndef SQLITE_OMIT_SHARED_CACHE\n#if SQLITE_THREADSAFE\n\n/*\n** Obtain the BtShared mutex associated with B-Tree handle p. Also,\n** set BtShared.db to the database handle associated with p and the\n** p->locked boolean to true.\n*/\nstatic void lockBtreeMutex(Btree *p){\n  assert( p->locked==0 );\n  assert( sqlite3_mutex_notheld(p->pBt->mutex) );\n  assert( sqlite3_mutex_held(p->db->mutex) );\n\n  sqlite3_mutex_enter(p->pBt->mutex);\n  p->pBt->db = p->db;\n  p->locked = 1;\n}\n\n/*\n** Release the BtShared mutex associated with B-Tree handle p and\n** clear the p->locked boolean.\n*/\nstatic void SQLITE_NOINLINE unlockBtreeMutex(Btree *p){\n  BtShared *pBt = p->pBt;\n  assert( p->locked==1 );\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  assert( p->db==pBt->db );\n\n  sqlite3_mutex_leave(pBt->mutex);\n  p->locked = 0;\n}\n\n/* Forward reference */\nstatic void SQLITE_NOINLINE btreeLockCarefully(Btree *p);\n\n/*\n** Enter a mutex on the given BTree object.\n**\n** If the object is not sharable, then no mutex is ever required\n** and this routine is a no-op.  The underlying mutex is non-recursive.\n** But we keep a reference count in Btree.wantToLock so the behavior\n** of this interface is recursive.\n**\n** To avoid deadlocks, multiple Btrees are locked in the same order\n** by all database connections.  The p->pNext is a list of other\n** Btrees belonging to the same database connection as the p Btree\n** which need to be locked after p.  If we cannot get a lock on\n** p, then first unlock all of the others on p->pNext, then wait\n** for the lock to become available on p, then relock all of the\n** subsequent Btrees that desire a lock.\n*/\nSQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){\n  /* Some basic sanity checking on the Btree.  The list of Btrees\n  ** connected by pNext and pPrev should be in sorted order by\n  ** Btree.pBt value. All elements of the list should belong to\n  ** the same connection. Only shared Btrees are on the list. */\n  assert( p->pNext==0 || p->pNext->pBt>p->pBt );\n  assert( p->pPrev==0 || p->pPrev->pBt<p->pBt );\n  assert( p->pNext==0 || p->pNext->db==p->db );\n  assert( p->pPrev==0 || p->pPrev->db==p->db );\n  assert( p->sharable || (p->pNext==0 && p->pPrev==0) );\n\n  /* Check for locking consistency */\n  assert( !p->locked || p->wantToLock>0 );\n  assert( p->sharable || p->wantToLock==0 );\n\n  /* We should already hold a lock on the database connection */\n  assert( sqlite3_mutex_held(p->db->mutex) );\n\n  /* Unless the database is sharable and unlocked, then BtShared.db\n  ** should already be set correctly. */\n  assert( (p->locked==0 && p->sharable) || p->pBt->db==p->db );\n\n  if( !p->sharable ) return;\n  p->wantToLock++;\n  if( p->locked ) return;\n  btreeLockCarefully(p);\n}\n\n/* This is a helper function for sqlite3BtreeLock(). By moving\n** complex, but seldom used logic, out of sqlite3BtreeLock() and\n** into this routine, we avoid unnecessary stack pointer changes\n** and thus help the sqlite3BtreeLock() routine to run much faster\n** in the common case.\n*/\nstatic void SQLITE_NOINLINE btreeLockCarefully(Btree *p){\n  Btree *pLater;\n\n  /* In most cases, we should be able to acquire the lock we\n  ** want without having to go through the ascending lock\n  ** procedure that follows.  Just be sure not to block.\n  */\n  if( sqlite3_mutex_try(p->pBt->mutex)==SQLITE_OK ){\n    p->pBt->db = p->db;\n    p->locked = 1;\n    return;\n  }\n\n  /* To avoid deadlock, first release all locks with a larger\n  ** BtShared address.  Then acquire our lock.  Then reacquire\n  ** the other BtShared locks that we used to hold in ascending\n  ** order.\n  */\n  for(pLater=p->pNext; pLater; pLater=pLater->pNext){\n    assert( pLater->sharable );\n    assert( pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt );\n    assert( !pLater->locked || pLater->wantToLock>0 );\n    if( pLater->locked ){\n      unlockBtreeMutex(pLater);\n    }\n  }\n  lockBtreeMutex(p);\n  for(pLater=p->pNext; pLater; pLater=pLater->pNext){\n    if( pLater->wantToLock ){\n      lockBtreeMutex(pLater);\n    }\n  }\n}\n\n\n/*\n** Exit the recursive mutex on a Btree.\n*/\nSQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  if( p->sharable ){\n    assert( p->wantToLock>0 );\n    p->wantToLock--;\n    if( p->wantToLock==0 ){\n      unlockBtreeMutex(p);\n    }\n  }\n}\n\n#ifndef NDEBUG\n/*\n** Return true if the BtShared mutex is held on the btree, or if the\n** B-Tree is not marked as sharable.\n**\n** This routine is used only from within assert() statements.\n*/\nSQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){\n  assert( p->sharable==0 || p->locked==0 || p->wantToLock>0 );\n  assert( p->sharable==0 || p->locked==0 || p->db==p->pBt->db );\n  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex) );\n  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex) );\n\n  return (p->sharable==0 || p->locked);\n}\n#endif\n\n\n/*\n** Enter the mutex on every Btree associated with a database\n** connection.  This is needed (for example) prior to parsing\n** a statement since we will be comparing table and column names\n** against all schemas and we do not want those schemas being\n** reset out from under us.\n**\n** There is a corresponding leave-all procedures.\n**\n** Enter the mutexes in ascending order by BtShared pointer address\n** to avoid the possibility of deadlock when two threads with\n** two or more btrees in common both try to lock all their btrees\n** at the same instant.\n*/\nstatic void SQLITE_NOINLINE btreeEnterAll(sqlite3 *db){\n  int i;\n  u8 skipOk = 1;\n  Btree *p;\n  assert( sqlite3_mutex_held(db->mutex) );\n  for(i=0; i<db->nDb; i++){\n    p = db->aDb[i].pBt;\n    if( p && p->sharable ){\n      sqlite3BtreeEnter(p);\n      skipOk = 0;\n    }\n  }\n  db->noSharedCache = skipOk;\n}\nSQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){\n  if( db->noSharedCache==0 ) btreeEnterAll(db);\n}\nstatic void SQLITE_NOINLINE btreeLeaveAll(sqlite3 *db){\n  int i;\n  Btree *p;\n  assert( sqlite3_mutex_held(db->mutex) );\n  for(i=0; i<db->nDb; i++){\n    p = db->aDb[i].pBt;\n    if( p ) sqlite3BtreeLeave(p);\n  }\n}\nSQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){\n  if( db->noSharedCache==0 ) btreeLeaveAll(db);\n}\n\n#ifndef NDEBUG\n/*\n** Return true if the current thread holds the database connection\n** mutex and all required BtShared mutexes.\n**\n** This routine is used inside assert() statements only.\n*/\nSQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){\n  int i;\n  if( !sqlite3_mutex_held(db->mutex) ){\n    return 0;\n  }\n  for(i=0; i<db->nDb; i++){\n    Btree *p;\n    p = db->aDb[i].pBt;\n    if( p && p->sharable &&\n         (p->wantToLock==0 || !sqlite3_mutex_held(p->pBt->mutex)) ){\n      return 0;\n    }\n  }\n  return 1;\n}\n#endif /* NDEBUG */\n\n#ifndef NDEBUG\n/*\n** Return true if the correct mutexes are held for accessing the\n** db->aDb[iDb].pSchema structure.  The mutexes required for schema\n** access are:\n**\n**   (1) The mutex on db\n**   (2) if iDb!=1, then the mutex on db->aDb[iDb].pBt.\n**\n** If pSchema is not NULL, then iDb is computed from pSchema and\n** db using sqlite3SchemaToIndex().\n*/\nSQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){\n  Btree *p;\n  assert( db!=0 );\n  if( db->pVfs==0 && db->nDb==0 ) return 1;\n  if( pSchema ) iDb = sqlite3SchemaToIndex(db, pSchema);\n  assert( iDb>=0 && iDb<db->nDb );\n  if( !sqlite3_mutex_held(db->mutex) ) return 0;\n  if( iDb==1 ) return 1;\n  p = db->aDb[iDb].pBt;\n  assert( p!=0 );\n  return p->sharable==0 || p->locked==1;\n}\n#endif /* NDEBUG */\n\n#else /* SQLITE_THREADSAFE>0 above.  SQLITE_THREADSAFE==0 below */\n/*\n** The following are special cases for mutex enter routines for use\n** in single threaded applications that use shared cache.  Except for\n** these two routines, all mutex operations are no-ops in that case and\n** are null #defines in btree.h.\n**\n** If shared cache is disabled, then all btree mutex routines, including\n** the ones below, are no-ops and are null #defines in btree.h.\n*/\n\nSQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){\n  p->pBt->db = p->db;\n}\nSQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){\n  int i;\n  for(i=0; i<db->nDb; i++){\n    Btree *p = db->aDb[i].pBt;\n    if( p ){\n      p->pBt->db = p->db;\n    }\n  }\n}\n#endif /* if SQLITE_THREADSAFE */\n\n#ifndef SQLITE_OMIT_INCRBLOB\n/*\n** Enter a mutex on a Btree given a cursor owned by that Btree.\n**\n** These entry points are used by incremental I/O only. Enter() is required\n** any time OMIT_SHARED_CACHE is not defined, regardless of whether or not\n** the build is threadsafe. Leave() is only required by threadsafe builds.\n*/\nSQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor *pCur){\n  sqlite3BtreeEnter(pCur->pBtree);\n}\n# if SQLITE_THREADSAFE\nSQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){\n  sqlite3BtreeLeave(pCur->pBtree);\n}\n# endif\n#endif /* ifndef SQLITE_OMIT_INCRBLOB */\n\n#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */\n\n/************** End of btmutex.c *********************************************/\n/************** Begin file btree.c *******************************************/\n/*\n** 2004 April 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file implements an external (disk-based) database using BTrees.\n** See the header comment on \"btreeInt.h\" for additional information.\n** Including a description of file format and an overview of operation.\n*/\n/* #include \"btreeInt.h\" */\n\n/*\n** The header string that appears at the beginning of every\n** SQLite database.\n*/\nstatic const char zMagicHeader[] = SQLITE_FILE_HEADER;\n\n/*\n** Set this global variable to 1 to enable tracing using the TRACE\n** macro.\n*/\n#if 0\nint sqlite3BtreeTrace=1;  /* True to enable tracing */\n# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}\n#else\n# define TRACE(X)\n#endif\n\n/*\n** Extract a 2-byte big-endian integer from an array of unsigned bytes.\n** But if the value is zero, make it 65536.\n**\n** This routine is used to extract the \"offset to cell content area\" value\n** from the header of a btree page.  If the page size is 65536 and the page\n** is empty, the offset should be 65536, but the 2-byte value stores zero.\n** This routine makes the necessary adjustment to 65536.\n*/\n#define get2byteNotZero(X)  (((((int)get2byte(X))-1)&0xffff)+1)\n\n/*\n** Values passed as the 5th argument to allocateBtreePage()\n*/\n#define BTALLOC_ANY   0           /* Allocate any page */\n#define BTALLOC_EXACT 1           /* Allocate exact page if possible */\n#define BTALLOC_LE    2           /* Allocate any page <= the parameter */\n\n/*\n** Macro IfNotOmitAV(x) returns (x) if SQLITE_OMIT_AUTOVACUUM is not\n** defined, or 0 if it is. For example:\n**\n**   bIncrVacuum = IfNotOmitAV(pBtShared->incrVacuum);\n*/\n#ifndef SQLITE_OMIT_AUTOVACUUM\n#define IfNotOmitAV(expr) (expr)\n#else\n#define IfNotOmitAV(expr) 0\n#endif\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** A list of BtShared objects that are eligible for participation\n** in shared cache.  This variable has file scope during normal builds,\n** but the test harness needs to access it so we make it global for\n** test builds.\n**\n** Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN.\n*/\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;\n#else\nstatic BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;\n#endif\n#endif /* SQLITE_OMIT_SHARED_CACHE */\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** Enable or disable the shared pager and schema features.\n**\n** This routine has no effect on existing database connections.\n** The shared cache setting effects only future calls to\n** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().\n*/\nSQLITE_API int sqlite3_enable_shared_cache(int enable){\n  sqlite3GlobalConfig.sharedCacheEnabled = enable;\n  return SQLITE_OK;\n}\n#endif\n\n\n\n#ifdef SQLITE_OMIT_SHARED_CACHE\n  /*\n  ** The functions querySharedCacheTableLock(), setSharedCacheTableLock(),\n  ** and clearAllSharedCacheTableLocks()\n  ** manipulate entries in the BtShared.pLock linked list used to store\n  ** shared-cache table level locks. If the library is compiled with the\n  ** shared-cache feature disabled, then there is only ever one user\n  ** of each BtShared structure and so this locking is not necessary.\n  ** So define the lock related functions as no-ops.\n  */\n  #define querySharedCacheTableLock(a,b,c) SQLITE_OK\n  #define setSharedCacheTableLock(a,b,c) SQLITE_OK\n  #define clearAllSharedCacheTableLocks(a)\n  #define downgradeAllSharedCacheTableLocks(a)\n  #define hasSharedCacheTableLock(a,b,c,d) 1\n  #define hasReadConflicts(a, b) 0\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Return and reset the seek counter for a Btree object.\n*/\nSQLITE_PRIVATE sqlite3_uint64 sqlite3BtreeSeekCount(Btree *pBt){\n  u64 n =  pBt->nSeek;\n  pBt->nSeek = 0;\n  return n;\n}\n#endif\n\n/*\n** Implementation of the SQLITE_CORRUPT_PAGE() macro. Takes a single\n** (MemPage*) as an argument. The (MemPage*) must not be NULL.\n**\n** If SQLITE_DEBUG is not defined, then this macro is equivalent to\n** SQLITE_CORRUPT_BKPT. Or, if SQLITE_DEBUG is set, then the log message\n** normally produced as a side-effect of SQLITE_CORRUPT_BKPT is augmented\n** with the page number and filename associated with the (MemPage*).\n*/\n#ifdef SQLITE_DEBUG\nint corruptPageError(int lineno, MemPage *p){\n  char *zMsg;\n  sqlite3BeginBenignMalloc();\n  zMsg = sqlite3_mprintf(\"database corruption page %u of %s\",\n             p->pgno, sqlite3PagerFilename(p->pBt->pPager, 0)\n  );\n  sqlite3EndBenignMalloc();\n  if( zMsg ){\n    sqlite3ReportError(SQLITE_CORRUPT, lineno, zMsg);\n  }\n  sqlite3_free(zMsg);\n  return SQLITE_CORRUPT_BKPT;\n}\n# define SQLITE_CORRUPT_PAGE(pMemPage) corruptPageError(__LINE__, pMemPage)\n#else\n# define SQLITE_CORRUPT_PAGE(pMemPage) SQLITE_CORRUPT_PGNO(pMemPage->pgno)\n#endif\n\n/* Default value for SHARED_LOCK_TRACE macro if shared-cache is disabled\n** or if the lock tracking is disabled.  This is always the value for\n** release builds.\n*/\n#define SHARED_LOCK_TRACE(X,MSG,TAB,TYPE)  /*no-op*/\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n\n#if 0\n/*  ^----  Change to 1 and recompile to enable shared-lock tracing\n**         for debugging purposes.\n**\n** Print all shared-cache locks on a BtShared.  Debugging use only.\n*/\nstatic void sharedLockTrace(\n  BtShared *pBt,\n  const char *zMsg,\n  int iRoot,\n  int eLockType\n){\n  BtLock *pLock;\n  if( iRoot>0 ){\n    printf(\"%s-%p %u%s:\", zMsg, pBt, iRoot, eLockType==READ_LOCK?\"R\":\"W\");\n  }else{\n    printf(\"%s-%p:\", zMsg, pBt);\n  }\n  for(pLock=pBt->pLock; pLock; pLock=pLock->pNext){\n    printf(\" %p/%u%s\", pLock->pBtree, pLock->iTable,\n           pLock->eLock==READ_LOCK ? \"R\" : \"W\");\n    while( pLock->pNext && pLock->pBtree==pLock->pNext->pBtree ){\n      pLock = pLock->pNext;\n      printf(\",%u%s\", pLock->iTable, pLock->eLock==READ_LOCK ? \"R\" : \"W\");\n    }\n  }\n  printf(\"\\n\");\n  fflush(stdout);\n}\n#undef SHARED_LOCK_TRACE\n#define SHARED_LOCK_TRACE(X,MSG,TAB,TYPE)  sharedLockTrace(X,MSG,TAB,TYPE)\n#endif /* Shared-lock tracing */\n\n#ifdef SQLITE_DEBUG\n/*\n**** This function is only used as part of an assert() statement. ***\n**\n** Check to see if pBtree holds the required locks to read or write to the\n** table with root page iRoot.   Return 1 if it does and 0 if not.\n**\n** For example, when writing to a table with root-page iRoot via\n** Btree connection pBtree:\n**\n**    assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );\n**\n** When writing to an index that resides in a sharable database, the\n** caller should have first obtained a lock specifying the root page of\n** the corresponding table. This makes things a bit more complicated,\n** as this module treats each table as a separate structure. To determine\n** the table corresponding to the index being written, this\n** function has to search through the database schema.\n**\n** Instead of a lock on the table/index rooted at page iRoot, the caller may\n** hold a write-lock on the schema table (root page 1). This is also\n** acceptable.\n*/\nstatic int hasSharedCacheTableLock(\n  Btree *pBtree,         /* Handle that must hold lock */\n  Pgno iRoot,            /* Root page of b-tree */\n  int isIndex,           /* True if iRoot is the root of an index b-tree */\n  int eLockType          /* Required lock type (READ_LOCK or WRITE_LOCK) */\n){\n  Schema *pSchema = (Schema *)pBtree->pBt->pSchema;\n  Pgno iTab = 0;\n  BtLock *pLock;\n\n  /* If this database is not shareable, or if the client is reading\n  ** and has the read-uncommitted flag set, then no lock is required.\n  ** Return true immediately.\n  */\n  if( (pBtree->sharable==0)\n   || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommit))\n  ){\n    return 1;\n  }\n\n  /* If the client is reading  or writing an index and the schema is\n  ** not loaded, then it is too difficult to actually check to see if\n  ** the correct locks are held.  So do not bother - just return true.\n  ** This case does not come up very often anyhow.\n  */\n  if( isIndex && (!pSchema || (pSchema->schemaFlags&DB_SchemaLoaded)==0) ){\n    return 1;\n  }\n\n  /* Figure out the root-page that the lock should be held on. For table\n  ** b-trees, this is just the root page of the b-tree being read or\n  ** written. For index b-trees, it is the root page of the associated\n  ** table.  */\n  if( isIndex ){\n    HashElem *p;\n    int bSeen = 0;\n    for(p=sqliteHashFirst(&pSchema->idxHash); p; p=sqliteHashNext(p)){\n      Index *pIdx = (Index *)sqliteHashData(p);\n      if( pIdx->tnum==iRoot ){\n        if( bSeen ){\n          /* Two or more indexes share the same root page.  There must\n          ** be imposter tables.  So just return true.  The assert is not\n          ** useful in that case. */\n          return 1;\n        }\n        iTab = pIdx->pTable->tnum;\n        bSeen = 1;\n      }\n    }\n  }else{\n    iTab = iRoot;\n  }\n\n  SHARED_LOCK_TRACE(pBtree->pBt,\"hasLock\",iRoot,eLockType);\n\n  /* Search for the required lock. Either a write-lock on root-page iTab, a\n  ** write-lock on the schema table, or (if the client is reading) a\n  ** read-lock on iTab will suffice. Return 1 if any of these are found.  */\n  for(pLock=pBtree->pBt->pLock; pLock; pLock=pLock->pNext){\n    if( pLock->pBtree==pBtree\n     && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))\n     && pLock->eLock>=eLockType\n    ){\n      return 1;\n    }\n  }\n\n  /* Failed to find the required lock. */\n  return 0;\n}\n#endif /* SQLITE_DEBUG */\n\n#ifdef SQLITE_DEBUG\n/*\n**** This function may be used as part of assert() statements only. ****\n**\n** Return true if it would be illegal for pBtree to write into the\n** table or index rooted at iRoot because other shared connections are\n** simultaneously reading that same table or index.\n**\n** It is illegal for pBtree to write if some other Btree object that\n** shares the same BtShared object is currently reading or writing\n** the iRoot table.  Except, if the other Btree object has the\n** read-uncommitted flag set, then it is OK for the other object to\n** have a read cursor.\n**\n** For example, before writing to any part of the table or index\n** rooted at page iRoot, one should call:\n**\n**    assert( !hasReadConflicts(pBtree, iRoot) );\n*/\nstatic int hasReadConflicts(Btree *pBtree, Pgno iRoot){\n  BtCursor *p;\n  for(p=pBtree->pBt->pCursor; p; p=p->pNext){\n    if( p->pgnoRoot==iRoot\n     && p->pBtree!=pBtree\n     && 0==(p->pBtree->db->flags & SQLITE_ReadUncommit)\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n#endif    /* #ifdef SQLITE_DEBUG */\n\n/*\n** Query to see if Btree handle p may obtain a lock of type eLock\n** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return\n** SQLITE_OK if the lock may be obtained (by calling\n** setSharedCacheTableLock()), or SQLITE_LOCKED if not.\n*/\nstatic int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){\n  BtShared *pBt = p->pBt;\n  BtLock *pIter;\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );\n  assert( p->db!=0 );\n  assert( !(p->db->flags&SQLITE_ReadUncommit)||eLock==WRITE_LOCK||iTab==1 );\n\n  /* If requesting a write-lock, then the Btree must have an open write\n  ** transaction on this file. And, obviously, for this to be so there\n  ** must be an open write transaction on the file itself.\n  */\n  assert( eLock==READ_LOCK || (p==pBt->pWriter && p->inTrans==TRANS_WRITE) );\n  assert( eLock==READ_LOCK || pBt->inTransaction==TRANS_WRITE );\n\n  /* This routine is a no-op if the shared-cache is not enabled */\n  if( !p->sharable ){\n    return SQLITE_OK;\n  }\n\n  /* If some other connection is holding an exclusive lock, the\n  ** requested lock may not be obtained.\n  */\n  if( pBt->pWriter!=p && (pBt->btsFlags & BTS_EXCLUSIVE)!=0 ){\n    sqlite3ConnectionBlocked(p->db, pBt->pWriter->db);\n    return SQLITE_LOCKED_SHAREDCACHE;\n  }\n\n  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){\n    /* The condition (pIter->eLock!=eLock) in the following if(...)\n    ** statement is a simplification of:\n    **\n    **   (eLock==WRITE_LOCK || pIter->eLock==WRITE_LOCK)\n    **\n    ** since we know that if eLock==WRITE_LOCK, then no other connection\n    ** may hold a WRITE_LOCK on any table in this file (since there can\n    ** only be a single writer).\n    */\n    assert( pIter->eLock==READ_LOCK || pIter->eLock==WRITE_LOCK );\n    assert( eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK);\n    if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){\n      sqlite3ConnectionBlocked(p->db, pIter->pBtree->db);\n      if( eLock==WRITE_LOCK ){\n        assert( p==pBt->pWriter );\n        pBt->btsFlags |= BTS_PENDING;\n      }\n      return SQLITE_LOCKED_SHAREDCACHE;\n    }\n  }\n  return SQLITE_OK;\n}\n#endif /* !SQLITE_OMIT_SHARED_CACHE */\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** Add a lock on the table with root-page iTable to the shared-btree used\n** by Btree handle p. Parameter eLock must be either READ_LOCK or\n** WRITE_LOCK.\n**\n** This function assumes the following:\n**\n**   (a) The specified Btree object p is connected to a sharable\n**       database (one with the BtShared.sharable flag set), and\n**\n**   (b) No other Btree objects hold a lock that conflicts\n**       with the requested lock (i.e. querySharedCacheTableLock() has\n**       already been called and returned SQLITE_OK).\n**\n** SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM\n** is returned if a malloc attempt fails.\n*/\nstatic int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){\n  BtShared *pBt = p->pBt;\n  BtLock *pLock = 0;\n  BtLock *pIter;\n\n  SHARED_LOCK_TRACE(pBt,\"setLock\", iTable, eLock);\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );\n  assert( p->db!=0 );\n\n  /* A connection with the read-uncommitted flag set will never try to\n  ** obtain a read-lock using this function. The only read-lock obtained\n  ** by a connection in read-uncommitted mode is on the sqlite_schema\n  ** table, and that lock is obtained in BtreeBeginTrans().  */\n  assert( 0==(p->db->flags&SQLITE_ReadUncommit) || eLock==WRITE_LOCK );\n\n  /* This function should only be called on a sharable b-tree after it\n  ** has been determined that no other b-tree holds a conflicting lock.  */\n  assert( p->sharable );\n  assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );\n\n  /* First search the list for an existing lock on this table. */\n  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){\n    if( pIter->iTable==iTable && pIter->pBtree==p ){\n      pLock = pIter;\n      break;\n    }\n  }\n\n  /* If the above search did not find a BtLock struct associating Btree p\n  ** with table iTable, allocate one and link it into the list.\n  */\n  if( !pLock ){\n    pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));\n    if( !pLock ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    pLock->iTable = iTable;\n    pLock->pBtree = p;\n    pLock->pNext = pBt->pLock;\n    pBt->pLock = pLock;\n  }\n\n  /* Set the BtLock.eLock variable to the maximum of the current lock\n  ** and the requested lock. This means if a write-lock was already held\n  ** and a read-lock requested, we don't incorrectly downgrade the lock.\n  */\n  assert( WRITE_LOCK>READ_LOCK );\n  if( eLock>pLock->eLock ){\n    pLock->eLock = eLock;\n  }\n\n  return SQLITE_OK;\n}\n#endif /* !SQLITE_OMIT_SHARED_CACHE */\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** Release all the table locks (locks obtained via calls to\n** the setSharedCacheTableLock() procedure) held by Btree object p.\n**\n** This function assumes that Btree p has an open read or write\n** transaction. If it does not, then the BTS_PENDING flag\n** may be incorrectly cleared.\n*/\nstatic void clearAllSharedCacheTableLocks(Btree *p){\n  BtShared *pBt = p->pBt;\n  BtLock **ppIter = &pBt->pLock;\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( p->sharable || 0==*ppIter );\n  assert( p->inTrans>0 );\n\n  SHARED_LOCK_TRACE(pBt, \"clearAllLocks\", 0, 0);\n\n  while( *ppIter ){\n    BtLock *pLock = *ppIter;\n    assert( (pBt->btsFlags & BTS_EXCLUSIVE)==0 || pBt->pWriter==pLock->pBtree );\n    assert( pLock->pBtree->inTrans>=pLock->eLock );\n    if( pLock->pBtree==p ){\n      *ppIter = pLock->pNext;\n      assert( pLock->iTable!=1 || pLock==&p->lock );\n      if( pLock->iTable!=1 ){\n        sqlite3_free(pLock);\n      }\n    }else{\n      ppIter = &pLock->pNext;\n    }\n  }\n\n  assert( (pBt->btsFlags & BTS_PENDING)==0 || pBt->pWriter );\n  if( pBt->pWriter==p ){\n    pBt->pWriter = 0;\n    pBt->btsFlags &= ~(BTS_EXCLUSIVE|BTS_PENDING);\n  }else if( pBt->nTransaction==2 ){\n    /* This function is called when Btree p is concluding its\n    ** transaction. If there currently exists a writer, and p is not\n    ** that writer, then the number of locks held by connections other\n    ** than the writer must be about to drop to zero. In this case\n    ** set the BTS_PENDING flag to 0.\n    **\n    ** If there is not currently a writer, then BTS_PENDING must\n    ** be zero already. So this next line is harmless in that case.\n    */\n    pBt->btsFlags &= ~BTS_PENDING;\n  }\n}\n\n/*\n** This function changes all write-locks held by Btree p into read-locks.\n*/\nstatic void downgradeAllSharedCacheTableLocks(Btree *p){\n  BtShared *pBt = p->pBt;\n\n  SHARED_LOCK_TRACE(pBt, \"downgradeLocks\", 0, 0);\n\n  if( pBt->pWriter==p ){\n    BtLock *pLock;\n    pBt->pWriter = 0;\n    pBt->btsFlags &= ~(BTS_EXCLUSIVE|BTS_PENDING);\n    for(pLock=pBt->pLock; pLock; pLock=pLock->pNext){\n      assert( pLock->eLock==READ_LOCK || pLock->pBtree==p );\n      pLock->eLock = READ_LOCK;\n    }\n  }\n}\n\n#endif /* SQLITE_OMIT_SHARED_CACHE */\n\nstatic void releasePage(MemPage *pPage);         /* Forward reference */\nstatic void releasePageOne(MemPage *pPage);      /* Forward reference */\nstatic void releasePageNotNull(MemPage *pPage);  /* Forward reference */\n\n/*\n***** This routine is used inside of assert() only ****\n**\n** Verify that the cursor holds the mutex on its BtShared\n*/\n#ifdef SQLITE_DEBUG\nstatic int cursorHoldsMutex(BtCursor *p){\n  return sqlite3_mutex_held(p->pBt->mutex);\n}\n\n/* Verify that the cursor and the BtShared agree about what is the current\n** database connetion. This is important in shared-cache mode. If the database\n** connection pointers get out-of-sync, it is possible for routines like\n** btreeInitPage() to reference an stale connection pointer that references a\n** a connection that has already closed.  This routine is used inside assert()\n** statements only and for the purpose of double-checking that the btree code\n** does keep the database connection pointers up-to-date.\n*/\nstatic int cursorOwnsBtShared(BtCursor *p){\n  assert( cursorHoldsMutex(p) );\n  return (p->pBtree->db==p->pBt->db);\n}\n#endif\n\n/*\n** Invalidate the overflow cache of the cursor passed as the first argument.\n** on the shared btree structure pBt.\n*/\n#define invalidateOverflowCache(pCur) (pCur->curFlags &= ~BTCF_ValidOvfl)\n\n/*\n** Invalidate the overflow page-list cache for all cursors opened\n** on the shared btree structure pBt.\n*/\nstatic void invalidateAllOverflowCache(BtShared *pBt){\n  BtCursor *p;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  for(p=pBt->pCursor; p; p=p->pNext){\n    invalidateOverflowCache(p);\n  }\n}\n\n#ifndef SQLITE_OMIT_INCRBLOB\n/*\n** This function is called before modifying the contents of a table\n** to invalidate any incrblob cursors that are open on the\n** row or one of the rows being modified.\n**\n** If argument isClearTable is true, then the entire contents of the\n** table is about to be deleted. In this case invalidate all incrblob\n** cursors open on any row within the table with root-page pgnoRoot.\n**\n** Otherwise, if argument isClearTable is false, then the row with\n** rowid iRow is being replaced or deleted. In this case invalidate\n** only those incrblob cursors open on that specific row.\n*/\nstatic void invalidateIncrblobCursors(\n  Btree *pBtree,          /* The database file to check */\n  Pgno pgnoRoot,          /* The table that might be changing */\n  i64 iRow,               /* The rowid that might be changing */\n  int isClearTable        /* True if all rows are being deleted */\n){\n  BtCursor *p;\n  assert( pBtree->hasIncrblobCur );\n  assert( sqlite3BtreeHoldsMutex(pBtree) );\n  pBtree->hasIncrblobCur = 0;\n  for(p=pBtree->pBt->pCursor; p; p=p->pNext){\n    if( (p->curFlags & BTCF_Incrblob)!=0 ){\n      pBtree->hasIncrblobCur = 1;\n      if( p->pgnoRoot==pgnoRoot && (isClearTable || p->info.nKey==iRow) ){\n        p->eState = CURSOR_INVALID;\n      }\n    }\n  }\n}\n\n#else\n  /* Stub function when INCRBLOB is omitted */\n  #define invalidateIncrblobCursors(w,x,y,z)\n#endif /* SQLITE_OMIT_INCRBLOB */\n\n/*\n** Set bit pgno of the BtShared.pHasContent bitvec. This is called\n** when a page that previously contained data becomes a free-list leaf\n** page.\n**\n** The BtShared.pHasContent bitvec exists to work around an obscure\n** bug caused by the interaction of two useful IO optimizations surrounding\n** free-list leaf pages:\n**\n**   1) When all data is deleted from a page and the page becomes\n**      a free-list leaf page, the page is not written to the database\n**      (as free-list leaf pages contain no meaningful data). Sometimes\n**      such a page is not even journalled (as it will not be modified,\n**      why bother journalling it?).\n**\n**   2) When a free-list leaf page is reused, its content is not read\n**      from the database or written to the journal file (why should it\n**      be, if it is not at all meaningful?).\n**\n** By themselves, these optimizations work fine and provide a handy\n** performance boost to bulk delete or insert operations. However, if\n** a page is moved to the free-list and then reused within the same\n** transaction, a problem comes up. If the page is not journalled when\n** it is moved to the free-list and it is also not journalled when it\n** is extracted from the free-list and reused, then the original data\n** may be lost. In the event of a rollback, it may not be possible\n** to restore the database to its original configuration.\n**\n** The solution is the BtShared.pHasContent bitvec. Whenever a page is\n** moved to become a free-list leaf page, the corresponding bit is\n** set in the bitvec. Whenever a leaf page is extracted from the free-list,\n** optimization 2 above is omitted if the corresponding bit is already\n** set in BtShared.pHasContent. The contents of the bitvec are cleared\n** at the end of every transaction.\n*/\nstatic int btreeSetHasContent(BtShared *pBt, Pgno pgno){\n  int rc = SQLITE_OK;\n  if( !pBt->pHasContent ){\n    assert( pgno<=pBt->nPage );\n    pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);\n    if( !pBt->pHasContent ){\n      rc = SQLITE_NOMEM_BKPT;\n    }\n  }\n  if( rc==SQLITE_OK && pgno<=sqlite3BitvecSize(pBt->pHasContent) ){\n    rc = sqlite3BitvecSet(pBt->pHasContent, pgno);\n  }\n  return rc;\n}\n\n/*\n** Query the BtShared.pHasContent vector.\n**\n** This function is called when a free-list leaf page is removed from the\n** free-list for reuse. It returns false if it is safe to retrieve the\n** page from the pager layer with the 'no-content' flag set. True otherwise.\n*/\nstatic int btreeGetHasContent(BtShared *pBt, Pgno pgno){\n  Bitvec *p = pBt->pHasContent;\n  return p && (pgno>sqlite3BitvecSize(p) || sqlite3BitvecTestNotNull(p, pgno));\n}\n\n/*\n** Clear (destroy) the BtShared.pHasContent bitvec. This should be\n** invoked at the conclusion of each write-transaction.\n*/\nstatic void btreeClearHasContent(BtShared *pBt){\n  sqlite3BitvecDestroy(pBt->pHasContent);\n  pBt->pHasContent = 0;\n}\n\n/*\n** Release all of the apPage[] pages for a cursor.\n*/\nstatic void btreeReleaseAllCursorPages(BtCursor *pCur){\n  int i;\n  if( pCur->iPage>=0 ){\n    for(i=0; i<pCur->iPage; i++){\n      releasePageNotNull(pCur->apPage[i]);\n    }\n    releasePageNotNull(pCur->pPage);\n    pCur->iPage = -1;\n  }\n}\n\n/*\n** The cursor passed as the only argument must point to a valid entry\n** when this function is called (i.e. have eState==CURSOR_VALID). This\n** function saves the current cursor key in variables pCur->nKey and\n** pCur->pKey. SQLITE_OK is returned if successful or an SQLite error\n** code otherwise.\n**\n** If the cursor is open on an intkey table, then the integer key\n** (the rowid) is stored in pCur->nKey and pCur->pKey is left set to\n** NULL. If the cursor is open on a non-intkey table, then pCur->pKey is\n** set to point to a malloced buffer pCur->nKey bytes in size containing\n** the key.\n*/\nstatic int saveCursorKey(BtCursor *pCur){\n  int rc = SQLITE_OK;\n  assert( CURSOR_VALID==pCur->eState );\n  assert( 0==pCur->pKey );\n  assert( cursorHoldsMutex(pCur) );\n\n  if( pCur->curIntKey ){\n    /* Only the rowid is required for a table btree */\n    pCur->nKey = sqlite3BtreeIntegerKey(pCur);\n  }else{\n    /* For an index btree, save the complete key content. It is possible\n    ** that the current key is corrupt. In that case, it is possible that\n    ** the sqlite3VdbeRecordUnpack() function may overread the buffer by\n    ** up to the size of 1 varint plus 1 8-byte value when the cursor\n    ** position is restored. Hence the 17 bytes of padding allocated\n    ** below. */\n    void *pKey;\n    pCur->nKey = sqlite3BtreePayloadSize(pCur);\n    pKey = sqlite3Malloc( ((i64)pCur->nKey) + 9 + 8 );\n    if( pKey ){\n      rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);\n      if( rc==SQLITE_OK ){\n        memset(((u8*)pKey)+pCur->nKey, 0, 9+8);\n        pCur->pKey = pKey;\n      }else{\n        sqlite3_free(pKey);\n      }\n    }else{\n      rc = SQLITE_NOMEM_BKPT;\n    }\n  }\n  assert( !pCur->curIntKey || !pCur->pKey );\n  return rc;\n}\n\n/*\n** Save the current cursor position in the variables BtCursor.nKey\n** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.\n**\n** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)\n** prior to calling this routine.\n*/\nstatic int saveCursorPosition(BtCursor *pCur){\n  int rc;\n\n  assert( CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState );\n  assert( 0==pCur->pKey );\n  assert( cursorHoldsMutex(pCur) );\n\n  if( pCur->curFlags & BTCF_Pinned ){\n    return SQLITE_CONSTRAINT_PINNED;\n  }\n  if( pCur->eState==CURSOR_SKIPNEXT ){\n    pCur->eState = CURSOR_VALID;\n  }else{\n    pCur->skipNext = 0;\n  }\n\n  rc = saveCursorKey(pCur);\n  if( rc==SQLITE_OK ){\n    btreeReleaseAllCursorPages(pCur);\n    pCur->eState = CURSOR_REQUIRESEEK;\n  }\n\n  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl|BTCF_AtLast);\n  return rc;\n}\n\n/* Forward reference */\nstatic int SQLITE_NOINLINE saveCursorsOnList(BtCursor*,Pgno,BtCursor*);\n\n/*\n** Save the positions of all cursors (except pExcept) that are open on\n** the table with root-page iRoot.  \"Saving the cursor position\" means that\n** the location in the btree is remembered in such a way that it can be\n** moved back to the same spot after the btree has been modified.  This\n** routine is called just before cursor pExcept is used to modify the\n** table, for example in BtreeDelete() or BtreeInsert().\n**\n** If there are two or more cursors on the same btree, then all such\n** cursors should have their BTCF_Multiple flag set.  The btreeCursor()\n** routine enforces that rule.  This routine only needs to be called in\n** the uncommon case when pExpect has the BTCF_Multiple flag set.\n**\n** If pExpect!=NULL and if no other cursors are found on the same root-page,\n** then the BTCF_Multiple flag on pExpect is cleared, to avoid another\n** pointless call to this routine.\n**\n** Implementation note:  This routine merely checks to see if any cursors\n** need to be saved.  It calls out to saveCursorsOnList() in the (unusual)\n** event that cursors are in need to being saved.\n*/\nstatic int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){\n  BtCursor *p;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( pExcept==0 || pExcept->pBt==pBt );\n  for(p=pBt->pCursor; p; p=p->pNext){\n    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ) break;\n  }\n  if( p ) return saveCursorsOnList(p, iRoot, pExcept);\n  if( pExcept ) pExcept->curFlags &= ~BTCF_Multiple;\n  return SQLITE_OK;\n}\n\n/* This helper routine to saveAllCursors does the actual work of saving\n** the cursors if and when a cursor is found that actually requires saving.\n** The common case is that no cursors need to be saved, so this routine is\n** broken out from its caller to avoid unnecessary stack pointer movement.\n*/\nstatic int SQLITE_NOINLINE saveCursorsOnList(\n  BtCursor *p,         /* The first cursor that needs saving */\n  Pgno iRoot,          /* Only save cursor with this iRoot. Save all if zero */\n  BtCursor *pExcept    /* Do not save this cursor */\n){\n  do{\n    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ){\n      if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){\n        int rc = saveCursorPosition(p);\n        if( SQLITE_OK!=rc ){\n          return rc;\n        }\n      }else{\n        testcase( p->iPage>=0 );\n        btreeReleaseAllCursorPages(p);\n      }\n    }\n    p = p->pNext;\n  }while( p );\n  return SQLITE_OK;\n}\n\n/*\n** Clear the current cursor position.\n*/\nSQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *pCur){\n  assert( cursorHoldsMutex(pCur) );\n  sqlite3_free(pCur->pKey);\n  pCur->pKey = 0;\n  pCur->eState = CURSOR_INVALID;\n}\n\n/*\n** In this version of BtreeMoveto, pKey is a packed index record\n** such as is generated by the OP_MakeRecord opcode.  Unpack the\n** record and then call sqlite3BtreeIndexMoveto() to do the work.\n*/\nstatic int btreeMoveto(\n  BtCursor *pCur,     /* Cursor open on the btree to be searched */\n  const void *pKey,   /* Packed key if the btree is an index */\n  i64 nKey,           /* Integer key for tables.  Size of pKey for indices */\n  int bias,           /* Bias search to the high end */\n  int *pRes           /* Write search results here */\n){\n  int rc;                    /* Status code */\n  UnpackedRecord *pIdxKey;   /* Unpacked index key */\n\n  if( pKey ){\n    KeyInfo *pKeyInfo = pCur->pKeyInfo;\n    assert( nKey==(i64)(int)nKey );\n    pIdxKey = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);\n    if( pIdxKey==0 ) return SQLITE_NOMEM_BKPT;\n    sqlite3VdbeRecordUnpack((int)nKey, pKey, pIdxKey);\n    if( pIdxKey->nField==0 || pIdxKey->nField>pKeyInfo->nAllField ){\n      rc = SQLITE_CORRUPT_BKPT;\n    }else{\n      rc = sqlite3BtreeIndexMoveto(pCur, pIdxKey, pRes);\n    }\n    sqlite3DbFree(pCur->pKeyInfo->db, pIdxKey);\n  }else{\n    pIdxKey = 0;\n    rc = sqlite3BtreeTableMoveto(pCur, nKey, bias, pRes);\n  }\n  return rc;\n}\n\n/*\n** Restore the cursor to the position it was in (or as close to as possible)\n** when saveCursorPosition() was called. Note that this call deletes the\n** saved position info stored by saveCursorPosition(), so there can be\n** at most one effective restoreCursorPosition() call after each\n** saveCursorPosition().\n*/\nstatic int btreeRestoreCursorPosition(BtCursor *pCur){\n  int rc;\n  int skipNext = 0;\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->eState>=CURSOR_REQUIRESEEK );\n  if( pCur->eState==CURSOR_FAULT ){\n    return pCur->skipNext;\n  }\n  pCur->eState = CURSOR_INVALID;\n  if( sqlite3FaultSim(410) ){\n    rc = SQLITE_IOERR;\n  }else{\n    rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3_free(pCur->pKey);\n    pCur->pKey = 0;\n    assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );\n    if( skipNext ) pCur->skipNext = skipNext;\n    if( pCur->skipNext && pCur->eState==CURSOR_VALID ){\n      pCur->eState = CURSOR_SKIPNEXT;\n    }\n  }\n  return rc;\n}\n\n#define restoreCursorPosition(p) \\\n  (p->eState>=CURSOR_REQUIRESEEK ? \\\n         btreeRestoreCursorPosition(p) : \\\n         SQLITE_OK)\n\n/*\n** Determine whether or not a cursor has moved from the position where\n** it was last placed, or has been invalidated for any other reason.\n** Cursors can move when the row they are pointing at is deleted out\n** from under them, for example.  Cursor might also move if a btree\n** is rebalanced.\n**\n** Calling this routine with a NULL cursor pointer returns false.\n**\n** Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor\n** back to where it ought to be if this routine returns true.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur){\n  assert( EIGHT_BYTE_ALIGNMENT(pCur)\n       || pCur==sqlite3BtreeFakeValidCursor() );\n  assert( offsetof(BtCursor, eState)==0 );\n  assert( sizeof(pCur->eState)==1 );\n  return CURSOR_VALID != *(u8*)pCur;\n}\n\n/*\n** Return a pointer to a fake BtCursor object that will always answer\n** false to the sqlite3BtreeCursorHasMoved() routine above.  The fake\n** cursor returned must not be used with any other Btree interface.\n*/\nSQLITE_PRIVATE BtCursor *sqlite3BtreeFakeValidCursor(void){\n  static u8 fakeCursor = CURSOR_VALID;\n  assert( offsetof(BtCursor, eState)==0 );\n  return (BtCursor*)&fakeCursor;\n}\n\n/*\n** This routine restores a cursor back to its original position after it\n** has been moved by some outside activity (such as a btree rebalance or\n** a row having been deleted out from under the cursor).\n**\n** On success, the *pDifferentRow parameter is false if the cursor is left\n** pointing at exactly the same row.  *pDifferntRow is the row the cursor\n** was pointing to has been deleted, forcing the cursor to point to some\n** nearby row.\n**\n** This routine should only be called for a cursor that just returned\n** TRUE from sqlite3BtreeCursorHasMoved().\n*/\nSQLITE_PRIVATE int sqlite3BtreeCursorRestore(BtCursor *pCur, int *pDifferentRow){\n  int rc;\n\n  assert( pCur!=0 );\n  assert( pCur->eState!=CURSOR_VALID );\n  rc = restoreCursorPosition(pCur);\n  if( rc ){\n    *pDifferentRow = 1;\n    return rc;\n  }\n  if( pCur->eState!=CURSOR_VALID ){\n    *pDifferentRow = 1;\n  }else{\n    *pDifferentRow = 0;\n  }\n  return SQLITE_OK;\n}\n\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n/*\n** Provide hints to the cursor.  The particular hint given (and the type\n** and number of the varargs parameters) is determined by the eHintType\n** parameter.  See the definitions of the BTREE_HINT_* macros for details.\n*/\nSQLITE_PRIVATE void sqlite3BtreeCursorHint(BtCursor *pCur, int eHintType, ...){\n  /* Used only by system that substitute their own storage engine */\n#ifdef SQLITE_DEBUG\n  if( ALWAYS(eHintType==BTREE_HINT_RANGE) ){\n    va_list ap;\n    Expr *pExpr;\n    Walker w;\n    memset(&w, 0, sizeof(w));\n    w.xExprCallback = sqlite3CursorRangeHintExprCheck;\n    va_start(ap, eHintType);\n    pExpr = va_arg(ap, Expr*);\n    w.u.aMem = va_arg(ap, Mem*);\n    va_end(ap);\n    assert( pExpr!=0 );\n    assert( w.u.aMem!=0 );\n    sqlite3WalkExpr(&w, pExpr);\n  }\n#endif /* SQLITE_DEBUG */\n}\n#endif /* SQLITE_ENABLE_CURSOR_HINTS */\n\n\n/*\n** Provide flag hints to the cursor.\n*/\nSQLITE_PRIVATE void sqlite3BtreeCursorHintFlags(BtCursor *pCur, unsigned x){\n  assert( x==BTREE_SEEK_EQ || x==BTREE_BULKLOAD || x==0 );\n  pCur->hints = (u8)x;\n}\n\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n/*\n** Given a page number of a regular database page, return the page\n** number for the pointer-map page that contains the entry for the\n** input page number.\n**\n** Return 0 (not a valid page) for pgno==1 since there is\n** no pointer map associated with page 1.  The integrity_check logic\n** requires that ptrmapPageno(*,1)!=1.\n*/\nstatic Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){\n  int nPagesPerMapPage;\n  Pgno iPtrMap, ret;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  if( pgno<2 ) return 0;\n  nPagesPerMapPage = (pBt->usableSize/5)+1;\n  iPtrMap = (pgno-2)/nPagesPerMapPage;\n  ret = (iPtrMap*nPagesPerMapPage) + 2;\n  if( ret==PENDING_BYTE_PAGE(pBt) ){\n    ret++;\n  }\n  return ret;\n}\n\n/*\n** Write an entry into the pointer map.\n**\n** This routine updates the pointer map entry for page number 'key'\n** so that it maps to type 'eType' and parent page number 'pgno'.\n**\n** If *pRC is initially non-zero (non-SQLITE_OK) then this routine is\n** a no-op.  If an error occurs, the appropriate error code is written\n** into *pRC.\n*/\nstatic void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){\n  DbPage *pDbPage;  /* The pointer map page */\n  u8 *pPtrmap;      /* The pointer map data */\n  Pgno iPtrmap;     /* The pointer map page number */\n  int offset;       /* Offset in pointer map page */\n  int rc;           /* Return code from subfunctions */\n\n  if( *pRC ) return;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  /* The super-journal page number must never be used as a pointer map page */\n  assert( 0==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)) );\n\n  assert( pBt->autoVacuum );\n  if( key==0 ){\n    *pRC = SQLITE_CORRUPT_BKPT;\n    return;\n  }\n  iPtrmap = PTRMAP_PAGENO(pBt, key);\n  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);\n  if( rc!=SQLITE_OK ){\n    *pRC = rc;\n    return;\n  }\n  if( ((char*)sqlite3PagerGetExtra(pDbPage))[0]!=0 ){\n    /* The first byte of the extra data is the MemPage.isInit byte.\n    ** If that byte is set, it means this page is also being used\n    ** as a btree page. */\n    *pRC = SQLITE_CORRUPT_BKPT;\n    goto ptrmap_exit;\n  }\n  offset = PTRMAP_PTROFFSET(iPtrmap, key);\n  if( offset<0 ){\n    *pRC = SQLITE_CORRUPT_BKPT;\n    goto ptrmap_exit;\n  }\n  assert( offset <= (int)pBt->usableSize-5 );\n  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);\n\n  if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){\n    TRACE((\"PTRMAP_UPDATE: %u->(%u,%u)\\n\", key, eType, parent));\n    *pRC= rc = sqlite3PagerWrite(pDbPage);\n    if( rc==SQLITE_OK ){\n      pPtrmap[offset] = eType;\n      put4byte(&pPtrmap[offset+1], parent);\n    }\n  }\n\nptrmap_exit:\n  sqlite3PagerUnref(pDbPage);\n}\n\n/*\n** Read an entry from the pointer map.\n**\n** This routine retrieves the pointer map entry for page 'key', writing\n** the type and parent page number to *pEType and *pPgno respectively.\n** An error code is returned if something goes wrong, otherwise SQLITE_OK.\n*/\nstatic int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){\n  DbPage *pDbPage;   /* The pointer map page */\n  int iPtrmap;       /* Pointer map page index */\n  u8 *pPtrmap;       /* Pointer map page data */\n  int offset;        /* Offset of entry in pointer map */\n  int rc;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n\n  iPtrmap = PTRMAP_PAGENO(pBt, key);\n  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage, 0);\n  if( rc!=0 ){\n    return rc;\n  }\n  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);\n\n  offset = PTRMAP_PTROFFSET(iPtrmap, key);\n  if( offset<0 ){\n    sqlite3PagerUnref(pDbPage);\n    return SQLITE_CORRUPT_BKPT;\n  }\n  assert( offset <= (int)pBt->usableSize-5 );\n  assert( pEType!=0 );\n  *pEType = pPtrmap[offset];\n  if( pPgno ) *pPgno = get4byte(&pPtrmap[offset+1]);\n\n  sqlite3PagerUnref(pDbPage);\n  if( *pEType<1 || *pEType>5 ) return SQLITE_CORRUPT_PGNO(iPtrmap);\n  return SQLITE_OK;\n}\n\n#else /* if defined SQLITE_OMIT_AUTOVACUUM */\n  #define ptrmapPut(w,x,y,z,rc)\n  #define ptrmapGet(w,x,y,z) SQLITE_OK\n  #define ptrmapPutOvflPtr(x, y, z, rc)\n#endif\n\n/*\n** Given a btree page and a cell index (0 means the first cell on\n** the page, 1 means the second cell, and so forth) return a pointer\n** to the cell content.\n**\n** findCellPastPtr() does the same except it skips past the initial\n** 4-byte child pointer found on interior pages, if there is one.\n**\n** This routine works only for pages that do not contain overflow cells.\n*/\n#define findCell(P,I) \\\n  ((P)->aData + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))\n#define findCellPastPtr(P,I) \\\n  ((P)->aDataOfst + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))\n\n\n/*\n** This is common tail processing for btreeParseCellPtr() and\n** btreeParseCellPtrIndex() for the case when the cell does not fit entirely\n** on a single B-tree page.  Make necessary adjustments to the CellInfo\n** structure.\n*/\nstatic SQLITE_NOINLINE void btreeParseCellAdjustSizeForOverflow(\n  MemPage *pPage,         /* Page containing the cell */\n  u8 *pCell,              /* Pointer to the cell text. */\n  CellInfo *pInfo         /* Fill in this structure */\n){\n  /* If the payload will not fit completely on the local page, we have\n  ** to decide how much to store locally and how much to spill onto\n  ** overflow pages.  The strategy is to minimize the amount of unused\n  ** space on overflow pages while keeping the amount of local storage\n  ** in between minLocal and maxLocal.\n  **\n  ** Warning:  changing the way overflow payload is distributed in any\n  ** way will result in an incompatible file format.\n  */\n  int minLocal;  /* Minimum amount of payload held locally */\n  int maxLocal;  /* Maximum amount of payload held locally */\n  int surplus;   /* Overflow payload available for local storage */\n\n  minLocal = pPage->minLocal;\n  maxLocal = pPage->maxLocal;\n  surplus = minLocal + (pInfo->nPayload - minLocal)%(pPage->pBt->usableSize-4);\n  testcase( surplus==maxLocal );\n  testcase( surplus==maxLocal+1 );\n  if( surplus <= maxLocal ){\n    pInfo->nLocal = (u16)surplus;\n  }else{\n    pInfo->nLocal = (u16)minLocal;\n  }\n  pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;\n}\n\n/*\n** Given a record with nPayload bytes of payload stored within btree\n** page pPage, return the number of bytes of payload stored locally.\n*/\nstatic int btreePayloadToLocal(MemPage *pPage, i64 nPayload){\n  int maxLocal;  /* Maximum amount of payload held locally */\n  maxLocal = pPage->maxLocal;\n  assert( nPayload>=0 );\n  if( nPayload<=maxLocal ){\n    return (int)nPayload;\n  }else{\n    int minLocal;  /* Minimum amount of payload held locally */\n    int surplus;   /* Overflow payload available for local storage */\n    minLocal = pPage->minLocal;\n    surplus = (int)(minLocal +(nPayload - minLocal)%(pPage->pBt->usableSize-4));\n    return (surplus <= maxLocal) ? surplus : minLocal;\n  }\n}\n\n/*\n** The following routines are implementations of the MemPage.xParseCell()\n** method.\n**\n** Parse a cell content block and fill in the CellInfo structure.\n**\n** btreeParseCellPtr()        =>   table btree leaf nodes\n** btreeParseCellNoPayload()  =>   table btree internal nodes\n** btreeParseCellPtrIndex()   =>   index btree nodes\n**\n** There is also a wrapper function btreeParseCell() that works for\n** all MemPage types and that references the cell by index rather than\n** by pointer.\n*/\nstatic void btreeParseCellPtrNoPayload(\n  MemPage *pPage,         /* Page containing the cell */\n  u8 *pCell,              /* Pointer to the cell text. */\n  CellInfo *pInfo         /* Fill in this structure */\n){\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->leaf==0 );\n  assert( pPage->childPtrSize==4 );\n#ifndef SQLITE_DEBUG\n  UNUSED_PARAMETER(pPage);\n#endif\n  pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);\n  pInfo->nPayload = 0;\n  pInfo->nLocal = 0;\n  pInfo->pPayload = 0;\n  return;\n}\nstatic void btreeParseCellPtr(\n  MemPage *pPage,         /* Page containing the cell */\n  u8 *pCell,              /* Pointer to the cell text. */\n  CellInfo *pInfo         /* Fill in this structure */\n){\n  u8 *pIter;              /* For scanning through pCell */\n  u32 nPayload;           /* Number of bytes of cell payload */\n  u64 iKey;               /* Extracted Key value */\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->leaf==0 || pPage->leaf==1 );\n  assert( pPage->intKeyLeaf );\n  assert( pPage->childPtrSize==0 );\n  pIter = pCell;\n\n  /* The next block of code is equivalent to:\n  **\n  **     pIter += getVarint32(pIter, nPayload);\n  **\n  ** The code is inlined to avoid a function call.\n  */\n  nPayload = *pIter;\n  if( nPayload>=0x80 ){\n    u8 *pEnd = &pIter[8];\n    nPayload &= 0x7f;\n    do{\n      nPayload = (nPayload<<7) | (*++pIter & 0x7f);\n    }while( (*pIter)>=0x80 && pIter<pEnd );\n  }\n  pIter++;\n\n  /* The next block of code is equivalent to:\n  **\n  **     pIter += getVarint(pIter, (u64*)&pInfo->nKey);\n  **\n  ** The code is inlined and the loop is unrolled for performance.\n  ** This routine is a high-runner.\n  */\n  iKey = *pIter;\n  if( iKey>=0x80 ){\n    u8 x;\n    iKey = (iKey<<7) ^ (x = *++pIter);\n    if( x>=0x80 ){\n      iKey = (iKey<<7) ^ (x = *++pIter);\n      if( x>=0x80 ){\n        iKey = (iKey<<7) ^ 0x10204000 ^ (x = *++pIter);\n        if( x>=0x80 ){\n          iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter);\n          if( x>=0x80 ){\n            iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter);\n            if( x>=0x80 ){\n              iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter);\n              if( x>=0x80 ){\n                iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter);\n                if( x>=0x80 ){\n                  iKey = (iKey<<8) ^ 0x8000 ^ (*++pIter);\n                }\n              }\n            }\n          }\n        }\n      }else{\n        iKey ^= 0x204000;\n      }\n    }else{\n      iKey ^= 0x4000;\n    }\n  }\n  pIter++;\n\n  pInfo->nKey = *(i64*)&iKey;\n  pInfo->nPayload = nPayload;\n  pInfo->pPayload = pIter;\n  testcase( nPayload==pPage->maxLocal );\n  testcase( nPayload==(u32)pPage->maxLocal+1 );\n  assert( nPayload>=0 );\n  assert( pPage->maxLocal <= BT_MAX_LOCAL );\n  if( nPayload<=pPage->maxLocal ){\n    /* This is the (easy) common case where the entire payload fits\n    ** on the local page.  No overflow is required.\n    */\n    pInfo->nSize = (u16)nPayload + (u16)(pIter - pCell);\n    if( pInfo->nSize<4 ) pInfo->nSize = 4;\n    pInfo->nLocal = (u16)nPayload;\n  }else{\n    btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);\n  }\n}\nstatic void btreeParseCellPtrIndex(\n  MemPage *pPage,         /* Page containing the cell */\n  u8 *pCell,              /* Pointer to the cell text. */\n  CellInfo *pInfo         /* Fill in this structure */\n){\n  u8 *pIter;              /* For scanning through pCell */\n  u32 nPayload;           /* Number of bytes of cell payload */\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->leaf==0 || pPage->leaf==1 );\n  assert( pPage->intKeyLeaf==0 );\n  pIter = pCell + pPage->childPtrSize;\n  nPayload = *pIter;\n  if( nPayload>=0x80 ){\n    u8 *pEnd = &pIter[8];\n    nPayload &= 0x7f;\n    do{\n      nPayload = (nPayload<<7) | (*++pIter & 0x7f);\n    }while( *(pIter)>=0x80 && pIter<pEnd );\n  }\n  pIter++;\n  pInfo->nKey = nPayload;\n  pInfo->nPayload = nPayload;\n  pInfo->pPayload = pIter;\n  testcase( nPayload==pPage->maxLocal );\n  testcase( nPayload==(u32)pPage->maxLocal+1 );\n  assert( nPayload>=0 );\n  assert( pPage->maxLocal <= BT_MAX_LOCAL );\n  if( nPayload<=pPage->maxLocal ){\n    /* This is the (easy) common case where the entire payload fits\n    ** on the local page.  No overflow is required.\n    */\n    pInfo->nSize = (u16)nPayload + (u16)(pIter - pCell);\n    if( pInfo->nSize<4 ) pInfo->nSize = 4;\n    pInfo->nLocal = (u16)nPayload;\n  }else{\n    btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);\n  }\n}\nstatic void btreeParseCell(\n  MemPage *pPage,         /* Page containing the cell */\n  int iCell,              /* The cell index.  First cell is 0 */\n  CellInfo *pInfo         /* Fill in this structure */\n){\n  pPage->xParseCell(pPage, findCell(pPage, iCell), pInfo);\n}\n\n/*\n** The following routines are implementations of the MemPage.xCellSize\n** method.\n**\n** Compute the total number of bytes that a Cell needs in the cell\n** data area of the btree-page.  The return number includes the cell\n** data header and the local payload, but not any overflow page or\n** the space used by the cell pointer.\n**\n** cellSizePtrNoPayload()    =>   table internal nodes\n** cellSizePtrTableLeaf()    =>   table leaf nodes\n** cellSizePtr()             =>   index internal nodes\n** cellSizeIdxLeaf()         =>   index leaf nodes\n*/\nstatic u16 cellSizePtr(MemPage *pPage, u8 *pCell){\n  u8 *pIter = pCell + 4;                   /* For looping over bytes of pCell */\n  u8 *pEnd;                                /* End mark for a varint */\n  u32 nSize;                               /* Size value to return */\n\n#ifdef SQLITE_DEBUG\n  /* The value returned by this function should always be the same as\n  ** the (CellInfo.nSize) value found by doing a full parse of the\n  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of\n  ** this function verifies that this invariant is not violated. */\n  CellInfo debuginfo;\n  pPage->xParseCell(pPage, pCell, &debuginfo);\n#endif\n\n  assert( pPage->childPtrSize==4 );\n  nSize = *pIter;\n  if( nSize>=0x80 ){\n    pEnd = &pIter[8];\n    nSize &= 0x7f;\n    do{\n      nSize = (nSize<<7) | (*++pIter & 0x7f);\n    }while( *(pIter)>=0x80 && pIter<pEnd );\n  }\n  pIter++;\n  testcase( nSize==pPage->maxLocal );\n  testcase( nSize==(u32)pPage->maxLocal+1 );\n  if( nSize<=pPage->maxLocal ){\n    nSize += (u32)(pIter - pCell);\n    assert( nSize>4 );\n  }else{\n    int minLocal = pPage->minLocal;\n    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);\n    testcase( nSize==pPage->maxLocal );\n    testcase( nSize==(u32)pPage->maxLocal+1 );\n    if( nSize>pPage->maxLocal ){\n      nSize = minLocal;\n    }\n    nSize += 4 + (u16)(pIter - pCell);\n  }\n  assert( nSize==debuginfo.nSize || CORRUPT_DB );\n  return (u16)nSize;\n}\nstatic u16 cellSizePtrIdxLeaf(MemPage *pPage, u8 *pCell){\n  u8 *pIter = pCell;                       /* For looping over bytes of pCell */\n  u8 *pEnd;                                /* End mark for a varint */\n  u32 nSize;                               /* Size value to return */\n\n#ifdef SQLITE_DEBUG\n  /* The value returned by this function should always be the same as\n  ** the (CellInfo.nSize) value found by doing a full parse of the\n  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of\n  ** this function verifies that this invariant is not violated. */\n  CellInfo debuginfo;\n  pPage->xParseCell(pPage, pCell, &debuginfo);\n#endif\n\n  assert( pPage->childPtrSize==0 );\n  nSize = *pIter;\n  if( nSize>=0x80 ){\n    pEnd = &pIter[8];\n    nSize &= 0x7f;\n    do{\n      nSize = (nSize<<7) | (*++pIter & 0x7f);\n    }while( *(pIter)>=0x80 && pIter<pEnd );\n  }\n  pIter++;\n  testcase( nSize==pPage->maxLocal );\n  testcase( nSize==(u32)pPage->maxLocal+1 );\n  if( nSize<=pPage->maxLocal ){\n    nSize += (u32)(pIter - pCell);\n    if( nSize<4 ) nSize = 4;\n  }else{\n    int minLocal = pPage->minLocal;\n    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);\n    testcase( nSize==pPage->maxLocal );\n    testcase( nSize==(u32)pPage->maxLocal+1 );\n    if( nSize>pPage->maxLocal ){\n      nSize = minLocal;\n    }\n    nSize += 4 + (u16)(pIter - pCell);\n  }\n  assert( nSize==debuginfo.nSize || CORRUPT_DB );\n  return (u16)nSize;\n}\nstatic u16 cellSizePtrNoPayload(MemPage *pPage, u8 *pCell){\n  u8 *pIter = pCell + 4; /* For looping over bytes of pCell */\n  u8 *pEnd;              /* End mark for a varint */\n\n#ifdef SQLITE_DEBUG\n  /* The value returned by this function should always be the same as\n  ** the (CellInfo.nSize) value found by doing a full parse of the\n  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of\n  ** this function verifies that this invariant is not violated. */\n  CellInfo debuginfo;\n  pPage->xParseCell(pPage, pCell, &debuginfo);\n#else\n  UNUSED_PARAMETER(pPage);\n#endif\n\n  assert( pPage->childPtrSize==4 );\n  pEnd = pIter + 9;\n  while( (*pIter++)&0x80 && pIter<pEnd );\n  assert( debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB );\n  return (u16)(pIter - pCell);\n}\nstatic u16 cellSizePtrTableLeaf(MemPage *pPage, u8 *pCell){\n  u8 *pIter = pCell;   /* For looping over bytes of pCell */\n  u8 *pEnd;            /* End mark for a varint */\n  u32 nSize;           /* Size value to return */\n\n#ifdef SQLITE_DEBUG\n  /* The value returned by this function should always be the same as\n  ** the (CellInfo.nSize) value found by doing a full parse of the\n  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of\n  ** this function verifies that this invariant is not violated. */\n  CellInfo debuginfo;\n  pPage->xParseCell(pPage, pCell, &debuginfo);\n#endif\n\n  nSize = *pIter;\n  if( nSize>=0x80 ){\n    pEnd = &pIter[8];\n    nSize &= 0x7f;\n    do{\n      nSize = (nSize<<7) | (*++pIter & 0x7f);\n    }while( *(pIter)>=0x80 && pIter<pEnd );\n  }\n  pIter++;\n  /* pIter now points at the 64-bit integer key value, a variable length\n  ** integer. The following block moves pIter to point at the first byte\n  ** past the end of the key value. */\n  if( (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80\n   && (*pIter++)&0x80 ){ pIter++; }\n  testcase( nSize==pPage->maxLocal );\n  testcase( nSize==(u32)pPage->maxLocal+1 );\n  if( nSize<=pPage->maxLocal ){\n    nSize += (u32)(pIter - pCell);\n    if( nSize<4 ) nSize = 4;\n  }else{\n    int minLocal = pPage->minLocal;\n    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);\n    testcase( nSize==pPage->maxLocal );\n    testcase( nSize==(u32)pPage->maxLocal+1 );\n    if( nSize>pPage->maxLocal ){\n      nSize = minLocal;\n    }\n    nSize += 4 + (u16)(pIter - pCell);\n  }\n  assert( nSize==debuginfo.nSize || CORRUPT_DB );\n  return (u16)nSize;\n}\n\n\n#ifdef SQLITE_DEBUG\n/* This variation on cellSizePtr() is used inside of assert() statements\n** only. */\nstatic u16 cellSize(MemPage *pPage, int iCell){\n  return pPage->xCellSize(pPage, findCell(pPage, iCell));\n}\n#endif\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n/*\n** The cell pCell is currently part of page pSrc but will ultimately be part\n** of pPage.  (pSrc and pPage are often the same.)  If pCell contains a\n** pointer to an overflow page, insert an entry into the pointer-map for\n** the overflow page that will be valid after pCell has been moved to pPage.\n*/\nstatic void ptrmapPutOvflPtr(MemPage *pPage, MemPage *pSrc, u8 *pCell,int *pRC){\n  CellInfo info;\n  if( *pRC ) return;\n  assert( pCell!=0 );\n  pPage->xParseCell(pPage, pCell, &info);\n  if( info.nLocal<info.nPayload ){\n    Pgno ovfl;\n    if( SQLITE_OVERFLOW(pSrc->aDataEnd, pCell, pCell+info.nLocal) ){\n      testcase( pSrc!=pPage );\n      *pRC = SQLITE_CORRUPT_BKPT;\n      return;\n    }\n    ovfl = get4byte(&pCell[info.nSize-4]);\n    ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);\n  }\n}\n#endif\n\n\n/*\n** Defragment the page given. This routine reorganizes cells within the\n** page so that there are no free-blocks on the free-block list.\n**\n** Parameter nMaxFrag is the maximum amount of fragmented space that may be\n** present in the page after this routine returns.\n**\n** EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a\n** b-tree page so that there are no freeblocks or fragment bytes, all\n** unused bytes are contained in the unallocated space region, and all\n** cells are packed tightly at the end of the page.\n*/\nstatic int defragmentPage(MemPage *pPage, int nMaxFrag){\n  int i;                     /* Loop counter */\n  int pc;                    /* Address of the i-th cell */\n  int hdr;                   /* Offset to the page header */\n  int size;                  /* Size of a cell */\n  int usableSize;            /* Number of usable bytes on a page */\n  int cellOffset;            /* Offset to the cell pointer array */\n  int cbrk;                  /* Offset to the cell content area */\n  int nCell;                 /* Number of cells on the page */\n  unsigned char *data;       /* The page data */\n  unsigned char *temp;       /* Temp area for cell content */\n  unsigned char *src;        /* Source of content */\n  int iCellFirst;            /* First allowable cell index */\n  int iCellLast;             /* Last possible cell index */\n  int iCellStart;            /* First cell offset in input */\n\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  assert( pPage->pBt!=0 );\n  assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );\n  assert( pPage->nOverflow==0 );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  data = pPage->aData;\n  hdr = pPage->hdrOffset;\n  cellOffset = pPage->cellOffset;\n  nCell = pPage->nCell;\n  assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );\n  iCellFirst = cellOffset + 2*nCell;\n  usableSize = pPage->pBt->usableSize;\n\n  /* This block handles pages with two or fewer free blocks and nMaxFrag\n  ** or fewer fragmented bytes. In this case it is faster to move the\n  ** two (or one) blocks of cells using memmove() and add the required\n  ** offsets to each pointer in the cell-pointer array than it is to\n  ** reconstruct the entire page.  */\n  if( (int)data[hdr+7]<=nMaxFrag ){\n    int iFree = get2byte(&data[hdr+1]);\n    if( iFree>usableSize-4 ) return SQLITE_CORRUPT_PAGE(pPage);\n    if( iFree ){\n      int iFree2 = get2byte(&data[iFree]);\n      if( iFree2>usableSize-4 ) return SQLITE_CORRUPT_PAGE(pPage);\n      if( 0==iFree2 || (data[iFree2]==0 && data[iFree2+1]==0) ){\n        u8 *pEnd = &data[cellOffset + nCell*2];\n        u8 *pAddr;\n        int sz2 = 0;\n        int sz = get2byte(&data[iFree+2]);\n        int top = get2byte(&data[hdr+5]);\n        if( top>=iFree ){\n          return SQLITE_CORRUPT_PAGE(pPage);\n        }\n        if( iFree2 ){\n          if( iFree+sz>iFree2 ) return SQLITE_CORRUPT_PAGE(pPage);\n          sz2 = get2byte(&data[iFree2+2]);\n          if( iFree2+sz2 > usableSize ) return SQLITE_CORRUPT_PAGE(pPage);\n          memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));\n          sz += sz2;\n        }else if( iFree+sz>usableSize ){\n          return SQLITE_CORRUPT_PAGE(pPage);\n        }\n\n        cbrk = top+sz;\n        assert( cbrk+(iFree-top) <= usableSize );\n        memmove(&data[cbrk], &data[top], iFree-top);\n        for(pAddr=&data[cellOffset]; pAddr<pEnd; pAddr+=2){\n          pc = get2byte(pAddr);\n          if( pc<iFree ){ put2byte(pAddr, pc+sz); }\n          else if( pc<iFree2 ){ put2byte(pAddr, pc+sz2); }\n        }\n        goto defragment_out;\n      }\n    }\n  }\n\n  cbrk = usableSize;\n  iCellLast = usableSize - 4;\n  iCellStart = get2byte(&data[hdr+5]);\n  if( nCell>0 ){\n    temp = sqlite3PagerTempSpace(pPage->pBt->pPager);\n    memcpy(temp, data, usableSize);\n    src = temp;\n    for(i=0; i<nCell; i++){\n      u8 *pAddr;     /* The i-th cell pointer */\n      pAddr = &data[cellOffset + i*2];\n      pc = get2byte(pAddr);\n      testcase( pc==iCellFirst );\n      testcase( pc==iCellLast );\n      /* These conditions have already been verified in btreeInitPage()\n      ** if PRAGMA cell_size_check=ON.\n      */\n      if( pc>iCellLast ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      assert( pc>=0 && pc<=iCellLast );\n      size = pPage->xCellSize(pPage, &src[pc]);\n      cbrk -= size;\n      if( cbrk<iCellStart || pc+size>usableSize ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      assert( cbrk+size<=usableSize && cbrk>=iCellStart );\n      testcase( cbrk+size==usableSize );\n      testcase( pc+size==usableSize );\n      put2byte(pAddr, cbrk);\n      memcpy(&data[cbrk], &src[pc], size);\n    }\n  }\n  data[hdr+7] = 0;\n\ndefragment_out:\n  assert( pPage->nFree>=0 );\n  if( data[hdr+7]+cbrk-iCellFirst!=pPage->nFree ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  assert( cbrk>=iCellFirst );\n  put2byte(&data[hdr+5], cbrk);\n  data[hdr+1] = 0;\n  data[hdr+2] = 0;\n  memset(&data[iCellFirst], 0, cbrk-iCellFirst);\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  return SQLITE_OK;\n}\n\n/*\n** Search the free-list on page pPg for space to store a cell nByte bytes in\n** size. If one can be found, return a pointer to the space and remove it\n** from the free-list.\n**\n** If no suitable space can be found on the free-list, return NULL.\n**\n** This function may detect corruption within pPg.  If corruption is\n** detected then *pRc is set to SQLITE_CORRUPT and NULL is returned.\n**\n** Slots on the free list that are between 1 and 3 bytes larger than nByte\n** will be ignored if adding the extra space to the fragmentation count\n** causes the fragmentation count to exceed 60.\n*/\nstatic u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){\n  const int hdr = pPg->hdrOffset;            /* Offset to page header */\n  u8 * const aData = pPg->aData;             /* Page data */\n  int iAddr = hdr + 1;                       /* Address of ptr to pc */\n  u8 *pTmp = &aData[iAddr];                  /* Temporary ptr into aData[] */\n  int pc = get2byte(pTmp);                   /* Address of a free slot */\n  int x;                                     /* Excess size of the slot */\n  int maxPC = pPg->pBt->usableSize - nByte;  /* Max address for a usable slot */\n  int size;                                  /* Size of the free slot */\n\n  assert( pc>0 );\n  while( pc<=maxPC ){\n    /* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each\n    ** freeblock form a big-endian integer which is the size of the freeblock\n    ** in bytes, including the 4-byte header. */\n    pTmp = &aData[pc+2];\n    size = get2byte(pTmp);\n    if( (x = size - nByte)>=0 ){\n      testcase( x==4 );\n      testcase( x==3 );\n      if( x<4 ){\n        /* EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total\n        ** number of bytes in fragments may not exceed 60. */\n        if( aData[hdr+7]>57 ) return 0;\n\n        /* Remove the slot from the free-list. Update the number of\n        ** fragmented bytes within the page. */\n        memcpy(&aData[iAddr], &aData[pc], 2);\n        aData[hdr+7] += (u8)x;\n        return &aData[pc];\n      }else if( x+pc > maxPC ){\n        /* This slot extends off the end of the usable part of the page */\n        *pRc = SQLITE_CORRUPT_PAGE(pPg);\n        return 0;\n      }else{\n        /* The slot remains on the free-list. Reduce its size to account\n        ** for the portion used by the new allocation. */\n        put2byte(&aData[pc+2], x);\n      }\n      return &aData[pc + x];\n    }\n    iAddr = pc;\n    pTmp = &aData[pc];\n    pc = get2byte(pTmp);\n    if( pc<=iAddr ){\n      if( pc ){\n        /* The next slot in the chain comes before the current slot */\n        *pRc = SQLITE_CORRUPT_PAGE(pPg);\n      }\n      return 0;\n    }\n  }\n  if( pc>maxPC+nByte-4 ){\n    /* The free slot chain extends off the end of the page */\n    *pRc = SQLITE_CORRUPT_PAGE(pPg);\n  }\n  return 0;\n}\n\n/*\n** Allocate nByte bytes of space from within the B-Tree page passed\n** as the first argument. Write into *pIdx the index into pPage->aData[]\n** of the first byte of allocated space. Return either SQLITE_OK or\n** an error code (usually SQLITE_CORRUPT).\n**\n** The caller guarantees that there is sufficient space to make the\n** allocation.  This routine might need to defragment in order to bring\n** all the space together, however.  This routine will avoid using\n** the first two bytes past the cell pointer area since presumably this\n** allocation is being made in order to insert a new cell, so we will\n** also end up needing a new cell pointer.\n*/\nstatic SQLITE_INLINE int allocateSpace(MemPage *pPage, int nByte, int *pIdx){\n  const int hdr = pPage->hdrOffset;    /* Local cache of pPage->hdrOffset */\n  u8 * const data = pPage->aData;      /* Local cache of pPage->aData */\n  int top;                             /* First byte of cell content area */\n  int rc = SQLITE_OK;                  /* Integer return code */\n  u8 *pTmp;                            /* Temp ptr into data[] */\n  int gap;        /* First byte of gap between cell pointers and cell content */\n\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  assert( pPage->pBt );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( nByte>=0 );  /* Minimum cell size is 4 */\n  assert( pPage->nFree>=nByte );\n  assert( pPage->nOverflow==0 );\n  assert( nByte < (int)(pPage->pBt->usableSize-8) );\n\n  assert( pPage->cellOffset == hdr + 12 - 4*pPage->leaf );\n  gap = pPage->cellOffset + 2*pPage->nCell;\n  assert( gap<=65536 );\n  /* EVIDENCE-OF: R-29356-02391 If the database uses a 65536-byte page size\n  ** and the reserved space is zero (the usual value for reserved space)\n  ** then the cell content offset of an empty page wants to be 65536.\n  ** However, that integer is too large to be stored in a 2-byte unsigned\n  ** integer, so a value of 0 is used in its place. */\n  pTmp = &data[hdr+5];\n  top = get2byte(pTmp);\n  if( gap>top ){\n    if( top==0 && pPage->pBt->usableSize==65536 ){\n      top = 65536;\n    }else{\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n  }else if( top>(int)pPage->pBt->usableSize ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n\n  /* If there is enough space between gap and top for one more cell pointer,\n  ** and if the freelist is not empty, then search the\n  ** freelist looking for a slot big enough to satisfy the request.\n  */\n  testcase( gap+2==top );\n  testcase( gap+1==top );\n  testcase( gap==top );\n  if( (data[hdr+2] || data[hdr+1]) && gap+2<=top ){\n    u8 *pSpace = pageFindSlot(pPage, nByte, &rc);\n    if( pSpace ){\n      int g2;\n      assert( pSpace+nByte<=data+pPage->pBt->usableSize );\n      *pIdx = g2 = (int)(pSpace-data);\n      if( g2<=gap ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }else{\n        return SQLITE_OK;\n      }\n    }else if( rc ){\n      return rc;\n    }\n  }\n\n  /* The request could not be fulfilled using a freelist slot.  Check\n  ** to see if defragmentation is necessary.\n  */\n  testcase( gap+2+nByte==top );\n  if( gap+2+nByte>top ){\n    assert( pPage->nCell>0 || CORRUPT_DB );\n    assert( pPage->nFree>=0 );\n    rc = defragmentPage(pPage, MIN(4, pPage->nFree - (2+nByte)));\n    if( rc ) return rc;\n    top = get2byteNotZero(&data[hdr+5]);\n    assert( gap+2+nByte<=top );\n  }\n\n\n  /* Allocate memory from the gap in between the cell pointer array\n  ** and the cell content area.  The btreeComputeFreeSpace() call has already\n  ** validated the freelist.  Given that the freelist is valid, there\n  ** is no way that the allocation can extend off the end of the page.\n  ** The assert() below verifies the previous sentence.\n  */\n  top -= nByte;\n  put2byte(&data[hdr+5], top);\n  assert( top+nByte <= (int)pPage->pBt->usableSize );\n  *pIdx = top;\n  return SQLITE_OK;\n}\n\n/*\n** Return a section of the pPage->aData to the freelist.\n** The first byte of the new free block is pPage->aData[iStart]\n** and the size of the block is iSize bytes.\n**\n** Adjacent freeblocks are coalesced.\n**\n** Even though the freeblock list was checked by btreeComputeFreeSpace(),\n** that routine will not detect overlap between cells or freeblocks.  Nor\n** does it detect cells or freeblocks that encroach into the reserved bytes\n** at the end of the page.  So do additional corruption checks inside this\n** routine and return SQLITE_CORRUPT if any problems are found.\n*/\nstatic int freeSpace(MemPage *pPage, int iStart, int iSize){\n  int iPtr;                             /* Address of ptr to next freeblock */\n  int iFreeBlk;                         /* Address of the next freeblock */\n  u8 hdr;                               /* Page header size.  0 or 100 */\n  int nFrag = 0;                        /* Reduction in fragmentation */\n  int iOrigSize = iSize;                /* Original value of iSize */\n  int x;                                /* Offset to cell content area */\n  int iEnd = iStart + iSize;            /* First byte past the iStart buffer */\n  unsigned char *data = pPage->aData;   /* Page content */\n  u8 *pTmp;                             /* Temporary ptr into data[] */\n\n  assert( pPage->pBt!=0 );\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  assert( CORRUPT_DB || iStart>=pPage->hdrOffset+6+pPage->childPtrSize );\n  assert( CORRUPT_DB || iEnd <= (int)pPage->pBt->usableSize );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( iSize>=4 );   /* Minimum cell size is 4 */\n  assert( CORRUPT_DB || iStart<=(int)pPage->pBt->usableSize-4 );\n\n  /* The list of freeblocks must be in ascending order.  Find the\n  ** spot on the list where iStart should be inserted.\n  */\n  hdr = pPage->hdrOffset;\n  iPtr = hdr + 1;\n  if( data[iPtr+1]==0 && data[iPtr]==0 ){\n    iFreeBlk = 0;  /* Shortcut for the case when the freelist is empty */\n  }else{\n    while( (iFreeBlk = get2byte(&data[iPtr]))<iStart ){\n      if( iFreeBlk<=iPtr ){\n        if( iFreeBlk==0 ) break; /* TH3: corrupt082.100 */\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      iPtr = iFreeBlk;\n    }\n    if( iFreeBlk>(int)pPage->pBt->usableSize-4 ){ /* TH3: corrupt081.100 */\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    assert( iFreeBlk>iPtr || iFreeBlk==0 || CORRUPT_DB );\n\n    /* At this point:\n    **    iFreeBlk:   First freeblock after iStart, or zero if none\n    **    iPtr:       The address of a pointer to iFreeBlk\n    **\n    ** Check to see if iFreeBlk should be coalesced onto the end of iStart.\n    */\n    if( iFreeBlk && iEnd+3>=iFreeBlk ){\n      nFrag = iFreeBlk - iEnd;\n      if( iEnd>iFreeBlk ) return SQLITE_CORRUPT_PAGE(pPage);\n      iEnd = iFreeBlk + get2byte(&data[iFreeBlk+2]);\n      if( iEnd > (int)pPage->pBt->usableSize ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      iSize = iEnd - iStart;\n      iFreeBlk = get2byte(&data[iFreeBlk]);\n    }\n\n    /* If iPtr is another freeblock (that is, if iPtr is not the freelist\n    ** pointer in the page header) then check to see if iStart should be\n    ** coalesced onto the end of iPtr.\n    */\n    if( iPtr>hdr+1 ){\n      int iPtrEnd = iPtr + get2byte(&data[iPtr+2]);\n      if( iPtrEnd+3>=iStart ){\n        if( iPtrEnd>iStart ) return SQLITE_CORRUPT_PAGE(pPage);\n        nFrag += iStart - iPtrEnd;\n        iSize = iEnd - iPtr;\n        iStart = iPtr;\n      }\n    }\n    if( nFrag>data[hdr+7] ) return SQLITE_CORRUPT_PAGE(pPage);\n    data[hdr+7] -= (u8)nFrag;\n  }\n  pTmp = &data[hdr+5];\n  x = get2byte(pTmp);\n  if( pPage->pBt->btsFlags & BTS_FAST_SECURE ){\n    /* Overwrite deleted information with zeros when the secure_delete\n    ** option is enabled */\n    memset(&data[iStart], 0, iSize);\n  }\n  if( iStart<=x ){\n    /* The new freeblock is at the beginning of the cell content area,\n    ** so just extend the cell content area rather than create another\n    ** freelist entry */\n    if( iStart<x ) return SQLITE_CORRUPT_PAGE(pPage);\n    if( iPtr!=hdr+1 ) return SQLITE_CORRUPT_PAGE(pPage);\n    put2byte(&data[hdr+1], iFreeBlk);\n    put2byte(&data[hdr+5], iEnd);\n  }else{\n    /* Insert the new freeblock into the freelist */\n    put2byte(&data[iPtr], iStart);\n    put2byte(&data[iStart], iFreeBlk);\n    assert( iSize>=0 && iSize<=0xffff );\n    put2byte(&data[iStart+2], (u16)iSize);\n  }\n  pPage->nFree += iOrigSize;\n  return SQLITE_OK;\n}\n\n/*\n** Decode the flags byte (the first byte of the header) for a page\n** and initialize fields of the MemPage structure accordingly.\n**\n** Only the following combinations are supported.  Anything different\n** indicates a corrupt database files:\n**\n**         PTF_ZERODATA                             (0x02,  2)\n**         PTF_LEAFDATA | PTF_INTKEY                (0x05,  5)\n**         PTF_ZERODATA | PTF_LEAF                  (0x0a, 10)\n**         PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF     (0x0d, 13)\n*/\nstatic int decodeFlags(MemPage *pPage, int flagByte){\n  BtShared *pBt;     /* A copy of pPage->pBt */\n\n  assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  pBt = pPage->pBt;\n  pPage->max1bytePayload = pBt->max1bytePayload;\n  if( flagByte>=(PTF_ZERODATA | PTF_LEAF) ){\n    pPage->childPtrSize = 0;\n    pPage->leaf = 1;\n    if( flagByte==(PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF) ){\n      pPage->intKeyLeaf = 1;\n      pPage->xCellSize = cellSizePtrTableLeaf;\n      pPage->xParseCell = btreeParseCellPtr;\n      pPage->intKey = 1;\n      pPage->maxLocal = pBt->maxLeaf;\n      pPage->minLocal = pBt->minLeaf;\n    }else if( flagByte==(PTF_ZERODATA | PTF_LEAF) ){\n      pPage->intKey = 0;\n      pPage->intKeyLeaf = 0;\n      pPage->xCellSize = cellSizePtrIdxLeaf;\n      pPage->xParseCell = btreeParseCellPtrIndex;\n      pPage->maxLocal = pBt->maxLocal;\n      pPage->minLocal = pBt->minLocal;\n    }else{\n      pPage->intKey = 0;\n      pPage->intKeyLeaf = 0;\n      pPage->xCellSize = cellSizePtrIdxLeaf;\n      pPage->xParseCell = btreeParseCellPtrIndex;\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n  }else{\n    pPage->childPtrSize = 4;\n    pPage->leaf = 0;\n    if( flagByte==(PTF_ZERODATA) ){\n      pPage->intKey = 0;\n      pPage->intKeyLeaf = 0;\n      pPage->xCellSize = cellSizePtr;\n      pPage->xParseCell = btreeParseCellPtrIndex;\n      pPage->maxLocal = pBt->maxLocal;\n      pPage->minLocal = pBt->minLocal;\n    }else if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){\n      pPage->intKeyLeaf = 0;\n      pPage->xCellSize = cellSizePtrNoPayload;\n      pPage->xParseCell = btreeParseCellPtrNoPayload;\n      pPage->intKey = 1;\n      pPage->maxLocal = pBt->maxLeaf;\n      pPage->minLocal = pBt->minLeaf;\n    }else{\n      pPage->intKey = 0;\n      pPage->intKeyLeaf = 0;\n      pPage->xCellSize = cellSizePtr;\n      pPage->xParseCell = btreeParseCellPtrIndex;\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Compute the amount of freespace on the page.  In other words, fill\n** in the pPage->nFree field.\n*/\nstatic int btreeComputeFreeSpace(MemPage *pPage){\n  int pc;            /* Address of a freeblock within pPage->aData[] */\n  u8 hdr;            /* Offset to beginning of page header */\n  u8 *data;          /* Equal to pPage->aData */\n  int usableSize;    /* Amount of usable space on each page */\n  int nFree;         /* Number of unused bytes on the page */\n  int top;           /* First byte of the cell content area */\n  int iCellFirst;    /* First allowable cell or freeblock offset */\n  int iCellLast;     /* Last possible cell or freeblock offset */\n\n  assert( pPage->pBt!=0 );\n  assert( pPage->pBt->db!=0 );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );\n  assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );\n  assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );\n  assert( pPage->isInit==1 );\n  assert( pPage->nFree<0 );\n\n  usableSize = pPage->pBt->usableSize;\n  hdr = pPage->hdrOffset;\n  data = pPage->aData;\n  /* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates\n  ** the start of the cell content area. A zero value for this integer is\n  ** interpreted as 65536. */\n  top = get2byteNotZero(&data[hdr+5]);\n  iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;\n  iCellLast = usableSize - 4;\n\n  /* Compute the total free space on the page\n  ** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the\n  ** start of the first freeblock on the page, or is zero if there are no\n  ** freeblocks. */\n  pc = get2byte(&data[hdr+1]);\n  nFree = data[hdr+7] + top;  /* Init nFree to non-freeblock free space */\n  if( pc>0 ){\n    u32 next, size;\n    if( pc<top ){\n      /* EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will\n      ** always be at least one cell before the first freeblock.\n      */\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    while( 1 ){\n      if( pc>iCellLast ){\n        /* Freeblock off the end of the page */\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      next = get2byte(&data[pc]);\n      size = get2byte(&data[pc+2]);\n      nFree = nFree + size;\n      if( next<=pc+size+3 ) break;\n      pc = next;\n    }\n    if( next>0 ){\n      /* Freeblock not in ascending order */\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    if( pc+size>(unsigned int)usableSize ){\n      /* Last freeblock extends past page end */\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n  }\n\n  /* At this point, nFree contains the sum of the offset to the start\n  ** of the cell-content area plus the number of free bytes within\n  ** the cell-content area. If this is greater than the usable-size\n  ** of the page, then the page must be corrupted. This check also\n  ** serves to verify that the offset to the start of the cell-content\n  ** area, according to the page header, lies within the page.\n  */\n  if( nFree>usableSize || nFree<iCellFirst ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  pPage->nFree = (u16)(nFree - iCellFirst);\n  return SQLITE_OK;\n}\n\n/*\n** Do additional sanity check after btreeInitPage() if\n** PRAGMA cell_size_check=ON\n*/\nstatic SQLITE_NOINLINE int btreeCellSizeCheck(MemPage *pPage){\n  int iCellFirst;    /* First allowable cell or freeblock offset */\n  int iCellLast;     /* Last possible cell or freeblock offset */\n  int i;             /* Index into the cell pointer array */\n  int sz;            /* Size of a cell */\n  int pc;            /* Address of a freeblock within pPage->aData[] */\n  u8 *data;          /* Equal to pPage->aData */\n  int usableSize;    /* Maximum usable space on the page */\n  int cellOffset;    /* Start of cell content area */\n\n  iCellFirst = pPage->cellOffset + 2*pPage->nCell;\n  usableSize = pPage->pBt->usableSize;\n  iCellLast = usableSize - 4;\n  data = pPage->aData;\n  cellOffset = pPage->cellOffset;\n  if( !pPage->leaf ) iCellLast--;\n  for(i=0; i<pPage->nCell; i++){\n    pc = get2byteAligned(&data[cellOffset+i*2]);\n    testcase( pc==iCellFirst );\n    testcase( pc==iCellLast );\n    if( pc<iCellFirst || pc>iCellLast ){\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    sz = pPage->xCellSize(pPage, &data[pc]);\n    testcase( pc+sz==usableSize );\n    if( pc+sz>usableSize ){\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Initialize the auxiliary information for a disk block.\n**\n** Return SQLITE_OK on success.  If we see that the page does\n** not contain a well-formed database page, then return\n** SQLITE_CORRUPT.  Note that a return of SQLITE_OK does not\n** guarantee that the page is well-formed.  It only shows that\n** we failed to detect any corruption.\n*/\nstatic int btreeInitPage(MemPage *pPage){\n  u8 *data;          /* Equal to pPage->aData */\n  BtShared *pBt;        /* The main btree structure */\n\n  assert( pPage->pBt!=0 );\n  assert( pPage->pBt->db!=0 );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );\n  assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );\n  assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );\n  assert( pPage->isInit==0 );\n\n  pBt = pPage->pBt;\n  data = pPage->aData + pPage->hdrOffset;\n  /* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating\n  ** the b-tree page type. */\n  if( decodeFlags(pPage, data[0]) ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );\n  pPage->maskPage = (u16)(pBt->pageSize - 1);\n  pPage->nOverflow = 0;\n  pPage->cellOffset = (u16)(pPage->hdrOffset + 8 + pPage->childPtrSize);\n  pPage->aCellIdx = data + pPage->childPtrSize + 8;\n  pPage->aDataEnd = pPage->aData + pBt->pageSize;\n  pPage->aDataOfst = pPage->aData + pPage->childPtrSize;\n  /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the\n  ** number of cells on the page. */\n  pPage->nCell = get2byte(&data[3]);\n  if( pPage->nCell>MX_CELL(pBt) ){\n    /* To many cells for a single page.  The page must be corrupt */\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  testcase( pPage->nCell==MX_CELL(pBt) );\n  /* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only\n  ** possible for a root page of a table that contains no rows) then the\n  ** offset to the cell content area will equal the page size minus the\n  ** bytes of reserved space. */\n  assert( pPage->nCell>0\n       || get2byteNotZero(&data[5])==(int)pBt->usableSize\n       || CORRUPT_DB );\n  pPage->nFree = -1;  /* Indicate that this value is yet uncomputed */\n  pPage->isInit = 1;\n  if( pBt->db->flags & SQLITE_CellSizeCk ){\n    return btreeCellSizeCheck(pPage);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Set up a raw page so that it looks like a database page holding\n** no entries.\n*/\nstatic void zeroPage(MemPage *pPage, int flags){\n  unsigned char *data = pPage->aData;\n  BtShared *pBt = pPage->pBt;\n  int hdr = pPage->hdrOffset;\n  int first;\n\n  assert( sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno || CORRUPT_DB );\n  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );\n  assert( sqlite3PagerGetData(pPage->pDbPage) == data );\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  if( pBt->btsFlags & BTS_FAST_SECURE ){\n    memset(&data[hdr], 0, pBt->usableSize - hdr);\n  }\n  data[hdr] = (char)flags;\n  first = hdr + ((flags&PTF_LEAF)==0 ? 12 : 8);\n  memset(&data[hdr+1], 0, 4);\n  data[hdr+7] = 0;\n  put2byte(&data[hdr+5], pBt->usableSize);\n  pPage->nFree = (u16)(pBt->usableSize - first);\n  decodeFlags(pPage, flags);\n  pPage->cellOffset = (u16)first;\n  pPage->aDataEnd = &data[pBt->pageSize];\n  pPage->aCellIdx = &data[first];\n  pPage->aDataOfst = &data[pPage->childPtrSize];\n  pPage->nOverflow = 0;\n  assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );\n  pPage->maskPage = (u16)(pBt->pageSize - 1);\n  pPage->nCell = 0;\n  pPage->isInit = 1;\n}\n\n\n/*\n** Convert a DbPage obtained from the pager into a MemPage used by\n** the btree layer.\n*/\nstatic MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){\n  MemPage *pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);\n  if( pgno!=pPage->pgno ){\n    pPage->aData = sqlite3PagerGetData(pDbPage);\n    pPage->pDbPage = pDbPage;\n    pPage->pBt = pBt;\n    pPage->pgno = pgno;\n    pPage->hdrOffset = pgno==1 ? 100 : 0;\n  }\n  assert( pPage->aData==sqlite3PagerGetData(pDbPage) );\n  return pPage;\n}\n\n/*\n** Get a page from the pager.  Initialize the MemPage.pBt and\n** MemPage.aData elements if needed.  See also: btreeGetUnusedPage().\n**\n** If the PAGER_GET_NOCONTENT flag is set, it means that we do not care\n** about the content of the page at this time.  So do not go to the disk\n** to fetch the content.  Just fill in the content with zeros for now.\n** If in the future we call sqlite3PagerWrite() on this page, that\n** means we have started to be concerned about content and the disk\n** read should occur at that point.\n*/\nstatic int btreeGetPage(\n  BtShared *pBt,       /* The btree */\n  Pgno pgno,           /* Number of the page to fetch */\n  MemPage **ppPage,    /* Return the page in this parameter */\n  int flags            /* PAGER_GET_NOCONTENT or PAGER_GET_READONLY */\n){\n  int rc;\n  DbPage *pDbPage;\n\n  assert( flags==0 || flags==PAGER_GET_NOCONTENT || flags==PAGER_GET_READONLY );\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, flags);\n  if( rc ) return rc;\n  *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);\n  return SQLITE_OK;\n}\n\n/*\n** Retrieve a page from the pager cache. If the requested page is not\n** already in the pager cache return NULL. Initialize the MemPage.pBt and\n** MemPage.aData elements if needed.\n*/\nstatic MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){\n  DbPage *pDbPage;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  pDbPage = sqlite3PagerLookup(pBt->pPager, pgno);\n  if( pDbPage ){\n    return btreePageFromDbPage(pDbPage, pgno, pBt);\n  }\n  return 0;\n}\n\n/*\n** Return the size of the database file in pages. If there is any kind of\n** error, return ((unsigned int)-1).\n*/\nstatic Pgno btreePagecount(BtShared *pBt){\n  return pBt->nPage;\n}\nSQLITE_PRIVATE Pgno sqlite3BtreeLastPage(Btree *p){\n  assert( sqlite3BtreeHoldsMutex(p) );\n  return btreePagecount(p->pBt);\n}\n\n/*\n** Get a page from the pager and initialize it.\n*/\nstatic int getAndInitPage(\n  BtShared *pBt,                  /* The database file */\n  Pgno pgno,                      /* Number of the page to get */\n  MemPage **ppPage,               /* Write the page pointer here */\n  int bReadOnly                   /* True for a read-only page */\n){\n  int rc;\n  DbPage *pDbPage;\n  MemPage *pPage;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n\n  if( pgno>btreePagecount(pBt) ){\n    *ppPage = 0;\n    return SQLITE_CORRUPT_BKPT;\n  }\n  rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);\n  if( rc ){\n    *ppPage = 0;\n    return rc;\n  }\n  pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);\n  if( pPage->isInit==0 ){\n    btreePageFromDbPage(pDbPage, pgno, pBt);\n    rc = btreeInitPage(pPage);\n    if( rc!=SQLITE_OK ){\n      releasePage(pPage);\n      *ppPage = 0;\n      return rc;\n    }\n  }\n  assert( pPage->pgno==pgno || CORRUPT_DB );\n  assert( pPage->aData==sqlite3PagerGetData(pDbPage) );\n  *ppPage = pPage;\n  return SQLITE_OK;\n}\n\n/*\n** Release a MemPage.  This should be called once for each prior\n** call to btreeGetPage.\n**\n** Page1 is a special case and must be released using releasePageOne().\n*/\nstatic void releasePageNotNull(MemPage *pPage){\n  assert( pPage->aData );\n  assert( pPage->pBt );\n  assert( pPage->pDbPage!=0 );\n  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );\n  assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  sqlite3PagerUnrefNotNull(pPage->pDbPage);\n}\nstatic void releasePage(MemPage *pPage){\n  if( pPage ) releasePageNotNull(pPage);\n}\nstatic void releasePageOne(MemPage *pPage){\n  assert( pPage!=0 );\n  assert( pPage->aData );\n  assert( pPage->pBt );\n  assert( pPage->pDbPage!=0 );\n  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );\n  assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  sqlite3PagerUnrefPageOne(pPage->pDbPage);\n}\n\n/*\n** Get an unused page.\n**\n** This works just like btreeGetPage() with the addition:\n**\n**   *  If the page is already in use for some other purpose, immediately\n**      release it and return an SQLITE_CURRUPT error.\n**   *  Make sure the isInit flag is clear\n*/\nstatic int btreeGetUnusedPage(\n  BtShared *pBt,       /* The btree */\n  Pgno pgno,           /* Number of the page to fetch */\n  MemPage **ppPage,    /* Return the page in this parameter */\n  int flags            /* PAGER_GET_NOCONTENT or PAGER_GET_READONLY */\n){\n  int rc = btreeGetPage(pBt, pgno, ppPage, flags);\n  if( rc==SQLITE_OK ){\n    if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){\n      releasePage(*ppPage);\n      *ppPage = 0;\n      return SQLITE_CORRUPT_BKPT;\n    }\n    (*ppPage)->isInit = 0;\n  }else{\n    *ppPage = 0;\n  }\n  return rc;\n}\n\n\n/*\n** During a rollback, when the pager reloads information into the cache\n** so that the cache is restored to its original state at the start of\n** the transaction, for each page restored this routine is called.\n**\n** This routine needs to reset the extra data section at the end of the\n** page to agree with the restored data.\n*/\nstatic void pageReinit(DbPage *pData){\n  MemPage *pPage;\n  pPage = (MemPage *)sqlite3PagerGetExtra(pData);\n  assert( sqlite3PagerPageRefcount(pData)>0 );\n  if( pPage->isInit ){\n    assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n    pPage->isInit = 0;\n    if( sqlite3PagerPageRefcount(pData)>1 ){\n      /* pPage might not be a btree page;  it might be an overflow page\n      ** or ptrmap page or a free page.  In those cases, the following\n      ** call to btreeInitPage() will likely return SQLITE_CORRUPT.\n      ** But no harm is done by this.  And it is very important that\n      ** btreeInitPage() be called on every btree page so we make\n      ** the call for every page that comes in for re-initializing. */\n      btreeInitPage(pPage);\n    }\n  }\n}\n\n/*\n** Invoke the busy handler for a btree.\n*/\nstatic int btreeInvokeBusyHandler(void *pArg){\n  BtShared *pBt = (BtShared*)pArg;\n  assert( pBt->db );\n  assert( sqlite3_mutex_held(pBt->db->mutex) );\n  return sqlite3InvokeBusyHandler(&pBt->db->busyHandler);\n}\n\n/*\n** Open a database file.\n**\n** zFilename is the name of the database file.  If zFilename is NULL\n** then an ephemeral database is created.  The ephemeral database might\n** be exclusively in memory, or it might use a disk-based memory cache.\n** Either way, the ephemeral database will be automatically deleted\n** when sqlite3BtreeClose() is called.\n**\n** If zFilename is \":memory:\" then an in-memory database is created\n** that is automatically destroyed when it is closed.\n**\n** The \"flags\" parameter is a bitmask that might contain bits like\n** BTREE_OMIT_JOURNAL and/or BTREE_MEMORY.\n**\n** If the database is already opened in the same database connection\n** and we are in shared cache mode, then the open will fail with an\n** SQLITE_CONSTRAINT error.  We cannot allow two or more BtShared\n** objects in the same database connection since doing so will lead\n** to problems with locking.\n*/\nSQLITE_PRIVATE int sqlite3BtreeOpen(\n  sqlite3_vfs *pVfs,      /* VFS to use for this b-tree */\n  const char *zFilename,  /* Name of the file containing the BTree database */\n  sqlite3 *db,            /* Associated database handle */\n  Btree **ppBtree,        /* Pointer to new Btree object written here */\n  int flags,              /* Options */\n  int vfsFlags            /* Flags passed through to sqlite3_vfs.xOpen() */\n){\n  BtShared *pBt = 0;             /* Shared part of btree structure */\n  Btree *p;                      /* Handle to return */\n  sqlite3_mutex *mutexOpen = 0;  /* Prevents a race condition. Ticket #3537 */\n  int rc = SQLITE_OK;            /* Result code from this function */\n  u8 nReserve;                   /* Byte of unused space on each page */\n  unsigned char zDbHeader[100];  /* Database header content */\n\n  /* True if opening an ephemeral, temporary database */\n  const int isTempDb = zFilename==0 || zFilename[0]==0;\n\n  /* Set the variable isMemdb to true for an in-memory database, or\n  ** false for a file-based database.\n  */\n#ifdef SQLITE_OMIT_MEMORYDB\n  const int isMemdb = 0;\n#else\n  const int isMemdb = (zFilename && strcmp(zFilename, \":memory:\")==0)\n                       || (isTempDb && sqlite3TempInMemory(db))\n                       || (vfsFlags & SQLITE_OPEN_MEMORY)!=0;\n#endif\n\n  assert( db!=0 );\n  assert( pVfs!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( (flags&0xff)==flags );   /* flags fit in 8 bits */\n\n  /* Only a BTREE_SINGLE database can be BTREE_UNORDERED */\n  assert( (flags & BTREE_UNORDERED)==0 || (flags & BTREE_SINGLE)!=0 );\n\n  /* A BTREE_SINGLE database is always a temporary and/or ephemeral */\n  assert( (flags & BTREE_SINGLE)==0 || isTempDb );\n\n  if( isMemdb ){\n    flags |= BTREE_MEMORY;\n  }\n  if( (vfsFlags & SQLITE_OPEN_MAIN_DB)!=0 && (isMemdb || isTempDb) ){\n    vfsFlags = (vfsFlags & ~SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB;\n  }\n  p = sqlite3MallocZero(sizeof(Btree));\n  if( !p ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  p->inTrans = TRANS_NONE;\n  p->db = db;\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  p->lock.pBtree = p;\n  p->lock.iTable = 1;\n#endif\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)\n  /*\n  ** If this Btree is a candidate for shared cache, try to find an\n  ** existing BtShared object that we can share with\n  */\n  if( isTempDb==0 && (isMemdb==0 || (vfsFlags&SQLITE_OPEN_URI)!=0) ){\n    if( vfsFlags & SQLITE_OPEN_SHAREDCACHE ){\n      int nFilename = sqlite3Strlen30(zFilename)+1;\n      int nFullPathname = pVfs->mxPathname+1;\n      char *zFullPathname = sqlite3Malloc(MAX(nFullPathname,nFilename));\n      MUTEX_LOGIC( sqlite3_mutex *mutexShared; )\n\n      p->sharable = 1;\n      if( !zFullPathname ){\n        sqlite3_free(p);\n        return SQLITE_NOMEM_BKPT;\n      }\n      if( isMemdb ){\n        memcpy(zFullPathname, zFilename, nFilename);\n      }else{\n        rc = sqlite3OsFullPathname(pVfs, zFilename,\n                                   nFullPathname, zFullPathname);\n        if( rc ){\n          if( rc==SQLITE_OK_SYMLINK ){\n            rc = SQLITE_OK;\n          }else{\n            sqlite3_free(zFullPathname);\n            sqlite3_free(p);\n            return rc;\n          }\n        }\n      }\n#if SQLITE_THREADSAFE\n      mutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);\n      sqlite3_mutex_enter(mutexOpen);\n      mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n      sqlite3_mutex_enter(mutexShared);\n#endif\n      for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){\n        assert( pBt->nRef>0 );\n        if( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt->pPager, 0))\n                 && sqlite3PagerVfs(pBt->pPager)==pVfs ){\n          int iDb;\n          for(iDb=db->nDb-1; iDb>=0; iDb--){\n            Btree *pExisting = db->aDb[iDb].pBt;\n            if( pExisting && pExisting->pBt==pBt ){\n              sqlite3_mutex_leave(mutexShared);\n              sqlite3_mutex_leave(mutexOpen);\n              sqlite3_free(zFullPathname);\n              sqlite3_free(p);\n              return SQLITE_CONSTRAINT;\n            }\n          }\n          p->pBt = pBt;\n          pBt->nRef++;\n          break;\n        }\n      }\n      sqlite3_mutex_leave(mutexShared);\n      sqlite3_free(zFullPathname);\n    }\n#ifdef SQLITE_DEBUG\n    else{\n      /* In debug mode, we mark all persistent databases as sharable\n      ** even when they are not.  This exercises the locking code and\n      ** gives more opportunity for asserts(sqlite3_mutex_held())\n      ** statements to find locking problems.\n      */\n      p->sharable = 1;\n    }\n#endif\n  }\n#endif\n  if( pBt==0 ){\n    /*\n    ** The following asserts make sure that structures used by the btree are\n    ** the right size.  This is to guard against size changes that result\n    ** when compiling on a different architecture.\n    */\n    assert( sizeof(i64)==8 );\n    assert( sizeof(u64)==8 );\n    assert( sizeof(u32)==4 );\n    assert( sizeof(u16)==2 );\n    assert( sizeof(Pgno)==4 );\n\n    /* Suppress false-positive compiler warning from PVS-Studio */\n    memset(&zDbHeader[16], 0, 8);\n\n    pBt = sqlite3MallocZero( sizeof(*pBt) );\n    if( pBt==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto btree_open_out;\n    }\n    rc = sqlite3PagerOpen(pVfs, &pBt->pPager, zFilename,\n                          sizeof(MemPage), flags, vfsFlags, pageReinit);\n    if( rc==SQLITE_OK ){\n      sqlite3PagerSetMmapLimit(pBt->pPager, db->szMmap);\n      rc = sqlite3PagerReadFileheader(pBt->pPager,sizeof(zDbHeader),zDbHeader);\n    }\n    if( rc!=SQLITE_OK ){\n      goto btree_open_out;\n    }\n    pBt->openFlags = (u8)flags;\n    pBt->db = db;\n    sqlite3PagerSetBusyHandler(pBt->pPager, btreeInvokeBusyHandler, pBt);\n    p->pBt = pBt;\n\n    pBt->pCursor = 0;\n    pBt->pPage1 = 0;\n    if( sqlite3PagerIsreadonly(pBt->pPager) ) pBt->btsFlags |= BTS_READ_ONLY;\n#if defined(SQLITE_SECURE_DELETE)\n    pBt->btsFlags |= BTS_SECURE_DELETE;\n#elif defined(SQLITE_FAST_SECURE_DELETE)\n    pBt->btsFlags |= BTS_OVERWRITE;\n#endif\n    /* EVIDENCE-OF: R-51873-39618 The page size for a database file is\n    ** determined by the 2-byte integer located at an offset of 16 bytes from\n    ** the beginning of the database file. */\n    pBt->pageSize = (zDbHeader[16]<<8) | (zDbHeader[17]<<16);\n    if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE\n         || ((pBt->pageSize-1)&pBt->pageSize)!=0 ){\n      pBt->pageSize = 0;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      /* If the magic name \":memory:\" will create an in-memory database, then\n      ** leave the autoVacuum mode at 0 (do not auto-vacuum), even if\n      ** SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if\n      ** SQLITE_OMIT_MEMORYDB has been defined, then \":memory:\" is just a\n      ** regular file-name. In this case the auto-vacuum applies as per normal.\n      */\n      if( zFilename && !isMemdb ){\n        pBt->autoVacuum = (SQLITE_DEFAULT_AUTOVACUUM ? 1 : 0);\n        pBt->incrVacuum = (SQLITE_DEFAULT_AUTOVACUUM==2 ? 1 : 0);\n      }\n#endif\n      nReserve = 0;\n    }else{\n      /* EVIDENCE-OF: R-37497-42412 The size of the reserved region is\n      ** determined by the one-byte unsigned integer found at an offset of 20\n      ** into the database file header. */\n      nReserve = zDbHeader[20];\n      pBt->btsFlags |= BTS_PAGESIZE_FIXED;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      pBt->autoVacuum = (get4byte(&zDbHeader[36 + 4*4])?1:0);\n      pBt->incrVacuum = (get4byte(&zDbHeader[36 + 7*4])?1:0);\n#endif\n    }\n    rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);\n    if( rc ) goto btree_open_out;\n    pBt->usableSize = pBt->pageSize - nReserve;\n    assert( (pBt->pageSize & 7)==0 );  /* 8-byte alignment of pageSize */\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)\n    /* Add the new BtShared object to the linked list sharable BtShareds.\n    */\n    pBt->nRef = 1;\n    if( p->sharable ){\n      MUTEX_LOGIC( sqlite3_mutex *mutexShared; )\n      MUTEX_LOGIC( mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);)\n      if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){\n        pBt->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST);\n        if( pBt->mutex==0 ){\n          rc = SQLITE_NOMEM_BKPT;\n          goto btree_open_out;\n        }\n      }\n      sqlite3_mutex_enter(mutexShared);\n      pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);\n      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;\n      sqlite3_mutex_leave(mutexShared);\n    }\n#endif\n  }\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)\n  /* If the new Btree uses a sharable pBtShared, then link the new\n  ** Btree into the list of all sharable Btrees for the same connection.\n  ** The list is kept in ascending order by pBt address.\n  */\n  if( p->sharable ){\n    int i;\n    Btree *pSib;\n    for(i=0; i<db->nDb; i++){\n      if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){\n        while( pSib->pPrev ){ pSib = pSib->pPrev; }\n        if( (uptr)p->pBt<(uptr)pSib->pBt ){\n          p->pNext = pSib;\n          p->pPrev = 0;\n          pSib->pPrev = p;\n        }else{\n          while( pSib->pNext && (uptr)pSib->pNext->pBt<(uptr)p->pBt ){\n            pSib = pSib->pNext;\n          }\n          p->pNext = pSib->pNext;\n          p->pPrev = pSib;\n          if( p->pNext ){\n            p->pNext->pPrev = p;\n          }\n          pSib->pNext = p;\n        }\n        break;\n      }\n    }\n  }\n#endif\n  *ppBtree = p;\n\nbtree_open_out:\n  if( rc!=SQLITE_OK ){\n    if( pBt && pBt->pPager ){\n      sqlite3PagerClose(pBt->pPager, 0);\n    }\n    sqlite3_free(pBt);\n    sqlite3_free(p);\n    *ppBtree = 0;\n  }else{\n    sqlite3_file *pFile;\n\n    /* If the B-Tree was successfully opened, set the pager-cache size to the\n    ** default value. Except, when opening on an existing shared pager-cache,\n    ** do not change the pager-cache size.\n    */\n    if( sqlite3BtreeSchema(p, 0, 0)==0 ){\n      sqlite3BtreeSetCacheSize(p, SQLITE_DEFAULT_CACHE_SIZE);\n    }\n\n    pFile = sqlite3PagerFile(pBt->pPager);\n    if( pFile->pMethods ){\n      sqlite3OsFileControlHint(pFile, SQLITE_FCNTL_PDB, (void*)&pBt->db);\n    }\n  }\n  if( mutexOpen ){\n    assert( sqlite3_mutex_held(mutexOpen) );\n    sqlite3_mutex_leave(mutexOpen);\n  }\n  assert( rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0 );\n  return rc;\n}\n\n/*\n** Decrement the BtShared.nRef counter.  When it reaches zero,\n** remove the BtShared structure from the sharing list.  Return\n** true if the BtShared.nRef counter reaches zero and return\n** false if it is still positive.\n*/\nstatic int removeFromSharingList(BtShared *pBt){\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  MUTEX_LOGIC( sqlite3_mutex *pMainMtx; )\n  BtShared *pList;\n  int removed = 0;\n\n  assert( sqlite3_mutex_notheld(pBt->mutex) );\n  MUTEX_LOGIC( pMainMtx = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )\n  sqlite3_mutex_enter(pMainMtx);\n  pBt->nRef--;\n  if( pBt->nRef<=0 ){\n    if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){\n      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;\n    }else{\n      pList = GLOBAL(BtShared*,sqlite3SharedCacheList);\n      while( ALWAYS(pList) && pList->pNext!=pBt ){\n        pList=pList->pNext;\n      }\n      if( ALWAYS(pList) ){\n        pList->pNext = pBt->pNext;\n      }\n    }\n    if( SQLITE_THREADSAFE ){\n      sqlite3_mutex_free(pBt->mutex);\n    }\n    removed = 1;\n  }\n  sqlite3_mutex_leave(pMainMtx);\n  return removed;\n#else\n  UNUSED_PARAMETER( pBt );\n  return 1;\n#endif\n}\n\n/*\n** Make sure pBt->pTmpSpace points to an allocation of\n** MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child\n** pointer.\n*/\nstatic SQLITE_NOINLINE int allocateTempSpace(BtShared *pBt){\n  assert( pBt!=0 );\n  assert( pBt->pTmpSpace==0 );\n  /* This routine is called only by btreeCursor() when allocating the\n  ** first write cursor for the BtShared object */\n  assert( pBt->pCursor!=0 && (pBt->pCursor->curFlags & BTCF_WriteFlag)!=0 );\n  pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize );\n  if( pBt->pTmpSpace==0 ){\n    BtCursor *pCur = pBt->pCursor;\n    pBt->pCursor = pCur->pNext;  /* Unlink the cursor */\n    memset(pCur, 0, sizeof(*pCur));\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  /* One of the uses of pBt->pTmpSpace is to format cells before\n  ** inserting them into a leaf page (function fillInCell()). If\n  ** a cell is less than 4 bytes in size, it is rounded up to 4 bytes\n  ** by the various routines that manipulate binary cells. Which\n  ** can mean that fillInCell() only initializes the first 2 or 3\n  ** bytes of pTmpSpace, but that the first 4 bytes are copied from\n  ** it into a database page. This is not actually a problem, but it\n  ** does cause a valgrind error when the 1 or 2 bytes of uninitialized\n  ** data is passed to system call write(). So to avoid this error,\n  ** zero the first 4 bytes of temp space here.\n  **\n  ** Also:  Provide four bytes of initialized space before the\n  ** beginning of pTmpSpace as an area available to prepend the\n  ** left-child pointer to the beginning of a cell.\n  */\n  memset(pBt->pTmpSpace, 0, 8);\n  pBt->pTmpSpace += 4;\n  return SQLITE_OK;\n}\n\n/*\n** Free the pBt->pTmpSpace allocation\n*/\nstatic void freeTempSpace(BtShared *pBt){\n  if( pBt->pTmpSpace ){\n    pBt->pTmpSpace -= 4;\n    sqlite3PageFree(pBt->pTmpSpace);\n    pBt->pTmpSpace = 0;\n  }\n}\n\n/*\n** Close an open database and invalidate all cursors.\n*/\nSQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){\n  BtShared *pBt = p->pBt;\n\n  /* Close all cursors opened via this handle.  */\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n\n  /* Verify that no other cursors have this Btree open */\n#ifdef SQLITE_DEBUG\n  {\n    BtCursor *pCur = pBt->pCursor;\n    while( pCur ){\n      BtCursor *pTmp = pCur;\n      pCur = pCur->pNext;\n      assert( pTmp->pBtree!=p );\n\n    }\n  }\n#endif\n\n  /* Rollback any active transaction and free the handle structure.\n  ** The call to sqlite3BtreeRollback() drops any table-locks held by\n  ** this handle.\n  */\n  sqlite3BtreeRollback(p, SQLITE_OK, 0);\n  sqlite3BtreeLeave(p);\n\n  /* If there are still other outstanding references to the shared-btree\n  ** structure, return now. The remainder of this procedure cleans\n  ** up the shared-btree.\n  */\n  assert( p->wantToLock==0 && p->locked==0 );\n  if( !p->sharable || removeFromSharingList(pBt) ){\n    /* The pBt is no longer on the sharing list, so we can access\n    ** it without having to hold the mutex.\n    **\n    ** Clean out and delete the BtShared object.\n    */\n    assert( !pBt->pCursor );\n    sqlite3PagerClose(pBt->pPager, p->db);\n    if( pBt->xFreeSchema && pBt->pSchema ){\n      pBt->xFreeSchema(pBt->pSchema);\n    }\n    sqlite3DbFree(0, pBt->pSchema);\n    freeTempSpace(pBt);\n    sqlite3_free(pBt);\n  }\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  assert( p->wantToLock==0 );\n  assert( p->locked==0 );\n  if( p->pPrev ) p->pPrev->pNext = p->pNext;\n  if( p->pNext ) p->pNext->pPrev = p->pPrev;\n#endif\n\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n/*\n** Change the \"soft\" limit on the number of pages in the cache.\n** Unused and unmodified pages will be recycled when the number of\n** pages in the cache exceeds this soft limit.  But the size of the\n** cache is allowed to grow larger than this limit if it contains\n** dirty pages or pages still in active use.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){\n  BtShared *pBt = p->pBt;\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n  sqlite3PagerSetCachesize(pBt->pPager, mxPage);\n  sqlite3BtreeLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Change the \"spill\" limit on the number of pages in the cache.\n** If the number of pages exceeds this limit during a write transaction,\n** the pager might attempt to \"spill\" pages to the journal early in\n** order to free up memory.\n**\n** The value returned is the current spill size.  If zero is passed\n** as an argument, no changes are made to the spill size setting, so\n** using mxPage of 0 is a way to query the current spill size.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetSpillSize(Btree *p, int mxPage){\n  BtShared *pBt = p->pBt;\n  int res;\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n  res = sqlite3PagerSetSpillsize(pBt->pPager, mxPage);\n  sqlite3BtreeLeave(p);\n  return res;\n}\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/*\n** Change the limit on the amount of the database file that may be\n** memory mapped.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){\n  BtShared *pBt = p->pBt;\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n  sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);\n  sqlite3BtreeLeave(p);\n  return SQLITE_OK;\n}\n#endif /* SQLITE_MAX_MMAP_SIZE>0 */\n\n/*\n** Change the way data is synced to disk in order to increase or decrease\n** how well the database resists damage due to OS crashes and power\n** failures.  Level 1 is the same as asynchronous (no syncs() occur and\n** there is a high probability of damage)  Level 2 is the default.  There\n** is a very low but non-zero probability of damage.  Level 3 reduces the\n** probability of damage to near zero but with a write performance reduction.\n*/\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\nSQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(\n  Btree *p,              /* The btree to set the safety level on */\n  unsigned pgFlags       /* Various PAGER_* flags */\n){\n  BtShared *pBt = p->pBt;\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n  sqlite3PagerSetFlags(pBt->pPager, pgFlags);\n  sqlite3BtreeLeave(p);\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** Change the default pages size and the number of reserved bytes per page.\n** Or, if the page size has already been fixed, return SQLITE_READONLY\n** without changing anything.\n**\n** The page size must be a power of 2 between 512 and 65536.  If the page\n** size supplied does not meet this constraint then the page size is not\n** changed.\n**\n** Page sizes are constrained to be a power of two so that the region\n** of the database file used for locking (beginning at PENDING_BYTE,\n** the first byte past the 1GB boundary, 0x40000000) needs to occur\n** at the beginning of a page.\n**\n** If parameter nReserve is less than zero, then the number of reserved\n** bytes per page is left unchanged.\n**\n** If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size\n** and autovacuum mode can no longer be changed.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){\n  int rc = SQLITE_OK;\n  int x;\n  BtShared *pBt = p->pBt;\n  assert( nReserve>=0 && nReserve<=255 );\n  sqlite3BtreeEnter(p);\n  pBt->nReserveWanted = (u8)nReserve;\n  x = pBt->pageSize - pBt->usableSize;\n  if( x==nReserve && (pageSize==0 || (u32)pageSize==pBt->pageSize) ){\n    sqlite3BtreeLeave(p);\n    return SQLITE_OK;\n  }\n  if( nReserve<x ) nReserve = x;\n  if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){\n    sqlite3BtreeLeave(p);\n    return SQLITE_READONLY;\n  }\n  assert( nReserve>=0 && nReserve<=255 );\n  if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE &&\n        ((pageSize-1)&pageSize)==0 ){\n    assert( (pageSize & 7)==0 );\n    assert( !pBt->pCursor );\n    if( nReserve>32 && pageSize==512 ) pageSize = 1024;\n    pBt->pageSize = (u32)pageSize;\n    freeTempSpace(pBt);\n  }\n  rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);\n  pBt->usableSize = pBt->pageSize - (u16)nReserve;\n  if( iFix ) pBt->btsFlags |= BTS_PAGESIZE_FIXED;\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** Return the currently defined page size\n*/\nSQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree *p){\n  return p->pBt->pageSize;\n}\n\n/*\n** This function is similar to sqlite3BtreeGetReserve(), except that it\n** may only be called if it is guaranteed that the b-tree mutex is already\n** held.\n**\n** This is useful in one special case in the backup API code where it is\n** known that the shared b-tree mutex is held, but the mutex on the\n** database handle that owns *p is not. In this case if sqlite3BtreeEnter()\n** were to be called, it might collide with some other operation on the\n** database handle that owns *p, causing undefined behavior.\n*/\nSQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p){\n  int n;\n  assert( sqlite3_mutex_held(p->pBt->mutex) );\n  n = p->pBt->pageSize - p->pBt->usableSize;\n  return n;\n}\n\n/*\n** Return the number of bytes of space at the end of every page that\n** are intentionally left unused.  This is the \"reserved\" space that is\n** sometimes used by extensions.\n**\n** The value returned is the larger of the current reserve size and\n** the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES.\n** The amount of reserve can only grow - never shrink.\n*/\nSQLITE_PRIVATE int sqlite3BtreeGetRequestedReserve(Btree *p){\n  int n1, n2;\n  sqlite3BtreeEnter(p);\n  n1 = (int)p->pBt->nReserveWanted;\n  n2 = sqlite3BtreeGetReserveNoMutex(p);\n  sqlite3BtreeLeave(p);\n  return n1>n2 ? n1 : n2;\n}\n\n\n/*\n** Set the maximum page count for a database if mxPage is positive.\n** No changes are made if mxPage is 0 or negative.\n** Regardless of the value of mxPage, return the maximum page count.\n*/\nSQLITE_PRIVATE Pgno sqlite3BtreeMaxPageCount(Btree *p, Pgno mxPage){\n  Pgno n;\n  sqlite3BtreeEnter(p);\n  n = sqlite3PagerMaxPageCount(p->pBt->pPager, mxPage);\n  sqlite3BtreeLeave(p);\n  return n;\n}\n\n/*\n** Change the values for the BTS_SECURE_DELETE and BTS_OVERWRITE flags:\n**\n**    newFlag==0       Both BTS_SECURE_DELETE and BTS_OVERWRITE are cleared\n**    newFlag==1       BTS_SECURE_DELETE set and BTS_OVERWRITE is cleared\n**    newFlag==2       BTS_SECURE_DELETE cleared and BTS_OVERWRITE is set\n**    newFlag==(-1)    No changes\n**\n** This routine acts as a query if newFlag is less than zero\n**\n** With BTS_OVERWRITE set, deleted content is overwritten by zeros, but\n** freelist leaf pages are not written back to the database.  Thus in-page\n** deleted content is cleared, but freelist deleted content is not.\n**\n** With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition\n** that freelist leaf pages are written back into the database, increasing\n** the amount of disk I/O.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){\n  int b;\n  if( p==0 ) return 0;\n  sqlite3BtreeEnter(p);\n  assert( BTS_OVERWRITE==BTS_SECURE_DELETE*2 );\n  assert( BTS_FAST_SECURE==(BTS_OVERWRITE|BTS_SECURE_DELETE) );\n  if( newFlag>=0 ){\n    p->pBt->btsFlags &= ~BTS_FAST_SECURE;\n    p->pBt->btsFlags |= (u16)(BTS_SECURE_DELETE*newFlag);\n  }\n  b = (p->pBt->btsFlags & BTS_FAST_SECURE)/BTS_SECURE_DELETE;\n  sqlite3BtreeLeave(p);\n  return b;\n}\n\n/*\n** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'\n** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it\n** is disabled. The default value for the auto-vacuum property is\n** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  return SQLITE_READONLY;\n#else\n  BtShared *pBt = p->pBt;\n  int rc = SQLITE_OK;\n  u8 av = (u8)autoVacuum;\n\n  sqlite3BtreeEnter(p);\n  if( (pBt->btsFlags & BTS_PAGESIZE_FIXED)!=0 && (av ?1:0)!=pBt->autoVacuum ){\n    rc = SQLITE_READONLY;\n  }else{\n    pBt->autoVacuum = av ?1:0;\n    pBt->incrVacuum = av==2 ?1:0;\n  }\n  sqlite3BtreeLeave(p);\n  return rc;\n#endif\n}\n\n/*\n** Return the value of the 'auto-vacuum' property. If auto-vacuum is\n** enabled 1 is returned. Otherwise 0.\n*/\nSQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  return BTREE_AUTOVACUUM_NONE;\n#else\n  int rc;\n  sqlite3BtreeEnter(p);\n  rc = (\n    (!p->pBt->autoVacuum)?BTREE_AUTOVACUUM_NONE:\n    (!p->pBt->incrVacuum)?BTREE_AUTOVACUUM_FULL:\n    BTREE_AUTOVACUUM_INCR\n  );\n  sqlite3BtreeLeave(p);\n  return rc;\n#endif\n}\n\n/*\n** If the user has not set the safety-level for this database connection\n** using \"PRAGMA synchronous\", and if the safety-level is not already\n** set to the value passed to this function as the second parameter,\n** set it so.\n*/\n#if SQLITE_DEFAULT_SYNCHRONOUS!=SQLITE_DEFAULT_WAL_SYNCHRONOUS \\\n    && !defined(SQLITE_OMIT_WAL)\nstatic void setDefaultSyncFlag(BtShared *pBt, u8 safety_level){\n  sqlite3 *db;\n  Db *pDb;\n  if( (db=pBt->db)!=0 && (pDb=db->aDb)!=0 ){\n    while( pDb->pBt==0 || pDb->pBt->pBt!=pBt ){ pDb++; }\n    if( pDb->bSyncSet==0\n     && pDb->safety_level!=safety_level\n     && pDb!=&db->aDb[1]\n    ){\n      pDb->safety_level = safety_level;\n      sqlite3PagerSetFlags(pBt->pPager,\n          pDb->safety_level | (db->flags & PAGER_FLAGS_MASK));\n    }\n  }\n}\n#else\n# define setDefaultSyncFlag(pBt,safety_level)\n#endif\n\n/* Forward declaration */\nstatic int newDatabase(BtShared*);\n\n\n/*\n** Get a reference to pPage1 of the database file.  This will\n** also acquire a readlock on that file.\n**\n** SQLITE_OK is returned on success.  If the file is not a\n** well-formed database file, then SQLITE_CORRUPT is returned.\n** SQLITE_BUSY is returned if the database is locked.  SQLITE_NOMEM\n** is returned if we run out of memory.\n*/\nstatic int lockBtree(BtShared *pBt){\n  int rc;              /* Result code from subfunctions */\n  MemPage *pPage1;     /* Page 1 of the database file */\n  u32 nPage;           /* Number of pages in the database */\n  u32 nPageFile = 0;   /* Number of pages in the database file */\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( pBt->pPage1==0 );\n  rc = sqlite3PagerSharedLock(pBt->pPager);\n  if( rc!=SQLITE_OK ) return rc;\n  rc = btreeGetPage(pBt, 1, &pPage1, 0);\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* Do some checking to help insure the file we opened really is\n  ** a valid database file.\n  */\n  nPage = get4byte(28+(u8*)pPage1->aData);\n  sqlite3PagerPagecount(pBt->pPager, (int*)&nPageFile);\n  if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){\n    nPage = nPageFile;\n  }\n  if( (pBt->db->flags & SQLITE_ResetDatabase)!=0 ){\n    nPage = 0;\n  }\n  if( nPage>0 ){\n    u32 pageSize;\n    u32 usableSize;\n    u8 *page1 = pPage1->aData;\n    rc = SQLITE_NOTADB;\n    /* EVIDENCE-OF: R-43737-39999 Every valid SQLite database file begins\n    ** with the following 16 bytes (in hex): 53 51 4c 69 74 65 20 66 6f 72 6d\n    ** 61 74 20 33 00. */\n    if( memcmp(page1, zMagicHeader, 16)!=0 ){\n      goto page1_init_failed;\n    }\n\n#ifdef SQLITE_OMIT_WAL\n    if( page1[18]>1 ){\n      pBt->btsFlags |= BTS_READ_ONLY;\n    }\n    if( page1[19]>1 ){\n      goto page1_init_failed;\n    }\n#else\n    if( page1[18]>2 ){\n      pBt->btsFlags |= BTS_READ_ONLY;\n    }\n    if( page1[19]>2 ){\n      goto page1_init_failed;\n    }\n\n    /* If the read version is set to 2, this database should be accessed\n    ** in WAL mode. If the log is not already open, open it now. Then\n    ** return SQLITE_OK and return without populating BtShared.pPage1.\n    ** The caller detects this and calls this function again. This is\n    ** required as the version of page 1 currently in the page1 buffer\n    ** may not be the latest version - there may be a newer one in the log\n    ** file.\n    */\n    if( page1[19]==2 && (pBt->btsFlags & BTS_NO_WAL)==0 ){\n      int isOpen = 0;\n      rc = sqlite3PagerOpenWal(pBt->pPager, &isOpen);\n      if( rc!=SQLITE_OK ){\n        goto page1_init_failed;\n      }else{\n        setDefaultSyncFlag(pBt, SQLITE_DEFAULT_WAL_SYNCHRONOUS+1);\n        if( isOpen==0 ){\n          releasePageOne(pPage1);\n          return SQLITE_OK;\n        }\n      }\n      rc = SQLITE_NOTADB;\n    }else{\n      setDefaultSyncFlag(pBt, SQLITE_DEFAULT_SYNCHRONOUS+1);\n    }\n#endif\n\n    /* EVIDENCE-OF: R-15465-20813 The maximum and minimum embedded payload\n    ** fractions and the leaf payload fraction values must be 64, 32, and 32.\n    **\n    ** The original design allowed these amounts to vary, but as of\n    ** version 3.6.0, we require them to be fixed.\n    */\n    if( memcmp(&page1[21], \"\\100\\040\\040\",3)!=0 ){\n      goto page1_init_failed;\n    }\n    /* EVIDENCE-OF: R-51873-39618 The page size for a database file is\n    ** determined by the 2-byte integer located at an offset of 16 bytes from\n    ** the beginning of the database file. */\n    pageSize = (page1[16]<<8) | (page1[17]<<16);\n    /* EVIDENCE-OF: R-25008-21688 The size of a page is a power of two\n    ** between 512 and 65536 inclusive. */\n    if( ((pageSize-1)&pageSize)!=0\n     || pageSize>SQLITE_MAX_PAGE_SIZE\n     || pageSize<=256\n    ){\n      goto page1_init_failed;\n    }\n    assert( (pageSize & 7)==0 );\n    /* EVIDENCE-OF: R-59310-51205 The \"reserved space\" size in the 1-byte\n    ** integer at offset 20 is the number of bytes of space at the end of\n    ** each page to reserve for extensions.\n    **\n    ** EVIDENCE-OF: R-37497-42412 The size of the reserved region is\n    ** determined by the one-byte unsigned integer found at an offset of 20\n    ** into the database file header. */\n    usableSize = pageSize - page1[20];\n    if( (u32)pageSize!=pBt->pageSize ){\n      /* After reading the first page of the database assuming a page size\n      ** of BtShared.pageSize, we have discovered that the page-size is\n      ** actually pageSize. Unlock the database, leave pBt->pPage1 at\n      ** zero and return SQLITE_OK. The caller will call this function\n      ** again with the correct page-size.\n      */\n      releasePageOne(pPage1);\n      pBt->usableSize = usableSize;\n      pBt->pageSize = pageSize;\n      pBt->btsFlags |= BTS_PAGESIZE_FIXED;\n      freeTempSpace(pBt);\n      rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,\n                                   pageSize-usableSize);\n      return rc;\n    }\n    if( nPage>nPageFile ){\n      if( sqlite3WritableSchema(pBt->db)==0 ){\n        rc = SQLITE_CORRUPT_BKPT;\n        goto page1_init_failed;\n      }else{\n        nPage = nPageFile;\n      }\n    }\n    /* EVIDENCE-OF: R-28312-64704 However, the usable size is not allowed to\n    ** be less than 480. In other words, if the page size is 512, then the\n    ** reserved space size cannot exceed 32. */\n    if( usableSize<480 ){\n      goto page1_init_failed;\n    }\n    pBt->btsFlags |= BTS_PAGESIZE_FIXED;\n    pBt->pageSize = pageSize;\n    pBt->usableSize = usableSize;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    pBt->autoVacuum = (get4byte(&page1[36 + 4*4])?1:0);\n    pBt->incrVacuum = (get4byte(&page1[36 + 7*4])?1:0);\n#endif\n  }\n\n  /* maxLocal is the maximum amount of payload to store locally for\n  ** a cell.  Make sure it is small enough so that at least minFanout\n  ** cells can will fit on one page.  We assume a 10-byte page header.\n  ** Besides the payload, the cell must store:\n  **     2-byte pointer to the cell\n  **     4-byte child pointer\n  **     9-byte nKey value\n  **     4-byte nData value\n  **     4-byte overflow page pointer\n  ** So a cell consists of a 2-byte pointer, a header which is as much as\n  ** 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow\n  ** page pointer.\n  */\n  pBt->maxLocal = (u16)((pBt->usableSize-12)*64/255 - 23);\n  pBt->minLocal = (u16)((pBt->usableSize-12)*32/255 - 23);\n  pBt->maxLeaf = (u16)(pBt->usableSize - 35);\n  pBt->minLeaf = (u16)((pBt->usableSize-12)*32/255 - 23);\n  if( pBt->maxLocal>127 ){\n    pBt->max1bytePayload = 127;\n  }else{\n    pBt->max1bytePayload = (u8)pBt->maxLocal;\n  }\n  assert( pBt->maxLeaf + 23 <= MX_CELL_SIZE(pBt) );\n  pBt->pPage1 = pPage1;\n  pBt->nPage = nPage;\n  return SQLITE_OK;\n\npage1_init_failed:\n  releasePageOne(pPage1);\n  pBt->pPage1 = 0;\n  return rc;\n}\n\n#ifndef NDEBUG\n/*\n** Return the number of cursors open on pBt. This is for use\n** in assert() expressions, so it is only compiled if NDEBUG is not\n** defined.\n**\n** Only write cursors are counted if wrOnly is true.  If wrOnly is\n** false then all cursors are counted.\n**\n** For the purposes of this routine, a cursor is any cursor that\n** is capable of reading or writing to the database.  Cursors that\n** have been tripped into the CURSOR_FAULT state are not counted.\n*/\nstatic int countValidCursors(BtShared *pBt, int wrOnly){\n  BtCursor *pCur;\n  int r = 0;\n  for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){\n    if( (wrOnly==0 || (pCur->curFlags & BTCF_WriteFlag)!=0)\n     && pCur->eState!=CURSOR_FAULT ) r++;\n  }\n  return r;\n}\n#endif\n\n/*\n** If there are no outstanding cursors and we are not in the middle\n** of a transaction but there is a read lock on the database, then\n** this routine unrefs the first page of the database file which\n** has the effect of releasing the read lock.\n**\n** If there is a transaction in progress, this routine is a no-op.\n*/\nstatic void unlockBtreeIfUnused(BtShared *pBt){\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( countValidCursors(pBt,0)==0 || pBt->inTransaction>TRANS_NONE );\n  if( pBt->inTransaction==TRANS_NONE && pBt->pPage1!=0 ){\n    MemPage *pPage1 = pBt->pPage1;\n    assert( pPage1->aData );\n    assert( sqlite3PagerRefcount(pBt->pPager)==1 );\n    pBt->pPage1 = 0;\n    releasePageOne(pPage1);\n  }\n}\n\n/*\n** If pBt points to an empty file then convert that empty file\n** into a new empty database by initializing the first page of\n** the database.\n*/\nstatic int newDatabase(BtShared *pBt){\n  MemPage *pP1;\n  unsigned char *data;\n  int rc;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  if( pBt->nPage>0 ){\n    return SQLITE_OK;\n  }\n  pP1 = pBt->pPage1;\n  assert( pP1!=0 );\n  data = pP1->aData;\n  rc = sqlite3PagerWrite(pP1->pDbPage);\n  if( rc ) return rc;\n  memcpy(data, zMagicHeader, sizeof(zMagicHeader));\n  assert( sizeof(zMagicHeader)==16 );\n  data[16] = (u8)((pBt->pageSize>>8)&0xff);\n  data[17] = (u8)((pBt->pageSize>>16)&0xff);\n  data[18] = 1;\n  data[19] = 1;\n  assert( pBt->usableSize<=pBt->pageSize && pBt->usableSize+255>=pBt->pageSize);\n  data[20] = (u8)(pBt->pageSize - pBt->usableSize);\n  data[21] = 64;\n  data[22] = 32;\n  data[23] = 32;\n  memset(&data[24], 0, 100-24);\n  zeroPage(pP1, PTF_INTKEY|PTF_LEAF|PTF_LEAFDATA );\n  pBt->btsFlags |= BTS_PAGESIZE_FIXED;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  assert( pBt->autoVacuum==1 || pBt->autoVacuum==0 );\n  assert( pBt->incrVacuum==1 || pBt->incrVacuum==0 );\n  put4byte(&data[36 + 4*4], pBt->autoVacuum);\n  put4byte(&data[36 + 7*4], pBt->incrVacuum);\n#endif\n  pBt->nPage = 1;\n  data[31] = 1;\n  return SQLITE_OK;\n}\n\n/*\n** Initialize the first page of the database file (creating a database\n** consisting of a single page and no schema objects). Return SQLITE_OK\n** if successful, or an SQLite error code otherwise.\n*/\nSQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p){\n  int rc;\n  sqlite3BtreeEnter(p);\n  p->pBt->nPage = 0;\n  rc = newDatabase(p->pBt);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** Attempt to start a new transaction. A write-transaction\n** is started if the second argument is nonzero, otherwise a read-\n** transaction.  If the second argument is 2 or more and exclusive\n** transaction is started, meaning that no other process is allowed\n** to access the database.  A preexisting transaction may not be\n** upgraded to exclusive by calling this routine a second time - the\n** exclusivity flag only works for a new transaction.\n**\n** A write-transaction must be started before attempting any\n** changes to the database.  None of the following routines\n** will work unless a transaction is started first:\n**\n**      sqlite3BtreeCreateTable()\n**      sqlite3BtreeCreateIndex()\n**      sqlite3BtreeClearTable()\n**      sqlite3BtreeDropTable()\n**      sqlite3BtreeInsert()\n**      sqlite3BtreeDelete()\n**      sqlite3BtreeUpdateMeta()\n**\n** If an initial attempt to acquire the lock fails because of lock contention\n** and the database was previously unlocked, then invoke the busy handler\n** if there is one.  But if there was previously a read-lock, do not\n** invoke the busy handler - just return SQLITE_BUSY.  SQLITE_BUSY is\n** returned when there is already a read-lock in order to avoid a deadlock.\n**\n** Suppose there are two processes A and B.  A has a read lock and B has\n** a reserved lock.  B tries to promote to exclusive but is blocked because\n** of A's read lock.  A tries to promote to reserved but is blocked by B.\n** One or the other of the two processes must give way or there can be\n** no progress.  By returning SQLITE_BUSY and not invoking the busy callback\n** when A already has a read lock, we encourage A to give up and let B\n** proceed.\n*/\nstatic SQLITE_NOINLINE int btreeBeginTrans(\n  Btree *p,                 /* The btree in which to start the transaction */\n  int wrflag,               /* True to start a write transaction */\n  int *pSchemaVersion       /* Put schema version number here, if not NULL */\n){\n  BtShared *pBt = p->pBt;\n  Pager *pPager = pBt->pPager;\n  int rc = SQLITE_OK;\n\n  sqlite3BtreeEnter(p);\n  btreeIntegrity(p);\n\n  /* If the btree is already in a write-transaction, or it\n  ** is already in a read-transaction and a read-transaction\n  ** is requested, this is a no-op.\n  */\n  if( p->inTrans==TRANS_WRITE || (p->inTrans==TRANS_READ && !wrflag) ){\n    goto trans_begun;\n  }\n  assert( pBt->inTransaction==TRANS_WRITE || IfNotOmitAV(pBt->bDoTruncate)==0 );\n\n  if( (p->db->flags & SQLITE_ResetDatabase)\n   && sqlite3PagerIsreadonly(pPager)==0\n  ){\n    pBt->btsFlags &= ~BTS_READ_ONLY;\n  }\n\n  /* Write transactions are not possible on a read-only database */\n  if( (pBt->btsFlags & BTS_READ_ONLY)!=0 && wrflag ){\n    rc = SQLITE_READONLY;\n    goto trans_begun;\n  }\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  {\n    sqlite3 *pBlock = 0;\n    /* If another database handle has already opened a write transaction\n    ** on this shared-btree structure and a second write transaction is\n    ** requested, return SQLITE_LOCKED.\n    */\n    if( (wrflag && pBt->inTransaction==TRANS_WRITE)\n     || (pBt->btsFlags & BTS_PENDING)!=0\n    ){\n      pBlock = pBt->pWriter->db;\n    }else if( wrflag>1 ){\n      BtLock *pIter;\n      for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){\n        if( pIter->pBtree!=p ){\n          pBlock = pIter->pBtree->db;\n          break;\n        }\n      }\n    }\n    if( pBlock ){\n      sqlite3ConnectionBlocked(p->db, pBlock);\n      rc = SQLITE_LOCKED_SHAREDCACHE;\n      goto trans_begun;\n    }\n  }\n#endif\n\n  /* Any read-only or read-write transaction implies a read-lock on\n  ** page 1. So if some other shared-cache client already has a write-lock\n  ** on page 1, the transaction cannot be opened. */\n  rc = querySharedCacheTableLock(p, SCHEMA_ROOT, READ_LOCK);\n  if( SQLITE_OK!=rc ) goto trans_begun;\n\n  pBt->btsFlags &= ~BTS_INITIALLY_EMPTY;\n  if( pBt->nPage==0 ) pBt->btsFlags |= BTS_INITIALLY_EMPTY;\n  do {\n    sqlite3PagerWalDb(pPager, p->db);\n\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    /* If transitioning from no transaction directly to a write transaction,\n    ** block for the WRITER lock first if possible. */\n    if( pBt->pPage1==0 && wrflag ){\n      assert( pBt->inTransaction==TRANS_NONE );\n      rc = sqlite3PagerWalWriteLock(pPager, 1);\n      if( rc!=SQLITE_BUSY && rc!=SQLITE_OK ) break;\n    }\n#endif\n\n    /* Call lockBtree() until either pBt->pPage1 is populated or\n    ** lockBtree() returns something other than SQLITE_OK. lockBtree()\n    ** may return SQLITE_OK but leave pBt->pPage1 set to 0 if after\n    ** reading page 1 it discovers that the page-size of the database\n    ** file is not pBt->pageSize. In this case lockBtree() will update\n    ** pBt->pageSize to the page-size of the file on disk.\n    */\n    while( pBt->pPage1==0 && SQLITE_OK==(rc = lockBtree(pBt)) );\n\n    if( rc==SQLITE_OK && wrflag ){\n      if( (pBt->btsFlags & BTS_READ_ONLY)!=0 ){\n        rc = SQLITE_READONLY;\n      }else{\n        rc = sqlite3PagerBegin(pPager, wrflag>1, sqlite3TempInMemory(p->db));\n        if( rc==SQLITE_OK ){\n          rc = newDatabase(pBt);\n        }else if( rc==SQLITE_BUSY_SNAPSHOT && pBt->inTransaction==TRANS_NONE ){\n          /* if there was no transaction opened when this function was\n          ** called and SQLITE_BUSY_SNAPSHOT is returned, change the error\n          ** code to SQLITE_BUSY. */\n          rc = SQLITE_BUSY;\n        }\n      }\n    }\n\n    if( rc!=SQLITE_OK ){\n      (void)sqlite3PagerWalWriteLock(pPager, 0);\n      unlockBtreeIfUnused(pBt);\n    }\n#if defined(SQLITE_ENABLE_SETLK_TIMEOUT)\n    if( rc==SQLITE_BUSY_TIMEOUT ){\n      /* If a blocking lock timed out, break out of the loop here so that\n      ** the busy-handler is not invoked.  */\n      break;\n    }\n#endif\n  }while( (rc&0xFF)==SQLITE_BUSY && pBt->inTransaction==TRANS_NONE &&\n          btreeInvokeBusyHandler(pBt) );\n  sqlite3PagerWalDb(pPager, 0);\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  if( rc==SQLITE_BUSY_TIMEOUT ) rc = SQLITE_BUSY;\n#endif\n\n  if( rc==SQLITE_OK ){\n    if( p->inTrans==TRANS_NONE ){\n      pBt->nTransaction++;\n#ifndef SQLITE_OMIT_SHARED_CACHE\n      if( p->sharable ){\n        assert( p->lock.pBtree==p && p->lock.iTable==1 );\n        p->lock.eLock = READ_LOCK;\n        p->lock.pNext = pBt->pLock;\n        pBt->pLock = &p->lock;\n      }\n#endif\n    }\n    p->inTrans = (wrflag?TRANS_WRITE:TRANS_READ);\n    if( p->inTrans>pBt->inTransaction ){\n      pBt->inTransaction = p->inTrans;\n    }\n    if( wrflag ){\n      MemPage *pPage1 = pBt->pPage1;\n#ifndef SQLITE_OMIT_SHARED_CACHE\n      assert( !pBt->pWriter );\n      pBt->pWriter = p;\n      pBt->btsFlags &= ~BTS_EXCLUSIVE;\n      if( wrflag>1 ) pBt->btsFlags |= BTS_EXCLUSIVE;\n#endif\n\n      /* If the db-size header field is incorrect (as it may be if an old\n      ** client has been writing the database file), update it now. Doing\n      ** this sooner rather than later means the database size can safely\n      ** re-read the database size from page 1 if a savepoint or transaction\n      ** rollback occurs within the transaction.\n      */\n      if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){\n        rc = sqlite3PagerWrite(pPage1->pDbPage);\n        if( rc==SQLITE_OK ){\n          put4byte(&pPage1->aData[28], pBt->nPage);\n        }\n      }\n    }\n  }\n\ntrans_begun:\n  if( rc==SQLITE_OK ){\n    if( pSchemaVersion ){\n      *pSchemaVersion = get4byte(&pBt->pPage1->aData[40]);\n    }\n    if( wrflag ){\n      /* This call makes sure that the pager has the correct number of\n      ** open savepoints. If the second parameter is greater than 0 and\n      ** the sub-journal is not already open, then it will be opened here.\n      */\n      rc = sqlite3PagerOpenSavepoint(pPager, p->db->nSavepoint);\n    }\n  }\n\n  btreeIntegrity(p);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVersion){\n  BtShared *pBt;\n  if( p->sharable\n   || p->inTrans==TRANS_NONE\n   || (p->inTrans==TRANS_READ && wrflag!=0)\n  ){\n    return btreeBeginTrans(p,wrflag,pSchemaVersion);\n  }\n  pBt = p->pBt;\n  if( pSchemaVersion ){\n    *pSchemaVersion = get4byte(&pBt->pPage1->aData[40]);\n  }\n  if( wrflag ){\n    /* This call makes sure that the pager has the correct number of\n    ** open savepoints. If the second parameter is greater than 0 and\n    ** the sub-journal is not already open, then it will be opened here.\n    */\n    return sqlite3PagerOpenSavepoint(pBt->pPager, p->db->nSavepoint);\n  }else{\n    return SQLITE_OK;\n  }\n}\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n\n/*\n** Set the pointer-map entries for all children of page pPage. Also, if\n** pPage contains cells that point to overflow pages, set the pointer\n** map entries for the overflow pages as well.\n*/\nstatic int setChildPtrmaps(MemPage *pPage){\n  int i;                             /* Counter variable */\n  int nCell;                         /* Number of cells in page pPage */\n  int rc;                            /* Return code */\n  BtShared *pBt = pPage->pBt;\n  Pgno pgno = pPage->pgno;\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);\n  if( rc!=SQLITE_OK ) return rc;\n  nCell = pPage->nCell;\n\n  for(i=0; i<nCell; i++){\n    u8 *pCell = findCell(pPage, i);\n\n    ptrmapPutOvflPtr(pPage, pPage, pCell, &rc);\n\n    if( !pPage->leaf ){\n      Pgno childPgno = get4byte(pCell);\n      ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);\n    }\n  }\n\n  if( !pPage->leaf ){\n    Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);\n    ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);\n  }\n\n  return rc;\n}\n\n/*\n** Somewhere on pPage is a pointer to page iFrom.  Modify this pointer so\n** that it points to iTo. Parameter eType describes the type of pointer to\n** be modified, as  follows:\n**\n** PTRMAP_BTREE:     pPage is a btree-page. The pointer points at a child\n**                   page of pPage.\n**\n** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow\n**                   page pointed to by one of the cells on pPage.\n**\n** PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next\n**                   overflow page in the list.\n*/\nstatic int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  if( eType==PTRMAP_OVERFLOW2 ){\n    /* The pointer is always the first 4 bytes of the page in this case.  */\n    if( get4byte(pPage->aData)!=iFrom ){\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    put4byte(pPage->aData, iTo);\n  }else{\n    int i;\n    int nCell;\n    int rc;\n\n    rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);\n    if( rc ) return rc;\n    nCell = pPage->nCell;\n\n    for(i=0; i<nCell; i++){\n      u8 *pCell = findCell(pPage, i);\n      if( eType==PTRMAP_OVERFLOW1 ){\n        CellInfo info;\n        pPage->xParseCell(pPage, pCell, &info);\n        if( info.nLocal<info.nPayload ){\n          if( pCell+info.nSize > pPage->aData+pPage->pBt->usableSize ){\n            return SQLITE_CORRUPT_PAGE(pPage);\n          }\n          if( iFrom==get4byte(pCell+info.nSize-4) ){\n            put4byte(pCell+info.nSize-4, iTo);\n            break;\n          }\n        }\n      }else{\n        if( pCell+4 > pPage->aData+pPage->pBt->usableSize ){\n          return SQLITE_CORRUPT_PAGE(pPage);\n        }\n        if( get4byte(pCell)==iFrom ){\n          put4byte(pCell, iTo);\n          break;\n        }\n      }\n    }\n\n    if( i==nCell ){\n      if( eType!=PTRMAP_BTREE ||\n          get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);\n    }\n  }\n  return SQLITE_OK;\n}\n\n\n/*\n** Move the open database page pDbPage to location iFreePage in the\n** database. The pDbPage reference remains valid.\n**\n** The isCommit flag indicates that there is no need to remember that\n** the journal needs to be sync()ed before database page pDbPage->pgno\n** can be written to. The caller has already promised not to write to that\n** page.\n*/\nstatic int relocatePage(\n  BtShared *pBt,           /* Btree */\n  MemPage *pDbPage,        /* Open page to move */\n  u8 eType,                /* Pointer map 'type' entry for pDbPage */\n  Pgno iPtrPage,           /* Pointer map 'page-no' entry for pDbPage */\n  Pgno iFreePage,          /* The location to move pDbPage to */\n  int isCommit             /* isCommit flag passed to sqlite3PagerMovepage */\n){\n  MemPage *pPtrPage;   /* The page that contains a pointer to pDbPage */\n  Pgno iDbPage = pDbPage->pgno;\n  Pager *pPager = pBt->pPager;\n  int rc;\n\n  assert( eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 ||\n      eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( pDbPage->pBt==pBt );\n  if( iDbPage<3 ) return SQLITE_CORRUPT_BKPT;\n\n  /* Move page iDbPage from its current location to page number iFreePage */\n  TRACE((\"AUTOVACUUM: Moving %u to free page %u (ptr page %u type %u)\\n\",\n      iDbPage, iFreePage, iPtrPage, eType));\n  rc = sqlite3PagerMovepage(pPager, pDbPage->pDbPage, iFreePage, isCommit);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n  pDbPage->pgno = iFreePage;\n\n  /* If pDbPage was a btree-page, then it may have child pages and/or cells\n  ** that point to overflow pages. The pointer map entries for all these\n  ** pages need to be changed.\n  **\n  ** If pDbPage is an overflow page, then the first 4 bytes may store a\n  ** pointer to a subsequent overflow page. If this is the case, then\n  ** the pointer map needs to be updated for the subsequent overflow page.\n  */\n  if( eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE ){\n    rc = setChildPtrmaps(pDbPage);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n  }else{\n    Pgno nextOvfl = get4byte(pDbPage->aData);\n    if( nextOvfl!=0 ){\n      ptrmapPut(pBt, nextOvfl, PTRMAP_OVERFLOW2, iFreePage, &rc);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n    }\n  }\n\n  /* Fix the database pointer on page iPtrPage that pointed at iDbPage so\n  ** that it points at iFreePage. Also fix the pointer map entry for\n  ** iPtrPage.\n  */\n  if( eType!=PTRMAP_ROOTPAGE ){\n    rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    rc = sqlite3PagerWrite(pPtrPage->pDbPage);\n    if( rc!=SQLITE_OK ){\n      releasePage(pPtrPage);\n      return rc;\n    }\n    rc = modifyPagePointer(pPtrPage, iDbPage, iFreePage, eType);\n    releasePage(pPtrPage);\n    if( rc==SQLITE_OK ){\n      ptrmapPut(pBt, iFreePage, eType, iPtrPage, &rc);\n    }\n  }\n  return rc;\n}\n\n/* Forward declaration required by incrVacuumStep(). */\nstatic int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);\n\n/*\n** Perform a single step of an incremental-vacuum. If successful, return\n** SQLITE_OK. If there is no work to do (and therefore no point in\n** calling this function again), return SQLITE_DONE. Or, if an error\n** occurs, return some other error code.\n**\n** More specifically, this function attempts to re-organize the database so\n** that the last page of the file currently in use is no longer in use.\n**\n** Parameter nFin is the number of pages that this database would contain\n** were this function called until it returns SQLITE_DONE.\n**\n** If the bCommit parameter is non-zero, this function assumes that the\n** caller will keep calling incrVacuumStep() until it returns SQLITE_DONE\n** or an error. bCommit is passed true for an auto-vacuum-on-commit\n** operation, or false for an incremental vacuum.\n*/\nstatic int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg, int bCommit){\n  Pgno nFreeList;           /* Number of pages still on the free-list */\n  int rc;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( iLastPg>nFin );\n\n  if( !PTRMAP_ISPAGE(pBt, iLastPg) && iLastPg!=PENDING_BYTE_PAGE(pBt) ){\n    u8 eType;\n    Pgno iPtrPage;\n\n    nFreeList = get4byte(&pBt->pPage1->aData[36]);\n    if( nFreeList==0 ){\n      return SQLITE_DONE;\n    }\n\n    rc = ptrmapGet(pBt, iLastPg, &eType, &iPtrPage);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    if( eType==PTRMAP_ROOTPAGE ){\n      return SQLITE_CORRUPT_BKPT;\n    }\n\n    if( eType==PTRMAP_FREEPAGE ){\n      if( bCommit==0 ){\n        /* Remove the page from the files free-list. This is not required\n        ** if bCommit is non-zero. In that case, the free-list will be\n        ** truncated to zero after this function returns, so it doesn't\n        ** matter if it still contains some garbage entries.\n        */\n        Pgno iFreePg;\n        MemPage *pFreePg;\n        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, iLastPg, BTALLOC_EXACT);\n        if( rc!=SQLITE_OK ){\n          return rc;\n        }\n        assert( iFreePg==iLastPg );\n        releasePage(pFreePg);\n      }\n    } else {\n      Pgno iFreePg;             /* Index of free page to move pLastPg to */\n      MemPage *pLastPg;\n      u8 eMode = BTALLOC_ANY;   /* Mode parameter for allocateBtreePage() */\n      Pgno iNear = 0;           /* nearby parameter for allocateBtreePage() */\n\n      rc = btreeGetPage(pBt, iLastPg, &pLastPg, 0);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n\n      /* If bCommit is zero, this loop runs exactly once and page pLastPg\n      ** is swapped with the first free page pulled off the free list.\n      **\n      ** On the other hand, if bCommit is greater than zero, then keep\n      ** looping until a free-page located within the first nFin pages\n      ** of the file is found.\n      */\n      if( bCommit==0 ){\n        eMode = BTALLOC_LE;\n        iNear = nFin;\n      }\n      do {\n        MemPage *pFreePg;\n        Pgno dbSize = btreePagecount(pBt);\n        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, iNear, eMode);\n        if( rc!=SQLITE_OK ){\n          releasePage(pLastPg);\n          return rc;\n        }\n        releasePage(pFreePg);\n        if( iFreePg>dbSize ){\n          releasePage(pLastPg);\n          return SQLITE_CORRUPT_BKPT;\n        }\n      }while( bCommit && iFreePg>nFin );\n      assert( iFreePg<iLastPg );\n\n      rc = relocatePage(pBt, pLastPg, eType, iPtrPage, iFreePg, bCommit);\n      releasePage(pLastPg);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n    }\n  }\n\n  if( bCommit==0 ){\n    do {\n      iLastPg--;\n    }while( iLastPg==PENDING_BYTE_PAGE(pBt) || PTRMAP_ISPAGE(pBt, iLastPg) );\n    pBt->bDoTruncate = 1;\n    pBt->nPage = iLastPg;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** The database opened by the first argument is an auto-vacuum database\n** nOrig pages in size containing nFree free pages. Return the expected\n** size of the database in pages following an auto-vacuum operation.\n*/\nstatic Pgno finalDbSize(BtShared *pBt, Pgno nOrig, Pgno nFree){\n  int nEntry;                     /* Number of entries on one ptrmap page */\n  Pgno nPtrmap;                   /* Number of PtrMap pages to be freed */\n  Pgno nFin;                      /* Return value */\n\n  nEntry = pBt->usableSize/5;\n  nPtrmap = (nFree-nOrig+PTRMAP_PAGENO(pBt, nOrig)+nEntry)/nEntry;\n  nFin = nOrig - nFree - nPtrmap;\n  if( nOrig>PENDING_BYTE_PAGE(pBt) && nFin<PENDING_BYTE_PAGE(pBt) ){\n    nFin--;\n  }\n  while( PTRMAP_ISPAGE(pBt, nFin) || nFin==PENDING_BYTE_PAGE(pBt) ){\n    nFin--;\n  }\n\n  return nFin;\n}\n\n/*\n** A write-transaction must be opened before calling this function.\n** It performs a single unit of work towards an incremental vacuum.\n**\n** If the incremental vacuum is finished after this function has run,\n** SQLITE_DONE is returned. If it is not finished, but no error occurred,\n** SQLITE_OK is returned. Otherwise an SQLite error code.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){\n  int rc;\n  BtShared *pBt = p->pBt;\n\n  sqlite3BtreeEnter(p);\n  assert( pBt->inTransaction==TRANS_WRITE && p->inTrans==TRANS_WRITE );\n  if( !pBt->autoVacuum ){\n    rc = SQLITE_DONE;\n  }else{\n    Pgno nOrig = btreePagecount(pBt);\n    Pgno nFree = get4byte(&pBt->pPage1->aData[36]);\n    Pgno nFin = finalDbSize(pBt, nOrig, nFree);\n\n    if( nOrig<nFin || nFree>=nOrig ){\n      rc = SQLITE_CORRUPT_BKPT;\n    }else if( nFree>0 ){\n      rc = saveAllCursors(pBt, 0, 0);\n      if( rc==SQLITE_OK ){\n        invalidateAllOverflowCache(pBt);\n        rc = incrVacuumStep(pBt, nFin, nOrig, 0);\n      }\n      if( rc==SQLITE_OK ){\n        rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);\n        put4byte(&pBt->pPage1->aData[28], pBt->nPage);\n      }\n    }else{\n      rc = SQLITE_DONE;\n    }\n  }\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** This routine is called prior to sqlite3PagerCommit when a transaction\n** is committed for an auto-vacuum database.\n*/\nstatic int autoVacuumCommit(Btree *p){\n  int rc = SQLITE_OK;\n  Pager *pPager;\n  BtShared *pBt;\n  sqlite3 *db;\n  VVA_ONLY( int nRef );\n\n  assert( p!=0 );\n  pBt = p->pBt;\n  pPager = pBt->pPager;\n  VVA_ONLY( nRef = sqlite3PagerRefcount(pPager); )\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  invalidateAllOverflowCache(pBt);\n  assert(pBt->autoVacuum);\n  if( !pBt->incrVacuum ){\n    Pgno nFin;         /* Number of pages in database after autovacuuming */\n    Pgno nFree;        /* Number of pages on the freelist initially */\n    Pgno nVac;         /* Number of pages to vacuum */\n    Pgno iFree;        /* The next page to be freed */\n    Pgno nOrig;        /* Database size before freeing */\n\n    nOrig = btreePagecount(pBt);\n    if( PTRMAP_ISPAGE(pBt, nOrig) || nOrig==PENDING_BYTE_PAGE(pBt) ){\n      /* It is not possible to create a database for which the final page\n      ** is either a pointer-map page or the pending-byte page. If one\n      ** is encountered, this indicates corruption.\n      */\n      return SQLITE_CORRUPT_BKPT;\n    }\n\n    nFree = get4byte(&pBt->pPage1->aData[36]);\n    db = p->db;\n    if( db->xAutovacPages ){\n      int iDb;\n      for(iDb=0; ALWAYS(iDb<db->nDb); iDb++){\n        if( db->aDb[iDb].pBt==p ) break;\n      }\n      nVac = db->xAutovacPages(\n        db->pAutovacPagesArg,\n        db->aDb[iDb].zDbSName,\n        nOrig,\n        nFree,\n        pBt->pageSize\n      );\n      if( nVac>nFree ){\n        nVac = nFree;\n      }\n      if( nVac==0 ){\n        return SQLITE_OK;\n      }\n    }else{\n      nVac = nFree;\n    }\n    nFin = finalDbSize(pBt, nOrig, nVac);\n    if( nFin>nOrig ) return SQLITE_CORRUPT_BKPT;\n    if( nFin<nOrig ){\n      rc = saveAllCursors(pBt, 0, 0);\n    }\n    for(iFree=nOrig; iFree>nFin && rc==SQLITE_OK; iFree--){\n      rc = incrVacuumStep(pBt, nFin, iFree, nVac==nFree);\n    }\n    if( (rc==SQLITE_DONE || rc==SQLITE_OK) && nFree>0 ){\n      rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);\n      if( nVac==nFree ){\n        put4byte(&pBt->pPage1->aData[32], 0);\n        put4byte(&pBt->pPage1->aData[36], 0);\n      }\n      put4byte(&pBt->pPage1->aData[28], nFin);\n      pBt->bDoTruncate = 1;\n      pBt->nPage = nFin;\n    }\n    if( rc!=SQLITE_OK ){\n      sqlite3PagerRollback(pPager);\n    }\n  }\n\n  assert( nRef>=sqlite3PagerRefcount(pPager) );\n  return rc;\n}\n\n#else /* ifndef SQLITE_OMIT_AUTOVACUUM */\n# define setChildPtrmaps(x) SQLITE_OK\n#endif\n\n/*\n** This routine does the first phase of a two-phase commit.  This routine\n** causes a rollback journal to be created (if it does not already exist)\n** and populated with enough information so that if a power loss occurs\n** the database can be restored to its original state by playing back\n** the journal.  Then the contents of the journal are flushed out to\n** the disk.  After the journal is safely on oxide, the changes to the\n** database are written into the database file and flushed to oxide.\n** At the end of this call, the rollback journal still exists on the\n** disk and we are still holding all locks, so the transaction has not\n** committed.  See sqlite3BtreeCommitPhaseTwo() for the second phase of the\n** commit process.\n**\n** This call is a no-op if no write-transaction is currently active on pBt.\n**\n** Otherwise, sync the database file for the btree pBt. zSuperJrnl points to\n** the name of a super-journal file that should be written into the\n** individual journal file, or is NULL, indicating no super-journal file\n** (single database transaction).\n**\n** When this is called, the super-journal should already have been\n** created, populated with this journal pointer and synced to disk.\n**\n** Once this is routine has returned, the only thing required to commit\n** the write-transaction for this database file is to delete the journal.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zSuperJrnl){\n  int rc = SQLITE_OK;\n  if( p->inTrans==TRANS_WRITE ){\n    BtShared *pBt = p->pBt;\n    sqlite3BtreeEnter(p);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pBt->autoVacuum ){\n      rc = autoVacuumCommit(p);\n      if( rc!=SQLITE_OK ){\n        sqlite3BtreeLeave(p);\n        return rc;\n      }\n    }\n    if( pBt->bDoTruncate ){\n      sqlite3PagerTruncateImage(pBt->pPager, pBt->nPage);\n    }\n#endif\n    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zSuperJrnl, 0);\n    sqlite3BtreeLeave(p);\n  }\n  return rc;\n}\n\n/*\n** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()\n** at the conclusion of a transaction.\n*/\nstatic void btreeEndTransaction(Btree *p){\n  BtShared *pBt = p->pBt;\n  sqlite3 *db = p->db;\n  assert( sqlite3BtreeHoldsMutex(p) );\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  pBt->bDoTruncate = 0;\n#endif\n  if( p->inTrans>TRANS_NONE && db->nVdbeRead>1 ){\n    /* If there are other active statements that belong to this database\n    ** handle, downgrade to a read-only transaction. The other statements\n    ** may still be reading from the database.  */\n    downgradeAllSharedCacheTableLocks(p);\n    p->inTrans = TRANS_READ;\n  }else{\n    /* If the handle had any kind of transaction open, decrement the\n    ** transaction count of the shared btree. If the transaction count\n    ** reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused()\n    ** call below will unlock the pager.  */\n    if( p->inTrans!=TRANS_NONE ){\n      clearAllSharedCacheTableLocks(p);\n      pBt->nTransaction--;\n      if( 0==pBt->nTransaction ){\n        pBt->inTransaction = TRANS_NONE;\n      }\n    }\n\n    /* Set the current transaction state to TRANS_NONE and unlock the\n    ** pager if this call closed the only read or write transaction.  */\n    p->inTrans = TRANS_NONE;\n    unlockBtreeIfUnused(pBt);\n  }\n\n  btreeIntegrity(p);\n}\n\n/*\n** Commit the transaction currently in progress.\n**\n** This routine implements the second phase of a 2-phase commit.  The\n** sqlite3BtreeCommitPhaseOne() routine does the first phase and should\n** be invoked prior to calling this routine.  The sqlite3BtreeCommitPhaseOne()\n** routine did all the work of writing information out to disk and flushing the\n** contents so that they are written onto the disk platter.  All this\n** routine has to do is delete or truncate or zero the header in the\n** the rollback journal (which causes the transaction to commit) and\n** drop locks.\n**\n** Normally, if an error occurs while the pager layer is attempting to\n** finalize the underlying journal file, this function returns an error and\n** the upper layer will attempt a rollback. However, if the second argument\n** is non-zero then this b-tree transaction is part of a multi-file\n** transaction. In this case, the transaction has already been committed\n** (by deleting a super-journal file) and the caller will ignore this\n** functions return code. So, even if an error occurs in the pager layer,\n** reset the b-tree objects internal state to indicate that the write\n** transaction has been closed. This is quite safe, as the pager will have\n** transitioned to the error state.\n**\n** This will release the write lock on the database file.  If there\n** are no active cursors, it also releases the read lock.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){\n\n  if( p->inTrans==TRANS_NONE ) return SQLITE_OK;\n  sqlite3BtreeEnter(p);\n  btreeIntegrity(p);\n\n  /* If the handle has a write-transaction open, commit the shared-btrees\n  ** transaction and set the shared state to TRANS_READ.\n  */\n  if( p->inTrans==TRANS_WRITE ){\n    int rc;\n    BtShared *pBt = p->pBt;\n    assert( pBt->inTransaction==TRANS_WRITE );\n    assert( pBt->nTransaction>0 );\n    rc = sqlite3PagerCommitPhaseTwo(pBt->pPager);\n    if( rc!=SQLITE_OK && bCleanup==0 ){\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n    p->iBDataVersion--;  /* Compensate for pPager->iDataVersion++; */\n    pBt->inTransaction = TRANS_READ;\n    btreeClearHasContent(pBt);\n  }\n\n  btreeEndTransaction(p);\n  sqlite3BtreeLeave(p);\n  return SQLITE_OK;\n}\n\n/*\n** Do both phases of a commit.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){\n  int rc;\n  sqlite3BtreeEnter(p);\n  rc = sqlite3BtreeCommitPhaseOne(p, 0);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3BtreeCommitPhaseTwo(p, 0);\n  }\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** This routine sets the state to CURSOR_FAULT and the error\n** code to errCode for every cursor on any BtShared that pBtree\n** references.  Or if the writeOnly flag is set to 1, then only\n** trip write cursors and leave read cursors unchanged.\n**\n** Every cursor is a candidate to be tripped, including cursors\n** that belong to other database connections that happen to be\n** sharing the cache with pBtree.\n**\n** This routine gets called when a rollback occurs. If the writeOnly\n** flag is true, then only write-cursors need be tripped - read-only\n** cursors save their current positions so that they may continue\n** following the rollback. Or, if writeOnly is false, all cursors are\n** tripped. In general, writeOnly is false if the transaction being\n** rolled back modified the database schema. In this case b-tree root\n** pages may be moved or deleted from the database altogether, making\n** it unsafe for read cursors to continue.\n**\n** If the writeOnly flag is true and an error is encountered while\n** saving the current position of a read-only cursor, all cursors,\n** including all read-cursors are tripped.\n**\n** SQLITE_OK is returned if successful, or if an error occurs while\n** saving a cursor position, an SQLite error code.\n*/\nSQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){\n  BtCursor *p;\n  int rc = SQLITE_OK;\n\n  assert( (writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1 );\n  if( pBtree ){\n    sqlite3BtreeEnter(pBtree);\n    for(p=pBtree->pBt->pCursor; p; p=p->pNext){\n      if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){\n        if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){\n          rc = saveCursorPosition(p);\n          if( rc!=SQLITE_OK ){\n            (void)sqlite3BtreeTripAllCursors(pBtree, rc, 0);\n            break;\n          }\n        }\n      }else{\n        sqlite3BtreeClearCursor(p);\n        p->eState = CURSOR_FAULT;\n        p->skipNext = errCode;\n      }\n      btreeReleaseAllCursorPages(p);\n    }\n    sqlite3BtreeLeave(pBtree);\n  }\n  return rc;\n}\n\n/*\n** Set the pBt->nPage field correctly, according to the current\n** state of the database.  Assume pBt->pPage1 is valid.\n*/\nstatic void btreeSetNPage(BtShared *pBt, MemPage *pPage1){\n  int nPage = get4byte(&pPage1->aData[28]);\n  testcase( nPage==0 );\n  if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);\n  testcase( pBt->nPage!=(u32)nPage );\n  pBt->nPage = nPage;\n}\n\n/*\n** Rollback the transaction in progress.\n**\n** If tripCode is not SQLITE_OK then cursors will be invalidated (tripped).\n** Only write cursors are tripped if writeOnly is true but all cursors are\n** tripped if writeOnly is false.  Any attempt to use\n** a tripped cursor will result in an error.\n**\n** This will release the write lock on the database file.  If there\n** are no active cursors, it also releases the read lock.\n*/\nSQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode, int writeOnly){\n  int rc;\n  BtShared *pBt = p->pBt;\n  MemPage *pPage1;\n\n  assert( writeOnly==1 || writeOnly==0 );\n  assert( tripCode==SQLITE_ABORT_ROLLBACK || tripCode==SQLITE_OK );\n  sqlite3BtreeEnter(p);\n  if( tripCode==SQLITE_OK ){\n    rc = tripCode = saveAllCursors(pBt, 0, 0);\n    if( rc ) writeOnly = 0;\n  }else{\n    rc = SQLITE_OK;\n  }\n  if( tripCode ){\n    int rc2 = sqlite3BtreeTripAllCursors(p, tripCode, writeOnly);\n    assert( rc==SQLITE_OK || (writeOnly==0 && rc2==SQLITE_OK) );\n    if( rc2!=SQLITE_OK ) rc = rc2;\n  }\n  btreeIntegrity(p);\n\n  if( p->inTrans==TRANS_WRITE ){\n    int rc2;\n\n    assert( TRANS_WRITE==pBt->inTransaction );\n    rc2 = sqlite3PagerRollback(pBt->pPager);\n    if( rc2!=SQLITE_OK ){\n      rc = rc2;\n    }\n\n    /* The rollback may have destroyed the pPage1->aData value.  So\n    ** call btreeGetPage() on page 1 again to make\n    ** sure pPage1->aData is set correctly. */\n    if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){\n      btreeSetNPage(pBt, pPage1);\n      releasePageOne(pPage1);\n    }\n    assert( countValidCursors(pBt, 1)==0 );\n    pBt->inTransaction = TRANS_READ;\n    btreeClearHasContent(pBt);\n  }\n\n  btreeEndTransaction(p);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** Start a statement subtransaction. The subtransaction can be rolled\n** back independently of the main transaction. You must start a transaction\n** before starting a subtransaction. The subtransaction is ended automatically\n** if the main transaction commits or rolls back.\n**\n** Statement subtransactions are used around individual SQL statements\n** that are contained within a BEGIN...COMMIT block.  If a constraint\n** error occurs within the statement, the effect of that one statement\n** can be rolled back without having to rollback the entire transaction.\n**\n** A statement sub-transaction is implemented as an anonymous savepoint. The\n** value passed as the second parameter is the total number of savepoints,\n** including the new anonymous savepoint, open on the B-Tree. i.e. if there\n** are no active savepoints and no other statement-transactions open,\n** iStatement is 1. This anonymous savepoint can be released or rolled back\n** using the sqlite3BtreeSavepoint() function.\n*/\nSQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree *p, int iStatement){\n  int rc;\n  BtShared *pBt = p->pBt;\n  sqlite3BtreeEnter(p);\n  assert( p->inTrans==TRANS_WRITE );\n  assert( (pBt->btsFlags & BTS_READ_ONLY)==0 );\n  assert( iStatement>0 );\n  assert( iStatement>p->db->nSavepoint );\n  assert( pBt->inTransaction==TRANS_WRITE );\n  /* At the pager level, a statement transaction is a savepoint with\n  ** an index greater than all savepoints created explicitly using\n  ** SQL statements. It is illegal to open, release or rollback any\n  ** such savepoints while the statement transaction savepoint is active.\n  */\n  rc = sqlite3PagerOpenSavepoint(pBt->pPager, iStatement);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** The second argument to this function, op, is always SAVEPOINT_ROLLBACK\n** or SAVEPOINT_RELEASE. This function either releases or rolls back the\n** savepoint identified by parameter iSavepoint, depending on the value\n** of op.\n**\n** Normally, iSavepoint is greater than or equal to zero. However, if op is\n** SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the\n** contents of the entire transaction are rolled back. This is different\n** from a normal transaction rollback, as no locks are released and the\n** transaction remains open.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){\n  int rc = SQLITE_OK;\n  if( p && p->inTrans==TRANS_WRITE ){\n    BtShared *pBt = p->pBt;\n    assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );\n    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );\n    sqlite3BtreeEnter(p);\n    if( op==SAVEPOINT_ROLLBACK ){\n      rc = saveAllCursors(pBt, 0, 0);\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);\n    }\n    if( rc==SQLITE_OK ){\n      if( iSavepoint<0 && (pBt->btsFlags & BTS_INITIALLY_EMPTY)!=0 ){\n        pBt->nPage = 0;\n      }\n      rc = newDatabase(pBt);\n      btreeSetNPage(pBt, pBt->pPage1);\n\n      /* pBt->nPage might be zero if the database was corrupt when\n      ** the transaction was started. Otherwise, it must be at least 1.  */\n      assert( CORRUPT_DB || pBt->nPage>0 );\n    }\n    sqlite3BtreeLeave(p);\n  }\n  return rc;\n}\n\n/*\n** Create a new cursor for the BTree whose root is on the page\n** iTable. If a read-only cursor is requested, it is assumed that\n** the caller already has at least a read-only transaction open\n** on the database already. If a write-cursor is requested, then\n** the caller is assumed to have an open write transaction.\n**\n** If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only\n** be used for reading.  If the BTREE_WRCSR bit is set, then the cursor\n** can be used for reading or for writing if other conditions for writing\n** are also met.  These are the conditions that must be met in order\n** for writing to be allowed:\n**\n** 1:  The cursor must have been opened with wrFlag containing BTREE_WRCSR\n**\n** 2:  Other database connections that share the same pager cache\n**     but which are not in the READ_UNCOMMITTED state may not have\n**     cursors open with wrFlag==0 on the same table.  Otherwise\n**     the changes made by this write cursor would be visible to\n**     the read cursors in the other database connection.\n**\n** 3:  The database must be writable (not on read-only media)\n**\n** 4:  There must be an active transaction.\n**\n** The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR\n** is set.  If FORDELETE is set, that is a hint to the implementation that\n** this cursor will only be used to seek to and delete entries of an index\n** as part of a larger DELETE statement.  The FORDELETE hint is not used by\n** this implementation.  But in a hypothetical alternative storage engine\n** in which index entries are automatically deleted when corresponding table\n** rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE\n** operations on this cursor can be no-ops and all READ operations can\n** return a null row (2-bytes: 0x01 0x00).\n**\n** No checking is done to make sure that page iTable really is the\n** root page of a b-tree.  If it is not, then the cursor acquired\n** will not work correctly.\n**\n** It is assumed that the sqlite3BtreeCursorZero() has been called\n** on pCur to initialize the memory space prior to invoking this routine.\n*/\nstatic int btreeCursor(\n  Btree *p,                              /* The btree */\n  Pgno iTable,                           /* Root page of table to open */\n  int wrFlag,                            /* 1 to write. 0 read-only */\n  struct KeyInfo *pKeyInfo,              /* First arg to comparison function */\n  BtCursor *pCur                         /* Space for new cursor */\n){\n  BtShared *pBt = p->pBt;                /* Shared b-tree handle */\n  BtCursor *pX;                          /* Looping over other all cursors */\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( wrFlag==0\n       || wrFlag==BTREE_WRCSR\n       || wrFlag==(BTREE_WRCSR|BTREE_FORDELETE)\n  );\n\n  /* The following assert statements verify that if this is a sharable\n  ** b-tree database, the connection is holding the required table locks,\n  ** and that no other connection has any open cursor that conflicts with\n  ** this lock.  The iTable<1 term disables the check for corrupt schemas. */\n  assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, (wrFlag?2:1))\n          || iTable<1 );\n  assert( wrFlag==0 || !hasReadConflicts(p, iTable) );\n\n  /* Assert that the caller has opened the required transaction. */\n  assert( p->inTrans>TRANS_NONE );\n  assert( wrFlag==0 || p->inTrans==TRANS_WRITE );\n  assert( pBt->pPage1 && pBt->pPage1->aData );\n  assert( wrFlag==0 || (pBt->btsFlags & BTS_READ_ONLY)==0 );\n\n  if( iTable<=1 ){\n    if( iTable<1 ){\n      return SQLITE_CORRUPT_BKPT;\n    }else if( btreePagecount(pBt)==0 ){\n      assert( wrFlag==0 );\n      iTable = 0;\n    }\n  }\n\n  /* Now that no other errors can occur, finish filling in the BtCursor\n  ** variables and link the cursor into the BtShared list.  */\n  pCur->pgnoRoot = iTable;\n  pCur->iPage = -1;\n  pCur->pKeyInfo = pKeyInfo;\n  pCur->pBtree = p;\n  pCur->pBt = pBt;\n  pCur->curFlags = 0;\n  /* If there are two or more cursors on the same btree, then all such\n  ** cursors *must* have the BTCF_Multiple flag set. */\n  for(pX=pBt->pCursor; pX; pX=pX->pNext){\n    if( pX->pgnoRoot==iTable ){\n      pX->curFlags |= BTCF_Multiple;\n      pCur->curFlags = BTCF_Multiple;\n    }\n  }\n  pCur->eState = CURSOR_INVALID;\n  pCur->pNext = pBt->pCursor;\n  pBt->pCursor = pCur;\n  if( wrFlag ){\n    pCur->curFlags |= BTCF_WriteFlag;\n    pCur->curPagerFlags = 0;\n    if( pBt->pTmpSpace==0 ) return allocateTempSpace(pBt);\n  }else{\n    pCur->curPagerFlags = PAGER_GET_READONLY;\n  }\n  return SQLITE_OK;\n}\nstatic int btreeCursorWithLock(\n  Btree *p,                              /* The btree */\n  Pgno iTable,                           /* Root page of table to open */\n  int wrFlag,                            /* 1 to write. 0 read-only */\n  struct KeyInfo *pKeyInfo,              /* First arg to comparison function */\n  BtCursor *pCur                         /* Space for new cursor */\n){\n  int rc;\n  sqlite3BtreeEnter(p);\n  rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3BtreeCursor(\n  Btree *p,                                   /* The btree */\n  Pgno iTable,                                /* Root page of table to open */\n  int wrFlag,                                 /* 1 to write. 0 read-only */\n  struct KeyInfo *pKeyInfo,                   /* First arg to xCompare() */\n  BtCursor *pCur                              /* Write new cursor here */\n){\n  if( p->sharable ){\n    return btreeCursorWithLock(p, iTable, wrFlag, pKeyInfo, pCur);\n  }else{\n    return btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);\n  }\n}\n\n/*\n** Return the size of a BtCursor object in bytes.\n**\n** This interfaces is needed so that users of cursors can preallocate\n** sufficient storage to hold a cursor.  The BtCursor object is opaque\n** to users so they cannot do the sizeof() themselves - they must call\n** this routine.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCursorSize(void){\n  return ROUND8(sizeof(BtCursor));\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Return true if and only if the Btree object will be automatically\n** closed with the BtCursor closes.  This is used within assert() statements\n** only.\n*/\nSQLITE_PRIVATE int sqlite3BtreeClosesWithCursor(\n  Btree *pBtree,       /* the btree object */\n  BtCursor *pCur       /* Corresponding cursor */\n){\n  BtShared *pBt = pBtree->pBt;\n  if( (pBt->openFlags & BTREE_SINGLE)==0 ) return 0;\n  if( pBt->pCursor!=pCur ) return 0;\n  if( pCur->pNext!=0 ) return 0;\n  if( pCur->pBtree!=pBtree ) return 0;\n  return 1;\n}\n#endif\n\n/*\n** Initialize memory that will be converted into a BtCursor object.\n**\n** The simple approach here would be to memset() the entire object\n** to zero.  But it turns out that the apPage[] and aiIdx[] arrays\n** do not need to be zeroed and they are large, so we can save a lot\n** of run-time by skipping the initialization of those elements.\n*/\nSQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor *p){\n  memset(p, 0, offsetof(BtCursor, BTCURSOR_FIRST_UNINIT));\n}\n\n/*\n** Close a cursor.  The read lock on the database file is released\n** when the last cursor is closed.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){\n  Btree *pBtree = pCur->pBtree;\n  if( pBtree ){\n    BtShared *pBt = pCur->pBt;\n    sqlite3BtreeEnter(pBtree);\n    assert( pBt->pCursor!=0 );\n    if( pBt->pCursor==pCur ){\n      pBt->pCursor = pCur->pNext;\n    }else{\n      BtCursor *pPrev = pBt->pCursor;\n      do{\n        if( pPrev->pNext==pCur ){\n          pPrev->pNext = pCur->pNext;\n          break;\n        }\n        pPrev = pPrev->pNext;\n      }while( ALWAYS(pPrev) );\n    }\n    btreeReleaseAllCursorPages(pCur);\n    unlockBtreeIfUnused(pBt);\n    sqlite3_free(pCur->aOverflow);\n    sqlite3_free(pCur->pKey);\n    if( (pBt->openFlags & BTREE_SINGLE) && pBt->pCursor==0 ){\n      /* Since the BtShared is not sharable, there is no need to\n      ** worry about the missing sqlite3BtreeLeave() call here.  */\n      assert( pBtree->sharable==0 );\n      sqlite3BtreeClose(pBtree);\n    }else{\n      sqlite3BtreeLeave(pBtree);\n    }\n    pCur->pBtree = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Make sure the BtCursor* given in the argument has a valid\n** BtCursor.info structure.  If it is not already valid, call\n** btreeParseCell() to fill it in.\n**\n** BtCursor.info is a cache of the information in the current cell.\n** Using this cache reduces the number of calls to btreeParseCell().\n*/\n#ifndef NDEBUG\n  static int cellInfoEqual(CellInfo *a, CellInfo *b){\n    if( a->nKey!=b->nKey ) return 0;\n    if( a->pPayload!=b->pPayload ) return 0;\n    if( a->nPayload!=b->nPayload ) return 0;\n    if( a->nLocal!=b->nLocal ) return 0;\n    if( a->nSize!=b->nSize ) return 0;\n    return 1;\n  }\n  static void assertCellInfo(BtCursor *pCur){\n    CellInfo info;\n    memset(&info, 0, sizeof(info));\n    btreeParseCell(pCur->pPage, pCur->ix, &info);\n    assert( CORRUPT_DB || cellInfoEqual(&info, &pCur->info) );\n  }\n#else\n  #define assertCellInfo(x)\n#endif\nstatic SQLITE_NOINLINE void getCellInfo(BtCursor *pCur){\n  if( pCur->info.nSize==0 ){\n    pCur->curFlags |= BTCF_ValidNKey;\n    btreeParseCell(pCur->pPage,pCur->ix,&pCur->info);\n  }else{\n    assertCellInfo(pCur);\n  }\n}\n\n#ifndef NDEBUG  /* The next routine used only within assert() statements */\n/*\n** Return true if the given BtCursor is valid.  A valid cursor is one\n** that is currently pointing to a row in a (non-empty) table.\n** This is a verification routine is used only within assert() statements.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){\n  return pCur && pCur->eState==CURSOR_VALID;\n}\n#endif /* NDEBUG */\nSQLITE_PRIVATE int sqlite3BtreeCursorIsValidNN(BtCursor *pCur){\n  assert( pCur!=0 );\n  return pCur->eState==CURSOR_VALID;\n}\n\n/*\n** Return the value of the integer key or \"rowid\" for a table btree.\n** This routine is only valid for a cursor that is pointing into a\n** ordinary table btree.  If the cursor points to an index btree or\n** is invalid, the result of this routine is undefined.\n*/\nSQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor *pCur){\n  assert( cursorHoldsMutex(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->curIntKey );\n  getCellInfo(pCur);\n  return pCur->info.nKey;\n}\n\n/*\n** Pin or unpin a cursor.\n*/\nSQLITE_PRIVATE void sqlite3BtreeCursorPin(BtCursor *pCur){\n  assert( (pCur->curFlags & BTCF_Pinned)==0 );\n  pCur->curFlags |= BTCF_Pinned;\n}\nSQLITE_PRIVATE void sqlite3BtreeCursorUnpin(BtCursor *pCur){\n  assert( (pCur->curFlags & BTCF_Pinned)!=0 );\n  pCur->curFlags &= ~BTCF_Pinned;\n}\n\n/*\n** Return the offset into the database file for the start of the\n** payload to which the cursor is pointing.\n*/\nSQLITE_PRIVATE i64 sqlite3BtreeOffset(BtCursor *pCur){\n  assert( cursorHoldsMutex(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  getCellInfo(pCur);\n  return (i64)pCur->pBt->pageSize*((i64)pCur->pPage->pgno - 1) +\n         (i64)(pCur->info.pPayload - pCur->pPage->aData);\n}\n\n/*\n** Return the number of bytes of payload for the entry that pCur is\n** currently pointing to.  For table btrees, this will be the amount\n** of data.  For index btrees, this will be the size of the key.\n**\n** The caller must guarantee that the cursor is pointing to a non-NULL\n** valid entry.  In other words, the calling procedure must guarantee\n** that the cursor has Cursor.eState==CURSOR_VALID.\n*/\nSQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){\n  assert( cursorHoldsMutex(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  getCellInfo(pCur);\n  return pCur->info.nPayload;\n}\n\n/*\n** Return an upper bound on the size of any record for the table\n** that the cursor is pointing into.\n**\n** This is an optimization.  Everything will still work if this\n** routine always returns 2147483647 (which is the largest record\n** that SQLite can handle) or more.  But returning a smaller value might\n** prevent large memory allocations when trying to interpret a\n** corrupt database.\n**\n** The current implementation merely returns the size of the underlying\n** database file.\n*/\nSQLITE_PRIVATE sqlite3_int64 sqlite3BtreeMaxRecordSize(BtCursor *pCur){\n  assert( cursorHoldsMutex(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  return pCur->pBt->pageSize * (sqlite3_int64)pCur->pBt->nPage;\n}\n\n/*\n** Given the page number of an overflow page in the database (parameter\n** ovfl), this function finds the page number of the next page in the\n** linked list of overflow pages. If possible, it uses the auto-vacuum\n** pointer-map data instead of reading the content of page ovfl to do so.\n**\n** If an error occurs an SQLite error code is returned. Otherwise:\n**\n** The page number of the next overflow page in the linked list is\n** written to *pPgnoNext. If page ovfl is the last page in its linked\n** list, *pPgnoNext is set to zero.\n**\n** If ppPage is not NULL, and a reference to the MemPage object corresponding\n** to page number pOvfl was obtained, then *ppPage is set to point to that\n** reference. It is the responsibility of the caller to call releasePage()\n** on *ppPage to free the reference. In no reference was obtained (because\n** the pointer-map was used to obtain the value for *pPgnoNext), then\n** *ppPage is set to zero.\n*/\nstatic int getOverflowPage(\n  BtShared *pBt,               /* The database file */\n  Pgno ovfl,                   /* Current overflow page number */\n  MemPage **ppPage,            /* OUT: MemPage handle (may be NULL) */\n  Pgno *pPgnoNext              /* OUT: Next overflow page number */\n){\n  Pgno next = 0;\n  MemPage *pPage = 0;\n  int rc = SQLITE_OK;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert(pPgnoNext);\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  /* Try to find the next page in the overflow list using the\n  ** autovacuum pointer-map pages. Guess that the next page in\n  ** the overflow list is page number (ovfl+1). If that guess turns\n  ** out to be wrong, fall back to loading the data of page\n  ** number ovfl to determine the next page number.\n  */\n  if( pBt->autoVacuum ){\n    Pgno pgno;\n    Pgno iGuess = ovfl+1;\n    u8 eType;\n\n    while( PTRMAP_ISPAGE(pBt, iGuess) || iGuess==PENDING_BYTE_PAGE(pBt) ){\n      iGuess++;\n    }\n\n    if( iGuess<=btreePagecount(pBt) ){\n      rc = ptrmapGet(pBt, iGuess, &eType, &pgno);\n      if( rc==SQLITE_OK && eType==PTRMAP_OVERFLOW2 && pgno==ovfl ){\n        next = iGuess;\n        rc = SQLITE_DONE;\n      }\n    }\n  }\n#endif\n\n  assert( next==0 || rc==SQLITE_DONE );\n  if( rc==SQLITE_OK ){\n    rc = btreeGetPage(pBt, ovfl, &pPage, (ppPage==0) ? PAGER_GET_READONLY : 0);\n    assert( rc==SQLITE_OK || pPage==0 );\n    if( rc==SQLITE_OK ){\n      next = get4byte(pPage->aData);\n    }\n  }\n\n  *pPgnoNext = next;\n  if( ppPage ){\n    *ppPage = pPage;\n  }else{\n    releasePage(pPage);\n  }\n  return (rc==SQLITE_DONE ? SQLITE_OK : rc);\n}\n\n/*\n** Copy data from a buffer to a page, or from a page to a buffer.\n**\n** pPayload is a pointer to data stored on database page pDbPage.\n** If argument eOp is false, then nByte bytes of data are copied\n** from pPayload to the buffer pointed at by pBuf. If eOp is true,\n** then sqlite3PagerWrite() is called on pDbPage and nByte bytes\n** of data are copied from the buffer pBuf to pPayload.\n**\n** SQLITE_OK is returned on success, otherwise an error code.\n*/\nstatic int copyPayload(\n  void *pPayload,           /* Pointer to page data */\n  void *pBuf,               /* Pointer to buffer */\n  int nByte,                /* Number of bytes to copy */\n  int eOp,                  /* 0 -> copy from page, 1 -> copy to page */\n  DbPage *pDbPage           /* Page containing pPayload */\n){\n  if( eOp ){\n    /* Copy data from buffer to page (a write operation) */\n    int rc = sqlite3PagerWrite(pDbPage);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    memcpy(pPayload, pBuf, nByte);\n  }else{\n    /* Copy data from page to buffer (a read operation) */\n    memcpy(pBuf, pPayload, nByte);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This function is used to read or overwrite payload information\n** for the entry that the pCur cursor is pointing to. The eOp\n** argument is interpreted as follows:\n**\n**   0: The operation is a read. Populate the overflow cache.\n**   1: The operation is a write. Populate the overflow cache.\n**\n** A total of \"amt\" bytes are read or written beginning at \"offset\".\n** Data is read to or from the buffer pBuf.\n**\n** The content being read or written might appear on the main page\n** or be scattered out on multiple overflow pages.\n**\n** If the current cursor entry uses one or more overflow pages\n** this function may allocate space for and lazily populate\n** the overflow page-list cache array (BtCursor.aOverflow).\n** Subsequent calls use this cache to make seeking to the supplied offset\n** more efficient.\n**\n** Once an overflow page-list cache has been allocated, it must be\n** invalidated if some other cursor writes to the same table, or if\n** the cursor is moved to a different row. Additionally, in auto-vacuum\n** mode, the following events may invalidate an overflow page-list cache.\n**\n**   * An incremental vacuum,\n**   * A commit in auto_vacuum=\"full\" mode,\n**   * Creating a table (may require moving an overflow page).\n*/\nstatic int accessPayload(\n  BtCursor *pCur,      /* Cursor pointing to entry to read from */\n  u32 offset,          /* Begin reading this far into payload */\n  u32 amt,             /* Read this many bytes */\n  unsigned char *pBuf, /* Write the bytes into this buffer */\n  int eOp              /* zero to read. non-zero to write. */\n){\n  unsigned char *aPayload;\n  int rc = SQLITE_OK;\n  int iIdx = 0;\n  MemPage *pPage = pCur->pPage;               /* Btree page of current entry */\n  BtShared *pBt = pCur->pBt;                  /* Btree this cursor belongs to */\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\n  unsigned char * const pBufStart = pBuf;     /* Start of original out buffer */\n#endif\n\n  assert( pPage );\n  assert( eOp==0 || eOp==1 );\n  assert( pCur->eState==CURSOR_VALID );\n  if( pCur->ix>=pPage->nCell ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  assert( cursorHoldsMutex(pCur) );\n\n  getCellInfo(pCur);\n  aPayload = pCur->info.pPayload;\n  assert( offset+amt <= pCur->info.nPayload );\n\n  assert( aPayload > pPage->aData );\n  if( (uptr)(aPayload - pPage->aData) > (pBt->usableSize - pCur->info.nLocal) ){\n    /* Trying to read or write past the end of the data is an error.  The\n    ** conditional above is really:\n    **    &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]\n    ** but is recast into its current form to avoid integer overflow problems\n    */\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n\n  /* Check if data must be read/written to/from the btree page itself. */\n  if( offset<pCur->info.nLocal ){\n    int a = amt;\n    if( a+offset>pCur->info.nLocal ){\n      a = pCur->info.nLocal - offset;\n    }\n    rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);\n    offset = 0;\n    pBuf += a;\n    amt -= a;\n  }else{\n    offset -= pCur->info.nLocal;\n  }\n\n\n  if( rc==SQLITE_OK && amt>0 ){\n    const u32 ovflSize = pBt->usableSize - 4;  /* Bytes content per ovfl page */\n    Pgno nextPage;\n\n    nextPage = get4byte(&aPayload[pCur->info.nLocal]);\n\n    /* If the BtCursor.aOverflow[] has not been allocated, allocate it now.\n    **\n    ** The aOverflow[] array is sized at one entry for each overflow page\n    ** in the overflow chain. The page number of the first overflow page is\n    ** stored in aOverflow[0], etc. A value of 0 in the aOverflow[] array\n    ** means \"not yet known\" (the cache is lazily populated).\n    */\n    if( (pCur->curFlags & BTCF_ValidOvfl)==0 ){\n      int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;\n      if( pCur->aOverflow==0\n       || nOvfl*(int)sizeof(Pgno) > sqlite3MallocSize(pCur->aOverflow)\n      ){\n        Pgno *aNew;\n        if( sqlite3FaultSim(413) ){\n          aNew = 0;\n        }else{\n          aNew = (Pgno*)sqlite3Realloc(pCur->aOverflow, nOvfl*2*sizeof(Pgno));\n        }\n        if( aNew==0 ){\n          return SQLITE_NOMEM_BKPT;\n        }else{\n          pCur->aOverflow = aNew;\n        }\n      }\n      memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));\n      pCur->curFlags |= BTCF_ValidOvfl;\n    }else{\n      /* Sanity check the validity of the overflow page cache */\n      assert( pCur->aOverflow[0]==nextPage\n           || pCur->aOverflow[0]==0\n           || CORRUPT_DB );\n      assert( pCur->aOverflow[0]!=0 || pCur->aOverflow[offset/ovflSize]==0 );\n\n      /* If the overflow page-list cache has been allocated and the\n      ** entry for the first required overflow page is valid, skip\n      ** directly to it.\n      */\n      if( pCur->aOverflow[offset/ovflSize] ){\n        iIdx = (offset/ovflSize);\n        nextPage = pCur->aOverflow[iIdx];\n        offset = (offset%ovflSize);\n      }\n    }\n\n    assert( rc==SQLITE_OK && amt>0 );\n    while( nextPage ){\n      /* If required, populate the overflow page-list cache. */\n      if( nextPage > pBt->nPage ) return SQLITE_CORRUPT_BKPT;\n      assert( pCur->aOverflow[iIdx]==0\n              || pCur->aOverflow[iIdx]==nextPage\n              || CORRUPT_DB );\n      pCur->aOverflow[iIdx] = nextPage;\n\n      if( offset>=ovflSize ){\n        /* The only reason to read this page is to obtain the page\n        ** number for the next page in the overflow chain. The page\n        ** data is not required. So first try to lookup the overflow\n        ** page-list cache, if any, then fall back to the getOverflowPage()\n        ** function.\n        */\n        assert( pCur->curFlags & BTCF_ValidOvfl );\n        assert( pCur->pBtree->db==pBt->db );\n        if( pCur->aOverflow[iIdx+1] ){\n          nextPage = pCur->aOverflow[iIdx+1];\n        }else{\n          rc = getOverflowPage(pBt, nextPage, 0, &nextPage);\n        }\n        offset -= ovflSize;\n      }else{\n        /* Need to read this page properly. It contains some of the\n        ** range of data that is being read (eOp==0) or written (eOp!=0).\n        */\n        int a = amt;\n        if( a + offset > ovflSize ){\n          a = ovflSize - offset;\n        }\n\n#ifdef SQLITE_DIRECT_OVERFLOW_READ\n        /* If all the following are true:\n        **\n        **   1) this is a read operation, and\n        **   2) data is required from the start of this overflow page, and\n        **   3) there are no dirty pages in the page-cache\n        **   4) the database is file-backed, and\n        **   5) the page is not in the WAL file\n        **   6) at least 4 bytes have already been read into the output buffer\n        **\n        ** then data can be read directly from the database file into the\n        ** output buffer, bypassing the page-cache altogether. This speeds\n        ** up loading large records that span many overflow pages.\n        */\n        if( eOp==0                                             /* (1) */\n         && offset==0                                          /* (2) */\n         && sqlite3PagerDirectReadOk(pBt->pPager, nextPage)    /* (3,4,5) */\n         && &pBuf[-4]>=pBufStart                               /* (6) */\n        ){\n          sqlite3_file *fd = sqlite3PagerFile(pBt->pPager);\n          u8 aSave[4];\n          u8 *aWrite = &pBuf[-4];\n          assert( aWrite>=pBufStart );                         /* due to (6) */\n          memcpy(aSave, aWrite, 4);\n          rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));\n          nextPage = get4byte(aWrite);\n          memcpy(aWrite, aSave, 4);\n        }else\n#endif\n\n        {\n          DbPage *pDbPage;\n          rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,\n              (eOp==0 ? PAGER_GET_READONLY : 0)\n          );\n          if( rc==SQLITE_OK ){\n            aPayload = sqlite3PagerGetData(pDbPage);\n            nextPage = get4byte(aPayload);\n            rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);\n            sqlite3PagerUnref(pDbPage);\n            offset = 0;\n          }\n        }\n        amt -= a;\n        if( amt==0 ) return rc;\n        pBuf += a;\n      }\n      if( rc ) break;\n      iIdx++;\n    }\n  }\n\n  if( rc==SQLITE_OK && amt>0 ){\n    /* Overflow chain ends prematurely */\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  return rc;\n}\n\n/*\n** Read part of the payload for the row at which that cursor pCur is currently\n** pointing.  \"amt\" bytes will be transferred into pBuf[].  The transfer\n** begins at \"offset\".\n**\n** pCur can be pointing to either a table or an index b-tree.\n** If pointing to a table btree, then the content section is read.  If\n** pCur is pointing to an index b-tree then the key section is read.\n**\n** For sqlite3BtreePayload(), the caller must ensure that pCur is pointing\n** to a valid row in the table.  For sqlite3BtreePayloadChecked(), the\n** cursor might be invalid or might need to be restored before being read.\n**\n** Return SQLITE_OK on success or an error code if anything goes\n** wrong.  An error is returned if \"offset+amt\" is larger than\n** the available payload.\n*/\nSQLITE_PRIVATE int sqlite3BtreePayload(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){\n  assert( cursorHoldsMutex(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->iPage>=0 && pCur->pPage );\n  return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);\n}\n\n/*\n** This variant of sqlite3BtreePayload() works even if the cursor has not\n** in the CURSOR_VALID state.  It is only used by the sqlite3_blob_read()\n** interface.\n*/\n#ifndef SQLITE_OMIT_INCRBLOB\nstatic SQLITE_NOINLINE int accessPayloadChecked(\n  BtCursor *pCur,\n  u32 offset,\n  u32 amt,\n  void *pBuf\n){\n  int rc;\n  if ( pCur->eState==CURSOR_INVALID ){\n    return SQLITE_ABORT;\n  }\n  assert( cursorOwnsBtShared(pCur) );\n  rc = btreeRestoreCursorPosition(pCur);\n  return rc ? rc : accessPayload(pCur, offset, amt, pBuf, 0);\n}\nSQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){\n  if( pCur->eState==CURSOR_VALID ){\n    assert( cursorOwnsBtShared(pCur) );\n    return accessPayload(pCur, offset, amt, pBuf, 0);\n  }else{\n    return accessPayloadChecked(pCur, offset, amt, pBuf);\n  }\n}\n#endif /* SQLITE_OMIT_INCRBLOB */\n\n/*\n** Return a pointer to payload information from the entry that the\n** pCur cursor is pointing to.  The pointer is to the beginning of\n** the key if index btrees (pPage->intKey==0) and is the data for\n** table btrees (pPage->intKey==1). The number of bytes of available\n** key/data is written into *pAmt.  If *pAmt==0, then the value\n** returned will not be a valid pointer.\n**\n** This routine is an optimization.  It is common for the entire key\n** and data to fit on the local page and for there to be no overflow\n** pages.  When that is so, this routine can be used to access the\n** key and data without making a copy.  If the key and/or data spills\n** onto overflow pages, then accessPayload() must be used to reassemble\n** the key/data and copy it into a preallocated buffer.\n**\n** The pointer returned by this routine looks directly into the cached\n** page of the database.  The data might change or move the next time\n** any btree routine is called.\n*/\nstatic const void *fetchPayload(\n  BtCursor *pCur,      /* Cursor pointing to entry to read from */\n  u32 *pAmt            /* Write the number of available bytes here */\n){\n  int amt;\n  assert( pCur!=0 && pCur->iPage>=0 && pCur->pPage);\n  assert( pCur->eState==CURSOR_VALID );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );\n  assert( pCur->info.nSize>0 );\n  assert( pCur->info.pPayload>pCur->pPage->aData || CORRUPT_DB );\n  assert( pCur->info.pPayload<pCur->pPage->aDataEnd ||CORRUPT_DB);\n  amt = pCur->info.nLocal;\n  if( amt>(int)(pCur->pPage->aDataEnd - pCur->info.pPayload) ){\n    /* There is too little space on the page for the expected amount\n    ** of local content. Database must be corrupt. */\n    assert( CORRUPT_DB );\n    amt = MAX(0, (int)(pCur->pPage->aDataEnd - pCur->info.pPayload));\n  }\n  *pAmt = (u32)amt;\n  return (void*)pCur->info.pPayload;\n}\n\n\n/*\n** For the entry that cursor pCur is point to, return as\n** many bytes of the key or data as are available on the local\n** b-tree page.  Write the number of available bytes into *pAmt.\n**\n** The pointer returned is ephemeral.  The key/data may move\n** or be destroyed on the next call to any Btree routine,\n** including calls from other threads against the same cache.\n** Hence, a mutex on the BtShared should be held prior to calling\n** this routine.\n**\n** These routines is used to get quick access to key and data\n** in the common case where no overflow pages are used.\n*/\nSQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){\n  return fetchPayload(pCur, pAmt);\n}\n\n\n/*\n** Move the cursor down to a new child page.  The newPgno argument is the\n** page number of the child page to move to.\n**\n** This function returns SQLITE_CORRUPT if the page-header flags field of\n** the new child page does not match the flags field of the parent (i.e.\n** if an intkey page appears to be the parent of a non-intkey page, or\n** vice-versa).\n*/\nstatic int moveToChild(BtCursor *pCur, u32 newPgno){\n  int rc;\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );\n  assert( pCur->iPage>=0 );\n  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  pCur->info.nSize = 0;\n  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n  pCur->aiIdx[pCur->iPage] = pCur->ix;\n  pCur->apPage[pCur->iPage] = pCur->pPage;\n  pCur->ix = 0;\n  pCur->iPage++;\n  rc = getAndInitPage(pCur->pBt, newPgno, &pCur->pPage, pCur->curPagerFlags);\n  assert( pCur->pPage!=0 || rc!=SQLITE_OK );\n  if( rc==SQLITE_OK\n   && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey)\n  ){\n    releasePage(pCur->pPage);\n    rc = SQLITE_CORRUPT_PGNO(newPgno);\n  }\n  if( rc ){\n    pCur->pPage = pCur->apPage[--pCur->iPage];\n  }\n  return rc;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Page pParent is an internal (non-leaf) tree page. This function\n** asserts that page number iChild is the left-child if the iIdx'th\n** cell in page pParent. Or, if iIdx is equal to the total number of\n** cells in pParent, that page number iChild is the right-child of\n** the page.\n*/\nstatic void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){\n  if( CORRUPT_DB ) return;  /* The conditions tested below might not be true\n                            ** in a corrupt database */\n  assert( iIdx<=pParent->nCell );\n  if( iIdx==pParent->nCell ){\n    assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );\n  }else{\n    assert( get4byte(findCell(pParent, iIdx))==iChild );\n  }\n}\n#else\n#  define assertParentIndex(x,y,z)\n#endif\n\n/*\n** Move the cursor up to the parent page.\n**\n** pCur->idx is set to the cell index that contains the pointer\n** to the page we are coming from.  If we are coming from the\n** right-most child page then pCur->idx is set to one more than\n** the largest cell index.\n*/\nstatic void moveToParent(BtCursor *pCur){\n  MemPage *pLeaf;\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->iPage>0 );\n  assert( pCur->pPage );\n  assertParentIndex(\n    pCur->apPage[pCur->iPage-1],\n    pCur->aiIdx[pCur->iPage-1],\n    pCur->pPage->pgno\n  );\n  testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );\n  pCur->info.nSize = 0;\n  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n  pCur->ix = pCur->aiIdx[pCur->iPage-1];\n  pLeaf = pCur->pPage;\n  pCur->pPage = pCur->apPage[--pCur->iPage];\n  releasePageNotNull(pLeaf);\n}\n\n/*\n** Move the cursor to point to the root page of its b-tree structure.\n**\n** If the table has a virtual root page, then the cursor is moved to point\n** to the virtual root page instead of the actual root page. A table has a\n** virtual root page when the actual root page contains no cells and a\n** single child page. This can only happen with the table rooted at page 1.\n**\n** If the b-tree structure is empty, the cursor state is set to\n** CURSOR_INVALID and this routine returns SQLITE_EMPTY. Otherwise,\n** the cursor is set to point to the first cell located on the root\n** (or virtual root) page and the cursor state is set to CURSOR_VALID.\n**\n** If this function returns successfully, it may be assumed that the\n** page-header flags indicate that the [virtual] root-page is the expected\n** kind of b-tree page (i.e. if when opening the cursor the caller did not\n** specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,\n** indicating a table b-tree, or if the caller did specify a KeyInfo\n** structure the flags byte is set to 0x02 or 0x0A, indicating an index\n** b-tree).\n*/\nstatic int moveToRoot(BtCursor *pCur){\n  MemPage *pRoot;\n  int rc = SQLITE_OK;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( CURSOR_INVALID < CURSOR_REQUIRESEEK );\n  assert( CURSOR_VALID   < CURSOR_REQUIRESEEK );\n  assert( CURSOR_FAULT   > CURSOR_REQUIRESEEK );\n  assert( pCur->eState < CURSOR_REQUIRESEEK || pCur->iPage<0 );\n  assert( pCur->pgnoRoot>0 || pCur->iPage<0 );\n\n  if( pCur->iPage>=0 ){\n    if( pCur->iPage ){\n      releasePageNotNull(pCur->pPage);\n      while( --pCur->iPage ){\n        releasePageNotNull(pCur->apPage[pCur->iPage]);\n      }\n      pRoot = pCur->pPage = pCur->apPage[0];\n      goto skip_init;\n    }\n  }else if( pCur->pgnoRoot==0 ){\n    pCur->eState = CURSOR_INVALID;\n    return SQLITE_EMPTY;\n  }else{\n    assert( pCur->iPage==(-1) );\n    if( pCur->eState>=CURSOR_REQUIRESEEK ){\n      if( pCur->eState==CURSOR_FAULT ){\n        assert( pCur->skipNext!=SQLITE_OK );\n        return pCur->skipNext;\n      }\n      sqlite3BtreeClearCursor(pCur);\n    }\n    rc = getAndInitPage(pCur->pBt, pCur->pgnoRoot, &pCur->pPage,\n                        pCur->curPagerFlags);\n    if( rc!=SQLITE_OK ){\n      pCur->eState = CURSOR_INVALID;\n      return rc;\n    }\n    pCur->iPage = 0;\n    pCur->curIntKey = pCur->pPage->intKey;\n  }\n  pRoot = pCur->pPage;\n  assert( pRoot->pgno==pCur->pgnoRoot || CORRUPT_DB );\n\n  /* If pCur->pKeyInfo is not NULL, then the caller that opened this cursor\n  ** expected to open it on an index b-tree. Otherwise, if pKeyInfo is\n  ** NULL, the caller expects a table b-tree. If this is not the case,\n  ** return an SQLITE_CORRUPT error.\n  **\n  ** Earlier versions of SQLite assumed that this test could not fail\n  ** if the root page was already loaded when this function was called (i.e.\n  ** if pCur->iPage>=0). But this is not so if the database is corrupted\n  ** in such a way that page pRoot is linked into a second b-tree table\n  ** (or the freelist).  */\n  assert( pRoot->intKey==1 || pRoot->intKey==0 );\n  if( pRoot->isInit==0 || (pCur->pKeyInfo==0)!=pRoot->intKey ){\n    return SQLITE_CORRUPT_PAGE(pCur->pPage);\n  }\n\nskip_init:\n  pCur->ix = 0;\n  pCur->info.nSize = 0;\n  pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidNKey|BTCF_ValidOvfl);\n\n  if( pRoot->nCell>0 ){\n    pCur->eState = CURSOR_VALID;\n  }else if( !pRoot->leaf ){\n    Pgno subpage;\n    if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;\n    subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);\n    pCur->eState = CURSOR_VALID;\n    rc = moveToChild(pCur, subpage);\n  }else{\n    pCur->eState = CURSOR_INVALID;\n    rc = SQLITE_EMPTY;\n  }\n  return rc;\n}\n\n/*\n** Move the cursor down to the left-most leaf entry beneath the\n** entry to which it is currently pointing.\n**\n** The left-most leaf is the one with the smallest key - the first\n** in ascending order.\n*/\nstatic int moveToLeftmost(BtCursor *pCur){\n  Pgno pgno;\n  int rc = SQLITE_OK;\n  MemPage *pPage;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  while( rc==SQLITE_OK && !(pPage = pCur->pPage)->leaf ){\n    assert( pCur->ix<pPage->nCell );\n    pgno = get4byte(findCell(pPage, pCur->ix));\n    rc = moveToChild(pCur, pgno);\n  }\n  return rc;\n}\n\n/*\n** Move the cursor down to the right-most leaf entry beneath the\n** page to which it is currently pointing.  Notice the difference\n** between moveToLeftmost() and moveToRightmost().  moveToLeftmost()\n** finds the left-most entry beneath the *entry* whereas moveToRightmost()\n** finds the right-most entry beneath the *page*.\n**\n** The right-most entry is the one with the largest key - the last\n** key in ascending order.\n*/\nstatic int moveToRightmost(BtCursor *pCur){\n  Pgno pgno;\n  int rc = SQLITE_OK;\n  MemPage *pPage = 0;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pCur->eState==CURSOR_VALID );\n  while( !(pPage = pCur->pPage)->leaf ){\n    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);\n    pCur->ix = pPage->nCell;\n    rc = moveToChild(pCur, pgno);\n    if( rc ) return rc;\n  }\n  pCur->ix = pPage->nCell-1;\n  assert( pCur->info.nSize==0 );\n  assert( (pCur->curFlags & BTCF_ValidNKey)==0 );\n  return SQLITE_OK;\n}\n\n/* Move the cursor to the first entry in the table.  Return SQLITE_OK\n** on success.  Set *pRes to 0 if the cursor actually points to something\n** or set *pRes to 1 if the table is empty.\n*/\nSQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){\n  int rc;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n  rc = moveToRoot(pCur);\n  if( rc==SQLITE_OK ){\n    assert( pCur->pPage->nCell>0 );\n    *pRes = 0;\n    rc = moveToLeftmost(pCur);\n  }else if( rc==SQLITE_EMPTY ){\n    assert( pCur->pgnoRoot==0 || (pCur->pPage!=0 && pCur->pPage->nCell==0) );\n    *pRes = 1;\n    rc = SQLITE_OK;\n  }\n  return rc;\n}\n\n/* Set *pRes to 1 (true) if the BTree pointed to by cursor pCur contains zero\n** rows of content.  Set *pRes to 0 (false) if the table contains content.\n** Return SQLITE_OK on success or some error code (ex: SQLITE_NOMEM) if\n** something goes wrong.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIsEmpty(BtCursor *pCur, int *pRes){\n  int rc;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n  if( pCur->eState==CURSOR_VALID ){\n    *pRes = 0;\n    return SQLITE_OK;\n  }\n  rc = moveToRoot(pCur);\n  if( rc==SQLITE_EMPTY ){\n    *pRes = 1;\n    rc = SQLITE_OK;\n  }else{\n    *pRes = 0;\n  }\n  return rc;\n}\n\n#ifdef SQLITE_DEBUG\n/* The cursors is CURSOR_VALID and has BTCF_AtLast set.  Verify that\n** this flags are true for a consistent database.\n**\n** This routine is is called from within assert() statements only.\n** It is an internal verification routine and does not appear in production\n** builds.\n*/\nstatic int cursorIsAtLastEntry(BtCursor *pCur){\n  int ii;\n  for(ii=0; ii<pCur->iPage; ii++){\n    if( pCur->aiIdx[ii]!=pCur->apPage[ii]->nCell ) return 0;\n  }\n  return pCur->ix==pCur->pPage->nCell-1 && pCur->pPage->leaf!=0;\n}\n#endif\n\n/* Move the cursor to the last entry in the table.  Return SQLITE_OK\n** on success.  Set *pRes to 0 if the cursor actually points to something\n** or set *pRes to 1 if the table is empty.\n*/\nstatic SQLITE_NOINLINE int btreeLast(BtCursor *pCur, int *pRes){\n  int rc = moveToRoot(pCur);\n  if( rc==SQLITE_OK ){\n    assert( pCur->eState==CURSOR_VALID );\n    *pRes = 0;\n    rc = moveToRightmost(pCur);\n    if( rc==SQLITE_OK ){\n      pCur->curFlags |= BTCF_AtLast;\n    }else{\n      pCur->curFlags &= ~BTCF_AtLast;\n    }\n  }else if( rc==SQLITE_EMPTY ){\n    assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );\n    *pRes = 1;\n    rc = SQLITE_OK;\n  }\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n\n  /* If the cursor already points to the last entry, this is a no-op. */\n  if( CURSOR_VALID==pCur->eState && (pCur->curFlags & BTCF_AtLast)!=0 ){\n    assert( cursorIsAtLastEntry(pCur) || CORRUPT_DB );\n    *pRes = 0;\n    return SQLITE_OK;\n  }\n  return btreeLast(pCur, pRes);\n}\n\n/* Move the cursor so that it points to an entry in a table (a.k.a INTKEY)\n** table near the key intKey.   Return a success code.\n**\n** If an exact match is not found, then the cursor is always\n** left pointing at a leaf page which would hold the entry if it\n** were present.  The cursor might point to an entry that comes\n** before or after the key.\n**\n** An integer is written into *pRes which is the result of\n** comparing the key with the entry to which the cursor is\n** pointing.  The meaning of the integer written into\n** *pRes is as follows:\n**\n**     *pRes<0      The cursor is left pointing at an entry that\n**                  is smaller than intKey or if the table is empty\n**                  and the cursor is therefore left point to nothing.\n**\n**     *pRes==0     The cursor is left pointing at an entry that\n**                  exactly matches intKey.\n**\n**     *pRes>0      The cursor is left pointing at an entry that\n**                  is larger than intKey.\n*/\nSQLITE_PRIVATE int sqlite3BtreeTableMoveto(\n  BtCursor *pCur,          /* The cursor to be moved */\n  i64 intKey,              /* The table key */\n  int biasRight,           /* If true, bias the search to the high end */\n  int *pRes                /* Write search results here */\n){\n  int rc;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n  assert( pRes );\n  assert( pCur->pKeyInfo==0 );\n  assert( pCur->eState!=CURSOR_VALID || pCur->curIntKey!=0 );\n\n  /* If the cursor is already positioned at the point we are trying\n  ** to move to, then just return without doing any work */\n  if( pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0 ){\n    if( pCur->info.nKey==intKey ){\n      *pRes = 0;\n      return SQLITE_OK;\n    }\n    if( pCur->info.nKey<intKey ){\n      if( (pCur->curFlags & BTCF_AtLast)!=0 ){\n        assert( cursorIsAtLastEntry(pCur) || CORRUPT_DB );\n        *pRes = -1;\n        return SQLITE_OK;\n      }\n      /* If the requested key is one more than the previous key, then\n      ** try to get there using sqlite3BtreeNext() rather than a full\n      ** binary search.  This is an optimization only.  The correct answer\n      ** is still obtained without this case, only a little more slowly. */\n      if( pCur->info.nKey+1==intKey ){\n        *pRes = 0;\n        rc = sqlite3BtreeNext(pCur, 0);\n        if( rc==SQLITE_OK ){\n          getCellInfo(pCur);\n          if( pCur->info.nKey==intKey ){\n            return SQLITE_OK;\n          }\n        }else if( rc!=SQLITE_DONE ){\n          return rc;\n        }\n      }\n    }\n  }\n\n#ifdef SQLITE_DEBUG\n  pCur->pBtree->nSeek++;   /* Performance measurement during testing */\n#endif\n\n  rc = moveToRoot(pCur);\n  if( rc ){\n    if( rc==SQLITE_EMPTY ){\n      assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );\n      *pRes = -1;\n      return SQLITE_OK;\n    }\n    return rc;\n  }\n  assert( pCur->pPage );\n  assert( pCur->pPage->isInit );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->pPage->nCell > 0 );\n  assert( pCur->iPage==0 || pCur->apPage[0]->intKey==pCur->curIntKey );\n  assert( pCur->curIntKey );\n\n  for(;;){\n    int lwr, upr, idx, c;\n    Pgno chldPg;\n    MemPage *pPage = pCur->pPage;\n    u8 *pCell;                          /* Pointer to current cell in pPage */\n\n    /* pPage->nCell must be greater than zero. If this is the root-page\n    ** the cursor would have been INVALID above and this for(;;) loop\n    ** not run. If this is not the root-page, then the moveToChild() routine\n    ** would have already detected db corruption. Similarly, pPage must\n    ** be the right kind (index or table) of b-tree page. Otherwise\n    ** a moveToChild() or moveToRoot() call would have detected corruption.  */\n    assert( pPage->nCell>0 );\n    assert( pPage->intKey );\n    lwr = 0;\n    upr = pPage->nCell-1;\n    assert( biasRight==0 || biasRight==1 );\n    idx = upr>>(1-biasRight); /* idx = biasRight ? upr : (lwr+upr)/2; */\n    for(;;){\n      i64 nCellKey;\n      pCell = findCellPastPtr(pPage, idx);\n      if( pPage->intKeyLeaf ){\n        while( 0x80 <= *(pCell++) ){\n          if( pCell>=pPage->aDataEnd ){\n            return SQLITE_CORRUPT_PAGE(pPage);\n          }\n        }\n      }\n      getVarint(pCell, (u64*)&nCellKey);\n      if( nCellKey<intKey ){\n        lwr = idx+1;\n        if( lwr>upr ){ c = -1; break; }\n      }else if( nCellKey>intKey ){\n        upr = idx-1;\n        if( lwr>upr ){ c = +1; break; }\n      }else{\n        assert( nCellKey==intKey );\n        pCur->ix = (u16)idx;\n        if( !pPage->leaf ){\n          lwr = idx;\n          goto moveto_table_next_layer;\n        }else{\n          pCur->curFlags |= BTCF_ValidNKey;\n          pCur->info.nKey = nCellKey;\n          pCur->info.nSize = 0;\n          *pRes = 0;\n          return SQLITE_OK;\n        }\n      }\n      assert( lwr+upr>=0 );\n      idx = (lwr+upr)>>1;  /* idx = (lwr+upr)/2; */\n    }\n    assert( lwr==upr+1 || !pPage->leaf );\n    assert( pPage->isInit );\n    if( pPage->leaf ){\n      assert( pCur->ix<pCur->pPage->nCell );\n      pCur->ix = (u16)idx;\n      *pRes = c;\n      rc = SQLITE_OK;\n      goto moveto_table_finish;\n    }\nmoveto_table_next_layer:\n    if( lwr>=pPage->nCell ){\n      chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);\n    }else{\n      chldPg = get4byte(findCell(pPage, lwr));\n    }\n    pCur->ix = (u16)lwr;\n    rc = moveToChild(pCur, chldPg);\n    if( rc ) break;\n  }\nmoveto_table_finish:\n  pCur->info.nSize = 0;\n  assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );\n  return rc;\n}\n\n/*\n** Compare the \"idx\"-th cell on the page pPage against the key\n** pointing to by pIdxKey using xRecordCompare.  Return negative or\n** zero if the cell is less than or equal pIdxKey.  Return positive\n** if unknown.\n**\n**    Return value negative:     Cell at pCur[idx] less than pIdxKey\n**\n**    Return value is zero:      Cell at pCur[idx] equals pIdxKey\n**\n**    Return value positive:     Nothing is known about the relationship\n**                               of the cell at pCur[idx] and pIdxKey.\n**\n** This routine is part of an optimization.  It is always safe to return\n** a positive value as that will cause the optimization to be skipped.\n*/\nstatic int indexCellCompare(\n  MemPage *pPage,\n  int idx,\n  UnpackedRecord *pIdxKey,\n  RecordCompare xRecordCompare\n){\n  int c;\n  int nCell;  /* Size of the pCell cell in bytes */\n  u8 *pCell = findCellPastPtr(pPage, idx);\n\n  nCell = pCell[0];\n  if( nCell<=pPage->max1bytePayload ){\n    /* This branch runs if the record-size field of the cell is a\n    ** single byte varint and the record fits entirely on the main\n    ** b-tree page.  */\n    testcase( pCell+nCell+1==pPage->aDataEnd );\n    c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);\n  }else if( !(pCell[1] & 0x80)\n    && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal\n  ){\n    /* The record-size field is a 2 byte varint and the record\n    ** fits entirely on the main b-tree page.  */\n    testcase( pCell+nCell+2==pPage->aDataEnd );\n    c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);\n  }else{\n    /* If the record extends into overflow pages, do not attempt\n    ** the optimization. */\n    c = 99;\n  }\n  return c;\n}\n\n/*\n** Return true (non-zero) if pCur is current pointing to the last\n** page of a table.\n*/\nstatic int cursorOnLastPage(BtCursor *pCur){\n  int i;\n  assert( pCur->eState==CURSOR_VALID );\n  for(i=0; i<pCur->iPage; i++){\n    MemPage *pPage = pCur->apPage[i];\n    if( pCur->aiIdx[i]<pPage->nCell ) return 0;\n  }\n  return 1;\n}\n\n/* Move the cursor so that it points to an entry in an index table\n** near the key pIdxKey.   Return a success code.\n**\n** If an exact match is not found, then the cursor is always\n** left pointing at a leaf page which would hold the entry if it\n** were present.  The cursor might point to an entry that comes\n** before or after the key.\n**\n** An integer is written into *pRes which is the result of\n** comparing the key with the entry to which the cursor is\n** pointing.  The meaning of the integer written into\n** *pRes is as follows:\n**\n**     *pRes<0      The cursor is left pointing at an entry that\n**                  is smaller than pIdxKey or if the table is empty\n**                  and the cursor is therefore left point to nothing.\n**\n**     *pRes==0     The cursor is left pointing at an entry that\n**                  exactly matches pIdxKey.\n**\n**     *pRes>0      The cursor is left pointing at an entry that\n**                  is larger than pIdxKey.\n**\n** The pIdxKey->eqSeen field is set to 1 if there\n** exists an entry in the table that exactly matches pIdxKey.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIndexMoveto(\n  BtCursor *pCur,          /* The cursor to be moved */\n  UnpackedRecord *pIdxKey, /* Unpacked index key */\n  int *pRes                /* Write search results here */\n){\n  int rc;\n  RecordCompare xRecordCompare;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n  assert( pRes );\n  assert( pCur->pKeyInfo!=0 );\n\n#ifdef SQLITE_DEBUG\n  pCur->pBtree->nSeek++;   /* Performance measurement during testing */\n#endif\n\n  xRecordCompare = sqlite3VdbeFindCompare(pIdxKey);\n  pIdxKey->errCode = 0;\n  assert( pIdxKey->default_rc==1\n       || pIdxKey->default_rc==0\n       || pIdxKey->default_rc==-1\n  );\n\n\n  /* Check to see if we can skip a lot of work.  Two cases:\n  **\n  **    (1) If the cursor is already pointing to the very last cell\n  **        in the table and the pIdxKey search key is greater than or\n  **        equal to that last cell, then no movement is required.\n  **\n  **    (2) If the cursor is on the last page of the table and the first\n  **        cell on that last page is less than or equal to the pIdxKey\n  **        search key, then we can start the search on the current page\n  **        without needing to go back to root.\n  */\n  if( pCur->eState==CURSOR_VALID\n   && pCur->pPage->leaf\n   && cursorOnLastPage(pCur)\n  ){\n    int c;\n    if( pCur->ix==pCur->pPage->nCell-1\n     && (c = indexCellCompare(pCur->pPage,pCur->ix,pIdxKey,xRecordCompare))<=0\n     && pIdxKey->errCode==SQLITE_OK\n    ){\n      *pRes = c;\n      return SQLITE_OK;  /* Cursor already pointing at the correct spot */\n    }\n    if( pCur->iPage>0\n     && indexCellCompare(pCur->pPage, 0, pIdxKey, xRecordCompare)<=0\n     && pIdxKey->errCode==SQLITE_OK\n    ){\n      pCur->curFlags &= ~(BTCF_ValidOvfl|BTCF_AtLast);\n      if( !pCur->pPage->isInit ){\n        return SQLITE_CORRUPT_BKPT;\n      }\n      goto bypass_moveto_root;  /* Start search on the current page */\n    }\n    pIdxKey->errCode = SQLITE_OK;\n  }\n\n  rc = moveToRoot(pCur);\n  if( rc ){\n    if( rc==SQLITE_EMPTY ){\n      assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );\n      *pRes = -1;\n      return SQLITE_OK;\n    }\n    return rc;\n  }\n\nbypass_moveto_root:\n  assert( pCur->pPage );\n  assert( pCur->pPage->isInit );\n  assert( pCur->eState==CURSOR_VALID );\n  assert( pCur->pPage->nCell > 0 );\n  assert( pCur->curIntKey==0 );\n  assert( pIdxKey!=0 );\n  for(;;){\n    int lwr, upr, idx, c;\n    Pgno chldPg;\n    MemPage *pPage = pCur->pPage;\n    u8 *pCell;                          /* Pointer to current cell in pPage */\n\n    /* pPage->nCell must be greater than zero. If this is the root-page\n    ** the cursor would have been INVALID above and this for(;;) loop\n    ** not run. If this is not the root-page, then the moveToChild() routine\n    ** would have already detected db corruption. Similarly, pPage must\n    ** be the right kind (index or table) of b-tree page. Otherwise\n    ** a moveToChild() or moveToRoot() call would have detected corruption.  */\n    assert( pPage->nCell>0 );\n    assert( pPage->intKey==0 );\n    lwr = 0;\n    upr = pPage->nCell-1;\n    idx = upr>>1; /* idx = (lwr+upr)/2; */\n    for(;;){\n      int nCell;  /* Size of the pCell cell in bytes */\n      pCell = findCellPastPtr(pPage, idx);\n\n      /* The maximum supported page-size is 65536 bytes. This means that\n      ** the maximum number of record bytes stored on an index B-Tree\n      ** page is less than 16384 bytes and may be stored as a 2-byte\n      ** varint. This information is used to attempt to avoid parsing\n      ** the entire cell by checking for the cases where the record is\n      ** stored entirely within the b-tree page by inspecting the first\n      ** 2 bytes of the cell.\n      */\n      nCell = pCell[0];\n      if( nCell<=pPage->max1bytePayload ){\n        /* This branch runs if the record-size field of the cell is a\n        ** single byte varint and the record fits entirely on the main\n        ** b-tree page.  */\n        testcase( pCell+nCell+1==pPage->aDataEnd );\n        c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);\n      }else if( !(pCell[1] & 0x80)\n        && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal\n      ){\n        /* The record-size field is a 2 byte varint and the record\n        ** fits entirely on the main b-tree page.  */\n        testcase( pCell+nCell+2==pPage->aDataEnd );\n        c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);\n      }else{\n        /* The record flows over onto one or more overflow pages. In\n        ** this case the whole cell needs to be parsed, a buffer allocated\n        ** and accessPayload() used to retrieve the record into the\n        ** buffer before VdbeRecordCompare() can be called.\n        **\n        ** If the record is corrupt, the xRecordCompare routine may read\n        ** up to two varints past the end of the buffer. An extra 18\n        ** bytes of padding is allocated at the end of the buffer in\n        ** case this happens.  */\n        void *pCellKey;\n        u8 * const pCellBody = pCell - pPage->childPtrSize;\n        const int nOverrun = 18;  /* Size of the overrun padding */\n        pPage->xParseCell(pPage, pCellBody, &pCur->info);\n        nCell = (int)pCur->info.nKey;\n        testcase( nCell<0 );   /* True if key size is 2^32 or more */\n        testcase( nCell==0 );  /* Invalid key size:  0x80 0x80 0x00 */\n        testcase( nCell==1 );  /* Invalid key size:  0x80 0x80 0x01 */\n        testcase( nCell==2 );  /* Minimum legal index key size */\n        if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){\n          rc = SQLITE_CORRUPT_PAGE(pPage);\n          goto moveto_index_finish;\n        }\n        pCellKey = sqlite3Malloc( (u64)nCell+(u64)nOverrun );\n        if( pCellKey==0 ){\n          rc = SQLITE_NOMEM_BKPT;\n          goto moveto_index_finish;\n        }\n        pCur->ix = (u16)idx;\n        rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);\n        memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */\n        pCur->curFlags &= ~BTCF_ValidOvfl;\n        if( rc ){\n          sqlite3_free(pCellKey);\n          goto moveto_index_finish;\n        }\n        c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);\n        sqlite3_free(pCellKey);\n      }\n      assert(\n          (pIdxKey->errCode!=SQLITE_CORRUPT || c==0)\n       && (pIdxKey->errCode!=SQLITE_NOMEM || pCur->pBtree->db->mallocFailed)\n      );\n      if( c<0 ){\n        lwr = idx+1;\n      }else if( c>0 ){\n        upr = idx-1;\n      }else{\n        assert( c==0 );\n        *pRes = 0;\n        rc = SQLITE_OK;\n        pCur->ix = (u16)idx;\n        if( pIdxKey->errCode ) rc = SQLITE_CORRUPT_BKPT;\n        goto moveto_index_finish;\n      }\n      if( lwr>upr ) break;\n      assert( lwr+upr>=0 );\n      idx = (lwr+upr)>>1;  /* idx = (lwr+upr)/2 */\n    }\n    assert( lwr==upr+1 || (pPage->intKey && !pPage->leaf) );\n    assert( pPage->isInit );\n    if( pPage->leaf ){\n      assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );\n      pCur->ix = (u16)idx;\n      *pRes = c;\n      rc = SQLITE_OK;\n      goto moveto_index_finish;\n    }\n    if( lwr>=pPage->nCell ){\n      chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);\n    }else{\n      chldPg = get4byte(findCell(pPage, lwr));\n    }\n\n    /* This block is similar to an in-lined version of:\n    **\n    **    pCur->ix = (u16)lwr;\n    **    rc = moveToChild(pCur, chldPg);\n    **    if( rc ) break;\n    */\n    pCur->info.nSize = 0;\n    pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n    if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){\n      return SQLITE_CORRUPT_BKPT;\n    }\n    pCur->aiIdx[pCur->iPage] = (u16)lwr;\n    pCur->apPage[pCur->iPage] = pCur->pPage;\n    pCur->ix = 0;\n    pCur->iPage++;\n    rc = getAndInitPage(pCur->pBt, chldPg, &pCur->pPage, pCur->curPagerFlags);\n    if( rc==SQLITE_OK\n     && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey)\n    ){\n      releasePage(pCur->pPage);\n      rc = SQLITE_CORRUPT_PGNO(chldPg);\n    }\n    if( rc ){\n      pCur->pPage = pCur->apPage[--pCur->iPage];\n      break;\n    }\n    /*\n    ***** End of in-lined moveToChild() call */\n }\nmoveto_index_finish:\n  pCur->info.nSize = 0;\n  assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );\n  return rc;\n}\n\n\n/*\n** Return TRUE if the cursor is not pointing at an entry of the table.\n**\n** TRUE will be returned after a call to sqlite3BtreeNext() moves\n** past the last entry in the table or sqlite3BtreePrev() moves past\n** the first entry.  TRUE is also returned if the table is empty.\n*/\nSQLITE_PRIVATE int sqlite3BtreeEof(BtCursor *pCur){\n  /* TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries\n  ** have been deleted? This API will need to change to return an error code\n  ** as well as the boolean result value.\n  */\n  return (CURSOR_VALID!=pCur->eState);\n}\n\n/*\n** Return an estimate for the number of rows in the table that pCur is\n** pointing to.  Return a negative number if no estimate is currently\n** available.\n*/\nSQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor *pCur){\n  i64 n;\n  u8 i;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );\n\n  /* Currently this interface is only called by the OP_IfSizeBetween\n  ** opcode and the OP_Count opcode with P3=1.  In either case,\n  ** the cursor will always be valid unless the btree is empty. */\n  if( pCur->eState!=CURSOR_VALID ) return 0;\n  if( NEVER(pCur->pPage->leaf==0) ) return -1;\n\n  n = pCur->pPage->nCell;\n  for(i=0; i<pCur->iPage; i++){\n    n *= pCur->apPage[i]->nCell+1;\n  }\n  return n;\n}\n\n/*\n** Advance the cursor to the next entry in the database.\n** Return value:\n**\n**    SQLITE_OK        success\n**    SQLITE_DONE      cursor is already pointing at the last element\n**    otherwise        some kind of error occurred\n**\n** The main entry point is sqlite3BtreeNext().  That routine is optimized\n** for the common case of merely incrementing the cell counter BtCursor.aiIdx\n** to the next cell on the current page.  The (slower) btreeNext() helper\n** routine is called when it is necessary to move to a different page or\n** to restore the cursor.\n**\n** If bit 0x01 of the F argument in sqlite3BtreeNext(C,F) is 1, then the\n** cursor corresponds to an SQL index and this routine could have been\n** skipped if the SQL index had been a unique index.  The F argument\n** is a hint to the implement.  SQLite btree implementation does not use\n** this hint, but COMDB2 does.\n*/\nstatic SQLITE_NOINLINE int btreeNext(BtCursor *pCur){\n  int rc;\n  int idx;\n  MemPage *pPage;\n\n  assert( cursorOwnsBtShared(pCur) );\n  if( pCur->eState!=CURSOR_VALID ){\n    assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );\n    rc = restoreCursorPosition(pCur);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    if( CURSOR_INVALID==pCur->eState ){\n      return SQLITE_DONE;\n    }\n    if( pCur->eState==CURSOR_SKIPNEXT ){\n      pCur->eState = CURSOR_VALID;\n      if( pCur->skipNext>0 ) return SQLITE_OK;\n    }\n  }\n\n  pPage = pCur->pPage;\n  idx = ++pCur->ix;\n  if( sqlite3FaultSim(412) ) pPage->isInit = 0;\n  if( !pPage->isInit ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n\n  if( idx>=pPage->nCell ){\n    if( !pPage->leaf ){\n      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));\n      if( rc ) return rc;\n      return moveToLeftmost(pCur);\n    }\n    do{\n      if( pCur->iPage==0 ){\n        pCur->eState = CURSOR_INVALID;\n        return SQLITE_DONE;\n      }\n      moveToParent(pCur);\n      pPage = pCur->pPage;\n    }while( pCur->ix>=pPage->nCell );\n    if( pPage->intKey ){\n      return sqlite3BtreeNext(pCur, 0);\n    }else{\n      return SQLITE_OK;\n    }\n  }\n  if( pPage->leaf ){\n    return SQLITE_OK;\n  }else{\n    return moveToLeftmost(pCur);\n  }\n}\nSQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int flags){\n  MemPage *pPage;\n  UNUSED_PARAMETER( flags );  /* Used in COMDB2 but not native SQLite */\n  assert( cursorOwnsBtShared(pCur) );\n  assert( flags==0 || flags==1 );\n  pCur->info.nSize = 0;\n  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n  if( pCur->eState!=CURSOR_VALID ) return btreeNext(pCur);\n  pPage = pCur->pPage;\n  if( (++pCur->ix)>=pPage->nCell ){\n    pCur->ix--;\n    return btreeNext(pCur);\n  }\n  if( pPage->leaf ){\n    return SQLITE_OK;\n  }else{\n    return moveToLeftmost(pCur);\n  }\n}\n\n/*\n** Step the cursor to the back to the previous entry in the database.\n** Return values:\n**\n**     SQLITE_OK     success\n**     SQLITE_DONE   the cursor is already on the first element of the table\n**     otherwise     some kind of error occurred\n**\n** The main entry point is sqlite3BtreePrevious().  That routine is optimized\n** for the common case of merely decrementing the cell counter BtCursor.aiIdx\n** to the previous cell on the current page.  The (slower) btreePrevious()\n** helper routine is called when it is necessary to move to a different page\n** or to restore the cursor.\n**\n** If bit 0x01 of the F argument to sqlite3BtreePrevious(C,F) is 1, then\n** the cursor corresponds to an SQL index and this routine could have been\n** skipped if the SQL index had been a unique index.  The F argument is a\n** hint to the implement.  The native SQLite btree implementation does not\n** use this hint, but COMDB2 does.\n*/\nstatic SQLITE_NOINLINE int btreePrevious(BtCursor *pCur){\n  int rc;\n  MemPage *pPage;\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( (pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0 );\n  assert( pCur->info.nSize==0 );\n  if( pCur->eState!=CURSOR_VALID ){\n    rc = restoreCursorPosition(pCur);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    if( CURSOR_INVALID==pCur->eState ){\n      return SQLITE_DONE;\n    }\n    if( CURSOR_SKIPNEXT==pCur->eState ){\n      pCur->eState = CURSOR_VALID;\n      if( pCur->skipNext<0 ) return SQLITE_OK;\n    }\n  }\n\n  pPage = pCur->pPage;\n  if( sqlite3FaultSim(412) ) pPage->isInit = 0;\n  if( !pPage->isInit ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  if( !pPage->leaf ){\n    int idx = pCur->ix;\n    rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));\n    if( rc ) return rc;\n    rc = moveToRightmost(pCur);\n  }else{\n    while( pCur->ix==0 ){\n      if( pCur->iPage==0 ){\n        pCur->eState = CURSOR_INVALID;\n        return SQLITE_DONE;\n      }\n      moveToParent(pCur);\n    }\n    assert( pCur->info.nSize==0 );\n    assert( (pCur->curFlags & (BTCF_ValidOvfl))==0 );\n\n    pCur->ix--;\n    pPage = pCur->pPage;\n    if( pPage->intKey && !pPage->leaf ){\n      rc = sqlite3BtreePrevious(pCur, 0);\n    }else{\n      rc = SQLITE_OK;\n    }\n  }\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int flags){\n  assert( cursorOwnsBtShared(pCur) );\n  assert( flags==0 || flags==1 );\n  UNUSED_PARAMETER( flags );  /* Used in COMDB2 but not native SQLite */\n  pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey);\n  pCur->info.nSize = 0;\n  if( pCur->eState!=CURSOR_VALID\n   || pCur->ix==0\n   || pCur->pPage->leaf==0\n  ){\n    return btreePrevious(pCur);\n  }\n  pCur->ix--;\n  return SQLITE_OK;\n}\n\n/*\n** Allocate a new page from the database file.\n**\n** The new page is marked as dirty.  (In other words, sqlite3PagerWrite()\n** has already been called on the new page.)  The new page has also\n** been referenced and the calling routine is responsible for calling\n** sqlite3PagerUnref() on the new page when it is done.\n**\n** SQLITE_OK is returned on success.  Any other return value indicates\n** an error.  *ppPage is set to NULL in the event of an error.\n**\n** If the \"nearby\" parameter is not 0, then an effort is made to\n** locate a page close to the page number \"nearby\".  This can be used in an\n** attempt to keep related pages close to each other in the database file,\n** which in turn can make database access faster.\n**\n** If the eMode parameter is BTALLOC_EXACT and the nearby page exists\n** anywhere on the free-list, then it is guaranteed to be returned.  If\n** eMode is BTALLOC_LT then the page returned will be less than or equal\n** to nearby if any such page exists.  If eMode is BTALLOC_ANY then there\n** are no restrictions on which page is returned.\n*/\nstatic int allocateBtreePage(\n  BtShared *pBt,         /* The btree */\n  MemPage **ppPage,      /* Store pointer to the allocated page here */\n  Pgno *pPgno,           /* Store the page number here */\n  Pgno nearby,           /* Search for a page near this one */\n  u8 eMode               /* BTALLOC_EXACT, BTALLOC_LT, or BTALLOC_ANY */\n){\n  MemPage *pPage1;\n  int rc;\n  u32 n;     /* Number of pages on the freelist */\n  u32 k;     /* Number of leaves on the trunk of the freelist */\n  MemPage *pTrunk = 0;\n  MemPage *pPrevTrunk = 0;\n  Pgno mxPage;     /* Total size of the database file */\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( eMode==BTALLOC_ANY || (nearby>0 && IfNotOmitAV(pBt->autoVacuum)) );\n  pPage1 = pBt->pPage1;\n  mxPage = btreePagecount(pBt);\n  /* EVIDENCE-OF: R-21003-45125 The 4-byte big-endian integer at offset 36\n  ** stores the total number of pages on the freelist. */\n  n = get4byte(&pPage1->aData[36]);\n  testcase( n==mxPage-1 );\n  if( n>=mxPage ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  if( n>0 ){\n    /* There are pages on the freelist.  Reuse one of those pages. */\n    Pgno iTrunk;\n    u8 searchList = 0; /* If the free-list must be searched for 'nearby' */\n    u32 nSearch = 0;   /* Count of the number of search attempts */\n\n    /* If eMode==BTALLOC_EXACT and a query of the pointer-map\n    ** shows that the page 'nearby' is somewhere on the free-list, then\n    ** the entire-list will be searched for that page.\n    */\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( eMode==BTALLOC_EXACT ){\n      if( nearby<=mxPage ){\n        u8 eType;\n        assert( nearby>0 );\n        assert( pBt->autoVacuum );\n        rc = ptrmapGet(pBt, nearby, &eType, 0);\n        if( rc ) return rc;\n        if( eType==PTRMAP_FREEPAGE ){\n          searchList = 1;\n        }\n      }\n    }else if( eMode==BTALLOC_LE ){\n      searchList = 1;\n    }\n#endif\n\n    /* Decrement the free-list count by 1. Set iTrunk to the index of the\n    ** first free-list trunk page. iPrevTrunk is initially 1.\n    */\n    rc = sqlite3PagerWrite(pPage1->pDbPage);\n    if( rc ) return rc;\n    put4byte(&pPage1->aData[36], n-1);\n\n    /* The code within this loop is run only once if the 'searchList' variable\n    ** is not true. Otherwise, it runs once for each trunk-page on the\n    ** free-list until the page 'nearby' is located (eMode==BTALLOC_EXACT)\n    ** or until a page less than 'nearby' is located (eMode==BTALLOC_LT)\n    */\n    do {\n      pPrevTrunk = pTrunk;\n      if( pPrevTrunk ){\n        /* EVIDENCE-OF: R-01506-11053 The first integer on a freelist trunk page\n        ** is the page number of the next freelist trunk page in the list or\n        ** zero if this is the last freelist trunk page. */\n        iTrunk = get4byte(&pPrevTrunk->aData[0]);\n      }else{\n        /* EVIDENCE-OF: R-59841-13798 The 4-byte big-endian integer at offset 32\n        ** stores the page number of the first page of the freelist, or zero if\n        ** the freelist is empty. */\n        iTrunk = get4byte(&pPage1->aData[32]);\n      }\n      testcase( iTrunk==mxPage );\n      if( iTrunk>mxPage || nSearch++ > n ){\n        rc = SQLITE_CORRUPT_PGNO(pPrevTrunk ? pPrevTrunk->pgno : 1);\n      }else{\n        rc = btreeGetUnusedPage(pBt, iTrunk, &pTrunk, 0);\n      }\n      if( rc ){\n        pTrunk = 0;\n        goto end_allocate_page;\n      }\n      assert( pTrunk!=0 );\n      assert( pTrunk->aData!=0 );\n      /* EVIDENCE-OF: R-13523-04394 The second integer on a freelist trunk page\n      ** is the number of leaf page pointers to follow. */\n      k = get4byte(&pTrunk->aData[4]);\n      if( k==0 && !searchList ){\n        /* The trunk has no leaves and the list is not being searched.\n        ** So extract the trunk page itself and use it as the newly\n        ** allocated page */\n        assert( pPrevTrunk==0 );\n        rc = sqlite3PagerWrite(pTrunk->pDbPage);\n        if( rc ){\n          goto end_allocate_page;\n        }\n        *pPgno = iTrunk;\n        memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);\n        *ppPage = pTrunk;\n        pTrunk = 0;\n        TRACE((\"ALLOCATE: %u trunk - %u free pages left\\n\", *pPgno, n-1));\n      }else if( k>(u32)(pBt->usableSize/4 - 2) ){\n        /* Value of k is out of range.  Database corruption */\n        rc = SQLITE_CORRUPT_PGNO(iTrunk);\n        goto end_allocate_page;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      }else if( searchList\n            && (nearby==iTrunk || (iTrunk<nearby && eMode==BTALLOC_LE))\n      ){\n        /* The list is being searched and this trunk page is the page\n        ** to allocate, regardless of whether it has leaves.\n        */\n        *pPgno = iTrunk;\n        *ppPage = pTrunk;\n        searchList = 0;\n        rc = sqlite3PagerWrite(pTrunk->pDbPage);\n        if( rc ){\n          goto end_allocate_page;\n        }\n        if( k==0 ){\n          if( !pPrevTrunk ){\n            memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);\n          }else{\n            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);\n            if( rc!=SQLITE_OK ){\n              goto end_allocate_page;\n            }\n            memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);\n          }\n        }else{\n          /* The trunk page is required by the caller but it contains\n          ** pointers to free-list leaves. The first leaf becomes a trunk\n          ** page in this case.\n          */\n          MemPage *pNewTrunk;\n          Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);\n          if( iNewTrunk>mxPage ){\n            rc = SQLITE_CORRUPT_PGNO(iTrunk);\n            goto end_allocate_page;\n          }\n          testcase( iNewTrunk==mxPage );\n          rc = btreeGetUnusedPage(pBt, iNewTrunk, &pNewTrunk, 0);\n          if( rc!=SQLITE_OK ){\n            goto end_allocate_page;\n          }\n          rc = sqlite3PagerWrite(pNewTrunk->pDbPage);\n          if( rc!=SQLITE_OK ){\n            releasePage(pNewTrunk);\n            goto end_allocate_page;\n          }\n          memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);\n          put4byte(&pNewTrunk->aData[4], k-1);\n          memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);\n          releasePage(pNewTrunk);\n          if( !pPrevTrunk ){\n            assert( sqlite3PagerIswriteable(pPage1->pDbPage) );\n            put4byte(&pPage1->aData[32], iNewTrunk);\n          }else{\n            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);\n            if( rc ){\n              goto end_allocate_page;\n            }\n            put4byte(&pPrevTrunk->aData[0], iNewTrunk);\n          }\n        }\n        pTrunk = 0;\n        TRACE((\"ALLOCATE: %u trunk - %u free pages left\\n\", *pPgno, n-1));\n#endif\n      }else if( k>0 ){\n        /* Extract a leaf from the trunk */\n        u32 closest;\n        Pgno iPage;\n        unsigned char *aData = pTrunk->aData;\n        if( nearby>0 ){\n          u32 i;\n          closest = 0;\n          if( eMode==BTALLOC_LE ){\n            for(i=0; i<k; i++){\n              iPage = get4byte(&aData[8+i*4]);\n              if( iPage<=nearby ){\n                closest = i;\n                break;\n              }\n            }\n          }else{\n            int dist;\n            dist = sqlite3AbsInt32(get4byte(&aData[8]) - nearby);\n            for(i=1; i<k; i++){\n              int d2 = sqlite3AbsInt32(get4byte(&aData[8+i*4]) - nearby);\n              if( d2<dist ){\n                closest = i;\n                dist = d2;\n              }\n            }\n          }\n        }else{\n          closest = 0;\n        }\n\n        iPage = get4byte(&aData[8+closest*4]);\n        testcase( iPage==mxPage );\n        if( iPage>mxPage || iPage<2 ){\n          rc = SQLITE_CORRUPT_PGNO(iTrunk);\n          goto end_allocate_page;\n        }\n        testcase( iPage==mxPage );\n        if( !searchList\n         || (iPage==nearby || (iPage<nearby && eMode==BTALLOC_LE))\n        ){\n          int noContent;\n          *pPgno = iPage;\n          TRACE((\"ALLOCATE: %u was leaf %u of %u on trunk %u\"\n                 \": %u more free pages\\n\",\n                 *pPgno, closest+1, k, pTrunk->pgno, n-1));\n          rc = sqlite3PagerWrite(pTrunk->pDbPage);\n          if( rc ) goto end_allocate_page;\n          if( closest<k-1 ){\n            memcpy(&aData[8+closest*4], &aData[4+k*4], 4);\n          }\n          put4byte(&aData[4], k-1);\n          noContent = !btreeGetHasContent(pBt, *pPgno)? PAGER_GET_NOCONTENT : 0;\n          rc = btreeGetUnusedPage(pBt, *pPgno, ppPage, noContent);\n          if( rc==SQLITE_OK ){\n            rc = sqlite3PagerWrite((*ppPage)->pDbPage);\n            if( rc!=SQLITE_OK ){\n              releasePage(*ppPage);\n              *ppPage = 0;\n            }\n          }\n          searchList = 0;\n        }\n      }\n      releasePage(pPrevTrunk);\n      pPrevTrunk = 0;\n    }while( searchList );\n  }else{\n    /* There are no pages on the freelist, so append a new page to the\n    ** database image.\n    **\n    ** Normally, new pages allocated by this block can be requested from the\n    ** pager layer with the 'no-content' flag set. This prevents the pager\n    ** from trying to read the pages content from disk. However, if the\n    ** current transaction has already run one or more incremental-vacuum\n    ** steps, then the page we are about to allocate may contain content\n    ** that is required in the event of a rollback. In this case, do\n    ** not set the no-content flag. This causes the pager to load and journal\n    ** the current page content before overwriting it.\n    **\n    ** Note that the pager will not actually attempt to load or journal\n    ** content for any page that really does lie past the end of the database\n    ** file on disk. So the effects of disabling the no-content optimization\n    ** here are confined to those pages that lie between the end of the\n    ** database image and the end of the database file.\n    */\n    int bNoContent = (0==IfNotOmitAV(pBt->bDoTruncate))? PAGER_GET_NOCONTENT:0;\n\n    rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);\n    if( rc ) return rc;\n    pBt->nPage++;\n    if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ) pBt->nPage++;\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pBt->autoVacuum && PTRMAP_ISPAGE(pBt, pBt->nPage) ){\n      /* If *pPgno refers to a pointer-map page, allocate two new pages\n      ** at the end of the file instead of one. The first allocated page\n      ** becomes a new pointer-map page, the second is used by the caller.\n      */\n      MemPage *pPg = 0;\n      TRACE((\"ALLOCATE: %u from end of file (pointer-map page)\\n\", pBt->nPage));\n      assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );\n      rc = btreeGetUnusedPage(pBt, pBt->nPage, &pPg, bNoContent);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3PagerWrite(pPg->pDbPage);\n        releasePage(pPg);\n      }\n      if( rc ) return rc;\n      pBt->nPage++;\n      if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ){ pBt->nPage++; }\n    }\n#endif\n    put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);\n    *pPgno = pBt->nPage;\n\n    assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );\n    rc = btreeGetUnusedPage(pBt, *pPgno, ppPage, bNoContent);\n    if( rc ) return rc;\n    rc = sqlite3PagerWrite((*ppPage)->pDbPage);\n    if( rc!=SQLITE_OK ){\n      releasePage(*ppPage);\n      *ppPage = 0;\n    }\n    TRACE((\"ALLOCATE: %u from end of file\\n\", *pPgno));\n  }\n\n  assert( CORRUPT_DB || *pPgno!=PENDING_BYTE_PAGE(pBt) );\n\nend_allocate_page:\n  releasePage(pTrunk);\n  releasePage(pPrevTrunk);\n  assert( rc!=SQLITE_OK || sqlite3PagerPageRefcount((*ppPage)->pDbPage)<=1 );\n  assert( rc!=SQLITE_OK || (*ppPage)->isInit==0 );\n  return rc;\n}\n\n/*\n** This function is used to add page iPage to the database file free-list.\n** It is assumed that the page is not already a part of the free-list.\n**\n** The value passed as the second argument to this function is optional.\n** If the caller happens to have a pointer to the MemPage object\n** corresponding to page iPage handy, it may pass it as the second value.\n** Otherwise, it may pass NULL.\n**\n** If a pointer to a MemPage object is passed as the second argument,\n** its reference count is not altered by this function.\n*/\nstatic int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){\n  MemPage *pTrunk = 0;                /* Free-list trunk page */\n  Pgno iTrunk = 0;                    /* Page number of free-list trunk page */\n  MemPage *pPage1 = pBt->pPage1;      /* Local reference to page 1 */\n  MemPage *pPage;                     /* Page being freed. May be NULL. */\n  int rc;                             /* Return Code */\n  u32 nFree;                          /* Initial number of pages on free-list */\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( CORRUPT_DB || iPage>1 );\n  assert( !pMemPage || pMemPage->pgno==iPage );\n\n  if( iPage<2 || iPage>pBt->nPage ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  if( pMemPage ){\n    pPage = pMemPage;\n    sqlite3PagerRef(pPage->pDbPage);\n  }else{\n    pPage = btreePageLookup(pBt, iPage);\n  }\n\n  /* Increment the free page count on pPage1 */\n  rc = sqlite3PagerWrite(pPage1->pDbPage);\n  if( rc ) goto freepage_out;\n  nFree = get4byte(&pPage1->aData[36]);\n  put4byte(&pPage1->aData[36], nFree+1);\n\n  if( pBt->btsFlags & BTS_SECURE_DELETE ){\n    /* If the secure_delete option is enabled, then\n    ** always fully overwrite deleted information with zeros.\n    */\n    if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) )\n     ||            ((rc = sqlite3PagerWrite(pPage->pDbPage))!=0)\n    ){\n      goto freepage_out;\n    }\n    memset(pPage->aData, 0, pPage->pBt->pageSize);\n  }\n\n  /* If the database supports auto-vacuum, write an entry in the pointer-map\n  ** to indicate that the page is free.\n  */\n  if( ISAUTOVACUUM(pBt) ){\n    ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc);\n    if( rc ) goto freepage_out;\n  }\n\n  /* Now manipulate the actual database free-list structure. There are two\n  ** possibilities. If the free-list is currently empty, or if the first\n  ** trunk page in the free-list is full, then this page will become a\n  ** new free-list trunk page. Otherwise, it will become a leaf of the\n  ** first trunk page in the current free-list. This block tests if it\n  ** is possible to add the page as a new free-list leaf.\n  */\n  if( nFree!=0 ){\n    u32 nLeaf;                /* Initial number of leaf cells on trunk page */\n\n    iTrunk = get4byte(&pPage1->aData[32]);\n    if( iTrunk>btreePagecount(pBt) ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto freepage_out;\n    }\n    rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);\n    if( rc!=SQLITE_OK ){\n      goto freepage_out;\n    }\n\n    nLeaf = get4byte(&pTrunk->aData[4]);\n    assert( pBt->usableSize>32 );\n    if( nLeaf > (u32)pBt->usableSize/4 - 2 ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto freepage_out;\n    }\n    if( nLeaf < (u32)pBt->usableSize/4 - 8 ){\n      /* In this case there is room on the trunk page to insert the page\n      ** being freed as a new leaf.\n      **\n      ** Note that the trunk page is not really full until it contains\n      ** usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have\n      ** coded.  But due to a coding error in versions of SQLite prior to\n      ** 3.6.0, databases with freelist trunk pages holding more than\n      ** usableSize/4 - 8 entries will be reported as corrupt.  In order\n      ** to maintain backwards compatibility with older versions of SQLite,\n      ** we will continue to restrict the number of entries to usableSize/4 - 8\n      ** for now.  At some point in the future (once everyone has upgraded\n      ** to 3.6.0 or later) we should consider fixing the conditional above\n      ** to read \"usableSize/4-2\" instead of \"usableSize/4-8\".\n      **\n      ** EVIDENCE-OF: R-19920-11576 However, newer versions of SQLite still\n      ** avoid using the last six entries in the freelist trunk page array in\n      ** order that database files created by newer versions of SQLite can be\n      ** read by older versions of SQLite.\n      */\n      rc = sqlite3PagerWrite(pTrunk->pDbPage);\n      if( rc==SQLITE_OK ){\n        put4byte(&pTrunk->aData[4], nLeaf+1);\n        put4byte(&pTrunk->aData[8+nLeaf*4], iPage);\n        if( pPage && (pBt->btsFlags & BTS_SECURE_DELETE)==0 ){\n          sqlite3PagerDontWrite(pPage->pDbPage);\n        }\n        rc = btreeSetHasContent(pBt, iPage);\n      }\n      TRACE((\"FREE-PAGE: %u leaf on trunk page %u\\n\",pPage->pgno,pTrunk->pgno));\n      goto freepage_out;\n    }\n  }\n\n  /* If control flows to this point, then it was not possible to add the\n  ** the page being freed as a leaf page of the first trunk in the free-list.\n  ** Possibly because the free-list is empty, or possibly because the\n  ** first trunk in the free-list is full. Either way, the page being freed\n  ** will become the new first trunk page in the free-list.\n  */\n  if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){\n    goto freepage_out;\n  }\n  rc = sqlite3PagerWrite(pPage->pDbPage);\n  if( rc!=SQLITE_OK ){\n    goto freepage_out;\n  }\n  put4byte(pPage->aData, iTrunk);\n  put4byte(&pPage->aData[4], 0);\n  put4byte(&pPage1->aData[32], iPage);\n  TRACE((\"FREE-PAGE: %u new trunk page replacing %u\\n\", pPage->pgno, iTrunk));\n\nfreepage_out:\n  if( pPage ){\n    pPage->isInit = 0;\n  }\n  releasePage(pPage);\n  releasePage(pTrunk);\n  return rc;\n}\nstatic void freePage(MemPage *pPage, int *pRC){\n  if( (*pRC)==SQLITE_OK ){\n    *pRC = freePage2(pPage->pBt, pPage, pPage->pgno);\n  }\n}\n\n/*\n** Free the overflow pages associated with the given Cell.\n*/\nstatic SQLITE_NOINLINE int clearCellOverflow(\n  MemPage *pPage,          /* The page that contains the Cell */\n  unsigned char *pCell,    /* First byte of the Cell */\n  CellInfo *pInfo          /* Size information about the cell */\n){\n  BtShared *pBt;\n  Pgno ovflPgno;\n  int rc;\n  int nOvfl;\n  u32 ovflPageSize;\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pInfo->nLocal!=pInfo->nPayload );\n  testcase( pCell + pInfo->nSize == pPage->aDataEnd );\n  testcase( pCell + (pInfo->nSize-1) == pPage->aDataEnd );\n  if( pCell + pInfo->nSize > pPage->aDataEnd ){\n    /* Cell extends past end of page */\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  ovflPgno = get4byte(pCell + pInfo->nSize - 4);\n  pBt = pPage->pBt;\n  assert( pBt->usableSize > 4 );\n  ovflPageSize = pBt->usableSize - 4;\n  nOvfl = (pInfo->nPayload - pInfo->nLocal + ovflPageSize - 1)/ovflPageSize;\n  assert( nOvfl>0 ||\n    (CORRUPT_DB && (pInfo->nPayload + ovflPageSize)<ovflPageSize)\n  );\n  while( nOvfl-- ){\n    Pgno iNext = 0;\n    MemPage *pOvfl = 0;\n    if( ovflPgno<2 || ovflPgno>btreePagecount(pBt) ){\n      /* 0 is not a legal page number and page 1 cannot be an\n      ** overflow page. Therefore if ovflPgno<2 or past the end of the\n      ** file the database must be corrupt. */\n      return SQLITE_CORRUPT_BKPT;\n    }\n    if( nOvfl ){\n      rc = getOverflowPage(pBt, ovflPgno, &pOvfl, &iNext);\n      if( rc ) return rc;\n    }\n\n    if( ( pOvfl || ((pOvfl = btreePageLookup(pBt, ovflPgno))!=0) )\n     && sqlite3PagerPageRefcount(pOvfl->pDbPage)!=1\n    ){\n      /* There is no reason any cursor should have an outstanding reference\n      ** to an overflow page belonging to a cell that is being deleted/updated.\n      ** So if there exists more than one reference to this page, then it\n      ** must not really be an overflow page and the database must be corrupt.\n      ** It is helpful to detect this before calling freePage2(), as\n      ** freePage2() may zero the page contents if secure-delete mode is\n      ** enabled. If this 'overflow' page happens to be a page that the\n      ** caller is iterating through or using in some other way, this\n      ** can be problematic.\n      */\n      rc = SQLITE_CORRUPT_BKPT;\n    }else{\n      rc = freePage2(pBt, pOvfl, ovflPgno);\n    }\n\n    if( pOvfl ){\n      sqlite3PagerUnref(pOvfl->pDbPage);\n    }\n    if( rc ) return rc;\n    ovflPgno = iNext;\n  }\n  return SQLITE_OK;\n}\n\n/* Call xParseCell to compute the size of a cell.  If the cell contains\n** overflow, then invoke cellClearOverflow to clear out that overflow.\n** Store the result code (SQLITE_OK or some error code) in rc.\n**\n** Implemented as macro to force inlining for performance.\n*/\n#define BTREE_CLEAR_CELL(rc, pPage, pCell, sInfo)   \\\n  pPage->xParseCell(pPage, pCell, &sInfo);          \\\n  if( sInfo.nLocal!=sInfo.nPayload ){               \\\n    rc = clearCellOverflow(pPage, pCell, &sInfo);   \\\n  }else{                                            \\\n    rc = SQLITE_OK;                                 \\\n  }\n\n\n/*\n** Create the byte sequence used to represent a cell on page pPage\n** and write that byte sequence into pCell[].  Overflow pages are\n** allocated and filled in as necessary.  The calling procedure\n** is responsible for making sure sufficient space has been allocated\n** for pCell[].\n**\n** Note that pCell does not necessary need to point to the pPage->aData\n** area.  pCell might point to some temporary storage.  The cell will\n** be constructed in this temporary area then copied into pPage->aData\n** later.\n*/\nstatic int fillInCell(\n  MemPage *pPage,                /* The page that contains the cell */\n  unsigned char *pCell,          /* Complete text of the cell */\n  const BtreePayload *pX,        /* Payload with which to construct the cell */\n  int *pnSize                    /* Write cell size here */\n){\n  int nPayload;\n  const u8 *pSrc;\n  int nSrc, n, rc, mn;\n  int spaceLeft;\n  MemPage *pToRelease;\n  unsigned char *pPrior;\n  unsigned char *pPayload;\n  BtShared *pBt;\n  Pgno pgnoOvfl;\n  int nHeader;\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n\n  /* pPage is not necessarily writeable since pCell might be auxiliary\n  ** buffer space that is separate from the pPage buffer area */\n  assert( pCell<pPage->aData || pCell>=&pPage->aData[pPage->pBt->pageSize]\n            || sqlite3PagerIswriteable(pPage->pDbPage) );\n\n  /* Fill in the header. */\n  nHeader = pPage->childPtrSize;\n  if( pPage->intKey ){\n    nPayload = pX->nData + pX->nZero;\n    pSrc = pX->pData;\n    nSrc = pX->nData;\n    assert( pPage->intKeyLeaf ); /* fillInCell() only called for leaves */\n    nHeader += putVarint32(&pCell[nHeader], nPayload);\n    nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);\n  }else{\n    assert( pX->nKey<=0x7fffffff && pX->pKey!=0 );\n    nSrc = nPayload = (int)pX->nKey;\n    pSrc = pX->pKey;\n    nHeader += putVarint32(&pCell[nHeader], nPayload);\n  }\n\n  /* Fill in the payload */\n  pPayload = &pCell[nHeader];\n  if( nPayload<=pPage->maxLocal ){\n    /* This is the common case where everything fits on the btree page\n    ** and no overflow pages are required. */\n    n = nHeader + nPayload;\n    testcase( n==3 );\n    testcase( n==4 );\n    if( n<4 ){\n      n = 4;\n      pPayload[nPayload] = 0;\n    }\n    *pnSize = n;\n    assert( nSrc<=nPayload );\n    testcase( nSrc<nPayload );\n    memcpy(pPayload, pSrc, nSrc);\n    memset(pPayload+nSrc, 0, nPayload-nSrc);\n    return SQLITE_OK;\n  }\n\n  /* If we reach this point, it means that some of the content will need\n  ** to spill onto overflow pages.\n  */\n  mn = pPage->minLocal;\n  n = mn + (nPayload - mn) % (pPage->pBt->usableSize - 4);\n  testcase( n==pPage->maxLocal );\n  testcase( n==pPage->maxLocal+1 );\n  if( n > pPage->maxLocal ) n = mn;\n  spaceLeft = n;\n  *pnSize = n + nHeader + 4;\n  pPrior = &pCell[nHeader+n];\n  pToRelease = 0;\n  pgnoOvfl = 0;\n  pBt = pPage->pBt;\n\n  /* At this point variables should be set as follows:\n  **\n  **   nPayload           Total payload size in bytes\n  **   pPayload           Begin writing payload here\n  **   spaceLeft          Space available at pPayload.  If nPayload>spaceLeft,\n  **                      that means content must spill into overflow pages.\n  **   *pnSize            Size of the local cell (not counting overflow pages)\n  **   pPrior             Where to write the pgno of the first overflow page\n  **\n  ** Use a call to btreeParseCellPtr() to verify that the values above\n  ** were computed correctly.\n  */\n#ifdef SQLITE_DEBUG\n  {\n    CellInfo info;\n    pPage->xParseCell(pPage, pCell, &info);\n    assert( nHeader==(int)(info.pPayload - pCell) );\n    assert( info.nKey==pX->nKey );\n    assert( *pnSize == info.nSize );\n    assert( spaceLeft == info.nLocal );\n  }\n#endif\n\n  /* Write the payload into the local Cell and any extra into overflow pages */\n  while( 1 ){\n    n = nPayload;\n    if( n>spaceLeft ) n = spaceLeft;\n\n    /* If pToRelease is not zero than pPayload points into the data area\n    ** of pToRelease.  Make sure pToRelease is still writeable. */\n    assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );\n\n    /* If pPayload is part of the data area of pPage, then make sure pPage\n    ** is still writeable */\n    assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]\n            || sqlite3PagerIswriteable(pPage->pDbPage) );\n\n    if( nSrc>=n ){\n      memcpy(pPayload, pSrc, n);\n    }else if( nSrc>0 ){\n      n = nSrc;\n      memcpy(pPayload, pSrc, n);\n    }else{\n      memset(pPayload, 0, n);\n    }\n    nPayload -= n;\n    if( nPayload<=0 ) break;\n    pPayload += n;\n    pSrc += n;\n    nSrc -= n;\n    spaceLeft -= n;\n    if( spaceLeft==0 ){\n      MemPage *pOvfl = 0;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */\n      if( pBt->autoVacuum ){\n        do{\n          pgnoOvfl++;\n        } while(\n          PTRMAP_ISPAGE(pBt, pgnoOvfl) || pgnoOvfl==PENDING_BYTE_PAGE(pBt)\n        );\n      }\n#endif\n      rc = allocateBtreePage(pBt, &pOvfl, &pgnoOvfl, pgnoOvfl, 0);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      /* If the database supports auto-vacuum, and the second or subsequent\n      ** overflow page is being allocated, add an entry to the pointer-map\n      ** for that page now.\n      **\n      ** If this is the first overflow page, then write a partial entry\n      ** to the pointer-map. If we write nothing to this pointer-map slot,\n      ** then the optimistic overflow chain processing in clearCell()\n      ** may misinterpret the uninitialized values and delete the\n      ** wrong pages from the database.\n      */\n      if( pBt->autoVacuum && rc==SQLITE_OK ){\n        u8 eType = (pgnoPtrmap?PTRMAP_OVERFLOW2:PTRMAP_OVERFLOW1);\n        ptrmapPut(pBt, pgnoOvfl, eType, pgnoPtrmap, &rc);\n        if( rc ){\n          releasePage(pOvfl);\n        }\n      }\n#endif\n      if( rc ){\n        releasePage(pToRelease);\n        return rc;\n      }\n\n      /* If pToRelease is not zero than pPrior points into the data area\n      ** of pToRelease.  Make sure pToRelease is still writeable. */\n      assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );\n\n      /* If pPrior is part of the data area of pPage, then make sure pPage\n      ** is still writeable */\n      assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]\n            || sqlite3PagerIswriteable(pPage->pDbPage) );\n\n      put4byte(pPrior, pgnoOvfl);\n      releasePage(pToRelease);\n      pToRelease = pOvfl;\n      pPrior = pOvfl->aData;\n      put4byte(pPrior, 0);\n      pPayload = &pOvfl->aData[4];\n      spaceLeft = pBt->usableSize - 4;\n    }\n  }\n  releasePage(pToRelease);\n  return SQLITE_OK;\n}\n\n/*\n** Remove the i-th cell from pPage.  This routine effects pPage only.\n** The cell content is not freed or deallocated.  It is assumed that\n** the cell content has been copied someplace else.  This routine just\n** removes the reference to the cell from pPage.\n**\n** \"sz\" must be the number of bytes in the cell.\n*/\nstatic void dropCell(MemPage *pPage, int idx, int sz, int *pRC){\n  u32 pc;         /* Offset to cell content of cell being deleted */\n  u8 *data;       /* pPage->aData */\n  u8 *ptr;        /* Used to move bytes around within data[] */\n  int rc;         /* The return code */\n  int hdr;        /* Beginning of the header.  0 most pages.  100 page 1 */\n\n  if( *pRC ) return;\n  assert( idx>=0 );\n  assert( idx<pPage->nCell );\n  assert( CORRUPT_DB || sz==cellSize(pPage, idx) );\n  assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( pPage->nFree>=0 );\n  data = pPage->aData;\n  ptr = &pPage->aCellIdx[2*idx];\n  assert( pPage->pBt->usableSize > (u32)(ptr-data) );\n  pc = get2byte(ptr);\n  hdr = pPage->hdrOffset;\n  testcase( pc==(u32)get2byte(&data[hdr+5]) );\n  testcase( pc+sz==pPage->pBt->usableSize );\n  if( pc+sz > pPage->pBt->usableSize ){\n    *pRC = SQLITE_CORRUPT_BKPT;\n    return;\n  }\n  rc = freeSpace(pPage, pc, sz);\n  if( rc ){\n    *pRC = rc;\n    return;\n  }\n  pPage->nCell--;\n  if( pPage->nCell==0 ){\n    memset(&data[hdr+1], 0, 4);\n    data[hdr+7] = 0;\n    put2byte(&data[hdr+5], pPage->pBt->usableSize);\n    pPage->nFree = pPage->pBt->usableSize - pPage->hdrOffset\n                       - pPage->childPtrSize - 8;\n  }else{\n    memmove(ptr, ptr+2, 2*(pPage->nCell - idx));\n    put2byte(&data[hdr+3], pPage->nCell);\n    pPage->nFree += 2;\n  }\n}\n\n/*\n** Insert a new cell on pPage at cell index \"i\".  pCell points to the\n** content of the cell.\n**\n** If the cell content will fit on the page, then put it there.  If it\n** will not fit, then make a copy of the cell content into pTemp if\n** pTemp is not null.  Regardless of pTemp, allocate a new entry\n** in pPage->apOvfl[] and make it point to the cell content (either\n** in pTemp or the original pCell) and also record its index.\n** Allocating a new entry in pPage->aCell[] implies that\n** pPage->nOverflow is incremented.\n**\n** The insertCellFast() routine below works exactly the same as\n** insertCell() except that it lacks the pTemp and iChild parameters\n** which are assumed zero.  Other than that, the two routines are the\n** same.\n**\n** Fixes or enhancements to this routine should be reflected in\n** insertCellFast()!\n*/\nstatic int insertCell(\n  MemPage *pPage,   /* Page into which we are copying */\n  int i,            /* New cell becomes the i-th cell of the page */\n  u8 *pCell,        /* Content of the new cell */\n  int sz,           /* Bytes of content in pCell */\n  u8 *pTemp,        /* Temp storage space for pCell, if needed */\n  Pgno iChild       /* If non-zero, replace first 4 bytes with this value */\n){\n  int idx = 0;      /* Where to write new cell content in data[] */\n  int j;            /* Loop counter */\n  u8 *data;         /* The content of the whole page */\n  u8 *pIns;         /* The point in pPage->aCellIdx[] where no cell inserted */\n\n  assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );\n  assert( MX_CELL(pPage->pBt)<=10921 );\n  assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );\n  assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );\n  assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB );\n  assert( pPage->nFree>=0 );\n  assert( iChild>0 );\n  if( pPage->nOverflow || sz+2>pPage->nFree ){\n    if( pTemp ){\n      memcpy(pTemp, pCell, sz);\n      pCell = pTemp;\n    }\n    put4byte(pCell, iChild);\n    j = pPage->nOverflow++;\n    /* Comparison against ArraySize-1 since we hold back one extra slot\n    ** as a contingency.  In other words, never need more than 3 overflow\n    ** slots but 4 are allocated, just to be safe. */\n    assert( j < ArraySize(pPage->apOvfl)-1 );\n    pPage->apOvfl[j] = pCell;\n    pPage->aiOvfl[j] = (u16)i;\n\n    /* When multiple overflows occur, they are always sequential and in\n    ** sorted order.  This invariants arise because multiple overflows can\n    ** only occur when inserting divider cells into the parent page during\n    ** balancing, and the dividers are adjacent and sorted.\n    */\n    assert( j==0 || pPage->aiOvfl[j-1]<(u16)i ); /* Overflows in sorted order */\n    assert( j==0 || i==pPage->aiOvfl[j-1]+1 );   /* Overflows are sequential */\n  }else{\n    int rc = sqlite3PagerWrite(pPage->pDbPage);\n    if( NEVER(rc!=SQLITE_OK) ){\n      return rc;\n    }\n    assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n    data = pPage->aData;\n    assert( &data[pPage->cellOffset]==pPage->aCellIdx );\n    rc = allocateSpace(pPage, sz, &idx);\n    if( rc ){ return rc; }\n    /* The allocateSpace() routine guarantees the following properties\n    ** if it returns successfully */\n    assert( idx >= 0 );\n    assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );\n    assert( idx+sz <= (int)pPage->pBt->usableSize );\n    pPage->nFree -= (u16)(2 + sz);\n    /* In a corrupt database where an entry in the cell index section of\n    ** a btree page has a value of 3 or less, the pCell value might point\n    ** as many as 4 bytes in front of the start of the aData buffer for\n    ** the source page.  Make sure this does not cause problems by not\n    ** reading the first 4 bytes */\n    memcpy(&data[idx+4], pCell+4, sz-4);\n    put4byte(&data[idx], iChild);\n    pIns = pPage->aCellIdx + i*2;\n    memmove(pIns+2, pIns, 2*(pPage->nCell - i));\n    put2byte(pIns, idx);\n    pPage->nCell++;\n    /* increment the cell count */\n    if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++;\n    assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pPage->pBt->autoVacuum ){\n      int rc2 = SQLITE_OK;\n      /* The cell may contain a pointer to an overflow page. If so, write\n      ** the entry for the overflow page into the pointer map.\n      */\n      ptrmapPutOvflPtr(pPage, pPage, pCell, &rc2);\n      if( rc2 ) return rc2;\n    }\n#endif\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This variant of insertCell() assumes that the pTemp and iChild\n** parameters are both zero.  Use this variant in sqlite3BtreeInsert()\n** for performance improvement, and also so that this variant is only\n** called from that one place, and is thus inlined, and thus runs must\n** faster.\n**\n** Fixes or enhancements to this routine should be reflected into\n** the insertCell() routine.\n*/\nstatic int insertCellFast(\n  MemPage *pPage,   /* Page into which we are copying */\n  int i,            /* New cell becomes the i-th cell of the page */\n  u8 *pCell,        /* Content of the new cell */\n  int sz            /* Bytes of content in pCell */\n){\n  int idx = 0;      /* Where to write new cell content in data[] */\n  int j;            /* Loop counter */\n  u8 *data;         /* The content of the whole page */\n  u8 *pIns;         /* The point in pPage->aCellIdx[] where no cell inserted */\n\n  assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );\n  assert( MX_CELL(pPage->pBt)<=10921 );\n  assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );\n  assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );\n  assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB );\n  assert( pPage->nFree>=0 );\n  assert( pPage->nOverflow==0 );\n  if( sz+2>pPage->nFree ){\n    j = pPage->nOverflow++;\n    /* Comparison against ArraySize-1 since we hold back one extra slot\n    ** as a contingency.  In other words, never need more than 3 overflow\n    ** slots but 4 are allocated, just to be safe. */\n    assert( j < ArraySize(pPage->apOvfl)-1 );\n    pPage->apOvfl[j] = pCell;\n    pPage->aiOvfl[j] = (u16)i;\n\n    /* When multiple overflows occur, they are always sequential and in\n    ** sorted order.  This invariants arise because multiple overflows can\n    ** only occur when inserting divider cells into the parent page during\n    ** balancing, and the dividers are adjacent and sorted.\n    */\n    assert( j==0 || pPage->aiOvfl[j-1]<(u16)i ); /* Overflows in sorted order */\n    assert( j==0 || i==pPage->aiOvfl[j-1]+1 );   /* Overflows are sequential */\n  }else{\n    int rc = sqlite3PagerWrite(pPage->pDbPage);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n    assert( sqlite3PagerIswriteable(pPage->pDbPage) );\n    data = pPage->aData;\n    assert( &data[pPage->cellOffset]==pPage->aCellIdx );\n    rc = allocateSpace(pPage, sz, &idx);\n    if( rc ){ return rc; }\n    /* The allocateSpace() routine guarantees the following properties\n    ** if it returns successfully */\n    assert( idx >= 0 );\n    assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );\n    assert( idx+sz <= (int)pPage->pBt->usableSize );\n    pPage->nFree -= (u16)(2 + sz);\n    memcpy(&data[idx], pCell, sz);\n    pIns = pPage->aCellIdx + i*2;\n    memmove(pIns+2, pIns, 2*(pPage->nCell - i));\n    put2byte(pIns, idx);\n    pPage->nCell++;\n    /* increment the cell count */\n    if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++;\n    assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pPage->pBt->autoVacuum ){\n      int rc2 = SQLITE_OK;\n      /* The cell may contain a pointer to an overflow page. If so, write\n      ** the entry for the overflow page into the pointer map.\n      */\n      ptrmapPutOvflPtr(pPage, pPage, pCell, &rc2);\n      if( rc2 ) return rc2;\n    }\n#endif\n  }\n  return SQLITE_OK;\n}\n\n/*\n** The following parameters determine how many adjacent pages get involved\n** in a balancing operation.  NN is the number of neighbors on either side\n** of the page that participate in the balancing operation.  NB is the\n** total number of pages that participate, including the target page and\n** NN neighbors on either side.\n**\n** The minimum value of NN is 1 (of course).  Increasing NN above 1\n** (to 2 or 3) gives a modest improvement in SELECT and DELETE performance\n** in exchange for a larger degradation in INSERT and UPDATE performance.\n** The value of NN appears to give the best results overall.\n**\n** (Later:) The description above makes it seem as if these values are\n** tunable - as if you could change them and recompile and it would all work.\n** But that is unlikely.  NB has been 3 since the inception of SQLite and\n** we have never tested any other value.\n*/\n#define NN 1             /* Number of neighbors on either side of pPage */\n#define NB 3             /* (NN*2+1): Total pages involved in the balance */\n\n/*\n** A CellArray object contains a cache of pointers and sizes for a\n** consecutive sequence of cells that might be held on multiple pages.\n**\n** The cells in this array are the divider cell or cells from the pParent\n** page plus up to three child pages.  There are a total of nCell cells.\n**\n** pRef is a pointer to one of the pages that contributes cells.  This is\n** used to access information such as MemPage.intKey and MemPage.pBt->pageSize\n** which should be common to all pages that contribute cells to this array.\n**\n** apCell[] and szCell[] hold, respectively, pointers to the start of each\n** cell and the size of each cell.  Some of the apCell[] pointers might refer\n** to overflow cells.  In other words, some apCel[] pointers might not point\n** to content area of the pages.\n**\n** A szCell[] of zero means the size of that cell has not yet been computed.\n**\n** The cells come from as many as four different pages:\n**\n**             -----------\n**             | Parent  |\n**             -----------\n**            /     |     \\\n**           /      |      \\\n**  ---------   ---------   ---------\n**  |Child-1|   |Child-2|   |Child-3|\n**  ---------   ---------   ---------\n**\n** The order of cells is in the array is for an index btree is:\n**\n**       1.  All cells from Child-1 in order\n**       2.  The first divider cell from Parent\n**       3.  All cells from Child-2 in order\n**       4.  The second divider cell from Parent\n**       5.  All cells from Child-3 in order\n**\n** For a table-btree (with rowids) the items 2 and 4 are empty because\n** content exists only in leaves and there are no divider cells.\n**\n** For an index btree, the apEnd[] array holds pointer to the end of page\n** for Child-1, the Parent, Child-2, the Parent (again), and Child-3,\n** respectively. The ixNx[] array holds the number of cells contained in\n** each of these 5 stages, and all stages to the left.  Hence:\n**\n**    ixNx[0] = Number of cells in Child-1.\n**    ixNx[1] = Number of cells in Child-1 plus 1 for first divider.\n**    ixNx[2] = Number of cells in Child-1 and Child-2 + 1 for 1st divider.\n**    ixNx[3] = Number of cells in Child-1 and Child-2 + both divider cells\n**    ixNx[4] = Total number of cells.\n**\n** For a table-btree, the concept is similar, except only apEnd[0]..apEnd[2]\n** are used and they point to the leaf pages only, and the ixNx value are:\n**\n**    ixNx[0] = Number of cells in Child-1.\n**    ixNx[1] = Number of cells in Child-1 and Child-2.\n**    ixNx[2] = Total number of cells.\n**\n** Sometimes when deleting, a child page can have zero cells.  In those\n** cases, ixNx[] entries with higher indexes, and the corresponding apEnd[]\n** entries, shift down.  The end result is that each ixNx[] entry should\n** be larger than the previous\n*/\ntypedef struct CellArray CellArray;\nstruct CellArray {\n  int nCell;              /* Number of cells in apCell[] */\n  MemPage *pRef;          /* Reference page */\n  u8 **apCell;            /* All cells begin balanced */\n  u16 *szCell;            /* Local size of all cells in apCell[] */\n  u8 *apEnd[NB*2];        /* MemPage.aDataEnd values */\n  int ixNx[NB*2];         /* Index of at which we move to the next apEnd[] */\n};\n\n/*\n** Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been\n** computed.\n*/\nstatic void populateCellCache(CellArray *p, int idx, int N){\n  MemPage *pRef = p->pRef;\n  u16 *szCell = p->szCell;\n  assert( idx>=0 && idx+N<=p->nCell );\n  while( N>0 ){\n    assert( p->apCell[idx]!=0 );\n    if( szCell[idx]==0 ){\n      szCell[idx] = pRef->xCellSize(pRef, p->apCell[idx]);\n    }else{\n      assert( CORRUPT_DB ||\n              szCell[idx]==pRef->xCellSize(pRef, p->apCell[idx]) );\n    }\n    idx++;\n    N--;\n  }\n}\n\n/*\n** Return the size of the Nth element of the cell array\n*/\nstatic SQLITE_NOINLINE u16 computeCellSize(CellArray *p, int N){\n  assert( N>=0 && N<p->nCell );\n  assert( p->szCell[N]==0 );\n  p->szCell[N] = p->pRef->xCellSize(p->pRef, p->apCell[N]);\n  return p->szCell[N];\n}\nstatic u16 cachedCellSize(CellArray *p, int N){\n  assert( N>=0 && N<p->nCell );\n  if( p->szCell[N] ) return p->szCell[N];\n  return computeCellSize(p, N);\n}\n\n/*\n** Array apCell[] contains pointers to nCell b-tree page cells. The\n** szCell[] array contains the size in bytes of each cell. This function\n** replaces the current contents of page pPg with the contents of the cell\n** array.\n**\n** Some of the cells in apCell[] may currently be stored in pPg. This\n** function works around problems caused by this by making a copy of any\n** such cells before overwriting the page data.\n**\n** The MemPage.nFree field is invalidated by this function. It is the\n** responsibility of the caller to set it correctly.\n*/\nstatic int rebuildPage(\n  CellArray *pCArray,             /* Content to be added to page pPg */\n  int iFirst,                     /* First cell in pCArray to use */\n  int nCell,                      /* Final number of cells on page */\n  MemPage *pPg                    /* The page to be reconstructed */\n){\n  const int hdr = pPg->hdrOffset;          /* Offset of header on pPg */\n  u8 * const aData = pPg->aData;           /* Pointer to data for pPg */\n  const int usableSize = pPg->pBt->usableSize;\n  u8 * const pEnd = &aData[usableSize];\n  int i = iFirst;                 /* Which cell to copy from pCArray*/\n  u32 j;                          /* Start of cell content area */\n  int iEnd = i+nCell;             /* Loop terminator */\n  u8 *pCellptr = pPg->aCellIdx;\n  u8 *pTmp = sqlite3PagerTempSpace(pPg->pBt->pPager);\n  u8 *pData;\n  int k;                          /* Current slot in pCArray->apEnd[] */\n  u8 *pSrcEnd;                    /* Current pCArray->apEnd[k] value */\n\n  assert( nCell>0 );\n  assert( i<iEnd );\n  j = get2byte(&aData[hdr+5]);\n  if( j>(u32)usableSize ){ j = 0; }\n  memcpy(&pTmp[j], &aData[j], usableSize - j);\n\n  assert( pCArray->ixNx[NB*2-1]>i );\n  for(k=0; pCArray->ixNx[k]<=i; k++){}\n  pSrcEnd = pCArray->apEnd[k];\n\n  pData = pEnd;\n  while( 1/*exit by break*/ ){\n    u8 *pCell = pCArray->apCell[i];\n    u16 sz = pCArray->szCell[i];\n    assert( sz>0 );\n    if( SQLITE_WITHIN(pCell,aData+j,pEnd) ){\n      if( ((uptr)(pCell+sz))>(uptr)pEnd ) return SQLITE_CORRUPT_BKPT;\n      pCell = &pTmp[pCell - aData];\n    }else if( (uptr)(pCell+sz)>(uptr)pSrcEnd\n           && (uptr)(pCell)<(uptr)pSrcEnd\n    ){\n      return SQLITE_CORRUPT_BKPT;\n    }\n\n    pData -= sz;\n    put2byte(pCellptr, (pData - aData));\n    pCellptr += 2;\n    if( pData < pCellptr ) return SQLITE_CORRUPT_BKPT;\n    memmove(pData, pCell, sz);\n    assert( sz==pPg->xCellSize(pPg, pCell) || CORRUPT_DB );\n    i++;\n    if( i>=iEnd ) break;\n    if( pCArray->ixNx[k]<=i ){\n      k++;\n      pSrcEnd = pCArray->apEnd[k];\n    }\n  }\n\n  /* The pPg->nFree field is now set incorrectly. The caller will fix it. */\n  assert( nCell < 10922 );\n  pPg->nCell = (u16)nCell;\n  pPg->nOverflow = 0;\n\n  put2byte(&aData[hdr+1], 0);\n  put2byte(&aData[hdr+3], pPg->nCell);\n  put2byte(&aData[hdr+5], pData - aData);\n  aData[hdr+7] = 0x00;\n  return SQLITE_OK;\n}\n\n/*\n** The pCArray objects contains pointers to b-tree cells and the cell sizes.\n** This function attempts to add the cells stored in the array to page pPg.\n** If it cannot (because the page needs to be defragmented before the cells\n** will fit), non-zero is returned. Otherwise, if the cells are added\n** successfully, zero is returned.\n**\n** Argument pCellptr points to the first entry in the cell-pointer array\n** (part of page pPg) to populate. After cell apCell[0] is written to the\n** page body, a 16-bit offset is written to pCellptr. And so on, for each\n** cell in the array. It is the responsibility of the caller to ensure\n** that it is safe to overwrite this part of the cell-pointer array.\n**\n** When this function is called, *ppData points to the start of the\n** content area on page pPg. If the size of the content area is extended,\n** *ppData is updated to point to the new start of the content area\n** before returning.\n**\n** Finally, argument pBegin points to the byte immediately following the\n** end of the space required by this page for the cell-pointer area (for\n** all cells - not just those inserted by the current call). If the content\n** area must be extended to before this point in order to accommodate all\n** cells in apCell[], then the cells do not fit and non-zero is returned.\n*/\nstatic int pageInsertArray(\n  MemPage *pPg,                   /* Page to add cells to */\n  u8 *pBegin,                     /* End of cell-pointer array */\n  u8 **ppData,                    /* IN/OUT: Page content-area pointer */\n  u8 *pCellptr,                   /* Pointer to cell-pointer area */\n  int iFirst,                     /* Index of first cell to add */\n  int nCell,                      /* Number of cells to add to pPg */\n  CellArray *pCArray              /* Array of cells */\n){\n  int i = iFirst;                 /* Loop counter - cell index to insert */\n  u8 *aData = pPg->aData;         /* Complete page */\n  u8 *pData = *ppData;            /* Content area.  A subset of aData[] */\n  int iEnd = iFirst + nCell;      /* End of loop. One past last cell to ins */\n  int k;                          /* Current slot in pCArray->apEnd[] */\n  u8 *pEnd;                       /* Maximum extent of cell data */\n  assert( CORRUPT_DB || pPg->hdrOffset==0 );    /* Never called on page 1 */\n  if( iEnd<=iFirst ) return 0;\n  assert( pCArray->ixNx[NB*2-1]>i );\n  for(k=0; pCArray->ixNx[k]<=i ; k++){}\n  pEnd = pCArray->apEnd[k];\n  while( 1 /*Exit by break*/ ){\n    int sz, rc;\n    u8 *pSlot;\n    assert( pCArray->szCell[i]!=0 );\n    sz = pCArray->szCell[i];\n    if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){\n      if( (pData - pBegin)<sz ) return 1;\n      pData -= sz;\n      pSlot = pData;\n    }\n    /* pSlot and pCArray->apCell[i] will never overlap on a well-formed\n    ** database.  But they might for a corrupt database.  Hence use memmove()\n    ** since memcpy() sends SIGABORT with overlapping buffers on OpenBSD */\n    assert( (pSlot+sz)<=pCArray->apCell[i]\n         || pSlot>=(pCArray->apCell[i]+sz)\n         || CORRUPT_DB );\n    if( (uptr)(pCArray->apCell[i]+sz)>(uptr)pEnd\n     && (uptr)(pCArray->apCell[i])<(uptr)pEnd\n    ){\n      assert( CORRUPT_DB );\n      (void)SQLITE_CORRUPT_BKPT;\n      return 1;\n    }\n    memmove(pSlot, pCArray->apCell[i], sz);\n    put2byte(pCellptr, (pSlot - aData));\n    pCellptr += 2;\n    i++;\n    if( i>=iEnd ) break;\n    if( pCArray->ixNx[k]<=i ){\n      k++;\n      pEnd = pCArray->apEnd[k];\n    }\n  }\n  *ppData = pData;\n  return 0;\n}\n\n/*\n** The pCArray object contains pointers to b-tree cells and their sizes.\n**\n** This function adds the space associated with each cell in the array\n** that is currently stored within the body of pPg to the pPg free-list.\n** The cell-pointers and other fields of the page are not updated.\n**\n** This function returns the total number of cells added to the free-list.\n*/\nstatic int pageFreeArray(\n  MemPage *pPg,                   /* Page to edit */\n  int iFirst,                     /* First cell to delete */\n  int nCell,                      /* Cells to delete */\n  CellArray *pCArray              /* Array of cells */\n){\n  u8 * const aData = pPg->aData;\n  u8 * const pEnd = &aData[pPg->pBt->usableSize];\n  u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];\n  int nRet = 0;\n  int i, j;\n  int iEnd = iFirst + nCell;\n  int nFree = 0;\n  int aOfst[10];\n  int aAfter[10];\n\n  for(i=iFirst; i<iEnd; i++){\n    u8 *pCell = pCArray->apCell[i];\n    if( SQLITE_WITHIN(pCell, pStart, pEnd) ){\n      int sz;\n      int iAfter;\n      int iOfst;\n      /* No need to use cachedCellSize() here.  The sizes of all cells that\n      ** are to be freed have already been computing while deciding which\n      ** cells need freeing */\n      sz = pCArray->szCell[i];  assert( sz>0 );\n      iOfst = (u16)(pCell - aData);\n      iAfter = iOfst+sz;\n      for(j=0; j<nFree; j++){\n        if( aOfst[j]==iAfter ){\n          aOfst[j] = iOfst;\n          break;\n        }else if( aAfter[j]==iOfst ){\n          aAfter[j] = iAfter;\n          break;\n        }\n      }\n      if( j>=nFree ){\n        if( nFree>=(int)(sizeof(aOfst)/sizeof(aOfst[0])) ){\n          for(j=0; j<nFree; j++){\n            freeSpace(pPg, aOfst[j], aAfter[j]-aOfst[j]);\n          }\n          nFree = 0;\n        }\n        aOfst[nFree] = iOfst;\n        aAfter[nFree] = iAfter;\n        if( &aData[iAfter]>pEnd ) return 0;\n        nFree++;\n      }\n      nRet++;\n    }\n  }\n  for(j=0; j<nFree; j++){\n    freeSpace(pPg, aOfst[j], aAfter[j]-aOfst[j]);\n  }\n  return nRet;\n}\n\n/*\n** pCArray contains pointers to and sizes of all cells in the page being\n** balanced.  The current page, pPg, has pPg->nCell cells starting with\n** pCArray->apCell[iOld].  After balancing, this page should hold nNew cells\n** starting at apCell[iNew].\n**\n** This routine makes the necessary adjustments to pPg so that it contains\n** the correct cells after being balanced.\n**\n** The pPg->nFree field is invalid when this function returns. It is the\n** responsibility of the caller to set it correctly.\n*/\nstatic int editPage(\n  MemPage *pPg,                   /* Edit this page */\n  int iOld,                       /* Index of first cell currently on page */\n  int iNew,                       /* Index of new first cell on page */\n  int nNew,                       /* Final number of cells on page */\n  CellArray *pCArray              /* Array of cells and sizes */\n){\n  u8 * const aData = pPg->aData;\n  const int hdr = pPg->hdrOffset;\n  u8 *pBegin = &pPg->aCellIdx[nNew * 2];\n  int nCell = pPg->nCell;       /* Cells stored on pPg */\n  u8 *pData;\n  u8 *pCellptr;\n  int i;\n  int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;\n  int iNewEnd = iNew + nNew;\n\n#ifdef SQLITE_DEBUG\n  u8 *pTmp = sqlite3PagerTempSpace(pPg->pBt->pPager);\n  memcpy(pTmp, aData, pPg->pBt->usableSize);\n#endif\n\n  /* Remove cells from the start and end of the page */\n  assert( nCell>=0 );\n  if( iOld<iNew ){\n    int nShift = pageFreeArray(pPg, iOld, iNew-iOld, pCArray);\n    if( NEVER(nShift>nCell) ) return SQLITE_CORRUPT_BKPT;\n    memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);\n    nCell -= nShift;\n  }\n  if( iNewEnd < iOldEnd ){\n    int nTail = pageFreeArray(pPg, iNewEnd, iOldEnd - iNewEnd, pCArray);\n    assert( nCell>=nTail );\n    nCell -= nTail;\n  }\n\n  pData = &aData[get2byte(&aData[hdr+5])];\n  if( pData<pBegin ) goto editpage_fail;\n  if( NEVER(pData>pPg->aDataEnd) ) goto editpage_fail;\n\n  /* Add cells to the start of the page */\n  if( iNew<iOld ){\n    int nAdd = MIN(nNew,iOld-iNew);\n    assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );\n    assert( nAdd>=0 );\n    pCellptr = pPg->aCellIdx;\n    memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);\n    if( pageInsertArray(\n          pPg, pBegin, &pData, pCellptr,\n          iNew, nAdd, pCArray\n    ) ) goto editpage_fail;\n    nCell += nAdd;\n  }\n\n  /* Add any overflow cells */\n  for(i=0; i<pPg->nOverflow; i++){\n    int iCell = (iOld + pPg->aiOvfl[i]) - iNew;\n    if( iCell>=0 && iCell<nNew ){\n      pCellptr = &pPg->aCellIdx[iCell * 2];\n      if( nCell>iCell ){\n        memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);\n      }\n      nCell++;\n      cachedCellSize(pCArray, iCell+iNew);\n      if( pageInsertArray(\n            pPg, pBegin, &pData, pCellptr,\n            iCell+iNew, 1, pCArray\n      ) ) goto editpage_fail;\n    }\n  }\n\n  /* Append cells to the end of the page */\n  assert( nCell>=0 );\n  pCellptr = &pPg->aCellIdx[nCell*2];\n  if( pageInsertArray(\n        pPg, pBegin, &pData, pCellptr,\n        iNew+nCell, nNew-nCell, pCArray\n      )\n  ){\n    goto editpage_fail;\n  }\n\n  assert( nNew < 10922 );\n  pPg->nCell = (u16)nNew;\n  pPg->nOverflow = 0;\n\n  put2byte(&aData[hdr+3], pPg->nCell);\n  put2byte(&aData[hdr+5], pData - aData);\n\n#ifdef SQLITE_DEBUG\n  for(i=0; i<nNew && !CORRUPT_DB; i++){\n    u8 *pCell = pCArray->apCell[i+iNew];\n    int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);\n    if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){\n      pCell = &pTmp[pCell - aData];\n    }\n    assert( 0==memcmp(pCell, &aData[iOff],\n            pCArray->pRef->xCellSize(pCArray->pRef, pCArray->apCell[i+iNew])) );\n  }\n#endif\n\n  return SQLITE_OK;\n editpage_fail:\n  /* Unable to edit this page. Rebuild it from scratch instead. */\n  if( nNew<1 ) return SQLITE_CORRUPT_BKPT;\n  populateCellCache(pCArray, iNew, nNew);\n  return rebuildPage(pCArray, iNew, nNew, pPg);\n}\n\n\n#ifndef SQLITE_OMIT_QUICKBALANCE\n/*\n** This version of balance() handles the common special case where\n** a new entry is being inserted on the extreme right-end of the\n** tree, in other words, when the new entry will become the largest\n** entry in the tree.\n**\n** Instead of trying to balance the 3 right-most leaf pages, just add\n** a new page to the right-hand side and put the one new entry in\n** that page.  This leaves the right side of the tree somewhat\n** unbalanced.  But odds are that we will be inserting new entries\n** at the end soon afterwards so the nearly empty page will quickly\n** fill up.  On average.\n**\n** pPage is the leaf page which is the right-most page in the tree.\n** pParent is its parent.  pPage must have a single overflow entry\n** which is also the right-most entry on the page.\n**\n** The pSpace buffer is used to store a temporary copy of the divider\n** cell that will be inserted into pParent. Such a cell consists of a 4\n** byte page number followed by a variable length integer. In other\n** words, at most 13 bytes. Hence the pSpace buffer must be at\n** least 13 bytes in size.\n*/\nstatic int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){\n  BtShared *const pBt = pPage->pBt;    /* B-Tree Database */\n  MemPage *pNew;                       /* Newly allocated page */\n  int rc;                              /* Return Code */\n  Pgno pgnoNew;                        /* Page number of pNew */\n\n  assert( sqlite3_mutex_held(pPage->pBt->mutex) );\n  assert( sqlite3PagerIswriteable(pParent->pDbPage) );\n  assert( pPage->nOverflow==1 );\n\n  if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT;  /* dbfuzz001.test */\n  assert( pPage->nFree>=0 );\n  assert( pParent->nFree>=0 );\n\n  /* Allocate a new page. This page will become the right-sibling of\n  ** pPage. Make the parent page writable, so that the new divider cell\n  ** may be inserted. If both these operations are successful, proceed.\n  */\n  rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);\n\n  if( rc==SQLITE_OK ){\n\n    u8 *pOut = &pSpace[4];\n    u8 *pCell = pPage->apOvfl[0];\n    u16 szCell = pPage->xCellSize(pPage, pCell);\n    u8 *pStop;\n    CellArray b;\n\n    assert( sqlite3PagerIswriteable(pNew->pDbPage) );\n    assert( CORRUPT_DB || pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );\n    zeroPage(pNew, PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF);\n    b.nCell = 1;\n    b.pRef = pPage;\n    b.apCell = &pCell;\n    b.szCell = &szCell;\n    b.apEnd[0] = pPage->aDataEnd;\n    b.ixNx[0] = 2;\n    b.ixNx[NB*2-1] = 0x7fffffff;\n    rc = rebuildPage(&b, 0, 1, pNew);\n    if( NEVER(rc) ){\n      releasePage(pNew);\n      return rc;\n    }\n    pNew->nFree = pBt->usableSize - pNew->cellOffset - 2 - szCell;\n\n    /* If this is an auto-vacuum database, update the pointer map\n    ** with entries for the new page, and any pointer from the\n    ** cell on the page to an overflow page. If either of these\n    ** operations fails, the return code is set, but the contents\n    ** of the parent page are still manipulated by the code below.\n    ** That is Ok, at this point the parent page is guaranteed to\n    ** be marked as dirty. Returning an error code will cause a\n    ** rollback, undoing any changes made to the parent page.\n    */\n    if( ISAUTOVACUUM(pBt) ){\n      ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);\n      if( szCell>pNew->minLocal ){\n        ptrmapPutOvflPtr(pNew, pNew, pCell, &rc);\n      }\n    }\n\n    /* Create a divider cell to insert into pParent. The divider cell\n    ** consists of a 4-byte page number (the page number of pPage) and\n    ** a variable length key value (which must be the same value as the\n    ** largest key on pPage).\n    **\n    ** To find the largest key value on pPage, first find the right-most\n    ** cell on pPage. The first two fields of this cell are the\n    ** record-length (a variable length integer at most 32-bits in size)\n    ** and the key value (a variable length integer, may have any value).\n    ** The first of the while(...) loops below skips over the record-length\n    ** field. The second while(...) loop copies the key value from the\n    ** cell on pPage into the pSpace buffer.\n    */\n    pCell = findCell(pPage, pPage->nCell-1);\n    pStop = &pCell[9];\n    while( (*(pCell++)&0x80) && pCell<pStop );\n    pStop = &pCell[9];\n    while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );\n\n    /* Insert the new divider cell into pParent. */\n    if( rc==SQLITE_OK ){\n      rc = insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),\n                      0, pPage->pgno);\n    }\n\n    /* Set the right-child pointer of pParent to point to the new page. */\n    put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);\n\n    /* Release the reference to the new page. */\n    releasePage(pNew);\n  }\n\n  return rc;\n}\n#endif /* SQLITE_OMIT_QUICKBALANCE */\n\n#if 0\n/*\n** This function does not contribute anything to the operation of SQLite.\n** it is sometimes activated temporarily while debugging code responsible\n** for setting pointer-map entries.\n*/\nstatic int ptrmapCheckPages(MemPage **apPage, int nPage){\n  int i, j;\n  for(i=0; i<nPage; i++){\n    Pgno n;\n    u8 e;\n    MemPage *pPage = apPage[i];\n    BtShared *pBt = pPage->pBt;\n    assert( pPage->isInit );\n\n    for(j=0; j<pPage->nCell; j++){\n      CellInfo info;\n      u8 *z;\n\n      z = findCell(pPage, j);\n      pPage->xParseCell(pPage, z, &info);\n      if( info.nLocal<info.nPayload ){\n        Pgno ovfl = get4byte(&z[info.nSize-4]);\n        ptrmapGet(pBt, ovfl, &e, &n);\n        assert( n==pPage->pgno && e==PTRMAP_OVERFLOW1 );\n      }\n      if( !pPage->leaf ){\n        Pgno child = get4byte(z);\n        ptrmapGet(pBt, child, &e, &n);\n        assert( n==pPage->pgno && e==PTRMAP_BTREE );\n      }\n    }\n    if( !pPage->leaf ){\n      Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);\n      ptrmapGet(pBt, child, &e, &n);\n      assert( n==pPage->pgno && e==PTRMAP_BTREE );\n    }\n  }\n  return 1;\n}\n#endif\n\n/*\n** This function is used to copy the contents of the b-tree node stored\n** on page pFrom to page pTo. If page pFrom was not a leaf page, then\n** the pointer-map entries for each child page are updated so that the\n** parent page stored in the pointer map is page pTo. If pFrom contained\n** any cells with overflow page pointers, then the corresponding pointer\n** map entries are also updated so that the parent page is page pTo.\n**\n** If pFrom is currently carrying any overflow cells (entries in the\n** MemPage.apOvfl[] array), they are not copied to pTo.\n**\n** Before returning, page pTo is reinitialized using btreeInitPage().\n**\n** The performance of this function is not critical. It is only used by\n** the balance_shallower() and balance_deeper() procedures, neither of\n** which are called often under normal circumstances.\n*/\nstatic void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){\n  if( (*pRC)==SQLITE_OK ){\n    BtShared * const pBt = pFrom->pBt;\n    u8 * const aFrom = pFrom->aData;\n    u8 * const aTo = pTo->aData;\n    int const iFromHdr = pFrom->hdrOffset;\n    int const iToHdr = ((pTo->pgno==1) ? 100 : 0);\n    int rc;\n    int iData;\n\n\n    assert( pFrom->isInit );\n    assert( pFrom->nFree>=iToHdr );\n    assert( get2byte(&aFrom[iFromHdr+5]) <= (int)pBt->usableSize );\n\n    /* Copy the b-tree node content from page pFrom to page pTo. */\n    iData = get2byte(&aFrom[iFromHdr+5]);\n    memcpy(&aTo[iData], &aFrom[iData], pBt->usableSize-iData);\n    memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);\n\n    /* Reinitialize page pTo so that the contents of the MemPage structure\n    ** match the new data. The initialization of pTo can actually fail under\n    ** fairly obscure circumstances, even though it is a copy of initialized\n    ** page pFrom.\n    */\n    pTo->isInit = 0;\n    rc = btreeInitPage(pTo);\n    if( rc==SQLITE_OK ) rc = btreeComputeFreeSpace(pTo);\n    if( rc!=SQLITE_OK ){\n      *pRC = rc;\n      return;\n    }\n\n    /* If this is an auto-vacuum database, update the pointer-map entries\n    ** for any b-tree or overflow pages that pTo now contains the pointers to.\n    */\n    if( ISAUTOVACUUM(pBt) ){\n      *pRC = setChildPtrmaps(pTo);\n    }\n  }\n}\n\n/*\n** This routine redistributes cells on the iParentIdx'th child of pParent\n** (hereafter \"the page\") and up to 2 siblings so that all pages have about the\n** same amount of free space. Usually a single sibling on either side of the\n** page are used in the balancing, though both siblings might come from one\n** side if the page is the first or last child of its parent. If the page\n** has fewer than 2 siblings (something which can only happen if the page\n** is a root page or a child of a root page) then all available siblings\n** participate in the balancing.\n**\n** The number of siblings of the page might be increased or decreased by\n** one or two in an effort to keep pages nearly full but not over full.\n**\n** Note that when this routine is called, some of the cells on the page\n** might not actually be stored in MemPage.aData[]. This can happen\n** if the page is overfull. This routine ensures that all cells allocated\n** to the page and its siblings fit into MemPage.aData[] before returning.\n**\n** In the course of balancing the page and its siblings, cells may be\n** inserted into or removed from the parent page (pParent). Doing so\n** may cause the parent page to become overfull or underfull. If this\n** happens, it is the responsibility of the caller to invoke the correct\n** balancing routine to fix this problem (see the balance() routine).\n**\n** If this routine fails for any reason, it might leave the database\n** in a corrupted state. So if this routine fails, the database should\n** be rolled back.\n**\n** The third argument to this function, aOvflSpace, is a pointer to a\n** buffer big enough to hold one page. If while inserting cells into the parent\n** page (pParent) the parent page becomes overfull, this buffer is\n** used to store the parent's overflow cells. Because this function inserts\n** a maximum of four divider cells into the parent page, and the maximum\n** size of a cell stored within an internal node is always less than 1/4\n** of the page-size, the aOvflSpace[] buffer is guaranteed to be large\n** enough for all overflow cells.\n**\n** If aOvflSpace is set to a null pointer, this function returns\n** SQLITE_NOMEM.\n*/\nstatic int balance_nonroot(\n  MemPage *pParent,               /* Parent page of siblings being balanced */\n  int iParentIdx,                 /* Index of \"the page\" in pParent */\n  u8 *aOvflSpace,                 /* page-size bytes of space for parent ovfl */\n  int isRoot,                     /* True if pParent is a root-page */\n  int bBulk                       /* True if this call is part of a bulk load */\n){\n  BtShared *pBt;               /* The whole database */\n  int nMaxCells = 0;           /* Allocated size of apCell, szCell, aFrom. */\n  int nNew = 0;                /* Number of pages in apNew[] */\n  int nOld;                    /* Number of pages in apOld[] */\n  int i, j, k;                 /* Loop counters */\n  int nxDiv;                   /* Next divider slot in pParent->aCell[] */\n  int rc = SQLITE_OK;          /* The return code */\n  u16 leafCorrection;          /* 4 if pPage is a leaf.  0 if not */\n  int leafData;                /* True if pPage is a leaf of a LEAFDATA tree */\n  int usableSpace;             /* Bytes in pPage beyond the header */\n  int pageFlags;               /* Value of pPage->aData[0] */\n  int iSpace1 = 0;             /* First unused byte of aSpace1[] */\n  int iOvflSpace = 0;          /* First unused byte of aOvflSpace[] */\n  u64 szScratch;               /* Size of scratch memory requested */\n  MemPage *apOld[NB];          /* pPage and up to two siblings */\n  MemPage *apNew[NB+2];        /* pPage and up to NB siblings after balancing */\n  u8 *pRight;                  /* Location in parent of right-sibling pointer */\n  u8 *apDiv[NB-1];             /* Divider cells in pParent */\n  int cntNew[NB+2];            /* Index in b.paCell[] of cell after i-th page */\n  int cntOld[NB+2];            /* Old index in b.apCell[] */\n  int szNew[NB+2];             /* Combined size of cells placed on i-th page */\n  u8 *aSpace1;                 /* Space for copies of dividers cells */\n  Pgno pgno;                   /* Temp var to store a page number in */\n  u8 abDone[NB+2];             /* True after i'th new page is populated */\n  Pgno aPgno[NB+2];            /* Page numbers of new pages before shuffling */\n  CellArray b;                 /* Parsed information on cells being balanced */\n\n  memset(abDone, 0, sizeof(abDone));\n  assert( sizeof(b) - sizeof(b.ixNx) == offsetof(CellArray,ixNx) );\n  memset(&b, 0, sizeof(b)-sizeof(b.ixNx[0]));\n  b.ixNx[NB*2-1] = 0x7fffffff;\n  pBt = pParent->pBt;\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  assert( sqlite3PagerIswriteable(pParent->pDbPage) );\n\n  /* At this point pParent may have at most one overflow cell. And if\n  ** this overflow cell is present, it must be the cell with\n  ** index iParentIdx. This scenario comes about when this function\n  ** is called (indirectly) from sqlite3BtreeDelete().\n  */\n  assert( pParent->nOverflow==0 || pParent->nOverflow==1 );\n  assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );\n\n  if( !aOvflSpace ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  assert( pParent->nFree>=0 );\n\n  /* Find the sibling pages to balance. Also locate the cells in pParent\n  ** that divide the siblings. An attempt is made to find NN siblings on\n  ** either side of pPage. More siblings are taken from one side, however,\n  ** if there are fewer than NN siblings on the other side. If pParent\n  ** has NB or fewer children then all children of pParent are taken.\n  **\n  ** This loop also drops the divider cells from the parent page. This\n  ** way, the remainder of the function does not have to deal with any\n  ** overflow cells in the parent page, since if any existed they will\n  ** have already been removed.\n  */\n  i = pParent->nOverflow + pParent->nCell;\n  if( i<2 ){\n    nxDiv = 0;\n  }else{\n    assert( bBulk==0 || bBulk==1 );\n    if( iParentIdx==0 ){\n      nxDiv = 0;\n    }else if( iParentIdx==i ){\n      nxDiv = i-2+bBulk;\n    }else{\n      nxDiv = iParentIdx-1;\n    }\n    i = 2-bBulk;\n  }\n  nOld = i+1;\n  if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){\n    pRight = &pParent->aData[pParent->hdrOffset+8];\n  }else{\n    pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);\n  }\n  pgno = get4byte(pRight);\n  while( 1 ){\n    if( rc==SQLITE_OK ){\n      rc = getAndInitPage(pBt, pgno, &apOld[i], 0);\n    }\n    if( rc ){\n      memset(apOld, 0, (i+1)*sizeof(MemPage*));\n      goto balance_cleanup;\n    }\n    if( apOld[i]->nFree<0 ){\n      rc = btreeComputeFreeSpace(apOld[i]);\n      if( rc ){\n        memset(apOld, 0, (i)*sizeof(MemPage*));\n        goto balance_cleanup;\n      }\n    }\n    nMaxCells += apOld[i]->nCell + ArraySize(pParent->apOvfl);\n    if( (i--)==0 ) break;\n\n    if( pParent->nOverflow && i+nxDiv==pParent->aiOvfl[0] ){\n      apDiv[i] = pParent->apOvfl[0];\n      pgno = get4byte(apDiv[i]);\n      szNew[i] = pParent->xCellSize(pParent, apDiv[i]);\n      pParent->nOverflow = 0;\n    }else{\n      apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);\n      pgno = get4byte(apDiv[i]);\n      szNew[i] = pParent->xCellSize(pParent, apDiv[i]);\n\n      /* Drop the cell from the parent page. apDiv[i] still points to\n      ** the cell within the parent, even though it has been dropped.\n      ** This is safe because dropping a cell only overwrites the first\n      ** four bytes of it, and this function does not need the first\n      ** four bytes of the divider cell. So the pointer is safe to use\n      ** later on.\n      **\n      ** But not if we are in secure-delete mode. In secure-delete mode,\n      ** the dropCell() routine will overwrite the entire cell with zeroes.\n      ** In this case, temporarily copy the cell into the aOvflSpace[]\n      ** buffer. It will be copied out again as soon as the aSpace[] buffer\n      ** is allocated.  */\n      if( pBt->btsFlags & BTS_FAST_SECURE ){\n        int iOff;\n\n        /* If the following if() condition is not true, the db is corrupted.\n        ** The call to dropCell() below will detect this.  */\n        iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);\n        if( (iOff+szNew[i])<=(int)pBt->usableSize ){\n          memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);\n          apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];\n        }\n      }\n      dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);\n    }\n  }\n\n  /* Make nMaxCells a multiple of 4 in order to preserve 8-byte\n  ** alignment */\n  nMaxCells = (nMaxCells + 3)&~3;\n\n  /*\n  ** Allocate space for memory structures\n  */\n  szScratch =\n       nMaxCells*sizeof(u8*)                       /* b.apCell */\n     + nMaxCells*sizeof(u16)                       /* b.szCell */\n     + pBt->pageSize;                              /* aSpace1 */\n\n  assert( szScratch<=7*(int)pBt->pageSize );\n  b.apCell = sqlite3StackAllocRaw(0, szScratch );\n  if( b.apCell==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto balance_cleanup;\n  }\n  b.szCell = (u16*)&b.apCell[nMaxCells];\n  aSpace1 = (u8*)&b.szCell[nMaxCells];\n  assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );\n\n  /*\n  ** Load pointers to all cells on sibling pages and the divider cells\n  ** into the local b.apCell[] array.  Make copies of the divider cells\n  ** into space obtained from aSpace1[]. The divider cells have already\n  ** been removed from pParent.\n  **\n  ** If the siblings are on leaf pages, then the child pointers of the\n  ** divider cells are stripped from the cells before they are copied\n  ** into aSpace1[].  In this way, all cells in b.apCell[] are without\n  ** child pointers.  If siblings are not leaves, then all cell in\n  ** b.apCell[] include child pointers.  Either way, all cells in b.apCell[]\n  ** are alike.\n  **\n  ** leafCorrection:  4 if pPage is a leaf.  0 if pPage is not a leaf.\n  **       leafData:  1 if pPage holds key+data and pParent holds only keys.\n  */\n  b.pRef = apOld[0];\n  leafCorrection = b.pRef->leaf*4;\n  leafData = b.pRef->intKeyLeaf;\n  for(i=0; i<nOld; i++){\n    MemPage *pOld = apOld[i];\n    int limit = pOld->nCell;\n    u8 *aData = pOld->aData;\n    u16 maskPage = pOld->maskPage;\n    u8 *piCell = aData + pOld->cellOffset;\n    u8 *piEnd;\n    VVA_ONLY( int nCellAtStart = b.nCell; )\n\n    /* Verify that all sibling pages are of the same \"type\" (table-leaf,\n    ** table-interior, index-leaf, or index-interior).\n    */\n    if( pOld->aData[0]!=apOld[0]->aData[0] ){\n      rc = SQLITE_CORRUPT_PAGE(pOld);\n      goto balance_cleanup;\n    }\n\n    /* Load b.apCell[] with pointers to all cells in pOld.  If pOld\n    ** contains overflow cells, include them in the b.apCell[] array\n    ** in the correct spot.\n    **\n    ** Note that when there are multiple overflow cells, it is always the\n    ** case that they are sequential and adjacent.  This invariant arises\n    ** because multiple overflows can only occurs when inserting divider\n    ** cells into a parent on a prior balance, and divider cells are always\n    ** adjacent and are inserted in order.  There is an assert() tagged\n    ** with \"NOTE 1\" in the overflow cell insertion loop to prove this\n    ** invariant.\n    **\n    ** This must be done in advance.  Once the balance starts, the cell\n    ** offset section of the btree page will be overwritten and we will no\n    ** long be able to find the cells if a pointer to each cell is not saved\n    ** first.\n    */\n    memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));\n    if( pOld->nOverflow>0 ){\n      if( NEVER(limit<pOld->aiOvfl[0]) ){\n        rc = SQLITE_CORRUPT_PAGE(pOld);\n        goto balance_cleanup;\n      }\n      limit = pOld->aiOvfl[0];\n      for(j=0; j<limit; j++){\n        b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));\n        piCell += 2;\n        b.nCell++;\n      }\n      for(k=0; k<pOld->nOverflow; k++){\n        assert( k==0 || pOld->aiOvfl[k-1]+1==pOld->aiOvfl[k] );/* NOTE 1 */\n        b.apCell[b.nCell] = pOld->apOvfl[k];\n        b.nCell++;\n      }\n    }\n    piEnd = aData + pOld->cellOffset + 2*pOld->nCell;\n    while( piCell<piEnd ){\n      assert( b.nCell<nMaxCells );\n      b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));\n      piCell += 2;\n      b.nCell++;\n    }\n    assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );\n\n    cntOld[i] = b.nCell;\n    if( i<nOld-1 && !leafData){\n      u16 sz = (u16)szNew[i];\n      u8 *pTemp;\n      assert( b.nCell<nMaxCells );\n      b.szCell[b.nCell] = sz;\n      pTemp = &aSpace1[iSpace1];\n      iSpace1 += sz;\n      assert( sz<=pBt->maxLocal+23 );\n      assert( iSpace1 <= (int)pBt->pageSize );\n      memcpy(pTemp, apDiv[i], sz);\n      b.apCell[b.nCell] = pTemp+leafCorrection;\n      assert( leafCorrection==0 || leafCorrection==4 );\n      b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;\n      if( !pOld->leaf ){\n        assert( leafCorrection==0 );\n        assert( pOld->hdrOffset==0 || CORRUPT_DB );\n        /* The right pointer of the child page pOld becomes the left\n        ** pointer of the divider cell */\n        memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);\n      }else{\n        assert( leafCorrection==4 );\n        while( b.szCell[b.nCell]<4 ){\n          /* Do not allow any cells smaller than 4 bytes. If a smaller cell\n          ** does exist, pad it with 0x00 bytes. */\n          assert( b.szCell[b.nCell]==3 || CORRUPT_DB );\n          assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );\n          aSpace1[iSpace1++] = 0x00;\n          b.szCell[b.nCell]++;\n        }\n      }\n      b.nCell++;\n    }\n  }\n\n  /*\n  ** Figure out the number of pages needed to hold all b.nCell cells.\n  ** Store this number in \"k\".  Also compute szNew[] which is the total\n  ** size of all cells on the i-th page and cntNew[] which is the index\n  ** in b.apCell[] of the cell that divides page i from page i+1.\n  ** cntNew[k] should equal b.nCell.\n  **\n  ** Values computed by this block:\n  **\n  **           k: The total number of sibling pages\n  **    szNew[i]: Spaced used on the i-th sibling page.\n  **   cntNew[i]: Index in b.apCell[] and b.szCell[] for the first cell to\n  **              the right of the i-th sibling page.\n  ** usableSpace: Number of bytes of space available on each sibling.\n  **\n  */\n  usableSpace = pBt->usableSize - 12 + leafCorrection;\n  for(i=k=0; i<nOld; i++, k++){\n    MemPage *p = apOld[i];\n    b.apEnd[k] = p->aDataEnd;\n    b.ixNx[k] = cntOld[i];\n    if( k && b.ixNx[k]==b.ixNx[k-1] ){\n      k--;  /* Omit b.ixNx[] entry for child pages with no cells */\n    }\n    if( !leafData ){\n      k++;\n      b.apEnd[k] = pParent->aDataEnd;\n      b.ixNx[k] = cntOld[i]+1;\n    }\n    assert( p->nFree>=0 );\n    szNew[i] = usableSpace - p->nFree;\n    for(j=0; j<p->nOverflow; j++){\n      szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);\n    }\n    cntNew[i] = cntOld[i];\n  }\n  k = nOld;\n  for(i=0; i<k; i++){\n    int sz;\n    while( szNew[i]>usableSpace ){\n      if( i+1>=k ){\n        k = i+2;\n        if( k>NB+2 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }\n        szNew[k-1] = 0;\n        cntNew[k-1] = b.nCell;\n      }\n      sz = 2 + cachedCellSize(&b, cntNew[i]-1);\n      szNew[i] -= sz;\n      if( !leafData ){\n        if( cntNew[i]<b.nCell ){\n          sz = 2 + cachedCellSize(&b, cntNew[i]);\n        }else{\n          sz = 0;\n        }\n      }\n      szNew[i+1] += sz;\n      cntNew[i]--;\n    }\n    while( cntNew[i]<b.nCell ){\n      sz = 2 + cachedCellSize(&b, cntNew[i]);\n      if( szNew[i]+sz>usableSpace ) break;\n      szNew[i] += sz;\n      cntNew[i]++;\n      if( !leafData ){\n        if( cntNew[i]<b.nCell ){\n          sz = 2 + cachedCellSize(&b, cntNew[i]);\n        }else{\n          sz = 0;\n        }\n      }\n      szNew[i+1] -= sz;\n    }\n    if( cntNew[i]>=b.nCell ){\n      k = i+1;\n    }else if( cntNew[i] <= (i>0 ? cntNew[i-1] : 0) ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto balance_cleanup;\n    }\n  }\n\n  /*\n  ** The packing computed by the previous block is biased toward the siblings\n  ** on the left side (siblings with smaller keys). The left siblings are\n  ** always nearly full, while the right-most sibling might be nearly empty.\n  ** The next block of code attempts to adjust the packing of siblings to\n  ** get a better balance.\n  **\n  ** This adjustment is more than an optimization.  The packing above might\n  ** be so out of balance as to be illegal.  For example, the right-most\n  ** sibling might be completely empty.  This adjustment is not optional.\n  */\n  for(i=k-1; i>0; i--){\n    int szRight = szNew[i];  /* Size of sibling on the right */\n    int szLeft = szNew[i-1]; /* Size of sibling on the left */\n    int r;              /* Index of right-most cell in left sibling */\n    int d;              /* Index of first cell to the left of right sibling */\n\n    r = cntNew[i-1] - 1;\n    d = r + 1 - leafData;\n    (void)cachedCellSize(&b, d);\n    do{\n      int szR, szD;\n      assert( d<nMaxCells );\n      assert( r<nMaxCells );\n      szR = cachedCellSize(&b, r);\n      szD = b.szCell[d];\n      if( szRight!=0\n       && (bBulk || szRight+szD+2 > szLeft-(szR+(i==k-1?0:2)))){\n        break;\n      }\n      szRight += szD + 2;\n      szLeft -= szR + 2;\n      cntNew[i-1] = r;\n      r--;\n      d--;\n    }while( r>=0 );\n    szNew[i] = szRight;\n    szNew[i-1] = szLeft;\n    if( cntNew[i-1] <= (i>1 ? cntNew[i-2] : 0) ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto balance_cleanup;\n    }\n  }\n\n  /* Sanity check:  For a non-corrupt database file one of the following\n  ** must be true:\n  **    (1) We found one or more cells (cntNew[0])>0), or\n  **    (2) pPage is a virtual root page.  A virtual root page is when\n  **        the real root page is page 1 and we are the only child of\n  **        that page.\n  */\n  assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);\n  TRACE((\"BALANCE: old: %u(nc=%u) %u(nc=%u) %u(nc=%u)\\n\",\n    apOld[0]->pgno, apOld[0]->nCell,\n    nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,\n    nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0\n  ));\n\n  /*\n  ** Allocate k new pages.  Reuse old pages where possible.\n  */\n  pageFlags = apOld[0]->aData[0];\n  for(i=0; i<k; i++){\n    MemPage *pNew;\n    if( i<nOld ){\n      pNew = apNew[i] = apOld[i];\n      apOld[i] = 0;\n      rc = sqlite3PagerWrite(pNew->pDbPage);\n      nNew++;\n      if( sqlite3PagerPageRefcount(pNew->pDbPage)!=1+(i==(iParentIdx-nxDiv))\n       && rc==SQLITE_OK\n      ){\n        rc = SQLITE_CORRUPT_BKPT;\n      }\n      if( rc ) goto balance_cleanup;\n    }else{\n      assert( i>0 );\n      rc = allocateBtreePage(pBt, &pNew, &pgno, (bBulk ? 1 : pgno), 0);\n      if( rc ) goto balance_cleanup;\n      zeroPage(pNew, pageFlags);\n      apNew[i] = pNew;\n      nNew++;\n      cntOld[i] = b.nCell;\n\n      /* Set the pointer-map entry for the new sibling page. */\n      if( ISAUTOVACUUM(pBt) ){\n        ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);\n        if( rc!=SQLITE_OK ){\n          goto balance_cleanup;\n        }\n      }\n    }\n  }\n\n  /*\n  ** Reassign page numbers so that the new pages are in ascending order.\n  ** This helps to keep entries in the disk file in order so that a scan\n  ** of the table is closer to a linear scan through the file. That in turn\n  ** helps the operating system to deliver pages from the disk more rapidly.\n  **\n  ** An O(N*N) sort algorithm is used, but since N is never more than NB+2\n  ** (5), that is not a performance concern.\n  **\n  ** When NB==3, this one optimization makes the database about 25% faster\n  ** for large insertions and deletions.\n  */\n  for(i=0; i<nNew; i++){\n    aPgno[i] = apNew[i]->pgno;\n    assert( apNew[i]->pDbPage->flags & PGHDR_WRITEABLE );\n    assert( apNew[i]->pDbPage->flags & PGHDR_DIRTY );\n  }\n  for(i=0; i<nNew-1; i++){\n    int iB = i;\n    for(j=i+1; j<nNew; j++){\n      if( apNew[j]->pgno < apNew[iB]->pgno ) iB = j;\n    }\n\n    /* If apNew[i] has a page number that is bigger than any of the\n    ** subsequence apNew[i] entries, then swap apNew[i] with the subsequent\n    ** entry that has the smallest page number (which we know to be\n    ** entry apNew[iB]).\n    */\n    if( iB!=i ){\n      Pgno pgnoA = apNew[i]->pgno;\n      Pgno pgnoB = apNew[iB]->pgno;\n      Pgno pgnoTemp = (PENDING_BYTE/pBt->pageSize)+1;\n      u16 fgA = apNew[i]->pDbPage->flags;\n      u16 fgB = apNew[iB]->pDbPage->flags;\n      sqlite3PagerRekey(apNew[i]->pDbPage, pgnoTemp, fgB);\n      sqlite3PagerRekey(apNew[iB]->pDbPage, pgnoA, fgA);\n      sqlite3PagerRekey(apNew[i]->pDbPage, pgnoB, fgB);\n      apNew[i]->pgno = pgnoB;\n      apNew[iB]->pgno = pgnoA;\n    }\n  }\n\n  TRACE((\"BALANCE: new: %u(%u nc=%u) %u(%u nc=%u) %u(%u nc=%u) \"\n         \"%u(%u nc=%u) %u(%u nc=%u)\\n\",\n    apNew[0]->pgno, szNew[0], cntNew[0],\n    nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,\n    nNew>=2 ? cntNew[1] - cntNew[0] - !leafData : 0,\n    nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,\n    nNew>=3 ? cntNew[2] - cntNew[1] - !leafData : 0,\n    nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,\n    nNew>=4 ? cntNew[3] - cntNew[2] - !leafData : 0,\n    nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0,\n    nNew>=5 ? cntNew[4] - cntNew[3] - !leafData : 0\n  ));\n\n  assert( sqlite3PagerIswriteable(pParent->pDbPage) );\n  assert( nNew>=1 && nNew<=ArraySize(apNew) );\n  assert( apNew[nNew-1]!=0 );\n  put4byte(pRight, apNew[nNew-1]->pgno);\n\n  /* If the sibling pages are not leaves, ensure that the right-child pointer\n  ** of the right-most new sibling page is set to the value that was\n  ** originally in the same field of the right-most old sibling page. */\n  if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){\n    MemPage *pOld;\n    if( nNew>nOld ){\n      pOld = apNew[nOld-1];\n    }else{\n      pOld = apOld[nOld-1];\n    }\n    memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);\n  }\n\n  /* Make any required updates to pointer map entries associated with\n  ** cells stored on sibling pages following the balance operation. Pointer\n  ** map entries associated with divider cells are set by the insertCell()\n  ** routine. The associated pointer map entries are:\n  **\n  **   a) if the cell contains a reference to an overflow chain, the\n  **      entry associated with the first page in the overflow chain, and\n  **\n  **   b) if the sibling pages are not leaves, the child page associated\n  **      with the cell.\n  **\n  ** If the sibling pages are not leaves, then the pointer map entry\n  ** associated with the right-child of each sibling may also need to be\n  ** updated. This happens below, after the sibling pages have been\n  ** populated, not here.\n  */\n  if( ISAUTOVACUUM(pBt) ){\n    MemPage *pOld;\n    MemPage *pNew = pOld = apNew[0];\n    int cntOldNext = pNew->nCell + pNew->nOverflow;\n    int iNew = 0;\n    int iOld = 0;\n\n    for(i=0; i<b.nCell; i++){\n      u8 *pCell = b.apCell[i];\n      while( i==cntOldNext ){\n        iOld++;\n        assert( iOld<nNew || iOld<nOld );\n        assert( iOld>=0 && iOld<NB );\n        pOld = iOld<nNew ? apNew[iOld] : apOld[iOld];\n        cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;\n      }\n      if( i==cntNew[iNew] ){\n        pNew = apNew[++iNew];\n        if( !leafData ) continue;\n      }\n\n      /* Cell pCell is destined for new sibling page pNew. Originally, it\n      ** was either part of sibling page iOld (possibly an overflow cell),\n      ** or else the divider cell to the left of sibling page iOld. So,\n      ** if sibling page iOld had the same page number as pNew, and if\n      ** pCell really was a part of sibling page iOld (not a divider or\n      ** overflow cell), we can skip updating the pointer map entries.  */\n      if( iOld>=nNew\n       || pNew->pgno!=aPgno[iOld]\n       || !SQLITE_WITHIN(pCell,pOld->aData,pOld->aDataEnd)\n      ){\n        if( !leafCorrection ){\n          ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);\n        }\n        if( cachedCellSize(&b,i)>pNew->minLocal ){\n          ptrmapPutOvflPtr(pNew, pOld, pCell, &rc);\n        }\n        if( rc ) goto balance_cleanup;\n      }\n    }\n  }\n\n  /* Insert new divider cells into pParent. */\n  for(i=0; i<nNew-1; i++){\n    u8 *pCell;\n    u8 *pTemp;\n    int sz;\n    u8 *pSrcEnd;\n    MemPage *pNew = apNew[i];\n    j = cntNew[i];\n\n    assert( j<nMaxCells );\n    assert( b.apCell[j]!=0 );\n    pCell = b.apCell[j];\n    sz = b.szCell[j] + leafCorrection;\n    pTemp = &aOvflSpace[iOvflSpace];\n    if( !pNew->leaf ){\n      memcpy(&pNew->aData[8], pCell, 4);\n    }else if( leafData ){\n      /* If the tree is a leaf-data tree, and the siblings are leaves,\n      ** then there is no divider cell in b.apCell[]. Instead, the divider\n      ** cell consists of the integer key for the right-most cell of\n      ** the sibling-page assembled above only.\n      */\n      CellInfo info;\n      j--;\n      pNew->xParseCell(pNew, b.apCell[j], &info);\n      pCell = pTemp;\n      sz = 4 + putVarint(&pCell[4], info.nKey);\n      pTemp = 0;\n    }else{\n      pCell -= 4;\n      /* Obscure case for non-leaf-data trees: If the cell at pCell was\n      ** previously stored on a leaf node, and its reported size was 4\n      ** bytes, then it may actually be smaller than this\n      ** (see btreeParseCellPtr(), 4 bytes is the minimum size of\n      ** any cell). But it is important to pass the correct size to\n      ** insertCell(), so reparse the cell now.\n      **\n      ** This can only happen for b-trees used to evaluate \"IN (SELECT ...)\"\n      ** and WITHOUT ROWID tables with exactly one column which is the\n      ** primary key.\n      */\n      if( b.szCell[j]==4 ){\n        assert(leafCorrection==4);\n        sz = pParent->xCellSize(pParent, pCell);\n      }\n    }\n    iOvflSpace += sz;\n    assert( sz<=pBt->maxLocal+23 );\n    assert( iOvflSpace <= (int)pBt->pageSize );\n    assert( b.ixNx[NB*2-1]>j );\n    for(k=0; b.ixNx[k]<=j; k++){}\n    pSrcEnd = b.apEnd[k];\n    if( SQLITE_OVERFLOW(pSrcEnd, pCell, pCell+sz) ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto balance_cleanup;\n    }\n    rc = insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno);\n    if( rc!=SQLITE_OK ) goto balance_cleanup;\n    assert( sqlite3PagerIswriteable(pParent->pDbPage) );\n  }\n\n  /* Now update the actual sibling pages. The order in which they are updated\n  ** is important, as this code needs to avoid disrupting any page from which\n  ** cells may still to be read. In practice, this means:\n  **\n  **  (1) If cells are moving left (from apNew[iPg] to apNew[iPg-1])\n  **      then it is not safe to update page apNew[iPg] until after\n  **      the left-hand sibling apNew[iPg-1] has been updated.\n  **\n  **  (2) If cells are moving right (from apNew[iPg] to apNew[iPg+1])\n  **      then it is not safe to update page apNew[iPg] until after\n  **      the right-hand sibling apNew[iPg+1] has been updated.\n  **\n  ** If neither of the above apply, the page is safe to update.\n  **\n  ** The iPg value in the following loop starts at nNew-1 goes down\n  ** to 0, then back up to nNew-1 again, thus making two passes over\n  ** the pages.  On the initial downward pass, only condition (1) above\n  ** needs to be tested because (2) will always be true from the previous\n  ** step.  On the upward pass, both conditions are always true, so the\n  ** upwards pass simply processes pages that were missed on the downward\n  ** pass.\n  */\n  for(i=1-nNew; i<nNew; i++){\n    int iPg = i<0 ? -i : i;\n    assert( iPg>=0 && iPg<nNew );\n    assert( iPg>=1 || i>=0 );\n    assert( iPg<ArraySize(cntOld) );\n    if( abDone[iPg] ) continue;         /* Skip pages already processed */\n    if( i>=0                            /* On the upwards pass, or... */\n     || cntOld[iPg-1]>=cntNew[iPg-1]    /* Condition (1) is true */\n    ){\n      int iNew;\n      int iOld;\n      int nNewCell;\n\n      /* Verify condition (1):  If cells are moving left, update iPg\n      ** only after iPg-1 has already been updated. */\n      assert( iPg==0 || cntOld[iPg-1]>=cntNew[iPg-1] || abDone[iPg-1] );\n\n      /* Verify condition (2):  If cells are moving right, update iPg\n      ** only after iPg+1 has already been updated. */\n      assert( cntNew[iPg]>=cntOld[iPg] || abDone[iPg+1] );\n\n      if( iPg==0 ){\n        iNew = iOld = 0;\n        nNewCell = cntNew[0];\n      }else{\n        iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;\n        iNew = cntNew[iPg-1] + !leafData;\n        nNewCell = cntNew[iPg] - iNew;\n      }\n\n      rc = editPage(apNew[iPg], iOld, iNew, nNewCell, &b);\n      if( rc ) goto balance_cleanup;\n      abDone[iPg]++;\n      apNew[iPg]->nFree = usableSpace-szNew[iPg];\n      assert( apNew[iPg]->nOverflow==0 );\n      assert( apNew[iPg]->nCell==nNewCell );\n    }\n  }\n\n  /* All pages have been processed exactly once */\n  assert( memcmp(abDone, \"\\01\\01\\01\\01\\01\", nNew)==0 );\n\n  assert( nOld>0 );\n  assert( nNew>0 );\n\n  if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){\n    /* The root page of the b-tree now contains no cells. The only sibling\n    ** page is the right-child of the parent. Copy the contents of the\n    ** child page into the parent, decreasing the overall height of the\n    ** b-tree structure by one. This is described as the \"balance-shallower\"\n    ** sub-algorithm in some documentation.\n    **\n    ** If this is an auto-vacuum database, the call to copyNodeContent()\n    ** sets all pointer-map entries corresponding to database image pages\n    ** for which the pointer is stored within the content being copied.\n    **\n    ** It is critical that the child page be defragmented before being\n    ** copied into the parent, because if the parent is page 1 then it will\n    ** by smaller than the child due to the database header, and so all the\n    ** free space needs to be up front.\n    */\n    assert( nNew==1 || CORRUPT_DB );\n    rc = defragmentPage(apNew[0], -1);\n    testcase( rc!=SQLITE_OK );\n    assert( apNew[0]->nFree ==\n        (get2byteNotZero(&apNew[0]->aData[5]) - apNew[0]->cellOffset\n          - apNew[0]->nCell*2)\n      || rc!=SQLITE_OK\n    );\n    copyNodeContent(apNew[0], pParent, &rc);\n    freePage(apNew[0], &rc);\n  }else if( ISAUTOVACUUM(pBt) && !leafCorrection ){\n    /* Fix the pointer map entries associated with the right-child of each\n    ** sibling page. All other pointer map entries have already been taken\n    ** care of.  */\n    for(i=0; i<nNew; i++){\n      u32 key = get4byte(&apNew[i]->aData[8]);\n      ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i]->pgno, &rc);\n    }\n  }\n\n  assert( pParent->isInit );\n  TRACE((\"BALANCE: finished: old=%u new=%u cells=%u\\n\",\n          nOld, nNew, b.nCell));\n\n  /* Free any old pages that were not reused as new pages.\n  */\n  for(i=nNew; i<nOld; i++){\n    freePage(apOld[i], &rc);\n  }\n\n#if 0\n  if( ISAUTOVACUUM(pBt) && rc==SQLITE_OK && apNew[0]->isInit ){\n    /* The ptrmapCheckPages() contains assert() statements that verify that\n    ** all pointer map pages are set correctly. This is helpful while\n    ** debugging. This is usually disabled because a corrupt database may\n    ** cause an assert() statement to fail.  */\n    ptrmapCheckPages(apNew, nNew);\n    ptrmapCheckPages(&pParent, 1);\n  }\n#endif\n\n  /*\n  ** Cleanup before returning.\n  */\nbalance_cleanup:\n  sqlite3StackFree(0, b.apCell);\n  for(i=0; i<nOld; i++){\n    releasePage(apOld[i]);\n  }\n  for(i=0; i<nNew; i++){\n    releasePage(apNew[i]);\n  }\n\n  return rc;\n}\n\n\n/*\n** This function is called when the root page of a b-tree structure is\n** overfull (has one or more overflow pages).\n**\n** A new child page is allocated and the contents of the current root\n** page, including overflow cells, are copied into the child. The root\n** page is then overwritten to make it an empty page with the right-child\n** pointer pointing to the new page.\n**\n** Before returning, all pointer-map entries corresponding to pages\n** that the new child-page now contains pointers to are updated. The\n** entry corresponding to the new right-child pointer of the root\n** page is also updated.\n**\n** If successful, *ppChild is set to contain a reference to the child\n** page and SQLITE_OK is returned. In this case the caller is required\n** to call releasePage() on *ppChild exactly once. If an error occurs,\n** an error code is returned and *ppChild is set to 0.\n*/\nstatic int balance_deeper(MemPage *pRoot, MemPage **ppChild){\n  int rc;                        /* Return value from subprocedures */\n  MemPage *pChild = 0;           /* Pointer to a new child page */\n  Pgno pgnoChild = 0;            /* Page number of the new child page */\n  BtShared *pBt = pRoot->pBt;    /* The BTree */\n\n  assert( pRoot->nOverflow>0 );\n  assert( sqlite3_mutex_held(pBt->mutex) );\n\n  /* Make pRoot, the root page of the b-tree, writable. Allocate a new\n  ** page that will become the new right-child of pPage. Copy the contents\n  ** of the node stored on pRoot into the new child page.\n  */\n  rc = sqlite3PagerWrite(pRoot->pDbPage);\n  if( rc==SQLITE_OK ){\n    rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);\n    copyNodeContent(pRoot, pChild, &rc);\n    if( ISAUTOVACUUM(pBt) ){\n      ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);\n    }\n  }\n  if( rc ){\n    *ppChild = 0;\n    releasePage(pChild);\n    return rc;\n  }\n  assert( sqlite3PagerIswriteable(pChild->pDbPage) );\n  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );\n  assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );\n\n  TRACE((\"BALANCE: copy root %u into %u\\n\", pRoot->pgno, pChild->pgno));\n\n  /* Copy the overflow cells from pRoot to pChild */\n  memcpy(pChild->aiOvfl, pRoot->aiOvfl,\n         pRoot->nOverflow*sizeof(pRoot->aiOvfl[0]));\n  memcpy(pChild->apOvfl, pRoot->apOvfl,\n         pRoot->nOverflow*sizeof(pRoot->apOvfl[0]));\n  pChild->nOverflow = pRoot->nOverflow;\n\n  /* Zero the contents of pRoot. Then install pChild as the right-child. */\n  zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);\n  put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);\n\n  *ppChild = pChild;\n  return SQLITE_OK;\n}\n\n/*\n** Return SQLITE_CORRUPT if any cursor other than pCur is currently valid\n** on the same B-tree as pCur.\n**\n** This can occur if a database is corrupt with two or more SQL tables\n** pointing to the same b-tree.  If an insert occurs on one SQL table\n** and causes a BEFORE TRIGGER to do a secondary insert on the other SQL\n** table linked to the same b-tree.  If the secondary insert causes a\n** rebalance, that can change content out from under the cursor on the\n** first SQL table, violating invariants on the first insert.\n*/\nstatic int anotherValidCursor(BtCursor *pCur){\n  BtCursor *pOther;\n  for(pOther=pCur->pBt->pCursor; pOther; pOther=pOther->pNext){\n    if( pOther!=pCur\n     && pOther->eState==CURSOR_VALID\n     && pOther->pPage==pCur->pPage\n    ){\n      return SQLITE_CORRUPT_PAGE(pCur->pPage);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** The page that pCur currently points to has just been modified in\n** some way. This function figures out if this modification means the\n** tree needs to be balanced, and if so calls the appropriate balancing\n** routine. Balancing routines are:\n**\n**   balance_quick()\n**   balance_deeper()\n**   balance_nonroot()\n*/\nstatic int balance(BtCursor *pCur){\n  int rc = SQLITE_OK;\n  u8 aBalanceQuickSpace[13];\n  u8 *pFree = 0;\n\n  VVA_ONLY( int balance_quick_called = 0 );\n  VVA_ONLY( int balance_deeper_called = 0 );\n\n  do {\n    int iPage;\n    MemPage *pPage = pCur->pPage;\n\n    if( NEVER(pPage->nFree<0) && btreeComputeFreeSpace(pPage) ) break;\n    if( pPage->nOverflow==0 && pPage->nFree*3<=(int)pCur->pBt->usableSize*2 ){\n      /* No rebalance required as long as:\n      **   (1) There are no overflow cells\n      **   (2) The amount of free space on the page is less than 2/3rds of\n      **       the total usable space on the page. */\n      break;\n    }else if( (iPage = pCur->iPage)==0 ){\n      if( pPage->nOverflow && (rc = anotherValidCursor(pCur))==SQLITE_OK ){\n        /* The root page of the b-tree is overfull. In this case call the\n        ** balance_deeper() function to create a new child for the root-page\n        ** and copy the current contents of the root-page to it. The\n        ** next iteration of the do-loop will balance the child page.\n        */\n        assert( balance_deeper_called==0 );\n        VVA_ONLY( balance_deeper_called++ );\n        rc = balance_deeper(pPage, &pCur->apPage[1]);\n        if( rc==SQLITE_OK ){\n          pCur->iPage = 1;\n          pCur->ix = 0;\n          pCur->aiIdx[0] = 0;\n          pCur->apPage[0] = pPage;\n          pCur->pPage = pCur->apPage[1];\n          assert( pCur->pPage->nOverflow );\n        }\n      }else{\n        break;\n      }\n    }else if( sqlite3PagerPageRefcount(pPage->pDbPage)>1 ){\n      /* The page being written is not a root page, and there is currently\n      ** more than one reference to it. This only happens if the page is one\n      ** of its own ancestor pages. Corruption. */\n      rc = SQLITE_CORRUPT_PAGE(pPage);\n    }else{\n      MemPage * const pParent = pCur->apPage[iPage-1];\n      int const iIdx = pCur->aiIdx[iPage-1];\n\n      rc = sqlite3PagerWrite(pParent->pDbPage);\n      if( rc==SQLITE_OK && pParent->nFree<0 ){\n        rc = btreeComputeFreeSpace(pParent);\n      }\n      if( rc==SQLITE_OK ){\n#ifndef SQLITE_OMIT_QUICKBALANCE\n        if( pPage->intKeyLeaf\n         && pPage->nOverflow==1\n         && pPage->aiOvfl[0]==pPage->nCell\n         && pParent->pgno!=1\n         && pParent->nCell==iIdx\n        ){\n          /* Call balance_quick() to create a new sibling of pPage on which\n          ** to store the overflow cell. balance_quick() inserts a new cell\n          ** into pParent, which may cause pParent overflow. If this\n          ** happens, the next iteration of the do-loop will balance pParent\n          ** use either balance_nonroot() or balance_deeper(). Until this\n          ** happens, the overflow cell is stored in the aBalanceQuickSpace[]\n          ** buffer.\n          **\n          ** The purpose of the following assert() is to check that only a\n          ** single call to balance_quick() is made for each call to this\n          ** function. If this were not verified, a subtle bug involving reuse\n          ** of the aBalanceQuickSpace[] might sneak in.\n          */\n          assert( balance_quick_called==0 );\n          VVA_ONLY( balance_quick_called++ );\n          rc = balance_quick(pParent, pPage, aBalanceQuickSpace);\n        }else\n#endif\n        {\n          /* In this case, call balance_nonroot() to redistribute cells\n          ** between pPage and up to 2 of its sibling pages. This involves\n          ** modifying the contents of pParent, which may cause pParent to\n          ** become overfull or underfull. The next iteration of the do-loop\n          ** will balance the parent page to correct this.\n          **\n          ** If the parent page becomes overfull, the overflow cell or cells\n          ** are stored in the pSpace buffer allocated immediately below.\n          ** A subsequent iteration of the do-loop will deal with this by\n          ** calling balance_nonroot() (balance_deeper() may be called first,\n          ** but it doesn't deal with overflow cells - just moves them to a\n          ** different page). Once this subsequent call to balance_nonroot()\n          ** has completed, it is safe to release the pSpace buffer used by\n          ** the previous call, as the overflow cell data will have been\n          ** copied either into the body of a database page or into the new\n          ** pSpace buffer passed to the latter call to balance_nonroot().\n          */\n          u8 *pSpace = sqlite3PageMalloc(pCur->pBt->pageSize);\n          rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,\n                               pCur->hints&BTREE_BULKLOAD);\n          if( pFree ){\n            /* If pFree is not NULL, it points to the pSpace buffer used\n            ** by a previous call to balance_nonroot(). Its contents are\n            ** now stored either on real database pages or within the\n            ** new pSpace buffer, so it may be safely freed here. */\n            sqlite3PageFree(pFree);\n          }\n\n          /* The pSpace buffer will be freed after the next call to\n          ** balance_nonroot(), or just before this function returns, whichever\n          ** comes first. */\n          pFree = pSpace;\n        }\n      }\n\n      pPage->nOverflow = 0;\n\n      /* The next iteration of the do-loop balances the parent page. */\n      releasePage(pPage);\n      pCur->iPage--;\n      assert( pCur->iPage>=0 );\n      pCur->pPage = pCur->apPage[pCur->iPage];\n    }\n  }while( rc==SQLITE_OK );\n\n  if( pFree ){\n    sqlite3PageFree(pFree);\n  }\n  return rc;\n}\n\n/* Overwrite content from pX into pDest.  Only do the write if the\n** content is different from what is already there.\n*/\nstatic int btreeOverwriteContent(\n  MemPage *pPage,           /* MemPage on which writing will occur */\n  u8 *pDest,                /* Pointer to the place to start writing */\n  const BtreePayload *pX,   /* Source of data to write */\n  int iOffset,              /* Offset of first byte to write */\n  int iAmt                  /* Number of bytes to be written */\n){\n  int nData = pX->nData - iOffset;\n  if( nData<=0 ){\n    /* Overwriting with zeros */\n    int i;\n    for(i=0; i<iAmt && pDest[i]==0; i++){}\n    if( i<iAmt ){\n      int rc = sqlite3PagerWrite(pPage->pDbPage);\n      if( rc ) return rc;\n      memset(pDest + i, 0, iAmt - i);\n    }\n  }else{\n    if( nData<iAmt ){\n      /* Mixed read data and zeros at the end.  Make a recursive call\n      ** to write the zeros then fall through to write the real data */\n      int rc = btreeOverwriteContent(pPage, pDest+nData, pX, iOffset+nData,\n                                 iAmt-nData);\n      if( rc ) return rc;\n      iAmt = nData;\n    }\n    if( memcmp(pDest, ((u8*)pX->pData) + iOffset, iAmt)!=0 ){\n      int rc = sqlite3PagerWrite(pPage->pDbPage);\n      if( rc ) return rc;\n      /* In a corrupt database, it is possible for the source and destination\n      ** buffers to overlap.  This is harmless since the database is already\n      ** corrupt but it does cause valgrind and ASAN warnings.  So use\n      ** memmove(). */\n      memmove(pDest, ((u8*)pX->pData) + iOffset, iAmt);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Overwrite the cell that cursor pCur is pointing to with fresh content\n** contained in pX.  In this variant, pCur is pointing to an overflow\n** cell.\n*/\nstatic SQLITE_NOINLINE int btreeOverwriteOverflowCell(\n  BtCursor *pCur,                     /* Cursor pointing to cell to overwrite */\n  const BtreePayload *pX              /* Content to write into the cell */\n){\n  int iOffset;                        /* Next byte of pX->pData to write */\n  int nTotal = pX->nData + pX->nZero; /* Total bytes of to write */\n  int rc;                             /* Return code */\n  MemPage *pPage = pCur->pPage;       /* Page being written */\n  BtShared *pBt;                      /* Btree */\n  Pgno ovflPgno;                      /* Next overflow page to write */\n  u32 ovflPageSize;                   /* Size to write on overflow page */\n\n  assert( pCur->info.nLocal<nTotal );  /* pCur is an overflow cell */\n\n  /* Overwrite the local portion first */\n  rc = btreeOverwriteContent(pPage, pCur->info.pPayload, pX,\n                             0, pCur->info.nLocal);\n  if( rc ) return rc;\n\n  /* Now overwrite the overflow pages */\n  iOffset = pCur->info.nLocal;\n  assert( nTotal>=0 );\n  assert( iOffset>=0 );\n  ovflPgno = get4byte(pCur->info.pPayload + iOffset);\n  pBt = pPage->pBt;\n  ovflPageSize = pBt->usableSize - 4;\n  do{\n    rc = btreeGetPage(pBt, ovflPgno, &pPage, 0);\n    if( rc ) return rc;\n    if( sqlite3PagerPageRefcount(pPage->pDbPage)!=1 || pPage->isInit ){\n      rc = SQLITE_CORRUPT_PAGE(pPage);\n    }else{\n      if( iOffset+ovflPageSize<(u32)nTotal ){\n        ovflPgno = get4byte(pPage->aData);\n      }else{\n        ovflPageSize = nTotal - iOffset;\n      }\n      rc = btreeOverwriteContent(pPage, pPage->aData+4, pX,\n                                 iOffset, ovflPageSize);\n    }\n    sqlite3PagerUnref(pPage->pDbPage);\n    if( rc ) return rc;\n    iOffset += ovflPageSize;\n  }while( iOffset<nTotal );\n  return SQLITE_OK;\n}\n\n/*\n** Overwrite the cell that cursor pCur is pointing to with fresh content\n** contained in pX.\n*/\nstatic int btreeOverwriteCell(BtCursor *pCur, const BtreePayload *pX){\n  int nTotal = pX->nData + pX->nZero; /* Total bytes of to write */\n  MemPage *pPage = pCur->pPage;       /* Page being written */\n\n  if( pCur->info.pPayload + pCur->info.nLocal > pPage->aDataEnd\n   || pCur->info.pPayload < pPage->aData + pPage->cellOffset\n  ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  if( pCur->info.nLocal==nTotal ){\n    /* The entire cell is local */\n    return btreeOverwriteContent(pPage, pCur->info.pPayload, pX,\n                                 0, pCur->info.nLocal);\n  }else{\n    /* The cell contains overflow content */\n    return btreeOverwriteOverflowCell(pCur, pX);\n  }\n}\n\n\n/*\n** Insert a new record into the BTree.  The content of the new record\n** is described by the pX object.  The pCur cursor is used only to\n** define what table the record should be inserted into, and is left\n** pointing at a random location.\n**\n** For a table btree (used for rowid tables), only the pX.nKey value of\n** the key is used. The pX.pKey value must be NULL.  The pX.nKey is the\n** rowid or INTEGER PRIMARY KEY of the row.  The pX.nData,pData,nZero fields\n** hold the content of the row.\n**\n** For an index btree (used for indexes and WITHOUT ROWID tables), the\n** key is an arbitrary byte sequence stored in pX.pKey,nKey.  The\n** pX.pData,nData,nZero fields must be zero.\n**\n** If the seekResult parameter is non-zero, then a successful call to\n** sqlite3BtreeIndexMoveto() to seek cursor pCur to (pKey,nKey) has already\n** been performed.  In other words, if seekResult!=0 then the cursor\n** is currently pointing to a cell that will be adjacent to the cell\n** to be inserted.  If seekResult<0 then pCur points to a cell that is\n** smaller then (pKey,nKey).  If seekResult>0 then pCur points to a cell\n** that is larger than (pKey,nKey).\n**\n** If seekResult==0, that means pCur is pointing at some unknown location.\n** In that case, this routine must seek the cursor to the correct insertion\n** point for (pKey,nKey) before doing the insertion.  For index btrees,\n** if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked\n** key values and pX->aMem can be used instead of pX->pKey to avoid having\n** to decode the key.\n*/\nSQLITE_PRIVATE int sqlite3BtreeInsert(\n  BtCursor *pCur,                /* Insert data into the table of this cursor */\n  const BtreePayload *pX,        /* Content of the row to be inserted */\n  int flags,                     /* True if this is likely an append */\n  int seekResult                 /* Result of prior IndexMoveto() call */\n){\n  int rc;\n  int loc = seekResult;          /* -1: before desired location  +1: after */\n  int szNew = 0;\n  int idx;\n  MemPage *pPage;\n  Btree *p = pCur->pBtree;\n  unsigned char *oldCell;\n  unsigned char *newCell = 0;\n\n  assert( (flags & (BTREE_SAVEPOSITION|BTREE_APPEND|BTREE_PREFORMAT))==flags );\n  assert( (flags & BTREE_PREFORMAT)==0 || seekResult || pCur->pKeyInfo==0 );\n\n  /* Save the positions of any other cursors open on this table.\n  **\n  ** In some cases, the call to btreeMoveto() below is a no-op. For\n  ** example, when inserting data into a table with auto-generated integer\n  ** keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the\n  ** integer key to use. It then calls this function to actually insert the\n  ** data into the intkey B-Tree. In this case btreeMoveto() recognizes\n  ** that the cursor is already where it needs to be and returns without\n  ** doing any work. To avoid thwarting these optimizations, it is important\n  ** not to clear the cursor here.\n  */\n  if( pCur->curFlags & BTCF_Multiple ){\n    rc = saveAllCursors(p->pBt, pCur->pgnoRoot, pCur);\n    if( rc ) return rc;\n    if( loc && pCur->iPage<0 ){\n      /* This can only happen if the schema is corrupt such that there is more\n      ** than one table or index with the same root page as used by the cursor.\n      ** Which can only happen if the SQLITE_NoSchemaError flag was set when\n      ** the schema was loaded. This cannot be asserted though, as a user might\n      ** set the flag, load the schema, and then unset the flag.  */\n      return SQLITE_CORRUPT_PGNO(pCur->pgnoRoot);\n    }\n  }\n\n  /* Ensure that the cursor is not in the CURSOR_FAULT state and that it\n  ** points to a valid cell.\n  */\n  if( pCur->eState>=CURSOR_REQUIRESEEK ){\n    testcase( pCur->eState==CURSOR_REQUIRESEEK );\n    testcase( pCur->eState==CURSOR_FAULT );\n    rc = moveToRoot(pCur);\n    if( rc && rc!=SQLITE_EMPTY ) return rc;\n  }\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( (pCur->curFlags & BTCF_WriteFlag)!=0\n              && p->pBt->inTransaction==TRANS_WRITE\n              && (p->pBt->btsFlags & BTS_READ_ONLY)==0 );\n  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );\n\n  /* Assert that the caller has been consistent. If this cursor was opened\n  ** expecting an index b-tree, then the caller should be inserting blob\n  ** keys with no associated data. If the cursor was opened expecting an\n  ** intkey table, the caller should be inserting integer keys with a\n  ** blob of associated data.  */\n  assert( (flags & BTREE_PREFORMAT) || (pX->pKey==0)==(pCur->pKeyInfo==0) );\n\n  if( pCur->pKeyInfo==0 ){\n    assert( pX->pKey==0 );\n    /* If this is an insert into a table b-tree, invalidate any incrblob\n    ** cursors open on the row being replaced */\n    if( p->hasIncrblobCur ){\n      invalidateIncrblobCursors(p, pCur->pgnoRoot, pX->nKey, 0);\n    }\n\n    /* If BTREE_SAVEPOSITION is set, the cursor must already be pointing\n    ** to a row with the same key as the new entry being inserted.\n    */\n#ifdef SQLITE_DEBUG\n    if( flags & BTREE_SAVEPOSITION ){\n      assert( pCur->curFlags & BTCF_ValidNKey );\n      assert( pX->nKey==pCur->info.nKey );\n      assert( loc==0 );\n    }\n#endif\n\n    /* On the other hand, BTREE_SAVEPOSITION==0 does not imply\n    ** that the cursor is not pointing to a row to be overwritten.\n    ** So do a complete check.\n    */\n    if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){\n      /* The cursor is pointing to the entry that is to be\n      ** overwritten */\n      assert( pX->nData>=0 && pX->nZero>=0 );\n      if( pCur->info.nSize!=0\n       && pCur->info.nPayload==(u32)pX->nData+pX->nZero\n      ){\n        /* New entry is the same size as the old.  Do an overwrite */\n        return btreeOverwriteCell(pCur, pX);\n      }\n      assert( loc==0 );\n    }else if( loc==0 ){\n      /* The cursor is *not* pointing to the cell to be overwritten, nor\n      ** to an adjacent cell.  Move the cursor so that it is pointing either\n      ** to the cell to be overwritten or an adjacent cell.\n      */\n      rc = sqlite3BtreeTableMoveto(pCur, pX->nKey,\n               (flags & BTREE_APPEND)!=0, &loc);\n      if( rc ) return rc;\n    }\n  }else{\n    /* This is an index or a WITHOUT ROWID table */\n\n    /* If BTREE_SAVEPOSITION is set, the cursor must already be pointing\n    ** to a row with the same key as the new entry being inserted.\n    */\n    assert( (flags & BTREE_SAVEPOSITION)==0 || loc==0 );\n\n    /* If the cursor is not already pointing either to the cell to be\n    ** overwritten, or if a new cell is being inserted, if the cursor is\n    ** not pointing to an immediately adjacent cell, then move the cursor\n    ** so that it does.\n    */\n    if( loc==0 && (flags & BTREE_SAVEPOSITION)==0 ){\n      if( pX->nMem ){\n        UnpackedRecord r;\n        r.pKeyInfo = pCur->pKeyInfo;\n        r.aMem = pX->aMem;\n        r.nField = pX->nMem;\n        r.default_rc = 0;\n        r.eqSeen = 0;\n        rc = sqlite3BtreeIndexMoveto(pCur, &r, &loc);\n      }else{\n        rc = btreeMoveto(pCur, pX->pKey, pX->nKey,\n                    (flags & BTREE_APPEND)!=0, &loc);\n      }\n      if( rc ) return rc;\n    }\n\n    /* If the cursor is currently pointing to an entry to be overwritten\n    ** and the new content is the same as as the old, then use the\n    ** overwrite optimization.\n    */\n    if( loc==0 ){\n      getCellInfo(pCur);\n      if( pCur->info.nKey==pX->nKey ){\n        BtreePayload x2;\n        x2.pData = pX->pKey;\n        x2.nData = (int)pX->nKey;  assert( pX->nKey<=0x7fffffff );\n        x2.nZero = 0;\n        return btreeOverwriteCell(pCur, &x2);\n      }\n    }\n  }\n  assert( pCur->eState==CURSOR_VALID\n       || (pCur->eState==CURSOR_INVALID && loc) || CORRUPT_DB );\n\n  pPage = pCur->pPage;\n  assert( pPage->intKey || pX->nKey>=0 || (flags & BTREE_PREFORMAT) );\n  assert( pPage->leaf || !pPage->intKey );\n  if( pPage->nFree<0 ){\n    if( NEVER(pCur->eState>CURSOR_INVALID) ){\n     /* ^^^^^--- due to the moveToRoot() call above */\n      rc = SQLITE_CORRUPT_PAGE(pPage);\n    }else{\n      rc = btreeComputeFreeSpace(pPage);\n    }\n    if( rc ) return rc;\n  }\n\n  TRACE((\"INSERT: table=%u nkey=%lld ndata=%u page=%u %s\\n\",\n          pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,\n          loc==0 ? \"overwrite\" : \"new entry\"));\n  assert( pPage->isInit || CORRUPT_DB );\n  newCell = p->pBt->pTmpSpace;\n  assert( newCell!=0 );\n  assert( BTREE_PREFORMAT==OPFLAG_PREFORMAT );\n  if( flags & BTREE_PREFORMAT ){\n    rc = SQLITE_OK;\n    szNew = p->pBt->nPreformatSize;\n    if( szNew<4 ){\n      szNew = 4;\n      newCell[3] = 0;\n    }\n    if( ISAUTOVACUUM(p->pBt) && szNew>pPage->maxLocal ){\n      CellInfo info;\n      pPage->xParseCell(pPage, newCell, &info);\n      if( info.nPayload!=info.nLocal ){\n        Pgno ovfl = get4byte(&newCell[szNew-4]);\n        ptrmapPut(p->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, &rc);\n        if( NEVER(rc) ) goto end_insert;\n      }\n    }\n  }else{\n    rc = fillInCell(pPage, newCell, pX, &szNew);\n    if( rc ) goto end_insert;\n  }\n  assert( szNew==pPage->xCellSize(pPage, newCell) );\n  assert( szNew <= MX_CELL_SIZE(p->pBt) );\n  idx = pCur->ix;\n  pCur->info.nSize = 0;\n  if( loc==0 ){\n    CellInfo info;\n    assert( idx>=0 );\n    if( idx>=pPage->nCell ){\n      return SQLITE_CORRUPT_PAGE(pPage);\n    }\n    rc = sqlite3PagerWrite(pPage->pDbPage);\n    if( rc ){\n      goto end_insert;\n    }\n    oldCell = findCell(pPage, idx);\n    if( !pPage->leaf ){\n      memcpy(newCell, oldCell, 4);\n    }\n    BTREE_CLEAR_CELL(rc, pPage, oldCell, info);\n    testcase( pCur->curFlags & BTCF_ValidOvfl );\n    invalidateOverflowCache(pCur);\n    if( info.nSize==szNew && info.nLocal==info.nPayload\n     && (!ISAUTOVACUUM(p->pBt) || szNew<pPage->minLocal)\n    ){\n      /* Overwrite the old cell with the new if they are the same size.\n      ** We could also try to do this if the old cell is smaller, then add\n      ** the leftover space to the free list.  But experiments show that\n      ** doing that is no faster then skipping this optimization and just\n      ** calling dropCell() and insertCell().\n      **\n      ** This optimization cannot be used on an autovacuum database if the\n      ** new entry uses overflow pages, as the insertCell() call below is\n      ** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry.  */\n      assert( rc==SQLITE_OK ); /* clearCell never fails when nLocal==nPayload */\n      if( oldCell < pPage->aData+pPage->hdrOffset+10 ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      if( oldCell+szNew > pPage->aDataEnd ){\n        return SQLITE_CORRUPT_PAGE(pPage);\n      }\n      memcpy(oldCell, newCell, szNew);\n      return SQLITE_OK;\n    }\n    dropCell(pPage, idx, info.nSize, &rc);\n    if( rc ) goto end_insert;\n  }else if( loc<0 && pPage->nCell>0 ){\n    assert( pPage->leaf );\n    idx = ++pCur->ix;\n    pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n  }else{\n    assert( pPage->leaf );\n  }\n  rc = insertCellFast(pPage, idx, newCell, szNew);\n  assert( pPage->nOverflow==0 || rc==SQLITE_OK );\n  assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );\n\n  /* If no error has occurred and pPage has an overflow cell, call balance()\n  ** to redistribute the cells within the tree. Since balance() may move\n  ** the cursor, zero the BtCursor.info.nSize and BTCF_ValidNKey\n  ** variables.\n  **\n  ** Previous versions of SQLite called moveToRoot() to move the cursor\n  ** back to the root page as balance() used to invalidate the contents\n  ** of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that,\n  ** set the cursor state to \"invalid\". This makes common insert operations\n  ** slightly faster.\n  **\n  ** There is a subtle but important optimization here too. When inserting\n  ** multiple records into an intkey b-tree using a single cursor (as can\n  ** happen while processing an \"INSERT INTO ... SELECT\" statement), it\n  ** is advantageous to leave the cursor pointing to the last entry in\n  ** the b-tree if possible. If the cursor is left pointing to the last\n  ** entry in the table, and the next row inserted has an integer key\n  ** larger than the largest existing key, it is possible to insert the\n  ** row without seeking the cursor. This can be a big performance boost.\n  */\n  if( pPage->nOverflow ){\n    assert( rc==SQLITE_OK );\n    pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);\n    rc = balance(pCur);\n\n    /* Must make sure nOverflow is reset to zero even if the balance()\n    ** fails. Internal data structure corruption will result otherwise.\n    ** Also, set the cursor state to invalid. This stops saveCursorPosition()\n    ** from trying to save the current position of the cursor.  */\n    pCur->pPage->nOverflow = 0;\n    pCur->eState = CURSOR_INVALID;\n    if( (flags & BTREE_SAVEPOSITION) && rc==SQLITE_OK ){\n      btreeReleaseAllCursorPages(pCur);\n      if( pCur->pKeyInfo ){\n        assert( pCur->pKey==0 );\n        pCur->pKey = sqlite3Malloc( pX->nKey );\n        if( pCur->pKey==0 ){\n          rc = SQLITE_NOMEM;\n        }else{\n          memcpy(pCur->pKey, pX->pKey, pX->nKey);\n        }\n      }\n      pCur->eState = CURSOR_REQUIRESEEK;\n      pCur->nKey = pX->nKey;\n    }\n  }\n  assert( pCur->iPage<0 || pCur->pPage->nOverflow==0 );\n\nend_insert:\n  return rc;\n}\n\n/*\n** This function is used as part of copying the current row from cursor\n** pSrc into cursor pDest. If the cursors are open on intkey tables, then\n** parameter iKey is used as the rowid value when the record is copied\n** into pDest. Otherwise, the record is copied verbatim.\n**\n** This function does not actually write the new value to cursor pDest.\n** Instead, it creates and populates any required overflow pages and\n** writes the data for the new cell into the BtShared.pTmpSpace buffer\n** for the destination database. The size of the cell, in bytes, is left\n** in BtShared.nPreformatSize. The caller completes the insertion by\n** calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nSQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){\n  BtShared *pBt = pDest->pBt;\n  u8 *aOut = pBt->pTmpSpace;    /* Pointer to next output buffer */\n  const u8 *aIn;                /* Pointer to next input buffer */\n  u32 nIn;                      /* Size of input buffer aIn[] */\n  u32 nRem;                     /* Bytes of data still to copy */\n\n  getCellInfo(pSrc);\n  if( pSrc->info.nPayload<0x80 ){\n    *(aOut++) = (u8)pSrc->info.nPayload;\n  }else{\n    aOut += sqlite3PutVarint(aOut, pSrc->info.nPayload);\n  }\n  if( pDest->pKeyInfo==0 ) aOut += putVarint(aOut, iKey);\n  nIn = pSrc->info.nLocal;\n  aIn = pSrc->info.pPayload;\n  if( aIn+nIn>pSrc->pPage->aDataEnd ){\n    return SQLITE_CORRUPT_PAGE(pSrc->pPage);\n  }\n  nRem = pSrc->info.nPayload;\n  if( nIn==nRem && nIn<pDest->pPage->maxLocal ){\n    memcpy(aOut, aIn, nIn);\n    pBt->nPreformatSize = nIn + (int)(aOut - pBt->pTmpSpace);\n    return SQLITE_OK;\n  }else{\n    int rc = SQLITE_OK;\n    Pager *pSrcPager = pSrc->pBt->pPager;\n    u8 *pPgnoOut = 0;\n    Pgno ovflIn = 0;\n    DbPage *pPageIn = 0;\n    MemPage *pPageOut = 0;\n    u32 nOut;                     /* Size of output buffer aOut[] */\n\n    nOut = btreePayloadToLocal(pDest->pPage, pSrc->info.nPayload);\n    pBt->nPreformatSize = (int)nOut + (int)(aOut - pBt->pTmpSpace);\n    if( nOut<pSrc->info.nPayload ){\n      pPgnoOut = &aOut[nOut];\n      pBt->nPreformatSize += 4;\n    }\n\n    if( nRem>nIn ){\n      if( aIn+nIn+4>pSrc->pPage->aDataEnd ){\n        return SQLITE_CORRUPT_PAGE(pSrc->pPage);\n      }\n      ovflIn = get4byte(&pSrc->info.pPayload[nIn]);\n    }\n\n    do {\n      nRem -= nOut;\n      do{\n        assert( nOut>0 );\n        if( nIn>0 ){\n          int nCopy = MIN(nOut, nIn);\n          memcpy(aOut, aIn, nCopy);\n          nOut -= nCopy;\n          nIn -= nCopy;\n          aOut += nCopy;\n          aIn += nCopy;\n        }\n        if( nOut>0 ){\n          sqlite3PagerUnref(pPageIn);\n          pPageIn = 0;\n          rc = sqlite3PagerGet(pSrcPager, ovflIn, &pPageIn, PAGER_GET_READONLY);\n          if( rc==SQLITE_OK ){\n            aIn = (const u8*)sqlite3PagerGetData(pPageIn);\n            ovflIn = get4byte(aIn);\n            aIn += 4;\n            nIn = pSrc->pBt->usableSize - 4;\n          }\n        }\n      }while( rc==SQLITE_OK && nOut>0 );\n\n      if( rc==SQLITE_OK && nRem>0 && ALWAYS(pPgnoOut) ){\n        Pgno pgnoNew;\n        MemPage *pNew = 0;\n        rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);\n        put4byte(pPgnoOut, pgnoNew);\n        if( ISAUTOVACUUM(pBt) && pPageOut ){\n          ptrmapPut(pBt, pgnoNew, PTRMAP_OVERFLOW2, pPageOut->pgno, &rc);\n        }\n        releasePage(pPageOut);\n        pPageOut = pNew;\n        if( pPageOut ){\n          pPgnoOut = pPageOut->aData;\n          put4byte(pPgnoOut, 0);\n          aOut = &pPgnoOut[4];\n          nOut = MIN(pBt->usableSize - 4, nRem);\n        }\n      }\n    }while( nRem>0 && rc==SQLITE_OK );\n\n    releasePage(pPageOut);\n    sqlite3PagerUnref(pPageIn);\n    return rc;\n  }\n}\n\n/*\n** Delete the entry that the cursor is pointing to.\n**\n** If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then\n** the cursor is left pointing at an arbitrary location after the delete.\n** But if that bit is set, then the cursor is left in a state such that\n** the next call to BtreeNext() or BtreePrev() moves it to the same row\n** as it would have been on if the call to BtreeDelete() had been omitted.\n**\n** The BTREE_AUXDELETE bit of flags indicates that is one of several deletes\n** associated with a single table entry and its indexes.  Only one of those\n** deletes is considered the \"primary\" delete.  The primary delete occurs\n** on a cursor that is not a BTREE_FORDELETE cursor.  All but one delete\n** operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.\n** The BTREE_AUXDELETE bit is a hint that is not used by this implementation,\n** but which might be used by alternative storage engines.\n*/\nSQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){\n  Btree *p = pCur->pBtree;\n  BtShared *pBt = p->pBt;\n  int rc;                    /* Return code */\n  MemPage *pPage;            /* Page to delete cell from */\n  unsigned char *pCell;      /* Pointer to cell to delete */\n  int iCellIdx;              /* Index of cell to delete */\n  int iCellDepth;            /* Depth of node containing pCell */\n  CellInfo info;             /* Size of the cell being deleted */\n  u8 bPreserve;              /* Keep cursor valid.  2 for CURSOR_SKIPNEXT */\n\n  assert( cursorOwnsBtShared(pCur) );\n  assert( pBt->inTransaction==TRANS_WRITE );\n  assert( (pBt->btsFlags & BTS_READ_ONLY)==0 );\n  assert( pCur->curFlags & BTCF_WriteFlag );\n  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );\n  assert( !hasReadConflicts(p, pCur->pgnoRoot) );\n  assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );\n  if( pCur->eState!=CURSOR_VALID ){\n    if( pCur->eState>=CURSOR_REQUIRESEEK ){\n      rc = btreeRestoreCursorPosition(pCur);\n      assert( rc!=SQLITE_OK || CORRUPT_DB || pCur->eState==CURSOR_VALID );\n      if( rc || pCur->eState!=CURSOR_VALID ) return rc;\n    }else{\n      return SQLITE_CORRUPT_PGNO(pCur->pgnoRoot);\n    }\n  }\n  assert( pCur->eState==CURSOR_VALID );\n\n  iCellDepth = pCur->iPage;\n  iCellIdx = pCur->ix;\n  pPage = pCur->pPage;\n  if( pPage->nCell<=iCellIdx ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  pCell = findCell(pPage, iCellIdx);\n  if( pPage->nFree<0 && btreeComputeFreeSpace(pPage) ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n  if( pCell<&pPage->aCellIdx[pPage->nCell] ){\n    return SQLITE_CORRUPT_PAGE(pPage);\n  }\n\n  /* If the BTREE_SAVEPOSITION bit is on, then the cursor position must\n  ** be preserved following this delete operation. If the current delete\n  ** will cause a b-tree rebalance, then this is done by saving the cursor\n  ** key and leaving the cursor in CURSOR_REQUIRESEEK state before\n  ** returning.\n  **\n  ** If the current delete will not cause a rebalance, then the cursor\n  ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately\n  ** before or after the deleted entry.\n  **\n  ** The bPreserve value records which path is required:\n  **\n  **    bPreserve==0         Not necessary to save the cursor position\n  **    bPreserve==1         Use CURSOR_REQUIRESEEK to save the cursor position\n  **    bPreserve==2         Cursor won't move.  Set CURSOR_SKIPNEXT.\n  */\n  bPreserve = (flags & BTREE_SAVEPOSITION)!=0;\n  if( bPreserve ){\n    if( !pPage->leaf\n     || (pPage->nFree+pPage->xCellSize(pPage,pCell)+2) >\n                                                   (int)(pBt->usableSize*2/3)\n     || pPage->nCell==1  /* See dbfuzz001.test for a test case */\n    ){\n      /* A b-tree rebalance will be required after deleting this entry.\n      ** Save the cursor key.  */\n      rc = saveCursorKey(pCur);\n      if( rc ) return rc;\n    }else{\n      bPreserve = 2;\n    }\n  }\n\n  /* If the page containing the entry to delete is not a leaf page, move\n  ** the cursor to the largest entry in the tree that is smaller than\n  ** the entry being deleted. This cell will replace the cell being deleted\n  ** from the internal node. The 'previous' entry is used for this instead\n  ** of the 'next' entry, as the previous entry is always a part of the\n  ** sub-tree headed by the child page of the cell being deleted. This makes\n  ** balancing the tree following the delete operation easier.  */\n  if( !pPage->leaf ){\n    rc = sqlite3BtreePrevious(pCur, 0);\n    assert( rc!=SQLITE_DONE );\n    if( rc ) return rc;\n  }\n\n  /* Save the positions of any other cursors open on this table before\n  ** making any modifications.  */\n  if( pCur->curFlags & BTCF_Multiple ){\n    rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);\n    if( rc ) return rc;\n  }\n\n  /* If this is a delete operation to remove a row from a table b-tree,\n  ** invalidate any incrblob cursors open on the row being deleted.  */\n  if( pCur->pKeyInfo==0 && p->hasIncrblobCur ){\n    invalidateIncrblobCursors(p, pCur->pgnoRoot, pCur->info.nKey, 0);\n  }\n\n  /* Make the page containing the entry to be deleted writable. Then free any\n  ** overflow pages associated with the entry and finally remove the cell\n  ** itself from within the page.  */\n  rc = sqlite3PagerWrite(pPage->pDbPage);\n  if( rc ) return rc;\n  BTREE_CLEAR_CELL(rc, pPage, pCell, info);\n  dropCell(pPage, iCellIdx, info.nSize, &rc);\n  if( rc ) return rc;\n\n  /* If the cell deleted was not located on a leaf page, then the cursor\n  ** is currently pointing to the largest entry in the sub-tree headed\n  ** by the child-page of the cell that was just deleted from an internal\n  ** node. The cell from the leaf node needs to be moved to the internal\n  ** node to replace the deleted cell.  */\n  if( !pPage->leaf ){\n    MemPage *pLeaf = pCur->pPage;\n    int nCell;\n    Pgno n;\n    unsigned char *pTmp;\n\n    if( pLeaf->nFree<0 ){\n      rc = btreeComputeFreeSpace(pLeaf);\n      if( rc ) return rc;\n    }\n    if( iCellDepth<pCur->iPage-1 ){\n      n = pCur->apPage[iCellDepth+1]->pgno;\n    }else{\n      n = pCur->pPage->pgno;\n    }\n    pCell = findCell(pLeaf, pLeaf->nCell-1);\n    if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_PAGE(pLeaf);\n    nCell = pLeaf->xCellSize(pLeaf, pCell);\n    assert( MX_CELL_SIZE(pBt) >= nCell );\n    pTmp = pBt->pTmpSpace;\n    assert( pTmp!=0 );\n    rc = sqlite3PagerWrite(pLeaf->pDbPage);\n    if( rc==SQLITE_OK ){\n      rc = insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n);\n    }\n    dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);\n    if( rc ) return rc;\n  }\n\n  /* Balance the tree. If the entry deleted was located on a leaf page,\n  ** then the cursor still points to that page. In this case the first\n  ** call to balance() repairs the tree, and the if(...) condition is\n  ** never true.\n  **\n  ** Otherwise, if the entry deleted was on an internal node page, then\n  ** pCur is pointing to the leaf page from which a cell was removed to\n  ** replace the cell deleted from the internal node. This is slightly\n  ** tricky as the leaf node may be underfull, and the internal node may\n  ** be either under or overfull. In this case run the balancing algorithm\n  ** on the leaf node first. If the balance proceeds far enough up the\n  ** tree that we can be sure that any problem in the internal node has\n  ** been corrected, so be it. Otherwise, after balancing the leaf node,\n  ** walk the cursor up the tree to the internal node and balance it as\n  ** well.  */\n  assert( pCur->pPage->nOverflow==0 );\n  assert( pCur->pPage->nFree>=0 );\n  if( pCur->pPage->nFree*3<=(int)pCur->pBt->usableSize*2 ){\n    /* Optimization: If the free space is less than 2/3rds of the page,\n    ** then balance() will always be a no-op.  No need to invoke it. */\n    rc = SQLITE_OK;\n  }else{\n    rc = balance(pCur);\n  }\n  if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){\n    releasePageNotNull(pCur->pPage);\n    pCur->iPage--;\n    while( pCur->iPage>iCellDepth ){\n      releasePage(pCur->apPage[pCur->iPage--]);\n    }\n    pCur->pPage = pCur->apPage[pCur->iPage];\n    rc = balance(pCur);\n  }\n\n  if( rc==SQLITE_OK ){\n    if( bPreserve>1 ){\n      assert( (pCur->iPage==iCellDepth || CORRUPT_DB) );\n      assert( pPage==pCur->pPage || CORRUPT_DB );\n      assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );\n      pCur->eState = CURSOR_SKIPNEXT;\n      if( iCellIdx>=pPage->nCell ){\n        pCur->skipNext = -1;\n        pCur->ix = pPage->nCell-1;\n      }else{\n        pCur->skipNext = 1;\n      }\n    }else{\n      rc = moveToRoot(pCur);\n      if( bPreserve ){\n        btreeReleaseAllCursorPages(pCur);\n        pCur->eState = CURSOR_REQUIRESEEK;\n      }\n      if( rc==SQLITE_EMPTY ) rc = SQLITE_OK;\n    }\n  }\n  return rc;\n}\n\n/*\n** Create a new BTree table.  Write into *piTable the page\n** number for the root page of the new table.\n**\n** The type of type is determined by the flags parameter.  Only the\n** following values of flags are currently in use.  Other values for\n** flags might not work:\n**\n**     BTREE_INTKEY|BTREE_LEAFDATA     Used for SQL tables with rowid keys\n**     BTREE_ZERODATA                  Used for SQL indices\n*/\nstatic int btreeCreateTable(Btree *p, Pgno *piTable, int createTabFlags){\n  BtShared *pBt = p->pBt;\n  MemPage *pRoot;\n  Pgno pgnoRoot;\n  int rc;\n  int ptfFlags;          /* Page-type flags for the root page of new table */\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( pBt->inTransaction==TRANS_WRITE );\n  assert( (pBt->btsFlags & BTS_READ_ONLY)==0 );\n\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);\n  if( rc ){\n    return rc;\n  }\n#else\n  if( pBt->autoVacuum ){\n    Pgno pgnoMove;      /* Move a page here to make room for the root-page */\n    MemPage *pPageMove; /* The page to move to. */\n\n    /* Creating a new table may probably require moving an existing database\n    ** to make room for the new tables root page. In case this page turns\n    ** out to be an overflow page, delete all overflow page-map caches\n    ** held by open cursors.\n    */\n    invalidateAllOverflowCache(pBt);\n\n    /* Read the value of meta[3] from the database to determine where the\n    ** root page of the new table should go. meta[3] is the largest root-page\n    ** created so far, so the new root-page is (meta[3]+1).\n    */\n    sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &pgnoRoot);\n    if( pgnoRoot>btreePagecount(pBt) ){\n      return SQLITE_CORRUPT_PGNO(pgnoRoot);\n    }\n    pgnoRoot++;\n\n    /* The new root-page may not be allocated on a pointer-map page, or the\n    ** PENDING_BYTE page.\n    */\n    while( pgnoRoot==PTRMAP_PAGENO(pBt, pgnoRoot) ||\n        pgnoRoot==PENDING_BYTE_PAGE(pBt) ){\n      pgnoRoot++;\n    }\n    assert( pgnoRoot>=3 );\n\n    /* Allocate a page. The page that currently resides at pgnoRoot will\n    ** be moved to the allocated page (unless the allocated page happens\n    ** to reside at pgnoRoot).\n    */\n    rc = allocateBtreePage(pBt, &pPageMove, &pgnoMove, pgnoRoot, BTALLOC_EXACT);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n\n    if( pgnoMove!=pgnoRoot ){\n      /* pgnoRoot is the page that will be used for the root-page of\n      ** the new table (assuming an error did not occur). But we were\n      ** allocated pgnoMove. If required (i.e. if it was not allocated\n      ** by extending the file), the current page at position pgnoMove\n      ** is already journaled.\n      */\n      u8 eType = 0;\n      Pgno iPtrPage = 0;\n\n      /* Save the positions of any open cursors. This is required in\n      ** case they are holding a reference to an xFetch reference\n      ** corresponding to page pgnoRoot.  */\n      rc = saveAllCursors(pBt, 0, 0);\n      releasePage(pPageMove);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n\n      /* Move the page currently at pgnoRoot to pgnoMove. */\n      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      rc = ptrmapGet(pBt, pgnoRoot, &eType, &iPtrPage);\n      if( eType==PTRMAP_ROOTPAGE || eType==PTRMAP_FREEPAGE ){\n        rc = SQLITE_CORRUPT_PGNO(pgnoRoot);\n      }\n      if( rc!=SQLITE_OK ){\n        releasePage(pRoot);\n        return rc;\n      }\n      assert( eType!=PTRMAP_ROOTPAGE );\n      assert( eType!=PTRMAP_FREEPAGE );\n      rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);\n      releasePage(pRoot);\n\n      /* Obtain the page at pgnoRoot */\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      rc = sqlite3PagerWrite(pRoot->pDbPage);\n      if( rc!=SQLITE_OK ){\n        releasePage(pRoot);\n        return rc;\n      }\n    }else{\n      pRoot = pPageMove;\n    }\n\n    /* Update the pointer-map and meta-data with the new root-page number. */\n    ptrmapPut(pBt, pgnoRoot, PTRMAP_ROOTPAGE, 0, &rc);\n    if( rc ){\n      releasePage(pRoot);\n      return rc;\n    }\n\n    /* When the new root page was allocated, page 1 was made writable in\n    ** order either to increase the database filesize, or to decrement the\n    ** freelist count.  Hence, the sqlite3BtreeUpdateMeta() call cannot fail.\n    */\n    assert( sqlite3PagerIswriteable(pBt->pPage1->pDbPage) );\n    rc = sqlite3BtreeUpdateMeta(p, 4, pgnoRoot);\n    if( NEVER(rc) ){\n      releasePage(pRoot);\n      return rc;\n    }\n\n  }else{\n    rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);\n    if( rc ) return rc;\n  }\n#endif\n  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );\n  if( createTabFlags & BTREE_INTKEY ){\n    ptfFlags = PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF;\n  }else{\n    ptfFlags = PTF_ZERODATA | PTF_LEAF;\n  }\n  zeroPage(pRoot, ptfFlags);\n  sqlite3PagerUnref(pRoot->pDbPage);\n  assert( (pBt->openFlags & BTREE_SINGLE)==0 || pgnoRoot==2 );\n  *piTable = pgnoRoot;\n  return SQLITE_OK;\n}\nSQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree *p, Pgno *piTable, int flags){\n  int rc;\n  sqlite3BtreeEnter(p);\n  rc = btreeCreateTable(p, piTable, flags);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** Erase the given database page and all its children.  Return\n** the page to the freelist.\n*/\nstatic int clearDatabasePage(\n  BtShared *pBt,           /* The BTree that contains the table */\n  Pgno pgno,               /* Page number to clear */\n  int freePageFlag,        /* Deallocate page if true */\n  i64 *pnChange            /* Add number of Cells freed to this counter */\n){\n  MemPage *pPage;\n  int rc;\n  unsigned char *pCell;\n  int i;\n  int hdr;\n  CellInfo info;\n\n  assert( sqlite3_mutex_held(pBt->mutex) );\n  if( pgno>btreePagecount(pBt) ){\n    return SQLITE_CORRUPT_PGNO(pgno);\n  }\n  rc = getAndInitPage(pBt, pgno, &pPage, 0);\n  if( rc ) return rc;\n  if( (pBt->openFlags & BTREE_SINGLE)==0\n   && sqlite3PagerPageRefcount(pPage->pDbPage) != (1 + (pgno==1))\n  ){\n    rc = SQLITE_CORRUPT_PAGE(pPage);\n    goto cleardatabasepage_out;\n  }\n  hdr = pPage->hdrOffset;\n  for(i=0; i<pPage->nCell; i++){\n    pCell = findCell(pPage, i);\n    if( !pPage->leaf ){\n      rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);\n      if( rc ) goto cleardatabasepage_out;\n    }\n    BTREE_CLEAR_CELL(rc, pPage, pCell, info);\n    if( rc ) goto cleardatabasepage_out;\n  }\n  if( !pPage->leaf ){\n    rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange);\n    if( rc ) goto cleardatabasepage_out;\n    if( pPage->intKey ) pnChange = 0;\n  }\n  if( pnChange ){\n    testcase( !pPage->intKey );\n    *pnChange += pPage->nCell;\n  }\n  if( freePageFlag ){\n    freePage(pPage, &rc);\n  }else if( (rc = sqlite3PagerWrite(pPage->pDbPage))==0 ){\n    zeroPage(pPage, pPage->aData[hdr] | PTF_LEAF);\n  }\n\ncleardatabasepage_out:\n  releasePage(pPage);\n  return rc;\n}\n\n/*\n** Delete all information from a single table in the database.  iTable is\n** the page number of the root of the table.  After this routine returns,\n** the root page is empty, but still exists.\n**\n** This routine will fail with SQLITE_LOCKED if there are any open\n** read cursors on the table.  Open write cursors are moved to the\n** root of the table.\n**\n** If pnChange is not NULL, then the integer value pointed to by pnChange\n** is incremented by the number of entries in the table.\n*/\nSQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, i64 *pnChange){\n  int rc;\n  BtShared *pBt = p->pBt;\n  sqlite3BtreeEnter(p);\n  assert( p->inTrans==TRANS_WRITE );\n\n  rc = saveAllCursors(pBt, (Pgno)iTable, 0);\n\n  if( SQLITE_OK==rc ){\n    /* Invalidate all incrblob cursors open on table iTable (assuming iTable\n    ** is the root of a table b-tree - if it is not, the following call is\n    ** a no-op).  */\n    if( p->hasIncrblobCur ){\n      invalidateIncrblobCursors(p, (Pgno)iTable, 0, 1);\n    }\n    rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);\n  }\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** Delete all information from the single table that pCur is open on.\n**\n** This routine only work for pCur on an ephemeral table.\n*/\nSQLITE_PRIVATE int sqlite3BtreeClearTableOfCursor(BtCursor *pCur){\n  return sqlite3BtreeClearTable(pCur->pBtree, pCur->pgnoRoot, 0);\n}\n\n/*\n** Erase all information in a table and add the root of the table to\n** the freelist.  Except, the root of the principle table (the one on\n** page 1) is never added to the freelist.\n**\n** This routine will fail with SQLITE_LOCKED if there are any open\n** cursors on the table.\n**\n** If AUTOVACUUM is enabled and the page at iTable is not the last\n** root page in the database file, then the last root page\n** in the database file is moved into the slot formerly occupied by\n** iTable and that last slot formerly occupied by the last root page\n** is added to the freelist instead of iTable.  In this say, all\n** root pages are kept at the beginning of the database file, which\n** is necessary for AUTOVACUUM to work right.  *piMoved is set to the\n** page number that used to be the last root page in the file before\n** the move.  If no page gets moved, *piMoved is set to 0.\n** The last root page is recorded in meta[3] and the value of\n** meta[3] is updated by this procedure.\n*/\nstatic int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){\n  int rc;\n  MemPage *pPage = 0;\n  BtShared *pBt = p->pBt;\n\n  assert( sqlite3BtreeHoldsMutex(p) );\n  assert( p->inTrans==TRANS_WRITE );\n  assert( iTable>=2 );\n  if( iTable>btreePagecount(pBt) ){\n    return SQLITE_CORRUPT_PGNO(iTable);\n  }\n\n  rc = sqlite3BtreeClearTable(p, iTable, 0);\n  if( rc ) return rc;\n  rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);\n  if( NEVER(rc) ){\n    releasePage(pPage);\n    return rc;\n  }\n\n  *piMoved = 0;\n\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  freePage(pPage, &rc);\n  releasePage(pPage);\n#else\n  if( pBt->autoVacuum ){\n    Pgno maxRootPgno;\n    sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &maxRootPgno);\n\n    if( iTable==maxRootPgno ){\n      /* If the table being dropped is the table with the largest root-page\n      ** number in the database, put the root page on the free list.\n      */\n      freePage(pPage, &rc);\n      releasePage(pPage);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n    }else{\n      /* The table being dropped does not have the largest root-page\n      ** number in the database. So move the page that does into the\n      ** gap left by the deleted root-page.\n      */\n      MemPage *pMove;\n      releasePage(pPage);\n      rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);\n      releasePage(pMove);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      pMove = 0;\n      rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);\n      freePage(pMove, &rc);\n      releasePage(pMove);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      *piMoved = maxRootPgno;\n    }\n\n    /* Set the new 'max-root-page' value in the database header. This\n    ** is the old value less one, less one more if that happens to\n    ** be a root-page number, less one again if that is the\n    ** PENDING_BYTE_PAGE.\n    */\n    maxRootPgno--;\n    while( maxRootPgno==PENDING_BYTE_PAGE(pBt)\n           || PTRMAP_ISPAGE(pBt, maxRootPgno) ){\n      maxRootPgno--;\n    }\n    assert( maxRootPgno!=PENDING_BYTE_PAGE(pBt) );\n\n    rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);\n  }else{\n    freePage(pPage, &rc);\n    releasePage(pPage);\n  }\n#endif\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){\n  int rc;\n  sqlite3BtreeEnter(p);\n  rc = btreeDropTable(p, iTable, piMoved);\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n\n/*\n** This function may only be called if the b-tree connection already\n** has a read or write transaction open on the database.\n**\n** Read the meta-information out of a database file.  Meta[0]\n** is the number of free pages currently in the database.  Meta[1]\n** through meta[15] are available for use by higher layers.  Meta[0]\n** is read-only, the others are read/write.\n**\n** The schema layer numbers meta values differently.  At the schema\n** layer (and the SetCookie and ReadCookie opcodes) the number of\n** free pages is not visible.  So Cookie[0] is the same as Meta[1].\n**\n** This routine treats Meta[BTREE_DATA_VERSION] as a special case.  Instead\n** of reading the value out of the header, it instead loads the \"DataVersion\"\n** from the pager.  The BTREE_DATA_VERSION value is not actually stored in the\n** database file.  It is a number computed by the pager.  But its access\n** pattern is the same as header meta values, and so it is convenient to\n** read it from this routine.\n*/\nSQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){\n  BtShared *pBt = p->pBt;\n\n  sqlite3BtreeEnter(p);\n  assert( p->inTrans>TRANS_NONE );\n  assert( SQLITE_OK==querySharedCacheTableLock(p, SCHEMA_ROOT, READ_LOCK) );\n  assert( pBt->pPage1 );\n  assert( idx>=0 && idx<=15 );\n\n  if( idx==BTREE_DATA_VERSION ){\n    *pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iBDataVersion;\n  }else{\n    *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);\n  }\n\n  /* If auto-vacuum is disabled in this build and this is an auto-vacuum\n  ** database, mark the database as read-only.  */\n#ifdef SQLITE_OMIT_AUTOVACUUM\n  if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ){\n    pBt->btsFlags |= BTS_READ_ONLY;\n  }\n#endif\n\n  sqlite3BtreeLeave(p);\n}\n\n/*\n** Write meta-information back into the database.  Meta[0] is\n** read-only and may not be written.\n*/\nSQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){\n  BtShared *pBt = p->pBt;\n  unsigned char *pP1;\n  int rc;\n  assert( idx>=1 && idx<=15 );\n  sqlite3BtreeEnter(p);\n  assert( p->inTrans==TRANS_WRITE );\n  assert( pBt->pPage1!=0 );\n  pP1 = pBt->pPage1->aData;\n  rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);\n  if( rc==SQLITE_OK ){\n    put4byte(&pP1[36 + idx*4], iMeta);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( idx==BTREE_INCR_VACUUM ){\n      assert( pBt->autoVacuum || iMeta==0 );\n      assert( iMeta==0 || iMeta==1 );\n      pBt->incrVacuum = (u8)iMeta;\n    }\n#endif\n  }\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n/*\n** The first argument, pCur, is a cursor opened on some b-tree. Count the\n** number of entries in the b-tree and write the result to *pnEntry.\n**\n** SQLITE_OK is returned if the operation is successfully executed.\n** Otherwise, if an error is encountered (i.e. an IO error or database\n** corruption) an SQLite error code is returned.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCount(sqlite3 *db, BtCursor *pCur, i64 *pnEntry){\n  i64 nEntry = 0;                      /* Value to return in *pnEntry */\n  int rc;                              /* Return code */\n\n  rc = moveToRoot(pCur);\n  if( rc==SQLITE_EMPTY ){\n    *pnEntry = 0;\n    return SQLITE_OK;\n  }\n\n  /* Unless an error occurs, the following loop runs one iteration for each\n  ** page in the B-Tree structure (not including overflow pages).\n  */\n  while( rc==SQLITE_OK && !AtomicLoad(&db->u1.isInterrupted) ){\n    int iIdx;                          /* Index of child node in parent */\n    MemPage *pPage;                    /* Current page of the b-tree */\n\n    /* If this is a leaf page or the tree is not an int-key tree, then\n    ** this page contains countable entries. Increment the entry counter\n    ** accordingly.\n    */\n    pPage = pCur->pPage;\n    if( pPage->leaf || !pPage->intKey ){\n      nEntry += pPage->nCell;\n    }\n\n    /* pPage is a leaf node. This loop navigates the cursor so that it\n    ** points to the first interior cell that it points to the parent of\n    ** the next page in the tree that has not yet been visited. The\n    ** pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell\n    ** of the page, or to the number of cells in the page if the next page\n    ** to visit is the right-child of its parent.\n    **\n    ** If all pages in the tree have been visited, return SQLITE_OK to the\n    ** caller.\n    */\n    if( pPage->leaf ){\n      do {\n        if( pCur->iPage==0 ){\n          /* All pages of the b-tree have been visited. Return successfully. */\n          *pnEntry = nEntry;\n          return moveToRoot(pCur);\n        }\n        moveToParent(pCur);\n      }while ( pCur->ix>=pCur->pPage->nCell );\n\n      pCur->ix++;\n      pPage = pCur->pPage;\n    }\n\n    /* Descend to the child node of the cell that the cursor currently\n    ** points at. This is the right-child if (iIdx==pPage->nCell).\n    */\n    iIdx = pCur->ix;\n    if( iIdx==pPage->nCell ){\n      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));\n    }else{\n      rc = moveToChild(pCur, get4byte(findCell(pPage, iIdx)));\n    }\n  }\n\n  /* An error has occurred. Return an error code. */\n  return rc;\n}\n\n/*\n** Return the pager associated with a BTree.  This routine is used for\n** testing and debugging only.\n*/\nSQLITE_PRIVATE Pager *sqlite3BtreePager(Btree *p){\n  return p->pBt->pPager;\n}\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n/*\n** Record an OOM error during integrity_check\n*/\nstatic void checkOom(IntegrityCk *pCheck){\n  pCheck->rc = SQLITE_NOMEM;\n  pCheck->mxErr = 0;  /* Causes integrity_check processing to stop */\n  if( pCheck->nErr==0 ) pCheck->nErr++;\n}\n\n/*\n** Invoke the progress handler, if appropriate.  Also check for an\n** interrupt.\n*/\nstatic void checkProgress(IntegrityCk *pCheck){\n  sqlite3 *db = pCheck->db;\n  if( AtomicLoad(&db->u1.isInterrupted) ){\n    pCheck->rc = SQLITE_INTERRUPT;\n    pCheck->nErr++;\n    pCheck->mxErr = 0;\n  }\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  if( db->xProgress ){\n    assert( db->nProgressOps>0 );\n    pCheck->nStep++;\n    if( (pCheck->nStep % db->nProgressOps)==0\n     && db->xProgress(db->pProgressArg)\n    ){\n      pCheck->rc = SQLITE_INTERRUPT;\n      pCheck->nErr++;\n      pCheck->mxErr = 0;\n    }\n  }\n#endif\n}\n\n/*\n** Append a message to the error message string.\n*/\nstatic void checkAppendMsg(\n  IntegrityCk *pCheck,\n  const char *zFormat,\n  ...\n){\n  va_list ap;\n  checkProgress(pCheck);\n  if( !pCheck->mxErr ) return;\n  pCheck->mxErr--;\n  pCheck->nErr++;\n  va_start(ap, zFormat);\n  if( pCheck->errMsg.nChar ){\n    sqlite3_str_append(&pCheck->errMsg, \"\\n\", 1);\n  }\n  if( pCheck->zPfx ){\n    sqlite3_str_appendf(&pCheck->errMsg, pCheck->zPfx,\n                        pCheck->v0, pCheck->v1, pCheck->v2);\n  }\n  sqlite3_str_vappendf(&pCheck->errMsg, zFormat, ap);\n  va_end(ap);\n  if( pCheck->errMsg.accError==SQLITE_NOMEM ){\n    checkOom(pCheck);\n  }\n}\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n\n/*\n** Return non-zero if the bit in the IntegrityCk.aPgRef[] array that\n** corresponds to page iPg is already set.\n*/\nstatic int getPageReferenced(IntegrityCk *pCheck, Pgno iPg){\n  assert( pCheck->aPgRef!=0 );\n  assert( iPg<=pCheck->nCkPage && sizeof(pCheck->aPgRef[0])==1 );\n  return (pCheck->aPgRef[iPg/8] & (1 << (iPg & 0x07)));\n}\n\n/*\n** Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg.\n*/\nstatic void setPageReferenced(IntegrityCk *pCheck, Pgno iPg){\n  assert( pCheck->aPgRef!=0 );\n  assert( iPg<=pCheck->nCkPage && sizeof(pCheck->aPgRef[0])==1 );\n  pCheck->aPgRef[iPg/8] |= (1 << (iPg & 0x07));\n}\n\n\n/*\n** Add 1 to the reference count for page iPage.  If this is the second\n** reference to the page, add an error message to pCheck->zErrMsg.\n** Return 1 if there are 2 or more references to the page and 0 if\n** if this is the first reference to the page.\n**\n** Also check that the page number is in bounds.\n*/\nstatic int checkRef(IntegrityCk *pCheck, Pgno iPage){\n  if( iPage>pCheck->nCkPage || iPage==0 ){\n    checkAppendMsg(pCheck, \"invalid page number %u\", iPage);\n    return 1;\n  }\n  if( getPageReferenced(pCheck, iPage) ){\n    checkAppendMsg(pCheck, \"2nd reference to page %u\", iPage);\n    return 1;\n  }\n  setPageReferenced(pCheck, iPage);\n  return 0;\n}\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n/*\n** Check that the entry in the pointer-map for page iChild maps to\n** page iParent, pointer type ptrType. If not, append an error message\n** to pCheck.\n*/\nstatic void checkPtrmap(\n  IntegrityCk *pCheck,   /* Integrity check context */\n  Pgno iChild,           /* Child page number */\n  u8 eType,              /* Expected pointer map type */\n  Pgno iParent           /* Expected pointer map parent page number */\n){\n  int rc;\n  u8 ePtrmapType;\n  Pgno iPtrmapParent;\n\n  rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent);\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) checkOom(pCheck);\n    checkAppendMsg(pCheck, \"Failed to read ptrmap key=%u\", iChild);\n    return;\n  }\n\n  if( ePtrmapType!=eType || iPtrmapParent!=iParent ){\n    checkAppendMsg(pCheck,\n      \"Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)\",\n      iChild, eType, iParent, ePtrmapType, iPtrmapParent);\n  }\n}\n#endif\n\n/*\n** Check the integrity of the freelist or of an overflow page list.\n** Verify that the number of pages on the list is N.\n*/\nstatic void checkList(\n  IntegrityCk *pCheck,  /* Integrity checking context */\n  int isFreeList,       /* True for a freelist.  False for overflow page list */\n  Pgno iPage,           /* Page number for first page in the list */\n  u32 N                 /* Expected number of pages in the list */\n){\n  int i;\n  u32 expected = N;\n  int nErrAtStart = pCheck->nErr;\n  while( iPage!=0 && pCheck->mxErr ){\n    DbPage *pOvflPage;\n    unsigned char *pOvflData;\n    if( checkRef(pCheck, iPage) ) break;\n    N--;\n    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){\n      checkAppendMsg(pCheck, \"failed to get page %u\", iPage);\n      break;\n    }\n    pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);\n    if( isFreeList ){\n      u32 n = (u32)get4byte(&pOvflData[4]);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      if( pCheck->pBt->autoVacuum ){\n        checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0);\n      }\n#endif\n      if( n>pCheck->pBt->usableSize/4-2 ){\n        checkAppendMsg(pCheck,\n           \"freelist leaf count too big on page %u\", iPage);\n        N--;\n      }else{\n        for(i=0; i<(int)n; i++){\n          Pgno iFreePage = get4byte(&pOvflData[8+i*4]);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n          if( pCheck->pBt->autoVacuum ){\n            checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0);\n          }\n#endif\n          checkRef(pCheck, iFreePage);\n        }\n        N -= n;\n      }\n    }\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    else{\n      /* If this database supports auto-vacuum and iPage is not the last\n      ** page in this overflow list, check that the pointer-map entry for\n      ** the following page matches iPage.\n      */\n      if( pCheck->pBt->autoVacuum && N>0 ){\n        i = get4byte(pOvflData);\n        checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage);\n      }\n    }\n#endif\n    iPage = get4byte(pOvflData);\n    sqlite3PagerUnref(pOvflPage);\n  }\n  if( N && nErrAtStart==pCheck->nErr ){\n    checkAppendMsg(pCheck,\n      \"%s is %u but should be %u\",\n      isFreeList ? \"size\" : \"overflow list length\",\n      expected-N, expected);\n  }\n}\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n/*\n** An implementation of a min-heap.\n**\n** aHeap[0] is the number of elements on the heap.  aHeap[1] is the\n** root element.  The daughter nodes of aHeap[N] are aHeap[N*2]\n** and aHeap[N*2+1].\n**\n** The heap property is this:  Every node is less than or equal to both\n** of its daughter nodes.  A consequence of the heap property is that the\n** root node aHeap[1] is always the minimum value currently in the heap.\n**\n** The btreeHeapInsert() routine inserts an unsigned 32-bit number onto\n** the heap, preserving the heap property.  The btreeHeapPull() routine\n** removes the root element from the heap (the minimum value in the heap)\n** and then moves other nodes around as necessary to preserve the heap\n** property.\n**\n** This heap is used for cell overlap and coverage testing.  Each u32\n** entry represents the span of a cell or freeblock on a btree page.\n** The upper 16 bits are the index of the first byte of a range and the\n** lower 16 bits are the index of the last byte of that range.\n*/\nstatic void btreeHeapInsert(u32 *aHeap, u32 x){\n  u32 j, i;\n  assert( aHeap!=0 );\n  i = ++aHeap[0];\n  aHeap[i] = x;\n  while( (j = i/2)>0 && aHeap[j]>aHeap[i] ){\n    x = aHeap[j];\n    aHeap[j] = aHeap[i];\n    aHeap[i] = x;\n    i = j;\n  }\n}\nstatic int btreeHeapPull(u32 *aHeap, u32 *pOut){\n  u32 j, i, x;\n  if( (x = aHeap[0])==0 ) return 0;\n  *pOut = aHeap[1];\n  aHeap[1] = aHeap[x];\n  aHeap[x] = 0xffffffff;\n  aHeap[0]--;\n  i = 1;\n  while( (j = i*2)<=aHeap[0] ){\n    if( aHeap[j]>aHeap[j+1] ) j++;\n    if( aHeap[i]<aHeap[j] ) break;\n    x = aHeap[i];\n    aHeap[i] = aHeap[j];\n    aHeap[j] = x;\n    i = j;\n  }\n  return 1;\n}\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n/*\n** Do various sanity checks on a single page of a tree.  Return\n** the tree depth.  Root pages return 0.  Parents of root pages\n** return 1, and so forth.\n**\n** These checks are done:\n**\n**      1.  Make sure that cells and freeblocks do not overlap\n**          but combine to completely cover the page.\n**      2.  Make sure integer cell keys are in order.\n**      3.  Check the integrity of overflow pages.\n**      4.  Recursively call checkTreePage on all children.\n**      5.  Verify that the depth of all children is the same.\n*/\nstatic int checkTreePage(\n  IntegrityCk *pCheck,  /* Context for the sanity check */\n  Pgno iPage,           /* Page number of the page to check */\n  i64 *piMinKey,        /* Write minimum integer primary key here */\n  i64 maxKey            /* Error if integer primary key greater than this */\n){\n  MemPage *pPage = 0;      /* The page being analyzed */\n  int i;                   /* Loop counter */\n  int rc;                  /* Result code from subroutine call */\n  int depth = -1, d2;      /* Depth of a subtree */\n  int pgno;                /* Page number */\n  int nFrag;               /* Number of fragmented bytes on the page */\n  int hdr;                 /* Offset to the page header */\n  int cellStart;           /* Offset to the start of the cell pointer array */\n  int nCell;               /* Number of cells */\n  int doCoverageCheck = 1; /* True if cell coverage checking should be done */\n  int keyCanBeEqual = 1;   /* True if IPK can be equal to maxKey\n                           ** False if IPK must be strictly less than maxKey */\n  u8 *data;                /* Page content */\n  u8 *pCell;               /* Cell content */\n  u8 *pCellIdx;            /* Next element of the cell pointer array */\n  BtShared *pBt;           /* The BtShared object that owns pPage */\n  u32 pc;                  /* Address of a cell */\n  u32 usableSize;          /* Usable size of the page */\n  u32 contentOffset;       /* Offset to the start of the cell content area */\n  u32 *heap = 0;           /* Min-heap used for checking cell coverage */\n  u32 x, prev = 0;         /* Next and previous entry on the min-heap */\n  const char *saved_zPfx = pCheck->zPfx;\n  int saved_v1 = pCheck->v1;\n  int saved_v2 = pCheck->v2;\n  u8 savedIsInit = 0;\n\n  /* Check that the page exists\n  */\n  checkProgress(pCheck);\n  if( pCheck->mxErr==0 ) goto end_of_check;\n  pBt = pCheck->pBt;\n  usableSize = pBt->usableSize;\n  if( iPage==0 ) return 0;\n  if( checkRef(pCheck, iPage) ) return 0;\n  pCheck->zPfx = \"Tree %u page %u: \";\n  pCheck->v1 = iPage;\n  if( (rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0 ){\n    checkAppendMsg(pCheck,\n       \"unable to get the page. error code=%d\", rc);\n    if( rc==SQLITE_IOERR_NOMEM ) pCheck->rc = SQLITE_NOMEM;\n    goto end_of_check;\n  }\n\n  /* Clear MemPage.isInit to make sure the corruption detection code in\n  ** btreeInitPage() is executed.  */\n  savedIsInit = pPage->isInit;\n  pPage->isInit = 0;\n  if( (rc = btreeInitPage(pPage))!=0 ){\n    assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */\n    checkAppendMsg(pCheck,\n                   \"btreeInitPage() returns error code %d\", rc);\n    goto end_of_check;\n  }\n  if( (rc = btreeComputeFreeSpace(pPage))!=0 ){\n    assert( rc==SQLITE_CORRUPT );\n    checkAppendMsg(pCheck, \"free space corruption\", rc);\n    goto end_of_check;\n  }\n  data = pPage->aData;\n  hdr = pPage->hdrOffset;\n\n  /* Set up for cell analysis */\n  pCheck->zPfx = \"Tree %u page %u cell %u: \";\n  contentOffset = get2byteNotZero(&data[hdr+5]);\n  assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */\n\n  /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the\n  ** number of cells on the page. */\n  nCell = get2byte(&data[hdr+3]);\n  assert( pPage->nCell==nCell );\n  if( pPage->leaf || pPage->intKey==0 ){\n    pCheck->nRow += nCell;\n  }\n\n  /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page\n  ** immediately follows the b-tree page header. */\n  cellStart = hdr + 12 - 4*pPage->leaf;\n  assert( pPage->aCellIdx==&data[cellStart] );\n  pCellIdx = &data[cellStart + 2*(nCell-1)];\n\n  if( !pPage->leaf ){\n    /* Analyze the right-child page of internal pages */\n    pgno = get4byte(&data[hdr+8]);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pBt->autoVacuum ){\n      pCheck->zPfx = \"Tree %u page %u right child: \";\n      checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);\n    }\n#endif\n    depth = checkTreePage(pCheck, pgno, &maxKey, maxKey);\n    keyCanBeEqual = 0;\n  }else{\n    /* For leaf pages, the coverage check will occur in the same loop\n    ** as the other cell checks, so initialize the heap.  */\n    heap = pCheck->heap;\n    heap[0] = 0;\n  }\n\n  /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte\n  ** integer offsets to the cell contents. */\n  for(i=nCell-1; i>=0 && pCheck->mxErr; i--){\n    CellInfo info;\n\n    /* Check cell size */\n    pCheck->v2 = i;\n    assert( pCellIdx==&data[cellStart + i*2] );\n    pc = get2byteAligned(pCellIdx);\n    pCellIdx -= 2;\n    if( pc<contentOffset || pc>usableSize-4 ){\n      checkAppendMsg(pCheck, \"Offset %u out of range %u..%u\",\n                             pc, contentOffset, usableSize-4);\n      doCoverageCheck = 0;\n      continue;\n    }\n    pCell = &data[pc];\n    pPage->xParseCell(pPage, pCell, &info);\n    if( pc+info.nSize>usableSize ){\n      checkAppendMsg(pCheck, \"Extends off end of page\");\n      doCoverageCheck = 0;\n      continue;\n    }\n\n    /* Check for integer primary key out of range */\n    if( pPage->intKey ){\n      if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){\n        checkAppendMsg(pCheck, \"Rowid %lld out of order\", info.nKey);\n      }\n      maxKey = info.nKey;\n      keyCanBeEqual = 0;     /* Only the first key on the page may ==maxKey */\n    }\n\n    /* Check the content overflow list */\n    if( info.nPayload>info.nLocal ){\n      u32 nPage;       /* Number of pages on the overflow chain */\n      Pgno pgnoOvfl;   /* First page of the overflow chain */\n      assert( pc + info.nSize - 4 <= usableSize );\n      nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);\n      pgnoOvfl = get4byte(&pCell[info.nSize - 4]);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      if( pBt->autoVacuum ){\n        checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage);\n      }\n#endif\n      checkList(pCheck, 0, pgnoOvfl, nPage);\n    }\n\n    if( !pPage->leaf ){\n      /* Check sanity of left child page for internal pages */\n      pgno = get4byte(pCell);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      if( pBt->autoVacuum ){\n        checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);\n      }\n#endif\n      d2 = checkTreePage(pCheck, pgno, &maxKey, maxKey);\n      keyCanBeEqual = 0;\n      if( d2!=depth ){\n        checkAppendMsg(pCheck, \"Child page depth differs\");\n        depth = d2;\n      }\n    }else{\n      /* Populate the coverage-checking heap for leaf pages */\n      btreeHeapInsert(heap, (pc<<16)|(pc+info.nSize-1));\n    }\n  }\n  *piMinKey = maxKey;\n\n  /* Check for complete coverage of the page\n  */\n  pCheck->zPfx = 0;\n  if( doCoverageCheck && pCheck->mxErr>0 ){\n    /* For leaf pages, the min-heap has already been initialized and the\n    ** cells have already been inserted.  But for internal pages, that has\n    ** not yet been done, so do it now */\n    if( !pPage->leaf ){\n      heap = pCheck->heap;\n      heap[0] = 0;\n      for(i=nCell-1; i>=0; i--){\n        u32 size;\n        pc = get2byteAligned(&data[cellStart+i*2]);\n        size = pPage->xCellSize(pPage, &data[pc]);\n        btreeHeapInsert(heap, (pc<<16)|(pc+size-1));\n      }\n    }\n    assert( heap!=0 );\n    /* Add the freeblocks to the min-heap\n    **\n    ** EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header\n    ** is the offset of the first freeblock, or zero if there are no\n    ** freeblocks on the page.\n    */\n    i = get2byte(&data[hdr+1]);\n    while( i>0 ){\n      int size, j;\n      assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */\n      size = get2byte(&data[i+2]);\n      assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */\n      btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));\n      /* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a\n      ** big-endian integer which is the offset in the b-tree page of the next\n      ** freeblock in the chain, or zero if the freeblock is the last on the\n      ** chain. */\n      j = get2byte(&data[i]);\n      /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of\n      ** increasing offset. */\n      assert( j==0 || j>i+size );     /* Enforced by btreeComputeFreeSpace() */\n      assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */\n      i = j;\n    }\n    /* Analyze the min-heap looking for overlap between cells and/or\n    ** freeblocks, and counting the number of untracked bytes in nFrag.\n    **\n    ** Each min-heap entry is of the form:    (start_address<<16)|end_address.\n    ** There is an implied first entry the covers the page header, the cell\n    ** pointer index, and the gap between the cell pointer index and the start\n    ** of cell content.\n    **\n    ** The loop below pulls entries from the min-heap in order and compares\n    ** the start_address against the previous end_address.  If there is an\n    ** overlap, that means bytes are used multiple times.  If there is a gap,\n    ** that gap is added to the fragmentation count.\n    */\n    nFrag = 0;\n    prev = contentOffset - 1;   /* Implied first min-heap entry */\n    while( btreeHeapPull(heap,&x) ){\n      if( (prev&0xffff)>=(x>>16) ){\n        checkAppendMsg(pCheck,\n          \"Multiple uses for byte %u of page %u\", x>>16, iPage);\n        break;\n      }else{\n        nFrag += (x>>16) - (prev&0xffff) - 1;\n        prev = x;\n      }\n    }\n    nFrag += usableSize - (prev&0xffff) - 1;\n    /* EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments\n    ** is stored in the fifth field of the b-tree page header.\n    ** EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the\n    ** number of fragmented free bytes within the cell content area.\n    */\n    if( heap[0]==0 && nFrag!=data[hdr+7] ){\n      checkAppendMsg(pCheck,\n          \"Fragmentation of %u bytes reported as %u on page %u\",\n          nFrag, data[hdr+7], iPage);\n    }\n  }\n\nend_of_check:\n  if( !doCoverageCheck ) pPage->isInit = savedIsInit;\n  releasePage(pPage);\n  pCheck->zPfx = saved_zPfx;\n  pCheck->v1 = saved_v1;\n  pCheck->v2 = saved_v2;\n  return depth+1;\n}\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n/*\n** This routine does a complete check of the given BTree file.  aRoot[] is\n** an array of pages numbers were each page number is the root page of\n** a table.  nRoot is the number of entries in aRoot.\n**\n** A read-only or read-write transaction must be opened before calling\n** this function.\n**\n** Write the number of error seen in *pnErr.  Except for some memory\n** allocation errors,  an error message held in memory obtained from\n** malloc is returned if *pnErr is non-zero.  If *pnErr==0 then NULL is\n** returned.  If a memory allocation error occurs, NULL is returned.\n**\n** If the first entry in aRoot[] is 0, that indicates that the list of\n** root pages is incomplete.  This is a \"partial integrity-check\".  This\n** happens when performing an integrity check on a single table.  The\n** zero is skipped, of course.  But in addition, the freelist checks\n** and the checks to make sure every page is referenced are also skipped,\n** since obviously it is not possible to know which pages are covered by\n** the unverified btrees.  Except, if aRoot[1] is 1, then the freelist\n** checks are still performed.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIntegrityCheck(\n  sqlite3 *db,  /* Database connection that is running the check */\n  Btree *p,     /* The btree to be checked */\n  Pgno *aRoot,  /* An array of root pages numbers for individual trees */\n  Mem *aCnt,    /* Memory cells to write counts for each tree to */\n  int nRoot,    /* Number of entries in aRoot[] */\n  int mxErr,    /* Stop reporting errors after this many */\n  int *pnErr,   /* OUT: Write number of errors seen to this variable */\n  char **pzOut  /* OUT: Write the error message string here */\n){\n  Pgno i;\n  IntegrityCk sCheck;\n  BtShared *pBt = p->pBt;\n  u64 savedDbFlags = pBt->db->flags;\n  char zErr[100];\n  int bPartial = 0;            /* True if not checking all btrees */\n  int bCkFreelist = 1;         /* True to scan the freelist */\n  VVA_ONLY( int nRef );\n\n  assert( nRoot>0 );\n  assert( aCnt!=0 );\n\n  /* aRoot[0]==0 means this is a partial check */\n  if( aRoot[0]==0 ){\n    assert( nRoot>1 );\n    bPartial = 1;\n    if( aRoot[1]!=1 ) bCkFreelist = 0;\n  }\n\n  sqlite3BtreeEnter(p);\n  assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE );\n  VVA_ONLY( nRef = sqlite3PagerRefcount(pBt->pPager) );\n  assert( nRef>=0 );\n  memset(&sCheck, 0, sizeof(sCheck));\n  sCheck.db = db;\n  sCheck.pBt = pBt;\n  sCheck.pPager = pBt->pPager;\n  sCheck.nCkPage = btreePagecount(sCheck.pBt);\n  sCheck.mxErr = mxErr;\n  sqlite3StrAccumInit(&sCheck.errMsg, 0, zErr, sizeof(zErr), SQLITE_MAX_LENGTH);\n  sCheck.errMsg.printfFlags = SQLITE_PRINTF_INTERNAL;\n  if( sCheck.nCkPage==0 ){\n    goto integrity_ck_cleanup;\n  }\n\n  sCheck.aPgRef = sqlite3MallocZero((sCheck.nCkPage / 8)+ 1);\n  if( !sCheck.aPgRef ){\n    checkOom(&sCheck);\n    goto integrity_ck_cleanup;\n  }\n  sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize );\n  if( sCheck.heap==0 ){\n    checkOom(&sCheck);\n    goto integrity_ck_cleanup;\n  }\n\n  i = PENDING_BYTE_PAGE(pBt);\n  if( i<=sCheck.nCkPage ) setPageReferenced(&sCheck, i);\n\n  /* Check the integrity of the freelist\n  */\n  if( bCkFreelist ){\n    sCheck.zPfx = \"Freelist: \";\n    checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),\n              get4byte(&pBt->pPage1->aData[36]));\n    sCheck.zPfx = 0;\n  }\n\n  /* Check all the tables.\n  */\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  if( !bPartial ){\n    if( pBt->autoVacuum ){\n      Pgno mx = 0;\n      Pgno mxInHdr;\n      for(i=0; (int)i<nRoot; i++) if( mx<aRoot[i] ) mx = aRoot[i];\n      mxInHdr = get4byte(&pBt->pPage1->aData[52]);\n      if( mx!=mxInHdr ){\n        checkAppendMsg(&sCheck,\n          \"max rootpage (%u) disagrees with header (%u)\",\n          mx, mxInHdr\n        );\n      }\n    }else if( get4byte(&pBt->pPage1->aData[64])!=0 ){\n      checkAppendMsg(&sCheck,\n        \"incremental_vacuum enabled with a max rootpage of zero\"\n      );\n    }\n  }\n#endif\n  testcase( pBt->db->flags & SQLITE_CellSizeCk );\n  pBt->db->flags &= ~(u64)SQLITE_CellSizeCk;\n  for(i=0; (int)i<nRoot && sCheck.mxErr; i++){\n    sCheck.nRow = 0;\n    if( aRoot[i] ){\n      i64 notUsed;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n      if( pBt->autoVacuum && aRoot[i]>1 && !bPartial ){\n        checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0);\n      }\n#endif\n      sCheck.v0 = aRoot[i];\n      checkTreePage(&sCheck, aRoot[i], &notUsed, LARGEST_INT64);\n    }\n    sqlite3MemSetArrayInt64(aCnt, i, sCheck.nRow);\n  }\n  pBt->db->flags = savedDbFlags;\n\n  /* Make sure every page in the file is referenced\n  */\n  if( !bPartial ){\n    for(i=1; i<=sCheck.nCkPage && sCheck.mxErr; i++){\n#ifdef SQLITE_OMIT_AUTOVACUUM\n      if( getPageReferenced(&sCheck, i)==0 ){\n        checkAppendMsg(&sCheck, \"Page %u: never used\", i);\n      }\n#else\n      /* If the database supports auto-vacuum, make sure no tables contain\n      ** references to pointer-map pages.\n      */\n      if( getPageReferenced(&sCheck, i)==0 &&\n         (PTRMAP_PAGENO(pBt, i)!=i || !pBt->autoVacuum) ){\n        checkAppendMsg(&sCheck, \"Page %u: never used\", i);\n      }\n      if( getPageReferenced(&sCheck, i)!=0 &&\n         (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){\n        checkAppendMsg(&sCheck, \"Page %u: pointer map referenced\", i);\n      }\n#endif\n    }\n  }\n\n  /* Clean  up and report errors.\n  */\nintegrity_ck_cleanup:\n  sqlite3PageFree(sCheck.heap);\n  sqlite3_free(sCheck.aPgRef);\n  *pnErr = sCheck.nErr;\n  if( sCheck.nErr==0 ){\n    sqlite3_str_reset(&sCheck.errMsg);\n    *pzOut = 0;\n  }else{\n    *pzOut = sqlite3StrAccumFinish(&sCheck.errMsg);\n  }\n  /* Make sure this analysis did not leave any unref() pages. */\n  assert( nRef==sqlite3PagerRefcount(pBt->pPager) );\n  sqlite3BtreeLeave(p);\n  return sCheck.rc;\n}\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n/*\n** Return the full pathname of the underlying database file.  Return\n** an empty string if the database is in-memory or a TEMP database.\n**\n** The pager filename is invariant as long as the pager is\n** open so it is safe to access without the BtShared mutex.\n*/\nSQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *p){\n  assert( p->pBt->pPager!=0 );\n  return sqlite3PagerFilename(p->pBt->pPager, 1);\n}\n\n/*\n** Return the pathname of the journal file for this database. The return\n** value of this routine is the same regardless of whether the journal file\n** has been created or not.\n**\n** The pager journal filename is invariant as long as the pager is\n** open so it is safe to access without the BtShared mutex.\n*/\nSQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){\n  assert( p->pBt->pPager!=0 );\n  return sqlite3PagerJournalname(p->pBt->pPager);\n}\n\n/*\n** Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE\n** to describe the current transaction state of Btree p.\n*/\nSQLITE_PRIVATE int sqlite3BtreeTxnState(Btree *p){\n  assert( p==0 || sqlite3_mutex_held(p->db->mutex) );\n  return p ? p->inTrans : 0;\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Run a checkpoint on the Btree passed as the first argument.\n**\n** Return SQLITE_LOCKED if this or any other connection has an open\n** transaction on the shared-cache the argument Btree is connected to.\n**\n** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree *p, int eMode, int *pnLog, int *pnCkpt){\n  int rc = SQLITE_OK;\n  if( p ){\n    BtShared *pBt = p->pBt;\n    sqlite3BtreeEnter(p);\n    if( pBt->inTransaction!=TRANS_NONE ){\n      rc = SQLITE_LOCKED;\n    }else{\n      rc = sqlite3PagerCheckpoint(pBt->pPager, p->db, eMode, pnLog, pnCkpt);\n    }\n    sqlite3BtreeLeave(p);\n  }\n  return rc;\n}\n#endif\n\n/*\n** Return true if there is currently a backup running on Btree p.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree *p){\n  assert( p );\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  return p->nBackup!=0;\n}\n\n/*\n** This function returns a pointer to a blob of memory associated with\n** a single shared-btree. The memory is used by client code for its own\n** purposes (for example, to store a high-level schema associated with\n** the shared-btree). The btree layer manages reference counting issues.\n**\n** The first time this is called on a shared-btree, nBytes bytes of memory\n** are allocated, zeroed, and returned to the caller. For each subsequent\n** call the nBytes parameter is ignored and a pointer to the same blob\n** of memory returned.\n**\n** If the nBytes parameter is 0 and the blob of memory has not yet been\n** allocated, a null pointer is returned. If the blob has already been\n** allocated, it is returned as normal.\n**\n** Just before the shared-btree is closed, the function passed as the\n** xFree argument when the memory allocation was made is invoked on the\n** blob of allocated memory. The xFree function should not call sqlite3_free()\n** on the memory, the btree layer does that.\n*/\nSQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){\n  BtShared *pBt = p->pBt;\n  assert( nBytes==0 || nBytes==sizeof(Schema) );\n  sqlite3BtreeEnter(p);\n  if( !pBt->pSchema && nBytes ){\n    pBt->pSchema = sqlite3DbMallocZero(0, nBytes);\n    pBt->xFreeSchema = xFree;\n  }\n  sqlite3BtreeLeave(p);\n  return pBt->pSchema;\n}\n\n/*\n** Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared\n** btree as the argument handle holds an exclusive lock on the\n** sqlite_schema table. Otherwise SQLITE_OK.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){\n  int rc;\n  UNUSED_PARAMETER(p);  /* only used in DEBUG builds */\n  assert( sqlite3_mutex_held(p->db->mutex) );\n  sqlite3BtreeEnter(p);\n  rc = querySharedCacheTableLock(p, SCHEMA_ROOT, READ_LOCK);\n  assert( rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE );\n  sqlite3BtreeLeave(p);\n  return rc;\n}\n\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** Obtain a lock on the table whose root page is iTab.  The\n** lock is a write lock if isWritelock is true or a read lock\n** if it is false.\n*/\nSQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){\n  int rc = SQLITE_OK;\n  assert( p->inTrans!=TRANS_NONE );\n  if( p->sharable ){\n    u8 lockType = READ_LOCK + isWriteLock;\n    assert( READ_LOCK+1==WRITE_LOCK );\n    assert( isWriteLock==0 || isWriteLock==1 );\n\n    sqlite3BtreeEnter(p);\n    rc = querySharedCacheTableLock(p, iTab, lockType);\n    if( rc==SQLITE_OK ){\n      rc = setSharedCacheTableLock(p, iTab, lockType);\n    }\n    sqlite3BtreeLeave(p);\n  }\n  return rc;\n}\n#endif\n\n#ifndef SQLITE_OMIT_INCRBLOB\n/*\n** Argument pCsr must be a cursor opened for writing on an\n** INTKEY table currently pointing at a valid table entry.\n** This function modifies the data stored as part of that entry.\n**\n** Only the data content may only be modified, it is not possible to\n** change the length of the data stored. If this function is called with\n** parameters that attempt to write past the end of the existing data,\n** no modifications are made and SQLITE_CORRUPT is returned.\n*/\nSQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){\n  int rc;\n  assert( cursorOwnsBtShared(pCsr) );\n  assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );\n  assert( pCsr->curFlags & BTCF_Incrblob );\n\n  rc = restoreCursorPosition(pCsr);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n  assert( pCsr->eState!=CURSOR_REQUIRESEEK );\n  if( pCsr->eState!=CURSOR_VALID ){\n    return SQLITE_ABORT;\n  }\n\n  /* Save the positions of all other cursors open on this table. This is\n  ** required in case any of them are holding references to an xFetch\n  ** version of the b-tree page modified by the accessPayload call below.\n  **\n  ** Note that pCsr must be open on a INTKEY table and saveCursorPosition()\n  ** and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence\n  ** saveAllCursors can only return SQLITE_OK.\n  */\n  VVA_ONLY(rc =) saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);\n  assert( rc==SQLITE_OK );\n\n  /* Check some assumptions:\n  **   (a) the cursor is open for writing,\n  **   (b) there is a read/write transaction open,\n  **   (c) the connection holds a write-lock on the table (if required),\n  **   (d) there are no conflicting read-locks, and\n  **   (e) the cursor points at a valid row of an intKey table.\n  */\n  if( (pCsr->curFlags & BTCF_WriteFlag)==0 ){\n    return SQLITE_READONLY;\n  }\n  assert( (pCsr->pBt->btsFlags & BTS_READ_ONLY)==0\n              && pCsr->pBt->inTransaction==TRANS_WRITE );\n  assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );\n  assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );\n  assert( pCsr->pPage->intKey );\n\n  return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);\n}\n\n/*\n** Mark this cursor as an incremental blob cursor.\n*/\nSQLITE_PRIVATE void sqlite3BtreeIncrblobCursor(BtCursor *pCur){\n  pCur->curFlags |= BTCF_Incrblob;\n  pCur->pBtree->hasIncrblobCur = 1;\n}\n#endif\n\n/*\n** Set both the \"read version\" (single byte at byte offset 18) and\n** \"write version\" (single byte at byte offset 19) fields in the database\n** header to iVersion.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){\n  BtShared *pBt = pBtree->pBt;\n  int rc;                         /* Return code */\n\n  assert( iVersion==1 || iVersion==2 );\n\n  /* If setting the version fields to 1, do not automatically open the\n  ** WAL connection, even if the version fields are currently set to 2.\n  */\n  pBt->btsFlags &= ~BTS_NO_WAL;\n  if( iVersion==1 ) pBt->btsFlags |= BTS_NO_WAL;\n\n  rc = sqlite3BtreeBeginTrans(pBtree, 0, 0);\n  if( rc==SQLITE_OK ){\n    u8 *aData = pBt->pPage1->aData;\n    if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){\n      rc = sqlite3BtreeBeginTrans(pBtree, 2, 0);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);\n        if( rc==SQLITE_OK ){\n          aData[18] = (u8)iVersion;\n          aData[19] = (u8)iVersion;\n        }\n      }\n    }\n  }\n\n  pBt->btsFlags &= ~BTS_NO_WAL;\n  return rc;\n}\n\n/*\n** Return true if the cursor has a hint specified.  This routine is\n** only used from within assert() statements\n*/\nSQLITE_PRIVATE int sqlite3BtreeCursorHasHint(BtCursor *pCsr, unsigned int mask){\n  return (pCsr->hints & mask)!=0;\n}\n\n/*\n** Return true if the given Btree is read-only.\n*/\nSQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *p){\n  return (p->pBt->btsFlags & BTS_READ_ONLY)!=0;\n}\n\n/*\n** Return the size of the header added to each page by this module.\n*/\nSQLITE_PRIVATE int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); }\n\n/*\n** If no transaction is active and the database is not a temp-db, clear\n** the in-memory pager cache.\n*/\nSQLITE_PRIVATE void sqlite3BtreeClearCache(Btree *p){\n  BtShared *pBt = p->pBt;\n  if( pBt->inTransaction==TRANS_NONE ){\n    sqlite3PagerClearCache(pBt->pPager);\n  }\n}\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE)\n/*\n** Return true if the Btree passed as the only argument is sharable.\n*/\nSQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){\n  return p->sharable;\n}\n\n/*\n** Return the number of connections to the BtShared object accessed by\n** the Btree handle passed as the only argument. For private caches\n** this is always 1. For shared caches it may be 1 or greater.\n*/\nSQLITE_PRIVATE int sqlite3BtreeConnectionCount(Btree *p){\n  testcase( p->sharable );\n  return p->pBt->nRef;\n}\n#endif\n\n/************** End of btree.c ***********************************************/\n/************** Begin file backup.c ******************************************/\n/*\n** 2009 January 28\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the implementation of the sqlite3_backup_XXX()\n** API functions and the related features.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"btreeInt.h\" */\n\n/*\n** Structure allocated for each backup operation.\n*/\nstruct sqlite3_backup {\n  sqlite3* pDestDb;        /* Destination database handle */\n  Btree *pDest;            /* Destination b-tree file */\n  u32 iDestSchema;         /* Original schema cookie in destination */\n  int bDestLocked;         /* True once a write-transaction is open on pDest */\n\n  Pgno iNext;              /* Page number of the next source page to copy */\n  sqlite3* pSrcDb;         /* Source database handle */\n  Btree *pSrc;             /* Source b-tree file */\n\n  int rc;                  /* Backup process error code */\n\n  /* These two variables are set by every call to backup_step(). They are\n  ** read by calls to backup_remaining() and backup_pagecount().\n  */\n  Pgno nRemaining;         /* Number of pages left to copy */\n  Pgno nPagecount;         /* Total number of pages to copy */\n\n  int isAttached;          /* True once backup has been registered with pager */\n  sqlite3_backup *pNext;   /* Next backup associated with source pager */\n};\n\n/*\n** THREAD SAFETY NOTES:\n**\n**   Once it has been created using backup_init(), a single sqlite3_backup\n**   structure may be accessed via two groups of thread-safe entry points:\n**\n**     * Via the sqlite3_backup_XXX() API function backup_step() and\n**       backup_finish(). Both these functions obtain the source database\n**       handle mutex and the mutex associated with the source BtShared\n**       structure, in that order.\n**\n**     * Via the BackupUpdate() and BackupRestart() functions, which are\n**       invoked by the pager layer to report various state changes in\n**       the page cache associated with the source database. The mutex\n**       associated with the source database BtShared structure will always\n**       be held when either of these functions are invoked.\n**\n**   The other sqlite3_backup_XXX() API functions, backup_remaining() and\n**   backup_pagecount() are not thread-safe functions. If they are called\n**   while some other thread is calling backup_step() or backup_finish(),\n**   the values returned may be invalid. There is no way for a call to\n**   BackupUpdate() or BackupRestart() to interfere with backup_remaining()\n**   or backup_pagecount().\n**\n**   Depending on the SQLite configuration, the database handles and/or\n**   the Btree objects may have their own mutexes that require locking.\n**   Non-sharable Btrees (in-memory databases for example), do not have\n**   associated mutexes.\n*/\n\n/*\n** Return a pointer corresponding to database zDb (i.e. \"main\", \"temp\")\n** in connection handle pDb. If such a database cannot be found, return\n** a NULL pointer and write an error message to pErrorDb.\n**\n** If the \"temp\" database is requested, it may need to be opened by this\n** function. If an error occurs while doing so, return 0 and write an\n** error message to pErrorDb.\n*/\nstatic Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){\n  int i = sqlite3FindDbName(pDb, zDb);\n\n  if( i==1 ){\n    Parse sParse;\n    int rc = 0;\n    sqlite3ParseObjectInit(&sParse,pDb);\n    if( sqlite3OpenTempDatabase(&sParse) ){\n      sqlite3ErrorWithMsg(pErrorDb, sParse.rc, \"%s\", sParse.zErrMsg);\n      rc = SQLITE_ERROR;\n    }\n    sqlite3DbFree(pErrorDb, sParse.zErrMsg);\n    sqlite3ParseObjectReset(&sParse);\n    if( rc ){\n      return 0;\n    }\n  }\n\n  if( i<0 ){\n    sqlite3ErrorWithMsg(pErrorDb, SQLITE_ERROR, \"unknown database %s\", zDb);\n    return 0;\n  }\n\n  return pDb->aDb[i].pBt;\n}\n\n/*\n** Attempt to set the page size of the destination to match the page size\n** of the source.\n*/\nstatic int setDestPgsz(sqlite3_backup *p){\n  int rc;\n  rc = sqlite3BtreeSetPageSize(p->pDest,sqlite3BtreeGetPageSize(p->pSrc),0,0);\n  return rc;\n}\n\n/*\n** Check that there is no open read-transaction on the b-tree passed as the\n** second argument. If there is not, return SQLITE_OK. Otherwise, if there\n** is an open read-transaction, return SQLITE_ERROR and leave an error\n** message in database handle db.\n*/\nstatic int checkReadTransaction(sqlite3 *db, Btree *p){\n  if( sqlite3BtreeTxnState(p)!=SQLITE_TXN_NONE ){\n    sqlite3ErrorWithMsg(db, SQLITE_ERROR, \"destination database is in use\");\n    return SQLITE_ERROR;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Create an sqlite3_backup process to copy the contents of zSrcDb from\n** connection handle pSrcDb to zDestDb in pDestDb. If successful, return\n** a pointer to the new sqlite3_backup object.\n**\n** If an error occurs, NULL is returned and an error code and error message\n** stored in database handle pDestDb.\n*/\nSQLITE_API sqlite3_backup *sqlite3_backup_init(\n  sqlite3* pDestDb,                     /* Database to write to */\n  const char *zDestDb,                  /* Name of database within pDestDb */\n  sqlite3* pSrcDb,                      /* Database connection to read from */\n  const char *zSrcDb                    /* Name of database within pSrcDb */\n){\n  sqlite3_backup *p;                    /* Value to return */\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(pSrcDb)||!sqlite3SafetyCheckOk(pDestDb) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n\n  /* Lock the source database handle. The destination database\n  ** handle is not locked in this routine, but it is locked in\n  ** sqlite3_backup_step(). The user is required to ensure that no\n  ** other thread accesses the destination handle for the duration\n  ** of the backup operation.  Any attempt to use the destination\n  ** database connection while a backup is in progress may cause\n  ** a malfunction or a deadlock.\n  */\n  sqlite3_mutex_enter(pSrcDb->mutex);\n  sqlite3_mutex_enter(pDestDb->mutex);\n\n  if( pSrcDb==pDestDb ){\n    sqlite3ErrorWithMsg(\n        pDestDb, SQLITE_ERROR, \"source and destination must be distinct\"\n    );\n    p = 0;\n  }else {\n    /* Allocate space for a new sqlite3_backup object...\n    ** EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a\n    ** call to sqlite3_backup_init() and is destroyed by a call to\n    ** sqlite3_backup_finish(). */\n    p = (sqlite3_backup *)sqlite3MallocZero(sizeof(sqlite3_backup));\n    if( !p ){\n      sqlite3Error(pDestDb, SQLITE_NOMEM_BKPT);\n    }\n  }\n\n  /* If the allocation succeeded, populate the new object. */\n  if( p ){\n    p->pSrc = findBtree(pDestDb, pSrcDb, zSrcDb);\n    p->pDest = findBtree(pDestDb, pDestDb, zDestDb);\n    p->pDestDb = pDestDb;\n    p->pSrcDb = pSrcDb;\n    p->iNext = 1;\n    p->isAttached = 0;\n\n    if( 0==p->pSrc || 0==p->pDest\n     || checkReadTransaction(pDestDb, p->pDest)!=SQLITE_OK\n     ){\n      /* One (or both) of the named databases did not exist or an OOM\n      ** error was hit. Or there is a transaction open on the destination\n      ** database. The error has already been written into the pDestDb\n      ** handle. All that is left to do here is free the sqlite3_backup\n      ** structure.  */\n      sqlite3_free(p);\n      p = 0;\n    }\n  }\n  if( p ){\n    p->pSrc->nBackup++;\n  }\n\n  sqlite3_mutex_leave(pDestDb->mutex);\n  sqlite3_mutex_leave(pSrcDb->mutex);\n  return p;\n}\n\n/*\n** Argument rc is an SQLite error code. Return true if this error is\n** considered fatal if encountered during a backup operation. All errors\n** are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.\n*/\nstatic int isFatalError(int rc){\n  return (rc!=SQLITE_OK && rc!=SQLITE_BUSY && ALWAYS(rc!=SQLITE_LOCKED));\n}\n\n/*\n** Parameter zSrcData points to a buffer containing the data for\n** page iSrcPg from the source database. Copy this data into the\n** destination database.\n*/\nstatic int backupOnePage(\n  sqlite3_backup *p,              /* Backup handle */\n  Pgno iSrcPg,                    /* Source database page to backup */\n  const u8 *zSrcData,             /* Source database page data */\n  int bUpdate                     /* True for an update, false otherwise */\n){\n  Pager * const pDestPager = sqlite3BtreePager(p->pDest);\n  const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);\n  int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);\n  const int nCopy = MIN(nSrcPgsz, nDestPgsz);\n  const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;\n  int rc = SQLITE_OK;\n  i64 iOff;\n\n  assert( sqlite3BtreeGetReserveNoMutex(p->pSrc)>=0 );\n  assert( p->bDestLocked );\n  assert( !isFatalError(p->rc) );\n  assert( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) );\n  assert( zSrcData );\n  assert( nSrcPgsz==nDestPgsz || sqlite3PagerIsMemdb(pDestPager)==0 );\n\n  /* This loop runs once for each destination page spanned by the source\n  ** page. For each iteration, variable iOff is set to the byte offset\n  ** of the destination page.\n  */\n  for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){\n    DbPage *pDestPg = 0;\n    Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;\n    if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;\n    if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg, 0))\n     && SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg))\n    ){\n      const u8 *zIn = &zSrcData[iOff%nSrcPgsz];\n      u8 *zDestData = sqlite3PagerGetData(pDestPg);\n      u8 *zOut = &zDestData[iOff%nDestPgsz];\n\n      /* Copy the data from the source page into the destination page.\n      ** Then clear the Btree layer MemPage.isInit flag. Both this module\n      ** and the pager code use this trick (clearing the first byte\n      ** of the page 'extra' space to invalidate the Btree layers\n      ** cached parse of the page). MemPage.isInit is marked\n      ** \"MUST BE FIRST\" for this purpose.\n      */\n      memcpy(zOut, zIn, nCopy);\n      ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;\n      if( iOff==0 && bUpdate==0 ){\n        sqlite3Put4byte(&zOut[28], sqlite3BtreeLastPage(p->pSrc));\n      }\n    }\n    sqlite3PagerUnref(pDestPg);\n  }\n\n  return rc;\n}\n\n/*\n** If pFile is currently larger than iSize bytes, then truncate it to\n** exactly iSize bytes. If pFile is not larger than iSize bytes, then\n** this function is a no-op.\n**\n** Return SQLITE_OK if everything is successful, or an SQLite error\n** code if an error occurs.\n*/\nstatic int backupTruncateFile(sqlite3_file *pFile, i64 iSize){\n  i64 iCurrent;\n  int rc = sqlite3OsFileSize(pFile, &iCurrent);\n  if( rc==SQLITE_OK && iCurrent>iSize ){\n    rc = sqlite3OsTruncate(pFile, iSize);\n  }\n  return rc;\n}\n\n/*\n** Register this backup object with the associated source pager for\n** callbacks when pages are changed or the cache invalidated.\n*/\nstatic void attachBackupObject(sqlite3_backup *p){\n  sqlite3_backup **pp;\n  assert( sqlite3BtreeHoldsMutex(p->pSrc) );\n  pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));\n  p->pNext = *pp;\n  *pp = p;\n  p->isAttached = 1;\n}\n\n/*\n** Copy nPage pages from the source b-tree to the destination.\n*/\nSQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){\n  int rc;\n  int destMode;       /* Destination journal mode */\n  int pgszSrc = 0;    /* Source page size */\n  int pgszDest = 0;   /* Destination page size */\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(p->pSrcDb->mutex);\n  sqlite3BtreeEnter(p->pSrc);\n  if( p->pDestDb ){\n    sqlite3_mutex_enter(p->pDestDb->mutex);\n  }\n\n  rc = p->rc;\n  if( !isFatalError(rc) ){\n    Pager * const pSrcPager = sqlite3BtreePager(p->pSrc);     /* Source pager */\n    Pager * const pDestPager = sqlite3BtreePager(p->pDest);   /* Dest pager */\n    int ii;                            /* Iterator variable */\n    int nSrcPage = -1;                 /* Size of source db in pages */\n    int bCloseTrans = 0;               /* True if src db requires unlocking */\n\n    /* If the source pager is currently in a write-transaction, return\n    ** SQLITE_BUSY immediately.\n    */\n    if( p->pDestDb && p->pSrc->pBt->inTransaction==TRANS_WRITE ){\n      rc = SQLITE_BUSY;\n    }else{\n      rc = SQLITE_OK;\n    }\n\n    /* If there is no open read-transaction on the source database, open\n    ** one now. If a transaction is opened here, then it will be closed\n    ** before this function exits.\n    */\n    if( rc==SQLITE_OK && SQLITE_TXN_NONE==sqlite3BtreeTxnState(p->pSrc) ){\n      rc = sqlite3BtreeBeginTrans(p->pSrc, 0, 0);\n      bCloseTrans = 1;\n    }\n\n    /* If the destination database has not yet been locked (i.e. if this\n    ** is the first call to backup_step() for the current backup operation),\n    ** try to set its page size to the same as the source database. This\n    ** is especially important on ZipVFS systems, as in that case it is\n    ** not possible to create a database file that uses one page size by\n    ** writing to it with another.  */\n    if( p->bDestLocked==0 && rc==SQLITE_OK && setDestPgsz(p)==SQLITE_NOMEM ){\n      rc = SQLITE_NOMEM;\n    }\n\n    /* Lock the destination database, if it is not locked already. */\n    if( SQLITE_OK==rc && p->bDestLocked==0\n     && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2,\n                                                (int*)&p->iDestSchema))\n    ){\n      p->bDestLocked = 1;\n    }\n\n    /* Do not allow backup if the destination database is in WAL mode\n    ** and the page sizes are different between source and destination */\n    pgszSrc = sqlite3BtreeGetPageSize(p->pSrc);\n    pgszDest = sqlite3BtreeGetPageSize(p->pDest);\n    destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));\n    if( SQLITE_OK==rc\n     && (destMode==PAGER_JOURNALMODE_WAL || sqlite3PagerIsMemdb(pDestPager))\n     && pgszSrc!=pgszDest\n    ){\n      rc = SQLITE_READONLY;\n    }\n\n    /* Now that there is a read-lock on the source database, query the\n    ** source pager for the number of pages in the database.\n    */\n    nSrcPage = (int)sqlite3BtreeLastPage(p->pSrc);\n    assert( nSrcPage>=0 );\n    for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){\n      const Pgno iSrcPg = p->iNext;                 /* Source page number */\n      if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){\n        DbPage *pSrcPg;                             /* Source page object */\n        rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg,PAGER_GET_READONLY);\n        if( rc==SQLITE_OK ){\n          rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);\n          sqlite3PagerUnref(pSrcPg);\n        }\n      }\n      p->iNext++;\n    }\n    if( rc==SQLITE_OK ){\n      p->nPagecount = nSrcPage;\n      p->nRemaining = nSrcPage+1-p->iNext;\n      if( p->iNext>(Pgno)nSrcPage ){\n        rc = SQLITE_DONE;\n      }else if( !p->isAttached ){\n        attachBackupObject(p);\n      }\n    }\n\n    /* Update the schema version field in the destination database. This\n    ** is to make sure that the schema-version really does change in\n    ** the case where the source and destination databases have the\n    ** same schema version.\n    */\n    if( rc==SQLITE_DONE ){\n      if( nSrcPage==0 ){\n        rc = sqlite3BtreeNewDb(p->pDest);\n        nSrcPage = 1;\n      }\n      if( rc==SQLITE_OK || rc==SQLITE_DONE ){\n        rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1);\n      }\n      if( rc==SQLITE_OK ){\n        if( p->pDestDb ){\n          sqlite3ResetAllSchemasOfConnection(p->pDestDb);\n        }\n        if( destMode==PAGER_JOURNALMODE_WAL ){\n          rc = sqlite3BtreeSetVersion(p->pDest, 2);\n        }\n      }\n      if( rc==SQLITE_OK ){\n        int nDestTruncate;\n        /* Set nDestTruncate to the final number of pages in the destination\n        ** database. The complication here is that the destination page\n        ** size may be different to the source page size.\n        **\n        ** If the source page size is smaller than the destination page size,\n        ** round up. In this case the call to sqlite3OsTruncate() below will\n        ** fix the size of the file. However it is important to call\n        ** sqlite3PagerTruncateImage() here so that any pages in the\n        ** destination file that lie beyond the nDestTruncate page mark are\n        ** journalled by PagerCommitPhaseOne() before they are destroyed\n        ** by the file truncation.\n        */\n        assert( pgszSrc==sqlite3BtreeGetPageSize(p->pSrc) );\n        assert( pgszDest==sqlite3BtreeGetPageSize(p->pDest) );\n        if( pgszSrc<pgszDest ){\n          int ratio = pgszDest/pgszSrc;\n          nDestTruncate = (nSrcPage+ratio-1)/ratio;\n          if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){\n            nDestTruncate--;\n          }\n        }else{\n          nDestTruncate = nSrcPage * (pgszSrc/pgszDest);\n        }\n        assert( nDestTruncate>0 );\n\n        if( pgszSrc<pgszDest ){\n          /* If the source page-size is smaller than the destination page-size,\n          ** two extra things may need to happen:\n          **\n          **   * The destination may need to be truncated, and\n          **\n          **   * Data stored on the pages immediately following the\n          **     pending-byte page in the source database may need to be\n          **     copied into the destination database.\n          */\n          const i64 iSize = (i64)pgszSrc * (i64)nSrcPage;\n          sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);\n          Pgno iPg;\n          int nDstPage;\n          i64 iOff;\n          i64 iEnd;\n\n          assert( pFile );\n          assert( nDestTruncate==0\n              || (i64)nDestTruncate*(i64)pgszDest >= iSize || (\n                nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)\n             && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+pgszDest\n          ));\n\n          /* This block ensures that all data required to recreate the original\n          ** database has been stored in the journal for pDestPager and the\n          ** journal synced to disk. So at this point we may safely modify\n          ** the database file in any way, knowing that if a power failure\n          ** occurs, the original database will be reconstructed from the\n          ** journal file.  */\n          sqlite3PagerPagecount(pDestPager, &nDstPage);\n          for(iPg=nDestTruncate; rc==SQLITE_OK && iPg<=(Pgno)nDstPage; iPg++){\n            if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){\n              DbPage *pPg;\n              rc = sqlite3PagerGet(pDestPager, iPg, &pPg, 0);\n              if( rc==SQLITE_OK ){\n                rc = sqlite3PagerWrite(pPg);\n                sqlite3PagerUnref(pPg);\n              }\n            }\n          }\n          if( rc==SQLITE_OK ){\n            rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 1);\n          }\n\n          /* Write the extra pages and truncate the database file as required */\n          iEnd = MIN(PENDING_BYTE + pgszDest, iSize);\n          for(\n            iOff=PENDING_BYTE+pgszSrc;\n            rc==SQLITE_OK && iOff<iEnd;\n            iOff+=pgszSrc\n          ){\n            PgHdr *pSrcPg = 0;\n            const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);\n            rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg, 0);\n            if( rc==SQLITE_OK ){\n              u8 *zData = sqlite3PagerGetData(pSrcPg);\n              rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);\n            }\n            sqlite3PagerUnref(pSrcPg);\n          }\n          if( rc==SQLITE_OK ){\n            rc = backupTruncateFile(pFile, iSize);\n          }\n\n          /* Sync the database file to disk. */\n          if( rc==SQLITE_OK ){\n            rc = sqlite3PagerSync(pDestPager, 0);\n          }\n        }else{\n          sqlite3PagerTruncateImage(pDestPager, nDestTruncate);\n          rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 0);\n        }\n\n        /* Finish committing the transaction to the destination database. */\n        if( SQLITE_OK==rc\n         && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest, 0))\n        ){\n          rc = SQLITE_DONE;\n        }\n      }\n    }\n\n    /* If bCloseTrans is true, then this function opened a read transaction\n    ** on the source database. Close the read transaction here. There is\n    ** no need to check the return values of the btree methods here, as\n    ** \"committing\" a read-only transaction cannot fail.\n    */\n    if( bCloseTrans ){\n      TESTONLY( int rc2 );\n      TESTONLY( rc2  = ) sqlite3BtreeCommitPhaseOne(p->pSrc, 0);\n      TESTONLY( rc2 |= ) sqlite3BtreeCommitPhaseTwo(p->pSrc, 0);\n      assert( rc2==SQLITE_OK );\n    }\n\n    if( rc==SQLITE_IOERR_NOMEM ){\n      rc = SQLITE_NOMEM_BKPT;\n    }\n    p->rc = rc;\n  }\n  if( p->pDestDb ){\n    sqlite3_mutex_leave(p->pDestDb->mutex);\n  }\n  sqlite3BtreeLeave(p->pSrc);\n  sqlite3_mutex_leave(p->pSrcDb->mutex);\n  return rc;\n}\n\n/*\n** Release all resources associated with an sqlite3_backup* handle.\n*/\nSQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){\n  sqlite3_backup **pp;                 /* Ptr to head of pagers backup list */\n  sqlite3 *pSrcDb;                     /* Source database connection */\n  int rc;                              /* Value to return */\n\n  /* Enter the mutexes */\n  if( p==0 ) return SQLITE_OK;\n  pSrcDb = p->pSrcDb;\n  sqlite3_mutex_enter(pSrcDb->mutex);\n  sqlite3BtreeEnter(p->pSrc);\n  if( p->pDestDb ){\n    sqlite3_mutex_enter(p->pDestDb->mutex);\n  }\n\n  /* Detach this backup from the source pager. */\n  if( p->pDestDb ){\n    p->pSrc->nBackup--;\n  }\n  if( p->isAttached ){\n    pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));\n    assert( pp!=0 );\n    while( *pp!=p ){\n      pp = &(*pp)->pNext;\n      assert( pp!=0 );\n    }\n    *pp = p->pNext;\n  }\n\n  /* If a transaction is still open on the Btree, roll it back. */\n  sqlite3BtreeRollback(p->pDest, SQLITE_OK, 0);\n\n  /* Set the error code of the destination database handle. */\n  rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc;\n  if( p->pDestDb ){\n    sqlite3Error(p->pDestDb, rc);\n\n    /* Exit the mutexes and free the backup context structure. */\n    sqlite3LeaveMutexAndCloseZombie(p->pDestDb);\n  }\n  sqlite3BtreeLeave(p->pSrc);\n  if( p->pDestDb ){\n    /* EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a\n    ** call to sqlite3_backup_init() and is destroyed by a call to\n    ** sqlite3_backup_finish(). */\n    sqlite3_free(p);\n  }\n  sqlite3LeaveMutexAndCloseZombie(pSrcDb);\n  return rc;\n}\n\n/*\n** Return the number of pages still to be backed up as of the most recent\n** call to sqlite3_backup_step().\n*/\nSQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return p->nRemaining;\n}\n\n/*\n** Return the total number of pages in the source database as of the most\n** recent call to sqlite3_backup_step().\n*/\nSQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return p->nPagecount;\n}\n\n/*\n** This function is called after the contents of page iPage of the\n** source database have been modified. If page iPage has already been\n** copied into the destination database, then the data written to the\n** destination is now invalidated. The destination copy of iPage needs\n** to be updated with the new data before the backup operation is\n** complete.\n**\n** It is assumed that the mutex associated with the BtShared object\n** corresponding to the source database is held when this function is\n** called.\n*/\nstatic SQLITE_NOINLINE void backupUpdate(\n  sqlite3_backup *p,\n  Pgno iPage,\n  const u8 *aData\n){\n  assert( p!=0 );\n  do{\n    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );\n    if( !isFatalError(p->rc) && iPage<p->iNext ){\n      /* The backup process p has already copied page iPage. But now it\n      ** has been modified by a transaction on the source pager. Copy\n      ** the new data into the backup.\n      */\n      int rc;\n      assert( p->pDestDb );\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      rc = backupOnePage(p, iPage, aData, 1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );\n      if( rc!=SQLITE_OK ){\n        p->rc = rc;\n      }\n    }\n  }while( (p = p->pNext)!=0 );\n}\nSQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){\n  if( pBackup ) backupUpdate(pBackup, iPage, aData);\n}\n\n/*\n** Restart the backup process. This is called when the pager layer\n** detects that the database has been modified by an external database\n** connection. In this case there is no way of knowing which of the\n** pages that have been copied into the destination database are still\n** valid and which are not, so the entire process needs to be restarted.\n**\n** It is assumed that the mutex associated with the BtShared object\n** corresponding to the source database is held when this function is\n** called.\n*/\nSQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *pBackup){\n  sqlite3_backup *p;                   /* Iterator variable */\n  for(p=pBackup; p; p=p->pNext){\n    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );\n    p->iNext = 1;\n  }\n}\n\n#ifndef SQLITE_OMIT_VACUUM\n/*\n** Copy the complete content of pBtFrom into pBtTo.  A transaction\n** must be active for both files.\n**\n** The size of file pTo may be reduced by this operation. If anything\n** goes wrong, the transaction on pTo is rolled back. If successful, the\n** transaction is committed before returning.\n*/\nSQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){\n  int rc;\n  sqlite3_file *pFd;              /* File descriptor for database pTo */\n  sqlite3_backup b;\n  sqlite3BtreeEnter(pTo);\n  sqlite3BtreeEnter(pFrom);\n\n  assert( sqlite3BtreeTxnState(pTo)==SQLITE_TXN_WRITE );\n  pFd = sqlite3PagerFile(sqlite3BtreePager(pTo));\n  if( pFd->pMethods ){\n    i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);\n    rc = sqlite3OsFileControl(pFd, SQLITE_FCNTL_OVERWRITE, &nByte);\n    if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;\n    if( rc ) goto copy_finished;\n  }\n\n  /* Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set\n  ** to 0. This is used by the implementations of sqlite3_backup_step()\n  ** and sqlite3_backup_finish() to detect that they are being called\n  ** from this function, not directly by the user.\n  */\n  memset(&b, 0, sizeof(b));\n  b.pSrcDb = pFrom->db;\n  b.pSrc = pFrom;\n  b.pDest = pTo;\n  b.iNext = 1;\n\n  /* 0x7FFFFFFF is the hard limit for the number of pages in a database\n  ** file. By passing this as the number of pages to copy to\n  ** sqlite3_backup_step(), we can guarantee that the copy finishes\n  ** within a single call (unless an error occurs). The assert() statement\n  ** checks this assumption - (p->rc) should be set to either SQLITE_DONE\n  ** or an error code.  */\n  sqlite3_backup_step(&b, 0x7FFFFFFF);\n  assert( b.rc!=SQLITE_OK );\n\n  rc = sqlite3_backup_finish(&b);\n  if( rc==SQLITE_OK ){\n    pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;\n  }else{\n    sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));\n  }\n\n  assert( sqlite3BtreeTxnState(pTo)!=SQLITE_TXN_WRITE );\ncopy_finished:\n  sqlite3BtreeLeave(pFrom);\n  sqlite3BtreeLeave(pTo);\n  return rc;\n}\n#endif /* SQLITE_OMIT_VACUUM */\n\n/************** End of backup.c **********************************************/\n/************** Begin file vdbemem.c *****************************************/\n/*\n** 2004 May 26\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code use to manipulate \"Mem\" structure.  A \"Mem\"\n** stores a single value in the VDBE.  Mem is an opaque structure visible\n** only within the VDBE.  Interface routines refer to a Mem using the\n** name sqlite_value\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n/* True if X is a power of two.  0 is considered a power of two here.\n** In other words, return true if X has at most one bit set.\n*/\n#define ISPOWEROF2(X)  (((X)&((X)-1))==0)\n\n#ifdef SQLITE_DEBUG\n/*\n** Check invariants on a Mem object.\n**\n** This routine is intended for use inside of assert() statements, like\n** this:    assert( sqlite3VdbeCheckMemInvariants(pMem) );\n*/\nSQLITE_PRIVATE int sqlite3VdbeCheckMemInvariants(Mem *p){\n  /* If MEM_Dyn is set then Mem.xDel!=0.\n  ** Mem.xDel might not be initialized if MEM_Dyn is clear.\n  */\n  assert( (p->flags & MEM_Dyn)==0 || p->xDel!=0 );\n\n  /* MEM_Dyn may only be set if Mem.szMalloc==0.  In this way we\n  ** ensure that if Mem.szMalloc>0 then it is safe to do\n  ** Mem.z = Mem.zMalloc without having to check Mem.flags&MEM_Dyn.\n  ** That saves a few cycles in inner loops. */\n  assert( (p->flags & MEM_Dyn)==0 || p->szMalloc==0 );\n\n  /* Cannot have more than one of MEM_Int, MEM_Real, or MEM_IntReal */\n  assert( ISPOWEROF2(p->flags & (MEM_Int|MEM_Real|MEM_IntReal)) );\n\n  if( p->flags & MEM_Null ){\n    /* Cannot be both MEM_Null and some other type */\n    assert( (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob|MEM_Agg))==0 );\n\n    /* If MEM_Null is set, then either the value is a pure NULL (the usual\n    ** case) or it is a pointer set using sqlite3_bind_pointer() or\n    ** sqlite3_result_pointer().  If a pointer, then MEM_Term must also be\n    ** set.\n    */\n    if( (p->flags & (MEM_Term|MEM_Subtype))==(MEM_Term|MEM_Subtype) ){\n      /* This is a pointer type.  There may be a flag to indicate what to\n      ** do with the pointer. */\n      assert( ((p->flags&MEM_Dyn)!=0 ? 1 : 0) +\n              ((p->flags&MEM_Ephem)!=0 ? 1 : 0) +\n              ((p->flags&MEM_Static)!=0 ? 1 : 0) <= 1 );\n\n      /* No other bits set */\n      assert( (p->flags & ~(MEM_Null|MEM_Term|MEM_Subtype|MEM_FromBind\n                           |MEM_Dyn|MEM_Ephem|MEM_Static))==0 );\n    }else{\n      /* A pure NULL might have other flags, such as MEM_Static, MEM_Dyn,\n      ** MEM_Ephem, MEM_Cleared, or MEM_Subtype */\n    }\n  }else{\n    /* The MEM_Cleared bit is only allowed on NULLs */\n    assert( (p->flags & MEM_Cleared)==0 );\n  }\n\n  /* The szMalloc field holds the correct memory allocation size */\n  assert( p->szMalloc==0\n       || (p->flags==MEM_Undefined\n           && p->szMalloc<=sqlite3DbMallocSize(p->db,p->zMalloc))\n       || p->szMalloc==sqlite3DbMallocSize(p->db,p->zMalloc));\n\n  /* If p holds a string or blob, the Mem.z must point to exactly\n  ** one of the following:\n  **\n  **   (1) Memory in Mem.zMalloc and managed by the Mem object\n  **   (2) Memory to be freed using Mem.xDel\n  **   (3) An ephemeral string or blob\n  **   (4) A static string or blob\n  */\n  if( (p->flags & (MEM_Str|MEM_Blob)) && p->n>0 ){\n    assert(\n      ((p->szMalloc>0 && p->z==p->zMalloc)? 1 : 0) +\n      ((p->flags&MEM_Dyn)!=0 ? 1 : 0) +\n      ((p->flags&MEM_Ephem)!=0 ? 1 : 0) +\n      ((p->flags&MEM_Static)!=0 ? 1 : 0) == 1\n    );\n  }\n  return 1;\n}\n#endif\n\n/*\n** Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal\n** into a buffer.\n*/\nstatic void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){\n  StrAccum acc;\n  assert( p->flags & (MEM_Int|MEM_Real|MEM_IntReal) );\n  assert( sz>22 );\n  if( p->flags & MEM_Int ){\n#if GCC_VERSION>=7000000\n    /* Work-around for GCC bug\n    ** https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 */\n    i64 x;\n    assert( (p->flags&MEM_Int)*2==sizeof(x) );\n    memcpy(&x, (char*)&p->u, (p->flags&MEM_Int)*2);\n    p->n = sqlite3Int64ToText(x, zBuf);\n#else\n    p->n = sqlite3Int64ToText(p->u.i, zBuf);\n#endif\n  }else{\n    sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0);\n    sqlite3_str_appendf(&acc, \"%!.15g\",\n         (p->flags & MEM_IntReal)!=0 ? (double)p->u.i : p->u.r);\n    assert( acc.zText==zBuf && acc.mxAlloc<=0 );\n    zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */\n    p->n = acc.nChar;\n  }\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Validity checks on pMem.  pMem holds a string.\n**\n** (1) Check that string value of pMem agrees with its integer or real value.\n** (2) Check that the string is correctly zero terminated\n**\n** A single int or real value always converts to the same strings.  But\n** many different strings can be converted into the same int or real.\n** If a table contains a numeric value and an index is based on the\n** corresponding string value, then it is important that the string be\n** derived from the numeric value, not the other way around, to ensure\n** that the index and table are consistent.  See ticket\n** https://sqlite.org/src/info/343634942dd54ab (2018-01-31) for\n** an example.\n**\n** This routine looks at pMem to verify that if it has both a numeric\n** representation and a string representation then the string rep has\n** been derived from the numeric and not the other way around.  It returns\n** true if everything is ok and false if there is a problem.\n**\n** This routine is for use inside of assert() statements only.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemValidStrRep(Mem *p){\n  Mem tmp;\n  char zBuf[100];\n  char *z;\n  int i, j, incr;\n  if( (p->flags & MEM_Str)==0 ) return 1;\n  if( p->db && p->db->mallocFailed ) return 1;\n  if( p->flags & MEM_Term ){\n    /* Insure that the string is properly zero-terminated.  Pay particular\n    ** attention to the case where p->n is odd */\n    if( p->szMalloc>0 && p->z==p->zMalloc ){\n      assert( p->enc==SQLITE_UTF8 || p->szMalloc >= ((p->n+1)&~1)+2 );\n      assert( p->enc!=SQLITE_UTF8 || p->szMalloc >= p->n+1 );\n    }\n    assert( p->z[p->n]==0 );\n    assert( p->enc==SQLITE_UTF8 || p->z[(p->n+1)&~1]==0 );\n    assert( p->enc==SQLITE_UTF8 || p->z[((p->n+1)&~1)+1]==0 );\n  }\n  if( (p->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 ) return 1;\n  memcpy(&tmp, p, sizeof(tmp));\n  vdbeMemRenderNum(sizeof(zBuf), zBuf, &tmp);\n  z = p->z;\n  i = j = 0;\n  incr = 1;\n  if( p->enc!=SQLITE_UTF8 ){\n    incr = 2;\n    if( p->enc==SQLITE_UTF16BE ) z++;\n  }\n  while( zBuf[j] ){\n    if( zBuf[j++]!=z[i] ) return 0;\n    i += incr;\n  }\n  return 1;\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** If pMem is an object with a valid string representation, this routine\n** ensures the internal encoding for the string representation is\n** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.\n**\n** If pMem is not a string object, or the encoding of the string\n** representation is already stored using the requested encoding, then this\n** routine is a no-op.\n**\n** SQLITE_OK is returned if the conversion is successful (or not required).\n** SQLITE_NOMEM may be returned if a malloc() fails during conversion\n** between formats.\n*/\nSQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){\n#ifndef SQLITE_OMIT_UTF16\n  int rc;\n#endif\n  assert( pMem!=0 );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE\n           || desiredEnc==SQLITE_UTF16BE );\n  if( !(pMem->flags&MEM_Str) ){\n    pMem->enc = desiredEnc;\n    return SQLITE_OK;\n  }\n  if( pMem->enc==desiredEnc ){\n    return SQLITE_OK;\n  }\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n#ifdef SQLITE_OMIT_UTF16\n  return SQLITE_ERROR;\n#else\n\n  /* MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned,\n  ** then the encoding of the value may not have changed.\n  */\n  rc = sqlite3VdbeMemTranslate(pMem, (u8)desiredEnc);\n  assert(rc==SQLITE_OK    || rc==SQLITE_NOMEM);\n  assert(rc==SQLITE_OK    || pMem->enc!=desiredEnc);\n  assert(rc==SQLITE_NOMEM || pMem->enc==desiredEnc);\n  return rc;\n#endif\n}\n\n/*\n** Make sure pMem->z points to a writable allocation of at least n bytes.\n**\n** If the bPreserve argument is true, then copy of the content of\n** pMem->z into the new allocation.  pMem must be either a string or\n** blob if bPreserve is true.  If bPreserve is false, any prior content\n** in pMem->z is discarded.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){\n  assert( sqlite3VdbeCheckMemInvariants(pMem) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  testcase( pMem->db==0 );\n\n  /* If the bPreserve flag is set to true, then the memory cell must already\n  ** contain a valid string or blob value.  */\n  assert( bPreserve==0 || pMem->flags&(MEM_Blob|MEM_Str) );\n  testcase( bPreserve && pMem->z==0 );\n\n  assert( pMem->szMalloc==0\n       || (pMem->flags==MEM_Undefined\n           && pMem->szMalloc<=sqlite3DbMallocSize(pMem->db,pMem->zMalloc))\n       || pMem->szMalloc==sqlite3DbMallocSize(pMem->db,pMem->zMalloc));\n  if( pMem->szMalloc>0 && bPreserve && pMem->z==pMem->zMalloc ){\n    if( pMem->db ){\n      pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);\n    }else{\n      pMem->zMalloc = sqlite3Realloc(pMem->z, n);\n      if( pMem->zMalloc==0 ) sqlite3_free(pMem->z);\n      pMem->z = pMem->zMalloc;\n    }\n    bPreserve = 0;\n  }else{\n    if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);\n    pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);\n  }\n  if( pMem->zMalloc==0 ){\n    sqlite3VdbeMemSetNull(pMem);\n    pMem->z = 0;\n    pMem->szMalloc = 0;\n    return SQLITE_NOMEM_BKPT;\n  }else{\n    pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc);\n  }\n\n  if( bPreserve && pMem->z ){\n    assert( pMem->z!=pMem->zMalloc );\n    memcpy(pMem->zMalloc, pMem->z, pMem->n);\n  }\n  if( (pMem->flags&MEM_Dyn)!=0 ){\n    assert( pMem->xDel!=0 && pMem->xDel!=SQLITE_DYNAMIC );\n    pMem->xDel((void *)(pMem->z));\n  }\n\n  pMem->z = pMem->zMalloc;\n  pMem->flags &= ~(MEM_Dyn|MEM_Ephem|MEM_Static);\n  return SQLITE_OK;\n}\n\n/*\n** Change the pMem->zMalloc allocation to be at least szNew bytes.\n** If pMem->zMalloc already meets or exceeds the requested size, this\n** routine is a no-op.\n**\n** Any prior string or blob content in the pMem object may be discarded.\n** The pMem->xDel destructor is called, if it exists.  Though MEM_Str\n** and MEM_Blob values may be discarded, MEM_Int, MEM_Real, MEM_IntReal,\n** and MEM_Null values are preserved.\n**\n** Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM)\n** if unable to complete the resizing.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int szNew){\n  assert( CORRUPT_DB || szNew>0 );\n  assert( (pMem->flags & MEM_Dyn)==0 || pMem->szMalloc==0 );\n  if( pMem->szMalloc<szNew ){\n    return sqlite3VdbeMemGrow(pMem, szNew, 0);\n  }\n  assert( (pMem->flags & MEM_Dyn)==0 );\n  pMem->z = pMem->zMalloc;\n  pMem->flags &= (MEM_Null|MEM_Int|MEM_Real|MEM_IntReal);\n  return SQLITE_OK;\n}\n\n/*\n** If pMem is already a string, detect if it is a zero-terminated\n** string, or make it into one if possible, and mark it as such.\n**\n** This is an optimization.  Correct operation continues even if\n** this routine is a no-op.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemZeroTerminateIfAble(Mem *pMem){\n  if( (pMem->flags & (MEM_Str|MEM_Term|MEM_Ephem|MEM_Static))!=MEM_Str ){\n    /* pMem must be a string, and it cannot be an ephemeral or static string */\n    return;\n  }\n  if( pMem->enc!=SQLITE_UTF8 ) return;\n  assert( pMem->z!=0 );\n  if( pMem->flags & MEM_Dyn ){\n    if( pMem->xDel==sqlite3_free\n     && sqlite3_msize(pMem->z) >= (u64)(pMem->n+1)\n    ){\n      pMem->z[pMem->n] = 0;\n      pMem->flags |= MEM_Term;\n      return;\n    }\n    if( pMem->xDel==sqlite3RCStrUnref ){\n      /* Blindly assume that all RCStr objects are zero-terminated */\n      pMem->flags |= MEM_Term;\n      return;\n    }\n  }else if( pMem->szMalloc >= pMem->n+1 ){\n    pMem->z[pMem->n] = 0;\n    pMem->flags |= MEM_Term;\n    return;\n  }\n}\n\n/*\n** It is already known that pMem contains an unterminated string.\n** Add the zero terminator.\n**\n** Three bytes of zero are added.  In this way, there is guaranteed\n** to be a double-zero byte at an even byte boundary in order to\n** terminate a UTF16 string, even if the initial size of the buffer\n** is an odd number of bytes.\n*/\nstatic SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){\n  if( sqlite3VdbeMemGrow(pMem, pMem->n+3, 1) ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  pMem->z[pMem->n] = 0;\n  pMem->z[pMem->n+1] = 0;\n  pMem->z[pMem->n+2] = 0;\n  pMem->flags |= MEM_Term;\n  return SQLITE_OK;\n}\n\n/*\n** Change pMem so that its MEM_Str or MEM_Blob value is stored in\n** MEM.zMalloc, where it can be safely written.\n**\n** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  if( (pMem->flags & (MEM_Str|MEM_Blob))!=0 ){\n    if( ExpandBlob(pMem) ) return SQLITE_NOMEM;\n    if( pMem->szMalloc==0 || pMem->z!=pMem->zMalloc ){\n      int rc = vdbeMemAddTerminator(pMem);\n      if( rc ) return rc;\n    }\n  }\n  pMem->flags &= ~MEM_Ephem;\n#ifdef SQLITE_DEBUG\n  pMem->pScopyFrom = 0;\n#endif\n\n  return SQLITE_OK;\n}\n\n/*\n** If the given Mem* has a zero-filled tail, turn it into an ordinary\n** blob stored in dynamically allocated space.\n*/\n#ifndef SQLITE_OMIT_INCRBLOB\nSQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){\n  int nByte;\n  assert( pMem!=0 );\n  assert( pMem->flags & MEM_Zero );\n  assert( (pMem->flags&MEM_Blob)!=0 || MemNullNochng(pMem) );\n  testcase( sqlite3_value_nochange(pMem) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n\n  /* Set nByte to the number of bytes required to store the expanded blob. */\n  nByte = pMem->n + pMem->u.nZero;\n  if( nByte<=0 ){\n    if( (pMem->flags & MEM_Blob)==0 ) return SQLITE_OK;\n    nByte = 1;\n  }\n  if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  assert( pMem->z!=0 );\n  assert( sqlite3DbMallocSize(pMem->db,pMem->z) >= nByte );\n\n  memset(&pMem->z[pMem->n], 0, pMem->u.nZero);\n  pMem->n += pMem->u.nZero;\n  pMem->flags &= ~(MEM_Zero|MEM_Term);\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** Make sure the given Mem is \\u0000 terminated.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  testcase( (pMem->flags & (MEM_Term|MEM_Str))==(MEM_Term|MEM_Str) );\n  testcase( (pMem->flags & (MEM_Term|MEM_Str))==0 );\n  if( (pMem->flags & (MEM_Term|MEM_Str))!=MEM_Str ){\n    return SQLITE_OK;   /* Nothing to do */\n  }else{\n    return vdbeMemAddTerminator(pMem);\n  }\n}\n\n/*\n** Add MEM_Str to the set of representations for the given Mem.  This\n** routine is only called if pMem is a number of some kind, not a NULL\n** or a BLOB.\n**\n** Existing representations MEM_Int, MEM_Real, or MEM_IntReal are invalidated\n** if bForce is true but are retained if bForce is false.\n**\n** A MEM_Null value will never be passed to this function. This function is\n** used for converting values to text for returning to the user (i.e. via\n** sqlite3_value_text()), or for ensuring that values to be used as btree\n** keys are strings. In the former case a NULL pointer is returned the\n** user and the latter is an internal programming error.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){\n  const int nByte = 32;\n\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( !(pMem->flags&MEM_Zero) );\n  assert( !(pMem->flags&(MEM_Str|MEM_Blob)) );\n  assert( pMem->flags&(MEM_Int|MEM_Real|MEM_IntReal) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n\n  if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){\n    pMem->enc = 0;\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  vdbeMemRenderNum(nByte, pMem->z, pMem);\n  assert( pMem->z!=0 );\n  assert( pMem->n==(int)sqlite3Strlen30NN(pMem->z) );\n  pMem->enc = SQLITE_UTF8;\n  pMem->flags |= MEM_Str|MEM_Term;\n  if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal);\n  sqlite3VdbeChangeEncoding(pMem, enc);\n  return SQLITE_OK;\n}\n\n/*\n** Memory cell pMem contains the context of an aggregate function.\n** This routine calls the finalize method for that function.  The\n** result of the aggregate is stored back into pMem.\n**\n** Return SQLITE_ERROR if the finalizer reports an error.  SQLITE_OK\n** otherwise.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){\n  sqlite3_context ctx;\n  Mem t;\n  assert( pFunc!=0 );\n  assert( pMem!=0 );\n  assert( pMem->db!=0 );\n  assert( pFunc->xFinalize!=0 );\n  assert( (pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef );\n  assert( sqlite3_mutex_held(pMem->db->mutex) );\n  memset(&ctx, 0, sizeof(ctx));\n  memset(&t, 0, sizeof(t));\n  t.flags = MEM_Null;\n  t.db = pMem->db;\n  ctx.pOut = &t;\n  ctx.pMem = pMem;\n  ctx.pFunc = pFunc;\n  ctx.enc = ENC(t.db);\n  pFunc->xFinalize(&ctx); /* IMP: R-24505-23230 */\n  assert( (pMem->flags & MEM_Dyn)==0 );\n  if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);\n  memcpy(pMem, &t, sizeof(t));\n  return ctx.isError;\n}\n\n/*\n** Memory cell pAccum contains the context of an aggregate function.\n** This routine calls the xValue method for that function and stores\n** the results in memory cell pMem.\n**\n** SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK\n** otherwise.\n*/\n#ifndef SQLITE_OMIT_WINDOWFUNC\nSQLITE_PRIVATE int sqlite3VdbeMemAggValue(Mem *pAccum, Mem *pOut, FuncDef *pFunc){\n  sqlite3_context ctx;\n  assert( pFunc!=0 );\n  assert( pFunc->xValue!=0 );\n  assert( (pAccum->flags & MEM_Null)!=0 || pFunc==pAccum->u.pDef );\n  assert( pAccum->db!=0 );\n  assert( sqlite3_mutex_held(pAccum->db->mutex) );\n  memset(&ctx, 0, sizeof(ctx));\n  sqlite3VdbeMemSetNull(pOut);\n  ctx.pOut = pOut;\n  ctx.pMem = pAccum;\n  ctx.pFunc = pFunc;\n  ctx.enc = ENC(pAccum->db);\n  pFunc->xValue(&ctx);\n  return ctx.isError;\n}\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** If the memory cell contains a value that must be freed by\n** invoking the external callback in Mem.xDel, then this routine\n** will free that value.  It also sets Mem.flags to MEM_Null.\n**\n** This is a helper routine for sqlite3VdbeMemSetNull() and\n** for sqlite3VdbeMemRelease().  Use those other routines as the\n** entry point for releasing Mem resources.\n*/\nstatic SQLITE_NOINLINE void vdbeMemClearExternAndSetNull(Mem *p){\n  assert( p->db==0 || sqlite3_mutex_held(p->db->mutex) );\n  assert( VdbeMemDynamic(p) );\n  if( p->flags&MEM_Agg ){\n    sqlite3VdbeMemFinalize(p, p->u.pDef);\n    assert( (p->flags & MEM_Agg)==0 );\n    testcase( p->flags & MEM_Dyn );\n  }\n  if( p->flags&MEM_Dyn ){\n    assert( p->xDel!=SQLITE_DYNAMIC && p->xDel!=0 );\n    p->xDel((void *)p->z);\n  }\n  p->flags = MEM_Null;\n}\n\n/*\n** Release memory held by the Mem p, both external memory cleared\n** by p->xDel and memory in p->zMalloc.\n**\n** This is a helper routine invoked by sqlite3VdbeMemRelease() in\n** the unusual case where there really is memory in p that needs\n** to be freed.\n*/\nstatic SQLITE_NOINLINE void vdbeMemClear(Mem *p){\n  if( VdbeMemDynamic(p) ){\n    vdbeMemClearExternAndSetNull(p);\n  }\n  if( p->szMalloc ){\n    sqlite3DbFreeNN(p->db, p->zMalloc);\n    p->szMalloc = 0;\n  }\n  p->z = 0;\n}\n\n/*\n** Release any memory resources held by the Mem.  Both the memory that is\n** free by Mem.xDel and the Mem.zMalloc allocation are freed.\n**\n** Use this routine prior to clean up prior to abandoning a Mem, or to\n** reset a Mem back to its minimum memory utilization.\n**\n** Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space\n** prior to inserting new content into the Mem.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){\n  assert( sqlite3VdbeCheckMemInvariants(p) );\n  if( VdbeMemDynamic(p) || p->szMalloc ){\n    vdbeMemClear(p);\n  }\n}\n\n/* Like sqlite3VdbeMemRelease() but faster for cases where we\n** know in advance that the Mem is not MEM_Dyn or MEM_Agg.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemReleaseMalloc(Mem *p){\n  assert( !VdbeMemDynamic(p) );\n  if( p->szMalloc ) vdbeMemClear(p);\n}\n\n/*\n** Return some kind of integer value which is the best we can do\n** at representing the value that *pMem describes as an integer.\n** If pMem is an integer, then the value is exact.  If pMem is\n** a floating-point then the value returned is the integer part.\n** If pMem is a string or blob, then we make an attempt to convert\n** it into an integer and return that.  If pMem represents an\n** an SQL-NULL value, return 0.\n**\n** If pMem represents a string value, its encoding might be changed.\n*/\nstatic SQLITE_NOINLINE i64 memIntValue(const Mem *pMem){\n  i64 value = 0;\n  sqlite3Atoi64(pMem->z, &value, pMem->n, pMem->enc);\n  return value;\n}\nSQLITE_PRIVATE i64 sqlite3VdbeIntValue(const Mem *pMem){\n  int flags;\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n  flags = pMem->flags;\n  if( flags & (MEM_Int|MEM_IntReal) ){\n    testcase( flags & MEM_IntReal );\n    return pMem->u.i;\n  }else if( flags & MEM_Real ){\n    return sqlite3RealToI64(pMem->u.r);\n  }else if( (flags & (MEM_Str|MEM_Blob))!=0 && pMem->z!=0 ){\n    return memIntValue(pMem);\n  }else{\n    return 0;\n  }\n}\n\n/*\n** Return the best representation of pMem that we can get into a\n** double.  If pMem is already a double or an integer, return its\n** value.  If it is a string or blob, try to convert it to a double.\n** If it is a NULL, return 0.0.\n*/\nstatic SQLITE_NOINLINE double memRealValue(Mem *pMem){\n  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n  double val = (double)0;\n  sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);\n  return val;\n}\nSQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n  if( pMem->flags & MEM_Real ){\n    return pMem->u.r;\n  }else if( pMem->flags & (MEM_Int|MEM_IntReal) ){\n    testcase( pMem->flags & MEM_IntReal );\n    return (double)pMem->u.i;\n  }else if( pMem->flags & (MEM_Str|MEM_Blob) ){\n    return memRealValue(pMem);\n  }else{\n    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n    return (double)0;\n  }\n}\n\n/*\n** Return 1 if pMem represents true, and return 0 if pMem represents false.\n** Return the value ifNull if pMem is NULL.\n*/\nSQLITE_PRIVATE int sqlite3VdbeBooleanValue(Mem *pMem, int ifNull){\n  testcase( pMem->flags & MEM_IntReal );\n  if( pMem->flags & (MEM_Int|MEM_IntReal) ) return pMem->u.i!=0;\n  if( pMem->flags & MEM_Null ) return ifNull;\n  return sqlite3VdbeRealValue(pMem)!=0.0;\n}\n\n/*\n** The MEM structure is already a MEM_Real or MEM_IntReal. Try to\n** make it a MEM_Int if we can.\n*/\nSQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->flags & (MEM_Real|MEM_IntReal) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n  if( pMem->flags & MEM_IntReal ){\n    MemSetTypeFlag(pMem, MEM_Int);\n  }else{\n    i64 ix = sqlite3RealToI64(pMem->u.r);\n\n    /* Only mark the value as an integer if\n    **\n    **    (1) the round-trip conversion real->int->real is a no-op, and\n    **    (2) The integer is neither the largest nor the smallest\n    **        possible integer (ticket #3922)\n    **\n    ** The second and third terms in the following conditional enforces\n    ** the second condition under the assumption that addition overflow causes\n    ** values to wrap around.\n    */\n    if( pMem->u.r==ix && ix>SMALLEST_INT64 && ix<LARGEST_INT64 ){\n      pMem->u.i = ix;\n      MemSetTypeFlag(pMem, MEM_Int);\n    }\n  }\n}\n\n/*\n** Convert pMem to type integer.  Invalidate any prior representations.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n  pMem->u.i = sqlite3VdbeIntValue(pMem);\n  MemSetTypeFlag(pMem, MEM_Int);\n  return SQLITE_OK;\n}\n\n/*\n** Convert pMem so that it is of type MEM_Real.\n** Invalidate any prior representations.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n  pMem->u.r = sqlite3VdbeRealValue(pMem);\n  MemSetTypeFlag(pMem, MEM_Real);\n  return SQLITE_OK;\n}\n\n/* Compare a floating point value to an integer.  Return true if the two\n** values are the same within the precision of the floating point value.\n**\n** This function assumes that i was obtained by assignment from r1.\n**\n** For some versions of GCC on 32-bit machines, if you do the more obvious\n** comparison of \"r1==(double)i\" you sometimes get an answer of false even\n** though the r1 and (double)i values are bit-for-bit the same.\n*/\nSQLITE_PRIVATE int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){\n  double r2 = (double)i;\n  return r1==0.0\n      || (memcmp(&r1, &r2, sizeof(r1))==0\n          && i >= -2251799813685248LL && i < 2251799813685248LL);\n}\n\n/* Convert a floating point value to its closest integer.  Do so in\n** a way that avoids 'outside the range of representable values' warnings\n** from UBSAN.\n*/\nSQLITE_PRIVATE i64 sqlite3RealToI64(double r){\n  if( r<-9223372036854774784.0 ) return SMALLEST_INT64;\n  if( r>+9223372036854774784.0 ) return LARGEST_INT64;\n  return (i64)r;\n}\n\n/*\n** Convert pMem so that it has type MEM_Real or MEM_Int.\n** Invalidate any prior representations.\n**\n** Every effort is made to force the conversion, even if the input\n** is a string that does not look completely like a number.  Convert\n** as much of the string as we can and ignore the rest.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){\n  assert( pMem!=0 );\n  testcase( pMem->flags & MEM_Int );\n  testcase( pMem->flags & MEM_Real );\n  testcase( pMem->flags & MEM_IntReal );\n  testcase( pMem->flags & MEM_Null );\n  if( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null))==0 ){\n    int rc;\n    sqlite3_int64 ix;\n    assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );\n    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n    rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);\n    if( ((rc==0 || rc==1) && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1)\n     || sqlite3RealSameAsInt(pMem->u.r, (ix = sqlite3RealToI64(pMem->u.r)))\n    ){\n      pMem->u.i = ix;\n      MemSetTypeFlag(pMem, MEM_Int);\n    }else{\n      MemSetTypeFlag(pMem, MEM_Real);\n    }\n  }\n  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null))!=0 );\n  pMem->flags &= ~(MEM_Str|MEM_Blob|MEM_Zero);\n  return SQLITE_OK;\n}\n\n/*\n** Cast the datatype of the value in pMem according to the affinity\n** \"aff\".  Casting is different from applying affinity in that a cast\n** is forced.  In other words, the value is converted into the desired\n** affinity even if that results in loss of data.  This routine is\n** used (for example) to implement the SQL \"cast()\" operator.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){\n  if( pMem->flags & MEM_Null ) return SQLITE_OK;\n  switch( aff ){\n    case SQLITE_AFF_BLOB: {   /* Really a cast to BLOB */\n      if( (pMem->flags & MEM_Blob)==0 ){\n        sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);\n        assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );\n        if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);\n      }else{\n        pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);\n      }\n      break;\n    }\n    case SQLITE_AFF_NUMERIC: {\n      sqlite3VdbeMemNumerify(pMem);\n      break;\n    }\n    case SQLITE_AFF_INTEGER: {\n      sqlite3VdbeMemIntegerify(pMem);\n      break;\n    }\n    case SQLITE_AFF_REAL: {\n      sqlite3VdbeMemRealify(pMem);\n      break;\n    }\n    default: {\n      int rc;\n      assert( aff==SQLITE_AFF_TEXT );\n      assert( MEM_Str==(MEM_Blob>>3) );\n      pMem->flags |= (pMem->flags&MEM_Blob)>>3;\n      sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);\n      assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );\n      pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal|MEM_Blob|MEM_Zero);\n      if( encoding!=SQLITE_UTF8 ) pMem->n &= ~1;\n      rc = sqlite3VdbeChangeEncoding(pMem, encoding);\n      if( rc ) return rc;\n      sqlite3VdbeMemZeroTerminateIfAble(pMem);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Initialize bulk memory to be a consistent Mem object.\n**\n** The minimum amount of initialization feasible is performed.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemInit(Mem *pMem, sqlite3 *db, u16 flags){\n  assert( (flags & ~MEM_TypeMask)==0 );\n  pMem->flags = flags;\n  pMem->db = db;\n  pMem->szMalloc = 0;\n}\n\n\n/*\n** Delete any previous value and set the value stored in *pMem to NULL.\n**\n** This routine calls the Mem.xDel destructor to dispose of values that\n** require the destructor.  But it preserves the Mem.zMalloc memory allocation.\n** To free all resources, use sqlite3VdbeMemRelease(), which both calls this\n** routine to invoke the destructor and deallocates Mem.zMalloc.\n**\n** Use this routine to reset the Mem prior to insert a new value.\n**\n** Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem *pMem){\n  if( VdbeMemDynamic(pMem) ){\n    vdbeMemClearExternAndSetNull(pMem);\n  }else{\n    pMem->flags = MEM_Null;\n  }\n}\nSQLITE_PRIVATE void sqlite3ValueSetNull(sqlite3_value *p){\n  sqlite3VdbeMemSetNull((Mem*)p);\n}\n\n/*\n** Delete any previous value and set the value to be a BLOB of length\n** n containing all zeros.\n*/\n#ifndef SQLITE_OMIT_INCRBLOB\nSQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){\n  sqlite3VdbeMemRelease(pMem);\n  pMem->flags = MEM_Blob|MEM_Zero;\n  pMem->n = 0;\n  if( n<0 ) n = 0;\n  pMem->u.nZero = n;\n  pMem->enc = SQLITE_UTF8;\n  pMem->z = 0;\n}\n#else\nSQLITE_PRIVATE int sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){\n  int nByte = n>0?n:1;\n  if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  assert( pMem->z!=0 );\n  assert( sqlite3DbMallocSize(pMem->db, pMem->z)>=nByte );\n  memset(pMem->z, 0, nByte);\n  pMem->n = n>0?n:0;\n  pMem->flags = MEM_Blob;\n  pMem->enc = SQLITE_UTF8;\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** The pMem is known to contain content that needs to be destroyed prior\n** to a value change.  So invoke the destructor, then set the value to\n** a 64-bit integer.\n*/\nstatic SQLITE_NOINLINE void vdbeReleaseAndSetInt64(Mem *pMem, i64 val){\n  sqlite3VdbeMemSetNull(pMem);\n  pMem->u.i = val;\n  pMem->flags = MEM_Int;\n}\n\n/*\n** Delete any previous value and set the value stored in *pMem to val,\n** manifest type INTEGER.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){\n  if( VdbeMemDynamic(pMem) ){\n    vdbeReleaseAndSetInt64(pMem, val);\n  }else{\n    pMem->u.i = val;\n    pMem->flags = MEM_Int;\n  }\n}\n\n/*\n** Set the iIdx'th entry of array aMem[] to contain integer value val.\n*/\nSQLITE_PRIVATE void sqlite3MemSetArrayInt64(sqlite3_value *aMem, int iIdx, i64 val){\n  sqlite3VdbeMemSetInt64(&aMem[iIdx], val);\n}\n\n/* A no-op destructor */\nSQLITE_PRIVATE void sqlite3NoopDestructor(void *p){ UNUSED_PARAMETER(p); }\n\n/*\n** Set the value stored in *pMem should already be a NULL.\n** Also store a pointer to go with it.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemSetPointer(\n  Mem *pMem,\n  void *pPtr,\n  const char *zPType,\n  void (*xDestructor)(void*)\n){\n  assert( pMem->flags==MEM_Null );\n  vdbeMemClear(pMem);\n  pMem->u.zPType = zPType ? zPType : \"\";\n  pMem->z = pPtr;\n  pMem->flags = MEM_Null|MEM_Dyn|MEM_Subtype|MEM_Term;\n  pMem->eSubtype = 'p';\n  pMem->xDel = xDestructor ? xDestructor : sqlite3NoopDestructor;\n}\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/*\n** Delete any previous value and set the value stored in *pMem to val,\n** manifest type REAL.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){\n  sqlite3VdbeMemSetNull(pMem);\n  if( !sqlite3IsNaN(val) ){\n    pMem->u.r = val;\n    pMem->flags = MEM_Real;\n  }\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Return true if the Mem holds a RowSet object.  This routine is intended\n** for use inside of assert() statements.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemIsRowSet(const Mem *pMem){\n  return (pMem->flags&(MEM_Blob|MEM_Dyn))==(MEM_Blob|MEM_Dyn)\n         && pMem->xDel==sqlite3RowSetDelete;\n}\n#endif\n\n/*\n** Delete any previous value and set the value of pMem to be an\n** empty boolean index.\n**\n** Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation\n** error occurs.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemSetRowSet(Mem *pMem){\n  sqlite3 *db = pMem->db;\n  RowSet *p;\n  assert( db!=0 );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  sqlite3VdbeMemRelease(pMem);\n  p = sqlite3RowSetInit(db);\n  if( p==0 ) return SQLITE_NOMEM;\n  pMem->z = (char*)p;\n  pMem->flags = MEM_Blob|MEM_Dyn;\n  pMem->xDel = sqlite3RowSetDelete;\n  return SQLITE_OK;\n}\n\n/*\n** Return true if the Mem object contains a TEXT or BLOB that is\n** too large - whose size exceeds SQLITE_MAX_LENGTH.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){\n  assert( p->db!=0 );\n  if( p->flags & (MEM_Str|MEM_Blob) ){\n    int n = p->n;\n    if( p->flags & MEM_Zero ){\n      n += p->u.nZero;\n    }\n    return n>p->db->aLimit[SQLITE_LIMIT_LENGTH];\n  }\n  return 0;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** This routine prepares a memory cell for modification by breaking\n** its link to a shallow copy and by marking any current shallow\n** copies of this cell as invalid.\n**\n** This is used for testing and debugging only - to help ensure that shallow\n** copies (created by OP_SCopy) are not misused.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe *pVdbe, Mem *pMem){\n  int i;\n  Mem *pX;\n  if( pMem->bScopy ){\n    for(i=1, pX=pVdbe->aMem+1; i<pVdbe->nMem; i++, pX++){\n      if( pX->pScopyFrom==pMem ){\n        u16 mFlags;\n        if( pVdbe->db->flags & SQLITE_VdbeTrace ){\n          sqlite3DebugPrintf(\"Invalidate R[%d] due to change in R[%d]\\n\",\n            (int)(pX - pVdbe->aMem), (int)(pMem - pVdbe->aMem));\n        }\n        /* If pX is marked as a shallow copy of pMem, then try to verify that\n        ** no significant changes have been made to pX since the OP_SCopy.\n        ** A significant change would indicated a missed call to this\n        ** function for pX.  Minor changes, such as adding or removing a\n        ** dual type, are allowed, as long as the underlying value is the\n        ** same. */\n        mFlags = pMem->flags & pX->flags & pX->mScopyFlags;\n        assert( (mFlags&(MEM_Int|MEM_IntReal))==0 || pMem->u.i==pX->u.i );\n\n        /* pMem is the register that is changing.  But also mark pX as\n        ** undefined so that we can quickly detect the shallow-copy error */\n        pX->flags = MEM_Undefined;\n        pX->pScopyFrom = 0;\n      }\n    }\n    pMem->bScopy = 0;\n  }\n  pMem->pScopyFrom = 0;\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** Make an shallow copy of pFrom into pTo.  Prior contents of\n** pTo are freed.  The pFrom->z field is not duplicated.  If\n** pFrom->z is used, then pTo->z points to the same thing as pFrom->z\n** and flags gets srcType (either MEM_Ephem or MEM_Static).\n*/\nstatic SQLITE_NOINLINE void vdbeClrCopy(Mem *pTo, const Mem *pFrom, int eType){\n  vdbeMemClearExternAndSetNull(pTo);\n  assert( !VdbeMemDynamic(pTo) );\n  sqlite3VdbeMemShallowCopy(pTo, pFrom, eType);\n}\nSQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){\n  assert( !sqlite3VdbeMemIsRowSet(pFrom) );\n  assert( pTo->db==pFrom->db );\n  if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }\n  memcpy(pTo, pFrom, MEMCELLSIZE);\n  if( (pFrom->flags&MEM_Static)==0 ){\n    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);\n    assert( srcType==MEM_Ephem || srcType==MEM_Static );\n    pTo->flags |= srcType;\n  }\n}\n\n/*\n** Make a full copy of pFrom into pTo.  Prior contents of pTo are\n** freed before the copy is made.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){\n  int rc = SQLITE_OK;\n\n  assert( !sqlite3VdbeMemIsRowSet(pFrom) );\n  if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);\n  memcpy(pTo, pFrom, MEMCELLSIZE);\n  pTo->flags &= ~MEM_Dyn;\n  if( pTo->flags&(MEM_Str|MEM_Blob) ){\n    if( 0==(pFrom->flags&MEM_Static) ){\n      pTo->flags |= MEM_Ephem;\n      rc = sqlite3VdbeMemMakeWriteable(pTo);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Transfer the contents of pFrom to pTo. Any existing value in pTo is\n** freed. If pFrom contains ephemeral data, a copy is made.\n**\n** pFrom contains an SQL NULL when this routine returns.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){\n  assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );\n  assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );\n  assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );\n\n  sqlite3VdbeMemRelease(pTo);\n  memcpy(pTo, pFrom, sizeof(Mem));\n  pFrom->flags = MEM_Null;\n  pFrom->szMalloc = 0;\n}\n\n/*\n** Change the value of a Mem to be a string or a BLOB.\n**\n** The memory management strategy depends on the value of the xDel\n** parameter. If the value passed is SQLITE_TRANSIENT, then the\n** string is copied into a (possibly existing) buffer managed by the\n** Mem structure. Otherwise, any existing buffer is freed and the\n** pointer copied.\n**\n** If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH\n** size limit) then no memory allocation occurs.  If the string can be\n** stored without allocating memory, then it is.  If a memory allocation\n** is required to store the string, then value of pMem is unchanged.  In\n** either case, SQLITE_TOOBIG is returned.\n**\n** The \"enc\" parameter is the text encoding for the string, or zero\n** to store a blob.\n**\n** If n is negative, then the string consists of all bytes up to but\n** excluding the first zero character.  The n parameter must be\n** non-negative for blobs.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemSetStr(\n  Mem *pMem,          /* Memory cell to set to string value */\n  const char *z,      /* String pointer */\n  i64 n,              /* Bytes in string, or negative */\n  u8 enc,             /* Encoding of z.  0 for BLOBs */\n  void (*xDel)(void*) /* Destructor function */\n){\n  i64 nByte = n;      /* New value for pMem->n */\n  int iLimit;         /* Maximum allowed string or blob size */\n  u16 flags;          /* New value for pMem->flags */\n\n  assert( pMem!=0 );\n  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  assert( enc!=0 || n>=0 );\n\n  /* If z is a NULL pointer, set pMem to contain an SQL NULL. */\n  if( !z ){\n    sqlite3VdbeMemSetNull(pMem);\n    return SQLITE_OK;\n  }\n\n  if( pMem->db ){\n    iLimit = pMem->db->aLimit[SQLITE_LIMIT_LENGTH];\n  }else{\n    iLimit = SQLITE_MAX_LENGTH;\n  }\n  if( nByte<0 ){\n    assert( enc!=0 );\n    if( enc==SQLITE_UTF8 ){\n      nByte = strlen(z);\n    }else{\n      for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}\n    }\n    flags= MEM_Str|MEM_Term;\n  }else if( enc==0 ){\n    flags = MEM_Blob;\n    enc = SQLITE_UTF8;\n  }else{\n    flags = MEM_Str;\n  }\n  if( nByte>iLimit ){\n    if( xDel && xDel!=SQLITE_TRANSIENT ){\n      if( xDel==SQLITE_DYNAMIC ){\n        sqlite3DbFree(pMem->db, (void*)z);\n      }else{\n        xDel((void*)z);\n      }\n    }\n    sqlite3VdbeMemSetNull(pMem);\n    return sqlite3ErrorToParser(pMem->db, SQLITE_TOOBIG);\n  }\n\n  /* The following block sets the new values of Mem.z and Mem.xDel. It\n  ** also sets a flag in local variable \"flags\" to indicate the memory\n  ** management (one of MEM_Dyn or MEM_Static).\n  */\n  if( xDel==SQLITE_TRANSIENT ){\n    i64 nAlloc = nByte;\n    if( flags&MEM_Term ){\n      nAlloc += (enc==SQLITE_UTF8?1:2);\n    }\n    testcase( nAlloc==0 );\n    testcase( nAlloc==31 );\n    testcase( nAlloc==32 );\n    if( sqlite3VdbeMemClearAndResize(pMem, (int)MAX(nAlloc,32)) ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    assert( pMem->z!=0 );\n    memcpy(pMem->z, z, nAlloc);\n  }else{\n    sqlite3VdbeMemRelease(pMem);\n    pMem->z = (char *)z;\n    if( xDel==SQLITE_DYNAMIC ){\n      pMem->zMalloc = pMem->z;\n      pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc);\n    }else{\n      pMem->xDel = xDel;\n      flags |= ((xDel==SQLITE_STATIC)?MEM_Static:MEM_Dyn);\n    }\n  }\n\n  pMem->n = (int)(nByte & 0x7fffffff);\n  pMem->flags = flags;\n  pMem->enc = enc;\n\n#ifndef SQLITE_OMIT_UTF16\n  if( enc>SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem) ){\n    return SQLITE_NOMEM_BKPT;\n  }\n#endif\n\n\n  return SQLITE_OK;\n}\n\n/*\n** Move data out of a btree key or data field and into a Mem structure.\n** The data is payload from the entry that pCur is currently pointing\n** to.  offset and amt determine what portion of the data or key to retrieve.\n** The result is written into the pMem element.\n**\n** The pMem object must have been initialized.  This routine will use\n** pMem->zMalloc to hold the content from the btree, if possible.  New\n** pMem->zMalloc space will be allocated if necessary.  The calling routine\n** is responsible for making sure that the pMem object is eventually\n** destroyed.\n**\n** If this routine fails for any reason (malloc returns NULL or unable\n** to read from the disk) then the pMem is left in an inconsistent state.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMemFromBtree(\n  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */\n  u32 offset,       /* Offset from the start of data to return bytes from. */\n  u32 amt,          /* Number of bytes to return. */\n  Mem *pMem         /* OUT: Return data in this Mem structure. */\n){\n  int rc;\n  pMem->flags = MEM_Null;\n  if( sqlite3BtreeMaxRecordSize(pCur)<offset+amt ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+1)) ){\n    rc = sqlite3BtreePayload(pCur, offset, amt, pMem->z);\n    if( rc==SQLITE_OK ){\n      pMem->z[amt] = 0;   /* Overrun area used when reading malformed records */\n      pMem->flags = MEM_Blob;\n      pMem->n = (int)amt;\n    }else{\n      sqlite3VdbeMemRelease(pMem);\n    }\n  }\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3VdbeMemFromBtreeZeroOffset(\n  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */\n  u32 amt,          /* Number of bytes to return. */\n  Mem *pMem         /* OUT: Return data in this Mem structure. */\n){\n  u32 available = 0;  /* Number of bytes available on the local btree page */\n  int rc = SQLITE_OK; /* Return code */\n\n  assert( sqlite3BtreeCursorIsValid(pCur) );\n  assert( !VdbeMemDynamic(pMem) );\n\n  /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert()\n  ** that both the BtShared and database handle mutexes are held. */\n  assert( !sqlite3VdbeMemIsRowSet(pMem) );\n  pMem->z = (char *)sqlite3BtreePayloadFetch(pCur, &available);\n  assert( pMem->z!=0 );\n\n  if( amt<=available ){\n    pMem->flags = MEM_Blob|MEM_Ephem;\n    pMem->n = (int)amt;\n  }else{\n    rc = sqlite3VdbeMemFromBtree(pCur, 0, amt, pMem);\n  }\n\n  return rc;\n}\n\n/*\n** The pVal argument is known to be a value other than NULL.\n** Convert it into a string with encoding enc and return a pointer\n** to a zero-terminated version of that string.\n*/\nstatic SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){\n  assert( pVal!=0 );\n  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );\n  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );\n  assert( !sqlite3VdbeMemIsRowSet(pVal) );\n  assert( (pVal->flags & (MEM_Null))==0 );\n  if( pVal->flags & (MEM_Blob|MEM_Str) ){\n    if( ExpandBlob(pVal) ) return 0;\n    pVal->flags |= MEM_Str;\n    if( pVal->enc != (enc & ~SQLITE_UTF16_ALIGNED) ){\n      sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);\n    }\n    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){\n      assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );\n      if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){\n        return 0;\n      }\n    }\n    sqlite3VdbeMemNulTerminate(pVal); /* IMP: R-31275-44060 */\n  }else{\n    sqlite3VdbeMemStringify(pVal, enc, 0);\n    assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );\n  }\n  assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0\n              || pVal->db->mallocFailed );\n  if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){\n    assert( sqlite3VdbeMemValidStrRep(pVal) );\n    return pVal->z;\n  }else{\n    return 0;\n  }\n}\n\n/* This function is only available internally, it is not part of the\n** external API. It works in a similar way to sqlite3_value_text(),\n** except the data returned is in the encoding specified by the second\n** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or\n** SQLITE_UTF8.\n**\n** (2006-02-16:)  The enc value can be or-ed with SQLITE_UTF16_ALIGNED.\n** If that is the case, then the result must be aligned on an even byte\n** boundary.\n*/\nSQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){\n  if( !pVal ) return 0;\n  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );\n  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );\n  assert( !sqlite3VdbeMemIsRowSet(pVal) );\n  if( (pVal->flags&(MEM_Str|MEM_Term))==(MEM_Str|MEM_Term) && pVal->enc==enc ){\n    assert( sqlite3VdbeMemValidStrRep(pVal) );\n    return pVal->z;\n  }\n  if( pVal->flags&MEM_Null ){\n    return 0;\n  }\n  return valueToText(pVal, enc);\n}\n\n/* Return true if sqlit3_value object pVal is a string or blob value\n** that uses the destructor specified in the second argument.\n**\n** TODO:  Maybe someday promote this interface into a published API so\n** that third-party extensions can get access to it?\n*/\nSQLITE_PRIVATE int sqlite3ValueIsOfClass(const sqlite3_value *pVal, void(*xFree)(void*)){\n  if( ALWAYS(pVal!=0)\n   && ALWAYS((pVal->flags & (MEM_Str|MEM_Blob))!=0)\n   && (pVal->flags & MEM_Dyn)!=0\n   && pVal->xDel==xFree\n  ){\n    return 1;\n  }else{\n    return 0;\n  }\n}\n\n/*\n** Create a new sqlite3_value object.\n*/\nSQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){\n  Mem *p = sqlite3DbMallocZero(db, sizeof(*p));\n  if( p ){\n    p->flags = MEM_Null;\n    p->db = db;\n  }\n  return p;\n}\n\n/*\n** Context object passed by sqlite3Stat4ProbeSetValue() through to\n** valueNew(). See comments above valueNew() for details.\n*/\nstruct ValueNewStat4Ctx {\n  Parse *pParse;\n  Index *pIdx;\n  UnpackedRecord **ppRec;\n  int iVal;\n};\n\n/*\n** Allocate and return a pointer to a new sqlite3_value object. If\n** the second argument to this function is NULL, the object is allocated\n** by calling sqlite3ValueNew().\n**\n** Otherwise, if the second argument is non-zero, then this function is\n** being called indirectly by sqlite3Stat4ProbeSetValue(). If it has not\n** already been allocated, allocate the UnpackedRecord structure that\n** that function will return to its caller here. Then return a pointer to\n** an sqlite3_value within the UnpackedRecord.a[] array.\n*/\nstatic sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){\n#ifdef SQLITE_ENABLE_STAT4\n  if( p ){\n    UnpackedRecord *pRec = p->ppRec[0];\n\n    if( pRec==0 ){\n      Index *pIdx = p->pIdx;      /* Index being probed */\n      i64 nByte;                  /* Bytes of space to allocate */\n      int i;                      /* Counter variable */\n      int nCol = pIdx->nColumn;   /* Number of index columns including rowid */\n\n      nByte = sizeof(Mem) * nCol + ROUND8(sizeof(UnpackedRecord));\n      pRec = (UnpackedRecord*)sqlite3DbMallocZero(db, nByte);\n      if( pRec ){\n        pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);\n        if( pRec->pKeyInfo ){\n          assert( pRec->pKeyInfo->nAllField==nCol );\n          assert( pRec->pKeyInfo->enc==ENC(db) );\n          pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));\n          for(i=0; i<nCol; i++){\n            pRec->aMem[i].flags = MEM_Null;\n            pRec->aMem[i].db = db;\n          }\n        }else{\n          sqlite3DbFreeNN(db, pRec);\n          pRec = 0;\n        }\n      }\n      if( pRec==0 ) return 0;\n      p->ppRec[0] = pRec;\n    }\n\n    pRec->nField = p->iVal+1;\n    sqlite3VdbeMemSetNull(&pRec->aMem[p->iVal]);\n    return &pRec->aMem[p->iVal];\n  }\n#else\n  UNUSED_PARAMETER(p);\n#endif /* defined(SQLITE_ENABLE_STAT4) */\n  return sqlite3ValueNew(db);\n}\n\n/*\n** The expression object indicated by the second argument is guaranteed\n** to be a scalar SQL function. If\n**\n**   * all function arguments are SQL literals,\n**   * one of the SQLITE_FUNC_CONSTANT or _SLOCHNG function flags is set, and\n**   * the SQLITE_FUNC_NEEDCOLL function flag is not set,\n**\n** then this routine attempts to invoke the SQL function. Assuming no\n** error occurs, output parameter (*ppVal) is set to point to a value\n** object containing the result before returning SQLITE_OK.\n**\n** Affinity aff is applied to the result of the function before returning.\n** If the result is a text value, the sqlite3_value object uses encoding\n** enc.\n**\n** If the conditions above are not met, this function returns SQLITE_OK\n** and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to\n** NULL and an SQLite error code returned.\n*/\n#ifdef SQLITE_ENABLE_STAT4\nstatic int valueFromFunction(\n  sqlite3 *db,                    /* The database connection */\n  const Expr *p,                  /* The expression to evaluate */\n  u8 enc,                         /* Encoding to use */\n  u8 aff,                         /* Affinity to use */\n  sqlite3_value **ppVal,          /* Write the new value here */\n  struct ValueNewStat4Ctx *pCtx   /* Second argument for valueNew() */\n){\n  sqlite3_context ctx;            /* Context object for function invocation */\n  sqlite3_value **apVal = 0;      /* Function arguments */\n  int nVal = 0;                   /* Number of function arguments */\n  FuncDef *pFunc = 0;             /* Function definition */\n  sqlite3_value *pVal = 0;        /* New value */\n  int rc = SQLITE_OK;             /* Return code */\n  ExprList *pList = 0;            /* Function arguments */\n  int i;                          /* Iterator variable */\n\n  assert( pCtx!=0 );\n  assert( (p->flags & EP_TokenOnly)==0 );\n  assert( ExprUseXList(p) );\n  pList = p->x.pList;\n  if( pList ) nVal = pList->nExpr;\n  assert( !ExprHasProperty(p, EP_IntValue) );\n  pFunc = sqlite3FindFunction(db, p->u.zToken, nVal, enc, 0);\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n  if( pFunc==0 ) return SQLITE_OK;\n#endif\n  assert( pFunc );\n  if( (pFunc->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0\n   || (pFunc->funcFlags & (SQLITE_FUNC_NEEDCOLL|SQLITE_FUNC_RUNONLY))!=0\n  ){\n    return SQLITE_OK;\n  }\n\n  if( pList ){\n    apVal = (sqlite3_value**)sqlite3DbMallocZero(db, sizeof(apVal[0]) * nVal);\n    if( apVal==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto value_from_function_out;\n    }\n    for(i=0; i<nVal; i++){\n      rc = sqlite3Stat4ValueFromExpr(pCtx->pParse, pList->a[i].pExpr, aff,\n                                     &apVal[i]);\n      if( apVal[i]==0 || rc!=SQLITE_OK ) goto value_from_function_out;\n    }\n  }\n\n  pVal = valueNew(db, pCtx);\n  if( pVal==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto value_from_function_out;\n  }\n\n  memset(&ctx, 0, sizeof(ctx));\n  ctx.pOut = pVal;\n  ctx.pFunc = pFunc;\n  ctx.enc = ENC(db);\n  pFunc->xSFunc(&ctx, nVal, apVal);\n  if( ctx.isError ){\n    rc = ctx.isError;\n    sqlite3ErrorMsg(pCtx->pParse, \"%s\", sqlite3_value_text(pVal));\n  }else{\n    sqlite3ValueApplyAffinity(pVal, aff, SQLITE_UTF8);\n    assert( rc==SQLITE_OK );\n    rc = sqlite3VdbeChangeEncoding(pVal, enc);\n    if( NEVER(rc==SQLITE_OK && sqlite3VdbeMemTooBig(pVal)) ){\n      rc = SQLITE_TOOBIG;\n      pCtx->pParse->nErr++;\n    }\n  }\n\n value_from_function_out:\n  if( rc!=SQLITE_OK ){\n    pVal = 0;\n    pCtx->pParse->rc = rc;\n  }\n  if( apVal ){\n    for(i=0; i<nVal; i++){\n      sqlite3ValueFree(apVal[i]);\n    }\n    sqlite3DbFreeNN(db, apVal);\n  }\n\n  *ppVal = pVal;\n  return rc;\n}\n#else\n# define valueFromFunction(a,b,c,d,e,f) SQLITE_OK\n#endif /* defined(SQLITE_ENABLE_STAT4) */\n\n/*\n** Extract a value from the supplied expression in the manner described\n** above sqlite3ValueFromExpr(). Allocate the sqlite3_value object\n** using valueNew().\n**\n** If pCtx is NULL and an error occurs after the sqlite3_value object\n** has been allocated, it is freed before returning. Or, if pCtx is not\n** NULL, it is assumed that the caller will free any allocated object\n** in all cases.\n*/\nstatic int valueFromExpr(\n  sqlite3 *db,                    /* The database connection */\n  const Expr *pExpr,              /* The expression to evaluate */\n  u8 enc,                         /* Encoding to use */\n  u8 affinity,                    /* Affinity to use */\n  sqlite3_value **ppVal,          /* Write the new value here */\n  struct ValueNewStat4Ctx *pCtx   /* Second argument for valueNew() */\n){\n  int op;\n  char *zVal = 0;\n  sqlite3_value *pVal = 0;\n  int negInt = 1;\n  const char *zNeg = \"\";\n  int rc = SQLITE_OK;\n\n  assert( pExpr!=0 );\n  while( (op = pExpr->op)==TK_UPLUS || op==TK_SPAN ) pExpr = pExpr->pLeft;\n  if( op==TK_REGISTER ) op = pExpr->op2;\n\n  /* Compressed expressions only appear when parsing the DEFAULT clause\n  ** on a table column definition, and hence only when pCtx==0.  This\n  ** check ensures that an EP_TokenOnly expression is never passed down\n  ** into valueFromFunction(). */\n  assert( (pExpr->flags & EP_TokenOnly)==0 || pCtx==0 );\n\n  if( op==TK_CAST ){\n    u8 aff;\n    assert( !ExprHasProperty(pExpr, EP_IntValue) );\n    aff = sqlite3AffinityType(pExpr->u.zToken,0);\n    rc = valueFromExpr(db, pExpr->pLeft, enc, aff, ppVal, pCtx);\n    testcase( rc!=SQLITE_OK );\n    if( *ppVal ){\n#ifdef SQLITE_ENABLE_STAT4\n      rc = ExpandBlob(*ppVal);\n#else\n      /* zero-blobs only come from functions, not literal values.  And\n      ** functions are only processed under STAT4 */\n      assert( (ppVal[0][0].flags & MEM_Zero)==0 );\n#endif\n      sqlite3VdbeMemCast(*ppVal, aff, enc);\n      sqlite3ValueApplyAffinity(*ppVal, affinity, enc);\n    }\n    return rc;\n  }\n\n  /* Handle negative integers in a single step.  This is needed in the\n  ** case when the value is -9223372036854775808. Except - do not do this\n  ** for hexadecimal literals.  */\n  if( op==TK_UMINUS ){\n    Expr *pLeft = pExpr->pLeft;\n    if( (pLeft->op==TK_INTEGER || pLeft->op==TK_FLOAT) ){\n      if( ExprHasProperty(pLeft, EP_IntValue)\n       || pLeft->u.zToken[0]!='0' || (pLeft->u.zToken[1] & ~0x20)!='X'\n      ){\n        pExpr = pLeft;\n        op = pExpr->op;\n        negInt = -1;\n        zNeg = \"-\";\n      }\n    }\n  }\n\n  if( op==TK_STRING || op==TK_FLOAT || op==TK_INTEGER ){\n    pVal = valueNew(db, pCtx);\n    if( pVal==0 ) goto no_mem;\n    if( ExprHasProperty(pExpr, EP_IntValue) ){\n      sqlite3VdbeMemSetInt64(pVal, (i64)pExpr->u.iValue*negInt);\n    }else{\n      i64 iVal;\n      if( op==TK_INTEGER && 0==sqlite3DecOrHexToI64(pExpr->u.zToken, &iVal) ){\n        sqlite3VdbeMemSetInt64(pVal, iVal*negInt);\n      }else{\n        zVal = sqlite3MPrintf(db, \"%s%s\", zNeg, pExpr->u.zToken);\n        if( zVal==0 ) goto no_mem;\n        sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);\n      }\n    }\n    if( affinity==SQLITE_AFF_BLOB ){\n      if( op==TK_FLOAT ){\n        assert( pVal && pVal->z && pVal->flags==(MEM_Str|MEM_Term) );\n        sqlite3AtoF(pVal->z, &pVal->u.r, pVal->n, SQLITE_UTF8);\n        pVal->flags = MEM_Real;\n      }else if( op==TK_INTEGER ){\n        /* This case is required by -9223372036854775808 and other strings\n        ** that look like integers but cannot be handled by the\n        ** sqlite3DecOrHexToI64() call above.  */\n        sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);\n      }\n    }else{\n      sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);\n    }\n    assert( (pVal->flags & MEM_IntReal)==0 );\n    if( pVal->flags & (MEM_Int|MEM_IntReal|MEM_Real) ){\n      testcase( pVal->flags & MEM_Int );\n      testcase( pVal->flags & MEM_Real );\n      pVal->flags &= ~MEM_Str;\n    }\n    if( enc!=SQLITE_UTF8 ){\n      rc = sqlite3VdbeChangeEncoding(pVal, enc);\n    }\n  }else if( op==TK_UMINUS ) {\n    /* This branch happens for multiple negative signs.  Ex: -(-5) */\n    if( SQLITE_OK==valueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal,pCtx)\n     && pVal!=0\n    ){\n      sqlite3VdbeMemNumerify(pVal);\n      if( pVal->flags & MEM_Real ){\n        pVal->u.r = -pVal->u.r;\n      }else if( pVal->u.i==SMALLEST_INT64 ){\n#ifndef SQLITE_OMIT_FLOATING_POINT\n        pVal->u.r = -(double)SMALLEST_INT64;\n#else\n        pVal->u.r = LARGEST_INT64;\n#endif\n        MemSetTypeFlag(pVal, MEM_Real);\n      }else{\n        pVal->u.i = -pVal->u.i;\n      }\n      sqlite3ValueApplyAffinity(pVal, affinity, enc);\n    }\n  }else if( op==TK_NULL ){\n    pVal = valueNew(db, pCtx);\n    if( pVal==0 ) goto no_mem;\n    sqlite3VdbeMemSetNull(pVal);\n  }\n#ifndef SQLITE_OMIT_BLOB_LITERAL\n  else if( op==TK_BLOB ){\n    int nVal;\n    assert( !ExprHasProperty(pExpr, EP_IntValue) );\n    assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );\n    assert( pExpr->u.zToken[1]=='\\'' );\n    pVal = valueNew(db, pCtx);\n    if( !pVal ) goto no_mem;\n    zVal = &pExpr->u.zToken[2];\n    nVal = sqlite3Strlen30(zVal)-1;\n    assert( zVal[nVal]=='\\'' );\n    sqlite3VdbeMemSetStr(pVal, sqlite3HexToBlob(db, zVal, nVal), nVal/2,\n                         0, SQLITE_DYNAMIC);\n  }\n#endif\n#ifdef SQLITE_ENABLE_STAT4\n  else if( op==TK_FUNCTION && pCtx!=0 ){\n    rc = valueFromFunction(db, pExpr, enc, affinity, &pVal, pCtx);\n  }\n#endif\n  else if( op==TK_TRUEFALSE ){\n    assert( !ExprHasProperty(pExpr, EP_IntValue) );\n    pVal = valueNew(db, pCtx);\n    if( pVal ){\n      pVal->flags = MEM_Int;\n      pVal->u.i = pExpr->u.zToken[4]==0;\n      sqlite3ValueApplyAffinity(pVal, affinity, enc);\n    }\n  }\n\n  *ppVal = pVal;\n  return rc;\n\nno_mem:\n#ifdef SQLITE_ENABLE_STAT4\n  if( pCtx==0 || NEVER(pCtx->pParse->nErr==0) )\n#endif\n    sqlite3OomFault(db);\n  sqlite3DbFree(db, zVal);\n  assert( *ppVal==0 );\n#ifdef SQLITE_ENABLE_STAT4\n  if( pCtx==0 ) sqlite3ValueFree(pVal);\n#else\n  assert( pCtx==0 ); sqlite3ValueFree(pVal);\n#endif\n  return SQLITE_NOMEM_BKPT;\n}\n\n/*\n** Create a new sqlite3_value object, containing the value of pExpr.\n**\n** This only works for very simple expressions that consist of one constant\n** token (i.e. \"5\", \"5.1\", \"'a string'\"). If the expression can\n** be converted directly into a value, then the value is allocated and\n** a pointer written to *ppVal. The caller is responsible for deallocating\n** the value by passing it to sqlite3ValueFree() later on. If the expression\n** cannot be converted to a value, then *ppVal is set to NULL.\n*/\nSQLITE_PRIVATE int sqlite3ValueFromExpr(\n  sqlite3 *db,              /* The database connection */\n  const Expr *pExpr,        /* The expression to evaluate */\n  u8 enc,                   /* Encoding to use */\n  u8 affinity,              /* Affinity to use */\n  sqlite3_value **ppVal     /* Write the new value here */\n){\n  return pExpr ? valueFromExpr(db, pExpr, enc, affinity, ppVal, 0) : 0;\n}\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Attempt to extract a value from pExpr and use it to construct *ppVal.\n**\n** If pAlloc is not NULL, then an UnpackedRecord object is created for\n** pAlloc if one does not exist and the new value is added to the\n** UnpackedRecord object.\n**\n** A value is extracted in the following cases:\n**\n**  * (pExpr==0). In this case the value is assumed to be an SQL NULL,\n**\n**  * The expression is a bound variable, and this is a reprepare, or\n**\n**  * The expression is a literal value.\n**\n** On success, *ppVal is made to point to the extracted value.  The caller\n** is responsible for ensuring that the value is eventually freed.\n*/\nstatic int stat4ValueFromExpr(\n  Parse *pParse,                  /* Parse context */\n  Expr *pExpr,                    /* The expression to extract a value from */\n  u8 affinity,                    /* Affinity to use */\n  struct ValueNewStat4Ctx *pAlloc,/* How to allocate space.  Or NULL */\n  sqlite3_value **ppVal           /* OUT: New value object (or NULL) */\n){\n  int rc = SQLITE_OK;\n  sqlite3_value *pVal = 0;\n  sqlite3 *db = pParse->db;\n\n  /* Skip over any TK_COLLATE nodes */\n  pExpr = sqlite3ExprSkipCollate(pExpr);\n\n  assert( pExpr==0 || pExpr->op!=TK_REGISTER || pExpr->op2!=TK_VARIABLE );\n  if( !pExpr ){\n    pVal = valueNew(db, pAlloc);\n    if( pVal ){\n      sqlite3VdbeMemSetNull((Mem*)pVal);\n    }\n  }else if( pExpr->op==TK_VARIABLE && (db->flags & SQLITE_EnableQPSG)==0 ){\n    Vdbe *v;\n    int iBindVar = pExpr->iColumn;\n    sqlite3VdbeSetVarmask(pParse->pVdbe, iBindVar);\n    if( (v = pParse->pReprepare)!=0 ){\n      pVal = valueNew(db, pAlloc);\n      if( pVal ){\n        rc = sqlite3VdbeMemCopy((Mem*)pVal, &v->aVar[iBindVar-1]);\n        sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));\n        pVal->db = pParse->db;\n      }\n    }\n  }else{\n    rc = valueFromExpr(db, pExpr, ENC(db), affinity, &pVal, pAlloc);\n  }\n\n  assert( pVal==0 || pVal->db==db );\n  *ppVal = pVal;\n  return rc;\n}\n\n/*\n** This function is used to allocate and populate UnpackedRecord\n** structures intended to be compared against sample index keys stored\n** in the sqlite_stat4 table.\n**\n** A single call to this function populates zero or more fields of the\n** record starting with field iVal (fields are numbered from left to\n** right starting with 0). A single field is populated if:\n**\n**  * (pExpr==0). In this case the value is assumed to be an SQL NULL,\n**\n**  * The expression is a bound variable, and this is a reprepare, or\n**\n**  * The sqlite3ValueFromExpr() function is able to extract a value\n**    from the expression (i.e. the expression is a literal value).\n**\n** Or, if pExpr is a TK_VECTOR, one field is populated for each of the\n** vector components that match either of the two latter criteria listed\n** above.\n**\n** Before any value is appended to the record, the affinity of the\n** corresponding column within index pIdx is applied to it. Before\n** this function returns, output parameter *pnExtract is set to the\n** number of values appended to the record.\n**\n** When this function is called, *ppRec must either point to an object\n** allocated by an earlier call to this function, or must be NULL. If it\n** is NULL and a value can be successfully extracted, a new UnpackedRecord\n** is allocated (and *ppRec set to point to it) before returning.\n**\n** Unless an error is encountered, SQLITE_OK is returned. It is not an\n** error if a value cannot be extracted from pExpr. If an error does\n** occur, an SQLite error code is returned.\n*/\nSQLITE_PRIVATE int sqlite3Stat4ProbeSetValue(\n  Parse *pParse,                  /* Parse context */\n  Index *pIdx,                    /* Index being probed */\n  UnpackedRecord **ppRec,         /* IN/OUT: Probe record */\n  Expr *pExpr,                    /* The expression to extract a value from */\n  int nElem,                      /* Maximum number of values to append */\n  int iVal,                       /* Array element to populate */\n  int *pnExtract                  /* OUT: Values appended to the record */\n){\n  int rc = SQLITE_OK;\n  int nExtract = 0;\n\n  if( pExpr==0 || pExpr->op!=TK_SELECT ){\n    int i;\n    struct ValueNewStat4Ctx alloc;\n\n    alloc.pParse = pParse;\n    alloc.pIdx = pIdx;\n    alloc.ppRec = ppRec;\n\n    for(i=0; i<nElem; i++){\n      sqlite3_value *pVal = 0;\n      Expr *pElem = (pExpr ? sqlite3VectorFieldSubexpr(pExpr, i) : 0);\n      u8 aff = sqlite3IndexColumnAffinity(pParse->db, pIdx, iVal+i);\n      alloc.iVal = iVal+i;\n      rc = stat4ValueFromExpr(pParse, pElem, aff, &alloc, &pVal);\n      if( !pVal ) break;\n      nExtract++;\n    }\n  }\n\n  *pnExtract = nExtract;\n  return rc;\n}\n\n/*\n** Attempt to extract a value from expression pExpr using the methods\n** as described for sqlite3Stat4ProbeSetValue() above.\n**\n** If successful, set *ppVal to point to a new value object and return\n** SQLITE_OK. If no value can be extracted, but no other error occurs\n** (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error\n** does occur, return an SQLite error code. The final value of *ppVal\n** is undefined in this case.\n*/\nSQLITE_PRIVATE int sqlite3Stat4ValueFromExpr(\n  Parse *pParse,                  /* Parse context */\n  Expr *pExpr,                    /* The expression to extract a value from */\n  u8 affinity,                    /* Affinity to use */\n  sqlite3_value **ppVal           /* OUT: New value object (or NULL) */\n){\n  return stat4ValueFromExpr(pParse, pExpr, affinity, 0, ppVal);\n}\n\n/*\n** Extract the iCol-th column from the nRec-byte record in pRec.  Write\n** the column value into *ppVal.  If *ppVal is initially NULL then a new\n** sqlite3_value object is allocated.\n**\n** If *ppVal is initially NULL then the caller is responsible for\n** ensuring that the value written into *ppVal is eventually freed.\n*/\nSQLITE_PRIVATE int sqlite3Stat4Column(\n  sqlite3 *db,                    /* Database handle */\n  const void *pRec,               /* Pointer to buffer containing record */\n  int nRec,                       /* Size of buffer pRec in bytes */\n  int iCol,                       /* Column to extract */\n  sqlite3_value **ppVal           /* OUT: Extracted value */\n){\n  u32 t = 0;                      /* a column type code */\n  u32 nHdr;                       /* Size of the header in the record */\n  u32 iHdr;                       /* Next unread header byte */\n  i64 iField;                     /* Next unread data byte */\n  u32 szField = 0;                /* Size of the current data field */\n  int i;                          /* Column index */\n  u8 *a = (u8*)pRec;              /* Typecast byte array */\n  Mem *pMem = *ppVal;             /* Write result into this Mem object */\n\n  assert( iCol>0 );\n  iHdr = getVarint32(a, nHdr);\n  if( nHdr>(u32)nRec || iHdr>=nHdr ) return SQLITE_CORRUPT_BKPT;\n  iField = nHdr;\n  for(i=0; i<=iCol; i++){\n    iHdr += getVarint32(&a[iHdr], t);\n    testcase( iHdr==nHdr );\n    testcase( iHdr==nHdr+1 );\n    if( iHdr>nHdr ) return SQLITE_CORRUPT_BKPT;\n    szField = sqlite3VdbeSerialTypeLen(t);\n    iField += szField;\n  }\n  testcase( iField==nRec );\n  testcase( iField==nRec+1 );\n  if( iField>nRec ) return SQLITE_CORRUPT_BKPT;\n  if( pMem==0 ){\n    pMem = *ppVal = sqlite3ValueNew(db);\n    if( pMem==0 ) return SQLITE_NOMEM_BKPT;\n  }\n  sqlite3VdbeSerialGet(&a[iField-szField], t, pMem);\n  pMem->enc = ENC(db);\n  return SQLITE_OK;\n}\n\n/*\n** Unless it is NULL, the argument must be an UnpackedRecord object returned\n** by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes\n** the object.\n*/\nSQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){\n  if( pRec ){\n    int i;\n    int nCol = pRec->pKeyInfo->nAllField;\n    Mem *aMem = pRec->aMem;\n    sqlite3 *db = aMem[0].db;\n    for(i=0; i<nCol; i++){\n      sqlite3VdbeMemRelease(&aMem[i]);\n    }\n    sqlite3KeyInfoUnref(pRec->pKeyInfo);\n    sqlite3DbFreeNN(db, pRec);\n  }\n}\n#endif /* ifdef SQLITE_ENABLE_STAT4 */\n\n/*\n** Change the string value of an sqlite3_value object\n*/\nSQLITE_PRIVATE void sqlite3ValueSetStr(\n  sqlite3_value *v,     /* Value to be set */\n  int n,                /* Length of string z */\n  const void *z,        /* Text of the new string */\n  u8 enc,               /* Encoding to use */\n  void (*xDel)(void*)   /* Destructor for the string */\n){\n  if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);\n}\n\n/*\n** Free an sqlite3_value object\n*/\nSQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value *v){\n  if( !v ) return;\n  sqlite3VdbeMemRelease((Mem *)v);\n  sqlite3DbFreeNN(((Mem*)v)->db, v);\n}\n\n/*\n** The sqlite3ValueBytes() routine returns the number of bytes in the\n** sqlite3_value object assuming that it uses the encoding \"enc\".\n** The valueBytes() routine is a helper function.\n*/\nstatic SQLITE_NOINLINE int valueBytes(sqlite3_value *pVal, u8 enc){\n  return valueToText(pVal, enc)!=0 ? pVal->n : 0;\n}\nSQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){\n  Mem *p = (Mem*)pVal;\n  assert( (p->flags & MEM_Null)==0 || (p->flags & (MEM_Str|MEM_Blob))==0 );\n  if( (p->flags & MEM_Str)!=0 && pVal->enc==enc ){\n    return p->n;\n  }\n  if( (p->flags & MEM_Str)!=0 && enc!=SQLITE_UTF8 && pVal->enc!=SQLITE_UTF8 ){\n    return p->n;\n  }\n  if( (p->flags & MEM_Blob)!=0 ){\n    if( p->flags & MEM_Zero ){\n      return p->n + p->u.nZero;\n    }else{\n      return p->n;\n    }\n  }\n  if( p->flags & MEM_Null ) return 0;\n  return valueBytes(pVal, enc);\n}\n\n/************** End of vdbemem.c *********************************************/\n/************** Begin file vdbeaux.c *****************************************/\n/*\n** 2003 September 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used for creating, destroying, and populating\n** a VDBE (or an \"sqlite3_stmt\" as it is known to the outside world.)\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n/* Forward references */\nstatic void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef);\nstatic void vdbeFreeOpArray(sqlite3 *, Op *, int);\n\n/*\n** Create a new virtual database engine.\n*/\nSQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  Vdbe *p;\n  p = sqlite3DbMallocRawNN(db, sizeof(Vdbe) );\n  if( p==0 ) return 0;\n  memset(&p->aOp, 0, sizeof(Vdbe)-offsetof(Vdbe,aOp));\n  p->db = db;\n  if( db->pVdbe ){\n    db->pVdbe->ppVPrev = &p->pVNext;\n  }\n  p->pVNext = db->pVdbe;\n  p->ppVPrev = &db->pVdbe;\n  db->pVdbe = p;\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  p->pParse = pParse;\n  pParse->pVdbe = p;\n  assert( pParse->aLabel==0 );\n  assert( pParse->nLabel==0 );\n  assert( p->nOpAlloc==0 );\n  assert( pParse->szOpAlloc==0 );\n  sqlite3VdbeAddOp2(p, OP_Init, 0, 1);\n  return p;\n}\n\n/*\n** Return the Parse object that owns a Vdbe object.\n*/\nSQLITE_PRIVATE Parse *sqlite3VdbeParser(Vdbe *p){\n  return p->pParse;\n}\n\n/*\n** Change the error string stored in Vdbe.zErrMsg\n*/\nSQLITE_PRIVATE void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){\n  va_list ap;\n  sqlite3DbFree(p->db, p->zErrMsg);\n  va_start(ap, zFormat);\n  p->zErrMsg = sqlite3VMPrintf(p->db, zFormat, ap);\n  va_end(ap);\n}\n\n/*\n** Remember the SQL string for a prepared statement.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, u8 prepFlags){\n  if( p==0 ) return;\n  p->prepFlags = prepFlags;\n  if( (prepFlags & SQLITE_PREPARE_SAVESQL)==0 ){\n    p->expmask = 0;\n  }\n  assert( p->zSql==0 );\n  p->zSql = sqlite3DbStrNDup(p->db, z, n);\n}\n\n#ifdef SQLITE_ENABLE_NORMALIZE\n/*\n** Add a new element to the Vdbe->pDblStr list.\n*/\nSQLITE_PRIVATE void sqlite3VdbeAddDblquoteStr(sqlite3 *db, Vdbe *p, const char *z){\n  if( p ){\n    int n = sqlite3Strlen30(z);\n    DblquoteStr *pStr = sqlite3DbMallocRawNN(db,\n                            sizeof(*pStr)+n+1-sizeof(pStr->z));\n    if( pStr ){\n      pStr->pNextStr = p->pDblStr;\n      p->pDblStr = pStr;\n      memcpy(pStr->z, z, n+1);\n    }\n  }\n}\n#endif\n\n#ifdef SQLITE_ENABLE_NORMALIZE\n/*\n** zId of length nId is a double-quoted identifier.  Check to see if\n** that identifier is really used as a string literal.\n*/\nSQLITE_PRIVATE int sqlite3VdbeUsesDoubleQuotedString(\n  Vdbe *pVdbe,            /* The prepared statement */\n  const char *zId         /* The double-quoted identifier, already dequoted */\n){\n  DblquoteStr *pStr;\n  assert( zId!=0 );\n  if( pVdbe->pDblStr==0 ) return 0;\n  for(pStr=pVdbe->pDblStr; pStr; pStr=pStr->pNextStr){\n    if( strcmp(zId, pStr->z)==0 ) return 1;\n  }\n  return 0;\n}\n#endif\n\n/*\n** Swap byte-code between two VDBE structures.\n**\n** This happens after pB was previously run and returned\n** SQLITE_SCHEMA.  The statement was then reprepared in pA.\n** This routine transfers the new bytecode in pA over to pB\n** so that pB can be run again.  The old pB byte code is\n** moved back to pA so that it will be cleaned up when pA is\n** finalized.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){\n  Vdbe tmp, *pTmp, **ppTmp;\n  char *zTmp;\n  assert( pA->db==pB->db );\n  tmp = *pA;\n  *pA = *pB;\n  *pB = tmp;\n  pTmp = pA->pVNext;\n  pA->pVNext = pB->pVNext;\n  pB->pVNext = pTmp;\n  ppTmp = pA->ppVPrev;\n  pA->ppVPrev = pB->ppVPrev;\n  pB->ppVPrev = ppTmp;\n  zTmp = pA->zSql;\n  pA->zSql = pB->zSql;\n  pB->zSql = zTmp;\n#ifdef SQLITE_ENABLE_NORMALIZE\n  zTmp = pA->zNormSql;\n  pA->zNormSql = pB->zNormSql;\n  pB->zNormSql = zTmp;\n#endif\n  pB->expmask = pA->expmask;\n  pB->prepFlags = pA->prepFlags;\n  memcpy(pB->aCounter, pA->aCounter, sizeof(pB->aCounter));\n  pB->aCounter[SQLITE_STMTSTATUS_REPREPARE]++;\n}\n\n/*\n** Resize the Vdbe.aOp array so that it is at least nOp elements larger\n** than its current size. nOp is guaranteed to be less than or equal\n** to 1024/sizeof(Op).\n**\n** If an out-of-memory error occurs while resizing the array, return\n** SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain\n** unchanged (this is so that any opcodes already allocated can be\n** correctly deallocated along with the rest of the Vdbe).\n*/\nstatic int growOpArray(Vdbe *v, int nOp){\n  VdbeOp *pNew;\n  Parse *p = v->pParse;\n\n  /* The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force\n  ** more frequent reallocs and hence provide more opportunities for\n  ** simulated OOM faults.  SQLITE_TEST_REALLOC_STRESS is generally used\n  ** during testing only.  With SQLITE_TEST_REALLOC_STRESS grow the op array\n  ** by the minimum* amount required until the size reaches 512.  Normal\n  ** operation (without SQLITE_TEST_REALLOC_STRESS) is to double the current\n  ** size of the op array or add 1KB of space, whichever is smaller. */\n#ifdef SQLITE_TEST_REALLOC_STRESS\n  sqlite3_int64 nNew = (v->nOpAlloc>=512 ? 2*(sqlite3_int64)v->nOpAlloc\n                        : (sqlite3_int64)v->nOpAlloc+nOp);\n#else\n  sqlite3_int64 nNew = (v->nOpAlloc ? 2*(sqlite3_int64)v->nOpAlloc\n                        : (sqlite3_int64)(1024/sizeof(Op)));\n  UNUSED_PARAMETER(nOp);\n#endif\n\n  /* Ensure that the size of a VDBE does not grow too large */\n  if( nNew > p->db->aLimit[SQLITE_LIMIT_VDBE_OP] ){\n    sqlite3OomFault(p->db);\n    return SQLITE_NOMEM;\n  }\n\n  assert( nOp<=(int)(1024/sizeof(Op)) );\n  assert( nNew>=(v->nOpAlloc+nOp) );\n  pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));\n  if( pNew ){\n    p->szOpAlloc = sqlite3DbMallocSize(p->db, pNew);\n    v->nOpAlloc = p->szOpAlloc/sizeof(Op);\n    v->aOp = pNew;\n  }\n  return (pNew ? SQLITE_OK : SQLITE_NOMEM_BKPT);\n}\n\n#ifdef SQLITE_DEBUG\n/* This routine is just a convenient place to set a breakpoint that will\n** fire after each opcode is inserted and displayed using\n** \"PRAGMA vdbe_addoptrace=on\".  Parameters \"pc\" (program counter) and\n** pOp are available to make the breakpoint conditional.\n**\n** Other useful labels for breakpoints include:\n**   test_trace_breakpoint(pc,pOp)\n**   sqlite3CorruptError(lineno)\n**   sqlite3MisuseError(lineno)\n**   sqlite3CantopenError(lineno)\n*/\nstatic void test_addop_breakpoint(int pc, Op *pOp){\n  static u64 n = 0;\n  (void)pc;\n  (void)pOp;\n  n++;\n  if( n==LARGEST_UINT64 ) abort(); /* so that n is used, preventing a warning */\n}\n#endif\n\n/*\n** Slow paths for sqlite3VdbeAddOp3() and sqlite3VdbeAddOp4Int() for the\n** unusual case when we need to increase the size of the Vdbe.aOp[] array\n** before adding the new opcode.\n*/\nstatic SQLITE_NOINLINE int growOp3(Vdbe *p, int op, int p1, int p2, int p3){\n  assert( p->nOpAlloc<=p->nOp );\n  if( growOpArray(p, 1) ) return 1;\n  assert( p->nOpAlloc>p->nOp );\n  return sqlite3VdbeAddOp3(p, op, p1, p2, p3);\n}\nstatic SQLITE_NOINLINE int addOp4IntSlow(\n  Vdbe *p,            /* Add the opcode to this VM */\n  int op,             /* The new opcode */\n  int p1,             /* The P1 operand */\n  int p2,             /* The P2 operand */\n  int p3,             /* The P3 operand */\n  int p4              /* The P4 operand as an integer */\n){\n  int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);\n  if( p->db->mallocFailed==0 ){\n    VdbeOp *pOp = &p->aOp[addr];\n    pOp->p4type = P4_INT32;\n    pOp->p4.i = p4;\n  }\n  return addr;\n}\n\n\n/*\n** Add a new instruction to the list of instructions current in the\n** VDBE.  Return the address of the new instruction.\n**\n** Parameters:\n**\n**    p               Pointer to the VDBE\n**\n**    op              The opcode for this instruction\n**\n**    p1, p2, p3, p4  Operands\n*/\nSQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe *p, int op){\n  return sqlite3VdbeAddOp3(p, op, 0, 0, 0);\n}\nSQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){\n  return sqlite3VdbeAddOp3(p, op, p1, 0, 0);\n}\nSQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){\n  return sqlite3VdbeAddOp3(p, op, p1, p2, 0);\n}\nSQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){\n  int i;\n  VdbeOp *pOp;\n\n  i = p->nOp;\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  assert( op>=0 && op<0xff );\n  if( p->nOpAlloc<=i ){\n    return growOp3(p, op, p1, p2, p3);\n  }\n  assert( p->aOp!=0 );\n  p->nOp++;\n  pOp = &p->aOp[i];\n  assert( pOp!=0 );\n  pOp->opcode = (u8)op;\n  pOp->p5 = 0;\n  pOp->p1 = p1;\n  pOp->p2 = p2;\n  pOp->p3 = p3;\n  pOp->p4.p = 0;\n  pOp->p4type = P4_NOTUSED;\n\n  /* Replicate this logic in sqlite3VdbeAddOp4Int()\n  ** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv   */\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  pOp->zComment = 0;\n#endif\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE)\n  pOp->nExec = 0;\n  pOp->nCycle = 0;\n#endif\n#ifdef SQLITE_DEBUG\n  if( p->db->flags & SQLITE_VdbeAddopTrace ){\n    sqlite3VdbePrintOp(0, i, &p->aOp[i]);\n    test_addop_breakpoint(i, &p->aOp[i]);\n  }\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n  pOp->iSrcLine = 0;\n#endif\n  /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  ** Replicate in sqlite3VdbeAddOp4Int() */\n\n  return i;\n}\nSQLITE_PRIVATE int sqlite3VdbeAddOp4Int(\n  Vdbe *p,            /* Add the opcode to this VM */\n  int op,             /* The new opcode */\n  int p1,             /* The P1 operand */\n  int p2,             /* The P2 operand */\n  int p3,             /* The P3 operand */\n  int p4              /* The P4 operand as an integer */\n){\n  int i;\n  VdbeOp *pOp;\n\n  i = p->nOp;\n  if( p->nOpAlloc<=i ){\n    return addOp4IntSlow(p, op, p1, p2, p3, p4);\n  }\n  p->nOp++;\n  pOp = &p->aOp[i];\n  assert( pOp!=0 );\n  pOp->opcode = (u8)op;\n  pOp->p5 = 0;\n  pOp->p1 = p1;\n  pOp->p2 = p2;\n  pOp->p3 = p3;\n  pOp->p4.i = p4;\n  pOp->p4type = P4_INT32;\n\n  /* Replicate this logic in sqlite3VdbeAddOp3()\n  ** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv   */\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  pOp->zComment = 0;\n#endif\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE)\n  pOp->nExec = 0;\n  pOp->nCycle = 0;\n#endif\n#ifdef SQLITE_DEBUG\n  if( p->db->flags & SQLITE_VdbeAddopTrace ){\n    sqlite3VdbePrintOp(0, i, &p->aOp[i]);\n    test_addop_breakpoint(i, &p->aOp[i]);\n  }\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n  pOp->iSrcLine = 0;\n#endif\n  /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  ** Replicate in sqlite3VdbeAddOp3() */\n\n  return i;\n}\n\n/* Generate code for an unconditional jump to instruction iDest\n*/\nSQLITE_PRIVATE int sqlite3VdbeGoto(Vdbe *p, int iDest){\n  return sqlite3VdbeAddOp3(p, OP_Goto, 0, iDest, 0);\n}\n\n/* Generate code to cause the string zStr to be loaded into\n** register iDest\n*/\nSQLITE_PRIVATE int sqlite3VdbeLoadString(Vdbe *p, int iDest, const char *zStr){\n  return sqlite3VdbeAddOp4(p, OP_String8, 0, iDest, 0, zStr, 0);\n}\n\n/*\n** Generate code that initializes multiple registers to string or integer\n** constants.  The registers begin with iDest and increase consecutively.\n** One register is initialized for each characgter in zTypes[].  For each\n** \"s\" character in zTypes[], the register is a string if the argument is\n** not NULL, or OP_Null if the value is a null pointer.  For each \"i\" character\n** in zTypes[], the register is initialized to an integer.\n**\n** If the input string does not end with \"X\" then an OP_ResultRow instruction\n** is generated for the values inserted.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe *p, int iDest, const char *zTypes, ...){\n  va_list ap;\n  int i;\n  char c;\n  va_start(ap, zTypes);\n  for(i=0; (c = zTypes[i])!=0; i++){\n    if( c=='s' ){\n      const char *z = va_arg(ap, const char*);\n      sqlite3VdbeAddOp4(p, z==0 ? OP_Null : OP_String8, 0, iDest+i, 0, z, 0);\n    }else if( c=='i' ){\n      sqlite3VdbeAddOp2(p, OP_Integer, va_arg(ap, int), iDest+i);\n    }else{\n      goto skip_op_resultrow;\n    }\n  }\n  sqlite3VdbeAddOp2(p, OP_ResultRow, iDest, i);\nskip_op_resultrow:\n  va_end(ap);\n}\n\n/*\n** Add an opcode that includes the p4 value as a pointer.\n*/\nSQLITE_PRIVATE int sqlite3VdbeAddOp4(\n  Vdbe *p,            /* Add the opcode to this VM */\n  int op,             /* The new opcode */\n  int p1,             /* The P1 operand */\n  int p2,             /* The P2 operand */\n  int p3,             /* The P3 operand */\n  const char *zP4,    /* The P4 operand */\n  int p4type          /* P4 operand type */\n){\n  int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);\n  sqlite3VdbeChangeP4(p, addr, zP4, p4type);\n  return addr;\n}\n\n/*\n** Add an OP_Function or OP_PureFunc opcode.\n**\n** The eCallCtx argument is information (typically taken from Expr.op2)\n** that describes the calling context of the function.  0 means a general\n** function call.  NC_IsCheck means called by a check constraint,\n** NC_IdxExpr means called as part of an index expression.  NC_PartIdx\n** means in the WHERE clause of a partial index.  NC_GenCol means called\n** while computing a generated column value.  0 is the usual case.\n*/\nSQLITE_PRIVATE int sqlite3VdbeAddFunctionCall(\n  Parse *pParse,        /* Parsing context */\n  int p1,               /* Constant argument mask */\n  int p2,               /* First argument register */\n  int p3,               /* Register into which results are written */\n  int nArg,             /* Number of argument */\n  const FuncDef *pFunc, /* The function to be invoked */\n  int eCallCtx          /* Calling context */\n){\n  Vdbe *v = pParse->pVdbe;\n  int addr;\n  sqlite3_context *pCtx;\n  assert( v );\n  pCtx = sqlite3DbMallocRawNN(pParse->db, SZ_CONTEXT(nArg));\n  if( pCtx==0 ){\n    assert( pParse->db->mallocFailed );\n    freeEphemeralFunction(pParse->db, (FuncDef*)pFunc);\n    return 0;\n  }\n  pCtx->pOut = 0;\n  pCtx->pFunc = (FuncDef*)pFunc;\n  pCtx->pVdbe = 0;\n  pCtx->isError = 0;\n  pCtx->argc = nArg;\n  pCtx->iOp = sqlite3VdbeCurrentAddr(v);\n  addr = sqlite3VdbeAddOp4(v, eCallCtx ? OP_PureFunc : OP_Function,\n                           p1, p2, p3, (char*)pCtx, P4_FUNCCTX);\n  sqlite3VdbeChangeP5(v, eCallCtx & NC_SelfRef);\n  sqlite3MayAbort(pParse);\n  return addr;\n}\n\n/*\n** Add an opcode that includes the p4 value with a P4_INT64 or\n** P4_REAL type.\n*/\nSQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(\n  Vdbe *p,            /* Add the opcode to this VM */\n  int op,             /* The new opcode */\n  int p1,             /* The P1 operand */\n  int p2,             /* The P2 operand */\n  int p3,             /* The P3 operand */\n  const u8 *zP4,      /* The P4 operand */\n  int p4type          /* P4 operand type */\n){\n  char *p4copy = sqlite3DbMallocRawNN(sqlite3VdbeDb(p), 8);\n  if( p4copy ) memcpy(p4copy, zP4, 8);\n  return sqlite3VdbeAddOp4(p, op, p1, p2, p3, p4copy, p4type);\n}\n\n#ifndef SQLITE_OMIT_EXPLAIN\n/*\n** Return the address of the current EXPLAIN QUERY PLAN baseline.\n** 0 means \"none\".\n*/\nSQLITE_PRIVATE int sqlite3VdbeExplainParent(Parse *pParse){\n  VdbeOp *pOp;\n  if( pParse->addrExplain==0 ) return 0;\n  pOp = sqlite3VdbeGetOp(pParse->pVdbe, pParse->addrExplain);\n  return pOp->p2;\n}\n\n/*\n** Set a debugger breakpoint on the following routine in order to\n** monitor the EXPLAIN QUERY PLAN code generation.\n*/\n#if defined(SQLITE_DEBUG)\nSQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char *z1, const char *z2){\n  (void)z1;\n  (void)z2;\n}\n#endif\n\n/*\n** Add a new OP_Explain opcode.\n**\n** If the bPush flag is true, then make this opcode the parent for\n** subsequent Explains until sqlite3VdbeExplainPop() is called.\n*/\nSQLITE_PRIVATE int sqlite3VdbeExplain(Parse *pParse, u8 bPush, const char *zFmt, ...){\n  int addr = 0;\n#if !defined(SQLITE_DEBUG)\n  /* Always include the OP_Explain opcodes if SQLITE_DEBUG is defined.\n  ** But omit them (for performance) during production builds */\n  if( pParse->explain==2 || IS_STMT_SCANSTATUS(pParse->db) )\n#endif\n  {\n    char *zMsg;\n    Vdbe *v;\n    va_list ap;\n    int iThis;\n    va_start(ap, zFmt);\n    zMsg = sqlite3VMPrintf(pParse->db, zFmt, ap);\n    va_end(ap);\n    v = pParse->pVdbe;\n    iThis = v->nOp;\n    addr = sqlite3VdbeAddOp4(v, OP_Explain, iThis, pParse->addrExplain, 0,\n                      zMsg, P4_DYNAMIC);\n    sqlite3ExplainBreakpoint(bPush?\"PUSH\":\"\", sqlite3VdbeGetLastOp(v)->p4.z);\n    if( bPush){\n      pParse->addrExplain = iThis;\n    }\n    sqlite3VdbeScanStatus(v, iThis, -1, -1, 0, 0);\n  }\n  return addr;\n}\n\n/*\n** Pop the EXPLAIN QUERY PLAN stack one level.\n*/\nSQLITE_PRIVATE void sqlite3VdbeExplainPop(Parse *pParse){\n  sqlite3ExplainBreakpoint(\"POP\", 0);\n  pParse->addrExplain = sqlite3VdbeExplainParent(pParse);\n}\n#endif /* SQLITE_OMIT_EXPLAIN */\n\n/*\n** Add an OP_ParseSchema opcode.  This routine is broken out from\n** sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees\n** as having been used.\n**\n** The zWhere string must have been obtained from sqlite3_malloc().\n** This routine will take ownership of the allocated memory.\n*/\nSQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere, u16 p5){\n  int j;\n  sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);\n  sqlite3VdbeChangeP5(p, p5);\n  for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);\n  sqlite3MayAbort(p->pParse);\n}\n\n/* Insert the end of a co-routine\n*/\nSQLITE_PRIVATE void sqlite3VdbeEndCoroutine(Vdbe *v, int regYield){\n  sqlite3VdbeAddOp1(v, OP_EndCoroutine, regYield);\n\n  /* Clear the temporary register cache, thereby ensuring that each\n  ** co-routine has its own independent set of registers, because co-routines\n  ** might expect their registers to be preserved across an OP_Yield, and\n  ** that could cause problems if two or more co-routines are using the same\n  ** temporary register.\n  */\n  v->pParse->nTempReg = 0;\n  v->pParse->nRangeReg = 0;\n}\n\n/*\n** Create a new symbolic label for an instruction that has yet to be\n** coded.  The symbolic label is really just a negative number.  The\n** label can be used as the P2 value of an operation.  Later, when\n** the label is resolved to a specific address, the VDBE will scan\n** through its operation list and change all values of P2 which match\n** the label into the resolved address.\n**\n** The VDBE knows that a P2 value is a label because labels are\n** always negative and P2 values are suppose to be non-negative.\n** Hence, a negative P2 value is a label that has yet to be resolved.\n** (Later:) This is only true for opcodes that have the OPFLG_JUMP\n** property.\n**\n** Variable usage notes:\n**\n**     Parse.aLabel[x]     Stores the address that the x-th label resolves\n**                         into.  For testing (SQLITE_DEBUG), unresolved\n**                         labels stores -1, but that is not required.\n**     Parse.nLabelAlloc   Number of slots allocated to Parse.aLabel[]\n**     Parse.nLabel        The *negative* of the number of labels that have\n**                         been issued.  The negative is stored because\n**                         that gives a performance improvement over storing\n**                         the equivalent positive value.\n*/\nSQLITE_PRIVATE int sqlite3VdbeMakeLabel(Parse *pParse){\n  return --pParse->nLabel;\n}\n\n/*\n** Resolve label \"x\" to be the address of the next instruction to\n** be inserted.  The parameter \"x\" must have been obtained from\n** a prior call to sqlite3VdbeMakeLabel().\n*/\nstatic SQLITE_NOINLINE void resizeResolveLabel(Parse *p, Vdbe *v, int j){\n  int nNewSize = 10 - p->nLabel;\n  p->aLabel = sqlite3DbReallocOrFree(p->db, p->aLabel,\n                     nNewSize*sizeof(p->aLabel[0]));\n  if( p->aLabel==0 ){\n    p->nLabelAlloc = 0;\n  }else{\n#ifdef SQLITE_DEBUG\n    int i;\n    for(i=p->nLabelAlloc; i<nNewSize; i++) p->aLabel[i] = -1;\n#endif\n    if( nNewSize>=100 && (nNewSize/100)>(p->nLabelAlloc/100) ){\n      sqlite3ProgressCheck(p);\n    }\n    p->nLabelAlloc = nNewSize;\n    p->aLabel[j] = v->nOp;\n  }\n}\nSQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *v, int x){\n  Parse *p = v->pParse;\n  int j = ADDR(x);\n  assert( v->eVdbeState==VDBE_INIT_STATE );\n  assert( j<-p->nLabel );\n  assert( j>=0 );\n#ifdef SQLITE_DEBUG\n  if( p->db->flags & SQLITE_VdbeAddopTrace ){\n    printf(\"RESOLVE LABEL %d to %d\\n\", x, v->nOp);\n  }\n#endif\n  if( p->nLabelAlloc + p->nLabel < 0 ){\n    resizeResolveLabel(p,v,j);\n  }else{\n    assert( p->aLabel[j]==(-1) ); /* Labels may only be resolved once */\n    p->aLabel[j] = v->nOp;\n  }\n}\n\n/*\n** Mark the VDBE as one that can only be run one time.\n*/\nSQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe *p){\n  sqlite3VdbeAddOp2(p, OP_Expire, 1, 1);\n}\n\n/*\n** Mark the VDBE as one that can be run multiple times.\n*/\nSQLITE_PRIVATE void sqlite3VdbeReusable(Vdbe *p){\n  int i;\n  for(i=1; ALWAYS(i<p->nOp); i++){\n    if( ALWAYS(p->aOp[i].opcode==OP_Expire) ){\n      p->aOp[1].opcode = OP_Noop;\n      break;\n    }\n  }\n}\n\n#ifdef SQLITE_DEBUG /* sqlite3AssertMayAbort() logic */\n\n/*\n** The following type and function are used to iterate through all opcodes\n** in a Vdbe main program and each of the sub-programs (triggers) it may\n** invoke directly or indirectly. It should be used as follows:\n**\n**   Op *pOp;\n**   VdbeOpIter sIter;\n**\n**   memset(&sIter, 0, sizeof(sIter));\n**   sIter.v = v;                            // v is of type Vdbe*\n**   while( (pOp = opIterNext(&sIter)) ){\n**     // Do something with pOp\n**   }\n**   sqlite3DbFree(v->db, sIter.apSub);\n**\n*/\ntypedef struct VdbeOpIter VdbeOpIter;\nstruct VdbeOpIter {\n  Vdbe *v;                   /* Vdbe to iterate through the opcodes of */\n  SubProgram **apSub;        /* Array of subprograms */\n  int nSub;                  /* Number of entries in apSub */\n  int iAddr;                 /* Address of next instruction to return */\n  int iSub;                  /* 0 = main program, 1 = first sub-program etc. */\n};\nstatic Op *opIterNext(VdbeOpIter *p){\n  Vdbe *v = p->v;\n  Op *pRet = 0;\n  Op *aOp;\n  int nOp;\n\n  if( p->iSub<=p->nSub ){\n\n    if( p->iSub==0 ){\n      aOp = v->aOp;\n      nOp = v->nOp;\n    }else{\n      aOp = p->apSub[p->iSub-1]->aOp;\n      nOp = p->apSub[p->iSub-1]->nOp;\n    }\n    assert( p->iAddr<nOp );\n\n    pRet = &aOp[p->iAddr];\n    p->iAddr++;\n    if( p->iAddr==nOp ){\n      p->iSub++;\n      p->iAddr = 0;\n    }\n\n    if( pRet->p4type==P4_SUBPROGRAM ){\n      i64 nByte = (1+(u64)p->nSub)*sizeof(SubProgram*);\n      int j;\n      for(j=0; j<p->nSub; j++){\n        if( p->apSub[j]==pRet->p4.pProgram ) break;\n      }\n      if( j==p->nSub ){\n        p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);\n        if( !p->apSub ){\n          pRet = 0;\n        }else{\n          p->apSub[p->nSub++] = pRet->p4.pProgram;\n        }\n      }\n    }\n  }\n\n  return pRet;\n}\n\n/*\n** Check if the program stored in the VM associated with pParse may\n** throw an ABORT exception (causing the statement, but not entire transaction\n** to be rolled back). This condition is true if the main program or any\n** sub-programs contains any of the following:\n**\n**   *  OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.\n**   *  OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.\n**   *  OP_Destroy\n**   *  OP_VUpdate\n**   *  OP_VCreate\n**   *  OP_VRename\n**   *  OP_FkCounter with P2==0 (immediate foreign key constraint)\n**   *  OP_CreateBtree/BTREE_INTKEY and OP_InitCoroutine\n**      (for CREATE TABLE AS SELECT ...)\n**\n** Then check that the value of Parse.mayAbort is true if an\n** ABORT may be thrown, or false otherwise. Return true if it does\n** match, or false otherwise. This function is intended to be used as\n** part of an assert statement in the compiler. Similar to:\n**\n**   assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );\n*/\nSQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){\n  int hasAbort = 0;\n  int hasFkCounter = 0;\n  int hasCreateTable = 0;\n  int hasCreateIndex = 0;\n  int hasInitCoroutine = 0;\n  Op *pOp;\n  VdbeOpIter sIter;\n\n  if( v==0 ) return 0;\n  memset(&sIter, 0, sizeof(sIter));\n  sIter.v = v;\n\n  while( (pOp = opIterNext(&sIter))!=0 ){\n    int opcode = pOp->opcode;\n    if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename\n     || opcode==OP_VDestroy\n     || opcode==OP_VCreate\n     || opcode==OP_ParseSchema\n     || opcode==OP_Function || opcode==OP_PureFunc\n     || ((opcode==OP_Halt || opcode==OP_HaltIfNull)\n      && ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))\n    ){\n      hasAbort = 1;\n      break;\n    }\n    if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;\n    if( mayAbort ){\n      /* hasCreateIndex may also be set for some DELETE statements that use\n      ** OP_Clear. So this routine may end up returning true in the case\n      ** where a \"DELETE FROM tbl\" has a statement-journal but does not\n      ** require one. This is not so bad - it is an inefficiency, not a bug. */\n      if( opcode==OP_CreateBtree && pOp->p3==BTREE_BLOBKEY ) hasCreateIndex = 1;\n      if( opcode==OP_Clear ) hasCreateIndex = 1;\n    }\n    if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n    if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){\n      hasFkCounter = 1;\n    }\n#endif\n  }\n  sqlite3DbFree(v->db, sIter.apSub);\n\n  /* Return true if hasAbort==mayAbort. Or if a malloc failure occurred.\n  ** If malloc failed, then the while() loop above may not have iterated\n  ** through all opcodes and hasAbort may be set incorrectly. Return\n  ** true for this case to prevent the assert() in the callers frame\n  ** from failing.  */\n  return ( v->db->mallocFailed || hasAbort==mayAbort || hasFkCounter\n        || (hasCreateTable && hasInitCoroutine) || hasCreateIndex\n  );\n}\n#endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */\n\n#ifdef SQLITE_DEBUG\n/*\n** Increment the nWrite counter in the VDBE if the cursor is not an\n** ephemeral cursor, or if the cursor argument is NULL.\n*/\nSQLITE_PRIVATE void sqlite3VdbeIncrWriteCounter(Vdbe *p, VdbeCursor *pC){\n  if( pC==0\n   || (pC->eCurType!=CURTYPE_SORTER\n       && pC->eCurType!=CURTYPE_PSEUDO\n       && !pC->isEphemeral)\n  ){\n    p->nWrite++;\n  }\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Assert if an Abort at this point in time might result in a corrupt\n** database.\n*/\nSQLITE_PRIVATE void sqlite3VdbeAssertAbortable(Vdbe *p){\n  assert( p->nWrite==0 || p->usesStmtJournal );\n}\n#endif\n\n/*\n** This routine is called after all opcodes have been inserted.  It loops\n** through all the opcodes and fixes up some details.\n**\n** (1) For each jump instruction with a negative P2 value (a label)\n**     resolve the P2 value to an actual address.\n**\n** (2) Compute the maximum number of arguments used by the xUpdate/xFilter\n**     methods of any virtual table and store that value in *pMaxVtabArgs.\n**\n** (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately\n**     indicate what the prepared statement actually does.\n**\n** (4) (discontinued)\n**\n** (5) Reclaim the memory allocated for storing labels.\n**\n** This routine will only function correctly if the mkopcodeh.tcl generator\n** script numbers the opcodes correctly.  Changes to this routine must be\n** coordinated with changes to mkopcodeh.tcl.\n*/\nstatic void resolveP2Values(Vdbe *p, int *pMaxVtabArgs){\n  int nMaxVtabArgs = *pMaxVtabArgs;\n  Op *pOp;\n  Parse *pParse = p->pParse;\n  int *aLabel = pParse->aLabel;\n\n  assert( pParse->db->mallocFailed==0 ); /* tag-20230419-1 */\n  p->readOnly = 1;\n  p->bIsReader = 0;\n  pOp = &p->aOp[p->nOp-1];\n  assert( p->aOp[0].opcode==OP_Init );\n  while( 1 /* Loop terminates when it reaches the OP_Init opcode */ ){\n    /* Only JUMP opcodes and the short list of special opcodes in the switch\n    ** below need to be considered.  The mkopcodeh.tcl generator script groups\n    ** all these opcodes together near the front of the opcode list.  Skip\n    ** any opcode that does not need processing by virtual of the fact that\n    ** it is larger than SQLITE_MX_JUMP_OPCODE, as a performance optimization.\n    */\n    if( pOp->opcode<=SQLITE_MX_JUMP_OPCODE ){\n      /* NOTE: Be sure to update mkopcodeh.tcl when adding or removing\n      ** cases from this switch! */\n      switch( pOp->opcode ){\n        case OP_Transaction: {\n          if( pOp->p2!=0 ) p->readOnly = 0;\n          /* no break */ deliberate_fall_through\n        }\n        case OP_AutoCommit:\n        case OP_Savepoint: {\n          p->bIsReader = 1;\n          break;\n        }\n#ifndef SQLITE_OMIT_WAL\n        case OP_Checkpoint:\n#endif\n        case OP_Vacuum:\n        case OP_JournalMode: {\n          p->readOnly = 0;\n          p->bIsReader = 1;\n          break;\n        }\n        case OP_Init: {\n          assert( pOp->p2>=0 );\n          goto resolve_p2_values_loop_exit;\n        }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n        case OP_VUpdate: {\n          if( pOp->p2>nMaxVtabArgs ) nMaxVtabArgs = pOp->p2;\n          break;\n        }\n        case OP_VFilter: {\n          int n;\n          /* The instruction immediately prior to VFilter will be an\n          ** OP_Integer that sets the \"argc\" value for the VFilter.  See\n          ** the code where OP_VFilter is generated at tag-20250207a. */\n          assert( (pOp - p->aOp) >= 3 );\n          assert( pOp[-1].opcode==OP_Integer );\n          assert( pOp[-1].p2==pOp->p3+1 );\n          n = pOp[-1].p1;\n          if( n>nMaxVtabArgs ) nMaxVtabArgs = n;\n          /* Fall through into the default case */\n          /* no break */ deliberate_fall_through\n        }\n#endif\n        default: {\n          if( pOp->p2<0 ){\n            /* The mkopcodeh.tcl script has so arranged things that the only\n            ** non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to\n            ** have non-negative values for P2. */\n            assert( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 );\n            assert( ADDR(pOp->p2)<-pParse->nLabel );\n            assert( aLabel!=0 );  /* True because of tag-20230419-1 */\n            pOp->p2 = aLabel[ADDR(pOp->p2)];\n          }\n\n          /* OPFLG_JUMP opcodes never have P2==0, though OPFLG_JUMP0 opcodes\n          ** might */\n          assert( pOp->p2>0\n                  || (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP0)!=0 );\n\n          /* Jumps never go off the end of the bytecode array */\n          assert( pOp->p2<p->nOp\n                  || (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)==0 );\n          break;\n        }\n      }\n      /* The mkopcodeh.tcl script has so arranged things that the only\n      ** non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to\n      ** have non-negative values for P2. */\n      assert( (sqlite3OpcodeProperty[pOp->opcode]&OPFLG_JUMP)==0 || pOp->p2>=0);\n    }\n    assert( pOp>p->aOp );\n    pOp--;\n  }\nresolve_p2_values_loop_exit:\n  if( aLabel ){\n    sqlite3DbNNFreeNN(p->db, pParse->aLabel);\n    pParse->aLabel = 0;\n  }\n  pParse->nLabel = 0;\n  *pMaxVtabArgs = nMaxVtabArgs;\n  assert( p->bIsReader!=0 || DbMaskAllZero(p->btreeMask) );\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Check to see if a subroutine contains a jump to a location outside of\n** the subroutine.  If a jump outside the subroutine is detected, add code\n** that will cause the program to halt with an error message.\n**\n** The subroutine consists of opcodes between iFirst and iLast.  Jumps to\n** locations within the subroutine are acceptable.  iRetReg is a register\n** that contains the return address.  Jumps to outside the range of iFirst\n** through iLast are also acceptable as long as the jump destination is\n** an OP_Return to iReturnAddr.\n**\n** A jump to an unresolved label means that the jump destination will be\n** beyond the current address.  That is normally a jump to an early\n** termination and is consider acceptable.\n**\n** This routine only runs during debug builds.  The purpose is (of course)\n** to detect invalid escapes out of a subroutine.  The OP_Halt opcode\n** is generated rather than an assert() or other error, so that \".eqp full\"\n** will still work to show the original bytecode, to aid in debugging.\n*/\nSQLITE_PRIVATE void sqlite3VdbeNoJumpsOutsideSubrtn(\n  Vdbe *v,          /* The byte-code program under construction */\n  int iFirst,       /* First opcode of the subroutine */\n  int iLast,        /* Last opcode of the subroutine */\n  int iRetReg       /* Subroutine return address register */\n){\n  VdbeOp *pOp;\n  Parse *pParse;\n  int i;\n  sqlite3_str *pErr = 0;\n  assert( v!=0 );\n  pParse = v->pParse;\n  assert( pParse!=0 );\n  if( pParse->nErr ) return;\n  assert( iLast>=iFirst );\n  assert( iLast<v->nOp );\n  pOp = &v->aOp[iFirst];\n  for(i=iFirst; i<=iLast; i++, pOp++){\n    if( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 ){\n      int iDest = pOp->p2;   /* Jump destination */\n      if( iDest==0 ) continue;\n      if( pOp->opcode==OP_Gosub ) continue;\n      if( pOp->p3==20230325 && pOp->opcode==OP_NotNull ){\n        /* This is a deliberately taken illegal branch.  tag-20230325-2 */\n        continue;\n      }\n      if( iDest<0 ){\n        int j = ADDR(iDest);\n        assert( j>=0 );\n        if( j>=-pParse->nLabel || pParse->aLabel[j]<0 ){\n          continue;\n        }\n        iDest = pParse->aLabel[j];\n      }\n      if( iDest<iFirst || iDest>iLast ){\n        int j = iDest;\n        for(; j<v->nOp; j++){\n          VdbeOp *pX = &v->aOp[j];\n          if( pX->opcode==OP_Return ){\n            if( pX->p1==iRetReg ) break;\n            continue;\n          }\n          if( pX->opcode==OP_Noop ) continue;\n          if( pX->opcode==OP_Explain ) continue;\n          if( pErr==0 ){\n            pErr = sqlite3_str_new(0);\n          }else{\n            sqlite3_str_appendchar(pErr, 1, '\\n');\n          }\n          sqlite3_str_appendf(pErr,\n              \"Opcode at %d jumps to %d which is outside the \"\n              \"subroutine at %d..%d\",\n              i, iDest, iFirst, iLast);\n          break;\n        }\n      }\n    }\n  }\n  if( pErr ){\n    char *zErr = sqlite3_str_finish(pErr);\n    sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_INTERNAL, OE_Abort, 0, zErr, 0);\n    sqlite3_free(zErr);\n    sqlite3MayAbort(pParse);\n  }\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** Return the address of the next instruction to be inserted.\n*/\nSQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe *p){\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  return p->nOp;\n}\n\n/*\n** Verify that at least N opcode slots are available in p without\n** having to malloc for more space (except when compiled using\n** SQLITE_TEST_REALLOC_STRESS).  This interface is used during testing\n** to verify that certain calls to sqlite3VdbeAddOpList() can never\n** fail due to a OOM fault and hence that the return value from\n** sqlite3VdbeAddOpList() will always be non-NULL.\n*/\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)\nSQLITE_PRIVATE void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N){\n  assert( p->nOp + N <= p->nOpAlloc );\n}\n#endif\n\n/*\n** Verify that the VM passed as the only argument does not contain\n** an OP_ResultRow opcode. Fail an assert() if it does. This is used\n** by code in pragma.c to ensure that the implementation of certain\n** pragmas comports with the flags specified in the mkpragmatab.tcl\n** script.\n*/\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)\nSQLITE_PRIVATE void sqlite3VdbeVerifyNoResultRow(Vdbe *p){\n  int i;\n  for(i=0; i<p->nOp; i++){\n    assert( p->aOp[i].opcode!=OP_ResultRow );\n  }\n}\n#endif\n\n/*\n** Generate code (a single OP_Abortable opcode) that will\n** verify that the VDBE program can safely call Abort in the current\n** context.\n*/\n#if defined(SQLITE_DEBUG)\nSQLITE_PRIVATE void sqlite3VdbeVerifyAbortable(Vdbe *p, int onError){\n  if( onError==OE_Abort ) sqlite3VdbeAddOp0(p, OP_Abortable);\n}\n#endif\n\n/*\n** This function returns a pointer to the array of opcodes associated with\n** the Vdbe passed as the first argument. It is the callers responsibility\n** to arrange for the returned array to be eventually freed using the\n** vdbeFreeOpArray() function.\n**\n** Before returning, *pnOp is set to the number of entries in the returned\n** array. Also, *pnMaxArg is set to the larger of its current value and\n** the number of entries in the Vdbe.apArg[] array required to execute the\n** returned program.\n*/\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe *p, int *pnOp, int *pnMaxArg){\n  VdbeOp *aOp = p->aOp;\n  assert( aOp && !p->db->mallocFailed );\n\n  /* Check that sqlite3VdbeUsesBtree() was not called on this VM */\n  assert( DbMaskAllZero(p->btreeMask) );\n\n  resolveP2Values(p, pnMaxArg);\n  *pnOp = p->nOp;\n  p->aOp = 0;\n  return aOp;\n}\n\n/*\n** Add a whole list of operations to the operation stack.  Return a\n** pointer to the first operation inserted.\n**\n** Non-zero P2 arguments to jump instructions are automatically adjusted\n** so that the jump target is relative to the first operation inserted.\n*/\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(\n  Vdbe *p,                     /* Add opcodes to the prepared statement */\n  int nOp,                     /* Number of opcodes to add */\n  VdbeOpList const *aOp,       /* The opcodes to be added */\n  int iLineno                  /* Source-file line number of first opcode */\n){\n  int i;\n  VdbeOp *pOut, *pFirst;\n  assert( nOp>0 );\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  if( p->nOp + nOp > p->nOpAlloc && growOpArray(p, nOp) ){\n    return 0;\n  }\n  pFirst = pOut = &p->aOp[p->nOp];\n  for(i=0; i<nOp; i++, aOp++, pOut++){\n    pOut->opcode = aOp->opcode;\n    pOut->p1 = aOp->p1;\n    pOut->p2 = aOp->p2;\n    assert( aOp->p2>=0 );\n    if( (sqlite3OpcodeProperty[aOp->opcode] & OPFLG_JUMP)!=0 && aOp->p2>0 ){\n      pOut->p2 += p->nOp;\n    }\n    pOut->p3 = aOp->p3;\n    pOut->p4type = P4_NOTUSED;\n    pOut->p4.p = 0;\n    pOut->p5 = 0;\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n    pOut->zComment = 0;\n#endif\n#ifdef SQLITE_VDBE_COVERAGE\n    pOut->iSrcLine = iLineno+i;\n#else\n    (void)iLineno;\n#endif\n#ifdef SQLITE_DEBUG\n    if( p->db->flags & SQLITE_VdbeAddopTrace ){\n      sqlite3VdbePrintOp(0, i+p->nOp, &p->aOp[i+p->nOp]);\n    }\n#endif\n  }\n  p->nOp += nOp;\n  return pFirst;\n}\n\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n/*\n** Add an entry to the array of counters managed by sqlite3_stmt_scanstatus().\n*/\nSQLITE_PRIVATE void sqlite3VdbeScanStatus(\n  Vdbe *p,                        /* VM to add scanstatus() to */\n  int addrExplain,                /* Address of OP_Explain (or 0) */\n  int addrLoop,                   /* Address of loop counter */\n  int addrVisit,                  /* Address of rows visited counter */\n  LogEst nEst,                    /* Estimated number of output rows */\n  const char *zName               /* Name of table or index being scanned */\n){\n  if( IS_STMT_SCANSTATUS(p->db) ){\n    i64 nByte = (1+(i64)p->nScan) * sizeof(ScanStatus);\n    ScanStatus *aNew;\n    aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte);\n    if( aNew ){\n      ScanStatus *pNew = &aNew[p->nScan++];\n      memset(pNew, 0, sizeof(ScanStatus));\n      pNew->addrExplain = addrExplain;\n      pNew->addrLoop = addrLoop;\n      pNew->addrVisit = addrVisit;\n      pNew->nEst = nEst;\n      pNew->zName = sqlite3DbStrDup(p->db, zName);\n      p->aScan = aNew;\n    }\n  }\n}\n\n/*\n** Add the range of instructions from addrStart to addrEnd (inclusive) to\n** the set of those corresponding to the sqlite3_stmt_scanstatus() counters\n** associated with the OP_Explain instruction at addrExplain. The\n** sum of the sqlite3Hwtime() values for each of these instructions\n** will be returned for SQLITE_SCANSTAT_NCYCLE requests.\n*/\nSQLITE_PRIVATE void sqlite3VdbeScanStatusRange(\n  Vdbe *p,\n  int addrExplain,\n  int addrStart,\n  int addrEnd\n){\n  if( IS_STMT_SCANSTATUS(p->db) ){\n    ScanStatus *pScan = 0;\n    int ii;\n    for(ii=p->nScan-1; ii>=0; ii--){\n      pScan = &p->aScan[ii];\n      if( pScan->addrExplain==addrExplain ) break;\n      pScan = 0;\n    }\n    if( pScan ){\n      if( addrEnd<0 ) addrEnd = sqlite3VdbeCurrentAddr(p)-1;\n      for(ii=0; ii<ArraySize(pScan->aAddrRange); ii+=2){\n        if( pScan->aAddrRange[ii]==0 ){\n          pScan->aAddrRange[ii] = addrStart;\n          pScan->aAddrRange[ii+1] = addrEnd;\n          break;\n        }\n      }\n    }\n  }\n}\n\n/*\n** Set the addresses for the SQLITE_SCANSTAT_NLOOP and SQLITE_SCANSTAT_NROW\n** counters for the query element associated with the OP_Explain at\n** addrExplain.\n*/\nSQLITE_PRIVATE void sqlite3VdbeScanStatusCounters(\n  Vdbe *p,\n  int addrExplain,\n  int addrLoop,\n  int addrVisit\n){\n  if( IS_STMT_SCANSTATUS(p->db) ){\n    ScanStatus *pScan = 0;\n    int ii;\n    for(ii=p->nScan-1; ii>=0; ii--){\n      pScan = &p->aScan[ii];\n      if( pScan->addrExplain==addrExplain ) break;\n      pScan = 0;\n    }\n    if( pScan ){\n      if( addrLoop>0 ) pScan->addrLoop = addrLoop;\n      if( addrVisit>0 ) pScan->addrVisit = addrVisit;\n    }\n  }\n}\n#endif /* defined(SQLITE_ENABLE_STMT_SCANSTATUS) */\n\n\n/*\n** Change the value of the opcode, or P1, P2, P3, or P5 operands\n** for a specific instruction.\n*/\nSQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe *p, int addr, u8 iNewOpcode){\n  assert( addr>=0 );\n  sqlite3VdbeGetOp(p,addr)->opcode = iNewOpcode;\n}\nSQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe *p, int addr, int val){\n  assert( addr>=0 );\n  sqlite3VdbeGetOp(p,addr)->p1 = val;\n}\nSQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, int addr, int val){\n  assert( addr>=0 || p->db->mallocFailed );\n  sqlite3VdbeGetOp(p,addr)->p2 = val;\n}\nSQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, int addr, int val){\n  assert( addr>=0 );\n  sqlite3VdbeGetOp(p,addr)->p3 = val;\n}\nSQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u16 p5){\n  assert( p->nOp>0 || p->db->mallocFailed );\n  if( p->nOp>0 ) p->aOp[p->nOp-1].p5 = p5;\n}\n\n/*\n** If the previous opcode is an OP_Column that delivers results\n** into register iDest, then add the OPFLAG_TYPEOFARG flag to that\n** opcode.\n*/\nSQLITE_PRIVATE void sqlite3VdbeTypeofColumn(Vdbe *p, int iDest){\n  VdbeOp *pOp = sqlite3VdbeGetLastOp(p);\n#ifdef SQLITE_DEBUG\n  while( pOp->opcode==OP_ReleaseReg ) pOp--;\n#endif\n  if( pOp->p3==iDest && pOp->opcode==OP_Column ){\n    pOp->p5 |= OPFLAG_TYPEOFARG;\n  }\n}\n\n/*\n** Change the P2 operand of instruction addr so that it points to\n** the address of the next instruction to be coded.\n*/\nSQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){\n  sqlite3VdbeChangeP2(p, addr, p->nOp);\n}\n\n/*\n** Change the P2 operand of the jump instruction at addr so that\n** the jump lands on the next opcode.  Or if the jump instruction was\n** the previous opcode (and is thus a no-op) then simply back up\n** the next instruction counter by one slot so that the jump is\n** overwritten by the next inserted opcode.\n**\n** This routine is an optimization of sqlite3VdbeJumpHere() that\n** strives to omit useless byte-code like this:\n**\n**        7   Once 0 8 0\n**        8   ...\n*/\nSQLITE_PRIVATE void sqlite3VdbeJumpHereOrPopInst(Vdbe *p, int addr){\n  if( addr==p->nOp-1 ){\n    assert( p->aOp[addr].opcode==OP_Once\n         || p->aOp[addr].opcode==OP_If\n         || p->aOp[addr].opcode==OP_FkIfZero );\n    assert( p->aOp[addr].p4type==0 );\n#ifdef SQLITE_VDBE_COVERAGE\n    sqlite3VdbeGetLastOp(p)->iSrcLine = 0;  /* Erase VdbeCoverage() macros */\n#endif\n    p->nOp--;\n  }else{\n    sqlite3VdbeChangeP2(p, addr, p->nOp);\n  }\n}\n\n\n/*\n** If the input FuncDef structure is ephemeral, then free it.  If\n** the FuncDef is not ephemeral, then do nothing.\n*/\nstatic void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){\n  assert( db!=0 );\n  if( (pDef->funcFlags & SQLITE_FUNC_EPHEM)!=0 ){\n    sqlite3DbNNFreeNN(db, pDef);\n  }\n}\n\n/*\n** Delete a P4 value if necessary.\n*/\nstatic SQLITE_NOINLINE void freeP4Mem(sqlite3 *db, Mem *p){\n  if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);\n  sqlite3DbNNFreeNN(db, p);\n}\nstatic SQLITE_NOINLINE void freeP4FuncCtx(sqlite3 *db, sqlite3_context *p){\n  assert( db!=0 );\n  freeEphemeralFunction(db, p->pFunc);\n  sqlite3DbNNFreeNN(db, p);\n}\nstatic void freeP4(sqlite3 *db, int p4type, void *p4){\n  assert( db );\n  switch( p4type ){\n    case P4_FUNCCTX: {\n      freeP4FuncCtx(db, (sqlite3_context*)p4);\n      break;\n    }\n    case P4_REAL:\n    case P4_INT64:\n    case P4_DYNAMIC:\n    case P4_INTARRAY: {\n      if( p4 ) sqlite3DbNNFreeNN(db, p4);\n      break;\n    }\n    case P4_KEYINFO: {\n      if( db->pnBytesFreed==0 ) sqlite3KeyInfoUnref((KeyInfo*)p4);\n      break;\n    }\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n    case P4_EXPR: {\n      sqlite3ExprDelete(db, (Expr*)p4);\n      break;\n    }\n#endif\n    case P4_FUNCDEF: {\n      freeEphemeralFunction(db, (FuncDef*)p4);\n      break;\n    }\n    case P4_MEM: {\n      if( db->pnBytesFreed==0 ){\n        sqlite3ValueFree((sqlite3_value*)p4);\n      }else{\n        freeP4Mem(db, (Mem*)p4);\n      }\n      break;\n    }\n    case P4_VTAB : {\n      if( db->pnBytesFreed==0 ) sqlite3VtabUnlock((VTable *)p4);\n      break;\n    }\n    case P4_TABLEREF: {\n      if( db->pnBytesFreed==0 ) sqlite3DeleteTable(db, (Table*)p4);\n      break;\n    }\n    case P4_SUBRTNSIG: {\n      SubrtnSig *pSig = (SubrtnSig*)p4;\n      sqlite3DbFree(db, pSig->zAff);\n      sqlite3DbFree(db, pSig);\n      break;\n    }\n  }\n}\n\n/*\n** Free the space allocated for aOp and any p4 values allocated for the\n** opcodes contained within. If aOp is not NULL it is assumed to contain\n** nOp entries.\n*/\nstatic void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){\n  assert( nOp>=0 );\n  assert( db!=0 );\n  if( aOp ){\n    Op *pOp = &aOp[nOp-1];\n    while(1){  /* Exit via break */\n      if( pOp->p4type <= P4_FREE_IF_LE ) freeP4(db, pOp->p4type, pOp->p4.p);\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n      sqlite3DbFree(db, pOp->zComment);\n#endif\n      if( pOp==aOp ) break;\n      pOp--;\n    }\n    sqlite3DbNNFreeNN(db, aOp);\n  }\n}\n\n/*\n** Link the SubProgram object passed as the second argument into the linked\n** list at Vdbe.pSubProgram. This list is used to delete all sub-program\n** objects when the VM is no longer required.\n*/\nSQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *pVdbe, SubProgram *p){\n  p->pNext = pVdbe->pProgram;\n  pVdbe->pProgram = p;\n}\n\n/*\n** Return true if the given Vdbe has any SubPrograms.\n*/\nSQLITE_PRIVATE int sqlite3VdbeHasSubProgram(Vdbe *pVdbe){\n  return pVdbe->pProgram!=0;\n}\n\n/*\n** Change the opcode at addr into OP_Noop\n*/\nSQLITE_PRIVATE int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){\n  VdbeOp *pOp;\n  if( p->db->mallocFailed ) return 0;\n  assert( addr>=0 && addr<p->nOp );\n  pOp = &p->aOp[addr];\n  freeP4(p->db, pOp->p4type, pOp->p4.p);\n  pOp->p4type = P4_NOTUSED;\n  pOp->p4.z = 0;\n  pOp->opcode = OP_Noop;\n  return 1;\n}\n\n/*\n** If the last opcode is \"op\" and it is not a jump destination,\n** then remove it.  Return true if and only if an opcode was removed.\n*/\nSQLITE_PRIVATE int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){\n  if( p->nOp>0 && p->aOp[p->nOp-1].opcode==op ){\n    return sqlite3VdbeChangeToNoop(p, p->nOp-1);\n  }else{\n    return 0;\n  }\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Generate an OP_ReleaseReg opcode to indicate that a range of\n** registers, except any identified by mask, are no longer in use.\n*/\nSQLITE_PRIVATE void sqlite3VdbeReleaseRegisters(\n  Parse *pParse,       /* Parsing context */\n  int iFirst,          /* Index of first register to be released */\n  int N,               /* Number of registers to release */\n  u32 mask,            /* Mask of registers to NOT release */\n  int bUndefine        /* If true, mark registers as undefined */\n){\n  if( N==0 || OptimizationDisabled(pParse->db, SQLITE_ReleaseReg) ) return;\n  assert( pParse->pVdbe );\n  assert( iFirst>=1 );\n  assert( iFirst+N-1<=pParse->nMem );\n  if( N<=31 && mask!=0 ){\n    while( N>0 && (mask&1)!=0 ){\n      mask >>= 1;\n      iFirst++;\n      N--;\n    }\n    while( N>0 && N<=32 && (mask & MASKBIT32(N-1))!=0 ){\n      mask &= ~MASKBIT32(N-1);\n      N--;\n    }\n  }\n  if( N>0 ){\n    sqlite3VdbeAddOp3(pParse->pVdbe, OP_ReleaseReg, iFirst, N, *(int*)&mask);\n    if( bUndefine ) sqlite3VdbeChangeP5(pParse->pVdbe, 1);\n  }\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** Change the value of the P4 operand for a specific instruction.\n** This routine is useful when a large program is loaded from a\n** static array using sqlite3VdbeAddOpList but we want to make a\n** few minor changes to the program.\n**\n** If n>=0 then the P4 operand is dynamic, meaning that a copy of\n** the string is made into memory obtained from sqlite3_malloc().\n** A value of n==0 means copy bytes of zP4 up to and including the\n** first null byte.  If n>0 then copy n+1 bytes of zP4.\n**\n** Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points\n** to a string or structure that is guaranteed to exist for the lifetime of\n** the Vdbe. In these cases we can just copy the pointer.\n**\n** If addr<0 then change P4 on the most recently inserted instruction.\n*/\nstatic void SQLITE_NOINLINE vdbeChangeP4Full(\n  Vdbe *p,\n  Op *pOp,\n  const char *zP4,\n  int n\n){\n  if( pOp->p4type ){\n    assert( pOp->p4type > P4_FREE_IF_LE );\n    pOp->p4type = 0;\n    pOp->p4.p = 0;\n  }\n  if( n<0 ){\n    sqlite3VdbeChangeP4(p, (int)(pOp - p->aOp), zP4, n);\n  }else{\n    if( n==0 ) n = sqlite3Strlen30(zP4);\n    pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);\n    pOp->p4type = P4_DYNAMIC;\n  }\n}\nSQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){\n  Op *pOp;\n  sqlite3 *db;\n  assert( p!=0 );\n  db = p->db;\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  assert( p->aOp!=0 || db->mallocFailed );\n  if( db->mallocFailed ){\n    if( n!=P4_VTAB ) freeP4(db, n, (void*)*(char**)&zP4);\n    return;\n  }\n  assert( p->nOp>0 );\n  assert( addr<p->nOp );\n  if( addr<0 ){\n    addr = p->nOp - 1;\n  }\n  pOp = &p->aOp[addr];\n  if( n>=0 || pOp->p4type ){\n    vdbeChangeP4Full(p, pOp, zP4, n);\n    return;\n  }\n  if( n==P4_INT32 ){\n    /* Note: this cast is safe, because the origin data point was an int\n    ** that was cast to a (const char *). */\n    pOp->p4.i = SQLITE_PTR_TO_INT(zP4);\n    pOp->p4type = P4_INT32;\n  }else if( zP4!=0 ){\n    assert( n<0 );\n    pOp->p4.p = (void*)zP4;\n    pOp->p4type = (signed char)n;\n    if( n==P4_VTAB ) sqlite3VtabLock((VTable*)zP4);\n  }\n}\n\n/*\n** Change the P4 operand of the most recently coded instruction\n** to the value defined by the arguments.  This is a high-speed\n** version of sqlite3VdbeChangeP4().\n**\n** The P4 operand must not have been previously defined.  And the new\n** P4 must not be P4_INT32.  Use sqlite3VdbeChangeP4() in either of\n** those cases.\n*/\nSQLITE_PRIVATE void sqlite3VdbeAppendP4(Vdbe *p, void *pP4, int n){\n  VdbeOp *pOp;\n  assert( n!=P4_INT32 && n!=P4_VTAB );\n  assert( n<=0 );\n  if( p->db->mallocFailed ){\n    freeP4(p->db, n, pP4);\n  }else{\n    assert( pP4!=0 || n==P4_DYNAMIC );\n    assert( p->nOp>0 );\n    pOp = &p->aOp[p->nOp-1];\n    assert( pOp->p4type==P4_NOTUSED );\n    pOp->p4type = n;\n    pOp->p4.p = pP4;\n  }\n}\n\n/*\n** Set the P4 on the most recently added opcode to the KeyInfo for the\n** index given.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetP4KeyInfo(Parse *pParse, Index *pIdx){\n  Vdbe *v = pParse->pVdbe;\n  KeyInfo *pKeyInfo;\n  assert( v!=0 );\n  assert( pIdx!=0 );\n  pKeyInfo = sqlite3KeyInfoOfIndex(pParse, pIdx);\n  if( pKeyInfo ) sqlite3VdbeAppendP4(v, pKeyInfo, P4_KEYINFO);\n}\n\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n/*\n** Change the comment on the most recently coded instruction.  Or\n** insert a No-op and add the comment to that new instruction.  This\n** makes the code easier to read during debugging.  None of this happens\n** in a production build.\n*/\nstatic void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){\n  assert( p->nOp>0 || p->aOp==0 );\n  assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->pParse->nErr>0 );\n  if( p->nOp ){\n    assert( p->aOp );\n    sqlite3DbFree(p->db, p->aOp[p->nOp-1].zComment);\n    p->aOp[p->nOp-1].zComment = sqlite3VMPrintf(p->db, zFormat, ap);\n  }\n}\nSQLITE_PRIVATE void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){\n  va_list ap;\n  if( p ){\n    va_start(ap, zFormat);\n    vdbeVComment(p, zFormat, ap);\n    va_end(ap);\n  }\n}\nSQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe *p, const char *zFormat, ...){\n  va_list ap;\n  if( p ){\n    sqlite3VdbeAddOp0(p, OP_Noop);\n    va_start(ap, zFormat);\n    vdbeVComment(p, zFormat, ap);\n    va_end(ap);\n  }\n}\n#endif  /* NDEBUG */\n\n#ifdef SQLITE_VDBE_COVERAGE\n/*\n** Set the value if the iSrcLine field for the previously coded instruction.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe *v, int iLine){\n  sqlite3VdbeGetLastOp(v)->iSrcLine = iLine;\n}\n#endif /* SQLITE_VDBE_COVERAGE */\n\n/*\n** Return the opcode for a given address.  The address must be non-negative.\n** See sqlite3VdbeGetLastOp() to get the most recently added opcode.\n**\n** If a memory allocation error has occurred prior to the calling of this\n** routine, then a pointer to a dummy VdbeOp will be returned.  That opcode\n** is readable but not writable, though it is cast to a writable value.\n** The return of a dummy opcode allows the call to continue functioning\n** after an OOM fault without having to check to see if the return from\n** this routine is a valid pointer.  But because the dummy.opcode is 0,\n** dummy will never be written to.  This is verified by code inspection and\n** by running with Valgrind.\n*/\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){\n  /* C89 specifies that the constant \"dummy\" will be initialized to all\n  ** zeros, which is correct.  MSVC generates a warning, nevertheless. */\n  static VdbeOp dummy;  /* Ignore the MSVC warning about no initializer */\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  assert( (addr>=0 && addr<p->nOp) || p->db->mallocFailed );\n  if( p->db->mallocFailed ){\n    return (VdbeOp*)&dummy;\n  }else{\n    return &p->aOp[addr];\n  }\n}\n\n/* Return the most recently added opcode\n*/\nSQLITE_PRIVATE VdbeOp *sqlite3VdbeGetLastOp(Vdbe *p){\n  return sqlite3VdbeGetOp(p, p->nOp - 1);\n}\n\n#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS)\n/*\n** Return an integer value for one of the parameters to the opcode pOp\n** determined by character c.\n*/\nstatic int translateP(char c, const Op *pOp){\n  if( c=='1' ) return pOp->p1;\n  if( c=='2' ) return pOp->p2;\n  if( c=='3' ) return pOp->p3;\n  if( c=='4' ) return pOp->p4.i;\n  return pOp->p5;\n}\n\n/*\n** Compute a string for the \"comment\" field of a VDBE opcode listing.\n**\n** The Synopsis: field in comments in the vdbe.c source file gets converted\n** to an extra string that is appended to the sqlite3OpcodeName().  In the\n** absence of other comments, this synopsis becomes the comment on the opcode.\n** Some translation occurs:\n**\n**       \"PX\"      ->  \"r[X]\"\n**       \"PX@PY\"   ->  \"r[X..X+Y-1]\"  or \"r[x]\" if y is 0 or 1\n**       \"PX@PY+1\" ->  \"r[X..X+Y]\"    or \"r[x]\" if y is 0\n**       \"PY..PY\"  ->  \"r[X..Y]\"      or \"r[x]\" if y<=x\n*/\nSQLITE_PRIVATE char *sqlite3VdbeDisplayComment(\n  sqlite3 *db,       /* Optional - Oom error reporting only */\n  const Op *pOp,     /* The opcode to be commented */\n  const char *zP4    /* Previously obtained value for P4 */\n){\n  const char *zOpName;\n  const char *zSynopsis;\n  int nOpName;\n  int ii;\n  char zAlt[50];\n  StrAccum x;\n\n  sqlite3StrAccumInit(&x, 0, 0, 0, SQLITE_MAX_LENGTH);\n  zOpName = sqlite3OpcodeName(pOp->opcode);\n  nOpName = sqlite3Strlen30(zOpName);\n  if( zOpName[nOpName+1] ){\n    int seenCom = 0;\n    char c;\n    zSynopsis = zOpName + nOpName + 1;\n    if( strncmp(zSynopsis,\"IF \",3)==0 ){\n      sqlite3_snprintf(sizeof(zAlt), zAlt, \"if %s goto P2\", zSynopsis+3);\n      zSynopsis = zAlt;\n    }\n    for(ii=0; (c = zSynopsis[ii])!=0; ii++){\n      if( c=='P' ){\n        c = zSynopsis[++ii];\n        if( c=='4' ){\n          sqlite3_str_appendall(&x, zP4);\n        }else if( c=='X' ){\n          if( pOp->zComment && pOp->zComment[0] ){\n            sqlite3_str_appendall(&x, pOp->zComment);\n            seenCom = 1;\n            break;\n          }\n        }else{\n          int v1 = translateP(c, pOp);\n          int v2;\n          if( strncmp(zSynopsis+ii+1, \"@P\", 2)==0 ){\n            ii += 3;\n            v2 = translateP(zSynopsis[ii], pOp);\n            if( strncmp(zSynopsis+ii+1,\"+1\",2)==0 ){\n              ii += 2;\n              v2++;\n            }\n            if( v2<2 ){\n              sqlite3_str_appendf(&x, \"%d\", v1);\n            }else{\n              sqlite3_str_appendf(&x, \"%d..%d\", v1, v1+v2-1);\n            }\n          }else if( strncmp(zSynopsis+ii+1, \"@NP\", 3)==0 ){\n            sqlite3_context *pCtx = pOp->p4.pCtx;\n            if( pOp->p4type!=P4_FUNCCTX || pCtx->argc==1 ){\n              sqlite3_str_appendf(&x, \"%d\", v1);\n            }else if( pCtx->argc>1 ){\n              sqlite3_str_appendf(&x, \"%d..%d\", v1, v1+pCtx->argc-1);\n            }else if( x.accError==0 ){\n              assert( x.nChar>2 );\n              x.nChar -= 2;\n              ii++;\n            }\n            ii += 3;\n          }else{\n            sqlite3_str_appendf(&x, \"%d\", v1);\n            if( strncmp(zSynopsis+ii+1, \"..P3\", 4)==0 && pOp->p3==0 ){\n              ii += 4;\n            }\n          }\n        }\n      }else{\n        sqlite3_str_appendchar(&x, 1, c);\n      }\n    }\n    if( !seenCom && pOp->zComment ){\n      sqlite3_str_appendf(&x, \"; %s\", pOp->zComment);\n    }\n  }else if( pOp->zComment ){\n    sqlite3_str_appendall(&x, pOp->zComment);\n  }\n  if( (x.accError & SQLITE_NOMEM)!=0 && db!=0 ){\n    sqlite3OomFault(db);\n  }\n  return sqlite3StrAccumFinish(&x);\n}\n#endif /* SQLITE_ENABLE_EXPLAIN_COMMENTS */\n\n#if VDBE_DISPLAY_P4 && defined(SQLITE_ENABLE_CURSOR_HINTS)\n/*\n** Translate the P4.pExpr value for an OP_CursorHint opcode into text\n** that can be displayed in the P4 column of EXPLAIN output.\n*/\nstatic void displayP4Expr(StrAccum *p, Expr *pExpr){\n  const char *zOp = 0;\n  switch( pExpr->op ){\n    case TK_STRING:\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3_str_appendf(p, \"%Q\", pExpr->u.zToken);\n      break;\n    case TK_INTEGER:\n      sqlite3_str_appendf(p, \"%d\", pExpr->u.iValue);\n      break;\n    case TK_NULL:\n      sqlite3_str_appendf(p, \"NULL\");\n      break;\n    case TK_REGISTER: {\n      sqlite3_str_appendf(p, \"r[%d]\", pExpr->iTable);\n      break;\n    }\n    case TK_COLUMN: {\n      if( pExpr->iColumn<0 ){\n        sqlite3_str_appendf(p, \"rowid\");\n      }else{\n        sqlite3_str_appendf(p, \"c%d\", (int)pExpr->iColumn);\n      }\n      break;\n    }\n    case TK_LT:      zOp = \"LT\";      break;\n    case TK_LE:      zOp = \"LE\";      break;\n    case TK_GT:      zOp = \"GT\";      break;\n    case TK_GE:      zOp = \"GE\";      break;\n    case TK_NE:      zOp = \"NE\";      break;\n    case TK_EQ:      zOp = \"EQ\";      break;\n    case TK_IS:      zOp = \"IS\";      break;\n    case TK_ISNOT:   zOp = \"ISNOT\";   break;\n    case TK_AND:     zOp = \"AND\";     break;\n    case TK_OR:      zOp = \"OR\";      break;\n    case TK_PLUS:    zOp = \"ADD\";     break;\n    case TK_STAR:    zOp = \"MUL\";     break;\n    case TK_MINUS:   zOp = \"SUB\";     break;\n    case TK_REM:     zOp = \"REM\";     break;\n    case TK_BITAND:  zOp = \"BITAND\";  break;\n    case TK_BITOR:   zOp = \"BITOR\";   break;\n    case TK_SLASH:   zOp = \"DIV\";     break;\n    case TK_LSHIFT:  zOp = \"LSHIFT\";  break;\n    case TK_RSHIFT:  zOp = \"RSHIFT\";  break;\n    case TK_CONCAT:  zOp = \"CONCAT\";  break;\n    case TK_UMINUS:  zOp = \"MINUS\";   break;\n    case TK_UPLUS:   zOp = \"PLUS\";    break;\n    case TK_BITNOT:  zOp = \"BITNOT\";  break;\n    case TK_NOT:     zOp = \"NOT\";     break;\n    case TK_ISNULL:  zOp = \"ISNULL\";  break;\n    case TK_NOTNULL: zOp = \"NOTNULL\"; break;\n\n    default:\n      sqlite3_str_appendf(p, \"%s\", \"expr\");\n      break;\n  }\n\n  if( zOp ){\n    sqlite3_str_appendf(p, \"%s(\", zOp);\n    displayP4Expr(p, pExpr->pLeft);\n    if( pExpr->pRight ){\n      sqlite3_str_append(p, \",\", 1);\n      displayP4Expr(p, pExpr->pRight);\n    }\n    sqlite3_str_append(p, \")\", 1);\n  }\n}\n#endif /* VDBE_DISPLAY_P4 && defined(SQLITE_ENABLE_CURSOR_HINTS) */\n\n\n#if VDBE_DISPLAY_P4\n/*\n** Compute a string that describes the P4 parameter for an opcode.\n** Use zTemp for any required temporary buffer space.\n*/\nSQLITE_PRIVATE char *sqlite3VdbeDisplayP4(sqlite3 *db, Op *pOp){\n  char *zP4 = 0;\n  StrAccum x;\n\n  sqlite3StrAccumInit(&x, 0, 0, 0, SQLITE_MAX_LENGTH);\n  switch( pOp->p4type ){\n    case P4_KEYINFO: {\n      int j;\n      KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;\n      assert( pKeyInfo->aSortFlags!=0 );\n      sqlite3_str_appendf(&x, \"k(%d\", pKeyInfo->nKeyField);\n      for(j=0; j<pKeyInfo->nKeyField; j++){\n        CollSeq *pColl = pKeyInfo->aColl[j];\n        const char *zColl = pColl ? pColl->zName : \"\";\n        if( strcmp(zColl, \"BINARY\")==0 ) zColl = \"B\";\n        sqlite3_str_appendf(&x, \",%s%s%s\",\n               (pKeyInfo->aSortFlags[j] & KEYINFO_ORDER_DESC) ? \"-\" : \"\",\n               (pKeyInfo->aSortFlags[j] & KEYINFO_ORDER_BIGNULL)? \"N.\" : \"\",\n               zColl);\n      }\n      sqlite3_str_append(&x, \")\", 1);\n      break;\n    }\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n    case P4_EXPR: {\n      displayP4Expr(&x, pOp->p4.pExpr);\n      break;\n    }\n#endif\n    case P4_COLLSEQ: {\n      static const char *const encnames[] = {\"?\", \"8\", \"16LE\", \"16BE\"};\n      CollSeq *pColl = pOp->p4.pColl;\n      assert( pColl->enc<4 );\n      sqlite3_str_appendf(&x, \"%.18s-%s\", pColl->zName,\n                          encnames[pColl->enc]);\n      break;\n    }\n    case P4_FUNCDEF: {\n      FuncDef *pDef = pOp->p4.pFunc;\n      sqlite3_str_appendf(&x, \"%s(%d)\", pDef->zName, pDef->nArg);\n      break;\n    }\n    case P4_FUNCCTX: {\n      FuncDef *pDef = pOp->p4.pCtx->pFunc;\n      sqlite3_str_appendf(&x, \"%s(%d)\", pDef->zName, pDef->nArg);\n      break;\n    }\n    case P4_INT64: {\n      sqlite3_str_appendf(&x, \"%lld\", *pOp->p4.pI64);\n      break;\n    }\n    case P4_INT32: {\n      sqlite3_str_appendf(&x, \"%d\", pOp->p4.i);\n      break;\n    }\n    case P4_REAL: {\n      sqlite3_str_appendf(&x, \"%.16g\", *pOp->p4.pReal);\n      break;\n    }\n    case P4_MEM: {\n      Mem *pMem = pOp->p4.pMem;\n      if( pMem->flags & MEM_Str ){\n        zP4 = pMem->z;\n      }else if( pMem->flags & (MEM_Int|MEM_IntReal) ){\n        sqlite3_str_appendf(&x, \"%lld\", pMem->u.i);\n      }else if( pMem->flags & MEM_Real ){\n        sqlite3_str_appendf(&x, \"%.16g\", pMem->u.r);\n      }else if( pMem->flags & MEM_Null ){\n        zP4 = \"NULL\";\n      }else{\n        assert( pMem->flags & MEM_Blob );\n        zP4 = \"(blob)\";\n      }\n      break;\n    }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    case P4_VTAB: {\n      sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;\n      sqlite3_str_appendf(&x, \"vtab:%p\", pVtab);\n      break;\n    }\n#endif\n    case P4_INTARRAY: {\n      u32 i;\n      u32 *ai = pOp->p4.ai;\n      u32 n = ai[0];   /* The first element of an INTARRAY is always the\n                       ** count of the number of elements to follow */\n      for(i=1; i<=n; i++){\n        sqlite3_str_appendf(&x, \"%c%u\", (i==1 ? '[' : ','), ai[i]);\n      }\n      sqlite3_str_append(&x, \"]\", 1);\n      break;\n    }\n    case P4_SUBPROGRAM: {\n      zP4 = \"program\";\n      break;\n    }\n    case P4_TABLE: {\n      zP4 = pOp->p4.pTab->zName;\n      break;\n    }\n    case P4_SUBRTNSIG: {\n      SubrtnSig *pSig = pOp->p4.pSubrtnSig;\n      sqlite3_str_appendf(&x, \"subrtnsig:%d,%s\", pSig->selId, pSig->zAff);\n      break;\n    }\n    default: {\n      zP4 = pOp->p4.z;\n    }\n  }\n  if( zP4 ) sqlite3_str_appendall(&x, zP4);\n  if( (x.accError & SQLITE_NOMEM)!=0 ){\n    sqlite3OomFault(db);\n  }\n  return sqlite3StrAccumFinish(&x);\n}\n#endif /* VDBE_DISPLAY_P4 */\n\n/*\n** Declare to the Vdbe that the BTree object at db->aDb[i] is used.\n**\n** The prepared statements need to know in advance the complete set of\n** attached databases that will be use.  A mask of these databases\n** is maintained in p->btreeMask.  The p->lockMask value is the subset of\n** p->btreeMask of databases that will require a lock.\n*/\nSQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){\n  assert( i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8 );\n  assert( i<(int)sizeof(p->btreeMask)*8 );\n  DbMaskSet(p->btreeMask, i);\n  if( i!=1 && sqlite3BtreeSharable(p->db->aDb[i].pBt) ){\n    DbMaskSet(p->lockMask, i);\n  }\n}\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE)\n/*\n** If SQLite is compiled to support shared-cache mode and to be threadsafe,\n** this routine obtains the mutex associated with each BtShared structure\n** that may be accessed by the VM passed as an argument. In doing so it also\n** sets the BtShared.db member of each of the BtShared structures, ensuring\n** that the correct busy-handler callback is invoked if required.\n**\n** If SQLite is not threadsafe but does support shared-cache mode, then\n** sqlite3BtreeEnter() is invoked to set the BtShared.db variables\n** of all of BtShared structures accessible via the database handle\n** associated with the VM.\n**\n** If SQLite is not threadsafe and does not support shared-cache mode, this\n** function is a no-op.\n**\n** The p->btreeMask field is a bitmask of all btrees that the prepared\n** statement p will ever use.  Let N be the number of bits in p->btreeMask\n** corresponding to btrees that use shared cache.  Then the runtime of\n** this routine is N*N.  But as N is rarely more than 1, this should not\n** be a problem.\n*/\nSQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){\n  int i;\n  sqlite3 *db;\n  Db *aDb;\n  int nDb;\n  if( DbMaskAllZero(p->lockMask) ) return;  /* The common case */\n  db = p->db;\n  aDb = db->aDb;\n  nDb = db->nDb;\n  for(i=0; i<nDb; i++){\n    if( i!=1 && DbMaskTest(p->lockMask,i) && ALWAYS(aDb[i].pBt!=0) ){\n      sqlite3BtreeEnter(aDb[i].pBt);\n    }\n  }\n}\n#endif\n\n#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0\n/*\n** Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().\n*/\nstatic SQLITE_NOINLINE void vdbeLeave(Vdbe *p){\n  int i;\n  sqlite3 *db;\n  Db *aDb;\n  int nDb;\n  db = p->db;\n  aDb = db->aDb;\n  nDb = db->nDb;\n  for(i=0; i<nDb; i++){\n    if( i!=1 && DbMaskTest(p->lockMask,i) && ALWAYS(aDb[i].pBt!=0) ){\n      sqlite3BtreeLeave(aDb[i].pBt);\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){\n  if( DbMaskAllZero(p->lockMask) ) return;  /* The common case */\n  vdbeLeave(p);\n}\n#endif\n\n#if defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)\n/*\n** Print a single opcode.  This routine is used for debugging only.\n*/\nSQLITE_PRIVATE void sqlite3VdbePrintOp(FILE *pOut, int pc, VdbeOp *pOp){\n  char *zP4;\n  char *zCom;\n  sqlite3 dummyDb;\n  static const char *zFormat1 = \"%4d %-13s %4d %4d %4d %-13s %.2X %s\\n\";\n  if( pOut==0 ) pOut = stdout;\n  sqlite3BeginBenignMalloc();\n  dummyDb.mallocFailed = 1;\n  zP4 = sqlite3VdbeDisplayP4(&dummyDb, pOp);\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  zCom = sqlite3VdbeDisplayComment(0, pOp, zP4);\n#else\n  zCom = 0;\n#endif\n  /* NB:  The sqlite3OpcodeName() function is implemented by code created\n  ** by the mkopcodeh.awk and mkopcodec.awk scripts which extract the\n  ** information from the vdbe.c source text */\n  fprintf(pOut, zFormat1, pc,\n      sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3,\n      zP4 ? zP4 : \"\", pOp->p5,\n      zCom ? zCom : \"\"\n  );\n  fflush(pOut);\n  sqlite3_free(zP4);\n  sqlite3_free(zCom);\n  sqlite3EndBenignMalloc();\n}\n#endif\n\n/*\n** Initialize an array of N Mem element.\n**\n** This is a high-runner, so only those fields that really do need to\n** be initialized are set.  The Mem structure is organized so that\n** the fields that get initialized are nearby and hopefully on the same\n** cache line.\n**\n**    Mem.flags = flags\n**    Mem.db = db\n**    Mem.szMalloc = 0\n**\n** All other fields of Mem can safely remain uninitialized for now.  They\n** will be initialized before use.\n*/\nstatic void initMemArray(Mem *p, int N, sqlite3 *db, u16 flags){\n  assert( db!=0 );\n  if( N>0 ){\n    do{\n      p->flags = flags;\n      p->db = db;\n      p->szMalloc = 0;\n#ifdef SQLITE_DEBUG\n      p->pScopyFrom = 0;\n      p->bScopy = 0;\n#endif\n      p++;\n    }while( (--N)>0 );\n  }\n}\n\n/*\n** Release auxiliary memory held in an array of N Mem elements.\n**\n** After this routine returns, all Mem elements in the array will still\n** be valid.  Those Mem elements that were not holding auxiliary resources\n** will be unchanged.  Mem elements which had something freed will be\n** set to MEM_Undefined.\n*/\nstatic void releaseMemArray(Mem *p, int N){\n  if( p && N ){\n    Mem *pEnd = &p[N];\n    sqlite3 *db = p->db;\n    assert( db!=0 );\n    if( db->pnBytesFreed ){\n      do{\n        if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);\n      }while( (++p)<pEnd );\n      return;\n    }\n    do{\n      assert( (&p[1])==pEnd || p[0].db==p[1].db );\n      assert( sqlite3VdbeCheckMemInvariants(p) );\n\n      /* This block is really an inlined version of sqlite3VdbeMemRelease()\n      ** that takes advantage of the fact that the memory cell value is\n      ** being set to NULL after releasing any dynamic resources.\n      **\n      ** The justification for duplicating code is that according to\n      ** callgrind, this causes a certain test case to hit the CPU 4.7\n      ** percent less (x86 linux, gcc version 4.1.2, -O6) than if\n      ** sqlite3MemRelease() were called from here. With -O2, this jumps\n      ** to 6.6 percent. The test case is inserting 1000 rows into a table\n      ** with no indexes using a single prepared INSERT statement, bind()\n      ** and reset(). Inserts are grouped into a transaction.\n      */\n      testcase( p->flags & MEM_Agg );\n      testcase( p->flags & MEM_Dyn );\n      if( p->flags&(MEM_Agg|MEM_Dyn) ){\n        testcase( (p->flags & MEM_Dyn)!=0 && p->xDel==sqlite3VdbeFrameMemDel );\n        sqlite3VdbeMemRelease(p);\n        p->flags = MEM_Undefined;\n      }else if( p->szMalloc ){\n        sqlite3DbNNFreeNN(db, p->zMalloc);\n        p->szMalloc = 0;\n        p->flags = MEM_Undefined;\n      }\n#ifdef SQLITE_DEBUG\n      else{\n        p->flags = MEM_Undefined;\n      }\n#endif\n    }while( (++p)<pEnd );\n  }\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Verify that pFrame is a valid VdbeFrame pointer.  Return true if it is\n** and false if something is wrong.\n**\n** This routine is intended for use inside of assert() statements only.\n*/\nSQLITE_PRIVATE int sqlite3VdbeFrameIsValid(VdbeFrame *pFrame){\n  if( pFrame->iFrameMagic!=SQLITE_FRAME_MAGIC ) return 0;\n  return 1;\n}\n#endif\n\n\n/*\n** This is a destructor on a Mem object (which is really an sqlite3_value)\n** that deletes the Frame object that is attached to it as a blob.\n**\n** This routine does not delete the Frame right away.  It merely adds the\n** frame to a list of frames to be deleted when the Vdbe halts.\n*/\nSQLITE_PRIVATE void sqlite3VdbeFrameMemDel(void *pArg){\n  VdbeFrame *pFrame = (VdbeFrame*)pArg;\n  assert( sqlite3VdbeFrameIsValid(pFrame) );\n  pFrame->pParent = pFrame->v->pDelFrame;\n  pFrame->v->pDelFrame = pFrame;\n}\n\n#if defined(SQLITE_ENABLE_BYTECODE_VTAB) || !defined(SQLITE_OMIT_EXPLAIN)\n/*\n** Locate the next opcode to be displayed in EXPLAIN or EXPLAIN\n** QUERY PLAN output.\n**\n** Return SQLITE_ROW on success.  Return SQLITE_DONE if there are no\n** more opcodes to be displayed.\n*/\nSQLITE_PRIVATE int sqlite3VdbeNextOpcode(\n  Vdbe *p,         /* The statement being explained */\n  Mem *pSub,       /* Storage for keeping track of subprogram nesting */\n  int eMode,       /* 0: normal.  1: EQP.  2:  TablesUsed */\n  int *piPc,       /* IN/OUT: Current rowid.  Overwritten with next rowid */\n  int *piAddr,     /* OUT: Write index into (*paOp)[] here */\n  Op **paOp        /* OUT: Write the opcode array here */\n){\n  int nRow;                            /* Stop when row count reaches this */\n  int nSub = 0;                        /* Number of sub-vdbes seen so far */\n  SubProgram **apSub = 0;              /* Array of sub-vdbes */\n  int i;                               /* Next instruction address */\n  int rc = SQLITE_OK;                  /* Result code */\n  Op *aOp = 0;                         /* Opcode array */\n  int iPc;                             /* Rowid.  Copy of value in *piPc */\n\n  /* When the number of output rows reaches nRow, that means the\n  ** listing has finished and sqlite3_step() should return SQLITE_DONE.\n  ** nRow is the sum of the number of rows in the main program, plus\n  ** the sum of the number of rows in all trigger subprograms encountered\n  ** so far.  The nRow value will increase as new trigger subprograms are\n  ** encountered, but p->pc will eventually catch up to nRow.\n  */\n  nRow = p->nOp;\n  if( pSub!=0 ){\n    if( pSub->flags&MEM_Blob ){\n      /* pSub is initiallly NULL.  It is initialized to a BLOB by\n      ** the P4_SUBPROGRAM processing logic below */\n      nSub = pSub->n/sizeof(Vdbe*);\n      apSub = (SubProgram **)pSub->z;\n    }\n    for(i=0; i<nSub; i++){\n      nRow += apSub[i]->nOp;\n    }\n  }\n  iPc = *piPc;\n  while(1){  /* Loop exits via break */\n    i = iPc++;\n    if( i>=nRow ){\n      p->rc = SQLITE_OK;\n      rc = SQLITE_DONE;\n      break;\n    }\n    if( i<p->nOp ){\n      /* The rowid is small enough that we are still in the\n      ** main program. */\n      aOp = p->aOp;\n    }else{\n      /* We are currently listing subprograms.  Figure out which one and\n      ** pick up the appropriate opcode. */\n      int j;\n      i -= p->nOp;\n      assert( apSub!=0 );\n      assert( nSub>0 );\n      for(j=0; i>=apSub[j]->nOp; j++){\n        i -= apSub[j]->nOp;\n        assert( i<apSub[j]->nOp || j+1<nSub );\n      }\n      aOp = apSub[j]->aOp;\n    }\n\n    /* When an OP_Program opcode is encounter (the only opcode that has\n    ** a P4_SUBPROGRAM argument), expand the size of the array of subprograms\n    ** kept in p->aMem[9].z to hold the new program - assuming this subprogram\n    ** has not already been seen.\n    */\n    if( pSub!=0 && aOp[i].p4type==P4_SUBPROGRAM ){\n      int nByte = (nSub+1)*sizeof(SubProgram*);\n      int j;\n      for(j=0; j<nSub; j++){\n        if( apSub[j]==aOp[i].p4.pProgram ) break;\n      }\n      if( j==nSub ){\n        p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);\n        if( p->rc!=SQLITE_OK ){\n          rc = SQLITE_ERROR;\n          break;\n        }\n        apSub = (SubProgram **)pSub->z;\n        apSub[nSub++] = aOp[i].p4.pProgram;\n        MemSetTypeFlag(pSub, MEM_Blob);\n        pSub->n = nSub*sizeof(SubProgram*);\n        nRow += aOp[i].p4.pProgram->nOp;\n      }\n    }\n    if( eMode==0 ) break;\n#ifdef SQLITE_ENABLE_BYTECODE_VTAB\n    if( eMode==2 ){\n      Op *pOp = aOp + i;\n      if( pOp->opcode==OP_OpenRead ) break;\n      if( pOp->opcode==OP_OpenWrite && (pOp->p5 & OPFLAG_P2ISREG)==0 ) break;\n      if( pOp->opcode==OP_ReopenIdx ) break;\n    }else\n#endif\n    {\n      assert( eMode==1 );\n      if( aOp[i].opcode==OP_Explain ) break;\n      if( aOp[i].opcode==OP_Init && iPc>1 ) break;\n    }\n  }\n  *piPc = iPc;\n  *piAddr = i;\n  *paOp = aOp;\n  return rc;\n}\n#endif /* SQLITE_ENABLE_BYTECODE_VTAB || !SQLITE_OMIT_EXPLAIN */\n\n\n/*\n** Delete a VdbeFrame object and its contents. VdbeFrame objects are\n** allocated by the OP_Program opcode in sqlite3VdbeExec().\n*/\nSQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame *p){\n  int i;\n  Mem *aMem = VdbeFrameMem(p);\n  VdbeCursor **apCsr = (VdbeCursor **)&aMem[p->nChildMem];\n  assert( sqlite3VdbeFrameIsValid(p) );\n  for(i=0; i<p->nChildCsr; i++){\n    if( apCsr[i] ) sqlite3VdbeFreeCursorNN(p->v, apCsr[i]);\n  }\n  releaseMemArray(aMem, p->nChildMem);\n  sqlite3VdbeDeleteAuxData(p->v->db, &p->pAuxData, -1, 0);\n  sqlite3DbFree(p->v->db, p);\n}\n\n#ifndef SQLITE_OMIT_EXPLAIN\n/*\n** Give a listing of the program in the virtual machine.\n**\n** The interface is the same as sqlite3VdbeExec().  But instead of\n** running the code, it invokes the callback once for each instruction.\n** This feature is used to implement \"EXPLAIN\".\n**\n** When p->explain==1, each instruction is listed.  When\n** p->explain==2, only OP_Explain instructions are listed and these\n** are shown in a different format.  p->explain==2 is used to implement\n** EXPLAIN QUERY PLAN.\n** 2018-04-24:  In p->explain==2 mode, the OP_Init opcodes of triggers\n** are also shown, so that the boundaries between the main program and\n** each trigger are clear.\n**\n** When p->explain==1, first the main program is listed, then each of\n** the trigger subprograms are listed one by one.\n*/\nSQLITE_PRIVATE int sqlite3VdbeList(\n  Vdbe *p                   /* The VDBE */\n){\n  Mem *pSub = 0;                       /* Memory cell hold array of subprogs */\n  sqlite3 *db = p->db;                 /* The database connection */\n  int i;                               /* Loop counter */\n  int rc = SQLITE_OK;                  /* Return code */\n  Mem *pMem = &p->aMem[1];             /* First Mem of result set */\n  int bListSubprogs = (p->explain==1 || (db->flags & SQLITE_TriggerEQP)!=0);\n  Op *aOp;                             /* Array of opcodes */\n  Op *pOp;                             /* Current opcode */\n\n  assert( p->explain );\n  assert( p->eVdbeState==VDBE_RUN_STATE );\n  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM );\n\n  /* Even though this opcode does not use dynamic strings for\n  ** the result, result columns may become dynamic if the user calls\n  ** sqlite3_column_text16(), causing a translation to UTF-16 encoding.\n  */\n  releaseMemArray(pMem, 8);\n\n  if( p->rc==SQLITE_NOMEM ){\n    /* This happens if a malloc() inside a call to sqlite3_column_text() or\n    ** sqlite3_column_text16() failed.  */\n    sqlite3OomFault(db);\n    return SQLITE_ERROR;\n  }\n\n  if( bListSubprogs ){\n    /* The first 8 memory cells are used for the result set.  So we will\n    ** commandeer the 9th cell to use as storage for an array of pointers\n    ** to trigger subprograms.  The VDBE is guaranteed to have at least 9\n    ** cells.  */\n    assert( p->nMem>9 );\n    pSub = &p->aMem[9];\n  }else{\n    pSub = 0;\n  }\n\n  /* Figure out which opcode is next to display */\n  rc = sqlite3VdbeNextOpcode(p, pSub, p->explain==2, &p->pc, &i, &aOp);\n\n  if( rc==SQLITE_OK ){\n    pOp = aOp + i;\n    if( AtomicLoad(&db->u1.isInterrupted) ){\n      p->rc = SQLITE_INTERRUPT;\n      rc = SQLITE_ERROR;\n      sqlite3VdbeError(p, sqlite3ErrStr(p->rc));\n    }else{\n      char *zP4 = sqlite3VdbeDisplayP4(db, pOp);\n      if( p->explain==2 ){\n        sqlite3VdbeMemSetInt64(pMem, pOp->p1);\n        sqlite3VdbeMemSetInt64(pMem+1, pOp->p2);\n        sqlite3VdbeMemSetInt64(pMem+2, pOp->p3);\n        sqlite3VdbeMemSetStr(pMem+3, zP4, -1, SQLITE_UTF8, sqlite3_free);\n        assert( p->nResColumn==4 );\n      }else{\n        sqlite3VdbeMemSetInt64(pMem+0, i);\n        sqlite3VdbeMemSetStr(pMem+1, (char*)sqlite3OpcodeName(pOp->opcode),\n                             -1, SQLITE_UTF8, SQLITE_STATIC);\n        sqlite3VdbeMemSetInt64(pMem+2, pOp->p1);\n        sqlite3VdbeMemSetInt64(pMem+3, pOp->p2);\n        sqlite3VdbeMemSetInt64(pMem+4, pOp->p3);\n        /* pMem+5 for p4 is done last */\n        sqlite3VdbeMemSetInt64(pMem+6, pOp->p5);\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n        {\n          char *zCom = sqlite3VdbeDisplayComment(db, pOp, zP4);\n          sqlite3VdbeMemSetStr(pMem+7, zCom, -1, SQLITE_UTF8, sqlite3_free);\n        }\n#else\n        sqlite3VdbeMemSetNull(pMem+7);\n#endif\n        sqlite3VdbeMemSetStr(pMem+5, zP4, -1, SQLITE_UTF8, sqlite3_free);\n        assert( p->nResColumn==8 );\n      }\n      p->pResultRow = pMem;\n      if( db->mallocFailed ){\n        p->rc = SQLITE_NOMEM;\n        rc = SQLITE_ERROR;\n      }else{\n        p->rc = SQLITE_OK;\n        rc = SQLITE_ROW;\n      }\n    }\n  }\n  return rc;\n}\n#endif /* SQLITE_OMIT_EXPLAIN */\n\n#ifdef SQLITE_DEBUG\n/*\n** Print the SQL that was used to generate a VDBE program.\n*/\nSQLITE_PRIVATE void sqlite3VdbePrintSql(Vdbe *p){\n  const char *z = 0;\n  if( p->zSql ){\n    z = p->zSql;\n  }else if( p->nOp>=1 ){\n    const VdbeOp *pOp = &p->aOp[0];\n    if( pOp->opcode==OP_Init && pOp->p4.z!=0 ){\n      z = pOp->p4.z;\n      while( sqlite3Isspace(*z) ) z++;\n    }\n  }\n  if( z ) printf(\"SQL: [%s]\\n\", z);\n}\n#endif\n\n#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)\n/*\n** Print an IOTRACE message showing SQL content.\n*/\nSQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){\n  int nOp = p->nOp;\n  VdbeOp *pOp;\n  if( sqlite3IoTrace==0 ) return;\n  if( nOp<1 ) return;\n  pOp = &p->aOp[0];\n  if( pOp->opcode==OP_Init && pOp->p4.z!=0 ){\n    int i, j;\n    char z[1000];\n    sqlite3_snprintf(sizeof(z), z, \"%s\", pOp->p4.z);\n    for(i=0; sqlite3Isspace(z[i]); i++){}\n    for(j=0; z[i]; i++){\n      if( sqlite3Isspace(z[i]) ){\n        if( z[i-1]!=' ' ){\n          z[j++] = ' ';\n        }\n      }else{\n        z[j++] = z[i];\n      }\n    }\n    z[j] = 0;\n    sqlite3IoTrace(\"SQL %s\\n\", z);\n  }\n}\n#endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */\n\n/* An instance of this object describes bulk memory available for use\n** by subcomponents of a prepared statement.  Space is allocated out\n** of a ReusableSpace object by the allocSpace() routine below.\n*/\nstruct ReusableSpace {\n  u8 *pSpace;            /* Available memory */\n  sqlite3_int64 nFree;   /* Bytes of available memory */\n  sqlite3_int64 nNeeded; /* Total bytes that could not be allocated */\n};\n\n/* Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf\n** from the ReusableSpace object.  Return a pointer to the allocated\n** memory on success.  If insufficient memory is available in the\n** ReusableSpace object, increase the ReusableSpace.nNeeded\n** value by the amount needed and return NULL.\n**\n** If pBuf is not initially NULL, that means that the memory has already\n** been allocated by a prior call to this routine, so just return a copy\n** of pBuf and leave ReusableSpace unchanged.\n**\n** This allocator is employed to repurpose unused slots at the end of the\n** opcode array of prepared state for other memory needs of the prepared\n** statement.\n*/\nstatic void *allocSpace(\n  struct ReusableSpace *p,  /* Bulk memory available for allocation */\n  void *pBuf,               /* Pointer to a prior allocation */\n  sqlite3_int64 nByte       /* Bytes of memory needed. */\n){\n  assert( EIGHT_BYTE_ALIGNMENT(p->pSpace) );\n  if( pBuf==0 ){\n    nByte = ROUND8P(nByte);\n    if( nByte <= p->nFree ){\n      p->nFree -= nByte;\n      pBuf = &p->pSpace[p->nFree];\n    }else{\n      p->nNeeded += nByte;\n    }\n  }\n  assert( EIGHT_BYTE_ALIGNMENT(pBuf) );\n  return pBuf;\n}\n\n/*\n** Rewind the VDBE back to the beginning in preparation for\n** running it.\n*/\nSQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){\n#if defined(SQLITE_DEBUG)\n  int i;\n#endif\n  assert( p!=0 );\n  assert( p->eVdbeState==VDBE_INIT_STATE\n       || p->eVdbeState==VDBE_READY_STATE\n       || p->eVdbeState==VDBE_HALT_STATE );\n\n  /* There should be at least one opcode.\n  */\n  assert( p->nOp>0 );\n\n  p->eVdbeState = VDBE_READY_STATE;\n\n#ifdef SQLITE_DEBUG\n  for(i=0; i<p->nMem; i++){\n    assert( p->aMem[i].db==p->db );\n  }\n#endif\n  p->pc = -1;\n  p->rc = SQLITE_OK;\n  p->errorAction = OE_Abort;\n  p->nChange = 0;\n  p->cacheCtr = 1;\n  p->minWriteFileFormat = 255;\n  p->iStatement = 0;\n  p->nFkConstraint = 0;\n#ifdef VDBE_PROFILE\n  for(i=0; i<p->nOp; i++){\n    p->aOp[i].nExec = 0;\n    p->aOp[i].nCycle = 0;\n  }\n#endif\n}\n\n/*\n** Prepare a virtual machine for execution for the first time after\n** creating the virtual machine.  This involves things such\n** as allocating registers and initializing the program counter.\n** After the VDBE has be prepped, it can be executed by one or more\n** calls to sqlite3VdbeExec().\n**\n** This function may be called exactly once on each virtual machine.\n** After this routine is called the VM has been \"packaged\" and is ready\n** to run.  After this routine is called, further calls to\n** sqlite3VdbeAddOp() functions are prohibited.  This routine disconnects\n** the Vdbe from the Parse object that helped generate it so that the\n** the Vdbe becomes an independent entity and the Parse object can be\n** destroyed.\n**\n** Use the sqlite3VdbeRewind() procedure to restore a virtual machine back\n** to its initial state after it has been run.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMakeReady(\n  Vdbe *p,                       /* The VDBE */\n  Parse *pParse                  /* Parsing context */\n){\n  sqlite3 *db;                   /* The database connection */\n  int nVar;                      /* Number of parameters */\n  int nMem;                      /* Number of VM memory registers */\n  int nCursor;                   /* Number of cursors required */\n  int nArg;                      /* Max number args to xFilter or xUpdate */\n  int n;                         /* Loop counter */\n  struct ReusableSpace x;        /* Reusable bulk memory */\n\n  assert( p!=0 );\n  assert( p->nOp>0 );\n  assert( pParse!=0 );\n  assert( p->eVdbeState==VDBE_INIT_STATE );\n  assert( pParse==p->pParse );\n  assert( pParse->db==p->db );\n  p->pVList = pParse->pVList;\n  pParse->pVList =  0;\n  db = p->db;\n  assert( db->mallocFailed==0 );\n  nVar = pParse->nVar;\n  nMem = pParse->nMem;\n  nCursor = pParse->nTab;\n  nArg = pParse->nMaxArg;\n\n  /* Each cursor uses a memory cell.  The first cursor (cursor 0) can\n  ** use aMem[0] which is not otherwise used by the VDBE program.  Allocate\n  ** space at the end of aMem[] for cursors 1 and greater.\n  ** See also: allocateCursor().\n  */\n  nMem += nCursor;\n  if( nCursor==0 && nMem>0 ) nMem++;  /* Space for aMem[0] even if not used */\n\n  /* Figure out how much reusable memory is available at the end of the\n  ** opcode array.  This extra memory will be reallocated for other elements\n  ** of the prepared statement.\n  */\n  n = ROUND8P(sizeof(Op)*p->nOp);             /* Bytes of opcode memory used */\n  x.pSpace = &((u8*)p->aOp)[n];               /* Unused opcode memory */\n  assert( EIGHT_BYTE_ALIGNMENT(x.pSpace) );\n  x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n);  /* Bytes of unused memory */\n  assert( x.nFree>=0 );\n  assert( EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree]) );\n\n  resolveP2Values(p, &nArg);\n  p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);\n  if( pParse->explain ){\n    if( nMem<10 ) nMem = 10;\n    p->explain = pParse->explain;\n    p->nResColumn = 12 - 4*p->explain;\n  }\n  p->expired = 0;\n\n  /* Memory for registers, parameters, cursor, etc, is allocated in one or two\n  ** passes.  On the first pass, we try to reuse unused memory at the\n  ** end of the opcode array.  If we are unable to satisfy all memory\n  ** requirements by reusing the opcode array tail, then the second\n  ** pass will fill in the remainder using a fresh memory allocation.\n  **\n  ** This two-pass approach that reuses as much memory as possible from\n  ** the leftover memory at the end of the opcode array.  This can significantly\n  ** reduce the amount of memory held by a prepared statement.\n  */\n  x.nNeeded = 0;\n  p->aMem = allocSpace(&x, 0, nMem*sizeof(Mem));\n  p->aVar = allocSpace(&x, 0, nVar*sizeof(Mem));\n  p->apArg = allocSpace(&x, 0, nArg*sizeof(Mem*));\n  p->apCsr = allocSpace(&x, 0, nCursor*sizeof(VdbeCursor*));\n  if( x.nNeeded ){\n    x.pSpace = p->pFree = sqlite3DbMallocRawNN(db, x.nNeeded);\n    x.nFree = x.nNeeded;\n    if( !db->mallocFailed ){\n      p->aMem = allocSpace(&x, p->aMem, nMem*sizeof(Mem));\n      p->aVar = allocSpace(&x, p->aVar, nVar*sizeof(Mem));\n      p->apArg = allocSpace(&x, p->apArg, nArg*sizeof(Mem*));\n      p->apCsr = allocSpace(&x, p->apCsr, nCursor*sizeof(VdbeCursor*));\n    }\n  }\n#ifdef SQLITE_DEBUG\n  p->napArg = nArg;\n#endif\n\n  if( db->mallocFailed ){\n    p->nVar = 0;\n    p->nCursor = 0;\n    p->nMem = 0;\n  }else{\n    p->nCursor = nCursor;\n    p->nVar = (ynVar)nVar;\n    initMemArray(p->aVar, nVar, db, MEM_Null);\n    p->nMem = nMem;\n    initMemArray(p->aMem, nMem, db, MEM_Undefined);\n    memset(p->apCsr, 0, nCursor*sizeof(VdbeCursor*));\n  }\n  sqlite3VdbeRewind(p);\n}\n\n/*\n** Close a VDBE cursor and release all the resources that cursor\n** happens to hold.\n*/\nSQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){\n  if( pCx ) sqlite3VdbeFreeCursorNN(p,pCx);\n}\nstatic SQLITE_NOINLINE void freeCursorWithCache(Vdbe *p, VdbeCursor *pCx){\n  VdbeTxtBlbCache *pCache = pCx->pCache;\n  assert( pCx->colCache );\n  pCx->colCache = 0;\n  pCx->pCache = 0;\n  if( pCache->pCValue ){\n    sqlite3RCStrUnref(pCache->pCValue);\n    pCache->pCValue = 0;\n  }\n  sqlite3DbFree(p->db, pCache);\n  sqlite3VdbeFreeCursorNN(p, pCx);\n}\nSQLITE_PRIVATE void sqlite3VdbeFreeCursorNN(Vdbe *p, VdbeCursor *pCx){\n  if( pCx->colCache ){\n    freeCursorWithCache(p, pCx);\n    return;\n  }\n  switch( pCx->eCurType ){\n    case CURTYPE_SORTER: {\n      sqlite3VdbeSorterClose(p->db, pCx);\n      break;\n    }\n    case CURTYPE_BTREE: {\n      assert( pCx->uc.pCursor!=0 );\n      sqlite3BtreeCloseCursor(pCx->uc.pCursor);\n      break;\n    }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    case CURTYPE_VTAB: {\n      sqlite3_vtab_cursor *pVCur = pCx->uc.pVCur;\n      const sqlite3_module *pModule = pVCur->pVtab->pModule;\n      assert( pVCur->pVtab->nRef>0 );\n      pVCur->pVtab->nRef--;\n      pModule->xClose(pVCur);\n      break;\n    }\n#endif\n  }\n}\n\n/*\n** Close all cursors in the current frame.\n*/\nstatic void closeCursorsInFrame(Vdbe *p){\n  int i;\n  for(i=0; i<p->nCursor; i++){\n    VdbeCursor *pC = p->apCsr[i];\n    if( pC ){\n      sqlite3VdbeFreeCursorNN(p, pC);\n      p->apCsr[i] = 0;\n    }\n  }\n}\n\n/*\n** Copy the values stored in the VdbeFrame structure to its Vdbe. This\n** is used, for example, when a trigger sub-program is halted to restore\n** control to the main program.\n*/\nSQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){\n  Vdbe *v = pFrame->v;\n  closeCursorsInFrame(v);\n  v->aOp = pFrame->aOp;\n  v->nOp = pFrame->nOp;\n  v->aMem = pFrame->aMem;\n  v->nMem = pFrame->nMem;\n  v->apCsr = pFrame->apCsr;\n  v->nCursor = pFrame->nCursor;\n  v->db->lastRowid = pFrame->lastRowid;\n  v->nChange = pFrame->nChange;\n  v->db->nChange = pFrame->nDbChange;\n  sqlite3VdbeDeleteAuxData(v->db, &v->pAuxData, -1, 0);\n  v->pAuxData = pFrame->pAuxData;\n  pFrame->pAuxData = 0;\n  return pFrame->pc;\n}\n\n/*\n** Close all cursors.\n**\n** Also release any dynamic memory held by the VM in the Vdbe.aMem memory\n** cell array. This is necessary as the memory cell array may contain\n** pointers to VdbeFrame objects, which may in turn contain pointers to\n** open cursors.\n*/\nstatic void closeAllCursors(Vdbe *p){\n  if( p->pFrame ){\n    VdbeFrame *pFrame;\n    for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);\n    sqlite3VdbeFrameRestore(pFrame);\n    p->pFrame = 0;\n    p->nFrame = 0;\n  }\n  assert( p->nFrame==0 );\n  closeCursorsInFrame(p);\n  releaseMemArray(p->aMem, p->nMem);\n  while( p->pDelFrame ){\n    VdbeFrame *pDel = p->pDelFrame;\n    p->pDelFrame = pDel->pParent;\n    sqlite3VdbeFrameDelete(pDel);\n  }\n\n  /* Delete any auxdata allocations made by the VM */\n  if( p->pAuxData ) sqlite3VdbeDeleteAuxData(p->db, &p->pAuxData, -1, 0);\n  assert( p->pAuxData==0 );\n}\n\n/*\n** Set the number of result columns that will be returned by this SQL\n** statement. This is now set at compile time, rather than during\n** execution of the vdbe program so that sqlite3_column_count() can\n** be called on an SQL statement before sqlite3_step().\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){\n  int n;\n  sqlite3 *db = p->db;\n\n  if( p->nResAlloc ){\n    releaseMemArray(p->aColName, p->nResAlloc*COLNAME_N);\n    sqlite3DbFree(db, p->aColName);\n  }\n  n = nResColumn*COLNAME_N;\n  p->nResColumn = p->nResAlloc = (u16)nResColumn;\n  p->aColName = (Mem*)sqlite3DbMallocRawNN(db, sizeof(Mem)*n );\n  if( p->aColName==0 ) return;\n  initMemArray(p->aColName, n, db, MEM_Null);\n}\n\n/*\n** Set the name of the idx'th column to be returned by the SQL statement.\n** zName must be a pointer to a nul terminated string.\n**\n** This call must be made after a call to sqlite3VdbeSetNumCols().\n**\n** The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC\n** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed\n** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSetColName(\n  Vdbe *p,                         /* Vdbe being configured */\n  int idx,                         /* Index of column zName applies to */\n  int var,                         /* One of the COLNAME_* constants */\n  const char *zName,               /* Pointer to buffer containing name */\n  void (*xDel)(void*)              /* Memory management strategy for zName */\n){\n  int rc;\n  Mem *pColName;\n  assert( idx<p->nResAlloc );\n  assert( var<COLNAME_N );\n  if( p->db->mallocFailed ){\n    assert( !zName || xDel!=SQLITE_DYNAMIC );\n    return SQLITE_NOMEM_BKPT;\n  }\n  assert( p->aColName!=0 );\n  pColName = &(p->aColName[idx+var*p->nResAlloc]);\n  rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);\n  assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );\n  return rc;\n}\n\n/*\n** A read or write transaction may or may not be active on database handle\n** db. If a transaction is active, commit it. If there is a\n** write-transaction spanning more than one database file, this routine\n** takes care of the super-journal trickery.\n*/\nstatic int vdbeCommit(sqlite3 *db, Vdbe *p){\n  int i;\n  int nTrans = 0;  /* Number of databases with an active write-transaction\n                   ** that are candidates for a two-phase commit using a\n                   ** super-journal */\n  int rc = SQLITE_OK;\n  int needXcommit = 0;\n\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n  /* With this option, sqlite3VtabSync() is defined to be simply\n  ** SQLITE_OK so p is not used.\n  */\n  UNUSED_PARAMETER(p);\n#endif\n\n  /* Before doing anything else, call the xSync() callback for any\n  ** virtual module tables written in this transaction. This has to\n  ** be done before determining whether a super-journal file is\n  ** required, as an xSync() callback may add an attached database\n  ** to the transaction.\n  */\n  rc = sqlite3VtabSync(db, p);\n\n  /* This loop determines (a) if the commit hook should be invoked and\n  ** (b) how many database files have open write transactions, not\n  ** including the temp database. (b) is important because if more than\n  ** one database file has an open write transaction, a super-journal\n  ** file is required for an atomic commit.\n  */\n  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n    Btree *pBt = db->aDb[i].pBt;\n    if( sqlite3BtreeTxnState(pBt)==SQLITE_TXN_WRITE ){\n      /* Whether or not a database might need a super-journal depends upon\n      ** its journal mode (among other things).  This matrix determines which\n      ** journal modes use a super-journal and which do not */\n      static const u8 aMJNeeded[] = {\n        /* DELETE   */  1,\n        /* PERSIST   */ 1,\n        /* OFF       */ 0,\n        /* TRUNCATE  */ 1,\n        /* MEMORY    */ 0,\n        /* WAL       */ 0\n      };\n      Pager *pPager;   /* Pager associated with pBt */\n      needXcommit = 1;\n      sqlite3BtreeEnter(pBt);\n      pPager = sqlite3BtreePager(pBt);\n      if( db->aDb[i].safety_level!=PAGER_SYNCHRONOUS_OFF\n       && aMJNeeded[sqlite3PagerGetJournalMode(pPager)]\n       && sqlite3PagerIsMemdb(pPager)==0\n      ){\n        assert( i!=1 );\n        nTrans++;\n      }\n      rc = sqlite3PagerExclusiveLock(pPager);\n      sqlite3BtreeLeave(pBt);\n    }\n  }\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  /* If there are any write-transactions at all, invoke the commit hook */\n  if( needXcommit && db->xCommitCallback ){\n    rc = db->xCommitCallback(db->pCommitArg);\n    if( rc ){\n      return SQLITE_CONSTRAINT_COMMITHOOK;\n    }\n  }\n\n  /* The simple case - no more than one database file (not counting the\n  ** TEMP database) has a transaction active.   There is no need for the\n  ** super-journal.\n  **\n  ** If the return value of sqlite3BtreeGetFilename() is a zero length\n  ** string, it means the main database is :memory: or a temp file.  In\n  ** that case we do not support atomic multi-file commits, so use the\n  ** simple case then too.\n  */\n  if( 0==sqlite3Strlen30(sqlite3BtreeGetFilename(db->aDb[0].pBt))\n   || nTrans<=1\n  ){\n    if( needXcommit ){\n      for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n        Btree *pBt = db->aDb[i].pBt;\n        if( sqlite3BtreeTxnState(pBt)>=SQLITE_TXN_WRITE ){\n          rc = sqlite3BtreeCommitPhaseOne(pBt, 0);\n        }\n      }\n    }\n\n    /* Do the commit only if all databases successfully complete phase 1.\n    ** If one of the BtreeCommitPhaseOne() calls fails, this indicates an\n    ** IO error while deleting or truncating a journal file. It is unlikely,\n    ** but could happen. In this case abandon processing and return the error.\n    */\n    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n      Btree *pBt = db->aDb[i].pBt;\n      int txn = sqlite3BtreeTxnState(pBt);\n      if( txn!=SQLITE_TXN_NONE ){\n        assert( needXcommit || txn==SQLITE_TXN_READ );\n        rc = sqlite3BtreeCommitPhaseTwo(pBt, 0);\n      }\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3VtabCommit(db);\n    }\n  }\n\n  /* The complex case - There is a multi-file write-transaction active.\n  ** This requires a super-journal file to ensure the transaction is\n  ** committed atomically.\n  */\n#ifndef SQLITE_OMIT_DISKIO\n  else{\n    sqlite3_vfs *pVfs = db->pVfs;\n    char *zSuper = 0;   /* File-name for the super-journal */\n    char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);\n    sqlite3_file *pSuperJrnl = 0;\n    i64 offset = 0;\n    int res;\n    int retryCount = 0;\n    int nMainFile;\n\n    /* Select a super-journal file name */\n    nMainFile = sqlite3Strlen30(zMainFile);\n    zSuper = sqlite3MPrintf(db, \"%.4c%s%.16c\", 0,zMainFile,0);\n    if( zSuper==0 ) return SQLITE_NOMEM_BKPT;\n    zSuper += 4;\n    do {\n      u32 iRandom;\n      if( retryCount ){\n        if( retryCount>100 ){\n          sqlite3_log(SQLITE_FULL, \"MJ delete: %s\", zSuper);\n          sqlite3OsDelete(pVfs, zSuper, 0);\n          break;\n        }else if( retryCount==1 ){\n          sqlite3_log(SQLITE_FULL, \"MJ collide: %s\", zSuper);\n        }\n      }\n      retryCount++;\n      sqlite3_randomness(sizeof(iRandom), &iRandom);\n      sqlite3_snprintf(13, &zSuper[nMainFile], \"-mj%06X9%02X\",\n                               (iRandom>>8)&0xffffff, iRandom&0xff);\n      /* The antipenultimate character of the super-journal name must\n      ** be \"9\" to avoid name collisions when using 8+3 filenames. */\n      assert( zSuper[sqlite3Strlen30(zSuper)-3]=='9' );\n      sqlite3FileSuffix3(zMainFile, zSuper);\n      rc = sqlite3OsAccess(pVfs, zSuper, SQLITE_ACCESS_EXISTS, &res);\n    }while( rc==SQLITE_OK && res );\n    if( rc==SQLITE_OK ){\n      /* Open the super-journal. */\n      rc = sqlite3OsOpenMalloc(pVfs, zSuper, &pSuperJrnl,\n          SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|\n          SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_SUPER_JOURNAL, 0\n      );\n    }\n    if( rc!=SQLITE_OK ){\n      sqlite3DbFree(db, zSuper-4);\n      return rc;\n    }\n\n    /* Write the name of each database file in the transaction into the new\n    ** super-journal file. If an error occurs at this point close\n    ** and delete the super-journal file. All the individual journal files\n    ** still have 'null' as the super-journal pointer, so they will roll\n    ** back independently if a failure occurs.\n    */\n    for(i=0; i<db->nDb; i++){\n      Btree *pBt = db->aDb[i].pBt;\n      if( sqlite3BtreeTxnState(pBt)==SQLITE_TXN_WRITE ){\n        char const *zFile = sqlite3BtreeGetJournalname(pBt);\n        if( zFile==0 ){\n          continue;  /* Ignore TEMP and :memory: databases */\n        }\n        assert( zFile[0]!=0 );\n        rc = sqlite3OsWrite(pSuperJrnl, zFile, sqlite3Strlen30(zFile)+1,offset);\n        offset += sqlite3Strlen30(zFile)+1;\n        if( rc!=SQLITE_OK ){\n          sqlite3OsCloseFree(pSuperJrnl);\n          sqlite3OsDelete(pVfs, zSuper, 0);\n          sqlite3DbFree(db, zSuper-4);\n          return rc;\n        }\n      }\n    }\n\n    /* Sync the super-journal file. If the IOCAP_SEQUENTIAL device\n    ** flag is set this is not required.\n    */\n    if( 0==(sqlite3OsDeviceCharacteristics(pSuperJrnl)&SQLITE_IOCAP_SEQUENTIAL)\n     && SQLITE_OK!=(rc = sqlite3OsSync(pSuperJrnl, SQLITE_SYNC_NORMAL))\n    ){\n      sqlite3OsCloseFree(pSuperJrnl);\n      sqlite3OsDelete(pVfs, zSuper, 0);\n      sqlite3DbFree(db, zSuper-4);\n      return rc;\n    }\n\n    /* Sync all the db files involved in the transaction. The same call\n    ** sets the super-journal pointer in each individual journal. If\n    ** an error occurs here, do not delete the super-journal file.\n    **\n    ** If the error occurs during the first call to\n    ** sqlite3BtreeCommitPhaseOne(), then there is a chance that the\n    ** super-journal file will be orphaned. But we cannot delete it,\n    ** in case the super-journal file name was written into the journal\n    ** file before the failure occurred.\n    */\n    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n      Btree *pBt = db->aDb[i].pBt;\n      if( pBt ){\n        rc = sqlite3BtreeCommitPhaseOne(pBt, zSuper);\n      }\n    }\n    sqlite3OsCloseFree(pSuperJrnl);\n    assert( rc!=SQLITE_BUSY );\n    if( rc!=SQLITE_OK ){\n      sqlite3DbFree(db, zSuper-4);\n      return rc;\n    }\n\n    /* Delete the super-journal file. This commits the transaction. After\n    ** doing this the directory is synced again before any individual\n    ** transaction files are deleted.\n    */\n    rc = sqlite3OsDelete(pVfs, zSuper, 1);\n    sqlite3DbFree(db, zSuper-4);\n    zSuper = 0;\n    if( rc ){\n      return rc;\n    }\n\n    /* All files and directories have already been synced, so the following\n    ** calls to sqlite3BtreeCommitPhaseTwo() are only closing files and\n    ** deleting or truncating journals. If something goes wrong while\n    ** this is happening we don't really care. The integrity of the\n    ** transaction is already guaranteed, but some stray 'cold' journals\n    ** may be lying around. Returning an error code won't help matters.\n    */\n    disable_simulated_io_errors();\n    sqlite3BeginBenignMalloc();\n    for(i=0; i<db->nDb; i++){\n      Btree *pBt = db->aDb[i].pBt;\n      if( pBt ){\n        sqlite3BtreeCommitPhaseTwo(pBt, 1);\n      }\n    }\n    sqlite3EndBenignMalloc();\n    enable_simulated_io_errors();\n\n    sqlite3VtabCommit(db);\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** This routine checks that the sqlite3.nVdbeActive count variable\n** matches the number of vdbe's in the list sqlite3.pVdbe that are\n** currently active. An assertion fails if the two counts do not match.\n** This is an internal self-check only - it is not an essential processing\n** step.\n**\n** This is a no-op if NDEBUG is defined.\n*/\n#ifndef NDEBUG\nstatic void checkActiveVdbeCnt(sqlite3 *db){\n  Vdbe *p;\n  int cnt = 0;\n  int nWrite = 0;\n  int nRead = 0;\n  p = db->pVdbe;\n  while( p ){\n    if( sqlite3_stmt_busy((sqlite3_stmt*)p) ){\n      cnt++;\n      if( p->readOnly==0 ) nWrite++;\n      if( p->bIsReader ) nRead++;\n    }\n    p = p->pVNext;\n  }\n  assert( cnt==db->nVdbeActive );\n  assert( nWrite==db->nVdbeWrite );\n  assert( nRead==db->nVdbeRead );\n}\n#else\n#define checkActiveVdbeCnt(x)\n#endif\n\n/*\n** If the Vdbe passed as the first argument opened a statement-transaction,\n** close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or\n** SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement\n** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the\n** statement transaction is committed.\n**\n** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.\n** Otherwise SQLITE_OK.\n*/\nstatic SQLITE_NOINLINE int vdbeCloseStatement(Vdbe *p, int eOp){\n  sqlite3 *const db = p->db;\n  int rc = SQLITE_OK;\n  int i;\n  const int iSavepoint = p->iStatement-1;\n\n  assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);\n  assert( db->nStatement>0 );\n  assert( p->iStatement==(db->nStatement+db->nSavepoint) );\n\n  for(i=0; i<db->nDb; i++){\n    int rc2 = SQLITE_OK;\n    Btree *pBt = db->aDb[i].pBt;\n    if( pBt ){\n      if( eOp==SAVEPOINT_ROLLBACK ){\n        rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);\n      }\n      if( rc2==SQLITE_OK ){\n        rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);\n      }\n      if( rc==SQLITE_OK ){\n        rc = rc2;\n      }\n    }\n  }\n  db->nStatement--;\n  p->iStatement = 0;\n\n  if( rc==SQLITE_OK ){\n    if( eOp==SAVEPOINT_ROLLBACK ){\n      rc = sqlite3VtabSavepoint(db, SAVEPOINT_ROLLBACK, iSavepoint);\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3VtabSavepoint(db, SAVEPOINT_RELEASE, iSavepoint);\n    }\n  }\n\n  /* If the statement transaction is being rolled back, also restore the\n  ** database handles deferred constraint counter to the value it had when\n  ** the statement transaction was opened.  */\n  if( eOp==SAVEPOINT_ROLLBACK ){\n    db->nDeferredCons = p->nStmtDefCons;\n    db->nDeferredImmCons = p->nStmtDefImmCons;\n  }\n  return rc;\n}\nSQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){\n  if( p->db->nStatement && p->iStatement ){\n    return vdbeCloseStatement(p, eOp);\n  }\n  return SQLITE_OK;\n}\n\n\n/*\n** These functions are called when a transaction opened by the database\n** handle associated with the VM passed as an argument is about to be\n** committed. If there are outstanding foreign key constraint violations\n** return an error code. Otherwise, SQLITE_OK.\n**\n** If there are outstanding FK violations and this function returns\n** non-zero, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY\n** and write an error message to it.\n*/\n#ifndef SQLITE_OMIT_FOREIGN_KEY\nstatic SQLITE_NOINLINE int vdbeFkError(Vdbe *p){\n  p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;\n  p->errorAction = OE_Abort;\n  sqlite3VdbeError(p, \"FOREIGN KEY constraint failed\");\n  if( (p->prepFlags & SQLITE_PREPARE_SAVESQL)==0 ) return SQLITE_ERROR;\n  return SQLITE_CONSTRAINT_FOREIGNKEY;\n}\nSQLITE_PRIVATE int sqlite3VdbeCheckFkImmediate(Vdbe *p){\n  if( p->nFkConstraint==0 ) return SQLITE_OK;\n  return vdbeFkError(p);\n}\nSQLITE_PRIVATE int sqlite3VdbeCheckFkDeferred(Vdbe *p){\n  sqlite3 *db = p->db;\n  if( (db->nDeferredCons+db->nDeferredImmCons)==0 ) return SQLITE_OK;\n  return vdbeFkError(p);\n}\n#endif\n\n/*\n** This routine is called the when a VDBE tries to halt.  If the VDBE\n** has made changes and is in autocommit mode, then commit those\n** changes.  If a rollback is needed, then do the rollback.\n**\n** This routine is the only way to move the sqlite3eOpenState of a VM from\n** SQLITE_STATE_RUN to SQLITE_STATE_HALT.  It is harmless to\n** call this on a VM that is in the SQLITE_STATE_HALT state.\n**\n** Return an error code.  If the commit could not complete because of\n** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it\n** means the close did not happen and needs to be repeated.\n*/\nSQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){\n  int rc;                         /* Used to store transient return codes */\n  sqlite3 *db = p->db;\n\n  /* This function contains the logic that determines if a statement or\n  ** transaction will be committed or rolled back as a result of the\n  ** execution of this virtual machine.\n  **\n  ** If any of the following errors occur:\n  **\n  **     SQLITE_NOMEM\n  **     SQLITE_IOERR\n  **     SQLITE_FULL\n  **     SQLITE_INTERRUPT\n  **\n  ** Then the internal cache might have been left in an inconsistent\n  ** state.  We need to rollback the statement transaction, if there is\n  ** one, or the complete transaction if there is no statement transaction.\n  */\n\n  assert( p->eVdbeState==VDBE_RUN_STATE );\n  if( db->mallocFailed ){\n    p->rc = SQLITE_NOMEM_BKPT;\n  }\n  closeAllCursors(p);\n  checkActiveVdbeCnt(db);\n\n  /* No commit or rollback needed if the program never started or if the\n  ** SQL statement does not read or write a database file.  */\n  if( p->bIsReader ){\n    int mrc;   /* Primary error code from p->rc */\n    int eStatementOp = 0;\n    int isSpecialError;            /* Set to true if a 'special' error */\n\n    /* Lock all btrees used by the statement */\n    sqlite3VdbeEnter(p);\n\n    /* Check for one of the special errors */\n    if( p->rc ){\n      mrc = p->rc & 0xff;\n      isSpecialError = mrc==SQLITE_NOMEM\n                    || mrc==SQLITE_IOERR\n                    || mrc==SQLITE_INTERRUPT\n                    || mrc==SQLITE_FULL;\n    }else{\n      mrc = isSpecialError = 0;\n    }\n    if( isSpecialError ){\n      /* If the query was read-only and the error code is SQLITE_INTERRUPT,\n      ** no rollback is necessary. Otherwise, at least a savepoint\n      ** transaction must be rolled back to restore the database to a\n      ** consistent state.\n      **\n      ** Even if the statement is read-only, it is important to perform\n      ** a statement or transaction rollback operation. If the error\n      ** occurred while writing to the journal, sub-journal or database\n      ** file as part of an effort to free up cache space (see function\n      ** pagerStress() in pager.c), the rollback is required to restore\n      ** the pager to a consistent state.\n      */\n      if( !p->readOnly || mrc!=SQLITE_INTERRUPT ){\n        if( (mrc==SQLITE_NOMEM || mrc==SQLITE_FULL) && p->usesStmtJournal ){\n          eStatementOp = SAVEPOINT_ROLLBACK;\n        }else{\n          /* We are forced to roll back the active transaction. Before doing\n          ** so, abort any other statements this handle currently has active.\n          */\n          sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);\n          sqlite3CloseSavepoints(db);\n          db->autoCommit = 1;\n          p->nChange = 0;\n        }\n      }\n    }\n\n    /* Check for immediate foreign key violations. */\n    if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){\n      (void)sqlite3VdbeCheckFkImmediate(p);\n    }\n\n    /* If the auto-commit flag is set and this is the only active writer\n    ** VM, then we do either a commit or rollback of the current transaction.\n    **\n    ** Note: This block also runs if one of the special errors handled\n    ** above has occurred.\n    */\n    if( !sqlite3VtabInSync(db)\n     && db->autoCommit\n     && db->nVdbeWrite==(p->readOnly==0)\n    ){\n      if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){\n        rc = sqlite3VdbeCheckFkDeferred(p);\n        if( rc!=SQLITE_OK ){\n          if( NEVER(p->readOnly) ){\n            sqlite3VdbeLeave(p);\n            return SQLITE_ERROR;\n          }\n          rc = SQLITE_CONSTRAINT_FOREIGNKEY;\n        }else if( db->flags & SQLITE_CorruptRdOnly ){\n          rc = SQLITE_CORRUPT;\n          db->flags &= ~SQLITE_CorruptRdOnly;\n        }else{\n          /* The auto-commit flag is true, the vdbe program was successful\n          ** or hit an 'OR FAIL' constraint and there are no deferred foreign\n          ** key constraints to hold up the transaction. This means a commit\n          ** is required. */\n          rc = vdbeCommit(db, p);\n        }\n        if( rc==SQLITE_BUSY && p->readOnly ){\n          sqlite3VdbeLeave(p);\n          return SQLITE_BUSY;\n        }else if( rc!=SQLITE_OK ){\n          sqlite3SystemError(db, rc);\n          p->rc = rc;\n          sqlite3RollbackAll(db, SQLITE_OK);\n          p->nChange = 0;\n        }else{\n          db->nDeferredCons = 0;\n          db->nDeferredImmCons = 0;\n          db->flags &= ~(u64)SQLITE_DeferFKs;\n          sqlite3CommitInternalChanges(db);\n        }\n      }else if( p->rc==SQLITE_SCHEMA && db->nVdbeActive>1 ){\n        p->nChange = 0;\n      }else{\n        sqlite3RollbackAll(db, SQLITE_OK);\n        p->nChange = 0;\n      }\n      db->nStatement = 0;\n    }else if( eStatementOp==0 ){\n      if( p->rc==SQLITE_OK || p->errorAction==OE_Fail ){\n        eStatementOp = SAVEPOINT_RELEASE;\n      }else if( p->errorAction==OE_Abort ){\n        eStatementOp = SAVEPOINT_ROLLBACK;\n      }else{\n        sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);\n        sqlite3CloseSavepoints(db);\n        db->autoCommit = 1;\n        p->nChange = 0;\n      }\n    }\n\n    /* If eStatementOp is non-zero, then a statement transaction needs to\n    ** be committed or rolled back. Call sqlite3VdbeCloseStatement() to\n    ** do so. If this operation returns an error, and the current statement\n    ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the\n    ** current statement error code.\n    */\n    if( eStatementOp ){\n      rc = sqlite3VdbeCloseStatement(p, eStatementOp);\n      if( rc ){\n        if( p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT ){\n          p->rc = rc;\n          sqlite3DbFree(db, p->zErrMsg);\n          p->zErrMsg = 0;\n        }\n        sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);\n        sqlite3CloseSavepoints(db);\n        db->autoCommit = 1;\n        p->nChange = 0;\n      }\n    }\n\n    /* If this was an INSERT, UPDATE or DELETE and no statement transaction\n    ** has been rolled back, update the database connection change-counter.\n    */\n    if( p->changeCntOn ){\n      if( eStatementOp!=SAVEPOINT_ROLLBACK ){\n        sqlite3VdbeSetChanges(db, p->nChange);\n      }else{\n        sqlite3VdbeSetChanges(db, 0);\n      }\n      p->nChange = 0;\n    }\n\n    /* Release the locks */\n    sqlite3VdbeLeave(p);\n  }\n\n  /* We have successfully halted and closed the VM.  Record this fact. */\n  db->nVdbeActive--;\n  if( !p->readOnly ) db->nVdbeWrite--;\n  if( p->bIsReader ) db->nVdbeRead--;\n  assert( db->nVdbeActive>=db->nVdbeRead );\n  assert( db->nVdbeRead>=db->nVdbeWrite );\n  assert( db->nVdbeWrite>=0 );\n  p->eVdbeState = VDBE_HALT_STATE;\n  checkActiveVdbeCnt(db);\n  if( db->mallocFailed ){\n    p->rc = SQLITE_NOMEM_BKPT;\n  }\n\n  /* If the auto-commit flag is set to true, then any locks that were held\n  ** by connection db have now been released. Call sqlite3ConnectionUnlocked()\n  ** to invoke any required unlock-notify callbacks.\n  */\n  if( db->autoCommit ){\n    sqlite3ConnectionUnlocked(db);\n  }\n\n  assert( db->nVdbeActive>0 || db->autoCommit==0 || db->nStatement==0 );\n  return (p->rc==SQLITE_BUSY ? SQLITE_BUSY : SQLITE_OK);\n}\n\n\n/*\n** Each VDBE holds the result of the most recent sqlite3_step() call\n** in p->rc.  This routine sets that result back to SQLITE_OK.\n*/\nSQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe *p){\n  p->rc = SQLITE_OK;\n}\n\n/*\n** Copy the error code and error message belonging to the VDBE passed\n** as the first argument to its database handle (so that they will be\n** returned by calls to sqlite3_errcode() and sqlite3_errmsg()).\n**\n** This function does not clear the VDBE error code or message, just\n** copies them to the database handle.\n*/\nSQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p){\n  sqlite3 *db = p->db;\n  int rc = p->rc;\n  if( p->zErrMsg ){\n    db->bBenignMalloc++;\n    sqlite3BeginBenignMalloc();\n    if( db->pErr==0 ) db->pErr = sqlite3ValueNew(db);\n    sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);\n    sqlite3EndBenignMalloc();\n    db->bBenignMalloc--;\n  }else if( db->pErr ){\n    sqlite3ValueSetNull(db->pErr);\n  }\n  db->errCode = rc;\n  db->errByteOffset = -1;\n  return rc;\n}\n\n#ifdef SQLITE_ENABLE_SQLLOG\n/*\n** If an SQLITE_CONFIG_SQLLOG hook is registered and the VM has been run,\n** invoke it.\n*/\nstatic void vdbeInvokeSqllog(Vdbe *v){\n  if( sqlite3GlobalConfig.xSqllog && v->rc==SQLITE_OK && v->zSql && v->pc>=0 ){\n    char *zExpanded = sqlite3VdbeExpandSql(v, v->zSql);\n    assert( v->db->init.busy==0 );\n    if( zExpanded ){\n      sqlite3GlobalConfig.xSqllog(\n          sqlite3GlobalConfig.pSqllogArg, v->db, zExpanded, 1\n      );\n      sqlite3DbFree(v->db, zExpanded);\n    }\n  }\n}\n#else\n# define vdbeInvokeSqllog(x)\n#endif\n\n/*\n** Clean up a VDBE after execution but do not delete the VDBE just yet.\n** Write any error messages into *pzErrMsg.  Return the result code.\n**\n** After this routine is run, the VDBE should be ready to be executed\n** again.\n**\n** To look at it another way, this routine resets the state of the\n** virtual machine from VDBE_RUN_STATE or VDBE_HALT_STATE back to\n** VDBE_READY_STATE.\n*/\nSQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){\n#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)\n  int i;\n#endif\n\n  sqlite3 *db;\n  db = p->db;\n\n  /* If the VM did not run to completion or if it encountered an\n  ** error, then it might not have been halted properly.  So halt\n  ** it now.\n  */\n  if( p->eVdbeState==VDBE_RUN_STATE ) sqlite3VdbeHalt(p);\n\n  /* If the VDBE has been run even partially, then transfer the error code\n  ** and error message from the VDBE into the main database structure.  But\n  ** if the VDBE has just been set to run but has not actually executed any\n  ** instructions yet, leave the main database error information unchanged.\n  */\n  if( p->pc>=0 ){\n    vdbeInvokeSqllog(p);\n    if( db->pErr || p->zErrMsg ){\n      sqlite3VdbeTransferError(p);\n    }else{\n      db->errCode = p->rc;\n    }\n  }\n\n  /* Reset register contents and reclaim error message memory.\n  */\n#ifdef SQLITE_DEBUG\n  /* Execute assert() statements to ensure that the Vdbe.apCsr[] and\n  ** Vdbe.aMem[] arrays have already been cleaned up.  */\n  if( p->apCsr ) for(i=0; i<p->nCursor; i++) assert( p->apCsr[i]==0 );\n  if( p->aMem ){\n    for(i=0; i<p->nMem; i++) assert( p->aMem[i].flags==MEM_Undefined );\n  }\n#endif\n  if( p->zErrMsg ){\n    sqlite3DbFree(db, p->zErrMsg);\n    p->zErrMsg = 0;\n  }\n  p->pResultRow = 0;\n#ifdef SQLITE_DEBUG\n  p->nWrite = 0;\n#endif\n\n  /* Save profiling information from this VDBE run.\n  */\n#ifdef VDBE_PROFILE\n  {\n    FILE *out = fopen(\"vdbe_profile.out\", \"a\");\n    if( out ){\n      fprintf(out, \"---- \");\n      for(i=0; i<p->nOp; i++){\n        fprintf(out, \"%02x\", p->aOp[i].opcode);\n      }\n      fprintf(out, \"\\n\");\n      if( p->zSql ){\n        char c, pc = 0;\n        fprintf(out, \"-- \");\n        for(i=0; (c = p->zSql[i])!=0; i++){\n          if( pc=='\\n' ) fprintf(out, \"-- \");\n          putc(c, out);\n          pc = c;\n        }\n        if( pc!='\\n' ) fprintf(out, \"\\n\");\n      }\n      for(i=0; i<p->nOp; i++){\n        char zHdr[100];\n        i64 cnt = p->aOp[i].nExec;\n        i64 cycles = p->aOp[i].nCycle;\n        sqlite3_snprintf(sizeof(zHdr), zHdr, \"%6u %12llu %8llu \",\n           cnt,\n           cycles,\n           cnt>0 ? cycles/cnt : 0\n        );\n        fprintf(out, \"%s\", zHdr);\n        sqlite3VdbePrintOp(out, i, &p->aOp[i]);\n      }\n      fclose(out);\n    }\n  }\n#endif\n  return p->rc & db->errMask;\n}\n\n/*\n** Clean up and delete a VDBE after execution.  Return an integer which is\n** the result code.  Write any error message text into *pzErrMsg.\n*/\nSQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe *p){\n  int rc = SQLITE_OK;\n  assert( VDBE_RUN_STATE>VDBE_READY_STATE );\n  assert( VDBE_HALT_STATE>VDBE_READY_STATE );\n  assert( VDBE_INIT_STATE<VDBE_READY_STATE );\n  if( p->eVdbeState>=VDBE_READY_STATE ){\n    rc = sqlite3VdbeReset(p);\n    assert( (rc & p->db->errMask)==rc );\n  }\n  sqlite3VdbeDelete(p);\n  return rc;\n}\n\n/*\n** If parameter iOp is less than zero, then invoke the destructor for\n** all auxiliary data pointers currently cached by the VM passed as\n** the first argument.\n**\n** Or, if iOp is greater than or equal to zero, then the destructor is\n** only invoked for those auxiliary data pointers created by the user\n** function invoked by the OP_Function opcode at instruction iOp of\n** VM pVdbe, and only then if:\n**\n**    * the associated function parameter is the 32nd or later (counting\n**      from left to right), or\n**\n**    * the corresponding bit in argument mask is clear (where the first\n**      function parameter corresponds to bit 0 etc.).\n*/\nSQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(sqlite3 *db, AuxData **pp, int iOp, int mask){\n  while( *pp ){\n    AuxData *pAux = *pp;\n    if( (iOp<0)\n     || (pAux->iAuxOp==iOp\n          && pAux->iAuxArg>=0\n          && (pAux->iAuxArg>31 || !(mask & MASKBIT32(pAux->iAuxArg))))\n    ){\n      testcase( pAux->iAuxArg==31 );\n      if( pAux->xDeleteAux ){\n        pAux->xDeleteAux(pAux->pAux);\n      }\n      *pp = pAux->pNextAux;\n      sqlite3DbFree(db, pAux);\n    }else{\n      pp= &pAux->pNextAux;\n    }\n  }\n}\n\n/*\n** Free all memory associated with the Vdbe passed as the second argument,\n** except for object itself, which is preserved.\n**\n** The difference between this function and sqlite3VdbeDelete() is that\n** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with\n** the database connection and frees the object itself.\n*/\nstatic void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){\n  SubProgram *pSub, *pNext;\n  assert( db!=0 );\n  assert( p->db==0 || p->db==db );\n  if( p->aColName ){\n    releaseMemArray(p->aColName, p->nResAlloc*COLNAME_N);\n    sqlite3DbNNFreeNN(db, p->aColName);\n  }\n  for(pSub=p->pProgram; pSub; pSub=pNext){\n    pNext = pSub->pNext;\n    vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);\n    sqlite3DbFree(db, pSub);\n  }\n  if( p->eVdbeState!=VDBE_INIT_STATE ){\n    releaseMemArray(p->aVar, p->nVar);\n    if( p->pVList ) sqlite3DbNNFreeNN(db, p->pVList);\n    if( p->pFree ) sqlite3DbNNFreeNN(db, p->pFree);\n  }\n  vdbeFreeOpArray(db, p->aOp, p->nOp);\n  if( p->zSql ) sqlite3DbNNFreeNN(db, p->zSql);\n#ifdef SQLITE_ENABLE_NORMALIZE\n  sqlite3DbFree(db, p->zNormSql);\n  {\n    DblquoteStr *pThis, *pNxt;\n    for(pThis=p->pDblStr; pThis; pThis=pNxt){\n      pNxt = pThis->pNextStr;\n      sqlite3DbFree(db, pThis);\n    }\n  }\n#endif\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  {\n    int i;\n    for(i=0; i<p->nScan; i++){\n      sqlite3DbFree(db, p->aScan[i].zName);\n    }\n    sqlite3DbFree(db, p->aScan);\n  }\n#endif\n}\n\n/*\n** Delete an entire VDBE.\n*/\nSQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){\n  sqlite3 *db;\n\n  assert( p!=0 );\n  db = p->db;\n  assert( db!=0 );\n  assert( sqlite3_mutex_held(db->mutex) );\n  sqlite3VdbeClearObject(db, p);\n  if( db->pnBytesFreed==0 ){\n    assert( p->ppVPrev!=0 );\n    *p->ppVPrev = p->pVNext;\n    if( p->pVNext ){\n      p->pVNext->ppVPrev = p->ppVPrev;\n    }\n  }\n  sqlite3DbNNFreeNN(db, p);\n}\n\n/*\n** The cursor \"p\" has a pending seek operation that has not yet been\n** carried out.  Seek the cursor now.  If an error occurs, return\n** the appropriate error code.\n*/\nSQLITE_PRIVATE int SQLITE_NOINLINE sqlite3VdbeFinishMoveto(VdbeCursor *p){\n  int res, rc;\n#ifdef SQLITE_TEST\n  extern int sqlite3_search_count;\n#endif\n  assert( p->deferredMoveto );\n  assert( p->isTable );\n  assert( p->eCurType==CURTYPE_BTREE );\n  rc = sqlite3BtreeTableMoveto(p->uc.pCursor, p->movetoTarget, 0, &res);\n  if( rc ) return rc;\n  if( res!=0 ) return SQLITE_CORRUPT_BKPT;\n#ifdef SQLITE_TEST\n  sqlite3_search_count++;\n#endif\n  p->deferredMoveto = 0;\n  p->cacheStatus = CACHE_STALE;\n  return SQLITE_OK;\n}\n\n/*\n** Something has moved cursor \"p\" out of place.  Maybe the row it was\n** pointed to was deleted out from under it.  Or maybe the btree was\n** rebalanced.  Whatever the cause, try to restore \"p\" to the place it\n** is supposed to be pointing.  If the row was deleted out from under the\n** cursor, set the cursor to point to a NULL row.\n*/\nSQLITE_PRIVATE int SQLITE_NOINLINE sqlite3VdbeHandleMovedCursor(VdbeCursor *p){\n  int isDifferentRow, rc;\n  assert( p->eCurType==CURTYPE_BTREE );\n  assert( p->uc.pCursor!=0 );\n  assert( sqlite3BtreeCursorHasMoved(p->uc.pCursor) );\n  rc = sqlite3BtreeCursorRestore(p->uc.pCursor, &isDifferentRow);\n  p->cacheStatus = CACHE_STALE;\n  if( isDifferentRow ) p->nullRow = 1;\n  return rc;\n}\n\n/*\n** Check to ensure that the cursor is valid.  Restore the cursor\n** if need be.  Return any I/O error from the restore operation.\n*/\nSQLITE_PRIVATE int sqlite3VdbeCursorRestore(VdbeCursor *p){\n  assert( p->eCurType==CURTYPE_BTREE || IsNullCursor(p) );\n  if( sqlite3BtreeCursorHasMoved(p->uc.pCursor) ){\n    return sqlite3VdbeHandleMovedCursor(p);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** The following functions:\n**\n** sqlite3VdbeSerialType()\n** sqlite3VdbeSerialTypeLen()\n** sqlite3VdbeSerialLen()\n** sqlite3VdbeSerialPut()  <--- in-lined into OP_MakeRecord as of 2022-04-02\n** sqlite3VdbeSerialGet()\n**\n** encapsulate the code that serializes values for storage in SQLite\n** data and index records. Each serialized value consists of a\n** 'serial-type' and a blob of data. The serial type is an 8-byte unsigned\n** integer, stored as a varint.\n**\n** In an SQLite index record, the serial type is stored directly before\n** the blob of data that it corresponds to. In a table record, all serial\n** types are stored at the start of the record, and the blobs of data at\n** the end. Hence these functions allow the caller to handle the\n** serial-type and data blob separately.\n**\n** The following table describes the various storage classes for data:\n**\n**   serial type        bytes of data      type\n**   --------------     ---------------    ---------------\n**      0                     0            NULL\n**      1                     1            signed integer\n**      2                     2            signed integer\n**      3                     3            signed integer\n**      4                     4            signed integer\n**      5                     6            signed integer\n**      6                     8            signed integer\n**      7                     8            IEEE float\n**      8                     0            Integer constant 0\n**      9                     0            Integer constant 1\n**     10,11                               reserved for expansion\n**    N>=12 and even       (N-12)/2        BLOB\n**    N>=13 and odd        (N-13)/2        text\n**\n** The 8 and 9 types were added in 3.3.0, file format 4.  Prior versions\n** of SQLite will not understand those serial types.\n*/\n\n#if 0 /* Inlined into the OP_MakeRecord opcode */\n/*\n** Return the serial-type for the value stored in pMem.\n**\n** This routine might convert a large MEM_IntReal value into MEM_Real.\n**\n** 2019-07-11:  The primary user of this subroutine was the OP_MakeRecord\n** opcode in the byte-code engine.  But by moving this routine in-line, we\n** can omit some redundant tests and make that opcode a lot faster.  So\n** this routine is now only used by the STAT3 logic and STAT3 support has\n** ended.  The code is kept here for historical reference only.\n*/\nSQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format, u32 *pLen){\n  int flags = pMem->flags;\n  u32 n;\n\n  assert( pLen!=0 );\n  if( flags&MEM_Null ){\n    *pLen = 0;\n    return 0;\n  }\n  if( flags&(MEM_Int|MEM_IntReal) ){\n    /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */\n#   define MAX_6BYTE ((((i64)0x00008000)<<32)-1)\n    i64 i = pMem->u.i;\n    u64 u;\n    testcase( flags & MEM_Int );\n    testcase( flags & MEM_IntReal );\n    if( i<0 ){\n      u = ~i;\n    }else{\n      u = i;\n    }\n    if( u<=127 ){\n      if( (i&1)==i && file_format>=4 ){\n        *pLen = 0;\n        return 8+(u32)u;\n      }else{\n        *pLen = 1;\n        return 1;\n      }\n    }\n    if( u<=32767 ){ *pLen = 2; return 2; }\n    if( u<=8388607 ){ *pLen = 3; return 3; }\n    if( u<=2147483647 ){ *pLen = 4; return 4; }\n    if( u<=MAX_6BYTE ){ *pLen = 6; return 5; }\n    *pLen = 8;\n    if( flags&MEM_IntReal ){\n      /* If the value is IntReal and is going to take up 8 bytes to store\n      ** as an integer, then we might as well make it an 8-byte floating\n      ** point value */\n      pMem->u.r = (double)pMem->u.i;\n      pMem->flags &= ~MEM_IntReal;\n      pMem->flags |= MEM_Real;\n      return 7;\n    }\n    return 6;\n  }\n  if( flags&MEM_Real ){\n    *pLen = 8;\n    return 7;\n  }\n  assert( pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob) );\n  assert( pMem->n>=0 );\n  n = (u32)pMem->n;\n  if( flags & MEM_Zero ){\n    n += pMem->u.nZero;\n  }\n  *pLen = n;\n  return ((n*2) + 12 + ((flags&MEM_Str)!=0));\n}\n#endif /* inlined into OP_MakeRecord */\n\n/*\n** The sizes for serial types less than 128\n*/\nSQLITE_PRIVATE const u8 sqlite3SmallTypeSizes[128] = {\n        /*  0   1   2   3   4   5   6   7   8   9 */\n/*   0 */   0,  1,  2,  3,  4,  6,  8,  8,  0,  0,\n/*  10 */   0,  0,  0,  0,  1,  1,  2,  2,  3,  3,\n/*  20 */   4,  4,  5,  5,  6,  6,  7,  7,  8,  8,\n/*  30 */   9,  9, 10, 10, 11, 11, 12, 12, 13, 13,\n/*  40 */  14, 14, 15, 15, 16, 16, 17, 17, 18, 18,\n/*  50 */  19, 19, 20, 20, 21, 21, 22, 22, 23, 23,\n/*  60 */  24, 24, 25, 25, 26, 26, 27, 27, 28, 28,\n/*  70 */  29, 29, 30, 30, 31, 31, 32, 32, 33, 33,\n/*  80 */  34, 34, 35, 35, 36, 36, 37, 37, 38, 38,\n/*  90 */  39, 39, 40, 40, 41, 41, 42, 42, 43, 43,\n/* 100 */  44, 44, 45, 45, 46, 46, 47, 47, 48, 48,\n/* 110 */  49, 49, 50, 50, 51, 51, 52, 52, 53, 53,\n/* 120 */  54, 54, 55, 55, 56, 56, 57, 57\n};\n\n/*\n** Return the length of the data corresponding to the supplied serial-type.\n*/\nSQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){\n  if( serial_type>=128 ){\n    return (serial_type-12)/2;\n  }else{\n    assert( serial_type<12\n            || sqlite3SmallTypeSizes[serial_type]==(serial_type - 12)/2 );\n    return sqlite3SmallTypeSizes[serial_type];\n  }\n}\nSQLITE_PRIVATE u8 sqlite3VdbeOneByteSerialTypeLen(u8 serial_type){\n  assert( serial_type<128 );\n  return sqlite3SmallTypeSizes[serial_type];\n}\n\n/*\n** If we are on an architecture with mixed-endian floating\n** points (ex: ARM7) then swap the lower 4 bytes with the\n** upper 4 bytes.  Return the result.\n**\n** For most architectures, this is a no-op.\n**\n** (later):  It is reported to me that the mixed-endian problem\n** on ARM7 is an issue with GCC, not with the ARM7 chip.  It seems\n** that early versions of GCC stored the two words of a 64-bit\n** float in the wrong order.  And that error has been propagated\n** ever since.  The blame is not necessarily with GCC, though.\n** GCC might have just copying the problem from a prior compiler.\n** I am also told that newer versions of GCC that follow a different\n** ABI get the byte order right.\n**\n** Developers using SQLite on an ARM7 should compile and run their\n** application using -DSQLITE_DEBUG=1 at least once.  With DEBUG\n** enabled, some asserts below will ensure that the byte order of\n** floating point values is correct.\n**\n** (2007-08-30)  Frank van Vugt has studied this problem closely\n** and has send his findings to the SQLite developers.  Frank\n** writes that some Linux kernels offer floating point hardware\n** emulation that uses only 32-bit mantissas instead of a full\n** 48-bits as required by the IEEE standard.  (This is the\n** CONFIG_FPE_FASTFPE option.)  On such systems, floating point\n** byte swapping becomes very complicated.  To avoid problems,\n** the necessary byte swapping is carried out using a 64-bit integer\n** rather than a 64-bit float.  Frank assures us that the code here\n** works for him.  We, the developers, have no way to independently\n** verify this, but Frank seems to know what he is talking about\n** so we trust him.\n*/\n#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nSQLITE_PRIVATE u64 sqlite3FloatSwap(u64 in){\n  union {\n    u64 r;\n    u32 i[2];\n  } u;\n  u32 t;\n\n  u.r = in;\n  t = u.i[0];\n  u.i[0] = u.i[1];\n  u.i[1] = t;\n  return u.r;\n}\n#endif /* SQLITE_MIXED_ENDIAN_64BIT_FLOAT */\n\n\n/* Input \"x\" is a sequence of unsigned characters that represent a\n** big-endian integer.  Return the equivalent native integer\n*/\n#define ONE_BYTE_INT(x)    ((i8)(x)[0])\n#define TWO_BYTE_INT(x)    (256*(i8)((x)[0])|(x)[1])\n#define THREE_BYTE_INT(x)  (65536*(i8)((x)[0])|((x)[1]<<8)|(x)[2])\n#define FOUR_BYTE_UINT(x)  (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])\n#define FOUR_BYTE_INT(x) (16777216*(i8)((x)[0])|((x)[1]<<16)|((x)[2]<<8)|(x)[3])\n\n/*\n** Deserialize the data blob pointed to by buf as serial type serial_type\n** and store the result in pMem.\n**\n** This function is implemented as two separate routines for performance.\n** The few cases that require local variables are broken out into a separate\n** routine so that in most cases the overhead of moving the stack pointer\n** is avoided.\n*/\nstatic void serialGet(\n  const unsigned char *buf,     /* Buffer to deserialize from */\n  u32 serial_type,              /* Serial type to deserialize */\n  Mem *pMem                     /* Memory cell to write value into */\n){\n  u64 x = FOUR_BYTE_UINT(buf);\n  u32 y = FOUR_BYTE_UINT(buf+4);\n  x = (x<<32) + y;\n  if( serial_type==6 ){\n    /* EVIDENCE-OF: R-29851-52272 Value is a big-endian 64-bit\n    ** twos-complement integer. */\n    pMem->u.i = *(i64*)&x;\n    pMem->flags = MEM_Int;\n    testcase( pMem->u.i<0 );\n  }else{\n    /* EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit\n    ** floating point number. */\n#if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)\n    /* Verify that integers and floating point values use the same\n    ** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is\n    ** defined that 64-bit floating point values really are mixed\n    ** endian.\n    */\n    static const u64 t1 = ((u64)0x3ff00000)<<32;\n    static const double r1 = 1.0;\n    u64 t2 = t1;\n    swapMixedEndianFloat(t2);\n    assert( sizeof(r1)==sizeof(t2) && memcmp(&r1, &t2, sizeof(r1))==0 );\n#endif\n    assert( sizeof(x)==8 && sizeof(pMem->u.r)==8 );\n    swapMixedEndianFloat(x);\n    memcpy(&pMem->u.r, &x, sizeof(x));\n    pMem->flags = IsNaN(x) ? MEM_Null : MEM_Real;\n  }\n}\nstatic int serialGet7(\n  const unsigned char *buf,     /* Buffer to deserialize from */\n  Mem *pMem                     /* Memory cell to write value into */\n){\n  u64 x = FOUR_BYTE_UINT(buf);\n  u32 y = FOUR_BYTE_UINT(buf+4);\n  x = (x<<32) + y;\n  assert( sizeof(x)==8 && sizeof(pMem->u.r)==8 );\n  swapMixedEndianFloat(x);\n  memcpy(&pMem->u.r, &x, sizeof(x));\n  if( IsNaN(x) ){\n    pMem->flags = MEM_Null;\n    return 1;\n  }\n  pMem->flags = MEM_Real;\n  return 0;\n}\nSQLITE_PRIVATE void sqlite3VdbeSerialGet(\n  const unsigned char *buf,     /* Buffer to deserialize from */\n  u32 serial_type,              /* Serial type to deserialize */\n  Mem *pMem                     /* Memory cell to write value into */\n){\n  switch( serial_type ){\n    case 10: { /* Internal use only: NULL with virtual table\n               ** UPDATE no-change flag set */\n      pMem->flags = MEM_Null|MEM_Zero;\n      pMem->n = 0;\n      pMem->u.nZero = 0;\n      return;\n    }\n    case 11:   /* Reserved for future use */\n    case 0: {  /* Null */\n      /* EVIDENCE-OF: R-24078-09375 Value is a NULL. */\n      pMem->flags = MEM_Null;\n      return;\n    }\n    case 1: {\n      /* EVIDENCE-OF: R-44885-25196 Value is an 8-bit twos-complement\n      ** integer. */\n      pMem->u.i = ONE_BYTE_INT(buf);\n      pMem->flags = MEM_Int;\n      testcase( pMem->u.i<0 );\n      return;\n    }\n    case 2: { /* 2-byte signed integer */\n      /* EVIDENCE-OF: R-49794-35026 Value is a big-endian 16-bit\n      ** twos-complement integer. */\n      pMem->u.i = TWO_BYTE_INT(buf);\n      pMem->flags = MEM_Int;\n      testcase( pMem->u.i<0 );\n      return;\n    }\n    case 3: { /* 3-byte signed integer */\n      /* EVIDENCE-OF: R-37839-54301 Value is a big-endian 24-bit\n      ** twos-complement integer. */\n      pMem->u.i = THREE_BYTE_INT(buf);\n      pMem->flags = MEM_Int;\n      testcase( pMem->u.i<0 );\n      return;\n    }\n    case 4: { /* 4-byte signed integer */\n      /* EVIDENCE-OF: R-01849-26079 Value is a big-endian 32-bit\n      ** twos-complement integer. */\n      pMem->u.i = FOUR_BYTE_INT(buf);\n#ifdef __HP_cc\n      /* Work around a sign-extension bug in the HP compiler for HP/UX */\n      if( buf[0]&0x80 ) pMem->u.i |= 0xffffffff80000000LL;\n#endif\n      pMem->flags = MEM_Int;\n      testcase( pMem->u.i<0 );\n      return;\n    }\n    case 5: { /* 6-byte signed integer */\n      /* EVIDENCE-OF: R-50385-09674 Value is a big-endian 48-bit\n      ** twos-complement integer. */\n      pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf);\n      pMem->flags = MEM_Int;\n      testcase( pMem->u.i<0 );\n      return;\n    }\n    case 6:   /* 8-byte signed integer */\n    case 7: { /* IEEE floating point */\n      /* These use local variables, so do them in a separate routine\n      ** to avoid having to move the frame pointer in the common case */\n      serialGet(buf,serial_type,pMem);\n      return;\n    }\n    case 8:    /* Integer 0 */\n    case 9: {  /* Integer 1 */\n      /* EVIDENCE-OF: R-12976-22893 Value is the integer 0. */\n      /* EVIDENCE-OF: R-18143-12121 Value is the integer 1. */\n      pMem->u.i = serial_type-8;\n      pMem->flags = MEM_Int;\n      return;\n    }\n    default: {\n      /* EVIDENCE-OF: R-14606-31564 Value is a BLOB that is (N-12)/2 bytes in\n      ** length.\n      ** EVIDENCE-OF: R-28401-00140 Value is a string in the text encoding and\n      ** (N-13)/2 bytes in length. */\n      static const u16 aFlag[] = { MEM_Blob|MEM_Ephem, MEM_Str|MEM_Ephem };\n      pMem->z = (char *)buf;\n      pMem->n = (serial_type-12)/2;\n      pMem->flags = aFlag[serial_type&1];\n      return;\n    }\n  }\n  return;\n}\n/*\n** Allocate sufficient space for an UnpackedRecord structure large enough\n** to hold a decoded index record for pKeyInfo.\n**\n** The space is allocated using sqlite3DbMallocRaw().  If an OOM error\n** occurs, NULL is returned.\n*/\nSQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(\n  KeyInfo *pKeyInfo               /* Description of the record */\n){\n  UnpackedRecord *p;              /* Unpacked record to return */\n  u64 nByte;                      /* Number of bytes required for *p */\n  assert( sizeof(UnpackedRecord) + sizeof(Mem)*65536 < 0x7fffffff );\n  nByte = ROUND8P(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nKeyField+1);\n  p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);\n  if( !p ) return 0;\n  p->aMem = (Mem*)&((char*)p)[ROUND8P(sizeof(UnpackedRecord))];\n  p->pKeyInfo = pKeyInfo;\n  p->nField = pKeyInfo->nKeyField + 1;\n  return p;\n}\n\n/*\n** Given the nKey-byte encoding of a record in pKey[], populate the\n** UnpackedRecord structure indicated by the fourth argument with the\n** contents of the decoded record.\n*/\nSQLITE_PRIVATE void sqlite3VdbeRecordUnpack(\n  int nKey,              /* Size of the binary record */\n  const void *pKey,      /* The binary record */\n  UnpackedRecord *p      /* Populate this structure before returning. */\n){\n  const unsigned char *aKey = (const unsigned char *)pKey;\n  u32 d;\n  u32 idx;                        /* Offset in aKey[] to read from */\n  u16 u;                          /* Unsigned loop counter */\n  u32 szHdr;\n  Mem *pMem = p->aMem;\n  KeyInfo *pKeyInfo = p->pKeyInfo;\n\n  p->default_rc = 0;\n  assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n  idx = getVarint32(aKey, szHdr);\n  d = szHdr;\n  u = 0;\n  while( idx<szHdr && d<=(u32)nKey ){\n    u32 serial_type;\n\n    idx += getVarint32(&aKey[idx], serial_type);\n    pMem->enc = pKeyInfo->enc;\n    pMem->db = pKeyInfo->db;\n    /* pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us */\n    pMem->szMalloc = 0;\n    pMem->z = 0;\n    sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);\n    d += sqlite3VdbeSerialTypeLen(serial_type);\n    if( (++u)>=p->nField ) break;\n    pMem++;\n  }\n  if( d>(u32)nKey && u ){\n    assert( CORRUPT_DB );\n    /* In a corrupt record entry, the last pMem might have been set up using\n    ** uninitialized memory. Overwrite its value with NULL, to prevent\n    ** warnings from MSAN. */\n    sqlite3VdbeMemSetNull(pMem-(u<p->nField));\n  }\n  testcase( u == pKeyInfo->nKeyField + 1 );\n  testcase( u < pKeyInfo->nKeyField + 1 );\n  assert( u<=pKeyInfo->nKeyField + 1 );\n  p->nField = u;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** This function compares two index or table record keys in the same way\n** as the sqlite3VdbeRecordCompare() routine. Unlike VdbeRecordCompare(),\n** this function deserializes and compares values using the\n** sqlite3VdbeSerialGet() and sqlite3MemCompare() functions. It is used\n** in assert() statements to ensure that the optimized code in\n** sqlite3VdbeRecordCompare() returns results with these two primitives.\n**\n** Return true if the result of comparison is equivalent to desiredResult.\n** Return false if there is a disagreement.\n*/\nstatic int vdbeRecordCompareDebug(\n  int nKey1, const void *pKey1, /* Left key */\n  const UnpackedRecord *pPKey2, /* Right key */\n  int desiredResult             /* Correct answer */\n){\n  u32 d1;            /* Offset into aKey[] of next data element */\n  u32 idx1;          /* Offset into aKey[] of next header element */\n  u32 szHdr1;        /* Number of bytes in header */\n  int i = 0;\n  int rc = 0;\n  const unsigned char *aKey1 = (const unsigned char *)pKey1;\n  KeyInfo *pKeyInfo;\n  Mem mem1;\n\n  pKeyInfo = pPKey2->pKeyInfo;\n  if( pKeyInfo->db==0 ) return 1;\n  mem1.enc = pKeyInfo->enc;\n  mem1.db = pKeyInfo->db;\n  /* mem1.flags = 0;  // Will be initialized by sqlite3VdbeSerialGet() */\n  VVA_ONLY( mem1.szMalloc = 0; ) /* Only needed by assert() statements */\n\n  /* Compilers may complain that mem1.u.i is potentially uninitialized.\n  ** We could initialize it, as shown here, to silence those complaints.\n  ** But in fact, mem1.u.i will never actually be used uninitialized, and doing\n  ** the unnecessary initialization has a measurable negative performance\n  ** impact, since this routine is a very high runner.  And so, we choose\n  ** to ignore the compiler warnings and leave this variable uninitialized.\n  */\n  /*  mem1.u.i = 0;  // not needed, here to silence compiler warning */\n\n  idx1 = getVarint32(aKey1, szHdr1);\n  if( szHdr1>98307 ) return SQLITE_CORRUPT;\n  d1 = szHdr1;\n  assert( pKeyInfo->nAllField>=pPKey2->nField || CORRUPT_DB );\n  assert( pKeyInfo->aSortFlags!=0 );\n  assert( pKeyInfo->nKeyField>0 );\n  assert( idx1<=szHdr1 || CORRUPT_DB );\n  do{\n    u32 serial_type1;\n\n    /* Read the serial types for the next element in each key. */\n    idx1 += getVarint32( aKey1+idx1, serial_type1 );\n\n    /* Verify that there is enough key space remaining to avoid\n    ** a buffer overread.  The \"d1+serial_type1+2\" subexpression will\n    ** always be greater than or equal to the amount of required key space.\n    ** Use that approximation to avoid the more expensive call to\n    ** sqlite3VdbeSerialTypeLen() in the common case.\n    */\n    if( d1+(u64)serial_type1+2>(u64)nKey1\n     && d1+(u64)sqlite3VdbeSerialTypeLen(serial_type1)>(u64)nKey1\n    ){\n      if( serial_type1>=1\n       && serial_type1<=7\n       && d1+(u64)sqlite3VdbeSerialTypeLen(serial_type1)<=(u64)nKey1+8\n       && CORRUPT_DB\n      ){\n        return 1;  /* corrupt record not detected by\n                   ** sqlite3VdbeRecordCompareWithSkip().  Return true\n                   ** to avoid firing the assert() */\n      }\n      break;\n    }\n\n    /* Extract the values to be compared.\n    */\n    sqlite3VdbeSerialGet(&aKey1[d1], serial_type1, &mem1);\n    d1 += sqlite3VdbeSerialTypeLen(serial_type1);\n\n    /* Do the comparison\n    */\n    rc = sqlite3MemCompare(&mem1, &pPKey2->aMem[i],\n                           pKeyInfo->nAllField>i ? pKeyInfo->aColl[i] : 0);\n    if( rc!=0 ){\n      assert( mem1.szMalloc==0 );  /* See comment below */\n      if( (pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_BIGNULL)\n       && ((mem1.flags & MEM_Null) || (pPKey2->aMem[i].flags & MEM_Null))\n      ){\n        rc = -rc;\n      }\n      if( pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_DESC ){\n        rc = -rc;  /* Invert the result for DESC sort order. */\n      }\n      goto debugCompareEnd;\n    }\n    i++;\n  }while( idx1<szHdr1 && i<pPKey2->nField );\n\n  /* No memory allocation is ever used on mem1.  Prove this using\n  ** the following assert().  If the assert() fails, it indicates a\n  ** memory leak and a need to call sqlite3VdbeMemRelease(&mem1).\n  */\n  assert( mem1.szMalloc==0 );\n\n  /* rc==0 here means that one of the keys ran out of fields and\n  ** all the fields up to that point were equal. Return the default_rc\n  ** value.  */\n  rc = pPKey2->default_rc;\n\ndebugCompareEnd:\n  if( desiredResult==0 && rc==0 ) return 1;\n  if( desiredResult<0 && rc<0 ) return 1;\n  if( desiredResult>0 && rc>0 ) return 1;\n  if( CORRUPT_DB ) return 1;\n  if( pKeyInfo->db->mallocFailed ) return 1;\n  return 0;\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Count the number of fields (a.k.a. columns) in the record given by\n** pKey,nKey.  The verify that this count is less than or equal to the\n** limit given by pKeyInfo->nAllField.\n**\n** If this constraint is not satisfied, it means that the high-speed\n** vdbeRecordCompareInt() and vdbeRecordCompareString() routines will\n** not work correctly.  If this assert() ever fires, it probably means\n** that the KeyInfo.nKeyField or KeyInfo.nAllField values were computed\n** incorrectly.\n*/\nstatic void vdbeAssertFieldCountWithinLimits(\n  int nKey, const void *pKey,   /* The record to verify */\n  const KeyInfo *pKeyInfo       /* Compare size with this KeyInfo */\n){\n  int nField = 0;\n  u32 szHdr;\n  u32 idx;\n  u32 notUsed;\n  const unsigned char *aKey = (const unsigned char*)pKey;\n\n  if( CORRUPT_DB ) return;\n  idx = getVarint32(aKey, szHdr);\n  assert( nKey>=0 );\n  assert( szHdr<=(u32)nKey );\n  while( idx<szHdr ){\n    idx += getVarint32(aKey+idx, notUsed);\n    nField++;\n  }\n  assert( nField <= pKeyInfo->nAllField );\n}\n#else\n# define vdbeAssertFieldCountWithinLimits(A,B,C)\n#endif\n\n/*\n** Both *pMem1 and *pMem2 contain string values. Compare the two values\n** using the collation sequence pColl. As usual, return a negative , zero\n** or positive value if *pMem1 is less than, equal to or greater than\n** *pMem2, respectively. Similar in spirit to \"rc = (*pMem1) - (*pMem2);\".\n*/\nstatic SQLITE_NOINLINE int vdbeCompareMemStringWithEncodingChange(\n  const Mem *pMem1,\n  const Mem *pMem2,\n  const CollSeq *pColl,\n  u8 *prcErr                      /* If an OOM occurs, set to SQLITE_NOMEM */\n){\n  int rc;\n  const void *v1, *v2;\n  Mem c1;\n  Mem c2;\n  sqlite3VdbeMemInit(&c1, pMem1->db, MEM_Null);\n  sqlite3VdbeMemInit(&c2, pMem1->db, MEM_Null);\n  sqlite3VdbeMemShallowCopy(&c1, pMem1, MEM_Ephem);\n  sqlite3VdbeMemShallowCopy(&c2, pMem2, MEM_Ephem);\n  v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);\n  v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);\n  if( (v1==0 || v2==0) ){\n    if( prcErr ) *prcErr = SQLITE_NOMEM_BKPT;\n    rc = 0;\n  }else{\n    rc = pColl->xCmp(pColl->pUser, c1.n, v1, c2.n, v2);\n  }\n  sqlite3VdbeMemReleaseMalloc(&c1);\n  sqlite3VdbeMemReleaseMalloc(&c2);\n  return rc;\n}\nstatic int vdbeCompareMemString(\n  const Mem *pMem1,\n  const Mem *pMem2,\n  const CollSeq *pColl,\n  u8 *prcErr                      /* If an OOM occurs, set to SQLITE_NOMEM */\n){\n  if( pMem1->enc==pColl->enc ){\n    /* The strings are already in the correct encoding.  Call the\n     ** comparison function directly */\n    return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);\n  }else{\n    return vdbeCompareMemStringWithEncodingChange(pMem1,pMem2,pColl,prcErr);\n  }\n}\n\n/*\n** The input pBlob is guaranteed to be a Blob that is not marked\n** with MEM_Zero.  Return true if it could be a zero-blob.\n*/\nstatic int isAllZero(const char *z, int n){\n  int i;\n  for(i=0; i<n; i++){\n    if( z[i] ) return 0;\n  }\n  return 1;\n}\n\n/*\n** Compare two blobs.  Return negative, zero, or positive if the first\n** is less than, equal to, or greater than the second, respectively.\n** If one blob is a prefix of the other, then the shorter is the lessor.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE int sqlite3BlobCompare(const Mem *pB1, const Mem *pB2){\n  int c;\n  int n1 = pB1->n;\n  int n2 = pB2->n;\n\n  /* It is possible to have a Blob value that has some non-zero content\n  ** followed by zero content.  But that only comes up for Blobs formed\n  ** by the OP_MakeRecord opcode, and such Blobs never get passed into\n  ** sqlite3MemCompare(). */\n  assert( (pB1->flags & MEM_Zero)==0 || n1==0 );\n  assert( (pB2->flags & MEM_Zero)==0 || n2==0 );\n\n  if( (pB1->flags|pB2->flags) & MEM_Zero ){\n    if( pB1->flags & pB2->flags & MEM_Zero ){\n      return pB1->u.nZero - pB2->u.nZero;\n    }else if( pB1->flags & MEM_Zero ){\n      if( !isAllZero(pB2->z, pB2->n) ) return -1;\n      return pB1->u.nZero - n2;\n    }else{\n      if( !isAllZero(pB1->z, pB1->n) ) return +1;\n      return n1 - pB2->u.nZero;\n    }\n  }\n  c = memcmp(pB1->z, pB2->z, n1>n2 ? n2 : n1);\n  if( c ) return c;\n  return n1 - n2;\n}\n\n/* The following two functions are used only within testcase() to prove\n** test coverage.  These functions do no exist for production builds.\n** We must use separate SQLITE_NOINLINE functions here, since otherwise\n** optimizer code movement causes gcov to become very confused.\n*/\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)\nstatic int SQLITE_NOINLINE doubleLt(double a, double b){ return a<b; }\nstatic int SQLITE_NOINLINE doubleEq(double a, double b){ return a==b; }\n#endif\n\n/*\n** Do a comparison between a 64-bit signed integer and a 64-bit floating-point\n** number.  Return negative, zero, or positive if the first (i64) is less than,\n** equal to, or greater than the second (double).\n*/\nSQLITE_PRIVATE int sqlite3IntFloatCompare(i64 i, double r){\n  if( sqlite3IsNaN(r) ){\n    /* SQLite considers NaN to be a NULL. And all integer values are greater\n    ** than NULL */\n    return 1;\n  }else{\n    i64 y;\n    if( r<-9223372036854775808.0 ) return +1;\n    if( r>=9223372036854775808.0 ) return -1;\n    y = (i64)r;\n    if( i<y ) return -1;\n    if( i>y ) return +1;\n    testcase( doubleLt(((double)i),r) );\n    testcase( doubleLt(r,((double)i)) );\n    testcase( doubleEq(r,((double)i)) );\n    return (((double)i)<r) ? -1 : (((double)i)>r);\n  }\n}\n\n/*\n** Compare the values contained by the two memory cells, returning\n** negative, zero or positive if pMem1 is less than, equal to, or greater\n** than pMem2. Sorting order is NULL's first, followed by numbers (integers\n** and reals) sorted numerically, followed by text ordered by the collating\n** sequence pColl and finally blob's ordered by memcmp().\n**\n** Two NULL values are considered equal by this function.\n*/\nSQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){\n  int f1, f2;\n  int combined_flags;\n\n  f1 = pMem1->flags;\n  f2 = pMem2->flags;\n  combined_flags = f1|f2;\n  assert( !sqlite3VdbeMemIsRowSet(pMem1) && !sqlite3VdbeMemIsRowSet(pMem2) );\n\n  /* If one value is NULL, it is less than the other. If both values\n  ** are NULL, return 0.\n  */\n  if( combined_flags&MEM_Null ){\n    return (f2&MEM_Null) - (f1&MEM_Null);\n  }\n\n  /* At least one of the two values is a number\n  */\n  if( combined_flags&(MEM_Int|MEM_Real|MEM_IntReal) ){\n    testcase( combined_flags & MEM_Int );\n    testcase( combined_flags & MEM_Real );\n    testcase( combined_flags & MEM_IntReal );\n    if( (f1 & f2 & (MEM_Int|MEM_IntReal))!=0 ){\n      testcase( f1 & f2 & MEM_Int );\n      testcase( f1 & f2 & MEM_IntReal );\n      if( pMem1->u.i < pMem2->u.i ) return -1;\n      if( pMem1->u.i > pMem2->u.i ) return +1;\n      return 0;\n    }\n    if( (f1 & f2 & MEM_Real)!=0 ){\n      if( pMem1->u.r < pMem2->u.r ) return -1;\n      if( pMem1->u.r > pMem2->u.r ) return +1;\n      return 0;\n    }\n    if( (f1&(MEM_Int|MEM_IntReal))!=0 ){\n      testcase( f1 & MEM_Int );\n      testcase( f1 & MEM_IntReal );\n      if( (f2&MEM_Real)!=0 ){\n        return sqlite3IntFloatCompare(pMem1->u.i, pMem2->u.r);\n      }else if( (f2&(MEM_Int|MEM_IntReal))!=0 ){\n        if( pMem1->u.i < pMem2->u.i ) return -1;\n        if( pMem1->u.i > pMem2->u.i ) return +1;\n        return 0;\n      }else{\n        return -1;\n      }\n    }\n    if( (f1&MEM_Real)!=0 ){\n      if( (f2&(MEM_Int|MEM_IntReal))!=0 ){\n        testcase( f2 & MEM_Int );\n        testcase( f2 & MEM_IntReal );\n        return -sqlite3IntFloatCompare(pMem2->u.i, pMem1->u.r);\n      }else{\n        return -1;\n      }\n    }\n    return +1;\n  }\n\n  /* If one value is a string and the other is a blob, the string is less.\n  ** If both are strings, compare using the collating functions.\n  */\n  if( combined_flags&MEM_Str ){\n    if( (f1 & MEM_Str)==0 ){\n      return 1;\n    }\n    if( (f2 & MEM_Str)==0 ){\n      return -1;\n    }\n\n    assert( pMem1->enc==pMem2->enc || pMem1->db->mallocFailed );\n    assert( pMem1->enc==SQLITE_UTF8 ||\n            pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );\n\n    /* The collation sequence must be defined at this point, even if\n    ** the user deletes the collation sequence after the vdbe program is\n    ** compiled (this was not always the case).\n    */\n    assert( !pColl || pColl->xCmp );\n\n    if( pColl ){\n      return vdbeCompareMemString(pMem1, pMem2, pColl, 0);\n    }\n    /* If a NULL pointer was passed as the collate function, fall through\n    ** to the blob case and use memcmp().  */\n  }\n\n  /* Both values must be blobs.  Compare using memcmp().  */\n  return sqlite3BlobCompare(pMem1, pMem2);\n}\n\n\n/*\n** The first argument passed to this function is a serial-type that\n** corresponds to an integer - all values between 1 and 9 inclusive\n** except 7. The second points to a buffer containing an integer value\n** serialized according to serial_type. This function deserializes\n** and returns the value.\n*/\nstatic i64 vdbeRecordDecodeInt(u32 serial_type, const u8 *aKey){\n  u32 y;\n  assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) );\n  switch( serial_type ){\n    case 0:\n    case 1:\n      testcase( aKey[0]&0x80 );\n      return ONE_BYTE_INT(aKey);\n    case 2:\n      testcase( aKey[0]&0x80 );\n      return TWO_BYTE_INT(aKey);\n    case 3:\n      testcase( aKey[0]&0x80 );\n      return THREE_BYTE_INT(aKey);\n    case 4: {\n      testcase( aKey[0]&0x80 );\n      y = FOUR_BYTE_UINT(aKey);\n      return (i64)*(int*)&y;\n    }\n    case 5: {\n      testcase( aKey[0]&0x80 );\n      return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);\n    }\n    case 6: {\n      u64 x = FOUR_BYTE_UINT(aKey);\n      testcase( aKey[0]&0x80 );\n      x = (x<<32) | FOUR_BYTE_UINT(aKey+4);\n      return (i64)*(i64*)&x;\n    }\n  }\n\n  return (serial_type - 8);\n}\n\n/*\n** This function compares the two table rows or index records\n** specified by {nKey1, pKey1} and pPKey2.  It returns a negative, zero\n** or positive integer if key1 is less than, equal to or\n** greater than key2.  The {nKey1, pKey1} key must be a blob\n** created by the OP_MakeRecord opcode of the VDBE.  The pPKey2\n** key must be a parsed key such as obtained from\n** sqlite3VdbeParseRecord.\n**\n** If argument bSkip is non-zero, it is assumed that the caller has already\n** determined that the first fields of the keys are equal.\n**\n** Key1 and Key2 do not have to contain the same number of fields. If all\n** fields that appear in both keys are equal, then pPKey2->default_rc is\n** returned.\n**\n** If database corruption is discovered, set pPKey2->errCode to\n** SQLITE_CORRUPT and return 0. If an OOM error is encountered,\n** pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the\n** malloc-failed flag set on database handle (pPKey2->pKeyInfo->db).\n*/\nSQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(\n  int nKey1, const void *pKey1,   /* Left key */\n  UnpackedRecord *pPKey2,         /* Right key */\n  int bSkip                       /* If true, skip the first field */\n){\n  u32 d1;                         /* Offset into aKey[] of next data element */\n  int i;                          /* Index of next field to compare */\n  u32 szHdr1;                     /* Size of record header in bytes */\n  u32 idx1;                       /* Offset of first type in header */\n  int rc = 0;                     /* Return value */\n  Mem *pRhs = pPKey2->aMem;       /* Next field of pPKey2 to compare */\n  KeyInfo *pKeyInfo;\n  const unsigned char *aKey1 = (const unsigned char *)pKey1;\n  Mem mem1;\n\n  /* If bSkip is true, then the caller has already determined that the first\n  ** two elements in the keys are equal. Fix the various stack variables so\n  ** that this routine begins comparing at the second field. */\n  if( bSkip ){\n    u32 s1 = aKey1[1];\n    if( s1<0x80 ){\n      idx1 = 2;\n    }else{\n      idx1 = 1 + sqlite3GetVarint32(&aKey1[1], &s1);\n    }\n    szHdr1 = aKey1[0];\n    d1 = szHdr1 + sqlite3VdbeSerialTypeLen(s1);\n    i = 1;\n    pRhs++;\n  }else{\n    if( (szHdr1 = aKey1[0])<0x80 ){\n      idx1 = 1;\n    }else{\n      idx1 = sqlite3GetVarint32(aKey1, &szHdr1);\n    }\n    d1 = szHdr1;\n    i = 0;\n  }\n  if( d1>(unsigned)nKey1 ){\n    pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;\n    return 0;  /* Corruption */\n  }\n\n  VVA_ONLY( mem1.szMalloc = 0; ) /* Only needed by assert() statements */\n  assert( pPKey2->pKeyInfo->nAllField>=pPKey2->nField\n       || CORRUPT_DB );\n  assert( pPKey2->pKeyInfo->aSortFlags!=0 );\n  assert( pPKey2->pKeyInfo->nKeyField>0 );\n  assert( idx1<=szHdr1 || CORRUPT_DB );\n  while( 1 /*exit-by-break*/ ){\n    u32 serial_type;\n\n    /* RHS is an integer */\n    if( pRhs->flags & (MEM_Int|MEM_IntReal) ){\n      testcase( pRhs->flags & MEM_Int );\n      testcase( pRhs->flags & MEM_IntReal );\n      serial_type = aKey1[idx1];\n      testcase( serial_type==12 );\n      if( serial_type>=10 ){\n        rc = serial_type==10 ? -1 : +1;\n      }else if( serial_type==0 ){\n        rc = -1;\n      }else if( serial_type==7 ){\n        serialGet7(&aKey1[d1], &mem1);\n        rc = -sqlite3IntFloatCompare(pRhs->u.i, mem1.u.r);\n      }else{\n        i64 lhs = vdbeRecordDecodeInt(serial_type, &aKey1[d1]);\n        i64 rhs = pRhs->u.i;\n        if( lhs<rhs ){\n          rc = -1;\n        }else if( lhs>rhs ){\n          rc = +1;\n        }\n      }\n    }\n\n    /* RHS is real */\n    else if( pRhs->flags & MEM_Real ){\n      serial_type = aKey1[idx1];\n      if( serial_type>=10 ){\n        /* Serial types 12 or greater are strings and blobs (greater than\n        ** numbers). Types 10 and 11 are currently \"reserved for future\n        ** use\", so it doesn't really matter what the results of comparing\n        ** them to numeric values are.  */\n        rc = serial_type==10 ? -1 : +1;\n      }else if( serial_type==0 ){\n        rc = -1;\n      }else{\n        if( serial_type==7 ){\n          if( serialGet7(&aKey1[d1], &mem1) ){\n            rc = -1;  /* mem1 is a NaN */\n          }else if( mem1.u.r<pRhs->u.r ){\n            rc = -1;\n          }else if( mem1.u.r>pRhs->u.r ){\n            rc = +1;\n          }else{\n            assert( rc==0 );\n          }\n        }else{\n          sqlite3VdbeSerialGet(&aKey1[d1], serial_type, &mem1);\n          rc = sqlite3IntFloatCompare(mem1.u.i, pRhs->u.r);\n        }\n      }\n    }\n\n    /* RHS is a string */\n    else if( pRhs->flags & MEM_Str ){\n      getVarint32NR(&aKey1[idx1], serial_type);\n      testcase( serial_type==12 );\n      if( serial_type<12 ){\n        rc = -1;\n      }else if( !(serial_type & 0x01) ){\n        rc = +1;\n      }else{\n        mem1.n = (serial_type - 12) / 2;\n        testcase( (d1+mem1.n)==(unsigned)nKey1 );\n        testcase( (d1+mem1.n+1)==(unsigned)nKey1 );\n        if( (d1+mem1.n) > (unsigned)nKey1\n         || (pKeyInfo = pPKey2->pKeyInfo)->nAllField<=i\n        ){\n          pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;\n          return 0;                /* Corruption */\n        }else if( pKeyInfo->aColl[i] ){\n          mem1.enc = pKeyInfo->enc;\n          mem1.db = pKeyInfo->db;\n          mem1.flags = MEM_Str;\n          mem1.z = (char*)&aKey1[d1];\n          rc = vdbeCompareMemString(\n              &mem1, pRhs, pKeyInfo->aColl[i], &pPKey2->errCode\n          );\n        }else{\n          int nCmp = MIN(mem1.n, pRhs->n);\n          rc = memcmp(&aKey1[d1], pRhs->z, nCmp);\n          if( rc==0 ) rc = mem1.n - pRhs->n;\n        }\n      }\n    }\n\n    /* RHS is a blob */\n    else if( pRhs->flags & MEM_Blob ){\n      assert( (pRhs->flags & MEM_Zero)==0 || pRhs->n==0 );\n      getVarint32NR(&aKey1[idx1], serial_type);\n      testcase( serial_type==12 );\n      if( serial_type<12 || (serial_type & 0x01) ){\n        rc = -1;\n      }else{\n        int nStr = (serial_type - 12) / 2;\n        testcase( (d1+nStr)==(unsigned)nKey1 );\n        testcase( (d1+nStr+1)==(unsigned)nKey1 );\n        if( (d1+nStr) > (unsigned)nKey1 ){\n          pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;\n          return 0;                /* Corruption */\n        }else if( pRhs->flags & MEM_Zero ){\n          if( !isAllZero((const char*)&aKey1[d1],nStr) ){\n            rc = 1;\n          }else{\n            rc = nStr - pRhs->u.nZero;\n          }\n        }else{\n          int nCmp = MIN(nStr, pRhs->n);\n          rc = memcmp(&aKey1[d1], pRhs->z, nCmp);\n          if( rc==0 ) rc = nStr - pRhs->n;\n        }\n      }\n    }\n\n    /* RHS is null */\n    else{\n      serial_type = aKey1[idx1];\n      if( serial_type==0\n       || serial_type==10\n       || (serial_type==7 && serialGet7(&aKey1[d1], &mem1)!=0)\n      ){\n        assert( rc==0 );\n      }else{\n        rc = 1;\n      }\n    }\n\n    if( rc!=0 ){\n      int sortFlags = pPKey2->pKeyInfo->aSortFlags[i];\n      if( sortFlags ){\n        if( (sortFlags & KEYINFO_ORDER_BIGNULL)==0\n         || ((sortFlags & KEYINFO_ORDER_DESC)\n           !=(serial_type==0 || (pRhs->flags&MEM_Null)))\n        ){\n          rc = -rc;\n        }\n      }\n      assert( vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, rc) );\n      assert( mem1.szMalloc==0 );  /* See comment below */\n      return rc;\n    }\n\n    i++;\n    if( i==pPKey2->nField ) break;\n    pRhs++;\n    d1 += sqlite3VdbeSerialTypeLen(serial_type);\n    if( d1>(unsigned)nKey1 ) break;\n    idx1 += sqlite3VarintLen(serial_type);\n    if( idx1>=(unsigned)szHdr1 ){\n      pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;\n      return 0;  /* Corrupt index */\n    }\n  }\n\n  /* No memory allocation is ever used on mem1.  Prove this using\n  ** the following assert().  If the assert() fails, it indicates a\n  ** memory leak and a need to call sqlite3VdbeMemRelease(&mem1).  */\n  assert( mem1.szMalloc==0 );\n\n  /* rc==0 here means that one or both of the keys ran out of fields and\n  ** all the fields up to that point were equal. Return the default_rc\n  ** value.  */\n  assert( CORRUPT_DB\n       || vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, pPKey2->default_rc)\n       || pPKey2->pKeyInfo->db->mallocFailed\n  );\n  pPKey2->eqSeen = 1;\n  return pPKey2->default_rc;\n}\nSQLITE_PRIVATE int sqlite3VdbeRecordCompare(\n  int nKey1, const void *pKey1,   /* Left key */\n  UnpackedRecord *pPKey2          /* Right key */\n){\n  return sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, pPKey2, 0);\n}\n\n\n/*\n** This function is an optimized version of sqlite3VdbeRecordCompare()\n** that (a) the first field of pPKey2 is an integer, and (b) the\n** size-of-header varint at the start of (pKey1/nKey1) fits in a single\n** byte (i.e. is less than 128).\n**\n** To avoid concerns about buffer overreads, this routine is only used\n** on schemas where the maximum valid header size is 63 bytes or less.\n*/\nstatic int vdbeRecordCompareInt(\n  int nKey1, const void *pKey1, /* Left key */\n  UnpackedRecord *pPKey2        /* Right key */\n){\n  const u8 *aKey = &((const u8*)pKey1)[*(const u8*)pKey1 & 0x3F];\n  int serial_type = ((const u8*)pKey1)[1];\n  int res;\n  u32 y;\n  u64 x;\n  i64 v;\n  i64 lhs;\n\n  vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);\n  assert( (*(u8*)pKey1)<=0x3F || CORRUPT_DB );\n  switch( serial_type ){\n    case 1: { /* 1-byte signed integer */\n      lhs = ONE_BYTE_INT(aKey);\n      testcase( lhs<0 );\n      break;\n    }\n    case 2: { /* 2-byte signed integer */\n      lhs = TWO_BYTE_INT(aKey);\n      testcase( lhs<0 );\n      break;\n    }\n    case 3: { /* 3-byte signed integer */\n      lhs = THREE_BYTE_INT(aKey);\n      testcase( lhs<0 );\n      break;\n    }\n    case 4: { /* 4-byte signed integer */\n      y = FOUR_BYTE_UINT(aKey);\n      lhs = (i64)*(int*)&y;\n      testcase( lhs<0 );\n      break;\n    }\n    case 5: { /* 6-byte signed integer */\n      lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);\n      testcase( lhs<0 );\n      break;\n    }\n    case 6: { /* 8-byte signed integer */\n      x = FOUR_BYTE_UINT(aKey);\n      x = (x<<32) | FOUR_BYTE_UINT(aKey+4);\n      lhs = *(i64*)&x;\n      testcase( lhs<0 );\n      break;\n    }\n    case 8:\n      lhs = 0;\n      break;\n    case 9:\n      lhs = 1;\n      break;\n\n    /* This case could be removed without changing the results of running\n    ** this code. Including it causes gcc to generate a faster switch\n    ** statement (since the range of switch targets now starts at zero and\n    ** is contiguous) but does not cause any duplicate code to be generated\n    ** (as gcc is clever enough to combine the two like cases). Other\n    ** compilers might be similar.  */\n    case 0: case 7:\n      return sqlite3VdbeRecordCompare(nKey1, pKey1, pPKey2);\n\n    default:\n      return sqlite3VdbeRecordCompare(nKey1, pKey1, pPKey2);\n  }\n\n  assert( pPKey2->u.i == pPKey2->aMem[0].u.i );\n  v = pPKey2->u.i;\n  if( v>lhs ){\n    res = pPKey2->r1;\n  }else if( v<lhs ){\n    res = pPKey2->r2;\n  }else if( pPKey2->nField>1 ){\n    /* The first fields of the two keys are equal. Compare the trailing\n    ** fields.  */\n    res = sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, pPKey2, 1);\n  }else{\n    /* The first fields of the two keys are equal and there are no trailing\n    ** fields. Return pPKey2->default_rc in this case. */\n    res = pPKey2->default_rc;\n    pPKey2->eqSeen = 1;\n  }\n\n  assert( vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res) );\n  return res;\n}\n\n/*\n** This function is an optimized version of sqlite3VdbeRecordCompare()\n** that (a) the first field of pPKey2 is a string, that (b) the first field\n** uses the collation sequence BINARY and (c) that the size-of-header varint\n** at the start of (pKey1/nKey1) fits in a single byte.\n*/\nstatic int vdbeRecordCompareString(\n  int nKey1, const void *pKey1, /* Left key */\n  UnpackedRecord *pPKey2        /* Right key */\n){\n  const u8 *aKey1 = (const u8*)pKey1;\n  int serial_type;\n  int res;\n\n  assert( pPKey2->aMem[0].flags & MEM_Str );\n  assert( pPKey2->aMem[0].n == pPKey2->n );\n  assert( pPKey2->aMem[0].z == pPKey2->u.z );\n  vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);\n  serial_type = (signed char)(aKey1[1]);\n\nvrcs_restart:\n  if( serial_type<12 ){\n    if( serial_type<0 ){\n      sqlite3GetVarint32(&aKey1[1], (u32*)&serial_type);\n      if( serial_type>=12 ) goto vrcs_restart;\n      assert( CORRUPT_DB );\n    }\n    res = pPKey2->r1;      /* (pKey1/nKey1) is a number or a null */\n  }else if( !(serial_type & 0x01) ){\n    res = pPKey2->r2;      /* (pKey1/nKey1) is a blob */\n  }else{\n    int nCmp;\n    int nStr;\n    int szHdr = aKey1[0];\n\n    nStr = (serial_type-12) / 2;\n    if( (szHdr + nStr) > nKey1 ){\n      pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;\n      return 0;    /* Corruption */\n    }\n    nCmp = MIN( pPKey2->n, nStr );\n    res = memcmp(&aKey1[szHdr], pPKey2->u.z, nCmp);\n\n    if( res>0 ){\n      res = pPKey2->r2;\n    }else if( res<0 ){\n      res = pPKey2->r1;\n    }else{\n      res = nStr - pPKey2->n;\n      if( res==0 ){\n        if( pPKey2->nField>1 ){\n          res = sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, pPKey2, 1);\n        }else{\n          res = pPKey2->default_rc;\n          pPKey2->eqSeen = 1;\n        }\n      }else if( res>0 ){\n        res = pPKey2->r2;\n      }else{\n        res = pPKey2->r1;\n      }\n    }\n  }\n\n  assert( vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res)\n       || CORRUPT_DB\n       || pPKey2->pKeyInfo->db->mallocFailed\n  );\n  return res;\n}\n\n/*\n** Return a pointer to an sqlite3VdbeRecordCompare() compatible function\n** suitable for comparing serialized records to the unpacked record passed\n** as the only argument.\n*/\nSQLITE_PRIVATE RecordCompare sqlite3VdbeFindCompare(UnpackedRecord *p){\n  /* varintRecordCompareInt() and varintRecordCompareString() both assume\n  ** that the size-of-header varint that occurs at the start of each record\n  ** fits in a single byte (i.e. is 127 or less). varintRecordCompareInt()\n  ** also assumes that it is safe to overread a buffer by at least the\n  ** maximum possible legal header size plus 8 bytes. Because there is\n  ** guaranteed to be at least 74 (but not 136) bytes of padding following each\n  ** buffer passed to varintRecordCompareInt() this makes it convenient to\n  ** limit the size of the header to 64 bytes in cases where the first field\n  ** is an integer.\n  **\n  ** The easiest way to enforce this limit is to consider only records with\n  ** 13 fields or less. If the first field is an integer, the maximum legal\n  ** header size is (12*5 + 1 + 1) bytes.  */\n  assert( p->pKeyInfo->aSortFlags!=0 );\n  if( p->pKeyInfo->nAllField<=13 ){\n    int flags = p->aMem[0].flags;\n    if( p->pKeyInfo->aSortFlags[0] ){\n      if( p->pKeyInfo->aSortFlags[0] & KEYINFO_ORDER_BIGNULL ){\n        return sqlite3VdbeRecordCompare;\n      }\n      p->r1 = 1;\n      p->r2 = -1;\n    }else{\n      p->r1 = -1;\n      p->r2 = 1;\n    }\n    if( (flags & MEM_Int) ){\n      p->u.i = p->aMem[0].u.i;\n      return vdbeRecordCompareInt;\n    }\n    testcase( flags & MEM_Real );\n    testcase( flags & MEM_Null );\n    testcase( flags & MEM_Blob );\n    if( (flags & (MEM_Real|MEM_IntReal|MEM_Null|MEM_Blob))==0\n     && p->pKeyInfo->aColl[0]==0\n    ){\n      assert( flags & MEM_Str );\n      p->u.z = p->aMem[0].z;\n      p->n = p->aMem[0].n;\n      return vdbeRecordCompareString;\n    }\n  }\n\n  return sqlite3VdbeRecordCompare;\n}\n\n/*\n** pCur points at an index entry created using the OP_MakeRecord opcode.\n** Read the rowid (the last field in the record) and store it in *rowid.\n** Return SQLITE_OK if everything works, or an error code otherwise.\n**\n** pCur might be pointing to text obtained from a corrupt database file.\n** So the content cannot be trusted.  Do appropriate checks on the content.\n*/\nSQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){\n  i64 nCellKey = 0;\n  int rc;\n  u32 szHdr;        /* Size of the header */\n  u32 typeRowid;    /* Serial type of the rowid */\n  u32 lenRowid;     /* Size of the rowid */\n  Mem m, v;\n\n  /* Get the size of the index entry.  Only indices entries of less\n  ** than 2GiB are support - anything large must be database corruption.\n  ** Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so\n  ** this code can safely assume that nCellKey is 32-bits\n  */\n  assert( sqlite3BtreeCursorIsValid(pCur) );\n  nCellKey = sqlite3BtreePayloadSize(pCur);\n  assert( (nCellKey & SQLITE_MAX_U32)==(u64)nCellKey );\n\n  /* Read in the complete content of the index entry */\n  sqlite3VdbeMemInit(&m, db, 0);\n  rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);\n  if( rc ){\n    return rc;\n  }\n\n  /* The index entry must begin with a header size */\n  getVarint32NR((u8*)m.z, szHdr);\n  testcase( szHdr==3 );\n  testcase( szHdr==(u32)m.n );\n  testcase( szHdr>0x7fffffff );\n  assert( m.n>=0 );\n  if( unlikely(szHdr<3 || szHdr>(unsigned)m.n) ){\n    goto idx_rowid_corruption;\n  }\n\n  /* The last field of the index should be an integer - the ROWID.\n  ** Verify that the last entry really is an integer. */\n  getVarint32NR((u8*)&m.z[szHdr-1], typeRowid);\n  testcase( typeRowid==1 );\n  testcase( typeRowid==2 );\n  testcase( typeRowid==3 );\n  testcase( typeRowid==4 );\n  testcase( typeRowid==5 );\n  testcase( typeRowid==6 );\n  testcase( typeRowid==8 );\n  testcase( typeRowid==9 );\n  if( unlikely(typeRowid<1 || typeRowid>9 || typeRowid==7) ){\n    goto idx_rowid_corruption;\n  }\n  lenRowid = sqlite3SmallTypeSizes[typeRowid];\n  testcase( (u32)m.n==szHdr+lenRowid );\n  if( unlikely((u32)m.n<szHdr+lenRowid) ){\n    goto idx_rowid_corruption;\n  }\n\n  /* Fetch the integer off the end of the index record */\n  sqlite3VdbeSerialGet((u8*)&m.z[m.n-lenRowid], typeRowid, &v);\n  *rowid = v.u.i;\n  sqlite3VdbeMemReleaseMalloc(&m);\n  return SQLITE_OK;\n\n  /* Jump here if database corruption is detected after m has been\n  ** allocated.  Free the m object and return SQLITE_CORRUPT. */\nidx_rowid_corruption:\n  testcase( m.szMalloc!=0 );\n  sqlite3VdbeMemReleaseMalloc(&m);\n  return SQLITE_CORRUPT_BKPT;\n}\n\n/*\n** Compare the key of the index entry that cursor pC is pointing to against\n** the key string in pUnpacked.  Write into *pRes a number\n** that is negative, zero, or positive if pC is less than, equal to,\n** or greater than pUnpacked.  Return SQLITE_OK on success.\n**\n** pUnpacked is either created without a rowid or is truncated so that it\n** omits the rowid at the end.  The rowid at the end of the index entry\n** is ignored as well.  Hence, this routine only compares the prefixes\n** of the keys prior to the final rowid, not the entire key.\n*/\nSQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(\n  sqlite3 *db,                     /* Database connection */\n  VdbeCursor *pC,                  /* The cursor to compare against */\n  UnpackedRecord *pUnpacked,       /* Unpacked version of key */\n  int *res                         /* Write the comparison result here */\n){\n  i64 nCellKey = 0;\n  int rc;\n  BtCursor *pCur;\n  Mem m;\n\n  assert( pC->eCurType==CURTYPE_BTREE );\n  pCur = pC->uc.pCursor;\n  assert( sqlite3BtreeCursorIsValid(pCur) );\n  nCellKey = sqlite3BtreePayloadSize(pCur);\n  /* nCellKey will always be between 0 and 0xffffffff because of the way\n  ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */\n  if( nCellKey<=0 || nCellKey>0x7fffffff ){\n    *res = 0;\n    return SQLITE_CORRUPT_BKPT;\n  }\n  sqlite3VdbeMemInit(&m, db, 0);\n  rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);\n  if( rc ){\n    return rc;\n  }\n  *res = sqlite3VdbeRecordCompareWithSkip(m.n, m.z, pUnpacked, 0);\n  sqlite3VdbeMemReleaseMalloc(&m);\n  return SQLITE_OK;\n}\n\n/*\n** This routine sets the value to be returned by subsequent calls to\n** sqlite3_changes() on the database handle 'db'.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, i64 nChange){\n  assert( sqlite3_mutex_held(db->mutex) );\n  db->nChange = nChange;\n  db->nTotalChange += nChange;\n}\n\n/*\n** Set a flag in the vdbe to update the change counter when it is finalised\n** or reset.\n*/\nSQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe *v){\n  v->changeCntOn = 1;\n}\n\n/*\n** Mark every prepared statement associated with a database connection\n** as expired.\n**\n** An expired statement means that recompilation of the statement is\n** recommend.  Statements expire when things happen that make their\n** programs obsolete.  Removing user-defined functions or collating\n** sequences, or changing an authorization function are the types of\n** things that make prepared statements obsolete.\n**\n** If iCode is 1, then expiration is advisory.  The statement should\n** be reprepared before being restarted, but if it is already running\n** it is allowed to run to completion.\n**\n** Internally, this function just sets the Vdbe.expired flag on all\n** prepared statements.  The flag is set to 1 for an immediate expiration\n** and set to 2 for an advisory expiration.\n*/\nSQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db, int iCode){\n  Vdbe *p;\n  for(p = db->pVdbe; p; p=p->pVNext){\n    p->expired = iCode+1;\n  }\n}\n\n/*\n** Return the database associated with the Vdbe.\n*/\nSQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){\n  return v->db;\n}\n\n/*\n** Return the SQLITE_PREPARE flags for a Vdbe.\n*/\nSQLITE_PRIVATE u8 sqlite3VdbePrepareFlags(Vdbe *v){\n  return v->prepFlags;\n}\n\n/*\n** Return a pointer to an sqlite3_value structure containing the value bound\n** parameter iVar of VM v. Except, if the value is an SQL NULL, return\n** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*\n** constants) to the value before returning it.\n**\n** The returned value must be freed by the caller using sqlite3ValueFree().\n*/\nSQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe *v, int iVar, u8 aff){\n  assert( iVar>0 );\n  if( v ){\n    Mem *pMem = &v->aVar[iVar-1];\n    assert( (v->db->flags & SQLITE_EnableQPSG)==0\n         || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 );\n    if( 0==(pMem->flags & MEM_Null) ){\n      sqlite3_value *pRet = sqlite3ValueNew(v->db);\n      if( pRet ){\n        sqlite3VdbeMemCopy((Mem *)pRet, pMem);\n        sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8);\n      }\n      return pRet;\n    }\n  }\n  return 0;\n}\n\n/*\n** Configure SQL variable iVar so that binding a new value to it signals\n** to sqlite3_reoptimize() that re-preparing the statement may result\n** in a better query plan.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){\n  assert( iVar>0 );\n  assert( (v->db->flags & SQLITE_EnableQPSG)==0\n       || (v->db->mDbFlags & DBFLAG_InternalFunc)!=0 );\n  if( iVar>=32 ){\n    v->expmask |= 0x80000000;\n  }else{\n    v->expmask |= ((u32)1 << (iVar-1));\n  }\n}\n\n#ifndef SQLITE_OMIT_DATETIME_FUNCS\n/*\n** Cause a function to throw an error if it was call from OP_PureFunc\n** rather than OP_Function.\n**\n** OP_PureFunc means that the function must be deterministic, and should\n** throw an error if it is given inputs that would make it non-deterministic.\n** This routine is invoked by date/time functions that use non-deterministic\n** features such as 'now'.\n*/\nSQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context *pCtx){\n  const VdbeOp *pOp;\n#ifdef SQLITE_ENABLE_STAT4\n  if( pCtx->pVdbe==0 ) return 1;\n#endif\n  pOp = pCtx->pVdbe->aOp + pCtx->iOp;\n  if( pOp->opcode==OP_PureFunc ){\n    const char *zContext;\n    char *zMsg;\n    if( pOp->p5 & NC_IsCheck ){\n      zContext = \"a CHECK constraint\";\n    }else if( pOp->p5 & NC_GenCol ){\n      zContext = \"a generated column\";\n    }else{\n      zContext = \"an index\";\n    }\n    zMsg = sqlite3_mprintf(\"non-deterministic use of %s() in %s\",\n                           pCtx->pFunc->zName, zContext);\n    sqlite3_result_error(pCtx, zMsg, -1);\n    sqlite3_free(zMsg);\n    return 0;\n  }\n  return 1;\n}\n#endif /* SQLITE_OMIT_DATETIME_FUNCS */\n\n#if defined(SQLITE_ENABLE_CURSOR_HINTS) && defined(SQLITE_DEBUG)\n/*\n** This Walker callback is used to help verify that calls to\n** sqlite3BtreeCursorHint() with opcode BTREE_HINT_RANGE have\n** byte-code register values correctly initialized.\n*/\nSQLITE_PRIVATE int sqlite3CursorRangeHintExprCheck(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_REGISTER ){\n    assert( (pWalker->u.aMem[pExpr->iTable].flags & MEM_Undefined)==0 );\n  }\n  return WRC_Continue;\n}\n#endif /* SQLITE_ENABLE_CURSOR_HINTS && SQLITE_DEBUG */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored\n** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored\n** in memory obtained from sqlite3DbMalloc).\n*/\nSQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){\n  if( pVtab->zErrMsg ){\n    sqlite3 *db = p->db;\n    sqlite3DbFree(db, p->zErrMsg);\n    p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);\n    sqlite3_free(pVtab->zErrMsg);\n    pVtab->zErrMsg = 0;\n  }\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n\n/*\n** If the second argument is not NULL, release any allocations associated\n** with the memory cells in the p->aMem[] array. Also free the UnpackedRecord\n** structure itself, using sqlite3DbFree().\n**\n** This function is used to free UnpackedRecord structures allocated by\n** the vdbeUnpackRecord() function found in vdbeapi.c.\n*/\nstatic void vdbeFreeUnpacked(sqlite3 *db, int nField, UnpackedRecord *p){\n  assert( db!=0 );\n  if( p ){\n    int i;\n    for(i=0; i<nField; i++){\n      Mem *pMem = &p->aMem[i];\n      if( pMem->zMalloc ) sqlite3VdbeMemReleaseMalloc(pMem);\n    }\n    sqlite3DbNNFreeNN(db, p);\n  }\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** Invoke the pre-update hook. If this is an UPDATE or DELETE pre-update call,\n** then cursor passed as the second argument should point to the row about\n** to be update or deleted. If the application calls sqlite3_preupdate_old(),\n** the required value will be read from the row the cursor points to.\n*/\nSQLITE_PRIVATE void sqlite3VdbePreUpdateHook(\n  Vdbe *v,                        /* Vdbe pre-update hook is invoked by */\n  VdbeCursor *pCsr,               /* Cursor to grab old.* values from */\n  int op,                         /* SQLITE_INSERT, UPDATE or DELETE */\n  const char *zDb,                /* Database name */\n  Table *pTab,                    /* Modified table */\n  i64 iKey1,                      /* Initial key value */\n  int iReg,                       /* Register for new.* record */\n  int iBlobWrite\n){\n  sqlite3 *db = v->db;\n  i64 iKey2;\n  PreUpdate preupdate;\n  const char *zTbl = pTab->zName;\n#ifdef SQLITE_DEBUG\n  int nRealCol;\n  if( pTab->tabFlags & TF_WithoutRowid ){\n    nRealCol = sqlite3PrimaryKeyIndex(pTab)->nColumn;\n  }else if( pTab->tabFlags & TF_HasVirtual ){\n    nRealCol = pTab->nNVCol;\n  }else{\n    nRealCol = pTab->nCol;\n  }\n#endif\n\n  assert( db->pPreUpdate==0 );\n  memset(&preupdate, 0, sizeof(PreUpdate));\n  if( HasRowid(pTab)==0 ){\n    iKey1 = iKey2 = 0;\n    preupdate.pPk = sqlite3PrimaryKeyIndex(pTab);\n  }else{\n    if( op==SQLITE_UPDATE ){\n      iKey2 = v->aMem[iReg].u.i;\n    }else{\n      iKey2 = iKey1;\n    }\n  }\n\n  assert( pCsr!=0 );\n  assert( pCsr->eCurType==CURTYPE_BTREE );\n  assert( pCsr->nField==nRealCol\n       || (pCsr->nField==nRealCol+1 && op==SQLITE_DELETE && iReg==-1)\n  );\n\n  preupdate.v = v;\n  preupdate.pCsr = pCsr;\n  preupdate.op = op;\n  preupdate.iNewReg = iReg;\n  preupdate.pKeyinfo = (KeyInfo*)&preupdate.uKey;\n  preupdate.pKeyinfo->db = db;\n  preupdate.pKeyinfo->enc = ENC(db);\n  preupdate.pKeyinfo->nKeyField = pTab->nCol;\n  preupdate.pKeyinfo->aSortFlags = 0; /* Indicate .aColl, .nAllField uninit */\n  preupdate.iKey1 = iKey1;\n  preupdate.iKey2 = iKey2;\n  preupdate.pTab = pTab;\n  preupdate.iBlobWrite = iBlobWrite;\n\n  db->pPreUpdate = &preupdate;\n  db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);\n  db->pPreUpdate = 0;\n  sqlite3DbFree(db, preupdate.aRecord);\n  vdbeFreeUnpacked(db, preupdate.pKeyinfo->nKeyField+1,preupdate.pUnpacked);\n  vdbeFreeUnpacked(db, preupdate.pKeyinfo->nKeyField+1,preupdate.pNewUnpacked);\n  sqlite3VdbeMemRelease(&preupdate.oldipk);\n  if( preupdate.aNew ){\n    int i;\n    for(i=0; i<pCsr->nField; i++){\n      sqlite3VdbeMemRelease(&preupdate.aNew[i]);\n    }\n    sqlite3DbNNFreeNN(db, preupdate.aNew);\n  }\n  if( preupdate.apDflt ){\n    int i;\n    for(i=0; i<pTab->nCol; i++){\n      sqlite3ValueFree(preupdate.apDflt[i]);\n    }\n    sqlite3DbFree(db, preupdate.apDflt);\n  }\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_PERCENTILE\n/*\n** Return the name of an SQL function associated with the sqlite3_context.\n*/\nSQLITE_PRIVATE const char *sqlite3VdbeFuncName(const sqlite3_context *pCtx){\n  assert( pCtx!=0 );\n  assert( pCtx->pFunc!=0 );\n  return pCtx->pFunc->zName;\n}\n#endif /* SQLITE_ENABLE_PERCENTILE */\n\n/************** End of vdbeaux.c *********************************************/\n/************** Begin file vdbeapi.c *****************************************/\n/*\n** 2004 May 26\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code use to implement APIs that are part of the\n** VDBE.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n/* #include \"opcodes.h\" */\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Return TRUE (non-zero) of the statement supplied as an argument needs\n** to be recompiled.  A statement needs to be recompiled whenever the\n** execution environment changes in a way that would alter the program\n** that sqlite3_prepare() generates.  For example, if new functions or\n** collating sequences are registered or if an authorizer function is\n** added or changed.\n*/\nSQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){\n  Vdbe *p = (Vdbe*)pStmt;\n  return p==0 || p->expired;\n}\n#endif\n\n/*\n** Check on a Vdbe to make sure it has not been finalized.  Log\n** an error and return true if it has been finalized (or is otherwise\n** invalid).  Return false if it is ok.\n*/\nstatic int vdbeSafety(Vdbe *p){\n  if( p->db==0 ){\n    sqlite3_log(SQLITE_MISUSE, \"API called with finalized prepared statement\");\n    return 1;\n  }else{\n    return 0;\n  }\n}\nstatic int vdbeSafetyNotNull(Vdbe *p){\n  if( p==0 ){\n    sqlite3_log(SQLITE_MISUSE, \"API called with NULL prepared statement\");\n    return 1;\n  }else{\n    return vdbeSafety(p);\n  }\n}\n\n#ifndef SQLITE_OMIT_TRACE\n/*\n** Invoke the profile callback.  This routine is only called if we already\n** know that the profile callback is defined and needs to be invoked.\n*/\nstatic SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){\n  sqlite3_int64 iNow;\n  sqlite3_int64 iElapse;\n  assert( p->startTime>0 );\n  assert( db->init.busy==0 );\n  assert( p->zSql!=0 );\n  sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);\n  iElapse = (iNow - p->startTime)*1000000;\n#ifndef SQLITE_OMIT_DEPRECATED\n  if( db->xProfile ){\n    db->xProfile(db->pProfileArg, p->zSql, iElapse);\n  }\n#endif\n  if( db->mTrace & SQLITE_TRACE_PROFILE ){\n    db->trace.xV2(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse);\n  }\n  p->startTime = 0;\n}\n/*\n** The checkProfileCallback(DB,P) macro checks to see if a profile callback\n** is needed, and it invokes the callback if it is needed.\n*/\n# define checkProfileCallback(DB,P) \\\n   if( ((P)->startTime)>0 ){ invokeProfileCallback(DB,P); }\n#else\n# define checkProfileCallback(DB,P)  /*no-op*/\n#endif\n\n/*\n** The following routine destroys a virtual machine that is created by\n** the sqlite3_compile() routine. The integer returned is an SQLITE_\n** success/failure code that describes the result of executing the virtual\n** machine.\n**\n** This routine sets the error code and string returned by\n** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().\n*/\nSQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){\n  int rc;\n  if( pStmt==0 ){\n    /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL\n    ** pointer is a harmless no-op. */\n    rc = SQLITE_OK;\n  }else{\n    Vdbe *v = (Vdbe*)pStmt;\n    sqlite3 *db = v->db;\n    if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;\n    sqlite3_mutex_enter(db->mutex);\n    checkProfileCallback(db, v);\n    assert( v->eVdbeState>=VDBE_READY_STATE );\n    rc = sqlite3VdbeReset(v);\n    sqlite3VdbeDelete(v);\n    rc = sqlite3ApiExit(db, rc);\n    sqlite3LeaveMutexAndCloseZombie(db);\n  }\n  return rc;\n}\n\n/*\n** Terminate the current execution of an SQL statement and reset it\n** back to its starting state so that it can be reused. A success code from\n** the prior execution is returned.\n**\n** This routine sets the error code and string returned by\n** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().\n*/\nSQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){\n  int rc;\n  if( pStmt==0 ){\n    rc = SQLITE_OK;\n  }else{\n    Vdbe *v = (Vdbe*)pStmt;\n    sqlite3 *db = v->db;\n    sqlite3_mutex_enter(db->mutex);\n    checkProfileCallback(db, v);\n    rc = sqlite3VdbeReset(v);\n    sqlite3VdbeRewind(v);\n    assert( (rc & (db->errMask))==rc );\n    rc = sqlite3ApiExit(db, rc);\n    sqlite3_mutex_leave(db->mutex);\n  }\n  return rc;\n}\n\n/*\n** Set all the parameters in the compiled SQL statement to NULL.\n*/\nSQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){\n  int i;\n  int rc = SQLITE_OK;\n  Vdbe *p = (Vdbe*)pStmt;\n#if SQLITE_THREADSAFE\n  sqlite3_mutex *mutex;\n#endif\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pStmt==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n#if SQLITE_THREADSAFE\n  mutex = p->db->mutex;\n#endif\n  sqlite3_mutex_enter(mutex);\n  for(i=0; i<p->nVar; i++){\n    sqlite3VdbeMemRelease(&p->aVar[i]);\n    p->aVar[i].flags = MEM_Null;\n  }\n  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || p->expmask==0 );\n  if( p->expmask ){\n    p->expired = 1;\n  }\n  sqlite3_mutex_leave(mutex);\n  return rc;\n}\n\n\n/**************************** sqlite3_value_  *******************************\n** The following routines extract information from a Mem or sqlite3_value\n** structure.\n*/\nSQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){\n  Mem *p = (Mem*)pVal;\n  if( p->flags & (MEM_Blob|MEM_Str) ){\n    if( ExpandBlob(p)!=SQLITE_OK ){\n      assert( p->flags==MEM_Null && p->z==0 );\n      return 0;\n    }\n    p->flags |= MEM_Blob;\n    return p->n ? p->z : 0;\n  }else{\n    return sqlite3_value_text(pVal);\n  }\n}\nSQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){\n  return sqlite3ValueBytes(pVal, SQLITE_UTF8);\n}\nSQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){\n  return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);\n}\nSQLITE_API double sqlite3_value_double(sqlite3_value *pVal){\n  return sqlite3VdbeRealValue((Mem*)pVal);\n}\nSQLITE_API int sqlite3_value_int(sqlite3_value *pVal){\n  return (int)sqlite3VdbeIntValue((Mem*)pVal);\n}\nSQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){\n  return sqlite3VdbeIntValue((Mem*)pVal);\n}\nSQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value *pVal){\n  Mem *pMem = (Mem*)pVal;\n  return ((pMem->flags & MEM_Subtype) ? pMem->eSubtype : 0);\n}\nSQLITE_API void *sqlite3_value_pointer(sqlite3_value *pVal, const char *zPType){\n  Mem *p = (Mem*)pVal;\n  if( (p->flags&(MEM_TypeMask|MEM_Term|MEM_Subtype)) ==\n                 (MEM_Null|MEM_Term|MEM_Subtype)\n   && zPType!=0\n   && p->eSubtype=='p'\n   && strcmp(p->u.zPType, zPType)==0\n  ){\n    return (void*)p->z;\n  }else{\n    return 0;\n  }\n}\nSQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){\n  return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){\n  return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);\n}\nSQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){\n  return sqlite3ValueText(pVal, SQLITE_UTF16BE);\n}\nSQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){\n  return sqlite3ValueText(pVal, SQLITE_UTF16LE);\n}\n#endif /* SQLITE_OMIT_UTF16 */\n/* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five\n** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating\n** point number string BLOB NULL\n*/\nSQLITE_API int sqlite3_value_type(sqlite3_value* pVal){\n  static const u8 aType[] = {\n     SQLITE_BLOB,     /* 0x00 (not possible) */\n     SQLITE_NULL,     /* 0x01 NULL */\n     SQLITE_TEXT,     /* 0x02 TEXT */\n     SQLITE_NULL,     /* 0x03 (not possible) */\n     SQLITE_INTEGER,  /* 0x04 INTEGER */\n     SQLITE_NULL,     /* 0x05 (not possible) */\n     SQLITE_INTEGER,  /* 0x06 INTEGER + TEXT */\n     SQLITE_NULL,     /* 0x07 (not possible) */\n     SQLITE_FLOAT,    /* 0x08 FLOAT */\n     SQLITE_NULL,     /* 0x09 (not possible) */\n     SQLITE_FLOAT,    /* 0x0a FLOAT + TEXT */\n     SQLITE_NULL,     /* 0x0b (not possible) */\n     SQLITE_INTEGER,  /* 0x0c (not possible) */\n     SQLITE_NULL,     /* 0x0d (not possible) */\n     SQLITE_INTEGER,  /* 0x0e (not possible) */\n     SQLITE_NULL,     /* 0x0f (not possible) */\n     SQLITE_BLOB,     /* 0x10 BLOB */\n     SQLITE_NULL,     /* 0x11 (not possible) */\n     SQLITE_TEXT,     /* 0x12 (not possible) */\n     SQLITE_NULL,     /* 0x13 (not possible) */\n     SQLITE_INTEGER,  /* 0x14 INTEGER + BLOB */\n     SQLITE_NULL,     /* 0x15 (not possible) */\n     SQLITE_INTEGER,  /* 0x16 (not possible) */\n     SQLITE_NULL,     /* 0x17 (not possible) */\n     SQLITE_FLOAT,    /* 0x18 FLOAT + BLOB */\n     SQLITE_NULL,     /* 0x19 (not possible) */\n     SQLITE_FLOAT,    /* 0x1a (not possible) */\n     SQLITE_NULL,     /* 0x1b (not possible) */\n     SQLITE_INTEGER,  /* 0x1c (not possible) */\n     SQLITE_NULL,     /* 0x1d (not possible) */\n     SQLITE_INTEGER,  /* 0x1e (not possible) */\n     SQLITE_NULL,     /* 0x1f (not possible) */\n     SQLITE_FLOAT,    /* 0x20 INTREAL */\n     SQLITE_NULL,     /* 0x21 (not possible) */\n     SQLITE_FLOAT,    /* 0x22 INTREAL + TEXT */\n     SQLITE_NULL,     /* 0x23 (not possible) */\n     SQLITE_FLOAT,    /* 0x24 (not possible) */\n     SQLITE_NULL,     /* 0x25 (not possible) */\n     SQLITE_FLOAT,    /* 0x26 (not possible) */\n     SQLITE_NULL,     /* 0x27 (not possible) */\n     SQLITE_FLOAT,    /* 0x28 (not possible) */\n     SQLITE_NULL,     /* 0x29 (not possible) */\n     SQLITE_FLOAT,    /* 0x2a (not possible) */\n     SQLITE_NULL,     /* 0x2b (not possible) */\n     SQLITE_FLOAT,    /* 0x2c (not possible) */\n     SQLITE_NULL,     /* 0x2d (not possible) */\n     SQLITE_FLOAT,    /* 0x2e (not possible) */\n     SQLITE_NULL,     /* 0x2f (not possible) */\n     SQLITE_BLOB,     /* 0x30 (not possible) */\n     SQLITE_NULL,     /* 0x31 (not possible) */\n     SQLITE_TEXT,     /* 0x32 (not possible) */\n     SQLITE_NULL,     /* 0x33 (not possible) */\n     SQLITE_FLOAT,    /* 0x34 (not possible) */\n     SQLITE_NULL,     /* 0x35 (not possible) */\n     SQLITE_FLOAT,    /* 0x36 (not possible) */\n     SQLITE_NULL,     /* 0x37 (not possible) */\n     SQLITE_FLOAT,    /* 0x38 (not possible) */\n     SQLITE_NULL,     /* 0x39 (not possible) */\n     SQLITE_FLOAT,    /* 0x3a (not possible) */\n     SQLITE_NULL,     /* 0x3b (not possible) */\n     SQLITE_FLOAT,    /* 0x3c (not possible) */\n     SQLITE_NULL,     /* 0x3d (not possible) */\n     SQLITE_FLOAT,    /* 0x3e (not possible) */\n     SQLITE_NULL,     /* 0x3f (not possible) */\n  };\n#ifdef SQLITE_DEBUG\n  {\n    int eType = SQLITE_BLOB;\n    if( pVal->flags & MEM_Null ){\n      eType = SQLITE_NULL;\n    }else if( pVal->flags & (MEM_Real|MEM_IntReal) ){\n      eType = SQLITE_FLOAT;\n    }else if( pVal->flags & MEM_Int ){\n      eType = SQLITE_INTEGER;\n    }else if( pVal->flags & MEM_Str ){\n      eType = SQLITE_TEXT;\n    }\n    assert( eType == aType[pVal->flags&MEM_AffMask] );\n  }\n#endif\n  return aType[pVal->flags&MEM_AffMask];\n}\nSQLITE_API int sqlite3_value_encoding(sqlite3_value *pVal){\n  return pVal->enc;\n}\n\n/* Return true if a parameter to xUpdate represents an unchanged column */\nSQLITE_API int sqlite3_value_nochange(sqlite3_value *pVal){\n  return (pVal->flags&(MEM_Null|MEM_Zero))==(MEM_Null|MEM_Zero);\n}\n\n/* Return true if a parameter value originated from an sqlite3_bind() */\nSQLITE_API int sqlite3_value_frombind(sqlite3_value *pVal){\n  return (pVal->flags&MEM_FromBind)!=0;\n}\n\n/* Make a copy of an sqlite3_value object\n*/\nSQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){\n  sqlite3_value *pNew;\n  if( pOrig==0 ) return 0;\n  pNew = sqlite3_malloc( sizeof(*pNew) );\n  if( pNew==0 ) return 0;\n  memset(pNew, 0, sizeof(*pNew));\n  memcpy(pNew, pOrig, MEMCELLSIZE);\n  pNew->flags &= ~MEM_Dyn;\n  pNew->db = 0;\n  if( pNew->flags&(MEM_Str|MEM_Blob) ){\n    pNew->flags &= ~(MEM_Static|MEM_Dyn);\n    pNew->flags |= MEM_Ephem;\n    if( sqlite3VdbeMemMakeWriteable(pNew)!=SQLITE_OK ){\n      sqlite3ValueFree(pNew);\n      pNew = 0;\n    }\n  }else if( pNew->flags & MEM_Null ){\n    /* Do not duplicate pointer values */\n    pNew->flags &= ~(MEM_Term|MEM_Subtype);\n  }\n  return pNew;\n}\n\n/* Destroy an sqlite3_value object previously obtained from\n** sqlite3_value_dup().\n*/\nSQLITE_API void sqlite3_value_free(sqlite3_value *pOld){\n  sqlite3ValueFree(pOld);\n}\n\n\n/**************************** sqlite3_result_  *******************************\n** The following routines are used by user-defined functions to specify\n** the function result.\n**\n** The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the\n** result as a string or blob.  Appropriate errors are set if the string/blob\n** is too big or if an OOM occurs.\n**\n** The invokeValueDestructor(P,X) routine invokes destructor function X()\n** on value P if P is not going to be used and need to be destroyed.\n*/\nstatic void setResultStrOrError(\n  sqlite3_context *pCtx,  /* Function context */\n  const char *z,          /* String pointer */\n  int n,                  /* Bytes in string, or negative */\n  u8 enc,                 /* Encoding of z.  0 for BLOBs */\n  void (*xDel)(void*)     /* Destructor function */\n){\n  Mem *pOut = pCtx->pOut;\n  int rc = sqlite3VdbeMemSetStr(pOut, z, n, enc, xDel);\n  if( rc ){\n    if( rc==SQLITE_TOOBIG ){\n      sqlite3_result_error_toobig(pCtx);\n    }else{\n      /* The only errors possible from sqlite3VdbeMemSetStr are\n      ** SQLITE_TOOBIG and SQLITE_NOMEM */\n      assert( rc==SQLITE_NOMEM );\n      sqlite3_result_error_nomem(pCtx);\n    }\n    return;\n  }\n  sqlite3VdbeChangeEncoding(pOut, pCtx->enc);\n  if( sqlite3VdbeMemTooBig(pOut) ){\n    sqlite3_result_error_toobig(pCtx);\n  }\n}\nstatic int invokeValueDestructor(\n  const void *p,             /* Value to destroy */\n  void (*xDel)(void*),       /* The destructor */\n  sqlite3_context *pCtx      /* Set a SQLITE_TOOBIG error if not NULL */\n){\n  assert( xDel!=SQLITE_DYNAMIC );\n  if( xDel==0 ){\n    /* noop */\n  }else if( xDel==SQLITE_TRANSIENT ){\n    /* noop */\n  }else{\n    xDel((void*)p);\n  }\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx!=0 ){\n    sqlite3_result_error_toobig(pCtx);\n  }\n#else\n  assert( pCtx!=0 );\n  sqlite3_result_error_toobig(pCtx);\n#endif\n  return SQLITE_TOOBIG;\n}\nSQLITE_API void sqlite3_result_blob(\n  sqlite3_context *pCtx,\n  const void *z,\n  int n,\n  void (*xDel)(void *)\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 || n<0 ){\n    invokeValueDestructor(z, xDel, pCtx);\n    return;\n  }\n#endif\n  assert( n>=0 );\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  setResultStrOrError(pCtx, z, n, 0, xDel);\n}\nSQLITE_API void sqlite3_result_blob64(\n  sqlite3_context *pCtx,\n  const void *z,\n  sqlite3_uint64 n,\n  void (*xDel)(void *)\n){\n  assert( xDel!=SQLITE_DYNAMIC );\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ){\n    invokeValueDestructor(z, xDel, 0);\n    return;\n  }\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  if( n>0x7fffffff ){\n    (void)invokeValueDestructor(z, xDel, pCtx);\n  }else{\n    setResultStrOrError(pCtx, z, (int)n, 0, xDel);\n  }\n}\nSQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemSetDouble(pCtx->pOut, rVal);\n}\nSQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  pCtx->isError = SQLITE_ERROR;\n  sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  pCtx->isError = SQLITE_ERROR;\n  sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);\n}\n#endif\nSQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemSetInt64(pCtx->pOut, (i64)iVal);\n}\nSQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemSetInt64(pCtx->pOut, iVal);\n}\nSQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemSetNull(pCtx->pOut);\n}\nSQLITE_API void sqlite3_result_pointer(\n  sqlite3_context *pCtx,\n  void *pPtr,\n  const char *zPType,\n  void (*xDestructor)(void*)\n){\n  Mem *pOut;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ){\n    invokeValueDestructor(pPtr, xDestructor, 0);\n    return;\n  }\n#endif\n  pOut = pCtx->pOut;\n  assert( sqlite3_mutex_held(pOut->db->mutex) );\n  sqlite3VdbeMemRelease(pOut);\n  pOut->flags = MEM_Null;\n  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);\n}\nSQLITE_API void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){\n  Mem *pOut;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n#if defined(SQLITE_STRICT_SUBTYPE) && SQLITE_STRICT_SUBTYPE+0!=0\n  if( pCtx->pFunc!=0\n   && (pCtx->pFunc->funcFlags & SQLITE_RESULT_SUBTYPE)==0\n  ){\n    char zErr[200];\n    sqlite3_snprintf(sizeof(zErr), zErr,\n                     \"misuse of sqlite3_result_subtype() by %s()\",\n                     pCtx->pFunc->zName);\n    sqlite3_result_error(pCtx, zErr, -1);\n    return;\n  }\n#endif /* SQLITE_STRICT_SUBTYPE */\n  pOut = pCtx->pOut;\n  assert( sqlite3_mutex_held(pOut->db->mutex) );\n  pOut->eSubtype = eSubtype & 0xff;\n  pOut->flags |= MEM_Subtype;\n}\nSQLITE_API void sqlite3_result_text(\n  sqlite3_context *pCtx,\n  const char *z,\n  int n,\n  void (*xDel)(void *)\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ){\n    invokeValueDestructor(z, xDel, 0);\n    return;\n  }\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);\n}\nSQLITE_API void sqlite3_result_text64(\n  sqlite3_context *pCtx,\n  const char *z,\n  sqlite3_uint64 n,\n  void (*xDel)(void *),\n  unsigned char enc\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ){\n    invokeValueDestructor(z, xDel, 0);\n    return;\n  }\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  assert( xDel!=SQLITE_DYNAMIC );\n  if( enc!=SQLITE_UTF8 ){\n    if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;\n    n &= ~(u64)1;\n  }\n  if( n>0x7fffffff ){\n    (void)invokeValueDestructor(z, xDel, pCtx);\n  }else{\n    setResultStrOrError(pCtx, z, (int)n, enc, xDel);\n    sqlite3VdbeMemZeroTerminateIfAble(pCtx->pOut);\n  }\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API void sqlite3_result_text16(\n  sqlite3_context *pCtx,\n  const void *z,\n  int n,\n  void (*xDel)(void *)\n){\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16NATIVE, xDel);\n}\nSQLITE_API void sqlite3_result_text16be(\n  sqlite3_context *pCtx,\n  const void *z,\n  int n,\n  void (*xDel)(void *)\n){\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16BE, xDel);\n}\nSQLITE_API void sqlite3_result_text16le(\n  sqlite3_context *pCtx,\n  const void *z,\n  int n,\n  void (*xDel)(void *)\n){\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16LE, xDel);\n}\n#endif /* SQLITE_OMIT_UTF16 */\nSQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){\n  Mem *pOut;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n  if( pValue==0 ){\n    sqlite3_result_null(pCtx);\n    return;\n  }\n#endif\n  pOut = pCtx->pOut;\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemCopy(pOut, pValue);\n  sqlite3VdbeChangeEncoding(pOut, pCtx->enc);\n  if( sqlite3VdbeMemTooBig(pOut) ){\n    sqlite3_result_error_toobig(pCtx);\n  }\n}\nSQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){\n  sqlite3_result_zeroblob64(pCtx, n>0 ? n : 0);\n}\nSQLITE_API int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){\n  Mem *pOut;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  pOut = pCtx->pOut;\n  assert( sqlite3_mutex_held(pOut->db->mutex) );\n  if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    sqlite3_result_error_toobig(pCtx);\n    return SQLITE_TOOBIG;\n  }\n#ifndef SQLITE_OMIT_INCRBLOB\n  sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);\n  return SQLITE_OK;\n#else\n  return sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);\n#endif\n}\nSQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  pCtx->isError = errCode ? errCode : -1;\n#ifdef SQLITE_DEBUG\n  if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;\n#endif\n  if( pCtx->pOut->flags & MEM_Null ){\n    setResultStrOrError(pCtx, sqlite3ErrStr(errCode), -1, SQLITE_UTF8,\n                        SQLITE_STATIC);\n  }\n}\n\n/* Force an SQLITE_TOOBIG error. */\nSQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  pCtx->isError = SQLITE_TOOBIG;\n  sqlite3VdbeMemSetStr(pCtx->pOut, \"string or blob too big\", -1,\n                       SQLITE_UTF8, SQLITE_STATIC);\n}\n\n/* An SQLITE_NOMEM error. */\nSQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  sqlite3VdbeMemSetNull(pCtx->pOut);\n  pCtx->isError = SQLITE_NOMEM_BKPT;\n  sqlite3OomFault(pCtx->pOut->db);\n}\n\n#ifndef SQLITE_UNTESTABLE\n/* Force the INT64 value currently stored as the result to be\n** a MEM_IntReal value.  See the SQLITE_TESTCTRL_RESULT_INTREAL\n** test-control.\n*/\nSQLITE_PRIVATE void sqlite3ResultIntReal(sqlite3_context *pCtx){\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n  if( pCtx->pOut->flags & MEM_Int ){\n    pCtx->pOut->flags &= ~MEM_Int;\n    pCtx->pOut->flags |= MEM_IntReal;\n  }\n}\n#endif\n\n\n/*\n** This function is called after a transaction has been committed. It\n** invokes callbacks registered with sqlite3_wal_hook() as required.\n*/\nstatic int doWalCallbacks(sqlite3 *db){\n  int rc = SQLITE_OK;\n#ifndef SQLITE_OMIT_WAL\n  int i;\n  for(i=0; i<db->nDb; i++){\n    Btree *pBt = db->aDb[i].pBt;\n    if( pBt ){\n      int nEntry;\n      sqlite3BtreeEnter(pBt);\n      nEntry = sqlite3PagerWalCallback(sqlite3BtreePager(pBt));\n      sqlite3BtreeLeave(pBt);\n      if( nEntry>0 && db->xWalCallback && rc==SQLITE_OK ){\n        rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zDbSName, nEntry);\n      }\n    }\n  }\n#endif\n  return rc;\n}\n\n\n/*\n** Execute the statement pStmt, either until a row of data is ready, the\n** statement is completely executed or an error occurs.\n**\n** This routine implements the bulk of the logic behind the sqlite_step()\n** API.  The only thing omitted is the automatic recompile if a\n** schema change has occurred.  That detail is handled by the\n** outer sqlite3_step() wrapper procedure.\n*/\nstatic int sqlite3Step(Vdbe *p){\n  sqlite3 *db;\n  int rc;\n\n  assert(p);\n  db = p->db;\n  if( p->eVdbeState!=VDBE_RUN_STATE ){\n    restart_step:\n    if( p->eVdbeState==VDBE_READY_STATE ){\n      if( p->expired ){\n        p->rc = SQLITE_SCHEMA;\n        rc = SQLITE_ERROR;\n        if( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 ){\n          /* If this statement was prepared using saved SQL and an\n          ** error has occurred, then return the error code in p->rc to the\n          ** caller. Set the error code in the database handle to the same\n          ** value.\n          */\n          rc = sqlite3VdbeTransferError(p);\n        }\n        goto end_of_step;\n      }\n\n      /* If there are no other statements currently running, then\n      ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt\n      ** from interrupting a statement that has not yet started.\n      */\n      if( db->nVdbeActive==0 ){\n        AtomicStore(&db->u1.isInterrupted, 0);\n      }\n\n      assert( db->nVdbeWrite>0 || db->autoCommit==0\n          || ((db->nDeferredCons + db->nDeferredImmCons)==0)\n      );\n\n#ifndef SQLITE_OMIT_TRACE\n      if( (db->mTrace & (SQLITE_TRACE_PROFILE|SQLITE_TRACE_XPROFILE))!=0\n          && !db->init.busy && p->zSql ){\n        sqlite3OsCurrentTimeInt64(db->pVfs, &p->startTime);\n      }else{\n        assert( p->startTime==0 );\n      }\n#endif\n\n      db->nVdbeActive++;\n      if( p->readOnly==0 ) db->nVdbeWrite++;\n      if( p->bIsReader ) db->nVdbeRead++;\n      p->pc = 0;\n      p->eVdbeState = VDBE_RUN_STATE;\n    }else\n\n    if( ALWAYS(p->eVdbeState==VDBE_HALT_STATE) ){\n      /* We used to require that sqlite3_reset() be called before retrying\n      ** sqlite3_step() after any error or after SQLITE_DONE.  But beginning\n      ** with version 3.7.0, we changed this so that sqlite3_reset() would\n      ** be called automatically instead of throwing the SQLITE_MISUSE error.\n      ** This \"automatic-reset\" change is not technically an incompatibility,\n      ** since any application that receives an SQLITE_MISUSE is broken by\n      ** definition.\n      **\n      ** Nevertheless, some published applications that were originally written\n      ** for version 3.6.23 or earlier do in fact depend on SQLITE_MISUSE\n      ** returns, and those were broken by the automatic-reset change.  As a\n      ** a work-around, the SQLITE_OMIT_AUTORESET compile-time restores the\n      ** legacy behavior of returning SQLITE_MISUSE for cases where the\n      ** previous sqlite3_step() returned something other than a SQLITE_LOCKED\n      ** or SQLITE_BUSY error.\n      */\n#ifdef SQLITE_OMIT_AUTORESET\n      if( (rc = p->rc&0xff)==SQLITE_BUSY || rc==SQLITE_LOCKED ){\n        sqlite3_reset((sqlite3_stmt*)p);\n      }else{\n        return SQLITE_MISUSE_BKPT;\n      }\n#else\n      sqlite3_reset((sqlite3_stmt*)p);\n#endif\n      assert( p->eVdbeState==VDBE_READY_STATE );\n      goto restart_step;\n    }\n  }\n\n#ifdef SQLITE_DEBUG\n  p->rcApp = SQLITE_OK;\n#endif\n#ifndef SQLITE_OMIT_EXPLAIN\n  if( p->explain ){\n    rc = sqlite3VdbeList(p);\n  }else\n#endif /* SQLITE_OMIT_EXPLAIN */\n  {\n    db->nVdbeExec++;\n    rc = sqlite3VdbeExec(p);\n    db->nVdbeExec--;\n  }\n\n  if( rc==SQLITE_ROW ){\n    assert( p->rc==SQLITE_OK );\n    assert( db->mallocFailed==0 );\n    db->errCode = SQLITE_ROW;\n    return SQLITE_ROW;\n  }else{\n#ifndef SQLITE_OMIT_TRACE\n    /* If the statement completed successfully, invoke the profile callback */\n    checkProfileCallback(db, p);\n#endif\n    p->pResultRow = 0;\n    if( rc==SQLITE_DONE && db->autoCommit ){\n      assert( p->rc==SQLITE_OK );\n      p->rc = doWalCallbacks(db);\n      if( p->rc!=SQLITE_OK ){\n        rc = SQLITE_ERROR;\n      }\n    }else if( rc!=SQLITE_DONE && (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 ){\n      /* If this statement was prepared using saved SQL and an\n      ** error has occurred, then return the error code in p->rc to the\n      ** caller. Set the error code in the database handle to the same value.\n      */\n      rc = sqlite3VdbeTransferError(p);\n    }\n  }\n\n  db->errCode = rc;\n  if( SQLITE_NOMEM==sqlite3ApiExit(p->db, p->rc) ){\n    p->rc = SQLITE_NOMEM_BKPT;\n    if( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 ) rc = p->rc;\n  }\nend_of_step:\n  /* There are only a limited number of result codes allowed from the\n  ** statements prepared using the legacy sqlite3_prepare() interface */\n  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0\n       || rc==SQLITE_ROW  || rc==SQLITE_DONE   || rc==SQLITE_ERROR\n       || (rc&0xff)==SQLITE_BUSY || rc==SQLITE_MISUSE\n  );\n  return (rc&db->errMask);\n}\n\n/*\n** This is the top-level implementation of sqlite3_step().  Call\n** sqlite3Step() to do most of the work.  If a schema error occurs,\n** call sqlite3Reprepare() and try again.\n*/\nSQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){\n  int rc = SQLITE_OK;      /* Result from sqlite3Step() */\n  Vdbe *v = (Vdbe*)pStmt;  /* the prepared statement */\n  int cnt = 0;             /* Counter to prevent infinite loop of reprepares */\n  sqlite3 *db;             /* The database connection */\n\n  if( vdbeSafetyNotNull(v) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  db = v->db;\n  sqlite3_mutex_enter(db->mutex);\n  while( (rc = sqlite3Step(v))==SQLITE_SCHEMA\n         && cnt++ < SQLITE_MAX_SCHEMA_RETRY ){\n    int savedPc = v->pc;\n    rc = sqlite3Reprepare(v);\n    if( rc!=SQLITE_OK ){\n      /* This case occurs after failing to recompile an sql statement.\n      ** The error message from the SQL compiler has already been loaded\n      ** into the database handle. This block copies the error message\n      ** from the database handle into the statement and sets the statement\n      ** program counter to 0 to ensure that when the statement is\n      ** finalized or reset the parser error message is available via\n      ** sqlite3_errmsg() and sqlite3_errcode().\n      */\n      const char *zErr = (const char *)sqlite3_value_text(db->pErr);\n      sqlite3DbFree(db, v->zErrMsg);\n      if( !db->mallocFailed ){\n        v->zErrMsg = sqlite3DbStrDup(db, zErr);\n        v->rc = rc = sqlite3ApiExit(db, rc);\n      } else {\n        v->zErrMsg = 0;\n        v->rc = rc = SQLITE_NOMEM_BKPT;\n      }\n      break;\n    }\n    sqlite3_reset(pStmt);\n    if( savedPc>=0 ){\n      /* Setting minWriteFileFormat to 254 is a signal to the OP_Init and\n      ** OP_Trace opcodes to *not* perform SQLITE_TRACE_STMT because it has\n      ** already been done once on a prior invocation that failed due to\n      ** SQLITE_SCHEMA.   tag-20220401a  */\n      v->minWriteFileFormat = 254;\n    }\n    assert( v->expired==0 );\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n\n/*\n** Extract the user data from a sqlite3_context structure and return a\n** pointer to it.\n*/\nSQLITE_API void *sqlite3_user_data(sqlite3_context *p){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ) return 0;\n#endif\n  assert( p && p->pFunc );\n  return p->pFunc->pUserData;\n}\n\n/*\n** Extract the user data from a sqlite3_context structure and return a\n** pointer to it.\n**\n** IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface\n** returns a copy of the pointer to the database connection (the 1st\n** parameter) of the sqlite3_create_function() and\n** sqlite3_create_function16() routines that originally registered the\n** application defined function.\n*/\nSQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ) return 0;\n#else\n  assert( p && p->pOut );\n#endif\n  return p->pOut->db;\n}\n\n/*\n** If this routine is invoked from within an xColumn method of a virtual\n** table, then it returns true if and only if the the call is during an\n** UPDATE operation and the value of the column will not be modified\n** by the UPDATE.\n**\n** If this routine is called from any context other than within the\n** xColumn method of a virtual table, then the return value is meaningless\n** and arbitrary.\n**\n** Virtual table implements might use this routine to optimize their\n** performance by substituting a NULL result, or some other light-weight\n** value, as a signal to the xUpdate routine that the column is unchanged.\n*/\nSQLITE_API int sqlite3_vtab_nochange(sqlite3_context *p){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ) return 0;\n#else\n  assert( p );\n#endif\n  return sqlite3_value_nochange(p->pOut);\n}\n\n/*\n** The destructor function for a ValueList object.  This needs to be\n** a separate function, unknowable to the application, to ensure that\n** calls to sqlite3_vtab_in_first()/sqlite3_vtab_in_next() that are not\n** preceded by activation of IN processing via sqlite3_vtab_int() do not\n** try to access a fake ValueList object inserted by a hostile extension.\n*/\nSQLITE_PRIVATE void sqlite3VdbeValueListFree(void *pToDelete){\n  sqlite3_free(pToDelete);\n}\n\n/*\n** Implementation of sqlite3_vtab_in_first() (if bNext==0) and\n** sqlite3_vtab_in_next() (if bNext!=0).\n*/\nstatic int valueFromValueList(\n  sqlite3_value *pVal,        /* Pointer to the ValueList object */\n  sqlite3_value **ppOut,      /* Store the next value from the list here */\n  int bNext                   /* 1 for _next(). 0 for _first() */\n){\n  int rc;\n  ValueList *pRhs;\n\n  *ppOut = 0;\n  if( pVal==0 ) return SQLITE_MISUSE_BKPT;\n  if( (pVal->flags & MEM_Dyn)==0 || pVal->xDel!=sqlite3VdbeValueListFree ){\n    return SQLITE_ERROR;\n  }else{\n    assert( (pVal->flags&(MEM_TypeMask|MEM_Term|MEM_Subtype)) ==\n                 (MEM_Null|MEM_Term|MEM_Subtype) );\n    assert( pVal->eSubtype=='p' );\n    assert( pVal->u.zPType!=0 && strcmp(pVal->u.zPType,\"ValueList\")==0 );\n    pRhs = (ValueList*)pVal->z;\n  }\n  if( bNext ){\n    rc = sqlite3BtreeNext(pRhs->pCsr, 0);\n  }else{\n    int dummy = 0;\n    rc = sqlite3BtreeFirst(pRhs->pCsr, &dummy);\n    assert( rc==SQLITE_OK || sqlite3BtreeEof(pRhs->pCsr) );\n    if( sqlite3BtreeEof(pRhs->pCsr) ) rc = SQLITE_DONE;\n  }\n  if( rc==SQLITE_OK ){\n    u32 sz;       /* Size of current row in bytes */\n    Mem sMem;     /* Raw content of current row */\n    memset(&sMem, 0, sizeof(sMem));\n    sz = sqlite3BtreePayloadSize(pRhs->pCsr);\n    rc = sqlite3VdbeMemFromBtreeZeroOffset(pRhs->pCsr,(int)sz,&sMem);\n    if( rc==SQLITE_OK ){\n      u8 *zBuf = (u8*)sMem.z;\n      u32 iSerial;\n      sqlite3_value *pOut = pRhs->pOut;\n      int iOff = 1 + getVarint32(&zBuf[1], iSerial);\n      sqlite3VdbeSerialGet(&zBuf[iOff], iSerial, pOut);\n      pOut->enc = ENC(pOut->db);\n      if( (pOut->flags & MEM_Ephem)!=0 && sqlite3VdbeMemMakeWriteable(pOut) ){\n        rc = SQLITE_NOMEM;\n      }else{\n        *ppOut = pOut;\n      }\n    }\n    sqlite3VdbeMemRelease(&sMem);\n  }\n  return rc;\n}\n\n/*\n** Set the iterator value pVal to point to the first value in the set.\n** Set (*ppOut) to point to this value before returning.\n*/\nSQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut){\n  return valueFromValueList(pVal, ppOut, 0);\n}\n\n/*\n** Set the iterator value pVal to point to the next value in the set.\n** Set (*ppOut) to point to this value before returning.\n*/\nSQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut){\n  return valueFromValueList(pVal, ppOut, 1);\n}\n\n/*\n** Return the current time for a statement.  If the current time\n** is requested more than once within the same run of a single prepared\n** statement, the exact same time is returned for each invocation regardless\n** of the amount of time that elapses between invocations.  In other words,\n** the time returned is always the time of the first call.\n*/\nSQLITE_PRIVATE sqlite3_int64 sqlite3StmtCurrentTime(sqlite3_context *p){\n  int rc;\n#ifndef SQLITE_ENABLE_STAT4\n  sqlite3_int64 *piTime = &p->pVdbe->iCurrentTime;\n  assert( p->pVdbe!=0 );\n#else\n  sqlite3_int64 iTime = 0;\n  sqlite3_int64 *piTime = p->pVdbe!=0 ? &p->pVdbe->iCurrentTime : &iTime;\n#endif\n  if( *piTime==0 ){\n    rc = sqlite3OsCurrentTimeInt64(p->pOut->db->pVfs, piTime);\n    if( rc ) *piTime = 0;\n  }\n  return *piTime;\n}\n\n/*\n** Create a new aggregate context for p and return a pointer to\n** its pMem->z element.\n*/\nstatic SQLITE_NOINLINE void *createAggContext(sqlite3_context *p, int nByte){\n  Mem *pMem = p->pMem;\n  assert( (pMem->flags & MEM_Agg)==0 );\n  if( nByte<=0 ){\n    sqlite3VdbeMemSetNull(pMem);\n    pMem->z = 0;\n  }else{\n    sqlite3VdbeMemClearAndResize(pMem, nByte);\n    pMem->flags = MEM_Agg;\n    pMem->u.pDef = p->pFunc;\n    if( pMem->z ){\n      memset(pMem->z, 0, nByte);\n    }\n  }\n  return (void*)pMem->z;\n}\n\n/*\n** Allocate or return the aggregate context for a user function.  A new\n** context is allocated on the first call.  Subsequent calls return the\n** same context that was returned on prior calls.\n*/\nSQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){\n  assert( p && p->pFunc && p->pFunc->xFinalize );\n  assert( sqlite3_mutex_held(p->pOut->db->mutex) );\n  testcase( nByte<0 );\n  if( (p->pMem->flags & MEM_Agg)==0 ){\n    return createAggContext(p, nByte);\n  }else{\n    return (void*)p->pMem->z;\n  }\n}\n\n/*\n** Return the auxiliary data pointer, if any, for the iArg'th argument to\n** the user-function defined by pCtx.\n**\n** The left-most argument is 0.\n**\n** Undocumented behavior:  If iArg is negative then access a cache of\n** auxiliary data pointers that is available to all functions within a\n** single prepared statement.  The iArg values must match.\n*/\nSQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){\n  AuxData *pAuxData;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return 0;\n#endif\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n#if SQLITE_ENABLE_STAT4\n  if( pCtx->pVdbe==0 ) return 0;\n#else\n  assert( pCtx->pVdbe!=0 );\n#endif\n  for(pAuxData=pCtx->pVdbe->pAuxData; pAuxData; pAuxData=pAuxData->pNextAux){\n    if(  pAuxData->iAuxArg==iArg && (pAuxData->iAuxOp==pCtx->iOp || iArg<0) ){\n      return pAuxData->pAux;\n    }\n  }\n  return 0;\n}\n\n/*\n** Set the auxiliary data pointer and delete function, for the iArg'th\n** argument to the user-function defined by pCtx. Any previous value is\n** deleted by calling the delete function specified when it was set.\n**\n** The left-most argument is 0.\n**\n** Undocumented behavior:  If iArg is negative then make the data available\n** to all functions within the current prepared statement using iArg as an\n** access code.\n*/\nSQLITE_API void sqlite3_set_auxdata(\n  sqlite3_context *pCtx,\n  int iArg,\n  void *pAux,\n  void (*xDelete)(void*)\n){\n  AuxData *pAuxData;\n  Vdbe *pVdbe;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pCtx==0 ) return;\n#endif\n  pVdbe= pCtx->pVdbe;\n  assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );\n#ifdef SQLITE_ENABLE_STAT4\n  if( pVdbe==0 ) goto failed;\n#else\n  assert( pVdbe!=0 );\n#endif\n\n  for(pAuxData=pVdbe->pAuxData; pAuxData; pAuxData=pAuxData->pNextAux){\n    if( pAuxData->iAuxArg==iArg && (pAuxData->iAuxOp==pCtx->iOp || iArg<0) ){\n      break;\n    }\n  }\n  if( pAuxData==0 ){\n    pAuxData = sqlite3DbMallocZero(pVdbe->db, sizeof(AuxData));\n    if( !pAuxData ) goto failed;\n    pAuxData->iAuxOp = pCtx->iOp;\n    pAuxData->iAuxArg = iArg;\n    pAuxData->pNextAux = pVdbe->pAuxData;\n    pVdbe->pAuxData = pAuxData;\n    if( pCtx->isError==0 ) pCtx->isError = -1;\n  }else if( pAuxData->xDeleteAux ){\n    pAuxData->xDeleteAux(pAuxData->pAux);\n  }\n\n  pAuxData->pAux = pAux;\n  pAuxData->xDeleteAux = xDelete;\n  return;\n\nfailed:\n  if( xDelete ){\n    xDelete(pAux);\n  }\n}\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Return the number of times the Step function of an aggregate has been\n** called.\n**\n** This function is deprecated.  Do not use it for new code.  It is\n** provide only to avoid breaking legacy code.  New aggregate function\n** implementations should keep their own counts within their aggregate\n** context.\n*/\nSQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){\n  assert( p && p->pMem && p->pFunc && p->pFunc->xFinalize );\n  return p->pMem->n;\n}\n#endif\n\n/*\n** Return the number of columns in the result set for the statement pStmt.\n*/\nSQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){\n  Vdbe *pVm = (Vdbe *)pStmt;\n  if( pVm==0 ) return 0;\n  return pVm->nResColumn;\n}\n\n/*\n** Return the number of values available from the current row of the\n** currently executing statement pStmt.\n*/\nSQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){\n  Vdbe *pVm = (Vdbe *)pStmt;\n  if( pVm==0 || pVm->pResultRow==0 ) return 0;\n  return pVm->nResColumn;\n}\n\n/*\n** Return a pointer to static memory containing an SQL NULL value.\n*/\nstatic const Mem *columnNullValue(void){\n  /* Even though the Mem structure contains an element\n  ** of type i64, on certain architectures (x86) with certain compiler\n  ** switches (-Os), gcc may align this Mem object on a 4-byte boundary\n  ** instead of an 8-byte one. This all works fine, except that when\n  ** running with SQLITE_DEBUG defined the SQLite code sometimes assert()s\n  ** that a Mem structure is located on an 8-byte boundary. To prevent\n  ** these assert()s from failing, when building with SQLITE_DEBUG defined\n  ** using gcc, we force nullMem to be 8-byte aligned using the magical\n  ** __attribute__((aligned(8))) macro.  */\n  static const Mem nullMem\n#if defined(SQLITE_DEBUG) && defined(__GNUC__)\n    __attribute__((aligned(8)))\n#endif\n    = {\n        /* .u          = */ {0},\n        /* .z          = */ (char*)0,\n        /* .n          = */ (int)0,\n        /* .flags      = */ (u16)MEM_Null,\n        /* .enc        = */ (u8)0,\n        /* .eSubtype   = */ (u8)0,\n        /* .db         = */ (sqlite3*)0,\n        /* .szMalloc   = */ (int)0,\n        /* .uTemp      = */ (u32)0,\n        /* .zMalloc    = */ (char*)0,\n        /* .xDel       = */ (void(*)(void*))0,\n#ifdef SQLITE_DEBUG\n        /* .pScopyFrom = */ (Mem*)0,\n        /* .mScopyFlags= */ 0,\n        /* .bScopy     = */ 0,\n#endif\n      };\n  return &nullMem;\n}\n\n/*\n** Check to see if column iCol of the given statement is valid.  If\n** it is, return a pointer to the Mem for the value of that column.\n** If iCol is not valid, return a pointer to a Mem which has a value\n** of NULL.\n*/\nstatic Mem *columnMem(sqlite3_stmt *pStmt, int i){\n  Vdbe *pVm;\n  Mem *pOut;\n\n  pVm = (Vdbe *)pStmt;\n  if( pVm==0 ) return (Mem*)columnNullValue();\n  assert( pVm->db );\n  sqlite3_mutex_enter(pVm->db->mutex);\n  if( pVm->pResultRow!=0 && i<pVm->nResColumn && i>=0 ){\n    pOut = &pVm->pResultRow[i];\n  }else{\n    sqlite3Error(pVm->db, SQLITE_RANGE);\n    pOut = (Mem*)columnNullValue();\n  }\n  return pOut;\n}\n\n/*\n** This function is called after invoking an sqlite3_value_XXX function on a\n** column value (i.e. a value returned by evaluating an SQL expression in the\n** select list of a SELECT statement) that may cause a malloc() failure. If\n** malloc() has failed, the threads mallocFailed flag is cleared and the result\n** code of statement pStmt set to SQLITE_NOMEM.\n**\n** Specifically, this is called from within:\n**\n**     sqlite3_column_int()\n**     sqlite3_column_int64()\n**     sqlite3_column_text()\n**     sqlite3_column_text16()\n**     sqlite3_column_double()\n**     sqlite3_column_bytes()\n**     sqlite3_column_bytes16()\n**     sqlite3_column_blob()\n*/\nstatic void columnMallocFailure(sqlite3_stmt *pStmt)\n{\n  /* If malloc() failed during an encoding conversion within an\n  ** sqlite3_column_XXX API, then set the return code of the statement to\n  ** SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR\n  ** and _finalize() will return NOMEM.\n  */\n  Vdbe *p = (Vdbe *)pStmt;\n  if( p ){\n    assert( p->db!=0 );\n    assert( sqlite3_mutex_held(p->db->mutex) );\n    p->rc = sqlite3ApiExit(p->db, p->rc);\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n}\n\n/**************************** sqlite3_column_  *******************************\n** The following routines are used to access elements of the current row\n** in the result set.\n*/\nSQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){\n  const void *val;\n  val = sqlite3_value_blob( columnMem(pStmt,i) );\n  /* Even though there is no encoding conversion, value_blob() might\n  ** need to call malloc() to expand the result of a zeroblob()\n  ** expression.\n  */\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){\n  int val = sqlite3_value_bytes( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){\n  int val = sqlite3_value_bytes16( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){\n  double val = sqlite3_value_double( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){\n  int val = sqlite3_value_int( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){\n  sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){\n  const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\nSQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){\n  Mem *pOut = columnMem(pStmt, i);\n  if( pOut->flags&MEM_Static ){\n    pOut->flags &= ~MEM_Static;\n    pOut->flags |= MEM_Ephem;\n  }\n  columnMallocFailure(pStmt);\n  return (sqlite3_value *)pOut;\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){\n  const void *val = sqlite3_value_text16( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return val;\n}\n#endif /* SQLITE_OMIT_UTF16 */\nSQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){\n  int iType = sqlite3_value_type( columnMem(pStmt,i) );\n  columnMallocFailure(pStmt);\n  return iType;\n}\n\n/*\n** Column names appropriate for EXPLAIN or EXPLAIN QUERY PLAN.\n*/\nstatic const char * const azExplainColNames8[] = {\n   \"addr\", \"opcode\", \"p1\", \"p2\", \"p3\", \"p4\", \"p5\", \"comment\",  /* EXPLAIN */\n   \"id\", \"parent\", \"notused\", \"detail\"                         /* EQP */\n};\nstatic const u16 azExplainColNames16data[] = {\n  /*   0 */  'a', 'd', 'd', 'r',                0,\n  /*   5 */  'o', 'p', 'c', 'o', 'd', 'e',      0,\n  /*  12 */  'p', '1',                          0,\n  /*  15 */  'p', '2',                          0,\n  /*  18 */  'p', '3',                          0,\n  /*  21 */  'p', '4',                          0,\n  /*  24 */  'p', '5',                          0,\n  /*  27 */  'c', 'o', 'm', 'm', 'e', 'n', 't', 0,\n  /*  35 */  'i', 'd',                          0,\n  /*  38 */  'p', 'a', 'r', 'e', 'n', 't',      0,\n  /*  45 */  'n', 'o', 't', 'u', 's', 'e', 'd', 0,\n  /*  53 */  'd', 'e', 't', 'a', 'i', 'l',      0\n};\nstatic const u8 iExplainColNames16[] = {\n  0, 5, 12, 15, 18, 21, 24, 27,\n  35, 38, 45, 53\n};\n\n/*\n** Convert the N-th element of pStmt->pColName[] into a string using\n** xFunc() then return that string.  If N is out of range, return 0.\n**\n** There are up to 5 names for each column.  useType determines which\n** name is returned.  Here are the names:\n**\n**    0      The column name as it should be displayed for output\n**    1      The datatype name for the column\n**    2      The name of the database that the column derives from\n**    3      The name of the table that the column derives from\n**    4      The name of the table column that the result column derives from\n**\n** If the result is not a simple column reference (if it is an expression\n** or a constant) then useTypes 2, 3, and 4 return NULL.\n*/\nstatic const void *columnName(\n  sqlite3_stmt *pStmt,     /* The statement */\n  int N,                   /* Which column to get the name for */\n  int useUtf16,            /* True to return the name as UTF16 */\n  int useType              /* What type of name */\n){\n  const void *ret;\n  Vdbe *p;\n  int n;\n  sqlite3 *db;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pStmt==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  if( N<0 ) return 0;\n  ret = 0;\n  p = (Vdbe *)pStmt;\n  db = p->db;\n  assert( db!=0 );\n  sqlite3_mutex_enter(db->mutex);\n\n  if( p->explain ){\n    if( useType>0 ) goto columnName_end;\n    n = p->explain==1 ? 8 : 4;\n    if( N>=n ) goto columnName_end;\n    if( useUtf16 ){\n      int i = iExplainColNames16[N + 8*p->explain - 8];\n      ret = (void*)&azExplainColNames16data[i];\n    }else{\n      ret = (void*)azExplainColNames8[N + 8*p->explain - 8];\n    }\n    goto columnName_end;\n  }\n  n = p->nResColumn;\n  if( N<n ){\n    u8 prior_mallocFailed = db->mallocFailed;\n    N += useType*n;\n#ifndef SQLITE_OMIT_UTF16\n    if( useUtf16 ){\n      ret = sqlite3_value_text16((sqlite3_value*)&p->aColName[N]);\n    }else\n#endif\n    {\n      ret = sqlite3_value_text((sqlite3_value*)&p->aColName[N]);\n    }\n    /* A malloc may have failed inside of the _text() call. If this\n    ** is the case, clear the mallocFailed flag and return NULL.\n    */\n    assert( db->mallocFailed==0 || db->mallocFailed==1 );\n    if( db->mallocFailed > prior_mallocFailed ){\n      sqlite3OomClear(db);\n      ret = 0;\n    }\n  }\ncolumnName_end:\n  sqlite3_mutex_leave(db->mutex);\n  return ret;\n}\n\n/*\n** Return the name of the Nth column of the result set returned by SQL\n** statement pStmt.\n*/\nSQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 0, COLNAME_NAME);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 1, COLNAME_NAME);\n}\n#endif\n\n/*\n** Constraint:  If you have ENABLE_COLUMN_METADATA then you must\n** not define OMIT_DECLTYPE.\n*/\n#if defined(SQLITE_OMIT_DECLTYPE) && defined(SQLITE_ENABLE_COLUMN_METADATA)\n# error \"Must not define both SQLITE_OMIT_DECLTYPE \\\n         and SQLITE_ENABLE_COLUMN_METADATA\"\n#endif\n\n#ifndef SQLITE_OMIT_DECLTYPE\n/*\n** Return the column declaration type (if applicable) of the 'i'th column\n** of the result set of SQL statement pStmt.\n*/\nSQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 0, COLNAME_DECLTYPE);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 1, COLNAME_DECLTYPE);\n}\n#endif /* SQLITE_OMIT_UTF16 */\n#endif /* SQLITE_OMIT_DECLTYPE */\n\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n/*\n** Return the name of the database from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unambiguous reference to a database column.\n*/\nSQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 0, COLNAME_DATABASE);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 1, COLNAME_DATABASE);\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Return the name of the table from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unambiguous reference to a database column.\n*/\nSQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 0, COLNAME_TABLE);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 1, COLNAME_TABLE);\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Return the name of the table column from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unambiguous reference to a database column.\n*/\nSQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 0, COLNAME_COLUMN);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){\n  return columnName(pStmt, N, 1, COLNAME_COLUMN);\n}\n#endif /* SQLITE_OMIT_UTF16 */\n#endif /* SQLITE_ENABLE_COLUMN_METADATA */\n\n\n/******************************* sqlite3_bind_  ***************************\n**\n** Routines used to attach values to wildcards in a compiled SQL statement.\n*/\n/*\n** Unbind the value bound to variable i in virtual machine p. This is the\n** the same as binding a NULL value to the column. If the \"i\" parameter is\n** out of range, then SQLITE_RANGE is returned. Otherwise SQLITE_OK.\n**\n** A successful evaluation of this routine acquires the mutex on p.\n** the mutex is released if any kind of error occurs.\n**\n** The error code stored in database p->db is overwritten with the return\n** value in any case.\n**\n** (tag-20240917-01) If  vdbeUnbind(p,(u32)(i-1))  returns SQLITE_OK,\n** that means all of the the following will be true:\n**\n**     p!=0\n**     p->pVar!=0\n**     i>0\n**     i<=p->nVar\n**\n** An assert() is normally added after vdbeUnbind() to help static analyzers\n** realize this.\n*/\nstatic int vdbeUnbind(Vdbe *p, unsigned int i){\n  Mem *pVar;\n  if( vdbeSafetyNotNull(p) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  sqlite3_mutex_enter(p->db->mutex);\n  if( p->eVdbeState!=VDBE_READY_STATE ){\n    sqlite3Error(p->db, SQLITE_MISUSE_BKPT);\n    sqlite3_mutex_leave(p->db->mutex);\n    sqlite3_log(SQLITE_MISUSE,\n        \"bind on a busy prepared statement: [%s]\", p->zSql);\n    return SQLITE_MISUSE_BKPT;\n  }\n  if( i>=(unsigned int)p->nVar ){\n    sqlite3Error(p->db, SQLITE_RANGE);\n    sqlite3_mutex_leave(p->db->mutex);\n    return SQLITE_RANGE;\n  }\n  pVar = &p->aVar[i];\n  sqlite3VdbeMemRelease(pVar);\n  pVar->flags = MEM_Null;\n  p->db->errCode = SQLITE_OK;\n\n  /* If the bit corresponding to this variable in Vdbe.expmask is set, then\n  ** binding a new value to this variable invalidates the current query plan.\n  **\n  ** IMPLEMENTATION-OF: R-57496-20354 If the specific value bound to a host\n  ** parameter in the WHERE clause might influence the choice of query plan\n  ** for a statement, then the statement will be automatically recompiled,\n  ** as if there had been a schema change, on the first sqlite3_step() call\n  ** following any change to the bindings of that parameter.\n  */\n  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || p->expmask==0 );\n  if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){\n    p->expired = 1;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Bind a text or BLOB value.\n*/\nstatic int bindText(\n  sqlite3_stmt *pStmt,   /* The statement to bind against */\n  int i,                 /* Index of the parameter to bind */\n  const void *zData,     /* Pointer to the data to be bound */\n  i64 nData,             /* Number of bytes of data to be bound */\n  void (*xDel)(void*),   /* Destructor for the data */\n  u8 encoding            /* Encoding for the data */\n){\n  Vdbe *p = (Vdbe *)pStmt;\n  Mem *pVar;\n  int rc;\n\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n    if( zData!=0 ){\n      pVar = &p->aVar[i-1];\n      rc = sqlite3VdbeMemSetStr(pVar, zData, nData, encoding, xDel);\n      if( rc==SQLITE_OK ){\n        if( encoding==0 ){\n          pVar->enc = ENC(p->db);\n        }else{\n          rc = sqlite3VdbeChangeEncoding(pVar, ENC(p->db));\n        }\n      }\n      if( rc ){\n        sqlite3Error(p->db, rc);\n        rc = sqlite3ApiExit(p->db, rc);\n      }\n    }\n    sqlite3_mutex_leave(p->db->mutex);\n  }else if( xDel!=SQLITE_STATIC && xDel!=SQLITE_TRANSIENT ){\n    xDel((void*)zData);\n  }\n  return rc;\n}\n\n\n/*\n** Bind a blob value to an SQL statement variable.\n*/\nSQLITE_API int sqlite3_bind_blob(\n  sqlite3_stmt *pStmt,\n  int i,\n  const void *zData,\n  int nData,\n  void (*xDel)(void*)\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( nData<0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  return bindText(pStmt, i, zData, nData, xDel, 0);\n}\nSQLITE_API int sqlite3_bind_blob64(\n  sqlite3_stmt *pStmt,\n  int i,\n  const void *zData,\n  sqlite3_uint64 nData,\n  void (*xDel)(void*)\n){\n  assert( xDel!=SQLITE_DYNAMIC );\n  return bindText(pStmt, i, zData, nData, xDel, 0);\n}\nSQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){\n  int rc;\n  Vdbe *p = (Vdbe *)pStmt;\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n    sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){\n  return sqlite3_bind_int64(p, i, (i64)iValue);\n}\nSQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){\n  int rc;\n  Vdbe *p = (Vdbe *)pStmt;\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n    sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){\n  int rc;\n  Vdbe *p = (Vdbe*)pStmt;\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_pointer(\n  sqlite3_stmt *pStmt,\n  int i,\n  void *pPtr,\n  const char *zPTtype,\n  void (*xDestructor)(void*)\n){\n  int rc;\n  Vdbe *p = (Vdbe*)pStmt;\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n    sqlite3VdbeMemSetPointer(&p->aVar[i-1], pPtr, zPTtype, xDestructor);\n    sqlite3_mutex_leave(p->db->mutex);\n  }else if( xDestructor ){\n    xDestructor(pPtr);\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_text(\n  sqlite3_stmt *pStmt,\n  int i,\n  const char *zData,\n  int nData,\n  void (*xDel)(void*)\n){\n  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);\n}\nSQLITE_API int sqlite3_bind_text64(\n  sqlite3_stmt *pStmt,\n  int i,\n  const char *zData,\n  sqlite3_uint64 nData,\n  void (*xDel)(void*),\n  unsigned char enc\n){\n  assert( xDel!=SQLITE_DYNAMIC );\n  if( enc!=SQLITE_UTF8 ){\n    if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE;\n    nData &= ~(u64)1;\n  }\n  return bindText(pStmt, i, zData, nData, xDel, enc);\n}\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API int sqlite3_bind_text16(\n  sqlite3_stmt *pStmt,\n  int i,\n  const void *zData,\n  int n,\n  void (*xDel)(void*)\n){\n  return bindText(pStmt, i, zData, n & ~(u64)1, xDel, SQLITE_UTF16NATIVE);\n}\n#endif /* SQLITE_OMIT_UTF16 */\nSQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){\n  int rc;\n  switch( sqlite3_value_type((sqlite3_value*)pValue) ){\n    case SQLITE_INTEGER: {\n      rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);\n      break;\n    }\n    case SQLITE_FLOAT: {\n      assert( pValue->flags & (MEM_Real|MEM_IntReal) );\n      rc = sqlite3_bind_double(pStmt, i,\n          (pValue->flags & MEM_Real) ? pValue->u.r : (double)pValue->u.i\n      );\n      break;\n    }\n    case SQLITE_BLOB: {\n      if( pValue->flags & MEM_Zero ){\n        rc = sqlite3_bind_zeroblob(pStmt, i, pValue->u.nZero);\n      }else{\n        rc = sqlite3_bind_blob(pStmt, i, pValue->z, pValue->n,SQLITE_TRANSIENT);\n      }\n      break;\n    }\n    case SQLITE_TEXT: {\n      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT,\n                              pValue->enc);\n      break;\n    }\n    default: {\n      rc = sqlite3_bind_null(pStmt, i);\n      break;\n    }\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){\n  int rc;\n  Vdbe *p = (Vdbe *)pStmt;\n  rc = vdbeUnbind(p, (u32)(i-1));\n  if( rc==SQLITE_OK ){\n    assert( p!=0 && p->aVar!=0 && i>0 && i<=p->nVar ); /* tag-20240917-01 */\n#ifndef SQLITE_OMIT_INCRBLOB\n    sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);\n#else\n    rc = sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);\n#endif\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return rc;\n}\nSQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){\n  int rc;\n  Vdbe *p = (Vdbe *)pStmt;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(p->db->mutex);\n  if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    rc = SQLITE_TOOBIG;\n  }else{\n    assert( (n & 0x7FFFFFFF)==n );\n    rc = sqlite3_bind_zeroblob(pStmt, i, n);\n  }\n  rc = sqlite3ApiExit(p->db, rc);\n  sqlite3_mutex_leave(p->db->mutex);\n  return rc;\n}\n\n/*\n** Return the number of wildcards that can be potentially bound to.\n** This routine is added to support DBD::SQLite.\n*/\nSQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){\n  Vdbe *p = (Vdbe*)pStmt;\n  return p ? p->nVar : 0;\n}\n\n/*\n** Return the name of a wildcard parameter.  Return NULL if the index\n** is out of range or if the wildcard is unnamed.\n**\n** The result is always UTF-8.\n*/\nSQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){\n  Vdbe *p = (Vdbe*)pStmt;\n  if( p==0 ) return 0;\n  return sqlite3VListNumToName(p->pVList, i);\n}\n\n/*\n** Given a wildcard parameter name, return the index of the variable\n** with that name.  If there is no variable with the given name,\n** return 0.\n*/\nSQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){\n  if( p==0 || zName==0 ) return 0;\n  return sqlite3VListNameToNum(p->pVList, zName, nName);\n}\nSQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){\n  return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));\n}\n\n/*\n** Transfer all bindings from the first statement over to the second.\n*/\nSQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){\n  Vdbe *pFrom = (Vdbe*)pFromStmt;\n  Vdbe *pTo = (Vdbe*)pToStmt;\n  int i;\n  assert( pTo->db==pFrom->db );\n  assert( pTo->nVar==pFrom->nVar );\n  sqlite3_mutex_enter(pTo->db->mutex);\n  for(i=0; i<pFrom->nVar; i++){\n    sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);\n  }\n  sqlite3_mutex_leave(pTo->db->mutex);\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Deprecated external interface.  Internal/core SQLite code\n** should call sqlite3TransferBindings.\n**\n** It is misuse to call this routine with statements from different\n** database connections.  But as this is a deprecated interface, we\n** will not bother to check for that condition.\n**\n** If the two statements contain a different number of bindings, then\n** an SQLITE_ERROR is returned.  Nothing else can go wrong, so otherwise\n** SQLITE_OK is returned.\n*/\nSQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){\n  Vdbe *pFrom = (Vdbe*)pFromStmt;\n  Vdbe *pTo = (Vdbe*)pToStmt;\n  if( pFrom->nVar!=pTo->nVar ){\n    return SQLITE_ERROR;\n  }\n  assert( (pTo->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || pTo->expmask==0 );\n  if( pTo->expmask ){\n    pTo->expired = 1;\n  }\n  assert( (pFrom->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || pFrom->expmask==0 );\n  if( pFrom->expmask ){\n    pFrom->expired = 1;\n  }\n  return sqlite3TransferBindings(pFromStmt, pToStmt);\n}\n#endif\n\n/*\n** Return the sqlite3* database handle to which the prepared statement given\n** in the argument belongs.  This is the same database handle that was\n** the first argument to the sqlite3_prepare() that was used to create\n** the statement in the first place.\n*/\nSQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){\n  return pStmt ? ((Vdbe*)pStmt)->db : 0;\n}\n\n/*\n** Return true if the prepared statement is guaranteed to not modify the\n** database.\n*/\nSQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){\n  return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;\n}\n\n/*\n** Return 1 if the statement is an EXPLAIN and return 2 if the\n** statement is an EXPLAIN QUERY PLAN\n*/\nSQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt){\n  return pStmt ? ((Vdbe*)pStmt)->explain : 0;\n}\n\n/*\n** Set the explain mode for a statement.\n*/\nSQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode){\n  Vdbe *v = (Vdbe*)pStmt;\n  int rc;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( pStmt==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(v->db->mutex);\n  if( ((int)v->explain)==eMode ){\n    rc = SQLITE_OK;\n  }else if( eMode<0 || eMode>2 ){\n    rc = SQLITE_ERROR;\n  }else if( (v->prepFlags & SQLITE_PREPARE_SAVESQL)==0 ){\n    rc = SQLITE_ERROR;\n  }else if( v->eVdbeState!=VDBE_READY_STATE ){\n    rc = SQLITE_BUSY;\n  }else if( v->nMem>=10 && (eMode!=2 || v->haveEqpOps) ){\n    /* No reprepare necessary */\n    v->explain = eMode;\n    rc = SQLITE_OK;\n  }else{\n    v->explain = eMode;\n    rc = sqlite3Reprepare(v);\n    v->haveEqpOps = eMode==2;\n  }\n  if( v->explain ){\n    v->nResColumn = 12 - 4*v->explain;\n  }else{\n    v->nResColumn = v->nResAlloc;\n  }\n  sqlite3_mutex_leave(v->db->mutex);\n  return rc;\n}\n\n/*\n** Return true if the prepared statement is in need of being reset.\n*/\nSQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){\n  Vdbe *v = (Vdbe*)pStmt;\n  return v!=0 && v->eVdbeState==VDBE_RUN_STATE;\n}\n\n/*\n** Return a pointer to the next prepared statement after pStmt associated\n** with database connection pDb.  If pStmt is NULL, return the first\n** prepared statement for the database connection.  Return NULL if there\n** are no more.\n*/\nSQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){\n  sqlite3_stmt *pNext;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(pDb) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(pDb->mutex);\n  if( pStmt==0 ){\n    pNext = (sqlite3_stmt*)pDb->pVdbe;\n  }else{\n    pNext = (sqlite3_stmt*)((Vdbe*)pStmt)->pVNext;\n  }\n  sqlite3_mutex_leave(pDb->mutex);\n  return pNext;\n}\n\n/*\n** Return the value of a status counter for a prepared statement\n*/\nSQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){\n  Vdbe *pVdbe = (Vdbe*)pStmt;\n  u32 v;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !pStmt\n   || (op!=SQLITE_STMTSTATUS_MEMUSED && (op<0||op>=ArraySize(pVdbe->aCounter)))\n  ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  if( op==SQLITE_STMTSTATUS_MEMUSED ){\n    sqlite3 *db = pVdbe->db;\n    sqlite3_mutex_enter(db->mutex);\n    v = 0;\n    db->pnBytesFreed = (int*)&v;\n    assert( db->lookaside.pEnd==db->lookaside.pTrueEnd );\n    db->lookaside.pEnd = db->lookaside.pStart;\n    sqlite3VdbeDelete(pVdbe);\n    db->pnBytesFreed = 0;\n    db->lookaside.pEnd = db->lookaside.pTrueEnd;\n    sqlite3_mutex_leave(db->mutex);\n  }else{\n    v = pVdbe->aCounter[op];\n    if( resetFlag ) pVdbe->aCounter[op] = 0;\n  }\n  return (int)v;\n}\n\n/*\n** Return the SQL associated with a prepared statement\n*/\nSQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){\n  Vdbe *p = (Vdbe *)pStmt;\n  return p ? p->zSql : 0;\n}\n\n/*\n** Return the SQL associated with a prepared statement with\n** bound parameters expanded.  Space to hold the returned string is\n** obtained from sqlite3_malloc().  The caller is responsible for\n** freeing the returned string by passing it to sqlite3_free().\n**\n** The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of\n** expanded bound parameters.\n*/\nSQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt){\n#ifdef SQLITE_OMIT_TRACE\n  return 0;\n#else\n  char *z = 0;\n  const char *zSql = sqlite3_sql(pStmt);\n  if( zSql ){\n    Vdbe *p = (Vdbe *)pStmt;\n    sqlite3_mutex_enter(p->db->mutex);\n    z = sqlite3VdbeExpandSql(p, zSql);\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return z;\n#endif\n}\n\n#ifdef SQLITE_ENABLE_NORMALIZE\n/*\n** Return the normalized SQL associated with a prepared statement.\n*/\nSQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt){\n  Vdbe *p = (Vdbe *)pStmt;\n  if( p==0 ) return 0;\n  if( p->zNormSql==0 && ALWAYS(p->zSql!=0) ){\n    sqlite3_mutex_enter(p->db->mutex);\n    p->zNormSql = sqlite3Normalize(p, p->zSql);\n    sqlite3_mutex_leave(p->db->mutex);\n  }\n  return p->zNormSql;\n}\n#endif /* SQLITE_ENABLE_NORMALIZE */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** Allocate and populate an UnpackedRecord structure based on the serialized\n** record in nKey/pKey. Return a pointer to the new UnpackedRecord structure\n** if successful, or a NULL pointer if an OOM error is encountered.\n*/\nstatic UnpackedRecord *vdbeUnpackRecord(\n  KeyInfo *pKeyInfo,\n  int nKey,\n  const void *pKey\n){\n  UnpackedRecord *pRet;           /* Return value */\n\n  pRet = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);\n  if( pRet ){\n    memset(pRet->aMem, 0, sizeof(Mem)*(pKeyInfo->nKeyField+1));\n    sqlite3VdbeRecordUnpack(nKey, pKey, pRet);\n  }\n  return pRet;\n}\n\n/*\n** This function is called from within a pre-update callback to retrieve\n** a field of the row currently being updated or deleted.\n*/\nSQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){\n  PreUpdate *p;\n  Mem *pMem;\n  int rc = SQLITE_OK;\n  int iStore = 0;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( db==0 || ppValue==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  p = db->pPreUpdate;\n  /* Test that this call is being made from within an SQLITE_DELETE or\n  ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */\n  if( !p || p->op==SQLITE_INSERT ){\n    rc = SQLITE_MISUSE_BKPT;\n    goto preupdate_old_out;\n  }\n  if( p->pPk ){\n    iStore = sqlite3TableColumnToIndex(p->pPk, iIdx);\n  }else if( iIdx >= p->pTab->nCol ){\n    rc = SQLITE_MISUSE_BKPT;\n    goto preupdate_old_out;\n  }else{\n    iStore = sqlite3TableColumnToStorage(p->pTab, iIdx);\n  }\n  if( iStore>=p->pCsr->nField || iStore<0 ){\n    rc = SQLITE_RANGE;\n    goto preupdate_old_out;\n  }\n\n  if( iIdx==p->pTab->iPKey ){\n    *ppValue = pMem = &p->oldipk;\n    sqlite3VdbeMemSetInt64(pMem, p->iKey1);\n  }else{\n\n    /* If the old.* record has not yet been loaded into memory, do so now. */\n    if( p->pUnpacked==0 ){\n      u32 nRec;\n      u8 *aRec;\n\n      assert( p->pCsr->eCurType==CURTYPE_BTREE );\n      nRec = sqlite3BtreePayloadSize(p->pCsr->uc.pCursor);\n      aRec = sqlite3DbMallocRaw(db, nRec);\n      if( !aRec ) goto preupdate_old_out;\n      rc = sqlite3BtreePayload(p->pCsr->uc.pCursor, 0, nRec, aRec);\n      if( rc==SQLITE_OK ){\n        p->pUnpacked = vdbeUnpackRecord(p->pKeyinfo, nRec, aRec);\n        if( !p->pUnpacked ) rc = SQLITE_NOMEM;\n      }\n      if( rc!=SQLITE_OK ){\n        sqlite3DbFree(db, aRec);\n        goto preupdate_old_out;\n      }\n      p->aRecord = aRec;\n    }\n\n    pMem = *ppValue = &p->pUnpacked->aMem[iStore];\n    if( iStore>=p->pUnpacked->nField ){\n      /* This occurs when the table has been extended using ALTER TABLE\n      ** ADD COLUMN. The value to return is the default value of the column. */\n      Column *pCol = &p->pTab->aCol[iIdx];\n      if( pCol->iDflt>0 ){\n        if( p->apDflt==0 ){\n          int nByte;\n          assert( sizeof(sqlite3_value*)*UMXV(p->pTab->nCol) < 0x7fffffff );\n          nByte = sizeof(sqlite3_value*)*p->pTab->nCol;\n          p->apDflt = (sqlite3_value**)sqlite3DbMallocZero(db, nByte);\n          if( p->apDflt==0 ) goto preupdate_old_out;\n        }\n        if( p->apDflt[iIdx]==0 ){\n          sqlite3_value *pVal = 0;\n          Expr *pDflt;\n          assert( p->pTab!=0 && IsOrdinaryTable(p->pTab) );\n          pDflt = p->pTab->u.tab.pDfltList->a[pCol->iDflt-1].pExpr;\n          rc = sqlite3ValueFromExpr(db, pDflt, ENC(db), pCol->affinity, &pVal);\n          if( rc==SQLITE_OK && pVal==0 ){\n            rc = SQLITE_CORRUPT_BKPT;\n          }\n          p->apDflt[iIdx] = pVal;\n        }\n        *ppValue = p->apDflt[iIdx];\n      }else{\n        *ppValue = (sqlite3_value *)columnNullValue();\n      }\n    }else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){\n      if( pMem->flags & (MEM_Int|MEM_IntReal) ){\n        testcase( pMem->flags & MEM_Int );\n        testcase( pMem->flags & MEM_IntReal );\n        sqlite3VdbeMemRealify(pMem);\n      }\n    }\n  }\n\n preupdate_old_out:\n  sqlite3Error(db, rc);\n  return sqlite3ApiExit(db, rc);\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** This function is called from within a pre-update callback to retrieve\n** the number of columns in the row being updated, deleted or inserted.\n*/\nSQLITE_API int sqlite3_preupdate_count(sqlite3 *db){\n  PreUpdate *p;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  p = db!=0 ? db->pPreUpdate : 0;\n#else\n  p = db->pPreUpdate;\n#endif\n  return (p ? p->pKeyinfo->nKeyField : 0);\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** This function is designed to be called from within a pre-update callback\n** only. It returns zero if the change that caused the callback was made\n** immediately by a user SQL statement. Or, if the change was made by a\n** trigger program, it returns the number of trigger programs currently\n** on the stack (1 for a top-level trigger, 2 for a trigger fired by a\n** top-level trigger etc.).\n**\n** For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL\n** or SET DEFAULT action is considered a trigger.\n*/\nSQLITE_API int sqlite3_preupdate_depth(sqlite3 *db){\n  PreUpdate *p;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  p = db!=0 ? db->pPreUpdate : 0;\n#else\n  p = db->pPreUpdate;\n#endif\n  return (p ? p->v->nFrame : 0);\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** This function is designed to be called from within a pre-update callback\n** only.\n*/\nSQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *db){\n  PreUpdate *p;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  p = db!=0 ? db->pPreUpdate : 0;\n#else\n  p = db->pPreUpdate;\n#endif\n  return (p ? p->iBlobWrite : -1);\n}\n#endif\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** This function is called from within a pre-update callback to retrieve\n** a field of the row currently being updated or inserted.\n*/\nSQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppValue){\n  PreUpdate *p;\n  int rc = SQLITE_OK;\n  Mem *pMem;\n  int iStore = 0;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( db==0 || ppValue==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  p = db->pPreUpdate;\n  if( !p || p->op==SQLITE_DELETE ){\n    rc = SQLITE_MISUSE_BKPT;\n    goto preupdate_new_out;\n  }\n  if( p->pPk && p->op!=SQLITE_UPDATE ){\n    iStore = sqlite3TableColumnToIndex(p->pPk, iIdx);\n  }else if( iIdx >= p->pTab->nCol ){\n    return SQLITE_MISUSE_BKPT;\n  }else{\n    iStore = sqlite3TableColumnToStorage(p->pTab, iIdx);\n  }\n\n  if( iStore>=p->pCsr->nField || iStore<0 ){\n    rc = SQLITE_RANGE;\n    goto preupdate_new_out;\n  }\n\n  if( p->op==SQLITE_INSERT ){\n    /* For an INSERT, memory cell p->iNewReg contains the serialized record\n    ** that is being inserted. Deserialize it. */\n    UnpackedRecord *pUnpack = p->pNewUnpacked;\n    if( !pUnpack ){\n      Mem *pData = &p->v->aMem[p->iNewReg];\n      rc = ExpandBlob(pData);\n      if( rc!=SQLITE_OK ) goto preupdate_new_out;\n      pUnpack = vdbeUnpackRecord(p->pKeyinfo, pData->n, pData->z);\n      if( !pUnpack ){\n        rc = SQLITE_NOMEM;\n        goto preupdate_new_out;\n      }\n      p->pNewUnpacked = pUnpack;\n    }\n    pMem = &pUnpack->aMem[iStore];\n    if( iIdx==p->pTab->iPKey ){\n      sqlite3VdbeMemSetInt64(pMem, p->iKey2);\n    }else if( iStore>=pUnpack->nField ){\n      pMem = (sqlite3_value *)columnNullValue();\n    }\n  }else{\n    /* For an UPDATE, memory cell (p->iNewReg+1+iStore) contains the required\n    ** value. Make a copy of the cell contents and return a pointer to it.\n    ** It is not safe to return a pointer to the memory cell itself as the\n    ** caller may modify the value text encoding.\n    */\n    assert( p->op==SQLITE_UPDATE );\n    if( !p->aNew ){\n      assert( sizeof(Mem)*UMXV(p->pCsr->nField) < 0x7fffffff );\n      p->aNew = (Mem *)sqlite3DbMallocZero(db, sizeof(Mem)*p->pCsr->nField);\n      if( !p->aNew ){\n        rc = SQLITE_NOMEM;\n        goto preupdate_new_out;\n      }\n    }\n    assert( iStore>=0 && iStore<p->pCsr->nField );\n    pMem = &p->aNew[iStore];\n    if( pMem->flags==0 ){\n      if( iIdx==p->pTab->iPKey ){\n        sqlite3VdbeMemSetInt64(pMem, p->iKey2);\n      }else{\n        rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iStore]);\n        if( rc!=SQLITE_OK ) goto preupdate_new_out;\n      }\n    }\n  }\n  *ppValue = pMem;\n\n preupdate_new_out:\n  sqlite3Error(db, rc);\n  return sqlite3ApiExit(db, rc);\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n/*\n** Return status data for a single loop within query pStmt.\n*/\nSQLITE_API int sqlite3_stmt_scanstatus_v2(\n  sqlite3_stmt *pStmt,            /* Prepared statement being queried */\n  int iScan,                      /* Index of loop to report on */\n  int iScanStatusOp,              /* Which metric to return */\n  int flags,\n  void *pOut                      /* OUT: Write the answer here */\n){\n  Vdbe *p = (Vdbe*)pStmt;\n  VdbeOp *aOp;\n  int nOp;\n  ScanStatus *pScan = 0;\n  int idx;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( p==0 || pOut==0\n      || iScanStatusOp<SQLITE_SCANSTAT_NLOOP\n      || iScanStatusOp>SQLITE_SCANSTAT_NCYCLE ){\n    return 1;\n  }\n#endif\n  aOp = p->aOp;\n  nOp = p->nOp;\n  if( p->pFrame ){\n    VdbeFrame *pFrame;\n    for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);\n    aOp = pFrame->aOp;\n    nOp = pFrame->nOp;\n  }\n\n  if( iScan<0 ){\n    int ii;\n    if( iScanStatusOp==SQLITE_SCANSTAT_NCYCLE ){\n      i64 res = 0;\n      for(ii=0; ii<nOp; ii++){\n        res += aOp[ii].nCycle;\n      }\n      *(i64*)pOut = res;\n      return 0;\n    }\n    return 1;\n  }\n  if( flags & SQLITE_SCANSTAT_COMPLEX ){\n    idx = iScan;\n  }else{\n    /* If the COMPLEX flag is clear, then this function must ignore any\n    ** ScanStatus structures with ScanStatus.addrLoop set to 0. */\n    for(idx=0; idx<p->nScan; idx++){\n      pScan = &p->aScan[idx];\n      if( pScan->zName ){\n        iScan--;\n        if( iScan<0 ) break;\n      }\n    }\n  }\n  if( idx>=p->nScan ) return 1;\n  assert( pScan==0 || pScan==&p->aScan[idx] );\n  pScan = &p->aScan[idx];\n\n  switch( iScanStatusOp ){\n    case SQLITE_SCANSTAT_NLOOP: {\n      if( pScan->addrLoop>0 ){\n        *(sqlite3_int64*)pOut = aOp[pScan->addrLoop].nExec;\n      }else{\n        *(sqlite3_int64*)pOut = -1;\n      }\n      break;\n    }\n    case SQLITE_SCANSTAT_NVISIT: {\n      if( pScan->addrVisit>0 ){\n        *(sqlite3_int64*)pOut = aOp[pScan->addrVisit].nExec;\n      }else{\n        *(sqlite3_int64*)pOut = -1;\n      }\n      break;\n    }\n    case SQLITE_SCANSTAT_EST: {\n      double r = 1.0;\n      LogEst x = pScan->nEst;\n      while( x<100 ){\n        x += 10;\n        r *= 0.5;\n      }\n      *(double*)pOut = r*sqlite3LogEstToInt(x);\n      break;\n    }\n    case SQLITE_SCANSTAT_NAME: {\n      *(const char**)pOut = pScan->zName;\n      break;\n    }\n    case SQLITE_SCANSTAT_EXPLAIN: {\n      if( pScan->addrExplain ){\n        *(const char**)pOut = aOp[ pScan->addrExplain ].p4.z;\n      }else{\n        *(const char**)pOut = 0;\n      }\n      break;\n    }\n    case SQLITE_SCANSTAT_SELECTID: {\n      if( pScan->addrExplain ){\n        *(int*)pOut = aOp[ pScan->addrExplain ].p1;\n      }else{\n        *(int*)pOut = -1;\n      }\n      break;\n    }\n    case SQLITE_SCANSTAT_PARENTID: {\n      if( pScan->addrExplain ){\n        *(int*)pOut = aOp[ pScan->addrExplain ].p2;\n      }else{\n        *(int*)pOut = -1;\n      }\n      break;\n    }\n    case SQLITE_SCANSTAT_NCYCLE: {\n      i64 res = 0;\n      if( pScan->aAddrRange[0]==0 ){\n        res = -1;\n      }else{\n        int ii;\n        for(ii=0; ii<ArraySize(pScan->aAddrRange); ii+=2){\n          int iIns = pScan->aAddrRange[ii];\n          int iEnd = pScan->aAddrRange[ii+1];\n          if( iIns==0 ) break;\n          if( iIns>0 ){\n            while( iIns<=iEnd ){\n              res += aOp[iIns].nCycle;\n              iIns++;\n            }\n          }else{\n            int iOp;\n            for(iOp=0; iOp<nOp; iOp++){\n              Op *pOp = &aOp[iOp];\n              if( pOp->p1!=iEnd ) continue;\n              if( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_NCYCLE)==0 ){\n                continue;\n              }\n              res += aOp[iOp].nCycle;\n            }\n          }\n        }\n      }\n      *(i64*)pOut = res;\n      break;\n    }\n    default: {\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Return status data for a single loop within query pStmt.\n*/\nSQLITE_API int sqlite3_stmt_scanstatus(\n  sqlite3_stmt *pStmt,            /* Prepared statement being queried */\n  int iScan,                      /* Index of loop to report on */\n  int iScanStatusOp,              /* Which metric to return */\n  void *pOut                      /* OUT: Write the answer here */\n){\n  return sqlite3_stmt_scanstatus_v2(pStmt, iScan, iScanStatusOp, 0, pOut);\n}\n\n/*\n** Zero all counters associated with the sqlite3_stmt_scanstatus() data.\n*/\nSQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){\n  Vdbe *p = (Vdbe*)pStmt;\n  int ii;\n  for(ii=0; p!=0 && ii<p->nOp; ii++){\n    Op *pOp = &p->aOp[ii];\n    pOp->nExec = 0;\n    pOp->nCycle = 0;\n  }\n}\n#endif /* SQLITE_ENABLE_STMT_SCANSTATUS */\n\n/************** End of vdbeapi.c *********************************************/\n/************** Begin file vdbetrace.c ***************************************/\n/*\n** 2009 November 25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code used to insert the values of host parameters\n** (aka \"wildcards\") into the SQL text output by sqlite3_trace().\n**\n** The Vdbe parse-tree explainer is also found here.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n#ifndef SQLITE_OMIT_TRACE\n\n/*\n** zSql is a zero-terminated string of UTF-8 SQL text.  Return the number of\n** bytes in this text up to but excluding the first character in\n** a host parameter.  If the text contains no host parameters, return\n** the total number of bytes in the text.\n*/\nstatic i64 findNextHostParameter(const char *zSql, i64 *pnToken){\n  int tokenType;\n  i64 nTotal = 0;\n  i64 n;\n\n  *pnToken = 0;\n  while( zSql[0] ){\n    n = sqlite3GetToken((u8*)zSql, &tokenType);\n    assert( n>0 && tokenType!=TK_ILLEGAL );\n    if( tokenType==TK_VARIABLE ){\n      *pnToken = n;\n      break;\n    }\n    nTotal += n;\n    zSql += n;\n  }\n  return nTotal;\n}\n\n/*\n** This function returns a pointer to a nul-terminated string in memory\n** obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the\n** string contains a copy of zRawSql but with host parameters expanded to\n** their current bindings. Or, if sqlite3.nVdbeExec is greater than 1,\n** then the returned string holds a copy of zRawSql with \"-- \" prepended\n** to each line of text.\n**\n** If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then\n** then long strings and blobs are truncated to that many bytes.  This\n** can be used to prevent unreasonably large trace strings when dealing\n** with large (multi-megabyte) strings and blobs.\n**\n** The calling function is responsible for making sure the memory returned\n** is eventually freed.\n**\n** ALGORITHM:  Scan the input string looking for host parameters in any of\n** these forms:  ?, ?N, $A, @A, :A.  Take care to avoid text within\n** string literals, quoted identifier names, and comments.  For text forms,\n** the host parameter index is found by scanning the prepared\n** statement for the corresponding OP_Variable opcode.  Once the host\n** parameter index is known, locate the value in p->aVar[].  Then render\n** the value as a literal in place of the host parameter name.\n*/\nSQLITE_PRIVATE char *sqlite3VdbeExpandSql(\n  Vdbe *p,                 /* The prepared statement being evaluated */\n  const char *zRawSql      /* Raw text of the SQL statement */\n){\n  sqlite3 *db;             /* The database connection */\n  int idx = 0;             /* Index of a host parameter */\n  int nextIndex = 1;       /* Index of next ? host parameter */\n  i64 n;                   /* Length of a token prefix */\n  i64 nToken;              /* Length of the parameter token */\n  int i;                   /* Loop counter */\n  Mem *pVar;               /* Value of a host parameter */\n  StrAccum out;            /* Accumulate the output here */\n#ifndef SQLITE_OMIT_UTF16\n  Mem utf8;                /* Used to convert UTF16 into UTF8 for display */\n#endif\n\n  db = p->db;\n  sqlite3StrAccumInit(&out, 0, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);\n  if( db->nVdbeExec>1 ){\n    while( *zRawSql ){\n      const char *zStart = zRawSql;\n      while( *(zRawSql++)!='\\n' && *zRawSql );\n      sqlite3_str_append(&out, \"-- \", 3);\n      assert( (zRawSql - zStart) > 0 );\n      sqlite3_str_append(&out, zStart, (int)(zRawSql-zStart));\n    }\n  }else if( p->nVar==0 ){\n    sqlite3_str_append(&out, zRawSql, sqlite3Strlen30(zRawSql));\n  }else{\n    while( zRawSql[0] ){\n      n = findNextHostParameter(zRawSql, &nToken);\n      assert( n>0 );\n      sqlite3_str_append(&out, zRawSql, n);\n      zRawSql += n;\n      assert( zRawSql[0] || nToken==0 );\n      if( nToken==0 ) break;\n      if( zRawSql[0]=='?' ){\n        if( nToken>1 ){\n          assert( sqlite3Isdigit(zRawSql[1]) );\n          sqlite3GetInt32(&zRawSql[1], &idx);\n        }else{\n          idx = nextIndex;\n        }\n      }else{\n        assert( zRawSql[0]==':' || zRawSql[0]=='$' ||\n                zRawSql[0]=='@' || zRawSql[0]=='#' );\n        testcase( zRawSql[0]==':' );\n        testcase( zRawSql[0]=='$' );\n        testcase( zRawSql[0]=='@' );\n        testcase( zRawSql[0]=='#' );\n        idx = sqlite3VdbeParameterIndex(p, zRawSql, nToken);\n        assert( idx>0 );\n      }\n      zRawSql += nToken;\n      nextIndex = MAX(idx + 1, nextIndex);\n      assert( idx>0 && idx<=p->nVar );\n      pVar = &p->aVar[idx-1];\n      if( pVar->flags & MEM_Null ){\n        sqlite3_str_append(&out, \"NULL\", 4);\n      }else if( pVar->flags & (MEM_Int|MEM_IntReal) ){\n        sqlite3_str_appendf(&out, \"%lld\", pVar->u.i);\n      }else if( pVar->flags & MEM_Real ){\n        sqlite3_str_appendf(&out, \"%!.15g\", pVar->u.r);\n      }else if( pVar->flags & MEM_Str ){\n        int nOut;  /* Number of bytes of the string text to include in output */\n#ifndef SQLITE_OMIT_UTF16\n        u8 enc = ENC(db);\n        if( enc!=SQLITE_UTF8 ){\n          memset(&utf8, 0, sizeof(utf8));\n          utf8.db = db;\n          sqlite3VdbeMemSetStr(&utf8, pVar->z, pVar->n, enc, SQLITE_STATIC);\n          if( SQLITE_NOMEM==sqlite3VdbeChangeEncoding(&utf8, SQLITE_UTF8) ){\n            out.accError = SQLITE_NOMEM;\n            out.nAlloc = 0;\n          }\n          pVar = &utf8;\n        }\n#endif\n        nOut = pVar->n;\n#ifdef SQLITE_TRACE_SIZE_LIMIT\n        if( nOut>SQLITE_TRACE_SIZE_LIMIT ){\n          nOut = SQLITE_TRACE_SIZE_LIMIT;\n          while( nOut<pVar->n && (pVar->z[nOut]&0xc0)==0x80 ){ nOut++; }\n        }\n#endif\n        sqlite3_str_appendf(&out, \"'%.*q'\", nOut, pVar->z);\n#ifdef SQLITE_TRACE_SIZE_LIMIT\n        if( nOut<pVar->n ){\n          sqlite3_str_appendf(&out, \"/*+%d bytes*/\", pVar->n-nOut);\n        }\n#endif\n#ifndef SQLITE_OMIT_UTF16\n        if( enc!=SQLITE_UTF8 ) sqlite3VdbeMemRelease(&utf8);\n#endif\n      }else if( pVar->flags & MEM_Zero ){\n        sqlite3_str_appendf(&out, \"zeroblob(%d)\", pVar->u.nZero);\n      }else{\n        int nOut;  /* Number of bytes of the blob to include in output */\n        assert( pVar->flags & MEM_Blob );\n        sqlite3_str_append(&out, \"x'\", 2);\n        nOut = pVar->n;\n#ifdef SQLITE_TRACE_SIZE_LIMIT\n        if( nOut>SQLITE_TRACE_SIZE_LIMIT ) nOut = SQLITE_TRACE_SIZE_LIMIT;\n#endif\n        for(i=0; i<nOut; i++){\n          sqlite3_str_appendf(&out, \"%02x\", pVar->z[i]&0xff);\n        }\n        sqlite3_str_append(&out, \"'\", 1);\n#ifdef SQLITE_TRACE_SIZE_LIMIT\n        if( nOut<pVar->n ){\n          sqlite3_str_appendf(&out, \"/*+%d bytes*/\", pVar->n-nOut);\n        }\n#endif\n      }\n    }\n  }\n  if( out.accError ) sqlite3_str_reset(&out);\n  return sqlite3StrAccumFinish(&out);\n}\n\n#endif /* #ifndef SQLITE_OMIT_TRACE */\n\n/************** End of vdbetrace.c *******************************************/\n/************** Begin file vdbe.c ********************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** The code in this file implements the function that runs the\n** bytecode of a prepared statement.\n**\n** Various scripts scan this source file in order to generate HTML\n** documentation, headers files, or other derived files.  The formatting\n** of the code in this file is, therefore, important.  See other comments\n** in this file for details.  If in doubt, do not deviate from existing\n** commenting and indentation practices when changing or adding code.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n/*\n** High-resolution hardware timer used for debugging and testing only.\n*/\n#if defined(VDBE_PROFILE)  \\\n || defined(SQLITE_PERFORMANCE_TRACE) \\\n || defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n/************** Include hwtime.h in the middle of vdbe.c *********************/\n/************** Begin file hwtime.h ******************************************/\n/*\n** 2008 May 27\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains inline asm code for retrieving \"high-performance\"\n** counters for x86 and x86_64 class CPUs.\n*/\n#ifndef SQLITE_HWTIME_H\n#define SQLITE_HWTIME_H\n\n/*\n** The following routine only works on Pentium-class (or newer) processors.\n** It uses the RDTSC opcode to read the cycle count value out of the\n** processor and returns that value.  This can be used for high-res\n** profiling.\n*/\n#if !defined(__STRICT_ANSI__) && \\\n    (defined(__GNUC__) || defined(_MSC_VER)) && \\\n    (defined(i386) || defined(__i386__) || defined(_M_IX86))\n\n  #if defined(__GNUC__)\n\n  __inline__ sqlite_uint64 sqlite3Hwtime(void){\n     unsigned int lo, hi;\n     __asm__ __volatile__ (\"rdtsc\" : \"=a\" (lo), \"=d\" (hi));\n     return (sqlite_uint64)hi << 32 | lo;\n  }\n\n  #elif defined(_MSC_VER)\n\n  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){\n     __asm {\n        rdtsc\n        ret       ; return value at EDX:EAX\n     }\n  }\n\n  #endif\n\n#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__x86_64__))\n\n  __inline__ sqlite_uint64 sqlite3Hwtime(void){\n     unsigned int lo, hi;\n     __asm__ __volatile__ (\"rdtsc\" : \"=a\" (lo), \"=d\" (hi));\n     return (sqlite_uint64)hi << 32 | lo;\n  }\n\n#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))\n\n  __inline__ sqlite_uint64 sqlite3Hwtime(void){\n      unsigned long long retval;\n      unsigned long junk;\n      __asm__ __volatile__ (\"\\n\\\n          1:      mftbu   %1\\n\\\n                  mftb    %L0\\n\\\n                  mftbu   %0\\n\\\n                  cmpw    %0,%1\\n\\\n                  bne     1b\"\n                  : \"=r\" (retval), \"=r\" (junk));\n      return retval;\n  }\n\n#else\n\n  /*\n  ** asm() is needed for hardware timing support.  Without asm(),\n  ** disable the sqlite3Hwtime() routine.\n  **\n  ** sqlite3Hwtime() is only used for some obscure debugging\n  ** and analysis configurations, not in any deliverable, so this\n  ** should not be a great loss.\n  */\nSQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }\n\n#endif\n\n#endif /* !defined(SQLITE_HWTIME_H) */\n\n/************** End of hwtime.h **********************************************/\n/************** Continuing where we left off in vdbe.c ***********************/\n#endif\n\n/*\n** Invoke this macro on memory cells just prior to changing the\n** value of the cell.  This macro verifies that shallow copies are\n** not misused.  A shallow copy of a string or blob just copies a\n** pointer to the string or blob, not the content.  If the original\n** is changed while the copy is still in use, the string or blob might\n** be changed out from under the copy.  This macro verifies that nothing\n** like that ever happens.\n*/\n#ifdef SQLITE_DEBUG\n# define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M)\n#else\n# define memAboutToChange(P,M)\n#endif\n\n/*\n** The following global variable is incremented every time a cursor\n** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test\n** procedures use this information to make sure that indices are\n** working correctly.  This variable has no function other than to\n** help verify the correct operation of the library.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_search_count = 0;\n#endif\n\n/*\n** When this global variable is positive, it gets decremented once before\n** each instruction in the VDBE.  When it reaches zero, the u1.isInterrupted\n** field of the sqlite3 structure is set in order to simulate an interrupt.\n**\n** This facility is used for testing purposes only.  It does not function\n** in an ordinary build.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_interrupt_count = 0;\n#endif\n\n/*\n** The next global variable is incremented each type the OP_Sort opcode\n** is executed.  The test procedures use this information to make sure that\n** sorting is occurring or not occurring at appropriate times.   This variable\n** has no function other than to help verify the correct operation of the\n** library.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_sort_count = 0;\n#endif\n\n/*\n** The next global variable records the size of the largest MEM_Blob\n** or MEM_Str that has been used by a VDBE opcode.  The test procedures\n** use this information to make sure that the zero-blob functionality\n** is working correctly.   This variable has no function other than to\n** help verify the correct operation of the library.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_max_blobsize = 0;\nstatic void updateMaxBlobsize(Mem *p){\n  if( (p->flags & (MEM_Str|MEM_Blob))!=0 && p->n>sqlite3_max_blobsize ){\n    sqlite3_max_blobsize = p->n;\n  }\n}\n#endif\n\n/*\n** This macro evaluates to true if either the update hook or the preupdate\n** hook are enabled for database connect DB.\n*/\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n# define HAS_UPDATE_HOOK(DB) ((DB)->xPreUpdateCallback||(DB)->xUpdateCallback)\n#else\n# define HAS_UPDATE_HOOK(DB) ((DB)->xUpdateCallback)\n#endif\n\n/*\n** The next global variable is incremented each time the OP_Found opcode\n** is executed. This is used to test whether or not the foreign key\n** operation implemented using OP_FkIsZero is working. This variable\n** has no function other than to help verify the correct operation of the\n** library.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_found_count = 0;\n#endif\n\n/*\n** Test a register to see if it exceeds the current maximum blob size.\n** If it does, record the new maximum blob size.\n*/\n#if defined(SQLITE_TEST) && !defined(SQLITE_UNTESTABLE)\n# define UPDATE_MAX_BLOBSIZE(P)  updateMaxBlobsize(P)\n#else\n# define UPDATE_MAX_BLOBSIZE(P)\n#endif\n\n#ifdef SQLITE_DEBUG\n/* This routine provides a convenient place to set a breakpoint during\n** tracing with PRAGMA vdbe_trace=on.  The breakpoint fires right after\n** each opcode is printed.  Variables \"pc\" (program counter) and pOp are\n** available to add conditionals to the breakpoint.  GDB example:\n**\n**         break test_trace_breakpoint if pc=22\n**\n** Other useful labels for breakpoints include:\n**   test_addop_breakpoint(pc,pOp)\n**   sqlite3CorruptError(lineno)\n**   sqlite3MisuseError(lineno)\n**   sqlite3CantopenError(lineno)\n*/\nstatic void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){\n  static u64 n = 0;\n  (void)pc;\n  (void)pOp;\n  (void)v;\n  n++;\n  if( n==LARGEST_UINT64 ) abort(); /* So that n is used, preventing a warning */\n}\n#endif\n\n/*\n** Invoke the VDBE coverage callback, if that callback is defined.  This\n** feature is used for test suite validation only and does not appear an\n** production builds.\n**\n** M is the type of branch.  I is the direction taken for this instance of\n** the branch.\n**\n**   M: 2 - two-way branch (I=0: fall-thru   1: jump                )\n**      3 - two-way + NULL (I=0: fall-thru   1: jump      2: NULL   )\n**      4 - OP_Jump        (I=0: jump p1     1: jump p2   2: jump p3)\n**\n** In other words, if M is 2, then I is either 0 (for fall-through) or\n** 1 (for when the branch is taken).  If M is 3, the I is 0 for an\n** ordinary fall-through, I is 1 if the branch was taken, and I is 2\n** if the result of comparison is NULL.  For M=3, I=2 the jump may or\n** may not be taken, depending on the SQLITE_JUMPIFNULL flags in p5.\n** When M is 4, that means that an OP_Jump is being run.  I is 0, 1, or 2\n** depending on if the operands are less than, equal, or greater than.\n**\n** iSrcLine is the source code line (from the __LINE__ macro) that\n** generated the VDBE instruction combined with flag bits.  The source\n** code line number is in the lower 24 bits of iSrcLine and the upper\n** 8 bytes are flags.  The lower three bits of the flags indicate\n** values for I that should never occur.  For example, if the branch is\n** always taken, the flags should be 0x05 since the fall-through and\n** alternate branch are never taken.  If a branch is never taken then\n** flags should be 0x06 since only the fall-through approach is allowed.\n**\n** Bit 0x08 of the flags indicates an OP_Jump opcode that is only\n** interested in equal or not-equal.  In other words, I==0 and I==2\n** should be treated as equivalent\n**\n** Since only a line number is retained, not the filename, this macro\n** only works for amalgamation builds.  But that is ok, since these macros\n** should be no-ops except for special builds used to measure test coverage.\n*/\n#if !defined(SQLITE_VDBE_COVERAGE)\n# define VdbeBranchTaken(I,M)\n#else\n# define VdbeBranchTaken(I,M) vdbeTakeBranch(pOp->iSrcLine,I,M)\n  static void vdbeTakeBranch(u32 iSrcLine, u8 I, u8 M){\n    u8 mNever;\n    assert( I<=2 );  /* 0: fall through,  1: taken,  2: alternate taken */\n    assert( M<=4 );  /* 2: two-way branch, 3: three-way branch, 4: OP_Jump */\n    assert( I<M );   /* I can only be 2 if M is 3 or 4 */\n    /* Transform I from a integer [0,1,2] into a bitmask of [1,2,4] */\n    I = 1<<I;\n    /* The upper 8 bits of iSrcLine are flags.  The lower three bits of\n    ** the flags indicate directions that the branch can never go.  If\n    ** a branch really does go in one of those directions, assert right\n    ** away. */\n    mNever = iSrcLine >> 24;\n    assert( (I & mNever)==0 );\n    if( sqlite3GlobalConfig.xVdbeBranch==0 ) return;  /*NO_TEST*/\n    /* Invoke the branch coverage callback with three arguments:\n    **    iSrcLine - the line number of the VdbeCoverage() macro, with\n    **               flags removed.\n    **    I        - Mask of bits 0x07 indicating which cases are are\n    **               fulfilled by this instance of the jump.  0x01 means\n    **               fall-thru, 0x02 means taken, 0x04 means NULL.  Any\n    **               impossible cases (ex: if the comparison is never NULL)\n    **               are filled in automatically so that the coverage\n    **               measurement logic does not flag those impossible cases\n    **               as missed coverage.\n    **    M        - Type of jump.  Same as M argument above\n    */\n    I |= mNever;\n    if( M==2 ) I |= 0x04;\n    if( M==4 ){\n      I |= 0x08;\n      if( (mNever&0x08)!=0 && (I&0x05)!=0) I |= 0x05; /*NO_TEST*/\n    }\n    sqlite3GlobalConfig.xVdbeBranch(sqlite3GlobalConfig.pVdbeBranchArg,\n                                    iSrcLine&0xffffff, I, M);\n  }\n#endif\n\n/*\n** An ephemeral string value (signified by the MEM_Ephem flag) contains\n** a pointer to a dynamically allocated string where some other entity\n** is responsible for deallocating that string.  Because the register\n** does not control the string, it might be deleted without the register\n** knowing it.\n**\n** This routine converts an ephemeral string into a dynamically allocated\n** string that the register itself controls.  In other words, it\n** converts an MEM_Ephem string into a string with P.z==P.zMalloc.\n*/\n#define Deephemeralize(P) \\\n   if( ((P)->flags&MEM_Ephem)!=0 \\\n       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}\n\n/* Return true if the cursor was opened using the OP_OpenSorter opcode. */\n#define isSorter(x) ((x)->eCurType==CURTYPE_SORTER)\n\n/*\n** Allocate VdbeCursor number iCur.  Return a pointer to it.  Return NULL\n** if we run out of memory.\n*/\nstatic VdbeCursor *allocateCursor(\n  Vdbe *p,              /* The virtual machine */\n  int iCur,             /* Index of the new VdbeCursor */\n  int nField,           /* Number of fields in the table or index */\n  u8 eCurType           /* Type of the new cursor */\n){\n  /* Find the memory cell that will be used to store the blob of memory\n  ** required for this VdbeCursor structure. It is convenient to use a\n  ** vdbe memory cell to manage the memory allocation required for a\n  ** VdbeCursor structure for the following reasons:\n  **\n  **   * Sometimes cursor numbers are used for a couple of different\n  **     purposes in a vdbe program. The different uses might require\n  **     different sized allocations. Memory cells provide growable\n  **     allocations.\n  **\n  **   * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can\n  **     be freed lazily via the sqlite3_release_memory() API. This\n  **     minimizes the number of malloc calls made by the system.\n  **\n  ** The memory cell for cursor 0 is aMem[0]. The rest are allocated from\n  ** the top of the register space.  Cursor 1 is at Mem[p->nMem-1].\n  ** Cursor 2 is at Mem[p->nMem-2]. And so forth.\n  */\n  Mem *pMem = iCur>0 ? &p->aMem[p->nMem-iCur] : p->aMem;\n\n  i64 nByte;\n  VdbeCursor *pCx = 0;\n  nByte = SZ_VDBECURSOR(nField);\n  assert( ROUND8(nByte)==nByte );\n  if( eCurType==CURTYPE_BTREE ) nByte += sqlite3BtreeCursorSize();\n\n  assert( iCur>=0 && iCur<p->nCursor );\n  if( p->apCsr[iCur] ){ /*OPTIMIZATION-IF-FALSE*/\n    sqlite3VdbeFreeCursorNN(p, p->apCsr[iCur]);\n    p->apCsr[iCur] = 0;\n  }\n\n  /* There used to be a call to sqlite3VdbeMemClearAndResize() to make sure\n  ** the pMem used to hold space for the cursor has enough storage available\n  ** in pMem->zMalloc.  But for the special case of the aMem[] entries used\n  ** to hold cursors, it is faster to in-line the logic. */\n  assert( pMem->flags==MEM_Undefined );\n  assert( (pMem->flags & MEM_Dyn)==0 );\n  assert( pMem->szMalloc==0 || pMem->z==pMem->zMalloc );\n  if( pMem->szMalloc<nByte ){\n    if( pMem->szMalloc>0 ){\n      sqlite3DbFreeNN(pMem->db, pMem->zMalloc);\n    }\n    pMem->z = pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, nByte);\n    if( pMem->zMalloc==0 ){\n      pMem->szMalloc = 0;\n      return 0;\n    }\n    pMem->szMalloc = (int)nByte;\n  }\n\n  p->apCsr[iCur] = pCx = (VdbeCursor*)pMem->zMalloc;\n  memset(pCx, 0, offsetof(VdbeCursor,pAltCursor));\n  pCx->eCurType = eCurType;\n  pCx->nField = nField;\n  pCx->aOffset = &pCx->aType[nField];\n  if( eCurType==CURTYPE_BTREE ){\n    assert( ROUND8(SZ_VDBECURSOR(nField))==SZ_VDBECURSOR(nField) );\n    pCx->uc.pCursor = (BtCursor*)&pMem->z[SZ_VDBECURSOR(nField)];\n    sqlite3BtreeCursorZero(pCx->uc.pCursor);\n  }\n  return pCx;\n}\n\n/*\n** The string in pRec is known to look like an integer and to have a\n** floating point value of rValue.  Return true and set *piValue to the\n** integer value if the string is in range to be an integer.  Otherwise,\n** return false.\n*/\nstatic int alsoAnInt(Mem *pRec, double rValue, i64 *piValue){\n  i64 iValue;\n  iValue = sqlite3RealToI64(rValue);\n  if( sqlite3RealSameAsInt(rValue,iValue) ){\n    *piValue = iValue;\n    return 1;\n  }\n  return 0==sqlite3Atoi64(pRec->z, piValue, pRec->n, pRec->enc);\n}\n\n/*\n** Try to convert a value into a numeric representation if we can\n** do so without loss of information.  In other words, if the string\n** looks like a number, convert it into a number.  If it does not\n** look like a number, leave it alone.\n**\n** If the bTryForInt flag is true, then extra effort is made to give\n** an integer representation.  Strings that look like floating point\n** values but which have no fractional component (example: '48.00')\n** will have a MEM_Int representation when bTryForInt is true.\n**\n** If bTryForInt is false, then if the input string contains a decimal\n** point or exponential notation, the result is only MEM_Real, even\n** if there is an exact integer representation of the quantity.\n*/\nstatic void applyNumericAffinity(Mem *pRec, int bTryForInt){\n  double rValue;\n  u8 enc = pRec->enc;\n  int rc;\n  assert( (pRec->flags & (MEM_Str|MEM_Int|MEM_Real|MEM_IntReal))==MEM_Str );\n  rc = sqlite3AtoF(pRec->z, &rValue, pRec->n, enc);\n  if( rc<=0 ) return;\n  if( rc==1 && alsoAnInt(pRec, rValue, &pRec->u.i) ){\n    pRec->flags |= MEM_Int;\n  }else{\n    pRec->u.r = rValue;\n    pRec->flags |= MEM_Real;\n    if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);\n  }\n  /* TEXT->NUMERIC is many->one.  Hence, it is important to invalidate the\n  ** string representation after computing a numeric equivalent, because the\n  ** string representation might not be the canonical representation for the\n  ** numeric value.  Ticket [343634942dd54ab57b7024] 2018-01-31. */\n  pRec->flags &= ~MEM_Str;\n}\n\n/*\n** Processing is determine by the affinity parameter:\n**\n** SQLITE_AFF_INTEGER:\n** SQLITE_AFF_REAL:\n** SQLITE_AFF_NUMERIC:\n**    Try to convert pRec to an integer representation or a\n**    floating-point representation if an integer representation\n**    is not possible.  Note that the integer representation is\n**    always preferred, even if the affinity is REAL, because\n**    an integer representation is more space efficient on disk.\n**\n** SQLITE_AFF_FLEXNUM:\n**    If the value is text, then try to convert it into a number of\n**    some kind (integer or real) but do not make any other changes.\n**\n** SQLITE_AFF_TEXT:\n**    Convert pRec to a text representation.\n**\n** SQLITE_AFF_BLOB:\n** SQLITE_AFF_NONE:\n**    No-op.  pRec is unchanged.\n*/\nstatic void applyAffinity(\n  Mem *pRec,          /* The value to apply affinity to */\n  char affinity,      /* The affinity to be applied */\n  u8 enc              /* Use this text encoding */\n){\n  if( affinity>=SQLITE_AFF_NUMERIC ){\n    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL\n             || affinity==SQLITE_AFF_NUMERIC || affinity==SQLITE_AFF_FLEXNUM );\n    if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/\n      if( (pRec->flags & (MEM_Real|MEM_IntReal))==0 ){\n        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);\n      }else if( affinity<=SQLITE_AFF_REAL ){\n        sqlite3VdbeIntegerAffinity(pRec);\n      }\n    }\n  }else if( affinity==SQLITE_AFF_TEXT ){\n    /* Only attempt the conversion to TEXT if there is an integer or real\n    ** representation (blob and NULL do not get converted) but no string\n    ** representation.  It would be harmless to repeat the conversion if\n    ** there is already a string rep, but it is pointless to waste those\n    ** CPU cycles. */\n    if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/\n      if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){\n        testcase( pRec->flags & MEM_Int );\n        testcase( pRec->flags & MEM_Real );\n        testcase( pRec->flags & MEM_IntReal );\n        sqlite3VdbeMemStringify(pRec, enc, 1);\n      }\n    }\n    pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);\n  }\n}\n\n/*\n** Try to convert the type of a function argument or a result column\n** into a numeric representation.  Use either INTEGER or REAL whichever\n** is appropriate.  But only do the conversion if it is possible without\n** loss of information and return the revised type of the argument.\n*/\nSQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){\n  int eType = sqlite3_value_type(pVal);\n  if( eType==SQLITE_TEXT ){\n    Mem *pMem = (Mem*)pVal;\n    applyNumericAffinity(pMem, 0);\n    eType = sqlite3_value_type(pVal);\n  }\n  return eType;\n}\n\n/*\n** Exported version of applyAffinity(). This one works on sqlite3_value*,\n** not the internal Mem* type.\n*/\nSQLITE_PRIVATE void sqlite3ValueApplyAffinity(\n  sqlite3_value *pVal,\n  u8 affinity,\n  u8 enc\n){\n  applyAffinity((Mem *)pVal, affinity, enc);\n}\n\n/*\n** pMem currently only holds a string type (or maybe a BLOB that we can\n** interpret as a string if we want to).  Compute its corresponding\n** numeric type, if has one.  Set the pMem->u.r and pMem->u.i fields\n** accordingly.\n*/\nstatic u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){\n  int rc;\n  sqlite3_int64 ix;\n  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 );\n  assert( (pMem->flags & (MEM_Str|MEM_Blob))!=0 );\n  if( ExpandBlob(pMem) ){\n    pMem->u.i = 0;\n    return MEM_Int;\n  }\n  rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);\n  if( rc<=0 ){\n    if( rc==0 && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1 ){\n      pMem->u.i = ix;\n      return MEM_Int;\n    }else{\n      return MEM_Real;\n    }\n  }else if( rc==1 && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)==0 ){\n    pMem->u.i = ix;\n    return MEM_Int;\n  }\n  return MEM_Real;\n}\n\n/*\n** Return the numeric type for pMem, either MEM_Int or MEM_Real or both or\n** none.\n**\n** Unlike applyNumericAffinity(), this routine does not modify pMem->flags.\n** But it does set pMem->u.r and pMem->u.i appropriately.\n*/\nstatic u16 numericType(Mem *pMem){\n  assert( (pMem->flags & MEM_Null)==0\n       || pMem->db==0 || pMem->db->mallocFailed );\n  if( pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) ){\n    testcase( pMem->flags & MEM_Int );\n    testcase( pMem->flags & MEM_Real );\n    testcase( pMem->flags & MEM_IntReal );\n    return pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null);\n  }\n  assert( pMem->flags & (MEM_Str|MEM_Blob) );\n  testcase( pMem->flags & MEM_Str );\n  testcase( pMem->flags & MEM_Blob );\n  return computeNumericType(pMem);\n  return 0;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Write a nice string representation of the contents of cell pMem\n** into buffer zBuf, length nBuf.\n*/\nSQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){\n  int f = pMem->flags;\n  static const char *const encnames[] = {\"(X)\", \"(8)\", \"(16LE)\", \"(16BE)\"};\n  if( f&MEM_Blob ){\n    int i;\n    char c;\n    if( f & MEM_Dyn ){\n      c = 'z';\n      assert( (f & (MEM_Static|MEM_Ephem))==0 );\n    }else if( f & MEM_Static ){\n      c = 't';\n      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );\n    }else if( f & MEM_Ephem ){\n      c = 'e';\n      assert( (f & (MEM_Static|MEM_Dyn))==0 );\n    }else{\n      c = 's';\n    }\n    sqlite3_str_appendf(pStr, \"%cx[\", c);\n    for(i=0; i<25 && i<pMem->n; i++){\n      sqlite3_str_appendf(pStr, \"%02X\", ((int)pMem->z[i] & 0xFF));\n    }\n    sqlite3_str_appendf(pStr, \"|\");\n    for(i=0; i<25 && i<pMem->n; i++){\n      char z = pMem->z[i];\n      sqlite3_str_appendchar(pStr, 1, (z<32||z>126)?'.':z);\n    }\n    sqlite3_str_appendf(pStr,\"]\");\n    if( f & MEM_Zero ){\n      sqlite3_str_appendf(pStr, \"+%dz\",pMem->u.nZero);\n    }\n  }else if( f & MEM_Str ){\n    int j;\n    u8 c;\n    if( f & MEM_Dyn ){\n      c = 'z';\n      assert( (f & (MEM_Static|MEM_Ephem))==0 );\n    }else if( f & MEM_Static ){\n      c = 't';\n      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );\n    }else if( f & MEM_Ephem ){\n      c = 'e';\n      assert( (f & (MEM_Static|MEM_Dyn))==0 );\n    }else{\n      c = 's';\n    }\n    sqlite3_str_appendf(pStr, \" %c%d[\", c, pMem->n);\n    for(j=0; j<25 && j<pMem->n; j++){\n      c = pMem->z[j];\n      sqlite3_str_appendchar(pStr, 1, (c>=0x20&&c<=0x7f) ? c : '.');\n    }\n    sqlite3_str_appendf(pStr, \"]%s\", encnames[pMem->enc]);\n    if( f & MEM_Term ){\n      sqlite3_str_appendf(pStr, \"(0-term)\");\n    }\n  }\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Print the value of a register for tracing purposes:\n*/\nstatic void memTracePrint(Mem *p){\n  if( p->flags & MEM_Undefined ){\n    printf(\" undefined\");\n  }else if( p->flags & MEM_Null ){\n    printf(p->flags & MEM_Zero ? \" NULL-nochng\" : \" NULL\");\n  }else if( (p->flags & (MEM_Int|MEM_Str))==(MEM_Int|MEM_Str) ){\n    printf(\" si:%lld\", p->u.i);\n  }else if( (p->flags & (MEM_IntReal))!=0 ){\n    printf(\" ir:%lld\", p->u.i);\n  }else if( p->flags & MEM_Int ){\n    printf(\" i:%lld\", p->u.i);\n#ifndef SQLITE_OMIT_FLOATING_POINT\n  }else if( p->flags & MEM_Real ){\n    printf(\" r:%.17g\", p->u.r);\n#endif\n  }else if( sqlite3VdbeMemIsRowSet(p) ){\n    printf(\" (rowset)\");\n  }else{\n    StrAccum acc;\n    char zBuf[1000];\n    sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n    sqlite3VdbeMemPrettyPrint(p, &acc);\n    printf(\" %s\", sqlite3StrAccumFinish(&acc));\n  }\n  if( p->flags & MEM_Subtype ) printf(\" subtype=0x%02x\", p->eSubtype);\n}\nstatic void registerTrace(int iReg, Mem *p){\n  printf(\"R[%d] = \", iReg);\n  memTracePrint(p);\n  if( p->pScopyFrom ){\n    assert( p->pScopyFrom->bScopy );\n    printf(\" <== R[%d]\", (int)(p->pScopyFrom - &p[-iReg]));\n  }\n  printf(\"\\n\");\n  sqlite3VdbeCheckMemInvariants(p);\n}\n/**/ void sqlite3PrintMem(Mem *pMem){\n  memTracePrint(pMem);\n  printf(\"\\n\");\n  fflush(stdout);\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/*\n** Show the values of all registers in the virtual machine.  Used for\n** interactive debugging.\n*/\nSQLITE_PRIVATE void sqlite3VdbeRegisterDump(Vdbe *v){\n  int i;\n  for(i=1; i<v->nMem; i++) registerTrace(i, v->aMem+i);\n}\n#endif /* SQLITE_DEBUG */\n\n\n#ifdef SQLITE_DEBUG\n#  define REGISTER_TRACE(R,M) if(db->flags&SQLITE_VdbeTrace)registerTrace(R,M)\n#else\n#  define REGISTER_TRACE(R,M)\n#endif\n\n#ifndef NDEBUG\n/*\n** This function is only called from within an assert() expression. It\n** checks that the sqlite3.nTransaction variable is correctly set to\n** the number of non-transaction savepoints currently in the\n** linked list starting at sqlite3.pSavepoint.\n**\n** Usage:\n**\n**     assert( checkSavepointCount(db) );\n*/\nstatic int checkSavepointCount(sqlite3 *db){\n  int n = 0;\n  Savepoint *p;\n  for(p=db->pSavepoint; p; p=p->pNext) n++;\n  assert( n==(db->nSavepoint + db->isTransactionSavepoint) );\n  return 1;\n}\n#endif\n\n/*\n** Return the register of pOp->p2 after first preparing it to be\n** overwritten with an integer value.\n*/\nstatic SQLITE_NOINLINE Mem *out2PrereleaseWithClear(Mem *pOut){\n  sqlite3VdbeMemSetNull(pOut);\n  pOut->flags = MEM_Int;\n  return pOut;\n}\nstatic Mem *out2Prerelease(Vdbe *p, VdbeOp *pOp){\n  Mem *pOut;\n  assert( pOp->p2>0 );\n  assert( pOp->p2<=(p->nMem+1 - p->nCursor) );\n  pOut = &p->aMem[pOp->p2];\n  memAboutToChange(p, pOut);\n  if( VdbeMemDynamic(pOut) ){ /*OPTIMIZATION-IF-FALSE*/\n    return out2PrereleaseWithClear(pOut);\n  }else{\n    pOut->flags = MEM_Int;\n    return pOut;\n  }\n}\n\n/*\n** Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning\n** with pOp->p3.  Return the hash.\n*/\nstatic u64 filterHash(const Mem *aMem, const Op *pOp){\n  int i, mx;\n  u64 h = 0;\n\n  assert( pOp->p4type==P4_INT32 );\n  for(i=pOp->p3, mx=i+pOp->p4.i; i<mx; i++){\n    const Mem *p = &aMem[i];\n    if( p->flags & (MEM_Int|MEM_IntReal) ){\n      h += p->u.i;\n    }else if( p->flags & MEM_Real ){\n      h += sqlite3VdbeIntValue(p);\n    }else if( p->flags & (MEM_Str|MEM_Blob) ){\n      /* All strings have the same hash and all blobs have the same hash,\n      ** though, at least, those hashes are different from each other and\n      ** from NULL. */\n      h += 4093 + (p->flags & (MEM_Str|MEM_Blob));\n    }\n  }\n  return h;\n}\n\n\n/*\n** For OP_Column, factor out the case where content is loaded from\n** overflow pages, so that the code to implement this case is separate\n** the common case where all content fits on the page.  Factoring out\n** the code reduces register pressure and helps the common case\n** to run faster.\n*/\nstatic SQLITE_NOINLINE int vdbeColumnFromOverflow(\n  VdbeCursor *pC,       /* The BTree cursor from which we are reading */\n  int iCol,             /* The column to read */\n  u32 t,                /* The serial-type code for the column value */\n  i64 iOffset,          /* Offset to the start of the content value */\n  u32 cacheStatus,      /* Current Vdbe.cacheCtr value */\n  u32 colCacheCtr,      /* Current value of the column cache counter */\n  Mem *pDest            /* Store the value into this register. */\n){\n  int rc;\n  sqlite3 *db = pDest->db;\n  int encoding = pDest->enc;\n  int len = sqlite3VdbeSerialTypeLen(t);\n  assert( pC->eCurType==CURTYPE_BTREE );\n  if( len>db->aLimit[SQLITE_LIMIT_LENGTH] ) return SQLITE_TOOBIG;\n  if( len > 4000 && pC->pKeyInfo==0 ){\n    /* Cache large column values that are on overflow pages using\n    ** an RCStr (reference counted string) so that if they are reloaded,\n    ** that do not have to be copied a second time.  The overhead of\n    ** creating and managing the cache is such that this is only\n    ** profitable for larger TEXT and BLOB values.\n    **\n    ** Only do this on table-btrees so that writes to index-btrees do not\n    ** need to clear the cache.  This buys performance in the common case\n    ** in exchange for generality.\n    */\n    VdbeTxtBlbCache *pCache;\n    char *pBuf;\n    if( pC->colCache==0 ){\n      pC->pCache = sqlite3DbMallocZero(db, sizeof(VdbeTxtBlbCache) );\n      if( pC->pCache==0 ) return SQLITE_NOMEM;\n      pC->colCache = 1;\n    }\n    pCache = pC->pCache;\n    if( pCache->pCValue==0\n     || pCache->iCol!=iCol\n     || pCache->cacheStatus!=cacheStatus\n     || pCache->colCacheCtr!=colCacheCtr\n     || pCache->iOffset!=sqlite3BtreeOffset(pC->uc.pCursor)\n    ){\n      if( pCache->pCValue ) sqlite3RCStrUnref(pCache->pCValue);\n      pBuf = pCache->pCValue = sqlite3RCStrNew( len+3 );\n      if( pBuf==0 ) return SQLITE_NOMEM;\n      rc = sqlite3BtreePayload(pC->uc.pCursor, iOffset, len, pBuf);\n      if( rc ) return rc;\n      pBuf[len] = 0;\n      pBuf[len+1] = 0;\n      pBuf[len+2] = 0;\n      pCache->iCol = iCol;\n      pCache->cacheStatus = cacheStatus;\n      pCache->colCacheCtr = colCacheCtr;\n      pCache->iOffset = sqlite3BtreeOffset(pC->uc.pCursor);\n    }else{\n      pBuf = pCache->pCValue;\n    }\n    assert( t>=12 );\n    sqlite3RCStrRef(pBuf);\n    if( t&1 ){\n      rc = sqlite3VdbeMemSetStr(pDest, pBuf, len, encoding,\n                                sqlite3RCStrUnref);\n      pDest->flags |= MEM_Term;\n    }else{\n      rc = sqlite3VdbeMemSetStr(pDest, pBuf, len, 0,\n                                sqlite3RCStrUnref);\n    }\n  }else{\n    rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, iOffset, len, pDest);\n    if( rc ) return rc;\n    sqlite3VdbeSerialGet((const u8*)pDest->z, t, pDest);\n    if( (t&1)!=0 && encoding==SQLITE_UTF8 ){\n      pDest->z[len] = 0;\n      pDest->flags |= MEM_Term;\n    }\n  }\n  pDest->flags &= ~MEM_Ephem;\n  return rc;\n}\n\n/*\n** Send a \"statement aborts\" message to the error log.\n*/\nstatic SQLITE_NOINLINE void sqlite3VdbeLogAbort(\n  Vdbe *p,     /* The statement that is running at the time of failure */\n  int rc,      /* Error code */\n  Op *pOp,     /* Opcode that filed */\n  Op *aOp      /* All opcodes */\n){\n  const char *zSql = p->zSql;   /* Original SQL text */\n  const char *zPrefix = \"\";     /* Prefix added to SQL text */\n  int pc;                       /* Opcode address */\n  char zXtra[100];              /* Buffer space to store zPrefix */\n\n  if( p->pFrame ){\n    assert( aOp[0].opcode==OP_Init );\n    if( aOp[0].p4.z!=0 ){\n      assert( aOp[0].p4.z[0]=='-'\n           && aOp[0].p4.z[1]=='-'\n           && aOp[0].p4.z[2]==' ' );\n      sqlite3_snprintf(sizeof(zXtra), zXtra,\"/* %s */ \",aOp[0].p4.z+3);\n      zPrefix = zXtra;\n    }else{\n      zPrefix = \"/* unknown trigger */ \";\n    }\n  }\n  pc = (int)(pOp - aOp);\n  sqlite3_log(rc, \"statement aborts at %d: %s; [%s%s]\",\n                   pc, p->zErrMsg, zPrefix, zSql);\n}\n\n/*\n** Return the symbolic name for the data type of a pMem\n*/\nstatic const char *vdbeMemTypeName(Mem *pMem){\n  static const char *azTypes[] = {\n      /* SQLITE_INTEGER */ \"INT\",\n      /* SQLITE_FLOAT   */ \"REAL\",\n      /* SQLITE_TEXT    */ \"TEXT\",\n      /* SQLITE_BLOB    */ \"BLOB\",\n      /* SQLITE_NULL    */ \"NULL\"\n  };\n  return azTypes[sqlite3_value_type(pMem)-1];\n}\n\n/*\n** Execute as much of a VDBE program as we can.\n** This is the core of sqlite3_step().\n*/\nSQLITE_PRIVATE int sqlite3VdbeExec(\n  Vdbe *p                    /* The VDBE */\n){\n  Op *aOp = p->aOp;          /* Copy of p->aOp */\n  Op *pOp = aOp;             /* Current operation */\n#ifdef SQLITE_DEBUG\n  Op *pOrigOp;               /* Value of pOp at the top of the loop */\n  int nExtraDelete = 0;      /* Verifies FORDELETE and AUXDELETE flags */\n  u8 iCompareIsInit = 0;     /* iCompare is initialized */\n#endif\n  int rc = SQLITE_OK;        /* Value to return */\n  sqlite3 *db = p->db;       /* The database */\n  u8 resetSchemaOnFault = 0; /* Reset schema after an error if positive */\n  u8 encoding = ENC(db);     /* The database encoding */\n  int iCompare = 0;          /* Result of last comparison */\n  u64 nVmStep = 0;           /* Number of virtual machine steps */\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  u64 nProgressLimit;        /* Invoke xProgress() when nVmStep reaches this */\n#endif\n  Mem *aMem = p->aMem;       /* Copy of p->aMem */\n  Mem *pIn1 = 0;             /* 1st input operand */\n  Mem *pIn2 = 0;             /* 2nd input operand */\n  Mem *pIn3 = 0;             /* 3rd input operand */\n  Mem *pOut = 0;             /* Output operand */\n  u32 colCacheCtr = 0;       /* Column cache counter */\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE)\n  u64 *pnCycle = 0;\n  int bStmtScanStatus = IS_STMT_SCANSTATUS(db)!=0;\n#endif\n  /*** INSERT STACK UNION HERE ***/\n\n  assert( p->eVdbeState==VDBE_RUN_STATE );  /* sqlite3_step() verifies this */\n  if( DbMaskNonZero(p->lockMask) ){\n    sqlite3VdbeEnter(p);\n  }\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  if( db->xProgress ){\n    u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];\n    assert( 0 < db->nProgressOps );\n    nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps);\n  }else{\n    nProgressLimit = LARGEST_UINT64;\n  }\n#endif\n  if( p->rc==SQLITE_NOMEM ){\n    /* This happens if a malloc() inside a call to sqlite3_column_text() or\n    ** sqlite3_column_text16() failed.  */\n    goto no_mem;\n  }\n  assert( p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY );\n  testcase( p->rc!=SQLITE_OK );\n  p->rc = SQLITE_OK;\n  assert( p->bIsReader || p->readOnly!=0 );\n  p->iCurrentTime = 0;\n  assert( p->explain==0 );\n  db->busyHandler.nBusy = 0;\n  if( AtomicLoad(&db->u1.isInterrupted) ) goto abort_due_to_interrupt;\n  sqlite3VdbeIOTraceSql(p);\n#ifdef SQLITE_DEBUG\n  sqlite3BeginBenignMalloc();\n  if( p->pc==0\n   && (p->db->flags & (SQLITE_VdbeListing|SQLITE_VdbeEQP|SQLITE_VdbeTrace))!=0\n  ){\n    int i;\n    int once = 1;\n    sqlite3VdbePrintSql(p);\n    if( p->db->flags & SQLITE_VdbeListing ){\n      printf(\"VDBE Program Listing:\\n\");\n      for(i=0; i<p->nOp; i++){\n        sqlite3VdbePrintOp(stdout, i, &aOp[i]);\n      }\n    }\n    if( p->db->flags & SQLITE_VdbeEQP ){\n      for(i=0; i<p->nOp; i++){\n        if( aOp[i].opcode==OP_Explain ){\n          if( once ) printf(\"VDBE Query Plan:\\n\");\n          printf(\"%s\\n\", aOp[i].p4.z);\n          once = 0;\n        }\n      }\n    }\n    if( p->db->flags & SQLITE_VdbeTrace )  printf(\"VDBE Trace:\\n\");\n  }\n  sqlite3EndBenignMalloc();\n#endif\n  for(pOp=&aOp[p->pc]; 1; pOp++){\n    /* Errors are detected by individual opcodes, with an immediate\n    ** jumps to abort_due_to_error. */\n    assert( rc==SQLITE_OK );\n\n    assert( pOp>=aOp && pOp<&aOp[p->nOp]);\n    nVmStep++;\n\n#if defined(VDBE_PROFILE)\n    pOp->nExec++;\n    pnCycle = &pOp->nCycle;\n    if( sqlite3NProfileCnt==0 ) *pnCycle -= sqlite3Hwtime();\n#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n    if( bStmtScanStatus ){\n      pOp->nExec++;\n      pnCycle = &pOp->nCycle;\n      *pnCycle -= sqlite3Hwtime();\n    }\n#endif\n\n    /* Only allow tracing if SQLITE_DEBUG is defined.\n    */\n#ifdef SQLITE_DEBUG\n    if( db->flags & SQLITE_VdbeTrace ){\n      sqlite3VdbePrintOp(stdout, (int)(pOp - aOp), pOp);\n      test_trace_breakpoint((int)(pOp - aOp),pOp,p);\n    }\n#endif\n\n\n    /* Check to see if we need to simulate an interrupt.  This only happens\n    ** if we have a special test build.\n    */\n#ifdef SQLITE_TEST\n    if( sqlite3_interrupt_count>0 ){\n      sqlite3_interrupt_count--;\n      if( sqlite3_interrupt_count==0 ){\n        sqlite3_interrupt(db);\n      }\n    }\n#endif\n\n    /* Sanity checking on other operands */\n#ifdef SQLITE_DEBUG\n    {\n      u8 opProperty = sqlite3OpcodeProperty[pOp->opcode];\n      if( (opProperty & OPFLG_IN1)!=0 ){\n        assert( pOp->p1>0 );\n        assert( pOp->p1<=(p->nMem+1 - p->nCursor) );\n        assert( memIsValid(&aMem[pOp->p1]) );\n        assert( sqlite3VdbeCheckMemInvariants(&aMem[pOp->p1]) );\n        REGISTER_TRACE(pOp->p1, &aMem[pOp->p1]);\n      }\n      if( (opProperty & OPFLG_IN2)!=0 ){\n        assert( pOp->p2>0 );\n        assert( pOp->p2<=(p->nMem+1 - p->nCursor) );\n        assert( memIsValid(&aMem[pOp->p2]) );\n        assert( sqlite3VdbeCheckMemInvariants(&aMem[pOp->p2]) );\n        REGISTER_TRACE(pOp->p2, &aMem[pOp->p2]);\n      }\n      if( (opProperty & OPFLG_IN3)!=0 ){\n        assert( pOp->p3>0 );\n        assert( pOp->p3<=(p->nMem+1 - p->nCursor) );\n        assert( memIsValid(&aMem[pOp->p3]) );\n        assert( sqlite3VdbeCheckMemInvariants(&aMem[pOp->p3]) );\n        REGISTER_TRACE(pOp->p3, &aMem[pOp->p3]);\n      }\n      if( (opProperty & OPFLG_OUT2)!=0 ){\n        assert( pOp->p2>0 );\n        assert( pOp->p2<=(p->nMem+1 - p->nCursor) );\n        memAboutToChange(p, &aMem[pOp->p2]);\n      }\n      if( (opProperty & OPFLG_OUT3)!=0 ){\n        assert( pOp->p3>0 );\n        assert( pOp->p3<=(p->nMem+1 - p->nCursor) );\n        memAboutToChange(p, &aMem[pOp->p3]);\n      }\n    }\n#endif\n#ifdef SQLITE_DEBUG\n    pOrigOp = pOp;\n#endif\n\n    switch( pOp->opcode ){\n\n/*****************************************************************************\n** What follows is a massive switch statement where each case implements a\n** separate instruction in the virtual machine.  If we follow the usual\n** indentation conventions, each case should be indented by 6 spaces.  But\n** that is a lot of wasted space on the left margin.  So the code within\n** the switch statement will break with convention and be flush-left. Another\n** big comment (similar to this one) will mark the point in the code where\n** we transition back to normal indentation.\n**\n** The formatting of each case is important.  The makefile for SQLite\n** generates two C files \"opcodes.h\" and \"opcodes.c\" by scanning this\n** file looking for lines that begin with \"case OP_\".  The opcodes.h files\n** will be filled with #defines that give unique integer values to each\n** opcode and the opcodes.c file is filled with an array of strings where\n** each string is the symbolic name for the corresponding opcode.  If the\n** case statement is followed by a comment of the form \"/# same as ... #/\"\n** that comment is used to determine the particular value of the opcode.\n**\n** Other keywords in the comment that follows each case are used to\n** construct the OPFLG_INITIALIZER value that initializes opcodeProperty[].\n** Keywords include: in1, in2, in3, out2, out3.  See\n** the mkopcodeh.awk script for additional information.\n**\n** Documentation about VDBE opcodes is generated by scanning this file\n** for lines of that contain \"Opcode:\".  That line and all subsequent\n** comment lines are used in the generation of the opcode.html documentation\n** file.\n**\n** SUMMARY:\n**\n**     Formatting is important to scripts that scan this file.\n**     Do not deviate from the formatting style currently in use.\n**\n*****************************************************************************/\n\n/* Opcode:  Goto * P2 * * *\n**\n** An unconditional jump to address P2.\n** The next instruction executed will be\n** the one at index P2 from the beginning of\n** the program.\n**\n** The P1 parameter is not actually used by this opcode.  However, it\n** is sometimes set to 1 instead of 0 as a hint to the command-line shell\n** that this Goto is the bottom of a loop and that the lines from P2 down\n** to the current line should be indented for EXPLAIN output.\n*/\ncase OP_Goto: {             /* jump */\n\n#ifdef SQLITE_DEBUG\n  /* In debugging mode, when the p5 flags is set on an OP_Goto, that\n  ** means we should really jump back to the preceding OP_ReleaseReg\n  ** instruction. */\n  if( pOp->p5 ){\n    assert( pOp->p2 < (int)(pOp - aOp) );\n    assert( pOp->p2 > 1 );\n    pOp = &aOp[pOp->p2 - 2];\n    assert( pOp[1].opcode==OP_ReleaseReg );\n    goto check_for_interrupt;\n  }\n#endif\n\njump_to_p2_and_check_for_interrupt:\n  pOp = &aOp[pOp->p2 - 1];\n\n  /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev,\n  ** OP_VNext, or OP_SorterNext) all jump here upon\n  ** completion.  Check to see if sqlite3_interrupt() has been called\n  ** or if the progress callback needs to be invoked.\n  **\n  ** This code uses unstructured \"goto\" statements and does not look clean.\n  ** But that is not due to sloppy coding habits. The code is written this\n  ** way for performance, to avoid having to run the interrupt and progress\n  ** checks on every opcode.  This helps sqlite3_step() to run about 1.5%\n  ** faster according to \"valgrind --tool=cachegrind\" */\ncheck_for_interrupt:\n  if( AtomicLoad(&db->u1.isInterrupted) ) goto abort_due_to_interrupt;\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  /* Call the progress callback if it is configured and the required number\n  ** of VDBE ops have been executed (either since this invocation of\n  ** sqlite3VdbeExec() or since last time the progress callback was called).\n  ** If the progress callback returns non-zero, exit the virtual machine with\n  ** a return code SQLITE_ABORT.\n  */\n  while( nVmStep>=nProgressLimit && db->xProgress!=0 ){\n    assert( db->nProgressOps!=0 );\n    nProgressLimit += db->nProgressOps;\n    if( db->xProgress(db->pProgressArg) ){\n      nProgressLimit = LARGEST_UINT64;\n      rc = SQLITE_INTERRUPT;\n      goto abort_due_to_error;\n    }\n  }\n#endif\n\n  break;\n}\n\n/* Opcode:  Gosub P1 P2 * * *\n**\n** Write the current address onto register P1\n** and then jump to address P2.\n*/\ncase OP_Gosub: {            /* jump */\n  assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );\n  pIn1 = &aMem[pOp->p1];\n  assert( VdbeMemDynamic(pIn1)==0 );\n  memAboutToChange(p, pIn1);\n  pIn1->flags = MEM_Int;\n  pIn1->u.i = (int)(pOp-aOp);\n  REGISTER_TRACE(pOp->p1, pIn1);\n  goto jump_to_p2_and_check_for_interrupt;\n}\n\n/* Opcode:  Return P1 P2 P3 * *\n**\n** Jump to the address stored in register P1.  If P1 is a return address\n** register, then this accomplishes a return from a subroutine.\n**\n** If P3 is 1, then the jump is only taken if register P1 holds an integer\n** values, otherwise execution falls through to the next opcode, and the\n** OP_Return becomes a no-op. If P3 is 0, then register P1 must hold an\n** integer or else an assert() is raised.  P3 should be set to 1 when\n** this opcode is used in combination with OP_BeginSubrtn, and set to 0\n** otherwise.\n**\n** The value in register P1 is unchanged by this opcode.\n**\n** P2 is not used by the byte-code engine.  However, if P2 is positive\n** and also less than the current address, then the \"EXPLAIN\" output\n** formatter in the CLI will indent all opcodes from the P2 opcode up\n** to be not including the current Return.   P2 should be the first opcode\n** in the subroutine from which this opcode is returning.  Thus the P2\n** value is a byte-code indentation hint.  See tag-20220407a in\n** wherecode.c and shell.c.\n*/\ncase OP_Return: {           /* in1 */\n  pIn1 = &aMem[pOp->p1];\n  if( pIn1->flags & MEM_Int ){\n    if( pOp->p3 ){ VdbeBranchTaken(1, 2); }\n    pOp = &aOp[pIn1->u.i];\n  }else if( ALWAYS(pOp->p3) ){\n    VdbeBranchTaken(0, 2);\n  }\n  break;\n}\n\n/* Opcode: InitCoroutine P1 P2 P3 * *\n**\n** Set up register P1 so that it will Yield to the coroutine\n** located at address P3.\n**\n** If P2!=0 then the coroutine implementation immediately follows\n** this opcode.  So jump over the coroutine implementation to\n** address P2.\n**\n** See also: EndCoroutine\n*/\ncase OP_InitCoroutine: {     /* jump0 */\n  assert( pOp->p1>0 &&  pOp->p1<=(p->nMem+1 - p->nCursor) );\n  assert( pOp->p2>=0 && pOp->p2<p->nOp );\n  assert( pOp->p3>=0 && pOp->p3<p->nOp );\n  pOut = &aMem[pOp->p1];\n  assert( !VdbeMemDynamic(pOut) );\n  pOut->u.i = pOp->p3 - 1;\n  pOut->flags = MEM_Int;\n  if( pOp->p2==0 ) break;\n\n  /* Most jump operations do a goto to this spot in order to update\n  ** the pOp pointer. */\njump_to_p2:\n  assert( pOp->p2>0 );       /* There are never any jumps to instruction 0 */\n  assert( pOp->p2<p->nOp );  /* Jumps must be in range */\n  pOp = &aOp[pOp->p2 - 1];\n  break;\n}\n\n/* Opcode:  EndCoroutine P1 * * * *\n**\n** The instruction at the address in register P1 is a Yield.\n** Jump to the P2 parameter of that Yield.\n** After the jump, the value register P1 is left with a value\n** such that subsequent OP_Yields go back to the this same\n** OP_EndCoroutine instruction.\n**\n** See also: InitCoroutine\n*/\ncase OP_EndCoroutine: {           /* in1 */\n  VdbeOp *pCaller;\n  pIn1 = &aMem[pOp->p1];\n  assert( pIn1->flags==MEM_Int );\n  assert( pIn1->u.i>=0 && pIn1->u.i<p->nOp );\n  pCaller = &aOp[pIn1->u.i];\n  assert( pCaller->opcode==OP_Yield );\n  assert( pCaller->p2>=0 && pCaller->p2<p->nOp );\n  pIn1->u.i = (int)(pOp - p->aOp) - 1;\n  pOp = &aOp[pCaller->p2 - 1];\n  break;\n}\n\n/* Opcode:  Yield P1 P2 * * *\n**\n** Swap the program counter with the value in register P1.  This\n** has the effect of yielding to a coroutine.\n**\n** If the coroutine that is launched by this instruction ends with\n** Yield or Return then continue to the next instruction.  But if\n** the coroutine launched by this instruction ends with\n** EndCoroutine, then jump to P2 rather than continuing with the\n** next instruction.\n**\n** See also: InitCoroutine\n*/\ncase OP_Yield: {            /* in1, jump0 */\n  int pcDest;\n  pIn1 = &aMem[pOp->p1];\n  assert( VdbeMemDynamic(pIn1)==0 );\n  pIn1->flags = MEM_Int;\n  pcDest = (int)pIn1->u.i;\n  pIn1->u.i = (int)(pOp - aOp);\n  REGISTER_TRACE(pOp->p1, pIn1);\n  pOp = &aOp[pcDest];\n  break;\n}\n\n/* Opcode:  HaltIfNull  P1 P2 P3 P4 P5\n** Synopsis: if r[P3]=null halt\n**\n** Check the value in register P3.  If it is NULL then Halt using\n** parameter P1, P2, and P4 as if this were a Halt instruction.  If the\n** value in register P3 is not NULL, then this routine is a no-op.\n** The P5 parameter should be 1.\n*/\ncase OP_HaltIfNull: {      /* in3 */\n  pIn3 = &aMem[pOp->p3];\n#ifdef SQLITE_DEBUG\n  if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); }\n#endif\n  if( (pIn3->flags & MEM_Null)==0 ) break;\n  /* Fall through into OP_Halt */\n  /* no break */ deliberate_fall_through\n}\n\n/* Opcode:  Halt P1 P2 P3 P4 P5\n**\n** Exit immediately.  All open cursors, etc are closed\n** automatically.\n**\n** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),\n** or sqlite3_finalize().  For a normal halt, this should be SQLITE_OK (0).\n** For errors, it can be some other value.  If P1!=0 then P2 will determine\n** whether or not to rollback the current transaction.  Do not rollback\n** if P2==OE_Fail. Do the rollback if P2==OE_Rollback.  If P2==OE_Abort,\n** then back out all changes that have occurred during this execution of the\n** VDBE, but do not rollback the transaction.\n**\n** If P3 is not zero and P4 is NULL, then P3 is a register that holds the\n** text of an error message.\n**\n** If P3 is zero and P4 is not null then the error message string is held\n** in P4.\n**\n** P5 is a value between 1 and 4, inclusive, then the P4 error message\n** string is modified as follows:\n**\n**    1:  NOT NULL constraint failed: P4\n**    2:  UNIQUE constraint failed: P4\n**    3:  CHECK constraint failed: P4\n**    4:  FOREIGN KEY constraint failed: P4\n**\n** If P3 is zero and P5 is not zero and P4 is NULL, then everything after\n** the \":\" is omitted.\n**\n** There is an implied \"Halt 0 0 0\" instruction inserted at the very end of\n** every program.  So a jump past the last instruction of the program\n** is the same as executing Halt.\n*/\ncase OP_Halt: {\n  VdbeFrame *pFrame;\n  int pcx;\n\n#ifdef SQLITE_DEBUG\n  if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); }\n#endif\n  assert( pOp->p4type==P4_NOTUSED\n       || pOp->p4type==P4_STATIC\n       || pOp->p4type==P4_DYNAMIC );\n\n  /* A deliberately coded \"OP_Halt SQLITE_INTERNAL * * * *\" opcode indicates\n  ** something is wrong with the code generator.  Raise an assertion in order\n  ** to bring this to the attention of fuzzers and other testing tools. */\n  assert( pOp->p1!=SQLITE_INTERNAL );\n\n  if( p->pFrame && pOp->p1==SQLITE_OK ){\n    /* Halt the sub-program. Return control to the parent frame. */\n    pFrame = p->pFrame;\n    p->pFrame = pFrame->pParent;\n    p->nFrame--;\n    sqlite3VdbeSetChanges(db, p->nChange);\n    pcx = sqlite3VdbeFrameRestore(pFrame);\n    if( pOp->p2==OE_Ignore ){\n      /* Instruction pcx is the OP_Program that invoked the sub-program\n      ** currently being halted. If the p2 instruction of this OP_Halt\n      ** instruction is set to OE_Ignore, then the sub-program is throwing\n      ** an IGNORE exception. In this case jump to the address specified\n      ** as the p2 of the calling OP_Program.  */\n      pcx = p->aOp[pcx].p2-1;\n    }\n    aOp = p->aOp;\n    aMem = p->aMem;\n    pOp = &aOp[pcx];\n    break;\n  }\n  p->rc = pOp->p1;\n  p->errorAction = (u8)pOp->p2;\n  assert( pOp->p5<=4 );\n  if( p->rc ){\n    if( pOp->p3>0 && pOp->p4type==P4_NOTUSED ){\n      const char *zErr;\n      assert( pOp->p3<=(p->nMem + 1 - p->nCursor) );\n      zErr = sqlite3ValueText(&aMem[pOp->p3], SQLITE_UTF8);\n      sqlite3VdbeError(p, \"%s\", zErr);\n    }else if( pOp->p5 ){\n      static const char * const azType[] = { \"NOT NULL\", \"UNIQUE\", \"CHECK\",\n                                             \"FOREIGN KEY\" };\n      testcase( pOp->p5==1 );\n      testcase( pOp->p5==2 );\n      testcase( pOp->p5==3 );\n      testcase( pOp->p5==4 );\n      sqlite3VdbeError(p, \"%s constraint failed\", azType[pOp->p5-1]);\n      if( pOp->p4.z ){\n        p->zErrMsg = sqlite3MPrintf(db, \"%z: %s\", p->zErrMsg, pOp->p4.z);\n      }\n    }else{\n      sqlite3VdbeError(p, \"%s\", pOp->p4.z);\n    }\n    sqlite3VdbeLogAbort(p, pOp->p1, pOp, aOp);\n  }\n  rc = sqlite3VdbeHalt(p);\n  assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );\n  if( rc==SQLITE_BUSY ){\n    p->rc = SQLITE_BUSY;\n  }else{\n    assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT );\n    assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 );\n    rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;\n  }\n  goto vdbe_return;\n}\n\n/* Opcode: Integer P1 P2 * * *\n** Synopsis: r[P2]=P1\n**\n** The 32-bit integer value P1 is written into register P2.\n*/\ncase OP_Integer: {         /* out2 */\n  pOut = out2Prerelease(p, pOp);\n  pOut->u.i = pOp->p1;\n  break;\n}\n\n/* Opcode: Int64 * P2 * P4 *\n** Synopsis: r[P2]=P4\n**\n** P4 is a pointer to a 64-bit integer value.\n** Write that value into register P2.\n*/\ncase OP_Int64: {           /* out2 */\n  pOut = out2Prerelease(p, pOp);\n  assert( pOp->p4.pI64!=0 );\n  pOut->u.i = *pOp->p4.pI64;\n  break;\n}\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/* Opcode: Real * P2 * P4 *\n** Synopsis: r[P2]=P4\n**\n** P4 is a pointer to a 64-bit floating point value.\n** Write that value into register P2.\n*/\ncase OP_Real: {            /* same as TK_FLOAT, out2 */\n  pOut = out2Prerelease(p, pOp);\n  pOut->flags = MEM_Real;\n  assert( !sqlite3IsNaN(*pOp->p4.pReal) );\n  pOut->u.r = *pOp->p4.pReal;\n  break;\n}\n#endif\n\n/* Opcode: String8 * P2 * P4 *\n** Synopsis: r[P2]='P4'\n**\n** P4 points to a nul terminated UTF-8 string. This opcode is transformed\n** into a String opcode before it is executed for the first time.  During\n** this transformation, the length of string P4 is computed and stored\n** as the P1 parameter.\n*/\ncase OP_String8: {         /* same as TK_STRING, out2 */\n  assert( pOp->p4.z!=0 );\n  pOut = out2Prerelease(p, pOp);\n  pOp->p1 = sqlite3Strlen30(pOp->p4.z);\n\n#ifndef SQLITE_OMIT_UTF16\n  if( encoding!=SQLITE_UTF8 ){\n    rc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);\n    assert( rc==SQLITE_OK || rc==SQLITE_TOOBIG );\n    if( rc ) goto too_big;\n    if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;\n    assert( pOut->szMalloc>0 && pOut->zMalloc==pOut->z );\n    assert( VdbeMemDynamic(pOut)==0 );\n    pOut->szMalloc = 0;\n    pOut->flags |= MEM_Static;\n    if( pOp->p4type==P4_DYNAMIC ){\n      sqlite3DbFree(db, pOp->p4.z);\n    }\n    pOp->p4type = P4_DYNAMIC;\n    pOp->p4.z = pOut->z;\n    pOp->p1 = pOut->n;\n  }\n#endif\n  if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    goto too_big;\n  }\n  pOp->opcode = OP_String;\n  assert( rc==SQLITE_OK );\n  /* Fall through to the next case, OP_String */\n  /* no break */ deliberate_fall_through\n}\n\n/* Opcode: String P1 P2 P3 P4 P5\n** Synopsis: r[P2]='P4' (len=P1)\n**\n** The string value P4 of length P1 (bytes) is stored in register P2.\n**\n** If P3 is not zero and the content of register P3 is equal to P5, then\n** the datatype of the register P2 is converted to BLOB.  The content is\n** the same sequence of bytes, it is merely interpreted as a BLOB instead\n** of a string, as if it had been CAST.  In other words:\n**\n** if( P3!=0 and reg[P3]==P5 ) reg[P2] := CAST(reg[P2] as BLOB)\n*/\ncase OP_String: {          /* out2 */\n  assert( pOp->p4.z!=0 );\n  pOut = out2Prerelease(p, pOp);\n  pOut->flags = MEM_Str|MEM_Static|MEM_Term;\n  pOut->z = pOp->p4.z;\n  pOut->n = pOp->p1;\n  pOut->enc = encoding;\n  UPDATE_MAX_BLOBSIZE(pOut);\n#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n  if( pOp->p3>0 ){\n    assert( pOp->p3<=(p->nMem+1 - p->nCursor) );\n    pIn3 = &aMem[pOp->p3];\n    assert( pIn3->flags & MEM_Int );\n    if( pIn3->u.i==pOp->p5 ) pOut->flags = MEM_Blob|MEM_Static|MEM_Term;\n  }\n#endif\n  break;\n}\n\n/* Opcode: BeginSubrtn * P2 * * *\n** Synopsis: r[P2]=NULL\n**\n** Mark the beginning of a subroutine that can be entered in-line\n** or that can be called using OP_Gosub.  The subroutine should\n** be terminated by an OP_Return instruction that has a P1 operand that\n** is the same as the P2 operand to this opcode and that has P3 set to 1.\n** If the subroutine is entered in-line, then the OP_Return will simply\n** fall through.  But if the subroutine is entered using OP_Gosub, then\n** the OP_Return will jump back to the first instruction after the OP_Gosub.\n**\n** This routine works by loading a NULL into the P2 register.  When the\n** return address register contains a NULL, the OP_Return instruction is\n** a no-op that simply falls through to the next instruction (assuming that\n** the OP_Return opcode has a P3 value of 1).  Thus if the subroutine is\n** entered in-line, then the OP_Return will cause in-line execution to\n** continue.  But if the subroutine is entered via OP_Gosub, then the\n** OP_Return will cause a return to the address following the OP_Gosub.\n**\n** This opcode is identical to OP_Null.  It has a different name\n** only to make the byte code easier to read and verify.\n*/\n/* Opcode: Null P1 P2 P3 * *\n** Synopsis: r[P2..P3]=NULL\n**\n** Write a NULL into registers P2.  If P3 greater than P2, then also write\n** NULL into register P3 and every register in between P2 and P3.  If P3\n** is less than P2 (typically P3 is zero) then only register P2 is\n** set to NULL.\n**\n** If the P1 value is non-zero, then also set the MEM_Cleared flag so that\n** NULL values will not compare equal even if SQLITE_NULLEQ is set on\n** OP_Ne or OP_Eq.\n*/\ncase OP_BeginSubrtn:\ncase OP_Null: {           /* out2 */\n  int cnt;\n  u16 nullFlag;\n  pOut = out2Prerelease(p, pOp);\n  cnt = pOp->p3-pOp->p2;\n  assert( pOp->p3<=(p->nMem+1 - p->nCursor) );\n  pOut->flags = nullFlag = pOp->p1 ? (MEM_Null|MEM_Cleared) : MEM_Null;\n  pOut->n = 0;\n#ifdef SQLITE_DEBUG\n  pOut->uTemp = 0;\n#endif\n  while( cnt>0 ){\n    pOut++;\n    memAboutToChange(p, pOut);\n    sqlite3VdbeMemSetNull(pOut);\n    pOut->flags = nullFlag;\n    pOut->n = 0;\n    cnt--;\n  }\n  break;\n}\n\n/* Opcode: SoftNull P1 * * * *\n** Synopsis: r[P1]=NULL\n**\n** Set register P1 to have the value NULL as seen by the OP_MakeRecord\n** instruction, but do not free any string or blob memory associated with\n** the register, so that if the value was a string or blob that was\n** previously copied using OP_SCopy, the copies will continue to be valid.\n*/\ncase OP_SoftNull: {\n  assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );\n  pOut = &aMem[pOp->p1];\n  pOut->flags = (pOut->flags&~(MEM_Undefined|MEM_AffMask))|MEM_Null;\n  break;\n}\n\n/* Opcode: Blob P1 P2 * P4 *\n** Synopsis: r[P2]=P4 (len=P1)\n**\n** P4 points to a blob of data P1 bytes long.  Store this\n** blob in register P2.  If P4 is a NULL pointer, then construct\n** a zero-filled blob that is P1 bytes long in P2.\n*/\ncase OP_Blob: {                /* out2 */\n  assert( pOp->p1 <= SQLITE_MAX_LENGTH );\n  pOut = out2Prerelease(p, pOp);\n  if( pOp->p4.z==0 ){\n    sqlite3VdbeMemSetZeroBlob(pOut, pOp->p1);\n    if( sqlite3VdbeMemExpandBlob(pOut) ) goto no_mem;\n  }else{\n    sqlite3VdbeMemSetStr(pOut, pOp->p4.z, pOp->p1, 0, 0);\n  }\n  pOut->enc = encoding;\n  UPDATE_MAX_BLOBSIZE(pOut);\n  break;\n}\n\n/* Opcode: Variable P1 P2 * * *\n** Synopsis: r[P2]=parameter(P1)\n**\n** Transfer the values of bound parameter P1 into register P2\n*/\ncase OP_Variable: {            /* out2 */\n  Mem *pVar;       /* Value being transferred */\n\n  assert( pOp->p1>0 && pOp->p1<=p->nVar );\n  pVar = &p->aVar[pOp->p1 - 1];\n  if( sqlite3VdbeMemTooBig(pVar) ){\n    goto too_big;\n  }\n  pOut = &aMem[pOp->p2];\n  if( VdbeMemDynamic(pOut) ) sqlite3VdbeMemSetNull(pOut);\n  memcpy(pOut, pVar, MEMCELLSIZE);\n  pOut->flags &= ~(MEM_Dyn|MEM_Ephem);\n  pOut->flags |= MEM_Static|MEM_FromBind;\n  UPDATE_MAX_BLOBSIZE(pOut);\n  break;\n}\n\n/* Opcode: Move P1 P2 P3 * *\n** Synopsis: r[P2@P3]=r[P1@P3]\n**\n** Move the P3 values in register P1..P1+P3-1 over into\n** registers P2..P2+P3-1.  Registers P1..P1+P3-1 are\n** left holding a NULL.  It is an error for register ranges\n** P1..P1+P3-1 and P2..P2+P3-1 to overlap.  It is an error\n** for P3 to be less than 1.\n*/\ncase OP_Move: {\n  int n;           /* Number of registers left to copy */\n  int p1;          /* Register to copy from */\n  int p2;          /* Register to copy to */\n\n  n = pOp->p3;\n  p1 = pOp->p1;\n  p2 = pOp->p2;\n  assert( n>0 && p1>0 && p2>0 );\n  assert( p1+n<=p2 || p2+n<=p1 );\n\n  pIn1 = &aMem[p1];\n  pOut = &aMem[p2];\n  do{\n    assert( pOut<=&aMem[(p->nMem+1 - p->nCursor)] );\n    assert( pIn1<=&aMem[(p->nMem+1 - p->nCursor)] );\n    assert( memIsValid(pIn1) );\n    memAboutToChange(p, pOut);\n    sqlite3VdbeMemMove(pOut, pIn1);\n#ifdef SQLITE_DEBUG\n    pIn1->pScopyFrom = 0;\n    { int i;\n      for(i=1; i<p->nMem; i++){\n        if( aMem[i].pScopyFrom==pIn1 ){\n          assert( aMem[i].bScopy );\n          aMem[i].pScopyFrom = pOut;\n        }\n      }\n    }\n#endif\n    Deephemeralize(pOut);\n    REGISTER_TRACE(p2++, pOut);\n    pIn1++;\n    pOut++;\n  }while( --n );\n  break;\n}\n\n/* Opcode: Copy P1 P2 P3 * P5\n** Synopsis: r[P2@P3+1]=r[P1@P3+1]\n**\n** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.\n**\n** If the 0x0002 bit of P5 is set then also clear the MEM_Subtype flag in the\n** destination.  The 0x0001 bit of P5 indicates that this Copy opcode cannot\n** be merged.  The 0x0001 bit is used by the query planner and does not\n** come into play during query execution.\n**\n** This instruction makes a deep copy of the value.  A duplicate\n** is made of any string or blob constant.  See also OP_SCopy.\n*/\ncase OP_Copy: {\n  int n;\n\n  n = pOp->p3;\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  assert( pOut!=pIn1 );\n  while( 1 ){\n    memAboutToChange(p, pOut);\n    sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);\n    Deephemeralize(pOut);\n    if( (pOut->flags & MEM_Subtype)!=0 &&  (pOp->p5 & 0x0002)!=0 ){\n      pOut->flags &= ~MEM_Subtype;\n    }\n#ifdef SQLITE_DEBUG\n    pOut->pScopyFrom = 0;\n#endif\n    REGISTER_TRACE(pOp->p2+pOp->p3-n, pOut);\n    if( (n--)==0 ) break;\n    pOut++;\n    pIn1++;\n  }\n  break;\n}\n\n/* Opcode: SCopy P1 P2 * * *\n** Synopsis: r[P2]=r[P1]\n**\n** Make a shallow copy of register P1 into register P2.\n**\n** This instruction makes a shallow copy of the value.  If the value\n** is a string or blob, then the copy is only a pointer to the\n** original and hence if the original changes so will the copy.\n** Worse, if the original is deallocated, the copy becomes invalid.\n** Thus the program must guarantee that the original will not change\n** during the lifetime of the copy.  Use OP_Copy to make a complete\n** copy.\n*/\ncase OP_SCopy: {            /* out2 */\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  assert( pOut!=pIn1 );\n  sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);\n#ifdef SQLITE_DEBUG\n  pOut->pScopyFrom = pIn1;\n  pOut->mScopyFlags = pIn1->flags;\n  pIn1->bScopy = 1;\n#endif\n  break;\n}\n\n/* Opcode: IntCopy P1 P2 * * *\n** Synopsis: r[P2]=r[P1]\n**\n** Transfer the integer value held in register P1 into register P2.\n**\n** This is an optimized version of SCopy that works only for integer\n** values.\n*/\ncase OP_IntCopy: {            /* out2 */\n  pIn1 = &aMem[pOp->p1];\n  assert( (pIn1->flags & MEM_Int)!=0 );\n  pOut = &aMem[pOp->p2];\n  sqlite3VdbeMemSetInt64(pOut, pIn1->u.i);\n  break;\n}\n\n/* Opcode: FkCheck * * * * *\n**\n** Halt with an SQLITE_CONSTRAINT error if there are any unresolved\n** foreign key constraint violations.  If there are no foreign key\n** constraint violations, this is a no-op.\n**\n** FK constraint violations are also checked when the prepared statement\n** exits.  This opcode is used to raise foreign key constraint errors prior\n** to returning results such as a row change count or the result of a\n** RETURNING clause.\n*/\ncase OP_FkCheck: {\n  if( (rc = sqlite3VdbeCheckFkImmediate(p))!=SQLITE_OK ){\n    goto abort_due_to_error;\n  }\n  break;\n}\n\n/* Opcode: ResultRow P1 P2 * * *\n** Synopsis: output=r[P1@P2]\n**\n** The registers P1 through P1+P2-1 contain a single row of\n** results. This opcode causes the sqlite3_step() call to terminate\n** with an SQLITE_ROW return code and it sets up the sqlite3_stmt\n** structure to provide access to the r(P1)..r(P1+P2-1) values as\n** the result row.\n*/\ncase OP_ResultRow: {\n  assert( p->nResColumn==pOp->p2 );\n  assert( pOp->p1>0 || CORRUPT_DB );\n  assert( pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1 );\n\n  p->cacheCtr = (p->cacheCtr + 2)|1;\n  p->pResultRow = &aMem[pOp->p1];\n#ifdef SQLITE_DEBUG\n  {\n    Mem *pMem = p->pResultRow;\n    int i;\n    for(i=0; i<pOp->p2; i++){\n      assert( memIsValid(&pMem[i]) );\n      REGISTER_TRACE(pOp->p1+i, &pMem[i]);\n      /* The registers in the result will not be used again when the\n      ** prepared statement restarts.  This is because sqlite3_column()\n      ** APIs might have caused type conversions of made other changes to\n      ** the register values.  Therefore, we can go ahead and break any\n      ** OP_SCopy dependencies. */\n      pMem[i].pScopyFrom = 0;\n    }\n  }\n#endif\n  if( db->mallocFailed ) goto no_mem;\n  if( db->mTrace & SQLITE_TRACE_ROW ){\n    db->trace.xV2(SQLITE_TRACE_ROW, db->pTraceArg, p, 0);\n  }\n  p->pc = (int)(pOp - aOp) + 1;\n  rc = SQLITE_ROW;\n  goto vdbe_return;\n}\n\n/* Opcode: Concat P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]+r[P1]\n**\n** Add the text in register P1 onto the end of the text in\n** register P2 and store the result in register P3.\n** If either the P1 or P2 text are NULL then store NULL in P3.\n**\n**   P3 = P2 || P1\n**\n** It is illegal for P1 and P3 to be the same register. Sometimes,\n** if P3 is the same register as P2, the implementation is able\n** to avoid a memcpy().\n*/\ncase OP_Concat: {           /* same as TK_CONCAT, in1, in2, out3 */\n  i64 nByte;          /* Total size of the output string or blob */\n  u16 flags1;         /* Initial flags for P1 */\n  u16 flags2;         /* Initial flags for P2 */\n\n  pIn1 = &aMem[pOp->p1];\n  pIn2 = &aMem[pOp->p2];\n  pOut = &aMem[pOp->p3];\n  testcase( pOut==pIn2 );\n  assert( pIn1!=pOut );\n  flags1 = pIn1->flags;\n  testcase( flags1 & MEM_Null );\n  testcase( pIn2->flags & MEM_Null );\n  if( (flags1 | pIn2->flags) & MEM_Null ){\n    sqlite3VdbeMemSetNull(pOut);\n    break;\n  }\n  if( (flags1 & (MEM_Str|MEM_Blob))==0 ){\n    if( sqlite3VdbeMemStringify(pIn1,encoding,0) ) goto no_mem;\n    flags1 = pIn1->flags & ~MEM_Str;\n  }else if( (flags1 & MEM_Zero)!=0 ){\n    if( sqlite3VdbeMemExpandBlob(pIn1) ) goto no_mem;\n    flags1 = pIn1->flags & ~MEM_Str;\n  }\n  flags2 = pIn2->flags;\n  if( (flags2 & (MEM_Str|MEM_Blob))==0 ){\n    if( sqlite3VdbeMemStringify(pIn2,encoding,0) ) goto no_mem;\n    flags2 = pIn2->flags & ~MEM_Str;\n  }else if( (flags2 & MEM_Zero)!=0 ){\n    if( sqlite3VdbeMemExpandBlob(pIn2) ) goto no_mem;\n    flags2 = pIn2->flags & ~MEM_Str;\n  }\n  nByte = pIn1->n;\n  nByte += pIn2->n;\n  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    goto too_big;\n  }\n#if SQLITE_MAX_LENGTH>2147483645\n  if( nByte>2147483645 ){ goto too_big; }\n#endif\n  if( sqlite3VdbeMemGrow(pOut, (int)nByte+2, pOut==pIn2) ){\n    goto no_mem;\n  }\n  MemSetTypeFlag(pOut, MEM_Str);\n  if( pOut!=pIn2 ){\n    memcpy(pOut->z, pIn2->z, pIn2->n);\n    assert( (pIn2->flags & MEM_Dyn) == (flags2 & MEM_Dyn) );\n    pIn2->flags = flags2;\n  }\n  memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n);\n  assert( (pIn1->flags & MEM_Dyn) == (flags1 & MEM_Dyn) );\n  pIn1->flags = flags1;\n  if( encoding>SQLITE_UTF8 ) nByte &= ~1;\n  pOut->z[nByte]=0;\n  pOut->z[nByte+1] = 0;\n  pOut->flags |= MEM_Term;\n  pOut->n = (int)nByte;\n  pOut->enc = encoding;\n  UPDATE_MAX_BLOBSIZE(pOut);\n  break;\n}\n\n/* Opcode: Add P1 P2 P3 * *\n** Synopsis: r[P3]=r[P1]+r[P2]\n**\n** Add the value in register P1 to the value in register P2\n** and store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: Multiply P1 P2 P3 * *\n** Synopsis: r[P3]=r[P1]*r[P2]\n**\n**\n** Multiply the value in register P1 by the value in register P2\n** and store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: Subtract P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]-r[P1]\n**\n** Subtract the value in register P1 from the value in register P2\n** and store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: Divide P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]/r[P1]\n**\n** Divide the value in register P1 by the value in register P2\n** and store the result in register P3 (P3=P2/P1). If the value in\n** register P1 is zero, then the result is NULL. If either input is\n** NULL, the result is NULL.\n*/\n/* Opcode: Remainder P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]%r[P1]\n**\n** Compute the remainder after integer register P2 is divided by\n** register P1 and store the result in register P3.\n** If the value in register P1 is zero the result is NULL.\n** If either operand is NULL, the result is NULL.\n*/\ncase OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */\ncase OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */\ncase OP_Multiply:              /* same as TK_STAR, in1, in2, out3 */\ncase OP_Divide:                /* same as TK_SLASH, in1, in2, out3 */\ncase OP_Remainder: {           /* same as TK_REM, in1, in2, out3 */\n  u16 type1;      /* Numeric type of left operand */\n  u16 type2;      /* Numeric type of right operand */\n  i64 iA;         /* Integer value of left operand */\n  i64 iB;         /* Integer value of right operand */\n  double rA;      /* Real value of left operand */\n  double rB;      /* Real value of right operand */\n\n  pIn1 = &aMem[pOp->p1];\n  type1 = pIn1->flags;\n  pIn2 = &aMem[pOp->p2];\n  type2 = pIn2->flags;\n  pOut = &aMem[pOp->p3];\n  if( (type1 & type2 & MEM_Int)!=0 ){\nint_math:\n    iA = pIn1->u.i;\n    iB = pIn2->u.i;\n    switch( pOp->opcode ){\n      case OP_Add:       if( sqlite3AddInt64(&iB,iA) ) goto fp_math;  break;\n      case OP_Subtract:  if( sqlite3SubInt64(&iB,iA) ) goto fp_math;  break;\n      case OP_Multiply:  if( sqlite3MulInt64(&iB,iA) ) goto fp_math;  break;\n      case OP_Divide: {\n        if( iA==0 ) goto arithmetic_result_is_null;\n        if( iA==-1 && iB==SMALLEST_INT64 ) goto fp_math;\n        iB /= iA;\n        break;\n      }\n      default: {\n        if( iA==0 ) goto arithmetic_result_is_null;\n        if( iA==-1 ) iA = 1;\n        iB %= iA;\n        break;\n      }\n    }\n    pOut->u.i = iB;\n    MemSetTypeFlag(pOut, MEM_Int);\n  }else if( ((type1 | type2) & MEM_Null)!=0 ){\n    goto arithmetic_result_is_null;\n  }else{\n    type1 = numericType(pIn1);\n    type2 = numericType(pIn2);\n    if( (type1 & type2 & MEM_Int)!=0 ) goto int_math;\nfp_math:\n    rA = sqlite3VdbeRealValue(pIn1);\n    rB = sqlite3VdbeRealValue(pIn2);\n    switch( pOp->opcode ){\n      case OP_Add:         rB += rA;       break;\n      case OP_Subtract:    rB -= rA;       break;\n      case OP_Multiply:    rB *= rA;       break;\n      case OP_Divide: {\n        /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n        if( rA==(double)0 ) goto arithmetic_result_is_null;\n        rB /= rA;\n        break;\n      }\n      default: {\n        iA = sqlite3VdbeIntValue(pIn1);\n        iB = sqlite3VdbeIntValue(pIn2);\n        if( iA==0 ) goto arithmetic_result_is_null;\n        if( iA==-1 ) iA = 1;\n        rB = (double)(iB % iA);\n        break;\n      }\n    }\n#ifdef SQLITE_OMIT_FLOATING_POINT\n    pOut->u.i = rB;\n    MemSetTypeFlag(pOut, MEM_Int);\n#else\n    if( sqlite3IsNaN(rB) ){\n      goto arithmetic_result_is_null;\n    }\n    pOut->u.r = rB;\n    MemSetTypeFlag(pOut, MEM_Real);\n#endif\n  }\n  break;\n\narithmetic_result_is_null:\n  sqlite3VdbeMemSetNull(pOut);\n  break;\n}\n\n/* Opcode: CollSeq P1 * * P4\n**\n** P4 is a pointer to a CollSeq object. If the next call to a user function\n** or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will\n** be returned. This is used by the built-in min(), max() and nullif()\n** functions.\n**\n** If P1 is not zero, then it is a register that a subsequent min() or\n** max() aggregate will set to 1 if the current row is not the minimum or\n** maximum.  The P1 register is initialized to 0 by this instruction.\n**\n** The interface used by the implementation of the aforementioned functions\n** to retrieve the collation sequence set by this opcode is not available\n** publicly.  Only built-in functions have access to this feature.\n*/\ncase OP_CollSeq: {\n  assert( pOp->p4type==P4_COLLSEQ );\n  if( pOp->p1 ){\n    sqlite3VdbeMemSetInt64(&aMem[pOp->p1], 0);\n  }\n  break;\n}\n\n/* Opcode: BitAnd P1 P2 P3 * *\n** Synopsis: r[P3]=r[P1]&r[P2]\n**\n** Take the bit-wise AND of the values in register P1 and P2 and\n** store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: BitOr P1 P2 P3 * *\n** Synopsis: r[P3]=r[P1]|r[P2]\n**\n** Take the bit-wise OR of the values in register P1 and P2 and\n** store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: ShiftLeft P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]<<r[P1]\n**\n** Shift the integer value in register P2 to the left by the\n** number of bits specified by the integer in register P1.\n** Store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\n/* Opcode: ShiftRight P1 P2 P3 * *\n** Synopsis: r[P3]=r[P2]>>r[P1]\n**\n** Shift the integer value in register P2 to the right by the\n** number of bits specified by the integer in register P1.\n** Store the result in register P3.\n** If either input is NULL, the result is NULL.\n*/\ncase OP_BitAnd:                 /* same as TK_BITAND, in1, in2, out3 */\ncase OP_BitOr:                  /* same as TK_BITOR, in1, in2, out3 */\ncase OP_ShiftLeft:              /* same as TK_LSHIFT, in1, in2, out3 */\ncase OP_ShiftRight: {           /* same as TK_RSHIFT, in1, in2, out3 */\n  i64 iA;\n  u64 uA;\n  i64 iB;\n  u8 op;\n\n  pIn1 = &aMem[pOp->p1];\n  pIn2 = &aMem[pOp->p2];\n  pOut = &aMem[pOp->p3];\n  if( (pIn1->flags | pIn2->flags) & MEM_Null ){\n    sqlite3VdbeMemSetNull(pOut);\n    break;\n  }\n  iA = sqlite3VdbeIntValue(pIn2);\n  iB = sqlite3VdbeIntValue(pIn1);\n  op = pOp->opcode;\n  if( op==OP_BitAnd ){\n    iA &= iB;\n  }else if( op==OP_BitOr ){\n    iA |= iB;\n  }else if( iB!=0 ){\n    assert( op==OP_ShiftRight || op==OP_ShiftLeft );\n\n    /* If shifting by a negative amount, shift in the other direction */\n    if( iB<0 ){\n      assert( OP_ShiftRight==OP_ShiftLeft+1 );\n      op = 2*OP_ShiftLeft + 1 - op;\n      iB = iB>(-64) ? -iB : 64;\n    }\n\n    if( iB>=64 ){\n      iA = (iA>=0 || op==OP_ShiftLeft) ? 0 : -1;\n    }else{\n      memcpy(&uA, &iA, sizeof(uA));\n      if( op==OP_ShiftLeft ){\n        uA <<= iB;\n      }else{\n        uA >>= iB;\n        /* Sign-extend on a right shift of a negative number */\n        if( iA<0 ) uA |= ((((u64)0xffffffff)<<32)|0xffffffff) << (64-iB);\n      }\n      memcpy(&iA, &uA, sizeof(iA));\n    }\n  }\n  pOut->u.i = iA;\n  MemSetTypeFlag(pOut, MEM_Int);\n  break;\n}\n\n/* Opcode: AddImm  P1 P2 * * *\n** Synopsis: r[P1]=r[P1]+P2\n**\n** Add the constant P2 to the value in register P1.\n** The result is always an integer.\n**\n** To force any register to be an integer, just add 0.\n*/\ncase OP_AddImm: {            /* in1 */\n  pIn1 = &aMem[pOp->p1];\n  memAboutToChange(p, pIn1);\n  sqlite3VdbeMemIntegerify(pIn1);\n  *(u64*)&pIn1->u.i += (u64)pOp->p2;\n  break;\n}\n\n/* Opcode: MustBeInt P1 P2 * * *\n**\n** Force the value in register P1 to be an integer.  If the value\n** in P1 is not an integer and cannot be converted into an integer\n** without data loss, then jump immediately to P2, or if P2==0\n** raise an SQLITE_MISMATCH exception.\n*/\ncase OP_MustBeInt: {            /* jump0, in1 */\n  pIn1 = &aMem[pOp->p1];\n  if( (pIn1->flags & MEM_Int)==0 ){\n    applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);\n    if( (pIn1->flags & MEM_Int)==0 ){\n      VdbeBranchTaken(1, 2);\n      if( pOp->p2==0 ){\n        rc = SQLITE_MISMATCH;\n        goto abort_due_to_error;\n      }else{\n        goto jump_to_p2;\n      }\n    }\n  }\n  VdbeBranchTaken(0, 2);\n  MemSetTypeFlag(pIn1, MEM_Int);\n  break;\n}\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/* Opcode: RealAffinity P1 * * * *\n**\n** If register P1 holds an integer convert it to a real value.\n**\n** This opcode is used when extracting information from a column that\n** has REAL affinity.  Such column values may still be stored as\n** integers, for space efficiency, but after extraction we want them\n** to have only a real value.\n*/\ncase OP_RealAffinity: {                  /* in1 */\n  pIn1 = &aMem[pOp->p1];\n  if( pIn1->flags & (MEM_Int|MEM_IntReal) ){\n    testcase( pIn1->flags & MEM_Int );\n    testcase( pIn1->flags & MEM_IntReal );\n    sqlite3VdbeMemRealify(pIn1);\n    REGISTER_TRACE(pOp->p1, pIn1);\n  }\n  break;\n}\n#endif\n\n#if !defined(SQLITE_OMIT_CAST) || !defined(SQLITE_OMIT_ANALYZE)\n/* Opcode: Cast P1 P2 * * *\n** Synopsis: affinity(r[P1])\n**\n** Force the value in register P1 to be the type defined by P2.\n**\n** <ul>\n** <li> P2=='A' &rarr; BLOB\n** <li> P2=='B' &rarr; TEXT\n** <li> P2=='C' &rarr; NUMERIC\n** <li> P2=='D' &rarr; INTEGER\n** <li> P2=='E' &rarr; REAL\n** </ul>\n**\n** A NULL value is not changed by this routine.  It remains NULL.\n*/\ncase OP_Cast: {                  /* in1 */\n  assert( pOp->p2>=SQLITE_AFF_BLOB && pOp->p2<=SQLITE_AFF_REAL );\n  testcase( pOp->p2==SQLITE_AFF_TEXT );\n  testcase( pOp->p2==SQLITE_AFF_BLOB );\n  testcase( pOp->p2==SQLITE_AFF_NUMERIC );\n  testcase( pOp->p2==SQLITE_AFF_INTEGER );\n  testcase( pOp->p2==SQLITE_AFF_REAL );\n  pIn1 = &aMem[pOp->p1];\n  memAboutToChange(p, pIn1);\n  rc = ExpandBlob(pIn1);\n  if( rc ) goto abort_due_to_error;\n  rc = sqlite3VdbeMemCast(pIn1, pOp->p2, encoding);\n  if( rc ) goto abort_due_to_error;\n  UPDATE_MAX_BLOBSIZE(pIn1);\n  REGISTER_TRACE(pOp->p1, pIn1);\n  break;\n}\n#endif /* SQLITE_OMIT_CAST */\n\n/* Opcode: Eq P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]==r[P1]\n**\n** Compare the values in register P1 and P3.  If reg(P3)==reg(P1) then\n** jump to address P2.\n**\n** The SQLITE_AFF_MASK portion of P5 must be an affinity character -\n** SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made\n** to coerce both inputs according to this affinity before the\n** comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric\n** affinity is used. Note that the affinity conversions are stored\n** back into the input registers P1 and P3.  So this opcode can cause\n** persistent changes to registers P1 and P3.\n**\n** Once any conversions have taken place, and neither value is NULL,\n** the values are compared. If both values are blobs then memcmp() is\n** used to determine the results of the comparison.  If both values\n** are text, then the appropriate collating function specified in\n** P4 is used to do the comparison.  If P4 is not specified then\n** memcmp() is used to compare text string.  If both values are\n** numeric, then a numeric comparison is used. If the two values\n** are of different types, then numbers are considered less than\n** strings and strings are considered less than blobs.\n**\n** If SQLITE_NULLEQ is set in P5 then the result of comparison is always either\n** true or false and is never NULL.  If both operands are NULL then the result\n** of comparison is true.  If either operand is NULL then the result is false.\n** If neither operand is NULL the result is the same as it would be if\n** the SQLITE_NULLEQ flag were omitted from P5.\n**\n** This opcode saves the result of comparison for use by the new\n** OP_Jump opcode.\n*/\n/* Opcode: Ne P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]!=r[P1]\n**\n** This works just like the Eq opcode except that the jump is taken if\n** the operands in registers P1 and P3 are not equal.  See the Eq opcode for\n** additional information.\n*/\n/* Opcode: Lt P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]<r[P1]\n**\n** Compare the values in register P1 and P3.  If reg(P3)<reg(P1) then\n** jump to address P2.\n**\n** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or\n** reg(P3) is NULL then the take the jump.  If the SQLITE_JUMPIFNULL\n** bit is clear then fall through if either operand is NULL.\n**\n** The SQLITE_AFF_MASK portion of P5 must be an affinity character -\n** SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made\n** to coerce both inputs according to this affinity before the\n** comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric\n** affinity is used. Note that the affinity conversions are stored\n** back into the input registers P1 and P3.  So this opcode can cause\n** persistent changes to registers P1 and P3.\n**\n** Once any conversions have taken place, and neither value is NULL,\n** the values are compared. If both values are blobs then memcmp() is\n** used to determine the results of the comparison.  If both values\n** are text, then the appropriate collating function specified in\n** P4 is  used to do the comparison.  If P4 is not specified then\n** memcmp() is used to compare text string.  If both values are\n** numeric, then a numeric comparison is used. If the two values\n** are of different types, then numbers are considered less than\n** strings and strings are considered less than blobs.\n**\n** This opcode saves the result of comparison for use by the new\n** OP_Jump opcode.\n*/\n/* Opcode: Le P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]<=r[P1]\n**\n** This works just like the Lt opcode except that the jump is taken if\n** the content of register P3 is less than or equal to the content of\n** register P1.  See the Lt opcode for additional information.\n*/\n/* Opcode: Gt P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]>r[P1]\n**\n** This works just like the Lt opcode except that the jump is taken if\n** the content of register P3 is greater than the content of\n** register P1.  See the Lt opcode for additional information.\n*/\n/* Opcode: Ge P1 P2 P3 P4 P5\n** Synopsis: IF r[P3]>=r[P1]\n**\n** This works just like the Lt opcode except that the jump is taken if\n** the content of register P3 is greater than or equal to the content of\n** register P1.  See the Lt opcode for additional information.\n*/\ncase OP_Eq:               /* same as TK_EQ, jump, in1, in3 */\ncase OP_Ne:               /* same as TK_NE, jump, in1, in3 */\ncase OP_Lt:               /* same as TK_LT, jump, in1, in3 */\ncase OP_Le:               /* same as TK_LE, jump, in1, in3 */\ncase OP_Gt:               /* same as TK_GT, jump, in1, in3 */\ncase OP_Ge: {             /* same as TK_GE, jump, in1, in3 */\n  int res, res2;      /* Result of the comparison of pIn1 against pIn3 */\n  char affinity;      /* Affinity to use for comparison */\n  u16 flags1;         /* Copy of initial value of pIn1->flags */\n  u16 flags3;         /* Copy of initial value of pIn3->flags */\n\n  pIn1 = &aMem[pOp->p1];\n  pIn3 = &aMem[pOp->p3];\n  flags1 = pIn1->flags;\n  flags3 = pIn3->flags;\n  if( (flags1 & flags3 & MEM_Int)!=0 ){\n    /* Common case of comparison of two integers */\n    if( pIn3->u.i > pIn1->u.i ){\n      if( sqlite3aGTb[pOp->opcode] ){\n        VdbeBranchTaken(1, (pOp->p5 & SQLITE_NULLEQ)?2:3);\n        goto jump_to_p2;\n      }\n      iCompare = +1;\n      VVA_ONLY( iCompareIsInit = 1; )\n    }else if( pIn3->u.i < pIn1->u.i ){\n      if( sqlite3aLTb[pOp->opcode] ){\n        VdbeBranchTaken(1, (pOp->p5 & SQLITE_NULLEQ)?2:3);\n        goto jump_to_p2;\n      }\n      iCompare = -1;\n      VVA_ONLY( iCompareIsInit = 1; )\n    }else{\n      if( sqlite3aEQb[pOp->opcode] ){\n        VdbeBranchTaken(1, (pOp->p5 & SQLITE_NULLEQ)?2:3);\n        goto jump_to_p2;\n      }\n      iCompare = 0;\n      VVA_ONLY( iCompareIsInit = 1; )\n    }\n    VdbeBranchTaken(0, (pOp->p5 & SQLITE_NULLEQ)?2:3);\n    break;\n  }\n  if( (flags1 | flags3)&MEM_Null ){\n    /* One or both operands are NULL */\n    if( pOp->p5 & SQLITE_NULLEQ ){\n      /* If SQLITE_NULLEQ is set (which will only happen if the operator is\n      ** OP_Eq or OP_Ne) then take the jump or not depending on whether\n      ** or not both operands are null.\n      */\n      assert( (flags1 & MEM_Cleared)==0 );\n      assert( (pOp->p5 & SQLITE_JUMPIFNULL)==0 || CORRUPT_DB );\n      testcase( (pOp->p5 & SQLITE_JUMPIFNULL)!=0 );\n      if( (flags1&flags3&MEM_Null)!=0\n       && (flags3&MEM_Cleared)==0\n      ){\n        res = 0;  /* Operands are equal */\n      }else{\n        res = ((flags3 & MEM_Null) ? -1 : +1);  /* Operands are not equal */\n      }\n    }else{\n      /* SQLITE_NULLEQ is clear and at least one operand is NULL,\n      ** then the result is always NULL.\n      ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.\n      */\n      VdbeBranchTaken(2,3);\n      if( pOp->p5 & SQLITE_JUMPIFNULL ){\n        goto jump_to_p2;\n      }\n      iCompare = 1;    /* Operands are not equal */\n      VVA_ONLY( iCompareIsInit = 1; )\n      break;\n    }\n  }else{\n    /* Neither operand is NULL and we couldn't do the special high-speed\n    ** integer comparison case.  So do a general-case comparison. */\n    affinity = pOp->p5 & SQLITE_AFF_MASK;\n    if( affinity>=SQLITE_AFF_NUMERIC ){\n      if( (flags1 | flags3)&MEM_Str ){\n        if( (flags1 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){\n          applyNumericAffinity(pIn1,0);\n          assert( flags3==pIn3->flags || CORRUPT_DB );\n          flags3 = pIn3->flags;\n        }\n        if( (flags3 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){\n          applyNumericAffinity(pIn3,0);\n        }\n      }\n    }else if( affinity==SQLITE_AFF_TEXT && ((flags1 | flags3) & MEM_Str)!=0 ){\n      if( (flags1 & MEM_Str)!=0 ){\n        pIn1->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal);\n      }else if( (flags1&(MEM_Int|MEM_Real|MEM_IntReal))!=0 ){\n        testcase( pIn1->flags & MEM_Int );\n        testcase( pIn1->flags & MEM_Real );\n        testcase( pIn1->flags & MEM_IntReal );\n        sqlite3VdbeMemStringify(pIn1, encoding, 1);\n        testcase( (flags1&MEM_Dyn) != (pIn1->flags&MEM_Dyn) );\n        flags1 = (pIn1->flags & ~MEM_TypeMask) | (flags1 & MEM_TypeMask);\n        if( NEVER(pIn1==pIn3) ) flags3 = flags1 | MEM_Str;\n      }\n      if( (flags3 & MEM_Str)!=0 ){\n        pIn3->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal);\n      }else if( (flags3&(MEM_Int|MEM_Real|MEM_IntReal))!=0 ){\n        testcase( pIn3->flags & MEM_Int );\n        testcase( pIn3->flags & MEM_Real );\n        testcase( pIn3->flags & MEM_IntReal );\n        sqlite3VdbeMemStringify(pIn3, encoding, 1);\n        testcase( (flags3&MEM_Dyn) != (pIn3->flags&MEM_Dyn) );\n        flags3 = (pIn3->flags & ~MEM_TypeMask) | (flags3 & MEM_TypeMask);\n      }\n    }\n    assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 );\n    res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);\n  }\n\n  /* At this point, res is negative, zero, or positive if reg[P1] is\n  ** less than, equal to, or greater than reg[P3], respectively.  Compute\n  ** the answer to this operator in res2, depending on what the comparison\n  ** operator actually is.  The next block of code depends on the fact\n  ** that the 6 comparison operators are consecutive integers in this\n  ** order:  NE, EQ, GT, LE, LT, GE */\n  assert( OP_Eq==OP_Ne+1 ); assert( OP_Gt==OP_Ne+2 ); assert( OP_Le==OP_Ne+3 );\n  assert( OP_Lt==OP_Ne+4 ); assert( OP_Ge==OP_Ne+5 );\n  if( res<0 ){\n    res2 = sqlite3aLTb[pOp->opcode];\n  }else if( res==0 ){\n    res2 = sqlite3aEQb[pOp->opcode];\n  }else{\n    res2 = sqlite3aGTb[pOp->opcode];\n  }\n  iCompare = res;\n  VVA_ONLY( iCompareIsInit = 1; )\n\n  /* Undo any changes made by applyAffinity() to the input registers. */\n  assert( (pIn3->flags & MEM_Dyn) == (flags3 & MEM_Dyn) );\n  pIn3->flags = flags3;\n  assert( (pIn1->flags & MEM_Dyn) == (flags1 & MEM_Dyn) );\n  pIn1->flags = flags1;\n\n  VdbeBranchTaken(res2!=0, (pOp->p5 & SQLITE_NULLEQ)?2:3);\n  if( res2 ){\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: ElseEq * P2 * * *\n**\n** This opcode must follow an OP_Lt or OP_Gt comparison operator.  There\n** can be zero or more OP_ReleaseReg opcodes intervening, but no other\n** opcodes are allowed to occur between this instruction and the previous\n** OP_Lt or OP_Gt.\n**\n** If the result of an OP_Eq comparison on the same two operands as\n** the prior OP_Lt or OP_Gt would have been true, then jump to P2.  If\n** the result of an OP_Eq comparison on the two previous operands\n** would have been false or NULL, then fall through.\n*/\ncase OP_ElseEq: {       /* same as TK_ESCAPE, jump */\n\n#ifdef SQLITE_DEBUG\n  /* Verify the preconditions of this opcode - that it follows an OP_Lt or\n  ** OP_Gt with zero or more intervening OP_ReleaseReg opcodes */\n  int iAddr;\n  for(iAddr = (int)(pOp - aOp) - 1; ALWAYS(iAddr>=0); iAddr--){\n    if( aOp[iAddr].opcode==OP_ReleaseReg ) continue;\n    assert( aOp[iAddr].opcode==OP_Lt || aOp[iAddr].opcode==OP_Gt );\n    break;\n  }\n#endif /* SQLITE_DEBUG */\n  assert( iCompareIsInit );\n  VdbeBranchTaken(iCompare==0, 2);\n  if( iCompare==0 ) goto jump_to_p2;\n  break;\n}\n\n\n/* Opcode: Permutation * * * P4 *\n**\n** Set the permutation used by the OP_Compare operator in the next\n** instruction.  The permutation is stored in the P4 operand.\n**\n** The permutation is only valid for the next opcode which must be\n** an OP_Compare that has the OPFLAG_PERMUTE bit set in P5.\n**\n** The first integer in the P4 integer array is the length of the array\n** and does not become part of the permutation.\n*/\ncase OP_Permutation: {\n  assert( pOp->p4type==P4_INTARRAY );\n  assert( pOp->p4.ai );\n  assert( pOp[1].opcode==OP_Compare );\n  assert( pOp[1].p5 & OPFLAG_PERMUTE );\n  break;\n}\n\n/* Opcode: Compare P1 P2 P3 P4 P5\n** Synopsis: r[P1@P3] <-> r[P2@P3]\n**\n** Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this\n** vector \"A\") and in reg(P2)..reg(P2+P3-1) (\"B\").  Save the result of\n** the comparison for use by the next OP_Jump instruct.\n**\n** If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is\n** determined by the most recent OP_Permutation operator.  If the\n** OPFLAG_PERMUTE bit is clear, then register are compared in sequential\n** order.\n**\n** P4 is a KeyInfo structure that defines collating sequences and sort\n** orders for the comparison.  The permutation applies to registers\n** only.  The KeyInfo elements are used sequentially.\n**\n** The comparison is a sort comparison, so NULLs compare equal,\n** NULLs are less than numbers, numbers are less than strings,\n** and strings are less than blobs.\n**\n** This opcode must be immediately followed by an OP_Jump opcode.\n*/\ncase OP_Compare: {\n  int n;\n  int i;\n  int p1;\n  int p2;\n  const KeyInfo *pKeyInfo;\n  u32 idx;\n  CollSeq *pColl;    /* Collating sequence to use on this term */\n  int bRev;          /* True for DESCENDING sort order */\n  u32 *aPermute;     /* The permutation */\n\n  if( (pOp->p5 & OPFLAG_PERMUTE)==0 ){\n    aPermute = 0;\n  }else{\n    assert( pOp>aOp );\n    assert( pOp[-1].opcode==OP_Permutation );\n    assert( pOp[-1].p4type==P4_INTARRAY );\n    aPermute = pOp[-1].p4.ai + 1;\n    assert( aPermute!=0 );\n  }\n  n = pOp->p3;\n  pKeyInfo = pOp->p4.pKeyInfo;\n  assert( n>0 );\n  assert( pKeyInfo!=0 );\n  assert( pKeyInfo->aSortFlags!=0 );\n  p1 = pOp->p1;\n  p2 = pOp->p2;\n#ifdef SQLITE_DEBUG\n  if( aPermute ){\n    int k, mx = 0;\n    for(k=0; k<n; k++) if( aPermute[k]>(u32)mx ) mx = aPermute[k];\n    assert( p1>0 && p1+mx<=(p->nMem+1 - p->nCursor)+1 );\n    assert( p2>0 && p2+mx<=(p->nMem+1 - p->nCursor)+1 );\n  }else{\n    assert( p1>0 && p1+n<=(p->nMem+1 - p->nCursor)+1 );\n    assert( p2>0 && p2+n<=(p->nMem+1 - p->nCursor)+1 );\n  }\n#endif /* SQLITE_DEBUG */\n  for(i=0; i<n; i++){\n    idx = aPermute ? aPermute[i] : (u32)i;\n    assert( memIsValid(&aMem[p1+idx]) );\n    assert( memIsValid(&aMem[p2+idx]) );\n    REGISTER_TRACE(p1+idx, &aMem[p1+idx]);\n    REGISTER_TRACE(p2+idx, &aMem[p2+idx]);\n    assert( i<pKeyInfo->nKeyField );\n    pColl = pKeyInfo->aColl[i];\n    bRev = (pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_DESC);\n    iCompare = sqlite3MemCompare(&aMem[p1+idx], &aMem[p2+idx], pColl);\n    VVA_ONLY( iCompareIsInit = 1; )\n    if( iCompare ){\n      if( (pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_BIGNULL)\n       && ((aMem[p1+idx].flags & MEM_Null) || (aMem[p2+idx].flags & MEM_Null))\n      ){\n        iCompare = -iCompare;\n      }\n      if( bRev ) iCompare = -iCompare;\n      break;\n    }\n  }\n  assert( pOp[1].opcode==OP_Jump );\n  break;\n}\n\n/* Opcode: Jump P1 P2 P3 * *\n**\n** Jump to the instruction at address P1, P2, or P3 depending on whether\n** in the most recent OP_Compare instruction the P1 vector was less than,\n** equal to, or greater than the P2 vector, respectively.\n**\n** This opcode must immediately follow an OP_Compare opcode.\n*/\ncase OP_Jump: {             /* jump */\n  assert( pOp>aOp && pOp[-1].opcode==OP_Compare );\n  assert( iCompareIsInit );\n  if( iCompare<0 ){\n    VdbeBranchTaken(0,4); pOp = &aOp[pOp->p1 - 1];\n  }else if( iCompare==0 ){\n    VdbeBranchTaken(1,4); pOp = &aOp[pOp->p2 - 1];\n  }else{\n    VdbeBranchTaken(2,4); pOp = &aOp[pOp->p3 - 1];\n  }\n  break;\n}\n\n/* Opcode: And P1 P2 P3 * *\n** Synopsis: r[P3]=(r[P1] && r[P2])\n**\n** Take the logical AND of the values in registers P1 and P2 and\n** write the result into register P3.\n**\n** If either P1 or P2 is 0 (false) then the result is 0 even if\n** the other input is NULL.  A NULL and true or two NULLs give\n** a NULL output.\n*/\n/* Opcode: Or P1 P2 P3 * *\n** Synopsis: r[P3]=(r[P1] || r[P2])\n**\n** Take the logical OR of the values in register P1 and P2 and\n** store the answer in register P3.\n**\n** If either P1 or P2 is nonzero (true) then the result is 1 (true)\n** even if the other input is NULL.  A NULL and false or two NULLs\n** give a NULL output.\n*/\ncase OP_And:              /* same as TK_AND, in1, in2, out3 */\ncase OP_Or: {             /* same as TK_OR, in1, in2, out3 */\n  int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */\n  int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */\n\n  v1 = sqlite3VdbeBooleanValue(&aMem[pOp->p1], 2);\n  v2 = sqlite3VdbeBooleanValue(&aMem[pOp->p2], 2);\n  if( pOp->opcode==OP_And ){\n    static const unsigned char and_logic[] = { 0, 0, 0, 0, 1, 2, 0, 2, 2 };\n    v1 = and_logic[v1*3+v2];\n  }else{\n    static const unsigned char or_logic[] = { 0, 1, 2, 1, 1, 1, 2, 1, 2 };\n    v1 = or_logic[v1*3+v2];\n  }\n  pOut = &aMem[pOp->p3];\n  if( v1==2 ){\n    MemSetTypeFlag(pOut, MEM_Null);\n  }else{\n    pOut->u.i = v1;\n    MemSetTypeFlag(pOut, MEM_Int);\n  }\n  break;\n}\n\n/* Opcode: IsTrue P1 P2 P3 P4 *\n** Synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4\n**\n** This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and\n** IS NOT FALSE operators.\n**\n** Interpret the value in register P1 as a boolean value.  Store that\n** boolean (a 0 or 1) in register P2.  Or if the value in register P1 is\n** NULL, then the P3 is stored in register P2.  Invert the answer if P4\n** is 1.\n**\n** The logic is summarized like this:\n**\n** <ul>\n** <li> If P3==0 and P4==0  then  r[P2] := r[P1] IS TRUE\n** <li> If P3==1 and P4==1  then  r[P2] := r[P1] IS FALSE\n** <li> If P3==0 and P4==1  then  r[P2] := r[P1] IS NOT TRUE\n** <li> If P3==1 and P4==0  then  r[P2] := r[P1] IS NOT FALSE\n** </ul>\n*/\ncase OP_IsTrue: {               /* in1, out2 */\n  assert( pOp->p4type==P4_INT32 );\n  assert( pOp->p4.i==0 || pOp->p4.i==1 );\n  assert( pOp->p3==0 || pOp->p3==1 );\n  sqlite3VdbeMemSetInt64(&aMem[pOp->p2],\n      sqlite3VdbeBooleanValue(&aMem[pOp->p1], pOp->p3) ^ pOp->p4.i);\n  break;\n}\n\n/* Opcode: Not P1 P2 * * *\n** Synopsis: r[P2]= !r[P1]\n**\n** Interpret the value in register P1 as a boolean value.  Store the\n** boolean complement in register P2.  If the value in register P1 is\n** NULL, then a NULL is stored in P2.\n*/\ncase OP_Not: {                /* same as TK_NOT, in1, out2 */\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  if( (pIn1->flags & MEM_Null)==0 ){\n    sqlite3VdbeMemSetInt64(pOut, !sqlite3VdbeBooleanValue(pIn1,0));\n  }else{\n    sqlite3VdbeMemSetNull(pOut);\n  }\n  break;\n}\n\n/* Opcode: BitNot P1 P2 * * *\n** Synopsis: r[P2]= ~r[P1]\n**\n** Interpret the content of register P1 as an integer.  Store the\n** ones-complement of the P1 value into register P2.  If P1 holds\n** a NULL then store a NULL in P2.\n*/\ncase OP_BitNot: {             /* same as TK_BITNOT, in1, out2 */\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  sqlite3VdbeMemSetNull(pOut);\n  if( (pIn1->flags & MEM_Null)==0 ){\n    pOut->flags = MEM_Int;\n    pOut->u.i = ~sqlite3VdbeIntValue(pIn1);\n  }\n  break;\n}\n\n/* Opcode: Once P1 P2 P3 * *\n**\n** Fall through to the next instruction the first time this opcode is\n** encountered on each invocation of the byte-code program.  Jump to P2\n** on the second and all subsequent encounters during the same invocation.\n**\n** Top-level programs determine first invocation by comparing the P1\n** operand against the P1 operand on the OP_Init opcode at the beginning\n** of the program.  If the P1 values differ, then fall through and make\n** the P1 of this opcode equal to the P1 of OP_Init.  If P1 values are\n** the same then take the jump.\n**\n** For subprograms, there is a bitmask in the VdbeFrame that determines\n** whether or not the jump should be taken.  The bitmask is necessary\n** because the self-altering code trick does not work for recursive\n** triggers.\n**\n** The P3 operand is not used directly by this opcode.  However P3 is\n** used by the code generator as follows:  If this opcode is the start\n** of a subroutine and that subroutine uses a Bloom filter, then P3 will\n** be the register that holds that Bloom filter.  See tag-202407032019\n** in the source code for implementation details.\n*/\ncase OP_Once: {             /* jump */\n  u32 iAddr;                /* Address of this instruction */\n  assert( p->aOp[0].opcode==OP_Init );\n  if( p->pFrame ){\n    iAddr = (int)(pOp - p->aOp);\n    if( (p->pFrame->aOnce[iAddr/8] & (1<<(iAddr & 7)))!=0 ){\n      VdbeBranchTaken(1, 2);\n      goto jump_to_p2;\n    }\n    p->pFrame->aOnce[iAddr/8] |= 1<<(iAddr & 7);\n  }else{\n    if( p->aOp[0].p1==pOp->p1 ){\n      VdbeBranchTaken(1, 2);\n      goto jump_to_p2;\n    }\n  }\n  VdbeBranchTaken(0, 2);\n  pOp->p1 = p->aOp[0].p1;\n  break;\n}\n\n/* Opcode: If P1 P2 P3 * *\n**\n** Jump to P2 if the value in register P1 is true.  The value\n** is considered true if it is numeric and non-zero.  If the value\n** in P1 is NULL then take the jump if and only if P3 is non-zero.\n*/\ncase OP_If:  {               /* jump, in1 */\n  int c;\n  c = sqlite3VdbeBooleanValue(&aMem[pOp->p1], pOp->p3);\n  VdbeBranchTaken(c!=0, 2);\n  if( c ) goto jump_to_p2;\n  break;\n}\n\n/* Opcode: IfNot P1 P2 P3 * *\n**\n** Jump to P2 if the value in register P1 is False.  The value\n** is considered false if it has a numeric value of zero.  If the value\n** in P1 is NULL then take the jump if and only if P3 is non-zero.\n*/\ncase OP_IfNot: {            /* jump, in1 */\n  int c;\n  c = !sqlite3VdbeBooleanValue(&aMem[pOp->p1], !pOp->p3);\n  VdbeBranchTaken(c!=0, 2);\n  if( c ) goto jump_to_p2;\n  break;\n}\n\n/* Opcode: IsNull P1 P2 * * *\n** Synopsis: if r[P1]==NULL goto P2\n**\n** Jump to P2 if the value in register P1 is NULL.\n*/\ncase OP_IsNull: {            /* same as TK_ISNULL, jump, in1 */\n  pIn1 = &aMem[pOp->p1];\n  VdbeBranchTaken( (pIn1->flags & MEM_Null)!=0, 2);\n  if( (pIn1->flags & MEM_Null)!=0 ){\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: IsType P1 P2 P3 P4 P5\n** Synopsis: if typeof(P1.P3) in P5 goto P2\n**\n** Jump to P2 if the type of a column in a btree is one of the types specified\n** by the P5 bitmask.\n**\n** P1 is normally a cursor on a btree for which the row decode cache is\n** valid through at least column P3.  In other words, there should have been\n** a prior OP_Column for column P3 or greater.  If the cursor is not valid,\n** then this opcode might give spurious results.\n** The the btree row has fewer than P3 columns, then use P4 as the\n** datatype.\n**\n** If P1 is -1, then P3 is a register number and the datatype is taken\n** from the value in that register.\n**\n** P5 is a bitmask of data types.  SQLITE_INTEGER is the least significant\n** (0x01) bit. SQLITE_FLOAT is the 0x02 bit. SQLITE_TEXT is 0x04.\n** SQLITE_BLOB is 0x08.  SQLITE_NULL is 0x10.\n**\n** WARNING: This opcode does not reliably distinguish between NULL and REAL\n** when P1>=0.  If the database contains a NaN value, this opcode will think\n** that the datatype is REAL when it should be NULL.  When P1<0 and the value\n** is already stored in register P3, then this opcode does reliably\n** distinguish between NULL and REAL.  The problem only arises then P1>=0.\n**\n** Take the jump to address P2 if and only if the datatype of the\n** value determined by P1 and P3 corresponds to one of the bits in the\n** P5 bitmask.\n**\n*/\ncase OP_IsType: {        /* jump */\n  VdbeCursor *pC;\n  u16 typeMask;\n  u32 serialType;\n\n  assert( pOp->p1>=(-1) && pOp->p1<p->nCursor );\n  assert( pOp->p1>=0 || (pOp->p3>=0 && pOp->p3<=(p->nMem+1 - p->nCursor)) );\n  if( pOp->p1>=0 ){\n    pC = p->apCsr[pOp->p1];\n    assert( pC!=0 );\n    assert( pOp->p3>=0 );\n    if( pOp->p3<pC->nHdrParsed ){\n      serialType = pC->aType[pOp->p3];\n      if( serialType>=12 ){\n        if( serialType&1 ){\n          typeMask = 0x04;   /* SQLITE_TEXT */\n        }else{\n          typeMask = 0x08;   /* SQLITE_BLOB */\n        }\n      }else{\n        static const unsigned char aMask[] = {\n           0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x2,\n           0x01, 0x01, 0x10, 0x10\n        };\n        testcase( serialType==0 );\n        testcase( serialType==1 );\n        testcase( serialType==2 );\n        testcase( serialType==3 );\n        testcase( serialType==4 );\n        testcase( serialType==5 );\n        testcase( serialType==6 );\n        testcase( serialType==7 );\n        testcase( serialType==8 );\n        testcase( serialType==9 );\n        testcase( serialType==10 );\n        testcase( serialType==11 );\n        typeMask = aMask[serialType];\n      }\n    }else{\n      typeMask = 1 << (pOp->p4.i - 1);\n      testcase( typeMask==0x01 );\n      testcase( typeMask==0x02 );\n      testcase( typeMask==0x04 );\n      testcase( typeMask==0x08 );\n      testcase( typeMask==0x10 );\n    }\n  }else{\n    assert( memIsValid(&aMem[pOp->p3]) );\n    typeMask = 1 << (sqlite3_value_type((sqlite3_value*)&aMem[pOp->p3])-1);\n    testcase( typeMask==0x01 );\n    testcase( typeMask==0x02 );\n    testcase( typeMask==0x04 );\n    testcase( typeMask==0x08 );\n    testcase( typeMask==0x10 );\n  }\n  VdbeBranchTaken( (typeMask & pOp->p5)!=0, 2);\n  if( typeMask & pOp->p5 ){\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: ZeroOrNull P1 P2 P3 * *\n** Synopsis: r[P2] = 0 OR NULL\n**\n** If both registers P1 and P3 are NOT NULL, then store a zero in\n** register P2.  If either registers P1 or P3 are NULL then put\n** a NULL in register P2.\n*/\ncase OP_ZeroOrNull: {            /* in1, in2, out2, in3 */\n  if( (aMem[pOp->p1].flags & MEM_Null)!=0\n   || (aMem[pOp->p3].flags & MEM_Null)!=0\n  ){\n    sqlite3VdbeMemSetNull(aMem + pOp->p2);\n  }else{\n    sqlite3VdbeMemSetInt64(aMem + pOp->p2, 0);\n  }\n  break;\n}\n\n/* Opcode: NotNull P1 P2 * * *\n** Synopsis: if r[P1]!=NULL goto P2\n**\n** Jump to P2 if the value in register P1 is not NULL.\n*/\ncase OP_NotNull: {            /* same as TK_NOTNULL, jump, in1 */\n  pIn1 = &aMem[pOp->p1];\n  VdbeBranchTaken( (pIn1->flags & MEM_Null)==0, 2);\n  if( (pIn1->flags & MEM_Null)==0 ){\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: IfNullRow P1 P2 P3 * *\n** Synopsis: if P1.nullRow then r[P3]=NULL, goto P2\n**\n** Check the cursor P1 to see if it is currently pointing at a NULL row.\n** If it is, then set register P3 to NULL and jump immediately to P2.\n** If P1 is not on a NULL row, then fall through without making any\n** changes.\n**\n** If P1 is not an open cursor, then this opcode is a no-op.\n*/\ncase OP_IfNullRow: {         /* jump */\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  if( pC && pC->nullRow ){\n    sqlite3VdbeMemSetNull(aMem + pOp->p3);\n    goto jump_to_p2;\n  }\n  break;\n}\n\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n/* Opcode: Offset P1 P2 P3 * *\n** Synopsis: r[P3] = sqlite_offset(P1)\n**\n** Store in register r[P3] the byte offset into the database file that is the\n** start of the payload for the record at which that cursor P1 is currently\n** pointing.\n**\n** P2 is the column number for the argument to the sqlite_offset() function.\n** This opcode does not use P2 itself, but the P2 value is used by the\n** code generator.  The P1, P2, and P3 operands to this opcode are the\n** same as for OP_Column.\n**\n** This opcode is only available if SQLite is compiled with the\n** -DSQLITE_ENABLE_OFFSET_SQL_FUNC option.\n*/\ncase OP_Offset: {          /* out3 */\n  VdbeCursor *pC;    /* The VDBE cursor */\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  pOut = &p->aMem[pOp->p3];\n  if( pC==0 || pC->eCurType!=CURTYPE_BTREE ){\n    sqlite3VdbeMemSetNull(pOut);\n  }else{\n    if( pC->deferredMoveto ){\n      rc = sqlite3VdbeFinishMoveto(pC);\n      if( rc ) goto abort_due_to_error;\n    }\n    if( sqlite3BtreeEof(pC->uc.pCursor) ){\n      sqlite3VdbeMemSetNull(pOut);\n    }else{\n      sqlite3VdbeMemSetInt64(pOut, sqlite3BtreeOffset(pC->uc.pCursor));\n    }\n  }\n  break;\n}\n#endif /* SQLITE_ENABLE_OFFSET_SQL_FUNC */\n\n/* Opcode: Column P1 P2 P3 P4 P5\n** Synopsis: r[P3]=PX cursor P1 column P2\n**\n** Interpret the data that cursor P1 points to as a structure built using\n** the MakeRecord instruction.  (See the MakeRecord opcode for additional\n** information about the format of the data.)  Extract the P2-th column\n** from this record.  If there are less than (P2+1)\n** values in the record, extract a NULL.\n**\n** The value extracted is stored in register P3.\n**\n** If the record contains fewer than P2 fields, then extract a NULL.  Or,\n** if the P4 argument is a P4_MEM use the value of the P4 argument as\n** the result.\n**\n** If the OPFLAG_LENGTHARG bit is set in P5 then the result is guaranteed\n** to only be used by the length() function or the equivalent.  The content\n** of large blobs is not loaded, thus saving CPU cycles.  If the\n** OPFLAG_TYPEOFARG bit is set then the result will only be used by the\n** typeof() function or the IS NULL or IS NOT NULL operators or the\n** equivalent.  In this case, all content loading can be omitted.\n*/\ncase OP_Column: {            /* ncycle */\n  u32 p2;            /* column number to retrieve */\n  VdbeCursor *pC;    /* The VDBE cursor */\n  BtCursor *pCrsr;   /* The B-Tree cursor corresponding to pC */\n  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */\n  int len;           /* The length of the serialized data for the column */\n  int i;             /* Loop counter */\n  Mem *pDest;        /* Where to write the extracted value */\n  Mem sMem;          /* For storing the record being decoded */\n  const u8 *zData;   /* Part of the record being decoded */\n  const u8 *zHdr;    /* Next unparsed byte of the header */\n  const u8 *zEndHdr; /* Pointer to first byte after the header */\n  u64 offset64;      /* 64-bit offset */\n  u32 t;             /* A type code from the record header */\n  Mem *pReg;         /* PseudoTable input register */\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );\n  pC = p->apCsr[pOp->p1];\n  p2 = (u32)pOp->p2;\n\nop_column_restart:\n  assert( pC!=0 );\n  assert( p2<(u32)pC->nField\n       || (pC->eCurType==CURTYPE_PSEUDO && pC->seekResult==0) );\n  aOffset = pC->aOffset;\n  assert( aOffset==pC->aType+pC->nField );\n  assert( pC->eCurType!=CURTYPE_VTAB );\n  assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );\n  assert( pC->eCurType!=CURTYPE_SORTER );\n\n  if( pC->cacheStatus!=p->cacheCtr ){                /*OPTIMIZATION-IF-FALSE*/\n    if( pC->nullRow ){\n      if( pC->eCurType==CURTYPE_PSEUDO && pC->seekResult>0 ){\n        /* For the special case of as pseudo-cursor, the seekResult field\n        ** identifies the register that holds the record */\n        pReg = &aMem[pC->seekResult];\n        assert( pReg->flags & MEM_Blob );\n        assert( memIsValid(pReg) );\n        pC->payloadSize = pC->szRow = pReg->n;\n        pC->aRow = (u8*)pReg->z;\n      }else{\n        pDest = &aMem[pOp->p3];\n        memAboutToChange(p, pDest);\n        sqlite3VdbeMemSetNull(pDest);\n        goto op_column_out;\n      }\n    }else{\n      pCrsr = pC->uc.pCursor;\n      if( pC->deferredMoveto ){\n        u32 iMap;\n        assert( !pC->isEphemeral );\n        if( pC->ub.aAltMap && (iMap = pC->ub.aAltMap[1+p2])>0  ){\n          pC = pC->pAltCursor;\n          p2 = iMap - 1;\n          goto op_column_restart;\n        }\n        rc = sqlite3VdbeFinishMoveto(pC);\n        if( rc ) goto abort_due_to_error;\n      }else if( sqlite3BtreeCursorHasMoved(pCrsr) ){\n        rc = sqlite3VdbeHandleMovedCursor(pC);\n        if( rc ) goto abort_due_to_error;\n        goto op_column_restart;\n      }\n      assert( pC->eCurType==CURTYPE_BTREE );\n      assert( pCrsr );\n      assert( sqlite3BtreeCursorIsValid(pCrsr) );\n      pC->payloadSize = sqlite3BtreePayloadSize(pCrsr);\n      pC->aRow = sqlite3BtreePayloadFetch(pCrsr, &pC->szRow);\n      assert( pC->szRow<=pC->payloadSize );\n      assert( pC->szRow<=65536 );  /* Maximum page size is 64KiB */\n    }\n    pC->cacheStatus = p->cacheCtr;\n    if( (aOffset[0] = pC->aRow[0])<0x80 ){\n      pC->iHdrOffset = 1;\n    }else{\n      pC->iHdrOffset = sqlite3GetVarint32(pC->aRow, aOffset);\n    }\n    pC->nHdrParsed = 0;\n\n    if( pC->szRow<aOffset[0] ){      /*OPTIMIZATION-IF-FALSE*/\n      /* pC->aRow does not have to hold the entire row, but it does at least\n      ** need to cover the header of the record.  If pC->aRow does not contain\n      ** the complete header, then set it to zero, forcing the header to be\n      ** dynamically allocated. */\n      pC->aRow = 0;\n      pC->szRow = 0;\n\n      /* Make sure a corrupt database has not given us an oversize header.\n      ** Do this now to avoid an oversize memory allocation.\n      **\n      ** Type entries can be between 1 and 5 bytes each.  But 4 and 5 byte\n      ** types use so much data space that there can only be 4096 and 32 of\n      ** them, respectively.  So the maximum header length results from a\n      ** 3-byte type for each of the maximum of 32768 columns plus three\n      ** extra bytes for the header length itself.  32768*3 + 3 = 98307.\n      */\n      if( aOffset[0] > 98307 || aOffset[0] > pC->payloadSize ){\n        goto op_column_corrupt;\n      }\n    }else{\n      /* This is an optimization.  By skipping over the first few tests\n      ** (ex: pC->nHdrParsed<=p2) in the next section, we achieve a\n      ** measurable performance gain.\n      **\n      ** This branch is taken even if aOffset[0]==0.  Such a record is never\n      ** generated by SQLite, and could be considered corruption, but we\n      ** accept it for historical reasons.  When aOffset[0]==0, the code this\n      ** branch jumps to reads past the end of the record, but never more\n      ** than a few bytes.  Even if the record occurs at the end of the page\n      ** content area, the \"page header\" comes after the page content and so\n      ** this overread is harmless.  Similar overreads can occur for a corrupt\n      ** database file.\n      */\n      zData = pC->aRow;\n      assert( pC->nHdrParsed<=p2 );         /* Conditional skipped */\n      testcase( aOffset[0]==0 );\n      goto op_column_read_header;\n    }\n  }else if( sqlite3BtreeCursorHasMoved(pC->uc.pCursor) ){\n    rc = sqlite3VdbeHandleMovedCursor(pC);\n    if( rc ) goto abort_due_to_error;\n    goto op_column_restart;\n  }\n\n  /* Make sure at least the first p2+1 entries of the header have been\n  ** parsed and valid information is in aOffset[] and pC->aType[].\n  */\n  if( pC->nHdrParsed<=p2 ){\n    /* If there is more header available for parsing in the record, try\n    ** to extract additional fields up through the p2+1-th field\n    */\n    if( pC->iHdrOffset<aOffset[0] ){\n      /* Make sure zData points to enough of the record to cover the header. */\n      if( pC->aRow==0 ){\n        memset(&sMem, 0, sizeof(sMem));\n        rc = sqlite3VdbeMemFromBtreeZeroOffset(pC->uc.pCursor,aOffset[0],&sMem);\n        if( rc!=SQLITE_OK ) goto abort_due_to_error;\n        zData = (u8*)sMem.z;\n      }else{\n        zData = pC->aRow;\n      }\n\n      /* Fill in pC->aType[i] and aOffset[i] values through the p2-th field. */\n    op_column_read_header:\n      i = pC->nHdrParsed;\n      offset64 = aOffset[i];\n      zHdr = zData + pC->iHdrOffset;\n      zEndHdr = zData + aOffset[0];\n      testcase( zHdr>=zEndHdr );\n      do{\n        if( (pC->aType[i] = t = zHdr[0])<0x80 ){\n          zHdr++;\n          offset64 += sqlite3VdbeOneByteSerialTypeLen(t);\n        }else{\n          zHdr += sqlite3GetVarint32(zHdr, &t);\n          pC->aType[i] = t;\n          offset64 += sqlite3VdbeSerialTypeLen(t);\n        }\n        aOffset[++i] = (u32)(offset64 & 0xffffffff);\n      }while( (u32)i<=p2 && zHdr<zEndHdr );\n\n      /* The record is corrupt if any of the following are true:\n      ** (1) the bytes of the header extend past the declared header size\n      ** (2) the entire header was used but not all data was used\n      ** (3) the end of the data extends beyond the end of the record.\n      */\n      if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))\n       || (offset64 > pC->payloadSize)\n      ){\n        if( aOffset[0]==0 ){\n          i = 0;\n          zHdr = zEndHdr;\n        }else{\n          if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);\n          goto op_column_corrupt;\n        }\n      }\n\n      pC->nHdrParsed = i;\n      pC->iHdrOffset = (u32)(zHdr - zData);\n      if( pC->aRow==0 ) sqlite3VdbeMemRelease(&sMem);\n    }else{\n      t = 0;\n    }\n\n    /* If after trying to extract new entries from the header, nHdrParsed is\n    ** still not up to p2, that means that the record has fewer than p2\n    ** columns.  So the result will be either the default value or a NULL.\n    */\n    if( pC->nHdrParsed<=p2 ){\n      pDest = &aMem[pOp->p3];\n      memAboutToChange(p, pDest);\n      if( pOp->p4type==P4_MEM ){\n        sqlite3VdbeMemShallowCopy(pDest, pOp->p4.pMem, MEM_Static);\n      }else{\n        sqlite3VdbeMemSetNull(pDest);\n      }\n      goto op_column_out;\n    }\n  }else{\n    t = pC->aType[p2];\n  }\n\n  /* Extract the content for the p2+1-th column.  Control can only\n  ** reach this point if aOffset[p2], aOffset[p2+1], and pC->aType[p2] are\n  ** all valid.\n  */\n  assert( p2<pC->nHdrParsed );\n  assert( rc==SQLITE_OK );\n  pDest = &aMem[pOp->p3];\n  memAboutToChange(p, pDest);\n  assert( sqlite3VdbeCheckMemInvariants(pDest) );\n  if( VdbeMemDynamic(pDest) ){\n    sqlite3VdbeMemSetNull(pDest);\n  }\n  assert( t==pC->aType[p2] );\n  if( pC->szRow>=aOffset[p2+1] ){\n    /* This is the common case where the desired content fits on the original\n    ** page - where the content is not on an overflow page */\n    zData = pC->aRow + aOffset[p2];\n    if( t<12 ){\n      sqlite3VdbeSerialGet(zData, t, pDest);\n    }else{\n      /* If the column value is a string, we need a persistent value, not\n      ** a MEM_Ephem value.  This branch is a fast short-cut that is equivalent\n      ** to calling sqlite3VdbeSerialGet() and sqlite3VdbeDeephemeralize().\n      */\n      static const u16 aFlag[] = { MEM_Blob, MEM_Str|MEM_Term };\n      pDest->n = len = (t-12)/2;\n      pDest->enc = encoding;\n      if( pDest->szMalloc < len+2 ){\n        if( len>db->aLimit[SQLITE_LIMIT_LENGTH] ) goto too_big;\n        pDest->flags = MEM_Null;\n        if( sqlite3VdbeMemGrow(pDest, len+2, 0) ) goto no_mem;\n      }else{\n        pDest->z = pDest->zMalloc;\n      }\n      memcpy(pDest->z, zData, len);\n      pDest->z[len] = 0;\n      pDest->z[len+1] = 0;\n      pDest->flags = aFlag[t&1];\n    }\n  }else{\n    u8 p5;\n    pDest->enc = encoding;\n    assert( pDest->db==db );\n    /* This branch happens only when content is on overflow pages */\n    if( ((p5 = (pOp->p5 & OPFLAG_BYTELENARG))!=0\n          && (p5==OPFLAG_TYPEOFARG\n              || (t>=12 && ((t&1)==0 || p5==OPFLAG_BYTELENARG))\n             )\n        )\n     || sqlite3VdbeSerialTypeLen(t)==0\n    ){\n      /* Content is irrelevant for\n      **    1. the typeof() function,\n      **    2. the length(X) function if X is a blob, and\n      **    3. if the content length is zero.\n      ** So we might as well use bogus content rather than reading\n      ** content from disk.\n      **\n      ** Although sqlite3VdbeSerialGet() may read at most 8 bytes from the\n      ** buffer passed to it, debugging function VdbeMemPrettyPrint() may\n      ** read more.  Use the global constant sqlite3CtypeMap[] as the array,\n      ** as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())\n      ** and it begins with a bunch of zeros.\n      */\n      sqlite3VdbeSerialGet((u8*)sqlite3CtypeMap, t, pDest);\n    }else{\n      rc = vdbeColumnFromOverflow(pC, p2, t, aOffset[p2],\n                p->cacheCtr, colCacheCtr, pDest);\n      if( rc ){\n        if( rc==SQLITE_NOMEM ) goto no_mem;\n        if( rc==SQLITE_TOOBIG ) goto too_big;\n        goto abort_due_to_error;\n      }\n    }\n  }\n\nop_column_out:\n  UPDATE_MAX_BLOBSIZE(pDest);\n  REGISTER_TRACE(pOp->p3, pDest);\n  break;\n\nop_column_corrupt:\n  if( aOp[0].p3>0 ){\n    pOp = &aOp[aOp[0].p3-1];\n    break;\n  }else{\n    rc = SQLITE_CORRUPT_BKPT;\n    goto abort_due_to_error;\n  }\n}\n\n/* Opcode: TypeCheck P1 P2 P3 P4 *\n** Synopsis: typecheck(r[P1@P2])\n**\n** Apply affinities to the range of P2 registers beginning with P1.\n** Take the affinities from the Table object in P4.  If any value\n** cannot be coerced into the correct type, then raise an error.\n**\n** If P3==0, then omit checking of VIRTUAL columns.\n**\n** If P3==1, then omit checking of all generated column, both VIRTUAL\n** and STORED.\n**\n** If P3>=2, then only check column number P3-2 in the table (which will\n** be a VIRTUAL column) against the value in reg[P1].  In this case,\n** P2 will be 1.\n**\n** This opcode is similar to OP_Affinity except that this opcode\n** forces the register type to the Table column type.  This is used\n** to implement \"strict affinity\".\n**\n** GENERATED ALWAYS AS ... STATIC columns are only checked if P3\n** is zero.  When P3 is non-zero, no type checking occurs for\n** static generated columns.  Virtual columns are computed at query time\n** and so they are never checked.\n**\n** Preconditions:\n**\n** <ul>\n** <li> P2 should be the number of non-virtual columns in the\n**      table of P4 unless P3>1, in which case P2 will be 1.\n** <li> Table P4 is a STRICT table.\n** </ul>\n**\n** If any precondition is false, an assertion fault occurs.\n*/\ncase OP_TypeCheck: {\n  Table *pTab;\n  Column *aCol;\n  int i;\n  int nCol;\n\n  assert( pOp->p4type==P4_TABLE );\n  pTab = pOp->p4.pTab;\n  assert( pTab->tabFlags & TF_Strict );\n  assert( pOp->p3>=0 && pOp->p3<pTab->nCol+2 );\n  aCol = pTab->aCol;\n  pIn1 = &aMem[pOp->p1];\n  if( pOp->p3<2 ){\n    assert( pTab->nNVCol==pOp->p2 );\n    i = 0;\n    nCol = pTab->nCol;\n  }else{\n    i = pOp->p3-2;\n    nCol = i+1;\n    assert( i<pTab->nCol );\n    assert( aCol[i].colFlags & COLFLAG_VIRTUAL );\n    assert( pOp->p2==1 );\n  }\n  for(; i<nCol; i++){\n    if( (aCol[i].colFlags & COLFLAG_GENERATED)!=0 && pOp->p3<2 ){\n      if( (aCol[i].colFlags & COLFLAG_VIRTUAL)!=0 ) continue;\n      if( pOp->p3 ){ pIn1++; continue; }\n    }\n    assert( pIn1 < &aMem[pOp->p1+pOp->p2] );\n    applyAffinity(pIn1, aCol[i].affinity, encoding);\n    if( (pIn1->flags & MEM_Null)==0 ){\n      switch( aCol[i].eCType ){\n        case COLTYPE_BLOB: {\n          if( (pIn1->flags & MEM_Blob)==0 ) goto vdbe_type_error;\n          break;\n        }\n        case COLTYPE_INTEGER:\n        case COLTYPE_INT: {\n          if( (pIn1->flags & MEM_Int)==0 ) goto vdbe_type_error;\n          break;\n        }\n        case COLTYPE_TEXT: {\n          if( (pIn1->flags & MEM_Str)==0 ) goto vdbe_type_error;\n          break;\n        }\n        case COLTYPE_REAL: {\n          testcase( (pIn1->flags & (MEM_Real|MEM_IntReal))==MEM_Real );\n          assert( (pIn1->flags & MEM_IntReal)==0 );\n          if( pIn1->flags & MEM_Int ){\n            /* When applying REAL affinity, if the result is still an MEM_Int\n            ** that will fit in 6 bytes, then change the type to MEM_IntReal\n            ** so that we keep the high-resolution integer value but know that\n            ** the type really wants to be REAL. */\n            testcase( pIn1->u.i==140737488355328LL );\n            testcase( pIn1->u.i==140737488355327LL );\n            testcase( pIn1->u.i==-140737488355328LL );\n            testcase( pIn1->u.i==-140737488355329LL );\n            if( pIn1->u.i<=140737488355327LL && pIn1->u.i>=-140737488355328LL){\n              pIn1->flags |= MEM_IntReal;\n              pIn1->flags &= ~MEM_Int;\n            }else{\n              pIn1->u.r = (double)pIn1->u.i;\n              pIn1->flags |= MEM_Real;\n              pIn1->flags &= ~MEM_Int;\n            }\n          }else if( (pIn1->flags & (MEM_Real|MEM_IntReal))==0 ){\n            goto vdbe_type_error;\n          }\n          break;\n        }\n        default: {\n          /* COLTYPE_ANY.  Accept anything. */\n          break;\n        }\n      }\n    }\n    REGISTER_TRACE((int)(pIn1-aMem), pIn1);\n    pIn1++;\n  }\n  assert( pIn1 == &aMem[pOp->p1+pOp->p2] );\n  break;\n\nvdbe_type_error:\n  sqlite3VdbeError(p, \"cannot store %s value in %s column %s.%s\",\n     vdbeMemTypeName(pIn1), sqlite3StdType[aCol[i].eCType-1],\n     pTab->zName, aCol[i].zCnName);\n  rc = SQLITE_CONSTRAINT_DATATYPE;\n  goto abort_due_to_error;\n}\n\n/* Opcode: Affinity P1 P2 * P4 *\n** Synopsis: affinity(r[P1@P2])\n**\n** Apply affinities to a range of P2 registers starting with P1.\n**\n** P4 is a string that is P2 characters long. The N-th character of the\n** string indicates the column affinity that should be used for the N-th\n** memory cell in the range.\n*/\ncase OP_Affinity: {\n  const char *zAffinity;   /* The affinity to be applied */\n\n  zAffinity = pOp->p4.z;\n  assert( zAffinity!=0 );\n  assert( pOp->p2>0 );\n  assert( zAffinity[pOp->p2]==0 );\n  pIn1 = &aMem[pOp->p1];\n  while( 1 /*exit-by-break*/ ){\n    assert( pIn1 <= &p->aMem[(p->nMem+1 - p->nCursor)] );\n    assert( zAffinity[0]==SQLITE_AFF_NONE || memIsValid(pIn1) );\n    applyAffinity(pIn1, zAffinity[0], encoding);\n    if( zAffinity[0]==SQLITE_AFF_REAL && (pIn1->flags & MEM_Int)!=0 ){\n      /* When applying REAL affinity, if the result is still an MEM_Int\n      ** that will fit in 6 bytes, then change the type to MEM_IntReal\n      ** so that we keep the high-resolution integer value but know that\n      ** the type really wants to be REAL. */\n      testcase( pIn1->u.i==140737488355328LL );\n      testcase( pIn1->u.i==140737488355327LL );\n      testcase( pIn1->u.i==-140737488355328LL );\n      testcase( pIn1->u.i==-140737488355329LL );\n      if( pIn1->u.i<=140737488355327LL && pIn1->u.i>=-140737488355328LL ){\n        pIn1->flags |= MEM_IntReal;\n        pIn1->flags &= ~MEM_Int;\n      }else{\n        pIn1->u.r = (double)pIn1->u.i;\n        pIn1->flags |= MEM_Real;\n        pIn1->flags &= ~(MEM_Int|MEM_Str);\n      }\n    }\n    REGISTER_TRACE((int)(pIn1-aMem), pIn1);\n    zAffinity++;\n    if( zAffinity[0]==0 ) break;\n    pIn1++;\n  }\n  break;\n}\n\n/* Opcode: MakeRecord P1 P2 P3 P4 *\n** Synopsis: r[P3]=mkrec(r[P1@P2])\n**\n** Convert P2 registers beginning with P1 into the [record format]\n** use as a data record in a database table or as a key\n** in an index.  The OP_Column opcode can decode the record later.\n**\n** P4 may be a string that is P2 characters long.  The N-th character of the\n** string indicates the column affinity that should be used for the N-th\n** field of the index key.\n**\n** The mapping from character to affinity is given by the SQLITE_AFF_\n** macros defined in sqliteInt.h.\n**\n** If P4 is NULL then all index fields have the affinity BLOB.\n**\n** The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM\n** compile-time option is enabled:\n**\n**   * If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index\n**     of the right-most table that can be null-trimmed.\n**\n**   * If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value\n**     OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to\n**     accept no-change records with serial_type 10.  This value is\n**     only used inside an assert() and does not affect the end result.\n*/\ncase OP_MakeRecord: {\n  Mem *pRec;             /* The new record */\n  u64 nData;             /* Number of bytes of data space */\n  int nHdr;              /* Number of bytes of header space */\n  i64 nByte;             /* Data space required for this record */\n  i64 nZero;             /* Number of zero bytes at the end of the record */\n  int nVarint;           /* Number of bytes in a varint */\n  u32 serial_type;       /* Type field */\n  Mem *pData0;           /* First field to be combined into the record */\n  Mem *pLast;            /* Last field of the record */\n  int nField;            /* Number of fields in the record */\n  char *zAffinity;       /* The affinity string for the record */\n  u32 len;               /* Length of a field */\n  u8 *zHdr;              /* Where to write next byte of the header */\n  u8 *zPayload;          /* Where to write next byte of the payload */\n\n  /* Assuming the record contains N fields, the record format looks\n  ** like this:\n  **\n  ** ------------------------------------------------------------------------\n  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |\n  ** ------------------------------------------------------------------------\n  **\n  ** Data(0) is taken from register P1.  Data(1) comes from register P1+1\n  ** and so forth.\n  **\n  ** Each type field is a varint representing the serial type of the\n  ** corresponding data element (see sqlite3VdbeSerialType()). The\n  ** hdr-size field is also a varint which is the offset from the beginning\n  ** of the record to data0.\n  */\n  nData = 0;         /* Number of bytes of data space */\n  nHdr = 0;          /* Number of bytes of header space */\n  nZero = 0;         /* Number of zero bytes at the end of the record */\n  nField = pOp->p1;\n  zAffinity = pOp->p4.z;\n  assert( nField>0 && pOp->p2>0 && pOp->p2+nField<=(p->nMem+1 - p->nCursor)+1 );\n  pData0 = &aMem[nField];\n  nField = pOp->p2;\n  pLast = &pData0[nField-1];\n\n  /* Identify the output register */\n  assert( pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2 );\n  pOut = &aMem[pOp->p3];\n  memAboutToChange(p, pOut);\n\n  /* Apply the requested affinity to all inputs\n  */\n  assert( pData0<=pLast );\n  if( zAffinity ){\n    pRec = pData0;\n    do{\n      applyAffinity(pRec, zAffinity[0], encoding);\n      if( zAffinity[0]==SQLITE_AFF_REAL && (pRec->flags & MEM_Int) ){\n        pRec->flags |= MEM_IntReal;\n        pRec->flags &= ~(MEM_Int);\n      }\n      REGISTER_TRACE((int)(pRec-aMem), pRec);\n      zAffinity++;\n      pRec++;\n      assert( zAffinity[0]==0 || pRec<=pLast );\n    }while( zAffinity[0] );\n  }\n\n#ifdef SQLITE_ENABLE_NULL_TRIM\n  /* NULLs can be safely trimmed from the end of the record, as long as\n  ** as the schema format is 2 or more and none of the omitted columns\n  ** have a non-NULL default value.  Also, the record must be left with\n  ** at least one field.  If P5>0 then it will be one more than the\n  ** index of the right-most column with a non-NULL default value */\n  if( pOp->p5 ){\n    while( (pLast->flags & MEM_Null)!=0 && nField>pOp->p5 ){\n      pLast--;\n      nField--;\n    }\n  }\n#endif\n\n  /* Loop through the elements that will make up the record to figure\n  ** out how much space is required for the new record.  After this loop,\n  ** the Mem.uTemp field of each term should hold the serial-type that will\n  ** be used for that term in the generated record:\n  **\n  **   Mem.uTemp value    type\n  **   ---------------    ---------------\n  **      0               NULL\n  **      1               1-byte signed integer\n  **      2               2-byte signed integer\n  **      3               3-byte signed integer\n  **      4               4-byte signed integer\n  **      5               6-byte signed integer\n  **      6               8-byte signed integer\n  **      7               IEEE float\n  **      8               Integer constant 0\n  **      9               Integer constant 1\n  **     10,11            reserved for expansion\n  **    N>=12 and even    BLOB\n  **    N>=13 and odd     text\n  **\n  ** The following additional values are computed:\n  **     nHdr        Number of bytes needed for the record header\n  **     nData       Number of bytes of data space needed for the record\n  **     nZero       Zero bytes at the end of the record\n  */\n  pRec = pLast;\n  do{\n    assert( memIsValid(pRec) );\n    if( pRec->flags & MEM_Null ){\n      if( pRec->flags & MEM_Zero ){\n        /* Values with MEM_Null and MEM_Zero are created by xColumn virtual\n        ** table methods that never invoke sqlite3_result_xxxxx() while\n        ** computing an unchanging column value in an UPDATE statement.\n        ** Give such values a special internal-use-only serial-type of 10\n        ** so that they can be passed through to xUpdate and have\n        ** a true sqlite3_value_nochange(). */\n#ifndef SQLITE_ENABLE_NULL_TRIM\n        assert( pOp->p5==OPFLAG_NOCHNG_MAGIC || CORRUPT_DB );\n#endif\n        pRec->uTemp = 10;\n      }else{\n        pRec->uTemp = 0;\n      }\n      nHdr++;\n    }else if( pRec->flags & (MEM_Int|MEM_IntReal) ){\n      /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */\n      i64 i = pRec->u.i;\n      u64 uu;\n      testcase( pRec->flags & MEM_Int );\n      testcase( pRec->flags & MEM_IntReal );\n      if( i<0 ){\n        uu = ~i;\n      }else{\n        uu = i;\n      }\n      nHdr++;\n      testcase( uu==127 );               testcase( uu==128 );\n      testcase( uu==32767 );             testcase( uu==32768 );\n      testcase( uu==8388607 );           testcase( uu==8388608 );\n      testcase( uu==2147483647 );        testcase( uu==2147483648LL );\n      testcase( uu==140737488355327LL ); testcase( uu==140737488355328LL );\n      if( uu<=127 ){\n        if( (i&1)==i && p->minWriteFileFormat>=4 ){\n          pRec->uTemp = 8+(u32)uu;\n        }else{\n          nData++;\n          pRec->uTemp = 1;\n        }\n      }else if( uu<=32767 ){\n        nData += 2;\n        pRec->uTemp = 2;\n      }else if( uu<=8388607 ){\n        nData += 3;\n        pRec->uTemp = 3;\n      }else if( uu<=2147483647 ){\n        nData += 4;\n        pRec->uTemp = 4;\n      }else if( uu<=140737488355327LL ){\n        nData += 6;\n        pRec->uTemp = 5;\n      }else{\n        nData += 8;\n        if( pRec->flags & MEM_IntReal ){\n          /* If the value is IntReal and is going to take up 8 bytes to store\n          ** as an integer, then we might as well make it an 8-byte floating\n          ** point value */\n          pRec->u.r = (double)pRec->u.i;\n          pRec->flags &= ~MEM_IntReal;\n          pRec->flags |= MEM_Real;\n          pRec->uTemp = 7;\n        }else{\n          pRec->uTemp = 6;\n        }\n      }\n    }else if( pRec->flags & MEM_Real ){\n      nHdr++;\n      nData += 8;\n      pRec->uTemp = 7;\n    }else{\n      assert( db->mallocFailed || pRec->flags&(MEM_Str|MEM_Blob) );\n      assert( pRec->n>=0 );\n      len = (u32)pRec->n;\n      serial_type = (len*2) + 12 + ((pRec->flags & MEM_Str)!=0);\n      if( pRec->flags & MEM_Zero ){\n        serial_type += (u32)pRec->u.nZero*2;\n        if( nData ){\n          if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;\n          len += pRec->u.nZero;\n        }else{\n          nZero += pRec->u.nZero;\n        }\n      }\n      nData += len;\n      nHdr += sqlite3VarintLen(serial_type);\n      pRec->uTemp = serial_type;\n    }\n    if( pRec==pData0 ) break;\n    pRec--;\n  }while(1);\n\n  /* EVIDENCE-OF: R-22564-11647 The header begins with a single varint\n  ** which determines the total number of bytes in the header. The varint\n  ** value is the size of the header in bytes including the size varint\n  ** itself. */\n  testcase( nHdr==126 );\n  testcase( nHdr==127 );\n  if( nHdr<=126 ){\n    /* The common case */\n    nHdr += 1;\n  }else{\n    /* Rare case of a really large header */\n    nVarint = sqlite3VarintLen(nHdr);\n    nHdr += nVarint;\n    if( nVarint<sqlite3VarintLen(nHdr) ) nHdr++;\n  }\n  nByte = nHdr+nData;\n\n  /* Make sure the output register has a buffer large enough to store\n  ** the new record. The output register (pOp->p3) is not allowed to\n  ** be one of the input registers (because the following call to\n  ** sqlite3VdbeMemClearAndResize() could clobber the value before it is used).\n  */\n  if( nByte+nZero<=pOut->szMalloc ){\n    /* The output register is already large enough to hold the record.\n    ** No error checks or buffer enlargement is required */\n    pOut->z = pOut->zMalloc;\n  }else{\n    /* Need to make sure that the output is not too big and then enlarge\n    ** the output register to hold the full result */\n    if( nByte+nZero>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n      goto too_big;\n    }\n    if( sqlite3VdbeMemClearAndResize(pOut, (int)nByte) ){\n      goto no_mem;\n    }\n  }\n  pOut->n = (int)nByte;\n  pOut->flags = MEM_Blob;\n  if( nZero ){\n    pOut->u.nZero = nZero;\n    pOut->flags |= MEM_Zero;\n  }\n  UPDATE_MAX_BLOBSIZE(pOut);\n  zHdr = (u8 *)pOut->z;\n  zPayload = zHdr + nHdr;\n\n  /* Write the record */\n  if( nHdr<0x80 ){\n    *(zHdr++) = nHdr;\n  }else{\n    zHdr += sqlite3PutVarint(zHdr,nHdr);\n  }\n  assert( pData0<=pLast );\n  pRec = pData0;\n  while( 1 /*exit-by-break*/ ){\n    serial_type = pRec->uTemp;\n    /* EVIDENCE-OF: R-06529-47362 Following the size varint are one or more\n    ** additional varints, one per column.\n    ** EVIDENCE-OF: R-64536-51728 The values for each column in the record\n    ** immediately follow the header. */\n    if( serial_type<=7 ){\n      *(zHdr++) = serial_type;\n      if( serial_type==0 ){\n        /* NULL value.  No change in zPayload */\n      }else{\n        u64 v;\n        if( serial_type==7 ){\n          assert( sizeof(v)==sizeof(pRec->u.r) );\n          memcpy(&v, &pRec->u.r, sizeof(v));\n          swapMixedEndianFloat(v);\n        }else{\n          v = pRec->u.i;\n        }\n        len = sqlite3SmallTypeSizes[serial_type];\n        assert( len>=1 && len<=8 && len!=5 && len!=7 );\n        switch( len ){\n          default: zPayload[7] = (u8)(v&0xff); v >>= 8;\n                   zPayload[6] = (u8)(v&0xff); v >>= 8;\n                   /* no break */ deliberate_fall_through\n          case 6:  zPayload[5] = (u8)(v&0xff); v >>= 8;\n                   zPayload[4] = (u8)(v&0xff); v >>= 8;\n                   /* no break */ deliberate_fall_through\n          case 4:  zPayload[3] = (u8)(v&0xff); v >>= 8;\n                   /* no break */ deliberate_fall_through\n          case 3:  zPayload[2] = (u8)(v&0xff); v >>= 8;\n                   /* no break */ deliberate_fall_through\n          case 2:  zPayload[1] = (u8)(v&0xff); v >>= 8;\n                   /* no break */ deliberate_fall_through\n          case 1:  zPayload[0] = (u8)(v&0xff);\n        }\n        zPayload += len;\n      }\n    }else if( serial_type<0x80 ){\n      *(zHdr++) = serial_type;\n      if( serial_type>=14 && pRec->n>0 ){\n        assert( pRec->z!=0 );\n        memcpy(zPayload, pRec->z, pRec->n);\n        zPayload += pRec->n;\n      }\n    }else{\n      zHdr += sqlite3PutVarint(zHdr, serial_type);\n      if( pRec->n ){\n        assert( pRec->z!=0 );\n        assert( pRec->z!=(const char*)sqlite3CtypeMap );\n        memcpy(zPayload, pRec->z, pRec->n);\n        zPayload += pRec->n;\n      }\n    }\n    if( pRec==pLast ) break;\n    pRec++;\n  }\n  assert( nHdr==(int)(zHdr - (u8*)pOut->z) );\n  assert( nByte==(int)(zPayload - (u8*)pOut->z) );\n\n  assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );\n  REGISTER_TRACE(pOp->p3, pOut);\n  break;\n}\n\n/* Opcode: Count P1 P2 P3 * *\n** Synopsis: r[P2]=count()\n**\n** Store the number of entries (an integer value) in the table or index\n** opened by cursor P1 in register P2.\n**\n** If P3==0, then an exact count is obtained, which involves visiting\n** every btree page of the table.  But if P3 is non-zero, an estimate\n** is returned based on the current cursor position.\n*/\ncase OP_Count: {         /* out2 */\n  i64 nEntry;\n  BtCursor *pCrsr;\n\n  assert( p->apCsr[pOp->p1]->eCurType==CURTYPE_BTREE );\n  pCrsr = p->apCsr[pOp->p1]->uc.pCursor;\n  assert( pCrsr );\n  if( pOp->p3 ){\n    nEntry = sqlite3BtreeRowCountEst(pCrsr);\n  }else{\n    nEntry = 0;  /* Not needed.  Only used to silence a warning. */\n    rc = sqlite3BtreeCount(db, pCrsr, &nEntry);\n    if( rc ) goto abort_due_to_error;\n  }\n  pOut = out2Prerelease(p, pOp);\n  pOut->u.i = nEntry;\n  goto check_for_interrupt;\n}\n\n/* Opcode: Savepoint P1 * * P4 *\n**\n** Open, release or rollback the savepoint named by parameter P4, depending\n** on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN).\n** To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE).\n** To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK).\n*/\ncase OP_Savepoint: {\n  int p1;                         /* Value of P1 operand */\n  char *zName;                    /* Name of savepoint */\n  int nName;\n  Savepoint *pNew;\n  Savepoint *pSavepoint;\n  Savepoint *pTmp;\n  int iSavepoint;\n  int ii;\n\n  p1 = pOp->p1;\n  zName = pOp->p4.z;\n\n  /* Assert that the p1 parameter is valid. Also that if there is no open\n  ** transaction, then there cannot be any savepoints.\n  */\n  assert( db->pSavepoint==0 || db->autoCommit==0 );\n  assert( p1==SAVEPOINT_BEGIN||p1==SAVEPOINT_RELEASE||p1==SAVEPOINT_ROLLBACK );\n  assert( db->pSavepoint || db->isTransactionSavepoint==0 );\n  assert( checkSavepointCount(db) );\n  assert( p->bIsReader );\n\n  if( p1==SAVEPOINT_BEGIN ){\n    if( db->nVdbeWrite>0 ){\n      /* A new savepoint cannot be created if there are active write\n      ** statements (i.e. open read/write incremental blob handles).\n      */\n      sqlite3VdbeError(p, \"cannot open savepoint - SQL statements in progress\");\n      rc = SQLITE_BUSY;\n    }else{\n      nName = sqlite3Strlen30(zName);\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n      /* This call is Ok even if this savepoint is actually a transaction\n      ** savepoint (and therefore should not prompt xSavepoint()) callbacks.\n      ** If this is a transaction savepoint being opened, it is guaranteed\n      ** that the db->aVTrans[] array is empty.  */\n      assert( db->autoCommit==0 || db->nVTrans==0 );\n      rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN,\n                                db->nStatement+db->nSavepoint);\n      if( rc!=SQLITE_OK ) goto abort_due_to_error;\n#endif\n\n      /* Create a new savepoint structure. */\n      pNew = sqlite3DbMallocRawNN(db, sizeof(Savepoint)+nName+1);\n      if( pNew ){\n        pNew->zName = (char *)&pNew[1];\n        memcpy(pNew->zName, zName, nName+1);\n\n        /* If there is no open transaction, then mark this as a special\n        ** \"transaction savepoint\". */\n        if( db->autoCommit ){\n          db->autoCommit = 0;\n          db->isTransactionSavepoint = 1;\n        }else{\n          db->nSavepoint++;\n        }\n\n        /* Link the new savepoint into the database handle's list. */\n        pNew->pNext = db->pSavepoint;\n        db->pSavepoint = pNew;\n        pNew->nDeferredCons = db->nDeferredCons;\n        pNew->nDeferredImmCons = db->nDeferredImmCons;\n      }\n    }\n  }else{\n    assert( p1==SAVEPOINT_RELEASE || p1==SAVEPOINT_ROLLBACK );\n    iSavepoint = 0;\n\n    /* Find the named savepoint. If there is no such savepoint, then an\n    ** an error is returned to the user.  */\n    for(\n      pSavepoint = db->pSavepoint;\n      pSavepoint && sqlite3StrICmp(pSavepoint->zName, zName);\n      pSavepoint = pSavepoint->pNext\n    ){\n      iSavepoint++;\n    }\n    if( !pSavepoint ){\n      sqlite3VdbeError(p, \"no such savepoint: %s\", zName);\n      rc = SQLITE_ERROR;\n    }else if( db->nVdbeWrite>0 && p1==SAVEPOINT_RELEASE ){\n      /* It is not possible to release (commit) a savepoint if there are\n      ** active write statements.\n      */\n      sqlite3VdbeError(p, \"cannot release savepoint - \"\n                          \"SQL statements in progress\");\n      rc = SQLITE_BUSY;\n    }else{\n\n      /* Determine whether or not this is a transaction savepoint. If so,\n      ** and this is a RELEASE command, then the current transaction\n      ** is committed.\n      */\n      int isTransaction = pSavepoint->pNext==0 && db->isTransactionSavepoint;\n      if( isTransaction && p1==SAVEPOINT_RELEASE ){\n        if( (rc = sqlite3VdbeCheckFkDeferred(p))!=SQLITE_OK ){\n          goto vdbe_return;\n        }\n        db->autoCommit = 1;\n        if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){\n          p->pc = (int)(pOp - aOp);\n          db->autoCommit = 0;\n          p->rc = rc = SQLITE_BUSY;\n          goto vdbe_return;\n        }\n        rc = p->rc;\n        if( rc ){\n          db->autoCommit = 0;\n        }else{\n          db->isTransactionSavepoint = 0;\n        }\n      }else{\n        int isSchemaChange;\n        iSavepoint = db->nSavepoint - iSavepoint - 1;\n        if( p1==SAVEPOINT_ROLLBACK ){\n          isSchemaChange = (db->mDbFlags & DBFLAG_SchemaChange)!=0;\n          for(ii=0; ii<db->nDb; ii++){\n            rc = sqlite3BtreeTripAllCursors(db->aDb[ii].pBt,\n                                       SQLITE_ABORT_ROLLBACK,\n                                       isSchemaChange==0);\n            if( rc!=SQLITE_OK ) goto abort_due_to_error;\n          }\n        }else{\n          assert( p1==SAVEPOINT_RELEASE );\n          isSchemaChange = 0;\n        }\n        for(ii=0; ii<db->nDb; ii++){\n          rc = sqlite3BtreeSavepoint(db->aDb[ii].pBt, p1, iSavepoint);\n          if( rc!=SQLITE_OK ){\n            goto abort_due_to_error;\n          }\n        }\n        if( isSchemaChange ){\n          sqlite3ExpirePreparedStatements(db, 0);\n          sqlite3ResetAllSchemasOfConnection(db);\n          db->mDbFlags |= DBFLAG_SchemaChange;\n        }\n      }\n      if( rc ) goto abort_due_to_error;\n\n      /* Regardless of whether this is a RELEASE or ROLLBACK, destroy all\n      ** savepoints nested inside of the savepoint being operated on. */\n      while( db->pSavepoint!=pSavepoint ){\n        pTmp = db->pSavepoint;\n        db->pSavepoint = pTmp->pNext;\n        sqlite3DbFree(db, pTmp);\n        db->nSavepoint--;\n      }\n\n      /* If it is a RELEASE, then destroy the savepoint being operated on\n      ** too. If it is a ROLLBACK TO, then set the number of deferred\n      ** constraint violations present in the database to the value stored\n      ** when the savepoint was created.  */\n      if( p1==SAVEPOINT_RELEASE ){\n        assert( pSavepoint==db->pSavepoint );\n        db->pSavepoint = pSavepoint->pNext;\n        sqlite3DbFree(db, pSavepoint);\n        if( !isTransaction ){\n          db->nSavepoint--;\n        }\n      }else{\n        assert( p1==SAVEPOINT_ROLLBACK );\n        db->nDeferredCons = pSavepoint->nDeferredCons;\n        db->nDeferredImmCons = pSavepoint->nDeferredImmCons;\n      }\n\n      if( !isTransaction || p1==SAVEPOINT_ROLLBACK ){\n        rc = sqlite3VtabSavepoint(db, p1, iSavepoint);\n        if( rc!=SQLITE_OK ) goto abort_due_to_error;\n      }\n    }\n  }\n  if( rc ) goto abort_due_to_error;\n  if( p->eVdbeState==VDBE_HALT_STATE ){\n    rc = SQLITE_DONE;\n    goto vdbe_return;\n  }\n  break;\n}\n\n/* Opcode: AutoCommit P1 P2 * * *\n**\n** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll\n** back any currently active btree transactions. If there are any active\n** VMs (apart from this one), then a ROLLBACK fails.  A COMMIT fails if\n** there are active writing VMs or active VMs that use shared cache.\n**\n** This instruction causes the VM to halt.\n*/\ncase OP_AutoCommit: {\n  int desiredAutoCommit;\n  int iRollback;\n\n  desiredAutoCommit = pOp->p1;\n  iRollback = pOp->p2;\n  assert( desiredAutoCommit==1 || desiredAutoCommit==0 );\n  assert( desiredAutoCommit==1 || iRollback==0 );\n  assert( db->nVdbeActive>0 );  /* At least this one VM is active */\n  assert( p->bIsReader );\n\n  if( desiredAutoCommit!=db->autoCommit ){\n    if( iRollback ){\n      assert( desiredAutoCommit==1 );\n      sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);\n      db->autoCommit = 1;\n    }else if( desiredAutoCommit && db->nVdbeWrite>0 ){\n      /* If this instruction implements a COMMIT and other VMs are writing\n      ** return an error indicating that the other VMs must complete first.\n      */\n      sqlite3VdbeError(p, \"cannot commit transaction - \"\n                          \"SQL statements in progress\");\n      rc = SQLITE_BUSY;\n      goto abort_due_to_error;\n    }else if( (rc = sqlite3VdbeCheckFkDeferred(p))!=SQLITE_OK ){\n      goto vdbe_return;\n    }else{\n      db->autoCommit = (u8)desiredAutoCommit;\n    }\n    if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){\n      p->pc = (int)(pOp - aOp);\n      db->autoCommit = (u8)(1-desiredAutoCommit);\n      p->rc = rc = SQLITE_BUSY;\n      goto vdbe_return;\n    }\n    sqlite3CloseSavepoints(db);\n    if( p->rc==SQLITE_OK ){\n      rc = SQLITE_DONE;\n    }else{\n      rc = SQLITE_ERROR;\n    }\n    goto vdbe_return;\n  }else{\n    sqlite3VdbeError(p,\n        (!desiredAutoCommit)?\"cannot start a transaction within a transaction\":(\n        (iRollback)?\"cannot rollback - no transaction is active\":\n                   \"cannot commit - no transaction is active\"));\n\n    rc = SQLITE_ERROR;\n    goto abort_due_to_error;\n  }\n  /*NOTREACHED*/ assert(0);\n}\n\n/* Opcode: Transaction P1 P2 P3 P4 P5\n**\n** Begin a transaction on database P1 if a transaction is not already\n** active.\n** If P2 is non-zero, then a write-transaction is started, or if a\n** read-transaction is already active, it is upgraded to a write-transaction.\n** If P2 is zero, then a read-transaction is started.  If P2 is 2 or more\n** then an exclusive transaction is started.\n**\n** P1 is the index of the database file on which the transaction is\n** started.  Index 0 is the main database file and index 1 is the\n** file used for temporary tables.  Indices of 2 or more are used for\n** attached databases.\n**\n** If a write-transaction is started and the Vdbe.usesStmtJournal flag is\n** true (this flag is set if the Vdbe may modify more than one row and may\n** throw an ABORT exception), a statement transaction may also be opened.\n** More specifically, a statement transaction is opened iff the database\n** connection is currently not in autocommit mode, or if there are other\n** active statements. A statement transaction allows the changes made by this\n** VDBE to be rolled back after an error without having to roll back the\n** entire transaction. If no error is encountered, the statement transaction\n** will automatically commit when the VDBE halts.\n**\n** If P5!=0 then this opcode also checks the schema cookie against P3\n** and the schema generation counter against P4.\n** The cookie changes its value whenever the database schema changes.\n** This operation is used to detect when that the cookie has changed\n** and that the current process needs to reread the schema.  If the schema\n** cookie in P3 differs from the schema cookie in the database header or\n** if the schema generation counter in P4 differs from the current\n** generation counter, then an SQLITE_SCHEMA error is raised and execution\n** halts.  The sqlite3_step() wrapper function might then reprepare the\n** statement and rerun it from the beginning.\n*/\ncase OP_Transaction: {\n  Btree *pBt;\n  Db *pDb;\n  int iMeta = 0;\n\n  assert( p->bIsReader );\n  assert( p->readOnly==0 || pOp->p2==0 );\n  assert( pOp->p2>=0 && pOp->p2<=2 );\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  assert( DbMaskTest(p->btreeMask, pOp->p1) );\n  assert( rc==SQLITE_OK );\n  if( pOp->p2 && (db->flags & (SQLITE_QueryOnly|SQLITE_CorruptRdOnly))!=0 ){\n    if( db->flags & SQLITE_QueryOnly ){\n      /* Writes prohibited by the \"PRAGMA query_only=TRUE\" statement */\n      rc = SQLITE_READONLY;\n    }else{\n      /* Writes prohibited due to a prior SQLITE_CORRUPT in the current\n      ** transaction */\n      rc = SQLITE_CORRUPT;\n    }\n    goto abort_due_to_error;\n  }\n  pDb = &db->aDb[pOp->p1];\n  pBt = pDb->pBt;\n\n  if( pBt ){\n    rc = sqlite3BtreeBeginTrans(pBt, pOp->p2, &iMeta);\n    testcase( rc==SQLITE_BUSY_SNAPSHOT );\n    testcase( rc==SQLITE_BUSY_RECOVERY );\n    if( rc!=SQLITE_OK ){\n      if( (rc&0xff)==SQLITE_BUSY ){\n        p->pc = (int)(pOp - aOp);\n        p->rc = rc;\n        goto vdbe_return;\n      }\n      goto abort_due_to_error;\n    }\n\n    if( p->usesStmtJournal\n     && pOp->p2\n     && (db->autoCommit==0 || db->nVdbeRead>1)\n    ){\n      assert( sqlite3BtreeTxnState(pBt)==SQLITE_TXN_WRITE );\n      if( p->iStatement==0 ){\n        assert( db->nStatement>=0 && db->nSavepoint>=0 );\n        db->nStatement++;\n        p->iStatement = db->nSavepoint + db->nStatement;\n      }\n\n      rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, p->iStatement-1);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3BtreeBeginStmt(pBt, p->iStatement);\n      }\n\n      /* Store the current value of the database handles deferred constraint\n      ** counter. If the statement transaction needs to be rolled back,\n      ** the value of this counter needs to be restored too.  */\n      p->nStmtDefCons = db->nDeferredCons;\n      p->nStmtDefImmCons = db->nDeferredImmCons;\n    }\n  }\n  assert( pOp->p5==0 || pOp->p4type==P4_INT32 );\n  if( rc==SQLITE_OK\n   && pOp->p5\n   && (iMeta!=pOp->p3 || pDb->pSchema->iGeneration!=pOp->p4.i)\n  ){\n    /*\n    ** IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema\n    ** version is checked to ensure that the schema has not changed since the\n    ** SQL statement was prepared.\n    */\n    sqlite3DbFree(db, p->zErrMsg);\n    p->zErrMsg = sqlite3DbStrDup(db, \"database schema has changed\");\n    /* If the schema-cookie from the database file matches the cookie\n    ** stored with the in-memory representation of the schema, do\n    ** not reload the schema from the database file.\n    **\n    ** If virtual-tables are in use, this is not just an optimization.\n    ** Often, v-tables store their data in other SQLite tables, which\n    ** are queried from within xNext() and other v-table methods using\n    ** prepared queries. If such a query is out-of-date, we do not want to\n    ** discard the database schema, as the user code implementing the\n    ** v-table would have to be ready for the sqlite3_vtab structure itself\n    ** to be invalidated whenever sqlite3_step() is called from within\n    ** a v-table method.\n    */\n    if( db->aDb[pOp->p1].pSchema->schema_cookie!=iMeta ){\n      sqlite3ResetOneSchema(db, pOp->p1);\n    }\n    p->expired = 1;\n    rc = SQLITE_SCHEMA;\n\n    /* Set changeCntOn to 0 to prevent the value returned by sqlite3_changes()\n    ** from being modified in sqlite3VdbeHalt(). If this statement is\n    ** reprepared, changeCntOn will be set again. */\n    p->changeCntOn = 0;\n  }\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: ReadCookie P1 P2 P3 * *\n**\n** Read cookie number P3 from database P1 and write it into register P2.\n** P3==1 is the schema version.  P3==2 is the database format.\n** P3==3 is the recommended pager cache size, and so forth.  P1==0 is\n** the main database file and P1==1 is the database file used to store\n** temporary tables.\n**\n** There must be a read-lock on the database (either a transaction\n** must be started or there must be an open cursor) before\n** executing this instruction.\n*/\ncase OP_ReadCookie: {               /* out2 */\n  int iMeta;\n  int iDb;\n  int iCookie;\n\n  assert( p->bIsReader );\n  iDb = pOp->p1;\n  iCookie = pOp->p3;\n  assert( pOp->p3<SQLITE_N_BTREE_META );\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( db->aDb[iDb].pBt!=0 );\n  assert( DbMaskTest(p->btreeMask, iDb) );\n\n  sqlite3BtreeGetMeta(db->aDb[iDb].pBt, iCookie, (u32 *)&iMeta);\n  pOut = out2Prerelease(p, pOp);\n  pOut->u.i = iMeta;\n  break;\n}\n\n/* Opcode: SetCookie P1 P2 P3 * P5\n**\n** Write the integer value P3 into cookie number P2 of database P1.\n** P2==1 is the schema version.  P2==2 is the database format.\n** P2==3 is the recommended pager cache\n** size, and so forth.  P1==0 is the main database file and P1==1 is the\n** database file used to store temporary tables.\n**\n** A transaction must be started before executing this opcode.\n**\n** If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal\n** schema version is set to P3-P5.  The \"PRAGMA schema_version=N\" statement\n** has P5 set to 1, so that the internal schema version will be different\n** from the database schema version, resulting in a schema reset.\n*/\ncase OP_SetCookie: {\n  Db *pDb;\n\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  assert( pOp->p2<SQLITE_N_BTREE_META );\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  assert( DbMaskTest(p->btreeMask, pOp->p1) );\n  assert( p->readOnly==0 );\n  pDb = &db->aDb[pOp->p1];\n  assert( pDb->pBt!=0 );\n  assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) );\n  /* See note about index shifting on OP_ReadCookie */\n  rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, pOp->p3);\n  if( pOp->p2==BTREE_SCHEMA_VERSION ){\n    /* When the schema cookie changes, record the new cookie internally */\n    *(u32*)&pDb->pSchema->schema_cookie = *(u32*)&pOp->p3 - pOp->p5;\n    db->mDbFlags |= DBFLAG_SchemaChange;\n    sqlite3FkClearTriggerCache(db, pOp->p1);\n  }else if( pOp->p2==BTREE_FILE_FORMAT ){\n    /* Record changes in the file format */\n    pDb->pSchema->file_format = pOp->p3;\n  }\n  if( pOp->p1==1 ){\n    /* Invalidate all prepared statements whenever the TEMP database\n    ** schema is changed.  Ticket #1644 */\n    sqlite3ExpirePreparedStatements(db, 0);\n    p->expired = 0;\n  }\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: OpenRead P1 P2 P3 P4 P5\n** Synopsis: root=P2 iDb=P3\n**\n** Open a read-only cursor for the database table whose root page is\n** P2 in a database file.  The database file is determined by P3.\n** P3==0 means the main database, P3==1 means the database used for\n** temporary tables, and P3>1 means used the corresponding attached\n** database.  Give the new cursor an identifier of P1.  The P1\n** values need not be contiguous but all P1 values should be small integers.\n** It is an error for P1 to be negative.\n**\n** Allowed P5 bits:\n** <ul>\n** <li>  <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for\n**       equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT\n**       of OP_SeekLE/OP_IdxLT)\n** </ul>\n**\n** The P4 value may be either an integer (P4_INT32) or a pointer to\n** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo\n** object, then table being opened must be an [index b-tree] where the\n** KeyInfo object defines the content and collating\n** sequence of that index b-tree. Otherwise, if P4 is an integer\n** value, then the table being opened must be a [table b-tree] with a\n** number of columns no less than the value of P4.\n**\n** See also: OpenWrite, ReopenIdx\n*/\n/* Opcode: ReopenIdx P1 P2 P3 P4 P5\n** Synopsis: root=P2 iDb=P3\n**\n** The ReopenIdx opcode works like OP_OpenRead except that it first\n** checks to see if the cursor on P1 is already open on the same\n** b-tree and if it is this opcode becomes a no-op.  In other words,\n** if the cursor is already open, do not reopen it.\n**\n** The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ\n** and with P4 being a P4_KEYINFO object.  Furthermore, the P3 value must\n** be the same as every other ReopenIdx or OpenRead for the same cursor\n** number.\n**\n** Allowed P5 bits:\n** <ul>\n** <li>  <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for\n**       equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT\n**       of OP_SeekLE/OP_IdxLT)\n** </ul>\n**\n** See also: OP_OpenRead, OP_OpenWrite\n*/\n/* Opcode: OpenWrite P1 P2 P3 P4 P5\n** Synopsis: root=P2 iDb=P3\n**\n** Open a read/write cursor named P1 on the table or index whose root\n** page is P2 (or whose root page is held in register P2 if the\n** OPFLAG_P2ISREG bit is set in P5 - see below).\n**\n** The P4 value may be either an integer (P4_INT32) or a pointer to\n** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo\n** object, then table being opened must be an [index b-tree] where the\n** KeyInfo object defines the content and collating\n** sequence of that index b-tree. Otherwise, if P4 is an integer\n** value, then the table being opened must be a [table b-tree] with a\n** number of columns no less than the value of P4.\n**\n** Allowed P5 bits:\n** <ul>\n** <li>  <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for\n**       equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT\n**       of OP_SeekLE/OP_IdxLT)\n** <li>  <b>0x08 OPFLAG_FORDELETE</b>: This cursor is used only to seek\n**       and subsequently delete entries in an index btree.  This is a\n**       hint to the storage engine that the storage engine is allowed to\n**       ignore.  The hint is not used by the official SQLite b*tree storage\n**       engine, but is used by COMDB2.\n** <li>  <b>0x10 OPFLAG_P2ISREG</b>: Use the content of register P2\n**       as the root page, not the value of P2 itself.\n** </ul>\n**\n** This instruction works like OpenRead except that it opens the cursor\n** in read/write mode.\n**\n** See also: OP_OpenRead, OP_ReopenIdx\n*/\ncase OP_ReopenIdx: {         /* ncycle */\n  int nField;\n  KeyInfo *pKeyInfo;\n  u32 p2;\n  int iDb;\n  int wrFlag;\n  Btree *pX;\n  VdbeCursor *pCur;\n  Db *pDb;\n\n  assert( pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ );\n  assert( pOp->p4type==P4_KEYINFO );\n  pCur = p->apCsr[pOp->p1];\n  if( pCur && pCur->pgnoRoot==(u32)pOp->p2 ){\n    assert( pCur->iDb==pOp->p3 );      /* Guaranteed by the code generator */\n    assert( pCur->eCurType==CURTYPE_BTREE );\n    sqlite3BtreeClearCursor(pCur->uc.pCursor);\n    goto open_cursor_set_hints;\n  }\n  /* If the cursor is not currently open or is open on a different\n  ** index, then fall through into OP_OpenRead to force a reopen */\ncase OP_OpenRead:            /* ncycle */\ncase OP_OpenWrite:\n\n  assert( pOp->opcode==OP_OpenWrite || pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ );\n  assert( p->bIsReader );\n  assert( pOp->opcode==OP_OpenRead || pOp->opcode==OP_ReopenIdx\n          || p->readOnly==0 );\n\n  if( p->expired==1 ){\n    rc = SQLITE_ABORT_ROLLBACK;\n    goto abort_due_to_error;\n  }\n\n  nField = 0;\n  pKeyInfo = 0;\n  p2 = (u32)pOp->p2;\n  iDb = pOp->p3;\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( DbMaskTest(p->btreeMask, iDb) );\n  pDb = &db->aDb[iDb];\n  pX = pDb->pBt;\n  assert( pX!=0 );\n  if( pOp->opcode==OP_OpenWrite ){\n    assert( OPFLAG_FORDELETE==BTREE_FORDELETE );\n    wrFlag = BTREE_WRCSR | (pOp->p5 & OPFLAG_FORDELETE);\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    if( pDb->pSchema->file_format < p->minWriteFileFormat ){\n      p->minWriteFileFormat = pDb->pSchema->file_format;\n    }\n    if( pOp->p5 & OPFLAG_P2ISREG ){\n      assert( p2>0 );\n      assert( p2<=(u32)(p->nMem+1 - p->nCursor) );\n      pIn2 = &aMem[p2];\n      assert( memIsValid(pIn2) );\n      assert( (pIn2->flags & MEM_Int)!=0 );\n      sqlite3VdbeMemIntegerify(pIn2);\n      p2 = (int)pIn2->u.i;\n      /* The p2 value always comes from a prior OP_CreateBtree opcode and\n      ** that opcode will always set the p2 value to 2 or more or else fail.\n      ** If there were a failure, the prepared statement would have halted\n      ** before reaching this instruction. */\n      assert( p2>=2 );\n    }\n  }else{\n    wrFlag = 0;\n    assert( (pOp->p5 & OPFLAG_P2ISREG)==0 );\n  }\n  if( pOp->p4type==P4_KEYINFO ){\n    pKeyInfo = pOp->p4.pKeyInfo;\n    assert( pKeyInfo->enc==ENC(db) );\n    assert( pKeyInfo->db==db );\n    nField = pKeyInfo->nAllField;\n  }else if( pOp->p4type==P4_INT32 ){\n    nField = pOp->p4.i;\n  }\n  assert( pOp->p1>=0 );\n  assert( nField>=0 );\n  testcase( nField==0 );  /* Table with INTEGER PRIMARY KEY and nothing else */\n  pCur = allocateCursor(p, pOp->p1, nField, CURTYPE_BTREE);\n  if( pCur==0 ) goto no_mem;\n  pCur->iDb = iDb;\n  pCur->nullRow = 1;\n  pCur->isOrdered = 1;\n  pCur->pgnoRoot = p2;\n#ifdef SQLITE_DEBUG\n  pCur->wrFlag = wrFlag;\n#endif\n  rc = sqlite3BtreeCursor(pX, p2, wrFlag, pKeyInfo, pCur->uc.pCursor);\n  pCur->pKeyInfo = pKeyInfo;\n  /* Set the VdbeCursor.isTable variable. Previous versions of\n  ** SQLite used to check if the root-page flags were sane at this point\n  ** and report database corruption if they were not, but this check has\n  ** since moved into the btree layer.  */\n  pCur->isTable = pOp->p4type!=P4_KEYINFO;\n\nopen_cursor_set_hints:\n  assert( OPFLAG_BULKCSR==BTREE_BULKLOAD );\n  assert( OPFLAG_SEEKEQ==BTREE_SEEK_EQ );\n  testcase( pOp->p5 & OPFLAG_BULKCSR );\n  testcase( pOp->p2 & OPFLAG_SEEKEQ );\n  sqlite3BtreeCursorHintFlags(pCur->uc.pCursor,\n                               (pOp->p5 & (OPFLAG_BULKCSR|OPFLAG_SEEKEQ)));\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: OpenDup P1 P2 * * *\n**\n** Open a new cursor P1 that points to the same ephemeral table as\n** cursor P2.  The P2 cursor must have been opened by a prior OP_OpenEphemeral\n** opcode.  Only ephemeral cursors may be duplicated.\n**\n** Duplicate ephemeral cursors are used for self-joins of materialized views.\n*/\ncase OP_OpenDup: {           /* ncycle */\n  VdbeCursor *pOrig;    /* The original cursor to be duplicated */\n  VdbeCursor *pCx;      /* The new cursor */\n\n  pOrig = p->apCsr[pOp->p2];\n  assert( pOrig );\n  assert( pOrig->isEphemeral );  /* Only ephemeral cursors can be duplicated */\n\n  pCx = allocateCursor(p, pOp->p1, pOrig->nField, CURTYPE_BTREE);\n  if( pCx==0 ) goto no_mem;\n  pCx->nullRow = 1;\n  pCx->isEphemeral = 1;\n  pCx->pKeyInfo = pOrig->pKeyInfo;\n  pCx->isTable = pOrig->isTable;\n  pCx->pgnoRoot = pOrig->pgnoRoot;\n  pCx->isOrdered = pOrig->isOrdered;\n  pCx->ub.pBtx = pOrig->ub.pBtx;\n  pCx->noReuse = 1;\n  pOrig->noReuse = 1;\n  rc = sqlite3BtreeCursor(pCx->ub.pBtx, pCx->pgnoRoot, BTREE_WRCSR,\n                          pCx->pKeyInfo, pCx->uc.pCursor);\n  /* The sqlite3BtreeCursor() routine can only fail for the first cursor\n  ** opened for a database.  Since there is already an open cursor when this\n  ** opcode is run, the sqlite3BtreeCursor() cannot fail */\n  assert( rc==SQLITE_OK );\n  break;\n}\n\n\n/* Opcode: OpenEphemeral P1 P2 P3 P4 P5\n** Synopsis: nColumn=P2\n**\n** Open a new cursor P1 to a transient table.\n** The cursor is always opened read/write even if\n** the main database is read-only.  The ephemeral\n** table is deleted automatically when the cursor is closed.\n**\n** If the cursor P1 is already opened on an ephemeral table, the table\n** is cleared (all content is erased).\n**\n** P2 is the number of columns in the ephemeral table.\n** The cursor points to a BTree table if P4==0 and to a BTree index\n** if P4 is not 0.  If P4 is not NULL, it points to a KeyInfo structure\n** that defines the format of keys in the index.\n**\n** The P5 parameter can be a mask of the BTREE_* flags defined\n** in btree.h.  These flags control aspects of the operation of\n** the btree.  The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are\n** added automatically.\n**\n** If P3 is positive, then reg[P3] is modified slightly so that it\n** can be used as zero-length data for OP_Insert.  This is an optimization\n** that avoids an extra OP_Blob opcode to initialize that register.\n*/\n/* Opcode: OpenAutoindex P1 P2 * P4 *\n** Synopsis: nColumn=P2\n**\n** This opcode works the same as OP_OpenEphemeral.  It has a\n** different name to distinguish its use.  Tables created using\n** by this opcode will be used for automatically created transient\n** indices in joins.\n*/\ncase OP_OpenAutoindex:       /* ncycle */\ncase OP_OpenEphemeral: {     /* ncycle */\n  VdbeCursor *pCx;\n  KeyInfo *pKeyInfo;\n\n  static const int vfsFlags =\n      SQLITE_OPEN_READWRITE |\n      SQLITE_OPEN_CREATE |\n      SQLITE_OPEN_EXCLUSIVE |\n      SQLITE_OPEN_DELETEONCLOSE |\n      SQLITE_OPEN_TRANSIENT_DB;\n  assert( pOp->p1>=0 );\n  assert( pOp->p2>=0 );\n  if( pOp->p3>0 ){\n    /* Make register reg[P3] into a value that can be used as the data\n    ** form sqlite3BtreeInsert() where the length of the data is zero. */\n    assert( pOp->p2==0 ); /* Only used when number of columns is zero */\n    assert( pOp->opcode==OP_OpenEphemeral );\n    assert( aMem[pOp->p3].flags & MEM_Null );\n    aMem[pOp->p3].n = 0;\n    aMem[pOp->p3].z = \"\";\n  }\n  pCx = p->apCsr[pOp->p1];\n  if( pCx && !pCx->noReuse &&  ALWAYS(pOp->p2<=pCx->nField) ){\n    /* If the ephemeral table is already open and has no duplicates from\n    ** OP_OpenDup, then erase all existing content so that the table is\n    ** empty again, rather than creating a new table. */\n    assert( pCx->isEphemeral );\n    pCx->seqCount = 0;\n    pCx->cacheStatus = CACHE_STALE;\n    rc = sqlite3BtreeClearTable(pCx->ub.pBtx, pCx->pgnoRoot, 0);\n  }else{\n    pCx = allocateCursor(p, pOp->p1, pOp->p2, CURTYPE_BTREE);\n    if( pCx==0 ) goto no_mem;\n    pCx->isEphemeral = 1;\n    rc = sqlite3BtreeOpen(db->pVfs, 0, db, &pCx->ub.pBtx,\n                          BTREE_OMIT_JOURNAL | BTREE_SINGLE | pOp->p5,\n                          vfsFlags);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3BtreeBeginTrans(pCx->ub.pBtx, 1, 0);\n      if( rc==SQLITE_OK ){\n        /* If a transient index is required, create it by calling\n        ** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before\n        ** opening it. If a transient table is required, just use the\n        ** automatically created table with root-page 1 (an BLOB_INTKEY table).\n        */\n        if( (pCx->pKeyInfo = pKeyInfo = pOp->p4.pKeyInfo)!=0 ){\n          assert( pOp->p4type==P4_KEYINFO );\n          rc = sqlite3BtreeCreateTable(pCx->ub.pBtx, &pCx->pgnoRoot,\n              BTREE_BLOBKEY | pOp->p5);\n          if( rc==SQLITE_OK ){\n            assert( pCx->pgnoRoot==SCHEMA_ROOT+1 );\n            assert( pKeyInfo->db==db );\n            assert( pKeyInfo->enc==ENC(db) );\n            rc = sqlite3BtreeCursor(pCx->ub.pBtx, pCx->pgnoRoot, BTREE_WRCSR,\n                pKeyInfo, pCx->uc.pCursor);\n          }\n          pCx->isTable = 0;\n        }else{\n          pCx->pgnoRoot = SCHEMA_ROOT;\n          rc = sqlite3BtreeCursor(pCx->ub.pBtx, SCHEMA_ROOT, BTREE_WRCSR,\n              0, pCx->uc.pCursor);\n          pCx->isTable = 1;\n        }\n      }\n      pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);\n      assert( p->apCsr[pOp->p1]==pCx );\n      if( rc ){\n        assert( !sqlite3BtreeClosesWithCursor(pCx->ub.pBtx, pCx->uc.pCursor) );\n        sqlite3BtreeClose(pCx->ub.pBtx);\n        p->apCsr[pOp->p1] = 0;  /* Not required; helps with static analysis */\n      }else{\n        assert( sqlite3BtreeClosesWithCursor(pCx->ub.pBtx, pCx->uc.pCursor) );\n      }\n    }\n  }\n  if( rc ) goto abort_due_to_error;\n  pCx->nullRow = 1;\n  break;\n}\n\n/* Opcode: SorterOpen P1 P2 P3 P4 *\n**\n** This opcode works like OP_OpenEphemeral except that it opens\n** a transient index that is specifically designed to sort large\n** tables using an external merge-sort algorithm.\n**\n** If argument P3 is non-zero, then it indicates that the sorter may\n** assume that a stable sort considering the first P3 fields of each\n** key is sufficient to produce the required results.\n*/\ncase OP_SorterOpen: {\n  VdbeCursor *pCx;\n\n  assert( pOp->p1>=0 );\n  assert( pOp->p2>=0 );\n  pCx = allocateCursor(p, pOp->p1, pOp->p2, CURTYPE_SORTER);\n  if( pCx==0 ) goto no_mem;\n  pCx->pKeyInfo = pOp->p4.pKeyInfo;\n  assert( pCx->pKeyInfo->db==db );\n  assert( pCx->pKeyInfo->enc==ENC(db) );\n  rc = sqlite3VdbeSorterInit(db, pOp->p3, pCx);\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: SequenceTest P1 P2 * * *\n** Synopsis: if( cursor[P1].ctr++ ) pc = P2\n**\n** P1 is a sorter cursor. If the sequence counter is currently zero, jump\n** to P2. Regardless of whether or not the jump is taken, increment the\n** the sequence value.\n*/\ncase OP_SequenceTest: {\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( isSorter(pC) );\n  if( (pC->seqCount++)==0 ){\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: OpenPseudo P1 P2 P3 * *\n** Synopsis: P3 columns in r[P2]\n**\n** Open a new cursor that points to a fake table that contains a single\n** row of data.  The content of that one row is the content of memory\n** register P2.  In other words, cursor P1 becomes an alias for the\n** MEM_Blob content contained in register P2.\n**\n** A pseudo-table created by this opcode is used to hold a single\n** row output from the sorter so that the row can be decomposed into\n** individual columns using the OP_Column opcode.  The OP_Column opcode\n** is the only cursor opcode that works with a pseudo-table.\n**\n** P3 is the number of fields in the records that will be stored by\n** the pseudo-table.  If P2 is 0 or negative then the pseudo-cursor\n** will return NULL for every column.\n*/\ncase OP_OpenPseudo: {\n  VdbeCursor *pCx;\n\n  assert( pOp->p1>=0 );\n  assert( pOp->p3>=0 );\n  pCx = allocateCursor(p, pOp->p1, pOp->p3, CURTYPE_PSEUDO);\n  if( pCx==0 ) goto no_mem;\n  pCx->nullRow = 1;\n  pCx->seekResult = pOp->p2;\n  pCx->isTable = 1;\n  /* Give this pseudo-cursor a fake BtCursor pointer so that pCx\n  ** can be safely passed to sqlite3VdbeCursorMoveto().  This avoids a test\n  ** for pCx->eCurType==CURTYPE_BTREE inside of sqlite3VdbeCursorMoveto()\n  ** which is a performance optimization */\n  pCx->uc.pCursor = sqlite3BtreeFakeValidCursor();\n  assert( pOp->p5==0 );\n  break;\n}\n\n/* Opcode: Close P1 * * * *\n**\n** Close a cursor previously opened as P1.  If P1 is not\n** currently open, this instruction is a no-op.\n*/\ncase OP_Close: {             /* ncycle */\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  sqlite3VdbeFreeCursor(p, p->apCsr[pOp->p1]);\n  p->apCsr[pOp->p1] = 0;\n  break;\n}\n\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n/* Opcode: ColumnsUsed P1 * * P4 *\n**\n** This opcode (which only exists if SQLite was compiled with\n** SQLITE_ENABLE_COLUMN_USED_MASK) identifies which columns of the\n** table or index for cursor P1 are used.  P4 is a 64-bit integer\n** (P4_INT64) in which the first 63 bits are one for each of the\n** first 63 columns of the table or index that are actually used\n** by the cursor.  The high-order bit is set if any column after\n** the 64th is used.\n*/\ncase OP_ColumnsUsed: {\n  VdbeCursor *pC;\n  pC = p->apCsr[pOp->p1];\n  assert( pC->eCurType==CURTYPE_BTREE );\n  pC->maskUsed = *(u64*)pOp->p4.pI64;\n  break;\n}\n#endif\n\n/* Opcode: SeekGE P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n** use the value in register P3 as the key.  If cursor P1 refers\n** to an SQL index, then P3 is the first in an array of P4 registers\n** that are used as an unpacked index key.\n**\n** Reposition cursor P1 so that  it points to the smallest entry that\n** is greater than or equal to the key value. If there are no records\n** greater than or equal to the key and P2 is not zero, then jump to P2.\n**\n** If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this\n** opcode will either land on a record that exactly matches the key, or\n** else it will cause a jump to P2.  When the cursor is OPFLAG_SEEKEQ,\n** this opcode must be followed by an IdxLE opcode with the same arguments.\n** The IdxGT opcode will be skipped if this opcode succeeds, but the\n** IdxGT opcode will be used on subsequent loop iterations.  The\n** OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this\n** is an equality search.\n**\n** This opcode leaves the cursor configured to move in forward order,\n** from the beginning toward the end.  In other words, the cursor is\n** configured to use Next, not Prev.\n**\n** See also: Found, NotFound, SeekLt, SeekGt, SeekLe\n*/\n/* Opcode: SeekGT P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n** use the value in register P3 as a key. If cursor P1 refers\n** to an SQL index, then P3 is the first in an array of P4 registers\n** that are used as an unpacked index key.\n**\n** Reposition cursor P1 so that it points to the smallest entry that\n** is greater than the key value. If there are no records greater than\n** the key and P2 is not zero, then jump to P2.\n**\n** This opcode leaves the cursor configured to move in forward order,\n** from the beginning toward the end.  In other words, the cursor is\n** configured to use Next, not Prev.\n**\n** See also: Found, NotFound, SeekLt, SeekGe, SeekLe\n*/\n/* Opcode: SeekLT P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n** use the value in register P3 as a key. If cursor P1 refers\n** to an SQL index, then P3 is the first in an array of P4 registers\n** that are used as an unpacked index key.\n**\n** Reposition cursor P1 so that  it points to the largest entry that\n** is less than the key value. If there are no records less than\n** the key and P2 is not zero, then jump to P2.\n**\n** This opcode leaves the cursor configured to move in reverse order,\n** from the end toward the beginning.  In other words, the cursor is\n** configured to use Prev, not Next.\n**\n** See also: Found, NotFound, SeekGt, SeekGe, SeekLe\n*/\n/* Opcode: SeekLE P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n** use the value in register P3 as a key. If cursor P1 refers\n** to an SQL index, then P3 is the first in an array of P4 registers\n** that are used as an unpacked index key.\n**\n** Reposition cursor P1 so that it points to the largest entry that\n** is less than or equal to the key value. If there are no records\n** less than or equal to the key and P2 is not zero, then jump to P2.\n**\n** This opcode leaves the cursor configured to move in reverse order,\n** from the end toward the beginning.  In other words, the cursor is\n** configured to use Prev, not Next.\n**\n** If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this\n** opcode will either land on a record that exactly matches the key, or\n** else it will cause a jump to P2.  When the cursor is OPFLAG_SEEKEQ,\n** this opcode must be followed by an IdxLE opcode with the same arguments.\n** The IdxGE opcode will be skipped if this opcode succeeds, but the\n** IdxGE opcode will be used on subsequent loop iterations.  The\n** OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this\n** is an equality search.\n**\n** See also: Found, NotFound, SeekGt, SeekGe, SeekLt\n*/\ncase OP_SeekLT:         /* jump0, in3, group, ncycle */\ncase OP_SeekLE:         /* jump0, in3, group, ncycle */\ncase OP_SeekGE:         /* jump0, in3, group, ncycle */\ncase OP_SeekGT: {       /* jump0, in3, group, ncycle */\n  int res;           /* Comparison result */\n  int oc;            /* Opcode */\n  VdbeCursor *pC;    /* The cursor to seek */\n  UnpackedRecord r;  /* The key to seek for */\n  int nField;        /* Number of columns or fields in the key */\n  i64 iKey;          /* The rowid we are to seek to */\n  int eqOnly;        /* Only interested in == results */\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p2!=0 );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( OP_SeekLE == OP_SeekLT+1 );\n  assert( OP_SeekGE == OP_SeekLT+2 );\n  assert( OP_SeekGT == OP_SeekLT+3 );\n  assert( pC->isOrdered );\n  assert( pC->uc.pCursor!=0 );\n  oc = pOp->opcode;\n  eqOnly = 0;\n  pC->nullRow = 0;\n#ifdef SQLITE_DEBUG\n  pC->seekOp = pOp->opcode;\n#endif\n\n  pC->deferredMoveto = 0;\n  pC->cacheStatus = CACHE_STALE;\n  if( pC->isTable ){\n    u16 flags3, newType;\n    /* The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors */\n    assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0\n              || CORRUPT_DB );\n\n    /* The input value in P3 might be of any type: integer, real, string,\n    ** blob, or NULL.  But it needs to be an integer before we can do\n    ** the seek, so convert it. */\n    pIn3 = &aMem[pOp->p3];\n    flags3 = pIn3->flags;\n    if( (flags3 & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Str))==MEM_Str ){\n      applyNumericAffinity(pIn3, 0);\n    }\n    iKey = sqlite3VdbeIntValue(pIn3); /* Get the integer key value */\n    newType = pIn3->flags; /* Record the type after applying numeric affinity */\n    pIn3->flags = flags3;  /* But convert the type back to its original */\n\n    /* If the P3 value could not be converted into an integer without\n    ** loss of information, then special processing is required... */\n    if( (newType & (MEM_Int|MEM_IntReal))==0 ){\n      int c;\n      if( (newType & MEM_Real)==0 ){\n        if( (newType & MEM_Null) || oc>=OP_SeekGE ){\n          VdbeBranchTaken(1,2);\n          goto jump_to_p2;\n        }else{\n          rc = sqlite3BtreeLast(pC->uc.pCursor, &res);\n          if( rc!=SQLITE_OK ) goto abort_due_to_error;\n          goto seek_not_found;\n        }\n      }\n      c = sqlite3IntFloatCompare(iKey, pIn3->u.r);\n\n      /* If the approximation iKey is larger than the actual real search\n      ** term, substitute >= for > and < for <=. e.g. if the search term\n      ** is 4.9 and the integer approximation 5:\n      **\n      **        (x >  4.9)    ->     (x >= 5)\n      **        (x <= 4.9)    ->     (x <  5)\n      */\n      if( c>0 ){\n        assert( OP_SeekGE==(OP_SeekGT-1) );\n        assert( OP_SeekLT==(OP_SeekLE-1) );\n        assert( (OP_SeekLE & 0x0001)==(OP_SeekGT & 0x0001) );\n        if( (oc & 0x0001)==(OP_SeekGT & 0x0001) ) oc--;\n      }\n\n      /* If the approximation iKey is smaller than the actual real search\n      ** term, substitute <= for < and > for >=.  */\n      else if( c<0 ){\n        assert( OP_SeekLE==(OP_SeekLT+1) );\n        assert( OP_SeekGT==(OP_SeekGE+1) );\n        assert( (OP_SeekLT & 0x0001)==(OP_SeekGE & 0x0001) );\n        if( (oc & 0x0001)==(OP_SeekLT & 0x0001) ) oc++;\n      }\n    }\n    rc = sqlite3BtreeTableMoveto(pC->uc.pCursor, (u64)iKey, 0, &res);\n    pC->movetoTarget = iKey;  /* Used by OP_Delete */\n    if( rc!=SQLITE_OK ){\n      goto abort_due_to_error;\n    }\n  }else{\n    /* For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the\n    ** OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be\n    ** immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively,\n    ** with the same key.\n    */\n    if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){\n      eqOnly = 1;\n      assert( pOp->opcode==OP_SeekGE || pOp->opcode==OP_SeekLE );\n      assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );\n      assert( pOp->opcode==OP_SeekGE || pOp[1].opcode==OP_IdxLT );\n      assert( pOp->opcode==OP_SeekLE || pOp[1].opcode==OP_IdxGT );\n      assert( pOp[1].p1==pOp[0].p1 );\n      assert( pOp[1].p2==pOp[0].p2 );\n      assert( pOp[1].p3==pOp[0].p3 );\n      assert( pOp[1].p4.i==pOp[0].p4.i );\n    }\n\n    nField = pOp->p4.i;\n    assert( pOp->p4type==P4_INT32 );\n    assert( nField>0 );\n    r.pKeyInfo = pC->pKeyInfo;\n    r.nField = (u16)nField;\n\n    /* The next line of code computes as follows, only faster:\n    **   if( oc==OP_SeekGT || oc==OP_SeekLE ){\n    **     r.default_rc = -1;\n    **   }else{\n    **     r.default_rc = +1;\n    **   }\n    */\n    r.default_rc = ((1 & (oc - OP_SeekLT)) ? -1 : +1);\n    assert( oc!=OP_SeekGT || r.default_rc==-1 );\n    assert( oc!=OP_SeekLE || r.default_rc==-1 );\n    assert( oc!=OP_SeekGE || r.default_rc==+1 );\n    assert( oc!=OP_SeekLT || r.default_rc==+1 );\n\n    r.aMem = &aMem[pOp->p3];\n#ifdef SQLITE_DEBUG\n    {\n      int i;\n      for(i=0; i<r.nField; i++){\n        assert( memIsValid(&r.aMem[i]) );\n        if( i>0 ) REGISTER_TRACE(pOp->p3+i, &r.aMem[i]);\n      }\n    }\n#endif\n    r.eqSeen = 0;\n    rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, &r, &res);\n    if( rc!=SQLITE_OK ){\n      goto abort_due_to_error;\n    }\n    if( eqOnly && r.eqSeen==0 ){\n      assert( res!=0 );\n      goto seek_not_found;\n    }\n  }\n#ifdef SQLITE_TEST\n  sqlite3_search_count++;\n#endif\n  if( oc>=OP_SeekGE ){  assert( oc==OP_SeekGE || oc==OP_SeekGT );\n    if( res<0 || (res==0 && oc==OP_SeekGT) ){\n      res = 0;\n      rc = sqlite3BtreeNext(pC->uc.pCursor, 0);\n      if( rc!=SQLITE_OK ){\n        if( rc==SQLITE_DONE ){\n          rc = SQLITE_OK;\n          res = 1;\n        }else{\n          goto abort_due_to_error;\n        }\n      }\n    }else{\n      res = 0;\n    }\n  }else{\n    assert( oc==OP_SeekLT || oc==OP_SeekLE );\n    if( res>0 || (res==0 && oc==OP_SeekLT) ){\n      res = 0;\n      rc = sqlite3BtreePrevious(pC->uc.pCursor, 0);\n      if( rc!=SQLITE_OK ){\n        if( rc==SQLITE_DONE ){\n          rc = SQLITE_OK;\n          res = 1;\n        }else{\n          goto abort_due_to_error;\n        }\n      }\n    }else{\n      /* res might be negative because the table is empty.  Check to\n      ** see if this is the case.\n      */\n      res = sqlite3BtreeEof(pC->uc.pCursor);\n    }\n  }\nseek_not_found:\n  assert( pOp->p2>0 );\n  VdbeBranchTaken(res!=0,2);\n  if( res ){\n    goto jump_to_p2;\n  }else if( eqOnly ){\n    assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );\n    pOp++; /* Skip the OP_IdxLt or OP_IdxGT that follows */\n  }\n  break;\n}\n\n\n/* Opcode: SeekScan  P1 P2 * * P5\n** Synopsis: Scan-ahead up to P1 rows\n**\n** This opcode is a prefix opcode to OP_SeekGE.  In other words, this\n** opcode must be immediately followed by OP_SeekGE. This constraint is\n** checked by assert() statements.\n**\n** This opcode uses the P1 through P4 operands of the subsequent\n** OP_SeekGE.  In the text that follows, the operands of the subsequent\n** OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4.   Only\n** the P1, P2 and P5 operands of this opcode are also used, and  are called\n** This.P1, This.P2 and This.P5.\n**\n** This opcode helps to optimize IN operators on a multi-column index\n** where the IN operator is on the later terms of the index by avoiding\n** unnecessary seeks on the btree, substituting steps to the next row\n** of the b-tree instead.  A correct answer is obtained if this opcode\n** is omitted or is a no-op.\n**\n** The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which\n** is the desired entry that we want the cursor SeekGE.P1 to be pointing\n** to.  Call this SeekGE.P3/P4 row the \"target\".\n**\n** If the SeekGE.P1 cursor is not currently pointing to a valid row,\n** then this opcode is a no-op and control passes through into the OP_SeekGE.\n**\n** If the SeekGE.P1 cursor is pointing to a valid row, then that row\n** might be the target row, or it might be near and slightly before the\n** target row, or it might be after the target row.  If the cursor is\n** currently before the target row, then this opcode attempts to position\n** the cursor on or after the target row by invoking sqlite3BtreeStep()\n** on the cursor between 1 and This.P1 times.\n**\n** The This.P5 parameter is a flag that indicates what to do if the\n** cursor ends up pointing at a valid row that is past the target\n** row.  If This.P5 is false (0) then a jump is made to SeekGE.P2.  If\n** This.P5 is true (non-zero) then a jump is made to This.P2.  The P5==0\n** case occurs when there are no inequality constraints to the right of\n** the IN constraint.  The jump to SeekGE.P2 ends the loop.  The P5!=0 case\n** occurs when there are inequality constraints to the right of the IN\n** operator.  In that case, the This.P2 will point either directly to or\n** to setup code prior to the OP_IdxGT or OP_IdxGE opcode that checks for\n** loop terminate.\n**\n** Possible outcomes from this opcode:<ol>\n**\n** <li> If the cursor is initially not pointed to any valid row, then\n**      fall through into the subsequent OP_SeekGE opcode.\n**\n** <li> If the cursor is left pointing to a row that is before the target\n**      row, even after making as many as This.P1 calls to\n**      sqlite3BtreeNext(), then also fall through into OP_SeekGE.\n**\n** <li> If the cursor is left pointing at the target row, either because it\n**      was at the target row to begin with or because one or more\n**      sqlite3BtreeNext() calls moved the cursor to the target row,\n**      then jump to This.P2..,\n**\n** <li> If the cursor started out before the target row and a call to\n**      to sqlite3BtreeNext() moved the cursor off the end of the index\n**      (indicating that the target row definitely does not exist in the\n**      btree) then jump to SeekGE.P2, ending the loop.\n**\n** <li> If the cursor ends up on a valid row that is past the target row\n**      (indicating that the target row does not exist in the btree) then\n**      jump to SeekOP.P2 if This.P5==0 or to This.P2 if This.P5>0.\n** </ol>\n*/\ncase OP_SeekScan: {          /* ncycle */\n  VdbeCursor *pC;\n  int res;\n  int nStep;\n  UnpackedRecord r;\n\n  assert( pOp[1].opcode==OP_SeekGE );\n\n  /* If pOp->p5 is clear, then pOp->p2 points to the first instruction past the\n  ** OP_IdxGT that follows the OP_SeekGE. Otherwise, it points to the first\n  ** opcode past the OP_SeekGE itself.  */\n  assert( pOp->p2>=(int)(pOp-aOp)+2 );\n#ifdef SQLITE_DEBUG\n  if( pOp->p5==0 ){\n    /* There are no inequality constraints following the IN constraint. */\n    assert( pOp[1].p1==aOp[pOp->p2-1].p1 );\n    assert( pOp[1].p2==aOp[pOp->p2-1].p2 );\n    assert( pOp[1].p3==aOp[pOp->p2-1].p3 );\n    assert( aOp[pOp->p2-1].opcode==OP_IdxGT\n         || aOp[pOp->p2-1].opcode==OP_IdxGE );\n    testcase( aOp[pOp->p2-1].opcode==OP_IdxGE );\n  }else{\n    /* There are inequality constraints.  */\n    assert( pOp->p2==(int)(pOp-aOp)+2 );\n    assert( aOp[pOp->p2-1].opcode==OP_SeekGE );\n  }\n#endif\n\n  assert( pOp->p1>0 );\n  pC = p->apCsr[pOp[1].p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( !pC->isTable );\n  if( !sqlite3BtreeCursorIsValidNN(pC->uc.pCursor) ){\n#ifdef SQLITE_DEBUG\n     if( db->flags&SQLITE_VdbeTrace ){\n       printf(\"... cursor not valid - fall through\\n\");\n     }\n#endif\n    break;\n  }\n  nStep = pOp->p1;\n  assert( nStep>=1 );\n  r.pKeyInfo = pC->pKeyInfo;\n  r.nField = (u16)pOp[1].p4.i;\n  r.default_rc = 0;\n  r.aMem = &aMem[pOp[1].p3];\n#ifdef SQLITE_DEBUG\n  {\n    int i;\n    for(i=0; i<r.nField; i++){\n      assert( memIsValid(&r.aMem[i]) );\n      REGISTER_TRACE(pOp[1].p3+i, &aMem[pOp[1].p3+i]);\n    }\n  }\n#endif\n  res = 0;  /* Not needed.  Only used to silence a warning. */\n  while(1){\n    rc = sqlite3VdbeIdxKeyCompare(db, pC, &r, &res);\n    if( rc ) goto abort_due_to_error;\n    if( res>0 && pOp->p5==0 ){\n      seekscan_search_fail:\n      /* Jump to SeekGE.P2, ending the loop */\n#ifdef SQLITE_DEBUG\n      if( db->flags&SQLITE_VdbeTrace ){\n        printf(\"... %d steps and then skip\\n\", pOp->p1 - nStep);\n      }\n#endif\n      VdbeBranchTaken(1,3);\n      pOp++;\n      goto jump_to_p2;\n    }\n    if( res>=0 ){\n      /* Jump to This.P2, bypassing the OP_SeekGE opcode */\n#ifdef SQLITE_DEBUG\n      if( db->flags&SQLITE_VdbeTrace ){\n        printf(\"... %d steps and then success\\n\", pOp->p1 - nStep);\n      }\n#endif\n      VdbeBranchTaken(2,3);\n      goto jump_to_p2;\n      break;\n    }\n    if( nStep<=0 ){\n#ifdef SQLITE_DEBUG\n      if( db->flags&SQLITE_VdbeTrace ){\n        printf(\"... fall through after %d steps\\n\", pOp->p1);\n      }\n#endif\n      VdbeBranchTaken(0,3);\n      break;\n    }\n    nStep--;\n    pC->cacheStatus = CACHE_STALE;\n    rc = sqlite3BtreeNext(pC->uc.pCursor, 0);\n    if( rc ){\n      if( rc==SQLITE_DONE ){\n        rc = SQLITE_OK;\n        goto seekscan_search_fail;\n      }else{\n        goto abort_due_to_error;\n      }\n    }\n  }\n\n  break;\n}\n\n\n/* Opcode: SeekHit P1 P2 P3 * *\n** Synopsis: set P2<=seekHit<=P3\n**\n** Increase or decrease the seekHit value for cursor P1, if necessary,\n** so that it is no less than P2 and no greater than P3.\n**\n** The seekHit integer represents the maximum of terms in an index for which\n** there is known to be at least one match.  If the seekHit value is smaller\n** than the total number of equality terms in an index lookup, then the\n** OP_IfNoHope opcode might run to see if the IN loop can be abandoned\n** early, thus saving work.  This is part of the IN-early-out optimization.\n**\n** P1 must be a valid b-tree cursor.\n*/\ncase OP_SeekHit: {           /* ncycle */\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pOp->p3>=pOp->p2 );\n  if( pC->seekHit<pOp->p2 ){\n#ifdef SQLITE_DEBUG\n    if( db->flags&SQLITE_VdbeTrace ){\n      printf(\"seekHit changes from %d to %d\\n\", pC->seekHit, pOp->p2);\n    }\n#endif\n    pC->seekHit = pOp->p2;\n  }else if( pC->seekHit>pOp->p3 ){\n#ifdef SQLITE_DEBUG\n    if( db->flags&SQLITE_VdbeTrace ){\n      printf(\"seekHit changes from %d to %d\\n\", pC->seekHit, pOp->p3);\n    }\n#endif\n    pC->seekHit = pOp->p3;\n  }\n  break;\n}\n\n/* Opcode: IfNotOpen P1 P2 * * *\n** Synopsis: if( !csr[P1] ) goto P2\n**\n** If cursor P1 is not open or if P1 is set to a NULL row using the\n** OP_NullRow opcode, then jump to instruction P2. Otherwise, fall through.\n*/\ncase OP_IfNotOpen: {        /* jump */\n  VdbeCursor *pCur;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pCur = p->apCsr[pOp->p1];\n  VdbeBranchTaken(pCur==0 || pCur->nullRow, 2);\n  if( pCur==0 || pCur->nullRow ){\n    goto jump_to_p2_and_check_for_interrupt;\n  }\n  break;\n}\n\n/* Opcode: Found P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If P4==0 then register P3 holds a blob constructed by MakeRecord.  If\n** P4>0 then register P3 is the first of P4 registers that form an unpacked\n** record.\n**\n** Cursor P1 is on an index btree.  If the record identified by P3 and P4\n** is a prefix of any entry in P1 then a jump is made to P2 and\n** P1 is left pointing at the matching entry.\n**\n** This operation leaves the cursor in a state where it can be\n** advanced in the forward direction.  The Next instruction will work,\n** but not the Prev instruction.\n**\n** See also: NotFound, NoConflict, NotExists. SeekGe\n*/\n/* Opcode: NotFound P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If P4==0 then register P3 holds a blob constructed by MakeRecord.  If\n** P4>0 then register P3 is the first of P4 registers that form an unpacked\n** record.\n**\n** Cursor P1 is on an index btree.  If the record identified by P3 and P4\n** is not the prefix of any entry in P1 then a jump is made to P2.  If P1\n** does contain an entry whose prefix matches the P3/P4 record then control\n** falls through to the next instruction and P1 is left pointing at the\n** matching entry.\n**\n** This operation leaves the cursor in a state where it cannot be\n** advanced in either direction.  In other words, the Next and Prev\n** opcodes do not work after this operation.\n**\n** See also: Found, NotExists, NoConflict, IfNoHope\n*/\n/* Opcode: IfNoHope P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** Register P3 is the first of P4 registers that form an unpacked\n** record.  Cursor P1 is an index btree.  P2 is a jump destination.\n** In other words, the operands to this opcode are the same as the\n** operands to OP_NotFound and OP_IdxGT.\n**\n** This opcode is an optimization attempt only.  If this opcode always\n** falls through, the correct answer is still obtained, but extra work\n** is performed.\n**\n** A value of N in the seekHit flag of cursor P1 means that there exists\n** a key P3:N that will match some record in the index.  We want to know\n** if it is possible for a record P3:P4 to match some record in the\n** index.  If it is not possible, we can skip some work.  So if seekHit\n** is less than P4, attempt to find out if a match is possible by running\n** OP_NotFound.\n**\n** This opcode is used in IN clause processing for a multi-column key.\n** If an IN clause is attached to an element of the key other than the\n** left-most element, and if there are no matches on the most recent\n** seek over the whole key, then it might be that one of the key element\n** to the left is prohibiting a match, and hence there is \"no hope\" of\n** any match regardless of how many IN clause elements are checked.\n** In such a case, we abandon the IN clause search early, using this\n** opcode.  The opcode name comes from the fact that the\n** jump is taken if there is \"no hope\" of achieving a match.\n**\n** See also: NotFound, SeekHit\n*/\n/* Opcode: NoConflict P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** If P4==0 then register P3 holds a blob constructed by MakeRecord.  If\n** P4>0 then register P3 is the first of P4 registers that form an unpacked\n** record.\n**\n** Cursor P1 is on an index btree.  If the record identified by P3 and P4\n** contains any NULL value, jump immediately to P2.  If all terms of the\n** record are not-NULL then a check is done to determine if any row in the\n** P1 index btree has a matching key prefix.  If there are no matches, jump\n** immediately to P2.  If there is a match, fall through and leave the P1\n** cursor pointing to the matching row.\n**\n** This opcode is similar to OP_NotFound with the exceptions that the\n** branch is always taken if any part of the search key input is NULL.\n**\n** This operation leaves the cursor in a state where it cannot be\n** advanced in either direction.  In other words, the Next and Prev\n** opcodes do not work after this operation.\n**\n** See also: NotFound, Found, NotExists\n*/\ncase OP_IfNoHope: {     /* jump, in3, ncycle */\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n#ifdef SQLITE_DEBUG\n  if( db->flags&SQLITE_VdbeTrace ){\n    printf(\"seekHit is %d\\n\", pC->seekHit);\n  }\n#endif\n  if( pC->seekHit>=pOp->p4.i ) break;\n  /* Fall through into OP_NotFound */\n  /* no break */ deliberate_fall_through\n}\ncase OP_NoConflict:     /* jump, in3, ncycle */\ncase OP_NotFound:       /* jump, in3, ncycle */\ncase OP_Found: {        /* jump, in3, ncycle */\n  int alreadyExists;\n  int ii;\n  VdbeCursor *pC;\n  UnpackedRecord *pIdxKey;\n  UnpackedRecord r;\n\n#ifdef SQLITE_TEST\n  if( pOp->opcode!=OP_NoConflict ) sqlite3_found_count++;\n#endif\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p4type==P4_INT32 );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n#ifdef SQLITE_DEBUG\n  pC->seekOp = pOp->opcode;\n#endif\n  r.aMem = &aMem[pOp->p3];\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->uc.pCursor!=0 );\n  assert( pC->isTable==0 );\n  r.nField = (u16)pOp->p4.i;\n  if( r.nField>0 ){\n    /* Key values in an array of registers */\n    r.pKeyInfo = pC->pKeyInfo;\n    r.default_rc = 0;\n#ifdef SQLITE_DEBUG\n    (void)sqlite3FaultSim(50);  /* For use by --counter in TH3 */\n    for(ii=0; ii<r.nField; ii++){\n      assert( memIsValid(&r.aMem[ii]) );\n      assert( (r.aMem[ii].flags & MEM_Zero)==0 || r.aMem[ii].n==0 );\n      if( ii ) REGISTER_TRACE(pOp->p3+ii, &r.aMem[ii]);\n    }\n#endif\n    rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, &r, &pC->seekResult);\n  }else{\n    /* Composite key generated by OP_MakeRecord */\n    assert( r.aMem->flags & MEM_Blob );\n    assert( pOp->opcode!=OP_NoConflict );\n    rc = ExpandBlob(r.aMem);\n    assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );\n    if( rc ) goto no_mem;\n    pIdxKey = sqlite3VdbeAllocUnpackedRecord(pC->pKeyInfo);\n    if( pIdxKey==0 ) goto no_mem;\n    sqlite3VdbeRecordUnpack(r.aMem->n, r.aMem->z, pIdxKey);\n    pIdxKey->default_rc = 0;\n    rc = sqlite3BtreeIndexMoveto(pC->uc.pCursor, pIdxKey, &pC->seekResult);\n    sqlite3DbFreeNN(db, pIdxKey);\n  }\n  if( rc!=SQLITE_OK ){\n    goto abort_due_to_error;\n  }\n  alreadyExists = (pC->seekResult==0);\n  pC->nullRow = 1-alreadyExists;\n  pC->deferredMoveto = 0;\n  pC->cacheStatus = CACHE_STALE;\n  if( pOp->opcode==OP_Found ){\n    VdbeBranchTaken(alreadyExists!=0,2);\n    if( alreadyExists ) goto jump_to_p2;\n  }else{\n    if( !alreadyExists ){\n      VdbeBranchTaken(1,2);\n      goto jump_to_p2;\n    }\n    if( pOp->opcode==OP_NoConflict ){\n      /* For the OP_NoConflict opcode, take the jump if any of the\n      ** input fields are NULL, since any key with a NULL will not\n      ** conflict */\n      for(ii=0; ii<r.nField; ii++){\n        if( r.aMem[ii].flags & MEM_Null ){\n          VdbeBranchTaken(1,2);\n          goto jump_to_p2;\n        }\n      }\n    }\n    VdbeBranchTaken(0,2);\n    if( pOp->opcode==OP_IfNoHope ){\n      pC->seekHit = pOp->p4.i;\n    }\n  }\n  break;\n}\n\n/* Opcode: SeekRowid P1 P2 P3 * *\n** Synopsis: intkey=r[P3]\n**\n** P1 is the index of a cursor open on an SQL table btree (with integer\n** keys).  If register P3 does not contain an integer or if P1 does not\n** contain a record with rowid P3 then jump immediately to P2.\n** Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain\n** a record with rowid P3 then\n** leave the cursor pointing at that record and fall through to the next\n** instruction.\n**\n** The OP_NotExists opcode performs the same operation, but with OP_NotExists\n** the P3 register must be guaranteed to contain an integer value.  With this\n** opcode, register P3 might not contain an integer.\n**\n** The OP_NotFound opcode performs the same operation on index btrees\n** (with arbitrary multi-value keys).\n**\n** This opcode leaves the cursor in a state where it cannot be advanced\n** in either direction.  In other words, the Next and Prev opcodes will\n** not work following this opcode.\n**\n** See also: Found, NotFound, NoConflict, SeekRowid\n*/\n/* Opcode: NotExists P1 P2 P3 * *\n** Synopsis: intkey=r[P3]\n**\n** P1 is the index of a cursor open on an SQL table btree (with integer\n** keys).  P3 is an integer rowid.  If P1 does not contain a record with\n** rowid P3 then jump immediately to P2.  Or, if P2 is 0, raise an\n** SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then\n** leave the cursor pointing at that record and fall through to the next\n** instruction.\n**\n** The OP_SeekRowid opcode performs the same operation but also allows the\n** P3 register to contain a non-integer value, in which case the jump is\n** always taken.  This opcode requires that P3 always contain an integer.\n**\n** The OP_NotFound opcode performs the same operation on index btrees\n** (with arbitrary multi-value keys).\n**\n** This opcode leaves the cursor in a state where it cannot be advanced\n** in either direction.  In other words, the Next and Prev opcodes will\n** not work following this opcode.\n**\n** See also: Found, NotFound, NoConflict, SeekRowid\n*/\ncase OP_SeekRowid: {        /* jump0, in3, ncycle */\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n  u64 iKey;\n\n  pIn3 = &aMem[pOp->p3];\n  testcase( pIn3->flags & MEM_Int );\n  testcase( pIn3->flags & MEM_IntReal );\n  testcase( pIn3->flags & MEM_Real );\n  testcase( (pIn3->flags & (MEM_Str|MEM_Int))==MEM_Str );\n  if( (pIn3->flags & (MEM_Int|MEM_IntReal))==0 ){\n    /* If pIn3->u.i does not contain an integer, compute iKey as the\n    ** integer value of pIn3.  Jump to P2 if pIn3 cannot be converted\n    ** into an integer without loss of information.  Take care to avoid\n    ** changing the datatype of pIn3, however, as it is used by other\n    ** parts of the prepared statement. */\n    Mem x = pIn3[0];\n    applyAffinity(&x, SQLITE_AFF_NUMERIC, encoding);\n    if( (x.flags & MEM_Int)==0 ) goto jump_to_p2;\n    iKey = x.u.i;\n    goto notExistsWithKey;\n  }\n  /* Fall through into OP_NotExists */\n  /* no break */ deliberate_fall_through\ncase OP_NotExists:          /* jump, in3, ncycle */\n  pIn3 = &aMem[pOp->p3];\n  assert( (pIn3->flags & MEM_Int)!=0 || pOp->opcode==OP_SeekRowid );\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  iKey = pIn3->u.i;\nnotExistsWithKey:\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n#ifdef SQLITE_DEBUG\n  if( pOp->opcode==OP_SeekRowid ) pC->seekOp = OP_SeekRowid;\n#endif\n  assert( pC->isTable );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  pCrsr = pC->uc.pCursor;\n  assert( pCrsr!=0 );\n  res = 0;\n  rc = sqlite3BtreeTableMoveto(pCrsr, iKey, 0, &res);\n  assert( rc==SQLITE_OK || res==0 );\n  pC->movetoTarget = iKey;  /* Used by OP_Delete */\n  pC->nullRow = 0;\n  pC->cacheStatus = CACHE_STALE;\n  pC->deferredMoveto = 0;\n  VdbeBranchTaken(res!=0,2);\n  pC->seekResult = res;\n  if( res!=0 ){\n    assert( rc==SQLITE_OK );\n    if( pOp->p2==0 ){\n      rc = SQLITE_CORRUPT_BKPT;\n    }else{\n      goto jump_to_p2;\n    }\n  }\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: Sequence P1 P2 * * *\n** Synopsis: r[P2]=cursor[P1].ctr++\n**\n** Find the next available sequence number for cursor P1.\n** Write the sequence number into register P2.\n** The sequence number on the cursor is incremented after this\n** instruction.\n*/\ncase OP_Sequence: {           /* out2 */\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( p->apCsr[pOp->p1]!=0 );\n  assert( p->apCsr[pOp->p1]->eCurType!=CURTYPE_VTAB );\n  pOut = out2Prerelease(p, pOp);\n  pOut->u.i = p->apCsr[pOp->p1]->seqCount++;\n  break;\n}\n\n\n/* Opcode: NewRowid P1 P2 P3 * *\n** Synopsis: r[P2]=rowid\n**\n** Get a new integer record number (a.k.a \"rowid\") used as the key to a table.\n** The record number is not previously used as a key in the database\n** table that cursor P1 points to.  The new record number is written\n** written to register P2.\n**\n** If P3>0 then P3 is a register in the root frame of this VDBE that holds\n** the largest previously generated record number. No new record numbers are\n** allowed to be less than this value. When this value reaches its maximum,\n** an SQLITE_FULL error is generated. The P3 register is updated with the '\n** generated record number. This P3 mechanism is used to help implement the\n** AUTOINCREMENT feature.\n*/\ncase OP_NewRowid: {           /* out2 */\n  i64 v;                 /* The new rowid */\n  VdbeCursor *pC;        /* Cursor of table to get the new rowid */\n  int res;               /* Result of an sqlite3BtreeLast() */\n  int cnt;               /* Counter to limit the number of searches */\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n  Mem *pMem;             /* Register holding largest rowid for AUTOINCREMENT */\n  VdbeFrame *pFrame;     /* Root frame of VDBE */\n#endif\n\n  v = 0;\n  res = 0;\n  pOut = out2Prerelease(p, pOp);\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->isTable );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->uc.pCursor!=0 );\n  {\n    /* The next rowid or record number (different terms for the same\n    ** thing) is obtained in a two-step algorithm.\n    **\n    ** First we attempt to find the largest existing rowid and add one\n    ** to that.  But if the largest existing rowid is already the maximum\n    ** positive integer, we have to fall through to the second\n    ** probabilistic algorithm\n    **\n    ** The second algorithm is to select a rowid at random and see if\n    ** it already exists in the table.  If it does not exist, we have\n    ** succeeded.  If the random rowid does exist, we select a new one\n    ** and try again, up to 100 times.\n    */\n    assert( pC->isTable );\n\n#ifdef SQLITE_32BIT_ROWID\n#   define MAX_ROWID 0x7fffffff\n#else\n    /* Some compilers complain about constants of the form 0x7fffffffffffffff.\n    ** Others complain about 0x7ffffffffffffffffLL.  The following macro seems\n    ** to provide the constant while making all compilers happy.\n    */\n#   define MAX_ROWID  (i64)( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )\n#endif\n\n    if( !pC->useRandomRowid ){\n      rc = sqlite3BtreeLast(pC->uc.pCursor, &res);\n      if( rc!=SQLITE_OK ){\n        goto abort_due_to_error;\n      }\n      if( res ){\n        v = 1;   /* IMP: R-61914-48074 */\n      }else{\n        assert( sqlite3BtreeCursorIsValid(pC->uc.pCursor) );\n        v = sqlite3BtreeIntegerKey(pC->uc.pCursor);\n        if( v>=MAX_ROWID ){\n          pC->useRandomRowid = 1;\n        }else{\n          v++;   /* IMP: R-29538-34987 */\n        }\n      }\n    }\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n    if( pOp->p3 ){\n      /* Assert that P3 is a valid memory cell. */\n      assert( pOp->p3>0 );\n      if( p->pFrame ){\n        for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);\n        /* Assert that P3 is a valid memory cell. */\n        assert( pOp->p3<=pFrame->nMem );\n        pMem = &pFrame->aMem[pOp->p3];\n      }else{\n        /* Assert that P3 is a valid memory cell. */\n        assert( pOp->p3<=(p->nMem+1 - p->nCursor) );\n        pMem = &aMem[pOp->p3];\n        memAboutToChange(p, pMem);\n      }\n      assert( memIsValid(pMem) );\n\n      REGISTER_TRACE(pOp->p3, pMem);\n      sqlite3VdbeMemIntegerify(pMem);\n      assert( (pMem->flags & MEM_Int)!=0 );  /* mem(P3) holds an integer */\n      if( pMem->u.i==MAX_ROWID || pC->useRandomRowid ){\n        rc = SQLITE_FULL;   /* IMP: R-17817-00630 */\n        goto abort_due_to_error;\n      }\n      if( v<pMem->u.i+1 ){\n        v = pMem->u.i + 1;\n      }\n      pMem->u.i = v;\n    }\n#endif\n    if( pC->useRandomRowid ){\n      /* IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the\n      ** largest possible integer (9223372036854775807) then the database\n      ** engine starts picking positive candidate ROWIDs at random until\n      ** it finds one that is not previously used. */\n      assert( pOp->p3==0 );  /* We cannot be in random rowid mode if this is\n                             ** an AUTOINCREMENT table. */\n      cnt = 0;\n      do{\n        sqlite3_randomness(sizeof(v), &v);\n        v &= (MAX_ROWID>>1); v++;  /* Ensure that v is greater than zero */\n      }while(  ((rc = sqlite3BtreeTableMoveto(pC->uc.pCursor, (u64)v,\n                                                 0, &res))==SQLITE_OK)\n            && (res==0)\n            && (++cnt<100));\n      if( rc ) goto abort_due_to_error;\n      if( res==0 ){\n        rc = SQLITE_FULL;   /* IMP: R-38219-53002 */\n        goto abort_due_to_error;\n      }\n      assert( v>0 );  /* EV: R-40812-03570 */\n    }\n    pC->deferredMoveto = 0;\n    pC->cacheStatus = CACHE_STALE;\n  }\n  pOut->u.i = v;\n  break;\n}\n\n/* Opcode: Insert P1 P2 P3 P4 P5\n** Synopsis: intkey=r[P3] data=r[P2]\n**\n** Write an entry into the table of cursor P1.  A new entry is\n** created if it doesn't already exist or the data for an existing\n** entry is overwritten.  The data is the value MEM_Blob stored in register\n** number P2. The key is stored in register P3. The key must\n** be a MEM_Int.\n**\n** If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is\n** incremented (otherwise not).  If the OPFLAG_LASTROWID flag of P5 is set,\n** then rowid is stored for subsequent return by the\n** sqlite3_last_insert_rowid() function (otherwise it is unmodified).\n**\n** If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might\n** run faster by avoiding an unnecessary seek on cursor P1.  However,\n** the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior\n** seeks on the cursor or if the most recent seek used a key equal to P3.\n**\n** If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an\n** UPDATE operation.  Otherwise (if the flag is clear) then this opcode\n** is part of an INSERT operation.  The difference is only important to\n** the update hook.\n**\n** Parameter P4 may point to a Table structure, or may be NULL. If it is\n** not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked\n** following a successful insert.\n**\n** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically\n** allocated, then ownership of P2 is transferred to the pseudo-cursor\n** and register P2 becomes ephemeral.  If the cursor is changed, the\n** value of register P2 will then change.  Make sure this does not\n** cause any problems.)\n**\n** This instruction only works on tables.  The equivalent instruction\n** for indices is OP_IdxInsert.\n*/\ncase OP_Insert: {\n  Mem *pData;       /* MEM cell holding data for the record to be inserted */\n  Mem *pKey;        /* MEM cell holding key  for the record */\n  VdbeCursor *pC;   /* Cursor to table into which insert is written */\n  int seekResult;   /* Result of prior seek or 0 if no USESEEKRESULT flag */\n  const char *zDb;  /* database name - used by the update hook */\n  Table *pTab;      /* Table structure - used by update and pre-update hooks */\n  BtreePayload x;   /* Payload to be inserted */\n\n  pData = &aMem[pOp->p2];\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( memIsValid(pData) );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->deferredMoveto==0 );\n  assert( pC->uc.pCursor!=0 );\n  assert( (pOp->p5 & OPFLAG_ISNOOP) || pC->isTable );\n  assert( pOp->p4type==P4_TABLE || pOp->p4type>=P4_STATIC );\n  REGISTER_TRACE(pOp->p2, pData);\n  sqlite3VdbeIncrWriteCounter(p, pC);\n\n  pKey = &aMem[pOp->p3];\n  assert( pKey->flags & MEM_Int );\n  assert( memIsValid(pKey) );\n  REGISTER_TRACE(pOp->p3, pKey);\n  x.nKey = pKey->u.i;\n\n  if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){\n    assert( pC->iDb>=0 );\n    zDb = db->aDb[pC->iDb].zDbSName;\n    pTab = pOp->p4.pTab;\n    assert( (pOp->p5 & OPFLAG_ISNOOP) || HasRowid(pTab) );\n  }else{\n    pTab = 0;\n    zDb = 0;\n  }\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  /* Invoke the pre-update hook, if any */\n  if( pTab ){\n    if( db->xPreUpdateCallback && !(pOp->p5 & OPFLAG_ISUPDATE) ){\n      sqlite3VdbePreUpdateHook(p,pC,SQLITE_INSERT,zDb,pTab,x.nKey,pOp->p2,-1);\n    }\n    if( db->xUpdateCallback==0 || pTab->aCol==0 ){\n      /* Prevent post-update hook from running in cases when it should not */\n      pTab = 0;\n    }\n  }\n  if( pOp->p5 & OPFLAG_ISNOOP ) break;\n#endif\n\n  assert( (pOp->p5 & OPFLAG_LASTROWID)==0 || (pOp->p5 & OPFLAG_NCHANGE)!=0 );\n  if( pOp->p5 & OPFLAG_NCHANGE ){\n    p->nChange++;\n    if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = x.nKey;\n  }\n  assert( (pData->flags & (MEM_Blob|MEM_Str))!=0 || pData->n==0 );\n  x.pData = pData->z;\n  x.nData = pData->n;\n  seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0);\n  if( pData->flags & MEM_Zero ){\n    x.nZero = pData->u.nZero;\n  }else{\n    x.nZero = 0;\n  }\n  x.pKey = 0;\n  assert( BTREE_PREFORMAT==OPFLAG_PREFORMAT );\n  rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,\n      (pOp->p5 & (OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT)),\n      seekResult\n  );\n  pC->deferredMoveto = 0;\n  pC->cacheStatus = CACHE_STALE;\n  colCacheCtr++;\n\n  /* Invoke the update-hook if required. */\n  if( rc ) goto abort_due_to_error;\n  if( pTab ){\n    assert( db->xUpdateCallback!=0 );\n    assert( pTab->aCol!=0 );\n    db->xUpdateCallback(db->pUpdateArg,\n           (pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT,\n           zDb, pTab->zName, x.nKey);\n  }\n  break;\n}\n\n/* Opcode: RowCell P1 P2 P3 * *\n**\n** P1 and P2 are both open cursors. Both must be opened on the same type\n** of table - intkey or index. This opcode is used as part of copying\n** the current row from P2 into P1. If the cursors are opened on intkey\n** tables, register P3 contains the rowid to use with the new record in\n** P1. If they are opened on index tables, P3 is not used.\n**\n** This opcode must be followed by either an Insert or InsertIdx opcode\n** with the OPFLAG_PREFORMAT flag set to complete the insert operation.\n*/\ncase OP_RowCell: {\n  VdbeCursor *pDest;              /* Cursor to write to */\n  VdbeCursor *pSrc;               /* Cursor to read from */\n  i64 iKey;                       /* Rowid value to insert with */\n  assert( pOp[1].opcode==OP_Insert || pOp[1].opcode==OP_IdxInsert );\n  assert( pOp[1].opcode==OP_Insert    || pOp->p3==0 );\n  assert( pOp[1].opcode==OP_IdxInsert || pOp->p3>0 );\n  assert( pOp[1].p5 & OPFLAG_PREFORMAT );\n  pDest = p->apCsr[pOp->p1];\n  pSrc = p->apCsr[pOp->p2];\n  iKey = pOp->p3 ? aMem[pOp->p3].u.i : 0;\n  rc = sqlite3BtreeTransferRow(pDest->uc.pCursor, pSrc->uc.pCursor, iKey);\n  if( rc!=SQLITE_OK ) goto abort_due_to_error;\n  break;\n};\n\n/* Opcode: Delete P1 P2 P3 P4 P5\n**\n** Delete the record at which the P1 cursor is currently pointing.\n**\n** If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then\n** the cursor will be left pointing at  either the next or the previous\n** record in the table. If it is left pointing at the next record, then\n** the next Next instruction will be a no-op. As a result, in this case\n** it is ok to delete a record from within a Next loop. If\n** OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be\n** left in an undefined state.\n**\n** If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this\n** delete is one of several associated with deleting a table row and\n** all its associated index entries.  Exactly one of those deletes is\n** the \"primary\" delete.  The others are all on OPFLAG_FORDELETE\n** cursors or else are marked with the AUXDELETE flag.\n**\n** If the OPFLAG_NCHANGE (0x01) flag of P2 (NB: P2 not P5) is set, then\n** the row change count is incremented (otherwise not).\n**\n** If the OPFLAG_ISNOOP (0x40) flag of P2 (not P5!) is set, then the\n** pre-update-hook for deletes is run, but the btree is otherwise unchanged.\n** This happens when the OP_Delete is to be shortly followed by an OP_Insert\n** with the same key, causing the btree entry to be overwritten.\n**\n** P1 must not be pseudo-table.  It has to be a real table with\n** multiple rows.\n**\n** If P4 is not NULL then it points to a Table object. In this case either\n** the update or pre-update hook, or both, may be invoked. The P1 cursor must\n** have been positioned using OP_NotFound prior to invoking this opcode in\n** this case. Specifically, if one is configured, the pre-update hook is\n** invoked if P4 is not NULL. The update-hook is invoked if one is configured,\n** P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2.\n**\n** If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address\n** of the memory cell that contains the value that the rowid of the row will\n** be set to by the update.\n*/\ncase OP_Delete: {\n  VdbeCursor *pC;\n  const char *zDb;\n  Table *pTab;\n  int opflags;\n\n  opflags = pOp->p2;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->uc.pCursor!=0 );\n  assert( pC->deferredMoveto==0 );\n  sqlite3VdbeIncrWriteCounter(p, pC);\n\n#ifdef SQLITE_DEBUG\n  if( pOp->p4type==P4_TABLE\n   && HasRowid(pOp->p4.pTab)\n   && pOp->p5==0\n   && sqlite3BtreeCursorIsValidNN(pC->uc.pCursor)\n  ){\n    /* If p5 is zero, the seek operation that positioned the cursor prior to\n    ** OP_Delete will have also set the pC->movetoTarget field to the rowid of\n    ** the row that is being deleted */\n    i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);\n    assert( CORRUPT_DB || pC->movetoTarget==iKey );\n  }\n#endif\n\n  /* If the update-hook or pre-update-hook will be invoked, set zDb to\n  ** the name of the db to pass as to it. Also set local pTab to a copy\n  ** of p4.pTab. Finally, if p5 is true, indicating that this cursor was\n  ** last moved with OP_Next or OP_Prev, not Seek or NotFound, set\n  ** VdbeCursor.movetoTarget to the current rowid.  */\n  if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){\n    assert( pC->iDb>=0 );\n    assert( pOp->p4.pTab!=0 );\n    zDb = db->aDb[pC->iDb].zDbSName;\n    pTab = pOp->p4.pTab;\n    if( (pOp->p5 & OPFLAG_SAVEPOSITION)!=0 && pC->isTable ){\n      pC->movetoTarget = sqlite3BtreeIntegerKey(pC->uc.pCursor);\n    }\n  }else{\n    zDb = 0;\n    pTab = 0;\n  }\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  /* Invoke the pre-update-hook if required. */\n  assert( db->xPreUpdateCallback==0 || pTab==pOp->p4.pTab );\n  if( db->xPreUpdateCallback && pTab ){\n    assert( !(opflags & OPFLAG_ISUPDATE)\n         || HasRowid(pTab)==0\n         || (aMem[pOp->p3].flags & MEM_Int)\n    );\n    sqlite3VdbePreUpdateHook(p, pC,\n        (opflags & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_DELETE,\n        zDb, pTab, pC->movetoTarget,\n        pOp->p3, -1\n    );\n  }\n  if( opflags & OPFLAG_ISNOOP ) break;\n#endif\n\n  /* Only flags that can be set are SAVEPOISTION and AUXDELETE */\n  assert( (pOp->p5 & ~(OPFLAG_SAVEPOSITION|OPFLAG_AUXDELETE))==0 );\n  assert( OPFLAG_SAVEPOSITION==BTREE_SAVEPOSITION );\n  assert( OPFLAG_AUXDELETE==BTREE_AUXDELETE );\n\n#ifdef SQLITE_DEBUG\n  if( p->pFrame==0 ){\n    if( pC->isEphemeral==0\n        && (pOp->p5 & OPFLAG_AUXDELETE)==0\n        && (pC->wrFlag & OPFLAG_FORDELETE)==0\n      ){\n      nExtraDelete++;\n    }\n    if( pOp->p2 & OPFLAG_NCHANGE ){\n      nExtraDelete--;\n    }\n  }\n#endif\n\n  rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5);\n  pC->cacheStatus = CACHE_STALE;\n  colCacheCtr++;\n  pC->seekResult = 0;\n  if( rc ) goto abort_due_to_error;\n\n  /* Invoke the update-hook if required. */\n  if( opflags & OPFLAG_NCHANGE ){\n    p->nChange++;\n    if( db->xUpdateCallback && ALWAYS(pTab!=0) && HasRowid(pTab) ){\n      db->xUpdateCallback(db->pUpdateArg, SQLITE_DELETE, zDb, pTab->zName,\n          pC->movetoTarget);\n      assert( pC->iDb>=0 );\n    }\n  }\n\n  break;\n}\n/* Opcode: ResetCount * * * * *\n**\n** The value of the change counter is copied to the database handle\n** change counter (returned by subsequent calls to sqlite3_changes()).\n** Then the VMs internal change counter resets to 0.\n** This is used by trigger programs.\n*/\ncase OP_ResetCount: {\n  sqlite3VdbeSetChanges(db, p->nChange);\n  p->nChange = 0;\n  break;\n}\n\n/* Opcode: SorterCompare P1 P2 P3 P4\n** Synopsis: if key(P1)!=trim(r[P3],P4) goto P2\n**\n** P1 is a sorter cursor. This instruction compares a prefix of the\n** record blob in register P3 against a prefix of the entry that\n** the sorter cursor currently points to.  Only the first P4 fields\n** of r[P3] and the sorter record are compared.\n**\n** If either P3 or the sorter contains a NULL in one of their significant\n** fields (not counting the P4 fields at the end which are ignored) then\n** the comparison is assumed to be equal.\n**\n** Fall through to next instruction if the two records compare equal to\n** each other.  Jump to P2 if they are different.\n*/\ncase OP_SorterCompare: {\n  VdbeCursor *pC;\n  int res;\n  int nKeyCol;\n\n  pC = p->apCsr[pOp->p1];\n  assert( isSorter(pC) );\n  assert( pOp->p4type==P4_INT32 );\n  pIn3 = &aMem[pOp->p3];\n  nKeyCol = pOp->p4.i;\n  res = 0;\n  rc = sqlite3VdbeSorterCompare(pC, pIn3, nKeyCol, &res);\n  VdbeBranchTaken(res!=0,2);\n  if( rc ) goto abort_due_to_error;\n  if( res ) goto jump_to_p2;\n  break;\n};\n\n/* Opcode: SorterData P1 P2 P3 * *\n** Synopsis: r[P2]=data\n**\n** Write into register P2 the current sorter data for sorter cursor P1.\n** Then clear the column header cache on cursor P3.\n**\n** This opcode is normally used to move a record out of the sorter and into\n** a register that is the source for a pseudo-table cursor created using\n** OpenPseudo.  That pseudo-table cursor is the one that is identified by\n** parameter P3.  Clearing the P3 column cache as part of this opcode saves\n** us from having to issue a separate NullRow instruction to clear that cache.\n*/\ncase OP_SorterData: {       /* ncycle */\n  VdbeCursor *pC;\n\n  pOut = &aMem[pOp->p2];\n  pC = p->apCsr[pOp->p1];\n  assert( isSorter(pC) );\n  rc = sqlite3VdbeSorterRowkey(pC, pOut);\n  assert( rc!=SQLITE_OK || (pOut->flags & MEM_Blob) );\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  if( rc ) goto abort_due_to_error;\n  p->apCsr[pOp->p3]->cacheStatus = CACHE_STALE;\n  break;\n}\n\n/* Opcode: RowData P1 P2 P3 * *\n** Synopsis: r[P2]=data\n**\n** Write into register P2 the complete row content for the row at\n** which cursor P1 is currently pointing.\n** There is no interpretation of the data.\n** It is just copied onto the P2 register exactly as\n** it is found in the database file.\n**\n** If cursor P1 is an index, then the content is the key of the row.\n** If cursor P2 is a table, then the content extracted is the data.\n**\n** If the P1 cursor must be pointing to a valid row (not a NULL row)\n** of a real table, not a pseudo-table.\n**\n** If P3!=0 then this opcode is allowed to make an ephemeral pointer\n** into the database page.  That means that the content of the output\n** register will be invalidated as soon as the cursor moves - including\n** moves caused by other cursors that \"save\" the current cursors\n** position in order that they can write to the same table.  If P3==0\n** then a copy of the data is made into memory.  P3!=0 is faster, but\n** P3==0 is safer.\n**\n** If P3!=0 then the content of the P2 register is unsuitable for use\n** in OP_Result and any OP_Result will invalidate the P2 register content.\n** The P2 register content is invalidated by opcodes like OP_Function or\n** by any use of another cursor pointing to the same table.\n*/\ncase OP_RowData: {\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  u32 n;\n\n  pOut = out2Prerelease(p, pOp);\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( isSorter(pC)==0 );\n  assert( pC->nullRow==0 );\n  assert( pC->uc.pCursor!=0 );\n  pCrsr = pC->uc.pCursor;\n\n  /* The OP_RowData opcodes always follow OP_NotExists or\n  ** OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions\n  ** that might invalidate the cursor.\n  ** If this were not the case, one of the following assert()s\n  ** would fail.  Should this ever change (because of changes in the code\n  ** generator) then the fix would be to insert a call to\n  ** sqlite3VdbeCursorMoveto().\n  */\n  assert( pC->deferredMoveto==0 );\n  assert( sqlite3BtreeCursorIsValid(pCrsr) );\n\n  n = sqlite3BtreePayloadSize(pCrsr);\n  if( n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    goto too_big;\n  }\n  testcase( n==0 );\n  rc = sqlite3VdbeMemFromBtreeZeroOffset(pCrsr, n, pOut);\n  if( rc ) goto abort_due_to_error;\n  if( !pOp->p3 ) Deephemeralize(pOut);\n  UPDATE_MAX_BLOBSIZE(pOut);\n  REGISTER_TRACE(pOp->p2, pOut);\n  break;\n}\n\n/* Opcode: Rowid P1 P2 * * *\n** Synopsis: r[P2]=PX rowid of P1\n**\n** Store in register P2 an integer which is the key of the table entry that\n** P1 is currently point to.\n**\n** P1 can be either an ordinary table or a virtual table.  There used to\n** be a separate OP_VRowid opcode for use with virtual tables, but this\n** one opcode now works for both table types.\n*/\ncase OP_Rowid: {                 /* out2, ncycle */\n  VdbeCursor *pC;\n  i64 v;\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n\n  pOut = out2Prerelease(p, pOp);\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );\n  if( pC->nullRow ){\n    pOut->flags = MEM_Null;\n    break;\n  }else if( pC->deferredMoveto ){\n    v = pC->movetoTarget;\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  }else if( pC->eCurType==CURTYPE_VTAB ){\n    assert( pC->uc.pVCur!=0 );\n    pVtab = pC->uc.pVCur->pVtab;\n    pModule = pVtab->pModule;\n    assert( pModule->xRowid );\n    rc = pModule->xRowid(pC->uc.pVCur, &v);\n    sqlite3VtabImportErrmsg(p, pVtab);\n    if( rc ) goto abort_due_to_error;\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n  }else{\n    assert( pC->eCurType==CURTYPE_BTREE );\n    assert( pC->uc.pCursor!=0 );\n    rc = sqlite3VdbeCursorRestore(pC);\n    if( rc ) goto abort_due_to_error;\n    if( pC->nullRow ){\n      pOut->flags = MEM_Null;\n      break;\n    }\n    v = sqlite3BtreeIntegerKey(pC->uc.pCursor);\n  }\n  pOut->u.i = v;\n  break;\n}\n\n/* Opcode: NullRow P1 * * * *\n**\n** Move the cursor P1 to a null row.  Any OP_Column operations\n** that occur while the cursor is on the null row will always\n** write a NULL.\n**\n** If cursor P1 is not previously opened, open it now to a special\n** pseudo-cursor that always returns NULL for every column.\n*/\ncase OP_NullRow: {\n  VdbeCursor *pC;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  if( pC==0 ){\n    /* If the cursor is not already open, create a special kind of\n    ** pseudo-cursor that always gives null rows. */\n    pC = allocateCursor(p, pOp->p1, 1, CURTYPE_PSEUDO);\n    if( pC==0 ) goto no_mem;\n    pC->seekResult = 0;\n    pC->isTable = 1;\n    pC->noReuse = 1;\n    pC->uc.pCursor = sqlite3BtreeFakeValidCursor();\n  }\n  pC->nullRow = 1;\n  pC->cacheStatus = CACHE_STALE;\n  if( pC->eCurType==CURTYPE_BTREE ){\n    assert( pC->uc.pCursor!=0 );\n    sqlite3BtreeClearCursor(pC->uc.pCursor);\n  }\n#ifdef SQLITE_DEBUG\n  if( pC->seekOp==0 ) pC->seekOp = OP_NullRow;\n#endif\n  break;\n}\n\n/* Opcode: SeekEnd P1 * * * *\n**\n** Position cursor P1 at the end of the btree for the purpose of\n** appending a new entry onto the btree.\n**\n** It is assumed that the cursor is used only for appending and so\n** if the cursor is valid, then the cursor must already be pointing\n** at the end of the btree and so no changes are made to\n** the cursor.\n*/\n/* Opcode: Last P1 P2 * * *\n**\n** The next use of the Rowid or Column or Prev instruction for P1\n** will refer to the last entry in the database table or index.\n** If the table or index is empty and P2>0, then jump immediately to P2.\n** If P2 is 0 or if the table or index is not empty, fall through\n** to the following instruction.\n**\n** This opcode leaves the cursor configured to move in reverse order,\n** from the end toward the beginning.  In other words, the cursor is\n** configured to use Prev, not Next.\n*/\ncase OP_SeekEnd:             /* ncycle */\ncase OP_Last: {              /* jump0, ncycle */\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  pCrsr = pC->uc.pCursor;\n  res = 0;\n  assert( pCrsr!=0 );\n#ifdef SQLITE_DEBUG\n  pC->seekOp = pOp->opcode;\n#endif\n  if( pOp->opcode==OP_SeekEnd ){\n    assert( pOp->p2==0 );\n    pC->seekResult = -1;\n    if( sqlite3BtreeCursorIsValidNN(pCrsr) ){\n      break;\n    }\n  }\n  rc = sqlite3BtreeLast(pCrsr, &res);\n  pC->nullRow = (u8)res;\n  pC->deferredMoveto = 0;\n  pC->cacheStatus = CACHE_STALE;\n  if( rc ) goto abort_due_to_error;\n  if( pOp->p2>0 ){\n    VdbeBranchTaken(res!=0,2);\n    if( res ) goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: IfSizeBetween P1 P2 P3 P4 *\n**\n** Let N be the approximate number of rows in the table or index\n** with cursor P1 and let X be 10*log2(N) if N is positive or -1\n** if N is zero.\n**\n** Jump to P2 if X is in between P3 and P4, inclusive.\n*/\ncase OP_IfSizeBetween: {        /* jump */\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n  i64 sz;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p4type==P4_INT32 );\n  assert( pOp->p3>=-1 && pOp->p3<=640*2 );\n  assert( pOp->p4.i>=-1 && pOp->p4.i<=640*2 );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  pCrsr = pC->uc.pCursor;\n  assert( pCrsr );\n  rc = sqlite3BtreeFirst(pCrsr, &res);\n  if( rc ) goto abort_due_to_error;\n  if( res!=0 ){\n    sz = -1;  /* -Infinity encoding */\n  }else{\n    sz = sqlite3BtreeRowCountEst(pCrsr);\n    assert( sz>0 );\n    sz = sqlite3LogEst((u64)sz);\n  }\n  res = sz>=pOp->p3 && sz<=pOp->p4.i;\n  VdbeBranchTaken(res!=0,2);\n  if( res ) goto jump_to_p2;\n  break;\n}\n\n\n/* Opcode: SorterSort P1 P2 * * *\n**\n** After all records have been inserted into the Sorter object\n** identified by P1, invoke this opcode to actually do the sorting.\n** Jump to P2 if there are no records to be sorted.\n**\n** This opcode is an alias for OP_Sort and OP_Rewind that is used\n** for Sorter objects.\n*/\n/* Opcode: Sort P1 P2 * * *\n**\n** This opcode does exactly the same thing as OP_Rewind except that\n** it increments an undocumented global variable used for testing.\n**\n** Sorting is accomplished by writing records into a sorting index,\n** then rewinding that index and playing it back from beginning to\n** end.  We use the OP_Sort opcode instead of OP_Rewind to do the\n** rewinding so that the global variable will be incremented and\n** regression tests can determine whether or not the optimizer is\n** correctly optimizing out sorts.\n*/\ncase OP_SorterSort:    /* jump ncycle */\ncase OP_Sort: {        /* jump ncycle */\n#ifdef SQLITE_TEST\n  sqlite3_sort_count++;\n  sqlite3_search_count--;\n#endif\n  p->aCounter[SQLITE_STMTSTATUS_SORT]++;\n  /* Fall through into OP_Rewind */\n  /* no break */ deliberate_fall_through\n}\n/* Opcode: Rewind P1 P2 * * *\n**\n** The next use of the Rowid or Column or Next instruction for P1\n** will refer to the first entry in the database table or index.\n** If the table or index is empty, jump immediately to P2.\n** If the table or index is not empty, fall through to the following\n** instruction.\n**\n** If P2 is zero, that is an assertion that the P1 table is never\n** empty and hence the jump will never be taken.\n**\n** This opcode leaves the cursor configured to move in forward order,\n** from the beginning toward the end.  In other words, the cursor is\n** configured to use Next, not Prev.\n*/\ncase OP_Rewind: {        /* jump0, ncycle */\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p5==0 );\n  assert( pOp->p2>=0 && pOp->p2<p->nOp );\n\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );\n  res = 1;\n#ifdef SQLITE_DEBUG\n  pC->seekOp = OP_Rewind;\n#endif\n  if( isSorter(pC) ){\n    rc = sqlite3VdbeSorterRewind(pC, &res);\n  }else{\n    assert( pC->eCurType==CURTYPE_BTREE );\n    pCrsr = pC->uc.pCursor;\n    assert( pCrsr );\n    rc = sqlite3BtreeFirst(pCrsr, &res);\n    pC->deferredMoveto = 0;\n    pC->cacheStatus = CACHE_STALE;\n  }\n  if( rc ) goto abort_due_to_error;\n  pC->nullRow = (u8)res;\n  if( pOp->p2>0 ){\n    VdbeBranchTaken(res!=0,2);\n    if( res ) goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: IfEmpty P1 P2 * * *\n** Synopsis: if( empty(P1) ) goto P2\n**\n** Check to see if the b-tree table that cursor P1 references is empty\n** and jump to P2 if it is.\n*/\ncase OP_IfEmpty: {        /* jump */\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p2>=0 && pOp->p2<p->nOp );\n\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  pCrsr = pC->uc.pCursor;\n  assert( pCrsr );\n  rc = sqlite3BtreeIsEmpty(pCrsr, &res);\n  if( rc ) goto abort_due_to_error;\n  VdbeBranchTaken(res!=0,2);\n  if( res ) goto jump_to_p2;\n  break;\n}\n\n/* Opcode: Next P1 P2 P3 * P5\n**\n** Advance cursor P1 so that it points to the next key/data pair in its\n** table or index.  If there are no more key/value pairs then fall through\n** to the following instruction.  But if the cursor advance was successful,\n** jump immediately to P2.\n**\n** The Next opcode is only valid following an SeekGT, SeekGE, or\n** OP_Rewind opcode used to position the cursor.  Next is not allowed\n** to follow SeekLT, SeekLE, or OP_Last.\n**\n** The P1 cursor must be for a real table, not a pseudo-table.  P1 must have\n** been opened prior to this opcode or the program will segfault.\n**\n** The P3 value is a hint to the btree implementation. If P3==1, that\n** means P1 is an SQL index and that this instruction could have been\n** omitted if that index had been unique.  P3 is usually 0.  P3 is\n** always either 0 or 1.\n**\n** If P5 is positive and the jump is taken, then event counter\n** number P5-1 in the prepared statement is incremented.\n**\n** See also: Prev\n*/\n/* Opcode: Prev P1 P2 P3 * P5\n**\n** Back up cursor P1 so that it points to the previous key/data pair in its\n** table or index.  If there is no previous key/value pairs then fall through\n** to the following instruction.  But if the cursor backup was successful,\n** jump immediately to P2.\n**\n**\n** The Prev opcode is only valid following an SeekLT, SeekLE, or\n** OP_Last opcode used to position the cursor.  Prev is not allowed\n** to follow SeekGT, SeekGE, or OP_Rewind.\n**\n** The P1 cursor must be for a real table, not a pseudo-table.  If P1 is\n** not open then the behavior is undefined.\n**\n** The P3 value is a hint to the btree implementation. If P3==1, that\n** means P1 is an SQL index and that this instruction could have been\n** omitted if that index had been unique.  P3 is usually 0.  P3 is\n** always either 0 or 1.\n**\n** If P5 is positive and the jump is taken, then event counter\n** number P5-1 in the prepared statement is incremented.\n*/\n/* Opcode: SorterNext P1 P2 * * P5\n**\n** This opcode works just like OP_Next except that P1 must be a\n** sorter object for which the OP_SorterSort opcode has been\n** invoked.  This opcode advances the cursor to the next sorted\n** record, or jumps to P2 if there are no more sorted records.\n*/\ncase OP_SorterNext: {  /* jump */\n  VdbeCursor *pC;\n\n  pC = p->apCsr[pOp->p1];\n  assert( isSorter(pC) );\n  rc = sqlite3VdbeSorterNext(db, pC);\n  goto next_tail;\n\ncase OP_Prev:          /* jump, ncycle */\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p5==0\n       || pOp->p5==SQLITE_STMTSTATUS_FULLSCAN_STEP\n       || pOp->p5==SQLITE_STMTSTATUS_AUTOINDEX);\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->deferredMoveto==0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->seekOp==OP_SeekLT || pC->seekOp==OP_SeekLE\n       || pC->seekOp==OP_Last   || pC->seekOp==OP_IfNoHope\n       || pC->seekOp==OP_NullRow);\n  rc = sqlite3BtreePrevious(pC->uc.pCursor, pOp->p3);\n  goto next_tail;\n\ncase OP_Next:          /* jump, ncycle */\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p5==0\n       || pOp->p5==SQLITE_STMTSTATUS_FULLSCAN_STEP\n       || pOp->p5==SQLITE_STMTSTATUS_AUTOINDEX);\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->deferredMoveto==0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->seekOp==OP_SeekGT || pC->seekOp==OP_SeekGE\n       || pC->seekOp==OP_Rewind || pC->seekOp==OP_Found\n       || pC->seekOp==OP_NullRow|| pC->seekOp==OP_SeekRowid\n       || pC->seekOp==OP_IfNoHope);\n  rc = sqlite3BtreeNext(pC->uc.pCursor, pOp->p3);\n\nnext_tail:\n  pC->cacheStatus = CACHE_STALE;\n  VdbeBranchTaken(rc==SQLITE_OK,2);\n  if( rc==SQLITE_OK ){\n    pC->nullRow = 0;\n    p->aCounter[pOp->p5]++;\n#ifdef SQLITE_TEST\n    sqlite3_search_count++;\n#endif\n    goto jump_to_p2_and_check_for_interrupt;\n  }\n  if( rc!=SQLITE_DONE ) goto abort_due_to_error;\n  rc = SQLITE_OK;\n  pC->nullRow = 1;\n  goto check_for_interrupt;\n}\n\n/* Opcode: IdxInsert P1 P2 P3 P4 P5\n** Synopsis: key=r[P2]\n**\n** Register P2 holds an SQL index key made using the\n** MakeRecord instructions.  This opcode writes that key\n** into the index P1.  Data for the entry is nil.\n**\n** If P4 is not zero, then it is the number of values in the unpacked\n** key of reg(P2).  In that case, P3 is the index of the first register\n** for the unpacked key.  The availability of the unpacked key can sometimes\n** be an optimization.\n**\n** If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer\n** that this insert is likely to be an append.\n**\n** If P5 has the OPFLAG_NCHANGE bit set, then the change counter is\n** incremented by this instruction.  If the OPFLAG_NCHANGE bit is clear,\n** then the change counter is unchanged.\n**\n** If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might\n** run faster by avoiding an unnecessary seek on cursor P1.  However,\n** the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior\n** seeks on the cursor or if the most recent seek used a key equivalent\n** to P2.\n**\n** This instruction only works for indices.  The equivalent instruction\n** for tables is OP_Insert.\n*/\ncase OP_IdxInsert: {        /* in2 */\n  VdbeCursor *pC;\n  BtreePayload x;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  sqlite3VdbeIncrWriteCounter(p, pC);\n  assert( pC!=0 );\n  assert( !isSorter(pC) );\n  pIn2 = &aMem[pOp->p2];\n  assert( (pIn2->flags & MEM_Blob) || (pOp->p5 & OPFLAG_PREFORMAT) );\n  if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->isTable==0 );\n  rc = ExpandBlob(pIn2);\n  if( rc ) goto abort_due_to_error;\n  x.nKey = pIn2->n;\n  x.pKey = pIn2->z;\n  x.aMem = aMem + pOp->p3;\n  x.nMem = (u16)pOp->p4.i;\n  rc = sqlite3BtreeInsert(pC->uc.pCursor, &x,\n       (pOp->p5 & (OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT)),\n      ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)\n      );\n  assert( pC->deferredMoveto==0 );\n  pC->cacheStatus = CACHE_STALE;\n  if( rc) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: SorterInsert P1 P2 * * *\n** Synopsis: key=r[P2]\n**\n** Register P2 holds an SQL index key made using the\n** MakeRecord instructions.  This opcode writes that key\n** into the sorter P1.  Data for the entry is nil.\n*/\ncase OP_SorterInsert: {     /* in2 */\n  VdbeCursor *pC;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  sqlite3VdbeIncrWriteCounter(p, pC);\n  assert( pC!=0 );\n  assert( isSorter(pC) );\n  pIn2 = &aMem[pOp->p2];\n  assert( pIn2->flags & MEM_Blob );\n  assert( pC->isTable==0 );\n  rc = ExpandBlob(pIn2);\n  if( rc ) goto abort_due_to_error;\n  rc = sqlite3VdbeSorterWrite(pC, pIn2);\n  if( rc) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: IdxDelete P1 P2 P3 * P5\n** Synopsis: key=r[P2@P3]\n**\n** The content of P3 registers starting at register P2 form\n** an unpacked index key. This opcode removes that entry from the\n** index opened by cursor P1.\n**\n** If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error\n** if no matching index entry is found.  This happens when running\n** an UPDATE or DELETE statement and the index entry to be updated\n** or deleted is not found.  For some uses of IdxDelete\n** (example:  the EXCEPT operator) it does not matter that no matching\n** entry is found.  For those cases, P5 is zero.  Also, do not raise\n** this (self-correcting and non-critical) error if in writable_schema mode.\n*/\ncase OP_IdxDelete: {\n  VdbeCursor *pC;\n  BtCursor *pCrsr;\n  int res;\n  UnpackedRecord r;\n\n  assert( pOp->p3>0 );\n  assert( pOp->p2>0 && pOp->p2+pOp->p3<=(p->nMem+1 - p->nCursor)+1 );\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  sqlite3VdbeIncrWriteCounter(p, pC);\n  pCrsr = pC->uc.pCursor;\n  assert( pCrsr!=0 );\n  r.pKeyInfo = pC->pKeyInfo;\n  r.nField = (u16)pOp->p3;\n  r.default_rc = 0;\n  r.aMem = &aMem[pOp->p2];\n  rc = sqlite3BtreeIndexMoveto(pCrsr, &r, &res);\n  if( rc ) goto abort_due_to_error;\n  if( res==0 ){\n    rc = sqlite3BtreeDelete(pCrsr, BTREE_AUXDELETE);\n    if( rc ) goto abort_due_to_error;\n  }else if( pOp->p5 && !sqlite3WritableSchema(db) ){\n    rc = sqlite3ReportError(SQLITE_CORRUPT_INDEX, __LINE__, \"index corruption\");\n    goto abort_due_to_error;\n  }\n  assert( pC->deferredMoveto==0 );\n  pC->cacheStatus = CACHE_STALE;\n  pC->seekResult = 0;\n  break;\n}\n\n/* Opcode: DeferredSeek P1 * P3 P4 *\n** Synopsis: Move P3 to P1.rowid if needed\n**\n** P1 is an open index cursor and P3 is a cursor on the corresponding\n** table.  This opcode does a deferred seek of the P3 table cursor\n** to the row that corresponds to the current row of P1.\n**\n** This is a deferred seek.  Nothing actually happens until\n** the cursor is used to read a record.  That way, if no reads\n** occur, no unnecessary I/O happens.\n**\n** P4 may be an array of integers (type P4_INTARRAY) containing\n** one entry for each column in the P3 table.  If array entry a(i)\n** is non-zero, then reading column a(i)-1 from cursor P3 is\n** equivalent to performing the deferred seek and then reading column i\n** from P1.  This information is stored in P3 and used to redirect\n** reads against P3 over to P1, thus possibly avoiding the need to\n** seek and read cursor P3.\n*/\n/* Opcode: IdxRowid P1 P2 * * *\n** Synopsis: r[P2]=rowid\n**\n** Write into register P2 an integer which is the last entry in the record at\n** the end of the index key pointed to by cursor P1.  This integer should be\n** the rowid of the table entry to which this index entry points.\n**\n** See also: Rowid, MakeRecord.\n*/\ncase OP_DeferredSeek:         /* ncycle */\ncase OP_IdxRowid: {           /* out2, ncycle */\n  VdbeCursor *pC;             /* The P1 index cursor */\n  VdbeCursor *pTabCur;        /* The P2 table cursor (OP_DeferredSeek only) */\n  i64 rowid;                  /* Rowid that P1 current points to */\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE || IsNullCursor(pC) );\n  assert( pC->uc.pCursor!=0 );\n  assert( pC->isTable==0 || IsNullCursor(pC) );\n  assert( pC->deferredMoveto==0 );\n  assert( !pC->nullRow || pOp->opcode==OP_IdxRowid );\n\n  /* The IdxRowid and Seek opcodes are combined because of the commonality\n  ** of sqlite3VdbeCursorRestore() and sqlite3VdbeIdxRowid(). */\n  rc = sqlite3VdbeCursorRestore(pC);\n\n  /* sqlite3VdbeCursorRestore() may fail if the cursor has been disturbed\n  ** since it was last positioned and an error (e.g. OOM or an IO error)\n  ** occurs while trying to reposition it. */\n  if( rc!=SQLITE_OK ) goto abort_due_to_error;\n\n  if( !pC->nullRow ){\n    rowid = 0;  /* Not needed.  Only used to silence a warning. */\n    rc = sqlite3VdbeIdxRowid(db, pC->uc.pCursor, &rowid);\n    if( rc!=SQLITE_OK ){\n      goto abort_due_to_error;\n    }\n    if( pOp->opcode==OP_DeferredSeek ){\n      assert( pOp->p3>=0 && pOp->p3<p->nCursor );\n      pTabCur = p->apCsr[pOp->p3];\n      assert( pTabCur!=0 );\n      assert( pTabCur->eCurType==CURTYPE_BTREE );\n      assert( pTabCur->uc.pCursor!=0 );\n      assert( pTabCur->isTable );\n      pTabCur->nullRow = 0;\n      pTabCur->movetoTarget = rowid;\n      pTabCur->deferredMoveto = 1;\n      pTabCur->cacheStatus = CACHE_STALE;\n      assert( pOp->p4type==P4_INTARRAY || pOp->p4.ai==0 );\n      assert( !pTabCur->isEphemeral );\n      pTabCur->ub.aAltMap = pOp->p4.ai;\n      assert( !pC->isEphemeral );\n      pTabCur->pAltCursor = pC;\n    }else{\n      pOut = out2Prerelease(p, pOp);\n      pOut->u.i = rowid;\n    }\n  }else{\n    assert( pOp->opcode==OP_IdxRowid );\n    sqlite3VdbeMemSetNull(&aMem[pOp->p2]);\n  }\n  break;\n}\n\n/* Opcode: FinishSeek P1 * * * *\n**\n** If cursor P1 was previously moved via OP_DeferredSeek, complete that\n** seek operation now, without further delay.  If the cursor seek has\n** already occurred, this instruction is a no-op.\n*/\ncase OP_FinishSeek: {        /* ncycle */\n  VdbeCursor *pC;            /* The P1 index cursor */\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  if( pC->deferredMoveto ){\n    rc = sqlite3VdbeFinishMoveto(pC);\n    if( rc ) goto abort_due_to_error;\n  }\n  break;\n}\n\n/* Opcode: IdxGE P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** The P4 register values beginning with P3 form an unpacked index\n** key that omits the PRIMARY KEY.  Compare this key value against the index\n** that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID\n** fields at the end.\n**\n** If the P1 index entry is greater than or equal to the key value\n** then jump to P2.  Otherwise fall through to the next instruction.\n*/\n/* Opcode: IdxGT P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** The P4 register values beginning with P3 form an unpacked index\n** key that omits the PRIMARY KEY.  Compare this key value against the index\n** that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID\n** fields at the end.\n**\n** If the P1 index entry is greater than the key value\n** then jump to P2.  Otherwise fall through to the next instruction.\n*/\n/* Opcode: IdxLT P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** The P4 register values beginning with P3 form an unpacked index\n** key that omits the PRIMARY KEY or ROWID.  Compare this key value against\n** the index that P1 is currently pointing to, ignoring the PRIMARY KEY or\n** ROWID on the P1 index.\n**\n** If the P1 index entry is less than the key value then jump to P2.\n** Otherwise fall through to the next instruction.\n*/\n/* Opcode: IdxLE P1 P2 P3 P4 *\n** Synopsis: key=r[P3@P4]\n**\n** The P4 register values beginning with P3 form an unpacked index\n** key that omits the PRIMARY KEY or ROWID.  Compare this key value against\n** the index that P1 is currently pointing to, ignoring the PRIMARY KEY or\n** ROWID on the P1 index.\n**\n** If the P1 index entry is less than or equal to the key value then jump\n** to P2. Otherwise fall through to the next instruction.\n*/\ncase OP_IdxLE:          /* jump, ncycle */\ncase OP_IdxGT:          /* jump, ncycle */\ncase OP_IdxLT:          /* jump, ncycle */\ncase OP_IdxGE:  {       /* jump, ncycle */\n  VdbeCursor *pC;\n  int res;\n  UnpackedRecord r;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->isOrdered );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  assert( pC->uc.pCursor!=0);\n  assert( pC->deferredMoveto==0 );\n  assert( pOp->p4type==P4_INT32 );\n  r.pKeyInfo = pC->pKeyInfo;\n  r.nField = (u16)pOp->p4.i;\n  if( pOp->opcode<OP_IdxLT ){\n    assert( pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxGT );\n    r.default_rc = -1;\n  }else{\n    assert( pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxLT );\n    r.default_rc = 0;\n  }\n  r.aMem = &aMem[pOp->p3];\n#ifdef SQLITE_DEBUG\n  {\n    int i;\n    for(i=0; i<r.nField; i++){\n      assert( memIsValid(&r.aMem[i]) );\n      REGISTER_TRACE(pOp->p3+i, &aMem[pOp->p3+i]);\n    }\n  }\n#endif\n\n  /* Inlined version of sqlite3VdbeIdxKeyCompare() */\n  {\n    i64 nCellKey = 0;\n    BtCursor *pCur;\n    Mem m;\n\n    assert( pC->eCurType==CURTYPE_BTREE );\n    pCur = pC->uc.pCursor;\n    assert( sqlite3BtreeCursorIsValid(pCur) );\n    nCellKey = sqlite3BtreePayloadSize(pCur);\n    /* nCellKey will always be between 0 and 0xffffffff because of the way\n    ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */\n    if( nCellKey<=0 || nCellKey>0x7fffffff ){\n      rc = SQLITE_CORRUPT_BKPT;\n      goto abort_due_to_error;\n    }\n    sqlite3VdbeMemInit(&m, db, 0);\n    rc = sqlite3VdbeMemFromBtreeZeroOffset(pCur, (u32)nCellKey, &m);\n    if( rc ) goto abort_due_to_error;\n    res = sqlite3VdbeRecordCompareWithSkip(m.n, m.z, &r, 0);\n    sqlite3VdbeMemReleaseMalloc(&m);\n  }\n  /* End of inlined sqlite3VdbeIdxKeyCompare() */\n\n  assert( (OP_IdxLE&1)==(OP_IdxLT&1) && (OP_IdxGE&1)==(OP_IdxGT&1) );\n  if( (pOp->opcode&1)==(OP_IdxLT&1) ){\n    assert( pOp->opcode==OP_IdxLE || pOp->opcode==OP_IdxLT );\n    res = -res;\n  }else{\n    assert( pOp->opcode==OP_IdxGE || pOp->opcode==OP_IdxGT );\n    res++;\n  }\n  VdbeBranchTaken(res>0,2);\n  assert( rc==SQLITE_OK );\n  if( res>0 ) goto jump_to_p2;\n  break;\n}\n\n/* Opcode: Destroy P1 P2 P3 * *\n**\n** Delete an entire database table or index whose root page in the database\n** file is given by P1.\n**\n** The table being destroyed is in the main database file if P3==0.  If\n** P3==1 then the table to be destroyed is in the auxiliary database file\n** that is used to store tables create using CREATE TEMPORARY TABLE.\n**\n** If AUTOVACUUM is enabled then it is possible that another root page\n** might be moved into the newly deleted root page in order to keep all\n** root pages contiguous at the beginning of the database.  The former\n** value of the root page that moved - its value before the move occurred -\n** is stored in register P2. If no page movement was required (because the\n** table being dropped was already the last one in the database) then a\n** zero is stored in register P2.  If AUTOVACUUM is disabled then a zero\n** is stored in register P2.\n**\n** This opcode throws an error if there are any active reader VMs when\n** it is invoked. This is done to avoid the difficulty associated with\n** updating existing cursors when a root page is moved in an AUTOVACUUM\n** database. This error is thrown even if the database is not an AUTOVACUUM\n** db in order to avoid introducing an incompatibility between autovacuum\n** and non-autovacuum modes.\n**\n** See also: Clear\n*/\ncase OP_Destroy: {     /* out2 */\n  int iMoved;\n  int iDb;\n\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  assert( p->readOnly==0 );\n  assert( pOp->p1>1 );\n  pOut = out2Prerelease(p, pOp);\n  pOut->flags = MEM_Null;\n  if( db->nVdbeRead > db->nVDestroy+1 ){\n    rc = SQLITE_LOCKED;\n    p->errorAction = OE_Abort;\n    goto abort_due_to_error;\n  }else{\n    iDb = pOp->p3;\n    assert( DbMaskTest(p->btreeMask, iDb) );\n    iMoved = 0;  /* Not needed.  Only to silence a warning. */\n    rc = sqlite3BtreeDropTable(db->aDb[iDb].pBt, pOp->p1, &iMoved);\n    pOut->flags = MEM_Int;\n    pOut->u.i = iMoved;\n    if( rc ) goto abort_due_to_error;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( iMoved!=0 ){\n      sqlite3RootPageMoved(db, iDb, iMoved, pOp->p1);\n      /* All OP_Destroy operations occur on the same btree */\n      assert( resetSchemaOnFault==0 || resetSchemaOnFault==iDb+1 );\n      resetSchemaOnFault = iDb+1;\n    }\n#endif\n  }\n  break;\n}\n\n/* Opcode: Clear P1 P2 P3\n**\n** Delete all contents of the database table or index whose root page\n** in the database file is given by P1.  But, unlike Destroy, do not\n** remove the table or index from the database file.\n**\n** The table being cleared is in the main database file if P2==0.  If\n** P2==1 then the table to be cleared is in the auxiliary database file\n** that is used to store tables create using CREATE TEMPORARY TABLE.\n**\n** If the P3 value is non-zero, then the row change count is incremented\n** by the number of rows in the table being cleared. If P3 is greater\n** than zero, then the value stored in register P3 is also incremented\n** by the number of rows in the table being cleared.\n**\n** See also: Destroy\n*/\ncase OP_Clear: {\n  i64 nChange;\n\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  nChange = 0;\n  assert( p->readOnly==0 );\n  assert( DbMaskTest(p->btreeMask, pOp->p2) );\n  rc = sqlite3BtreeClearTable(db->aDb[pOp->p2].pBt, (u32)pOp->p1, &nChange);\n  if( pOp->p3 ){\n    p->nChange += nChange;\n    if( pOp->p3>0 ){\n      assert( memIsValid(&aMem[pOp->p3]) );\n      memAboutToChange(p, &aMem[pOp->p3]);\n      aMem[pOp->p3].u.i += nChange;\n    }\n  }\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n\n/* Opcode: ResetSorter P1 * * * *\n**\n** Delete all contents from the ephemeral table or sorter\n** that is open on cursor P1.\n**\n** This opcode only works for cursors used for sorting and\n** opened with OP_OpenEphemeral or OP_SorterOpen.\n*/\ncase OP_ResetSorter: {\n  VdbeCursor *pC;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  if( isSorter(pC) ){\n    sqlite3VdbeSorterReset(db, pC->uc.pSorter);\n  }else{\n    assert( pC->eCurType==CURTYPE_BTREE );\n    assert( pC->isEphemeral );\n    rc = sqlite3BtreeClearTableOfCursor(pC->uc.pCursor);\n    if( rc ) goto abort_due_to_error;\n  }\n  break;\n}\n\n/* Opcode: CreateBtree P1 P2 P3 * *\n** Synopsis: r[P2]=root iDb=P1 flags=P3\n**\n** Allocate a new b-tree in the main database file if P1==0 or in the\n** TEMP database file if P1==1 or in an attached database if\n** P1>1.  The P3 argument must be 1 (BTREE_INTKEY) for a rowid table\n** it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.\n** The root page number of the new b-tree is stored in register P2.\n*/\ncase OP_CreateBtree: {          /* out2 */\n  Pgno pgno;\n  Db *pDb;\n\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  pOut = out2Prerelease(p, pOp);\n  pgno = 0;\n  assert( pOp->p3==BTREE_INTKEY || pOp->p3==BTREE_BLOBKEY );\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  assert( DbMaskTest(p->btreeMask, pOp->p1) );\n  assert( p->readOnly==0 );\n  pDb = &db->aDb[pOp->p1];\n  assert( pDb->pBt!=0 );\n  rc = sqlite3BtreeCreateTable(pDb->pBt, &pgno, pOp->p3);\n  if( rc ) goto abort_due_to_error;\n  pOut->u.i = pgno;\n  break;\n}\n\n/* Opcode: SqlExec P1 P2 * P4 *\n**\n** Run the SQL statement or statements specified in the P4 string.\n**\n** The P1 parameter is a bitmask of options:\n**\n**    0x0001     Disable Auth and Trace callbacks while the statements\n**               in P4 are running.\n**\n**    0x0002     Set db->nAnalysisLimit to P2 while the statements in\n**               P4 are running.\n**\n*/\ncase OP_SqlExec: {\n  char *zErr;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth;\n#endif\n  u8 mTrace;\n  int savedAnalysisLimit;\n\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  db->nSqlExec++;\n  zErr = 0;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  xAuth = db->xAuth;\n#endif\n  mTrace = db->mTrace;\n  savedAnalysisLimit = db->nAnalysisLimit;\n  if( pOp->p1 & 0x0001 ){\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    db->xAuth = 0;\n#endif\n    db->mTrace = 0;\n  }\n  if( pOp->p1 & 0x0002 ){\n    db->nAnalysisLimit = pOp->p2;\n  }\n  rc = sqlite3_exec(db, pOp->p4.z, 0, 0, &zErr);\n  db->nSqlExec--;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = xAuth;\n#endif\n  db->mTrace = mTrace;\n  db->nAnalysisLimit = savedAnalysisLimit;\n  if( zErr || rc ){\n    sqlite3VdbeError(p, \"%s\", zErr);\n    sqlite3_free(zErr);\n    if( rc==SQLITE_NOMEM ) goto no_mem;\n    goto abort_due_to_error;\n  }\n  break;\n}\n\n/* Opcode: ParseSchema P1 * * P4 *\n**\n** Read and parse all entries from the schema table of database P1\n** that match the WHERE clause P4.  If P4 is a NULL pointer, then the\n** entire schema for P1 is reparsed.\n**\n** This opcode invokes the parser to create a new virtual machine,\n** then runs the new virtual machine.  It is thus a re-entrant opcode.\n*/\ncase OP_ParseSchema: {\n  int iDb;\n  const char *zSchema;\n  char *zSql;\n  InitData initData;\n\n  /* Any prepared statement that invokes this opcode will hold mutexes\n  ** on every btree.  This is a prerequisite for invoking\n  ** sqlite3InitCallback().\n  */\n#ifdef SQLITE_DEBUG\n  for(iDb=0; iDb<db->nDb; iDb++){\n    assert( iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );\n  }\n#endif\n\n  iDb = pOp->p1;\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( DbHasProperty(db, iDb, DB_SchemaLoaded)\n           || db->mallocFailed\n           || (CORRUPT_DB && (db->flags & SQLITE_NoSchemaError)!=0) );\n\n#ifndef SQLITE_OMIT_ALTERTABLE\n  if( pOp->p4.z==0 ){\n    sqlite3SchemaClear(db->aDb[iDb].pSchema);\n    db->mDbFlags &= ~DBFLAG_SchemaKnownOk;\n    rc = sqlite3InitOne(db, iDb, &p->zErrMsg, pOp->p5);\n    db->mDbFlags |= DBFLAG_SchemaChange;\n    p->expired = 0;\n  }else\n#endif\n  {\n    zSchema = LEGACY_SCHEMA_TABLE;\n    initData.db = db;\n    initData.iDb = iDb;\n    initData.pzErrMsg = &p->zErrMsg;\n    initData.mInitFlags = 0;\n    initData.mxPage = sqlite3BtreeLastPage(db->aDb[iDb].pBt);\n    zSql = sqlite3MPrintf(db,\n       \"SELECT*FROM\\\"%w\\\".%s WHERE %s ORDER BY rowid\",\n       db->aDb[iDb].zDbSName, zSchema, pOp->p4.z);\n    if( zSql==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n    }else{\n      assert( db->init.busy==0 );\n      db->init.busy = 1;\n      initData.rc = SQLITE_OK;\n      initData.nInitRow = 0;\n      assert( !db->mallocFailed );\n      rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);\n      if( rc==SQLITE_OK ) rc = initData.rc;\n      if( rc==SQLITE_OK && initData.nInitRow==0 ){\n        /* The OP_ParseSchema opcode with a non-NULL P4 argument should parse\n        ** at least one SQL statement. Any less than that indicates that\n        ** the sqlite_schema table is corrupt. */\n        rc = SQLITE_CORRUPT_BKPT;\n      }\n      sqlite3DbFreeNN(db, zSql);\n      db->init.busy = 0;\n    }\n  }\n  if( rc ){\n    sqlite3ResetAllSchemasOfConnection(db);\n    if( rc==SQLITE_NOMEM ){\n      goto no_mem;\n    }\n    goto abort_due_to_error;\n  }\n  break;\n}\n\n#if !defined(SQLITE_OMIT_ANALYZE)\n/* Opcode: LoadAnalysis P1 * * * *\n**\n** Read the sqlite_stat1 table for database P1 and load the content\n** of that table into the internal index hash table.  This will cause\n** the analysis to be used when preparing all subsequent queries.\n*/\ncase OP_LoadAnalysis: {\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  rc = sqlite3AnalysisLoad(db, pOp->p1);\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif /* !defined(SQLITE_OMIT_ANALYZE) */\n\n/* Opcode: DropTable P1 * * P4 *\n**\n** Remove the internal (in-memory) data structures that describe\n** the table named P4 in database P1.  This is called after a table\n** is dropped from disk (using the Destroy opcode) in order to keep\n** the internal representation of the\n** schema consistent with what is on disk.\n*/\ncase OP_DropTable: {\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  sqlite3UnlinkAndDeleteTable(db, pOp->p1, pOp->p4.z);\n  break;\n}\n\n/* Opcode: DropIndex P1 * * P4 *\n**\n** Remove the internal (in-memory) data structures that describe\n** the index named P4 in database P1.  This is called after an index\n** is dropped from disk (using the Destroy opcode)\n** in order to keep the internal representation of the\n** schema consistent with what is on disk.\n*/\ncase OP_DropIndex: {\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  sqlite3UnlinkAndDeleteIndex(db, pOp->p1, pOp->p4.z);\n  break;\n}\n\n/* Opcode: DropTrigger P1 * * P4 *\n**\n** Remove the internal (in-memory) data structures that describe\n** the trigger named P4 in database P1.  This is called after a trigger\n** is dropped from disk (using the Destroy opcode) in order to keep\n** the internal representation of the\n** schema consistent with what is on disk.\n*/\ncase OP_DropTrigger: {\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  sqlite3UnlinkAndDeleteTrigger(db, pOp->p1, pOp->p4.z);\n  break;\n}\n\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n/* Opcode: IntegrityCk P1 P2 P3 P4 P5\n**\n** Do an analysis of the currently open database.  Store in\n** register (P1+1) the text of an error message describing any problems.\n** If no problems are found, store a NULL in register (P1+1).\n**\n** The register (P1) contains one less than the maximum number of allowed\n** errors.  At most reg(P1) errors will be reported.\n** In other words, the analysis stops as soon as reg(P1) errors are\n** seen.  Reg(P1) is updated with the number of errors remaining.\n**\n** The root page numbers of all tables in the database are integers\n** stored in P4_INTARRAY argument.\n**\n** If P5 is not zero, the check is done on the auxiliary database\n** file, not the main database file.\n**\n** This opcode is used to implement the integrity_check pragma.\n*/\ncase OP_IntegrityCk: {\n  int nRoot;      /* Number of tables to check.  (Number of root pages.) */\n  Pgno *aRoot;    /* Array of rootpage numbers for tables to be checked */\n  int nErr;       /* Number of errors reported */\n  char *z;        /* Text of the error report */\n  Mem *pnErr;     /* Register keeping track of errors remaining */\n\n  assert( p->bIsReader );\n  assert( pOp->p4type==P4_INTARRAY );\n  nRoot = pOp->p2;\n  aRoot = pOp->p4.ai;\n  assert( nRoot>0 );\n  assert( aRoot!=0 );\n  assert( aRoot[0]==(Pgno)nRoot );\n  assert( pOp->p1>0 && (pOp->p1+1)<=(p->nMem+1 - p->nCursor) );\n  pnErr = &aMem[pOp->p1];\n  assert( (pnErr->flags & MEM_Int)!=0 );\n  assert( (pnErr->flags & (MEM_Str|MEM_Blob))==0 );\n  pIn1 = &aMem[pOp->p1+1];\n  assert( pOp->p5<db->nDb );\n  assert( DbMaskTest(p->btreeMask, pOp->p5) );\n  rc = sqlite3BtreeIntegrityCheck(db, db->aDb[pOp->p5].pBt, &aRoot[1],\n      &aMem[pOp->p3], nRoot, (int)pnErr->u.i+1, &nErr, &z);\n  sqlite3VdbeMemSetNull(pIn1);\n  if( nErr==0 ){\n    assert( z==0 );\n  }else if( rc ){\n    sqlite3_free(z);\n    goto abort_due_to_error;\n  }else{\n    pnErr->u.i -= nErr-1;\n    sqlite3VdbeMemSetStr(pIn1, z, -1, SQLITE_UTF8, sqlite3_free);\n  }\n  UPDATE_MAX_BLOBSIZE(pIn1);\n  sqlite3VdbeChangeEncoding(pIn1, encoding);\n  goto check_for_interrupt;\n}\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n/* Opcode: RowSetAdd P1 P2 * * *\n** Synopsis: rowset(P1)=r[P2]\n**\n** Insert the integer value held by register P2 into a RowSet object\n** held in register P1.\n**\n** An assertion fails if P2 is not an integer.\n*/\ncase OP_RowSetAdd: {       /* in1, in2 */\n  pIn1 = &aMem[pOp->p1];\n  pIn2 = &aMem[pOp->p2];\n  assert( (pIn2->flags & MEM_Int)!=0 );\n  if( (pIn1->flags & MEM_Blob)==0 ){\n    if( sqlite3VdbeMemSetRowSet(pIn1) ) goto no_mem;\n  }\n  assert( sqlite3VdbeMemIsRowSet(pIn1) );\n  sqlite3RowSetInsert((RowSet*)pIn1->z, pIn2->u.i);\n  break;\n}\n\n/* Opcode: RowSetRead P1 P2 P3 * *\n** Synopsis: r[P3]=rowset(P1)\n**\n** Extract the smallest value from the RowSet object in P1\n** and put that value into register P3.\n** Or, if RowSet object P1 is initially empty, leave P3\n** unchanged and jump to instruction P2.\n*/\ncase OP_RowSetRead: {       /* jump, in1, out3 */\n  i64 val;\n\n  pIn1 = &aMem[pOp->p1];\n  assert( (pIn1->flags & MEM_Blob)==0 || sqlite3VdbeMemIsRowSet(pIn1) );\n  if( (pIn1->flags & MEM_Blob)==0\n   || sqlite3RowSetNext((RowSet*)pIn1->z, &val)==0\n  ){\n    /* The boolean index is empty */\n    sqlite3VdbeMemSetNull(pIn1);\n    VdbeBranchTaken(1,2);\n    goto jump_to_p2_and_check_for_interrupt;\n  }else{\n    /* A value was pulled from the index */\n    VdbeBranchTaken(0,2);\n    sqlite3VdbeMemSetInt64(&aMem[pOp->p3], val);\n  }\n  goto check_for_interrupt;\n}\n\n/* Opcode: RowSetTest P1 P2 P3 P4\n** Synopsis: if r[P3] in rowset(P1) goto P2\n**\n** Register P3 is assumed to hold a 64-bit integer value. If register P1\n** contains a RowSet object and that RowSet object contains\n** the value held in P3, jump to register P2. Otherwise, insert the\n** integer in P3 into the RowSet and continue on to the\n** next opcode.\n**\n** The RowSet object is optimized for the case where sets of integers\n** are inserted in distinct phases, which each set contains no duplicates.\n** Each set is identified by a unique P4 value. The first set\n** must have P4==0, the final set must have P4==-1, and for all other sets\n** must have P4>0.\n**\n** This allows optimizations: (a) when P4==0 there is no need to test\n** the RowSet object for P3, as it is guaranteed not to contain it,\n** (b) when P4==-1 there is no need to insert the value, as it will\n** never be tested for, and (c) when a value that is part of set X is\n** inserted, there is no need to search to see if the same value was\n** previously inserted as part of set X (only if it was previously\n** inserted as part of some other set).\n*/\ncase OP_RowSetTest: {                     /* jump, in1, in3 */\n  int iSet;\n  int exists;\n\n  pIn1 = &aMem[pOp->p1];\n  pIn3 = &aMem[pOp->p3];\n  iSet = pOp->p4.i;\n  assert( pIn3->flags&MEM_Int );\n\n  /* If there is anything other than a rowset object in memory cell P1,\n  ** delete it now and initialize P1 with an empty rowset\n  */\n  if( (pIn1->flags & MEM_Blob)==0 ){\n    if( sqlite3VdbeMemSetRowSet(pIn1) ) goto no_mem;\n  }\n  assert( sqlite3VdbeMemIsRowSet(pIn1) );\n  assert( pOp->p4type==P4_INT32 );\n  assert( iSet==-1 || iSet>=0 );\n  if( iSet ){\n    exists = sqlite3RowSetTest((RowSet*)pIn1->z, iSet, pIn3->u.i);\n    VdbeBranchTaken(exists!=0,2);\n    if( exists ) goto jump_to_p2;\n  }\n  if( iSet>=0 ){\n    sqlite3RowSetInsert((RowSet*)pIn1->z, pIn3->u.i);\n  }\n  break;\n}\n\n\n#ifndef SQLITE_OMIT_TRIGGER\n\n/* Opcode: Program P1 P2 P3 P4 P5\n**\n** Execute the trigger program passed as P4 (type P4_SUBPROGRAM).\n**\n** P1 contains the address of the memory cell that contains the first memory\n** cell in an array of values used as arguments to the sub-program. P2\n** contains the address to jump to if the sub-program throws an IGNORE\n** exception using the RAISE() function. P2 might be zero, if there is\n** no possibility that an IGNORE exception will be raised.\n** Register P3 contains the address\n** of a memory cell in this (the parent) VM that is used to allocate the\n** memory required by the sub-vdbe at runtime.\n**\n** P4 is a pointer to the VM containing the trigger program.\n**\n** If P5 is non-zero, then recursive program invocation is enabled.\n*/\ncase OP_Program: {        /* jump0 */\n  int nMem;               /* Number of memory registers for sub-program */\n  i64 nByte;              /* Bytes of runtime space required for sub-program */\n  Mem *pRt;               /* Register to allocate runtime space */\n  Mem *pMem;              /* Used to iterate through memory cells */\n  Mem *pEnd;              /* Last memory cell in new array */\n  VdbeFrame *pFrame;      /* New vdbe frame to execute in */\n  SubProgram *pProgram;   /* Sub-program to execute */\n  void *t;                /* Token identifying trigger */\n\n  pProgram = pOp->p4.pProgram;\n  pRt = &aMem[pOp->p3];\n  assert( pProgram->nOp>0 );\n\n  /* If the p5 flag is clear, then recursive invocation of triggers is\n  ** disabled for backwards compatibility (p5 is set if this sub-program\n  ** is really a trigger, not a foreign key action, and the flag set\n  ** and cleared by the \"PRAGMA recursive_triggers\" command is clear).\n  **\n  ** It is recursive invocation of triggers, at the SQL level, that is\n  ** disabled. In some cases a single trigger may generate more than one\n  ** SubProgram (if the trigger may be executed with more than one different\n  ** ON CONFLICT algorithm). SubProgram structures associated with a\n  ** single trigger all have the same value for the SubProgram.token\n  ** variable.  */\n  if( pOp->p5 ){\n    t = pProgram->token;\n    for(pFrame=p->pFrame; pFrame && pFrame->token!=t; pFrame=pFrame->pParent);\n    if( pFrame ) break;\n  }\n\n  if( p->nFrame>=db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){\n    rc = SQLITE_ERROR;\n    sqlite3VdbeError(p, \"too many levels of trigger recursion\");\n    goto abort_due_to_error;\n  }\n\n  /* Register pRt is used to store the memory required to save the state\n  ** of the current program, and the memory required at runtime to execute\n  ** the trigger program. If this trigger has been fired before, then pRt\n  ** is already allocated. Otherwise, it must be initialized.  */\n  if( (pRt->flags&MEM_Blob)==0 ){\n    /* SubProgram.nMem is set to the number of memory cells used by the\n    ** program stored in SubProgram.aOp. As well as these, one memory\n    ** cell is required for each cursor used by the program. Set local\n    ** variable nMem (and later, VdbeFrame.nChildMem) to this value.\n    */\n    nMem = pProgram->nMem + pProgram->nCsr;\n    assert( nMem>0 );\n    if( pProgram->nCsr==0 ) nMem++;\n    nByte = ROUND8(sizeof(VdbeFrame))\n              + nMem * sizeof(Mem)\n              + pProgram->nCsr * sizeof(VdbeCursor*)\n              + (7 + (i64)pProgram->nOp)/8;\n    pFrame = sqlite3DbMallocZero(db, nByte);\n    if( !pFrame ){\n      goto no_mem;\n    }\n    sqlite3VdbeMemRelease(pRt);\n    pRt->flags = MEM_Blob|MEM_Dyn;\n    pRt->z = (char*)pFrame;\n    pRt->n = (int)nByte;\n    pRt->xDel = sqlite3VdbeFrameMemDel;\n\n    pFrame->v = p;\n    pFrame->nChildMem = nMem;\n    pFrame->nChildCsr = pProgram->nCsr;\n    pFrame->pc = (int)(pOp - aOp);\n    pFrame->aMem = p->aMem;\n    pFrame->nMem = p->nMem;\n    pFrame->apCsr = p->apCsr;\n    pFrame->nCursor = p->nCursor;\n    pFrame->aOp = p->aOp;\n    pFrame->nOp = p->nOp;\n    pFrame->token = pProgram->token;\n#ifdef SQLITE_DEBUG\n    pFrame->iFrameMagic = SQLITE_FRAME_MAGIC;\n#endif\n\n    pEnd = &VdbeFrameMem(pFrame)[pFrame->nChildMem];\n    for(pMem=VdbeFrameMem(pFrame); pMem!=pEnd; pMem++){\n      pMem->flags = MEM_Undefined;\n      pMem->db = db;\n    }\n  }else{\n    pFrame = (VdbeFrame*)pRt->z;\n    assert( pRt->xDel==sqlite3VdbeFrameMemDel );\n    assert( pProgram->nMem+pProgram->nCsr==pFrame->nChildMem\n        || (pProgram->nCsr==0 && pProgram->nMem+1==pFrame->nChildMem) );\n    assert( pProgram->nCsr==pFrame->nChildCsr );\n    assert( (int)(pOp - aOp)==pFrame->pc );\n  }\n\n  p->nFrame++;\n  pFrame->pParent = p->pFrame;\n  pFrame->lastRowid = db->lastRowid;\n  pFrame->nChange = p->nChange;\n  pFrame->nDbChange = p->db->nChange;\n  assert( pFrame->pAuxData==0 );\n  pFrame->pAuxData = p->pAuxData;\n  p->pAuxData = 0;\n  p->nChange = 0;\n  p->pFrame = pFrame;\n  p->aMem = aMem = VdbeFrameMem(pFrame);\n  p->nMem = pFrame->nChildMem;\n  p->nCursor = (u16)pFrame->nChildCsr;\n  p->apCsr = (VdbeCursor **)&aMem[p->nMem];\n  pFrame->aOnce = (u8*)&p->apCsr[pProgram->nCsr];\n  memset(pFrame->aOnce, 0, (pProgram->nOp + 7)/8);\n  p->aOp = aOp = pProgram->aOp;\n  p->nOp = pProgram->nOp;\n#ifdef SQLITE_DEBUG\n  /* Verify that second and subsequent executions of the same trigger do not\n  ** try to reuse register values from the first use. */\n  {\n    int i;\n    for(i=0; i<p->nMem; i++){\n      aMem[i].pScopyFrom = 0;  /* Prevent false-positive AboutToChange() errs */\n      MemSetTypeFlag(&aMem[i], MEM_Undefined); /* Fault if this reg is reused */\n    }\n  }\n#endif\n  pOp = &aOp[-1];\n  goto check_for_interrupt;\n}\n\n/* Opcode: Param P1 P2 * * *\n**\n** This opcode is only ever present in sub-programs called via the\n** OP_Program instruction. Copy a value currently stored in a memory\n** cell of the calling (parent) frame to cell P2 in the current frames\n** address space. This is used by trigger programs to access the new.*\n** and old.* values.\n**\n** The address of the cell in the parent frame is determined by adding\n** the value of the P1 argument to the value of the P1 argument to the\n** calling OP_Program instruction.\n*/\ncase OP_Param: {           /* out2 */\n  VdbeFrame *pFrame;\n  Mem *pIn;\n  pOut = out2Prerelease(p, pOp);\n  pFrame = p->pFrame;\n  pIn = &pFrame->aMem[pOp->p1 + pFrame->aOp[pFrame->pc].p1];\n  sqlite3VdbeMemShallowCopy(pOut, pIn, MEM_Ephem);\n  break;\n}\n\n#endif /* #ifndef SQLITE_OMIT_TRIGGER */\n\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n/* Opcode: FkCounter P1 P2 * * *\n** Synopsis: fkctr[P1]+=P2\n**\n** Increment a \"constraint counter\" by P2 (P2 may be negative or positive).\n** If P1 is non-zero, the database constraint counter is incremented\n** (deferred foreign key constraints). Otherwise, if P1 is zero, the\n** statement counter is incremented (immediate foreign key constraints).\n*/\ncase OP_FkCounter: {\n  if( pOp->p1 ){\n    db->nDeferredCons += pOp->p2;\n  }else{\n    if( db->flags & SQLITE_DeferFKs ){\n      db->nDeferredImmCons += pOp->p2;\n    }else{\n      p->nFkConstraint += pOp->p2;\n    }\n  }\n  break;\n}\n\n/* Opcode: FkIfZero P1 P2 * * *\n** Synopsis: if fkctr[P1]==0 goto P2\n**\n** This opcode tests if a foreign key constraint-counter is currently zero.\n** If so, jump to instruction P2. Otherwise, fall through to the next\n** instruction.\n**\n** If P1 is non-zero, then the jump is taken if the database constraint-counter\n** is zero (the one that counts deferred constraint violations). If P1 is\n** zero, the jump is taken if the statement constraint-counter is zero\n** (immediate foreign key constraint violations).\n*/\ncase OP_FkIfZero: {         /* jump */\n  if( pOp->p1 ){\n    VdbeBranchTaken(db->nDeferredCons==0 && db->nDeferredImmCons==0, 2);\n    if( db->nDeferredCons==0 && db->nDeferredImmCons==0 ) goto jump_to_p2;\n  }else{\n    VdbeBranchTaken(p->nFkConstraint==0 && db->nDeferredImmCons==0, 2);\n    if( p->nFkConstraint==0 && db->nDeferredImmCons==0 ) goto jump_to_p2;\n  }\n  break;\n}\n#endif /* #ifndef SQLITE_OMIT_FOREIGN_KEY */\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n/* Opcode: MemMax P1 P2 * * *\n** Synopsis: r[P1]=max(r[P1],r[P2])\n**\n** P1 is a register in the root frame of this VM (the root frame is\n** different from the current frame if this instruction is being executed\n** within a sub-program). Set the value of register P1 to the maximum of\n** its current value and the value in register P2.\n**\n** This instruction throws an error if the memory cell is not initially\n** an integer.\n*/\ncase OP_MemMax: {        /* in2 */\n  VdbeFrame *pFrame;\n  if( p->pFrame ){\n    for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);\n    pIn1 = &pFrame->aMem[pOp->p1];\n  }else{\n    pIn1 = &aMem[pOp->p1];\n  }\n  assert( memIsValid(pIn1) );\n  sqlite3VdbeMemIntegerify(pIn1);\n  pIn2 = &aMem[pOp->p2];\n  sqlite3VdbeMemIntegerify(pIn2);\n  if( pIn1->u.i<pIn2->u.i){\n    pIn1->u.i = pIn2->u.i;\n  }\n  break;\n}\n#endif /* SQLITE_OMIT_AUTOINCREMENT */\n\n/* Opcode: IfPos P1 P2 P3 * *\n** Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2\n**\n** Register P1 must contain an integer.\n** If the value of register P1 is 1 or greater, subtract P3 from the\n** value in P1 and jump to P2.\n**\n** If the initial value of register P1 is less than 1, then the\n** value is unchanged and control passes through to the next instruction.\n*/\ncase OP_IfPos: {        /* jump, in1 */\n  pIn1 = &aMem[pOp->p1];\n  assert( pIn1->flags&MEM_Int );\n  VdbeBranchTaken( pIn1->u.i>0, 2);\n  if( pIn1->u.i>0 ){\n    pIn1->u.i -= pOp->p3;\n    goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: OffsetLimit P1 P2 P3 * *\n** Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)\n**\n** This opcode performs a commonly used computation associated with\n** LIMIT and OFFSET processing.  r[P1] holds the limit counter.  r[P3]\n** holds the offset counter.  The opcode computes the combined value\n** of the LIMIT and OFFSET and stores that value in r[P2].  The r[P2]\n** value computed is the total number of rows that will need to be\n** visited in order to complete the query.\n**\n** If r[P3] is zero or negative, that means there is no OFFSET\n** and r[P2] is set to be the value of the LIMIT, r[P1].\n**\n** if r[P1] is zero or negative, that means there is no LIMIT\n** and r[P2] is set to -1.\n**\n** Otherwise, r[P2] is set to the sum of r[P1] and r[P3].\n*/\ncase OP_OffsetLimit: {    /* in1, out2, in3 */\n  i64 x;\n  pIn1 = &aMem[pOp->p1];\n  pIn3 = &aMem[pOp->p3];\n  pOut = out2Prerelease(p, pOp);\n  assert( pIn1->flags & MEM_Int );\n  assert( pIn3->flags & MEM_Int );\n  x = pIn1->u.i;\n  if( x<=0 || sqlite3AddInt64(&x, pIn3->u.i>0?pIn3->u.i:0) ){\n    /* If the LIMIT is less than or equal to zero, loop forever.  This\n    ** is documented.  But also, if the LIMIT+OFFSET exceeds 2^63 then\n    ** also loop forever.  This is undocumented.  In fact, one could argue\n    ** that the loop should terminate.  But assuming 1 billion iterations\n    ** per second (far exceeding the capabilities of any current hardware)\n    ** it would take nearly 300 years to actually reach the limit.  So\n    ** looping forever is a reasonable approximation. */\n    pOut->u.i = -1;\n  }else{\n    pOut->u.i = x;\n  }\n  break;\n}\n\n/* Opcode: IfNotZero P1 P2 * * *\n** Synopsis: if r[P1]!=0 then r[P1]--, goto P2\n**\n** Register P1 must contain an integer.  If the content of register P1 is\n** initially greater than zero, then decrement the value in register P1.\n** If it is non-zero (negative or positive) and then also jump to P2.\n** If register P1 is initially zero, leave it unchanged and fall through.\n*/\ncase OP_IfNotZero: {        /* jump, in1 */\n  pIn1 = &aMem[pOp->p1];\n  assert( pIn1->flags&MEM_Int );\n  VdbeBranchTaken(pIn1->u.i<0, 2);\n  if( pIn1->u.i ){\n     if( pIn1->u.i>0 ) pIn1->u.i--;\n     goto jump_to_p2;\n  }\n  break;\n}\n\n/* Opcode: DecrJumpZero P1 P2 * * *\n** Synopsis: if (--r[P1])==0 goto P2\n**\n** Register P1 must hold an integer.  Decrement the value in P1\n** and jump to P2 if the new value is exactly zero.\n*/\ncase OP_DecrJumpZero: {      /* jump, in1 */\n  pIn1 = &aMem[pOp->p1];\n  assert( pIn1->flags&MEM_Int );\n  if( pIn1->u.i>SMALLEST_INT64 ) pIn1->u.i--;\n  VdbeBranchTaken(pIn1->u.i==0, 2);\n  if( pIn1->u.i==0 ) goto jump_to_p2;\n  break;\n}\n\n\n/* Opcode: AggStep * P2 P3 P4 P5\n** Synopsis: accum=r[P3] step(r[P2@P5])\n**\n** Execute the xStep function for an aggregate.\n** The function has P5 arguments.  P4 is a pointer to the\n** FuncDef structure that specifies the function.  Register P3 is the\n** accumulator.\n**\n** The P5 arguments are taken from register P2 and its\n** successors.\n*/\n/* Opcode: AggInverse * P2 P3 P4 P5\n** Synopsis: accum=r[P3] inverse(r[P2@P5])\n**\n** Execute the xInverse function for an aggregate.\n** The function has P5 arguments.  P4 is a pointer to the\n** FuncDef structure that specifies the function.  Register P3 is the\n** accumulator.\n**\n** The P5 arguments are taken from register P2 and its\n** successors.\n*/\n/* Opcode: AggStep1 P1 P2 P3 P4 P5\n** Synopsis: accum=r[P3] step(r[P2@P5])\n**\n** Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an\n** aggregate.  The function has P5 arguments.  P4 is a pointer to the\n** FuncDef structure that specifies the function.  Register P3 is the\n** accumulator.\n**\n** The P5 arguments are taken from register P2 and its\n** successors.\n**\n** This opcode is initially coded as OP_AggStep0.  On first evaluation,\n** the FuncDef stored in P4 is converted into an sqlite3_context and\n** the opcode is changed.  In this way, the initialization of the\n** sqlite3_context only happens once, instead of on each call to the\n** step function.\n*/\ncase OP_AggInverse:\ncase OP_AggStep: {\n  int n;\n  sqlite3_context *pCtx;\n  u64 nAlloc;\n\n  assert( pOp->p4type==P4_FUNCDEF );\n  n = pOp->p5;\n  assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );\n  assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem+1 - p->nCursor)+1) );\n  assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );\n\n  /* Allocate space for (a) the context object and (n-1) extra pointers\n  ** to append to the sqlite3_context.argv[1] array, and (b) a memory\n  ** cell in which to store the accumulation. Be careful that the memory\n  ** cell is 8-byte aligned, even on platforms where a pointer is 32-bits.\n  **\n  ** Note: We could avoid this by using a regular memory cell from aMem[] for\n  ** the accumulator, instead of allocating one here. */\n  nAlloc = ROUND8P( SZ_CONTEXT(n) );\n  pCtx = sqlite3DbMallocRawNN(db, nAlloc + sizeof(Mem));\n  if( pCtx==0 ) goto no_mem;\n  pCtx->pOut = (Mem*)((u8*)pCtx + nAlloc);\n  assert( EIGHT_BYTE_ALIGNMENT(pCtx->pOut) );\n\n  sqlite3VdbeMemInit(pCtx->pOut, db, MEM_Null);\n  pCtx->pMem = 0;\n  pCtx->pFunc = pOp->p4.pFunc;\n  pCtx->iOp = (int)(pOp - aOp);\n  pCtx->pVdbe = p;\n  pCtx->skipFlag = 0;\n  pCtx->isError = 0;\n  pCtx->enc = encoding;\n  pCtx->argc = n;\n  pOp->p4type = P4_FUNCCTX;\n  pOp->p4.pCtx = pCtx;\n\n  /* OP_AggInverse must have P1==1 and OP_AggStep must have P1==0 */\n  assert( pOp->p1==(pOp->opcode==OP_AggInverse) );\n\n  pOp->opcode = OP_AggStep1;\n  /* Fall through into OP_AggStep */\n  /* no break */ deliberate_fall_through\n}\ncase OP_AggStep1: {\n  int i;\n  sqlite3_context *pCtx;\n  Mem *pMem;\n\n  assert( pOp->p4type==P4_FUNCCTX );\n  pCtx = pOp->p4.pCtx;\n  pMem = &aMem[pOp->p3];\n\n#ifdef SQLITE_DEBUG\n  if( pOp->p1 ){\n    /* This is an OP_AggInverse call.  Verify that xStep has always\n    ** been called at least once prior to any xInverse call. */\n    assert( pMem->uTemp==0x1122e0e3 );\n  }else{\n    /* This is an OP_AggStep call.  Mark it as such. */\n    pMem->uTemp = 0x1122e0e3;\n  }\n#endif\n\n  /* If this function is inside of a trigger, the register array in aMem[]\n  ** might change from one evaluation to the next.  The next block of code\n  ** checks to see if the register array has changed, and if so it\n  ** reinitializes the relevant parts of the sqlite3_context object */\n  if( pCtx->pMem != pMem ){\n    pCtx->pMem = pMem;\n    for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];\n  }\n\n#ifdef SQLITE_DEBUG\n  for(i=0; i<pCtx->argc; i++){\n    assert( memIsValid(pCtx->argv[i]) );\n    REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);\n  }\n#endif\n\n  pMem->n++;\n  assert( pCtx->pOut->flags==MEM_Null );\n  assert( pCtx->isError==0 );\n  assert( pCtx->skipFlag==0 );\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( pOp->p1 ){\n    (pCtx->pFunc->xInverse)(pCtx,pCtx->argc,pCtx->argv);\n  }else\n#endif\n  (pCtx->pFunc->xSFunc)(pCtx,pCtx->argc,pCtx->argv); /* IMP: R-24505-23230 */\n\n  if( pCtx->isError ){\n    if( pCtx->isError>0 ){\n      sqlite3VdbeError(p, \"%s\", sqlite3_value_text(pCtx->pOut));\n      rc = pCtx->isError;\n    }\n    if( pCtx->skipFlag ){\n      assert( pOp[-1].opcode==OP_CollSeq );\n      i = pOp[-1].p1;\n      if( i ) sqlite3VdbeMemSetInt64(&aMem[i], 1);\n      pCtx->skipFlag = 0;\n    }\n    sqlite3VdbeMemRelease(pCtx->pOut);\n    pCtx->pOut->flags = MEM_Null;\n    pCtx->isError = 0;\n    if( rc ) goto abort_due_to_error;\n  }\n  assert( pCtx->pOut->flags==MEM_Null );\n  assert( pCtx->skipFlag==0 );\n  break;\n}\n\n/* Opcode: AggFinal P1 P2 * P4 *\n** Synopsis: accum=r[P1] N=P2\n**\n** P1 is the memory location that is the accumulator for an aggregate\n** or window function.  Execute the finalizer function\n** for an aggregate and store the result in P1.\n**\n** P2 is the number of arguments that the step function takes and\n** P4 is a pointer to the FuncDef for this function.  The P2\n** argument is not used by this opcode.  It is only there to disambiguate\n** functions that can take varying numbers of arguments.  The\n** P4 argument is only needed for the case where\n** the step function was not previously called.\n*/\n/* Opcode: AggValue * P2 P3 P4 *\n** Synopsis: r[P3]=value N=P2\n**\n** Invoke the xValue() function and store the result in register P3.\n**\n** P2 is the number of arguments that the step function takes and\n** P4 is a pointer to the FuncDef for this function.  The P2\n** argument is not used by this opcode.  It is only there to disambiguate\n** functions that can take varying numbers of arguments.  The\n** P4 argument is only needed for the case where\n** the step function was not previously called.\n*/\ncase OP_AggValue:\ncase OP_AggFinal: {\n  Mem *pMem;\n  assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );\n  assert( pOp->p3==0 || pOp->opcode==OP_AggValue );\n  pMem = &aMem[pOp->p1];\n  assert( (pMem->flags & ~(MEM_Null|MEM_Agg))==0 );\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( pOp->p3 ){\n    memAboutToChange(p, &aMem[pOp->p3]);\n    rc = sqlite3VdbeMemAggValue(pMem, &aMem[pOp->p3], pOp->p4.pFunc);\n    pMem = &aMem[pOp->p3];\n  }else\n#endif\n  {\n    rc = sqlite3VdbeMemFinalize(pMem, pOp->p4.pFunc);\n  }\n\n  if( rc ){\n    sqlite3VdbeError(p, \"%s\", sqlite3_value_text(pMem));\n    goto abort_due_to_error;\n  }\n  sqlite3VdbeChangeEncoding(pMem, encoding);\n  UPDATE_MAX_BLOBSIZE(pMem);\n  REGISTER_TRACE((int)(pMem-aMem), pMem);\n  break;\n}\n\n#ifndef SQLITE_OMIT_WAL\n/* Opcode: Checkpoint P1 P2 P3 * *\n**\n** Checkpoint database P1. This is a no-op if P1 is not currently in\n** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL,\n** RESTART, or TRUNCATE.  Write 1 or 0 into mem[P3] if the checkpoint returns\n** SQLITE_BUSY or not, respectively.  Write the number of pages in the\n** WAL after the checkpoint into mem[P3+1] and the number of pages\n** in the WAL that have been checkpointed after the checkpoint\n** completes into mem[P3+2].  However on an error, mem[P3+1] and\n** mem[P3+2] are initialized to -1.\n*/\ncase OP_Checkpoint: {\n  int i;                          /* Loop counter */\n  int aRes[3];                    /* Results */\n  Mem *pMem;                      /* Write results here */\n\n  assert( p->readOnly==0 );\n  aRes[0] = 0;\n  aRes[1] = aRes[2] = -1;\n  assert( pOp->p2==SQLITE_CHECKPOINT_PASSIVE\n       || pOp->p2==SQLITE_CHECKPOINT_FULL\n       || pOp->p2==SQLITE_CHECKPOINT_RESTART\n       || pOp->p2==SQLITE_CHECKPOINT_TRUNCATE\n       || pOp->p2==SQLITE_CHECKPOINT_NOOP\n  );\n  rc = sqlite3Checkpoint(db, pOp->p1, pOp->p2, &aRes[1], &aRes[2]);\n  if( rc ){\n    if( rc!=SQLITE_BUSY ) goto abort_due_to_error;\n    rc = SQLITE_OK;\n    aRes[0] = 1;\n  }\n  for(i=0, pMem = &aMem[pOp->p3]; i<3; i++, pMem++){\n    sqlite3VdbeMemSetInt64(pMem, (i64)aRes[i]);\n  }\n  break;\n};\n#endif\n\n#ifndef SQLITE_OMIT_PRAGMA\n/* Opcode: JournalMode P1 P2 P3 * *\n**\n** Change the journal mode of database P1 to P3. P3 must be one of the\n** PAGER_JOURNALMODE_XXX values. If changing between the various rollback\n** modes (delete, truncate, persist, off and memory), this is a simple\n** operation. No IO is required.\n**\n** If changing into or out of WAL mode the procedure is more complicated.\n**\n** Write a string containing the final journal-mode to register P2.\n*/\ncase OP_JournalMode: {    /* out2 */\n  Btree *pBt;                     /* Btree to change journal mode of */\n  Pager *pPager;                  /* Pager associated with pBt */\n  int eNew;                       /* New journal mode */\n  int eOld;                       /* The old journal mode */\n#ifndef SQLITE_OMIT_WAL\n  const char *zFilename;          /* Name of database file for pPager */\n#endif\n\n  pOut = out2Prerelease(p, pOp);\n  eNew = pOp->p3;\n  assert( eNew==PAGER_JOURNALMODE_DELETE\n       || eNew==PAGER_JOURNALMODE_TRUNCATE\n       || eNew==PAGER_JOURNALMODE_PERSIST\n       || eNew==PAGER_JOURNALMODE_OFF\n       || eNew==PAGER_JOURNALMODE_MEMORY\n       || eNew==PAGER_JOURNALMODE_WAL\n       || eNew==PAGER_JOURNALMODE_QUERY\n  );\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  assert( p->readOnly==0 );\n\n  pBt = db->aDb[pOp->p1].pBt;\n  pPager = sqlite3BtreePager(pBt);\n  eOld = sqlite3PagerGetJournalMode(pPager);\n  if( eNew==PAGER_JOURNALMODE_QUERY ) eNew = eOld;\n  assert( sqlite3BtreeHoldsMutex(pBt) );\n  if( !sqlite3PagerOkToChangeJournalMode(pPager) ) eNew = eOld;\n\n#ifndef SQLITE_OMIT_WAL\n  zFilename = sqlite3PagerFilename(pPager, 1);\n\n  /* Do not allow a transition to journal_mode=WAL for a database\n  ** in temporary storage or if the VFS does not support shared memory\n  */\n  if( eNew==PAGER_JOURNALMODE_WAL\n   && (sqlite3Strlen30(zFilename)==0           /* Temp file */\n       || !sqlite3PagerWalSupported(pPager))   /* No shared-memory support */\n  ){\n    eNew = eOld;\n  }\n\n  if( (eNew!=eOld)\n   && (eOld==PAGER_JOURNALMODE_WAL || eNew==PAGER_JOURNALMODE_WAL)\n  ){\n    if( !db->autoCommit || db->nVdbeRead>1 ){\n      rc = SQLITE_ERROR;\n      sqlite3VdbeError(p,\n          \"cannot change %s wal mode from within a transaction\",\n          (eNew==PAGER_JOURNALMODE_WAL ? \"into\" : \"out of\")\n      );\n      goto abort_due_to_error;\n    }else{\n\n      if( eOld==PAGER_JOURNALMODE_WAL ){\n        /* If leaving WAL mode, close the log file. If successful, the call\n        ** to PagerCloseWal() checkpoints and deletes the write-ahead-log\n        ** file. An EXCLUSIVE lock may still be held on the database file\n        ** after a successful return.\n        */\n        rc = sqlite3PagerCloseWal(pPager, db);\n        if( rc==SQLITE_OK ){\n          sqlite3PagerSetJournalMode(pPager, eNew);\n        }\n      }else if( eOld==PAGER_JOURNALMODE_MEMORY ){\n        /* Cannot transition directly from MEMORY to WAL.  Use mode OFF\n        ** as an intermediate */\n        sqlite3PagerSetJournalMode(pPager, PAGER_JOURNALMODE_OFF);\n      }\n\n      /* Open a transaction on the database file. Regardless of the journal\n      ** mode, this transaction always uses a rollback journal.\n      */\n      assert( sqlite3BtreeTxnState(pBt)!=SQLITE_TXN_WRITE );\n      if( rc==SQLITE_OK ){\n        rc = sqlite3BtreeSetVersion(pBt, (eNew==PAGER_JOURNALMODE_WAL ? 2 : 1));\n      }\n    }\n  }\n#endif /* ifndef SQLITE_OMIT_WAL */\n\n  if( rc ) eNew = eOld;\n  eNew = sqlite3PagerSetJournalMode(pPager, eNew);\n\n  pOut->flags = MEM_Str|MEM_Static|MEM_Term;\n  pOut->z = (char *)sqlite3JournalModename(eNew);\n  pOut->n = sqlite3Strlen30(pOut->z);\n  pOut->enc = SQLITE_UTF8;\n  sqlite3VdbeChangeEncoding(pOut, encoding);\n  if( rc ) goto abort_due_to_error;\n  break;\n};\n#endif /* SQLITE_OMIT_PRAGMA */\n\n#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)\n/* Opcode: Vacuum P1 P2 * * *\n**\n** Vacuum the entire database P1.  P1 is 0 for \"main\", and 2 or more\n** for an attached database.  The \"temp\" database may not be vacuumed.\n**\n** If P2 is not zero, then it is a register holding a string which is\n** the file into which the result of vacuum should be written.  When\n** P2 is zero, the vacuum overwrites the original database.\n*/\ncase OP_Vacuum: {\n  assert( p->readOnly==0 );\n  rc = sqlite3RunVacuum(&p->zErrMsg, db, pOp->p1,\n                        pOp->p2 ? &aMem[pOp->p2] : 0);\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif\n\n#if !defined(SQLITE_OMIT_AUTOVACUUM)\n/* Opcode: IncrVacuum P1 P2 * * *\n**\n** Perform a single step of the incremental vacuum procedure on\n** the P1 database. If the vacuum has finished, jump to instruction\n** P2. Otherwise, fall through to the next instruction.\n*/\ncase OP_IncrVacuum: {        /* jump */\n  Btree *pBt;\n\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  assert( DbMaskTest(p->btreeMask, pOp->p1) );\n  assert( p->readOnly==0 );\n  pBt = db->aDb[pOp->p1].pBt;\n  rc = sqlite3BtreeIncrVacuum(pBt);\n  VdbeBranchTaken(rc==SQLITE_DONE,2);\n  if( rc ){\n    if( rc!=SQLITE_DONE ) goto abort_due_to_error;\n    rc = SQLITE_OK;\n    goto jump_to_p2;\n  }\n  break;\n}\n#endif\n\n/* Opcode: Expire P1 P2 * * *\n**\n** Cause precompiled statements to expire.  When an expired statement\n** is executed using sqlite3_step() it will either automatically\n** reprepare itself (if it was originally created using sqlite3_prepare_v2())\n** or it will fail with SQLITE_SCHEMA.\n**\n** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,\n** then only the currently executing statement is expired.\n**\n** If P2 is 0, then SQL statements are expired immediately.  If P2 is 1,\n** then running SQL statements are allowed to continue to run to completion.\n** The P2==1 case occurs when a CREATE INDEX or similar schema change happens\n** that might help the statement run faster but which does not affect the\n** correctness of operation.\n*/\ncase OP_Expire: {\n  assert( pOp->p2==0 || pOp->p2==1 );\n  if( !pOp->p1 ){\n    sqlite3ExpirePreparedStatements(db, pOp->p2);\n  }else{\n    p->expired = pOp->p2+1;\n  }\n  break;\n}\n\n/* Opcode: CursorLock P1 * * * *\n**\n** Lock the btree to which cursor P1 is pointing so that the btree cannot be\n** written by an other cursor.\n*/\ncase OP_CursorLock: {\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  sqlite3BtreeCursorPin(pC->uc.pCursor);\n  break;\n}\n\n/* Opcode: CursorUnlock P1 * * * *\n**\n** Unlock the btree to which cursor P1 is pointing so that it can be\n** written by other cursors.\n*/\ncase OP_CursorUnlock: {\n  VdbeCursor *pC;\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  pC = p->apCsr[pOp->p1];\n  assert( pC!=0 );\n  assert( pC->eCurType==CURTYPE_BTREE );\n  sqlite3BtreeCursorUnpin(pC->uc.pCursor);\n  break;\n}\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/* Opcode: TableLock P1 P2 P3 P4 *\n** Synopsis: iDb=P1 root=P2 write=P3\n**\n** Obtain a lock on a particular table. This instruction is only used when\n** the shared-cache feature is enabled.\n**\n** P1 is the index of the database in sqlite3.aDb[] of the database\n** on which the lock is acquired.  A readlock is obtained if P3==0 or\n** a write lock if P3==1.\n**\n** P2 contains the root-page of the table to lock.\n**\n** P4 contains a pointer to the name of the table being locked. This is only\n** used to generate an error message if the lock cannot be obtained.\n*/\ncase OP_TableLock: {\n  u8 isWriteLock = (u8)pOp->p3;\n  if( isWriteLock || 0==(db->flags&SQLITE_ReadUncommit) ){\n    int p1 = pOp->p1;\n    assert( p1>=0 && p1<db->nDb );\n    assert( DbMaskTest(p->btreeMask, p1) );\n    assert( isWriteLock==0 || isWriteLock==1 );\n    rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);\n    if( rc ){\n      if( (rc&0xFF)==SQLITE_LOCKED ){\n        const char *z = pOp->p4.z;\n        sqlite3VdbeError(p, \"database table is locked: %s\", z);\n      }\n      goto abort_due_to_error;\n    }\n  }\n  break;\n}\n#endif /* SQLITE_OMIT_SHARED_CACHE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VBegin * * * P4 *\n**\n** P4 may be a pointer to an sqlite3_vtab structure. If so, call the\n** xBegin method for that table.\n**\n** Also, whether or not P4 is set, check that this is not being called from\n** within a callback to a virtual table xSync() method. If it is, the error\n** code will be set to SQLITE_LOCKED.\n*/\ncase OP_VBegin: {\n  VTable *pVTab;\n  pVTab = pOp->p4.pVtab;\n  rc = sqlite3VtabBegin(db, pVTab);\n  if( pVTab ) sqlite3VtabImportErrmsg(p, pVTab->pVtab);\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VCreate P1 P2 * * *\n**\n** P2 is a register that holds the name of a virtual table in database\n** P1. Call the xCreate method for that table.\n*/\ncase OP_VCreate: {\n  Mem sMem;          /* For storing the record being decoded */\n  const char *zTab;  /* Name of the virtual table */\n\n  memset(&sMem, 0, sizeof(sMem));\n  sMem.db = db;\n  /* Because P2 is always a static string, it is impossible for the\n  ** sqlite3VdbeMemCopy() to fail */\n  assert( (aMem[pOp->p2].flags & MEM_Str)!=0 );\n  assert( (aMem[pOp->p2].flags & MEM_Static)!=0 );\n  rc = sqlite3VdbeMemCopy(&sMem, &aMem[pOp->p2]);\n  assert( rc==SQLITE_OK );\n  zTab = (const char*)sqlite3_value_text(&sMem);\n  assert( zTab || db->mallocFailed );\n  if( zTab ){\n    rc = sqlite3VtabCallCreate(db, pOp->p1, zTab, &p->zErrMsg);\n  }\n  sqlite3VdbeMemRelease(&sMem);\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VDestroy P1 * * P4 *\n**\n** P4 is the name of a virtual table in database P1.  Call the xDestroy method\n** of that table.\n*/\ncase OP_VDestroy: {\n  db->nVDestroy++;\n  rc = sqlite3VtabCallDestroy(db, pOp->p1, pOp->p4.z);\n  db->nVDestroy--;\n  assert( p->errorAction==OE_Abort && p->usesStmtJournal );\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VOpen P1 * * P4 *\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** P1 is a cursor number.  This opcode opens a cursor to the virtual\n** table and stores that cursor in P1.\n*/\ncase OP_VOpen: {             /* ncycle */\n  VdbeCursor *pCur;\n  sqlite3_vtab_cursor *pVCur;\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n\n  assert( p->bIsReader );\n  pCur = p->apCsr[pOp->p1];\n  if( pCur!=0\n   && ALWAYS( pCur->eCurType==CURTYPE_VTAB )\n   && ALWAYS( pCur->uc.pVCur->pVtab==pOp->p4.pVtab->pVtab )\n  ){\n    /* This opcode is a no-op if the cursor is already open */\n    break;\n  }\n  pVCur = 0;\n  pVtab = pOp->p4.pVtab->pVtab;\n  if( pVtab==0 || NEVER(pVtab->pModule==0) ){\n    rc = SQLITE_LOCKED;\n    goto abort_due_to_error;\n  }\n  pModule = pVtab->pModule;\n  rc = pModule->xOpen(pVtab, &pVCur);\n  sqlite3VtabImportErrmsg(p, pVtab);\n  if( rc ) goto abort_due_to_error;\n\n  /* Initialize sqlite3_vtab_cursor base class */\n  pVCur->pVtab = pVtab;\n\n  /* Initialize vdbe cursor object */\n  pCur = allocateCursor(p, pOp->p1, 0, CURTYPE_VTAB);\n  if( pCur ){\n    pCur->uc.pVCur = pVCur;\n    pVtab->nRef++;\n  }else{\n    assert( db->mallocFailed );\n    pModule->xClose(pVCur);\n    goto no_mem;\n  }\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VCheck P1 P2 P3 P4 *\n**\n** P4 is a pointer to a Table object that is a virtual table in schema P1\n** that supports the xIntegrity() method.  This opcode runs the xIntegrity()\n** method for that virtual table, using P3 as the integer argument.  If\n** an error is reported back, the table name is prepended to the error\n** message and that message is stored in P2.  If no errors are seen,\n** register P2 is set to NULL.\n*/\ncase OP_VCheck: {             /* out2 */\n  Table *pTab;\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n  char *zErr = 0;\n\n  pOut = &aMem[pOp->p2];\n  sqlite3VdbeMemSetNull(pOut);  /* Innocent until proven guilty */\n  assert( pOp->p4type==P4_TABLEREF );\n  pTab = pOp->p4.pTab;\n  assert( pTab!=0 );\n  assert( pTab->nTabRef>0 );\n  assert( IsVirtual(pTab) );\n  if( pTab->u.vtab.p==0 ) break;\n  pVtab = pTab->u.vtab.p->pVtab;\n  assert( pVtab!=0 );\n  pModule = pVtab->pModule;\n  assert( pModule!=0 );\n  assert( pModule->iVersion>=4 );\n  assert( pModule->xIntegrity!=0 );\n  sqlite3VtabLock(pTab->u.vtab.p);\n  assert( pOp->p1>=0 && pOp->p1<db->nDb );\n  rc = pModule->xIntegrity(pVtab, db->aDb[pOp->p1].zDbSName, pTab->zName,\n                           pOp->p3, &zErr);\n  sqlite3VtabUnlock(pTab->u.vtab.p);\n  if( rc ){\n    sqlite3_free(zErr);\n    goto abort_due_to_error;\n  }\n  if( zErr ){\n    sqlite3VdbeMemSetStr(pOut, zErr, -1, SQLITE_UTF8, sqlite3_free);\n  }\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VInitIn P1 P2 P3 * *\n** Synopsis: r[P2]=ValueList(P1,P3)\n**\n** Set register P2 to be a pointer to a ValueList object for cursor P1\n** with cache register P3 and output register P3+1.  This ValueList object\n** can be used as the first argument to sqlite3_vtab_in_first() and\n** sqlite3_vtab_in_next() to extract all of the values stored in the P1\n** cursor.  Register P3 is used to hold the values returned by\n** sqlite3_vtab_in_first() and sqlite3_vtab_in_next().\n*/\ncase OP_VInitIn: {        /* out2, ncycle */\n  VdbeCursor *pC;         /* The cursor containing the RHS values */\n  ValueList *pRhs;        /* New ValueList object to put in reg[P2] */\n\n  pC = p->apCsr[pOp->p1];\n  pRhs = sqlite3_malloc64( sizeof(*pRhs) );\n  if( pRhs==0 ) goto no_mem;\n  pRhs->pCsr = pC->uc.pCursor;\n  pRhs->pOut = &aMem[pOp->p3];\n  pOut = out2Prerelease(p, pOp);\n  pOut->flags = MEM_Null;\n  sqlite3VdbeMemSetPointer(pOut, pRhs, \"ValueList\", sqlite3VdbeValueListFree);\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VFilter P1 P2 P3 P4 *\n** Synopsis: iplan=r[P3] zplan='P4'\n**\n** P1 is a cursor opened using VOpen.  P2 is an address to jump to if\n** the filtered result set is empty.\n**\n** P4 is either NULL or a string that was generated by the xBestIndex\n** method of the module.  The interpretation of the P4 string is left\n** to the module implementation.\n**\n** This opcode invokes the xFilter method on the virtual table specified\n** by P1.  The integer query plan parameter to xFilter is stored in register\n** P3. Register P3+1 stores the argc parameter to be passed to the\n** xFilter method. Registers P3+2..P3+1+argc are the argc\n** additional parameters which are passed to\n** xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.\n**\n** A jump is made to P2 if the result set after filtering would be empty.\n*/\ncase OP_VFilter: {   /* jump, ncycle */\n  int nArg;\n  int iQuery;\n  const sqlite3_module *pModule;\n  Mem *pQuery;\n  Mem *pArgc;\n  sqlite3_vtab_cursor *pVCur;\n  sqlite3_vtab *pVtab;\n  VdbeCursor *pCur;\n  int res;\n  int i;\n  Mem **apArg;\n\n  pQuery = &aMem[pOp->p3];\n  pArgc = &pQuery[1];\n  pCur = p->apCsr[pOp->p1];\n  assert( memIsValid(pQuery) );\n  REGISTER_TRACE(pOp->p3, pQuery);\n  assert( pCur!=0 );\n  assert( pCur->eCurType==CURTYPE_VTAB );\n  pVCur = pCur->uc.pVCur;\n  pVtab = pVCur->pVtab;\n  pModule = pVtab->pModule;\n\n  /* Grab the index number and argc parameters */\n  assert( (pQuery->flags&MEM_Int)!=0 && pArgc->flags==MEM_Int );\n  nArg = (int)pArgc->u.i;\n  iQuery = (int)pQuery->u.i;\n\n  /* Invoke the xFilter method */\n  apArg = p->apArg;\n  assert( nArg<=p->napArg );\n  for(i = 0; i<nArg; i++){\n    apArg[i] = &pArgc[i+1];\n  }\n  rc = pModule->xFilter(pVCur, iQuery, pOp->p4.z, nArg, apArg);\n  sqlite3VtabImportErrmsg(p, pVtab);\n  if( rc ) goto abort_due_to_error;\n  res = pModule->xEof(pVCur);\n  pCur->nullRow = 0;\n  VdbeBranchTaken(res!=0,2);\n  if( res ) goto jump_to_p2;\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VColumn P1 P2 P3 * P5\n** Synopsis: r[P3]=vcolumn(P2)\n**\n** Store in register P3 the value of the P2-th column of\n** the current row of the virtual-table of cursor P1.\n**\n** If the VColumn opcode is being used to fetch the value of\n** an unchanging column during an UPDATE operation, then the P5\n** value is OPFLAG_NOCHNG.  This will cause the sqlite3_vtab_nochange()\n** function to return true inside the xColumn method of the virtual\n** table implementation.  The P5 column might also contain other\n** bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are\n** unused by OP_VColumn.\n*/\ncase OP_VColumn: {           /* ncycle */\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n  Mem *pDest;\n  sqlite3_context sContext;\n  FuncDef nullFunc;\n\n  VdbeCursor *pCur = p->apCsr[pOp->p1];\n  assert( pCur!=0 );\n  assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );\n  pDest = &aMem[pOp->p3];\n  memAboutToChange(p, pDest);\n  if( pCur->nullRow ){\n    sqlite3VdbeMemSetNull(pDest);\n    break;\n  }\n  assert( pCur->eCurType==CURTYPE_VTAB );\n  pVtab = pCur->uc.pVCur->pVtab;\n  pModule = pVtab->pModule;\n  assert( pModule->xColumn );\n  memset(&sContext, 0, sizeof(sContext));\n  sContext.pOut = pDest;\n  sContext.enc = encoding;\n  nullFunc.pUserData = 0;\n  nullFunc.funcFlags = SQLITE_RESULT_SUBTYPE;\n  sContext.pFunc = &nullFunc;\n  assert( pOp->p5==OPFLAG_NOCHNG || pOp->p5==0 );\n  if( pOp->p5 & OPFLAG_NOCHNG ){\n    sqlite3VdbeMemSetNull(pDest);\n    pDest->flags = MEM_Null|MEM_Zero;\n    pDest->u.nZero = 0;\n  }else{\n    MemSetTypeFlag(pDest, MEM_Null);\n  }\n  rc = pModule->xColumn(pCur->uc.pVCur, &sContext, pOp->p2);\n  sqlite3VtabImportErrmsg(p, pVtab);\n  if( sContext.isError>0 ){\n    sqlite3VdbeError(p, \"%s\", sqlite3_value_text(pDest));\n    rc = sContext.isError;\n  }\n  sqlite3VdbeChangeEncoding(pDest, encoding);\n  REGISTER_TRACE(pOp->p3, pDest);\n  UPDATE_MAX_BLOBSIZE(pDest);\n\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VNext P1 P2 * * *\n**\n** Advance virtual table P1 to the next row in its result set and\n** jump to instruction P2.  Or, if the virtual table has reached\n** the end of its result set, then fall through to the next instruction.\n*/\ncase OP_VNext: {   /* jump, ncycle */\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n  int res;\n  VdbeCursor *pCur;\n\n  pCur = p->apCsr[pOp->p1];\n  assert( pCur!=0 );\n  assert( pCur->eCurType==CURTYPE_VTAB );\n  if( pCur->nullRow ){\n    break;\n  }\n  pVtab = pCur->uc.pVCur->pVtab;\n  pModule = pVtab->pModule;\n  assert( pModule->xNext );\n\n  /* Invoke the xNext() method of the module. There is no way for the\n  ** underlying implementation to return an error if one occurs during\n  ** xNext(). Instead, if an error occurs, true is returned (indicating that\n  ** data is available) and the error code returned when xColumn or\n  ** some other method is next invoked on the save virtual table cursor.\n  */\n  rc = pModule->xNext(pCur->uc.pVCur);\n  sqlite3VtabImportErrmsg(p, pVtab);\n  if( rc ) goto abort_due_to_error;\n  res = pModule->xEof(pCur->uc.pVCur);\n  VdbeBranchTaken(!res,2);\n  if( !res ){\n    /* If there is data, jump to P2 */\n    goto jump_to_p2_and_check_for_interrupt;\n  }\n  goto check_for_interrupt;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VRename P1 * * P4 *\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** This opcode invokes the corresponding xRename method. The value\n** in register P1 is passed as the zName argument to the xRename method.\n*/\ncase OP_VRename: {\n  sqlite3_vtab *pVtab;\n  Mem *pName;\n  int isLegacy;\n\n  isLegacy = (db->flags & SQLITE_LegacyAlter);\n  db->flags |= SQLITE_LegacyAlter;\n  pVtab = pOp->p4.pVtab->pVtab;\n  pName = &aMem[pOp->p1];\n  assert( pVtab->pModule->xRename );\n  assert( memIsValid(pName) );\n  assert( p->readOnly==0 );\n  REGISTER_TRACE(pOp->p1, pName);\n  assert( pName->flags & MEM_Str );\n  testcase( pName->enc==SQLITE_UTF8 );\n  testcase( pName->enc==SQLITE_UTF16BE );\n  testcase( pName->enc==SQLITE_UTF16LE );\n  rc = sqlite3VdbeChangeEncoding(pName, SQLITE_UTF8);\n  if( rc ) goto abort_due_to_error;\n  rc = pVtab->pModule->xRename(pVtab, pName->z);\n  if( isLegacy==0 ) db->flags &= ~(u64)SQLITE_LegacyAlter;\n  sqlite3VtabImportErrmsg(p, pVtab);\n  p->expired = 0;\n  if( rc ) goto abort_due_to_error;\n  break;\n}\n#endif\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VUpdate P1 P2 P3 P4 P5\n** Synopsis: data=r[P3@P2]\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** This opcode invokes the corresponding xUpdate method. P2 values\n** are contiguous memory cells starting at P3 to pass to the xUpdate\n** invocation. The value in register (P3+P2-1) corresponds to the\n** p2th element of the argv array passed to xUpdate.\n**\n** The xUpdate method will do a DELETE or an INSERT or both.\n** The argv[0] element (which corresponds to memory cell P3)\n** is the rowid of a row to delete.  If argv[0] is NULL then no\n** deletion occurs.  The argv[1] element is the rowid of the new\n** row.  This can be NULL to have the virtual table select the new\n** rowid for itself.  The subsequent elements in the array are\n** the values of columns in the new row.\n**\n** If P2==1 then no insert is performed.  argv[0] is the rowid of\n** a row to delete.\n**\n** P1 is a boolean flag. If it is set to true and the xUpdate call\n** is successful, then the value returned by sqlite3_last_insert_rowid()\n** is set to the value of the rowid for the row just inserted.\n**\n** P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to\n** apply in the case of a constraint failure on an insert or update.\n*/\ncase OP_VUpdate: {\n  sqlite3_vtab *pVtab;\n  const sqlite3_module *pModule;\n  int nArg;\n  int i;\n  sqlite_int64 rowid = 0;\n  Mem **apArg;\n  Mem *pX;\n\n  assert( pOp->p2==1        || pOp->p5==OE_Fail   || pOp->p5==OE_Rollback\n       || pOp->p5==OE_Abort || pOp->p5==OE_Ignore || pOp->p5==OE_Replace\n  );\n  assert( p->readOnly==0 );\n  if( db->mallocFailed ) goto no_mem;\n  sqlite3VdbeIncrWriteCounter(p, 0);\n  pVtab = pOp->p4.pVtab->pVtab;\n  if( pVtab==0 || NEVER(pVtab->pModule==0) ){\n    rc = SQLITE_LOCKED;\n    goto abort_due_to_error;\n  }\n  pModule = pVtab->pModule;\n  nArg = pOp->p2;\n  assert( pOp->p4type==P4_VTAB );\n  if( ALWAYS(pModule->xUpdate) ){\n    u8 vtabOnConflict = db->vtabOnConflict;\n    apArg = p->apArg;\n    pX = &aMem[pOp->p3];\n    assert( nArg<=p->napArg );\n    for(i=0; i<nArg; i++){\n      assert( memIsValid(pX) );\n      memAboutToChange(p, pX);\n      apArg[i] = pX;\n      pX++;\n    }\n    db->vtabOnConflict = pOp->p5;\n    rc = pModule->xUpdate(pVtab, nArg, apArg, &rowid);\n    db->vtabOnConflict = vtabOnConflict;\n    sqlite3VtabImportErrmsg(p, pVtab);\n    if( rc==SQLITE_OK && pOp->p1 ){\n      assert( nArg>1 && apArg[0] && (apArg[0]->flags&MEM_Null) );\n      db->lastRowid = rowid;\n    }\n    if( (rc&0xff)==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){\n      if( pOp->p5==OE_Ignore ){\n        rc = SQLITE_OK;\n      }else{\n        p->errorAction = ((pOp->p5==OE_Replace) ? OE_Abort : pOp->p5);\n      }\n    }else{\n      p->nChange++;\n    }\n    if( rc ) goto abort_due_to_error;\n  }\n  break;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef  SQLITE_OMIT_PAGER_PRAGMAS\n/* Opcode: Pagecount P1 P2 * * *\n**\n** Write the current number of pages in database P1 to memory cell P2.\n*/\ncase OP_Pagecount: {            /* out2 */\n  pOut = out2Prerelease(p, pOp);\n  pOut->u.i = sqlite3BtreeLastPage(db->aDb[pOp->p1].pBt);\n  break;\n}\n#endif\n\n\n#ifndef  SQLITE_OMIT_PAGER_PRAGMAS\n/* Opcode: MaxPgcnt P1 P2 P3 * *\n**\n** Try to set the maximum page count for database P1 to the value in P3.\n** Do not let the maximum page count fall below the current page count and\n** do not change the maximum page count value if P3==0.\n**\n** Store the maximum page count after the change in register P2.\n*/\ncase OP_MaxPgcnt: {            /* out2 */\n  unsigned int newMax;\n  Btree *pBt;\n\n  pOut = out2Prerelease(p, pOp);\n  pBt = db->aDb[pOp->p1].pBt;\n  newMax = 0;\n  if( pOp->p3 ){\n    newMax = sqlite3BtreeLastPage(pBt);\n    if( newMax < (unsigned)pOp->p3 ) newMax = (unsigned)pOp->p3;\n  }\n  pOut->u.i = sqlite3BtreeMaxPageCount(pBt, newMax);\n  break;\n}\n#endif\n\n/* Opcode: Function P1 P2 P3 P4 *\n** Synopsis: r[P3]=func(r[P2@NP])\n**\n** Invoke a user function (P4 is a pointer to an sqlite3_context object that\n** contains a pointer to the function to be run) with arguments taken\n** from register P2 and successors.  The number of arguments is in\n** the sqlite3_context object that P4 points to.\n** The result of the function is stored\n** in register P3.  Register P3 must not be one of the function inputs.\n**\n** P1 is a 32-bit bitmask indicating whether or not each argument to the\n** function was determined to be constant at compile time. If the first\n** argument was constant then bit 0 of P1 is set. This is used to determine\n** whether meta data associated with a user function argument using the\n** sqlite3_set_auxdata() API may be safely retained until the next\n** invocation of this opcode.\n**\n** See also: AggStep, AggFinal, PureFunc\n*/\n/* Opcode: PureFunc P1 P2 P3 P4 *\n** Synopsis: r[P3]=func(r[P2@NP])\n**\n** Invoke a user function (P4 is a pointer to an sqlite3_context object that\n** contains a pointer to the function to be run) with arguments taken\n** from register P2 and successors.  The number of arguments is in\n** the sqlite3_context object that P4 points to.\n** The result of the function is stored\n** in register P3.  Register P3 must not be one of the function inputs.\n**\n** P1 is a 32-bit bitmask indicating whether or not each argument to the\n** function was determined to be constant at compile time. If the first\n** argument was constant then bit 0 of P1 is set. This is used to determine\n** whether meta data associated with a user function argument using the\n** sqlite3_set_auxdata() API may be safely retained until the next\n** invocation of this opcode.\n**\n** This opcode works exactly like OP_Function.  The only difference is in\n** its name.  This opcode is used in places where the function must be\n** purely non-deterministic.  Some built-in date/time functions can be\n** either deterministic of non-deterministic, depending on their arguments.\n** When those function are used in a non-deterministic way, they will check\n** to see if they were called using OP_PureFunc instead of OP_Function, and\n** if they were, they throw an error.\n**\n** See also: AggStep, AggFinal, Function\n*/\ncase OP_PureFunc:              /* group */\ncase OP_Function: {            /* group */\n  int i;\n  sqlite3_context *pCtx;\n\n  assert( pOp->p4type==P4_FUNCCTX );\n  pCtx = pOp->p4.pCtx;\n\n  /* If this function is inside of a trigger, the register array in aMem[]\n  ** might change from one evaluation to the next.  The next block of code\n  ** checks to see if the register array has changed, and if so it\n  ** reinitializes the relevant parts of the sqlite3_context object */\n  pOut = &aMem[pOp->p3];\n  if( pCtx->pOut != pOut ){\n    pCtx->pVdbe = p;\n    pCtx->pOut = pOut;\n    pCtx->enc = encoding;\n    for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];\n  }\n  assert( pCtx->pVdbe==p );\n\n  memAboutToChange(p, pOut);\n#ifdef SQLITE_DEBUG\n  for(i=0; i<pCtx->argc; i++){\n    assert( memIsValid(pCtx->argv[i]) );\n    REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);\n  }\n#endif\n  MemSetTypeFlag(pOut, MEM_Null);\n  assert( pCtx->isError==0 );\n  (*pCtx->pFunc->xSFunc)(pCtx, pCtx->argc, pCtx->argv);/* IMP: R-24505-23230 */\n\n  /* If the function returned an error, throw an exception */\n  if( pCtx->isError ){\n    if( pCtx->isError>0 ){\n      sqlite3VdbeError(p, \"%s\", sqlite3_value_text(pOut));\n      rc = pCtx->isError;\n    }\n    sqlite3VdbeDeleteAuxData(db, &p->pAuxData, pCtx->iOp, pOp->p1);\n    pCtx->isError = 0;\n    if( rc ) goto abort_due_to_error;\n  }\n\n  assert( (pOut->flags&MEM_Str)==0\n       || pOut->enc==encoding\n       || db->mallocFailed );\n  assert( !sqlite3VdbeMemTooBig(pOut) );\n\n  REGISTER_TRACE(pOp->p3, pOut);\n  UPDATE_MAX_BLOBSIZE(pOut);\n  break;\n}\n\n/* Opcode: ClrSubtype P1 * * * *\n** Synopsis:  r[P1].subtype = 0\n**\n** Clear the subtype from register P1.\n*/\ncase OP_ClrSubtype: {   /* in1 */\n  pIn1 = &aMem[pOp->p1];\n  pIn1->flags &= ~MEM_Subtype;\n  break;\n}\n\n/* Opcode: GetSubtype P1 P2 * * *\n** Synopsis:  r[P2] = r[P1].subtype\n**\n** Extract the subtype value from register P1 and write that subtype\n** into register P2.  If P1 has no subtype, then P1 gets a NULL.\n*/\ncase OP_GetSubtype: {   /* in1 out2 */\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  if( pIn1->flags & MEM_Subtype ){\n    sqlite3VdbeMemSetInt64(pOut, pIn1->eSubtype);\n  }else{\n    sqlite3VdbeMemSetNull(pOut);\n  }\n  break;\n}\n\n/* Opcode: SetSubtype P1 P2 * * *\n** Synopsis:  r[P2].subtype = r[P1]\n**\n** Set the subtype value of register P2 to the integer from register P1.\n** If P1 is NULL, clear the subtype from p2.\n*/\ncase OP_SetSubtype: {   /* in1 out2 */\n  pIn1 = &aMem[pOp->p1];\n  pOut = &aMem[pOp->p2];\n  if( pIn1->flags & MEM_Null ){\n    pOut->flags &= ~MEM_Subtype;\n  }else{\n    assert( pIn1->flags & MEM_Int );\n    pOut->flags |= MEM_Subtype;\n    pOut->eSubtype = (u8)(pIn1->u.i & 0xff);\n  }\n  break;\n}\n\n/* Opcode: FilterAdd P1 * P3 P4 *\n** Synopsis: filter(P1) += key(P3@P4)\n**\n** Compute a hash on the P4 registers starting with r[P3] and\n** add that hash to the bloom filter contained in r[P1].\n*/\ncase OP_FilterAdd: {\n  u64 h;\n\n  assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );\n  pIn1 = &aMem[pOp->p1];\n  assert( pIn1->flags & MEM_Blob );\n  assert( pIn1->n>0 );\n  h = filterHash(aMem, pOp);\n#ifdef SQLITE_DEBUG\n  if( db->flags&SQLITE_VdbeTrace ){\n    int ii;\n    for(ii=pOp->p3; ii<pOp->p3+pOp->p4.i; ii++){\n      registerTrace(ii, &aMem[ii]);\n    }\n    printf(\"hash: %llu modulo %d -> %u\\n\", h, pIn1->n, (int)(h%pIn1->n));\n  }\n#endif\n  h %= (pIn1->n*8);\n  pIn1->z[h/8] |= 1<<(h&7);\n  break;\n}\n\n/* Opcode: Filter P1 P2 P3 P4 *\n** Synopsis: if key(P3@P4) not in filter(P1) goto P2\n**\n** Compute a hash on the key contained in the P4 registers starting\n** with r[P3].  Check to see if that hash is found in the\n** bloom filter hosted by register P1.  If it is not present then\n** maybe jump to P2.  Otherwise fall through.\n**\n** False negatives are harmless.  It is always safe to fall through,\n** even if the value is in the bloom filter.  A false negative causes\n** more CPU cycles to be used, but it should still yield the correct\n** answer.  However, an incorrect answer may well arise from a\n** false positive - if the jump is taken when it should fall through.\n*/\ncase OP_Filter: {          /* jump */\n  u64 h;\n\n  assert( pOp->p1>0 && pOp->p1<=(p->nMem+1 - p->nCursor) );\n  pIn1 = &aMem[pOp->p1];\n  assert( (pIn1->flags & MEM_Blob)!=0 );\n  assert( pIn1->n >= 1 );\n  h = filterHash(aMem, pOp);\n#ifdef SQLITE_DEBUG\n  if( db->flags&SQLITE_VdbeTrace ){\n    int ii;\n    for(ii=pOp->p3; ii<pOp->p3+pOp->p4.i; ii++){\n      registerTrace(ii, &aMem[ii]);\n    }\n    printf(\"hash: %llu modulo %d -> %u\\n\", h, pIn1->n, (int)(h%pIn1->n));\n  }\n#endif\n  h %= (pIn1->n*8);\n  if( (pIn1->z[h/8] & (1<<(h&7)))==0 ){\n    VdbeBranchTaken(1, 2);\n    p->aCounter[SQLITE_STMTSTATUS_FILTER_HIT]++;\n    goto jump_to_p2;\n  }else{\n    p->aCounter[SQLITE_STMTSTATUS_FILTER_MISS]++;\n    VdbeBranchTaken(0, 2);\n  }\n  break;\n}\n\n/* Opcode: Trace P1 P2 * P4 *\n**\n** Write P4 on the statement trace output if statement tracing is\n** enabled.\n**\n** Operand P1 must be 0x7fffffff and P2 must positive.\n*/\n/* Opcode: Init P1 P2 P3 P4 *\n** Synopsis: Start at P2\n**\n** Programs contain a single instance of this opcode as the very first\n** opcode.\n**\n** If tracing is enabled (by the sqlite3_trace()) interface, then\n** the UTF-8 string contained in P4 is emitted on the trace callback.\n** Or if P4 is blank, use the string returned by sqlite3_sql().\n**\n** If P2 is not zero, jump to instruction P2.\n**\n** Increment the value of P1 so that OP_Once opcodes will jump the\n** first time they are evaluated for this run.\n**\n** If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT\n** error is encountered.\n*/\ncase OP_Trace:\ncase OP_Init: {          /* jump0 */\n  int i;\n#ifndef SQLITE_OMIT_TRACE\n  char *zTrace;\n#endif\n\n  /* If the P4 argument is not NULL, then it must be an SQL comment string.\n  ** The \"--\" string is broken up to prevent false-positives with srcck1.c.\n  **\n  ** This assert() provides evidence for:\n  ** EVIDENCE-OF: R-50676-09860 The callback can compute the same text that\n  ** would have been returned by the legacy sqlite3_trace() interface by\n  ** using the X argument when X begins with \"--\" and invoking\n  ** sqlite3_expanded_sql(P) otherwise.\n  */\n  assert( pOp->p4.z==0 || strncmp(pOp->p4.z, \"-\" \"- \", 3)==0 );\n\n  /* OP_Init is always instruction 0 */\n  assert( pOp==p->aOp || pOp->opcode==OP_Trace );\n\n#ifndef SQLITE_OMIT_TRACE\n  if( (db->mTrace & (SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY))!=0\n   && p->minWriteFileFormat!=254  /* tag-20220401a */\n   && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0\n  ){\n#ifndef SQLITE_OMIT_DEPRECATED\n    if( db->mTrace & SQLITE_TRACE_LEGACY ){\n      char *z = sqlite3VdbeExpandSql(p, zTrace);\n      db->trace.xLegacy(db->pTraceArg, z);\n      sqlite3_free(z);\n    }else\n#endif\n    if( db->nVdbeExec>1 ){\n      char *z = sqlite3MPrintf(db, \"-- %s\", zTrace);\n      (void)db->trace.xV2(SQLITE_TRACE_STMT, db->pTraceArg, p, z);\n      sqlite3DbFree(db, z);\n    }else{\n      (void)db->trace.xV2(SQLITE_TRACE_STMT, db->pTraceArg, p, zTrace);\n    }\n  }\n#ifdef SQLITE_USE_FCNTL_TRACE\n  zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);\n  if( zTrace ){\n    int j;\n    for(j=0; j<db->nDb; j++){\n      if( DbMaskTest(p->btreeMask, j)==0 ) continue;\n      sqlite3_file_control(db, db->aDb[j].zDbSName, SQLITE_FCNTL_TRACE, zTrace);\n    }\n  }\n#endif /* SQLITE_USE_FCNTL_TRACE */\n#ifdef SQLITE_DEBUG\n  if( (db->flags & SQLITE_SqlTrace)!=0\n   && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0\n  ){\n    sqlite3DebugPrintf(\"SQL-trace: %s\\n\", zTrace);\n  }\n#endif /* SQLITE_DEBUG */\n#endif /* SQLITE_OMIT_TRACE */\n  assert( pOp->p2>0 );\n  if( pOp->p1>=sqlite3GlobalConfig.iOnceResetThreshold ){\n    if( pOp->opcode==OP_Trace ) break;\n    for(i=1; i<p->nOp; i++){\n      if( p->aOp[i].opcode==OP_Once ) p->aOp[i].p1 = 0;\n    }\n    pOp->p1 = 0;\n  }\n  pOp->p1++;\n  p->aCounter[SQLITE_STMTSTATUS_RUN]++;\n  goto jump_to_p2;\n}\n\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n/* Opcode: CursorHint P1 * * P4 *\n**\n** Provide a hint to cursor P1 that it only needs to return rows that\n** satisfy the Expr in P4.  TK_REGISTER terms in the P4 expression refer\n** to values currently held in registers.  TK_COLUMN terms in the P4\n** expression refer to columns in the b-tree to which cursor P1 is pointing.\n*/\ncase OP_CursorHint: {\n  VdbeCursor *pC;\n\n  assert( pOp->p1>=0 && pOp->p1<p->nCursor );\n  assert( pOp->p4type==P4_EXPR );\n  pC = p->apCsr[pOp->p1];\n  if( pC ){\n    assert( pC->eCurType==CURTYPE_BTREE );\n    sqlite3BtreeCursorHint(pC->uc.pCursor, BTREE_HINT_RANGE,\n                           pOp->p4.pExpr, aMem);\n  }\n  break;\n}\n#endif /* SQLITE_ENABLE_CURSOR_HINTS */\n\n#ifdef SQLITE_DEBUG\n/* Opcode:  Abortable   * * * * *\n**\n** Verify that an Abort can happen.  Assert if an Abort at this point\n** might cause database corruption.  This opcode only appears in debugging\n** builds.\n**\n** An Abort is safe if either there have been no writes, or if there is\n** an active statement journal.\n*/\ncase OP_Abortable: {\n  sqlite3VdbeAssertAbortable(p);\n  break;\n}\n#endif\n\n#ifdef SQLITE_DEBUG\n/* Opcode:  ReleaseReg   P1 P2 P3 * P5\n** Synopsis: release r[P1@P2] mask P3\n**\n** Release registers from service.  Any content that was in the\n** the registers is unreliable after this opcode completes.\n**\n** The registers released will be the P2 registers starting at P1,\n** except if bit ii of P3 set, then do not release register P1+ii.\n** In other words, P3 is a mask of registers to preserve.\n**\n** Releasing a register clears the Mem.pScopyFrom pointer.  That means\n** that if the content of the released register was set using OP_SCopy,\n** a change to the value of the source register for the OP_SCopy will no longer\n** generate an assertion fault in sqlite3VdbeMemAboutToChange().\n**\n** If P5 is set, then all released registers have their type set\n** to MEM_Undefined so that any subsequent attempt to read the released\n** register (before it is reinitialized) will generate an assertion fault.\n**\n** P5 ought to be set on every call to this opcode.\n** However, there are places in the code generator will release registers\n** before their are used, under the (valid) assumption that the registers\n** will not be reallocated for some other purpose before they are used and\n** hence are safe to release.\n**\n** This opcode is only available in testing and debugging builds.  It is\n** not generated for release builds.  The purpose of this opcode is to help\n** validate the generated bytecode.  This opcode does not actually contribute\n** to computing an answer.\n*/\ncase OP_ReleaseReg: {\n  Mem *pMem;\n  int i;\n  u32 constMask;\n  assert( pOp->p1>0 );\n  assert( pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1 );\n  pMem = &aMem[pOp->p1];\n  constMask = pOp->p3;\n  for(i=0; i<pOp->p2; i++, pMem++){\n    if( i>=32 || (constMask & MASKBIT32(i))==0 ){\n      pMem->pScopyFrom = 0;\n      if( i<32 && pOp->p5 ) MemSetTypeFlag(pMem, MEM_Undefined);\n    }\n  }\n  break;\n}\n#endif\n\n/* Opcode: Noop * * * * *\n**\n** Do nothing.  Continue downward to the next opcode.\n*/\n/* Opcode: Explain P1 P2 P3 P4 *\n**\n** This is the same as OP_Noop during normal query execution.  The\n** purpose of this opcode is to hold information about the query\n** plan for the purpose of EXPLAIN QUERY PLAN output.\n**\n** The P4 value is human-readable text that describes the query plan\n** element.  Something like \"SCAN t1\" or \"SEARCH t2 USING INDEX t2x1\".\n**\n** The P1 value is the ID of the current element and P2 is the parent\n** element for the case of nested query plan elements.  If P2 is zero\n** then this element is a top-level element.\n**\n** For loop elements, P3 is the estimated code of each invocation of this\n** element.\n**\n** As with all opcodes, the meanings of the parameters for OP_Explain\n** are subject to change from one release to the next.  Applications\n** should not attempt to interpret or use any of the information\n** contained in the OP_Explain opcode.  The information provided by this\n** opcode is intended for testing and debugging use only.\n*/\ndefault: {          /* This is really OP_Noop, OP_Explain */\n  assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );\n\n  break;\n}\n\n/*****************************************************************************\n** The cases of the switch statement above this line should all be indented\n** by 6 spaces.  But the left-most 6 spaces have been removed to improve the\n** readability.  From this point on down, the normal indentation rules are\n** restored.\n*****************************************************************************/\n    }\n\n#if defined(VDBE_PROFILE)\n    *pnCycle += sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime();\n    pnCycle = 0;\n#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n    if( pnCycle ){\n      *pnCycle += sqlite3Hwtime();\n      pnCycle = 0;\n    }\n#endif\n\n    /* The following code adds nothing to the actual functionality\n    ** of the program.  It is only here for testing and debugging.\n    ** On the other hand, it does burn CPU cycles every time through\n    ** the evaluator loop.  So we can leave it out when NDEBUG is defined.\n    */\n#ifndef NDEBUG\n    assert( pOp>=&aOp[-1] && pOp<&aOp[p->nOp-1] );\n\n#ifdef SQLITE_DEBUG\n    if( db->flags & SQLITE_VdbeTrace ){\n      u8 opProperty = sqlite3OpcodeProperty[pOrigOp->opcode];\n      if( rc!=0 ) printf(\"rc=%d\\n\",rc);\n      if( opProperty & (OPFLG_OUT2) ){\n        registerTrace(pOrigOp->p2, &aMem[pOrigOp->p2]);\n      }\n      if( opProperty & OPFLG_OUT3 ){\n        registerTrace(pOrigOp->p3, &aMem[pOrigOp->p3]);\n      }\n      if( opProperty==0xff ){\n        /* Never happens.  This code exists to avoid a harmless linkage\n        ** warning about sqlite3VdbeRegisterDump() being defined but not\n        ** used. */\n        sqlite3VdbeRegisterDump(p);\n      }\n    }\n#endif  /* SQLITE_DEBUG */\n#endif  /* NDEBUG */\n  }  /* The end of the for(;;) loop the loops through opcodes */\n\n  /* If we reach this point, it means that execution is finished with\n  ** an error of some kind.\n  */\nabort_due_to_error:\n  if( db->mallocFailed ){\n    rc = SQLITE_NOMEM_BKPT;\n  }else if( rc==SQLITE_IOERR_CORRUPTFS ){\n    rc = SQLITE_CORRUPT_BKPT;\n  }\n  assert( rc );\n#ifdef SQLITE_DEBUG\n  if( db->flags & SQLITE_VdbeTrace ){\n    const char *zTrace = p->zSql;\n    if( zTrace==0 ){\n      if( aOp[0].opcode==OP_Trace ){\n        zTrace = aOp[0].p4.z;\n      }\n      if( zTrace==0 ) zTrace = \"???\";\n    }\n    printf(\"ABORT-due-to-error (rc=%d): %s\\n\", rc, zTrace);\n  }\n#endif\n  if( p->zErrMsg==0 && rc!=SQLITE_IOERR_NOMEM ){\n    sqlite3VdbeError(p, \"%s\", sqlite3ErrStr(rc));\n  }\n  p->rc = rc;\n  sqlite3SystemError(db, rc);\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  sqlite3VdbeLogAbort(p, rc, pOp, aOp);\n  if( p->eVdbeState==VDBE_RUN_STATE ) sqlite3VdbeHalt(p);\n  if( rc==SQLITE_IOERR_NOMEM ) sqlite3OomFault(db);\n  if( rc==SQLITE_CORRUPT && db->autoCommit==0 ){\n    db->flags |= SQLITE_CorruptRdOnly;\n  }\n  rc = SQLITE_ERROR;\n  if( resetSchemaOnFault>0 ){\n    sqlite3ResetOneSchema(db, resetSchemaOnFault-1);\n  }\n\n  /* This is the only way out of this procedure.  We have to\n  ** release the mutexes on btrees that were acquired at the\n  ** top. */\nvdbe_return:\n#if defined(VDBE_PROFILE)\n  if( pnCycle ){\n    *pnCycle += sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime();\n    pnCycle = 0;\n  }\n#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n  if( pnCycle ){\n    *pnCycle += sqlite3Hwtime();\n    pnCycle = 0;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n  while( nVmStep>=nProgressLimit && db->xProgress!=0 ){\n    nProgressLimit += db->nProgressOps;\n    if( db->xProgress(db->pProgressArg) ){\n      nProgressLimit = LARGEST_UINT64;\n      rc = SQLITE_INTERRUPT;\n      goto abort_due_to_error;\n    }\n  }\n#endif\n  p->aCounter[SQLITE_STMTSTATUS_VM_STEP] += (int)nVmStep;\n  if( DbMaskNonZero(p->lockMask) ){\n    sqlite3VdbeLeave(p);\n  }\n  assert( rc!=SQLITE_OK || nExtraDelete==0\n       || sqlite3_strlike(\"DELETE%\",p->zSql,0)!=0\n  );\n  return rc;\n\n  /* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH\n  ** is encountered.\n  */\ntoo_big:\n  sqlite3VdbeError(p, \"string or blob too big\");\n  rc = SQLITE_TOOBIG;\n  goto abort_due_to_error;\n\n  /* Jump to here if a malloc() fails.\n  */\nno_mem:\n  sqlite3OomFault(db);\n  sqlite3VdbeError(p, \"out of memory\");\n  rc = SQLITE_NOMEM_BKPT;\n  goto abort_due_to_error;\n\n  /* Jump to here if the sqlite3_interrupt() API sets the interrupt\n  ** flag.\n  */\nabort_due_to_interrupt:\n  assert( AtomicLoad(&db->u1.isInterrupted) );\n  rc = SQLITE_INTERRUPT;\n  goto abort_due_to_error;\n}\n\n\n/************** End of vdbe.c ************************************************/\n/************** Begin file vdbeblob.c ****************************************/\n/*\n** 2007 May 1\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code used to implement incremental BLOB I/O.\n*/\n\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n#ifndef SQLITE_OMIT_INCRBLOB\n\n/*\n** Valid sqlite3_blob* handles point to Incrblob structures.\n*/\ntypedef struct Incrblob Incrblob;\nstruct Incrblob {\n  int nByte;              /* Size of open blob, in bytes */\n  int iOffset;            /* Byte offset of blob in cursor data */\n  u16 iCol;               /* Table column this handle is open on */\n  BtCursor *pCsr;         /* Cursor pointing at blob row */\n  sqlite3_stmt *pStmt;    /* Statement holding cursor open */\n  sqlite3 *db;            /* The associated database */\n  char *zDb;              /* Database name */\n  Table *pTab;            /* Table object */\n};\n\n\n/*\n** This function is used by both blob_open() and blob_reopen(). It seeks\n** the b-tree cursor associated with blob handle p to point to row iRow.\n** If successful, SQLITE_OK is returned and subsequent calls to\n** sqlite3_blob_read() or sqlite3_blob_write() access the specified row.\n**\n** If an error occurs, or if the specified row does not exist or does not\n** contain a value of type TEXT or BLOB in the column nominated when the\n** blob handle was opened, then an error code is returned and *pzErr may\n** be set to point to a buffer containing an error message. It is the\n** responsibility of the caller to free the error message buffer using\n** sqlite3DbFree().\n**\n** If an error does occur, then the b-tree cursor is closed. All subsequent\n** calls to sqlite3_blob_read(), blob_write() or blob_reopen() will\n** immediately return SQLITE_ABORT.\n*/\nstatic int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){\n  int rc;                         /* Error code */\n  char *zErr = 0;                 /* Error message */\n  Vdbe *v = (Vdbe *)p->pStmt;\n\n  /* Set the value of register r[1] in the SQL statement to integer iRow.\n  ** This is done directly as a performance optimization\n  */\n  sqlite3VdbeMemSetInt64(&v->aMem[1], iRow);\n\n  /* If the statement has been run before (and is paused at the OP_ResultRow)\n  ** then back it up to the point where it does the OP_NotExists.  This could\n  ** have been down with an extra OP_Goto, but simply setting the program\n  ** counter is faster. */\n  if( v->pc>4 ){\n    v->pc = 4;\n    assert( v->aOp[v->pc].opcode==OP_NotExists );\n    rc = sqlite3VdbeExec(v);\n  }else{\n    rc = sqlite3_step(p->pStmt);\n  }\n  if( rc==SQLITE_ROW ){\n    VdbeCursor *pC = v->apCsr[0];\n    u32 type;\n    assert( pC!=0 );\n    assert( pC->eCurType==CURTYPE_BTREE );\n    type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;\n    testcase( pC->nHdrParsed==p->iCol );\n    testcase( pC->nHdrParsed==p->iCol+1 );\n    if( type<12 ){\n      zErr = sqlite3MPrintf(p->db, \"cannot open value of type %s\",\n          type==0?\"null\": type==7?\"real\": \"integer\"\n      );\n      rc = SQLITE_ERROR;\n      sqlite3_finalize(p->pStmt);\n      p->pStmt = 0;\n    }else{\n      p->iOffset = pC->aType[p->iCol + pC->nField];\n      p->nByte = sqlite3VdbeSerialTypeLen(type);\n      p->pCsr =  pC->uc.pCursor;\n      sqlite3BtreeIncrblobCursor(p->pCsr);\n    }\n  }\n\n  if( rc==SQLITE_ROW ){\n    rc = SQLITE_OK;\n  }else if( p->pStmt ){\n    rc = sqlite3_finalize(p->pStmt);\n    p->pStmt = 0;\n    if( rc==SQLITE_OK ){\n      zErr = sqlite3MPrintf(p->db, \"no such rowid: %lld\", iRow);\n      rc = SQLITE_ERROR;\n    }else{\n      zErr = sqlite3MPrintf(p->db, \"%s\", sqlite3_errmsg(p->db));\n    }\n  }\n\n  assert( rc!=SQLITE_OK || zErr==0 );\n  assert( rc!=SQLITE_ROW && rc!=SQLITE_DONE );\n\n  *pzErr = zErr;\n  return rc;\n}\n\n/*\n** Open a blob handle.\n*/\nSQLITE_API int sqlite3_blob_open(\n  sqlite3* db,            /* The database connection */\n  const char *zDb,        /* The attached database containing the blob */\n  const char *zTable,     /* The table containing the blob */\n  const char *zColumn,    /* The column containing the blob */\n  sqlite_int64 iRow,      /* The row containing the glob */\n  int wrFlag,             /* True -> read/write access, false -> read-only */\n  sqlite3_blob **ppBlob   /* Handle for accessing the blob returned here */\n){\n  int nAttempt = 0;\n  int iCol;               /* Index of zColumn in row-record */\n  int rc = SQLITE_OK;\n  char *zErr = 0;\n  Table *pTab;\n  Incrblob *pBlob = 0;\n  int iDb;\n  Parse sParse;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ppBlob==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  *ppBlob = 0;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zTable==0 || zColumn==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  wrFlag = !!wrFlag;                /* wrFlag = (wrFlag ? 1 : 0); */\n\n  sqlite3_mutex_enter(db->mutex);\n\n  pBlob = (Incrblob *)sqlite3DbMallocZero(db, sizeof(Incrblob));\n  while(1){\n    sqlite3ParseObjectInit(&sParse,db);\n    if( !pBlob ) goto blob_open_out;\n    sqlite3DbFree(db, zErr);\n    zErr = 0;\n\n    sqlite3BtreeEnterAll(db);\n    pTab = sqlite3LocateTable(&sParse, 0, zTable, zDb);\n    if( pTab && IsVirtual(pTab) ){\n      pTab = 0;\n      sqlite3ErrorMsg(&sParse, \"cannot open virtual table: %s\", zTable);\n    }\n    if( pTab && !HasRowid(pTab) ){\n      pTab = 0;\n      sqlite3ErrorMsg(&sParse, \"cannot open table without rowid: %s\", zTable);\n    }\n    if( pTab && (pTab->tabFlags&TF_HasGenerated)!=0 ){\n      pTab = 0;\n      sqlite3ErrorMsg(&sParse, \"cannot open table with generated columns: %s\",\n                      zTable);\n    }\n#ifndef SQLITE_OMIT_VIEW\n    if( pTab && IsView(pTab) ){\n      pTab = 0;\n      sqlite3ErrorMsg(&sParse, \"cannot open view: %s\", zTable);\n    }\n#endif\n    if( pTab==0\n     || ((iDb = sqlite3SchemaToIndex(db, pTab->pSchema))==1 &&\n         sqlite3OpenTempDatabase(&sParse))\n    ){\n      if( sParse.zErrMsg ){\n        sqlite3DbFree(db, zErr);\n        zErr = sParse.zErrMsg;\n        sParse.zErrMsg = 0;\n      }\n      rc = SQLITE_ERROR;\n      sqlite3BtreeLeaveAll(db);\n      goto blob_open_out;\n    }\n    pBlob->pTab = pTab;\n    pBlob->zDb = db->aDb[iDb].zDbSName;\n\n    /* Now search pTab for the exact column. */\n    iCol = sqlite3ColumnIndex(pTab, zColumn);\n    if( iCol<0 ){\n      sqlite3DbFree(db, zErr);\n      zErr = sqlite3MPrintf(db, \"no such column: \\\"%s\\\"\", zColumn);\n      rc = SQLITE_ERROR;\n      sqlite3BtreeLeaveAll(db);\n      goto blob_open_out;\n    }\n\n    /* If the value is being opened for writing, check that the\n    ** column is not indexed, and that it is not part of a foreign key.\n    */\n    if( wrFlag ){\n      const char *zFault = 0;\n      Index *pIdx;\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n      if( db->flags&SQLITE_ForeignKeys ){\n        /* Check that the column is not part of an FK child key definition. It\n        ** is not necessary to check if it is part of a parent key, as parent\n        ** key columns must be indexed. The check below will pick up this\n        ** case.  */\n        FKey *pFKey;\n        assert( IsOrdinaryTable(pTab) );\n        for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){\n          int j;\n          for(j=0; j<pFKey->nCol; j++){\n            if( pFKey->aCol[j].iFrom==iCol ){\n              zFault = \"foreign key\";\n            }\n          }\n        }\n      }\n#endif\n      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n        int j;\n        for(j=0; j<pIdx->nKeyCol; j++){\n          /* FIXME: Be smarter about indexes that use expressions */\n          if( pIdx->aiColumn[j]==iCol || pIdx->aiColumn[j]==XN_EXPR ){\n            zFault = \"indexed\";\n          }\n        }\n      }\n      if( zFault ){\n        sqlite3DbFree(db, zErr);\n        zErr = sqlite3MPrintf(db, \"cannot open %s column for writing\", zFault);\n        rc = SQLITE_ERROR;\n        sqlite3BtreeLeaveAll(db);\n        goto blob_open_out;\n      }\n    }\n\n    pBlob->pStmt = (sqlite3_stmt *)sqlite3VdbeCreate(&sParse);\n    assert( pBlob->pStmt || db->mallocFailed );\n    if( pBlob->pStmt ){\n\n      /* This VDBE program seeks a btree cursor to the identified\n      ** db/table/row entry. The reason for using a vdbe program instead\n      ** of writing code to use the b-tree layer directly is that the\n      ** vdbe program will take advantage of the various transaction,\n      ** locking and error handling infrastructure built into the vdbe.\n      **\n      ** After seeking the cursor, the vdbe executes an OP_ResultRow.\n      ** Code external to the Vdbe then \"borrows\" the b-tree cursor and\n      ** uses it to implement the blob_read(), blob_write() and\n      ** blob_bytes() functions.\n      **\n      ** The sqlite3_blob_close() function finalizes the vdbe program,\n      ** which closes the b-tree cursor and (possibly) commits the\n      ** transaction.\n      */\n      static const int iLn = VDBE_OFFSET_LINENO(2);\n      static const VdbeOpList openBlob[] = {\n        {OP_TableLock,      0, 0, 0},  /* 0: Acquire a read or write lock */\n        {OP_OpenRead,       0, 0, 0},  /* 1: Open a cursor */\n        /* blobSeekToRow() will initialize r[1] to the desired rowid */\n        {OP_NotExists,      0, 5, 1},  /* 2: Seek the cursor to rowid=r[1] */\n        {OP_Column,         0, 0, 1},  /* 3  */\n        {OP_ResultRow,      1, 0, 0},  /* 4  */\n        {OP_Halt,           0, 0, 0},  /* 5  */\n      };\n      Vdbe *v = (Vdbe *)pBlob->pStmt;\n      VdbeOp *aOp;\n\n      sqlite3VdbeAddOp4Int(v, OP_Transaction, iDb, wrFlag,\n                           pTab->pSchema->schema_cookie,\n                           pTab->pSchema->iGeneration);\n      sqlite3VdbeChangeP5(v, 1);\n      assert( sqlite3VdbeCurrentAddr(v)==2 || db->mallocFailed );\n      aOp = sqlite3VdbeAddOpList(v, ArraySize(openBlob), openBlob, iLn);\n\n      /* Make sure a mutex is held on the table to be accessed */\n      sqlite3VdbeUsesBtree(v, iDb);\n\n      if( db->mallocFailed==0 ){\n        assert( aOp!=0 );\n        /* Configure the OP_TableLock instruction */\n#ifdef SQLITE_OMIT_SHARED_CACHE\n        aOp[0].opcode = OP_Noop;\n#else\n        aOp[0].p1 = iDb;\n        aOp[0].p2 = pTab->tnum;\n        aOp[0].p3 = wrFlag;\n        sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);\n      }\n      if( db->mallocFailed==0 ){\n#endif\n\n        /* Remove either the OP_OpenWrite or OpenRead. Set the P2\n        ** parameter of the other to pTab->tnum.  */\n        if( wrFlag ) aOp[1].opcode = OP_OpenWrite;\n        aOp[1].p2 = pTab->tnum;\n        aOp[1].p3 = iDb;\n\n        /* Configure the number of columns. Configure the cursor to\n        ** think that the table has one more column than it really\n        ** does. An OP_Column to retrieve this imaginary column will\n        ** always return an SQL NULL. This is useful because it means\n        ** we can invoke OP_Column to fill in the vdbe cursors type\n        ** and offset cache without causing any IO.\n        */\n        aOp[1].p4type = P4_INT32;\n        aOp[1].p4.i = pTab->nCol+1;\n        aOp[3].p2 = pTab->nCol;\n\n        sParse.nVar = 0;\n        sParse.nMem = 1;\n        sParse.nTab = 1;\n        sqlite3VdbeMakeReady(v, &sParse);\n      }\n    }\n\n    pBlob->iCol = iCol;\n    pBlob->db = db;\n    sqlite3BtreeLeaveAll(db);\n    if( db->mallocFailed ){\n      goto blob_open_out;\n    }\n    rc = blobSeekToRow(pBlob, iRow, &zErr);\n    if( (++nAttempt)>=SQLITE_MAX_SCHEMA_RETRY || rc!=SQLITE_SCHEMA ) break;\n    sqlite3ParseObjectReset(&sParse);\n  }\n\nblob_open_out:\n  if( rc==SQLITE_OK && db->mallocFailed==0 ){\n    *ppBlob = (sqlite3_blob *)pBlob;\n  }else{\n    if( pBlob && pBlob->pStmt ) sqlite3VdbeFinalize((Vdbe *)pBlob->pStmt);\n    sqlite3DbFree(db, pBlob);\n  }\n  sqlite3ErrorWithMsg(db, rc, (zErr ? \"%s\" : (char*)0), zErr);\n  sqlite3DbFree(db, zErr);\n  sqlite3ParseObjectReset(&sParse);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Close a blob handle that was previously created using\n** sqlite3_blob_open().\n*/\nSQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){\n  Incrblob *p = (Incrblob *)pBlob;\n  int rc;\n  sqlite3 *db;\n\n  if( p ){\n    sqlite3_stmt *pStmt = p->pStmt;\n    db = p->db;\n    sqlite3_mutex_enter(db->mutex);\n    sqlite3DbFree(db, p);\n    sqlite3_mutex_leave(db->mutex);\n    rc = sqlite3_finalize(pStmt);\n  }else{\n    rc = SQLITE_OK;\n  }\n  return rc;\n}\n\n/*\n** Perform a read or write operation on a blob\n*/\nstatic int blobReadWrite(\n  sqlite3_blob *pBlob,\n  void *z,\n  int n,\n  int iOffset,\n  int (*xCall)(BtCursor*, u32, u32, void*)\n){\n  int rc = SQLITE_OK;\n  Incrblob *p = (Incrblob *)pBlob;\n  Vdbe *v;\n  sqlite3 *db;\n\n  if( p==0 ) return SQLITE_MISUSE_BKPT;\n  db = p->db;\n  sqlite3_mutex_enter(db->mutex);\n  v = (Vdbe*)p->pStmt;\n\n  if( n<0 || iOffset<0 || ((sqlite3_int64)iOffset+n)>p->nByte ){\n    /* Request is out of range. Return a transient error. */\n    rc = SQLITE_ERROR;\n  }else if( v==0 ){\n    /* If there is no statement handle, then the blob-handle has\n    ** already been invalidated. Return SQLITE_ABORT in this case.\n    */\n    rc = SQLITE_ABORT;\n  }else{\n    /* Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is\n    ** returned, clean-up the statement handle.\n    */\n    assert( db == v->db );\n    sqlite3BtreeEnterCursor(p->pCsr);\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n    if( xCall==sqlite3BtreePutData && db->xPreUpdateCallback ){\n      /* If a pre-update hook is registered and this is a write cursor,\n      ** invoke it here.\n      **\n      ** TODO: The preupdate-hook is passed SQLITE_DELETE, even though this\n      ** operation should really be an SQLITE_UPDATE. This is probably\n      ** incorrect, but is convenient because at this point the new.* values\n      ** are not easily obtainable. And for the sessions module, an\n      ** SQLITE_UPDATE where the PK columns do not change is handled in the\n      ** same way as an SQLITE_DELETE (the SQLITE_DELETE code is actually\n      ** slightly more efficient). Since you cannot write to a PK column\n      ** using the incremental-blob API, this works. For the sessions module\n      ** anyhow.\n      */\n      if( sqlite3BtreeCursorIsValidNN(p->pCsr)==0 ){\n        /* If the cursor is not currently valid, try to reseek it. This\n        ** always either fails or finds the correct row - the cursor will\n        ** have been marked permanently CURSOR_INVALID if the open row has\n        ** been deleted.  */\n        int bDiff = 0;\n        rc = sqlite3BtreeCursorRestore(p->pCsr, &bDiff);\n        assert( bDiff==0 || sqlite3BtreeCursorIsValidNN(p->pCsr)==0 );\n      }\n      if( sqlite3BtreeCursorIsValidNN(p->pCsr) ){\n        sqlite3_int64 iKey;\n        iKey = sqlite3BtreeIntegerKey(p->pCsr);\n        assert( v->apCsr[0]!=0 );\n        assert( v->apCsr[0]->eCurType==CURTYPE_BTREE );\n        sqlite3VdbePreUpdateHook(\n            v, v->apCsr[0], SQLITE_DELETE, p->zDb, p->pTab, iKey, -1, p->iCol\n        );\n      }\n    }\n    if( rc==SQLITE_OK ){\n      rc = xCall(p->pCsr, iOffset+p->iOffset, n, z);\n    }\n#else\n    rc = xCall(p->pCsr, iOffset+p->iOffset, n, z);\n#endif\n\n    sqlite3BtreeLeaveCursor(p->pCsr);\n    if( rc==SQLITE_ABORT ){\n      sqlite3VdbeFinalize(v);\n      p->pStmt = 0;\n    }else{\n      v->rc = rc;\n    }\n  }\n  sqlite3Error(db, rc);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Read data from a blob handle.\n*/\nSQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){\n  return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreePayloadChecked);\n}\n\n/*\n** Write data to a blob handle.\n*/\nSQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){\n  return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);\n}\n\n/*\n** Query a blob handle for the size of the data.\n**\n** The Incrblob.nByte field is fixed for the lifetime of the Incrblob\n** so no mutex is required for access.\n*/\nSQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){\n  Incrblob *p = (Incrblob *)pBlob;\n  return (p && p->pStmt) ? p->nByte : 0;\n}\n\n/*\n** Move an existing blob handle to point to a different row of the same\n** database table.\n**\n** If an error occurs, or if the specified row does not exist or does not\n** contain a blob or text value, then an error code is returned and the\n** database handle error code and message set. If this happens, then all\n** subsequent calls to sqlite3_blob_xxx() functions (except blob_close())\n** immediately return SQLITE_ABORT.\n*/\nSQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){\n  int rc;\n  Incrblob *p = (Incrblob *)pBlob;\n  sqlite3 *db;\n\n  if( p==0 ) return SQLITE_MISUSE_BKPT;\n  db = p->db;\n  sqlite3_mutex_enter(db->mutex);\n\n  if( p->pStmt==0 ){\n    /* If there is no statement handle, then the blob-handle has\n    ** already been invalidated. Return SQLITE_ABORT in this case.\n    */\n    rc = SQLITE_ABORT;\n  }else{\n    char *zErr;\n    ((Vdbe*)p->pStmt)->rc = SQLITE_OK;\n    rc = blobSeekToRow(p, iRow, &zErr);\n    if( rc!=SQLITE_OK ){\n      sqlite3ErrorWithMsg(db, rc, (zErr ? \"%s\" : (char*)0), zErr);\n      sqlite3DbFree(db, zErr);\n    }\n    assert( rc!=SQLITE_SCHEMA );\n  }\n\n  rc = sqlite3ApiExit(db, rc);\n  assert( rc==SQLITE_OK || p->pStmt==0 );\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n#endif /* #ifndef SQLITE_OMIT_INCRBLOB */\n\n/************** End of vdbeblob.c ********************************************/\n/************** Begin file vdbesort.c ****************************************/\n/*\n** 2011-07-09\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code for the VdbeSorter object, used in concert with\n** a VdbeCursor to sort large numbers of keys for CREATE INDEX statements\n** or by SELECT statements with ORDER BY clauses that cannot be satisfied\n** using indexes and without LIMIT clauses.\n**\n** The VdbeSorter object implements a multi-threaded external merge sort\n** algorithm that is efficient even if the number of elements being sorted\n** exceeds the available memory.\n**\n** Here is the (internal, non-API) interface between this module and the\n** rest of the SQLite system:\n**\n**    sqlite3VdbeSorterInit()       Create a new VdbeSorter object.\n**\n**    sqlite3VdbeSorterWrite()      Add a single new row to the VdbeSorter\n**                                  object.  The row is a binary blob in the\n**                                  OP_MakeRecord format that contains both\n**                                  the ORDER BY key columns and result columns\n**                                  in the case of a SELECT w/ ORDER BY, or\n**                                  the complete record for an index entry\n**                                  in the case of a CREATE INDEX.\n**\n**    sqlite3VdbeSorterRewind()     Sort all content previously added.\n**                                  Position the read cursor on the\n**                                  first sorted element.\n**\n**    sqlite3VdbeSorterNext()       Advance the read cursor to the next sorted\n**                                  element.\n**\n**    sqlite3VdbeSorterRowkey()     Return the complete binary blob for the\n**                                  row currently under the read cursor.\n**\n**    sqlite3VdbeSorterCompare()    Compare the binary blob for the row\n**                                  currently under the read cursor against\n**                                  another binary blob X and report if\n**                                  X is strictly less than the read cursor.\n**                                  Used to enforce uniqueness in a\n**                                  CREATE UNIQUE INDEX statement.\n**\n**    sqlite3VdbeSorterClose()      Close the VdbeSorter object and reclaim\n**                                  all resources.\n**\n**    sqlite3VdbeSorterReset()      Refurbish the VdbeSorter for reuse.  This\n**                                  is like Close() followed by Init() only\n**                                  much faster.\n**\n** The interfaces above must be called in a particular order.  Write() can\n** only occur in between Init()/Reset() and Rewind().  Next(), Rowkey(), and\n** Compare() can only occur in between Rewind() and Close()/Reset(). i.e.\n**\n**   Init()\n**   for each record: Write()\n**   Rewind()\n**     Rowkey()/Compare()\n**   Next()\n**   Close()\n**\n** Algorithm:\n**\n** Records passed to the sorter via calls to Write() are initially held\n** unsorted in main memory. Assuming the amount of memory used never exceeds\n** a threshold, when Rewind() is called the set of records is sorted using\n** an in-memory merge sort. In this case, no temporary files are required\n** and subsequent calls to Rowkey(), Next() and Compare() read records\n** directly from main memory.\n**\n** If the amount of space used to store records in main memory exceeds the\n** threshold, then the set of records currently in memory are sorted and\n** written to a temporary file in \"Packed Memory Array\" (PMA) format.\n** A PMA created at this point is known as a \"level-0 PMA\". Higher levels\n** of PMAs may be created by merging existing PMAs together - for example\n** merging two or more level-0 PMAs together creates a level-1 PMA.\n**\n** The threshold for the amount of main memory to use before flushing\n** records to a PMA is roughly the same as the limit configured for the\n** page-cache of the main database. Specifically, the threshold is set to\n** the value returned by \"PRAGMA main.page_size\" multiplied by\n** that returned by \"PRAGMA main.cache_size\", in bytes.\n**\n** If the sorter is running in single-threaded mode, then all PMAs generated\n** are appended to a single temporary file. Or, if the sorter is running in\n** multi-threaded mode then up to (N+1) temporary files may be opened, where\n** N is the configured number of worker threads. In this case, instead of\n** sorting the records and writing the PMA to a temporary file itself, the\n** calling thread usually launches a worker thread to do so. Except, if\n** there are already N worker threads running, the main thread does the work\n** itself.\n**\n** The sorter is running in multi-threaded mode if (a) the library was built\n** with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater\n** than zero, and (b) worker threads have been enabled at runtime by calling\n** \"PRAGMA threads=N\" with some value of N greater than 0.\n**\n** When Rewind() is called, any data remaining in memory is flushed to a\n** final PMA. So at this point the data is stored in some number of sorted\n** PMAs within temporary files on disk.\n**\n** If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the\n** sorter is running in single-threaded mode, then these PMAs are merged\n** incrementally as keys are retrieved from the sorter by the VDBE.  The\n** MergeEngine object, described in further detail below, performs this\n** merge.\n**\n** Or, if running in multi-threaded mode, then a background thread is\n** launched to merge the existing PMAs. Once the background thread has\n** merged T bytes of data into a single sorted PMA, the main thread\n** begins reading keys from that PMA while the background thread proceeds\n** with merging the next T bytes of data. And so on.\n**\n** Parameter T is set to half the value of the memory threshold used\n** by Write() above to determine when to create a new PMA.\n**\n** If there are more than SORTER_MAX_MERGE_COUNT PMAs in total when\n** Rewind() is called, then a hierarchy of incremental-merges is used.\n** First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on\n** disk are merged together. Then T bytes of data from the second set, and\n** so on, such that no operation ever merges more than SORTER_MAX_MERGE_COUNT\n** PMAs at a time. This done is to improve locality.\n**\n** If running in multi-threaded mode and there are more than\n** SORTER_MAX_MERGE_COUNT PMAs on disk when Rewind() is called, then more\n** than one background thread may be created. Specifically, there may be\n** one background thread for each temporary file on disk, and one background\n** thread to merge the output of each of the others to a single PMA for\n** the main thread to read from.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n/*\n** If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various\n** messages to stderr that may be helpful in understanding the performance\n** characteristics of the sorter in multi-threaded mode.\n*/\n#if 0\n# define SQLITE_DEBUG_SORTER_THREADS 1\n#endif\n\n/*\n** Hard-coded maximum amount of data to accumulate in memory before flushing\n** to a level 0 PMA. The purpose of this limit is to prevent various integer\n** overflows. 512MiB.\n*/\n#define SQLITE_MAX_PMASZ    (1<<29)\n\n/*\n** Private objects used by the sorter\n*/\ntypedef struct MergeEngine MergeEngine;     /* Merge PMAs together */\ntypedef struct PmaReader PmaReader;         /* Incrementally read one PMA */\ntypedef struct PmaWriter PmaWriter;         /* Incrementally write one PMA */\ntypedef struct SorterRecord SorterRecord;   /* A record being sorted */\ntypedef struct SortSubtask SortSubtask;     /* A sub-task in the sort process */\ntypedef struct SorterFile SorterFile;       /* Temporary file object wrapper */\ntypedef struct SorterList SorterList;       /* In-memory list of records */\ntypedef struct IncrMerger IncrMerger;       /* Read & merge multiple PMAs */\n\n/*\n** A container for a temp file handle and the current amount of data\n** stored in the file.\n*/\nstruct SorterFile {\n  sqlite3_file *pFd;              /* File handle */\n  i64 iEof;                       /* Bytes of data stored in pFd */\n};\n\n/*\n** An in-memory list of objects to be sorted.\n**\n** If aMemory==0 then each object is allocated separately and the objects\n** are connected using SorterRecord.u.pNext.  If aMemory!=0 then all objects\n** are stored in the aMemory[] bulk memory, one right after the other, and\n** are connected using SorterRecord.u.iNext.\n*/\nstruct SorterList {\n  SorterRecord *pList;            /* Linked list of records */\n  u8 *aMemory;                    /* If non-NULL, bulk memory to hold pList */\n  i64 szPMA;                      /* Size of pList as PMA in bytes */\n};\n\n/*\n** The MergeEngine object is used to combine two or more smaller PMAs into\n** one big PMA using a merge operation.  Separate PMAs all need to be\n** combined into one big PMA in order to be able to step through the sorted\n** records in order.\n**\n** The aReadr[] array contains a PmaReader object for each of the PMAs being\n** merged.  An aReadr[] object either points to a valid key or else is at EOF.\n** (\"EOF\" means \"End Of File\".  When aReadr[] is at EOF there is no more data.)\n** For the purposes of the paragraphs below, we assume that the array is\n** actually N elements in size, where N is the smallest power of 2 greater\n** to or equal to the number of PMAs being merged. The extra aReadr[] elements\n** are treated as if they are empty (always at EOF).\n**\n** The aTree[] array is also N elements in size. The value of N is stored in\n** the MergeEngine.nTree variable.\n**\n** The final (N/2) elements of aTree[] contain the results of comparing\n** pairs of PMA keys together. Element i contains the result of\n** comparing aReadr[2*i-N] and aReadr[2*i-N+1]. Whichever key is smaller, the\n** aTree element is set to the index of it.\n**\n** For the purposes of this comparison, EOF is considered greater than any\n** other key value. If the keys are equal (only possible with two EOF\n** values), it doesn't matter which index is stored.\n**\n** The (N/4) elements of aTree[] that precede the final (N/2) described\n** above contains the index of the smallest of each block of 4 PmaReaders\n** And so on. So that aTree[1] contains the index of the PmaReader that\n** currently points to the smallest key value. aTree[0] is unused.\n**\n** Example:\n**\n**     aReadr[0] -> Banana\n**     aReadr[1] -> Feijoa\n**     aReadr[2] -> Elderberry\n**     aReadr[3] -> Currant\n**     aReadr[4] -> Grapefruit\n**     aReadr[5] -> Apple\n**     aReadr[6] -> Durian\n**     aReadr[7] -> EOF\n**\n**     aTree[] = { X, 5   0, 5    0, 3, 5, 6 }\n**\n** The current element is \"Apple\" (the value of the key indicated by\n** PmaReader 5). When the Next() operation is invoked, PmaReader 5 will\n** be advanced to the next key in its segment. Say the next key is\n** \"Eggplant\":\n**\n**     aReadr[5] -> Eggplant\n**\n** The contents of aTree[] are updated first by comparing the new PmaReader\n** 5 key to the current key of PmaReader 4 (still \"Grapefruit\"). The PmaReader\n** 5 value is still smaller, so aTree[6] is set to 5. And so on up the tree.\n** The value of PmaReader 6 - \"Durian\" - is now smaller than that of PmaReader\n** 5, so aTree[3] is set to 6. Key 0 is smaller than key 6 (Banana<Durian),\n** so the value written into element 1 of the array is 0. As follows:\n**\n**     aTree[] = { X, 0   0, 6    0, 3, 5, 6 }\n**\n** In other words, each time we advance to the next sorter element, log2(N)\n** key comparison operations are required, where N is the number of segments\n** being merged (rounded up to the next power of 2).\n*/\nstruct MergeEngine {\n  int nTree;                 /* Used size of aTree/aReadr (power of 2) */\n  SortSubtask *pTask;        /* Used by this thread only */\n  int *aTree;                /* Current state of incremental merge */\n  PmaReader *aReadr;         /* Array of PmaReaders to merge data from */\n};\n\n/*\n** This object represents a single thread of control in a sort operation.\n** Exactly VdbeSorter.nTask instances of this object are allocated\n** as part of each VdbeSorter object. Instances are never allocated any\n** other way. VdbeSorter.nTask is set to the number of worker threads allowed\n** (see SQLITE_CONFIG_WORKER_THREADS) plus one (the main thread).  Thus for\n** single-threaded operation, there is exactly one instance of this object\n** and for multi-threaded operation there are two or more instances.\n**\n** Essentially, this structure contains all those fields of the VdbeSorter\n** structure for which each thread requires a separate instance. For example,\n** each thread requeries its own UnpackedRecord object to unpack records in\n** as part of comparison operations.\n**\n** Before a background thread is launched, variable bDone is set to 0. Then,\n** right before it exits, the thread itself sets bDone to 1. This is used for\n** two purposes:\n**\n**   1. When flushing the contents of memory to a level-0 PMA on disk, to\n**      attempt to select a SortSubtask for which there is not already an\n**      active background thread (since doing so causes the main thread\n**      to block until it finishes).\n**\n**   2. If SQLITE_DEBUG_SORTER_THREADS is defined, to determine if a call\n**      to sqlite3ThreadJoin() is likely to block. Cases that are likely to\n**      block provoke debugging output.\n**\n** In both cases, the effects of the main thread seeing (bDone==0) even\n** after the thread has finished are not dire. So we don't worry about\n** memory barriers and such here.\n*/\ntypedef int (*SorterCompare)(SortSubtask*,int*,const void*,int,const void*,int);\nstruct SortSubtask {\n  SQLiteThread *pThread;          /* Background thread, if any */\n  int bDone;                      /* Set if thread is finished but not joined */\n  int nPMA;                       /* Number of PMAs currently in file */\n  VdbeSorter *pSorter;            /* Sorter that owns this sub-task */\n  UnpackedRecord *pUnpacked;      /* Space to unpack a record */\n  SorterList list;                /* List for thread to write to a PMA */\n  SorterCompare xCompare;         /* Compare function to use */\n  SorterFile file;                /* Temp file for level-0 PMAs */\n  SorterFile file2;               /* Space for other PMAs */\n  u64 nSpill;                     /* Total bytes written by this task */\n};\n\n\n/*\n** Main sorter structure. A single instance of this is allocated for each\n** sorter cursor created by the VDBE.\n**\n** mxKeysize:\n**   As records are added to the sorter by calls to sqlite3VdbeSorterWrite(),\n**   this variable is updated so as to be set to the size on disk of the\n**   largest record in the sorter.\n*/\nstruct VdbeSorter {\n  int mnPmaSize;                  /* Minimum PMA size, in bytes */\n  int mxPmaSize;                  /* Maximum PMA size, in bytes.  0==no limit */\n  int mxKeysize;                  /* Largest serialized key seen so far */\n  int pgsz;                       /* Main database page size */\n  PmaReader *pReader;             /* Readr data from here after Rewind() */\n  MergeEngine *pMerger;           /* Or here, if bUseThreads==0 */\n  sqlite3 *db;                    /* Database connection */\n  KeyInfo *pKeyInfo;              /* How to compare records */\n  UnpackedRecord *pUnpacked;      /* Used by VdbeSorterCompare() */\n  SorterList list;                /* List of in-memory records */\n  int iMemory;                    /* Offset of free space in list.aMemory */\n  int nMemory;                    /* Size of list.aMemory allocation in bytes */\n  u8 bUsePMA;                     /* True if one or more PMAs created */\n  u8 bUseThreads;                 /* True to use background threads */\n  u8 iPrev;                       /* Previous thread used to flush PMA */\n  u8 nTask;                       /* Size of aTask[] array */\n  u8 typeMask;\n  SortSubtask aTask[FLEXARRAY];   /* One or more subtasks */\n};\n\n/* Size (in bytes) of a VdbeSorter object that works with N or fewer subtasks */\n#define SZ_VDBESORTER(N)  (offsetof(VdbeSorter,aTask)+(N)*sizeof(SortSubtask))\n\n#define SORTER_TYPE_INTEGER 0x01\n#define SORTER_TYPE_TEXT    0x02\n\n/*\n** An instance of the following object is used to read records out of a\n** PMA, in sorted order.  The next key to be read is cached in nKey/aKey.\n** aKey might point into aMap or into aBuffer.  If neither of those locations\n** contain a contiguous representation of the key, then aAlloc is allocated\n** and the key is copied into aAlloc and aKey is made to point to aAlloc.\n**\n** pFd==0 at EOF.\n*/\nstruct PmaReader {\n  i64 iReadOff;               /* Current read offset */\n  i64 iEof;                   /* 1 byte past EOF for this PmaReader */\n  int nAlloc;                 /* Bytes of space at aAlloc */\n  int nKey;                   /* Number of bytes in key */\n  sqlite3_file *pFd;          /* File handle we are reading from */\n  u8 *aAlloc;                 /* Space for aKey if aBuffer and pMap wont work */\n  u8 *aKey;                   /* Pointer to current key */\n  u8 *aBuffer;                /* Current read buffer */\n  int nBuffer;                /* Size of read buffer in bytes */\n  u8 *aMap;                   /* Pointer to mapping of entire file */\n  IncrMerger *pIncr;          /* Incremental merger */\n};\n\n/*\n** Normally, a PmaReader object iterates through an existing PMA stored\n** within a temp file. However, if the PmaReader.pIncr variable points to\n** an object of the following type, it may be used to iterate/merge through\n** multiple PMAs simultaneously.\n**\n** There are two types of IncrMerger object - single (bUseThread==0) and\n** multi-threaded (bUseThread==1).\n**\n** A multi-threaded IncrMerger object uses two temporary files - aFile[0]\n** and aFile[1]. Neither file is allowed to grow to more than mxSz bytes in\n** size. When the IncrMerger is initialized, it reads enough data from\n** pMerger to populate aFile[0]. It then sets variables within the\n** corresponding PmaReader object to read from that file and kicks off\n** a background thread to populate aFile[1] with the next mxSz bytes of\n** sorted record data from pMerger.\n**\n** When the PmaReader reaches the end of aFile[0], it blocks until the\n** background thread has finished populating aFile[1]. It then exchanges\n** the contents of the aFile[0] and aFile[1] variables within this structure,\n** sets the PmaReader fields to read from the new aFile[0] and kicks off\n** another background thread to populate the new aFile[1]. And so on, until\n** the contents of pMerger are exhausted.\n**\n** A single-threaded IncrMerger does not open any temporary files of its\n** own. Instead, it has exclusive access to mxSz bytes of space beginning\n** at offset iStartOff of file pTask->file2. And instead of using a\n** background thread to prepare data for the PmaReader, with a single\n** threaded IncrMerger the allocate part of pTask->file2 is \"refilled\" with\n** keys from pMerger by the calling thread whenever the PmaReader runs out\n** of data.\n*/\nstruct IncrMerger {\n  SortSubtask *pTask;             /* Task that owns this merger */\n  MergeEngine *pMerger;           /* Merge engine thread reads data from */\n  i64 iStartOff;                  /* Offset to start writing file at */\n  int mxSz;                       /* Maximum bytes of data to store */\n  int bEof;                       /* Set to true when merge is finished */\n  int bUseThread;                 /* True to use a bg thread for this object */\n  SorterFile aFile[2];            /* aFile[0] for reading, [1] for writing */\n};\n\n/*\n** An instance of this object is used for writing a PMA.\n**\n** The PMA is written one record at a time.  Each record is of an arbitrary\n** size.  But I/O is more efficient if it occurs in page-sized blocks where\n** each block is aligned on a page boundary.  This object caches writes to\n** the PMA so that aligned, page-size blocks are written.\n*/\nstruct PmaWriter {\n  int eFWErr;                     /* Non-zero if in an error state */\n  u8 *aBuffer;                    /* Pointer to write buffer */\n  int nBuffer;                    /* Size of write buffer in bytes */\n  int iBufStart;                  /* First byte of buffer to write */\n  int iBufEnd;                    /* Last byte of buffer to write */\n  i64 iWriteOff;                  /* Offset of start of buffer in file */\n  sqlite3_file *pFd;              /* File handle to write to */\n  u64 nPmaSpill;                  /* Total number of bytes written */\n};\n\n/*\n** This object is the header on a single record while that record is being\n** held in memory and prior to being written out as part of a PMA.\n**\n** How the linked list is connected depends on how memory is being managed\n** by this module. If using a separate allocation for each in-memory record\n** (VdbeSorter.list.aMemory==0), then the list is always connected using the\n** SorterRecord.u.pNext pointers.\n**\n** Or, if using the single large allocation method (VdbeSorter.list.aMemory!=0),\n** then while records are being accumulated the list is linked using the\n** SorterRecord.u.iNext offset. This is because the aMemory[] array may\n** be sqlite3Realloc()ed while records are being accumulated. Once the VM\n** has finished passing records to the sorter, or when the in-memory buffer\n** is full, the list is sorted. As part of the sorting process, it is\n** converted to use the SorterRecord.u.pNext pointers. See function\n** vdbeSorterSort() for details.\n*/\nstruct SorterRecord {\n  int nVal;                       /* Size of the record in bytes */\n  union {\n    SorterRecord *pNext;          /* Pointer to next record in list */\n    int iNext;                    /* Offset within aMemory of next record */\n  } u;\n  /* The data for the record immediately follows this header */\n};\n\n/* Return a pointer to the buffer containing the record data for SorterRecord\n** object p. Should be used as if:\n**\n**   void *SRVAL(SorterRecord *p) { return (void*)&p[1]; }\n*/\n#define SRVAL(p) ((void*)((SorterRecord*)(p) + 1))\n\n\n/* Maximum number of PMAs that a single MergeEngine can merge */\n#define SORTER_MAX_MERGE_COUNT 16\n\nstatic int vdbeIncrSwap(IncrMerger*);\nstatic void vdbeIncrFree(IncrMerger *);\n\n/*\n** Free all memory belonging to the PmaReader object passed as the\n** argument. All structure fields are set to zero before returning.\n*/\nstatic void vdbePmaReaderClear(PmaReader *pReadr){\n  sqlite3_free(pReadr->aAlloc);\n  sqlite3_free(pReadr->aBuffer);\n  if( pReadr->aMap ) sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);\n  vdbeIncrFree(pReadr->pIncr);\n  memset(pReadr, 0, sizeof(PmaReader));\n}\n\n/*\n** Read the next nByte bytes of data from the PMA p.\n** If successful, set *ppOut to point to a buffer containing the data\n** and return SQLITE_OK. Otherwise, if an error occurs, return an SQLite\n** error code.\n**\n** The buffer returned in *ppOut is only valid until the\n** next call to this function.\n*/\nstatic int vdbePmaReadBlob(\n  PmaReader *p,                   /* PmaReader from which to take the blob */\n  int nByte,                      /* Bytes of data to read */\n  u8 **ppOut                      /* OUT: Pointer to buffer containing data */\n){\n  int iBuf;                       /* Offset within buffer to read from */\n  int nAvail;                     /* Bytes of data available in buffer */\n\n  if( p->aMap ){\n    *ppOut = &p->aMap[p->iReadOff];\n    p->iReadOff += nByte;\n    return SQLITE_OK;\n  }\n\n  assert( p->aBuffer );\n\n  /* If there is no more data to be read from the buffer, read the next\n  ** p->nBuffer bytes of data from the file into it. Or, if there are less\n  ** than p->nBuffer bytes remaining in the PMA, read all remaining data.  */\n  iBuf = p->iReadOff % p->nBuffer;\n  if( iBuf==0 ){\n    int nRead;                    /* Bytes to read from disk */\n    int rc;                       /* sqlite3OsRead() return code */\n\n    /* Determine how many bytes of data to read. */\n    if( (p->iEof - p->iReadOff) > (i64)p->nBuffer ){\n      nRead = p->nBuffer;\n    }else{\n      nRead = (int)(p->iEof - p->iReadOff);\n    }\n    assert( nRead>0 );\n\n    /* Readr data from the file. Return early if an error occurs. */\n    rc = sqlite3OsRead(p->pFd, p->aBuffer, nRead, p->iReadOff);\n    assert( rc!=SQLITE_IOERR_SHORT_READ );\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  nAvail = p->nBuffer - iBuf;\n\n  if( nByte<=nAvail ){\n    /* The requested data is available in the in-memory buffer. In this\n    ** case there is no need to make a copy of the data, just return a\n    ** pointer into the buffer to the caller.  */\n    *ppOut = &p->aBuffer[iBuf];\n    p->iReadOff += nByte;\n  }else{\n    /* The requested data is not all available in the in-memory buffer.\n    ** In this case, allocate space at p->aAlloc[] to copy the requested\n    ** range into. Then return a copy of pointer p->aAlloc to the caller.  */\n    int nRem;                     /* Bytes remaining to copy */\n\n    /* Extend the p->aAlloc[] allocation if required. */\n    if( p->nAlloc<nByte ){\n      u8 *aNew;\n      sqlite3_int64 nNew = MAX(128, 2*(sqlite3_int64)p->nAlloc);\n      while( nByte>nNew ) nNew = nNew*2;\n      aNew = sqlite3Realloc(p->aAlloc, nNew);\n      if( !aNew ) return SQLITE_NOMEM_BKPT;\n      p->nAlloc = nNew;\n      p->aAlloc = aNew;\n    }\n\n    /* Copy as much data as is available in the buffer into the start of\n    ** p->aAlloc[].  */\n    memcpy(p->aAlloc, &p->aBuffer[iBuf], nAvail);\n    p->iReadOff += nAvail;\n    nRem = nByte - nAvail;\n\n    /* The following loop copies up to p->nBuffer bytes per iteration into\n    ** the p->aAlloc[] buffer.  */\n    while( nRem>0 ){\n      int rc;                     /* vdbePmaReadBlob() return code */\n      int nCopy;                  /* Number of bytes to copy */\n      u8 *aNext = 0;              /* Pointer to buffer to copy data from */\n\n      nCopy = nRem;\n      if( nRem>p->nBuffer ) nCopy = p->nBuffer;\n      rc = vdbePmaReadBlob(p, nCopy, &aNext);\n      if( rc!=SQLITE_OK ) return rc;\n      assert( aNext!=p->aAlloc );\n      assert( aNext!=0 );\n      memcpy(&p->aAlloc[nByte - nRem], aNext, nCopy);\n      nRem -= nCopy;\n    }\n\n    *ppOut = p->aAlloc;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Read a varint from the stream of data accessed by p. Set *pnOut to\n** the value read.\n*/\nstatic int vdbePmaReadVarint(PmaReader *p, u64 *pnOut){\n  int iBuf;\n\n  if( p->aMap ){\n    p->iReadOff += sqlite3GetVarint(&p->aMap[p->iReadOff], pnOut);\n  }else{\n    iBuf = p->iReadOff % p->nBuffer;\n    if( iBuf && (p->nBuffer-iBuf)>=9 ){\n      p->iReadOff += sqlite3GetVarint(&p->aBuffer[iBuf], pnOut);\n    }else{\n      u8 aVarint[16], *a;\n      int i = 0, rc;\n      do{\n        rc = vdbePmaReadBlob(p, 1, &a);\n        if( rc ) return rc;\n        aVarint[(i++)&0xf] = a[0];\n      }while( (a[0]&0x80)!=0 );\n      sqlite3GetVarint(aVarint, pnOut);\n    }\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Attempt to memory map file pFile. If successful, set *pp to point to the\n** new mapping and return SQLITE_OK. If the mapping is not attempted\n** (because the file is too large or the VFS layer is configured not to use\n** mmap), return SQLITE_OK and set *pp to NULL.\n**\n** Or, if an error occurs, return an SQLite error code. The final value of\n** *pp is undefined in this case.\n*/\nstatic int vdbeSorterMapFile(SortSubtask *pTask, SorterFile *pFile, u8 **pp){\n  int rc = SQLITE_OK;\n  if( pFile->iEof<=(i64)(pTask->pSorter->db->nMaxSorterMmap) ){\n    sqlite3_file *pFd = pFile->pFd;\n    if( pFd->pMethods->iVersion>=3 ){\n      rc = sqlite3OsFetch(pFd, 0, (int)pFile->iEof, (void**)pp);\n      testcase( rc!=SQLITE_OK );\n    }\n  }\n  return rc;\n}\n\n/*\n** Attach PmaReader pReadr to file pFile (if it is not already attached to\n** that file) and seek it to offset iOff within the file.  Return SQLITE_OK\n** if successful, or an SQLite error code if an error occurs.\n*/\nstatic int vdbePmaReaderSeek(\n  SortSubtask *pTask,             /* Task context */\n  PmaReader *pReadr,              /* Reader whose cursor is to be moved */\n  SorterFile *pFile,              /* Sorter file to read from */\n  i64 iOff                        /* Offset in pFile */\n){\n  int rc = SQLITE_OK;\n\n  assert( pReadr->pIncr==0 || pReadr->pIncr->bEof==0 );\n\n  if( sqlite3FaultSim(201) ) return SQLITE_IOERR_READ;\n  if( pReadr->aMap ){\n    sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);\n    pReadr->aMap = 0;\n  }\n  pReadr->iReadOff = iOff;\n  pReadr->iEof = pFile->iEof;\n  pReadr->pFd = pFile->pFd;\n\n  rc = vdbeSorterMapFile(pTask, pFile, &pReadr->aMap);\n  if( rc==SQLITE_OK && pReadr->aMap==0 ){\n    int pgsz = pTask->pSorter->pgsz;\n    int iBuf = pReadr->iReadOff % pgsz;\n    if( pReadr->aBuffer==0 ){\n      pReadr->aBuffer = (u8*)sqlite3Malloc(pgsz);\n      if( pReadr->aBuffer==0 ) rc = SQLITE_NOMEM_BKPT;\n      pReadr->nBuffer = pgsz;\n    }\n    if( rc==SQLITE_OK && iBuf ){\n      int nRead = pgsz - iBuf;\n      if( (pReadr->iReadOff + nRead) > pReadr->iEof ){\n        nRead = (int)(pReadr->iEof - pReadr->iReadOff);\n      }\n      rc = sqlite3OsRead(\n          pReadr->pFd, &pReadr->aBuffer[iBuf], nRead, pReadr->iReadOff\n      );\n      testcase( rc!=SQLITE_OK );\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if\n** no error occurs, or an SQLite error code if one does.\n*/\nstatic int vdbePmaReaderNext(PmaReader *pReadr){\n  int rc = SQLITE_OK;             /* Return Code */\n  u64 nRec = 0;                   /* Size of record in bytes */\n\n\n  if( pReadr->iReadOff>=pReadr->iEof ){\n    IncrMerger *pIncr = pReadr->pIncr;\n    int bEof = 1;\n    if( pIncr ){\n      rc = vdbeIncrSwap(pIncr);\n      if( rc==SQLITE_OK && pIncr->bEof==0 ){\n        rc = vdbePmaReaderSeek(\n            pIncr->pTask, pReadr, &pIncr->aFile[0], pIncr->iStartOff\n        );\n        bEof = 0;\n      }\n    }\n\n    if( bEof ){\n      /* This is an EOF condition */\n      vdbePmaReaderClear(pReadr);\n      testcase( rc!=SQLITE_OK );\n      return rc;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = vdbePmaReadVarint(pReadr, &nRec);\n  }\n  if( rc==SQLITE_OK ){\n    pReadr->nKey = (int)nRec;\n    rc = vdbePmaReadBlob(pReadr, (int)nRec, &pReadr->aKey);\n    testcase( rc!=SQLITE_OK );\n  }\n\n  return rc;\n}\n\n/*\n** Initialize PmaReader pReadr to scan through the PMA stored in file pFile\n** starting at offset iStart and ending at offset iEof-1. This function\n** leaves the PmaReader pointing to the first key in the PMA (or EOF if the\n** PMA is empty).\n**\n** If the pnByte parameter is NULL, then it is assumed that the file\n** contains a single PMA, and that that PMA omits the initial length varint.\n*/\nstatic int vdbePmaReaderInit(\n  SortSubtask *pTask,             /* Task context */\n  SorterFile *pFile,              /* Sorter file to read from */\n  i64 iStart,                     /* Start offset in pFile */\n  PmaReader *pReadr,              /* PmaReader to populate */\n  i64 *pnByte                     /* IN/OUT: Increment this value by PMA size */\n){\n  int rc;\n\n  assert( pFile->iEof>iStart );\n  assert( pReadr->aAlloc==0 && pReadr->nAlloc==0 );\n  assert( pReadr->aBuffer==0 );\n  assert( pReadr->aMap==0 );\n\n  rc = vdbePmaReaderSeek(pTask, pReadr, pFile, iStart);\n  if( rc==SQLITE_OK ){\n    u64 nByte = 0;                 /* Size of PMA in bytes */\n    rc = vdbePmaReadVarint(pReadr, &nByte);\n    pReadr->iEof = pReadr->iReadOff + nByte;\n    *pnByte += nByte;\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = vdbePmaReaderNext(pReadr);\n  }\n  return rc;\n}\n\n/*\n** A version of vdbeSorterCompare() that assumes that it has already been\n** determined that the first field of key1 is equal to the first field of\n** key2.\n*/\nstatic int vdbeSorterCompareTail(\n  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */\n  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */\n  const void *pKey1, int nKey1,   /* Left side of comparison */\n  const void *pKey2, int nKey2    /* Right side of comparison */\n){\n  UnpackedRecord *r2 = pTask->pUnpacked;\n  if( *pbKey2Cached==0 ){\n    sqlite3VdbeRecordUnpack(nKey2, pKey2, r2);\n    *pbKey2Cached = 1;\n  }\n  return sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, r2, 1);\n}\n\n/*\n** Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2,\n** size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences\n** used by the comparison. Return the result of the comparison.\n**\n** If IN/OUT parameter *pbKey2Cached is true when this function is called,\n** it is assumed that (pTask->pUnpacked) contains the unpacked version\n** of key2. If it is false, (pTask->pUnpacked) is populated with the unpacked\n** version of key2 and *pbKey2Cached set to true before returning.\n**\n** If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set\n** to SQLITE_NOMEM.\n*/\nstatic int vdbeSorterCompare(\n  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */\n  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */\n  const void *pKey1, int nKey1,   /* Left side of comparison */\n  const void *pKey2, int nKey2    /* Right side of comparison */\n){\n  UnpackedRecord *r2 = pTask->pUnpacked;\n  if( !*pbKey2Cached ){\n    sqlite3VdbeRecordUnpack(nKey2, pKey2, r2);\n    *pbKey2Cached = 1;\n  }\n  return sqlite3VdbeRecordCompare(nKey1, pKey1, r2);\n}\n\n/*\n** A specially optimized version of vdbeSorterCompare() that assumes that\n** the first field of each key is a TEXT value and that the collation\n** sequence to compare them with is BINARY.\n*/\nstatic int vdbeSorterCompareText(\n  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */\n  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */\n  const void *pKey1, int nKey1,   /* Left side of comparison */\n  const void *pKey2, int nKey2    /* Right side of comparison */\n){\n  const u8 * const p1 = (const u8 * const)pKey1;\n  const u8 * const p2 = (const u8 * const)pKey2;\n  const u8 * const v1 = &p1[ p1[0] ];   /* Pointer to value 1 */\n  const u8 * const v2 = &p2[ p2[0] ];   /* Pointer to value 2 */\n\n  int n1;\n  int n2;\n  int res;\n\n  getVarint32NR(&p1[1], n1);\n  getVarint32NR(&p2[1], n2);\n  res = memcmp(v1, v2, (MIN(n1, n2) - 13)/2);\n  if( res==0 ){\n    res = n1 - n2;\n  }\n\n  if( res==0 ){\n    if( pTask->pSorter->pKeyInfo->nKeyField>1 ){\n      res = vdbeSorterCompareTail(\n          pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2\n      );\n    }\n  }else{\n    assert( pTask->pSorter->pKeyInfo->aSortFlags!=0 );\n    assert( !(pTask->pSorter->pKeyInfo->aSortFlags[0]&KEYINFO_ORDER_BIGNULL) );\n    if( pTask->pSorter->pKeyInfo->aSortFlags[0] ){\n      res = res * -1;\n    }\n  }\n\n  return res;\n}\n\n/*\n** A specially optimized version of vdbeSorterCompare() that assumes that\n** the first field of each key is an INTEGER value.\n*/\nstatic int vdbeSorterCompareInt(\n  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */\n  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */\n  const void *pKey1, int nKey1,   /* Left side of comparison */\n  const void *pKey2, int nKey2    /* Right side of comparison */\n){\n  const u8 * const p1 = (const u8 * const)pKey1;\n  const u8 * const p2 = (const u8 * const)pKey2;\n  const int s1 = p1[1];                 /* Left hand serial type */\n  const int s2 = p2[1];                 /* Right hand serial type */\n  const u8 * const v1 = &p1[ p1[0] ];   /* Pointer to value 1 */\n  const u8 * const v2 = &p2[ p2[0] ];   /* Pointer to value 2 */\n  int res;                              /* Return value */\n\n  assert( (s1>0 && s1<7) || s1==8 || s1==9 );\n  assert( (s2>0 && s2<7) || s2==8 || s2==9 );\n\n  if( s1==s2 ){\n    /* The two values have the same sign. Compare using memcmp(). */\n    static const u8 aLen[] = {0, 1, 2, 3, 4, 6, 8, 0, 0, 0 };\n    const u8 n = aLen[s1];\n    int i;\n    res = 0;\n    for(i=0; i<n; i++){\n      if( (res = v1[i] - v2[i])!=0 ){\n        if( ((v1[0] ^ v2[0]) & 0x80)!=0 ){\n          res = v1[0] & 0x80 ? -1 : +1;\n        }\n        break;\n      }\n    }\n  }else if( s1>7 && s2>7 ){\n    res = s1 - s2;\n  }else{\n    if( s2>7 ){\n      res = +1;\n    }else if( s1>7 ){\n      res = -1;\n    }else{\n      res = s1 - s2;\n    }\n    assert( res!=0 );\n\n    if( res>0 ){\n      if( *v1 & 0x80 ) res = -1;\n    }else{\n      if( *v2 & 0x80 ) res = +1;\n    }\n  }\n\n  assert( pTask->pSorter->pKeyInfo->aSortFlags!=0 );\n  if( res==0 ){\n    if( pTask->pSorter->pKeyInfo->nKeyField>1 ){\n      res = vdbeSorterCompareTail(\n          pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2\n      );\n    }\n  }else if( pTask->pSorter->pKeyInfo->aSortFlags[0] ){\n    assert( !(pTask->pSorter->pKeyInfo->aSortFlags[0]&KEYINFO_ORDER_BIGNULL) );\n    res = res * -1;\n  }\n\n  return res;\n}\n\n/*\n** Initialize the temporary index cursor just opened as a sorter cursor.\n**\n** Usually, the sorter module uses the value of (pCsr->pKeyInfo->nKeyField)\n** to determine the number of fields that should be compared from the\n** records being sorted. However, if the value passed as argument nField\n** is non-zero and the sorter is able to guarantee a stable sort, nField\n** is used instead. This is used when sorting records for a CREATE INDEX\n** statement. In this case, keys are always delivered to the sorter in\n** order of the primary key, which happens to be make up the final part\n** of the records being sorted. So if the sort is stable, there is never\n** any reason to compare PK fields and they can be ignored for a small\n** performance boost.\n**\n** The sorter can guarantee a stable sort when running in single-threaded\n** mode, but not in multi-threaded mode.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterInit(\n  sqlite3 *db,                    /* Database connection (for malloc()) */\n  int nField,                     /* Number of key fields in each record */\n  VdbeCursor *pCsr                /* Cursor that holds the new sorter */\n){\n  int pgsz;                       /* Page size of main database */\n  int i;                          /* Used to iterate through aTask[] */\n  VdbeSorter *pSorter;            /* The new sorter */\n  KeyInfo *pKeyInfo;              /* Copy of pCsr->pKeyInfo with db==0 */\n  int szKeyInfo;                  /* Size of pCsr->pKeyInfo in bytes */\n  i64 sz;                         /* Size of pSorter in bytes */\n  int rc = SQLITE_OK;\n#if SQLITE_MAX_WORKER_THREADS==0\n# define nWorker 0\n#else\n  int nWorker;\n#endif\n\n  /* Initialize the upper limit on the number of worker threads */\n#if SQLITE_MAX_WORKER_THREADS>0\n  if( sqlite3TempInMemory(db) || sqlite3GlobalConfig.bCoreMutex==0 ){\n    nWorker = 0;\n  }else{\n    nWorker = db->aLimit[SQLITE_LIMIT_WORKER_THREADS];\n  }\n#endif\n\n  /* Do not allow the total number of threads (main thread + all workers)\n  ** to exceed the maximum merge count */\n#if SQLITE_MAX_WORKER_THREADS>=SORTER_MAX_MERGE_COUNT\n  if( nWorker>=SORTER_MAX_MERGE_COUNT ){\n    nWorker = SORTER_MAX_MERGE_COUNT-1;\n  }\n#endif\n\n  assert( pCsr->pKeyInfo );\n  assert( !pCsr->isEphemeral );\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  assert( sizeof(KeyInfo) + UMXV(pCsr->pKeyInfo->nKeyField)*sizeof(CollSeq*)\n               < 0x7fffffff );\n  assert( pCsr->pKeyInfo->nKeyField<=pCsr->pKeyInfo->nAllField );\n  szKeyInfo = SZ_KEYINFO(pCsr->pKeyInfo->nAllField);\n  sz = SZ_VDBESORTER(nWorker+1);\n\n  pSorter = (VdbeSorter*)sqlite3DbMallocZero(db, sz + szKeyInfo);\n  pCsr->uc.pSorter = pSorter;\n  if( pSorter==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n  }else{\n    Btree *pBt = db->aDb[0].pBt;\n    pSorter->pKeyInfo = pKeyInfo = (KeyInfo*)((u8*)pSorter + sz);\n    memcpy(pKeyInfo, pCsr->pKeyInfo, szKeyInfo);\n    pKeyInfo->db = 0;\n    if( nField && nWorker==0 ){\n      pKeyInfo->nKeyField = nField;\n      assert( nField<=pCsr->pKeyInfo->nAllField );\n    }\n    /* It is OK that pKeyInfo reuses the aSortFlags field from pCsr->pKeyInfo,\n    ** since the pCsr->pKeyInfo->aSortFlags[] array is invariant and lives\n    ** longer that pSorter. */\n    assert( pKeyInfo->aSortFlags==pCsr->pKeyInfo->aSortFlags );\n    sqlite3BtreeEnter(pBt);\n    pSorter->pgsz = pgsz = sqlite3BtreeGetPageSize(pBt);\n    sqlite3BtreeLeave(pBt);\n    pSorter->nTask = nWorker + 1;\n    pSorter->iPrev = (u8)(nWorker - 1);\n    pSorter->bUseThreads = (pSorter->nTask>1);\n    pSorter->db = db;\n    for(i=0; i<pSorter->nTask; i++){\n      SortSubtask *pTask = &pSorter->aTask[i];\n      pTask->pSorter = pSorter;\n    }\n\n    if( !sqlite3TempInMemory(db) ){\n      i64 mxCache;                /* Cache size in bytes*/\n      u32 szPma = sqlite3GlobalConfig.szPma;\n      pSorter->mnPmaSize = szPma * pgsz;\n\n      mxCache = db->aDb[0].pSchema->cache_size;\n      if( mxCache<0 ){\n        /* A negative cache-size value C indicates that the cache is abs(C)\n        ** KiB in size.  */\n        mxCache = mxCache * -1024;\n      }else{\n        mxCache = mxCache * pgsz;\n      }\n      mxCache = MIN(mxCache, SQLITE_MAX_PMASZ);\n      pSorter->mxPmaSize = MAX(pSorter->mnPmaSize, (int)mxCache);\n\n      /* Avoid large memory allocations if the application has requested\n      ** SQLITE_CONFIG_SMALL_MALLOC. */\n      if( sqlite3GlobalConfig.bSmallMalloc==0 ){\n        assert( pSorter->iMemory==0 );\n        pSorter->nMemory = pgsz;\n        pSorter->list.aMemory = (u8*)sqlite3Malloc(pgsz);\n        if( !pSorter->list.aMemory ) rc = SQLITE_NOMEM_BKPT;\n      }\n    }\n\n    if( pKeyInfo->nAllField<13\n     && (pKeyInfo->aColl[0]==0 || pKeyInfo->aColl[0]==db->pDfltColl)\n     && (pKeyInfo->aSortFlags[0] & KEYINFO_ORDER_BIGNULL)==0\n    ){\n      pSorter->typeMask = SORTER_TYPE_INTEGER | SORTER_TYPE_TEXT;\n    }\n  }\n\n  return rc;\n}\n#undef nWorker   /* Defined at the top of this function */\n\n/*\n** Free the list of sorted records starting at pRecord.\n*/\nstatic void vdbeSorterRecordFree(sqlite3 *db, SorterRecord *pRecord){\n  SorterRecord *p;\n  SorterRecord *pNext;\n  for(p=pRecord; p; p=pNext){\n    pNext = p->u.pNext;\n    sqlite3DbFree(db, p);\n  }\n}\n\n/*\n** Free all resources owned by the object indicated by argument pTask. All\n** fields of *pTask are zeroed before returning.\n*/\nstatic void vdbeSortSubtaskCleanup(sqlite3 *db, SortSubtask *pTask){\n  sqlite3DbFree(db, pTask->pUnpacked);\n#if SQLITE_MAX_WORKER_THREADS>0\n  /* pTask->list.aMemory can only be non-zero if it was handed memory\n  ** from the main thread.  That only occurs SQLITE_MAX_WORKER_THREADS>0 */\n  if( pTask->list.aMemory ){\n    sqlite3_free(pTask->list.aMemory);\n  }else\n#endif\n  {\n    assert( pTask->list.aMemory==0 );\n    vdbeSorterRecordFree(0, pTask->list.pList);\n  }\n  if( pTask->file.pFd ){\n    sqlite3OsCloseFree(pTask->file.pFd);\n  }\n  if( pTask->file2.pFd ){\n    sqlite3OsCloseFree(pTask->file2.pFd);\n  }\n  memset(pTask, 0, sizeof(SortSubtask));\n}\n\n#ifdef SQLITE_DEBUG_SORTER_THREADS\nstatic void vdbeSorterWorkDebug(SortSubtask *pTask, const char *zEvent){\n  i64 t;\n  int iTask = (pTask - pTask->pSorter->aTask);\n  sqlite3OsCurrentTimeInt64(pTask->pSorter->db->pVfs, &t);\n  fprintf(stderr, \"%lld:%d %s\\n\", t, iTask, zEvent);\n}\nstatic void vdbeSorterRewindDebug(const char *zEvent){\n  i64 t = 0;\n  sqlite3_vfs *pVfs = sqlite3_vfs_find(0);\n  if( ALWAYS(pVfs) ) sqlite3OsCurrentTimeInt64(pVfs, &t);\n  fprintf(stderr, \"%lld:X %s\\n\", t, zEvent);\n}\nstatic void vdbeSorterPopulateDebug(\n  SortSubtask *pTask,\n  const char *zEvent\n){\n  i64 t;\n  int iTask = (pTask - pTask->pSorter->aTask);\n  sqlite3OsCurrentTimeInt64(pTask->pSorter->db->pVfs, &t);\n  fprintf(stderr, \"%lld:bg%d %s\\n\", t, iTask, zEvent);\n}\nstatic void vdbeSorterBlockDebug(\n  SortSubtask *pTask,\n  int bBlocked,\n  const char *zEvent\n){\n  if( bBlocked ){\n    i64 t;\n    sqlite3OsCurrentTimeInt64(pTask->pSorter->db->pVfs, &t);\n    fprintf(stderr, \"%lld:main %s\\n\", t, zEvent);\n  }\n}\n#else\n# define vdbeSorterWorkDebug(x,y)\n# define vdbeSorterRewindDebug(y)\n# define vdbeSorterPopulateDebug(x,y)\n# define vdbeSorterBlockDebug(x,y,z)\n#endif\n\n#if SQLITE_MAX_WORKER_THREADS>0\n/*\n** Join thread pTask->thread.\n*/\nstatic int vdbeSorterJoinThread(SortSubtask *pTask){\n  int rc = SQLITE_OK;\n  if( pTask->pThread ){\n#ifdef SQLITE_DEBUG_SORTER_THREADS\n    int bDone = pTask->bDone;\n#endif\n    void *pRet = SQLITE_INT_TO_PTR(SQLITE_ERROR);\n    vdbeSorterBlockDebug(pTask, !bDone, \"enter\");\n    (void)sqlite3ThreadJoin(pTask->pThread, &pRet);\n    vdbeSorterBlockDebug(pTask, !bDone, \"exit\");\n    rc = SQLITE_PTR_TO_INT(pRet);\n    assert( pTask->bDone==1 );\n    pTask->bDone = 0;\n    pTask->pThread = 0;\n  }\n  return rc;\n}\n\n/*\n** Launch a background thread to run xTask(pIn).\n*/\nstatic int vdbeSorterCreateThread(\n  SortSubtask *pTask,             /* Thread will use this task object */\n  void *(*xTask)(void*),          /* Routine to run in a separate thread */\n  void *pIn                       /* Argument passed into xTask() */\n){\n  assert( pTask->pThread==0 && pTask->bDone==0 );\n  return sqlite3ThreadCreate(&pTask->pThread, xTask, pIn);\n}\n\n/*\n** Join all outstanding threads launched by SorterWrite() to create\n** level-0 PMAs.\n*/\nstatic int vdbeSorterJoinAll(VdbeSorter *pSorter, int rcin){\n  int rc = rcin;\n  int i;\n\n  /* This function is always called by the main user thread.\n  **\n  ** If this function is being called after SorterRewind() has been called,\n  ** it is possible that thread pSorter->aTask[pSorter->nTask-1].pThread\n  ** is currently attempt to join one of the other threads. To avoid a race\n  ** condition where this thread also attempts to join the same object, join\n  ** thread pSorter->aTask[pSorter->nTask-1].pThread first. */\n  for(i=pSorter->nTask-1; i>=0; i--){\n    SortSubtask *pTask = &pSorter->aTask[i];\n    int rc2 = vdbeSorterJoinThread(pTask);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n  return rc;\n}\n#else\n# define vdbeSorterJoinAll(x,rcin) (rcin)\n# define vdbeSorterJoinThread(pTask) SQLITE_OK\n#endif\n\n/*\n** Allocate a new MergeEngine object capable of handling up to\n** nReader PmaReader inputs.\n**\n** nReader is automatically rounded up to the next power of two.\n** nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up.\n*/\nstatic MergeEngine *vdbeMergeEngineNew(int nReader){\n  int N = 2;                      /* Smallest power of two >= nReader */\n  i64 nByte;                      /* Total bytes of space to allocate */\n  MergeEngine *pNew;              /* Pointer to allocated object to return */\n\n  assert( nReader<=SORTER_MAX_MERGE_COUNT );\n\n  while( N<nReader ) N += N;\n  nByte = sizeof(MergeEngine) + N * (sizeof(int) + sizeof(PmaReader));\n\n  pNew = sqlite3FaultSim(100) ? 0 : (MergeEngine*)sqlite3MallocZero(nByte);\n  if( pNew ){\n    pNew->nTree = N;\n    pNew->pTask = 0;\n    pNew->aReadr = (PmaReader*)&pNew[1];\n    pNew->aTree = (int*)&pNew->aReadr[N];\n  }\n  return pNew;\n}\n\n/*\n** Free the MergeEngine object passed as the only argument.\n*/\nstatic void vdbeMergeEngineFree(MergeEngine *pMerger){\n  int i;\n  if( pMerger ){\n    for(i=0; i<pMerger->nTree; i++){\n      vdbePmaReaderClear(&pMerger->aReadr[i]);\n    }\n  }\n  sqlite3_free(pMerger);\n}\n\n/*\n** Free all resources associated with the IncrMerger object indicated by\n** the first argument.\n*/\nstatic void vdbeIncrFree(IncrMerger *pIncr){\n  if( pIncr ){\n#if SQLITE_MAX_WORKER_THREADS>0\n    if( pIncr->bUseThread ){\n      vdbeSorterJoinThread(pIncr->pTask);\n      if( pIncr->aFile[0].pFd ) sqlite3OsCloseFree(pIncr->aFile[0].pFd);\n      if( pIncr->aFile[1].pFd ) sqlite3OsCloseFree(pIncr->aFile[1].pFd);\n    }\n#endif\n    vdbeMergeEngineFree(pIncr->pMerger);\n    sqlite3_free(pIncr);\n  }\n}\n\n/*\n** Reset a sorting cursor back to its original empty state.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *db, VdbeSorter *pSorter){\n  int i;\n  (void)vdbeSorterJoinAll(pSorter, SQLITE_OK);\n  assert( pSorter->bUseThreads || pSorter->pReader==0 );\n#if SQLITE_MAX_WORKER_THREADS>0\n  if( pSorter->pReader ){\n    vdbePmaReaderClear(pSorter->pReader);\n    sqlite3DbFree(db, pSorter->pReader);\n    pSorter->pReader = 0;\n  }\n#endif\n  vdbeMergeEngineFree(pSorter->pMerger);\n  pSorter->pMerger = 0;\n  for(i=0; i<pSorter->nTask; i++){\n    SortSubtask *pTask = &pSorter->aTask[i];\n    vdbeSortSubtaskCleanup(db, pTask);\n    pTask->pSorter = pSorter;\n  }\n  if( pSorter->list.aMemory==0 ){\n    vdbeSorterRecordFree(0, pSorter->list.pList);\n  }\n  pSorter->list.pList = 0;\n  pSorter->list.szPMA = 0;\n  pSorter->bUsePMA = 0;\n  pSorter->iMemory = 0;\n  pSorter->mxKeysize = 0;\n  sqlite3DbFree(db, pSorter->pUnpacked);\n  pSorter->pUnpacked = 0;\n}\n\n/*\n** Free any cursor components allocated by sqlite3VdbeSorterXXX routines.\n*/\nSQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *db, VdbeCursor *pCsr){\n  VdbeSorter *pSorter;\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  if( pSorter ){\n    /* Increment db->nSpill by the total number of bytes of data written\n    ** to temp files by this sort operation.  */\n    int ii;\n    for(ii=0; ii<pSorter->nTask; ii++){\n      db->nSpill += pSorter->aTask[ii].nSpill;\n    }\n    sqlite3VdbeSorterReset(db, pSorter);\n    sqlite3_free(pSorter->list.aMemory);\n    sqlite3DbFree(db, pSorter);\n    pCsr->uc.pSorter = 0;\n  }\n}\n\n#if SQLITE_MAX_MMAP_SIZE>0\n/*\n** The first argument is a file-handle open on a temporary file. The file\n** is guaranteed to be nByte bytes or smaller in size. This function\n** attempts to extend the file to nByte bytes in size and to ensure that\n** the VFS has memory mapped it.\n**\n** Whether or not the file does end up memory mapped of course depends on\n** the specific VFS implementation.\n*/\nstatic void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){\n  if( nByte<=(i64)(db->nMaxSorterMmap) && pFd->pMethods->iVersion>=3 ){\n    void *p = 0;\n    int chunksize = 4*1024;\n    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_CHUNK_SIZE, &chunksize);\n    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);\n    sqlite3OsFetch(pFd, 0, (int)nByte, &p);\n    if( p ) sqlite3OsUnfetch(pFd, 0, p);\n  }\n}\n#else\n# define vdbeSorterExtendFile(x,y,z)\n#endif\n\n/*\n** Allocate space for a file-handle and open a temporary file. If successful,\n** set *ppFd to point to the malloc'd file-handle and return SQLITE_OK.\n** Otherwise, set *ppFd to 0 and return an SQLite error code.\n*/\nstatic int vdbeSorterOpenTempFile(\n  sqlite3 *db,                    /* Database handle doing sort */\n  i64 nExtend,                    /* Attempt to extend file to this size */\n  sqlite3_file **ppFd\n){\n  int rc;\n  if( sqlite3FaultSim(202) ) return SQLITE_IOERR_ACCESS;\n  rc = sqlite3OsOpenMalloc(db->pVfs, 0, ppFd,\n      SQLITE_OPEN_TEMP_JOURNAL |\n      SQLITE_OPEN_READWRITE    | SQLITE_OPEN_CREATE |\n      SQLITE_OPEN_EXCLUSIVE    | SQLITE_OPEN_DELETEONCLOSE, &rc\n  );\n  if( rc==SQLITE_OK ){\n    i64 max = SQLITE_MAX_MMAP_SIZE;\n    sqlite3OsFileControlHint(*ppFd, SQLITE_FCNTL_MMAP_SIZE, (void*)&max);\n    if( nExtend>0 ){\n      vdbeSorterExtendFile(db, *ppFd, nExtend);\n    }\n  }\n  return rc;\n}\n\n/*\n** If it has not already been allocated, allocate the UnpackedRecord\n** structure at pTask->pUnpacked. Return SQLITE_OK if successful (or\n** if no allocation was required), or SQLITE_NOMEM otherwise.\n*/\nstatic int vdbeSortAllocUnpacked(SortSubtask *pTask){\n  if( pTask->pUnpacked==0 ){\n    pTask->pUnpacked = sqlite3VdbeAllocUnpackedRecord(pTask->pSorter->pKeyInfo);\n    if( pTask->pUnpacked==0 ) return SQLITE_NOMEM_BKPT;\n    pTask->pUnpacked->nField = pTask->pSorter->pKeyInfo->nKeyField;\n    pTask->pUnpacked->errCode = 0;\n  }\n  return SQLITE_OK;\n}\n\n\n/*\n** Merge the two sorted lists p1 and p2 into a single list.\n*/\nstatic SorterRecord *vdbeSorterMerge(\n  SortSubtask *pTask,             /* Calling thread context */\n  SorterRecord *p1,               /* First list to merge */\n  SorterRecord *p2                /* Second list to merge */\n){\n  SorterRecord *pFinal = 0;\n  SorterRecord **pp = &pFinal;\n  int bCached = 0;\n\n  assert( p1!=0 && p2!=0 );\n  for(;;){\n    int res;\n    res = pTask->xCompare(\n        pTask, &bCached, SRVAL(p1), p1->nVal, SRVAL(p2), p2->nVal\n    );\n\n    if( res<=0 ){\n      *pp = p1;\n      pp = &p1->u.pNext;\n      p1 = p1->u.pNext;\n      if( p1==0 ){\n        *pp = p2;\n        break;\n      }\n    }else{\n      *pp = p2;\n      pp = &p2->u.pNext;\n      p2 = p2->u.pNext;\n      bCached = 0;\n      if( p2==0 ){\n        *pp = p1;\n        break;\n      }\n    }\n  }\n  return pFinal;\n}\n\n/*\n** Return the SorterCompare function to compare values collected by the\n** sorter object passed as the only argument.\n*/\nstatic SorterCompare vdbeSorterGetCompare(VdbeSorter *p){\n  if( p->typeMask==SORTER_TYPE_INTEGER ){\n    return vdbeSorterCompareInt;\n  }else if( p->typeMask==SORTER_TYPE_TEXT ){\n    return vdbeSorterCompareText;\n  }\n  return vdbeSorterCompare;\n}\n\n/*\n** Sort the linked list of records headed at pTask->pList. Return\n** SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if\n** an error occurs.\n*/\nstatic int vdbeSorterSort(SortSubtask *pTask, SorterList *pList){\n  int i;\n  SorterRecord *p;\n  int rc;\n  SorterRecord *aSlot[64];\n\n  rc = vdbeSortAllocUnpacked(pTask);\n  if( rc!=SQLITE_OK ) return rc;\n\n  p = pList->pList;\n  pTask->xCompare = vdbeSorterGetCompare(pTask->pSorter);\n  memset(aSlot, 0, sizeof(aSlot));\n\n  while( p ){\n    SorterRecord *pNext;\n    if( pList->aMemory ){\n      if( (u8*)p==pList->aMemory ){\n        pNext = 0;\n      }else{\n        assert( p->u.iNext<sqlite3MallocSize(pList->aMemory) );\n        pNext = (SorterRecord*)&pList->aMemory[p->u.iNext];\n      }\n    }else{\n      pNext = p->u.pNext;\n    }\n\n    p->u.pNext = 0;\n    for(i=0; aSlot[i]; i++){\n      p = vdbeSorterMerge(pTask, p, aSlot[i]);\n      /* ,--Each aSlot[] holds twice as much as the previous. So we cannot use\n      ** |  up all 64 aSlots[] with only a 64-bit address space.\n      ** v                                                                */\n      assert( i<ArraySize(aSlot) );\n      aSlot[i] = 0;\n    }\n    aSlot[i] = p;\n    p = pNext;\n  }\n\n  p = 0;\n  for(i=0; i<ArraySize(aSlot); i++){\n    if( aSlot[i]==0 ) continue;\n    p = p ? vdbeSorterMerge(pTask, p, aSlot[i]) : aSlot[i];\n  }\n  pList->pList = p;\n\n  assert( pTask->pUnpacked->errCode==SQLITE_OK\n       || pTask->pUnpacked->errCode==SQLITE_NOMEM\n  );\n  return pTask->pUnpacked->errCode;\n}\n\n/*\n** Initialize a PMA-writer object.\n*/\nstatic void vdbePmaWriterInit(\n  sqlite3_file *pFd,              /* File handle to write to */\n  PmaWriter *p,                   /* Object to populate */\n  int nBuf,                       /* Buffer size */\n  i64 iStart                      /* Offset of pFd to begin writing at */\n){\n  memset(p, 0, sizeof(PmaWriter));\n  p->aBuffer = (u8*)sqlite3Malloc(nBuf);\n  if( !p->aBuffer ){\n    p->eFWErr = SQLITE_NOMEM_BKPT;\n  }else{\n    p->iBufEnd = p->iBufStart = (iStart % nBuf);\n    p->iWriteOff = iStart - p->iBufStart;\n    p->nBuffer = nBuf;\n    p->pFd = pFd;\n  }\n}\n\n/*\n** Write nData bytes of data to the PMA. Return SQLITE_OK\n** if successful, or an SQLite error code if an error occurs.\n*/\nstatic void vdbePmaWriteBlob(PmaWriter *p, u8 *pData, int nData){\n  int nRem = nData;\n  while( nRem>0 && p->eFWErr==0 ){\n    int nCopy = nRem;\n    if( nCopy>(p->nBuffer - p->iBufEnd) ){\n      nCopy = p->nBuffer - p->iBufEnd;\n    }\n\n    memcpy(&p->aBuffer[p->iBufEnd], &pData[nData-nRem], nCopy);\n    p->iBufEnd += nCopy;\n    if( p->iBufEnd==p->nBuffer ){\n      p->eFWErr = sqlite3OsWrite(p->pFd,\n          &p->aBuffer[p->iBufStart], p->iBufEnd - p->iBufStart,\n          p->iWriteOff + p->iBufStart\n      );\n      p->nPmaSpill += (p->iBufEnd - p->iBufStart);\n      p->iBufStart = p->iBufEnd = 0;\n      p->iWriteOff += p->nBuffer;\n    }\n    assert( p->iBufEnd<p->nBuffer );\n\n    nRem -= nCopy;\n  }\n}\n\n/*\n** Flush any buffered data to disk and clean up the PMA-writer object.\n** The results of using the PMA-writer after this call are undefined.\n** Return SQLITE_OK if flushing the buffered data succeeds or is not\n** required. Otherwise, return an SQLite error code.\n**\n** Before returning, set *piEof to the offset immediately following the\n** last byte written to the file. Also, increment (*pnSpill) by the total\n** number of bytes written to the file.\n*/\nstatic int vdbePmaWriterFinish(PmaWriter *p, i64 *piEof, u64 *pnSpill){\n  int rc;\n  if( p->eFWErr==0 && ALWAYS(p->aBuffer) && p->iBufEnd>p->iBufStart ){\n    p->eFWErr = sqlite3OsWrite(p->pFd,\n        &p->aBuffer[p->iBufStart], p->iBufEnd - p->iBufStart,\n        p->iWriteOff + p->iBufStart\n    );\n    p->nPmaSpill += (p->iBufEnd - p->iBufStart);\n  }\n  *piEof = (p->iWriteOff + p->iBufEnd);\n  *pnSpill += p->nPmaSpill;\n  sqlite3_free(p->aBuffer);\n  rc = p->eFWErr;\n  memset(p, 0, sizeof(PmaWriter));\n  return rc;\n}\n\n/*\n** Write value iVal encoded as a varint to the PMA. Return\n** SQLITE_OK if successful, or an SQLite error code if an error occurs.\n*/\nstatic void vdbePmaWriteVarint(PmaWriter *p, u64 iVal){\n  int nByte;\n  u8 aByte[10];\n  nByte = sqlite3PutVarint(aByte, iVal);\n  vdbePmaWriteBlob(p, aByte, nByte);\n}\n\n/*\n** Write the current contents of in-memory linked-list pList to a level-0\n** PMA in the temp file belonging to sub-task pTask. Return SQLITE_OK if\n** successful, or an SQLite error code otherwise.\n**\n** The format of a PMA is:\n**\n**     * A varint. This varint contains the total number of bytes of content\n**       in the PMA (not including the varint itself).\n**\n**     * One or more records packed end-to-end in order of ascending keys.\n**       Each record consists of a varint followed by a blob of data (the\n**       key). The varint is the number of bytes in the blob of data.\n*/\nstatic int vdbeSorterListToPMA(SortSubtask *pTask, SorterList *pList){\n  sqlite3 *db = pTask->pSorter->db;\n  int rc = SQLITE_OK;             /* Return code */\n  PmaWriter writer;               /* Object used to write to the file */\n\n#ifdef SQLITE_DEBUG\n  /* Set iSz to the expected size of file pTask->file after writing the PMA.\n  ** This is used by an assert() statement at the end of this function.  */\n  i64 iSz = pList->szPMA + sqlite3VarintLen(pList->szPMA) + pTask->file.iEof;\n#endif\n\n  vdbeSorterWorkDebug(pTask, \"enter\");\n  memset(&writer, 0, sizeof(PmaWriter));\n  assert( pList->szPMA>0 );\n\n  /* If the first temporary PMA file has not been opened, open it now. */\n  if( pTask->file.pFd==0 ){\n    rc = vdbeSorterOpenTempFile(db, 0, &pTask->file.pFd);\n    assert( rc!=SQLITE_OK || pTask->file.pFd );\n    assert( pTask->file.iEof==0 );\n    assert( pTask->nPMA==0 );\n  }\n\n  /* Try to get the file to memory map */\n  if( rc==SQLITE_OK ){\n    vdbeSorterExtendFile(db, pTask->file.pFd, pTask->file.iEof+pList->szPMA+9);\n  }\n\n  /* Sort the list */\n  if( rc==SQLITE_OK ){\n    rc = vdbeSorterSort(pTask, pList);\n  }\n\n  if( rc==SQLITE_OK ){\n    SorterRecord *p;\n    SorterRecord *pNext = 0;\n\n    vdbePmaWriterInit(pTask->file.pFd, &writer, pTask->pSorter->pgsz,\n                      pTask->file.iEof);\n    pTask->nPMA++;\n    vdbePmaWriteVarint(&writer, pList->szPMA);\n    for(p=pList->pList; p; p=pNext){\n      pNext = p->u.pNext;\n      vdbePmaWriteVarint(&writer, p->nVal);\n      vdbePmaWriteBlob(&writer, SRVAL(p), p->nVal);\n      if( pList->aMemory==0 ) sqlite3_free(p);\n    }\n    pList->pList = p;\n    rc = vdbePmaWriterFinish(&writer, &pTask->file.iEof, &pTask->nSpill);\n  }\n\n  vdbeSorterWorkDebug(pTask, \"exit\");\n  assert( rc!=SQLITE_OK || pList->pList==0 );\n  assert( rc!=SQLITE_OK || pTask->file.iEof==iSz );\n  return rc;\n}\n\n/*\n** Advance the MergeEngine to its next entry.\n** Set *pbEof to true there is no next entry because\n** the MergeEngine has reached the end of all its inputs.\n**\n** Return SQLITE_OK if successful or an error code if an error occurs.\n*/\nstatic int vdbeMergeEngineStep(\n  MergeEngine *pMerger,      /* The merge engine to advance to the next row */\n  int *pbEof                 /* Set TRUE at EOF.  Set false for more content */\n){\n  int rc;\n  int iPrev = pMerger->aTree[1];/* Index of PmaReader to advance */\n  SortSubtask *pTask = pMerger->pTask;\n\n  /* Advance the current PmaReader */\n  rc = vdbePmaReaderNext(&pMerger->aReadr[iPrev]);\n\n  /* Update contents of aTree[] */\n  if( rc==SQLITE_OK ){\n    int i;                      /* Index of aTree[] to recalculate */\n    PmaReader *pReadr1;         /* First PmaReader to compare */\n    PmaReader *pReadr2;         /* Second PmaReader to compare */\n    int bCached = 0;\n\n    /* Find the first two PmaReaders to compare. The one that was just\n    ** advanced (iPrev) and the one next to it in the array.  */\n    pReadr1 = &pMerger->aReadr[(iPrev & 0xFFFE)];\n    pReadr2 = &pMerger->aReadr[(iPrev | 0x0001)];\n\n    for(i=(pMerger->nTree+iPrev)/2; i>0; i=i/2){\n      /* Compare pReadr1 and pReadr2. Store the result in variable iRes. */\n      int iRes;\n      if( pReadr1->pFd==0 ){\n        iRes = +1;\n      }else if( pReadr2->pFd==0 ){\n        iRes = -1;\n      }else{\n        iRes = pTask->xCompare(pTask, &bCached,\n            pReadr1->aKey, pReadr1->nKey, pReadr2->aKey, pReadr2->nKey\n        );\n      }\n\n      /* If pReadr1 contained the smaller value, set aTree[i] to its index.\n      ** Then set pReadr2 to the next PmaReader to compare to pReadr1. In this\n      ** case there is no cache of pReadr2 in pTask->pUnpacked, so set\n      ** pKey2 to point to the record belonging to pReadr2.\n      **\n      ** Alternatively, if pReadr2 contains the smaller of the two values,\n      ** set aTree[i] to its index and update pReadr1. If vdbeSorterCompare()\n      ** was actually called above, then pTask->pUnpacked now contains\n      ** a value equivalent to pReadr2. So set pKey2 to NULL to prevent\n      ** vdbeSorterCompare() from decoding pReadr2 again.\n      **\n      ** If the two values were equal, then the value from the oldest\n      ** PMA should be considered smaller. The VdbeSorter.aReadr[] array\n      ** is sorted from oldest to newest, so pReadr1 contains older values\n      ** than pReadr2 iff (pReadr1<pReadr2).  */\n      if( iRes<0 || (iRes==0 && pReadr1<pReadr2) ){\n        pMerger->aTree[i] = (int)(pReadr1 - pMerger->aReadr);\n        pReadr2 = &pMerger->aReadr[ pMerger->aTree[i ^ 0x0001] ];\n        bCached = 0;\n      }else{\n        if( pReadr1->pFd ) bCached = 0;\n        pMerger->aTree[i] = (int)(pReadr2 - pMerger->aReadr);\n        pReadr1 = &pMerger->aReadr[ pMerger->aTree[i ^ 0x0001] ];\n      }\n    }\n    *pbEof = (pMerger->aReadr[pMerger->aTree[1]].pFd==0);\n  }\n\n  return (rc==SQLITE_OK ? pTask->pUnpacked->errCode : rc);\n}\n\n#if SQLITE_MAX_WORKER_THREADS>0\n/*\n** The main routine for background threads that write level-0 PMAs.\n*/\nstatic void *vdbeSorterFlushThread(void *pCtx){\n  SortSubtask *pTask = (SortSubtask*)pCtx;\n  int rc;                         /* Return code */\n  assert( pTask->bDone==0 );\n  rc = vdbeSorterListToPMA(pTask, &pTask->list);\n  pTask->bDone = 1;\n  return SQLITE_INT_TO_PTR(rc);\n}\n#endif /* SQLITE_MAX_WORKER_THREADS>0 */\n\n/*\n** Flush the current contents of VdbeSorter.list to a new PMA, possibly\n** using a background thread.\n*/\nstatic int vdbeSorterFlushPMA(VdbeSorter *pSorter){\n#if SQLITE_MAX_WORKER_THREADS==0\n  pSorter->bUsePMA = 1;\n  return vdbeSorterListToPMA(&pSorter->aTask[0], &pSorter->list);\n#else\n  int rc = SQLITE_OK;\n  int i;\n  SortSubtask *pTask = 0;    /* Thread context used to create new PMA */\n  int nWorker = (pSorter->nTask-1);\n\n  /* Set the flag to indicate that at least one PMA has been written.\n  ** Or will be, anyhow.  */\n  pSorter->bUsePMA = 1;\n\n  /* Select a sub-task to sort and flush the current list of in-memory\n  ** records to disk. If the sorter is running in multi-threaded mode,\n  ** round-robin between the first (pSorter->nTask-1) tasks. Except, if\n  ** the background thread from a sub-tasks previous turn is still running,\n  ** skip it. If the first (pSorter->nTask-1) sub-tasks are all still busy,\n  ** fall back to using the final sub-task. The first (pSorter->nTask-1)\n  ** sub-tasks are preferred as they use background threads - the final\n  ** sub-task uses the main thread. */\n  for(i=0; i<nWorker; i++){\n    int iTest = (pSorter->iPrev + i + 1) % nWorker;\n    pTask = &pSorter->aTask[iTest];\n    if( pTask->bDone ){\n      rc = vdbeSorterJoinThread(pTask);\n    }\n    if( rc!=SQLITE_OK || pTask->pThread==0 ) break;\n  }\n\n  if( rc==SQLITE_OK ){\n    if( i==nWorker ){\n      /* Use the foreground thread for this operation */\n      rc = vdbeSorterListToPMA(&pSorter->aTask[nWorker], &pSorter->list);\n    }else{\n      /* Launch a background thread for this operation */\n      u8 *aMem;\n      void *pCtx;\n\n      assert( pTask!=0 );\n      assert( pTask->pThread==0 && pTask->bDone==0 );\n      assert( pTask->list.pList==0 );\n      assert( pTask->list.aMemory==0 || pSorter->list.aMemory!=0 );\n\n      aMem = pTask->list.aMemory;\n      pCtx = (void*)pTask;\n      pSorter->iPrev = (u8)(pTask - pSorter->aTask);\n      pTask->list = pSorter->list;\n      pSorter->list.pList = 0;\n      pSorter->list.szPMA = 0;\n      if( aMem ){\n        pSorter->list.aMemory = aMem;\n        pSorter->nMemory = sqlite3MallocSize(aMem);\n      }else if( pSorter->list.aMemory ){\n        pSorter->list.aMemory = sqlite3Malloc(pSorter->nMemory);\n        if( !pSorter->list.aMemory ) return SQLITE_NOMEM_BKPT;\n      }\n\n      rc = vdbeSorterCreateThread(pTask, vdbeSorterFlushThread, pCtx);\n    }\n  }\n\n  return rc;\n#endif /* SQLITE_MAX_WORKER_THREADS!=0 */\n}\n\n/*\n** Add a record to the sorter.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterWrite(\n  const VdbeCursor *pCsr,         /* Sorter cursor */\n  Mem *pVal                       /* Memory cell containing record */\n){\n  VdbeSorter *pSorter;\n  int rc = SQLITE_OK;             /* Return Code */\n  SorterRecord *pNew;             /* New list element */\n  int bFlush;                     /* True to flush contents of memory to PMA */\n  i64 nReq;                       /* Bytes of memory required */\n  i64 nPMA;                       /* Bytes of PMA space required */\n  int t;                          /* serial type of first record field */\n\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  getVarint32NR((const u8*)&pVal->z[1], t);\n  if( t>0 && t<10 && t!=7 ){\n    pSorter->typeMask &= SORTER_TYPE_INTEGER;\n  }else if( t>10 && (t & 0x01) ){\n    pSorter->typeMask &= SORTER_TYPE_TEXT;\n  }else{\n    pSorter->typeMask = 0;\n  }\n\n  assert( pSorter );\n\n  /* Figure out whether or not the current contents of memory should be\n  ** flushed to a PMA before continuing. If so, do so.\n  **\n  ** If using the single large allocation mode (pSorter->aMemory!=0), then\n  ** flush the contents of memory to a new PMA if (a) at least one value is\n  ** already in memory and (b) the new value will not fit in memory.\n  **\n  ** Or, if using separate allocations for each record, flush the contents\n  ** of memory to a PMA if either of the following are true:\n  **\n  **   * The total memory allocated for the in-memory list is greater\n  **     than (page-size * cache-size), or\n  **\n  **   * The total memory allocated for the in-memory list is greater\n  **     than (page-size * 10) and sqlite3HeapNearlyFull() returns true.\n  */\n  nReq = pVal->n + sizeof(SorterRecord);\n  nPMA = pVal->n + sqlite3VarintLen(pVal->n);\n  if( pSorter->mxPmaSize ){\n    if( pSorter->list.aMemory ){\n      bFlush = pSorter->iMemory && (pSorter->iMemory+nReq) > pSorter->mxPmaSize;\n    }else{\n      bFlush = (\n          (pSorter->list.szPMA > pSorter->mxPmaSize)\n       || (pSorter->list.szPMA > pSorter->mnPmaSize && sqlite3HeapNearlyFull())\n      );\n    }\n    if( bFlush ){\n      rc = vdbeSorterFlushPMA(pSorter);\n      pSorter->list.szPMA = 0;\n      pSorter->iMemory = 0;\n      assert( rc!=SQLITE_OK || pSorter->list.pList==0 );\n    }\n  }\n\n  pSorter->list.szPMA += nPMA;\n  if( nPMA>pSorter->mxKeysize ){\n    pSorter->mxKeysize = nPMA;\n  }\n\n  if( pSorter->list.aMemory ){\n    int nMin = pSorter->iMemory + nReq;\n\n    if( nMin>pSorter->nMemory ){\n      u8 *aNew;\n      sqlite3_int64 nNew = 2 * (sqlite3_int64)pSorter->nMemory;\n      int iListOff = -1;\n      if( pSorter->list.pList ){\n        iListOff = (u8*)pSorter->list.pList - pSorter->list.aMemory;\n      }\n      while( nNew < nMin ) nNew = nNew*2;\n      if( nNew > pSorter->mxPmaSize ) nNew = pSorter->mxPmaSize;\n      if( nNew < nMin ) nNew = nMin;\n      aNew = sqlite3Realloc(pSorter->list.aMemory, nNew);\n      if( !aNew ) return SQLITE_NOMEM_BKPT;\n      if( iListOff>=0 ){\n        pSorter->list.pList = (SorterRecord*)&aNew[iListOff];\n      }\n      pSorter->list.aMemory = aNew;\n      pSorter->nMemory = nNew;\n    }\n\n    pNew = (SorterRecord*)&pSorter->list.aMemory[pSorter->iMemory];\n    pSorter->iMemory += ROUND8(nReq);\n    if( pSorter->list.pList ){\n      pNew->u.iNext = (int)((u8*)(pSorter->list.pList) - pSorter->list.aMemory);\n    }\n  }else{\n    pNew = (SorterRecord *)sqlite3Malloc(nReq);\n    if( pNew==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    pNew->u.pNext = pSorter->list.pList;\n  }\n\n  memcpy(SRVAL(pNew), pVal->z, pVal->n);\n  pNew->nVal = pVal->n;\n  pSorter->list.pList = pNew;\n\n  return rc;\n}\n\n/*\n** Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format\n** of the data stored in aFile[1] is the same as that used by regular PMAs,\n** except that the number-of-bytes varint is omitted from the start.\n*/\nstatic int vdbeIncrPopulate(IncrMerger *pIncr){\n  int rc = SQLITE_OK;\n  int rc2;\n  i64 iStart = pIncr->iStartOff;\n  SorterFile *pOut = &pIncr->aFile[1];\n  SortSubtask *pTask = pIncr->pTask;\n  MergeEngine *pMerger = pIncr->pMerger;\n  PmaWriter writer;\n  assert( pIncr->bEof==0 );\n\n  vdbeSorterPopulateDebug(pTask, \"enter\");\n\n  vdbePmaWriterInit(pOut->pFd, &writer, pTask->pSorter->pgsz, iStart);\n  while( rc==SQLITE_OK ){\n    int dummy;\n    PmaReader *pReader = &pMerger->aReadr[ pMerger->aTree[1] ];\n    int nKey = pReader->nKey;\n    i64 iEof = writer.iWriteOff + writer.iBufEnd;\n\n    /* Check if the output file is full or if the input has been exhausted.\n    ** In either case exit the loop. */\n    if( pReader->pFd==0 ) break;\n    if( (iEof + nKey + sqlite3VarintLen(nKey))>(iStart + pIncr->mxSz) ) break;\n\n    /* Write the next key to the output. */\n    vdbePmaWriteVarint(&writer, nKey);\n    vdbePmaWriteBlob(&writer, pReader->aKey, nKey);\n    assert( pIncr->pMerger->pTask==pTask );\n    rc = vdbeMergeEngineStep(pIncr->pMerger, &dummy);\n  }\n\n  rc2 = vdbePmaWriterFinish(&writer, &pOut->iEof, &pTask->nSpill);\n  if( rc==SQLITE_OK ) rc = rc2;\n  vdbeSorterPopulateDebug(pTask, \"exit\");\n  return rc;\n}\n\n#if SQLITE_MAX_WORKER_THREADS>0\n/*\n** The main routine for background threads that populate aFile[1] of\n** multi-threaded IncrMerger objects.\n*/\nstatic void *vdbeIncrPopulateThread(void *pCtx){\n  IncrMerger *pIncr = (IncrMerger*)pCtx;\n  void *pRet = SQLITE_INT_TO_PTR( vdbeIncrPopulate(pIncr) );\n  pIncr->pTask->bDone = 1;\n  return pRet;\n}\n\n/*\n** Launch a background thread to populate aFile[1] of pIncr.\n*/\nstatic int vdbeIncrBgPopulate(IncrMerger *pIncr){\n  void *p = (void*)pIncr;\n  assert( pIncr->bUseThread );\n  return vdbeSorterCreateThread(pIncr->pTask, vdbeIncrPopulateThread, p);\n}\n#endif\n\n/*\n** This function is called when the PmaReader corresponding to pIncr has\n** finished reading the contents of aFile[0]. Its purpose is to \"refill\"\n** aFile[0] such that the PmaReader should start rereading it from the\n** beginning.\n**\n** For single-threaded objects, this is accomplished by literally reading\n** keys from pIncr->pMerger and repopulating aFile[0].\n**\n** For multi-threaded objects, all that is required is to wait until the\n** background thread is finished (if it is not already) and then swap\n** aFile[0] and aFile[1] in place. If the contents of pMerger have not\n** been exhausted, this function also launches a new background thread\n** to populate the new aFile[1].\n**\n** SQLITE_OK is returned on success, or an SQLite error code otherwise.\n*/\nstatic int vdbeIncrSwap(IncrMerger *pIncr){\n  int rc = SQLITE_OK;\n\n#if SQLITE_MAX_WORKER_THREADS>0\n  if( pIncr->bUseThread ){\n    rc = vdbeSorterJoinThread(pIncr->pTask);\n\n    if( rc==SQLITE_OK ){\n      SorterFile f0 = pIncr->aFile[0];\n      pIncr->aFile[0] = pIncr->aFile[1];\n      pIncr->aFile[1] = f0;\n    }\n\n    if( rc==SQLITE_OK ){\n      if( pIncr->aFile[0].iEof==pIncr->iStartOff ){\n        pIncr->bEof = 1;\n      }else{\n        rc = vdbeIncrBgPopulate(pIncr);\n      }\n    }\n  }else\n#endif\n  {\n    rc = vdbeIncrPopulate(pIncr);\n    pIncr->aFile[0] = pIncr->aFile[1];\n    if( pIncr->aFile[0].iEof==pIncr->iStartOff ){\n      pIncr->bEof = 1;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Allocate and return a new IncrMerger object to read data from pMerger.\n**\n** If an OOM condition is encountered, return NULL. In this case free the\n** pMerger argument before returning.\n*/\nstatic int vdbeIncrMergerNew(\n  SortSubtask *pTask,     /* The thread that will be using the new IncrMerger */\n  MergeEngine *pMerger,   /* The MergeEngine that the IncrMerger will control */\n  IncrMerger **ppOut      /* Write the new IncrMerger here */\n){\n  int rc = SQLITE_OK;\n  IncrMerger *pIncr = *ppOut = (IncrMerger*)\n       (sqlite3FaultSim(100) ? 0 : sqlite3MallocZero(sizeof(*pIncr)));\n  if( pIncr ){\n    pIncr->pMerger = pMerger;\n    pIncr->pTask = pTask;\n    pIncr->mxSz = MAX(pTask->pSorter->mxKeysize+9,pTask->pSorter->mxPmaSize/2);\n    pTask->file2.iEof += pIncr->mxSz;\n  }else{\n    vdbeMergeEngineFree(pMerger);\n    rc = SQLITE_NOMEM_BKPT;\n  }\n  assert( *ppOut!=0 || rc!=SQLITE_OK );\n  return rc;\n}\n\n#if SQLITE_MAX_WORKER_THREADS>0\n/*\n** Set the \"use-threads\" flag on object pIncr.\n*/\nstatic void vdbeIncrMergerSetThreads(IncrMerger *pIncr){\n  pIncr->bUseThread = 1;\n  pIncr->pTask->file2.iEof -= pIncr->mxSz;\n}\n#endif /* SQLITE_MAX_WORKER_THREADS>0 */\n\n\n\n/*\n** Recompute pMerger->aTree[iOut] by comparing the next keys on the\n** two PmaReaders that feed that entry.  Neither of the PmaReaders\n** are advanced.  This routine merely does the comparison.\n*/\nstatic void vdbeMergeEngineCompare(\n  MergeEngine *pMerger,  /* Merge engine containing PmaReaders to compare */\n  int iOut               /* Store the result in pMerger->aTree[iOut] */\n){\n  int i1;\n  int i2;\n  int iRes;\n  PmaReader *p1;\n  PmaReader *p2;\n\n  assert( iOut<pMerger->nTree && iOut>0 );\n\n  if( iOut>=(pMerger->nTree/2) ){\n    i1 = (iOut - pMerger->nTree/2) * 2;\n    i2 = i1 + 1;\n  }else{\n    i1 = pMerger->aTree[iOut*2];\n    i2 = pMerger->aTree[iOut*2+1];\n  }\n\n  p1 = &pMerger->aReadr[i1];\n  p2 = &pMerger->aReadr[i2];\n\n  if( p1->pFd==0 ){\n    iRes = i2;\n  }else if( p2->pFd==0 ){\n    iRes = i1;\n  }else{\n    SortSubtask *pTask = pMerger->pTask;\n    int bCached = 0;\n    int res;\n    assert( pTask->pUnpacked!=0 );  /* from vdbeSortSubtaskMain() */\n    res = pTask->xCompare(\n        pTask, &bCached, p1->aKey, p1->nKey, p2->aKey, p2->nKey\n    );\n    if( res<=0 ){\n      iRes = i1;\n    }else{\n      iRes = i2;\n    }\n  }\n\n  pMerger->aTree[iOut] = iRes;\n}\n\n/*\n** Allowed values for the eMode parameter to vdbeMergeEngineInit()\n** and vdbePmaReaderIncrMergeInit().\n**\n** Only INCRINIT_NORMAL is valid in single-threaded builds (when\n** SQLITE_MAX_WORKER_THREADS==0).  The other values are only used\n** when there exists one or more separate worker threads.\n*/\n#define INCRINIT_NORMAL 0\n#define INCRINIT_TASK   1\n#define INCRINIT_ROOT   2\n\n/*\n** Forward reference required as the vdbeIncrMergeInit() and\n** vdbePmaReaderIncrInit() routines are called mutually recursively when\n** building a merge tree.\n*/\nstatic int vdbePmaReaderIncrInit(PmaReader *pReadr, int eMode);\n\n/*\n** Initialize the MergeEngine object passed as the second argument. Once this\n** function returns, the first key of merged data may be read from the\n** MergeEngine object in the usual fashion.\n**\n** If argument eMode is INCRINIT_ROOT, then it is assumed that any IncrMerge\n** objects attached to the PmaReader objects that the merger reads from have\n** already been populated, but that they have not yet populated aFile[0] and\n** set the PmaReader objects up to read from it. In this case all that is\n** required is to call vdbePmaReaderNext() on each PmaReader to point it at\n** its first key.\n**\n** Otherwise, if eMode is any value other than INCRINIT_ROOT, then use\n** vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data\n** to pMerger.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nstatic int vdbeMergeEngineInit(\n  SortSubtask *pTask,             /* Thread that will run pMerger */\n  MergeEngine *pMerger,           /* MergeEngine to initialize */\n  int eMode                       /* One of the INCRINIT_XXX constants */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* For looping over PmaReader objects */\n  int nTree;                      /* Number of subtrees to merge */\n\n  /* Failure to allocate the merge would have been detected prior to\n  ** invoking this routine */\n  assert( pMerger!=0 );\n\n  /* eMode is always INCRINIT_NORMAL in single-threaded mode */\n  assert( SQLITE_MAX_WORKER_THREADS>0 || eMode==INCRINIT_NORMAL );\n\n  /* Verify that the MergeEngine is assigned to a single thread */\n  assert( pMerger->pTask==0 );\n  pMerger->pTask = pTask;\n\n  nTree = pMerger->nTree;\n  for(i=0; i<nTree; i++){\n    if( SQLITE_MAX_WORKER_THREADS>0 && eMode==INCRINIT_ROOT ){\n      /* PmaReaders should be normally initialized in order, as if they are\n      ** reading from the same temp file this makes for more linear file IO.\n      ** However, in the INCRINIT_ROOT case, if PmaReader aReadr[nTask-1] is\n      ** in use it will block the vdbePmaReaderNext() call while it uses\n      ** the main thread to fill its buffer. So calling PmaReaderNext()\n      ** on this PmaReader before any of the multi-threaded PmaReaders takes\n      ** better advantage of multi-processor hardware. */\n      rc = vdbePmaReaderNext(&pMerger->aReadr[nTree-i-1]);\n    }else{\n      rc = vdbePmaReaderIncrInit(&pMerger->aReadr[i], INCRINIT_NORMAL);\n    }\n    if( rc!=SQLITE_OK ) return rc;\n  }\n\n  for(i=pMerger->nTree-1; i>0; i--){\n    vdbeMergeEngineCompare(pMerger, i);\n  }\n  return pTask->pUnpacked->errCode;\n}\n\n/*\n** The PmaReader passed as the first argument is guaranteed to be an\n** incremental-reader (pReadr->pIncr!=0). This function serves to open\n** and/or initialize the temp file related fields of the IncrMerge\n** object at (pReadr->pIncr).\n**\n** If argument eMode is set to INCRINIT_NORMAL, then all PmaReaders\n** in the sub-tree headed by pReadr are also initialized. Data is then\n** loaded into the buffers belonging to pReadr and it is set to point to\n** the first key in its range.\n**\n** If argument eMode is set to INCRINIT_TASK, then pReadr is guaranteed\n** to be a multi-threaded PmaReader and this function is being called in a\n** background thread. In this case all PmaReaders in the sub-tree are\n** initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to\n** pReadr is populated. However, pReadr itself is not set up to point\n** to its first key. A call to vdbePmaReaderNext() is still required to do\n** that.\n**\n** The reason this function does not call vdbePmaReaderNext() immediately\n** in the INCRINIT_TASK case is that vdbePmaReaderNext() assumes that it has\n** to block on thread (pTask->thread) before accessing aFile[1]. But, since\n** this entire function is being run by thread (pTask->thread), that will\n** lead to the current background thread attempting to join itself.\n**\n** Finally, if argument eMode is set to INCRINIT_ROOT, it may be assumed\n** that pReadr->pIncr is a multi-threaded IncrMerge objects, and that all\n** child-trees have already been initialized using IncrInit(INCRINIT_TASK).\n** In this case vdbePmaReaderNext() is called on all child PmaReaders and\n** the current PmaReader set to point to the first key in its range.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nstatic int vdbePmaReaderIncrMergeInit(PmaReader *pReadr, int eMode){\n  int rc = SQLITE_OK;\n  IncrMerger *pIncr = pReadr->pIncr;\n  SortSubtask *pTask = pIncr->pTask;\n  sqlite3 *db = pTask->pSorter->db;\n\n  /* eMode is always INCRINIT_NORMAL in single-threaded mode */\n  assert( SQLITE_MAX_WORKER_THREADS>0 || eMode==INCRINIT_NORMAL );\n\n  rc = vdbeMergeEngineInit(pTask, pIncr->pMerger, eMode);\n\n  /* Set up the required files for pIncr. A multi-threaded IncrMerge object\n  ** requires two temp files to itself, whereas a single-threaded object\n  ** only requires a region of pTask->file2. */\n  if( rc==SQLITE_OK ){\n    int mxSz = pIncr->mxSz;\n#if SQLITE_MAX_WORKER_THREADS>0\n    if( pIncr->bUseThread ){\n      rc = vdbeSorterOpenTempFile(db, mxSz, &pIncr->aFile[0].pFd);\n      if( rc==SQLITE_OK ){\n        rc = vdbeSorterOpenTempFile(db, mxSz, &pIncr->aFile[1].pFd);\n      }\n    }else\n#endif\n    /*if( !pIncr->bUseThread )*/{\n      if( pTask->file2.pFd==0 ){\n        assert( pTask->file2.iEof>0 );\n        rc = vdbeSorterOpenTempFile(db, pTask->file2.iEof, &pTask->file2.pFd);\n        pTask->file2.iEof = 0;\n      }\n      if( rc==SQLITE_OK ){\n        pIncr->aFile[1].pFd = pTask->file2.pFd;\n        pIncr->iStartOff = pTask->file2.iEof;\n        pTask->file2.iEof += mxSz;\n      }\n    }\n  }\n\n#if SQLITE_MAX_WORKER_THREADS>0\n  if( rc==SQLITE_OK && pIncr->bUseThread ){\n    /* Use the current thread to populate aFile[1], even though this\n    ** PmaReader is multi-threaded. If this is an INCRINIT_TASK object,\n    ** then this function is already running in background thread\n    ** pIncr->pTask->thread.\n    **\n    ** If this is the INCRINIT_ROOT object, then it is running in the\n    ** main VDBE thread. But that is Ok, as that thread cannot return\n    ** control to the VDBE or proceed with anything useful until the\n    ** first results are ready from this merger object anyway.\n    */\n    assert( eMode==INCRINIT_ROOT || eMode==INCRINIT_TASK );\n    rc = vdbeIncrPopulate(pIncr);\n  }\n#endif\n\n  if( rc==SQLITE_OK && (SQLITE_MAX_WORKER_THREADS==0 || eMode!=INCRINIT_TASK) ){\n    rc = vdbePmaReaderNext(pReadr);\n  }\n\n  return rc;\n}\n\n#if SQLITE_MAX_WORKER_THREADS>0\n/*\n** The main routine for vdbePmaReaderIncrMergeInit() operations run in\n** background threads.\n*/\nstatic void *vdbePmaReaderBgIncrInit(void *pCtx){\n  PmaReader *pReader = (PmaReader*)pCtx;\n  void *pRet = SQLITE_INT_TO_PTR(\n                  vdbePmaReaderIncrMergeInit(pReader,INCRINIT_TASK)\n               );\n  pReader->pIncr->pTask->bDone = 1;\n  return pRet;\n}\n#endif\n\n/*\n** If the PmaReader passed as the first argument is not an incremental-reader\n** (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes\n** the vdbePmaReaderIncrMergeInit() function with the parameters passed to\n** this routine to initialize the incremental merge.\n**\n** If the IncrMerger object is multi-threaded (IncrMerger.bUseThread==1),\n** then a background thread is launched to call vdbePmaReaderIncrMergeInit().\n** Or, if the IncrMerger is single threaded, the same function is called\n** using the current thread.\n*/\nstatic int vdbePmaReaderIncrInit(PmaReader *pReadr, int eMode){\n  IncrMerger *pIncr = pReadr->pIncr;   /* Incremental merger */\n  int rc = SQLITE_OK;                  /* Return code */\n  if( pIncr ){\n#if SQLITE_MAX_WORKER_THREADS>0\n    assert( pIncr->bUseThread==0 || eMode==INCRINIT_TASK );\n    if( pIncr->bUseThread ){\n      void *pCtx = (void*)pReadr;\n      rc = vdbeSorterCreateThread(pIncr->pTask, vdbePmaReaderBgIncrInit, pCtx);\n    }else\n#endif\n    {\n      rc = vdbePmaReaderIncrMergeInit(pReadr, eMode);\n    }\n  }\n  return rc;\n}\n\n/*\n** Allocate a new MergeEngine object to merge the contents of nPMA level-0\n** PMAs from pTask->file. If no error occurs, set *ppOut to point to\n** the new object and return SQLITE_OK. Or, if an error does occur, set *ppOut\n** to NULL and return an SQLite error code.\n**\n** When this function is called, *piOffset is set to the offset of the\n** first PMA to read from pTask->file. Assuming no error occurs, it is\n** set to the offset immediately following the last byte of the last\n** PMA before returning. If an error does occur, then the final value of\n** *piOffset is undefined.\n*/\nstatic int vdbeMergeEngineLevel0(\n  SortSubtask *pTask,             /* Sorter task to read from */\n  int nPMA,                       /* Number of PMAs to read */\n  i64 *piOffset,                  /* IN/OUT: Readr offset in pTask->file */\n  MergeEngine **ppOut             /* OUT: New merge-engine */\n){\n  MergeEngine *pNew;              /* Merge engine to return */\n  i64 iOff = *piOffset;\n  int i;\n  int rc = SQLITE_OK;\n\n  *ppOut = pNew = vdbeMergeEngineNew(nPMA);\n  if( pNew==0 ) rc = SQLITE_NOMEM_BKPT;\n\n  for(i=0; i<nPMA && rc==SQLITE_OK; i++){\n    i64 nDummy = 0;\n    PmaReader *pReadr = &pNew->aReadr[i];\n    rc = vdbePmaReaderInit(pTask, &pTask->file, iOff, pReadr, &nDummy);\n    iOff = pReadr->iEof;\n  }\n\n  if( rc!=SQLITE_OK ){\n    vdbeMergeEngineFree(pNew);\n    *ppOut = 0;\n  }\n  *piOffset = iOff;\n  return rc;\n}\n\n/*\n** Return the depth of a tree comprising nPMA PMAs, assuming a fanout of\n** SORTER_MAX_MERGE_COUNT. The returned value does not include leaf nodes.\n**\n** i.e.\n**\n**   nPMA<=16    -> TreeDepth() == 0\n**   nPMA<=256   -> TreeDepth() == 1\n**   nPMA<=65536 -> TreeDepth() == 2\n*/\nstatic int vdbeSorterTreeDepth(int nPMA){\n  int nDepth = 0;\n  i64 nDiv = SORTER_MAX_MERGE_COUNT;\n  while( nDiv < (i64)nPMA ){\n    nDiv = nDiv * SORTER_MAX_MERGE_COUNT;\n    nDepth++;\n  }\n  return nDepth;\n}\n\n/*\n** pRoot is the root of an incremental merge-tree with depth nDepth (according\n** to vdbeSorterTreeDepth()). pLeaf is the iSeq'th leaf to be added to the\n** tree, counting from zero. This function adds pLeaf to the tree.\n**\n** If successful, SQLITE_OK is returned. If an error occurs, an SQLite error\n** code is returned and pLeaf is freed.\n*/\nstatic int vdbeSorterAddToTree(\n  SortSubtask *pTask,             /* Task context */\n  int nDepth,                     /* Depth of tree according to TreeDepth() */\n  int iSeq,                       /* Sequence number of leaf within tree */\n  MergeEngine *pRoot,             /* Root of tree */\n  MergeEngine *pLeaf              /* Leaf to add to tree */\n){\n  int rc = SQLITE_OK;\n  int nDiv = 1;\n  int i;\n  MergeEngine *p = pRoot;\n  IncrMerger *pIncr;\n\n  rc = vdbeIncrMergerNew(pTask, pLeaf, &pIncr);\n\n  for(i=1; i<nDepth; i++){\n    nDiv = nDiv * SORTER_MAX_MERGE_COUNT;\n  }\n\n  for(i=1; i<nDepth && rc==SQLITE_OK; i++){\n    int iIter = (iSeq / nDiv) % SORTER_MAX_MERGE_COUNT;\n    PmaReader *pReadr = &p->aReadr[iIter];\n\n    if( pReadr->pIncr==0 ){\n      MergeEngine *pNew = vdbeMergeEngineNew(SORTER_MAX_MERGE_COUNT);\n      if( pNew==0 ){\n        rc = SQLITE_NOMEM_BKPT;\n      }else{\n        rc = vdbeIncrMergerNew(pTask, pNew, &pReadr->pIncr);\n      }\n    }\n    if( rc==SQLITE_OK ){\n      p = pReadr->pIncr->pMerger;\n      nDiv = nDiv / SORTER_MAX_MERGE_COUNT;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    p->aReadr[iSeq % SORTER_MAX_MERGE_COUNT].pIncr = pIncr;\n  }else{\n    vdbeIncrFree(pIncr);\n  }\n  return rc;\n}\n\n/*\n** This function is called as part of a SorterRewind() operation on a sorter\n** that has already written two or more level-0 PMAs to one or more temp\n** files. It builds a tree of MergeEngine/IncrMerger/PmaReader objects that\n** can be used to incrementally merge all PMAs on disk.\n**\n** If successful, SQLITE_OK is returned and *ppOut set to point to the\n** MergeEngine object at the root of the tree before returning. Or, if an\n** error occurs, an SQLite error code is returned and the final value\n** of *ppOut is undefined.\n*/\nstatic int vdbeSorterMergeTreeBuild(\n  VdbeSorter *pSorter,       /* The VDBE cursor that implements the sort */\n  MergeEngine **ppOut        /* Write the MergeEngine here */\n){\n  MergeEngine *pMain = 0;\n  int rc = SQLITE_OK;\n  int iTask;\n\n#if SQLITE_MAX_WORKER_THREADS>0\n  /* If the sorter uses more than one task, then create the top-level\n  ** MergeEngine here. This MergeEngine will read data from exactly\n  ** one PmaReader per sub-task.  */\n  assert( pSorter->bUseThreads || pSorter->nTask==1 );\n  if( pSorter->nTask>1 ){\n    pMain = vdbeMergeEngineNew(pSorter->nTask);\n    if( pMain==0 ) rc = SQLITE_NOMEM_BKPT;\n  }\n#endif\n\n  for(iTask=0; rc==SQLITE_OK && iTask<pSorter->nTask; iTask++){\n    SortSubtask *pTask = &pSorter->aTask[iTask];\n    assert( pTask->nPMA>0 || SQLITE_MAX_WORKER_THREADS>0 );\n    if( SQLITE_MAX_WORKER_THREADS==0 || pTask->nPMA ){\n      MergeEngine *pRoot = 0;     /* Root node of tree for this task */\n      int nDepth = vdbeSorterTreeDepth(pTask->nPMA);\n      i64 iReadOff = 0;\n\n      if( pTask->nPMA<=SORTER_MAX_MERGE_COUNT ){\n        rc = vdbeMergeEngineLevel0(pTask, pTask->nPMA, &iReadOff, &pRoot);\n      }else{\n        int i;\n        int iSeq = 0;\n        pRoot = vdbeMergeEngineNew(SORTER_MAX_MERGE_COUNT);\n        if( pRoot==0 ) rc = SQLITE_NOMEM_BKPT;\n        for(i=0; i<pTask->nPMA && rc==SQLITE_OK; i += SORTER_MAX_MERGE_COUNT){\n          MergeEngine *pMerger = 0; /* New level-0 PMA merger */\n          int nReader;              /* Number of level-0 PMAs to merge */\n\n          nReader = MIN(pTask->nPMA - i, SORTER_MAX_MERGE_COUNT);\n          rc = vdbeMergeEngineLevel0(pTask, nReader, &iReadOff, &pMerger);\n          if( rc==SQLITE_OK ){\n            rc = vdbeSorterAddToTree(pTask, nDepth, iSeq++, pRoot, pMerger);\n          }\n        }\n      }\n\n      if( rc==SQLITE_OK ){\n#if SQLITE_MAX_WORKER_THREADS>0\n        if( pMain!=0 ){\n          rc = vdbeIncrMergerNew(pTask, pRoot, &pMain->aReadr[iTask].pIncr);\n        }else\n#endif\n        {\n          assert( pMain==0 );\n          pMain = pRoot;\n        }\n      }else{\n        vdbeMergeEngineFree(pRoot);\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    vdbeMergeEngineFree(pMain);\n    pMain = 0;\n  }\n  *ppOut = pMain;\n  return rc;\n}\n\n/*\n** This function is called as part of an sqlite3VdbeSorterRewind() operation\n** on a sorter that has written two or more PMAs to temporary files. It sets\n** up either VdbeSorter.pMerger (for single threaded sorters) or pReader\n** (for multi-threaded sorters) so that it can be used to iterate through\n** all records stored in the sorter.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nstatic int vdbeSorterSetupMerge(VdbeSorter *pSorter){\n  int rc;                         /* Return code */\n  SortSubtask *pTask0 = &pSorter->aTask[0];\n  MergeEngine *pMain = 0;\n#if SQLITE_MAX_WORKER_THREADS\n  sqlite3 *db = pTask0->pSorter->db;\n  int i;\n  SorterCompare xCompare = vdbeSorterGetCompare(pSorter);\n  for(i=0; i<pSorter->nTask; i++){\n    pSorter->aTask[i].xCompare = xCompare;\n  }\n#endif\n\n  rc = vdbeSorterMergeTreeBuild(pSorter, &pMain);\n  if( rc==SQLITE_OK ){\n#if SQLITE_MAX_WORKER_THREADS\n    assert( pSorter->bUseThreads==0 || pSorter->nTask>1 );\n    if( pSorter->bUseThreads ){\n      int iTask;\n      PmaReader *pReadr = 0;\n      SortSubtask *pLast = &pSorter->aTask[pSorter->nTask-1];\n      rc = vdbeSortAllocUnpacked(pLast);\n      if( rc==SQLITE_OK ){\n        pReadr = (PmaReader*)sqlite3DbMallocZero(db, sizeof(PmaReader));\n        pSorter->pReader = pReadr;\n        if( pReadr==0 ) rc = SQLITE_NOMEM_BKPT;\n      }\n      if( rc==SQLITE_OK ){\n        rc = vdbeIncrMergerNew(pLast, pMain, &pReadr->pIncr);\n        if( rc==SQLITE_OK ){\n          vdbeIncrMergerSetThreads(pReadr->pIncr);\n          for(iTask=0; iTask<(pSorter->nTask-1); iTask++){\n            IncrMerger *pIncr;\n            if( (pIncr = pMain->aReadr[iTask].pIncr) ){\n              vdbeIncrMergerSetThreads(pIncr);\n              assert( pIncr->pTask!=pLast );\n            }\n          }\n          for(iTask=0; rc==SQLITE_OK && iTask<pSorter->nTask; iTask++){\n            /* Check that:\n            **\n            **   a) The incremental merge object is configured to use the\n            **      right task, and\n            **   b) If it is using task (nTask-1), it is configured to run\n            **      in single-threaded mode. This is important, as the\n            **      root merge (INCRINIT_ROOT) will be using the same task\n            **      object.\n            */\n            PmaReader *p = &pMain->aReadr[iTask];\n            assert( p->pIncr==0 || (\n                (p->pIncr->pTask==&pSorter->aTask[iTask])             /* a */\n             && (iTask!=pSorter->nTask-1 || p->pIncr->bUseThread==0)  /* b */\n            ));\n            rc = vdbePmaReaderIncrInit(p, INCRINIT_TASK);\n          }\n        }\n        pMain = 0;\n      }\n      if( rc==SQLITE_OK ){\n        rc = vdbePmaReaderIncrMergeInit(pReadr, INCRINIT_ROOT);\n      }\n    }else\n#endif\n    {\n      rc = vdbeMergeEngineInit(pTask0, pMain, INCRINIT_NORMAL);\n      pSorter->pMerger = pMain;\n      pMain = 0;\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    vdbeMergeEngineFree(pMain);\n  }\n  return rc;\n}\n\n\n/*\n** Once the sorter has been populated by calls to sqlite3VdbeSorterWrite,\n** this function is called to prepare for iterating through the records\n** in sorted order.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterRewind(const VdbeCursor *pCsr, int *pbEof){\n  VdbeSorter *pSorter;\n  int rc = SQLITE_OK;             /* Return code */\n\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  assert( pSorter );\n\n  /* If no data has been written to disk, then do not do so now. Instead,\n  ** sort the VdbeSorter.pRecord list. The vdbe layer will read data directly\n  ** from the in-memory list.  */\n  if( pSorter->bUsePMA==0 ){\n    if( pSorter->list.pList ){\n      *pbEof = 0;\n      rc = vdbeSorterSort(&pSorter->aTask[0], &pSorter->list);\n    }else{\n      *pbEof = 1;\n    }\n    return rc;\n  }\n\n  /* Write the current in-memory list to a PMA. When the VdbeSorterWrite()\n  ** function flushes the contents of memory to disk, it immediately always\n  ** creates a new list consisting of a single key immediately afterwards.\n  ** So the list is never empty at this point.  */\n  assert( pSorter->list.pList );\n  rc = vdbeSorterFlushPMA(pSorter);\n\n  /* Join all threads */\n  rc = vdbeSorterJoinAll(pSorter, rc);\n\n  vdbeSorterRewindDebug(\"rewind\");\n\n  /* Assuming no errors have occurred, set up a merger structure to\n  ** incrementally read and merge all remaining PMAs.  */\n  assert( pSorter->pReader==0 );\n  if( rc==SQLITE_OK ){\n    rc = vdbeSorterSetupMerge(pSorter);\n    *pbEof = 0;\n  }\n\n  vdbeSorterRewindDebug(\"rewinddone\");\n  return rc;\n}\n\n/*\n** Advance to the next element in the sorter.  Return value:\n**\n**    SQLITE_OK     success\n**    SQLITE_DONE   end of data\n**    otherwise     some kind of error.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr){\n  VdbeSorter *pSorter;\n  int rc;                         /* Return code */\n\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  assert( pSorter->bUsePMA || (pSorter->pReader==0 && pSorter->pMerger==0) );\n  if( pSorter->bUsePMA ){\n    assert( pSorter->pReader==0 || pSorter->pMerger==0 );\n    assert( pSorter->bUseThreads==0 || pSorter->pReader );\n    assert( pSorter->bUseThreads==1 || pSorter->pMerger );\n#if SQLITE_MAX_WORKER_THREADS>0\n    if( pSorter->bUseThreads ){\n      rc = vdbePmaReaderNext(pSorter->pReader);\n      if( rc==SQLITE_OK && pSorter->pReader->pFd==0 ) rc = SQLITE_DONE;\n    }else\n#endif\n    /*if( !pSorter->bUseThreads )*/ {\n      int res = 0;\n      assert( pSorter->pMerger!=0 );\n      assert( pSorter->pMerger->pTask==(&pSorter->aTask[0]) );\n      rc = vdbeMergeEngineStep(pSorter->pMerger, &res);\n      if( rc==SQLITE_OK && res ) rc = SQLITE_DONE;\n    }\n  }else{\n    SorterRecord *pFree = pSorter->list.pList;\n    pSorter->list.pList = pFree->u.pNext;\n    pFree->u.pNext = 0;\n    if( pSorter->list.aMemory==0 ) vdbeSorterRecordFree(db, pFree);\n    rc = pSorter->list.pList ? SQLITE_OK : SQLITE_DONE;\n  }\n  return rc;\n}\n\n/*\n** Return a pointer to a buffer owned by the sorter that contains the\n** current key.\n*/\nstatic void *vdbeSorterRowkey(\n  const VdbeSorter *pSorter,      /* Sorter object */\n  int *pnKey                      /* OUT: Size of current key in bytes */\n){\n  void *pKey;\n  if( pSorter->bUsePMA ){\n    PmaReader *pReader;\n#if SQLITE_MAX_WORKER_THREADS>0\n    if( pSorter->bUseThreads ){\n      pReader = pSorter->pReader;\n    }else\n#endif\n    /*if( !pSorter->bUseThreads )*/{\n      pReader = &pSorter->pMerger->aReadr[pSorter->pMerger->aTree[1]];\n    }\n    *pnKey = pReader->nKey;\n    pKey = pReader->aKey;\n  }else{\n    *pnKey = pSorter->list.pList->nVal;\n    pKey = SRVAL(pSorter->list.pList);\n  }\n  return pKey;\n}\n\n/*\n** Copy the current sorter key into the memory cell pOut.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterRowkey(const VdbeCursor *pCsr, Mem *pOut){\n  VdbeSorter *pSorter;\n  void *pKey; int nKey;           /* Sorter key to copy into pOut */\n\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  pKey = vdbeSorterRowkey(pSorter, &nKey);\n  if( sqlite3VdbeMemClearAndResize(pOut, nKey) ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  pOut->n = nKey;\n  MemSetTypeFlag(pOut, MEM_Blob);\n  memcpy(pOut->z, pKey, nKey);\n\n  return SQLITE_OK;\n}\n\n/*\n** Compare the key in memory cell pVal with the key that the sorter cursor\n** passed as the first argument currently points to. For the purposes of\n** the comparison, ignore the rowid field at the end of each record.\n**\n** If the sorter cursor key contains any NULL values, consider it to be\n** less than pVal. Even if pVal also contains NULL values.\n**\n** If an error occurs, return an SQLite error code (i.e. SQLITE_NOMEM).\n** Otherwise, set *pRes to a negative, zero or positive value if the\n** key in pVal is smaller than, equal to or larger than the current sorter\n** key.\n**\n** This routine forms the core of the OP_SorterCompare opcode, which in\n** turn is used to verify uniqueness when constructing a UNIQUE INDEX.\n*/\nSQLITE_PRIVATE int sqlite3VdbeSorterCompare(\n  const VdbeCursor *pCsr,         /* Sorter cursor */\n  Mem *pVal,                      /* Value to compare to current sorter key */\n  int nKeyCol,                    /* Compare this many columns */\n  int *pRes                       /* OUT: Result of comparison */\n){\n  VdbeSorter *pSorter;\n  UnpackedRecord *r2;\n  KeyInfo *pKeyInfo;\n  int i;\n  void *pKey; int nKey;           /* Sorter key to compare pVal with */\n\n  assert( pCsr->eCurType==CURTYPE_SORTER );\n  pSorter = pCsr->uc.pSorter;\n  r2 = pSorter->pUnpacked;\n  pKeyInfo = pCsr->pKeyInfo;\n  if( r2==0 ){\n    r2 = pSorter->pUnpacked = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);\n    if( r2==0 ) return SQLITE_NOMEM_BKPT;\n    r2->nField = nKeyCol;\n  }\n  assert( r2->nField==nKeyCol );\n\n  pKey = vdbeSorterRowkey(pSorter, &nKey);\n  sqlite3VdbeRecordUnpack(nKey, pKey, r2);\n  for(i=0; i<nKeyCol; i++){\n    if( r2->aMem[i].flags & MEM_Null ){\n      *pRes = -1;\n      return SQLITE_OK;\n    }\n  }\n\n  *pRes = sqlite3VdbeRecordCompare(pVal->n, pVal->z, r2);\n  return SQLITE_OK;\n}\n\n/************** End of vdbesort.c ********************************************/\n/************** Begin file vdbevtab.c ****************************************/\n/*\n** 2020-03-23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file implements virtual-tables for examining the bytecode content\n** of a prepared statement.\n*/\n/* #include \"sqliteInt.h\" */\n#if defined(SQLITE_ENABLE_BYTECODE_VTAB) && !defined(SQLITE_OMIT_VIRTUALTABLE)\n/* #include \"vdbeInt.h\" */\n\n/* An instance of the bytecode() table-valued function.\n*/\ntypedef struct bytecodevtab bytecodevtab;\nstruct bytecodevtab {\n  sqlite3_vtab base;     /* Base class - must be first */\n  sqlite3 *db;           /* Database connection */\n  int bTablesUsed;       /* 2 for tables_used().  0 for bytecode(). */\n};\n\n/* A cursor for scanning through the bytecode\n*/\ntypedef struct bytecodevtab_cursor bytecodevtab_cursor;\nstruct bytecodevtab_cursor {\n  sqlite3_vtab_cursor base;  /* Base class - must be first */\n  sqlite3_stmt *pStmt;       /* The statement whose bytecode is displayed */\n  int iRowid;                /* The rowid of the output table */\n  int iAddr;                 /* Address */\n  int needFinalize;          /* Cursors owns pStmt and must finalize it */\n  int showSubprograms;       /* Provide a listing of subprograms */\n  Op *aOp;                   /* Operand array */\n  char *zP4;                 /* Rendered P4 value */\n  const char *zType;         /* tables_used.type */\n  const char *zSchema;       /* tables_used.schema */\n  const char *zName;         /* tables_used.name */\n  Mem sub;                   /* Subprograms */\n};\n\n/*\n** Create a new bytecode() table-valued function.\n*/\nstatic int bytecodevtabConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  bytecodevtab *pNew;\n  int rc;\n  int isTabUsed = pAux!=0;\n  const char *azSchema[2] = {\n    /* bytecode() schema */\n    \"CREATE TABLE x(\"\n      \"addr INT,\"\n      \"opcode TEXT,\"\n      \"p1 INT,\"\n      \"p2 INT,\"\n      \"p3 INT,\"\n      \"p4 TEXT,\"\n      \"p5 INT,\"\n      \"comment TEXT,\"\n      \"subprog TEXT,\"\n      \"nexec INT,\"\n      \"ncycle INT,\"\n      \"stmt HIDDEN\"\n    \");\",\n\n    /* Tables_used() schema */\n    \"CREATE TABLE x(\"\n      \"type TEXT,\"\n      \"schema TEXT,\"\n      \"name TEXT,\"\n      \"wr INT,\"\n      \"subprog TEXT,\"\n      \"stmt HIDDEN\"\n   \");\"\n  };\n\n  (void)argc;\n  (void)argv;\n  (void)pzErr;\n  rc = sqlite3_declare_vtab(db, azSchema[isTabUsed]);\n  if( rc==SQLITE_OK ){\n    pNew = sqlite3_malloc( sizeof(*pNew) );\n    *ppVtab = (sqlite3_vtab*)pNew;\n    if( pNew==0 ) return SQLITE_NOMEM;\n    memset(pNew, 0, sizeof(*pNew));\n    pNew->db = db;\n    pNew->bTablesUsed = isTabUsed*2;\n  }\n  return rc;\n}\n\n/*\n** This method is the destructor for bytecodevtab objects.\n*/\nstatic int bytecodevtabDisconnect(sqlite3_vtab *pVtab){\n  bytecodevtab *p = (bytecodevtab*)pVtab;\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n/*\n** Constructor for a new bytecodevtab_cursor object.\n*/\nstatic int bytecodevtabOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){\n  bytecodevtab *pVTab = (bytecodevtab*)p;\n  bytecodevtab_cursor *pCur;\n  pCur = sqlite3_malloc( sizeof(*pCur) );\n  if( pCur==0 ) return SQLITE_NOMEM;\n  memset(pCur, 0, sizeof(*pCur));\n  sqlite3VdbeMemInit(&pCur->sub, pVTab->db, 1);\n  *ppCursor = &pCur->base;\n  return SQLITE_OK;\n}\n\n/*\n** Clear all internal content from a bytecodevtab cursor.\n*/\nstatic void bytecodevtabCursorClear(bytecodevtab_cursor *pCur){\n  sqlite3_free(pCur->zP4);\n  pCur->zP4 = 0;\n  sqlite3VdbeMemRelease(&pCur->sub);\n  sqlite3VdbeMemSetNull(&pCur->sub);\n  if( pCur->needFinalize ){\n    sqlite3_finalize(pCur->pStmt);\n  }\n  pCur->pStmt = 0;\n  pCur->needFinalize = 0;\n  pCur->zType = 0;\n  pCur->zSchema = 0;\n  pCur->zName = 0;\n}\n\n/*\n** Destructor for a bytecodevtab_cursor.\n*/\nstatic int bytecodevtabClose(sqlite3_vtab_cursor *cur){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur;\n  bytecodevtabCursorClear(pCur);\n  sqlite3_free(pCur);\n  return SQLITE_OK;\n}\n\n\n/*\n** Advance a bytecodevtab_cursor to its next row of output.\n*/\nstatic int bytecodevtabNext(sqlite3_vtab_cursor *cur){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur;\n  bytecodevtab *pTab = (bytecodevtab*)cur->pVtab;\n  int rc;\n  if( pCur->zP4 ){\n    sqlite3_free(pCur->zP4);\n    pCur->zP4 = 0;\n  }\n  if( pCur->zName ){\n    pCur->zName = 0;\n    pCur->zType = 0;\n    pCur->zSchema = 0;\n  }\n  rc = sqlite3VdbeNextOpcode(\n           (Vdbe*)pCur->pStmt,\n           pCur->showSubprograms ? &pCur->sub : 0,\n           pTab->bTablesUsed,\n           &pCur->iRowid,\n           &pCur->iAddr,\n           &pCur->aOp);\n  if( rc!=SQLITE_OK ){\n    sqlite3VdbeMemSetNull(&pCur->sub);\n    pCur->aOp = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if the cursor has been moved off of the last\n** row of output.\n*/\nstatic int bytecodevtabEof(sqlite3_vtab_cursor *cur){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur;\n  return pCur->aOp==0;\n}\n\n/*\n** Return values of columns for the row at which the bytecodevtab_cursor\n** is currently pointing.\n*/\nstatic int bytecodevtabColumn(\n  sqlite3_vtab_cursor *cur,   /* The cursor */\n  sqlite3_context *ctx,       /* First argument to sqlite3_result_...() */\n  int i                       /* Which column to return */\n){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur;\n  bytecodevtab *pVTab = (bytecodevtab*)cur->pVtab;\n  Op *pOp = pCur->aOp + pCur->iAddr;\n  if( pVTab->bTablesUsed ){\n    if( i==4 ){\n      i = 8;\n    }else{\n      if( i<=2 && pCur->zType==0 ){\n        Schema *pSchema;\n        HashElem *k;\n        int iDb = pOp->p3;\n        Pgno iRoot = (Pgno)pOp->p2;\n        sqlite3 *db = pVTab->db;\n        pSchema = db->aDb[iDb].pSchema;\n        pCur->zSchema = db->aDb[iDb].zDbSName;\n        for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){\n          Table *pTab = (Table*)sqliteHashData(k);\n          if( !IsVirtual(pTab) && pTab->tnum==iRoot ){\n            pCur->zName = pTab->zName;\n            pCur->zType = \"table\";\n            break;\n          }\n        }\n        if( pCur->zName==0 ){\n          for(k=sqliteHashFirst(&pSchema->idxHash); k; k=sqliteHashNext(k)){\n            Index *pIdx = (Index*)sqliteHashData(k);\n            if( pIdx->tnum==iRoot ){\n              pCur->zName = pIdx->zName;\n              pCur->zType = \"index\";\n            }\n          }\n        }\n      }\n      i += 20;\n    }\n  }\n  switch( i ){\n    case 0:   /* addr */\n      sqlite3_result_int(ctx, pCur->iAddr);\n      break;\n    case 1:   /* opcode */\n      sqlite3_result_text(ctx, (char*)sqlite3OpcodeName(pOp->opcode),\n                          -1, SQLITE_STATIC);\n      break;\n    case 2:   /* p1 */\n      sqlite3_result_int(ctx, pOp->p1);\n      break;\n    case 3:   /* p2 */\n      sqlite3_result_int(ctx, pOp->p2);\n      break;\n    case 4:   /* p3 */\n      sqlite3_result_int(ctx, pOp->p3);\n      break;\n    case 5:   /* p4 */\n    case 7:   /* comment */\n      if( pCur->zP4==0 ){\n        pCur->zP4 = sqlite3VdbeDisplayP4(pVTab->db, pOp);\n      }\n      if( i==5 ){\n        sqlite3_result_text(ctx, pCur->zP4, -1, SQLITE_STATIC);\n      }else{\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n        char *zCom = sqlite3VdbeDisplayComment(pVTab->db, pOp, pCur->zP4);\n        sqlite3_result_text(ctx, zCom, -1, sqlite3_free);\n#endif\n      }\n      break;\n    case 6:     /* p5 */\n      sqlite3_result_int(ctx, pOp->p5);\n      break;\n    case 8: {   /* subprog */\n      Op *aOp = pCur->aOp;\n      assert( aOp[0].opcode==OP_Init );\n      assert( aOp[0].p4.z==0 || strncmp(aOp[0].p4.z,\"-\" \"- \",3)==0 );\n      if( pCur->iRowid==pCur->iAddr+1 ){\n        break;  /* Result is NULL for the main program */\n      }else if( aOp[0].p4.z!=0 ){\n         sqlite3_result_text(ctx, aOp[0].p4.z+3, -1, SQLITE_STATIC);\n      }else{\n         sqlite3_result_text(ctx, \"(FK)\", 4, SQLITE_STATIC);\n      }\n      break;\n    }\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n    case 9:     /* nexec */\n      sqlite3_result_int64(ctx, pOp->nExec);\n      break;\n    case 10:    /* ncycle */\n      sqlite3_result_int64(ctx, pOp->nCycle);\n      break;\n#else\n    case 9:     /* nexec */\n    case 10:    /* ncycle */\n      sqlite3_result_int(ctx, 0);\n      break;\n#endif\n\n    case 20:  /* tables_used.type */\n      sqlite3_result_text(ctx, pCur->zType, -1, SQLITE_STATIC);\n      break;\n    case 21:  /* tables_used.schema */\n      sqlite3_result_text(ctx, pCur->zSchema, -1, SQLITE_STATIC);\n      break;\n    case 22:  /* tables_used.name */\n      sqlite3_result_text(ctx, pCur->zName, -1, SQLITE_STATIC);\n      break;\n    case 23:  /* tables_used.wr */\n      sqlite3_result_int(ctx, pOp->opcode==OP_OpenWrite);\n      break;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return the rowid for the current row.  In this implementation, the\n** rowid is the same as the output value.\n*/\nstatic int bytecodevtabRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur;\n  *pRowid = pCur->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Initialize a cursor.\n**\n**    idxNum==0     means show all subprograms\n**    idxNum==1     means show only the main bytecode and omit subprograms.\n*/\nstatic int bytecodevtabFilter(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  bytecodevtab_cursor *pCur = (bytecodevtab_cursor *)pVtabCursor;\n  bytecodevtab *pVTab = (bytecodevtab *)pVtabCursor->pVtab;\n  int rc = SQLITE_OK;\n  (void)idxStr;\n\n  bytecodevtabCursorClear(pCur);\n  pCur->iRowid = 0;\n  pCur->iAddr = 0;\n  pCur->showSubprograms = idxNum==0;\n  assert( argc==1 );\n  if( sqlite3_value_type(argv[0])==SQLITE_TEXT ){\n    const char *zSql = (const char*)sqlite3_value_text(argv[0]);\n    if( zSql==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_prepare_v2(pVTab->db, zSql, -1, &pCur->pStmt, 0);\n      pCur->needFinalize = 1;\n    }\n  }else{\n    pCur->pStmt = (sqlite3_stmt*)sqlite3_value_pointer(argv[0],\"stmt-pointer\");\n  }\n  if( pCur->pStmt==0 ){\n    pVTab->base.zErrMsg = sqlite3_mprintf(\n       \"argument to %s() is not a valid SQL statement\",\n       pVTab->bTablesUsed ? \"tables_used\" : \"bytecode\"\n    );\n    rc = SQLITE_ERROR;\n  }else{\n    bytecodevtabNext(pVtabCursor);\n  }\n  return rc;\n}\n\n/*\n** We must have a single stmt=? constraint that will be passed through\n** into the xFilter method.  If there is no valid stmt=? constraint,\n** then return an SQLITE_CONSTRAINT error.\n*/\nstatic int bytecodevtabBestIndex(\n  sqlite3_vtab *tab,\n  sqlite3_index_info *pIdxInfo\n){\n  int i;\n  int rc = SQLITE_CONSTRAINT;\n  struct sqlite3_index_constraint *p;\n  bytecodevtab *pVTab = (bytecodevtab*)tab;\n  int iBaseCol = pVTab->bTablesUsed ? 4 : 10;\n  pIdxInfo->estimatedCost = (double)100;\n  pIdxInfo->estimatedRows = 100;\n  pIdxInfo->idxNum = 0;\n  for(i=0, p=pIdxInfo->aConstraint; i<pIdxInfo->nConstraint; i++, p++){\n    if( p->usable==0 ) continue;\n    if( p->op==SQLITE_INDEX_CONSTRAINT_EQ && p->iColumn==iBaseCol+1 ){\n      rc = SQLITE_OK;\n      pIdxInfo->aConstraintUsage[i].omit = 1;\n      pIdxInfo->aConstraintUsage[i].argvIndex = 1;\n    }\n    if( p->op==SQLITE_INDEX_CONSTRAINT_ISNULL && p->iColumn==iBaseCol ){\n      pIdxInfo->aConstraintUsage[i].omit = 1;\n      pIdxInfo->idxNum = 1;\n    }\n  }\n  return rc;\n}\n\n/*\n** This following structure defines all the methods for the\n** virtual table.\n*/\nstatic sqlite3_module bytecodevtabModule = {\n  /* iVersion    */ 0,\n  /* xCreate     */ 0,\n  /* xConnect    */ bytecodevtabConnect,\n  /* xBestIndex  */ bytecodevtabBestIndex,\n  /* xDisconnect */ bytecodevtabDisconnect,\n  /* xDestroy    */ 0,\n  /* xOpen       */ bytecodevtabOpen,\n  /* xClose      */ bytecodevtabClose,\n  /* xFilter     */ bytecodevtabFilter,\n  /* xNext       */ bytecodevtabNext,\n  /* xEof        */ bytecodevtabEof,\n  /* xColumn     */ bytecodevtabColumn,\n  /* xRowid      */ bytecodevtabRowid,\n  /* xUpdate     */ 0,\n  /* xBegin      */ 0,\n  /* xSync       */ 0,\n  /* xCommit     */ 0,\n  /* xRollback   */ 0,\n  /* xFindMethod */ 0,\n  /* xRename     */ 0,\n  /* xSavepoint  */ 0,\n  /* xRelease    */ 0,\n  /* xRollbackTo */ 0,\n  /* xShadowName */ 0,\n  /* xIntegrity  */ 0\n};\n\n\nSQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3 *db){\n  int rc;\n  rc = sqlite3_create_module(db, \"bytecode\", &bytecodevtabModule, 0);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_module(db, \"tables_used\", &bytecodevtabModule, &db);\n  }\n  return rc;\n}\n#elif defined(SQLITE_ENABLE_BYTECODE_VTAB)\nSQLITE_PRIVATE int sqlite3VdbeBytecodeVtabInit(sqlite3 *db){ return SQLITE_OK; }\n#endif /* SQLITE_ENABLE_BYTECODE_VTAB */\n\n/************** End of vdbevtab.c ********************************************/\n/************** Begin file memjournal.c **************************************/\n/*\n** 2008 October 7\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains code use to implement an in-memory rollback journal.\n** The in-memory rollback journal is used to journal transactions for\n** \":memory:\" databases and when the journal_mode=MEMORY pragma is used.\n**\n** Update:  The in-memory journal is also used to temporarily cache\n** smaller journals that are not critical for power-loss recovery.\n** For example, statement journals that are not too big will be held\n** entirely in memory, thus reducing the number of file I/O calls, and\n** more importantly, reducing temporary file creation events.  If these\n** journals become too large for memory, they are spilled to disk.  But\n** in the common case, they are usually small and no file I/O needs to\n** occur.\n*/\n/* #include \"sqliteInt.h\" */\n\n/* Forward references to internal structures */\ntypedef struct MemJournal MemJournal;\ntypedef struct FilePoint FilePoint;\ntypedef struct FileChunk FileChunk;\n\n/*\n** The rollback journal is composed of a linked list of these structures.\n**\n** The zChunk array is always at least 8 bytes in size - usually much more.\n** Its actual size is stored in the MemJournal.nChunkSize variable.\n*/\nstruct FileChunk {\n  FileChunk *pNext;               /* Next chunk in the journal */\n  u8 zChunk[8];                   /* Content of this chunk */\n};\n\n/*\n** By default, allocate this many bytes of memory for each FileChunk object.\n*/\n#define MEMJOURNAL_DFLT_FILECHUNKSIZE 1024\n\n/*\n** For chunk size nChunkSize, return the number of bytes that should\n** be allocated for each FileChunk structure.\n*/\n#define fileChunkSize(nChunkSize) (sizeof(FileChunk) + ((nChunkSize)-8))\n\n/*\n** An instance of this object serves as a cursor into the rollback journal.\n** The cursor can be either for reading or writing.\n*/\nstruct FilePoint {\n  sqlite3_int64 iOffset;          /* Offset from the beginning of the file */\n  FileChunk *pChunk;              /* Specific chunk into which cursor points */\n};\n\n/*\n** This structure is a subclass of sqlite3_file. Each open memory-journal\n** is an instance of this class.\n*/\nstruct MemJournal {\n  const sqlite3_io_methods *pMethod; /* Parent class. MUST BE FIRST */\n  int nChunkSize;                 /* In-memory chunk-size */\n\n  int nSpill;                     /* Bytes of data before flushing */\n  FileChunk *pFirst;              /* Head of in-memory chunk-list */\n  FilePoint endpoint;             /* Pointer to the end of the file */\n  FilePoint readpoint;            /* Pointer to the end of the last xRead() */\n\n  int flags;                      /* xOpen flags */\n  sqlite3_vfs *pVfs;              /* The \"real\" underlying VFS */\n  const char *zJournal;           /* Name of the journal file */\n};\n\n/*\n** Read data from the in-memory journal file.  This is the implementation\n** of the sqlite3_vfs.xRead method.\n*/\nstatic int memjrnlRead(\n  sqlite3_file *pJfd,    /* The journal file from which to read */\n  void *zBuf,            /* Put the results here */\n  int iAmt,              /* Number of bytes to read */\n  sqlite_int64 iOfst     /* Begin reading at this offset */\n){\n  MemJournal *p = (MemJournal *)pJfd;\n  u8 *zOut = zBuf;\n  int nRead = iAmt;\n  int iChunkOffset;\n  FileChunk *pChunk;\n\n  if( (iAmt+iOfst)>p->endpoint.iOffset ){\n    return SQLITE_IOERR_SHORT_READ;\n  }\n  assert( p->readpoint.iOffset==0 || p->readpoint.pChunk!=0 );\n  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){\n    sqlite3_int64 iOff = 0;\n    for(pChunk=p->pFirst;\n        ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;\n        pChunk=pChunk->pNext\n    ){\n      iOff += p->nChunkSize;\n    }\n  }else{\n    pChunk = p->readpoint.pChunk;\n    assert( pChunk!=0 );\n  }\n\n  iChunkOffset = (int)(iOfst%p->nChunkSize);\n  do {\n    int iSpace = p->nChunkSize - iChunkOffset;\n    int nCopy = MIN(nRead, (p->nChunkSize - iChunkOffset));\n    memcpy(zOut, (u8*)pChunk->zChunk + iChunkOffset, nCopy);\n    zOut += nCopy;\n    nRead -= iSpace;\n    iChunkOffset = 0;\n  } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 );\n  p->readpoint.iOffset = pChunk ? iOfst+iAmt : 0;\n  p->readpoint.pChunk = pChunk;\n\n  return SQLITE_OK;\n}\n\n/*\n** Free the list of FileChunk structures headed at MemJournal.pFirst.\n*/\nstatic void memjrnlFreeChunks(FileChunk *pFirst){\n  FileChunk *pIter;\n  FileChunk *pNext;\n  for(pIter=pFirst; pIter; pIter=pNext){\n    pNext = pIter->pNext;\n    sqlite3_free(pIter);\n  }\n}\n\n/*\n** Flush the contents of memory to a real file on disk.\n*/\nstatic int memjrnlCreateFile(MemJournal *p){\n  int rc;\n  sqlite3_file *pReal = (sqlite3_file*)p;\n  MemJournal copy = *p;\n\n  memset(p, 0, sizeof(MemJournal));\n  rc = sqlite3OsOpen(copy.pVfs, copy.zJournal, pReal, copy.flags, 0);\n  if( rc==SQLITE_OK ){\n    int nChunk = copy.nChunkSize;\n    i64 iOff = 0;\n    FileChunk *pIter;\n    for(pIter=copy.pFirst; pIter; pIter=pIter->pNext){\n      if( iOff + nChunk > copy.endpoint.iOffset ){\n        nChunk = copy.endpoint.iOffset - iOff;\n      }\n      rc = sqlite3OsWrite(pReal, (u8*)pIter->zChunk, nChunk, iOff);\n      if( rc ) break;\n      iOff += nChunk;\n    }\n    if( rc==SQLITE_OK ){\n      /* No error has occurred. Free the in-memory buffers. */\n      memjrnlFreeChunks(copy.pFirst);\n    }\n  }\n  if( rc!=SQLITE_OK ){\n    /* If an error occurred while creating or writing to the file, restore\n    ** the original before returning. This way, SQLite uses the in-memory\n    ** journal data to roll back changes made to the internal page-cache\n    ** before this function was called.  */\n    sqlite3OsClose(pReal);\n    *p = copy;\n  }\n  return rc;\n}\n\n\n/* Forward reference */\nstatic int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size);\n\n/*\n** Write data to the file.\n*/\nstatic int memjrnlWrite(\n  sqlite3_file *pJfd,    /* The journal file into which to write */\n  const void *zBuf,      /* Take data to be written from here */\n  int iAmt,              /* Number of bytes to write */\n  sqlite_int64 iOfst     /* Begin writing at this offset into the file */\n){\n  MemJournal *p = (MemJournal *)pJfd;\n  int nWrite = iAmt;\n  u8 *zWrite = (u8 *)zBuf;\n\n  /* If the file should be created now, create it and write the new data\n  ** into the file on disk. */\n  if( p->nSpill>0 && (iAmt+iOfst)>p->nSpill ){\n    int rc = memjrnlCreateFile(p);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3OsWrite(pJfd, zBuf, iAmt, iOfst);\n    }\n    return rc;\n  }\n\n  /* If the contents of this write should be stored in memory */\n  else{\n    /* An in-memory journal file should only ever be appended to. Random\n    ** access writes are not required. The only exception to this is when\n    ** the in-memory journal is being used by a connection using the\n    ** atomic-write optimization. In this case the first 28 bytes of the\n    ** journal file may be written as part of committing the transaction. */\n    assert( iOfst<=p->endpoint.iOffset );\n    if( iOfst>0 && iOfst!=p->endpoint.iOffset ){\n      memjrnlTruncate(pJfd, iOfst);\n    }\n    if( iOfst==0 && p->pFirst ){\n      assert( p->nChunkSize>iAmt );\n      memcpy((u8*)p->pFirst->zChunk, zBuf, iAmt);\n    }else{\n      while( nWrite>0 ){\n        FileChunk *pChunk = p->endpoint.pChunk;\n        int iChunkOffset = (int)(p->endpoint.iOffset%p->nChunkSize);\n        int iSpace = MIN(nWrite, p->nChunkSize - iChunkOffset);\n\n        assert( pChunk!=0 || iChunkOffset==0 );\n        if( iChunkOffset==0 ){\n          /* New chunk is required to extend the file. */\n          FileChunk *pNew = sqlite3_malloc(fileChunkSize(p->nChunkSize));\n          if( !pNew ){\n            return SQLITE_IOERR_NOMEM_BKPT;\n          }\n          pNew->pNext = 0;\n          if( pChunk ){\n            assert( p->pFirst );\n            pChunk->pNext = pNew;\n          }else{\n            assert( !p->pFirst );\n            p->pFirst = pNew;\n          }\n          pChunk = p->endpoint.pChunk = pNew;\n        }\n\n        assert( pChunk!=0 );\n        memcpy((u8*)pChunk->zChunk + iChunkOffset, zWrite, iSpace);\n        zWrite += iSpace;\n        nWrite -= iSpace;\n        p->endpoint.iOffset += iSpace;\n      }\n    }\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Truncate the in-memory file.\n*/\nstatic int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){\n  MemJournal *p = (MemJournal *)pJfd;\n  assert( p->endpoint.pChunk==0 || p->endpoint.pChunk->pNext==0 );\n  if( size<p->endpoint.iOffset ){\n    FileChunk *pIter = 0;\n    if( size==0 ){\n      memjrnlFreeChunks(p->pFirst);\n      p->pFirst = 0;\n    }else{\n      i64 iOff = p->nChunkSize;\n      for(pIter=p->pFirst; ALWAYS(pIter) && iOff<size; pIter=pIter->pNext){\n        iOff += p->nChunkSize;\n      }\n      if( ALWAYS(pIter) ){\n        memjrnlFreeChunks(pIter->pNext);\n        pIter->pNext = 0;\n      }\n    }\n\n    p->endpoint.pChunk = pIter;\n    p->endpoint.iOffset = size;\n    p->readpoint.pChunk = 0;\n    p->readpoint.iOffset = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Close the file.\n*/\nstatic int memjrnlClose(sqlite3_file *pJfd){\n  MemJournal *p = (MemJournal *)pJfd;\n  memjrnlFreeChunks(p->pFirst);\n  return SQLITE_OK;\n}\n\n/*\n** Sync the file.\n**\n** If the real file has been created, call its xSync method. Otherwise,\n** syncing an in-memory journal is a no-op.\n*/\nstatic int memjrnlSync(sqlite3_file *pJfd, int flags){\n  UNUSED_PARAMETER2(pJfd, flags);\n  return SQLITE_OK;\n}\n\n/*\n** Query the size of the file in bytes.\n*/\nstatic int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){\n  MemJournal *p = (MemJournal *)pJfd;\n  *pSize = (sqlite_int64) p->endpoint.iOffset;\n  return SQLITE_OK;\n}\n\n/*\n** Table of methods for MemJournal sqlite3_file object.\n*/\nstatic const struct sqlite3_io_methods MemJournalMethods = {\n  1,                /* iVersion */\n  memjrnlClose,     /* xClose */\n  memjrnlRead,      /* xRead */\n  memjrnlWrite,     /* xWrite */\n  memjrnlTruncate,  /* xTruncate */\n  memjrnlSync,      /* xSync */\n  memjrnlFileSize,  /* xFileSize */\n  0,                /* xLock */\n  0,                /* xUnlock */\n  0,                /* xCheckReservedLock */\n  0,                /* xFileControl */\n  0,                /* xSectorSize */\n  0,                /* xDeviceCharacteristics */\n  0,                /* xShmMap */\n  0,                /* xShmLock */\n  0,                /* xShmBarrier */\n  0,                /* xShmUnmap */\n  0,                /* xFetch */\n  0                 /* xUnfetch */\n};\n\n/*\n** Open a journal file.\n**\n** The behaviour of the journal file depends on the value of parameter\n** nSpill. If nSpill is 0, then the journal file is always create and\n** accessed using the underlying VFS. If nSpill is less than zero, then\n** all content is always stored in main-memory. Finally, if nSpill is a\n** positive value, then the journal file is initially created in-memory\n** but may be flushed to disk later on. In this case the journal file is\n** flushed to disk either when it grows larger than nSpill bytes in size,\n** or when sqlite3JournalCreate() is called.\n*/\nSQLITE_PRIVATE int sqlite3JournalOpen(\n  sqlite3_vfs *pVfs,         /* The VFS to use for actual file I/O */\n  const char *zName,         /* Name of the journal file */\n  sqlite3_file *pJfd,        /* Preallocated, blank file handle */\n  int flags,                 /* Opening flags */\n  int nSpill                 /* Bytes buffered before opening the file */\n){\n  MemJournal *p = (MemJournal*)pJfd;\n\n  assert( zName || nSpill<0 || (flags & SQLITE_OPEN_EXCLUSIVE) );\n\n  /* Zero the file-handle object. If nSpill was passed zero, initialize\n  ** it using the sqlite3OsOpen() function of the underlying VFS. In this\n  ** case none of the code in this module is executed as a result of calls\n  ** made on the journal file-handle.  */\n  memset(p, 0, sizeof(MemJournal));\n  if( nSpill==0 ){\n    return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);\n  }\n\n  if( nSpill>0 ){\n    p->nChunkSize = nSpill;\n  }else{\n    p->nChunkSize = 8 + MEMJOURNAL_DFLT_FILECHUNKSIZE - sizeof(FileChunk);\n    assert( MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize) );\n  }\n\n  pJfd->pMethods = (const sqlite3_io_methods*)&MemJournalMethods;\n  p->nSpill = nSpill;\n  p->flags = flags;\n  p->zJournal = zName;\n  p->pVfs = pVfs;\n  return SQLITE_OK;\n}\n\n/*\n** Open an in-memory journal file.\n*/\nSQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *pJfd){\n  sqlite3JournalOpen(0, 0, pJfd, 0, -1);\n}\n\n#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \\\n || defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)\n/*\n** If the argument p points to a MemJournal structure that is not an\n** in-memory-only journal file (i.e. is one that was opened with a +ve\n** nSpill parameter or as SQLITE_OPEN_MAIN_JOURNAL), and the underlying\n** file has not yet been created, create it now.\n*/\nSQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *pJfd){\n  int rc = SQLITE_OK;\n  MemJournal *p = (MemJournal*)pJfd;\n  if( pJfd->pMethods==&MemJournalMethods && (\n#ifdef SQLITE_ENABLE_ATOMIC_WRITE\n     p->nSpill>0\n#else\n     /* While this appears to not be possible without ATOMIC_WRITE, the\n     ** paths are complex, so it seems prudent to leave the test in as\n     ** a NEVER(), in case our analysis is subtly flawed. */\n     NEVER(p->nSpill>0)\n#endif\n#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE\n     || (p->flags & SQLITE_OPEN_MAIN_JOURNAL)\n#endif\n  )){\n    rc = memjrnlCreateFile(p);\n  }\n  return rc;\n}\n#endif\n\n/*\n** The file-handle passed as the only argument is open on a journal file.\n** Return true if this \"journal file\" is currently stored in heap memory,\n** or false otherwise.\n*/\nSQLITE_PRIVATE int sqlite3JournalIsInMemory(sqlite3_file *p){\n  return p->pMethods==&MemJournalMethods;\n}\n\n/*\n** Return the number of bytes required to store a JournalFile that uses vfs\n** pVfs to create the underlying on-disk files.\n*/\nSQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *pVfs){\n  return MAX(pVfs->szOsFile, (int)sizeof(MemJournal));\n}\n\n/************** End of memjournal.c ******************************************/\n/************** Begin file walker.c ******************************************/\n/*\n** 2008 August 16\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains routines used for walking the parser tree for\n** an SQL statement.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdlib.h> */\n/* #include <string.h> */\n\n\n#if !defined(SQLITE_OMIT_WINDOWFUNC)\n/*\n** Walk all expressions linked into the list of Window objects passed\n** as the second argument.\n*/\nstatic int walkWindowList(Walker *pWalker, Window *pList, int bOneOnly){\n  Window *pWin;\n  for(pWin=pList; pWin; pWin=pWin->pNextWin){\n    int rc;\n    rc = sqlite3WalkExprList(pWalker, pWin->pOrderBy);\n    if( rc ) return WRC_Abort;\n    rc = sqlite3WalkExprList(pWalker, pWin->pPartition);\n    if( rc ) return WRC_Abort;\n    rc = sqlite3WalkExpr(pWalker, pWin->pFilter);\n    if( rc ) return WRC_Abort;\n    rc = sqlite3WalkExpr(pWalker, pWin->pStart);\n    if( rc ) return WRC_Abort;\n    rc = sqlite3WalkExpr(pWalker, pWin->pEnd);\n    if( rc ) return WRC_Abort;\n    if( bOneOnly ) break;\n  }\n  return WRC_Continue;\n}\n#endif\n\n/*\n** Walk an expression tree.  Invoke the callback once for each node\n** of the expression, while descending.  (In other words, the callback\n** is invoked before visiting children.)\n**\n** The return value from the callback should be one of the WRC_*\n** constants to specify how to proceed with the walk.\n**\n**    WRC_Continue      Continue descending down the tree.\n**\n**    WRC_Prune         Do not descend into child nodes, but allow\n**                      the walk to continue with sibling nodes.\n**\n**    WRC_Abort         Do no more callbacks.  Unwind the stack and\n**                      return from the top-level walk call.\n**\n** The return value from this routine is WRC_Abort to abandon the tree walk\n** and WRC_Continue to continue.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE int sqlite3WalkExprNN(Walker *pWalker, Expr *pExpr){\n  int rc;\n  testcase( ExprHasProperty(pExpr, EP_TokenOnly) );\n  testcase( ExprHasProperty(pExpr, EP_Reduced) );\n  while(1){\n    rc = pWalker->xExprCallback(pWalker, pExpr);\n    if( rc ) return rc & WRC_Abort;\n    if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){\n      assert( pExpr->x.pList==0 || pExpr->pRight==0 );\n      if( pExpr->pLeft && sqlite3WalkExprNN(pWalker, pExpr->pLeft) ){\n        return WRC_Abort;\n      }\n      if( pExpr->pRight ){\n        assert( !ExprHasProperty(pExpr, EP_WinFunc) );\n        pExpr = pExpr->pRight;\n        continue;\n      }else if( ExprUseXSelect(pExpr) ){\n        assert( !ExprHasProperty(pExpr, EP_WinFunc) );\n        if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;\n      }else{\n        if( pExpr->x.pList ){\n          if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;\n        }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        if( ExprHasProperty(pExpr, EP_WinFunc) ){\n          if( walkWindowList(pWalker, pExpr->y.pWin, 1) ) return WRC_Abort;\n        }\n#endif\n      }\n    }\n    break;\n  }\n  return WRC_Continue;\n}\nSQLITE_PRIVATE int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){\n  return pExpr ? sqlite3WalkExprNN(pWalker,pExpr) : WRC_Continue;\n}\n\n/*\n** Call sqlite3WalkExpr() for every expression in list p or until\n** an abort request is seen.\n*/\nSQLITE_PRIVATE int sqlite3WalkExprList(Walker *pWalker, ExprList *p){\n  int i;\n  struct ExprList_item *pItem;\n  if( p ){\n    for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){\n      if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** This is a no-op callback for Walker->xSelectCallback2.  If this\n** callback is set, then the Select->pWinDefn list is traversed.\n*/\nSQLITE_PRIVATE void sqlite3WalkWinDefnDummyCallback(Walker *pWalker, Select *p){\n  UNUSED_PARAMETER(pWalker);\n  UNUSED_PARAMETER(p);\n  /* No-op */\n}\n\n/*\n** Walk all expressions associated with SELECT statement p.  Do\n** not invoke the SELECT callback on p, but do (of course) invoke\n** any expr callbacks and SELECT callbacks that come from subqueries.\n** Return WRC_Abort or WRC_Continue.\n*/\nSQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker *pWalker, Select *p){\n  if( sqlite3WalkExprList(pWalker, p->pEList) ) return WRC_Abort;\n  if( sqlite3WalkExpr(pWalker, p->pWhere) ) return WRC_Abort;\n  if( sqlite3WalkExprList(pWalker, p->pGroupBy) ) return WRC_Abort;\n  if( sqlite3WalkExpr(pWalker, p->pHaving) ) return WRC_Abort;\n  if( sqlite3WalkExprList(pWalker, p->pOrderBy) ) return WRC_Abort;\n  if( sqlite3WalkExpr(pWalker, p->pLimit) ) return WRC_Abort;\n#if !defined(SQLITE_OMIT_WINDOWFUNC)\n  if( p->pWinDefn ){\n    Parse *pParse;\n    if( pWalker->xSelectCallback2==sqlite3WalkWinDefnDummyCallback\n     || ((pParse = pWalker->pParse)!=0 && IN_RENAME_OBJECT)\n#ifndef SQLITE_OMIT_CTE\n     || pWalker->xSelectCallback2==sqlite3SelectPopWith\n#endif\n    ){\n      /* The following may return WRC_Abort if there are unresolvable\n      ** symbols (e.g. a table that does not exist) in a window definition. */\n      int rc = walkWindowList(pWalker, p->pWinDefn, 0);\n      return rc;\n    }\n  }\n#endif\n  return WRC_Continue;\n}\n\n/*\n** Walk the parse trees associated with all subqueries in the\n** FROM clause of SELECT statement p.  Do not invoke the select\n** callback on p, but do invoke it on each FROM clause subquery\n** and on any subqueries further down in the tree.  Return\n** WRC_Abort or WRC_Continue;\n*/\nSQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){\n  SrcList *pSrc;\n  int i;\n  SrcItem *pItem;\n\n  pSrc = p->pSrc;\n  if( ALWAYS(pSrc) ){\n    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){\n      if( pItem->fg.isSubquery\n       && sqlite3WalkSelect(pWalker, pItem->u4.pSubq->pSelect)\n      ){\n        return WRC_Abort;\n      }\n      if( pItem->fg.isTabFunc\n       && sqlite3WalkExprList(pWalker, pItem->u1.pFuncArg)\n      ){\n        return WRC_Abort;\n      }\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Call sqlite3WalkExpr() for every expression in Select statement p.\n** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and\n** on the compound select chain, p->pPrior.\n**\n** If it is not NULL, the xSelectCallback() callback is invoked before\n** the walk of the expressions and FROM clause. The xSelectCallback2()\n** method is invoked following the walk of the expressions and FROM clause,\n** but only if both xSelectCallback and xSelectCallback2 are both non-NULL\n** and if the expressions and FROM clause both return WRC_Continue;\n**\n** Return WRC_Continue under normal conditions.  Return WRC_Abort if\n** there is an abort request.\n**\n** If the Walker does not have an xSelectCallback() then this routine\n** is a no-op returning WRC_Continue.\n*/\nSQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){\n  int rc;\n  if( p==0 ) return WRC_Continue;\n  if( pWalker->xSelectCallback==0 ) return WRC_Continue;\n  do{\n    rc = pWalker->xSelectCallback(pWalker, p);\n    if( rc ) return rc & WRC_Abort;\n    if( sqlite3WalkSelectExpr(pWalker, p)\n     || sqlite3WalkSelectFrom(pWalker, p)\n    ){\n      return WRC_Abort;\n    }\n    if( pWalker->xSelectCallback2 ){\n      pWalker->xSelectCallback2(pWalker, p);\n    }\n    p = p->pPrior;\n  }while( p!=0 );\n  return WRC_Continue;\n}\n\n/* Increase the walkerDepth when entering a subquery, and\n** decrease when leaving the subquery.\n*/\nSQLITE_PRIVATE int sqlite3WalkerDepthIncrease(Walker *pWalker, Select *pSelect){\n  UNUSED_PARAMETER(pSelect);\n  pWalker->walkerDepth++;\n  return WRC_Continue;\n}\nSQLITE_PRIVATE void sqlite3WalkerDepthDecrease(Walker *pWalker, Select *pSelect){\n  UNUSED_PARAMETER(pSelect);\n  pWalker->walkerDepth--;\n}\n\n\n/*\n** No-op routine for the parse-tree walker.\n**\n** When this routine is the Walker.xExprCallback then expression trees\n** are walked without any actions being taken at each node.  Presumably,\n** when this routine is used for Walker.xExprCallback then\n** Walker.xSelectCallback is set to do something useful for every\n** subquery in the parser tree.\n*/\nSQLITE_PRIVATE int sqlite3ExprWalkNoop(Walker *NotUsed, Expr *NotUsed2){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  return WRC_Continue;\n}\n\n/*\n** No-op routine for the parse-tree walker for SELECT statements.\n** subquery in the parser tree.\n*/\nSQLITE_PRIVATE int sqlite3SelectWalkNoop(Walker *NotUsed, Select *NotUsed2){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  return WRC_Continue;\n}\n\n/************** End of walker.c **********************************************/\n/************** Begin file resolve.c *****************************************/\n/*\n** 2008 August 18\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains routines used for walking the parser tree and\n** resolve all identifiers by associating them with a particular\n** table and column.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** Magic table number to mean the EXCLUDED table in an UPSERT statement.\n*/\n#define EXCLUDED_TABLE_NUMBER  2\n\n/*\n** Walk the expression tree pExpr and increase the aggregate function\n** depth (the Expr.op2 field) by N on every TK_AGG_FUNCTION node.\n** This needs to occur when copying a TK_AGG_FUNCTION node from an\n** outer query into an inner subquery.\n**\n** incrAggFunctionDepth(pExpr,n) is the main routine.  incrAggDepth(..)\n** is a helper function - a callback for the tree walker.\n**\n** See also the sqlite3WindowExtraAggFuncDepth() routine in window.c\n*/\nstatic int incrAggDepth(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_AGG_FUNCTION ) pExpr->op2 += pWalker->u.n;\n  return WRC_Continue;\n}\nstatic void incrAggFunctionDepth(Expr *pExpr, int N){\n  if( N>0 ){\n    Walker w;\n    memset(&w, 0, sizeof(w));\n    w.xExprCallback = incrAggDepth;\n    w.u.n = N;\n    sqlite3WalkExpr(&w, pExpr);\n  }\n}\n\n/*\n** Turn the pExpr expression into an alias for the iCol-th column of the\n** result set in pEList.\n**\n** If the reference is followed by a COLLATE operator, then make sure\n** the COLLATE operator is preserved.  For example:\n**\n**     SELECT a+b, c+d FROM t1 ORDER BY 1 COLLATE nocase;\n**\n** Should be transformed into:\n**\n**     SELECT a+b, c+d FROM t1 ORDER BY (a+b) COLLATE nocase;\n**\n** The nSubquery parameter specifies how many levels of subquery the\n** alias is removed from the original expression.  The usual value is\n** zero but it might be more if the alias is contained within a subquery\n** of the original expression.  The Expr.op2 field of TK_AGG_FUNCTION\n** structures must be increased by the nSubquery amount.\n*/\nstatic void resolveAlias(\n  Parse *pParse,         /* Parsing context */\n  ExprList *pEList,      /* A result set */\n  int iCol,              /* A column in the result set.  0..pEList->nExpr-1 */\n  Expr *pExpr,           /* Transform this into an alias to the result set */\n  int nSubquery          /* Number of subqueries that the label is moving */\n){\n  Expr *pOrig;           /* The iCol-th column of the result set */\n  Expr *pDup;            /* Copy of pOrig */\n  sqlite3 *db;           /* The database connection */\n\n  assert( iCol>=0 && iCol<pEList->nExpr );\n  pOrig = pEList->a[iCol].pExpr;\n  assert( pOrig!=0 );\n  assert( !ExprHasProperty(pExpr, EP_Reduced|EP_TokenOnly) );\n  if( pExpr->pAggInfo ) return;\n  db = pParse->db;\n  pDup = sqlite3ExprDup(db, pOrig, 0);\n  if( db->mallocFailed ){\n    sqlite3ExprDelete(db, pDup);\n    pDup = 0;\n  }else{\n    Expr temp;\n    incrAggFunctionDepth(pDup, nSubquery);\n    if( pExpr->op==TK_COLLATE ){\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);\n    }\n    memcpy(&temp, pDup, sizeof(Expr));\n    memcpy(pDup, pExpr, sizeof(Expr));\n    memcpy(pExpr, &temp, sizeof(Expr));\n    if( ExprHasProperty(pExpr, EP_WinFunc) ){\n      if( ALWAYS(pExpr->y.pWin!=0) ){\n        pExpr->y.pWin->pOwner = pExpr;\n      }\n    }\n    sqlite3ExprDeferredDelete(pParse, pDup);\n  }\n}\n\n/*\n** Subqueries store the original database, table and column names for their\n** result sets in ExprList.a[].zSpan, in the form \"DATABASE.TABLE.COLUMN\",\n** and mark the expression-list item by setting ExprList.a[].fg.eEName\n** to ENAME_TAB.\n**\n** Check to see if the zSpan/eEName of the expression-list item passed to this\n** routine matches the zDb, zTab, and zCol.  If any of zDb, zTab, and zCol are\n** NULL then those fields will match anything. Return true if there is a match,\n** or false otherwise.\n**\n** SF_NestedFrom subqueries also store an entry for the implicit rowid (or\n** _rowid_, or oid) column by setting ExprList.a[].fg.eEName to ENAME_ROWID,\n** and setting zSpan to \"DATABASE.TABLE.<rowid-alias>\". This type of pItem\n** argument matches if zCol is a rowid alias. If it is not NULL, (*pbRowid)\n** is set to 1 if there is this kind of match.\n*/\nSQLITE_PRIVATE int sqlite3MatchEName(\n  const struct ExprList_item *pItem,\n  const char *zCol,\n  const char *zTab,\n  const char *zDb,\n  int *pbRowid\n){\n  int n;\n  const char *zSpan;\n  int eEName = pItem->fg.eEName;\n  if( eEName!=ENAME_TAB && (eEName!=ENAME_ROWID || NEVER(pbRowid==0)) ){\n    return 0;\n  }\n  assert( pbRowid==0 || *pbRowid==0 );\n  zSpan = pItem->zEName;\n  for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}\n  if( zDb && (sqlite3StrNICmp(zSpan, zDb, n)!=0 || zDb[n]!=0) ){\n    return 0;\n  }\n  zSpan += n+1;\n  for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}\n  if( zTab && (sqlite3StrNICmp(zSpan, zTab, n)!=0 || zTab[n]!=0) ){\n    return 0;\n  }\n  zSpan += n+1;\n  if( zCol ){\n    if( eEName==ENAME_TAB && sqlite3StrICmp(zSpan, zCol)!=0 ) return 0;\n    if( eEName==ENAME_ROWID && sqlite3IsRowid(zCol)==0 ) return 0;\n  }\n  if( eEName==ENAME_ROWID ) *pbRowid = 1;\n  return 1;\n}\n\n/*\n** Return TRUE if the double-quoted string  mis-feature should be supported.\n*/\nstatic int areDoubleQuotedStringsEnabled(sqlite3 *db, NameContext *pTopNC){\n  if( db->init.busy ) return 1;  /* Always support for legacy schemas */\n  if( pTopNC->ncFlags & NC_IsDDL ){\n    /* Currently parsing a DDL statement */\n    if( sqlite3WritableSchema(db) && (db->flags & SQLITE_DqsDML)!=0 ){\n      return 1;\n    }\n    return (db->flags & SQLITE_DqsDDL)!=0;\n  }else{\n    /* Currently parsing a DML statement */\n    return (db->flags & SQLITE_DqsDML)!=0;\n  }\n}\n\n/*\n** The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN.\n** return the appropriate colUsed mask.\n*/\nSQLITE_PRIVATE Bitmask sqlite3ExprColUsed(Expr *pExpr){\n  int n;\n  Table *pExTab;\n\n  n = pExpr->iColumn;\n  assert( ExprUseYTab(pExpr) );\n  pExTab = pExpr->y.pTab;\n  assert( pExTab!=0 );\n  assert( n < pExTab->nCol );\n  if( (pExTab->tabFlags & TF_HasGenerated)!=0\n   && (pExTab->aCol[n].colFlags & COLFLAG_GENERATED)!=0\n  ){\n    testcase( pExTab->nCol==BMS-1 );\n    testcase( pExTab->nCol==BMS );\n    return pExTab->nCol>=BMS ? ALLBITS : MASKBIT(pExTab->nCol)-1;\n  }else{\n    testcase( n==BMS-1 );\n    testcase( n==BMS );\n    if( n>=BMS ) n = BMS-1;\n    return ((Bitmask)1)<<n;\n  }\n}\n\n/*\n** Create a new expression term for the column specified by pMatch and\n** iColumn.  Append this new expression term to the FULL JOIN Match set\n** in *ppList.  Create a new *ppList if this is the first term in the\n** set.\n*/\nstatic void extendFJMatch(\n  Parse *pParse,          /* Parsing context */\n  ExprList **ppList,      /* ExprList to extend */\n  SrcItem *pMatch,        /* Source table containing the column */\n  i16 iColumn             /* The column number */\n){\n  Expr *pNew = sqlite3ExprAlloc(pParse->db, TK_COLUMN, 0, 0);\n  if( pNew ){\n    pNew->iTable = pMatch->iCursor;\n    pNew->iColumn = iColumn;\n    pNew->y.pTab = pMatch->pSTab;\n    assert( (pMatch->fg.jointype & (JT_LEFT|JT_LTORJ))!=0 );\n    ExprSetProperty(pNew, EP_CanBeNull);\n    *ppList = sqlite3ExprListAppend(pParse, *ppList, pNew);\n  }\n}\n\n/*\n** Return TRUE (non-zero) if zTab is a valid name for the schema table pTab.\n*/\nstatic SQLITE_NOINLINE int isValidSchemaTableName(\n  const char *zTab,         /* Name as it appears in the SQL */\n  Table *pTab,              /* The schema table we are trying to match */\n  const char *zDb           /* non-NULL if a database qualifier is present */\n){\n  const char *zLegacy;\n  assert( pTab!=0 );\n  assert( pTab->tnum==1 );\n  if( sqlite3StrNICmp(zTab, \"sqlite_\", 7)!=0 ) return 0;\n  zLegacy = pTab->zName;\n  if( strcmp(zLegacy+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){\n    if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){\n      return 1;\n    }\n    if( zDb==0 ) return 0;\n    if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1;\n    if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;\n  }else{\n    if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1;\n  }\n  return 0;\n}\n\n/*\n** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up\n** that name in the set of source tables in pSrcList and make the pExpr\n** expression node refer back to that source column.  The following changes\n** are made to pExpr:\n**\n**    pExpr->iDb           Set the index in db->aDb[] of the database X\n**                         (even if X is implied).\n**    pExpr->iTable        Set to the cursor number for the table obtained\n**                         from pSrcList.\n**    pExpr->y.pTab        Points to the Table structure of X.Y (even if\n**                         X and/or Y are implied.)\n**    pExpr->iColumn       Set to the column number within the table.\n**    pExpr->op            Set to TK_COLUMN.\n**    pExpr->pLeft         Any expression this points to is deleted\n**    pExpr->pRight        Any expression this points to is deleted.\n**\n** The zDb variable is the name of the database (the \"X\").  This value may be\n** NULL meaning that name is of the form Y.Z or Z.  Any available database\n** can be used.  The zTable variable is the name of the table (the \"Y\").  This\n** value can be NULL if zDb is also NULL.  If zTable is NULL it\n** means that the form of the name is Z and that columns from any table\n** can be used.\n**\n** If the name cannot be resolved unambiguously, leave an error message\n** in pParse and return WRC_Abort.  Return WRC_Prune on success.\n*/\nstatic int lookupName(\n  Parse *pParse,       /* The parsing context */\n  const char *zDb,     /* Name of the database containing table, or NULL */\n  const char *zTab,    /* Name of table containing column, or NULL */\n  const Expr *pRight,  /* Name of the column. */\n  NameContext *pNC,    /* The name context used to resolve the name */\n  Expr *pExpr          /* Make this EXPR node point to the selected column */\n){\n  int i, j;                         /* Loop counters */\n  int cnt = 0;                      /* Number of matching column names */\n  int cntTab = 0;                   /* Number of potential \"rowid\" matches */\n  int nSubquery = 0;                /* How many levels of subquery */\n  sqlite3 *db = pParse->db;         /* The database connection */\n  SrcItem *pItem;                   /* Use for looping over pSrcList items */\n  SrcItem *pMatch = 0;              /* The matching pSrcList item */\n  NameContext *pTopNC = pNC;        /* First namecontext in the list */\n  Schema *pSchema = 0;              /* Schema of the expression */\n  int eNewExprOp = TK_COLUMN;       /* New value for pExpr->op on success */\n  Table *pTab = 0;                  /* Table holding the row */\n  ExprList *pFJMatch = 0;           /* Matches for FULL JOIN .. USING */\n  const char *zCol = pRight->u.zToken;\n\n  assert( pNC );     /* the name context cannot be NULL. */\n  assert( zCol );    /* The Z in X.Y.Z cannot be NULL */\n  assert( zDb==0 || zTab!=0 );\n  assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) );\n\n  /* Initialize the node to no-match */\n  pExpr->iTable = -1;\n  ExprSetVVAProperty(pExpr, EP_NoReduce);\n\n  /* Translate the schema name in zDb into a pointer to the corresponding\n  ** schema.  If not found, pSchema will remain NULL and nothing will match\n  ** resulting in an appropriate error message toward the end of this routine\n  */\n  if( zDb ){\n    testcase( pNC->ncFlags & NC_PartIdx );\n    testcase( pNC->ncFlags & NC_IsCheck );\n    if( (pNC->ncFlags & (NC_PartIdx|NC_IsCheck))!=0 ){\n      /* Silently ignore database qualifiers inside CHECK constraints and\n      ** partial indices.  Do not raise errors because that might break\n      ** legacy and because it does not hurt anything to just ignore the\n      ** database name. */\n      zDb = 0;\n    }else{\n      for(i=0; i<db->nDb; i++){\n        assert( db->aDb[i].zDbSName );\n        if( sqlite3StrICmp(db->aDb[i].zDbSName,zDb)==0 ){\n          pSchema = db->aDb[i].pSchema;\n          break;\n        }\n      }\n      if( i==db->nDb && sqlite3StrICmp(\"main\", zDb)==0 ){\n        /* This branch is taken when the main database has been renamed\n        ** using SQLITE_DBCONFIG_MAINDBNAME. */\n        pSchema = db->aDb[0].pSchema;\n        zDb = db->aDb[0].zDbSName;\n      }\n    }\n  }\n\n  /* Start at the inner-most context and move outward until a match is found */\n  assert( pNC && cnt==0 );\n  do{\n    ExprList *pEList;\n    SrcList *pSrcList = pNC->pSrcList;\n\n    if( pSrcList ){\n      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){\n        pTab = pItem->pSTab;\n        assert( pTab!=0 && pTab->zName!=0 );\n        assert( pTab->nCol>0 || pParse->nErr );\n        assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem));\n        if( pItem->fg.isNestedFrom ){\n          /* In this case, pItem is a subquery that has been formed from a\n          ** parenthesized subset of the FROM clause terms.  Example:\n          **   .... FROM t1 LEFT JOIN (t2 RIGHT JOIN t3 USING(x)) USING(y) ...\n          **                          \\_________________________/\n          **             This pItem -------------^\n          */\n          int hit = 0;\n          Select *pSel;\n          assert( pItem->fg.isSubquery );\n          assert( pItem->u4.pSubq!=0 );\n          pSel = pItem->u4.pSubq->pSelect;\n          assert( pSel!=0 );\n          pEList = pSel->pEList;\n          assert( pEList!=0 );\n          assert( pEList->nExpr==pTab->nCol );\n          for(j=0; j<pEList->nExpr; j++){\n            int bRowid = 0;       /* True if possible rowid match */\n            if( !sqlite3MatchEName(&pEList->a[j], zCol, zTab, zDb, &bRowid) ){\n              continue;\n            }\n            if( bRowid==0 ){\n              if( cnt>0 ){\n                if( pItem->fg.isUsing==0\n                 || sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0\n                 || pMatch==pItem\n                ){\n                  /* Two or more tables have the same column name which is\n                  ** not joined by USING. Or, a single table has two columns\n                  ** that match a USING term (if pMatch==pItem). These are both\n                  ** \"ambiguous column name\" errors. Signal as much by clearing\n                  ** pFJMatch and letting cnt go above 1. */\n                  sqlite3ExprListDelete(db, pFJMatch);\n                  pFJMatch = 0;\n                }else\n                if( (pItem->fg.jointype & JT_RIGHT)==0 ){\n                  /* An INNER or LEFT JOIN.  Use the left-most table */\n                  continue;\n                }else\n                if( (pItem->fg.jointype & JT_LEFT)==0 ){\n                  /* A RIGHT JOIN.  Use the right-most table */\n                  cnt = 0;\n                  sqlite3ExprListDelete(db, pFJMatch);\n                  pFJMatch = 0;\n                }else{\n                  /* For a FULL JOIN, we must construct a coalesce() func */\n                  extendFJMatch(pParse, &pFJMatch, pMatch, pExpr->iColumn);\n                }\n              }\n              cnt++;\n              hit = 1;\n            }else if( cnt>0 ){\n              /* This is a potential rowid match, but there has already been\n              ** a real match found. So this can be ignored.  */\n              continue;\n            }\n            cntTab++;\n            pMatch = pItem;\n            pExpr->iColumn = j;\n            pEList->a[j].fg.bUsed = 1;\n\n            /* rowid cannot be part of a USING clause - assert() this. */\n            assert( bRowid==0 || pEList->a[j].fg.bUsingTerm==0 );\n            if( pEList->a[j].fg.bUsingTerm ) break;\n          }\n          if( hit || zTab==0 ) continue;\n        }\n        assert( zDb==0 || zTab!=0 );\n        if( zTab ){\n          if( zDb ){\n            if( pTab->pSchema!=pSchema ) continue;\n            if( pSchema==0 && strcmp(zDb,\"*\")!=0 ) continue;\n          }\n          if( pItem->zAlias!=0 ){\n            if( sqlite3StrICmp(zTab, pItem->zAlias)!=0 ){\n              continue;\n            }\n          }else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){\n            if( pTab->tnum!=1 ) continue;\n            if( !isValidSchemaTableName(zTab, pTab, zDb) ) continue;\n          }\n          assert( ExprUseYTab(pExpr) );\n          if( IN_RENAME_OBJECT && pItem->zAlias ){\n            sqlite3RenameTokenRemap(pParse, 0, (void*)&pExpr->y.pTab);\n          }\n        }\n        j = sqlite3ColumnIndex(pTab, zCol);\n        if( j>=0 ){\n          if( cnt>0 ){\n            if( pItem->fg.isUsing==0\n             || sqlite3IdListIndex(pItem->u3.pUsing, zCol)<0\n            ){\n              /* Two or more tables have the same column name which is\n              ** not joined by USING.  This is an error.  Signal as much\n              ** by clearing pFJMatch and letting cnt go above 1. */\n              sqlite3ExprListDelete(db, pFJMatch);\n              pFJMatch = 0;\n            }else\n            if( (pItem->fg.jointype & JT_RIGHT)==0 ){\n              /* An INNER or LEFT JOIN.  Use the left-most table */\n              continue;\n            }else\n            if( (pItem->fg.jointype & JT_LEFT)==0 ){\n              /* A RIGHT JOIN.  Use the right-most table */\n              cnt = 0;\n              sqlite3ExprListDelete(db, pFJMatch);\n              pFJMatch = 0;\n            }else{\n              /* For a FULL JOIN, we must construct a coalesce() func */\n              extendFJMatch(pParse, &pFJMatch, pMatch, pExpr->iColumn);\n            }\n          }\n          cnt++;\n          pMatch = pItem;\n          /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */\n          pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;\n          if( pItem->fg.isNestedFrom ){\n            sqlite3SrcItemColumnUsed(pItem, j);\n          }\n        }\n        if( 0==cnt && VisibleRowid(pTab) ){\n          /* pTab is a potential ROWID match.  Keep track of it and match\n          ** the ROWID later if that seems appropriate.  (Search for \"cntTab\"\n          ** to find related code.)  Only allow a ROWID match if there is\n          ** a single ROWID match candidate.\n          */\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n          /* In SQLITE_ALLOW_ROWID_IN_VIEW mode, allow a ROWID match\n          ** if there is a single VIEW candidate or if there is a single\n          ** non-VIEW candidate plus multiple VIEW candidates.  In other\n          ** words non-VIEW candidate terms take precedence over VIEWs.\n          */\n          if( cntTab==0\n           || (cntTab==1\n               && pMatch!=0\n               && ALWAYS(pMatch->pSTab!=0)\n               && (pMatch->pSTab->tabFlags & TF_Ephemeral)!=0\n               && (pTab->tabFlags & TF_Ephemeral)==0)\n          ){\n            cntTab = 1;\n            pMatch = pItem;\n          }else{\n            cntTab++;\n          }\n#else\n          /* The (much more common) non-SQLITE_ALLOW_ROWID_IN_VIEW case is\n          ** simpler since we require exactly one candidate, which will\n          ** always be a non-VIEW\n          */\n          cntTab++;\n          pMatch = pItem;\n#endif\n        }\n      }\n      if( pMatch ){\n        pExpr->iTable = pMatch->iCursor;\n        assert( ExprUseYTab(pExpr) );\n        pExpr->y.pTab = pMatch->pSTab;\n        if( (pMatch->fg.jointype & (JT_LEFT|JT_LTORJ))!=0 ){\n          ExprSetProperty(pExpr, EP_CanBeNull);\n        }\n        pSchema = pExpr->y.pTab->pSchema;\n      }\n    } /* if( pSrcList ) */\n\n#if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT)\n    /* If we have not already resolved the name, then maybe\n    ** it is a new.* or old.* trigger argument reference.  Or\n    ** maybe it is an excluded.* from an upsert.  Or maybe it is\n    ** a reference in the RETURNING clause to a table being modified.\n    */\n    if( cnt==0 && zDb==0 ){\n      pTab = 0;\n#ifndef SQLITE_OMIT_TRIGGER\n      if( pParse->pTriggerTab!=0 ){\n        int op = pParse->eTriggerOp;\n        assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );\n        if( pParse->bReturning ){\n          if( (pNC->ncFlags & NC_UBaseReg)!=0\n           && ALWAYS(zTab==0\n                     || sqlite3StrICmp(zTab,pParse->pTriggerTab->zName)==0\n                     || isValidSchemaTableName(zTab, pParse->pTriggerTab, 0))\n          ){\n            pExpr->iTable = op!=TK_DELETE;\n            pTab = pParse->pTriggerTab;\n          }\n        }else if( op!=TK_DELETE && zTab && sqlite3StrICmp(\"new\",zTab) == 0 ){\n          pExpr->iTable = 1;\n          pTab = pParse->pTriggerTab;\n        }else if( op!=TK_INSERT && zTab && sqlite3StrICmp(\"old\",zTab)==0 ){\n          pExpr->iTable = 0;\n          pTab = pParse->pTriggerTab;\n        }\n      }\n#endif /* SQLITE_OMIT_TRIGGER */\n#ifndef SQLITE_OMIT_UPSERT\n      if( (pNC->ncFlags & NC_UUpsert)!=0 && zTab!=0 ){\n        Upsert *pUpsert = pNC->uNC.pUpsert;\n        if( pUpsert && sqlite3StrICmp(\"excluded\",zTab)==0 ){\n          pTab = pUpsert->pUpsertSrc->a[0].pSTab;\n          pExpr->iTable = EXCLUDED_TABLE_NUMBER;\n        }\n      }\n#endif /* SQLITE_OMIT_UPSERT */\n\n      if( pTab ){\n        int iCol;\n        pSchema = pTab->pSchema;\n        cntTab++;\n        iCol = sqlite3ColumnIndex(pTab, zCol);\n        if( iCol>=0 ){\n          if( pTab->iPKey==iCol ) iCol = -1;\n        }else{\n          if( sqlite3IsRowid(zCol) && VisibleRowid(pTab) ){\n            iCol = -1;\n          }else{\n            iCol = pTab->nCol;\n          }\n        }\n        if( iCol<pTab->nCol ){\n          cnt++;\n          pMatch = 0;\n#ifndef SQLITE_OMIT_UPSERT\n          if( pExpr->iTable==EXCLUDED_TABLE_NUMBER ){\n            testcase( iCol==(-1) );\n            assert( ExprUseYTab(pExpr) );\n            if( IN_RENAME_OBJECT ){\n              pExpr->iColumn = iCol;\n              pExpr->y.pTab = pTab;\n              eNewExprOp = TK_COLUMN;\n            }else{\n              pExpr->iTable = pNC->uNC.pUpsert->regData +\n                 sqlite3TableColumnToStorage(pTab, iCol);\n              eNewExprOp = TK_REGISTER;\n            }\n          }else\n#endif /* SQLITE_OMIT_UPSERT */\n          {\n            assert( ExprUseYTab(pExpr) );\n            pExpr->y.pTab = pTab;\n            if( pParse->bReturning ){\n              eNewExprOp = TK_REGISTER;\n              pExpr->op2 = TK_COLUMN;\n              pExpr->iColumn = iCol;\n              pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable +\n                 sqlite3TableColumnToStorage(pTab, iCol) + 1;\n            }else{\n              pExpr->iColumn = (i16)iCol;\n              eNewExprOp = TK_TRIGGER;\n#ifndef SQLITE_OMIT_TRIGGER\n              if( iCol<0 ){\n                pExpr->affExpr = SQLITE_AFF_INTEGER;\n              }else if( pExpr->iTable==0 ){\n                testcase( iCol==31 );\n                testcase( iCol==32 );\n                pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));\n              }else{\n                testcase( iCol==31 );\n                testcase( iCol==32 );\n                pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));\n              }\n#endif /* SQLITE_OMIT_TRIGGER */\n            }\n          }\n        }\n      }\n    }\n#endif /* !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_UPSERT) */\n\n    /*\n    ** Perhaps the name is a reference to the ROWID\n    */\n    if( cnt==0\n     && cntTab>=1\n     && pMatch\n     && (pNC->ncFlags & (NC_IdxExpr|NC_GenCol))==0\n     && sqlite3IsRowid(zCol)\n     && ALWAYS(VisibleRowid(pMatch->pSTab) || pMatch->fg.isNestedFrom)\n    ){\n      cnt = cntTab;\n#if SQLITE_ALLOW_ROWID_IN_VIEW+0==2\n      if( pMatch->pSTab!=0 && IsView(pMatch->pSTab) ){\n        eNewExprOp = TK_NULL;\n      }\n#endif\n      if( pMatch->fg.isNestedFrom==0 ) pExpr->iColumn = -1;\n      pExpr->affExpr = SQLITE_AFF_INTEGER;\n    }\n\n    /*\n    ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z\n    ** might refer to an result-set alias.  This happens, for example, when\n    ** we are resolving names in the WHERE clause of the following command:\n    **\n    **     SELECT a+b AS x FROM table WHERE x<10;\n    **\n    ** In cases like this, replace pExpr with a copy of the expression that\n    ** forms the result set entry (\"a+b\" in the example) and return immediately.\n    ** Note that the expression in the result set should have already been\n    ** resolved by the time the WHERE clause is resolved.\n    **\n    ** The ability to use an output result-set column in the WHERE, GROUP BY,\n    ** or HAVING clauses, or as part of a larger expression in the ORDER BY\n    ** clause is not standard SQL.  This is a (goofy) SQLite extension, that\n    ** is supported for backwards compatibility only. Hence, we issue a warning\n    ** on sqlite3_log() whenever the capability is used.\n    */\n    if( cnt==0\n     && (pNC->ncFlags & NC_UEList)!=0\n     && zTab==0\n    ){\n      pEList = pNC->uNC.pEList;\n      assert( pEList!=0 );\n      for(j=0; j<pEList->nExpr; j++){\n        char *zAs = pEList->a[j].zEName;\n        if( pEList->a[j].fg.eEName==ENAME_NAME\n         && sqlite3_stricmp(zAs, zCol)==0\n        ){\n          Expr *pOrig;\n          assert( pExpr->pLeft==0 && pExpr->pRight==0 );\n          assert( ExprUseXList(pExpr)==0 || pExpr->x.pList==0 );\n          assert( ExprUseXSelect(pExpr)==0 || pExpr->x.pSelect==0 );\n          pOrig = pEList->a[j].pExpr;\n          if( (pNC->ncFlags&NC_AllowAgg)==0 && ExprHasProperty(pOrig, EP_Agg) ){\n            sqlite3ErrorMsg(pParse, \"misuse of aliased aggregate %s\", zAs);\n            return WRC_Abort;\n          }\n          if( ExprHasProperty(pOrig, EP_Win)\n           && ((pNC->ncFlags&NC_AllowWin)==0 || pNC!=pTopNC )\n          ){\n            sqlite3ErrorMsg(pParse, \"misuse of aliased window function %s\",zAs);\n            return WRC_Abort;\n          }\n          if( sqlite3ExprVectorSize(pOrig)!=1 ){\n            sqlite3ErrorMsg(pParse, \"row value misused\");\n            return WRC_Abort;\n          }\n          resolveAlias(pParse, pEList, j, pExpr, nSubquery);\n          cnt = 1;\n          pMatch = 0;\n          assert( zTab==0 && zDb==0 );\n          if( IN_RENAME_OBJECT ){\n            sqlite3RenameTokenRemap(pParse, 0, (void*)pExpr);\n          }\n          goto lookupname_end;\n        }\n      }\n    }\n\n    /* Advance to the next name context.  The loop will exit when either\n    ** we have a match (cnt>0) or when we run out of name contexts.\n    */\n    if( cnt ) break;\n    pNC = pNC->pNext;\n    nSubquery++;\n  }while( pNC );\n\n\n  /*\n  ** If X and Y are NULL (in other words if only the column name Z is\n  ** supplied) and the value of Z is enclosed in double-quotes, then\n  ** Z is a string literal if it doesn't match any column names.  In that\n  ** case, we need to return right away and not make any changes to\n  ** pExpr.\n  **\n  ** Because no reference was made to outer contexts, the pNC->nRef\n  ** fields are not changed in any context.\n  */\n  if( cnt==0 && zTab==0 ){\n    assert( pExpr->op==TK_ID );\n    if( ExprHasProperty(pExpr,EP_DblQuoted)\n     && areDoubleQuotedStringsEnabled(db, pTopNC)\n    ){\n      /* If a double-quoted identifier does not match any known column name,\n      ** then treat it as a string.\n      **\n      ** This hack was added in the early days of SQLite in a misguided attempt\n      ** to be compatible with MySQL 3.x, which used double-quotes for strings.\n      ** I now sorely regret putting in this hack. The effect of this hack is\n      ** that misspelled identifier names are silently converted into strings\n      ** rather than causing an error, to the frustration of countless\n      ** programmers. To all those frustrated programmers, my apologies.\n      **\n      ** Someday, I hope to get rid of this hack. Unfortunately there is\n      ** a huge amount of legacy SQL that uses it. So for now, we just\n      ** issue a warning.\n      */\n      sqlite3_log(SQLITE_WARNING,\n        \"double-quoted string literal: \\\"%w\\\"\", zCol);\n#ifdef SQLITE_ENABLE_NORMALIZE\n      sqlite3VdbeAddDblquoteStr(db, pParse->pVdbe, zCol);\n#endif\n      pExpr->op = TK_STRING;\n      memset(&pExpr->y, 0, sizeof(pExpr->y));\n      return WRC_Prune;\n    }\n    if( sqlite3ExprIdToTrueFalse(pExpr) ){\n      return WRC_Prune;\n    }\n  }\n\n  /*\n  ** cnt==0 means there was not match.\n  ** cnt>1 means there were two or more matches.\n  **\n  ** cnt==0 is always an error.  cnt>1 is often an error, but might\n  ** be multiple matches for a NATURAL LEFT JOIN or a LEFT JOIN USING.\n  */\n  assert( pFJMatch==0 || cnt>0 );\n  assert( !ExprHasProperty(pExpr, EP_xIsSelect|EP_IntValue) );\n  if( cnt!=1 ){\n    const char *zErr;\n    if( pFJMatch ){\n      if( pFJMatch->nExpr==cnt-1 ){\n        if( ExprHasProperty(pExpr,EP_Leaf) ){\n          ExprClearProperty(pExpr,EP_Leaf);\n        }else{\n          sqlite3ExprDelete(db, pExpr->pLeft);\n          pExpr->pLeft = 0;\n          sqlite3ExprDelete(db, pExpr->pRight);\n          pExpr->pRight = 0;\n        }\n        extendFJMatch(pParse, &pFJMatch, pMatch, pExpr->iColumn);\n        pExpr->op = TK_FUNCTION;\n        pExpr->u.zToken = \"coalesce\";\n        pExpr->x.pList = pFJMatch;\n        cnt = 1;\n        goto lookupname_end;\n      }else{\n        sqlite3ExprListDelete(db, pFJMatch);\n        pFJMatch = 0;\n      }\n    }\n    zErr = cnt==0 ? \"no such column\" : \"ambiguous column name\";\n    if( zDb ){\n      sqlite3ErrorMsg(pParse, \"%s: %s.%s.%s\", zErr, zDb, zTab, zCol);\n    }else if( zTab ){\n      sqlite3ErrorMsg(pParse, \"%s: %s.%s\", zErr, zTab, zCol);\n    }else if( cnt==0 && ExprHasProperty(pRight,EP_DblQuoted) ){\n      sqlite3ErrorMsg(pParse, \"%s: \\\"%s\\\" - should this be a\"\n                              \" string literal in single-quotes?\",\n                              zErr, zCol);\n    }else{\n      sqlite3ErrorMsg(pParse, \"%s: %s\", zErr, zCol);\n    }\n    sqlite3RecordErrorOffsetOfExpr(pParse->db, pExpr);\n    pParse->checkSchema = 1;\n    pTopNC->nNcErr++;\n    eNewExprOp = TK_NULL;\n  }\n  assert( pFJMatch==0 );\n\n  /* Remove all substructure from pExpr */\n  if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){\n    sqlite3ExprDelete(db, pExpr->pLeft);\n    pExpr->pLeft = 0;\n    sqlite3ExprDelete(db, pExpr->pRight);\n    pExpr->pRight = 0;\n    ExprSetProperty(pExpr, EP_Leaf);\n  }\n\n  /* If a column from a table in pSrcList is referenced, then record\n  ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes\n  ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  Bit 63 is\n  ** set if the 63rd or any subsequent column is used.\n  **\n  ** The colUsed mask is an optimization used to help determine if an\n  ** index is a covering index.  The correct answer is still obtained\n  ** if the mask contains extra set bits.  However, it is important to\n  ** avoid setting bits beyond the maximum column number of the table.\n  ** (See ticket [b92e5e8ec2cdbaa1]).\n  **\n  ** If a generated column is referenced, set bits for every column\n  ** of the table.\n  */\n  if( pMatch ){\n    if( pExpr->iColumn>=0 ){\n      pMatch->colUsed |= sqlite3ExprColUsed(pExpr);\n    }else{\n      pMatch->fg.rowidUsed = 1;\n    }\n  }\n\n  pExpr->op = eNewExprOp;\nlookupname_end:\n  if( cnt==1 ){\n    assert( pNC!=0 );\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    if( pParse->db->xAuth\n     && (pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER)\n    ){\n      sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);\n    }\n#endif\n    /* Increment the nRef value on all name contexts from TopNC up to\n    ** the point where the name matched. */\n    for(;;){\n      assert( pTopNC!=0 );\n      pTopNC->nRef++;\n      if( pTopNC==pNC ) break;\n      pTopNC = pTopNC->pNext;\n    }\n    return WRC_Prune;\n  } else {\n    return WRC_Abort;\n  }\n}\n\n/*\n** Allocate and return a pointer to an expression to load the column iCol\n** from datasource iSrc in SrcList pSrc.\n*/\nSQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){\n  Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0);\n  if( p ){\n    SrcItem *pItem = &pSrc->a[iSrc];\n    Table *pTab;\n    assert( ExprUseYTab(p) );\n    pTab = p->y.pTab = pItem->pSTab;\n    p->iTable = pItem->iCursor;\n    if( p->y.pTab->iPKey==iCol ){\n      p->iColumn = -1;\n    }else{\n      p->iColumn = (ynVar)iCol;\n      if( (pTab->tabFlags & TF_HasGenerated)!=0\n       && (pTab->aCol[iCol].colFlags & COLFLAG_GENERATED)!=0\n      ){\n        testcase( pTab->nCol==63 );\n        testcase( pTab->nCol==64 );\n        pItem->colUsed = pTab->nCol>=64 ? ALLBITS : MASKBIT(pTab->nCol)-1;\n      }else{\n        testcase( iCol==BMS );\n        testcase( iCol==BMS-1 );\n        pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);\n      }\n    }\n  }\n  return p;\n}\n\n/*\n** Report an error that an expression is not valid for some set of\n** pNC->ncFlags values determined by validMask.\n**\n** static void notValid(\n**   Parse *pParse,       // Leave error message here\n**   NameContext *pNC,    // The name context\n**   const char *zMsg,    // Type of error\n**   int validMask,       // Set of contexts for which prohibited\n**   Expr *pExpr          // Invalidate this expression on error\n** ){...}\n**\n** As an optimization, since the conditional is almost always false\n** (because errors are rare), the conditional is moved outside of the\n** function call using a macro.\n*/\nstatic void notValidImpl(\n   Parse *pParse,       /* Leave error message here */\n   NameContext *pNC,    /* The name context */\n   const char *zMsg,    /* Type of error */\n   Expr *pExpr,         /* Invalidate this expression on error */\n   Expr *pError         /* Associate error with this expression */\n){\n  const char *zIn = \"partial index WHERE clauses\";\n  if( pNC->ncFlags & NC_IdxExpr )      zIn = \"index expressions\";\n#ifndef SQLITE_OMIT_CHECK\n  else if( pNC->ncFlags & NC_IsCheck ) zIn = \"CHECK constraints\";\n#endif\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  else if( pNC->ncFlags & NC_GenCol ) zIn = \"generated columns\";\n#endif\n  sqlite3ErrorMsg(pParse, \"%s prohibited in %s\", zMsg, zIn);\n  if( pExpr ) pExpr->op = TK_NULL;\n  sqlite3RecordErrorOffsetOfExpr(pParse->db, pError);\n}\n#define sqlite3ResolveNotValid(P,N,M,X,E,R) \\\n  assert( ((X)&~(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol))==0 ); \\\n  if( ((N)->ncFlags & (X))!=0 ) notValidImpl(P,N,M,E,R);\n\n/*\n** Expression p should encode a floating point value between 1.0 and 0.0.\n** Return 134,217,728 (2^27) times this value.  Or return -1 if p is not\n** a floating point value between 1.0 and 0.0.\n*/\nstatic int exprProbability(Expr *p){\n  double r = -1.0;\n  if( p->op!=TK_FLOAT ) return -1;\n  assert( !ExprHasProperty(p, EP_IntValue) );\n  sqlite3AtoF(p->u.zToken, &r, sqlite3Strlen30(p->u.zToken), SQLITE_UTF8);\n  assert( r>=0.0 );\n  if( r>1.0 ) return -1;\n  return (int)(r*134217728.0);\n}\n\n/*\n** This routine is callback for sqlite3WalkExpr().\n**\n** Resolve symbolic names into TK_COLUMN operators for the current\n** node in the expression tree.  Return 0 to continue the search down\n** the tree or 2 to abort the tree walk.\n**\n** This routine also does error checking and name resolution for\n** function names.  The operator for aggregate functions is changed\n** to TK_AGG_FUNCTION.\n*/\nstatic int resolveExprStep(Walker *pWalker, Expr *pExpr){\n  NameContext *pNC;\n  Parse *pParse;\n\n  pNC = pWalker->u.pNC;\n  assert( pNC!=0 );\n  pParse = pNC->pParse;\n  assert( pParse==pWalker->pParse );\n\n#ifndef NDEBUG\n  if( pNC->pSrcList && pNC->pSrcList->nAlloc>0 ){\n    SrcList *pSrcList = pNC->pSrcList;\n    int i;\n    for(i=0; i<pNC->pSrcList->nSrc; i++){\n      assert( pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab);\n    }\n  }\n#endif\n  switch( pExpr->op ){\n\n    /* The special operator TK_ROW means use the rowid for the first\n    ** column in the FROM clause.  This is used by the LIMIT and ORDER BY\n    ** clause processing on UPDATE and DELETE statements, and by\n    ** UPDATE ... FROM statement processing.\n    */\n    case TK_ROW: {\n      SrcList *pSrcList = pNC->pSrcList;\n      SrcItem *pItem;\n      assert( pSrcList && pSrcList->nSrc>=1 );\n      pItem = pSrcList->a;\n      pExpr->op = TK_COLUMN;\n      assert( ExprUseYTab(pExpr) );\n      pExpr->y.pTab = pItem->pSTab;\n      pExpr->iTable = pItem->iCursor;\n      pExpr->iColumn--;\n      pExpr->affExpr = SQLITE_AFF_INTEGER;\n      break;\n    }\n\n    /* An optimization:  Attempt to convert\n    **\n    **      \"expr IS NOT NULL\"  -->  \"TRUE\"\n    **      \"expr IS NULL\"      -->  \"FALSE\"\n    **\n    ** if we can prove that \"expr\" is never NULL.  Call this the\n    ** \"NOT NULL strength reduction optimization\".\n    **\n    ** If this optimization occurs, also restore the NameContext ref-counts\n    ** to the state they where in before the \"column\" LHS expression was\n    ** resolved.  This prevents \"column\" from being counted as having been\n    ** referenced, which might prevent a SELECT from being erroneously\n    ** marked as correlated.\n    **\n    ** 2024-03-28: Beware of aggregates.  A bare column of aggregated table\n    ** can still evaluate to NULL even though it is marked as NOT NULL.\n    ** Example:\n    **\n    **       CREATE TABLE t1(a INT NOT NULL);\n    **       SELECT a, a IS NULL, a IS NOT NULL, count(*) FROM t1;\n    **\n    ** The \"a IS NULL\" and \"a IS NOT NULL\" expressions cannot be optimized\n    ** here because at the time this case is hit, we do not yet know whether\n    ** or not t1 is being aggregated.  We have to assume the worst and omit\n    ** the optimization.  The only time it is safe to apply this optimization\n    ** is within the WHERE clause.\n    */\n    case TK_NOTNULL:\n    case TK_ISNULL: {\n      int anRef[8];\n      NameContext *p;\n      int i;\n      for(i=0, p=pNC; p && i<ArraySize(anRef); p=p->pNext, i++){\n        anRef[i] = p->nRef;\n      }\n      sqlite3WalkExpr(pWalker, pExpr->pLeft);\n      if( IN_RENAME_OBJECT ) return WRC_Prune;\n      if( sqlite3ExprCanBeNull(pExpr->pLeft) ){\n        /* The expression can be NULL.  So the optimization does not apply */\n        return WRC_Prune;\n      }\n\n      for(i=0, p=pNC; p; p=p->pNext, i++){\n        if( (p->ncFlags & NC_Where)==0 ){\n          return WRC_Prune;  /* Not in a WHERE clause.  Unsafe to optimize. */\n        }\n      }\n      testcase( ExprHasProperty(pExpr, EP_OuterON) );\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n#if TREETRACE_ENABLED\n      if( sqlite3TreeTrace & 0x80000 ){\n        sqlite3DebugPrintf(\n           \"NOT NULL strength reduction converts the following to %d:\\n\",\n           pExpr->op==TK_NOTNULL\n        );\n        sqlite3ShowExpr(pExpr);\n      }\n#endif /* TREETRACE_ENABLED */\n      pExpr->u.iValue = (pExpr->op==TK_NOTNULL);\n      pExpr->flags |= EP_IntValue;\n      pExpr->op = TK_INTEGER;\n      for(i=0, p=pNC; p && i<ArraySize(anRef); p=p->pNext, i++){\n        p->nRef = anRef[i];\n      }\n      sqlite3ExprDelete(pParse->db, pExpr->pLeft);\n      pExpr->pLeft = 0;\n      return WRC_Prune;\n    }\n\n    /* A column name:                    ID\n    ** Or table name and column name:    ID.ID\n    ** Or a database, table and column:  ID.ID.ID\n    **\n    ** The TK_ID and TK_OUT cases are combined so that there will only\n    ** be one call to lookupName().  Then the compiler will in-line\n    ** lookupName() for a size reduction and performance increase.\n    */\n    case TK_ID:\n    case TK_DOT: {\n      const char *zTable;\n      const char *zDb;\n      Expr *pRight;\n\n      if( pExpr->op==TK_ID ){\n        zDb = 0;\n        zTable = 0;\n        assert( !ExprHasProperty(pExpr, EP_IntValue) );\n        pRight = pExpr;\n      }else{\n        Expr *pLeft = pExpr->pLeft;\n        testcase( pNC->ncFlags & NC_IdxExpr );\n        testcase( pNC->ncFlags & NC_GenCol );\n        sqlite3ResolveNotValid(pParse, pNC, \"the \\\".\\\" operator\",\n                               NC_IdxExpr|NC_GenCol, 0, pExpr);\n        pRight = pExpr->pRight;\n        if( pRight->op==TK_ID ){\n          zDb = 0;\n        }else{\n          assert( pRight->op==TK_DOT );\n          assert( !ExprHasProperty(pRight, EP_IntValue) );\n          zDb = pLeft->u.zToken;\n          pLeft = pRight->pLeft;\n          pRight = pRight->pRight;\n        }\n        assert( ExprUseUToken(pLeft) && ExprUseUToken(pRight) );\n        zTable = pLeft->u.zToken;\n        assert( ExprUseYTab(pExpr) );\n        if( IN_RENAME_OBJECT ){\n          sqlite3RenameTokenRemap(pParse, (void*)pExpr, (void*)pRight);\n          sqlite3RenameTokenRemap(pParse, (void*)&pExpr->y.pTab, (void*)pLeft);\n        }\n      }\n      return lookupName(pParse, zDb, zTable, pRight, pNC, pExpr);\n    }\n\n    /* Resolve function names\n    */\n    case TK_FUNCTION: {\n      ExprList *pList;            /* The argument list */\n      int n;                      /* Number of arguments */\n      int no_such_func = 0;       /* True if no such function exists */\n      int wrong_num_args = 0;     /* True if wrong number of arguments */\n      int is_agg = 0;             /* True if is an aggregate function */\n      const char *zId;            /* The function name. */\n      FuncDef *pDef;              /* Information about the function */\n      u8 enc = ENC(pParse->db);   /* The database encoding */\n      int savedAllowFlags = (pNC->ncFlags & (NC_AllowAgg | NC_AllowWin));\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      Window *pWin = (IsWindowFunc(pExpr) ? pExpr->y.pWin : 0);\n#endif\n      assert( !ExprHasProperty(pExpr, EP_xIsSelect|EP_IntValue) );\n      assert( pExpr->pLeft==0 || pExpr->pLeft->op==TK_ORDER );\n      pList = pExpr->x.pList;\n      n = pList ? pList->nExpr : 0;\n      zId = pExpr->u.zToken;\n      pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0);\n      if( pDef==0 ){\n        pDef = sqlite3FindFunction(pParse->db, zId, -2, enc, 0);\n        if( pDef==0 ){\n          no_such_func = 1;\n        }else{\n          wrong_num_args = 1;\n        }\n      }else{\n        is_agg = pDef->xFinalize!=0;\n        if( pDef->funcFlags & SQLITE_FUNC_UNLIKELY ){\n          ExprSetProperty(pExpr, EP_Unlikely);\n          if( n==2 ){\n            pExpr->iTable = exprProbability(pList->a[1].pExpr);\n            if( pExpr->iTable<0 ){\n              sqlite3ErrorMsg(pParse,\n                \"second argument to %#T() must be a \"\n                \"constant between 0.0 and 1.0\", pExpr);\n              pNC->nNcErr++;\n            }\n          }else{\n            /* EVIDENCE-OF: R-61304-29449 The unlikely(X) function is\n            ** equivalent to likelihood(X, 0.0625).\n            ** EVIDENCE-OF: R-01283-11636 The unlikely(X) function is\n            ** short-hand for likelihood(X,0.0625).\n            ** EVIDENCE-OF: R-36850-34127 The likely(X) function is short-hand\n            ** for likelihood(X,0.9375).\n            ** EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent\n            ** to likelihood(X,0.9375). */\n            /* TUNING: unlikely() probability is 0.0625.  likely() is 0.9375 */\n            pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;\n          }\n        }\n#ifndef SQLITE_OMIT_AUTHORIZATION\n        {\n          int auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0,pDef->zName,0);\n          if( auth!=SQLITE_OK ){\n            if( auth==SQLITE_DENY ){\n              sqlite3ErrorMsg(pParse, \"not authorized to use function: %#T\",\n                                      pExpr);\n              pNC->nNcErr++;\n            }\n            pExpr->op = TK_NULL;\n            return WRC_Prune;\n          }\n        }\n#endif\n\n        /* If the function may call sqlite3_value_subtype(), then set the\n        ** EP_SubtArg flag on all of its argument expressions. This prevents\n        ** where.c from replacing the expression with a value read from an\n        ** index on the same expression, which will not have the correct\n        ** subtype. Also set the flag if the function expression itself is\n        ** an EP_SubtArg expression. In this case subtypes are required as\n        ** the function may return a value with a subtype back to its\n        ** caller using sqlite3_result_value().  */\n        if( (pDef->funcFlags & SQLITE_SUBTYPE)\n         || ExprHasProperty(pExpr, EP_SubtArg)\n        ){\n          int ii;\n          for(ii=0; ii<n; ii++){\n            ExprSetProperty(pList->a[ii].pExpr, EP_SubtArg);\n          }\n        }\n\n        if( pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) ){\n          /* For the purposes of the EP_ConstFunc flag, date and time\n          ** functions and other functions that change slowly are considered\n          ** constant because they are constant for the duration of one query.\n          ** This allows them to be factored out of inner loops. */\n          ExprSetProperty(pExpr,EP_ConstFunc);\n        }\n        if( (pDef->funcFlags & SQLITE_FUNC_CONSTANT)==0 ){\n          /* Clearly non-deterministic functions like random(), but also\n          ** date/time functions that use 'now', and other functions like\n          ** sqlite_version() that might change over time cannot be used\n          ** in an index or generated column.  Curiously, they can be used\n          ** in a CHECK constraint.  SQLServer, MySQL, and PostgreSQL all\n          ** allow this. */\n          sqlite3ResolveNotValid(pParse, pNC, \"non-deterministic functions\",\n                                 NC_IdxExpr|NC_PartIdx|NC_GenCol, 0, pExpr);\n        }else{\n          assert( (NC_SelfRef & 0xff)==NC_SelfRef ); /* Must fit in 8 bits */\n          pExpr->op2 = pNC->ncFlags & NC_SelfRef;\n        }\n        if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0\n         && pParse->nested==0\n         && (pParse->db->mDbFlags & DBFLAG_InternalFunc)==0\n        ){\n          /* Internal-use-only functions are disallowed unless the\n          ** SQL is being compiled using sqlite3NestedParse() or\n          ** the SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control has be\n          ** used to activate internal functions for testing purposes */\n          no_such_func = 1;\n          pDef = 0;\n        }else\n        if( (pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE))!=0\n         && !IN_RENAME_OBJECT\n        ){\n          if( pNC->ncFlags & NC_FromDDL ) ExprSetProperty(pExpr, EP_FromDDL);\n          sqlite3ExprFunctionUsable(pParse, pExpr, pDef);\n        }\n      }\n\n      if( 0==IN_RENAME_OBJECT ){\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        assert( is_agg==0 || (pDef->funcFlags & SQLITE_FUNC_MINMAX)\n          || (pDef->xValue==0 && pDef->xInverse==0)\n          || (pDef->xValue && pDef->xInverse && pDef->xSFunc && pDef->xFinalize)\n        );\n        if( pDef && pDef->xValue==0 && pWin ){\n          sqlite3ErrorMsg(pParse,\n              \"%#T() may not be used as a window function\", pExpr\n          );\n          pNC->nNcErr++;\n        }else if(\n              (is_agg && (pNC->ncFlags & NC_AllowAgg)==0)\n           || (is_agg && (pDef->funcFlags&SQLITE_FUNC_WINDOW) && !pWin)\n           || (is_agg && pWin && (pNC->ncFlags & NC_AllowWin)==0)\n        ){\n          const char *zType;\n          if( (pDef->funcFlags & SQLITE_FUNC_WINDOW) || pWin ){\n            zType = \"window\";\n          }else{\n            zType = \"aggregate\";\n          }\n          sqlite3ErrorMsg(pParse, \"misuse of %s function %#T()\",zType,pExpr);\n          pNC->nNcErr++;\n          is_agg = 0;\n        }\n#else\n        if( (is_agg && (pNC->ncFlags & NC_AllowAgg)==0) ){\n          sqlite3ErrorMsg(pParse,\"misuse of aggregate function %#T()\",pExpr);\n          pNC->nNcErr++;\n          is_agg = 0;\n        }\n#endif\n        else if( no_such_func && pParse->db->init.busy==0\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n                  && pParse->explain==0\n#endif\n        ){\n          sqlite3ErrorMsg(pParse, \"no such function: %#T\", pExpr);\n          pNC->nNcErr++;\n        }else if( wrong_num_args ){\n          sqlite3ErrorMsg(pParse,\"wrong number of arguments to function %#T()\",\n               pExpr);\n          pNC->nNcErr++;\n        }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        else if( is_agg==0 && ExprHasProperty(pExpr, EP_WinFunc) ){\n          sqlite3ErrorMsg(pParse,\n              \"FILTER may not be used with non-aggregate %#T()\",\n              pExpr\n          );\n          pNC->nNcErr++;\n        }\n#endif\n        else if( is_agg==0 && pExpr->pLeft ){\n          sqlite3ExprOrderByAggregateError(pParse, pExpr);\n          pNC->nNcErr++;\n        }\n        if( is_agg ){\n          /* Window functions may not be arguments of aggregate functions.\n          ** Or arguments of other window functions. But aggregate functions\n          ** may be arguments for window functions.  */\n#ifndef SQLITE_OMIT_WINDOWFUNC\n          pNC->ncFlags &= ~(NC_AllowWin | (!pWin ? NC_AllowAgg : 0));\n#else\n          pNC->ncFlags &= ~NC_AllowAgg;\n#endif\n        }\n      }\n      else if( ExprHasProperty(pExpr, EP_WinFunc) || pExpr->pLeft ){\n        is_agg = 1;\n      }\n      sqlite3WalkExprList(pWalker, pList);\n      if( is_agg ){\n        if( pExpr->pLeft ){\n          assert( pExpr->pLeft->op==TK_ORDER );\n          assert( ExprUseXList(pExpr->pLeft) );\n          sqlite3WalkExprList(pWalker, pExpr->pLeft->x.pList);\n        }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        if( pWin && pParse->nErr==0 ){\n          Select *pSel = pNC->pWinSelect;\n          assert( ExprUseYWin(pExpr) && pWin==pExpr->y.pWin );\n          if( IN_RENAME_OBJECT==0 ){\n            sqlite3WindowUpdate(pParse, pSel ? pSel->pWinDefn : 0, pWin, pDef);\n            if( pParse->db->mallocFailed ) break;\n          }\n          sqlite3WalkExprList(pWalker, pWin->pPartition);\n          sqlite3WalkExprList(pWalker, pWin->pOrderBy);\n          sqlite3WalkExpr(pWalker, pWin->pFilter);\n          sqlite3WindowLink(pSel, pWin);\n          pNC->ncFlags |= NC_HasWin;\n        }else\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n        {\n          NameContext *pNC2;          /* For looping up thru outer contexts */\n          pExpr->op = TK_AGG_FUNCTION;\n          pExpr->op2 = 0;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n          if( ExprHasProperty(pExpr, EP_WinFunc) ){\n            sqlite3WalkExpr(pWalker, pExpr->y.pWin->pFilter);\n          }\n#endif\n          pNC2 = pNC;\n          while( pNC2\n              && sqlite3ReferencesSrcList(pParse, pExpr, pNC2->pSrcList)==0\n          ){\n            pExpr->op2 += (1 + pNC2->nNestedSelect);\n            pNC2 = pNC2->pNext;\n          }\n          assert( pDef!=0 || IN_RENAME_OBJECT );\n          if( pNC2 && pDef ){\n            pExpr->op2 += pNC2->nNestedSelect;\n            assert( SQLITE_FUNC_MINMAX==NC_MinMaxAgg );\n            assert( SQLITE_FUNC_ANYORDER==NC_OrderAgg );\n            testcase( (pDef->funcFlags & SQLITE_FUNC_MINMAX)!=0 );\n            testcase( (pDef->funcFlags & SQLITE_FUNC_ANYORDER)!=0 );\n            pNC2->ncFlags |= NC_HasAgg\n              | ((pDef->funcFlags^SQLITE_FUNC_ANYORDER)\n                  & (SQLITE_FUNC_MINMAX|SQLITE_FUNC_ANYORDER));\n          }\n        }\n        pNC->ncFlags |= savedAllowFlags;\n      }\n      /* FIX ME:  Compute pExpr->affinity based on the expected return\n      ** type of the function\n      */\n      return WRC_Prune;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_EXISTS:\n    case TK_SELECT:\n#endif\n    case TK_IN: {\n      testcase( pExpr->op==TK_IN );\n      testcase( pExpr->op==TK_EXISTS );\n      testcase( pExpr->op==TK_SELECT );\n      if( ExprUseXSelect(pExpr) ){\n        int nRef = pNC->nRef;\n        testcase( pNC->ncFlags & NC_IsCheck );\n        testcase( pNC->ncFlags & NC_PartIdx );\n        testcase( pNC->ncFlags & NC_IdxExpr );\n        testcase( pNC->ncFlags & NC_GenCol );\n        assert( pExpr->x.pSelect );\n        if( pExpr->op==TK_EXISTS )  pParse->bHasExists = 1;\n        if( pNC->ncFlags & NC_SelfRef ){\n          notValidImpl(pParse, pNC, \"subqueries\", pExpr, pExpr);\n        }else{\n          sqlite3WalkSelect(pWalker, pExpr->x.pSelect);\n        }\n        assert( pNC->nRef>=nRef );\n        if( nRef!=pNC->nRef ){\n          ExprSetProperty(pExpr, EP_VarSelect);\n          pExpr->x.pSelect->selFlags |= SF_Correlated;\n        }\n        pNC->ncFlags |= NC_Subquery;\n      }\n      break;\n    }\n    case TK_VARIABLE: {\n      testcase( pNC->ncFlags & NC_IsCheck );\n      testcase( pNC->ncFlags & NC_PartIdx );\n      testcase( pNC->ncFlags & NC_IdxExpr );\n      testcase( pNC->ncFlags & NC_GenCol );\n      sqlite3ResolveNotValid(pParse, pNC, \"parameters\",\n               NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol, pExpr, pExpr);\n      break;\n    }\n    case TK_IS:\n    case TK_ISNOT: {\n      Expr *pRight = sqlite3ExprSkipCollateAndLikely(pExpr->pRight);\n      assert( !ExprHasProperty(pExpr, EP_Reduced) );\n      /* Handle special cases of \"x IS TRUE\", \"x IS FALSE\", \"x IS NOT TRUE\",\n      ** and \"x IS NOT FALSE\". */\n      if( ALWAYS(pRight) && (pRight->op==TK_ID || pRight->op==TK_TRUEFALSE) ){\n        int rc = resolveExprStep(pWalker, pRight);\n        if( rc==WRC_Abort ) return WRC_Abort;\n        if( pRight->op==TK_TRUEFALSE ){\n          pExpr->op2 = pExpr->op;\n          pExpr->op = TK_TRUTH;\n          return WRC_Continue;\n        }\n      }\n      /* no break */ deliberate_fall_through\n    }\n    case TK_BETWEEN:\n    case TK_EQ:\n    case TK_NE:\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE: {\n      int nLeft, nRight;\n      if( pParse->db->mallocFailed ) break;\n      assert( pExpr->pLeft!=0 );\n      nLeft = sqlite3ExprVectorSize(pExpr->pLeft);\n      if( pExpr->op==TK_BETWEEN ){\n        assert( ExprUseXList(pExpr) );\n        nRight = sqlite3ExprVectorSize(pExpr->x.pList->a[0].pExpr);\n        if( nRight==nLeft ){\n          nRight = sqlite3ExprVectorSize(pExpr->x.pList->a[1].pExpr);\n        }\n      }else{\n        assert( pExpr->pRight!=0 );\n        nRight = sqlite3ExprVectorSize(pExpr->pRight);\n      }\n      if( nLeft!=nRight ){\n        testcase( pExpr->op==TK_EQ );\n        testcase( pExpr->op==TK_NE );\n        testcase( pExpr->op==TK_LT );\n        testcase( pExpr->op==TK_LE );\n        testcase( pExpr->op==TK_GT );\n        testcase( pExpr->op==TK_GE );\n        testcase( pExpr->op==TK_IS );\n        testcase( pExpr->op==TK_ISNOT );\n        testcase( pExpr->op==TK_BETWEEN );\n        sqlite3ErrorMsg(pParse, \"row value misused\");\n        sqlite3RecordErrorOffsetOfExpr(pParse->db, pExpr);\n      }\n      break;\n    }\n  }\n  assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );\n  return pParse->nErr ? WRC_Abort : WRC_Continue;\n}\n\n/*\n** pEList is a list of expressions which are really the result set of the\n** a SELECT statement.  pE is a term in an ORDER BY or GROUP BY clause.\n** This routine checks to see if pE is a simple identifier which corresponds\n** to the AS-name of one of the terms of the expression list.  If it is,\n** this routine return an integer between 1 and N where N is the number of\n** elements in pEList, corresponding to the matching entry.  If there is\n** no match, or if pE is not a simple identifier, then this routine\n** return 0.\n**\n** pEList has been resolved.  pE has not.\n*/\nstatic int resolveAsName(\n  Parse *pParse,     /* Parsing context for error messages */\n  ExprList *pEList,  /* List of expressions to scan */\n  Expr *pE           /* Expression we are trying to match */\n){\n  int i;             /* Loop counter */\n\n  UNUSED_PARAMETER(pParse);\n\n  if( pE->op==TK_ID ){\n    const char *zCol;\n    assert( !ExprHasProperty(pE, EP_IntValue) );\n    zCol = pE->u.zToken;\n    for(i=0; i<pEList->nExpr; i++){\n      if( pEList->a[i].fg.eEName==ENAME_NAME\n       && sqlite3_stricmp(pEList->a[i].zEName, zCol)==0\n      ){\n        return i+1;\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** pE is a pointer to an expression which is a single term in the\n** ORDER BY of a compound SELECT.  The expression has not been\n** name resolved.\n**\n** At the point this routine is called, we already know that the\n** ORDER BY term is not an integer index into the result set.  That\n** case is handled by the calling routine.\n**\n** Attempt to match pE against result set columns in the left-most\n** SELECT statement.  Return the index i of the matching column,\n** as an indication to the caller that it should sort by the i-th column.\n** The left-most column is 1.  In other words, the value returned is the\n** same integer value that would be used in the SQL statement to indicate\n** the column.\n**\n** If there is no match, return 0.  Return -1 if an error occurs.\n*/\nstatic int resolveOrderByTermToExprList(\n  Parse *pParse,     /* Parsing context for error messages */\n  Select *pSelect,   /* The SELECT statement with the ORDER BY clause */\n  Expr *pE           /* The specific ORDER BY term */\n){\n  int i;             /* Loop counter */\n  ExprList *pEList;  /* The columns of the result set */\n  NameContext nc;    /* Name context for resolving pE */\n  sqlite3 *db;       /* Database connection */\n  int rc;            /* Return code from subprocedures */\n  u8 savedSuppErr;   /* Saved value of db->suppressErr */\n\n  assert( sqlite3ExprIsInteger(pE, &i, 0)==0 );\n  pEList = pSelect->pEList;\n\n  /* Resolve all names in the ORDER BY term expression\n  */\n  memset(&nc, 0, sizeof(nc));\n  nc.pParse = pParse;\n  nc.pSrcList = pSelect->pSrc;\n  nc.uNC.pEList = pEList;\n  nc.ncFlags = NC_AllowAgg|NC_UEList|NC_NoSelect;\n  nc.nNcErr = 0;\n  db = pParse->db;\n  savedSuppErr = db->suppressErr;\n  db->suppressErr = 1;\n  rc = sqlite3ResolveExprNames(&nc, pE);\n  db->suppressErr = savedSuppErr;\n  if( rc ) return 0;\n\n  /* Try to match the ORDER BY expression against an expression\n  ** in the result set.  Return an 1-based index of the matching\n  ** result-set entry.\n  */\n  for(i=0; i<pEList->nExpr; i++){\n    if( sqlite3ExprCompare(0, pEList->a[i].pExpr, pE, -1)<2 ){\n      return i+1;\n    }\n  }\n\n  /* If no match, return 0. */\n  return 0;\n}\n\n/*\n** Generate an ORDER BY or GROUP BY term out-of-range error.\n*/\nstatic void resolveOutOfRangeError(\n  Parse *pParse,         /* The error context into which to write the error */\n  const char *zType,     /* \"ORDER\" or \"GROUP\" */\n  int i,                 /* The index (1-based) of the term out of range */\n  int mx,                /* Largest permissible value of i */\n  Expr *pError           /* Associate the error with the expression */\n){\n  sqlite3ErrorMsg(pParse,\n    \"%r %s BY term out of range - should be \"\n    \"between 1 and %d\", i, zType, mx);\n  sqlite3RecordErrorOffsetOfExpr(pParse->db, pError);\n}\n\n/*\n** Analyze the ORDER BY clause in a compound SELECT statement.   Modify\n** each term of the ORDER BY clause is a constant integer between 1\n** and N where N is the number of columns in the compound SELECT.\n**\n** ORDER BY terms that are already an integer between 1 and N are\n** unmodified.  ORDER BY terms that are integers outside the range of\n** 1 through N generate an error.  ORDER BY terms that are expressions\n** are matched against result set expressions of compound SELECT\n** beginning with the left-most SELECT and working toward the right.\n** At the first match, the ORDER BY expression is transformed into\n** the integer column number.\n**\n** Return the number of errors seen.\n*/\nstatic int resolveCompoundOrderBy(\n  Parse *pParse,        /* Parsing context.  Leave error messages here */\n  Select *pSelect       /* The SELECT statement containing the ORDER BY */\n){\n  int i;\n  ExprList *pOrderBy;\n  ExprList *pEList;\n  sqlite3 *db;\n  int moreToDo = 1;\n\n  pOrderBy = pSelect->pOrderBy;\n  if( pOrderBy==0 ) return 0;\n  db = pParse->db;\n  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){\n    sqlite3ErrorMsg(pParse, \"too many terms in ORDER BY clause\");\n    return 1;\n  }\n  for(i=0; i<pOrderBy->nExpr; i++){\n    pOrderBy->a[i].fg.done = 0;\n  }\n  pSelect->pNext = 0;\n  while( pSelect->pPrior ){\n    pSelect->pPrior->pNext = pSelect;\n    pSelect = pSelect->pPrior;\n  }\n  while( pSelect && moreToDo ){\n    struct ExprList_item *pItem;\n    moreToDo = 0;\n    pEList = pSelect->pEList;\n    assert( pEList!=0 );\n    for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){\n      int iCol = -1;\n      Expr *pE, *pDup;\n      if( pItem->fg.done ) continue;\n      pE = sqlite3ExprSkipCollateAndLikely(pItem->pExpr);\n      if( NEVER(pE==0) ) continue;\n      if( sqlite3ExprIsInteger(pE, &iCol, 0) ){\n        if( iCol<=0 || iCol>pEList->nExpr ){\n          resolveOutOfRangeError(pParse, \"ORDER\", i+1, pEList->nExpr, pE);\n          return 1;\n        }\n      }else{\n        iCol = resolveAsName(pParse, pEList, pE);\n        if( iCol==0 ){\n          /* Now test if expression pE matches one of the values returned\n          ** by pSelect. In the usual case this is done by duplicating the\n          ** expression, resolving any symbols in it, and then comparing\n          ** it against each expression returned by the SELECT statement.\n          ** Once the comparisons are finished, the duplicate expression\n          ** is deleted.\n          **\n          ** If this is running as part of an ALTER TABLE operation and\n          ** the symbols resolve successfully, also resolve the symbols in the\n          ** actual expression. This allows the code in alter.c to modify\n          ** column references within the ORDER BY expression as required.  */\n          pDup = sqlite3ExprDup(db, pE, 0);\n          if( !db->mallocFailed ){\n            assert(pDup);\n            iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);\n            if( IN_RENAME_OBJECT && iCol>0 ){\n              resolveOrderByTermToExprList(pParse, pSelect, pE);\n            }\n          }\n          sqlite3ExprDelete(db, pDup);\n        }\n      }\n      if( iCol>0 ){\n        /* Convert the ORDER BY term into an integer column number iCol,\n        ** taking care to preserve the COLLATE clause if it exists. */\n        if( !IN_RENAME_OBJECT ){\n          Expr *pNew = sqlite3Expr(db, TK_INTEGER, 0);\n          if( pNew==0 ) return 1;\n          pNew->flags |= EP_IntValue;\n          pNew->u.iValue = iCol;\n          if( pItem->pExpr==pE ){\n            pItem->pExpr = pNew;\n          }else{\n            Expr *pParent = pItem->pExpr;\n            assert( pParent->op==TK_COLLATE );\n            while( pParent->pLeft->op==TK_COLLATE ) pParent = pParent->pLeft;\n            assert( pParent->pLeft==pE );\n            pParent->pLeft = pNew;\n          }\n          sqlite3ExprDelete(db, pE);\n          pItem->u.x.iOrderByCol = (u16)iCol;\n        }\n        pItem->fg.done = 1;\n      }else{\n        moreToDo = 1;\n      }\n    }\n    pSelect = pSelect->pNext;\n  }\n  for(i=0; i<pOrderBy->nExpr; i++){\n    if( pOrderBy->a[i].fg.done==0 ){\n      sqlite3ErrorMsg(pParse, \"%r ORDER BY term does not match any \"\n            \"column in the result set\", i+1);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Check every term in the ORDER BY or GROUP BY clause pOrderBy of\n** the SELECT statement pSelect.  If any term is reference to a\n** result set expression (as determined by the ExprList.a.u.x.iOrderByCol\n** field) then convert that term into a copy of the corresponding result set\n** column.\n**\n** If any errors are detected, add an error message to pParse and\n** return non-zero.  Return zero if no errors are seen.\n*/\nSQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(\n  Parse *pParse,        /* Parsing context.  Leave error messages here */\n  Select *pSelect,      /* The SELECT statement containing the clause */\n  ExprList *pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */\n  const char *zType     /* \"ORDER\" or \"GROUP\" */\n){\n  int i;\n  sqlite3 *db = pParse->db;\n  ExprList *pEList;\n  struct ExprList_item *pItem;\n\n  if( pOrderBy==0 || pParse->db->mallocFailed || IN_RENAME_OBJECT ) return 0;\n  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){\n    sqlite3ErrorMsg(pParse, \"too many terms in %s BY clause\", zType);\n    return 1;\n  }\n  pEList = pSelect->pEList;\n  assert( pEList!=0 );  /* sqlite3SelectNew() guarantees this */\n  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){\n    if( pItem->u.x.iOrderByCol ){\n      if( pItem->u.x.iOrderByCol>pEList->nExpr ){\n        resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr, 0);\n        return 1;\n      }\n      resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr,0);\n    }\n  }\n  return 0;\n}\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** Walker callback for windowRemoveExprFromSelect().\n*/\nstatic int resolveRemoveWindowsCb(Walker *pWalker, Expr *pExpr){\n  UNUSED_PARAMETER(pWalker);\n  if( ExprHasProperty(pExpr, EP_WinFunc) ){\n    Window *pWin = pExpr->y.pWin;\n    sqlite3WindowUnlinkFromSelect(pWin);\n  }\n  return WRC_Continue;\n}\n\n/*\n** Remove any Window objects owned by the expression pExpr from the\n** Select.pWin list of Select object pSelect.\n*/\nstatic void windowRemoveExprFromSelect(Select *pSelect, Expr *pExpr){\n  if( pSelect->pWin ){\n    Walker sWalker;\n    memset(&sWalker, 0, sizeof(Walker));\n    sWalker.xExprCallback = resolveRemoveWindowsCb;\n    sWalker.u.pSelect = pSelect;\n    sqlite3WalkExpr(&sWalker, pExpr);\n  }\n}\n#else\n# define windowRemoveExprFromSelect(a, b)\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.\n** The Name context of the SELECT statement is pNC.  zType is either\n** \"ORDER\" or \"GROUP\" depending on which type of clause pOrderBy is.\n**\n** This routine resolves each term of the clause into an expression.\n** If the order-by term is an integer I between 1 and N (where N is the\n** number of columns in the result set of the SELECT) then the expression\n** in the resolution is a copy of the I-th result-set expression.  If\n** the order-by term is an identifier that corresponds to the AS-name of\n** a result-set expression, then the term resolves to a copy of the\n** result-set expression.  Otherwise, the expression is resolved in\n** the usual way - using sqlite3ResolveExprNames().\n**\n** This routine returns the number of errors.  If errors occur, then\n** an appropriate error message might be left in pParse.  (OOM errors\n** excepted.)\n*/\nstatic int resolveOrderGroupBy(\n  NameContext *pNC,     /* The name context of the SELECT statement */\n  Select *pSelect,      /* The SELECT statement holding pOrderBy */\n  ExprList *pOrderBy,   /* An ORDER BY or GROUP BY clause to resolve */\n  const char *zType     /* Either \"ORDER\" or \"GROUP\", as appropriate */\n){\n  int i, j;                      /* Loop counters */\n  int iCol;                      /* Column number */\n  struct ExprList_item *pItem;   /* A term of the ORDER BY clause */\n  Parse *pParse;                 /* Parsing context */\n  int nResult;                   /* Number of terms in the result set */\n\n  assert( pOrderBy!=0 );\n  nResult = pSelect->pEList->nExpr;\n  pParse = pNC->pParse;\n  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){\n    Expr *pE = pItem->pExpr;\n    Expr *pE2 = sqlite3ExprSkipCollateAndLikely(pE);\n    if( NEVER(pE2==0) ) continue;\n    if( zType[0]!='G' ){\n      iCol = resolveAsName(pParse, pSelect->pEList, pE2);\n      if( iCol>0 ){\n        /* If an AS-name match is found, mark this ORDER BY column as being\n        ** a copy of the iCol-th result-set column.  The subsequent call to\n        ** sqlite3ResolveOrderGroupBy() will convert the expression to a\n        ** copy of the iCol-th result-set expression. */\n        pItem->u.x.iOrderByCol = (u16)iCol;\n        continue;\n      }\n    }\n    if( sqlite3ExprIsInteger(pE2, &iCol, 0) ){\n      /* The ORDER BY term is an integer constant.  Again, set the column\n      ** number so that sqlite3ResolveOrderGroupBy() will convert the\n      ** order-by term to a copy of the result-set expression */\n      if( iCol<1 || iCol>0xffff ){\n        resolveOutOfRangeError(pParse, zType, i+1, nResult, pE2);\n        return 1;\n      }\n      pItem->u.x.iOrderByCol = (u16)iCol;\n      continue;\n    }\n\n    /* Otherwise, treat the ORDER BY term as an ordinary expression */\n    pItem->u.x.iOrderByCol = 0;\n    if( sqlite3ResolveExprNames(pNC, pE) ){\n      return 1;\n    }\n    for(j=0; j<pSelect->pEList->nExpr; j++){\n      if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){\n        /* Since this expression is being changed into a reference\n        ** to an identical expression in the result set, remove all Window\n        ** objects belonging to the expression from the Select.pWin list. */\n        windowRemoveExprFromSelect(pSelect, pE);\n        pItem->u.x.iOrderByCol = j+1;\n      }\n    }\n  }\n  return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);\n}\n\n/*\n** Resolve names in the SELECT statement p and all of its descendants.\n*/\nstatic int resolveSelectStep(Walker *pWalker, Select *p){\n  NameContext *pOuterNC;  /* Context that contains this SELECT */\n  NameContext sNC;        /* Name context of this SELECT */\n  int isCompound;         /* True if p is a compound select */\n  int nCompound;          /* Number of compound terms processed so far */\n  Parse *pParse;          /* Parsing context */\n  int i;                  /* Loop counter */\n  ExprList *pGroupBy;     /* The GROUP BY clause */\n  Select *pLeftmost;      /* Left-most of SELECT of a compound */\n  sqlite3 *db;            /* Database connection */\n\n\n  assert( p!=0 );\n  if( p->selFlags & SF_Resolved ){\n    return WRC_Prune;\n  }\n  pOuterNC = pWalker->u.pNC;\n  pParse = pWalker->pParse;\n  db = pParse->db;\n\n  /* Normally sqlite3SelectExpand() will be called first and will have\n  ** already expanded this SELECT.  However, if this is a subquery within\n  ** an expression, sqlite3ResolveExprNames() will be called without a\n  ** prior call to sqlite3SelectExpand().  When that happens, let\n  ** sqlite3SelectPrep() do all of the processing for this SELECT.\n  ** sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and\n  ** this routine in the correct order.\n  */\n  if( (p->selFlags & SF_Expanded)==0 ){\n    sqlite3SelectPrep(pParse, p, pOuterNC);\n    return pParse->nErr ? WRC_Abort : WRC_Prune;\n  }\n\n  isCompound = p->pPrior!=0;\n  nCompound = 0;\n  pLeftmost = p;\n  while( p ){\n    assert( (p->selFlags & SF_Expanded)!=0 );\n    assert( (p->selFlags & SF_Resolved)==0 );\n    p->selFlags |= SF_Resolved;\n\n    /* Resolve the expressions in the LIMIT and OFFSET clauses. These\n    ** are not allowed to refer to any names, so pass an empty NameContext.\n    */\n    memset(&sNC, 0, sizeof(sNC));\n    sNC.pParse = pParse;\n    sNC.pWinSelect = p;\n    if( sqlite3ResolveExprNames(&sNC, p->pLimit) ){\n      return WRC_Abort;\n    }\n\n    /* If the SF_Converted flags is set, then this Select object was\n    ** was created by the convertCompoundSelectToSubquery() function.\n    ** In this case the ORDER BY clause (p->pOrderBy) should be resolved\n    ** as if it were part of the sub-query, not the parent. This block\n    ** moves the pOrderBy down to the sub-query. It will be moved back\n    ** after the names have been resolved.  */\n    if( p->selFlags & SF_Converted ){\n      Select *pSub;\n      assert( p->pSrc->a[0].fg.isSubquery );\n      assert( p->pSrc->a[0].u4.pSubq!=0 );\n      pSub = p->pSrc->a[0].u4.pSubq->pSelect;\n      assert( pSub!=0 );\n      assert( p->pSrc->nSrc==1 && p->pOrderBy );\n      assert( pSub->pPrior && pSub->pOrderBy==0 );\n      pSub->pOrderBy = p->pOrderBy;\n      p->pOrderBy = 0;\n    }\n\n    /* Recursively resolve names in all subqueries in the FROM clause\n    */\n    if( pOuterNC ) pOuterNC->nNestedSelect++;\n    for(i=0; i<p->pSrc->nSrc; i++){\n      SrcItem *pItem = &p->pSrc->a[i];\n      assert( pItem->zName!=0\n              || pItem->fg.isSubquery );  /* Test of tag-20240424-1*/\n      if( pItem->fg.isSubquery\n       && (pItem->u4.pSubq->pSelect->selFlags & SF_Resolved)==0\n      ){\n        int nRef = pOuterNC ? pOuterNC->nRef : 0;\n        const char *zSavedContext = pParse->zAuthContext;\n\n        if( pItem->zName ) pParse->zAuthContext = pItem->zName;\n        sqlite3ResolveSelectNames(pParse, pItem->u4.pSubq->pSelect, pOuterNC);\n        pParse->zAuthContext = zSavedContext;\n        if( pParse->nErr ) return WRC_Abort;\n        assert( db->mallocFailed==0 );\n\n        /* If the number of references to the outer context changed when\n        ** expressions in the sub-select were resolved, the sub-select\n        ** is correlated. It is not required to check the refcount on any\n        ** but the innermost outer context object, as lookupName() increments\n        ** the refcount on all contexts between the current one and the\n        ** context containing the column when it resolves a name. */\n        if( pOuterNC ){\n          assert( pItem->fg.isCorrelated==0 && pOuterNC->nRef>=nRef );\n          pItem->fg.isCorrelated = (pOuterNC->nRef>nRef);\n        }\n      }\n    }\n    if( pOuterNC && ALWAYS(pOuterNC->nNestedSelect>0) ){\n      pOuterNC->nNestedSelect--;\n    }\n\n    /* Set up the local name-context to pass to sqlite3ResolveExprNames() to\n    ** resolve the result-set expression list.\n    */\n    sNC.ncFlags = NC_AllowAgg|NC_AllowWin;\n    sNC.pSrcList = p->pSrc;\n    sNC.pNext = pOuterNC;\n\n    /* Resolve names in the result set. */\n    if( sqlite3ResolveExprListNames(&sNC, p->pEList) ) return WRC_Abort;\n    sNC.ncFlags &= ~NC_AllowWin;\n\n    /* If there are no aggregate functions in the result-set, and no GROUP BY\n    ** expression, do not allow aggregates in any of the other expressions.\n    */\n    assert( (p->selFlags & SF_Aggregate)==0 );\n    pGroupBy = p->pGroupBy;\n    if( pGroupBy || (sNC.ncFlags & NC_HasAgg)!=0 ){\n      assert( NC_MinMaxAgg==SF_MinMaxAgg );\n      assert( NC_OrderAgg==SF_OrderByReqd );\n      p->selFlags |= SF_Aggregate | (sNC.ncFlags&(NC_MinMaxAgg|NC_OrderAgg));\n    }else{\n      sNC.ncFlags &= ~NC_AllowAgg;\n    }\n\n    /* Add the output column list to the name-context before parsing the\n    ** other expressions in the SELECT statement. This is so that\n    ** expressions in the WHERE clause (etc.) can refer to expressions by\n    ** aliases in the result set.\n    **\n    ** Minor point: If this is the case, then the expression will be\n    ** re-evaluated for each reference to it.\n    */\n    assert( (sNC.ncFlags & (NC_UAggInfo|NC_UUpsert|NC_UBaseReg))==0 );\n    sNC.uNC.pEList = p->pEList;\n    sNC.ncFlags |= NC_UEList;\n    if( p->pHaving ){\n      if( (p->selFlags & SF_Aggregate)==0 ){\n        sqlite3ErrorMsg(pParse, \"HAVING clause on a non-aggregate query\");\n        return WRC_Abort;\n      }\n      if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;\n    }\n    sNC.ncFlags |= NC_Where;\n    if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;\n    sNC.ncFlags &= ~NC_Where;\n\n    /* Resolve names in table-valued-function arguments */\n    for(i=0; i<p->pSrc->nSrc; i++){\n      SrcItem *pItem = &p->pSrc->a[i];\n      if( pItem->fg.isTabFunc\n       && sqlite3ResolveExprListNames(&sNC, pItem->u1.pFuncArg)\n      ){\n        return WRC_Abort;\n      }\n    }\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( IN_RENAME_OBJECT ){\n      Window *pWin;\n      for(pWin=p->pWinDefn; pWin; pWin=pWin->pNextWin){\n        if( sqlite3ResolveExprListNames(&sNC, pWin->pOrderBy)\n         || sqlite3ResolveExprListNames(&sNC, pWin->pPartition)\n        ){\n          return WRC_Abort;\n        }\n      }\n    }\n#endif\n\n    /* The ORDER BY and GROUP BY clauses may not refer to terms in\n    ** outer queries\n    */\n    sNC.pNext = 0;\n    sNC.ncFlags |= NC_AllowAgg|NC_AllowWin;\n\n    /* If this is a converted compound query, move the ORDER BY clause from\n    ** the sub-query back to the parent query. At this point each term\n    ** within the ORDER BY clause has been transformed to an integer value.\n    ** These integers will be replaced by copies of the corresponding result\n    ** set expressions by the call to resolveOrderGroupBy() below.  */\n    if( p->selFlags & SF_Converted ){\n      Select *pSub;\n      assert( p->pSrc->a[0].fg.isSubquery );\n      pSub = p->pSrc->a[0].u4.pSubq->pSelect;\n      assert( pSub!=0 );\n      p->pOrderBy = pSub->pOrderBy;\n      pSub->pOrderBy = 0;\n    }\n\n    /* Process the ORDER BY clause for singleton SELECT statements.\n    ** The ORDER BY clause for compounds SELECT statements is handled\n    ** below, after all of the result-sets for all of the elements of\n    ** the compound have been resolved.\n    **\n    ** If there is an ORDER BY clause on a term of a compound-select other\n    ** than the right-most term, then that is a syntax error.  But the error\n    ** is not detected until much later, and so we need to go ahead and\n    ** resolve those symbols on the incorrect ORDER BY for consistency.\n    */\n    if( p->pOrderBy!=0\n     && isCompound<=nCompound  /* Defer right-most ORDER BY of a compound */\n     && resolveOrderGroupBy(&sNC, p, p->pOrderBy, \"ORDER\")\n    ){\n      return WRC_Abort;\n    }\n    if( db->mallocFailed ){\n      return WRC_Abort;\n    }\n    sNC.ncFlags &= ~NC_AllowWin;\n\n    /* Resolve the GROUP BY clause.  At the same time, make sure\n    ** the GROUP BY clause does not contain aggregate functions.\n    */\n    if( pGroupBy ){\n      struct ExprList_item *pItem;\n\n      if( resolveOrderGroupBy(&sNC, p, pGroupBy, \"GROUP\") || db->mallocFailed ){\n        return WRC_Abort;\n      }\n      for(i=0, pItem=pGroupBy->a; i<pGroupBy->nExpr; i++, pItem++){\n        if( ExprHasProperty(pItem->pExpr, EP_Agg) ){\n          sqlite3ErrorMsg(pParse, \"aggregate functions are not allowed in \"\n              \"the GROUP BY clause\");\n          return WRC_Abort;\n        }\n      }\n    }\n\n    /* If this is part of a compound SELECT, check that it has the right\n    ** number of expressions in the select list. */\n    if( p->pNext && p->pEList->nExpr!=p->pNext->pEList->nExpr ){\n      sqlite3SelectWrongNumTermsError(pParse, p->pNext);\n      return WRC_Abort;\n    }\n\n    /* Advance to the next term of the compound\n    */\n    p = p->pPrior;\n    nCompound++;\n  }\n\n  /* Resolve the ORDER BY on a compound SELECT after all terms of\n  ** the compound have been resolved.\n  */\n  if( isCompound && resolveCompoundOrderBy(pParse, pLeftmost) ){\n    return WRC_Abort;\n  }\n\n  return WRC_Prune;\n}\n\n/*\n** This routine walks an expression tree and resolves references to\n** table columns and result-set columns.  At the same time, do error\n** checking on function usage and set a flag if any aggregate functions\n** are seen.\n**\n** To resolve table columns references we look for nodes (or subtrees) of the\n** form X.Y.Z or Y.Z or just Z where\n**\n**      X:   The name of a database.  Ex:  \"main\" or \"temp\" or\n**           the symbolic name assigned to an ATTACH-ed database.\n**\n**      Y:   The name of a table in a FROM clause.  Or in a trigger\n**           one of the special names \"old\" or \"new\".\n**\n**      Z:   The name of a column in table Y.\n**\n** The node at the root of the subtree is modified as follows:\n**\n**    Expr.op        Changed to TK_COLUMN\n**    Expr.pTab      Points to the Table object for X.Y\n**    Expr.iColumn   The column index in X.Y.  -1 for the rowid.\n**    Expr.iTable    The VDBE cursor number for X.Y\n**\n**\n** To resolve result-set references, look for expression nodes of the\n** form Z (with no X and Y prefix) where the Z matches the right-hand\n** size of an AS clause in the result-set of a SELECT.  The Z expression\n** is replaced by a copy of the left-hand side of the result-set expression.\n** Table-name and function resolution occurs on the substituted expression\n** tree.  For example, in:\n**\n**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;\n**\n** The \"x\" term of the order by is replaced by \"a+b\" to render:\n**\n**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;\n**\n** Function calls are checked to make sure that the function is\n** defined and that the correct number of arguments are specified.\n** If the function is an aggregate function, then the NC_HasAgg flag is\n** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.\n** If an expression contains aggregate functions then the EP_Agg\n** property on the expression is set.\n**\n** An error message is left in pParse if anything is amiss.  The number\n** if errors is returned.\n*/\nSQLITE_PRIVATE int sqlite3ResolveExprNames(\n  NameContext *pNC,       /* Namespace to resolve expressions in. */\n  Expr *pExpr             /* The expression to be analyzed. */\n){\n  int savedHasAgg;\n  Walker w;\n\n  if( pExpr==0 ) return SQLITE_OK;\n  savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n  pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n  w.pParse = pNC->pParse;\n  w.xExprCallback = resolveExprStep;\n  w.xSelectCallback = (pNC->ncFlags & NC_NoSelect) ? 0 : resolveSelectStep;\n  w.xSelectCallback2 = 0;\n  w.u.pNC = pNC;\n#if SQLITE_MAX_EXPR_DEPTH>0\n  w.pParse->nHeight += pExpr->nHeight;\n  if( sqlite3ExprCheckHeight(w.pParse, w.pParse->nHeight) ){\n    return SQLITE_ERROR;\n  }\n#endif\n  assert( pExpr!=0 );\n  sqlite3WalkExprNN(&w, pExpr);\n#if SQLITE_MAX_EXPR_DEPTH>0\n  w.pParse->nHeight -= pExpr->nHeight;\n#endif\n  assert( EP_Agg==NC_HasAgg );\n  assert( EP_Win==NC_HasWin );\n  testcase( pNC->ncFlags & NC_HasAgg );\n  testcase( pNC->ncFlags & NC_HasWin );\n  ExprSetProperty(pExpr, pNC->ncFlags & (NC_HasAgg|NC_HasWin) );\n  pNC->ncFlags |= savedHasAgg;\n  return pNC->nNcErr>0 || w.pParse->nErr>0;\n}\n\n/*\n** Resolve all names for all expression in an expression list.  This is\n** just like sqlite3ResolveExprNames() except that it works for an expression\n** list rather than a single expression.\n**\n** The return value is SQLITE_OK (0) for success or SQLITE_ERROR (1) for a\n** failure.\n*/\nSQLITE_PRIVATE int sqlite3ResolveExprListNames(\n  NameContext *pNC,       /* Namespace to resolve expressions in. */\n  ExprList *pList         /* The expression list to be analyzed. */\n){\n  int i;\n  int savedHasAgg = 0;\n  Walker w;\n  if( pList==0 ) return SQLITE_OK;\n  w.pParse = pNC->pParse;\n  w.xExprCallback = resolveExprStep;\n  w.xSelectCallback = resolveSelectStep;\n  w.xSelectCallback2 = 0;\n  w.u.pNC = pNC;\n  savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n  pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n  for(i=0; i<pList->nExpr; i++){\n    Expr *pExpr = pList->a[i].pExpr;\n    if( pExpr==0 ) continue;\n#if SQLITE_MAX_EXPR_DEPTH>0\n    w.pParse->nHeight += pExpr->nHeight;\n    if( sqlite3ExprCheckHeight(w.pParse, w.pParse->nHeight) ){\n      return SQLITE_ERROR;\n    }\n#endif\n    sqlite3WalkExprNN(&w, pExpr);\n#if SQLITE_MAX_EXPR_DEPTH>0\n    w.pParse->nHeight -= pExpr->nHeight;\n#endif\n    assert( EP_Agg==NC_HasAgg );\n    assert( EP_Win==NC_HasWin );\n    testcase( pNC->ncFlags & NC_HasAgg );\n    testcase( pNC->ncFlags & NC_HasWin );\n    if( pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) ){\n      ExprSetProperty(pExpr, pNC->ncFlags & (NC_HasAgg|NC_HasWin) );\n      savedHasAgg |= pNC->ncFlags &\n                          (NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n      pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg);\n    }\n    if( w.pParse->nErr>0 ) return SQLITE_ERROR;\n  }\n  pNC->ncFlags |= savedHasAgg;\n  return SQLITE_OK;\n}\n\n/*\n** Resolve all names in all expressions of a SELECT and in all\n** descendants of the SELECT, including compounds off of p->pPrior,\n** subqueries in expressions, and subqueries used as FROM clause\n** terms.\n**\n** See sqlite3ResolveExprNames() for a description of the kinds of\n** transformations that occur.\n**\n** All SELECT statements should have been expanded using\n** sqlite3SelectExpand() prior to invoking this routine.\n*/\nSQLITE_PRIVATE void sqlite3ResolveSelectNames(\n  Parse *pParse,         /* The parser context */\n  Select *p,             /* The SELECT statement being coded. */\n  NameContext *pOuterNC  /* Name context for parent SELECT statement */\n){\n  Walker w;\n\n  assert( p!=0 );\n  w.xExprCallback = resolveExprStep;\n  w.xSelectCallback = resolveSelectStep;\n  w.xSelectCallback2 = 0;\n  w.pParse = pParse;\n  w.u.pNC = pOuterNC;\n  sqlite3WalkSelect(&w, p);\n}\n\n/*\n** Resolve names in expressions that can only reference a single table\n** or which cannot reference any tables at all.  Examples:\n**\n**                                                    \"type\" flag\n**                                                    ------------\n**    (1)   CHECK constraints                         NC_IsCheck\n**    (2)   WHERE clauses on partial indices          NC_PartIdx\n**    (3)   Expressions in indexes on expressions     NC_IdxExpr\n**    (4)   Expression arguments to VACUUM INTO.      0\n**    (5)   GENERATED ALWAYS as expressions           NC_GenCol\n**\n** In all cases except (4), the Expr.iTable value for Expr.op==TK_COLUMN\n** nodes of the expression is set to -1 and the Expr.iColumn value is\n** set to the column number.  In case (4), TK_COLUMN nodes cause an error.\n**\n** Any errors cause an error message to be set in pParse.\n*/\nSQLITE_PRIVATE int sqlite3ResolveSelfReference(\n  Parse *pParse,   /* Parsing context */\n  Table *pTab,     /* The table being referenced, or NULL */\n  int type,        /* NC_IsCheck, NC_PartIdx, NC_IdxExpr, NC_GenCol, or 0 */\n  Expr *pExpr,     /* Expression to resolve.  May be NULL. */\n  ExprList *pList  /* Expression list to resolve.  May be NULL. */\n){\n  SrcList *pSrc;                  /* Fake SrcList for pParse->pNewTable */\n  NameContext sNC;                /* Name context for pParse->pNewTable */\n  int rc;\n  union {\n    SrcList sSrc;\n    u8 srcSpace[SZ_SRCLIST_1];     /* Memory space for the fake SrcList */\n  } uSrc;\n\n  assert( type==0 || pTab!=0 );\n  assert( type==NC_IsCheck || type==NC_PartIdx || type==NC_IdxExpr\n          || type==NC_GenCol || pTab==0 );\n  memset(&sNC, 0, sizeof(sNC));\n  memset(&uSrc, 0, sizeof(uSrc));\n  pSrc = &uSrc.sSrc;\n  if( pTab ){\n    pSrc->nSrc = 1;\n    pSrc->a[0].zName = pTab->zName;\n    pSrc->a[0].pSTab = pTab;\n    pSrc->a[0].iCursor = -1;\n    if( pTab->pSchema!=pParse->db->aDb[1].pSchema ){\n      /* Cause EP_FromDDL to be set on TK_FUNCTION nodes of non-TEMP\n      ** schema elements */\n      type |= NC_FromDDL;\n    }\n  }\n  sNC.pParse = pParse;\n  sNC.pSrcList = pSrc;\n  sNC.ncFlags = type | NC_IsDDL;\n  if( (rc = sqlite3ResolveExprNames(&sNC, pExpr))!=SQLITE_OK ) return rc;\n  if( pList ) rc = sqlite3ResolveExprListNames(&sNC, pList);\n  return rc;\n}\n\n/************** End of resolve.c *********************************************/\n/************** Begin file expr.c ********************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains routines used for analyzing expressions and\n** for generating VDBE code that evaluates expressions in SQLite.\n*/\n/* #include \"sqliteInt.h\" */\n\n/* Forward declarations */\nstatic void exprCodeBetween(Parse*,Expr*,int,void(*)(Parse*,Expr*,int,int),int);\nstatic int exprCodeVector(Parse *pParse, Expr *p, int *piToFree);\n\n/*\n** Return the affinity character for a single column of a table.\n*/\nSQLITE_PRIVATE char sqlite3TableColumnAffinity(const Table *pTab, int iCol){\n  if( iCol<0 || NEVER(iCol>=pTab->nCol) ) return SQLITE_AFF_INTEGER;\n  return pTab->aCol[iCol].affinity;\n}\n\n/*\n** Return the 'affinity' of the expression pExpr if any.\n**\n** If pExpr is a column, a reference to a column via an 'AS' alias,\n** or a sub-select with a column as the return value, then the\n** affinity of that column is returned. Otherwise, 0x00 is returned,\n** indicating no affinity for the expression.\n**\n** i.e. the WHERE clause expressions in the following statements all\n** have an affinity:\n**\n** CREATE TABLE t1(a);\n** SELECT * FROM t1 WHERE a;\n** SELECT a AS b FROM t1 WHERE b;\n** SELECT * FROM t1 WHERE (select a from t1);\n*/\nSQLITE_PRIVATE char sqlite3ExprAffinity(const Expr *pExpr){\n  int op;\n  op = pExpr->op;\n  while( 1 /* exit-by-break */ ){\n    if( op==TK_COLUMN || (op==TK_AGG_COLUMN && pExpr->y.pTab!=0) ){\n      assert( ExprUseYTab(pExpr) );\n      assert( pExpr->y.pTab!=0 );\n      return sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn);\n    }\n    if( op==TK_SELECT ){\n      assert( ExprUseXSelect(pExpr) );\n      assert( pExpr->x.pSelect!=0 );\n      assert( pExpr->x.pSelect->pEList!=0 );\n      assert( pExpr->x.pSelect->pEList->a[0].pExpr!=0 );\n      return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);\n    }\n#ifndef SQLITE_OMIT_CAST\n    if( op==TK_CAST ){\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      return sqlite3AffinityType(pExpr->u.zToken, 0);\n    }\n#endif\n    if( op==TK_SELECT_COLUMN ){\n      assert( pExpr->pLeft!=0 && ExprUseXSelect(pExpr->pLeft) );\n      assert( pExpr->iColumn < pExpr->iTable );\n      assert( pExpr->iColumn >= 0 );\n      assert( pExpr->iTable==pExpr->pLeft->x.pSelect->pEList->nExpr );\n      return sqlite3ExprAffinity(\n          pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr\n      );\n    }\n    if( op==TK_VECTOR\n     || (op==TK_FUNCTION && pExpr->affExpr==SQLITE_AFF_DEFER)\n    ){\n      assert( ExprUseXList(pExpr) );\n      return sqlite3ExprAffinity(pExpr->x.pList->a[0].pExpr);\n    }\n    if( ExprHasProperty(pExpr, EP_Skip|EP_IfNullRow) ){\n      assert( pExpr->op==TK_COLLATE\n           || pExpr->op==TK_IF_NULL_ROW\n           || (pExpr->op==TK_REGISTER && pExpr->op2==TK_IF_NULL_ROW) );\n      pExpr = pExpr->pLeft;\n      op = pExpr->op;\n      continue;\n    }\n    if( op!=TK_REGISTER ) break;\n    op = pExpr->op2;\n    if( NEVER( op==TK_REGISTER ) ) break;\n  }\n  return pExpr->affExpr;\n}\n\n/*\n** Make a guess at all the possible datatypes of the result that could\n** be returned by an expression.  Return a bitmask indicating the answer:\n**\n**     0x01         Numeric\n**     0x02         Text\n**     0x04         Blob\n**\n** If the expression must return NULL, then 0x00 is returned.\n*/\nSQLITE_PRIVATE int sqlite3ExprDataType(const Expr *pExpr){\n  while( pExpr ){\n    switch( pExpr->op ){\n      case TK_COLLATE:\n      case TK_IF_NULL_ROW:\n      case TK_UPLUS:  {\n        pExpr = pExpr->pLeft;\n        break;\n      }\n      case TK_NULL: {\n        pExpr = 0;\n        break;\n      }\n      case TK_STRING: {\n        return 0x02;\n      }\n      case TK_BLOB: {\n        return 0x04;\n      }\n      case TK_CONCAT: {\n        return 0x06;\n      }\n      case TK_VARIABLE:\n      case TK_AGG_FUNCTION:\n      case TK_FUNCTION: {\n        return 0x07;\n      }\n      case TK_COLUMN:\n      case TK_AGG_COLUMN:\n      case TK_SELECT:\n      case TK_CAST:\n      case TK_SELECT_COLUMN:\n      case TK_VECTOR:  {\n        int aff = sqlite3ExprAffinity(pExpr);\n        if( aff>=SQLITE_AFF_NUMERIC ) return 0x05;\n        if( aff==SQLITE_AFF_TEXT )    return 0x06;\n        return 0x07;\n      }\n      case TK_CASE: {\n        int res = 0;\n        int ii;\n        ExprList *pList = pExpr->x.pList;\n        assert( ExprUseXList(pExpr) && pList!=0 );\n        assert( pList->nExpr > 0);\n        for(ii=1; ii<pList->nExpr; ii+=2){\n          res |= sqlite3ExprDataType(pList->a[ii].pExpr);\n        }\n        if( pList->nExpr % 2 ){\n          res |= sqlite3ExprDataType(pList->a[pList->nExpr-1].pExpr);\n        }\n        return res;\n      }\n      default: {\n        return 0x01;\n      }\n    } /* End of switch(op) */\n  } /* End of while(pExpr) */\n  return 0x00;\n}\n\n/*\n** Set the collating sequence for expression pExpr to be the collating\n** sequence named by pToken.   Return a pointer to a new Expr node that\n** implements the COLLATE operator.\n**\n** If a memory allocation error occurs, that fact is recorded in pParse->db\n** and the pExpr parameter is returned unchanged.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprAddCollateToken(\n  const Parse *pParse,     /* Parsing context */\n  Expr *pExpr,             /* Add the \"COLLATE\" clause to this expression */\n  const Token *pCollName,  /* Name of collating sequence */\n  int dequote              /* True to dequote pCollName */\n){\n  if( pCollName->n>0 ){\n    Expr *pNew = sqlite3ExprAlloc(pParse->db, TK_COLLATE, pCollName, dequote);\n    if( pNew ){\n      pNew->pLeft = pExpr;\n      pNew->flags |= EP_Collate|EP_Skip;\n      pExpr = pNew;\n    }\n  }\n  return pExpr;\n}\nSQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(\n  const Parse *pParse,  /* Parsing context */\n  Expr *pExpr,          /* Add the \"COLLATE\" clause to this expression */\n  const char *zC        /* The collating sequence name */\n){\n  Token s;\n  assert( zC!=0 );\n  sqlite3TokenInit(&s, (char*)zC);\n  return sqlite3ExprAddCollateToken(pParse, pExpr, &s, 0);\n}\n\n/*\n** Skip over any TK_COLLATE operators.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprSkipCollate(Expr *pExpr){\n  while( pExpr && ExprHasProperty(pExpr, EP_Skip) ){\n    assert( pExpr->op==TK_COLLATE );\n    pExpr = pExpr->pLeft;\n  }\n  return pExpr;\n}\n\n/*\n** Skip over any TK_COLLATE operators and/or any unlikely()\n** or likelihood() or likely() functions at the root of an\n** expression.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprSkipCollateAndLikely(Expr *pExpr){\n  while( pExpr && ExprHasProperty(pExpr, EP_Skip|EP_Unlikely) ){\n    if( ExprHasProperty(pExpr, EP_Unlikely) ){\n      assert( ExprUseXList(pExpr) );\n      assert( pExpr->x.pList->nExpr>0 );\n      assert( pExpr->op==TK_FUNCTION );\n      pExpr = pExpr->x.pList->a[0].pExpr;\n    }else if( pExpr->op==TK_COLLATE ){\n      pExpr = pExpr->pLeft;\n    }else{\n      break;\n    }\n  }\n  return pExpr;\n}\n\n/*\n** Return the collation sequence for the expression pExpr. If\n** there is no defined collating sequence, return NULL.\n**\n** See also: sqlite3ExprNNCollSeq()\n**\n** The sqlite3ExprNNCollSeq() works the same exact that it returns the\n** default collation if pExpr has no defined collation.\n**\n** The collating sequence might be determined by a COLLATE operator\n** or by the presence of a column with a defined collating sequence.\n** COLLATE operators take first precedence.  Left operands take\n** precedence over right operands.\n*/\nSQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){\n  sqlite3 *db = pParse->db;\n  CollSeq *pColl = 0;\n  const Expr *p = pExpr;\n  while( p ){\n    int op = p->op;\n    if( op==TK_REGISTER ) op = p->op2;\n    if( (op==TK_AGG_COLUMN && p->y.pTab!=0)\n     || op==TK_COLUMN || op==TK_TRIGGER\n    ){\n      int j;\n      assert( ExprUseYTab(p) );\n      assert( p->y.pTab!=0 );\n      if( (j = p->iColumn)>=0 ){\n        const char *zColl = sqlite3ColumnColl(&p->y.pTab->aCol[j]);\n        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);\n      }\n      break;\n    }\n    if( op==TK_CAST || op==TK_UPLUS ){\n      p = p->pLeft;\n      continue;\n    }\n    if( op==TK_VECTOR\n     || (op==TK_FUNCTION && p->affExpr==SQLITE_AFF_DEFER)\n    ){\n      assert( ExprUseXList(p) );\n      p = p->x.pList->a[0].pExpr;\n      continue;\n    }\n    if( op==TK_COLLATE ){\n      assert( !ExprHasProperty(p, EP_IntValue) );\n      pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);\n      break;\n    }\n    if( p->flags & EP_Collate ){\n      if( p->pLeft && (p->pLeft->flags & EP_Collate)!=0 ){\n        p = p->pLeft;\n      }else{\n        Expr *pNext  = p->pRight;\n        /* The Expr.x union is never used at the same time as Expr.pRight */\n        assert( !ExprUseXList(p) || p->x.pList==0 || p->pRight==0 );\n        if( ExprUseXList(p) && p->x.pList!=0 && !db->mallocFailed ){\n          int i;\n          for(i=0; i<p->x.pList->nExpr; i++){\n            if( ExprHasProperty(p->x.pList->a[i].pExpr, EP_Collate) ){\n              pNext = p->x.pList->a[i].pExpr;\n              break;\n            }\n          }\n        }\n        p = pNext;\n      }\n    }else{\n      break;\n    }\n  }\n  if( sqlite3CheckCollSeq(pParse, pColl) ){\n    pColl = 0;\n  }\n  return pColl;\n}\n\n/*\n** Return the collation sequence for the expression pExpr. If\n** there is no defined collating sequence, return a pointer to the\n** default collation sequence.\n**\n** See also: sqlite3ExprCollSeq()\n**\n** The sqlite3ExprCollSeq() routine works the same except that it\n** returns NULL if there is no defined collation.\n*/\nSQLITE_PRIVATE CollSeq *sqlite3ExprNNCollSeq(Parse *pParse, const Expr *pExpr){\n  CollSeq *p = sqlite3ExprCollSeq(pParse, pExpr);\n  if( p==0 ) p = pParse->db->pDfltColl;\n  assert( p!=0 );\n  return p;\n}\n\n/*\n** Return TRUE if the two expressions have equivalent collating sequences.\n*/\nSQLITE_PRIVATE int sqlite3ExprCollSeqMatch(Parse *pParse, const Expr *pE1, const Expr *pE2){\n  CollSeq *pColl1 = sqlite3ExprNNCollSeq(pParse, pE1);\n  CollSeq *pColl2 = sqlite3ExprNNCollSeq(pParse, pE2);\n  return sqlite3StrICmp(pColl1->zName, pColl2->zName)==0;\n}\n\n/*\n** pExpr is an operand of a comparison operator.  aff2 is the\n** type affinity of the other operand.  This routine returns the\n** type affinity that should be used for the comparison operator.\n*/\nSQLITE_PRIVATE char sqlite3CompareAffinity(const Expr *pExpr, char aff2){\n  char aff1 = sqlite3ExprAffinity(pExpr);\n  if( aff1>SQLITE_AFF_NONE && aff2>SQLITE_AFF_NONE ){\n    /* Both sides of the comparison are columns. If one has numeric\n    ** affinity, use that. Otherwise use no affinity.\n    */\n    if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){\n      return SQLITE_AFF_NUMERIC;\n    }else{\n      return SQLITE_AFF_BLOB;\n    }\n  }else{\n    /* One side is a column, the other is not. Use the columns affinity. */\n    assert( aff1<=SQLITE_AFF_NONE || aff2<=SQLITE_AFF_NONE );\n    return (aff1<=SQLITE_AFF_NONE ? aff2 : aff1) | SQLITE_AFF_NONE;\n  }\n}\n\n/*\n** pExpr is a comparison operator.  Return the type affinity that should\n** be applied to both operands prior to doing the comparison.\n*/\nstatic char comparisonAffinity(const Expr *pExpr){\n  char aff;\n  assert( pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT ||\n          pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE ||\n          pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT );\n  assert( pExpr->pLeft );\n  aff = sqlite3ExprAffinity(pExpr->pLeft);\n  if( pExpr->pRight ){\n    aff = sqlite3CompareAffinity(pExpr->pRight, aff);\n  }else if( ExprUseXSelect(pExpr) ){\n    aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);\n  }else if( aff==0 ){\n    aff = SQLITE_AFF_BLOB;\n  }\n  return aff;\n}\n\n/*\n** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.\n** idx_affinity is the affinity of an indexed column. Return true\n** if the index with affinity idx_affinity may be used to implement\n** the comparison in pExpr.\n*/\nSQLITE_PRIVATE int sqlite3IndexAffinityOk(const Expr *pExpr, char idx_affinity){\n  char aff = comparisonAffinity(pExpr);\n  if( aff<SQLITE_AFF_TEXT ){\n    return 1;\n  }\n  if( aff==SQLITE_AFF_TEXT ){\n    return idx_affinity==SQLITE_AFF_TEXT;\n  }\n  return sqlite3IsNumericAffinity(idx_affinity);\n}\n\n/*\n** Return the P5 value that should be used for a binary comparison\n** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.\n*/\nstatic u8 binaryCompareP5(\n  const Expr *pExpr1,   /* Left operand */\n  const Expr *pExpr2,   /* Right operand */\n  int jumpIfNull        /* Extra flags added to P5 */\n){\n  u8 aff = (char)sqlite3ExprAffinity(pExpr2);\n  aff = (u8)sqlite3CompareAffinity(pExpr1, aff) | (u8)jumpIfNull;\n  return aff;\n}\n\n/*\n** Return a pointer to the collation sequence that should be used by\n** a binary comparison operator comparing pLeft and pRight.\n**\n** If the left hand expression has a collating sequence type, then it is\n** used. Otherwise the collation sequence for the right hand expression\n** is used, or the default (BINARY) if neither expression has a collating\n** type.\n**\n** Argument pRight (but not pLeft) may be a null pointer. In this case,\n** it is not considered.\n*/\nSQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(\n  Parse *pParse,\n  const Expr *pLeft,\n  const Expr *pRight\n){\n  CollSeq *pColl;\n  assert( pLeft );\n  if( pLeft->flags & EP_Collate ){\n    pColl = sqlite3ExprCollSeq(pParse, pLeft);\n  }else if( pRight && (pRight->flags & EP_Collate)!=0 ){\n    pColl = sqlite3ExprCollSeq(pParse, pRight);\n  }else{\n    pColl = sqlite3ExprCollSeq(pParse, pLeft);\n    if( !pColl ){\n      pColl = sqlite3ExprCollSeq(pParse, pRight);\n    }\n  }\n  return pColl;\n}\n\n/* Expression p is a comparison operator.  Return a collation sequence\n** appropriate for the comparison operator.\n**\n** This is normally just a wrapper around sqlite3BinaryCompareCollSeq().\n** However, if the OP_Commuted flag is set, then the order of the operands\n** is reversed in the sqlite3BinaryCompareCollSeq() call so that the\n** correct collating sequence is found.\n*/\nSQLITE_PRIVATE CollSeq *sqlite3ExprCompareCollSeq(Parse *pParse, const Expr *p){\n  if( ExprHasProperty(p, EP_Commuted) ){\n    return sqlite3BinaryCompareCollSeq(pParse, p->pRight, p->pLeft);\n  }else{\n    return sqlite3BinaryCompareCollSeq(pParse, p->pLeft, p->pRight);\n  }\n}\n\n/*\n** Generate code for a comparison operator.\n*/\nstatic int codeCompare(\n  Parse *pParse,    /* The parsing (and code generating) context */\n  Expr *pLeft,      /* The left operand */\n  Expr *pRight,     /* The right operand */\n  int opcode,       /* The comparison opcode */\n  int in1, int in2, /* Register holding operands */\n  int dest,         /* Jump here if true.  */\n  int jumpIfNull,   /* If true, jump if either operand is NULL */\n  int isCommuted    /* The comparison has been commuted */\n){\n  int p5;\n  int addr;\n  CollSeq *p4;\n\n  if( pParse->nErr ) return 0;\n  if( isCommuted ){\n    p4 = sqlite3BinaryCompareCollSeq(pParse, pRight, pLeft);\n  }else{\n    p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);\n  }\n  p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);\n  addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1,\n                           (void*)p4, P4_COLLSEQ);\n  sqlite3VdbeChangeP5(pParse->pVdbe, (u16)p5);\n  return addr;\n}\n\n/*\n** Return true if expression pExpr is a vector, or false otherwise.\n**\n** A vector is defined as any expression that results in two or more\n** columns of result.  Every TK_VECTOR node is an vector because the\n** parser will not generate a TK_VECTOR with fewer than two entries.\n** But a TK_SELECT might be either a vector or a scalar. It is only\n** considered a vector if it has two or more result columns.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsVector(const Expr *pExpr){\n  return sqlite3ExprVectorSize(pExpr)>1;\n}\n\n/*\n** If the expression passed as the only argument is of type TK_VECTOR\n** return the number of expressions in the vector. Or, if the expression\n** is a sub-select, return the number of columns in the sub-select. For\n** any other type of expression, return 1.\n*/\nSQLITE_PRIVATE int sqlite3ExprVectorSize(const Expr *pExpr){\n  u8 op = pExpr->op;\n  if( op==TK_REGISTER ) op = pExpr->op2;\n  if( op==TK_VECTOR ){\n    assert( ExprUseXList(pExpr) );\n    return pExpr->x.pList->nExpr;\n  }else if( op==TK_SELECT ){\n    assert( ExprUseXSelect(pExpr) );\n    return pExpr->x.pSelect->pEList->nExpr;\n  }else{\n    return 1;\n  }\n}\n\n/*\n** Return a pointer to a subexpression of pVector that is the i-th\n** column of the vector (numbered starting with 0).  The caller must\n** ensure that i is within range.\n**\n** If pVector is really a scalar (and \"scalar\" here includes subqueries\n** that return a single column!) then return pVector unmodified.\n**\n** pVector retains ownership of the returned subexpression.\n**\n** If the vector is a (SELECT ...) then the expression returned is\n** just the expression for the i-th term of the result set, and may\n** not be ready for evaluation because the table cursor has not yet\n** been positioned.\n*/\nSQLITE_PRIVATE Expr *sqlite3VectorFieldSubexpr(Expr *pVector, int i){\n  assert( i<sqlite3ExprVectorSize(pVector) || pVector->op==TK_ERROR );\n  if( sqlite3ExprIsVector(pVector) ){\n    assert( pVector->op2==0 || pVector->op==TK_REGISTER );\n    if( pVector->op==TK_SELECT || pVector->op2==TK_SELECT ){\n      assert( ExprUseXSelect(pVector) );\n      return pVector->x.pSelect->pEList->a[i].pExpr;\n    }else{\n      assert( ExprUseXList(pVector) );\n      return pVector->x.pList->a[i].pExpr;\n    }\n  }\n  return pVector;\n}\n\n/*\n** Compute and return a new Expr object which when passed to\n** sqlite3ExprCode() will generate all necessary code to compute\n** the iField-th column of the vector expression pVector.\n**\n** It is ok for pVector to be a scalar (as long as iField==0).\n** In that case, this routine works like sqlite3ExprDup().\n**\n** The caller owns the returned Expr object and is responsible for\n** ensuring that the returned value eventually gets freed.\n**\n** The caller retains ownership of pVector.  If pVector is a TK_SELECT,\n** then the returned object will reference pVector and so pVector must remain\n** valid for the life of the returned object.  If pVector is a TK_VECTOR\n** or a scalar expression, then it can be deleted as soon as this routine\n** returns.\n**\n** A trick to cause a TK_SELECT pVector to be deleted together with\n** the returned Expr object is to attach the pVector to the pRight field\n** of the returned TK_SELECT_COLUMN Expr object.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprForVectorField(\n  Parse *pParse,       /* Parsing context */\n  Expr *pVector,       /* The vector.  List of expressions or a sub-SELECT */\n  int iField,          /* Which column of the vector to return */\n  int nField           /* Total number of columns in the vector */\n){\n  Expr *pRet;\n  if( pVector->op==TK_SELECT ){\n    assert( ExprUseXSelect(pVector) );\n    /* The TK_SELECT_COLUMN Expr node:\n    **\n    ** pLeft:           pVector containing TK_SELECT.  Not deleted.\n    ** pRight:          not used.  But recursively deleted.\n    ** iColumn:         Index of a column in pVector\n    ** iTable:          0 or the number of columns on the LHS of an assignment\n    ** pLeft->iTable:   First in an array of register holding result, or 0\n    **                  if the result is not yet computed.\n    **\n    ** sqlite3ExprDelete() specifically skips the recursive delete of\n    ** pLeft on TK_SELECT_COLUMN nodes.  But pRight is followed, so pVector\n    ** can be attached to pRight to cause this node to take ownership of\n    ** pVector.  Typically there will be multiple TK_SELECT_COLUMN nodes\n    ** with the same pLeft pointer to the pVector, but only one of them\n    ** will own the pVector.\n    */\n    pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, 0, 0);\n    if( pRet ){\n      ExprSetProperty(pRet, EP_FullSize);\n      pRet->iTable = nField;\n      pRet->iColumn = iField;\n      pRet->pLeft = pVector;\n    }\n  }else{\n    if( pVector->op==TK_VECTOR ){\n      Expr **ppVector;\n      assert( ExprUseXList(pVector) );\n      ppVector = &pVector->x.pList->a[iField].pExpr;\n      pVector = *ppVector;\n      if( IN_RENAME_OBJECT ){\n        /* This must be a vector UPDATE inside a trigger */\n        *ppVector = 0;\n        return pVector;\n      }\n    }\n    pRet = sqlite3ExprDup(pParse->db, pVector, 0);\n  }\n  return pRet;\n}\n\n/*\n** If expression pExpr is of type TK_SELECT, generate code to evaluate\n** it. Return the register in which the result is stored (or, if the\n** sub-select returns more than one column, the first in an array\n** of registers in which the result is stored).\n**\n** If pExpr is not a TK_SELECT expression, return 0.\n*/\nstatic int exprCodeSubselect(Parse *pParse, Expr *pExpr){\n  int reg = 0;\n#ifndef SQLITE_OMIT_SUBQUERY\n  if( pExpr->op==TK_SELECT ){\n    reg = sqlite3CodeSubselect(pParse, pExpr);\n  }\n#endif\n  return reg;\n}\n\n/*\n** Argument pVector points to a vector expression - either a TK_VECTOR\n** or TK_SELECT that returns more than one column. This function returns\n** the register number of a register that contains the value of\n** element iField of the vector.\n**\n** If pVector is a TK_SELECT expression, then code for it must have\n** already been generated using the exprCodeSubselect() routine. In this\n** case parameter regSelect should be the first in an array of registers\n** containing the results of the sub-select.\n**\n** If pVector is of type TK_VECTOR, then code for the requested field\n** is generated. In this case (*pRegFree) may be set to the number of\n** a temporary register to be freed by the caller before returning.\n**\n** Before returning, output parameter (*ppExpr) is set to point to the\n** Expr object corresponding to element iElem of the vector.\n*/\nstatic int exprVectorRegister(\n  Parse *pParse,                  /* Parse context */\n  Expr *pVector,                  /* Vector to extract element from */\n  int iField,                     /* Field to extract from pVector */\n  int regSelect,                  /* First in array of registers */\n  Expr **ppExpr,                  /* OUT: Expression element */\n  int *pRegFree                   /* OUT: Temp register to free */\n){\n  u8 op = pVector->op;\n  assert( op==TK_VECTOR || op==TK_REGISTER || op==TK_SELECT || op==TK_ERROR );\n  if( op==TK_REGISTER ){\n    *ppExpr = sqlite3VectorFieldSubexpr(pVector, iField);\n    return pVector->iTable+iField;\n  }\n  if( op==TK_SELECT ){\n    assert( ExprUseXSelect(pVector) );\n    *ppExpr = pVector->x.pSelect->pEList->a[iField].pExpr;\n     return regSelect+iField;\n  }\n  if( op==TK_VECTOR ){\n    assert( ExprUseXList(pVector) );\n    *ppExpr = pVector->x.pList->a[iField].pExpr;\n    return sqlite3ExprCodeTemp(pParse, *ppExpr, pRegFree);\n  }\n  return 0;\n}\n\n/*\n** Expression pExpr is a comparison between two vector values. Compute\n** the result of the comparison (1, 0, or NULL) and write that\n** result into register dest.\n**\n** The caller must satisfy the following preconditions:\n**\n**    if pExpr->op==TK_IS:      op==TK_EQ and p5==SQLITE_NULLEQ\n**    if pExpr->op==TK_ISNOT:   op==TK_NE and p5==SQLITE_NULLEQ\n**    otherwise:                op==pExpr->op and p5==0\n*/\nstatic void codeVectorCompare(\n  Parse *pParse,        /* Code generator context */\n  Expr *pExpr,          /* The comparison operation */\n  int dest,             /* Write results into this register */\n  u8 op,                /* Comparison operator */\n  u8 p5                 /* SQLITE_NULLEQ or zero */\n){\n  Vdbe *v = pParse->pVdbe;\n  Expr *pLeft = pExpr->pLeft;\n  Expr *pRight = pExpr->pRight;\n  int nLeft = sqlite3ExprVectorSize(pLeft);\n  int i;\n  int regLeft = 0;\n  int regRight = 0;\n  u8 opx = op;\n  int addrCmp = 0;\n  int addrDone = sqlite3VdbeMakeLabel(pParse);\n  int isCommuted = ExprHasProperty(pExpr,EP_Commuted);\n\n  assert( !ExprHasVVAProperty(pExpr,EP_Immutable) );\n  if( pParse->nErr ) return;\n  if( nLeft!=sqlite3ExprVectorSize(pRight) ){\n    sqlite3ErrorMsg(pParse, \"row value misused\");\n    return;\n  }\n  assert( pExpr->op==TK_EQ || pExpr->op==TK_NE\n       || pExpr->op==TK_IS || pExpr->op==TK_ISNOT\n       || pExpr->op==TK_LT || pExpr->op==TK_GT\n       || pExpr->op==TK_LE || pExpr->op==TK_GE\n  );\n  assert( pExpr->op==op || (pExpr->op==TK_IS && op==TK_EQ)\n            || (pExpr->op==TK_ISNOT && op==TK_NE) );\n  assert( p5==0 || pExpr->op!=op );\n  assert( p5==SQLITE_NULLEQ || pExpr->op==op );\n\n  if( op==TK_LE ) opx = TK_LT;\n  if( op==TK_GE ) opx = TK_GT;\n  if( op==TK_NE ) opx = TK_EQ;\n\n  regLeft = exprCodeSubselect(pParse, pLeft);\n  regRight = exprCodeSubselect(pParse, pRight);\n\n  sqlite3VdbeAddOp2(v, OP_Integer, 1, dest);\n  for(i=0; 1 /*Loop exits by \"break\"*/; i++){\n    int regFree1 = 0, regFree2 = 0;\n    Expr *pL = 0, *pR = 0;\n    int r1, r2;\n    assert( i>=0 && i<nLeft );\n    if( addrCmp ) sqlite3VdbeJumpHere(v, addrCmp);\n    r1 = exprVectorRegister(pParse, pLeft, i, regLeft, &pL, &regFree1);\n    r2 = exprVectorRegister(pParse, pRight, i, regRight, &pR, &regFree2);\n    addrCmp = sqlite3VdbeCurrentAddr(v);\n    codeCompare(pParse, pL, pR, opx, r1, r2, addrDone, p5, isCommuted);\n    testcase(op==OP_Lt); VdbeCoverageIf(v,op==OP_Lt);\n    testcase(op==OP_Le); VdbeCoverageIf(v,op==OP_Le);\n    testcase(op==OP_Gt); VdbeCoverageIf(v,op==OP_Gt);\n    testcase(op==OP_Ge); VdbeCoverageIf(v,op==OP_Ge);\n    testcase(op==OP_Eq); VdbeCoverageIf(v,op==OP_Eq);\n    testcase(op==OP_Ne); VdbeCoverageIf(v,op==OP_Ne);\n    sqlite3ReleaseTempReg(pParse, regFree1);\n    sqlite3ReleaseTempReg(pParse, regFree2);\n    if( (opx==TK_LT || opx==TK_GT) && i<nLeft-1 ){\n      addrCmp = sqlite3VdbeAddOp0(v, OP_ElseEq);\n      testcase(opx==TK_LT); VdbeCoverageIf(v,opx==TK_LT);\n      testcase(opx==TK_GT); VdbeCoverageIf(v,opx==TK_GT);\n    }\n    if( p5==SQLITE_NULLEQ ){\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, dest);\n    }else{\n      sqlite3VdbeAddOp3(v, OP_ZeroOrNull, r1, dest, r2);\n    }\n    if( i==nLeft-1 ){\n      break;\n    }\n    if( opx==TK_EQ ){\n      sqlite3VdbeAddOp2(v, OP_NotNull, dest, addrDone); VdbeCoverage(v);\n    }else{\n      assert( op==TK_LT || op==TK_GT || op==TK_LE || op==TK_GE );\n      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrDone);\n      if( i==nLeft-2 ) opx = op;\n    }\n  }\n  sqlite3VdbeJumpHere(v, addrCmp);\n  sqlite3VdbeResolveLabel(v, addrDone);\n  if( op==TK_NE ){\n    sqlite3VdbeAddOp2(v, OP_Not, dest, dest);\n  }\n}\n\n#if SQLITE_MAX_EXPR_DEPTH>0\n/*\n** Check that argument nHeight is less than or equal to the maximum\n** expression depth allowed. If it is not, leave an error message in\n** pParse.\n*/\nSQLITE_PRIVATE int sqlite3ExprCheckHeight(Parse *pParse, int nHeight){\n  int rc = SQLITE_OK;\n  int mxHeight = pParse->db->aLimit[SQLITE_LIMIT_EXPR_DEPTH];\n  if( nHeight>mxHeight ){\n    sqlite3ErrorMsg(pParse,\n       \"Expression tree is too large (maximum depth %d)\", mxHeight\n    );\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/* The following three functions, heightOfExpr(), heightOfExprList()\n** and heightOfSelect(), are used to determine the maximum height\n** of any expression tree referenced by the structure passed as the\n** first argument.\n**\n** If this maximum height is greater than the current value pointed\n** to by pnHeight, the second parameter, then set *pnHeight to that\n** value.\n*/\nstatic void heightOfExpr(const Expr *p, int *pnHeight){\n  if( p ){\n    if( p->nHeight>*pnHeight ){\n      *pnHeight = p->nHeight;\n    }\n  }\n}\nstatic void heightOfExprList(const ExprList *p, int *pnHeight){\n  if( p ){\n    int i;\n    for(i=0; i<p->nExpr; i++){\n      heightOfExpr(p->a[i].pExpr, pnHeight);\n    }\n  }\n}\nstatic void heightOfSelect(const Select *pSelect, int *pnHeight){\n  const Select *p;\n  for(p=pSelect; p; p=p->pPrior){\n    heightOfExpr(p->pWhere, pnHeight);\n    heightOfExpr(p->pHaving, pnHeight);\n    heightOfExpr(p->pLimit, pnHeight);\n    heightOfExprList(p->pEList, pnHeight);\n    heightOfExprList(p->pGroupBy, pnHeight);\n    heightOfExprList(p->pOrderBy, pnHeight);\n  }\n}\n\n/*\n** Set the Expr.nHeight variable in the structure passed as an\n** argument. An expression with no children, Expr.pList or\n** Expr.pSelect member has a height of 1. Any other expression\n** has a height equal to the maximum height of any other\n** referenced Expr plus one.\n**\n** Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags,\n** if appropriate.\n*/\nstatic void exprSetHeight(Expr *p){\n  int nHeight = p->pLeft ? p->pLeft->nHeight : 0;\n  if( NEVER(p->pRight) && p->pRight->nHeight>nHeight ){\n    nHeight = p->pRight->nHeight;\n  }\n  if( ExprUseXSelect(p) ){\n    heightOfSelect(p->x.pSelect, &nHeight);\n  }else if( p->x.pList ){\n    heightOfExprList(p->x.pList, &nHeight);\n    p->flags |= EP_Propagate & sqlite3ExprListFlags(p->x.pList);\n  }\n  p->nHeight = nHeight + 1;\n}\n\n/*\n** Set the Expr.nHeight variable using the exprSetHeight() function. If\n** the height is greater than the maximum allowed expression depth,\n** leave an error in pParse.\n**\n** Also propagate all EP_Propagate flags from the Expr.x.pList into\n** Expr.flags.\n*/\nSQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){\n  if( pParse->nErr ) return;\n  exprSetHeight(p);\n  sqlite3ExprCheckHeight(pParse, p->nHeight);\n}\n\n/*\n** Return the maximum height of any expression tree referenced\n** by the select statement passed as an argument.\n*/\nSQLITE_PRIVATE int sqlite3SelectExprHeight(const Select *p){\n  int nHeight = 0;\n  heightOfSelect(p, &nHeight);\n  return nHeight;\n}\n#else /* ABOVE:  Height enforcement enabled.  BELOW: Height enforcement off */\n/*\n** Propagate all EP_Propagate flags from the Expr.x.pList into\n** Expr.flags.\n*/\nSQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){\n  if( pParse->nErr ) return;\n  if( p && ExprUseXList(p) && p->x.pList ){\n    p->flags |= EP_Propagate & sqlite3ExprListFlags(p->x.pList);\n  }\n}\n#define exprSetHeight(y)\n#endif /* SQLITE_MAX_EXPR_DEPTH>0 */\n\n/*\n** Set the error offset for an Expr node, if possible.\n*/\nSQLITE_PRIVATE void sqlite3ExprSetErrorOffset(Expr *pExpr, int iOfst){\n  if( pExpr==0 ) return;\n  if( NEVER(ExprUseWJoin(pExpr)) ) return;\n  pExpr->w.iOfst = iOfst;\n}\n\n/*\n** This routine is the core allocator for Expr nodes.\n**\n** Construct a new expression node and return a pointer to it.  Memory\n** for this node and for the pToken argument is a single allocation\n** obtained from sqlite3DbMalloc().  The calling function\n** is responsible for making sure the node eventually gets freed.\n**\n** If dequote is true, then the token (if it exists) is dequoted.\n** If dequote is false, no dequoting is performed.  The deQuote\n** parameter is ignored if pToken is NULL or if the token does not\n** appear to be quoted.  If the quotes were of the form \"...\" (double-quotes)\n** then the EP_DblQuoted flag is set on the expression node.\n**\n** Special case (tag-20240227-a):  If op==TK_INTEGER and pToken points to\n** a string that can be translated into a 32-bit integer, then the token is\n** not stored in u.zToken.  Instead, the integer values is written\n** into u.iValue and the EP_IntValue flag is set. No extra storage\n** is allocated to hold the integer text and the dequote flag is ignored.\n** See also tag-20240227-b.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprAlloc(\n  sqlite3 *db,            /* Handle for sqlite3DbMallocRawNN() */\n  int op,                 /* Expression opcode */\n  const Token *pToken,    /* Token argument.  Might be NULL */\n  int dequote             /* True to dequote */\n){\n  Expr *pNew;\n  int nExtra = 0;\n  int iValue = 0;\n\n  assert( db!=0 );\n  if( pToken ){\n    if( op!=TK_INTEGER || pToken->z==0\n          || sqlite3GetInt32(pToken->z, &iValue)==0 ){\n      nExtra = pToken->n+1;  /* tag-20240227-a */\n      assert( iValue>=0 );\n    }\n  }\n  pNew = sqlite3DbMallocRawNN(db, sizeof(Expr)+nExtra);\n  if( pNew ){\n    memset(pNew, 0, sizeof(Expr));\n    pNew->op = (u8)op;\n    pNew->iAgg = -1;\n    if( pToken ){\n      if( nExtra==0 ){\n        pNew->flags |= EP_IntValue|EP_Leaf|(iValue?EP_IsTrue:EP_IsFalse);\n        pNew->u.iValue = iValue;\n      }else{\n        pNew->u.zToken = (char*)&pNew[1];\n        assert( pToken->z!=0 || pToken->n==0 );\n        if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n);\n        pNew->u.zToken[pToken->n] = 0;\n        if( dequote && sqlite3Isquote(pNew->u.zToken[0]) ){\n          sqlite3DequoteExpr(pNew);\n        }\n      }\n    }\n#if SQLITE_MAX_EXPR_DEPTH>0\n    pNew->nHeight = 1;\n#endif\n  }\n  return pNew;\n}\n\n/*\n** Allocate a new expression node from a zero-terminated token that has\n** already been dequoted.\n*/\nSQLITE_PRIVATE Expr *sqlite3Expr(\n  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */\n  int op,                 /* Expression opcode */\n  const char *zToken      /* Token argument.  Might be NULL */\n){\n  Token x;\n  x.z = zToken;\n  x.n = sqlite3Strlen30(zToken);\n  return sqlite3ExprAlloc(db, op, &x, 0);\n}\n\n/*\n** Attach subtrees pLeft and pRight to the Expr node pRoot.\n**\n** If pRoot==NULL that means that a memory allocation error has occurred.\n** In that case, delete the subtrees pLeft and pRight.\n*/\nSQLITE_PRIVATE void sqlite3ExprAttachSubtrees(\n  sqlite3 *db,\n  Expr *pRoot,\n  Expr *pLeft,\n  Expr *pRight\n){\n  if( pRoot==0 ){\n    assert( db->mallocFailed );\n    sqlite3ExprDelete(db, pLeft);\n    sqlite3ExprDelete(db, pRight);\n  }else{\n    assert( ExprUseXList(pRoot) );\n    assert( pRoot->x.pSelect==0 );\n    if( pRight ){\n      pRoot->pRight = pRight;\n      pRoot->flags |= EP_Propagate & pRight->flags;\n#if SQLITE_MAX_EXPR_DEPTH>0\n      pRoot->nHeight = pRight->nHeight+1;\n    }else{\n      pRoot->nHeight = 1;\n#endif\n    }\n    if( pLeft ){\n      pRoot->pLeft = pLeft;\n      pRoot->flags |= EP_Propagate & pLeft->flags;\n#if SQLITE_MAX_EXPR_DEPTH>0\n      if( pLeft->nHeight>=pRoot->nHeight ){\n        pRoot->nHeight = pLeft->nHeight+1;\n      }\n#endif\n    }\n  }\n}\n\n/*\n** Allocate an Expr node which joins as many as two subtrees.\n**\n** One or both of the subtrees can be NULL.  Return a pointer to the new\n** Expr node.  Or, if an OOM error occurs, set pParse->db->mallocFailed,\n** free the subtrees and return NULL.\n*/\nSQLITE_PRIVATE Expr *sqlite3PExpr(\n  Parse *pParse,          /* Parsing context */\n  int op,                 /* Expression opcode */\n  Expr *pLeft,            /* Left operand */\n  Expr *pRight            /* Right operand */\n){\n  Expr *p;\n  p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr));\n  if( p ){\n    memset(p, 0, sizeof(Expr));\n    p->op = op & 0xff;\n    p->iAgg = -1;\n    sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);\n    sqlite3ExprCheckHeight(pParse, p->nHeight);\n  }else{\n    sqlite3ExprDelete(pParse->db, pLeft);\n    sqlite3ExprDelete(pParse->db, pRight);\n  }\n  return p;\n}\n\n/*\n** Add pSelect to the Expr.x.pSelect field.  Or, if pExpr is NULL (due\n** do a memory allocation failure) then delete the pSelect object.\n*/\nSQLITE_PRIVATE void sqlite3PExprAddSelect(Parse *pParse, Expr *pExpr, Select *pSelect){\n  if( pExpr ){\n    pExpr->x.pSelect = pSelect;\n    ExprSetProperty(pExpr, EP_xIsSelect|EP_Subquery);\n    sqlite3ExprSetHeightAndFlags(pParse, pExpr);\n  }else{\n    assert( pParse->db->mallocFailed );\n    sqlite3SelectDelete(pParse->db, pSelect);\n  }\n}\n\n/*\n** Expression list pEList is a list of vector values. This function\n** converts the contents of pEList to a VALUES(...) Select statement\n** returning 1 row for each element of the list. For example, the\n** expression list:\n**\n**   ( (1,2), (3,4) (5,6) )\n**\n** is translated to the equivalent of:\n**\n**   VALUES(1,2), (3,4), (5,6)\n**\n** Each of the vector values in pEList must contain exactly nElem terms.\n** If a list element that is not a vector or does not contain nElem terms,\n** an error message is left in pParse.\n**\n** This is used as part of processing IN(...) expressions with a list\n** of vectors on the RHS. e.g. \"... IN ((1,2), (3,4), (5,6))\".\n*/\nSQLITE_PRIVATE Select *sqlite3ExprListToValues(Parse *pParse, int nElem, ExprList *pEList){\n  int ii;\n  Select *pRet = 0;\n  assert( nElem>1 );\n  for(ii=0; ii<pEList->nExpr; ii++){\n    Select *pSel;\n    Expr *pExpr = pEList->a[ii].pExpr;\n    int nExprElem;\n    if( pExpr->op==TK_VECTOR ){\n      assert( ExprUseXList(pExpr) );\n      nExprElem = pExpr->x.pList->nExpr;\n    }else{\n      nExprElem = 1;\n    }\n    if( nExprElem!=nElem ){\n      sqlite3ErrorMsg(pParse, \"IN(...) element has %d term%s - expected %d\",\n          nExprElem, nExprElem>1?\"s\":\"\", nElem\n      );\n      break;\n    }\n    assert( ExprUseXList(pExpr) );\n    pSel = sqlite3SelectNew(pParse, pExpr->x.pList, 0, 0, 0, 0, 0, SF_Values,0);\n    pExpr->x.pList = 0;\n    if( pSel ){\n      if( pRet ){\n        pSel->op = TK_ALL;\n        pSel->pPrior = pRet;\n      }\n      pRet = pSel;\n    }\n  }\n\n  if( pRet && pRet->pPrior ){\n    pRet->selFlags |= SF_MultiValue;\n  }\n  sqlite3ExprListDelete(pParse->db, pEList);\n  return pRet;\n}\n\n/*\n** Join two expressions using an AND operator.  If either expression is\n** NULL, then just return the other expression.\n**\n** If one side or the other of the AND is known to be false, and neither side\n** is part of an ON clause, then instead of returning an AND expression,\n** just return a constant expression with a value of false.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){\n  sqlite3 *db = pParse->db;\n  if( pLeft==0  ){\n    return pRight;\n  }else if( pRight==0 ){\n    return pLeft;\n  }else{\n    u32 f = pLeft->flags | pRight->flags;\n    if( (f&(EP_OuterON|EP_InnerON|EP_IsFalse|EP_HasFunc))==EP_IsFalse\n     && !IN_RENAME_OBJECT\n    ){\n      sqlite3ExprDeferredDelete(pParse, pLeft);\n      sqlite3ExprDeferredDelete(pParse, pRight);\n      return sqlite3Expr(db, TK_INTEGER, \"0\");\n    }else{\n      return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);\n    }\n  }\n}\n\n/*\n** Construct a new expression node for a function with multiple\n** arguments.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprFunction(\n  Parse *pParse,        /* Parsing context */\n  ExprList *pList,      /* Argument list */\n  const Token *pToken,  /* Name of the function */\n  int eDistinct         /* SF_Distinct or SF_ALL or 0 */\n){\n  Expr *pNew;\n  sqlite3 *db = pParse->db;\n  assert( pToken );\n  pNew = sqlite3ExprAlloc(db, TK_FUNCTION, pToken, 1);\n  if( pNew==0 ){\n    sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */\n    return 0;\n  }\n  assert( !ExprHasProperty(pNew, EP_InnerON|EP_OuterON) );\n  pNew->w.iOfst = (int)(pToken->z - pParse->zTail);\n  if( pList\n   && pList->nExpr > pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG]\n   && !pParse->nested\n  ){\n    sqlite3ErrorMsg(pParse, \"too many arguments on function %T\", pToken);\n  }\n  pNew->x.pList = pList;\n  ExprSetProperty(pNew, EP_HasFunc);\n  assert( ExprUseXList(pNew) );\n  sqlite3ExprSetHeightAndFlags(pParse, pNew);\n  if( eDistinct==SF_Distinct ) ExprSetProperty(pNew, EP_Distinct);\n  return pNew;\n}\n\n/*\n** Report an error when attempting to use an ORDER BY clause within\n** the arguments of a non-aggregate function.\n*/\nSQLITE_PRIVATE void sqlite3ExprOrderByAggregateError(Parse *pParse, Expr *p){\n  sqlite3ErrorMsg(pParse,\n     \"ORDER BY may not be used with non-aggregate %#T()\", p\n  );\n}\n\n/*\n** Attach an ORDER BY clause to a function call.\n**\n**     functionname( arguments ORDER BY sortlist )\n**     \\_____________________/          \\______/\n**             pExpr                    pOrderBy\n**\n** The ORDER BY clause is inserted into a new Expr node of type TK_ORDER\n** and added to the Expr.pLeft field of the parent TK_FUNCTION node.\n*/\nSQLITE_PRIVATE void sqlite3ExprAddFunctionOrderBy(\n  Parse *pParse,        /* Parsing context */\n  Expr *pExpr,          /* The function call to which ORDER BY is to be added */\n  ExprList *pOrderBy    /* The ORDER BY clause to add */\n){\n  Expr *pOB;\n  sqlite3 *db = pParse->db;\n  if( NEVER(pOrderBy==0) ){\n    assert( db->mallocFailed );\n    return;\n  }\n  if( pExpr==0 ){\n    assert( db->mallocFailed );\n    sqlite3ExprListDelete(db, pOrderBy);\n    return;\n  }\n  assert( pExpr->op==TK_FUNCTION );\n  assert( pExpr->pLeft==0 );\n  assert( ExprUseXList(pExpr) );\n  if( pExpr->x.pList==0 || NEVER(pExpr->x.pList->nExpr==0) ){\n    /* Ignore ORDER BY on zero-argument aggregates */\n    sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric, pOrderBy);\n    return;\n  }\n  if( IsWindowFunc(pExpr) ){\n    sqlite3ExprOrderByAggregateError(pParse, pExpr);\n    sqlite3ExprListDelete(db, pOrderBy);\n    return;\n  }\n  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){\n    sqlite3ErrorMsg(pParse, \"too many terms in ORDER BY clause\");\n    sqlite3ExprListDelete(db, pOrderBy);\n    return;\n  }\n\n  pOB = sqlite3ExprAlloc(db, TK_ORDER, 0, 0);\n  if( pOB==0 ){\n    sqlite3ExprListDelete(db, pOrderBy);\n    return;\n  }\n  pOB->x.pList = pOrderBy;\n  assert( ExprUseXList(pOB) );\n  pExpr->pLeft = pOB;\n  ExprSetProperty(pOB, EP_FullSize);\n}\n\n/*\n** Check to see if a function is usable according to current access\n** rules:\n**\n**    SQLITE_FUNC_DIRECT    -     Only usable from top-level SQL\n**\n**    SQLITE_FUNC_UNSAFE    -     Usable if TRUSTED_SCHEMA or from\n**                                top-level SQL\n**\n** If the function is not usable, create an error.\n*/\nSQLITE_PRIVATE void sqlite3ExprFunctionUsable(\n  Parse *pParse,         /* Parsing and code generating context */\n  const Expr *pExpr,     /* The function invocation */\n  const FuncDef *pDef    /* The function being invoked */\n){\n  assert( !IN_RENAME_OBJECT );\n  assert( (pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE))!=0 );\n  if( ExprHasProperty(pExpr, EP_FromDDL) ){\n    if( (pDef->funcFlags & SQLITE_FUNC_DIRECT)!=0\n     || (pParse->db->flags & SQLITE_TrustedSchema)==0\n    ){\n      /* Functions prohibited in triggers and views if:\n      **     (1) tagged with SQLITE_DIRECTONLY\n      **     (2) not tagged with SQLITE_INNOCUOUS (which means it\n      **         is tagged with SQLITE_FUNC_UNSAFE) and\n      **         SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning\n      **         that the schema is possibly tainted).\n      */\n      sqlite3ErrorMsg(pParse, \"unsafe use of %#T()\", pExpr);\n    }\n  }\n}\n\n/*\n** Assign a variable number to an expression that encodes a wildcard\n** in the original SQL statement.\n**\n** Wildcards consisting of a single \"?\" are assigned the next sequential\n** variable number.\n**\n** Wildcards of the form \"?nnn\" are assigned the number \"nnn\".  We make\n** sure \"nnn\" is not too big to avoid a denial of service attack when\n** the SQL statement comes from an external source.\n**\n** Wildcards of the form \":aaa\", \"@aaa\", or \"$aaa\" are assigned the same number\n** as the previous instance of the same wildcard.  Or if this is the first\n** instance of the wildcard, the next sequential variable number is\n** assigned.\n*/\nSQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr, u32 n){\n  sqlite3 *db = pParse->db;\n  const char *z;\n  ynVar x;\n\n  if( pExpr==0 ) return;\n  assert( !ExprHasProperty(pExpr, EP_IntValue|EP_Reduced|EP_TokenOnly) );\n  z = pExpr->u.zToken;\n  assert( z!=0 );\n  assert( z[0]!=0 );\n  assert( n==(u32)sqlite3Strlen30(z) );\n  if( z[1]==0 ){\n    /* Wildcard of the form \"?\".  Assign the next variable number */\n    assert( z[0]=='?' );\n    x = (ynVar)(++pParse->nVar);\n  }else{\n    int doAdd = 0;\n    if( z[0]=='?' ){\n      /* Wildcard of the form \"?nnn\".  Convert \"nnn\" to an integer and\n      ** use it as the variable number */\n      i64 i;\n      int bOk;\n      if( n==2 ){ /*OPTIMIZATION-IF-TRUE*/\n        i = z[1]-'0';  /* The common case of ?N for a single digit N */\n        bOk = 1;\n      }else{\n        bOk = 0==sqlite3Atoi64(&z[1], &i, n-1, SQLITE_UTF8);\n      }\n      testcase( i==0 );\n      testcase( i==1 );\n      testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]-1 );\n      testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] );\n      if( bOk==0 || i<1 || i>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){\n        sqlite3ErrorMsg(pParse, \"variable number must be between ?1 and ?%d\",\n            db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]);\n        sqlite3RecordErrorOffsetOfExpr(pParse->db, pExpr);\n        return;\n      }\n      x = (ynVar)i;\n      if( x>pParse->nVar ){\n        pParse->nVar = (int)x;\n        doAdd = 1;\n      }else if( sqlite3VListNumToName(pParse->pVList, x)==0 ){\n        doAdd = 1;\n      }\n    }else{\n      /* Wildcards like \":aaa\", \"$aaa\" or \"@aaa\".  Reuse the same variable\n      ** number as the prior appearance of the same name, or if the name\n      ** has never appeared before, reuse the same variable number\n      */\n      x = (ynVar)sqlite3VListNameToNum(pParse->pVList, z, n);\n      if( x==0 ){\n        x = (ynVar)(++pParse->nVar);\n        doAdd = 1;\n      }\n    }\n    if( doAdd ){\n      pParse->pVList = sqlite3VListAdd(db, pParse->pVList, z, n, x);\n    }\n  }\n  pExpr->iColumn = x;\n  if( x>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){\n    sqlite3ErrorMsg(pParse, \"too many SQL variables\");\n    sqlite3RecordErrorOffsetOfExpr(pParse->db, pExpr);\n  }\n}\n\n/*\n** Recursively delete an expression tree.\n*/\nstatic SQLITE_NOINLINE void sqlite3ExprDeleteNN(sqlite3 *db, Expr *p){\n  assert( p!=0 );\n  assert( db!=0 );\nexprDeleteRestart:\n  assert( !ExprUseUValue(p) || p->u.iValue>=0 );\n  assert( !ExprUseYWin(p) || !ExprUseYSub(p) );\n  assert( !ExprUseYWin(p) || p->y.pWin!=0 || db->mallocFailed );\n  assert( p->op!=TK_FUNCTION || !ExprUseYSub(p) );\n#ifdef SQLITE_DEBUG\n  if( ExprHasProperty(p, EP_Leaf) && !ExprHasProperty(p, EP_TokenOnly) ){\n    assert( p->pLeft==0 );\n    assert( p->pRight==0 );\n    assert( !ExprUseXSelect(p) || p->x.pSelect==0 );\n    assert( !ExprUseXList(p) || p->x.pList==0 );\n  }\n#endif\n  if( !ExprHasProperty(p, (EP_TokenOnly|EP_Leaf)) ){\n    /* The Expr.x union is never used at the same time as Expr.pRight */\n    assert( (ExprUseXList(p) && p->x.pList==0) || p->pRight==0 );\n    if( p->pRight ){\n      assert( !ExprHasProperty(p, EP_WinFunc) );\n      sqlite3ExprDeleteNN(db, p->pRight);\n    }else if( ExprUseXSelect(p) ){\n      assert( !ExprHasProperty(p, EP_WinFunc) );\n      sqlite3SelectDelete(db, p->x.pSelect);\n    }else{\n      sqlite3ExprListDelete(db, p->x.pList);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( ExprHasProperty(p, EP_WinFunc) ){\n        sqlite3WindowDelete(db, p->y.pWin);\n      }\n#endif\n    }\n    if( p->pLeft && p->op!=TK_SELECT_COLUMN ){\n      Expr *pLeft = p->pLeft;\n      if( !ExprHasProperty(p, EP_Static)\n       && !ExprHasProperty(pLeft, EP_Static)\n      ){\n        /* Avoid unnecessary recursion on unary operators */\n        sqlite3DbNNFreeNN(db, p);\n        p = pLeft;\n        goto exprDeleteRestart;\n      }else{\n        sqlite3ExprDeleteNN(db, pLeft);\n      }\n    }\n  }\n  if( !ExprHasProperty(p, EP_Static) ){\n    sqlite3DbNNFreeNN(db, p);\n  }\n}\nSQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){\n  if( p ) sqlite3ExprDeleteNN(db, p);\n}\nSQLITE_PRIVATE void sqlite3ExprDeleteGeneric(sqlite3 *db, void *p){\n  if( ALWAYS(p) ) sqlite3ExprDeleteNN(db, (Expr*)p);\n}\n\n/*\n** Clear both elements of an OnOrUsing object\n*/\nSQLITE_PRIVATE void sqlite3ClearOnOrUsing(sqlite3 *db, OnOrUsing *p){\n  if( p==0 ){\n    /* Nothing to clear */\n  }else if( p->pOn ){\n    sqlite3ExprDeleteNN(db, p->pOn);\n  }else if( p->pUsing ){\n    sqlite3IdListDelete(db, p->pUsing);\n  }\n}\n\n/*\n** Arrange to cause pExpr to be deleted when the pParse is deleted.\n** This is similar to sqlite3ExprDelete() except that the delete is\n** deferred until the pParse is deleted.\n**\n** The pExpr might be deleted immediately on an OOM error.\n**\n** Return 0 if the delete was successfully deferred.  Return non-zero\n** if the delete happened immediately because of an OOM.\n*/\nSQLITE_PRIVATE int sqlite3ExprDeferredDelete(Parse *pParse, Expr *pExpr){\n  return 0==sqlite3ParserAddCleanup(pParse, sqlite3ExprDeleteGeneric, pExpr);\n}\n\n/* Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the\n** expression.\n*/\nSQLITE_PRIVATE void sqlite3ExprUnmapAndDelete(Parse *pParse, Expr *p){\n  if( p ){\n    if( IN_RENAME_OBJECT ){\n      sqlite3RenameExprUnmap(pParse, p);\n    }\n    sqlite3ExprDeleteNN(pParse->db, p);\n  }\n}\n\n/*\n** Return the number of bytes allocated for the expression structure\n** passed as the first argument. This is always one of EXPR_FULLSIZE,\n** EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.\n*/\nstatic int exprStructSize(const Expr *p){\n  if( ExprHasProperty(p, EP_TokenOnly) ) return EXPR_TOKENONLYSIZE;\n  if( ExprHasProperty(p, EP_Reduced) ) return EXPR_REDUCEDSIZE;\n  return EXPR_FULLSIZE;\n}\n\n/*\n** The dupedExpr*Size() routines each return the number of bytes required\n** to store a copy of an expression or expression tree.  They differ in\n** how much of the tree is measured.\n**\n**     dupedExprStructSize()     Size of only the Expr structure\n**     dupedExprNodeSize()       Size of Expr + space for token\n**     dupedExprSize()           Expr + token + subtree components\n**\n***************************************************************************\n**\n** The dupedExprStructSize() function returns two values OR-ed together:\n** (1) the space required for a copy of the Expr structure only and\n** (2) the EP_xxx flags that indicate what the structure size should be.\n** The return values is always one of:\n**\n**      EXPR_FULLSIZE\n**      EXPR_REDUCEDSIZE   | EP_Reduced\n**      EXPR_TOKENONLYSIZE | EP_TokenOnly\n**\n** The size of the structure can be found by masking the return value\n** of this routine with 0xfff.  The flags can be found by masking the\n** return value with EP_Reduced|EP_TokenOnly.\n**\n** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size\n** (unreduced) Expr objects as they or originally constructed by the parser.\n** During expression analysis, extra information is computed and moved into\n** later parts of the Expr object and that extra information might get chopped\n** off if the expression is reduced.  Note also that it does not work to\n** make an EXPRDUP_REDUCE copy of a reduced expression.  It is only legal\n** to reduce a pristine expression tree from the parser.  The implementation\n** of dupedExprStructSize() contain multiple assert() statements that attempt\n** to enforce this constraint.\n*/\nstatic int dupedExprStructSize(const Expr *p, int flags){\n  int nSize;\n  assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */\n  assert( EXPR_FULLSIZE<=0xfff );\n  assert( (0xfff & (EP_Reduced|EP_TokenOnly))==0 );\n  if( 0==flags || ExprHasProperty(p, EP_FullSize) ){\n    nSize = EXPR_FULLSIZE;\n  }else{\n    assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );\n    assert( !ExprHasProperty(p, EP_OuterON) );\n    assert( !ExprHasVVAProperty(p, EP_NoReduce) );\n    if( p->pLeft || p->x.pList ){\n      nSize = EXPR_REDUCEDSIZE | EP_Reduced;\n    }else{\n      assert( p->pRight==0 );\n      nSize = EXPR_TOKENONLYSIZE | EP_TokenOnly;\n    }\n  }\n  return nSize;\n}\n\n/*\n** This function returns the space in bytes required to store the copy\n** of the Expr structure and a copy of the Expr.u.zToken string (if that\n** string is defined.)\n*/\nstatic int dupedExprNodeSize(const Expr *p, int flags){\n  int nByte = dupedExprStructSize(p, flags) & 0xfff;\n  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){\n    nByte += sqlite3Strlen30NN(p->u.zToken)+1;\n  }\n  return ROUND8(nByte);\n}\n\n/*\n** Return the number of bytes required to create a duplicate of the\n** expression passed as the first argument.\n**\n** The value returned includes space to create a copy of the Expr struct\n** itself and the buffer referred to by Expr.u.zToken, if any.\n**\n** The return value includes space to duplicate all Expr nodes in the\n** tree formed by Expr.pLeft and Expr.pRight, but not any other\n** substructure such as Expr.x.pList, Expr.x.pSelect, and Expr.y.pWin.\n*/\nstatic int dupedExprSize(const Expr *p){\n  int nByte;\n  assert( p!=0 );\n  nByte = dupedExprNodeSize(p, EXPRDUP_REDUCE);\n  if( p->pLeft ) nByte += dupedExprSize(p->pLeft);\n  if( p->pRight ) nByte += dupedExprSize(p->pRight);\n  assert( nByte==ROUND8(nByte) );\n  return nByte;\n}\n\n/*\n** An EdupBuf is a memory allocation used to stored multiple Expr objects\n** together with their Expr.zToken content.  This is used to help implement\n** compression while doing sqlite3ExprDup().  The top-level Expr does the\n** allocation for itself and many of its decendents, then passes an instance\n** of the structure down into exprDup() so that they decendents can have\n** access to that memory.\n*/\ntypedef struct EdupBuf EdupBuf;\nstruct EdupBuf {\n  u8 *zAlloc;          /* Memory space available for storage */\n#ifdef SQLITE_DEBUG\n  u8 *zEnd;            /* First byte past the end of memory */\n#endif\n};\n\n/*\n** This function is similar to sqlite3ExprDup(), except that if pEdupBuf\n** is not NULL then it points to memory that can be used to store a copy\n** of the input Expr p together with its p->u.zToken (if any).  pEdupBuf\n** is updated with the new buffer tail prior to returning.\n*/\nstatic Expr *exprDup(\n  sqlite3 *db,          /* Database connection (for memory allocation) */\n  const Expr *p,        /* Expr tree to be duplicated */\n  int dupFlags,         /* EXPRDUP_REDUCE for compression.  0 if not */\n  EdupBuf *pEdupBuf     /* Preallocated storage space, or NULL */\n){\n  Expr *pNew;           /* Value to return */\n  EdupBuf sEdupBuf;     /* Memory space from which to build Expr object */\n  u32 staticFlag;       /* EP_Static if space not obtained from malloc */\n  int nToken = -1;       /* Space needed for p->u.zToken.  -1 means unknown */\n\n  assert( db!=0 );\n  assert( p );\n  assert( dupFlags==0 || dupFlags==EXPRDUP_REDUCE );\n  assert( pEdupBuf==0 || dupFlags==EXPRDUP_REDUCE );\n\n  /* Figure out where to write the new Expr structure. */\n  if( pEdupBuf ){\n    sEdupBuf.zAlloc = pEdupBuf->zAlloc;\n#ifdef SQLITE_DEBUG\n    sEdupBuf.zEnd = pEdupBuf->zEnd;\n#endif\n    staticFlag = EP_Static;\n    assert( sEdupBuf.zAlloc!=0 );\n    assert( dupFlags==EXPRDUP_REDUCE );\n  }else{\n    int nAlloc;\n    if( dupFlags ){\n      nAlloc = dupedExprSize(p);\n    }else if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){\n      nToken = sqlite3Strlen30NN(p->u.zToken)+1;\n      nAlloc = ROUND8(EXPR_FULLSIZE + nToken);\n    }else{\n      nToken = 0;\n      nAlloc = ROUND8(EXPR_FULLSIZE);\n    }\n    assert( nAlloc==ROUND8(nAlloc) );\n    sEdupBuf.zAlloc = sqlite3DbMallocRawNN(db, nAlloc);\n#ifdef SQLITE_DEBUG\n    sEdupBuf.zEnd = sEdupBuf.zAlloc ? sEdupBuf.zAlloc+nAlloc : 0;\n#endif\n\n    staticFlag = 0;\n  }\n  pNew = (Expr *)sEdupBuf.zAlloc;\n  assert( EIGHT_BYTE_ALIGNMENT(pNew) );\n\n  if( pNew ){\n    /* Set nNewSize to the size allocated for the structure pointed to\n    ** by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or\n    ** EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed\n    ** by the copy of the p->u.zToken string (if any).\n    */\n    const unsigned nStructSize = dupedExprStructSize(p, dupFlags);\n    int nNewSize = nStructSize & 0xfff;\n    if( nToken<0 ){\n      if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){\n        nToken = sqlite3Strlen30(p->u.zToken) + 1;\n      }else{\n        nToken = 0;\n      }\n    }\n    if( dupFlags ){\n      assert( (int)(sEdupBuf.zEnd - sEdupBuf.zAlloc) >= nNewSize+nToken );\n      assert( ExprHasProperty(p, EP_Reduced)==0 );\n      memcpy(sEdupBuf.zAlloc, p, nNewSize);\n    }else{\n      u32 nSize = (u32)exprStructSize(p);\n      assert( (int)(sEdupBuf.zEnd - sEdupBuf.zAlloc) >=\n                                                   (int)EXPR_FULLSIZE+nToken );\n      memcpy(sEdupBuf.zAlloc, p, nSize);\n      if( nSize<EXPR_FULLSIZE ){\n        memset(&sEdupBuf.zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);\n      }\n      nNewSize = EXPR_FULLSIZE;\n    }\n\n    /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */\n    pNew->flags &= ~(EP_Reduced|EP_TokenOnly|EP_Static);\n    pNew->flags |= nStructSize & (EP_Reduced|EP_TokenOnly);\n    pNew->flags |= staticFlag;\n    ExprClearVVAProperties(pNew);\n    if( dupFlags ){\n      ExprSetVVAProperty(pNew, EP_Immutable);\n    }\n\n    /* Copy the p->u.zToken string, if any. */\n    assert( nToken>=0 );\n    if( nToken>0 ){\n      char *zToken = pNew->u.zToken = (char*)&sEdupBuf.zAlloc[nNewSize];\n      memcpy(zToken, p->u.zToken, nToken);\n      nNewSize += nToken;\n    }\n    sEdupBuf.zAlloc += ROUND8(nNewSize);\n\n    if( ((p->flags|pNew->flags)&(EP_TokenOnly|EP_Leaf))==0 ){\n\n      /* Fill in the pNew->x.pSelect or pNew->x.pList member. */\n      if( ExprUseXSelect(p) ){\n        pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, dupFlags);\n      }else{\n        pNew->x.pList = sqlite3ExprListDup(db, p->x.pList,\n                           p->op!=TK_ORDER ? dupFlags : 0);\n      }\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( ExprHasProperty(p, EP_WinFunc) ){\n        pNew->y.pWin = sqlite3WindowDup(db, pNew, p->y.pWin);\n        assert( ExprHasProperty(pNew, EP_WinFunc) );\n      }\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n      /* Fill in pNew->pLeft and pNew->pRight. */\n      if( dupFlags ){\n        if( p->op==TK_SELECT_COLUMN ){\n          pNew->pLeft = p->pLeft;\n          assert( p->pRight==0\n               || p->pRight==p->pLeft\n               || ExprHasProperty(p->pLeft, EP_Subquery) );\n        }else{\n          pNew->pLeft = p->pLeft ?\n                      exprDup(db, p->pLeft, EXPRDUP_REDUCE, &sEdupBuf) : 0;\n        }\n        pNew->pRight = p->pRight ?\n                       exprDup(db, p->pRight, EXPRDUP_REDUCE, &sEdupBuf) : 0;\n      }else{\n        if( p->op==TK_SELECT_COLUMN ){\n          pNew->pLeft = p->pLeft;\n          assert( p->pRight==0\n               || p->pRight==p->pLeft\n               || ExprHasProperty(p->pLeft, EP_Subquery) );\n        }else{\n          pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);\n        }\n        pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);\n      }\n    }\n  }\n  if( pEdupBuf ) memcpy(pEdupBuf, &sEdupBuf, sizeof(sEdupBuf));\n  assert( sEdupBuf.zAlloc <= sEdupBuf.zEnd );\n  return pNew;\n}\n\n/*\n** Create and return a deep copy of the object passed as the second\n** argument. If an OOM condition is encountered, NULL is returned\n** and the db->mallocFailed flag set.\n*/\n#ifndef SQLITE_OMIT_CTE\nSQLITE_PRIVATE With *sqlite3WithDup(sqlite3 *db, With *p){\n  With *pRet = 0;\n  if( p ){\n    sqlite3_int64 nByte = SZ_WITH(p->nCte);\n    pRet = sqlite3DbMallocZero(db, nByte);\n    if( pRet ){\n      int i;\n      pRet->nCte = p->nCte;\n      for(i=0; i<p->nCte; i++){\n        pRet->a[i].pSelect = sqlite3SelectDup(db, p->a[i].pSelect, 0);\n        pRet->a[i].pCols = sqlite3ExprListDup(db, p->a[i].pCols, 0);\n        pRet->a[i].zName = sqlite3DbStrDup(db, p->a[i].zName);\n        pRet->a[i].eM10d = p->a[i].eM10d;\n      }\n    }\n  }\n  return pRet;\n}\n#else\n# define sqlite3WithDup(x,y) 0\n#endif\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** The gatherSelectWindows() procedure and its helper routine\n** gatherSelectWindowsCallback() are used to scan all the expressions\n** an a newly duplicated SELECT statement and gather all of the Window\n** objects found there, assembling them onto the linked list at Select->pWin.\n*/\nstatic int gatherSelectWindowsCallback(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_FUNCTION && ExprHasProperty(pExpr, EP_WinFunc) ){\n    Select *pSelect = pWalker->u.pSelect;\n    Window *pWin = pExpr->y.pWin;\n    assert( pWin );\n    assert( IsWindowFunc(pExpr) );\n    assert( pWin->ppThis==0 );\n    sqlite3WindowLink(pSelect, pWin);\n  }\n  return WRC_Continue;\n}\nstatic int gatherSelectWindowsSelectCallback(Walker *pWalker, Select *p){\n  return p==pWalker->u.pSelect ? WRC_Continue : WRC_Prune;\n}\nstatic void gatherSelectWindows(Select *p){\n  Walker w;\n  w.xExprCallback = gatherSelectWindowsCallback;\n  w.xSelectCallback = gatherSelectWindowsSelectCallback;\n  w.xSelectCallback2 = 0;\n  w.pParse = 0;\n  w.u.pSelect = p;\n  sqlite3WalkSelect(&w, p);\n}\n#endif\n\n\n/*\n** The following group of routines make deep copies of expressions,\n** expression lists, ID lists, and select statements.  The copies can\n** be deleted (by being passed to their respective ...Delete() routines)\n** without effecting the originals.\n**\n** The expression list, ID, and source lists return by sqlite3ExprListDup(),\n** sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded\n** by subsequent calls to sqlite*ListAppend() routines.\n**\n** Any tables that the SrcList might point to are not duplicated.\n**\n** The flags parameter contains a combination of the EXPRDUP_XXX flags.\n** If the EXPRDUP_REDUCE flag is set, then the structure returned is a\n** truncated version of the usual Expr structure that will be stored as\n** part of the in-memory representation of the database schema.\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, const Expr *p, int flags){\n  assert( flags==0 || flags==EXPRDUP_REDUCE );\n  return p ? exprDup(db, p, flags, 0) : 0;\n}\nSQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, const ExprList *p, int flags){\n  ExprList *pNew;\n  struct ExprList_item *pItem;\n  const struct ExprList_item *pOldItem;\n  int i;\n  Expr *pPriorSelectColOld = 0;\n  Expr *pPriorSelectColNew = 0;\n  assert( db!=0 );\n  if( p==0 ) return 0;\n  pNew = sqlite3DbMallocRawNN(db, sqlite3DbMallocSize(db, p));\n  if( pNew==0 ) return 0;\n  pNew->nExpr = p->nExpr;\n  pNew->nAlloc = p->nAlloc;\n  pItem = pNew->a;\n  pOldItem = p->a;\n  for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){\n    Expr *pOldExpr = pOldItem->pExpr;\n    Expr *pNewExpr;\n    pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);\n    if( pOldExpr\n     && pOldExpr->op==TK_SELECT_COLUMN\n     && (pNewExpr = pItem->pExpr)!=0\n    ){\n      if( pNewExpr->pRight ){\n        pPriorSelectColOld = pOldExpr->pRight;\n        pPriorSelectColNew = pNewExpr->pRight;\n        pNewExpr->pLeft = pNewExpr->pRight;\n      }else{\n        if( pOldExpr->pLeft!=pPriorSelectColOld ){\n          pPriorSelectColOld = pOldExpr->pLeft;\n          pPriorSelectColNew = sqlite3ExprDup(db, pPriorSelectColOld, flags);\n          pNewExpr->pRight = pPriorSelectColNew;\n        }\n        pNewExpr->pLeft = pPriorSelectColNew;\n      }\n    }\n    pItem->zEName = sqlite3DbStrDup(db, pOldItem->zEName);\n    pItem->fg = pOldItem->fg;\n    pItem->u = pOldItem->u;\n  }\n  return pNew;\n}\n\n/*\n** If cursors, triggers, views and subqueries are all omitted from\n** the build, then none of the following routines, except for\n** sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes\n** called with a NULL argument.\n*/\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \\\n || !defined(SQLITE_OMIT_SUBQUERY)\nSQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, const SrcList *p, int flags){\n  SrcList *pNew;\n  int i;\n  assert( db!=0 );\n  if( p==0 ) return 0;\n  pNew = sqlite3DbMallocRawNN(db, SZ_SRCLIST(p->nSrc) );\n  if( pNew==0 ) return 0;\n  pNew->nSrc = pNew->nAlloc = p->nSrc;\n  for(i=0; i<p->nSrc; i++){\n    SrcItem *pNewItem = &pNew->a[i];\n    const SrcItem *pOldItem = &p->a[i];\n    Table *pTab;\n    pNewItem->fg = pOldItem->fg;\n    if( pOldItem->fg.isSubquery ){\n      Subquery *pNewSubq = sqlite3DbMallocRaw(db, sizeof(Subquery));\n      if( pNewSubq==0 ){\n        assert( db->mallocFailed );\n        pNewItem->fg.isSubquery = 0;\n      }else{\n        memcpy(pNewSubq, pOldItem->u4.pSubq, sizeof(*pNewSubq));\n        pNewSubq->pSelect = sqlite3SelectDup(db, pNewSubq->pSelect, flags);\n        if( pNewSubq->pSelect==0 ){\n          sqlite3DbFree(db, pNewSubq);\n          pNewSubq = 0;\n          pNewItem->fg.isSubquery = 0;\n        }\n      }\n      pNewItem->u4.pSubq = pNewSubq;\n    }else if( pOldItem->fg.fixedSchema ){\n      pNewItem->u4.pSchema = pOldItem->u4.pSchema;\n    }else{\n      pNewItem->u4.zDatabase = sqlite3DbStrDup(db, pOldItem->u4.zDatabase);\n    }\n    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);\n    pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);\n    pNewItem->iCursor = pOldItem->iCursor;\n    if( pNewItem->fg.isIndexedBy ){\n      pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy);\n    }else if( pNewItem->fg.isTabFunc ){\n      pNewItem->u1.pFuncArg =\n          sqlite3ExprListDup(db, pOldItem->u1.pFuncArg, flags);\n    }else{\n      pNewItem->u1.nRow = pOldItem->u1.nRow;\n    }\n    pNewItem->u2 = pOldItem->u2;\n    if( pNewItem->fg.isCte ){\n      pNewItem->u2.pCteUse->nUse++;\n    }\n    pTab = pNewItem->pSTab = pOldItem->pSTab;\n    if( pTab ){\n      pTab->nTabRef++;\n    }\n    if( pOldItem->fg.isUsing ){\n      assert( pNewItem->fg.isUsing );\n      pNewItem->u3.pUsing = sqlite3IdListDup(db, pOldItem->u3.pUsing);\n    }else{\n      pNewItem->u3.pOn = sqlite3ExprDup(db, pOldItem->u3.pOn, flags);\n    }\n    pNewItem->colUsed = pOldItem->colUsed;\n  }\n  return pNew;\n}\nSQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, const IdList *p){\n  IdList *pNew;\n  int i;\n  assert( db!=0 );\n  if( p==0 ) return 0;\n  pNew = sqlite3DbMallocRawNN(db, SZ_IDLIST(p->nId));\n  if( pNew==0 ) return 0;\n  pNew->nId = p->nId;\n  for(i=0; i<p->nId; i++){\n    struct IdList_item *pNewItem = &pNew->a[i];\n    const struct IdList_item *pOldItem = &p->a[i];\n    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);\n  }\n  return pNew;\n}\nSQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, const Select *pDup, int flags){\n  Select *pRet = 0;\n  Select *pNext = 0;\n  Select **pp = &pRet;\n  const Select *p;\n\n  assert( db!=0 );\n  for(p=pDup; p; p=p->pPrior){\n    Select *pNew = sqlite3DbMallocRawNN(db, sizeof(*p) );\n    if( pNew==0 ) break;\n    pNew->pEList = sqlite3ExprListDup(db, p->pEList, flags);\n    pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags);\n    pNew->pWhere = sqlite3ExprDup(db, p->pWhere, flags);\n    pNew->pGroupBy = sqlite3ExprListDup(db, p->pGroupBy, flags);\n    pNew->pHaving = sqlite3ExprDup(db, p->pHaving, flags);\n    pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, flags);\n    pNew->op = p->op;\n    pNew->pNext = pNext;\n    pNew->pPrior = 0;\n    pNew->pLimit = sqlite3ExprDup(db, p->pLimit, flags);\n    pNew->iLimit = 0;\n    pNew->iOffset = 0;\n    pNew->selFlags = p->selFlags & ~(u32)SF_UsesEphemeral;\n    pNew->addrOpenEphm[0] = -1;\n    pNew->addrOpenEphm[1] = -1;\n    pNew->nSelectRow = p->nSelectRow;\n    pNew->pWith = sqlite3WithDup(db, p->pWith);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    pNew->pWin = 0;\n    pNew->pWinDefn = sqlite3WindowListDup(db, p->pWinDefn);\n    if( p->pWin && db->mallocFailed==0 ) gatherSelectWindows(pNew);\n#endif\n    pNew->selId = p->selId;\n    if( db->mallocFailed ){\n      /* Any prior OOM might have left the Select object incomplete.\n      ** Delete the whole thing rather than allow an incomplete Select\n      ** to be used by the code generator. */\n      pNew->pNext = 0;\n      sqlite3SelectDelete(db, pNew);\n      break;\n    }\n    *pp = pNew;\n    pp = &pNew->pPrior;\n    pNext = pNew;\n  }\n  return pRet;\n}\n#else\nSQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, const Select *p, int flags){\n  assert( p==0 );\n  return 0;\n}\n#endif\n\n\n/*\n** Add a new element to the end of an expression list.  If pList is\n** initially NULL, then create a new expression list.\n**\n** The pList argument must be either NULL or a pointer to an ExprList\n** obtained from a prior call to sqlite3ExprListAppend().\n**\n** If a memory allocation error occurs, the entire list is freed and\n** NULL is returned.  If non-NULL is returned, then it is guaranteed\n** that the new entry was successfully appended.\n*/\nstatic const struct ExprList_item zeroItem = {0};\nSQLITE_PRIVATE SQLITE_NOINLINE ExprList *sqlite3ExprListAppendNew(\n  sqlite3 *db,            /* Database handle.  Used for memory allocation */\n  Expr *pExpr             /* Expression to be appended. Might be NULL */\n){\n  struct ExprList_item *pItem;\n  ExprList *pList;\n\n  pList = sqlite3DbMallocRawNN(db, SZ_EXPRLIST(4));\n  if( pList==0 ){\n    sqlite3ExprDelete(db, pExpr);\n    return 0;\n  }\n  pList->nAlloc = 4;\n  pList->nExpr = 1;\n  pItem = &pList->a[0];\n  *pItem = zeroItem;\n  pItem->pExpr = pExpr;\n  return pList;\n}\nSQLITE_PRIVATE SQLITE_NOINLINE ExprList *sqlite3ExprListAppendGrow(\n  sqlite3 *db,            /* Database handle.  Used for memory allocation */\n  ExprList *pList,        /* List to which to append. Might be NULL */\n  Expr *pExpr             /* Expression to be appended. Might be NULL */\n){\n  struct ExprList_item *pItem;\n  ExprList *pNew;\n  pList->nAlloc *= 2;\n  pNew = sqlite3DbRealloc(db, pList, SZ_EXPRLIST(pList->nAlloc));\n  if( pNew==0 ){\n    sqlite3ExprListDelete(db, pList);\n    sqlite3ExprDelete(db, pExpr);\n    return 0;\n  }else{\n    pList = pNew;\n  }\n  pItem = &pList->a[pList->nExpr++];\n  *pItem = zeroItem;\n  pItem->pExpr = pExpr;\n  return pList;\n}\nSQLITE_PRIVATE ExprList *sqlite3ExprListAppend(\n  Parse *pParse,          /* Parsing context */\n  ExprList *pList,        /* List to which to append. Might be NULL */\n  Expr *pExpr             /* Expression to be appended. Might be NULL */\n){\n  struct ExprList_item *pItem;\n  if( pList==0 ){\n    return sqlite3ExprListAppendNew(pParse->db,pExpr);\n  }\n  if( pList->nAlloc<pList->nExpr+1 ){\n    return sqlite3ExprListAppendGrow(pParse->db,pList,pExpr);\n  }\n  pItem = &pList->a[pList->nExpr++];\n  *pItem = zeroItem;\n  pItem->pExpr = pExpr;\n  return pList;\n}\n\n/*\n** pColumns and pExpr form a vector assignment which is part of the SET\n** clause of an UPDATE statement.  Like this:\n**\n**        (a,b,c) = (expr1,expr2,expr3)\n** Or:    (a,b,c) = (SELECT x,y,z FROM ....)\n**\n** For each term of the vector assignment, append new entries to the\n** expression list pList.  In the case of a subquery on the RHS, append\n** TK_SELECT_COLUMN expressions.\n*/\nSQLITE_PRIVATE ExprList *sqlite3ExprListAppendVector(\n  Parse *pParse,         /* Parsing context */\n  ExprList *pList,       /* List to which to append. Might be NULL */\n  IdList *pColumns,      /* List of names of LHS of the assignment */\n  Expr *pExpr            /* Vector expression to be appended. Might be NULL */\n){\n  sqlite3 *db = pParse->db;\n  int n;\n  int i;\n  int iFirst = pList ? pList->nExpr : 0;\n  /* pColumns can only be NULL due to an OOM but an OOM will cause an\n  ** exit prior to this routine being invoked */\n  if( NEVER(pColumns==0) ) goto vector_append_error;\n  if( pExpr==0 ) goto vector_append_error;\n\n  /* If the RHS is a vector, then we can immediately check to see that\n  ** the size of the RHS and LHS match.  But if the RHS is a SELECT,\n  ** wildcards (\"*\") in the result set of the SELECT must be expanded before\n  ** we can do the size check, so defer the size check until code generation.\n  */\n  if( pExpr->op!=TK_SELECT && pColumns->nId!=(n=sqlite3ExprVectorSize(pExpr)) ){\n    sqlite3ErrorMsg(pParse, \"%d columns assigned %d values\",\n                    pColumns->nId, n);\n    goto vector_append_error;\n  }\n\n  for(i=0; i<pColumns->nId; i++){\n    Expr *pSubExpr = sqlite3ExprForVectorField(pParse, pExpr, i, pColumns->nId);\n    assert( pSubExpr!=0 || db->mallocFailed );\n    if( pSubExpr==0 ) continue;\n    pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);\n    if( pList ){\n      assert( pList->nExpr==iFirst+i+1 );\n      pList->a[pList->nExpr-1].zEName = pColumns->a[i].zName;\n      pColumns->a[i].zName = 0;\n    }\n  }\n\n  if( !db->mallocFailed && pExpr->op==TK_SELECT && ALWAYS(pList!=0) ){\n    Expr *pFirst = pList->a[iFirst].pExpr;\n    assert( pFirst!=0 );\n    assert( pFirst->op==TK_SELECT_COLUMN );\n\n    /* Store the SELECT statement in pRight so it will be deleted when\n    ** sqlite3ExprListDelete() is called */\n    pFirst->pRight = pExpr;\n    pExpr = 0;\n\n    /* Remember the size of the LHS in iTable so that we can check that\n    ** the RHS and LHS sizes match during code generation. */\n    pFirst->iTable = pColumns->nId;\n  }\n\nvector_append_error:\n  sqlite3ExprUnmapAndDelete(pParse, pExpr);\n  sqlite3IdListDelete(db, pColumns);\n  return pList;\n}\n\n/*\n** Set the sort order for the last element on the given ExprList.\n*/\nSQLITE_PRIVATE void sqlite3ExprListSetSortOrder(ExprList *p, int iSortOrder, int eNulls){\n  struct ExprList_item *pItem;\n  if( p==0 ) return;\n  assert( p->nExpr>0 );\n\n  assert( SQLITE_SO_UNDEFINED<0 && SQLITE_SO_ASC==0 && SQLITE_SO_DESC>0 );\n  assert( iSortOrder==SQLITE_SO_UNDEFINED\n       || iSortOrder==SQLITE_SO_ASC\n       || iSortOrder==SQLITE_SO_DESC\n  );\n  assert( eNulls==SQLITE_SO_UNDEFINED\n       || eNulls==SQLITE_SO_ASC\n       || eNulls==SQLITE_SO_DESC\n  );\n\n  pItem = &p->a[p->nExpr-1];\n  assert( pItem->fg.bNulls==0 );\n  if( iSortOrder==SQLITE_SO_UNDEFINED ){\n    iSortOrder = SQLITE_SO_ASC;\n  }\n  pItem->fg.sortFlags = (u8)iSortOrder;\n\n  if( eNulls!=SQLITE_SO_UNDEFINED ){\n    pItem->fg.bNulls = 1;\n    if( iSortOrder!=eNulls ){\n      pItem->fg.sortFlags |= KEYINFO_ORDER_BIGNULL;\n    }\n  }\n}\n\n/*\n** Set the ExprList.a[].zEName element of the most recently added item\n** on the expression list.\n**\n** pList might be NULL following an OOM error.  But pName should never be\n** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag\n** is set.\n*/\nSQLITE_PRIVATE void sqlite3ExprListSetName(\n  Parse *pParse,          /* Parsing context */\n  ExprList *pList,        /* List to which to add the span. */\n  const Token *pName,     /* Name to be added */\n  int dequote             /* True to cause the name to be dequoted */\n){\n  assert( pList!=0 || pParse->db->mallocFailed!=0 );\n  assert( pParse->eParseMode!=PARSE_MODE_UNMAP || dequote==0 );\n  if( pList ){\n    struct ExprList_item *pItem;\n    assert( pList->nExpr>0 );\n    pItem = &pList->a[pList->nExpr-1];\n    assert( pItem->zEName==0 );\n    assert( pItem->fg.eEName==ENAME_NAME );\n    pItem->zEName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);\n    if( dequote ){\n      /* If dequote==0, then pName->z does not point to part of a DDL\n      ** statement handled by the parser. And so no token need be added\n      ** to the token-map.  */\n      sqlite3Dequote(pItem->zEName);\n      if( IN_RENAME_OBJECT ){\n        sqlite3RenameTokenMap(pParse, (const void*)pItem->zEName, pName);\n      }\n    }\n  }\n}\n\n/*\n** Set the ExprList.a[].zSpan element of the most recently added item\n** on the expression list.\n**\n** pList might be NULL following an OOM error.  But pSpan should never be\n** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag\n** is set.\n*/\nSQLITE_PRIVATE void sqlite3ExprListSetSpan(\n  Parse *pParse,          /* Parsing context */\n  ExprList *pList,        /* List to which to add the span. */\n  const char *zStart,     /* Start of the span */\n  const char *zEnd        /* End of the span */\n){\n  sqlite3 *db = pParse->db;\n  assert( pList!=0 || db->mallocFailed!=0 );\n  if( pList ){\n    struct ExprList_item *pItem = &pList->a[pList->nExpr-1];\n    assert( pList->nExpr>0 );\n    if( pItem->zEName==0 ){\n      pItem->zEName = sqlite3DbSpanDup(db, zStart, zEnd);\n      pItem->fg.eEName = ENAME_SPAN;\n    }\n  }\n}\n\n/*\n** If the expression list pEList contains more than iLimit elements,\n** leave an error message in pParse.\n*/\nSQLITE_PRIVATE void sqlite3ExprListCheckLength(\n  Parse *pParse,\n  ExprList *pEList,\n  const char *zObject\n){\n  int mx = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];\n  testcase( pEList && pEList->nExpr==mx );\n  testcase( pEList && pEList->nExpr==mx+1 );\n  if( pEList && pEList->nExpr>mx ){\n    sqlite3ErrorMsg(pParse, \"too many columns in %s\", zObject);\n  }\n}\n\n/*\n** Delete an entire expression list.\n*/\nstatic SQLITE_NOINLINE void exprListDeleteNN(sqlite3 *db, ExprList *pList){\n  int i = pList->nExpr;\n  struct ExprList_item *pItem =  pList->a;\n  assert( pList->nExpr>0 );\n  assert( db!=0 );\n  do{\n    sqlite3ExprDelete(db, pItem->pExpr);\n    if( pItem->zEName ) sqlite3DbNNFreeNN(db, pItem->zEName);\n    pItem++;\n  }while( --i>0 );\n  sqlite3DbNNFreeNN(db, pList);\n}\nSQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){\n  if( pList ) exprListDeleteNN(db, pList);\n}\nSQLITE_PRIVATE void sqlite3ExprListDeleteGeneric(sqlite3 *db, void *pList){\n  if( ALWAYS(pList) ) exprListDeleteNN(db, (ExprList*)pList);\n}\n\n/*\n** Return the bitwise-OR of all Expr.flags fields in the given\n** ExprList.\n*/\nSQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){\n  int i;\n  u32 m = 0;\n  assert( pList!=0 );\n  for(i=0; i<pList->nExpr; i++){\n     Expr *pExpr = pList->a[i].pExpr;\n     assert( pExpr!=0 );\n     m |= pExpr->flags;\n  }\n  return m;\n}\n\n/*\n** This is a SELECT-node callback for the expression walker that\n** always \"fails\".  By \"fail\" in this case, we mean set\n** pWalker->eCode to zero and abort.\n**\n** This callback is used by multiple expression walkers.\n*/\nSQLITE_PRIVATE int sqlite3SelectWalkFail(Walker *pWalker, Select *NotUsed){\n  UNUSED_PARAMETER(NotUsed);\n  pWalker->eCode = 0;\n  return WRC_Abort;\n}\n\n/*\n** Check the input string to see if it is \"true\" or \"false\" (in any case).\n**\n**       If the string is....           Return\n**         \"true\"                         EP_IsTrue\n**         \"false\"                        EP_IsFalse\n**         anything else                  0\n*/\nSQLITE_PRIVATE u32 sqlite3IsTrueOrFalse(const char *zIn){\n  if( sqlite3StrICmp(zIn, \"true\")==0  ) return EP_IsTrue;\n  if( sqlite3StrICmp(zIn, \"false\")==0 ) return EP_IsFalse;\n  return 0;\n}\n\n\n/*\n** If the input expression is an ID with the name \"true\" or \"false\"\n** then convert it into an TK_TRUEFALSE term.  Return non-zero if\n** the conversion happened, and zero if the expression is unaltered.\n*/\nSQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr *pExpr){\n  u32 v;\n  assert( pExpr->op==TK_ID || pExpr->op==TK_STRING );\n  if( !ExprHasProperty(pExpr, EP_Quoted|EP_IntValue)\n   && (v = sqlite3IsTrueOrFalse(pExpr->u.zToken))!=0\n  ){\n    pExpr->op = TK_TRUEFALSE;\n    ExprSetProperty(pExpr, v);\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** The argument must be a TK_TRUEFALSE Expr node.  Return 1 if it is TRUE\n** and 0 if it is FALSE.\n*/\nSQLITE_PRIVATE int sqlite3ExprTruthValue(const Expr *pExpr){\n  pExpr = sqlite3ExprSkipCollateAndLikely((Expr*)pExpr);\n  assert( pExpr->op==TK_TRUEFALSE );\n  assert( !ExprHasProperty(pExpr, EP_IntValue) );\n  assert( sqlite3StrICmp(pExpr->u.zToken,\"true\")==0\n       || sqlite3StrICmp(pExpr->u.zToken,\"false\")==0 );\n  return pExpr->u.zToken[4]==0;\n}\n\n/*\n** If pExpr is an AND or OR expression, try to simplify it by eliminating\n** terms that are always true or false.  Return the simplified expression.\n** Or return the original expression if no simplification is possible.\n**\n** Examples:\n**\n**     (x<10) AND true                =>   (x<10)\n**     (x<10) AND false               =>   false\n**     (x<10) AND (y=22 OR false)     =>   (x<10) AND (y=22)\n**     (x<10) AND (y=22 OR true)      =>   (x<10)\n**     (y=22) OR true                 =>   true\n*/\nSQLITE_PRIVATE Expr *sqlite3ExprSimplifiedAndOr(Expr *pExpr){\n  assert( pExpr!=0 );\n  if( pExpr->op==TK_AND || pExpr->op==TK_OR ){\n    Expr *pRight = sqlite3ExprSimplifiedAndOr(pExpr->pRight);\n    Expr *pLeft = sqlite3ExprSimplifiedAndOr(pExpr->pLeft);\n    if( ExprAlwaysTrue(pLeft) || ExprAlwaysFalse(pRight) ){\n      pExpr = pExpr->op==TK_AND ? pRight : pLeft;\n    }else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){\n      pExpr = pExpr->op==TK_AND ? pLeft : pRight;\n    }\n  }\n  return pExpr;\n}\n\n/*\n** Return true if it might be advantageous to compute the right operand\n** of expression pExpr first, before the left operand.\n**\n** Normally the left operand is computed before the right operand.  But if\n** the left operand contains a subquery and the right does not, then it\n** might be more efficient to compute the right operand first.\n*/\nstatic int exprEvalRhsFirst(Expr *pExpr){\n  if( ExprHasProperty(pExpr->pLeft, EP_Subquery)\n   && !ExprHasProperty(pExpr->pRight, EP_Subquery)\n  ){\n    return 1;\n  }else{\n    return 0;\n  }\n}\n\n/*\n** Compute the two operands of a binary operator.\n**\n** If either operand contains a subquery, then the code strives to\n** compute the operand containing the subquery second.  If the other\n** operand evalutes to NULL, then a jump is made.  The address of the\n** IsNull operand that does this jump is returned.  The caller can use\n** this to optimize the computation so as to avoid doing the potentially\n** expensive subquery.\n**\n** If no optimization opportunities exist, return 0.\n*/\nstatic int exprComputeOperands(\n  Parse *pParse,     /* Parsing context */\n  Expr *pExpr,       /* The comparison expression */\n  int *pR1,          /* OUT: Register holding the left operand */\n  int *pR2,          /* OUT: Register holding the right operand */\n  int *pFree1,       /* OUT: Temp register to free if not zero */\n  int *pFree2        /* OUT: Another temp register to free if not zero */\n){\n  int addrIsNull;\n  int r1, r2;\n  Vdbe *v = pParse->pVdbe;\n\n  assert( v!=0 );\n  /*\n  ** If the left operand contains a (possibly expensive) subquery and the\n  ** right operand does not and the right operation might be NULL,\n  ** then compute the right operand first and do an IsNull jump if the\n  ** right operand evalutes to NULL.\n  */\n  if( exprEvalRhsFirst(pExpr) && sqlite3ExprCanBeNull(pExpr->pRight) ){\n    r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, pFree2);\n    addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, r2);\n    VdbeComment((v, \"skip left operand\"));\n    VdbeCoverage(v);\n  }else{\n    r2 = 0; /* Silence a false-positive uninit-var warning in MSVC */\n    addrIsNull = 0;\n  }\n  r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, pFree1);\n  if( addrIsNull==0 ){\n    /*\n    ** If the right operand contains a subquery and the left operand does not\n    ** and the left operand might be NULL, then do an IsNull check\n    ** check on the left operand before computing the right operand.\n    */\n    if( ExprHasProperty(pExpr->pRight, EP_Subquery)\n     && sqlite3ExprCanBeNull(pExpr->pLeft)\n    ){\n      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, r1);\n      VdbeComment((v, \"skip right operand\"));\n      VdbeCoverage(v);\n    }\n    r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, pFree2);\n  }\n  *pR1 = r1;\n  *pR2 = r2;\n  return addrIsNull;\n}\n\n/*\n** pExpr is a TK_FUNCTION node.  Try to determine whether or not the\n** function is a constant function.  A function is constant if all of\n** the following are true:\n**\n**    (1)  It is a scalar function (not an aggregate or window function)\n**    (2)  It has either the SQLITE_FUNC_CONSTANT or SQLITE_FUNC_SLOCHNG\n**         property.\n**    (3)  All of its arguments are constants\n**\n** This routine sets pWalker->eCode to 0 if pExpr is not a constant.\n** It makes no changes to pWalker->eCode if pExpr is constant.  In\n** every case, it returns WRC_Abort.\n**\n** Called as a service subroutine from exprNodeIsConstant().\n*/\nstatic SQLITE_NOINLINE int exprNodeIsConstantFunction(\n  Walker *pWalker,\n  Expr *pExpr\n){\n  int n;             /* Number of arguments */\n  ExprList *pList;   /* List of arguments */\n  FuncDef *pDef;     /* The function */\n  sqlite3 *db;       /* The database */\n\n  assert( pExpr->op==TK_FUNCTION );\n  if( ExprHasProperty(pExpr, EP_TokenOnly)\n   || (pList = pExpr->x.pList)==0\n  ){;\n    n = 0;\n  }else{\n    n = pList->nExpr;\n    sqlite3WalkExprList(pWalker, pList);\n    if( pWalker->eCode==0 ) return WRC_Abort;\n  }\n  db = pWalker->pParse->db;\n  pDef = sqlite3FindFunction(db, pExpr->u.zToken, n, ENC(db), 0);\n  if( pDef==0\n   || pDef->xFinalize!=0\n   || (pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0\n   || ExprHasProperty(pExpr, EP_WinFunc)\n  ){\n    pWalker->eCode = 0;\n    return WRC_Abort;\n  }\n  return WRC_Prune;\n}\n\n\n/*\n** These routines are Walker callbacks used to check expressions to\n** see if they are \"constant\" for some definition of constant.  The\n** Walker.eCode value determines the type of \"constant\" we are looking\n** for.\n**\n** These callback routines are used to implement the following:\n**\n**     sqlite3ExprIsConstant()                  pWalker->eCode==1\n**     sqlite3ExprIsConstantNotJoin()           pWalker->eCode==2\n**     sqlite3ExprIsTableConstant()             pWalker->eCode==3\n**     sqlite3ExprIsConstantOrFunction()        pWalker->eCode==4 or 5\n**\n** In all cases, the callbacks set Walker.eCode=0 and abort if the expression\n** is found to not be a constant.\n**\n** The sqlite3ExprIsConstantOrFunction() is used for evaluating DEFAULT\n** expressions in a CREATE TABLE statement.  The Walker.eCode value is 5\n** when parsing an existing schema out of the sqlite_schema table and 4\n** when processing a new CREATE TABLE statement.  A bound parameter raises\n** an error for new statements, but is silently converted\n** to NULL for existing schemas.  This allows sqlite_schema tables that\n** contain a bound parameter because they were generated by older versions\n** of SQLite to be parsed by newer versions of SQLite without raising a\n** malformed schema error.\n*/\nstatic int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){\n  assert( pWalker->eCode>0 );\n\n  /* If pWalker->eCode is 2 then any term of the expression that comes from\n  ** the ON or USING clauses of an outer join disqualifies the expression\n  ** from being considered constant. */\n  if( pWalker->eCode==2 && ExprHasProperty(pExpr, EP_OuterON) ){\n    pWalker->eCode = 0;\n    return WRC_Abort;\n  }\n\n  switch( pExpr->op ){\n    /* Consider functions to be constant if all their arguments are constant\n    ** and either pWalker->eCode==4 or 5 or the function has the\n    ** SQLITE_FUNC_CONST flag. */\n    case TK_FUNCTION:\n      if( (pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc))\n       && !ExprHasProperty(pExpr, EP_WinFunc)\n      ){\n        if( pWalker->eCode==5 ) ExprSetProperty(pExpr, EP_FromDDL);\n        return WRC_Continue;\n      }else if( pWalker->pParse ){\n        return exprNodeIsConstantFunction(pWalker, pExpr);\n      }else{\n        pWalker->eCode = 0;\n        return WRC_Abort;\n      }\n    case TK_ID:\n      /* Convert \"true\" or \"false\" in a DEFAULT clause into the\n      ** appropriate TK_TRUEFALSE operator */\n      if( sqlite3ExprIdToTrueFalse(pExpr) ){\n        return WRC_Prune;\n      }\n      /* no break */ deliberate_fall_through\n    case TK_COLUMN:\n    case TK_AGG_FUNCTION:\n    case TK_AGG_COLUMN:\n      testcase( pExpr->op==TK_ID );\n      testcase( pExpr->op==TK_COLUMN );\n      testcase( pExpr->op==TK_AGG_FUNCTION );\n      testcase( pExpr->op==TK_AGG_COLUMN );\n      if( ExprHasProperty(pExpr, EP_FixedCol) && pWalker->eCode!=2 ){\n        return WRC_Continue;\n      }\n      if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){\n        return WRC_Continue;\n      }\n      /* no break */ deliberate_fall_through\n    case TK_IF_NULL_ROW:\n    case TK_REGISTER:\n    case TK_DOT:\n    case TK_RAISE:\n      testcase( pExpr->op==TK_REGISTER );\n      testcase( pExpr->op==TK_IF_NULL_ROW );\n      testcase( pExpr->op==TK_DOT );\n      testcase( pExpr->op==TK_RAISE );\n      pWalker->eCode = 0;\n      return WRC_Abort;\n    case TK_VARIABLE:\n      if( pWalker->eCode==5 ){\n        /* Silently convert bound parameters that appear inside of CREATE\n        ** statements into a NULL when parsing the CREATE statement text out\n        ** of the sqlite_schema table */\n        pExpr->op = TK_NULL;\n      }else if( pWalker->eCode==4 ){\n        /* A bound parameter in a CREATE statement that originates from\n        ** sqlite3_prepare() causes an error */\n        pWalker->eCode = 0;\n        return WRC_Abort;\n      }\n      /* no break */ deliberate_fall_through\n    default:\n      testcase( pExpr->op==TK_SELECT ); /* sqlite3SelectWalkFail() disallows */\n      testcase( pExpr->op==TK_EXISTS ); /* sqlite3SelectWalkFail() disallows */\n      return WRC_Continue;\n  }\n}\nstatic int exprIsConst(Parse *pParse, Expr *p, int initFlag){\n  Walker w;\n  w.eCode = initFlag;\n  w.pParse = pParse;\n  w.xExprCallback = exprNodeIsConstant;\n  w.xSelectCallback = sqlite3SelectWalkFail;\n#ifdef SQLITE_DEBUG\n  w.xSelectCallback2 = sqlite3SelectWalkAssert2;\n#endif\n  sqlite3WalkExpr(&w, p);\n  return w.eCode;\n}\n\n/*\n** Walk an expression tree.  Return non-zero if the expression is constant\n** and 0 if it involves variables or function calls.\n**\n** For the purposes of this function, a double-quoted string (ex: \"abc\")\n** is considered a variable but a single-quoted string (ex: 'abc') is\n** a constant.\n**\n** The pParse parameter may be NULL.  But if it is NULL, there is no way\n** to determine if function calls are constant or not, and hence all\n** function calls will be considered to be non-constant.  If pParse is\n** not NULL, then a function call might be constant, depending on the\n** function and on its parameters.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsConstant(Parse *pParse, Expr *p){\n  return exprIsConst(pParse, p, 1);\n}\n\n/*\n** Walk an expression tree.  Return non-zero if\n**\n**   (1) the expression is constant, and\n**   (2) the expression does originate in the ON or USING clause\n**       of a LEFT JOIN, and\n**   (3) the expression does not contain any EP_FixedCol TK_COLUMN\n**       operands created by the constant propagation optimization.\n**\n** When this routine returns true, it indicates that the expression\n** can be added to the pParse->pConstExpr list and evaluated once when\n** the prepared statement starts up.  See sqlite3ExprCodeRunJustOnce().\n*/\nstatic int sqlite3ExprIsConstantNotJoin(Parse *pParse, Expr *p){\n  return exprIsConst(pParse, p, 2);\n}\n\n/*\n** This routine examines sub-SELECT statements as an expression is being\n** walked as part of sqlite3ExprIsTableConstant().  Sub-SELECTs are considered\n** constant as long as they are uncorrelated - meaning that they do not\n** contain any terms from outer contexts.\n*/\nstatic int exprSelectWalkTableConstant(Walker *pWalker, Select *pSelect){\n  assert( pSelect!=0 );\n  assert( pWalker->eCode==3 || pWalker->eCode==0 );\n  if( (pSelect->selFlags & SF_Correlated)!=0 ){\n    pWalker->eCode = 0;\n    return WRC_Abort;\n  }\n  return WRC_Prune;\n}\n\n/*\n** Walk an expression tree.  Return non-zero if the expression is constant\n** for any single row of the table with cursor iCur.  In other words, the\n** expression must not refer to any non-deterministic function nor any\n** table other than iCur.\n**\n** Consider uncorrelated subqueries to be constants if the bAllowSubq\n** parameter is true.\n*/\nstatic int sqlite3ExprIsTableConstant(Expr *p, int iCur, int bAllowSubq){\n  Walker w;\n  w.eCode = 3;\n  w.pParse = 0;\n  w.xExprCallback = exprNodeIsConstant;\n  if( bAllowSubq ){\n    w.xSelectCallback = exprSelectWalkTableConstant;\n  }else{\n    w.xSelectCallback = sqlite3SelectWalkFail;\n#ifdef SQLITE_DEBUG\n    w.xSelectCallback2 = sqlite3SelectWalkAssert2;\n#endif\n  }\n  w.u.iCur = iCur;\n  sqlite3WalkExpr(&w, p);\n  return w.eCode;\n}\n\n/*\n** Check pExpr to see if it is an constraint on the single data source\n** pSrc = &pSrcList->a[iSrc].  In other words, check to see if pExpr\n** constrains pSrc but does not depend on any other tables or data\n** sources anywhere else in the query.  Return true (non-zero) if pExpr\n** is a constraint on pSrc only.\n**\n** This is an optimization.  False negatives will perhaps cause slower\n** queries, but false positives will yield incorrect answers.  So when in\n** doubt, return 0.\n**\n** To be an single-source constraint, the following must be true:\n**\n**   (1)  pExpr cannot refer to any table other than pSrc->iCursor.\n**\n**   (2a) pExpr cannot use subqueries unless the bAllowSubq parameter is\n**        true and the subquery is non-correlated\n**\n**   (2b) pExpr cannot use non-deterministic functions.\n**\n**   (3)  pSrc cannot be part of the left operand for a RIGHT JOIN.\n**        (Is there some way to relax this constraint?)\n**\n**   (4)  If pSrc is the right operand of a LEFT JOIN, then...\n**         (4a)  pExpr must come from an ON clause..\n**         (4b)  and specifically the ON clause associated with the LEFT JOIN.\n**\n**   (5)  If pSrc is the right operand of a LEFT JOIN or the left\n**        operand of a RIGHT JOIN, then pExpr must be from the WHERE\n**        clause, not an ON clause.\n**\n**   (6) Either:\n**\n**       (6a) pExpr does not originate in an ON or USING clause, or\n**\n**       (6b) The ON or USING clause from which pExpr is derived is\n**            not to the left of a RIGHT JOIN (or FULL JOIN).\n**\n**       Without this restriction, accepting pExpr as a single-table\n**       constraint might move the the ON/USING filter expression\n**       from the left side of a RIGHT JOIN over to the right side,\n**       which leads to incorrect answers.  See also restriction (9)\n**       on push-down.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(\n  Expr *pExpr,                 /* The constraint */\n  const SrcList *pSrcList,     /* Complete FROM clause */\n  int iSrc,                    /* Which element of pSrcList to use */\n  int bAllowSubq               /* Allow non-correlated subqueries */\n){\n  const SrcItem *pSrc = &pSrcList->a[iSrc];\n  if( pSrc->fg.jointype & JT_LTORJ ){\n    return 0;  /* rule (3) */\n  }\n  if( pSrc->fg.jointype & JT_LEFT ){\n    if( !ExprHasProperty(pExpr, EP_OuterON) ) return 0;   /* rule (4a) */\n    if( pExpr->w.iJoin!=pSrc->iCursor ) return 0;         /* rule (4b) */\n  }else{\n    if( ExprHasProperty(pExpr, EP_OuterON) ) return 0;    /* rule (5) */\n  }\n  if( ExprHasProperty(pExpr, EP_OuterON|EP_InnerON)  /* (6a) */\n   && (pSrcList->a[0].fg.jointype & JT_LTORJ)!=0     /* Fast pre-test of (6b) */\n  ){\n    int jj;\n    for(jj=0; jj<iSrc; jj++){\n      if( pExpr->w.iJoin==pSrcList->a[jj].iCursor ){\n        if( (pSrcList->a[jj].fg.jointype & JT_LTORJ)!=0 ){\n          return 0;  /* restriction (6) */\n        }\n        break;\n      }\n    }\n  }\n  /* Rules (1), (2a), and (2b) handled by the following: */\n  return sqlite3ExprIsTableConstant(pExpr, pSrc->iCursor, bAllowSubq);\n}\n\n\n/*\n** sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy().\n*/\nstatic int exprNodeIsConstantOrGroupBy(Walker *pWalker, Expr *pExpr){\n  ExprList *pGroupBy = pWalker->u.pGroupBy;\n  int i;\n\n  /* Check if pExpr is identical to any GROUP BY term. If so, consider\n  ** it constant.  */\n  for(i=0; i<pGroupBy->nExpr; i++){\n    Expr *p = pGroupBy->a[i].pExpr;\n    if( sqlite3ExprCompare(0, pExpr, p, -1)<2 ){\n      CollSeq *pColl = sqlite3ExprNNCollSeq(pWalker->pParse, p);\n      if( sqlite3IsBinary(pColl) ){\n        return WRC_Prune;\n      }\n    }\n  }\n\n  /* Check if pExpr is a sub-select. If so, consider it variable. */\n  if( ExprUseXSelect(pExpr) ){\n    pWalker->eCode = 0;\n    return WRC_Abort;\n  }\n\n  return exprNodeIsConstant(pWalker, pExpr);\n}\n\n/*\n** Walk the expression tree passed as the first argument. Return non-zero\n** if the expression consists entirely of constants or copies of terms\n** in pGroupBy that sort with the BINARY collation sequence.\n**\n** This routine is used to determine if a term of the HAVING clause can\n** be promoted into the WHERE clause.  In order for such a promotion to work,\n** the value of the HAVING clause term must be the same for all members of\n** a \"group\".  The requirement that the GROUP BY term must be BINARY\n** assumes that no other collating sequence will have a finer-grained\n** grouping than binary.  In other words (A=B COLLATE binary) implies\n** A=B in every other collating sequence.  The requirement that the\n** GROUP BY be BINARY is stricter than necessary.  It would also work\n** to promote HAVING clauses that use the same alternative collating\n** sequence as the GROUP BY term, but that is much harder to check,\n** alternative collating sequences are uncommon, and this is only an\n** optimization, so we take the easy way out and simply require the\n** GROUP BY to use the BINARY collating sequence.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse *pParse, Expr *p, ExprList *pGroupBy){\n  Walker w;\n  w.eCode = 1;\n  w.xExprCallback = exprNodeIsConstantOrGroupBy;\n  w.xSelectCallback = 0;\n  w.u.pGroupBy = pGroupBy;\n  w.pParse = pParse;\n  sqlite3WalkExpr(&w, p);\n  return w.eCode;\n}\n\n/*\n** Walk an expression tree for the DEFAULT field of a column definition\n** in a CREATE TABLE statement.  Return non-zero if the expression is\n** acceptable for use as a DEFAULT.  That is to say, return non-zero if\n** the expression is constant or a function call with constant arguments.\n** Return and 0 if there are any variables.\n**\n** isInit is true when parsing from sqlite_schema.  isInit is false when\n** processing a new CREATE TABLE statement.  When isInit is true, parameters\n** (such as ? or $abc) in the expression are converted into NULL.  When\n** isInit is false, parameters raise an error.  Parameters should not be\n** allowed in a CREATE TABLE statement, but some legacy versions of SQLite\n** allowed it, so we need to support it when reading sqlite_schema for\n** backwards compatibility.\n**\n** If isInit is true, set EP_FromDDL on every TK_FUNCTION node.\n**\n** For the purposes of this function, a double-quoted string (ex: \"abc\")\n** is considered a variable but a single-quoted string (ex: 'abc') is\n** a constant.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p, u8 isInit){\n  assert( isInit==0 || isInit==1 );\n  return exprIsConst(0, p, 4+isInit);\n}\n\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n/*\n** Walk an expression tree.  Return 1 if the expression contains a\n** subquery of some kind.  Return 0 if there are no subqueries.\n*/\nSQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr *p){\n  Walker w;\n  w.eCode = 1;\n  w.xExprCallback = sqlite3ExprWalkNoop;\n  w.xSelectCallback = sqlite3SelectWalkFail;\n#ifdef SQLITE_DEBUG\n  w.xSelectCallback2 = sqlite3SelectWalkAssert2;\n#endif\n  sqlite3WalkExpr(&w, p);\n  return w.eCode==0;\n}\n#endif\n\n/*\n** If the expression p codes a constant integer that is small enough\n** to fit in a 32-bit integer, return 1 and put the value of the integer\n** in *pValue.  If the expression is not an integer or if it is too big\n** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.\n**\n** If the pParse pointer is provided, then allow the expression p to be\n** a parameter (TK_VARIABLE) that is bound to an integer.\n** But if pParse is NULL, then p must be a pure integer literal.\n*/\nSQLITE_PRIVATE int sqlite3ExprIsInteger(const Expr *p, int *pValue, Parse *pParse){\n  int rc = 0;\n  if( NEVER(p==0) ) return 0;  /* Used to only happen following on OOM */\n\n  /* If an expression is an integer literal that fits in a signed 32-bit\n  ** integer, then the EP_IntValue flag will have already been set */\n  assert( p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0\n           || sqlite3GetInt32(p->u.zToken, &rc)==0 );\n\n  if( p->flags & EP_IntValue ){\n    *pValue = p->u.iValue;\n    return 1;\n  }\n  switch( p->op ){\n    case TK_UPLUS: {\n      rc = sqlite3ExprIsInteger(p->pLeft, pValue, 0);\n      break;\n    }\n    case TK_UMINUS: {\n      int v = 0;\n      if( sqlite3ExprIsInteger(p->pLeft, &v, 0) ){\n        assert( ((unsigned int)v)!=0x80000000 );\n        *pValue = -v;\n        rc = 1;\n      }\n      break;\n    }\n    case TK_VARIABLE: {\n      sqlite3_value *pVal;\n      if( pParse==0 ) break;\n      if( NEVER(pParse->pVdbe==0) ) break;\n      if( (pParse->db->flags & SQLITE_EnableQPSG)!=0 ) break;\n      sqlite3VdbeSetVarmask(pParse->pVdbe, p->iColumn);\n      pVal = sqlite3VdbeGetBoundValue(pParse->pReprepare, p->iColumn,\n                                      SQLITE_AFF_BLOB);\n      if( pVal ){\n        if( sqlite3_value_type(pVal)==SQLITE_INTEGER ){\n          sqlite3_int64 vv = sqlite3_value_int64(pVal);\n          if( vv == (vv & 0x7fffffff) ){ /* non-negative numbers only */\n            *pValue = (int)vv;\n            rc = 1;\n          }\n        }\n        sqlite3ValueFree(pVal);\n      }\n      break;\n    }\n    default: break;\n  }\n  return rc;\n}\n\n/*\n** Return FALSE if there is no chance that the expression can be NULL.\n**\n** If the expression might be NULL or if the expression is too complex\n** to tell return TRUE.\n**\n** This routine is used as an optimization, to skip OP_IsNull opcodes\n** when we know that a value cannot be NULL.  Hence, a false positive\n** (returning TRUE when in fact the expression can never be NULL) might\n** be a small performance hit but is otherwise harmless.  On the other\n** hand, a false negative (returning FALSE when the result could be NULL)\n** will likely result in an incorrect answer.  So when in doubt, return\n** TRUE.\n*/\nSQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){\n  u8 op;\n  assert( p!=0 );\n  while( p->op==TK_UPLUS || p->op==TK_UMINUS ){\n    p = p->pLeft;\n    assert( p!=0 );\n  }\n  op = p->op;\n  if( op==TK_REGISTER ) op = p->op2;\n  switch( op ){\n    case TK_INTEGER:\n    case TK_STRING:\n    case TK_FLOAT:\n    case TK_BLOB:\n      return 0;\n    case TK_COLUMN:\n      assert( ExprUseYTab(p) );\n      return ExprHasProperty(p, EP_CanBeNull)\n          || NEVER(p->y.pTab==0) /* Reference to column of index on expr */\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n          || (p->iColumn==XN_ROWID && IsView(p->y.pTab))\n#endif\n          || (p->iColumn>=0\n              && p->y.pTab->aCol!=0 /* Possible due to prior error */\n              && ALWAYS(p->iColumn<p->y.pTab->nCol)\n              && p->y.pTab->aCol[p->iColumn].notNull==0);\n    default:\n      return 1;\n  }\n}\n\n/*\n** Return TRUE if the given expression is a constant which would be\n** unchanged by OP_Affinity with the affinity given in the second\n** argument.\n**\n** This routine is used to determine if the OP_Affinity operation\n** can be omitted.  When in doubt return FALSE.  A false negative\n** is harmless.  A false positive, however, can result in the wrong\n** answer.\n*/\nSQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){\n  u8 op;\n  int unaryMinus = 0;\n  if( aff==SQLITE_AFF_BLOB ) return 1;\n  while( p->op==TK_UPLUS || p->op==TK_UMINUS ){\n    if( p->op==TK_UMINUS ) unaryMinus = 1;\n    p = p->pLeft;\n  }\n  op = p->op;\n  if( op==TK_REGISTER ) op = p->op2;\n  switch( op ){\n    case TK_INTEGER: {\n      return aff>=SQLITE_AFF_NUMERIC;\n    }\n    case TK_FLOAT: {\n      return aff>=SQLITE_AFF_NUMERIC;\n    }\n    case TK_STRING: {\n      return !unaryMinus && aff==SQLITE_AFF_TEXT;\n    }\n    case TK_BLOB: {\n      return !unaryMinus;\n    }\n    case TK_COLUMN: {\n      assert( p->iTable>=0 );  /* p cannot be part of a CHECK constraint */\n      return aff>=SQLITE_AFF_NUMERIC && p->iColumn<0;\n    }\n    default: {\n      return 0;\n    }\n  }\n}\n\n/*\n** Return TRUE if the given string is a row-id column name.\n*/\nSQLITE_PRIVATE int sqlite3IsRowid(const char *z){\n  if( sqlite3StrICmp(z, \"_ROWID_\")==0 ) return 1;\n  if( sqlite3StrICmp(z, \"ROWID\")==0 ) return 1;\n  if( sqlite3StrICmp(z, \"OID\")==0 ) return 1;\n  return 0;\n}\n\n/*\n** Return a pointer to a buffer containing a usable rowid alias for table\n** pTab. An alias is usable if there is not an explicit user-defined column\n** of the same name.\n*/\nSQLITE_PRIVATE const char *sqlite3RowidAlias(Table *pTab){\n  const char *azOpt[] = {\"_ROWID_\", \"ROWID\", \"OID\"};\n  int ii;\n  assert( VisibleRowid(pTab) );\n  for(ii=0; ii<ArraySize(azOpt); ii++){\n    if( sqlite3ColumnIndex(pTab, azOpt[ii])<0 ) return azOpt[ii];\n  }\n  return 0;\n}\n\n/*\n** pX is the RHS of an IN operator.  If pX is a SELECT statement\n** that can be simplified to a direct table access, then return\n** a pointer to the SELECT statement.  If pX is not a SELECT statement,\n** or if the SELECT statement needs to be materialized into a transient\n** table, then return NULL.\n*/\n#ifndef SQLITE_OMIT_SUBQUERY\nstatic Select *isCandidateForInOpt(const Expr *pX){\n  Select *p;\n  SrcList *pSrc;\n  ExprList *pEList;\n  Table *pTab;\n  int i;\n  if( !ExprUseXSelect(pX) ) return 0;                 /* Not a subquery */\n  if( ExprHasProperty(pX, EP_VarSelect)  ) return 0;  /* Correlated subq */\n  p = pX->x.pSelect;\n  if( p->pPrior ) return 0;              /* Not a compound SELECT */\n  if( p->selFlags & (SF_Distinct|SF_Aggregate) ){\n    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );\n    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );\n    return 0; /* No DISTINCT keyword and no aggregate functions */\n  }\n  assert( p->pGroupBy==0 );              /* Has no GROUP BY clause */\n  if( p->pLimit ) return 0;              /* Has no LIMIT clause */\n  if( p->pWhere ) return 0;              /* Has no WHERE clause */\n  pSrc = p->pSrc;\n  assert( pSrc!=0 );\n  if( pSrc->nSrc!=1 ) return 0;          /* Single term in FROM clause */\n  if( pSrc->a[0].fg.isSubquery) return 0;/* FROM is not a subquery or view */\n  pTab = pSrc->a[0].pSTab;\n  assert( pTab!=0 );\n  assert( !IsView(pTab)  );              /* FROM clause is not a view */\n  if( IsVirtual(pTab) ) return 0;        /* FROM clause not a virtual table */\n  pEList = p->pEList;\n  assert( pEList!=0 );\n  /* All SELECT results must be columns. */\n  for(i=0; i<pEList->nExpr; i++){\n    Expr *pRes = pEList->a[i].pExpr;\n    if( pRes->op!=TK_COLUMN ) return 0;\n    assert( pRes->iTable==pSrc->a[0].iCursor );  /* Not a correlated subquery */\n  }\n  return p;\n}\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Generate code that checks the left-most column of index table iCur to see if\n** it contains any NULL entries.  Cause the register at regHasNull to be set\n** to a non-NULL value if iCur contains no NULLs.  Cause register regHasNull\n** to be set to NULL if iCur contains one or more NULL values.\n*/\nstatic void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){\n  int addr1;\n  sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);\n  addr1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);\n  sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);\n  sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);\n  VdbeComment((v, \"first_entry_in(%d)\", iCur));\n  sqlite3VdbeJumpHere(v, addr1);\n}\n#endif\n\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** The argument is an IN operator with a list (not a subquery) on the\n** right-hand side.  Return TRUE if that list is constant.\n*/\nstatic int sqlite3InRhsIsConstant(Parse *pParse, Expr *pIn){\n  Expr *pLHS;\n  int res;\n  assert( !ExprHasProperty(pIn, EP_xIsSelect) );\n  pLHS = pIn->pLeft;\n  pIn->pLeft = 0;\n  res = sqlite3ExprIsConstant(pParse, pIn);\n  pIn->pLeft = pLHS;\n  return res;\n}\n#endif\n\n/*\n** This function is used by the implementation of the IN (...) operator.\n** The pX parameter is the expression on the RHS of the IN operator, which\n** might be either a list of expressions or a subquery.\n**\n** The job of this routine is to find or create a b-tree object that can\n** be used either to test for membership in the RHS set or to iterate through\n** all members of the RHS set, skipping duplicates.\n**\n** A cursor is opened on the b-tree object that is the RHS of the IN operator\n** and the *piTab parameter is set to the index of that cursor.\n**\n** The returned value of this function indicates the b-tree type, as follows:\n**\n**   IN_INDEX_ROWID      - The cursor was opened on a database table.\n**   IN_INDEX_INDEX_ASC  - The cursor was opened on an ascending index.\n**   IN_INDEX_INDEX_DESC - The cursor was opened on a descending index.\n**   IN_INDEX_EPH        - The cursor was opened on a specially created and\n**                         populated ephemeral table.\n**   IN_INDEX_NOOP       - No cursor was allocated.  The IN operator must be\n**                         implemented as a sequence of comparisons.\n**\n** An existing b-tree might be used if the RHS expression pX is a simple\n** subquery such as:\n**\n**     SELECT <column1>, <column2>... FROM <table>\n**\n** If the RHS of the IN operator is a list or a more complex subquery, then\n** an ephemeral table might need to be generated from the RHS and then\n** pX->iTable made to point to the ephemeral table instead of an\n** existing table.  In this case, the creation and initialization of the\n** ephemeral table might be put inside of a subroutine, the EP_Subrtn flag\n** will be set on pX and the pX->y.sub fields will be set to show where\n** the subroutine is coded.\n**\n** The inFlags parameter must contain, at a minimum, one of the bits\n** IN_INDEX_MEMBERSHIP or IN_INDEX_LOOP but not both.  If inFlags contains\n** IN_INDEX_MEMBERSHIP, then the generated table will be used for a fast\n** membership test.  When the IN_INDEX_LOOP bit is set, the IN index will\n** be used to loop over all values of the RHS of the IN operator.\n**\n** When IN_INDEX_LOOP is used (and the b-tree will be used to iterate\n** through the set members) then the b-tree must not contain duplicates.\n** An ephemeral table will be created unless the selected columns are guaranteed\n** to be unique - either because it is an INTEGER PRIMARY KEY or due to\n** a UNIQUE constraint or index.\n**\n** When IN_INDEX_MEMBERSHIP is used (and the b-tree will be used\n** for fast set membership tests) then an ephemeral table must\n** be used unless <columns> is a single INTEGER PRIMARY KEY column or an\n** index can be found with the specified <columns> as its left-most.\n**\n** If the IN_INDEX_NOOP_OK and IN_INDEX_MEMBERSHIP are both set and\n** if the RHS of the IN operator is a list (not a subquery) then this\n** routine might decide that creating an ephemeral b-tree for membership\n** testing is too expensive and return IN_INDEX_NOOP.  In that case, the\n** calling routine should implement the IN operator using a sequence\n** of Eq or Ne comparison operations.\n**\n** When the b-tree is being used for membership tests, the calling function\n** might need to know whether or not the RHS side of the IN operator\n** contains a NULL.  If prRhsHasNull is not a NULL pointer and\n** if there is any chance that the (...) might contain a NULL value at\n** runtime, then a register is allocated and the register number written\n** to *prRhsHasNull. If there is no chance that the (...) contains a\n** NULL value, then *prRhsHasNull is left unchanged.\n**\n** If a register is allocated and its location stored in *prRhsHasNull, then\n** the value in that register will be NULL if the b-tree contains one or more\n** NULL values, and it will be some non-NULL value if the b-tree contains no\n** NULL values.\n**\n** If the aiMap parameter is not NULL, it must point to an array containing\n** one element for each column returned by the SELECT statement on the RHS\n** of the IN(...) operator. The i'th entry of the array is populated with the\n** offset of the index column that matches the i'th column returned by the\n** SELECT. For example, if the expression and selected index are:\n**\n**   (?,?,?) IN (SELECT a, b, c FROM t1)\n**   CREATE INDEX i1 ON t1(b, c, a);\n**\n** then aiMap[] is populated with {2, 0, 1}.\n*/\n#ifndef SQLITE_OMIT_SUBQUERY\nSQLITE_PRIVATE int sqlite3FindInIndex(\n  Parse *pParse,             /* Parsing context */\n  Expr *pX,                  /* The IN expression */\n  u32 inFlags,               /* IN_INDEX_LOOP, _MEMBERSHIP, and/or _NOOP_OK */\n  int *prRhsHasNull,         /* Register holding NULL status.  See notes */\n  int *aiMap,                /* Mapping from Index fields to RHS fields */\n  int *piTab                 /* OUT: index to use */\n){\n  Select *p;                            /* SELECT to the right of IN operator */\n  int eType = 0;                        /* Type of RHS table. IN_INDEX_* */\n  int iTab;                             /* Cursor of the RHS table */\n  int mustBeUnique;                     /* True if RHS must be unique */\n  Vdbe *v = sqlite3GetVdbe(pParse);     /* Virtual machine being coded */\n\n  assert( pX->op==TK_IN );\n  mustBeUnique = (inFlags & IN_INDEX_LOOP)!=0;\n  iTab = pParse->nTab++;\n\n  /* If the RHS of this IN(...) operator is a SELECT, and if it matters\n  ** whether or not the SELECT result contains NULL values, check whether\n  ** or not NULL is actually possible (it may not be, for example, due\n  ** to NOT NULL constraints in the schema). If no NULL values are possible,\n  ** set prRhsHasNull to 0 before continuing.  */\n  if( prRhsHasNull && ExprUseXSelect(pX) ){\n    int i;\n    ExprList *pEList = pX->x.pSelect->pEList;\n    for(i=0; i<pEList->nExpr; i++){\n      if( sqlite3ExprCanBeNull(pEList->a[i].pExpr) ) break;\n    }\n    if( i==pEList->nExpr ){\n      prRhsHasNull = 0;\n    }\n  }\n\n  /* Check to see if an existing table or index can be used to\n  ** satisfy the query.  This is preferable to generating a new\n  ** ephemeral table.  */\n  if( pParse->nErr==0 && (p = isCandidateForInOpt(pX))!=0 ){\n    sqlite3 *db = pParse->db;              /* Database connection */\n    Table *pTab;                           /* Table <table>. */\n    int iDb;                               /* Database idx for pTab */\n    ExprList *pEList = p->pEList;\n    int nExpr = pEList->nExpr;\n\n    assert( p->pEList!=0 );             /* Because of isCandidateForInOpt(p) */\n    assert( p->pEList->a[0].pExpr!=0 ); /* Because of isCandidateForInOpt(p) */\n    assert( p->pSrc!=0 );               /* Because of isCandidateForInOpt(p) */\n    pTab = p->pSrc->a[0].pSTab;\n\n    /* Code an OP_Transaction and OP_TableLock for <table>. */\n    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n    assert( iDb>=0 && iDb<SQLITE_MAX_DB );\n    sqlite3CodeVerifySchema(pParse, iDb);\n    sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);\n\n    assert(v);  /* sqlite3GetVdbe() has always been previously called */\n    if( nExpr==1 && pEList->a[0].pExpr->iColumn<0 ){\n      /* The \"x IN (SELECT rowid FROM table)\" case */\n      int iAddr = sqlite3VdbeAddOp0(v, OP_Once);\n      VdbeCoverage(v);\n\n      sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);\n      eType = IN_INDEX_ROWID;\n      ExplainQueryPlan((pParse, 0,\n            \"USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\",pTab->zName));\n      sqlite3VdbeJumpHere(v, iAddr);\n    }else{\n      Index *pIdx;                         /* Iterator variable */\n      int affinity_ok = 1;\n      int i;\n\n      /* Check that the affinity that will be used to perform each\n      ** comparison is the same as the affinity of each column in table\n      ** on the RHS of the IN operator.  If it not, it is not possible to\n      ** use any index of the RHS table.  */\n      for(i=0; i<nExpr && affinity_ok; i++){\n        Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);\n        int iCol = pEList->a[i].pExpr->iColumn;\n        char idxaff = sqlite3TableColumnAffinity(pTab,iCol); /* RHS table */\n        char cmpaff = sqlite3CompareAffinity(pLhs, idxaff);\n        testcase( cmpaff==SQLITE_AFF_BLOB );\n        testcase( cmpaff==SQLITE_AFF_TEXT );\n        switch( cmpaff ){\n          case SQLITE_AFF_BLOB:\n            break;\n          case SQLITE_AFF_TEXT:\n            /* sqlite3CompareAffinity() only returns TEXT if one side or the\n            ** other has no affinity and the other side is TEXT.  Hence,\n            ** the only way for cmpaff to be TEXT is for idxaff to be TEXT\n            ** and for the term on the LHS of the IN to have no affinity. */\n            assert( idxaff==SQLITE_AFF_TEXT );\n            break;\n          default:\n            affinity_ok = sqlite3IsNumericAffinity(idxaff);\n        }\n      }\n\n      if( affinity_ok ){\n        /* Search for an existing index that will work for this IN operator */\n        for(pIdx=pTab->pIndex; pIdx && eType==0; pIdx=pIdx->pNext){\n          Bitmask colUsed;      /* Columns of the index used */\n          Bitmask mCol;         /* Mask for the current column */\n          if( pIdx->nColumn<nExpr ) continue;\n          if( pIdx->pPartIdxWhere!=0 ) continue;\n          /* Maximum nColumn is BMS-2, not BMS-1, so that we can compute\n          ** BITMASK(nExpr) without overflowing */\n          testcase( pIdx->nColumn==BMS-2 );\n          testcase( pIdx->nColumn==BMS-1 );\n          if( pIdx->nColumn>=BMS-1 ) continue;\n          if( mustBeUnique ){\n            if( pIdx->nKeyCol>nExpr\n             ||(pIdx->nColumn>nExpr && !IsUniqueIndex(pIdx))\n            ){\n              continue;  /* This index is not unique over the IN RHS columns */\n            }\n          }\n\n          colUsed = 0;   /* Columns of index used so far */\n          for(i=0; i<nExpr; i++){\n            Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);\n            Expr *pRhs = pEList->a[i].pExpr;\n            CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);\n            int j;\n\n            for(j=0; j<nExpr; j++){\n              if( pIdx->aiColumn[j]!=pRhs->iColumn ) continue;\n              assert( pIdx->azColl[j] );\n              if( pReq!=0 && sqlite3StrICmp(pReq->zName, pIdx->azColl[j])!=0 ){\n                continue;\n              }\n              break;\n            }\n            if( j==nExpr ) break;\n            mCol = MASKBIT(j);\n            if( mCol & colUsed ) break; /* Each column used only once */\n            colUsed |= mCol;\n            if( aiMap ) aiMap[i] = j;\n          }\n\n          assert( nExpr>0 && nExpr<BMS );\n          assert( i==nExpr || colUsed!=(MASKBIT(nExpr)-1) );\n          if( colUsed==(MASKBIT(nExpr)-1) ){\n            /* If we reach this point, that means the index pIdx is usable */\n            int iAddr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n            ExplainQueryPlan((pParse, 0,\n                              \"USING INDEX %s FOR IN-OPERATOR\",pIdx->zName));\n            sqlite3VdbeAddOp3(v, OP_OpenRead, iTab, pIdx->tnum, iDb);\n            sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n            VdbeComment((v, \"%s\", pIdx->zName));\n            assert( IN_INDEX_INDEX_DESC == IN_INDEX_INDEX_ASC+1 );\n            eType = IN_INDEX_INDEX_ASC + pIdx->aSortOrder[0];\n\n            if( prRhsHasNull ){\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n              i64 mask = (1<<nExpr)-1;\n              sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed,\n                  iTab, 0, 0, (u8*)&mask, P4_INT64);\n#endif\n              *prRhsHasNull = ++pParse->nMem;\n              if( nExpr==1 ){\n                sqlite3SetHasNullFlag(v, iTab, *prRhsHasNull);\n              }\n            }\n            sqlite3VdbeJumpHere(v, iAddr);\n          }\n        } /* End loop over indexes */\n      } /* End if( affinity_ok ) */\n    } /* End if not an rowid index */\n  } /* End attempt to optimize using an index */\n\n  /* If no preexisting index is available for the IN clause\n  ** and IN_INDEX_NOOP is an allowed reply\n  ** and the RHS of the IN operator is a list, not a subquery\n  ** and the RHS is not constant or has two or fewer terms,\n  ** then it is not worth creating an ephemeral table to evaluate\n  ** the IN operator so return IN_INDEX_NOOP.\n  */\n  if( eType==0\n   && (inFlags & IN_INDEX_NOOP_OK)\n   && ExprUseXList(pX)\n   && (!sqlite3InRhsIsConstant(pParse,pX) || pX->x.pList->nExpr<=2)\n  ){\n    pParse->nTab--;  /* Back out the allocation of the unused cursor */\n    iTab = -1;       /* Cursor is not allocated */\n    eType = IN_INDEX_NOOP;\n  }\n\n  if( eType==0 ){\n    /* Could not find an existing table or index to use as the RHS b-tree.\n    ** We will have to generate an ephemeral table to do the job.\n    */\n    u32 savedNQueryLoop = pParse->nQueryLoop;\n    int rMayHaveNull = 0;\n    eType = IN_INDEX_EPH;\n    if( inFlags & IN_INDEX_LOOP ){\n      pParse->nQueryLoop = 0;\n    }else if( prRhsHasNull ){\n      *prRhsHasNull = rMayHaveNull = ++pParse->nMem;\n    }\n    assert( pX->op==TK_IN );\n    sqlite3CodeRhsOfIN(pParse, pX, iTab);\n    if( rMayHaveNull ){\n      sqlite3SetHasNullFlag(v, iTab, rMayHaveNull);\n    }\n    pParse->nQueryLoop = savedNQueryLoop;\n  }\n\n  if( aiMap && eType!=IN_INDEX_INDEX_ASC && eType!=IN_INDEX_INDEX_DESC ){\n    int i, n;\n    n = sqlite3ExprVectorSize(pX->pLeft);\n    for(i=0; i<n; i++) aiMap[i] = i;\n  }\n  *piTab = iTab;\n  return eType;\n}\n#endif\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Argument pExpr is an (?, ?...) IN(...) expression. This\n** function allocates and returns a nul-terminated string containing\n** the affinities to be used for each column of the comparison.\n**\n** It is the responsibility of the caller to ensure that the returned\n** string is eventually freed using sqlite3DbFree().\n*/\nstatic char *exprINAffinity(Parse *pParse, const Expr *pExpr){\n  Expr *pLeft = pExpr->pLeft;\n  int nVal = sqlite3ExprVectorSize(pLeft);\n  Select *pSelect = ExprUseXSelect(pExpr) ? pExpr->x.pSelect : 0;\n  char *zRet;\n\n  assert( pExpr->op==TK_IN );\n  zRet = sqlite3DbMallocRaw(pParse->db, 1+(i64)nVal);\n  if( zRet ){\n    int i;\n    for(i=0; i<nVal; i++){\n      Expr *pA = sqlite3VectorFieldSubexpr(pLeft, i);\n      char a = sqlite3ExprAffinity(pA);\n      if( pSelect ){\n        zRet[i] = sqlite3CompareAffinity(pSelect->pEList->a[i].pExpr, a);\n      }else{\n        zRet[i] = a;\n      }\n    }\n    zRet[nVal] = '\\0';\n  }\n  return zRet;\n}\n#endif\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Load the Parse object passed as the first argument with an error\n** message of the form:\n**\n**   \"sub-select returns N columns - expected M\"\n*/\nSQLITE_PRIVATE void sqlite3SubselectError(Parse *pParse, int nActual, int nExpect){\n  if( pParse->nErr==0 ){\n    const char *zFmt = \"sub-select returns %d columns - expected %d\";\n    sqlite3ErrorMsg(pParse, zFmt, nActual, nExpect);\n  }\n}\n#endif\n\n/*\n** Expression pExpr is a vector that has been used in a context where\n** it is not permitted. If pExpr is a sub-select vector, this routine\n** loads the Parse object with a message of the form:\n**\n**   \"sub-select returns N columns - expected 1\"\n**\n** Or, if it is a regular scalar vector:\n**\n**   \"row value misused\"\n*/\nSQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pParse, Expr *pExpr){\n#ifndef SQLITE_OMIT_SUBQUERY\n  if( ExprUseXSelect(pExpr) ){\n    sqlite3SubselectError(pParse, pExpr->x.pSelect->pEList->nExpr, 1);\n  }else\n#endif\n  {\n    sqlite3ErrorMsg(pParse, \"row value misused\");\n  }\n}\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Scan all previously generated bytecode looking for an OP_BeginSubrtn\n** that is compatible with pExpr.  If found, add the y.sub values\n** to pExpr and return true.  If not found, return false.\n*/\nstatic int findCompatibleInRhsSubrtn(\n  Parse *pParse,          /* Parsing context */\n  Expr *pExpr,            /* IN operator with RHS that we want to reuse */\n  SubrtnSig *pNewSig      /* Signature for the IN operator */\n){\n  VdbeOp *pOp, *pEnd;\n  SubrtnSig *pSig;\n  Vdbe *v;\n\n  if( pNewSig==0 ) return 0;\n  if( (pParse->mSubrtnSig & (1<<(pNewSig->selId&7)))==0 ) return 0;\n  assert( pExpr->op==TK_IN );\n  assert( !ExprUseYSub(pExpr) );\n  assert( ExprUseXSelect(pExpr) );\n  assert( pExpr->x.pSelect!=0 );\n  assert( (pExpr->x.pSelect->selFlags & SF_All)==0 );\n  v = pParse->pVdbe;\n  assert( v!=0 );\n  pOp = sqlite3VdbeGetOp(v, 1);\n  pEnd = sqlite3VdbeGetLastOp(v);\n  for(; pOp<pEnd; pOp++){\n    if( pOp->p4type!=P4_SUBRTNSIG ) continue;\n    assert( pOp->opcode==OP_BeginSubrtn );\n    pSig = pOp->p4.pSubrtnSig;\n    assert( pSig!=0 );\n    if( !pSig->bComplete ) continue;\n    if( pNewSig->selId!=pSig->selId ) continue;\n    if( strcmp(pNewSig->zAff,pSig->zAff)!=0 ) continue;\n    pExpr->y.sub.iAddr = pSig->iAddr;\n    pExpr->y.sub.regReturn = pSig->regReturn;\n    pExpr->iTable = pSig->iTable;\n    ExprSetProperty(pExpr, EP_Subrtn);\n    return 1;\n  }\n  return 0;\n}\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Generate code that will construct an ephemeral table containing all terms\n** in the RHS of an IN operator.  The IN operator can be in either of two\n** forms:\n**\n**     x IN (4,5,11)              -- IN operator with list on right-hand side\n**     x IN (SELECT a FROM b)     -- IN operator with subquery on the right\n**\n** The pExpr parameter is the IN operator.  The cursor number for the\n** constructed ephemeral table is returned.  The first time the ephemeral\n** table is computed, the cursor number is also stored in pExpr->iTable,\n** however the cursor number returned might not be the same, as it might\n** have been duplicated using OP_OpenDup.\n**\n** If the LHS expression (\"x\" in the examples) is a column value, or\n** the SELECT statement returns a column value, then the affinity of that\n** column is used to build the index keys. If both 'x' and the\n** SELECT... statement are columns, then numeric affinity is used\n** if either column has NUMERIC or INTEGER affinity. If neither\n** 'x' nor the SELECT... statement are columns, then numeric affinity\n** is used.\n*/\nSQLITE_PRIVATE void sqlite3CodeRhsOfIN(\n  Parse *pParse,          /* Parsing context */\n  Expr *pExpr,            /* The IN operator */\n  int iTab                /* Use this cursor number */\n){\n  int addrOnce = 0;           /* Address of the OP_Once instruction at top */\n  int addr;                   /* Address of OP_OpenEphemeral instruction */\n  Expr *pLeft;                /* the LHS of the IN operator */\n  KeyInfo *pKeyInfo = 0;      /* Key information */\n  int nVal;                   /* Size of vector pLeft */\n  Vdbe *v;                    /* The prepared statement under construction */\n  SubrtnSig *pSig = 0;        /* Signature for this subroutine */\n\n  v = pParse->pVdbe;\n  assert( v!=0 );\n\n  /* The evaluation of the IN must be repeated every time it\n  ** is encountered if any of the following is true:\n  **\n  **    *  The right-hand side is a correlated subquery\n  **    *  The right-hand side is an expression list containing variables\n  **    *  We are inside a trigger\n  **\n  ** If all of the above are false, then we can compute the RHS just once\n  ** and reuse it many names.\n  */\n  if( !ExprHasProperty(pExpr, EP_VarSelect) && pParse->iSelfTab==0 ){\n    /* Reuse of the RHS is allowed\n    **\n    ** Compute a signature for the RHS of the IN operator to facility\n    ** finding and reusing prior instances of the same IN operator.\n    */\n    assert( !ExprUseXSelect(pExpr) || pExpr->x.pSelect!=0 );\n    if( ExprUseXSelect(pExpr) && (pExpr->x.pSelect->selFlags & SF_All)==0 ){\n      pSig = sqlite3DbMallocRawNN(pParse->db, sizeof(pSig[0]));\n      if( pSig ){\n        pSig->selId = pExpr->x.pSelect->selId;\n        pSig->zAff = exprINAffinity(pParse, pExpr);\n      }\n    }\n\n    /* Check to see if there is a prior materialization of the RHS of\n    ** this IN operator.  If there is, then make use of that prior\n    ** materialization rather than recomputing it.\n    */\n    if( ExprHasProperty(pExpr, EP_Subrtn)\n     || findCompatibleInRhsSubrtn(pParse, pExpr, pSig)\n    ){\n      addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n      if( ExprUseXSelect(pExpr) ){\n        ExplainQueryPlan((pParse, 0, \"REUSE LIST SUBQUERY %d\",\n              pExpr->x.pSelect->selId));\n      }\n      assert( ExprUseYSub(pExpr) );\n      sqlite3VdbeAddOp2(v, OP_Gosub, pExpr->y.sub.regReturn,\n                        pExpr->y.sub.iAddr);\n      assert( iTab!=pExpr->iTable );\n      sqlite3VdbeAddOp2(v, OP_OpenDup, iTab, pExpr->iTable);\n      sqlite3VdbeJumpHere(v, addrOnce);\n      if( pSig ){\n        sqlite3DbFree(pParse->db, pSig->zAff);\n        sqlite3DbFree(pParse->db, pSig);\n      }\n      return;\n    }\n\n    /* Begin coding the subroutine */\n    assert( !ExprUseYWin(pExpr) );\n    ExprSetProperty(pExpr, EP_Subrtn);\n    assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) );\n    pExpr->y.sub.regReturn = ++pParse->nMem;\n    pExpr->y.sub.iAddr =\n      sqlite3VdbeAddOp2(v, OP_BeginSubrtn, 0, pExpr->y.sub.regReturn) + 1;\n    if( pSig ){\n      pSig->bComplete = 0;\n      pSig->iAddr = pExpr->y.sub.iAddr;\n      pSig->regReturn = pExpr->y.sub.regReturn;\n      pSig->iTable = iTab;\n      pParse->mSubrtnSig = 1 << (pSig->selId&7);\n      sqlite3VdbeChangeP4(v, -1, (const char*)pSig, P4_SUBRTNSIG);\n    }\n    addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n  }\n\n  /* Check to see if this is a vector IN operator */\n  pLeft = pExpr->pLeft;\n  nVal = sqlite3ExprVectorSize(pLeft);\n\n  /* Construct the ephemeral table that will contain the content of\n  ** RHS of the IN operator.\n  */\n  pExpr->iTable = iTab;\n  addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n  if( ExprUseXSelect(pExpr) ){\n    VdbeComment((v, \"Result of SELECT %u\", pExpr->x.pSelect->selId));\n  }else{\n    VdbeComment((v, \"RHS of IN operator\"));\n  }\n#endif\n  pKeyInfo = sqlite3KeyInfoAlloc(pParse->db, nVal, 1);\n\n  if( ExprUseXSelect(pExpr) ){\n    /* Case 1:     expr IN (SELECT ...)\n    **\n    ** Generate code to write the results of the select into the temporary\n    ** table allocated and opened above.\n    */\n    Select *pSelect = pExpr->x.pSelect;\n    ExprList *pEList = pSelect->pEList;\n\n    ExplainQueryPlan((pParse, 1, \"%sLIST SUBQUERY %d\",\n        addrOnce?\"\":\"CORRELATED \", pSelect->selId\n    ));\n    /* If the LHS and RHS of the IN operator do not match, that\n    ** error will have been caught long before we reach this point. */\n    if( ALWAYS(pEList->nExpr==nVal) ){\n      Select *pCopy;\n      SelectDest dest;\n      int i;\n      int rc;\n      int addrBloom = 0;\n      sqlite3SelectDestInit(&dest, SRT_Set, iTab);\n      dest.zAffSdst = exprINAffinity(pParse, pExpr);\n      pSelect->iLimit = 0;\n      if( addrOnce && OptimizationEnabled(pParse->db, SQLITE_BloomFilter) ){\n        int regBloom = ++pParse->nMem;\n        addrBloom = sqlite3VdbeAddOp2(v, OP_Blob, 10000, regBloom);\n        VdbeComment((v, \"Bloom filter\"));\n        dest.iSDParm2 = regBloom;\n      }\n      testcase( pSelect->selFlags & SF_Distinct );\n      testcase( pKeyInfo==0 ); /* Caused by OOM in sqlite3KeyInfoAlloc() */\n      pCopy = sqlite3SelectDup(pParse->db, pSelect, 0);\n      rc = pParse->db->mallocFailed ? 1 :sqlite3Select(pParse, pCopy, &dest);\n      sqlite3SelectDelete(pParse->db, pCopy);\n      sqlite3DbFree(pParse->db, dest.zAffSdst);\n      if( addrBloom ){\n        /* Remember that location of the Bloom filter in the P3 operand\n        ** of the OP_Once that began this subroutine. tag-202407032019 */\n        sqlite3VdbeGetOp(v, addrOnce)->p3 = dest.iSDParm2;\n        if( dest.iSDParm2==0 ){\n          /* If the Bloom filter won't actually be used, keep it small */\n          sqlite3VdbeGetOp(v, addrBloom)->p1 = 10;\n        }\n      }\n      if( rc ){\n        sqlite3KeyInfoUnref(pKeyInfo);\n        return;\n      }\n      assert( pKeyInfo!=0 ); /* OOM will cause exit after sqlite3Select() */\n      assert( pEList!=0 );\n      assert( pEList->nExpr>0 );\n      assert( sqlite3KeyInfoIsWriteable(pKeyInfo) );\n      for(i=0; i<nVal; i++){\n        Expr *p = sqlite3VectorFieldSubexpr(pLeft, i);\n        pKeyInfo->aColl[i] = sqlite3BinaryCompareCollSeq(\n            pParse, p, pEList->a[i].pExpr\n        );\n      }\n    }\n  }else if( ALWAYS(pExpr->x.pList!=0) ){\n    /* Case 2:     expr IN (exprlist)\n    **\n    ** For each expression, build an index key from the evaluation and\n    ** store it in the temporary table. If <expr> is a column, then use\n    ** that columns affinity when building index keys. If <expr> is not\n    ** a column, use numeric affinity.\n    */\n    char affinity;            /* Affinity of the LHS of the IN */\n    int i;\n    ExprList *pList = pExpr->x.pList;\n    struct ExprList_item *pItem;\n    int r1, r2;\n    affinity = sqlite3ExprAffinity(pLeft);\n    if( affinity<=SQLITE_AFF_NONE ){\n      affinity = SQLITE_AFF_BLOB;\n    }else if( affinity==SQLITE_AFF_REAL ){\n      affinity = SQLITE_AFF_NUMERIC;\n    }\n    if( pKeyInfo ){\n      assert( sqlite3KeyInfoIsWriteable(pKeyInfo) );\n      pKeyInfo->aColl[0] = sqlite3ExprCollSeq(pParse, pExpr->pLeft);\n    }\n\n    /* Loop through each expression in <exprlist>. */\n    r1 = sqlite3GetTempReg(pParse);\n    r2 = sqlite3GetTempReg(pParse);\n    for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){\n      Expr *pE2 = pItem->pExpr;\n\n      /* If the expression is not constant then we will need to\n      ** disable the test that was generated above that makes sure\n      ** this code only executes once.  Because for a non-constant\n      ** expression we need to rerun this code each time.\n      */\n      if( addrOnce && !sqlite3ExprIsConstant(pParse, pE2) ){\n        sqlite3VdbeChangeToNoop(v, addrOnce-1);\n        sqlite3VdbeChangeToNoop(v, addrOnce);\n        ExprClearProperty(pExpr, EP_Subrtn);\n        addrOnce = 0;\n      }\n\n      /* Evaluate the expression and insert it into the temp table */\n      sqlite3ExprCode(pParse, pE2, r1);\n      sqlite3VdbeAddOp4(v, OP_MakeRecord, r1, 1, r2, &affinity, 1);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r1, 1);\n    }\n    sqlite3ReleaseTempReg(pParse, r1);\n    sqlite3ReleaseTempReg(pParse, r2);\n  }\n  if( pSig ) pSig->bComplete = 1;\n  if( pKeyInfo ){\n    sqlite3VdbeChangeP4(v, addr, (void *)pKeyInfo, P4_KEYINFO);\n  }\n  if( addrOnce ){\n    sqlite3VdbeAddOp1(v, OP_NullRow, iTab);\n    sqlite3VdbeJumpHere(v, addrOnce);\n    /* Subroutine return */\n    assert( ExprUseYSub(pExpr) );\n    assert( sqlite3VdbeGetOp(v,pExpr->y.sub.iAddr-1)->opcode==OP_BeginSubrtn\n            || pParse->nErr );\n    sqlite3VdbeAddOp3(v, OP_Return, pExpr->y.sub.regReturn,\n                      pExpr->y.sub.iAddr, 1);\n    VdbeCoverage(v);\n    sqlite3ClearTempRegCache(pParse);\n  }\n}\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n/*\n** Generate code for scalar subqueries used as a subquery expression\n** or EXISTS operator:\n**\n**     (SELECT a FROM b)          -- subquery\n**     EXISTS (SELECT a FROM b)   -- EXISTS subquery\n**\n** The pExpr parameter is the SELECT or EXISTS operator to be coded.\n**\n** Return the register that holds the result.  For a multi-column SELECT,\n** the result is stored in a contiguous array of registers and the\n** return value is the register of the left-most result column.\n** Return 0 if an error occurs.\n*/\n#ifndef SQLITE_OMIT_SUBQUERY\nSQLITE_PRIVATE int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){\n  int addrOnce = 0;           /* Address of OP_Once at top of subroutine */\n  int rReg = 0;               /* Register storing resulting */\n  Select *pSel;               /* SELECT statement to encode */\n  SelectDest dest;            /* How to deal with SELECT result */\n  int nReg;                   /* Registers to allocate */\n  Expr *pLimit;               /* New limit expression */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int addrExplain;            /* Address of OP_Explain instruction */\n#endif\n\n  Vdbe *v = pParse->pVdbe;\n  assert( v!=0 );\n  if( pParse->nErr ) return 0;\n  testcase( pExpr->op==TK_EXISTS );\n  testcase( pExpr->op==TK_SELECT );\n  assert( pExpr->op==TK_EXISTS || pExpr->op==TK_SELECT );\n  assert( ExprUseXSelect(pExpr) );\n  pSel = pExpr->x.pSelect;\n\n  /* If this routine has already been coded, then invoke it as a\n  ** subroutine. */\n  if( ExprHasProperty(pExpr, EP_Subrtn) ){\n    ExplainQueryPlan((pParse, 0, \"REUSE SUBQUERY %d\", pSel->selId));\n    assert( ExprUseYSub(pExpr) );\n    sqlite3VdbeAddOp2(v, OP_Gosub, pExpr->y.sub.regReturn,\n                      pExpr->y.sub.iAddr);\n    return pExpr->iTable;\n  }\n\n  /* Begin coding the subroutine */\n  assert( !ExprUseYWin(pExpr) );\n  assert( !ExprHasProperty(pExpr, EP_Reduced|EP_TokenOnly) );\n  ExprSetProperty(pExpr, EP_Subrtn);\n  pExpr->y.sub.regReturn = ++pParse->nMem;\n  pExpr->y.sub.iAddr =\n    sqlite3VdbeAddOp2(v, OP_BeginSubrtn, 0, pExpr->y.sub.regReturn) + 1;\n\n  /* The evaluation of the EXISTS/SELECT must be repeated every time it\n  ** is encountered if any of the following is true:\n  **\n  **    *  The right-hand side is a correlated subquery\n  **    *  The right-hand side is an expression list containing variables\n  **    *  We are inside a trigger\n  **\n  ** If all of the above are false, then we can run this code just once\n  ** save the results, and reuse the same result on subsequent invocations.\n  */\n  if( !ExprHasProperty(pExpr, EP_VarSelect) ){\n    addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n  }\n\n  /* For a SELECT, generate code to put the values for all columns of\n  ** the first row into an array of registers and return the index of\n  ** the first register.\n  **\n  ** If this is an EXISTS, write an integer 0 (not exists) or 1 (exists)\n  ** into a register and return that register number.\n  **\n  ** In both cases, the query is augmented with \"LIMIT 1\".  Any\n  ** preexisting limit is discarded in place of the new LIMIT 1.\n  */\n  ExplainQueryPlan2(addrExplain, (pParse, 1, \"%sSCALAR SUBQUERY %d\",\n        addrOnce?\"\":\"CORRELATED \", pSel->selId));\n  sqlite3VdbeScanStatusCounters(v, addrExplain, addrExplain, -1);\n  nReg = pExpr->op==TK_SELECT ? pSel->pEList->nExpr : 1;\n  sqlite3SelectDestInit(&dest, 0, pParse->nMem+1);\n  pParse->nMem += nReg;\n  if( pExpr->op==TK_SELECT ){\n    dest.eDest = SRT_Mem;\n    if( (pSel->selFlags&SF_Distinct) && pSel->pLimit && pSel->pLimit->pRight ){\n      /* If there is both a DISTINCT and an OFFSET clause, then allocate\n      ** a separate dest.iSdst array for sqlite3Select() and other\n      ** routines to populate. In this case results will be copied over\n      ** into the dest.iSDParm array only after OFFSET processing. This\n      ** ensures that in the case where OFFSET excludes all rows, the\n      ** dest.iSDParm array is not left populated with the contents of the\n      ** last row visited - it should be all NULLs if all rows were\n      ** excluded by OFFSET.  */\n      dest.iSdst = pParse->nMem+1;\n      pParse->nMem += nReg;\n    }else{\n      dest.iSdst = dest.iSDParm;\n    }\n    dest.nSdst = nReg;\n    sqlite3VdbeAddOp3(v, OP_Null, 0, dest.iSDParm, pParse->nMem);\n    VdbeComment((v, \"Init subquery result\"));\n  }else{\n    dest.eDest = SRT_Exists;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, dest.iSDParm);\n    VdbeComment((v, \"Init EXISTS result\"));\n  }\n  if( pSel->pLimit ){\n    /* The subquery already has a limit.  If the pre-existing limit X is\n    ** not already integer value 1 or 0, then make the new limit X<>0 so that\n    ** the new limit is either 1 or 0 */\n    Expr *pLeft = pSel->pLimit->pLeft;\n    if( ExprHasProperty(pLeft, EP_IntValue)==0\n     || (pLeft->u.iValue!=1 && pLeft->u.iValue!=0)\n    ){\n      sqlite3 *db = pParse->db;\n      pLimit = sqlite3Expr(db, TK_INTEGER, \"0\");\n      if( pLimit ){\n        pLimit->affExpr = SQLITE_AFF_NUMERIC;\n        pLimit = sqlite3PExpr(pParse, TK_NE,\n            sqlite3ExprDup(db, pLeft, 0), pLimit);\n      }\n      sqlite3ExprDeferredDelete(pParse, pLeft);\n      pSel->pLimit->pLeft = pLimit;\n    }\n  }else{\n    /* If there is no pre-existing limit add a limit of 1 */\n    pLimit = sqlite3Expr(pParse->db, TK_INTEGER, \"1\");\n    pSel->pLimit = sqlite3PExpr(pParse, TK_LIMIT, pLimit, 0);\n  }\n  pSel->iLimit = 0;\n  if( sqlite3Select(pParse, pSel, &dest) ){\n    pExpr->op2 = pExpr->op;\n    pExpr->op = TK_ERROR;\n    return 0;\n  }\n  pExpr->iTable = rReg = dest.iSDParm;\n  ExprSetVVAProperty(pExpr, EP_NoReduce);\n  if( addrOnce ){\n    sqlite3VdbeJumpHere(v, addrOnce);\n  }\n  sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1);\n\n  /* Subroutine return */\n  assert( ExprUseYSub(pExpr) );\n  assert( sqlite3VdbeGetOp(v,pExpr->y.sub.iAddr-1)->opcode==OP_BeginSubrtn\n          || pParse->nErr );\n  sqlite3VdbeAddOp3(v, OP_Return, pExpr->y.sub.regReturn,\n                    pExpr->y.sub.iAddr, 1);\n  VdbeCoverage(v);\n  sqlite3ClearTempRegCache(pParse);\n  return rReg;\n}\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Expr pIn is an IN(...) expression. This function checks that the\n** sub-select on the RHS of the IN() operator has the same number of\n** columns as the vector on the LHS. Or, if the RHS of the IN() is not\n** a sub-query, that the LHS is a vector of size 1.\n*/\nSQLITE_PRIVATE int sqlite3ExprCheckIN(Parse *pParse, Expr *pIn){\n  int nVector = sqlite3ExprVectorSize(pIn->pLeft);\n  if( ExprUseXSelect(pIn) && !pParse->db->mallocFailed ){\n    if( nVector!=pIn->x.pSelect->pEList->nExpr ){\n      sqlite3SubselectError(pParse, pIn->x.pSelect->pEList->nExpr, nVector);\n      return 1;\n    }\n  }else if( nVector!=1 ){\n    sqlite3VectorErrorMsg(pParse, pIn->pLeft);\n    return 1;\n  }\n  return 0;\n}\n#endif\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Generate code for an IN expression.\n**\n**      x IN (SELECT ...)\n**      x IN (value, value, ...)\n**\n** The left-hand side (LHS) is a scalar or vector expression.  The\n** right-hand side (RHS) is an array of zero or more scalar values, or a\n** subquery.  If the RHS is a subquery, the number of result columns must\n** match the number of columns in the vector on the LHS.  If the RHS is\n** a list of values, the LHS must be a scalar.\n**\n** The IN operator is true if the LHS value is contained within the RHS.\n** The result is false if the LHS is definitely not in the RHS.  The\n** result is NULL if the presence of the LHS in the RHS cannot be\n** determined due to NULLs.\n**\n** This routine generates code that jumps to destIfFalse if the LHS is not\n** contained within the RHS.  If due to NULLs we cannot determine if the LHS\n** is contained in the RHS then jump to destIfNull.  If the LHS is contained\n** within the RHS then fall through.\n**\n** See the separate in-operator.md documentation file in the canonical\n** SQLite source tree for additional information.\n*/\nstatic void sqlite3ExprCodeIN(\n  Parse *pParse,        /* Parsing and code generating context */\n  Expr *pExpr,          /* The IN expression */\n  int destIfFalse,      /* Jump here if LHS is not contained in the RHS */\n  int destIfNull        /* Jump here if the results are unknown due to NULLs */\n){\n  int rRhsHasNull = 0;  /* Register that is true if RHS contains NULL values */\n  int eType;            /* Type of the RHS */\n  int rLhs;             /* Register(s) holding the LHS values */\n  Vdbe *v;              /* Statement under construction */\n  int *aiMap = 0;       /* Map from vector field to index column */\n  char *zAff = 0;       /* Affinity string for comparisons */\n  int nVector;          /* Size of vectors for this IN operator */\n  int iDummy;           /* Dummy parameter to exprCodeVector() */\n  Expr *pLeft;          /* The LHS of the IN operator */\n  int i;                /* loop counter */\n  int destStep2;        /* Where to jump when NULLs seen in step 2 */\n  int destStep6 = 0;    /* Start of code for Step 6 */\n  int addrTruthOp;      /* Address of opcode that determines the IN is true */\n  int destNotNull;      /* Jump here if a comparison is not true in step 6 */\n  int addrTop;          /* Top of the step-6 loop */\n  int iTab = 0;         /* Index to use */\n  u8 okConstFactor = pParse->okConstFactor;\n\n  assert( !ExprHasVVAProperty(pExpr,EP_Immutable) );\n  pLeft = pExpr->pLeft;\n  if( sqlite3ExprCheckIN(pParse, pExpr) ) return;\n  zAff = exprINAffinity(pParse, pExpr);\n  nVector = sqlite3ExprVectorSize(pExpr->pLeft);\n  aiMap = (int*)sqlite3DbMallocZero(pParse->db, nVector*sizeof(int));\n  if( pParse->db->mallocFailed ) goto sqlite3ExprCodeIN_oom_error;\n\n  /* Attempt to compute the RHS. After this step, if anything other than\n  ** IN_INDEX_NOOP is returned, the table opened with cursor iTab\n  ** contains the values that make up the RHS. If IN_INDEX_NOOP is returned,\n  ** the RHS has not yet been coded.  */\n  v = pParse->pVdbe;\n  assert( v!=0 );       /* OOM detected prior to this routine */\n  VdbeNoopComment((v, \"begin IN expr\"));\n  eType = sqlite3FindInIndex(pParse, pExpr,\n                             IN_INDEX_MEMBERSHIP | IN_INDEX_NOOP_OK,\n                             destIfFalse==destIfNull ? 0 : &rRhsHasNull,\n                             aiMap, &iTab);\n\n  assert( pParse->nErr || nVector==1 || eType==IN_INDEX_EPH\n       || eType==IN_INDEX_INDEX_ASC || eType==IN_INDEX_INDEX_DESC\n  );\n#ifdef SQLITE_DEBUG\n  /* Confirm that aiMap[] contains nVector integer values between 0 and\n  ** nVector-1. */\n  for(i=0; i<nVector; i++){\n    int j, cnt;\n    for(cnt=j=0; j<nVector; j++) if( aiMap[j]==i ) cnt++;\n    assert( cnt==1 );\n  }\n#endif\n\n  /* Code the LHS, the <expr> from \"<expr> IN (...)\". If the LHS is a\n  ** vector, then it is stored in an array of nVector registers starting\n  ** at r1.\n  **\n  ** sqlite3FindInIndex() might have reordered the fields of the LHS vector\n  ** so that the fields are in the same order as an existing index.   The\n  ** aiMap[] array contains a mapping from the original LHS field order to\n  ** the field order that matches the RHS index.\n  **\n  ** Avoid factoring the LHS of the IN(...) expression out of the loop,\n  ** even if it is constant, as OP_Affinity may be used on the register\n  ** by code generated below.  */\n  assert( pParse->okConstFactor==okConstFactor );\n  pParse->okConstFactor = 0;\n  rLhs = exprCodeVector(pParse, pLeft, &iDummy);\n  pParse->okConstFactor = okConstFactor;\n\n  /* If sqlite3FindInIndex() did not find or create an index that is\n  ** suitable for evaluating the IN operator, then evaluate using a\n  ** sequence of comparisons.\n  **\n  ** This is step (1) in the in-operator.md optimized algorithm.\n  */\n  if( eType==IN_INDEX_NOOP ){\n    ExprList *pList;\n    CollSeq *pColl;\n    int labelOk = sqlite3VdbeMakeLabel(pParse);\n    int r2, regToFree;\n    int regCkNull = 0;\n    int ii;\n    assert( nVector==1 );\n    assert( ExprUseXList(pExpr) );\n    pList = pExpr->x.pList;\n    pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);\n    if( destIfNull!=destIfFalse ){\n      regCkNull = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp3(v, OP_BitAnd, rLhs, rLhs, regCkNull);\n    }\n    for(ii=0; ii<pList->nExpr; ii++){\n      r2 = sqlite3ExprCodeTemp(pParse, pList->a[ii].pExpr, &regToFree);\n      if( regCkNull && sqlite3ExprCanBeNull(pList->a[ii].pExpr) ){\n        sqlite3VdbeAddOp3(v, OP_BitAnd, regCkNull, r2, regCkNull);\n      }\n      sqlite3ReleaseTempReg(pParse, regToFree);\n      if( ii<pList->nExpr-1 || destIfNull!=destIfFalse ){\n        int op = rLhs!=r2 ? OP_Eq : OP_NotNull;\n        sqlite3VdbeAddOp4(v, op, rLhs, labelOk, r2,\n                          (void*)pColl, P4_COLLSEQ);\n        VdbeCoverageIf(v, ii<pList->nExpr-1 && op==OP_Eq);\n        VdbeCoverageIf(v, ii==pList->nExpr-1 && op==OP_Eq);\n        VdbeCoverageIf(v, ii<pList->nExpr-1 && op==OP_NotNull);\n        VdbeCoverageIf(v, ii==pList->nExpr-1 && op==OP_NotNull);\n        sqlite3VdbeChangeP5(v, zAff[0]);\n      }else{\n        int op = rLhs!=r2 ? OP_Ne : OP_IsNull;\n        assert( destIfNull==destIfFalse );\n        sqlite3VdbeAddOp4(v, op, rLhs, destIfFalse, r2,\n                          (void*)pColl, P4_COLLSEQ);\n        VdbeCoverageIf(v, op==OP_Ne);\n        VdbeCoverageIf(v, op==OP_IsNull);\n        sqlite3VdbeChangeP5(v, zAff[0] | SQLITE_JUMPIFNULL);\n      }\n    }\n    if( regCkNull ){\n      sqlite3VdbeAddOp2(v, OP_IsNull, regCkNull, destIfNull); VdbeCoverage(v);\n      sqlite3VdbeGoto(v, destIfFalse);\n    }\n    sqlite3VdbeResolveLabel(v, labelOk);\n    sqlite3ReleaseTempReg(pParse, regCkNull);\n    goto sqlite3ExprCodeIN_finished;\n  }\n\n  if( eType!=IN_INDEX_ROWID ){\n    /* If this IN operator will use an index, then the order of columns in the\n    ** vector might be different from the order in the index.  In that case,\n    ** we need to reorder the LHS values to be in index order.  Run Affinity\n    ** before reordering the columns, so that the affinity is correct.\n    */\n    sqlite3VdbeAddOp4(v, OP_Affinity, rLhs, nVector, 0, zAff, nVector);\n    for(i=0; i<nVector && aiMap[i]==i; i++){} /* Are LHS fields reordered? */\n    if( i!=nVector ){\n      /* Need to reorder the LHS fields according to aiMap */\n      int rLhsOrig = rLhs;\n      rLhs = sqlite3GetTempRange(pParse, nVector);\n      for(i=0; i<nVector; i++){\n        sqlite3VdbeAddOp3(v, OP_Copy, rLhsOrig+i, rLhs+aiMap[i], 0);\n      }\n      sqlite3ReleaseTempReg(pParse, rLhsOrig);\n    }\n  }\n\n\n  /* Step 2: Check to see if the LHS contains any NULL columns.  If the\n  ** LHS does contain NULLs then the result must be either FALSE or NULL.\n  ** We will then skip the binary search of the RHS.\n  */\n  if( destIfNull==destIfFalse ){\n    destStep2 = destIfFalse;\n  }else{\n    destStep2 = destStep6 = sqlite3VdbeMakeLabel(pParse);\n  }\n  for(i=0; i<nVector; i++){\n    Expr *p = sqlite3VectorFieldSubexpr(pExpr->pLeft, i);\n    if( pParse->nErr ) goto sqlite3ExprCodeIN_oom_error;\n    if( sqlite3ExprCanBeNull(p) ){\n      sqlite3VdbeAddOp2(v, OP_IsNull, rLhs+i, destStep2);\n      VdbeCoverage(v);\n    }\n  }\n\n  /* Step 3.  The LHS is now known to be non-NULL.  Do the binary search\n  ** of the RHS using the LHS as a probe.  If found, the result is\n  ** true.\n  */\n  if( eType==IN_INDEX_ROWID ){\n    /* In this case, the RHS is the ROWID of table b-tree and so we also\n    ** know that the RHS is non-NULL.  Hence, we combine steps 3 and 4\n    ** into a single opcode. */\n    assert( nVector==1 );\n    sqlite3VdbeAddOp3(v, OP_SeekRowid, iTab, destIfFalse, rLhs);\n    VdbeCoverage(v);\n    addrTruthOp = sqlite3VdbeAddOp0(v, OP_Goto);  /* Return True */\n  }else{\n    if( destIfFalse==destIfNull ){\n      /* Combine Step 3 and Step 5 into a single opcode */\n      if( ExprHasProperty(pExpr, EP_Subrtn) ){\n        const VdbeOp *pOp = sqlite3VdbeGetOp(v, pExpr->y.sub.iAddr);\n        assert( pOp->opcode==OP_Once || pParse->nErr );\n        if( pOp->opcode==OP_Once && pOp->p3>0 ){  /* tag-202407032019 */\n          assert( OptimizationEnabled(pParse->db, SQLITE_BloomFilter) );\n          sqlite3VdbeAddOp4Int(v, OP_Filter, pOp->p3, destIfFalse,\n                               rLhs, nVector); VdbeCoverage(v);\n        }\n      }\n      sqlite3VdbeAddOp4Int(v, OP_NotFound, iTab, destIfFalse,\n                           rLhs, nVector); VdbeCoverage(v);\n      goto sqlite3ExprCodeIN_finished;\n    }\n    /* Ordinary Step 3, for the case where FALSE and NULL are distinct */\n    addrTruthOp = sqlite3VdbeAddOp4Int(v, OP_Found, iTab, 0,\n                                      rLhs, nVector); VdbeCoverage(v);\n  }\n\n  /* Step 4.  If the RHS is known to be non-NULL and we did not find\n  ** an match on the search above, then the result must be FALSE.\n  */\n  if( rRhsHasNull && nVector==1 ){\n    sqlite3VdbeAddOp2(v, OP_NotNull, rRhsHasNull, destIfFalse);\n    VdbeCoverage(v);\n  }\n\n  /* Step 5.  If we do not care about the difference between NULL and\n  ** FALSE, then just return false.\n  */\n  if( destIfFalse==destIfNull ) sqlite3VdbeGoto(v, destIfFalse);\n\n  /* Step 6: Loop through rows of the RHS.  Compare each row to the LHS.\n  ** If any comparison is NULL, then the result is NULL.  If all\n  ** comparisons are FALSE then the final result is FALSE.\n  **\n  ** For a scalar LHS, it is sufficient to check just the first row\n  ** of the RHS.\n  */\n  if( destStep6 ) sqlite3VdbeResolveLabel(v, destStep6);\n  addrTop = sqlite3VdbeAddOp2(v, OP_Rewind, iTab, destIfFalse);\n  VdbeCoverage(v);\n  if( nVector>1 ){\n    destNotNull = sqlite3VdbeMakeLabel(pParse);\n  }else{\n    /* For nVector==1, combine steps 6 and 7 by immediately returning\n    ** FALSE if the first comparison is not NULL */\n    destNotNull = destIfFalse;\n  }\n  for(i=0; i<nVector; i++){\n    Expr *p;\n    CollSeq *pColl;\n    int r3 = sqlite3GetTempReg(pParse);\n    p = sqlite3VectorFieldSubexpr(pLeft, i);\n    pColl = sqlite3ExprCollSeq(pParse, p);\n    sqlite3VdbeAddOp3(v, OP_Column, iTab, i, r3);\n    sqlite3VdbeAddOp4(v, OP_Ne, rLhs+i, destNotNull, r3,\n                      (void*)pColl, P4_COLLSEQ);\n    VdbeCoverage(v);\n    sqlite3ReleaseTempReg(pParse, r3);\n  }\n  sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfNull);\n  if( nVector>1 ){\n    sqlite3VdbeResolveLabel(v, destNotNull);\n    sqlite3VdbeAddOp2(v, OP_Next, iTab, addrTop+1);\n    VdbeCoverage(v);\n\n    /* Step 7:  If we reach this point, we know that the result must\n    ** be false. */\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfFalse);\n  }\n\n  /* Jumps here in order to return true. */\n  sqlite3VdbeJumpHere(v, addrTruthOp);\n\nsqlite3ExprCodeIN_finished:\n  VdbeComment((v, \"end IN expr\"));\nsqlite3ExprCodeIN_oom_error:\n  sqlite3DbFree(pParse->db, aiMap);\n  sqlite3DbFree(pParse->db, zAff);\n}\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/*\n** Generate an instruction that will put the floating point\n** value described by z[0..n-1] into register iMem.\n**\n** The z[] string will probably not be zero-terminated.  But the\n** z[n] character is guaranteed to be something that does not look\n** like the continuation of the number.\n*/\nstatic void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){\n  if( ALWAYS(z!=0) ){\n    double value;\n    sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);\n    assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */\n    if( negateFlag ) value = -value;\n    sqlite3VdbeAddOp4Dup8(v, OP_Real, 0, iMem, 0, (u8*)&value, P4_REAL);\n  }\n}\n#endif\n\n\n/*\n** Generate an instruction that will put the integer describe by\n** text z[0..n-1] into register iMem.\n**\n** Expr.u.zToken is always UTF8 and zero-terminated.\n*/\nstatic void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){\n  Vdbe *v = pParse->pVdbe;\n  if( pExpr->flags & EP_IntValue ){\n    int i = pExpr->u.iValue;\n    assert( i>=0 );\n    if( negFlag ) i = -i;\n    sqlite3VdbeAddOp2(v, OP_Integer, i, iMem);\n  }else{\n    int c;\n    i64 value;\n    const char *z = pExpr->u.zToken;\n    assert( z!=0 );\n    c = sqlite3DecOrHexToI64(z, &value);\n    if( (c==3 && !negFlag) || (c==2) || (negFlag && value==SMALLEST_INT64)){\n#ifdef SQLITE_OMIT_FLOATING_POINT\n      sqlite3ErrorMsg(pParse, \"oversized integer: %s%#T\", negFlag?\"-\":\"\",pExpr);\n#else\n#ifndef SQLITE_OMIT_HEX_INTEGER\n      if( sqlite3_strnicmp(z,\"0x\",2)==0 ){\n        sqlite3ErrorMsg(pParse, \"hex literal too big: %s%#T\",\n                        negFlag?\"-\":\"\",pExpr);\n      }else\n#endif\n      {\n        codeReal(v, z, negFlag, iMem);\n      }\n#endif\n    }else{\n      if( negFlag ){ value = c==3 ? SMALLEST_INT64 : -value; }\n      sqlite3VdbeAddOp4Dup8(v, OP_Int64, 0, iMem, 0, (u8*)&value, P4_INT64);\n    }\n  }\n}\n\n\n/* Generate code that will load into register regOut a value that is\n** appropriate for the iIdxCol-th column of index pIdx.\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(\n  Parse *pParse,  /* The parsing context */\n  Index *pIdx,    /* The index whose column is to be loaded */\n  int iTabCur,    /* Cursor pointing to a table row */\n  int iIdxCol,    /* The column of the index to be loaded */\n  int regOut      /* Store the index column value in this register */\n){\n  i16 iTabCol = pIdx->aiColumn[iIdxCol];\n  if( iTabCol==XN_EXPR ){\n    assert( pIdx->aColExpr );\n    assert( pIdx->aColExpr->nExpr>iIdxCol );\n    pParse->iSelfTab = iTabCur + 1;\n    sqlite3ExprCodeCopy(pParse, pIdx->aColExpr->a[iIdxCol].pExpr, regOut);\n    pParse->iSelfTab = 0;\n  }else{\n    sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pIdx->pTable, iTabCur,\n                                    iTabCol, regOut);\n  }\n}\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n/*\n** Generate code that will compute the value of generated column pCol\n** and store the result in register regOut\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(\n  Parse *pParse,     /* Parsing context */\n  Table *pTab,       /* Table containing the generated column */\n  Column *pCol,      /* The generated column */\n  int regOut         /* Put the result in this register */\n){\n  int iAddr;\n  Vdbe *v = pParse->pVdbe;\n  int nErr = pParse->nErr;\n  assert( v!=0 );\n  assert( pParse->iSelfTab!=0 );\n  if( pParse->iSelfTab>0 ){\n    iAddr = sqlite3VdbeAddOp3(v, OP_IfNullRow, pParse->iSelfTab-1, 0, regOut);\n  }else{\n    iAddr = 0;\n  }\n  sqlite3ExprCodeCopy(pParse, sqlite3ColumnExpr(pTab,pCol), regOut);\n  if( (pCol->colFlags & COLFLAG_VIRTUAL)!=0\n   && (pTab->tabFlags & TF_Strict)!=0\n  ){\n    int p3 = 2+(int)(pCol - pTab->aCol);\n    sqlite3VdbeAddOp4(v, OP_TypeCheck, regOut, 1, p3, (char*)pTab, P4_TABLE);\n  }else if( pCol->affinity>=SQLITE_AFF_TEXT ){\n    sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1);\n  }\n  if( iAddr ) sqlite3VdbeJumpHere(v, iAddr);\n  if( pParse->nErr>nErr ) pParse->db->errByteOffset = -1;\n}\n#endif /* SQLITE_OMIT_GENERATED_COLUMNS */\n\n/*\n** Generate code to extract the value of the iCol-th column of a table.\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(\n  Vdbe *v,        /* Parsing context */\n  Table *pTab,    /* The table containing the value */\n  int iTabCur,    /* The table cursor.  Or the PK cursor for WITHOUT ROWID */\n  int iCol,       /* Index of the column to extract */\n  int regOut      /* Extract the value into this register */\n){\n  Column *pCol;\n  assert( v!=0 );\n  assert( pTab!=0 );\n  assert( iCol!=XN_EXPR );\n  if( iCol<0 || iCol==pTab->iPKey ){\n    sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut);\n    VdbeComment((v, \"%s.rowid\", pTab->zName));\n  }else{\n    int op;\n    int x;\n    if( IsVirtual(pTab) ){\n      op = OP_VColumn;\n      x = iCol;\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    }else if( (pCol = &pTab->aCol[iCol])->colFlags & COLFLAG_VIRTUAL ){\n      Parse *pParse = sqlite3VdbeParser(v);\n      if( pCol->colFlags & COLFLAG_BUSY ){\n        sqlite3ErrorMsg(pParse, \"generated column loop on \\\"%s\\\"\",\n                        pCol->zCnName);\n      }else{\n        int savedSelfTab = pParse->iSelfTab;\n        pCol->colFlags |= COLFLAG_BUSY;\n        pParse->iSelfTab = iTabCur+1;\n        sqlite3ExprCodeGeneratedColumn(pParse, pTab, pCol, regOut);\n        pParse->iSelfTab = savedSelfTab;\n        pCol->colFlags &= ~COLFLAG_BUSY;\n      }\n      return;\n#endif\n    }else if( !HasRowid(pTab) ){\n      testcase( iCol!=sqlite3TableColumnToStorage(pTab, iCol) );\n      x = sqlite3TableColumnToIndex(sqlite3PrimaryKeyIndex(pTab), iCol);\n      op = OP_Column;\n    }else{\n      x = sqlite3TableColumnToStorage(pTab,iCol);\n      testcase( x!=iCol );\n      op = OP_Column;\n    }\n    sqlite3VdbeAddOp3(v, op, iTabCur, x, regOut);\n    sqlite3ColumnDefault(v, pTab, iCol, regOut);\n  }\n}\n\n/*\n** Generate code that will extract the iColumn-th column from\n** table pTab and store the column value in register iReg.\n**\n** There must be an open cursor to pTab in iTable when this routine\n** is called.  If iColumn<0 then code is generated that extracts the rowid.\n*/\nSQLITE_PRIVATE int sqlite3ExprCodeGetColumn(\n  Parse *pParse,   /* Parsing and code generating context */\n  Table *pTab,     /* Description of the table we are reading from */\n  int iColumn,     /* Index of the table column */\n  int iTable,      /* The cursor pointing to the table */\n  int iReg,        /* Store results here */\n  u8 p5            /* P5 value for OP_Column + FLAGS */\n){\n  assert( pParse->pVdbe!=0 );\n  assert( (p5 & (OPFLAG_NOCHNG|OPFLAG_TYPEOFARG|OPFLAG_LENGTHARG))==p5 );\n  assert( IsVirtual(pTab) || (p5 & OPFLAG_NOCHNG)==0 );\n  sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pTab, iTable, iColumn, iReg);\n  if( p5 ){\n    VdbeOp *pOp = sqlite3VdbeGetLastOp(pParse->pVdbe);\n    if( pOp->opcode==OP_Column ) pOp->p5 = p5;\n    if( pOp->opcode==OP_VColumn ) pOp->p5 = (p5 & OPFLAG_NOCHNG);\n  }\n  return iReg;\n}\n\n/*\n** Generate code to move content from registers iFrom...iFrom+nReg-1\n** over to iTo..iTo+nReg-1.\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){\n  sqlite3VdbeAddOp3(pParse->pVdbe, OP_Move, iFrom, iTo, nReg);\n}\n\n/*\n** Convert a scalar expression node to a TK_REGISTER referencing\n** register iReg.  The caller must ensure that iReg already contains\n** the correct value for the expression.\n*/\nSQLITE_PRIVATE void sqlite3ExprToRegister(Expr *pExpr, int iReg){\n  Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr);\n  if( NEVER(p==0) ) return;\n  if( p->op==TK_REGISTER ){\n    assert( p->iTable==iReg );\n  }else{\n    p->op2 = p->op;\n    p->op = TK_REGISTER;\n    p->iTable = iReg;\n    ExprClearProperty(p, EP_Skip);\n  }\n}\n\n/*\n** Evaluate an expression (either a vector or a scalar expression) and store\n** the result in contiguous temporary registers.  Return the index of\n** the first register used to store the result.\n**\n** If the returned result register is a temporary scalar, then also write\n** that register number into *piFreeable.  If the returned result register\n** is not a temporary or if the expression is a vector set *piFreeable\n** to 0.\n*/\nstatic int exprCodeVector(Parse *pParse, Expr *p, int *piFreeable){\n  int iResult;\n  int nResult = sqlite3ExprVectorSize(p);\n  if( nResult==1 ){\n    iResult = sqlite3ExprCodeTemp(pParse, p, piFreeable);\n  }else{\n    *piFreeable = 0;\n    if( p->op==TK_SELECT ){\n#if SQLITE_OMIT_SUBQUERY\n      iResult = 0;\n#else\n      iResult = sqlite3CodeSubselect(pParse, p);\n#endif\n    }else{\n      int i;\n      iResult = pParse->nMem+1;\n      pParse->nMem += nResult;\n      assert( ExprUseXList(p) );\n      for(i=0; i<nResult; i++){\n        sqlite3ExprCodeFactorable(pParse, p->x.pList->a[i].pExpr, i+iResult);\n      }\n    }\n  }\n  return iResult;\n}\n\n/*\n** If the last opcode is a OP_Copy, then set the do-not-merge flag (p5)\n** so that a subsequent copy will not be merged into this one.\n*/\nstatic void setDoNotMergeFlagOnCopy(Vdbe *v){\n  if( sqlite3VdbeGetLastOp(v)->opcode==OP_Copy ){\n    sqlite3VdbeChangeP5(v, 1);  /* Tag trailing OP_Copy as not mergeable */\n  }\n}\n\n/*\n** Generate code to implement special SQL functions that are implemented\n** in-line rather than by using the usual callbacks.\n*/\nstatic int exprCodeInlineFunction(\n  Parse *pParse,        /* Parsing context */\n  ExprList *pFarg,      /* List of function arguments */\n  int iFuncId,          /* Function ID.  One of the INTFUNC_... values */\n  int target            /* Store function result in this register */\n){\n  int nFarg;\n  Vdbe *v = pParse->pVdbe;\n  assert( v!=0 );\n  assert( pFarg!=0 );\n  nFarg = pFarg->nExpr;\n  assert( nFarg>0 );  /* All in-line functions have at least one argument */\n  switch( iFuncId ){\n    case INLINEFUNC_coalesce: {\n      /* Attempt a direct implementation of the built-in COALESCE() and\n      ** IFNULL() functions.  This avoids unnecessary evaluation of\n      ** arguments past the first non-NULL argument.\n      */\n      int endCoalesce = sqlite3VdbeMakeLabel(pParse);\n      int i;\n      assert( nFarg>=2 );\n      sqlite3ExprCode(pParse, pFarg->a[0].pExpr, target);\n      for(i=1; i<nFarg; i++){\n        sqlite3VdbeAddOp2(v, OP_NotNull, target, endCoalesce);\n        VdbeCoverage(v);\n        sqlite3ExprCode(pParse, pFarg->a[i].pExpr, target);\n      }\n      setDoNotMergeFlagOnCopy(v);\n      sqlite3VdbeResolveLabel(v, endCoalesce);\n      break;\n    }\n    case INLINEFUNC_iif: {\n      Expr caseExpr;\n      memset(&caseExpr, 0, sizeof(caseExpr));\n      caseExpr.op = TK_CASE;\n      caseExpr.x.pList = pFarg;\n      return sqlite3ExprCodeTarget(pParse, &caseExpr, target);\n    }\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n    case INLINEFUNC_sqlite_offset: {\n      Expr *pArg = pFarg->a[0].pExpr;\n      if( pArg->op==TK_COLUMN && pArg->iTable>=0 ){\n        sqlite3VdbeAddOp3(v, OP_Offset, pArg->iTable, pArg->iColumn, target);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n      }\n      break;\n    }\n#endif\n    default: {\n      /* The UNLIKELY() function is a no-op.  The result is the value\n      ** of the first argument.\n      */\n      assert( nFarg==1 || nFarg==2 );\n      target = sqlite3ExprCodeTarget(pParse, pFarg->a[0].pExpr, target);\n      break;\n    }\n\n  /***********************************************************************\n  ** Test-only SQL functions that are only usable if enabled\n  ** via SQLITE_TESTCTRL_INTERNAL_FUNCTIONS\n  */\n#if !defined(SQLITE_UNTESTABLE)\n    case INLINEFUNC_expr_compare: {\n      /* Compare two expressions using sqlite3ExprCompare() */\n      assert( nFarg==2 );\n      sqlite3VdbeAddOp2(v, OP_Integer,\n         sqlite3ExprCompare(0,pFarg->a[0].pExpr, pFarg->a[1].pExpr,-1),\n         target);\n      break;\n    }\n\n    case INLINEFUNC_expr_implies_expr: {\n      /* Compare two expressions using sqlite3ExprImpliesExpr() */\n      assert( nFarg==2 );\n      sqlite3VdbeAddOp2(v, OP_Integer,\n         sqlite3ExprImpliesExpr(pParse,pFarg->a[0].pExpr, pFarg->a[1].pExpr,-1),\n         target);\n      break;\n    }\n\n    case INLINEFUNC_implies_nonnull_row: {\n      /* Result of sqlite3ExprImpliesNonNullRow() */\n      Expr *pA1;\n      assert( nFarg==2 );\n      pA1 = pFarg->a[1].pExpr;\n      if( pA1->op==TK_COLUMN ){\n        sqlite3VdbeAddOp2(v, OP_Integer,\n           sqlite3ExprImpliesNonNullRow(pFarg->a[0].pExpr,pA1->iTable,1),\n           target);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n      }\n      break;\n    }\n\n    case INLINEFUNC_affinity: {\n      /* The AFFINITY() function evaluates to a string that describes\n      ** the type affinity of the argument.  This is used for testing of\n      ** the SQLite type logic.\n      */\n      const char *azAff[] = { \"blob\", \"text\", \"numeric\", \"integer\",\n                              \"real\", \"flexnum\" };\n      char aff;\n      assert( nFarg==1 );\n      aff = sqlite3ExprAffinity(pFarg->a[0].pExpr);\n      assert( aff<=SQLITE_AFF_NONE\n           || (aff>=SQLITE_AFF_BLOB && aff<=SQLITE_AFF_FLEXNUM) );\n      sqlite3VdbeLoadString(v, target,\n              (aff<=SQLITE_AFF_NONE) ? \"none\" : azAff[aff-SQLITE_AFF_BLOB]);\n      break;\n    }\n#endif /* !defined(SQLITE_UNTESTABLE) */\n  }\n  return target;\n}\n\n/*\n** Expression Node callback for sqlite3ExprCanReturnSubtype().\n**\n** Only a function call is able to return a subtype.  So if the node\n** is not a function call, return WRC_Prune immediately.\n**\n** A function call is able to return a subtype if it has the\n** SQLITE_RESULT_SUBTYPE property.\n**\n** Assume that every function is able to pass-through a subtype from\n** one of its argument (using sqlite3_result_value()).  Most functions\n** are not this way, but we don't have a mechanism to distinguish those\n** that are from those that are not, so assume they all work this way.\n** That means that if one of its arguments is another function and that\n** other function is able to return a subtype, then this function is\n** able to return a subtype.\n*/\nstatic int exprNodeCanReturnSubtype(Walker *pWalker, Expr *pExpr){\n  int n;\n  FuncDef *pDef;\n  sqlite3 *db;\n  if( pExpr->op!=TK_FUNCTION ){\n    return WRC_Prune;\n  }\n  assert( ExprUseXList(pExpr) );\n  db = pWalker->pParse->db;\n  n = ALWAYS(pExpr->x.pList) ? pExpr->x.pList->nExpr : 0;\n  pDef = sqlite3FindFunction(db, pExpr->u.zToken, n, ENC(db), 0);\n  if( NEVER(pDef==0) || (pDef->funcFlags & SQLITE_RESULT_SUBTYPE)!=0 ){\n    pWalker->eCode = 1;\n    return WRC_Prune;\n  }\n  return WRC_Continue;\n}\n\n/*\n** Return TRUE if expression pExpr is able to return a subtype.\n**\n** A TRUE return does not guarantee that a subtype will be returned.\n** It only indicates that a subtype return is possible.  False positives\n** are acceptable as they only disable an optimization.  False negatives,\n** on the other hand, can lead to incorrect answers.\n*/\nstatic int sqlite3ExprCanReturnSubtype(Parse *pParse, Expr *pExpr){\n  Walker w;\n  memset(&w, 0, sizeof(w));\n  w.pParse = pParse;\n  w.xExprCallback = exprNodeCanReturnSubtype;\n  sqlite3WalkExpr(&w, pExpr);\n  return w.eCode;\n}\n\n\n/*\n** Check to see if pExpr is one of the indexed expressions on pParse->pIdxEpr.\n** If it is, then resolve the expression by reading from the index and\n** return the register into which the value has been read.  If pExpr is\n** not an indexed expression, then return negative.\n*/\nstatic SQLITE_NOINLINE int sqlite3IndexedExprLookup(\n  Parse *pParse,   /* The parsing context */\n  Expr *pExpr,     /* The expression to potentially bypass */\n  int target       /* Where to store the result of the expression */\n){\n  IndexedExpr *p;\n  Vdbe *v;\n  for(p=pParse->pIdxEpr; p; p=p->pIENext){\n    u8 exprAff;\n    int iDataCur = p->iDataCur;\n    if( iDataCur<0 ) continue;\n    if( pParse->iSelfTab ){\n      if( p->iDataCur!=pParse->iSelfTab-1 ) continue;\n      iDataCur = -1;\n    }\n    if( sqlite3ExprCompare(0, pExpr, p->pExpr, iDataCur)!=0 ) continue;\n    assert( p->aff>=SQLITE_AFF_BLOB && p->aff<=SQLITE_AFF_NUMERIC );\n    exprAff = sqlite3ExprAffinity(pExpr);\n    if( (exprAff<=SQLITE_AFF_BLOB && p->aff!=SQLITE_AFF_BLOB)\n     || (exprAff==SQLITE_AFF_TEXT && p->aff!=SQLITE_AFF_TEXT)\n     || (exprAff>=SQLITE_AFF_NUMERIC && p->aff!=SQLITE_AFF_NUMERIC)\n    ){\n      /* Affinity mismatch on a generated column */\n      continue;\n    }\n\n\n    /* Functions that might set a subtype should not be replaced by the\n    ** value taken from an expression index if they are themselves an\n    ** argument to another scalar function or aggregate.\n    ** https://sqlite.org/forum/forumpost/68d284c86b082c3e */\n    if( ExprHasProperty(pExpr, EP_SubtArg)\n     && sqlite3ExprCanReturnSubtype(pParse, pExpr)\n    ){\n      continue;\n    }\n\n    v = pParse->pVdbe;\n    assert( v!=0 );\n    if( p->bMaybeNullRow ){\n      /* If the index is on a NULL row due to an outer join, then we\n      ** cannot extract the value from the index.  The value must be\n      ** computed using the original expression. */\n      int addr = sqlite3VdbeCurrentAddr(v);\n      sqlite3VdbeAddOp3(v, OP_IfNullRow, p->iIdxCur, addr+3, target);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_Column, p->iIdxCur, p->iIdxCol, target);\n      VdbeComment((v, \"%s expr-column %d\", p->zIdxName, p->iIdxCol));\n      sqlite3VdbeGoto(v, 0);\n      p = pParse->pIdxEpr;\n      pParse->pIdxEpr = 0;\n      sqlite3ExprCode(pParse, pExpr, target);\n      pParse->pIdxEpr = p;\n      sqlite3VdbeJumpHere(v, addr+2);\n    }else{\n      sqlite3VdbeAddOp3(v, OP_Column, p->iIdxCur, p->iIdxCol, target);\n      VdbeComment((v, \"%s expr-column %d\", p->zIdxName, p->iIdxCol));\n    }\n    return target;\n  }\n  return -1;  /* Not found */\n}\n\n\n/*\n** Expression pExpr is guaranteed to be a TK_COLUMN or equivalent. This\n** function checks the Parse.pIdxPartExpr list to see if this column\n** can be replaced with a constant value. If so, it generates code to\n** put the constant value in a register (ideally, but not necessarily,\n** register iTarget) and returns the register number.\n**\n** Or, if the TK_COLUMN cannot be replaced by a constant, zero is\n** returned.\n*/\nstatic int exprPartidxExprLookup(Parse *pParse, Expr *pExpr, int iTarget){\n  IndexedExpr *p;\n  for(p=pParse->pIdxPartExpr; p; p=p->pIENext){\n    if( pExpr->iColumn==p->iIdxCol && pExpr->iTable==p->iDataCur ){\n      Vdbe *v = pParse->pVdbe;\n      int addr = 0;\n      int ret;\n\n      if( p->bMaybeNullRow ){\n        addr = sqlite3VdbeAddOp1(v, OP_IfNullRow, p->iIdxCur);\n      }\n      ret = sqlite3ExprCodeTarget(pParse, p->pExpr, iTarget);\n      sqlite3VdbeAddOp4(pParse->pVdbe, OP_Affinity, ret, 1, 0,\n                        (const char*)&p->aff, 1);\n      if( addr ){\n        sqlite3VdbeJumpHere(v, addr);\n        sqlite3VdbeChangeP3(v, addr, ret);\n      }\n      return ret;\n    }\n  }\n  return 0;\n}\n\n/*\n** Generate code that evaluates an AND or OR operator leaving a\n** boolean result in a register.  pExpr is the AND/OR expression.\n** Store the result in the \"target\" register.  Use short-circuit\n** evaluation to avoid computing both operands, if possible.\n**\n** The code generated might require the use of a temporary register.\n** If it does, then write the number of that temporary register\n** into *pTmpReg.  If not, leave *pTmpReg unchanged.\n*/\nstatic SQLITE_NOINLINE int exprCodeTargetAndOr(\n  Parse *pParse,     /* Parsing context */\n  Expr *pExpr,       /* AND or OR expression to be coded */\n  int target,        /* Put result in this register, guaranteed */\n  int *pTmpReg       /* Write a temporary register here */\n){\n  int op;            /* The opcode.  TK_AND or TK_OR */\n  int skipOp;        /* Opcode for the branch that skips one operand */\n  int addrSkip;      /* Branch instruction that skips one of the operands */\n  int regSS = 0;     /* Register holding computed operand when other omitted */\n  int r1, r2;        /* Registers for left and right operands, respectively */\n  Expr *pAlt;        /* Alternative, simplified expression */\n  Vdbe *v;           /* statement being coded */\n\n  assert( pExpr!=0 );\n  op = pExpr->op;\n  assert( op==TK_AND || op==TK_OR );\n  assert( TK_AND==OP_And );            testcase( op==TK_AND );\n  assert( TK_OR==OP_Or );              testcase( op==TK_OR );\n  assert( pParse->pVdbe!=0 );\n  v = pParse->pVdbe;\n  pAlt = sqlite3ExprSimplifiedAndOr(pExpr);\n  if( pAlt!=pExpr ){\n    r1 = sqlite3ExprCodeTarget(pParse, pAlt, target);\n    sqlite3VdbeAddOp3(v, OP_And, r1, r1, target);\n    return target;\n  }\n  skipOp = op==TK_AND ? OP_IfNot : OP_If;\n  if( exprEvalRhsFirst(pExpr) ){\n    /* Compute the right operand first.  Skip the computation of the left\n    ** operand if the right operand fully determines the result */\n    r2 = regSS = sqlite3ExprCodeTarget(pParse, pExpr->pRight, target);\n    addrSkip = sqlite3VdbeAddOp1(v, skipOp, r2);\n    VdbeComment((v, \"skip left operand\"));\n    VdbeCoverage(v);\n    r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, pTmpReg);\n  }else{\n    /* Compute the left operand first */\n    r1 = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);\n    if( ExprHasProperty(pExpr->pRight, EP_Subquery) ){\n      /* Skip over the computation of the right operand if the right\n      ** operand is a subquery and the left operand completely determines\n      ** the result */\n      regSS = r1;\n      addrSkip = sqlite3VdbeAddOp1(v, skipOp, r1);\n      VdbeComment((v, \"skip right operand\"));\n      VdbeCoverage(v);\n    }else{\n      addrSkip = regSS = 0;\n    }\n    r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, pTmpReg);\n  }\n  sqlite3VdbeAddOp3(v, op, r2, r1, target);\n  testcase( (*pTmpReg)==0 );\n  if( addrSkip ){\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2);\n    sqlite3VdbeJumpHere(v, addrSkip);\n    sqlite3VdbeAddOp3(v, OP_Or, regSS, regSS, target);\n    VdbeComment((v, \"short-circut value\"));\n  }\n  return target;\n}\n\n\n\n/*\n** Generate code into the current Vdbe to evaluate the given\n** expression.  Attempt to store the results in register \"target\".\n** Return the register where results are stored.\n**\n** With this routine, there is no guarantee that results will\n** be stored in target.  The result might be stored in some other\n** register if it is convenient to do so.  The calling function\n** must check the return code and move the results to the desired\n** register.\n*/\nSQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){\n  Vdbe *v = pParse->pVdbe;  /* The VM under construction */\n  int op;                   /* The opcode being coded */\n  int inReg = target;       /* Results stored in register inReg */\n  int regFree1 = 0;         /* If non-zero free this temporary register */\n  int regFree2 = 0;         /* If non-zero free this temporary register */\n  int r1, r2;               /* Various register numbers */\n  Expr tempX;               /* Temporary expression node */\n  int p5 = 0;\n\n  assert( target>0 && target<=pParse->nMem );\n  assert( v!=0 );\n\nexpr_code_doover:\n  if( pExpr==0 ){\n    op = TK_NULL;\n  }else if( pParse->pIdxEpr!=0\n   && !ExprHasProperty(pExpr, EP_Leaf)\n   && (r1 = sqlite3IndexedExprLookup(pParse, pExpr, target))>=0\n  ){\n    return r1;\n  }else{\n    assert( !ExprHasVVAProperty(pExpr,EP_Immutable) );\n    op = pExpr->op;\n  }\n  assert( op!=TK_ORDER );\n  switch( op ){\n    case TK_AGG_COLUMN: {\n      AggInfo *pAggInfo = pExpr->pAggInfo;\n      struct AggInfo_col *pCol;\n      assert( pAggInfo!=0 );\n      assert( pExpr->iAgg>=0 );\n      if( pExpr->iAgg>=pAggInfo->nColumn ){\n        /* Happens when the left table of a RIGHT JOIN is null and\n        ** is using an expression index */\n        sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n#ifdef SQLITE_VDBE_COVERAGE\n        /* Verify that the OP_Null above is exercised by tests\n        ** tag-20230325-2 */\n        sqlite3VdbeAddOp3(v, OP_NotNull, target, 1, 20230325);\n        VdbeCoverageNeverTaken(v);\n#endif\n        break;\n      }\n      pCol = &pAggInfo->aCol[pExpr->iAgg];\n      if( !pAggInfo->directMode ){\n        return AggInfoColumnReg(pAggInfo, pExpr->iAgg);\n      }else if( pAggInfo->useSortingIdx ){\n        Table *pTab = pCol->pTab;\n        sqlite3VdbeAddOp3(v, OP_Column, pAggInfo->sortingIdxPTab,\n                              pCol->iSorterColumn, target);\n        if( pTab==0 ){\n          /* No comment added */\n        }else if( pCol->iColumn<0 ){\n          VdbeComment((v,\"%s.rowid\",pTab->zName));\n        }else{\n          VdbeComment((v,\"%s.%s\",\n              pTab->zName, pTab->aCol[pCol->iColumn].zCnName));\n          if( pTab->aCol[pCol->iColumn].affinity==SQLITE_AFF_REAL ){\n            sqlite3VdbeAddOp1(v, OP_RealAffinity, target);\n          }\n        }\n        return target;\n      }else if( pExpr->y.pTab==0 ){\n        /* This case happens when the argument to an aggregate function\n        ** is rewritten by aggregateConvertIndexedExprRefToColumn() */\n        sqlite3VdbeAddOp3(v, OP_Column, pExpr->iTable, pExpr->iColumn, target);\n        return target;\n      }\n      /* Otherwise, fall thru into the TK_COLUMN case */\n      /* no break */ deliberate_fall_through\n    }\n    case TK_COLUMN: {\n      int iTab = pExpr->iTable;\n      int iReg;\n      if( ExprHasProperty(pExpr, EP_FixedCol) ){\n        /* This COLUMN expression is really a constant due to WHERE clause\n        ** constraints, and that constant is coded by the pExpr->pLeft\n        ** expression.  However, make sure the constant has the correct\n        ** datatype by applying the Affinity of the table column to the\n        ** constant.\n        */\n        int aff;\n        iReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft,target);\n        assert( ExprUseYTab(pExpr) );\n        assert( pExpr->y.pTab!=0 );\n        aff = sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn);\n        if( aff>SQLITE_AFF_BLOB ){\n          static const char zAff[] = \"B\\000C\\000D\\000E\\000F\";\n          assert( SQLITE_AFF_BLOB=='A' );\n          assert( SQLITE_AFF_TEXT=='B' );\n          sqlite3VdbeAddOp4(v, OP_Affinity, iReg, 1, 0,\n                            &zAff[(aff-'B')*2], P4_STATIC);\n        }\n        return iReg;\n      }\n      if( iTab<0 ){\n        if( pParse->iSelfTab<0 ){\n          /* Other columns in the same row for CHECK constraints or\n          ** generated columns or for inserting into partial index.\n          ** The row is unpacked into registers beginning at\n          ** 0-(pParse->iSelfTab).  The rowid (if any) is in a register\n          ** immediately prior to the first column.\n          */\n          Column *pCol;\n          Table *pTab;\n          int iSrc;\n          int iCol = pExpr->iColumn;\n          assert( ExprUseYTab(pExpr) );\n          pTab = pExpr->y.pTab;\n          assert( pTab!=0 );\n          assert( iCol>=XN_ROWID );\n          assert( iCol<pTab->nCol );\n          if( iCol<0 ){\n            return -1-pParse->iSelfTab;\n          }\n          pCol = pTab->aCol + iCol;\n          testcase( iCol!=sqlite3TableColumnToStorage(pTab,iCol) );\n          iSrc = sqlite3TableColumnToStorage(pTab, iCol) - pParse->iSelfTab;\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n          if( pCol->colFlags & COLFLAG_GENERATED ){\n            if( pCol->colFlags & COLFLAG_BUSY ){\n              sqlite3ErrorMsg(pParse, \"generated column loop on \\\"%s\\\"\",\n                              pCol->zCnName);\n              return 0;\n            }\n            pCol->colFlags |= COLFLAG_BUSY;\n            if( pCol->colFlags & COLFLAG_NOTAVAIL ){\n              sqlite3ExprCodeGeneratedColumn(pParse, pTab, pCol, iSrc);\n            }\n            pCol->colFlags &= ~(COLFLAG_BUSY|COLFLAG_NOTAVAIL);\n            return iSrc;\n          }else\n#endif /* SQLITE_OMIT_GENERATED_COLUMNS */\n          if( pCol->affinity==SQLITE_AFF_REAL ){\n            sqlite3VdbeAddOp2(v, OP_SCopy, iSrc, target);\n            sqlite3VdbeAddOp1(v, OP_RealAffinity, target);\n            return target;\n          }else{\n            return iSrc;\n          }\n        }else{\n          /* Coding an expression that is part of an index where column names\n          ** in the index refer to the table to which the index belongs */\n          iTab = pParse->iSelfTab - 1;\n        }\n      }\n      else if( pParse->pIdxPartExpr\n       && 0!=(r1 = exprPartidxExprLookup(pParse, pExpr, target))\n      ){\n        return r1;\n      }\n      assert( ExprUseYTab(pExpr) );\n      assert( pExpr->y.pTab!=0 );\n      iReg = sqlite3ExprCodeGetColumn(pParse, pExpr->y.pTab,\n                               pExpr->iColumn, iTab, target,\n                               pExpr->op2);\n      return iReg;\n    }\n    case TK_INTEGER: {\n      codeInteger(pParse, pExpr, 0, target);\n      return target;\n    }\n    case TK_TRUEFALSE: {\n      sqlite3VdbeAddOp2(v, OP_Integer, sqlite3ExprTruthValue(pExpr), target);\n      return target;\n    }\n#ifndef SQLITE_OMIT_FLOATING_POINT\n    case TK_FLOAT: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      codeReal(v, pExpr->u.zToken, 0, target);\n      return target;\n    }\n#endif\n    case TK_STRING: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3VdbeLoadString(v, target, pExpr->u.zToken);\n      return target;\n    }\n    case TK_NULLS: {\n      /* Set a range of registers to NULL.  pExpr->y.nReg registers starting\n      ** with target */\n      sqlite3VdbeAddOp3(v, OP_Null, 0, target, target + pExpr->y.nReg - 1);\n      return target;\n    }\n    default: {\n      /* Make NULL the default case so that if a bug causes an illegal\n      ** Expr node to be passed into this function, it will be handled\n      ** sanely and not crash.  But keep the assert() to bring the problem\n      ** to the attention of the developers. */\n      assert( op==TK_NULL || op==TK_ERROR || pParse->db->mallocFailed );\n      sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n      return target;\n    }\n#ifndef SQLITE_OMIT_BLOB_LITERAL\n    case TK_BLOB: {\n      int n;\n      const char *z;\n      char *zBlob;\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );\n      assert( pExpr->u.zToken[1]=='\\'' );\n      z = &pExpr->u.zToken[2];\n      n = sqlite3Strlen30(z) - 1;\n      assert( z[n]=='\\'' );\n      zBlob = sqlite3HexToBlob(sqlite3VdbeDb(v), z, n);\n      sqlite3VdbeAddOp4(v, OP_Blob, n/2, target, 0, zBlob, P4_DYNAMIC);\n      return target;\n    }\n#endif\n    case TK_VARIABLE: {\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      assert( pExpr->u.zToken!=0 );\n      assert( pExpr->u.zToken[0]!=0 );\n      sqlite3VdbeAddOp2(v, OP_Variable, pExpr->iColumn, target);\n      return target;\n    }\n    case TK_REGISTER: {\n      return pExpr->iTable;\n    }\n#ifndef SQLITE_OMIT_CAST\n    case TK_CAST: {\n      /* Expressions of the form:   CAST(pLeft AS token) */\n      sqlite3ExprCode(pParse, pExpr->pLeft, target);\n      assert( inReg==target );\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      sqlite3VdbeAddOp2(v, OP_Cast, target,\n                        sqlite3AffinityType(pExpr->u.zToken, 0));\n      return inReg;\n    }\n#endif /* SQLITE_OMIT_CAST */\n    case TK_IS:\n    case TK_ISNOT:\n      op = (op==TK_IS) ? TK_EQ : TK_NE;\n      p5 = SQLITE_NULLEQ;\n      /* fall-through */\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE:\n    case TK_NE:\n    case TK_EQ: {\n      Expr *pLeft = pExpr->pLeft;\n      int addrIsNull = 0;\n      if( sqlite3ExprIsVector(pLeft) ){\n        codeVectorCompare(pParse, pExpr, target, op, p5);\n      }else{\n        if( ExprHasProperty(pExpr, EP_Subquery) && p5!=SQLITE_NULLEQ ){\n          addrIsNull = exprComputeOperands(pParse, pExpr,\n                                     &r1, &r2, &regFree1, &regFree2);\n        }else{\n          r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n          r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);\n        }\n        sqlite3VdbeAddOp2(v, OP_Integer, 1, inReg);\n        codeCompare(pParse, pLeft, pExpr->pRight, op, r1, r2,\n            sqlite3VdbeCurrentAddr(v)+2, p5,\n            ExprHasProperty(pExpr,EP_Commuted));\n        assert(TK_LT==OP_Lt); testcase(op==OP_Lt); VdbeCoverageIf(v,op==OP_Lt);\n        assert(TK_LE==OP_Le); testcase(op==OP_Le); VdbeCoverageIf(v,op==OP_Le);\n        assert(TK_GT==OP_Gt); testcase(op==OP_Gt); VdbeCoverageIf(v,op==OP_Gt);\n        assert(TK_GE==OP_Ge); testcase(op==OP_Ge); VdbeCoverageIf(v,op==OP_Ge);\n        assert(TK_EQ==OP_Eq); testcase(op==OP_Eq); VdbeCoverageIf(v,op==OP_Eq);\n        assert(TK_NE==OP_Ne); testcase(op==OP_Ne); VdbeCoverageIf(v,op==OP_Ne);\n        if( p5==SQLITE_NULLEQ ){\n          sqlite3VdbeAddOp2(v, OP_Integer, 0, inReg);\n        }else{\n          sqlite3VdbeAddOp3(v, OP_ZeroOrNull, r1, inReg, r2);\n          if( addrIsNull ){\n            sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2);\n            sqlite3VdbeJumpHere(v, addrIsNull);\n            sqlite3VdbeAddOp2(v, OP_Null, 0, inReg);\n          }\n        }\n        testcase( regFree1==0 );\n        testcase( regFree2==0 );\n      }\n      break;\n    }\n    case TK_AND:\n    case TK_OR: {\n      inReg = exprCodeTargetAndOr(pParse, pExpr, target, &regFree1);\n      break;\n    }\n    case TK_PLUS:\n    case TK_STAR:\n    case TK_MINUS:\n    case TK_REM:\n    case TK_BITAND:\n    case TK_BITOR:\n    case TK_SLASH:\n    case TK_LSHIFT:\n    case TK_RSHIFT:\n    case TK_CONCAT: {\n      int addrIsNull;\n      assert( TK_PLUS==OP_Add );           testcase( op==TK_PLUS );\n      assert( TK_MINUS==OP_Subtract );     testcase( op==TK_MINUS );\n      assert( TK_REM==OP_Remainder );      testcase( op==TK_REM );\n      assert( TK_BITAND==OP_BitAnd );      testcase( op==TK_BITAND );\n      assert( TK_BITOR==OP_BitOr );        testcase( op==TK_BITOR );\n      assert( TK_SLASH==OP_Divide );       testcase( op==TK_SLASH );\n      assert( TK_LSHIFT==OP_ShiftLeft );   testcase( op==TK_LSHIFT );\n      assert( TK_RSHIFT==OP_ShiftRight );  testcase( op==TK_RSHIFT );\n      assert( TK_CONCAT==OP_Concat );      testcase( op==TK_CONCAT );\n      if( ExprHasProperty(pExpr, EP_Subquery) ){\n        addrIsNull = exprComputeOperands(pParse, pExpr,\n                                   &r1, &r2, &regFree1, &regFree2);\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);\n        addrIsNull = 0;\n      }\n      sqlite3VdbeAddOp3(v, op, r2, r1, target);\n      testcase( regFree1==0 );\n      testcase( regFree2==0 );\n      if( addrIsNull ){\n        sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2);\n        sqlite3VdbeJumpHere(v, addrIsNull);\n        sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n        VdbeComment((v, \"short-circut value\"));\n      }\n      break;\n    }\n    case TK_UMINUS: {\n      Expr *pLeft = pExpr->pLeft;\n      assert( pLeft );\n      if( pLeft->op==TK_INTEGER ){\n        codeInteger(pParse, pLeft, 1, target);\n        return target;\n#ifndef SQLITE_OMIT_FLOATING_POINT\n      }else if( pLeft->op==TK_FLOAT ){\n        assert( !ExprHasProperty(pExpr, EP_IntValue) );\n        codeReal(v, pLeft->u.zToken, 1, target);\n        return target;\n#endif\n      }else{\n        tempX.op = TK_INTEGER;\n        tempX.flags = EP_IntValue|EP_TokenOnly;\n        tempX.u.iValue = 0;\n        ExprClearVVAProperties(&tempX);\n        r1 = sqlite3ExprCodeTemp(pParse, &tempX, &regFree1);\n        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree2);\n        sqlite3VdbeAddOp3(v, OP_Subtract, r2, r1, target);\n        testcase( regFree2==0 );\n      }\n      break;\n    }\n    case TK_BITNOT:\n    case TK_NOT: {\n      assert( TK_BITNOT==OP_BitNot );   testcase( op==TK_BITNOT );\n      assert( TK_NOT==OP_Not );         testcase( op==TK_NOT );\n      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n      testcase( regFree1==0 );\n      sqlite3VdbeAddOp2(v, op, r1, inReg);\n      break;\n    }\n    case TK_TRUTH: {\n      int isTrue;    /* IS TRUE or IS NOT TRUE */\n      int bNormal;   /* IS TRUE or IS FALSE */\n      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n      testcase( regFree1==0 );\n      isTrue = sqlite3ExprTruthValue(pExpr->pRight);\n      bNormal = pExpr->op2==TK_IS;\n      testcase( isTrue && bNormal);\n      testcase( !isTrue && bNormal);\n      sqlite3VdbeAddOp4Int(v, OP_IsTrue, r1, inReg, !isTrue, isTrue ^ bNormal);\n      break;\n    }\n    case TK_ISNULL:\n    case TK_NOTNULL: {\n      int addr;\n      assert( TK_ISNULL==OP_IsNull );   testcase( op==TK_ISNULL );\n      assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL );\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, target);\n      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n      testcase( regFree1==0 );\n      addr = sqlite3VdbeAddOp1(v, op, r1);\n      VdbeCoverageIf(v, op==TK_ISNULL);\n      VdbeCoverageIf(v, op==TK_NOTNULL);\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, target);\n      sqlite3VdbeJumpHere(v, addr);\n      break;\n    }\n    case TK_AGG_FUNCTION: {\n      AggInfo *pInfo = pExpr->pAggInfo;\n      if( pInfo==0\n       || NEVER(pExpr->iAgg<0)\n       || NEVER(pExpr->iAgg>=pInfo->nFunc)\n      ){\n        assert( !ExprHasProperty(pExpr, EP_IntValue) );\n        sqlite3ErrorMsg(pParse, \"misuse of aggregate: %#T()\", pExpr);\n      }else{\n        return AggInfoFuncReg(pInfo, pExpr->iAgg);\n      }\n      break;\n    }\n    case TK_FUNCTION: {\n      ExprList *pFarg;       /* List of function arguments */\n      int nFarg;             /* Number of function arguments */\n      FuncDef *pDef;         /* The function definition object */\n      const char *zId;       /* The function name */\n      u32 constMask = 0;     /* Mask of function arguments that are constant */\n      int i;                 /* Loop counter */\n      sqlite3 *db = pParse->db;  /* The database connection */\n      u8 enc = ENC(db);      /* The text encoding used by this database */\n      CollSeq *pColl = 0;    /* A collating sequence */\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( ExprHasProperty(pExpr, EP_WinFunc) ){\n        return pExpr->y.pWin->regResult;\n      }\n#endif\n\n      if( ConstFactorOk(pParse)\n       && sqlite3ExprIsConstantNotJoin(pParse,pExpr)\n      ){\n        /* SQL functions can be expensive. So try to avoid running them\n        ** multiple times if we know they always give the same result */\n        return sqlite3ExprCodeRunJustOnce(pParse, pExpr, -1);\n      }\n      assert( !ExprHasProperty(pExpr, EP_TokenOnly) );\n      assert( ExprUseXList(pExpr) );\n      pFarg = pExpr->x.pList;\n      nFarg = pFarg ? pFarg->nExpr : 0;\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      zId = pExpr->u.zToken;\n      pDef = sqlite3FindFunction(db, zId, nFarg, enc, 0);\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n      if( pDef==0 && pParse->explain ){\n        pDef = sqlite3FindFunction(db, \"unknown\", nFarg, enc, 0);\n      }\n#endif\n      if( pDef==0 || pDef->xFinalize!=0 ){\n        sqlite3ErrorMsg(pParse, \"unknown function: %#T()\", pExpr);\n        break;\n      }\n      if( (pDef->funcFlags & SQLITE_FUNC_INLINE)!=0 && ALWAYS(pFarg!=0) ){\n        assert( (pDef->funcFlags & SQLITE_FUNC_UNSAFE)==0 );\n        assert( (pDef->funcFlags & SQLITE_FUNC_DIRECT)==0 );\n        return exprCodeInlineFunction(pParse, pFarg,\n             SQLITE_PTR_TO_INT(pDef->pUserData), target);\n      }else if( pDef->funcFlags & (SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) ){\n        sqlite3ExprFunctionUsable(pParse, pExpr, pDef);\n      }\n\n      for(i=0; i<nFarg; i++){\n        if( i<32 && sqlite3ExprIsConstant(pParse, pFarg->a[i].pExpr) ){\n          testcase( i==31 );\n          constMask |= MASKBIT32(i);\n        }\n        if( (pDef->funcFlags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){\n          pColl = sqlite3ExprCollSeq(pParse, pFarg->a[i].pExpr);\n        }\n      }\n      if( pFarg ){\n        if( constMask ){\n          r1 = pParse->nMem+1;\n          pParse->nMem += nFarg;\n        }else{\n          r1 = sqlite3GetTempRange(pParse, nFarg);\n        }\n\n        /* For length() and typeof() and octet_length() functions,\n        ** set the P5 parameter to the OP_Column opcode to OPFLAG_LENGTHARG\n        ** or OPFLAG_TYPEOFARG or OPFLAG_BYTELENARG respectively, to avoid\n        ** unnecessary data loading.\n        */\n        if( (pDef->funcFlags & (SQLITE_FUNC_LENGTH|SQLITE_FUNC_TYPEOF))!=0 ){\n          u8 exprOp;\n          assert( nFarg==1 );\n          assert( pFarg->a[0].pExpr!=0 );\n          exprOp = pFarg->a[0].pExpr->op;\n          if( exprOp==TK_COLUMN || exprOp==TK_AGG_COLUMN ){\n            assert( SQLITE_FUNC_LENGTH==OPFLAG_LENGTHARG );\n            assert( SQLITE_FUNC_TYPEOF==OPFLAG_TYPEOFARG );\n            assert( SQLITE_FUNC_BYTELEN==OPFLAG_BYTELENARG );\n            assert( (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG)==OPFLAG_BYTELENARG );\n            testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_LENGTHARG );\n            testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_TYPEOFARG );\n            testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_BYTELENARG);\n            pFarg->a[0].pExpr->op2 = pDef->funcFlags & OPFLAG_BYTELENARG;\n          }\n        }\n\n        sqlite3ExprCodeExprList(pParse, pFarg, r1, 0, SQLITE_ECEL_FACTOR);\n      }else{\n        r1 = 0;\n      }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n      /* Possibly overload the function if the first argument is\n      ** a virtual table column.\n      **\n      ** For infix functions (LIKE, GLOB, REGEXP, and MATCH) use the\n      ** second argument, not the first, as the argument to test to\n      ** see if it is a column in a virtual table.  This is done because\n      ** the left operand of infix functions (the operand we want to\n      ** control overloading) ends up as the second argument to the\n      ** function.  The expression \"A glob B\" is equivalent to\n      ** \"glob(B,A).  We want to use the A in \"A glob B\" to test\n      ** for function overloading.  But we use the B term in \"glob(B,A)\".\n      */\n      if( nFarg>=2 && ExprHasProperty(pExpr, EP_InfixFunc) ){\n        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[1].pExpr);\n      }else if( nFarg>0 ){\n        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[0].pExpr);\n      }\n#endif\n      if( pDef->funcFlags & SQLITE_FUNC_NEEDCOLL ){\n        if( !pColl ) pColl = db->pDfltColl;\n        sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);\n      }\n      sqlite3VdbeAddFunctionCall(pParse, constMask, r1, target, nFarg,\n                                 pDef, pExpr->op2);\n      if( nFarg ){\n        if( constMask==0 ){\n          sqlite3ReleaseTempRange(pParse, r1, nFarg);\n        }else{\n          sqlite3VdbeReleaseRegisters(pParse, r1, nFarg, constMask, 1);\n        }\n      }\n      return target;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_EXISTS:\n    case TK_SELECT: {\n      int nCol;\n      testcase( op==TK_EXISTS );\n      testcase( op==TK_SELECT );\n      if( pParse->db->mallocFailed ){\n        return 0;\n      }else if( op==TK_SELECT\n             && ALWAYS( ExprUseXSelect(pExpr) )\n             && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1\n      ){\n        sqlite3SubselectError(pParse, nCol, 1);\n      }else{\n        return sqlite3CodeSubselect(pParse, pExpr);\n      }\n      break;\n    }\n    case TK_SELECT_COLUMN: {\n      int n;\n      Expr *pLeft = pExpr->pLeft;\n      if( pLeft->iTable==0 || pParse->withinRJSubrtn > pLeft->op2 ){\n        pLeft->iTable = sqlite3CodeSubselect(pParse, pLeft);\n        pLeft->op2 = pParse->withinRJSubrtn;\n      }\n      assert( pLeft->op==TK_SELECT || pLeft->op==TK_ERROR );\n      n = sqlite3ExprVectorSize(pLeft);\n      if( pExpr->iTable!=n ){\n        sqlite3ErrorMsg(pParse, \"%d columns assigned %d values\",\n                                pExpr->iTable, n);\n      }\n      return pLeft->iTable + pExpr->iColumn;\n    }\n    case TK_IN: {\n      int destIfFalse = sqlite3VdbeMakeLabel(pParse);\n      int destIfNull = sqlite3VdbeMakeLabel(pParse);\n      sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n      sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, target);\n      sqlite3VdbeResolveLabel(v, destIfFalse);\n      sqlite3VdbeAddOp2(v, OP_AddImm, target, 0);\n      sqlite3VdbeResolveLabel(v, destIfNull);\n      return target;\n    }\n#endif /* SQLITE_OMIT_SUBQUERY */\n\n\n    /*\n    **    x BETWEEN y AND z\n    **\n    ** This is equivalent to\n    **\n    **    x>=y AND x<=z\n    **\n    ** X is stored in pExpr->pLeft.\n    ** Y is stored in pExpr->pList->a[0].pExpr.\n    ** Z is stored in pExpr->pList->a[1].pExpr.\n    */\n    case TK_BETWEEN: {\n      exprCodeBetween(pParse, pExpr, target, 0, 0);\n      return target;\n    }\n    case TK_COLLATE: {\n      if( !ExprHasProperty(pExpr, EP_Collate) ){\n        /* A TK_COLLATE Expr node without the EP_Collate tag is a so-called\n        ** \"SOFT-COLLATE\" that is added to constraints that are pushed down\n        ** from outer queries into sub-queries by the WHERE-clause push-down\n        ** optimization. Clear subtypes as subtypes may not cross a subquery\n        ** boundary.\n        */\n        assert( pExpr->pLeft );\n        sqlite3ExprCode(pParse, pExpr->pLeft, target);\n        sqlite3VdbeAddOp1(v, OP_ClrSubtype, target);\n        return target;\n      }else{\n        pExpr = pExpr->pLeft;\n        goto expr_code_doover; /* 2018-04-28: Prevent deep recursion. */\n      }\n    }\n    case TK_SPAN:\n    case TK_UPLUS: {\n      pExpr = pExpr->pLeft;\n      goto expr_code_doover; /* 2018-04-28: Prevent deep recursion. OSSFuzz. */\n    }\n\n    case TK_TRIGGER: {\n      /* If the opcode is TK_TRIGGER, then the expression is a reference\n      ** to a column in the new.* or old.* pseudo-tables available to\n      ** trigger programs. In this case Expr.iTable is set to 1 for the\n      ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn\n      ** is set to the column of the pseudo-table to read, or to -1 to\n      ** read the rowid field.\n      **\n      ** The expression is implemented using an OP_Param opcode. The p1\n      ** parameter is set to 0 for an old.rowid reference, or to (i+1)\n      ** to reference another column of the old.* pseudo-table, where\n      ** i is the index of the column. For a new.rowid reference, p1 is\n      ** set to (n+1), where n is the number of columns in each pseudo-table.\n      ** For a reference to any other column in the new.* pseudo-table, p1\n      ** is set to (n+2+i), where n and i are as defined previously. For\n      ** example, if the table on which triggers are being fired is\n      ** declared as:\n      **\n      **   CREATE TABLE t1(a, b);\n      **\n      ** Then p1 is interpreted as follows:\n      **\n      **   p1==0   ->    old.rowid     p1==3   ->    new.rowid\n      **   p1==1   ->    old.a         p1==4   ->    new.a\n      **   p1==2   ->    old.b         p1==5   ->    new.b\n      */\n      Table *pTab;\n      int iCol;\n      int p1;\n\n      assert( ExprUseYTab(pExpr) );\n      pTab = pExpr->y.pTab;\n      iCol = pExpr->iColumn;\n      p1 = pExpr->iTable * (pTab->nCol+1) + 1\n                     + sqlite3TableColumnToStorage(pTab, iCol);\n\n      assert( pExpr->iTable==0 || pExpr->iTable==1 );\n      assert( iCol>=-1 && iCol<pTab->nCol );\n      assert( pTab->iPKey<0 || iCol!=pTab->iPKey );\n      assert( p1>=0 && p1<(pTab->nCol*2+2) );\n\n      sqlite3VdbeAddOp2(v, OP_Param, p1, target);\n      VdbeComment((v, \"r[%d]=%s.%s\", target,\n        (pExpr->iTable ? \"new\" : \"old\"),\n        (pExpr->iColumn<0 ? \"rowid\" : pExpr->y.pTab->aCol[iCol].zCnName)\n      ));\n\n#ifndef SQLITE_OMIT_FLOATING_POINT\n      /* If the column has REAL affinity, it may currently be stored as an\n      ** integer. Use OP_RealAffinity to make sure it is really real.\n      **\n      ** EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to\n      ** floating point when extracting it from the record.  */\n      if( iCol>=0 && pTab->aCol[iCol].affinity==SQLITE_AFF_REAL ){\n        sqlite3VdbeAddOp1(v, OP_RealAffinity, target);\n      }\n#endif\n      break;\n    }\n\n    case TK_VECTOR: {\n      sqlite3ErrorMsg(pParse, \"row value misused\");\n      break;\n    }\n\n    /* TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions\n    ** that derive from the right-hand table of a LEFT JOIN.  The\n    ** Expr.iTable value is the table number for the right-hand table.\n    ** The expression is only evaluated if that table is not currently\n    ** on a LEFT JOIN NULL row.\n    */\n    case TK_IF_NULL_ROW: {\n      int addrINR;\n      u8 okConstFactor = pParse->okConstFactor;\n      AggInfo *pAggInfo = pExpr->pAggInfo;\n      if( pAggInfo ){\n        assert( pExpr->iAgg>=0 && pExpr->iAgg<pAggInfo->nColumn );\n        if( !pAggInfo->directMode ){\n          inReg = AggInfoColumnReg(pAggInfo, pExpr->iAgg);\n          break;\n        }\n        if( pExpr->pAggInfo->useSortingIdx ){\n          sqlite3VdbeAddOp3(v, OP_Column, pAggInfo->sortingIdxPTab,\n                            pAggInfo->aCol[pExpr->iAgg].iSorterColumn,\n                            target);\n          inReg = target;\n          break;\n        }\n      }\n      addrINR = sqlite3VdbeAddOp3(v, OP_IfNullRow, pExpr->iTable, 0, target);\n      /* The OP_IfNullRow opcode above can overwrite the result register with\n      ** NULL.  So we have to ensure that the result register is not a value\n      ** that is suppose to be a constant.  Two defenses are needed:\n      **   (1)  Temporarily disable factoring of constant expressions\n      **   (2)  Make sure the computed value really is stored in register\n      **        \"target\" and not someplace else.\n      */\n      pParse->okConstFactor = 0;   /* note (1) above */\n      sqlite3ExprCode(pParse, pExpr->pLeft, target);\n      assert( target==inReg );\n      pParse->okConstFactor = okConstFactor;\n      sqlite3VdbeJumpHere(v, addrINR);\n      break;\n    }\n\n    /*\n    ** Form A:\n    **   CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END\n    **\n    ** Form B:\n    **   CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END\n    **\n    ** Form A is can be transformed into the equivalent form B as follows:\n    **   CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ...\n    **        WHEN x=eN THEN rN ELSE y END\n    **\n    ** X (if it exists) is in pExpr->pLeft.\n    ** Y is in the last element of pExpr->x.pList if pExpr->x.pList->nExpr is\n    ** odd.  The Y is also optional.  If the number of elements in x.pList\n    ** is even, then Y is omitted and the \"otherwise\" result is NULL.\n    ** Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1].\n    **\n    ** The result of the expression is the Ri for the first matching Ei,\n    ** or if there is no matching Ei, the ELSE term Y, or if there is\n    ** no ELSE term, NULL.\n    */\n    case TK_CASE: {\n      int endLabel;                     /* GOTO label for end of CASE stmt */\n      int nextCase;                     /* GOTO label for next WHEN clause */\n      int nExpr;                        /* 2x number of WHEN terms */\n      int i;                            /* Loop counter */\n      ExprList *pEList;                 /* List of WHEN terms */\n      struct ExprList_item *aListelem;  /* Array of WHEN terms */\n      Expr opCompare;                   /* The X==Ei expression */\n      Expr *pX;                         /* The X expression */\n      Expr *pTest = 0;                  /* X==Ei (form A) or just Ei (form B) */\n      Expr *pDel = 0;\n      sqlite3 *db = pParse->db;\n\n      assert( ExprUseXList(pExpr) && pExpr->x.pList!=0 );\n      assert(pExpr->x.pList->nExpr > 0);\n      pEList = pExpr->x.pList;\n      aListelem = pEList->a;\n      nExpr = pEList->nExpr;\n      endLabel = sqlite3VdbeMakeLabel(pParse);\n      if( (pX = pExpr->pLeft)!=0 ){\n        pDel = sqlite3ExprDup(db, pX, 0);\n        if( db->mallocFailed ){\n          sqlite3ExprDelete(db, pDel);\n          break;\n        }\n        testcase( pX->op==TK_COLUMN );\n        sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, &regFree1));\n        testcase( regFree1==0 );\n        memset(&opCompare, 0, sizeof(opCompare));\n        opCompare.op = TK_EQ;\n        opCompare.pLeft = pDel;\n        pTest = &opCompare;\n        /* Ticket b351d95f9cd5ef17e9d9dbae18f5ca8611190001:\n        ** The value in regFree1 might get SCopy-ed into the file result.\n        ** So make sure that the regFree1 register is not reused for other\n        ** purposes and possibly overwritten.  */\n        regFree1 = 0;\n      }\n      for(i=0; i<nExpr-1; i=i+2){\n        if( pX ){\n          assert( pTest!=0 );\n          opCompare.pRight = aListelem[i].pExpr;\n        }else{\n          pTest = aListelem[i].pExpr;\n        }\n        nextCase = sqlite3VdbeMakeLabel(pParse);\n        testcase( pTest->op==TK_COLUMN );\n        sqlite3ExprIfFalse(pParse, pTest, nextCase, SQLITE_JUMPIFNULL);\n        testcase( aListelem[i+1].pExpr->op==TK_COLUMN );\n        sqlite3ExprCode(pParse, aListelem[i+1].pExpr, target);\n        sqlite3VdbeGoto(v, endLabel);\n        sqlite3VdbeResolveLabel(v, nextCase);\n      }\n      if( (nExpr&1)!=0 ){\n        sqlite3ExprCode(pParse, pEList->a[nExpr-1].pExpr, target);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Null, 0, target);\n      }\n      sqlite3ExprDelete(db, pDel);\n      setDoNotMergeFlagOnCopy(v);\n      sqlite3VdbeResolveLabel(v, endLabel);\n      break;\n    }\n#ifndef SQLITE_OMIT_TRIGGER\n    case TK_RAISE: {\n      assert( pExpr->affExpr==OE_Rollback\n           || pExpr->affExpr==OE_Abort\n           || pExpr->affExpr==OE_Fail\n           || pExpr->affExpr==OE_Ignore\n      );\n      if( !pParse->pTriggerTab && !pParse->nested ){\n        sqlite3ErrorMsg(pParse,\n                       \"RAISE() may only be used within a trigger-program\");\n        return 0;\n      }\n      if( pExpr->affExpr==OE_Abort ){\n        sqlite3MayAbort(pParse);\n      }\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      if( pExpr->affExpr==OE_Ignore ){\n        sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, OE_Ignore);\n        VdbeCoverage(v);\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n        sqlite3VdbeAddOp3(v, OP_Halt,\n             pParse->pTriggerTab ? SQLITE_CONSTRAINT_TRIGGER : SQLITE_ERROR,\n             pExpr->affExpr, r1);\n      }\n      break;\n    }\n#endif\n  }\n  sqlite3ReleaseTempReg(pParse, regFree1);\n  sqlite3ReleaseTempReg(pParse, regFree2);\n  return inReg;\n}\n\n/*\n** Generate code that will evaluate expression pExpr just one time\n** per prepared statement execution.\n**\n** If the expression uses functions (that might throw an exception) then\n** guard them with an OP_Once opcode to ensure that the code is only executed\n** once. If no functions are involved, then factor the code out and put it at\n** the end of the prepared statement in the initialization section.\n**\n** If regDest>0 then the result is always stored in that register and the\n** result is not reusable.  If regDest<0 then this routine is free to\n** store the value wherever it wants.  The register where the expression\n** is stored is returned.  When regDest<0, two identical expressions might\n** code to the same register, if they do not contain function calls and hence\n** are factored out into the initialization section at the end of the\n** prepared statement.\n*/\nSQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(\n  Parse *pParse,    /* Parsing context */\n  Expr *pExpr,      /* The expression to code when the VDBE initializes */\n  int regDest       /* Store the value in this register */\n){\n  ExprList *p;\n  assert( ConstFactorOk(pParse) );\n  assert( regDest!=0 );\n  p = pParse->pConstExpr;\n  if( regDest<0 && p ){\n    struct ExprList_item *pItem;\n    int i;\n    for(pItem=p->a, i=p->nExpr; i>0; pItem++, i--){\n      if( pItem->fg.reusable\n       && sqlite3ExprCompare(0,pItem->pExpr,pExpr,-1)==0\n      ){\n        return pItem->u.iConstExprReg;\n      }\n    }\n  }\n  pExpr = sqlite3ExprDup(pParse->db, pExpr, 0);\n  if( pExpr!=0 && ExprHasProperty(pExpr, EP_HasFunc) ){\n    Vdbe *v = pParse->pVdbe;\n    int addr;\n    assert( v );\n    addr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n    pParse->okConstFactor = 0;\n    if( !pParse->db->mallocFailed ){\n      if( regDest<0 ) regDest = ++pParse->nMem;\n      sqlite3ExprCode(pParse, pExpr, regDest);\n    }\n    pParse->okConstFactor = 1;\n    sqlite3ExprDelete(pParse->db, pExpr);\n    sqlite3VdbeJumpHere(v, addr);\n  }else{\n    p = sqlite3ExprListAppend(pParse, p, pExpr);\n    if( p ){\n       struct ExprList_item *pItem = &p->a[p->nExpr-1];\n       pItem->fg.reusable = regDest<0;\n       if( regDest<0 ) regDest = ++pParse->nMem;\n       pItem->u.iConstExprReg = regDest;\n    }\n    pParse->pConstExpr = p;\n  }\n  return regDest;\n}\n\n/*\n** Make arrangements to invoke OP_Null on a range of registers\n** during initialization.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE void sqlite3ExprNullRegisterRange(\n  Parse *pParse,   /* Parsing context */\n  int iReg,        /* First register to set to NULL */\n  int nReg         /* Number of sequential registers to NULL out */\n){\n  u8 okConstFactor = pParse->okConstFactor;\n  Expr t;\n  memset(&t, 0, sizeof(t));\n  t.op = TK_NULLS;\n  t.y.nReg = nReg;\n  pParse->okConstFactor = 1;\n  sqlite3ExprCodeRunJustOnce(pParse, &t, iReg);\n  pParse->okConstFactor = okConstFactor;\n}\n\n/*\n** Generate code to evaluate an expression and store the results\n** into a register.  Return the register number where the results\n** are stored.\n**\n** If the register is a temporary register that can be deallocated,\n** then write its number into *pReg.  If the result register is not\n** a temporary, then set *pReg to zero.\n**\n** If pExpr is a constant, then this routine might generate this\n** code to fill the register in the initialization section of the\n** VDBE program, in order to factor it out of the evaluation loop.\n*/\nSQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){\n  int r2;\n  pExpr = sqlite3ExprSkipCollateAndLikely(pExpr);\n  if( ConstFactorOk(pParse)\n   && ALWAYS(pExpr!=0)\n   && pExpr->op!=TK_REGISTER\n   && sqlite3ExprIsConstantNotJoin(pParse, pExpr)\n  ){\n    *pReg  = 0;\n    r2 = sqlite3ExprCodeRunJustOnce(pParse, pExpr, -1);\n  }else{\n    int r1 = sqlite3GetTempReg(pParse);\n    r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);\n    if( r2==r1 ){\n      *pReg = r1;\n    }else{\n      sqlite3ReleaseTempReg(pParse, r1);\n      *pReg = 0;\n    }\n  }\n  return r2;\n}\n\n/*\n** Generate code that will evaluate expression pExpr and store the\n** results in register target.  The results are guaranteed to appear\n** in register target.\n*/\nSQLITE_PRIVATE void sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){\n  int inReg;\n\n  assert( pExpr==0 || !ExprHasVVAProperty(pExpr,EP_Immutable) );\n  assert( target>0 && target<=pParse->nMem );\n  assert( pParse->pVdbe!=0 || pParse->db->mallocFailed );\n  if( pParse->pVdbe==0 ) return;\n  inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);\n  if( inReg!=target ){\n    u8 op;\n    Expr *pX = sqlite3ExprSkipCollateAndLikely(pExpr);\n    testcase( pX!=pExpr );\n    if( ALWAYS(pX)\n     && (ExprHasProperty(pX,EP_Subquery) || pX->op==TK_REGISTER)\n    ){\n      op = OP_Copy;\n    }else{\n      op = OP_SCopy;\n    }\n    sqlite3VdbeAddOp2(pParse->pVdbe, op, inReg, target);\n  }\n}\n\n/*\n** Make a transient copy of expression pExpr and then code it using\n** sqlite3ExprCode().  This routine works just like sqlite3ExprCode()\n** except that the input expression is guaranteed to be unchanged.\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse *pParse, Expr *pExpr, int target){\n  sqlite3 *db = pParse->db;\n  pExpr = sqlite3ExprDup(db, pExpr, 0);\n  if( !db->mallocFailed ) sqlite3ExprCode(pParse, pExpr, target);\n  sqlite3ExprDelete(db, pExpr);\n}\n\n/*\n** Generate code that will evaluate expression pExpr and store the\n** results in register target.  The results are guaranteed to appear\n** in register target.  If the expression is constant, then this routine\n** might choose to code the expression at initialization time.\n*/\nSQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse *pParse, Expr *pExpr, int target){\n  if( pParse->okConstFactor && sqlite3ExprIsConstantNotJoin(pParse,pExpr) ){\n    sqlite3ExprCodeRunJustOnce(pParse, pExpr, target);\n  }else{\n    sqlite3ExprCodeCopy(pParse, pExpr, target);\n  }\n}\n\n/*\n** Generate code that pushes the value of every element of the given\n** expression list into a sequence of registers beginning at target.\n**\n** Return the number of elements evaluated.  The number returned will\n** usually be pList->nExpr but might be reduced if SQLITE_ECEL_OMITREF\n** is defined.\n**\n** The SQLITE_ECEL_DUP flag prevents the arguments from being\n** filled using OP_SCopy.  OP_Copy must be used instead.\n**\n** The SQLITE_ECEL_FACTOR argument allows constant arguments to be\n** factored out into initialization code.\n**\n** The SQLITE_ECEL_REF flag means that expressions in the list with\n** ExprList.a[].u.x.iOrderByCol>0 have already been evaluated and stored\n** in registers at srcReg, and so the value can be copied from there.\n** If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0\n** are simply omitted rather than being copied from srcReg.\n*/\nSQLITE_PRIVATE int sqlite3ExprCodeExprList(\n  Parse *pParse,     /* Parsing context */\n  ExprList *pList,   /* The expression list to be coded */\n  int target,        /* Where to write results */\n  int srcReg,        /* Source registers if SQLITE_ECEL_REF */\n  u8 flags           /* SQLITE_ECEL_* flags */\n){\n  struct ExprList_item *pItem;\n  int i, j, n;\n  u8 copyOp = (flags & SQLITE_ECEL_DUP) ? OP_Copy : OP_SCopy;\n  Vdbe *v = pParse->pVdbe;\n  assert( pList!=0 );\n  assert( target>0 );\n  assert( pParse->pVdbe!=0 );  /* Never gets this far otherwise */\n  n = pList->nExpr;\n  if( !ConstFactorOk(pParse) ) flags &= ~SQLITE_ECEL_FACTOR;\n  for(pItem=pList->a, i=0; i<n; i++, pItem++){\n    Expr *pExpr = pItem->pExpr;\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    if( pItem->fg.bSorterRef ){\n      i--;\n      n--;\n    }else\n#endif\n    if( (flags & SQLITE_ECEL_REF)!=0 && (j = pItem->u.x.iOrderByCol)>0 ){\n      if( flags & SQLITE_ECEL_OMITREF ){\n        i--;\n        n--;\n      }else{\n        sqlite3VdbeAddOp2(v, copyOp, j+srcReg-1, target+i);\n      }\n    }else if( (flags & SQLITE_ECEL_FACTOR)!=0\n           && sqlite3ExprIsConstantNotJoin(pParse,pExpr)\n    ){\n      sqlite3ExprCodeRunJustOnce(pParse, pExpr, target+i);\n    }else{\n      int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i);\n      if( inReg!=target+i ){\n        VdbeOp *pOp;\n        if( copyOp==OP_Copy\n         && (pOp=sqlite3VdbeGetLastOp(v))->opcode==OP_Copy\n         && pOp->p1+pOp->p3+1==inReg\n         && pOp->p2+pOp->p3+1==target+i\n         && pOp->p5==0  /* The do-not-merge flag must be clear */\n        ){\n          pOp->p3++;\n        }else{\n          sqlite3VdbeAddOp2(v, copyOp, inReg, target+i);\n        }\n      }\n    }\n  }\n  return n;\n}\n\n/*\n** Generate code for a BETWEEN operator.\n**\n**    x BETWEEN y AND z\n**\n** The above is equivalent to\n**\n**    x>=y AND x<=z\n**\n** Code it as such, taking care to do the common subexpression\n** elimination of x.\n**\n** The xJumpIf parameter determines details:\n**\n**    NULL:                   Store the boolean result in reg[dest]\n**    sqlite3ExprIfTrue:      Jump to dest if true\n**    sqlite3ExprIfFalse:     Jump to dest if false\n**\n** The jumpIfNull parameter is ignored if xJumpIf is NULL.\n*/\nstatic void exprCodeBetween(\n  Parse *pParse,    /* Parsing and code generating context */\n  Expr *pExpr,      /* The BETWEEN expression */\n  int dest,         /* Jump destination or storage location */\n  void (*xJump)(Parse*,Expr*,int,int), /* Action to take */\n  int jumpIfNull    /* Take the jump if the BETWEEN is NULL */\n){\n  Expr exprAnd;     /* The AND operator in  x>=y AND x<=z  */\n  Expr compLeft;    /* The  x>=y  term */\n  Expr compRight;   /* The  x<=z  term */\n  int regFree1 = 0; /* Temporary use register */\n  Expr *pDel = 0;\n  sqlite3 *db = pParse->db;\n\n  memset(&compLeft, 0, sizeof(Expr));\n  memset(&compRight, 0, sizeof(Expr));\n  memset(&exprAnd, 0, sizeof(Expr));\n\n  assert( ExprUseXList(pExpr) );\n  pDel = sqlite3ExprDup(db, pExpr->pLeft, 0);\n  if( db->mallocFailed==0 ){\n    exprAnd.op = TK_AND;\n    exprAnd.pLeft = &compLeft;\n    exprAnd.pRight = &compRight;\n    compLeft.op = TK_GE;\n    compLeft.pLeft = pDel;\n    compLeft.pRight = pExpr->x.pList->a[0].pExpr;\n    compRight.op = TK_LE;\n    compRight.pLeft = pDel;\n    compRight.pRight = pExpr->x.pList->a[1].pExpr;\n    sqlite3ExprToRegister(pDel, exprCodeVector(pParse, pDel, &regFree1));\n    if( xJump ){\n      xJump(pParse, &exprAnd, dest, jumpIfNull);\n    }else{\n      /* Mark the expression is being from the ON or USING clause of a join\n      ** so that the sqlite3ExprCodeTarget() routine will not attempt to move\n      ** it into the Parse.pConstExpr list.  We should use a new bit for this,\n      ** for clarity, but we are out of bits in the Expr.flags field so we\n      ** have to reuse the EP_OuterON bit.  Bummer. */\n      pDel->flags |= EP_OuterON;\n      sqlite3ExprCodeTarget(pParse, &exprAnd, dest);\n    }\n    sqlite3ReleaseTempReg(pParse, regFree1);\n  }\n  sqlite3ExprDelete(db, pDel);\n\n  /* Ensure adequate test coverage */\n  testcase( xJump==sqlite3ExprIfTrue  && jumpIfNull==0 && regFree1==0 );\n  testcase( xJump==sqlite3ExprIfTrue  && jumpIfNull==0 && regFree1!=0 );\n  testcase( xJump==sqlite3ExprIfTrue  && jumpIfNull!=0 && regFree1==0 );\n  testcase( xJump==sqlite3ExprIfTrue  && jumpIfNull!=0 && regFree1!=0 );\n  testcase( xJump==sqlite3ExprIfFalse && jumpIfNull==0 && regFree1==0 );\n  testcase( xJump==sqlite3ExprIfFalse && jumpIfNull==0 && regFree1!=0 );\n  testcase( xJump==sqlite3ExprIfFalse && jumpIfNull!=0 && regFree1==0 );\n  testcase( xJump==sqlite3ExprIfFalse && jumpIfNull!=0 && regFree1!=0 );\n  testcase( xJump==0 );\n}\n\n/*\n** Generate code for a boolean expression such that a jump is made\n** to the label \"dest\" if the expression is true but execution\n** continues straight thru if the expression is false.\n**\n** If the expression evaluates to NULL (neither true nor false), then\n** take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.\n**\n** This code depends on the fact that certain token values (ex: TK_EQ)\n** are the same as opcode values (ex: OP_Eq) that implement the corresponding\n** operation.  Special comments in vdbe.c and the mkopcodeh.awk script in\n** the make process cause these values to align.  Assert()s in the code\n** below verify that the numbers are aligned correctly.\n*/\nSQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){\n  Vdbe *v = pParse->pVdbe;\n  int op = 0;\n  int regFree1 = 0;\n  int regFree2 = 0;\n  int r1, r2;\n\n  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );\n  if( NEVER(v==0) )     return;  /* Existence of VDBE checked by caller */\n  if( NEVER(pExpr==0) ) return;  /* No way this can happen */\n  assert( !ExprHasVVAProperty(pExpr, EP_Immutable) );\n  op = pExpr->op;\n  switch( op ){\n    case TK_AND:\n    case TK_OR: {\n      Expr *pAlt = sqlite3ExprSimplifiedAndOr(pExpr);\n      if( pAlt!=pExpr ){\n        sqlite3ExprIfTrue(pParse, pAlt, dest, jumpIfNull);\n      }else{\n        Expr *pFirst, *pSecond;\n        if( exprEvalRhsFirst(pExpr) ){\n          pFirst = pExpr->pRight;\n          pSecond = pExpr->pLeft;\n        }else{\n          pFirst = pExpr->pLeft;\n          pSecond = pExpr->pRight;\n        }\n        if( op==TK_AND ){\n          int d2 = sqlite3VdbeMakeLabel(pParse);\n          testcase( jumpIfNull==0 );\n          sqlite3ExprIfFalse(pParse, pFirst, d2,\n                             jumpIfNull^SQLITE_JUMPIFNULL);\n          sqlite3ExprIfTrue(pParse, pSecond, dest, jumpIfNull);\n          sqlite3VdbeResolveLabel(v, d2);\n        }else{\n          testcase( jumpIfNull==0 );\n          sqlite3ExprIfTrue(pParse, pFirst, dest, jumpIfNull);\n          sqlite3ExprIfTrue(pParse, pSecond, dest, jumpIfNull);\n        }\n      }\n      break;\n    }\n    case TK_NOT: {\n      testcase( jumpIfNull==0 );\n      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);\n      break;\n    }\n    case TK_TRUTH: {\n      int isNot;      /* IS NOT TRUE or IS NOT FALSE */\n      int isTrue;     /* IS TRUE or IS NOT TRUE */\n      testcase( jumpIfNull==0 );\n      isNot = pExpr->op2==TK_ISNOT;\n      isTrue = sqlite3ExprTruthValue(pExpr->pRight);\n      testcase( isTrue && isNot );\n      testcase( !isTrue && isNot );\n      if( isTrue ^ isNot ){\n        sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest,\n                          isNot ? SQLITE_JUMPIFNULL : 0);\n      }else{\n        sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest,\n                           isNot ? SQLITE_JUMPIFNULL : 0);\n      }\n      break;\n    }\n    case TK_IS:\n    case TK_ISNOT:\n      testcase( op==TK_IS );\n      testcase( op==TK_ISNOT );\n      op = (op==TK_IS) ? TK_EQ : TK_NE;\n      jumpIfNull = SQLITE_NULLEQ;\n      /* no break */ deliberate_fall_through\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE:\n    case TK_NE:\n    case TK_EQ: {\n      int addrIsNull;\n      if( sqlite3ExprIsVector(pExpr->pLeft) ) goto default_expr;\n      if( ExprHasProperty(pExpr, EP_Subquery) && jumpIfNull!=SQLITE_NULLEQ ){\n        addrIsNull = exprComputeOperands(pParse, pExpr,\n                                   &r1, &r2, &regFree1, &regFree2);\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);\n        addrIsNull = 0;\n      }\n      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,\n                  r1, r2, dest, jumpIfNull, ExprHasProperty(pExpr,EP_Commuted));\n      assert(TK_LT==OP_Lt); testcase(op==OP_Lt); VdbeCoverageIf(v,op==OP_Lt);\n      assert(TK_LE==OP_Le); testcase(op==OP_Le); VdbeCoverageIf(v,op==OP_Le);\n      assert(TK_GT==OP_Gt); testcase(op==OP_Gt); VdbeCoverageIf(v,op==OP_Gt);\n      assert(TK_GE==OP_Ge); testcase(op==OP_Ge); VdbeCoverageIf(v,op==OP_Ge);\n      assert(TK_EQ==OP_Eq); testcase(op==OP_Eq);\n      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull==SQLITE_NULLEQ);\n      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull!=SQLITE_NULLEQ);\n      assert(TK_NE==OP_Ne); testcase(op==OP_Ne);\n      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull==SQLITE_NULLEQ);\n      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull!=SQLITE_NULLEQ);\n      testcase( regFree1==0 );\n      testcase( regFree2==0 );\n      if( addrIsNull ){\n        if( jumpIfNull ){\n          sqlite3VdbeChangeP2(v, addrIsNull, dest);\n        }else{\n          sqlite3VdbeJumpHere(v, addrIsNull);\n        }\n      }\n      break;\n    }\n    case TK_ISNULL:\n    case TK_NOTNULL: {\n      assert( TK_ISNULL==OP_IsNull );   testcase( op==TK_ISNULL );\n      assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL );\n      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n      assert( regFree1==0 || regFree1==r1 );\n      if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);\n      sqlite3VdbeAddOp2(v, op, r1, dest);\n      VdbeCoverageIf(v, op==TK_ISNULL);\n      VdbeCoverageIf(v, op==TK_NOTNULL);\n      break;\n    }\n    case TK_BETWEEN: {\n      testcase( jumpIfNull==0 );\n      exprCodeBetween(pParse, pExpr, dest, sqlite3ExprIfTrue, jumpIfNull);\n      break;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_IN: {\n      int destIfFalse = sqlite3VdbeMakeLabel(pParse);\n      int destIfNull = jumpIfNull ? dest : destIfFalse;\n      sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);\n      sqlite3VdbeGoto(v, dest);\n      sqlite3VdbeResolveLabel(v, destIfFalse);\n      break;\n    }\n#endif\n    default: {\n    default_expr:\n      if( ExprAlwaysTrue(pExpr) ){\n        sqlite3VdbeGoto(v, dest);\n      }else if( ExprAlwaysFalse(pExpr) ){\n        /* No-op */\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);\n        sqlite3VdbeAddOp3(v, OP_If, r1, dest, jumpIfNull!=0);\n        VdbeCoverage(v);\n        testcase( regFree1==0 );\n        testcase( jumpIfNull==0 );\n      }\n      break;\n    }\n  }\n  sqlite3ReleaseTempReg(pParse, regFree1);\n  sqlite3ReleaseTempReg(pParse, regFree2);\n}\n\n/*\n** Generate code for a boolean expression such that a jump is made\n** to the label \"dest\" if the expression is false but execution\n** continues straight thru if the expression is true.\n**\n** If the expression evaluates to NULL (neither true nor false) then\n** jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull\n** is 0.\n*/\nSQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){\n  Vdbe *v = pParse->pVdbe;\n  int op = 0;\n  int regFree1 = 0;\n  int regFree2 = 0;\n  int r1, r2;\n\n  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );\n  if( NEVER(v==0) ) return; /* Existence of VDBE checked by caller */\n  if( pExpr==0 )    return;\n  assert( !ExprHasVVAProperty(pExpr,EP_Immutable) );\n\n  /* The value of pExpr->op and op are related as follows:\n  **\n  **       pExpr->op            op\n  **       ---------          ----------\n  **       TK_ISNULL          OP_NotNull\n  **       TK_NOTNULL         OP_IsNull\n  **       TK_NE              OP_Eq\n  **       TK_EQ              OP_Ne\n  **       TK_GT              OP_Le\n  **       TK_LE              OP_Gt\n  **       TK_GE              OP_Lt\n  **       TK_LT              OP_Ge\n  **\n  ** For other values of pExpr->op, op is undefined and unused.\n  ** The value of TK_ and OP_ constants are arranged such that we\n  ** can compute the mapping above using the following expression.\n  ** Assert()s verify that the computation is correct.\n  */\n  op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1);\n\n  /* Verify correct alignment of TK_ and OP_ constants\n  */\n  assert( pExpr->op!=TK_ISNULL || op==OP_NotNull );\n  assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull );\n  assert( pExpr->op!=TK_NE || op==OP_Eq );\n  assert( pExpr->op!=TK_EQ || op==OP_Ne );\n  assert( pExpr->op!=TK_LT || op==OP_Ge );\n  assert( pExpr->op!=TK_LE || op==OP_Gt );\n  assert( pExpr->op!=TK_GT || op==OP_Le );\n  assert( pExpr->op!=TK_GE || op==OP_Lt );\n\n  switch( pExpr->op ){\n    case TK_AND:\n    case TK_OR: {\n      Expr *pAlt = sqlite3ExprSimplifiedAndOr(pExpr);\n      if( pAlt!=pExpr ){\n        sqlite3ExprIfFalse(pParse, pAlt, dest, jumpIfNull);\n      }else{\n        Expr *pFirst, *pSecond;\n        if( exprEvalRhsFirst(pExpr) ){\n          pFirst = pExpr->pRight;\n          pSecond = pExpr->pLeft;\n        }else{\n          pFirst = pExpr->pLeft;\n          pSecond = pExpr->pRight;\n        }\n        if( pExpr->op==TK_AND ){\n          testcase( jumpIfNull==0 );\n          sqlite3ExprIfFalse(pParse, pFirst, dest, jumpIfNull);\n          sqlite3ExprIfFalse(pParse, pSecond, dest, jumpIfNull);\n        }else{\n          int d2 = sqlite3VdbeMakeLabel(pParse);\n          testcase( jumpIfNull==0 );\n          sqlite3ExprIfTrue(pParse, pFirst, d2,\n                            jumpIfNull^SQLITE_JUMPIFNULL);\n          sqlite3ExprIfFalse(pParse, pSecond, dest, jumpIfNull);\n          sqlite3VdbeResolveLabel(v, d2);\n        }\n      }\n      break;\n    }\n    case TK_NOT: {\n      testcase( jumpIfNull==0 );\n      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);\n      break;\n    }\n    case TK_TRUTH: {\n      int isNot;   /* IS NOT TRUE or IS NOT FALSE */\n      int isTrue;  /* IS TRUE or IS NOT TRUE */\n      testcase( jumpIfNull==0 );\n      isNot = pExpr->op2==TK_ISNOT;\n      isTrue = sqlite3ExprTruthValue(pExpr->pRight);\n      testcase( isTrue && isNot );\n      testcase( !isTrue && isNot );\n      if( isTrue ^ isNot ){\n        /* IS TRUE and IS NOT FALSE */\n        sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest,\n                           isNot ? 0 : SQLITE_JUMPIFNULL);\n\n      }else{\n        /* IS FALSE and IS NOT TRUE */\n        sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest,\n                          isNot ? 0 : SQLITE_JUMPIFNULL);\n      }\n      break;\n    }\n    case TK_IS:\n    case TK_ISNOT:\n      testcase( pExpr->op==TK_IS );\n      testcase( pExpr->op==TK_ISNOT );\n      op = (pExpr->op==TK_IS) ? TK_NE : TK_EQ;\n      jumpIfNull = SQLITE_NULLEQ;\n      /* no break */ deliberate_fall_through\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE:\n    case TK_NE:\n    case TK_EQ: {\n      int addrIsNull;\n      if( sqlite3ExprIsVector(pExpr->pLeft) ) goto default_expr;\n      if( ExprHasProperty(pExpr, EP_Subquery) && jumpIfNull!=SQLITE_NULLEQ ){\n        addrIsNull = exprComputeOperands(pParse, pExpr,\n                                   &r1, &r2, &regFree1, &regFree2);\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);\n        addrIsNull = 0;\n      }\n      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,\n                  r1, r2, dest, jumpIfNull,ExprHasProperty(pExpr,EP_Commuted));\n      assert(TK_LT==OP_Lt); testcase(op==OP_Lt); VdbeCoverageIf(v,op==OP_Lt);\n      assert(TK_LE==OP_Le); testcase(op==OP_Le); VdbeCoverageIf(v,op==OP_Le);\n      assert(TK_GT==OP_Gt); testcase(op==OP_Gt); VdbeCoverageIf(v,op==OP_Gt);\n      assert(TK_GE==OP_Ge); testcase(op==OP_Ge); VdbeCoverageIf(v,op==OP_Ge);\n      assert(TK_EQ==OP_Eq); testcase(op==OP_Eq);\n      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull!=SQLITE_NULLEQ);\n      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull==SQLITE_NULLEQ);\n      assert(TK_NE==OP_Ne); testcase(op==OP_Ne);\n      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull!=SQLITE_NULLEQ);\n      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull==SQLITE_NULLEQ);\n      testcase( regFree1==0 );\n      testcase( regFree2==0 );\n      if( addrIsNull ){\n        if( jumpIfNull ){\n          sqlite3VdbeChangeP2(v, addrIsNull, dest);\n        }else{\n          sqlite3VdbeJumpHere(v, addrIsNull);\n        }\n      }\n      break;\n    }\n    case TK_ISNULL:\n    case TK_NOTNULL: {\n      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);\n      assert( regFree1==0 || regFree1==r1 );\n      if( regFree1 ) sqlite3VdbeTypeofColumn(v, r1);\n      sqlite3VdbeAddOp2(v, op, r1, dest);\n      testcase( op==TK_ISNULL );   VdbeCoverageIf(v, op==TK_ISNULL);\n      testcase( op==TK_NOTNULL );  VdbeCoverageIf(v, op==TK_NOTNULL);\n      break;\n    }\n    case TK_BETWEEN: {\n      testcase( jumpIfNull==0 );\n      exprCodeBetween(pParse, pExpr, dest, sqlite3ExprIfFalse, jumpIfNull);\n      break;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_IN: {\n      if( jumpIfNull ){\n        sqlite3ExprCodeIN(pParse, pExpr, dest, dest);\n      }else{\n        int destIfNull = sqlite3VdbeMakeLabel(pParse);\n        sqlite3ExprCodeIN(pParse, pExpr, dest, destIfNull);\n        sqlite3VdbeResolveLabel(v, destIfNull);\n      }\n      break;\n    }\n#endif\n    default: {\n    default_expr:\n      if( ExprAlwaysFalse(pExpr) ){\n        sqlite3VdbeGoto(v, dest);\n      }else if( ExprAlwaysTrue(pExpr) ){\n        /* no-op */\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);\n        sqlite3VdbeAddOp3(v, OP_IfNot, r1, dest, jumpIfNull!=0);\n        VdbeCoverage(v);\n        testcase( regFree1==0 );\n        testcase( jumpIfNull==0 );\n      }\n      break;\n    }\n  }\n  sqlite3ReleaseTempReg(pParse, regFree1);\n  sqlite3ReleaseTempReg(pParse, regFree2);\n}\n\n/*\n** Like sqlite3ExprIfFalse() except that a copy is made of pExpr before\n** code generation, and that copy is deleted after code generation. This\n** ensures that the original pExpr is unchanged.\n*/\nSQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse *pParse, Expr *pExpr, int dest,int jumpIfNull){\n  sqlite3 *db = pParse->db;\n  Expr *pCopy = sqlite3ExprDup(db, pExpr, 0);\n  if( db->mallocFailed==0 ){\n    sqlite3ExprIfFalse(pParse, pCopy, dest, jumpIfNull);\n  }\n  sqlite3ExprDelete(db, pCopy);\n}\n\n/*\n** Expression pVar is guaranteed to be an SQL variable. pExpr may be any\n** type of expression.\n**\n** If pExpr is a simple SQL value - an integer, real, string, blob\n** or NULL value - then the VDBE currently being prepared is configured\n** to re-prepare each time a new value is bound to variable pVar.\n**\n** Additionally, if pExpr is a simple SQL value and the value is the\n** same as that currently bound to variable pVar, non-zero is returned.\n** Otherwise, if the values are not the same or if pExpr is not a simple\n** SQL value, zero is returned.\n**\n** If the SQLITE_EnableQPSG flag is set on the database connection, then\n** this routine always returns false.\n*/\nstatic SQLITE_NOINLINE int exprCompareVariable(\n  const Parse *pParse,\n  const Expr *pVar,\n  const Expr *pExpr\n){\n  int res = 2;\n  int iVar;\n  sqlite3_value *pL, *pR = 0;\n\n  if( pExpr->op==TK_VARIABLE && pVar->iColumn==pExpr->iColumn ){\n    return 0;\n  }\n  if( (pParse->db->flags & SQLITE_EnableQPSG)!=0 ) return 2;\n  sqlite3ValueFromExpr(pParse->db, pExpr, SQLITE_UTF8, SQLITE_AFF_BLOB, &pR);\n  if( pR ){\n    iVar = pVar->iColumn;\n    sqlite3VdbeSetVarmask(pParse->pVdbe, iVar);\n    pL = sqlite3VdbeGetBoundValue(pParse->pReprepare, iVar, SQLITE_AFF_BLOB);\n    if( pL ){\n      if( sqlite3_value_type(pL)==SQLITE_TEXT ){\n        sqlite3_value_text(pL); /* Make sure the encoding is UTF-8 */\n      }\n      res = sqlite3MemCompare(pL, pR, 0) ? 2 : 0;\n    }\n    sqlite3ValueFree(pR);\n    sqlite3ValueFree(pL);\n  }\n  return res;\n}\n\n/*\n** Do a deep comparison of two expression trees.  Return 0 if the two\n** expressions are completely identical.  Return 1 if they differ only\n** by a COLLATE operator at the top level.  Return 2 if there are differences\n** other than the top-level COLLATE operator.\n**\n** If any subelement of pB has Expr.iTable==(-1) then it is allowed\n** to compare equal to an equivalent element in pA with Expr.iTable==iTab.\n**\n** The pA side might be using TK_REGISTER.  If that is the case and pB is\n** not using TK_REGISTER but is otherwise equivalent, then still return 0.\n**\n** Sometimes this routine will return 2 even if the two expressions\n** really are equivalent.  If we cannot prove that the expressions are\n** identical, we return 2 just to be safe.  So if this routine\n** returns 2, then you do not really know for certain if the two\n** expressions are the same.  But if you get a 0 or 1 return, then you\n** can be sure the expressions are the same.  In the places where\n** this routine is used, it does not hurt to get an extra 2 - that\n** just might result in some slightly slower code.  But returning\n** an incorrect 0 or 1 could lead to a malfunction.\n**\n** If pParse is not NULL and SQLITE_EnableQPSG is off then TK_VARIABLE\n** terms in pA with bindings in pParse->pReprepare can be matched against\n** literals in pB.  The pParse->pVdbe->expmask bitmask is updated for\n** each variable referenced.\n*/\nSQLITE_PRIVATE int sqlite3ExprCompare(\n  const Parse *pParse,\n  const Expr *pA,\n  const Expr *pB,\n  int iTab\n){\n  u32 combinedFlags;\n  if( pA==0 || pB==0 ){\n    return pB==pA ? 0 : 2;\n  }\n  if( pParse && pA->op==TK_VARIABLE ){\n    return exprCompareVariable(pParse, pA, pB);\n  }\n  combinedFlags = pA->flags | pB->flags;\n  if( combinedFlags & EP_IntValue ){\n    if( (pA->flags&pB->flags&EP_IntValue)!=0 && pA->u.iValue==pB->u.iValue ){\n      return 0;\n    }\n    return 2;\n  }\n  if( pA->op!=pB->op || pA->op==TK_RAISE ){\n    if( pA->op==TK_COLLATE && sqlite3ExprCompare(pParse, pA->pLeft,pB,iTab)<2 ){\n      return 1;\n    }\n    if( pB->op==TK_COLLATE && sqlite3ExprCompare(pParse, pA,pB->pLeft,iTab)<2 ){\n      return 1;\n    }\n    if( pA->op==TK_AGG_COLUMN && pB->op==TK_COLUMN\n     && pB->iTable<0 && pA->iTable==iTab\n    ){\n      /* fall through */\n    }else{\n      return 2;\n    }\n  }\n  assert( !ExprHasProperty(pA, EP_IntValue) );\n  assert( !ExprHasProperty(pB, EP_IntValue) );\n  if( pA->u.zToken ){\n    if( pA->op==TK_FUNCTION || pA->op==TK_AGG_FUNCTION ){\n      if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      assert( pA->op==pB->op );\n      if( ExprHasProperty(pA,EP_WinFunc)!=ExprHasProperty(pB,EP_WinFunc) ){\n        return 2;\n      }\n      if( ExprHasProperty(pA,EP_WinFunc) ){\n        if( sqlite3WindowCompare(pParse, pA->y.pWin, pB->y.pWin, 1)!=0 ){\n          return 2;\n        }\n      }\n#endif\n    }else if( pA->op==TK_NULL ){\n      return 0;\n    }else if( pA->op==TK_COLLATE ){\n      if( sqlite3_stricmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;\n    }else\n    if( pB->u.zToken!=0\n     && pA->op!=TK_COLUMN\n     && pA->op!=TK_AGG_COLUMN\n     && strcmp(pA->u.zToken,pB->u.zToken)!=0\n    ){\n      return 2;\n    }\n  }\n  if( (pA->flags & (EP_Distinct|EP_Commuted))\n     != (pB->flags & (EP_Distinct|EP_Commuted)) ) return 2;\n  if( ALWAYS((combinedFlags & EP_TokenOnly)==0) ){\n    if( combinedFlags & EP_xIsSelect ) return 2;\n    if( (combinedFlags & EP_FixedCol)==0\n     && sqlite3ExprCompare(pParse, pA->pLeft, pB->pLeft, iTab) ) return 2;\n    if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;\n    if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;\n    if( pA->op!=TK_STRING\n     && pA->op!=TK_TRUEFALSE\n     && ALWAYS((combinedFlags & EP_Reduced)==0)\n    ){\n      if( pA->iColumn!=pB->iColumn ) return 2;\n      if( pA->op2!=pB->op2 && pA->op==TK_TRUTH ) return 2;\n      if( pA->op!=TK_IN && pA->iTable!=pB->iTable && pA->iTable!=iTab ){\n        return 2;\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** Compare two ExprList objects.  Return 0 if they are identical, 1\n** if they are certainly different, or 2 if it is not possible to\n** determine if they are identical or not.\n**\n** If any subelement of pB has Expr.iTable==(-1) then it is allowed\n** to compare equal to an equivalent element in pA with Expr.iTable==iTab.\n**\n** This routine might return non-zero for equivalent ExprLists.  The\n** only consequence will be disabled optimizations.  But this routine\n** must never return 0 if the two ExprList objects are different, or\n** a malfunction will result.\n**\n** Two NULL pointers are considered to be the same.  But a NULL pointer\n** always differs from a non-NULL pointer.\n*/\nSQLITE_PRIVATE int sqlite3ExprListCompare(const ExprList *pA, const ExprList *pB, int iTab){\n  int i;\n  if( pA==0 && pB==0 ) return 0;\n  if( pA==0 || pB==0 ) return 1;\n  if( pA->nExpr!=pB->nExpr ) return 1;\n  for(i=0; i<pA->nExpr; i++){\n    int res;\n    Expr *pExprA = pA->a[i].pExpr;\n    Expr *pExprB = pB->a[i].pExpr;\n    if( pA->a[i].fg.sortFlags!=pB->a[i].fg.sortFlags ) return 1;\n    if( (res = sqlite3ExprCompare(0, pExprA, pExprB, iTab)) ) return res;\n  }\n  return 0;\n}\n\n/*\n** Like sqlite3ExprCompare() except COLLATE operators at the top-level\n** are ignored.\n*/\nSQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr *pA,Expr *pB, int iTab){\n  return sqlite3ExprCompare(0,\n             sqlite3ExprSkipCollate(pA),\n             sqlite3ExprSkipCollate(pB),\n             iTab);\n}\n\n/*\n** Return non-zero if Expr p can only be true if pNN is not NULL.\n**\n** Or if seenNot is true, return non-zero if Expr p can only be\n** non-NULL if pNN is not NULL\n*/\nstatic int exprImpliesNotNull(\n  const Parse *pParse,/* Parsing context */\n  const Expr *p,      /* The expression to be checked */\n  const Expr *pNN,    /* The expression that is NOT NULL */\n  int iTab,           /* Table being evaluated */\n  int seenNot         /* Return true only if p can be any non-NULL value */\n){\n  assert( p );\n  assert( pNN );\n  if( sqlite3ExprCompare(pParse, p, pNN, iTab)==0 ){\n    return pNN->op!=TK_NULL;\n  }\n  switch( p->op ){\n    case TK_IN: {\n      if( seenNot && ExprHasProperty(p, EP_xIsSelect) ) return 0;\n      assert( ExprUseXSelect(p) || (p->x.pList!=0 && p->x.pList->nExpr>0) );\n      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);\n    }\n    case TK_BETWEEN: {\n      ExprList *pList;\n      assert( ExprUseXList(p) );\n      pList = p->x.pList;\n      assert( pList!=0 );\n      assert( pList->nExpr==2 );\n      if( seenNot ) return 0;\n      if( exprImpliesNotNull(pParse, pList->a[0].pExpr, pNN, iTab, 1)\n       || exprImpliesNotNull(pParse, pList->a[1].pExpr, pNN, iTab, 1)\n      ){\n        return 1;\n      }\n      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);\n    }\n    case TK_EQ:\n    case TK_NE:\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE:\n    case TK_PLUS:\n    case TK_MINUS:\n    case TK_BITOR:\n    case TK_LSHIFT:\n    case TK_RSHIFT:\n    case TK_CONCAT:\n      seenNot = 1;\n      /* no break */ deliberate_fall_through\n    case TK_STAR:\n    case TK_REM:\n    case TK_BITAND:\n    case TK_SLASH: {\n      if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;\n      /* no break */ deliberate_fall_through\n    }\n    case TK_SPAN:\n    case TK_COLLATE:\n    case TK_UPLUS:\n    case TK_UMINUS: {\n      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);\n    }\n    case TK_TRUTH: {\n      if( seenNot ) return 0;\n      if( p->op2!=TK_IS ) return 0;\n      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);\n    }\n    case TK_BITNOT:\n    case TK_NOT: {\n      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);\n    }\n  }\n  return 0;\n}\n\n/*\n** Return true if the boolean value of the expression is always either\n** FALSE or NULL.\n*/\nstatic int sqlite3ExprIsNotTrue(Expr *pExpr){\n  int v;\n  if( pExpr->op==TK_NULL ) return 1;\n  if( pExpr->op==TK_TRUEFALSE && sqlite3ExprTruthValue(pExpr)==0 ) return 1;\n  v = 1;\n  if( sqlite3ExprIsInteger(pExpr, &v, 0) && v==0 ) return 1;\n  return 0;\n}\n\n/*\n** Return true if the expression is one of the following:\n**\n**    CASE WHEN x THEN y END\n**    CASE WHEN x THEN y ELSE NULL END\n**    CASE WHEN x THEN y ELSE false END\n**    iif(x,y)\n**    iif(x,y,NULL)\n**    iif(x,y,false)\n*/\nstatic int sqlite3ExprIsIIF(sqlite3 *db, const Expr *pExpr){\n  ExprList *pList;\n  if( pExpr->op==TK_FUNCTION ){\n    const char *z = pExpr->u.zToken;\n    FuncDef *pDef;\n    if( (z[0]!='i' && z[0]!='I') ) return 0;\n    if( pExpr->x.pList==0 ) return 0;\n    pDef = sqlite3FindFunction(db, z, pExpr->x.pList->nExpr, ENC(db), 0);\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n    if( pDef==0 ) return 0;\n#else\n    if( NEVER(pDef==0) ) return 0;\n#endif\n    if( (pDef->funcFlags & SQLITE_FUNC_INLINE)==0 ) return 0;\n    if( SQLITE_PTR_TO_INT(pDef->pUserData)!=INLINEFUNC_iif ) return 0;\n  }else if( pExpr->op==TK_CASE ){\n    if( pExpr->pLeft!=0 ) return 0;\n  }else{\n    return 0;\n  }\n  pList = pExpr->x.pList;\n  assert( pList!=0 );\n  if( pList->nExpr==2 ) return 1;\n  if( pList->nExpr==3 && sqlite3ExprIsNotTrue(pList->a[2].pExpr) ) return 1;\n  return 0;\n}\n\n/*\n** Return true if we can prove the pE2 will always be true if pE1 is\n** true.  Return false if we cannot complete the proof or if pE2 might\n** be false.  Examples:\n**\n**     pE1: x==5        pE2: x==5             Result: true\n**     pE1: x>0         pE2: x==5             Result: false\n**     pE1: x=21        pE2: x=21 OR y=43     Result: true\n**     pE1: x!=123      pE2: x IS NOT NULL    Result: true\n**     pE1: x!=?1       pE2: x IS NOT NULL    Result: true\n**     pE1: x IS NULL   pE2: x IS NOT NULL    Result: false\n**     pE1: x IS ?2     pE2: x IS NOT NULL    Result: false\n**     pE1: iif(x,y)    pE2: x                Result: true\n**     PE1: iif(x,y,0)  pE2: x                Result: true\n**\n** When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has\n** Expr.iTable<0 then assume a table number given by iTab.\n**\n** If pParse is not NULL, then the values of bound variables in pE1 are\n** compared against literal values in pE2 and pParse->pVdbe->expmask is\n** modified to record which bound variables are referenced.  If pParse\n** is NULL, then false will be returned if pE1 contains any bound variables.\n**\n** When in doubt, return false.  Returning true might give a performance\n** improvement.  Returning false might cause a performance reduction, but\n** it will always give the correct answer and is hence always safe.\n*/\nSQLITE_PRIVATE int sqlite3ExprImpliesExpr(\n  const Parse *pParse,\n  const Expr *pE1,\n  const Expr *pE2,\n  int iTab\n){\n  if( sqlite3ExprCompare(pParse, pE1, pE2, iTab)==0 ){\n    return 1;\n  }\n  if( pE2->op==TK_OR\n   && (sqlite3ExprImpliesExpr(pParse, pE1, pE2->pLeft, iTab)\n             || sqlite3ExprImpliesExpr(pParse, pE1, pE2->pRight, iTab) )\n  ){\n    return 1;\n  }\n  if( pE2->op==TK_NOTNULL\n   && exprImpliesNotNull(pParse, pE1, pE2->pLeft, iTab, 0)\n  ){\n    return 1;\n  }\n  if( sqlite3ExprIsIIF(pParse->db, pE1) ){\n    return sqlite3ExprImpliesExpr(pParse,pE1->x.pList->a[0].pExpr,pE2,iTab);\n  }\n  return 0;\n}\n\n/* This is a helper function to impliesNotNullRow().  In this routine,\n** set pWalker->eCode to one only if *both* of the input expressions\n** separately have the implies-not-null-row property.\n*/\nstatic void bothImplyNotNullRow(Walker *pWalker, Expr *pE1, Expr *pE2){\n  if( pWalker->eCode==0 ){\n    sqlite3WalkExpr(pWalker, pE1);\n    if( pWalker->eCode ){\n      pWalker->eCode = 0;\n      sqlite3WalkExpr(pWalker, pE2);\n    }\n  }\n}\n\n/*\n** This is the Expr node callback for sqlite3ExprImpliesNonNullRow().\n** If the expression node requires that the table at pWalker->iCur\n** have one or more non-NULL column, then set pWalker->eCode to 1 and abort.\n**\n** pWalker->mWFlags is non-zero if this inquiry is being undertaking on\n** behalf of a RIGHT JOIN (or FULL JOIN).  That makes a difference when\n** evaluating terms in the ON clause of an inner join.\n**\n** This routine controls an optimization.  False positives (setting\n** pWalker->eCode to 1 when it should not be) are deadly, but false-negatives\n** (never setting pWalker->eCode) is a harmless missed optimization.\n*/\nstatic int impliesNotNullRow(Walker *pWalker, Expr *pExpr){\n  testcase( pExpr->op==TK_AGG_COLUMN );\n  testcase( pExpr->op==TK_AGG_FUNCTION );\n  if( ExprHasProperty(pExpr, EP_OuterON) ) return WRC_Prune;\n  if( ExprHasProperty(pExpr, EP_InnerON) && pWalker->mWFlags ){\n    /* If iCur is used in an inner-join ON clause to the left of a\n    ** RIGHT JOIN, that does *not* mean that the table must be non-null.\n    ** But it is difficult to check for that condition precisely.\n    ** To keep things simple, any use of iCur from any inner-join is\n    ** ignored while attempting to simplify a RIGHT JOIN. */\n    return WRC_Prune;\n  }\n  switch( pExpr->op ){\n    case TK_ISNOT:\n    case TK_ISNULL:\n    case TK_NOTNULL:\n    case TK_IS:\n    case TK_VECTOR:\n    case TK_FUNCTION:\n    case TK_TRUTH:\n    case TK_CASE:\n      testcase( pExpr->op==TK_ISNOT );\n      testcase( pExpr->op==TK_ISNULL );\n      testcase( pExpr->op==TK_NOTNULL );\n      testcase( pExpr->op==TK_IS );\n      testcase( pExpr->op==TK_VECTOR );\n      testcase( pExpr->op==TK_FUNCTION );\n      testcase( pExpr->op==TK_TRUTH );\n      testcase( pExpr->op==TK_CASE );\n      return WRC_Prune;\n\n    case TK_COLUMN:\n      if( pWalker->u.iCur==pExpr->iTable ){\n        pWalker->eCode = 1;\n        return WRC_Abort;\n      }\n      return WRC_Prune;\n\n    case TK_OR:\n    case TK_AND:\n      /* Both sides of an AND or OR must separately imply non-null-row.\n      ** Consider these cases:\n      **    1.  NOT (x AND y)\n      **    2.  x OR y\n      ** If only one of x or y is non-null-row, then the overall expression\n      ** can be true if the other arm is false (case 1) or true (case 2).\n      */\n      testcase( pExpr->op==TK_OR );\n      testcase( pExpr->op==TK_AND );\n      bothImplyNotNullRow(pWalker, pExpr->pLeft, pExpr->pRight);\n      return WRC_Prune;\n\n    case TK_IN:\n      /* Beware of \"x NOT IN ()\" and \"x NOT IN (SELECT 1 WHERE false)\",\n      ** both of which can be true.  But apart from these cases, if\n      ** the left-hand side of the IN is NULL then the IN itself will be\n      ** NULL. */\n      if( ExprUseXList(pExpr) && ALWAYS(pExpr->x.pList->nExpr>0) ){\n        sqlite3WalkExpr(pWalker, pExpr->pLeft);\n      }\n      return WRC_Prune;\n\n    case TK_BETWEEN:\n      /* In \"x NOT BETWEEN y AND z\" either x must be non-null-row or else\n      ** both y and z must be non-null row */\n      assert( ExprUseXList(pExpr) );\n      assert( pExpr->x.pList->nExpr==2 );\n      sqlite3WalkExpr(pWalker, pExpr->pLeft);\n      bothImplyNotNullRow(pWalker, pExpr->x.pList->a[0].pExpr,\n                                   pExpr->x.pList->a[1].pExpr);\n      return WRC_Prune;\n\n    /* Virtual tables are allowed to use constraints like x=NULL.  So\n    ** a term of the form x=y does not prove that y is not null if x\n    ** is the column of a virtual table */\n    case TK_EQ:\n    case TK_NE:\n    case TK_LT:\n    case TK_LE:\n    case TK_GT:\n    case TK_GE: {\n      Expr *pLeft = pExpr->pLeft;\n      Expr *pRight = pExpr->pRight;\n      testcase( pExpr->op==TK_EQ );\n      testcase( pExpr->op==TK_NE );\n      testcase( pExpr->op==TK_LT );\n      testcase( pExpr->op==TK_LE );\n      testcase( pExpr->op==TK_GT );\n      testcase( pExpr->op==TK_GE );\n      /* The y.pTab=0 assignment in wherecode.c always happens after the\n      ** impliesNotNullRow() test */\n      assert( pLeft->op!=TK_COLUMN || ExprUseYTab(pLeft) );\n      assert( pRight->op!=TK_COLUMN || ExprUseYTab(pRight) );\n      if( (pLeft->op==TK_COLUMN\n           && ALWAYS(pLeft->y.pTab!=0)\n           && IsVirtual(pLeft->y.pTab))\n       || (pRight->op==TK_COLUMN\n           && ALWAYS(pRight->y.pTab!=0)\n           && IsVirtual(pRight->y.pTab))\n      ){\n        return WRC_Prune;\n      }\n      /* no break */ deliberate_fall_through\n    }\n    default:\n      return WRC_Continue;\n  }\n}\n\n/*\n** Return true (non-zero) if expression p can only be true if at least\n** one column of table iTab is non-null.  In other words, return true\n** if expression p will always be NULL or false if every column of iTab\n** is NULL.\n**\n** False negatives are acceptable.  In other words, it is ok to return\n** zero even if expression p will never be true of every column of iTab\n** is NULL.  A false negative is merely a missed optimization opportunity.\n**\n** False positives are not allowed, however.  A false positive may result\n** in an incorrect answer.\n**\n** Terms of p that are marked with EP_OuterON (and hence that come from\n** the ON or USING clauses of OUTER JOINS) are excluded from the analysis.\n**\n** This routine is used to check if a LEFT JOIN can be converted into\n** an ordinary JOIN.  The p argument is the WHERE clause.  If the WHERE\n** clause requires that some column of the right table of the LEFT JOIN\n** be non-NULL, then the LEFT JOIN can be safely converted into an\n** ordinary join.\n*/\nSQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab, int isRJ){\n  Walker w;\n  p = sqlite3ExprSkipCollateAndLikely(p);\n  if( p==0 ) return 0;\n  if( p->op==TK_NOTNULL ){\n    p = p->pLeft;\n  }else{\n    while( p->op==TK_AND ){\n      if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab, isRJ) ) return 1;\n      p = p->pRight;\n    }\n  }\n  w.xExprCallback = impliesNotNullRow;\n  w.xSelectCallback = 0;\n  w.xSelectCallback2 = 0;\n  w.eCode = 0;\n  w.mWFlags = isRJ!=0;\n  w.u.iCur = iTab;\n  sqlite3WalkExpr(&w, p);\n  return w.eCode;\n}\n\n/*\n** An instance of the following structure is used by the tree walker\n** to determine if an expression can be evaluated by reference to the\n** index only, without having to do a search for the corresponding\n** table entry.  The IdxCover.pIdx field is the index.  IdxCover.iCur\n** is the cursor for the table.\n*/\nstruct IdxCover {\n  Index *pIdx;     /* The index to be tested for coverage */\n  int iCur;        /* Cursor number for the table corresponding to the index */\n};\n\n/*\n** Check to see if there are references to columns in table\n** pWalker->u.pIdxCover->iCur can be satisfied using the index\n** pWalker->u.pIdxCover->pIdx.\n*/\nstatic int exprIdxCover(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_COLUMN\n   && pExpr->iTable==pWalker->u.pIdxCover->iCur\n   && sqlite3TableColumnToIndex(pWalker->u.pIdxCover->pIdx, pExpr->iColumn)<0\n  ){\n    pWalker->eCode = 1;\n    return WRC_Abort;\n  }\n  return WRC_Continue;\n}\n\n/*\n** Determine if an index pIdx on table with cursor iCur contains will\n** the expression pExpr.  Return true if the index does cover the\n** expression and false if the pExpr expression references table columns\n** that are not found in the index pIdx.\n**\n** An index covering an expression means that the expression can be\n** evaluated using only the index and without having to lookup the\n** corresponding table entry.\n*/\nSQLITE_PRIVATE int sqlite3ExprCoveredByIndex(\n  Expr *pExpr,        /* The index to be tested */\n  int iCur,           /* The cursor number for the corresponding table */\n  Index *pIdx         /* The index that might be used for coverage */\n){\n  Walker w;\n  struct IdxCover xcov;\n  memset(&w, 0, sizeof(w));\n  xcov.iCur = iCur;\n  xcov.pIdx = pIdx;\n  w.xExprCallback = exprIdxCover;\n  w.u.pIdxCover = &xcov;\n  sqlite3WalkExpr(&w, pExpr);\n  return !w.eCode;\n}\n\n\n/* Structure used to pass information throughout the Walker in order to\n** implement sqlite3ReferencesSrcList().\n*/\nstruct RefSrcList {\n  sqlite3 *db;         /* Database connection used for sqlite3DbRealloc() */\n  SrcList *pRef;       /* Looking for references to these tables */\n  i64 nExclude;        /* Number of tables to exclude from the search */\n  int *aiExclude;      /* Cursor IDs for tables to exclude from the search */\n};\n\n/*\n** Walker SELECT callbacks for sqlite3ReferencesSrcList().\n**\n** When entering a new subquery on the pExpr argument, add all FROM clause\n** entries for that subquery to the exclude list.\n**\n** When leaving the subquery, remove those entries from the exclude list.\n*/\nstatic int selectRefEnter(Walker *pWalker, Select *pSelect){\n  struct RefSrcList *p = pWalker->u.pRefSrcList;\n  SrcList *pSrc = pSelect->pSrc;\n  i64 i, j;\n  int *piNew;\n  if( pSrc->nSrc==0 ) return WRC_Continue;\n  j = p->nExclude;\n  p->nExclude += pSrc->nSrc;\n  piNew = sqlite3DbRealloc(p->db, p->aiExclude, p->nExclude*sizeof(int));\n  if( piNew==0 ){\n    p->nExclude = 0;\n    return WRC_Abort;\n  }else{\n    p->aiExclude = piNew;\n  }\n  for(i=0; i<pSrc->nSrc; i++, j++){\n     p->aiExclude[j] = pSrc->a[i].iCursor;\n  }\n  return WRC_Continue;\n}\nstatic void selectRefLeave(Walker *pWalker, Select *pSelect){\n  struct RefSrcList *p = pWalker->u.pRefSrcList;\n  SrcList *pSrc = pSelect->pSrc;\n  if( p->nExclude ){\n    assert( p->nExclude>=pSrc->nSrc );\n    p->nExclude -= pSrc->nSrc;\n  }\n}\n\n/* This is the Walker EXPR callback for sqlite3ReferencesSrcList().\n**\n** Set the 0x01 bit of pWalker->eCode if there is a reference to any\n** of the tables shown in RefSrcList.pRef.\n**\n** Set the 0x02 bit of pWalker->eCode if there is a reference to a\n** table is in neither RefSrcList.pRef nor RefSrcList.aiExclude.\n*/\nstatic int exprRefToSrcList(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_COLUMN\n   || pExpr->op==TK_AGG_COLUMN\n  ){\n    int i;\n    struct RefSrcList *p = pWalker->u.pRefSrcList;\n    SrcList *pSrc = p->pRef;\n    int nSrc = pSrc ? pSrc->nSrc : 0;\n    for(i=0; i<nSrc; i++){\n      if( pExpr->iTable==pSrc->a[i].iCursor ){\n        pWalker->eCode |= 1;\n        return WRC_Continue;\n      }\n    }\n    for(i=0; i<p->nExclude && p->aiExclude[i]!=pExpr->iTable; i++){}\n    if( i>=p->nExclude ){\n      pWalker->eCode |= 2;\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Check to see if pExpr references any tables in pSrcList.\n** Possible return values:\n**\n**    1         pExpr does references a table in pSrcList.\n**\n**    0         pExpr references some table that is not defined in either\n**              pSrcList or in subqueries of pExpr itself.\n**\n**   -1         pExpr only references no tables at all, or it only\n**              references tables defined in subqueries of pExpr itself.\n**\n** As currently used, pExpr is always an aggregate function call.  That\n** fact is exploited for efficiency.\n*/\nSQLITE_PRIVATE int sqlite3ReferencesSrcList(Parse *pParse, Expr *pExpr, SrcList *pSrcList){\n  Walker w;\n  struct RefSrcList x;\n  assert( pParse->db!=0 );\n  memset(&w, 0, sizeof(w));\n  memset(&x, 0, sizeof(x));\n  w.xExprCallback = exprRefToSrcList;\n  w.xSelectCallback = selectRefEnter;\n  w.xSelectCallback2 = selectRefLeave;\n  w.u.pRefSrcList = &x;\n  x.db = pParse->db;\n  x.pRef = pSrcList;\n  assert( pExpr->op==TK_AGG_FUNCTION );\n  assert( ExprUseXList(pExpr) );\n  sqlite3WalkExprList(&w, pExpr->x.pList);\n  if( pExpr->pLeft ){\n    assert( pExpr->pLeft->op==TK_ORDER );\n    assert( ExprUseXList(pExpr->pLeft) );\n    assert( pExpr->pLeft->x.pList!=0 );\n    sqlite3WalkExprList(&w, pExpr->pLeft->x.pList);\n  }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( ExprHasProperty(pExpr, EP_WinFunc) ){\n    sqlite3WalkExpr(&w, pExpr->y.pWin->pFilter);\n  }\n#endif\n  if( x.aiExclude ) sqlite3DbNNFreeNN(pParse->db, x.aiExclude);\n  if( w.eCode & 0x01 ){\n    return 1;\n  }else if( w.eCode ){\n    return 0;\n  }else{\n    return -1;\n  }\n}\n\n/*\n** This is a Walker expression node callback.\n**\n** For Expr nodes that contain pAggInfo pointers, make sure the AggInfo\n** object that is referenced does not refer directly to the Expr.  If\n** it does, make a copy.  This is done because the pExpr argument is\n** subject to change.\n**\n** The copy is scheduled for deletion using the sqlite3ExprDeferredDelete()\n** which builds on the sqlite3ParserAddCleanup() mechanism.\n*/\nstatic int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){\n  if( ALWAYS(!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced))\n   && pExpr->pAggInfo!=0\n  ){\n    AggInfo *pAggInfo = pExpr->pAggInfo;\n    int iAgg = pExpr->iAgg;\n    Parse *pParse = pWalker->pParse;\n    sqlite3 *db = pParse->db;\n    assert( iAgg>=0 );\n    if( pExpr->op!=TK_AGG_FUNCTION ){\n      if( iAgg<pAggInfo->nColumn\n       && pAggInfo->aCol[iAgg].pCExpr==pExpr\n      ){\n        pExpr = sqlite3ExprDup(db, pExpr, 0);\n        if( pExpr && !sqlite3ExprDeferredDelete(pParse, pExpr) ){\n          pAggInfo->aCol[iAgg].pCExpr = pExpr;\n        }\n      }\n    }else{\n      assert( pExpr->op==TK_AGG_FUNCTION );\n      if( ALWAYS(iAgg<pAggInfo->nFunc)\n       && pAggInfo->aFunc[iAgg].pFExpr==pExpr\n      ){\n        pExpr = sqlite3ExprDup(db, pExpr, 0);\n        if( pExpr && !sqlite3ExprDeferredDelete(pParse, pExpr) ){\n          pAggInfo->aFunc[iAgg].pFExpr = pExpr;\n        }\n      }\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Initialize a Walker object so that will persist AggInfo entries referenced\n** by the tree that is walked.\n*/\nSQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker *pWalker, Parse *pParse){\n  memset(pWalker, 0, sizeof(*pWalker));\n  pWalker->pParse = pParse;\n  pWalker->xExprCallback = agginfoPersistExprCb;\n  pWalker->xSelectCallback = sqlite3SelectWalkNoop;\n}\n\n/*\n** Add a new element to the pAggInfo->aCol[] array.  Return the index of\n** the new element.  Return a negative number if malloc fails.\n*/\nstatic int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){\n  int i;\n  pInfo->aCol = sqlite3ArrayAllocate(\n       db,\n       pInfo->aCol,\n       sizeof(pInfo->aCol[0]),\n       &pInfo->nColumn,\n       &i\n  );\n  return i;\n}\n\n/*\n** Add a new element to the pAggInfo->aFunc[] array.  Return the index of\n** the new element.  Return a negative number if malloc fails.\n*/\nstatic int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){\n  int i;\n  pInfo->aFunc = sqlite3ArrayAllocate(\n       db,\n       pInfo->aFunc,\n       sizeof(pInfo->aFunc[0]),\n       &pInfo->nFunc,\n       &i\n  );\n  return i;\n}\n\n/*\n** Search the AggInfo object for an aCol[] entry that has iTable and iColumn.\n** Return the index in aCol[] of the entry that describes that column.\n**\n** If no prior entry is found, create a new one and return -1.  The\n** new column will have an index of pAggInfo->nColumn-1.\n*/\nstatic void findOrCreateAggInfoColumn(\n  Parse *pParse,       /* Parsing context */\n  AggInfo *pAggInfo,   /* The AggInfo object to search and/or modify */\n  Expr *pExpr          /* Expr describing the column to find or insert */\n){\n  struct AggInfo_col *pCol;\n  int k;\n  int mxTerm = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];\n\n  assert( mxTerm <= SMXV(i16) );\n  assert( pAggInfo->iFirstReg==0 );\n  pCol = pAggInfo->aCol;\n  for(k=0; k<pAggInfo->nColumn; k++, pCol++){\n    if( pCol->pCExpr==pExpr ) return;\n    if( pCol->iTable==pExpr->iTable\n     && pCol->iColumn==pExpr->iColumn\n     && pExpr->op!=TK_IF_NULL_ROW\n    ){\n      goto fix_up_expr;\n    }\n  }\n  k = addAggInfoColumn(pParse->db, pAggInfo);\n  if( k<0 ){\n    /* OOM on resize */\n    assert( pParse->db->mallocFailed );\n    return;\n  }\n  if( k>mxTerm ){\n    sqlite3ErrorMsg(pParse, \"more than %d aggregate terms\", mxTerm);\n    k = mxTerm;\n  }\n  pCol = &pAggInfo->aCol[k];\n  assert( ExprUseYTab(pExpr) );\n  pCol->pTab = pExpr->y.pTab;\n  pCol->iTable = pExpr->iTable;\n  pCol->iColumn = pExpr->iColumn;\n  pCol->iSorterColumn = -1;\n  pCol->pCExpr = pExpr;\n  if( pAggInfo->pGroupBy && pExpr->op!=TK_IF_NULL_ROW ){\n    int j, n;\n    ExprList *pGB = pAggInfo->pGroupBy;\n    struct ExprList_item *pTerm = pGB->a;\n    n = pGB->nExpr;\n    for(j=0; j<n; j++, pTerm++){\n      Expr *pE = pTerm->pExpr;\n      if( pE->op==TK_COLUMN\n       && pE->iTable==pExpr->iTable\n       && pE->iColumn==pExpr->iColumn\n      ){\n        pCol->iSorterColumn = j;\n        break;\n      }\n    }\n  }\n  if( pCol->iSorterColumn<0 ){\n    pCol->iSorterColumn = pAggInfo->nSortingColumn++;\n  }\nfix_up_expr:\n  ExprSetVVAProperty(pExpr, EP_NoReduce);\n  assert( pExpr->pAggInfo==0 || pExpr->pAggInfo==pAggInfo );\n  pExpr->pAggInfo = pAggInfo;\n  if( pExpr->op==TK_COLUMN ){\n    pExpr->op = TK_AGG_COLUMN;\n  }\n  assert( k <= SMXV(pExpr->iAgg) );\n  pExpr->iAgg = (i16)k;\n}\n\n/*\n** This is the xExprCallback for a tree walker.  It is used to\n** implement sqlite3ExprAnalyzeAggregates().  See sqlite3ExprAnalyzeAggregates\n** for additional information.\n*/\nstatic int analyzeAggregate(Walker *pWalker, Expr *pExpr){\n  int i;\n  NameContext *pNC = pWalker->u.pNC;\n  Parse *pParse = pNC->pParse;\n  SrcList *pSrcList = pNC->pSrcList;\n  AggInfo *pAggInfo = pNC->uNC.pAggInfo;\n\n  assert( pNC->ncFlags & NC_UAggInfo );\n  assert( pAggInfo->iFirstReg==0 );\n  switch( pExpr->op ){\n    default: {\n      IndexedExpr *pIEpr;\n      Expr tmp;\n      assert( pParse->iSelfTab==0 );\n      if( (pNC->ncFlags & NC_InAggFunc)==0 ) break;\n      if( pParse->pIdxEpr==0 ) break;\n      for(pIEpr=pParse->pIdxEpr; pIEpr; pIEpr=pIEpr->pIENext){\n        int iDataCur = pIEpr->iDataCur;\n        if( iDataCur<0 ) continue;\n        if( sqlite3ExprCompare(0, pExpr, pIEpr->pExpr, iDataCur)==0 ) break;\n      }\n      if( pIEpr==0 ) break;\n      if( NEVER(!ExprUseYTab(pExpr)) ) break;\n      for(i=0; i<pSrcList->nSrc; i++){\n         if( pSrcList->a[0].iCursor==pIEpr->iDataCur ) break;\n      }\n      if( i>=pSrcList->nSrc ) break;\n      if( NEVER(pExpr->pAggInfo!=0) ) break; /* Resolved by outer context */\n      if( pParse->nErr ){ return WRC_Abort; }\n\n      /* If we reach this point, it means that expression pExpr can be\n      ** translated into a reference to an index column as described by\n      ** pIEpr.\n      */\n      memset(&tmp, 0, sizeof(tmp));\n      tmp.op = TK_AGG_COLUMN;\n      tmp.iTable = pIEpr->iIdxCur;\n      tmp.iColumn = pIEpr->iIdxCol;\n      findOrCreateAggInfoColumn(pParse, pAggInfo, &tmp);\n      if( pParse->nErr ){ return WRC_Abort; }\n      assert( pAggInfo->aCol!=0 );\n      assert( tmp.iAgg<pAggInfo->nColumn );\n      pAggInfo->aCol[tmp.iAgg].pCExpr = pExpr;\n      pExpr->pAggInfo = pAggInfo;\n      pExpr->iAgg = tmp.iAgg;\n      return WRC_Prune;\n    }\n    case TK_IF_NULL_ROW:\n    case TK_AGG_COLUMN:\n    case TK_COLUMN: {\n      testcase( pExpr->op==TK_AGG_COLUMN );\n      testcase( pExpr->op==TK_COLUMN );\n      testcase( pExpr->op==TK_IF_NULL_ROW );\n      /* Check to see if the column is in one of the tables in the FROM\n      ** clause of the aggregate query */\n      if( ALWAYS(pSrcList!=0) ){\n        SrcItem *pItem = pSrcList->a;\n        for(i=0; i<pSrcList->nSrc; i++, pItem++){\n          assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) );\n          if( pExpr->iTable==pItem->iCursor ){\n            findOrCreateAggInfoColumn(pParse, pAggInfo, pExpr);\n            break;\n          } /* endif pExpr->iTable==pItem->iCursor */\n        } /* end loop over pSrcList */\n      }\n      return WRC_Continue;\n    }\n    case TK_AGG_FUNCTION: {\n      if( (pNC->ncFlags & NC_InAggFunc)==0\n       && pWalker->walkerDepth==pExpr->op2\n       && pExpr->pAggInfo==0\n      ){\n        /* Check to see if pExpr is a duplicate of another aggregate\n        ** function that is already in the pAggInfo structure\n        */\n        struct AggInfo_func *pItem = pAggInfo->aFunc;\n        int mxTerm = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];\n        assert( mxTerm <= SMXV(i16) );\n        for(i=0; i<pAggInfo->nFunc; i++, pItem++){\n          if( NEVER(pItem->pFExpr==pExpr) ) break;\n          if( sqlite3ExprCompare(0, pItem->pFExpr, pExpr, -1)==0 ){\n            break;\n          }\n        }\n        if( i>mxTerm ){\n          sqlite3ErrorMsg(pParse, \"more than %d aggregate terms\", mxTerm);\n          i = mxTerm;\n          assert( i<pAggInfo->nFunc );\n        }else if( i>=pAggInfo->nFunc ){\n          /* pExpr is original.  Make a new entry in pAggInfo->aFunc[]\n          */\n          u8 enc = ENC(pParse->db);\n          i = addAggInfoFunc(pParse->db, pAggInfo);\n          if( i>=0 ){\n            int nArg;\n            assert( !ExprHasProperty(pExpr, EP_xIsSelect) );\n            pItem = &pAggInfo->aFunc[i];\n            pItem->pFExpr = pExpr;\n            assert( ExprUseUToken(pExpr) );\n            nArg = pExpr->x.pList ? pExpr->x.pList->nExpr : 0;\n            pItem->pFunc = sqlite3FindFunction(pParse->db,\n                                         pExpr->u.zToken, nArg, enc, 0);\n            assert( pItem->bOBUnique==0 );\n            if( pExpr->pLeft\n             && (pItem->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL)==0\n            ){\n              /* The NEEDCOLL test above causes any ORDER BY clause on\n              ** aggregate min() or max() to be ignored. */\n              ExprList *pOBList;\n              assert( nArg>0 );\n              assert( pExpr->pLeft->op==TK_ORDER );\n              assert( ExprUseXList(pExpr->pLeft) );\n              pItem->iOBTab = pParse->nTab++;\n              pOBList = pExpr->pLeft->x.pList;\n              assert( pOBList->nExpr>0 );\n              assert( pItem->bOBUnique==0 );\n              if( pOBList->nExpr==1\n               && nArg==1\n               && sqlite3ExprCompare(0,pOBList->a[0].pExpr,\n                               pExpr->x.pList->a[0].pExpr,0)==0\n              ){\n                pItem->bOBPayload = 0;\n                pItem->bOBUnique = ExprHasProperty(pExpr, EP_Distinct);\n              }else{\n                pItem->bOBPayload = 1;\n              }\n              pItem->bUseSubtype =\n                    (pItem->pFunc->funcFlags & SQLITE_SUBTYPE)!=0;\n            }else{\n              pItem->iOBTab = -1;\n            }\n            if( ExprHasProperty(pExpr, EP_Distinct) && !pItem->bOBUnique ){\n              pItem->iDistinct = pParse->nTab++;\n            }else{\n              pItem->iDistinct = -1;\n            }\n          }\n        }\n        /* Make pExpr point to the appropriate pAggInfo->aFunc[] entry\n        */\n        assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) );\n        ExprSetVVAProperty(pExpr, EP_NoReduce);\n        assert( i <= SMXV(pExpr->iAgg) );\n        pExpr->iAgg = (i16)i;\n        pExpr->pAggInfo = pAggInfo;\n        return WRC_Prune;\n      }else{\n        return WRC_Continue;\n      }\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Analyze the pExpr expression looking for aggregate functions and\n** for variables that need to be added to AggInfo object that pNC->pAggInfo\n** points to.  Additional entries are made on the AggInfo object as\n** necessary.\n**\n** This routine should only be called after the expression has been\n** analyzed by sqlite3ResolveExprNames().\n*/\nSQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){\n  Walker w;\n  w.xExprCallback = analyzeAggregate;\n  w.xSelectCallback = sqlite3WalkerDepthIncrease;\n  w.xSelectCallback2 = sqlite3WalkerDepthDecrease;\n  w.walkerDepth = 0;\n  w.u.pNC = pNC;\n  w.pParse = 0;\n  assert( pNC->pSrcList!=0 );\n  sqlite3WalkExpr(&w, pExpr);\n}\n\n/*\n** Call sqlite3ExprAnalyzeAggregates() for every expression in an\n** expression list.  Return the number of errors.\n**\n** If an error is found, the analysis is cut short.\n*/\nSQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){\n  struct ExprList_item *pItem;\n  int i;\n  if( pList ){\n    for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){\n      sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);\n    }\n  }\n}\n\n/*\n** Allocate a single new register for use to hold some intermediate result.\n*/\nSQLITE_PRIVATE int sqlite3GetTempReg(Parse *pParse){\n  if( pParse->nTempReg==0 ){\n    return ++pParse->nMem;\n  }\n  return pParse->aTempReg[--pParse->nTempReg];\n}\n\n/*\n** Deallocate a register, making available for reuse for some other\n** purpose.\n*/\nSQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse *pParse, int iReg){\n  if( iReg ){\n    sqlite3VdbeReleaseRegisters(pParse, iReg, 1, 0, 0);\n    if( pParse->nTempReg<ArraySize(pParse->aTempReg) ){\n      pParse->aTempReg[pParse->nTempReg++] = iReg;\n    }\n  }\n}\n\n/*\n** Allocate or deallocate a block of nReg consecutive registers.\n*/\nSQLITE_PRIVATE int sqlite3GetTempRange(Parse *pParse, int nReg){\n  int i, n;\n  if( nReg==1 ) return sqlite3GetTempReg(pParse);\n  i = pParse->iRangeReg;\n  n = pParse->nRangeReg;\n  if( nReg<=n ){\n    pParse->iRangeReg += nReg;\n    pParse->nRangeReg -= nReg;\n  }else{\n    i = pParse->nMem+1;\n    pParse->nMem += nReg;\n  }\n  return i;\n}\nSQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){\n  if( nReg==1 ){\n    sqlite3ReleaseTempReg(pParse, iReg);\n    return;\n  }\n  sqlite3VdbeReleaseRegisters(pParse, iReg, nReg, 0, 0);\n  if( nReg>pParse->nRangeReg ){\n    pParse->nRangeReg = nReg;\n    pParse->iRangeReg = iReg;\n  }\n}\n\n/*\n** Mark all temporary registers as being unavailable for reuse.\n**\n** Always invoke this procedure after coding a subroutine or co-routine\n** that might be invoked from other parts of the code, to ensure that\n** the sub/co-routine does not use registers in common with the code that\n** invokes the sub/co-routine.\n*/\nSQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse *pParse){\n  pParse->nTempReg = 0;\n  pParse->nRangeReg = 0;\n}\n\n/*\n** Make sure sufficient registers have been allocated so that\n** iReg is a valid register number.\n*/\nSQLITE_PRIVATE void sqlite3TouchRegister(Parse *pParse, int iReg){\n  if( pParse->nMem<iReg ) pParse->nMem = iReg;\n}\n\n#if defined(SQLITE_ENABLE_STAT4) || defined(SQLITE_DEBUG)\n/*\n** Return the latest reusable register in the set of all registers.\n** The value returned is no less than iMin.  If any register iMin or\n** greater is in permanent use, then return one more than that last\n** permanent register.\n*/\nSQLITE_PRIVATE int sqlite3FirstAvailableRegister(Parse *pParse, int iMin){\n  const ExprList *pList = pParse->pConstExpr;\n  if( pList ){\n    int i;\n    for(i=0; i<pList->nExpr; i++){\n      if( pList->a[i].u.iConstExprReg>=iMin ){\n        iMin = pList->a[i].u.iConstExprReg + 1;\n      }\n    }\n  }\n  pParse->nTempReg = 0;\n  pParse->nRangeReg = 0;\n  return iMin;\n}\n#endif /* SQLITE_ENABLE_STAT4 || SQLITE_DEBUG */\n\n/*\n** Validate that no temporary register falls within the range of\n** iFirst..iLast, inclusive.  This routine is only call from within assert()\n** statements.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3NoTempsInRange(Parse *pParse, int iFirst, int iLast){\n  int i;\n  if( pParse->nRangeReg>0\n   && pParse->iRangeReg+pParse->nRangeReg > iFirst\n   && pParse->iRangeReg <= iLast\n  ){\n     return 0;\n  }\n  for(i=0; i<pParse->nTempReg; i++){\n    if( pParse->aTempReg[i]>=iFirst && pParse->aTempReg[i]<=iLast ){\n      return 0;\n    }\n  }\n  if( pParse->pConstExpr ){\n    ExprList *pList = pParse->pConstExpr;\n    for(i=0; i<pList->nExpr; i++){\n      int iReg = pList->a[i].u.iConstExprReg;\n      if( iReg==0 ) continue;\n      if( iReg>=iFirst && iReg<=iLast ) return 0;\n    }\n  }\n  return 1;\n}\n#endif /* SQLITE_DEBUG */\n\n/************** End of expr.c ************************************************/\n/************** Begin file alter.c *******************************************/\n/*\n** 2005 February 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that used to generate VDBE code\n** that implements the ALTER TABLE command.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** The code in this file only exists if we are not omitting the\n** ALTER TABLE logic from the build.\n*/\n#ifndef SQLITE_OMIT_ALTERTABLE\n\n/*\n** Parameter zName is the name of a table that is about to be altered\n** (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN).\n** If the table is a system table, this function leaves an error message\n** in pParse->zErr (system tables may not be altered) and returns non-zero.\n**\n** Or, if zName is not a system table, zero is returned.\n*/\nstatic int isAlterableTable(Parse *pParse, Table *pTab){\n  if( 0==sqlite3StrNICmp(pTab->zName, \"sqlite_\", 7)\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n   || (pTab->tabFlags & TF_Eponymous)!=0\n   || ( (pTab->tabFlags & TF_Shadow)!=0\n        && sqlite3ReadOnlyShadowTables(pParse->db)\n   )\n#endif\n  ){\n    sqlite3ErrorMsg(pParse, \"table %s may not be altered\", pTab->zName);\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** Generate code to verify that the schemas of database zDb and, if\n** bTemp is not true, database \"temp\", can still be parsed. This is\n** called at the end of the generation of an ALTER TABLE ... RENAME ...\n** statement to ensure that the operation has not rendered any schema\n** objects unusable.\n*/\nstatic void renameTestSchema(\n  Parse *pParse,                  /* Parse context */\n  const char *zDb,                /* Name of db to verify schema of */\n  int bTemp,                      /* True if this is the temp db */\n  const char *zWhen,              /* \"when\" part of error message */\n  int bNoDQS                      /* Do not allow DQS in the schema */\n){\n  pParse->colNamesSet = 1;\n  sqlite3NestedParse(pParse,\n      \"SELECT 1 \"\n      \"FROM \\\"%w\\\".\" LEGACY_SCHEMA_TABLE \" \"\n      \"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\"\n      \" AND sql NOT LIKE 'create virtual%%'\"\n      \" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \",\n      zDb,\n      zDb, bTemp, zWhen, bNoDQS\n  );\n\n  if( bTemp==0 ){\n    sqlite3NestedParse(pParse,\n        \"SELECT 1 \"\n        \"FROM temp.\" LEGACY_SCHEMA_TABLE \" \"\n        \"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\"\n        \" AND sql NOT LIKE 'create virtual%%'\"\n        \" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \",\n        zDb, zWhen, bNoDQS\n    );\n  }\n}\n\n/*\n** Generate VM code to replace any double-quoted strings (but not double-quoted\n** identifiers) within the \"sql\" column of the sqlite_schema table in\n** database zDb with their single-quoted equivalents. If argument bTemp is\n** not true, similarly update all SQL statements in the sqlite_schema table\n** of the temp db.\n*/\nstatic void renameFixQuotes(Parse *pParse, const char *zDb, int bTemp){\n  sqlite3NestedParse(pParse,\n      \"UPDATE \\\"%w\\\".\" LEGACY_SCHEMA_TABLE\n      \" SET sql = sqlite_rename_quotefix(%Q, sql)\"\n      \"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\"\n      \" AND sql NOT LIKE 'create virtual%%'\" , zDb, zDb\n  );\n  if( bTemp==0 ){\n    sqlite3NestedParse(pParse,\n      \"UPDATE temp.\" LEGACY_SCHEMA_TABLE\n      \" SET sql = sqlite_rename_quotefix('temp', sql)\"\n      \"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\"\n      \" AND sql NOT LIKE 'create virtual%%'\"\n    );\n  }\n}\n\n/*\n** Generate code to reload the schema for database iDb. And, if iDb!=1, for\n** the temp database as well.\n*/\nstatic void renameReloadSchema(Parse *pParse, int iDb, u16 p5){\n  Vdbe *v = pParse->pVdbe;\n  if( v ){\n    sqlite3ChangeCookie(pParse, iDb);\n    sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, iDb, 0, p5);\n    if( iDb!=1 ) sqlite3VdbeAddParseSchemaOp(pParse->pVdbe, 1, 0, p5);\n  }\n}\n\n/*\n** Generate code to implement the \"ALTER TABLE xxx RENAME TO yyy\"\n** command.\n*/\nSQLITE_PRIVATE void sqlite3AlterRenameTable(\n  Parse *pParse,            /* Parser context. */\n  SrcList *pSrc,            /* The table to rename. */\n  Token *pName              /* The new table name. */\n){\n  int iDb;                  /* Database that contains the table */\n  char *zDb;                /* Name of database iDb */\n  Table *pTab;              /* Table being renamed */\n  char *zName = 0;          /* NULL-terminated version of pName */\n  sqlite3 *db = pParse->db; /* Database connection */\n  int nTabName;             /* Number of UTF-8 characters in zTabName */\n  const char *zTabName;     /* Original name of the table */\n  Vdbe *v;\n  VTable *pVTab = 0;        /* Non-zero if this is a v-tab with an xRename() */\n\n  if( NEVER(db->mallocFailed) ) goto exit_rename_table;\n  assert( pSrc->nSrc==1 );\n  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );\n\n  pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);\n  if( !pTab ) goto exit_rename_table;\n  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n  zDb = db->aDb[iDb].zDbSName;\n\n  /* Get a NULL terminated version of the new table name. */\n  zName = sqlite3NameFromToken(db, pName);\n  if( !zName ) goto exit_rename_table;\n\n  /* Check that a table or index named 'zName' does not already exist\n  ** in database iDb. If so, this is an error.\n  */\n  if( sqlite3FindTable(db, zName, zDb)\n   || sqlite3FindIndex(db, zName, zDb)\n   || sqlite3IsShadowTableOf(db, pTab, zName)\n  ){\n    sqlite3ErrorMsg(pParse,\n        \"there is already another table or index with this name: %s\", zName);\n    goto exit_rename_table;\n  }\n\n  /* Make sure it is not a system table being altered, or a reserved name\n  ** that the table is being renamed to.\n  */\n  if( SQLITE_OK!=isAlterableTable(pParse, pTab) ){\n    goto exit_rename_table;\n  }\n  if( SQLITE_OK!=sqlite3CheckObjectName(pParse,zName,\"table\",zName) ){\n    goto exit_rename_table;\n  }\n\n#ifndef SQLITE_OMIT_VIEW\n  if( IsView(pTab) ){\n    sqlite3ErrorMsg(pParse, \"view %s may not be altered\", pTab->zName);\n    goto exit_rename_table;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  /* Invoke the authorization callback. */\n  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){\n    goto exit_rename_table;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( sqlite3ViewGetColumnNames(pParse, pTab) ){\n    goto exit_rename_table;\n  }\n  if( IsVirtual(pTab) ){\n    pVTab = sqlite3GetVTable(db, pTab);\n    if( pVTab->pVtab->pModule->xRename==0 ){\n      pVTab = 0;\n    }\n  }\n#endif\n\n  /* Begin a transaction for database iDb. Then modify the schema cookie\n  ** (since the ALTER TABLE modifies the schema). Call sqlite3MayAbort(),\n  ** as the scalar functions (e.g. sqlite_rename_table()) invoked by the\n  ** nested SQL may raise an exception.  */\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 ){\n    goto exit_rename_table;\n  }\n  sqlite3MayAbort(pParse);\n\n  /* figure out how many UTF-8 characters are in zName */\n  zTabName = pTab->zName;\n  nTabName = sqlite3Utf8CharLen(zTabName, -1);\n\n  /* Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in\n  ** the schema to use the new table name.  */\n  sqlite3NestedParse(pParse,\n      \"UPDATE \\\"%w\\\".\" LEGACY_SCHEMA_TABLE \" SET \"\n      \"sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) \"\n      \"WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)\"\n      \"AND   name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\"\n      , zDb, zDb, zTabName, zName, (iDb==1), zTabName\n  );\n\n  /* Update the tbl_name and name columns of the sqlite_schema table\n  ** as required.  */\n  sqlite3NestedParse(pParse,\n      \"UPDATE %Q.\" LEGACY_SCHEMA_TABLE \" SET \"\n          \"tbl_name = %Q, \"\n          \"name = CASE \"\n            \"WHEN type='table' THEN %Q \"\n            \"WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' \"\n            \"     AND type='index' THEN \"\n             \"'sqlite_autoindex_' || %Q || substr(name,%d+18) \"\n            \"ELSE name END \"\n      \"WHERE tbl_name=%Q COLLATE nocase AND \"\n          \"(type='table' OR type='index' OR type='trigger');\",\n      zDb,\n      zName, zName, zName,\n      nTabName, zTabName\n  );\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n  /* If the sqlite_sequence table exists in this database, then update\n  ** it with the new table name.\n  */\n  if( sqlite3FindTable(db, \"sqlite_sequence\", zDb) ){\n    sqlite3NestedParse(pParse,\n        \"UPDATE \\\"%w\\\".sqlite_sequence set name = %Q WHERE name = %Q\",\n        zDb, zName, pTab->zName);\n  }\n#endif\n\n  /* If the table being renamed is not itself part of the temp database,\n  ** edit view and trigger definitions within the temp database\n  ** as required.  */\n  if( iDb!=1 ){\n    sqlite3NestedParse(pParse,\n        \"UPDATE sqlite_temp_schema SET \"\n            \"sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), \"\n            \"tbl_name = \"\n              \"CASE WHEN tbl_name=%Q COLLATE nocase AND \"\n              \"  sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) \"\n              \"THEN %Q ELSE tbl_name END \"\n            \"WHERE type IN ('view', 'trigger')\"\n        , zDb, zTabName, zName, zTabName, zDb, zName);\n  }\n\n  /* If this is a virtual table, invoke the xRename() function if\n  ** one is defined. The xRename() callback will modify the names\n  ** of any resources used by the v-table implementation (including other\n  ** SQLite tables) that are identified by the name of the virtual table.\n  */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( pVTab ){\n    int i = ++pParse->nMem;\n    sqlite3VdbeLoadString(v, i, zName);\n    sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);\n  }\n#endif\n\n  renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);\n  renameTestSchema(pParse, zDb, iDb==1, \"after rename\", 0);\n\nexit_rename_table:\n  sqlite3SrcListDelete(db, pSrc);\n  sqlite3DbFree(db, zName);\n}\n\n/*\n** Write code that will raise an error if the table described by\n** zDb and zTab is not empty.\n*/\nstatic void sqlite3ErrorIfNotEmpty(\n  Parse *pParse,        /* Parsing context */\n  const char *zDb,      /* Schema holding the table */\n  const char *zTab,     /* Table to check for empty */\n  const char *zErr      /* Error message text */\n){\n  sqlite3NestedParse(pParse,\n     \"SELECT raise(ABORT,%Q) FROM \\\"%w\\\".\\\"%w\\\"\",\n     zErr, zDb, zTab\n  );\n}\n\n/*\n** This function is called after an \"ALTER TABLE ... ADD\" statement\n** has been parsed. Argument pColDef contains the text of the new\n** column definition.\n**\n** The Table structure pParse->pNewTable was extended to include\n** the new column during parsing.\n*/\nSQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){\n  Table *pNew;              /* Copy of pParse->pNewTable */\n  Table *pTab;              /* Table being altered */\n  int iDb;                  /* Database number */\n  const char *zDb;          /* Database name */\n  const char *zTab;         /* Table name */\n  char *zCol;               /* Null-terminated column definition */\n  Column *pCol;             /* The new column */\n  Expr *pDflt;              /* Default value for the new column */\n  sqlite3 *db;              /* The database connection; */\n  Vdbe *v;                  /* The prepared statement under construction */\n  int r1;                   /* Temporary registers */\n\n  db = pParse->db;\n  assert( db->pParse==pParse );\n  if( pParse->nErr ) return;\n  assert( db->mallocFailed==0 );\n  pNew = pParse->pNewTable;\n  assert( pNew );\n\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  iDb = sqlite3SchemaToIndex(db, pNew->pSchema);\n  zDb = db->aDb[iDb].zDbSName;\n  zTab = &pNew->zName[16];  /* Skip the \"sqlite_altertab_\" prefix on the name */\n  pCol = &pNew->aCol[pNew->nCol-1];\n  pDflt = sqlite3ColumnExpr(pNew, pCol);\n  pTab = sqlite3FindTable(db, zTab, zDb);\n  assert( pTab );\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  /* Invoke the authorization callback. */\n  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){\n    return;\n  }\n#endif\n\n\n  /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.\n  ** If there is a NOT NULL constraint, then the default value for the\n  ** column must not be NULL.\n  */\n  if( pCol->colFlags & COLFLAG_PRIMKEY ){\n    sqlite3ErrorMsg(pParse, \"Cannot add a PRIMARY KEY column\");\n    return;\n  }\n  if( pNew->pIndex ){\n    sqlite3ErrorMsg(pParse,\n         \"Cannot add a UNIQUE column\");\n    return;\n  }\n  if( (pCol->colFlags & COLFLAG_GENERATED)==0 ){\n    /* If the default value for the new column was specified with a\n    ** literal NULL, then set pDflt to 0. This simplifies checking\n    ** for an SQL NULL default below.\n    */\n    assert( pDflt==0 || pDflt->op==TK_SPAN );\n    if( pDflt && pDflt->pLeft->op==TK_NULL ){\n      pDflt = 0;\n    }\n    assert( IsOrdinaryTable(pNew) );\n    if( (db->flags&SQLITE_ForeignKeys) && pNew->u.tab.pFKey && pDflt ){\n      sqlite3ErrorIfNotEmpty(pParse, zDb, zTab,\n          \"Cannot add a REFERENCES column with non-NULL default value\");\n    }\n    if( pCol->notNull && !pDflt ){\n      sqlite3ErrorIfNotEmpty(pParse, zDb, zTab,\n          \"Cannot add a NOT NULL column with default value NULL\");\n    }\n\n\n    /* Ensure the default expression is something that sqlite3ValueFromExpr()\n    ** can handle (i.e. not CURRENT_TIME etc.)\n    */\n    if( pDflt ){\n      sqlite3_value *pVal = 0;\n      int rc;\n      rc = sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_BLOB, &pVal);\n      assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );\n      if( rc!=SQLITE_OK ){\n        assert( db->mallocFailed == 1 );\n        return;\n      }\n      if( !pVal ){\n        sqlite3ErrorIfNotEmpty(pParse, zDb, zTab,\n           \"Cannot add a column with non-constant default\");\n      }\n      sqlite3ValueFree(pVal);\n    }\n  }else if( pCol->colFlags & COLFLAG_STORED ){\n    sqlite3ErrorIfNotEmpty(pParse, zDb, zTab, \"cannot add a STORED column\");\n  }\n\n\n  /* Modify the CREATE TABLE statement. */\n  zCol = sqlite3DbStrNDup(db, (char*)pColDef->z, pColDef->n);\n  if( zCol ){\n    char *zEnd = &zCol[pColDef->n-1];\n    while( zEnd>zCol && (*zEnd==';' || sqlite3Isspace(*zEnd)) ){\n      *zEnd-- = '\\0';\n    }\n    /* substr() operations on characters, but addColOffset is in bytes. So we\n    ** have to use printf() to translate between these units: */\n    assert( IsOrdinaryTable(pTab) );\n    assert( IsOrdinaryTable(pNew) );\n    sqlite3NestedParse(pParse,\n        \"UPDATE \\\"%w\\\".\" LEGACY_SCHEMA_TABLE \" SET \"\n          \"sql = printf('%%.%ds, ',sql) || %Q\"\n          \" || substr(sql,1+length(printf('%%.%ds',sql))) \"\n        \"WHERE type = 'table' AND name = %Q\",\n      zDb, pNew->u.tab.addColOffset, zCol, pNew->u.tab.addColOffset,\n      zTab\n    );\n    sqlite3DbFree(db, zCol);\n  }\n\n  v = sqlite3GetVdbe(pParse);\n  if( v ){\n    /* Make sure the schema version is at least 3.  But do not upgrade\n    ** from less than 3 to 4, as that will corrupt any preexisting DESC\n    ** index.\n    */\n    r1 = sqlite3GetTempReg(pParse);\n    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);\n    sqlite3VdbeUsesBtree(v, iDb);\n    sqlite3VdbeAddOp2(v, OP_AddImm, r1, -2);\n    sqlite3VdbeAddOp2(v, OP_IfPos, r1, sqlite3VdbeCurrentAddr(v)+2);\n    VdbeCoverage(v);\n    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3);\n    sqlite3ReleaseTempReg(pParse, r1);\n\n    /* Reload the table definition */\n    renameReloadSchema(pParse, iDb, INITFLAG_AlterAdd);\n\n    /* Verify that constraints are still satisfied */\n    if( pNew->pCheck!=0\n     || (pCol->notNull && (pCol->colFlags & COLFLAG_GENERATED)!=0)\n     || (pTab->tabFlags & TF_Strict)!=0\n    ){\n      sqlite3NestedParse(pParse,\n        \"SELECT CASE WHEN quick_check GLOB 'CHECK*'\"\n        \" THEN raise(ABORT,'CHECK constraint failed')\"\n        \" WHEN quick_check GLOB 'non-* value in*'\"\n        \" THEN raise(ABORT,'type mismatch on DEFAULT')\"\n        \" ELSE raise(ABORT,'NOT NULL constraint failed')\"\n        \" END\"\n        \"  FROM pragma_quick_check(%Q,%Q)\"\n        \" WHERE quick_check GLOB 'CHECK*'\"\n        \" OR quick_check GLOB 'NULL*'\"\n        \" OR quick_check GLOB 'non-* value in*'\",\n        zTab, zDb\n      );\n    }\n  }\n}\n\n/*\n** This function is called by the parser after the table-name in\n** an \"ALTER TABLE <table-name> ADD\" statement is parsed. Argument\n** pSrc is the full-name of the table being altered.\n**\n** This routine makes a (partial) copy of the Table structure\n** for the table being altered and sets Parse.pNewTable to point\n** to it. Routines called by the parser as the column definition\n** is parsed (i.e. sqlite3AddColumn()) add the new Column data to\n** the copy. The copy of the Table structure is deleted by tokenize.c\n** after parsing is finished.\n**\n** Routine sqlite3AlterFinishAddColumn() will be called to complete\n** coding the \"ALTER TABLE ... ADD\" statement.\n*/\nSQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){\n  Table *pNew;\n  Table *pTab;\n  int iDb;\n  int i;\n  int nAlloc;\n  sqlite3 *db = pParse->db;\n\n  /* Look up the table being altered. */\n  assert( pParse->pNewTable==0 );\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  if( db->mallocFailed ) goto exit_begin_add_column;\n  pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);\n  if( !pTab ) goto exit_begin_add_column;\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTab) ){\n    sqlite3ErrorMsg(pParse, \"virtual tables may not be altered\");\n    goto exit_begin_add_column;\n  }\n#endif\n\n  /* Make sure this is not an attempt to ALTER a view. */\n  if( IsView(pTab) ){\n    sqlite3ErrorMsg(pParse, \"Cannot add a column to a view\");\n    goto exit_begin_add_column;\n  }\n  if( SQLITE_OK!=isAlterableTable(pParse, pTab) ){\n    goto exit_begin_add_column;\n  }\n\n  sqlite3MayAbort(pParse);\n  assert( IsOrdinaryTable(pTab) );\n  assert( pTab->u.tab.addColOffset>0 );\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n\n  /* Put a copy of the Table struct in Parse.pNewTable for the\n  ** sqlite3AddColumn() function and friends to modify.  But modify\n  ** the name by adding an \"sqlite_altertab_\" prefix.  By adding this\n  ** prefix, we insure that the name will not collide with an existing\n  ** table because user table are not allowed to have the \"sqlite_\"\n  ** prefix on their name.\n  */\n  pNew = (Table*)sqlite3DbMallocZero(db, sizeof(Table));\n  if( !pNew ) goto exit_begin_add_column;\n  pParse->pNewTable = pNew;\n  pNew->nTabRef = 1;\n  pNew->nCol = pTab->nCol;\n  assert( pNew->nCol>0 );\n  nAlloc = (((pNew->nCol-1)/8)*8)+8;\n  assert( nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8 );\n  pNew->aCol = (Column*)sqlite3DbMallocZero(db, sizeof(Column)*(u32)nAlloc);\n  pNew->zName = sqlite3MPrintf(db, \"sqlite_altertab_%s\", pTab->zName);\n  if( !pNew->aCol || !pNew->zName ){\n    assert( db->mallocFailed );\n    goto exit_begin_add_column;\n  }\n  memcpy(pNew->aCol, pTab->aCol, sizeof(Column)*(size_t)pNew->nCol);\n  for(i=0; i<pNew->nCol; i++){\n    Column *pCol = &pNew->aCol[i];\n    pCol->zCnName = sqlite3DbStrDup(db, pCol->zCnName);\n    pCol->hName = sqlite3StrIHash(pCol->zCnName);\n  }\n  assert( IsOrdinaryTable(pNew) );\n  pNew->u.tab.pDfltList = sqlite3ExprListDup(db, pTab->u.tab.pDfltList, 0);\n  pNew->pSchema = db->aDb[iDb].pSchema;\n  pNew->u.tab.addColOffset = pTab->u.tab.addColOffset;\n  assert( pNew->nTabRef==1 );\n\nexit_begin_add_column:\n  sqlite3SrcListDelete(db, pSrc);\n  return;\n}\n\n/*\n** Parameter pTab is the subject of an ALTER TABLE ... RENAME COLUMN\n** command. This function checks if the table is a view or virtual\n** table (columns of views or virtual tables may not be renamed). If so,\n** it loads an error message into pParse and returns non-zero.\n**\n** Or, if pTab is not a view or virtual table, zero is returned.\n*/\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)\nstatic int isRealTable(Parse *pParse, Table *pTab, int bDrop){\n  const char *zType = 0;\n#ifndef SQLITE_OMIT_VIEW\n  if( IsView(pTab) ){\n    zType = \"view\";\n  }\n#endif\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTab) ){\n    zType = \"virtual table\";\n  }\n#endif\n  if( zType ){\n    sqlite3ErrorMsg(pParse, \"cannot %s %s \\\"%s\\\"\",\n        (bDrop ? \"drop column from\" : \"rename columns of\"),\n        zType, pTab->zName\n    );\n    return 1;\n  }\n  return 0;\n}\n#else /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */\n# define isRealTable(x,y,z) (0)\n#endif\n\n/*\n** Handles the following parser reduction:\n**\n**  cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew\n*/\nSQLITE_PRIVATE void sqlite3AlterRenameColumn(\n  Parse *pParse,                  /* Parsing context */\n  SrcList *pSrc,                  /* Table being altered.  pSrc->nSrc==1 */\n  Token *pOld,                    /* Name of column being changed */\n  Token *pNew                     /* New column name */\n){\n  sqlite3 *db = pParse->db;       /* Database connection */\n  Table *pTab;                    /* Table being updated */\n  int iCol;                       /* Index of column being renamed */\n  char *zOld = 0;                 /* Old column name */\n  char *zNew = 0;                 /* New column name */\n  const char *zDb;                /* Name of schema containing the table */\n  int iSchema;                    /* Index of the schema */\n  int bQuote;                     /* True to quote the new name */\n\n  /* Locate the table to be altered */\n  pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);\n  if( !pTab ) goto exit_rename_column;\n\n  /* Cannot alter a system table */\n  if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_rename_column;\n  if( SQLITE_OK!=isRealTable(pParse, pTab, 0) ) goto exit_rename_column;\n\n  /* Which schema holds the table to be altered */\n  iSchema = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iSchema>=0 );\n  zDb = db->aDb[iSchema].zDbSName;\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  /* Invoke the authorization callback. */\n  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){\n    goto exit_rename_column;\n  }\n#endif\n\n  /* Make sure the old name really is a column name in the table to be\n  ** altered.  Set iCol to be the index of the column being renamed */\n  zOld = sqlite3NameFromToken(db, pOld);\n  if( !zOld ) goto exit_rename_column;\n  iCol = sqlite3ColumnIndex(pTab, zOld);\n  if( iCol<0 ){\n    sqlite3ErrorMsg(pParse, \"no such column: \\\"%T\\\"\", pOld);\n    goto exit_rename_column;\n  }\n\n  /* Ensure the schema contains no double-quoted strings */\n  renameTestSchema(pParse, zDb, iSchema==1, \"\", 0);\n  renameFixQuotes(pParse, zDb, iSchema==1);\n\n  /* Do the rename operation using a recursive UPDATE statement that\n  ** uses the sqlite_rename_column() SQL function to compute the new\n  ** CREATE statement text for the sqlite_schema table.\n  */\n  sqlite3MayAbort(pParse);\n  zNew = sqlite3NameFromToken(db, pNew);\n  if( !zNew ) goto exit_rename_column;\n  assert( pNew->n>0 );\n  bQuote = sqlite3Isquote(pNew->z[0]);\n  sqlite3NestedParse(pParse,\n      \"UPDATE \\\"%w\\\".\" LEGACY_SCHEMA_TABLE \" SET \"\n      \"sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) \"\n      \"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' \"\n      \" AND (type != 'index' OR tbl_name = %Q)\",\n      zDb,\n      zDb, pTab->zName, iCol, zNew, bQuote, iSchema==1,\n      pTab->zName\n  );\n\n  sqlite3NestedParse(pParse,\n      \"UPDATE temp.\" LEGACY_SCHEMA_TABLE \" SET \"\n      \"sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) \"\n      \"WHERE type IN ('trigger', 'view')\",\n      zDb, pTab->zName, iCol, zNew, bQuote\n  );\n\n  /* Drop and reload the database schema. */\n  renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename);\n  renameTestSchema(pParse, zDb, iSchema==1, \"after rename\", 1);\n\n exit_rename_column:\n  sqlite3SrcListDelete(db, pSrc);\n  sqlite3DbFree(db, zOld);\n  sqlite3DbFree(db, zNew);\n  return;\n}\n\n/*\n** Each RenameToken object maps an element of the parse tree into\n** the token that generated that element.  The parse tree element\n** might be one of:\n**\n**     *  A pointer to an Expr that represents an ID\n**     *  The name of a table column in Column.zName\n**\n** A list of RenameToken objects can be constructed during parsing.\n** Each new object is created by sqlite3RenameTokenMap().\n** As the parse tree is transformed, the sqlite3RenameTokenRemap()\n** routine is used to keep the mapping current.\n**\n** After the parse finishes, renameTokenFind() routine can be used\n** to look up the actual token value that created some element in\n** the parse tree.\n*/\nstruct RenameToken {\n  const void *p;         /* Parse tree element created by token t */\n  Token t;               /* The token that created parse tree element p */\n  RenameToken *pNext;    /* Next is a list of all RenameToken objects */\n};\n\n/*\n** The context of an ALTER TABLE RENAME COLUMN operation that gets passed\n** down into the Walker.\n*/\ntypedef struct RenameCtx RenameCtx;\nstruct RenameCtx {\n  RenameToken *pList;             /* List of tokens to overwrite */\n  int nList;                      /* Number of tokens in pList */\n  int iCol;                       /* Index of column being renamed */\n  Table *pTab;                    /* Table being ALTERed */\n  const char *zOld;               /* Old column name */\n};\n\n#ifdef SQLITE_DEBUG\n/*\n** This function is only for debugging. It performs two tasks:\n**\n**   1. Checks that pointer pPtr does not already appear in the\n**      rename-token list.\n**\n**   2. Dereferences each pointer in the rename-token list.\n**\n** The second is most effective when debugging under valgrind or\n** address-sanitizer or similar. If any of these pointers no longer\n** point to valid objects, an exception is raised by the memory-checking\n** tool.\n**\n** The point of this is to prevent comparisons of invalid pointer values.\n** Even though this always seems to work, it is undefined according to the\n** C standard. Example of undefined comparison:\n**\n**     sqlite3_free(x);\n**     if( x==y ) ...\n**\n** Technically, as x no longer points into a valid object or to the byte\n** following a valid object, it may not be used in comparison operations.\n*/\nstatic void renameTokenCheckAll(Parse *pParse, const void *pPtr){\n  assert( pParse==pParse->db->pParse );\n  assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );\n  if( pParse->nErr==0 ){\n    const RenameToken *p;\n    u32 i = 1;\n    for(p=pParse->pRename; p; p=p->pNext){\n      if( p->p ){\n        assert( p->p!=pPtr );\n        i += *(u8*)(p->p) | 1;\n      }\n    }\n    assert( i>0 );\n  }\n}\n#else\n# define renameTokenCheckAll(x,y)\n#endif\n\n/*\n** Remember that the parser tree element pPtr was created using\n** the token pToken.\n**\n** In other words, construct a new RenameToken object and add it\n** to the list of RenameToken objects currently being built up\n** in pParse->pRename.\n**\n** The pPtr argument is returned so that this routine can be used\n** with tail recursion in tokenExpr() routine, for a small performance\n** improvement.\n*/\nSQLITE_PRIVATE const void *sqlite3RenameTokenMap(\n  Parse *pParse,\n  const void *pPtr,\n  const Token *pToken\n){\n  RenameToken *pNew;\n  assert( pPtr || pParse->db->mallocFailed );\n  renameTokenCheckAll(pParse, pPtr);\n  if( ALWAYS(pParse->eParseMode!=PARSE_MODE_UNMAP) ){\n    pNew = sqlite3DbMallocZero(pParse->db, sizeof(RenameToken));\n    if( pNew ){\n      pNew->p = pPtr;\n      pNew->t = *pToken;\n      pNew->pNext = pParse->pRename;\n      pParse->pRename = pNew;\n    }\n  }\n\n  return pPtr;\n}\n\n/*\n** It is assumed that there is already a RenameToken object associated\n** with parse tree element pFrom. This function remaps the associated token\n** to parse tree element pTo.\n*/\nSQLITE_PRIVATE void sqlite3RenameTokenRemap(Parse *pParse, const void *pTo, const void *pFrom){\n  RenameToken *p;\n  renameTokenCheckAll(pParse, pTo);\n  for(p=pParse->pRename; p; p=p->pNext){\n    if( p->p==pFrom ){\n      p->p = pTo;\n      break;\n    }\n  }\n}\n\n/*\n** Walker callback used by sqlite3RenameExprUnmap().\n*/\nstatic int renameUnmapExprCb(Walker *pWalker, Expr *pExpr){\n  Parse *pParse = pWalker->pParse;\n  sqlite3RenameTokenRemap(pParse, 0, (const void*)pExpr);\n  if( ExprUseYTab(pExpr) ){\n    sqlite3RenameTokenRemap(pParse, 0, (const void*)&pExpr->y.pTab);\n  }\n  return WRC_Continue;\n}\n\n/*\n** Iterate through the Select objects that are part of WITH clauses attached\n** to select statement pSelect.\n*/\nstatic void renameWalkWith(Walker *pWalker, Select *pSelect){\n  With *pWith = pSelect->pWith;\n  if( pWith ){\n    Parse *pParse = pWalker->pParse;\n    int i;\n    With *pCopy = 0;\n    assert( pWith->nCte>0 );\n    if( (pWith->a[0].pSelect->selFlags & SF_Expanded)==0 ){\n      /* Push a copy of the With object onto the with-stack. We use a copy\n      ** here as the original will be expanded and resolved (flags SF_Expanded\n      ** and SF_Resolved) below. And the parser code that uses the with-stack\n      ** fails if the Select objects on it have already been expanded and\n      ** resolved.  */\n      pCopy = sqlite3WithDup(pParse->db, pWith);\n      pCopy = sqlite3WithPush(pParse, pCopy, 1);\n    }\n    for(i=0; i<pWith->nCte; i++){\n      Select *p = pWith->a[i].pSelect;\n      NameContext sNC;\n      memset(&sNC, 0, sizeof(sNC));\n      sNC.pParse = pParse;\n      if( pCopy ) sqlite3SelectPrep(sNC.pParse, p, &sNC);\n      if( sNC.pParse->db->mallocFailed ) return;\n      sqlite3WalkSelect(pWalker, p);\n      sqlite3RenameExprlistUnmap(pParse, pWith->a[i].pCols);\n    }\n    if( pCopy && pParse->pWith==pCopy ){\n      pParse->pWith = pCopy->pOuter;\n    }\n  }\n}\n\n/*\n** Unmap all tokens in the IdList object passed as the second argument.\n*/\nstatic void unmapColumnIdlistNames(\n  Parse *pParse,\n  const IdList *pIdList\n){\n  int ii;\n  assert( pIdList!=0 );\n  for(ii=0; ii<pIdList->nId; ii++){\n    sqlite3RenameTokenRemap(pParse, 0, (const void*)pIdList->a[ii].zName);\n  }\n}\n\n/*\n** Walker callback used by sqlite3RenameExprUnmap().\n*/\nstatic int renameUnmapSelectCb(Walker *pWalker, Select *p){\n  Parse *pParse = pWalker->pParse;\n  int i;\n  if( pParse->nErr ) return WRC_Abort;\n  testcase( p->selFlags & SF_View );\n  testcase( p->selFlags & SF_CopyCte );\n  if( p->selFlags & (SF_View|SF_CopyCte) ){\n    return WRC_Prune;\n  }\n  if( ALWAYS(p->pEList) ){\n    ExprList *pList = p->pEList;\n    for(i=0; i<pList->nExpr; i++){\n      if( pList->a[i].zEName && pList->a[i].fg.eEName==ENAME_NAME ){\n        sqlite3RenameTokenRemap(pParse, 0, (void*)pList->a[i].zEName);\n      }\n    }\n  }\n  if( ALWAYS(p->pSrc) ){  /* Every Select as a SrcList, even if it is empty */\n    SrcList *pSrc = p->pSrc;\n    for(i=0; i<pSrc->nSrc; i++){\n      sqlite3RenameTokenRemap(pParse, 0, (void*)pSrc->a[i].zName);\n      if( pSrc->a[i].fg.isUsing==0 ){\n        sqlite3WalkExpr(pWalker, pSrc->a[i].u3.pOn);\n      }else{\n        unmapColumnIdlistNames(pParse, pSrc->a[i].u3.pUsing);\n      }\n    }\n  }\n\n  renameWalkWith(pWalker, p);\n  return WRC_Continue;\n}\n\n/*\n** Remove all nodes that are part of expression pExpr from the rename list.\n*/\nSQLITE_PRIVATE void sqlite3RenameExprUnmap(Parse *pParse, Expr *pExpr){\n  u8 eMode = pParse->eParseMode;\n  Walker sWalker;\n  memset(&sWalker, 0, sizeof(Walker));\n  sWalker.pParse = pParse;\n  sWalker.xExprCallback = renameUnmapExprCb;\n  sWalker.xSelectCallback = renameUnmapSelectCb;\n  pParse->eParseMode = PARSE_MODE_UNMAP;\n  sqlite3WalkExpr(&sWalker, pExpr);\n  pParse->eParseMode = eMode;\n}\n\n/*\n** Remove all nodes that are part of expression-list pEList from the\n** rename list.\n*/\nSQLITE_PRIVATE void sqlite3RenameExprlistUnmap(Parse *pParse, ExprList *pEList){\n  if( pEList ){\n    int i;\n    Walker sWalker;\n    memset(&sWalker, 0, sizeof(Walker));\n    sWalker.pParse = pParse;\n    sWalker.xExprCallback = renameUnmapExprCb;\n    sqlite3WalkExprList(&sWalker, pEList);\n    for(i=0; i<pEList->nExpr; i++){\n      if( ALWAYS(pEList->a[i].fg.eEName==ENAME_NAME) ){\n        sqlite3RenameTokenRemap(pParse, 0, (void*)pEList->a[i].zEName);\n      }\n    }\n  }\n}\n\n/*\n** Free the list of RenameToken objects given in the second argument\n*/\nstatic void renameTokenFree(sqlite3 *db, RenameToken *pToken){\n  RenameToken *pNext;\n  RenameToken *p;\n  for(p=pToken; p; p=pNext){\n    pNext = p->pNext;\n    sqlite3DbFree(db, p);\n  }\n}\n\n/*\n** Search the Parse object passed as the first argument for a RenameToken\n** object associated with parse tree element pPtr. If found, return a pointer\n** to it. Otherwise, return NULL.\n**\n** If the second argument passed to this function is not NULL and a matching\n** RenameToken object is found, remove it from the Parse object and add it to\n** the list maintained by the RenameCtx object.\n*/\nstatic RenameToken *renameTokenFind(\n  Parse *pParse,\n  struct RenameCtx *pCtx,\n  const void *pPtr\n){\n  RenameToken **pp;\n  if( NEVER(pPtr==0) ){\n    return 0;\n  }\n  for(pp=&pParse->pRename; (*pp); pp=&(*pp)->pNext){\n    if( (*pp)->p==pPtr ){\n      RenameToken *pToken = *pp;\n      if( pCtx ){\n        *pp = pToken->pNext;\n        pToken->pNext = pCtx->pList;\n        pCtx->pList = pToken;\n        pCtx->nList++;\n      }\n      return pToken;\n    }\n  }\n  return 0;\n}\n\n/*\n** This is a Walker select callback. It does nothing. It is only required\n** because without a dummy callback, sqlite3WalkExpr() and similar do not\n** descend into sub-select statements.\n*/\nstatic int renameColumnSelectCb(Walker *pWalker, Select *p){\n  if( p->selFlags & (SF_View|SF_CopyCte) ){\n    testcase( p->selFlags & SF_View );\n    testcase( p->selFlags & SF_CopyCte );\n    return WRC_Prune;\n  }\n  renameWalkWith(pWalker, p);\n  return WRC_Continue;\n}\n\n/*\n** This is a Walker expression callback.\n**\n** For every TK_COLUMN node in the expression tree, search to see\n** if the column being references is the column being renamed by an\n** ALTER TABLE statement.  If it is, then attach its associated\n** RenameToken object to the list of RenameToken objects being\n** constructed in RenameCtx object at pWalker->u.pRename.\n*/\nstatic int renameColumnExprCb(Walker *pWalker, Expr *pExpr){\n  RenameCtx *p = pWalker->u.pRename;\n  if( pExpr->op==TK_TRIGGER\n   && pExpr->iColumn==p->iCol\n   && pWalker->pParse->pTriggerTab==p->pTab\n  ){\n    renameTokenFind(pWalker->pParse, p, (void*)pExpr);\n  }else if( pExpr->op==TK_COLUMN\n   && pExpr->iColumn==p->iCol\n   && ALWAYS(ExprUseYTab(pExpr))\n   && p->pTab==pExpr->y.pTab\n  ){\n    renameTokenFind(pWalker->pParse, p, (void*)pExpr);\n  }\n  return WRC_Continue;\n}\n\n/*\n** The RenameCtx contains a list of tokens that reference a column that\n** is being renamed by an ALTER TABLE statement.  Return the \"last\"\n** RenameToken in the RenameCtx and remove that RenameToken from the\n** RenameContext.  \"Last\" means the last RenameToken encountered when\n** the input SQL is parsed from left to right.  Repeated calls to this routine\n** return all column name tokens in the order that they are encountered\n** in the SQL statement.\n*/\nstatic RenameToken *renameColumnTokenNext(RenameCtx *pCtx){\n  RenameToken *pBest = pCtx->pList;\n  RenameToken *pToken;\n  RenameToken **pp;\n\n  for(pToken=pBest->pNext; pToken; pToken=pToken->pNext){\n    if( pToken->t.z>pBest->t.z ) pBest = pToken;\n  }\n  for(pp=&pCtx->pList; *pp!=pBest; pp=&(*pp)->pNext);\n  *pp = pBest->pNext;\n\n  return pBest;\n}\n\n/*\n** An error occurred while parsing or otherwise processing a database\n** object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an\n** ALTER TABLE RENAME COLUMN program. The error message emitted by the\n** sub-routine is currently stored in pParse->zErrMsg. This function\n** adds context to the error message and then stores it in pCtx.\n*/\nstatic void renameColumnParseError(\n  sqlite3_context *pCtx,\n  const char *zWhen,\n  sqlite3_value *pType,\n  sqlite3_value *pObject,\n  Parse *pParse\n){\n  const char *zT = (const char*)sqlite3_value_text(pType);\n  const char *zN = (const char*)sqlite3_value_text(pObject);\n  char *zErr;\n\n  zErr = sqlite3MPrintf(pParse->db, \"error in %s %s%s%s: %s\",\n      zT, zN, (zWhen[0] ? \" \" : \"\"), zWhen,\n      pParse->zErrMsg\n  );\n  sqlite3_result_error(pCtx, zErr, -1);\n  sqlite3DbFree(pParse->db, zErr);\n}\n\n/*\n** For each name in the the expression-list pEList (i.e. each\n** pEList->a[i].zName) that matches the string in zOld, extract the\n** corresponding rename-token from Parse object pParse and add it\n** to the RenameCtx pCtx.\n*/\nstatic void renameColumnElistNames(\n  Parse *pParse,\n  RenameCtx *pCtx,\n  const ExprList *pEList,\n  const char *zOld\n){\n  if( pEList ){\n    int i;\n    for(i=0; i<pEList->nExpr; i++){\n      const char *zName = pEList->a[i].zEName;\n      if( ALWAYS(pEList->a[i].fg.eEName==ENAME_NAME)\n       && ALWAYS(zName!=0)\n       && 0==sqlite3_stricmp(zName, zOld)\n      ){\n        renameTokenFind(pParse, pCtx, (const void*)zName);\n      }\n    }\n  }\n}\n\n/*\n** For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName)\n** that matches the string in zOld, extract the corresponding rename-token\n** from Parse object pParse and add it to the RenameCtx pCtx.\n*/\nstatic void renameColumnIdlistNames(\n  Parse *pParse,\n  RenameCtx *pCtx,\n  const IdList *pIdList,\n  const char *zOld\n){\n  if( pIdList ){\n    int i;\n    for(i=0; i<pIdList->nId; i++){\n      const char *zName = pIdList->a[i].zName;\n      if( 0==sqlite3_stricmp(zName, zOld) ){\n        renameTokenFind(pParse, pCtx, (const void*)zName);\n      }\n    }\n  }\n}\n\n\n/*\n** Parse the SQL statement zSql using Parse object (*p). The Parse object\n** is initialized by this function before it is used.\n*/\nstatic int renameParseSql(\n  Parse *p,                       /* Memory to use for Parse object */\n  const char *zDb,                /* Name of schema SQL belongs to */\n  sqlite3 *db,                    /* Database handle */\n  const char *zSql,               /* SQL to parse */\n  int bTemp                       /* True if SQL is from temp schema */\n){\n  int rc;\n  u64 flags;\n\n  sqlite3ParseObjectInit(p, db);\n  if( zSql==0 ){\n    return SQLITE_NOMEM;\n  }\n  if( sqlite3StrNICmp(zSql,\"CREATE \",7)!=0 ){\n    return SQLITE_CORRUPT_BKPT;\n  }\n  if( bTemp ){\n    db->init.iDb = 1;\n  }else{\n    int iDb = sqlite3FindDbName(db, zDb);\n    assert( iDb>=0 && iDb<=0xff );\n    db->init.iDb = (u8)iDb;\n  }\n  p->eParseMode = PARSE_MODE_RENAME;\n  p->db = db;\n  p->nQueryLoop = 1;\n  flags = db->flags;\n  testcase( (db->flags & SQLITE_Comments)==0 && strstr(zSql,\" /* \")!=0 );\n  db->flags |= SQLITE_Comments;\n  rc = sqlite3RunParser(p, zSql);\n  db->flags = flags;\n  if( db->mallocFailed ) rc = SQLITE_NOMEM;\n  if( rc==SQLITE_OK\n   && NEVER(p->pNewTable==0 && p->pNewIndex==0 && p->pNewTrigger==0)\n  ){\n    rc = SQLITE_CORRUPT_BKPT;\n  }\n\n#ifdef SQLITE_DEBUG\n  /* Ensure that all mappings in the Parse.pRename list really do map to\n  ** a part of the input string.  */\n  if( rc==SQLITE_OK ){\n    int nSql = sqlite3Strlen30(zSql);\n    RenameToken *pToken;\n    for(pToken=p->pRename; pToken; pToken=pToken->pNext){\n      assert( pToken->t.z>=zSql && &pToken->t.z[pToken->t.n]<=&zSql[nSql] );\n    }\n  }\n#endif\n\n  db->init.iDb = 0;\n  return rc;\n}\n\n/*\n** This function edits SQL statement zSql, replacing each token identified\n** by the linked list pRename with the text of zNew. If argument bQuote is\n** true, then zNew is always quoted first. If no error occurs, the result\n** is loaded into context object pCtx as the result.\n**\n** Or, if an error occurs (i.e. an OOM condition), an error is left in\n** pCtx and an SQLite error code returned.\n*/\nstatic int renameEditSql(\n  sqlite3_context *pCtx,          /* Return result here */\n  RenameCtx *pRename,             /* Rename context */\n  const char *zSql,               /* SQL statement to edit */\n  const char *zNew,               /* New token text */\n  int bQuote                      /* True to always quote token */\n){\n  i64 nNew = sqlite3Strlen30(zNew);\n  i64 nSql = sqlite3Strlen30(zSql);\n  sqlite3 *db = sqlite3_context_db_handle(pCtx);\n  int rc = SQLITE_OK;\n  char *zQuot = 0;\n  char *zOut;\n  i64 nQuot = 0;\n  char *zBuf1 = 0;\n  char *zBuf2 = 0;\n\n  if( zNew ){\n    /* Set zQuot to point to a buffer containing a quoted copy of the\n    ** identifier zNew. If the corresponding identifier in the original\n    ** ALTER TABLE statement was quoted (bQuote==1), then set zNew to\n    ** point to zQuot so that all substitutions are made using the\n    ** quoted version of the new column name.  */\n    zQuot = sqlite3MPrintf(db, \"\\\"%w\\\" \", zNew);\n    if( zQuot==0 ){\n      return SQLITE_NOMEM;\n    }else{\n      nQuot = sqlite3Strlen30(zQuot)-1;\n    }\n\n    assert( nQuot>=nNew && nSql>=0 && nNew>=0 );\n    zOut = sqlite3DbMallocZero(db, (u64)nSql + pRename->nList*(u64)nQuot + 1);\n  }else{\n    assert( nSql>0 );\n    zOut = (char*)sqlite3DbMallocZero(db, (2*(u64)nSql + 1) * 3);\n    if( zOut ){\n      zBuf1 = &zOut[nSql*2+1];\n      zBuf2 = &zOut[nSql*4+2];\n    }\n  }\n\n  /* At this point pRename->pList contains a list of RenameToken objects\n  ** corresponding to all tokens in the input SQL that must be replaced\n  ** with the new column name, or with single-quoted versions of themselves.\n  ** All that remains is to construct and return the edited SQL string. */\n  if( zOut ){\n    i64 nOut = nSql;\n    assert( nSql>0 );\n    memcpy(zOut, zSql, (size_t)nSql);\n    while( pRename->pList ){\n      int iOff;                   /* Offset of token to replace in zOut */\n      i64 nReplace;\n      const char *zReplace;\n      RenameToken *pBest = renameColumnTokenNext(pRename);\n\n      if( zNew ){\n        if( bQuote==0 && sqlite3IsIdChar(*(u8*)pBest->t.z) ){\n          nReplace = nNew;\n          zReplace = zNew;\n        }else{\n          nReplace = nQuot;\n          zReplace = zQuot;\n          if( pBest->t.z[pBest->t.n]=='\"' ) nReplace++;\n        }\n      }else{\n        /* Dequote the double-quoted token. Then requote it again, this time\n        ** using single quotes. If the character immediately following the\n        ** original token within the input SQL was a single quote ('), then\n        ** add another space after the new, single-quoted version of the\n        ** token. This is so that (SELECT \"string\"'alias') maps to\n        ** (SELECT 'string' 'alias'), and not (SELECT 'string''alias').  */\n        memcpy(zBuf1, pBest->t.z, pBest->t.n);\n        zBuf1[pBest->t.n] = 0;\n        sqlite3Dequote(zBuf1);\n        assert( nSql < 0x15555554 /* otherwise malloc would have failed */ );\n        sqlite3_snprintf((int)(nSql*2), zBuf2, \"%Q%s\", zBuf1,\n            pBest->t.z[pBest->t.n]=='\\'' ? \" \" : \"\"\n        );\n        zReplace = zBuf2;\n        nReplace = sqlite3Strlen30(zReplace);\n      }\n\n      iOff = (int)(pBest->t.z - zSql);\n      if( pBest->t.n!=nReplace ){\n        memmove(&zOut[iOff + nReplace], &zOut[iOff + pBest->t.n],\n            nOut - (iOff + pBest->t.n)\n        );\n        nOut += nReplace - pBest->t.n;\n        zOut[nOut] = '\\0';\n      }\n      memcpy(&zOut[iOff], zReplace, nReplace);\n      sqlite3DbFree(db, pBest);\n    }\n\n    sqlite3_result_text(pCtx, zOut, -1, SQLITE_TRANSIENT);\n    sqlite3DbFree(db, zOut);\n  }else{\n    rc = SQLITE_NOMEM;\n  }\n\n  sqlite3_free(zQuot);\n  return rc;\n}\n\n/*\n** Set all pEList->a[].fg.eEName fields in the expression-list to val.\n*/\nstatic void renameSetENames(ExprList *pEList, int val){\n  assert( val==ENAME_NAME || val==ENAME_TAB || val==ENAME_SPAN );\n  if( pEList ){\n    int i;\n    for(i=0; i<pEList->nExpr; i++){\n      assert( val==ENAME_NAME || pEList->a[i].fg.eEName==ENAME_NAME );\n      pEList->a[i].fg.eEName = val&0x3;\n    }\n  }\n}\n\n/*\n** Resolve all symbols in the trigger at pParse->pNewTrigger, assuming\n** it was read from the schema of database zDb. Return SQLITE_OK if\n** successful. Otherwise, return an SQLite error code and leave an error\n** message in the Parse object.\n*/\nstatic int renameResolveTrigger(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  Trigger *pNew = pParse->pNewTrigger;\n  TriggerStep *pStep;\n  NameContext sNC;\n  int rc = SQLITE_OK;\n\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pParse = pParse;\n  assert( pNew->pTabSchema );\n  pParse->pTriggerTab = sqlite3FindTable(db, pNew->table,\n      db->aDb[sqlite3SchemaToIndex(db, pNew->pTabSchema)].zDbSName\n  );\n  pParse->eTriggerOp = pNew->op;\n  /* ALWAYS() because if the table of the trigger does not exist, the\n  ** error would have been hit before this point */\n  if( ALWAYS(pParse->pTriggerTab) ){\n    rc = sqlite3ViewGetColumnNames(pParse, pParse->pTriggerTab)!=0;\n  }\n\n  /* Resolve symbols in WHEN clause */\n  if( rc==SQLITE_OK && pNew->pWhen ){\n    rc = sqlite3ResolveExprNames(&sNC, pNew->pWhen);\n  }\n\n  for(pStep=pNew->step_list; rc==SQLITE_OK && pStep; pStep=pStep->pNext){\n    if( pStep->pSelect ){\n      sqlite3SelectPrep(pParse, pStep->pSelect, &sNC);\n      if( pParse->nErr ) rc = pParse->rc;\n    }\n    if( rc==SQLITE_OK && pStep->zTarget ){\n      SrcList *pSrc = sqlite3TriggerStepSrc(pParse, pStep);\n      if( pSrc ){\n        Select *pSel = sqlite3SelectNew(\n            pParse, pStep->pExprList, pSrc, 0, 0, 0, 0, 0, 0\n        );\n        if( pSel==0 ){\n          pStep->pExprList = 0;\n          pSrc = 0;\n          rc = SQLITE_NOMEM;\n        }else{\n          /* pStep->pExprList contains an expression-list used for an UPDATE\n          ** statement. So the a[].zEName values are the RHS of the\n          ** \"<col> = <expr>\" clauses of the UPDATE statement. So, before\n          ** running SelectPrep(), change all the eEName values in\n          ** pStep->pExprList to ENAME_SPAN (from their current value of\n          ** ENAME_NAME). This is to prevent any ids in ON() clauses that are\n          ** part of pSrc from being incorrectly resolved against the\n          ** a[].zEName values as if they were column aliases.  */\n          renameSetENames(pStep->pExprList, ENAME_SPAN);\n          sqlite3SelectPrep(pParse, pSel, 0);\n          renameSetENames(pStep->pExprList, ENAME_NAME);\n          rc = pParse->nErr ? SQLITE_ERROR : SQLITE_OK;\n          assert( pStep->pExprList==0 || pStep->pExprList==pSel->pEList );\n          assert( pSrc==pSel->pSrc );\n          if( pStep->pExprList ) pSel->pEList = 0;\n          pSel->pSrc = 0;\n          sqlite3SelectDelete(db, pSel);\n        }\n        if( pStep->pFrom ){\n          int i;\n          for(i=0; i<pStep->pFrom->nSrc && rc==SQLITE_OK; i++){\n            SrcItem *p = &pStep->pFrom->a[i];\n            if( p->fg.isSubquery ){\n              assert( p->u4.pSubq!=0 );\n              sqlite3SelectPrep(pParse, p->u4.pSubq->pSelect, 0);\n            }\n          }\n        }\n\n        if(  db->mallocFailed ){\n          rc = SQLITE_NOMEM;\n        }\n        sNC.pSrcList = pSrc;\n        if( rc==SQLITE_OK && pStep->pWhere ){\n          rc = sqlite3ResolveExprNames(&sNC, pStep->pWhere);\n        }\n        if( rc==SQLITE_OK ){\n          rc = sqlite3ResolveExprListNames(&sNC, pStep->pExprList);\n        }\n        assert( !pStep->pUpsert || (!pStep->pWhere && !pStep->pExprList) );\n        if( pStep->pUpsert && rc==SQLITE_OK ){\n          Upsert *pUpsert = pStep->pUpsert;\n          pUpsert->pUpsertSrc = pSrc;\n          sNC.uNC.pUpsert = pUpsert;\n          sNC.ncFlags = NC_UUpsert;\n          rc = sqlite3ResolveExprListNames(&sNC, pUpsert->pUpsertTarget);\n          if( rc==SQLITE_OK ){\n            ExprList *pUpsertSet = pUpsert->pUpsertSet;\n            rc = sqlite3ResolveExprListNames(&sNC, pUpsertSet);\n          }\n          if( rc==SQLITE_OK ){\n            rc = sqlite3ResolveExprNames(&sNC, pUpsert->pUpsertWhere);\n          }\n          if( rc==SQLITE_OK ){\n            rc = sqlite3ResolveExprNames(&sNC, pUpsert->pUpsertTargetWhere);\n          }\n          sNC.ncFlags = 0;\n        }\n        sNC.pSrcList = 0;\n        sqlite3SrcListDelete(db, pSrc);\n      }else{\n        rc = SQLITE_NOMEM;\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr\n** objects that are part of the trigger passed as the second argument.\n*/\nstatic void renameWalkTrigger(Walker *pWalker, Trigger *pTrigger){\n  TriggerStep *pStep;\n\n  /* Find tokens to edit in WHEN clause */\n  sqlite3WalkExpr(pWalker, pTrigger->pWhen);\n\n  /* Find tokens to edit in trigger steps */\n  for(pStep=pTrigger->step_list; pStep; pStep=pStep->pNext){\n    sqlite3WalkSelect(pWalker, pStep->pSelect);\n    sqlite3WalkExpr(pWalker, pStep->pWhere);\n    sqlite3WalkExprList(pWalker, pStep->pExprList);\n    if( pStep->pUpsert ){\n      Upsert *pUpsert = pStep->pUpsert;\n      sqlite3WalkExprList(pWalker, pUpsert->pUpsertTarget);\n      sqlite3WalkExprList(pWalker, pUpsert->pUpsertSet);\n      sqlite3WalkExpr(pWalker, pUpsert->pUpsertWhere);\n      sqlite3WalkExpr(pWalker, pUpsert->pUpsertTargetWhere);\n    }\n    if( pStep->pFrom ){\n      int i;\n      SrcList *pFrom = pStep->pFrom;\n      for(i=0; i<pFrom->nSrc; i++){\n        if( pFrom->a[i].fg.isSubquery ){\n          assert( pFrom->a[i].u4.pSubq!=0 );\n          sqlite3WalkSelect(pWalker, pFrom->a[i].u4.pSubq->pSelect);\n        }\n      }\n    }\n  }\n}\n\n/*\n** Free the contents of Parse object (*pParse). Do not free the memory\n** occupied by the Parse object itself.\n*/\nstatic void renameParseCleanup(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  Index *pIdx;\n  if( pParse->pVdbe ){\n    sqlite3VdbeFinalize(pParse->pVdbe);\n  }\n  sqlite3DeleteTable(db, pParse->pNewTable);\n  while( (pIdx = pParse->pNewIndex)!=0 ){\n    pParse->pNewIndex = pIdx->pNext;\n    sqlite3FreeIndex(db, pIdx);\n  }\n  sqlite3DeleteTrigger(db, pParse->pNewTrigger);\n  sqlite3DbFree(db, pParse->zErrMsg);\n  renameTokenFree(db, pParse->pRename);\n  sqlite3ParseObjectReset(pParse);\n}\n\n/*\n** SQL function:\n**\n**     sqlite_rename_column(SQL,TYPE,OBJ,DB,TABLE,COL,NEWNAME,QUOTE,TEMP)\n**\n**   0. zSql:     SQL statement to rewrite\n**   1. type:     Type of object (\"table\", \"view\" etc.)\n**   2. object:   Name of object\n**   3. Database: Database name (e.g. \"main\")\n**   4. Table:    Table name\n**   5. iCol:     Index of column to rename\n**   6. zNew:     New column name\n**   7. bQuote:   Non-zero if the new column name should be quoted.\n**   8. bTemp:    True if zSql comes from temp schema\n**\n** Do a column rename operation on the CREATE statement given in zSql.\n** The iCol-th column (left-most is 0) of table zTable is renamed from zCol\n** into zNew.  The name should be quoted if bQuote is true.\n**\n** This function is used internally by the ALTER TABLE RENAME COLUMN command.\n** It is only accessible to SQL created using sqlite3NestedParse().  It is\n** not reachable from ordinary SQL passed into sqlite3_prepare() unless the\n** SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled.\n*/\nstatic void renameColumnFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  RenameCtx sCtx;\n  const char *zSql = (const char*)sqlite3_value_text(argv[0]);\n  const char *zDb = (const char*)sqlite3_value_text(argv[3]);\n  const char *zTable = (const char*)sqlite3_value_text(argv[4]);\n  int iCol = sqlite3_value_int(argv[5]);\n  const char *zNew = (const char*)sqlite3_value_text(argv[6]);\n  int bQuote = sqlite3_value_int(argv[7]);\n  int bTemp = sqlite3_value_int(argv[8]);\n  const char *zOld;\n  int rc;\n  Parse sParse;\n  Walker sWalker;\n  Index *pIdx;\n  int i;\n  Table *pTab;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth = db->xAuth;\n#endif\n\n  UNUSED_PARAMETER(NotUsed);\n  if( zSql==0 ) return;\n  if( zTable==0 ) return;\n  if( zNew==0 ) return;\n  if( iCol<0 ) return;\n  sqlite3BtreeEnterAll(db);\n  pTab = sqlite3FindTable(db, zTable, zDb);\n  if( pTab==0 || iCol>=pTab->nCol ){\n    sqlite3BtreeLeaveAll(db);\n    return;\n  }\n  zOld = pTab->aCol[iCol].zCnName;\n  memset(&sCtx, 0, sizeof(sCtx));\n  sCtx.iCol = ((iCol==pTab->iPKey) ? -1 : iCol);\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = 0;\n#endif\n  rc = renameParseSql(&sParse, zDb, db, zSql, bTemp);\n\n  /* Find tokens that need to be replaced. */\n  memset(&sWalker, 0, sizeof(Walker));\n  sWalker.pParse = &sParse;\n  sWalker.xExprCallback = renameColumnExprCb;\n  sWalker.xSelectCallback = renameColumnSelectCb;\n  sWalker.u.pRename = &sCtx;\n\n  sCtx.pTab = pTab;\n  if( rc!=SQLITE_OK ) goto renameColumnFunc_done;\n  if( sParse.pNewTable ){\n    if( IsView(sParse.pNewTable) ){\n      Select *pSelect = sParse.pNewTable->u.view.pSelect;\n      pSelect->selFlags &= ~(u32)SF_View;\n      sParse.rc = SQLITE_OK;\n      sqlite3SelectPrep(&sParse, pSelect, 0);\n      rc = (db->mallocFailed ? SQLITE_NOMEM : sParse.rc);\n      if( rc==SQLITE_OK ){\n        sqlite3WalkSelect(&sWalker, pSelect);\n      }\n      if( rc!=SQLITE_OK ) goto renameColumnFunc_done;\n    }else if( IsOrdinaryTable(sParse.pNewTable) ){\n      /* A regular table */\n      int bFKOnly = sqlite3_stricmp(zTable, sParse.pNewTable->zName);\n      FKey *pFKey;\n      sCtx.pTab = sParse.pNewTable;\n      if( bFKOnly==0 ){\n        if( iCol<sParse.pNewTable->nCol ){\n          renameTokenFind(\n              &sParse, &sCtx, (void*)sParse.pNewTable->aCol[iCol].zCnName\n          );\n        }\n        if( sCtx.iCol<0 ){\n          renameTokenFind(&sParse, &sCtx, (void*)&sParse.pNewTable->iPKey);\n        }\n        sqlite3WalkExprList(&sWalker, sParse.pNewTable->pCheck);\n        for(pIdx=sParse.pNewTable->pIndex; pIdx; pIdx=pIdx->pNext){\n          sqlite3WalkExprList(&sWalker, pIdx->aColExpr);\n        }\n        for(pIdx=sParse.pNewIndex; pIdx; pIdx=pIdx->pNext){\n          sqlite3WalkExprList(&sWalker, pIdx->aColExpr);\n        }\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n        for(i=0; i<sParse.pNewTable->nCol; i++){\n          Expr *pExpr = sqlite3ColumnExpr(sParse.pNewTable,\n                                                  &sParse.pNewTable->aCol[i]);\n          sqlite3WalkExpr(&sWalker, pExpr);\n        }\n#endif\n      }\n\n      assert( IsOrdinaryTable(sParse.pNewTable) );\n      for(pFKey=sParse.pNewTable->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){\n        for(i=0; i<pFKey->nCol; i++){\n          if( bFKOnly==0 && pFKey->aCol[i].iFrom==iCol ){\n            renameTokenFind(&sParse, &sCtx, (void*)&pFKey->aCol[i]);\n          }\n          if( 0==sqlite3_stricmp(pFKey->zTo, zTable)\n           && 0==sqlite3_stricmp(pFKey->aCol[i].zCol, zOld)\n          ){\n            renameTokenFind(&sParse, &sCtx, (void*)pFKey->aCol[i].zCol);\n          }\n        }\n      }\n    }\n  }else if( sParse.pNewIndex ){\n    sqlite3WalkExprList(&sWalker, sParse.pNewIndex->aColExpr);\n    sqlite3WalkExpr(&sWalker, sParse.pNewIndex->pPartIdxWhere);\n  }else{\n    /* A trigger */\n    TriggerStep *pStep;\n    rc = renameResolveTrigger(&sParse);\n    if( rc!=SQLITE_OK ) goto renameColumnFunc_done;\n\n    for(pStep=sParse.pNewTrigger->step_list; pStep; pStep=pStep->pNext){\n      if( pStep->zTarget ){\n        Table *pTarget = sqlite3LocateTable(&sParse, 0, pStep->zTarget, zDb);\n        if( pTarget==pTab ){\n          if( pStep->pUpsert ){\n            ExprList *pUpsertSet = pStep->pUpsert->pUpsertSet;\n            renameColumnElistNames(&sParse, &sCtx, pUpsertSet, zOld);\n          }\n          renameColumnIdlistNames(&sParse, &sCtx, pStep->pIdList, zOld);\n          renameColumnElistNames(&sParse, &sCtx, pStep->pExprList, zOld);\n        }\n      }\n    }\n\n\n    /* Find tokens to edit in UPDATE OF clause */\n    if( sParse.pTriggerTab==pTab ){\n      renameColumnIdlistNames(&sParse, &sCtx,sParse.pNewTrigger->pColumns,zOld);\n    }\n\n    /* Find tokens to edit in various expressions and selects */\n    renameWalkTrigger(&sWalker, sParse.pNewTrigger);\n  }\n\n  assert( rc==SQLITE_OK );\n  rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote);\n\nrenameColumnFunc_done:\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_ERROR && sqlite3WritableSchema(db) ){\n      sqlite3_result_value(context, argv[0]);\n    }else if( sParse.zErrMsg ){\n      renameColumnParseError(context, \"\", argv[1], argv[2], &sParse);\n    }else{\n      sqlite3_result_error_code(context, rc);\n    }\n  }\n\n  renameParseCleanup(&sParse);\n  renameTokenFree(db, sCtx.pList);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = xAuth;\n#endif\n  sqlite3BtreeLeaveAll(db);\n}\n\n/*\n** Walker expression callback used by \"RENAME TABLE\".\n*/\nstatic int renameTableExprCb(Walker *pWalker, Expr *pExpr){\n  RenameCtx *p = pWalker->u.pRename;\n  if( pExpr->op==TK_COLUMN\n   && ALWAYS(ExprUseYTab(pExpr))\n   && p->pTab==pExpr->y.pTab\n  ){\n    renameTokenFind(pWalker->pParse, p, (void*)&pExpr->y.pTab);\n  }\n  return WRC_Continue;\n}\n\n/*\n** Walker select callback used by \"RENAME TABLE\".\n*/\nstatic int renameTableSelectCb(Walker *pWalker, Select *pSelect){\n  int i;\n  RenameCtx *p = pWalker->u.pRename;\n  SrcList *pSrc = pSelect->pSrc;\n  if( pSelect->selFlags & (SF_View|SF_CopyCte) ){\n    testcase( pSelect->selFlags & SF_View );\n    testcase( pSelect->selFlags & SF_CopyCte );\n    return WRC_Prune;\n  }\n  if( NEVER(pSrc==0) ){\n    assert( pWalker->pParse->db->mallocFailed );\n    return WRC_Abort;\n  }\n  for(i=0; i<pSrc->nSrc; i++){\n    SrcItem *pItem = &pSrc->a[i];\n    if( pItem->pSTab==p->pTab ){\n      renameTokenFind(pWalker->pParse, p, pItem->zName);\n    }\n  }\n  renameWalkWith(pWalker, pSelect);\n\n  return WRC_Continue;\n}\n\n\n/*\n** This C function implements an SQL user function that is used by SQL code\n** generated by the ALTER TABLE ... RENAME command to modify the definition\n** of any foreign key constraints that use the table being renamed as the\n** parent table. It is passed three arguments:\n**\n**   0: The database containing the table being renamed.\n**   1. type:     Type of object (\"table\", \"view\" etc.)\n**   2. object:   Name of object\n**   3: The complete text of the schema statement being modified,\n**   4: The old name of the table being renamed, and\n**   5: The new name of the table being renamed.\n**   6: True if the schema statement comes from the temp db.\n**\n** It returns the new schema statement. For example:\n**\n** sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0)\n**       -> 'CREATE TABLE t1(a REFERENCES t3)'\n*/\nstatic void renameTableFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  const char *zDb = (const char*)sqlite3_value_text(argv[0]);\n  const char *zInput = (const char*)sqlite3_value_text(argv[3]);\n  const char *zOld = (const char*)sqlite3_value_text(argv[4]);\n  const char *zNew = (const char*)sqlite3_value_text(argv[5]);\n  int bTemp = sqlite3_value_int(argv[6]);\n  UNUSED_PARAMETER(NotUsed);\n\n  if( zInput && zOld && zNew ){\n    Parse sParse;\n    int rc;\n    int bQuote = 1;\n    RenameCtx sCtx;\n    Walker sWalker;\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    sqlite3_xauth xAuth = db->xAuth;\n    db->xAuth = 0;\n#endif\n\n    sqlite3BtreeEnterAll(db);\n\n    memset(&sCtx, 0, sizeof(RenameCtx));\n    sCtx.pTab = sqlite3FindTable(db, zOld, zDb);\n    memset(&sWalker, 0, sizeof(Walker));\n    sWalker.pParse = &sParse;\n    sWalker.xExprCallback = renameTableExprCb;\n    sWalker.xSelectCallback = renameTableSelectCb;\n    sWalker.u.pRename = &sCtx;\n\n    rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);\n\n    if( rc==SQLITE_OK ){\n      int isLegacy = (db->flags & SQLITE_LegacyAlter);\n      if( sParse.pNewTable ){\n        Table *pTab = sParse.pNewTable;\n\n        if( IsView(pTab) ){\n          if( isLegacy==0 ){\n            Select *pSelect = pTab->u.view.pSelect;\n            NameContext sNC;\n            memset(&sNC, 0, sizeof(sNC));\n            sNC.pParse = &sParse;\n\n            assert( pSelect->selFlags & SF_View );\n            pSelect->selFlags &= ~(u32)SF_View;\n            sqlite3SelectPrep(&sParse, pTab->u.view.pSelect, &sNC);\n            if( sParse.nErr ){\n              rc = sParse.rc;\n            }else{\n              sqlite3WalkSelect(&sWalker, pTab->u.view.pSelect);\n            }\n          }\n        }else{\n          /* Modify any FK definitions to point to the new table. */\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n          if( (isLegacy==0 || (db->flags & SQLITE_ForeignKeys))\n           && !IsVirtual(pTab)\n          ){\n            FKey *pFKey;\n            assert( IsOrdinaryTable(pTab) );\n            for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){\n              if( sqlite3_stricmp(pFKey->zTo, zOld)==0 ){\n                renameTokenFind(&sParse, &sCtx, (void*)pFKey->zTo);\n              }\n            }\n          }\n#endif\n\n          /* If this is the table being altered, fix any table refs in CHECK\n          ** expressions. Also update the name that appears right after the\n          ** \"CREATE [VIRTUAL] TABLE\" bit. */\n          if( sqlite3_stricmp(zOld, pTab->zName)==0 ){\n            sCtx.pTab = pTab;\n            if( isLegacy==0 ){\n              sqlite3WalkExprList(&sWalker, pTab->pCheck);\n            }\n            renameTokenFind(&sParse, &sCtx, pTab->zName);\n          }\n        }\n      }\n\n      else if( sParse.pNewIndex ){\n        renameTokenFind(&sParse, &sCtx, sParse.pNewIndex->zName);\n        if( isLegacy==0 ){\n          sqlite3WalkExpr(&sWalker, sParse.pNewIndex->pPartIdxWhere);\n        }\n      }\n\n#ifndef SQLITE_OMIT_TRIGGER\n      else{\n        Trigger *pTrigger = sParse.pNewTrigger;\n        TriggerStep *pStep;\n        if( 0==sqlite3_stricmp(sParse.pNewTrigger->table, zOld)\n            && sCtx.pTab->pSchema==pTrigger->pTabSchema\n          ){\n          renameTokenFind(&sParse, &sCtx, sParse.pNewTrigger->table);\n        }\n\n        if( isLegacy==0 ){\n          rc = renameResolveTrigger(&sParse);\n          if( rc==SQLITE_OK ){\n            renameWalkTrigger(&sWalker, pTrigger);\n            for(pStep=pTrigger->step_list; pStep; pStep=pStep->pNext){\n              if( pStep->zTarget && 0==sqlite3_stricmp(pStep->zTarget, zOld) ){\n                renameTokenFind(&sParse, &sCtx, pStep->zTarget);\n              }\n              if( pStep->pFrom ){\n                int i;\n                for(i=0; i<pStep->pFrom->nSrc; i++){\n                  SrcItem *pItem = &pStep->pFrom->a[i];\n                  if( 0==sqlite3_stricmp(pItem->zName, zOld) ){\n                    renameTokenFind(&sParse, &sCtx, pItem->zName);\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n#endif\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote);\n    }\n    if( rc!=SQLITE_OK ){\n      if( rc==SQLITE_ERROR && sqlite3WritableSchema(db) ){\n        sqlite3_result_value(context, argv[3]);\n      }else if( sParse.zErrMsg ){\n        renameColumnParseError(context, \"\", argv[1], argv[2], &sParse);\n      }else{\n        sqlite3_result_error_code(context, rc);\n      }\n    }\n\n    renameParseCleanup(&sParse);\n    renameTokenFree(db, sCtx.pList);\n    sqlite3BtreeLeaveAll(db);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    db->xAuth = xAuth;\n#endif\n  }\n\n  return;\n}\n\nstatic int renameQuotefixExprCb(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_STRING && (pExpr->flags & EP_DblQuoted) ){\n    renameTokenFind(pWalker->pParse, pWalker->u.pRename, (const void*)pExpr);\n  }\n  return WRC_Continue;\n}\n\n/* SQL function: sqlite_rename_quotefix(DB,SQL)\n**\n** Rewrite the DDL statement \"SQL\" so that any string literals that use\n** double-quotes use single quotes instead.\n**\n** Two arguments must be passed:\n**\n**   0: Database name (\"main\", \"temp\" etc.).\n**   1: SQL statement to edit.\n**\n** The returned value is the modified SQL statement. For example, given\n** the database schema:\n**\n**   CREATE TABLE t1(a, b, c);\n**\n**   SELECT sqlite_rename_quotefix('main',\n**       'CREATE VIEW v1 AS SELECT \"a\", \"string\" FROM t1'\n**   );\n**\n** returns the string:\n**\n**   CREATE VIEW v1 AS SELECT \"a\", 'string' FROM t1\n**\n** If there is a error in the input SQL, then raise an error, except\n** if PRAGMA writable_schema=ON, then just return the input string\n** unmodified following an error.\n*/\nstatic void renameQuotefixFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  char const *zDb = (const char*)sqlite3_value_text(argv[0]);\n  char const *zInput = (const char*)sqlite3_value_text(argv[1]);\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth = db->xAuth;\n  db->xAuth = 0;\n#endif\n\n  sqlite3BtreeEnterAll(db);\n\n  UNUSED_PARAMETER(NotUsed);\n  if( zDb && zInput ){\n    int rc;\n    Parse sParse;\n    rc = renameParseSql(&sParse, zDb, db, zInput, 0);\n\n    if( rc==SQLITE_OK ){\n      RenameCtx sCtx;\n      Walker sWalker;\n\n      /* Walker to find tokens that need to be replaced. */\n      memset(&sCtx, 0, sizeof(RenameCtx));\n      memset(&sWalker, 0, sizeof(Walker));\n      sWalker.pParse = &sParse;\n      sWalker.xExprCallback = renameQuotefixExprCb;\n      sWalker.xSelectCallback = renameColumnSelectCb;\n      sWalker.u.pRename = &sCtx;\n\n      if( sParse.pNewTable ){\n        if( IsView(sParse.pNewTable) ){\n          Select *pSelect = sParse.pNewTable->u.view.pSelect;\n          pSelect->selFlags &= ~(u32)SF_View;\n          sParse.rc = SQLITE_OK;\n          sqlite3SelectPrep(&sParse, pSelect, 0);\n          rc = (db->mallocFailed ? SQLITE_NOMEM : sParse.rc);\n          if( rc==SQLITE_OK ){\n            sqlite3WalkSelect(&sWalker, pSelect);\n          }\n        }else{\n          int i;\n          sqlite3WalkExprList(&sWalker, sParse.pNewTable->pCheck);\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n          for(i=0; i<sParse.pNewTable->nCol; i++){\n            sqlite3WalkExpr(&sWalker,\n               sqlite3ColumnExpr(sParse.pNewTable,\n                                         &sParse.pNewTable->aCol[i]));\n          }\n#endif /* SQLITE_OMIT_GENERATED_COLUMNS */\n        }\n      }else if( sParse.pNewIndex ){\n        sqlite3WalkExprList(&sWalker, sParse.pNewIndex->aColExpr);\n        sqlite3WalkExpr(&sWalker, sParse.pNewIndex->pPartIdxWhere);\n      }else{\n#ifndef SQLITE_OMIT_TRIGGER\n        rc = renameResolveTrigger(&sParse);\n        if( rc==SQLITE_OK ){\n          renameWalkTrigger(&sWalker, sParse.pNewTrigger);\n        }\n#endif /* SQLITE_OMIT_TRIGGER */\n      }\n\n      if( rc==SQLITE_OK ){\n        rc = renameEditSql(context, &sCtx, zInput, 0, 0);\n      }\n      renameTokenFree(db, sCtx.pList);\n    }\n    if( rc!=SQLITE_OK ){\n      if( sqlite3WritableSchema(db) && rc==SQLITE_ERROR ){\n        sqlite3_result_value(context, argv[1]);\n      }else{\n        sqlite3_result_error_code(context, rc);\n      }\n    }\n    renameParseCleanup(&sParse);\n  }\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = xAuth;\n#endif\n\n  sqlite3BtreeLeaveAll(db);\n}\n\n/* Function:  sqlite_rename_test(DB,SQL,TYPE,NAME,ISTEMP,WHEN,DQS)\n**\n** An SQL user function that checks that there are no parse or symbol\n** resolution problems in a CREATE TRIGGER|TABLE|VIEW|INDEX statement.\n** After an ALTER TABLE .. RENAME operation is performed and the schema\n** reloaded, this function is called on each SQL statement in the schema\n** to ensure that it is still usable.\n**\n**   0: Database name (\"main\", \"temp\" etc.).\n**   1: SQL statement.\n**   2: Object type (\"view\", \"table\", \"trigger\" or \"index\").\n**   3: Object name.\n**   4: True if object is from temp schema.\n**   5: \"when\" part of error message.\n**   6: True to disable the DQS quirk when parsing SQL.\n**\n** The return value is computed as follows:\n**\n**   A. If an error is seen and not in PRAGMA writable_schema=ON mode,\n**      then raise the error.\n**   B. Else if a trigger is created and the the table that the trigger is\n**      attached to is in database zDb, then return 1.\n**   C. Otherwise return NULL.\n*/\nstatic void renameTableTest(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  char const *zDb = (const char*)sqlite3_value_text(argv[0]);\n  char const *zInput = (const char*)sqlite3_value_text(argv[1]);\n  int bTemp = sqlite3_value_int(argv[4]);\n  int isLegacy = (db->flags & SQLITE_LegacyAlter);\n  char const *zWhen = (const char*)sqlite3_value_text(argv[5]);\n  int bNoDQS = sqlite3_value_int(argv[6]);\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth = db->xAuth;\n  db->xAuth = 0;\n#endif\n\n  UNUSED_PARAMETER(NotUsed);\n\n  if( zDb && zInput ){\n    int rc;\n    Parse sParse;\n    u64 flags = db->flags;\n    if( bNoDQS ) db->flags &= ~(SQLITE_DqsDML|SQLITE_DqsDDL);\n    rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);\n    db->flags = flags;\n    if( rc==SQLITE_OK ){\n      if( isLegacy==0 && sParse.pNewTable && IsView(sParse.pNewTable) ){\n        NameContext sNC;\n        memset(&sNC, 0, sizeof(sNC));\n        sNC.pParse = &sParse;\n        sqlite3SelectPrep(&sParse, sParse.pNewTable->u.view.pSelect, &sNC);\n        if( sParse.nErr ) rc = sParse.rc;\n      }\n\n      else if( sParse.pNewTrigger ){\n        if( isLegacy==0 ){\n          rc = renameResolveTrigger(&sParse);\n        }\n        if( rc==SQLITE_OK ){\n          int i1 = sqlite3SchemaToIndex(db, sParse.pNewTrigger->pTabSchema);\n          int i2 = sqlite3FindDbName(db, zDb);\n          if( i1==i2 ){\n            /* Handle output case B */\n            sqlite3_result_int(context, 1);\n          }\n        }\n      }\n    }\n\n    if( rc!=SQLITE_OK && zWhen && !sqlite3WritableSchema(db) ){\n      /* Output case A */\n      renameColumnParseError(context, zWhen, argv[2], argv[3],&sParse);\n    }\n    renameParseCleanup(&sParse);\n  }\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = xAuth;\n#endif\n}\n\n/*\n** The implementation of internal UDF sqlite_drop_column().\n**\n** Arguments:\n**\n**  argv[0]: An integer - the index of the schema containing the table\n**  argv[1]: CREATE TABLE statement to modify.\n**  argv[2]: An integer - the index of the column to remove.\n**\n** The value returned is a string containing the CREATE TABLE statement\n** with column argv[2] removed.\n*/\nstatic void dropColumnFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  int iSchema = sqlite3_value_int(argv[0]);\n  const char *zSql = (const char*)sqlite3_value_text(argv[1]);\n  int iCol = sqlite3_value_int(argv[2]);\n  const char *zDb = db->aDb[iSchema].zDbSName;\n  int rc;\n  Parse sParse;\n  RenameToken *pCol;\n  Table *pTab;\n  const char *zEnd;\n  char *zNew = 0;\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth = db->xAuth;\n  db->xAuth = 0;\n#endif\n\n  UNUSED_PARAMETER(NotUsed);\n  rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1);\n  if( rc!=SQLITE_OK ) goto drop_column_done;\n  pTab = sParse.pNewTable;\n  if( pTab==0 || pTab->nCol==1 || iCol>=pTab->nCol ){\n    /* This can happen if the sqlite_schema table is corrupt */\n    rc = SQLITE_CORRUPT_BKPT;\n    goto drop_column_done;\n  }\n\n  pCol = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol].zCnName);\n  if( iCol<pTab->nCol-1 ){\n    RenameToken *pEnd;\n    pEnd = renameTokenFind(&sParse, 0, (void*)pTab->aCol[iCol+1].zCnName);\n    zEnd = (const char*)pEnd->t.z;\n  }else{\n    assert( IsOrdinaryTable(pTab) );\n    zEnd = (const char*)&zSql[pTab->u.tab.addColOffset];\n    while( ALWAYS(pCol->t.z[0]!=0) && pCol->t.z[0]!=',' ) pCol->t.z--;\n  }\n\n  zNew = sqlite3MPrintf(db, \"%.*s%s\", pCol->t.z-zSql, zSql, zEnd);\n  sqlite3_result_text(context, zNew, -1, SQLITE_TRANSIENT);\n  sqlite3_free(zNew);\n\ndrop_column_done:\n  renameParseCleanup(&sParse);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  db->xAuth = xAuth;\n#endif\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(context, rc);\n  }\n}\n\n/*\n** This function is called by the parser upon parsing an\n**\n**     ALTER TABLE pSrc DROP COLUMN pName\n**\n** statement. Argument pSrc contains the possibly qualified name of the\n** table being edited, and token pName the name of the column to drop.\n*/\nSQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, const Token *pName){\n  sqlite3 *db = pParse->db;       /* Database handle */\n  Table *pTab;                    /* Table to modify */\n  int iDb;                        /* Index of db containing pTab in aDb[] */\n  const char *zDb;                /* Database containing pTab (\"main\" etc.) */\n  char *zCol = 0;                 /* Name of column to drop */\n  int iCol;                       /* Index of column zCol in pTab->aCol[] */\n\n  /* Look up the table being altered. */\n  assert( pParse->pNewTable==0 );\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  if( NEVER(db->mallocFailed) ) goto exit_drop_column;\n  pTab = sqlite3LocateTableItem(pParse, 0, &pSrc->a[0]);\n  if( !pTab ) goto exit_drop_column;\n\n  /* Make sure this is not an attempt to ALTER a view, virtual table or\n  ** system table. */\n  if( SQLITE_OK!=isAlterableTable(pParse, pTab) ) goto exit_drop_column;\n  if( SQLITE_OK!=isRealTable(pParse, pTab, 1) ) goto exit_drop_column;\n\n  /* Find the index of the column being dropped. */\n  zCol = sqlite3NameFromToken(db, pName);\n  if( zCol==0 ){\n    assert( db->mallocFailed );\n    goto exit_drop_column;\n  }\n  iCol = sqlite3ColumnIndex(pTab, zCol);\n  if( iCol<0 ){\n    sqlite3ErrorMsg(pParse, \"no such column: \\\"%T\\\"\", pName);\n    goto exit_drop_column;\n  }\n\n  /* Do not allow the user to drop a PRIMARY KEY column or a column\n  ** constrained by a UNIQUE constraint.  */\n  if( pTab->aCol[iCol].colFlags & (COLFLAG_PRIMKEY|COLFLAG_UNIQUE) ){\n    sqlite3ErrorMsg(pParse, \"cannot drop %s column: \\\"%s\\\"\",\n        (pTab->aCol[iCol].colFlags&COLFLAG_PRIMKEY) ? \"PRIMARY KEY\" : \"UNIQUE\",\n        zCol\n    );\n    goto exit_drop_column;\n  }\n\n  /* Do not allow the number of columns to go to zero */\n  if( pTab->nCol<=1 ){\n    sqlite3ErrorMsg(pParse, \"cannot drop column \\\"%s\\\": no other columns exist\",zCol);\n    goto exit_drop_column;\n  }\n\n  /* Edit the sqlite_schema table */\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iDb>=0 );\n  zDb = db->aDb[iDb].zDbSName;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  /* Invoke the authorization callback. */\n  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, zCol) ){\n    goto exit_drop_column;\n  }\n#endif\n  renameTestSchema(pParse, zDb, iDb==1, \"\", 0);\n  renameFixQuotes(pParse, zDb, iDb==1);\n  sqlite3NestedParse(pParse,\n      \"UPDATE \\\"%w\\\".\" LEGACY_SCHEMA_TABLE \" SET \"\n      \"sql = sqlite_drop_column(%d, sql, %d) \"\n      \"WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\"\n      , zDb, iDb, iCol, pTab->zName\n  );\n\n  /* Drop and reload the database schema. */\n  renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop);\n  renameTestSchema(pParse, zDb, iDb==1, \"after drop column\", 1);\n\n  /* Edit rows of table on disk */\n  if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){\n    int i;\n    int addr;\n    int reg;\n    int regRec;\n    Index *pPk = 0;\n    int nField = 0;               /* Number of non-virtual columns after drop */\n    int iCur;\n    Vdbe *v = sqlite3GetVdbe(pParse);\n    iCur = pParse->nTab++;\n    sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite);\n    addr = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);\n    reg = ++pParse->nMem;\n    if( HasRowid(pTab) ){\n      sqlite3VdbeAddOp2(v, OP_Rowid, iCur, reg);\n      pParse->nMem += pTab->nCol;\n    }else{\n      pPk = sqlite3PrimaryKeyIndex(pTab);\n      pParse->nMem += pPk->nColumn;\n      for(i=0; i<pPk->nKeyCol; i++){\n        sqlite3VdbeAddOp3(v, OP_Column, iCur, i, reg+i+1);\n      }\n      nField = pPk->nKeyCol;\n    }\n    regRec = ++pParse->nMem;\n    for(i=0; i<pTab->nCol; i++){\n      if( i!=iCol && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){\n        int regOut;\n        if( pPk ){\n          int iPos = sqlite3TableColumnToIndex(pPk, i);\n          int iColPos = sqlite3TableColumnToIndex(pPk, iCol);\n          if( iPos<pPk->nKeyCol ) continue;\n          regOut = reg+1+iPos-(iPos>iColPos);\n        }else{\n          regOut = reg+1+nField;\n        }\n        if( i==pTab->iPKey ){\n          sqlite3VdbeAddOp2(v, OP_Null, 0, regOut);\n        }else{\n          char aff = pTab->aCol[i].affinity;\n          if( aff==SQLITE_AFF_REAL ){\n            pTab->aCol[i].affinity = SQLITE_AFF_NUMERIC;\n          }\n          sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOut);\n          pTab->aCol[i].affinity = aff;\n        }\n        nField++;\n      }\n    }\n    if( nField==0 ){\n      /* dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef */\n      pParse->nMem++;\n      sqlite3VdbeAddOp2(v, OP_Null, 0, reg+1);\n      nField = 1;\n    }\n    sqlite3VdbeAddOp3(v, OP_MakeRecord, reg+1, nField, regRec);\n    if( pPk ){\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iCur, regRec, reg+1, pPk->nKeyCol);\n    }else{\n      sqlite3VdbeAddOp3(v, OP_Insert, iCur, regRec, reg);\n    }\n    sqlite3VdbeChangeP5(v, OPFLAG_SAVEPOSITION);\n\n    sqlite3VdbeAddOp2(v, OP_Next, iCur, addr+1); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addr);\n  }\n\nexit_drop_column:\n  sqlite3DbFree(db, zCol);\n  sqlite3SrcListDelete(db, pSrc);\n}\n\n/*\n** Register built-in functions used to help implement ALTER TABLE\n*/\nSQLITE_PRIVATE void sqlite3AlterFunctions(void){\n  static FuncDef aAlterTableFuncs[] = {\n    INTERNAL_FUNCTION(sqlite_rename_column,  9, renameColumnFunc),\n    INTERNAL_FUNCTION(sqlite_rename_table,   7, renameTableFunc),\n    INTERNAL_FUNCTION(sqlite_rename_test,    7, renameTableTest),\n    INTERNAL_FUNCTION(sqlite_drop_column,    3, dropColumnFunc),\n    INTERNAL_FUNCTION(sqlite_rename_quotefix,2, renameQuotefixFunc),\n  };\n  sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));\n}\n#endif  /* SQLITE_ALTER_TABLE */\n\n/************** End of alter.c ***********************************************/\n/************** Begin file analyze.c *****************************************/\n/*\n** 2005-07-08\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code associated with the ANALYZE command.\n**\n** The ANALYZE command gather statistics about the content of tables\n** and indices.  These statistics are made available to the query planner\n** to help it make better decisions about how to perform queries.\n**\n** The following system tables are or have been supported:\n**\n**    CREATE TABLE sqlite_stat1(tbl, idx, stat);\n**    CREATE TABLE sqlite_stat2(tbl, idx, sampleno, sample);\n**    CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample);\n**    CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample);\n**\n** Additional tables might be added in future releases of SQLite.\n** The sqlite_stat2 table is not created or used unless the SQLite version\n** is between 3.6.18 and 3.7.8, inclusive, and unless SQLite is compiled\n** with SQLITE_ENABLE_STAT2.  The sqlite_stat2 table is deprecated.\n** The sqlite_stat2 table is superseded by sqlite_stat3, which is only\n** created and used by SQLite versions 3.7.9 through 3.29.0 when\n** SQLITE_ENABLE_STAT3 defined.  The functionality of sqlite_stat3\n** is a superset of sqlite_stat2 and is also now deprecated.  The\n** sqlite_stat4 is an enhanced version of sqlite_stat3 and is only\n** available when compiled with SQLITE_ENABLE_STAT4 and in SQLite\n** versions 3.8.1 and later.  STAT4 is the only variant that is still\n** supported.\n**\n** For most applications, sqlite_stat1 provides all the statistics required\n** for the query planner to make good choices.\n**\n** Format of sqlite_stat1:\n**\n** There is normally one row per index, with the index identified by the\n** name in the idx column.  The tbl column is the name of the table to\n** which the index belongs.  In each such row, the stat column will be\n** a string consisting of a list of integers.  The first integer in this\n** list is the number of rows in the index.  (This is the same as the\n** number of rows in the table, except for partial indices.)  The second\n** integer is the average number of rows in the index that have the same\n** value in the first column of the index.  The third integer is the average\n** number of rows in the index that have the same value for the first two\n** columns.  The N-th integer (for N>1) is the average number of rows in\n** the index which have the same value for the first N-1 columns.  For\n** a K-column index, there will be K+1 integers in the stat column.  If\n** the index is unique, then the last integer will be 1.\n**\n** The list of integers in the stat column can optionally be followed\n** by the keyword \"unordered\".  The \"unordered\" keyword, if it is present,\n** must be separated from the last integer by a single space.  If the\n** \"unordered\" keyword is present, then the query planner assumes that\n** the index is unordered and will not use the index for a range query.\n**\n** If the sqlite_stat1.idx column is NULL, then the sqlite_stat1.stat\n** column contains a single integer which is the (estimated) number of\n** rows in the table identified by sqlite_stat1.tbl.\n**\n** Format of sqlite_stat2:\n**\n** The sqlite_stat2 is only created and is only used if SQLite is compiled\n** with SQLITE_ENABLE_STAT2 and if the SQLite version number is between\n** 3.6.18 and 3.7.8.  The \"stat2\" table contains additional information\n** about the distribution of keys within an index.  The index is identified by\n** the \"idx\" column and the \"tbl\" column is the name of the table to which\n** the index belongs.  There are usually 10 rows in the sqlite_stat2\n** table for each index.\n**\n** The sqlite_stat2 entries for an index that have sampleno between 0 and 9\n** inclusive are samples of the left-most key value in the index taken at\n** evenly spaced points along the index.  Let the number of samples be S\n** (10 in the standard build) and let C be the number of rows in the index.\n** Then the sampled rows are given by:\n**\n**     rownumber = (i*C*2 + C)/(S*2)\n**\n** For i between 0 and S-1.  Conceptually, the index space is divided into\n** S uniform buckets and the samples are the middle row from each bucket.\n**\n** The format for sqlite_stat2 is recorded here for legacy reference.  This\n** version of SQLite does not support sqlite_stat2.  It neither reads nor\n** writes the sqlite_stat2 table.  This version of SQLite only supports\n** sqlite_stat3.\n**\n** Format for sqlite_stat3:\n**\n** The sqlite_stat3 format is a subset of sqlite_stat4.  Hence, the\n** sqlite_stat4 format will be described first.  Further information\n** about sqlite_stat3 follows the sqlite_stat4 description.\n**\n** Format for sqlite_stat4:\n**\n** As with sqlite_stat2, the sqlite_stat4 table contains histogram data\n** to aid the query planner in choosing good indices based on the values\n** that indexed columns are compared against in the WHERE clauses of\n** queries.\n**\n** The sqlite_stat4 table contains multiple entries for each index.\n** The idx column names the index and the tbl column is the table of the\n** index.  If the idx and tbl columns are the same, then the sample is\n** of the INTEGER PRIMARY KEY.  The sample column is a blob which is the\n** binary encoding of a key from the index.  The nEq column is a\n** list of integers.  The first integer is the approximate number\n** of entries in the index whose left-most column exactly matches\n** the left-most column of the sample.  The second integer in nEq\n** is the approximate number of entries in the index where the\n** first two columns match the first two columns of the sample.\n** And so forth.  nLt is another list of integers that show the approximate\n** number of entries that are strictly less than the sample.  The first\n** integer in nLt contains the number of entries in the index where the\n** left-most column is less than the left-most column of the sample.\n** The K-th integer in the nLt entry is the number of index entries\n** where the first K columns are less than the first K columns of the\n** sample.  The nDLt column is like nLt except that it contains the\n** number of distinct entries in the index that are less than the\n** sample.\n**\n** There can be an arbitrary number of sqlite_stat4 entries per index.\n** The ANALYZE command will typically generate sqlite_stat4 tables\n** that contain between 10 and 40 samples which are distributed across\n** the key space, though not uniformly, and which include samples with\n** large nEq values.\n**\n** Format for sqlite_stat3 redux:\n**\n** The sqlite_stat3 table is like sqlite_stat4 except that it only\n** looks at the left-most column of the index.  The sqlite_stat3.sample\n** column contains the actual value of the left-most column instead\n** of a blob encoding of the complete index key as is found in\n** sqlite_stat4.sample.  The nEq, nLt, and nDLt entries of sqlite_stat3\n** all contain just a single integer which is the same as the first\n** integer in the equivalent columns in sqlite_stat4.\n*/\n#ifndef SQLITE_OMIT_ANALYZE\n/* #include \"sqliteInt.h\" */\n\n#if defined(SQLITE_ENABLE_STAT4)\n# define IsStat4     1\n#else\n# define IsStat4     0\n# undef SQLITE_STAT4_SAMPLES\n# define SQLITE_STAT4_SAMPLES 1\n#endif\n\n/*\n** This routine generates code that opens the sqlite_statN tables.\n** The sqlite_stat1 table is always relevant.  sqlite_stat2 is now\n** obsolete.  sqlite_stat3 and sqlite_stat4 are only opened when\n** appropriate compile-time options are provided.\n**\n** If the sqlite_statN tables do not previously exist, it is created.\n**\n** Argument zWhere may be a pointer to a buffer containing a table name,\n** or it may be a NULL pointer. If it is not NULL, then all entries in\n** the sqlite_statN tables associated with the named table are deleted.\n** If zWhere==0, then code is generated to delete all stat table entries.\n*/\nstatic void openStatTable(\n  Parse *pParse,          /* Parsing context */\n  int iDb,                /* The database we are looking in */\n  int iStatCur,           /* Open the sqlite_stat1 table on this cursor */\n  const char *zWhere,     /* Delete entries for this table or index */\n  const char *zWhereType  /* Either \"tbl\" or \"idx\" */\n){\n  static const struct {\n    const char *zName;\n    const char *zCols;\n  } aTable[] = {\n    { \"sqlite_stat1\", \"tbl,idx,stat\" },\n#if defined(SQLITE_ENABLE_STAT4)\n    { \"sqlite_stat4\", \"tbl,idx,neq,nlt,ndlt,sample\" },\n#else\n    { \"sqlite_stat4\", 0 },\n#endif\n    { \"sqlite_stat3\", 0 },\n  };\n  int i;\n  sqlite3 *db = pParse->db;\n  Db *pDb;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  u32 aRoot[ArraySize(aTable)];\n  u8 aCreateTbl[ArraySize(aTable)];\n#ifdef SQLITE_ENABLE_STAT4\n  const int nToOpen = OptimizationEnabled(db,SQLITE_Stat4) ? 2 : 1;\n#else\n  const int nToOpen = 1;\n#endif\n\n  if( v==0 ) return;\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  assert( sqlite3VdbeDb(v)==db );\n  pDb = &db->aDb[iDb];\n\n  /* Create new statistic tables if they do not exist, or clear them\n  ** if they do already exist.\n  */\n  for(i=0; i<ArraySize(aTable); i++){\n    const char *zTab = aTable[i].zName;\n    Table *pStat;\n    aCreateTbl[i] = 0;\n    if( (pStat = sqlite3FindTable(db, zTab, pDb->zDbSName))==0 ){\n      if( i<nToOpen ){\n        /* The sqlite_statN table does not exist. Create it. Note that a\n        ** side-effect of the CREATE TABLE statement is to leave the rootpage\n        ** of the new table in register pParse->regRoot. This is important\n        ** because the OpenWrite opcode below will be needing it. */\n        sqlite3NestedParse(pParse,\n            \"CREATE TABLE %Q.%s(%s)\", pDb->zDbSName, zTab, aTable[i].zCols\n        );\n        assert( pParse->isCreate || pParse->nErr );\n        aRoot[i] = (u32)pParse->u1.cr.regRoot;\n        aCreateTbl[i] = OPFLAG_P2ISREG;\n      }\n    }else{\n      /* The table already exists. If zWhere is not NULL, delete all entries\n      ** associated with the table zWhere. If zWhere is NULL, delete the\n      ** entire contents of the table. */\n      aRoot[i] = pStat->tnum;\n      sqlite3TableLock(pParse, iDb, aRoot[i], 1, zTab);\n      if( zWhere ){\n        sqlite3NestedParse(pParse,\n           \"DELETE FROM %Q.%s WHERE %s=%Q\",\n           pDb->zDbSName, zTab, zWhereType, zWhere\n        );\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n      }else if( db->xPreUpdateCallback ){\n        sqlite3NestedParse(pParse, \"DELETE FROM %Q.%s\", pDb->zDbSName, zTab);\n#endif\n      }else{\n        /* The sqlite_stat[134] table already exists.  Delete all rows. */\n        sqlite3VdbeAddOp2(v, OP_Clear, (int)aRoot[i], iDb);\n      }\n    }\n  }\n\n  /* Open the sqlite_stat[134] tables for writing. */\n  for(i=0; i<nToOpen; i++){\n    assert( i<ArraySize(aTable) );\n    sqlite3VdbeAddOp4Int(v, OP_OpenWrite, iStatCur+i, (int)aRoot[i], iDb, 3);\n    sqlite3VdbeChangeP5(v, aCreateTbl[i]);\n    VdbeComment((v, aTable[i].zName));\n  }\n}\n\n/*\n** Recommended number of samples for sqlite_stat4\n*/\n#ifndef SQLITE_STAT4_SAMPLES\n# define SQLITE_STAT4_SAMPLES 24\n#endif\n\n/*\n** Three SQL functions - stat_init(), stat_push(), and stat_get() -\n** share an instance of the following structure to hold their state\n** information.\n*/\ntypedef struct StatAccum StatAccum;\ntypedef struct StatSample StatSample;\nstruct StatSample {\n  tRowcnt *anDLt;                 /* sqlite_stat4.nDLt */\n#ifdef SQLITE_ENABLE_STAT4\n  tRowcnt *anEq;                  /* sqlite_stat4.nEq */\n  tRowcnt *anLt;                  /* sqlite_stat4.nLt */\n  union {\n    i64 iRowid;                     /* Rowid in main table of the key */\n    u8 *aRowid;                     /* Key for WITHOUT ROWID tables */\n  } u;\n  u32 nRowid;                     /* Sizeof aRowid[] */\n  u8 isPSample;                   /* True if a periodic sample */\n  int iCol;                       /* If !isPSample, the reason for inclusion */\n  u32 iHash;                      /* Tiebreaker hash */\n#endif\n};\nstruct StatAccum {\n  sqlite3 *db;              /* Database connection, for malloc() */\n  tRowcnt nEst;             /* Estimated number of rows */\n  tRowcnt nRow;             /* Number of rows visited so far */\n  int nLimit;               /* Analysis row-scan limit */\n  int nCol;                 /* Number of columns in index + pk/rowid */\n  int nKeyCol;              /* Number of index columns w/o the pk/rowid */\n  u8 nSkipAhead;            /* Number of times of skip-ahead */\n  StatSample current;       /* Current row as a StatSample */\n#ifdef SQLITE_ENABLE_STAT4\n  tRowcnt nPSample;         /* How often to do a periodic sample */\n  int mxSample;             /* Maximum number of samples to accumulate */\n  u32 iPrn;                 /* Pseudo-random number used for sampling */\n  StatSample *aBest;        /* Array of nCol best samples */\n  int iMin;                 /* Index in a[] of entry with minimum score */\n  int nSample;              /* Current number of samples */\n  int nMaxEqZero;           /* Max leading 0 in anEq[] for any a[] entry */\n  int iGet;                 /* Index of current sample accessed by stat_get() */\n  StatSample *a;            /* Array of mxSample StatSample objects */\n#endif\n};\n\n/* Reclaim memory used by a StatSample\n*/\n#ifdef SQLITE_ENABLE_STAT4\nstatic void sampleClear(sqlite3 *db, StatSample *p){\n  assert( db!=0 );\n  if( p->nRowid ){\n    sqlite3DbFree(db, p->u.aRowid);\n    p->nRowid = 0;\n  }\n}\n#endif\n\n/* Initialize the BLOB value of a ROWID\n*/\n#ifdef SQLITE_ENABLE_STAT4\nstatic void sampleSetRowid(sqlite3 *db, StatSample *p, int n, const u8 *pData){\n  assert( db!=0 );\n  if( p->nRowid ) sqlite3DbFree(db, p->u.aRowid);\n  p->u.aRowid = sqlite3DbMallocRawNN(db, n);\n  if( p->u.aRowid ){\n    p->nRowid = n;\n    memcpy(p->u.aRowid, pData, n);\n  }else{\n    p->nRowid = 0;\n  }\n}\n#endif\n\n/* Initialize the INTEGER value of a ROWID.\n*/\n#ifdef SQLITE_ENABLE_STAT4\nstatic void sampleSetRowidInt64(sqlite3 *db, StatSample *p, i64 iRowid){\n  assert( db!=0 );\n  if( p->nRowid ) sqlite3DbFree(db, p->u.aRowid);\n  p->nRowid = 0;\n  p->u.iRowid = iRowid;\n}\n#endif\n\n\n/*\n** Copy the contents of object (*pFrom) into (*pTo).\n*/\n#ifdef SQLITE_ENABLE_STAT4\nstatic void sampleCopy(StatAccum *p, StatSample *pTo, StatSample *pFrom){\n  pTo->isPSample = pFrom->isPSample;\n  pTo->iCol = pFrom->iCol;\n  pTo->iHash = pFrom->iHash;\n  memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);\n  memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);\n  memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);\n  if( pFrom->nRowid ){\n    sampleSetRowid(p->db, pTo, pFrom->nRowid, pFrom->u.aRowid);\n  }else{\n    sampleSetRowidInt64(p->db, pTo, pFrom->u.iRowid);\n  }\n}\n#endif\n\n/*\n** Reclaim all memory of a StatAccum structure.\n*/\nstatic void statAccumDestructor(void *pOld){\n  StatAccum *p = (StatAccum*)pOld;\n#ifdef SQLITE_ENABLE_STAT4\n  if( p->mxSample ){\n    int i;\n    for(i=0; i<p->nCol; i++) sampleClear(p->db, p->aBest+i);\n    for(i=0; i<p->mxSample; i++) sampleClear(p->db, p->a+i);\n    sampleClear(p->db, &p->current);\n  }\n#endif\n  sqlite3DbFree(p->db, p);\n}\n\n/*\n** Implementation of the stat_init(N,K,C,L) SQL function. The four parameters\n** are:\n**     N:    The number of columns in the index including the rowid/pk (note 1)\n**     K:    The number of columns in the index excluding the rowid/pk.\n**     C:    Estimated number of rows in the index\n**     L:    A limit on the number of rows to scan, or 0 for no-limit\n**\n** Note 1:  In the special case of the covering index that implements a\n** WITHOUT ROWID table, N is the number of PRIMARY KEY columns, not the\n** total number of columns in the table.\n**\n** For indexes on ordinary rowid tables, N==K+1.  But for indexes on\n** WITHOUT ROWID tables, N=K+P where P is the number of columns in the\n** PRIMARY KEY of the table.  The covering index that implements the\n** original WITHOUT ROWID table as N==K as a special case.\n**\n** This routine allocates the StatAccum object in heap memory. The return\n** value is a pointer to the StatAccum object.  The datatype of the\n** return value is BLOB, but it is really just a pointer to the StatAccum\n** object.\n*/\nstatic void statInit(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  StatAccum *p;\n  int nCol;                       /* Number of columns in index being sampled */\n  int nKeyCol;                    /* Number of key columns */\n  int nColUp;                     /* nCol rounded up for alignment */\n  i64 n;                          /* Bytes of space to allocate */\n  sqlite3 *db = sqlite3_context_db_handle(context);   /* Database connection */\n#ifdef SQLITE_ENABLE_STAT4\n  /* Maximum number of samples.  0 if STAT4 data is not collected */\n  int mxSample = OptimizationEnabled(db,SQLITE_Stat4) ?SQLITE_STAT4_SAMPLES :0;\n#endif\n\n  /* Decode the three function arguments */\n  UNUSED_PARAMETER(argc);\n  nCol = sqlite3_value_int(argv[0]);\n  assert( nCol>0 );\n  nColUp = sizeof(tRowcnt)<8 ? (nCol+1)&~1 : nCol;\n  nKeyCol = sqlite3_value_int(argv[1]);\n  assert( nKeyCol<=nCol );\n  assert( nKeyCol>0 );\n\n  /* Allocate the space required for the StatAccum object */\n  n = sizeof(*p)\n    + sizeof(tRowcnt)*nColUp;                    /* StatAccum.anDLt */\n#ifdef SQLITE_ENABLE_STAT4\n  n += sizeof(tRowcnt)*nColUp;                   /* StatAccum.anEq */\n  if( mxSample ){\n    n += sizeof(tRowcnt)*nColUp                  /* StatAccum.anLt */\n      + sizeof(StatSample)*(nCol+mxSample)       /* StatAccum.aBest[], a[] */\n      + sizeof(tRowcnt)*3*nColUp*(nCol+mxSample);\n  }\n#endif\n  p = sqlite3DbMallocZero(db, n);\n  if( p==0 ){\n    sqlite3_result_error_nomem(context);\n    return;\n  }\n\n  p->db = db;\n  p->nEst = sqlite3_value_int64(argv[2]);\n  p->nRow = 0;\n  p->nLimit = sqlite3_value_int(argv[3]);\n  p->nCol = nCol;\n  p->nKeyCol = nKeyCol;\n  p->nSkipAhead = 0;\n  p->current.anDLt = (tRowcnt*)&p[1];\n\n#ifdef SQLITE_ENABLE_STAT4\n  p->current.anEq = &p->current.anDLt[nColUp];\n  p->mxSample = p->nLimit==0 ? mxSample : 0;\n  if( mxSample ){\n    u8 *pSpace;                     /* Allocated space not yet assigned */\n    int i;                          /* Used to iterate through p->aSample[] */\n\n    p->iGet = -1;\n    p->nPSample = (tRowcnt)(p->nEst/(mxSample/3+1) + 1);\n    p->current.anLt = &p->current.anEq[nColUp];\n    p->iPrn = 0x689e962d*(u32)nCol ^ 0xd0944565*(u32)sqlite3_value_int(argv[2]);\n\n    /* Set up the StatAccum.a[] and aBest[] arrays */\n    p->a = (struct StatSample*)&p->current.anLt[nColUp];\n    p->aBest = &p->a[mxSample];\n    pSpace = (u8*)(&p->a[mxSample+nCol]);\n    for(i=0; i<(mxSample+nCol); i++){\n      p->a[i].anEq = (tRowcnt *)pSpace; pSpace += (sizeof(tRowcnt) * nColUp);\n      p->a[i].anLt = (tRowcnt *)pSpace; pSpace += (sizeof(tRowcnt) * nColUp);\n      p->a[i].anDLt = (tRowcnt *)pSpace; pSpace += (sizeof(tRowcnt) * nColUp);\n    }\n    assert( (pSpace - (u8*)p)==n );\n\n    for(i=0; i<nCol; i++){\n      p->aBest[i].iCol = i;\n    }\n  }\n#endif\n\n  /* Return a pointer to the allocated object to the caller.  Note that\n  ** only the pointer (the 2nd parameter) matters.  The size of the object\n  ** (given by the 3rd parameter) is never used and can be any positive\n  ** value. */\n  sqlite3_result_blob(context, p, sizeof(*p), statAccumDestructor);\n}\nstatic const FuncDef statInitFuncdef = {\n  4,               /* nArg */\n  SQLITE_UTF8,     /* funcFlags */\n  0,               /* pUserData */\n  0,               /* pNext */\n  statInit,        /* xSFunc */\n  0,               /* xFinalize */\n  0, 0,            /* xValue, xInverse */\n  \"stat_init\",     /* zName */\n  {0}\n};\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** pNew and pOld are both candidate non-periodic samples selected for\n** the same column (pNew->iCol==pOld->iCol). Ignoring this column and\n** considering only any trailing columns and the sample hash value, this\n** function returns true if sample pNew is to be preferred over pOld.\n** In other words, if we assume that the cardinalities of the selected\n** column for pNew and pOld are equal, is pNew to be preferred over pOld.\n**\n** This function assumes that for each argument sample, the contents of\n** the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid.\n*/\nstatic int sampleIsBetterPost(\n  StatAccum *pAccum,\n  StatSample *pNew,\n  StatSample *pOld\n){\n  int nCol = pAccum->nCol;\n  int i;\n  assert( pNew->iCol==pOld->iCol );\n  for(i=pNew->iCol+1; i<nCol; i++){\n    if( pNew->anEq[i]>pOld->anEq[i] ) return 1;\n    if( pNew->anEq[i]<pOld->anEq[i] ) return 0;\n  }\n  if( pNew->iHash>pOld->iHash ) return 1;\n  return 0;\n}\n#endif\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Return true if pNew is to be preferred over pOld.\n**\n** This function assumes that for each argument sample, the contents of\n** the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid.\n*/\nstatic int sampleIsBetter(\n  StatAccum *pAccum,\n  StatSample *pNew,\n  StatSample *pOld\n){\n  tRowcnt nEqNew = pNew->anEq[pNew->iCol];\n  tRowcnt nEqOld = pOld->anEq[pOld->iCol];\n\n  assert( pOld->isPSample==0 && pNew->isPSample==0 );\n  assert( IsStat4 || (pNew->iCol==0 && pOld->iCol==0) );\n\n  if( (nEqNew>nEqOld) ) return 1;\n  if( nEqNew==nEqOld ){\n    if( pNew->iCol<pOld->iCol ) return 1;\n    return (pNew->iCol==pOld->iCol && sampleIsBetterPost(pAccum, pNew, pOld));\n  }\n  return 0;\n}\n\n/*\n** Copy the contents of sample *pNew into the p->a[] array. If necessary,\n** remove the least desirable sample from p->a[] to make room.\n*/\nstatic void sampleInsert(StatAccum *p, StatSample *pNew, int nEqZero){\n  StatSample *pSample = 0;\n  int i;\n\n  assert( IsStat4 || nEqZero==0 );\n\n  /* StatAccum.nMaxEqZero is set to the maximum number of leading 0\n  ** values in the anEq[] array of any sample in StatAccum.a[]. In\n  ** other words, if nMaxEqZero is n, then it is guaranteed that there\n  ** are no samples with StatSample.anEq[m]==0 for (m>=n). */\n  if( nEqZero>p->nMaxEqZero ){\n    p->nMaxEqZero = nEqZero;\n  }\n  if( pNew->isPSample==0 ){\n    StatSample *pUpgrade = 0;\n    assert( pNew->anEq[pNew->iCol]>0 );\n\n    /* This sample is being added because the prefix that ends in column\n    ** iCol occurs many times in the table. However, if we have already\n    ** added a sample that shares this prefix, there is no need to add\n    ** this one. Instead, upgrade the priority of the highest priority\n    ** existing sample that shares this prefix.  */\n    for(i=p->nSample-1; i>=0; i--){\n      StatSample *pOld = &p->a[i];\n      if( pOld->anEq[pNew->iCol]==0 ){\n        if( pOld->isPSample ) return;\n        assert( pOld->iCol>pNew->iCol );\n        assert( sampleIsBetter(p, pNew, pOld) );\n        if( pUpgrade==0 || sampleIsBetter(p, pOld, pUpgrade) ){\n          pUpgrade = pOld;\n        }\n      }\n    }\n    if( pUpgrade ){\n      pUpgrade->iCol = pNew->iCol;\n      pUpgrade->anEq[pUpgrade->iCol] = pNew->anEq[pUpgrade->iCol];\n      goto find_new_min;\n    }\n  }\n\n  /* If necessary, remove sample iMin to make room for the new sample. */\n  if( p->nSample>=p->mxSample ){\n    StatSample *pMin = &p->a[p->iMin];\n    tRowcnt *anEq = pMin->anEq;\n    tRowcnt *anLt = pMin->anLt;\n    tRowcnt *anDLt = pMin->anDLt;\n    sampleClear(p->db, pMin);\n    memmove(pMin, &pMin[1], sizeof(p->a[0])*(p->nSample-p->iMin-1));\n    pSample = &p->a[p->nSample-1];\n    pSample->nRowid = 0;\n    pSample->anEq = anEq;\n    pSample->anDLt = anDLt;\n    pSample->anLt = anLt;\n    p->nSample = p->mxSample-1;\n  }\n\n  /* The \"rows less-than\" for the rowid column must be greater than that\n  ** for the last sample in the p->a[] array. Otherwise, the samples would\n  ** be out of order. */\n  assert( p->nSample==0\n       || pNew->anLt[p->nCol-1] > p->a[p->nSample-1].anLt[p->nCol-1] );\n\n  /* Insert the new sample */\n  pSample = &p->a[p->nSample];\n  sampleCopy(p, pSample, pNew);\n  p->nSample++;\n\n  /* Zero the first nEqZero entries in the anEq[] array. */\n  memset(pSample->anEq, 0, sizeof(tRowcnt)*nEqZero);\n\nfind_new_min:\n  if( p->nSample>=p->mxSample ){\n    int iMin = -1;\n    for(i=0; i<p->mxSample; i++){\n      if( p->a[i].isPSample ) continue;\n      if( iMin<0 || sampleIsBetter(p, &p->a[iMin], &p->a[i]) ){\n        iMin = i;\n      }\n    }\n    assert( iMin>=0 );\n    p->iMin = iMin;\n  }\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Field iChng of the index being scanned has changed. So at this point\n** p->current contains a sample that reflects the previous row of the\n** index. The value of anEq[iChng] and subsequent anEq[] elements are\n** correct at this point.\n*/\nstatic void samplePushPrevious(StatAccum *p, int iChng){\n  int i;\n\n  /* Check if any samples from the aBest[] array should be pushed\n  ** into IndexSample.a[] at this point.  */\n  for(i=(p->nCol-2); i>=iChng; i--){\n    StatSample *pBest = &p->aBest[i];\n    pBest->anEq[i] = p->current.anEq[i];\n    if( p->nSample<p->mxSample || sampleIsBetter(p, pBest, &p->a[p->iMin]) ){\n      sampleInsert(p, pBest, i);\n    }\n  }\n\n  /* Check that no sample contains an anEq[] entry with an index of\n  ** p->nMaxEqZero or greater set to zero. */\n  for(i=p->nSample-1; i>=0; i--){\n    int j;\n    for(j=p->nMaxEqZero; j<p->nCol; j++) assert( p->a[i].anEq[j]>0 );\n  }\n\n  /* Update the anEq[] fields of any samples already collected. */\n  if( iChng<p->nMaxEqZero ){\n    for(i=p->nSample-1; i>=0; i--){\n      int j;\n      for(j=iChng; j<p->nCol; j++){\n        if( p->a[i].anEq[j]==0 ) p->a[i].anEq[j] = p->current.anEq[j];\n      }\n    }\n    p->nMaxEqZero = iChng;\n  }\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n/*\n** Implementation of the stat_push SQL function:  stat_push(P,C,R)\n** Arguments:\n**\n**    P     Pointer to the StatAccum object created by stat_init()\n**    C     Index of left-most column to differ from previous row\n**    R     Rowid for the current row.  Might be a key record for\n**          WITHOUT ROWID tables.\n**\n** The purpose of this routine is to collect statistical data and/or\n** samples from the index being analyzed into the StatAccum object.\n** The stat_get() SQL function will be used afterwards to\n** retrieve the information gathered.\n**\n** This SQL function usually returns NULL, but might return an integer\n** if it wants the byte-code to do special processing.\n**\n** The R parameter is only used for STAT4\n*/\nstatic void statPush(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int i;\n\n  /* The three function arguments */\n  StatAccum *p = (StatAccum*)sqlite3_value_blob(argv[0]);\n  int iChng = sqlite3_value_int(argv[1]);\n\n  UNUSED_PARAMETER( argc );\n  UNUSED_PARAMETER( context );\n  assert( p->nCol>0 );\n  assert( iChng<p->nCol );\n\n  if( p->nRow==0 ){\n    /* This is the first call to this function. Do initialization. */\n#ifdef SQLITE_ENABLE_STAT4\n    for(i=0; i<p->nCol; i++) p->current.anEq[i] = 1;\n#endif\n  }else{\n    /* Second and subsequent calls get processed here */\n#ifdef SQLITE_ENABLE_STAT4\n    if( p->mxSample ) samplePushPrevious(p, iChng);\n#endif\n\n    /* Update anDLt[], anLt[] and anEq[] to reflect the values that apply\n    ** to the current row of the index. */\n#ifdef SQLITE_ENABLE_STAT4\n    for(i=0; i<iChng; i++){\n      p->current.anEq[i]++;\n    }\n#endif\n    for(i=iChng; i<p->nCol; i++){\n      p->current.anDLt[i]++;\n#ifdef SQLITE_ENABLE_STAT4\n      if( p->mxSample ) p->current.anLt[i] += p->current.anEq[i];\n      p->current.anEq[i] = 1;\n#endif\n    }\n  }\n\n  p->nRow++;\n#ifdef SQLITE_ENABLE_STAT4\n  if( p->mxSample ){\n    tRowcnt nLt;\n    if( sqlite3_value_type(argv[2])==SQLITE_INTEGER ){\n      sampleSetRowidInt64(p->db, &p->current, sqlite3_value_int64(argv[2]));\n    }else{\n      sampleSetRowid(p->db, &p->current, sqlite3_value_bytes(argv[2]),\n                                         sqlite3_value_blob(argv[2]));\n    }\n    p->current.iHash = p->iPrn = p->iPrn*1103515245 + 12345;\n\n    nLt = p->current.anLt[p->nCol-1];\n    /* Check if this is to be a periodic sample. If so, add it. */\n    if( (nLt/p->nPSample)!=(nLt+1)/p->nPSample ){\n      p->current.isPSample = 1;\n      p->current.iCol = 0;\n      sampleInsert(p, &p->current, p->nCol-1);\n      p->current.isPSample = 0;\n    }\n\n    /* Update the aBest[] array. */\n    for(i=0; i<(p->nCol-1); i++){\n      p->current.iCol = i;\n      if( i>=iChng || sampleIsBetterPost(p, &p->current, &p->aBest[i]) ){\n        sampleCopy(p, &p->aBest[i], &p->current);\n      }\n    }\n  }else\n#endif\n  if( p->nLimit && p->nRow>(tRowcnt)p->nLimit*(p->nSkipAhead+1) ){\n    p->nSkipAhead++;\n    sqlite3_result_int(context, p->current.anDLt[0]>0);\n  }\n}\n\nstatic const FuncDef statPushFuncdef = {\n  2+IsStat4,       /* nArg */\n  SQLITE_UTF8,     /* funcFlags */\n  0,               /* pUserData */\n  0,               /* pNext */\n  statPush,        /* xSFunc */\n  0,               /* xFinalize */\n  0, 0,            /* xValue, xInverse */\n  \"stat_push\",     /* zName */\n  {0}\n};\n\n#define STAT_GET_STAT1 0          /* \"stat\" column of stat1 table */\n#define STAT_GET_ROWID 1          /* \"rowid\" column of stat[34] entry */\n#define STAT_GET_NEQ   2          /* \"neq\" column of stat[34] entry */\n#define STAT_GET_NLT   3          /* \"nlt\" column of stat[34] entry */\n#define STAT_GET_NDLT  4          /* \"ndlt\" column of stat[34] entry */\n\n/*\n** Implementation of the stat_get(P,J) SQL function.  This routine is\n** used to query statistical information that has been gathered into\n** the StatAccum object by prior calls to stat_push().  The P parameter\n** has type BLOB but it is really just a pointer to the StatAccum object.\n** The content to returned is determined by the parameter J\n** which is one of the STAT_GET_xxxx values defined above.\n**\n** The stat_get(P,J) function is not available to generic SQL.  It is\n** inserted as part of a manually constructed bytecode program.  (See\n** the callStatGet() routine below.)  It is guaranteed that the P\n** parameter will always be a pointer to a StatAccum object, never a\n** NULL.\n**\n** If STAT4 is not enabled, then J is always\n** STAT_GET_STAT1 and is hence omitted and this routine becomes\n** a one-parameter function, stat_get(P), that always returns the\n** stat1 table entry information.\n*/\nstatic void statGet(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  StatAccum *p = (StatAccum*)sqlite3_value_blob(argv[0]);\n#ifdef SQLITE_ENABLE_STAT4\n  /* STAT4 has a parameter on this routine. */\n  int eCall = sqlite3_value_int(argv[1]);\n  assert( argc==2 );\n  assert( eCall==STAT_GET_STAT1 || eCall==STAT_GET_NEQ\n       || eCall==STAT_GET_ROWID || eCall==STAT_GET_NLT\n       || eCall==STAT_GET_NDLT\n  );\n  assert( eCall==STAT_GET_STAT1 || p->mxSample );\n  if( eCall==STAT_GET_STAT1 )\n#else\n  assert( argc==1 );\n#endif\n  {\n    /* Return the value to store in the \"stat\" column of the sqlite_stat1\n    ** table for this index.\n    **\n    ** The value is a string composed of a list of integers describing\n    ** the index. The first integer in the list is the total number of\n    ** entries in the index. There is one additional integer in the list\n    ** for each indexed column. This additional integer is an estimate of\n    ** the number of rows matched by a equality query on the index using\n    ** a key with the corresponding number of fields. In other words,\n    ** if the index is on columns (a,b) and the sqlite_stat1 value is\n    ** \"100 10 2\", then SQLite estimates that:\n    **\n    **   * the index contains 100 rows,\n    **   * \"WHERE a=?\" matches 10 rows, and\n    **   * \"WHERE a=? AND b=?\" matches 2 rows.\n    **\n    ** If D is the count of distinct values and K is the total number of\n    ** rows, then each estimate is usually computed as:\n    **\n    **        I = (K+D-1)/D\n    **\n    ** In other words, I is K/D rounded up to the next whole integer.\n    ** However, if I is between 1.0 and 1.1 (in other words if I is\n    ** close to 1.0 but just a little larger) then do not round up but\n    ** instead keep the I value at 1.0.\n    */\n    sqlite3_str sStat;   /* Text of the constructed \"stat\" line */\n    int i;               /* Loop counter */\n\n    sqlite3StrAccumInit(&sStat, 0, 0, 0, (p->nKeyCol+1)*100);\n    sqlite3_str_appendf(&sStat, \"%llu\",\n        p->nSkipAhead ? (u64)p->nEst : (u64)p->nRow);\n    for(i=0; i<p->nKeyCol; i++){\n      u64 nDistinct = p->current.anDLt[i] + 1;\n      u64 iVal = (p->nRow + nDistinct - 1) / nDistinct;\n      if( iVal==2 && p->nRow*10 <= nDistinct*11 ) iVal = 1;\n      sqlite3_str_appendf(&sStat, \" %llu\", iVal);\n#ifdef SQLITE_ENABLE_STAT4\n      assert( p->current.anEq[i] || p->nRow==0 );\n#endif\n    }\n    sqlite3ResultStrAccum(context, &sStat);\n  }\n#ifdef SQLITE_ENABLE_STAT4\n  else if( eCall==STAT_GET_ROWID ){\n    if( p->iGet<0 ){\n      samplePushPrevious(p, 0);\n      p->iGet = 0;\n    }\n    if( p->iGet<p->nSample ){\n      StatSample *pS = p->a + p->iGet;\n      if( pS->nRowid==0 ){\n        sqlite3_result_int64(context, pS->u.iRowid);\n      }else{\n        sqlite3_result_blob(context, pS->u.aRowid, pS->nRowid,\n                            SQLITE_TRANSIENT);\n      }\n    }\n  }else{\n    tRowcnt *aCnt = 0;\n    sqlite3_str sStat;\n    int i;\n\n    assert( p->iGet<p->nSample );\n    switch( eCall ){\n      case STAT_GET_NEQ:  aCnt = p->a[p->iGet].anEq; break;\n      case STAT_GET_NLT:  aCnt = p->a[p->iGet].anLt; break;\n      default: {\n        aCnt = p->a[p->iGet].anDLt;\n        p->iGet++;\n        break;\n      }\n    }\n    sqlite3StrAccumInit(&sStat, 0, 0, 0, p->nCol*100);\n    for(i=0; i<p->nCol; i++){\n      sqlite3_str_appendf(&sStat, \"%llu \", (u64)aCnt[i]);\n    }\n    if( sStat.nChar ) sStat.nChar--;\n    sqlite3ResultStrAccum(context, &sStat);\n  }\n#endif /* SQLITE_ENABLE_STAT4 */\n#ifndef SQLITE_DEBUG\n  UNUSED_PARAMETER( argc );\n#endif\n}\nstatic const FuncDef statGetFuncdef = {\n  1+IsStat4,       /* nArg */\n  SQLITE_UTF8,     /* funcFlags */\n  0,               /* pUserData */\n  0,               /* pNext */\n  statGet,         /* xSFunc */\n  0,               /* xFinalize */\n  0, 0,            /* xValue, xInverse */\n  \"stat_get\",      /* zName */\n  {0}\n};\n\nstatic void callStatGet(Parse *pParse, int regStat, int iParam, int regOut){\n#ifdef SQLITE_ENABLE_STAT4\n  sqlite3VdbeAddOp2(pParse->pVdbe, OP_Integer, iParam, regStat+1);\n#elif SQLITE_DEBUG\n  assert( iParam==STAT_GET_STAT1 );\n#else\n  UNUSED_PARAMETER( iParam );\n#endif\n  assert( regOut!=regStat && regOut!=regStat+1 );\n  sqlite3VdbeAddFunctionCall(pParse, 0, regStat, regOut, 1+IsStat4,\n                             &statGetFuncdef, 0);\n}\n\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n/* Add a comment to the most recent VDBE opcode that is the name\n** of the k-th column of the pIdx index.\n*/\nstatic void analyzeVdbeCommentIndexWithColumnName(\n  Vdbe *v,         /* Prepared statement under construction */\n  Index *pIdx,     /* Index whose column is being loaded */\n  int k            /* Which column index */\n){\n  int i;           /* Index of column in the table */\n  assert( k>=0 && k<pIdx->nColumn );\n  i = pIdx->aiColumn[k];\n  if( NEVER(i==XN_ROWID) ){\n    VdbeComment((v,\"%s.rowid\",pIdx->zName));\n  }else if( i==XN_EXPR ){\n    assert( pIdx->bHasExpr );\n    VdbeComment((v,\"%s.expr(%d)\",pIdx->zName, k));\n  }else{\n    VdbeComment((v,\"%s.%s\", pIdx->zName, pIdx->pTable->aCol[i].zCnName));\n  }\n}\n#else\n# define analyzeVdbeCommentIndexWithColumnName(a,b,c)\n#endif /* SQLITE_DEBUG */\n\n/*\n** Generate code to do an analysis of all indices associated with\n** a single table.\n*/\nstatic void analyzeOneTable(\n  Parse *pParse,   /* Parser context */\n  Table *pTab,     /* Table whose indices are to be analyzed */\n  Index *pOnlyIdx, /* If not NULL, only analyze this one index */\n  int iStatCur,    /* Index of VdbeCursor that writes the sqlite_stat1 table */\n  int iMem,        /* Available memory locations begin here */\n  int iTab         /* Next available cursor */\n){\n  sqlite3 *db = pParse->db;    /* Database handle */\n  Index *pIdx;                 /* An index to being analyzed */\n  int iIdxCur;                 /* Cursor open on index being analyzed */\n  int iTabCur;                 /* Table cursor */\n  Vdbe *v;                     /* The virtual machine being built up */\n  int i;                       /* Loop counter */\n  int jZeroRows = -1;          /* Jump from here if number of rows is zero */\n  int iDb;                     /* Index of database containing pTab */\n  u8 needTableCnt = 1;         /* True to count the table */\n  int regNewRowid = iMem++;    /* Rowid for the inserted record */\n  int regStat = iMem++;        /* Register to hold StatAccum object */\n  int regChng = iMem++;        /* Index of changed index field */\n  int regRowid = iMem++;       /* Rowid argument passed to stat_push() */\n  int regTemp = iMem++;        /* Temporary use register */\n  int regTemp2 = iMem++;       /* Second temporary use register */\n  int regTabname = iMem++;     /* Register containing table name */\n  int regIdxname = iMem++;     /* Register containing index name */\n  int regStat1 = iMem++;       /* Value for the stat column of sqlite_stat1 */\n  int regPrev = iMem;          /* MUST BE LAST (see below) */\n#ifdef SQLITE_ENABLE_STAT4\n  int doOnce = 1;              /* Flag for a one-time computation */\n#endif\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  Table *pStat1 = 0;\n#endif\n\n  sqlite3TouchRegister(pParse, iMem);\n  assert( sqlite3NoTempsInRange(pParse, regNewRowid, iMem) );\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 || NEVER(pTab==0) ){\n    return;\n  }\n  if( !IsOrdinaryTable(pTab) ){\n    /* Do not gather statistics on views or virtual tables */\n    return;\n  }\n  if( sqlite3_strlike(\"sqlite\\\\_%\", pTab->zName, '\\\\')==0 ){\n    /* Do not gather statistics on system tables */\n    return;\n  }\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iDb>=0 );\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,\n      db->aDb[iDb].zDbSName ) ){\n    return;\n  }\n#endif\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n  if( db->xPreUpdateCallback ){\n    pStat1 = (Table*)sqlite3DbMallocZero(db, sizeof(Table) + 13);\n    if( pStat1==0 ) return;\n    pStat1->zName = (char*)&pStat1[1];\n    memcpy(pStat1->zName, \"sqlite_stat1\", 13);\n    pStat1->nCol = 3;\n    pStat1->iPKey = -1;\n    sqlite3VdbeAddOp4(pParse->pVdbe, OP_Noop, 0, 0, 0,(char*)pStat1,P4_DYNAMIC);\n  }\n#endif\n\n  /* Establish a read-lock on the table at the shared-cache level.\n  ** Open a read-only cursor on the table. Also allocate a cursor number\n  ** to use for scanning indexes (iIdxCur). No index cursor is opened at\n  ** this time though.  */\n  sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);\n  iTabCur = iTab++;\n  iIdxCur = iTab++;\n  pParse->nTab = MAX(pParse->nTab, iTab);\n  sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);\n  sqlite3VdbeLoadString(v, regTabname, pTab->zName);\n\n  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n    int nCol;                     /* Number of columns in pIdx. \"N\" */\n    int addrGotoEnd;               /* Address of \"OP_Rewind iIdxCur\" */\n    int addrNextRow;              /* Address of \"next_row:\" */\n    const char *zIdxName;         /* Name of the index */\n    int nColTest;                 /* Number of columns to test for changes */\n\n    if( pOnlyIdx && pOnlyIdx!=pIdx ) continue;\n    if( pIdx->pPartIdxWhere==0 ) needTableCnt = 0;\n    if( !HasRowid(pTab) && IsPrimaryKeyIndex(pIdx) ){\n      nCol = pIdx->nKeyCol;\n      zIdxName = pTab->zName;\n      nColTest = nCol - 1;\n    }else{\n      nCol = pIdx->nColumn;\n      zIdxName = pIdx->zName;\n      nColTest = pIdx->uniqNotNull ? pIdx->nKeyCol-1 : nCol-1;\n    }\n\n    /* Populate the register containing the index name. */\n    sqlite3VdbeLoadString(v, regIdxname, zIdxName);\n    VdbeComment((v, \"Analysis for %s.%s\", pTab->zName, zIdxName));\n\n    /*\n    ** Pseudo-code for loop that calls stat_push():\n    **\n    **   regChng = 0\n    **   Rewind csr\n    **   if eof(csr){\n    **      stat_init() with count = 0;\n    **      goto end_of_scan;\n    **   }\n    **   count()\n    **   stat_init()\n    **   goto chng_addr_0;\n    **\n    **  next_row:\n    **   regChng = 0\n    **   if( idx(0) != regPrev(0) ) goto chng_addr_0\n    **   regChng = 1\n    **   if( idx(1) != regPrev(1) ) goto chng_addr_1\n    **   ...\n    **   regChng = N\n    **   goto chng_addr_N\n    **\n    **  chng_addr_0:\n    **   regPrev(0) = idx(0)\n    **  chng_addr_1:\n    **   regPrev(1) = idx(1)\n    **  ...\n    **\n    **  endDistinctTest:\n    **   regRowid = idx(rowid)\n    **   stat_push(P, regChng, regRowid)\n    **   Next csr\n    **   if !eof(csr) goto next_row;\n    **\n    **  end_of_scan:\n    */\n\n    /* Make sure there are enough memory cells allocated to accommodate\n    ** the regPrev array and a trailing rowid (the rowid slot is required\n    ** when building a record to insert into the sample column of\n    ** the sqlite_stat4 table.  */\n    sqlite3TouchRegister(pParse, regPrev+nColTest);\n\n    /* Open a read-only cursor on the index being analyzed. */\n    assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );\n    sqlite3VdbeAddOp3(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb);\n    sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n    VdbeComment((v, \"%s\", pIdx->zName));\n\n    /* Implementation of the following:\n    **\n    **   regChng = 0\n    **   Rewind csr\n    **   if eof(csr){\n    **      stat_init() with count = 0;\n    **      goto end_of_scan;\n    **   }\n    **   count()\n    **   stat_init()\n    **   goto chng_addr_0;\n    */\n    assert( regTemp2==regStat+4 );\n    sqlite3VdbeAddOp2(v, OP_Integer, db->nAnalysisLimit, regTemp2);\n\n    /* Arguments to stat_init():\n    **    (1) the number of columns in the index including the rowid\n    **        (or for a WITHOUT ROWID table, the number of PK columns),\n    **    (2) the number of columns in the key without the rowid/pk\n    **    (3) estimated number of rows in the index. */\n    sqlite3VdbeAddOp2(v, OP_Integer, nCol, regStat+1);\n    assert( regRowid==regStat+2 );\n    sqlite3VdbeAddOp2(v, OP_Integer, pIdx->nKeyCol, regRowid);\n    sqlite3VdbeAddOp3(v, OP_Count, iIdxCur, regTemp,\n                      OptimizationDisabled(db, SQLITE_Stat4));\n    sqlite3VdbeAddFunctionCall(pParse, 0, regStat+1, regStat, 4,\n                               &statInitFuncdef, 0);\n    addrGotoEnd = sqlite3VdbeAddOp1(v, OP_Rewind, iIdxCur);\n    VdbeCoverage(v);\n\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, regChng);\n    addrNextRow = sqlite3VdbeCurrentAddr(v);\n\n    if( nColTest>0 ){\n      int endDistinctTest = sqlite3VdbeMakeLabel(pParse);\n      int *aGotoChng;               /* Array of jump instruction addresses */\n      aGotoChng = sqlite3DbMallocRawNN(db, sizeof(int)*nColTest);\n      if( aGotoChng==0 ) continue;\n\n      /*\n      **  next_row:\n      **   regChng = 0\n      **   if( idx(0) != regPrev(0) ) goto chng_addr_0\n      **   regChng = 1\n      **   if( idx(1) != regPrev(1) ) goto chng_addr_1\n      **   ...\n      **   regChng = N\n      **   goto endDistinctTest\n      */\n      sqlite3VdbeAddOp0(v, OP_Goto);\n      addrNextRow = sqlite3VdbeCurrentAddr(v);\n      if( nColTest==1 && pIdx->nKeyCol==1 && IsUniqueIndex(pIdx) ){\n        /* For a single-column UNIQUE index, once we have found a non-NULL\n        ** row, we know that all the rest will be distinct, so skip\n        ** subsequent distinctness tests. */\n        sqlite3VdbeAddOp2(v, OP_NotNull, regPrev, endDistinctTest);\n        VdbeCoverage(v);\n      }\n      for(i=0; i<nColTest; i++){\n        char *pColl = (char*)sqlite3LocateCollSeq(pParse, pIdx->azColl[i]);\n        sqlite3VdbeAddOp2(v, OP_Integer, i, regChng);\n        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regTemp);\n        analyzeVdbeCommentIndexWithColumnName(v,pIdx,i);\n        aGotoChng[i] =\n        sqlite3VdbeAddOp4(v, OP_Ne, regTemp, 0, regPrev+i, pColl, P4_COLLSEQ);\n        sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);\n        VdbeCoverage(v);\n      }\n      sqlite3VdbeAddOp2(v, OP_Integer, nColTest, regChng);\n      sqlite3VdbeGoto(v, endDistinctTest);\n\n\n      /*\n      **  chng_addr_0:\n      **   regPrev(0) = idx(0)\n      **  chng_addr_1:\n      **   regPrev(1) = idx(1)\n      **  ...\n      */\n      sqlite3VdbeJumpHere(v, addrNextRow-1);\n      for(i=0; i<nColTest; i++){\n        sqlite3VdbeJumpHere(v, aGotoChng[i]);\n        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regPrev+i);\n        analyzeVdbeCommentIndexWithColumnName(v,pIdx,i);\n      }\n      sqlite3VdbeResolveLabel(v, endDistinctTest);\n      sqlite3DbFree(db, aGotoChng);\n    }\n\n    /*\n    **  chng_addr_N:\n    **   regRowid = idx(rowid)            // STAT4 only\n    **   stat_push(P, regChng, regRowid)  // 3rd parameter STAT4 only\n    **   Next csr\n    **   if !eof(csr) goto next_row;\n    */\n#ifdef SQLITE_ENABLE_STAT4\n    if( OptimizationEnabled(db, SQLITE_Stat4) ){\n      assert( regRowid==(regStat+2) );\n      if( HasRowid(pTab) ){\n        sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, regRowid);\n      }else{\n        Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable);\n        int j, k, regKey;\n        regKey = sqlite3GetTempRange(pParse, pPk->nKeyCol);\n        for(j=0; j<pPk->nKeyCol; j++){\n          k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[j]);\n          assert( k>=0 && k<pIdx->nColumn );\n          sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, regKey+j);\n          analyzeVdbeCommentIndexWithColumnName(v,pIdx,k);\n        }\n        sqlite3VdbeAddOp3(v, OP_MakeRecord, regKey, pPk->nKeyCol, regRowid);\n        sqlite3ReleaseTempRange(pParse, regKey, pPk->nKeyCol);\n      }\n    }\n#endif\n    assert( regChng==(regStat+1) );\n    {\n      sqlite3VdbeAddFunctionCall(pParse, 1, regStat, regTemp, 2+IsStat4,\n                                 &statPushFuncdef, 0);\n      if( db->nAnalysisLimit ){\n        int j1, j2, j3;\n        j1 = sqlite3VdbeAddOp1(v, OP_IsNull, regTemp); VdbeCoverage(v);\n        j2 = sqlite3VdbeAddOp1(v, OP_If, regTemp); VdbeCoverage(v);\n        j3 = sqlite3VdbeAddOp4Int(v, OP_SeekGT, iIdxCur, 0, regPrev, 1);\n        VdbeCoverage(v);\n        sqlite3VdbeJumpHere(v, j1);\n        sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);\n        sqlite3VdbeJumpHere(v, j2);\n        sqlite3VdbeJumpHere(v, j3);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);\n      }\n    }\n\n    /* Add the entry to the stat1 table. */\n    if( pIdx->pPartIdxWhere ){\n      /* Partial indexes might get a zero-entry in sqlite_stat1.  But\n      ** an empty table is omitted from sqlite_stat1. */\n      sqlite3VdbeJumpHere(v, addrGotoEnd);\n      addrGotoEnd = 0;\n    }\n    callStatGet(pParse, regStat, STAT_GET_STAT1, regStat1);\n    assert( \"BBB\"[0]==SQLITE_AFF_TEXT );\n    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, \"BBB\", 0);\n    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);\n    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n    sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);\n#endif\n    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n\n    /* Add the entries to the stat4 table. */\n#ifdef SQLITE_ENABLE_STAT4\n    if( OptimizationEnabled(db, SQLITE_Stat4) && db->nAnalysisLimit==0 ){\n      int regEq = regStat1;\n      int regLt = regStat1+1;\n      int regDLt = regStat1+2;\n      int regSample = regStat1+3;\n      int regCol = regStat1+4;\n      int regSampleRowid = regCol + nCol;\n      int addrNext;\n      int addrIsNull;\n      u8 seekOp = HasRowid(pTab) ? OP_NotExists : OP_NotFound;\n\n      /* No STAT4 data is generated if the number of rows is zero */\n      if( addrGotoEnd==0 ){\n        sqlite3VdbeAddOp2(v, OP_Cast, regStat1, SQLITE_AFF_INTEGER);\n        addrGotoEnd = sqlite3VdbeAddOp1(v, OP_IfNot, regStat1);\n        VdbeCoverage(v);\n      }\n\n      if( doOnce ){\n        int mxCol = nCol;\n        Index *pX;\n\n        /* Compute the maximum number of columns in any index */\n        for(pX=pTab->pIndex; pX; pX=pX->pNext){\n          int nColX;                     /* Number of columns in pX */\n          if( !HasRowid(pTab) && IsPrimaryKeyIndex(pX) ){\n            nColX = pX->nKeyCol;\n          }else{\n            nColX = pX->nColumn;\n          }\n          if( nColX>mxCol ) mxCol = nColX;\n        }\n\n        /* Allocate space to compute results for the largest index */\n        sqlite3TouchRegister(pParse, regCol+mxCol);\n        doOnce = 0;\n#ifdef SQLITE_DEBUG\n        /* Verify that the call to sqlite3ClearTempRegCache() below\n        ** really is needed.\n        ** https://sqlite.org/forum/forumpost/83cb4a95a0 (2023-03-25)\n        */\n        testcase( !sqlite3NoTempsInRange(pParse, regEq, regCol+mxCol) );\n#endif\n        sqlite3ClearTempRegCache(pParse);  /* tag-20230325-1 */\n        assert( sqlite3NoTempsInRange(pParse, regEq, regCol+mxCol) );\n      }\n      assert( sqlite3NoTempsInRange(pParse, regEq, regCol+nCol) );\n\n      addrNext = sqlite3VdbeCurrentAddr(v);\n      callStatGet(pParse, regStat, STAT_GET_ROWID, regSampleRowid);\n      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regSampleRowid);\n      VdbeCoverage(v);\n      callStatGet(pParse, regStat, STAT_GET_NEQ, regEq);\n      callStatGet(pParse, regStat, STAT_GET_NLT, regLt);\n      callStatGet(pParse, regStat, STAT_GET_NDLT, regDLt);\n      sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);\n      VdbeCoverage(v);\n      for(i=0; i<nCol; i++){\n        sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, i, regCol+i);\n      }\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol, regSample);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);\n      sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid);\n      sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */\n      sqlite3VdbeJumpHere(v, addrIsNull);\n    }\n#endif /* SQLITE_ENABLE_STAT4 */\n\n    /* End of analysis */\n    if( addrGotoEnd ) sqlite3VdbeJumpHere(v, addrGotoEnd);\n  }\n\n\n  /* Create a single sqlite_stat1 entry containing NULL as the index\n  ** name and the row count as the content.\n  */\n  if( pOnlyIdx==0 && needTableCnt ){\n    VdbeComment((v, \"%s\", pTab->zName));\n    sqlite3VdbeAddOp2(v, OP_Count, iTabCur, regStat1);\n    jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, regStat1); VdbeCoverage(v);\n    sqlite3VdbeAddOp2(v, OP_Null, 0, regIdxname);\n    assert( \"BBB\"[0]==SQLITE_AFF_TEXT );\n    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, \"BBB\", 0);\n    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);\n    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);\n    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n    sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);\n#endif\n    sqlite3VdbeJumpHere(v, jZeroRows);\n  }\n}\n\n\n/*\n** Generate code that will cause the most recent index analysis to\n** be loaded into internal hash tables where is can be used.\n*/\nstatic void loadAnalysis(Parse *pParse, int iDb){\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  if( v ){\n    sqlite3VdbeAddOp1(v, OP_LoadAnalysis, iDb);\n  }\n}\n\n/*\n** Generate code that will do an analysis of an entire database\n*/\nstatic void analyzeDatabase(Parse *pParse, int iDb){\n  sqlite3 *db = pParse->db;\n  Schema *pSchema = db->aDb[iDb].pSchema;    /* Schema of database iDb */\n  HashElem *k;\n  int iStatCur;\n  int iMem;\n  int iTab;\n\n  sqlite3BeginWriteOperation(pParse, 0, iDb);\n  iStatCur = pParse->nTab;\n  pParse->nTab += 3;\n  openStatTable(pParse, iDb, iStatCur, 0, 0);\n  iMem = pParse->nMem+1;\n  iTab = pParse->nTab;\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){\n    Table *pTab = (Table*)sqliteHashData(k);\n    analyzeOneTable(pParse, pTab, 0, iStatCur, iMem, iTab);\n#ifdef SQLITE_ENABLE_STAT4\n    iMem = sqlite3FirstAvailableRegister(pParse, iMem);\n#else\n    assert( iMem==sqlite3FirstAvailableRegister(pParse,iMem) );\n#endif\n  }\n  loadAnalysis(pParse, iDb);\n}\n\n/*\n** Generate code that will do an analysis of a single table in\n** a database.  If pOnlyIdx is not NULL then it is a single index\n** in pTab that should be analyzed.\n*/\nstatic void analyzeTable(Parse *pParse, Table *pTab, Index *pOnlyIdx){\n  int iDb;\n  int iStatCur;\n\n  assert( pTab!=0 );\n  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );\n  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n  sqlite3BeginWriteOperation(pParse, 0, iDb);\n  iStatCur = pParse->nTab;\n  pParse->nTab += 3;\n  if( pOnlyIdx ){\n    openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, \"idx\");\n  }else{\n    openStatTable(pParse, iDb, iStatCur, pTab->zName, \"tbl\");\n  }\n  analyzeOneTable(pParse, pTab, pOnlyIdx, iStatCur,pParse->nMem+1,pParse->nTab);\n  loadAnalysis(pParse, iDb);\n}\n\n/*\n** Generate code for the ANALYZE command.  The parser calls this routine\n** when it recognizes an ANALYZE command.\n**\n**        ANALYZE                            -- 1\n**        ANALYZE  <database>                -- 2\n**        ANALYZE  ?<database>.?<tablename>  -- 3\n**\n** Form 1 causes all indices in all attached databases to be analyzed.\n** Form 2 analyzes all indices the single database named.\n** Form 3 analyzes all indices associated with the named table.\n*/\nSQLITE_PRIVATE void sqlite3Analyze(Parse *pParse, Token *pName1, Token *pName2){\n  sqlite3 *db = pParse->db;\n  int iDb;\n  int i;\n  char *z, *zDb;\n  Table *pTab;\n  Index *pIdx;\n  Token *pTableName;\n  Vdbe *v;\n\n  /* Read the database schema. If an error occurs, leave an error message\n  ** and code in pParse and return NULL. */\n  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n    return;\n  }\n\n  assert( pName2!=0 || pName1==0 );\n  if( pName1==0 ){\n    /* Form 1:  Analyze everything */\n    for(i=0; i<db->nDb; i++){\n      if( i==1 ) continue;  /* Do not analyze the TEMP database */\n      analyzeDatabase(pParse, i);\n    }\n  }else if( pName2->n==0 && (iDb = sqlite3FindDb(db, pName1))>=0 ){\n    /* Analyze the schema named as the argument */\n    analyzeDatabase(pParse, iDb);\n  }else{\n    /* Form 3: Analyze the table or index named as an argument */\n    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pTableName);\n    if( iDb>=0 ){\n      zDb = pName2->n ? db->aDb[iDb].zDbSName : 0;\n      z = sqlite3NameFromToken(db, pTableName);\n      if( z ){\n        if( (pIdx = sqlite3FindIndex(db, z, zDb))!=0 ){\n          analyzeTable(pParse, pIdx->pTable, pIdx);\n        }else if( (pTab = sqlite3LocateTable(pParse, 0, z, zDb))!=0 ){\n          analyzeTable(pParse, pTab, 0);\n        }\n        sqlite3DbFree(db, z);\n      }\n    }\n  }\n  if( db->nSqlExec==0 && (v = sqlite3GetVdbe(pParse))!=0 ){\n    sqlite3VdbeAddOp0(v, OP_Expire);\n  }\n}\n\n/*\n** Used to pass information from the analyzer reader through to the\n** callback routine.\n*/\ntypedef struct analysisInfo analysisInfo;\nstruct analysisInfo {\n  sqlite3 *db;\n  const char *zDatabase;\n};\n\n/*\n** The first argument points to a nul-terminated string containing a\n** list of space separated integers. Read the first nOut of these into\n** the array aOut[].\n*/\nstatic void decodeIntArray(\n  char *zIntArray,       /* String containing int array to decode */\n  int nOut,              /* Number of slots in aOut[] */\n  tRowcnt *aOut,         /* Store integers here */\n  LogEst *aLog,          /* Or, if aOut==0, here */\n  Index *pIndex          /* Handle extra flags for this index, if not NULL */\n){\n  char *z = zIntArray;\n  int c;\n  int i;\n  tRowcnt v;\n\n#ifdef SQLITE_ENABLE_STAT4\n  if( z==0 ) z = \"\";\n#else\n  assert( z!=0 );\n#endif\n  for(i=0; *z && i<nOut; i++){\n    v = 0;\n    while( (c=z[0])>='0' && c<='9' ){\n      v = v*10 + c - '0';\n      z++;\n    }\n#ifdef SQLITE_ENABLE_STAT4\n    if( aOut ) aOut[i] = v;\n    if( aLog ) aLog[i] = sqlite3LogEst(v);\n#else\n    assert( aOut==0 );\n    UNUSED_PARAMETER(aOut);\n    assert( aLog!=0 );\n    aLog[i] = sqlite3LogEst(v);\n#endif\n    if( *z==' ' ) z++;\n  }\n#ifndef SQLITE_ENABLE_STAT4\n  assert( pIndex!=0 ); {\n#else\n  if( pIndex ){\n#endif\n    pIndex->bUnordered = 0;\n    pIndex->noSkipScan = 0;\n    while( z[0] ){\n      if( sqlite3_strglob(\"unordered*\", z)==0 ){\n        pIndex->bUnordered = 1;\n      }else if( sqlite3_strglob(\"sz=[0-9]*\", z)==0 ){\n        int sz = sqlite3Atoi(z+3);\n        if( sz<2 ) sz = 2;\n        pIndex->szIdxRow = sqlite3LogEst(sz);\n      }else if( sqlite3_strglob(\"noskipscan*\", z)==0 ){\n        pIndex->noSkipScan = 1;\n      }\n#ifdef SQLITE_ENABLE_COSTMULT\n      else if( sqlite3_strglob(\"costmult=[0-9]*\",z)==0 ){\n        pIndex->pTable->costMult = sqlite3LogEst(sqlite3Atoi(z+9));\n      }\n#endif\n      while( z[0]!=0 && z[0]!=' ' ) z++;\n      while( z[0]==' ' ) z++;\n    }\n  }\n}\n\n/*\n** This callback is invoked once for each index when reading the\n** sqlite_stat1 table.\n**\n**     argv[0] = name of the table\n**     argv[1] = name of the index (might be NULL)\n**     argv[2] = results of analysis - on integer for each column\n**\n** Entries for which argv[1]==NULL simply record the number of rows in\n** the table.\n*/\nstatic int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){\n  analysisInfo *pInfo = (analysisInfo*)pData;\n  Index *pIndex;\n  Table *pTable;\n  const char *z;\n\n  assert( argc==3 );\n  UNUSED_PARAMETER2(NotUsed, argc);\n\n  if( argv==0 || argv[0]==0 || argv[2]==0 ){\n    return 0;\n  }\n  pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);\n  if( pTable==0 ){\n    return 0;\n  }\n  if( argv[1]==0 ){\n    pIndex = 0;\n  }else if( sqlite3_stricmp(argv[0],argv[1])==0 ){\n    pIndex = sqlite3PrimaryKeyIndex(pTable);\n  }else{\n    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);\n  }\n  z = argv[2];\n\n  if( pIndex ){\n    tRowcnt *aiRowEst = 0;\n    int nCol = pIndex->nKeyCol+1;\n#ifdef SQLITE_ENABLE_STAT4\n    /* Index.aiRowEst may already be set here if there are duplicate\n    ** sqlite_stat1 entries for this index. In that case just clobber\n    ** the old data with the new instead of allocating a new array.  */\n    if( pIndex->aiRowEst==0 ){\n      pIndex->aiRowEst = (tRowcnt*)sqlite3MallocZero(sizeof(tRowcnt) * nCol);\n      if( pIndex->aiRowEst==0 ) sqlite3OomFault(pInfo->db);\n    }\n    aiRowEst = pIndex->aiRowEst;\n#endif\n    pIndex->bUnordered = 0;\n    decodeIntArray((char*)z, nCol, aiRowEst, pIndex->aiRowLogEst, pIndex);\n    pIndex->hasStat1 = 1;\n    if( pIndex->pPartIdxWhere==0 ){\n      pTable->nRowLogEst = pIndex->aiRowLogEst[0];\n      pTable->tabFlags |= TF_HasStat1;\n    }\n  }else{\n    Index fakeIdx;\n    fakeIdx.szIdxRow = pTable->szTabRow;\n#ifdef SQLITE_ENABLE_COSTMULT\n    fakeIdx.pTable = pTable;\n#endif\n    decodeIntArray((char*)z, 1, 0, &pTable->nRowLogEst, &fakeIdx);\n    pTable->szTabRow = fakeIdx.szIdxRow;\n    pTable->tabFlags |= TF_HasStat1;\n  }\n\n  return 0;\n}\n\n/*\n** If the Index.aSample variable is not NULL, delete the aSample[] array\n** and its contents.\n*/\nSQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){\n  assert( db!=0 );\n  assert( pIdx!=0 );\n#ifdef SQLITE_ENABLE_STAT4\n  if( pIdx->aSample ){\n    int j;\n    for(j=0; j<pIdx->nSample; j++){\n      IndexSample *p = &pIdx->aSample[j];\n      sqlite3DbFree(db, p->p);\n    }\n    sqlite3DbFree(db, pIdx->aSample);\n  }\n  if( db->pnBytesFreed==0 ){\n    pIdx->nSample = 0;\n    pIdx->aSample = 0;\n  }\n#else\n  UNUSED_PARAMETER(db);\n  UNUSED_PARAMETER(pIdx);\n#endif /* SQLITE_ENABLE_STAT4 */\n}\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Populate the pIdx->aAvgEq[] array based on the samples currently\n** stored in pIdx->aSample[].\n*/\nstatic void initAvgEq(Index *pIdx){\n  if( pIdx ){\n    IndexSample *aSample = pIdx->aSample;\n    IndexSample *pFinal = &aSample[pIdx->nSample-1];\n    int iCol;\n    int nCol = 1;\n    if( pIdx->nSampleCol>1 ){\n      /* If this is stat4 data, then calculate aAvgEq[] values for all\n      ** sample columns except the last. The last is always set to 1, as\n      ** once the trailing PK fields are considered all index keys are\n      ** unique.  */\n      nCol = pIdx->nSampleCol-1;\n      pIdx->aAvgEq[nCol] = 1;\n    }\n    for(iCol=0; iCol<nCol; iCol++){\n      int nSample = pIdx->nSample;\n      int i;                    /* Used to iterate through samples */\n      tRowcnt sumEq = 0;        /* Sum of the nEq values */\n      tRowcnt avgEq = 0;\n      tRowcnt nRow;             /* Number of rows in index */\n      i64 nSum100 = 0;          /* Number of terms contributing to sumEq */\n      i64 nDist100;             /* Number of distinct values in index */\n\n      if( !pIdx->aiRowEst || iCol>=pIdx->nKeyCol || pIdx->aiRowEst[iCol+1]==0 ){\n        nRow = pFinal->anLt[iCol];\n        nDist100 = (i64)100 * pFinal->anDLt[iCol];\n        nSample--;\n      }else{\n        nRow = pIdx->aiRowEst[0];\n        nDist100 = ((i64)100 * pIdx->aiRowEst[0]) / pIdx->aiRowEst[iCol+1];\n      }\n      pIdx->nRowEst0 = nRow;\n\n      /* Set nSum to the number of distinct (iCol+1) field prefixes that\n      ** occur in the stat4 table for this index. Set sumEq to the sum of\n      ** the nEq values for column iCol for the same set (adding the value\n      ** only once where there exist duplicate prefixes).  */\n      for(i=0; i<nSample; i++){\n        if( i==(pIdx->nSample-1)\n         || aSample[i].anDLt[iCol]!=aSample[i+1].anDLt[iCol]\n        ){\n          sumEq += aSample[i].anEq[iCol];\n          nSum100 += 100;\n        }\n      }\n\n      if( nDist100>nSum100 && sumEq<nRow ){\n        avgEq = ((i64)100 * (nRow - sumEq))/(nDist100 - nSum100);\n      }\n      if( avgEq==0 ) avgEq = 1;\n      pIdx->aAvgEq[iCol] = avgEq;\n    }\n  }\n}\n\n/*\n** Look up an index by name.  Or, if the name of a WITHOUT ROWID table\n** is supplied instead, find the PRIMARY KEY index for that table.\n*/\nstatic Index *findIndexOrPrimaryKey(\n  sqlite3 *db,\n  const char *zName,\n  const char *zDb\n){\n  Index *pIdx = sqlite3FindIndex(db, zName, zDb);\n  if( pIdx==0 ){\n    Table *pTab = sqlite3FindTable(db, zName, zDb);\n    if( pTab && !HasRowid(pTab) ) pIdx = sqlite3PrimaryKeyIndex(pTab);\n  }\n  return pIdx;\n}\n\n/*\n** Load the content from either the sqlite_stat4\n** into the relevant Index.aSample[] arrays.\n**\n** Arguments zSql1 and zSql2 must point to SQL statements that return\n** data equivalent to the following:\n**\n**    zSql1: SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\n**    zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\n**\n** where %Q is replaced with the database name before the SQL is executed.\n*/\nstatic int loadStatTbl(\n  sqlite3 *db,                  /* Database handle */\n  const char *zSql1,            /* SQL statement 1 (see above) */\n  const char *zSql2,            /* SQL statement 2 (see above) */\n  const char *zDb               /* Database name (e.g. \"main\") */\n){\n  int rc;                       /* Result codes from subroutines */\n  sqlite3_stmt *pStmt = 0;      /* An SQL statement being run */\n  char *zSql;                   /* Text of the SQL statement */\n  Index *pPrevIdx = 0;          /* Previous index in the loop */\n  IndexSample *pSample;         /* A slot in pIdx->aSample[] */\n\n  assert( db->lookaside.bDisable );\n  zSql = sqlite3MPrintf(db, zSql1, zDb);\n  if( !zSql ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);\n  sqlite3DbFree(db, zSql);\n  if( rc ) return rc;\n\n  while( sqlite3_step(pStmt)==SQLITE_ROW ){\n    int nIdxCol = 1;              /* Number of columns in stat4 records */\n\n    char *zIndex;    /* Index name */\n    Index *pIdx;     /* Pointer to the index object */\n    int nSample;     /* Number of samples */\n    i64 nByte;       /* Bytes of space required */\n    i64 i;           /* Bytes of space required */\n    tRowcnt *pSpace; /* Available allocated memory space */\n    u8 *pPtr;        /* Available memory as a u8 for easier manipulation */\n\n    zIndex = (char *)sqlite3_column_text(pStmt, 0);\n    if( zIndex==0 ) continue;\n    nSample = sqlite3_column_int(pStmt, 1);\n    pIdx = findIndexOrPrimaryKey(db, zIndex, zDb);\n    assert( pIdx==0 || pIdx->nSample==0 );\n    if( pIdx==0 ) continue;\n    if( pIdx->aSample!=0 ){\n      /* The same index appears in sqlite_stat4 under multiple names */\n      continue;\n    }\n    assert( !HasRowid(pIdx->pTable) || pIdx->nColumn==pIdx->nKeyCol+1 );\n    if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){\n      nIdxCol = pIdx->nKeyCol;\n    }else{\n      nIdxCol = pIdx->nColumn;\n    }\n    pIdx->nSampleCol = nIdxCol;\n    pIdx->mxSample = nSample;\n    nByte = ROUND8(sizeof(IndexSample) * nSample);\n    nByte += sizeof(tRowcnt) * nIdxCol * 3 * nSample;\n    nByte += nIdxCol * sizeof(tRowcnt);     /* Space for Index.aAvgEq[] */\n\n    pIdx->aSample = sqlite3DbMallocZero(db, nByte);\n    if( pIdx->aSample==0 ){\n      sqlite3_finalize(pStmt);\n      return SQLITE_NOMEM_BKPT;\n    }\n    pPtr = (u8*)pIdx->aSample;\n    pPtr += ROUND8(nSample*sizeof(pIdx->aSample[0]));\n    pSpace = (tRowcnt*)pPtr;\n    assert( EIGHT_BYTE_ALIGNMENT( pSpace ) );\n    pIdx->aAvgEq = pSpace; pSpace += nIdxCol;\n    pIdx->pTable->tabFlags |= TF_HasStat4;\n    for(i=0; i<nSample; i++){\n      pIdx->aSample[i].anEq = pSpace; pSpace += nIdxCol;\n      pIdx->aSample[i].anLt = pSpace; pSpace += nIdxCol;\n      pIdx->aSample[i].anDLt = pSpace; pSpace += nIdxCol;\n    }\n    assert( ((u8*)pSpace)-nByte==(u8*)(pIdx->aSample) );\n  }\n  rc = sqlite3_finalize(pStmt);\n  if( rc ) return rc;\n\n  zSql = sqlite3MPrintf(db, zSql2, zDb);\n  if( !zSql ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);\n  sqlite3DbFree(db, zSql);\n  if( rc ) return rc;\n\n  while( sqlite3_step(pStmt)==SQLITE_ROW ){\n    char *zIndex;                 /* Index name */\n    Index *pIdx;                  /* Pointer to the index object */\n    int nCol = 1;                 /* Number of columns in index */\n\n    zIndex = (char *)sqlite3_column_text(pStmt, 0);\n    if( zIndex==0 ) continue;\n    pIdx = findIndexOrPrimaryKey(db, zIndex, zDb);\n    if( pIdx==0 ) continue;\n    if( pIdx->nSample>=pIdx->mxSample ){\n      /* Too many slots used because the same index appears in\n      ** sqlite_stat4 using multiple names */\n      continue;\n    }\n    /* This next condition is true if data has already been loaded from\n    ** the sqlite_stat4 table. */\n    nCol = pIdx->nSampleCol;\n    if( pIdx!=pPrevIdx ){\n      initAvgEq(pPrevIdx);\n      pPrevIdx = pIdx;\n    }\n    pSample = &pIdx->aSample[pIdx->nSample];\n    decodeIntArray((char*)sqlite3_column_text(pStmt,1),nCol,pSample->anEq,0,0);\n    decodeIntArray((char*)sqlite3_column_text(pStmt,2),nCol,pSample->anLt,0,0);\n    decodeIntArray((char*)sqlite3_column_text(pStmt,3),nCol,pSample->anDLt,0,0);\n\n    /* Take a copy of the sample. Add 8 extra 0x00 bytes the end of the buffer.\n    ** This is in case the sample record is corrupted. In that case, the\n    ** sqlite3VdbeRecordCompare() may read up to two varints past the\n    ** end of the allocated buffer before it realizes it is dealing with\n    ** a corrupt record.  Or it might try to read a large integer from the\n    ** buffer.  In any case, eight 0x00 bytes prevents this from causing\n    ** a buffer overread.  */\n    pSample->n = sqlite3_column_bytes(pStmt, 4);\n    pSample->p = sqlite3DbMallocZero(db, pSample->n + 8);\n    if( pSample->p==0 ){\n      sqlite3_finalize(pStmt);\n      return SQLITE_NOMEM_BKPT;\n    }\n    if( pSample->n ){\n      memcpy(pSample->p, sqlite3_column_blob(pStmt, 4), pSample->n);\n    }\n    pIdx->nSample++;\n  }\n  rc = sqlite3_finalize(pStmt);\n  if( rc==SQLITE_OK ) initAvgEq(pPrevIdx);\n  return rc;\n}\n\n/*\n** Load content from the sqlite_stat4 table into\n** the Index.aSample[] arrays of all indices.\n*/\nstatic int loadStat4(sqlite3 *db, const char *zDb){\n  int rc = SQLITE_OK;             /* Result codes from subroutines */\n  const Table *pStat4;\n\n  assert( db->lookaside.bDisable );\n  if( OptimizationEnabled(db, SQLITE_Stat4)\n   && (pStat4 = sqlite3FindTable(db, \"sqlite_stat4\", zDb))!=0\n   && IsOrdinaryTable(pStat4)\n  ){\n    rc = loadStatTbl(db,\n      \"SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx COLLATE nocase\",\n      \"SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\",\n      zDb\n    );\n  }\n  return rc;\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n/*\n** Load the content of the sqlite_stat1 and sqlite_stat4 tables. The\n** contents of sqlite_stat1 are used to populate the Index.aiRowEst[]\n** arrays. The contents of sqlite_stat4 are used to populate the\n** Index.aSample[] arrays.\n**\n** If the sqlite_stat1 table is not present in the database, SQLITE_ERROR\n** is returned. In this case, even if SQLITE_ENABLE_STAT4 was defined\n** during compilation and the sqlite_stat4 table is present, no data is\n** read from it.\n**\n** If SQLITE_ENABLE_STAT4 was defined during compilation and the\n** sqlite_stat4 table is not present in the database, SQLITE_ERROR is\n** returned. However, in this case, data is read from the sqlite_stat1\n** table (if it is present) before returning.\n**\n** If an OOM error occurs, this function always sets db->mallocFailed.\n** This means if the caller does not care about other errors, the return\n** code may be ignored.\n*/\nSQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){\n  analysisInfo sInfo;\n  HashElem *i;\n  char *zSql;\n  int rc = SQLITE_OK;\n  Schema *pSchema = db->aDb[iDb].pSchema;\n  const Table *pStat1;\n\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( db->aDb[iDb].pBt!=0 );\n\n  /* Clear any prior statistics */\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  for(i=sqliteHashFirst(&pSchema->tblHash); i; i=sqliteHashNext(i)){\n    Table *pTab = sqliteHashData(i);\n    pTab->tabFlags &= ~TF_HasStat1;\n  }\n  for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){\n    Index *pIdx = sqliteHashData(i);\n    pIdx->hasStat1 = 0;\n#ifdef SQLITE_ENABLE_STAT4\n    sqlite3DeleteIndexSamples(db, pIdx);\n    pIdx->aSample = 0;\n#endif\n  }\n\n  /* Load new statistics out of the sqlite_stat1 table */\n  sInfo.db = db;\n  sInfo.zDatabase = db->aDb[iDb].zDbSName;\n  if( (pStat1 = sqlite3FindTable(db, \"sqlite_stat1\", sInfo.zDatabase))\n   && IsOrdinaryTable(pStat1)\n  ){\n    zSql = sqlite3MPrintf(db,\n        \"SELECT tbl,idx,stat FROM %Q.sqlite_stat1\", sInfo.zDatabase);\n    if( zSql==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n    }else{\n      rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0);\n      sqlite3DbFree(db, zSql);\n    }\n  }\n\n  /* Set appropriate defaults on all indexes not in the sqlite_stat1 table */\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){\n    Index *pIdx = sqliteHashData(i);\n    if( !pIdx->hasStat1 ) sqlite3DefaultRowEst(pIdx);\n  }\n\n  /* Load the statistics from the sqlite_stat4 table. */\n#ifdef SQLITE_ENABLE_STAT4\n  if( rc==SQLITE_OK ){\n    DisableLookaside;\n    rc = loadStat4(db, sInfo.zDatabase);\n    EnableLookaside;\n  }\n  for(i=sqliteHashFirst(&pSchema->idxHash); i; i=sqliteHashNext(i)){\n    Index *pIdx = sqliteHashData(i);\n    sqlite3_free(pIdx->aiRowEst);\n    pIdx->aiRowEst = 0;\n  }\n#endif\n\n  if( rc==SQLITE_NOMEM ){\n    sqlite3OomFault(db);\n  }\n  return rc;\n}\n\n\n#endif /* SQLITE_OMIT_ANALYZE */\n\n/************** End of analyze.c *********************************************/\n/************** Begin file attach.c ******************************************/\n/*\n** 2003 April 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to implement the ATTACH and DETACH commands.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_ATTACH\n/*\n** Resolve an expression that was part of an ATTACH or DETACH statement. This\n** is slightly different from resolving a normal SQL expression, because simple\n** identifiers are treated as strings, not possible column names or aliases.\n**\n** i.e. if the parser sees:\n**\n**     ATTACH DATABASE abc AS def\n**\n** it treats the two expressions as literal strings 'abc' and 'def' instead of\n** looking for columns of the same name.\n**\n** This only applies to the root node of pExpr, so the statement:\n**\n**     ATTACH DATABASE abc||def AS 'db2'\n**\n** will fail because neither abc or def can be resolved.\n*/\nstatic int resolveAttachExpr(NameContext *pName, Expr *pExpr)\n{\n  int rc = SQLITE_OK;\n  if( pExpr ){\n    if( pExpr->op!=TK_ID ){\n      rc = sqlite3ResolveExprNames(pName, pExpr);\n    }else{\n      pExpr->op = TK_STRING;\n    }\n  }\n  return rc;\n}\n\n/*\n** Return true if zName points to a name that may be used to refer to\n** database iDb attached to handle db.\n*/\nSQLITE_PRIVATE int sqlite3DbIsNamed(sqlite3 *db, int iDb, const char *zName){\n  return (\n      sqlite3StrICmp(db->aDb[iDb].zDbSName, zName)==0\n   || (iDb==0 && sqlite3StrICmp(\"main\", zName)==0)\n  );\n}\n\n/*\n** An SQL user-function registered to do the work of an ATTACH statement. The\n** three arguments to the function come directly from an attach statement:\n**\n**     ATTACH DATABASE x AS y KEY z\n**\n**     SELECT sqlite_attach(x, y, z)\n**\n** If the optional \"KEY z\" syntax is omitted, an SQL NULL is passed as the\n** third argument.\n**\n** If the db->init.reopenMemdb flags is set, then instead of attaching a\n** new database, close the database on db->init.iDb and reopen it as an\n** empty MemDB.\n*/\nstatic void attachFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  int i;\n  int rc = 0;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  const char *zName;\n  const char *zFile;\n  char *zPath = 0;\n  char *zErr = 0;\n  unsigned int flags;\n  Db *aNew;                 /* New array of Db pointers */\n  Db *pNew = 0;             /* Db object for the newly attached database */\n  char *zErrDyn = 0;\n  sqlite3_vfs *pVfs;\n\n  UNUSED_PARAMETER(NotUsed);\n  zFile = (const char *)sqlite3_value_text(argv[0]);\n  zName = (const char *)sqlite3_value_text(argv[1]);\n  if( zFile==0 ) zFile = \"\";\n  if( zName==0 ) zName = \"\";\n\n#ifndef SQLITE_OMIT_DESERIALIZE\n# define REOPEN_AS_MEMDB(db)  (db->init.reopenMemdb)\n#else\n# define REOPEN_AS_MEMDB(db)  (0)\n#endif\n\n  if( REOPEN_AS_MEMDB(db) ){\n    /* This is not a real ATTACH.  Instead, this routine is being called\n    ** from sqlite3_deserialize() to close database db->init.iDb and\n    ** reopen it as a MemDB */\n    Btree *pNewBt = 0;\n    pVfs = sqlite3_vfs_find(\"memdb\");\n    if( pVfs==0 ) return;\n    rc = sqlite3BtreeOpen(pVfs, \"x\\0\", db, &pNewBt, 0, SQLITE_OPEN_MAIN_DB);\n    if( rc==SQLITE_OK ){\n      Schema *pNewSchema = sqlite3SchemaGet(db, pNewBt);\n      if( pNewSchema ){\n        /* Both the Btree and the new Schema were allocated successfully.\n        ** Close the old db and update the aDb[] slot with the new memdb\n        ** values.  */\n        pNew = &db->aDb[db->init.iDb];\n        if( ALWAYS(pNew->pBt) ) sqlite3BtreeClose(pNew->pBt);\n        pNew->pBt = pNewBt;\n        pNew->pSchema = pNewSchema;\n      }else{\n        sqlite3BtreeClose(pNewBt);\n        rc = SQLITE_NOMEM;\n      }\n    }\n    if( rc ) goto attach_error;\n  }else{\n    /* This is a real ATTACH\n    **\n    ** Check for the following errors:\n    **\n    **     * Too many attached databases,\n    **     * Transaction currently open\n    **     * Specified database name already being used.\n    */\n    if( db->nDb>=db->aLimit[SQLITE_LIMIT_ATTACHED]+2 ){\n      zErrDyn = sqlite3MPrintf(db, \"too many attached databases - max %d\",\n        db->aLimit[SQLITE_LIMIT_ATTACHED]\n      );\n      goto attach_error;\n    }\n    for(i=0; i<db->nDb; i++){\n      assert( zName );\n      if( sqlite3DbIsNamed(db, i, zName) ){\n        zErrDyn = sqlite3MPrintf(db, \"database %s is already in use\", zName);\n        goto attach_error;\n      }\n    }\n\n    /* Allocate the new entry in the db->aDb[] array and initialize the schema\n    ** hash tables.\n    */\n    if( db->aDb==db->aDbStatic ){\n      aNew = sqlite3DbMallocRawNN(db, sizeof(db->aDb[0])*3 );\n      if( aNew==0 ) return;\n      memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2);\n    }else{\n      aNew = sqlite3DbRealloc(db, db->aDb, sizeof(db->aDb[0])*(1+(i64)db->nDb));\n      if( aNew==0 ) return;\n    }\n    db->aDb = aNew;\n    pNew = &db->aDb[db->nDb];\n    memset(pNew, 0, sizeof(*pNew));\n\n    /* Open the database file. If the btree is successfully opened, use\n    ** it to obtain the database schema. At this point the schema may\n    ** or may not be initialized.\n    */\n    flags = db->openFlags;\n    rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr);\n    if( rc!=SQLITE_OK ){\n      if( rc==SQLITE_NOMEM ) sqlite3OomFault(db);\n      sqlite3_result_error(context, zErr, -1);\n      sqlite3_free(zErr);\n      return;\n    }\n    if( (db->flags & SQLITE_AttachWrite)==0 ){\n      flags &= ~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE);\n      flags |= SQLITE_OPEN_READONLY;\n    }else if( (db->flags & SQLITE_AttachCreate)==0 ){\n      flags &= ~SQLITE_OPEN_CREATE;\n    }\n    assert( pVfs );\n    flags |= SQLITE_OPEN_MAIN_DB;\n    rc = sqlite3BtreeOpen(pVfs, zPath, db, &pNew->pBt, 0, flags);\n    db->nDb++;\n    pNew->zDbSName = sqlite3DbStrDup(db, zName);\n  }\n  db->noSharedCache = 0;\n  if( rc==SQLITE_CONSTRAINT ){\n    rc = SQLITE_ERROR;\n    zErrDyn = sqlite3MPrintf(db, \"database is already attached\");\n  }else if( rc==SQLITE_OK ){\n    Pager *pPager;\n    pNew->pSchema = sqlite3SchemaGet(db, pNew->pBt);\n    if( !pNew->pSchema ){\n      rc = SQLITE_NOMEM_BKPT;\n    }else if( pNew->pSchema->file_format && pNew->pSchema->enc!=ENC(db) ){\n      zErrDyn = sqlite3MPrintf(db,\n        \"attached databases must use the same text encoding as main database\");\n      rc = SQLITE_ERROR;\n    }\n    sqlite3BtreeEnter(pNew->pBt);\n    pPager = sqlite3BtreePager(pNew->pBt);\n    sqlite3PagerLockingMode(pPager, db->dfltLockMode);\n    sqlite3BtreeSecureDelete(pNew->pBt,\n                             sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) );\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\n    sqlite3BtreeSetPagerFlags(pNew->pBt,\n                      PAGER_SYNCHRONOUS_FULL | (db->flags & PAGER_FLAGS_MASK));\n#endif\n    sqlite3BtreeLeave(pNew->pBt);\n  }\n  pNew->safety_level = SQLITE_DEFAULT_SYNCHRONOUS+1;\n  if( rc==SQLITE_OK && pNew->zDbSName==0 ){\n    rc = SQLITE_NOMEM_BKPT;\n  }\n  sqlite3_free_filename( zPath );\n\n  /* If the file was opened successfully, read the schema for the new database.\n  ** If this fails, or if opening the file failed, then close the file and\n  ** remove the entry from the db->aDb[] array. i.e. put everything back the\n  ** way we found it.\n  */\n  if( rc==SQLITE_OK ){\n    sqlite3BtreeEnterAll(db);\n    db->init.iDb = 0;\n    db->mDbFlags &= ~(DBFLAG_SchemaKnownOk);\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    if( db->setlkFlags & SQLITE_SETLK_BLOCK_ON_CONNECT ){\n      int val = 1;\n      sqlite3_file *fd = sqlite3PagerFile(sqlite3BtreePager(pNew->pBt));\n      sqlite3OsFileControlHint(fd, SQLITE_FCNTL_BLOCK_ON_CONNECT, &val);\n    }\n#endif\n    if( !REOPEN_AS_MEMDB(db) ){\n      rc = sqlite3Init(db, &zErrDyn);\n    }\n    sqlite3BtreeLeaveAll(db);\n    assert( zErrDyn==0 || rc!=SQLITE_OK );\n  }\n  if( rc ){\n    if( ALWAYS(!REOPEN_AS_MEMDB(db)) ){\n      int iDb = db->nDb - 1;\n      assert( iDb>=2 );\n      if( db->aDb[iDb].pBt ){\n        sqlite3BtreeClose(db->aDb[iDb].pBt);\n        db->aDb[iDb].pBt = 0;\n        db->aDb[iDb].pSchema = 0;\n      }\n      sqlite3ResetAllSchemasOfConnection(db);\n      db->nDb = iDb;\n      if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){\n        sqlite3OomFault(db);\n        sqlite3DbFree(db, zErrDyn);\n        zErrDyn = sqlite3MPrintf(db, \"out of memory\");\n      }else if( zErrDyn==0 ){\n        zErrDyn = sqlite3MPrintf(db, \"unable to open database: %s\", zFile);\n      }\n    }\n    goto attach_error;\n  }\n\n  return;\n\nattach_error:\n  /* Return an error if we get here */\n  if( zErrDyn ){\n    sqlite3_result_error(context, zErrDyn, -1);\n    sqlite3DbFree(db, zErrDyn);\n  }\n  if( rc ) sqlite3_result_error_code(context, rc);\n}\n\n/*\n** An SQL user-function registered to do the work of an DETACH statement. The\n** three arguments to the function come directly from a detach statement:\n**\n**     DETACH DATABASE x\n**\n**     SELECT sqlite_detach(x)\n*/\nstatic void detachFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  const char *zName = (const char *)sqlite3_value_text(argv[0]);\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  int i;\n  Db *pDb = 0;\n  HashElem *pEntry;\n  char zErr[128];\n\n  UNUSED_PARAMETER(NotUsed);\n\n  if( zName==0 ) zName = \"\";\n  for(i=0; i<db->nDb; i++){\n    pDb = &db->aDb[i];\n    if( pDb->pBt==0 ) continue;\n    if( sqlite3DbIsNamed(db, i, zName) ) break;\n  }\n\n  if( i>=db->nDb ){\n    sqlite3_snprintf(sizeof(zErr),zErr, \"no such database: %s\", zName);\n    goto detach_error;\n  }\n  if( i<2 ){\n    sqlite3_snprintf(sizeof(zErr),zErr, \"cannot detach database %s\", zName);\n    goto detach_error;\n  }\n  if( sqlite3BtreeTxnState(pDb->pBt)!=SQLITE_TXN_NONE\n   || sqlite3BtreeIsInBackup(pDb->pBt)\n  ){\n    sqlite3_snprintf(sizeof(zErr),zErr, \"database %s is locked\", zName);\n    goto detach_error;\n  }\n\n  /* If any TEMP triggers reference the schema being detached, move those\n  ** triggers to reference the TEMP schema itself. */\n  assert( db->aDb[1].pSchema );\n  pEntry = sqliteHashFirst(&db->aDb[1].pSchema->trigHash);\n  while( pEntry ){\n    Trigger *pTrig = (Trigger*)sqliteHashData(pEntry);\n    if( pTrig->pTabSchema==pDb->pSchema ){\n      pTrig->pTabSchema = pTrig->pSchema;\n    }\n    pEntry = sqliteHashNext(pEntry);\n  }\n\n  sqlite3BtreeClose(pDb->pBt);\n  pDb->pBt = 0;\n  pDb->pSchema = 0;\n  sqlite3CollapseDatabaseArray(db);\n  return;\n\ndetach_error:\n  sqlite3_result_error(context, zErr, -1);\n}\n\n/*\n** This procedure generates VDBE code for a single invocation of either the\n** sqlite_detach() or sqlite_attach() SQL user functions.\n*/\nstatic void codeAttach(\n  Parse *pParse,       /* The parser context */\n  int type,            /* Either SQLITE_ATTACH or SQLITE_DETACH */\n  FuncDef const *pFunc,/* FuncDef wrapper for detachFunc() or attachFunc() */\n  Expr *pAuthArg,      /* Expression to pass to authorization callback */\n  Expr *pFilename,     /* Name of database file */\n  Expr *pDbname,       /* Name of the database to use internally */\n  Expr *pKey           /* Database key for encryption extension */\n){\n  int rc;\n  NameContext sName;\n  Vdbe *v;\n  sqlite3* db = pParse->db;\n  int regArgs;\n\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ) goto attach_end;\n\n  if( pParse->nErr ) goto attach_end;\n  memset(&sName, 0, sizeof(NameContext));\n  sName.pParse = pParse;\n\n  if(\n      SQLITE_OK!=resolveAttachExpr(&sName, pFilename) ||\n      SQLITE_OK!=resolveAttachExpr(&sName, pDbname) ||\n      SQLITE_OK!=resolveAttachExpr(&sName, pKey)\n  ){\n    goto attach_end;\n  }\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( ALWAYS(pAuthArg) ){\n    char *zAuthArg;\n    if( pAuthArg->op==TK_STRING ){\n      assert( !ExprHasProperty(pAuthArg, EP_IntValue) );\n      zAuthArg = pAuthArg->u.zToken;\n    }else{\n      zAuthArg = 0;\n    }\n    rc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0);\n    if(rc!=SQLITE_OK ){\n      goto attach_end;\n    }\n  }\n#endif /* SQLITE_OMIT_AUTHORIZATION */\n\n\n  v = sqlite3GetVdbe(pParse);\n  regArgs = sqlite3GetTempRange(pParse, 4);\n  sqlite3ExprCode(pParse, pFilename, regArgs);\n  sqlite3ExprCode(pParse, pDbname, regArgs+1);\n  sqlite3ExprCode(pParse, pKey, regArgs+2);\n\n  assert( v || db->mallocFailed );\n  if( v ){\n    sqlite3VdbeAddFunctionCall(pParse, 0, regArgs+3-pFunc->nArg, regArgs+3,\n                               pFunc->nArg, pFunc, 0);\n    /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this\n    ** statement only). For DETACH, set it to false (expire all existing\n    ** statements).\n    */\n    sqlite3VdbeAddOp1(v, OP_Expire, (type==SQLITE_ATTACH));\n  }\n\nattach_end:\n  sqlite3ExprDelete(db, pFilename);\n  sqlite3ExprDelete(db, pDbname);\n  sqlite3ExprDelete(db, pKey);\n}\n\n/*\n** Called by the parser to compile a DETACH statement.\n**\n**     DETACH pDbname\n*/\nSQLITE_PRIVATE void sqlite3Detach(Parse *pParse, Expr *pDbname){\n  static const FuncDef detach_func = {\n    1,                /* nArg */\n    SQLITE_UTF8,      /* funcFlags */\n    0,                /* pUserData */\n    0,                /* pNext */\n    detachFunc,       /* xSFunc */\n    0,                /* xFinalize */\n    0, 0,             /* xValue, xInverse */\n    \"sqlite_detach\",  /* zName */\n    {0}\n  };\n  codeAttach(pParse, SQLITE_DETACH, &detach_func, pDbname, 0, 0, pDbname);\n}\n\n/*\n** Called by the parser to compile an ATTACH statement.\n**\n**     ATTACH p AS pDbname KEY pKey\n*/\nSQLITE_PRIVATE void sqlite3Attach(Parse *pParse, Expr *p, Expr *pDbname, Expr *pKey){\n  static const FuncDef attach_func = {\n    3,                /* nArg */\n    SQLITE_UTF8,      /* funcFlags */\n    0,                /* pUserData */\n    0,                /* pNext */\n    attachFunc,       /* xSFunc */\n    0,                /* xFinalize */\n    0, 0,             /* xValue, xInverse */\n    \"sqlite_attach\",  /* zName */\n    {0}\n  };\n  codeAttach(pParse, SQLITE_ATTACH, &attach_func, p, p, pDbname, pKey);\n}\n#endif /* SQLITE_OMIT_ATTACH */\n\n/*\n** Expression callback used by sqlite3FixAAAA() routines.\n*/\nstatic int fixExprCb(Walker *p, Expr *pExpr){\n  DbFixer *pFix = p->u.pFix;\n  if( !pFix->bTemp ) ExprSetProperty(pExpr, EP_FromDDL);\n  if( pExpr->op==TK_VARIABLE ){\n    if( pFix->pParse->db->init.busy ){\n      pExpr->op = TK_NULL;\n    }else{\n      sqlite3ErrorMsg(pFix->pParse, \"%s cannot use variables\", pFix->zType);\n      return WRC_Abort;\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Select callback used by sqlite3FixAAAA() routines.\n*/\nstatic int fixSelectCb(Walker *p, Select *pSelect){\n  DbFixer *pFix = p->u.pFix;\n  int i;\n  SrcItem *pItem;\n  sqlite3 *db = pFix->pParse->db;\n  int iDb = sqlite3FindDbName(db, pFix->zDb);\n  SrcList *pList = pSelect->pSrc;\n\n  if( NEVER(pList==0) ) return WRC_Continue;\n  for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){\n    if( pFix->bTemp==0 && pItem->fg.isSubquery==0 ){\n      if( pItem->fg.fixedSchema==0 && pItem->u4.zDatabase!=0 ){\n        if( iDb!=sqlite3FindDbName(db, pItem->u4.zDatabase) ){\n          sqlite3ErrorMsg(pFix->pParse,\n              \"%s %T cannot reference objects in database %s\",\n              pFix->zType, pFix->pName, pItem->u4.zDatabase);\n          return WRC_Abort;\n        }\n        sqlite3DbFree(db, pItem->u4.zDatabase);\n        pItem->fg.notCte = 1;\n        pItem->fg.hadSchema = 1;\n      }\n      pItem->u4.pSchema = pFix->pSchema;\n      pItem->fg.fromDDL = 1;\n      pItem->fg.fixedSchema = 1;\n    }\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)\n    if( pList->a[i].fg.isUsing==0\n     && sqlite3WalkExpr(&pFix->w, pList->a[i].u3.pOn)\n    ){\n      return WRC_Abort;\n    }\n#endif\n  }\n  if( pSelect->pWith ){\n    for(i=0; i<pSelect->pWith->nCte; i++){\n      if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){\n        return WRC_Abort;\n      }\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Initialize a DbFixer structure.  This routine must be called prior\n** to passing the structure to one of the sqliteFixAAAA() routines below.\n*/\nSQLITE_PRIVATE void sqlite3FixInit(\n  DbFixer *pFix,      /* The fixer to be initialized */\n  Parse *pParse,      /* Error messages will be written here */\n  int iDb,            /* This is the database that must be used */\n  const char *zType,  /* \"view\", \"trigger\", or \"index\" */\n  const Token *pName  /* Name of the view, trigger, or index */\n){\n  sqlite3 *db = pParse->db;\n  assert( db->nDb>iDb );\n  pFix->pParse = pParse;\n  pFix->zDb = db->aDb[iDb].zDbSName;\n  pFix->pSchema = db->aDb[iDb].pSchema;\n  pFix->zType = zType;\n  pFix->pName = pName;\n  pFix->bTemp = (iDb==1);\n  pFix->w.pParse = pParse;\n  pFix->w.xExprCallback = fixExprCb;\n  pFix->w.xSelectCallback = fixSelectCb;\n  pFix->w.xSelectCallback2 = sqlite3WalkWinDefnDummyCallback;\n  pFix->w.walkerDepth = 0;\n  pFix->w.eCode = 0;\n  pFix->w.u.pFix = pFix;\n}\n\n/*\n** The following set of routines walk through the parse tree and assign\n** a specific database to all table references where the database name\n** was left unspecified in the original SQL statement.  The pFix structure\n** must have been initialized by a prior call to sqlite3FixInit().\n**\n** These routines are used to make sure that an index, trigger, or\n** view in one database does not refer to objects in a different database.\n** (Exception: indices, triggers, and views in the TEMP database are\n** allowed to refer to anything.)  If a reference is explicitly made\n** to an object in a different database, an error message is added to\n** pParse->zErrMsg and these routines return non-zero.  If everything\n** checks out, these routines return 0.\n*/\nSQLITE_PRIVATE int sqlite3FixSrcList(\n  DbFixer *pFix,       /* Context of the fixation */\n  SrcList *pList       /* The Source list to check and modify */\n){\n  int res = 0;\n  if( pList ){\n    Select s;\n    memset(&s, 0, sizeof(s));\n    s.pSrc = pList;\n    res = sqlite3WalkSelect(&pFix->w, &s);\n  }\n  return res;\n}\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)\nSQLITE_PRIVATE int sqlite3FixSelect(\n  DbFixer *pFix,       /* Context of the fixation */\n  Select *pSelect      /* The SELECT statement to be fixed to one database */\n){\n  return sqlite3WalkSelect(&pFix->w, pSelect);\n}\nSQLITE_PRIVATE int sqlite3FixExpr(\n  DbFixer *pFix,     /* Context of the fixation */\n  Expr *pExpr        /* The expression to be fixed to one database */\n){\n  return sqlite3WalkExpr(&pFix->w, pExpr);\n}\n#endif\n\n#ifndef SQLITE_OMIT_TRIGGER\nSQLITE_PRIVATE int sqlite3FixTriggerStep(\n  DbFixer *pFix,     /* Context of the fixation */\n  TriggerStep *pStep /* The trigger step be fixed to one database */\n){\n  while( pStep ){\n    if( sqlite3WalkSelect(&pFix->w, pStep->pSelect)\n     || sqlite3WalkExpr(&pFix->w, pStep->pWhere)\n     || sqlite3WalkExprList(&pFix->w, pStep->pExprList)\n     || sqlite3FixSrcList(pFix, pStep->pFrom)\n    ){\n      return 1;\n    }\n#ifndef SQLITE_OMIT_UPSERT\n    {\n      Upsert *pUp;\n      for(pUp=pStep->pUpsert; pUp; pUp=pUp->pNextUpsert){\n        if( sqlite3WalkExprList(&pFix->w, pUp->pUpsertTarget)\n         || sqlite3WalkExpr(&pFix->w, pUp->pUpsertTargetWhere)\n         || sqlite3WalkExprList(&pFix->w, pUp->pUpsertSet)\n         || sqlite3WalkExpr(&pFix->w, pUp->pUpsertWhere)\n        ){\n          return 1;\n        }\n      }\n    }\n#endif\n    pStep = pStep->pNext;\n  }\n\n  return 0;\n}\n#endif\n\n/************** End of attach.c **********************************************/\n/************** Begin file auth.c ********************************************/\n/*\n** 2003 January 11\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to implement the sqlite3_set_authorizer()\n** API.  This facility is an optional feature of the library.  Embedded\n** systems that do not need this facility may omit it by recompiling\n** the library with -DSQLITE_OMIT_AUTHORIZATION=1\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** All of the code in this file may be omitted by defining a single\n** macro.\n*/\n#ifndef SQLITE_OMIT_AUTHORIZATION\n\n/*\n** Set or clear the access authorization function.\n**\n** The access authorization function is be called during the compilation\n** phase to verify that the user has read and/or write access permission on\n** various fields of the database.  The first argument to the auth function\n** is a copy of the 3rd argument to this routine.  The second argument\n** to the auth function is one of these constants:\n**\n**       SQLITE_CREATE_INDEX\n**       SQLITE_CREATE_TABLE\n**       SQLITE_CREATE_TEMP_INDEX\n**       SQLITE_CREATE_TEMP_TABLE\n**       SQLITE_CREATE_TEMP_TRIGGER\n**       SQLITE_CREATE_TEMP_VIEW\n**       SQLITE_CREATE_TRIGGER\n**       SQLITE_CREATE_VIEW\n**       SQLITE_DELETE\n**       SQLITE_DROP_INDEX\n**       SQLITE_DROP_TABLE\n**       SQLITE_DROP_TEMP_INDEX\n**       SQLITE_DROP_TEMP_TABLE\n**       SQLITE_DROP_TEMP_TRIGGER\n**       SQLITE_DROP_TEMP_VIEW\n**       SQLITE_DROP_TRIGGER\n**       SQLITE_DROP_VIEW\n**       SQLITE_INSERT\n**       SQLITE_PRAGMA\n**       SQLITE_READ\n**       SQLITE_SELECT\n**       SQLITE_TRANSACTION\n**       SQLITE_UPDATE\n**\n** The third and fourth arguments to the auth function are the name of\n** the table and the column that are being accessed.  The auth function\n** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  If\n** SQLITE_OK is returned, it means that access is allowed.  SQLITE_DENY\n** means that the SQL statement will never-run - the sqlite3_exec() call\n** will return with an error.  SQLITE_IGNORE means that the SQL statement\n** should run but attempts to read the specified column will return NULL\n** and attempts to write the column will be ignored.\n**\n** Setting the auth function to NULL disables this hook.  The default\n** setting of the auth function is NULL.\n*/\nSQLITE_API int sqlite3_set_authorizer(\n  sqlite3 *db,\n  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\n  void *pArg\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->xAuth = (sqlite3_xauth)xAuth;\n  db->pAuthArg = pArg;\n  if( db->xAuth ) sqlite3ExpirePreparedStatements(db, 1);\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n/*\n** Write an error message into pParse->zErrMsg that explains that the\n** user-supplied authorization function returned an illegal value.\n*/\nstatic void sqliteAuthBadReturnCode(Parse *pParse){\n  sqlite3ErrorMsg(pParse, \"authorizer malfunction\");\n  pParse->rc = SQLITE_ERROR;\n}\n\n/*\n** Invoke the authorization callback for permission to read column zCol from\n** table zTab in database zDb. This function assumes that an authorization\n** callback has been registered (i.e. that sqlite3.xAuth is not NULL).\n**\n** If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed\n** to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE\n** is treated as SQLITE_DENY. In this case an error is left in pParse.\n*/\nSQLITE_PRIVATE int sqlite3AuthReadCol(\n  Parse *pParse,                  /* The parser context */\n  const char *zTab,               /* Table name */\n  const char *zCol,               /* Column name */\n  int iDb                         /* Index of containing database. */\n){\n  sqlite3 *db = pParse->db;          /* Database handle */\n  char *zDb = db->aDb[iDb].zDbSName; /* Schema name of attached database */\n  int rc;                            /* Auth callback return code */\n\n  if( db->init.busy ) return SQLITE_OK;\n  rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext);\n  if( rc==SQLITE_DENY ){\n    char *z = sqlite3_mprintf(\"%s.%s\", zTab, zCol);\n    if( db->nDb>2 || iDb!=0 ) z = sqlite3_mprintf(\"%s.%z\", zDb, z);\n    sqlite3ErrorMsg(pParse, \"access to %z is prohibited\", z);\n    pParse->rc = SQLITE_AUTH;\n  }else if( rc!=SQLITE_IGNORE && rc!=SQLITE_OK ){\n    sqliteAuthBadReturnCode(pParse);\n  }\n  return rc;\n}\n\n/*\n** The pExpr should be a TK_COLUMN expression.  The table referred to\n** is in pTabList or else it is the NEW or OLD table of a trigger.\n** Check to see if it is OK to read this particular column.\n**\n** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN\n** instruction into a TK_NULL.  If the auth function returns SQLITE_DENY,\n** then generate an error.\n*/\nSQLITE_PRIVATE void sqlite3AuthRead(\n  Parse *pParse,        /* The parser context */\n  Expr *pExpr,          /* The expression to check authorization on */\n  Schema *pSchema,      /* The schema of the expression */\n  SrcList *pTabList     /* All table that pExpr might refer to */\n){\n  Table *pTab = 0;      /* The table being read */\n  const char *zCol;     /* Name of the column of the table */\n  int iSrc;             /* Index in pTabList->a[] of table being read */\n  int iDb;              /* The index of the database the expression refers to */\n  int iCol;             /* Index of column in table */\n\n  assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );\n  assert( !IN_RENAME_OBJECT );\n  assert( pParse->db->xAuth!=0 );\n  iDb = sqlite3SchemaToIndex(pParse->db, pSchema);\n  if( iDb<0 ){\n    /* An attempt to read a column out of a subquery or other\n    ** temporary table. */\n    return;\n  }\n\n  if( pExpr->op==TK_TRIGGER ){\n    pTab = pParse->pTriggerTab;\n  }else{\n    assert( pTabList );\n    for(iSrc=0; iSrc<pTabList->nSrc; iSrc++){\n      if( pExpr->iTable==pTabList->a[iSrc].iCursor ){\n        pTab = pTabList->a[iSrc].pSTab;\n        break;\n      }\n    }\n  }\n  iCol = pExpr->iColumn;\n  if( pTab==0 ) return;\n\n  if( iCol>=0 ){\n    assert( iCol<pTab->nCol );\n    zCol = pTab->aCol[iCol].zCnName;\n  }else if( pTab->iPKey>=0 ){\n    assert( pTab->iPKey<pTab->nCol );\n    zCol = pTab->aCol[pTab->iPKey].zCnName;\n  }else{\n    zCol = \"ROWID\";\n  }\n  assert( iDb>=0 && iDb<pParse->db->nDb );\n  if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){\n    pExpr->op = TK_NULL;\n  }\n}\n\n/*\n** Do an authorization check using the code and arguments given.  Return\n** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY.  If SQLITE_DENY\n** is returned, then the error count and error message in pParse are\n** modified appropriately.\n*/\nSQLITE_PRIVATE int sqlite3AuthCheck(\n  Parse *pParse,\n  int code,\n  const char *zArg1,\n  const char *zArg2,\n  const char *zArg3\n){\n  sqlite3 *db = pParse->db;\n  int rc;\n\n  /* Don't do any authorization checks if the database is initializing\n  ** or if the parser is being invoked from within sqlite3_declare_vtab.\n  */\n  assert( !IN_RENAME_OBJECT || db->xAuth==0 );\n  if( db->xAuth==0 || db->init.busy || IN_SPECIAL_PARSE ){\n    return SQLITE_OK;\n  }\n\n  /* EVIDENCE-OF: R-43249-19882 The third through sixth parameters to the\n  ** callback are either NULL pointers or zero-terminated strings that\n  ** contain additional details about the action to be authorized.\n  **\n  ** The following testcase() macros show that any of the 3rd through 6th\n  ** parameters can be either NULL or a string. */\n  testcase( zArg1==0 );\n  testcase( zArg2==0 );\n  testcase( zArg3==0 );\n  testcase( pParse->zAuthContext==0 );\n\n  rc = db->xAuth(db->pAuthArg,code,zArg1,zArg2,zArg3,pParse->zAuthContext);\n  if( rc==SQLITE_DENY ){\n    sqlite3ErrorMsg(pParse, \"not authorized\");\n    pParse->rc = SQLITE_AUTH;\n  }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){\n    rc = SQLITE_DENY;\n    sqliteAuthBadReturnCode(pParse);\n  }\n  return rc;\n}\n\n/*\n** Push an authorization context.  After this routine is called, the\n** zArg3 argument to authorization callbacks will be zContext until\n** popped.  Or if pParse==0, this routine is a no-op.\n*/\nSQLITE_PRIVATE void sqlite3AuthContextPush(\n  Parse *pParse,\n  AuthContext *pContext,\n  const char *zContext\n){\n  assert( pParse );\n  pContext->pParse = pParse;\n  pContext->zAuthContext = pParse->zAuthContext;\n  pParse->zAuthContext = zContext;\n}\n\n/*\n** Pop an authorization context that was previously pushed\n** by sqlite3AuthContextPush\n*/\nSQLITE_PRIVATE void sqlite3AuthContextPop(AuthContext *pContext){\n  if( pContext->pParse ){\n    pContext->pParse->zAuthContext = pContext->zAuthContext;\n    pContext->pParse = 0;\n  }\n}\n\n#endif /* SQLITE_OMIT_AUTHORIZATION */\n\n/************** End of auth.c ************************************************/\n/************** Begin file build.c *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that are called by the SQLite parser\n** when syntax rules are reduced.  The routines in this file handle the\n** following kinds of SQL syntax:\n**\n**     CREATE TABLE\n**     DROP TABLE\n**     CREATE INDEX\n**     DROP INDEX\n**     creating ID lists\n**     BEGIN TRANSACTION\n**     COMMIT\n**     ROLLBACK\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n/*\n** The TableLock structure is only used by the sqlite3TableLock() and\n** codeTableLocks() functions.\n*/\nstruct TableLock {\n  int iDb;               /* The database containing the table to be locked */\n  Pgno iTab;             /* The root page of the table to be locked */\n  u8 isWriteLock;        /* True for write lock.  False for a read lock */\n  const char *zLockName; /* Name of the table */\n};\n\n/*\n** Record the fact that we want to lock a table at run-time.\n**\n** The table to be locked has root page iTab and is found in database iDb.\n** A read or a write lock can be taken depending on isWritelock.\n**\n** This routine just records the fact that the lock is desired.  The\n** code to make the lock occur is generated by a later call to\n** codeTableLocks() which occurs during sqlite3FinishCoding().\n*/\nstatic SQLITE_NOINLINE void lockTable(\n  Parse *pParse,     /* Parsing context */\n  int iDb,           /* Index of the database containing the table to lock */\n  Pgno iTab,         /* Root page number of the table to be locked */\n  u8 isWriteLock,    /* True for a write lock */\n  const char *zName  /* Name of the table to be locked */\n){\n  Parse *pToplevel;\n  int i;\n  int nBytes;\n  TableLock *p;\n  assert( iDb>=0 );\n\n  pToplevel = sqlite3ParseToplevel(pParse);\n  for(i=0; i<pToplevel->nTableLock; i++){\n    p = &pToplevel->aTableLock[i];\n    if( p->iDb==iDb && p->iTab==iTab ){\n      p->isWriteLock = (p->isWriteLock || isWriteLock);\n      return;\n    }\n  }\n\n  assert( pToplevel->nTableLock < 0x7fff0000 );\n  nBytes = sizeof(TableLock) * (pToplevel->nTableLock+1);\n  pToplevel->aTableLock =\n      sqlite3DbReallocOrFree(pToplevel->db, pToplevel->aTableLock, nBytes);\n  if( pToplevel->aTableLock ){\n    p = &pToplevel->aTableLock[pToplevel->nTableLock++];\n    p->iDb = iDb;\n    p->iTab = iTab;\n    p->isWriteLock = isWriteLock;\n    p->zLockName = zName;\n  }else{\n    pToplevel->nTableLock = 0;\n    sqlite3OomFault(pToplevel->db);\n  }\n}\nSQLITE_PRIVATE void sqlite3TableLock(\n  Parse *pParse,     /* Parsing context */\n  int iDb,           /* Index of the database containing the table to lock */\n  Pgno iTab,         /* Root page number of the table to be locked */\n  u8 isWriteLock,    /* True for a write lock */\n  const char *zName  /* Name of the table to be locked */\n){\n  if( iDb==1 ) return;\n  if( !sqlite3BtreeSharable(pParse->db->aDb[iDb].pBt) ) return;\n  lockTable(pParse, iDb, iTab, isWriteLock, zName);\n}\n\n/*\n** Code an OP_TableLock instruction for each table locked by the\n** statement (configured by calls to sqlite3TableLock()).\n*/\nstatic void codeTableLocks(Parse *pParse){\n  int i;\n  Vdbe *pVdbe = pParse->pVdbe;\n  assert( pVdbe!=0 );\n\n  for(i=0; i<pParse->nTableLock; i++){\n    TableLock *p = &pParse->aTableLock[i];\n    int p1 = p->iDb;\n    sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,\n                      p->zLockName, P4_STATIC);\n  }\n}\n#else\n  #define codeTableLocks(x)\n#endif\n\n/*\n** Return TRUE if the given yDbMask object is empty - if it contains no\n** 1 bits.  This routine is used by the DbMaskAllZero() and DbMaskNotZero()\n** macros when SQLITE_MAX_ATTACHED is greater than 30.\n*/\n#if SQLITE_MAX_ATTACHED>30\nSQLITE_PRIVATE int sqlite3DbMaskAllZero(yDbMask m){\n  int i;\n  for(i=0; i<sizeof(yDbMask); i++) if( m[i] ) return 0;\n  return 1;\n}\n#endif\n\n/*\n** This routine is called after a single SQL statement has been\n** parsed and a VDBE program to execute that statement has been\n** prepared.  This routine puts the finishing touches on the\n** VDBE program and resets the pParse structure for the next\n** parse.\n**\n** Note that if an error occurred, it might be the case that\n** no VDBE code was generated.\n*/\nSQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){\n  sqlite3 *db;\n  Vdbe *v;\n  int iDb, i;\n\n  assert( pParse->pToplevel==0 );\n  db = pParse->db;\n  assert( db->pParse==pParse );\n  if( pParse->nested ) return;\n  if( pParse->nErr ){\n    if( db->mallocFailed ) pParse->rc = SQLITE_NOMEM;\n    return;\n  }\n  assert( db->mallocFailed==0 );\n\n  /* Begin by generating some termination code at the end of the\n  ** vdbe program\n  */\n  v = pParse->pVdbe;\n  if( v==0 ){\n    if( db->init.busy ){\n      pParse->rc = SQLITE_DONE;\n      return;\n    }\n    v = sqlite3GetVdbe(pParse);\n    if( v==0 ) pParse->rc = SQLITE_ERROR;\n  }\n  assert( !pParse->isMultiWrite\n       || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort));\n  if( v ){\n    if( pParse->bReturning ){\n      Returning *pReturning;\n      int addrRewind;\n      int reg;\n\n      assert( !pParse->isCreate );\n      pReturning = pParse->u1.d.pReturning;\n      if( pReturning->nRetCol ){\n        sqlite3VdbeAddOp0(v, OP_FkCheck);\n        addrRewind =\n           sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);\n        VdbeCoverage(v);\n        reg = pReturning->iRetReg;\n        for(i=0; i<pReturning->nRetCol; i++){\n          sqlite3VdbeAddOp3(v, OP_Column, pReturning->iRetCur, i, reg+i);\n        }\n        sqlite3VdbeAddOp2(v, OP_ResultRow, reg, i);\n        sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1);\n        VdbeCoverage(v);\n        sqlite3VdbeJumpHere(v, addrRewind);\n      }\n    }\n    sqlite3VdbeAddOp0(v, OP_Halt);\n\n    /* The cookie mask contains one bit for each database file open.\n    ** (Bit 0 is for main, bit 1 is for temp, and so forth.)  Bits are\n    ** set for each database that is used.  Generate code to start a\n    ** transaction on each used database and to verify the schema cookie\n    ** on each used database.\n    */\n    assert( pParse->nErr>0 || sqlite3VdbeGetOp(v, 0)->opcode==OP_Init );\n    sqlite3VdbeJumpHere(v, 0);\n    assert( db->nDb>0 );\n    iDb = 0;\n    do{\n      Schema *pSchema;\n      if( DbMaskTest(pParse->cookieMask, iDb)==0 ) continue;\n      sqlite3VdbeUsesBtree(v, iDb);\n      pSchema = db->aDb[iDb].pSchema;\n      sqlite3VdbeAddOp4Int(v,\n        OP_Transaction,                    /* Opcode */\n        iDb,                               /* P1 */\n        DbMaskTest(pParse->writeMask,iDb), /* P2 */\n        pSchema->schema_cookie,            /* P3 */\n        pSchema->iGeneration               /* P4 */\n      );\n      if( db->init.busy==0 ) sqlite3VdbeChangeP5(v, 1);\n      VdbeComment((v,\n            \"usesStmtJournal=%d\", pParse->mayAbort && pParse->isMultiWrite));\n    }while( ++iDb<db->nDb );\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    for(i=0; i<pParse->nVtabLock; i++){\n      char *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);\n      sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB);\n    }\n    pParse->nVtabLock = 0;\n#endif\n\n#ifndef SQLITE_OMIT_SHARED_CACHE\n    /* Once all the cookies have been verified and transactions opened,\n    ** obtain the required table-locks. This is a no-op unless the\n    ** shared-cache feature is enabled.\n    */\n    if( pParse->nTableLock ) codeTableLocks(pParse);\n#endif\n\n    /* Initialize any AUTOINCREMENT data structures required.\n    */\n    if( pParse->pAinc ) sqlite3AutoincrementBegin(pParse);\n\n    /* Code constant expressions that were factored out of inner loops.\n    */\n    if( pParse->pConstExpr ){\n      ExprList *pEL = pParse->pConstExpr;\n      pParse->okConstFactor = 0;\n      for(i=0; i<pEL->nExpr; i++){\n        assert( pEL->a[i].u.iConstExprReg>0 );\n        sqlite3ExprCode(pParse, pEL->a[i].pExpr, pEL->a[i].u.iConstExprReg);\n      }\n    }\n\n    if( pParse->bReturning ){\n      Returning *pRet;\n      assert( !pParse->isCreate );\n      pRet = pParse->u1.d.pReturning;\n      if( pRet->nRetCol ){\n        sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRet->iRetCur, pRet->nRetCol);\n      }\n    }\n\n    /* Finally, jump back to the beginning of the executable code. */\n    sqlite3VdbeGoto(v, 1);\n  }\n\n  /* Get the VDBE program ready for execution\n  */\n  assert( v!=0 || pParse->nErr );\n  assert( db->mallocFailed==0 || pParse->nErr );\n  if( pParse->nErr==0 ){\n    /* A minimum of one cursor is required if autoincrement is used\n    *  See ticket [a696379c1f08866] */\n    assert( pParse->pAinc==0 || pParse->nTab>0 );\n    sqlite3VdbeMakeReady(v, pParse);\n    pParse->rc = SQLITE_DONE;\n  }else{\n    pParse->rc = SQLITE_ERROR;\n  }\n}\n\n/*\n** Run the parser and code generator recursively in order to generate\n** code for the SQL statement given onto the end of the pParse context\n** currently under construction.  Notes:\n**\n**   *  The final OP_Halt is not appended and other initialization\n**      and finalization steps are omitted because those are handling by the\n**      outermost parser.\n**\n**   *  Built-in SQL functions always take precedence over application-defined\n**      SQL functions.  In other words, it is not possible to override a\n**      built-in function.\n*/\nSQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){\n  va_list ap;\n  char *zSql;\n  sqlite3 *db = pParse->db;\n  u32 savedDbFlags = db->mDbFlags;\n  char saveBuf[PARSE_TAIL_SZ];\n\n  if( pParse->nErr ) return;\n  if( pParse->eParseMode ) return;\n  assert( pParse->nested<10 );  /* Nesting should only be of limited depth */\n  va_start(ap, zFormat);\n  zSql = sqlite3VMPrintf(db, zFormat, ap);\n  va_end(ap);\n  if( zSql==0 ){\n    /* This can result either from an OOM or because the formatted string\n    ** exceeds SQLITE_LIMIT_LENGTH.  In the latter case, we need to set\n    ** an error */\n    if( !db->mallocFailed ) pParse->rc = SQLITE_TOOBIG;\n    pParse->nErr++;\n    return;\n  }\n  pParse->nested++;\n  memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ);\n  memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);\n  db->mDbFlags |= DBFLAG_PreferBuiltin;\n  sqlite3RunParser(pParse, zSql);\n  db->mDbFlags = savedDbFlags;\n  sqlite3DbFree(db, zSql);\n  memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ);\n  pParse->nested--;\n}\n\n/*\n** Locate the in-memory structure that describes a particular database\n** table given the name of that table and (optionally) the name of the\n** database containing the table.  Return NULL if not found.\n**\n** If zDatabase is 0, all databases are searched for the table and the\n** first matching table is returned.  (No checking for duplicate table\n** names is done.)  The search order is TEMP first, then MAIN, then any\n** auxiliary databases added using the ATTACH command.\n**\n** See also sqlite3LocateTable().\n*/\nSQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){\n  Table *p = 0;\n  int i;\n\n  /* All mutexes are required for schema access.  Make sure we hold them. */\n  assert( zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db) );\n  if( zDatabase ){\n    for(i=0; i<db->nDb; i++){\n      if( sqlite3StrICmp(zDatabase, db->aDb[i].zDbSName)==0 ) break;\n    }\n    if( i>=db->nDb ){\n      /* No match against the official names.  But always match \"main\"\n      ** to schema 0 as a legacy fallback. */\n      if( sqlite3StrICmp(zDatabase,\"main\")==0 ){\n        i = 0;\n      }else{\n        return 0;\n      }\n    }\n    p = sqlite3HashFind(&db->aDb[i].pSchema->tblHash, zName);\n    if( p==0 && sqlite3StrNICmp(zName, \"sqlite_\", 7)==0 ){\n      if( i==1 ){\n        if( sqlite3StrICmp(zName+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0\n         || sqlite3StrICmp(zName+7, &PREFERRED_SCHEMA_TABLE[7])==0\n         || sqlite3StrICmp(zName+7, &LEGACY_SCHEMA_TABLE[7])==0\n        ){\n          p = sqlite3HashFind(&db->aDb[1].pSchema->tblHash,\n                              LEGACY_TEMP_SCHEMA_TABLE);\n        }\n      }else{\n        if( sqlite3StrICmp(zName+7, &PREFERRED_SCHEMA_TABLE[7])==0 ){\n          p = sqlite3HashFind(&db->aDb[i].pSchema->tblHash,\n                              LEGACY_SCHEMA_TABLE);\n        }\n      }\n    }\n  }else{\n    /* Match against TEMP first */\n    p = sqlite3HashFind(&db->aDb[1].pSchema->tblHash, zName);\n    if( p ) return p;\n    /* The main database is second */\n    p = sqlite3HashFind(&db->aDb[0].pSchema->tblHash, zName);\n    if( p ) return p;\n    /* Attached databases are in order of attachment */\n    for(i=2; i<db->nDb; i++){\n      assert( sqlite3SchemaMutexHeld(db, i, 0) );\n      p = sqlite3HashFind(&db->aDb[i].pSchema->tblHash, zName);\n      if( p ) break;\n    }\n    if( p==0 && sqlite3StrNICmp(zName, \"sqlite_\", 7)==0 ){\n      if( sqlite3StrICmp(zName+7, &PREFERRED_SCHEMA_TABLE[7])==0 ){\n        p = sqlite3HashFind(&db->aDb[0].pSchema->tblHash, LEGACY_SCHEMA_TABLE);\n      }else if( sqlite3StrICmp(zName+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){\n        p = sqlite3HashFind(&db->aDb[1].pSchema->tblHash,\n                            LEGACY_TEMP_SCHEMA_TABLE);\n      }\n    }\n  }\n  return p;\n}\n\n/*\n** Locate the in-memory structure that describes a particular database\n** table given the name of that table and (optionally) the name of the\n** database containing the table.  Return NULL if not found.  Also leave an\n** error message in pParse->zErrMsg.\n**\n** The difference between this routine and sqlite3FindTable() is that this\n** routine leaves an error message in pParse->zErrMsg where\n** sqlite3FindTable() does not.\n*/\nSQLITE_PRIVATE Table *sqlite3LocateTable(\n  Parse *pParse,         /* context in which to report errors */\n  u32 flags,             /* LOCATE_VIEW or LOCATE_NOERR */\n  const char *zName,     /* Name of the table we are looking for */\n  const char *zDbase     /* Name of the database.  Might be NULL */\n){\n  Table *p;\n  sqlite3 *db = pParse->db;\n\n  /* Read the database schema. If an error occurs, leave an error message\n  ** and code in pParse and return NULL. */\n  if( (db->mDbFlags & DBFLAG_SchemaKnownOk)==0\n   && SQLITE_OK!=sqlite3ReadSchema(pParse)\n  ){\n    return 0;\n  }\n\n  p = sqlite3FindTable(db, zName, zDbase);\n  if( p==0 ){\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    /* If zName is the not the name of a table in the schema created using\n    ** CREATE, then check to see if it is the name of an virtual table that\n    ** can be an eponymous virtual table. */\n    if( (pParse->prepFlags & SQLITE_PREPARE_NO_VTAB)==0 && db->init.busy==0 ){\n      Module *pMod = (Module*)sqlite3HashFind(&db->aModule, zName);\n      if( pMod==0 && sqlite3_strnicmp(zName, \"pragma_\", 7)==0 ){\n        pMod = sqlite3PragmaVtabRegister(db, zName);\n      }\n#ifndef SQLITE_OMIT_JSON\n      if( pMod==0 && sqlite3_strnicmp(zName, \"json\", 4)==0 ){\n        pMod = sqlite3JsonVtabRegister(db, zName);\n      }\n#endif\n#ifdef SQLITE_ENABLE_CARRAY\n      if( pMod==0 && sqlite3_stricmp(zName, \"carray\")==0 ){\n        pMod = sqlite3CarrayRegister(db);\n      }\n#endif\n      if( pMod && sqlite3VtabEponymousTableInit(pParse, pMod) ){\n        testcase( pMod->pEpoTab==0 );\n        return pMod->pEpoTab;\n      }\n    }\n#endif\n    if( flags & LOCATE_NOERR ) return 0;\n    pParse->checkSchema = 1;\n  }else if( IsVirtual(p) && (pParse->prepFlags & SQLITE_PREPARE_NO_VTAB)!=0 ){\n    p = 0;\n  }\n\n  if( p==0 ){\n    const char *zMsg = flags & LOCATE_VIEW ? \"no such view\" : \"no such table\";\n    if( zDbase ){\n      sqlite3ErrorMsg(pParse, \"%s: %s.%s\", zMsg, zDbase, zName);\n    }else{\n      sqlite3ErrorMsg(pParse, \"%s: %s\", zMsg, zName);\n    }\n  }else{\n    assert( HasRowid(p) || p->iPKey<0 );\n  }\n\n  return p;\n}\n\n/*\n** Locate the table identified by *p.\n**\n** This is a wrapper around sqlite3LocateTable(). The difference between\n** sqlite3LocateTable() and this function is that this function restricts\n** the search to schema (p->pSchema) if it is not NULL. p->pSchema may be\n** non-NULL if it is part of a view or trigger program definition. See\n** sqlite3FixSrcList() for details.\n*/\nSQLITE_PRIVATE Table *sqlite3LocateTableItem(\n  Parse *pParse,\n  u32 flags,\n  SrcItem *p\n){\n  const char *zDb;\n  if( p->fg.fixedSchema ){\n    int iDb = sqlite3SchemaToIndex(pParse->db, p->u4.pSchema);\n    zDb = pParse->db->aDb[iDb].zDbSName;\n  }else{\n    assert( !p->fg.isSubquery );\n    zDb = p->u4.zDatabase;\n  }\n  return sqlite3LocateTable(pParse, flags, p->zName, zDb);\n}\n\n/*\n** Return the preferred table name for system tables.  Translate legacy\n** names into the new preferred names, as appropriate.\n*/\nSQLITE_PRIVATE const char *sqlite3PreferredTableName(const char *zName){\n  if( sqlite3StrNICmp(zName, \"sqlite_\", 7)==0 ){\n    if( sqlite3StrICmp(zName+7, &LEGACY_SCHEMA_TABLE[7])==0 ){\n      return PREFERRED_SCHEMA_TABLE;\n    }\n    if( sqlite3StrICmp(zName+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){\n      return PREFERRED_TEMP_SCHEMA_TABLE;\n    }\n  }\n  return zName;\n}\n\n/*\n** Locate the in-memory structure that describes\n** a particular index given the name of that index\n** and the name of the database that contains the index.\n** Return NULL if not found.\n**\n** If zDatabase is 0, all databases are searched for the\n** table and the first matching index is returned.  (No checking\n** for duplicate index names is done.)  The search order is\n** TEMP first, then MAIN, then any auxiliary databases added\n** using the ATTACH command.\n*/\nSQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){\n  Index *p = 0;\n  int i;\n  /* All mutexes are required for schema access.  Make sure we hold them. */\n  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );\n  for(i=OMIT_TEMPDB; i<db->nDb; i++){\n    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */\n    Schema *pSchema = db->aDb[j].pSchema;\n    assert( pSchema );\n    if( zDb && sqlite3DbIsNamed(db, j, zDb)==0 ) continue;\n    assert( sqlite3SchemaMutexHeld(db, j, 0) );\n    p = sqlite3HashFind(&pSchema->idxHash, zName);\n    if( p ) break;\n  }\n  return p;\n}\n\n/*\n** Reclaim the memory used by an index\n*/\nSQLITE_PRIVATE void sqlite3FreeIndex(sqlite3 *db, Index *p){\n#ifndef SQLITE_OMIT_ANALYZE\n  sqlite3DeleteIndexSamples(db, p);\n#endif\n  sqlite3ExprDelete(db, p->pPartIdxWhere);\n  sqlite3ExprListDelete(db, p->aColExpr);\n  sqlite3DbFree(db, p->zColAff);\n  if( p->isResized ) sqlite3DbFree(db, (void *)p->azColl);\n#ifdef SQLITE_ENABLE_STAT4\n  sqlite3_free(p->aiRowEst);\n#endif\n  sqlite3DbFree(db, p);\n}\n\n/*\n** For the index called zIdxName which is found in the database iDb,\n** unlike that index from its Table then remove the index from\n** the index hash table and free all memory structures associated\n** with the index.\n*/\nSQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){\n  Index *pIndex;\n  Hash *pHash;\n\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  pHash = &db->aDb[iDb].pSchema->idxHash;\n  pIndex = sqlite3HashInsert(pHash, zIdxName, 0);\n  if( ALWAYS(pIndex) ){\n    if( pIndex->pTable->pIndex==pIndex ){\n      pIndex->pTable->pIndex = pIndex->pNext;\n    }else{\n      Index *p;\n      /* Justification of ALWAYS();  The index must be on the list of\n      ** indices. */\n      p = pIndex->pTable->pIndex;\n      while( ALWAYS(p) && p->pNext!=pIndex ){ p = p->pNext; }\n      if( ALWAYS(p && p->pNext==pIndex) ){\n        p->pNext = pIndex->pNext;\n      }\n    }\n    sqlite3FreeIndex(db, pIndex);\n  }\n  db->mDbFlags |= DBFLAG_SchemaChange;\n}\n\n/*\n** Look through the list of open database files in db->aDb[] and if\n** any have been closed, remove them from the list.  Reallocate the\n** db->aDb[] structure to a smaller size, if possible.\n**\n** Entry 0 (the \"main\" database) and entry 1 (the \"temp\" database)\n** are never candidates for being collapsed.\n*/\nSQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3 *db){\n  int i, j;\n  for(i=j=2; i<db->nDb; i++){\n    struct Db *pDb = &db->aDb[i];\n    if( pDb->pBt==0 ){\n      sqlite3DbFree(db, pDb->zDbSName);\n      pDb->zDbSName = 0;\n      continue;\n    }\n    if( j<i ){\n      db->aDb[j] = db->aDb[i];\n    }\n    j++;\n  }\n  db->nDb = j;\n  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){\n    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));\n    sqlite3DbFree(db, db->aDb);\n    db->aDb = db->aDbStatic;\n  }\n}\n\n/*\n** Reset the schema for the database at index iDb.  Also reset the\n** TEMP schema.  The reset is deferred if db->nSchemaLock is not zero.\n** Deferred resets may be run by calling with iDb<0.\n*/\nSQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3 *db, int iDb){\n  int i;\n  assert( iDb<db->nDb );\n\n  if( iDb>=0 ){\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    DbSetProperty(db, iDb, DB_ResetWanted);\n    DbSetProperty(db, 1, DB_ResetWanted);\n    db->mDbFlags &= ~DBFLAG_SchemaKnownOk;\n  }\n\n  if( db->nSchemaLock==0 ){\n    for(i=0; i<db->nDb; i++){\n      if( DbHasProperty(db, i, DB_ResetWanted) ){\n        sqlite3SchemaClear(db->aDb[i].pSchema);\n      }\n    }\n  }\n}\n\n/*\n** Erase all schema information from all attached databases (including\n** \"main\" and \"temp\") for a single database connection.\n*/\nSQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){\n  int i;\n  sqlite3BtreeEnterAll(db);\n  for(i=0; i<db->nDb; i++){\n    Db *pDb = &db->aDb[i];\n    if( pDb->pSchema ){\n      if( db->nSchemaLock==0 ){\n        sqlite3SchemaClear(pDb->pSchema);\n      }else{\n        DbSetProperty(db, i, DB_ResetWanted);\n      }\n    }\n  }\n  db->mDbFlags &= ~(DBFLAG_SchemaChange|DBFLAG_SchemaKnownOk);\n  sqlite3VtabUnlockList(db);\n  sqlite3BtreeLeaveAll(db);\n  if( db->nSchemaLock==0 ){\n    sqlite3CollapseDatabaseArray(db);\n  }\n}\n\n/*\n** This routine is called when a commit occurs.\n*/\nSQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){\n  db->mDbFlags &= ~DBFLAG_SchemaChange;\n}\n\n/*\n** Set the expression associated with a column.  This is usually\n** the DEFAULT value, but might also be the expression that computes\n** the value for a generated column.\n*/\nSQLITE_PRIVATE void sqlite3ColumnSetExpr(\n  Parse *pParse,    /* Parsing context */\n  Table *pTab,      /* The table containing the column */\n  Column *pCol,     /* The column to receive the new DEFAULT expression */\n  Expr *pExpr       /* The new default expression */\n){\n  ExprList *pList;\n  assert( IsOrdinaryTable(pTab) );\n  pList = pTab->u.tab.pDfltList;\n  if( pCol->iDflt==0\n   || NEVER(pList==0)\n   || NEVER(pList->nExpr<pCol->iDflt)\n  ){\n    pCol->iDflt = pList==0 ? 1 : pList->nExpr+1;\n    pTab->u.tab.pDfltList = sqlite3ExprListAppend(pParse, pList, pExpr);\n  }else{\n    sqlite3ExprDelete(pParse->db, pList->a[pCol->iDflt-1].pExpr);\n    pList->a[pCol->iDflt-1].pExpr = pExpr;\n  }\n}\n\n/*\n** Return the expression associated with a column.  The expression might be\n** the DEFAULT clause or the AS clause of a generated column.\n** Return NULL if the column has no associated expression.\n*/\nSQLITE_PRIVATE Expr *sqlite3ColumnExpr(Table *pTab, Column *pCol){\n  if( pCol->iDflt==0 ) return 0;\n  if( !IsOrdinaryTable(pTab) ) return 0;\n  if( NEVER(pTab->u.tab.pDfltList==0) ) return 0;\n  if( NEVER(pTab->u.tab.pDfltList->nExpr<pCol->iDflt) ) return 0;\n  return pTab->u.tab.pDfltList->a[pCol->iDflt-1].pExpr;\n}\n\n/*\n** Set the collating sequence name for a column.\n*/\nSQLITE_PRIVATE void sqlite3ColumnSetColl(\n  sqlite3 *db,\n  Column *pCol,\n  const char *zColl\n){\n  i64 nColl;\n  i64 n;\n  char *zNew;\n  assert( zColl!=0 );\n  n = sqlite3Strlen30(pCol->zCnName) + 1;\n  if( pCol->colFlags & COLFLAG_HASTYPE ){\n    n += sqlite3Strlen30(pCol->zCnName+n) + 1;\n  }\n  nColl = sqlite3Strlen30(zColl) + 1;\n  zNew = sqlite3DbRealloc(db, pCol->zCnName, nColl+n);\n  if( zNew ){\n    pCol->zCnName = zNew;\n    memcpy(pCol->zCnName + n, zColl, nColl);\n    pCol->colFlags |= COLFLAG_HASCOLL;\n  }\n}\n\n/*\n** Return the collating sequence name for a column\n*/\nSQLITE_PRIVATE const char *sqlite3ColumnColl(Column *pCol){\n  const char *z;\n  if( (pCol->colFlags & COLFLAG_HASCOLL)==0 ) return 0;\n  z = pCol->zCnName;\n  while( *z ){ z++; }\n  if( pCol->colFlags & COLFLAG_HASTYPE ){\n    do{ z++; }while( *z );\n  }\n  return z+1;\n}\n\n/*\n** Delete memory allocated for the column names of a table or view (the\n** Table.aCol[] array).\n*/\nSQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3 *db, Table *pTable){\n  int i;\n  Column *pCol;\n  assert( pTable!=0 );\n  assert( db!=0 );\n  if( (pCol = pTable->aCol)!=0 ){\n    for(i=0; i<pTable->nCol; i++, pCol++){\n      assert( pCol->zCnName==0 || pCol->hName==sqlite3StrIHash(pCol->zCnName) );\n      sqlite3DbFree(db, pCol->zCnName);\n    }\n    sqlite3DbNNFreeNN(db, pTable->aCol);\n    if( IsOrdinaryTable(pTable) ){\n      sqlite3ExprListDelete(db, pTable->u.tab.pDfltList);\n    }\n    if( db->pnBytesFreed==0 ){\n      pTable->aCol = 0;\n      pTable->nCol = 0;\n      if( IsOrdinaryTable(pTable) ){\n        pTable->u.tab.pDfltList = 0;\n      }\n    }\n  }\n}\n\n/*\n** Remove the memory data structures associated with the given\n** Table.  No changes are made to disk by this routine.\n**\n** This routine just deletes the data structure.  It does not unlink\n** the table data structure from the hash table.  But it does destroy\n** memory structures of the indices and foreign keys associated with\n** the table.\n**\n** The db parameter is optional.  It is needed if the Table object\n** contains lookaside memory.  (Table objects in the schema do not use\n** lookaside memory, but some ephemeral Table objects do.)  Or the\n** db parameter can be used with db->pnBytesFreed to measure the memory\n** used by the Table object.\n*/\nstatic void SQLITE_NOINLINE deleteTable(sqlite3 *db, Table *pTable){\n  Index *pIndex, *pNext;\n\n#ifdef SQLITE_DEBUG\n  /* Record the number of outstanding lookaside allocations in schema Tables\n  ** prior to doing any free() operations. Since schema Tables do not use\n  ** lookaside, this number should not change.\n  **\n  ** If malloc has already failed, it may be that it failed while allocating\n  ** a Table object that was going to be marked ephemeral. So do not check\n  ** that no lookaside memory is used in this case either. */\n  int nLookaside = 0;\n  assert( db!=0 );\n  if( !db->mallocFailed && (pTable->tabFlags & TF_Ephemeral)==0 ){\n    nLookaside = sqlite3LookasideUsed(db, 0);\n  }\n#endif\n\n  /* Delete all indices associated with this table. */\n  for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){\n    pNext = pIndex->pNext;\n    assert( pIndex->pSchema==pTable->pSchema\n         || (IsVirtual(pTable) && pIndex->idxType!=SQLITE_IDXTYPE_APPDEF) );\n    if( db->pnBytesFreed==0 && !IsVirtual(pTable) ){\n      char *zName = pIndex->zName;\n      TESTONLY ( Index *pOld = ) sqlite3HashInsert(\n         &pIndex->pSchema->idxHash, zName, 0\n      );\n      assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );\n      assert( pOld==pIndex || pOld==0 );\n    }\n    sqlite3FreeIndex(db, pIndex);\n  }\n\n  if( IsOrdinaryTable(pTable) ){\n    sqlite3FkDelete(db, pTable);\n  }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  else if( IsVirtual(pTable) ){\n    sqlite3VtabClear(db, pTable);\n  }\n#endif\n  else{\n    assert( IsView(pTable) );\n    sqlite3SelectDelete(db, pTable->u.view.pSelect);\n  }\n\n  /* Delete the Table structure itself.\n  */\n  sqlite3DeleteColumnNames(db, pTable);\n  sqlite3DbFree(db, pTable->zName);\n  sqlite3DbFree(db, pTable->zColAff);\n  sqlite3ExprListDelete(db, pTable->pCheck);\n  sqlite3DbFree(db, pTable);\n\n  /* Verify that no lookaside memory was used by schema tables */\n  assert( nLookaside==0 || nLookaside==sqlite3LookasideUsed(db,0) );\n}\nSQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){\n  /* Do not delete the table until the reference count reaches zero. */\n  assert( db!=0 );\n  if( !pTable ) return;\n  if( db->pnBytesFreed==0 && (--pTable->nTabRef)>0 ) return;\n  deleteTable(db, pTable);\n}\nSQLITE_PRIVATE void sqlite3DeleteTableGeneric(sqlite3 *db, void *pTable){\n  sqlite3DeleteTable(db, (Table*)pTable);\n}\n\n\n/*\n** Unlink the given table from the hash tables and the delete the\n** table structure with all its indices and foreign keys.\n*/\nSQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){\n  Table *p;\n  Db *pDb;\n\n  assert( db!=0 );\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( zTabName );\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  testcase( zTabName[0]==0 );  /* Zero-length table names are allowed */\n  pDb = &db->aDb[iDb];\n  p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName, 0);\n  sqlite3DeleteTable(db, p);\n  db->mDbFlags |= DBFLAG_SchemaChange;\n}\n\n/*\n** Given a token, return a string that consists of the text of that\n** token.  Space to hold the returned string\n** is obtained from sqliteMalloc() and must be freed by the calling\n** function.\n**\n** Any quotation marks (ex:  \"name\", 'name', [name], or `name`) that\n** surround the body of the token are removed.\n**\n** Tokens are often just pointers into the original SQL text and so\n** are not \\000 terminated and are not persistent.  The returned string\n** is \\000 terminated and is persistent.\n*/\nSQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, const Token *pName){\n  char *zName;\n  if( pName ){\n    zName = sqlite3DbStrNDup(db, (const char*)pName->z, pName->n);\n    sqlite3Dequote(zName);\n  }else{\n    zName = 0;\n  }\n  return zName;\n}\n\n/*\n** Open the sqlite_schema table stored in database number iDb for\n** writing. The table is opened using cursor 0.\n*/\nSQLITE_PRIVATE void sqlite3OpenSchemaTable(Parse *p, int iDb){\n  Vdbe *v = sqlite3GetVdbe(p);\n  sqlite3TableLock(p, iDb, SCHEMA_ROOT, 1, LEGACY_SCHEMA_TABLE);\n  sqlite3VdbeAddOp4Int(v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5);\n  if( p->nTab==0 ){\n    p->nTab = 1;\n  }\n}\n\n/*\n** Parameter zName points to a nul-terminated buffer containing the name\n** of a database (\"main\", \"temp\" or the name of an attached db). This\n** function returns the index of the named database in db->aDb[], or\n** -1 if the named db cannot be found.\n*/\nSQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){\n  int i = -1;         /* Database number */\n  if( zName ){\n    Db *pDb;\n    for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){\n      if( 0==sqlite3_stricmp(pDb->zDbSName, zName) ) break;\n      /* \"main\" is always an acceptable alias for the primary database\n      ** even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. */\n      if( i==0 && 0==sqlite3_stricmp(\"main\", zName) ) break;\n    }\n  }\n  return i;\n}\n\n/*\n** The token *pName contains the name of a database (either \"main\" or\n** \"temp\" or the name of an attached db). This routine returns the\n** index of the named database in db->aDb[], or -1 if the named db\n** does not exist.\n*/\nSQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){\n  int i;                               /* Database number */\n  char *zName;                         /* Name we are searching for */\n  zName = sqlite3NameFromToken(db, pName);\n  i = sqlite3FindDbName(db, zName);\n  sqlite3DbFree(db, zName);\n  return i;\n}\n\n/* The table or view or trigger name is passed to this routine via tokens\n** pName1 and pName2. If the table name was fully qualified, for example:\n**\n** CREATE TABLE xxx.yyy (...);\n**\n** Then pName1 is set to \"xxx\" and pName2 \"yyy\". On the other hand if\n** the table name is not fully qualified, i.e.:\n**\n** CREATE TABLE yyy(...);\n**\n** Then pName1 is set to \"yyy\" and pName2 is \"\".\n**\n** This routine sets the *ppUnqual pointer to point at the token (pName1 or\n** pName2) that stores the unqualified table name.  The index of the\n** database \"xxx\" is returned.\n*/\nSQLITE_PRIVATE int sqlite3TwoPartName(\n  Parse *pParse,      /* Parsing and code generating context */\n  Token *pName1,      /* The \"xxx\" in the name \"xxx.yyy\" or \"xxx\" */\n  Token *pName2,      /* The \"yyy\" in the name \"xxx.yyy\" */\n  Token **pUnqual     /* Write the unqualified object name here */\n){\n  int iDb;                    /* Database holding the object */\n  sqlite3 *db = pParse->db;\n\n  assert( pName2!=0 );\n  if( pName2->n>0 ){\n    if( db->init.busy ) {\n      sqlite3ErrorMsg(pParse, \"corrupt database\");\n      return -1;\n    }\n    *pUnqual = pName2;\n    iDb = sqlite3FindDb(db, pName1);\n    if( iDb<0 ){\n      sqlite3ErrorMsg(pParse, \"unknown database %T\", pName1);\n      return -1;\n    }\n  }else{\n    assert( db->init.iDb==0 || db->init.busy || IN_SPECIAL_PARSE\n             || (db->mDbFlags & DBFLAG_Vacuum)!=0);\n    iDb = db->init.iDb;\n    *pUnqual = pName1;\n  }\n  return iDb;\n}\n\n/*\n** True if PRAGMA writable_schema is ON\n*/\nSQLITE_PRIVATE int sqlite3WritableSchema(sqlite3 *db){\n  testcase( (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==0 );\n  testcase( (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==\n               SQLITE_WriteSchema );\n  testcase( (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==\n               SQLITE_Defensive );\n  testcase( (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==\n               (SQLITE_WriteSchema|SQLITE_Defensive) );\n  return (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==SQLITE_WriteSchema;\n}\n\n/*\n** This routine is used to check if the UTF-8 string zName is a legal\n** unqualified name for a new schema object (table, index, view or\n** trigger). All names are legal except those that begin with the string\n** \"sqlite_\" (in upper, lower or mixed case). This portion of the namespace\n** is reserved for internal use.\n**\n** When parsing the sqlite_schema table, this routine also checks to\n** make sure the \"type\", \"name\", and \"tbl_name\" columns are consistent\n** with the SQL.\n*/\nSQLITE_PRIVATE int sqlite3CheckObjectName(\n  Parse *pParse,            /* Parsing context */\n  const char *zName,        /* Name of the object to check */\n  const char *zType,        /* Type of this object */\n  const char *zTblName      /* Parent table name for triggers and indexes */\n){\n  sqlite3 *db = pParse->db;\n  if( sqlite3WritableSchema(db)\n   || db->init.imposterTable\n   || !sqlite3Config.bExtraSchemaChecks\n  ){\n    /* Skip these error checks for writable_schema=ON */\n    return SQLITE_OK;\n  }\n  if( db->init.busy ){\n    if( sqlite3_stricmp(zType, db->init.azInit[0])\n     || sqlite3_stricmp(zName, db->init.azInit[1])\n     || sqlite3_stricmp(zTblName, db->init.azInit[2])\n    ){\n      sqlite3ErrorMsg(pParse, \"\"); /* corruptSchema() will supply the error */\n      return SQLITE_ERROR;\n    }\n  }else{\n    if( (pParse->nested==0 && 0==sqlite3StrNICmp(zName, \"sqlite_\", 7))\n     || (sqlite3ReadOnlyShadowTables(db) && sqlite3ShadowTableName(db, zName))\n    ){\n      sqlite3ErrorMsg(pParse, \"object name reserved for internal use: %s\",\n                      zName);\n      return SQLITE_ERROR;\n    }\n\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return the PRIMARY KEY index of a table\n*/\nSQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table *pTab){\n  Index *p;\n  for(p=pTab->pIndex; p && !IsPrimaryKeyIndex(p); p=p->pNext){}\n  return p;\n}\n\n/*\n** Convert an table column number into a index column number.  That is,\n** for the column iCol in the table (as defined by the CREATE TABLE statement)\n** find the (first) offset of that column in index pIdx.  Or return -1\n** if column iCol is not used in index pIdx.\n*/\nSQLITE_PRIVATE int sqlite3TableColumnToIndex(Index *pIdx, int iCol){\n  int i;\n  i16 iCol16;\n  assert( iCol>=(-1) && iCol<=SQLITE_MAX_COLUMN );\n  assert( pIdx->nColumn<=SQLITE_MAX_COLUMN*2 );\n  iCol16 = iCol;\n  for(i=0; i<pIdx->nColumn; i++){\n    if( iCol16==pIdx->aiColumn[i] ){\n      return i;\n    }\n  }\n  return -1;\n}\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n/* Convert a storage column number into a table column number.\n**\n** The storage column number (0,1,2,....) is the index of the value\n** as it appears in the record on disk.  The true column number\n** is the index (0,1,2,...) of the column in the CREATE TABLE statement.\n**\n** The storage column number is less than the table column number if\n** and only there are VIRTUAL columns to the left.\n**\n** If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro.\n*/\nSQLITE_PRIVATE i16 sqlite3StorageColumnToTable(Table *pTab, i16 iCol){\n  if( pTab->tabFlags & TF_HasVirtual ){\n    int i;\n    for(i=0; i<=iCol; i++){\n      if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ) iCol++;\n    }\n  }\n  return iCol;\n}\n#endif\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n/* Convert a table column number into a storage column number.\n**\n** The storage column number (0,1,2,....) is the index of the value\n** as it appears in the record on disk.  Or, if the input column is\n** the N-th virtual column (zero-based) then the storage number is\n** the number of non-virtual columns in the table plus N.\n**\n** The true column number is the index (0,1,2,...) of the column in\n** the CREATE TABLE statement.\n**\n** If the input column is a VIRTUAL column, then it should not appear\n** in storage.  But the value sometimes is cached in registers that\n** follow the range of registers used to construct storage.  This\n** avoids computing the same VIRTUAL column multiple times, and provides\n** values for use by OP_Param opcodes in triggers.  Hence, if the\n** input column is a VIRTUAL table, put it after all the other columns.\n**\n** In the following, N means \"normal column\", S means STORED, and\n** V means VIRTUAL.  Suppose the CREATE TABLE has columns like this:\n**\n**        CREATE TABLE ex(N,S,V,N,S,V,N,S,V);\n**                     -- 0 1 2 3 4 5 6 7 8\n**\n** Then the mapping from this function is as follows:\n**\n**    INPUTS:     0 1 2 3 4 5 6 7 8\n**    OUTPUTS:    0 1 6 2 3 7 4 5 8\n**\n** So, in other words, this routine shifts all the virtual columns to\n** the end.\n**\n** If SQLITE_OMIT_GENERATED_COLUMNS then there are no virtual columns and\n** this routine is a no-op macro.  If the pTab does not have any virtual\n** columns, then this routine is no-op that always return iCol.  If iCol\n** is negative (indicating the ROWID column) then this routine return iCol.\n*/\nSQLITE_PRIVATE i16 sqlite3TableColumnToStorage(Table *pTab, i16 iCol){\n  int i;\n  i16 n;\n  assert( iCol<pTab->nCol );\n  if( (pTab->tabFlags & TF_HasVirtual)==0 || iCol<0 ) return iCol;\n  for(i=0, n=0; i<iCol; i++){\n    if( (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ) n++;\n  }\n  if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ){\n    /* iCol is a virtual column itself */\n    return pTab->nNVCol + i - n;\n  }else{\n    /* iCol is a normal or stored column */\n    return n;\n  }\n}\n#endif\n\n/*\n** Insert a single OP_JournalMode query opcode in order to force the\n** prepared statement to return false for sqlite3_stmt_readonly().  This\n** is used by CREATE TABLE IF NOT EXISTS and similar if the table already\n** exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS\n** will return false for sqlite3_stmt_readonly() even if that statement\n** is a read-only no-op.\n*/\nstatic void sqlite3ForceNotReadOnly(Parse *pParse){\n  int iReg = ++pParse->nMem;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  if( v ){\n    sqlite3VdbeAddOp3(v, OP_JournalMode, 0, iReg, PAGER_JOURNALMODE_QUERY);\n    sqlite3VdbeUsesBtree(v, 0);\n  }\n}\n\n/*\n** Begin constructing a new table representation in memory.  This is\n** the first of several action routines that get called in response\n** to a CREATE TABLE statement.  In particular, this routine is called\n** after seeing tokens \"CREATE\" and \"TABLE\" and the table name. The isTemp\n** flag is true if the table should be stored in the auxiliary database\n** file instead of in the main database file.  This is normally the case\n** when the \"TEMP\" or \"TEMPORARY\" keyword occurs in between\n** CREATE and TABLE.\n**\n** The new table record is initialized and put in pParse->pNewTable.\n** As more of the CREATE TABLE statement is parsed, additional action\n** routines will be called to add more information to this record.\n** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine\n** is called to complete the construction of the new table record.\n*/\nSQLITE_PRIVATE void sqlite3StartTable(\n  Parse *pParse,   /* Parser context */\n  Token *pName1,   /* First part of the name of the table or view */\n  Token *pName2,   /* Second part of the name of the table or view */\n  int isTemp,      /* True if this is a TEMP table */\n  int isView,      /* True if this is a VIEW */\n  int isVirtual,   /* True if this is a VIRTUAL table */\n  int noErr        /* Do nothing if table already exists */\n){\n  Table *pTable;\n  char *zName = 0; /* The name of the new table */\n  sqlite3 *db = pParse->db;\n  Vdbe *v;\n  int iDb;         /* Database number to create the table in */\n  Token *pName;    /* Unqualified name of the table to create */\n\n  if( db->init.busy && db->init.newTnum==1 ){\n    /* Special case:  Parsing the sqlite_schema or sqlite_temp_schema schema */\n    iDb = db->init.iDb;\n    zName = sqlite3DbStrDup(db, SCHEMA_TABLE(iDb));\n    pName = pName1;\n  }else{\n    /* The common case */\n    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);\n    if( iDb<0 ) return;\n    if( !OMIT_TEMPDB && isTemp && pName2->n>0 && iDb!=1 ){\n      /* If creating a temp table, the name may not be qualified. Unless\n      ** the database name is \"temp\" anyway.  */\n      sqlite3ErrorMsg(pParse, \"temporary table name must be unqualified\");\n      return;\n    }\n    if( !OMIT_TEMPDB && isTemp ) iDb = 1;\n    zName = sqlite3NameFromToken(db, pName);\n    if( IN_RENAME_OBJECT ){\n      sqlite3RenameTokenMap(pParse, (void*)zName, pName);\n    }\n  }\n  pParse->sNameToken = *pName;\n  if( zName==0 ) return;\n  if( sqlite3CheckObjectName(pParse, zName, isView?\"view\":\"table\", zName) ){\n    goto begin_table_error;\n  }\n  if( db->init.iDb==1 ) isTemp = 1;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  assert( isTemp==0 || isTemp==1 );\n  assert( isView==0 || isView==1 );\n  {\n    static const u8 aCode[] = {\n       SQLITE_CREATE_TABLE,\n       SQLITE_CREATE_TEMP_TABLE,\n       SQLITE_CREATE_VIEW,\n       SQLITE_CREATE_TEMP_VIEW\n    };\n    char *zDb = db->aDb[iDb].zDbSName;\n    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){\n      goto begin_table_error;\n    }\n    if( !isVirtual && sqlite3AuthCheck(pParse, (int)aCode[isTemp+2*isView],\n                                       zName, 0, zDb) ){\n      goto begin_table_error;\n    }\n  }\n#endif\n\n  /* Make sure the new table name does not collide with an existing\n  ** index or table name in the same database.  Issue an error message if\n  ** it does. The exception is if the statement being parsed was passed\n  ** to an sqlite3_declare_vtab() call. In that case only the column names\n  ** and types will be used, so there is no need to test for namespace\n  ** collisions.\n  */\n  if( !IN_SPECIAL_PARSE ){\n    char *zDb = db->aDb[iDb].zDbSName;\n    if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n      goto begin_table_error;\n    }\n    pTable = sqlite3FindTable(db, zName, zDb);\n    if( pTable ){\n      if( !noErr ){\n        sqlite3ErrorMsg(pParse, \"%s %T already exists\",\n                        (IsView(pTable)? \"view\" : \"table\"), pName);\n      }else{\n        assert( !db->init.busy || CORRUPT_DB );\n        sqlite3CodeVerifySchema(pParse, iDb);\n        sqlite3ForceNotReadOnly(pParse);\n      }\n      goto begin_table_error;\n    }\n    if( sqlite3FindIndex(db, zName, zDb)!=0 ){\n      sqlite3ErrorMsg(pParse, \"there is already an index named %s\", zName);\n      goto begin_table_error;\n    }\n  }\n\n  pTable = sqlite3DbMallocZero(db, sizeof(Table));\n  if( pTable==0 ){\n    assert( db->mallocFailed );\n    pParse->rc = SQLITE_NOMEM_BKPT;\n    pParse->nErr++;\n    goto begin_table_error;\n  }\n  pTable->zName = zName;\n  pTable->iPKey = -1;\n  pTable->pSchema = db->aDb[iDb].pSchema;\n  pTable->nTabRef = 1;\n#ifdef SQLITE_DEFAULT_ROWEST\n  pTable->nRowLogEst = sqlite3LogEst(SQLITE_DEFAULT_ROWEST);\n#else\n  pTable->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );\n#endif\n  assert( pParse->pNewTable==0 );\n  pParse->pNewTable = pTable;\n\n  /* Begin generating the code that will insert the table record into\n  ** the schema table.  Note in particular that we must go ahead\n  ** and allocate the record number for the table entry now.  Before any\n  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause\n  ** indices to be created and the table record must come before the\n  ** indices.  Hence, the record number for the table must be allocated\n  ** now.\n  */\n  if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){\n    int addr1;\n    int fileFormat;\n    int reg1, reg2, reg3;\n    /* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */\n    static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };\n    sqlite3BeginWriteOperation(pParse, 1, iDb);\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( isVirtual ){\n      sqlite3VdbeAddOp0(v, OP_VBegin);\n    }\n#endif\n\n    /* If the file format and encoding in the database have not been set,\n    ** set them now.\n    */\n    assert( pParse->isCreate );\n    reg1 = pParse->u1.cr.regRowid = ++pParse->nMem;\n    reg2 = pParse->u1.cr.regRoot = ++pParse->nMem;\n    reg3 = ++pParse->nMem;\n    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);\n    sqlite3VdbeUsesBtree(v, iDb);\n    addr1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);\n    fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?\n                  1 : SQLITE_MAX_FILE_FORMAT;\n    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, fileFormat);\n    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, ENC(db));\n    sqlite3VdbeJumpHere(v, addr1);\n\n    /* This just creates a place-holder record in the sqlite_schema table.\n    ** The record created does not contain anything yet.  It will be replaced\n    ** by the real entry in code generated at sqlite3EndTable().\n    **\n    ** The rowid for the new entry is left in register pParse->u1.cr.regRowid.\n    ** The root page of the new table is left in reg pParse->u1.cr.regRoot.\n    ** The rowid and root page number values are needed by the code that\n    ** sqlite3EndTable will generate.\n    */\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)\n    if( isView || isVirtual ){\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, reg2);\n    }else\n#endif\n    {\n      assert( !pParse->bReturning );\n      pParse->u1.cr.addrCrTab =\n         sqlite3VdbeAddOp3(v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY);\n    }\n    sqlite3OpenSchemaTable(pParse, iDb);\n    sqlite3VdbeAddOp2(v, OP_NewRowid, 0, reg1);\n    sqlite3VdbeAddOp4(v, OP_Blob, 6, reg3, 0, nullRow, P4_STATIC);\n    sqlite3VdbeAddOp3(v, OP_Insert, 0, reg3, reg1);\n    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n    sqlite3VdbeAddOp0(v, OP_Close);\n  }else if( db->init.imposterTable ){\n    pTable->tabFlags |= TF_Imposter;\n    if( db->init.imposterTable>=2 ) pTable->tabFlags |= TF_Readonly;\n  }\n\n  /* Normal (non-error) return. */\n  return;\n\n  /* If an error occurs, we jump here */\nbegin_table_error:\n  pParse->checkSchema = 1;\n  sqlite3DbFree(db, zName);\n  return;\n}\n\n/* Set properties of a table column based on the (magical)\n** name of the column.\n*/\n#if SQLITE_ENABLE_HIDDEN_COLUMNS\nSQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){\n  if( sqlite3_strnicmp(pCol->zCnName, \"__hidden__\", 10)==0 ){\n    pCol->colFlags |= COLFLAG_HIDDEN;\n    if( pTab ) pTab->tabFlags |= TF_HasHidden;\n  }else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){\n    pTab->tabFlags |= TF_OOOHidden;\n  }\n}\n#endif\n\n/*\n** Clean up the data structures associated with the RETURNING clause.\n*/\nstatic void sqlite3DeleteReturning(sqlite3 *db, void *pArg){\n  Returning *pRet = (Returning*)pArg;\n  Hash *pHash;\n  pHash = &(db->aDb[1].pSchema->trigHash);\n  sqlite3HashInsert(pHash, pRet->zName, 0);\n  sqlite3ExprListDelete(db, pRet->pReturnEL);\n  sqlite3DbFree(db, pRet);\n}\n\n/*\n** Add the RETURNING clause to the parse currently underway.\n**\n** This routine creates a special TEMP trigger that will fire for each row\n** of the DML statement.  That TEMP trigger contains a single SELECT\n** statement with a result set that is the argument of the RETURNING clause.\n** The trigger has the Trigger.bReturning flag and an opcode of\n** TK_RETURNING instead of TK_SELECT, so that the trigger code generator\n** knows to handle it specially.  The TEMP trigger is automatically\n** removed at the end of the parse.\n**\n** When this routine is called, we do not yet know if the RETURNING clause\n** is attached to a DELETE, INSERT, or UPDATE, so construct it as a\n** RETURNING trigger instead.  It will then be converted into the appropriate\n** type on the first call to sqlite3TriggersExist().\n*/\nSQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){\n  Returning *pRet;\n  Hash *pHash;\n  sqlite3 *db = pParse->db;\n  if( pParse->pNewTrigger ){\n    sqlite3ErrorMsg(pParse, \"cannot use RETURNING in a trigger\");\n  }else{\n    assert( pParse->bReturning==0 || pParse->ifNotExists );\n  }\n  pParse->bReturning = 1;\n  pRet = sqlite3DbMallocZero(db, sizeof(*pRet));\n  if( pRet==0 ){\n    sqlite3ExprListDelete(db, pList);\n    return;\n  }\n  assert( !pParse->isCreate );\n  pParse->u1.d.pReturning = pRet;\n  pRet->pParse = pParse;\n  pRet->pReturnEL = pList;\n  sqlite3ParserAddCleanup(pParse, sqlite3DeleteReturning, pRet);\n  testcase( pParse->earlyCleanup );\n  if( db->mallocFailed ) return;\n  sqlite3_snprintf(sizeof(pRet->zName), pRet->zName,\n                   \"sqlite_returning_%p\", pParse);\n  pRet->retTrig.zName = pRet->zName;\n  pRet->retTrig.op = TK_RETURNING;\n  pRet->retTrig.tr_tm = TRIGGER_AFTER;\n  pRet->retTrig.bReturning = 1;\n  pRet->retTrig.pSchema = db->aDb[1].pSchema;\n  pRet->retTrig.pTabSchema = db->aDb[1].pSchema;\n  pRet->retTrig.step_list = &pRet->retTStep;\n  pRet->retTStep.op = TK_RETURNING;\n  pRet->retTStep.pTrig = &pRet->retTrig;\n  pRet->retTStep.pExprList = pList;\n  pHash = &(db->aDb[1].pSchema->trigHash);\n  assert( sqlite3HashFind(pHash, pRet->zName)==0\n          || pParse->nErr  || pParse->ifNotExists );\n  if( sqlite3HashInsert(pHash, pRet->zName, &pRet->retTrig)\n          ==&pRet->retTrig ){\n    sqlite3OomFault(db);\n  }\n}\n\n/*\n** Add a new column to the table currently being constructed.\n**\n** The parser calls this routine once for each column declaration\n** in a CREATE TABLE statement.  sqlite3StartTable() gets called\n** first to get things going.  Then this routine is called for each\n** column.\n*/\nSQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token sName, Token sType){\n  Table *p;\n  int i;\n  char *z;\n  char *zType;\n  Column *pCol;\n  sqlite3 *db = pParse->db;\n  Column *aNew;\n  u8 eType = COLTYPE_CUSTOM;\n  u8 szEst = 1;\n  char affinity = SQLITE_AFF_BLOB;\n\n  if( (p = pParse->pNewTable)==0 ) return;\n  if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){\n    sqlite3ErrorMsg(pParse, \"too many columns on %s\", p->zName);\n    return;\n  }\n  if( !IN_RENAME_OBJECT ) sqlite3DequoteToken(&sName);\n\n  /* Because keywords GENERATE ALWAYS can be converted into identifiers\n  ** by the parser, we can sometimes end up with a typename that ends\n  ** with \"generated always\".  Check for this case and omit the surplus\n  ** text. */\n  if( sType.n>=16\n   && sqlite3_strnicmp(sType.z+(sType.n-6),\"always\",6)==0\n  ){\n    sType.n -= 6;\n    while( ALWAYS(sType.n>0) && sqlite3Isspace(sType.z[sType.n-1]) ) sType.n--;\n    if( sType.n>=9\n     && sqlite3_strnicmp(sType.z+(sType.n-9),\"generated\",9)==0\n    ){\n      sType.n -= 9;\n      while( sType.n>0 && sqlite3Isspace(sType.z[sType.n-1]) ) sType.n--;\n    }\n  }\n\n  /* Check for standard typenames.  For standard typenames we will\n  ** set the Column.eType field rather than storing the typename after\n  ** the column name, in order to save space. */\n  if( sType.n>=3 ){\n    sqlite3DequoteToken(&sType);\n    for(i=0; i<SQLITE_N_STDTYPE; i++){\n       if( sType.n==sqlite3StdTypeLen[i]\n        && sqlite3_strnicmp(sType.z, sqlite3StdType[i], sType.n)==0\n       ){\n         sType.n = 0;\n         eType = i+1;\n         affinity = sqlite3StdTypeAffinity[i];\n         if( affinity<=SQLITE_AFF_TEXT ) szEst = 5;\n         break;\n       }\n    }\n  }\n\n  z = sqlite3DbMallocRaw(db, (i64)sName.n + 1 + (i64)sType.n + (sType.n>0) );\n  if( z==0 ) return;\n  if( IN_RENAME_OBJECT ) sqlite3RenameTokenMap(pParse, (void*)z, &sName);\n  memcpy(z, sName.z, sName.n);\n  z[sName.n] = 0;\n  sqlite3Dequote(z);\n  if( p->nCol && sqlite3ColumnIndex(p, z)>=0 ){\n    sqlite3ErrorMsg(pParse, \"duplicate column name: %s\", z);\n    sqlite3DbFree(db, z);\n    return;\n  }\n  aNew = sqlite3DbRealloc(db,p->aCol,((i64)p->nCol+1)*sizeof(p->aCol[0]));\n  if( aNew==0 ){\n    sqlite3DbFree(db, z);\n    return;\n  }\n  p->aCol = aNew;\n  pCol = &p->aCol[p->nCol];\n  memset(pCol, 0, sizeof(p->aCol[0]));\n  pCol->zCnName = z;\n  pCol->hName = sqlite3StrIHash(z);\n  sqlite3ColumnPropertiesFromName(p, pCol);\n\n  if( sType.n==0 ){\n    /* If there is no type specified, columns have the default affinity\n    ** 'BLOB' with a default size of 4 bytes. */\n    pCol->affinity = affinity;\n    pCol->eCType = eType;\n    pCol->szEst = szEst;\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    if( affinity==SQLITE_AFF_BLOB ){\n      if( 4>=sqlite3GlobalConfig.szSorterRef ){\n        pCol->colFlags |= COLFLAG_SORTERREF;\n      }\n    }\n#endif\n  }else{\n    zType = z + sqlite3Strlen30(z) + 1;\n    memcpy(zType, sType.z, sType.n);\n    zType[sType.n] = 0;\n    sqlite3Dequote(zType);\n    pCol->affinity = sqlite3AffinityType(zType, pCol);\n    pCol->colFlags |= COLFLAG_HASTYPE;\n  }\n  if( p->nCol<=0xff ){\n    u8 h = pCol->hName % sizeof(p->aHx);\n    p->aHx[h] = p->nCol;\n  }\n  p->nCol++;\n  p->nNVCol++;\n  assert( pParse->isCreate );\n  pParse->u1.cr.constraintName.n = 0;\n}\n\n/*\n** This routine is called by the parser while in the middle of\n** parsing a CREATE TABLE statement.  A \"NOT NULL\" constraint has\n** been seen on a column.  This routine sets the notNull flag on\n** the column currently under construction.\n*/\nSQLITE_PRIVATE void sqlite3AddNotNull(Parse *pParse, int onError){\n  Table *p;\n  Column *pCol;\n  p = pParse->pNewTable;\n  if( p==0 || NEVER(p->nCol<1) ) return;\n  pCol = &p->aCol[p->nCol-1];\n  pCol->notNull = (u8)onError;\n  p->tabFlags |= TF_HasNotNull;\n\n  /* Set the uniqNotNull flag on any UNIQUE or PK indexes already created\n  ** on this column.  */\n  if( pCol->colFlags & COLFLAG_UNIQUE ){\n    Index *pIdx;\n    for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){\n      assert( pIdx->nKeyCol==1 && pIdx->onError!=OE_None );\n      if( pIdx->aiColumn[0]==p->nCol-1 ){\n        pIdx->uniqNotNull = 1;\n      }\n    }\n  }\n}\n\n/*\n** Scan the column type name zType (length nType) and return the\n** associated affinity type.\n**\n** This routine does a case-independent search of zType for the\n** substrings in the following table. If one of the substrings is\n** found, the corresponding affinity is returned. If zType contains\n** more than one of the substrings, entries toward the top of\n** the table take priority. For example, if zType is 'BLOBINT',\n** SQLITE_AFF_INTEGER is returned.\n**\n** Substring     | Affinity\n** --------------------------------\n** 'INT'         | SQLITE_AFF_INTEGER\n** 'CHAR'        | SQLITE_AFF_TEXT\n** 'CLOB'        | SQLITE_AFF_TEXT\n** 'TEXT'        | SQLITE_AFF_TEXT\n** 'BLOB'        | SQLITE_AFF_BLOB\n** 'REAL'        | SQLITE_AFF_REAL\n** 'FLOA'        | SQLITE_AFF_REAL\n** 'DOUB'        | SQLITE_AFF_REAL\n**\n** If none of the substrings in the above table are found,\n** SQLITE_AFF_NUMERIC is returned.\n*/\nSQLITE_PRIVATE char sqlite3AffinityType(const char *zIn, Column *pCol){\n  u32 h = 0;\n  char aff = SQLITE_AFF_NUMERIC;\n  const char *zChar = 0;\n\n  assert( zIn!=0 );\n  while( zIn[0] ){\n    u8 x = *(u8*)zIn;\n    h = (h<<8) + sqlite3UpperToLower[x];\n    zIn++;\n    if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){             /* CHAR */\n      aff = SQLITE_AFF_TEXT;\n      zChar = zIn;\n    }else if( h==(('c'<<24)+('l'<<16)+('o'<<8)+'b') ){       /* CLOB */\n      aff = SQLITE_AFF_TEXT;\n    }else if( h==(('t'<<24)+('e'<<16)+('x'<<8)+'t') ){       /* TEXT */\n      aff = SQLITE_AFF_TEXT;\n    }else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b')          /* BLOB */\n        && (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){\n      aff = SQLITE_AFF_BLOB;\n      if( zIn[0]=='(' ) zChar = zIn;\n#ifndef SQLITE_OMIT_FLOATING_POINT\n    }else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l')          /* REAL */\n        && aff==SQLITE_AFF_NUMERIC ){\n      aff = SQLITE_AFF_REAL;\n    }else if( h==(('f'<<24)+('l'<<16)+('o'<<8)+'a')          /* FLOA */\n        && aff==SQLITE_AFF_NUMERIC ){\n      aff = SQLITE_AFF_REAL;\n    }else if( h==(('d'<<24)+('o'<<16)+('u'<<8)+'b')          /* DOUB */\n        && aff==SQLITE_AFF_NUMERIC ){\n      aff = SQLITE_AFF_REAL;\n#endif\n    }else if( (h&0x00FFFFFF)==(('i'<<16)+('n'<<8)+'t') ){    /* INT */\n      aff = SQLITE_AFF_INTEGER;\n      break;\n    }\n  }\n\n  /* If pCol is not NULL, store an estimate of the field size.  The\n  ** estimate is scaled so that the size of an integer is 1.  */\n  if( pCol ){\n    int v = 0;   /* default size is approx 4 bytes */\n    if( aff<SQLITE_AFF_NUMERIC ){\n      if( zChar ){\n        while( zChar[0] ){\n          if( sqlite3Isdigit(zChar[0]) ){\n            /* BLOB(k), VARCHAR(k), CHAR(k) -> r=(k/4+1) */\n            sqlite3GetInt32(zChar, &v);\n            break;\n          }\n          zChar++;\n        }\n      }else{\n        v = 16;   /* BLOB, TEXT, CLOB -> r=5  (approx 20 bytes)*/\n      }\n    }\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    if( v>=sqlite3GlobalConfig.szSorterRef ){\n      pCol->colFlags |= COLFLAG_SORTERREF;\n    }\n#endif\n    v = v/4 + 1;\n    if( v>255 ) v = 255;\n    pCol->szEst = v;\n  }\n  return aff;\n}\n\n/*\n** The expression is the default value for the most recently added column\n** of the table currently under construction.\n**\n** Default value expressions must be constant.  Raise an exception if this\n** is not the case.\n**\n** This routine is called by the parser while in the middle of\n** parsing a CREATE TABLE statement.\n*/\nSQLITE_PRIVATE void sqlite3AddDefaultValue(\n  Parse *pParse,           /* Parsing context */\n  Expr *pExpr,             /* The parsed expression of the default value */\n  const char *zStart,      /* Start of the default value text */\n  const char *zEnd         /* First character past end of default value text */\n){\n  Table *p;\n  Column *pCol;\n  sqlite3 *db = pParse->db;\n  p = pParse->pNewTable;\n  if( p!=0 ){\n    int isInit = db->init.busy && db->init.iDb!=1;\n    pCol = &(p->aCol[p->nCol-1]);\n    if( !sqlite3ExprIsConstantOrFunction(pExpr, isInit) ){\n      sqlite3ErrorMsg(pParse, \"default value of column [%s] is not constant\",\n          pCol->zCnName);\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    }else if( pCol->colFlags & COLFLAG_GENERATED ){\n      testcase( pCol->colFlags & COLFLAG_VIRTUAL );\n      testcase( pCol->colFlags & COLFLAG_STORED );\n      sqlite3ErrorMsg(pParse, \"cannot use DEFAULT on a generated column\");\n#endif\n    }else{\n      /* A copy of pExpr is used instead of the original, as pExpr contains\n      ** tokens that point to volatile memory.\n      */\n      Expr x, *pDfltExpr;\n      memset(&x, 0, sizeof(x));\n      x.op = TK_SPAN;\n      x.u.zToken = sqlite3DbSpanDup(db, zStart, zEnd);\n      x.pLeft = pExpr;\n      x.flags = EP_Skip;\n      pDfltExpr = sqlite3ExprDup(db, &x, EXPRDUP_REDUCE);\n      sqlite3DbFree(db, x.u.zToken);\n      sqlite3ColumnSetExpr(pParse, p, pCol, pDfltExpr);\n    }\n  }\n  if( IN_RENAME_OBJECT ){\n    sqlite3RenameExprUnmap(pParse, pExpr);\n  }\n  sqlite3ExprDelete(db, pExpr);\n}\n\n/*\n** Backwards Compatibility Hack:\n**\n** Historical versions of SQLite accepted strings as column names in\n** indexes and PRIMARY KEY constraints and in UNIQUE constraints.  Example:\n**\n**     CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim)\n**     CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC);\n**\n** This is goofy.  But to preserve backwards compatibility we continue to\n** accept it.  This routine does the necessary conversion.  It converts\n** the expression given in its argument from a TK_STRING into a TK_ID\n** if the expression is just a TK_STRING with an optional COLLATE clause.\n** If the expression is anything other than TK_STRING, the expression is\n** unchanged.\n*/\nstatic void sqlite3StringToId(Expr *p){\n  if( p->op==TK_STRING ){\n    p->op = TK_ID;\n  }else if( p->op==TK_COLLATE && p->pLeft->op==TK_STRING ){\n    p->pLeft->op = TK_ID;\n  }\n}\n\n/*\n** Tag the given column as being part of the PRIMARY KEY\n*/\nstatic void makeColumnPartOfPrimaryKey(Parse *pParse, Column *pCol){\n  pCol->colFlags |= COLFLAG_PRIMKEY;\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  if( pCol->colFlags & COLFLAG_GENERATED ){\n    testcase( pCol->colFlags & COLFLAG_VIRTUAL );\n    testcase( pCol->colFlags & COLFLAG_STORED );\n    sqlite3ErrorMsg(pParse,\n      \"generated columns cannot be part of the PRIMARY KEY\");\n  }\n#endif\n}\n\n/*\n** Designate the PRIMARY KEY for the table.  pList is a list of names\n** of columns that form the primary key.  If pList is NULL, then the\n** most recently added column of the table is the primary key.\n**\n** A table can have at most one primary key.  If the table already has\n** a primary key (and this is the second primary key) then create an\n** error.\n**\n** If the PRIMARY KEY is on a single column whose datatype is INTEGER,\n** then we will try to use that column as the rowid.  Set the Table.iPKey\n** field of the table under construction to be the index of the\n** INTEGER PRIMARY KEY column.  Table.iPKey is set to -1 if there is\n** no INTEGER PRIMARY KEY.\n**\n** If the key is not an INTEGER PRIMARY KEY, then create a unique\n** index for the key.  No index is created for INTEGER PRIMARY KEYs.\n*/\nSQLITE_PRIVATE void sqlite3AddPrimaryKey(\n  Parse *pParse,    /* Parsing context */\n  ExprList *pList,  /* List of field names to be indexed */\n  int onError,      /* What to do with a uniqueness conflict */\n  int autoInc,      /* True if the AUTOINCREMENT keyword is present */\n  int sortOrder     /* SQLITE_SO_ASC or SQLITE_SO_DESC */\n){\n  Table *pTab = pParse->pNewTable;\n  Column *pCol = 0;\n  int iCol = -1, i;\n  int nTerm;\n  if( pTab==0 ) goto primary_key_exit;\n  if( pTab->tabFlags & TF_HasPrimaryKey ){\n    sqlite3ErrorMsg(pParse,\n      \"table \\\"%s\\\" has more than one primary key\", pTab->zName);\n    goto primary_key_exit;\n  }\n  pTab->tabFlags |= TF_HasPrimaryKey;\n  if( pList==0 ){\n    iCol = pTab->nCol - 1;\n    pCol = &pTab->aCol[iCol];\n    makeColumnPartOfPrimaryKey(pParse, pCol);\n    nTerm = 1;\n  }else{\n    nTerm = pList->nExpr;\n    for(i=0; i<nTerm; i++){\n      Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[i].pExpr);\n      assert( pCExpr!=0 );\n      sqlite3StringToId(pCExpr);\n      if( pCExpr->op==TK_ID ){\n        assert( !ExprHasProperty(pCExpr, EP_IntValue) );\n        iCol = sqlite3ColumnIndex(pTab, pCExpr->u.zToken);\n        if( iCol>=0 ){\n          pCol = &pTab->aCol[iCol];\n          makeColumnPartOfPrimaryKey(pParse, pCol);\n        }\n      }\n    }\n  }\n  if( nTerm==1\n   && pCol\n   && pCol->eCType==COLTYPE_INTEGER\n   && sortOrder!=SQLITE_SO_DESC\n  ){\n    if( IN_RENAME_OBJECT && pList ){\n      Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[0].pExpr);\n      sqlite3RenameTokenRemap(pParse, &pTab->iPKey, pCExpr);\n    }\n    pTab->iPKey = iCol;\n    pTab->keyConf = (u8)onError;\n    assert( autoInc==0 || autoInc==1 );\n    pTab->tabFlags |= autoInc*TF_Autoincrement;\n    if( pList ) pParse->iPkSortOrder = pList->a[0].fg.sortFlags;\n    (void)sqlite3HasExplicitNulls(pParse, pList);\n  }else if( autoInc ){\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n    sqlite3ErrorMsg(pParse, \"AUTOINCREMENT is only allowed on an \"\n       \"INTEGER PRIMARY KEY\");\n#endif\n  }else{\n    sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0,\n                           0, sortOrder, 0, SQLITE_IDXTYPE_PRIMARYKEY);\n    pList = 0;\n  }\n\nprimary_key_exit:\n  sqlite3ExprListDelete(pParse->db, pList);\n  return;\n}\n\n/*\n** Add a new CHECK constraint to the table currently under construction.\n*/\nSQLITE_PRIVATE void sqlite3AddCheckConstraint(\n  Parse *pParse,      /* Parsing context */\n  Expr *pCheckExpr,   /* The check expression */\n  const char *zStart, /* Opening \"(\" */\n  const char *zEnd    /* Closing \")\" */\n){\n#ifndef SQLITE_OMIT_CHECK\n  Table *pTab = pParse->pNewTable;\n  sqlite3 *db = pParse->db;\n  if( pTab && !IN_DECLARE_VTAB\n   && !sqlite3BtreeIsReadonly(db->aDb[db->init.iDb].pBt)\n  ){\n    pTab->pCheck = sqlite3ExprListAppend(pParse, pTab->pCheck, pCheckExpr);\n    assert( pParse->isCreate );\n    if( pParse->u1.cr.constraintName.n ){\n      sqlite3ExprListSetName(pParse, pTab->pCheck,\n                             &pParse->u1.cr.constraintName, 1);\n    }else{\n      Token t;\n      for(zStart++; sqlite3Isspace(zStart[0]); zStart++){}\n      while( sqlite3Isspace(zEnd[-1]) ){ zEnd--; }\n      t.z = zStart;\n      t.n = (int)(zEnd - t.z);\n      sqlite3ExprListSetName(pParse, pTab->pCheck, &t, 1);\n    }\n  }else\n#endif\n  {\n    sqlite3ExprDelete(pParse->db, pCheckExpr);\n  }\n}\n\n/*\n** Set the collation function of the most recently parsed table column\n** to the CollSeq given.\n*/\nSQLITE_PRIVATE void sqlite3AddCollateType(Parse *pParse, Token *pToken){\n  Table *p;\n  int i;\n  char *zColl;              /* Dequoted name of collation sequence */\n  sqlite3 *db;\n\n  if( (p = pParse->pNewTable)==0 || IN_RENAME_OBJECT ) return;\n  i = p->nCol-1;\n  db = pParse->db;\n  zColl = sqlite3NameFromToken(db, pToken);\n  if( !zColl ) return;\n\n  if( sqlite3LocateCollSeq(pParse, zColl) ){\n    Index *pIdx;\n    sqlite3ColumnSetColl(db, &p->aCol[i], zColl);\n\n    /* If the column is declared as \"<name> PRIMARY KEY COLLATE <type>\",\n    ** then an index may have been created on this column before the\n    ** collation type was added. Correct this if it is the case.\n    */\n    for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){\n      assert( pIdx->nKeyCol==1 );\n      if( pIdx->aiColumn[0]==i ){\n        pIdx->azColl[0] = sqlite3ColumnColl(&p->aCol[i]);\n      }\n    }\n  }\n  sqlite3DbFree(db, zColl);\n}\n\n/* Change the most recently parsed column to be a GENERATED ALWAYS AS\n** column.\n*/\nSQLITE_PRIVATE void sqlite3AddGenerated(Parse *pParse, Expr *pExpr, Token *pType){\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  u8 eType = COLFLAG_VIRTUAL;\n  Table *pTab = pParse->pNewTable;\n  Column *pCol;\n  if( pTab==0 ){\n    /* generated column in an CREATE TABLE IF NOT EXISTS that already exists */\n    goto generated_done;\n  }\n  pCol = &(pTab->aCol[pTab->nCol-1]);\n  if( IN_DECLARE_VTAB ){\n    sqlite3ErrorMsg(pParse, \"virtual tables cannot use computed columns\");\n    goto generated_done;\n  }\n  if( pCol->iDflt>0 ) goto generated_error;\n  if( pType ){\n    if( pType->n==7 && sqlite3StrNICmp(\"virtual\",pType->z,7)==0 ){\n      /* no-op */\n    }else if( pType->n==6 && sqlite3StrNICmp(\"stored\",pType->z,6)==0 ){\n      eType = COLFLAG_STORED;\n    }else{\n      goto generated_error;\n    }\n  }\n  if( eType==COLFLAG_VIRTUAL ) pTab->nNVCol--;\n  pCol->colFlags |= eType;\n  assert( TF_HasVirtual==COLFLAG_VIRTUAL );\n  assert( TF_HasStored==COLFLAG_STORED );\n  pTab->tabFlags |= eType;\n  if( pCol->colFlags & COLFLAG_PRIMKEY ){\n    makeColumnPartOfPrimaryKey(pParse, pCol); /* For the error message */\n  }\n  if( ALWAYS(pExpr) && pExpr->op==TK_ID ){\n    /* The value of a generated column needs to be a real expression, not\n    ** just a reference to another column, in order for covering index\n    ** optimizations to work correctly.  So if the value is not an expression,\n    ** turn it into one by adding a unary \"+\" operator. */\n    pExpr = sqlite3PExpr(pParse, TK_UPLUS, pExpr, 0);\n  }\n  if( pExpr && pExpr->op!=TK_RAISE ) pExpr->affExpr = pCol->affinity;\n  sqlite3ColumnSetExpr(pParse, pTab, pCol, pExpr);\n  pExpr = 0;\n  goto generated_done;\n\ngenerated_error:\n  sqlite3ErrorMsg(pParse, \"error in generated column \\\"%s\\\"\",\n                  pCol->zCnName);\ngenerated_done:\n  sqlite3ExprDelete(pParse->db, pExpr);\n#else\n  /* Throw and error for the GENERATED ALWAYS AS clause if the\n  ** SQLITE_OMIT_GENERATED_COLUMNS compile-time option is used. */\n  sqlite3ErrorMsg(pParse, \"generated columns not supported\");\n  sqlite3ExprDelete(pParse->db, pExpr);\n#endif\n}\n\n/*\n** Generate code that will increment the schema cookie.\n**\n** The schema cookie is used to determine when the schema for the\n** database changes.  After each schema change, the cookie value\n** changes.  When a process first reads the schema it records the\n** cookie.  Thereafter, whenever it goes to access the database,\n** it checks the cookie to make sure the schema has not changed\n** since it was last read.\n**\n** This plan is not completely bullet-proof.  It is possible for\n** the schema to change multiple times and for the cookie to be\n** set back to prior value.  But schema changes are infrequent\n** and the probability of hitting the same cookie value is only\n** 1 chance in 2^32.  So we're safe enough.\n**\n** IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments\n** the schema-version whenever the schema changes.\n*/\nSQLITE_PRIVATE void sqlite3ChangeCookie(Parse *pParse, int iDb){\n  sqlite3 *db = pParse->db;\n  Vdbe *v = pParse->pVdbe;\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION,\n                   (int)(1+(unsigned)db->aDb[iDb].pSchema->schema_cookie));\n}\n\n/*\n** Measure the number of characters needed to output the given\n** identifier.  The number returned includes any quotes used\n** but does not include the null terminator.\n**\n** The estimate is conservative.  It might be larger that what is\n** really needed.\n*/\nstatic int identLength(const char *z){\n  int n;\n  for(n=0; *z; n++, z++){\n    if( *z=='\"' ){ n++; }\n  }\n  return n + 2;\n}\n\n/*\n** The first parameter is a pointer to an output buffer. The second\n** parameter is a pointer to an integer that contains the offset at\n** which to write into the output buffer. This function copies the\n** nul-terminated string pointed to by the third parameter, zSignedIdent,\n** to the specified offset in the buffer and updates *pIdx to refer\n** to the first byte after the last byte written before returning.\n**\n** If the string zSignedIdent consists entirely of alphanumeric\n** characters, does not begin with a digit and is not an SQL keyword,\n** then it is copied to the output buffer exactly as it is. Otherwise,\n** it is quoted using double-quotes.\n*/\nstatic void identPut(char *z, int *pIdx, char *zSignedIdent){\n  unsigned char *zIdent = (unsigned char*)zSignedIdent;\n  int i, j, needQuote;\n  i = *pIdx;\n\n  for(j=0; zIdent[j]; j++){\n    if( !sqlite3Isalnum(zIdent[j]) && zIdent[j]!='_' ) break;\n  }\n  needQuote = sqlite3Isdigit(zIdent[0])\n            || sqlite3KeywordCode(zIdent, j)!=TK_ID\n            || zIdent[j]!=0\n            || j==0;\n\n  if( needQuote ) z[i++] = '\"';\n  for(j=0; zIdent[j]; j++){\n    z[i++] = zIdent[j];\n    if( zIdent[j]=='\"' ) z[i++] = '\"';\n  }\n  if( needQuote ) z[i++] = '\"';\n  z[i] = 0;\n  *pIdx = i;\n}\n\n/*\n** Generate a CREATE TABLE statement appropriate for the given\n** table.  Memory to hold the text of the statement is obtained\n** from sqliteMalloc() and must be freed by the calling function.\n*/\nstatic char *createTableStmt(sqlite3 *db, Table *p){\n  int i, k, len;\n  i64 n;\n  char *zStmt;\n  char *zSep, *zSep2, *zEnd;\n  Column *pCol;\n  n = 0;\n  for(pCol = p->aCol, i=0; i<p->nCol; i++, pCol++){\n    n += identLength(pCol->zCnName) + 5;\n  }\n  n += identLength(p->zName);\n  if( n<50 ){\n    zSep = \"\";\n    zSep2 = \",\";\n    zEnd = \")\";\n  }else{\n    zSep = \"\\n  \";\n    zSep2 = \",\\n  \";\n    zEnd = \"\\n)\";\n  }\n  n += 35 + 6*p->nCol;\n  zStmt = sqlite3DbMallocRaw(0, n);\n  if( zStmt==0 ){\n    sqlite3OomFault(db);\n    return 0;\n  }\n  assert( n>14 && n<=0x7fffffff );\n  memcpy(zStmt, \"CREATE TABLE \", 13);\n  k = 13;\n  identPut(zStmt, &k, p->zName);\n  zStmt[k++] = '(';\n  for(pCol=p->aCol, i=0; i<p->nCol; i++, pCol++){\n    static const char * const azType[] = {\n        /* SQLITE_AFF_BLOB    */ \"\",\n        /* SQLITE_AFF_TEXT    */ \" TEXT\",\n        /* SQLITE_AFF_NUMERIC */ \" NUM\",\n        /* SQLITE_AFF_INTEGER */ \" INT\",\n        /* SQLITE_AFF_REAL    */ \" REAL\",\n        /* SQLITE_AFF_FLEXNUM */ \" NUM\",\n    };\n    const char *zType;\n\n    len = sqlite3Strlen30(zSep);\n    assert( k+len<n );\n    memcpy(&zStmt[k], zSep, len);\n    k += len;\n    zSep = zSep2;\n    identPut(zStmt, &k, pCol->zCnName);\n    assert( k<n );\n    assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );\n    assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );\n    testcase( pCol->affinity==SQLITE_AFF_BLOB );\n    testcase( pCol->affinity==SQLITE_AFF_TEXT );\n    testcase( pCol->affinity==SQLITE_AFF_NUMERIC );\n    testcase( pCol->affinity==SQLITE_AFF_INTEGER );\n    testcase( pCol->affinity==SQLITE_AFF_REAL );\n    testcase( pCol->affinity==SQLITE_AFF_FLEXNUM );\n\n    zType = azType[pCol->affinity - SQLITE_AFF_BLOB];\n    len = sqlite3Strlen30(zType);\n    assert( pCol->affinity==SQLITE_AFF_BLOB\n            || pCol->affinity==SQLITE_AFF_FLEXNUM\n            || pCol->affinity==sqlite3AffinityType(zType, 0) );\n    assert( k+len<n );\n    memcpy(&zStmt[k], zType, len);\n    k += len;\n    assert( k<=n );\n  }\n  len = sqlite3Strlen30(zEnd);\n  assert( k+len<n );\n  memcpy(&zStmt[k], zEnd, len+1);\n  return zStmt;\n}\n\n/*\n** Resize an Index object to hold N columns total.  Return SQLITE_OK\n** on success and SQLITE_NOMEM on an OOM error.\n*/\nstatic int resizeIndexObject(Parse *pParse, Index *pIdx, int N){\n  char *zExtra;\n  u64 nByte;\n  sqlite3 *db;\n  if( pIdx->nColumn>=N ) return SQLITE_OK;\n  db = pParse->db;\n  assert( N>0 );\n  assert( N <= SQLITE_MAX_COLUMN*2 /* tag-20250221-1 */ );\n  testcase( N==2*pParse->db->aLimit[SQLITE_LIMIT_COLUMN] );\n  assert( pIdx->isResized==0 );\n  nByte = (sizeof(char*) + sizeof(LogEst) + sizeof(i16) + 1)*(u64)N;\n  zExtra = sqlite3DbMallocZero(db, nByte);\n  if( zExtra==0 ) return SQLITE_NOMEM_BKPT;\n  memcpy(zExtra, pIdx->azColl, sizeof(char*)*pIdx->nColumn);\n  pIdx->azColl = (const char**)zExtra;\n  zExtra += sizeof(char*)*N;\n  memcpy(zExtra, pIdx->aiRowLogEst, sizeof(LogEst)*(pIdx->nKeyCol+1));\n  pIdx->aiRowLogEst = (LogEst*)zExtra;\n  zExtra += sizeof(LogEst)*N;\n  memcpy(zExtra, pIdx->aiColumn, sizeof(i16)*pIdx->nColumn);\n  pIdx->aiColumn = (i16*)zExtra;\n  zExtra += sizeof(i16)*N;\n  memcpy(zExtra, pIdx->aSortOrder, pIdx->nColumn);\n  pIdx->aSortOrder = (u8*)zExtra;\n  pIdx->nColumn = (u16)N;  /* See tag-20250221-1 above for proof of safety */\n  pIdx->isResized = 1;\n  return SQLITE_OK;\n}\n\n/*\n** Estimate the total row width for a table.\n*/\nstatic void estimateTableWidth(Table *pTab){\n  unsigned wTable = 0;\n  const Column *pTabCol;\n  int i;\n  for(i=pTab->nCol, pTabCol=pTab->aCol; i>0; i--, pTabCol++){\n    wTable += pTabCol->szEst;\n  }\n  if( pTab->iPKey<0 ) wTable++;\n  pTab->szTabRow = sqlite3LogEst(wTable*4);\n}\n\n/*\n** Estimate the average size of a row for an index.\n*/\nstatic void estimateIndexWidth(Index *pIdx){\n  unsigned wIndex = 0;\n  int i;\n  const Column *aCol = pIdx->pTable->aCol;\n  for(i=0; i<pIdx->nColumn; i++){\n    i16 x = pIdx->aiColumn[i];\n    assert( x<pIdx->pTable->nCol );\n    wIndex += x<0 ? 1 : aCol[x].szEst;\n  }\n  pIdx->szIdxRow = sqlite3LogEst(wIndex*4);\n}\n\n/* Return true if column number x is any of the first nCol entries of aiCol[].\n** This is used to determine if the column number x appears in any of the\n** first nCol entries of an index.\n*/\nstatic int hasColumn(const i16 *aiCol, int nCol, int x){\n  while( nCol-- > 0 ){\n    if( x==*(aiCol++) ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Return true if any of the first nKey entries of index pIdx exactly\n** match the iCol-th entry of pPk.  pPk is always a WITHOUT ROWID\n** PRIMARY KEY index.  pIdx is an index on the same table.  pIdx may\n** or may not be the same index as pPk.\n**\n** The first nKey entries of pIdx are guaranteed to be ordinary columns,\n** not a rowid or expression.\n**\n** This routine differs from hasColumn() in that both the column and the\n** collating sequence must match for this routine, but for hasColumn() only\n** the column name must match.\n*/\nstatic int isDupColumn(Index *pIdx, int nKey, Index *pPk, int iCol){\n  int i, j;\n  assert( nKey<=pIdx->nColumn );\n  assert( iCol<MAX(pPk->nColumn,pPk->nKeyCol) );\n  assert( pPk->idxType==SQLITE_IDXTYPE_PRIMARYKEY );\n  assert( pPk->pTable->tabFlags & TF_WithoutRowid );\n  assert( pPk->pTable==pIdx->pTable );\n  testcase( pPk==pIdx );\n  j = pPk->aiColumn[iCol];\n  assert( j!=XN_ROWID && j!=XN_EXPR );\n  for(i=0; i<nKey; i++){\n    assert( pIdx->aiColumn[i]>=0 || j>=0 );\n    if( pIdx->aiColumn[i]==j\n     && sqlite3StrICmp(pIdx->azColl[i], pPk->azColl[iCol])==0\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/* Recompute the colNotIdxed field of the Index.\n**\n** colNotIdxed is a bitmask that has a 0 bit representing each indexed\n** columns that are within the first 63 columns of the table and a 1 for\n** all other bits (all columns that are not in the index).  The\n** high-order bit of colNotIdxed is always 1.  All unindexed columns\n** of the table have a 1.\n**\n** 2019-10-24:  For the purpose of this computation, virtual columns are\n** not considered to be covered by the index, even if they are in the\n** index, because we do not trust the logic in whereIndexExprTrans() to be\n** able to find all instances of a reference to the indexed table column\n** and convert them into references to the index.  Hence we always want\n** the actual table at hand in order to recompute the virtual column, if\n** necessary.\n**\n** The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask\n** to determine if the index is covering index.\n*/\nstatic void recomputeColumnsNotIndexed(Index *pIdx){\n  Bitmask m = 0;\n  int j;\n  Table *pTab = pIdx->pTable;\n  for(j=pIdx->nColumn-1; j>=0; j--){\n    int x = pIdx->aiColumn[j];\n    if( x>=0 && (pTab->aCol[x].colFlags & COLFLAG_VIRTUAL)==0 ){\n      testcase( x==BMS-1 );\n      testcase( x==BMS-2 );\n      if( x<BMS-1 ) m |= MASKBIT(x);\n    }\n  }\n  pIdx->colNotIdxed = ~m;\n  assert( (pIdx->colNotIdxed>>63)==1 );  /* See note-20221022-a */\n}\n\n/*\n** This routine runs at the end of parsing a CREATE TABLE statement that\n** has a WITHOUT ROWID clause.  The job of this routine is to convert both\n** internal schema data structures and the generated VDBE code so that they\n** are appropriate for a WITHOUT ROWID table instead of a rowid table.\n** Changes include:\n**\n**     (1)  Set all columns of the PRIMARY KEY schema object to be NOT NULL.\n**     (2)  Convert P3 parameter of the OP_CreateBtree from BTREE_INTKEY\n**          into BTREE_BLOBKEY.\n**     (3)  Bypass the creation of the sqlite_schema table entry\n**          for the PRIMARY KEY as the primary key index is now\n**          identified by the sqlite_schema table entry of the table itself.\n**     (4)  Set the Index.tnum of the PRIMARY KEY Index object in the\n**          schema to the rootpage from the main table.\n**     (5)  Add all table columns to the PRIMARY KEY Index object\n**          so that the PRIMARY KEY is a covering index.  The surplus\n**          columns are part of KeyInfo.nAllField and are not used for\n**          sorting or lookup or uniqueness checks.\n**     (6)  Replace the rowid tail on all automatically generated UNIQUE\n**          indices with the PRIMARY KEY columns.\n**\n** For virtual tables, only (1) is performed.\n*/\nstatic void convertToWithoutRowidTable(Parse *pParse, Table *pTab){\n  Index *pIdx;\n  Index *pPk;\n  int nPk;\n  int nExtra;\n  int i, j;\n  sqlite3 *db = pParse->db;\n  Vdbe *v = pParse->pVdbe;\n\n  /* Mark every PRIMARY KEY column as NOT NULL (except for imposter tables)\n  */\n  if( !db->init.imposterTable ){\n    for(i=0; i<pTab->nCol; i++){\n      if( (pTab->aCol[i].colFlags & COLFLAG_PRIMKEY)!=0\n       && (pTab->aCol[i].notNull==OE_None)\n      ){\n        pTab->aCol[i].notNull = OE_Abort;\n      }\n    }\n    pTab->tabFlags |= TF_HasNotNull;\n  }\n\n  /* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY\n  ** into BTREE_BLOBKEY.\n  */\n  assert( !pParse->bReturning );\n  if( pParse->u1.cr.addrCrTab ){\n    assert( v );\n    sqlite3VdbeChangeP3(v, pParse->u1.cr.addrCrTab, BTREE_BLOBKEY);\n  }\n\n  /* Locate the PRIMARY KEY index.  Or, if this table was originally\n  ** an INTEGER PRIMARY KEY table, create a new PRIMARY KEY index.\n  */\n  if( pTab->iPKey>=0 ){\n    ExprList *pList;\n    Token ipkToken;\n    sqlite3TokenInit(&ipkToken, pTab->aCol[pTab->iPKey].zCnName);\n    pList = sqlite3ExprListAppend(pParse, 0,\n                  sqlite3ExprAlloc(db, TK_ID, &ipkToken, 0));\n    if( pList==0 ){\n      pTab->tabFlags &= ~TF_WithoutRowid;\n      return;\n    }\n    if( IN_RENAME_OBJECT ){\n      sqlite3RenameTokenRemap(pParse, pList->a[0].pExpr, &pTab->iPKey);\n    }\n    pList->a[0].fg.sortFlags = pParse->iPkSortOrder;\n    assert( pParse->pNewTable==pTab );\n    pTab->iPKey = -1;\n    sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,\n                       SQLITE_IDXTYPE_PRIMARYKEY);\n    if( pParse->nErr ){\n      pTab->tabFlags &= ~TF_WithoutRowid;\n      return;\n    }\n    assert( db->mallocFailed==0 );\n    pPk = sqlite3PrimaryKeyIndex(pTab);\n    assert( pPk->nKeyCol==1 );\n  }else{\n    pPk = sqlite3PrimaryKeyIndex(pTab);\n    assert( pPk!=0 );\n\n    /*\n    ** Remove all redundant columns from the PRIMARY KEY.  For example, change\n    ** \"PRIMARY KEY(a,b,a,b,c,b,c,d)\" into just \"PRIMARY KEY(a,b,c,d)\".  Later\n    ** code assumes the PRIMARY KEY contains no repeated columns.\n    */\n    for(i=j=1; i<pPk->nKeyCol; i++){\n      if( isDupColumn(pPk, j, pPk, i) ){\n        pPk->nColumn--;\n      }else{\n        testcase( hasColumn(pPk->aiColumn, j, pPk->aiColumn[i]) );\n        pPk->azColl[j] = pPk->azColl[i];\n        pPk->aSortOrder[j] = pPk->aSortOrder[i];\n        pPk->aiColumn[j++] = pPk->aiColumn[i];\n      }\n    }\n    pPk->nKeyCol = j;\n  }\n  assert( pPk!=0 );\n  pPk->isCovering = 1;\n  if( !db->init.imposterTable ) pPk->uniqNotNull = 1;\n  nPk = pPk->nColumn = pPk->nKeyCol;\n\n  /* Bypass the creation of the PRIMARY KEY btree and the sqlite_schema\n  ** table entry. This is only required if currently generating VDBE\n  ** code for a CREATE TABLE (not when parsing one as part of reading\n  ** a database schema).  */\n  if( v && pPk->tnum>0 ){\n    assert( db->init.busy==0 );\n    sqlite3VdbeChangeOpcode(v, (int)pPk->tnum, OP_Goto);\n  }\n\n  /* The root page of the PRIMARY KEY is the table root page */\n  pPk->tnum = pTab->tnum;\n\n  /* Update the in-memory representation of all UNIQUE indices by converting\n  ** the final rowid column into one or more columns of the PRIMARY KEY.\n  */\n  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n    int n;\n    if( IsPrimaryKeyIndex(pIdx) ) continue;\n    for(i=n=0; i<nPk; i++){\n      if( !isDupColumn(pIdx, pIdx->nKeyCol, pPk, i) ){\n        testcase( hasColumn(pIdx->aiColumn, pIdx->nKeyCol, pPk->aiColumn[i]) );\n        n++;\n      }\n    }\n    if( n==0 ){\n      /* This index is a superset of the primary key */\n      pIdx->nColumn = pIdx->nKeyCol;\n      continue;\n    }\n    if( resizeIndexObject(pParse, pIdx, pIdx->nKeyCol+n) ) return;\n    for(i=0, j=pIdx->nKeyCol; i<nPk; i++){\n      if( !isDupColumn(pIdx, pIdx->nKeyCol, pPk, i) ){\n        testcase( hasColumn(pIdx->aiColumn, pIdx->nKeyCol, pPk->aiColumn[i]) );\n        pIdx->aiColumn[j] = pPk->aiColumn[i];\n        pIdx->azColl[j] = pPk->azColl[i];\n        if( pPk->aSortOrder[i] ){\n          /* See ticket https://sqlite.org/src/info/bba7b69f9849b5bf */\n          pIdx->bAscKeyBug = 1;\n        }\n        j++;\n      }\n    }\n    assert( pIdx->nColumn>=pIdx->nKeyCol+n );\n    assert( pIdx->nColumn>=j );\n  }\n\n  /* Add all table columns to the PRIMARY KEY index\n  */\n  nExtra = 0;\n  for(i=0; i<pTab->nCol; i++){\n    if( !hasColumn(pPk->aiColumn, nPk, i)\n     && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ) nExtra++;\n  }\n  if( resizeIndexObject(pParse, pPk, nPk+nExtra) ) return;\n  for(i=0, j=nPk; i<pTab->nCol; i++){\n    if( !hasColumn(pPk->aiColumn, j, i)\n     && (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0\n    ){\n      assert( j<pPk->nColumn );\n      pPk->aiColumn[j] = i;\n      pPk->azColl[j] = sqlite3StrBINARY;\n      j++;\n    }\n  }\n  assert( pPk->nColumn==j );\n  assert( pTab->nNVCol<=j );\n  recomputeColumnsNotIndexed(pPk);\n}\n\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Return true if pTab is a virtual table and zName is a shadow table name\n** for that virtual table.\n*/\nSQLITE_PRIVATE int sqlite3IsShadowTableOf(sqlite3 *db, Table *pTab, const char *zName){\n  int nName;                    /* Length of zName */\n  Module *pMod;                 /* Module for the virtual table */\n\n  if( !IsVirtual(pTab) ) return 0;\n  nName = sqlite3Strlen30(pTab->zName);\n  if( sqlite3_strnicmp(zName, pTab->zName, nName)!=0 ) return 0;\n  if( zName[nName]!='_' ) return 0;\n  pMod = (Module*)sqlite3HashFind(&db->aModule, pTab->u.vtab.azArg[0]);\n  if( pMod==0 ) return 0;\n  if( pMod->pModule->iVersion<3 ) return 0;\n  if( pMod->pModule->xShadowName==0 ) return 0;\n  return pMod->pModule->xShadowName(zName+nName+1);\n}\n#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Table pTab is a virtual table.  If it the virtual table implementation\n** exists and has an xShadowName method, then loop over all other ordinary\n** tables within the same schema looking for shadow tables of pTab, and mark\n** any shadow tables seen using the TF_Shadow flag.\n*/\nSQLITE_PRIVATE void sqlite3MarkAllShadowTablesOf(sqlite3 *db, Table *pTab){\n  int nName;                    /* Length of pTab->zName */\n  Module *pMod;                 /* Module for the virtual table */\n  HashElem *k;                  /* For looping through the symbol table */\n\n  assert( IsVirtual(pTab) );\n  pMod = (Module*)sqlite3HashFind(&db->aModule, pTab->u.vtab.azArg[0]);\n  if( pMod==0 ) return;\n  if( NEVER(pMod->pModule==0) ) return;\n  if( pMod->pModule->iVersion<3 ) return;\n  if( pMod->pModule->xShadowName==0 ) return;\n  assert( pTab->zName!=0 );\n  nName = sqlite3Strlen30(pTab->zName);\n  for(k=sqliteHashFirst(&pTab->pSchema->tblHash); k; k=sqliteHashNext(k)){\n    Table *pOther = sqliteHashData(k);\n    assert( pOther->zName!=0 );\n    if( !IsOrdinaryTable(pOther) ) continue;\n    if( pOther->tabFlags & TF_Shadow ) continue;\n    if( sqlite3StrNICmp(pOther->zName, pTab->zName, nName)==0\n     && pOther->zName[nName]=='_'\n     && pMod->pModule->xShadowName(pOther->zName+nName+1)\n    ){\n      pOther->tabFlags |= TF_Shadow;\n    }\n  }\n}\n#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Return true if zName is a shadow table name in the current database\n** connection.\n**\n** zName is temporarily modified while this routine is running, but is\n** restored to its original value prior to this routine returning.\n*/\nSQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName){\n  char *zTail;                  /* Pointer to the last \"_\" in zName */\n  Table *pTab;                  /* Table that zName is a shadow of */\n  zTail = strrchr(zName, '_');\n  if( zTail==0 ) return 0;\n  *zTail = 0;\n  pTab = sqlite3FindTable(db, zName, 0);\n  *zTail = '_';\n  if( pTab==0 ) return 0;\n  if( !IsVirtual(pTab) ) return 0;\n  return sqlite3IsShadowTableOf(db, pTab, zName);\n}\n#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */\n\n\n#ifdef SQLITE_DEBUG\n/*\n** Mark all nodes of an expression as EP_Immutable, indicating that\n** they should not be changed.  Expressions attached to a table or\n** index definition are tagged this way to help ensure that we do\n** not pass them into code generator routines by mistake.\n*/\nstatic int markImmutableExprStep(Walker *pWalker, Expr *pExpr){\n  (void)pWalker;\n  ExprSetVVAProperty(pExpr, EP_Immutable);\n  return WRC_Continue;\n}\nstatic void markExprListImmutable(ExprList *pList){\n  if( pList ){\n    Walker w;\n    memset(&w, 0, sizeof(w));\n    w.xExprCallback = markImmutableExprStep;\n    w.xSelectCallback = sqlite3SelectWalkNoop;\n    w.xSelectCallback2 = 0;\n    sqlite3WalkExprList(&w, pList);\n  }\n}\n#else\n#define markExprListImmutable(X)  /* no-op */\n#endif /* SQLITE_DEBUG */\n\n\n/*\n** This routine is called to report the final \")\" that terminates\n** a CREATE TABLE statement.\n**\n** The table structure that other action routines have been building\n** is added to the internal hash tables, assuming no errors have\n** occurred.\n**\n** An entry for the table is made in the schema table on disk, unless\n** this is a temporary table or db->init.busy==1.  When db->init.busy==1\n** it means we are reading the sqlite_schema table because we just\n** connected to the database or because the sqlite_schema table has\n** recently changed, so the entry for this table already exists in\n** the sqlite_schema table.  We do not want to create it again.\n**\n** If the pSelect argument is not NULL, it means that this routine\n** was called to create a table generated from a\n** \"CREATE TABLE ... AS SELECT ...\" statement.  The column names of\n** the new table will match the result set of the SELECT.\n*/\nSQLITE_PRIVATE void sqlite3EndTable(\n  Parse *pParse,          /* Parse context */\n  Token *pCons,           /* The ',' token after the last column defn. */\n  Token *pEnd,            /* The ')' before options in the CREATE TABLE */\n  u32 tabOpts,            /* Extra table options. Usually 0. */\n  Select *pSelect         /* Select from a \"CREATE ... AS SELECT\" */\n){\n  Table *p;                 /* The new table */\n  sqlite3 *db = pParse->db; /* The database connection */\n  int iDb;                  /* Database in which the table lives */\n  Index *pIdx;              /* An implied index of the table */\n\n  if( pEnd==0 && pSelect==0 ){\n    return;\n  }\n  p = pParse->pNewTable;\n  if( p==0 ) return;\n\n  if( pSelect==0 && sqlite3ShadowTableName(db, p->zName) ){\n    p->tabFlags |= TF_Shadow;\n  }\n\n  /* If the db->init.busy is 1 it means we are reading the SQL off the\n  ** \"sqlite_schema\" or \"sqlite_temp_schema\" table on the disk.\n  ** So do not write to the disk again.  Extract the root page number\n  ** for the table from the db->init.newTnum field.  (The page number\n  ** should have been put there by the sqliteOpenCb routine.)\n  **\n  ** If the root page number is 1, that means this is the sqlite_schema\n  ** table itself.  So mark it read-only.\n  */\n  if( db->init.busy ){\n    if( pSelect || (!IsOrdinaryTable(p) && db->init.newTnum) ){\n      sqlite3ErrorMsg(pParse, \"\");\n      return;\n    }\n    p->tnum = db->init.newTnum;\n    if( p->tnum==1 ) p->tabFlags |= TF_Readonly;\n  }\n\n  /* Special processing for tables that include the STRICT keyword:\n  **\n  **   *  Do not allow custom column datatypes.  Every column must have\n  **      a datatype that is one of INT, INTEGER, REAL, TEXT, or BLOB.\n  **\n  **   *  If a PRIMARY KEY is defined, other than the INTEGER PRIMARY KEY,\n  **      then all columns of the PRIMARY KEY must have a NOT NULL\n  **      constraint.\n  */\n  if( tabOpts & TF_Strict ){\n    int ii;\n    p->tabFlags |= TF_Strict;\n    for(ii=0; ii<p->nCol; ii++){\n      Column *pCol = &p->aCol[ii];\n      if( pCol->eCType==COLTYPE_CUSTOM ){\n        if( pCol->colFlags & COLFLAG_HASTYPE ){\n          sqlite3ErrorMsg(pParse,\n            \"unknown datatype for %s.%s: \\\"%s\\\"\",\n            p->zName, pCol->zCnName, sqlite3ColumnType(pCol, \"\")\n          );\n        }else{\n          sqlite3ErrorMsg(pParse, \"missing datatype for %s.%s\",\n                          p->zName, pCol->zCnName);\n        }\n        return;\n      }else if( pCol->eCType==COLTYPE_ANY ){\n        pCol->affinity = SQLITE_AFF_BLOB;\n      }\n      if( (pCol->colFlags & COLFLAG_PRIMKEY)!=0\n       && p->iPKey!=ii\n       && pCol->notNull == OE_None\n      ){\n        pCol->notNull = OE_Abort;\n        p->tabFlags |= TF_HasNotNull;\n      }\n    }\n  }\n\n  assert( (p->tabFlags & TF_HasPrimaryKey)==0\n       || p->iPKey>=0 || sqlite3PrimaryKeyIndex(p)!=0 );\n  assert( (p->tabFlags & TF_HasPrimaryKey)!=0\n       || (p->iPKey<0 && sqlite3PrimaryKeyIndex(p)==0) );\n\n  /* Special processing for WITHOUT ROWID Tables */\n  if( tabOpts & TF_WithoutRowid ){\n    if( (p->tabFlags & TF_Autoincrement) ){\n      sqlite3ErrorMsg(pParse,\n          \"AUTOINCREMENT not allowed on WITHOUT ROWID tables\");\n      return;\n    }\n    if( (p->tabFlags & TF_HasPrimaryKey)==0 ){\n      sqlite3ErrorMsg(pParse, \"PRIMARY KEY missing on table %s\", p->zName);\n      return;\n    }\n    p->tabFlags |= TF_WithoutRowid | TF_NoVisibleRowid;\n    convertToWithoutRowidTable(pParse, p);\n  }\n  iDb = sqlite3SchemaToIndex(db, p->pSchema);\n\n#ifndef SQLITE_OMIT_CHECK\n  /* Resolve names in all CHECK constraint expressions.\n  */\n  if( p->pCheck ){\n    sqlite3ResolveSelfReference(pParse, p, NC_IsCheck, 0, p->pCheck);\n    if( pParse->nErr ){\n      /* If errors are seen, delete the CHECK constraints now, else they might\n      ** actually be used if PRAGMA writable_schema=ON is set. */\n      sqlite3ExprListDelete(db, p->pCheck);\n      p->pCheck = 0;\n    }else{\n      markExprListImmutable(p->pCheck);\n    }\n  }\n#endif /* !defined(SQLITE_OMIT_CHECK) */\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  if( p->tabFlags & TF_HasGenerated ){\n    int ii, nNG = 0;\n    testcase( p->tabFlags & TF_HasVirtual );\n    testcase( p->tabFlags & TF_HasStored );\n    for(ii=0; ii<p->nCol; ii++){\n      u32 colFlags = p->aCol[ii].colFlags;\n      if( (colFlags & COLFLAG_GENERATED)!=0 ){\n        Expr *pX = sqlite3ColumnExpr(p, &p->aCol[ii]);\n        testcase( colFlags & COLFLAG_VIRTUAL );\n        testcase( colFlags & COLFLAG_STORED );\n        if( sqlite3ResolveSelfReference(pParse, p, NC_GenCol, pX, 0) ){\n          /* If there are errors in resolving the expression, change the\n          ** expression to a NULL.  This prevents code generators that operate\n          ** on the expression from inserting extra parts into the expression\n          ** tree that have been allocated from lookaside memory, which is\n          ** illegal in a schema and will lead to errors or heap corruption\n          ** when the database connection closes. */\n          sqlite3ColumnSetExpr(pParse, p, &p->aCol[ii],\n               sqlite3ExprAlloc(db, TK_NULL, 0, 0));\n        }\n      }else{\n        nNG++;\n      }\n    }\n    if( nNG==0 ){\n      sqlite3ErrorMsg(pParse, \"must have at least one non-generated column\");\n      return;\n    }\n  }\n#endif\n\n  /* Estimate the average row size for the table and for all implied indices */\n  estimateTableWidth(p);\n  for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){\n    estimateIndexWidth(pIdx);\n  }\n\n  /* If not initializing, then create a record for the new table\n  ** in the schema table of the database.\n  **\n  ** If this is a TEMPORARY table, write the entry into the auxiliary\n  ** file instead of into the main database file.\n  */\n  if( !db->init.busy ){\n    int n;\n    Vdbe *v;\n    char *zType;    /* \"view\" or \"table\" */\n    char *zType2;   /* \"VIEW\" or \"TABLE\" */\n    char *zStmt;    /* Text of the CREATE TABLE or CREATE VIEW statement */\n\n    v = sqlite3GetVdbe(pParse);\n    if( NEVER(v==0) ) return;\n\n    sqlite3VdbeAddOp1(v, OP_Close, 0);\n\n    /*\n    ** Initialize zType for the new view or table.\n    */\n    if( IsOrdinaryTable(p) ){\n      /* A regular table */\n      zType = \"table\";\n      zType2 = \"TABLE\";\n#ifndef SQLITE_OMIT_VIEW\n    }else{\n      /* A view */\n      zType = \"view\";\n      zType2 = \"VIEW\";\n#endif\n    }\n\n    /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT\n    ** statement to populate the new table. The root-page number for the\n    ** new table is in register pParse->u1.cr.regRoot.\n    **\n    ** Once the SELECT has been coded by sqlite3Select(), it is in a\n    ** suitable state to query for the column names and types to be used\n    ** by the new table.\n    **\n    ** A shared-cache write-lock is not required to write to the new table,\n    ** as a schema-lock must have already been obtained to create it. Since\n    ** a schema-lock excludes all other database users, the write-lock would\n    ** be redundant.\n    */\n    if( pSelect ){\n      SelectDest dest;    /* Where the SELECT should store results */\n      int regYield;       /* Register holding co-routine entry-point */\n      int addrTop;        /* Top of the co-routine */\n      int regRec;         /* A record to be insert into the new table */\n      int regRowid;       /* Rowid of the next row to insert */\n      int addrInsLoop;    /* Top of the loop for inserting rows */\n      Table *pSelTab;     /* A table that describes the SELECT results */\n      int iCsr;           /* Write cursor on the new table */\n\n      if( IN_SPECIAL_PARSE ){\n        pParse->rc = SQLITE_ERROR;\n        pParse->nErr++;\n        return;\n      }\n      iCsr = pParse->nTab++;\n      regYield = ++pParse->nMem;\n      regRec = ++pParse->nMem;\n      regRowid = ++pParse->nMem;\n      sqlite3MayAbort(pParse);\n      assert( pParse->isCreate );\n      sqlite3VdbeAddOp3(v, OP_OpenWrite, iCsr, pParse->u1.cr.regRoot, iDb);\n      sqlite3VdbeChangeP5(v, OPFLAG_P2ISREG);\n      addrTop = sqlite3VdbeCurrentAddr(v) + 1;\n      sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop);\n      if( pParse->nErr ) return;\n      pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect, SQLITE_AFF_BLOB);\n      if( pSelTab==0 ) return;\n      assert( p->aCol==0 );\n      p->nCol = p->nNVCol = pSelTab->nCol;\n      p->aCol = pSelTab->aCol;\n      pSelTab->nCol = 0;\n      pSelTab->aCol = 0;\n      sqlite3DeleteTable(db, pSelTab);\n      sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield);\n      sqlite3Select(pParse, pSelect, &dest);\n      if( pParse->nErr ) return;\n      sqlite3VdbeEndCoroutine(v, regYield);\n      sqlite3VdbeJumpHere(v, addrTop - 1);\n      addrInsLoop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iSDParm);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, dest.iSdst, dest.nSdst, regRec);\n      sqlite3TableAffinity(v, p, 0);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, iCsr, regRowid);\n      sqlite3VdbeAddOp3(v, OP_Insert, iCsr, regRec, regRowid);\n      sqlite3VdbeGoto(v, addrInsLoop);\n      sqlite3VdbeJumpHere(v, addrInsLoop);\n      sqlite3VdbeAddOp1(v, OP_Close, iCsr);\n    }\n\n    /* Compute the complete text of the CREATE statement */\n    if( pSelect ){\n      zStmt = createTableStmt(db, p);\n    }else{\n      Token *pEnd2 = tabOpts ? &pParse->sLastToken : pEnd;\n      n = (int)(pEnd2->z - pParse->sNameToken.z);\n      if( pEnd2->z[0]!=';' ) n += pEnd2->n;\n      zStmt = sqlite3MPrintf(db,\n          \"CREATE %s %.*s\", zType2, n, pParse->sNameToken.z\n      );\n    }\n\n    /* A slot for the record has already been allocated in the\n    ** schema table.  We just need to update that slot with all\n    ** the information we've collected.\n    */\n    assert( pParse->isCreate );\n    sqlite3NestedParse(pParse,\n      \"UPDATE %Q.\" LEGACY_SCHEMA_TABLE\n      \" SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q\"\n      \" WHERE rowid=#%d\",\n      db->aDb[iDb].zDbSName,\n      zType,\n      p->zName,\n      p->zName,\n      pParse->u1.cr.regRoot,\n      zStmt,\n      pParse->u1.cr.regRowid\n    );\n    sqlite3DbFree(db, zStmt);\n    sqlite3ChangeCookie(pParse, iDb);\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n    /* Check to see if we need to create an sqlite_sequence table for\n    ** keeping track of autoincrement keys.\n    */\n    if( (p->tabFlags & TF_Autoincrement)!=0 && !IN_SPECIAL_PARSE ){\n      Db *pDb = &db->aDb[iDb];\n      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n      if( pDb->pSchema->pSeqTab==0 ){\n        sqlite3NestedParse(pParse,\n          \"CREATE TABLE %Q.sqlite_sequence(name,seq)\",\n          pDb->zDbSName\n        );\n      }\n    }\n#endif\n\n    /* Reparse everything to update our internal data structures */\n    sqlite3VdbeAddParseSchemaOp(v, iDb,\n           sqlite3MPrintf(db, \"tbl_name='%q' AND type!='trigger'\", p->zName),0);\n\n    /* Test for cycles in generated columns and illegal expressions\n    ** in CHECK constraints and in DEFAULT clauses. */\n    if( p->tabFlags & TF_HasGenerated ){\n      sqlite3VdbeAddOp4(v, OP_SqlExec, 0x0001, 0, 0,\n             sqlite3MPrintf(db, \"SELECT*FROM\\\"%w\\\".\\\"%w\\\"\",\n                   db->aDb[iDb].zDbSName, p->zName), P4_DYNAMIC);\n    }\n  }\n\n  /* Add the table to the in-memory representation of the database.\n  */\n  if( db->init.busy ){\n    Table *pOld;\n    Schema *pSchema = p->pSchema;\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    assert( HasRowid(p) || p->iPKey<0 );\n    pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName, p);\n    if( pOld ){\n      assert( p==pOld );  /* Malloc must have failed inside HashInsert() */\n      sqlite3OomFault(db);\n      return;\n    }\n    pParse->pNewTable = 0;\n    db->mDbFlags |= DBFLAG_SchemaChange;\n\n    /* If this is the magic sqlite_sequence table used by autoincrement,\n    ** then record a pointer to this table in the main database structure\n    ** so that INSERT can find the table easily.  */\n    assert( !pParse->nested );\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n    if( strcmp(p->zName, \"sqlite_sequence\")==0 ){\n      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n      p->pSchema->pSeqTab = p;\n    }\n#endif\n  }\n\n#ifndef SQLITE_OMIT_ALTERTABLE\n  if( !pSelect && IsOrdinaryTable(p) ){\n    assert( pCons && pEnd );\n    if( pCons->z==0 ){\n      pCons = pEnd;\n    }\n    p->u.tab.addColOffset = 13 + (int)(pCons->z - pParse->sNameToken.z);\n  }\n#endif\n}\n\n#ifndef SQLITE_OMIT_VIEW\n/*\n** The parser calls this routine in order to create a new VIEW\n*/\nSQLITE_PRIVATE void sqlite3CreateView(\n  Parse *pParse,     /* The parsing context */\n  Token *pBegin,     /* The CREATE token that begins the statement */\n  Token *pName1,     /* The token that holds the name of the view */\n  Token *pName2,     /* The token that holds the name of the view */\n  ExprList *pCNames, /* Optional list of view column names */\n  Select *pSelect,   /* A SELECT statement that will become the new view */\n  int isTemp,        /* TRUE for a TEMPORARY view */\n  int noErr          /* Suppress error messages if VIEW already exists */\n){\n  Table *p;\n  int n;\n  const char *z;\n  Token sEnd;\n  DbFixer sFix;\n  Token *pName = 0;\n  int iDb;\n  sqlite3 *db = pParse->db;\n\n  if( pParse->nVar>0 ){\n    sqlite3ErrorMsg(pParse, \"parameters are not allowed in views\");\n    goto create_view_fail;\n  }\n  sqlite3StartTable(pParse, pName1, pName2, isTemp, 1, 0, noErr);\n  p = pParse->pNewTable;\n  if( p==0 || pParse->nErr ) goto create_view_fail;\n\n  /* Legacy versions of SQLite allowed the use of the magic \"rowid\" column\n  ** on a view, even though views do not have rowids.  The following flag\n  ** setting fixes this problem.  But the fix can be disabled by compiling\n  ** with -DSQLITE_ALLOW_ROWID_IN_VIEW in case there are legacy apps that\n  ** depend upon the old buggy behavior.  The ability can also be toggled\n  ** using sqlite3_config(SQLITE_CONFIG_ROWID_IN_VIEW,...) */\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n  p->tabFlags |= sqlite3Config.mNoVisibleRowid; /* Optional. Allow by default */\n#else\n  p->tabFlags |= TF_NoVisibleRowid;             /* Never allow rowid in view */\n#endif\n\n  sqlite3TwoPartName(pParse, pName1, pName2, &pName);\n  iDb = sqlite3SchemaToIndex(db, p->pSchema);\n  sqlite3FixInit(&sFix, pParse, iDb, \"view\", pName);\n  if( sqlite3FixSelect(&sFix, pSelect) ) goto create_view_fail;\n\n  /* Make a copy of the entire SELECT statement that defines the view.\n  ** This will force all the Expr.token.z values to be dynamically\n  ** allocated rather than point to the input string - which means that\n  ** they will persist after the current sqlite3_exec() call returns.\n  */\n  pSelect->selFlags |= SF_View;\n  if( IN_RENAME_OBJECT ){\n    p->u.view.pSelect = pSelect;\n    pSelect = 0;\n  }else{\n    p->u.view.pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);\n  }\n  p->pCheck = sqlite3ExprListDup(db, pCNames, EXPRDUP_REDUCE);\n  p->eTabType = TABTYP_VIEW;\n  if( db->mallocFailed ) goto create_view_fail;\n\n  /* Locate the end of the CREATE VIEW statement.  Make sEnd point to\n  ** the end.\n  */\n  sEnd = pParse->sLastToken;\n  assert( sEnd.z[0]!=0 || sEnd.n==0 );\n  if( sEnd.z[0]!=';' ){\n    sEnd.z += sEnd.n;\n  }\n  sEnd.n = 0;\n  n = (int)(sEnd.z - pBegin->z);\n  assert( n>0 );\n  z = pBegin->z;\n  while( sqlite3Isspace(z[n-1]) ){ n--; }\n  sEnd.z = &z[n-1];\n  sEnd.n = 1;\n\n  /* Use sqlite3EndTable() to add the view to the schema table */\n  sqlite3EndTable(pParse, 0, &sEnd, 0, 0);\n\ncreate_view_fail:\n  sqlite3SelectDelete(db, pSelect);\n  if( IN_RENAME_OBJECT ){\n    sqlite3RenameExprlistUnmap(pParse, pCNames);\n  }\n  sqlite3ExprListDelete(db, pCNames);\n  return;\n}\n#endif /* SQLITE_OMIT_VIEW */\n\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)\n/*\n** The Table structure pTable is really a VIEW.  Fill in the names of\n** the columns of the view in the pTable structure.  Return non-zero if\n** there are errors.  If an error is seen an error message is left\n** in pParse->zErrMsg.\n*/\nstatic SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){\n  Table *pSelTab;   /* A fake table from which we get the result set */\n  Select *pSel;     /* Copy of the SELECT that implements the view */\n  int nErr = 0;     /* Number of errors encountered */\n  sqlite3 *db = pParse->db;  /* Database connection for malloc errors */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  int rc;\n#endif\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  sqlite3_xauth xAuth;       /* Saved xAuth pointer */\n#endif\n\n  assert( pTable );\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTable) ){\n    db->nSchemaLock++;\n    rc = sqlite3VtabCallConnect(pParse, pTable);\n    db->nSchemaLock--;\n    return rc;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_VIEW\n  /* A positive nCol means the columns names for this view are\n  ** already known.  This routine is not called unless either the\n  ** table is virtual or nCol is zero.\n  */\n  assert( pTable->nCol<=0 );\n\n  /* A negative nCol is a special marker meaning that we are currently\n  ** trying to compute the column names.  If we enter this routine with\n  ** a negative nCol, it means two or more views form a loop, like this:\n  **\n  **     CREATE VIEW one AS SELECT * FROM two;\n  **     CREATE VIEW two AS SELECT * FROM one;\n  **\n  ** Actually, the error above is now caught prior to reaching this point.\n  ** But the following test is still important as it does come up\n  ** in the following:\n  **\n  **     CREATE TABLE main.ex1(a);\n  **     CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;\n  **     SELECT * FROM temp.ex1;\n  */\n  if( pTable->nCol<0 ){\n    sqlite3ErrorMsg(pParse, \"view %s is circularly defined\", pTable->zName);\n    return 1;\n  }\n  assert( pTable->nCol>=0 );\n\n  /* If we get this far, it means we need to compute the table names.\n  ** Note that the call to sqlite3ResultSetOfSelect() will expand any\n  ** \"*\" elements in the results set of the view and will assign cursors\n  ** to the elements of the FROM clause.  But we do not want these changes\n  ** to be permanent.  So the computation is done on a copy of the SELECT\n  ** statement that defines the view.\n  */\n  assert( IsView(pTable) );\n  pSel = sqlite3SelectDup(db, pTable->u.view.pSelect, 0);\n  if( pSel ){\n    u8 eParseMode = pParse->eParseMode;\n    int nTab = pParse->nTab;\n    int nSelect = pParse->nSelect;\n    pParse->eParseMode = PARSE_MODE_NORMAL;\n    sqlite3SrcListAssignCursors(pParse, pSel->pSrc);\n    pTable->nCol = -1;\n    DisableLookaside;\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    xAuth = db->xAuth;\n    db->xAuth = 0;\n    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel, SQLITE_AFF_NONE);\n    db->xAuth = xAuth;\n#else\n    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel, SQLITE_AFF_NONE);\n#endif\n    pParse->nTab = nTab;\n    pParse->nSelect = nSelect;\n    if( pSelTab==0 ){\n      pTable->nCol = 0;\n      nErr++;\n    }else if( pTable->pCheck ){\n      /* CREATE VIEW name(arglist) AS ...\n      ** The names of the columns in the table are taken from\n      ** arglist which is stored in pTable->pCheck.  The pCheck field\n      ** normally holds CHECK constraints on an ordinary table, but for\n      ** a VIEW it holds the list of column names.\n      */\n      sqlite3ColumnsFromExprList(pParse, pTable->pCheck,\n                                 &pTable->nCol, &pTable->aCol);\n      if( pParse->nErr==0\n       && pTable->nCol==pSel->pEList->nExpr\n      ){\n        assert( db->mallocFailed==0 );\n        sqlite3SubqueryColumnTypes(pParse, pTable, pSel, SQLITE_AFF_NONE);\n      }\n    }else{\n      /* CREATE VIEW name AS...  without an argument list.  Construct\n      ** the column names from the SELECT statement that defines the view.\n      */\n      assert( pTable->aCol==0 );\n      pTable->nCol = pSelTab->nCol;\n      pTable->aCol = pSelTab->aCol;\n      pTable->tabFlags |= (pSelTab->tabFlags & COLFLAG_NOINSERT);\n      pSelTab->nCol = 0;\n      pSelTab->aCol = 0;\n      assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );\n    }\n    pTable->nNVCol = pTable->nCol;\n    sqlite3DeleteTable(db, pSelTab);\n    sqlite3SelectDelete(db, pSel);\n    EnableLookaside;\n    pParse->eParseMode = eParseMode;\n  } else {\n    nErr++;\n  }\n  pTable->pSchema->schemaFlags |= DB_UnresetViews;\n  if( db->mallocFailed ){\n    sqlite3DeleteColumnNames(db, pTable);\n  }\n#endif /* SQLITE_OMIT_VIEW */\n  return nErr + pParse->nErr;\n}\nSQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){\n  assert( pTable!=0 );\n  if( !IsVirtual(pTable) && pTable->nCol>0 ) return 0;\n  return viewGetColumnNames(pParse, pTable);\n}\n#endif /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */\n\n#ifndef SQLITE_OMIT_VIEW\n/*\n** Clear the column names from every VIEW in database idx.\n*/\nstatic void sqliteViewResetAll(sqlite3 *db, int idx){\n  HashElem *i;\n  assert( sqlite3SchemaMutexHeld(db, idx, 0) );\n  if( !DbHasProperty(db, idx, DB_UnresetViews) ) return;\n  for(i=sqliteHashFirst(&db->aDb[idx].pSchema->tblHash); i;i=sqliteHashNext(i)){\n    Table *pTab = sqliteHashData(i);\n    if( IsView(pTab) ){\n      sqlite3DeleteColumnNames(db, pTab);\n    }\n  }\n  DbClearProperty(db, idx, DB_UnresetViews);\n}\n#else\n# define sqliteViewResetAll(A,B)\n#endif /* SQLITE_OMIT_VIEW */\n\n/*\n** This function is called by the VDBE to adjust the internal schema\n** used by SQLite when the btree layer moves a table root page. The\n** root-page of a table or index in database iDb has changed from iFrom\n** to iTo.\n**\n** Ticket #1728:  The symbol table might still contain information\n** on tables and/or indices that are the process of being deleted.\n** If you are unlucky, one of those deleted indices or tables might\n** have the same rootpage number as the real table or index that is\n** being moved.  So we cannot stop searching after the first match\n** because the first match might be for one of the deleted indices\n** or tables and not the table/index that is actually being moved.\n** We must continue looping until all tables and indices with\n** rootpage==iFrom have been converted to have a rootpage of iTo\n** in order to be certain that we got the right one.\n*/\n#ifndef SQLITE_OMIT_AUTOVACUUM\nSQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, Pgno iFrom, Pgno iTo){\n  HashElem *pElem;\n  Hash *pHash;\n  Db *pDb;\n\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  pDb = &db->aDb[iDb];\n  pHash = &pDb->pSchema->tblHash;\n  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){\n    Table *pTab = sqliteHashData(pElem);\n    if( pTab->tnum==iFrom ){\n      pTab->tnum = iTo;\n    }\n  }\n  pHash = &pDb->pSchema->idxHash;\n  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){\n    Index *pIdx = sqliteHashData(pElem);\n    if( pIdx->tnum==iFrom ){\n      pIdx->tnum = iTo;\n    }\n  }\n}\n#endif\n\n/*\n** Write code to erase the table with root-page iTable from database iDb.\n** Also write code to modify the sqlite_schema table and internal schema\n** if a root-page of another table is moved by the btree-layer whilst\n** erasing iTable (this can happen with an auto-vacuum database).\n*/\nstatic void destroyRootPage(Parse *pParse, int iTable, int iDb){\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  int r1 = sqlite3GetTempReg(pParse);\n  if( iTable<2 ) sqlite3ErrorMsg(pParse, \"corrupt schema\");\n  sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);\n  sqlite3MayAbort(pParse);\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  /* OP_Destroy stores an in integer r1. If this integer\n  ** is non-zero, then it is the root page number of a table moved to\n  ** location iTable. The following code modifies the sqlite_schema table to\n  ** reflect this.\n  **\n  ** The \"#NNN\" in the SQL is a special constant that means whatever value\n  ** is in register NNN.  See grammar rules associated with the TK_REGISTER\n  ** token for additional information.\n  */\n  sqlite3NestedParse(pParse,\n     \"UPDATE %Q.\" LEGACY_SCHEMA_TABLE\n     \" SET rootpage=%d WHERE #%d AND rootpage=#%d\",\n     pParse->db->aDb[iDb].zDbSName, iTable, r1, r1);\n#endif\n  sqlite3ReleaseTempReg(pParse, r1);\n}\n\n/*\n** Write VDBE code to erase table pTab and all associated indices on disk.\n** Code to update the sqlite_schema tables and internal schema definitions\n** in case a root-page belonging to another table is moved by the btree layer\n** is also added (this can happen with an auto-vacuum database).\n*/\nstatic void destroyTable(Parse *pParse, Table *pTab){\n  /* If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM\n  ** is not defined), then it is important to call OP_Destroy on the\n  ** table and index root-pages in order, starting with the numerically\n  ** largest root-page number. This guarantees that none of the root-pages\n  ** to be destroyed is relocated by an earlier OP_Destroy. i.e. if the\n  ** following were coded:\n  **\n  ** OP_Destroy 4 0\n  ** ...\n  ** OP_Destroy 5 0\n  **\n  ** and root page 5 happened to be the largest root-page number in the\n  ** database, then root page 5 would be moved to page 4 by the\n  ** \"OP_Destroy 4 0\" opcode. The subsequent \"OP_Destroy 5 0\" would hit\n  ** a free-list page.\n  */\n  Pgno iTab = pTab->tnum;\n  Pgno iDestroyed = 0;\n\n  while( 1 ){\n    Index *pIdx;\n    Pgno iLargest = 0;\n\n    if( iDestroyed==0 || iTab<iDestroyed ){\n      iLargest = iTab;\n    }\n    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      Pgno iIdx = pIdx->tnum;\n      assert( pIdx->pSchema==pTab->pSchema );\n      if( (iDestroyed==0 || (iIdx<iDestroyed)) && iIdx>iLargest ){\n        iLargest = iIdx;\n      }\n    }\n    if( iLargest==0 ){\n      return;\n    }else{\n      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n      assert( iDb>=0 && iDb<pParse->db->nDb );\n      destroyRootPage(pParse, iLargest, iDb);\n      iDestroyed = iLargest;\n    }\n  }\n}\n\n/*\n** Remove entries from the sqlite_statN tables (for N in (1,2,3))\n** after a DROP INDEX or DROP TABLE command.\n*/\nstatic void sqlite3ClearStatTables(\n  Parse *pParse,         /* The parsing context */\n  int iDb,               /* The database number */\n  const char *zType,     /* \"idx\" or \"tbl\" */\n  const char *zName      /* Name of index or table */\n){\n  int i;\n  const char *zDbName = pParse->db->aDb[iDb].zDbSName;\n  for(i=1; i<=4; i++){\n    char zTab[24];\n    sqlite3_snprintf(sizeof(zTab),zTab,\"sqlite_stat%d\",i);\n    if( sqlite3FindTable(pParse->db, zTab, zDbName) ){\n      sqlite3NestedParse(pParse,\n        \"DELETE FROM %Q.%s WHERE %s=%Q\",\n        zDbName, zTab, zType, zName\n      );\n    }\n  }\n}\n\n/*\n** Generate code to drop a table.\n*/\nSQLITE_PRIVATE void sqlite3CodeDropTable(Parse *pParse, Table *pTab, int iDb, int isView){\n  Vdbe *v;\n  sqlite3 *db = pParse->db;\n  Trigger *pTrigger;\n  Db *pDb = &db->aDb[iDb];\n\n  v = sqlite3GetVdbe(pParse);\n  assert( v!=0 );\n  sqlite3BeginWriteOperation(pParse, 1, iDb);\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTab) ){\n    sqlite3VdbeAddOp0(v, OP_VBegin);\n  }\n#endif\n\n  /* Drop all triggers associated with the table being dropped. Code\n  ** is generated to remove entries from sqlite_schema and/or\n  ** sqlite_temp_schema if required.\n  */\n  pTrigger = sqlite3TriggerList(pParse, pTab);\n  while( pTrigger ){\n    assert( pTrigger->pSchema==pTab->pSchema ||\n        pTrigger->pSchema==db->aDb[1].pSchema );\n    sqlite3DropTriggerPtr(pParse, pTrigger);\n    pTrigger = pTrigger->pNext;\n  }\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n  /* Remove any entries of the sqlite_sequence table associated with\n  ** the table being dropped. This is done before the table is dropped\n  ** at the btree level, in case the sqlite_sequence table needs to\n  ** move as a result of the drop (can happen in auto-vacuum mode).\n  */\n  if( pTab->tabFlags & TF_Autoincrement ){\n    sqlite3NestedParse(pParse,\n      \"DELETE FROM %Q.sqlite_sequence WHERE name=%Q\",\n      pDb->zDbSName, pTab->zName\n    );\n  }\n#endif\n\n  /* Drop all entries in the schema table that refer to the\n  ** table. The program name loops through the schema table and deletes\n  ** every row that refers to a table of the same name as the one being\n  ** dropped. Triggers are handled separately because a trigger can be\n  ** created in the temp database that refers to a table in another\n  ** database.\n  */\n  sqlite3NestedParse(pParse,\n      \"DELETE FROM %Q.\" LEGACY_SCHEMA_TABLE\n      \" WHERE tbl_name=%Q and type!='trigger'\",\n      pDb->zDbSName, pTab->zName);\n  if( !isView && !IsVirtual(pTab) ){\n    destroyTable(pParse, pTab);\n  }\n\n  /* Remove the table entry from SQLite's internal schema and modify\n  ** the schema cookie.\n  */\n  if( IsVirtual(pTab) ){\n    sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);\n    sqlite3MayAbort(pParse);\n  }\n  sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);\n  sqlite3ChangeCookie(pParse, iDb);\n  sqliteViewResetAll(db, iDb);\n}\n\n/*\n** Return TRUE if shadow tables should be read-only in the current\n** context.\n*/\nSQLITE_PRIVATE int sqlite3ReadOnlyShadowTables(sqlite3 *db){\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( (db->flags & SQLITE_Defensive)!=0\n   && db->pVtabCtx==0\n   && db->nVdbeExec==0\n   && !sqlite3VtabInSync(db)\n  ){\n    return 1;\n  }\n#endif\n  return 0;\n}\n\n/*\n** Return true if it is not allowed to drop the given table\n*/\nstatic int tableMayNotBeDropped(sqlite3 *db, Table *pTab){\n  if( sqlite3StrNICmp(pTab->zName, \"sqlite_\", 7)==0 ){\n    if( sqlite3StrNICmp(pTab->zName+7, \"stat\", 4)==0 ) return 0;\n    if( sqlite3StrNICmp(pTab->zName+7, \"parameters\", 10)==0 ) return 0;\n    return 1;\n  }\n  if( (pTab->tabFlags & TF_Shadow)!=0 && sqlite3ReadOnlyShadowTables(db) ){\n    return 1;\n  }\n  if( pTab->tabFlags & TF_Eponymous ){\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** This routine is called to do the work of a DROP TABLE statement.\n** pName is the name of the table to be dropped.\n*/\nSQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, int noErr){\n  Table *pTab;\n  Vdbe *v;\n  sqlite3 *db = pParse->db;\n  int iDb;\n\n  if( db->mallocFailed ){\n    goto exit_drop_table;\n  }\n  assert( pParse->nErr==0 );\n  assert( pName->nSrc==1 );\n  assert( pName->a[0].fg.fixedSchema==0 );\n  assert( pName->a[0].fg.isSubquery==0 );\n  if( sqlite3ReadSchema(pParse) ) goto exit_drop_table;\n  if( noErr ) db->suppressErr++;\n  assert( isView==0 || isView==LOCATE_VIEW );\n  pTab = sqlite3LocateTableItem(pParse, isView, &pName->a[0]);\n  if( noErr ) db->suppressErr--;\n\n  if( pTab==0 ){\n    if( noErr ){\n      sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].u4.zDatabase);\n      sqlite3ForceNotReadOnly(pParse);\n    }\n    goto exit_drop_table;\n  }\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iDb>=0 && iDb<db->nDb );\n\n  /* If pTab is a virtual table, call ViewGetColumnNames() to ensure\n  ** it is initialized.\n  */\n  if( IsVirtual(pTab) && sqlite3ViewGetColumnNames(pParse, pTab) ){\n    goto exit_drop_table;\n  }\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  {\n    int code;\n    const char *zTab = SCHEMA_TABLE(iDb);\n    const char *zDb = db->aDb[iDb].zDbSName;\n    const char *zArg2 = 0;\n    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb)){\n      goto exit_drop_table;\n    }\n    if( isView ){\n      if( !OMIT_TEMPDB && iDb==1 ){\n        code = SQLITE_DROP_TEMP_VIEW;\n      }else{\n        code = SQLITE_DROP_VIEW;\n      }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    }else if( IsVirtual(pTab) ){\n      code = SQLITE_DROP_VTABLE;\n      zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;\n#endif\n    }else{\n      if( !OMIT_TEMPDB && iDb==1 ){\n        code = SQLITE_DROP_TEMP_TABLE;\n      }else{\n        code = SQLITE_DROP_TABLE;\n      }\n    }\n    if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){\n      goto exit_drop_table;\n    }\n    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){\n      goto exit_drop_table;\n    }\n  }\n#endif\n  if( tableMayNotBeDropped(db, pTab) ){\n    sqlite3ErrorMsg(pParse, \"table %s may not be dropped\", pTab->zName);\n    goto exit_drop_table;\n  }\n\n#ifndef SQLITE_OMIT_VIEW\n  /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used\n  ** on a table.\n  */\n  if( isView && !IsView(pTab) ){\n    sqlite3ErrorMsg(pParse, \"use DROP TABLE to delete table %s\", pTab->zName);\n    goto exit_drop_table;\n  }\n  if( !isView && IsView(pTab) ){\n    sqlite3ErrorMsg(pParse, \"use DROP VIEW to delete view %s\", pTab->zName);\n    goto exit_drop_table;\n  }\n#endif\n\n  /* Generate code to remove the table from the schema table\n  ** on disk.\n  */\n  v = sqlite3GetVdbe(pParse);\n  if( v ){\n    sqlite3BeginWriteOperation(pParse, 1, iDb);\n    if( !isView ){\n      sqlite3ClearStatTables(pParse, iDb, \"tbl\", pTab->zName);\n      sqlite3FkDropTable(pParse, pName, pTab);\n    }\n    sqlite3CodeDropTable(pParse, pTab, iDb, isView);\n  }\n\nexit_drop_table:\n  sqlite3SrcListDelete(db, pName);\n}\n\n/*\n** This routine is called to create a new foreign key on the table\n** currently under construction.  pFromCol determines which columns\n** in the current table point to the foreign key.  If pFromCol==0 then\n** connect the key to the last column inserted.  pTo is the name of\n** the table referred to (a.k.a the \"parent\" table).  pToCol is a list\n** of tables in the parent pTo table.  flags contains all\n** information about the conflict resolution algorithms specified\n** in the ON DELETE, ON UPDATE and ON INSERT clauses.\n**\n** An FKey structure is created and added to the table currently\n** under construction in the pParse->pNewTable field.\n**\n** The foreign key is set for IMMEDIATE processing.  A subsequent call\n** to sqlite3DeferForeignKey() might change this to DEFERRED.\n*/\nSQLITE_PRIVATE void sqlite3CreateForeignKey(\n  Parse *pParse,       /* Parsing context */\n  ExprList *pFromCol,  /* Columns in this table that point to other table */\n  Token *pTo,          /* Name of the other table */\n  ExprList *pToCol,    /* Columns in the other table */\n  int flags            /* Conflict resolution algorithms. */\n){\n  sqlite3 *db = pParse->db;\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n  FKey *pFKey = 0;\n  FKey *pNextTo;\n  Table *p = pParse->pNewTable;\n  i64 nByte;\n  int i;\n  int nCol;\n  char *z;\n\n  assert( pTo!=0 );\n  if( p==0 || IN_DECLARE_VTAB ) goto fk_end;\n  if( pFromCol==0 ){\n    int iCol = p->nCol-1;\n    if( NEVER(iCol<0) ) goto fk_end;\n    if( pToCol && pToCol->nExpr!=1 ){\n      sqlite3ErrorMsg(pParse, \"foreign key on %s\"\n         \" should reference only one column of table %T\",\n         p->aCol[iCol].zCnName, pTo);\n      goto fk_end;\n    }\n    nCol = 1;\n  }else if( pToCol && pToCol->nExpr!=pFromCol->nExpr ){\n    sqlite3ErrorMsg(pParse,\n        \"number of columns in foreign key does not match the number of \"\n        \"columns in the referenced table\");\n    goto fk_end;\n  }else{\n    nCol = pFromCol->nExpr;\n  }\n  nByte = SZ_FKEY(nCol) + pTo->n + 1;\n  if( pToCol ){\n    for(i=0; i<pToCol->nExpr; i++){\n      nByte += sqlite3Strlen30(pToCol->a[i].zEName) + 1;\n    }\n  }\n  pFKey = sqlite3DbMallocZero(db, nByte );\n  if( pFKey==0 ){\n    goto fk_end;\n  }\n  pFKey->pFrom = p;\n  assert( IsOrdinaryTable(p) );\n  pFKey->pNextFrom = p->u.tab.pFKey;\n  z = (char*)&pFKey->aCol[nCol];\n  pFKey->zTo = z;\n  if( IN_RENAME_OBJECT ){\n    sqlite3RenameTokenMap(pParse, (void*)z, pTo);\n  }\n  memcpy(z, pTo->z, pTo->n);\n  z[pTo->n] = 0;\n  sqlite3Dequote(z);\n  z += pTo->n+1;\n  pFKey->nCol = nCol;\n  if( pFromCol==0 ){\n    pFKey->aCol[0].iFrom = p->nCol-1;\n  }else{\n    for(i=0; i<nCol; i++){\n      int j;\n      for(j=0; j<p->nCol; j++){\n        if( sqlite3StrICmp(p->aCol[j].zCnName, pFromCol->a[i].zEName)==0 ){\n          pFKey->aCol[i].iFrom = j;\n          break;\n        }\n      }\n      if( j>=p->nCol ){\n        sqlite3ErrorMsg(pParse,\n          \"unknown column \\\"%s\\\" in foreign key definition\",\n          pFromCol->a[i].zEName);\n        goto fk_end;\n      }\n      if( IN_RENAME_OBJECT ){\n        sqlite3RenameTokenRemap(pParse, &pFKey->aCol[i], pFromCol->a[i].zEName);\n      }\n    }\n  }\n  if( pToCol ){\n    for(i=0; i<nCol; i++){\n      int n = sqlite3Strlen30(pToCol->a[i].zEName);\n      pFKey->aCol[i].zCol = z;\n      if( IN_RENAME_OBJECT ){\n        sqlite3RenameTokenRemap(pParse, z, pToCol->a[i].zEName);\n      }\n      memcpy(z, pToCol->a[i].zEName, n);\n      z[n] = 0;\n      z += n+1;\n    }\n  }\n  pFKey->isDeferred = 0;\n  pFKey->aAction[0] = (u8)(flags & 0xff);            /* ON DELETE action */\n  pFKey->aAction[1] = (u8)((flags >> 8 ) & 0xff);    /* ON UPDATE action */\n\n  assert( sqlite3SchemaMutexHeld(db, 0, p->pSchema) );\n  pNextTo = (FKey *)sqlite3HashInsert(&p->pSchema->fkeyHash,\n      pFKey->zTo, (void *)pFKey\n  );\n  if( pNextTo==pFKey ){\n    sqlite3OomFault(db);\n    goto fk_end;\n  }\n  if( pNextTo ){\n    assert( pNextTo->pPrevTo==0 );\n    pFKey->pNextTo = pNextTo;\n    pNextTo->pPrevTo = pFKey;\n  }\n\n  /* Link the foreign key to the table as the last step.\n  */\n  assert( IsOrdinaryTable(p) );\n  p->u.tab.pFKey = pFKey;\n  pFKey = 0;\n\nfk_end:\n  sqlite3DbFree(db, pFKey);\n#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */\n  sqlite3ExprListDelete(db, pFromCol);\n  sqlite3ExprListDelete(db, pToCol);\n}\n\n/*\n** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED\n** clause is seen as part of a foreign key definition.  The isDeferred\n** parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.\n** The behavior of the most recently created foreign key is adjusted\n** accordingly.\n*/\nSQLITE_PRIVATE void sqlite3DeferForeignKey(Parse *pParse, int isDeferred){\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n  Table *pTab;\n  FKey *pFKey;\n  if( (pTab = pParse->pNewTable)==0 ) return;\n  if( NEVER(!IsOrdinaryTable(pTab)) ) return;\n  if( (pFKey = pTab->u.tab.pFKey)==0 ) return;\n  assert( isDeferred==0 || isDeferred==1 ); /* EV: R-30323-21917 */\n  pFKey->isDeferred = (u8)isDeferred;\n#endif\n}\n\n/*\n** Generate code that will erase and refill index *pIdx.  This is\n** used to initialize a newly created index or to recompute the\n** content of an index in response to a REINDEX command.\n**\n** if memRootPage is not negative, it means that the index is newly\n** created.  The register specified by memRootPage contains the\n** root page number of the index.  If memRootPage is negative, then\n** the index already exists and must be cleared before being refilled and\n** the root page number of the index is taken from pIndex->tnum.\n*/\nstatic void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){\n  Table *pTab = pIndex->pTable;  /* The table that is indexed */\n  int iTab = pParse->nTab++;     /* Btree cursor used for pTab */\n  int iIdx = pParse->nTab++;     /* Btree cursor used for pIndex */\n  int iSorter;                   /* Cursor opened by OpenSorter (if in use) */\n  int addr1;                     /* Address of top of loop */\n  int addr2;                     /* Address to jump to for next iteration */\n  Pgno tnum;                     /* Root page of index */\n  int iPartIdxLabel;             /* Jump to this label to skip a row */\n  Vdbe *v;                       /* Generate code into this virtual machine */\n  KeyInfo *pKey;                 /* KeyInfo for index */\n  int regRecord;                 /* Register holding assembled index record */\n  sqlite3 *db = pParse->db;      /* The database connection */\n  int iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,\n      db->aDb[iDb].zDbSName ) ){\n    return;\n  }\n#endif\n\n  /* Require a write-lock on the table to perform this operation */\n  sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);\n\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 ) return;\n  if( memRootPage>=0 ){\n    tnum = (Pgno)memRootPage;\n  }else{\n    tnum = pIndex->tnum;\n  }\n  pKey = sqlite3KeyInfoOfIndex(pParse, pIndex);\n  assert( pKey!=0 || pParse->nErr );\n\n  /* Open the sorter cursor if we are to use one. */\n  iSorter = pParse->nTab++;\n  sqlite3VdbeAddOp4(v, OP_SorterOpen, iSorter, 0, pIndex->nKeyCol, (char*)\n                    sqlite3KeyInfoRef(pKey), P4_KEYINFO);\n\n  /* Open the table. Loop through all rows of the table, inserting index\n  ** records into the sorter. */\n  sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);\n  addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0); VdbeCoverage(v);\n  regRecord = sqlite3GetTempReg(pParse);\n  sqlite3MultiWrite(pParse);\n\n  sqlite3GenerateIndexKey(pParse,pIndex,iTab,regRecord,0,&iPartIdxLabel,0,0);\n  sqlite3VdbeAddOp2(v, OP_SorterInsert, iSorter, regRecord);\n  sqlite3ResolvePartIdxLabel(pParse, iPartIdxLabel);\n  sqlite3VdbeAddOp2(v, OP_Next, iTab, addr1+1); VdbeCoverage(v);\n  sqlite3VdbeJumpHere(v, addr1);\n  if( memRootPage<0 ) sqlite3VdbeAddOp2(v, OP_Clear, tnum, iDb);\n  sqlite3VdbeAddOp4(v, OP_OpenWrite, iIdx, (int)tnum, iDb,\n                    (char *)pKey, P4_KEYINFO);\n  sqlite3VdbeChangeP5(v, OPFLAG_BULKCSR|((memRootPage>=0)?OPFLAG_P2ISREG:0));\n\n  addr1 = sqlite3VdbeAddOp2(v, OP_SorterSort, iSorter, 0); VdbeCoverage(v);\n  if( IsUniqueIndex(pIndex) ){\n    int j2 = sqlite3VdbeGoto(v, 1);\n    addr2 = sqlite3VdbeCurrentAddr(v);\n    sqlite3VdbeVerifyAbortable(v, OE_Abort);\n    sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,\n                         pIndex->nKeyCol); VdbeCoverage(v);\n    sqlite3UniqueConstraint(pParse, OE_Abort, pIndex);\n    sqlite3VdbeJumpHere(v, j2);\n  }else{\n    /* Most CREATE INDEX and REINDEX statements that are not UNIQUE can not\n    ** abort. The exception is if one of the indexed expressions contains a\n    ** user function that throws an exception when it is evaluated. But the\n    ** overhead of adding a statement journal to a CREATE INDEX statement is\n    ** very small (since most of the pages written do not contain content that\n    ** needs to be restored if the statement aborts), so we call\n    ** sqlite3MayAbort() for all CREATE INDEX statements.  */\n    sqlite3MayAbort(pParse);\n    addr2 = sqlite3VdbeCurrentAddr(v);\n  }\n  sqlite3VdbeAddOp3(v, OP_SorterData, iSorter, regRecord, iIdx);\n  if( !pIndex->bAscKeyBug ){\n    /* This OP_SeekEnd opcode makes index insert for a REINDEX go much\n    ** faster by avoiding unnecessary seeks.  But the optimization does\n    ** not work for UNIQUE constraint indexes on WITHOUT ROWID tables\n    ** with DESC primary keys, since those indexes have there keys in\n    ** a different order from the main table.\n    ** See ticket: https://sqlite.org/src/info/bba7b69f9849b5bf\n    */\n    sqlite3VdbeAddOp1(v, OP_SeekEnd, iIdx);\n  }\n  sqlite3VdbeAddOp2(v, OP_IdxInsert, iIdx, regRecord);\n  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n  sqlite3ReleaseTempReg(pParse, regRecord);\n  sqlite3VdbeAddOp2(v, OP_SorterNext, iSorter, addr2); VdbeCoverage(v);\n  sqlite3VdbeJumpHere(v, addr1);\n\n  sqlite3VdbeAddOp1(v, OP_Close, iTab);\n  sqlite3VdbeAddOp1(v, OP_Close, iIdx);\n  sqlite3VdbeAddOp1(v, OP_Close, iSorter);\n}\n\n/*\n** Allocate heap space to hold an Index object with nCol columns.\n**\n** Increase the allocation size to provide an extra nExtra bytes\n** of 8-byte aligned space after the Index object and return a\n** pointer to this extra space in *ppExtra.\n*/\nSQLITE_PRIVATE Index *sqlite3AllocateIndexObject(\n  sqlite3 *db,         /* Database connection */\n  int nCol,            /* Total number of columns in the index */\n  int nExtra,          /* Number of bytes of extra space to alloc */\n  char **ppExtra       /* Pointer to the \"extra\" space */\n){\n  Index *p;            /* Allocated index object */\n  i64 nByte;           /* Bytes of space for Index object + arrays */\n\n  assert( nCol <= 2*db->aLimit[SQLITE_LIMIT_COLUMN] );\n  nByte = ROUND8(sizeof(Index)) +              /* Index structure  */\n          ROUND8(sizeof(char*)*nCol) +         /* Index.azColl     */\n          ROUND8(sizeof(LogEst)*(nCol+1) +     /* Index.aiRowLogEst   */\n                 sizeof(i16)*nCol +            /* Index.aiColumn   */\n                 sizeof(u8)*nCol);             /* Index.aSortOrder */\n  p = sqlite3DbMallocZero(db, nByte + nExtra);\n  if( p ){\n    char *pExtra = ((char*)p)+ROUND8(sizeof(Index));\n    p->azColl = (const char**)pExtra; pExtra += ROUND8(sizeof(char*)*nCol);\n    p->aiRowLogEst = (LogEst*)pExtra; pExtra += sizeof(LogEst)*(nCol+1);\n    p->aiColumn = (i16*)pExtra;       pExtra += sizeof(i16)*nCol;\n    p->aSortOrder = (u8*)pExtra;\n    assert( nCol>0 );\n    p->nColumn = (u16)nCol;\n    p->nKeyCol = (u16)(nCol - 1);\n    *ppExtra = ((char*)p) + nByte;\n  }\n  return p;\n}\n\n/*\n** If expression list pList contains an expression that was parsed with\n** an explicit \"NULLS FIRST\" or \"NULLS LAST\" clause, leave an error in\n** pParse and return non-zero. Otherwise, return zero.\n*/\nSQLITE_PRIVATE int sqlite3HasExplicitNulls(Parse *pParse, ExprList *pList){\n  if( pList ){\n    int i;\n    for(i=0; i<pList->nExpr; i++){\n      if( pList->a[i].fg.bNulls ){\n        u8 sf = pList->a[i].fg.sortFlags;\n        sqlite3ErrorMsg(pParse, \"unsupported use of NULLS %s\",\n            (sf==0 || sf==3) ? \"FIRST\" : \"LAST\"\n        );\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** Create a new index for an SQL table.  pName1.pName2 is the name of the index\n** and pTblList is the name of the table that is to be indexed.  Both will\n** be NULL for a primary key or an index that is created to satisfy a\n** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable\n** as the table to be indexed.  pParse->pNewTable is a table that is\n** currently being constructed by a CREATE TABLE statement.\n**\n** pList is a list of columns to be indexed.  pList will be NULL if this\n** is a primary key or unique-constraint on the most recent column added\n** to the table currently under construction.\n*/\nSQLITE_PRIVATE void sqlite3CreateIndex(\n  Parse *pParse,     /* All information about this parse */\n  Token *pName1,     /* First part of index name. May be NULL */\n  Token *pName2,     /* Second part of index name. May be NULL */\n  SrcList *pTblName, /* Table to index. Use pParse->pNewTable if 0 */\n  ExprList *pList,   /* A list of columns to be indexed */\n  int onError,       /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */\n  Token *pStart,     /* The CREATE token that begins this statement */\n  Expr *pPIWhere,    /* WHERE clause for partial indices */\n  int sortOrder,     /* Sort order of primary key when pList==NULL */\n  int ifNotExist,    /* Omit error if index already exists */\n  u8 idxType         /* The index type */\n){\n  Table *pTab = 0;     /* Table to be indexed */\n  Index *pIndex = 0;   /* The index to be created */\n  char *zName = 0;     /* Name of the index */\n  int nName;           /* Number of characters in zName */\n  int i, j;\n  DbFixer sFix;        /* For assigning database names to pTable */\n  int sortOrderMask;   /* 1 to honor DESC in index.  0 to ignore. */\n  sqlite3 *db = pParse->db;\n  Db *pDb;             /* The specific table containing the indexed database */\n  int iDb;             /* Index of the database that is being written */\n  Token *pName = 0;    /* Unqualified name of the index to create */\n  struct ExprList_item *pListItem; /* For looping over pList */\n  int nExtra = 0;                  /* Space allocated for zExtra[] */\n  int nExtraCol;                   /* Number of extra columns needed */\n  char *zExtra = 0;                /* Extra space after the Index object */\n  Index *pPk = 0;      /* PRIMARY KEY index for WITHOUT ROWID tables */\n\n  assert( db->pParse==pParse );\n  if( pParse->nErr ){\n    goto exit_create_index;\n  }\n  assert( db->mallocFailed==0 );\n  if( IN_DECLARE_VTAB && idxType!=SQLITE_IDXTYPE_PRIMARYKEY ){\n    goto exit_create_index;\n  }\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n    goto exit_create_index;\n  }\n  if( sqlite3HasExplicitNulls(pParse, pList) ){\n    goto exit_create_index;\n  }\n\n  /*\n  ** Find the table that is to be indexed.  Return early if not found.\n  */\n  if( pTblName!=0 ){\n\n    /* Use the two-part index name to determine the database\n    ** to search for the table. 'Fix' the table name to this db\n    ** before looking up the table.\n    */\n    assert( pName1 && pName2 );\n    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);\n    if( iDb<0 ) goto exit_create_index;\n    assert( pName && pName->z );\n\n#ifndef SQLITE_OMIT_TEMPDB\n    /* If the index name was unqualified, check if the table\n    ** is a temp table. If so, set the database to 1. Do not do this\n    ** if initializing a database schema.\n    */\n    if( !db->init.busy ){\n      pTab = sqlite3SrcListLookup(pParse, pTblName);\n      if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){\n        iDb = 1;\n      }\n    }\n#endif\n\n    sqlite3FixInit(&sFix, pParse, iDb, \"index\", pName);\n    if( sqlite3FixSrcList(&sFix, pTblName) ){\n      /* Because the parser constructs pTblName from a single identifier,\n      ** sqlite3FixSrcList can never fail. */\n      assert(0);\n    }\n    pTab = sqlite3LocateTableItem(pParse, 0, &pTblName->a[0]);\n    assert( db->mallocFailed==0 || pTab==0 );\n    if( pTab==0 ) goto exit_create_index;\n    if( iDb==1 && db->aDb[iDb].pSchema!=pTab->pSchema ){\n      sqlite3ErrorMsg(pParse,\n           \"cannot create a TEMP index on non-TEMP table \\\"%s\\\"\",\n           pTab->zName);\n      goto exit_create_index;\n    }\n    if( !HasRowid(pTab) ) pPk = sqlite3PrimaryKeyIndex(pTab);\n  }else{\n    assert( pName==0 );\n    assert( pStart==0 );\n    pTab = pParse->pNewTable;\n    if( !pTab ) goto exit_create_index;\n    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  }\n  pDb = &db->aDb[iDb];\n\n  assert( pTab!=0 );\n  if( sqlite3StrNICmp(pTab->zName, \"sqlite_\", 7)==0\n       && db->init.busy==0\n       && pTblName!=0\n  ){\n    sqlite3ErrorMsg(pParse, \"table %s may not be indexed\", pTab->zName);\n    goto exit_create_index;\n  }\n#ifndef SQLITE_OMIT_VIEW\n  if( IsView(pTab) ){\n    sqlite3ErrorMsg(pParse, \"views may not be indexed\");\n    goto exit_create_index;\n  }\n#endif\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTab) ){\n    sqlite3ErrorMsg(pParse, \"virtual tables may not be indexed\");\n    goto exit_create_index;\n  }\n#endif\n\n  /*\n  ** Find the name of the index.  Make sure there is not already another\n  ** index or table with the same name.\n  **\n  ** Exception:  If we are reading the names of permanent indices from the\n  ** sqlite_schema table (because some other process changed the schema) and\n  ** one of the index names collides with the name of a temporary table or\n  ** index, then we will continue to process this index.\n  **\n  ** If pName==0 it means that we are\n  ** dealing with a primary key or UNIQUE constraint.  We have to invent our\n  ** own name.\n  */\n  if( pName ){\n    zName = sqlite3NameFromToken(db, pName);\n    if( zName==0 ) goto exit_create_index;\n    assert( pName->z!=0 );\n    if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName,\"index\",pTab->zName) ){\n      goto exit_create_index;\n    }\n    if( !IN_RENAME_OBJECT ){\n      if( !db->init.busy ){\n        if( sqlite3FindTable(db, zName, pDb->zDbSName)!=0 ){\n          sqlite3ErrorMsg(pParse, \"there is already a table named %s\", zName);\n          goto exit_create_index;\n        }\n      }\n      if( sqlite3FindIndex(db, zName, pDb->zDbSName)!=0 ){\n        if( !ifNotExist ){\n          sqlite3ErrorMsg(pParse, \"index %s already exists\", zName);\n        }else{\n          assert( !db->init.busy );\n          sqlite3CodeVerifySchema(pParse, iDb);\n          sqlite3ForceNotReadOnly(pParse);\n        }\n        goto exit_create_index;\n      }\n    }\n  }else{\n    int n;\n    Index *pLoop;\n    for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}\n    zName = sqlite3MPrintf(db, \"sqlite_autoindex_%s_%d\", pTab->zName, n);\n    if( zName==0 ){\n      goto exit_create_index;\n    }\n\n    /* Automatic index names generated from within sqlite3_declare_vtab()\n    ** must have names that are distinct from normal automatic index names.\n    ** The following statement converts \"sqlite3_autoindex...\" into\n    ** \"sqlite3_butoindex...\" in order to make the names distinct.\n    ** The \"vtab_err.test\" test demonstrates the need of this statement. */\n    if( IN_SPECIAL_PARSE ) zName[7]++;\n  }\n\n  /* Check for authorization to create an index.\n  */\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( !IN_RENAME_OBJECT ){\n    const char *zDb = pDb->zDbSName;\n    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iDb), 0, zDb) ){\n      goto exit_create_index;\n    }\n    i = SQLITE_CREATE_INDEX;\n    if( !OMIT_TEMPDB && iDb==1 ) i = SQLITE_CREATE_TEMP_INDEX;\n    if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){\n      goto exit_create_index;\n    }\n  }\n#endif\n\n  /* If pList==0, it means this routine was called to make a primary\n  ** key out of the last column added to the table under construction.\n  ** So create a fake list to simulate this.\n  */\n  if( pList==0 ){\n    Token prevCol;\n    Column *pCol = &pTab->aCol[pTab->nCol-1];\n    pCol->colFlags |= COLFLAG_UNIQUE;\n    sqlite3TokenInit(&prevCol, pCol->zCnName);\n    pList = sqlite3ExprListAppend(pParse, 0,\n              sqlite3ExprAlloc(db, TK_ID, &prevCol, 0));\n    if( pList==0 ) goto exit_create_index;\n    assert( pList->nExpr==1 );\n    sqlite3ExprListSetSortOrder(pList, sortOrder, SQLITE_SO_UNDEFINED);\n  }else{\n    sqlite3ExprListCheckLength(pParse, pList, \"index\");\n    if( pParse->nErr ) goto exit_create_index;\n  }\n\n  /* Figure out how many bytes of space are required to store explicitly\n  ** specified collation sequence names.\n  */\n  for(i=0; i<pList->nExpr; i++){\n    Expr *pExpr = pList->a[i].pExpr;\n    assert( pExpr!=0 );\n    if( pExpr->op==TK_COLLATE ){\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      nExtra += (1 + sqlite3Strlen30(pExpr->u.zToken));\n    }\n  }\n\n  /*\n  ** Allocate the index structure.\n  */\n  nName = sqlite3Strlen30(zName);\n  nExtraCol = pPk ? pPk->nKeyCol : 1;\n  assert( pList->nExpr + nExtraCol <= 32767 /* Fits in i16 */ );\n  pIndex = sqlite3AllocateIndexObject(db, pList->nExpr + nExtraCol,\n                                      nName + nExtra + 1, &zExtra);\n  if( db->mallocFailed ){\n    goto exit_create_index;\n  }\n  assert( EIGHT_BYTE_ALIGNMENT(pIndex->aiRowLogEst) );\n  assert( EIGHT_BYTE_ALIGNMENT(pIndex->azColl) );\n  pIndex->zName = zExtra;\n  zExtra += nName + 1;\n  memcpy(pIndex->zName, zName, nName+1);\n  pIndex->pTable = pTab;\n  pIndex->onError = (u8)onError;\n  pIndex->uniqNotNull = onError!=OE_None;\n  pIndex->idxType = idxType;\n  pIndex->pSchema = db->aDb[iDb].pSchema;\n  pIndex->nKeyCol = pList->nExpr;\n  if( pPIWhere ){\n    sqlite3ResolveSelfReference(pParse, pTab, NC_PartIdx, pPIWhere, 0);\n    pIndex->pPartIdxWhere = pPIWhere;\n    pPIWhere = 0;\n  }\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n\n  /* Check to see if we should honor DESC requests on index columns\n  */\n  if( pDb->pSchema->file_format>=4 ){\n    sortOrderMask = -1;   /* Honor DESC */\n  }else{\n    sortOrderMask = 0;    /* Ignore DESC */\n  }\n\n  /* Analyze the list of expressions that form the terms of the index and\n  ** report any errors.  In the common case where the expression is exactly\n  ** a table column, store that column in aiColumn[].  For general expressions,\n  ** populate pIndex->aColExpr and store XN_EXPR (-2) in aiColumn[].\n  **\n  ** TODO: Issue a warning if two or more columns of the index are identical.\n  ** TODO: Issue a warning if the table primary key is used as part of the\n  ** index key.\n  */\n  pListItem = pList->a;\n  if( IN_RENAME_OBJECT ){\n    pIndex->aColExpr = pList;\n    pList = 0;\n  }\n  for(i=0; i<pIndex->nKeyCol; i++, pListItem++){\n    Expr *pCExpr;                  /* The i-th index expression */\n    int requestedSortOrder;        /* ASC or DESC on the i-th expression */\n    const char *zColl;             /* Collation sequence name */\n\n    sqlite3StringToId(pListItem->pExpr);\n    sqlite3ResolveSelfReference(pParse, pTab, NC_IdxExpr, pListItem->pExpr, 0);\n    if( pParse->nErr ) goto exit_create_index;\n    pCExpr = sqlite3ExprSkipCollate(pListItem->pExpr);\n    if( pCExpr->op!=TK_COLUMN ){\n      if( pTab==pParse->pNewTable ){\n        sqlite3ErrorMsg(pParse, \"expressions prohibited in PRIMARY KEY and \"\n                                \"UNIQUE constraints\");\n        goto exit_create_index;\n      }\n      if( pIndex->aColExpr==0 ){\n        pIndex->aColExpr = pList;\n        pList = 0;\n      }\n      j = XN_EXPR;\n      pIndex->aiColumn[i] = XN_EXPR;\n      pIndex->uniqNotNull = 0;\n      pIndex->bHasExpr = 1;\n    }else{\n      j = pCExpr->iColumn;\n      assert( j<=0x7fff );\n      if( j<0 ){\n        j = pTab->iPKey;\n      }else{\n        if( pTab->aCol[j].notNull==0 ){\n          pIndex->uniqNotNull = 0;\n        }\n        if( pTab->aCol[j].colFlags & COLFLAG_VIRTUAL ){\n          pIndex->bHasVCol = 1;\n          pIndex->bHasExpr = 1;\n        }\n      }\n      pIndex->aiColumn[i] = (i16)j;\n    }\n    zColl = 0;\n    if( pListItem->pExpr->op==TK_COLLATE ){\n      int nColl;\n      assert( !ExprHasProperty(pListItem->pExpr, EP_IntValue) );\n      zColl = pListItem->pExpr->u.zToken;\n      nColl = sqlite3Strlen30(zColl) + 1;\n      assert( nExtra>=nColl );\n      memcpy(zExtra, zColl, nColl);\n      zColl = zExtra;\n      zExtra += nColl;\n      nExtra -= nColl;\n    }else if( j>=0 ){\n      zColl = sqlite3ColumnColl(&pTab->aCol[j]);\n    }\n    if( !zColl ) zColl = sqlite3StrBINARY;\n    if( !db->init.busy && !sqlite3LocateCollSeq(pParse, zColl) ){\n      goto exit_create_index;\n    }\n    pIndex->azColl[i] = zColl;\n    requestedSortOrder = pListItem->fg.sortFlags & sortOrderMask;\n    pIndex->aSortOrder[i] = (u8)requestedSortOrder;\n  }\n\n  /* Append the table key to the end of the index.  For WITHOUT ROWID\n  ** tables (when pPk!=0) this will be the declared PRIMARY KEY.  For\n  ** normal tables (when pPk==0) this will be the rowid.\n  */\n  if( pPk ){\n    for(j=0; j<pPk->nKeyCol; j++){\n      int x = pPk->aiColumn[j];\n      assert( x>=0 );\n      if( isDupColumn(pIndex, pIndex->nKeyCol, pPk, j) ){\n        pIndex->nColumn--;\n      }else{\n        testcase( hasColumn(pIndex->aiColumn,pIndex->nKeyCol,x) );\n        pIndex->aiColumn[i] = x;\n        pIndex->azColl[i] = pPk->azColl[j];\n        pIndex->aSortOrder[i] = pPk->aSortOrder[j];\n        i++;\n      }\n    }\n    assert( i==pIndex->nColumn );\n  }else{\n    pIndex->aiColumn[i] = XN_ROWID;\n    pIndex->azColl[i] = sqlite3StrBINARY;\n  }\n  sqlite3DefaultRowEst(pIndex);\n  if( pParse->pNewTable==0 ) estimateIndexWidth(pIndex);\n\n  /* If this index contains every column of its table, then mark\n  ** it as a covering index */\n  assert( HasRowid(pTab)\n      || pTab->iPKey<0 || sqlite3TableColumnToIndex(pIndex, pTab->iPKey)>=0 );\n  recomputeColumnsNotIndexed(pIndex);\n  if( pTblName!=0 && pIndex->nColumn>=pTab->nCol ){\n    pIndex->isCovering = 1;\n    for(j=0; j<pTab->nCol; j++){\n      if( j==pTab->iPKey ) continue;\n      if( sqlite3TableColumnToIndex(pIndex,j)>=0 ) continue;\n      pIndex->isCovering = 0;\n      break;\n    }\n  }\n\n  if( pTab==pParse->pNewTable ){\n    /* This routine has been called to create an automatic index as a\n    ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or\n    ** a PRIMARY KEY or UNIQUE clause following the column definitions.\n    ** i.e. one of:\n    **\n    ** CREATE TABLE t(x PRIMARY KEY, y);\n    ** CREATE TABLE t(x, y, UNIQUE(x, y));\n    **\n    ** Either way, check to see if the table already has such an index. If\n    ** so, don't bother creating this one. This only applies to\n    ** automatically created indices. Users can do as they wish with\n    ** explicit indices.\n    **\n    ** Two UNIQUE or PRIMARY KEY constraints are considered equivalent\n    ** (and thus suppressing the second one) even if they have different\n    ** sort orders.\n    **\n    ** If there are different collating sequences or if the columns of\n    ** the constraint occur in different orders, then the constraints are\n    ** considered distinct and both result in separate indices.\n    */\n    Index *pIdx;\n    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      int k;\n      assert( IsUniqueIndex(pIdx) );\n      assert( pIdx->idxType!=SQLITE_IDXTYPE_APPDEF );\n      assert( IsUniqueIndex(pIndex) );\n\n      if( pIdx->nKeyCol!=pIndex->nKeyCol ) continue;\n      for(k=0; k<pIdx->nKeyCol; k++){\n        const char *z1;\n        const char *z2;\n        assert( pIdx->aiColumn[k]>=0 );\n        if( pIdx->aiColumn[k]!=pIndex->aiColumn[k] ) break;\n        z1 = pIdx->azColl[k];\n        z2 = pIndex->azColl[k];\n        if( sqlite3StrICmp(z1, z2) ) break;\n      }\n      if( k==pIdx->nKeyCol ){\n        if( pIdx->onError!=pIndex->onError ){\n          /* This constraint creates the same index as a previous\n          ** constraint specified somewhere in the CREATE TABLE statement.\n          ** However the ON CONFLICT clauses are different. If both this\n          ** constraint and the previous equivalent constraint have explicit\n          ** ON CONFLICT clauses this is an error. Otherwise, use the\n          ** explicitly specified behavior for the index.\n          */\n          if( !(pIdx->onError==OE_Default || pIndex->onError==OE_Default) ){\n            sqlite3ErrorMsg(pParse,\n                \"conflicting ON CONFLICT clauses specified\", 0);\n          }\n          if( pIdx->onError==OE_Default ){\n            pIdx->onError = pIndex->onError;\n          }\n        }\n        if( idxType==SQLITE_IDXTYPE_PRIMARYKEY ) pIdx->idxType = idxType;\n        if( IN_RENAME_OBJECT ){\n          pIndex->pNext = pParse->pNewIndex;\n          pParse->pNewIndex = pIndex;\n          pIndex = 0;\n        }\n        goto exit_create_index;\n      }\n    }\n  }\n\n  if( !IN_RENAME_OBJECT ){\n\n    /* Link the new Index structure to its table and to the other\n    ** in-memory database structures.\n    */\n    assert( pParse->nErr==0 );\n    if( db->init.busy ){\n      Index *p;\n      assert( !IN_SPECIAL_PARSE );\n      assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );\n      if( pTblName!=0 ){\n        pIndex->tnum = db->init.newTnum;\n        if( sqlite3IndexHasDuplicateRootPage(pIndex) ){\n          sqlite3ErrorMsg(pParse, \"invalid rootpage\");\n          pParse->rc = SQLITE_CORRUPT_BKPT;\n          goto exit_create_index;\n        }\n      }\n      p = sqlite3HashInsert(&pIndex->pSchema->idxHash,\n          pIndex->zName, pIndex);\n      if( p ){\n        assert( p==pIndex );  /* Malloc must have failed */\n        sqlite3OomFault(db);\n        goto exit_create_index;\n      }\n      db->mDbFlags |= DBFLAG_SchemaChange;\n    }\n\n    /* If this is the initial CREATE INDEX statement (or CREATE TABLE if the\n    ** index is an implied index for a UNIQUE or PRIMARY KEY constraint) then\n    ** emit code to allocate the index rootpage on disk and make an entry for\n    ** the index in the sqlite_schema table and populate the index with\n    ** content.  But, do not do this if we are simply reading the sqlite_schema\n    ** table to parse the schema, or if this index is the PRIMARY KEY index\n    ** of a WITHOUT ROWID table.\n    **\n    ** If pTblName==0 it means this index is generated as an implied PRIMARY KEY\n    ** or UNIQUE index in a CREATE TABLE statement.  Since the table\n    ** has just been created, it contains no data and the index initialization\n    ** step can be skipped.\n    */\n    else if( HasRowid(pTab) || pTblName!=0 ){\n      Vdbe *v;\n      char *zStmt;\n      int iMem = ++pParse->nMem;\n\n      v = sqlite3GetVdbe(pParse);\n      if( v==0 ) goto exit_create_index;\n\n      sqlite3BeginWriteOperation(pParse, 1, iDb);\n\n      /* Create the rootpage for the index using CreateIndex. But before\n      ** doing so, code a Noop instruction and store its address in\n      ** Index.tnum. This is required in case this index is actually a\n      ** PRIMARY KEY and the table is actually a WITHOUT ROWID table. In\n      ** that case the convertToWithoutRowidTable() routine will replace\n      ** the Noop with a Goto to jump over the VDBE code generated below. */\n      pIndex->tnum = (Pgno)sqlite3VdbeAddOp0(v, OP_Noop);\n      sqlite3VdbeAddOp3(v, OP_CreateBtree, iDb, iMem, BTREE_BLOBKEY);\n\n      /* Gather the complete text of the CREATE INDEX statement into\n      ** the zStmt variable\n      */\n      assert( pName!=0 || pStart==0 );\n      if( pStart ){\n        int n = (int)(pParse->sLastToken.z - pName->z) + pParse->sLastToken.n;\n        if( pName->z[n-1]==';' ) n--;\n        /* A named index with an explicit CREATE INDEX statement */\n        zStmt = sqlite3MPrintf(db, \"CREATE%s INDEX %.*s\",\n            onError==OE_None ? \"\" : \" UNIQUE\", n, pName->z);\n      }else{\n        /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */\n        /* zStmt = sqlite3MPrintf(\"\"); */\n        zStmt = 0;\n      }\n\n      /* Add an entry in sqlite_schema for this index\n      */\n      sqlite3NestedParse(pParse,\n         \"INSERT INTO %Q.\" LEGACY_SCHEMA_TABLE \" VALUES('index',%Q,%Q,#%d,%Q);\",\n         db->aDb[iDb].zDbSName,\n         pIndex->zName,\n         pTab->zName,\n         iMem,\n         zStmt\n      );\n      sqlite3DbFree(db, zStmt);\n\n      /* Fill the index with data and reparse the schema. Code an OP_Expire\n      ** to invalidate all pre-compiled statements.\n      */\n      if( pTblName ){\n        sqlite3RefillIndex(pParse, pIndex, iMem);\n        sqlite3ChangeCookie(pParse, iDb);\n        sqlite3VdbeAddParseSchemaOp(v, iDb,\n            sqlite3MPrintf(db, \"name='%q' AND type='index'\", pIndex->zName), 0);\n        sqlite3VdbeAddOp2(v, OP_Expire, 0, 1);\n      }\n\n      sqlite3VdbeJumpHere(v, (int)pIndex->tnum);\n    }\n  }\n  if( db->init.busy || pTblName==0 ){\n    pIndex->pNext = pTab->pIndex;\n    pTab->pIndex = pIndex;\n    pIndex = 0;\n  }\n  else if( IN_RENAME_OBJECT ){\n    assert( pParse->pNewIndex==0 );\n    pParse->pNewIndex = pIndex;\n    pIndex = 0;\n  }\n\n  /* Clean up before exiting */\nexit_create_index:\n  if( pIndex ) sqlite3FreeIndex(db, pIndex);\n  if( pTab ){\n    /* Ensure all REPLACE indexes on pTab are at the end of the pIndex list.\n    ** The list was already ordered when this routine was entered, so at this\n    ** point at most a single index (the newly added index) will be out of\n    ** order.  So we have to reorder at most one index. */\n    Index **ppFrom;\n    Index *pThis;\n    for(ppFrom=&pTab->pIndex; (pThis = *ppFrom)!=0; ppFrom=&pThis->pNext){\n      Index *pNext;\n      if( pThis->onError!=OE_Replace ) continue;\n      while( (pNext = pThis->pNext)!=0 && pNext->onError!=OE_Replace ){\n        *ppFrom = pNext;\n        pThis->pNext = pNext->pNext;\n        pNext->pNext = pThis;\n        ppFrom = &pNext->pNext;\n      }\n      break;\n    }\n#ifdef SQLITE_DEBUG\n    /* Verify that all REPLACE indexes really are now at the end\n    ** of the index list.  In other words, no other index type ever\n    ** comes after a REPLACE index on the list. */\n    for(pThis = pTab->pIndex; pThis; pThis=pThis->pNext){\n      assert( pThis->onError!=OE_Replace\n           || pThis->pNext==0\n           || pThis->pNext->onError==OE_Replace );\n    }\n#endif\n  }\n  sqlite3ExprDelete(db, pPIWhere);\n  sqlite3ExprListDelete(db, pList);\n  sqlite3SrcListDelete(db, pTblName);\n  sqlite3DbFree(db, zName);\n}\n\n/*\n** Fill the Index.aiRowEst[] array with default information - information\n** to be used when we have not run the ANALYZE command.\n**\n** aiRowEst[0] is supposed to contain the number of elements in the index.\n** Since we do not know, guess 1 million.  aiRowEst[1] is an estimate of the\n** number of rows in the table that match any particular value of the\n** first column of the index.  aiRowEst[2] is an estimate of the number\n** of rows that match any particular combination of the first 2 columns\n** of the index.  And so forth.  It must always be the case that\n*\n**           aiRowEst[N]<=aiRowEst[N-1]\n**           aiRowEst[N]>=1\n**\n** Apart from that, we have little to go on besides intuition as to\n** how aiRowEst[] should be initialized.  The numbers generated here\n** are based on typical values found in actual indices.\n*/\nSQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){\n               /*                10,  9,  8,  7,  6 */\n  static const LogEst aVal[] = { 33, 32, 30, 28, 26 };\n  LogEst *a = pIdx->aiRowLogEst;\n  LogEst x;\n  int nCopy = MIN(ArraySize(aVal), pIdx->nKeyCol);\n  int i;\n\n  /* Indexes with default row estimates should not have stat1 data */\n  assert( !pIdx->hasStat1 );\n\n  /* Set the first entry (number of rows in the index) to the estimated\n  ** number of rows in the table, or half the number of rows in the table\n  ** for a partial index.\n  **\n  ** 2020-05-27:  If some of the stat data is coming from the sqlite_stat1\n  ** table but other parts we are having to guess at, then do not let the\n  ** estimated number of rows in the table be less than 1000 (LogEst 99).\n  ** Failure to do this can cause the indexes for which we do not have\n  ** stat1 data to be ignored by the query planner.\n  */\n  x = pIdx->pTable->nRowLogEst;\n  assert( 99==sqlite3LogEst(1000) );\n  if( x<99 ){\n    pIdx->pTable->nRowLogEst = x = 99;\n  }\n  if( pIdx->pPartIdxWhere!=0 ){ x -= 10;  assert( 10==sqlite3LogEst(2) ); }\n  a[0] = x;\n\n  /* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is\n  ** 6 and each subsequent value (if any) is 5.  */\n  memcpy(&a[1], aVal, nCopy*sizeof(LogEst));\n  for(i=nCopy+1; i<=pIdx->nKeyCol; i++){\n    a[i] = 23;                    assert( 23==sqlite3LogEst(5) );\n  }\n\n  assert( 0==sqlite3LogEst(1) );\n  if( IsUniqueIndex(pIdx) ) a[pIdx->nKeyCol] = 0;\n}\n\n/*\n** This routine will drop an existing named index.  This routine\n** implements the DROP INDEX statement.\n*/\nSQLITE_PRIVATE void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){\n  Index *pIndex;\n  Vdbe *v;\n  sqlite3 *db = pParse->db;\n  int iDb;\n\n  if( db->mallocFailed ){\n    goto exit_drop_index;\n  }\n  assert( pParse->nErr==0 );   /* Never called with prior non-OOM errors */\n  assert( pName->nSrc==1 );\n  assert( pName->a[0].fg.fixedSchema==0 );\n  assert( pName->a[0].fg.isSubquery==0 );\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n    goto exit_drop_index;\n  }\n  pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].u4.zDatabase);\n  if( pIndex==0 ){\n    if( !ifExists ){\n      sqlite3ErrorMsg(pParse, \"no such index: %S\", pName->a);\n    }else{\n      sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].u4.zDatabase);\n      sqlite3ForceNotReadOnly(pParse);\n    }\n    pParse->checkSchema = 1;\n    goto exit_drop_index;\n  }\n  if( pIndex->idxType!=SQLITE_IDXTYPE_APPDEF ){\n    sqlite3ErrorMsg(pParse, \"index associated with UNIQUE \"\n      \"or PRIMARY KEY constraint cannot be dropped\", 0);\n    goto exit_drop_index;\n  }\n  iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  {\n    int code = SQLITE_DROP_INDEX;\n    Table *pTab = pIndex->pTable;\n    const char *zDb = db->aDb[iDb].zDbSName;\n    const char *zTab = SCHEMA_TABLE(iDb);\n    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){\n      goto exit_drop_index;\n    }\n    if( !OMIT_TEMPDB && iDb==1 ) code = SQLITE_DROP_TEMP_INDEX;\n    if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){\n      goto exit_drop_index;\n    }\n  }\n#endif\n\n  /* Generate code to remove the index and from the schema table */\n  v = sqlite3GetVdbe(pParse);\n  if( v ){\n    sqlite3BeginWriteOperation(pParse, 1, iDb);\n    sqlite3NestedParse(pParse,\n       \"DELETE FROM %Q.\" LEGACY_SCHEMA_TABLE \" WHERE name=%Q AND type='index'\",\n       db->aDb[iDb].zDbSName, pIndex->zName\n    );\n    sqlite3ClearStatTables(pParse, iDb, \"idx\", pIndex->zName);\n    sqlite3ChangeCookie(pParse, iDb);\n    destroyRootPage(pParse, pIndex->tnum, iDb);\n    sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);\n  }\n\nexit_drop_index:\n  sqlite3SrcListDelete(db, pName);\n}\n\n/*\n** pArray is a pointer to an array of objects. Each object in the\n** array is szEntry bytes in size. This routine uses sqlite3DbRealloc()\n** to extend the array so that there is space for a new object at the end.\n**\n** When this function is called, *pnEntry contains the current size of\n** the array (in entries - so the allocation is ((*pnEntry) * szEntry) bytes\n** in total).\n**\n** If the realloc() is successful (i.e. if no OOM condition occurs), the\n** space allocated for the new object is zeroed, *pnEntry updated to\n** reflect the new size of the array and a pointer to the new allocation\n** returned. *pIdx is set to the index of the new array entry in this case.\n**\n** Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains\n** unchanged and a copy of pArray returned.\n*/\nSQLITE_PRIVATE void *sqlite3ArrayAllocate(\n  sqlite3 *db,      /* Connection to notify of malloc failures */\n  void *pArray,     /* Array of objects.  Might be reallocated */\n  int szEntry,      /* Size of each object in the array */\n  int *pnEntry,     /* Number of objects currently in use */\n  int *pIdx         /* Write the index of a new slot here */\n){\n  char *z;\n  sqlite3_int64 n = *pIdx = *pnEntry;\n  if( (n & (n-1))==0 ){\n    sqlite3_int64 sz = (n==0) ? 1 : 2*n;\n    void *pNew = sqlite3DbRealloc(db, pArray, sz*szEntry);\n    if( pNew==0 ){\n      *pIdx = -1;\n      return pArray;\n    }\n    pArray = pNew;\n  }\n  z = (char*)pArray;\n  memset(&z[n * szEntry], 0, szEntry);\n  ++*pnEntry;\n  return pArray;\n}\n\n/*\n** Append a new element to the given IdList.  Create a new IdList if\n** need be.\n**\n** A new IdList is returned, or NULL if malloc() fails.\n*/\nSQLITE_PRIVATE IdList *sqlite3IdListAppend(Parse *pParse, IdList *pList, Token *pToken){\n  sqlite3 *db = pParse->db;\n  int i;\n  if( pList==0 ){\n    pList = sqlite3DbMallocZero(db, SZ_IDLIST(1));\n    if( pList==0 ) return 0;\n  }else{\n    IdList *pNew;\n    pNew = sqlite3DbRealloc(db, pList, SZ_IDLIST(pList->nId+1));\n    if( pNew==0 ){\n      sqlite3IdListDelete(db, pList);\n      return 0;\n    }\n    pList = pNew;\n  }\n  i = pList->nId++;\n  pList->a[i].zName = sqlite3NameFromToken(db, pToken);\n  if( IN_RENAME_OBJECT && pList->a[i].zName ){\n    sqlite3RenameTokenMap(pParse, (void*)pList->a[i].zName, pToken);\n  }\n  return pList;\n}\n\n/*\n** Delete an IdList.\n*/\nSQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){\n  int i;\n  assert( db!=0 );\n  if( pList==0 ) return;\n  for(i=0; i<pList->nId; i++){\n    sqlite3DbFree(db, pList->a[i].zName);\n  }\n  sqlite3DbNNFreeNN(db, pList);\n}\n\n/*\n** Return the index in pList of the identifier named zId.  Return -1\n** if not found.\n*/\nSQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){\n  int i;\n  assert( pList!=0 );\n  for(i=0; i<pList->nId; i++){\n    if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;\n  }\n  return -1;\n}\n\n/*\n** Maximum size of a SrcList object.\n** The SrcList object is used to represent the FROM clause of a\n** SELECT statement, and the query planner cannot deal with more\n** than 64 tables in a join.  So any value larger than 64 here\n** is sufficient for most uses.  Smaller values, like say 10, are\n** appropriate for small and memory-limited applications.\n*/\n#ifndef SQLITE_MAX_SRCLIST\n# define SQLITE_MAX_SRCLIST 200\n#endif\n\n/*\n** Expand the space allocated for the given SrcList object by\n** creating nExtra new slots beginning at iStart.  iStart is zero based.\n** New slots are zeroed.\n**\n** For example, suppose a SrcList initially contains two entries: A,B.\n** To append 3 new entries onto the end, do this:\n**\n**    sqlite3SrcListEnlarge(db, pSrclist, 3, 2);\n**\n** After the call above it would contain:  A, B, nil, nil, nil.\n** If the iStart argument had been 1 instead of 2, then the result\n** would have been:  A, nil, nil, nil, B.  To prepend the new slots,\n** the iStart value would be 0.  The result then would\n** be: nil, nil, nil, A, B.\n**\n** If a memory allocation fails or the SrcList becomes too large, leave\n** the original SrcList unchanged, return NULL, and leave an error message\n** in pParse.\n*/\nSQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(\n  Parse *pParse,     /* Parsing context into which errors are reported */\n  SrcList *pSrc,     /* The SrcList to be enlarged */\n  int nExtra,        /* Number of new slots to add to pSrc->a[] */\n  int iStart         /* Index in pSrc->a[] of first new slot */\n){\n  int i;\n\n  /* Sanity checking on calling parameters */\n  assert( iStart>=0 );\n  assert( nExtra>=1 );\n  assert( pSrc!=0 );\n  assert( iStart<=pSrc->nSrc );\n\n  /* Allocate additional space if needed */\n  if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){\n    SrcList *pNew;\n    sqlite3_int64 nAlloc = 2*(sqlite3_int64)pSrc->nSrc+nExtra;\n    sqlite3 *db = pParse->db;\n\n    if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){\n      sqlite3ErrorMsg(pParse, \"too many FROM clause terms, max: %d\",\n                      SQLITE_MAX_SRCLIST);\n      return 0;\n    }\n    if( nAlloc>SQLITE_MAX_SRCLIST ) nAlloc = SQLITE_MAX_SRCLIST;\n    pNew = sqlite3DbRealloc(db, pSrc, SZ_SRCLIST(nAlloc));\n    if( pNew==0 ){\n      assert( db->mallocFailed );\n      return 0;\n    }\n    pSrc = pNew;\n    pSrc->nAlloc = nAlloc;\n  }\n\n  /* Move existing slots that come after the newly inserted slots\n  ** out of the way */\n  for(i=pSrc->nSrc-1; i>=iStart; i--){\n    pSrc->a[i+nExtra] = pSrc->a[i];\n  }\n  pSrc->nSrc += nExtra;\n\n  /* Zero the newly allocated slots */\n  memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);\n  for(i=iStart; i<iStart+nExtra; i++){\n    pSrc->a[i].iCursor = -1;\n  }\n\n  /* Return a pointer to the enlarged SrcList */\n  return pSrc;\n}\n\n\n/*\n** Append a new table name to the given SrcList.  Create a new SrcList if\n** need be.  A new entry is created in the SrcList even if pTable is NULL.\n**\n** A SrcList is returned, or NULL if there is an OOM error or if the\n** SrcList grows to large.  The returned\n** SrcList might be the same as the SrcList that was input or it might be\n** a new one.  If an OOM error does occurs, then the prior value of pList\n** that is input to this routine is automatically freed.\n**\n** If pDatabase is not null, it means that the table has an optional\n** database name prefix.  Like this:  \"database.table\".  The pDatabase\n** points to the table name and the pTable points to the database name.\n** The SrcList.a[].zName field is filled with the table name which might\n** come from pTable (if pDatabase is NULL) or from pDatabase.\n** SrcList.a[].zDatabase is filled with the database name from pTable,\n** or with NULL if no database is specified.\n**\n** In other words, if call like this:\n**\n**         sqlite3SrcListAppend(D,A,B,0);\n**\n** Then B is a table name and the database name is unspecified.  If called\n** like this:\n**\n**         sqlite3SrcListAppend(D,A,B,C);\n**\n** Then C is the table name and B is the database name.  If C is defined\n** then so is B.  In other words, we never have a case where:\n**\n**         sqlite3SrcListAppend(D,A,0,C);\n**\n** Both pTable and pDatabase are assumed to be quoted.  They are dequoted\n** before being added to the SrcList.\n*/\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppend(\n  Parse *pParse,      /* Parsing context, in which errors are reported */\n  SrcList *pList,     /* Append to this SrcList. NULL creates a new SrcList */\n  Token *pTable,      /* Table to append */\n  Token *pDatabase    /* Database of the table */\n){\n  SrcItem *pItem;\n  sqlite3 *db;\n  assert( pDatabase==0 || pTable!=0 );  /* Cannot have C without B */\n  assert( pParse!=0 );\n  assert( pParse->db!=0 );\n  db = pParse->db;\n  if( pList==0 ){\n    pList = sqlite3DbMallocRawNN(pParse->db, SZ_SRCLIST(1));\n    if( pList==0 ) return 0;\n    pList->nAlloc = 1;\n    pList->nSrc = 1;\n    memset(&pList->a[0], 0, sizeof(pList->a[0]));\n    pList->a[0].iCursor = -1;\n  }else{\n    SrcList *pNew = sqlite3SrcListEnlarge(pParse, pList, 1, pList->nSrc);\n    if( pNew==0 ){\n      sqlite3SrcListDelete(db, pList);\n      return 0;\n    }else{\n      pList = pNew;\n    }\n  }\n  pItem = &pList->a[pList->nSrc-1];\n  if( pDatabase && pDatabase->z==0 ){\n    pDatabase = 0;\n  }\n  assert( pItem->fg.fixedSchema==0 );\n  assert( pItem->fg.isSubquery==0 );\n  if( pDatabase ){\n    pItem->zName = sqlite3NameFromToken(db, pDatabase);\n    pItem->u4.zDatabase = sqlite3NameFromToken(db, pTable);\n  }else{\n    pItem->zName = sqlite3NameFromToken(db, pTable);\n    pItem->u4.zDatabase = 0;\n  }\n  return pList;\n}\n\n/*\n** Assign VdbeCursor index numbers to all tables in a SrcList\n*/\nSQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){\n  int i;\n  SrcItem *pItem;\n  assert( pList || pParse->db->mallocFailed );\n  if( ALWAYS(pList) ){\n    for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){\n      if( pItem->iCursor>=0 ) continue;\n      pItem->iCursor = pParse->nTab++;\n      if( pItem->fg.isSubquery ){\n        assert( pItem->u4.pSubq!=0 );\n        assert( pItem->u4.pSubq->pSelect!=0 );\n        assert( pItem->u4.pSubq->pSelect->pSrc!=0 );\n        sqlite3SrcListAssignCursors(pParse, pItem->u4.pSubq->pSelect->pSrc);\n      }\n    }\n  }\n}\n\n/*\n** Delete a Subquery object and its substructure.\n*/\nSQLITE_PRIVATE void sqlite3SubqueryDelete(sqlite3 *db, Subquery *pSubq){\n  assert( pSubq!=0 && pSubq->pSelect!=0 );\n  sqlite3SelectDelete(db, pSubq->pSelect);\n  sqlite3DbFree(db, pSubq);\n}\n\n/*\n** Remove a Subquery from a SrcItem.  Return the associated Select object.\n** The returned Select becomes the responsibility of the caller.\n*/\nSQLITE_PRIVATE Select *sqlite3SubqueryDetach(sqlite3 *db, SrcItem *pItem){\n  Select *pSel;\n  assert( pItem!=0 );\n  assert( pItem->fg.isSubquery );\n  pSel = pItem->u4.pSubq->pSelect;\n  sqlite3DbFree(db, pItem->u4.pSubq);\n  pItem->u4.pSubq = 0;\n  pItem->fg.isSubquery = 0;\n  return pSel;\n}\n\n/*\n** Delete an entire SrcList including all its substructure.\n*/\nSQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){\n  int i;\n  SrcItem *pItem;\n  assert( db!=0 );\n  if( pList==0 ) return;\n  for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){\n\n    /* Check invariants on SrcItem */\n    assert( !pItem->fg.isIndexedBy || !pItem->fg.isTabFunc );\n    assert( !pItem->fg.isCte || !pItem->fg.isIndexedBy );\n    assert( !pItem->fg.fixedSchema || !pItem->fg.isSubquery );\n    assert( !pItem->fg.isSubquery || (pItem->u4.pSubq!=0 &&\n                                      pItem->u4.pSubq->pSelect!=0) );\n\n    if( pItem->zName ) sqlite3DbNNFreeNN(db, pItem->zName);\n    if( pItem->zAlias ) sqlite3DbNNFreeNN(db, pItem->zAlias);\n    if( pItem->fg.isSubquery ){\n      sqlite3SubqueryDelete(db, pItem->u4.pSubq);\n    }else if( pItem->fg.fixedSchema==0 && pItem->u4.zDatabase!=0 ){\n      sqlite3DbNNFreeNN(db, pItem->u4.zDatabase);\n    }\n    if( pItem->fg.isIndexedBy ) sqlite3DbFree(db, pItem->u1.zIndexedBy);\n    if( pItem->fg.isTabFunc ) sqlite3ExprListDelete(db, pItem->u1.pFuncArg);\n    sqlite3DeleteTable(db, pItem->pSTab);\n    if( pItem->fg.isUsing ){\n      sqlite3IdListDelete(db, pItem->u3.pUsing);\n    }else if( pItem->u3.pOn ){\n      sqlite3ExprDelete(db, pItem->u3.pOn);\n    }\n  }\n  sqlite3DbNNFreeNN(db, pList);\n}\n\n/*\n** Attach a Subquery object to pItem->uv.pSubq.  Set the\n** pSelect value but leave all the other values initialized\n** to zero.\n**\n** A copy of the Select object is made if dupSelect is true, and the\n** SrcItem takes responsibility for deleting the copy.  If dupSelect is\n** false, ownership of the Select passes to the SrcItem.  Either way,\n** the SrcItem will take responsibility for deleting the Select.\n**\n** When dupSelect is zero, that means the Select might get deleted right\n** away if there is an OOM error.  Beware.\n**\n** Return non-zero on success.  Return zero on an OOM error.\n*/\nSQLITE_PRIVATE int sqlite3SrcItemAttachSubquery(\n  Parse *pParse,     /* Parsing context */\n  SrcItem *pItem,    /* Item to which the subquery is to be attached */\n  Select *pSelect,   /* The subquery SELECT.  Must be non-NULL */\n  int dupSelect      /* If true, attach a copy of pSelect, not pSelect itself.*/\n){\n  Subquery *p;\n  assert( pSelect!=0 );\n  assert( pItem->fg.isSubquery==0 );\n  if( pItem->fg.fixedSchema ){\n    pItem->u4.pSchema = 0;\n    pItem->fg.fixedSchema = 0;\n  }else if( pItem->u4.zDatabase!=0 ){\n    sqlite3DbFree(pParse->db, pItem->u4.zDatabase);\n    pItem->u4.zDatabase = 0;\n  }\n  if( dupSelect ){\n    pSelect = sqlite3SelectDup(pParse->db, pSelect, 0);\n    if( pSelect==0 ) return 0;\n  }\n  p = pItem->u4.pSubq = sqlite3DbMallocRawNN(pParse->db, sizeof(Subquery));\n  if( p==0 ){\n    sqlite3SelectDelete(pParse->db, pSelect);\n    return 0;\n  }\n  pItem->fg.isSubquery = 1;\n  p->pSelect = pSelect;\n  assert( offsetof(Subquery, pSelect)==0 );\n  memset(((char*)p)+sizeof(p->pSelect), 0, sizeof(*p)-sizeof(p->pSelect));\n  return 1;\n}\n\n\n/*\n** This routine is called by the parser to add a new term to the\n** end of a growing FROM clause.  The \"p\" parameter is the part of\n** the FROM clause that has already been constructed.  \"p\" is NULL\n** if this is the first term of the FROM clause.  pTable and pDatabase\n** are the name of the table and database named in the FROM clause term.\n** pDatabase is NULL if the database name qualifier is missing - the\n** usual case.  If the term has an alias, then pAlias points to the\n** alias token.  If the term is a subquery, then pSubquery is the\n** SELECT statement that the subquery encodes.  The pTable and\n** pDatabase parameters are NULL for subqueries.  The pOn and pUsing\n** parameters are the content of the ON and USING clauses.\n**\n** Return a new SrcList which encodes is the FROM with the new\n** term added.\n*/\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(\n  Parse *pParse,          /* Parsing context */\n  SrcList *p,             /* The left part of the FROM clause already seen */\n  Token *pTable,          /* Name of the table to add to the FROM clause */\n  Token *pDatabase,       /* Name of the database containing pTable */\n  Token *pAlias,          /* The right-hand side of the AS subexpression */\n  Select *pSubquery,      /* A subquery used in place of a table name */\n  OnOrUsing *pOnUsing     /* Either the ON clause or the USING clause */\n){\n  SrcItem *pItem;\n  sqlite3 *db = pParse->db;\n  if( !p && pOnUsing!=0 && (pOnUsing->pOn || pOnUsing->pUsing) ){\n    sqlite3ErrorMsg(pParse, \"a JOIN clause is required before %s\",\n      (pOnUsing->pOn ? \"ON\" : \"USING\")\n    );\n    goto append_from_error;\n  }\n  p = sqlite3SrcListAppend(pParse, p, pTable, pDatabase);\n  if( p==0 ){\n    goto append_from_error;\n  }\n  assert( p->nSrc>0 );\n  pItem = &p->a[p->nSrc-1];\n  assert( (pTable==0)==(pDatabase==0) );\n  assert( pItem->zName==0 || pDatabase!=0 );\n  if( IN_RENAME_OBJECT && pItem->zName ){\n    Token *pToken = (ALWAYS(pDatabase) && pDatabase->z) ? pDatabase : pTable;\n    sqlite3RenameTokenMap(pParse, pItem->zName, pToken);\n  }\n  assert( pAlias!=0 );\n  if( pAlias->n ){\n    pItem->zAlias = sqlite3NameFromToken(db, pAlias);\n  }\n  assert( pSubquery==0 || pDatabase==0 );\n  if( pSubquery ){\n    if( sqlite3SrcItemAttachSubquery(pParse, pItem, pSubquery, 0) ){\n      if( pSubquery->selFlags & SF_NestedFrom ){\n        pItem->fg.isNestedFrom = 1;\n      }\n    }\n  }\n  assert( pOnUsing==0 || pOnUsing->pOn==0 || pOnUsing->pUsing==0 );\n  assert( pItem->fg.isUsing==0 );\n  if( pOnUsing==0 ){\n    pItem->u3.pOn = 0;\n  }else if( pOnUsing->pUsing ){\n    pItem->fg.isUsing = 1;\n    pItem->u3.pUsing = pOnUsing->pUsing;\n  }else{\n    pItem->u3.pOn = pOnUsing->pOn;\n  }\n  return p;\n\nappend_from_error:\n  assert( p==0 );\n  sqlite3ClearOnOrUsing(db, pOnUsing);\n  sqlite3SelectDelete(db, pSubquery);\n  return 0;\n}\n\n/*\n** Add an INDEXED BY or NOT INDEXED clause to the most recently added\n** element of the source-list passed as the second argument.\n*/\nSQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pIndexedBy){\n  assert( pIndexedBy!=0 );\n  if( p && pIndexedBy->n>0 ){\n    SrcItem *pItem;\n    assert( p->nSrc>0 );\n    pItem = &p->a[p->nSrc-1];\n    assert( pItem->fg.notIndexed==0 );\n    assert( pItem->fg.isIndexedBy==0 );\n    assert( pItem->fg.isTabFunc==0 );\n    if( pIndexedBy->n==1 && !pIndexedBy->z ){\n      /* A \"NOT INDEXED\" clause was supplied. See parse.y\n      ** construct \"indexed_opt\" for details. */\n      pItem->fg.notIndexed = 1;\n    }else{\n      pItem->u1.zIndexedBy = sqlite3NameFromToken(pParse->db, pIndexedBy);\n      pItem->fg.isIndexedBy = 1;\n      assert( pItem->fg.isCte==0 );  /* No collision on union u2 */\n    }\n  }\n}\n\n/*\n** Append the contents of SrcList p2 to SrcList p1 and return the resulting\n** SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2\n** are deleted by this function.\n*/\nSQLITE_PRIVATE SrcList *sqlite3SrcListAppendList(Parse *pParse, SrcList *p1, SrcList *p2){\n  assert( p1 );\n  assert( p2 || pParse->nErr );\n  assert( p2==0 || p2->nSrc>=1 );\n  testcase( p1->nSrc==0 );\n  if( p2 ){\n    int nOld = p1->nSrc;\n    SrcList *pNew = sqlite3SrcListEnlarge(pParse, p1, p2->nSrc, nOld);\n    if( pNew==0 ){\n      sqlite3SrcListDelete(pParse->db, p2);\n    }else{\n      p1 = pNew;\n      memcpy(&p1->a[nOld], p2->a, p2->nSrc*sizeof(SrcItem));\n      assert( nOld==1 || (p2->a[0].fg.jointype & JT_LTORJ)==0 );\n      assert( p1->nSrc>=1 );\n      p1->a[0].fg.jointype |= (JT_LTORJ & p2->a[0].fg.jointype);\n      sqlite3DbFree(pParse->db, p2);\n    }\n  }\n  return p1;\n}\n\n/*\n** Add the list of function arguments to the SrcList entry for a\n** table-valued-function.\n*/\nSQLITE_PRIVATE void sqlite3SrcListFuncArgs(Parse *pParse, SrcList *p, ExprList *pList){\n  if( p ){\n    SrcItem *pItem = &p->a[p->nSrc-1];\n    assert( pItem->fg.notIndexed==0 );\n    assert( pItem->fg.isIndexedBy==0 );\n    assert( pItem->fg.isTabFunc==0 );\n    pItem->u1.pFuncArg = pList;\n    pItem->fg.isTabFunc = 1;\n  }else{\n    sqlite3ExprListDelete(pParse->db, pList);\n  }\n}\n\n/*\n** When building up a FROM clause in the parser, the join operator\n** is initially attached to the left operand.  But the code generator\n** expects the join operator to be on the right operand.  This routine\n** Shifts all join operators from left to right for an entire FROM\n** clause.\n**\n** Example: Suppose the join is like this:\n**\n**           A natural cross join B\n**\n** The operator is \"natural cross join\".  The A and B operands are stored\n** in p->a[0] and p->a[1], respectively.  The parser initially stores the\n** operator with A.  This routine shifts that operator over to B.\n**\n** Additional changes:\n**\n**   *   All tables to the left of the right-most RIGHT JOIN are tagged with\n**       JT_LTORJ (mnemonic: Left Table Of Right Join) so that the\n**       code generator can easily tell that the table is part of\n**       the left operand of at least one RIGHT JOIN.\n*/\nSQLITE_PRIVATE void sqlite3SrcListShiftJoinType(Parse *pParse, SrcList *p){\n  (void)pParse;\n  if( p && p->nSrc>1 ){\n    int i = p->nSrc-1;\n    u8 allFlags = 0;\n    do{\n      allFlags |= p->a[i].fg.jointype = p->a[i-1].fg.jointype;\n    }while( (--i)>0 );\n    p->a[0].fg.jointype = 0;\n\n    /* All terms to the left of a RIGHT JOIN should be tagged with the\n    ** JT_LTORJ flags */\n    if( allFlags & JT_RIGHT ){\n      for(i=p->nSrc-1; ALWAYS(i>0) && (p->a[i].fg.jointype&JT_RIGHT)==0; i--){}\n      i--;\n      assert( i>=0 );\n      do{\n        p->a[i].fg.jointype |= JT_LTORJ;\n      }while( (--i)>=0 );\n    }\n  }\n}\n\n/*\n** Generate VDBE code for a BEGIN statement.\n*/\nSQLITE_PRIVATE void sqlite3BeginTransaction(Parse *pParse, int type){\n  sqlite3 *db;\n  Vdbe *v;\n  int i;\n\n  assert( pParse!=0 );\n  db = pParse->db;\n  assert( db!=0 );\n  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, \"BEGIN\", 0, 0) ){\n    return;\n  }\n  v = sqlite3GetVdbe(pParse);\n  if( !v ) return;\n  if( type!=TK_DEFERRED ){\n    for(i=0; i<db->nDb; i++){\n      int eTxnType;\n      Btree *pBt = db->aDb[i].pBt;\n      if( pBt && sqlite3BtreeIsReadonly(pBt) ){\n        eTxnType = 0;  /* Read txn */\n      }else if( type==TK_EXCLUSIVE ){\n        eTxnType = 2;  /* Exclusive txn */\n      }else{\n        eTxnType = 1;  /* Write txn */\n      }\n      sqlite3VdbeAddOp2(v, OP_Transaction, i, eTxnType);\n      sqlite3VdbeUsesBtree(v, i);\n    }\n  }\n  sqlite3VdbeAddOp0(v, OP_AutoCommit);\n}\n\n/*\n** Generate VDBE code for a COMMIT or ROLLBACK statement.\n** Code for ROLLBACK is generated if eType==TK_ROLLBACK.  Otherwise\n** code is generated for a COMMIT.\n*/\nSQLITE_PRIVATE void sqlite3EndTransaction(Parse *pParse, int eType){\n  Vdbe *v;\n  int isRollback;\n\n  assert( pParse!=0 );\n  assert( pParse->db!=0 );\n  assert( eType==TK_COMMIT || eType==TK_END || eType==TK_ROLLBACK );\n  isRollback = eType==TK_ROLLBACK;\n  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION,\n       isRollback ? \"ROLLBACK\" : \"COMMIT\", 0, 0) ){\n    return;\n  }\n  v = sqlite3GetVdbe(pParse);\n  if( v ){\n    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, isRollback);\n  }\n}\n\n/*\n** This function is called by the parser when it parses a command to create,\n** release or rollback an SQL savepoint.\n*/\nSQLITE_PRIVATE void sqlite3Savepoint(Parse *pParse, int op, Token *pName){\n  char *zName = sqlite3NameFromToken(pParse->db, pName);\n  if( zName ){\n    Vdbe *v = sqlite3GetVdbe(pParse);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    static const char * const az[] = { \"BEGIN\", \"RELEASE\", \"ROLLBACK\" };\n    assert( !SAVEPOINT_BEGIN && SAVEPOINT_RELEASE==1 && SAVEPOINT_ROLLBACK==2 );\n#endif\n    if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){\n      sqlite3DbFree(pParse->db, zName);\n      return;\n    }\n    sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);\n  }\n}\n\n/*\n** Make sure the TEMP database is open and available for use.  Return\n** the number of errors.  Leave any error messages in the pParse structure.\n*/\nSQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  if( db->aDb[1].pBt==0 && !pParse->explain ){\n    int rc;\n    Btree *pBt;\n    static const int flags =\n          SQLITE_OPEN_READWRITE |\n          SQLITE_OPEN_CREATE |\n          SQLITE_OPEN_EXCLUSIVE |\n          SQLITE_OPEN_DELETEONCLOSE |\n          SQLITE_OPEN_TEMP_DB;\n\n    rc = sqlite3BtreeOpen(db->pVfs, 0, db, &pBt, 0, flags);\n    if( rc!=SQLITE_OK ){\n      sqlite3ErrorMsg(pParse, \"unable to open a temporary database \"\n        \"file for storing temporary tables\");\n      pParse->rc = rc;\n      return 1;\n    }\n    db->aDb[1].pBt = pBt;\n    assert( db->aDb[1].pSchema );\n    if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, 0, 0) ){\n      sqlite3OomFault(db);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Record the fact that the schema cookie will need to be verified\n** for database iDb.  The code to actually verify the schema cookie\n** will occur at the end of the top-level VDBE and will be generated\n** later, by sqlite3FinishCoding().\n*/\nstatic void sqlite3CodeVerifySchemaAtToplevel(Parse *pToplevel, int iDb){\n  assert( iDb>=0 && iDb<pToplevel->db->nDb );\n  assert( pToplevel->db->aDb[iDb].pBt!=0 || iDb==1 );\n  assert( iDb<SQLITE_MAX_DB );\n  assert( sqlite3SchemaMutexHeld(pToplevel->db, iDb, 0) );\n  if( DbMaskTest(pToplevel->cookieMask, iDb)==0 ){\n    DbMaskSet(pToplevel->cookieMask, iDb);\n    if( !OMIT_TEMPDB && iDb==1 ){\n      sqlite3OpenTempDatabase(pToplevel);\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse *pParse, int iDb){\n  sqlite3CodeVerifySchemaAtToplevel(sqlite3ParseToplevel(pParse), iDb);\n}\n\n\n/*\n** If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each\n** attached database. Otherwise, invoke it for the database named zDb only.\n*/\nSQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse *pParse, const char *zDb){\n  sqlite3 *db = pParse->db;\n  int i;\n  for(i=0; i<db->nDb; i++){\n    Db *pDb = &db->aDb[i];\n    if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zDbSName)) ){\n      sqlite3CodeVerifySchema(pParse, i);\n    }\n  }\n}\n\n/*\n** Generate VDBE code that prepares for doing an operation that\n** might change the database.\n**\n** This routine starts a new transaction if we are not already within\n** a transaction.  If we are already within a transaction, then a checkpoint\n** is set if the setStatement parameter is true.  A checkpoint should\n** be set for operations that might fail (due to a constraint) part of\n** the way through and which will need to undo some writes without having to\n** rollback the whole transaction.  For operations where all constraints\n** can be checked before any changes are made to the database, it is never\n** necessary to undo a write and the checkpoint should not be set.\n*/\nSQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb){\n  Parse *pToplevel = sqlite3ParseToplevel(pParse);\n  sqlite3CodeVerifySchemaAtToplevel(pToplevel, iDb);\n  DbMaskSet(pToplevel->writeMask, iDb);\n  pToplevel->isMultiWrite |= setStatement;\n}\n\n/*\n** Indicate that the statement currently under construction might write\n** more than one entry (example: deleting one row then inserting another,\n** inserting multiple rows in a table, or inserting a row and index entries.)\n** If an abort occurs after some of these writes have completed, then it will\n** be necessary to undo the completed writes.\n*/\nSQLITE_PRIVATE void sqlite3MultiWrite(Parse *pParse){\n  Parse *pToplevel = sqlite3ParseToplevel(pParse);\n  pToplevel->isMultiWrite = 1;\n}\n\n/*\n** The code generator calls this routine if is discovers that it is\n** possible to abort a statement prior to completion.  In order to\n** perform this abort without corrupting the database, we need to make\n** sure that the statement is protected by a statement transaction.\n**\n** Technically, we only need to set the mayAbort flag if the\n** isMultiWrite flag was previously set.  There is a time dependency\n** such that the abort must occur after the multiwrite.  This makes\n** some statements involving the REPLACE conflict resolution algorithm\n** go a little faster.  But taking advantage of this time dependency\n** makes it more difficult to prove that the code is correct (in\n** particular, it prevents us from writing an effective\n** implementation of sqlite3AssertMayAbort()) and so we have chosen\n** to take the safe route and skip the optimization.\n*/\nSQLITE_PRIVATE void sqlite3MayAbort(Parse *pParse){\n  Parse *pToplevel = sqlite3ParseToplevel(pParse);\n  pToplevel->mayAbort = 1;\n}\n\n/*\n** Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT\n** error. The onError parameter determines which (if any) of the statement\n** and/or current transaction is rolled back.\n*/\nSQLITE_PRIVATE void sqlite3HaltConstraint(\n  Parse *pParse,    /* Parsing context */\n  int errCode,      /* extended error code */\n  int onError,      /* Constraint type */\n  char *p4,         /* Error message */\n  i8 p4type,        /* P4_STATIC or P4_TRANSIENT */\n  u8 p5Errmsg       /* P5_ErrMsg type */\n){\n  Vdbe *v;\n  assert( pParse->pVdbe!=0 );\n  v = sqlite3GetVdbe(pParse);\n  assert( (errCode&0xff)==SQLITE_CONSTRAINT || pParse->nested );\n  if( onError==OE_Abort ){\n    sqlite3MayAbort(pParse);\n  }\n  sqlite3VdbeAddOp4(v, OP_Halt, errCode, onError, 0, p4, p4type);\n  sqlite3VdbeChangeP5(v, p5Errmsg);\n}\n\n/*\n** Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation.\n*/\nSQLITE_PRIVATE void sqlite3UniqueConstraint(\n  Parse *pParse,    /* Parsing context */\n  int onError,      /* Constraint type */\n  Index *pIdx       /* The index that triggers the constraint */\n){\n  char *zErr;\n  int j;\n  StrAccum errMsg;\n  Table *pTab = pIdx->pTable;\n\n  sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0,\n                      pParse->db->aLimit[SQLITE_LIMIT_LENGTH]);\n  if( pIdx->aColExpr ){\n    sqlite3_str_appendf(&errMsg, \"index '%q'\", pIdx->zName);\n  }else{\n    for(j=0; j<pIdx->nKeyCol; j++){\n      char *zCol;\n      assert( pIdx->aiColumn[j]>=0 );\n      zCol = pTab->aCol[pIdx->aiColumn[j]].zCnName;\n      if( j ) sqlite3_str_append(&errMsg, \", \", 2);\n      sqlite3_str_appendall(&errMsg, pTab->zName);\n      sqlite3_str_append(&errMsg, \".\", 1);\n      sqlite3_str_appendall(&errMsg, zCol);\n    }\n  }\n  zErr = sqlite3StrAccumFinish(&errMsg);\n  sqlite3HaltConstraint(pParse,\n    IsPrimaryKeyIndex(pIdx) ? SQLITE_CONSTRAINT_PRIMARYKEY\n                            : SQLITE_CONSTRAINT_UNIQUE,\n    onError, zErr, P4_DYNAMIC, P5_ConstraintUnique);\n}\n\n\n/*\n** Code an OP_Halt due to non-unique rowid.\n*/\nSQLITE_PRIVATE void sqlite3RowidConstraint(\n  Parse *pParse,    /* Parsing context */\n  int onError,      /* Conflict resolution algorithm */\n  Table *pTab       /* The table with the non-unique rowid */\n){\n  char *zMsg;\n  int rc;\n  if( pTab->iPKey>=0 ){\n    zMsg = sqlite3MPrintf(pParse->db, \"%s.%s\", pTab->zName,\n                          pTab->aCol[pTab->iPKey].zCnName);\n    rc = SQLITE_CONSTRAINT_PRIMARYKEY;\n  }else{\n    zMsg = sqlite3MPrintf(pParse->db, \"%s.rowid\", pTab->zName);\n    rc = SQLITE_CONSTRAINT_ROWID;\n  }\n  sqlite3HaltConstraint(pParse, rc, onError, zMsg, P4_DYNAMIC,\n                        P5_ConstraintUnique);\n}\n\n/*\n** Check to see if pIndex uses the collating sequence pColl.  Return\n** true if it does and false if it does not.\n*/\n#ifndef SQLITE_OMIT_REINDEX\nstatic int collationMatch(const char *zColl, Index *pIndex){\n  int i;\n  assert( zColl!=0 );\n  for(i=0; i<pIndex->nColumn; i++){\n    const char *z = pIndex->azColl[i];\n    assert( z!=0 || pIndex->aiColumn[i]<0 );\n    if( pIndex->aiColumn[i]>=0 && 0==sqlite3StrICmp(z, zColl) ){\n      return 1;\n    }\n  }\n  return 0;\n}\n#endif\n\n/*\n** Recompute all indices of pTab that use the collating sequence pColl.\n** If pColl==0 then recompute all indices of pTab.\n*/\n#ifndef SQLITE_OMIT_REINDEX\nstatic void reindexTable(Parse *pParse, Table *pTab, char const *zColl){\n  if( !IsVirtual(pTab) ){\n    Index *pIndex;              /* An index associated with pTab */\n\n    for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){\n      if( zColl==0 || collationMatch(zColl, pIndex) ){\n        int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n        sqlite3BeginWriteOperation(pParse, 0, iDb);\n        sqlite3RefillIndex(pParse, pIndex, -1);\n      }\n    }\n  }\n}\n#endif\n\n/*\n** Recompute all indices of all tables in all databases where the\n** indices use the collating sequence pColl.  If pColl==0 then recompute\n** all indices everywhere.\n*/\n#ifndef SQLITE_OMIT_REINDEX\nstatic void reindexDatabases(Parse *pParse, char const *zColl){\n  Db *pDb;                    /* A single database */\n  int iDb;                    /* The database index number */\n  sqlite3 *db = pParse->db;   /* The database connection */\n  HashElem *k;                /* For looping over tables in pDb */\n  Table *pTab;                /* A table in the database */\n\n  assert( sqlite3BtreeHoldsAllMutexes(db) );  /* Needed for schema access */\n  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){\n    assert( pDb!=0 );\n    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){\n      pTab = (Table*)sqliteHashData(k);\n      reindexTable(pParse, pTab, zColl);\n    }\n  }\n}\n#endif\n\n/*\n** Generate code for the REINDEX command.\n**\n**        REINDEX                            -- 1\n**        REINDEX  <collation>               -- 2\n**        REINDEX  ?<database>.?<tablename>  -- 3\n**        REINDEX  ?<database>.?<indexname>  -- 4\n**\n** Form 1 causes all indices in all attached databases to be rebuilt.\n** Form 2 rebuilds all indices in all databases that use the named\n** collating function.  Forms 3 and 4 rebuild the named index or all\n** indices associated with the named table.\n*/\n#ifndef SQLITE_OMIT_REINDEX\nSQLITE_PRIVATE void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){\n  CollSeq *pColl;             /* Collating sequence to be reindexed, or NULL */\n  char *z;                    /* Name of a table or index */\n  const char *zDb;            /* Name of the database */\n  Table *pTab;                /* A table in the database */\n  Index *pIndex;              /* An index associated with pTab */\n  int iDb;                    /* The database index number */\n  sqlite3 *db = pParse->db;   /* The database connection */\n  Token *pObjName;            /* Name of the table or index to be reindexed */\n\n  /* Read the database schema. If an error occurs, leave an error message\n  ** and code in pParse and return NULL. */\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n    return;\n  }\n\n  if( pName1==0 ){\n    reindexDatabases(pParse, 0);\n    return;\n  }else if( NEVER(pName2==0) || pName2->z==0 ){\n    char *zColl;\n    assert( pName1->z );\n    zColl = sqlite3NameFromToken(pParse->db, pName1);\n    if( !zColl ) return;\n    pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);\n    if( pColl ){\n      reindexDatabases(pParse, zColl);\n      sqlite3DbFree(db, zColl);\n      return;\n    }\n    sqlite3DbFree(db, zColl);\n  }\n  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pObjName);\n  if( iDb<0 ) return;\n  z = sqlite3NameFromToken(db, pObjName);\n  if( z==0 ) return;\n  zDb = pName2->n ? db->aDb[iDb].zDbSName : 0;\n  pTab = sqlite3FindTable(db, z, zDb);\n  if( pTab ){\n    reindexTable(pParse, pTab, 0);\n    sqlite3DbFree(db, z);\n    return;\n  }\n  pIndex = sqlite3FindIndex(db, z, zDb);\n  sqlite3DbFree(db, z);\n  if( pIndex ){\n    iDb = sqlite3SchemaToIndex(db, pIndex->pTable->pSchema);\n    sqlite3BeginWriteOperation(pParse, 0, iDb);\n    sqlite3RefillIndex(pParse, pIndex, -1);\n    return;\n  }\n  sqlite3ErrorMsg(pParse, \"unable to identify the object to be reindexed\");\n}\n#endif\n\n/*\n** Return a KeyInfo structure that is appropriate for the given Index.\n**\n** The caller should invoke sqlite3KeyInfoUnref() on the returned object\n** when it has finished using it.\n*/\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoOfIndex(Parse *pParse, Index *pIdx){\n  int i;\n  int nCol = pIdx->nColumn;\n  int nKey = pIdx->nKeyCol;\n  KeyInfo *pKey;\n  if( pParse->nErr ) return 0;\n  if( pIdx->uniqNotNull ){\n    pKey = sqlite3KeyInfoAlloc(pParse->db, nKey, nCol-nKey);\n  }else{\n    pKey = sqlite3KeyInfoAlloc(pParse->db, nCol, 0);\n  }\n  if( pKey ){\n    assert( sqlite3KeyInfoIsWriteable(pKey) );\n    for(i=0; i<nCol; i++){\n      const char *zColl = pIdx->azColl[i];\n      pKey->aColl[i] = zColl==sqlite3StrBINARY ? 0 :\n                        sqlite3LocateCollSeq(pParse, zColl);\n      pKey->aSortFlags[i] = pIdx->aSortOrder[i];\n      assert( 0==(pKey->aSortFlags[i] & KEYINFO_ORDER_BIGNULL) );\n    }\n    if( pParse->nErr ){\n      assert( pParse->rc==SQLITE_ERROR_MISSING_COLLSEQ );\n      if( pIdx->bNoQuery==0\n       && sqlite3HashFind(&pIdx->pSchema->idxHash, pIdx->zName)\n      ){\n        /* Deactivate the index because it contains an unknown collating\n        ** sequence.  The only way to reactive the index is to reload the\n        ** schema.  Adding the missing collating sequence later does not\n        ** reactive the index.  The application had the chance to register\n        ** the missing index using the collation-needed callback.  For\n        ** simplicity, SQLite will not give the application a second chance.\n        **\n        ** Except, do not do this if the index is not in the schema hash\n        ** table. In this case the index is currently being constructed\n        ** by a CREATE INDEX statement, and retrying will not help.  */\n        pIdx->bNoQuery = 1;\n        pParse->rc = SQLITE_ERROR_RETRY;\n      }\n      sqlite3KeyInfoUnref(pKey);\n      pKey = 0;\n    }\n  }\n  return pKey;\n}\n\n#ifndef SQLITE_OMIT_CTE\n/*\n** Create a new CTE object\n*/\nSQLITE_PRIVATE Cte *sqlite3CteNew(\n  Parse *pParse,          /* Parsing context */\n  Token *pName,           /* Name of the common-table */\n  ExprList *pArglist,     /* Optional column name list for the table */\n  Select *pQuery,         /* Query used to initialize the table */\n  u8 eM10d                /* The MATERIALIZED flag */\n){\n  Cte *pNew;\n  sqlite3 *db = pParse->db;\n\n  pNew = sqlite3DbMallocZero(db, sizeof(*pNew));\n  assert( pNew!=0 || db->mallocFailed );\n\n  if( db->mallocFailed ){\n    sqlite3ExprListDelete(db, pArglist);\n    sqlite3SelectDelete(db, pQuery);\n  }else{\n    pNew->pSelect = pQuery;\n    pNew->pCols = pArglist;\n    pNew->zName = sqlite3NameFromToken(pParse->db, pName);\n    pNew->eM10d = eM10d;\n  }\n  return pNew;\n}\n\n/*\n** Clear information from a Cte object, but do not deallocate storage\n** for the object itself.\n*/\nstatic void cteClear(sqlite3 *db, Cte *pCte){\n  assert( pCte!=0 );\n  sqlite3ExprListDelete(db, pCte->pCols);\n  sqlite3SelectDelete(db, pCte->pSelect);\n  sqlite3DbFree(db, pCte->zName);\n}\n\n/*\n** Free the contents of the CTE object passed as the second argument.\n*/\nSQLITE_PRIVATE void sqlite3CteDelete(sqlite3 *db, Cte *pCte){\n  assert( pCte!=0 );\n  cteClear(db, pCte);\n  sqlite3DbFree(db, pCte);\n}\n\n/*\n** This routine is invoked once per CTE by the parser while parsing a\n** WITH clause.  The CTE described by the third argument is added to\n** the WITH clause of the second argument.  If the second argument is\n** NULL, then a new WITH argument is created.\n*/\nSQLITE_PRIVATE With *sqlite3WithAdd(\n  Parse *pParse,          /* Parsing context */\n  With *pWith,            /* Existing WITH clause, or NULL */\n  Cte *pCte               /* CTE to add to the WITH clause */\n){\n  sqlite3 *db = pParse->db;\n  With *pNew;\n  char *zName;\n\n  if( pCte==0 ){\n    return pWith;\n  }\n\n  /* Check that the CTE name is unique within this WITH clause. If\n  ** not, store an error in the Parse structure. */\n  zName = pCte->zName;\n  if( zName && pWith ){\n    int i;\n    for(i=0; i<pWith->nCte; i++){\n      if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){\n        sqlite3ErrorMsg(pParse, \"duplicate WITH table name: %s\", zName);\n      }\n    }\n  }\n\n  if( pWith ){\n    pNew = sqlite3DbRealloc(db, pWith, SZ_WITH(pWith->nCte+1));\n  }else{\n    pNew = sqlite3DbMallocZero(db, SZ_WITH(1));\n  }\n  assert( (pNew!=0 && zName!=0) || db->mallocFailed );\n\n  if( db->mallocFailed ){\n    sqlite3CteDelete(db, pCte);\n    pNew = pWith;\n  }else{\n    pNew->a[pNew->nCte++] = *pCte;\n    sqlite3DbFree(db, pCte);\n  }\n\n  return pNew;\n}\n\n/*\n** Free the contents of the With object passed as the second argument.\n*/\nSQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){\n  if( pWith ){\n    int i;\n    for(i=0; i<pWith->nCte; i++){\n      cteClear(db, &pWith->a[i]);\n    }\n    sqlite3DbFree(db, pWith);\n  }\n}\nSQLITE_PRIVATE void sqlite3WithDeleteGeneric(sqlite3 *db, void *pWith){\n  sqlite3WithDelete(db, (With*)pWith);\n}\n#endif /* !defined(SQLITE_OMIT_CTE) */\n\n/************** End of build.c ***********************************************/\n/************** Begin file callback.c ****************************************/\n/*\n** 2005 May 23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains functions used to access the internal hash tables\n** of user defined functions and collation sequences.\n*/\n\n/* #include \"sqliteInt.h\" */\n\n/*\n** Invoke the 'collation needed' callback to request a collation sequence\n** in the encoding enc of name zName, length nName.\n*/\nstatic void callCollNeeded(sqlite3 *db, int enc, const char *zName){\n  assert( !db->xCollNeeded || !db->xCollNeeded16 );\n  if( db->xCollNeeded ){\n    char *zExternal = sqlite3DbStrDup(db, zName);\n    if( !zExternal ) return;\n    db->xCollNeeded(db->pCollNeededArg, db, enc, zExternal);\n    sqlite3DbFree(db, zExternal);\n  }\n#ifndef SQLITE_OMIT_UTF16\n  if( db->xCollNeeded16 ){\n    char const *zExternal;\n    sqlite3_value *pTmp = sqlite3ValueNew(db);\n    sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);\n    zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);\n    if( zExternal ){\n      db->xCollNeeded16(db->pCollNeededArg, db, (int)ENC(db), zExternal);\n    }\n    sqlite3ValueFree(pTmp);\n  }\n#endif\n}\n\n/*\n** This routine is called if the collation factory fails to deliver a\n** collation function in the best encoding but there may be other versions\n** of this collation function (for other text encodings) available. Use one\n** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if\n** possible.\n*/\nstatic int synthCollSeq(sqlite3 *db, CollSeq *pColl){\n  CollSeq *pColl2;\n  char *z = pColl->zName;\n  int i;\n  static const u8 aEnc[] = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };\n  for(i=0; i<3; i++){\n    pColl2 = sqlite3FindCollSeq(db, aEnc[i], z, 0);\n    if( pColl2->xCmp!=0 ){\n      memcpy(pColl, pColl2, sizeof(CollSeq));\n      pColl->xDel = 0;         /* Do not copy the destructor */\n      return SQLITE_OK;\n    }\n  }\n  return SQLITE_ERROR;\n}\n\n/*\n** This routine is called on a collation sequence before it is used to\n** check that it is defined. An undefined collation sequence exists when\n** a database is loaded that contains references to collation sequences\n** that have not been defined by sqlite3_create_collation() etc.\n**\n** If required, this routine calls the 'collation needed' callback to\n** request a definition of the collating sequence. If this doesn't work,\n** an equivalent collating sequence that uses a text encoding different\n** from the main database is substituted, if one is available.\n*/\nSQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){\n  if( pColl && pColl->xCmp==0 ){\n    const char *zName = pColl->zName;\n    sqlite3 *db = pParse->db;\n    CollSeq *p = sqlite3GetCollSeq(pParse, ENC(db), pColl, zName);\n    if( !p ){\n      return SQLITE_ERROR;\n    }\n    assert( p==pColl );\n  }\n  return SQLITE_OK;\n}\n\n\n\n/*\n** Locate and return an entry from the db.aCollSeq hash table. If the entry\n** specified by zName and nName is not found and parameter 'create' is\n** true, then create a new entry. Otherwise return NULL.\n**\n** Each pointer stored in the sqlite3.aCollSeq hash table contains an\n** array of three CollSeq structures. The first is the collation sequence\n** preferred for UTF-8, the second UTF-16le, and the third UTF-16be.\n**\n** Stored immediately after the three collation sequences is a copy of\n** the collation sequence name. A pointer to this string is stored in\n** each collation sequence structure.\n*/\nstatic CollSeq *findCollSeqEntry(\n  sqlite3 *db,          /* Database connection */\n  const char *zName,    /* Name of the collating sequence */\n  int create            /* Create a new entry if true */\n){\n  CollSeq *pColl;\n  pColl = sqlite3HashFind(&db->aCollSeq, zName);\n\n  if( 0==pColl && create ){\n    int nName = sqlite3Strlen30(zName) + 1;\n    pColl = sqlite3DbMallocZero(db, 3*sizeof(*pColl) + nName);\n    if( pColl ){\n      CollSeq *pDel = 0;\n      pColl[0].zName = (char*)&pColl[3];\n      pColl[0].enc = SQLITE_UTF8;\n      pColl[1].zName = (char*)&pColl[3];\n      pColl[1].enc = SQLITE_UTF16LE;\n      pColl[2].zName = (char*)&pColl[3];\n      pColl[2].enc = SQLITE_UTF16BE;\n      memcpy(pColl[0].zName, zName, nName);\n      pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, pColl);\n\n      /* If a malloc() failure occurred in sqlite3HashInsert(), it will\n      ** return the pColl pointer to be deleted (because it wasn't added\n      ** to the hash table).\n      */\n      assert( pDel==0 || pDel==pColl );\n      if( pDel!=0 ){\n        sqlite3OomFault(db);\n        sqlite3DbFree(db, pDel);\n        pColl = 0;\n      }\n    }\n  }\n  return pColl;\n}\n\n/*\n** Parameter zName points to a UTF-8 encoded string nName bytes long.\n** Return the CollSeq* pointer for the collation sequence named zName\n** for the encoding 'enc' from the database 'db'.\n**\n** If the entry specified is not found and 'create' is true, then create a\n** new entry.  Otherwise return NULL.\n**\n** A separate function sqlite3LocateCollSeq() is a wrapper around\n** this routine.  sqlite3LocateCollSeq() invokes the collation factory\n** if necessary and generates an error message if the collating sequence\n** cannot be found.\n**\n** See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()\n*/\nSQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(\n  sqlite3 *db,          /* Database connection to search */\n  u8 enc,               /* Desired text encoding */\n  const char *zName,    /* Name of the collating sequence.  Might be NULL */\n  int create            /* True to create CollSeq if doesn't already exist */\n){\n  CollSeq *pColl;\n  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );\n  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );\n  if( zName ){\n    pColl = findCollSeqEntry(db, zName, create);\n    if( pColl ) pColl += enc-1;\n  }else{\n    pColl = db->pDfltColl;\n  }\n  return pColl;\n}\n\n/*\n** Change the text encoding for a database connection. This means that\n** the pDfltColl must change as well.\n*/\nSQLITE_PRIVATE void sqlite3SetTextEncoding(sqlite3 *db, u8 enc){\n  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );\n  db->enc = enc;\n  /* EVIDENCE-OF: R-08308-17224 The default collating function for all\n  ** strings is BINARY.\n  */\n  db->pDfltColl = sqlite3FindCollSeq(db, enc, sqlite3StrBINARY, 0);\n  sqlite3ExpirePreparedStatements(db, 1);\n}\n\n/*\n** This function is responsible for invoking the collation factory callback\n** or substituting a collation sequence of a different encoding when the\n** requested collation sequence is not available in the desired encoding.\n**\n** If it is not NULL, then pColl must point to the database native encoding\n** collation sequence with name zName, length nName.\n**\n** The return value is either the collation sequence to be used in database\n** db for collation type name zName, length nName, or NULL, if no collation\n** sequence can be found.  If no collation is found, leave an error message.\n**\n** See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()\n*/\nSQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(\n  Parse *pParse,        /* Parsing context */\n  u8 enc,               /* The desired encoding for the collating sequence */\n  CollSeq *pColl,       /* Collating sequence with native encoding, or NULL */\n  const char *zName     /* Collating sequence name */\n){\n  CollSeq *p;\n  sqlite3 *db = pParse->db;\n\n  p = pColl;\n  if( !p ){\n    p = sqlite3FindCollSeq(db, enc, zName, 0);\n  }\n  if( !p || !p->xCmp ){\n    /* No collation sequence of this type for this encoding is registered.\n    ** Call the collation factory to see if it can supply us with one.\n    */\n    callCollNeeded(db, enc, zName);\n    p = sqlite3FindCollSeq(db, enc, zName, 0);\n  }\n  if( p && !p->xCmp && synthCollSeq(db, p) ){\n    p = 0;\n  }\n  assert( !p || p->xCmp );\n  if( p==0 ){\n    sqlite3ErrorMsg(pParse, \"no such collation sequence: %s\", zName);\n    pParse->rc = SQLITE_ERROR_MISSING_COLLSEQ;\n  }\n  return p;\n}\n\n/*\n** This function returns the collation sequence for database native text\n** encoding identified by the string zName.\n**\n** If the requested collation sequence is not available, or not available\n** in the database native encoding, the collation factory is invoked to\n** request it. If the collation factory does not supply such a sequence,\n** and the sequence is available in another text encoding, then that is\n** returned instead.\n**\n** If no versions of the requested collations sequence are available, or\n** another error occurs, NULL is returned and an error message written into\n** pParse.\n**\n** This routine is a wrapper around sqlite3FindCollSeq().  This routine\n** invokes the collation factory if the named collation cannot be found\n** and generates an error message.\n**\n** See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()\n*/\nSQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){\n  sqlite3 *db = pParse->db;\n  u8 enc = ENC(db);\n  u8 initbusy = db->init.busy;\n  CollSeq *pColl;\n\n  pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);\n  if( !initbusy && (!pColl || !pColl->xCmp) ){\n    pColl = sqlite3GetCollSeq(pParse, enc, pColl, zName);\n  }\n\n  return pColl;\n}\n\n/* During the search for the best function definition, this procedure\n** is called to test how well the function passed as the first argument\n** matches the request for a function with nArg arguments in a system\n** that uses encoding enc. The value returned indicates how well the\n** request is matched. A higher value indicates a better match.\n**\n** If nArg is -1 that means to only return a match (non-zero) if p->nArg\n** is also -1.  In other words, we are searching for a function that\n** takes a variable number of arguments.\n**\n** If nArg is -2 that means that we are searching for any function\n** regardless of the number of arguments it uses, so return a positive\n** match score for any\n**\n** The returned value is always between 0 and 6, as follows:\n**\n** 0: Not a match.\n** 1: UTF8/16 conversion required and function takes any number of arguments.\n** 2: UTF16 byte order change required and function takes any number of args.\n** 3: encoding matches and function takes any number of arguments\n** 4: UTF8/16 conversion required - argument count matches exactly\n** 5: UTF16 byte order conversion required - argument count matches exactly\n** 6: Perfect match:  encoding and argument count match exactly.\n**\n** If nArg==(-2) then any function with a non-null xSFunc is\n** a perfect match and any function with xSFunc NULL is\n** a non-match.\n*/\n#define FUNC_PERFECT_MATCH 6  /* The score for a perfect match */\nstatic int matchQuality(\n  FuncDef *p,     /* The function we are evaluating for match quality */\n  int nArg,       /* Desired number of arguments.  (-1)==any */\n  u8 enc          /* Desired text encoding */\n){\n  int match;\n  assert( p->nArg>=(-4) && p->nArg!=(-2) );\n  assert( nArg>=(-2) );\n\n  /* Wrong number of arguments means \"no match\" */\n  if( p->nArg!=nArg ){\n    if( nArg==(-2) ) return p->xSFunc==0 ? 0 : FUNC_PERFECT_MATCH;\n    if( p->nArg>=0 ) return 0;\n    /* Special p->nArg values available to built-in functions only:\n    **    -3     1 or more arguments required\n    **    -4     2 or more arguments required\n    */\n    if( p->nArg<(-2) && nArg<(-2-p->nArg) ) return 0;\n  }\n\n  /* Give a better score to a function with a specific number of arguments\n  ** than to function that accepts any number of arguments. */\n  if( p->nArg==nArg ){\n    match = 4;\n  }else{\n    match = 1;\n  }\n\n  /* Bonus points if the text encoding matches */\n  if( enc==(p->funcFlags & SQLITE_FUNC_ENCMASK) ){\n    match += 2;  /* Exact encoding match */\n  }else if( (enc & p->funcFlags & 2)!=0 ){\n    match += 1;  /* Both are UTF16, but with different byte orders */\n  }\n\n  return match;\n}\n\n/*\n** Search a FuncDefHash for a function with the given name.  Return\n** a pointer to the matching FuncDef if found, or 0 if there is no match.\n*/\nSQLITE_PRIVATE FuncDef *sqlite3FunctionSearch(\n  int h,               /* Hash of the name */\n  const char *zFunc    /* Name of function */\n){\n  FuncDef *p;\n  for(p=sqlite3BuiltinFunctions.a[h]; p; p=p->u.pHash){\n    assert( p->funcFlags & SQLITE_FUNC_BUILTIN );\n    if( sqlite3StrICmp(p->zName, zFunc)==0 ){\n      return p;\n    }\n  }\n  return 0;\n}\n\n/*\n** Insert a new FuncDef into a FuncDefHash hash table.\n*/\nSQLITE_PRIVATE void sqlite3InsertBuiltinFuncs(\n  FuncDef *aDef,      /* List of global functions to be inserted */\n  int nDef            /* Length of the apDef[] list */\n){\n  int i;\n  for(i=0; i<nDef; i++){\n    FuncDef *pOther;\n    const char *zName = aDef[i].zName;\n    int nName = sqlite3Strlen30(zName);\n    int h = SQLITE_FUNC_HASH(zName[0], nName);\n    assert( aDef[i].funcFlags & SQLITE_FUNC_BUILTIN );\n    pOther = sqlite3FunctionSearch(h, zName);\n    if( pOther ){\n      assert( pOther!=&aDef[i] && pOther->pNext!=&aDef[i] );\n      aDef[i].pNext = pOther->pNext;\n      pOther->pNext = &aDef[i];\n    }else{\n      aDef[i].pNext = 0;\n      aDef[i].u.pHash = sqlite3BuiltinFunctions.a[h];\n      sqlite3BuiltinFunctions.a[h] = &aDef[i];\n    }\n  }\n}\n\n\n\n/*\n** Locate a user function given a name, a number of arguments and a flag\n** indicating whether the function prefers UTF-16 over UTF-8.  Return a\n** pointer to the FuncDef structure that defines that function, or return\n** NULL if the function does not exist.\n**\n** If the createFlag argument is true, then a new (blank) FuncDef\n** structure is created and liked into the \"db\" structure if a\n** no matching function previously existed.\n**\n** If nArg is -2, then the first valid function found is returned.  A\n** function is valid if xSFunc is non-zero.  The nArg==(-2)\n** case is used to see if zName is a valid function name for some number\n** of arguments.  If nArg is -2, then createFlag must be 0.\n**\n** If createFlag is false, then a function with the required name and\n** number of arguments may be returned even if the eTextRep flag does not\n** match that requested.\n*/\nSQLITE_PRIVATE FuncDef *sqlite3FindFunction(\n  sqlite3 *db,       /* An open database */\n  const char *zName, /* Name of the function.  zero-terminated */\n  int nArg,          /* Number of arguments.  -1 means any number */\n  u8 enc,            /* Preferred text encoding */\n  u8 createFlag      /* Create new entry if true and does not otherwise exist */\n){\n  FuncDef *p;         /* Iterator variable */\n  FuncDef *pBest = 0; /* Best match found so far */\n  int bestScore = 0;  /* Score of best match */\n  int h;              /* Hash value */\n  int nName;          /* Length of the name */\n\n  assert( nArg>=(-2) );\n  assert( nArg>=(-1) || createFlag==0 );\n  nName = sqlite3Strlen30(zName);\n\n  /* First search for a match amongst the application-defined functions.\n  */\n  p = (FuncDef*)sqlite3HashFind(&db->aFunc, zName);\n  while( p ){\n    int score = matchQuality(p, nArg, enc);\n    if( score>bestScore ){\n      pBest = p;\n      bestScore = score;\n    }\n    p = p->pNext;\n  }\n\n  /* If no match is found, search the built-in functions.\n  **\n  ** If the DBFLAG_PreferBuiltin flag is set, then search the built-in\n  ** functions even if a prior app-defined function was found.  And give\n  ** priority to built-in functions.\n  **\n  ** Except, if createFlag is true, that means that we are trying to\n  ** install a new function.  Whatever FuncDef structure is returned it will\n  ** have fields overwritten with new information appropriate for the\n  ** new function.  But the FuncDefs for built-in functions are read-only.\n  ** So we must not search for built-ins when creating a new function.\n  */\n  if( !createFlag && (pBest==0 || (db->mDbFlags & DBFLAG_PreferBuiltin)!=0) ){\n    bestScore = 0;\n    h = SQLITE_FUNC_HASH(sqlite3UpperToLower[(u8)zName[0]], nName);\n    p = sqlite3FunctionSearch(h, zName);\n    while( p ){\n      int score = matchQuality(p, nArg, enc);\n      if( score>bestScore ){\n        pBest = p;\n        bestScore = score;\n      }\n      p = p->pNext;\n    }\n  }\n\n  /* If the createFlag parameter is true and the search did not reveal an\n  ** exact match for the name, number of arguments and encoding, then add a\n  ** new entry to the hash table and return it.\n  */\n  if( createFlag && bestScore<FUNC_PERFECT_MATCH &&\n      (pBest = sqlite3DbMallocZero(db, sizeof(*pBest)+nName+1))!=0 ){\n    FuncDef *pOther;\n    u8 *z;\n    pBest->zName = (const char*)&pBest[1];\n    pBest->nArg = (u16)nArg;\n    pBest->funcFlags = enc;\n    memcpy((char*)&pBest[1], zName, nName+1);\n    for(z=(u8*)pBest->zName; *z; z++) *z = sqlite3UpperToLower[*z];\n    pOther = (FuncDef*)sqlite3HashInsert(&db->aFunc, pBest->zName, pBest);\n    if( pOther==pBest ){\n      sqlite3DbFree(db, pBest);\n      sqlite3OomFault(db);\n      return 0;\n    }else{\n      pBest->pNext = pOther;\n    }\n  }\n\n  if( pBest && (pBest->xSFunc || createFlag) ){\n    return pBest;\n  }\n  return 0;\n}\n\n/*\n** Free all resources held by the schema structure. The void* argument points\n** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the\n** pointer itself, it just cleans up subsidiary resources (i.e. the contents\n** of the schema hash tables).\n**\n** The Schema.cache_size variable is not cleared.\n*/\nSQLITE_PRIVATE void sqlite3SchemaClear(void *p){\n  Hash temp1;\n  Hash temp2;\n  HashElem *pElem;\n  Schema *pSchema = (Schema *)p;\n  sqlite3 xdb;\n\n  memset(&xdb, 0, sizeof(xdb));\n  temp1 = pSchema->tblHash;\n  temp2 = pSchema->trigHash;\n  sqlite3HashInit(&pSchema->trigHash);\n  sqlite3HashClear(&pSchema->idxHash);\n  for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){\n    sqlite3DeleteTrigger(&xdb, (Trigger*)sqliteHashData(pElem));\n  }\n\n  sqlite3HashClear(&temp2);\n  sqlite3HashInit(&pSchema->tblHash);\n  for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){\n    Table *pTab = sqliteHashData(pElem);\n    sqlite3DeleteTable(&xdb, pTab);\n  }\n  sqlite3HashClear(&temp1);\n  sqlite3HashClear(&pSchema->fkeyHash);\n  pSchema->pSeqTab = 0;\n  if( pSchema->schemaFlags & DB_SchemaLoaded ){\n    pSchema->iGeneration++;\n  }\n  pSchema->schemaFlags &= ~(DB_SchemaLoaded|DB_ResetWanted);\n}\n\n/*\n** Find and return the schema associated with a BTree.  Create\n** a new one if necessary.\n*/\nSQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){\n  Schema * p;\n  if( pBt ){\n    p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaClear);\n  }else{\n    p = (Schema *)sqlite3DbMallocZero(0, sizeof(Schema));\n  }\n  if( !p ){\n    sqlite3OomFault(db);\n  }else if ( 0==p->file_format ){\n    sqlite3HashInit(&p->tblHash);\n    sqlite3HashInit(&p->idxHash);\n    sqlite3HashInit(&p->trigHash);\n    sqlite3HashInit(&p->fkeyHash);\n    p->enc = SQLITE_UTF8;\n  }\n  return p;\n}\n\n/************** End of callback.c ********************************************/\n/************** Begin file delete.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that are called by the parser\n** in order to generate code for DELETE FROM statements.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** While a SrcList can in general represent multiple tables and subqueries\n** (as in the FROM clause of a SELECT statement) in this case it contains\n** the name of a single table, as one might find in an INSERT, DELETE,\n** or UPDATE statement.  Look up that table in the symbol table and\n** return a pointer.  Set an error message and return NULL if the table\n** name is not found or if any other error occurs.\n**\n** The following fields are initialized appropriate in pSrc:\n**\n**    pSrc->a[0].spTab        Pointer to the Table object\n**    pSrc->a[0].u2.pIBIndex  Pointer to the INDEXED BY index, if there is one\n**\n*/\nSQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){\n  SrcItem *pItem = pSrc->a;\n  Table *pTab;\n  assert( pItem && pSrc->nSrc>=1 );\n  pTab = sqlite3LocateTableItem(pParse, 0, pItem);\n  if( pItem->pSTab ) sqlite3DeleteTable(pParse->db, pItem->pSTab);\n  pItem->pSTab = pTab;\n  pItem->fg.notCte = 1;\n  if( pTab ){\n    pTab->nTabRef++;\n    if( pItem->fg.isIndexedBy && sqlite3IndexedByLookup(pParse, pItem) ){\n      pTab = 0;\n    }\n  }\n  return pTab;\n}\n\n/* Generate byte-code that will report the number of rows modified\n** by a DELETE, INSERT, or UPDATE statement.\n*/\nSQLITE_PRIVATE void sqlite3CodeChangeCount(Vdbe *v, int regCounter, const char *zColName){\n  sqlite3VdbeAddOp0(v, OP_FkCheck);\n  sqlite3VdbeAddOp2(v, OP_ResultRow, regCounter, 1);\n  sqlite3VdbeSetNumCols(v, 1);\n  sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zColName, SQLITE_STATIC);\n}\n\n/* Return true if table pTab is read-only.\n**\n** A table is read-only if any of the following are true:\n**\n**   1) It is a virtual table and no implementation of the xUpdate method\n**      has been provided\n**\n**   2) A trigger is currently being coded and the table is a virtual table\n**      that is SQLITE_VTAB_DIRECTONLY or if PRAGMA trusted_schema=OFF and\n**      the table is not SQLITE_VTAB_INNOCUOUS.\n**\n**   3) It is a system table (i.e. sqlite_schema), this call is not\n**      part of a nested parse and writable_schema pragma has not\n**      been specified\n**\n**   4) The table is a shadow table, the database connection is in\n**      defensive mode, and the current sqlite3_prepare()\n**      is for a top-level SQL statement.\n*/\nstatic int vtabIsReadOnly(Parse *pParse, Table *pTab){\n  assert( IsVirtual(pTab) );\n  if( sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0 ){\n    return 1;\n  }\n\n  /* Within triggers:\n  **   *  Do not allow DELETE, INSERT, or UPDATE of SQLITE_VTAB_DIRECTONLY\n  **      virtual tables\n  **   *  Only allow DELETE, INSERT, or UPDATE of non-SQLITE_VTAB_INNOCUOUS\n  **      virtual tables if PRAGMA trusted_schema=ON.\n  */\n  if( pParse->pToplevel!=0\n   && pTab->u.vtab.p->eVtabRisk >\n           ((pParse->db->flags & SQLITE_TrustedSchema)!=0)\n  ){\n    sqlite3ErrorMsg(pParse, \"unsafe use of virtual table \\\"%s\\\"\",\n      pTab->zName);\n  }\n  return 0;\n}\nstatic int tabIsReadOnly(Parse *pParse, Table *pTab){\n  sqlite3 *db;\n  if( IsVirtual(pTab) ){\n    return vtabIsReadOnly(pParse, pTab);\n  }\n  if( (pTab->tabFlags & (TF_Readonly|TF_Shadow))==0 ) return 0;\n  db = pParse->db;\n  if( (pTab->tabFlags & TF_Readonly)!=0 ){\n    return sqlite3WritableSchema(db)==0 && pParse->nested==0;\n  }\n  assert( pTab->tabFlags & TF_Shadow );\n  return sqlite3ReadOnlyShadowTables(db);\n}\n\n/*\n** Check to make sure the given table is writable.\n**\n** If pTab is not writable  ->  generate an error message and return 1.\n** If pTab is writable but other errors have occurred -> return 1.\n** If pTab is writable and no prior errors -> return 0;\n*/\nSQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, Trigger *pTrigger){\n  if( tabIsReadOnly(pParse, pTab) ){\n    sqlite3ErrorMsg(pParse, \"table %s may not be modified\", pTab->zName);\n    return 1;\n  }\n#ifndef SQLITE_OMIT_VIEW\n  if( IsView(pTab)\n   && (pTrigger==0 || (pTrigger->bReturning && pTrigger->pNext==0))\n  ){\n    sqlite3ErrorMsg(pParse,\"cannot modify %s because it is a view\",pTab->zName);\n    return 1;\n  }\n#endif\n  return 0;\n}\n\n\n#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)\n/*\n** Evaluate a view and store its result in an ephemeral table.  The\n** pWhere argument is an optional WHERE clause that restricts the\n** set of rows in the view that are to be added to the ephemeral table.\n*/\nSQLITE_PRIVATE void sqlite3MaterializeView(\n  Parse *pParse,       /* Parsing context */\n  Table *pView,        /* View definition */\n  Expr *pWhere,        /* Optional WHERE clause to be added */\n  ExprList *pOrderBy,  /* Optional ORDER BY clause */\n  Expr *pLimit,        /* Optional LIMIT clause */\n  int iCur             /* Cursor number for ephemeral table */\n){\n  SelectDest dest;\n  Select *pSel;\n  SrcList *pFrom;\n  sqlite3 *db = pParse->db;\n  int iDb = sqlite3SchemaToIndex(db, pView->pSchema);\n  pWhere = sqlite3ExprDup(db, pWhere, 0);\n  pFrom = sqlite3SrcListAppend(pParse, 0, 0, 0);\n  if( pFrom ){\n    assert( pFrom->nSrc==1 );\n    pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);\n    assert( pFrom->a[0].fg.fixedSchema==0 && pFrom->a[0].fg.isSubquery==0 );\n    pFrom->a[0].u4.zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zDbSName);\n    assert( pFrom->a[0].fg.isUsing==0 );\n    assert( pFrom->a[0].u3.pOn==0 );\n  }\n  pSel = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, pOrderBy,\n                          SF_IncludeHidden, pLimit);\n  sqlite3SelectDestInit(&dest, SRT_EphemTab, iCur);\n  sqlite3Select(pParse, pSel, &dest);\n  sqlite3SelectDelete(db, pSel);\n}\n#endif /* !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER) */\n\n#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)\n/*\n** Generate an expression tree to implement the WHERE, ORDER BY,\n** and LIMIT/OFFSET portion of DELETE and UPDATE statements.\n**\n**     DELETE FROM table_wxyz WHERE a<5 ORDER BY a LIMIT 1;\n**                            \\__________________________/\n**                               pLimitWhere (pInClause)\n*/\nSQLITE_PRIVATE Expr *sqlite3LimitWhere(\n  Parse *pParse,               /* The parser context */\n  SrcList *pSrc,               /* the FROM clause -- which tables to scan */\n  Expr *pWhere,                /* The WHERE clause.  May be null */\n  ExprList *pOrderBy,          /* The ORDER BY clause.  May be null */\n  Expr *pLimit,                /* The LIMIT clause.  May be null */\n  char *zStmtType              /* Either DELETE or UPDATE.  For err msgs. */\n){\n  sqlite3 *db = pParse->db;\n  Expr *pLhs = NULL;           /* LHS of IN(SELECT...) operator */\n  Expr *pInClause = NULL;      /* WHERE rowid IN ( select ) */\n  ExprList *pEList = NULL;     /* Expression list containing only pSelectRowid*/\n  SrcList *pSelectSrc = NULL;  /* SELECT rowid FROM x ... (dup of pSrc) */\n  Select *pSelect = NULL;      /* Complete SELECT tree */\n  Table *pTab;\n\n  /* Check that there isn't an ORDER BY without a LIMIT clause.\n  */\n  if( pOrderBy && pLimit==0 ) {\n    sqlite3ErrorMsg(pParse, \"ORDER BY without LIMIT on %s\", zStmtType);\n    sqlite3ExprDelete(pParse->db, pWhere);\n    sqlite3ExprListDelete(pParse->db, pOrderBy);\n    return 0;\n  }\n\n  /* We only need to generate a select expression if there\n  ** is a limit/offset term to enforce.\n  */\n  if( pLimit == 0 ) {\n    return pWhere;\n  }\n\n  /* Generate a select expression tree to enforce the limit/offset\n  ** term for the DELETE or UPDATE statement.  For example:\n  **   DELETE FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1\n  ** becomes:\n  **   DELETE FROM table_a WHERE rowid IN (\n  **     SELECT rowid FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1\n  **   );\n  */\n\n  pTab = pSrc->a[0].pSTab;\n  if( HasRowid(pTab) ){\n    pLhs = sqlite3PExpr(pParse, TK_ROW, 0, 0);\n    pEList = sqlite3ExprListAppend(\n        pParse, 0, sqlite3PExpr(pParse, TK_ROW, 0, 0)\n    );\n  }else{\n    Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n    assert( pPk!=0 );\n    assert( pPk->nKeyCol>=1 );\n    if( pPk->nKeyCol==1 ){\n      const char *zName;\n      assert( pPk->aiColumn[0]>=0 && pPk->aiColumn[0]<pTab->nCol );\n      zName = pTab->aCol[pPk->aiColumn[0]].zCnName;\n      pLhs = sqlite3Expr(db, TK_ID, zName);\n      pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ID, zName));\n    }else{\n      int i;\n      for(i=0; i<pPk->nKeyCol; i++){\n        Expr *p;\n        assert( pPk->aiColumn[i]>=0 && pPk->aiColumn[i]<pTab->nCol );\n        p = sqlite3Expr(db, TK_ID, pTab->aCol[pPk->aiColumn[i]].zCnName);\n        pEList = sqlite3ExprListAppend(pParse, pEList, p);\n      }\n      pLhs = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);\n      if( pLhs ){\n        pLhs->x.pList = sqlite3ExprListDup(db, pEList, 0);\n      }\n    }\n  }\n\n  /* duplicate the FROM clause as it is needed by both the DELETE/UPDATE tree\n  ** and the SELECT subtree. */\n  pSrc->a[0].pSTab = 0;\n  pSelectSrc = sqlite3SrcListDup(db, pSrc, 0);\n  pSrc->a[0].pSTab = pTab;\n  if( pSrc->a[0].fg.isIndexedBy ){\n    assert( pSrc->a[0].fg.isCte==0 );\n    pSrc->a[0].u2.pIBIndex = 0;\n    pSrc->a[0].fg.isIndexedBy = 0;\n    sqlite3DbFree(db, pSrc->a[0].u1.zIndexedBy);\n  }else if( pSrc->a[0].fg.isCte ){\n    pSrc->a[0].u2.pCteUse->nUse++;\n  }\n\n  /* generate the SELECT expression tree. */\n  pSelect = sqlite3SelectNew(pParse, pEList, pSelectSrc, pWhere, 0 ,0,\n      pOrderBy,0,pLimit\n  );\n\n  /* now generate the new WHERE rowid IN clause for the DELETE/UPDATE */\n  pInClause = sqlite3PExpr(pParse, TK_IN, pLhs, 0);\n  sqlite3PExprAddSelect(pParse, pInClause, pSelect);\n  return pInClause;\n}\n#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) */\n       /*      && !defined(SQLITE_OMIT_SUBQUERY) */\n\n/*\n** Generate code for a DELETE FROM statement.\n**\n**     DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;\n**                 \\________/       \\________________/\n**                  pTabList              pWhere\n*/\nSQLITE_PRIVATE void sqlite3DeleteFrom(\n  Parse *pParse,         /* The parser context */\n  SrcList *pTabList,     /* The table from which we should delete things */\n  Expr *pWhere,          /* The WHERE clause.  May be null */\n  ExprList *pOrderBy,    /* ORDER BY clause. May be null */\n  Expr *pLimit           /* LIMIT clause. May be null */\n){\n  Vdbe *v;               /* The virtual database engine */\n  Table *pTab;           /* The table from which records will be deleted */\n  int i;                 /* Loop counter */\n  WhereInfo *pWInfo;     /* Information about the WHERE clause */\n  Index *pIdx;           /* For looping over indices of the table */\n  int iTabCur;           /* Cursor number for the table */\n  int iDataCur = 0;      /* VDBE cursor for the canonical data source */\n  int iIdxCur = 0;       /* Cursor number of the first index */\n  int nIdx;              /* Number of indices */\n  sqlite3 *db;           /* Main database structure */\n  AuthContext sContext;  /* Authorization context */\n  NameContext sNC;       /* Name context to resolve expressions in */\n  int iDb;               /* Database number */\n  int memCnt = 0;        /* Memory cell used for change counting */\n  int rcauth;            /* Value returned by authorization callback */\n  int eOnePass;          /* ONEPASS_OFF or _SINGLE or _MULTI */\n  int aiCurOnePass[2];   /* The write cursors opened by WHERE_ONEPASS */\n  u8 *aToOpen = 0;       /* Open cursor iTabCur+j if aToOpen[j] is true */\n  Index *pPk;            /* The PRIMARY KEY index on the table */\n  int iPk = 0;           /* First of nPk registers holding PRIMARY KEY value */\n  i16 nPk = 1;           /* Number of columns in the PRIMARY KEY */\n  int iKey;              /* Memory cell holding key of row to be deleted */\n  i16 nKey;              /* Number of memory cells in the row key */\n  int iEphCur = 0;       /* Ephemeral table holding all primary key values */\n  int iRowSet = 0;       /* Register for rowset of rows to delete */\n  int addrBypass = 0;    /* Address of jump over the delete logic */\n  int addrLoop = 0;      /* Top of the delete loop */\n  int addrEphOpen = 0;   /* Instruction to open the Ephemeral table */\n  int bComplex;          /* True if there are triggers or FKs or\n                         ** subqueries in the WHERE clause */\n\n#ifndef SQLITE_OMIT_TRIGGER\n  int isView;                  /* True if attempting to delete from a view */\n  Trigger *pTrigger;           /* List of table triggers, if required */\n#endif\n\n  memset(&sContext, 0, sizeof(sContext));\n  db = pParse->db;\n  assert( db->pParse==pParse );\n  if( pParse->nErr ){\n    goto delete_from_cleanup;\n  }\n  assert( db->mallocFailed==0 );\n  assert( pTabList->nSrc==1 );\n\n  /* Locate the table which we want to delete.  This table has to be\n  ** put in an SrcList structure because some of the subroutines we\n  ** will be calling are designed to work with multiple tables and expect\n  ** an SrcList* parameter instead of just a Table* parameter.\n  */\n  pTab = sqlite3SrcListLookup(pParse, pTabList);\n  if( pTab==0 )  goto delete_from_cleanup;\n\n  /* Figure out if we have any triggers and if the table being\n  ** deleted from is a view\n  */\n#ifndef SQLITE_OMIT_TRIGGER\n  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);\n  isView = IsView(pTab);\n#else\n# define pTrigger 0\n# define isView 0\n#endif\n  bComplex = pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0);\n#ifdef SQLITE_OMIT_VIEW\n# undef isView\n# define isView 0\n#endif\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x10000 ){\n    sqlite3TreeViewLine(0, \"In sqlite3Delete() at %s:%d\", __FILE__, __LINE__);\n    sqlite3TreeViewDelete(pParse->pWith, pTabList, pWhere,\n                          pOrderBy, pLimit, pTrigger);\n  }\n#endif\n\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n  if( !isView ){\n    pWhere = sqlite3LimitWhere(\n        pParse, pTabList, pWhere, pOrderBy, pLimit, \"DELETE\"\n    );\n    pOrderBy = 0;\n    pLimit = 0;\n  }\n#endif\n\n  /* If pTab is really a view, make sure it has been initialized.\n  */\n  if( sqlite3ViewGetColumnNames(pParse, pTab) ){\n    goto delete_from_cleanup;\n  }\n\n  if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){\n    goto delete_from_cleanup;\n  }\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iDb<db->nDb );\n  rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0,\n                            db->aDb[iDb].zDbSName);\n  assert( rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE );\n  if( rcauth==SQLITE_DENY ){\n    goto delete_from_cleanup;\n  }\n  assert(!isView || pTrigger);\n\n  /* Assign cursor numbers to the table and all its indices.\n  */\n  assert( pTabList->nSrc==1 );\n  iTabCur = pTabList->a[0].iCursor = pParse->nTab++;\n  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){\n    pParse->nTab++;\n  }\n\n  /* Start the view context\n  */\n  if( isView ){\n    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);\n  }\n\n  /* Begin generating code.\n  */\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 ){\n    goto delete_from_cleanup;\n  }\n  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);\n  sqlite3BeginWriteOperation(pParse, bComplex, iDb);\n\n  /* If we are trying to delete from a view, realize that view into\n  ** an ephemeral table.\n  */\n#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)\n  if( isView ){\n    sqlite3MaterializeView(pParse, pTab,\n        pWhere, pOrderBy, pLimit, iTabCur\n    );\n    iDataCur = iIdxCur = iTabCur;\n    pOrderBy = 0;\n    pLimit = 0;\n  }\n#endif\n\n  /* Resolve the column names in the WHERE clause.\n  */\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pParse = pParse;\n  sNC.pSrcList = pTabList;\n  if( sqlite3ResolveExprNames(&sNC, pWhere) ){\n    goto delete_from_cleanup;\n  }\n\n  /* Initialize the counter of the number of rows deleted, if\n  ** we are counting rows.\n  */\n  if( (db->flags & SQLITE_CountRows)!=0\n   && !pParse->nested\n   && !pParse->pTriggerTab\n   && !pParse->bReturning\n  ){\n    memCnt = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, memCnt);\n  }\n\n#ifndef SQLITE_OMIT_TRUNCATE_OPTIMIZATION\n  /* Special case: A DELETE without a WHERE clause deletes everything.\n  ** It is easier just to erase the whole table. Prior to version 3.6.5,\n  ** this optimization caused the row change count (the value returned by\n  ** API function sqlite3_count_changes) to be set incorrectly.\n  **\n  ** The \"rcauth==SQLITE_OK\" terms is the\n  ** IMPLEMENTATION-OF: R-17228-37124 If the action code is SQLITE_DELETE and\n  ** the callback returns SQLITE_IGNORE then the DELETE operation proceeds but\n  ** the truncate optimization is disabled and all rows are deleted\n  ** individually.\n  */\n  if( rcauth==SQLITE_OK\n   && pWhere==0\n   && !bComplex\n   && !IsVirtual(pTab)\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n   && db->xPreUpdateCallback==0\n#endif\n  ){\n    assert( !isView );\n    sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);\n    if( HasRowid(pTab) ){\n      sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt ? memCnt : -1,\n                        pTab->zName, P4_STATIC);\n    }\n    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      assert( pIdx->pSchema==pTab->pSchema );\n      if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){\n        sqlite3VdbeAddOp3(v, OP_Clear, pIdx->tnum, iDb, memCnt ? memCnt : -1);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);\n      }\n    }\n  }else\n#endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */\n  {\n    u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK;\n    if( sNC.ncFlags & NC_Subquery ) bComplex = 1;\n    wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW);\n    if( HasRowid(pTab) ){\n      /* For a rowid table, initialize the RowSet to an empty set */\n      pPk = 0;\n      assert( nPk==1 );\n      iRowSet = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet);\n    }else{\n      /* For a WITHOUT ROWID table, create an ephemeral table used to\n      ** hold all primary keys for rows to be deleted. */\n      pPk = sqlite3PrimaryKeyIndex(pTab);\n      assert( pPk!=0 );\n      nPk = pPk->nKeyCol;\n      iPk = pParse->nMem+1;\n      pParse->nMem += nPk;\n      iEphCur = pParse->nTab++;\n      addrEphOpen = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, iEphCur, nPk);\n      sqlite3VdbeSetP4KeyInfo(pParse, pPk);\n    }\n\n    /* Construct a query to find the rowid or primary key for every row\n    ** to be deleted, based on the WHERE clause. Set variable eOnePass\n    ** to indicate the strategy used to implement this delete:\n    **\n    **  ONEPASS_OFF:    Two-pass approach - use a FIFO for rowids/PK values.\n    **  ONEPASS_SINGLE: One-pass approach - at most one row deleted.\n    **  ONEPASS_MULTI:  One-pass approach - any number of rows may be deleted.\n    */\n    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, 0,0,wcf,iTabCur+1);\n    if( pWInfo==0 ) goto delete_from_cleanup;\n    eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);\n    assert( IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI );\n    assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF\n            || OptimizationDisabled(db, SQLITE_OnePass) );\n    if( eOnePass!=ONEPASS_SINGLE ) sqlite3MultiWrite(pParse);\n    if( sqlite3WhereUsesDeferredSeek(pWInfo) ){\n      sqlite3VdbeAddOp1(v, OP_FinishSeek, iTabCur);\n    }\n\n    /* Keep track of the number of rows to be deleted */\n    if( memCnt ){\n      sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);\n    }\n\n    /* Extract the rowid or primary key for the current row */\n    if( pPk ){\n      for(i=0; i<nPk; i++){\n        assert( pPk->aiColumn[i]>=0 );\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,\n                                        pPk->aiColumn[i], iPk+i);\n      }\n      iKey = iPk;\n    }else{\n      iKey = ++pParse->nMem;\n      sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, -1, iKey);\n    }\n\n    if( eOnePass!=ONEPASS_OFF ){\n      /* For ONEPASS, no need to store the rowid/primary-key. There is only\n      ** one, so just keep it in its register(s) and fall through to the\n      ** delete code.  */\n      nKey = nPk; /* OP_Found will use an unpacked key */\n      aToOpen = sqlite3DbMallocRawNN(db, nIdx+2);\n      if( aToOpen==0 ){\n        sqlite3WhereEnd(pWInfo);\n        goto delete_from_cleanup;\n      }\n      memset(aToOpen, 1, nIdx+1);\n      aToOpen[nIdx+1] = 0;\n      if( aiCurOnePass[0]>=0 ) aToOpen[aiCurOnePass[0]-iTabCur] = 0;\n      if( aiCurOnePass[1]>=0 ) aToOpen[aiCurOnePass[1]-iTabCur] = 0;\n      if( addrEphOpen ) sqlite3VdbeChangeToNoop(v, addrEphOpen);\n      addrBypass = sqlite3VdbeMakeLabel(pParse);\n    }else{\n      if( pPk ){\n        /* Add the PK key for this row to the temporary table */\n        iKey = ++pParse->nMem;\n        nKey = 0;   /* Zero tells OP_Found to use a composite key */\n        sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,\n            sqlite3IndexAffinityStr(pParse->db, pPk), nPk);\n        sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iEphCur, iKey, iPk, nPk);\n      }else{\n        /* Add the rowid of the row to be deleted to the RowSet */\n        nKey = 1;  /* OP_DeferredSeek always uses a single rowid */\n        sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, iKey);\n      }\n      sqlite3WhereEnd(pWInfo);\n    }\n\n    /* Unless this is a view, open cursors for the table we are\n    ** deleting from and all its indices. If this is a view, then the\n    ** only effect this statement has is to fire the INSTEAD OF\n    ** triggers.\n    */\n    if( !isView ){\n      int iAddrOnce = 0;\n      if( eOnePass==ONEPASS_MULTI ){\n        iAddrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n      }\n      testcase( IsVirtual(pTab) );\n      sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, OPFLAG_FORDELETE,\n                                 iTabCur, aToOpen, &iDataCur, &iIdxCur);\n      assert( pPk || IsVirtual(pTab) || iDataCur==iTabCur );\n      assert( pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1 );\n      if( eOnePass==ONEPASS_MULTI ){\n        sqlite3VdbeJumpHereOrPopInst(v, iAddrOnce);\n      }\n    }\n\n    /* Set up a loop over the rowids/primary-keys that were found in the\n    ** where-clause loop above.\n    */\n    if( eOnePass!=ONEPASS_OFF ){\n      assert( nKey==nPk );  /* OP_Found will use an unpacked key */\n      if( !IsVirtual(pTab) && aToOpen[iDataCur-iTabCur] ){\n        assert( pPk!=0 || IsView(pTab) );\n        sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);\n        VdbeCoverage(v);\n      }\n    }else if( pPk ){\n      addrLoop = sqlite3VdbeAddOp1(v, OP_Rewind, iEphCur); VdbeCoverage(v);\n      if( IsVirtual(pTab) ){\n        sqlite3VdbeAddOp3(v, OP_Column, iEphCur, 0, iKey);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_RowData, iEphCur, iKey);\n      }\n      assert( nKey==0 );  /* OP_Found will use a composite key */\n    }else{\n      addrLoop = sqlite3VdbeAddOp3(v, OP_RowSetRead, iRowSet, 0, iKey);\n      VdbeCoverage(v);\n      assert( nKey==1 );\n    }\n\n    /* Delete the row */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( IsVirtual(pTab) ){\n      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);\n      sqlite3VtabMakeWritable(pParse, pTab);\n      assert( eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE );\n      sqlite3MayAbort(pParse);\n      if( eOnePass==ONEPASS_SINGLE ){\n        sqlite3VdbeAddOp1(v, OP_Close, iTabCur);\n        if( sqlite3IsToplevel(pParse) ){\n          pParse->isMultiWrite = 0;\n        }\n      }\n      sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iKey, pVTab, P4_VTAB);\n      sqlite3VdbeChangeP5(v, OE_Abort);\n    }else\n#endif\n    {\n      int count = (pParse->nested==0);    /* True to count changes */\n      sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,\n          iKey, nKey, count, OE_Default, eOnePass, aiCurOnePass[1]);\n    }\n\n    /* End of the loop over all rowids/primary-keys. */\n    if( eOnePass!=ONEPASS_OFF ){\n      sqlite3VdbeResolveLabel(v, addrBypass);\n      sqlite3WhereEnd(pWInfo);\n    }else if( pPk ){\n      sqlite3VdbeAddOp2(v, OP_Next, iEphCur, addrLoop+1); VdbeCoverage(v);\n      sqlite3VdbeJumpHere(v, addrLoop);\n    }else{\n      sqlite3VdbeGoto(v, addrLoop);\n      sqlite3VdbeJumpHere(v, addrLoop);\n    }\n  } /* End non-truncate path */\n\n  /* Update the sqlite_sequence table by storing the content of the\n  ** maximum rowid counter values recorded while inserting into\n  ** autoincrement tables.\n  */\n  if( pParse->nested==0 && pParse->pTriggerTab==0 ){\n    sqlite3AutoincrementEnd(pParse);\n  }\n\n  /* Return the number of rows that were deleted. If this routine is\n  ** generating code because of a call to sqlite3NestedParse(), do not\n  ** invoke the callback function.\n  */\n  if( memCnt ){\n    sqlite3CodeChangeCount(v, memCnt, \"rows deleted\");\n  }\n\ndelete_from_cleanup:\n  sqlite3AuthContextPop(&sContext);\n  sqlite3SrcListDelete(db, pTabList);\n  sqlite3ExprDelete(db, pWhere);\n#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT)\n  sqlite3ExprListDelete(db, pOrderBy);\n  sqlite3ExprDelete(db, pLimit);\n#endif\n  if( aToOpen ) sqlite3DbNNFreeNN(db, aToOpen);\n  return;\n}\n/* Make sure \"isView\" and other macros defined above are undefined. Otherwise\n** they may interfere with compilation of other functions in this file\n** (or in another file, if this file becomes part of the amalgamation).  */\n#ifdef isView\n #undef isView\n#endif\n#ifdef pTrigger\n #undef pTrigger\n#endif\n\n/*\n** This routine generates VDBE code that causes a single row of a\n** single table to be deleted.  Both the original table entry and\n** all indices are removed.\n**\n** Preconditions:\n**\n**   1.  iDataCur is an open cursor on the btree that is the canonical data\n**       store for the table.  (This will be either the table itself,\n**       in the case of a rowid table, or the PRIMARY KEY index in the case\n**       of a WITHOUT ROWID table.)\n**\n**   2.  Read/write cursors for all indices of pTab must be open as\n**       cursor number iIdxCur+i for the i-th index.\n**\n**   3.  The primary key for the row to be deleted must be stored in a\n**       sequence of nPk memory cells starting at iPk.  If nPk==0 that means\n**       that a search record formed from OP_MakeRecord is contained in the\n**       single memory location iPk.\n**\n** eMode:\n**   Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or\n**   ONEPASS_MULTI.  If eMode is not ONEPASS_OFF, then the cursor\n**   iDataCur already points to the row to delete. If eMode is ONEPASS_OFF\n**   then this function must seek iDataCur to the entry identified by iPk\n**   and nPk before reading from it.\n**\n**   If eMode is ONEPASS_MULTI, then this call is being made as part\n**   of a ONEPASS delete that affects multiple rows. In this case, if\n**   iIdxNoSeek is a valid cursor number (>=0) and is not the same as\n**   iDataCur, then its position should be preserved following the delete\n**   operation. Or, if iIdxNoSeek is not a valid cursor number, the\n**   position of iDataCur should be preserved instead.\n**\n** iIdxNoSeek:\n**   If iIdxNoSeek is a valid cursor number (>=0) not equal to iDataCur,\n**   then it identifies an index cursor (from within array of cursors\n**   starting at iIdxCur) that already points to the index entry to be deleted.\n**   Except, this optimization is disabled if there are BEFORE triggers since\n**   the trigger body might have moved the cursor.\n*/\nSQLITE_PRIVATE void sqlite3GenerateRowDelete(\n  Parse *pParse,     /* Parsing context */\n  Table *pTab,       /* Table containing the row to be deleted */\n  Trigger *pTrigger, /* List of triggers to (potentially) fire */\n  int iDataCur,      /* Cursor from which column data is extracted */\n  int iIdxCur,       /* First index cursor */\n  int iPk,           /* First memory cell containing the PRIMARY KEY */\n  i16 nPk,           /* Number of PRIMARY KEY memory cells */\n  u8 count,          /* If non-zero, increment the row change counter */\n  u8 onconf,         /* Default ON CONFLICT policy for triggers */\n  u8 eMode,          /* ONEPASS_OFF, _SINGLE, or _MULTI.  See above */\n  int iIdxNoSeek     /* Cursor number of cursor that does not need seeking */\n){\n  Vdbe *v = pParse->pVdbe;        /* Vdbe */\n  int iOld = 0;                   /* First register in OLD.* array */\n  int iLabel;                     /* Label resolved to end of generated code */\n  u8 opSeek;                      /* Seek opcode */\n\n  /* Vdbe is guaranteed to have been allocated by this stage. */\n  assert( v );\n  VdbeModuleComment((v, \"BEGIN: GenRowDel(%d,%d,%d,%d)\",\n                         iDataCur, iIdxCur, iPk, (int)nPk));\n\n  /* Seek cursor iCur to the row to delete. If this row no longer exists\n  ** (this can happen if a trigger program has already deleted it), do\n  ** not attempt to delete it or fire any DELETE triggers.  */\n  iLabel = sqlite3VdbeMakeLabel(pParse);\n  opSeek = HasRowid(pTab) ? OP_NotExists : OP_NotFound;\n  if( eMode==ONEPASS_OFF ){\n    sqlite3VdbeAddOp4Int(v, opSeek, iDataCur, iLabel, iPk, nPk);\n    VdbeCoverageIf(v, opSeek==OP_NotExists);\n    VdbeCoverageIf(v, opSeek==OP_NotFound);\n  }\n\n  /* If there are any triggers to fire, allocate a range of registers to\n  ** use for the old.* references in the triggers.  */\n  if( sqlite3FkRequired(pParse, pTab, 0, 0) || pTrigger ){\n    u32 mask;                     /* Mask of OLD.* columns in use */\n    int iCol;                     /* Iterator used while populating OLD.* */\n    int addrStart;                /* Start of BEFORE trigger programs */\n\n    /* TODO: Could use temporary registers here. Also could attempt to\n    ** avoid copying the contents of the rowid register.  */\n    mask = sqlite3TriggerColmask(\n        pParse, pTrigger, 0, 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, onconf\n    );\n    mask |= sqlite3FkOldmask(pParse, pTab);\n    iOld = pParse->nMem+1;\n    pParse->nMem += (1 + pTab->nCol);\n\n    /* Populate the OLD.* pseudo-table register array. These values will be\n    ** used by any BEFORE and AFTER triggers that exist.  */\n    sqlite3VdbeAddOp2(v, OP_Copy, iPk, iOld);\n    for(iCol=0; iCol<pTab->nCol; iCol++){\n      testcase( mask!=0xffffffff && iCol==31 );\n      testcase( mask!=0xffffffff && iCol==32 );\n      if( mask==0xffffffff || (iCol<=31 && (mask & MASKBIT32(iCol))!=0) ){\n        int kk = sqlite3TableColumnToStorage(pTab, iCol);\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, iCol, iOld+kk+1);\n      }\n    }\n\n    /* Invoke BEFORE DELETE trigger programs. */\n    addrStart = sqlite3VdbeCurrentAddr(v);\n    sqlite3CodeRowTrigger(pParse, pTrigger,\n        TK_DELETE, 0, TRIGGER_BEFORE, pTab, iOld, onconf, iLabel\n    );\n\n    /* If any BEFORE triggers were coded, then seek the cursor to the\n    ** row to be deleted again. It may be that the BEFORE triggers moved\n    ** the cursor or already deleted the row that the cursor was\n    ** pointing to.\n    **\n    ** Also disable the iIdxNoSeek optimization since the BEFORE trigger\n    ** may have moved that cursor.\n    */\n    if( addrStart<sqlite3VdbeCurrentAddr(v) ){\n      sqlite3VdbeAddOp4Int(v, opSeek, iDataCur, iLabel, iPk, nPk);\n      VdbeCoverageIf(v, opSeek==OP_NotExists);\n      VdbeCoverageIf(v, opSeek==OP_NotFound);\n      testcase( iIdxNoSeek>=0 );\n      iIdxNoSeek = -1;\n    }\n\n    /* Do FK processing. This call checks that any FK constraints that\n    ** refer to this table (i.e. constraints attached to other tables)\n    ** are not violated by deleting this row.  */\n    sqlite3FkCheck(pParse, pTab, iOld, 0, 0, 0);\n  }\n\n  /* Delete the index and table entries. Skip this step if pTab is really\n  ** a view (in which case the only effect of the DELETE statement is to\n  ** fire the INSTEAD OF triggers).\n  **\n  ** If variable 'count' is non-zero, then this OP_Delete instruction should\n  ** invoke the update-hook. The pre-update-hook, on the other hand should\n  ** be invoked unless table pTab is a system table. The difference is that\n  ** the update-hook is not invoked for rows removed by REPLACE, but the\n  ** pre-update-hook is.\n  */\n  if( !IsView(pTab) ){\n    u8 p5 = 0;\n    sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,iIdxNoSeek);\n    sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, (count?OPFLAG_NCHANGE:0));\n    if( pParse->nested==0 || 0==sqlite3_stricmp(pTab->zName, \"sqlite_stat1\") ){\n      sqlite3VdbeAppendP4(v, (char*)pTab, P4_TABLE);\n    }\n    if( eMode!=ONEPASS_OFF ){\n      sqlite3VdbeChangeP5(v, OPFLAG_AUXDELETE);\n    }\n    if( iIdxNoSeek>=0 && iIdxNoSeek!=iDataCur ){\n      sqlite3VdbeAddOp1(v, OP_Delete, iIdxNoSeek);\n    }\n    if( eMode==ONEPASS_MULTI ) p5 |= OPFLAG_SAVEPOSITION;\n    sqlite3VdbeChangeP5(v, p5);\n  }\n\n  /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to\n  ** handle rows (possibly in other tables) that refer via a foreign key\n  ** to the row just deleted. */\n  sqlite3FkActions(pParse, pTab, 0, iOld, 0, 0);\n\n  /* Invoke AFTER DELETE trigger programs. */\n  if( pTrigger ){\n    sqlite3CodeRowTrigger(pParse, pTrigger,\n        TK_DELETE, 0, TRIGGER_AFTER, pTab, iOld, onconf, iLabel\n    );\n  }\n\n  /* Jump here if the row had already been deleted before any BEFORE\n  ** trigger programs were invoked. Or if a trigger program throws a\n  ** RAISE(IGNORE) exception.  */\n  sqlite3VdbeResolveLabel(v, iLabel);\n  VdbeModuleComment((v, \"END: GenRowDel()\"));\n}\n\n/*\n** This routine generates VDBE code that causes the deletion of all\n** index entries associated with a single row of a single table, pTab\n**\n** Preconditions:\n**\n**   1.  A read/write cursor \"iDataCur\" must be open on the canonical storage\n**       btree for the table pTab.  (This will be either the table itself\n**       for rowid tables or to the primary key index for WITHOUT ROWID\n**       tables.)\n**\n**   2.  Read/write cursors for all indices of pTab must be open as\n**       cursor number iIdxCur+i for the i-th index.  (The pTab->pIndex\n**       index is the 0-th index.)\n**\n**   3.  The \"iDataCur\" cursor must be already be positioned on the row\n**       that is to be deleted.\n*/\nSQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(\n  Parse *pParse,     /* Parsing and code generating context */\n  Table *pTab,       /* Table containing the row to be deleted */\n  int iDataCur,      /* Cursor of table holding data. */\n  int iIdxCur,       /* First index cursor */\n  int *aRegIdx,      /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */\n  int iIdxNoSeek     /* Do not delete from this cursor */\n){\n  int i;             /* Index loop counter */\n  int r1 = -1;       /* Register holding an index key */\n  int iPartIdxLabel; /* Jump destination for skipping partial index entries */\n  Index *pIdx;       /* Current index */\n  Index *pPrior = 0; /* Prior index */\n  Vdbe *v;           /* The prepared statement under construction */\n  Index *pPk;        /* PRIMARY KEY index, or NULL for rowid tables */\n\n  v = pParse->pVdbe;\n  pPk = HasRowid(pTab) ? 0 : sqlite3PrimaryKeyIndex(pTab);\n  for(i=0, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){\n    assert( iIdxCur+i!=iDataCur || pPk==pIdx );\n    if( aRegIdx!=0 && aRegIdx[i]==0 ) continue;\n    if( pIdx==pPk ) continue;\n    if( iIdxCur+i==iIdxNoSeek ) continue;\n    VdbeModuleComment((v, \"GenRowIdxDel for %s\", pIdx->zName));\n    r1 = sqlite3GenerateIndexKey(pParse, pIdx, iDataCur, 0, 1,\n        &iPartIdxLabel, pPrior, r1);\n    sqlite3VdbeAddOp3(v, OP_IdxDelete, iIdxCur+i, r1,\n        pIdx->uniqNotNull ? pIdx->nKeyCol : pIdx->nColumn);\n    sqlite3VdbeChangeP5(v, 1);  /* Cause IdxDelete to error if no entry found */\n    sqlite3ResolvePartIdxLabel(pParse, iPartIdxLabel);\n    pPrior = pIdx;\n  }\n}\n\n/*\n** Generate code that will assemble an index key and stores it in register\n** regOut.  The key with be for index pIdx which is an index on pTab.\n** iCur is the index of a cursor open on the pTab table and pointing to\n** the entry that needs indexing.  If pTab is a WITHOUT ROWID table, then\n** iCur must be the cursor of the PRIMARY KEY index.\n**\n** Return a register number which is the first in a block of\n** registers that holds the elements of the index key.  The\n** block of registers has already been deallocated by the time\n** this routine returns.\n**\n** If *piPartIdxLabel is not NULL, fill it in with a label and jump\n** to that label if pIdx is a partial index that should be skipped.\n** The label should be resolved using sqlite3ResolvePartIdxLabel().\n** A partial index should be skipped if its WHERE clause evaluates\n** to false or null.  If pIdx is not a partial index, *piPartIdxLabel\n** will be set to zero which is an empty label that is ignored by\n** sqlite3ResolvePartIdxLabel().\n**\n** The pPrior and regPrior parameters are used to implement a cache to\n** avoid unnecessary register loads.  If pPrior is not NULL, then it is\n** a pointer to a different index for which an index key has just been\n** computed into register regPrior.  If the current pIdx index is generating\n** its key into the same sequence of registers and if pPrior and pIdx share\n** a column in common, then the register corresponding to that column already\n** holds the correct value and the loading of that register is skipped.\n** This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK\n** on a table with multiple indices, and especially with the ROWID or\n** PRIMARY KEY columns of the index.\n*/\nSQLITE_PRIVATE int sqlite3GenerateIndexKey(\n  Parse *pParse,       /* Parsing context */\n  Index *pIdx,         /* The index for which to generate a key */\n  int iDataCur,        /* Cursor number from which to take column data */\n  int regOut,          /* Put the new key into this register if not 0 */\n  int prefixOnly,      /* Compute only a unique prefix of the key */\n  int *piPartIdxLabel, /* OUT: Jump to this label to skip partial index */\n  Index *pPrior,       /* Previously generated index key */\n  int regPrior         /* Register holding previous generated key */\n){\n  Vdbe *v = pParse->pVdbe;\n  int j;\n  int regBase;\n  int nCol;\n\n  if( piPartIdxLabel ){\n    if( pIdx->pPartIdxWhere ){\n      *piPartIdxLabel = sqlite3VdbeMakeLabel(pParse);\n      pParse->iSelfTab = iDataCur + 1;\n      sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, *piPartIdxLabel,\n                            SQLITE_JUMPIFNULL);\n      pParse->iSelfTab = 0;\n      pPrior = 0; /* Ticket a9efb42811fa41ee 2019-11-02;\n                  ** pPartIdxWhere may have corrupted regPrior registers */\n    }else{\n      *piPartIdxLabel = 0;\n    }\n  }\n  nCol = (prefixOnly && pIdx->uniqNotNull) ? pIdx->nKeyCol : pIdx->nColumn;\n  regBase = sqlite3GetTempRange(pParse, nCol);\n  if( pPrior && (regBase!=regPrior || pPrior->pPartIdxWhere) ) pPrior = 0;\n  for(j=0; j<nCol; j++){\n    if( pPrior\n     && pPrior->aiColumn[j]==pIdx->aiColumn[j]\n     && pPrior->aiColumn[j]!=XN_EXPR\n    ){\n      /* This column was already computed by the previous index */\n      continue;\n    }\n    sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iDataCur, j, regBase+j);\n    if( pIdx->aiColumn[j]>=0 ){\n      /* If the column affinity is REAL but the number is an integer, then it\n      ** might be stored in the table as an integer (using a compact\n      ** representation) then converted to REAL by an OP_RealAffinity opcode.\n      ** But we are getting ready to store this value back into an index, where\n      ** it should be converted by to INTEGER again.  So omit the\n      ** OP_RealAffinity opcode if it is present */\n      sqlite3VdbeDeletePriorOpcode(v, OP_RealAffinity);\n    }\n  }\n  if( regOut ){\n    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regOut);\n  }\n  sqlite3ReleaseTempRange(pParse, regBase, nCol);\n  return regBase;\n}\n\n/*\n** If a prior call to sqlite3GenerateIndexKey() generated a jump-over label\n** because it was a partial index, then this routine should be called to\n** resolve that label.\n*/\nSQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse *pParse, int iLabel){\n  if( iLabel ){\n    sqlite3VdbeResolveLabel(pParse->pVdbe, iLabel);\n  }\n}\n\n/************** End of delete.c **********************************************/\n/************** Begin file func.c ********************************************/\n/*\n** 2002 February 23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the C-language implementations for many of the SQL\n** functions of SQLite.  (Some function, and in particular the date and\n** time functions, are implemented separately.)\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdlib.h> */\n/* #include <assert.h> */\n#ifndef SQLITE_OMIT_FLOATING_POINT\n/* #include <math.h> */\n#endif\n/* #include \"vdbeInt.h\" */\n\n/*\n** Return the collating function associated with a function.\n*/\nstatic CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){\n  VdbeOp *pOp;\n  assert( context->pVdbe!=0 );\n  pOp = &context->pVdbe->aOp[context->iOp-1];\n  assert( pOp->opcode==OP_CollSeq );\n  assert( pOp->p4type==P4_COLLSEQ );\n  return pOp->p4.pColl;\n}\n\n/*\n** Indicate that the accumulator load should be skipped on this\n** iteration of the aggregate loop.\n*/\nstatic void sqlite3SkipAccumulatorLoad(sqlite3_context *context){\n  assert( context->isError<=0 );\n  context->isError = -1;\n  context->skipFlag = 1;\n}\n\n/*\n** Implementation of the non-aggregate min() and max() functions\n*/\nstatic void minmaxFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int i;\n  int mask;    /* 0 for min() or 0xffffffff for max() */\n  int iBest;\n  CollSeq *pColl;\n\n  assert( argc>1 );\n  mask = sqlite3_user_data(context)==0 ? 0 : -1;\n  pColl = sqlite3GetFuncCollSeq(context);\n  assert( pColl );\n  assert( mask==-1 || mask==0 );\n  iBest = 0;\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;\n  for(i=1; i<argc; i++){\n    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;\n    if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){\n      testcase( mask==0 );\n      iBest = i;\n    }\n  }\n  sqlite3_result_value(context, argv[iBest]);\n}\n\n/*\n** Return the type of the argument.\n*/\nstatic void typeofFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  static const char *azType[] = { \"integer\", \"real\", \"text\", \"blob\", \"null\" };\n  int i = sqlite3_value_type(argv[0]) - 1;\n  UNUSED_PARAMETER(NotUsed);\n  assert( i>=0 && i<ArraySize(azType) );\n  assert( SQLITE_INTEGER==1 );\n  assert( SQLITE_FLOAT==2 );\n  assert( SQLITE_TEXT==3 );\n  assert( SQLITE_BLOB==4 );\n  assert( SQLITE_NULL==5 );\n  /* EVIDENCE-OF: R-01470-60482 The sqlite3_value_type(V) interface returns\n  ** the datatype code for the initial datatype of the sqlite3_value object\n  ** V. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT,\n  ** SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. */\n  sqlite3_result_text(context, azType[i], -1, SQLITE_STATIC);\n}\n\n/* subtype(X)\n**\n** Return the subtype of X\n*/\nstatic void subtypeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  UNUSED_PARAMETER(argc);\n  sqlite3_result_int(context, sqlite3_value_subtype(argv[0]));\n}\n\n/*\n** Implementation of the length() function\n*/\nstatic void lengthFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  switch( sqlite3_value_type(argv[0]) ){\n    case SQLITE_BLOB:\n    case SQLITE_INTEGER:\n    case SQLITE_FLOAT: {\n      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));\n      break;\n    }\n    case SQLITE_TEXT: {\n      const unsigned char *z = sqlite3_value_text(argv[0]);\n      const unsigned char *z0;\n      unsigned char c;\n      if( z==0 ) return;\n      z0 = z;\n      while( (c = *z)!=0 ){\n        z++;\n        if( c>=0xc0 ){\n          while( (*z & 0xc0)==0x80 ){ z++; z0++; }\n        }\n      }\n      sqlite3_result_int(context, (int)(z-z0));\n      break;\n    }\n    default: {\n      sqlite3_result_null(context);\n      break;\n    }\n  }\n}\n\n/*\n** Implementation of the octet_length() function\n*/\nstatic void bytelengthFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  switch( sqlite3_value_type(argv[0]) ){\n    case SQLITE_BLOB: {\n      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));\n      break;\n    }\n    case SQLITE_INTEGER:\n    case SQLITE_FLOAT: {\n      i64 m = sqlite3_context_db_handle(context)->enc<=SQLITE_UTF8 ? 1 : 2;\n      sqlite3_result_int64(context, sqlite3_value_bytes(argv[0])*m);\n      break;\n    }\n    case SQLITE_TEXT: {\n      if( sqlite3_value_encoding(argv[0])<=SQLITE_UTF8 ){\n        sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));\n      }else{\n        sqlite3_result_int(context, sqlite3_value_bytes16(argv[0]));\n      }\n      break;\n    }\n    default: {\n      sqlite3_result_null(context);\n      break;\n    }\n  }\n}\n\n/*\n** Implementation of the abs() function.\n**\n** IMP: R-23979-26855 The abs(X) function returns the absolute value of\n** the numeric argument X.\n*/\nstatic void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  switch( sqlite3_value_type(argv[0]) ){\n    case SQLITE_INTEGER: {\n      i64 iVal = sqlite3_value_int64(argv[0]);\n      if( iVal<0 ){\n        if( iVal==SMALLEST_INT64 ){\n          /* IMP: R-31676-45509 If X is the integer -9223372036854775808\n          ** then abs(X) throws an integer overflow error since there is no\n          ** equivalent positive 64-bit two complement value. */\n          sqlite3_result_error(context, \"integer overflow\", -1);\n          return;\n        }\n        iVal = -iVal;\n      }\n      sqlite3_result_int64(context, iVal);\n      break;\n    }\n    case SQLITE_NULL: {\n      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */\n      sqlite3_result_null(context);\n      break;\n    }\n    default: {\n      /* Because sqlite3_value_double() returns 0.0 if the argument is not\n      ** something that can be converted into a number, we have:\n      ** IMP: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob\n      ** that cannot be converted to a numeric value.\n      */\n      double rVal = sqlite3_value_double(argv[0]);\n      if( rVal<0 ) rVal = -rVal;\n      sqlite3_result_double(context, rVal);\n      break;\n    }\n  }\n}\n\n/*\n** Implementation of the instr() function.\n**\n** instr(haystack,needle) finds the first occurrence of needle\n** in haystack and returns the number of previous characters plus 1,\n** or 0 if needle does not occur within haystack.\n**\n** If both haystack and needle are BLOBs, then the result is one more than\n** the number of bytes in haystack prior to the first occurrence of needle,\n** or 0 if needle never occurs in haystack.\n*/\nstatic void instrFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *zHaystack;\n  const unsigned char *zNeedle;\n  int nHaystack;\n  int nNeedle;\n  int typeHaystack, typeNeedle;\n  int N = 1;\n  int isText;\n  unsigned char firstChar;\n  sqlite3_value *pC1 = 0;\n  sqlite3_value *pC2 = 0;\n\n  UNUSED_PARAMETER(argc);\n  typeHaystack = sqlite3_value_type(argv[0]);\n  typeNeedle = sqlite3_value_type(argv[1]);\n  if( typeHaystack==SQLITE_NULL || typeNeedle==SQLITE_NULL ) return;\n  nHaystack = sqlite3_value_bytes(argv[0]);\n  nNeedle = sqlite3_value_bytes(argv[1]);\n  if( nNeedle>0 ){\n    if( typeHaystack==SQLITE_BLOB && typeNeedle==SQLITE_BLOB ){\n      zHaystack = sqlite3_value_blob(argv[0]);\n      zNeedle = sqlite3_value_blob(argv[1]);\n      isText = 0;\n    }else if( typeHaystack!=SQLITE_BLOB && typeNeedle!=SQLITE_BLOB ){\n      zHaystack = sqlite3_value_text(argv[0]);\n      zNeedle = sqlite3_value_text(argv[1]);\n      isText = 1;\n    }else{\n      pC1 = sqlite3_value_dup(argv[0]);\n      zHaystack = sqlite3_value_text(pC1);\n      if( zHaystack==0 ) goto endInstrOOM;\n      nHaystack = sqlite3_value_bytes(pC1);\n      pC2 = sqlite3_value_dup(argv[1]);\n      zNeedle = sqlite3_value_text(pC2);\n      if( zNeedle==0 ) goto endInstrOOM;\n      nNeedle = sqlite3_value_bytes(pC2);\n      isText = 1;\n    }\n    if( zNeedle==0 || (nHaystack && zHaystack==0) ) goto endInstrOOM;\n    firstChar = zNeedle[0];\n    while( nNeedle<=nHaystack\n       && (zHaystack[0]!=firstChar || memcmp(zHaystack, zNeedle, nNeedle)!=0)\n    ){\n      N++;\n      do{\n        nHaystack--;\n        zHaystack++;\n      }while( isText && (zHaystack[0]&0xc0)==0x80 );\n    }\n    if( nNeedle>nHaystack ) N = 0;\n  }\n  sqlite3_result_int(context, N);\nendInstr:\n  sqlite3_value_free(pC1);\n  sqlite3_value_free(pC2);\n  return;\nendInstrOOM:\n  sqlite3_result_error_nomem(context);\n  goto endInstr;\n}\n\n/*\n** Implementation of the printf() (a.k.a. format()) SQL function.\n*/\nstatic void printfFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  PrintfArguments x;\n  StrAccum str;\n  const char *zFormat;\n  int n;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n\n  if( argc>=1 && (zFormat = (const char*)sqlite3_value_text(argv[0]))!=0 ){\n    x.nArg = argc-1;\n    x.nUsed = 0;\n    x.apArg = argv+1;\n    sqlite3StrAccumInit(&str, db, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);\n    str.printfFlags = SQLITE_PRINTF_SQLFUNC;\n    sqlite3_str_appendf(&str, zFormat, &x);\n    n = str.nChar;\n    sqlite3_result_text(context, sqlite3StrAccumFinish(&str), n,\n                        SQLITE_DYNAMIC);\n  }\n}\n\n/*\n** Implementation of the substr() function.\n**\n** substr(x,p1,p2)  returns p2 characters of x[] beginning with p1.\n** p1 is 1-indexed.  So substr(x,1,1) returns the first character\n** of x.  If x is text, then we actually count UTF-8 characters.\n** If x is a blob, then we count bytes.\n**\n** If p1 is negative, then we begin abs(p1) from the end of x[].\n**\n** If p2 is negative, return the p2 characters preceding p1.\n*/\nstatic void substrFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *z;\n  const unsigned char *z2;\n  int len;\n  int p0type;\n  i64 p1, p2;\n\n  assert( argc==3 || argc==2 );\n  p0type = sqlite3_value_type(argv[0]);\n  p1 = sqlite3_value_int64(argv[1]);\n  if( p0type==SQLITE_BLOB ){\n    len = sqlite3_value_bytes(argv[0]);\n    z = sqlite3_value_blob(argv[0]);\n    if( z==0 ) return;\n    assert( len==sqlite3_value_bytes(argv[0]) );\n  }else{\n    z = sqlite3_value_text(argv[0]);\n    if( z==0 ) return;\n    len = 0;\n    if( p1<0 ){\n      for(z2=z; *z2; len++){\n        SQLITE_SKIP_UTF8(z2);\n      }\n    }\n  }\n  if( argc==3 ){\n    p2 = sqlite3_value_int64(argv[2]);\n    if( p2==0 && sqlite3_value_type(argv[2])==SQLITE_NULL ) return;\n  }else{\n    p2 = sqlite3_context_db_handle(context)->aLimit[SQLITE_LIMIT_LENGTH];\n  }\n  if( p1==0 ){\n#ifdef SQLITE_SUBSTR_COMPATIBILITY\n    /* If SUBSTR_COMPATIBILITY is defined then substr(X,0,N) work the same as\n    ** as substr(X,1,N) - it returns the first N characters of X.  This\n    ** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8]\n    ** from 2009-02-02 for compatibility of applications that exploited the\n    ** old buggy behavior. */\n    p1 = 1; /* <rdar://problem/6778339> */\n#endif\n    if( sqlite3_value_type(argv[1])==SQLITE_NULL ) return;\n  }\n  if( p1<0 ){\n    p1 += len;\n    if( p1<0 ){\n      if( p2<0 ){\n        p2 = 0;\n      }else{\n        p2 += p1;\n      }\n      p1 = 0;\n    }\n  }else if( p1>0 ){\n    p1--;\n  }else if( p2>0 ){\n    p2--;\n  }\n  if( p2<0 ){\n    if( p2<-p1 ){\n      p2 = p1;\n    }else{\n      p2 = -p2;\n    }\n    p1 -= p2;\n  }\n  assert( p1>=0 && p2>=0 );\n  if( p0type!=SQLITE_BLOB ){\n    while( *z && p1 ){\n      SQLITE_SKIP_UTF8(z);\n      p1--;\n    }\n    for(z2=z; *z2 && p2; p2--){\n      SQLITE_SKIP_UTF8(z2);\n    }\n    sqlite3_result_text64(context, (char*)z, z2-z, SQLITE_TRANSIENT,\n                          SQLITE_UTF8);\n  }else{\n    if( p1>=len ){\n      p1 = p2 = 0;\n    }else if( p2>len-p1 ){\n      p2 = len-p1;\n      assert( p2>0 );\n    }\n    sqlite3_result_blob64(context, (char*)&z[p1], (u64)p2, SQLITE_TRANSIENT);\n  }\n}\n\n/*\n** Implementation of the round() function\n*/\n#ifndef SQLITE_OMIT_FLOATING_POINT\nstatic void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){\n  i64 n = 0;\n  double r;\n  char *zBuf;\n  assert( argc==1 || argc==2 );\n  if( argc==2 ){\n    if( SQLITE_NULL==sqlite3_value_type(argv[1]) ) return;\n    n = sqlite3_value_int64(argv[1]);\n    if( n>30 ) n = 30;\n    if( n<0 ) n = 0;\n  }\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;\n  r = sqlite3_value_double(argv[0]);\n  /* If Y==0 and X will fit in a 64-bit int,\n  ** handle the rounding directly,\n  ** otherwise use printf.\n  */\n  if( r<-4503599627370496.0 || r>+4503599627370496.0 ){\n    /* The value has no fractional part so there is nothing to round */\n  }else if( n==0 ){\n    r = (double)((sqlite_int64)(r+(r<0?-0.5:+0.5)));\n  }else{\n    zBuf = sqlite3_mprintf(\"%!.*f\",(int)n,r);\n    if( zBuf==0 ){\n      sqlite3_result_error_nomem(context);\n      return;\n    }\n    sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);\n    sqlite3_free(zBuf);\n  }\n  sqlite3_result_double(context, r);\n}\n#endif\n\n/*\n** Allocate nByte bytes of space using sqlite3Malloc(). If the\n** allocation fails, call sqlite3_result_error_nomem() to notify\n** the database handle that malloc() has failed and return NULL.\n** If nByte is larger than the maximum string or blob length, then\n** raise an SQLITE_TOOBIG exception and return NULL.\n*/\nstatic void *contextMalloc(sqlite3_context *context, i64 nByte){\n  char *z;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  assert( nByte>0 );\n  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );\n  testcase( nByte==(i64)db->aLimit[SQLITE_LIMIT_LENGTH]+1 );\n  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n    sqlite3_result_error_toobig(context);\n    z = 0;\n  }else{\n    z = sqlite3Malloc(nByte);\n    if( !z ){\n      sqlite3_result_error_nomem(context);\n    }\n  }\n  return z;\n}\n\n/*\n** Implementation of the upper() and lower() SQL functions.\n*/\nstatic void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){\n  char *z1;\n  const char *z2;\n  int i, n;\n  UNUSED_PARAMETER(argc);\n  z2 = (char*)sqlite3_value_text(argv[0]);\n  n = sqlite3_value_bytes(argv[0]);\n  /* Verify that the call to _bytes() does not invalidate the _text() pointer */\n  assert( z2==(char*)sqlite3_value_text(argv[0]) );\n  if( z2 ){\n    z1 = contextMalloc(context, ((i64)n)+1);\n    if( z1 ){\n      for(i=0; i<n; i++){\n        z1[i] = (char)sqlite3Toupper(z2[i]);\n      }\n      sqlite3_result_text(context, z1, n, sqlite3_free);\n    }\n  }\n}\nstatic void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){\n  char *z1;\n  const char *z2;\n  int i, n;\n  UNUSED_PARAMETER(argc);\n  z2 = (char*)sqlite3_value_text(argv[0]);\n  n = sqlite3_value_bytes(argv[0]);\n  /* Verify that the call to _bytes() does not invalidate the _text() pointer */\n  assert( z2==(char*)sqlite3_value_text(argv[0]) );\n  if( z2 ){\n    z1 = contextMalloc(context, ((i64)n)+1);\n    if( z1 ){\n      for(i=0; i<n; i++){\n        z1[i] = sqlite3Tolower(z2[i]);\n      }\n      sqlite3_result_text(context, z1, n, sqlite3_free);\n    }\n  }\n}\n\n/*\n** Some functions like COALESCE() and IFNULL() and UNLIKELY() are implemented\n** as VDBE code so that unused argument values do not have to be computed.\n** However, we still need some kind of function implementation for this\n** routines in the function table.  The noopFunc macro provides this.\n** noopFunc will never be called so it doesn't matter what the implementation\n** is.  We might as well use the \"version()\" function as a substitute.\n*/\n#define noopFunc versionFunc   /* Substitute function - never called */\n\n/*\n** Implementation of random().  Return a random integer.\n*/\nstatic void randomFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  sqlite_int64 r;\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  sqlite3_randomness(sizeof(r), &r);\n  if( r<0 ){\n    /* We need to prevent a random number of 0x8000000000000000\n    ** (or -9223372036854775808) since when you do abs() of that\n    ** number of you get the same value back again.  To do this\n    ** in a way that is testable, mask the sign bit off of negative\n    ** values, resulting in a positive value.  Then take the\n    ** 2s complement of that positive value.  The end result can\n    ** therefore be no less than -9223372036854775807.\n    */\n    r = -(r & LARGEST_INT64);\n  }\n  sqlite3_result_int64(context, r);\n}\n\n/*\n** Implementation of randomblob(N).  Return a random blob\n** that is N bytes long.\n*/\nstatic void randomBlob(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  sqlite3_int64 n;\n  unsigned char *p;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  n = sqlite3_value_int64(argv[0]);\n  if( n<1 ){\n    n = 1;\n  }\n  p = contextMalloc(context, n);\n  if( p ){\n    sqlite3_randomness(n, p);\n    sqlite3_result_blob(context, (char*)p, n, sqlite3_free);\n  }\n}\n\n/*\n** Implementation of the last_insert_rowid() SQL function.  The return\n** value is the same as the sqlite3_last_insert_rowid() API function.\n*/\nstatic void last_insert_rowid(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a\n  ** wrapper around the sqlite3_last_insert_rowid() C/C++ interface\n  ** function. */\n  sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));\n}\n\n/*\n** Implementation of the changes() SQL function.\n**\n** IMP: R-32760-32347 The changes() SQL function is a wrapper\n** around the sqlite3_changes64() C/C++ function and hence follows the\n** same rules for counting changes.\n*/\nstatic void changes(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  sqlite3_result_int64(context, sqlite3_changes64(db));\n}\n\n/*\n** Implementation of the total_changes() SQL function.  The return value is\n** the same as the sqlite3_total_changes64() API function.\n*/\nstatic void total_changes(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  /* IMP: R-11217-42568 This function is a wrapper around the\n  ** sqlite3_total_changes64() C/C++ interface. */\n  sqlite3_result_int64(context, sqlite3_total_changes64(db));\n}\n\n/*\n** A structure defining how to do GLOB-style comparisons.\n*/\nstruct compareInfo {\n  u8 matchAll;          /* \"*\" or \"%\" */\n  u8 matchOne;          /* \"?\" or \"_\" */\n  u8 matchSet;          /* \"[\" or 0 */\n  u8 noCase;            /* true to ignore case differences */\n};\n\n/*\n** For LIKE and GLOB matching on EBCDIC machines, assume that every\n** character is exactly one byte in size.  Also, provide the Utf8Read()\n** macro for fast reading of the next character in the common case where\n** the next character is ASCII.\n*/\n#if defined(SQLITE_EBCDIC)\n# define sqlite3Utf8Read(A)        (*((*A)++))\n# define Utf8Read(A)               (*(A++))\n#else\n# define Utf8Read(A)               (A[0]<0x80?*(A++):sqlite3Utf8Read(&A))\n#endif\n\nstatic const struct compareInfo globInfo = { '*', '?', '[', 0 };\n/* The correct SQL-92 behavior is for the LIKE operator to ignore\n** case.  Thus  'a' LIKE 'A' would be true. */\nstatic const struct compareInfo likeInfoNorm = { '%', '_',   0, 1 };\n/* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator\n** is case sensitive causing 'a' LIKE 'A' to be false */\nstatic const struct compareInfo likeInfoAlt = { '%', '_',   0, 0 };\n\n/*\n** Possible error returns from patternMatch()\n*/\n#define SQLITE_MATCH             0\n#define SQLITE_NOMATCH           1\n#define SQLITE_NOWILDCARDMATCH   2\n\n/*\n** Compare two UTF-8 strings for equality where the first string is\n** a GLOB or LIKE expression.  Return values:\n**\n**    SQLITE_MATCH:            Match\n**    SQLITE_NOMATCH:          No match\n**    SQLITE_NOWILDCARDMATCH:  No match in spite of having * or % wildcards.\n**\n** Globbing rules:\n**\n**      '*'       Matches any sequence of zero or more characters.\n**\n**      '?'       Matches exactly one character.\n**\n**     [...]      Matches one character from the enclosed list of\n**                characters.\n**\n**     [^...]     Matches one character not in the enclosed list.\n**\n** With the [...] and [^...] matching, a ']' character can be included\n** in the list by making it the first character after '[' or '^'.  A\n** range of characters can be specified using '-'.  Example:\n** \"[a-z]\" matches any single lower-case letter.  To match a '-', make\n** it the last character in the list.\n**\n** Like matching rules:\n**\n**      '%'       Matches any sequence of zero or more characters\n**\n***     '_'       Matches any one character\n**\n**      Ec        Where E is the \"esc\" character and c is any other\n**                character, including '%', '_', and esc, match exactly c.\n**\n** The comments within this routine usually assume glob matching.\n**\n** This routine is usually quick, but can be N**2 in the worst case.\n*/\nstatic int patternCompare(\n  const u8 *zPattern,              /* The glob pattern */\n  const u8 *zString,               /* The string to compare against the glob */\n  const struct compareInfo *pInfo, /* Information about how to do the compare */\n  u32 matchOther                   /* The escape char (LIKE) or '[' (GLOB) */\n){\n  u32 c, c2;                       /* Next pattern and input string chars */\n  u32 matchOne = pInfo->matchOne;  /* \"?\" or \"_\" */\n  u32 matchAll = pInfo->matchAll;  /* \"*\" or \"%\" */\n  u8 noCase = pInfo->noCase;       /* True if uppercase==lowercase */\n  const u8 *zEscaped = 0;          /* One past the last escaped input char */\n\n  while( (c = Utf8Read(zPattern))!=0 ){\n    if( c==matchAll ){  /* Match \"*\" */\n      /* Skip over multiple \"*\" characters in the pattern.  If there\n      ** are also \"?\" characters, skip those as well, but consume a\n      ** single character of the input string for each \"?\" skipped */\n      while( (c=Utf8Read(zPattern)) == matchAll\n             || (c == matchOne && matchOne!=0) ){\n        if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){\n          return SQLITE_NOWILDCARDMATCH;\n        }\n      }\n      if( c==0 ){\n        return SQLITE_MATCH;   /* \"*\" at the end of the pattern matches */\n      }else if( c==matchOther ){\n        if( pInfo->matchSet==0 ){\n          c = sqlite3Utf8Read(&zPattern);\n          if( c==0 ) return SQLITE_NOWILDCARDMATCH;\n        }else{\n          /* \"[...]\" immediately follows the \"*\".  We have to do a slow\n          ** recursive search in this case, but it is an unusual case. */\n          assert( matchOther<0x80 );  /* '[' is a single-byte character */\n          while( *zString ){\n            int bMatch = patternCompare(&zPattern[-1],zString,pInfo,matchOther);\n            if( bMatch!=SQLITE_NOMATCH ) return bMatch;\n            SQLITE_SKIP_UTF8(zString);\n          }\n          return SQLITE_NOWILDCARDMATCH;\n        }\n      }\n\n      /* At this point variable c contains the first character of the\n      ** pattern string past the \"*\".  Search in the input string for the\n      ** first matching character and recursively continue the match from\n      ** that point.\n      **\n      ** For a case-insensitive search, set variable cx to be the same as\n      ** c but in the other case and search the input string for either\n      ** c or cx.\n      */\n      if( c<0x80 ){\n        char zStop[3];\n        int bMatch;\n        if( noCase ){\n          zStop[0] = sqlite3Toupper(c);\n          zStop[1] = sqlite3Tolower(c);\n          zStop[2] = 0;\n        }else{\n          zStop[0] = c;\n          zStop[1] = 0;\n        }\n        while(1){\n          zString += strcspn((const char*)zString, zStop);\n          if( zString[0]==0 ) break;\n          zString++;\n          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);\n          if( bMatch!=SQLITE_NOMATCH ) return bMatch;\n        }\n      }else{\n        int bMatch;\n        while( (c2 = Utf8Read(zString))!=0 ){\n          if( c2!=c ) continue;\n          bMatch = patternCompare(zPattern,zString,pInfo,matchOther);\n          if( bMatch!=SQLITE_NOMATCH ) return bMatch;\n        }\n      }\n      return SQLITE_NOWILDCARDMATCH;\n    }\n    if( c==matchOther ){\n      if( pInfo->matchSet==0 ){\n        c = sqlite3Utf8Read(&zPattern);\n        if( c==0 ) return SQLITE_NOMATCH;\n        zEscaped = zPattern;\n      }else{\n        u32 prior_c = 0;\n        int seen = 0;\n        int invert = 0;\n        c = sqlite3Utf8Read(&zString);\n        if( c==0 ) return SQLITE_NOMATCH;\n        c2 = sqlite3Utf8Read(&zPattern);\n        if( c2=='^' ){\n          invert = 1;\n          c2 = sqlite3Utf8Read(&zPattern);\n        }\n        if( c2==']' ){\n          if( c==']' ) seen = 1;\n          c2 = sqlite3Utf8Read(&zPattern);\n        }\n        while( c2 && c2!=']' ){\n          if( c2=='-' && zPattern[0]!=']' && zPattern[0]!=0 && prior_c>0 ){\n            c2 = sqlite3Utf8Read(&zPattern);\n            if( c>=prior_c && c<=c2 ) seen = 1;\n            prior_c = 0;\n          }else{\n            if( c==c2 ){\n              seen = 1;\n            }\n            prior_c = c2;\n          }\n          c2 = sqlite3Utf8Read(&zPattern);\n        }\n        if( c2==0 || (seen ^ invert)==0 ){\n          return SQLITE_NOMATCH;\n        }\n        continue;\n      }\n    }\n    c2 = Utf8Read(zString);\n    if( c==c2 ) continue;\n    if( noCase  && sqlite3Tolower(c)==sqlite3Tolower(c2) && c<0x80 && c2<0x80 ){\n      continue;\n    }\n    if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;\n    return SQLITE_NOMATCH;\n  }\n  return *zString==0 ? SQLITE_MATCH : SQLITE_NOMATCH;\n}\n\n/*\n** The sqlite3_strglob() interface.  Return 0 on a match (like strcmp()) and\n** non-zero if there is no match.\n*/\nSQLITE_API int sqlite3_strglob(const char *zGlobPattern, const char *zString){\n  if( zString==0 ){\n    return zGlobPattern!=0;\n  }else if( zGlobPattern==0 ){\n    return 1;\n  }else {\n    return patternCompare((u8*)zGlobPattern, (u8*)zString, &globInfo, '[');\n  }\n}\n\n/*\n** The sqlite3_strlike() interface.  Return 0 on a match and non-zero for\n** a miss - like strcmp().\n*/\nSQLITE_API int sqlite3_strlike(const char *zPattern, const char *zStr, unsigned int esc){\n  if( zStr==0 ){\n    return zPattern!=0;\n  }else if( zPattern==0 ){\n    return 1;\n  }else{\n    return patternCompare((u8*)zPattern, (u8*)zStr, &likeInfoNorm, esc);\n  }\n}\n\n/*\n** Count the number of times that the LIKE operator (or GLOB which is\n** just a variation of LIKE) gets called.  This is used for testing\n** only.\n*/\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_like_count = 0;\n#endif\n\n\n/*\n** Implementation of the like() SQL function.  This function implements\n** the built-in LIKE operator.  The first argument to the function is the\n** pattern and the second argument is the string.  So, the SQL statements:\n**\n**       A LIKE B\n**\n** is implemented as like(B,A).\n**\n** This same function (with a different compareInfo structure) computes\n** the GLOB operator.\n*/\nstatic void likeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *zA, *zB;\n  u32 escape;\n  int nPat;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  struct compareInfo *pInfo = sqlite3_user_data(context);\n  struct compareInfo backupInfo;\n\n#ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n  if( sqlite3_value_type(argv[0])==SQLITE_BLOB\n   || sqlite3_value_type(argv[1])==SQLITE_BLOB\n  ){\n#ifdef SQLITE_TEST\n    sqlite3_like_count++;\n#endif\n    sqlite3_result_int(context, 0);\n    return;\n  }\n#endif\n\n  /* Limit the length of the LIKE or GLOB pattern to avoid problems\n  ** of deep recursion and N*N behavior in patternCompare().\n  */\n  nPat = sqlite3_value_bytes(argv[0]);\n  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] );\n  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]+1 );\n  if( nPat > db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] ){\n    sqlite3_result_error(context, \"LIKE or GLOB pattern too complex\", -1);\n    return;\n  }\n  if( argc==3 ){\n    /* The escape character string must consist of a single UTF-8 character.\n    ** Otherwise, return an error.\n    */\n    const unsigned char *zEsc = sqlite3_value_text(argv[2]);\n    if( zEsc==0 ) return;\n    if( sqlite3Utf8CharLen((char*)zEsc, -1)!=1 ){\n      sqlite3_result_error(context,\n          \"ESCAPE expression must be a single character\", -1);\n      return;\n    }\n    escape = sqlite3Utf8Read(&zEsc);\n    if( escape==pInfo->matchAll || escape==pInfo->matchOne ){\n      memcpy(&backupInfo, pInfo, sizeof(backupInfo));\n      pInfo = &backupInfo;\n      if( escape==pInfo->matchAll ) pInfo->matchAll = 0;\n      if( escape==pInfo->matchOne ) pInfo->matchOne = 0;\n    }\n  }else{\n    escape = pInfo->matchSet;\n  }\n  zB = sqlite3_value_text(argv[0]);\n  zA = sqlite3_value_text(argv[1]);\n  if( zA && zB ){\n#ifdef SQLITE_TEST\n    sqlite3_like_count++;\n#endif\n    sqlite3_result_int(context,\n                      patternCompare(zB, zA, pInfo, escape)==SQLITE_MATCH);\n  }\n}\n\n/*\n** Implementation of the NULLIF(x,y) function.  The result is the first\n** argument if the arguments are different.  The result is NULL if the\n** arguments are equal to each other.\n*/\nstatic void nullifFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  CollSeq *pColl = sqlite3GetFuncCollSeq(context);\n  UNUSED_PARAMETER(NotUsed);\n  if( sqlite3MemCompare(argv[0], argv[1], pColl)!=0 ){\n    sqlite3_result_value(context, argv[0]);\n  }\n}\n\n/*\n** Implementation of the sqlite_version() function.  The result is the version\n** of the SQLite library that is running.\n*/\nstatic void versionFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  /* IMP: R-48699-48617 This function is an SQL wrapper around the\n  ** sqlite3_libversion() C-interface. */\n  sqlite3_result_text(context, sqlite3_libversion(), -1, SQLITE_STATIC);\n}\n\n/*\n** Implementation of the sqlite_source_id() function. The result is a string\n** that identifies the particular version of the source code used to build\n** SQLite.\n*/\nstatic void sourceidFunc(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **NotUsed2\n){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  /* IMP: R-24470-31136 This function is an SQL wrapper around the\n  ** sqlite3_sourceid() C interface. */\n  sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC);\n}\n\n/*\n** Implementation of the sqlite_log() function.  This is a wrapper around\n** sqlite3_log().  The return value is NULL.  The function exists purely for\n** its side-effects.\n*/\nstatic void errlogFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(context);\n  sqlite3_log(sqlite3_value_int(argv[0]), \"%s\", sqlite3_value_text(argv[1]));\n}\n\n/*\n** Implementation of the sqlite_compileoption_used() function.\n** The result is an integer that identifies if the compiler option\n** was used to build SQLite.\n*/\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\nstatic void compileoptionusedFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const char *zOptName;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  /* IMP: R-39564-36305 The sqlite_compileoption_used() SQL\n  ** function is a wrapper around the sqlite3_compileoption_used() C/C++\n  ** function.\n  */\n  if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){\n    sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));\n  }\n}\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n\n/*\n** Implementation of the sqlite_compileoption_get() function.\n** The result is a string that identifies the compiler options\n** used to build SQLite.\n*/\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\nstatic void compileoptiongetFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int n;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  /* IMP: R-04922-24076 The sqlite_compileoption_get() SQL function\n  ** is a wrapper around the sqlite3_compileoption_get() C/C++ function.\n  */\n  n = sqlite3_value_int(argv[0]);\n  sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC);\n}\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n\n/* Array for converting from half-bytes (nybbles) into ASCII hex\n** digits. */\nstatic const char hexdigits[] = {\n  '0', '1', '2', '3', '4', '5', '6', '7',\n  '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'\n};\n\n/*\n** Append to pStr text that is the SQL literal representation of the\n** value contained in pValue.\n*/\nSQLITE_PRIVATE void sqlite3QuoteValue(StrAccum *pStr, sqlite3_value *pValue, int bEscape){\n  /* As currently implemented, the string must be initially empty.\n  ** we might relax this requirement in the future, but that will\n  ** require enhancements to the implementation. */\n  assert( pStr!=0 && pStr->nChar==0 );\n\n  switch( sqlite3_value_type(pValue) ){\n    case SQLITE_FLOAT: {\n      double r1, r2;\n      const char *zVal;\n      r1 = sqlite3_value_double(pValue);\n      sqlite3_str_appendf(pStr, \"%!0.15g\", r1);\n      zVal = sqlite3_str_value(pStr);\n      if( zVal ){\n        sqlite3AtoF(zVal, &r2, pStr->nChar, SQLITE_UTF8);\n        if( r1!=r2 ){\n          sqlite3_str_reset(pStr);\n          sqlite3_str_appendf(pStr, \"%!0.20e\", r1);\n        }\n      }\n      break;\n    }\n    case SQLITE_INTEGER: {\n      sqlite3_str_appendf(pStr, \"%lld\", sqlite3_value_int64(pValue));\n      break;\n    }\n    case SQLITE_BLOB: {\n      char const *zBlob = sqlite3_value_blob(pValue);\n      i64 nBlob = sqlite3_value_bytes(pValue);\n      assert( zBlob==sqlite3_value_blob(pValue) ); /* No encoding change */\n      sqlite3StrAccumEnlarge(pStr, nBlob*2 + 4);\n      if( pStr->accError==0 ){\n        char *zText = pStr->zText;\n        int i;\n        for(i=0; i<nBlob; i++){\n          zText[(i*2)+2] = hexdigits[(zBlob[i]>>4)&0x0F];\n          zText[(i*2)+3] = hexdigits[(zBlob[i])&0x0F];\n        }\n        zText[(nBlob*2)+2] = '\\'';\n        zText[(nBlob*2)+3] = '\\0';\n        zText[0] = 'X';\n        zText[1] = '\\'';\n        pStr->nChar = nBlob*2 + 3;\n      }\n      break;\n    }\n    case SQLITE_TEXT: {\n      const unsigned char *zArg = sqlite3_value_text(pValue);\n      sqlite3_str_appendf(pStr, bEscape ? \"%#Q\" : \"%Q\", zArg);\n      break;\n    }\n    default: {\n      assert( sqlite3_value_type(pValue)==SQLITE_NULL );\n      sqlite3_str_append(pStr, \"NULL\", 4);\n      break;\n    }\n  }\n}\n\n/*\n** Return true if z[] begins with N hexadecimal digits, and write\n** a decoding of those digits into *pVal.  Or return false if any\n** one of the first N characters in z[] is not a hexadecimal digit.\n*/\nstatic int isNHex(const char *z, int N, u32 *pVal){\n  int i;\n  u32 v = 0;\n  for(i=0; i<N; i++){\n    if( !sqlite3Isxdigit(z[i]) ) return 0;\n    v = (v<<4) + sqlite3HexToInt(z[i]);\n  }\n  *pVal = v;\n  return 1;\n}\n\n/*\n** Implementation of the UNISTR() function.\n**\n** This is intended to be a work-alike of the UNISTR() function in\n** PostgreSQL.  Quoting from the PG documentation (PostgreSQL 17 -\n** scraped on 2025-02-22):\n**\n**    Evaluate escaped Unicode characters in the argument. Unicode\n**    characters can be specified as \\XXXX (4 hexadecimal digits),\n**    \\+XXXXXX (6 hexadecimal digits), \\uXXXX (4 hexadecimal digits),\n**    or \\UXXXXXXXX (8 hexadecimal digits). To specify a backslash,\n**    write two backslashes. All other characters are taken literally.\n*/\nstatic void unistrFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  char *zOut;\n  const char *zIn;\n  int nIn;\n  int i, j, n;\n  u32 v;\n\n  assert( argc==1 );\n  UNUSED_PARAMETER( argc );\n  zIn = (const char*)sqlite3_value_text(argv[0]);\n  if( zIn==0 ) return;\n  nIn = sqlite3_value_bytes(argv[0]);\n  zOut = sqlite3_malloc64(nIn+1);\n  if( zOut==0 ){\n    sqlite3_result_error_nomem(context);\n    return;\n  }\n  i = j = 0;\n  while( i<nIn ){\n    char *z = strchr(&zIn[i],'\\\\');\n    if( z==0 ){\n      n = nIn - i;\n      memmove(&zOut[j], &zIn[i], n);\n      j += n;\n      break;\n    }\n    n = z - &zIn[i];\n    if( n>0 ){\n      memmove(&zOut[j], &zIn[i], n);\n      j += n;\n      i += n;\n    }\n    if( zIn[i+1]=='\\\\' ){\n      i += 2;\n      zOut[j++] = '\\\\';\n    }else if( sqlite3Isxdigit(zIn[i+1]) ){\n      if( !isNHex(&zIn[i+1], 4, &v) ) goto unistr_error;\n      i += 5;\n      j += sqlite3AppendOneUtf8Character(&zOut[j], v);\n    }else if( zIn[i+1]=='+' ){\n      if( !isNHex(&zIn[i+2], 6, &v) ) goto unistr_error;\n      i += 8;\n      j += sqlite3AppendOneUtf8Character(&zOut[j], v);\n    }else if( zIn[i+1]=='u' ){\n      if( !isNHex(&zIn[i+2], 4, &v) ) goto unistr_error;\n      i += 6;\n      j += sqlite3AppendOneUtf8Character(&zOut[j], v);\n    }else if( zIn[i+1]=='U' ){\n      if( !isNHex(&zIn[i+2], 8, &v) ) goto unistr_error;\n      i += 10;\n      j += sqlite3AppendOneUtf8Character(&zOut[j], v);\n    }else{\n      goto unistr_error;\n    }\n  }\n  zOut[j] = 0;\n  sqlite3_result_text64(context, zOut, j, sqlite3_free, SQLITE_UTF8);\n  return;\n\nunistr_error:\n  sqlite3_free(zOut);\n  sqlite3_result_error(context, \"invalid Unicode escape\", -1);\n  return;\n}\n\n\n/*\n** Implementation of the QUOTE() function.\n**\n** The quote(X) function returns the text of an SQL literal which is the\n** value of its argument suitable for inclusion into an SQL statement.\n** Strings are surrounded by single-quotes with escapes on interior quotes\n** as needed. BLOBs are encoded as hexadecimal literals. Strings with\n** embedded NUL characters cannot be represented as string literals in SQL\n** and hence the returned string literal is truncated prior to the first NUL.\n**\n** If sqlite3_user_data() is non-zero, then the UNISTR_QUOTE() function is\n** implemented instead.  The difference is that UNISTR_QUOTE() uses the\n** UNISTR() function to escape control characters.\n*/\nstatic void quoteFunc(sqlite3_context *context, int argc, sqlite3_value **argv){\n  sqlite3_str str;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  sqlite3StrAccumInit(&str, db, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);\n  sqlite3QuoteValue(&str,argv[0],SQLITE_PTR_TO_INT(sqlite3_user_data(context)));\n  sqlite3_result_text(context, sqlite3StrAccumFinish(&str), str.nChar,\n                      SQLITE_DYNAMIC);\n  if( str.accError!=SQLITE_OK ){\n    sqlite3_result_null(context);\n    sqlite3_result_error_code(context, str.accError);\n  }\n}\n\n/*\n** The unicode() function.  Return the integer unicode code-point value\n** for the first character of the input string.\n*/\nstatic void unicodeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *z = sqlite3_value_text(argv[0]);\n  (void)argc;\n  if( z && z[0] ) sqlite3_result_int(context, sqlite3Utf8Read(&z));\n}\n\n/*\n** The char() function takes zero or more arguments, each of which is\n** an integer.  It constructs a string where each character of the string\n** is the unicode character for the corresponding integer argument.\n*/\nstatic void charFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  unsigned char *z, *zOut;\n  int i;\n  zOut = z = sqlite3_malloc64( argc*4+1 );\n  if( z==0 ){\n    sqlite3_result_error_nomem(context);\n    return;\n  }\n  for(i=0; i<argc; i++){\n    sqlite3_int64 x;\n    unsigned c;\n    x = sqlite3_value_int64(argv[i]);\n    if( x<0 || x>0x10ffff ) x = 0xfffd;\n    c = (unsigned)(x & 0x1fffff);\n    if( c<0x00080 ){\n      *zOut++ = (u8)(c&0xFF);\n    }else if( c<0x00800 ){\n      *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);\n      *zOut++ = 0x80 + (u8)(c & 0x3F);\n    }else if( c<0x10000 ){\n      *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);\n      *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);\n      *zOut++ = 0x80 + (u8)(c & 0x3F);\n    }else{\n      *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);\n      *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);\n      *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);\n      *zOut++ = 0x80 + (u8)(c & 0x3F);\n    }                                                    \\\n  }\n  *zOut = 0;\n  sqlite3_result_text64(context, (char*)z, zOut-z, sqlite3_free, SQLITE_UTF8);\n}\n\n/*\n** The hex() function.  Interpret the argument as a blob.  Return\n** a hexadecimal rendering as text.\n*/\nstatic void hexFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int i, n;\n  const unsigned char *pBlob;\n  char *zHex, *z;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  pBlob = sqlite3_value_blob(argv[0]);\n  n = sqlite3_value_bytes(argv[0]);\n  assert( pBlob==sqlite3_value_blob(argv[0]) );  /* No encoding change */\n  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);\n  if( zHex ){\n    for(i=0; i<n; i++, pBlob++){\n      unsigned char c = *pBlob;\n      *(z++) = hexdigits[(c>>4)&0xf];\n      *(z++) = hexdigits[c&0xf];\n    }\n    *z = 0;\n    sqlite3_result_text64(context, zHex, (u64)(z-zHex),\n                          sqlite3_free, SQLITE_UTF8);\n  }\n}\n\n/*\n** Buffer zStr contains nStr bytes of utf-8 encoded text. Return 1 if zStr\n** contains character ch, or 0 if it does not.\n*/\nstatic int strContainsChar(const u8 *zStr, int nStr, u32 ch){\n  const u8 *zEnd = &zStr[nStr];\n  const u8 *z = zStr;\n  while( z<zEnd ){\n    u32 tst = Utf8Read(z);\n    if( tst==ch ) return 1;\n  }\n  return 0;\n}\n\n/*\n** The unhex() function. This function may be invoked with either one or\n** two arguments. In both cases the first argument is interpreted as text\n** a text value containing a set of pairs of hexadecimal digits which are\n** decoded and returned as a blob.\n**\n** If there is only a single argument, then it must consist only of an\n** even number of hexadecimal digits. Otherwise, return NULL.\n**\n** Or, if there is a second argument, then any character that appears in\n** the second argument is also allowed to appear between pairs of hexadecimal\n** digits in the first argument. If any other character appears in the\n** first argument, or if one of the allowed characters appears between\n** two hexadecimal digits that make up a single byte, NULL is returned.\n**\n** The following expressions are all true:\n**\n**     unhex('ABCD')       IS x'ABCD'\n**     unhex('AB CD')      IS NULL\n**     unhex('AB CD', ' ') IS x'ABCD'\n**     unhex('A BCD', ' ') IS NULL\n*/\nstatic void unhexFunc(\n  sqlite3_context *pCtx,\n  int argc,\n  sqlite3_value **argv\n){\n  const u8 *zPass = (const u8*)\"\";\n  int nPass = 0;\n  const u8 *zHex = sqlite3_value_text(argv[0]);\n  int nHex = sqlite3_value_bytes(argv[0]);\n#ifdef SQLITE_DEBUG\n  const u8 *zEnd = zHex ? &zHex[nHex] : 0;\n#endif\n  u8 *pBlob = 0;\n  u8 *p = 0;\n\n  assert( argc==1 || argc==2 );\n  if( argc==2 ){\n    zPass = sqlite3_value_text(argv[1]);\n    nPass = sqlite3_value_bytes(argv[1]);\n  }\n  if( !zHex || !zPass ) return;\n\n  p = pBlob = contextMalloc(pCtx, (nHex/2)+1);\n  if( pBlob ){\n    u8 c;                         /* Most significant digit of next byte */\n    u8 d;                         /* Least significant digit of next byte */\n\n    while( (c = *zHex)!=0x00 ){\n      while( !sqlite3Isxdigit(c) ){\n        u32 ch = Utf8Read(zHex);\n        assert( zHex<=zEnd );\n        if( !strContainsChar(zPass, nPass, ch) ) goto unhex_null;\n        c = *zHex;\n        if( c==0x00 ) goto unhex_done;\n      }\n      zHex++;\n      assert( *zEnd==0x00 );\n      assert( zHex<=zEnd );\n      d = *(zHex++);\n      if( !sqlite3Isxdigit(d) ) goto unhex_null;\n      *(p++) = (sqlite3HexToInt(c)<<4) | sqlite3HexToInt(d);\n    }\n  }\n\n unhex_done:\n  sqlite3_result_blob(pCtx, pBlob, (p - pBlob), sqlite3_free);\n  return;\n\n unhex_null:\n  sqlite3_free(pBlob);\n  return;\n}\n\n\n/*\n** The zeroblob(N) function returns a zero-filled blob of size N bytes.\n*/\nstatic void zeroblobFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  i64 n;\n  int rc;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  n = sqlite3_value_int64(argv[0]);\n  if( n<0 ) n = 0;\n  rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */\n  if( rc ){\n    sqlite3_result_error_code(context, rc);\n  }\n}\n\n/*\n** The replace() function.  Three arguments are all strings: call\n** them A, B, and C. The result is also a string which is derived\n** from A by replacing every occurrence of B with C.  The match\n** must be exact.  Collating sequences are not used.\n*/\nstatic void replaceFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *zStr;        /* The input string A */\n  const unsigned char *zPattern;    /* The pattern string B */\n  const unsigned char *zRep;        /* The replacement string C */\n  unsigned char *zOut;              /* The output */\n  int nStr;                /* Size of zStr */\n  int nPattern;            /* Size of zPattern */\n  int nRep;                /* Size of zRep */\n  i64 nOut;                /* Maximum size of zOut */\n  int loopLimit;           /* Last zStr[] that might match zPattern[] */\n  int i, j;                /* Loop counters */\n  unsigned cntExpand;      /* Number zOut expansions */\n  sqlite3 *db = sqlite3_context_db_handle(context);\n\n  assert( argc==3 );\n  UNUSED_PARAMETER(argc);\n  zStr = sqlite3_value_text(argv[0]);\n  if( zStr==0 ) return;\n  nStr = sqlite3_value_bytes(argv[0]);\n  assert( zStr==sqlite3_value_text(argv[0]) );  /* No encoding change */\n  zPattern = sqlite3_value_text(argv[1]);\n  if( zPattern==0 ){\n    assert( sqlite3_value_type(argv[1])==SQLITE_NULL\n            || sqlite3_context_db_handle(context)->mallocFailed );\n    return;\n  }\n  if( zPattern[0]==0 ){\n    assert( sqlite3_value_type(argv[1])!=SQLITE_NULL );\n    sqlite3_result_text(context, (const char*)zStr, nStr, SQLITE_TRANSIENT);\n    return;\n  }\n  nPattern = sqlite3_value_bytes(argv[1]);\n  assert( zPattern==sqlite3_value_text(argv[1]) );  /* No encoding change */\n  zRep = sqlite3_value_text(argv[2]);\n  if( zRep==0 ) return;\n  nRep = sqlite3_value_bytes(argv[2]);\n  assert( zRep==sqlite3_value_text(argv[2]) );\n  nOut = nStr + 1;\n  assert( nOut<SQLITE_MAX_LENGTH );\n  zOut = contextMalloc(context, nOut);\n  if( zOut==0 ){\n    return;\n  }\n  loopLimit = nStr - nPattern;\n  cntExpand = 0;\n  for(i=j=0; i<=loopLimit; i++){\n    if( zStr[i]!=zPattern[0] || memcmp(&zStr[i], zPattern, nPattern) ){\n      zOut[j++] = zStr[i];\n    }else{\n      if( nRep>nPattern ){\n        nOut += nRep - nPattern;\n        testcase( nOut-1==db->aLimit[SQLITE_LIMIT_LENGTH] );\n        testcase( nOut-2==db->aLimit[SQLITE_LIMIT_LENGTH] );\n        if( nOut-1>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n          sqlite3_result_error_toobig(context);\n          sqlite3_free(zOut);\n          return;\n        }\n        cntExpand++;\n        if( (cntExpand&(cntExpand-1))==0 ){\n          /* Grow the size of the output buffer only on substitutions\n          ** whose index is a power of two: 1, 2, 4, 8, 16, 32, ... */\n          u8 *zOld;\n          zOld = zOut;\n          zOut = sqlite3Realloc(zOut, (int)nOut + (nOut - nStr - 1));\n          if( zOut==0 ){\n            sqlite3_result_error_nomem(context);\n            sqlite3_free(zOld);\n            return;\n          }\n        }\n      }\n      memcpy(&zOut[j], zRep, nRep);\n      j += nRep;\n      i += nPattern-1;\n    }\n  }\n  assert( j+nStr-i+1<=nOut );\n  memcpy(&zOut[j], &zStr[i], nStr-i);\n  j += nStr - i;\n  assert( j<=nOut );\n  zOut[j] = 0;\n  sqlite3_result_text(context, (char*)zOut, j, sqlite3_free);\n}\n\n/*\n** Implementation of the TRIM(), LTRIM(), and RTRIM() functions.\n** The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.\n*/\nstatic void trimFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *zIn;         /* Input string */\n  const unsigned char *zCharSet;    /* Set of characters to trim */\n  unsigned int nIn;                 /* Number of bytes in input */\n  int flags;                        /* 1: trimleft  2: trimright  3: trim */\n  int i;                            /* Loop counter */\n  unsigned int *aLen = 0;           /* Length of each character in zCharSet */\n  unsigned char **azChar = 0;       /* Individual characters in zCharSet */\n  int nChar;                        /* Number of characters in zCharSet */\n\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){\n    return;\n  }\n  zIn = sqlite3_value_text(argv[0]);\n  if( zIn==0 ) return;\n  nIn = (unsigned)sqlite3_value_bytes(argv[0]);\n  assert( zIn==sqlite3_value_text(argv[0]) );\n  if( argc==1 ){\n    static const unsigned lenOne[] = { 1 };\n    static unsigned char * const azOne[] = { (u8*)\" \" };\n    nChar = 1;\n    aLen = (unsigned*)lenOne;\n    azChar = (unsigned char **)azOne;\n    zCharSet = 0;\n  }else if( (zCharSet = sqlite3_value_text(argv[1]))==0 ){\n    return;\n  }else{\n    const unsigned char *z;\n    for(z=zCharSet, nChar=0; *z; nChar++){\n      SQLITE_SKIP_UTF8(z);\n    }\n    if( nChar>0 ){\n      azChar = contextMalloc(context,\n                     ((i64)nChar)*(sizeof(char*)+sizeof(unsigned)));\n      if( azChar==0 ){\n        return;\n      }\n      aLen = (unsigned*)&azChar[nChar];\n      for(z=zCharSet, nChar=0; *z; nChar++){\n        azChar[nChar] = (unsigned char *)z;\n        SQLITE_SKIP_UTF8(z);\n        aLen[nChar] = (unsigned)(z - azChar[nChar]);\n      }\n    }\n  }\n  if( nChar>0 ){\n    flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context));\n    if( flags & 1 ){\n      while( nIn>0 ){\n        unsigned int len = 0;\n        for(i=0; i<nChar; i++){\n          len = aLen[i];\n          if( len<=nIn && memcmp(zIn, azChar[i], len)==0 ) break;\n        }\n        if( i>=nChar ) break;\n        zIn += len;\n        nIn -= len;\n      }\n    }\n    if( flags & 2 ){\n      while( nIn>0 ){\n        unsigned int len = 0;\n        for(i=0; i<nChar; i++){\n          len = aLen[i];\n          if( len<=nIn && memcmp(&zIn[nIn-len],azChar[i],len)==0 ) break;\n        }\n        if( i>=nChar ) break;\n        nIn -= len;\n      }\n    }\n    if( zCharSet ){\n      sqlite3_free(azChar);\n    }\n  }\n  sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);\n}\n\n/* The core implementation of the CONCAT(...) and CONCAT_WS(SEP,...)\n** functions.\n**\n** Return a string value that is the concatenation of all non-null\n** entries in argv[].  Use zSep as the separator.\n*/\nstatic void concatFuncCore(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv,\n  int nSep,\n  const char *zSep\n){\n  i64 j, n = 0;\n  int i;\n  int bNotNull = 0;   /* True after at least NOT NULL argument seen */\n  char *z;\n  for(i=0; i<argc; i++){\n    n += sqlite3_value_bytes(argv[i]);\n  }\n  n += (argc-1)*(i64)nSep;\n  z = sqlite3_malloc64(n+1);\n  if( z==0 ){\n    sqlite3_result_error_nomem(context);\n    return;\n  }\n  j = 0;\n  for(i=0; i<argc; i++){\n    if( sqlite3_value_type(argv[i])!=SQLITE_NULL ){\n      int k = sqlite3_value_bytes(argv[i]);\n      const char *v = (const char*)sqlite3_value_text(argv[i]);\n      if( v!=0 ){\n        if( bNotNull && nSep>0 ){\n          memcpy(&z[j], zSep, nSep);\n          j += nSep;\n        }\n        memcpy(&z[j], v, k);\n        j += k;\n        bNotNull = 1;\n      }\n    }\n  }\n  z[j] = 0;\n  assert( j<=n );\n  sqlite3_result_text64(context, z, j, sqlite3_free, SQLITE_UTF8);\n}\n\n/*\n** The CONCAT(...) function.  Generate a string result that is the\n** concatentation of all non-null arguments.\n*/\nstatic void concatFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  concatFuncCore(context, argc, argv, 0, \"\");\n}\n\n/*\n** The CONCAT_WS(separator, ...) function.\n**\n** Generate a string that is the concatenation of 2nd through the Nth\n** argument.  Use the first argument (which must be non-NULL) as the\n** separator.\n*/\nstatic void concatwsFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int nSep = sqlite3_value_bytes(argv[0]);\n  const char *zSep = (const char*)sqlite3_value_text(argv[0]);\n  if( zSep==0 ) return;\n  concatFuncCore(context, argc-1, argv+1, nSep, zSep);\n}\n\n\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n/*\n** The \"unknown\" function is automatically substituted in place of\n** any unrecognized function name when doing an EXPLAIN or EXPLAIN QUERY PLAN\n** when the SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option is used.\n** When the \"sqlite3\" command-line shell is built using this functionality,\n** that allows an EXPLAIN or EXPLAIN QUERY PLAN for complex queries\n** involving application-defined functions to be examined in a generic\n** sqlite3 shell.\n*/\nstatic void unknownFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  /* no-op */\n  (void)context;\n  (void)argc;\n  (void)argv;\n}\n#endif /*SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION*/\n\n\n/* IMP: R-25361-16150 This function is omitted from SQLite by default. It\n** is only available if the SQLITE_SOUNDEX compile-time option is used\n** when SQLite is built.\n*/\n#ifdef SQLITE_SOUNDEX\n/*\n** Compute the soundex encoding of a word.\n**\n** IMP: R-59782-00072 The soundex(X) function returns a string that is the\n** soundex encoding of the string X.\n*/\nstatic void soundexFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  char zResult[8];\n  const u8 *zIn;\n  int i, j;\n  static const unsigned char iCode[] = {\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,\n    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,\n    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,\n    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,\n  };\n  assert( argc==1 );\n  zIn = (u8*)sqlite3_value_text(argv[0]);\n  if( zIn==0 ) zIn = (u8*)\"\";\n  for(i=0; zIn[i] && !sqlite3Isalpha(zIn[i]); i++){}\n  if( zIn[i] ){\n    u8 prevcode = iCode[zIn[i]&0x7f];\n    zResult[0] = sqlite3Toupper(zIn[i]);\n    for(j=1; j<4 && zIn[i]; i++){\n      int code = iCode[zIn[i]&0x7f];\n      if( code>0 ){\n        if( code!=prevcode ){\n          prevcode = code;\n          zResult[j++] = code + '0';\n        }\n      }else{\n        prevcode = 0;\n      }\n    }\n    while( j<4 ){\n      zResult[j++] = '0';\n    }\n    zResult[j] = 0;\n    sqlite3_result_text(context, zResult, 4, SQLITE_TRANSIENT);\n  }else{\n    /* IMP: R-64894-50321 The string \"?000\" is returned if the argument\n    ** is NULL or contains no ASCII alphabetic characters. */\n    sqlite3_result_text(context, \"?000\", 4, SQLITE_STATIC);\n  }\n}\n#endif /* SQLITE_SOUNDEX */\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n/*\n** A function that loads a shared-library extension then returns NULL.\n*/\nstatic void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){\n  const char *zFile = (const char *)sqlite3_value_text(argv[0]);\n  const char *zProc;\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  char *zErrMsg = 0;\n\n  /* Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc\n  ** flag is set.  See the sqlite3_enable_load_extension() API.\n  */\n  if( (db->flags & SQLITE_LoadExtFunc)==0 ){\n    sqlite3_result_error(context, \"not authorized\", -1);\n    return;\n  }\n\n  if( argc==2 ){\n    zProc = (const char *)sqlite3_value_text(argv[1]);\n  }else{\n    zProc = 0;\n  }\n  if( zFile && sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){\n    sqlite3_result_error(context, zErrMsg, -1);\n    sqlite3_free(zErrMsg);\n  }\n}\n#endif\n\n\n/*\n** An instance of the following structure holds the context of a\n** sum() or avg() aggregate computation.\n*/\ntypedef struct SumCtx SumCtx;\nstruct SumCtx {\n  double rSum;      /* Running sum as as a double */\n  double rErr;      /* Error term for Kahan-Babushka-Neumaier summation */\n  i64 iSum;         /* Running sum as a signed integer */\n  i64 cnt;          /* Number of elements summed */\n  u8 approx;        /* True if any non-integer value was input to the sum */\n  u8 ovrfl;         /* Integer overflow seen */\n};\n\n/*\n** Do one step of the Kahan-Babushka-Neumaier summation.\n**\n** https://en.wikipedia.org/wiki/Kahan_summation_algorithm\n**\n** Variables are marked \"volatile\" to defeat c89 x86 floating point\n** optimizations can mess up this algorithm.\n*/\nstatic void kahanBabuskaNeumaierStep(\n  volatile SumCtx *pSum,\n  volatile double r\n){\n  volatile double s = pSum->rSum;\n  volatile double t = s + r;\n  if( fabs(s) > fabs(r) ){\n    pSum->rErr += (s - t) + r;\n  }else{\n    pSum->rErr += (r - t) + s;\n  }\n  pSum->rSum = t;\n}\n\n/*\n** Add a (possibly large) integer to the running sum.\n*/\nstatic void kahanBabuskaNeumaierStepInt64(volatile SumCtx *pSum, i64 iVal){\n  if( iVal<=-4503599627370496LL || iVal>=+4503599627370496LL ){\n    i64 iBig, iSm;\n    iSm = iVal % 16384;\n    iBig = iVal - iSm;\n    kahanBabuskaNeumaierStep(pSum, iBig);\n    kahanBabuskaNeumaierStep(pSum, iSm);\n  }else{\n    kahanBabuskaNeumaierStep(pSum, (double)iVal);\n  }\n}\n\n/*\n** Initialize the Kahan-Babaska-Neumaier sum from a 64-bit integer\n*/\nstatic void kahanBabuskaNeumaierInit(\n  volatile SumCtx *p,\n  i64 iVal\n){\n  if( iVal<=-4503599627370496LL || iVal>=+4503599627370496LL ){\n    i64 iSm = iVal % 16384;\n    p->rSum = (double)(iVal - iSm);\n    p->rErr = (double)iSm;\n  }else{\n    p->rSum = (double)iVal;\n    p->rErr = 0.0;\n  }\n}\n\n/*\n** Routines used to compute the sum, average, and total.\n**\n** The SUM() function follows the (broken) SQL standard which means\n** that it returns NULL if it sums over no inputs.  TOTAL returns\n** 0.0 in that case.  In addition, TOTAL always returns a float where\n** SUM might return an integer if it never encounters a floating point\n** value.  TOTAL never fails, but SUM might throw an exception if\n** it overflows an integer.\n*/\nstatic void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){\n  SumCtx *p;\n  int type;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  p = sqlite3_aggregate_context(context, sizeof(*p));\n  type = sqlite3_value_numeric_type(argv[0]);\n  if( p && type!=SQLITE_NULL ){\n    p->cnt++;\n    if( p->approx==0 ){\n      if( type!=SQLITE_INTEGER ){\n        kahanBabuskaNeumaierInit(p, p->iSum);\n        p->approx = 1;\n        kahanBabuskaNeumaierStep(p, sqlite3_value_double(argv[0]));\n      }else{\n        i64 x = p->iSum;\n        if( sqlite3AddInt64(&x, sqlite3_value_int64(argv[0]))==0 ){\n          p->iSum = x;\n        }else{\n          p->ovrfl = 1;\n          kahanBabuskaNeumaierInit(p, p->iSum);\n          p->approx = 1;\n          kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0]));\n        }\n      }\n    }else{\n      if( type==SQLITE_INTEGER ){\n        kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0]));\n      }else{\n        p->ovrfl = 0;\n        kahanBabuskaNeumaierStep(p, sqlite3_value_double(argv[0]));\n      }\n    }\n  }\n}\n#ifndef SQLITE_OMIT_WINDOWFUNC\nstatic void sumInverse(sqlite3_context *context, int argc, sqlite3_value**argv){\n  SumCtx *p;\n  int type;\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  p = sqlite3_aggregate_context(context, sizeof(*p));\n  type = sqlite3_value_numeric_type(argv[0]);\n  /* p is always non-NULL because sumStep() will have been called first\n  ** to initialize it */\n  if( ALWAYS(p) && type!=SQLITE_NULL ){\n    assert( p->cnt>0 );\n    p->cnt--;\n    if( !p->approx ){\n      if( sqlite3SubInt64(&p->iSum, sqlite3_value_int64(argv[0])) ){\n        p->ovrfl = 1;\n        p->approx = 1;\n      }\n    }else if( type==SQLITE_INTEGER ){\n      i64 iVal = sqlite3_value_int64(argv[0]);\n      if( iVal!=SMALLEST_INT64 ){\n        kahanBabuskaNeumaierStepInt64(p, -iVal);\n      }else{\n        kahanBabuskaNeumaierStepInt64(p, LARGEST_INT64);\n        kahanBabuskaNeumaierStepInt64(p, 1);\n      }\n    }else{\n      kahanBabuskaNeumaierStep(p, -sqlite3_value_double(argv[0]));\n    }\n  }\n}\n#else\n# define sumInverse 0\n#endif /* SQLITE_OMIT_WINDOWFUNC */\nstatic void sumFinalize(sqlite3_context *context){\n  SumCtx *p;\n  p = sqlite3_aggregate_context(context, 0);\n  if( p && p->cnt>0 ){\n    if( p->approx ){\n      if( p->ovrfl ){\n        sqlite3_result_error(context,\"integer overflow\",-1);\n      }else if( !sqlite3IsOverflow(p->rErr) ){\n        sqlite3_result_double(context, p->rSum+p->rErr);\n      }else{\n        sqlite3_result_double(context, p->rSum);\n      }\n    }else{\n      sqlite3_result_int64(context, p->iSum);\n    }\n  }\n}\nstatic void avgFinalize(sqlite3_context *context){\n  SumCtx *p;\n  p = sqlite3_aggregate_context(context, 0);\n  if( p && p->cnt>0 ){\n    double r;\n    if( p->approx ){\n      r = p->rSum;\n      if( !sqlite3IsOverflow(p->rErr) ) r += p->rErr;\n    }else{\n      r = (double)(p->iSum);\n    }\n    sqlite3_result_double(context, r/(double)p->cnt);\n  }\n}\nstatic void totalFinalize(sqlite3_context *context){\n  SumCtx *p;\n  double r = 0.0;\n  p = sqlite3_aggregate_context(context, 0);\n  if( p ){\n    if( p->approx ){\n      r = p->rSum;\n      if( !sqlite3IsOverflow(p->rErr) ) r += p->rErr;\n    }else{\n      r = (double)(p->iSum);\n    }\n  }\n  sqlite3_result_double(context, r);\n}\n\n/*\n** The following structure keeps track of state information for the\n** count() aggregate function.\n*/\ntypedef struct CountCtx CountCtx;\nstruct CountCtx {\n  i64 n;\n#ifdef SQLITE_DEBUG\n  int bInverse;                   /* True if xInverse() ever called */\n#endif\n};\n\n/*\n** Routines to implement the count() aggregate function.\n*/\nstatic void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){\n  CountCtx *p;\n  p = sqlite3_aggregate_context(context, sizeof(*p));\n  if( (argc==0 || SQLITE_NULL!=sqlite3_value_type(argv[0])) && p ){\n    p->n++;\n  }\n\n#ifndef SQLITE_OMIT_DEPRECATED\n  /* The sqlite3_aggregate_count() function is deprecated.  But just to make\n  ** sure it still operates correctly, verify that its count agrees with our\n  ** internal count when using count(*) and when the total count can be\n  ** expressed as a 32-bit integer. */\n  assert( argc==1 || p==0 || p->n>0x7fffffff || p->bInverse\n          || p->n==sqlite3_aggregate_count(context) );\n#endif\n}\nstatic void countFinalize(sqlite3_context *context){\n  CountCtx *p;\n  p = sqlite3_aggregate_context(context, 0);\n  sqlite3_result_int64(context, p ? p->n : 0);\n}\n#ifndef SQLITE_OMIT_WINDOWFUNC\nstatic void countInverse(sqlite3_context *ctx, int argc, sqlite3_value **argv){\n  CountCtx *p;\n  p = sqlite3_aggregate_context(ctx, sizeof(*p));\n  /* p is always non-NULL since countStep() will have been called first */\n  if( (argc==0 || SQLITE_NULL!=sqlite3_value_type(argv[0])) && ALWAYS(p) ){\n    p->n--;\n#ifdef SQLITE_DEBUG\n    p->bInverse = 1;\n#endif\n  }\n}\n#else\n# define countInverse 0\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** Routines to implement min() and max() aggregate functions.\n*/\nstatic void minmaxStep(\n  sqlite3_context *context,\n  int NotUsed,\n  sqlite3_value **argv\n){\n  Mem *pArg  = (Mem *)argv[0];\n  Mem *pBest;\n  UNUSED_PARAMETER(NotUsed);\n\n  pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));\n  if( !pBest ) return;\n\n  if( sqlite3_value_type(pArg)==SQLITE_NULL ){\n    if( pBest->flags ) sqlite3SkipAccumulatorLoad(context);\n  }else if( pBest->flags ){\n    int max;\n    int cmp;\n    CollSeq *pColl = sqlite3GetFuncCollSeq(context);\n    /* This step function is used for both the min() and max() aggregates,\n    ** the only difference between the two being that the sense of the\n    ** comparison is inverted. For the max() aggregate, the\n    ** sqlite3_user_data() function returns (void *)-1. For min() it\n    ** returns (void *)db, where db is the sqlite3* database pointer.\n    ** Therefore the next statement sets variable 'max' to 1 for the max()\n    ** aggregate, or 0 for min().\n    */\n    max = sqlite3_user_data(context)!=0;\n    cmp = sqlite3MemCompare(pBest, pArg, pColl);\n    if( (max && cmp<0) || (!max && cmp>0) ){\n      sqlite3VdbeMemCopy(pBest, pArg);\n    }else{\n      sqlite3SkipAccumulatorLoad(context);\n    }\n  }else{\n    pBest->db = sqlite3_context_db_handle(context);\n    sqlite3VdbeMemCopy(pBest, pArg);\n  }\n}\nstatic void minMaxValueFinalize(sqlite3_context *context, int bValue){\n  sqlite3_value *pRes;\n  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);\n  if( pRes ){\n    if( pRes->flags ){\n      sqlite3_result_value(context, pRes);\n    }\n    if( bValue==0 ) sqlite3VdbeMemRelease(pRes);\n  }\n}\n#ifndef SQLITE_OMIT_WINDOWFUNC\nstatic void minMaxValue(sqlite3_context *context){\n  minMaxValueFinalize(context, 1);\n}\n#else\n# define minMaxValue 0\n#endif /* SQLITE_OMIT_WINDOWFUNC */\nstatic void minMaxFinalize(sqlite3_context *context){\n  minMaxValueFinalize(context, 0);\n}\n\n/*\n** group_concat(EXPR, ?SEPARATOR?)\n** string_agg(EXPR, SEPARATOR)\n**\n** Content is accumulated in GroupConcatCtx.str with the SEPARATOR\n** coming before the EXPR value, except for the first entry which\n** omits the SEPARATOR.\n**\n** It is tragic that the SEPARATOR goes before the EXPR string.  The\n** groupConcatInverse() implementation would have been easier if the\n** SEPARATOR were appended after EXPR.  And the order is undocumented,\n** so we could change it, in theory.  But the old behavior has been\n** around for so long that we dare not, for fear of breaking something.\n*/\ntypedef struct {\n  StrAccum str;          /* The accumulated concatenation */\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  int nAccum;            /* Number of strings presently concatenated */\n  int nFirstSepLength;   /* Used to detect separator length change */\n  /* If pnSepLengths!=0, refs an array of inter-string separator lengths,\n  ** stored as actually incorporated into presently accumulated result.\n  ** (Hence, its slots in use number nAccum-1 between method calls.)\n  ** If pnSepLengths==0, nFirstSepLength is the length used throughout.\n  */\n  int *pnSepLengths;\n#endif\n} GroupConcatCtx;\n\nstatic void groupConcatStep(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const char *zVal;\n  GroupConcatCtx *pGCC;\n  const char *zSep;\n  int nVal, nSep;\n  assert( argc==1 || argc==2 );\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;\n  pGCC = (GroupConcatCtx*)sqlite3_aggregate_context(context, sizeof(*pGCC));\n  if( pGCC ){\n    sqlite3 *db = sqlite3_context_db_handle(context);\n    int firstTerm = pGCC->str.mxAlloc==0;\n    pGCC->str.mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];\n    if( argc==1 ){\n      if( !firstTerm ){\n        sqlite3_str_appendchar(&pGCC->str, 1, ',');\n      }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      else{\n        pGCC->nFirstSepLength = 1;\n      }\n#endif\n    }else if( !firstTerm ){\n      zSep = (char*)sqlite3_value_text(argv[1]);\n      nSep = sqlite3_value_bytes(argv[1]);\n      if( zSep ){\n        sqlite3_str_append(&pGCC->str, zSep, nSep);\n      }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      else{\n        nSep = 0;\n      }\n      if( nSep != pGCC->nFirstSepLength || pGCC->pnSepLengths != 0 ){\n        int *pnsl = pGCC->pnSepLengths;\n        if( pnsl == 0 ){\n          /* First separator length variation seen, start tracking them. */\n          pnsl = (int*)sqlite3_malloc64((pGCC->nAccum+1) * sizeof(int));\n          if( pnsl!=0 ){\n            int i = 0, nA = pGCC->nAccum-1;\n            while( i<nA ) pnsl[i++] = pGCC->nFirstSepLength;\n          }\n        }else{\n          pnsl = (int*)sqlite3_realloc64(pnsl, pGCC->nAccum * sizeof(int));\n        }\n        if( pnsl!=0 ){\n          if( ALWAYS(pGCC->nAccum>0) ){\n            pnsl[pGCC->nAccum-1] = nSep;\n          }\n          pGCC->pnSepLengths = pnsl;\n        }else{\n          sqlite3StrAccumSetError(&pGCC->str, SQLITE_NOMEM);\n        }\n      }\n#endif\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    else{\n      pGCC->nFirstSepLength = sqlite3_value_bytes(argv[1]);\n    }\n    pGCC->nAccum += 1;\n#endif\n    zVal = (char*)sqlite3_value_text(argv[0]);\n    nVal = sqlite3_value_bytes(argv[0]);\n    if( zVal ) sqlite3_str_append(&pGCC->str, zVal, nVal);\n  }\n}\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\nstatic void groupConcatInverse(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GroupConcatCtx *pGCC;\n  assert( argc==1 || argc==2 );\n  (void)argc;  /* Suppress unused parameter warning */\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;\n  pGCC = (GroupConcatCtx*)sqlite3_aggregate_context(context, sizeof(*pGCC));\n  /* pGCC is always non-NULL since groupConcatStep() will have always\n  ** run first to initialize it */\n  if( ALWAYS(pGCC) ){\n    int nVS;  /* Number of characters to remove */\n    /* Must call sqlite3_value_text() to convert the argument into text prior\n    ** to invoking sqlite3_value_bytes(), in case the text encoding is UTF16 */\n    (void)sqlite3_value_text(argv[0]);\n    nVS = sqlite3_value_bytes(argv[0]);\n    pGCC->nAccum -= 1;\n    if( pGCC->pnSepLengths!=0 ){\n      assert(pGCC->nAccum >= 0);\n      if( pGCC->nAccum>0 ){\n        nVS += *pGCC->pnSepLengths;\n        memmove(pGCC->pnSepLengths, pGCC->pnSepLengths+1,\n               (pGCC->nAccum-1)*sizeof(int));\n      }\n    }else{\n      /* If removing single accumulated string, harmlessly over-do. */\n      nVS += pGCC->nFirstSepLength;\n    }\n    if( nVS>=(int)pGCC->str.nChar ){\n      pGCC->str.nChar = 0;\n    }else{\n      pGCC->str.nChar -= nVS;\n      memmove(pGCC->str.zText, &pGCC->str.zText[nVS], pGCC->str.nChar);\n    }\n    if( pGCC->str.nChar==0 ){\n      pGCC->str.mxAlloc = 0;\n      sqlite3_free(pGCC->pnSepLengths);\n      pGCC->pnSepLengths = 0;\n    }\n  }\n}\n#else\n# define groupConcatInverse 0\n#endif /* SQLITE_OMIT_WINDOWFUNC */\nstatic void groupConcatFinalize(sqlite3_context *context){\n  GroupConcatCtx *pGCC\n    = (GroupConcatCtx*)sqlite3_aggregate_context(context, 0);\n  if( pGCC ){\n    sqlite3ResultStrAccum(context, &pGCC->str);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    sqlite3_free(pGCC->pnSepLengths);\n#endif\n  }\n}\n#ifndef SQLITE_OMIT_WINDOWFUNC\nstatic void groupConcatValue(sqlite3_context *context){\n  GroupConcatCtx *pGCC\n    = (GroupConcatCtx*)sqlite3_aggregate_context(context, 0);\n  if( pGCC ){\n    StrAccum *pAccum = &pGCC->str;\n    if( pAccum->accError==SQLITE_TOOBIG ){\n      sqlite3_result_error_toobig(context);\n    }else if( pAccum->accError==SQLITE_NOMEM ){\n      sqlite3_result_error_nomem(context);\n    }else if( pGCC->nAccum>0 && pAccum->nChar==0 ){\n      sqlite3_result_text(context, \"\", 1, SQLITE_STATIC);\n    }else{\n      const char *zText = sqlite3_str_value(pAccum);\n      sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT);\n    }\n  }\n}\n#else\n# define groupConcatValue 0\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** This routine does per-connection function registration.  Most\n** of the built-in functions above are part of the global function set.\n** This routine only deals with those that are not global.\n*/\nSQLITE_PRIVATE void sqlite3RegisterPerConnectionBuiltinFunctions(sqlite3 *db){\n  int rc = sqlite3_overload_function(db, \"MATCH\", 2);\n  assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );\n  if( rc==SQLITE_NOMEM ){\n    sqlite3OomFault(db);\n  }\n}\n\n/*\n** Re-register the built-in LIKE functions.  The caseSensitive\n** parameter determines whether or not the LIKE operator is case\n** sensitive.\n*/\nSQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){\n  FuncDef *pDef;\n  struct compareInfo *pInfo;\n  int flags;\n  int nArg;\n  if( caseSensitive ){\n    pInfo = (struct compareInfo*)&likeInfoAlt;\n    flags = SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE;\n  }else{\n    pInfo = (struct compareInfo*)&likeInfoNorm;\n    flags = SQLITE_FUNC_LIKE;\n  }\n  for(nArg=2; nArg<=3; nArg++){\n    sqlite3CreateFunc(db, \"like\", nArg, SQLITE_UTF8, pInfo, likeFunc,\n                      0, 0, 0, 0, 0);\n    pDef = sqlite3FindFunction(db, \"like\", nArg, SQLITE_UTF8, 0);\n    pDef->funcFlags |= flags;\n    pDef->funcFlags &= ~SQLITE_FUNC_UNSAFE;\n  }\n}\n\n/*\n** pExpr points to an expression which implements a function.  If\n** it is appropriate to apply the LIKE optimization to that function\n** then set aWc[0] through aWc[2] to the wildcard characters and the\n** escape character and then return TRUE.  If the function is not a\n** LIKE-style function then return FALSE.\n**\n** The expression \"a LIKE b ESCAPE c\" is only considered a valid LIKE\n** operator if c is a string literal that is exactly one byte in length.\n** That one byte is stored in aWc[3].  aWc[3] is set to zero if there is\n** no ESCAPE clause.\n**\n** *pIsNocase is set to true if uppercase and lowercase are equivalent for\n** the function (default for LIKE).  If the function makes the distinction\n** between uppercase and lowercase (as does GLOB) then *pIsNocase is set to\n** false.\n*/\nSQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){\n  FuncDef *pDef;\n  int nExpr;\n  assert( pExpr!=0 );\n  assert( pExpr->op==TK_FUNCTION );\n  assert( ExprUseXList(pExpr) );\n  if( !pExpr->x.pList ){\n    return 0;\n  }\n  nExpr = pExpr->x.pList->nExpr;\n  assert( !ExprHasProperty(pExpr, EP_IntValue) );\n  pDef = sqlite3FindFunction(db, pExpr->u.zToken, nExpr, SQLITE_UTF8, 0);\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n  if( pDef==0 ) return 0;\n#endif\n  if( NEVER(pDef==0) || (pDef->funcFlags & SQLITE_FUNC_LIKE)==0 ){\n    return 0;\n  }\n\n  /* The memcpy() statement assumes that the wildcard characters are\n  ** the first three statements in the compareInfo structure.  The\n  ** asserts() that follow verify that assumption\n  */\n  memcpy(aWc, pDef->pUserData, 3);\n  assert( (char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll );\n  assert( &((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne );\n  assert( &((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet );\n\n  if( nExpr<3 ){\n    aWc[3] = 0;\n  }else{\n    Expr *pEscape = pExpr->x.pList->a[2].pExpr;\n    char *zEscape;\n    if( pEscape->op!=TK_STRING ) return 0;\n    assert( !ExprHasProperty(pEscape, EP_IntValue) );\n    zEscape = pEscape->u.zToken;\n    if( zEscape[0]==0 || zEscape[1]!=0 ) return 0;\n    if( zEscape[0]==aWc[0] ) return 0;\n    if( zEscape[0]==aWc[1] ) return 0;\n    aWc[3] = zEscape[0];\n  }\n\n  *pIsNocase = (pDef->funcFlags & SQLITE_FUNC_CASE)==0;\n  return 1;\n}\n\n/* Mathematical Constants */\n#ifndef M_PI\n# define M_PI   3.141592653589793238462643383279502884\n#endif\n#ifndef M_LN10\n# define M_LN10 2.302585092994045684017991454684364208\n#endif\n#ifndef M_LN2\n# define M_LN2  0.693147180559945309417232121458176568\n#endif\n\n\n/* Extra math functions that require linking with -lm\n*/\n#ifdef SQLITE_ENABLE_MATH_FUNCTIONS\n/*\n** Implementation SQL functions:\n**\n**   ceil(X)\n**   ceiling(X)\n**   floor(X)\n**\n** The sqlite3_user_data() pointer is a pointer to the libm implementation\n** of the underlying C function.\n*/\nstatic void ceilingFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  assert( argc==1 );\n  switch( sqlite3_value_numeric_type(argv[0]) ){\n    case SQLITE_INTEGER: {\n       sqlite3_result_int64(context, sqlite3_value_int64(argv[0]));\n       break;\n    }\n    case SQLITE_FLOAT: {\n       double (*x)(double) = (double(*)(double))sqlite3_user_data(context);\n       sqlite3_result_double(context, x(sqlite3_value_double(argv[0])));\n       break;\n    }\n    default: {\n       break;\n    }\n  }\n}\n\n/*\n** On some systems, ceil() and floor() are intrinsic function.  You are\n** unable to take a pointer to these functions.  Hence, we here wrap them\n** in our own actual functions.\n*/\nstatic double xCeil(double x){ return ceil(x); }\nstatic double xFloor(double x){ return floor(x); }\n\n/*\n** Some systems do not have log2() and log10() in their standard math\n** libraries.\n*/\n#if defined(HAVE_LOG10) && HAVE_LOG10==0\n# define log10(X) (0.4342944819032517867*log(X))\n#endif\n#if defined(HAVE_LOG2) && HAVE_LOG2==0\n# define log2(X) (1.442695040888963456*log(X))\n#endif\n\n\n/*\n** Implementation of SQL functions:\n**\n**   ln(X)       - natural logarithm\n**   log(X)      - log X base 10\n**   log10(X)    - log X base 10\n**   log(B,X)    - log X base B\n*/\nstatic void logFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  double x, b, ans;\n  assert( argc==1 || argc==2 );\n  switch( sqlite3_value_numeric_type(argv[0]) ){\n    case SQLITE_INTEGER:\n    case SQLITE_FLOAT:\n      x = sqlite3_value_double(argv[0]);\n      if( x<=0.0 ) return;\n      break;\n    default:\n      return;\n  }\n  if( argc==2 ){\n    switch( sqlite3_value_numeric_type(argv[0]) ){\n      case SQLITE_INTEGER:\n      case SQLITE_FLOAT:\n        b = log(x);\n        if( b<=0.0 ) return;\n        x = sqlite3_value_double(argv[1]);\n        if( x<=0.0 ) return;\n        break;\n     default:\n        return;\n    }\n    ans = log(x)/b;\n  }else{\n    switch( SQLITE_PTR_TO_INT(sqlite3_user_data(context)) ){\n      case 1:\n        ans = log10(x);\n        break;\n      case 2:\n        ans = log2(x);\n        break;\n      default:\n        ans = log(x);\n        break;\n    }\n  }\n  sqlite3_result_double(context, ans);\n}\n\n/*\n** Functions to converts degrees to radians and radians to degrees.\n*/\nstatic double degToRad(double x){ return x*(M_PI/180.0); }\nstatic double radToDeg(double x){ return x*(180.0/M_PI); }\n\n/*\n** Implementation of 1-argument SQL math functions:\n**\n**   exp(X)  - Compute e to the X-th power\n*/\nstatic void math1Func(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int type0;\n  double v0, ans;\n  double (*x)(double);\n  assert( argc==1 );\n  type0 = sqlite3_value_numeric_type(argv[0]);\n  if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;\n  v0 = sqlite3_value_double(argv[0]);\n  x = (double(*)(double))sqlite3_user_data(context);\n  ans = x(v0);\n  sqlite3_result_double(context, ans);\n}\n\n/*\n** Implementation of 2-argument SQL math functions:\n**\n**   power(X,Y)  - Compute X to the Y-th power\n*/\nstatic void math2Func(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int type0, type1;\n  double v0, v1, ans;\n  double (*x)(double,double);\n  assert( argc==2 );\n  type0 = sqlite3_value_numeric_type(argv[0]);\n  if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;\n  type1 = sqlite3_value_numeric_type(argv[1]);\n  if( type1!=SQLITE_INTEGER && type1!=SQLITE_FLOAT ) return;\n  v0 = sqlite3_value_double(argv[0]);\n  v1 = sqlite3_value_double(argv[1]);\n  x = (double(*)(double,double))sqlite3_user_data(context);\n  ans = x(v0, v1);\n  sqlite3_result_double(context, ans);\n}\n\n/*\n** Implementation of 0-argument pi() function.\n*/\nstatic void piFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  assert( argc==0 );\n  (void)argv;\n  sqlite3_result_double(context, M_PI);\n}\n\n#endif /* SQLITE_ENABLE_MATH_FUNCTIONS */\n\n/*\n** Implementation of sign(X) function.\n*/\nstatic void signFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int type0;\n  double x;\n  UNUSED_PARAMETER(argc);\n  assert( argc==1 );\n  type0 = sqlite3_value_numeric_type(argv[0]);\n  if( type0!=SQLITE_INTEGER && type0!=SQLITE_FLOAT ) return;\n  x = sqlite3_value_double(argv[0]);\n  sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0);\n}\n\n#if defined(SQLITE_ENABLE_PERCENTILE)\n/***********************************************************************\n** This section implements the percentile(Y,P) SQL function and similar.\n** Requirements:\n**\n**   (1)  The percentile(Y,P) function is an aggregate function taking\n**        exactly two arguments.\n**\n**   (2)  If the P argument to percentile(Y,P) is not the same for every\n**        row in the aggregate then an error is thrown.  The word \"same\"\n**        in the previous sentence means that the value differ by less\n**        than 0.001.\n**\n**   (3)  If the P argument to percentile(Y,P) evaluates to anything other\n**        than a number in the range of 0.0 to 100.0 inclusive then an\n**        error is thrown.\n**\n**   (4)  If any Y argument to percentile(Y,P) evaluates to a value that\n**        is not NULL and is not numeric then an error is thrown.\n**\n**   (5)  If any Y argument to percentile(Y,P) evaluates to plus or minus\n**        infinity then an error is thrown.  (SQLite always interprets NaN\n**        values as NULL.)\n**\n**   (6)  Both Y and P in percentile(Y,P) can be arbitrary expressions,\n**        including CASE WHEN expressions.\n**\n**   (7)  The percentile(Y,P) aggregate is able to handle inputs of at least\n**        one million (1,000,000) rows.\n**\n**   (8)  If there are no non-NULL values for Y, then percentile(Y,P)\n**        returns NULL.\n**\n**   (9)  If there is exactly one non-NULL value for Y, the percentile(Y,P)\n**        returns the one Y value.\n**\n**  (10)  If there N non-NULL values of Y where N is two or more and\n**        the Y values are ordered from least to greatest and a graph is\n**        drawn from 0 to N-1 such that the height of the graph at J is\n**        the J-th Y value and such that straight lines are drawn between\n**        adjacent Y values, then the percentile(Y,P) function returns\n**        the height of the graph at P*(N-1)/100.\n**\n**  (11)  The percentile(Y,P) function always returns either a floating\n**        point number or NULL.\n**\n**  (12)  The percentile(Y,P) is implemented as a single C99 source-code\n**        file that compiles into a shared-library or DLL that can be loaded\n**        into SQLite using the sqlite3_load_extension() interface.\n**\n**  (13)  A separate median(Y) function is the equivalent percentile(Y,50).\n**\n**  (14)  A separate percentile_cont(Y,P) function is equivalent to\n**        percentile(Y,P/100.0).  In other words, the fraction value in\n**        the second argument is in the range of 0 to 1 instead of 0 to 100.\n**\n**  (15)  A separate percentile_disc(Y,P) function is like\n**        percentile_cont(Y,P) except that instead of returning the weighted\n**        average of the nearest two input values, it returns the next lower\n**        value.  So the percentile_disc(Y,P) will always return a value\n**        that was one of the inputs.\n**\n**  (16)  All of median(), percentile(Y,P), percentile_cont(Y,P) and\n**        percentile_disc(Y,P) can be used as window functions.\n**\n** Differences from standard SQL:\n**\n**  *  The percentile_cont(X,P) function is equivalent to the following in\n**     standard SQL:\n**\n**         (percentile_cont(P) WITHIN GROUP (ORDER BY X))\n**\n**     The SQLite syntax is much more compact.  The standard SQL syntax\n**     is also supported if SQLite is compiled with the\n**     -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES option.\n**\n**  *  No median(X) function exists in the SQL standard.  App developers\n**     are expected to write \"percentile_cont(0.5)WITHIN GROUP(ORDER BY X)\".\n**\n**  *  No percentile(Y,P) function exists in the SQL standard.  Instead of\n**     percential(Y,P), developers must write this:\n**     \"percentile_cont(P/100.0) WITHIN GROUP (ORDER BY Y)\".  Note that\n**     the fraction parameter to percentile() goes from 0 to 100 whereas\n**     the fraction parameter in SQL standard percentile_cont() goes from\n**     0 to 1.\n**\n** Implementation notes as of 2024-08-31:\n**\n**  *  The regular aggregate-function versions of these routines work\n**     by accumulating all values in an array of doubles, then sorting\n**     that array using quicksort before computing the answer. Thus\n**     the runtime is O(NlogN) where N is the number of rows of input.\n**\n**  *  For the window-function versions of these routines, the array of\n**     inputs is sorted as soon as the first value is computed.  Thereafter,\n**     the array is kept in sorted order using an insert-sort.  This\n**     results in O(N*K) performance where K is the size of the window.\n**     One can imagine alternative implementations that give O(N*logN*logK)\n**     performance, but they require more complex logic and data structures.\n**     The developers have elected to keep the asymptotically slower\n**     algorithm for now, for simplicity, under the theory that window\n**     functions are seldom used and when they are, the window size K is\n**     often small.  The developers might revisit that decision later,\n**     should the need arise.\n*/\n\n/* The following object is the group context for a single percentile()\n** aggregate.  Remember all input Y values until the very end.\n** Those values are accumulated in the Percentile.a[] array.\n*/\ntypedef struct Percentile Percentile;\nstruct Percentile {\n  u64 nAlloc;          /* Number of slots allocated for a[] */\n  u64 nUsed;           /* Number of slots actually used in a[] */\n  char bSorted;        /* True if a[] is already in sorted order */\n  char bKeepSorted;    /* True if advantageous to keep a[] sorted */\n  char bPctValid;      /* True if rPct is valid */\n  double rPct;         /* Fraction.  0.0 to 1.0 */\n  double *a;           /* Array of Y values */\n};\n\n/*\n** Return TRUE if the input floating-point number is an infinity.\n*/\nstatic int percentIsInfinity(double r){\n  sqlite3_uint64 u;\n  assert( sizeof(u)==sizeof(r) );\n  memcpy(&u, &r, sizeof(u));\n  return ((u>>52)&0x7ff)==0x7ff;\n}\n\n/*\n** Return TRUE if two doubles differ by 0.001 or less.\n*/\nstatic int percentSameValue(double a, double b){\n  a -= b;\n  return a>=-0.001 && a<=0.001;\n}\n\n/*\n** Search p (which must have p->bSorted) looking for an entry with\n** value y.  Return the index of that entry.\n**\n** If bExact is true, return -1 if the entry is not found.\n**\n** If bExact is false, return the index at which a new entry with\n** value y should be insert in order to keep the values in sorted\n** order.  The smallest return value in this case will be 0, and\n** the largest return value will be p->nUsed.\n*/\nstatic i64 percentBinarySearch(Percentile *p, double y, int bExact){\n  i64 iFirst = 0;                   /* First element of search range */\n  i64 iLast = (i64)p->nUsed - 1;    /* Last element of search range */\n  while( iLast>=iFirst ){\n    i64 iMid = (iFirst+iLast)/2;\n    double x = p->a[iMid];\n    if( x<y ){\n      iFirst = iMid + 1;\n    }else if( x>y ){\n      iLast = iMid - 1;\n    }else{\n      return iMid;\n    }\n  }\n  if( bExact ) return -1;\n  return iFirst;\n}\n\n/*\n** Generate an error for a percentile function.\n**\n** The error format string must have exactly one occurrence of \"%%s()\"\n** (with two '%' characters).  That substring will be replaced by the name\n** of the function.\n*/\nstatic void percentError(sqlite3_context *pCtx, const char *zFormat, ...){\n  char *zMsg1;\n  char *zMsg2;\n  va_list ap;\n\n  va_start(ap, zFormat);\n  zMsg1 = sqlite3_vmprintf(zFormat, ap);\n  va_end(ap);\n  zMsg2 = zMsg1 ? sqlite3_mprintf(zMsg1, sqlite3VdbeFuncName(pCtx)) : 0;\n  sqlite3_result_error(pCtx, zMsg2, -1);\n  sqlite3_free(zMsg1);\n  sqlite3_free(zMsg2);\n}\n\n/*\n** The \"step\" function for percentile(Y,P) is called once for each\n** input row.\n*/\nstatic void percentStep(sqlite3_context *pCtx, int argc, sqlite3_value **argv){\n  Percentile *p;\n  double rPct;\n  int eType;\n  double y;\n  assert( argc==2 || argc==1 );\n\n  if( argc==1 ){\n    /* Requirement 13:  median(Y) is the same as percentile(Y,50). */\n    rPct = 0.5;\n  }else{\n    /* P must be a number between 0 and 100 for percentile() or between\n    ** 0.0 and 1.0 for percentile_cont() and percentile_disc().\n    **\n    ** The user-data is an integer which is 10 times the upper bound.\n    */\n    double mxFrac = (SQLITE_PTR_TO_INT(sqlite3_user_data(pCtx))&2)? 100.0 : 1.0;\n    eType = sqlite3_value_numeric_type(argv[1]);\n    rPct = sqlite3_value_double(argv[1])/mxFrac;\n    if( (eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT)\n     || rPct<0.0 || rPct>1.0\n    ){\n      percentError(pCtx, \"the fraction argument to %%s()\"\n                        \" is not between 0.0 and %.1f\",\n                        (double)mxFrac);\n      return;\n    }\n  }\n\n  /* Allocate the session context. */\n  p = (Percentile*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p==0 ) return;\n\n  /* Remember the P value.  Throw an error if the P value is different\n  ** from any prior row, per Requirement (2). */\n  if( !p->bPctValid ){\n    p->rPct = rPct;\n    p->bPctValid = 1;\n  }else if( !percentSameValue(p->rPct,rPct) ){\n    percentError(pCtx, \"the fraction argument to %%s()\"\n                      \" is not the same for all input rows\");\n    return;\n  }\n\n  /* Ignore rows for which Y is NULL */\n  eType = sqlite3_value_type(argv[0]);\n  if( eType==SQLITE_NULL ) return;\n\n  /* If not NULL, then Y must be numeric.  Otherwise throw an error.\n  ** Requirement 4 */\n  if( eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT ){\n    percentError(pCtx, \"input to %%s() is not numeric\");\n    return;\n  }\n\n  /* Throw an error if the Y value is infinity or NaN */\n  y = sqlite3_value_double(argv[0]);\n  if( percentIsInfinity(y) ){\n    percentError(pCtx, \"Inf input to %%s()\");\n    return;\n  }\n\n  /* Allocate and store the Y */\n  if( p->nUsed>=p->nAlloc ){\n    u64 n = p->nAlloc*2 + 250;\n    double *a = sqlite3_realloc64(p->a, sizeof(double)*n);\n    if( a==0 ){\n      sqlite3_free(p->a);\n      memset(p, 0, sizeof(*p));\n      sqlite3_result_error_nomem(pCtx);\n      return;\n    }\n    p->nAlloc = n;\n    p->a = a;\n  }\n  if( p->nUsed==0 ){\n    p->a[p->nUsed++] = y;\n    p->bSorted = 1;\n  }else if( !p->bSorted || y>=p->a[p->nUsed-1] ){\n    p->a[p->nUsed++] = y;\n  }else if( p->bKeepSorted ){\n    i64 i;\n    i = percentBinarySearch(p, y, 0);\n    if( i<(int)p->nUsed ){\n      memmove(&p->a[i+1], &p->a[i], (p->nUsed-i)*sizeof(p->a[0]));\n    }\n    p->a[i] = y;\n    p->nUsed++;\n  }else{\n    p->a[p->nUsed++] = y;\n    p->bSorted = 0;\n  }\n}\n\n/*\n** Interchange two doubles.\n*/\n#define SWAP_DOUBLE(X,Y)  {double ttt=(X);(X)=(Y);(Y)=ttt;}\n\n/*\n** Sort an array of doubles.\n**\n** Algorithm: quicksort\n**\n** This is implemented separately rather than using the qsort() routine\n** from the standard library because:\n**\n**    (1)  To avoid a dependency on qsort()\n**    (2)  To avoid the function call to the comparison routine for each\n**         comparison.\n*/\nstatic void percentSort(double *a, unsigned int n){\n  int iLt;  /* Entries before a[iLt] are less than rPivot */\n  int iGt;  /* Entries at or after a[iGt] are greater than rPivot */\n  int i;         /* Loop counter */\n  double rPivot; /* The pivot value */\n\n  assert( n>=2 );\n  if( a[0]>a[n-1] ){\n    SWAP_DOUBLE(a[0],a[n-1])\n  }\n  if( n==2 ) return;\n  iGt = n-1;\n  i = n/2;\n  if( a[0]>a[i] ){\n    SWAP_DOUBLE(a[0],a[i])\n  }else if( a[i]>a[iGt] ){\n    SWAP_DOUBLE(a[i],a[iGt])\n  }\n  if( n==3 ) return;\n  rPivot = a[i];\n  iLt = i = 1;\n  do{\n    if( a[i]<rPivot ){\n      if( i>iLt ) SWAP_DOUBLE(a[i],a[iLt])\n      iLt++;\n      i++;\n    }else if( a[i]>rPivot ){\n      do{\n        iGt--;\n      }while( iGt>i && a[iGt]>rPivot );\n      SWAP_DOUBLE(a[i],a[iGt])\n    }else{\n      i++;\n    }\n  }while( i<iGt );\n  if( iLt>=2 ) percentSort(a, iLt);\n  if( n-iGt>=2 ) percentSort(a+iGt, n-iGt);\n\n/* Uncomment for testing */\n#if 0\n  for(i=0; i<n-1; i++){\n    assert( a[i]<=a[i+1] );\n  }\n#endif\n}\n\n\n/*\n** The \"inverse\" function for percentile(Y,P) is called to remove a\n** row that was previously inserted by \"step\".\n*/\nstatic void percentInverse(sqlite3_context *pCtx,int argc,sqlite3_value **argv){\n  Percentile *p;\n  int eType;\n  double y;\n  i64 i;\n  assert( argc==2 || argc==1 );\n\n  /* Allocate the session context. */\n  p = (Percentile*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  assert( p!=0 );\n\n  /* Ignore rows for which Y is NULL */\n  eType = sqlite3_value_type(argv[0]);\n  if( eType==SQLITE_NULL ) return;\n\n  /* If not NULL, then Y must be numeric.  Otherwise throw an error.\n  ** Requirement 4 */\n  if( eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT ){\n    return;\n  }\n\n  /* Ignore the Y value if it is infinity or NaN */\n  y = sqlite3_value_double(argv[0]);\n  if( percentIsInfinity(y) ){\n    return;\n  }\n  if( p->bSorted==0 ){\n    assert( p->nUsed>1 );\n    percentSort(p->a, p->nUsed);\n    p->bSorted = 1;\n  }\n  p->bKeepSorted = 1;\n\n  /* Find and remove the row */\n  i = percentBinarySearch(p, y, 1);\n  if( i>=0 ){\n    p->nUsed--;\n    if( i<(int)p->nUsed ){\n      memmove(&p->a[i], &p->a[i+1], (p->nUsed - i)*sizeof(p->a[0]));\n    }\n  }\n}\n\n/*\n** Compute the final output of percentile().  Clean up all allocated\n** memory if and only if bIsFinal is true.\n*/\nstatic void percentCompute(sqlite3_context *pCtx, int bIsFinal){\n  Percentile *p;\n  int settings = SQLITE_PTR_TO_INT(sqlite3_user_data(pCtx))&1; /* Discrete? */\n  unsigned i1, i2;\n  double v1, v2;\n  double ix, vx;\n  p = (Percentile*)sqlite3_aggregate_context(pCtx, 0);\n  if( p==0 ) return;\n  if( p->a==0 ) return;\n  if( p->nUsed ){\n    if( p->bSorted==0 ){\n      assert( p->nUsed>1 );\n      percentSort(p->a, p->nUsed);\n      p->bSorted = 1;\n    }\n    ix = p->rPct*(p->nUsed-1);\n    i1 = (unsigned)ix;\n    if( settings & 1 ){\n      vx = p->a[i1];\n    }else{\n      i2 = ix==(double)i1 || i1==p->nUsed-1 ? i1 : i1+1;\n      v1 = p->a[i1];\n      v2 = p->a[i2];\n      vx = v1 + (v2-v1)*(ix-i1);\n    }\n    sqlite3_result_double(pCtx, vx);\n  }\n  if( bIsFinal ){\n    sqlite3_free(p->a);\n    memset(p, 0, sizeof(*p));\n  }else{\n    p->bKeepSorted = 1;\n  }\n}\nstatic void percentFinal(sqlite3_context *pCtx){\n  percentCompute(pCtx, 1);\n}\nstatic void percentValue(sqlite3_context *pCtx){\n  percentCompute(pCtx, 0);\n}\n/****** End of percentile family of functions ******/\n#endif /* SQLITE_ENABLE_PERCENTILE */\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n/*\n** Implementation of sqlite_filestat(SCHEMA).\n**\n** Return JSON text that describes low-level debug/diagnostic information\n** about the sqlite3_file object associated with SCHEMA.\n*/\nstatic void filestatFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  const char *zDbName;\n  sqlite3_str *pStr;\n  Btree *pBtree;\n\n  zDbName = (const char*)sqlite3_value_text(argv[0]);\n  pBtree = sqlite3DbNameToBtree(db, zDbName);\n  if( pBtree ){\n    Pager *pPager;\n    sqlite3_file *fd;\n    int rc;\n    sqlite3BtreeEnter(pBtree);\n    pPager = sqlite3BtreePager(pBtree);\n    assert( pPager!=0 );\n    fd = sqlite3PagerFile(pPager);\n    pStr = sqlite3_str_new(db);\n    if( pStr==0 ){\n      sqlite3_result_error_nomem(context);\n    }else{\n      sqlite3_str_append(pStr, \"{\\\"db\\\":\", 6);\n      rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_FILESTAT, pStr);\n      if( rc ) sqlite3_str_append(pStr, \"null\", 4);\n      fd = sqlite3PagerJrnlFile(pPager);\n      if( fd && fd->pMethods!=0 ){\n        sqlite3_str_appendall(pStr, \",\\\"journal\\\":\");\n        rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_FILESTAT, pStr);\n        if( rc ) sqlite3_str_append(pStr, \"null\", 4);\n      }\n      sqlite3_str_append(pStr, \"}\", 1);\n      sqlite3_result_text(context, sqlite3_str_finish(pStr), -1,\n                          sqlite3_free);\n    }\n    sqlite3BtreeLeave(pBtree);\n  }else{\n    sqlite3_result_text(context, \"{}\", 2, SQLITE_STATIC);\n  }\n}\n#endif /* SQLITE_DEBUG || SQLITE_ENABLE_FILESTAT */\n\n#ifdef SQLITE_DEBUG\n/*\n** Implementation of fpdecode(x,y,z) function.\n**\n** x is a real number that is to be decoded.  y is the precision.\n** z is the maximum real precision.  Return a string that shows the\n** results of the sqlite3FpDecode() function.\n**\n** Used for testing and debugging only, specifically testing and debugging\n** of the sqlite3FpDecode() function.  This SQL function does not appear\n** in production builds.  This function is not an API and is subject to\n** modification or removal in future versions of SQLite.\n*/\nstatic void fpdecodeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  FpDecode s;\n  double x;\n  int y, z;\n  char zBuf[100];\n  UNUSED_PARAMETER(argc);\n  assert( argc==3 );\n  x = sqlite3_value_double(argv[0]);\n  y = sqlite3_value_int(argv[1]);\n  z = sqlite3_value_int(argv[2]);\n  if( z<=0 ) z = 1;\n  sqlite3FpDecode(&s, x, y, z);\n  if( s.isSpecial==2 ){\n    sqlite3_snprintf(sizeof(zBuf), zBuf, \"NaN\");\n  }else{\n    sqlite3_snprintf(sizeof(zBuf), zBuf, \"%c%.*s/%d\", s.sign, s.n, s.z, s.iDP);\n  }\n  sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);\n}\n#endif /* SQLITE_DEBUG */\n\n#ifdef SQLITE_DEBUG\n/*\n** Implementation of parseuri(uri,flags) function.\n**\n** Required Arguments:\n**    \"uri\"        The URI to parse.\n**    \"flags\"      Bitmask of flags, as if to sqlite3_open_v2().\n**\n** Additional arguments beyond the first two make calls to\n** sqlite3_uri_key() for integers and sqlite3_uri_parameter for\n** anything else.\n**\n** The result is a string showing the results of calling sqlite3ParseUri().\n**\n** Used for testing and debugging only, specifically testing and debugging\n** of the sqlite3ParseUri() function.  This SQL function does not appear\n** in production builds.  This function is not an API and is subject to\n** modification or removal in future versions of SQLite.\n*/\nstatic void parseuriFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  sqlite3_str *pResult;\n  const char *zVfs;\n  const char *zUri;\n  unsigned int flgs;\n  int rc;\n  sqlite3_vfs *pVfs = 0;\n  char *zFile = 0;\n  char *zErr = 0;\n\n  if( argc<2 ) return;\n  pVfs = sqlite3_vfs_find(0);\n  assert( pVfs );\n  zVfs = pVfs->zName;\n  zUri = (const char*)sqlite3_value_text(argv[0]);\n  if( zUri==0 ) return;\n  flgs = (unsigned int)sqlite3_value_int(argv[1]);\n  rc = sqlite3ParseUri(zVfs, zUri, &flgs, &pVfs, &zFile, &zErr);\n  pResult = sqlite3_str_new(0);\n  if( pResult ){\n    int i;\n    sqlite3_str_appendf(pResult, \"rc=%d\", rc);\n    sqlite3_str_appendf(pResult, \", flags=0x%x\", flgs);\n    sqlite3_str_appendf(pResult, \", vfs=%Q\", pVfs ? pVfs->zName: 0);\n    sqlite3_str_appendf(pResult, \", err=%Q\", zErr);\n    sqlite3_str_appendf(pResult, \", file=%Q\", zFile);\n    if( zFile ){\n      const char *z = zFile;\n      z += sqlite3Strlen30(z)+1;\n      while( z[0] ){\n        sqlite3_str_appendf(pResult, \", %Q\", z);\n        z += sqlite3Strlen30(z)+1;\n      }\n      for(i=2; i<argc; i++){\n        const char *zArg;\n        if( sqlite3_value_type(argv[i])==SQLITE_INTEGER ){\n          int k = sqlite3_value_int(argv[i]);\n          sqlite3_str_appendf(pResult, \", '%d:%q'\",k,sqlite3_uri_key(zFile, k));\n        }else if( (zArg = (const char*)sqlite3_value_text(argv[i]))!=0 ){\n          sqlite3_str_appendf(pResult, \", '%q:%q'\",\n                 zArg, sqlite3_uri_parameter(zFile,zArg));\n        }else{\n          sqlite3_str_appendf(pResult, \", NULL\");\n        }\n      }\n    }\n    sqlite3_result_text(ctx, sqlite3_str_finish(pResult), -1, sqlite3_free);\n  }\n  sqlite3_free_filename(zFile);\n  sqlite3_free(zErr);\n}\n#endif /* SQLITE_DEBUG */\n\n/*\n** All of the FuncDef structures in the aBuiltinFunc[] array above\n** to the global function hash table.  This occurs at start-time (as\n** a consequence of calling sqlite3_initialize()).\n**\n** After this routine runs\n*/\nSQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void){\n  /*\n  ** The following array holds FuncDef structures for all of the functions\n  ** defined in this file.\n  **\n  ** The array cannot be constant since changes are made to the\n  ** FuncDef.pHash elements at start-time.  The elements of this array\n  ** are read-only after initialization is complete.\n  **\n  ** For peak efficiency, put the most frequently used function last.\n  */\n  static FuncDef aBuiltinFunc[] = {\n/***** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS *****/\n#if !defined(SQLITE_UNTESTABLE)\n    TEST_FUNC(implies_nonnull_row, 2, INLINEFUNC_implies_nonnull_row, 0),\n    TEST_FUNC(expr_compare,        2, INLINEFUNC_expr_compare,        0),\n    TEST_FUNC(expr_implies_expr,   2, INLINEFUNC_expr_implies_expr,   0),\n    TEST_FUNC(affinity,            1, INLINEFUNC_affinity,            0),\n#endif /* !defined(SQLITE_UNTESTABLE) */\n/***** Regular functions *****/\n#ifdef SQLITE_SOUNDEX\n    FUNCTION(soundex,            1, 0, 0, soundexFunc      ),\n#endif\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n    SFUNCTION(load_extension,    1, 0, 0, loadExt          ),\n    SFUNCTION(load_extension,    2, 0, 0, loadExt          ),\n#endif\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\n    DFUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc  ),\n    DFUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc  ),\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n    INLINE_FUNC(unlikely,        1, INLINEFUNC_unlikely, SQLITE_FUNC_UNLIKELY),\n    INLINE_FUNC(likelihood,      2, INLINEFUNC_unlikely, SQLITE_FUNC_UNLIKELY),\n    INLINE_FUNC(likely,          1, INLINEFUNC_unlikely, SQLITE_FUNC_UNLIKELY),\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n    INLINE_FUNC(sqlite_offset,   1, INLINEFUNC_sqlite_offset, 0 ),\n#endif\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_FILESTAT)\n    FUNCTION(sqlite_filestat,    1, 0, 0, filestatFunc     ),\n#endif\n    FUNCTION(ltrim,              1, 1, 0, trimFunc         ),\n    FUNCTION(ltrim,              2, 1, 0, trimFunc         ),\n    FUNCTION(rtrim,              1, 2, 0, trimFunc         ),\n    FUNCTION(rtrim,              2, 2, 0, trimFunc         ),\n    FUNCTION(trim,               1, 3, 0, trimFunc         ),\n    FUNCTION(trim,               2, 3, 0, trimFunc         ),\n    FUNCTION(min,               -3, 0, 1, minmaxFunc       ),\n    WAGGREGATE(min, 1, 0, 1, minmaxStep, minMaxFinalize, minMaxValue, 0,\n                                 SQLITE_FUNC_MINMAX|SQLITE_FUNC_ANYORDER ),\n    FUNCTION(max,               -3, 1, 1, minmaxFunc       ),\n    WAGGREGATE(max, 1, 1, 1, minmaxStep, minMaxFinalize, minMaxValue, 0,\n                                 SQLITE_FUNC_MINMAX|SQLITE_FUNC_ANYORDER ),\n    FUNCTION2(typeof,            1, 0, 0, typeofFunc,  SQLITE_FUNC_TYPEOF),\n    FUNCTION2(subtype,           1, 0, 0, subtypeFunc,\n                                           SQLITE_FUNC_TYPEOF|SQLITE_SUBTYPE),\n    FUNCTION2(length,            1, 0, 0, lengthFunc,  SQLITE_FUNC_LENGTH),\n    FUNCTION2(octet_length,      1, 0, 0, bytelengthFunc,SQLITE_FUNC_BYTELEN),\n    FUNCTION(instr,              2, 0, 0, instrFunc        ),\n    FUNCTION(printf,            -1, 0, 0, printfFunc       ),\n    FUNCTION(format,            -1, 0, 0, printfFunc       ),\n    FUNCTION(unicode,            1, 0, 0, unicodeFunc      ),\n    FUNCTION(char,              -1, 0, 0, charFunc         ),\n    FUNCTION(abs,                1, 0, 0, absFunc          ),\n#ifdef SQLITE_DEBUG\n    FUNCTION(fpdecode,           3, 0, 0, fpdecodeFunc     ),\n    FUNCTION(parseuri,          -1, 0, 0, parseuriFunc     ),\n#endif\n#ifndef SQLITE_OMIT_FLOATING_POINT\n    FUNCTION(round,              1, 0, 0, roundFunc        ),\n    FUNCTION(round,              2, 0, 0, roundFunc        ),\n#endif\n    FUNCTION(upper,              1, 0, 0, upperFunc        ),\n    FUNCTION(lower,              1, 0, 0, lowerFunc        ),\n    FUNCTION(hex,                1, 0, 0, hexFunc          ),\n    FUNCTION(unhex,              1, 0, 0, unhexFunc        ),\n    FUNCTION(unhex,              2, 0, 0, unhexFunc        ),\n    FUNCTION(concat,            -3, 0, 0, concatFunc       ),\n    FUNCTION(concat_ws,         -4, 0, 0, concatwsFunc     ),\n    INLINE_FUNC(ifnull,          2, INLINEFUNC_coalesce, 0 ),\n    VFUNCTION(random,            0, 0, 0, randomFunc       ),\n    VFUNCTION(randomblob,        1, 0, 0, randomBlob       ),\n    FUNCTION(nullif,             2, 0, 1, nullifFunc       ),\n    DFUNCTION(sqlite_version,    0, 0, 0, versionFunc      ),\n    DFUNCTION(sqlite_source_id,  0, 0, 0, sourceidFunc     ),\n    FUNCTION(sqlite_log,         2, 0, 0, errlogFunc       ),\n    FUNCTION(unistr,             1, 0, 0, unistrFunc       ),\n    FUNCTION(quote,              1, 0, 0, quoteFunc        ),\n    FUNCTION(unistr_quote,       1, 1, 0, quoteFunc        ),\n    VFUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid),\n    VFUNCTION(changes,           0, 0, 0, changes          ),\n    VFUNCTION(total_changes,     0, 0, 0, total_changes    ),\n    FUNCTION(replace,            3, 0, 0, replaceFunc      ),\n    FUNCTION(zeroblob,           1, 0, 0, zeroblobFunc     ),\n    FUNCTION(substr,             2, 0, 0, substrFunc       ),\n    FUNCTION(substr,             3, 0, 0, substrFunc       ),\n    FUNCTION(substring,          2, 0, 0, substrFunc       ),\n    FUNCTION(substring,          3, 0, 0, substrFunc       ),\n    WAGGREGATE(sum,   1,0,0, sumStep, sumFinalize, sumFinalize, sumInverse, 0),\n    WAGGREGATE(total, 1,0,0, sumStep,totalFinalize,totalFinalize,sumInverse, 0),\n    WAGGREGATE(avg,   1,0,0, sumStep, avgFinalize, avgFinalize, sumInverse, 0),\n    WAGGREGATE(count, 0,0,0, countStep,\n        countFinalize, countFinalize, countInverse,\n        SQLITE_FUNC_COUNT|SQLITE_FUNC_ANYORDER  ),\n    WAGGREGATE(count, 1,0,0, countStep,\n        countFinalize, countFinalize, countInverse, SQLITE_FUNC_ANYORDER ),\n    WAGGREGATE(group_concat, 1, 0, 0, groupConcatStep,\n        groupConcatFinalize, groupConcatValue, groupConcatInverse, 0),\n    WAGGREGATE(group_concat, 2, 0, 0, groupConcatStep,\n        groupConcatFinalize, groupConcatValue, groupConcatInverse, 0),\n    WAGGREGATE(string_agg,   2, 0, 0, groupConcatStep,\n        groupConcatFinalize, groupConcatValue, groupConcatInverse, 0),\n\n#ifdef SQLITE_ENABLE_PERCENTILE\n    WAGGREGATE(median,          1,   0,0, percentStep,\n        percentFinal, percentValue, percentInverse,\n        SQLITE_INNOCUOUS|SQLITE_SELFORDER1),\n    WAGGREGATE(percentile,      2, 0x2,0, percentStep,\n        percentFinal, percentValue, percentInverse,\n        SQLITE_INNOCUOUS|SQLITE_SELFORDER1),\n    WAGGREGATE(percentile_cont, 2,   0,0, percentStep,\n        percentFinal, percentValue, percentInverse,\n        SQLITE_INNOCUOUS|SQLITE_SELFORDER1),\n    WAGGREGATE(percentile_disc, 2, 0x1,0, percentStep,\n        percentFinal, percentValue, percentInverse,\n        SQLITE_INNOCUOUS|SQLITE_SELFORDER1),\n#endif /* SQLITE_ENABLE_PERCENTILE */\n\n    LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\n#ifdef SQLITE_CASE_SENSITIVE_LIKE\n    LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\n    LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\n#else\n    LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE),\n    LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE),\n#endif\n#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION\n    FUNCTION(unknown,           -1, 0, 0, unknownFunc      ),\n#endif\n#ifdef SQLITE_ENABLE_MATH_FUNCTIONS\n    MFUNCTION(ceil,              1, xCeil,     ceilingFunc ),\n    MFUNCTION(ceiling,           1, xCeil,     ceilingFunc ),\n    MFUNCTION(floor,             1, xFloor,    ceilingFunc ),\n#if SQLITE_HAVE_C99_MATH_FUNCS\n    MFUNCTION(trunc,             1, trunc,     ceilingFunc ),\n#endif\n    FUNCTION(ln,                 1, 0, 0,      logFunc     ),\n    FUNCTION(log,                1, 1, 0,      logFunc     ),\n    FUNCTION(log10,              1, 1, 0,      logFunc     ),\n    FUNCTION(log2,               1, 2, 0,      logFunc     ),\n    FUNCTION(log,                2, 0, 0,      logFunc     ),\n    MFUNCTION(exp,               1, exp,       math1Func   ),\n    MFUNCTION(pow,               2, pow,       math2Func   ),\n    MFUNCTION(power,             2, pow,       math2Func   ),\n    MFUNCTION(mod,               2, fmod,      math2Func   ),\n    MFUNCTION(acos,              1, acos,      math1Func   ),\n    MFUNCTION(asin,              1, asin,      math1Func   ),\n    MFUNCTION(atan,              1, atan,      math1Func   ),\n    MFUNCTION(atan2,             2, atan2,     math2Func   ),\n    MFUNCTION(cos,               1, cos,       math1Func   ),\n    MFUNCTION(sin,               1, sin,       math1Func   ),\n    MFUNCTION(tan,               1, tan,       math1Func   ),\n    MFUNCTION(cosh,              1, cosh,      math1Func   ),\n    MFUNCTION(sinh,              1, sinh,      math1Func   ),\n    MFUNCTION(tanh,              1, tanh,      math1Func   ),\n#if SQLITE_HAVE_C99_MATH_FUNCS\n    MFUNCTION(acosh,             1, acosh,     math1Func   ),\n    MFUNCTION(asinh,             1, asinh,     math1Func   ),\n    MFUNCTION(atanh,             1, atanh,     math1Func   ),\n#endif\n    MFUNCTION(sqrt,              1, sqrt,      math1Func   ),\n    MFUNCTION(radians,           1, degToRad,  math1Func   ),\n    MFUNCTION(degrees,           1, radToDeg,  math1Func   ),\n    MFUNCTION(pi,                0, 0,         piFunc      ),\n#endif /* SQLITE_ENABLE_MATH_FUNCTIONS */\n    FUNCTION(sign,               1, 0, 0,      signFunc    ),\n    INLINE_FUNC(coalesce,       -4, INLINEFUNC_coalesce, 0 ),\n    INLINE_FUNC(iif,            -4, INLINEFUNC_iif,      0 ),\n    INLINE_FUNC(if,             -4, INLINEFUNC_iif,      0 ),\n  };\n#ifndef SQLITE_OMIT_ALTERTABLE\n  sqlite3AlterFunctions();\n#endif\n  sqlite3WindowFunctions();\n  sqlite3RegisterDateTimeFunctions();\n  sqlite3RegisterJsonFunctions();\n  sqlite3InsertBuiltinFuncs(aBuiltinFunc, ArraySize(aBuiltinFunc));\n\n#if 0  /* Enable to print out how the built-in functions are hashed */\n  {\n    int i;\n    FuncDef *p;\n    for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){\n      printf(\"FUNC-HASH %02d:\", i);\n      for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash){\n        int n = sqlite3Strlen30(p->zName);\n        int h = p->zName[0] + n;\n        assert( p->funcFlags & SQLITE_FUNC_BUILTIN );\n        printf(\" %s(%d)\", p->zName, h);\n      }\n      printf(\"\\n\");\n    }\n  }\n#endif\n}\n\n/************** End of func.c ************************************************/\n/************** Begin file fkey.c ********************************************/\n/*\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used by the compiler to add foreign key\n** support to compiled SQL statements.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n#ifndef SQLITE_OMIT_TRIGGER\n\n/*\n** Deferred and Immediate FKs\n** --------------------------\n**\n** Foreign keys in SQLite come in two flavours: deferred and immediate.\n** If an immediate foreign key constraint is violated,\n** SQLITE_CONSTRAINT_FOREIGNKEY is returned and the current\n** statement transaction rolled back. If a\n** deferred foreign key constraint is violated, no action is taken\n** immediately. However if the application attempts to commit the\n** transaction before fixing the constraint violation, the attempt fails.\n**\n** Deferred constraints are implemented using a simple counter associated\n** with the database handle. The counter is set to zero each time a\n** database transaction is opened. Each time a statement is executed\n** that causes a foreign key violation, the counter is incremented. Each\n** time a statement is executed that removes an existing violation from\n** the database, the counter is decremented. When the transaction is\n** committed, the commit fails if the current value of the counter is\n** greater than zero. This scheme has two big drawbacks:\n**\n**   * When a commit fails due to a deferred foreign key constraint,\n**     there is no way to tell which foreign constraint is not satisfied,\n**     or which row it is not satisfied for.\n**\n**   * If the database contains foreign key violations when the\n**     transaction is opened, this may cause the mechanism to malfunction.\n**\n** Despite these problems, this approach is adopted as it seems simpler\n** than the alternatives.\n**\n** INSERT operations:\n**\n**   I.1) For each FK for which the table is the child table, search\n**        the parent table for a match. If none is found increment the\n**        constraint counter.\n**\n**   I.2) For each FK for which the table is the parent table,\n**        search the child table for rows that correspond to the new\n**        row in the parent table. Decrement the counter for each row\n**        found (as the constraint is now satisfied).\n**\n** DELETE operations:\n**\n**   D.1) For each FK for which the table is the child table,\n**        search the parent table for a row that corresponds to the\n**        deleted row in the child table. If such a row is not found,\n**        decrement the counter.\n**\n**   D.2) For each FK for which the table is the parent table, search\n**        the child table for rows that correspond to the deleted row\n**        in the parent table. For each found increment the counter.\n**\n** UPDATE operations:\n**\n**   An UPDATE command requires that all 4 steps above are taken, but only\n**   for FK constraints for which the affected columns are actually\n**   modified (values must be compared at runtime).\n**\n** Note that I.1 and D.1 are very similar operations, as are I.2 and D.2.\n** This simplifies the implementation a bit.\n**\n** For the purposes of immediate FK constraints, the OR REPLACE conflict\n** resolution is considered to delete rows before the new row is inserted.\n** If a delete caused by OR REPLACE violates an FK constraint, an exception\n** is thrown, even if the FK constraint would be satisfied after the new\n** row is inserted.\n**\n** Immediate constraints are usually handled similarly. The only difference\n** is that the counter used is stored as part of each individual statement\n** object (struct Vdbe). If, after the statement has run, its immediate\n** constraint counter is greater than zero,\n** it returns SQLITE_CONSTRAINT_FOREIGNKEY\n** and the statement transaction is rolled back. An exception is an INSERT\n** statement that inserts a single row only (no triggers). In this case,\n** instead of using a counter, an exception is thrown immediately if the\n** INSERT violates a foreign key constraint. This is necessary as such\n** an INSERT does not open a statement transaction.\n**\n** TODO: How should dropping a table be handled? How should renaming a\n** table be handled?\n**\n**\n** Query API Notes\n** ---------------\n**\n** Before coding an UPDATE or DELETE row operation, the code-generator\n** for those two operations needs to know whether or not the operation\n** requires any FK processing and, if so, which columns of the original\n** row are required by the FK processing VDBE code (i.e. if FKs were\n** implemented using triggers, which of the old.* columns would be\n** accessed). No information is required by the code-generator before\n** coding an INSERT operation. The functions used by the UPDATE/DELETE\n** generation code to query for this information are:\n**\n**   sqlite3FkRequired() - Test to see if FK processing is required.\n**   sqlite3FkOldmask()  - Query for the set of required old.* columns.\n**\n**\n** Externally accessible module functions\n** --------------------------------------\n**\n**   sqlite3FkCheck()    - Check for foreign key violations.\n**   sqlite3FkActions()  - Code triggers for ON UPDATE/ON DELETE actions.\n**   sqlite3FkDelete()   - Delete an FKey structure.\n*/\n\n/*\n** VDBE Calling Convention\n** -----------------------\n**\n** Example:\n**\n**   For the following INSERT statement:\n**\n**     CREATE TABLE t1(a, b INTEGER PRIMARY KEY, c);\n**     INSERT INTO t1 VALUES(1, 2, 3.1);\n**\n**   Register (x):        2    (type integer)\n**   Register (x+1):      1    (type integer)\n**   Register (x+2):      NULL (type NULL)\n**   Register (x+3):      3.1  (type real)\n*/\n\n/*\n** A foreign key constraint requires that the key columns in the parent\n** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.\n** Given that pParent is the parent table for foreign key constraint pFKey,\n** search the schema for a unique index on the parent key columns.\n**\n** If successful, zero is returned. If the parent key is an INTEGER PRIMARY\n** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx\n** is set to point to the unique index.\n**\n** If the parent key consists of a single column (the foreign key constraint\n** is not a composite foreign key), output variable *paiCol is set to NULL.\n** Otherwise, it is set to point to an allocated array of size N, where\n** N is the number of columns in the parent key. The first element of the\n** array is the index of the child table column that is mapped by the FK\n** constraint to the parent table column stored in the left-most column\n** of index *ppIdx. The second element of the array is the index of the\n** child table column that corresponds to the second left-most column of\n** *ppIdx, and so on.\n**\n** If the required index cannot be found, either because:\n**\n**   1) The named parent key columns do not exist, or\n**\n**   2) The named parent key columns do exist, but are not subject to a\n**      UNIQUE or PRIMARY KEY constraint, or\n**\n**   3) No parent key columns were provided explicitly as part of the\n**      foreign key definition, and the parent table does not have a\n**      PRIMARY KEY, or\n**\n**   4) No parent key columns were provided explicitly as part of the\n**      foreign key definition, and the PRIMARY KEY of the parent table\n**      consists of a different number of columns to the child key in\n**      the child table.\n**\n** then non-zero is returned, and a \"foreign key mismatch\" error loaded\n** into pParse. If an OOM error occurs, non-zero is returned and the\n** pParse->db->mallocFailed flag is set.\n*/\nSQLITE_PRIVATE int sqlite3FkLocateIndex(\n  Parse *pParse,                  /* Parse context to store any error in */\n  Table *pParent,                 /* Parent table of FK constraint pFKey */\n  FKey *pFKey,                    /* Foreign key to find index for */\n  Index **ppIdx,                  /* OUT: Unique index on parent table */\n  int **paiCol                    /* OUT: Map of index columns in pFKey */\n){\n  Index *pIdx = 0;                    /* Value to return via *ppIdx */\n  int *aiCol = 0;                     /* Value to return via *paiCol */\n  int nCol = pFKey->nCol;             /* Number of columns in parent key */\n  char *zKey = pFKey->aCol[0].zCol;   /* Name of left-most parent key column */\n\n  /* The caller is responsible for zeroing output parameters. */\n  assert( ppIdx && *ppIdx==0 );\n  assert( !paiCol || *paiCol==0 );\n  assert( pParse );\n\n  /* If this is a non-composite (single column) foreign key, check if it\n  ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx\n  ** and *paiCol set to zero and return early.\n  **\n  ** Otherwise, for a composite foreign key (more than one column), allocate\n  ** space for the aiCol array (returned via output parameter *paiCol).\n  ** Non-composite foreign keys do not require the aiCol array.\n  */\n  if( nCol==1 ){\n    /* The FK maps to the IPK if any of the following are true:\n    **\n    **   1) There is an INTEGER PRIMARY KEY column and the FK is implicitly\n    **      mapped to the primary key of table pParent, or\n    **   2) The FK is explicitly mapped to a column declared as INTEGER\n    **      PRIMARY KEY.\n    */\n    if( pParent->iPKey>=0 ){\n      if( !zKey ) return 0;\n      if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zCnName, zKey) ){\n        return 0;\n      }\n    }\n  }else if( paiCol ){\n    assert( nCol>1 );\n    aiCol = (int *)sqlite3DbMallocRawNN(pParse->db, nCol*sizeof(int));\n    if( !aiCol ) return 1;\n    *paiCol = aiCol;\n  }\n\n  for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){\n    if( pIdx->nKeyCol==nCol && IsUniqueIndex(pIdx) && pIdx->pPartIdxWhere==0 ){\n      /* pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number\n      ** of columns. If each indexed column corresponds to a foreign key\n      ** column of pFKey, then this index is a winner.  */\n\n      if( zKey==0 ){\n        /* If zKey is NULL, then this foreign key is implicitly mapped to\n        ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be\n        ** identified by the test.  */\n        if( IsPrimaryKeyIndex(pIdx) ){\n          if( aiCol ){\n            int i;\n            for(i=0; i<nCol; i++) aiCol[i] = pFKey->aCol[i].iFrom;\n          }\n          break;\n        }\n      }else{\n        /* If zKey is non-NULL, then this foreign key was declared to\n        ** map to an explicit list of columns in table pParent. Check if this\n        ** index matches those columns. Also, check that the index uses\n        ** the default collation sequences for each column. */\n        int i, j;\n        for(i=0; i<nCol; i++){\n          i16 iCol = pIdx->aiColumn[i];     /* Index of column in parent tbl */\n          const char *zDfltColl;            /* Def. collation for column */\n          char *zIdxCol;                    /* Name of indexed column */\n\n          if( iCol<0 ) break; /* No foreign keys against expression indexes */\n\n          /* If the index uses a collation sequence that is different from\n          ** the default collation sequence for the column, this index is\n          ** unusable. Bail out early in this case.  */\n          zDfltColl = sqlite3ColumnColl(&pParent->aCol[iCol]);\n          if( !zDfltColl ) zDfltColl = sqlite3StrBINARY;\n          if( sqlite3StrICmp(pIdx->azColl[i], zDfltColl) ) break;\n\n          zIdxCol = pParent->aCol[iCol].zCnName;\n          for(j=0; j<nCol; j++){\n            if( sqlite3StrICmp(pFKey->aCol[j].zCol, zIdxCol)==0 ){\n              if( aiCol ) aiCol[i] = pFKey->aCol[j].iFrom;\n              break;\n            }\n          }\n          if( j==nCol ) break;\n        }\n        if( i==nCol ) break;      /* pIdx is usable */\n      }\n    }\n  }\n\n  if( !pIdx ){\n    if( !pParse->disableTriggers ){\n      sqlite3ErrorMsg(pParse,\n           \"foreign key mismatch - \\\"%w\\\" referencing \\\"%w\\\"\",\n           pFKey->pFrom->zName, pFKey->zTo);\n    }\n    sqlite3DbFree(pParse->db, aiCol);\n    return 1;\n  }\n\n  *ppIdx = pIdx;\n  return 0;\n}\n\n/*\n** This function is called when a row is inserted into or deleted from the\n** child table of foreign key constraint pFKey. If an SQL UPDATE is executed\n** on the child table of pFKey, this function is invoked twice for each row\n** affected - once to \"delete\" the old row, and then again to \"insert\" the\n** new row.\n**\n** Each time it is called, this function generates VDBE code to locate the\n** row in the parent table that corresponds to the row being inserted into\n** or deleted from the child table. If the parent row can be found, no\n** special action is taken. Otherwise, if the parent row can *not* be\n** found in the parent table:\n**\n**   Operation | FK type   | Action taken\n**   --------------------------------------------------------------------------\n**   INSERT      immediate   Increment the \"immediate constraint counter\".\n**\n**   DELETE      immediate   Decrement the \"immediate constraint counter\".\n**\n**   INSERT      deferred    Increment the \"deferred constraint counter\".\n**\n**   DELETE      deferred    Decrement the \"deferred constraint counter\".\n**\n** These operations are identified in the comment at the top of this file\n** (fkey.c) as \"I.1\" and \"D.1\".\n*/\nstatic void fkLookupParent(\n  Parse *pParse,        /* Parse context */\n  int iDb,              /* Index of database housing pTab */\n  Table *pTab,          /* Parent table of FK pFKey */\n  Index *pIdx,          /* Unique index on parent key columns in pTab */\n  FKey *pFKey,          /* Foreign key constraint */\n  int *aiCol,           /* Map from parent key columns to child table columns */\n  int regData,          /* Address of array containing child table row */\n  int nIncr,            /* Increment constraint counter by this */\n  int isIgnore          /* If true, pretend pTab contains all NULL values */\n){\n  int i;                                    /* Iterator variable */\n  Vdbe *v = sqlite3GetVdbe(pParse);         /* Vdbe to add code to */\n  int iCur = pParse->nTab - 1;              /* Cursor number to use */\n  int iOk = sqlite3VdbeMakeLabel(pParse);   /* jump here if parent key found */\n\n  sqlite3VdbeVerifyAbortable(v,\n    (!pFKey->isDeferred\n      && !(pParse->db->flags & SQLITE_DeferFKs)\n      && !pParse->pToplevel\n      && !pParse->isMultiWrite) ? OE_Abort : OE_Ignore);\n\n  /* If nIncr is less than zero, then check at runtime if there are any\n  ** outstanding constraints to resolve. If there are not, there is no need\n  ** to check if deleting this row resolves any outstanding violations.\n  **\n  ** Check if any of the key columns in the child table row are NULL. If\n  ** any are, then the constraint is considered satisfied. No need to\n  ** search for a matching row in the parent table.  */\n  if( nIncr<0 ){\n    sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, iOk);\n    VdbeCoverage(v);\n  }\n  for(i=0; i<pFKey->nCol; i++){\n    int iReg = sqlite3TableColumnToStorage(pFKey->pFrom,aiCol[i]) + regData + 1;\n    sqlite3VdbeAddOp2(v, OP_IsNull, iReg, iOk); VdbeCoverage(v);\n  }\n\n  if( isIgnore==0 ){\n    if( pIdx==0 ){\n      /* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY\n      ** column of the parent table (table pTab).  */\n      int iMustBeInt;               /* Address of MustBeInt instruction */\n      int regTemp = sqlite3GetTempReg(pParse);\n\n      /* Invoke MustBeInt to coerce the child key value to an integer (i.e.\n      ** apply the affinity of the parent key). If this fails, then there\n      ** is no matching parent key. Before using MustBeInt, make a copy of\n      ** the value. Otherwise, the value inserted into the child key column\n      ** will have INTEGER affinity applied to it, which may not be correct.  */\n      sqlite3VdbeAddOp2(v, OP_SCopy,\n        sqlite3TableColumnToStorage(pFKey->pFrom,aiCol[0])+1+regData, regTemp);\n      iMustBeInt = sqlite3VdbeAddOp2(v, OP_MustBeInt, regTemp, 0);\n      VdbeCoverage(v);\n\n      /* If the parent table is the same as the child table, and we are about\n      ** to increment the constraint-counter (i.e. this is an INSERT operation),\n      ** then check if the row being inserted matches itself. If so, do not\n      ** increment the constraint-counter.  */\n      if( pTab==pFKey->pFrom && nIncr==1 ){\n        sqlite3VdbeAddOp3(v, OP_Eq, regData, iOk, regTemp); VdbeCoverage(v);\n        sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);\n      }\n\n      sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);\n      sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regTemp); VdbeCoverage(v);\n      sqlite3VdbeGoto(v, iOk);\n      sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);\n      sqlite3VdbeJumpHere(v, iMustBeInt);\n      sqlite3ReleaseTempReg(pParse, regTemp);\n    }else{\n      int nCol = pFKey->nCol;\n      int regTemp = sqlite3GetTempRange(pParse, nCol);\n\n      sqlite3VdbeAddOp3(v, OP_OpenRead, iCur, pIdx->tnum, iDb);\n      sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n      for(i=0; i<nCol; i++){\n        sqlite3VdbeAddOp2(v, OP_Copy,\n               sqlite3TableColumnToStorage(pFKey->pFrom, aiCol[i])+1+regData,\n               regTemp+i);\n      }\n\n      /* If the parent table is the same as the child table, and we are about\n      ** to increment the constraint-counter (i.e. this is an INSERT operation),\n      ** then check if the row being inserted matches itself. If so, do not\n      ** increment the constraint-counter.\n      **\n      ** If any of the parent-key values are NULL, then the row cannot match\n      ** itself. So set JUMPIFNULL to make sure we do the OP_Found if any\n      ** of the parent-key values are NULL (at this point it is known that\n      ** none of the child key values are).\n      */\n      if( pTab==pFKey->pFrom && nIncr==1 ){\n        int iJump = sqlite3VdbeCurrentAddr(v) + nCol + 1;\n        for(i=0; i<nCol; i++){\n          int iChild = sqlite3TableColumnToStorage(pFKey->pFrom,aiCol[i])\n                              +1+regData;\n          int iParent = 1+regData;\n          iParent += sqlite3TableColumnToStorage(pIdx->pTable,\n                                                 pIdx->aiColumn[i]);\n          assert( pIdx->aiColumn[i]>=0 );\n          assert( aiCol[i]!=pTab->iPKey );\n          if( pIdx->aiColumn[i]==pTab->iPKey ){\n            /* The parent key is a composite key that includes the IPK column */\n            iParent = regData;\n          }\n          sqlite3VdbeAddOp3(v, OP_Ne, iChild, iJump, iParent); VdbeCoverage(v);\n          sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);\n        }\n        sqlite3VdbeGoto(v, iOk);\n      }\n\n      sqlite3VdbeAddOp4(v, OP_Affinity, regTemp, nCol, 0,\n                        sqlite3IndexAffinityStr(pParse->db,pIdx), nCol);\n      sqlite3VdbeAddOp4Int(v, OP_Found, iCur, iOk, regTemp, nCol);\n      VdbeCoverage(v);\n      sqlite3ReleaseTempRange(pParse, regTemp, nCol);\n    }\n  }\n\n  if( !pFKey->isDeferred && !(pParse->db->flags & SQLITE_DeferFKs)\n   && !pParse->pToplevel\n   && !pParse->isMultiWrite\n  ){\n    /* Special case: If this is an INSERT statement that will insert exactly\n    ** one row into the table, raise a constraint immediately instead of\n    ** incrementing a counter. This is necessary as the VM code is being\n    ** generated for will not open a statement transaction.  */\n    assert( nIncr==1 );\n    sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,\n        OE_Abort, 0, P4_STATIC, P5_ConstraintFK);\n  }else{\n    if( nIncr>0 && pFKey->isDeferred==0 ){\n      sqlite3MayAbort(pParse);\n    }\n    sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);\n  }\n\n  sqlite3VdbeResolveLabel(v, iOk);\n  sqlite3VdbeAddOp1(v, OP_Close, iCur);\n}\n\n\n/*\n** Return an Expr object that refers to a memory register corresponding\n** to column iCol of table pTab.\n**\n** regBase is the first of an array of register that contains the data\n** for pTab.  regBase itself holds the rowid.  regBase+1 holds the first\n** column.  regBase+2 holds the second column, and so forth.\n*/\nstatic Expr *exprTableRegister(\n  Parse *pParse,     /* Parsing and code generating context */\n  Table *pTab,       /* The table whose content is at r[regBase]... */\n  int regBase,       /* Contents of table pTab */\n  i16 iCol           /* Which column of pTab is desired */\n){\n  Expr *pExpr;\n  Column *pCol;\n  const char *zColl;\n  sqlite3 *db = pParse->db;\n\n  pExpr = sqlite3Expr(db, TK_REGISTER, 0);\n  if( pExpr ){\n    if( iCol>=0 && iCol!=pTab->iPKey ){\n      pCol = &pTab->aCol[iCol];\n      pExpr->iTable = regBase + sqlite3TableColumnToStorage(pTab,iCol) + 1;\n      pExpr->affExpr = pCol->affinity;\n      zColl = sqlite3ColumnColl(pCol);\n      if( zColl==0 ) zColl = db->pDfltColl->zName;\n      pExpr = sqlite3ExprAddCollateString(pParse, pExpr, zColl);\n    }else{\n      pExpr->iTable = regBase;\n      pExpr->affExpr = SQLITE_AFF_INTEGER;\n    }\n  }\n  return pExpr;\n}\n\n/*\n** Return an Expr object that refers to column iCol of table pTab which\n** has cursor iCur.\n*/\nstatic Expr *exprTableColumn(\n  sqlite3 *db,      /* The database connection */\n  Table *pTab,      /* The table whose column is desired */\n  int iCursor,      /* The open cursor on the table */\n  i16 iCol          /* The column that is wanted */\n){\n  Expr *pExpr = sqlite3Expr(db, TK_COLUMN, 0);\n  if( pExpr ){\n    assert( ExprUseYTab(pExpr) );\n    pExpr->y.pTab = pTab;\n    pExpr->iTable = iCursor;\n    pExpr->iColumn = iCol;\n  }\n  return pExpr;\n}\n\n/*\n** This function is called to generate code executed when a row is deleted\n** from the parent table of foreign key constraint pFKey and, if pFKey is\n** deferred, when a row is inserted into the same table. When generating\n** code for an SQL UPDATE operation, this function may be called twice -\n** once to \"delete\" the old row and once to \"insert\" the new row.\n**\n** Parameter nIncr is passed -1 when inserting a row (as this may decrease\n** the number of FK violations in the db) or +1 when deleting one (as this\n** may increase the number of FK constraint problems).\n**\n** The code generated by this function scans through the rows in the child\n** table that correspond to the parent table row being deleted or inserted.\n** For each child row found, one of the following actions is taken:\n**\n**   Operation | FK type   | Action taken\n**   --------------------------------------------------------------------------\n**   DELETE      immediate   Increment the \"immediate constraint counter\".\n**\n**   INSERT      immediate   Decrement the \"immediate constraint counter\".\n**\n**   DELETE      deferred    Increment the \"deferred constraint counter\".\n**\n**   INSERT      deferred    Decrement the \"deferred constraint counter\".\n**\n** These operations are identified in the comment at the top of this file\n** (fkey.c) as \"I.2\" and \"D.2\".\n*/\nstatic void fkScanChildren(\n  Parse *pParse,                  /* Parse context */\n  SrcList *pSrc,                  /* The child table to be scanned */\n  Table *pTab,                    /* The parent table */\n  Index *pIdx,                    /* Index on parent covering the foreign key */\n  FKey *pFKey,                    /* The foreign key linking pSrc to pTab */\n  int *aiCol,                     /* Map from pIdx cols to child table cols */\n  int regData,                    /* Parent row data starts here */\n  int nIncr                       /* Amount to increment deferred counter by */\n){\n  sqlite3 *db = pParse->db;       /* Database handle */\n  int i;                          /* Iterator variable */\n  Expr *pWhere = 0;               /* WHERE clause to scan with */\n  NameContext sNameContext;       /* Context used to resolve WHERE clause */\n  WhereInfo *pWInfo;              /* Context used by sqlite3WhereXXX() */\n  int iFkIfZero = 0;              /* Address of OP_FkIfZero */\n  Vdbe *v = sqlite3GetVdbe(pParse);\n\n  assert( pIdx==0 || pIdx->pTable==pTab );\n  assert( pIdx==0 || pIdx->nKeyCol==pFKey->nCol );\n  assert( pIdx!=0 || pFKey->nCol==1 );\n  assert( pIdx!=0 || HasRowid(pTab) );\n\n  if( nIncr<0 ){\n    iFkIfZero = sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, 0);\n    VdbeCoverage(v);\n  }\n\n  /* Create an Expr object representing an SQL expression like:\n  **\n  **   <parent-key1> = <child-key1> AND <parent-key2> = <child-key2> ...\n  **\n  ** The collation sequence used for the comparison should be that of\n  ** the parent key columns. The affinity of the parent key column should\n  ** be applied to each child key value before the comparison takes place.\n  */\n  for(i=0; i<pFKey->nCol; i++){\n    Expr *pLeft;                  /* Value from parent table row */\n    Expr *pRight;                 /* Column ref to child table */\n    Expr *pEq;                    /* Expression (pLeft = pRight) */\n    i16 iCol;                     /* Index of column in child table */\n    const char *zCol;             /* Name of column in child table */\n\n    iCol = pIdx ? pIdx->aiColumn[i] : -1;\n    pLeft = exprTableRegister(pParse, pTab, regData, iCol);\n    iCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;\n    assert( iCol>=0 );\n    zCol = pFKey->pFrom->aCol[iCol].zCnName;\n    pRight = sqlite3Expr(db, TK_ID, zCol);\n    pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight);\n    pWhere = sqlite3ExprAnd(pParse, pWhere, pEq);\n  }\n\n  /* If the child table is the same as the parent table, then add terms\n  ** to the WHERE clause that prevent this entry from being scanned.\n  ** The added WHERE clause terms are like this:\n  **\n  **     $current_rowid!=rowid\n  **     NOT( $current_a==a AND $current_b==b AND ... )\n  **\n  ** The first form is used for rowid tables.  The second form is used\n  ** for WITHOUT ROWID tables. In the second form, the *parent* key is\n  ** (a,b,...). Either the parent or primary key could be used to\n  ** uniquely identify the current row, but the parent key is more convenient\n  ** as the required values have already been loaded into registers\n  ** by the caller.\n  */\n  if( pTab==pFKey->pFrom && nIncr>0 ){\n    Expr *pNe;                    /* Expression (pLeft != pRight) */\n    Expr *pLeft;                  /* Value from parent table row */\n    Expr *pRight;                 /* Column ref to child table */\n    if( HasRowid(pTab) ){\n      pLeft = exprTableRegister(pParse, pTab, regData, -1);\n      pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, -1);\n      pNe = sqlite3PExpr(pParse, TK_NE, pLeft, pRight);\n    }else{\n      Expr *pEq, *pAll = 0;\n      assert( pIdx!=0 );\n      for(i=0; i<pIdx->nKeyCol; i++){\n        i16 iCol = pIdx->aiColumn[i];\n        assert( iCol>=0 );\n        pLeft = exprTableRegister(pParse, pTab, regData, iCol);\n        pRight = sqlite3Expr(db, TK_ID, pTab->aCol[iCol].zCnName);\n        pEq = sqlite3PExpr(pParse, TK_IS, pLeft, pRight);\n        pAll = sqlite3ExprAnd(pParse, pAll, pEq);\n      }\n      pNe = sqlite3PExpr(pParse, TK_NOT, pAll, 0);\n    }\n    pWhere = sqlite3ExprAnd(pParse, pWhere, pNe);\n  }\n\n  /* Resolve the references in the WHERE clause. */\n  memset(&sNameContext, 0, sizeof(NameContext));\n  sNameContext.pSrcList = pSrc;\n  sNameContext.pParse = pParse;\n  sqlite3ResolveExprNames(&sNameContext, pWhere);\n\n  /* Create VDBE to loop through the entries in pSrc that match the WHERE\n  ** clause. For each row found, increment either the deferred or immediate\n  ** foreign key constraint counter. */\n  if( pParse->nErr==0 ){\n    pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0, 0, 0, 0, 0);\n    sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);\n    if( pWInfo ){\n      sqlite3WhereEnd(pWInfo);\n    }\n  }\n\n  /* Clean up the WHERE clause constructed above. */\n  sqlite3ExprDelete(db, pWhere);\n  if( iFkIfZero ){\n    sqlite3VdbeJumpHereOrPopInst(v, iFkIfZero);\n  }\n}\n\n/*\n** This function returns a linked list of FKey objects (connected by\n** FKey.pNextTo) holding all children of table pTab.  For example,\n** given the following schema:\n**\n**   CREATE TABLE t1(a PRIMARY KEY);\n**   CREATE TABLE t2(b REFERENCES t1(a);\n**\n** Calling this function with table \"t1\" as an argument returns a pointer\n** to the FKey structure representing the foreign key constraint on table\n** \"t2\". Calling this function with \"t2\" as the argument would return a\n** NULL pointer (as there are no FK constraints for which t2 is the parent\n** table).\n*/\nSQLITE_PRIVATE FKey *sqlite3FkReferences(Table *pTab){\n  return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName);\n}\n\n/*\n** The second argument is a Trigger structure allocated by the\n** fkActionTrigger() routine. This function deletes the Trigger structure\n** and all of its sub-components.\n**\n** The Trigger structure or any of its sub-components may be allocated from\n** the lookaside buffer belonging to database handle dbMem.\n*/\nstatic void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){\n  if( p ){\n    TriggerStep *pStep = p->step_list;\n    sqlite3ExprDelete(dbMem, pStep->pWhere);\n    sqlite3ExprListDelete(dbMem, pStep->pExprList);\n    sqlite3SelectDelete(dbMem, pStep->pSelect);\n    sqlite3ExprDelete(dbMem, p->pWhen);\n    sqlite3DbFree(dbMem, p);\n  }\n}\n\n/*\n** Clear the apTrigger[] cache of CASCADE triggers for all foreign keys\n** in a particular database.  This needs to happen when the schema\n** changes.\n*/\nSQLITE_PRIVATE void sqlite3FkClearTriggerCache(sqlite3 *db, int iDb){\n  HashElem *k;\n  Hash *pHash = &db->aDb[iDb].pSchema->tblHash;\n  for(k=sqliteHashFirst(pHash); k; k=sqliteHashNext(k)){\n    Table *pTab = sqliteHashData(k);\n    FKey *pFKey;\n    if( !IsOrdinaryTable(pTab) ) continue;\n    for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){\n      fkTriggerDelete(db, pFKey->apTrigger[0]); pFKey->apTrigger[0] = 0;\n      fkTriggerDelete(db, pFKey->apTrigger[1]); pFKey->apTrigger[1] = 0;\n    }\n  }\n}\n\n/*\n** This function is called to generate code that runs when table pTab is\n** being dropped from the database. The SrcList passed as the second argument\n** to this function contains a single entry guaranteed to resolve to\n** table pTab.\n**\n** Normally, no code is required. However, if either\n**\n**   (a) The table is the parent table of a FK constraint, or\n**   (b) The table is the child table of a deferred FK constraint and it is\n**       determined at runtime that there are outstanding deferred FK\n**       constraint violations in the database,\n**\n** then the equivalent of \"DELETE FROM <tbl>\" is executed before dropping\n** the table from the database. Triggers are disabled while running this\n** DELETE, but foreign key actions are not.\n*/\nSQLITE_PRIVATE void sqlite3FkDropTable(Parse *pParse, SrcList *pName, Table *pTab){\n  sqlite3 *db = pParse->db;\n  if( (db->flags&SQLITE_ForeignKeys) && IsOrdinaryTable(pTab) ){\n    int iSkip = 0;\n    Vdbe *v = sqlite3GetVdbe(pParse);\n\n    assert( v );                  /* VDBE has already been allocated */\n    assert( IsOrdinaryTable(pTab) );\n    if( sqlite3FkReferences(pTab)==0 ){\n      /* Search for a deferred foreign key constraint for which this table\n      ** is the child table. If one cannot be found, return without\n      ** generating any VDBE code. If one can be found, then jump over\n      ** the entire DELETE if there are no outstanding deferred constraints\n      ** when this statement is run.  */\n      FKey *p;\n      for(p=pTab->u.tab.pFKey; p; p=p->pNextFrom){\n        if( p->isDeferred || (db->flags & SQLITE_DeferFKs) ) break;\n      }\n      if( !p ) return;\n      iSkip = sqlite3VdbeMakeLabel(pParse);\n      sqlite3VdbeAddOp2(v, OP_FkIfZero, 1, iSkip); VdbeCoverage(v);\n    }\n\n    pParse->disableTriggers = 1;\n    sqlite3DeleteFrom(pParse, sqlite3SrcListDup(db, pName, 0), 0, 0, 0);\n    pParse->disableTriggers = 0;\n\n    /* If the DELETE has generated immediate foreign key constraint\n    ** violations, halt the VDBE and return an error at this point, before\n    ** any modifications to the schema are made. This is because statement\n    ** transactions are not able to rollback schema changes.\n    **\n    ** If the SQLITE_DeferFKs flag is set, then this is not required, as\n    ** the statement transaction will not be rolled back even if FK\n    ** constraints are violated.\n    */\n    if( (db->flags & SQLITE_DeferFKs)==0 ){\n      sqlite3VdbeVerifyAbortable(v, OE_Abort);\n      sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);\n      VdbeCoverage(v);\n      sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,\n          OE_Abort, 0, P4_STATIC, P5_ConstraintFK);\n    }\n\n    if( iSkip ){\n      sqlite3VdbeResolveLabel(v, iSkip);\n    }\n  }\n}\n\n\n/*\n** The second argument points to an FKey object representing a foreign key\n** for which pTab is the child table. An UPDATE statement against pTab\n** is currently being processed. For each column of the table that is\n** actually updated, the corresponding element in the aChange[] array\n** is zero or greater (if a column is unmodified the corresponding element\n** is set to -1). If the rowid column is modified by the UPDATE statement\n** the bChngRowid argument is non-zero.\n**\n** This function returns true if any of the columns that are part of the\n** child key for FK constraint *p are modified.\n*/\nstatic int fkChildIsModified(\n  Table *pTab,                    /* Table being updated */\n  FKey *p,                        /* Foreign key for which pTab is the child */\n  int *aChange,                   /* Array indicating modified columns */\n  int bChngRowid                  /* True if rowid is modified by this update */\n){\n  int i;\n  for(i=0; i<p->nCol; i++){\n    int iChildKey = p->aCol[i].iFrom;\n    if( aChange[iChildKey]>=0 ) return 1;\n    if( iChildKey==pTab->iPKey && bChngRowid ) return 1;\n  }\n  return 0;\n}\n\n/*\n** The second argument points to an FKey object representing a foreign key\n** for which pTab is the parent table. An UPDATE statement against pTab\n** is currently being processed. For each column of the table that is\n** actually updated, the corresponding element in the aChange[] array\n** is zero or greater (if a column is unmodified the corresponding element\n** is set to -1). If the rowid column is modified by the UPDATE statement\n** the bChngRowid argument is non-zero.\n**\n** This function returns true if any of the columns that are part of the\n** parent key for FK constraint *p are modified.\n*/\nstatic int fkParentIsModified(\n  Table *pTab,\n  FKey *p,\n  int *aChange,\n  int bChngRowid\n){\n  int i;\n  for(i=0; i<p->nCol; i++){\n    char *zKey = p->aCol[i].zCol;\n    int iKey;\n    for(iKey=0; iKey<pTab->nCol; iKey++){\n      if( aChange[iKey]>=0 || (iKey==pTab->iPKey && bChngRowid) ){\n        Column *pCol = &pTab->aCol[iKey];\n        if( zKey ){\n          if( 0==sqlite3StrICmp(pCol->zCnName, zKey) ) return 1;\n        }else if( pCol->colFlags & COLFLAG_PRIMKEY ){\n          return 1;\n        }\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** Return true if the parser passed as the first argument is being\n** used to code a trigger that is really a \"SET NULL\" action belonging\n** to trigger pFKey.\n*/\nstatic int isSetNullAction(Parse *pParse, FKey *pFKey){\n  Parse *pTop = sqlite3ParseToplevel(pParse);\n  if( pTop->pTriggerPrg ){\n    Trigger *p = pTop->pTriggerPrg->pTrigger;\n    if( (p==pFKey->apTrigger[0] && pFKey->aAction[0]==OE_SetNull)\n     || (p==pFKey->apTrigger[1] && pFKey->aAction[1]==OE_SetNull)\n    ){\n      assert( (pTop->db->flags & SQLITE_FkNoAction)==0 );\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** This function is called when inserting, deleting or updating a row of\n** table pTab to generate VDBE code to perform foreign key constraint\n** processing for the operation.\n**\n** For a DELETE operation, parameter regOld is passed the index of the\n** first register in an array of (pTab->nCol+1) registers containing the\n** rowid of the row being deleted, followed by each of the column values\n** of the row being deleted, from left to right. Parameter regNew is passed\n** zero in this case.\n**\n** For an INSERT operation, regOld is passed zero and regNew is passed the\n** first register of an array of (pTab->nCol+1) registers containing the new\n** row data.\n**\n** For an UPDATE operation, this function is called twice. Once before\n** the original record is deleted from the table using the calling convention\n** described for DELETE. Then again after the original record is deleted\n** but before the new record is inserted using the INSERT convention.\n*/\nSQLITE_PRIVATE void sqlite3FkCheck(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Row is being deleted from this table */\n  int regOld,                     /* Previous row data is stored here */\n  int regNew,                     /* New row data is stored here */\n  int *aChange,                   /* Array indicating UPDATEd columns (or 0) */\n  int bChngRowid                  /* True if rowid is UPDATEd */\n){\n  sqlite3 *db = pParse->db;       /* Database handle */\n  FKey *pFKey;                    /* Used to iterate through FKs */\n  int iDb;                        /* Index of database containing pTab */\n  const char *zDb;                /* Name of database containing pTab */\n  int isIgnoreErrors = pParse->disableTriggers;\n\n  /* Exactly one of regOld and regNew should be non-zero. */\n  assert( (regOld==0)!=(regNew==0) );\n\n  /* If foreign-keys are disabled, this function is a no-op. */\n  if( (db->flags&SQLITE_ForeignKeys)==0 ) return;\n  if( !IsOrdinaryTable(pTab) ) return;\n\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  zDb = db->aDb[iDb].zDbSName;\n\n  /* Loop through all the foreign key constraints for which pTab is the\n  ** child table (the table that the foreign key definition is part of).  */\n  for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){\n    Table *pTo;                   /* Parent table of foreign key pFKey */\n    Index *pIdx = 0;              /* Index on key columns in pTo */\n    int *aiFree = 0;\n    int *aiCol;\n    int iCol;\n    int i;\n    int bIgnore = 0;\n\n    if( aChange\n     && sqlite3_stricmp(pTab->zName, pFKey->zTo)!=0\n     && fkChildIsModified(pTab, pFKey, aChange, bChngRowid)==0\n    ){\n      continue;\n    }\n\n    /* Find the parent table of this foreign key. Also find a unique index\n    ** on the parent key columns in the parent table. If either of these\n    ** schema items cannot be located, set an error in pParse and return\n    ** early.  */\n    if( pParse->disableTriggers ){\n      pTo = sqlite3FindTable(db, pFKey->zTo, zDb);\n    }else{\n      pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);\n    }\n    if( !pTo || sqlite3FkLocateIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){\n      assert( isIgnoreErrors==0 || (regOld!=0 && regNew==0) );\n      if( !isIgnoreErrors || db->mallocFailed ) return;\n      if( pTo==0 ){\n        /* If isIgnoreErrors is true, then a table is being dropped. In this\n        ** case SQLite runs a \"DELETE FROM xxx\" on the table being dropped\n        ** before actually dropping it in order to check FK constraints.\n        ** If the parent table of an FK constraint on the current table is\n        ** missing, behave as if it is empty. i.e. decrement the relevant\n        ** FK counter for each row of the current table with non-NULL keys.\n        */\n        Vdbe *v = sqlite3GetVdbe(pParse);\n        int iJump = sqlite3VdbeCurrentAddr(v) + pFKey->nCol + 1;\n        for(i=0; i<pFKey->nCol; i++){\n          int iFromCol, iReg;\n          iFromCol = pFKey->aCol[i].iFrom;\n          iReg = sqlite3TableColumnToStorage(pFKey->pFrom,iFromCol) + regOld+1;\n          sqlite3VdbeAddOp2(v, OP_IsNull, iReg, iJump); VdbeCoverage(v);\n        }\n        sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, -1);\n      }\n      continue;\n    }\n    assert( pFKey->nCol==1 || (aiFree && pIdx) );\n\n    if( aiFree ){\n      aiCol = aiFree;\n    }else{\n      iCol = pFKey->aCol[0].iFrom;\n      aiCol = &iCol;\n    }\n    for(i=0; i<pFKey->nCol; i++){\n      if( aiCol[i]==pTab->iPKey ){\n        aiCol[i] = -1;\n      }\n      assert( pIdx==0 || pIdx->aiColumn[i]>=0 );\n#ifndef SQLITE_OMIT_AUTHORIZATION\n      /* Request permission to read the parent key columns. If the\n      ** authorization callback returns SQLITE_IGNORE, behave as if any\n      ** values read from the parent table are NULL. */\n      if( db->xAuth ){\n        int rcauth;\n        char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zCnName;\n        rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);\n        bIgnore = (rcauth==SQLITE_IGNORE);\n      }\n#endif\n    }\n\n    /* Take a shared-cache advisory read-lock on the parent table. Allocate\n    ** a cursor to use to search the unique index on the parent key columns\n    ** in the parent table.  */\n    sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);\n    pParse->nTab++;\n\n    if( regOld!=0 ){\n      /* A row is being removed from the child table. Search for the parent.\n      ** If the parent does not exist, removing the child row resolves an\n      ** outstanding foreign key constraint violation. */\n      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1, bIgnore);\n    }\n    if( regNew!=0 && !isSetNullAction(pParse, pFKey) ){\n      /* A row is being added to the child table. If a parent row cannot\n      ** be found, adding the child row has violated the FK constraint.\n      **\n      ** If this operation is being performed as part of a trigger program\n      ** that is actually a \"SET NULL\" action belonging to this very\n      ** foreign key, then omit this scan altogether. As all child key\n      ** values are guaranteed to be NULL, it is not possible for adding\n      ** this row to cause an FK violation.  */\n      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1, bIgnore);\n    }\n\n    sqlite3DbFree(db, aiFree);\n  }\n\n  /* Loop through all the foreign key constraints that refer to this table.\n  ** (the \"child\" constraints) */\n  for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){\n    Index *pIdx = 0;              /* Foreign key index for pFKey */\n    SrcList *pSrc;\n    int *aiCol = 0;\n\n    if( aChange && fkParentIsModified(pTab, pFKey, aChange, bChngRowid)==0 ){\n      continue;\n    }\n\n    if( !pFKey->isDeferred && !(db->flags & SQLITE_DeferFKs)\n     && !pParse->pToplevel && !pParse->isMultiWrite\n    ){\n      assert( regOld==0 && regNew!=0 );\n      /* Inserting a single row into a parent table cannot cause (or fix)\n      ** an immediate foreign key violation. So do nothing in this case.  */\n      continue;\n    }\n\n    if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){\n      if( !isIgnoreErrors || db->mallocFailed ) return;\n      continue;\n    }\n    assert( aiCol || pFKey->nCol==1 );\n\n    /* Create a SrcList structure containing the child table.  We need the\n    ** child table as a SrcList for sqlite3WhereBegin() */\n    pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0);\n    if( pSrc ){\n      SrcItem *pItem = pSrc->a;\n      pItem->pSTab = pFKey->pFrom;\n      pItem->zName = pFKey->pFrom->zName;\n      pItem->pSTab->nTabRef++;\n      pItem->iCursor = pParse->nTab++;\n\n      if( regNew!=0 ){\n        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1);\n      }\n      if( regOld!=0 ){\n        int eAction = pFKey->aAction[aChange!=0];\n        if( (db->flags & SQLITE_FkNoAction) ) eAction = OE_None;\n\n        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1);\n        /* If this is a deferred FK constraint, or a CASCADE or SET NULL\n        ** action applies, then any foreign key violations caused by\n        ** removing the parent key will be rectified by the action trigger.\n        ** So do not set the \"may-abort\" flag in this case.\n        **\n        ** Note 1: If the FK is declared \"ON UPDATE CASCADE\", then the\n        ** may-abort flag will eventually be set on this statement anyway\n        ** (when this function is called as part of processing the UPDATE\n        ** within the action trigger).\n        **\n        ** Note 2: At first glance it may seem like SQLite could simply omit\n        ** all OP_FkCounter related scans when either CASCADE or SET NULL\n        ** applies. The trouble starts if the CASCADE or SET NULL action\n        ** trigger causes other triggers or action rules attached to the\n        ** child table to fire. In these cases the fk constraint counters\n        ** might be set incorrectly if any OP_FkCounter related scans are\n        ** omitted.  */\n        if( !pFKey->isDeferred && eAction!=OE_Cascade && eAction!=OE_SetNull ){\n          sqlite3MayAbort(pParse);\n        }\n      }\n      pItem->zName = 0;\n      sqlite3SrcListDelete(db, pSrc);\n    }\n    sqlite3DbFree(db, aiCol);\n  }\n}\n\n#define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))\n\n/*\n** This function is called before generating code to update or delete a\n** row contained in table pTab.\n*/\nSQLITE_PRIVATE u32 sqlite3FkOldmask(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab                     /* Table being modified */\n){\n  u32 mask = 0;\n  if( pParse->db->flags&SQLITE_ForeignKeys && IsOrdinaryTable(pTab) ){\n    FKey *p;\n    int i;\n    for(p=pTab->u.tab.pFKey; p; p=p->pNextFrom){\n      for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);\n    }\n    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){\n      Index *pIdx = 0;\n      sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);\n      if( pIdx ){\n        for(i=0; i<pIdx->nKeyCol; i++){\n          assert( pIdx->aiColumn[i]>=0 );\n          mask |= COLUMN_MASK(pIdx->aiColumn[i]);\n        }\n      }\n    }\n  }\n  return mask;\n}\n\n\n/*\n** This function is called before generating code to update or delete a\n** row contained in table pTab. If the operation is a DELETE, then\n** parameter aChange is passed a NULL value. For an UPDATE, aChange points\n** to an array of size N, where N is the number of columns in table pTab.\n** If the i'th column is not modified by the UPDATE, then the corresponding\n** entry in the aChange[] array is set to -1. If the column is modified,\n** the value is 0 or greater. Parameter chngRowid is set to true if the\n** UPDATE statement modifies the rowid fields of the table.\n**\n** If any foreign key processing will be required, this function returns\n** non-zero. If there is no foreign key related processing, this function\n** returns zero.\n**\n** For an UPDATE, this function returns 2 if:\n**\n**   * There are any FKs for which pTab is the child and the parent table\n**     and any FK processing at all is required (even of a different FK), or\n**\n**   * the UPDATE modifies one or more parent keys for which the action is\n**     not \"NO ACTION\" (i.e. is CASCADE, SET DEFAULT or SET NULL).\n**\n** Or, assuming some other foreign key processing is required, 1.\n*/\nSQLITE_PRIVATE int sqlite3FkRequired(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Table being modified */\n  int *aChange,                   /* Non-NULL for UPDATE operations */\n  int chngRowid                   /* True for UPDATE that affects rowid */\n){\n  int eRet = 1;                   /* Value to return if bHaveFK is true */\n  int bHaveFK = 0;                /* If FK processing is required */\n  if( pParse->db->flags&SQLITE_ForeignKeys && IsOrdinaryTable(pTab) ){\n    if( !aChange ){\n      /* A DELETE operation. Foreign key processing is required if the\n      ** table in question is either the child or parent table for any\n      ** foreign key constraint.  */\n      bHaveFK = (sqlite3FkReferences(pTab) || pTab->u.tab.pFKey);\n    }else{\n      /* This is an UPDATE. Foreign key processing is only required if the\n      ** operation modifies one or more child or parent key columns. */\n      FKey *p;\n\n      /* Check if any child key columns are being modified. */\n      for(p=pTab->u.tab.pFKey; p; p=p->pNextFrom){\n        if( fkChildIsModified(pTab, p, aChange, chngRowid) ){\n          if( 0==sqlite3_stricmp(pTab->zName, p->zTo) ) eRet = 2;\n          bHaveFK = 1;\n        }\n      }\n\n      /* Check if any parent key columns are being modified. */\n      for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){\n        if( fkParentIsModified(pTab, p, aChange, chngRowid) ){\n          if( (pParse->db->flags & SQLITE_FkNoAction)==0\n           && p->aAction[1]!=OE_None\n          ){\n            return 2;\n          }\n          bHaveFK = 1;\n        }\n      }\n    }\n  }\n  return bHaveFK ? eRet : 0;\n}\n\n/*\n** This function is called when an UPDATE or DELETE operation is being\n** compiled on table pTab, which is the parent table of foreign-key pFKey.\n** If the current operation is an UPDATE, then the pChanges parameter is\n** passed a pointer to the list of columns being modified. If it is a\n** DELETE, pChanges is passed a NULL pointer.\n**\n** It returns a pointer to a Trigger structure containing a trigger\n** equivalent to the ON UPDATE or ON DELETE action specified by pFKey.\n** If the action is \"NO ACTION\" then a NULL pointer is returned (these actions\n** require no special handling by the triggers sub-system, code for them is\n** created by fkScanChildren()).\n**\n** For example, if pFKey is the foreign key and pTab is table \"p\" in\n** the following schema:\n**\n**   CREATE TABLE p(pk PRIMARY KEY);\n**   CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE);\n**\n** then the returned trigger structure is equivalent to:\n**\n**   CREATE TRIGGER ... DELETE ON p BEGIN\n**     DELETE FROM c WHERE ck = old.pk;\n**   END;\n**\n** The returned pointer is cached as part of the foreign key object. It\n** is eventually freed along with the rest of the foreign key object by\n** sqlite3FkDelete().\n*/\nstatic Trigger *fkActionTrigger(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Table being updated or deleted from */\n  FKey *pFKey,                    /* Foreign key to get action for */\n  ExprList *pChanges              /* Change-list for UPDATE, NULL for DELETE */\n){\n  sqlite3 *db = pParse->db;       /* Database handle */\n  int action;                     /* One of OE_None, OE_Cascade etc. */\n  Trigger *pTrigger;              /* Trigger definition to return */\n  int iAction = (pChanges!=0);    /* 1 for UPDATE, 0 for DELETE */\n\n  action = pFKey->aAction[iAction];\n  if( (db->flags & SQLITE_FkNoAction) ) action = OE_None;\n  if( action==OE_Restrict && (db->flags & SQLITE_DeferFKs) ){\n    return 0;\n  }\n  pTrigger = pFKey->apTrigger[iAction];\n\n  if( action!=OE_None && !pTrigger ){\n    char const *zFrom;            /* Name of child table */\n    int nFrom;                    /* Length in bytes of zFrom */\n    Index *pIdx = 0;              /* Parent key index for this FK */\n    int *aiCol = 0;               /* child table cols -> parent key cols */\n    TriggerStep *pStep = 0;        /* First (only) step of trigger program */\n    Expr *pWhere = 0;             /* WHERE clause of trigger step */\n    ExprList *pList = 0;          /* Changes list if ON UPDATE CASCADE */\n    Select *pSelect = 0;          /* If RESTRICT, \"SELECT RAISE(...)\" */\n    int i;                        /* Iterator variable */\n    Expr *pWhen = 0;              /* WHEN clause for the trigger */\n\n    if( sqlite3FkLocateIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;\n    assert( aiCol || pFKey->nCol==1 );\n\n    for(i=0; i<pFKey->nCol; i++){\n      Token tOld = { \"old\", 3 };  /* Literal \"old\" token */\n      Token tNew = { \"new\", 3 };  /* Literal \"new\" token */\n      Token tFromCol;             /* Name of column in child table */\n      Token tToCol;               /* Name of column in parent table */\n      int iFromCol;               /* Idx of column in child table */\n      Expr *pEq;                  /* tFromCol = OLD.tToCol */\n\n      iFromCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;\n      assert( iFromCol>=0 );\n      assert( pIdx!=0 || (pTab->iPKey>=0 && pTab->iPKey<pTab->nCol) );\n      assert( pIdx==0 || pIdx->aiColumn[i]>=0 );\n      sqlite3TokenInit(&tToCol,\n                   pTab->aCol[pIdx ? pIdx->aiColumn[i] : pTab->iPKey].zCnName);\n      sqlite3TokenInit(&tFromCol, pFKey->pFrom->aCol[iFromCol].zCnName);\n\n      /* Create the expression \"OLD.zToCol = zFromCol\". It is important\n      ** that the \"OLD.zToCol\" term is on the LHS of the = operator, so\n      ** that the affinity and collation sequence associated with the\n      ** parent table are used for the comparison. */\n      pEq = sqlite3PExpr(pParse, TK_EQ,\n          sqlite3PExpr(pParse, TK_DOT,\n            sqlite3ExprAlloc(db, TK_ID, &tOld, 0),\n            sqlite3ExprAlloc(db, TK_ID, &tToCol, 0)),\n          sqlite3ExprAlloc(db, TK_ID, &tFromCol, 0)\n      );\n      pWhere = sqlite3ExprAnd(pParse, pWhere, pEq);\n\n      /* For ON UPDATE, construct the next term of the WHEN clause.\n      ** The final WHEN clause will be like this:\n      **\n      **    WHEN NOT(old.col1 IS new.col1 AND ... AND old.colN IS new.colN)\n      */\n      if( pChanges ){\n        pEq = sqlite3PExpr(pParse, TK_IS,\n            sqlite3PExpr(pParse, TK_DOT,\n              sqlite3ExprAlloc(db, TK_ID, &tOld, 0),\n              sqlite3ExprAlloc(db, TK_ID, &tToCol, 0)),\n            sqlite3PExpr(pParse, TK_DOT,\n              sqlite3ExprAlloc(db, TK_ID, &tNew, 0),\n              sqlite3ExprAlloc(db, TK_ID, &tToCol, 0))\n            );\n        pWhen = sqlite3ExprAnd(pParse, pWhen, pEq);\n      }\n\n      if( action!=OE_Restrict && (action!=OE_Cascade || pChanges) ){\n        Expr *pNew;\n        if( action==OE_Cascade ){\n          pNew = sqlite3PExpr(pParse, TK_DOT,\n            sqlite3ExprAlloc(db, TK_ID, &tNew, 0),\n            sqlite3ExprAlloc(db, TK_ID, &tToCol, 0));\n        }else if( action==OE_SetDflt ){\n          Column *pCol = pFKey->pFrom->aCol + iFromCol;\n          Expr *pDflt;\n          if( pCol->colFlags & COLFLAG_GENERATED ){\n            testcase( pCol->colFlags & COLFLAG_VIRTUAL );\n            testcase( pCol->colFlags & COLFLAG_STORED );\n            pDflt = 0;\n          }else{\n            pDflt = sqlite3ColumnExpr(pFKey->pFrom, pCol);\n          }\n          if( pDflt ){\n            pNew = sqlite3ExprDup(db, pDflt, 0);\n          }else{\n            pNew = sqlite3ExprAlloc(db, TK_NULL, 0, 0);\n          }\n        }else{\n          pNew = sqlite3ExprAlloc(db, TK_NULL, 0, 0);\n        }\n        pList = sqlite3ExprListAppend(pParse, pList, pNew);\n        sqlite3ExprListSetName(pParse, pList, &tFromCol, 0);\n      }\n    }\n    sqlite3DbFree(db, aiCol);\n\n    zFrom = pFKey->pFrom->zName;\n    nFrom = sqlite3Strlen30(zFrom);\n\n    if( action==OE_Restrict ){\n      int iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n      SrcList *pSrc;\n      Expr *pRaise;\n\n      pRaise = sqlite3Expr(db, TK_STRING, \"FOREIGN KEY constraint failed\"),\n      pRaise = sqlite3PExpr(pParse, TK_RAISE, pRaise, 0);\n      if( pRaise ){\n        pRaise->affExpr = OE_Abort;\n      }\n      pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0);\n      if( pSrc ){\n        assert( pSrc->nSrc==1 );\n        pSrc->a[0].zName = sqlite3DbStrDup(db, zFrom);\n        assert( pSrc->a[0].fg.fixedSchema==0 && pSrc->a[0].fg.isSubquery==0 );\n        pSrc->a[0].u4.zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zDbSName);\n      }\n      pSelect = sqlite3SelectNew(pParse,\n          sqlite3ExprListAppend(pParse, 0, pRaise),\n          pSrc,\n          pWhere,\n          0, 0, 0, 0, 0\n      );\n      pWhere = 0;\n    }\n\n    /* Disable lookaside memory allocation */\n    DisableLookaside;\n\n    pTrigger = (Trigger *)sqlite3DbMallocZero(db,\n        sizeof(Trigger) +         /* struct Trigger */\n        sizeof(TriggerStep) +     /* Single step in trigger program */\n        nFrom + 1                 /* Space for pStep->zTarget */\n    );\n    if( pTrigger ){\n      pStep = pTrigger->step_list = (TriggerStep *)&pTrigger[1];\n      pStep->zTarget = (char *)&pStep[1];\n      memcpy((char *)pStep->zTarget, zFrom, nFrom);\n\n      pStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);\n      pStep->pExprList = sqlite3ExprListDup(db, pList, EXPRDUP_REDUCE);\n      pStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);\n      if( pWhen ){\n        pWhen = sqlite3PExpr(pParse, TK_NOT, pWhen, 0);\n        pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);\n      }\n    }\n\n    /* Re-enable the lookaside buffer, if it was disabled earlier. */\n    EnableLookaside;\n\n    sqlite3ExprDelete(db, pWhere);\n    sqlite3ExprDelete(db, pWhen);\n    sqlite3ExprListDelete(db, pList);\n    sqlite3SelectDelete(db, pSelect);\n    if( db->mallocFailed==1 ){\n      fkTriggerDelete(db, pTrigger);\n      return 0;\n    }\n    assert( pStep!=0 );\n    assert( pTrigger!=0 );\n\n    switch( action ){\n      case OE_Restrict:\n        pStep->op = TK_SELECT;\n        break;\n      case OE_Cascade:\n        if( !pChanges ){\n          pStep->op = TK_DELETE;\n          break;\n        }\n        /* no break */ deliberate_fall_through\n      default:\n        pStep->op = TK_UPDATE;\n    }\n    pStep->pTrig = pTrigger;\n    pTrigger->pSchema = pTab->pSchema;\n    pTrigger->pTabSchema = pTab->pSchema;\n    pFKey->apTrigger[iAction] = pTrigger;\n    pTrigger->op = (pChanges ? TK_UPDATE : TK_DELETE);\n  }\n\n  return pTrigger;\n}\n\n/*\n** This function is called when deleting or updating a row to implement\n** any required CASCADE, SET NULL or SET DEFAULT actions.\n*/\nSQLITE_PRIVATE void sqlite3FkActions(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Table being updated or deleted from */\n  ExprList *pChanges,             /* Change-list for UPDATE, NULL for DELETE */\n  int regOld,                     /* Address of array containing old row */\n  int *aChange,                   /* Array indicating UPDATEd columns (or 0) */\n  int bChngRowid                  /* True if rowid is UPDATEd */\n){\n  /* If foreign-key support is enabled, iterate through all FKs that\n  ** refer to table pTab. If there is an action associated with the FK\n  ** for this operation (either update or delete), invoke the associated\n  ** trigger sub-program.  */\n  if( pParse->db->flags&SQLITE_ForeignKeys ){\n    FKey *pFKey;                  /* Iterator variable */\n    for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){\n      if( aChange==0 || fkParentIsModified(pTab, pFKey, aChange, bChngRowid) ){\n        Trigger *pAct = fkActionTrigger(pParse, pTab, pFKey, pChanges);\n        if( pAct ){\n          sqlite3CodeRowTriggerDirect(pParse, pAct, pTab, regOld, OE_Abort, 0);\n        }\n      }\n    }\n  }\n}\n\n#endif /* ifndef SQLITE_OMIT_TRIGGER */\n\n/*\n** Free all memory associated with foreign key definitions attached to\n** table pTab. Remove the deleted foreign keys from the Schema.fkeyHash\n** hash table.\n*/\nSQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){\n  FKey *pFKey;                    /* Iterator variable */\n  FKey *pNext;                    /* Copy of pFKey->pNextFrom */\n\n  assert( IsOrdinaryTable(pTab) );\n  assert( db!=0 );\n  for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pNext){\n    assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) );\n\n    /* Remove the FK from the fkeyHash hash table. */\n    if( db->pnBytesFreed==0 ){\n      if( pFKey->pPrevTo ){\n        pFKey->pPrevTo->pNextTo = pFKey->pNextTo;\n      }else{\n        const char *z = (pFKey->pNextTo ? pFKey->pNextTo->zTo : pFKey->zTo);\n        sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, pFKey->pNextTo);\n      }\n      if( pFKey->pNextTo ){\n        pFKey->pNextTo->pPrevTo = pFKey->pPrevTo;\n      }\n    }\n\n    /* EV: R-30323-21917 Each foreign key constraint in SQLite is\n    ** classified as either immediate or deferred.\n    */\n    assert( pFKey->isDeferred==0 || pFKey->isDeferred==1 );\n\n    /* Delete any triggers created to implement actions for this FK. */\n#ifndef SQLITE_OMIT_TRIGGER\n    fkTriggerDelete(db, pFKey->apTrigger[0]);\n    fkTriggerDelete(db, pFKey->apTrigger[1]);\n#endif\n\n    pNext = pFKey->pNextFrom;\n    sqlite3DbFree(db, pFKey);\n  }\n}\n#endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */\n\n/************** End of fkey.c ************************************************/\n/************** Begin file insert.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that are called by the parser\n** to handle INSERT statements in SQLite.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** Generate code that will\n**\n**   (1) acquire a lock for table pTab then\n**   (2) open pTab as cursor iCur.\n**\n** If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index\n** for that table that is actually opened.\n*/\nSQLITE_PRIVATE void sqlite3OpenTable(\n  Parse *pParse,  /* Generate code into this VDBE */\n  int iCur,       /* The cursor number of the table */\n  int iDb,        /* The database index in sqlite3.aDb[] */\n  Table *pTab,    /* The table to be opened */\n  int opcode      /* OP_OpenRead or OP_OpenWrite */\n){\n  Vdbe *v;\n  assert( !IsVirtual(pTab) );\n  assert( pParse->pVdbe!=0 );\n  v = pParse->pVdbe;\n  assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );\n  if( !pParse->db->noSharedCache ){\n    sqlite3TableLock(pParse, iDb, pTab->tnum,\n                     (opcode==OP_OpenWrite)?1:0, pTab->zName);\n  }\n  if( HasRowid(pTab) ){\n    sqlite3VdbeAddOp4Int(v, opcode, iCur, pTab->tnum, iDb, pTab->nNVCol);\n    VdbeComment((v, \"%s\", pTab->zName));\n  }else{\n    Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n    assert( pPk!=0 );\n    assert( pPk->tnum==pTab->tnum || CORRUPT_DB );\n    sqlite3VdbeAddOp3(v, opcode, iCur, pPk->tnum, iDb);\n    sqlite3VdbeSetP4KeyInfo(pParse, pPk);\n    VdbeComment((v, \"%s\", pTab->zName));\n  }\n}\n\n/*\n** Return a pointer to the column affinity string associated with index\n** pIdx. A column affinity string has one character for each column in\n** the table, according to the affinity of the column:\n**\n**  Character      Column affinity\n**  ------------------------------\n**  'A'            BLOB\n**  'B'            TEXT\n**  'C'            NUMERIC\n**  'D'            INTEGER\n**  'F'            REAL\n**\n** An extra 'D' is appended to the end of the string to cover the\n** rowid that appears as the last column in every index.\n**\n** Memory for the buffer containing the column index affinity string\n** is managed along with the rest of the Index structure. It will be\n** released when sqlite3DeleteIndex() is called.\n*/\nstatic SQLITE_NOINLINE const char *computeIndexAffStr(sqlite3 *db, Index *pIdx){\n  /* The first time a column affinity string for a particular index is\n  ** required, it is allocated and populated here. It is then stored as\n  ** a member of the Index structure for subsequent use.\n  **\n  ** The column affinity string will eventually be deleted by\n  ** sqliteDeleteIndex() when the Index structure itself is cleaned\n  ** up.\n  */\n  int n;\n  Table *pTab = pIdx->pTable;\n  pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1);\n  if( !pIdx->zColAff ){\n    sqlite3OomFault(db);\n    return 0;\n  }\n  for(n=0; n<pIdx->nColumn; n++){\n    i16 x = pIdx->aiColumn[n];\n    char aff;\n    if( x>=0 ){\n      aff = pTab->aCol[x].affinity;\n    }else if( x==XN_ROWID ){\n      aff = SQLITE_AFF_INTEGER;\n    }else{\n      assert( x==XN_EXPR );\n      assert( pIdx->bHasExpr );\n      assert( pIdx->aColExpr!=0 );\n      aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr);\n    }\n    if( aff<SQLITE_AFF_BLOB ) aff = SQLITE_AFF_BLOB;\n    if( aff>SQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC;\n    pIdx->zColAff[n] = aff;\n  }\n  pIdx->zColAff[n] = 0;\n  return pIdx->zColAff;\n}\nSQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){\n  if( !pIdx->zColAff ) return computeIndexAffStr(db, pIdx);\n  return pIdx->zColAff;\n}\n\n\n/*\n** Compute an affinity string for a table.   Space is obtained\n** from sqlite3DbMalloc().  The caller is responsible for freeing\n** the space when done.\n*/\nSQLITE_PRIVATE char *sqlite3TableAffinityStr(sqlite3 *db, const Table *pTab){\n  char *zColAff;\n  zColAff = (char *)sqlite3DbMallocRaw(db, pTab->nCol+1);\n  if( zColAff ){\n    int i, j;\n    for(i=j=0; i<pTab->nCol; i++){\n      if( (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){\n        zColAff[j++] = pTab->aCol[i].affinity;\n      }\n    }\n    do{\n      zColAff[j--] = 0;\n    }while( j>=0 && zColAff[j]<=SQLITE_AFF_BLOB );\n  }\n  return zColAff;\n}\n\n/*\n** Make changes to the evolving bytecode to do affinity transformations\n** of values that are about to be gathered into a row for table pTab.\n**\n** For ordinary (legacy, non-strict) tables:\n** -----------------------------------------\n**\n** Compute the affinity string for table pTab, if it has not already been\n** computed.  As an optimization, omit trailing SQLITE_AFF_BLOB affinities.\n**\n** If the affinity string is empty (because it was all SQLITE_AFF_BLOB entries\n** which were then optimized out) then this routine becomes a no-op.\n**\n** Otherwise if iReg>0 then code an OP_Affinity opcode that will set the\n** affinities for register iReg and following.  Or if iReg==0,\n** then just set the P4 operand of the previous opcode (which should  be\n** an OP_MakeRecord) to the affinity string.\n**\n** A column affinity string has one character per column:\n**\n**    Character      Column affinity\n**    ---------      ---------------\n**    'A'            BLOB\n**    'B'            TEXT\n**    'C'            NUMERIC\n**    'D'            INTEGER\n**    'E'            REAL\n**\n** For STRICT tables:\n** ------------------\n**\n** Generate an appropriate OP_TypeCheck opcode that will verify the\n** datatypes against the column definitions in pTab.  If iReg==0, that\n** means an OP_MakeRecord opcode has already been generated and should be\n** the last opcode generated.  The new OP_TypeCheck needs to be inserted\n** before the OP_MakeRecord.  The new OP_TypeCheck should use the same\n** register set as the OP_MakeRecord.  If iReg>0 then register iReg is\n** the first of a series of registers that will form the new record.\n** Apply the type checking to that array of registers.\n*/\nSQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){\n  int i;\n  char *zColAff;\n  if( pTab->tabFlags & TF_Strict ){\n    if( iReg==0 ){\n      /* Move the previous opcode (which should be OP_MakeRecord) forward\n      ** by one slot and insert a new OP_TypeCheck where the current\n      ** OP_MakeRecord is found */\n      VdbeOp *pPrev;\n      int p3;\n      sqlite3VdbeAppendP4(v, pTab, P4_TABLE);\n      pPrev = sqlite3VdbeGetLastOp(v);\n      assert( pPrev!=0 );\n      assert( pPrev->opcode==OP_MakeRecord || sqlite3VdbeDb(v)->mallocFailed );\n      pPrev->opcode = OP_TypeCheck;\n      p3 = pPrev->p3;\n      pPrev->p3 = 0;\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, pPrev->p1, pPrev->p2, p3);\n    }else{\n      /* Insert an isolated OP_Typecheck */\n      sqlite3VdbeAddOp2(v, OP_TypeCheck, iReg, pTab->nNVCol);\n      sqlite3VdbeAppendP4(v, pTab, P4_TABLE);\n    }\n    return;\n  }\n  zColAff = pTab->zColAff;\n  if( zColAff==0 ){\n    zColAff = sqlite3TableAffinityStr(0, pTab);\n    if( !zColAff ){\n      sqlite3OomFault(sqlite3VdbeDb(v));\n      return;\n    }\n    pTab->zColAff = zColAff;\n  }\n  assert( zColAff!=0 );\n  i = sqlite3Strlen30NN(zColAff);\n  if( i ){\n    if( iReg ){\n      sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);\n    }else{\n      assert( sqlite3VdbeGetLastOp(v)->opcode==OP_MakeRecord\n              || sqlite3VdbeDb(v)->mallocFailed );\n      sqlite3VdbeChangeP4(v, -1, zColAff, i);\n    }\n  }\n}\n\n/*\n** Return non-zero if the table pTab in database iDb or any of its indices\n** have been opened at any point in the VDBE program. This is used to see if\n** a statement of the form  \"INSERT INTO <iDb, pTab> SELECT ...\" can\n** run without using a temporary table for the results of the SELECT.\n*/\nstatic int readsTable(Parse *p, int iDb, Table *pTab){\n  Vdbe *v = sqlite3GetVdbe(p);\n  int i;\n  int iEnd = sqlite3VdbeCurrentAddr(v);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  VTable *pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p->db, pTab) : 0;\n#endif\n\n  for(i=1; i<iEnd; i++){\n    VdbeOp *pOp = sqlite3VdbeGetOp(v, i);\n    assert( pOp!=0 );\n    if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){\n      Index *pIndex;\n      Pgno tnum = pOp->p2;\n      if( tnum==pTab->tnum ){\n        return 1;\n      }\n      for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){\n        if( tnum==pIndex->tnum ){\n          return 1;\n        }\n      }\n    }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){\n      assert( pOp->p4.pVtab!=0 );\n      assert( pOp->p4type==P4_VTAB );\n      return 1;\n    }\n#endif\n  }\n  return 0;\n}\n\n/* This walker callback will compute the union of colFlags flags for all\n** referenced columns in a CHECK constraint or generated column expression.\n*/\nstatic int exprColumnFlagUnion(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_COLUMN && pExpr->iColumn>=0 ){\n    assert( pExpr->iColumn < pWalker->u.pTab->nCol );\n    pWalker->eCode |= pWalker->u.pTab->aCol[pExpr->iColumn].colFlags;\n  }\n  return WRC_Continue;\n}\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n/*\n** All regular columns for table pTab have been puts into registers\n** starting with iRegStore.  The registers that correspond to STORED\n** or VIRTUAL columns have not yet been initialized.  This routine goes\n** back and computes the values for those columns based on the previously\n** computed normal columns.\n*/\nSQLITE_PRIVATE void sqlite3ComputeGeneratedColumns(\n  Parse *pParse,    /* Parsing context */\n  int iRegStore,    /* Register holding the first column */\n  Table *pTab       /* The table */\n){\n  int i;\n  Walker w;\n  Column *pRedo;\n  int eProgress;\n  VdbeOp *pOp;\n\n  assert( pTab->tabFlags & TF_HasGenerated );\n  testcase( pTab->tabFlags & TF_HasVirtual );\n  testcase( pTab->tabFlags & TF_HasStored );\n\n  /* Before computing generated columns, first go through and make sure\n  ** that appropriate affinity has been applied to the regular columns\n  */\n  sqlite3TableAffinity(pParse->pVdbe, pTab, iRegStore);\n  if( (pTab->tabFlags & TF_HasStored)!=0 ){\n    pOp = sqlite3VdbeGetLastOp(pParse->pVdbe);\n    if( pOp->opcode==OP_Affinity ){\n      /* Change the OP_Affinity argument to '@' (NONE) for all stored\n      ** columns.  '@' is the no-op affinity and those columns have not\n      ** yet been computed. */\n      int ii, jj;\n      char *zP4 = pOp->p4.z;\n      assert( zP4!=0 );\n      assert( pOp->p4type==P4_DYNAMIC );\n      for(ii=jj=0; zP4[jj]; ii++){\n        if( pTab->aCol[ii].colFlags & COLFLAG_VIRTUAL ){\n          continue;\n        }\n        if( pTab->aCol[ii].colFlags & COLFLAG_STORED ){\n          zP4[jj] = SQLITE_AFF_NONE;\n        }\n        jj++;\n      }\n    }else if( pOp->opcode==OP_TypeCheck ){\n      /* If an OP_TypeCheck was generated because the table is STRICT,\n      ** then set the P3 operand to indicate that generated columns should\n      ** not be checked */\n      pOp->p3 = 1;\n    }\n  }\n\n  /* Because there can be multiple generated columns that refer to one another,\n  ** this is a two-pass algorithm.  On the first pass, mark all generated\n  ** columns as \"not available\".\n  */\n  for(i=0; i<pTab->nCol; i++){\n    if( pTab->aCol[i].colFlags & COLFLAG_GENERATED ){\n      testcase( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL );\n      testcase( pTab->aCol[i].colFlags & COLFLAG_STORED );\n      pTab->aCol[i].colFlags |= COLFLAG_NOTAVAIL;\n    }\n  }\n\n  w.u.pTab = pTab;\n  w.xExprCallback = exprColumnFlagUnion;\n  w.xSelectCallback = 0;\n  w.xSelectCallback2 = 0;\n\n  /* On the second pass, compute the value of each NOT-AVAILABLE column.\n  ** Companion code in the TK_COLUMN case of sqlite3ExprCodeTarget() will\n  ** compute dependencies and mark remove the COLSPAN_NOTAVAIL mark, as\n  ** they are needed.\n  */\n  pParse->iSelfTab = -iRegStore;\n  do{\n    eProgress = 0;\n    pRedo = 0;\n    for(i=0; i<pTab->nCol; i++){\n      Column *pCol = pTab->aCol + i;\n      if( (pCol->colFlags & COLFLAG_NOTAVAIL)!=0 ){\n        int x;\n        pCol->colFlags |= COLFLAG_BUSY;\n        w.eCode = 0;\n        sqlite3WalkExpr(&w, sqlite3ColumnExpr(pTab, pCol));\n        pCol->colFlags &= ~COLFLAG_BUSY;\n        if( w.eCode & COLFLAG_NOTAVAIL ){\n          pRedo = pCol;\n          continue;\n        }\n        eProgress = 1;\n        assert( pCol->colFlags & COLFLAG_GENERATED );\n        x = sqlite3TableColumnToStorage(pTab, i) + iRegStore;\n        sqlite3ExprCodeGeneratedColumn(pParse, pTab, pCol, x);\n        pCol->colFlags &= ~COLFLAG_NOTAVAIL;\n      }\n    }\n  }while( pRedo && eProgress );\n  if( pRedo ){\n    sqlite3ErrorMsg(pParse, \"generated column loop on \\\"%s\\\"\", pRedo->zCnName);\n  }\n  pParse->iSelfTab = 0;\n}\n#endif /* SQLITE_OMIT_GENERATED_COLUMNS */\n\n\n#ifndef SQLITE_OMIT_AUTOINCREMENT\n/*\n** Locate or create an AutoincInfo structure associated with table pTab\n** which is in database iDb.  Return the register number for the register\n** that holds the maximum rowid.  Return zero if pTab is not an AUTOINCREMENT\n** table.  (Also return zero when doing a VACUUM since we do not want to\n** update the AUTOINCREMENT counters during a VACUUM.)\n**\n** There is at most one AutoincInfo structure per table even if the\n** same table is autoincremented multiple times due to inserts within\n** triggers.  A new AutoincInfo structure is created if this is the\n** first use of table pTab.  On 2nd and subsequent uses, the original\n** AutoincInfo structure is used.\n**\n** Four consecutive registers are allocated:\n**\n**   (1)  The name of the pTab table.\n**   (2)  The maximum ROWID of pTab.\n**   (3)  The rowid in sqlite_sequence of pTab\n**   (4)  The original value of the max ROWID in pTab, or NULL if none\n**\n** The 2nd register is the one that is returned.  That is all the\n** insert routine needs to know about.\n*/\nstatic int autoIncBegin(\n  Parse *pParse,      /* Parsing context */\n  int iDb,            /* Index of the database holding pTab */\n  Table *pTab         /* The table we are writing to */\n){\n  int memId = 0;      /* Register holding maximum rowid */\n  assert( pParse->db->aDb[iDb].pSchema!=0 );\n  if( (pTab->tabFlags & TF_Autoincrement)!=0\n   && (pParse->db->mDbFlags & DBFLAG_Vacuum)==0\n  ){\n    Parse *pToplevel = sqlite3ParseToplevel(pParse);\n    AutoincInfo *pInfo;\n    Table *pSeqTab = pParse->db->aDb[iDb].pSchema->pSeqTab;\n\n    /* Verify that the sqlite_sequence table exists and is an ordinary\n    ** rowid table with exactly two columns.\n    ** Ticket d8dc2b3a58cd5dc2918a1d4acb 2018-05-23 */\n    if( pSeqTab==0\n     || !HasRowid(pSeqTab)\n     || NEVER(IsVirtual(pSeqTab))\n     || pSeqTab->nCol!=2\n    ){\n      pParse->nErr++;\n      pParse->rc = SQLITE_CORRUPT_SEQUENCE;\n      return 0;\n    }\n\n    pInfo = pToplevel->pAinc;\n    while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }\n    if( pInfo==0 ){\n      pInfo = sqlite3DbMallocRawNN(pParse->db, sizeof(*pInfo));\n      sqlite3ParserAddCleanup(pToplevel, sqlite3DbFree, pInfo);\n      testcase( pParse->earlyCleanup );\n      if( pParse->db->mallocFailed ) return 0;\n      pInfo->pNext = pToplevel->pAinc;\n      pToplevel->pAinc = pInfo;\n      pInfo->pTab = pTab;\n      pInfo->iDb = iDb;\n      pToplevel->nMem++;                  /* Register to hold name of table */\n      pInfo->regCtr = ++pToplevel->nMem;  /* Max rowid register */\n      pToplevel->nMem +=2;       /* Rowid in sqlite_sequence + orig max val */\n    }\n    memId = pInfo->regCtr;\n  }\n  return memId;\n}\n\n/*\n** This routine generates code that will initialize all of the\n** register used by the autoincrement tracker.\n*/\nSQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){\n  AutoincInfo *p;            /* Information about an AUTOINCREMENT */\n  sqlite3 *db = pParse->db;  /* The database connection */\n  Db *pDb;                   /* Database only autoinc table */\n  int memId;                 /* Register holding max rowid */\n  Vdbe *v = pParse->pVdbe;   /* VDBE under construction */\n\n  /* This routine is never called during trigger-generation.  It is\n  ** only called from the top-level */\n  assert( pParse->pTriggerTab==0 );\n  assert( sqlite3IsToplevel(pParse) );\n\n  assert( v );   /* We failed long ago if this is not so */\n  for(p = pParse->pAinc; p; p = p->pNext){\n    static const int iLn = VDBE_OFFSET_LINENO(2);\n    static const VdbeOpList autoInc[] = {\n      /* 0  */ {OP_Null,    0,  0, 0},\n      /* 1  */ {OP_Rewind,  0, 10, 0},\n      /* 2  */ {OP_Column,  0,  0, 0},\n      /* 3  */ {OP_Ne,      0,  9, 0},\n      /* 4  */ {OP_Rowid,   0,  0, 0},\n      /* 5  */ {OP_Column,  0,  1, 0},\n      /* 6  */ {OP_AddImm,  0,  0, 0},\n      /* 7  */ {OP_Copy,    0,  0, 0},\n      /* 8  */ {OP_Goto,    0, 11, 0},\n      /* 9  */ {OP_Next,    0,  2, 0},\n      /* 10 */ {OP_Integer, 0,  0, 0},\n      /* 11 */ {OP_Close,   0,  0, 0}\n    };\n    VdbeOp *aOp;\n    pDb = &db->aDb[p->iDb];\n    memId = p->regCtr;\n    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );\n    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);\n    sqlite3VdbeLoadString(v, memId-1, p->pTab->zName);\n    aOp = sqlite3VdbeAddOpList(v, ArraySize(autoInc), autoInc, iLn);\n    if( aOp==0 ) break;\n    aOp[0].p2 = memId;\n    aOp[0].p3 = memId+2;\n    aOp[2].p3 = memId;\n    aOp[3].p1 = memId-1;\n    aOp[3].p3 = memId;\n    aOp[3].p5 = SQLITE_JUMPIFNULL;\n    aOp[4].p2 = memId+1;\n    aOp[5].p3 = memId;\n    aOp[6].p1 = memId;\n    aOp[7].p2 = memId+2;\n    aOp[7].p1 = memId;\n    aOp[10].p2 = memId;\n    if( pParse->nTab==0 ) pParse->nTab = 1;\n  }\n}\n\n/*\n** Update the maximum rowid for an autoincrement calculation.\n**\n** This routine should be called when the regRowid register holds a\n** new rowid that is about to be inserted.  If that new rowid is\n** larger than the maximum rowid in the memId memory cell, then the\n** memory cell is updated.\n*/\nstatic void autoIncStep(Parse *pParse, int memId, int regRowid){\n  if( memId>0 ){\n    sqlite3VdbeAddOp2(pParse->pVdbe, OP_MemMax, memId, regRowid);\n  }\n}\n\n/*\n** This routine generates the code needed to write autoincrement\n** maximum rowid values back into the sqlite_sequence register.\n** Every statement that might do an INSERT into an autoincrement\n** table (either directly or through triggers) needs to call this\n** routine just before the \"exit\" code.\n*/\nstatic SQLITE_NOINLINE void autoIncrementEnd(Parse *pParse){\n  AutoincInfo *p;\n  Vdbe *v = pParse->pVdbe;\n  sqlite3 *db = pParse->db;\n\n  assert( v );\n  for(p = pParse->pAinc; p; p = p->pNext){\n    static const int iLn = VDBE_OFFSET_LINENO(2);\n    static const VdbeOpList autoIncEnd[] = {\n      /* 0 */ {OP_NotNull,     0, 2, 0},\n      /* 1 */ {OP_NewRowid,    0, 0, 0},\n      /* 2 */ {OP_MakeRecord,  0, 2, 0},\n      /* 3 */ {OP_Insert,      0, 0, 0},\n      /* 4 */ {OP_Close,       0, 0, 0}\n    };\n    VdbeOp *aOp;\n    Db *pDb = &db->aDb[p->iDb];\n    int iRec;\n    int memId = p->regCtr;\n\n    iRec = sqlite3GetTempReg(pParse);\n    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );\n    sqlite3VdbeAddOp3(v, OP_Le, memId+2, sqlite3VdbeCurrentAddr(v)+7, memId);\n    VdbeCoverage(v);\n    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);\n    aOp = sqlite3VdbeAddOpList(v, ArraySize(autoIncEnd), autoIncEnd, iLn);\n    if( aOp==0 ) break;\n    aOp[0].p1 = memId+1;\n    aOp[1].p2 = memId+1;\n    aOp[2].p1 = memId-1;\n    aOp[2].p3 = iRec;\n    aOp[3].p2 = iRec;\n    aOp[3].p3 = memId+1;\n    aOp[3].p5 = OPFLAG_APPEND;\n    sqlite3ReleaseTempReg(pParse, iRec);\n  }\n}\nSQLITE_PRIVATE void sqlite3AutoincrementEnd(Parse *pParse){\n  if( pParse->pAinc ) autoIncrementEnd(pParse);\n}\n#else\n/*\n** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines\n** above are all no-ops\n*/\n# define autoIncBegin(A,B,C) (0)\n# define autoIncStep(A,B,C)\n#endif /* SQLITE_OMIT_AUTOINCREMENT */\n\n/*\n** If argument pVal is a Select object returned by an sqlite3MultiValues()\n** that was able to use the co-routine optimization, finish coding the\n** co-routine.\n*/\nSQLITE_PRIVATE void sqlite3MultiValuesEnd(Parse *pParse, Select *pVal){\n  if( ALWAYS(pVal) && pVal->pSrc->nSrc>0 ){\n    SrcItem *pItem = &pVal->pSrc->a[0];\n    assert( (pItem->fg.isSubquery && pItem->u4.pSubq!=0) || pParse->nErr );\n    if( pItem->fg.isSubquery ){\n      sqlite3VdbeEndCoroutine(pParse->pVdbe, pItem->u4.pSubq->regReturn);\n      sqlite3VdbeJumpHere(pParse->pVdbe, pItem->u4.pSubq->addrFillSub - 1);\n    }\n  }\n}\n\n/*\n** Return true if all expressions in the expression-list passed as the\n** only argument are constant.\n*/\nstatic int exprListIsConstant(Parse *pParse, ExprList *pRow){\n  int ii;\n  for(ii=0; ii<pRow->nExpr; ii++){\n    if( 0==sqlite3ExprIsConstant(pParse, pRow->a[ii].pExpr) ) return 0;\n  }\n  return 1;\n}\n\n/*\n** Return true if all expressions in the expression-list passed as the\n** only argument are both constant and have no affinity.\n*/\nstatic int exprListIsNoAffinity(Parse *pParse, ExprList *pRow){\n  int ii;\n  if( exprListIsConstant(pParse,pRow)==0 ) return 0;\n  for(ii=0; ii<pRow->nExpr; ii++){\n    Expr *pExpr = pRow->a[ii].pExpr;\n    assert( pExpr->op!=TK_RAISE );\n    assert( pExpr->affExpr==0 );\n    if( 0!=sqlite3ExprAffinity(pExpr) ) return 0;\n  }\n  return 1;\n\n}\n\n/*\n** This function is called by the parser for the second and subsequent\n** rows of a multi-row VALUES clause. Argument pLeft is the part of\n** the VALUES clause already parsed, argument pRow is the vector of values\n** for the new row. The Select object returned represents the complete\n** VALUES clause, including the new row.\n**\n** There are two ways in which this may be achieved - by incremental\n** coding of a co-routine (the \"co-routine\" method) or by returning a\n** Select object equivalent to the following (the \"UNION ALL\" method):\n**\n**        \"pLeft UNION ALL SELECT pRow\"\n**\n** If the VALUES clause contains a lot of rows, this compound Select\n** object may consume a lot of memory.\n**\n** When the co-routine method is used, each row that will be returned\n** by the VALUES clause is coded into part of a co-routine as it is\n** passed to this function. The returned Select object is equivalent to:\n**\n**     SELECT * FROM (\n**       Select object to read co-routine\n**     )\n**\n** The co-routine method is used in most cases. Exceptions are:\n**\n**    a) If the current statement has a WITH clause. This is to avoid\n**       statements like:\n**\n**            WITH cte AS ( VALUES('x'), ('y') ... )\n**            SELECT * FROM cte AS a, cte AS b;\n**\n**       This will not work, as the co-routine uses a hard-coded register\n**       for its OP_Yield instructions, and so it is not possible for two\n**       cursors to iterate through it concurrently.\n**\n**    b) The schema is currently being parsed (i.e. the VALUES clause is part\n**       of a schema item like a VIEW or TRIGGER). In this case there is no VM\n**       being generated when parsing is taking place, and so generating\n**       a co-routine is not possible.\n**\n**    c) There are non-constant expressions in the VALUES clause (e.g.\n**       the VALUES clause is part of a correlated sub-query).\n**\n**    d) One or more of the values in the first row of the VALUES clause\n**       has an affinity (i.e. is a CAST expression). This causes problems\n**       because the complex rules SQLite uses (see function\n**       sqlite3SubqueryColumnTypes() in select.c) to determine the effective\n**       affinity of such a column for all rows require access to all values in\n**       the column simultaneously.\n*/\nSQLITE_PRIVATE Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){\n\n  if( pParse->bHasWith                   /* condition (a) above */\n   || pParse->db->init.busy              /* condition (b) above */\n   || exprListIsConstant(pParse,pRow)==0 /* condition (c) above */\n   || (pLeft->pSrc->nSrc==0 &&\n       exprListIsNoAffinity(pParse,pLeft->pEList)==0) /* condition (d) above */\n   || IN_SPECIAL_PARSE\n  ){\n    /* The co-routine method cannot be used. Fall back to UNION ALL. */\n    Select *pSelect = 0;\n    int f = SF_Values | SF_MultiValue;\n    if( pLeft->pSrc->nSrc ){\n      sqlite3MultiValuesEnd(pParse, pLeft);\n      f = SF_Values;\n    }else if( pLeft->pPrior ){\n      /* In this case set the SF_MultiValue flag only if it was set on pLeft */\n      f = (f & pLeft->selFlags);\n    }\n    pSelect = sqlite3SelectNew(pParse, pRow, 0, 0, 0, 0, 0, f, 0);\n    pLeft->selFlags &= ~(u32)SF_MultiValue;\n    if( pSelect ){\n      pSelect->op = TK_ALL;\n      pSelect->pPrior = pLeft;\n      pLeft = pSelect;\n    }\n  }else{\n    SrcItem *p = 0;               /* SrcItem that reads from co-routine */\n\n    if( pLeft->pSrc->nSrc==0 ){\n      /* Co-routine has not yet been started and the special Select object\n      ** that accesses the co-routine has not yet been created. This block\n      ** does both those things. */\n      Vdbe *v = sqlite3GetVdbe(pParse);\n      Select *pRet = sqlite3SelectNew(pParse, 0, 0, 0, 0, 0, 0, 0, 0);\n\n      /* Ensure the database schema has been read. This is to ensure we have\n      ** the correct text encoding.  */\n      if( (pParse->db->mDbFlags & DBFLAG_SchemaKnownOk)==0 ){\n        sqlite3ReadSchema(pParse);\n      }\n\n      if( pRet ){\n        SelectDest dest;\n        Subquery *pSubq;\n        pRet->pSrc->nSrc = 1;\n        pRet->pPrior = pLeft->pPrior;\n        pRet->op = pLeft->op;\n        if( pRet->pPrior ) pRet->selFlags |= SF_Values;\n        pLeft->pPrior = 0;\n        pLeft->op = TK_SELECT;\n        assert( pLeft->pNext==0 );\n        assert( pRet->pNext==0 );\n        p = &pRet->pSrc->a[0];\n        p->fg.viaCoroutine = 1;\n        p->iCursor = -1;\n        assert( !p->fg.isIndexedBy && !p->fg.isTabFunc );\n        p->u1.nRow = 2;\n        if( sqlite3SrcItemAttachSubquery(pParse, p, pLeft, 0) ){\n          pSubq = p->u4.pSubq;\n          pSubq->addrFillSub = sqlite3VdbeCurrentAddr(v) + 1;\n          pSubq->regReturn = ++pParse->nMem;\n          sqlite3VdbeAddOp3(v, OP_InitCoroutine,\n                            pSubq->regReturn, 0, pSubq->addrFillSub);\n          sqlite3SelectDestInit(&dest, SRT_Coroutine, pSubq->regReturn);\n\n          /* Allocate registers for the output of the co-routine. Do so so\n          ** that there are two unused registers immediately before those\n          ** used by the co-routine. This allows the code in sqlite3Insert()\n          ** to use these registers directly, instead of copying the output\n          ** of the co-routine to a separate array for processing.  */\n          dest.iSdst = pParse->nMem + 3;\n          dest.nSdst = pLeft->pEList->nExpr;\n          pParse->nMem += 2 + dest.nSdst;\n\n          pLeft->selFlags |= SF_MultiValue;\n          sqlite3Select(pParse, pLeft, &dest);\n          pSubq->regResult = dest.iSdst;\n          assert( pParse->nErr || dest.iSdst>0 );\n        }\n        pLeft = pRet;\n      }\n    }else{\n      p = &pLeft->pSrc->a[0];\n      assert( !p->fg.isTabFunc && !p->fg.isIndexedBy );\n      p->u1.nRow++;\n    }\n\n    if( pParse->nErr==0 ){\n      Subquery *pSubq;\n      assert( p!=0 );\n      assert( p->fg.isSubquery );\n      pSubq = p->u4.pSubq;\n      assert( pSubq!=0 );\n      assert( pSubq->pSelect!=0 );\n      assert( pSubq->pSelect->pEList!=0 );\n      if( pSubq->pSelect->pEList->nExpr!=pRow->nExpr ){\n        sqlite3SelectWrongNumTermsError(pParse, pSubq->pSelect);\n      }else{\n        sqlite3ExprCodeExprList(pParse, pRow, pSubq->regResult, 0, 0);\n        sqlite3VdbeAddOp1(pParse->pVdbe, OP_Yield, pSubq->regReturn);\n      }\n    }\n    sqlite3ExprListDelete(pParse->db, pRow);\n  }\n\n  return pLeft;\n}\n\n/* Forward declaration */\nstatic int xferOptimization(\n  Parse *pParse,        /* Parser context */\n  Table *pDest,         /* The table we are inserting into */\n  Select *pSelect,      /* A SELECT statement to use as the data source */\n  int onError,          /* How to handle constraint errors */\n  int iDbDest           /* The database of pDest */\n);\n\n/*\n** This routine is called to handle SQL of the following forms:\n**\n**    insert into TABLE (IDLIST) values(EXPRLIST),(EXPRLIST),...\n**    insert into TABLE (IDLIST) select\n**    insert into TABLE (IDLIST) default values\n**\n** The IDLIST following the table name is always optional.  If omitted,\n** then a list of all (non-hidden) columns for the table is substituted.\n** The IDLIST appears in the pColumn parameter.  pColumn is NULL if IDLIST\n** is omitted.\n**\n** For the pSelect parameter holds the values to be inserted for the\n** first two forms shown above.  A VALUES clause is really just short-hand\n** for a SELECT statement that omits the FROM clause and everything else\n** that follows.  If the pSelect parameter is NULL, that means that the\n** DEFAULT VALUES form of the INSERT statement is intended.\n**\n** The code generated follows one of four templates.  For a simple\n** insert with data coming from a single-row VALUES clause, the code executes\n** once straight down through.  Pseudo-code follows (we call this\n** the \"1st template\"):\n**\n**         open write cursor to <table> and its indices\n**         put VALUES clause expressions into registers\n**         write the resulting record into <table>\n**         cleanup\n**\n** The three remaining templates assume the statement is of the form\n**\n**   INSERT INTO <table> SELECT ...\n**\n** If the SELECT clause is of the restricted form \"SELECT * FROM <table2>\" -\n** in other words if the SELECT pulls all columns from a single table\n** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and\n** if <table2> and <table1> are distinct tables but have identical\n** schemas, including all the same indices, then a special optimization\n** is invoked that copies raw records from <table2> over to <table1>.\n** See the xferOptimization() function for the implementation of this\n** template.  This is the 2nd template.\n**\n**         open a write cursor to <table>\n**         open read cursor on <table2>\n**         transfer all records in <table2> over to <table>\n**         close cursors\n**         foreach index on <table>\n**           open a write cursor on the <table> index\n**           open a read cursor on the corresponding <table2> index\n**           transfer all records from the read to the write cursors\n**           close cursors\n**         end foreach\n**\n** The 3rd template is for when the second template does not apply\n** and the SELECT clause does not read from <table> at any time.\n** The generated code follows this template:\n**\n**         X <- A\n**         goto B\n**      A: setup for the SELECT\n**         loop over the rows in the SELECT\n**           load values into registers R..R+n\n**           yield X\n**         end loop\n**         cleanup after the SELECT\n**         end-coroutine X\n**      B: open write cursor to <table> and its indices\n**      C: yield X, at EOF goto D\n**         insert the select result into <table> from R..R+n\n**         goto C\n**      D: cleanup\n**\n** The 4th template is used if the insert statement takes its\n** values from a SELECT but the data is being inserted into a table\n** that is also read as part of the SELECT.  In the third form,\n** we have to use an intermediate table to store the results of\n** the select.  The template is like this:\n**\n**         X <- A\n**         goto B\n**      A: setup for the SELECT\n**         loop over the tables in the SELECT\n**           load value into register R..R+n\n**           yield X\n**         end loop\n**         cleanup after the SELECT\n**         end co-routine R\n**      B: open temp table\n**      L: yield X, at EOF goto M\n**         insert row from R..R+n into temp table\n**         goto L\n**      M: open write cursor to <table> and its indices\n**         rewind temp table\n**      C: loop over rows of intermediate table\n**           transfer values form intermediate table into <table>\n**         end loop\n**      D: cleanup\n*/\nSQLITE_PRIVATE void sqlite3Insert(\n  Parse *pParse,        /* Parser context */\n  SrcList *pTabList,    /* Name of table into which we are inserting */\n  Select *pSelect,      /* A SELECT statement to use as the data source */\n  IdList *pColumn,      /* Column names corresponding to IDLIST, or NULL. */\n  int onError,          /* How to handle constraint errors */\n  Upsert *pUpsert       /* ON CONFLICT clauses for upsert, or NULL */\n){\n  sqlite3 *db;          /* The main database structure */\n  Table *pTab;          /* The table to insert into.  aka TABLE */\n  int i, j;             /* Loop counters */\n  Vdbe *v;              /* Generate code into this virtual machine */\n  Index *pIdx;          /* For looping over indices of the table */\n  int nColumn;          /* Number of columns in the data */\n  int nHidden = 0;      /* Number of hidden columns if TABLE is virtual */\n  int iDataCur = 0;     /* VDBE cursor that is the main data repository */\n  int iIdxCur = 0;      /* First index cursor */\n  int ipkColumn = -1;   /* Column that is the INTEGER PRIMARY KEY */\n  int endOfLoop;        /* Label for the end of the insertion loop */\n  int srcTab = 0;       /* Data comes from this temporary cursor if >=0 */\n  int addrInsTop = 0;   /* Jump to label \"D\" */\n  int addrCont = 0;     /* Top of insert loop. Label \"C\" in templates 3 and 4 */\n  SelectDest dest;      /* Destination for SELECT on rhs of INSERT */\n  int iDb;              /* Index of database holding TABLE */\n  u8 useTempTable = 0;  /* Store SELECT results in intermediate table */\n  u8 appendFlag = 0;    /* True if the insert is likely to be an append */\n  u8 withoutRowid;      /* 0 for normal table.  1 for WITHOUT ROWID table */\n  u8 bIdListInOrder;    /* True if IDLIST is in table order */\n  ExprList *pList = 0;  /* List of VALUES() to be inserted  */\n  int iRegStore;        /* Register in which to store next column */\n\n  /* Register allocations */\n  int regFromSelect = 0;/* Base register for data coming from SELECT */\n  int regAutoinc = 0;   /* Register holding the AUTOINCREMENT counter */\n  int regRowCount = 0;  /* Memory cell used for the row counter */\n  int regIns;           /* Block of regs holding rowid+data being inserted */\n  int regRowid;         /* registers holding insert rowid */\n  int regData;          /* register holding first column to insert */\n  int *aRegIdx = 0;     /* One register allocated to each index */\n  int *aTabColMap = 0;  /* Mapping from pTab columns to pCol entries */\n\n#ifndef SQLITE_OMIT_TRIGGER\n  int isView;                 /* True if attempting to insert into a view */\n  Trigger *pTrigger;          /* List of triggers on pTab, if required */\n  int tmask;                  /* Mask of trigger times */\n#endif\n\n  db = pParse->db;\n  assert( db->pParse==pParse );\n  if( pParse->nErr ){\n    goto insert_cleanup;\n  }\n  assert( db->mallocFailed==0 );\n  dest.iSDParm = 0;  /* Suppress a harmless compiler warning */\n\n  /* If the Select object is really just a simple VALUES() list with a\n  ** single row (the common case) then keep that one row of values\n  ** and discard the other (unused) parts of the pSelect object\n  */\n  if( pSelect && (pSelect->selFlags & SF_Values)!=0 && pSelect->pPrior==0 ){\n    pList = pSelect->pEList;\n    pSelect->pEList = 0;\n    sqlite3SelectDelete(db, pSelect);\n    pSelect = 0;\n  }\n\n  /* Locate the table into which we will be inserting new information.\n  */\n  assert( pTabList->nSrc==1 );\n  pTab = sqlite3SrcListLookup(pParse, pTabList);\n  if( pTab==0 ){\n    goto insert_cleanup;\n  }\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  assert( iDb<db->nDb );\n  if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0,\n                       db->aDb[iDb].zDbSName) ){\n    goto insert_cleanup;\n  }\n  withoutRowid = !HasRowid(pTab);\n\n  /* Figure out if we have any triggers and if the table being\n  ** inserted into is a view\n  */\n#ifndef SQLITE_OMIT_TRIGGER\n  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_INSERT, 0, &tmask);\n  isView = IsView(pTab);\n#else\n# define pTrigger 0\n# define tmask 0\n# define isView 0\n#endif\n#ifdef SQLITE_OMIT_VIEW\n# undef isView\n# define isView 0\n#endif\n  assert( (pTrigger && tmask) || (pTrigger==0 && tmask==0) );\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x10000 ){\n    sqlite3TreeViewLine(0, \"In sqlite3Insert() at %s:%d\", __FILE__, __LINE__);\n    sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect, pList,\n                          onError, pUpsert, pTrigger);\n  }\n#endif\n\n  /* If pTab is really a view, make sure it has been initialized.\n  ** ViewGetColumnNames() is a no-op if pTab is not a view.\n  */\n  if( sqlite3ViewGetColumnNames(pParse, pTab) ){\n    goto insert_cleanup;\n  }\n\n  /* Cannot insert into a read-only table.\n  */\n  if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){\n    goto insert_cleanup;\n  }\n\n  /* Allocate a VDBE\n  */\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 ) goto insert_cleanup;\n  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);\n  sqlite3BeginWriteOperation(pParse, pSelect || pTrigger, iDb);\n\n#ifndef SQLITE_OMIT_XFER_OPT\n  /* If the statement is of the form\n  **\n  **       INSERT INTO <table1> SELECT * FROM <table2>;\n  **\n  ** Then special optimizations can be applied that make the transfer\n  ** very fast and which reduce fragmentation of indices.\n  **\n  ** This is the 2nd template.\n  */\n  if( pColumn==0\n   && pSelect!=0\n   && pTrigger==0\n   && xferOptimization(pParse, pTab, pSelect, onError, iDb)\n  ){\n    assert( !pTrigger );\n    assert( pList==0 );\n    goto insert_end;\n  }\n#endif /* SQLITE_OMIT_XFER_OPT */\n\n  /* If this is an AUTOINCREMENT table, look up the sequence number in the\n  ** sqlite_sequence table and store it in memory cell regAutoinc.\n  */\n  regAutoinc = autoIncBegin(pParse, iDb, pTab);\n\n  /* Allocate a block registers to hold the rowid and the values\n  ** for all columns of the new row.\n  */\n  regRowid = regIns = pParse->nMem+1;\n  pParse->nMem += pTab->nCol + 1;\n  if( IsVirtual(pTab) ){\n    regRowid++;\n    pParse->nMem++;\n  }\n  regData = regRowid+1;\n\n  /* If the INSERT statement included an IDLIST term, then make sure\n  ** all elements of the IDLIST really are columns of the table and\n  ** remember the column indices.\n  **\n  ** If the table has an INTEGER PRIMARY KEY column and that column\n  ** is named in the IDLIST, then record in the ipkColumn variable\n  ** the index into IDLIST of the primary key column.  ipkColumn is\n  ** the index of the primary key as it appears in IDLIST, not as\n  ** is appears in the original table.  (The index of the INTEGER\n  ** PRIMARY KEY in the original table is pTab->iPKey.)  After this\n  ** loop, if ipkColumn==(-1), that means that integer primary key\n  ** is unspecified, and hence the table is either WITHOUT ROWID or\n  ** it will automatically generated an integer primary key.\n  **\n  ** bIdListInOrder is true if the columns in IDLIST are in storage\n  ** order.  This enables an optimization that avoids shuffling the\n  ** columns into storage order.  False negatives are harmless,\n  ** but false positives will cause database corruption.\n  */\n  bIdListInOrder = (pTab->tabFlags & (TF_OOOHidden|TF_HasStored))==0;\n  if( pColumn ){\n    aTabColMap = sqlite3DbMallocZero(db, pTab->nCol*sizeof(int));\n    if( aTabColMap==0 ) goto insert_cleanup;\n    for(i=0; i<pColumn->nId; i++){\n      j = sqlite3ColumnIndex(pTab, pColumn->a[i].zName);\n      if( j>=0 ){\n        if( aTabColMap[j]==0 ) aTabColMap[j] = i+1;\n        if( i!=j ) bIdListInOrder = 0;\n        if( j==pTab->iPKey ){\n          ipkColumn = i;  assert( !withoutRowid );\n        }\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n        if( pTab->aCol[j].colFlags & (COLFLAG_STORED|COLFLAG_VIRTUAL) ){\n          sqlite3ErrorMsg(pParse,\n             \"cannot INSERT into generated column \\\"%s\\\"\",\n             pTab->aCol[j].zCnName);\n          goto insert_cleanup;\n        }\n#endif\n      }else{\n        if( sqlite3IsRowid(pColumn->a[i].zName) && !withoutRowid ){\n          ipkColumn = i;\n          bIdListInOrder = 0;\n        }else{\n          sqlite3ErrorMsg(pParse, \"table %S has no column named %s\",\n              pTabList->a, pColumn->a[i].zName);\n          pParse->checkSchema = 1;\n          goto insert_cleanup;\n        }\n      }\n    }\n  }\n\n  /* Figure out how many columns of data are supplied.  If the data\n  ** is coming from a SELECT statement, then generate a co-routine that\n  ** produces a single row of the SELECT on each invocation.  The\n  ** co-routine is the common header to the 3rd and 4th templates.\n  */\n  if( pSelect ){\n    /* Data is coming from a SELECT or from a multi-row VALUES clause.\n    ** Generate a co-routine to run the SELECT. */\n    int rc;             /* Result code */\n\n    if( pSelect->pSrc->nSrc==1\n     && pSelect->pSrc->a[0].fg.viaCoroutine\n     && pSelect->pPrior==0\n    ){\n      SrcItem *pItem = &pSelect->pSrc->a[0];\n      Subquery *pSubq;\n      assert( pItem->fg.isSubquery );\n      pSubq = pItem->u4.pSubq;\n      dest.iSDParm = pSubq->regReturn;\n      regFromSelect = pSubq->regResult;\n      assert( pSubq->pSelect!=0 );\n      assert( pSubq->pSelect->pEList!=0 );\n      nColumn = pSubq->pSelect->pEList->nExpr;\n      ExplainQueryPlan((pParse, 0, \"SCAN %S\", pItem));\n      if( bIdListInOrder && nColumn==pTab->nCol ){\n        regData = regFromSelect;\n        regRowid = regData - 1;\n        regIns = regRowid - (IsVirtual(pTab) ? 1 : 0);\n      }\n    }else{\n      int addrTop;        /* Top of the co-routine */\n      int regYield = ++pParse->nMem;\n      addrTop = sqlite3VdbeCurrentAddr(v) + 1;\n      sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop);\n      sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield);\n      dest.iSdst = bIdListInOrder ? regData : 0;\n      dest.nSdst = pTab->nCol;\n      rc = sqlite3Select(pParse, pSelect, &dest);\n      regFromSelect = dest.iSdst;\n      assert( db->pParse==pParse );\n      if( rc || pParse->nErr ) goto insert_cleanup;\n      assert( db->mallocFailed==0 );\n      sqlite3VdbeEndCoroutine(v, regYield);\n      sqlite3VdbeJumpHere(v, addrTop - 1);                       /* label B: */\n      assert( pSelect->pEList );\n      nColumn = pSelect->pEList->nExpr;\n    }\n\n    /* Set useTempTable to TRUE if the result of the SELECT statement\n    ** should be written into a temporary table (template 4).  Set to\n    ** FALSE if each output row of the SELECT can be written directly into\n    ** the destination table (template 3).\n    **\n    ** A temp table must be used if the table being updated is also one\n    ** of the tables being read by the SELECT statement.  Also use a\n    ** temp table in the case of row triggers.\n    */\n    if( pTrigger || readsTable(pParse, iDb, pTab) ){\n      useTempTable = 1;\n    }\n\n    if( useTempTable ){\n      /* Invoke the coroutine to extract information from the SELECT\n      ** and add it to a transient table srcTab.  The code generated\n      ** here is from the 4th template:\n      **\n      **      B: open temp table\n      **      L: yield X, goto M at EOF\n      **         insert row from R..R+n into temp table\n      **         goto L\n      **      M: ...\n      */\n      int regRec;          /* Register to hold packed record */\n      int regTempRowid;    /* Register to hold temp table ROWID */\n      int addrL;           /* Label \"L\" */\n\n      srcTab = pParse->nTab++;\n      regRec = sqlite3GetTempReg(pParse);\n      regTempRowid = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp2(v, OP_OpenEphemeral, srcTab, nColumn);\n      addrL = sqlite3VdbeAddOp1(v, OP_Yield, dest.iSDParm); VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regFromSelect, nColumn, regRec);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regTempRowid);\n      sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regTempRowid);\n      sqlite3VdbeGoto(v, addrL);\n      sqlite3VdbeJumpHere(v, addrL);\n      sqlite3ReleaseTempReg(pParse, regRec);\n      sqlite3ReleaseTempReg(pParse, regTempRowid);\n    }\n  }else{\n    /* This is the case if the data for the INSERT is coming from a\n    ** single-row VALUES clause\n    */\n    NameContext sNC;\n    memset(&sNC, 0, sizeof(sNC));\n    sNC.pParse = pParse;\n    srcTab = -1;\n    assert( useTempTable==0 );\n    if( pList ){\n      nColumn = pList->nExpr;\n      if( sqlite3ResolveExprListNames(&sNC, pList) ){\n        goto insert_cleanup;\n      }\n    }else{\n      nColumn = 0;\n    }\n  }\n\n  /* If there is no IDLIST term but the table has an integer primary\n  ** key, the set the ipkColumn variable to the integer primary key\n  ** column index in the original table definition.\n  */\n  if( pColumn==0 && nColumn>0 ){\n    ipkColumn = pTab->iPKey;\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    if( ipkColumn>=0 && (pTab->tabFlags & TF_HasGenerated)!=0 ){\n      testcase( pTab->tabFlags & TF_HasVirtual );\n      testcase( pTab->tabFlags & TF_HasStored );\n      for(i=ipkColumn-1; i>=0; i--){\n        if( pTab->aCol[i].colFlags & COLFLAG_GENERATED ){\n          testcase( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL );\n          testcase( pTab->aCol[i].colFlags & COLFLAG_STORED );\n          ipkColumn--;\n        }\n      }\n    }\n#endif\n\n    /* Make sure the number of columns in the source data matches the number\n    ** of columns to be inserted into the table.\n    */\n    assert( TF_HasHidden==COLFLAG_HIDDEN );\n    assert( TF_HasGenerated==COLFLAG_GENERATED );\n    assert( COLFLAG_NOINSERT==(COLFLAG_GENERATED|COLFLAG_HIDDEN) );\n    if( (pTab->tabFlags & (TF_HasGenerated|TF_HasHidden))!=0 ){\n      for(i=0; i<pTab->nCol; i++){\n        if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ) nHidden++;\n      }\n    }\n    if( nColumn!=(pTab->nCol-nHidden) ){\n      sqlite3ErrorMsg(pParse,\n         \"table %S has %d columns but %d values were supplied\",\n         pTabList->a, pTab->nCol-nHidden, nColumn);\n     goto insert_cleanup;\n    }\n  }\n  if( pColumn!=0 && nColumn!=pColumn->nId ){\n    sqlite3ErrorMsg(pParse, \"%d values for %d columns\", nColumn, pColumn->nId);\n    goto insert_cleanup;\n  }\n\n  /* Initialize the count of rows to be inserted\n  */\n  if( (db->flags & SQLITE_CountRows)!=0\n   && !pParse->nested\n   && !pParse->pTriggerTab\n   && !pParse->bReturning\n  ){\n    regRowCount = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);\n  }\n\n  /* If this is not a view, open the table and and all indices */\n  if( !isView ){\n    int nIdx;\n    nIdx = sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, 0, -1, 0,\n                                      &iDataCur, &iIdxCur);\n    aRegIdx = sqlite3DbMallocRawNN(db, sizeof(int)*(nIdx+2));\n    if( aRegIdx==0 ){\n      goto insert_cleanup;\n    }\n    for(i=0, pIdx=pTab->pIndex; i<nIdx; pIdx=pIdx->pNext, i++){\n      assert( pIdx );\n      aRegIdx[i] = ++pParse->nMem;\n      pParse->nMem += pIdx->nColumn;\n    }\n    aRegIdx[i] = ++pParse->nMem;  /* Register to store the table record */\n  }\n#ifndef SQLITE_OMIT_UPSERT\n  if( pUpsert ){\n    Upsert *pNx;\n    if( IsVirtual(pTab) ){\n      sqlite3ErrorMsg(pParse, \"UPSERT not implemented for virtual table \\\"%s\\\"\",\n              pTab->zName);\n      goto insert_cleanup;\n    }\n    if( IsView(pTab) ){\n      sqlite3ErrorMsg(pParse, \"cannot UPSERT a view\");\n      goto insert_cleanup;\n    }\n    if( sqlite3HasExplicitNulls(pParse, pUpsert->pUpsertTarget) ){\n      goto insert_cleanup;\n    }\n    pTabList->a[0].iCursor = iDataCur;\n    pNx = pUpsert;\n    do{\n      pNx->pUpsertSrc = pTabList;\n      pNx->regData = regData;\n      pNx->iDataCur = iDataCur;\n      pNx->iIdxCur = iIdxCur;\n      if( pNx->pUpsertTarget ){\n        if( sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx, pUpsert) ){\n          goto insert_cleanup;\n        }\n      }\n      pNx = pNx->pNextUpsert;\n    }while( pNx!=0 );\n  }\n#endif\n\n\n  /* This is the top of the main insertion loop */\n  if( useTempTable ){\n    /* This block codes the top of loop only.  The complete loop is the\n    ** following pseudocode (template 4):\n    **\n    **         rewind temp table, if empty goto D\n    **      C: loop over rows of intermediate table\n    **           transfer values form intermediate table into <table>\n    **         end loop\n    **      D: ...\n    */\n    addrInsTop = sqlite3VdbeAddOp1(v, OP_Rewind, srcTab); VdbeCoverage(v);\n    addrCont = sqlite3VdbeCurrentAddr(v);\n  }else if( pSelect ){\n    /* This block codes the top of loop only.  The complete loop is the\n    ** following pseudocode (template 3):\n    **\n    **      C: yield X, at EOF goto D\n    **         insert the select result into <table> from R..R+n\n    **         goto C\n    **      D: ...\n    */\n    sqlite3VdbeReleaseRegisters(pParse, regData, pTab->nCol, 0, 0);\n    addrInsTop = addrCont = sqlite3VdbeAddOp1(v, OP_Yield, dest.iSDParm);\n    VdbeCoverage(v);\n    if( ipkColumn>=0 ){\n      /* tag-20191021-001: If the INTEGER PRIMARY KEY is being generated by the\n      ** SELECT, go ahead and copy the value into the rowid slot now, so that\n      ** the value does not get overwritten by a NULL at tag-20191021-002. */\n      sqlite3VdbeAddOp2(v, OP_Copy, regFromSelect+ipkColumn, regRowid);\n    }\n  }\n\n  /* Compute data for ordinary columns of the new entry.  Values\n  ** are written in storage order into registers starting with regData.\n  ** Only ordinary columns are computed in this loop. The rowid\n  ** (if there is one) is computed later and generated columns are\n  ** computed after the rowid since they might depend on the value\n  ** of the rowid.\n  */\n  nHidden = 0;\n  iRegStore = regData;  assert( regData==regRowid+1 );\n  for(i=0; i<pTab->nCol; i++, iRegStore++){\n    int k;\n    u32 colFlags;\n    assert( i>=nHidden );\n    if( i==pTab->iPKey ){\n      /* tag-20191021-002: References to the INTEGER PRIMARY KEY are filled\n      ** using the rowid. So put a NULL in the IPK slot of the record to avoid\n      ** using excess space.  The file format definition requires this extra\n      ** NULL - we cannot optimize further by skipping the column completely */\n      sqlite3VdbeAddOp1(v, OP_SoftNull, iRegStore);\n      continue;\n    }\n    if( ((colFlags = pTab->aCol[i].colFlags) & COLFLAG_NOINSERT)!=0 ){\n      nHidden++;\n      if( (colFlags & COLFLAG_VIRTUAL)!=0 ){\n        /* Virtual columns do not participate in OP_MakeRecord.  So back up\n        ** iRegStore by one slot to compensate for the iRegStore++ in the\n        ** outer for() loop */\n        iRegStore--;\n        continue;\n      }else if( (colFlags & COLFLAG_STORED)!=0 ){\n        /* Stored columns are computed later.  But if there are BEFORE\n        ** triggers, the slots used for stored columns will be OP_Copy-ed\n        ** to a second block of registers, so the register needs to be\n        ** initialized to NULL to avoid an uninitialized register read */\n        if( tmask & TRIGGER_BEFORE ){\n          sqlite3VdbeAddOp1(v, OP_SoftNull, iRegStore);\n        }\n        continue;\n      }else if( pColumn==0 ){\n        /* Hidden columns that are not explicitly named in the INSERT\n        ** get their default value */\n        sqlite3ExprCodeFactorable(pParse,\n            sqlite3ColumnExpr(pTab, &pTab->aCol[i]),\n            iRegStore);\n        continue;\n      }\n    }\n    if( pColumn ){\n      j = aTabColMap[i];\n      assert( j>=0 && j<=pColumn->nId );\n      if( j==0 ){\n        /* A column not named in the insert column list gets its\n        ** default value */\n        sqlite3ExprCodeFactorable(pParse,\n            sqlite3ColumnExpr(pTab, &pTab->aCol[i]),\n            iRegStore);\n        continue;\n      }\n      k = j - 1;\n    }else if( nColumn==0 ){\n      /* This is INSERT INTO ... DEFAULT VALUES.  Load the default value. */\n      sqlite3ExprCodeFactorable(pParse,\n          sqlite3ColumnExpr(pTab, &pTab->aCol[i]),\n          iRegStore);\n      continue;\n    }else{\n      k = i - nHidden;\n    }\n\n    if( useTempTable ){\n      sqlite3VdbeAddOp3(v, OP_Column, srcTab, k, iRegStore);\n    }else if( pSelect ){\n      if( regFromSelect!=regData ){\n        sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+k, iRegStore);\n      }\n    }else{\n      Expr *pX = pList->a[k].pExpr;\n      int y = sqlite3ExprCodeTarget(pParse, pX, iRegStore);\n      if( y!=iRegStore ){\n        sqlite3VdbeAddOp2(v,\n          ExprHasProperty(pX, EP_Subquery) ? OP_Copy : OP_SCopy, y, iRegStore);\n      }\n    }\n  }\n\n\n  /* Run the BEFORE and INSTEAD OF triggers, if there are any\n  */\n  endOfLoop = sqlite3VdbeMakeLabel(pParse);\n  if( tmask & TRIGGER_BEFORE ){\n    int regCols = sqlite3GetTempRange(pParse, pTab->nCol+1);\n\n    /* build the NEW.* reference row.  Note that if there is an INTEGER\n    ** PRIMARY KEY into which a NULL is being inserted, that NULL will be\n    ** translated into a unique ID for the row.  But on a BEFORE trigger,\n    ** we do not know what the unique ID will be (because the insert has\n    ** not happened yet) so we substitute a rowid of -1\n    */\n    if( ipkColumn<0 ){\n      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);\n    }else{\n      int addr1;\n      assert( !withoutRowid );\n      if( useTempTable ){\n        sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);\n      }else{\n        assert( pSelect==0 );  /* Otherwise useTempTable is true */\n        sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);\n      }\n      addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);\n      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);\n      sqlite3VdbeJumpHere(v, addr1);\n      sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);\n    }\n\n    /* Copy the new data already generated. */\n    assert( pTab->nNVCol>0 || pParse->nErr>0 );\n    sqlite3VdbeAddOp3(v, OP_Copy, regRowid+1, regCols+1, pTab->nNVCol-1);\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    /* Compute the new value for generated columns after all other\n    ** columns have already been computed.  This must be done after\n    ** computing the ROWID in case one of the generated columns\n    ** refers to the ROWID. */\n    if( pTab->tabFlags & TF_HasGenerated ){\n      testcase( pTab->tabFlags & TF_HasVirtual );\n      testcase( pTab->tabFlags & TF_HasStored );\n      sqlite3ComputeGeneratedColumns(pParse, regCols+1, pTab);\n    }\n#endif\n\n    /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,\n    ** do not attempt any conversions before assembling the record.\n    ** If this is a real table, attempt conversions as required by the\n    ** table column affinities.\n    */\n    if( !isView ){\n      sqlite3TableAffinity(v, pTab, regCols+1);\n    }\n\n    /* Fire BEFORE or INSTEAD OF triggers */\n    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_BEFORE,\n        pTab, regCols-pTab->nCol-1, onError, endOfLoop);\n\n    sqlite3ReleaseTempRange(pParse, regCols, pTab->nCol+1);\n  }\n\n  if( !isView ){\n    if( IsVirtual(pTab) ){\n      /* The row that the VUpdate opcode will delete: none */\n      sqlite3VdbeAddOp2(v, OP_Null, 0, regIns);\n    }\n    if( ipkColumn>=0 ){\n      /* Compute the new rowid */\n      if( useTempTable ){\n        sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regRowid);\n      }else if( pSelect ){\n        /* Rowid already initialized at tag-20191021-001 */\n      }else{\n        Expr *pIpk = pList->a[ipkColumn].pExpr;\n        if( pIpk->op==TK_NULL && !IsVirtual(pTab) ){\n          sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);\n          appendFlag = 1;\n        }else{\n          sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regRowid);\n        }\n      }\n      /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid\n      ** to generate a unique primary key value.\n      */\n      if( !appendFlag ){\n        int addr1;\n        if( !IsVirtual(pTab) ){\n          addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);\n          sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);\n          sqlite3VdbeJumpHere(v, addr1);\n        }else{\n          addr1 = sqlite3VdbeCurrentAddr(v);\n          sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, addr1+2); VdbeCoverage(v);\n        }\n        sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);\n      }\n    }else if( IsVirtual(pTab) || withoutRowid ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);\n    }else{\n      sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);\n      appendFlag = 1;\n    }\n    autoIncStep(pParse, regAutoinc, regRowid);\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    /* Compute the new value for generated columns after all other\n    ** columns have already been computed.  This must be done after\n    ** computing the ROWID in case one of the generated columns\n    ** is derived from the INTEGER PRIMARY KEY. */\n    if( pTab->tabFlags & TF_HasGenerated ){\n      sqlite3ComputeGeneratedColumns(pParse, regRowid+1, pTab);\n    }\n#endif\n\n    /* Generate code to check constraints and generate index keys and\n    ** do the insertion.\n    */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( IsVirtual(pTab) ){\n      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);\n      sqlite3VtabMakeWritable(pParse, pTab);\n      sqlite3VdbeAddOp4(v, OP_VUpdate, 1, pTab->nCol+2, regIns, pVTab, P4_VTAB);\n      sqlite3VdbeChangeP5(v, onError==OE_Default ? OE_Abort : onError);\n      sqlite3MayAbort(pParse);\n    }else\n#endif\n    {\n      int isReplace = 0;/* Set to true if constraints may cause a replace */\n      int bUseSeek;     /* True to use OPFLAG_SEEKRESULT */\n      sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,\n          regIns, 0, ipkColumn>=0, onError, endOfLoop, &isReplace, 0, pUpsert\n      );\n      if( db->flags & SQLITE_ForeignKeys ){\n        sqlite3FkCheck(pParse, pTab, 0, regIns, 0, 0);\n      }\n\n      /* Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE\n      ** constraints or (b) there are no triggers and this table is not a\n      ** parent table in a foreign key constraint. It is safe to set the\n      ** flag in the second case as if any REPLACE constraint is hit, an\n      ** OP_Delete or OP_IdxDelete instruction will be executed on each\n      ** cursor that is disturbed. And these instructions both clear the\n      ** VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT\n      ** functionality.  */\n      bUseSeek = (isReplace==0 || !sqlite3VdbeHasSubProgram(v));\n      sqlite3CompleteInsertion(pParse, pTab, iDataCur, iIdxCur,\n          regIns, aRegIdx, 0, appendFlag, bUseSeek\n      );\n    }\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n  }else if( pParse->bReturning ){\n    /* If there is a RETURNING clause, populate the rowid register with\n    ** constant value -1, in case one or more of the returned expressions\n    ** refer to the \"rowid\" of the view.  */\n    sqlite3VdbeAddOp2(v, OP_Integer, -1, regRowid);\n#endif\n  }\n\n  /* Update the count of rows that are inserted\n  */\n  if( regRowCount ){\n    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);\n  }\n\n  if( pTrigger ){\n    /* Code AFTER triggers */\n    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_AFTER,\n        pTab, regData-2-pTab->nCol, onError, endOfLoop);\n  }\n\n  /* The bottom of the main insertion loop, if the data source\n  ** is a SELECT statement.\n  */\n  sqlite3VdbeResolveLabel(v, endOfLoop);\n  if( useTempTable ){\n    sqlite3VdbeAddOp2(v, OP_Next, srcTab, addrCont); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addrInsTop);\n    sqlite3VdbeAddOp1(v, OP_Close, srcTab);\n  }else if( pSelect ){\n    sqlite3VdbeGoto(v, addrCont);\n#ifdef SQLITE_DEBUG\n    /* If we are jumping back to an OP_Yield that is preceded by an\n    ** OP_ReleaseReg, set the p5 flag on the OP_Goto so that the\n    ** OP_ReleaseReg will be included in the loop. */\n    if( sqlite3VdbeGetOp(v, addrCont-1)->opcode==OP_ReleaseReg ){\n      assert( sqlite3VdbeGetOp(v, addrCont)->opcode==OP_Yield );\n      sqlite3VdbeChangeP5(v, 1);\n    }\n#endif\n    sqlite3VdbeJumpHere(v, addrInsTop);\n  }\n\n#ifndef SQLITE_OMIT_XFER_OPT\ninsert_end:\n#endif /* SQLITE_OMIT_XFER_OPT */\n  /* Update the sqlite_sequence table by storing the content of the\n  ** maximum rowid counter values recorded while inserting into\n  ** autoincrement tables.\n  */\n  if( pParse->nested==0 && pParse->pTriggerTab==0 ){\n    sqlite3AutoincrementEnd(pParse);\n  }\n\n  /*\n  ** Return the number of rows inserted. If this routine is\n  ** generating code because of a call to sqlite3NestedParse(), do not\n  ** invoke the callback function.\n  */\n  if( regRowCount ){\n    sqlite3CodeChangeCount(v, regRowCount, \"rows inserted\");\n  }\n\ninsert_cleanup:\n  sqlite3SrcListDelete(db, pTabList);\n  sqlite3ExprListDelete(db, pList);\n  sqlite3UpsertDelete(db, pUpsert);\n  sqlite3SelectDelete(db, pSelect);\n  if( pColumn ){\n    sqlite3IdListDelete(db, pColumn);\n    sqlite3DbFree(db, aTabColMap);\n  }\n  if( aRegIdx ) sqlite3DbNNFreeNN(db, aRegIdx);\n}\n\n/* Make sure \"isView\" and other macros defined above are undefined. Otherwise\n** they may interfere with compilation of other functions in this file\n** (or in another file, if this file becomes part of the amalgamation).  */\n#ifdef isView\n #undef isView\n#endif\n#ifdef pTrigger\n #undef pTrigger\n#endif\n#ifdef tmask\n #undef tmask\n#endif\n\n/*\n** Meanings of bits in of pWalker->eCode for\n** sqlite3ExprReferencesUpdatedColumn()\n*/\n#define CKCNSTRNT_COLUMN   0x01    /* CHECK constraint uses a changing column */\n#define CKCNSTRNT_ROWID    0x02    /* CHECK constraint references the ROWID */\n\n/* This is the Walker callback from sqlite3ExprReferencesUpdatedColumn().\n*  Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this\n** expression node references any of the\n** columns that are being modified by an UPDATE statement.\n*/\nstatic int checkConstraintExprNode(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_COLUMN ){\n    assert( pExpr->iColumn>=0 || pExpr->iColumn==-1 );\n    if( pExpr->iColumn>=0 ){\n      if( pWalker->u.aiCol[pExpr->iColumn]>=0 ){\n        pWalker->eCode |= CKCNSTRNT_COLUMN;\n      }\n    }else{\n      pWalker->eCode |= CKCNSTRNT_ROWID;\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** pExpr is a CHECK constraint on a row that is being UPDATE-ed.  The\n** only columns that are modified by the UPDATE are those for which\n** aiChng[i]>=0, and also the ROWID is modified if chngRowid is true.\n**\n** Return true if CHECK constraint pExpr uses any of the\n** changing columns (or the rowid if it is changing).  In other words,\n** return true if this CHECK constraint must be validated for\n** the new row in the UPDATE statement.\n**\n** 2018-09-15: pExpr might also be an expression for an index-on-expressions.\n** The operation of this routine is the same - return true if an only if\n** the expression uses one or more of columns identified by the second and\n** third arguments.\n*/\nSQLITE_PRIVATE int sqlite3ExprReferencesUpdatedColumn(\n  Expr *pExpr,    /* The expression to be checked */\n  int *aiChng,    /* aiChng[x]>=0 if column x changed by the UPDATE */\n  int chngRowid   /* True if UPDATE changes the rowid */\n){\n  Walker w;\n  memset(&w, 0, sizeof(w));\n  w.eCode = 0;\n  w.xExprCallback = checkConstraintExprNode;\n  w.u.aiCol = aiChng;\n  sqlite3WalkExpr(&w, pExpr);\n  if( !chngRowid ){\n    testcase( (w.eCode & CKCNSTRNT_ROWID)!=0 );\n    w.eCode &= ~CKCNSTRNT_ROWID;\n  }\n  testcase( w.eCode==0 );\n  testcase( w.eCode==CKCNSTRNT_COLUMN );\n  testcase( w.eCode==CKCNSTRNT_ROWID );\n  testcase( w.eCode==(CKCNSTRNT_ROWID|CKCNSTRNT_COLUMN) );\n  return w.eCode!=0;\n}\n\n/*\n** The sqlite3GenerateConstraintChecks() routine usually wants to visit\n** the indexes of a table in the order provided in the Table->pIndex list.\n** However, sometimes (rarely - when there is an upsert) it wants to visit\n** the indexes in a different order.  The following data structures accomplish\n** this.\n**\n** The IndexIterator object is used to walk through all of the indexes\n** of a table in either Index.pNext order, or in some other order established\n** by an array of IndexListTerm objects.\n*/\ntypedef struct IndexListTerm IndexListTerm;\ntypedef struct IndexIterator IndexIterator;\nstruct IndexIterator {\n  int eType;    /* 0 for Index.pNext list.  1 for an array of IndexListTerm */\n  int i;        /* Index of the current item from the list */\n  union {\n    struct {    /* Use this object for eType==0: A Index.pNext list */\n      Index *pIdx;   /* The current Index */\n    } lx;\n    struct {    /* Use this object for eType==1; Array of IndexListTerm */\n      int nIdx;               /* Size of the array */\n      IndexListTerm *aIdx;    /* Array of IndexListTerms */\n    } ax;\n  } u;\n};\n\n/* When IndexIterator.eType==1, then each index is an array of instances\n** of the following object\n*/\nstruct IndexListTerm {\n  Index *p;  /* The index */\n  int ix;    /* Which entry in the original Table.pIndex list is this index*/\n};\n\n/* Return the first index on the list */\nstatic Index *indexIteratorFirst(IndexIterator *pIter, int *pIx){\n  assert( pIter->i==0 );\n  if( pIter->eType ){\n    *pIx = pIter->u.ax.aIdx[0].ix;\n    return pIter->u.ax.aIdx[0].p;\n  }else{\n    *pIx = 0;\n    return pIter->u.lx.pIdx;\n  }\n}\n\n/* Return the next index from the list.  Return NULL when out of indexes */\nstatic Index *indexIteratorNext(IndexIterator *pIter, int *pIx){\n  if( pIter->eType ){\n    int i = ++pIter->i;\n    if( i>=pIter->u.ax.nIdx ){\n      *pIx = i;\n      return 0;\n    }\n    *pIx = pIter->u.ax.aIdx[i].ix;\n    return pIter->u.ax.aIdx[i].p;\n  }else{\n    ++(*pIx);\n    pIter->u.lx.pIdx = pIter->u.lx.pIdx->pNext;\n    return pIter->u.lx.pIdx;\n  }\n}\n\n/*\n** Generate code to do constraint checks prior to an INSERT or an UPDATE\n** on table pTab.\n**\n** The regNewData parameter is the first register in a range that contains\n** the data to be inserted or the data after the update.  There will be\n** pTab->nCol+1 registers in this range.  The first register (the one\n** that regNewData points to) will contain the new rowid, or NULL in the\n** case of a WITHOUT ROWID table.  The second register in the range will\n** contain the content of the first table column.  The third register will\n** contain the content of the second table column.  And so forth.\n**\n** The regOldData parameter is similar to regNewData except that it contains\n** the data prior to an UPDATE rather than afterwards.  regOldData is zero\n** for an INSERT.  This routine can distinguish between UPDATE and INSERT by\n** checking regOldData for zero.\n**\n** For an UPDATE, the pkChng boolean is true if the true primary key (the\n** rowid for a normal table or the PRIMARY KEY for a WITHOUT ROWID table)\n** might be modified by the UPDATE.  If pkChng is false, then the key of\n** the iDataCur content table is guaranteed to be unchanged by the UPDATE.\n**\n** For an INSERT, the pkChng boolean indicates whether or not the rowid\n** was explicitly specified as part of the INSERT statement.  If pkChng\n** is zero, it means that the either rowid is computed automatically or\n** that the table is a WITHOUT ROWID table and has no rowid.  On an INSERT,\n** pkChng will only be true if the INSERT statement provides an integer\n** value for either the rowid column or its INTEGER PRIMARY KEY alias.\n**\n** The code generated by this routine will store new index entries into\n** registers identified by aRegIdx[].  No index entry is created for\n** indices where aRegIdx[i]==0.  The order of indices in aRegIdx[] is\n** the same as the order of indices on the linked list of indices\n** at pTab->pIndex.\n**\n** (2019-05-07) The generated code also creates a new record for the\n** main table, if pTab is a rowid table, and stores that record in the\n** register identified by aRegIdx[nIdx] - in other words in the first\n** entry of aRegIdx[] past the last index.  It is important that the\n** record be generated during constraint checks to avoid affinity changes\n** to the register content that occur after constraint checks but before\n** the new record is inserted.\n**\n** The caller must have already opened writeable cursors on the main\n** table and all applicable indices (that is to say, all indices for which\n** aRegIdx[] is not zero).  iDataCur is the cursor for the main table when\n** inserting or updating a rowid table, or the cursor for the PRIMARY KEY\n** index when operating on a WITHOUT ROWID table.  iIdxCur is the cursor\n** for the first index in the pTab->pIndex list.  Cursors for other indices\n** are at iIdxCur+N for the N-th element of the pTab->pIndex list.\n**\n** This routine also generates code to check constraints.  NOT NULL,\n** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,\n** then the appropriate action is performed.  There are five possible\n** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.\n**\n**  Constraint type  Action       What Happens\n**  ---------------  ----------   ----------------------------------------\n**  any              ROLLBACK     The current transaction is rolled back and\n**                                sqlite3_step() returns immediately with a\n**                                return code of SQLITE_CONSTRAINT.\n**\n**  any              ABORT        Back out changes from the current command\n**                                only (do not do a complete rollback) then\n**                                cause sqlite3_step() to return immediately\n**                                with SQLITE_CONSTRAINT.\n**\n**  any              FAIL         Sqlite3_step() returns immediately with a\n**                                return code of SQLITE_CONSTRAINT.  The\n**                                transaction is not rolled back and any\n**                                changes to prior rows are retained.\n**\n**  any              IGNORE       The attempt in insert or update the current\n**                                row is skipped, without throwing an error.\n**                                Processing continues with the next row.\n**                                (There is an immediate jump to ignoreDest.)\n**\n**  NOT NULL         REPLACE      The NULL value is replace by the default\n**                                value for that column.  If the default value\n**                                is NULL, the action is the same as ABORT.\n**\n**  UNIQUE           REPLACE      The other row that conflicts with the row\n**                                being inserted is removed.\n**\n**  CHECK            REPLACE      Illegal.  The results in an exception.\n**\n** Which action to take is determined by the overrideError parameter.\n** Or if overrideError==OE_Default, then the pParse->onError parameter\n** is used.  Or if pParse->onError==OE_Default then the onError value\n** for the constraint is used.\n*/\nSQLITE_PRIVATE void sqlite3GenerateConstraintChecks(\n  Parse *pParse,       /* The parser context */\n  Table *pTab,         /* The table being inserted or updated */\n  int *aRegIdx,        /* Use register aRegIdx[i] for index i.  0 for unused */\n  int iDataCur,        /* Canonical data cursor (main table or PK index) */\n  int iIdxCur,         /* First index cursor */\n  int regNewData,      /* First register in a range holding values to insert */\n  int regOldData,      /* Previous content.  0 for INSERTs */\n  u8 pkChng,           /* Non-zero if the rowid or PRIMARY KEY changed */\n  u8 overrideError,    /* Override onError to this if not OE_Default */\n  int ignoreDest,      /* Jump to this label on an OE_Ignore resolution */\n  int *pbMayReplace,   /* OUT: Set to true if constraint may cause a replace */\n  int *aiChng,         /* column i is unchanged if aiChng[i]<0 */\n  Upsert *pUpsert      /* ON CONFLICT clauses, if any.  NULL otherwise */\n){\n  Vdbe *v;             /* VDBE under construction */\n  Index *pIdx;         /* Pointer to one of the indices */\n  Index *pPk = 0;      /* The PRIMARY KEY index for WITHOUT ROWID tables */\n  sqlite3 *db;         /* Database connection */\n  int i;               /* loop counter */\n  int ix;              /* Index loop counter */\n  int nCol;            /* Number of columns */\n  int onError;         /* Conflict resolution strategy */\n  int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */\n  int nPkField;        /* Number of fields in PRIMARY KEY. 1 for ROWID tables */\n  Upsert *pUpsertClause = 0;  /* The specific ON CONFLICT clause for pIdx */\n  u8 isUpdate;           /* True if this is an UPDATE operation */\n  u8 bAffinityDone = 0;  /* True if the OP_Affinity operation has been run */\n  int upsertIpkReturn = 0; /* Address of Goto at end of IPK uniqueness check */\n  int upsertIpkDelay = 0;  /* Address of Goto to bypass initial IPK check */\n  int ipkTop = 0;        /* Top of the IPK uniqueness check */\n  int ipkBottom = 0;     /* OP_Goto at the end of the IPK uniqueness check */\n  /* Variables associated with retesting uniqueness constraints after\n  ** replace triggers fire have run */\n  int regTrigCnt;       /* Register used to count replace trigger invocations */\n  int addrRecheck = 0;  /* Jump here to recheck all uniqueness constraints */\n  int lblRecheckOk = 0; /* Each recheck jumps to this label if it passes */\n  Trigger *pTrigger;    /* List of DELETE triggers on the table pTab */\n  int nReplaceTrig = 0; /* Number of replace triggers coded */\n  IndexIterator sIdxIter;  /* Index iterator */\n\n  isUpdate = regOldData!=0;\n  db = pParse->db;\n  v = pParse->pVdbe;\n  assert( v!=0 );\n  assert( !IsView(pTab) );  /* This table is not a VIEW */\n  nCol = pTab->nCol;\n\n  /* pPk is the PRIMARY KEY index for WITHOUT ROWID tables and NULL for\n  ** normal rowid tables.  nPkField is the number of key fields in the\n  ** pPk index or 1 for a rowid table.  In other words, nPkField is the\n  ** number of fields in the true primary key of the table. */\n  if( HasRowid(pTab) ){\n    pPk = 0;\n    nPkField = 1;\n  }else{\n    pPk = sqlite3PrimaryKeyIndex(pTab);\n    nPkField = pPk->nKeyCol;\n  }\n\n  /* Record that this module has started */\n  VdbeModuleComment((v, \"BEGIN: GenCnstCks(%d,%d,%d,%d,%d)\",\n                     iDataCur, iIdxCur, regNewData, regOldData, pkChng));\n\n  /* Test all NOT NULL constraints.\n  */\n  if( pTab->tabFlags & TF_HasNotNull ){\n    int b2ndPass = 0;         /* True if currently running 2nd pass */\n    int nSeenReplace = 0;     /* Number of ON CONFLICT REPLACE operations */\n    int nGenerated = 0;       /* Number of generated columns with NOT NULL */\n    while(1){  /* Make 2 passes over columns. Exit loop via \"break\" */\n      for(i=0; i<nCol; i++){\n        int iReg;                        /* Register holding column value */\n        Column *pCol = &pTab->aCol[i];   /* The column to check for NOT NULL */\n        int isGenerated;                 /* non-zero if column is generated */\n        onError = pCol->notNull;\n        if( onError==OE_None ) continue; /* No NOT NULL on this column */\n        if( i==pTab->iPKey ){\n          continue;        /* ROWID is never NULL */\n        }\n        isGenerated = pCol->colFlags & COLFLAG_GENERATED;\n        if( isGenerated && !b2ndPass ){\n          nGenerated++;\n          continue;        /* Generated columns processed on 2nd pass */\n        }\n        if( aiChng && aiChng[i]<0 && !isGenerated ){\n          /* Do not check NOT NULL on columns that do not change */\n          continue;\n        }\n        if( overrideError!=OE_Default ){\n          onError = overrideError;\n        }else if( onError==OE_Default ){\n          onError = OE_Abort;\n        }\n        if( onError==OE_Replace ){\n          if( b2ndPass        /* REPLACE becomes ABORT on the 2nd pass */\n           || pCol->iDflt==0  /* REPLACE is ABORT if no DEFAULT value */\n          ){\n            testcase( pCol->colFlags & COLFLAG_VIRTUAL );\n            testcase( pCol->colFlags & COLFLAG_STORED );\n            testcase( pCol->colFlags & COLFLAG_GENERATED );\n            onError = OE_Abort;\n          }else{\n            assert( !isGenerated );\n          }\n        }else if( b2ndPass && !isGenerated ){\n          continue;\n        }\n        assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail\n            || onError==OE_Ignore || onError==OE_Replace );\n        testcase( i!=sqlite3TableColumnToStorage(pTab, i) );\n        iReg = sqlite3TableColumnToStorage(pTab, i) + regNewData + 1;\n        switch( onError ){\n          case OE_Replace: {\n            int addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, iReg);\n            VdbeCoverage(v);\n            assert( (pCol->colFlags & COLFLAG_GENERATED)==0 );\n            nSeenReplace++;\n            sqlite3ExprCodeCopy(pParse,\n               sqlite3ColumnExpr(pTab, pCol), iReg);\n            sqlite3VdbeJumpHere(v, addr1);\n            break;\n          }\n          case OE_Abort:\n            sqlite3MayAbort(pParse);\n            /* no break */ deliberate_fall_through\n          case OE_Rollback:\n          case OE_Fail: {\n            char *zMsg = sqlite3MPrintf(db, \"%s.%s\", pTab->zName,\n                                        pCol->zCnName);\n            testcase( zMsg==0 && db->mallocFailed==0 );\n            sqlite3VdbeAddOp3(v, OP_HaltIfNull, SQLITE_CONSTRAINT_NOTNULL,\n                              onError, iReg);\n            sqlite3VdbeAppendP4(v, zMsg, P4_DYNAMIC);\n            sqlite3VdbeChangeP5(v, P5_ConstraintNotNull);\n            VdbeCoverage(v);\n            break;\n          }\n          default: {\n            assert( onError==OE_Ignore );\n            sqlite3VdbeAddOp2(v, OP_IsNull, iReg, ignoreDest);\n            VdbeCoverage(v);\n            break;\n          }\n        } /* end switch(onError) */\n      } /* end loop i over columns */\n      if( nGenerated==0 && nSeenReplace==0 ){\n        /* If there are no generated columns with NOT NULL constraints\n        ** and no NOT NULL ON CONFLICT REPLACE constraints, then a single\n        ** pass is sufficient */\n        break;\n      }\n      if( b2ndPass ) break;  /* Never need more than 2 passes */\n      b2ndPass = 1;\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n      if( nSeenReplace>0 && (pTab->tabFlags & TF_HasGenerated)!=0 ){\n        /* If any NOT NULL ON CONFLICT REPLACE constraints fired on the\n        ** first pass, recomputed values for all generated columns, as\n        ** those values might depend on columns affected by the REPLACE.\n        */\n        sqlite3ComputeGeneratedColumns(pParse, regNewData+1, pTab);\n      }\n#endif\n    } /* end of 2-pass loop */\n  } /* end if( has-not-null-constraints ) */\n\n  /* Test all CHECK constraints\n  */\n#ifndef SQLITE_OMIT_CHECK\n  if( pTab->pCheck && (db->flags & SQLITE_IgnoreChecks)==0 ){\n    ExprList *pCheck = pTab->pCheck;\n    pParse->iSelfTab = -(regNewData+1);\n    onError = overrideError!=OE_Default ? overrideError : OE_Abort;\n    for(i=0; i<pCheck->nExpr; i++){\n      int allOk;\n      Expr *pCopy;\n      Expr *pExpr = pCheck->a[i].pExpr;\n      if( aiChng\n       && !sqlite3ExprReferencesUpdatedColumn(pExpr, aiChng, pkChng)\n      ){\n        /* The check constraints do not reference any of the columns being\n        ** updated so there is no point it verifying the check constraint */\n        continue;\n      }\n      if( bAffinityDone==0 ){\n        sqlite3TableAffinity(v, pTab, regNewData+1);\n        bAffinityDone = 1;\n      }\n      allOk = sqlite3VdbeMakeLabel(pParse);\n      sqlite3VdbeVerifyAbortable(v, onError);\n      pCopy = sqlite3ExprDup(db, pExpr, 0);\n      if( !db->mallocFailed ){\n        sqlite3ExprIfTrue(pParse, pCopy, allOk, SQLITE_JUMPIFNULL);\n      }\n      sqlite3ExprDelete(db, pCopy);\n      if( onError==OE_Ignore ){\n        sqlite3VdbeGoto(v, ignoreDest);\n      }else{\n        char *zName = pCheck->a[i].zEName;\n        assert( zName!=0 || pParse->db->mallocFailed );\n        if( onError==OE_Replace ) onError = OE_Abort; /* IMP: R-26383-51744 */\n        sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_CHECK,\n                              onError, zName, P4_TRANSIENT,\n                              P5_ConstraintCheck);\n      }\n      sqlite3VdbeResolveLabel(v, allOk);\n    }\n    pParse->iSelfTab = 0;\n  }\n#endif /* !defined(SQLITE_OMIT_CHECK) */\n\n  /* UNIQUE and PRIMARY KEY constraints should be handled in the following\n  ** order:\n  **\n  **   (1)  OE_Update\n  **   (2)  OE_Abort, OE_Fail, OE_Rollback, OE_Ignore\n  **   (3)  OE_Replace\n  **\n  ** OE_Fail and OE_Ignore must happen before any changes are made.\n  ** OE_Update guarantees that only a single row will change, so it\n  ** must happen before OE_Replace.  Technically, OE_Abort and OE_Rollback\n  ** could happen in any order, but they are grouped up front for\n  ** convenience.\n  **\n  ** 2018-08-14: Ticket https://sqlite.org/src/info/908f001483982c43\n  ** The order of constraints used to have OE_Update as (2) and OE_Abort\n  ** and so forth as (1). But apparently PostgreSQL checks the OE_Update\n  ** constraint before any others, so it had to be moved.\n  **\n  ** Constraint checking code is generated in this order:\n  **   (A)  The rowid constraint\n  **   (B)  Unique index constraints that do not have OE_Replace as their\n  **        default conflict resolution strategy\n  **   (C)  Unique index that do use OE_Replace by default.\n  **\n  ** The ordering of (2) and (3) is accomplished by making sure the linked\n  ** list of indexes attached to a table puts all OE_Replace indexes last\n  ** in the list.  See sqlite3CreateIndex() for where that happens.\n  */\n  sIdxIter.eType = 0;\n  sIdxIter.i = 0;\n  sIdxIter.u.ax.aIdx = 0;  /* Silence harmless compiler warning */\n  sIdxIter.u.lx.pIdx = pTab->pIndex;\n  if( pUpsert ){\n    if( pUpsert->pUpsertTarget==0 ){\n      /* There is just on ON CONFLICT clause and it has no constraint-target */\n      assert( pUpsert->pNextUpsert==0 );\n      if( pUpsert->isDoUpdate==0 ){\n        /* A single ON CONFLICT DO NOTHING clause, without a constraint-target.\n        ** Make all unique constraint resolution be OE_Ignore */\n        overrideError = OE_Ignore;\n        pUpsert = 0;\n      }else{\n        /* A single ON CONFLICT DO UPDATE.  Make all resolutions OE_Update */\n        overrideError = OE_Update;\n      }\n    }else if( pTab->pIndex!=0 ){\n      /* Otherwise, we'll need to run the IndexListTerm array version of the\n      ** iterator to ensure that all of the ON CONFLICT conditions are\n      ** checked first and in order. */\n      int nIdx, jj;\n      u64 nByte;\n      Upsert *pTerm;\n      u8 *bUsed;\n      for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){\n         assert( aRegIdx[nIdx]>0 );\n      }\n      sIdxIter.eType = 1;\n      sIdxIter.u.ax.nIdx = nIdx;\n      nByte = (sizeof(IndexListTerm)+1)*nIdx + nIdx;\n      sIdxIter.u.ax.aIdx = sqlite3DbMallocZero(db, nByte);\n      if( sIdxIter.u.ax.aIdx==0 ) return; /* OOM */\n      bUsed = (u8*)&sIdxIter.u.ax.aIdx[nIdx];\n      pUpsert->pToFree = sIdxIter.u.ax.aIdx;\n      for(i=0, pTerm=pUpsert; pTerm; pTerm=pTerm->pNextUpsert){\n        if( pTerm->pUpsertTarget==0 ) break;\n        if( pTerm->pUpsertIdx==0 ) continue;  /* Skip ON CONFLICT for the IPK */\n        jj = 0;\n        pIdx = pTab->pIndex;\n        while( ALWAYS(pIdx!=0) && pIdx!=pTerm->pUpsertIdx ){\n           pIdx = pIdx->pNext;\n           jj++;\n        }\n        if( bUsed[jj] ) continue; /* Duplicate ON CONFLICT clause ignored */\n        bUsed[jj] = 1;\n        sIdxIter.u.ax.aIdx[i].p = pIdx;\n        sIdxIter.u.ax.aIdx[i].ix = jj;\n        i++;\n      }\n      for(jj=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, jj++){\n        if( bUsed[jj] ) continue;\n        sIdxIter.u.ax.aIdx[i].p = pIdx;\n        sIdxIter.u.ax.aIdx[i].ix = jj;\n        i++;\n      }\n      assert( i==nIdx );\n    }\n  }\n\n  /* Determine if it is possible that triggers (either explicitly coded\n  ** triggers or FK resolution actions) might run as a result of deletes\n  ** that happen when OE_Replace conflict resolution occurs. (Call these\n  ** \"replace triggers\".)  If any replace triggers run, we will need to\n  ** recheck all of the uniqueness constraints after they have all run.\n  ** But on the recheck, the resolution is OE_Abort instead of OE_Replace.\n  **\n  ** If replace triggers are a possibility, then\n  **\n  **   (1) Allocate register regTrigCnt and initialize it to zero.\n  **       That register will count the number of replace triggers that\n  **       fire.  Constraint recheck only occurs if the number is positive.\n  **   (2) Initialize pTrigger to the list of all DELETE triggers on pTab.\n  **   (3) Initialize addrRecheck and lblRecheckOk\n  **\n  ** The uniqueness rechecking code will create a series of tests to run\n  ** in a second pass.  The addrRecheck and lblRecheckOk variables are\n  ** used to link together these tests which are separated from each other\n  ** in the generate bytecode.\n  */\n  if( (db->flags & (SQLITE_RecTriggers|SQLITE_ForeignKeys))==0 ){\n    /* There are not DELETE triggers nor FK constraints.  No constraint\n    ** rechecks are needed. */\n    pTrigger = 0;\n    regTrigCnt = 0;\n  }else{\n    if( db->flags&SQLITE_RecTriggers ){\n      pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);\n      regTrigCnt = pTrigger!=0 || sqlite3FkRequired(pParse, pTab, 0, 0);\n    }else{\n      pTrigger = 0;\n      regTrigCnt = sqlite3FkRequired(pParse, pTab, 0, 0);\n    }\n    if( regTrigCnt ){\n      /* Replace triggers might exist.  Allocate the counter and\n      ** initialize it to zero. */\n      regTrigCnt = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, regTrigCnt);\n      VdbeComment((v, \"trigger count\"));\n      lblRecheckOk = sqlite3VdbeMakeLabel(pParse);\n      addrRecheck = lblRecheckOk;\n    }\n  }\n\n  /* If rowid is changing, make sure the new rowid does not previously\n  ** exist in the table.\n  */\n  if( pkChng && pPk==0 ){\n    int addrRowidOk = sqlite3VdbeMakeLabel(pParse);\n\n    /* Figure out what action to take in case of a rowid collision */\n    onError = pTab->keyConf;\n    if( overrideError!=OE_Default ){\n      onError = overrideError;\n    }else if( onError==OE_Default ){\n      onError = OE_Abort;\n    }\n\n    /* figure out whether or not upsert applies in this case */\n    if( pUpsert ){\n      pUpsertClause = sqlite3UpsertOfIndex(pUpsert,0);\n      if( pUpsertClause!=0 ){\n        if( pUpsertClause->isDoUpdate==0 ){\n          onError = OE_Ignore;  /* DO NOTHING is the same as INSERT OR IGNORE */\n        }else{\n          onError = OE_Update;  /* DO UPDATE */\n        }\n      }\n      if( pUpsertClause!=pUpsert ){\n        /* The first ON CONFLICT clause has a conflict target other than\n        ** the IPK.  We have to jump ahead to that first ON CONFLICT clause\n        ** and then come back here and deal with the IPK afterwards */\n        upsertIpkDelay = sqlite3VdbeAddOp0(v, OP_Goto);\n      }\n    }\n\n    /* If the response to a rowid conflict is REPLACE but the response\n    ** to some other UNIQUE constraint is FAIL or IGNORE, then we need\n    ** to defer the running of the rowid conflict checking until after\n    ** the UNIQUE constraints have run.\n    */\n    if( onError==OE_Replace      /* IPK rule is REPLACE */\n     && onError!=overrideError   /* Rules for other constraints are different */\n     && pTab->pIndex             /* There exist other constraints */\n     && !upsertIpkDelay          /* IPK check already deferred by UPSERT */\n    ){\n      ipkTop = sqlite3VdbeAddOp0(v, OP_Goto)+1;\n      VdbeComment((v, \"defer IPK REPLACE until last\"));\n    }\n\n    if( isUpdate ){\n      /* pkChng!=0 does not mean that the rowid has changed, only that\n      ** it might have changed.  Skip the conflict logic below if the rowid\n      ** is unchanged. */\n      sqlite3VdbeAddOp3(v, OP_Eq, regNewData, addrRowidOk, regOldData);\n      sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);\n      VdbeCoverage(v);\n    }\n\n    /* Check to see if the new rowid already exists in the table.  Skip\n    ** the following conflict logic if it does not. */\n    VdbeNoopComment((v, \"uniqueness check for ROWID\"));\n    sqlite3VdbeVerifyAbortable(v, onError);\n    sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, addrRowidOk, regNewData);\n    VdbeCoverage(v);\n\n    switch( onError ){\n      default: {\n        onError = OE_Abort;\n        /* no break */ deliberate_fall_through\n      }\n      case OE_Rollback:\n      case OE_Abort:\n      case OE_Fail: {\n        testcase( onError==OE_Rollback );\n        testcase( onError==OE_Abort );\n        testcase( onError==OE_Fail );\n        sqlite3RowidConstraint(pParse, onError, pTab);\n        break;\n      }\n      case OE_Replace: {\n        /* If there are DELETE triggers on this table and the\n        ** recursive-triggers flag is set, call GenerateRowDelete() to\n        ** remove the conflicting row from the table. This will fire\n        ** the triggers and remove both the table and index b-tree entries.\n        **\n        ** Otherwise, if there are no triggers or the recursive-triggers\n        ** flag is not set, but the table has one or more indexes, call\n        ** GenerateRowIndexDelete(). This removes the index b-tree entries\n        ** only. The table b-tree entry will be replaced by the new entry\n        ** when it is inserted.\n        **\n        ** If either GenerateRowDelete() or GenerateRowIndexDelete() is called,\n        ** also invoke MultiWrite() to indicate that this VDBE may require\n        ** statement rollback (if the statement is aborted after the delete\n        ** takes place). Earlier versions called sqlite3MultiWrite() regardless,\n        ** but being more selective here allows statements like:\n        **\n        **   REPLACE INTO t(rowid) VALUES($newrowid)\n        **\n        ** to run without a statement journal if there are no indexes on the\n        ** table.\n        */\n        if( regTrigCnt ){\n          sqlite3MultiWrite(pParse);\n          sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,\n                                   regNewData, 1, 0, OE_Replace, 1, -1);\n          sqlite3VdbeAddOp2(v, OP_AddImm, regTrigCnt, 1); /* incr trigger cnt */\n          nReplaceTrig++;\n        }else{\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n          assert( HasRowid(pTab) );\n          /* This OP_Delete opcode fires the pre-update-hook only. It does\n          ** not modify the b-tree. It is more efficient to let the coming\n          ** OP_Insert replace the existing entry than it is to delete the\n          ** existing entry and then insert a new one. */\n          sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, OPFLAG_ISNOOP);\n          sqlite3VdbeAppendP4(v, pTab, P4_TABLE);\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n          if( pTab->pIndex ){\n            sqlite3MultiWrite(pParse);\n            sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,-1);\n          }\n        }\n        seenReplace = 1;\n        break;\n      }\n#ifndef SQLITE_OMIT_UPSERT\n      case OE_Update: {\n        sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, 0, iDataCur);\n        /* no break */ deliberate_fall_through\n      }\n#endif\n      case OE_Ignore: {\n        testcase( onError==OE_Ignore );\n        sqlite3VdbeGoto(v, ignoreDest);\n        break;\n      }\n    }\n    sqlite3VdbeResolveLabel(v, addrRowidOk);\n    if( pUpsert && pUpsertClause!=pUpsert ){\n      upsertIpkReturn = sqlite3VdbeAddOp0(v, OP_Goto);\n    }else if( ipkTop ){\n      ipkBottom = sqlite3VdbeAddOp0(v, OP_Goto);\n      sqlite3VdbeJumpHere(v, ipkTop-1);\n    }\n  }\n\n  /* Test all UNIQUE constraints by creating entries for each UNIQUE\n  ** index and making sure that duplicate entries do not already exist.\n  ** Compute the revised record entries for indices as we go.\n  **\n  ** This loop also handles the case of the PRIMARY KEY index for a\n  ** WITHOUT ROWID table.\n  */\n  for(pIdx = indexIteratorFirst(&sIdxIter, &ix);\n      pIdx;\n      pIdx = indexIteratorNext(&sIdxIter, &ix)\n  ){\n    int regIdx;          /* Range of registers holding content for pIdx */\n    int regR;            /* Range of registers holding conflicting PK */\n    int iThisCur;        /* Cursor for this UNIQUE index */\n    int addrUniqueOk;    /* Jump here if the UNIQUE constraint is satisfied */\n    int addrConflictCk;  /* First opcode in the conflict check logic */\n\n    if( aRegIdx[ix]==0 ) continue;  /* Skip indices that do not change */\n    if( pUpsert ){\n      pUpsertClause = sqlite3UpsertOfIndex(pUpsert, pIdx);\n      if( upsertIpkDelay && pUpsertClause==pUpsert ){\n        sqlite3VdbeJumpHere(v, upsertIpkDelay);\n      }\n    }\n    addrUniqueOk = sqlite3VdbeMakeLabel(pParse);\n    if( bAffinityDone==0 ){\n      sqlite3TableAffinity(v, pTab, regNewData+1);\n      bAffinityDone = 1;\n    }\n    VdbeNoopComment((v, \"prep index %s\", pIdx->zName));\n    iThisCur = iIdxCur+ix;\n\n\n    /* Skip partial indices for which the WHERE clause is not true */\n    if( pIdx->pPartIdxWhere ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, aRegIdx[ix]);\n      pParse->iSelfTab = -(regNewData+1);\n      sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, addrUniqueOk,\n                            SQLITE_JUMPIFNULL);\n      pParse->iSelfTab = 0;\n    }\n\n    /* Create a record for this index entry as it should appear after\n    ** the insert or update.  Store that record in the aRegIdx[ix] register\n    */\n    regIdx = aRegIdx[ix]+1;\n    for(i=0; i<pIdx->nColumn; i++){\n      int iField = pIdx->aiColumn[i];\n      int x;\n      if( iField==XN_EXPR ){\n        pParse->iSelfTab = -(regNewData+1);\n        sqlite3ExprCodeCopy(pParse, pIdx->aColExpr->a[i].pExpr, regIdx+i);\n        pParse->iSelfTab = 0;\n        VdbeComment((v, \"%s column %d\", pIdx->zName, i));\n      }else if( iField==XN_ROWID || iField==pTab->iPKey ){\n        x = regNewData;\n        sqlite3VdbeAddOp2(v, OP_IntCopy, x, regIdx+i);\n        VdbeComment((v, \"rowid\"));\n      }else{\n        testcase( sqlite3TableColumnToStorage(pTab, iField)!=iField );\n        x = sqlite3TableColumnToStorage(pTab, iField) + regNewData + 1;\n        sqlite3VdbeAddOp2(v, OP_SCopy, x, regIdx+i);\n        VdbeComment((v, \"%s\", pTab->aCol[iField].zCnName));\n      }\n    }\n    sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn, aRegIdx[ix]);\n    VdbeComment((v, \"for %s\", pIdx->zName));\n#ifdef SQLITE_ENABLE_NULL_TRIM\n    if( pIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){\n      sqlite3SetMakeRecordP5(v, pIdx->pTable);\n    }\n#endif\n    sqlite3VdbeReleaseRegisters(pParse, regIdx, pIdx->nColumn, 0, 0);\n\n    /* In an UPDATE operation, if this index is the PRIMARY KEY index\n    ** of a WITHOUT ROWID table and there has been no change the\n    ** primary key, then no collision is possible.  The collision detection\n    ** logic below can all be skipped. */\n    if( isUpdate && pPk==pIdx && pkChng==0 ){\n      sqlite3VdbeResolveLabel(v, addrUniqueOk);\n      continue;\n    }\n\n    /* Find out what action to take in case there is a uniqueness conflict */\n    onError = pIdx->onError;\n    if( onError==OE_None ){\n      sqlite3VdbeResolveLabel(v, addrUniqueOk);\n      continue;  /* pIdx is not a UNIQUE index */\n    }\n    if( overrideError!=OE_Default ){\n      onError = overrideError;\n    }else if( onError==OE_Default ){\n      onError = OE_Abort;\n    }\n\n    /* Figure out if the upsert clause applies to this index */\n    if( pUpsertClause ){\n      if( pUpsertClause->isDoUpdate==0 ){\n        onError = OE_Ignore;  /* DO NOTHING is the same as INSERT OR IGNORE */\n      }else{\n        onError = OE_Update;  /* DO UPDATE */\n      }\n    }\n\n    /* Collision detection may be omitted if all of the following are true:\n    **   (1) The conflict resolution algorithm is REPLACE\n    **   (2) The table is a WITHOUT ROWID table\n    **   (3) There are no secondary indexes on the table\n    **   (4) No delete triggers need to be fired if there is a conflict\n    **   (5) No FK constraint counters need to be updated if a conflict occurs.\n    **\n    ** This is not possible for ENABLE_PREUPDATE_HOOK builds, as the row\n    ** must be explicitly deleted in order to ensure any pre-update hook\n    ** is invoked.  */\n    assert( IsOrdinaryTable(pTab) );\n#ifndef SQLITE_ENABLE_PREUPDATE_HOOK\n    if( (ix==0 && pIdx->pNext==0)                   /* Condition 3 */\n     && pPk==pIdx                                   /* Condition 2 */\n     && onError==OE_Replace                         /* Condition 1 */\n     && ( 0==(db->flags&SQLITE_RecTriggers) ||      /* Condition 4 */\n          0==sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0))\n     && ( 0==(db->flags&SQLITE_ForeignKeys) ||      /* Condition 5 */\n         (0==pTab->u.tab.pFKey && 0==sqlite3FkReferences(pTab)))\n    ){\n      sqlite3VdbeResolveLabel(v, addrUniqueOk);\n      continue;\n    }\n#endif /* ifndef SQLITE_ENABLE_PREUPDATE_HOOK */\n\n    /* Check to see if the new index entry will be unique */\n    sqlite3VdbeVerifyAbortable(v, onError);\n    addrConflictCk =\n      sqlite3VdbeAddOp4Int(v, OP_NoConflict, iThisCur, addrUniqueOk,\n                           regIdx, pIdx->nKeyCol); VdbeCoverage(v);\n\n    /* Generate code to handle collisions */\n    regR = pIdx==pPk ? regIdx : sqlite3GetTempRange(pParse, nPkField);\n    if( isUpdate || onError==OE_Replace ){\n      if( HasRowid(pTab) ){\n        sqlite3VdbeAddOp2(v, OP_IdxRowid, iThisCur, regR);\n        /* Conflict only if the rowid of the existing index entry\n        ** is different from old-rowid */\n        if( isUpdate ){\n          sqlite3VdbeAddOp3(v, OP_Eq, regR, addrUniqueOk, regOldData);\n          sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);\n          VdbeCoverage(v);\n        }\n      }else{\n        int x;\n        /* Extract the PRIMARY KEY from the end of the index entry and\n        ** store it in registers regR..regR+nPk-1 */\n        if( pIdx!=pPk ){\n          for(i=0; i<pPk->nKeyCol; i++){\n            assert( pPk->aiColumn[i]>=0 );\n            x = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[i]);\n            sqlite3VdbeAddOp3(v, OP_Column, iThisCur, x, regR+i);\n            VdbeComment((v, \"%s.%s\", pTab->zName,\n                         pTab->aCol[pPk->aiColumn[i]].zCnName));\n          }\n        }\n        if( isUpdate ){\n          /* If currently processing the PRIMARY KEY of a WITHOUT ROWID\n          ** table, only conflict if the new PRIMARY KEY values are actually\n          ** different from the old.  See TH3 withoutrowid04.test.\n          **\n          ** For a UNIQUE index, only conflict if the PRIMARY KEY values\n          ** of the matched index row are different from the original PRIMARY\n          ** KEY values of this row before the update.  */\n          int addrJump = sqlite3VdbeCurrentAddr(v)+pPk->nKeyCol;\n          int op = OP_Ne;\n          int regCmp = (IsPrimaryKeyIndex(pIdx) ? regIdx : regR);\n\n          for(i=0; i<pPk->nKeyCol; i++){\n            char *p4 = (char*)sqlite3LocateCollSeq(pParse, pPk->azColl[i]);\n            x = pPk->aiColumn[i];\n            assert( x>=0 );\n            if( i==(pPk->nKeyCol-1) ){\n              addrJump = addrUniqueOk;\n              op = OP_Eq;\n            }\n            x = sqlite3TableColumnToStorage(pTab, x);\n            sqlite3VdbeAddOp4(v, op,\n                regOldData+1+x, addrJump, regCmp+i, p4, P4_COLLSEQ\n            );\n            sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);\n            VdbeCoverageIf(v, op==OP_Eq);\n            VdbeCoverageIf(v, op==OP_Ne);\n          }\n        }\n      }\n    }\n\n    /* Generate code that executes if the new index entry is not unique */\n    assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail\n        || onError==OE_Ignore || onError==OE_Replace || onError==OE_Update );\n    switch( onError ){\n      case OE_Rollback:\n      case OE_Abort:\n      case OE_Fail: {\n        testcase( onError==OE_Rollback );\n        testcase( onError==OE_Abort );\n        testcase( onError==OE_Fail );\n        sqlite3UniqueConstraint(pParse, onError, pIdx);\n        break;\n      }\n#ifndef SQLITE_OMIT_UPSERT\n      case OE_Update: {\n        sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, pIdx, iIdxCur+ix);\n        /* no break */ deliberate_fall_through\n      }\n#endif\n      case OE_Ignore: {\n        testcase( onError==OE_Ignore );\n        sqlite3VdbeGoto(v, ignoreDest);\n        break;\n      }\n      default: {\n        int nConflictCk;   /* Number of opcodes in conflict check logic */\n\n        assert( onError==OE_Replace );\n        nConflictCk = sqlite3VdbeCurrentAddr(v) - addrConflictCk;\n        assert( nConflictCk>0 || db->mallocFailed );\n        testcase( nConflictCk<=0 );\n        testcase( nConflictCk>1 );\n        if( regTrigCnt ){\n          sqlite3MultiWrite(pParse);\n          nReplaceTrig++;\n        }\n        if( pTrigger && isUpdate ){\n          sqlite3VdbeAddOp1(v, OP_CursorLock, iDataCur);\n        }\n        sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,\n            regR, nPkField, 0, OE_Replace,\n            (pIdx==pPk ? ONEPASS_SINGLE : ONEPASS_OFF), iThisCur);\n        if( pTrigger && isUpdate ){\n          sqlite3VdbeAddOp1(v, OP_CursorUnlock, iDataCur);\n        }\n        if( regTrigCnt ){\n          int addrBypass;  /* Jump destination to bypass recheck logic */\n\n          sqlite3VdbeAddOp2(v, OP_AddImm, regTrigCnt, 1); /* incr trigger cnt */\n          addrBypass = sqlite3VdbeAddOp0(v, OP_Goto);  /* Bypass recheck */\n          VdbeComment((v, \"bypass recheck\"));\n\n          /* Here we insert code that will be invoked after all constraint\n          ** checks have run, if and only if one or more replace triggers\n          ** fired. */\n          sqlite3VdbeResolveLabel(v, lblRecheckOk);\n          lblRecheckOk = sqlite3VdbeMakeLabel(pParse);\n          if( pIdx->pPartIdxWhere ){\n            /* Bypass the recheck if this partial index is not defined\n            ** for the current row */\n            sqlite3VdbeAddOp2(v, OP_IsNull, regIdx-1, lblRecheckOk);\n            VdbeCoverage(v);\n          }\n          /* Copy the constraint check code from above, except change\n          ** the constraint-ok jump destination to be the address of\n          ** the next retest block */\n          while( nConflictCk>0 ){\n            VdbeOp x;    /* Conflict check opcode to copy */\n            /* The sqlite3VdbeAddOp4() call might reallocate the opcode array.\n            ** Hence, make a complete copy of the opcode, rather than using\n            ** a pointer to the opcode. */\n            x = *sqlite3VdbeGetOp(v, addrConflictCk);\n            if( x.opcode!=OP_IdxRowid ){\n              int p2;      /* New P2 value for copied conflict check opcode */\n              const char *zP4;\n              if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){\n                p2 = lblRecheckOk;\n              }else{\n                p2 = x.p2;\n              }\n              zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;\n              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);\n              sqlite3VdbeChangeP5(v, x.p5);\n              VdbeCoverageIf(v, p2!=x.p2);\n            }\n            nConflictCk--;\n            addrConflictCk++;\n          }\n          /* If the retest fails, issue an abort */\n          sqlite3UniqueConstraint(pParse, OE_Abort, pIdx);\n\n          sqlite3VdbeJumpHere(v, addrBypass); /* Terminate the recheck bypass */\n        }\n        seenReplace = 1;\n        break;\n      }\n    }\n    sqlite3VdbeResolveLabel(v, addrUniqueOk);\n    if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);\n    if( pUpsertClause\n     && upsertIpkReturn\n     && sqlite3UpsertNextIsIPK(pUpsertClause)\n    ){\n      sqlite3VdbeGoto(v, upsertIpkDelay+1);\n      sqlite3VdbeJumpHere(v, upsertIpkReturn);\n      upsertIpkReturn = 0;\n    }\n  }\n\n  /* If the IPK constraint is a REPLACE, run it last */\n  if( ipkTop ){\n    sqlite3VdbeGoto(v, ipkTop);\n    VdbeComment((v, \"Do IPK REPLACE\"));\n    assert( ipkBottom>0 );\n    sqlite3VdbeJumpHere(v, ipkBottom);\n  }\n\n  /* Recheck all uniqueness constraints after replace triggers have run */\n  testcase( regTrigCnt!=0 && nReplaceTrig==0 );\n  assert( regTrigCnt!=0 || nReplaceTrig==0 );\n  if( nReplaceTrig ){\n    sqlite3VdbeAddOp2(v, OP_IfNot, regTrigCnt, lblRecheckOk);VdbeCoverage(v);\n    if( !pPk ){\n      if( isUpdate ){\n        sqlite3VdbeAddOp3(v, OP_Eq, regNewData, addrRecheck, regOldData);\n        sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);\n        VdbeCoverage(v);\n      }\n      sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, addrRecheck, regNewData);\n      VdbeCoverage(v);\n      sqlite3RowidConstraint(pParse, OE_Abort, pTab);\n    }else{\n      sqlite3VdbeGoto(v, addrRecheck);\n    }\n    sqlite3VdbeResolveLabel(v, lblRecheckOk);\n  }\n\n  /* Generate the table record */\n  if( HasRowid(pTab) ){\n    int regRec = aRegIdx[ix];\n    sqlite3VdbeAddOp3(v, OP_MakeRecord, regNewData+1, pTab->nNVCol, regRec);\n    sqlite3SetMakeRecordP5(v, pTab);\n    if( !bAffinityDone ){\n      sqlite3TableAffinity(v, pTab, 0);\n    }\n  }\n\n  *pbMayReplace = seenReplace;\n  VdbeModuleComment((v, \"END: GenCnstCks(%d)\", seenReplace));\n}\n\n#ifdef SQLITE_ENABLE_NULL_TRIM\n/*\n** Change the P5 operand on the last opcode (which should be an OP_MakeRecord)\n** to be the number of columns in table pTab that must not be NULL-trimmed.\n**\n** Or if no columns of pTab may be NULL-trimmed, leave P5 at zero.\n*/\nSQLITE_PRIVATE void sqlite3SetMakeRecordP5(Vdbe *v, Table *pTab){\n  u16 i;\n\n  /* Records with omitted columns are only allowed for schema format\n  ** version 2 and later (SQLite version 3.1.4, 2005-02-20). */\n  if( pTab->pSchema->file_format<2 ) return;\n\n  for(i=pTab->nCol-1; i>0; i--){\n    if( pTab->aCol[i].iDflt!=0 ) break;\n    if( pTab->aCol[i].colFlags & COLFLAG_PRIMKEY ) break;\n  }\n  sqlite3VdbeChangeP5(v, i+1);\n}\n#endif\n\n/*\n** Table pTab is a WITHOUT ROWID table that is being written to. The cursor\n** number is iCur, and register regData contains the new record for the\n** PK index. This function adds code to invoke the pre-update hook,\n** if one is registered.\n*/\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\nstatic void codeWithoutRowidPreupdate(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Table being updated */\n  int iCur,                       /* Cursor number for table */\n  int regData                     /* Data containing new record */\n){\n  Vdbe *v = pParse->pVdbe;\n  int r = sqlite3GetTempReg(pParse);\n  assert( !HasRowid(pTab) );\n  assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) || CORRUPT_DB );\n  sqlite3VdbeAddOp2(v, OP_Integer, 0, r);\n  sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE);\n  sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);\n  sqlite3ReleaseTempReg(pParse, r);\n}\n#else\n# define codeWithoutRowidPreupdate(a,b,c,d)\n#endif\n\n/*\n** This routine generates code to finish the INSERT or UPDATE operation\n** that was started by a prior call to sqlite3GenerateConstraintChecks.\n** A consecutive range of registers starting at regNewData contains the\n** rowid and the content to be inserted.\n**\n** The arguments to this routine should be the same as the first six\n** arguments to sqlite3GenerateConstraintChecks.\n*/\nSQLITE_PRIVATE void sqlite3CompleteInsertion(\n  Parse *pParse,      /* The parser context */\n  Table *pTab,        /* the table into which we are inserting */\n  int iDataCur,       /* Cursor of the canonical data source */\n  int iIdxCur,        /* First index cursor */\n  int regNewData,     /* Range of content */\n  int *aRegIdx,       /* Register used by each index.  0 for unused indices */\n  int update_flags,   /* True for UPDATE, False for INSERT */\n  int appendBias,     /* True if this is likely to be an append */\n  int useSeekResult   /* True to set the USESEEKRESULT flag on OP_[Idx]Insert */\n){\n  Vdbe *v;            /* Prepared statements under construction */\n  Index *pIdx;        /* An index being inserted or updated */\n  u8 pik_flags;       /* flag values passed to the btree insert */\n  int i;              /* Loop counter */\n\n  assert( update_flags==0\n       || update_flags==OPFLAG_ISUPDATE\n       || update_flags==(OPFLAG_ISUPDATE|OPFLAG_SAVEPOSITION)\n  );\n\n  v = pParse->pVdbe;\n  assert( v!=0 );\n  assert( !IsView(pTab) );  /* This table is not a VIEW */\n  for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){\n    /* All REPLACE indexes are at the end of the list */\n    assert( pIdx->onError!=OE_Replace\n         || pIdx->pNext==0\n         || pIdx->pNext->onError==OE_Replace );\n    if( aRegIdx[i]==0 ) continue;\n    if( pIdx->pPartIdxWhere ){\n      sqlite3VdbeAddOp2(v, OP_IsNull, aRegIdx[i], sqlite3VdbeCurrentAddr(v)+2);\n      VdbeCoverage(v);\n    }\n    pik_flags = (useSeekResult ? OPFLAG_USESEEKRESULT : 0);\n    if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){\n      pik_flags |= OPFLAG_NCHANGE;\n      pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);\n      if( update_flags==0 ){\n        codeWithoutRowidPreupdate(pParse, pTab, iIdxCur+i, aRegIdx[i]);\n      }\n    }\n    sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iIdxCur+i, aRegIdx[i],\n                         aRegIdx[i]+1,\n                         pIdx->uniqNotNull ? pIdx->nKeyCol: pIdx->nColumn);\n    sqlite3VdbeChangeP5(v, pik_flags);\n  }\n  if( !HasRowid(pTab) ) return;\n  if( pParse->nested ){\n    pik_flags = 0;\n  }else{\n    pik_flags = OPFLAG_NCHANGE;\n    pik_flags |= (update_flags?update_flags:OPFLAG_LASTROWID);\n  }\n  if( appendBias ){\n    pik_flags |= OPFLAG_APPEND;\n  }\n  if( useSeekResult ){\n    pik_flags |= OPFLAG_USESEEKRESULT;\n  }\n  sqlite3VdbeAddOp3(v, OP_Insert, iDataCur, aRegIdx[i], regNewData);\n  if( !pParse->nested ){\n    sqlite3VdbeAppendP4(v, pTab, P4_TABLE);\n  }\n  sqlite3VdbeChangeP5(v, pik_flags);\n}\n\n/*\n** Allocate cursors for the pTab table and all its indices and generate\n** code to open and initialized those cursors.\n**\n** The cursor for the object that contains the complete data (normally\n** the table itself, but the PRIMARY KEY index in the case of a WITHOUT\n** ROWID table) is returned in *piDataCur.  The first index cursor is\n** returned in *piIdxCur.  The number of indices is returned.\n**\n** Use iBase as the first cursor (either the *piDataCur for rowid tables\n** or the first index for WITHOUT ROWID tables) if it is non-negative.\n** If iBase is negative, then allocate the next available cursor.\n**\n** For a rowid table, *piDataCur will be exactly one less than *piIdxCur.\n** For a WITHOUT ROWID table, *piDataCur will be somewhere in the range\n** of *piIdxCurs, depending on where the PRIMARY KEY index appears on the\n** pTab->pIndex list.\n**\n** If pTab is a virtual table, then this routine is a no-op and the\n** *piDataCur and *piIdxCur values are left uninitialized.\n*/\nSQLITE_PRIVATE int sqlite3OpenTableAndIndices(\n  Parse *pParse,   /* Parsing context */\n  Table *pTab,     /* Table to be opened */\n  int op,          /* OP_OpenRead or OP_OpenWrite */\n  u8 p5,           /* P5 value for OP_Open* opcodes (except on WITHOUT ROWID) */\n  int iBase,       /* Use this for the table cursor, if there is one */\n  u8 *aToOpen,     /* If not NULL: boolean for each table and index */\n  int *piDataCur,  /* Write the database source cursor number here */\n  int *piIdxCur    /* Write the first index cursor number here */\n){\n  int i;\n  int iDb;\n  int iDataCur;\n  Index *pIdx;\n  Vdbe *v;\n\n  assert( op==OP_OpenRead || op==OP_OpenWrite );\n  assert( op==OP_OpenWrite || p5==0 );\n  assert( piDataCur!=0 );\n  assert( piIdxCur!=0 );\n  if( IsVirtual(pTab) ){\n    /* This routine is a no-op for virtual tables. Leave the output\n    ** variables *piDataCur and *piIdxCur set to illegal cursor numbers\n    ** for improved error detection. */\n    *piDataCur = *piIdxCur = -999;\n    return 0;\n  }\n  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n  v = pParse->pVdbe;\n  assert( v!=0 );\n  if( iBase<0 ) iBase = pParse->nTab;\n  iDataCur = iBase++;\n  *piDataCur = iDataCur;\n  if( HasRowid(pTab) && (aToOpen==0 || aToOpen[0]) ){\n    sqlite3OpenTable(pParse, iDataCur, iDb, pTab, op);\n  }else if( pParse->db->noSharedCache==0 ){\n    sqlite3TableLock(pParse, iDb, pTab->tnum, op==OP_OpenWrite, pTab->zName);\n  }\n  *piIdxCur = iBase;\n  for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){\n    int iIdxCur = iBase++;\n    assert( pIdx->pSchema==pTab->pSchema );\n    if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){\n      *piDataCur = iIdxCur;\n      p5 = 0;\n    }\n    if( aToOpen==0 || aToOpen[i+1] ){\n      sqlite3VdbeAddOp3(v, op, iIdxCur, pIdx->tnum, iDb);\n      sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n      sqlite3VdbeChangeP5(v, p5);\n      VdbeComment((v, \"%s\", pIdx->zName));\n    }\n  }\n  if( iBase>pParse->nTab ) pParse->nTab = iBase;\n  return i;\n}\n\n\n#ifdef SQLITE_TEST\n/*\n** The following global variable is incremented whenever the\n** transfer optimization is used.  This is used for testing\n** purposes only - to make sure the transfer optimization really\n** is happening when it is supposed to.\n*/\nSQLITE_API int sqlite3_xferopt_count;\n#endif /* SQLITE_TEST */\n\n\n#ifndef SQLITE_OMIT_XFER_OPT\n/*\n** Check to see if index pSrc is compatible as a source of data\n** for index pDest in an insert transfer optimization.  The rules\n** for a compatible index:\n**\n**    *   The index is over the same set of columns\n**    *   The same DESC and ASC markings occurs on all columns\n**    *   The same onError processing (OE_Abort, OE_Ignore, etc)\n**    *   The same collating sequence on each column\n**    *   The index has the exact same WHERE clause\n*/\nstatic int xferCompatibleIndex(Index *pDest, Index *pSrc){\n  int i;\n  assert( pDest && pSrc );\n  assert( pDest->pTable!=pSrc->pTable );\n  if( pDest->nKeyCol!=pSrc->nKeyCol || pDest->nColumn!=pSrc->nColumn ){\n    return 0;   /* Different number of columns */\n  }\n  if( pDest->onError!=pSrc->onError ){\n    return 0;   /* Different conflict resolution strategies */\n  }\n  for(i=0; i<pSrc->nKeyCol; i++){\n    if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){\n      return 0;   /* Different columns indexed */\n    }\n    if( pSrc->aiColumn[i]==XN_EXPR ){\n      assert( pSrc->aColExpr!=0 && pDest->aColExpr!=0 );\n      if( sqlite3ExprCompare(0, pSrc->aColExpr->a[i].pExpr,\n                             pDest->aColExpr->a[i].pExpr, -1)!=0 ){\n        return 0;   /* Different expressions in the index */\n      }\n    }\n    if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){\n      return 0;   /* Different sort orders */\n    }\n    if( sqlite3_stricmp(pSrc->azColl[i],pDest->azColl[i])!=0 ){\n      return 0;   /* Different collating sequences */\n    }\n  }\n  if( sqlite3ExprCompare(0, pSrc->pPartIdxWhere, pDest->pPartIdxWhere, -1) ){\n    return 0;     /* Different WHERE clauses */\n  }\n\n  /* If no test above fails then the indices must be compatible */\n  return 1;\n}\n\n/*\n** Attempt the transfer optimization on INSERTs of the form\n**\n**     INSERT INTO tab1 SELECT * FROM tab2;\n**\n** The xfer optimization transfers raw records from tab2 over to tab1.\n** Columns are not decoded and reassembled, which greatly improves\n** performance.  Raw index records are transferred in the same way.\n**\n** The xfer optimization is only attempted if tab1 and tab2 are compatible.\n** There are lots of rules for determining compatibility - see comments\n** embedded in the code for details.\n**\n** This routine returns TRUE if the optimization is guaranteed to be used.\n** Sometimes the xfer optimization will only work if the destination table\n** is empty - a factor that can only be determined at run-time.  In that\n** case, this routine generates code for the xfer optimization but also\n** does a test to see if the destination table is empty and jumps over the\n** xfer optimization code if the test fails.  In that case, this routine\n** returns FALSE so that the caller will know to go ahead and generate\n** an unoptimized transfer.  This routine also returns FALSE if there\n** is no chance that the xfer optimization can be applied.\n**\n** This optimization is particularly useful at making VACUUM run faster.\n*/\nstatic int xferOptimization(\n  Parse *pParse,        /* Parser context */\n  Table *pDest,         /* The table we are inserting into */\n  Select *pSelect,      /* A SELECT statement to use as the data source */\n  int onError,          /* How to handle constraint errors */\n  int iDbDest           /* The database of pDest */\n){\n  sqlite3 *db = pParse->db;\n  ExprList *pEList;                /* The result set of the SELECT */\n  Table *pSrc;                     /* The table in the FROM clause of SELECT */\n  Index *pSrcIdx, *pDestIdx;       /* Source and destination indices */\n  SrcItem *pItem;                  /* An element of pSelect->pSrc */\n  int i;                           /* Loop counter */\n  int iDbSrc;                      /* The database of pSrc */\n  int iSrc, iDest;                 /* Cursors from source and destination */\n  int addr1, addr2;                /* Loop addresses */\n  int emptyDestTest = 0;           /* Address of test for empty pDest */\n  int emptySrcTest = 0;            /* Address of test for empty pSrc */\n  Vdbe *v;                         /* The VDBE we are building */\n  int regAutoinc;                  /* Memory register used by AUTOINC */\n  int destHasUniqueIdx = 0;        /* True if pDest has a UNIQUE index */\n  int regData, regRowid;           /* Registers holding data and rowid */\n\n  assert( pSelect!=0 );\n  if( pParse->pWith || pSelect->pWith ){\n    /* Do not attempt to process this query if there are an WITH clauses\n    ** attached to it. Proceeding may generate a false \"no such table: xxx\"\n    ** error if pSelect reads from a CTE named \"xxx\".  */\n    return 0;\n  }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pDest) ){\n    return 0;   /* tab1 must not be a virtual table */\n  }\n#endif\n  if( onError==OE_Default ){\n    if( pDest->iPKey>=0 ) onError = pDest->keyConf;\n    if( onError==OE_Default ) onError = OE_Abort;\n  }\n  assert(pSelect->pSrc);   /* allocated even if there is no FROM clause */\n  if( pSelect->pSrc->nSrc!=1 ){\n    return 0;   /* FROM clause must have exactly one term */\n  }\n  if( pSelect->pSrc->a[0].fg.isSubquery ){\n    return 0;   /* FROM clause cannot contain a subquery */\n  }\n  if( pSelect->pWhere ){\n    return 0;   /* SELECT may not have a WHERE clause */\n  }\n  if( pSelect->pOrderBy ){\n    return 0;   /* SELECT may not have an ORDER BY clause */\n  }\n  /* Do not need to test for a HAVING clause.  If HAVING is present but\n  ** there is no ORDER BY, we will get an error. */\n  if( pSelect->pGroupBy ){\n    return 0;   /* SELECT may not have a GROUP BY clause */\n  }\n  if( pSelect->pLimit ){\n    return 0;   /* SELECT may not have a LIMIT clause */\n  }\n  if( pSelect->pPrior ){\n    return 0;   /* SELECT may not be a compound query */\n  }\n  if( pSelect->selFlags & SF_Distinct ){\n    return 0;   /* SELECT may not be DISTINCT */\n  }\n  pEList = pSelect->pEList;\n  assert( pEList!=0 );\n  if( pEList->nExpr!=1 ){\n    return 0;   /* The result set must have exactly one column */\n  }\n  assert( pEList->a[0].pExpr );\n  if( pEList->a[0].pExpr->op!=TK_ASTERISK ){\n    return 0;   /* The result set must be the special operator \"*\" */\n  }\n\n  /* At this point we have established that the statement is of the\n  ** correct syntactic form to participate in this optimization.  Now\n  ** we have to check the semantics.\n  */\n  pItem = pSelect->pSrc->a;\n  pSrc = sqlite3LocateTableItem(pParse, 0, pItem);\n  if( pSrc==0 ){\n    return 0;   /* FROM clause does not contain a real table */\n  }\n  if( pSrc->tnum==pDest->tnum && pSrc->pSchema==pDest->pSchema ){\n    testcase( pSrc!=pDest ); /* Possible due to bad sqlite_schema.rootpage */\n    return 0;   /* tab1 and tab2 may not be the same table */\n  }\n  if( HasRowid(pDest)!=HasRowid(pSrc) ){\n    return 0;   /* source and destination must both be WITHOUT ROWID or not */\n  }\n  if( !IsOrdinaryTable(pSrc) ){\n    return 0;   /* tab2 may not be a view or virtual table */\n  }\n  if( pDest->nCol!=pSrc->nCol ){\n    return 0;   /* Number of columns must be the same in tab1 and tab2 */\n  }\n  if( pDest->iPKey!=pSrc->iPKey ){\n    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */\n  }\n  if( (pDest->tabFlags & TF_Strict)!=0 && (pSrc->tabFlags & TF_Strict)==0 ){\n    return 0;   /* Cannot feed from a non-strict into a strict table */\n  }\n  for(i=0; i<pDest->nCol; i++){\n    Column *pDestCol = &pDest->aCol[i];\n    Column *pSrcCol = &pSrc->aCol[i];\n#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS\n    if( (db->mDbFlags & DBFLAG_Vacuum)==0\n     && (pDestCol->colFlags | pSrcCol->colFlags) & COLFLAG_HIDDEN\n    ){\n      return 0;    /* Neither table may have __hidden__ columns */\n    }\n#endif\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n    /* Even if tables t1 and t2 have identical schemas, if they contain\n    ** generated columns, then this statement is semantically incorrect:\n    **\n    **     INSERT INTO t2 SELECT * FROM t1;\n    **\n    ** The reason is that generated column values are returned by the\n    ** the SELECT statement on the right but the INSERT statement on the\n    ** left wants them to be omitted.\n    **\n    ** Nevertheless, this is a useful notational shorthand to tell SQLite\n    ** to do a bulk transfer all of the content from t1 over to t2.\n    **\n    ** We could, in theory, disable this (except for internal use by the\n    ** VACUUM command where it is actually needed).  But why do that?  It\n    ** seems harmless enough, and provides a useful service.\n    */\n    if( (pDestCol->colFlags & COLFLAG_GENERATED) !=\n        (pSrcCol->colFlags & COLFLAG_GENERATED) ){\n      return 0;    /* Both columns have the same generated-column type */\n    }\n    /* But the transfer is only allowed if both the source and destination\n    ** tables have the exact same expressions for generated columns.\n    ** This requirement could be relaxed for VIRTUAL columns, I suppose.\n    */\n    if( (pDestCol->colFlags & COLFLAG_GENERATED)!=0 ){\n      if( sqlite3ExprCompare(0,\n             sqlite3ColumnExpr(pSrc, pSrcCol),\n             sqlite3ColumnExpr(pDest, pDestCol), -1)!=0 ){\n        testcase( pDestCol->colFlags & COLFLAG_VIRTUAL );\n        testcase( pDestCol->colFlags & COLFLAG_STORED );\n        return 0;  /* Different generator expressions */\n      }\n    }\n#endif\n    if( pDestCol->affinity!=pSrcCol->affinity ){\n      return 0;    /* Affinity must be the same on all columns */\n    }\n    if( sqlite3_stricmp(sqlite3ColumnColl(pDestCol),\n                        sqlite3ColumnColl(pSrcCol))!=0 ){\n      return 0;    /* Collating sequence must be the same on all columns */\n    }\n    if( pDestCol->notNull && !pSrcCol->notNull ){\n      return 0;    /* tab2 must be NOT NULL if tab1 is */\n    }\n    /* Default values for second and subsequent columns need to match. */\n    if( (pDestCol->colFlags & COLFLAG_GENERATED)==0 && i>0 ){\n      Expr *pDestExpr = sqlite3ColumnExpr(pDest, pDestCol);\n      Expr *pSrcExpr = sqlite3ColumnExpr(pSrc, pSrcCol);\n      assert( pDestExpr==0 || pDestExpr->op==TK_SPAN );\n      assert( pDestExpr==0 || !ExprHasProperty(pDestExpr, EP_IntValue) );\n      assert( pSrcExpr==0 || pSrcExpr->op==TK_SPAN );\n      assert( pSrcExpr==0 || !ExprHasProperty(pSrcExpr, EP_IntValue) );\n      if( (pDestExpr==0)!=(pSrcExpr==0)\n       || (pDestExpr!=0 && strcmp(pDestExpr->u.zToken,\n                                       pSrcExpr->u.zToken)!=0)\n      ){\n        return 0;    /* Default values must be the same for all columns */\n      }\n    }\n  }\n  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){\n    if( IsUniqueIndex(pDestIdx) ){\n      destHasUniqueIdx = 1;\n    }\n    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){\n      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;\n    }\n    if( pSrcIdx==0 ){\n      return 0;    /* pDestIdx has no corresponding index in pSrc */\n    }\n    if( pSrcIdx->tnum==pDestIdx->tnum && pSrc->pSchema==pDest->pSchema\n         && sqlite3FaultSim(411)==SQLITE_OK ){\n      /* The sqlite3FaultSim() call allows this corruption test to be\n      ** bypassed during testing, in order to exercise other corruption tests\n      ** further downstream. */\n      return 0;   /* Corrupt schema - two indexes on the same btree */\n    }\n  }\n#ifndef SQLITE_OMIT_CHECK\n  if( pDest->pCheck\n   && (db->mDbFlags & DBFLAG_Vacuum)==0\n   && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1)\n  ){\n    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */\n  }\n#endif\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n  /* Disallow the transfer optimization if the destination table contains\n  ** any foreign key constraints.  This is more restrictive than necessary.\n  ** But the main beneficiary of the transfer optimization is the VACUUM\n  ** command, and the VACUUM command disables foreign key constraints.  So\n  ** the extra complication to make this rule less restrictive is probably\n  ** not worth the effort.  Ticket [6284df89debdfa61db8073e062908af0c9b6118e]\n  */\n  assert( IsOrdinaryTable(pDest) );\n  if( (db->flags & SQLITE_ForeignKeys)!=0 && pDest->u.tab.pFKey!=0 ){\n    return 0;\n  }\n#endif\n  if( (db->flags & SQLITE_CountRows)!=0 ){\n    return 0;  /* xfer opt does not play well with PRAGMA count_changes */\n  }\n\n  /* If we get this far, it means that the xfer optimization is at\n  ** least a possibility, though it might only work if the destination\n  ** table (tab1) is initially empty.\n  */\n#ifdef SQLITE_TEST\n  sqlite3_xferopt_count++;\n#endif\n  iDbSrc = sqlite3SchemaToIndex(db, pSrc->pSchema);\n  v = sqlite3GetVdbe(pParse);\n  sqlite3CodeVerifySchema(pParse, iDbSrc);\n  iSrc = pParse->nTab++;\n  iDest = pParse->nTab++;\n  regAutoinc = autoIncBegin(pParse, iDbDest, pDest);\n  regData = sqlite3GetTempReg(pParse);\n  sqlite3VdbeAddOp2(v, OP_Null, 0, regData);\n  regRowid = sqlite3GetTempReg(pParse);\n  sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);\n  assert( HasRowid(pDest) || destHasUniqueIdx );\n  if( (db->mDbFlags & DBFLAG_Vacuum)==0 && (\n      (pDest->iPKey<0 && pDest->pIndex!=0)          /* (1) */\n   || destHasUniqueIdx                              /* (2) */\n   || (onError!=OE_Abort && onError!=OE_Rollback)   /* (3) */\n  )){\n    /* In some circumstances, we are able to run the xfer optimization\n    ** only if the destination table is initially empty. Unless the\n    ** DBFLAG_Vacuum flag is set, this block generates code to make\n    ** that determination. If DBFLAG_Vacuum is set, then the destination\n    ** table is always empty.\n    **\n    ** Conditions under which the destination must be empty:\n    **\n    ** (1) There is no INTEGER PRIMARY KEY but there are indices.\n    **     (If the destination is not initially empty, the rowid fields\n    **     of index entries might need to change.)\n    **\n    ** (2) The destination has a unique index.  (The xfer optimization\n    **     is unable to test uniqueness.)\n    **\n    ** (3) onError is something other than OE_Abort and OE_Rollback.\n    */\n    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0); VdbeCoverage(v);\n    emptyDestTest = sqlite3VdbeAddOp0(v, OP_Goto);\n    sqlite3VdbeJumpHere(v, addr1);\n  }\n  if( HasRowid(pSrc) ){\n    u8 insFlags;\n    sqlite3OpenTable(pParse, iSrc, iDbSrc, pSrc, OP_OpenRead);\n    emptySrcTest = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0); VdbeCoverage(v);\n    if( pDest->iPKey>=0 ){\n      addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);\n      if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){\n        sqlite3VdbeVerifyAbortable(v, onError);\n        addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);\n        VdbeCoverage(v);\n        sqlite3RowidConstraint(pParse, onError, pDest);\n        sqlite3VdbeJumpHere(v, addr2);\n      }\n      autoIncStep(pParse, regAutoinc, regRowid);\n    }else if( pDest->pIndex==0 && !(db->mDbFlags & DBFLAG_VacuumInto) ){\n      addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);\n    }else{\n      addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);\n      assert( (pDest->tabFlags & TF_Autoincrement)==0 );\n    }\n\n    if( db->mDbFlags & DBFLAG_Vacuum ){\n      sqlite3VdbeAddOp1(v, OP_SeekEnd, iDest);\n      insFlags = OPFLAG_APPEND|OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;\n    }else{\n      insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND|OPFLAG_PREFORMAT;\n    }\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n    if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){\n      sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);\n      insFlags &= ~OPFLAG_PREFORMAT;\n    }else\n#endif\n    {\n      sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regRowid);\n    }\n    sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);\n    if( (db->mDbFlags & DBFLAG_Vacuum)==0 ){\n      sqlite3VdbeChangeP4(v, -1, (char*)pDest, P4_TABLE);\n    }\n    sqlite3VdbeChangeP5(v, insFlags);\n\n    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v);\n    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);\n    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);\n  }else{\n    sqlite3TableLock(pParse, iDbDest, pDest->tnum, 1, pDest->zName);\n    sqlite3TableLock(pParse, iDbSrc, pSrc->tnum, 0, pSrc->zName);\n  }\n  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){\n    u8 idxInsFlags = 0;\n    for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){\n      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;\n    }\n    assert( pSrcIdx );\n    sqlite3VdbeAddOp3(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc);\n    sqlite3VdbeSetP4KeyInfo(pParse, pSrcIdx);\n    VdbeComment((v, \"%s\", pSrcIdx->zName));\n    sqlite3VdbeAddOp3(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest);\n    sqlite3VdbeSetP4KeyInfo(pParse, pDestIdx);\n    sqlite3VdbeChangeP5(v, OPFLAG_BULKCSR);\n    VdbeComment((v, \"%s\", pDestIdx->zName));\n    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0); VdbeCoverage(v);\n    if( db->mDbFlags & DBFLAG_Vacuum ){\n      /* This INSERT command is part of a VACUUM operation, which guarantees\n      ** that the destination table is empty. If all indexed columns use\n      ** collation sequence BINARY, then it can also be assumed that the\n      ** index will be populated by inserting keys in strictly sorted\n      ** order. In this case, instead of seeking within the b-tree as part\n      ** of every OP_IdxInsert opcode, an OP_SeekEnd is added before the\n      ** OP_IdxInsert to seek to the point within the b-tree where each key\n      ** should be inserted. This is faster.\n      **\n      ** If any of the indexed columns use a collation sequence other than\n      ** BINARY, this optimization is disabled. This is because the user\n      ** might change the definition of a collation sequence and then run\n      ** a VACUUM command. In that case keys may not be written in strictly\n      ** sorted order.  */\n      for(i=0; i<pSrcIdx->nColumn; i++){\n        const char *zColl = pSrcIdx->azColl[i];\n        if( sqlite3_stricmp(sqlite3StrBINARY, zColl) ) break;\n      }\n      if( i==pSrcIdx->nColumn ){\n        idxInsFlags = OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;\n        sqlite3VdbeAddOp1(v, OP_SeekEnd, iDest);\n        sqlite3VdbeAddOp2(v, OP_RowCell, iDest, iSrc);\n      }\n    }else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){\n      idxInsFlags |= OPFLAG_NCHANGE;\n    }\n    if( idxInsFlags!=(OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT) ){\n      sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);\n      if( (db->mDbFlags & DBFLAG_Vacuum)==0\n       && !HasRowid(pDest)\n       && IsPrimaryKeyIndex(pDestIdx)\n      ){\n        codeWithoutRowidPreupdate(pParse, pDest, iDest, regData);\n      }\n    }\n    sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);\n    sqlite3VdbeChangeP5(v, idxInsFlags|OPFLAG_APPEND);\n    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addr1);\n    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);\n    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);\n  }\n  if( emptySrcTest ) sqlite3VdbeJumpHere(v, emptySrcTest);\n  sqlite3ReleaseTempReg(pParse, regRowid);\n  sqlite3ReleaseTempReg(pParse, regData);\n  if( emptyDestTest ){\n    sqlite3AutoincrementEnd(pParse);\n    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, 0);\n    sqlite3VdbeJumpHere(v, emptyDestTest);\n    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);\n    return 0;\n  }else{\n    return 1;\n  }\n}\n#endif /* SQLITE_OMIT_XFER_OPT */\n\n/************** End of insert.c **********************************************/\n/************** Begin file legacy.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Main file for the SQLite library.  The routines in this file\n** implement the programmer interface to the library.  Routines in\n** other files are for internal use by SQLite and should not be\n** accessed by users of the library.\n*/\n\n/* #include \"sqliteInt.h\" */\n\n/*\n** Execute SQL code.  Return one of the SQLITE_ success/failure\n** codes.  Also write an error message into memory obtained from\n** malloc() and make *pzErrMsg point to that message.\n**\n** If the SQL is a query, then for each row in the query result\n** the xCallback() function is called.  pArg becomes the first\n** argument to xCallback().  If xCallback=NULL then no callback\n** is invoked, even for queries.\n*/\nSQLITE_API int sqlite3_exec(\n  sqlite3 *db,                /* The database on which the SQL executes */\n  const char *zSql,           /* The SQL to be executed */\n  sqlite3_callback xCallback, /* Invoke this callback routine */\n  void *pArg,                 /* First argument to xCallback() */\n  char **pzErrMsg             /* Write error messages here */\n){\n  int rc = SQLITE_OK;         /* Return code */\n  const char *zLeftover;      /* Tail of unprocessed SQL */\n  sqlite3_stmt *pStmt = 0;    /* The current SQL statement */\n  char **azCols = 0;          /* Names of result columns */\n  int callbackIsInit;         /* True if callback data is initialized */\n\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n  if( zSql==0 ) zSql = \"\";\n\n  sqlite3_mutex_enter(db->mutex);\n  sqlite3Error(db, SQLITE_OK);\n  while( rc==SQLITE_OK && zSql[0] ){\n    int nCol = 0;\n    char **azVals = 0;\n\n    pStmt = 0;\n    rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);\n    assert( rc==SQLITE_OK || pStmt==0 );\n    if( rc!=SQLITE_OK ){\n      continue;\n    }\n    if( !pStmt ){\n      /* this happens for a comment or white-space */\n      zSql = zLeftover;\n      continue;\n    }\n    callbackIsInit = 0;\n\n    while( 1 ){\n      int i;\n      rc = sqlite3_step(pStmt);\n\n      /* Invoke the callback function if required */\n      if( xCallback && (SQLITE_ROW==rc ||\n          (SQLITE_DONE==rc && !callbackIsInit\n                           && db->flags&SQLITE_NullCallback)) ){\n        if( !callbackIsInit ){\n          nCol = sqlite3_column_count(pStmt);\n          azCols = sqlite3DbMallocRaw(db, (2*nCol+1)*sizeof(const char*));\n          if( azCols==0 ){\n            goto exec_out;\n          }\n          for(i=0; i<nCol; i++){\n            azCols[i] = (char *)sqlite3_column_name(pStmt, i);\n            /* sqlite3VdbeSetColName() installs column names as UTF8\n            ** strings so there is no way for sqlite3_column_name() to fail. */\n            assert( azCols[i]!=0 );\n          }\n          callbackIsInit = 1;\n        }\n        if( rc==SQLITE_ROW ){\n          azVals = &azCols[nCol];\n          for(i=0; i<nCol; i++){\n            azVals[i] = (char *)sqlite3_column_text(pStmt, i);\n            if( !azVals[i] && sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){\n              sqlite3OomFault(db);\n              goto exec_out;\n            }\n          }\n          azVals[i] = 0;\n        }\n        if( xCallback(pArg, nCol, azVals, azCols) ){\n          /* EVIDENCE-OF: R-38229-40159 If the callback function to\n          ** sqlite3_exec() returns non-zero, then sqlite3_exec() will\n          ** return SQLITE_ABORT. */\n          rc = SQLITE_ABORT;\n          sqlite3VdbeFinalize((Vdbe *)pStmt);\n          pStmt = 0;\n          sqlite3Error(db, SQLITE_ABORT);\n          goto exec_out;\n        }\n      }\n\n      if( rc!=SQLITE_ROW ){\n        rc = sqlite3VdbeFinalize((Vdbe *)pStmt);\n        pStmt = 0;\n        zSql = zLeftover;\n        while( sqlite3Isspace(zSql[0]) ) zSql++;\n        break;\n      }\n    }\n\n    sqlite3DbFree(db, azCols);\n    azCols = 0;\n  }\n\nexec_out:\n  if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);\n  sqlite3DbFree(db, azCols);\n\n  rc = sqlite3ApiExit(db, rc);\n  if( rc!=SQLITE_OK && pzErrMsg ){\n    *pzErrMsg = sqlite3DbStrDup(0, sqlite3_errmsg(db));\n    if( *pzErrMsg==0 ){\n      rc = SQLITE_NOMEM_BKPT;\n      sqlite3Error(db, SQLITE_NOMEM);\n    }\n  }else if( pzErrMsg ){\n    *pzErrMsg = 0;\n  }\n\n  assert( (rc&db->errMask)==rc );\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/************** End of legacy.c **********************************************/\n/************** Begin file loadext.c *****************************************/\n/*\n** 2006 June 7\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to dynamically load extensions into\n** the SQLite library.\n*/\n\n#ifndef SQLITE_CORE\n  #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */\n#endif\n/************** Include sqlite3ext.h in the middle of loadext.c **************/\n/************** Begin file sqlite3ext.h **************************************/\n/*\n** 2006 June 7\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the SQLite interface for use by\n** shared libraries that want to be imported as extensions into\n** an SQLite instance.  Shared libraries that intend to be loaded\n** as extensions by SQLite should #include this file instead of\n** sqlite3.h.\n*/\n#ifndef SQLITE3EXT_H\n#define SQLITE3EXT_H\n/* #include \"sqlite3.h\" */\n\n/*\n** The following structure holds pointers to all of the SQLite API\n** routines.\n**\n** WARNING:  In order to maintain backwards compatibility, add new\n** interfaces to the end of this structure only.  If you insert new\n** interfaces in the middle of this structure, then older different\n** versions of SQLite will not be able to load each other's shared\n** libraries!\n*/\nstruct sqlite3_api_routines {\n  void * (*aggregate_context)(sqlite3_context*,int nBytes);\n  int  (*aggregate_count)(sqlite3_context*);\n  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));\n  int  (*bind_double)(sqlite3_stmt*,int,double);\n  int  (*bind_int)(sqlite3_stmt*,int,int);\n  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);\n  int  (*bind_null)(sqlite3_stmt*,int);\n  int  (*bind_parameter_count)(sqlite3_stmt*);\n  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);\n  const char * (*bind_parameter_name)(sqlite3_stmt*,int);\n  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));\n  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));\n  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);\n  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);\n  int  (*busy_timeout)(sqlite3*,int ms);\n  int  (*changes)(sqlite3*);\n  int  (*close)(sqlite3*);\n  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,\n                           int eTextRep,const char*));\n  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,\n                             int eTextRep,const void*));\n  const void * (*column_blob)(sqlite3_stmt*,int iCol);\n  int  (*column_bytes)(sqlite3_stmt*,int iCol);\n  int  (*column_bytes16)(sqlite3_stmt*,int iCol);\n  int  (*column_count)(sqlite3_stmt*pStmt);\n  const char * (*column_database_name)(sqlite3_stmt*,int);\n  const void * (*column_database_name16)(sqlite3_stmt*,int);\n  const char * (*column_decltype)(sqlite3_stmt*,int i);\n  const void * (*column_decltype16)(sqlite3_stmt*,int);\n  double  (*column_double)(sqlite3_stmt*,int iCol);\n  int  (*column_int)(sqlite3_stmt*,int iCol);\n  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);\n  const char * (*column_name)(sqlite3_stmt*,int);\n  const void * (*column_name16)(sqlite3_stmt*,int);\n  const char * (*column_origin_name)(sqlite3_stmt*,int);\n  const void * (*column_origin_name16)(sqlite3_stmt*,int);\n  const char * (*column_table_name)(sqlite3_stmt*,int);\n  const void * (*column_table_name16)(sqlite3_stmt*,int);\n  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);\n  const void * (*column_text16)(sqlite3_stmt*,int iCol);\n  int  (*column_type)(sqlite3_stmt*,int iCol);\n  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);\n  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);\n  int  (*complete)(const char*sql);\n  int  (*complete16)(const void*sql);\n  int  (*create_collation)(sqlite3*,const char*,int,void*,\n                           int(*)(void*,int,const void*,int,const void*));\n  int  (*create_collation16)(sqlite3*,const void*,int,void*,\n                             int(*)(void*,int,const void*,int,const void*));\n  int  (*create_function)(sqlite3*,const char*,int,int,void*,\n                          void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                          void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                          void (*xFinal)(sqlite3_context*));\n  int  (*create_function16)(sqlite3*,const void*,int,int,void*,\n                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*));\n  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);\n  int  (*data_count)(sqlite3_stmt*pStmt);\n  sqlite3 * (*db_handle)(sqlite3_stmt*);\n  int (*declare_vtab)(sqlite3*,const char*);\n  int  (*enable_shared_cache)(int);\n  int  (*errcode)(sqlite3*db);\n  const char * (*errmsg)(sqlite3*);\n  const void * (*errmsg16)(sqlite3*);\n  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);\n  int  (*expired)(sqlite3_stmt*);\n  int  (*finalize)(sqlite3_stmt*pStmt);\n  void  (*free)(void*);\n  void  (*free_table)(char**result);\n  int  (*get_autocommit)(sqlite3*);\n  void * (*get_auxdata)(sqlite3_context*,int);\n  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);\n  int  (*global_recover)(void);\n  void  (*interruptx)(sqlite3*);\n  sqlite_int64  (*last_insert_rowid)(sqlite3*);\n  const char * (*libversion)(void);\n  int  (*libversion_number)(void);\n  void *(*malloc)(int);\n  char * (*mprintf)(const char*,...);\n  int  (*open)(const char*,sqlite3**);\n  int  (*open16)(const void*,sqlite3**);\n  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);\n  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);\n  void *(*realloc)(void*,int);\n  int  (*reset)(sqlite3_stmt*pStmt);\n  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_double)(sqlite3_context*,double);\n  void  (*result_error)(sqlite3_context*,const char*,int);\n  void  (*result_error16)(sqlite3_context*,const void*,int);\n  void  (*result_int)(sqlite3_context*,int);\n  void  (*result_int64)(sqlite3_context*,sqlite_int64);\n  void  (*result_null)(sqlite3_context*);\n  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));\n  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_value)(sqlite3_context*,sqlite3_value*);\n  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);\n  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,\n                         const char*,const char*),void*);\n  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));\n  char * (*xsnprintf)(int,char*,const char*,...);\n  int  (*step)(sqlite3_stmt*);\n  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,\n                                char const**,char const**,int*,int*,int*);\n  void  (*thread_cleanup)(void);\n  int  (*total_changes)(sqlite3*);\n  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);\n  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);\n  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,\n                                         sqlite_int64),void*);\n  void * (*user_data)(sqlite3_context*);\n  const void * (*value_blob)(sqlite3_value*);\n  int  (*value_bytes)(sqlite3_value*);\n  int  (*value_bytes16)(sqlite3_value*);\n  double  (*value_double)(sqlite3_value*);\n  int  (*value_int)(sqlite3_value*);\n  sqlite_int64  (*value_int64)(sqlite3_value*);\n  int  (*value_numeric_type)(sqlite3_value*);\n  const unsigned char * (*value_text)(sqlite3_value*);\n  const void * (*value_text16)(sqlite3_value*);\n  const void * (*value_text16be)(sqlite3_value*);\n  const void * (*value_text16le)(sqlite3_value*);\n  int  (*value_type)(sqlite3_value*);\n  char *(*vmprintf)(const char*,va_list);\n  /* Added ??? */\n  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);\n  /* Added by 3.3.13 */\n  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n  int (*clear_bindings)(sqlite3_stmt*);\n  /* Added by 3.4.1 */\n  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,\n                          void (*xDestroy)(void *));\n  /* Added by 3.5.0 */\n  int (*bind_zeroblob)(sqlite3_stmt*,int,int);\n  int (*blob_bytes)(sqlite3_blob*);\n  int (*blob_close)(sqlite3_blob*);\n  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,\n                   int,sqlite3_blob**);\n  int (*blob_read)(sqlite3_blob*,void*,int,int);\n  int (*blob_write)(sqlite3_blob*,const void*,int,int);\n  int (*create_collation_v2)(sqlite3*,const char*,int,void*,\n                             int(*)(void*,int,const void*,int,const void*),\n                             void(*)(void*));\n  int (*file_control)(sqlite3*,const char*,int,void*);\n  sqlite3_int64 (*memory_highwater)(int);\n  sqlite3_int64 (*memory_used)(void);\n  sqlite3_mutex *(*mutex_alloc)(int);\n  void (*mutex_enter)(sqlite3_mutex*);\n  void (*mutex_free)(sqlite3_mutex*);\n  void (*mutex_leave)(sqlite3_mutex*);\n  int (*mutex_try)(sqlite3_mutex*);\n  int (*open_v2)(const char*,sqlite3**,int,const char*);\n  int (*release_memory)(int);\n  void (*result_error_nomem)(sqlite3_context*);\n  void (*result_error_toobig)(sqlite3_context*);\n  int (*sleep)(int);\n  void (*soft_heap_limit)(int);\n  sqlite3_vfs *(*vfs_find)(const char*);\n  int (*vfs_register)(sqlite3_vfs*,int);\n  int (*vfs_unregister)(sqlite3_vfs*);\n  int (*xthreadsafe)(void);\n  void (*result_zeroblob)(sqlite3_context*,int);\n  void (*result_error_code)(sqlite3_context*,int);\n  int (*test_control)(int, ...);\n  void (*randomness)(int,void*);\n  sqlite3 *(*context_db_handle)(sqlite3_context*);\n  int (*extended_result_codes)(sqlite3*,int);\n  int (*limit)(sqlite3*,int,int);\n  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);\n  const char *(*sql)(sqlite3_stmt*);\n  int (*status)(int,int*,int*,int);\n  int (*backup_finish)(sqlite3_backup*);\n  sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);\n  int (*backup_pagecount)(sqlite3_backup*);\n  int (*backup_remaining)(sqlite3_backup*);\n  int (*backup_step)(sqlite3_backup*,int);\n  const char *(*compileoption_get)(int);\n  int (*compileoption_used)(const char*);\n  int (*create_function_v2)(sqlite3*,const char*,int,int,void*,\n                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*),\n                            void(*xDestroy)(void*));\n  int (*db_config)(sqlite3*,int,...);\n  sqlite3_mutex *(*db_mutex)(sqlite3*);\n  int (*db_status)(sqlite3*,int,int*,int*,int);\n  int (*extended_errcode)(sqlite3*);\n  void (*log)(int,const char*,...);\n  sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);\n  const char *(*sourceid)(void);\n  int (*stmt_status)(sqlite3_stmt*,int,int);\n  int (*strnicmp)(const char*,const char*,int);\n  int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);\n  int (*wal_autocheckpoint)(sqlite3*,int);\n  int (*wal_checkpoint)(sqlite3*,const char*);\n  void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);\n  int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);\n  int (*vtab_config)(sqlite3*,int op,...);\n  int (*vtab_on_conflict)(sqlite3*);\n  /* Version 3.7.16 and later */\n  int (*close_v2)(sqlite3*);\n  const char *(*db_filename)(sqlite3*,const char*);\n  int (*db_readonly)(sqlite3*,const char*);\n  int (*db_release_memory)(sqlite3*);\n  const char *(*errstr)(int);\n  int (*stmt_busy)(sqlite3_stmt*);\n  int (*stmt_readonly)(sqlite3_stmt*);\n  int (*stricmp)(const char*,const char*);\n  int (*uri_boolean)(const char*,const char*,int);\n  sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);\n  const char *(*uri_parameter)(const char*,const char*);\n  char *(*xvsnprintf)(int,char*,const char*,va_list);\n  int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);\n  /* Version 3.8.7 and later */\n  int (*auto_extension)(void(*)(void));\n  int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,\n                     void(*)(void*));\n  int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,\n                      void(*)(void*),unsigned char);\n  int (*cancel_auto_extension)(void(*)(void));\n  int (*load_extension)(sqlite3*,const char*,const char*,char**);\n  void *(*malloc64)(sqlite3_uint64);\n  sqlite3_uint64 (*msize)(void*);\n  void *(*realloc64)(void*,sqlite3_uint64);\n  void (*reset_auto_extension)(void);\n  void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,\n                        void(*)(void*));\n  void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,\n                         void(*)(void*), unsigned char);\n  int (*strglob)(const char*,const char*);\n  /* Version 3.8.11 and later */\n  sqlite3_value *(*value_dup)(const sqlite3_value*);\n  void (*value_free)(sqlite3_value*);\n  int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);\n  int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);\n  /* Version 3.9.0 and later */\n  unsigned int (*value_subtype)(sqlite3_value*);\n  void (*result_subtype)(sqlite3_context*,unsigned int);\n  /* Version 3.10.0 and later */\n  int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);\n  int (*strlike)(const char*,const char*,unsigned int);\n  int (*db_cacheflush)(sqlite3*);\n  /* Version 3.12.0 and later */\n  int (*system_errno)(sqlite3*);\n  /* Version 3.14.0 and later */\n  int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);\n  char *(*expanded_sql)(sqlite3_stmt*);\n  /* Version 3.18.0 and later */\n  void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);\n  /* Version 3.20.0 and later */\n  int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,\n                    sqlite3_stmt**,const char**);\n  int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,\n                      sqlite3_stmt**,const void**);\n  int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));\n  void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));\n  void *(*value_pointer)(sqlite3_value*,const char*);\n  int (*vtab_nochange)(sqlite3_context*);\n  int (*value_nochange)(sqlite3_value*);\n  const char *(*vtab_collation)(sqlite3_index_info*,int);\n  /* Version 3.24.0 and later */\n  int (*keyword_count)(void);\n  int (*keyword_name)(int,const char**,int*);\n  int (*keyword_check)(const char*,int);\n  sqlite3_str *(*str_new)(sqlite3*);\n  char *(*str_finish)(sqlite3_str*);\n  void (*str_appendf)(sqlite3_str*, const char *zFormat, ...);\n  void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list);\n  void (*str_append)(sqlite3_str*, const char *zIn, int N);\n  void (*str_appendall)(sqlite3_str*, const char *zIn);\n  void (*str_appendchar)(sqlite3_str*, int N, char C);\n  void (*str_reset)(sqlite3_str*);\n  int (*str_errcode)(sqlite3_str*);\n  int (*str_length)(sqlite3_str*);\n  char *(*str_value)(sqlite3_str*);\n  /* Version 3.25.0 and later */\n  int (*create_window_function)(sqlite3*,const char*,int,int,void*,\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*),\n                            void (*xValue)(sqlite3_context*),\n                            void (*xInv)(sqlite3_context*,int,sqlite3_value**),\n                            void(*xDestroy)(void*));\n  /* Version 3.26.0 and later */\n  const char *(*normalized_sql)(sqlite3_stmt*);\n  /* Version 3.28.0 and later */\n  int (*stmt_isexplain)(sqlite3_stmt*);\n  int (*value_frombind)(sqlite3_value*);\n  /* Version 3.30.0 and later */\n  int (*drop_modules)(sqlite3*,const char**);\n  /* Version 3.31.0 and later */\n  sqlite3_int64 (*hard_heap_limit64)(sqlite3_int64);\n  const char *(*uri_key)(const char*,int);\n  const char *(*filename_database)(const char*);\n  const char *(*filename_journal)(const char*);\n  const char *(*filename_wal)(const char*);\n  /* Version 3.32.0 and later */\n  const char *(*create_filename)(const char*,const char*,const char*,\n                           int,const char**);\n  void (*free_filename)(const char*);\n  sqlite3_file *(*database_file_object)(const char*);\n  /* Version 3.34.0 and later */\n  int (*txn_state)(sqlite3*,const char*);\n  /* Version 3.36.1 and later */\n  sqlite3_int64 (*changes64)(sqlite3*);\n  sqlite3_int64 (*total_changes64)(sqlite3*);\n  /* Version 3.37.0 and later */\n  int (*autovacuum_pages)(sqlite3*,\n     unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),\n     void*, void(*)(void*));\n  /* Version 3.38.0 and later */\n  int (*error_offset)(sqlite3*);\n  int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**);\n  int (*vtab_distinct)(sqlite3_index_info*);\n  int (*vtab_in)(sqlite3_index_info*,int,int);\n  int (*vtab_in_first)(sqlite3_value*,sqlite3_value**);\n  int (*vtab_in_next)(sqlite3_value*,sqlite3_value**);\n  /* Version 3.39.0 and later */\n  int (*deserialize)(sqlite3*,const char*,unsigned char*,\n                     sqlite3_int64,sqlite3_int64,unsigned);\n  unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*,\n                              unsigned int);\n  const char *(*db_name)(sqlite3*,int);\n  /* Version 3.40.0 and later */\n  int (*value_encoding)(sqlite3_value*);\n  /* Version 3.41.0 and later */\n  int (*is_interrupted)(sqlite3*);\n  /* Version 3.43.0 and later */\n  int (*stmt_explain)(sqlite3_stmt*,int);\n  /* Version 3.44.0 and later */\n  void *(*get_clientdata)(sqlite3*,const char*);\n  int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));\n  /* Version 3.50.0 and later */\n  int (*setlk_timeout)(sqlite3*,int,int);\n  /* Version 3.51.0 and later */\n  int (*set_errmsg)(sqlite3*,int,const char*);\n  int (*db_status64)(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);\n\n};\n\n/*\n** This is the function signature used for all extension entry points.  It\n** is also defined in the file \"loadext.c\".\n*/\ntypedef int (*sqlite3_loadext_entry)(\n  sqlite3 *db,                       /* Handle to the database. */\n  char **pzErrMsg,                   /* Used to set error string on failure. */\n  const sqlite3_api_routines *pThunk /* Extension API function pointers. */\n);\n\n/*\n** The following macros redefine the API routines so that they are\n** redirected through the global sqlite3_api structure.\n**\n** This header file is also used by the loadext.c source file\n** (part of the main SQLite library - not an extension) so that\n** it can get access to the sqlite3_api_routines structure\n** definition.  But the main library does not want to redefine\n** the API.  So the redefinition macros are only valid if the\n** SQLITE_CORE macros is undefined.\n*/\n#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n#define sqlite3_aggregate_context      sqlite3_api->aggregate_context\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_aggregate_count        sqlite3_api->aggregate_count\n#endif\n#define sqlite3_bind_blob              sqlite3_api->bind_blob\n#define sqlite3_bind_double            sqlite3_api->bind_double\n#define sqlite3_bind_int               sqlite3_api->bind_int\n#define sqlite3_bind_int64             sqlite3_api->bind_int64\n#define sqlite3_bind_null              sqlite3_api->bind_null\n#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count\n#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index\n#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name\n#define sqlite3_bind_text              sqlite3_api->bind_text\n#define sqlite3_bind_text16            sqlite3_api->bind_text16\n#define sqlite3_bind_value             sqlite3_api->bind_value\n#define sqlite3_busy_handler           sqlite3_api->busy_handler\n#define sqlite3_busy_timeout           sqlite3_api->busy_timeout\n#define sqlite3_changes                sqlite3_api->changes\n#define sqlite3_close                  sqlite3_api->close\n#define sqlite3_collation_needed       sqlite3_api->collation_needed\n#define sqlite3_collation_needed16     sqlite3_api->collation_needed16\n#define sqlite3_column_blob            sqlite3_api->column_blob\n#define sqlite3_column_bytes           sqlite3_api->column_bytes\n#define sqlite3_column_bytes16         sqlite3_api->column_bytes16\n#define sqlite3_column_count           sqlite3_api->column_count\n#define sqlite3_column_database_name   sqlite3_api->column_database_name\n#define sqlite3_column_database_name16 sqlite3_api->column_database_name16\n#define sqlite3_column_decltype        sqlite3_api->column_decltype\n#define sqlite3_column_decltype16      sqlite3_api->column_decltype16\n#define sqlite3_column_double          sqlite3_api->column_double\n#define sqlite3_column_int             sqlite3_api->column_int\n#define sqlite3_column_int64           sqlite3_api->column_int64\n#define sqlite3_column_name            sqlite3_api->column_name\n#define sqlite3_column_name16          sqlite3_api->column_name16\n#define sqlite3_column_origin_name     sqlite3_api->column_origin_name\n#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16\n#define sqlite3_column_table_name      sqlite3_api->column_table_name\n#define sqlite3_column_table_name16    sqlite3_api->column_table_name16\n#define sqlite3_column_text            sqlite3_api->column_text\n#define sqlite3_column_text16          sqlite3_api->column_text16\n#define sqlite3_column_type            sqlite3_api->column_type\n#define sqlite3_column_value           sqlite3_api->column_value\n#define sqlite3_commit_hook            sqlite3_api->commit_hook\n#define sqlite3_complete               sqlite3_api->complete\n#define sqlite3_complete16             sqlite3_api->complete16\n#define sqlite3_create_collation       sqlite3_api->create_collation\n#define sqlite3_create_collation16     sqlite3_api->create_collation16\n#define sqlite3_create_function        sqlite3_api->create_function\n#define sqlite3_create_function16      sqlite3_api->create_function16\n#define sqlite3_create_module          sqlite3_api->create_module\n#define sqlite3_create_module_v2       sqlite3_api->create_module_v2\n#define sqlite3_data_count             sqlite3_api->data_count\n#define sqlite3_db_handle              sqlite3_api->db_handle\n#define sqlite3_declare_vtab           sqlite3_api->declare_vtab\n#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache\n#define sqlite3_errcode                sqlite3_api->errcode\n#define sqlite3_errmsg                 sqlite3_api->errmsg\n#define sqlite3_errmsg16               sqlite3_api->errmsg16\n#define sqlite3_exec                   sqlite3_api->exec\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_expired                sqlite3_api->expired\n#endif\n#define sqlite3_finalize               sqlite3_api->finalize\n#define sqlite3_free                   sqlite3_api->free\n#define sqlite3_free_table             sqlite3_api->free_table\n#define sqlite3_get_autocommit         sqlite3_api->get_autocommit\n#define sqlite3_get_auxdata            sqlite3_api->get_auxdata\n#define sqlite3_get_table              sqlite3_api->get_table\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_global_recover         sqlite3_api->global_recover\n#endif\n#define sqlite3_interrupt              sqlite3_api->interruptx\n#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid\n#define sqlite3_libversion             sqlite3_api->libversion\n#define sqlite3_libversion_number      sqlite3_api->libversion_number\n#define sqlite3_malloc                 sqlite3_api->malloc\n#define sqlite3_mprintf                sqlite3_api->mprintf\n#define sqlite3_open                   sqlite3_api->open\n#define sqlite3_open16                 sqlite3_api->open16\n#define sqlite3_prepare                sqlite3_api->prepare\n#define sqlite3_prepare16              sqlite3_api->prepare16\n#define sqlite3_prepare_v2             sqlite3_api->prepare_v2\n#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2\n#define sqlite3_profile                sqlite3_api->profile\n#define sqlite3_progress_handler       sqlite3_api->progress_handler\n#define sqlite3_realloc                sqlite3_api->realloc\n#define sqlite3_reset                  sqlite3_api->reset\n#define sqlite3_result_blob            sqlite3_api->result_blob\n#define sqlite3_result_double          sqlite3_api->result_double\n#define sqlite3_result_error           sqlite3_api->result_error\n#define sqlite3_result_error16         sqlite3_api->result_error16\n#define sqlite3_result_int             sqlite3_api->result_int\n#define sqlite3_result_int64           sqlite3_api->result_int64\n#define sqlite3_result_null            sqlite3_api->result_null\n#define sqlite3_result_text            sqlite3_api->result_text\n#define sqlite3_result_text16          sqlite3_api->result_text16\n#define sqlite3_result_text16be        sqlite3_api->result_text16be\n#define sqlite3_result_text16le        sqlite3_api->result_text16le\n#define sqlite3_result_value           sqlite3_api->result_value\n#define sqlite3_rollback_hook          sqlite3_api->rollback_hook\n#define sqlite3_set_authorizer         sqlite3_api->set_authorizer\n#define sqlite3_set_auxdata            sqlite3_api->set_auxdata\n#define sqlite3_snprintf               sqlite3_api->xsnprintf\n#define sqlite3_step                   sqlite3_api->step\n#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata\n#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup\n#define sqlite3_total_changes          sqlite3_api->total_changes\n#define sqlite3_trace                  sqlite3_api->trace\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings\n#endif\n#define sqlite3_update_hook            sqlite3_api->update_hook\n#define sqlite3_user_data              sqlite3_api->user_data\n#define sqlite3_value_blob             sqlite3_api->value_blob\n#define sqlite3_value_bytes            sqlite3_api->value_bytes\n#define sqlite3_value_bytes16          sqlite3_api->value_bytes16\n#define sqlite3_value_double           sqlite3_api->value_double\n#define sqlite3_value_int              sqlite3_api->value_int\n#define sqlite3_value_int64            sqlite3_api->value_int64\n#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type\n#define sqlite3_value_text             sqlite3_api->value_text\n#define sqlite3_value_text16           sqlite3_api->value_text16\n#define sqlite3_value_text16be         sqlite3_api->value_text16be\n#define sqlite3_value_text16le         sqlite3_api->value_text16le\n#define sqlite3_value_type             sqlite3_api->value_type\n#define sqlite3_vmprintf               sqlite3_api->vmprintf\n#define sqlite3_vsnprintf              sqlite3_api->xvsnprintf\n#define sqlite3_overload_function      sqlite3_api->overload_function\n#define sqlite3_prepare_v2             sqlite3_api->prepare_v2\n#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2\n#define sqlite3_clear_bindings         sqlite3_api->clear_bindings\n#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob\n#define sqlite3_blob_bytes             sqlite3_api->blob_bytes\n#define sqlite3_blob_close             sqlite3_api->blob_close\n#define sqlite3_blob_open              sqlite3_api->blob_open\n#define sqlite3_blob_read              sqlite3_api->blob_read\n#define sqlite3_blob_write             sqlite3_api->blob_write\n#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2\n#define sqlite3_file_control           sqlite3_api->file_control\n#define sqlite3_memory_highwater       sqlite3_api->memory_highwater\n#define sqlite3_memory_used            sqlite3_api->memory_used\n#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc\n#define sqlite3_mutex_enter            sqlite3_api->mutex_enter\n#define sqlite3_mutex_free             sqlite3_api->mutex_free\n#define sqlite3_mutex_leave            sqlite3_api->mutex_leave\n#define sqlite3_mutex_try              sqlite3_api->mutex_try\n#define sqlite3_open_v2                sqlite3_api->open_v2\n#define sqlite3_release_memory         sqlite3_api->release_memory\n#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem\n#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig\n#define sqlite3_sleep                  sqlite3_api->sleep\n#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit\n#define sqlite3_vfs_find               sqlite3_api->vfs_find\n#define sqlite3_vfs_register           sqlite3_api->vfs_register\n#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister\n#define sqlite3_threadsafe             sqlite3_api->xthreadsafe\n#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob\n#define sqlite3_result_error_code      sqlite3_api->result_error_code\n#define sqlite3_test_control           sqlite3_api->test_control\n#define sqlite3_randomness             sqlite3_api->randomness\n#define sqlite3_context_db_handle      sqlite3_api->context_db_handle\n#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes\n#define sqlite3_limit                  sqlite3_api->limit\n#define sqlite3_next_stmt              sqlite3_api->next_stmt\n#define sqlite3_sql                    sqlite3_api->sql\n#define sqlite3_status                 sqlite3_api->status\n#define sqlite3_backup_finish          sqlite3_api->backup_finish\n#define sqlite3_backup_init            sqlite3_api->backup_init\n#define sqlite3_backup_pagecount       sqlite3_api->backup_pagecount\n#define sqlite3_backup_remaining       sqlite3_api->backup_remaining\n#define sqlite3_backup_step            sqlite3_api->backup_step\n#define sqlite3_compileoption_get      sqlite3_api->compileoption_get\n#define sqlite3_compileoption_used     sqlite3_api->compileoption_used\n#define sqlite3_create_function_v2     sqlite3_api->create_function_v2\n#define sqlite3_db_config              sqlite3_api->db_config\n#define sqlite3_db_mutex               sqlite3_api->db_mutex\n#define sqlite3_db_status              sqlite3_api->db_status\n#define sqlite3_extended_errcode       sqlite3_api->extended_errcode\n#define sqlite3_log                    sqlite3_api->log\n#define sqlite3_soft_heap_limit64      sqlite3_api->soft_heap_limit64\n#define sqlite3_sourceid               sqlite3_api->sourceid\n#define sqlite3_stmt_status            sqlite3_api->stmt_status\n#define sqlite3_strnicmp               sqlite3_api->strnicmp\n#define sqlite3_unlock_notify          sqlite3_api->unlock_notify\n#define sqlite3_wal_autocheckpoint     sqlite3_api->wal_autocheckpoint\n#define sqlite3_wal_checkpoint         sqlite3_api->wal_checkpoint\n#define sqlite3_wal_hook               sqlite3_api->wal_hook\n#define sqlite3_blob_reopen            sqlite3_api->blob_reopen\n#define sqlite3_vtab_config            sqlite3_api->vtab_config\n#define sqlite3_vtab_on_conflict       sqlite3_api->vtab_on_conflict\n/* Version 3.7.16 and later */\n#define sqlite3_close_v2               sqlite3_api->close_v2\n#define sqlite3_db_filename            sqlite3_api->db_filename\n#define sqlite3_db_readonly            sqlite3_api->db_readonly\n#define sqlite3_db_release_memory      sqlite3_api->db_release_memory\n#define sqlite3_errstr                 sqlite3_api->errstr\n#define sqlite3_stmt_busy              sqlite3_api->stmt_busy\n#define sqlite3_stmt_readonly          sqlite3_api->stmt_readonly\n#define sqlite3_stricmp                sqlite3_api->stricmp\n#define sqlite3_uri_boolean            sqlite3_api->uri_boolean\n#define sqlite3_uri_int64              sqlite3_api->uri_int64\n#define sqlite3_uri_parameter          sqlite3_api->uri_parameter\n#define sqlite3_uri_vsnprintf          sqlite3_api->xvsnprintf\n#define sqlite3_wal_checkpoint_v2      sqlite3_api->wal_checkpoint_v2\n/* Version 3.8.7 and later */\n#define sqlite3_auto_extension         sqlite3_api->auto_extension\n#define sqlite3_bind_blob64            sqlite3_api->bind_blob64\n#define sqlite3_bind_text64            sqlite3_api->bind_text64\n#define sqlite3_cancel_auto_extension  sqlite3_api->cancel_auto_extension\n#define sqlite3_load_extension         sqlite3_api->load_extension\n#define sqlite3_malloc64               sqlite3_api->malloc64\n#define sqlite3_msize                  sqlite3_api->msize\n#define sqlite3_realloc64              sqlite3_api->realloc64\n#define sqlite3_reset_auto_extension   sqlite3_api->reset_auto_extension\n#define sqlite3_result_blob64          sqlite3_api->result_blob64\n#define sqlite3_result_text64          sqlite3_api->result_text64\n#define sqlite3_strglob                sqlite3_api->strglob\n/* Version 3.8.11 and later */\n#define sqlite3_value_dup              sqlite3_api->value_dup\n#define sqlite3_value_free             sqlite3_api->value_free\n#define sqlite3_result_zeroblob64      sqlite3_api->result_zeroblob64\n#define sqlite3_bind_zeroblob64        sqlite3_api->bind_zeroblob64\n/* Version 3.9.0 and later */\n#define sqlite3_value_subtype          sqlite3_api->value_subtype\n#define sqlite3_result_subtype         sqlite3_api->result_subtype\n/* Version 3.10.0 and later */\n#define sqlite3_status64               sqlite3_api->status64\n#define sqlite3_strlike                sqlite3_api->strlike\n#define sqlite3_db_cacheflush          sqlite3_api->db_cacheflush\n/* Version 3.12.0 and later */\n#define sqlite3_system_errno           sqlite3_api->system_errno\n/* Version 3.14.0 and later */\n#define sqlite3_trace_v2               sqlite3_api->trace_v2\n#define sqlite3_expanded_sql           sqlite3_api->expanded_sql\n/* Version 3.18.0 and later */\n#define sqlite3_set_last_insert_rowid  sqlite3_api->set_last_insert_rowid\n/* Version 3.20.0 and later */\n#define sqlite3_prepare_v3             sqlite3_api->prepare_v3\n#define sqlite3_prepare16_v3           sqlite3_api->prepare16_v3\n#define sqlite3_bind_pointer           sqlite3_api->bind_pointer\n#define sqlite3_result_pointer         sqlite3_api->result_pointer\n#define sqlite3_value_pointer          sqlite3_api->value_pointer\n/* Version 3.22.0 and later */\n#define sqlite3_vtab_nochange          sqlite3_api->vtab_nochange\n#define sqlite3_value_nochange         sqlite3_api->value_nochange\n#define sqlite3_vtab_collation         sqlite3_api->vtab_collation\n/* Version 3.24.0 and later */\n#define sqlite3_keyword_count          sqlite3_api->keyword_count\n#define sqlite3_keyword_name           sqlite3_api->keyword_name\n#define sqlite3_keyword_check          sqlite3_api->keyword_check\n#define sqlite3_str_new                sqlite3_api->str_new\n#define sqlite3_str_finish             sqlite3_api->str_finish\n#define sqlite3_str_appendf            sqlite3_api->str_appendf\n#define sqlite3_str_vappendf           sqlite3_api->str_vappendf\n#define sqlite3_str_append             sqlite3_api->str_append\n#define sqlite3_str_appendall          sqlite3_api->str_appendall\n#define sqlite3_str_appendchar         sqlite3_api->str_appendchar\n#define sqlite3_str_reset              sqlite3_api->str_reset\n#define sqlite3_str_errcode            sqlite3_api->str_errcode\n#define sqlite3_str_length             sqlite3_api->str_length\n#define sqlite3_str_value              sqlite3_api->str_value\n/* Version 3.25.0 and later */\n#define sqlite3_create_window_function sqlite3_api->create_window_function\n/* Version 3.26.0 and later */\n#define sqlite3_normalized_sql         sqlite3_api->normalized_sql\n/* Version 3.28.0 and later */\n#define sqlite3_stmt_isexplain         sqlite3_api->stmt_isexplain\n#define sqlite3_value_frombind         sqlite3_api->value_frombind\n/* Version 3.30.0 and later */\n#define sqlite3_drop_modules           sqlite3_api->drop_modules\n/* Version 3.31.0 and later */\n#define sqlite3_hard_heap_limit64      sqlite3_api->hard_heap_limit64\n#define sqlite3_uri_key                sqlite3_api->uri_key\n#define sqlite3_filename_database      sqlite3_api->filename_database\n#define sqlite3_filename_journal       sqlite3_api->filename_journal\n#define sqlite3_filename_wal           sqlite3_api->filename_wal\n/* Version 3.32.0 and later */\n#define sqlite3_create_filename        sqlite3_api->create_filename\n#define sqlite3_free_filename          sqlite3_api->free_filename\n#define sqlite3_database_file_object   sqlite3_api->database_file_object\n/* Version 3.34.0 and later */\n#define sqlite3_txn_state              sqlite3_api->txn_state\n/* Version 3.36.1 and later */\n#define sqlite3_changes64              sqlite3_api->changes64\n#define sqlite3_total_changes64        sqlite3_api->total_changes64\n/* Version 3.37.0 and later */\n#define sqlite3_autovacuum_pages       sqlite3_api->autovacuum_pages\n/* Version 3.38.0 and later */\n#define sqlite3_error_offset           sqlite3_api->error_offset\n#define sqlite3_vtab_rhs_value         sqlite3_api->vtab_rhs_value\n#define sqlite3_vtab_distinct          sqlite3_api->vtab_distinct\n#define sqlite3_vtab_in                sqlite3_api->vtab_in\n#define sqlite3_vtab_in_first          sqlite3_api->vtab_in_first\n#define sqlite3_vtab_in_next           sqlite3_api->vtab_in_next\n/* Version 3.39.0 and later */\n#ifndef SQLITE_OMIT_DESERIALIZE\n#define sqlite3_deserialize            sqlite3_api->deserialize\n#define sqlite3_serialize              sqlite3_api->serialize\n#endif\n#define sqlite3_db_name                sqlite3_api->db_name\n/* Version 3.40.0 and later */\n#define sqlite3_value_encoding         sqlite3_api->value_encoding\n/* Version 3.41.0 and later */\n#define sqlite3_is_interrupted         sqlite3_api->is_interrupted\n/* Version 3.43.0 and later */\n#define sqlite3_stmt_explain           sqlite3_api->stmt_explain\n/* Version 3.44.0 and later */\n#define sqlite3_get_clientdata         sqlite3_api->get_clientdata\n#define sqlite3_set_clientdata         sqlite3_api->set_clientdata\n/* Version 3.50.0 and later */\n#define sqlite3_setlk_timeout          sqlite3_api->setlk_timeout\n/* Version 3.51.0 and later */\n#define sqlite3_set_errmsg             sqlite3_api->set_errmsg\n#define sqlite3_db_status64            sqlite3_api->db_status64\n#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */\n\n#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  /* This case when the file really is being compiled as a loadable\n  ** extension */\n# define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api=0;\n# define SQLITE_EXTENSION_INIT2(v)  sqlite3_api=v;\n# define SQLITE_EXTENSION_INIT3     \\\n    extern const sqlite3_api_routines *sqlite3_api;\n#else\n  /* This case when the file is being statically linked into the\n  ** application */\n# define SQLITE_EXTENSION_INIT1     /*no-op*/\n# define SQLITE_EXTENSION_INIT2(v)  (void)v; /* unused parameter */\n# define SQLITE_EXTENSION_INIT3     /*no-op*/\n#endif\n\n#endif /* SQLITE3EXT_H */\n\n/************** End of sqlite3ext.h ******************************************/\n/************** Continuing where we left off in loadext.c ********************/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n/*\n** Some API routines are omitted when various features are\n** excluded from a build of SQLite.  Substitute a NULL pointer\n** for any missing APIs.\n*/\n#ifndef SQLITE_ENABLE_COLUMN_METADATA\n# define sqlite3_column_database_name   0\n# define sqlite3_column_database_name16 0\n# define sqlite3_column_table_name      0\n# define sqlite3_column_table_name16    0\n# define sqlite3_column_origin_name     0\n# define sqlite3_column_origin_name16   0\n#endif\n\n#ifdef SQLITE_OMIT_AUTHORIZATION\n# define sqlite3_set_authorizer         0\n#endif\n\n#ifdef SQLITE_OMIT_UTF16\n# define sqlite3_bind_text16            0\n# define sqlite3_collation_needed16     0\n# define sqlite3_column_decltype16      0\n# define sqlite3_column_name16          0\n# define sqlite3_column_text16          0\n# define sqlite3_complete16             0\n# define sqlite3_create_collation16     0\n# define sqlite3_create_function16      0\n# define sqlite3_errmsg16               0\n# define sqlite3_open16                 0\n# define sqlite3_prepare16              0\n# define sqlite3_prepare16_v2           0\n# define sqlite3_prepare16_v3           0\n# define sqlite3_result_error16         0\n# define sqlite3_result_text16          0\n# define sqlite3_result_text16be        0\n# define sqlite3_result_text16le        0\n# define sqlite3_value_text16           0\n# define sqlite3_value_text16be         0\n# define sqlite3_value_text16le         0\n# define sqlite3_column_database_name16 0\n# define sqlite3_column_table_name16    0\n# define sqlite3_column_origin_name16   0\n#endif\n\n#ifdef SQLITE_OMIT_COMPLETE\n# define sqlite3_complete 0\n# define sqlite3_complete16 0\n#endif\n\n#ifdef SQLITE_OMIT_DECLTYPE\n# define sqlite3_column_decltype16      0\n# define sqlite3_column_decltype        0\n#endif\n\n#ifdef SQLITE_OMIT_PROGRESS_CALLBACK\n# define sqlite3_progress_handler 0\n#endif\n\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n# define sqlite3_create_module 0\n# define sqlite3_create_module_v2 0\n# define sqlite3_declare_vtab 0\n# define sqlite3_vtab_config 0\n# define sqlite3_vtab_on_conflict 0\n# define sqlite3_vtab_collation 0\n#endif\n\n#ifdef SQLITE_OMIT_SHARED_CACHE\n# define sqlite3_enable_shared_cache 0\n#endif\n\n#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)\n# define sqlite3_profile       0\n# define sqlite3_trace         0\n#endif\n\n#ifdef SQLITE_OMIT_GET_TABLE\n# define sqlite3_free_table    0\n# define sqlite3_get_table     0\n#endif\n\n#ifdef SQLITE_OMIT_INCRBLOB\n#define sqlite3_bind_zeroblob  0\n#define sqlite3_blob_bytes     0\n#define sqlite3_blob_close     0\n#define sqlite3_blob_open      0\n#define sqlite3_blob_read      0\n#define sqlite3_blob_write     0\n#define sqlite3_blob_reopen    0\n#endif\n\n#if defined(SQLITE_OMIT_TRACE)\n# define sqlite3_trace_v2      0\n#endif\n\n/*\n** The following structure contains pointers to all SQLite API routines.\n** A pointer to this structure is passed into extensions when they are\n** loaded so that the extension can make calls back into the SQLite\n** library.\n**\n** When adding new APIs, add them to the bottom of this structure\n** in order to preserve backwards compatibility.\n**\n** Extensions that use newer APIs should first call the\n** sqlite3_libversion_number() to make sure that the API they\n** intend to use is supported by the library.  Extensions should\n** also check to make sure that the pointer to the function is\n** not NULL before calling it.\n*/\nstatic const sqlite3_api_routines sqlite3Apis = {\n  sqlite3_aggregate_context,\n#ifndef SQLITE_OMIT_DEPRECATED\n  sqlite3_aggregate_count,\n#else\n  0,\n#endif\n  sqlite3_bind_blob,\n  sqlite3_bind_double,\n  sqlite3_bind_int,\n  sqlite3_bind_int64,\n  sqlite3_bind_null,\n  sqlite3_bind_parameter_count,\n  sqlite3_bind_parameter_index,\n  sqlite3_bind_parameter_name,\n  sqlite3_bind_text,\n  sqlite3_bind_text16,\n  sqlite3_bind_value,\n  sqlite3_busy_handler,\n  sqlite3_busy_timeout,\n  sqlite3_changes,\n  sqlite3_close,\n  sqlite3_collation_needed,\n  sqlite3_collation_needed16,\n  sqlite3_column_blob,\n  sqlite3_column_bytes,\n  sqlite3_column_bytes16,\n  sqlite3_column_count,\n  sqlite3_column_database_name,\n  sqlite3_column_database_name16,\n  sqlite3_column_decltype,\n  sqlite3_column_decltype16,\n  sqlite3_column_double,\n  sqlite3_column_int,\n  sqlite3_column_int64,\n  sqlite3_column_name,\n  sqlite3_column_name16,\n  sqlite3_column_origin_name,\n  sqlite3_column_origin_name16,\n  sqlite3_column_table_name,\n  sqlite3_column_table_name16,\n  sqlite3_column_text,\n  sqlite3_column_text16,\n  sqlite3_column_type,\n  sqlite3_column_value,\n  sqlite3_commit_hook,\n  sqlite3_complete,\n  sqlite3_complete16,\n  sqlite3_create_collation,\n  sqlite3_create_collation16,\n  sqlite3_create_function,\n  sqlite3_create_function16,\n  sqlite3_create_module,\n  sqlite3_data_count,\n  sqlite3_db_handle,\n  sqlite3_declare_vtab,\n  sqlite3_enable_shared_cache,\n  sqlite3_errcode,\n  sqlite3_errmsg,\n  sqlite3_errmsg16,\n  sqlite3_exec,\n#ifndef SQLITE_OMIT_DEPRECATED\n  sqlite3_expired,\n#else\n  0,\n#endif\n  sqlite3_finalize,\n  sqlite3_free,\n  sqlite3_free_table,\n  sqlite3_get_autocommit,\n  sqlite3_get_auxdata,\n  sqlite3_get_table,\n  0,     /* Was sqlite3_global_recover(), but that function is deprecated */\n  sqlite3_interrupt,\n  sqlite3_last_insert_rowid,\n  sqlite3_libversion,\n  sqlite3_libversion_number,\n  sqlite3_malloc,\n  sqlite3_mprintf,\n  sqlite3_open,\n  sqlite3_open16,\n  sqlite3_prepare,\n  sqlite3_prepare16,\n  sqlite3_profile,\n  sqlite3_progress_handler,\n  sqlite3_realloc,\n  sqlite3_reset,\n  sqlite3_result_blob,\n  sqlite3_result_double,\n  sqlite3_result_error,\n  sqlite3_result_error16,\n  sqlite3_result_int,\n  sqlite3_result_int64,\n  sqlite3_result_null,\n  sqlite3_result_text,\n  sqlite3_result_text16,\n  sqlite3_result_text16be,\n  sqlite3_result_text16le,\n  sqlite3_result_value,\n  sqlite3_rollback_hook,\n  sqlite3_set_authorizer,\n  sqlite3_set_auxdata,\n  sqlite3_snprintf,\n  sqlite3_step,\n  sqlite3_table_column_metadata,\n#ifndef SQLITE_OMIT_DEPRECATED\n  sqlite3_thread_cleanup,\n#else\n  0,\n#endif\n  sqlite3_total_changes,\n  sqlite3_trace,\n#ifndef SQLITE_OMIT_DEPRECATED\n  sqlite3_transfer_bindings,\n#else\n  0,\n#endif\n  sqlite3_update_hook,\n  sqlite3_user_data,\n  sqlite3_value_blob,\n  sqlite3_value_bytes,\n  sqlite3_value_bytes16,\n  sqlite3_value_double,\n  sqlite3_value_int,\n  sqlite3_value_int64,\n  sqlite3_value_numeric_type,\n  sqlite3_value_text,\n  sqlite3_value_text16,\n  sqlite3_value_text16be,\n  sqlite3_value_text16le,\n  sqlite3_value_type,\n  sqlite3_vmprintf,\n  /*\n  ** The original API set ends here.  All extensions can call any\n  ** of the APIs above provided that the pointer is not NULL.  But\n  ** before calling APIs that follow, extension should check the\n  ** sqlite3_libversion_number() to make sure they are dealing with\n  ** a library that is new enough to support that API.\n  *************************************************************************\n  */\n  sqlite3_overload_function,\n\n  /*\n  ** Added after 3.3.13\n  */\n  sqlite3_prepare_v2,\n  sqlite3_prepare16_v2,\n  sqlite3_clear_bindings,\n\n  /*\n  ** Added for 3.4.1\n  */\n  sqlite3_create_module_v2,\n\n  /*\n  ** Added for 3.5.0\n  */\n  sqlite3_bind_zeroblob,\n  sqlite3_blob_bytes,\n  sqlite3_blob_close,\n  sqlite3_blob_open,\n  sqlite3_blob_read,\n  sqlite3_blob_write,\n  sqlite3_create_collation_v2,\n  sqlite3_file_control,\n  sqlite3_memory_highwater,\n  sqlite3_memory_used,\n#ifdef SQLITE_MUTEX_OMIT\n  0,\n  0,\n  0,\n  0,\n  0,\n#else\n  sqlite3_mutex_alloc,\n  sqlite3_mutex_enter,\n  sqlite3_mutex_free,\n  sqlite3_mutex_leave,\n  sqlite3_mutex_try,\n#endif\n  sqlite3_open_v2,\n  sqlite3_release_memory,\n  sqlite3_result_error_nomem,\n  sqlite3_result_error_toobig,\n  sqlite3_sleep,\n  sqlite3_soft_heap_limit,\n  sqlite3_vfs_find,\n  sqlite3_vfs_register,\n  sqlite3_vfs_unregister,\n\n  /*\n  ** Added for 3.5.8\n  */\n  sqlite3_threadsafe,\n  sqlite3_result_zeroblob,\n  sqlite3_result_error_code,\n  sqlite3_test_control,\n  sqlite3_randomness,\n  sqlite3_context_db_handle,\n\n  /*\n  ** Added for 3.6.0\n  */\n  sqlite3_extended_result_codes,\n  sqlite3_limit,\n  sqlite3_next_stmt,\n  sqlite3_sql,\n  sqlite3_status,\n\n  /*\n  ** Added for 3.7.4\n  */\n  sqlite3_backup_finish,\n  sqlite3_backup_init,\n  sqlite3_backup_pagecount,\n  sqlite3_backup_remaining,\n  sqlite3_backup_step,\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\n  sqlite3_compileoption_get,\n  sqlite3_compileoption_used,\n#else\n  0,\n  0,\n#endif\n  sqlite3_create_function_v2,\n  sqlite3_db_config,\n  sqlite3_db_mutex,\n  sqlite3_db_status,\n  sqlite3_extended_errcode,\n  sqlite3_log,\n  sqlite3_soft_heap_limit64,\n  sqlite3_sourceid,\n  sqlite3_stmt_status,\n  sqlite3_strnicmp,\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\n  sqlite3_unlock_notify,\n#else\n  0,\n#endif\n#ifndef SQLITE_OMIT_WAL\n  sqlite3_wal_autocheckpoint,\n  sqlite3_wal_checkpoint,\n  sqlite3_wal_hook,\n#else\n  0,\n  0,\n  0,\n#endif\n  sqlite3_blob_reopen,\n  sqlite3_vtab_config,\n  sqlite3_vtab_on_conflict,\n  sqlite3_close_v2,\n  sqlite3_db_filename,\n  sqlite3_db_readonly,\n  sqlite3_db_release_memory,\n  sqlite3_errstr,\n  sqlite3_stmt_busy,\n  sqlite3_stmt_readonly,\n  sqlite3_stricmp,\n  sqlite3_uri_boolean,\n  sqlite3_uri_int64,\n  sqlite3_uri_parameter,\n  sqlite3_vsnprintf,\n  sqlite3_wal_checkpoint_v2,\n  /* Version 3.8.7 and later */\n  sqlite3_auto_extension,\n  sqlite3_bind_blob64,\n  sqlite3_bind_text64,\n  sqlite3_cancel_auto_extension,\n  sqlite3_load_extension,\n  sqlite3_malloc64,\n  sqlite3_msize,\n  sqlite3_realloc64,\n  sqlite3_reset_auto_extension,\n  sqlite3_result_blob64,\n  sqlite3_result_text64,\n  sqlite3_strglob,\n  /* Version 3.8.11 and later */\n  (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup,\n  sqlite3_value_free,\n  sqlite3_result_zeroblob64,\n  sqlite3_bind_zeroblob64,\n  /* Version 3.9.0 and later */\n  sqlite3_value_subtype,\n  sqlite3_result_subtype,\n  /* Version 3.10.0 and later */\n  sqlite3_status64,\n  sqlite3_strlike,\n  sqlite3_db_cacheflush,\n  /* Version 3.12.0 and later */\n  sqlite3_system_errno,\n  /* Version 3.14.0 and later */\n  sqlite3_trace_v2,\n  sqlite3_expanded_sql,\n  /* Version 3.18.0 and later */\n  sqlite3_set_last_insert_rowid,\n  /* Version 3.20.0 and later */\n  sqlite3_prepare_v3,\n  sqlite3_prepare16_v3,\n  sqlite3_bind_pointer,\n  sqlite3_result_pointer,\n  sqlite3_value_pointer,\n  /* Version 3.22.0 and later */\n  sqlite3_vtab_nochange,\n  sqlite3_value_nochange,\n  sqlite3_vtab_collation,\n  /* Version 3.24.0 and later */\n  sqlite3_keyword_count,\n  sqlite3_keyword_name,\n  sqlite3_keyword_check,\n  sqlite3_str_new,\n  sqlite3_str_finish,\n  sqlite3_str_appendf,\n  sqlite3_str_vappendf,\n  sqlite3_str_append,\n  sqlite3_str_appendall,\n  sqlite3_str_appendchar,\n  sqlite3_str_reset,\n  sqlite3_str_errcode,\n  sqlite3_str_length,\n  sqlite3_str_value,\n  /* Version 3.25.0 and later */\n  sqlite3_create_window_function,\n  /* Version 3.26.0 and later */\n#ifdef SQLITE_ENABLE_NORMALIZE\n  sqlite3_normalized_sql,\n#else\n  0,\n#endif\n  /* Version 3.28.0 and later */\n  sqlite3_stmt_isexplain,\n  sqlite3_value_frombind,\n  /* Version 3.30.0 and later */\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  sqlite3_drop_modules,\n#else\n  0,\n#endif\n  /* Version 3.31.0 and later */\n  sqlite3_hard_heap_limit64,\n  sqlite3_uri_key,\n  sqlite3_filename_database,\n  sqlite3_filename_journal,\n  sqlite3_filename_wal,\n  /* Version 3.32.0 and later */\n  sqlite3_create_filename,\n  sqlite3_free_filename,\n  sqlite3_database_file_object,\n  /* Version 3.34.0 and later */\n  sqlite3_txn_state,\n  /* Version 3.36.1 and later */\n  sqlite3_changes64,\n  sqlite3_total_changes64,\n  /* Version 3.37.0 and later */\n  sqlite3_autovacuum_pages,\n  /* Version 3.38.0 and later */\n  sqlite3_error_offset,\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  sqlite3_vtab_rhs_value,\n  sqlite3_vtab_distinct,\n  sqlite3_vtab_in,\n  sqlite3_vtab_in_first,\n  sqlite3_vtab_in_next,\n#else\n  0,\n  0,\n  0,\n  0,\n  0,\n#endif\n  /* Version 3.39.0 and later */\n#ifndef SQLITE_OMIT_DESERIALIZE\n  sqlite3_deserialize,\n  sqlite3_serialize,\n#else\n  0,\n  0,\n#endif\n  sqlite3_db_name,\n  /* Version 3.40.0 and later */\n  sqlite3_value_encoding,\n  /* Version 3.41.0 and later */\n  sqlite3_is_interrupted,\n  /* Version 3.43.0 and later */\n  sqlite3_stmt_explain,\n  /* Version 3.44.0 and later */\n  sqlite3_get_clientdata,\n  sqlite3_set_clientdata,\n  /* Version 3.50.0 and later */\n  sqlite3_setlk_timeout,\n  /* Version 3.51.0 and later */\n  sqlite3_set_errmsg,\n  sqlite3_db_status64\n};\n\n/* True if x is the directory separator character\n*/\n#if SQLITE_OS_WIN\n# define DirSep(X)  ((X)=='/'||(X)=='\\\\')\n#else\n# define DirSep(X)  ((X)=='/')\n#endif\n\n/*\n** Attempt to load an SQLite extension library contained in the file\n** zFile.  The entry point is zProc.  zProc may be 0 in which case a\n** default entry point name (sqlite3_extension_init) is used.  Use\n** of the default name is recommended.\n**\n** Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.\n**\n** If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with\n** error message text.  The calling function should free this memory\n** by calling sqlite3DbFree(db, ).\n*/\nstatic int sqlite3LoadExtension(\n  sqlite3 *db,          /* Load the extension into this database connection */\n  const char *zFile,    /* Name of the shared library containing extension */\n  const char *zProc,    /* Entry point.  Use \"sqlite3_extension_init\" if 0 */\n  char **pzErrMsg       /* Put error message here if not 0 */\n){\n  sqlite3_vfs *pVfs = db->pVfs;\n  void *handle;\n  sqlite3_loadext_entry xInit;\n  char *zErrmsg = 0;\n  const char *zEntry;\n  char *zAltEntry = 0;\n  void **aHandle;\n  u64 nMsg = strlen(zFile);\n  int ii;\n  int rc;\n\n  /* Shared library endings to try if zFile cannot be loaded as written */\n  static const char *azEndings[] = {\n#if SQLITE_OS_WIN\n     \"dll\"\n#elif defined(__APPLE__)\n     \"dylib\"\n#else\n     \"so\"\n#endif\n  };\n\n\n  if( pzErrMsg ) *pzErrMsg = 0;\n\n  /* Ticket #1863.  To avoid a creating security problems for older\n  ** applications that relink against newer versions of SQLite, the\n  ** ability to run load_extension is turned off by default.  One\n  ** must call either sqlite3_enable_load_extension(db) or\n  ** sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, 0)\n  ** to turn on extension loading.\n  */\n  if( (db->flags & SQLITE_LoadExtension)==0 ){\n    if( pzErrMsg ){\n      *pzErrMsg = sqlite3_mprintf(\"not authorized\");\n    }\n    return SQLITE_ERROR;\n  }\n\n  zEntry = zProc ? zProc : \"sqlite3_extension_init\";\n\n  /* tag-20210611-1.  Some dlopen() implementations will segfault if given\n  ** an oversize filename.  Most filesystems have a pathname limit of 4K,\n  ** so limit the extension filename length to about twice that.\n  ** https://sqlite.org/forum/forumpost/08a0d6d9bf\n  **\n  ** Later (2023-03-25): Save an extra 6 bytes for the filename suffix.\n  ** See https://sqlite.org/forum/forumpost/24083b579d.\n  */\n  if( nMsg>SQLITE_MAX_PATHLEN ) goto extension_not_found;\n\n  /* Do not allow sqlite3_load_extension() to link to a copy of the\n  ** running application, by passing in an empty filename. */\n  if( nMsg==0 ) goto extension_not_found;\n\n  handle = sqlite3OsDlOpen(pVfs, zFile);\n#if SQLITE_OS_UNIX || SQLITE_OS_WIN\n  for(ii=0; ii<ArraySize(azEndings) && handle==0; ii++){\n    char *zAltFile = sqlite3_mprintf(\"%s.%s\", zFile, azEndings[ii]);\n    if( zAltFile==0 ) return SQLITE_NOMEM_BKPT;\n    if( nMsg+strlen(azEndings[ii])+1<=SQLITE_MAX_PATHLEN ){\n      handle = sqlite3OsDlOpen(pVfs, zAltFile);\n    }\n    sqlite3_free(zAltFile);\n  }\n#endif\n  if( handle==0 ) goto extension_not_found;\n  xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry);\n\n  /* If no entry point was specified and the default legacy\n  ** entry point name \"sqlite3_extension_init\" was not found, then\n  ** construct an entry point name \"sqlite3_X_init\" where the X is\n  ** replaced by the lowercase value of every ASCII alphabetic\n  ** character in the filename after the last \"/\" upto the first \".\",\n  ** and eliding the first three characters if they are \"lib\".\n  ** Examples:\n  **\n  **    /usr/local/lib/libExample5.4.3.so ==>  sqlite3_example_init\n  **    C:/lib/mathfuncs.dll              ==>  sqlite3_mathfuncs_init\n  */\n  if( xInit==0 && zProc==0 ){\n    int iFile, iEntry, c;\n    int ncFile = sqlite3Strlen30(zFile);\n    zAltEntry = sqlite3_malloc64(ncFile+30);\n    if( zAltEntry==0 ){\n      sqlite3OsDlClose(pVfs, handle);\n      return SQLITE_NOMEM_BKPT;\n    }\n    memcpy(zAltEntry, \"sqlite3_\", 8);\n    for(iFile=ncFile-1; iFile>=0 && !DirSep(zFile[iFile]); iFile--){}\n    iFile++;\n    if( sqlite3_strnicmp(zFile+iFile, \"lib\", 3)==0 ) iFile += 3;\n    for(iEntry=8; (c = zFile[iFile])!=0 && c!='.'; iFile++){\n      if( sqlite3Isalpha(c) ){\n        zAltEntry[iEntry++] = (char)sqlite3UpperToLower[(unsigned)c];\n      }\n    }\n    memcpy(zAltEntry+iEntry, \"_init\", 6);\n    zEntry = zAltEntry;\n    xInit = (sqlite3_loadext_entry)sqlite3OsDlSym(pVfs, handle, zEntry);\n  }\n  if( xInit==0 ){\n    if( pzErrMsg ){\n      nMsg += strlen(zEntry) + 300;\n      *pzErrMsg = zErrmsg = sqlite3_malloc64(nMsg);\n      if( zErrmsg ){\n        assert( nMsg<0x7fffffff );  /* zErrmsg would be NULL if not so */\n        sqlite3_snprintf((int)nMsg, zErrmsg,\n            \"no entry point [%s] in shared library [%s]\", zEntry, zFile);\n        sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);\n      }\n    }\n    sqlite3OsDlClose(pVfs, handle);\n    sqlite3_free(zAltEntry);\n    return SQLITE_ERROR;\n  }\n  sqlite3_free(zAltEntry);\n  rc = xInit(db, &zErrmsg, &sqlite3Apis);\n  if( rc ){\n    if( rc==SQLITE_OK_LOAD_PERMANENTLY ) return SQLITE_OK;\n    if( pzErrMsg ){\n      *pzErrMsg = sqlite3_mprintf(\"error during initialization: %s\", zErrmsg);\n    }\n    sqlite3_free(zErrmsg);\n    sqlite3OsDlClose(pVfs, handle);\n    return SQLITE_ERROR;\n  }\n\n  /* Append the new shared library handle to the db->aExtension array. */\n  aHandle = sqlite3DbMallocZero(db, sizeof(handle)*(db->nExtension+1));\n  if( aHandle==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  if( db->nExtension>0 ){\n    memcpy(aHandle, db->aExtension, sizeof(handle)*db->nExtension);\n  }\n  sqlite3DbFree(db, db->aExtension);\n  db->aExtension = aHandle;\n\n  db->aExtension[db->nExtension++] = handle;\n  return SQLITE_OK;\n\nextension_not_found:\n  if( pzErrMsg ){\n    nMsg += 300;\n    *pzErrMsg = zErrmsg = sqlite3_malloc64(nMsg);\n    if( zErrmsg ){\n      assert( nMsg<0x7fffffff );  /* zErrmsg would be NULL if not so */\n      sqlite3_snprintf((int)nMsg, zErrmsg,\n          \"unable to open shared library [%.*s]\", SQLITE_MAX_PATHLEN, zFile);\n      sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);\n    }\n  }\n  return SQLITE_ERROR;\n}\nSQLITE_API int sqlite3_load_extension(\n  sqlite3 *db,          /* Load the extension into this database connection */\n  const char *zFile,    /* Name of the shared library containing extension */\n  const char *zProc,    /* Entry point.  Use \"sqlite3_extension_init\" if 0 */\n  char **pzErrMsg       /* Put error message here if not 0 */\n){\n  int rc;\n  sqlite3_mutex_enter(db->mutex);\n  rc = sqlite3LoadExtension(db, zFile, zProc, pzErrMsg);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Call this routine when the database connection is closing in order\n** to clean up loaded extensions\n*/\nSQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){\n  int i;\n  assert( sqlite3_mutex_held(db->mutex) );\n  for(i=0; i<db->nExtension; i++){\n    sqlite3OsDlClose(db->pVfs, db->aExtension[i]);\n  }\n  sqlite3DbFree(db, db->aExtension);\n}\n\n/*\n** Enable or disable extension loading.  Extension loading is disabled by\n** default so as not to open security holes in older applications.\n*/\nSQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( onoff ){\n    db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;\n  }else{\n    db->flags &= ~(u64)(SQLITE_LoadExtension|SQLITE_LoadExtFunc);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n#endif /* !defined(SQLITE_OMIT_LOAD_EXTENSION) */\n\n/*\n** The following object holds the list of automatically loaded\n** extensions.\n**\n** This list is shared across threads.  The SQLITE_MUTEX_STATIC_MAIN\n** mutex must be held while accessing this list.\n*/\ntypedef struct sqlite3AutoExtList sqlite3AutoExtList;\nstatic SQLITE_WSD struct sqlite3AutoExtList {\n  u32 nExt;              /* Number of entries in aExt[] */\n  void (**aExt)(void);   /* Pointers to the extension init functions */\n} sqlite3Autoext = { 0, 0 };\n\n/* The \"wsdAutoext\" macro will resolve to the autoextension\n** state vector.  If writable static data is unsupported on the target,\n** we have to locate the state vector at run-time.  In the more common\n** case where writable static data is supported, wsdStat can refer directly\n** to the \"sqlite3Autoext\" state vector declared above.\n*/\n#ifdef SQLITE_OMIT_WSD\n# define wsdAutoextInit \\\n  sqlite3AutoExtList *x = &GLOBAL(sqlite3AutoExtList,sqlite3Autoext)\n# define wsdAutoext x[0]\n#else\n# define wsdAutoextInit\n# define wsdAutoext sqlite3Autoext\n#endif\n\n\n/*\n** Register a statically linked extension that is automatically\n** loaded by every new database connection.\n*/\nSQLITE_API int sqlite3_auto_extension(\n  void (*xInit)(void)\n){\n  int rc = SQLITE_OK;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( xInit==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n#ifndef SQLITE_OMIT_AUTOINIT\n  rc = sqlite3_initialize();\n  if( rc ){\n    return rc;\n  }else\n#endif\n  {\n    u32 i;\n#if SQLITE_THREADSAFE\n    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n    wsdAutoextInit;\n    sqlite3_mutex_enter(mutex);\n    for(i=0; i<wsdAutoext.nExt; i++){\n      if( wsdAutoext.aExt[i]==xInit ) break;\n    }\n    if( i==wsdAutoext.nExt ){\n      u64 nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);\n      void (**aNew)(void);\n      aNew = sqlite3_realloc64(wsdAutoext.aExt, nByte);\n      if( aNew==0 ){\n        rc = SQLITE_NOMEM_BKPT;\n      }else{\n        wsdAutoext.aExt = aNew;\n        wsdAutoext.aExt[wsdAutoext.nExt] = xInit;\n        wsdAutoext.nExt++;\n      }\n    }\n    sqlite3_mutex_leave(mutex);\n    assert( (rc&0xff)==rc );\n    return rc;\n  }\n}\n\n/*\n** Cancel a prior call to sqlite3_auto_extension.  Remove xInit from the\n** set of routines that is invoked for each new database connection, if it\n** is currently on the list.  If xInit is not on the list, then this\n** routine is a no-op.\n**\n** Return 1 if xInit was found on the list and removed.  Return 0 if xInit\n** was not on the list.\n*/\nSQLITE_API int sqlite3_cancel_auto_extension(\n  void (*xInit)(void)\n){\n#if SQLITE_THREADSAFE\n  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n  int i;\n  int n = 0;\n  wsdAutoextInit;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( xInit==0 ) return 0;\n#endif\n  sqlite3_mutex_enter(mutex);\n  for(i=(int)wsdAutoext.nExt-1; i>=0; i--){\n    if( wsdAutoext.aExt[i]==xInit ){\n      wsdAutoext.nExt--;\n      wsdAutoext.aExt[i] = wsdAutoext.aExt[wsdAutoext.nExt];\n      n++;\n      break;\n    }\n  }\n  sqlite3_mutex_leave(mutex);\n  return n;\n}\n\n/*\n** Reset the automatic extension loading mechanism.\n*/\nSQLITE_API void sqlite3_reset_auto_extension(void){\n#ifndef SQLITE_OMIT_AUTOINIT\n  if( sqlite3_initialize()==SQLITE_OK )\n#endif\n  {\n#if SQLITE_THREADSAFE\n    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n    wsdAutoextInit;\n    sqlite3_mutex_enter(mutex);\n    sqlite3_free(wsdAutoext.aExt);\n    wsdAutoext.aExt = 0;\n    wsdAutoext.nExt = 0;\n    sqlite3_mutex_leave(mutex);\n  }\n}\n\n/*\n** Load all automatic extensions.\n**\n** If anything goes wrong, set an error in the database connection.\n*/\nSQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){\n  u32 i;\n  int go = 1;\n  int rc;\n  sqlite3_loadext_entry xInit;\n\n  wsdAutoextInit;\n  if( wsdAutoext.nExt==0 ){\n    /* Common case: early out without every having to acquire a mutex */\n    return;\n  }\n  for(i=0; go; i++){\n    char *zErrmsg;\n#if SQLITE_THREADSAFE\n    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);\n#endif\n#ifdef SQLITE_OMIT_LOAD_EXTENSION\n    const sqlite3_api_routines *pThunk = 0;\n#else\n    const sqlite3_api_routines *pThunk = &sqlite3Apis;\n#endif\n    sqlite3_mutex_enter(mutex);\n    if( i>=wsdAutoext.nExt ){\n      xInit = 0;\n      go = 0;\n    }else{\n      xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i];\n    }\n    sqlite3_mutex_leave(mutex);\n    zErrmsg = 0;\n    if( xInit && (rc = xInit(db, &zErrmsg, pThunk))!=0 ){\n      sqlite3ErrorWithMsg(db, rc,\n            \"automatic extension loading failed: %s\", zErrmsg);\n      go = 0;\n    }\n    sqlite3_free(zErrmsg);\n  }\n}\n\n/************** End of loadext.c *********************************************/\n/************** Begin file pragma.c ******************************************/\n/*\n** 2003 April 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to implement the PRAGMA command.\n*/\n/* #include \"sqliteInt.h\" */\n\n#if !defined(SQLITE_ENABLE_LOCKING_STYLE)\n#  if defined(__APPLE__)\n#    define SQLITE_ENABLE_LOCKING_STYLE 1\n#  else\n#    define SQLITE_ENABLE_LOCKING_STYLE 0\n#  endif\n#endif\n\n/***************************************************************************\n** The \"pragma.h\" include file is an automatically generated file that\n** that includes the PragType_XXXX macro definitions and the aPragmaName[]\n** object.  This ensures that the aPragmaName[] table is arranged in\n** lexicographical order to facility a binary search of the pragma name.\n** Do not edit pragma.h directly.  Edit and rerun the script in at\n** ../tool/mkpragmatab.tcl. */\n/************** Include pragma.h in the middle of pragma.c *******************/\n/************** Begin file pragma.h ******************************************/\n/* DO NOT EDIT!\n** This file is automatically generated by the script at\n** ../tool/mkpragmatab.tcl.  To update the set of pragmas, edit\n** that script and rerun it.\n*/\n\n/* The various pragma types */\n#define PragTyp_ACTIVATE_EXTENSIONS            0\n#define PragTyp_ANALYSIS_LIMIT                 1\n#define PragTyp_HEADER_VALUE                   2\n#define PragTyp_AUTO_VACUUM                    3\n#define PragTyp_FLAG                           4\n#define PragTyp_BUSY_TIMEOUT                   5\n#define PragTyp_CACHE_SIZE                     6\n#define PragTyp_CACHE_SPILL                    7\n#define PragTyp_CASE_SENSITIVE_LIKE            8\n#define PragTyp_COLLATION_LIST                 9\n#define PragTyp_COMPILE_OPTIONS               10\n#define PragTyp_DATA_STORE_DIRECTORY          11\n#define PragTyp_DATABASE_LIST                 12\n#define PragTyp_DEFAULT_CACHE_SIZE            13\n#define PragTyp_ENCODING                      14\n#define PragTyp_FOREIGN_KEY_CHECK             15\n#define PragTyp_FOREIGN_KEY_LIST              16\n#define PragTyp_FUNCTION_LIST                 17\n#define PragTyp_HARD_HEAP_LIMIT               18\n#define PragTyp_INCREMENTAL_VACUUM            19\n#define PragTyp_INDEX_INFO                    20\n#define PragTyp_INDEX_LIST                    21\n#define PragTyp_INTEGRITY_CHECK               22\n#define PragTyp_JOURNAL_MODE                  23\n#define PragTyp_JOURNAL_SIZE_LIMIT            24\n#define PragTyp_LOCK_PROXY_FILE               25\n#define PragTyp_LOCKING_MODE                  26\n#define PragTyp_PAGE_COUNT                    27\n#define PragTyp_MMAP_SIZE                     28\n#define PragTyp_MODULE_LIST                   29\n#define PragTyp_OPTIMIZE                      30\n#define PragTyp_PAGE_SIZE                     31\n#define PragTyp_PRAGMA_LIST                   32\n#define PragTyp_SECURE_DELETE                 33\n#define PragTyp_SHRINK_MEMORY                 34\n#define PragTyp_SOFT_HEAP_LIMIT               35\n#define PragTyp_SYNCHRONOUS                   36\n#define PragTyp_TABLE_INFO                    37\n#define PragTyp_TABLE_LIST                    38\n#define PragTyp_TEMP_STORE                    39\n#define PragTyp_TEMP_STORE_DIRECTORY          40\n#define PragTyp_THREADS                       41\n#define PragTyp_WAL_AUTOCHECKPOINT            42\n#define PragTyp_WAL_CHECKPOINT                43\n#define PragTyp_LOCK_STATUS                   44\n#define PragTyp_STATS                         45\n\n/* Property flags associated with various pragma. */\n#define PragFlg_NeedSchema 0x01 /* Force schema load before running */\n#define PragFlg_NoColumns  0x02 /* OP_ResultRow called with zero columns */\n#define PragFlg_NoColumns1 0x04 /* zero columns if RHS argument is present */\n#define PragFlg_ReadOnly   0x08 /* Read-only HEADER_VALUE */\n#define PragFlg_Result0    0x10 /* Acts as query when no argument */\n#define PragFlg_Result1    0x20 /* Acts as query when has one argument */\n#define PragFlg_SchemaOpt  0x40 /* Schema restricts name search if present */\n#define PragFlg_SchemaReq  0x80 /* Schema required - \"main\" is default */\n\n/* Names of columns for pragmas that return multi-column result\n** or that return single-column results where the name of the\n** result column is different from the name of the pragma\n*/\nstatic const char *const pragCName[] = {\n  /*   0 */ \"id\",          /* Used by: foreign_key_list */\n  /*   1 */ \"seq\",\n  /*   2 */ \"table\",\n  /*   3 */ \"from\",\n  /*   4 */ \"to\",\n  /*   5 */ \"on_update\",\n  /*   6 */ \"on_delete\",\n  /*   7 */ \"match\",\n  /*   8 */ \"cid\",         /* Used by: table_xinfo */\n  /*   9 */ \"name\",\n  /*  10 */ \"type\",\n  /*  11 */ \"notnull\",\n  /*  12 */ \"dflt_value\",\n  /*  13 */ \"pk\",\n  /*  14 */ \"hidden\",\n                           /* table_info reuses 8 */\n  /*  15 */ \"name\",        /* Used by: function_list */\n  /*  16 */ \"builtin\",\n  /*  17 */ \"type\",\n  /*  18 */ \"enc\",\n  /*  19 */ \"narg\",\n  /*  20 */ \"flags\",\n  /*  21 */ \"schema\",      /* Used by: table_list */\n  /*  22 */ \"name\",\n  /*  23 */ \"type\",\n  /*  24 */ \"ncol\",\n  /*  25 */ \"wr\",\n  /*  26 */ \"strict\",\n  /*  27 */ \"seqno\",       /* Used by: index_xinfo */\n  /*  28 */ \"cid\",\n  /*  29 */ \"name\",\n  /*  30 */ \"desc\",\n  /*  31 */ \"coll\",\n  /*  32 */ \"key\",\n  /*  33 */ \"seq\",         /* Used by: index_list */\n  /*  34 */ \"name\",\n  /*  35 */ \"unique\",\n  /*  36 */ \"origin\",\n  /*  37 */ \"partial\",\n  /*  38 */ \"tbl\",         /* Used by: stats */\n  /*  39 */ \"idx\",\n  /*  40 */ \"wdth\",\n  /*  41 */ \"hght\",\n  /*  42 */ \"flgs\",\n  /*  43 */ \"table\",       /* Used by: foreign_key_check */\n  /*  44 */ \"rowid\",\n  /*  45 */ \"parent\",\n  /*  46 */ \"fkid\",\n  /*  47 */ \"busy\",        /* Used by: wal_checkpoint */\n  /*  48 */ \"log\",\n  /*  49 */ \"checkpointed\",\n  /*  50 */ \"seq\",         /* Used by: database_list */\n  /*  51 */ \"name\",\n  /*  52 */ \"file\",\n                           /* index_info reuses 27 */\n  /*  53 */ \"database\",    /* Used by: lock_status */\n  /*  54 */ \"status\",\n                           /* collation_list reuses 33 */\n  /*  55 */ \"cache_size\",  /* Used by: default_cache_size */\n                           /* module_list pragma_list reuses 9 */\n  /*  56 */ \"timeout\",     /* Used by: busy_timeout */\n};\n\n/* Definitions of all built-in pragmas */\ntypedef struct PragmaName {\n  const char *const zName; /* Name of pragma */\n  u8 ePragTyp;             /* PragTyp_XXX value */\n  u8 mPragFlg;             /* Zero or more PragFlg_XXX values */\n  u8 iPragCName;           /* Start of column names in pragCName[] */\n  u8 nPragCName;           /* Num of col names. 0 means use pragma name */\n  u64 iArg;                /* Extra argument */\n} PragmaName;\nstatic const PragmaName aPragmaName[] = {\n#if defined(SQLITE_ENABLE_CEROD)\n {/* zName:     */ \"activate_extensions\",\n  /* ePragTyp:  */ PragTyp_ACTIVATE_EXTENSIONS,\n  /* ePragFlg:  */ 0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n {/* zName:     */ \"analysis_limit\",\n  /* ePragTyp:  */ PragTyp_ANALYSIS_LIMIT,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)\n {/* zName:     */ \"application_id\",\n  /* ePragTyp:  */ PragTyp_HEADER_VALUE,\n  /* ePragFlg:  */ PragFlg_NoColumns1|PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ BTREE_APPLICATION_ID },\n#endif\n#if !defined(SQLITE_OMIT_AUTOVACUUM)\n {/* zName:     */ \"auto_vacuum\",\n  /* ePragTyp:  */ PragTyp_AUTO_VACUUM,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if !defined(SQLITE_OMIT_AUTOMATIC_INDEX)\n {/* zName:     */ \"automatic_index\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_AutoIndex },\n#endif\n#endif\n {/* zName:     */ \"busy_timeout\",\n  /* ePragTyp:  */ PragTyp_BUSY_TIMEOUT,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 56, 1,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"cache_size\",\n  /* ePragTyp:  */ PragTyp_CACHE_SIZE,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"cache_spill\",\n  /* ePragTyp:  */ PragTyp_CACHE_SPILL,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA)\n {/* zName:     */ \"case_sensitive_like\",\n  /* ePragTyp:  */ PragTyp_CASE_SENSITIVE_LIKE,\n  /* ePragFlg:  */ PragFlg_NoColumns,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n {/* zName:     */ \"cell_size_check\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_CellSizeCk },\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"checkpoint_fullfsync\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_CkptFullFSync },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n {/* zName:     */ \"collation_list\",\n  /* ePragTyp:  */ PragTyp_COLLATION_LIST,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 33, 2,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)\n {/* zName:     */ \"compile_options\",\n  /* ePragTyp:  */ PragTyp_COMPILE_OPTIONS,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"count_changes\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_CountRows },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_OS_WIN\n {/* zName:     */ \"data_store_directory\",\n  /* ePragTyp:  */ PragTyp_DATA_STORE_DIRECTORY,\n  /* ePragFlg:  */ PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)\n {/* zName:     */ \"data_version\",\n  /* ePragTyp:  */ PragTyp_HEADER_VALUE,\n  /* ePragFlg:  */ PragFlg_ReadOnly|PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ BTREE_DATA_VERSION },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n {/* zName:     */ \"database_list\",\n  /* ePragTyp:  */ PragTyp_DATABASE_LIST,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 50, 3,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)\n {/* zName:     */ \"default_cache_size\",\n  /* ePragTyp:  */ PragTyp_DEFAULT_CACHE_SIZE,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 55, 1,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)\n {/* zName:     */ \"defer_foreign_keys\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_DeferFKs },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"empty_result_callbacks\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_NullCallback },\n#endif\n#if !defined(SQLITE_OMIT_UTF16)\n {/* zName:     */ \"encoding\",\n  /* ePragTyp:  */ PragTyp_ENCODING,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)\n {/* zName:     */ \"foreign_key_check\",\n  /* ePragTyp:  */ PragTyp_FOREIGN_KEY_CHECK,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 43, 4,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FOREIGN_KEY)\n {/* zName:     */ \"foreign_key_list\",\n  /* ePragTyp:  */ PragTyp_FOREIGN_KEY_LIST,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 0, 8,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)\n {/* zName:     */ \"foreign_keys\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_ForeignKeys },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)\n {/* zName:     */ \"freelist_count\",\n  /* ePragTyp:  */ PragTyp_HEADER_VALUE,\n  /* ePragFlg:  */ PragFlg_ReadOnly|PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ BTREE_FREE_PAGE_COUNT },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"full_column_names\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_FullColNames },\n {/* zName:     */ \"fullfsync\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_FullFSync },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)\n {/* zName:     */ \"function_list\",\n  /* ePragTyp:  */ PragTyp_FUNCTION_LIST,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 15, 6,\n  /* iArg:      */ 0 },\n#endif\n#endif\n {/* zName:     */ \"hard_heap_limit\",\n  /* ePragTyp:  */ PragTyp_HARD_HEAP_LIMIT,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if !defined(SQLITE_OMIT_CHECK)\n {/* zName:     */ \"ignore_check_constraints\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_IgnoreChecks },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_AUTOVACUUM)\n {/* zName:     */ \"incremental_vacuum\",\n  /* ePragTyp:  */ PragTyp_INCREMENTAL_VACUUM,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_NoColumns,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n {/* zName:     */ \"index_info\",\n  /* ePragTyp:  */ PragTyp_INDEX_INFO,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 27, 3,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"index_list\",\n  /* ePragTyp:  */ PragTyp_INDEX_LIST,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 33, 5,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"index_xinfo\",\n  /* ePragTyp:  */ PragTyp_INDEX_INFO,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 27, 6,\n  /* iArg:      */ 1 },\n#endif\n#if !defined(SQLITE_OMIT_INTEGRITY_CHECK)\n {/* zName:     */ \"integrity_check\",\n  /* ePragTyp:  */ PragTyp_INTEGRITY_CHECK,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"journal_mode\",\n  /* ePragTyp:  */ PragTyp_JOURNAL_MODE,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"journal_size_limit\",\n  /* ePragTyp:  */ PragTyp_JOURNAL_SIZE_LIMIT,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"legacy_alter_table\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_LegacyAlter },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && SQLITE_ENABLE_LOCKING_STYLE\n {/* zName:     */ \"lock_proxy_file\",\n  /* ePragTyp:  */ PragTyp_LOCK_PROXY_FILE,\n  /* ePragFlg:  */ PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n {/* zName:     */ \"lock_status\",\n  /* ePragTyp:  */ PragTyp_LOCK_STATUS,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 53, 2,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"locking_mode\",\n  /* ePragTyp:  */ PragTyp_LOCKING_MODE,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"max_page_count\",\n  /* ePragTyp:  */ PragTyp_PAGE_COUNT,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"mmap_size\",\n  /* ePragTyp:  */ PragTyp_MMAP_SIZE,\n  /* ePragFlg:  */ 0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n#if !defined(SQLITE_OMIT_VIRTUALTABLE)\n#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)\n {/* zName:     */ \"module_list\",\n  /* ePragTyp:  */ PragTyp_MODULE_LIST,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 9, 1,\n  /* iArg:      */ 0 },\n#endif\n#endif\n#endif\n {/* zName:     */ \"optimize\",\n  /* ePragTyp:  */ PragTyp_OPTIMIZE,\n  /* ePragFlg:  */ PragFlg_Result1|PragFlg_NeedSchema,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"page_count\",\n  /* ePragTyp:  */ PragTyp_PAGE_COUNT,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"page_size\",\n  /* ePragTyp:  */ PragTyp_PAGE_SIZE,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if defined(SQLITE_DEBUG)\n {/* zName:     */ \"parser_trace\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_ParserTrace },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_INTROSPECTION_PRAGMAS)\n {/* zName:     */ \"pragma_list\",\n  /* ePragTyp:  */ PragTyp_PRAGMA_LIST,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 9, 1,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"query_only\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_QueryOnly },\n#endif\n#if !defined(SQLITE_OMIT_INTEGRITY_CHECK)\n {/* zName:     */ \"quick_check\",\n  /* ePragTyp:  */ PragTyp_INTEGRITY_CHECK,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"read_uncommitted\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_ReadUncommit },\n {/* zName:     */ \"recursive_triggers\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_RecTriggers },\n {/* zName:     */ \"reverse_unordered_selects\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_ReverseOrder },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)\n {/* zName:     */ \"schema_version\",\n  /* ePragTyp:  */ PragTyp_HEADER_VALUE,\n  /* ePragFlg:  */ PragFlg_NoColumns1|PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ BTREE_SCHEMA_VERSION },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"secure_delete\",\n  /* ePragTyp:  */ PragTyp_SECURE_DELETE,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"short_column_names\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_ShortColNames },\n#endif\n {/* zName:     */ \"shrink_memory\",\n  /* ePragTyp:  */ PragTyp_SHRINK_MEMORY,\n  /* ePragFlg:  */ PragFlg_NoColumns,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"soft_heap_limit\",\n  /* ePragTyp:  */ PragTyp_SOFT_HEAP_LIMIT,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if defined(SQLITE_DEBUG)\n {/* zName:     */ \"sql_trace\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_SqlTrace },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) && defined(SQLITE_DEBUG)\n {/* zName:     */ \"stats\",\n  /* ePragTyp:  */ PragTyp_STATS,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq,\n  /* ColNames:  */ 38, 5,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"synchronous\",\n  /* ePragTyp:  */ PragTyp_SYNCHRONOUS,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result0|PragFlg_SchemaReq|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)\n {/* zName:     */ \"table_info\",\n  /* ePragTyp:  */ PragTyp_TABLE_INFO,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 8, 6,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"table_list\",\n  /* ePragTyp:  */ PragTyp_TABLE_LIST,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1,\n  /* ColNames:  */ 21, 6,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"table_xinfo\",\n  /* ePragTyp:  */ PragTyp_TABLE_INFO,\n  /* ePragFlg:  */ PragFlg_NeedSchema|PragFlg_Result1|PragFlg_SchemaOpt,\n  /* ColNames:  */ 8, 7,\n  /* iArg:      */ 1 },\n#endif\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n {/* zName:     */ \"temp_store\",\n  /* ePragTyp:  */ PragTyp_TEMP_STORE,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"temp_store_directory\",\n  /* ePragTyp:  */ PragTyp_TEMP_STORE_DIRECTORY,\n  /* ePragFlg:  */ PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#endif\n {/* zName:     */ \"threads\",\n  /* ePragTyp:  */ PragTyp_THREADS,\n  /* ePragFlg:  */ PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"trusted_schema\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_TrustedSchema },\n#endif\n#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)\n {/* zName:     */ \"user_version\",\n  /* ePragTyp:  */ PragTyp_HEADER_VALUE,\n  /* ePragFlg:  */ PragFlg_NoColumns1|PragFlg_Result0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ BTREE_USER_VERSION },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n#if defined(SQLITE_DEBUG)\n {/* zName:     */ \"vdbe_addoptrace\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_VdbeAddopTrace },\n {/* zName:     */ \"vdbe_debug\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_SqlTrace|SQLITE_VdbeListing|SQLITE_VdbeTrace },\n {/* zName:     */ \"vdbe_eqp\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_VdbeEQP },\n {/* zName:     */ \"vdbe_listing\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_VdbeListing },\n {/* zName:     */ \"vdbe_trace\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_VdbeTrace },\n#endif\n#endif\n#if !defined(SQLITE_OMIT_WAL)\n {/* zName:     */ \"wal_autocheckpoint\",\n  /* ePragTyp:  */ PragTyp_WAL_AUTOCHECKPOINT,\n  /* ePragFlg:  */ 0,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ 0 },\n {/* zName:     */ \"wal_checkpoint\",\n  /* ePragTyp:  */ PragTyp_WAL_CHECKPOINT,\n  /* ePragFlg:  */ PragFlg_NeedSchema,\n  /* ColNames:  */ 47, 3,\n  /* iArg:      */ 0 },\n#endif\n#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)\n {/* zName:     */ \"writable_schema\",\n  /* ePragTyp:  */ PragTyp_FLAG,\n  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,\n  /* ColNames:  */ 0, 0,\n  /* iArg:      */ SQLITE_WriteSchema|SQLITE_NoSchemaError },\n#endif\n};\n/* Number of pragmas: 68 on by default, 78 total. */\n\n/************** End of pragma.h **********************************************/\n/************** Continuing where we left off in pragma.c *********************/\n\n/*\n** When the 0x10 bit of PRAGMA optimize is set, any ANALYZE commands\n** will be run with an analysis_limit set to the lessor of the value of\n** the following macro or to the actual analysis_limit if it is non-zero,\n** in order to prevent PRAGMA optimize from running for too long.\n**\n** The value of 2000 is chosen empirically so that the worst-case run-time\n** for PRAGMA optimize does not exceed 100 milliseconds against a variety\n** of test databases on a RaspberryPI-4 compiled using -Os and without\n** -DSQLITE_DEBUG.  Of course, your mileage may vary.  For the purpose of\n** this paragraph, \"worst-case\" means that ANALYZE ends up being\n** run on every table in the database.  The worst case typically only\n** happens if PRAGMA optimize is run on a database file for which ANALYZE\n** has not been previously run and the 0x10000 flag is included so that\n** all tables are analyzed.  The usual case for PRAGMA optimize is that\n** no ANALYZE commands will be run at all, or if any ANALYZE happens it\n** will be against a single table, so that expected timing for PRAGMA\n** optimize on a PI-4 is more like 1 millisecond or less with the 0x10000\n** flag or less than 100 microseconds without the 0x10000 flag.\n**\n** An analysis limit of 2000 is almost always sufficient for the query\n** planner to fully characterize an index.  The additional accuracy from\n** a larger analysis is not usually helpful.\n*/\n#ifndef SQLITE_DEFAULT_OPTIMIZE_LIMIT\n# define SQLITE_DEFAULT_OPTIMIZE_LIMIT 2000\n#endif\n\n/*\n** Interpret the given string as a safety level.  Return 0 for OFF,\n** 1 for ON or NORMAL, 2 for FULL, and 3 for EXTRA.  Return 1 for an empty or\n** unrecognized string argument.  The FULL and EXTRA option is disallowed\n** if the omitFull parameter it 1.\n**\n** Note that the values returned are one less that the values that\n** should be passed into sqlite3BtreeSetSafetyLevel().  The is done\n** to support legacy SQL code.  The safety level used to be boolean\n** and older scripts may have used numbers 0 for OFF and 1 for ON.\n*/\nstatic u8 getSafetyLevel(const char *z, int omitFull, u8 dflt){\n                             /* 123456789 123456789 123 */\n  static const char zText[] = \"onoffalseyestruextrafull\";\n  static const u8 iOffset[] = {0, 1, 2,  4,    9,  12,  15,   20};\n  static const u8 iLength[] = {2, 2, 3,  5,    3,   4,   5,    4};\n  static const u8 iValue[] =  {1, 0, 0,  0,    1,   1,   3,    2};\n                            /* on no off false yes true extra full */\n  int i, n;\n  if( sqlite3Isdigit(*z) ){\n    return (u8)sqlite3Atoi(z);\n  }\n  n = sqlite3Strlen30(z);\n  for(i=0; i<ArraySize(iLength); i++){\n    if( iLength[i]==n && sqlite3StrNICmp(&zText[iOffset[i]],z,n)==0\n     && (!omitFull || iValue[i]<=1)\n    ){\n      return iValue[i];\n    }\n  }\n  return dflt;\n}\n\n/*\n** Interpret the given string as a boolean value.\n*/\nSQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z, u8 dflt){\n  return getSafetyLevel(z,1,dflt)!=0;\n}\n\n/* The sqlite3GetBoolean() function is used by other modules but the\n** remainder of this file is specific to PRAGMA processing.  So omit\n** the rest of the file if PRAGMAs are omitted from the build.\n*/\n#if !defined(SQLITE_OMIT_PRAGMA)\n\n/*\n** Interpret the given string as a locking mode value.\n*/\nstatic int getLockingMode(const char *z){\n  if( z ){\n    if( 0==sqlite3StrICmp(z, \"exclusive\") ) return PAGER_LOCKINGMODE_EXCLUSIVE;\n    if( 0==sqlite3StrICmp(z, \"normal\") ) return PAGER_LOCKINGMODE_NORMAL;\n  }\n  return PAGER_LOCKINGMODE_QUERY;\n}\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n/*\n** Interpret the given string as an auto-vacuum mode value.\n**\n** The following strings, \"none\", \"full\" and \"incremental\" are\n** acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.\n*/\nstatic int getAutoVacuum(const char *z){\n  int i;\n  if( 0==sqlite3StrICmp(z, \"none\") ) return BTREE_AUTOVACUUM_NONE;\n  if( 0==sqlite3StrICmp(z, \"full\") ) return BTREE_AUTOVACUUM_FULL;\n  if( 0==sqlite3StrICmp(z, \"incremental\") ) return BTREE_AUTOVACUUM_INCR;\n  i = sqlite3Atoi(z);\n  return (u8)((i>=0&&i<=2)?i:0);\n}\n#endif /* ifndef SQLITE_OMIT_AUTOVACUUM */\n\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\n/*\n** Interpret the given string as a temp db location. Return 1 for file\n** backed temporary databases, 2 for the Red-Black tree in memory database\n** and 0 to use the compile-time default.\n*/\nstatic int getTempStore(const char *z){\n  if( z[0]>='0' && z[0]<='2' ){\n    return z[0] - '0';\n  }else if( sqlite3StrICmp(z, \"file\")==0 ){\n    return 1;\n  }else if( sqlite3StrICmp(z, \"memory\")==0 ){\n    return 2;\n  }else{\n    return 0;\n  }\n}\n#endif /* SQLITE_PAGER_PRAGMAS */\n\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\n/*\n** Invalidate temp storage, either when the temp storage is changed\n** from default, or when 'file' and the temp_store_directory has changed\n*/\nstatic int invalidateTempStorage(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  if( db->aDb[1].pBt!=0 ){\n    if( !db->autoCommit\n     || sqlite3BtreeTxnState(db->aDb[1].pBt)!=SQLITE_TXN_NONE\n    ){\n      sqlite3ErrorMsg(pParse, \"temporary storage cannot be changed \"\n        \"from within a transaction\");\n      return SQLITE_ERROR;\n    }\n    sqlite3BtreeClose(db->aDb[1].pBt);\n    db->aDb[1].pBt = 0;\n    sqlite3ResetAllSchemasOfConnection(db);\n  }\n  return SQLITE_OK;\n}\n#endif /* SQLITE_PAGER_PRAGMAS */\n\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\n/*\n** If the TEMP database is open, close it and mark the database schema\n** as needing reloading.  This must be done when using the SQLITE_TEMP_STORE\n** or DEFAULT_TEMP_STORE pragmas.\n*/\nstatic int changeTempStorage(Parse *pParse, const char *zStorageType){\n  int ts = getTempStore(zStorageType);\n  sqlite3 *db = pParse->db;\n  if( db->temp_store==ts ) return SQLITE_OK;\n  if( invalidateTempStorage( pParse ) != SQLITE_OK ){\n    return SQLITE_ERROR;\n  }\n  db->temp_store = (u8)ts;\n  return SQLITE_OK;\n}\n#endif /* SQLITE_PAGER_PRAGMAS */\n\n/*\n** Set result column names for a pragma.\n*/\nstatic void setPragmaResultColumnNames(\n  Vdbe *v,                     /* The query under construction */\n  const PragmaName *pPragma    /* The pragma */\n){\n  u8 n = pPragma->nPragCName;\n  sqlite3VdbeSetNumCols(v, n==0 ? 1 : n);\n  if( n==0 ){\n    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, pPragma->zName, SQLITE_STATIC);\n  }else{\n    int i, j;\n    for(i=0, j=pPragma->iPragCName; i<n; i++, j++){\n      sqlite3VdbeSetColName(v, i, COLNAME_NAME, pragCName[j], SQLITE_STATIC);\n    }\n  }\n}\n\n/*\n** Generate code to return a single integer value.\n*/\nstatic void returnSingleInt(Vdbe *v, i64 value){\n  sqlite3VdbeAddOp4Dup8(v, OP_Int64, 0, 1, 0, (const u8*)&value, P4_INT64);\n  sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);\n}\n\n/*\n** Generate code to return a single text value.\n*/\nstatic void returnSingleText(\n  Vdbe *v,                /* Prepared statement under construction */\n  const char *zValue      /* Value to be returned */\n){\n  if( zValue ){\n    sqlite3VdbeLoadString(v, 1, (const char*)zValue);\n    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);\n  }\n}\n\n\n/*\n** Set the safety_level and pager flags for pager iDb.  Or if iDb<0\n** set these values for all pagers.\n*/\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\nstatic void setAllPagerFlags(sqlite3 *db){\n  if( db->autoCommit ){\n    Db *pDb = db->aDb;\n    int n = db->nDb;\n    assert( SQLITE_FullFSync==PAGER_FULLFSYNC );\n    assert( SQLITE_CkptFullFSync==PAGER_CKPT_FULLFSYNC );\n    assert( SQLITE_CacheSpill==PAGER_CACHESPILL );\n    assert( (PAGER_FULLFSYNC | PAGER_CKPT_FULLFSYNC | PAGER_CACHESPILL)\n             ==  PAGER_FLAGS_MASK );\n    assert( (pDb->safety_level & PAGER_SYNCHRONOUS_MASK)==pDb->safety_level );\n    while( (n--) > 0 ){\n      if( pDb->pBt ){\n        sqlite3BtreeSetPagerFlags(pDb->pBt,\n                 pDb->safety_level | (db->flags & PAGER_FLAGS_MASK) );\n      }\n      pDb++;\n    }\n  }\n}\n#else\n# define setAllPagerFlags(X)  /* no-op */\n#endif\n\n\n/*\n** Return a human-readable name for a constraint resolution action.\n*/\n#ifndef SQLITE_OMIT_FOREIGN_KEY\nstatic const char *actionName(u8 action){\n  const char *zName;\n  switch( action ){\n    case OE_SetNull:  zName = \"SET NULL\";        break;\n    case OE_SetDflt:  zName = \"SET DEFAULT\";     break;\n    case OE_Cascade:  zName = \"CASCADE\";         break;\n    case OE_Restrict: zName = \"RESTRICT\";        break;\n    default:          zName = \"NO ACTION\";\n                      assert( action==OE_None ); break;\n  }\n  return zName;\n}\n#endif\n\n\n/*\n** Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants\n** defined in pager.h. This function returns the associated lowercase\n** journal-mode name.\n*/\nSQLITE_PRIVATE const char *sqlite3JournalModename(int eMode){\n  static char * const azModeName[] = {\n    \"delete\", \"persist\", \"off\", \"truncate\", \"memory\"\n#ifndef SQLITE_OMIT_WAL\n     , \"wal\"\n#endif\n  };\n  assert( PAGER_JOURNALMODE_DELETE==0 );\n  assert( PAGER_JOURNALMODE_PERSIST==1 );\n  assert( PAGER_JOURNALMODE_OFF==2 );\n  assert( PAGER_JOURNALMODE_TRUNCATE==3 );\n  assert( PAGER_JOURNALMODE_MEMORY==4 );\n  assert( PAGER_JOURNALMODE_WAL==5 );\n  assert( eMode>=0 && eMode<=ArraySize(azModeName) );\n\n  if( eMode==ArraySize(azModeName) ) return 0;\n  return azModeName[eMode];\n}\n\n/*\n** Locate a pragma in the aPragmaName[] array.\n*/\nstatic const PragmaName *pragmaLocate(const char *zName){\n  int upr, lwr, mid = 0, rc;\n  lwr = 0;\n  upr = ArraySize(aPragmaName)-1;\n  while( lwr<=upr ){\n    mid = (lwr+upr)/2;\n    rc = sqlite3_stricmp(zName, aPragmaName[mid].zName);\n    if( rc==0 ) break;\n    if( rc<0 ){\n      upr = mid - 1;\n    }else{\n      lwr = mid + 1;\n    }\n  }\n  return lwr>upr ? 0 : &aPragmaName[mid];\n}\n\n/*\n** Create zero or more entries in the output for the SQL functions\n** defined by FuncDef p.\n*/\nstatic void pragmaFunclistLine(\n  Vdbe *v,               /* The prepared statement being created */\n  FuncDef *p,            /* A particular function definition */\n  int isBuiltin,         /* True if this is a built-in function */\n  int showInternFuncs    /* True if showing internal functions */\n){\n  u32 mask =\n      SQLITE_DETERMINISTIC |\n      SQLITE_DIRECTONLY |\n      SQLITE_SUBTYPE |\n      SQLITE_INNOCUOUS |\n      SQLITE_FUNC_INTERNAL\n  ;\n  if( showInternFuncs ) mask = 0xffffffff;\n  for(; p; p=p->pNext){\n    const char *zType;\n    static const char *azEnc[] = { 0, \"utf8\", \"utf16le\", \"utf16be\" };\n\n    assert( SQLITE_FUNC_ENCMASK==0x3 );\n    assert( strcmp(azEnc[SQLITE_UTF8],\"utf8\")==0 );\n    assert( strcmp(azEnc[SQLITE_UTF16LE],\"utf16le\")==0 );\n    assert( strcmp(azEnc[SQLITE_UTF16BE],\"utf16be\")==0 );\n\n    if( p->xSFunc==0 ) continue;\n    if( (p->funcFlags & SQLITE_FUNC_INTERNAL)!=0\n     && showInternFuncs==0\n    ){\n      continue;\n    }\n    if( p->xValue!=0 ){\n      zType = \"w\";\n    }else if( p->xFinalize!=0 ){\n      zType = \"a\";\n    }else{\n      zType = \"s\";\n    }\n    sqlite3VdbeMultiLoad(v, 1, \"sissii\",\n       p->zName, isBuiltin,\n       zType, azEnc[p->funcFlags&SQLITE_FUNC_ENCMASK],\n       p->nArg,\n       (p->funcFlags & mask) ^ SQLITE_INNOCUOUS\n    );\n  }\n}\n\n\n/*\n** Helper subroutine for PRAGMA integrity_check:\n**\n** Generate code to output a single-column result row with a value of the\n** string held in register 3.  Decrement the result count in register 1\n** and halt if the maximum number of result rows have been issued.\n*/\nstatic int integrityCheckResultRow(Vdbe *v){\n  int addr;\n  sqlite3VdbeAddOp2(v, OP_ResultRow, 3, 1);\n  addr = sqlite3VdbeAddOp3(v, OP_IfPos, 1, sqlite3VdbeCurrentAddr(v)+2, 1);\n  VdbeCoverage(v);\n  sqlite3VdbeAddOp0(v, OP_Halt);\n  return addr;\n}\n\n/*\n** Should table pTab be skipped when doing an integrity_check?\n** Return true or false.\n**\n** If pObjTab is not null, the return true if pTab matches pObjTab.\n**\n** If pObjTab is null, then return true only if pTab is an imposter table.\n*/\nstatic int tableSkipIntegrityCheck(const Table *pTab, const Table *pObjTab){\n  if( pObjTab ){\n    return pTab!=pObjTab;\n  }else{\n    return (pTab->tabFlags & TF_Imposter)!=0;\n  }\n}\n\n/*\n** Process a pragma statement.\n**\n** Pragmas are of this form:\n**\n**      PRAGMA [schema.]id [= value]\n**\n** The identifier might also be a string.  The value is a string, and\n** identifier, or a number.  If minusFlag is true, then the value is\n** a number that was preceded by a minus sign.\n**\n** If the left side is \"database.id\" then pId1 is the database name\n** and pId2 is the id.  If the left side is just \"id\" then pId1 is the\n** id and pId2 is any empty string.\n*/\nSQLITE_PRIVATE void sqlite3Pragma(\n  Parse *pParse,\n  Token *pId1,        /* First part of [schema.]id field */\n  Token *pId2,        /* Second part of [schema.]id field, or NULL */\n  Token *pValue,      /* Token for <value>, or NULL */\n  int minusFlag       /* True if a '-' sign preceded <value> */\n){\n  char *zLeft = 0;       /* Nul-terminated UTF-8 string <id> */\n  char *zRight = 0;      /* Nul-terminated UTF-8 string <value>, or NULL */\n  const char *zDb = 0;   /* The database name */\n  Token *pId;            /* Pointer to <id> token */\n  char *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */\n  int iDb;               /* Database index for <database> */\n  int rc;                      /* return value form SQLITE_FCNTL_PRAGMA */\n  sqlite3 *db = pParse->db;    /* The database connection */\n  Db *pDb;                     /* The specific database being pragmaed */\n  Vdbe *v = sqlite3GetVdbe(pParse);  /* Prepared statement */\n  const PragmaName *pPragma;   /* The pragma */\n\n  if( v==0 ) return;\n  sqlite3VdbeRunOnlyOnce(v);\n  pParse->nMem = 2;\n\n  /* Interpret the [schema.] part of the pragma statement. iDb is the\n  ** index of the database this pragma is being applied to in db.aDb[]. */\n  iDb = sqlite3TwoPartName(pParse, pId1, pId2, &pId);\n  if( iDb<0 ) return;\n  pDb = &db->aDb[iDb];\n\n  /* If the temp database has been explicitly named as part of the\n  ** pragma, make sure it is open.\n  */\n  if( iDb==1 && sqlite3OpenTempDatabase(pParse) ){\n    return;\n  }\n\n  zLeft = sqlite3NameFromToken(db, pId);\n  if( !zLeft ) return;\n  if( minusFlag ){\n    zRight = sqlite3MPrintf(db, \"-%T\", pValue);\n  }else{\n    zRight = sqlite3NameFromToken(db, pValue);\n  }\n\n  assert( pId2 );\n  zDb = pId2->n>0 ? pDb->zDbSName : 0;\n  if( sqlite3AuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) ){\n    goto pragma_out;\n  }\n\n  /* Send an SQLITE_FCNTL_PRAGMA file-control to the underlying VFS\n  ** connection.  If it returns SQLITE_OK, then assume that the VFS\n  ** handled the pragma and generate a no-op prepared statement.\n  **\n  ** IMPLEMENTATION-OF: R-12238-55120 Whenever a PRAGMA statement is parsed,\n  ** an SQLITE_FCNTL_PRAGMA file control is sent to the open sqlite3_file\n  ** object corresponding to the database file to which the pragma\n  ** statement refers.\n  **\n  ** IMPLEMENTATION-OF: R-29875-31678 The argument to the SQLITE_FCNTL_PRAGMA\n  ** file control is an array of pointers to strings (char**) in which the\n  ** second element of the array is the name of the pragma and the third\n  ** element is the argument to the pragma or NULL if the pragma has no\n  ** argument.\n  */\n  aFcntl[0] = 0;\n  aFcntl[1] = zLeft;\n  aFcntl[2] = zRight;\n  aFcntl[3] = 0;\n  db->busyHandler.nBusy = 0;\n  rc = sqlite3_file_control(db, zDb, SQLITE_FCNTL_PRAGMA, (void*)aFcntl);\n  if( rc==SQLITE_OK ){\n    sqlite3VdbeSetNumCols(v, 1);\n    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, aFcntl[0], SQLITE_TRANSIENT);\n    returnSingleText(v, aFcntl[0]);\n    sqlite3_free(aFcntl[0]);\n    goto pragma_out;\n  }\n  if( rc!=SQLITE_NOTFOUND ){\n    if( aFcntl[0] ){\n      sqlite3ErrorMsg(pParse, \"%s\", aFcntl[0]);\n      sqlite3_free(aFcntl[0]);\n    }\n    pParse->nErr++;\n    pParse->rc = rc;\n    goto pragma_out;\n  }\n\n  /* Locate the pragma in the lookup table */\n  pPragma = pragmaLocate(zLeft);\n  if( pPragma==0 ){\n    /* IMP: R-43042-22504 No error messages are generated if an\n    ** unknown pragma is issued. */\n    goto pragma_out;\n  }\n\n  /* Make sure the database schema is loaded if the pragma requires that */\n  if( (pPragma->mPragFlg & PragFlg_NeedSchema)!=0 ){\n    if( sqlite3ReadSchema(pParse) ) goto pragma_out;\n  }\n\n  /* Register the result column names for pragmas that return results */\n  if( (pPragma->mPragFlg & PragFlg_NoColumns)==0\n   && ((pPragma->mPragFlg & PragFlg_NoColumns1)==0 || zRight==0)\n  ){\n    setPragmaResultColumnNames(v, pPragma);\n  }\n\n  /* Jump to the appropriate pragma handler */\n  switch( pPragma->ePragTyp ){\n\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)\n  /*\n  **  PRAGMA [schema.]default_cache_size\n  **  PRAGMA [schema.]default_cache_size=N\n  **\n  ** The first form reports the current persistent setting for the\n  ** page cache size.  The value returned is the maximum number of\n  ** pages in the page cache.  The second form sets both the current\n  ** page cache size value and the persistent page cache size value\n  ** stored in the database file.\n  **\n  ** Older versions of SQLite would set the default cache size to a\n  ** negative number to indicate synchronous=OFF.  These days, synchronous\n  ** is always on by default regardless of the sign of the default cache\n  ** size.  But continue to take the absolute value of the default cache\n  ** size of historical compatibility.\n  */\n  case PragTyp_DEFAULT_CACHE_SIZE: {\n    static const int iLn = VDBE_OFFSET_LINENO(2);\n    static const VdbeOpList getCacheSize[] = {\n      { OP_Transaction, 0, 0,        0},                         /* 0 */\n      { OP_ReadCookie,  0, 1,        BTREE_DEFAULT_CACHE_SIZE},  /* 1 */\n      { OP_IfPos,       1, 8,        0},\n      { OP_Integer,     0, 2,        0},\n      { OP_Subtract,    1, 2,        1},\n      { OP_IfPos,       1, 8,        0},\n      { OP_Integer,     0, 1,        0},                         /* 6 */\n      { OP_Noop,        0, 0,        0},\n      { OP_ResultRow,   1, 1,        0},\n    };\n    VdbeOp *aOp;\n    sqlite3VdbeUsesBtree(v, iDb);\n    if( !zRight ){\n      pParse->nMem += 2;\n      sqlite3VdbeVerifyNoMallocRequired(v, ArraySize(getCacheSize));\n      aOp = sqlite3VdbeAddOpList(v, ArraySize(getCacheSize), getCacheSize, iLn);\n      if( ONLY_IF_REALLOC_STRESS(aOp==0) ) break;\n      aOp[0].p1 = iDb;\n      aOp[1].p1 = iDb;\n      aOp[6].p1 = SQLITE_DEFAULT_CACHE_SIZE;\n    }else{\n      int size = sqlite3AbsInt32(sqlite3Atoi(zRight));\n      sqlite3BeginWriteOperation(pParse, 0, iDb);\n      sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, size);\n      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n      pDb->pSchema->cache_size = size;\n      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);\n    }\n    break;\n  }\n#endif /* !SQLITE_OMIT_PAGER_PRAGMAS && !SQLITE_OMIT_DEPRECATED */\n\n#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)\n  /*\n  **  PRAGMA [schema.]page_size\n  **  PRAGMA [schema.]page_size=N\n  **\n  ** The first form reports the current setting for the\n  ** database page size in bytes.  The second form sets the\n  ** database page size value.  The value can only be set if\n  ** the database has not yet been created.\n  */\n  case PragTyp_PAGE_SIZE: {\n    Btree *pBt = pDb->pBt;\n    assert( pBt!=0 );\n    if( !zRight ){\n      int size = ALWAYS(pBt) ? sqlite3BtreeGetPageSize(pBt) : 0;\n      returnSingleInt(v, size);\n    }else{\n      /* Malloc may fail when setting the page-size, as there is an internal\n      ** buffer that the pager module resizes using sqlite3_realloc().\n      */\n      db->nextPagesize = sqlite3Atoi(zRight);\n      if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize,0,0) ){\n        sqlite3OomFault(db);\n      }\n    }\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]secure_delete\n  **  PRAGMA [schema.]secure_delete=ON/OFF/FAST\n  **\n  ** The first form reports the current setting for the\n  ** secure_delete flag.  The second form changes the secure_delete\n  ** flag setting and reports the new value.\n  */\n  case PragTyp_SECURE_DELETE: {\n    Btree *pBt = pDb->pBt;\n    int b = -1;\n    assert( pBt!=0 );\n    if( zRight ){\n      if( sqlite3_stricmp(zRight, \"fast\")==0 ){\n        b = 2;\n      }else{\n        b = sqlite3GetBoolean(zRight, 0);\n      }\n    }\n    if( pId2->n==0 && b>=0 ){\n      int ii;\n      for(ii=0; ii<db->nDb; ii++){\n        sqlite3BtreeSecureDelete(db->aDb[ii].pBt, b);\n      }\n    }\n    b = sqlite3BtreeSecureDelete(pBt, b);\n    returnSingleInt(v, b);\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]max_page_count\n  **  PRAGMA [schema.]max_page_count=N\n  **\n  ** The first form reports the current setting for the\n  ** maximum number of pages in the database file.  The\n  ** second form attempts to change this setting.  Both\n  ** forms return the current setting.\n  **\n  ** The absolute value of N is used.  This is undocumented and might\n  ** change.  The only purpose is to provide an easy way to test\n  ** the sqlite3AbsInt32() function.\n  **\n  **  PRAGMA [schema.]page_count\n  **\n  ** Return the number of pages in the specified database.\n  */\n  case PragTyp_PAGE_COUNT: {\n    int iReg;\n    i64 x = 0;\n    sqlite3CodeVerifySchema(pParse, iDb);\n    iReg = ++pParse->nMem;\n    if( sqlite3Tolower(zLeft[0])=='p' ){\n      sqlite3VdbeAddOp2(v, OP_Pagecount, iDb, iReg);\n    }else{\n      if( zRight && sqlite3DecOrHexToI64(zRight,&x)==0 ){\n        if( x<0 ) x = 0;\n        else if( x>0xfffffffe ) x = 0xfffffffe;\n      }else{\n        x = 0;\n      }\n      sqlite3VdbeAddOp3(v, OP_MaxPgcnt, iDb, iReg, (int)x);\n    }\n    sqlite3VdbeAddOp2(v, OP_ResultRow, iReg, 1);\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]locking_mode\n  **  PRAGMA [schema.]locking_mode = (normal|exclusive)\n  */\n  case PragTyp_LOCKING_MODE: {\n    const char *zRet = \"normal\";\n    int eMode = getLockingMode(zRight);\n\n    if( pId2->n==0 && eMode==PAGER_LOCKINGMODE_QUERY ){\n      /* Simple \"PRAGMA locking_mode;\" statement. This is a query for\n      ** the current default locking mode (which may be different to\n      ** the locking-mode of the main database).\n      */\n      eMode = db->dfltLockMode;\n    }else{\n      Pager *pPager;\n      if( pId2->n==0 ){\n        /* This indicates that no database name was specified as part\n        ** of the PRAGMA command. In this case the locking-mode must be\n        ** set on all attached databases, as well as the main db file.\n        **\n        ** Also, the sqlite3.dfltLockMode variable is set so that\n        ** any subsequently attached databases also use the specified\n        ** locking mode.\n        */\n        int ii;\n        assert(pDb==&db->aDb[0]);\n        for(ii=2; ii<db->nDb; ii++){\n          pPager = sqlite3BtreePager(db->aDb[ii].pBt);\n          sqlite3PagerLockingMode(pPager, eMode);\n        }\n        db->dfltLockMode = (u8)eMode;\n      }\n      pPager = sqlite3BtreePager(pDb->pBt);\n      eMode = sqlite3PagerLockingMode(pPager, eMode);\n    }\n\n    assert( eMode==PAGER_LOCKINGMODE_NORMAL\n            || eMode==PAGER_LOCKINGMODE_EXCLUSIVE );\n    if( eMode==PAGER_LOCKINGMODE_EXCLUSIVE ){\n      zRet = \"exclusive\";\n    }\n    returnSingleText(v, zRet);\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]journal_mode\n  **  PRAGMA [schema.]journal_mode =\n  **                      (delete|persist|off|truncate|memory|wal|off)\n  */\n  case PragTyp_JOURNAL_MODE: {\n    int eMode;        /* One of the PAGER_JOURNALMODE_XXX symbols */\n    int ii;           /* Loop counter */\n\n    if( zRight==0 ){\n      /* If there is no \"=MODE\" part of the pragma, do a query for the\n      ** current mode */\n      eMode = PAGER_JOURNALMODE_QUERY;\n    }else{\n      const char *zMode;\n      int n = sqlite3Strlen30(zRight);\n      for(eMode=0; (zMode = sqlite3JournalModename(eMode))!=0; eMode++){\n        if( sqlite3StrNICmp(zRight, zMode, n)==0 ) break;\n      }\n      if( !zMode ){\n        /* If the \"=MODE\" part does not match any known journal mode,\n        ** then do a query */\n        eMode = PAGER_JOURNALMODE_QUERY;\n      }\n      if( eMode==PAGER_JOURNALMODE_OFF && (db->flags & SQLITE_Defensive)!=0 ){\n        /* Do not allow journal-mode \"OFF\" in defensive since the database\n        ** can become corrupted using ordinary SQL when the journal is off */\n        eMode = PAGER_JOURNALMODE_QUERY;\n      }\n    }\n    if( eMode==PAGER_JOURNALMODE_QUERY && pId2->n==0 ){\n      /* Convert \"PRAGMA journal_mode\" into \"PRAGMA main.journal_mode\" */\n      iDb = 0;\n      pId2->n = 1;\n    }\n    for(ii=db->nDb-1; ii>=0; ii--){\n      if( db->aDb[ii].pBt && (ii==iDb || pId2->n==0) ){\n        sqlite3VdbeUsesBtree(v, ii);\n        sqlite3VdbeAddOp3(v, OP_JournalMode, ii, 1, eMode);\n      }\n    }\n    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]journal_size_limit\n  **  PRAGMA [schema.]journal_size_limit=N\n  **\n  ** Get or set the size limit on rollback journal files.\n  */\n  case PragTyp_JOURNAL_SIZE_LIMIT: {\n    Pager *pPager = sqlite3BtreePager(pDb->pBt);\n    i64 iLimit = -2;\n    if( zRight ){\n      sqlite3DecOrHexToI64(zRight, &iLimit);\n      if( iLimit<-1 ) iLimit = -1;\n    }\n    iLimit = sqlite3PagerJournalSizeLimit(pPager, iLimit);\n    returnSingleInt(v, iLimit);\n    break;\n  }\n\n#endif /* SQLITE_OMIT_PAGER_PRAGMAS */\n\n  /*\n  **  PRAGMA [schema.]auto_vacuum\n  **  PRAGMA [schema.]auto_vacuum=N\n  **\n  ** Get or set the value of the database 'auto-vacuum' parameter.\n  ** The value is one of:  0 NONE 1 FULL 2 INCREMENTAL\n  */\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  case PragTyp_AUTO_VACUUM: {\n    Btree *pBt = pDb->pBt;\n    assert( pBt!=0 );\n    if( !zRight ){\n      returnSingleInt(v, sqlite3BtreeGetAutoVacuum(pBt));\n    }else{\n      int eAuto = getAutoVacuum(zRight);\n      assert( eAuto>=0 && eAuto<=2 );\n      db->nextAutovac = (u8)eAuto;\n      /* Call SetAutoVacuum() to set initialize the internal auto and\n      ** incr-vacuum flags. This is required in case this connection\n      ** creates the database file. It is important that it is created\n      ** as an auto-vacuum capable db.\n      */\n      rc = sqlite3BtreeSetAutoVacuum(pBt, eAuto);\n      if( rc==SQLITE_OK && (eAuto==1 || eAuto==2) ){\n        /* When setting the auto_vacuum mode to either \"full\" or\n        ** \"incremental\", write the value of meta[6] in the database\n        ** file. Before writing to meta[6], check that meta[3] indicates\n        ** that this really is an auto-vacuum capable database.\n        */\n        static const int iLn = VDBE_OFFSET_LINENO(2);\n        static const VdbeOpList setMeta6[] = {\n          { OP_Transaction,    0,         1,                 0},    /* 0 */\n          { OP_ReadCookie,     0,         1,         BTREE_LARGEST_ROOT_PAGE},\n          { OP_If,             1,         0,                 0},    /* 2 */\n          { OP_Halt,           SQLITE_OK, OE_Abort,          0},    /* 3 */\n          { OP_SetCookie,      0,         BTREE_INCR_VACUUM, 0},    /* 4 */\n        };\n        VdbeOp *aOp;\n        int iAddr = sqlite3VdbeCurrentAddr(v);\n        sqlite3VdbeVerifyNoMallocRequired(v, ArraySize(setMeta6));\n        aOp = sqlite3VdbeAddOpList(v, ArraySize(setMeta6), setMeta6, iLn);\n        if( ONLY_IF_REALLOC_STRESS(aOp==0) ) break;\n        aOp[0].p1 = iDb;\n        aOp[1].p1 = iDb;\n        aOp[2].p2 = iAddr+4;\n        aOp[4].p1 = iDb;\n        aOp[4].p3 = eAuto - 1;\n        sqlite3VdbeUsesBtree(v, iDb);\n      }\n    }\n    break;\n  }\n#endif\n\n  /*\n  **  PRAGMA [schema.]incremental_vacuum(N)\n  **\n  ** Do N steps of incremental vacuuming on a database.\n  */\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  case PragTyp_INCREMENTAL_VACUUM: {\n    int iLimit = 0, addr;\n    if( zRight==0 || !sqlite3GetInt32(zRight, &iLimit) || iLimit<=0 ){\n      iLimit = 0x7fffffff;\n    }\n    sqlite3BeginWriteOperation(pParse, 0, iDb);\n    sqlite3VdbeAddOp2(v, OP_Integer, iLimit, 1);\n    addr = sqlite3VdbeAddOp1(v, OP_IncrVacuum, iDb); VdbeCoverage(v);\n    sqlite3VdbeAddOp1(v, OP_ResultRow, 1);\n    sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1);\n    sqlite3VdbeAddOp2(v, OP_IfPos, 1, addr); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addr);\n    break;\n  }\n#endif\n\n#ifndef SQLITE_OMIT_PAGER_PRAGMAS\n  /*\n  **  PRAGMA [schema.]cache_size\n  **  PRAGMA [schema.]cache_size=N\n  **\n  ** The first form reports the current local setting for the\n  ** page cache size. The second form sets the local\n  ** page cache size value.  If N is positive then that is the\n  ** number of pages in the cache.  If N is negative, then the\n  ** number of pages is adjusted so that the cache uses -N kibibytes\n  ** of memory.\n  */\n  case PragTyp_CACHE_SIZE: {\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    if( !zRight ){\n      returnSingleInt(v, pDb->pSchema->cache_size);\n    }else{\n      int size = sqlite3Atoi(zRight);\n      pDb->pSchema->cache_size = size;\n      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);\n    }\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]cache_spill\n  **  PRAGMA cache_spill=BOOLEAN\n  **  PRAGMA [schema.]cache_spill=N\n  **\n  ** The first form reports the current local setting for the\n  ** page cache spill size. The second form turns cache spill on\n  ** or off.  When turning cache spill on, the size is set to the\n  ** current cache_size.  The third form sets a spill size that\n  ** may be different form the cache size.\n  ** If N is positive then that is the\n  ** number of pages in the cache.  If N is negative, then the\n  ** number of pages is adjusted so that the cache uses -N kibibytes\n  ** of memory.\n  **\n  ** If the number of cache_spill pages is less then the number of\n  ** cache_size pages, no spilling occurs until the page count exceeds\n  ** the number of cache_size pages.\n  **\n  ** The cache_spill=BOOLEAN setting applies to all attached schemas,\n  ** not just the schema specified.\n  */\n  case PragTyp_CACHE_SPILL: {\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    if( !zRight ){\n      returnSingleInt(v,\n         (db->flags & SQLITE_CacheSpill)==0 ? 0 :\n            sqlite3BtreeSetSpillSize(pDb->pBt,0));\n    }else{\n      int size = 1;\n      if( sqlite3GetInt32(zRight, &size) ){\n        sqlite3BtreeSetSpillSize(pDb->pBt, size);\n      }\n      if( sqlite3GetBoolean(zRight, size!=0) ){\n        db->flags |= SQLITE_CacheSpill;\n      }else{\n        db->flags &= ~(u64)SQLITE_CacheSpill;\n      }\n      setAllPagerFlags(db);\n    }\n    break;\n  }\n\n  /*\n  **  PRAGMA [schema.]mmap_size(N)\n  **\n  ** Used to set mapping size limit. The mapping size limit is\n  ** used to limit the aggregate size of all memory mapped regions of the\n  ** database file. If this parameter is set to zero, then memory mapping\n  ** is not used at all.  If N is negative, then the default memory map\n  ** limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set.\n  ** The parameter N is measured in bytes.\n  **\n  ** This value is advisory.  The underlying VFS is free to memory map\n  ** as little or as much as it wants.  Except, if N is set to 0 then the\n  ** upper layers will never invoke the xFetch interfaces to the VFS.\n  */\n  case PragTyp_MMAP_SIZE: {\n    sqlite3_int64 sz;\n#if SQLITE_MAX_MMAP_SIZE>0\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    if( zRight ){\n      int ii;\n      sqlite3DecOrHexToI64(zRight, &sz);\n      if( sz<0 ) sz = sqlite3GlobalConfig.szMmap;\n      if( pId2->n==0 ) db->szMmap = sz;\n      for(ii=db->nDb-1; ii>=0; ii--){\n        if( db->aDb[ii].pBt && (ii==iDb || pId2->n==0) ){\n          sqlite3BtreeSetMmapLimit(db->aDb[ii].pBt, sz);\n        }\n      }\n    }\n    sz = -1;\n    rc = sqlite3_file_control(db, zDb, SQLITE_FCNTL_MMAP_SIZE, &sz);\n#else\n    sz = 0;\n    rc = SQLITE_OK;\n#endif\n    if( rc==SQLITE_OK ){\n      returnSingleInt(v, sz);\n    }else if( rc!=SQLITE_NOTFOUND ){\n      pParse->nErr++;\n      pParse->rc = rc;\n    }\n    break;\n  }\n\n  /*\n  **   PRAGMA temp_store\n  **   PRAGMA temp_store = \"default\"|\"memory\"|\"file\"\n  **\n  ** Return or set the local value of the temp_store flag.  Changing\n  ** the local value does not make changes to the disk file and the default\n  ** value will be restored the next time the database is opened.\n  **\n  ** Note that it is possible for the library compile-time options to\n  ** override this setting\n  */\n  case PragTyp_TEMP_STORE: {\n    if( !zRight ){\n      returnSingleInt(v, db->temp_store);\n    }else{\n      changeTempStorage(pParse, zRight);\n    }\n    break;\n  }\n\n  /*\n  **   PRAGMA temp_store_directory\n  **   PRAGMA temp_store_directory = \"\"|\"directory_name\"\n  **\n  ** Return or set the local value of the temp_store_directory flag.  Changing\n  ** the value sets a specific directory to be used for temporary files.\n  ** Setting to a null string reverts to the default temporary directory search.\n  ** If temporary directory is changed, then invalidateTempStorage.\n  **\n  */\n  case PragTyp_TEMP_STORE_DIRECTORY: {\n    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n    if( !zRight ){\n      returnSingleText(v, sqlite3_temp_directory);\n    }else{\n#ifndef SQLITE_OMIT_WSD\n      if( zRight[0] ){\n        int res;\n        rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);\n        if( rc!=SQLITE_OK || res==0 ){\n          sqlite3ErrorMsg(pParse, \"not a writable directory\");\n          sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n          goto pragma_out;\n        }\n      }\n      if( SQLITE_TEMP_STORE==0\n       || (SQLITE_TEMP_STORE==1 && db->temp_store<=1)\n       || (SQLITE_TEMP_STORE==2 && db->temp_store==1)\n      ){\n        invalidateTempStorage(pParse);\n      }\n      sqlite3_free(sqlite3_temp_directory);\n      if( zRight[0] ){\n        sqlite3_temp_directory = sqlite3_mprintf(\"%s\", zRight);\n      }else{\n        sqlite3_temp_directory = 0;\n      }\n#endif /* SQLITE_OMIT_WSD */\n    }\n    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n    break;\n  }\n\n#if SQLITE_OS_WIN\n  /*\n  **   PRAGMA data_store_directory\n  **   PRAGMA data_store_directory = \"\"|\"directory_name\"\n  **\n  ** Return or set the local value of the data_store_directory flag.  Changing\n  ** the value sets a specific directory to be used for database files that\n  ** were specified with a relative pathname.  Setting to a null string reverts\n  ** to the default database directory, which for database files specified with\n  ** a relative path will probably be based on the current directory for the\n  ** process.  Database file specified with an absolute path are not impacted\n  ** by this setting, regardless of its value.\n  **\n  */\n  case PragTyp_DATA_STORE_DIRECTORY: {\n    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n    if( !zRight ){\n      returnSingleText(v, sqlite3_data_directory);\n    }else{\n#ifndef SQLITE_OMIT_WSD\n      if( zRight[0] ){\n        int res;\n        rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);\n        if( rc!=SQLITE_OK || res==0 ){\n          sqlite3ErrorMsg(pParse, \"not a writable directory\");\n          sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n          goto pragma_out;\n        }\n      }\n      sqlite3_free(sqlite3_data_directory);\n      if( zRight[0] ){\n        sqlite3_data_directory = sqlite3_mprintf(\"%s\", zRight);\n      }else{\n        sqlite3_data_directory = 0;\n      }\n#endif /* SQLITE_OMIT_WSD */\n    }\n    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));\n    break;\n  }\n#endif\n\n#if SQLITE_ENABLE_LOCKING_STYLE\n  /*\n  **   PRAGMA [schema.]lock_proxy_file\n  **   PRAGMA [schema.]lock_proxy_file = \":auto:\"|\"lock_file_path\"\n  **\n  ** Return or set the value of the lock_proxy_file flag.  Changing\n  ** the value sets a specific file to be used for database access locks.\n  **\n  */\n  case PragTyp_LOCK_PROXY_FILE: {\n    if( !zRight ){\n      Pager *pPager = sqlite3BtreePager(pDb->pBt);\n      char *proxy_file_path = NULL;\n      sqlite3_file *pFile = sqlite3PagerFile(pPager);\n      sqlite3OsFileControlHint(pFile, SQLITE_GET_LOCKPROXYFILE,\n                           &proxy_file_path);\n      returnSingleText(v, proxy_file_path);\n    }else{\n      Pager *pPager = sqlite3BtreePager(pDb->pBt);\n      sqlite3_file *pFile = sqlite3PagerFile(pPager);\n      int res;\n      if( zRight[0] ){\n        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE,\n                                     zRight);\n      } else {\n        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE,\n                                     NULL);\n      }\n      if( res!=SQLITE_OK ){\n        sqlite3ErrorMsg(pParse, \"failed to set lock proxy file\");\n        goto pragma_out;\n      }\n    }\n    break;\n  }\n#endif /* SQLITE_ENABLE_LOCKING_STYLE */\n\n  /*\n  **   PRAGMA [schema.]synchronous\n  **   PRAGMA [schema.]synchronous=OFF|ON|NORMAL|FULL|EXTRA\n  **\n  ** Return or set the local value of the synchronous flag.  Changing\n  ** the local value does not make changes to the disk file and the\n  ** default value will be restored the next time the database is\n  ** opened.\n  */\n  case PragTyp_SYNCHRONOUS: {\n    if( !zRight ){\n      returnSingleInt(v, pDb->safety_level-1);\n    }else{\n      if( !db->autoCommit ){\n        sqlite3ErrorMsg(pParse,\n            \"Safety level may not be changed inside a transaction\");\n      }else if( iDb!=1 ){\n        int iLevel = (getSafetyLevel(zRight,0,1)+1) & PAGER_SYNCHRONOUS_MASK;\n        if( iLevel==0 ) iLevel = 1;\n        pDb->safety_level = iLevel;\n        pDb->bSyncSet = 1;\n        setAllPagerFlags(db);\n      }\n    }\n    break;\n  }\n#endif /* SQLITE_OMIT_PAGER_PRAGMAS */\n\n#ifndef SQLITE_OMIT_FLAG_PRAGMAS\n  case PragTyp_FLAG: {\n    if( zRight==0 ){\n      setPragmaResultColumnNames(v, pPragma);\n      returnSingleInt(v, (db->flags & pPragma->iArg)!=0 );\n    }else{\n      u64 mask = pPragma->iArg;    /* Mask of bits to set or clear. */\n      if( db->autoCommit==0 ){\n        /* Foreign key support may not be enabled or disabled while not\n        ** in auto-commit mode.  */\n        mask &= ~(SQLITE_ForeignKeys);\n      }\n\n      if( sqlite3GetBoolean(zRight, 0) ){\n        if( (mask & SQLITE_WriteSchema)==0\n         || (db->flags & SQLITE_Defensive)==0\n        ){\n          db->flags |= mask;\n        }\n      }else{\n        db->flags &= ~mask;\n        if( mask==SQLITE_DeferFKs ){\n          db->nDeferredImmCons = 0;\n          db->nDeferredCons = 0;\n        }\n        if( (mask & SQLITE_WriteSchema)!=0\n         && sqlite3_stricmp(zRight, \"reset\")==0\n        ){\n          /* IMP: R-60817-01178 If the argument is \"RESET\" then schema\n          ** writing is disabled (as with \"PRAGMA writable_schema=OFF\") and,\n          ** in addition, the schema is reloaded. */\n          sqlite3ResetAllSchemasOfConnection(db);\n        }\n      }\n\n      /* Many of the flag-pragmas modify the code generated by the SQL\n      ** compiler (eg. count_changes). So add an opcode to expire all\n      ** compiled SQL statements after modifying a pragma value.\n      */\n      sqlite3VdbeAddOp0(v, OP_Expire);\n      setAllPagerFlags(db);\n    }\n    break;\n  }\n#endif /* SQLITE_OMIT_FLAG_PRAGMAS */\n\n#ifndef SQLITE_OMIT_SCHEMA_PRAGMAS\n  /*\n  **   PRAGMA table_info(<table>)\n  **\n  ** Return a single row for each column of the named table. The columns of\n  ** the returned data set are:\n  **\n  ** cid:        Column id (numbered from left to right, starting at 0)\n  ** name:       Column name\n  ** type:       Column declaration type.\n  ** notnull:    True if 'NOT NULL' is part of column declaration\n  ** dflt_value: The default value for the column, if any.\n  ** pk:         Non-zero for PK fields.\n  */\n  case PragTyp_TABLE_INFO: if( zRight ){\n    Table *pTab;\n    sqlite3CodeVerifyNamedSchema(pParse, zDb);\n    pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb);\n    if( pTab ){\n      int i, k;\n      int nHidden = 0;\n      Column *pCol;\n      Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n      pParse->nMem = 7;\n      sqlite3ViewGetColumnNames(pParse, pTab);\n      for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){\n        int isHidden = 0;\n        const Expr *pColExpr;\n        if( pCol->colFlags & COLFLAG_NOINSERT ){\n          if( pPragma->iArg==0 ){\n            nHidden++;\n            continue;\n          }\n          if( pCol->colFlags & COLFLAG_VIRTUAL ){\n            isHidden = 2;  /* GENERATED ALWAYS AS ... VIRTUAL */\n          }else if( pCol->colFlags & COLFLAG_STORED ){\n            isHidden = 3;  /* GENERATED ALWAYS AS ... STORED */\n          }else{ assert( pCol->colFlags & COLFLAG_HIDDEN );\n            isHidden = 1;  /* HIDDEN */\n          }\n        }\n        if( (pCol->colFlags & COLFLAG_PRIMKEY)==0 ){\n          k = 0;\n        }else if( pPk==0 ){\n          k = 1;\n        }else{\n          for(k=1; k<=pTab->nCol && pPk->aiColumn[k-1]!=i; k++){}\n        }\n        pColExpr = sqlite3ColumnExpr(pTab,pCol);\n        assert( pColExpr==0 || pColExpr->op==TK_SPAN || isHidden>=2 );\n        assert( pColExpr==0 || !ExprHasProperty(pColExpr, EP_IntValue)\n                  || isHidden>=2 );\n        sqlite3VdbeMultiLoad(v, 1, pPragma->iArg ? \"issisii\" : \"issisi\",\n               i-nHidden,\n               pCol->zCnName,\n               sqlite3ColumnType(pCol,\"\"),\n               pCol->notNull ? 1 : 0,\n               (isHidden>=2 || pColExpr==0) ? 0 : pColExpr->u.zToken,\n               k,\n               isHidden);\n      }\n    }\n  }\n  break;\n\n  /*\n  **   PRAGMA table_list\n  **\n  ** Return a single row for each table, virtual table, or view in the\n  ** entire schema.\n  **\n  ** schema:     Name of attached database hold this table\n  ** name:       Name of the table itself\n  ** type:       \"table\", \"view\", \"virtual\", \"shadow\"\n  ** ncol:       Number of columns\n  ** wr:         True for a WITHOUT ROWID table\n  ** strict:     True for a STRICT table\n  */\n  case PragTyp_TABLE_LIST: {\n    int ii;\n    pParse->nMem = 6;\n    sqlite3CodeVerifyNamedSchema(pParse, zDb);\n    for(ii=0; ii<db->nDb; ii++){\n      HashElem *k;\n      Hash *pHash;\n      int initNCol;\n      if( zDb && sqlite3_stricmp(zDb, db->aDb[ii].zDbSName)!=0 ) continue;\n\n      /* Ensure that the Table.nCol field is initialized for all views\n      ** and virtual tables.  Each time we initialize a Table.nCol value\n      ** for a table, that can potentially disrupt the hash table, so restart\n      ** the initialization scan.\n      */\n      pHash = &db->aDb[ii].pSchema->tblHash;\n      initNCol = sqliteHashCount(pHash);\n      while( initNCol-- ){\n        for(k=sqliteHashFirst(pHash); 1; k=sqliteHashNext(k) ){\n          Table *pTab;\n          if( k==0 ){ initNCol = 0; break; }\n          pTab = sqliteHashData(k);\n          if( pTab->nCol==0 ){\n            char *zSql = sqlite3MPrintf(db, \"SELECT*FROM\\\"%w\\\"\", pTab->zName);\n            if( zSql ){\n              sqlite3_stmt *pDummy = 0;\n              (void)sqlite3_prepare_v3(db, zSql, -1, SQLITE_PREPARE_DONT_LOG,\n                                       &pDummy, 0);\n              (void)sqlite3_finalize(pDummy);\n              sqlite3DbFree(db, zSql);\n            }\n            if( db->mallocFailed ){\n              sqlite3ErrorMsg(db->pParse, \"out of memory\");\n              db->pParse->rc = SQLITE_NOMEM_BKPT;\n            }\n            pHash = &db->aDb[ii].pSchema->tblHash;\n            break;\n          }\n        }\n      }\n\n      for(k=sqliteHashFirst(pHash); k; k=sqliteHashNext(k) ){\n        Table *pTab = sqliteHashData(k);\n        const char *zType;\n        if( zRight && sqlite3_stricmp(zRight, pTab->zName)!=0 ) continue;\n        if( IsView(pTab) ){\n          zType = \"view\";\n        }else if( IsVirtual(pTab) ){\n          zType = \"virtual\";\n        }else if( pTab->tabFlags & TF_Shadow ){\n          zType = \"shadow\";\n        }else{\n          zType = \"table\";\n        }\n        sqlite3VdbeMultiLoad(v, 1, \"sssiii\",\n           db->aDb[ii].zDbSName,\n           sqlite3PreferredTableName(pTab->zName),\n           zType,\n           pTab->nCol,\n           (pTab->tabFlags & TF_WithoutRowid)!=0,\n           (pTab->tabFlags & TF_Strict)!=0\n        );\n      }\n    }\n  }\n  break;\n\n#ifdef SQLITE_DEBUG\n  case PragTyp_STATS: {\n    Index *pIdx;\n    HashElem *i;\n    pParse->nMem = 5;\n    sqlite3CodeVerifySchema(pParse, iDb);\n    for(i=sqliteHashFirst(&pDb->pSchema->tblHash); i; i=sqliteHashNext(i)){\n      Table *pTab = sqliteHashData(i);\n      sqlite3VdbeMultiLoad(v, 1, \"ssiii\",\n           sqlite3PreferredTableName(pTab->zName),\n           0,\n           pTab->szTabRow,\n           pTab->nRowLogEst,\n           pTab->tabFlags);\n      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n        sqlite3VdbeMultiLoad(v, 2, \"siiiX\",\n           pIdx->zName,\n           pIdx->szIdxRow,\n           pIdx->aiRowLogEst[0],\n           pIdx->hasStat1);\n        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 5);\n      }\n    }\n  }\n  break;\n#endif\n\n  case PragTyp_INDEX_INFO: if( zRight ){\n    Index *pIdx;\n    Table *pTab;\n    pIdx = sqlite3FindIndex(db, zRight, zDb);\n    if( pIdx==0 ){\n      /* If there is no index named zRight, check to see if there is a\n      ** WITHOUT ROWID table named zRight, and if there is, show the\n      ** structure of the PRIMARY KEY index for that table. */\n      pTab = sqlite3LocateTable(pParse, LOCATE_NOERR, zRight, zDb);\n      if( pTab && !HasRowid(pTab) ){\n        pIdx = sqlite3PrimaryKeyIndex(pTab);\n      }\n    }\n    if( pIdx ){\n      int iIdxDb = sqlite3SchemaToIndex(db, pIdx->pSchema);\n      int i;\n      int mx;\n      if( pPragma->iArg ){\n        /* PRAGMA index_xinfo (newer version with more rows and columns) */\n        mx = pIdx->nColumn;\n        pParse->nMem = 6;\n      }else{\n        /* PRAGMA index_info (legacy version) */\n        mx = pIdx->nKeyCol;\n        pParse->nMem = 3;\n      }\n      pTab = pIdx->pTable;\n      sqlite3CodeVerifySchema(pParse, iIdxDb);\n      assert( pParse->nMem<=pPragma->nPragCName );\n      for(i=0; i<mx; i++){\n        i16 cnum = pIdx->aiColumn[i];\n        sqlite3VdbeMultiLoad(v, 1, \"iisX\", i, cnum,\n                             cnum<0 ? 0 : pTab->aCol[cnum].zCnName);\n        if( pPragma->iArg ){\n          sqlite3VdbeMultiLoad(v, 4, \"isiX\",\n            pIdx->aSortOrder[i],\n            pIdx->azColl[i],\n            i<pIdx->nKeyCol);\n        }\n        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, pParse->nMem);\n      }\n    }\n  }\n  break;\n\n  case PragTyp_INDEX_LIST: if( zRight ){\n    Index *pIdx;\n    Table *pTab;\n    int i;\n    pTab = sqlite3FindTable(db, zRight, zDb);\n    if( pTab ){\n      int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n      pParse->nMem = 5;\n      sqlite3CodeVerifySchema(pParse, iTabDb);\n      for(pIdx=pTab->pIndex, i=0; pIdx; pIdx=pIdx->pNext, i++){\n        const char *azOrigin[] = { \"c\", \"u\", \"pk\" };\n        sqlite3VdbeMultiLoad(v, 1, \"isisi\",\n           i,\n           pIdx->zName,\n           IsUniqueIndex(pIdx),\n           azOrigin[pIdx->idxType],\n           pIdx->pPartIdxWhere!=0);\n      }\n    }\n  }\n  break;\n\n  case PragTyp_DATABASE_LIST: {\n    int i;\n    pParse->nMem = 3;\n    for(i=0; i<db->nDb; i++){\n      if( db->aDb[i].pBt==0 ) continue;\n      assert( db->aDb[i].zDbSName!=0 );\n      sqlite3VdbeMultiLoad(v, 1, \"iss\",\n         i,\n         db->aDb[i].zDbSName,\n         sqlite3BtreeGetFilename(db->aDb[i].pBt));\n    }\n  }\n  break;\n\n  case PragTyp_COLLATION_LIST: {\n    int i = 0;\n    HashElem *p;\n    pParse->nMem = 2;\n    for(p=sqliteHashFirst(&db->aCollSeq); p; p=sqliteHashNext(p)){\n      CollSeq *pColl = (CollSeq *)sqliteHashData(p);\n      sqlite3VdbeMultiLoad(v, 1, \"is\", i++, pColl->zName);\n    }\n  }\n  break;\n\n#ifndef SQLITE_OMIT_INTROSPECTION_PRAGMAS\n  case PragTyp_FUNCTION_LIST: {\n    int i;\n    HashElem *j;\n    FuncDef *p;\n    int showInternFunc = (db->mDbFlags & DBFLAG_InternalFunc)!=0;\n    pParse->nMem = 6;\n    for(i=0; i<SQLITE_FUNC_HASH_SZ; i++){\n      for(p=sqlite3BuiltinFunctions.a[i]; p; p=p->u.pHash ){\n        assert( p->funcFlags & SQLITE_FUNC_BUILTIN );\n        pragmaFunclistLine(v, p, 1, showInternFunc);\n      }\n    }\n    for(j=sqliteHashFirst(&db->aFunc); j; j=sqliteHashNext(j)){\n      p = (FuncDef*)sqliteHashData(j);\n      assert( (p->funcFlags & SQLITE_FUNC_BUILTIN)==0 );\n      pragmaFunclistLine(v, p, 0, showInternFunc);\n    }\n  }\n  break;\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  case PragTyp_MODULE_LIST: {\n    HashElem *j;\n    pParse->nMem = 1;\n    for(j=sqliteHashFirst(&db->aModule); j; j=sqliteHashNext(j)){\n      Module *pMod = (Module*)sqliteHashData(j);\n      sqlite3VdbeMultiLoad(v, 1, \"s\", pMod->zName);\n    }\n  }\n  break;\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n  case PragTyp_PRAGMA_LIST: {\n    int i;\n    for(i=0; i<ArraySize(aPragmaName); i++){\n      sqlite3VdbeMultiLoad(v, 1, \"s\", aPragmaName[i].zName);\n    }\n  }\n  break;\n#endif /* SQLITE_INTROSPECTION_PRAGMAS */\n\n#endif /* SQLITE_OMIT_SCHEMA_PRAGMAS */\n\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n  case PragTyp_FOREIGN_KEY_LIST: if( zRight ){\n    FKey *pFK;\n    Table *pTab;\n    pTab = sqlite3FindTable(db, zRight, zDb);\n    if( pTab && IsOrdinaryTable(pTab) ){\n      pFK = pTab->u.tab.pFKey;\n      if( pFK ){\n        int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n        int i = 0;\n        pParse->nMem = 8;\n        sqlite3CodeVerifySchema(pParse, iTabDb);\n        while(pFK){\n          int j;\n          for(j=0; j<pFK->nCol; j++){\n            sqlite3VdbeMultiLoad(v, 1, \"iissssss\",\n                   i,\n                   j,\n                   pFK->zTo,\n                   pTab->aCol[pFK->aCol[j].iFrom].zCnName,\n                   pFK->aCol[j].zCol,\n                   actionName(pFK->aAction[1]),  /* ON UPDATE */\n                   actionName(pFK->aAction[0]),  /* ON DELETE */\n                   \"NONE\");\n          }\n          ++i;\n          pFK = pFK->pNextFrom;\n        }\n      }\n    }\n  }\n  break;\n#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */\n\n#ifndef SQLITE_OMIT_FOREIGN_KEY\n#ifndef SQLITE_OMIT_TRIGGER\n  case PragTyp_FOREIGN_KEY_CHECK: {\n    FKey *pFK;             /* A foreign key constraint */\n    Table *pTab;           /* Child table contain \"REFERENCES\" keyword */\n    Table *pParent;        /* Parent table that child points to */\n    Index *pIdx;           /* Index in the parent table */\n    int i;                 /* Loop counter:  Foreign key number for pTab */\n    int j;                 /* Loop counter:  Field of the foreign key */\n    HashElem *k;           /* Loop counter:  Next table in schema */\n    int x;                 /* result variable */\n    int regResult;         /* 3 registers to hold a result row */\n    int regRow;            /* Registers to hold a row from pTab */\n    int addrTop;           /* Top of a loop checking foreign keys */\n    int addrOk;            /* Jump here if the key is OK */\n    int *aiCols;           /* child to parent column mapping */\n\n    regResult = pParse->nMem+1;\n    pParse->nMem += 4;\n    regRow = ++pParse->nMem;\n    k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);\n    while( k ){\n      if( zRight ){\n        pTab = sqlite3LocateTable(pParse, 0, zRight, zDb);\n        k = 0;\n      }else{\n        pTab = (Table*)sqliteHashData(k);\n        k = sqliteHashNext(k);\n      }\n      if( pTab==0 || !IsOrdinaryTable(pTab) || pTab->u.tab.pFKey==0 ) continue;\n      iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n      zDb = db->aDb[iDb].zDbSName;\n      sqlite3CodeVerifySchema(pParse, iDb);\n      sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);\n      sqlite3TouchRegister(pParse, pTab->nCol+regRow);\n      sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);\n      sqlite3VdbeLoadString(v, regResult, pTab->zName);\n      assert( IsOrdinaryTable(pTab) );\n      for(i=1, pFK=pTab->u.tab.pFKey; pFK; i++, pFK=pFK->pNextFrom){\n        pParent = sqlite3FindTable(db, pFK->zTo, zDb);\n        if( pParent==0 ) continue;\n        pIdx = 0;\n        sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);\n        x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);\n        if( x==0 ){\n          if( pIdx==0 ){\n            sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);\n          }else{\n            sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);\n            sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n          }\n        }else{\n          k = 0;\n          break;\n        }\n      }\n      assert( pParse->nErr>0 || pFK==0 );\n      if( pFK ) break;\n      if( pParse->nTab<i ) pParse->nTab = i;\n      addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, 0); VdbeCoverage(v);\n      assert( IsOrdinaryTable(pTab) );\n      for(i=1, pFK=pTab->u.tab.pFKey; pFK; i++, pFK=pFK->pNextFrom){\n        pParent = sqlite3FindTable(db, pFK->zTo, zDb);\n        pIdx = 0;\n        aiCols = 0;\n        if( pParent ){\n          x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);\n          assert( x==0 || db->mallocFailed );\n        }\n        addrOk = sqlite3VdbeMakeLabel(pParse);\n\n        /* Generate code to read the child key values into registers\n        ** regRow..regRow+n. If any of the child key values are NULL, this\n        ** row cannot cause an FK violation. Jump directly to addrOk in\n        ** this case. */\n        sqlite3TouchRegister(pParse, regRow + pFK->nCol);\n        for(j=0; j<pFK->nCol; j++){\n          int iCol = aiCols ? aiCols[j] : pFK->aCol[j].iFrom;\n          sqlite3ExprCodeGetColumnOfTable(v, pTab, 0, iCol, regRow+j);\n          sqlite3VdbeAddOp2(v, OP_IsNull, regRow+j, addrOk); VdbeCoverage(v);\n        }\n\n        /* Generate code to query the parent index for a matching parent\n        ** key. If a match is found, jump to addrOk. */\n        if( pIdx ){\n          sqlite3VdbeAddOp4(v, OP_Affinity, regRow, pFK->nCol, 0,\n              sqlite3IndexAffinityStr(db,pIdx), pFK->nCol);\n          sqlite3VdbeAddOp4Int(v, OP_Found, i, addrOk, regRow, pFK->nCol);\n          VdbeCoverage(v);\n        }else if( pParent ){\n          int jmp = sqlite3VdbeCurrentAddr(v)+2;\n          sqlite3VdbeAddOp3(v, OP_SeekRowid, i, jmp, regRow); VdbeCoverage(v);\n          sqlite3VdbeGoto(v, addrOk);\n          assert( pFK->nCol==1 || db->mallocFailed );\n        }\n\n        /* Generate code to report an FK violation to the caller. */\n        if( HasRowid(pTab) ){\n          sqlite3VdbeAddOp2(v, OP_Rowid, 0, regResult+1);\n        }else{\n          sqlite3VdbeAddOp2(v, OP_Null, 0, regResult+1);\n        }\n        sqlite3VdbeMultiLoad(v, regResult+2, \"siX\", pFK->zTo, i-1);\n        sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, 4);\n        sqlite3VdbeResolveLabel(v, addrOk);\n        sqlite3DbFree(db, aiCols);\n      }\n      sqlite3VdbeAddOp2(v, OP_Next, 0, addrTop+1); VdbeCoverage(v);\n      sqlite3VdbeJumpHere(v, addrTop);\n    }\n  }\n  break;\n#endif /* !defined(SQLITE_OMIT_TRIGGER) */\n#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */\n\n#ifndef SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA\n  /* Reinstall the LIKE and GLOB functions.  The variant of LIKE\n  ** used will be case sensitive or not depending on the RHS.\n  */\n  case PragTyp_CASE_SENSITIVE_LIKE: {\n    if( zRight ){\n      sqlite3RegisterLikeFunctions(db, sqlite3GetBoolean(zRight, 0));\n    }\n  }\n  break;\n#endif /* SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA */\n\n#ifndef SQLITE_INTEGRITY_CHECK_ERROR_MAX\n# define SQLITE_INTEGRITY_CHECK_ERROR_MAX 100\n#endif\n\n#ifndef SQLITE_OMIT_INTEGRITY_CHECK\n  /*    PRAGMA integrity_check\n  **    PRAGMA integrity_check(N)\n  **    PRAGMA quick_check\n  **    PRAGMA quick_check(N)\n  **\n  ** Verify the integrity of the database.\n  **\n  ** The \"quick_check\" is reduced version of\n  ** integrity_check designed to detect most database corruption\n  ** without the overhead of cross-checking indexes.  Quick_check\n  ** is linear time whereas integrity_check is O(NlogN).\n  **\n  ** The maximum number of errors is 100 by default.  A different default\n  ** can be specified using a numeric parameter N.\n  **\n  ** Or, the parameter N can be the name of a table.  In that case, only\n  ** the one table named is verified.  The freelist is only verified if\n  ** the named table is \"sqlite_schema\" (or one of its aliases).\n  **\n  ** All schemas are checked by default.  To check just a single\n  ** schema, use the form:\n  **\n  **      PRAGMA schema.integrity_check;\n  */\n  case PragTyp_INTEGRITY_CHECK: {\n    int i, j, addr, mxErr;\n    Table *pObjTab = 0;     /* Check only this one table, if not NULL */\n\n    int isQuick = (sqlite3Tolower(zLeft[0])=='q');\n\n    /* If the PRAGMA command was of the form \"PRAGMA <db>.integrity_check\",\n    ** then iDb is set to the index of the database identified by <db>.\n    ** In this case, the integrity of database iDb only is verified by\n    ** the VDBE created below.\n    **\n    ** Otherwise, if the command was simply \"PRAGMA integrity_check\" (or\n    ** \"PRAGMA quick_check\"), then iDb is set to 0. In this case, set iDb\n    ** to -1 here, to indicate that the VDBE should verify the integrity\n    ** of all attached databases.  */\n    assert( iDb>=0 );\n    assert( iDb==0 || pId2->z );\n    if( pId2->z==0 ) iDb = -1;\n\n    /* Initialize the VDBE program */\n    pParse->nMem = 6;\n\n    /* Set the maximum error count */\n    mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;\n    if( zRight ){\n      if( sqlite3GetInt32(pValue->z, &mxErr) ){\n        if( mxErr<=0 ){\n          mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;\n        }\n      }else{\n        pObjTab = sqlite3LocateTable(pParse, 0, zRight,\n                      iDb>=0 ? db->aDb[iDb].zDbSName : 0);\n      }\n    }\n    sqlite3VdbeAddOp2(v, OP_Integer, mxErr-1, 1); /* reg[1] holds errors left */\n\n    /* Do an integrity check on each database file */\n    for(i=0; i<db->nDb; i++){\n      HashElem *x;     /* For looping over tables in the schema */\n      Hash *pTbls;     /* Set of all tables in the schema */\n      int *aRoot;      /* Array of root page numbers of all btrees */\n      int cnt = 0;     /* Number of entries in aRoot[] */\n\n      if( OMIT_TEMPDB && i==1 ) continue;\n      if( iDb>=0 && i!=iDb ) continue;\n\n      sqlite3CodeVerifySchema(pParse, i);\n      pParse->okConstFactor = 0;  /* tag-20230327-1 */\n\n      /* Do an integrity check of the B-Tree\n      **\n      ** Begin by finding the root pages numbers\n      ** for all tables and indices in the database.\n      */\n      assert( sqlite3SchemaMutexHeld(db, i, 0) );\n      pTbls = &db->aDb[i].pSchema->tblHash;\n      for(cnt=0, x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n        Table *pTab = sqliteHashData(x);  /* Current table */\n        Index *pIdx;                      /* An index on pTab */\n        int nIdx;                         /* Number of indexes on pTab */\n        if( tableSkipIntegrityCheck(pTab,pObjTab) ) continue;\n        if( HasRowid(pTab) ) cnt++;\n        for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){ cnt++; }\n      }\n      if( cnt==0 ) continue;\n      if( pObjTab ) cnt++;\n      aRoot = sqlite3DbMallocRawNN(db, sizeof(int)*(cnt+1));\n      if( aRoot==0 ) break;\n      cnt = 0;\n      if( pObjTab ) aRoot[++cnt] = 0;\n      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n        Table *pTab = sqliteHashData(x);\n        Index *pIdx;\n        if( tableSkipIntegrityCheck(pTab,pObjTab) ) continue;\n        if( HasRowid(pTab) ) aRoot[++cnt] = pTab->tnum;\n        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n          aRoot[++cnt] = pIdx->tnum;\n        }\n      }\n      aRoot[0] = cnt;\n\n      /* Make sure sufficient number of registers have been allocated */\n      sqlite3TouchRegister(pParse, 8+cnt);\n      sqlite3VdbeAddOp3(v, OP_Null, 0, 8, 8+cnt);\n      sqlite3ClearTempRegCache(pParse);\n\n      /* Do the b-tree integrity checks */\n      sqlite3VdbeAddOp4(v, OP_IntegrityCk, 1, cnt, 8, (char*)aRoot,P4_INTARRAY);\n      sqlite3VdbeChangeP5(v, (u16)i);\n      addr = sqlite3VdbeAddOp1(v, OP_IsNull, 2); VdbeCoverage(v);\n      sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,\n         sqlite3MPrintf(db, \"*** in database %s ***\\n\", db->aDb[i].zDbSName),\n         P4_DYNAMIC);\n      sqlite3VdbeAddOp3(v, OP_Concat, 2, 3, 3);\n      integrityCheckResultRow(v);\n      sqlite3VdbeJumpHere(v, addr);\n\n      /* Check that the indexes all have the right number of rows */\n      cnt = pObjTab ? 1 : 0;\n      sqlite3VdbeLoadString(v, 2, \"wrong # of entries in index \");\n      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n        int iTab = 0;\n        Table *pTab = sqliteHashData(x);\n        Index *pIdx;\n        if( tableSkipIntegrityCheck(pTab,pObjTab) ) continue;\n        if( HasRowid(pTab) ){\n          iTab = cnt++;\n        }else{\n          iTab = cnt;\n          for(pIdx=pTab->pIndex; ALWAYS(pIdx); pIdx=pIdx->pNext){\n            if( IsPrimaryKeyIndex(pIdx) ) break;\n            iTab++;\n          }\n        }\n        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n          if( pIdx->pPartIdxWhere==0 ){\n            addr = sqlite3VdbeAddOp3(v, OP_Eq, 8+cnt, 0, 8+iTab);\n            VdbeCoverageNeverNull(v);\n            sqlite3VdbeLoadString(v, 4, pIdx->zName);\n            sqlite3VdbeAddOp3(v, OP_Concat, 4, 2, 3);\n            integrityCheckResultRow(v);\n            sqlite3VdbeJumpHere(v, addr);\n          }\n          cnt++;\n        }\n      }\n\n      /* Make sure all the indices are constructed correctly.\n      */\n      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n        Table *pTab = sqliteHashData(x);\n        Index *pIdx, *pPk;\n        Index *pPrior = 0;      /* Previous index */\n        int loopTop;\n        int iDataCur, iIdxCur;\n        int r1 = -1;\n        int bStrict;            /* True for a STRICT table */\n        int r2;                 /* Previous key for WITHOUT ROWID tables */\n        int mxCol;              /* Maximum non-virtual column number */\n\n        if( tableSkipIntegrityCheck(pTab,pObjTab) ) continue;\n        if( !IsOrdinaryTable(pTab) ) continue;\n        if( isQuick || HasRowid(pTab) ){\n          pPk = 0;\n          r2 = 0;\n        }else{\n          pPk = sqlite3PrimaryKeyIndex(pTab);\n          r2 = sqlite3GetTempRange(pParse, pPk->nKeyCol);\n          sqlite3VdbeAddOp3(v, OP_Null, 1, r2, r2+pPk->nKeyCol-1);\n        }\n        sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenRead, 0,\n                                   1, 0, &iDataCur, &iIdxCur);\n        /* reg[7] counts the number of entries in the table.\n        ** reg[8+i] counts the number of entries in the i-th index\n        */\n        sqlite3VdbeAddOp2(v, OP_Integer, 0, 7);\n        for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){\n          sqlite3VdbeAddOp2(v, OP_Integer, 0, 8+j); /* index entries counter */\n        }\n        assert( pParse->nMem>=8+j );\n        assert( sqlite3NoTempsInRange(pParse,1,7+j) );\n        sqlite3VdbeAddOp2(v, OP_Rewind, iDataCur, 0); VdbeCoverage(v);\n        loopTop = sqlite3VdbeAddOp2(v, OP_AddImm, 7, 1);\n\n        /* Fetch the right-most column from the table.  This will cause\n        ** the entire record header to be parsed and sanity checked.  It\n        ** will also prepopulate the cursor column cache that is used\n        ** by the OP_IsType code, so it is a required step.\n        */\n        assert( !IsVirtual(pTab) );\n        if( HasRowid(pTab) ){\n          mxCol = -1;\n          for(j=0; j<pTab->nCol; j++){\n            if( (pTab->aCol[j].colFlags & COLFLAG_VIRTUAL)==0 ) mxCol++;\n          }\n          if( mxCol==pTab->iPKey ) mxCol--;\n        }else{\n          /* COLFLAG_VIRTUAL columns are not included in the WITHOUT ROWID\n          ** PK index column-count, so there is no need to account for them\n          ** in this case. */\n          mxCol = sqlite3PrimaryKeyIndex(pTab)->nColumn-1;\n        }\n        if( mxCol>=0 ){\n          sqlite3VdbeAddOp3(v, OP_Column, iDataCur, mxCol, 3);\n          sqlite3VdbeTypeofColumn(v, 3);\n        }\n\n        if( !isQuick ){\n          if( pPk ){\n            /* Verify WITHOUT ROWID keys are in ascending order */\n            int a1;\n            char *zErr;\n            a1 = sqlite3VdbeAddOp4Int(v, OP_IdxGT, iDataCur, 0,r2,pPk->nKeyCol);\n            VdbeCoverage(v);\n            sqlite3VdbeAddOp1(v, OP_IsNull, r2); VdbeCoverage(v);\n            zErr = sqlite3MPrintf(db,\n                   \"row not in PRIMARY KEY order for %s\",\n                    pTab->zName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n            integrityCheckResultRow(v);\n            sqlite3VdbeJumpHere(v, a1);\n            sqlite3VdbeJumpHere(v, a1+1);\n            for(j=0; j<pPk->nKeyCol; j++){\n              sqlite3ExprCodeLoadIndexColumn(pParse, pPk, iDataCur, j, r2+j);\n            }\n          }\n        }\n        /* Verify datatypes for all columns:\n        **\n        **   (1) NOT NULL columns may not contain a NULL\n        **   (2) Datatype must be exact for non-ANY columns in STRICT tables\n        **   (3) Datatype for TEXT columns in non-STRICT tables must be\n        **       NULL, TEXT, or BLOB.\n        **   (4) Datatype for numeric columns in non-STRICT tables must not\n        **       be a TEXT value that can be losslessly converted to numeric.\n        */\n        bStrict = (pTab->tabFlags & TF_Strict)!=0;\n        for(j=0; j<pTab->nCol; j++){\n          char *zErr;\n          Column *pCol = pTab->aCol + j;  /* The column to be checked */\n          int labelError;               /* Jump here to report an error */\n          int labelOk;                  /* Jump here if all looks ok */\n          int p1, p3, p4;               /* Operands to the OP_IsType opcode */\n          int doTypeCheck;              /* Check datatypes (besides NOT NULL) */\n\n          if( j==pTab->iPKey ) continue;\n          if( bStrict ){\n            doTypeCheck = pCol->eCType>COLTYPE_ANY;\n          }else{\n            doTypeCheck = pCol->affinity>SQLITE_AFF_BLOB;\n          }\n          if( pCol->notNull==0 && !doTypeCheck ) continue;\n\n          /* Compute the operands that will be needed for OP_IsType */\n          p4 = SQLITE_NULL;\n          if( pCol->colFlags & COLFLAG_VIRTUAL ){\n            sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);\n            p1 = -1;\n            p3 = 3;\n          }else{\n            if( pCol->iDflt ){\n              sqlite3_value *pDfltValue = 0;\n              sqlite3ValueFromExpr(db, sqlite3ColumnExpr(pTab,pCol), ENC(db),\n                                   pCol->affinity, &pDfltValue);\n              if( pDfltValue ){\n                p4 = sqlite3_value_type(pDfltValue);\n                sqlite3ValueFree(pDfltValue);\n              }\n            }\n            p1 = iDataCur;\n            if( !HasRowid(pTab) ){\n              testcase( j!=sqlite3TableColumnToStorage(pTab, j) );\n              p3 = sqlite3TableColumnToIndex(sqlite3PrimaryKeyIndex(pTab), j);\n            }else{\n              p3 = sqlite3TableColumnToStorage(pTab,j);\n              testcase( p3!=j);\n            }\n          }\n\n          labelError = sqlite3VdbeMakeLabel(pParse);\n          labelOk = sqlite3VdbeMakeLabel(pParse);\n          if( pCol->notNull ){\n            /* (1) NOT NULL columns may not contain a NULL */\n            int jmp3;\n            int jmp2 = sqlite3VdbeAddOp4Int(v, OP_IsType, p1, labelOk, p3, p4);\n            VdbeCoverage(v);\n            if( p1<0 ){\n              sqlite3VdbeChangeP5(v, 0x0f); /* INT, REAL, TEXT, or BLOB */\n              jmp3 = jmp2;\n            }else{\n              sqlite3VdbeChangeP5(v, 0x0d); /* INT, TEXT, or BLOB */\n              /* OP_IsType does not detect NaN values in the database file\n              ** which should be treated as a NULL.  So if the header type\n              ** is REAL, we have to load the actual data using OP_Column\n              ** to reliably determine if the value is a NULL. */\n              sqlite3VdbeAddOp3(v, OP_Column, p1, p3, 3);\n              sqlite3ColumnDefault(v, pTab, j, 3);\n              jmp3 = sqlite3VdbeAddOp2(v, OP_NotNull, 3, labelOk);\n              VdbeCoverage(v);\n            }\n            zErr = sqlite3MPrintf(db, \"NULL value in %s.%s\", pTab->zName,\n                                pCol->zCnName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n            if( doTypeCheck ){\n              sqlite3VdbeGoto(v, labelError);\n              sqlite3VdbeJumpHere(v, jmp2);\n              sqlite3VdbeJumpHere(v, jmp3);\n            }else{\n              /* VDBE byte code will fall thru */\n            }\n          }\n          if( bStrict && doTypeCheck ){\n            /* (2) Datatype must be exact for non-ANY columns in STRICT tables*/\n            static unsigned char aStdTypeMask[] = {\n               0x1f,    /* ANY */\n               0x18,    /* BLOB */\n               0x11,    /* INT */\n               0x11,    /* INTEGER */\n               0x13,    /* REAL */\n               0x14     /* TEXT */\n            };\n            sqlite3VdbeAddOp4Int(v, OP_IsType, p1, labelOk, p3, p4);\n            assert( pCol->eCType>=1 && pCol->eCType<=sizeof(aStdTypeMask) );\n            sqlite3VdbeChangeP5(v, aStdTypeMask[pCol->eCType-1]);\n            VdbeCoverage(v);\n            zErr = sqlite3MPrintf(db, \"non-%s value in %s.%s\",\n                                  sqlite3StdType[pCol->eCType-1],\n                                  pTab->zName, pTab->aCol[j].zCnName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n          }else if( !bStrict && pCol->affinity==SQLITE_AFF_TEXT ){\n            /* (3) Datatype for TEXT columns in non-STRICT tables must be\n            **     NULL, TEXT, or BLOB. */\n            sqlite3VdbeAddOp4Int(v, OP_IsType, p1, labelOk, p3, p4);\n            sqlite3VdbeChangeP5(v, 0x1c); /* NULL, TEXT, or BLOB */\n            VdbeCoverage(v);\n            zErr = sqlite3MPrintf(db, \"NUMERIC value in %s.%s\",\n                                  pTab->zName, pTab->aCol[j].zCnName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n          }else if( !bStrict && pCol->affinity>=SQLITE_AFF_NUMERIC ){\n            /* (4) Datatype for numeric columns in non-STRICT tables must not\n            **     be a TEXT value that can be converted to numeric. */\n            sqlite3VdbeAddOp4Int(v, OP_IsType, p1, labelOk, p3, p4);\n            sqlite3VdbeChangeP5(v, 0x1b); /* NULL, INT, FLOAT, or BLOB */\n            VdbeCoverage(v);\n            if( p1>=0 ){\n              sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);\n            }\n            sqlite3VdbeAddOp4(v, OP_Affinity, 3, 1, 0, \"C\", P4_STATIC);\n            sqlite3VdbeAddOp4Int(v, OP_IsType, -1, labelOk, 3, p4);\n            sqlite3VdbeChangeP5(v, 0x1c); /* NULL, TEXT, or BLOB */\n            VdbeCoverage(v);\n            zErr = sqlite3MPrintf(db, \"TEXT value in %s.%s\",\n                                  pTab->zName, pTab->aCol[j].zCnName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n          }\n          sqlite3VdbeResolveLabel(v, labelError);\n          integrityCheckResultRow(v);\n          sqlite3VdbeResolveLabel(v, labelOk);\n        }\n        /* Verify CHECK constraints */\n        if( pTab->pCheck && (db->flags & SQLITE_IgnoreChecks)==0 ){\n          ExprList *pCheck = sqlite3ExprListDup(db, pTab->pCheck, 0);\n          if( db->mallocFailed==0 ){\n            int addrCkFault = sqlite3VdbeMakeLabel(pParse);\n            int addrCkOk = sqlite3VdbeMakeLabel(pParse);\n            char *zErr;\n            int k;\n            pParse->iSelfTab = iDataCur + 1;\n            for(k=pCheck->nExpr-1; k>0; k--){\n              sqlite3ExprIfFalse(pParse, pCheck->a[k].pExpr, addrCkFault, 0);\n            }\n            sqlite3ExprIfTrue(pParse, pCheck->a[0].pExpr, addrCkOk,\n                SQLITE_JUMPIFNULL);\n            sqlite3VdbeResolveLabel(v, addrCkFault);\n            pParse->iSelfTab = 0;\n            zErr = sqlite3MPrintf(db, \"CHECK constraint failed in %s\",\n                pTab->zName);\n            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);\n            integrityCheckResultRow(v);\n            sqlite3VdbeResolveLabel(v, addrCkOk);\n          }\n          sqlite3ExprListDelete(db, pCheck);\n        }\n        if( !isQuick ){ /* Omit the remaining tests for quick_check */\n          /* Validate index entries for the current row */\n          for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){\n            int jmp2, jmp3, jmp4, jmp5, label6;\n            int kk;\n            int ckUniq = sqlite3VdbeMakeLabel(pParse);\n            if( pPk==pIdx ) continue;\n            r1 = sqlite3GenerateIndexKey(pParse, pIdx, iDataCur, 0, 0, &jmp3,\n                                         pPrior, r1);\n            pPrior = pIdx;\n            sqlite3VdbeAddOp2(v, OP_AddImm, 8+j, 1);/* increment entry count */\n            /* Verify that an index entry exists for the current table row */\n            jmp2 = sqlite3VdbeAddOp4Int(v, OP_Found, iIdxCur+j, ckUniq, r1,\n                                        pIdx->nColumn); VdbeCoverage(v);\n            sqlite3VdbeLoadString(v, 3, \"row \");\n            sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3);\n            sqlite3VdbeLoadString(v, 4, \" missing from index \");\n            sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 3);\n            jmp5 = sqlite3VdbeLoadString(v, 4, pIdx->zName);\n            sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 3);\n            jmp4 = integrityCheckResultRow(v);\n            sqlite3VdbeJumpHere(v, jmp2);\n\n            /* The OP_IdxRowid opcode is an optimized version of OP_Column\n            ** that extracts the rowid off the end of the index record.\n            ** But it only works correctly if index record does not have\n            ** any extra bytes at the end.  Verify that this is the case. */\n            if( HasRowid(pTab) ){\n              int jmp7;\n              sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur+j, 3);\n              jmp7 = sqlite3VdbeAddOp3(v, OP_Eq, 3, 0, r1+pIdx->nColumn-1);\n              VdbeCoverageNeverNull(v);\n              sqlite3VdbeLoadString(v, 3,\n                 \"rowid not at end-of-record for row \");\n              sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3);\n              sqlite3VdbeLoadString(v, 4, \" of index \");\n              sqlite3VdbeGoto(v, jmp5-1);\n              sqlite3VdbeJumpHere(v, jmp7);\n            }\n\n            /* Any indexed columns with non-BINARY collations must still hold\n            ** the exact same text value as the table. */\n            label6 = 0;\n            for(kk=0; kk<pIdx->nKeyCol; kk++){\n              if( pIdx->azColl[kk]==sqlite3StrBINARY ) continue;\n              if( label6==0 ) label6 = sqlite3VdbeMakeLabel(pParse);\n              sqlite3VdbeAddOp3(v, OP_Column, iIdxCur+j, kk, 3);\n              sqlite3VdbeAddOp3(v, OP_Ne, 3, label6, r1+kk); VdbeCoverage(v);\n            }\n            if( label6 ){\n              int jmp6 = sqlite3VdbeAddOp0(v, OP_Goto);\n              sqlite3VdbeResolveLabel(v, label6);\n              sqlite3VdbeLoadString(v, 3, \"row \");\n              sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3);\n              sqlite3VdbeLoadString(v, 4, \" values differ from index \");\n              sqlite3VdbeGoto(v, jmp5-1);\n              sqlite3VdbeJumpHere(v, jmp6);\n            }\n\n            /* For UNIQUE indexes, verify that only one entry exists with the\n            ** current key.  The entry is unique if (1) any column is NULL\n            ** or (2) the next entry has a different key */\n            if( IsUniqueIndex(pIdx) ){\n              int uniqOk = sqlite3VdbeMakeLabel(pParse);\n              int jmp6;\n              for(kk=0; kk<pIdx->nKeyCol; kk++){\n                int iCol = pIdx->aiColumn[kk];\n                assert( iCol!=XN_ROWID && iCol<pTab->nCol );\n                if( iCol>=0 && pTab->aCol[iCol].notNull ) continue;\n                sqlite3VdbeAddOp2(v, OP_IsNull, r1+kk, uniqOk);\n                VdbeCoverage(v);\n              }\n              jmp6 = sqlite3VdbeAddOp1(v, OP_Next, iIdxCur+j); VdbeCoverage(v);\n              sqlite3VdbeGoto(v, uniqOk);\n              sqlite3VdbeJumpHere(v, jmp6);\n              sqlite3VdbeAddOp4Int(v, OP_IdxGT, iIdxCur+j, uniqOk, r1,\n                                   pIdx->nKeyCol); VdbeCoverage(v);\n              sqlite3VdbeLoadString(v, 3, \"non-unique entry in index \");\n              sqlite3VdbeGoto(v, jmp5);\n              sqlite3VdbeResolveLabel(v, uniqOk);\n            }\n            sqlite3VdbeJumpHere(v, jmp4);\n            sqlite3ResolvePartIdxLabel(pParse, jmp3);\n          }\n        }\n        sqlite3VdbeAddOp2(v, OP_Next, iDataCur, loopTop); VdbeCoverage(v);\n        sqlite3VdbeJumpHere(v, loopTop-1);\n        if( pPk ){\n          assert( !isQuick );\n          sqlite3ReleaseTempRange(pParse, r2, pPk->nKeyCol);\n        }\n      }\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n      /* Second pass to invoke the xIntegrity method on all virtual\n      ** tables.\n      */\n      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n        Table *pTab = sqliteHashData(x);\n        sqlite3_vtab *pVTab;\n        int a1;\n        if( tableSkipIntegrityCheck(pTab,pObjTab) ) continue;\n        if( IsOrdinaryTable(pTab) ) continue;\n        if( !IsVirtual(pTab) ) continue;\n        if( pTab->nCol<=0 ){\n          const char *zMod = pTab->u.vtab.azArg[0];\n          if( sqlite3HashFind(&db->aModule, zMod)==0 ) continue;\n        }\n        sqlite3ViewGetColumnNames(pParse, pTab);\n        if( pTab->u.vtab.p==0 ) continue;\n        pVTab = pTab->u.vtab.p->pVtab;\n        if( NEVER(pVTab==0) ) continue;\n        if( NEVER(pVTab->pModule==0) ) continue;\n        if( pVTab->pModule->iVersion<4 ) continue;\n        if( pVTab->pModule->xIntegrity==0 ) continue;\n        sqlite3VdbeAddOp3(v, OP_VCheck, i, 3, isQuick);\n        pTab->nTabRef++;\n        sqlite3VdbeAppendP4(v, pTab, P4_TABLEREF);\n        a1 = sqlite3VdbeAddOp1(v, OP_IsNull, 3); VdbeCoverage(v);\n        integrityCheckResultRow(v);\n        sqlite3VdbeJumpHere(v, a1);\n        continue;\n      }\n#endif\n    }\n    {\n      static const int iLn = VDBE_OFFSET_LINENO(2);\n      static const VdbeOpList endCode[] = {\n        { OP_AddImm,      1, 0,        0},    /* 0 */\n        { OP_IfNotZero,   1, 4,        0},    /* 1 */\n        { OP_String8,     0, 3,        0},    /* 2 */\n        { OP_ResultRow,   3, 1,        0},    /* 3 */\n        { OP_Halt,        0, 0,        0},    /* 4 */\n        { OP_String8,     0, 3,        0},    /* 5 */\n        { OP_Goto,        0, 3,        0},    /* 6 */\n      };\n      VdbeOp *aOp;\n\n      aOp = sqlite3VdbeAddOpList(v, ArraySize(endCode), endCode, iLn);\n      if( aOp ){\n        aOp[0].p2 = 1-mxErr;\n        aOp[2].p4type = P4_STATIC;\n        aOp[2].p4.z = \"ok\";\n        aOp[5].p4type = P4_STATIC;\n        aOp[5].p4.z = (char*)sqlite3ErrStr(SQLITE_CORRUPT);\n      }\n      sqlite3VdbeChangeP3(v, 0, sqlite3VdbeCurrentAddr(v)-2);\n    }\n  }\n  break;\n#endif /* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#ifndef SQLITE_OMIT_UTF16\n  /*\n  **   PRAGMA encoding\n  **   PRAGMA encoding = \"utf-8\"|\"utf-16\"|\"utf-16le\"|\"utf-16be\"\n  **\n  ** In its first form, this pragma returns the encoding of the main\n  ** database. If the database is not initialized, it is initialized now.\n  **\n  ** The second form of this pragma is a no-op if the main database file\n  ** has not already been initialized. In this case it sets the default\n  ** encoding that will be used for the main database file if a new file\n  ** is created. If an existing main database file is opened, then the\n  ** default text encoding for the existing database is used.\n  **\n  ** In all cases new databases created using the ATTACH command are\n  ** created to use the same default text encoding as the main database. If\n  ** the main database has not been initialized and/or created when ATTACH\n  ** is executed, this is done before the ATTACH operation.\n  **\n  ** In the second form this pragma sets the text encoding to be used in\n  ** new database files created using this database handle. It is only\n  ** useful if invoked immediately after the main database i\n  */\n  case PragTyp_ENCODING: {\n    static const struct EncName {\n      char *zName;\n      u8 enc;\n    } encnames[] = {\n      { \"UTF8\",     SQLITE_UTF8        },\n      { \"UTF-8\",    SQLITE_UTF8        },  /* Must be element [1] */\n      { \"UTF-16le\", SQLITE_UTF16LE     },  /* Must be element [2] */\n      { \"UTF-16be\", SQLITE_UTF16BE     },  /* Must be element [3] */\n      { \"UTF16le\",  SQLITE_UTF16LE     },\n      { \"UTF16be\",  SQLITE_UTF16BE     },\n      { \"UTF-16\",   0                  }, /* SQLITE_UTF16NATIVE */\n      { \"UTF16\",    0                  }, /* SQLITE_UTF16NATIVE */\n      { 0, 0 }\n    };\n    const struct EncName *pEnc;\n    if( !zRight ){    /* \"PRAGMA encoding\" */\n      if( sqlite3ReadSchema(pParse) ) goto pragma_out;\n      assert( encnames[SQLITE_UTF8].enc==SQLITE_UTF8 );\n      assert( encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE );\n      assert( encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE );\n      returnSingleText(v, encnames[ENC(pParse->db)].zName);\n    }else{                        /* \"PRAGMA encoding = XXX\" */\n      /* Only change the value of sqlite.enc if the database handle is not\n      ** initialized. If the main database exists, the new sqlite.enc value\n      ** will be overwritten when the schema is next loaded. If it does not\n      ** already exists, it will be created to use the new encoding value.\n      */\n      if( (db->mDbFlags & DBFLAG_EncodingFixed)==0 ){\n        for(pEnc=&encnames[0]; pEnc->zName; pEnc++){\n          if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){\n            u8 enc = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;\n            SCHEMA_ENC(db) = enc;\n            sqlite3SetTextEncoding(db, enc);\n            break;\n          }\n        }\n        if( !pEnc->zName ){\n          sqlite3ErrorMsg(pParse, \"unsupported encoding: %s\", zRight);\n        }\n      }\n    }\n  }\n  break;\n#endif /* SQLITE_OMIT_UTF16 */\n\n#ifndef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS\n  /*\n  **   PRAGMA [schema.]schema_version\n  **   PRAGMA [schema.]schema_version = <integer>\n  **\n  **   PRAGMA [schema.]user_version\n  **   PRAGMA [schema.]user_version = <integer>\n  **\n  **   PRAGMA [schema.]freelist_count\n  **\n  **   PRAGMA [schema.]data_version\n  **\n  **   PRAGMA [schema.]application_id\n  **   PRAGMA [schema.]application_id = <integer>\n  **\n  ** The pragma's schema_version and user_version are used to set or get\n  ** the value of the schema-version and user-version, respectively. Both\n  ** the schema-version and the user-version are 32-bit signed integers\n  ** stored in the database header.\n  **\n  ** The schema-cookie is usually only manipulated internally by SQLite. It\n  ** is incremented by SQLite whenever the database schema is modified (by\n  ** creating or dropping a table or index). The schema version is used by\n  ** SQLite each time a query is executed to ensure that the internal cache\n  ** of the schema used when compiling the SQL query matches the schema of\n  ** the database against which the compiled query is actually executed.\n  ** Subverting this mechanism by using \"PRAGMA schema_version\" to modify\n  ** the schema-version is potentially dangerous and may lead to program\n  ** crashes or database corruption. Use with caution!\n  **\n  ** The user-version is not used internally by SQLite. It may be used by\n  ** applications for any purpose.\n  */\n  case PragTyp_HEADER_VALUE: {\n    int iCookie = pPragma->iArg;  /* Which cookie to read or write */\n    sqlite3VdbeUsesBtree(v, iDb);\n    if( zRight && (pPragma->mPragFlg & PragFlg_ReadOnly)==0 ){\n      /* Write the specified cookie value */\n      static const VdbeOpList setCookie[] = {\n        { OP_Transaction,    0,  1,  0},    /* 0 */\n        { OP_SetCookie,      0,  0,  0},    /* 1 */\n      };\n      VdbeOp *aOp;\n      sqlite3VdbeVerifyNoMallocRequired(v, ArraySize(setCookie));\n      aOp = sqlite3VdbeAddOpList(v, ArraySize(setCookie), setCookie, 0);\n      if( ONLY_IF_REALLOC_STRESS(aOp==0) ) break;\n      aOp[0].p1 = iDb;\n      aOp[1].p1 = iDb;\n      aOp[1].p2 = iCookie;\n      aOp[1].p3 = sqlite3Atoi(zRight);\n      aOp[1].p5 = 1;\n      if( iCookie==BTREE_SCHEMA_VERSION && (db->flags & SQLITE_Defensive)!=0 ){\n        /* Do not allow the use of PRAGMA schema_version=VALUE in defensive\n        ** mode.  Change the OP_SetCookie opcode into a no-op.  */\n        aOp[1].opcode = OP_Noop;\n      }\n    }else{\n      /* Read the specified cookie value */\n      static const VdbeOpList readCookie[] = {\n        { OP_Transaction,     0,  0,  0},    /* 0 */\n        { OP_ReadCookie,      0,  1,  0},    /* 1 */\n        { OP_ResultRow,       1,  1,  0}\n      };\n      VdbeOp *aOp;\n      sqlite3VdbeVerifyNoMallocRequired(v, ArraySize(readCookie));\n      aOp = sqlite3VdbeAddOpList(v, ArraySize(readCookie),readCookie,0);\n      if( ONLY_IF_REALLOC_STRESS(aOp==0) ) break;\n      aOp[0].p1 = iDb;\n      aOp[1].p1 = iDb;\n      aOp[1].p3 = iCookie;\n      sqlite3VdbeReusable(v);\n    }\n  }\n  break;\n#endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */\n\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\n  /*\n  **   PRAGMA compile_options\n  **\n  ** Return the names of all compile-time options used in this build,\n  ** one option per row.\n  */\n  case PragTyp_COMPILE_OPTIONS: {\n    int i = 0;\n    const char *zOpt;\n    pParse->nMem = 1;\n    while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){\n      sqlite3VdbeLoadString(v, 1, zOpt);\n      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);\n    }\n    sqlite3VdbeReusable(v);\n  }\n  break;\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n\n#ifndef SQLITE_OMIT_WAL\n  /*\n  **   PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate\n  **\n  ** Checkpoint the database.\n  */\n  case PragTyp_WAL_CHECKPOINT: {\n    int iBt = (pId2->z?iDb:SQLITE_MAX_DB);\n    int eMode = SQLITE_CHECKPOINT_PASSIVE;\n    if( zRight ){\n      if( sqlite3StrICmp(zRight, \"full\")==0 ){\n        eMode = SQLITE_CHECKPOINT_FULL;\n      }else if( sqlite3StrICmp(zRight, \"restart\")==0 ){\n        eMode = SQLITE_CHECKPOINT_RESTART;\n      }else if( sqlite3StrICmp(zRight, \"truncate\")==0 ){\n        eMode = SQLITE_CHECKPOINT_TRUNCATE;\n      }else if( sqlite3StrICmp(zRight, \"noop\")==0 ){\n        eMode = SQLITE_CHECKPOINT_NOOP;\n      }\n    }\n    pParse->nMem = 3;\n    sqlite3VdbeAddOp3(v, OP_Checkpoint, iBt, eMode, 1);\n    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);\n  }\n  break;\n\n  /*\n  **   PRAGMA wal_autocheckpoint\n  **   PRAGMA wal_autocheckpoint = N\n  **\n  ** Configure a database connection to automatically checkpoint a database\n  ** after accumulating N frames in the log. Or query for the current value\n  ** of N.\n  */\n  case PragTyp_WAL_AUTOCHECKPOINT: {\n    if( zRight ){\n      sqlite3_wal_autocheckpoint(db, sqlite3Atoi(zRight));\n    }\n    returnSingleInt(v,\n       db->xWalCallback==sqlite3WalDefaultHook ?\n           SQLITE_PTR_TO_INT(db->pWalArg) : 0);\n  }\n  break;\n#endif\n\n  /*\n  **  PRAGMA shrink_memory\n  **\n  ** IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database\n  ** connection on which it is invoked to free up as much memory as it\n  ** can, by calling sqlite3_db_release_memory().\n  */\n  case PragTyp_SHRINK_MEMORY: {\n    sqlite3_db_release_memory(db);\n    break;\n  }\n\n  /*\n  **  PRAGMA optimize\n  **  PRAGMA optimize(MASK)\n  **  PRAGMA schema.optimize\n  **  PRAGMA schema.optimize(MASK)\n  **\n  ** Attempt to optimize the database.  All schemas are optimized in the first\n  ** two forms, and only the specified schema is optimized in the latter two.\n  **\n  ** The details of optimizations performed by this pragma are expected\n  ** to change and improve over time.  Applications should anticipate that\n  ** this pragma will perform new optimizations in future releases.\n  **\n  ** The optional argument is a bitmask of optimizations to perform:\n  **\n  **    0x00001    Debugging mode.  Do not actually perform any optimizations\n  **               but instead return one line of text for each optimization\n  **               that would have been done.  Off by default.\n  **\n  **    0x00002    Run ANALYZE on tables that might benefit.  On by default.\n  **               See below for additional information.\n  **\n  **    0x00010    Run all ANALYZE operations using an analysis_limit that\n  **               is the lessor of the current analysis_limit and the\n  **               SQLITE_DEFAULT_OPTIMIZE_LIMIT compile-time option.\n  **               The default value of SQLITE_DEFAULT_OPTIMIZE_LIMIT is\n  **               currently (2024-02-19) set to 2000, which is such that\n  **               the worst case run-time for PRAGMA optimize on a 100MB\n  **               database will usually be less than 100 milliseconds on\n  **               a RaspberryPI-4 class machine.  On by default.\n  **\n  **    0x10000    Look at tables to see if they need to be reanalyzed\n  **               due to growth or shrinkage even if they have not been\n  **               queried during the current connection.  Off by default.\n  **\n  ** The default MASK is and always shall be 0x0fffe.  In the current\n  ** implementation, the default mask only covers the 0x00002 optimization,\n  ** though additional optimizations that are covered by 0x0fffe might be\n  ** added in the future.  Optimizations that are off by default and must\n  ** be explicitly requested have masks of 0x10000 or greater.\n  **\n  ** DETERMINATION OF WHEN TO RUN ANALYZE\n  **\n  ** In the current implementation, a table is analyzed if only if all of\n  ** the following are true:\n  **\n  ** (1) MASK bit 0x00002 is set.\n  **\n  ** (2) The table is an ordinary table, not a virtual table or view.\n  **\n  ** (3) The table name does not begin with \"sqlite_\".\n  **\n  ** (4) One or more of the following is true:\n  **      (4a) The 0x10000 MASK bit is set.\n  **      (4b) One or more indexes on the table lacks an entry\n  **           in the sqlite_stat1 table.\n  **      (4c) The query planner used sqlite_stat1-style statistics for one\n  **           or more indexes of the table at some point during the lifetime\n  **           of the current connection.\n  **\n  ** (5) One or more of the following is true:\n  **      (5a) One or more indexes on the table lacks an entry\n  **           in the sqlite_stat1 table.  (Same as 4a)\n  **      (5b) The number of rows in the table has increased or decreased by\n  **           10-fold.  In other words, the current size of the table is\n  **           10 times larger than the size in sqlite_stat1 or else the\n  **           current size is less than 1/10th the size in sqlite_stat1.\n  **\n  ** The rules for when tables are analyzed are likely to change in\n  ** future releases.  Future versions of SQLite might accept a string\n  ** literal argument to this pragma that contains a mnemonic description\n  ** of the options rather than a bitmap.\n  */\n  case PragTyp_OPTIMIZE: {\n    int iDbLast;           /* Loop termination point for the schema loop */\n    int iTabCur;           /* Cursor for a table whose size needs checking */\n    HashElem *k;           /* Loop over tables of a schema */\n    Schema *pSchema;       /* The current schema */\n    Table *pTab;           /* A table in the schema */\n    Index *pIdx;           /* An index of the table */\n    LogEst szThreshold;    /* Size threshold above which reanalysis needed */\n    char *zSubSql;         /* SQL statement for the OP_SqlExec opcode */\n    u32 opMask;            /* Mask of operations to perform */\n    int nLimit;            /* Analysis limit to use */\n    int nCheck = 0;        /* Number of tables to be optimized */\n    int nBtree = 0;        /* Number of btrees to scan */\n    int nIndex;            /* Number of indexes on the current table */\n\n    if( zRight ){\n      opMask = (u32)sqlite3Atoi(zRight);\n      if( (opMask & 0x02)==0 ) break;\n    }else{\n      opMask = 0xfffe;\n    }\n    if( (opMask & 0x10)==0 ){\n      nLimit = 0;\n    }else if( db->nAnalysisLimit>0\n           && db->nAnalysisLimit<SQLITE_DEFAULT_OPTIMIZE_LIMIT ){\n      nLimit = 0;\n    }else{\n      nLimit = SQLITE_DEFAULT_OPTIMIZE_LIMIT;\n    }\n    iTabCur = pParse->nTab++;\n    for(iDbLast = zDb?iDb:db->nDb-1; iDb<=iDbLast; iDb++){\n      if( iDb==1 ) continue;\n      sqlite3CodeVerifySchema(pParse, iDb);\n      pSchema = db->aDb[iDb].pSchema;\n      for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){\n        pTab = (Table*)sqliteHashData(k);\n\n        /* This only works for ordinary tables */\n        if( !IsOrdinaryTable(pTab) ) continue;\n\n        /* Do not scan system tables */\n        if( 0==sqlite3StrNICmp(pTab->zName, \"sqlite_\", 7) ) continue;\n\n        /* Find the size of the table as last recorded in sqlite_stat1.\n        ** If any index is unanalyzed, then the threshold is -1 to\n        ** indicate a new, unanalyzed index\n        */\n        szThreshold = pTab->nRowLogEst;\n        nIndex = 0;\n        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n          nIndex++;\n          if( !pIdx->hasStat1 ){\n            szThreshold = -1; /* Always analyze if any index lacks statistics */\n          }\n        }\n\n        /* If table pTab has not been used in a way that would benefit from\n        ** having analysis statistics during the current session, then skip it,\n        ** unless the 0x10000 MASK bit is set. */\n        if( (pTab->tabFlags & TF_MaybeReanalyze)!=0 ){\n          /* Check for size change if stat1 has been used for a query */\n        }else if( opMask & 0x10000 ){\n          /* Check for size change if 0x10000 is set */\n        }else if( pTab->pIndex!=0 && szThreshold<0 ){\n          /* Do analysis if unanalyzed indexes exists */\n        }else{\n          /* Otherwise, we can skip this table */\n          continue;\n        }\n\n        nCheck++;\n        if( nCheck==2 ){\n          /* If ANALYZE might be invoked two or more times, hold a write\n          ** transaction for efficiency */\n          sqlite3BeginWriteOperation(pParse, 0, iDb);\n        }\n        nBtree += nIndex+1;\n\n        /* Reanalyze if the table is 10 times larger or smaller than\n        ** the last analysis.  Unconditional reanalysis if there are\n        ** unanalyzed indexes. */\n        sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);\n        if( szThreshold>=0 ){\n          const LogEst iRange = 33;   /* 10x size change */\n          sqlite3VdbeAddOp4Int(v, OP_IfSizeBetween, iTabCur,\n                         sqlite3VdbeCurrentAddr(v)+2+(opMask&1),\n                         szThreshold>=iRange ? szThreshold-iRange : -1,\n                         szThreshold+iRange);\n          VdbeCoverage(v);\n        }else{\n          sqlite3VdbeAddOp2(v, OP_Rewind, iTabCur,\n                         sqlite3VdbeCurrentAddr(v)+2+(opMask&1));\n          VdbeCoverage(v);\n        }\n        zSubSql = sqlite3MPrintf(db, \"ANALYZE \\\"%w\\\".\\\"%w\\\"\",\n                                 db->aDb[iDb].zDbSName, pTab->zName);\n        if( opMask & 0x01 ){\n          int r1 = sqlite3GetTempReg(pParse);\n          sqlite3VdbeAddOp4(v, OP_String8, 0, r1, 0, zSubSql, P4_DYNAMIC);\n          sqlite3VdbeAddOp2(v, OP_ResultRow, r1, 1);\n        }else{\n          sqlite3VdbeAddOp4(v, OP_SqlExec, nLimit ? 0x02 : 00, nLimit, 0,\n                            zSubSql, P4_DYNAMIC);\n        }\n      }\n    }\n    sqlite3VdbeAddOp0(v, OP_Expire);\n\n    /* In a schema with a large number of tables and indexes, scale back\n    ** the analysis_limit to avoid excess run-time in the worst case.\n    */\n    if( !db->mallocFailed && nLimit>0 && nBtree>100 ){\n      int iAddr, iEnd;\n      VdbeOp *aOp;\n      nLimit = 100*nLimit/nBtree;\n      if( nLimit<100 ) nLimit = 100;\n      aOp = sqlite3VdbeGetOp(v, 0);\n      iEnd = sqlite3VdbeCurrentAddr(v);\n      for(iAddr=0; iAddr<iEnd; iAddr++){\n        if( aOp[iAddr].opcode==OP_SqlExec ) aOp[iAddr].p2 = nLimit;\n      }\n    }\n    break;\n  }\n\n  /*\n  **   PRAGMA busy_timeout\n  **   PRAGMA busy_timeout = N\n  **\n  ** Call sqlite3_busy_timeout(db, N).  Return the current timeout value\n  ** if one is set.  If no busy handler or a different busy handler is set\n  ** then 0 is returned.  Setting the busy_timeout to 0 or negative\n  ** disables the timeout.\n  */\n  /*case PragTyp_BUSY_TIMEOUT*/ default: {\n    assert( pPragma->ePragTyp==PragTyp_BUSY_TIMEOUT );\n    if( zRight ){\n      sqlite3_busy_timeout(db, sqlite3Atoi(zRight));\n    }\n    returnSingleInt(v, db->busyTimeout);\n    break;\n  }\n\n  /*\n  **   PRAGMA soft_heap_limit\n  **   PRAGMA soft_heap_limit = N\n  **\n  ** IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the\n  ** sqlite3_soft_heap_limit64() interface with the argument N, if N is\n  ** specified and is a non-negative integer.\n  ** IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always\n  ** returns the same integer that would be returned by the\n  ** sqlite3_soft_heap_limit64(-1) C-language function.\n  */\n  case PragTyp_SOFT_HEAP_LIMIT: {\n    sqlite3_int64 N;\n    if( zRight && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK ){\n      sqlite3_soft_heap_limit64(N);\n    }\n    returnSingleInt(v, sqlite3_soft_heap_limit64(-1));\n    break;\n  }\n\n  /*\n  **   PRAGMA hard_heap_limit\n  **   PRAGMA hard_heap_limit = N\n  **\n  ** Invoke sqlite3_hard_heap_limit64() to query or set the hard heap\n  ** limit.  The hard heap limit can be activated or lowered by this\n  ** pragma, but not raised or deactivated.  Only the\n  ** sqlite3_hard_heap_limit64() C-language API can raise or deactivate\n  ** the hard heap limit.  This allows an application to set a heap limit\n  ** constraint that cannot be relaxed by an untrusted SQL script.\n  */\n  case PragTyp_HARD_HEAP_LIMIT: {\n    sqlite3_int64 N;\n    if( zRight && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK ){\n      sqlite3_int64 iPrior = sqlite3_hard_heap_limit64(-1);\n      if( N>0 && (iPrior==0 || iPrior>N) ) sqlite3_hard_heap_limit64(N);\n    }\n    returnSingleInt(v, sqlite3_hard_heap_limit64(-1));\n    break;\n  }\n\n  /*\n  **   PRAGMA threads\n  **   PRAGMA threads = N\n  **\n  ** Configure the maximum number of worker threads.  Return the new\n  ** maximum, which might be less than requested.\n  */\n  case PragTyp_THREADS: {\n    sqlite3_int64 N;\n    if( zRight\n     && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK\n     && N>=0\n    ){\n      sqlite3_limit(db, SQLITE_LIMIT_WORKER_THREADS, (int)(N&0x7fffffff));\n    }\n    returnSingleInt(v, sqlite3_limit(db, SQLITE_LIMIT_WORKER_THREADS, -1));\n    break;\n  }\n\n  /*\n  **   PRAGMA analysis_limit\n  **   PRAGMA analysis_limit = N\n  **\n  ** Configure the maximum number of rows that ANALYZE will examine\n  ** in each index that it looks at.  Return the new limit.\n  */\n  case PragTyp_ANALYSIS_LIMIT: {\n    sqlite3_int64 N;\n    if( zRight\n     && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK /* IMP: R-40975-20399 */\n     && N>=0\n    ){\n      db->nAnalysisLimit = (int)(N&0x7fffffff);\n    }\n    returnSingleInt(v, db->nAnalysisLimit); /* IMP: R-57594-65522 */\n    break;\n  }\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  /*\n  ** Report the current state of file logs for all databases\n  */\n  case PragTyp_LOCK_STATUS: {\n    static const char *const azLockName[] = {\n      \"unlocked\", \"shared\", \"reserved\", \"pending\", \"exclusive\"\n    };\n    int i;\n    pParse->nMem = 2;\n    for(i=0; i<db->nDb; i++){\n      Btree *pBt;\n      const char *zState = \"unknown\";\n      int j;\n      if( db->aDb[i].zDbSName==0 ) continue;\n      pBt = db->aDb[i].pBt;\n      if( pBt==0 || sqlite3BtreePager(pBt)==0 ){\n        zState = \"closed\";\n      }else if( sqlite3_file_control(db, i ? db->aDb[i].zDbSName : 0,\n                                     SQLITE_FCNTL_LOCKSTATE, &j)==SQLITE_OK ){\n         zState = azLockName[j];\n      }\n      sqlite3VdbeMultiLoad(v, 1, \"ss\", db->aDb[i].zDbSName, zState);\n    }\n    break;\n  }\n#endif\n\n#if defined(SQLITE_ENABLE_CEROD)\n  case PragTyp_ACTIVATE_EXTENSIONS: if( zRight ){\n    if( sqlite3StrNICmp(zRight, \"cerod-\", 6)==0 ){\n      sqlite3_activate_cerod(&zRight[6]);\n    }\n  }\n  break;\n#endif\n\n  } /* End of the PRAGMA switch */\n\n  /* The following block is a no-op unless SQLITE_DEBUG is defined. Its only\n  ** purpose is to execute assert() statements to verify that if the\n  ** PragFlg_NoColumns1 flag is set and the caller specified an argument\n  ** to the PRAGMA, the implementation has not added any OP_ResultRow\n  ** instructions to the VM.  */\n  if( (pPragma->mPragFlg & PragFlg_NoColumns1) && zRight ){\n    sqlite3VdbeVerifyNoResultRow(v);\n  }\n\npragma_out:\n  sqlite3DbFree(db, zLeft);\n  sqlite3DbFree(db, zRight);\n}\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*****************************************************************************\n** Implementation of an eponymous virtual table that runs a pragma.\n**\n*/\ntypedef struct PragmaVtab PragmaVtab;\ntypedef struct PragmaVtabCursor PragmaVtabCursor;\nstruct PragmaVtab {\n  sqlite3_vtab base;        /* Base class.  Must be first */\n  sqlite3 *db;              /* The database connection to which it belongs */\n  const PragmaName *pName;  /* Name of the pragma */\n  u8 nHidden;               /* Number of hidden columns */\n  u8 iHidden;               /* Index of the first hidden column */\n};\nstruct PragmaVtabCursor {\n  sqlite3_vtab_cursor base; /* Base class.  Must be first */\n  sqlite3_stmt *pPragma;    /* The pragma statement to run */\n  sqlite_int64 iRowid;      /* Current rowid */\n  char *azArg[2];           /* Value of the argument and schema */\n};\n\n/*\n** Pragma virtual table module xConnect method.\n*/\nstatic int pragmaVtabConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  const PragmaName *pPragma = (const PragmaName*)pAux;\n  PragmaVtab *pTab = 0;\n  int rc;\n  int i, j;\n  char cSep = '(';\n  StrAccum acc;\n  char zBuf[200];\n\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(argv);\n  sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);\n  sqlite3_str_appendall(&acc, \"CREATE TABLE x\");\n  for(i=0, j=pPragma->iPragCName; i<pPragma->nPragCName; i++, j++){\n    sqlite3_str_appendf(&acc, \"%c\\\"%s\\\"\", cSep, pragCName[j]);\n    cSep = ',';\n  }\n  if( i==0 ){\n    sqlite3_str_appendf(&acc, \"(\\\"%s\\\"\", pPragma->zName);\n    i++;\n  }\n  j = 0;\n  if( pPragma->mPragFlg & PragFlg_Result1 ){\n    sqlite3_str_appendall(&acc, \",arg HIDDEN\");\n    j++;\n  }\n  if( pPragma->mPragFlg & (PragFlg_SchemaOpt|PragFlg_SchemaReq) ){\n    sqlite3_str_appendall(&acc, \",schema HIDDEN\");\n    j++;\n  }\n  sqlite3_str_append(&acc, \")\", 1);\n  sqlite3StrAccumFinish(&acc);\n  assert( strlen(zBuf) < sizeof(zBuf)-1 );\n  rc = sqlite3_declare_vtab(db, zBuf);\n  if( rc==SQLITE_OK ){\n    pTab = (PragmaVtab*)sqlite3_malloc(sizeof(PragmaVtab));\n    if( pTab==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(pTab, 0, sizeof(PragmaVtab));\n      pTab->pName = pPragma;\n      pTab->db = db;\n      pTab->iHidden = i;\n      pTab->nHidden = j;\n    }\n  }else{\n    *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n  }\n\n  *ppVtab = (sqlite3_vtab*)pTab;\n  return rc;\n}\n\n/*\n** Pragma virtual table module xDisconnect method.\n*/\nstatic int pragmaVtabDisconnect(sqlite3_vtab *pVtab){\n  PragmaVtab *pTab = (PragmaVtab*)pVtab;\n  sqlite3_free(pTab);\n  return SQLITE_OK;\n}\n\n/* Figure out the best index to use to search a pragma virtual table.\n**\n** There are not really any index choices.  But we want to encourage the\n** query planner to give == constraints on as many hidden parameters as\n** possible, and especially on the first hidden parameter.  So return a\n** high cost if hidden parameters are unconstrained.\n*/\nstatic int pragmaVtabBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){\n  PragmaVtab *pTab = (PragmaVtab*)tab;\n  const struct sqlite3_index_constraint *pConstraint;\n  int i, j;\n  int seen[2];\n\n  pIdxInfo->estimatedCost = (double)1;\n  if( pTab->nHidden==0 ){ return SQLITE_OK; }\n  pConstraint = pIdxInfo->aConstraint;\n  seen[0] = 0;\n  seen[1] = 0;\n  for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){\n    if( pConstraint->iColumn < pTab->iHidden ) continue;\n    if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;\n    if( pConstraint->usable==0 ) return SQLITE_CONSTRAINT;\n    j = pConstraint->iColumn - pTab->iHidden;\n    assert( j < 2 );\n    seen[j] = i+1;\n  }\n  if( seen[0]==0 ){\n    pIdxInfo->estimatedCost = (double)2147483647;\n    pIdxInfo->estimatedRows = 2147483647;\n    return SQLITE_OK;\n  }\n  j = seen[0]-1;\n  pIdxInfo->aConstraintUsage[j].argvIndex = 1;\n  pIdxInfo->aConstraintUsage[j].omit = 1;\n  pIdxInfo->estimatedCost = (double)20;\n  pIdxInfo->estimatedRows = 20;\n  if( seen[1] ){\n    j = seen[1]-1;\n    pIdxInfo->aConstraintUsage[j].argvIndex = 2;\n    pIdxInfo->aConstraintUsage[j].omit = 1;\n  }\n  return SQLITE_OK;\n}\n\n/* Create a new cursor for the pragma virtual table */\nstatic int pragmaVtabOpen(sqlite3_vtab *pVtab, sqlite3_vtab_cursor **ppCursor){\n  PragmaVtabCursor *pCsr;\n  pCsr = (PragmaVtabCursor*)sqlite3_malloc(sizeof(*pCsr));\n  if( pCsr==0 ) return SQLITE_NOMEM;\n  memset(pCsr, 0, sizeof(PragmaVtabCursor));\n  pCsr->base.pVtab = pVtab;\n  *ppCursor = &pCsr->base;\n  return SQLITE_OK;\n}\n\n/* Clear all content from pragma virtual table cursor. */\nstatic void pragmaVtabCursorClear(PragmaVtabCursor *pCsr){\n  int i;\n  sqlite3_finalize(pCsr->pPragma);\n  pCsr->pPragma = 0;\n  pCsr->iRowid = 0;\n  for(i=0; i<ArraySize(pCsr->azArg); i++){\n    sqlite3_free(pCsr->azArg[i]);\n    pCsr->azArg[i] = 0;\n  }\n}\n\n/* Close a pragma virtual table cursor */\nstatic int pragmaVtabClose(sqlite3_vtab_cursor *cur){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)cur;\n  pragmaVtabCursorClear(pCsr);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/* Advance the pragma virtual table cursor to the next row */\nstatic int pragmaVtabNext(sqlite3_vtab_cursor *pVtabCursor){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;\n  int rc = SQLITE_OK;\n\n  /* Increment the xRowid value */\n  pCsr->iRowid++;\n  assert( pCsr->pPragma );\n  if( SQLITE_ROW!=sqlite3_step(pCsr->pPragma) ){\n    rc = sqlite3_finalize(pCsr->pPragma);\n    pCsr->pPragma = 0;\n    pragmaVtabCursorClear(pCsr);\n  }\n  return rc;\n}\n\n/*\n** Pragma virtual table module xFilter method.\n*/\nstatic int pragmaVtabFilter(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;\n  PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);\n  int rc;\n  int i, j;\n  StrAccum acc;\n  char *zSql;\n\n  UNUSED_PARAMETER(idxNum);\n  UNUSED_PARAMETER(idxStr);\n  pragmaVtabCursorClear(pCsr);\n  j = (pTab->pName->mPragFlg & PragFlg_Result1)!=0 ? 0 : 1;\n  for(i=0; i<argc; i++, j++){\n    const char *zText = (const char*)sqlite3_value_text(argv[i]);\n    assert( j<ArraySize(pCsr->azArg) );\n    assert( pCsr->azArg[j]==0 );\n    if( zText ){\n      pCsr->azArg[j] = sqlite3_mprintf(\"%s\", zText);\n      if( pCsr->azArg[j]==0 ){\n        return SQLITE_NOMEM;\n      }\n    }\n  }\n  sqlite3StrAccumInit(&acc, 0, 0, 0, pTab->db->aLimit[SQLITE_LIMIT_SQL_LENGTH]);\n  sqlite3_str_appendall(&acc, \"PRAGMA \");\n  if( pCsr->azArg[1] ){\n    sqlite3_str_appendf(&acc, \"%Q.\", pCsr->azArg[1]);\n  }\n  sqlite3_str_appendall(&acc, pTab->pName->zName);\n  if( pCsr->azArg[0] ){\n    sqlite3_str_appendf(&acc, \"=%Q\", pCsr->azArg[0]);\n  }\n  zSql = sqlite3StrAccumFinish(&acc);\n  if( zSql==0 ) return SQLITE_NOMEM;\n  rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pPragma, 0);\n  sqlite3_free(zSql);\n  if( rc!=SQLITE_OK ){\n    pTab->base.zErrMsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(pTab->db));\n    return rc;\n  }\n  return pragmaVtabNext(pVtabCursor);\n}\n\n/*\n** Pragma virtual table module xEof method.\n*/\nstatic int pragmaVtabEof(sqlite3_vtab_cursor *pVtabCursor){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;\n  return (pCsr->pPragma==0);\n}\n\n/* The xColumn method simply returns the corresponding column from\n** the PRAGMA.\n*/\nstatic int pragmaVtabColumn(\n  sqlite3_vtab_cursor *pVtabCursor,\n  sqlite3_context *ctx,\n  int i\n){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;\n  PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);\n  if( i<pTab->iHidden ){\n    sqlite3_result_value(ctx, sqlite3_column_value(pCsr->pPragma, i));\n  }else{\n    sqlite3_result_text(ctx, pCsr->azArg[i-pTab->iHidden],-1,SQLITE_TRANSIENT);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Pragma virtual table module xRowid method.\n*/\nstatic int pragmaVtabRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *p){\n  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;\n  *p = pCsr->iRowid;\n  return SQLITE_OK;\n}\n\n/* The pragma virtual table object */\nstatic const sqlite3_module pragmaVtabModule = {\n  0,                           /* iVersion */\n  0,                           /* xCreate - create a table */\n  pragmaVtabConnect,           /* xConnect - connect to an existing table */\n  pragmaVtabBestIndex,         /* xBestIndex - Determine search strategy */\n  pragmaVtabDisconnect,        /* xDisconnect - Disconnect from a table */\n  0,                           /* xDestroy - Drop a table */\n  pragmaVtabOpen,              /* xOpen - open a cursor */\n  pragmaVtabClose,             /* xClose - close a cursor */\n  pragmaVtabFilter,            /* xFilter - configure scan constraints */\n  pragmaVtabNext,              /* xNext - advance a cursor */\n  pragmaVtabEof,               /* xEof */\n  pragmaVtabColumn,            /* xColumn - read data */\n  pragmaVtabRowid,             /* xRowid - read data */\n  0,                           /* xUpdate - write data */\n  0,                           /* xBegin - begin transaction */\n  0,                           /* xSync - sync transaction */\n  0,                           /* xCommit - commit transaction */\n  0,                           /* xRollback - rollback transaction */\n  0,                           /* xFindFunction - function overloading */\n  0,                           /* xRename - rename the table */\n  0,                           /* xSavepoint */\n  0,                           /* xRelease */\n  0,                           /* xRollbackTo */\n  0,                           /* xShadowName */\n  0                            /* xIntegrity */\n};\n\n/*\n** Check to see if zTabName is really the name of a pragma.  If it is,\n** then register an eponymous virtual table for that pragma and return\n** a pointer to the Module object for the new virtual table.\n*/\nSQLITE_PRIVATE Module *sqlite3PragmaVtabRegister(sqlite3 *db, const char *zName){\n  const PragmaName *pName;\n  assert( sqlite3_strnicmp(zName, \"pragma_\", 7)==0 );\n  pName = pragmaLocate(zName+7);\n  if( pName==0 ) return 0;\n  if( (pName->mPragFlg & (PragFlg_Result0|PragFlg_Result1))==0 ) return 0;\n  assert( sqlite3HashFind(&db->aModule, zName)==0 );\n  return sqlite3VtabCreateModule(db, zName, &pragmaVtabModule, (void*)pName, 0);\n}\n\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n#endif /* SQLITE_OMIT_PRAGMA */\n\n/************** End of pragma.c **********************************************/\n/************** Begin file prepare.c *****************************************/\n/*\n** 2005 May 25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the implementation of the sqlite3_prepare()\n** interface, and routines that contribute to loading the database schema\n** from disk.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** Fill the InitData structure with an error message that indicates\n** that the database is corrupt.\n*/\nstatic void corruptSchema(\n  InitData *pData,     /* Initialization context */\n  char **azObj,        /* Type and name of object being parsed */\n  const char *zExtra   /* Error information */\n){\n  sqlite3 *db = pData->db;\n  if( db->mallocFailed ){\n    pData->rc = SQLITE_NOMEM_BKPT;\n  }else if( pData->pzErrMsg[0]!=0 ){\n    /* A error message has already been generated.  Do not overwrite it */\n  }else if( pData->mInitFlags & (INITFLAG_AlterMask) ){\n    static const char *azAlterType[] = {\n       \"rename\",\n       \"drop column\",\n       \"add column\"\n    };\n    *pData->pzErrMsg = sqlite3MPrintf(db,\n        \"error in %s %s after %s: %s\", azObj[0], azObj[1],\n        azAlterType[(pData->mInitFlags&INITFLAG_AlterMask)-1],\n        zExtra\n    );\n    pData->rc = SQLITE_ERROR;\n  }else if( db->flags & SQLITE_WriteSchema ){\n    pData->rc = SQLITE_CORRUPT_BKPT;\n  }else{\n    char *z;\n    const char *zObj = azObj[1] ? azObj[1] : \"?\";\n    z = sqlite3MPrintf(db, \"malformed database schema (%s)\", zObj);\n    if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, \"%z - %s\", z, zExtra);\n    *pData->pzErrMsg = z;\n    pData->rc = SQLITE_CORRUPT_BKPT;\n  }\n}\n\n/*\n** Check to see if any sibling index (another index on the same table)\n** of pIndex has the same root page number, and if it does, return true.\n** This would indicate a corrupt schema.\n*/\nSQLITE_PRIVATE int sqlite3IndexHasDuplicateRootPage(Index *pIndex){\n  Index *p;\n  for(p=pIndex->pTable->pIndex; p; p=p->pNext){\n    if( p->tnum==pIndex->tnum && p!=pIndex ) return 1;\n  }\n  return 0;\n}\n\n/* forward declaration */\nstatic int sqlite3Prepare(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  u32 prepFlags,            /* Zero or more SQLITE_PREPARE_* flags */\n  Vdbe *pReprepare,         /* VM being reprepared */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n);\n\n\n/*\n** This is the callback routine for the code that initializes the\n** database.  See sqlite3Init() below for additional information.\n** This routine is also called from the OP_ParseSchema opcode of the VDBE.\n**\n** Each callback contains the following information:\n**\n**     argv[0] = type of object: \"table\", \"index\", \"trigger\", or \"view\".\n**     argv[1] = name of thing being created\n**     argv[2] = associated table if an index or trigger\n**     argv[3] = root page number for table or index. 0 for trigger or view.\n**     argv[4] = SQL text for the CREATE statement.\n**\n*/\nSQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){\n  InitData *pData = (InitData*)pInit;\n  sqlite3 *db = pData->db;\n  int iDb = pData->iDb;\n\n  assert( argc==5 );\n  UNUSED_PARAMETER2(NotUsed, argc);\n  assert( sqlite3_mutex_held(db->mutex) );\n  db->mDbFlags |= DBFLAG_EncodingFixed;\n  if( argv==0 ) return 0;   /* Might happen if EMPTY_RESULT_CALLBACKS are on */\n  pData->nInitRow++;\n  if( db->mallocFailed ){\n    corruptSchema(pData, argv, 0);\n    return 1;\n  }\n\n  assert( iDb>=0 && iDb<db->nDb );\n  if( argv[3]==0 ){\n    corruptSchema(pData, argv, 0);\n  }else if( argv[4]\n         && 'c'==sqlite3UpperToLower[(unsigned char)argv[4][0]]\n         && 'r'==sqlite3UpperToLower[(unsigned char)argv[4][1]] ){\n    /* Call the parser to process a CREATE TABLE, INDEX or VIEW.\n    ** But because db->init.busy is set to 1, no VDBE code is generated\n    ** or executed.  All the parser does is build the internal data\n    ** structures that describe the table, index, or view.\n    **\n    ** No other valid SQL statement, other than the variable CREATE statements,\n    ** can begin with the letters \"C\" and \"R\".  Thus, it is not possible run\n    ** any other kind of statement while parsing the schema, even a corrupt\n    ** schema.\n    */\n    int rc;\n    u8 saved_iDb = db->init.iDb;\n    sqlite3_stmt *pStmt;\n    TESTONLY(int rcp);            /* Return code from sqlite3_prepare() */\n\n    assert( db->init.busy );\n    db->init.iDb = iDb;\n    if( sqlite3GetUInt32(argv[3], &db->init.newTnum)==0\n     || (db->init.newTnum>pData->mxPage && pData->mxPage>0)\n    ){\n      if( sqlite3Config.bExtraSchemaChecks ){\n        corruptSchema(pData, argv, \"invalid rootpage\");\n      }\n    }\n    db->init.orphanTrigger = 0;\n    db->init.azInit = (const char**)argv;\n    pStmt = 0;\n    TESTONLY(rcp = ) sqlite3Prepare(db, argv[4], -1, 0, 0, &pStmt, 0);\n    rc = db->errCode;\n    assert( (rc&0xFF)==(rcp&0xFF) );\n    db->init.iDb = saved_iDb;\n    /* assert( saved_iDb==0 || (db->mDbFlags & DBFLAG_Vacuum)!=0 ); */\n    if( SQLITE_OK!=rc ){\n      if( db->init.orphanTrigger ){\n        assert( iDb==1 );\n      }else{\n        if( rc > pData->rc ) pData->rc = rc;\n        if( rc==SQLITE_NOMEM ){\n          sqlite3OomFault(db);\n        }else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){\n          corruptSchema(pData, argv, sqlite3_errmsg(db));\n        }\n      }\n    }\n    db->init.azInit = sqlite3StdType; /* Any array of string ptrs will do */\n    sqlite3_finalize(pStmt);\n  }else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){\n    corruptSchema(pData, argv, 0);\n  }else{\n    /* If the SQL column is blank it means this is an index that\n    ** was created to be the PRIMARY KEY or to fulfill a UNIQUE\n    ** constraint for a CREATE TABLE.  The index should have already\n    ** been created when we processed the CREATE TABLE.  All we have\n    ** to do here is record the root page number for that index.\n    */\n    Index *pIndex;\n    pIndex = sqlite3FindIndex(db, argv[1], db->aDb[iDb].zDbSName);\n    if( pIndex==0 ){\n      corruptSchema(pData, argv, \"orphan index\");\n    }else\n    if( sqlite3GetUInt32(argv[3],&pIndex->tnum)==0\n     || pIndex->tnum<2\n     || pIndex->tnum>pData->mxPage\n     || sqlite3IndexHasDuplicateRootPage(pIndex)\n    ){\n      if( sqlite3Config.bExtraSchemaChecks ){\n        corruptSchema(pData, argv, \"invalid rootpage\");\n      }\n    }\n  }\n  return 0;\n}\n\n/*\n** Attempt to read the database schema and initialize internal\n** data structures for a single database file.  The index of the\n** database file is given by iDb.  iDb==0 is used for the main\n** database.  iDb==1 should never be used.  iDb>=2 is used for\n** auxiliary databases.  Return one of the SQLITE_ error codes to\n** indicate success or failure.\n*/\nSQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){\n  int rc;\n  int i;\n#ifndef SQLITE_OMIT_DEPRECATED\n  int size;\n#endif\n  Db *pDb;\n  char const *azArg[6];\n  int meta[5];\n  InitData initData;\n  const char *zSchemaTabName;\n  int openedTransaction = 0;\n  int mask = ((db->mDbFlags & DBFLAG_EncodingFixed) | ~DBFLAG_EncodingFixed);\n\n  assert( (db->mDbFlags & DBFLAG_SchemaKnownOk)==0 );\n  assert( iDb>=0 && iDb<db->nDb );\n  assert( db->aDb[iDb].pSchema );\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );\n\n  db->init.busy = 1;\n\n  /* Construct the in-memory representation schema tables (sqlite_schema or\n  ** sqlite_temp_schema) by invoking the parser directly.  The appropriate\n  ** table name will be inserted automatically by the parser so we can just\n  ** use the abbreviation \"x\" here.  The parser will also automatically tag\n  ** the schema table as read-only. */\n  azArg[0] = \"table\";\n  azArg[1] = zSchemaTabName = SCHEMA_TABLE(iDb);\n  azArg[2] = azArg[1];\n  azArg[3] = \"1\";\n  azArg[4] = \"CREATE TABLE x(type text,name text,tbl_name text,\"\n                            \"rootpage int,sql text)\";\n  azArg[5] = 0;\n  initData.db = db;\n  initData.iDb = iDb;\n  initData.rc = SQLITE_OK;\n  initData.pzErrMsg = pzErrMsg;\n  initData.mInitFlags = mFlags;\n  initData.nInitRow = 0;\n  initData.mxPage = 0;\n  sqlite3InitCallback(&initData, 5, (char **)azArg, 0);\n  db->mDbFlags &= mask;\n  if( initData.rc ){\n    rc = initData.rc;\n    goto error_out;\n  }\n\n  /* Create a cursor to hold the database open\n  */\n  pDb = &db->aDb[iDb];\n  if( pDb->pBt==0 ){\n    assert( iDb==1 );\n    DbSetProperty(db, 1, DB_SchemaLoaded);\n    rc = SQLITE_OK;\n    goto error_out;\n  }\n\n  /* If there is not already a read-only (or read-write) transaction opened\n  ** on the b-tree database, open one now. If a transaction is opened, it\n  ** will be closed before this function returns.  */\n  sqlite3BtreeEnter(pDb->pBt);\n  if( sqlite3BtreeTxnState(pDb->pBt)==SQLITE_TXN_NONE ){\n    rc = sqlite3BtreeBeginTrans(pDb->pBt, 0, 0);\n    if( rc!=SQLITE_OK ){\n      sqlite3SetString(pzErrMsg, db, sqlite3ErrStr(rc));\n      goto initone_error_out;\n    }\n    openedTransaction = 1;\n  }\n\n  /* Get the database meta information.\n  **\n  ** Meta values are as follows:\n  **    meta[0]   Schema cookie.  Changes with each schema change.\n  **    meta[1]   File format of schema layer.\n  **    meta[2]   Size of the page cache.\n  **    meta[3]   Largest rootpage (auto/incr_vacuum mode)\n  **    meta[4]   Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE\n  **    meta[5]   User version\n  **    meta[6]   Incremental vacuum mode\n  **    meta[7]   unused\n  **    meta[8]   unused\n  **    meta[9]   unused\n  **\n  ** Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to\n  ** the possible values of meta[4].\n  */\n  for(i=0; i<ArraySize(meta); i++){\n    sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);\n  }\n  if( (db->flags & SQLITE_ResetDatabase)!=0 ){\n    memset(meta, 0, sizeof(meta));\n  }\n  pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];\n\n  /* If opening a non-empty database, check the text encoding. For the\n  ** main database, set sqlite3.enc to the encoding of the main database.\n  ** For an attached db, it is an error if the encoding is not the same\n  ** as sqlite3.enc.\n  */\n  if( meta[BTREE_TEXT_ENCODING-1] ){  /* text encoding */\n    if( iDb==0 && (db->mDbFlags & DBFLAG_EncodingFixed)==0 ){\n      u8 encoding;\n#ifndef SQLITE_OMIT_UTF16\n      /* If opening the main database, set ENC(db). */\n      encoding = (u8)meta[BTREE_TEXT_ENCODING-1] & 3;\n      if( encoding==0 ) encoding = SQLITE_UTF8;\n#else\n      encoding = SQLITE_UTF8;\n#endif\n      sqlite3SetTextEncoding(db, encoding);\n    }else{\n      /* If opening an attached database, the encoding much match ENC(db) */\n      if( (meta[BTREE_TEXT_ENCODING-1] & 3)!=ENC(db) ){\n        sqlite3SetString(pzErrMsg, db, \"attached databases must use the same\"\n            \" text encoding as main database\");\n        rc = SQLITE_ERROR;\n        goto initone_error_out;\n      }\n    }\n  }\n  pDb->pSchema->enc = ENC(db);\n\n  if( pDb->pSchema->cache_size==0 ){\n#ifndef SQLITE_OMIT_DEPRECATED\n    size = sqlite3AbsInt32(meta[BTREE_DEFAULT_CACHE_SIZE-1]);\n    if( size==0 ){ size = SQLITE_DEFAULT_CACHE_SIZE; }\n    pDb->pSchema->cache_size = size;\n#else\n    pDb->pSchema->cache_size = SQLITE_DEFAULT_CACHE_SIZE;\n#endif\n    sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);\n  }\n\n  /*\n  ** file_format==1    Version 3.0.0.\n  ** file_format==2    Version 3.1.3.  // ALTER TABLE ADD COLUMN\n  ** file_format==3    Version 3.1.4.  // ditto but with non-NULL defaults\n  ** file_format==4    Version 3.3.0.  // DESC indices.  Boolean constants\n  */\n  pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];\n  if( pDb->pSchema->file_format==0 ){\n    pDb->pSchema->file_format = 1;\n  }\n  if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){\n    sqlite3SetString(pzErrMsg, db, \"unsupported file format\");\n    rc = SQLITE_ERROR;\n    goto initone_error_out;\n  }\n\n  /* Ticket #2804:  When we open a database in the newer file format,\n  ** clear the legacy_file_format pragma flag so that a VACUUM will\n  ** not downgrade the database and thus invalidate any descending\n  ** indices that the user might have created.\n  */\n  if( iDb==0 && meta[BTREE_FILE_FORMAT-1]>=4 ){\n    db->flags &= ~(u64)SQLITE_LegacyFileFmt;\n  }\n\n  /* Read the schema information out of the schema tables\n  */\n  assert( db->init.busy );\n  initData.mxPage = sqlite3BtreeLastPage(pDb->pBt);\n  {\n    char *zSql;\n    zSql = sqlite3MPrintf(db,\n        \"SELECT*FROM\\\"%w\\\".%s ORDER BY rowid\",\n        db->aDb[iDb].zDbSName, zSchemaTabName);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    {\n      sqlite3_xauth xAuth;\n      xAuth = db->xAuth;\n      db->xAuth = 0;\n#endif\n      rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);\n#ifndef SQLITE_OMIT_AUTHORIZATION\n      db->xAuth = xAuth;\n    }\n#endif\n    if( rc==SQLITE_OK ) rc = initData.rc;\n    sqlite3DbFree(db, zSql);\n#ifndef SQLITE_OMIT_ANALYZE\n    if( rc==SQLITE_OK ){\n      sqlite3AnalysisLoad(db, iDb);\n    }\n#endif\n  }\n  assert( pDb == &(db->aDb[iDb]) );\n  if( db->mallocFailed ){\n    rc = SQLITE_NOMEM_BKPT;\n    sqlite3ResetAllSchemasOfConnection(db);\n    pDb = &db->aDb[iDb];\n  }else\n  if( rc==SQLITE_OK || ((db->flags&SQLITE_NoSchemaError) && rc!=SQLITE_NOMEM)){\n    /* Hack: If the SQLITE_NoSchemaError flag is set, then consider\n    ** the schema loaded, even if errors (other than OOM) occurred. In\n    ** this situation the current sqlite3_prepare() operation will fail,\n    ** but the following one will attempt to compile the supplied statement\n    ** against whatever subset of the schema was loaded before the error\n    ** occurred.\n    **\n    ** The primary purpose of this is to allow access to the sqlite_schema\n    ** table even when its contents have been corrupted.\n    */\n    DbSetProperty(db, iDb, DB_SchemaLoaded);\n    rc = SQLITE_OK;\n  }\n\n  /* Jump here for an error that occurs after successfully allocating\n  ** curMain and calling sqlite3BtreeEnter(). For an error that occurs\n  ** before that point, jump to error_out.\n  */\ninitone_error_out:\n  if( openedTransaction ){\n    sqlite3BtreeCommit(pDb->pBt);\n  }\n  sqlite3BtreeLeave(pDb->pBt);\n\nerror_out:\n  if( rc ){\n    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){\n      sqlite3OomFault(db);\n    }\n    sqlite3ResetOneSchema(db, iDb);\n  }\n  db->init.busy = 0;\n  return rc;\n}\n\n/*\n** Initialize all database files - the main database file, the file\n** used to store temporary tables, and any additional database files\n** created using ATTACH statements.  Return a success code.  If an\n** error occurs, write an error message into *pzErrMsg.\n**\n** After a database is initialized, the DB_SchemaLoaded bit is set\n** bit is set in the flags field of the Db structure.\n*/\nSQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){\n  int i, rc;\n  int commit_internal = !(db->mDbFlags&DBFLAG_SchemaChange);\n\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( sqlite3BtreeHoldsMutex(db->aDb[0].pBt) );\n  assert( db->init.busy==0 );\n  ENC(db) = SCHEMA_ENC(db);\n  assert( db->nDb>0 );\n  /* Do the main schema first */\n  if( !DbHasProperty(db, 0, DB_SchemaLoaded) ){\n    rc = sqlite3InitOne(db, 0, pzErrMsg, 0);\n    if( rc ) return rc;\n  }\n  /* All other schemas after the main schema. The \"temp\" schema must be last */\n  for(i=db->nDb-1; i>0; i--){\n    assert( i==1 || sqlite3BtreeHoldsMutex(db->aDb[i].pBt) );\n    if( !DbHasProperty(db, i, DB_SchemaLoaded) ){\n      rc = sqlite3InitOne(db, i, pzErrMsg, 0);\n      if( rc ) return rc;\n    }\n  }\n  if( commit_internal ){\n    sqlite3CommitInternalChanges(db);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This routine is a no-op if the database schema is already initialized.\n** Otherwise, the schema is loaded. An error code is returned.\n*/\nSQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse){\n  int rc = SQLITE_OK;\n  sqlite3 *db = pParse->db;\n  assert( sqlite3_mutex_held(db->mutex) );\n  if( !db->init.busy ){\n    rc = sqlite3Init(db, &pParse->zErrMsg);\n    if( rc!=SQLITE_OK ){\n      pParse->rc = rc;\n      pParse->nErr++;\n    }else if( db->noSharedCache ){\n      db->mDbFlags |= DBFLAG_SchemaKnownOk;\n    }\n  }\n  return rc;\n}\n\n\n/*\n** Check schema cookies in all databases.  If any cookie is out\n** of date set pParse->rc to SQLITE_SCHEMA.  If all schema cookies\n** make no changes to pParse->rc.\n*/\nstatic void schemaIsValid(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  int iDb;\n  int rc;\n  int cookie;\n\n  assert( pParse->checkSchema );\n  assert( sqlite3_mutex_held(db->mutex) );\n  for(iDb=0; iDb<db->nDb; iDb++){\n    int openedTransaction = 0;         /* True if a transaction is opened */\n    Btree *pBt = db->aDb[iDb].pBt;     /* Btree database to read cookie from */\n    if( pBt==0 ) continue;\n\n    /* If there is not already a read-only (or read-write) transaction opened\n    ** on the b-tree database, open one now. If a transaction is opened, it\n    ** will be closed immediately after reading the meta-value. */\n    if( sqlite3BtreeTxnState(pBt)==SQLITE_TXN_NONE ){\n      rc = sqlite3BtreeBeginTrans(pBt, 0, 0);\n      if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){\n        sqlite3OomFault(db);\n        pParse->rc = SQLITE_NOMEM;\n      }\n      if( rc!=SQLITE_OK ) return;\n      openedTransaction = 1;\n    }\n\n    /* Read the schema cookie from the database. If it does not match the\n    ** value stored as part of the in-memory schema representation,\n    ** set Parse.rc to SQLITE_SCHEMA. */\n    sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){\n      if( DbHasProperty(db, iDb, DB_SchemaLoaded) ) pParse->rc = SQLITE_SCHEMA;\n      sqlite3ResetOneSchema(db, iDb);\n    }\n\n    /* Close the transaction, if one was opened. */\n    if( openedTransaction ){\n      sqlite3BtreeCommit(pBt);\n    }\n  }\n}\n\n/*\n** Convert a schema pointer into the iDb index that indicates\n** which database file in db->aDb[] the schema refers to.\n**\n** If the same database is attached more than once, the first\n** attached database is returned.\n*/\nSQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){\n  int i = -32768;\n\n  /* If pSchema is NULL, then return -32768. This happens when code in\n  ** expr.c is trying to resolve a reference to a transient table (i.e. one\n  ** created by a sub-select). In this case the return value of this\n  ** function should never be used.\n  **\n  ** We return -32768 instead of the more usual -1 simply because using\n  ** -32768 as the incorrect index into db->aDb[] is much\n  ** more likely to cause a segfault than -1 (of course there are assert()\n  ** statements too, but it never hurts to play the odds) and\n  ** -32768 will still fit into a 16-bit signed integer.\n  */\n  assert( sqlite3_mutex_held(db->mutex) );\n  if( pSchema ){\n    for(i=0; 1; i++){\n      assert( i<db->nDb );\n      if( db->aDb[i].pSchema==pSchema ){\n        break;\n      }\n    }\n    assert( i>=0 && i<db->nDb );\n  }\n  return i;\n}\n\n/*\n** Free all memory allocations in the pParse object\n*/\nSQLITE_PRIVATE void sqlite3ParseObjectReset(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  assert( db!=0 );\n  assert( db->pParse==pParse );\n  assert( pParse->nested==0 );\n#ifndef SQLITE_OMIT_SHARED_CACHE\n  if( pParse->aTableLock ) sqlite3DbNNFreeNN(db, pParse->aTableLock);\n#endif\n  while( pParse->pCleanup ){\n    ParseCleanup *pCleanup = pParse->pCleanup;\n    pParse->pCleanup = pCleanup->pNext;\n    pCleanup->xCleanup(db, pCleanup->pPtr);\n    sqlite3DbNNFreeNN(db, pCleanup);\n  }\n  if( pParse->aLabel ) sqlite3DbNNFreeNN(db, pParse->aLabel);\n  if( pParse->pConstExpr ){\n    sqlite3ExprListDelete(db, pParse->pConstExpr);\n  }\n  assert( db->lookaside.bDisable >= pParse->disableLookaside );\n  db->lookaside.bDisable -= pParse->disableLookaside;\n  db->lookaside.sz = db->lookaside.bDisable ? 0 : db->lookaside.szTrue;\n  assert( pParse->db->pParse==pParse );\n  db->pParse = pParse->pOuterParse;\n}\n\n/*\n** Add a new cleanup operation to a Parser.  The cleanup should happen when\n** the parser object is destroyed.  But, beware: the cleanup might happen\n** immediately.\n**\n** Use this mechanism for uncommon cleanups.  There is a higher setup\n** cost for this mechanism (an extra malloc), so it should not be used\n** for common cleanups that happen on most calls.  But for less\n** common cleanups, we save a single NULL-pointer comparison in\n** sqlite3ParseObjectReset(), which reduces the total CPU cycle count.\n**\n** If a memory allocation error occurs, then the cleanup happens immediately.\n** When either SQLITE_DEBUG or SQLITE_COVERAGE_TEST are defined, the\n** pParse->earlyCleanup flag is set in that case.  Calling code show verify\n** that test cases exist for which this happens, to guard against possible\n** use-after-free errors following an OOM.  The preferred way to do this is\n** to immediately follow the call to this routine with:\n**\n**       testcase( pParse->earlyCleanup );\n**\n** This routine returns a copy of its pPtr input (the third parameter)\n** except if an early cleanup occurs, in which case it returns NULL.  So\n** another way to check for early cleanup is to check the return value.\n** Or, stop using the pPtr parameter with this call and use only its\n** return value thereafter.  Something like this:\n**\n**       pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj);\n*/\nSQLITE_PRIVATE void *sqlite3ParserAddCleanup(\n  Parse *pParse,                      /* Destroy when this Parser finishes */\n  void (*xCleanup)(sqlite3*,void*),   /* The cleanup routine */\n  void *pPtr                          /* Pointer to object to be cleaned up */\n){\n  ParseCleanup *pCleanup;\n  if( sqlite3FaultSim(300) ){\n    pCleanup = 0;\n    sqlite3OomFault(pParse->db);\n  }else{\n    pCleanup = sqlite3DbMallocRaw(pParse->db, sizeof(*pCleanup));\n  }\n  if( pCleanup ){\n    pCleanup->pNext = pParse->pCleanup;\n    pParse->pCleanup = pCleanup;\n    pCleanup->pPtr = pPtr;\n    pCleanup->xCleanup = xCleanup;\n  }else{\n    xCleanup(pParse->db, pPtr);\n    pPtr = 0;\n#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)\n    pParse->earlyCleanup = 1;\n#endif\n  }\n  return pPtr;\n}\n\n/*\n** Turn bulk memory into a valid Parse object and link that Parse object\n** into database connection db.\n**\n** Call sqlite3ParseObjectReset() to undo this operation.\n**\n** Caution:  Do not confuse this routine with sqlite3ParseObjectInit() which\n** is generated by Lemon.\n*/\nSQLITE_PRIVATE void sqlite3ParseObjectInit(Parse *pParse, sqlite3 *db){\n  memset(PARSE_HDR(pParse), 0, PARSE_HDR_SZ);\n  memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);\n  assert( db->pParse!=pParse );\n  pParse->pOuterParse = db->pParse;\n  db->pParse = pParse;\n  pParse->db = db;\n  if( db->mallocFailed ) sqlite3ErrorMsg(pParse, \"out of memory\");\n}\n\n/*\n** Maximum number of times that we will try again to prepare a statement\n** that returns SQLITE_ERROR_RETRY.\n*/\n#ifndef SQLITE_MAX_PREPARE_RETRY\n# define SQLITE_MAX_PREPARE_RETRY 25\n#endif\n\n/*\n** Compile the UTF-8 encoded SQL statement zSql into a statement handle.\n*/\nstatic int sqlite3Prepare(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  u32 prepFlags,            /* Zero or more SQLITE_PREPARE_* flags */\n  Vdbe *pReprepare,         /* VM being reprepared */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n){\n  int rc = SQLITE_OK;       /* Result code */\n  int i;                    /* Loop counter */\n  Parse sParse;             /* Parsing context */\n\n  /* sqlite3ParseObjectInit(&sParse, db); // inlined for performance */\n  memset(PARSE_HDR(&sParse), 0, PARSE_HDR_SZ);\n  memset(PARSE_TAIL(&sParse), 0, PARSE_TAIL_SZ);\n  sParse.pOuterParse = db->pParse;\n  db->pParse = &sParse;\n  sParse.db = db;\n  if( pReprepare ){\n    sParse.pReprepare = pReprepare;\n    sParse.explain = sqlite3_stmt_isexplain((sqlite3_stmt*)pReprepare);\n  }else{\n    assert( sParse.pReprepare==0 );\n  }\n  assert( ppStmt && *ppStmt==0 );\n  if( db->mallocFailed ){\n    sqlite3ErrorMsg(&sParse, \"out of memory\");\n    db->errCode = rc = SQLITE_NOMEM;\n    goto end_prepare;\n  }\n  assert( sqlite3_mutex_held(db->mutex) );\n\n  /* For a long-term use prepared statement avoid the use of\n  ** lookaside memory.\n  */\n  if( prepFlags & SQLITE_PREPARE_PERSISTENT ){\n    sParse.disableLookaside++;\n    DisableLookaside;\n  }\n  sParse.prepFlags = prepFlags & 0xff;\n\n  /* Check to verify that it is possible to get a read lock on all\n  ** database schemas.  The inability to get a read lock indicates that\n  ** some other database connection is holding a write-lock, which in\n  ** turn means that the other connection has made uncommitted changes\n  ** to the schema.\n  **\n  ** Were we to proceed and prepare the statement against the uncommitted\n  ** schema changes and if those schema changes are subsequently rolled\n  ** back and different changes are made in their place, then when this\n  ** prepared statement goes to run the schema cookie would fail to detect\n  ** the schema change.  Disaster would follow.\n  **\n  ** This thread is currently holding mutexes on all Btrees (because\n  ** of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it\n  ** is not possible for another thread to start a new schema change\n  ** while this routine is running.  Hence, we do not need to hold\n  ** locks on the schema, we just need to make sure nobody else is\n  ** holding them.\n  **\n  ** Note that setting READ_UNCOMMITTED overrides most lock detection,\n  ** but it does *not* override schema lock detection, so this all still\n  ** works even if READ_UNCOMMITTED is set.\n  */\n  if( !db->noSharedCache ){\n    for(i=0; i<db->nDb; i++) {\n      Btree *pBt = db->aDb[i].pBt;\n      if( pBt ){\n        assert( sqlite3BtreeHoldsMutex(pBt) );\n        rc = sqlite3BtreeSchemaLocked(pBt);\n        if( rc ){\n          const char *zDb = db->aDb[i].zDbSName;\n          sqlite3ErrorWithMsg(db, rc, \"database schema is locked: %s\", zDb);\n          testcase( db->flags & SQLITE_ReadUncommit );\n          goto end_prepare;\n        }\n      }\n    }\n  }\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if( db->pDisconnect ) sqlite3VtabUnlockList(db);\n#endif\n\n  if( nBytes>=0 && (nBytes==0 || zSql[nBytes-1]!=0) ){\n    char *zSqlCopy;\n    int mxLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];\n    testcase( nBytes==mxLen );\n    testcase( nBytes==mxLen+1 );\n    if( nBytes>mxLen ){\n      sqlite3ErrorWithMsg(db, SQLITE_TOOBIG, \"statement too long\");\n      rc = sqlite3ApiExit(db, SQLITE_TOOBIG);\n      goto end_prepare;\n    }\n    zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes);\n    if( zSqlCopy ){\n      sqlite3RunParser(&sParse, zSqlCopy);\n      sParse.zTail = &zSql[sParse.zTail-zSqlCopy];\n      sqlite3DbFree(db, zSqlCopy);\n    }else{\n      sParse.zTail = &zSql[nBytes];\n    }\n  }else{\n    sqlite3RunParser(&sParse, zSql);\n  }\n  assert( 0==sParse.nQueryLoop );\n\n  if( pzTail ){\n    *pzTail = sParse.zTail;\n  }\n\n  if( db->init.busy==0 ){\n    sqlite3VdbeSetSql(sParse.pVdbe, zSql, (int)(sParse.zTail-zSql), prepFlags);\n  }\n  if( db->mallocFailed ){\n    sParse.rc = SQLITE_NOMEM_BKPT;\n    sParse.checkSchema = 0;\n  }\n  if( sParse.rc!=SQLITE_OK && sParse.rc!=SQLITE_DONE ){\n    if( sParse.checkSchema && db->init.busy==0 ){\n      schemaIsValid(&sParse);\n    }\n    if( sParse.pVdbe ){\n      sqlite3VdbeFinalize(sParse.pVdbe);\n    }\n    assert( 0==(*ppStmt) );\n    rc = sParse.rc;\n    if( sParse.zErrMsg ){\n      sqlite3ErrorWithMsg(db, rc, \"%s\", sParse.zErrMsg);\n      sqlite3DbFree(db, sParse.zErrMsg);\n    }else{\n      sqlite3Error(db, rc);\n    }\n  }else{\n    assert( sParse.zErrMsg==0 );\n    *ppStmt = (sqlite3_stmt*)sParse.pVdbe;\n    rc = SQLITE_OK;\n    sqlite3ErrorClear(db);\n  }\n\n\n  /* Delete any TriggerPrg structures allocated while parsing this statement. */\n  while( sParse.pTriggerPrg ){\n    TriggerPrg *pT = sParse.pTriggerPrg;\n    sParse.pTriggerPrg = pT->pNext;\n    sqlite3DbFree(db, pT);\n  }\n\nend_prepare:\n\n  sqlite3ParseObjectReset(&sParse);\n  return rc;\n}\nstatic int sqlite3LockAndPrepare(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  u32 prepFlags,            /* Zero or more SQLITE_PREPARE_* flags */\n  Vdbe *pOld,               /* VM being reprepared */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  int cnt = 0;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ppStmt==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  *ppStmt = 0;\n  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  sqlite3_mutex_enter(db->mutex);\n  sqlite3BtreeEnterAll(db);\n  do{\n    /* Make multiple attempts to compile the SQL, until it either succeeds\n    ** or encounters a permanent error.  A schema problem after one schema\n    ** reset is considered a permanent error. */\n    rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);\n    assert( rc==SQLITE_OK || *ppStmt==0 );\n    if( rc==SQLITE_OK || db->mallocFailed ) break;\n    cnt++;\n  }while( (rc==SQLITE_ERROR_RETRY && ALWAYS(cnt<=SQLITE_MAX_PREPARE_RETRY))\n       || (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt)==1) );\n  sqlite3BtreeLeaveAll(db);\n  assert( rc!=SQLITE_ERROR_RETRY );\n  rc = sqlite3ApiExit(db, rc);\n  assert( (rc&db->errMask)==rc );\n  db->busyHandler.nBusy = 0;\n  sqlite3_mutex_leave(db->mutex);\n  assert( rc==SQLITE_OK || (*ppStmt)==0 );\n  return rc;\n}\n\n\n/*\n** Rerun the compilation of a statement after a schema change.\n**\n** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,\n** if the statement cannot be recompiled because another connection has\n** locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error\n** occurs, return SQLITE_SCHEMA.\n*/\nSQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){\n  int rc;\n  sqlite3_stmt *pNew;\n  const char *zSql;\n  sqlite3 *db;\n  u8 prepFlags;\n\n  assert( sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex) );\n  zSql = sqlite3_sql((sqlite3_stmt *)p);\n  assert( zSql!=0 );  /* Reprepare only called for prepare_v2() statements */\n  db = sqlite3VdbeDb(p);\n  assert( sqlite3_mutex_held(db->mutex) );\n  prepFlags = sqlite3VdbePrepareFlags(p);\n  rc = sqlite3LockAndPrepare(db, zSql, -1, prepFlags, p, &pNew, 0);\n  if( rc ){\n    if( rc==SQLITE_NOMEM ){\n      sqlite3OomFault(db);\n    }\n    assert( pNew==0 );\n    return rc;\n  }else{\n    assert( pNew!=0 );\n  }\n  sqlite3VdbeSwap((Vdbe*)pNew, p);\n  sqlite3TransferBindings(pNew, (sqlite3_stmt*)p);\n  sqlite3VdbeResetStepResult((Vdbe*)pNew);\n  sqlite3VdbeFinalize((Vdbe*)pNew);\n  return SQLITE_OK;\n}\n\n\n/*\n** Two versions of the official API.  Legacy and new use.  In the legacy\n** version, the original SQL text is not saved in the prepared statement\n** and so if a schema change occurs, SQLITE_SCHEMA is returned by\n** sqlite3_step().  In the new version, the original SQL text is retained\n** and the statement is automatically recompiled if an schema change\n** occurs.\n*/\nSQLITE_API int sqlite3_prepare(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */\n  return rc;\n}\nSQLITE_API int sqlite3_prepare_v2(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  /* EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works\n  ** exactly the same as sqlite3_prepare_v3() with a zero prepFlags\n  ** parameter.\n  **\n  ** Proof in that the 5th parameter to sqlite3LockAndPrepare is 0 */\n  rc = sqlite3LockAndPrepare(db,zSql,nBytes,SQLITE_PREPARE_SAVESQL,0,\n                             ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );\n  return rc;\n}\nSQLITE_API int sqlite3_prepare_v3(\n  sqlite3 *db,              /* Database handle. */\n  const char *zSql,         /* UTF-8 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  unsigned int prepFlags,   /* Zero or more SQLITE_PREPARE_* flags */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const char **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  /* EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from\n  ** sqlite3_prepare_v2() only in having the extra prepFlags parameter,\n  ** which is a bit array consisting of zero or more of the\n  ** SQLITE_PREPARE_* flags.\n  **\n  ** Proof by comparison to the implementation of sqlite3_prepare_v2()\n  ** directly above. */\n  rc = sqlite3LockAndPrepare(db,zSql,nBytes,\n                 SQLITE_PREPARE_SAVESQL|(prepFlags&SQLITE_PREPARE_MASK),\n                 0,ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );\n  return rc;\n}\n\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Compile the UTF-16 encoded SQL statement zSql into a statement handle.\n*/\nstatic int sqlite3Prepare16(\n  sqlite3 *db,              /* Database handle. */\n  const void *zSql,         /* UTF-16 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  u32 prepFlags,            /* Zero or more SQLITE_PREPARE_* flags */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const void **pzTail       /* OUT: End of parsed string */\n){\n  /* This function currently works by first transforming the UTF-16\n  ** encoded string to UTF-8, then invoking sqlite3_prepare(). The\n  ** tricky bit is figuring out the pointer to return in *pzTail.\n  */\n  char *zSql8;\n  const char *zTail8 = 0;\n  int rc = SQLITE_OK;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ppStmt==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  *ppStmt = 0;\n  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n\n  /* Make sure nBytes is non-negative and correct.  It should be the\n  ** number of bytes until the end of the input buffer or until the first\n  ** U+0000 character.  If the input nBytes is odd, convert it into\n  ** an even number.  If the input nBytes is negative, then the input\n  ** must be terminated by at least one U+0000 character */\n  if( nBytes>=0 ){\n    int sz;\n    const char *z = (const char*)zSql;\n    for(sz=0; sz<nBytes && (z[sz]!=0 || z[sz+1]!=0); sz += 2){}\n    nBytes = sz;\n  }else{\n    int sz;\n    const char *z = (const char*)zSql;\n    for(sz=0; z[sz]!=0 || z[sz+1]!=0; sz += 2){}\n    nBytes = sz;\n  }\n\n  sqlite3_mutex_enter(db->mutex);\n  zSql8 = sqlite3Utf16to8(db, zSql, nBytes, SQLITE_UTF16NATIVE);\n  if( zSql8 ){\n    rc = sqlite3LockAndPrepare(db, zSql8, -1, prepFlags, 0, ppStmt, &zTail8);\n  }\n\n  if( zTail8 && pzTail ){\n    /* If sqlite3_prepare returns a tail pointer, we calculate the\n    ** equivalent pointer into the UTF-16 string by counting the unicode\n    ** characters between zSql8 and zTail8, and then returning a pointer\n    ** the same number of characters into the UTF-16 string.\n    */\n    int chars_parsed = sqlite3Utf8CharLen(zSql8, (int)(zTail8-zSql8));\n    *pzTail = (u8 *)zSql + sqlite3Utf16ByteLen(zSql, nBytes, chars_parsed);\n  }\n  sqlite3DbFree(db, zSql8);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Two versions of the official API.  Legacy and new use.  In the legacy\n** version, the original SQL text is not saved in the prepared statement\n** and so if a schema change occurs, SQLITE_SCHEMA is returned by\n** sqlite3_step().  In the new version, the original SQL text is retained\n** and the statement is automatically recompiled if an schema change\n** occurs.\n*/\nSQLITE_API int sqlite3_prepare16(\n  sqlite3 *db,              /* Database handle. */\n  const void *zSql,         /* UTF-16 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const void **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */\n  return rc;\n}\nSQLITE_API int sqlite3_prepare16_v2(\n  sqlite3 *db,              /* Database handle. */\n  const void *zSql,         /* UTF-16 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const void **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  rc = sqlite3Prepare16(db,zSql,nBytes,SQLITE_PREPARE_SAVESQL,ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */\n  return rc;\n}\nSQLITE_API int sqlite3_prepare16_v3(\n  sqlite3 *db,              /* Database handle. */\n  const void *zSql,         /* UTF-16 encoded SQL statement. */\n  int nBytes,               /* Length of zSql in bytes. */\n  unsigned int prepFlags,   /* Zero or more SQLITE_PREPARE_* flags */\n  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */\n  const void **pzTail       /* OUT: End of parsed string */\n){\n  int rc;\n  rc = sqlite3Prepare16(db,zSql,nBytes,\n         SQLITE_PREPARE_SAVESQL|(prepFlags&SQLITE_PREPARE_MASK),\n         ppStmt,pzTail);\n  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */\n  return rc;\n}\n\n#endif /* SQLITE_OMIT_UTF16 */\n\n/************** End of prepare.c *********************************************/\n/************** Begin file select.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that are called by the parser\n** to handle SELECT statements in SQLite.\n*/\n/* #include \"sqliteInt.h\" */\n\n/*\n** An instance of the following object is used to record information about\n** how to process the DISTINCT keyword, to simplify passing that information\n** into the selectInnerLoop() routine.\n*/\ntypedef struct DistinctCtx DistinctCtx;\nstruct DistinctCtx {\n  u8 isTnct;      /* 0: Not distinct. 1: DISTICT  2: DISTINCT and ORDER BY */\n  u8 eTnctType;   /* One of the WHERE_DISTINCT_* operators */\n  int tabTnct;    /* Ephemeral table used for DISTINCT processing */\n  int addrTnct;   /* Address of OP_OpenEphemeral opcode for tabTnct */\n};\n\n/*\n** An instance of the following object is used to record information about\n** the ORDER BY (or GROUP BY) clause of query is being coded.\n**\n** The aDefer[] array is used by the sorter-references optimization. For\n** example, assuming there is no index that can be used for the ORDER BY,\n** for the query:\n**\n**     SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10;\n**\n** it may be more efficient to add just the \"a\" values to the sorter, and\n** retrieve the associated \"bigblob\" values directly from table t1 as the\n** 10 smallest \"a\" values are extracted from the sorter.\n**\n** When the sorter-reference optimization is used, there is one entry in the\n** aDefer[] array for each database table that may be read as values are\n** extracted from the sorter.\n*/\ntypedef struct SortCtx SortCtx;\nstruct SortCtx {\n  ExprList *pOrderBy;   /* The ORDER BY (or GROUP BY clause) */\n  int nOBSat;           /* Number of ORDER BY terms satisfied by indices */\n  int iECursor;         /* Cursor number for the sorter */\n  int regReturn;        /* Register holding block-output return address */\n  int labelBkOut;       /* Start label for the block-output subroutine */\n  int addrSortIndex;    /* Address of the OP_SorterOpen or OP_OpenEphemeral */\n  int labelDone;        /* Jump here when done, ex: LIMIT reached */\n  int labelOBLopt;      /* Jump here when sorter is full */\n  u8 sortFlags;         /* Zero or more SORTFLAG_* bits */\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  u8 nDefer;            /* Number of valid entries in aDefer[] */\n  struct DeferredCsr {\n    Table *pTab;        /* Table definition */\n    int iCsr;           /* Cursor number for table */\n    int nKey;           /* Number of PK columns for table pTab (>=1) */\n  } aDefer[4];\n#endif\n  struct RowLoadInfo *pDeferredRowLoad;  /* Deferred row loading info or NULL */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int addrPush;         /* First instruction to push data into sorter */\n  int addrPushEnd;      /* Last instruction that pushes data into sorter */\n#endif\n};\n#define SORTFLAG_UseSorter  0x01   /* Use SorterOpen instead of OpenEphemeral */\n\n/*\n** Delete all the content of a Select structure.  Deallocate the structure\n** itself depending on the value of bFree\n**\n** If bFree==1, call sqlite3DbFree() on the p object.\n** If bFree==0, Leave the first Select object unfreed\n*/\nstatic void clearSelect(sqlite3 *db, Select *p, int bFree){\n  assert( db!=0 );\n  while( p ){\n    Select *pPrior = p->pPrior;\n    sqlite3ExprListDelete(db, p->pEList);\n    sqlite3SrcListDelete(db, p->pSrc);\n    sqlite3ExprDelete(db, p->pWhere);\n    sqlite3ExprListDelete(db, p->pGroupBy);\n    sqlite3ExprDelete(db, p->pHaving);\n    sqlite3ExprListDelete(db, p->pOrderBy);\n    sqlite3ExprDelete(db, p->pLimit);\n    if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( OK_IF_ALWAYS_TRUE(p->pWinDefn) ){\n      sqlite3WindowListDelete(db, p->pWinDefn);\n    }\n    while( p->pWin ){\n      assert( p->pWin->ppThis==&p->pWin );\n      sqlite3WindowUnlinkFromSelect(p->pWin);\n    }\n#endif\n    if( bFree ) sqlite3DbNNFreeNN(db, p);\n    p = pPrior;\n    bFree = 1;\n  }\n}\n\n/*\n** Initialize a SelectDest structure.\n*/\nSQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest *pDest, int eDest, int iParm){\n  pDest->eDest = (u8)eDest;\n  pDest->iSDParm = iParm;\n  pDest->iSDParm2 = 0;\n  pDest->zAffSdst = 0;\n  pDest->iSdst = 0;\n  pDest->nSdst = 0;\n}\n\n\n/*\n** Allocate a new Select structure and return a pointer to that\n** structure.\n*/\nSQLITE_PRIVATE Select *sqlite3SelectNew(\n  Parse *pParse,        /* Parsing context */\n  ExprList *pEList,     /* which columns to include in the result */\n  SrcList *pSrc,        /* the FROM clause -- which tables to scan */\n  Expr *pWhere,         /* the WHERE clause */\n  ExprList *pGroupBy,   /* the GROUP BY clause */\n  Expr *pHaving,        /* the HAVING clause */\n  ExprList *pOrderBy,   /* the ORDER BY clause */\n  u32 selFlags,         /* Flag parameters, such as SF_Distinct */\n  Expr *pLimit          /* LIMIT value.  NULL means not used */\n){\n  Select *pNew, *pAllocated;\n  Select standin;\n  pAllocated = pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );\n  if( pNew==0 ){\n    assert( pParse->db->mallocFailed );\n    pNew = &standin;\n  }\n  if( pEList==0 ){\n    pEList = sqlite3ExprListAppend(pParse, 0,\n                                   sqlite3Expr(pParse->db,TK_ASTERISK,0));\n  }\n  pNew->pEList = pEList;\n  pNew->op = TK_SELECT;\n  pNew->selFlags = selFlags;\n  pNew->iLimit = 0;\n  pNew->iOffset = 0;\n  pNew->selId = ++pParse->nSelect;\n  pNew->addrOpenEphm[0] = -1;\n  pNew->addrOpenEphm[1] = -1;\n  pNew->nSelectRow = 0;\n  if( pSrc==0 ) pSrc = sqlite3DbMallocZero(pParse->db, SZ_SRCLIST_1);\n  pNew->pSrc = pSrc;\n  pNew->pWhere = pWhere;\n  pNew->pGroupBy = pGroupBy;\n  pNew->pHaving = pHaving;\n  pNew->pOrderBy = pOrderBy;\n  pNew->pPrior = 0;\n  pNew->pNext = 0;\n  pNew->pLimit = pLimit;\n  pNew->pWith = 0;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  pNew->pWin = 0;\n  pNew->pWinDefn = 0;\n#endif\n  if( pParse->db->mallocFailed ) {\n    clearSelect(pParse->db, pNew, pNew!=&standin);\n    pAllocated = 0;\n  }else{\n    assert( pNew->pSrc!=0 || pParse->nErr>0 );\n  }\n  return pAllocated;\n}\n\n\n/*\n** Delete the given Select structure and all of its substructures.\n*/\nSQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){\n  if( OK_IF_ALWAYS_TRUE(p) ) clearSelect(db, p, 1);\n}\nSQLITE_PRIVATE void sqlite3SelectDeleteGeneric(sqlite3 *db, void *p){\n  if( ALWAYS(p) ) clearSelect(db, (Select*)p, 1);\n}\n\n/*\n** Return a pointer to the right-most SELECT statement in a compound.\n*/\nstatic Select *findRightmost(Select *p){\n  while( p->pNext ) p = p->pNext;\n  return p;\n}\n\n/*\n** Given 1 to 3 identifiers preceding the JOIN keyword, determine the\n** type of join.  Return an integer constant that expresses that type\n** in terms of the following bit values:\n**\n**     JT_INNER\n**     JT_CROSS\n**     JT_OUTER\n**     JT_NATURAL\n**     JT_LEFT\n**     JT_RIGHT\n**\n** A full outer join is the combination of JT_LEFT and JT_RIGHT.\n**\n** If an illegal or unsupported join type is seen, then still return\n** a join type, but put an error in the pParse structure.\n**\n** These are the valid join types:\n**\n**\n**      pA       pB       pC               Return Value\n**     -------  -----    -----             ------------\n**     CROSS      -        -                 JT_CROSS\n**     INNER      -        -                 JT_INNER\n**     LEFT       -        -                 JT_LEFT|JT_OUTER\n**     LEFT     OUTER      -                 JT_LEFT|JT_OUTER\n**     RIGHT      -        -                 JT_RIGHT|JT_OUTER\n**     RIGHT    OUTER      -                 JT_RIGHT|JT_OUTER\n**     FULL       -        -                 JT_LEFT|JT_RIGHT|JT_OUTER\n**     FULL     OUTER      -                 JT_LEFT|JT_RIGHT|JT_OUTER\n**     NATURAL  INNER      -                 JT_NATURAL|JT_INNER\n**     NATURAL  LEFT       -                 JT_NATURAL|JT_LEFT|JT_OUTER\n**     NATURAL  LEFT     OUTER               JT_NATURAL|JT_LEFT|JT_OUTER\n**     NATURAL  RIGHT      -                 JT_NATURAL|JT_RIGHT|JT_OUTER\n**     NATURAL  RIGHT    OUTER               JT_NATURAL|JT_RIGHT|JT_OUTER\n**     NATURAL  FULL       -                 JT_NATURAL|JT_LEFT|JT_RIGHT\n**     NATURAL  FULL     OUTER               JT_NATRUAL|JT_LEFT|JT_RIGHT\n**\n** To preserve historical compatibly, SQLite also accepts a variety\n** of other non-standard and in many cases nonsensical join types.\n** This routine makes as much sense at it can from the nonsense join\n** type and returns a result.  Examples of accepted nonsense join types\n** include but are not limited to:\n**\n**          INNER CROSS JOIN        ->   same as JOIN\n**          NATURAL CROSS JOIN      ->   same as NATURAL JOIN\n**          OUTER LEFT JOIN         ->   same as LEFT JOIN\n**          LEFT NATURAL JOIN       ->   same as NATURAL LEFT JOIN\n**          LEFT RIGHT JOIN         ->   same as FULL JOIN\n**          RIGHT OUTER FULL JOIN   ->   same as FULL JOIN\n**          CROSS CROSS CROSS JOIN  ->   same as JOIN\n**\n** The only restrictions on the join type name are:\n**\n**    *   \"INNER\" cannot appear together with \"OUTER\", \"LEFT\", \"RIGHT\",\n**        or \"FULL\".\n**\n**    *   \"CROSS\" cannot appear together with \"OUTER\", \"LEFT\", \"RIGHT,\n**        or \"FULL\".\n**\n**    *   If \"OUTER\" is present then there must also be one of\n**        \"LEFT\", \"RIGHT\", or \"FULL\"\n*/\nSQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){\n  int jointype = 0;\n  Token *apAll[3];\n  Token *p;\n                             /*   0123456789 123456789 123456789 123 */\n  static const char zKeyText[] = \"naturaleftouterightfullinnercross\";\n  static const struct {\n    u8 i;        /* Beginning of keyword text in zKeyText[] */\n    u8 nChar;    /* Length of the keyword in characters */\n    u8 code;     /* Join type mask */\n  } aKeyword[] = {\n    /* (0) natural */ { 0,  7, JT_NATURAL                },\n    /* (1) left    */ { 6,  4, JT_LEFT|JT_OUTER          },\n    /* (2) outer   */ { 10, 5, JT_OUTER                  },\n    /* (3) right   */ { 14, 5, JT_RIGHT|JT_OUTER         },\n    /* (4) full    */ { 19, 4, JT_LEFT|JT_RIGHT|JT_OUTER },\n    /* (5) inner   */ { 23, 5, JT_INNER                  },\n    /* (6) cross   */ { 28, 5, JT_INNER|JT_CROSS         },\n  };\n  int i, j;\n  apAll[0] = pA;\n  apAll[1] = pB;\n  apAll[2] = pC;\n  for(i=0; i<3 && apAll[i]; i++){\n    p = apAll[i];\n    for(j=0; j<ArraySize(aKeyword); j++){\n      if( p->n==aKeyword[j].nChar\n          && sqlite3StrNICmp((char*)p->z, &zKeyText[aKeyword[j].i], p->n)==0 ){\n        jointype |= aKeyword[j].code;\n        break;\n      }\n    }\n    testcase( j==0 || j==1 || j==2 || j==3 || j==4 || j==5 || j==6 );\n    if( j>=ArraySize(aKeyword) ){\n      jointype |= JT_ERROR;\n      break;\n    }\n  }\n  if(\n     (jointype & (JT_INNER|JT_OUTER))==(JT_INNER|JT_OUTER) ||\n     (jointype & JT_ERROR)!=0 ||\n     (jointype & (JT_OUTER|JT_LEFT|JT_RIGHT))==JT_OUTER\n  ){\n    const char *zSp1 = \" \";\n    const char *zSp2 = \" \";\n    if( pB==0 ){ zSp1++; }\n    if( pC==0 ){ zSp2++; }\n    sqlite3ErrorMsg(pParse, \"unknown join type: \"\n       \"%T%s%T%s%T\", pA, zSp1, pB, zSp2, pC);\n    jointype = JT_INNER;\n  }\n  return jointype;\n}\n\n/*\n** Return the index of a column in a table.  Return -1 if the column\n** is not contained in the table.\n*/\nSQLITE_PRIVATE int sqlite3ColumnIndex(Table *pTab, const char *zCol){\n  int i;\n  u8 h;\n  const Column *aCol;\n  int nCol;\n\n  h = sqlite3StrIHash(zCol);\n  aCol = pTab->aCol;\n  nCol = pTab->nCol;\n\n  /* See if the aHx gives us a lucky match */\n  i = pTab->aHx[h % sizeof(pTab->aHx)];\n  assert( i<nCol );\n  if( aCol[i].hName==h\n   && sqlite3StrICmp(aCol[i].zCnName, zCol)==0\n  ){\n    return i;\n  }\n\n  /* No lucky match from the hash table.  Do a full search. */\n  i = 0;\n  while( 1 /*exit-by-break*/ ){\n    if( aCol[i].hName==h\n     && sqlite3StrICmp(aCol[i].zCnName, zCol)==0\n    ){\n      return i;\n    }\n    i++;\n    if( i>=nCol ) break;\n  }\n  return -1;\n}\n\n/*\n** Mark a subquery result column as having been used.\n*/\nSQLITE_PRIVATE void sqlite3SrcItemColumnUsed(SrcItem *pItem, int iCol){\n  assert( pItem!=0 );\n  assert( (int)pItem->fg.isNestedFrom == IsNestedFrom(pItem) );\n  if( pItem->fg.isNestedFrom ){\n    ExprList *pResults;\n    assert( pItem->fg.isSubquery );\n    assert( pItem->u4.pSubq!=0 );\n    assert( pItem->u4.pSubq->pSelect!=0 );\n    pResults = pItem->u4.pSubq->pSelect->pEList;\n    assert( pResults!=0 );\n    assert( iCol>=0 && iCol<pResults->nExpr );\n    pResults->a[iCol].fg.bUsed = 1;\n  }\n}\n\n/*\n** Search the tables iStart..iEnd (inclusive) in pSrc, looking for a\n** table that has a column named zCol.  The search is left-to-right.\n** The first match found is returned.\n**\n** When found, set *piTab and *piCol to the table index and column index\n** of the matching column and return TRUE.\n**\n** If not found, return FALSE.\n*/\nstatic int tableAndColumnIndex(\n  SrcList *pSrc,       /* Array of tables to search */\n  int iStart,          /* First member of pSrc->a[] to check */\n  int iEnd,            /* Last member of pSrc->a[] to check */\n  const char *zCol,    /* Name of the column we are looking for */\n  int *piTab,          /* Write index of pSrc->a[] here */\n  int *piCol,          /* Write index of pSrc->a[*piTab].pSTab->aCol[] here */\n  int bIgnoreHidden    /* Ignore hidden columns */\n){\n  int i;               /* For looping over tables in pSrc */\n  int iCol;            /* Index of column matching zCol */\n\n  assert( iEnd<pSrc->nSrc );\n  assert( iStart>=0 );\n  assert( (piTab==0)==(piCol==0) );  /* Both or neither are NULL */\n\n  for(i=iStart; i<=iEnd; i++){\n    iCol = sqlite3ColumnIndex(pSrc->a[i].pSTab, zCol);\n    if( iCol>=0\n     && (bIgnoreHidden==0 || IsHiddenColumn(&pSrc->a[i].pSTab->aCol[iCol])==0)\n    ){\n      if( piTab ){\n        sqlite3SrcItemColumnUsed(&pSrc->a[i], iCol);\n        *piTab = i;\n        *piCol = iCol;\n      }\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Set the EP_OuterON property on all terms of the given expression.\n** And set the Expr.w.iJoin to iTable for every term in the\n** expression.\n**\n** The EP_OuterON property is used on terms of an expression to tell\n** the OUTER JOIN processing logic that this term is part of the\n** join restriction specified in the ON or USING clause and not a part\n** of the more general WHERE clause.  These terms are moved over to the\n** WHERE clause during join processing but we need to remember that they\n** originated in the ON or USING clause.\n**\n** The Expr.w.iJoin tells the WHERE clause processing that the\n** expression depends on table w.iJoin even if that table is not\n** explicitly mentioned in the expression.  That information is needed\n** for cases like this:\n**\n**    SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5\n**\n** The where clause needs to defer the handling of the t1.x=5\n** term until after the t2 loop of the join.  In that way, a\n** NULL t2 row will be inserted whenever t1.x!=5.  If we do not\n** defer the handling of t1.x=5, it will be processed immediately\n** after the t1 loop and rows with t1.x!=5 will never appear in\n** the output, which is incorrect.\n*/\nSQLITE_PRIVATE void sqlite3SetJoinExpr(Expr *p, int iTable, u32 joinFlag){\n  assert( joinFlag==EP_OuterON || joinFlag==EP_InnerON );\n  while( p ){\n    ExprSetProperty(p, joinFlag);\n    assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );\n    ExprSetVVAProperty(p, EP_NoReduce);\n    p->w.iJoin = iTable;\n    if( ExprUseXList(p) ){\n      if( p->x.pList ){\n        int i;\n        for(i=0; i<p->x.pList->nExpr; i++){\n          sqlite3SetJoinExpr(p->x.pList->a[i].pExpr, iTable, joinFlag);\n        }\n      }\n    }\n    sqlite3SetJoinExpr(p->pLeft, iTable, joinFlag);\n    p = p->pRight;\n  }\n}\n\n/* Undo the work of sqlite3SetJoinExpr().  This is used when a LEFT JOIN\n** is simplified into an ordinary JOIN, and when an ON expression is\n** \"pushed down\" into the WHERE clause of a subquery.\n**\n** Convert every term that is marked with EP_OuterON and w.iJoin==iTable into\n** an ordinary term that omits the EP_OuterON mark.  Or if iTable<0, then\n** just clear every EP_OuterON and EP_InnerON mark from the expression tree.\n**\n** If nullable is true, that means that Expr p might evaluate to NULL even\n** if it is a reference to a NOT NULL column.  This can happen, for example,\n** if the table that p references is on the left side of a RIGHT JOIN.\n** If nullable is true, then take care to not remove the EP_CanBeNull bit.\n** See forum thread https://sqlite.org/forum/forumpost/b40696f50145d21c\n*/\nstatic void unsetJoinExpr(Expr *p, int iTable, int nullable){\n  while( p ){\n    if( iTable<0 || (ExprHasProperty(p, EP_OuterON) && p->w.iJoin==iTable) ){\n      ExprClearProperty(p, EP_OuterON|EP_InnerON);\n      if( iTable>=0 ) ExprSetProperty(p, EP_InnerON);\n    }\n    if( p->op==TK_COLUMN && p->iTable==iTable && !nullable ){\n      ExprClearProperty(p, EP_CanBeNull);\n    }\n    if( p->op==TK_FUNCTION ){\n      assert( ExprUseXList(p) );\n      assert( p->pLeft==0 );\n      if( p->x.pList ){\n        int i;\n        for(i=0; i<p->x.pList->nExpr; i++){\n          unsetJoinExpr(p->x.pList->a[i].pExpr, iTable, nullable);\n        }\n      }\n    }\n    unsetJoinExpr(p->pLeft, iTable, nullable);\n    p = p->pRight;\n  }\n}\n\n/*\n** This routine processes the join information for a SELECT statement.\n**\n**   *  A NATURAL join is converted into a USING join.  After that, we\n**      do not need to be concerned with NATURAL joins and we only have\n**      think about USING joins.\n**\n**   *  ON and USING clauses result in extra terms being added to the\n**      WHERE clause to enforce the specified constraints.  The extra\n**      WHERE clause terms will be tagged with EP_OuterON or\n**      EP_InnerON so that we know that they originated in ON/USING.\n**\n** The terms of a FROM clause are contained in the Select.pSrc structure.\n** The left most table is the first entry in Select.pSrc.  The right-most\n** table is the last entry.  The join operator is held in the entry to\n** the right.  Thus entry 1 contains the join operator for the join between\n** entries 0 and 1.  Any ON or USING clauses associated with the join are\n** also attached to the right entry.\n**\n** This routine returns the number of errors encountered.\n*/\nstatic int sqlite3ProcessJoin(Parse *pParse, Select *p){\n  SrcList *pSrc;                  /* All tables in the FROM clause */\n  int i, j;                       /* Loop counters */\n  SrcItem *pLeft;                 /* Left table being joined */\n  SrcItem *pRight;                /* Right table being joined */\n\n  pSrc = p->pSrc;\n  pLeft = &pSrc->a[0];\n  pRight = &pLeft[1];\n  for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){\n    Table *pRightTab = pRight->pSTab;\n    u32 joinType;\n\n    if( NEVER(pLeft->pSTab==0 || pRightTab==0) ) continue;\n    joinType = (pRight->fg.jointype & JT_OUTER)!=0 ? EP_OuterON : EP_InnerON;\n\n    /* If this is a NATURAL join, synthesize an appropriate USING clause\n    ** to specify which columns should be joined.\n    */\n    if( pRight->fg.jointype & JT_NATURAL ){\n      IdList *pUsing = 0;\n      if( pRight->fg.isUsing || pRight->u3.pOn ){\n        sqlite3ErrorMsg(pParse, \"a NATURAL join may not have \"\n           \"an ON or USING clause\", 0);\n        return 1;\n      }\n      for(j=0; j<pRightTab->nCol; j++){\n        char *zName;   /* Name of column in the right table */\n\n        if( IsHiddenColumn(&pRightTab->aCol[j]) ) continue;\n        zName = pRightTab->aCol[j].zCnName;\n        if( tableAndColumnIndex(pSrc, 0, i, zName, 0, 0, 1) ){\n          pUsing = sqlite3IdListAppend(pParse, pUsing, 0);\n          if( pUsing ){\n            assert( pUsing->nId>0 );\n            assert( pUsing->a[pUsing->nId-1].zName==0 );\n            pUsing->a[pUsing->nId-1].zName = sqlite3DbStrDup(pParse->db, zName);\n          }\n        }\n      }\n      if( pUsing ){\n        pRight->fg.isUsing = 1;\n        pRight->fg.isSynthUsing = 1;\n        pRight->u3.pUsing = pUsing;\n      }\n      if( pParse->nErr ) return 1;\n    }\n\n    /* Create extra terms on the WHERE clause for each column named\n    ** in the USING clause.  Example: If the two tables to be joined are\n    ** A and B and the USING clause names X, Y, and Z, then add this\n    ** to the WHERE clause:    A.X=B.X AND A.Y=B.Y AND A.Z=B.Z\n    ** Report an error if any column mentioned in the USING clause is\n    ** not contained in both tables to be joined.\n    */\n    if( pRight->fg.isUsing ){\n      IdList *pList = pRight->u3.pUsing;\n      sqlite3 *db = pParse->db;\n      assert( pList!=0 );\n      for(j=0; j<pList->nId; j++){\n        char *zName;     /* Name of the term in the USING clause */\n        int iLeft;       /* Table on the left with matching column name */\n        int iLeftCol;    /* Column number of matching column on the left */\n        int iRightCol;   /* Column number of matching column on the right */\n        Expr *pE1;       /* Reference to the column on the LEFT of the join */\n        Expr *pE2;       /* Reference to the column on the RIGHT of the join */\n        Expr *pEq;       /* Equality constraint.  pE1 == pE2 */\n\n        zName = pList->a[j].zName;\n        iRightCol = sqlite3ColumnIndex(pRightTab, zName);\n        if( iRightCol<0\n         || tableAndColumnIndex(pSrc, 0, i, zName, &iLeft, &iLeftCol,\n                                pRight->fg.isSynthUsing)==0\n        ){\n          sqlite3ErrorMsg(pParse, \"cannot join using column %s - column \"\n            \"not present in both tables\", zName);\n          return 1;\n        }\n        pE1 = sqlite3CreateColumnExpr(db, pSrc, iLeft, iLeftCol);\n        sqlite3SrcItemColumnUsed(&pSrc->a[iLeft], iLeftCol);\n        if( (pSrc->a[0].fg.jointype & JT_LTORJ)!=0 && pParse->nErr==0 ){\n          /* This branch runs if the query contains one or more RIGHT or FULL\n          ** JOINs.  If only a single table on the left side of this join\n          ** contains the zName column, then this branch is a no-op.\n          ** But if there are two or more tables on the left side\n          ** of the join, construct a coalesce() function that gathers all\n          ** such tables.  Raise an error if more than one of those references\n          ** to zName is not also within a prior USING clause.\n          **\n          ** We really ought to raise an error if there are two or more\n          ** non-USING references to zName on the left of an INNER or LEFT\n          ** JOIN.  But older versions of SQLite do not do that, so we avoid\n          ** adding a new error so as to not break legacy applications.\n          */\n          ExprList *pFuncArgs = 0;   /* Arguments to the coalesce() */\n          static const Token tkCoalesce = { \"coalesce\", 8 };\n          assert( pE1!=0 );\n          ExprSetProperty(pE1, EP_CanBeNull);\n          while( tableAndColumnIndex(pSrc, iLeft+1, i, zName, &iLeft, &iLeftCol,\n                                     pRight->fg.isSynthUsing)!=0 ){\n            if( pSrc->a[iLeft].fg.isUsing==0\n             || sqlite3IdListIndex(pSrc->a[iLeft].u3.pUsing, zName)<0\n            ){\n              sqlite3ErrorMsg(pParse, \"ambiguous reference to %s in USING()\",\n                              zName);\n              break;\n            }\n            pFuncArgs = sqlite3ExprListAppend(pParse, pFuncArgs, pE1);\n            pE1 = sqlite3CreateColumnExpr(db, pSrc, iLeft, iLeftCol);\n            sqlite3SrcItemColumnUsed(&pSrc->a[iLeft], iLeftCol);\n          }\n          if( pFuncArgs ){\n            pFuncArgs = sqlite3ExprListAppend(pParse, pFuncArgs, pE1);\n            pE1 = sqlite3ExprFunction(pParse, pFuncArgs, &tkCoalesce, 0);\n            if( pE1 ){\n              pE1->affExpr = SQLITE_AFF_DEFER;\n            }\n          }\n        }else if( (pSrc->a[i+1].fg.jointype & JT_LEFT)!=0 && pParse->nErr==0 ){\n          assert( pE1!=0 );\n          ExprSetProperty(pE1, EP_CanBeNull);\n        }\n        pE2 = sqlite3CreateColumnExpr(db, pSrc, i+1, iRightCol);\n        sqlite3SrcItemColumnUsed(pRight, iRightCol);\n        pEq = sqlite3PExpr(pParse, TK_EQ, pE1, pE2);\n        assert( pE2!=0 || pEq==0 );\n        if( pEq ){\n          ExprSetProperty(pEq, joinType);\n          assert( !ExprHasProperty(pEq, EP_TokenOnly|EP_Reduced) );\n          ExprSetVVAProperty(pEq, EP_NoReduce);\n          pEq->w.iJoin = pE2->iTable;\n        }\n        p->pWhere = sqlite3ExprAnd(pParse, p->pWhere, pEq);\n      }\n    }\n\n    /* Add the ON clause to the end of the WHERE clause, connected by\n    ** an AND operator.\n    */\n    else if( pRight->u3.pOn ){\n      sqlite3SetJoinExpr(pRight->u3.pOn, pRight->iCursor, joinType);\n      p->pWhere = sqlite3ExprAnd(pParse, p->pWhere, pRight->u3.pOn);\n      pRight->u3.pOn = 0;\n      pRight->fg.isOn = 1;\n      p->selFlags |= SF_OnToWhere;\n    }\n  }\n  return 0;\n}\n\n/*\n** An instance of this object holds information (beyond pParse and pSelect)\n** needed to load the next result row that is to be added to the sorter.\n*/\ntypedef struct RowLoadInfo RowLoadInfo;\nstruct RowLoadInfo {\n  int regResult;               /* Store results in array of registers here */\n  u8 ecelFlags;                /* Flag argument to ExprCodeExprList() */\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  ExprList *pExtra;            /* Extra columns needed by sorter refs */\n  int regExtraResult;          /* Where to load the extra columns */\n#endif\n};\n\n/*\n** This routine does the work of loading query data into an array of\n** registers so that it can be added to the sorter.\n*/\nstatic void innerLoopLoadRow(\n  Parse *pParse,             /* Statement under construction */\n  Select *pSelect,           /* The query being coded */\n  RowLoadInfo *pInfo         /* Info needed to complete the row load */\n){\n  sqlite3ExprCodeExprList(pParse, pSelect->pEList, pInfo->regResult,\n                          0, pInfo->ecelFlags);\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  if( pInfo->pExtra ){\n    sqlite3ExprCodeExprList(pParse, pInfo->pExtra, pInfo->regExtraResult, 0, 0);\n    sqlite3ExprListDelete(pParse->db, pInfo->pExtra);\n  }\n#endif\n}\n\n/*\n** Code the OP_MakeRecord instruction that generates the entry to be\n** added into the sorter.\n**\n** Return the register in which the result is stored.\n*/\nstatic int makeSorterRecord(\n  Parse *pParse,\n  SortCtx *pSort,\n  Select *pSelect,\n  int regBase,\n  int nBase\n){\n  int nOBSat = pSort->nOBSat;\n  Vdbe *v = pParse->pVdbe;\n  int regOut = ++pParse->nMem;\n  if( pSort->pDeferredRowLoad ){\n    innerLoopLoadRow(pParse, pSelect, pSort->pDeferredRowLoad);\n  }\n  sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase+nOBSat, nBase-nOBSat, regOut);\n  return regOut;\n}\n\n/*\n** Generate code that will push the record in registers regData\n** through regData+nData-1 onto the sorter.\n*/\nstatic void pushOntoSorter(\n  Parse *pParse,         /* Parser context */\n  SortCtx *pSort,        /* Information about the ORDER BY clause */\n  Select *pSelect,       /* The whole SELECT statement */\n  int regData,           /* First register holding data to be sorted */\n  int regOrigData,       /* First register holding data before packing */\n  int nData,             /* Number of elements in the regData data array */\n  int nPrefixReg         /* No. of reg prior to regData available for use */\n){\n  Vdbe *v = pParse->pVdbe;                         /* Stmt under construction */\n  int bSeq = ((pSort->sortFlags & SORTFLAG_UseSorter)==0);\n  int nExpr = pSort->pOrderBy->nExpr;              /* No. of ORDER BY terms */\n  int nBase = nExpr + bSeq + nData;                /* Fields in sorter record */\n  int regBase;                                     /* Regs for sorter record */\n  int regRecord = 0;                               /* Assembled sorter record */\n  int nOBSat = pSort->nOBSat;                      /* ORDER BY terms to skip */\n  int op;                            /* Opcode to add sorter record to sorter */\n  int iLimit;                        /* LIMIT counter */\n  int iSkip = 0;                     /* End of the sorter insert loop */\n\n  assert( bSeq==0 || bSeq==1 );\n\n  /* Three cases:\n  **   (1) The data to be sorted has already been packed into a Record\n  **       by a prior OP_MakeRecord.  In this case nData==1 and regData\n  **       will be completely unrelated to regOrigData.\n  **   (2) All output columns are included in the sort record.  In that\n  **       case regData==regOrigData.\n  **   (3) Some output columns are omitted from the sort record due to\n  **       the SQLITE_ENABLE_SORTER_REFERENCES optimization, or due to the\n  **       SQLITE_ECEL_OMITREF optimization, or due to the\n  **       SortCtx.pDeferredRowLoad optimization.  In any of these cases\n  **       regOrigData is 0 to prevent this routine from trying to copy\n  **       values that might not yet exist.\n  */\n  assert( nData==1 || regData==regOrigData || regOrigData==0 );\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  pSort->addrPush = sqlite3VdbeCurrentAddr(v);\n#endif\n\n  if( nPrefixReg ){\n    assert( nPrefixReg==nExpr+bSeq );\n    regBase = regData - nPrefixReg;\n  }else{\n    regBase = pParse->nMem + 1;\n    pParse->nMem += nBase;\n  }\n  assert( pSelect->iOffset==0 || pSelect->iLimit!=0 );\n  iLimit = pSelect->iOffset ? pSelect->iOffset+1 : pSelect->iLimit;\n  pSort->labelDone = sqlite3VdbeMakeLabel(pParse);\n  sqlite3ExprCodeExprList(pParse, pSort->pOrderBy, regBase, regOrigData,\n                          SQLITE_ECEL_DUP | (regOrigData? SQLITE_ECEL_REF : 0));\n  if( bSeq ){\n    sqlite3VdbeAddOp2(v, OP_Sequence, pSort->iECursor, regBase+nExpr);\n  }\n  if( nPrefixReg==0 && nData>0 ){\n    sqlite3ExprCodeMove(pParse, regData, regBase+nExpr+bSeq, nData);\n  }\n  if( nOBSat>0 ){\n    int regPrevKey;   /* The first nOBSat columns of the previous row */\n    int addrFirst;    /* Address of the OP_IfNot opcode */\n    int addrJmp;      /* Address of the OP_Jump opcode */\n    VdbeOp *pOp;      /* Opcode that opens the sorter */\n    int nKey;         /* Number of sorting key columns, including OP_Sequence */\n    KeyInfo *pKI;     /* Original KeyInfo on the sorter table */\n\n    regRecord = makeSorterRecord(pParse, pSort, pSelect, regBase, nBase);\n    regPrevKey = pParse->nMem+1;\n    pParse->nMem += pSort->nOBSat;\n    nKey = nExpr - pSort->nOBSat + bSeq;\n    if( bSeq ){\n      addrFirst = sqlite3VdbeAddOp1(v, OP_IfNot, regBase+nExpr);\n    }else{\n      addrFirst = sqlite3VdbeAddOp1(v, OP_SequenceTest, pSort->iECursor);\n    }\n    VdbeCoverage(v);\n    sqlite3VdbeAddOp3(v, OP_Compare, regPrevKey, regBase, pSort->nOBSat);\n    pOp = sqlite3VdbeGetOp(v, pSort->addrSortIndex);\n    if( pParse->db->mallocFailed ) return;\n    pOp->p2 = nKey + nData;\n    pKI = pOp->p4.pKeyInfo;\n    memset(pKI->aSortFlags, 0, pKI->nKeyField); /* Makes OP_Jump testable */\n    sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO);\n    testcase( pKI->nAllField > pKI->nKeyField+2 );\n    pOp->p4.pKeyInfo = sqlite3KeyInfoFromExprList(pParse,pSort->pOrderBy,nOBSat,\n                                           pKI->nAllField-pKI->nKeyField-1);\n    pOp = 0; /* Ensure pOp not used after sqlite3VdbeAddOp3() */\n    addrJmp = sqlite3VdbeCurrentAddr(v);\n    sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v);\n    pSort->labelBkOut = sqlite3VdbeMakeLabel(pParse);\n    pSort->regReturn = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);\n    sqlite3VdbeAddOp1(v, OP_ResetSorter, pSort->iECursor);\n    if( iLimit ){\n      sqlite3VdbeAddOp2(v, OP_IfNot, iLimit, pSort->labelDone);\n      VdbeCoverage(v);\n    }\n    sqlite3VdbeJumpHere(v, addrFirst);\n    sqlite3ExprCodeMove(pParse, regBase, regPrevKey, pSort->nOBSat);\n    sqlite3VdbeJumpHere(v, addrJmp);\n  }\n  if( iLimit ){\n    /* At this point the values for the new sorter entry are stored\n    ** in an array of registers. They need to be composed into a record\n    ** and inserted into the sorter if either (a) there are currently\n    ** less than LIMIT+OFFSET items or (b) the new record is smaller than\n    ** the largest record currently in the sorter. If (b) is true and there\n    ** are already LIMIT+OFFSET items in the sorter, delete the largest\n    ** entry before inserting the new one. This way there are never more\n    ** than LIMIT+OFFSET items in the sorter.\n    **\n    ** If the new record does not need to be inserted into the sorter,\n    ** jump to the next iteration of the loop. If the pSort->labelOBLopt\n    ** value is not zero, then it is a label of where to jump.  Otherwise,\n    ** just bypass the row insert logic.  See the header comment on the\n    ** sqlite3WhereOrderByLimitOptLabel() function for additional info.\n    */\n    int iCsr = pSort->iECursor;\n    sqlite3VdbeAddOp2(v, OP_IfNotZero, iLimit, sqlite3VdbeCurrentAddr(v)+4);\n    VdbeCoverage(v);\n    sqlite3VdbeAddOp2(v, OP_Last, iCsr, 0);\n    iSkip = sqlite3VdbeAddOp4Int(v, OP_IdxLE,\n                                 iCsr, 0, regBase+nOBSat, nExpr-nOBSat);\n    VdbeCoverage(v);\n    sqlite3VdbeAddOp1(v, OP_Delete, iCsr);\n  }\n  if( regRecord==0 ){\n    regRecord = makeSorterRecord(pParse, pSort, pSelect, regBase, nBase);\n  }\n  if( pSort->sortFlags & SORTFLAG_UseSorter ){\n    op = OP_SorterInsert;\n  }else{\n    op = OP_IdxInsert;\n  }\n  sqlite3VdbeAddOp4Int(v, op, pSort->iECursor, regRecord,\n                       regBase+nOBSat, nBase-nOBSat);\n  if( iSkip ){\n    sqlite3VdbeChangeP2(v, iSkip,\n         pSort->labelOBLopt ? pSort->labelOBLopt : sqlite3VdbeCurrentAddr(v));\n  }\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  pSort->addrPushEnd = sqlite3VdbeCurrentAddr(v)-1;\n#endif\n}\n\n/*\n** Add code to implement the OFFSET\n*/\nstatic void codeOffset(\n  Vdbe *v,          /* Generate code into this VM */\n  int iOffset,      /* Register holding the offset counter */\n  int iContinue     /* Jump here to skip the current record */\n){\n  if( iOffset>0 ){\n    sqlite3VdbeAddOp3(v, OP_IfPos, iOffset, iContinue, 1); VdbeCoverage(v);\n    VdbeComment((v, \"OFFSET\"));\n  }\n}\n\n/*\n** Add code that will check to make sure the array of registers starting at\n** iMem form a distinct entry. This is used by both \"SELECT DISTINCT ...\" and\n** distinct aggregates (\"SELECT count(DISTINCT <expr>) ...\"). Three strategies\n** are available. Which is used depends on the value of parameter eTnctType,\n** as follows:\n**\n**   WHERE_DISTINCT_UNORDERED/WHERE_DISTINCT_NOOP:\n**     Build an ephemeral table that contains all entries seen before and\n**     skip entries which have been seen before.\n**\n**     Parameter iTab is the cursor number of an ephemeral table that must\n**     be opened before the VM code generated by this routine is executed.\n**     The ephemeral cursor table is queried for a record identical to the\n**     record formed by the current array of registers. If one is found,\n**     jump to VM address addrRepeat. Otherwise, insert a new record into\n**     the ephemeral cursor and proceed.\n**\n**     The returned value in this case is a copy of parameter iTab.\n**\n**   WHERE_DISTINCT_ORDERED:\n**     In this case rows are being delivered sorted order. The ephemeral\n**     table is not required. Instead, the current set of values\n**     is compared against previous row. If they match, the new row\n**     is not distinct and control jumps to VM address addrRepeat. Otherwise,\n**     the VM program proceeds with processing the new row.\n**\n**     The returned value in this case is the register number of the first\n**     in an array of registers used to store the previous result row so that\n**     it can be compared to the next. The caller must ensure that this\n**     register is initialized to NULL.  (The fixDistinctOpenEph() routine\n**     will take care of this initialization.)\n**\n**   WHERE_DISTINCT_UNIQUE:\n**     In this case it has already been determined that the rows are distinct.\n**     No special action is required. The return value is zero.\n**\n** Parameter pEList is the list of expressions used to generated the\n** contents of each row. It is used by this routine to determine (a)\n** how many elements there are in the array of registers and (b) the\n** collation sequences that should be used for the comparisons if\n** eTnctType is WHERE_DISTINCT_ORDERED.\n*/\nstatic int codeDistinct(\n  Parse *pParse,     /* Parsing and code generating context */\n  int eTnctType,     /* WHERE_DISTINCT_* value */\n  int iTab,          /* A sorting index used to test for distinctness */\n  int addrRepeat,    /* Jump to here if not distinct */\n  ExprList *pEList,  /* Expression for each element */\n  int regElem        /* First element */\n){\n  int iRet = 0;\n  int nResultCol = pEList->nExpr;\n  Vdbe *v = pParse->pVdbe;\n\n  switch( eTnctType ){\n    case WHERE_DISTINCT_ORDERED: {\n      int i;\n      int iJump;              /* Jump destination */\n      int regPrev;            /* Previous row content */\n\n      /* Allocate space for the previous row */\n      iRet = regPrev = pParse->nMem+1;\n      pParse->nMem += nResultCol;\n\n      iJump = sqlite3VdbeCurrentAddr(v) + nResultCol;\n      for(i=0; i<nResultCol; i++){\n        CollSeq *pColl = sqlite3ExprCollSeq(pParse, pEList->a[i].pExpr);\n        if( i<nResultCol-1 ){\n          sqlite3VdbeAddOp3(v, OP_Ne, regElem+i, iJump, regPrev+i);\n          VdbeCoverage(v);\n        }else{\n          sqlite3VdbeAddOp3(v, OP_Eq, regElem+i, addrRepeat, regPrev+i);\n          VdbeCoverage(v);\n         }\n        sqlite3VdbeChangeP4(v, -1, (const char *)pColl, P4_COLLSEQ);\n        sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);\n      }\n      assert( sqlite3VdbeCurrentAddr(v)==iJump || pParse->db->mallocFailed );\n      sqlite3VdbeAddOp3(v, OP_Copy, regElem, regPrev, nResultCol-1);\n      break;\n    }\n\n    case WHERE_DISTINCT_UNIQUE: {\n      /* nothing to do */\n      break;\n    }\n\n    default: {\n      int r1 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp4Int(v, OP_Found, iTab, addrRepeat, regElem, nResultCol);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regElem, nResultCol, r1);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r1, regElem, nResultCol);\n      sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n      sqlite3ReleaseTempReg(pParse, r1);\n      iRet = iTab;\n      break;\n    }\n  }\n\n  return iRet;\n}\n\n/*\n** This routine runs after codeDistinct().  It makes necessary\n** adjustments to the OP_OpenEphemeral opcode that the codeDistinct()\n** routine made use of.  This processing must be done separately since\n** sometimes codeDistinct is called before the OP_OpenEphemeral is actually\n** laid down.\n**\n** WHERE_DISTINCT_NOOP:\n** WHERE_DISTINCT_UNORDERED:\n**\n**     No adjustments necessary.  This function is a no-op.\n**\n** WHERE_DISTINCT_UNIQUE:\n**\n**     The ephemeral table is not needed.  So change the\n**     OP_OpenEphemeral opcode into an OP_Noop.\n**\n** WHERE_DISTINCT_ORDERED:\n**\n**     The ephemeral table is not needed.  But we do need register\n**     iVal to be initialized to NULL.  So change the OP_OpenEphemeral\n**     into an OP_Null on the iVal register.\n*/\nstatic void fixDistinctOpenEph(\n  Parse *pParse,     /* Parsing and code generating context */\n  int eTnctType,     /* WHERE_DISTINCT_* value */\n  int iVal,          /* Value returned by codeDistinct() */\n  int iOpenEphAddr   /* Address of OP_OpenEphemeral instruction for iTab */\n){\n  if( pParse->nErr==0\n   && (eTnctType==WHERE_DISTINCT_UNIQUE || eTnctType==WHERE_DISTINCT_ORDERED)\n  ){\n    Vdbe *v = pParse->pVdbe;\n    sqlite3VdbeChangeToNoop(v, iOpenEphAddr);\n    if( sqlite3VdbeGetOp(v, iOpenEphAddr+1)->opcode==OP_Explain ){\n      sqlite3VdbeChangeToNoop(v, iOpenEphAddr+1);\n    }\n    if( eTnctType==WHERE_DISTINCT_ORDERED ){\n      /* Change the OP_OpenEphemeral to an OP_Null that sets the MEM_Cleared\n      ** bit on the first register of the previous value.  This will cause the\n      ** OP_Ne added in codeDistinct() to always fail on the first iteration of\n      ** the loop even if the first row is all NULLs.  */\n      VdbeOp *pOp = sqlite3VdbeGetOp(v, iOpenEphAddr);\n      pOp->opcode = OP_Null;\n      pOp->p1 = 1;\n      pOp->p2 = iVal;\n    }\n  }\n}\n\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n/*\n** This function is called as part of inner-loop generation for a SELECT\n** statement with an ORDER BY that is not optimized by an index. It\n** determines the expressions, if any, that the sorter-reference\n** optimization should be used for. The sorter-reference optimization\n** is used for SELECT queries like:\n**\n**   SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10\n**\n** If the optimization is used for expression \"bigblob\", then instead of\n** storing values read from that column in the sorter records, the PK of\n** the row from table t1 is stored instead. Then, as records are extracted from\n** the sorter to return to the user, the required value of bigblob is\n** retrieved directly from table t1. If the values are very large, this\n** can be more efficient than storing them directly in the sorter records.\n**\n** The ExprList_item.fg.bSorterRef flag is set for each expression in pEList\n** for which the sorter-reference optimization should be enabled.\n** Additionally, the pSort->aDefer[] array is populated with entries\n** for all cursors required to evaluate all selected expressions. Finally.\n** output variable (*ppExtra) is set to an expression list containing\n** expressions for all extra PK values that should be stored in the\n** sorter records.\n*/\nstatic void selectExprDefer(\n  Parse *pParse,                  /* Leave any error here */\n  SortCtx *pSort,                 /* Sorter context */\n  ExprList *pEList,               /* Expressions destined for sorter */\n  ExprList **ppExtra              /* Expressions to append to sorter record */\n){\n  int i;\n  int nDefer = 0;\n  ExprList *pExtra = 0;\n  for(i=0; i<pEList->nExpr; i++){\n    struct ExprList_item *pItem = &pEList->a[i];\n    if( pItem->u.x.iOrderByCol==0 ){\n      Expr *pExpr = pItem->pExpr;\n      Table *pTab;\n      if( pExpr->op==TK_COLUMN\n       && pExpr->iColumn>=0\n       && ALWAYS( ExprUseYTab(pExpr) )\n       && (pTab = pExpr->y.pTab)!=0\n       && IsOrdinaryTable(pTab)\n       && (pTab->aCol[pExpr->iColumn].colFlags & COLFLAG_SORTERREF)!=0\n      ){\n        int j;\n        for(j=0; j<nDefer; j++){\n          if( pSort->aDefer[j].iCsr==pExpr->iTable ) break;\n        }\n        if( j==nDefer ){\n          if( nDefer==ArraySize(pSort->aDefer) ){\n            continue;\n          }else{\n            int nKey = 1;\n            int k;\n            Index *pPk = 0;\n            if( !HasRowid(pTab) ){\n              pPk = sqlite3PrimaryKeyIndex(pTab);\n              nKey = pPk->nKeyCol;\n            }\n            for(k=0; k<nKey; k++){\n              Expr *pNew = sqlite3PExpr(pParse, TK_COLUMN, 0, 0);\n              if( pNew ){\n                pNew->iTable = pExpr->iTable;\n                assert( ExprUseYTab(pNew) );\n                pNew->y.pTab = pExpr->y.pTab;\n                pNew->iColumn = pPk ? pPk->aiColumn[k] : -1;\n                pExtra = sqlite3ExprListAppend(pParse, pExtra, pNew);\n              }\n            }\n            pSort->aDefer[nDefer].pTab = pExpr->y.pTab;\n            pSort->aDefer[nDefer].iCsr = pExpr->iTable;\n            pSort->aDefer[nDefer].nKey = nKey;\n            nDefer++;\n          }\n        }\n        pItem->fg.bSorterRef = 1;\n      }\n    }\n  }\n  pSort->nDefer = (u8)nDefer;\n  *ppExtra = pExtra;\n}\n#endif\n\n/*\n** This routine generates the code for the inside of the inner loop\n** of a SELECT.\n**\n** If srcTab is negative, then the p->pEList expressions\n** are evaluated in order to get the data for this row.  If srcTab is\n** zero or more, then data is pulled from srcTab and p->pEList is used only\n** to get the number of columns and the collation sequence for each column.\n*/\nstatic void selectInnerLoop(\n  Parse *pParse,          /* The parser context */\n  Select *p,              /* The complete select statement being coded */\n  int srcTab,             /* Pull data from this table if non-negative */\n  SortCtx *pSort,         /* If not NULL, info on how to process ORDER BY */\n  DistinctCtx *pDistinct, /* If not NULL, info on how to process DISTINCT */\n  SelectDest *pDest,      /* How to dispose of the results */\n  int iContinue,          /* Jump here to continue with next row */\n  int iBreak              /* Jump here to break out of the inner loop */\n){\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  int hasDistinct;            /* True if the DISTINCT keyword is present */\n  int eDest = pDest->eDest;   /* How to dispose of results */\n  int iParm = pDest->iSDParm; /* First argument to disposal method */\n  int nResultCol;             /* Number of result columns */\n  int nPrefixReg = 0;         /* Number of extra registers before regResult */\n  RowLoadInfo sRowLoadInfo;   /* Info for deferred row loading */\n\n  /* Usually, regResult is the first cell in an array of memory cells\n  ** containing the current result row. In this case regOrig is set to the\n  ** same value. However, if the results are being sent to the sorter, the\n  ** values for any expressions that are also part of the sort-key are omitted\n  ** from this array. In this case regOrig is set to zero.  */\n  int regResult;              /* Start of memory holding current results */\n  int regOrig;                /* Start of memory holding full result (or 0) */\n\n  assert( v );\n  assert( p->pEList!=0 );\n  hasDistinct = pDistinct ? pDistinct->eTnctType : WHERE_DISTINCT_NOOP;\n  if( pSort && pSort->pOrderBy==0 ) pSort = 0;\n  if( pSort==0 && !hasDistinct ){\n    assert( iContinue!=0 );\n    codeOffset(v, p->iOffset, iContinue);\n  }\n\n  /* Pull the requested columns.\n  */\n  nResultCol = p->pEList->nExpr;\n\n  if( pDest->iSdst==0 ){\n    if( pSort ){\n      nPrefixReg = pSort->pOrderBy->nExpr;\n      if( !(pSort->sortFlags & SORTFLAG_UseSorter) ) nPrefixReg++;\n      pParse->nMem += nPrefixReg;\n    }\n    pDest->iSdst = pParse->nMem+1;\n    pParse->nMem += nResultCol;\n  }else if( pDest->iSdst+nResultCol > pParse->nMem ){\n    /* This is an error condition that can result, for example, when a SELECT\n    ** on the right-hand side of an INSERT contains more result columns than\n    ** there are columns in the table on the left.  The error will be caught\n    ** and reported later.  But we need to make sure enough memory is allocated\n    ** to avoid other spurious errors in the meantime. */\n    pParse->nMem += nResultCol;\n  }\n  pDest->nSdst = nResultCol;\n  regOrig = regResult = pDest->iSdst;\n  if( srcTab>=0 ){\n    for(i=0; i<nResultCol; i++){\n      sqlite3VdbeAddOp3(v, OP_Column, srcTab, i, regResult+i);\n      VdbeComment((v, \"%s\", p->pEList->a[i].zEName));\n    }\n  }else if( eDest!=SRT_Exists ){\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    ExprList *pExtra = 0;\n#endif\n    /* If the destination is an EXISTS(...) expression, the actual\n    ** values returned by the SELECT are not required.\n    */\n    u8 ecelFlags;    /* \"ecel\" is an abbreviation of \"ExprCodeExprList\" */\n    ExprList *pEList;\n    if( eDest==SRT_Mem || eDest==SRT_Output || eDest==SRT_Coroutine ){\n      ecelFlags = SQLITE_ECEL_DUP;\n    }else{\n      ecelFlags = 0;\n    }\n    if( pSort && hasDistinct==0 && eDest!=SRT_EphemTab && eDest!=SRT_Table ){\n      /* For each expression in p->pEList that is a copy of an expression in\n      ** the ORDER BY clause (pSort->pOrderBy), set the associated\n      ** iOrderByCol value to one more than the index of the ORDER BY\n      ** expression within the sort-key that pushOntoSorter() will generate.\n      ** This allows the p->pEList field to be omitted from the sorted record,\n      ** saving space and CPU cycles.  */\n      ecelFlags |= (SQLITE_ECEL_OMITREF|SQLITE_ECEL_REF);\n\n      for(i=pSort->nOBSat; i<pSort->pOrderBy->nExpr; i++){\n        int j;\n        if( (j = pSort->pOrderBy->a[i].u.x.iOrderByCol)>0 ){\n          p->pEList->a[j-1].u.x.iOrderByCol = i+1-pSort->nOBSat;\n        }\n      }\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n      selectExprDefer(pParse, pSort, p->pEList, &pExtra);\n      if( pExtra && pParse->db->mallocFailed==0 ){\n        /* If there are any extra PK columns to add to the sorter records,\n        ** allocate extra memory cells and adjust the OpenEphemeral\n        ** instruction to account for the larger records. This is only\n        ** required if there are one or more WITHOUT ROWID tables with\n        ** composite primary keys in the SortCtx.aDefer[] array.  */\n        VdbeOp *pOp = sqlite3VdbeGetOp(v, pSort->addrSortIndex);\n        pOp->p2 += (pExtra->nExpr - pSort->nDefer);\n        pOp->p4.pKeyInfo->nAllField += (pExtra->nExpr - pSort->nDefer);\n        pParse->nMem += pExtra->nExpr;\n      }\n#endif\n\n      /* Adjust nResultCol to account for columns that are omitted\n      ** from the sorter by the optimizations in this branch */\n      pEList = p->pEList;\n      for(i=0; i<pEList->nExpr; i++){\n        if( pEList->a[i].u.x.iOrderByCol>0\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n         || pEList->a[i].fg.bSorterRef\n#endif\n        ){\n          nResultCol--;\n          regOrig = 0;\n        }\n      }\n\n      testcase( regOrig );\n      testcase( eDest==SRT_Set );\n      testcase( eDest==SRT_Mem );\n      testcase( eDest==SRT_Coroutine );\n      testcase( eDest==SRT_Output );\n      assert( eDest==SRT_Set || eDest==SRT_Mem\n           || eDest==SRT_Coroutine || eDest==SRT_Output\n           || eDest==SRT_Upfrom );\n    }\n    sRowLoadInfo.regResult = regResult;\n    sRowLoadInfo.ecelFlags = ecelFlags;\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    sRowLoadInfo.pExtra = pExtra;\n    sRowLoadInfo.regExtraResult = regResult + nResultCol;\n    if( pExtra ) nResultCol += pExtra->nExpr;\n#endif\n    if( p->iLimit\n     && (ecelFlags & SQLITE_ECEL_OMITREF)!=0\n     && nPrefixReg>0\n    ){\n      assert( pSort!=0 );\n      assert( hasDistinct==0 );\n      pSort->pDeferredRowLoad = &sRowLoadInfo;\n      regOrig = 0;\n    }else{\n      innerLoopLoadRow(pParse, p, &sRowLoadInfo);\n    }\n  }\n\n  /* If the DISTINCT keyword was present on the SELECT statement\n  ** and this row has been seen before, then do not make this row\n  ** part of the result.\n  */\n  if( hasDistinct ){\n    int eType = pDistinct->eTnctType;\n    int iTab = pDistinct->tabTnct;\n    assert( nResultCol==p->pEList->nExpr );\n    iTab = codeDistinct(pParse, eType, iTab, iContinue, p->pEList, regResult);\n    fixDistinctOpenEph(pParse, eType, iTab, pDistinct->addrTnct);\n    if( pSort==0 ){\n      codeOffset(v, p->iOffset, iContinue);\n    }\n  }\n\n  switch( eDest ){\n    /* In this mode, write each query result to the key of the temporary\n    ** table iParm.\n    */\n#ifndef SQLITE_OMIT_COMPOUND_SELECT\n    case SRT_Union: {\n      int r1;\n      r1 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nResultCol, r1);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, regResult, nResultCol);\n      sqlite3ReleaseTempReg(pParse, r1);\n      break;\n    }\n\n    /* Construct a record from the query result, but instead of\n    ** saving that record, use it as a key to delete elements from\n    ** the temporary table iParm.\n    */\n    case SRT_Except: {\n      sqlite3VdbeAddOp3(v, OP_IdxDelete, iParm, regResult, nResultCol);\n      break;\n    }\n#endif /* SQLITE_OMIT_COMPOUND_SELECT */\n\n    /* Store the result as data using a unique key.\n    */\n    case SRT_Fifo:\n    case SRT_DistFifo:\n    case SRT_Table:\n    case SRT_EphemTab: {\n      int r1 = sqlite3GetTempRange(pParse, nPrefixReg+1);\n      testcase( eDest==SRT_Table );\n      testcase( eDest==SRT_EphemTab );\n      testcase( eDest==SRT_Fifo );\n      testcase( eDest==SRT_DistFifo );\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg);\n#if !defined(SQLITE_ENABLE_NULL_TRIM) && defined(SQLITE_DEBUG)\n      /* A destination of SRT_Table and a non-zero iSDParm2 parameter means\n      ** that this is an \"UPDATE ... FROM\" on a virtual table or view. In this\n      ** case set the p5 parameter of the OP_MakeRecord to OPFLAG_NOCHNG_MAGIC.\n      ** This does not affect operation in any way - it just allows MakeRecord\n      ** to process OPFLAG_NOCHANGE values without an assert() failing. */\n      if( eDest==SRT_Table && pDest->iSDParm2 ){\n        sqlite3VdbeChangeP5(v, OPFLAG_NOCHNG_MAGIC);\n      }\n#endif\n#ifndef SQLITE_OMIT_CTE\n      if( eDest==SRT_DistFifo ){\n        /* If the destination is DistFifo, then cursor (iParm+1) is open\n        ** on an ephemeral index. If the current row is already present\n        ** in the index, do not write it to the output. If not, add the\n        ** current row to the index and proceed with writing it to the\n        ** output table as well.  */\n        int addr = sqlite3VdbeCurrentAddr(v) + 4;\n        sqlite3VdbeAddOp4Int(v, OP_Found, iParm+1, addr, r1, 0);\n        VdbeCoverage(v);\n        sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm+1, r1,regResult,nResultCol);\n        assert( pSort==0 );\n      }\n#endif\n      if( pSort ){\n        assert( regResult==regOrig );\n        pushOntoSorter(pParse, pSort, p, r1+nPrefixReg, regOrig, 1, nPrefixReg);\n      }else{\n        int r2 = sqlite3GetTempReg(pParse);\n        sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, r2);\n        sqlite3VdbeAddOp3(v, OP_Insert, iParm, r1, r2);\n        sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n        sqlite3ReleaseTempReg(pParse, r2);\n      }\n      sqlite3ReleaseTempRange(pParse, r1, nPrefixReg+1);\n      break;\n    }\n\n    case SRT_Upfrom: {\n      if( pSort ){\n        pushOntoSorter(\n            pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg);\n      }else{\n        int i2 = pDest->iSDParm2;\n        int r1 = sqlite3GetTempReg(pParse);\n\n        /* If the UPDATE FROM join is an aggregate that matches no rows, it\n        ** might still be trying to return one row, because that is what\n        ** aggregates do.  Don't record that empty row in the output table. */\n        sqlite3VdbeAddOp2(v, OP_IsNull, regResult, iBreak); VdbeCoverage(v);\n\n        sqlite3VdbeAddOp3(v, OP_MakeRecord,\n                          regResult+(i2<0), nResultCol-(i2<0), r1);\n        if( i2<0 ){\n          sqlite3VdbeAddOp3(v, OP_Insert, iParm, r1, regResult);\n        }else{\n          sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, regResult, i2);\n        }\n      }\n      break;\n    }\n\n#ifndef SQLITE_OMIT_SUBQUERY\n    /* If we are creating a set for an \"expr IN (SELECT ...)\" construct,\n    ** then there should be a single item on the stack.  Write this\n    ** item into the set table with bogus data.\n    */\n    case SRT_Set: {\n      if( pSort ){\n        /* At first glance you would think we could optimize out the\n        ** ORDER BY in this case since the order of entries in the set\n        ** does not matter.  But there might be a LIMIT clause, in which\n        ** case the order does matter */\n        pushOntoSorter(\n            pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg);\n        pDest->iSDParm2 = 0; /* Signal that any Bloom filter is unpopulated */\n      }else{\n        int r1 = sqlite3GetTempReg(pParse);\n        assert( sqlite3Strlen30(pDest->zAffSdst)==nResultCol );\n        sqlite3VdbeAddOp4(v, OP_MakeRecord, regResult, nResultCol,\n            r1, pDest->zAffSdst, nResultCol);\n        sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, regResult, nResultCol);\n        if( pDest->iSDParm2 ){\n          sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pDest->iSDParm2, 0,\n                               regResult, nResultCol);\n          ExplainQueryPlan((pParse, 0, \"CREATE BLOOM FILTER\"));\n        }\n        sqlite3ReleaseTempReg(pParse, r1);\n      }\n      break;\n    }\n\n\n    /* If any row exist in the result set, record that fact and abort.\n    */\n    case SRT_Exists: {\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, iParm);\n      /* The LIMIT clause will terminate the loop for us */\n      break;\n    }\n\n    /* If this is a scalar select that is part of an expression, then\n    ** store the results in the appropriate memory cell or array of\n    ** memory cells and break out of the scan loop.\n    */\n    case SRT_Mem: {\n      if( pSort ){\n        assert( nResultCol<=pDest->nSdst );\n        pushOntoSorter(\n            pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg);\n        pDest->iSDParm = regResult;\n      }else{\n        assert( nResultCol==pDest->nSdst );\n        if( regResult!=iParm ){\n          /* This occurs in cases where the SELECT had both a DISTINCT and\n          ** an OFFSET clause.  */\n          sqlite3VdbeAddOp3(v, OP_Copy, regResult, iParm, nResultCol-1);\n        }\n        /* The LIMIT clause will jump out of the loop for us */\n      }\n      break;\n    }\n#endif /* #ifndef SQLITE_OMIT_SUBQUERY */\n\n    case SRT_Coroutine:       /* Send data to a co-routine */\n    case SRT_Output: {        /* Return the results */\n      testcase( eDest==SRT_Coroutine );\n      testcase( eDest==SRT_Output );\n      if( pSort ){\n        pushOntoSorter(pParse, pSort, p, regResult, regOrig, nResultCol,\n                       nPrefixReg);\n      }else if( eDest==SRT_Coroutine ){\n        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, nResultCol);\n      }\n      break;\n    }\n\n#ifndef SQLITE_OMIT_CTE\n    /* Write the results into a priority queue that is order according to\n    ** pDest->pOrderBy (in pSO).  pDest->iSDParm (in iParm) is the cursor for an\n    ** index with pSO->nExpr+2 columns.  Build a key using pSO for the first\n    ** pSO->nExpr columns, then make sure all keys are unique by adding a\n    ** final OP_Sequence column.  The last column is the record as a blob.\n    */\n    case SRT_DistQueue:\n    case SRT_Queue: {\n      int nKey;\n      int r1, r2, r3;\n      int addrTest = 0;\n      ExprList *pSO;\n      pSO = pDest->pOrderBy;\n      assert( pSO );\n      nKey = pSO->nExpr;\n      r1 = sqlite3GetTempReg(pParse);\n      r2 = sqlite3GetTempRange(pParse, nKey+2);\n      r3 = r2+nKey+1;\n      if( eDest==SRT_DistQueue ){\n        /* If the destination is DistQueue, then cursor (iParm+1) is open\n        ** on a second ephemeral index that holds all values every previously\n        ** added to the queue. */\n        addrTest = sqlite3VdbeAddOp4Int(v, OP_Found, iParm+1, 0,\n                                        regResult, nResultCol);\n        VdbeCoverage(v);\n      }\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nResultCol, r3);\n      if( eDest==SRT_DistQueue ){\n        sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm+1, r3);\n        sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n      }\n      for(i=0; i<nKey; i++){\n        sqlite3VdbeAddOp2(v, OP_SCopy,\n                          regResult + pSO->a[i].u.x.iOrderByCol - 1,\n                          r2+i);\n      }\n      sqlite3VdbeAddOp2(v, OP_Sequence, iParm, r2+nKey);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, r2, nKey+2, r1);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, r2, nKey+2);\n      if( addrTest ) sqlite3VdbeJumpHere(v, addrTest);\n      sqlite3ReleaseTempReg(pParse, r1);\n      sqlite3ReleaseTempRange(pParse, r2, nKey+2);\n      break;\n    }\n#endif /* SQLITE_OMIT_CTE */\n\n\n\n#if !defined(SQLITE_OMIT_TRIGGER)\n    /* Discard the results.  This is used for SELECT statements inside\n    ** the body of a TRIGGER.  The purpose of such selects is to call\n    ** user-defined functions that have side effects.  We do not care\n    ** about the actual results of the select.\n    */\n    default: {\n      assert( eDest==SRT_Discard );\n      break;\n    }\n#endif\n  }\n\n  /* Jump to the end of the loop if the LIMIT is reached.  Except, if\n  ** there is a sorter, in which case the sorter has already limited\n  ** the output for us.\n  */\n  if( pSort==0 && p->iLimit ){\n    sqlite3VdbeAddOp2(v, OP_DecrJumpZero, p->iLimit, iBreak); VdbeCoverage(v);\n  }\n}\n\n/*\n** Allocate a KeyInfo object sufficient for an index of N key columns and\n** X extra columns.\n*/\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){\n  int nExtra = (N+X)*(sizeof(CollSeq*)+1);\n  KeyInfo *p;\n  assert( X>=0 );\n  if( NEVER(N+X>0xffff) ) return (KeyInfo*)sqlite3OomFault(db);\n  p = sqlite3DbMallocRawNN(db, SZ_KEYINFO(0) + nExtra);\n  if( p ){\n    p->aSortFlags = (u8*)&p->aColl[N+X];\n    p->nKeyField = (u16)N;\n    p->nAllField = (u16)(N+X);\n    p->enc = ENC(db);\n    p->db = db;\n    p->nRef = 1;\n    memset(p->aColl, 0, nExtra);\n  }else{\n    return (KeyInfo*)sqlite3OomFault(db);\n  }\n  return p;\n}\n\n/*\n** Deallocate a KeyInfo object\n*/\nSQLITE_PRIVATE void sqlite3KeyInfoUnref(KeyInfo *p){\n  if( p ){\n    assert( p->db!=0 );\n    assert( p->nRef>0 );\n    p->nRef--;\n    if( p->nRef==0 ) sqlite3DbNNFreeNN(p->db, p);\n  }\n}\n\n/*\n** Make a new pointer to a KeyInfo object\n*/\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoRef(KeyInfo *p){\n  if( p ){\n    assert( p->nRef>0 );\n    p->nRef++;\n  }\n  return p;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Return TRUE if a KeyInfo object can be change.  The KeyInfo object\n** can only be changed if this is just a single reference to the object.\n**\n** This routine is used only inside of assert() statements.\n*/\nSQLITE_PRIVATE int sqlite3KeyInfoIsWriteable(KeyInfo *p){ return p->nRef==1; }\n#endif /* SQLITE_DEBUG */\n\n/*\n** Given an expression list, generate a KeyInfo structure that records\n** the collating sequence for each expression in that expression list.\n**\n** If the ExprList is an ORDER BY or GROUP BY clause then the resulting\n** KeyInfo structure is appropriate for initializing a virtual index to\n** implement that clause.  If the ExprList is the result set of a SELECT\n** then the KeyInfo structure is appropriate for initializing a virtual\n** index to implement a DISTINCT test.\n**\n** Space to hold the KeyInfo structure is obtained from malloc.  The calling\n** function is responsible for seeing that this structure is eventually\n** freed.\n*/\nSQLITE_PRIVATE KeyInfo *sqlite3KeyInfoFromExprList(\n  Parse *pParse,       /* Parsing context */\n  ExprList *pList,     /* Form the KeyInfo object from this ExprList */\n  int iStart,          /* Begin with this column of pList */\n  int nExtra           /* Add this many extra columns to the end */\n){\n  int nExpr;\n  KeyInfo *pInfo;\n  struct ExprList_item *pItem;\n  sqlite3 *db = pParse->db;\n  int i;\n\n  nExpr = pList->nExpr;\n  pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1);\n  if( pInfo ){\n    assert( sqlite3KeyInfoIsWriteable(pInfo) );\n    for(i=iStart, pItem=pList->a+iStart; i<nExpr; i++, pItem++){\n      pInfo->aColl[i-iStart] = sqlite3ExprNNCollSeq(pParse, pItem->pExpr);\n      pInfo->aSortFlags[i-iStart] = pItem->fg.sortFlags;\n    }\n  }\n  return pInfo;\n}\n\n/*\n** Name of the connection operator, used for error messages.\n*/\nSQLITE_PRIVATE const char *sqlite3SelectOpName(int id){\n  char *z;\n  switch( id ){\n    case TK_ALL:       z = \"UNION ALL\";   break;\n    case TK_INTERSECT: z = \"INTERSECT\";   break;\n    case TK_EXCEPT:    z = \"EXCEPT\";      break;\n    default:           z = \"UNION\";       break;\n  }\n  return z;\n}\n\n#ifndef SQLITE_OMIT_EXPLAIN\n/*\n** Unless an \"EXPLAIN QUERY PLAN\" command is being processed, this function\n** is a no-op. Otherwise, it adds a single row of output to the EQP result,\n** where the caption is of the form:\n**\n**   \"USE TEMP B-TREE FOR xxx\"\n**\n** where xxx is one of \"DISTINCT\", \"ORDER BY\" or \"GROUP BY\". Exactly which\n** is determined by the zUsage argument.\n*/\nstatic void explainTempTable(Parse *pParse, const char *zUsage){\n  ExplainQueryPlan((pParse, 0, \"USE TEMP B-TREE FOR %s\", zUsage));\n}\n\n/*\n** Assign expression b to lvalue a. A second, no-op, version of this macro\n** is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code\n** in sqlite3Select() to assign values to structure member variables that\n** only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the\n** code with #ifndef directives.\n*/\n# define explainSetInteger(a, b) a = b\n\n#else\n/* No-op versions of the explainXXX() functions and macros. */\n# define explainTempTable(y,z)\n# define explainSetInteger(y,z)\n#endif\n\n\n/*\n** If the inner loop was generated using a non-null pOrderBy argument,\n** then the results were placed in a sorter.  After the loop is terminated\n** we need to run the sorter and output the results.  The following\n** routine generates the code needed to do that.\n*/\nstatic void generateSortTail(\n  Parse *pParse,    /* Parsing context */\n  Select *p,        /* The SELECT statement */\n  SortCtx *pSort,   /* Information on the ORDER BY clause */\n  int nColumn,      /* Number of columns of data */\n  SelectDest *pDest /* Write the sorted results here */\n){\n  Vdbe *v = pParse->pVdbe;                     /* The prepared statement */\n  int addrBreak = pSort->labelDone;            /* Jump here to exit loop */\n  int addrContinue = sqlite3VdbeMakeLabel(pParse);/* Jump here for next cycle */\n  int addr;                       /* Top of output loop. Jump for Next. */\n  int addrOnce = 0;\n  int iTab;\n  ExprList *pOrderBy = pSort->pOrderBy;\n  int eDest = pDest->eDest;\n  int iParm = pDest->iSDParm;\n  int regRow;\n  int regRowid;\n  int iCol;\n  int nKey;                       /* Number of key columns in sorter record */\n  int iSortTab;                   /* Sorter cursor to read from */\n  int i;\n  int bSeq;                       /* True if sorter record includes seq. no. */\n  int nRefKey = 0;\n  struct ExprList_item *aOutEx = p->pEList->a;\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int addrExplain;                /* Address of OP_Explain instruction */\n#endif\n\n  nKey = pOrderBy->nExpr - pSort->nOBSat;\n  if( pSort->nOBSat==0 || nKey==1 ){\n    ExplainQueryPlan2(addrExplain, (pParse, 0,\n      \"USE TEMP B-TREE FOR %sORDER BY\", pSort->nOBSat?\"LAST TERM OF \":\"\"\n    ));\n  }else{\n    ExplainQueryPlan2(addrExplain, (pParse, 0,\n      \"USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY\", nKey\n    ));\n  }\n  sqlite3VdbeScanStatusRange(v, addrExplain,pSort->addrPush,pSort->addrPushEnd);\n  sqlite3VdbeScanStatusCounters(v, addrExplain, addrExplain, pSort->addrPush);\n\n\n  assert( addrBreak<0 );\n  if( pSort->labelBkOut ){\n    sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);\n    sqlite3VdbeGoto(v, addrBreak);\n    sqlite3VdbeResolveLabel(v, pSort->labelBkOut);\n  }\n\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  /* Open any cursors needed for sorter-reference expressions */\n  for(i=0; i<pSort->nDefer; i++){\n    Table *pTab = pSort->aDefer[i].pTab;\n    int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n    sqlite3OpenTable(pParse, pSort->aDefer[i].iCsr, iDb, pTab, OP_OpenRead);\n    nRefKey = MAX(nRefKey, pSort->aDefer[i].nKey);\n  }\n#endif\n\n  iTab = pSort->iECursor;\n  if( eDest==SRT_Output || eDest==SRT_Coroutine || eDest==SRT_Mem ){\n    if( eDest==SRT_Mem && p->iOffset ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, pDest->iSdst);\n    }\n    regRowid = 0;\n    regRow = pDest->iSdst;\n  }else{\n    regRowid = sqlite3GetTempReg(pParse);\n    if( eDest==SRT_EphemTab || eDest==SRT_Table ){\n      regRow = sqlite3GetTempReg(pParse);\n      nColumn = 0;\n    }else{\n      regRow = sqlite3GetTempRange(pParse, nColumn);\n    }\n  }\n  if( pSort->sortFlags & SORTFLAG_UseSorter ){\n    int regSortOut = ++pParse->nMem;\n    iSortTab = pParse->nTab++;\n    if( pSort->labelBkOut ){\n      addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n    }\n    sqlite3VdbeAddOp3(v, OP_OpenPseudo, iSortTab, regSortOut,\n        nKey+1+nColumn+nRefKey);\n    if( addrOnce ) sqlite3VdbeJumpHere(v, addrOnce);\n    addr = 1 + sqlite3VdbeAddOp2(v, OP_SorterSort, iTab, addrBreak);\n    VdbeCoverage(v);\n    assert( p->iLimit==0 && p->iOffset==0 );\n    sqlite3VdbeAddOp3(v, OP_SorterData, iTab, regSortOut, iSortTab);\n    bSeq = 0;\n  }else{\n    addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, addrBreak); VdbeCoverage(v);\n    codeOffset(v, p->iOffset, addrContinue);\n    iSortTab = iTab;\n    bSeq = 1;\n    if( p->iOffset>0 ){\n      sqlite3VdbeAddOp2(v, OP_AddImm, p->iLimit, -1);\n    }\n  }\n  for(i=0, iCol=nKey+bSeq-1; i<nColumn; i++){\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    if( aOutEx[i].fg.bSorterRef ) continue;\n#endif\n    if( aOutEx[i].u.x.iOrderByCol==0 ) iCol++;\n  }\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n  if( pSort->nDefer ){\n    int iKey = iCol+1;\n    int regKey = sqlite3GetTempRange(pParse, nRefKey);\n\n    for(i=0; i<pSort->nDefer; i++){\n      int iCsr = pSort->aDefer[i].iCsr;\n      Table *pTab = pSort->aDefer[i].pTab;\n      int nKey = pSort->aDefer[i].nKey;\n\n      sqlite3VdbeAddOp1(v, OP_NullRow, iCsr);\n      if( HasRowid(pTab) ){\n        sqlite3VdbeAddOp3(v, OP_Column, iSortTab, iKey++, regKey);\n        sqlite3VdbeAddOp3(v, OP_SeekRowid, iCsr,\n            sqlite3VdbeCurrentAddr(v)+1, regKey);\n      }else{\n        int k;\n        int iJmp;\n        assert( sqlite3PrimaryKeyIndex(pTab)->nKeyCol==nKey );\n        for(k=0; k<nKey; k++){\n          sqlite3VdbeAddOp3(v, OP_Column, iSortTab, iKey++, regKey+k);\n        }\n        iJmp = sqlite3VdbeCurrentAddr(v);\n        sqlite3VdbeAddOp4Int(v, OP_SeekGE, iCsr, iJmp+2, regKey, nKey);\n        sqlite3VdbeAddOp4Int(v, OP_IdxLE, iCsr, iJmp+3, regKey, nKey);\n        sqlite3VdbeAddOp1(v, OP_NullRow, iCsr);\n      }\n    }\n    sqlite3ReleaseTempRange(pParse, regKey, nRefKey);\n  }\n#endif\n  for(i=nColumn-1; i>=0; i--){\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    if( aOutEx[i].fg.bSorterRef ){\n      sqlite3ExprCode(pParse, aOutEx[i].pExpr, regRow+i);\n    }else\n#endif\n    {\n      int iRead;\n      if( aOutEx[i].u.x.iOrderByCol ){\n        iRead = aOutEx[i].u.x.iOrderByCol-1;\n      }else{\n        iRead = iCol--;\n      }\n      sqlite3VdbeAddOp3(v, OP_Column, iSortTab, iRead, regRow+i);\n      VdbeComment((v, \"%s\", aOutEx[i].zEName));\n    }\n  }\n  sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1);\n  switch( eDest ){\n    case SRT_Table:\n    case SRT_EphemTab: {\n      sqlite3VdbeAddOp3(v, OP_Column, iSortTab, nKey+bSeq, regRow);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, regRowid);\n      sqlite3VdbeAddOp3(v, OP_Insert, iParm, regRow, regRowid);\n      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n      break;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case SRT_Set: {\n      assert( nColumn==sqlite3Strlen30(pDest->zAffSdst) );\n      sqlite3VdbeAddOp4(v, OP_MakeRecord, regRow, nColumn, regRowid,\n                        pDest->zAffSdst, nColumn);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, regRowid, regRow, nColumn);\n      break;\n    }\n    case SRT_Mem: {\n      /* The LIMIT clause will terminate the loop for us */\n      break;\n    }\n#endif\n    case SRT_Upfrom: {\n      int i2 = pDest->iSDParm2;\n      int r1 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord,regRow+(i2<0),nColumn-(i2<0),r1);\n      if( i2<0 ){\n        sqlite3VdbeAddOp3(v, OP_Insert, iParm, r1, regRow);\n      }else{\n        sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, regRow, i2);\n      }\n      break;\n    }\n    default: {\n      assert( eDest==SRT_Output || eDest==SRT_Coroutine );\n      testcase( eDest==SRT_Output );\n      testcase( eDest==SRT_Coroutine );\n      if( eDest==SRT_Output ){\n        sqlite3VdbeAddOp2(v, OP_ResultRow, pDest->iSdst, nColumn);\n      }else{\n        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);\n      }\n      break;\n    }\n  }\n  if( regRowid ){\n    if( eDest==SRT_Set ){\n      sqlite3ReleaseTempRange(pParse, regRow, nColumn);\n    }else{\n      sqlite3ReleaseTempReg(pParse, regRow);\n    }\n    sqlite3ReleaseTempReg(pParse, regRowid);\n  }\n  /* The bottom of the loop\n  */\n  sqlite3VdbeResolveLabel(v, addrContinue);\n  if( pSort->sortFlags & SORTFLAG_UseSorter ){\n    sqlite3VdbeAddOp2(v, OP_SorterNext, iTab, addr); VdbeCoverage(v);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_Next, iTab, addr); VdbeCoverage(v);\n  }\n  sqlite3VdbeScanStatusRange(v, addrExplain, sqlite3VdbeCurrentAddr(v)-1, -1);\n  if( pSort->regReturn ) sqlite3VdbeAddOp1(v, OP_Return, pSort->regReturn);\n  sqlite3VdbeResolveLabel(v, addrBreak);\n}\n\n/*\n** Return a pointer to a string containing the 'declaration type' of the\n** expression pExpr. The string may be treated as static by the caller.\n**\n** The declaration type is the exact datatype definition extracted from the\n** original CREATE TABLE statement if the expression is a column. The\n** declaration type for a ROWID field is INTEGER. Exactly when an expression\n** is considered a column can be complex in the presence of subqueries. The\n** result-set expression in all of the following SELECT statements is\n** considered a column by this function.\n**\n**   SELECT col FROM tbl;\n**   SELECT (SELECT col FROM tbl;\n**   SELECT (SELECT col FROM tbl);\n**   SELECT abc FROM (SELECT col AS abc FROM tbl);\n**\n** The declaration type for any expression other than a column is NULL.\n**\n** This routine has either 3 or 6 parameters depending on whether or not\n** the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used.\n*/\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n# define columnType(A,B,C,D,E) columnTypeImpl(A,B,C,D,E)\n#else /* if !defined(SQLITE_ENABLE_COLUMN_METADATA) */\n# define columnType(A,B,C,D,E) columnTypeImpl(A,B)\n#endif\nstatic const char *columnTypeImpl(\n  NameContext *pNC,\n#ifndef SQLITE_ENABLE_COLUMN_METADATA\n  Expr *pExpr\n#else\n  Expr *pExpr,\n  const char **pzOrigDb,\n  const char **pzOrigTab,\n  const char **pzOrigCol\n#endif\n){\n  char const *zType = 0;\n  int j;\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n  char const *zOrigDb = 0;\n  char const *zOrigTab = 0;\n  char const *zOrigCol = 0;\n#endif\n\n  assert( pExpr!=0 );\n  assert( pNC->pSrcList!=0 );\n  switch( pExpr->op ){\n    case TK_COLUMN: {\n      /* The expression is a column. Locate the table the column is being\n      ** extracted from in NameContext.pSrcList. This table may be real\n      ** database table or a subquery.\n      */\n      Table *pTab = 0;            /* Table structure column is extracted from */\n      Select *pS = 0;             /* Select the column is extracted from */\n      int iCol = pExpr->iColumn;  /* Index of column in pTab */\n      while( pNC && !pTab ){\n        SrcList *pTabList = pNC->pSrcList;\n        for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);\n        if( j<pTabList->nSrc ){\n          pTab = pTabList->a[j].pSTab;\n          if( pTabList->a[j].fg.isSubquery ){\n            pS = pTabList->a[j].u4.pSubq->pSelect;\n          }else{\n            pS = 0;\n          }\n        }else{\n          pNC = pNC->pNext;\n        }\n      }\n\n      if( pTab==0 ){\n        /* At one time, code such as \"SELECT new.x\" within a trigger would\n        ** cause this condition to run.  Since then, we have restructured how\n        ** trigger code is generated and so this condition is no longer\n        ** possible. However, it can still be true for statements like\n        ** the following:\n        **\n        **   CREATE TABLE t1(col INTEGER);\n        **   SELECT (SELECT t1.col) FROM FROM t1;\n        **\n        ** when columnType() is called on the expression \"t1.col\" in the\n        ** sub-select. In this case, set the column type to NULL, even\n        ** though it should really be \"INTEGER\".\n        **\n        ** This is not a problem, as the column type of \"t1.col\" is never\n        ** used. When columnType() is called on the expression\n        ** \"(SELECT t1.col)\", the correct type is returned (see the TK_SELECT\n        ** branch below.  */\n        break;\n      }\n\n      assert( pTab && ExprUseYTab(pExpr) && pExpr->y.pTab==pTab );\n      if( pS ){\n        /* The \"table\" is actually a sub-select or a view in the FROM clause\n        ** of the SELECT statement. Return the declaration type and origin\n        ** data for the result-set column of the sub-select.\n        */\n        if( iCol<pS->pEList->nExpr\n         && (!ViewCanHaveRowid || iCol>=0)\n        ){\n          /* If iCol is less than zero, then the expression requests the\n          ** rowid of the sub-select or view. This expression is legal (see\n          ** test case misc2.2.2) - it always evaluates to NULL.\n          */\n          NameContext sNC;\n          Expr *p = pS->pEList->a[iCol].pExpr;\n          sNC.pSrcList = pS->pSrc;\n          sNC.pNext = pNC;\n          sNC.pParse = pNC->pParse;\n          zType = columnType(&sNC, p,&zOrigDb,&zOrigTab,&zOrigCol);\n        }\n      }else{\n        /* A real table or a CTE table */\n        assert( !pS );\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n        if( iCol<0 ) iCol = pTab->iPKey;\n        assert( iCol==XN_ROWID || (iCol>=0 && iCol<pTab->nCol) );\n        if( iCol<0 ){\n          zType = \"INTEGER\";\n          zOrigCol = \"rowid\";\n        }else{\n          zOrigCol = pTab->aCol[iCol].zCnName;\n          zType = sqlite3ColumnType(&pTab->aCol[iCol],0);\n        }\n        zOrigTab = pTab->zName;\n        if( pNC->pParse && pTab->pSchema ){\n          int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema);\n          zOrigDb = pNC->pParse->db->aDb[iDb].zDbSName;\n        }\n#else\n        assert( iCol==XN_ROWID || (iCol>=0 && iCol<pTab->nCol) );\n        if( iCol<0 ){\n          zType = \"INTEGER\";\n        }else{\n          zType = sqlite3ColumnType(&pTab->aCol[iCol],0);\n        }\n#endif\n      }\n      break;\n    }\n#ifndef SQLITE_OMIT_SUBQUERY\n    case TK_SELECT: {\n      /* The expression is a sub-select. Return the declaration type and\n      ** origin info for the single column in the result set of the SELECT\n      ** statement.\n      */\n      NameContext sNC;\n      Select *pS;\n      Expr *p;\n      assert( ExprUseXSelect(pExpr) );\n      pS = pExpr->x.pSelect;\n      p = pS->pEList->a[0].pExpr;\n      sNC.pSrcList = pS->pSrc;\n      sNC.pNext = pNC;\n      sNC.pParse = pNC->pParse;\n      zType = columnType(&sNC, p, &zOrigDb, &zOrigTab, &zOrigCol);\n      break;\n    }\n#endif\n  }\n\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n  if( pzOrigDb ){\n    assert( pzOrigTab && pzOrigCol );\n    *pzOrigDb = zOrigDb;\n    *pzOrigTab = zOrigTab;\n    *pzOrigCol = zOrigCol;\n  }\n#endif\n  return zType;\n}\n\n/*\n** Generate code that will tell the VDBE the declaration types of columns\n** in the result set.\n*/\nstatic void generateColumnTypes(\n  Parse *pParse,      /* Parser context */\n  SrcList *pTabList,  /* List of tables */\n  ExprList *pEList    /* Expressions defining the result set */\n){\n#ifndef SQLITE_OMIT_DECLTYPE\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  NameContext sNC;\n  sNC.pSrcList = pTabList;\n  sNC.pParse = pParse;\n  sNC.pNext = 0;\n  for(i=0; i<pEList->nExpr; i++){\n    Expr *p = pEList->a[i].pExpr;\n    const char *zType;\n#ifdef SQLITE_ENABLE_COLUMN_METADATA\n    const char *zOrigDb = 0;\n    const char *zOrigTab = 0;\n    const char *zOrigCol = 0;\n    zType = columnType(&sNC, p, &zOrigDb, &zOrigTab, &zOrigCol);\n\n    /* The vdbe must make its own copy of the column-type and other\n    ** column specific strings, in case the schema is reset before this\n    ** virtual machine is deleted.\n    */\n    sqlite3VdbeSetColName(v, i, COLNAME_DATABASE, zOrigDb, SQLITE_TRANSIENT);\n    sqlite3VdbeSetColName(v, i, COLNAME_TABLE, zOrigTab, SQLITE_TRANSIENT);\n    sqlite3VdbeSetColName(v, i, COLNAME_COLUMN, zOrigCol, SQLITE_TRANSIENT);\n#else\n    zType = columnType(&sNC, p, 0, 0, 0);\n#endif\n    sqlite3VdbeSetColName(v, i, COLNAME_DECLTYPE, zType, SQLITE_TRANSIENT);\n  }\n#else\n  UNUSED_PARAMETER(pParse);\n  UNUSED_PARAMETER(pTabList);\n  UNUSED_PARAMETER(pEList);\n#endif /* !defined(SQLITE_OMIT_DECLTYPE) */\n}\n\n\n/*\n** Compute the column names for a SELECT statement.\n**\n** The only guarantee that SQLite makes about column names is that if the\n** column has an AS clause assigning it a name, that will be the name used.\n** That is the only documented guarantee.  However, countless applications\n** developed over the years have made baseless assumptions about column names\n** and will break if those assumptions changes.  Hence, use extreme caution\n** when modifying this routine to avoid breaking legacy.\n**\n** See Also: sqlite3ColumnsFromExprList()\n**\n** The PRAGMA short_column_names and PRAGMA full_column_names settings are\n** deprecated.  The default setting is short=ON, full=OFF.  99.9% of all\n** applications should operate this way.  Nevertheless, we need to support the\n** other modes for legacy:\n**\n**    short=OFF, full=OFF:      Column name is the text of the expression has it\n**                              originally appears in the SELECT statement.  In\n**                              other words, the zSpan of the result expression.\n**\n**    short=ON, full=OFF:       (This is the default setting).  If the result\n**                              refers directly to a table column, then the\n**                              result column name is just the table column\n**                              name: COLUMN.  Otherwise use zSpan.\n**\n**    full=ON, short=ANY:       If the result refers directly to a table column,\n**                              then the result column name with the table name\n**                              prefix, ex: TABLE.COLUMN.  Otherwise use zSpan.\n*/\nSQLITE_PRIVATE void sqlite3GenerateColumnNames(\n  Parse *pParse,      /* Parser context */\n  Select *pSelect     /* Generate column names for this SELECT statement */\n){\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  Table *pTab;\n  SrcList *pTabList;\n  ExprList *pEList;\n  sqlite3 *db = pParse->db;\n  int fullName;    /* TABLE.COLUMN if no AS clause and is a direct table ref */\n  int srcName;     /* COLUMN or TABLE.COLUMN if no AS clause and is direct */\n\n  if( pParse->colNamesSet ) return;\n  /* Column names are determined by the left-most term of a compound select */\n  while( pSelect->pPrior ) pSelect = pSelect->pPrior;\n  TREETRACE(0x80,pParse,pSelect,(\"generating column names\\n\"));\n  pTabList = pSelect->pSrc;\n  pEList = pSelect->pEList;\n  assert( v!=0 );\n  assert( pTabList!=0 );\n  pParse->colNamesSet = 1;\n  fullName = (db->flags & SQLITE_FullColNames)!=0;\n  srcName = (db->flags & SQLITE_ShortColNames)!=0 || fullName;\n  sqlite3VdbeSetNumCols(v, pEList->nExpr);\n  for(i=0; i<pEList->nExpr; i++){\n    Expr *p = pEList->a[i].pExpr;\n\n    assert( p!=0 );\n    assert( p->op!=TK_AGG_COLUMN );  /* Agg processing has not run yet */\n    assert( p->op!=TK_COLUMN\n        || (ExprUseYTab(p) && p->y.pTab!=0) ); /* Covering idx not yet coded */\n    if( pEList->a[i].zEName && pEList->a[i].fg.eEName==ENAME_NAME ){\n      /* An AS clause always takes first priority */\n      char *zName = pEList->a[i].zEName;\n      sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);\n    }else if( srcName && p->op==TK_COLUMN ){\n      char *zCol;\n      int iCol = p->iColumn;\n      pTab = p->y.pTab;\n      assert( pTab!=0 );\n      if( iCol<0 ) iCol = pTab->iPKey;\n      assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );\n      if( iCol<0 ){\n        zCol = \"rowid\";\n      }else{\n        zCol = pTab->aCol[iCol].zCnName;\n      }\n      if( fullName ){\n        char *zName = 0;\n        zName = sqlite3MPrintf(db, \"%s.%s\", pTab->zName, zCol);\n        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);\n      }else{\n        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT);\n      }\n    }else{\n      const char *z = pEList->a[i].zEName;\n      z = z==0 ? sqlite3MPrintf(db, \"column%d\", i+1) : sqlite3DbStrDup(db, z);\n      sqlite3VdbeSetColName(v, i, COLNAME_NAME, z, SQLITE_DYNAMIC);\n    }\n  }\n  generateColumnTypes(pParse, pTabList, pEList);\n}\n\n/*\n** Given an expression list (which is really the list of expressions\n** that form the result set of a SELECT statement) compute appropriate\n** column names for a table that would hold the expression list.\n**\n** All column names will be unique.\n**\n** Only the column names are computed.  Column.zType, Column.zColl,\n** and other fields of Column are zeroed.\n**\n** Return SQLITE_OK on success.  If a memory allocation error occurs,\n** store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.\n**\n** The only guarantee that SQLite makes about column names is that if the\n** column has an AS clause assigning it a name, that will be the name used.\n** That is the only documented guarantee.  However, countless applications\n** developed over the years have made baseless assumptions about column names\n** and will break if those assumptions changes.  Hence, use extreme caution\n** when modifying this routine to avoid breaking legacy.\n**\n** See Also: sqlite3GenerateColumnNames()\n*/\nSQLITE_PRIVATE int sqlite3ColumnsFromExprList(\n  Parse *pParse,          /* Parsing context */\n  ExprList *pEList,       /* Expr list from which to derive column names */\n  i16 *pnCol,             /* Write the number of columns here */\n  Column **paCol          /* Write the new column list here */\n){\n  sqlite3 *db = pParse->db;   /* Database connection */\n  int i, j;                   /* Loop counters */\n  u32 cnt;                    /* Index added to make the name unique */\n  Column *aCol, *pCol;        /* For looping over result columns */\n  int nCol;                   /* Number of columns in the result set */\n  char *zName;                /* Column name */\n  int nName;                  /* Size of name in zName[] */\n  Hash ht;                    /* Hash table of column names */\n  Table *pTab;\n\n  sqlite3HashInit(&ht);\n  if( pEList ){\n    nCol = pEList->nExpr;\n    aCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);\n    testcase( aCol==0 );\n    if( NEVER(nCol>32767) ) nCol = 32767;\n  }else{\n    nCol = 0;\n    aCol = 0;\n  }\n  assert( nCol==(i16)nCol );\n  *pnCol = nCol;\n  *paCol = aCol;\n\n  for(i=0, pCol=aCol; i<nCol && !pParse->nErr; i++, pCol++){\n    struct ExprList_item *pX = &pEList->a[i];\n    struct ExprList_item *pCollide;\n    /* Get an appropriate name for the column\n    */\n    if( (zName = pX->zEName)!=0 && pX->fg.eEName==ENAME_NAME ){\n      /* If the column contains an \"AS <name>\" phrase, use <name> as the name */\n    }else{\n      Expr *pColExpr = sqlite3ExprSkipCollateAndLikely(pX->pExpr);\n      while( ALWAYS(pColExpr!=0) && pColExpr->op==TK_DOT ){\n        pColExpr = pColExpr->pRight;\n        assert( pColExpr!=0 );\n      }\n      if( pColExpr->op==TK_COLUMN\n       && ALWAYS( ExprUseYTab(pColExpr) )\n       && ALWAYS( pColExpr->y.pTab!=0 )\n      ){\n        /* For columns use the column name name */\n        int iCol = pColExpr->iColumn;\n        pTab = pColExpr->y.pTab;\n        if( iCol<0 ) iCol = pTab->iPKey;\n        zName = iCol>=0 ? pTab->aCol[iCol].zCnName : \"rowid\";\n      }else if( pColExpr->op==TK_ID ){\n        assert( !ExprHasProperty(pColExpr, EP_IntValue) );\n        zName = pColExpr->u.zToken;\n      }else{\n        /* Use the original text of the column expression as its name */\n        assert( zName==pX->zEName );  /* pointer comparison intended */\n      }\n    }\n    if( zName && !sqlite3IsTrueOrFalse(zName) ){\n      zName = sqlite3DbStrDup(db, zName);\n    }else{\n      zName = sqlite3MPrintf(db,\"column%d\",i+1);\n    }\n\n    /* Make sure the column name is unique.  If the name is not unique,\n    ** append an integer to the name so that it becomes unique.\n    */\n    cnt = 0;\n    while( zName && (pCollide = sqlite3HashFind(&ht, zName))!=0 ){\n      if( pCollide->fg.bUsingTerm ){\n        pCol->colFlags |= COLFLAG_NOEXPAND;\n      }\n      nName = sqlite3Strlen30(zName);\n      if( nName>0 ){\n        for(j=nName-1; j>0 && sqlite3Isdigit(zName[j]); j--){}\n        if( zName[j]==':' ) nName = j;\n      }\n      zName = sqlite3MPrintf(db, \"%.*z:%u\", nName, zName, ++cnt);\n      sqlite3ProgressCheck(pParse);\n      if( cnt>3 ){\n        sqlite3_randomness(sizeof(cnt), &cnt);\n      }\n    }\n    pCol->zCnName = zName;\n    pCol->hName = sqlite3StrIHash(zName);\n    if( pX->fg.bNoExpand ){\n      pCol->colFlags |= COLFLAG_NOEXPAND;\n    }\n    sqlite3ColumnPropertiesFromName(0, pCol);\n    if( zName && sqlite3HashInsert(&ht, zName, pX)==pX ){\n      sqlite3OomFault(db);\n    }\n  }\n  sqlite3HashClear(&ht);\n  if( pParse->nErr ){\n    for(j=0; j<i; j++){\n      sqlite3DbFree(db, aCol[j].zCnName);\n    }\n    sqlite3DbFree(db, aCol);\n    *paCol = 0;\n    *pnCol = 0;\n    return pParse->rc;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** pTab is a transient Table object that represents a subquery of some\n** kind (maybe a parenthesized subquery in the FROM clause of a larger\n** query, or a VIEW, or a CTE).  This routine computes type information\n** for that Table object based on the Select object that implements the\n** subquery.  For the purposes of this routine, \"type information\" means:\n**\n**    *   The datatype name, as it might appear in a CREATE TABLE statement\n**    *   Which collating sequence to use for the column\n**    *   The affinity of the column\n*/\nSQLITE_PRIVATE void sqlite3SubqueryColumnTypes(\n  Parse *pParse,      /* Parsing contexts */\n  Table *pTab,        /* Add column type information to this table */\n  Select *pSelect,    /* SELECT used to determine types and collations */\n  char aff            /* Default affinity. */\n){\n  sqlite3 *db = pParse->db;\n  Column *pCol;\n  CollSeq *pColl;\n  int i,j;\n  Expr *p;\n  struct ExprList_item *a;\n  NameContext sNC;\n\n  assert( pSelect!=0 );\n  assert( (pSelect->selFlags & SF_Resolved)!=0 );\n  assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 );\n  assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB );\n  if( db->mallocFailed || IN_RENAME_OBJECT ) return;\n  while( pSelect->pPrior ) pSelect = pSelect->pPrior;\n  a = pSelect->pEList->a;\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pSrcList = pSelect->pSrc;\n  for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){\n    const char *zType;\n    i64 n;\n    int m = 0;\n    Select *pS2 = pSelect;\n    pTab->tabFlags |= (pCol->colFlags & COLFLAG_NOINSERT);\n    p = a[i].pExpr;\n    /* pCol->szEst = ... // Column size est for SELECT tables never used */\n    pCol->affinity = sqlite3ExprAffinity(p);\n    while( pCol->affinity<=SQLITE_AFF_NONE && pS2->pNext!=0 ){\n      m |= sqlite3ExprDataType(pS2->pEList->a[i].pExpr);\n      pS2 = pS2->pNext;\n      pCol->affinity = sqlite3ExprAffinity(pS2->pEList->a[i].pExpr);\n    }\n    if( pCol->affinity<=SQLITE_AFF_NONE ){\n      pCol->affinity = aff;\n    }\n    if( pCol->affinity>=SQLITE_AFF_TEXT && (pS2->pNext || pS2!=pSelect) ){\n      for(pS2=pS2->pNext; pS2; pS2=pS2->pNext){\n        m |= sqlite3ExprDataType(pS2->pEList->a[i].pExpr);\n      }\n      if( pCol->affinity==SQLITE_AFF_TEXT && (m&0x01)!=0 ){\n        pCol->affinity = SQLITE_AFF_BLOB;\n      }else\n      if( pCol->affinity>=SQLITE_AFF_NUMERIC && (m&0x02)!=0 ){\n        pCol->affinity = SQLITE_AFF_BLOB;\n      }\n      if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){\n        pCol->affinity = SQLITE_AFF_FLEXNUM;\n      }\n    }\n    zType = columnType(&sNC, p, 0, 0, 0);\n    if( zType==0 || pCol->affinity!=sqlite3AffinityType(zType, 0) ){\n      if( pCol->affinity==SQLITE_AFF_NUMERIC\n       || pCol->affinity==SQLITE_AFF_FLEXNUM\n      ){\n        zType = \"NUM\";\n      }else{\n        zType = 0;\n        for(j=1; j<SQLITE_N_STDTYPE; j++){\n          if( sqlite3StdTypeAffinity[j]==pCol->affinity ){\n            zType = sqlite3StdType[j];\n            break;\n          }\n        }\n      }\n    }\n    if( zType ){\n      const i64 k = sqlite3Strlen30(zType);\n      n = sqlite3Strlen30(pCol->zCnName);\n      pCol->zCnName = sqlite3DbReallocOrFree(db, pCol->zCnName, n+k+2);\n      pCol->colFlags &= ~(COLFLAG_HASTYPE|COLFLAG_HASCOLL);\n      if( pCol->zCnName ){\n        memcpy(&pCol->zCnName[n+1], zType, k+1);\n        pCol->colFlags |= COLFLAG_HASTYPE;\n      }\n    }\n    pColl = sqlite3ExprCollSeq(pParse, p);\n    if( pColl ){\n      assert( pTab->pIndex==0 );\n      sqlite3ColumnSetColl(db, pCol, pColl->zName);\n    }\n  }\n  pTab->szTabRow = 1; /* Any non-zero value works */\n}\n\n/*\n** Given a SELECT statement, generate a Table structure that describes\n** the result set of that SELECT.\n*/\nSQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect, char aff){\n  Table *pTab;\n  sqlite3 *db = pParse->db;\n  u64 savedFlags;\n\n  savedFlags = db->flags;\n  db->flags &= ~(u64)SQLITE_FullColNames;\n  db->flags |= SQLITE_ShortColNames;\n  sqlite3SelectPrep(pParse, pSelect, 0);\n  db->flags = savedFlags;\n  if( pParse->nErr ) return 0;\n  while( pSelect->pPrior ) pSelect = pSelect->pPrior;\n  pTab = sqlite3DbMallocZero(db, sizeof(Table) );\n  if( pTab==0 ){\n    return 0;\n  }\n  pTab->nTabRef = 1;\n  pTab->zName = 0;\n  pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );\n  sqlite3ColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);\n  sqlite3SubqueryColumnTypes(pParse, pTab, pSelect, aff);\n  pTab->iPKey = -1;\n  if( db->mallocFailed ){\n    sqlite3DeleteTable(db, pTab);\n    return 0;\n  }\n  return pTab;\n}\n\n/*\n** Get a VDBE for the given parser context.  Create a new one if necessary.\n** If an error occurs, return NULL and leave a message in pParse.\n*/\nSQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse *pParse){\n  if( pParse->pVdbe ){\n    return pParse->pVdbe;\n  }\n  if( pParse->pToplevel==0\n   && OptimizationEnabled(pParse->db,SQLITE_FactorOutConst)\n  ){\n    pParse->okConstFactor = 1;\n  }\n  return sqlite3VdbeCreate(pParse);\n}\n\n\n/*\n** Compute the iLimit and iOffset fields of the SELECT based on the\n** pLimit expressions.  pLimit->pLeft and pLimit->pRight hold the expressions\n** that appear in the original SQL statement after the LIMIT and OFFSET\n** keywords.  Or NULL if those keywords are omitted. iLimit and iOffset\n** are the integer memory register numbers for counters used to compute\n** the limit and offset.  If there is no limit and/or offset, then\n** iLimit and iOffset are negative.\n**\n** This routine changes the values of iLimit and iOffset only if\n** a limit or offset is defined by pLimit->pLeft and pLimit->pRight.  iLimit\n** and iOffset should have been preset to appropriate default values (zero)\n** prior to calling this routine.\n**\n** The iOffset register (if it exists) is initialized to the value\n** of the OFFSET.  The iLimit register is initialized to LIMIT.  Register\n** iOffset+1 is initialized to LIMIT+OFFSET.\n**\n** Only if pLimit->pLeft!=0 do the limit registers get\n** redefined.  The UNION ALL operator uses this property to force\n** the reuse of the same limit and offset registers across multiple\n** SELECT statements.\n*/\nstatic void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){\n  Vdbe *v = 0;\n  int iLimit = 0;\n  int iOffset;\n  int n;\n  Expr *pLimit = p->pLimit;\n\n  if( p->iLimit ) return;\n\n  /*\n  ** \"LIMIT -1\" always shows all rows.  There is some\n  ** controversy about what the correct behavior should be.\n  ** The current implementation interprets \"LIMIT 0\" to mean\n  ** no rows.\n  */\n  if( pLimit ){\n    assert( pLimit->op==TK_LIMIT );\n    assert( pLimit->pLeft!=0 );\n    p->iLimit = iLimit = ++pParse->nMem;\n    v = sqlite3GetVdbe(pParse);\n    assert( v!=0 );\n    if( sqlite3ExprIsInteger(pLimit->pLeft, &n, pParse) ){\n      sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);\n      VdbeComment((v, \"LIMIT counter\"));\n      if( n==0 ){\n        sqlite3VdbeGoto(v, iBreak);\n      }else if( n>=0 && p->nSelectRow>sqlite3LogEst((u64)n) ){\n        p->nSelectRow = sqlite3LogEst((u64)n);\n        p->selFlags |= SF_FixedLimit;\n      }\n    }else{\n      sqlite3ExprCode(pParse, pLimit->pLeft, iLimit);\n      sqlite3VdbeAddOp1(v, OP_MustBeInt, iLimit); VdbeCoverage(v);\n      VdbeComment((v, \"LIMIT counter\"));\n      sqlite3VdbeAddOp2(v, OP_IfNot, iLimit, iBreak); VdbeCoverage(v);\n    }\n    if( pLimit->pRight ){\n      p->iOffset = iOffset = ++pParse->nMem;\n      pParse->nMem++;   /* Allocate an extra register for limit+offset */\n      sqlite3ExprCode(pParse, pLimit->pRight, iOffset);\n      sqlite3VdbeAddOp1(v, OP_MustBeInt, iOffset); VdbeCoverage(v);\n      VdbeComment((v, \"OFFSET counter\"));\n      sqlite3VdbeAddOp3(v, OP_OffsetLimit, iLimit, iOffset+1, iOffset);\n      VdbeComment((v, \"LIMIT+OFFSET\"));\n    }\n  }\n}\n\n#ifndef SQLITE_OMIT_COMPOUND_SELECT\n/*\n** Return the appropriate collating sequence for the iCol-th column of\n** the result set for the compound-select statement \"p\".  Return NULL if\n** the column has no default collating sequence.\n**\n** The collating sequence for the compound select is taken from the\n** left-most term of the select that has a collating sequence.\n*/\nstatic CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){\n  CollSeq *pRet;\n  if( p->pPrior ){\n    pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);\n  }else{\n    pRet = 0;\n  }\n  assert( iCol>=0 );\n  /* iCol must be less than p->pEList->nExpr.  Otherwise an error would\n  ** have been thrown during name resolution and we would not have gotten\n  ** this far */\n  if( pRet==0 && ALWAYS(iCol<p->pEList->nExpr) ){\n    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);\n  }\n  return pRet;\n}\n\n/*\n** The select statement passed as the second parameter is a compound SELECT\n** with an ORDER BY clause. This function allocates and returns a KeyInfo\n** structure suitable for implementing the ORDER BY.\n**\n** Space to hold the KeyInfo structure is obtained from malloc. The calling\n** function is responsible for ensuring that this structure is eventually\n** freed.\n*/\nstatic KeyInfo *multiSelectOrderByKeyInfo(Parse *pParse, Select *p, int nExtra){\n  ExprList *pOrderBy = p->pOrderBy;\n  int nOrderBy = ALWAYS(pOrderBy!=0) ? pOrderBy->nExpr : 0;\n  sqlite3 *db = pParse->db;\n  KeyInfo *pRet = sqlite3KeyInfoAlloc(db, nOrderBy+nExtra, 1);\n  if( pRet ){\n    int i;\n    for(i=0; i<nOrderBy; i++){\n      struct ExprList_item *pItem = &pOrderBy->a[i];\n      Expr *pTerm = pItem->pExpr;\n      CollSeq *pColl;\n\n      if( pTerm->flags & EP_Collate ){\n        pColl = sqlite3ExprCollSeq(pParse, pTerm);\n      }else{\n        pColl = multiSelectCollSeq(pParse, p, pItem->u.x.iOrderByCol-1);\n        if( pColl==0 ) pColl = db->pDfltColl;\n        pOrderBy->a[i].pExpr =\n          sqlite3ExprAddCollateString(pParse, pTerm, pColl->zName);\n      }\n      assert( sqlite3KeyInfoIsWriteable(pRet) );\n      pRet->aColl[i] = pColl;\n      pRet->aSortFlags[i] = pOrderBy->a[i].fg.sortFlags;\n    }\n  }\n\n  return pRet;\n}\n\n#ifndef SQLITE_OMIT_CTE\n/*\n** This routine generates VDBE code to compute the content of a WITH RECURSIVE\n** query of the form:\n**\n**   <recursive-table> AS (<setup-query> UNION [ALL] <recursive-query>)\n**                         \\___________/             \\_______________/\n**                           p->pPrior                      p\n**\n**\n** There is exactly one reference to the recursive-table in the FROM clause\n** of recursive-query, marked with the SrcList->a[].fg.isRecursive flag.\n**\n** The setup-query runs once to generate an initial set of rows that go\n** into a Queue table.  Rows are extracted from the Queue table one by\n** one.  Each row extracted from Queue is output to pDest.  Then the single\n** extracted row (now in the iCurrent table) becomes the content of the\n** recursive-table for a recursive-query run.  The output of the recursive-query\n** is added back into the Queue table.  Then another row is extracted from Queue\n** and the iteration continues until the Queue table is empty.\n**\n** If the compound query operator is UNION then no duplicate rows are ever\n** inserted into the Queue table.  The iDistinct table keeps a copy of all rows\n** that have ever been inserted into Queue and causes duplicates to be\n** discarded.  If the operator is UNION ALL, then duplicates are allowed.\n**\n** If the query has an ORDER BY, then entries in the Queue table are kept in\n** ORDER BY order and the first entry is extracted for each cycle.  Without\n** an ORDER BY, the Queue table is just a FIFO.\n**\n** If a LIMIT clause is provided, then the iteration stops after LIMIT rows\n** have been output to pDest.  A LIMIT of zero means to output no rows and a\n** negative LIMIT means to output all rows.  If there is also an OFFSET clause\n** with a positive value, then the first OFFSET outputs are discarded rather\n** than being sent to pDest.  The LIMIT count does not begin until after OFFSET\n** rows have been skipped.\n*/\nstatic void generateWithRecursiveQuery(\n  Parse *pParse,        /* Parsing context */\n  Select *p,            /* The recursive SELECT to be coded */\n  SelectDest *pDest     /* What to do with query results */\n){\n  SrcList *pSrc = p->pSrc;      /* The FROM clause of the recursive query */\n  int nCol = p->pEList->nExpr;  /* Number of columns in the recursive table */\n  Vdbe *v = pParse->pVdbe;      /* The prepared statement under construction */\n  Select *pSetup;               /* The setup query */\n  Select *pFirstRec;            /* Left-most recursive term */\n  int addrTop;                  /* Top of the loop */\n  int addrCont, addrBreak;      /* CONTINUE and BREAK addresses */\n  int iCurrent = 0;             /* The Current table */\n  int regCurrent;               /* Register holding Current table */\n  int iQueue;                   /* The Queue table */\n  int iDistinct = 0;            /* To ensure unique results if UNION */\n  int eDest = SRT_Fifo;         /* How to write to Queue */\n  SelectDest destQueue;         /* SelectDest targeting the Queue table */\n  int i;                        /* Loop counter */\n  int rc;                       /* Result code */\n  ExprList *pOrderBy;           /* The ORDER BY clause */\n  Expr *pLimit;                 /* Saved LIMIT and OFFSET */\n  int regLimit, regOffset;      /* Registers used by LIMIT and OFFSET */\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( p->pWin ){\n    sqlite3ErrorMsg(pParse, \"cannot use window functions in recursive queries\");\n    return;\n  }\n#endif\n\n  /* Obtain authorization to do a recursive query */\n  if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return;\n\n  /* Process the LIMIT and OFFSET clauses, if they exist */\n  addrBreak = sqlite3VdbeMakeLabel(pParse);\n  p->nSelectRow = 320;  /* 4 billion rows */\n  computeLimitRegisters(pParse, p, addrBreak);\n  pLimit = p->pLimit;\n  regLimit = p->iLimit;\n  regOffset = p->iOffset;\n  p->pLimit = 0;\n  p->iLimit = p->iOffset = 0;\n  pOrderBy = p->pOrderBy;\n\n  /* Locate the cursor number of the Current table */\n  for(i=0; ALWAYS(i<pSrc->nSrc); i++){\n    if( pSrc->a[i].fg.isRecursive ){\n      iCurrent = pSrc->a[i].iCursor;\n      break;\n    }\n  }\n\n  /* Allocate cursors numbers for Queue and Distinct.  The cursor number for\n  ** the Distinct table must be exactly one greater than Queue in order\n  ** for the SRT_DistFifo and SRT_DistQueue destinations to work. */\n  iQueue = pParse->nTab++;\n  if( p->op==TK_UNION ){\n    eDest = pOrderBy ? SRT_DistQueue : SRT_DistFifo;\n    iDistinct = pParse->nTab++;\n  }else{\n    eDest = pOrderBy ? SRT_Queue : SRT_Fifo;\n  }\n  sqlite3SelectDestInit(&destQueue, eDest, iQueue);\n\n  /* Allocate cursors for Current, Queue, and Distinct. */\n  regCurrent = ++pParse->nMem;\n  sqlite3VdbeAddOp3(v, OP_OpenPseudo, iCurrent, regCurrent, nCol);\n  if( pOrderBy ){\n    KeyInfo *pKeyInfo = multiSelectOrderByKeyInfo(pParse, p, 1);\n    sqlite3VdbeAddOp4(v, OP_OpenEphemeral, iQueue, pOrderBy->nExpr+2, 0,\n                      (char*)pKeyInfo, P4_KEYINFO);\n    destQueue.pOrderBy = pOrderBy;\n  }else{\n    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, iQueue, nCol);\n  }\n  VdbeComment((v, \"Queue table\"));\n  if( iDistinct ){\n    p->addrOpenEphm[0] = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, iDistinct, 0);\n    p->selFlags |= SF_UsesEphemeral;\n  }\n\n  /* Detach the ORDER BY clause from the compound SELECT */\n  p->pOrderBy = 0;\n\n  /* Figure out how many elements of the compound SELECT are part of the\n  ** recursive query.  Make sure no recursive elements use aggregate\n  ** functions.  Mark the recursive elements as UNION ALL even if they\n  ** are really UNION because the distinctness will be enforced by the\n  ** iDistinct table.  pFirstRec is left pointing to the left-most\n  ** recursive term of the CTE.\n  */\n  for(pFirstRec=p; ALWAYS(pFirstRec!=0); pFirstRec=pFirstRec->pPrior){\n    if( pFirstRec->selFlags & SF_Aggregate ){\n      sqlite3ErrorMsg(pParse, \"recursive aggregate queries not supported\");\n      goto end_of_recursive_query;\n    }\n    pFirstRec->op = TK_ALL;\n    if( (pFirstRec->pPrior->selFlags & SF_Recursive)==0 ) break;\n  }\n\n  /* Store the results of the setup-query in Queue. */\n  pSetup = pFirstRec->pPrior;\n  pSetup->pNext = 0;\n  ExplainQueryPlan((pParse, 1, \"SETUP\"));\n  rc = sqlite3Select(pParse, pSetup, &destQueue);\n  pSetup->pNext = p;\n  if( rc ) goto end_of_recursive_query;\n\n  /* Find the next row in the Queue and output that row */\n  addrTop = sqlite3VdbeAddOp2(v, OP_Rewind, iQueue, addrBreak); VdbeCoverage(v);\n\n  /* Transfer the next row in Queue over to Current */\n  sqlite3VdbeAddOp1(v, OP_NullRow, iCurrent); /* To reset column cache */\n  if( pOrderBy ){\n    sqlite3VdbeAddOp3(v, OP_Column, iQueue, pOrderBy->nExpr+1, regCurrent);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_RowData, iQueue, regCurrent);\n  }\n  sqlite3VdbeAddOp1(v, OP_Delete, iQueue);\n\n  /* Output the single row in Current */\n  addrCont = sqlite3VdbeMakeLabel(pParse);\n  codeOffset(v, regOffset, addrCont);\n  selectInnerLoop(pParse, p, iCurrent,\n      0, 0, pDest, addrCont, addrBreak);\n  if( regLimit ){\n    sqlite3VdbeAddOp2(v, OP_DecrJumpZero, regLimit, addrBreak);\n    VdbeCoverage(v);\n  }\n  sqlite3VdbeResolveLabel(v, addrCont);\n\n  /* Execute the recursive SELECT taking the single row in Current as\n  ** the value for the recursive-table. Store the results in the Queue.\n  */\n  pFirstRec->pPrior = 0;\n  ExplainQueryPlan((pParse, 1, \"RECURSIVE STEP\"));\n  sqlite3Select(pParse, p, &destQueue);\n  assert( pFirstRec->pPrior==0 );\n  pFirstRec->pPrior = pSetup;\n\n  /* Keep running the loop until the Queue is empty */\n  sqlite3VdbeGoto(v, addrTop);\n  sqlite3VdbeResolveLabel(v, addrBreak);\n\nend_of_recursive_query:\n  sqlite3ExprListDelete(pParse->db, p->pOrderBy);\n  p->pOrderBy = pOrderBy;\n  p->pLimit = pLimit;\n  return;\n}\n#endif /* SQLITE_OMIT_CTE */\n\n/* Forward references */\nstatic int multiSelectOrderBy(\n  Parse *pParse,        /* Parsing context */\n  Select *p,            /* The right-most of SELECTs to be coded */\n  SelectDest *pDest     /* What to do with query results */\n);\n\n/*\n** Handle the special case of a compound-select that originates from a\n** VALUES clause.  By handling this as a special case, we avoid deep\n** recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT\n** on a VALUES clause.\n**\n** Because the Select object originates from a VALUES clause:\n**   (1) There is no LIMIT or OFFSET or else there is a LIMIT of exactly 1\n**   (2) All terms are UNION ALL\n**   (3) There is no ORDER BY clause\n**\n** The \"LIMIT of exactly 1\" case of condition (1) comes about when a VALUES\n** clause occurs within scalar expression (ex: \"SELECT (VALUES(1),(2),(3))\").\n** The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case.\n** Since the limit is exactly 1, we only need to evaluate the left-most VALUES.\n*/\nstatic int multiSelectValues(\n  Parse *pParse,        /* Parsing context */\n  Select *p,            /* The right-most of SELECTs to be coded */\n  SelectDest *pDest     /* What to do with query results */\n){\n  int nRow = 1;\n  int rc = 0;\n  int bShowAll = p->pLimit==0;\n  assert( p->selFlags & SF_MultiValue );\n  do{\n    assert( p->selFlags & SF_Values );\n    assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );\n    assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr );\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( p->pWin ) return -1;\n#endif\n    if( p->pPrior==0 ) break;\n    assert( p->pPrior->pNext==p );\n    p = p->pPrior;\n    nRow += bShowAll;\n  }while(1);\n  ExplainQueryPlan((pParse, 0, \"SCAN %d CONSTANT ROW%s\", nRow,\n                    nRow==1 ? \"\" : \"S\"));\n  while( p ){\n    selectInnerLoop(pParse, p, -1, 0, 0, pDest, 1, 1);\n    if( !bShowAll ) break;\n    p->nSelectRow = nRow;\n    p = p->pNext;\n  }\n  return rc;\n}\n\n/*\n** Return true if the SELECT statement which is known to be the recursive\n** part of a recursive CTE still has its anchor terms attached.  If the\n** anchor terms have already been removed, then return false.\n*/\nstatic int hasAnchor(Select *p){\n  while( p && (p->selFlags & SF_Recursive)!=0 ){ p = p->pPrior; }\n  return p!=0;\n}\n\n/*\n** This routine is called to process a compound query form from\n** two or more separate queries using UNION, UNION ALL, EXCEPT, or\n** INTERSECT\n**\n** \"p\" points to the right-most of the two queries.  the query on the\n** left is p->pPrior.  The left query could also be a compound query\n** in which case this routine will be called recursively.\n**\n** The results of the total query are to be written into a destination\n** of type eDest with parameter iParm.\n**\n** Example 1:  Consider a three-way compound SQL statement.\n**\n**     SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3\n**\n** This statement is parsed up as follows:\n**\n**     SELECT c FROM t3\n**      |\n**      `----->  SELECT b FROM t2\n**                |\n**                `------>  SELECT a FROM t1\n**\n** The arrows in the diagram above represent the Select.pPrior pointer.\n** So if this routine is called with p equal to the t3 query, then\n** pPrior will be the t2 query.  p->op will be TK_UNION in this case.\n**\n** Notice that because of the way SQLite parses compound SELECTs, the\n** individual selects always group from left to right.\n*/\nstatic int multiSelect(\n  Parse *pParse,        /* Parsing context */\n  Select *p,            /* The right-most of SELECTs to be coded */\n  SelectDest *pDest     /* What to do with query results */\n){\n  int rc = SQLITE_OK;   /* Success code from a subroutine */\n  Select *pPrior;       /* Another SELECT immediately to our left */\n  Vdbe *v;              /* Generate code to this VDBE */\n  SelectDest dest;      /* Alternative data destination */\n  Select *pDelete = 0;  /* Chain of simple selects to delete */\n  sqlite3 *db;          /* Database connection */\n\n  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only\n  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.\n  */\n  assert( p && p->pPrior );  /* Calling function guarantees this much */\n  assert( (p->selFlags & SF_Recursive)==0 || p->op==TK_ALL || p->op==TK_UNION );\n  assert( p->selFlags & SF_Compound );\n  db = pParse->db;\n  pPrior = p->pPrior;\n  dest = *pDest;\n  assert( pPrior->pOrderBy==0 );\n  assert( pPrior->pLimit==0 );\n\n  v = sqlite3GetVdbe(pParse);\n  assert( v!=0 );  /* The VDBE already created by calling function */\n\n  /* Create the destination temporary table if necessary\n  */\n  if( dest.eDest==SRT_EphemTab ){\n    assert( p->pEList );\n    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iSDParm, p->pEList->nExpr);\n    dest.eDest = SRT_Table;\n  }\n\n  /* Special handling for a compound-select that originates as a VALUES clause.\n  */\n  if( p->selFlags & SF_MultiValue ){\n    rc = multiSelectValues(pParse, p, &dest);\n    if( rc>=0 ) goto multi_select_end;\n    rc = SQLITE_OK;\n  }\n\n  /* Make sure all SELECTs in the statement have the same number of elements\n  ** in their result sets.\n  */\n  assert( p->pEList && pPrior->pEList );\n  assert( p->pEList->nExpr==pPrior->pEList->nExpr );\n\n#ifndef SQLITE_OMIT_CTE\n  if( (p->selFlags & SF_Recursive)!=0 && hasAnchor(p) ){\n    generateWithRecursiveQuery(pParse, p, &dest);\n  }else\n#endif\n\n  /* Compound SELECTs that have an ORDER BY clause are handled separately.\n  */\n  if( p->pOrderBy ){\n    return multiSelectOrderBy(pParse, p, pDest);\n  }else{\n\n#ifndef SQLITE_OMIT_EXPLAIN\n    if( pPrior->pPrior==0 ){\n      ExplainQueryPlan((pParse, 1, \"COMPOUND QUERY\"));\n      ExplainQueryPlan((pParse, 1, \"LEFT-MOST SUBQUERY\"));\n    }\n#endif\n\n    /* Generate code for the left and right SELECT statements.\n    */\n    switch( p->op ){\n      case TK_ALL: {\n        int addr = 0;\n        int nLimit = 0;  /* Initialize to suppress harmless compiler warning */\n        assert( !pPrior->pLimit );\n        pPrior->iLimit = p->iLimit;\n        pPrior->iOffset = p->iOffset;\n        pPrior->pLimit = p->pLimit;\n        TREETRACE(0x200, pParse, p, (\"multiSelect UNION ALL left...\\n\"));\n        rc = sqlite3Select(pParse, pPrior, &dest);\n        pPrior->pLimit = 0;\n        if( rc ){\n          goto multi_select_end;\n        }\n        p->pPrior = 0;\n        p->iLimit = pPrior->iLimit;\n        p->iOffset = pPrior->iOffset;\n        if( p->iLimit ){\n          addr = sqlite3VdbeAddOp1(v, OP_IfNot, p->iLimit); VdbeCoverage(v);\n          VdbeComment((v, \"Jump ahead if LIMIT reached\"));\n          if( p->iOffset ){\n            sqlite3VdbeAddOp3(v, OP_OffsetLimit,\n                              p->iLimit, p->iOffset+1, p->iOffset);\n          }\n        }\n        ExplainQueryPlan((pParse, 1, \"UNION ALL\"));\n        TREETRACE(0x200, pParse, p, (\"multiSelect UNION ALL right...\\n\"));\n        rc = sqlite3Select(pParse, p, &dest);\n        testcase( rc!=SQLITE_OK );\n        pDelete = p->pPrior;\n        p->pPrior = pPrior;\n        p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);\n        if( p->pLimit\n         && sqlite3ExprIsInteger(p->pLimit->pLeft, &nLimit, pParse)\n         && nLimit>0 && p->nSelectRow > sqlite3LogEst((u64)nLimit)\n        ){\n          p->nSelectRow = sqlite3LogEst((u64)nLimit);\n        }\n        if( addr ){\n          sqlite3VdbeJumpHere(v, addr);\n        }\n        break;\n      }\n      case TK_EXCEPT:\n      case TK_UNION: {\n        int unionTab;    /* Cursor number of the temp table holding result */\n        u8 op = 0;       /* One of the SRT_ operations to apply to self */\n        int priorOp;     /* The SRT_ operation to apply to prior selects */\n        Expr *pLimit;    /* Saved values of p->nLimit  */\n        int addr;\n        int emptyBypass = 0;   /* IfEmpty opcode to bypass RHS */\n        SelectDest uniondest;\n\n\n        testcase( p->op==TK_EXCEPT );\n        testcase( p->op==TK_UNION );\n        priorOp = SRT_Union;\n        if( dest.eDest==priorOp ){\n          /* We can reuse a temporary table generated by a SELECT to our\n          ** right.\n          */\n          assert( p->pLimit==0 );      /* Not allowed on leftward elements */\n          unionTab = dest.iSDParm;\n        }else{\n          /* We will need to create our own temporary table to hold the\n          ** intermediate results.\n          */\n          unionTab = pParse->nTab++;\n          assert( p->pOrderBy==0 );\n          addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, unionTab, 0);\n          assert( p->addrOpenEphm[0] == -1 );\n          p->addrOpenEphm[0] = addr;\n          findRightmost(p)->selFlags |= SF_UsesEphemeral;\n          assert( p->pEList );\n        }\n\n\n        /* Code the SELECT statements to our left\n        */\n        assert( !pPrior->pOrderBy );\n        sqlite3SelectDestInit(&uniondest, priorOp, unionTab);\n        TREETRACE(0x200, pParse, p, (\"multiSelect EXCEPT/UNION left...\\n\"));\n        rc = sqlite3Select(pParse, pPrior, &uniondest);\n        if( rc ){\n          goto multi_select_end;\n        }\n\n        /* Code the current SELECT statement\n        */\n        if( p->op==TK_EXCEPT ){\n          op = SRT_Except;\n          emptyBypass = sqlite3VdbeAddOp1(v, OP_IfEmpty, unionTab);\n          VdbeCoverage(v);\n        }else{\n          assert( p->op==TK_UNION );\n          op = SRT_Union;\n        }\n        p->pPrior = 0;\n        pLimit = p->pLimit;\n        p->pLimit = 0;\n        uniondest.eDest = op;\n        ExplainQueryPlan((pParse, 1, \"%s USING TEMP B-TREE\",\n                          sqlite3SelectOpName(p->op)));\n        TREETRACE(0x200, pParse, p, (\"multiSelect EXCEPT/UNION right...\\n\"));\n        rc = sqlite3Select(pParse, p, &uniondest);\n        testcase( rc!=SQLITE_OK );\n        assert( p->pOrderBy==0 );\n        pDelete = p->pPrior;\n        p->pPrior = pPrior;\n        p->pOrderBy = 0;\n        if( p->op==TK_UNION ){\n          p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);\n        }\n        if( emptyBypass ) sqlite3VdbeJumpHere(v, emptyBypass);\n        sqlite3ExprDelete(db, p->pLimit);\n        p->pLimit = pLimit;\n        p->iLimit = 0;\n        p->iOffset = 0;\n\n        /* Convert the data in the temporary table into whatever form\n        ** it is that we currently need.\n        */\n        assert( unionTab==dest.iSDParm || dest.eDest!=priorOp );\n        assert( p->pEList || db->mallocFailed );\n        if( dest.eDest!=priorOp && db->mallocFailed==0 ){\n          int iCont, iBreak, iStart;\n          iBreak = sqlite3VdbeMakeLabel(pParse);\n          iCont = sqlite3VdbeMakeLabel(pParse);\n          computeLimitRegisters(pParse, p, iBreak);\n          sqlite3VdbeAddOp2(v, OP_Rewind, unionTab, iBreak); VdbeCoverage(v);\n          iStart = sqlite3VdbeCurrentAddr(v);\n          selectInnerLoop(pParse, p, unionTab,\n                          0, 0, &dest, iCont, iBreak);\n          sqlite3VdbeResolveLabel(v, iCont);\n          sqlite3VdbeAddOp2(v, OP_Next, unionTab, iStart); VdbeCoverage(v);\n          sqlite3VdbeResolveLabel(v, iBreak);\n          sqlite3VdbeAddOp2(v, OP_Close, unionTab, 0);\n        }\n        break;\n      }\n      default: assert( p->op==TK_INTERSECT ); {\n        int tab1, tab2;\n        int iCont, iBreak, iStart;\n        Expr *pLimit;\n        int addr, iLimit, iOffset;\n        SelectDest intersectdest;\n        int r1;\n        int emptyBypass;\n\n        /* INTERSECT is different from the others since it requires\n        ** two temporary tables.  Hence it has its own case.  Begin\n        ** by allocating the tables we will need.\n        */\n        tab1 = pParse->nTab++;\n        tab2 = pParse->nTab++;\n        assert( p->pOrderBy==0 );\n\n        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab1, 0);\n        assert( p->addrOpenEphm[0] == -1 );\n        p->addrOpenEphm[0] = addr;\n        findRightmost(p)->selFlags |= SF_UsesEphemeral;\n        assert( p->pEList );\n\n        /* Code the SELECTs to our left into temporary table \"tab1\".\n        */\n        sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1);\n        TREETRACE(0x400, pParse, p, (\"multiSelect INTERSECT left...\\n\"));\n        rc = sqlite3Select(pParse, pPrior, &intersectdest);\n        if( rc ){\n          goto multi_select_end;\n        }\n\n        /* Initialize LIMIT counters before checking to see if the LHS\n        ** is empty, in case the jump is taken */\n        iBreak = sqlite3VdbeMakeLabel(pParse);\n        computeLimitRegisters(pParse, p, iBreak);\n        emptyBypass = sqlite3VdbeAddOp1(v, OP_IfEmpty, tab1); VdbeCoverage(v);\n\n        /* Code the current SELECT into temporary table \"tab2\"\n        */\n        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab2, 0);\n        assert( p->addrOpenEphm[1] == -1 );\n        p->addrOpenEphm[1] = addr;\n\n        /* Disable prior SELECTs and the LIMIT counters during the computation\n        ** of the RHS select */\n        pLimit = p->pLimit;\n        iLimit = p->iLimit;\n        iOffset = p->iOffset;\n        p->pPrior = 0;\n        p->pLimit = 0;\n        p->iLimit = 0;\n        p->iOffset = 0;\n\n        intersectdest.iSDParm = tab2;\n        ExplainQueryPlan((pParse, 1, \"%s USING TEMP B-TREE\",\n                          sqlite3SelectOpName(p->op)));\n        TREETRACE(0x400, pParse, p, (\"multiSelect INTERSECT right...\\n\"));\n        rc = sqlite3Select(pParse, p, &intersectdest);\n        testcase( rc!=SQLITE_OK );\n        pDelete = p->pPrior;\n        p->pPrior = pPrior;\n        if( p->nSelectRow>pPrior->nSelectRow ){\n          p->nSelectRow = pPrior->nSelectRow;\n        }\n        sqlite3ExprDelete(db, p->pLimit);\n\n        /* Reinstate the LIMIT counters prior to running the final intersect */\n        p->pLimit = pLimit;\n        p->iLimit = iLimit;\n        p->iOffset = iOffset;\n\n        /* Generate code to take the intersection of the two temporary\n        ** tables.\n        */\n        if( rc ) break;\n        assert( p->pEList );\n        sqlite3VdbeAddOp1(v, OP_Rewind, tab1);\n        r1 = sqlite3GetTempReg(pParse);\n        iStart = sqlite3VdbeAddOp2(v, OP_RowData, tab1, r1);\n        iCont = sqlite3VdbeMakeLabel(pParse);\n        sqlite3VdbeAddOp4Int(v, OP_NotFound, tab2, iCont, r1, 0);\n        VdbeCoverage(v);\n        sqlite3ReleaseTempReg(pParse, r1);\n        selectInnerLoop(pParse, p, tab1,\n                        0, 0, &dest, iCont, iBreak);\n        sqlite3VdbeResolveLabel(v, iCont);\n        sqlite3VdbeAddOp2(v, OP_Next, tab1, iStart); VdbeCoverage(v);\n        sqlite3VdbeResolveLabel(v, iBreak);\n        sqlite3VdbeAddOp2(v, OP_Close, tab2, 0);\n        sqlite3VdbeJumpHere(v, emptyBypass);\n        sqlite3VdbeAddOp2(v, OP_Close, tab1, 0);\n        break;\n      }\n    }\n\n  #ifndef SQLITE_OMIT_EXPLAIN\n    if( p->pNext==0 ){\n      ExplainQueryPlanPop(pParse);\n    }\n  #endif\n  }\n  if( pParse->nErr ) goto multi_select_end;\n\n  /* Compute collating sequences used by\n  ** temporary tables needed to implement the compound select.\n  ** Attach the KeyInfo structure to all temporary tables.\n  **\n  ** This section is run by the right-most SELECT statement only.\n  ** SELECT statements to the left always skip this part.  The right-most\n  ** SELECT might also skip this part if it has no ORDER BY clause and\n  ** no temp tables are required.\n  */\n  if( p->selFlags & SF_UsesEphemeral ){\n    int i;                        /* Loop counter */\n    KeyInfo *pKeyInfo;            /* Collating sequence for the result set */\n    Select *pLoop;                /* For looping through SELECT statements */\n    CollSeq **apColl;             /* For looping through pKeyInfo->aColl[] */\n    int nCol;                     /* Number of columns in result set */\n\n    assert( p->pNext==0 );\n    assert( p->pEList!=0 );\n    nCol = p->pEList->nExpr;\n    pKeyInfo = sqlite3KeyInfoAlloc(db, nCol, 1);\n    if( !pKeyInfo ){\n      rc = SQLITE_NOMEM_BKPT;\n      goto multi_select_end;\n    }\n    for(i=0, apColl=pKeyInfo->aColl; i<nCol; i++, apColl++){\n      *apColl = multiSelectCollSeq(pParse, p, i);\n      if( 0==*apColl ){\n        *apColl = db->pDfltColl;\n      }\n    }\n\n    for(pLoop=p; pLoop; pLoop=pLoop->pPrior){\n      for(i=0; i<2; i++){\n        int addr = pLoop->addrOpenEphm[i];\n        if( addr<0 ){\n          /* If [0] is unused then [1] is also unused.  So we can\n          ** always safely abort as soon as the first unused slot is found */\n          assert( pLoop->addrOpenEphm[1]<0 );\n          break;\n        }\n        sqlite3VdbeChangeP2(v, addr, nCol);\n        sqlite3VdbeChangeP4(v, addr, (char*)sqlite3KeyInfoRef(pKeyInfo),\n                            P4_KEYINFO);\n        pLoop->addrOpenEphm[i] = -1;\n      }\n    }\n    sqlite3KeyInfoUnref(pKeyInfo);\n  }\n\nmulti_select_end:\n  pDest->iSdst = dest.iSdst;\n  pDest->nSdst = dest.nSdst;\n  pDest->iSDParm2 = dest.iSDParm2;\n  if( pDelete ){\n    sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pDelete);\n  }\n  return rc;\n}\n#endif /* SQLITE_OMIT_COMPOUND_SELECT */\n\n/*\n** Error message for when two or more terms of a compound select have different\n** size result sets.\n*/\nSQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p){\n  if( p->selFlags & SF_Values ){\n    sqlite3ErrorMsg(pParse, \"all VALUES must have the same number of terms\");\n  }else{\n    sqlite3ErrorMsg(pParse, \"SELECTs to the left and right of %s\"\n      \" do not have the same number of result columns\",\n      sqlite3SelectOpName(p->op));\n  }\n}\n\n/*\n** Code an output subroutine for a coroutine implementation of a\n** SELECT statement.\n**\n** The data to be output is contained in pIn->iSdst.  There are\n** pIn->nSdst columns to be output.  pDest is where the output should\n** be sent.\n**\n** regReturn is the number of the register holding the subroutine\n** return address.\n**\n** If regPrev>0 then it is the first register in a vector that\n** records the previous output.  mem[regPrev] is a flag that is false\n** if there has been no previous output.  If regPrev>0 then code is\n** generated to suppress duplicates.  pKeyInfo is used for comparing\n** keys.\n**\n** If the LIMIT found in p->iLimit is reached, jump immediately to\n** iBreak.\n*/\nstatic int generateOutputSubroutine(\n  Parse *pParse,          /* Parsing context */\n  Select *p,              /* The SELECT statement */\n  SelectDest *pIn,        /* Coroutine supplying data */\n  SelectDest *pDest,      /* Where to send the data */\n  int regReturn,          /* The return address register */\n  int regPrev,            /* Previous result register.  No uniqueness if 0 */\n  KeyInfo *pKeyInfo,      /* For comparing with previous entry */\n  int iBreak              /* Jump here if we hit the LIMIT */\n){\n  Vdbe *v = pParse->pVdbe;\n  int iContinue;\n  int addr;\n\n  addr = sqlite3VdbeCurrentAddr(v);\n  iContinue = sqlite3VdbeMakeLabel(pParse);\n\n  /* Suppress duplicates for UNION, EXCEPT, and INTERSECT\n  */\n  if( regPrev ){\n    int addr1, addr2;\n    addr1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);\n    addr2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,\n                              (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);\n    sqlite3VdbeAddOp3(v, OP_Jump, addr2+2, iContinue, addr2+2); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addr1);\n    sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);\n    sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);\n  }\n  if( pParse->db->mallocFailed ) return 0;\n\n  /* Suppress the first OFFSET entries if there is an OFFSET clause\n  */\n  codeOffset(v, p->iOffset, iContinue);\n\n  assert( pDest->eDest!=SRT_Exists );\n  assert( pDest->eDest!=SRT_Table );\n  switch( pDest->eDest ){\n    /* Store the result as data using a unique key.\n    */\n    case SRT_EphemTab: {\n      int r1 = sqlite3GetTempReg(pParse);\n      int r2 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, pIn->iSdst, pIn->nSdst, r1);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iSDParm, r2);\n      sqlite3VdbeAddOp3(v, OP_Insert, pDest->iSDParm, r1, r2);\n      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);\n      sqlite3ReleaseTempReg(pParse, r2);\n      sqlite3ReleaseTempReg(pParse, r1);\n      break;\n    }\n\n#ifndef SQLITE_OMIT_SUBQUERY\n    /* If we are creating a set for an \"expr IN (SELECT ...)\".\n    */\n    case SRT_Set: {\n      int r1;\n      testcase( pIn->nSdst>1 );\n      r1 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp4(v, OP_MakeRecord, pIn->iSdst, pIn->nSdst,\n          r1, pDest->zAffSdst, pIn->nSdst);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, pDest->iSDParm, r1,\n                           pIn->iSdst, pIn->nSdst);\n      if( pDest->iSDParm2>0 ){\n        sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pDest->iSDParm2, 0,\n                             pIn->iSdst, pIn->nSdst);\n        ExplainQueryPlan((pParse, 0, \"CREATE BLOOM FILTER\"));\n      }\n      sqlite3ReleaseTempReg(pParse, r1);\n      break;\n    }\n\n    /* If this is a scalar select that is part of an expression, then\n    ** store the results in the appropriate memory cell and break out\n    ** of the scan loop.  Note that the select might return multiple columns\n    ** if it is the RHS of a row-value IN operator.\n    */\n    case SRT_Mem: {\n      testcase( pIn->nSdst>1 );\n      sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSDParm, pIn->nSdst);\n      /* The LIMIT clause will jump out of the loop for us */\n      break;\n    }\n#endif /* #ifndef SQLITE_OMIT_SUBQUERY */\n\n    /* The results are stored in a sequence of registers\n    ** starting at pDest->iSdst.  Then the co-routine yields.\n    */\n    case SRT_Coroutine: {\n      if( pDest->iSdst==0 ){\n        pDest->iSdst = sqlite3GetTempRange(pParse, pIn->nSdst);\n        pDest->nSdst = pIn->nSdst;\n      }\n      sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSdst, pIn->nSdst);\n      sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);\n      break;\n    }\n\n    /* If none of the above, then the result destination must be\n    ** SRT_Output.  This routine is never called with any other\n    ** destination other than the ones handled above or SRT_Output.\n    **\n    ** For SRT_Output, results are stored in a sequence of registers.\n    ** Then the OP_ResultRow opcode is used to cause sqlite3_step() to\n    ** return the next row of result.\n    */\n    default: {\n      assert( pDest->eDest==SRT_Output );\n      sqlite3VdbeAddOp2(v, OP_ResultRow, pIn->iSdst, pIn->nSdst);\n      break;\n    }\n  }\n\n  /* Jump to the end of the loop if the LIMIT is reached.\n  */\n  if( p->iLimit ){\n    sqlite3VdbeAddOp2(v, OP_DecrJumpZero, p->iLimit, iBreak); VdbeCoverage(v);\n  }\n\n  /* Generate the subroutine return\n  */\n  sqlite3VdbeResolveLabel(v, iContinue);\n  sqlite3VdbeAddOp1(v, OP_Return, regReturn);\n\n  return addr;\n}\n\n/*\n** Alternative compound select code generator for cases when there\n** is an ORDER BY clause.\n**\n** We assume a query of the following form:\n**\n**      <selectA>  <operator>  <selectB>  ORDER BY <orderbylist>\n**\n** <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT.  The idea\n** is to code both <selectA> and <selectB> with the ORDER BY clause as\n** co-routines.  Then run the co-routines in parallel and merge the results\n** into the output.  In addition to the two coroutines (called selectA and\n** selectB) there are 7 subroutines:\n**\n**    outA:    Move the output of the selectA coroutine into the output\n**             of the compound query.\n**\n**    outB:    Move the output of the selectB coroutine into the output\n**             of the compound query.  (Only generated for UNION and\n**             UNION ALL.  EXCEPT and INSERTSECT never output a row that\n**             appears only in B.)\n**\n**    AltB:    Called when there is data from both coroutines and A<B.\n**\n**    AeqB:    Called when there is data from both coroutines and A==B.\n**\n**    AgtB:    Called when there is data from both coroutines and A>B.\n**\n**    EofA:    Called when data is exhausted from selectA.\n**\n**    EofB:    Called when data is exhausted from selectB.\n**\n** The implementation of the latter five subroutines depend on which\n** <operator> is used:\n**\n**\n**             UNION ALL         UNION            EXCEPT          INTERSECT\n**          -------------  -----------------  --------------  -----------------\n**   AltB:   outA, nextA      outA, nextA       outA, nextA         nextA\n**\n**   AeqB:   outA, nextA         nextA             nextA         outA, nextA\n**\n**   AgtB:   outB, nextB      outB, nextB          nextB            nextB\n**\n**   EofA:   outB, nextB      outB, nextB          halt             halt\n**\n**   EofB:   outA, nextA      outA, nextA       outA, nextA         halt\n**\n** In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA\n** causes an immediate jump to EofA and an EOF on B following nextB causes\n** an immediate jump to EofB.  Within EofA and EofB, and EOF on entry or\n** following nextX causes a jump to the end of the select processing.\n**\n** Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled\n** within the output subroutine.  The regPrev register set holds the previously\n** output value.  A comparison is made against this value and the output\n** is skipped if the next results would be the same as the previous.\n**\n** The implementation plan is to implement the two coroutines and seven\n** subroutines first, then put the control logic at the bottom.  Like this:\n**\n**          goto Init\n**     coA: coroutine for left query (A)\n**     coB: coroutine for right query (B)\n**    outA: output one row of A\n**    outB: output one row of B (UNION and UNION ALL only)\n**    EofA: ...\n**    EofB: ...\n**    AltB: ...\n**    AeqB: ...\n**    AgtB: ...\n**    Init: initialize coroutine registers\n**          yield coA\n**          if eof(A) goto EofA\n**          yield coB\n**          if eof(B) goto EofB\n**    Cmpr: Compare A, B\n**          Jump AltB, AeqB, AgtB\n**     End: ...\n**\n** We call AltB, AeqB, AgtB, EofA, and EofB \"subroutines\" but they are not\n** actually called using Gosub and they do not Return.  EofA and EofB loop\n** until all data is exhausted then jump to the \"end\" label.  AltB, AeqB,\n** and AgtB jump to either L2 or to one of EofA or EofB.\n*/\n#ifndef SQLITE_OMIT_COMPOUND_SELECT\nstatic int multiSelectOrderBy(\n  Parse *pParse,        /* Parsing context */\n  Select *p,            /* The right-most of SELECTs to be coded */\n  SelectDest *pDest     /* What to do with query results */\n){\n  int i, j;             /* Loop counters */\n  Select *pPrior;       /* Another SELECT immediately to our left */\n  Select *pSplit;       /* Left-most SELECT in the right-hand group */\n  int nSelect;          /* Number of SELECT statements in the compound */\n  Vdbe *v;              /* Generate code to this VDBE */\n  SelectDest destA;     /* Destination for coroutine A */\n  SelectDest destB;     /* Destination for coroutine B */\n  int regAddrA;         /* Address register for select-A coroutine */\n  int regAddrB;         /* Address register for select-B coroutine */\n  int addrSelectA;      /* Address of the select-A coroutine */\n  int addrSelectB;      /* Address of the select-B coroutine */\n  int regOutA;          /* Address register for the output-A subroutine */\n  int regOutB;          /* Address register for the output-B subroutine */\n  int addrOutA;         /* Address of the output-A subroutine */\n  int addrOutB = 0;     /* Address of the output-B subroutine */\n  int addrEofA;         /* Address of the select-A-exhausted subroutine */\n  int addrEofA_noB;     /* Alternate addrEofA if B is uninitialized */\n  int addrEofB;         /* Address of the select-B-exhausted subroutine */\n  int addrAltB;         /* Address of the A<B subroutine */\n  int addrAeqB;         /* Address of the A==B subroutine */\n  int addrAgtB;         /* Address of the A>B subroutine */\n  int regLimitA;        /* Limit register for select-A */\n  int regLimitB;        /* Limit register for select-A */\n  int regPrev;          /* A range of registers to hold previous output */\n  int savedLimit;       /* Saved value of p->iLimit */\n  int savedOffset;      /* Saved value of p->iOffset */\n  int labelCmpr;        /* Label for the start of the merge algorithm */\n  int labelEnd;         /* Label for the end of the overall SELECT stmt */\n  int addr1;            /* Jump instructions that get retargeted */\n  int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */\n  KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */\n  KeyInfo *pKeyMerge;   /* Comparison information for merging rows */\n  sqlite3 *db;          /* Database connection */\n  ExprList *pOrderBy;   /* The ORDER BY clause */\n  int nOrderBy;         /* Number of terms in the ORDER BY clause */\n  u32 *aPermute;        /* Mapping from ORDER BY terms to result set columns */\n\n  assert( p->pOrderBy!=0 );\n  assert( pKeyDup==0 ); /* \"Managed\" code needs this.  Ticket #3382. */\n  db = pParse->db;\n  v = pParse->pVdbe;\n  assert( v!=0 );       /* Already thrown the error if VDBE alloc failed */\n  labelEnd = sqlite3VdbeMakeLabel(pParse);\n  labelCmpr = sqlite3VdbeMakeLabel(pParse);\n\n\n  /* Patch up the ORDER BY clause\n  */\n  op = p->op;\n  assert( p->pPrior->pOrderBy==0 );\n  pOrderBy = p->pOrderBy;\n  assert( pOrderBy );\n  nOrderBy = pOrderBy->nExpr;\n\n  /* For operators other than UNION ALL we have to make sure that\n  ** the ORDER BY clause covers every term of the result set.  Add\n  ** terms to the ORDER BY clause as necessary.\n  */\n  if( op!=TK_ALL ){\n    for(i=1; db->mallocFailed==0 && i<=p->pEList->nExpr; i++){\n      struct ExprList_item *pItem;\n      for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){\n        assert( pItem!=0 );\n        assert( pItem->u.x.iOrderByCol>0 );\n        if( pItem->u.x.iOrderByCol==i ) break;\n      }\n      if( j==nOrderBy ){\n        Expr *pNew = sqlite3Expr(db, TK_INTEGER, 0);\n        if( pNew==0 ) return SQLITE_NOMEM_BKPT;\n        pNew->flags |= EP_IntValue;\n        pNew->u.iValue = i;\n        p->pOrderBy = pOrderBy = sqlite3ExprListAppend(pParse, pOrderBy, pNew);\n        if( pOrderBy ) pOrderBy->a[nOrderBy++].u.x.iOrderByCol = (u16)i;\n      }\n    }\n  }\n\n  /* Compute the comparison permutation and keyinfo that is used with\n  ** the permutation used to determine if the next\n  ** row of results comes from selectA or selectB.  Also add explicit\n  ** collations to the ORDER BY clause terms so that when the subqueries\n  ** to the right and the left are evaluated, they use the correct\n  ** collation.\n  */\n  aPermute = sqlite3DbMallocRawNN(db, sizeof(u32)*(nOrderBy + 1));\n  if( aPermute ){\n    struct ExprList_item *pItem;\n    aPermute[0] = nOrderBy;\n    for(i=1, pItem=pOrderBy->a; i<=nOrderBy; i++, pItem++){\n      assert( pItem!=0 );\n      assert( pItem->u.x.iOrderByCol>0 );\n      assert( pItem->u.x.iOrderByCol<=p->pEList->nExpr );\n      aPermute[i] = pItem->u.x.iOrderByCol - 1;\n    }\n    pKeyMerge = multiSelectOrderByKeyInfo(pParse, p, 1);\n  }else{\n    pKeyMerge = 0;\n  }\n\n  /* Allocate a range of temporary registers and the KeyInfo needed\n  ** for the logic that removes duplicate result rows when the\n  ** operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL).\n  */\n  if( op==TK_ALL ){\n    regPrev = 0;\n  }else{\n    int nExpr = p->pEList->nExpr;\n    assert( nOrderBy>=nExpr || db->mallocFailed );\n    regPrev = pParse->nMem+1;\n    pParse->nMem += nExpr+1;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, regPrev);\n    pKeyDup = sqlite3KeyInfoAlloc(db, nExpr, 1);\n    if( pKeyDup ){\n      assert( sqlite3KeyInfoIsWriteable(pKeyDup) );\n      for(i=0; i<nExpr; i++){\n        pKeyDup->aColl[i] = multiSelectCollSeq(pParse, p, i);\n        pKeyDup->aSortFlags[i] = 0;\n      }\n    }\n  }\n\n  /* Separate the left and the right query from one another\n  */\n  nSelect = 1;\n  if( (op==TK_ALL || op==TK_UNION)\n   && OptimizationEnabled(db, SQLITE_BalancedMerge)\n  ){\n    for(pSplit=p; pSplit->pPrior!=0 && pSplit->op==op; pSplit=pSplit->pPrior){\n      nSelect++;\n      assert( pSplit->pPrior->pNext==pSplit );\n    }\n  }\n  if( nSelect<=3 ){\n    pSplit = p;\n  }else{\n    pSplit = p;\n    for(i=2; i<nSelect; i+=2){ pSplit = pSplit->pPrior; }\n  }\n  pPrior = pSplit->pPrior;\n  assert( pPrior!=0 );\n  pSplit->pPrior = 0;\n  pPrior->pNext = 0;\n  assert( p->pOrderBy == pOrderBy );\n  assert( pOrderBy!=0 || db->mallocFailed );\n  pPrior->pOrderBy = sqlite3ExprListDup(pParse->db, pOrderBy, 0);\n  sqlite3ResolveOrderGroupBy(pParse, p, p->pOrderBy, \"ORDER\");\n  sqlite3ResolveOrderGroupBy(pParse, pPrior, pPrior->pOrderBy, \"ORDER\");\n\n  /* Compute the limit registers */\n  computeLimitRegisters(pParse, p, labelEnd);\n  if( p->iLimit && op==TK_ALL ){\n    regLimitA = ++pParse->nMem;\n    regLimitB = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Copy, p->iOffset ? p->iOffset+1 : p->iLimit,\n                                  regLimitA);\n    sqlite3VdbeAddOp2(v, OP_Copy, regLimitA, regLimitB);\n  }else{\n    regLimitA = regLimitB = 0;\n  }\n  sqlite3ExprDelete(db, p->pLimit);\n  p->pLimit = 0;\n\n  regAddrA = ++pParse->nMem;\n  regAddrB = ++pParse->nMem;\n  regOutA = ++pParse->nMem;\n  regOutB = ++pParse->nMem;\n  sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);\n  sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);\n\n  ExplainQueryPlan((pParse, 1, \"MERGE (%s)\", sqlite3SelectOpName(p->op)));\n\n  /* Generate a coroutine to evaluate the SELECT statement to the\n  ** left of the compound operator - the \"A\" select.\n  */\n  addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;\n  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);\n  VdbeComment((v, \"left SELECT\"));\n  pPrior->iLimit = regLimitA;\n  ExplainQueryPlan((pParse, 1, \"LEFT\"));\n  sqlite3Select(pParse, pPrior, &destA);\n  sqlite3VdbeEndCoroutine(v, regAddrA);\n  sqlite3VdbeJumpHere(v, addr1);\n\n  /* Generate a coroutine to evaluate the SELECT statement on\n  ** the right - the \"B\" select\n  */\n  addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;\n  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);\n  VdbeComment((v, \"right SELECT\"));\n  savedLimit = p->iLimit;\n  savedOffset = p->iOffset;\n  p->iLimit = regLimitB;\n  p->iOffset = 0;\n  ExplainQueryPlan((pParse, 1, \"RIGHT\"));\n  sqlite3Select(pParse, p, &destB);\n  p->iLimit = savedLimit;\n  p->iOffset = savedOffset;\n  sqlite3VdbeEndCoroutine(v, regAddrB);\n\n  /* Generate a subroutine that outputs the current row of the A\n  ** select as the next output row of the compound select.\n  */\n  VdbeNoopComment((v, \"Output routine for A\"));\n  addrOutA = generateOutputSubroutine(pParse,\n                 p, &destA, pDest, regOutA,\n                 regPrev, pKeyDup, labelEnd);\n\n  /* Generate a subroutine that outputs the current row of the B\n  ** select as the next output row of the compound select.\n  */\n  if( op==TK_ALL || op==TK_UNION ){\n    VdbeNoopComment((v, \"Output routine for B\"));\n    addrOutB = generateOutputSubroutine(pParse,\n                 p, &destB, pDest, regOutB,\n                 regPrev, pKeyDup, labelEnd);\n  }\n  sqlite3KeyInfoUnref(pKeyDup);\n\n  /* Generate a subroutine to run when the results from select A\n  ** are exhausted and only data in select B remains.\n  */\n  if( op==TK_EXCEPT || op==TK_INTERSECT ){\n    addrEofA_noB = addrEofA = labelEnd;\n  }else{\n    VdbeNoopComment((v, \"eof-A subroutine\"));\n    addrEofA = sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);\n    addrEofA_noB = sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, labelEnd);\n                                     VdbeCoverage(v);\n    sqlite3VdbeGoto(v, addrEofA);\n    p->nSelectRow = sqlite3LogEstAdd(p->nSelectRow, pPrior->nSelectRow);\n  }\n\n  /* Generate a subroutine to run when the results from select B\n  ** are exhausted and only data in select A remains.\n  */\n  if( op==TK_INTERSECT ){\n    addrEofB = addrEofA;\n    if( p->nSelectRow > pPrior->nSelectRow ) p->nSelectRow = pPrior->nSelectRow;\n  }else{\n    VdbeNoopComment((v, \"eof-B subroutine\"));\n    addrEofB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);\n    sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, labelEnd); VdbeCoverage(v);\n    sqlite3VdbeGoto(v, addrEofB);\n  }\n\n  /* Generate code to handle the case of A<B\n  */\n  VdbeNoopComment((v, \"A-lt-B subroutine\"));\n  addrAltB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);\n  sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);\n  sqlite3VdbeGoto(v, labelCmpr);\n\n  /* Generate code to handle the case of A==B\n  */\n  if( op==TK_ALL ){\n    addrAeqB = addrAltB;\n  }else if( op==TK_INTERSECT ){\n    addrAeqB = addrAltB;\n    addrAltB++;\n  }else{\n    VdbeNoopComment((v, \"A-eq-B subroutine\"));\n    addrAeqB =\n    sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);\n    sqlite3VdbeGoto(v, labelCmpr);\n  }\n\n  /* Generate code to handle the case of A>B\n  */\n  VdbeNoopComment((v, \"A-gt-B subroutine\"));\n  addrAgtB = sqlite3VdbeCurrentAddr(v);\n  if( op==TK_ALL || op==TK_UNION ){\n    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);\n  }\n  sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);\n  sqlite3VdbeGoto(v, labelCmpr);\n\n  /* This code runs once to initialize everything.\n  */\n  sqlite3VdbeJumpHere(v, addr1);\n  sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);\n  sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);\n\n  /* Implement the main merge loop\n  */\n  sqlite3VdbeResolveLabel(v, labelCmpr);\n  sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);\n  sqlite3VdbeAddOp4(v, OP_Compare, destA.iSdst, destB.iSdst, nOrderBy,\n                         (char*)pKeyMerge, P4_KEYINFO);\n  sqlite3VdbeChangeP5(v, OPFLAG_PERMUTE);\n  sqlite3VdbeAddOp3(v, OP_Jump, addrAltB, addrAeqB, addrAgtB); VdbeCoverage(v);\n\n  /* Jump to the this point in order to terminate the query.\n  */\n  sqlite3VdbeResolveLabel(v, labelEnd);\n\n  /* Make arrangements to free the 2nd and subsequent arms of the compound\n  ** after the parse has finished */\n  if( pSplit->pPrior ){\n    sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pSplit->pPrior);\n  }\n  pSplit->pPrior = pPrior;\n  pPrior->pNext = pSplit;\n  sqlite3ExprListDelete(db, pPrior->pOrderBy);\n  pPrior->pOrderBy = 0;\n\n  /*** TBD:  Insert subroutine calls to close cursors on incomplete\n  **** subqueries ****/\n  ExplainQueryPlanPop(pParse);\n  return pParse->nErr!=0;\n}\n#endif\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n\n/* An instance of the SubstContext object describes an substitution edit\n** to be performed on a parse tree.\n**\n** All references to columns in table iTable are to be replaced by corresponding\n** expressions in pEList.\n**\n** ## About \"isOuterJoin\":\n**\n** The isOuterJoin column indicates that the replacement will occur into a\n** position in the parent that is NULL-able due to an OUTER JOIN.  Either the\n** target slot in the parent is the right operand of a LEFT JOIN, or one of\n** the left operands of a RIGHT JOIN.  In either case, we need to potentially\n** bypass the substituted expression with OP_IfNullRow.\n**\n** Suppose the original expression is an integer constant. Even though the table\n** has the nullRow flag set, because the expression is an integer constant,\n** it will not be NULLed out.  So instead, we insert an OP_IfNullRow opcode\n** that checks to see if the nullRow flag is set on the table.  If the nullRow\n** flag is set, then the value in the register is set to NULL and the original\n** expression is bypassed.  If the nullRow flag is not set, then the original\n** expression runs to populate the register.\n**\n** Example where this is needed:\n**\n**      CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);\n**      CREATE TABLE t2(x INT UNIQUE);\n**\n**      SELECT a,b,m,x FROM t1 LEFT JOIN (SELECT 59 AS m,x FROM t2) ON b=x;\n**\n** When the subquery on the right side of the LEFT JOIN is flattened, we\n** have to add OP_IfNullRow in front of the OP_Integer that implements the\n** \"m\" value of the subquery so that a NULL will be loaded instead of 59\n** when processing a non-matched row of the left.\n*/\ntypedef struct SubstContext {\n  Parse *pParse;            /* The parsing context */\n  int iTable;               /* Replace references to this table */\n  int iNewTable;            /* New table number */\n  int isOuterJoin;          /* Add TK_IF_NULL_ROW opcodes on each replacement */\n  int nSelDepth;            /* Depth of sub-query recursion.  Top==1 */\n  ExprList *pEList;         /* Replacement expressions */\n  ExprList *pCList;         /* Collation sequences for replacement expr */\n} SubstContext;\n\n/* Forward Declarations */\nstatic void substExprList(SubstContext*, ExprList*);\nstatic void substSelect(SubstContext*, Select*, int);\n\n/*\n** Scan through the expression pExpr.  Replace every reference to\n** a column in table number iTable with a copy of the iColumn-th\n** entry in pEList.  (But leave references to the ROWID column\n** unchanged.)\n**\n** This routine is part of the flattening procedure.  A subquery\n** whose result set is defined by pEList appears as entry in the\n** FROM clause of a SELECT such that the VDBE cursor assigned to that\n** FORM clause entry is iTable.  This routine makes the necessary\n** changes to pExpr so that it refers directly to the source table\n** of the subquery rather the result set of the subquery.\n*/\nstatic Expr *substExpr(\n  SubstContext *pSubst,  /* Description of the substitution */\n  Expr *pExpr            /* Expr in which substitution occurs */\n){\n  if( pExpr==0 ) return 0;\n  if( ExprHasProperty(pExpr, EP_OuterON|EP_InnerON)\n   && pExpr->w.iJoin==pSubst->iTable\n  ){\n    testcase( ExprHasProperty(pExpr, EP_InnerON) );\n    pExpr->w.iJoin = pSubst->iNewTable;\n  }\n  if( pExpr->op==TK_COLUMN\n   && pExpr->iTable==pSubst->iTable\n   && !ExprHasProperty(pExpr, EP_FixedCol)\n  ){\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n    if( pExpr->iColumn<0 ){\n      pExpr->op = TK_NULL;\n    }else\n#endif\n    {\n      Expr *pNew;\n      int iColumn;\n      Expr *pCopy;\n      Expr ifNullRow;\n      iColumn = pExpr->iColumn;\n      assert( iColumn>=0 );\n      assert( pSubst->pEList!=0 && iColumn<pSubst->pEList->nExpr );\n      assert( pExpr->pRight==0 );\n      pCopy = pSubst->pEList->a[iColumn].pExpr;\n      if( sqlite3ExprIsVector(pCopy) ){\n        sqlite3VectorErrorMsg(pSubst->pParse, pCopy);\n      }else{\n        sqlite3 *db = pSubst->pParse->db;\n        if( pSubst->isOuterJoin\n         && (pCopy->op!=TK_COLUMN || pCopy->iTable!=pSubst->iNewTable)\n        ){\n          memset(&ifNullRow, 0, sizeof(ifNullRow));\n          ifNullRow.op = TK_IF_NULL_ROW;\n          ifNullRow.pLeft = pCopy;\n          ifNullRow.iTable = pSubst->iNewTable;\n          ifNullRow.iColumn = -99;\n          ifNullRow.flags = EP_IfNullRow;\n          pCopy = &ifNullRow;\n        }\n        testcase( ExprHasProperty(pCopy, EP_Subquery) );\n        pNew = sqlite3ExprDup(db, pCopy, 0);\n        if( db->mallocFailed ){\n          sqlite3ExprDelete(db, pNew);\n          return pExpr;\n        }\n        if( pSubst->isOuterJoin ){\n          ExprSetProperty(pNew, EP_CanBeNull);\n        }\n        if( pNew->op==TK_TRUEFALSE ){\n          pNew->u.iValue = sqlite3ExprTruthValue(pNew);\n          pNew->op = TK_INTEGER;\n          ExprSetProperty(pNew, EP_IntValue);\n        }\n\n        /* Ensure that the expression now has an implicit collation sequence,\n        ** just as it did when it was a column of a view or sub-query. */\n        {\n          CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pNew);\n          CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,\n                pSubst->pCList->a[iColumn].pExpr\n          );\n          if( pNat!=pColl || (pNew->op!=TK_COLUMN && pNew->op!=TK_COLLATE) ){\n            pNew = sqlite3ExprAddCollateString(pSubst->pParse, pNew,\n                (pColl ? pColl->zName : \"BINARY\")\n            );\n          }\n        }\n        ExprClearProperty(pNew, EP_Collate);\n        if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){\n          sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,\n                             pExpr->flags & (EP_OuterON|EP_InnerON));\n        }\n        sqlite3ExprDelete(db, pExpr);\n        pExpr = pNew;\n      }\n    }\n  }else{\n    if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){\n      pExpr->iTable = pSubst->iNewTable;\n    }\n    if( pExpr->op==TK_AGG_FUNCTION && pExpr->op2>=pSubst->nSelDepth ){\n      pExpr->op2--;\n    }\n    pExpr->pLeft = substExpr(pSubst, pExpr->pLeft);\n    pExpr->pRight = substExpr(pSubst, pExpr->pRight);\n    if( ExprUseXSelect(pExpr) ){\n      substSelect(pSubst, pExpr->x.pSelect, 1);\n    }else{\n      substExprList(pSubst, pExpr->x.pList);\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( ExprHasProperty(pExpr, EP_WinFunc) ){\n      Window *pWin = pExpr->y.pWin;\n      pWin->pFilter = substExpr(pSubst, pWin->pFilter);\n      substExprList(pSubst, pWin->pPartition);\n      substExprList(pSubst, pWin->pOrderBy);\n    }\n#endif\n  }\n  return pExpr;\n}\nstatic void substExprList(\n  SubstContext *pSubst, /* Description of the substitution */\n  ExprList *pList       /* List to scan and in which to make substitutes */\n){\n  int i;\n  if( pList==0 ) return;\n  for(i=0; i<pList->nExpr; i++){\n    pList->a[i].pExpr = substExpr(pSubst, pList->a[i].pExpr);\n  }\n}\nstatic void substSelect(\n  SubstContext *pSubst, /* Description of the substitution */\n  Select *p,            /* SELECT statement in which to make substitutions */\n  int doPrior           /* Do substitutes on p->pPrior too */\n){\n  SrcList *pSrc;\n  SrcItem *pItem;\n  int i;\n  if( !p ) return;\n  pSubst->nSelDepth++;\n  do{\n    substExprList(pSubst, p->pEList);\n    substExprList(pSubst, p->pGroupBy);\n    substExprList(pSubst, p->pOrderBy);\n    p->pHaving = substExpr(pSubst, p->pHaving);\n    p->pWhere = substExpr(pSubst, p->pWhere);\n    pSrc = p->pSrc;\n    assert( pSrc!=0 );\n    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){\n      if( pItem->fg.isSubquery ){\n        substSelect(pSubst, pItem->u4.pSubq->pSelect, 1);\n      }\n      if( pItem->fg.isTabFunc ){\n        substExprList(pSubst, pItem->u1.pFuncArg);\n      }\n    }\n  }while( doPrior && (p = p->pPrior)!=0 );\n  pSubst->nSelDepth--;\n}\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n/*\n** pSelect is a SELECT statement and pSrcItem is one item in the FROM\n** clause of that SELECT.\n**\n** This routine scans the entire SELECT statement and recomputes the\n** pSrcItem->colUsed mask.\n*/\nstatic int recomputeColumnsUsedExpr(Walker *pWalker, Expr *pExpr){\n  SrcItem *pItem;\n  if( pExpr->op!=TK_COLUMN ) return WRC_Continue;\n  pItem = pWalker->u.pSrcItem;\n  if( pItem->iCursor!=pExpr->iTable ) return WRC_Continue;\n  if( pExpr->iColumn<0 ) return WRC_Continue;\n  pItem->colUsed |= sqlite3ExprColUsed(pExpr);\n  return WRC_Continue;\n}\nstatic void recomputeColumnsUsed(\n  Select *pSelect,                 /* The complete SELECT statement */\n  SrcItem *pSrcItem                /* Which FROM clause item to recompute */\n){\n  Walker w;\n  if( NEVER(pSrcItem->pSTab==0) ) return;\n  memset(&w, 0, sizeof(w));\n  w.xExprCallback = recomputeColumnsUsedExpr;\n  w.xSelectCallback = sqlite3SelectWalkNoop;\n  w.u.pSrcItem = pSrcItem;\n  pSrcItem->colUsed = 0;\n  sqlite3WalkSelect(&w, pSelect);\n}\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n/*\n** Assign new cursor numbers to each of the items in pSrc. For each\n** new cursor number assigned, set an entry in the aCsrMap[] array\n** to map the old cursor number to the new:\n**\n**     aCsrMap[iOld+1] = iNew;\n**\n** The array is guaranteed by the caller to be large enough for all\n** existing cursor numbers in pSrc.  aCsrMap[0] is the array size.\n**\n** If pSrc contains any sub-selects, call this routine recursively\n** on the FROM clause of each such sub-select, with iExcept set to -1.\n*/\nstatic void srclistRenumberCursors(\n  Parse *pParse,                  /* Parse context */\n  int *aCsrMap,                   /* Array to store cursor mappings in */\n  SrcList *pSrc,                  /* FROM clause to renumber */\n  int iExcept                     /* FROM clause item to skip */\n){\n  int i;\n  SrcItem *pItem;\n  for(i=0, pItem=pSrc->a; i<pSrc->nSrc; i++, pItem++){\n    if( i!=iExcept ){\n      Select *p;\n      assert( pItem->iCursor < aCsrMap[0] );\n      if( !pItem->fg.isRecursive || aCsrMap[pItem->iCursor+1]==0 ){\n        aCsrMap[pItem->iCursor+1] = pParse->nTab++;\n      }\n      pItem->iCursor = aCsrMap[pItem->iCursor+1];\n      if( pItem->fg.isSubquery ){\n        for(p=pItem->u4.pSubq->pSelect; p; p=p->pPrior){\n          srclistRenumberCursors(pParse, aCsrMap, p->pSrc, -1);\n        }\n      }\n    }\n  }\n}\n\n/*\n** *piCursor is a cursor number.  Change it if it needs to be mapped.\n*/\nstatic void renumberCursorDoMapping(Walker *pWalker, int *piCursor){\n  int *aCsrMap = pWalker->u.aiCol;\n  int iCsr = *piCursor;\n  if( iCsr < aCsrMap[0] && aCsrMap[iCsr+1]>0 ){\n    *piCursor = aCsrMap[iCsr+1];\n  }\n}\n\n/*\n** Expression walker callback used by renumberCursors() to update\n** Expr objects to match newly assigned cursor numbers.\n*/\nstatic int renumberCursorsCb(Walker *pWalker, Expr *pExpr){\n  int op = pExpr->op;\n  if( op==TK_COLUMN || op==TK_IF_NULL_ROW ){\n    renumberCursorDoMapping(pWalker, &pExpr->iTable);\n  }\n  if( ExprHasProperty(pExpr, EP_OuterON) ){\n    renumberCursorDoMapping(pWalker, &pExpr->w.iJoin);\n  }\n  return WRC_Continue;\n}\n\n/*\n** Assign a new cursor number to each cursor in the FROM clause (Select.pSrc)\n** of the SELECT statement passed as the second argument, and to each\n** cursor in the FROM clause of any FROM clause sub-selects, recursively.\n** Except, do not assign a new cursor number to the iExcept'th element in\n** the FROM clause of (*p). Update all expressions and other references\n** to refer to the new cursor numbers.\n**\n** Argument aCsrMap is an array that may be used for temporary working\n** space. Two guarantees are made by the caller:\n**\n**   * the array is larger than the largest cursor number used within the\n**     select statement passed as an argument, and\n**\n**   * the array entries for all cursor numbers that do *not* appear in\n**     FROM clauses of the select statement as described above are\n**     initialized to zero.\n*/\nstatic void renumberCursors(\n  Parse *pParse,                  /* Parse context */\n  Select *p,                      /* Select to renumber cursors within */\n  int iExcept,                    /* FROM clause item to skip */\n  int *aCsrMap                    /* Working space */\n){\n  Walker w;\n  srclistRenumberCursors(pParse, aCsrMap, p->pSrc, iExcept);\n  memset(&w, 0, sizeof(w));\n  w.u.aiCol = aCsrMap;\n  w.xExprCallback = renumberCursorsCb;\n  w.xSelectCallback = sqlite3SelectWalkNoop;\n  sqlite3WalkSelect(&w, p);\n}\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n/*\n** If pSel is not part of a compound SELECT, return a pointer to its\n** expression list. Otherwise, return a pointer to the expression list\n** of the leftmost SELECT in the compound.\n*/\nstatic ExprList *findLeftmostExprlist(Select *pSel){\n  while( pSel->pPrior ){\n    pSel = pSel->pPrior;\n  }\n  return pSel->pEList;\n}\n\n/*\n** Return true if any of the result-set columns in the compound query\n** have incompatible affinities on one or more arms of the compound.\n*/\nstatic int compoundHasDifferentAffinities(Select *p){\n  int ii;\n  ExprList *pList;\n  assert( p!=0 );\n  assert( p->pEList!=0 );\n  assert( p->pPrior!=0 );\n  pList = p->pEList;\n  for(ii=0; ii<pList->nExpr; ii++){\n    char aff;\n    Select *pSub1;\n    assert( pList->a[ii].pExpr!=0 );\n    aff = sqlite3ExprAffinity(pList->a[ii].pExpr);\n    for(pSub1=p->pPrior; pSub1; pSub1=pSub1->pPrior){\n      assert( pSub1->pEList!=0 );\n      assert( pSub1->pEList->nExpr>ii );\n      assert( pSub1->pEList->a[ii].pExpr!=0 );\n      if( sqlite3ExprAffinity(pSub1->pEList->a[ii].pExpr)!=aff ){\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n/*\n** This routine attempts to flatten subqueries as a performance optimization.\n** This routine returns 1 if it makes changes and 0 if no flattening occurs.\n**\n** To understand the concept of flattening, consider the following\n** query:\n**\n**     SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5\n**\n** The default way of implementing this query is to execute the\n** subquery first and store the results in a temporary table, then\n** run the outer query on that temporary table.  This requires two\n** passes over the data.  Furthermore, because the temporary table\n** has no indices, the WHERE clause on the outer query cannot be\n** optimized.\n**\n** This routine attempts to rewrite queries such as the above into\n** a single flat select, like this:\n**\n**     SELECT x+y AS a FROM t1 WHERE z<100 AND a>5\n**\n** The code generated for this simplification gives the same result\n** but only has to scan the data once.  And because indices might\n** exist on the table t1, a complete scan of the data might be\n** avoided.\n**\n** Flattening is subject to the following constraints:\n**\n**  (**)  We no longer attempt to flatten aggregate subqueries. Was:\n**        The subquery and the outer query cannot both be aggregates.\n**\n**  (**)  We no longer attempt to flatten aggregate subqueries. Was:\n**        (2) If the subquery is an aggregate then\n**        (2a) the outer query must not be a join and\n**        (2b) the outer query must not use subqueries\n**             other than the one FROM-clause subquery that is a candidate\n**             for flattening.  (This is due to ticket [2f7170d73bf9abf80]\n**             from 2015-02-09.)\n**\n**   (3)  If the subquery is the right operand of a LEFT JOIN then\n**        (3a) the subquery may not be a join\n**        (**) Was (3b): \"the FROM clause of the subquery may not contain\n**             a virtual table\"\n**        (**) Was: \"The outer query may not have a GROUP BY.\" This case\n**             is now managed correctly\n**        (3d) the outer query may not be DISTINCT.\n**        See also (26) for restrictions on RIGHT JOIN.\n**\n**   (4)  The subquery can not be DISTINCT.\n**\n**  (**)  At one point restrictions (4) and (5) defined a subset of DISTINCT\n**        sub-queries that were excluded from this optimization. Restriction\n**        (4) has since been expanded to exclude all DISTINCT subqueries.\n**\n**  (**)  We no longer attempt to flatten aggregate subqueries.  Was:\n**        If the subquery is aggregate, the outer query may not be DISTINCT.\n**\n**   (7)  The subquery must have a FROM clause.  TODO:  For subqueries without\n**        A FROM clause, consider adding a FROM clause with the special\n**        table sqlite_once that consists of a single row containing a\n**        single NULL.\n**\n**   (8)  If the subquery uses LIMIT then the outer query may not be a join.\n**\n**   (9)  If the subquery uses LIMIT then the outer query may not be aggregate.\n**\n**  (**)  Restriction (10) was removed from the code on 2005-02-05 but we\n**        accidentally carried the comment forward until 2014-09-15.  Original\n**        constraint: \"If the subquery is aggregate then the outer query\n**        may not use LIMIT.\"\n**\n**  (11)  The subquery and the outer query may not both have ORDER BY clauses.\n**\n**  (**)  Not implemented.  Subsumed into restriction (3).  Was previously\n**        a separate restriction deriving from ticket #350.\n**\n**  (13)  The subquery and outer query may not both use LIMIT.\n**\n**  (14)  The subquery may not use OFFSET.\n**\n**  (15)  If the outer query is part of a compound select, then the\n**        subquery may not use LIMIT.\n**        (See ticket #2339 and ticket [02a8e81d44]).\n**\n**  (16)  If the outer query is aggregate, then the subquery may not\n**        use ORDER BY.  (Ticket #2942)  This used to not matter\n**        until we introduced the group_concat() function.\n**\n**  (17)  If the subquery is a compound select, then\n**        (17a) all compound operators must be a UNION ALL, and\n**        (17b) no terms within the subquery compound may be aggregate\n**              or DISTINCT, and\n**        (17c) every term within the subquery compound must have a FROM clause\n**        (17d) the outer query may not be\n**              (17d1) aggregate, or\n**              (17d2) DISTINCT\n**        (17e) the subquery may not contain window functions, and\n**        (17f) the subquery must not be the RHS of a LEFT JOIN.\n**        (17g) either the subquery is the first element of the outer\n**              query or there are no RIGHT or FULL JOINs in any arm\n**              of the subquery.  (This is a duplicate of condition (27b).)\n**        (17h) The corresponding result set expressions in all arms of the\n**              compound must have the same affinity.\n**\n**        The parent and sub-query may contain WHERE clauses. Subject to\n**        rules (11), (13) and (14), they may also contain ORDER BY,\n**        LIMIT and OFFSET clauses.  The subquery cannot use any compound\n**        operator other than UNION ALL because all the other compound\n**        operators have an implied DISTINCT which is disallowed by\n**        restriction (4).\n**\n**        Also, each component of the sub-query must return the same number\n**        of result columns. This is actually a requirement for any compound\n**        SELECT statement, but all the code here does is make sure that no\n**        such (illegal) sub-query is flattened. The caller will detect the\n**        syntax error and return a detailed message.\n**\n**  (18)  If the sub-query is a compound select, then all terms of the\n**        ORDER BY clause of the parent must be copies of a term returned\n**        by the parent query.\n**\n**  (19)  If the subquery uses LIMIT then the outer query may not\n**        have a WHERE clause.\n**\n**  (20)  If the sub-query is a compound select, then it must not use\n**        an ORDER BY clause.  Ticket #3773.  We could relax this constraint\n**        somewhat by saying that the terms of the ORDER BY clause must\n**        appear as unmodified result columns in the outer query.  But we\n**        have other optimizations in mind to deal with that case.\n**\n**  (21)  If the subquery uses LIMIT then the outer query may not be\n**        DISTINCT.  (See ticket [752e1646fc]).\n**\n**  (22)  The subquery may not be a recursive CTE.\n**\n**  (23)  If the outer query is a recursive CTE, then the sub-query may not be\n**        a compound query.  This restriction is because transforming the\n**        parent to a compound query confuses the code that handles\n**        recursive queries in multiSelect().\n**\n**  (**)  We no longer attempt to flatten aggregate subqueries.  Was:\n**        The subquery may not be an aggregate that uses the built-in min() or\n**        or max() functions.  (Without this restriction, a query like:\n**        \"SELECT x FROM (SELECT max(y), x FROM t1)\" would not necessarily\n**        return the value X for which Y was maximal.)\n**\n**  (25)  If either the subquery or the parent query contains a window\n**        function in the select list or ORDER BY clause, flattening\n**        is not attempted.\n**\n**  (26)  The subquery may not be the right operand of a RIGHT JOIN.\n**        See also (3) for restrictions on LEFT JOIN.\n**\n**  (27)  The subquery may not contain a FULL or RIGHT JOIN unless it\n**        is the first element of the parent query.  Two subcases:\n**        (27a) the subquery is not a compound query.\n**        (27b) the subquery is a compound query and the RIGHT JOIN occurs\n**              in any arm of the compound query.  (See also (17g).)\n**\n**  (28)  The subquery is not a MATERIALIZED CTE.  (This is handled\n**        in the caller before ever reaching this routine.)\n**\n**\n** In this routine, the \"p\" parameter is a pointer to the outer query.\n** The subquery is p->pSrc->a[iFrom].  isAgg is true if the outer query\n** uses aggregates.\n**\n** If flattening is not attempted, this routine is a no-op and returns 0.\n** If flattening is attempted this routine returns 1.\n**\n** All of the expression analysis must occur on both the outer query and\n** the subquery before this routine runs.\n*/\nstatic int flattenSubquery(\n  Parse *pParse,       /* Parsing context */\n  Select *p,           /* The parent or outer SELECT statement */\n  int iFrom,           /* Index in p->pSrc->a[] of the inner subquery */\n  int isAgg            /* True if outer SELECT uses aggregate functions */\n){\n  const char *zSavedAuthContext = pParse->zAuthContext;\n  Select *pParent;    /* Current UNION ALL term of the other query */\n  Select *pSub;       /* The inner query or \"subquery\" */\n  Select *pSub1;      /* Pointer to the rightmost select in sub-query */\n  SrcList *pSrc;      /* The FROM clause of the outer query */\n  SrcList *pSubSrc;   /* The FROM clause of the subquery */\n  int iParent;        /* VDBE cursor number of the pSub result set temp table */\n  int iNewParent = -1;/* Replacement table for iParent */\n  int isOuterJoin = 0; /* True if pSub is the right side of a LEFT JOIN */\n  int i;              /* Loop counter */\n  Expr *pWhere;                    /* The WHERE clause */\n  SrcItem *pSubitem;               /* The subquery */\n  sqlite3 *db = pParse->db;\n  Walker w;                        /* Walker to persist agginfo data */\n  int *aCsrMap = 0;\n\n  /* Check to see if flattening is permitted.  Return 0 if not.\n  */\n  assert( p!=0 );\n  assert( p->pPrior==0 );\n  if( OptimizationDisabled(db, SQLITE_QueryFlattener) ) return 0;\n  pSrc = p->pSrc;\n  assert( pSrc && iFrom>=0 && iFrom<pSrc->nSrc );\n  pSubitem = &pSrc->a[iFrom];\n  iParent = pSubitem->iCursor;\n  assert( pSubitem->fg.isSubquery );\n  pSub = pSubitem->u4.pSubq->pSelect;\n  assert( pSub!=0 );\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( p->pWin || pSub->pWin ) return 0;                  /* Restriction (25) */\n#endif\n\n  pSubSrc = pSub->pSrc;\n  assert( pSubSrc );\n  /* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants,\n  ** not arbitrary expressions, we allowed some combining of LIMIT and OFFSET\n  ** because they could be computed at compile-time.  But when LIMIT and OFFSET\n  ** became arbitrary expressions, we were forced to add restrictions (13)\n  ** and (14). */\n  if( pSub->pLimit && p->pLimit ) return 0;              /* Restriction (13) */\n  if( pSub->pLimit && pSub->pLimit->pRight ) return 0;   /* Restriction (14) */\n  if( (p->selFlags & SF_Compound)!=0 && pSub->pLimit ){\n    return 0;                                            /* Restriction (15) */\n  }\n  if( pSubSrc->nSrc==0 ) return 0;                       /* Restriction (7)  */\n  if( pSub->selFlags & SF_Distinct ) return 0;           /* Restriction (4)  */\n  if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){\n     return 0;         /* Restrictions (8)(9) */\n  }\n  if( p->pOrderBy && pSub->pOrderBy ){\n     return 0;                                           /* Restriction (11) */\n  }\n  if( isAgg && pSub->pOrderBy ) return 0;                /* Restriction (16) */\n  if( pSub->pLimit && p->pWhere ) return 0;              /* Restriction (19) */\n  if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){\n     return 0;         /* Restriction (21) */\n  }\n  if( pSub->selFlags & (SF_Recursive) ){\n    return 0; /* Restrictions (22) */\n  }\n\n  /*\n  ** If the subquery is the right operand of a LEFT JOIN, then the\n  ** subquery may not be a join itself (3a). Example of why this is not\n  ** allowed:\n  **\n  **         t1 LEFT OUTER JOIN (t2 JOIN t3)\n  **\n  ** If we flatten the above, we would get\n  **\n  **         (t1 LEFT OUTER JOIN t2) JOIN t3\n  **\n  ** which is not at all the same thing.\n  **\n  ** See also tickets #306, #350, and #3300.\n  */\n  if( (pSubitem->fg.jointype & (JT_OUTER|JT_LTORJ))!=0 ){\n    if( pSubSrc->nSrc>1                        /* (3a) */\n     /**** || IsVirtual(pSubSrc->a[0].pSTab)      (3b)-omitted */\n     || (p->selFlags & SF_Distinct)!=0         /* (3d) */\n     || (pSubitem->fg.jointype & JT_RIGHT)!=0  /* (26) */\n    ){\n      return 0;\n    }\n    isOuterJoin = 1;\n  }\n\n  assert( pSubSrc->nSrc>0 );  /* True by restriction (7) */\n  if( iFrom>0 && (pSubSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){\n    return 0;   /* Restriction (27a) */\n  }\n\n  /* Condition (28) is blocked by the caller */\n  assert( !pSubitem->fg.isCte || pSubitem->u2.pCteUse->eM10d!=M10d_Yes );\n\n  /* Restriction (17): If the sub-query is a compound SELECT, then it must\n  ** use only the UNION ALL operator. And none of the simple select queries\n  ** that make up the compound SELECT are allowed to be aggregate or distinct\n  ** queries.\n  */\n  if( pSub->pPrior ){\n    int ii;\n    if( pSub->pOrderBy ){\n      return 0;  /* Restriction (20) */\n    }\n    if( isAgg || (p->selFlags & SF_Distinct)!=0 || isOuterJoin>0 ){\n      return 0; /* (17d1), (17d2), or (17f) */\n    }\n    for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){\n      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );\n      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );\n      assert( pSub->pSrc!=0 );\n      assert( (pSub->selFlags & SF_Recursive)==0 );\n      assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );\n      if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0    /* (17b) */\n       || (pSub1->pPrior && pSub1->op!=TK_ALL)                 /* (17a) */\n       || pSub1->pSrc->nSrc<1                                  /* (17c) */\n#ifndef SQLITE_OMIT_WINDOWFUNC\n       || pSub1->pWin                                          /* (17e) */\n#endif\n      ){\n        return 0;\n      }\n      if( iFrom>0 && (pSub1->pSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){\n        /* Without this restriction, the JT_LTORJ flag would end up being\n        ** omitted on left-hand tables of the right join that is being\n        ** flattened. */\n        return 0;   /* Restrictions (17g), (27b) */\n      }\n      testcase( pSub1->pSrc->nSrc>1 );\n    }\n\n    /* Restriction (18). */\n    if( p->pOrderBy ){\n      for(ii=0; ii<p->pOrderBy->nExpr; ii++){\n        if( p->pOrderBy->a[ii].u.x.iOrderByCol==0 ) return 0;\n      }\n    }\n\n    /* Restriction (23) */\n    if( (p->selFlags & SF_Recursive) ) return 0;\n\n    /* Restriction (17h) */\n    if( compoundHasDifferentAffinities(pSub) ) return 0;\n\n    if( pSrc->nSrc>1 ){\n      if( pParse->nSelect>500 ) return 0;\n      if( OptimizationDisabled(db, SQLITE_FlttnUnionAll) ) return 0;\n      aCsrMap = sqlite3DbMallocZero(db, ((i64)pParse->nTab+1)*sizeof(int));\n      if( aCsrMap ) aCsrMap[0] = pParse->nTab;\n    }\n  }\n\n  /***** If we reach this point, flattening is permitted. *****/\n  TREETRACE(0x4,pParse,p,(\"flatten %u.%p from term %d\\n\",\n                   pSub->selId, pSub, iFrom));\n\n  /* Authorize the subquery */\n  pParse->zAuthContext = pSubitem->zName;\n  TESTONLY(i =) sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);\n  testcase( i==SQLITE_DENY );\n  pParse->zAuthContext = zSavedAuthContext;\n\n  /* Delete the transient structures associated with the subquery */\n\n  if( ALWAYS(pSubitem->fg.isSubquery) ){\n    pSub1 = sqlite3SubqueryDetach(db, pSubitem);\n  }else{\n    pSub1 = 0;\n  }\n  assert( pSubitem->fg.isSubquery==0 );\n  assert( pSubitem->fg.fixedSchema==0 );\n  sqlite3DbFree(db, pSubitem->zName);\n  sqlite3DbFree(db, pSubitem->zAlias);\n  pSubitem->zName = 0;\n  pSubitem->zAlias = 0;\n  assert( pSubitem->fg.isUsing!=0 || pSubitem->u3.pOn==0 );\n\n  /* If the sub-query is a compound SELECT statement, then (by restrictions\n  ** 17 and 18 above) it must be a UNION ALL and the parent query must\n  ** be of the form:\n  **\n  **     SELECT <expr-list> FROM (<sub-query>) <where-clause>\n  **\n  ** followed by any ORDER BY, LIMIT and/or OFFSET clauses. This block\n  ** creates N-1 copies of the parent query without any ORDER BY, LIMIT or\n  ** OFFSET clauses and joins them to the left-hand-side of the original\n  ** using UNION ALL operators. In this case N is the number of simple\n  ** select statements in the compound sub-query.\n  **\n  ** Example:\n  **\n  **     SELECT a+1 FROM (\n  **        SELECT x FROM tab\n  **        UNION ALL\n  **        SELECT y FROM tab\n  **        UNION ALL\n  **        SELECT abs(z*2) FROM tab2\n  **     ) WHERE a!=5 ORDER BY 1\n  **\n  ** Transformed into:\n  **\n  **     SELECT x+1 FROM tab WHERE x+1!=5\n  **     UNION ALL\n  **     SELECT y+1 FROM tab WHERE y+1!=5\n  **     UNION ALL\n  **     SELECT abs(z*2)+1 FROM tab2 WHERE abs(z*2)+1!=5\n  **     ORDER BY 1\n  **\n  ** We call this the \"compound-subquery flattening\".\n  */\n  for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){\n    Select *pNew;\n    ExprList *pOrderBy = p->pOrderBy;\n    Expr *pLimit = p->pLimit;\n    Select *pPrior = p->pPrior;\n    Table *pItemTab = pSubitem->pSTab;\n    pSubitem->pSTab = 0;\n    p->pOrderBy = 0;\n    p->pPrior = 0;\n    p->pLimit = 0;\n    pNew = sqlite3SelectDup(db, p, 0);\n    p->pLimit = pLimit;\n    p->pOrderBy = pOrderBy;\n    p->op = TK_ALL;\n    pSubitem->pSTab = pItemTab;\n    if( pNew==0 ){\n      p->pPrior = pPrior;\n    }else{\n      pNew->selId = ++pParse->nSelect;\n      if( aCsrMap && ALWAYS(db->mallocFailed==0) ){\n        renumberCursors(pParse, pNew, iFrom, aCsrMap);\n      }\n      pNew->pPrior = pPrior;\n      if( pPrior ) pPrior->pNext = pNew;\n      pNew->pNext = p;\n      p->pPrior = pNew;\n      TREETRACE(0x4,pParse,p,(\"compound-subquery flattener\"\n                              \" creates %u as peer\\n\",pNew->selId));\n    }\n    assert( pSubitem->fg.isSubquery==0 );\n  }\n  sqlite3DbFree(db, aCsrMap);\n  if( db->mallocFailed ){\n    assert( pSubitem->fg.fixedSchema==0 );\n    assert( pSubitem->fg.isSubquery==0 );\n    assert( pSubitem->u4.zDatabase==0 );\n    sqlite3SrcItemAttachSubquery(pParse, pSubitem, pSub1, 0);\n    return 1;\n  }\n\n  /* Defer deleting the Table object associated with the\n  ** subquery until code generation is\n  ** complete, since there may still exist Expr.pTab entries that\n  ** refer to the subquery even after flattening.  Ticket #3346.\n  **\n  ** pSubitem->pSTab is always non-NULL by test restrictions and tests above.\n  */\n  if( ALWAYS(pSubitem->pSTab!=0) ){\n    Table *pTabToDel = pSubitem->pSTab;\n    if( pTabToDel->nTabRef==1 ){\n      Parse *pToplevel = sqlite3ParseToplevel(pParse);\n      sqlite3ParserAddCleanup(pToplevel, sqlite3DeleteTableGeneric, pTabToDel);\n      testcase( pToplevel->earlyCleanup );\n    }else{\n      pTabToDel->nTabRef--;\n    }\n    pSubitem->pSTab = 0;\n  }\n\n  /* The following loop runs once for each term in a compound-subquery\n  ** flattening (as described above).  If we are doing a different kind\n  ** of flattening - a flattening other than a compound-subquery flattening -\n  ** then this loop only runs once.\n  **\n  ** This loop moves all of the FROM elements of the subquery into the\n  ** the FROM clause of the outer query.  Before doing this, remember\n  ** the cursor number for the original outer query FROM element in\n  ** iParent.  The iParent cursor will never be used.  Subsequent code\n  ** will scan expressions looking for iParent references and replace\n  ** those references with expressions that resolve to the subquery FROM\n  ** elements we are now copying in.\n  */\n  pSub = pSub1;\n  for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){\n    int nSubSrc;\n    u8 jointype = pSubitem->fg.jointype;\n    assert( pSub!=0 );\n    pSubSrc = pSub->pSrc;     /* FROM clause of subquery */\n    nSubSrc = pSubSrc->nSrc;  /* Number of terms in subquery FROM clause */\n    pSrc = pParent->pSrc;     /* FROM clause of the outer query */\n\n    /* The subquery uses a single slot of the FROM clause of the outer\n    ** query.  If the subquery has more than one element in its FROM clause,\n    ** then expand the outer query to make space for it to hold all elements\n    ** of the subquery.\n    **\n    ** Example:\n    **\n    **    SELECT * FROM tabA, (SELECT * FROM sub1, sub2), tabB;\n    **\n    ** The outer query has 3 slots in its FROM clause.  One slot of the\n    ** outer query (the middle slot) is used by the subquery.  The next\n    ** block of code will expand the outer query FROM clause to 4 slots.\n    ** The middle slot is expanded to two slots in order to make space\n    ** for the two elements in the FROM clause of the subquery.\n    */\n    if( nSubSrc>1 ){\n      pSrc = sqlite3SrcListEnlarge(pParse, pSrc, nSubSrc-1,iFrom+1);\n      if( pSrc==0 ) break;\n      pParent->pSrc = pSrc;\n      pSubitem = &pSrc->a[iFrom];\n    }\n\n    /* Transfer the FROM clause terms from the subquery into the\n    ** outer query.\n    */\n    iNewParent = pSubSrc->a[0].iCursor;\n    for(i=0; i<nSubSrc; i++){\n      SrcItem *pItem = &pSrc->a[i+iFrom];\n      assert( pItem->fg.isTabFunc==0 );\n      assert( pItem->fg.isSubquery\n           || pItem->fg.fixedSchema\n           || pItem->u4.zDatabase==0 );\n      if( pItem->fg.isUsing ) sqlite3IdListDelete(db, pItem->u3.pUsing);\n      *pItem = pSubSrc->a[i];\n      pItem->fg.jointype |= (jointype & JT_LTORJ);\n      memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));\n    }\n    pSubitem->fg.jointype |= jointype;\n\n    /* Now begin substituting subquery result set expressions for\n    ** references to the iParent in the outer query.\n    **\n    ** Example:\n    **\n    **   SELECT a+5, b*10 FROM (SELECT x*3 AS a, y+10 AS b FROM t1) WHERE a>b;\n    **   \\                     \\_____________ subquery __________/          /\n    **    \\_____________________ outer query ______________________________/\n    **\n    ** We look at every expression in the outer query and every place we see\n    ** \"a\" we substitute \"x*3\" and every place we see \"b\" we substitute \"y+10\".\n    */\n    if( pSub->pOrderBy && (pParent->selFlags & SF_NoopOrderBy)==0 ){\n      /* At this point, any non-zero iOrderByCol values indicate that the\n      ** ORDER BY column expression is identical to the iOrderByCol'th\n      ** expression returned by SELECT statement pSub. Since these values\n      ** do not necessarily correspond to columns in SELECT statement pParent,\n      ** zero them before transferring the ORDER BY clause.\n      **\n      ** Not doing this may cause an error if a subsequent call to this\n      ** function attempts to flatten a compound sub-query into pParent\n      ** (the only way this can happen is if the compound sub-query is\n      ** currently part of pSub->pSrc). See ticket [d11a6e908f].  */\n      ExprList *pOrderBy = pSub->pOrderBy;\n      for(i=0; i<pOrderBy->nExpr; i++){\n        pOrderBy->a[i].u.x.iOrderByCol = 0;\n      }\n      assert( pParent->pOrderBy==0 );\n      pParent->pOrderBy = pOrderBy;\n      pSub->pOrderBy = 0;\n    }\n    pWhere = pSub->pWhere;\n    pSub->pWhere = 0;\n    if( isOuterJoin>0 ){\n      assert( pSubSrc->nSrc==1 );\n      sqlite3SetJoinExpr(pWhere, iNewParent, EP_OuterON);\n    }\n    if( pWhere ){\n      if( pParent->pWhere ){\n        pParent->pWhere = sqlite3PExpr(pParse, TK_AND, pWhere, pParent->pWhere);\n      }else{\n        pParent->pWhere = pWhere;\n      }\n    }\n    if( db->mallocFailed==0 ){\n      SubstContext x;\n      x.pParse = pParse;\n      x.iTable = iParent;\n      x.iNewTable = iNewParent;\n      x.isOuterJoin = isOuterJoin;\n      x.nSelDepth = 0;\n      x.pEList = pSub->pEList;\n      x.pCList = findLeftmostExprlist(pSub);\n      substSelect(&x, pParent, 0);\n    }\n\n    /* The flattened query is a compound if either the inner or the\n    ** outer query is a compound. */\n    pParent->selFlags |= pSub->selFlags & SF_Compound;\n    assert( (pSub->selFlags & SF_Distinct)==0 ); /* restriction (17b) */\n\n    /*\n    ** SELECT ... FROM (SELECT ... LIMIT a OFFSET b) LIMIT x OFFSET y;\n    **\n    ** One is tempted to try to add a and b to combine the limits.  But this\n    ** does not work if either limit is negative.\n    */\n    if( pSub->pLimit ){\n      pParent->pLimit = pSub->pLimit;\n      pSub->pLimit = 0;\n    }\n\n    /* Recompute the SrcItem.colUsed masks for the flattened\n    ** tables. */\n    for(i=0; i<nSubSrc; i++){\n      recomputeColumnsUsed(pParent, &pSrc->a[i+iFrom]);\n    }\n  }\n\n  /* Finally, delete what is left of the subquery and return success.\n  */\n  sqlite3AggInfoPersistWalkerInit(&w, pParse);\n  sqlite3WalkSelect(&w,pSub1);\n  sqlite3SelectDelete(db, pSub1);\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x4 ){\n    TREETRACE(0x4,pParse,p,(\"After flattening:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n\n  return 1;\n}\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n/*\n** A structure to keep track of all of the column values that are fixed to\n** a known value due to WHERE clause constraints of the form COLUMN=VALUE.\n*/\ntypedef struct WhereConst WhereConst;\nstruct WhereConst {\n  Parse *pParse;   /* Parsing context */\n  u8 *pOomFault;   /* Pointer to pParse->db->mallocFailed */\n  int nConst;      /* Number for COLUMN=CONSTANT terms */\n  int nChng;       /* Number of times a constant is propagated */\n  int bHasAffBlob; /* At least one column in apExpr[] as affinity BLOB */\n  u32 mExcludeOn;  /* Which ON expressions to exclude from considertion.\n                   ** Either EP_OuterON or EP_InnerON|EP_OuterON */\n  Expr **apExpr;   /* [i*2] is COLUMN and [i*2+1] is VALUE */\n};\n\n/*\n** Add a new entry to the pConst object.  Except, do not add duplicate\n** pColumn entries.  Also, do not add if doing so would not be appropriate.\n**\n** The caller guarantees the pColumn is a column and pValue is a constant.\n** This routine has to do some additional checks before completing the\n** insert.\n*/\nstatic void constInsert(\n  WhereConst *pConst,  /* The WhereConst into which we are inserting */\n  Expr *pColumn,       /* The COLUMN part of the constraint */\n  Expr *pValue,        /* The VALUE part of the constraint */\n  Expr *pExpr          /* Overall expression: COLUMN=VALUE or VALUE=COLUMN */\n){\n  int i;\n  assert( pColumn->op==TK_COLUMN );\n  assert( sqlite3ExprIsConstant(pConst->pParse, pValue) );\n\n  if( ExprHasProperty(pColumn, EP_FixedCol) ) return;\n  if( sqlite3ExprAffinity(pValue)!=0 ) return;\n  if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr)) ){\n    return;\n  }\n\n  /* 2018-10-25 ticket [cf5ed20f]\n  ** Make sure the same pColumn is not inserted more than once */\n  for(i=0; i<pConst->nConst; i++){\n    const Expr *pE2 = pConst->apExpr[i*2];\n    assert( pE2->op==TK_COLUMN );\n    if( pE2->iTable==pColumn->iTable\n     && pE2->iColumn==pColumn->iColumn\n    ){\n      return;  /* Already present.  Return without doing anything. */\n    }\n  }\n  assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB );\n  if( sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){\n    pConst->bHasAffBlob = 1;\n  }\n\n  pConst->nConst++;\n  pConst->apExpr = sqlite3DbReallocOrFree(pConst->pParse->db, pConst->apExpr,\n                         pConst->nConst*2*sizeof(Expr*));\n  if( pConst->apExpr==0 ){\n    pConst->nConst = 0;\n  }else{\n    pConst->apExpr[pConst->nConst*2-2] = pColumn;\n    pConst->apExpr[pConst->nConst*2-1] = pValue;\n  }\n}\n\n/*\n** Find all terms of COLUMN=VALUE or VALUE=COLUMN in pExpr where VALUE\n** is a constant expression and where the term must be true because it\n** is part of the AND-connected terms of the expression.  For each term\n** found, add it to the pConst structure.\n*/\nstatic void findConstInWhere(WhereConst *pConst, Expr *pExpr){\n  Expr *pRight, *pLeft;\n  if( NEVER(pExpr==0) ) return;\n  if( ExprHasProperty(pExpr, pConst->mExcludeOn) ){\n    testcase( ExprHasProperty(pExpr, EP_OuterON) );\n    testcase( ExprHasProperty(pExpr, EP_InnerON) );\n    return;\n  }\n  if( pExpr->op==TK_AND ){\n    findConstInWhere(pConst, pExpr->pRight);\n    findConstInWhere(pConst, pExpr->pLeft);\n    return;\n  }\n  if( pExpr->op!=TK_EQ ) return;\n  pRight = pExpr->pRight;\n  pLeft = pExpr->pLeft;\n  assert( pRight!=0 );\n  assert( pLeft!=0 );\n  if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pLeft) ){\n    constInsert(pConst,pRight,pLeft,pExpr);\n  }\n  if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pRight) ){\n    constInsert(pConst,pLeft,pRight,pExpr);\n  }\n}\n\n/*\n** This is a helper function for Walker callback propagateConstantExprRewrite().\n**\n** Argument pExpr is a candidate expression to be replaced by a value. If\n** pExpr is equivalent to one of the columns named in pWalker->u.pConst,\n** then overwrite it with the corresponding value. Except, do not do so\n** if argument bIgnoreAffBlob is non-zero and the affinity of pExpr\n** is SQLITE_AFF_BLOB.\n*/\nstatic int propagateConstantExprRewriteOne(\n  WhereConst *pConst,\n  Expr *pExpr,\n  int bIgnoreAffBlob\n){\n  int i;\n  if( pConst->pOomFault[0] ) return WRC_Prune;\n  if( pExpr->op!=TK_COLUMN ) return WRC_Continue;\n  if( ExprHasProperty(pExpr, EP_FixedCol|pConst->mExcludeOn) ){\n    testcase( ExprHasProperty(pExpr, EP_FixedCol) );\n    testcase( ExprHasProperty(pExpr, EP_OuterON) );\n    testcase( ExprHasProperty(pExpr, EP_InnerON) );\n    return WRC_Continue;\n  }\n  for(i=0; i<pConst->nConst; i++){\n    Expr *pColumn = pConst->apExpr[i*2];\n    if( pColumn==pExpr ) continue;\n    if( pColumn->iTable!=pExpr->iTable ) continue;\n    if( pColumn->iColumn!=pExpr->iColumn ) continue;\n    assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB );\n    if( bIgnoreAffBlob && sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){\n      break;\n    }\n    /* A match is found.  Add the EP_FixedCol property */\n    pConst->nChng++;\n    ExprClearProperty(pExpr, EP_Leaf);\n    ExprSetProperty(pExpr, EP_FixedCol);\n    assert( pExpr->pLeft==0 );\n    pExpr->pLeft = sqlite3ExprDup(pConst->pParse->db, pConst->apExpr[i*2+1], 0);\n    if( pConst->pParse->db->mallocFailed ) return WRC_Prune;\n    break;\n  }\n  return WRC_Prune;\n}\n\n/*\n** This is a Walker expression callback. pExpr is a node from the WHERE\n** clause of a SELECT statement. This function examines pExpr to see if\n** any substitutions based on the contents of pWalker->u.pConst should\n** be made to pExpr or its immediate children.\n**\n** A substitution is made if:\n**\n**   + pExpr is a column with an affinity other than BLOB that matches\n**     one of the columns in pWalker->u.pConst, or\n**\n**   + pExpr is a binary comparison operator (=, <=, >=, <, >) that\n**     uses an affinity other than TEXT and one of its immediate\n**     children is a column that matches one of the columns in\n**     pWalker->u.pConst.\n*/\nstatic int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){\n  WhereConst *pConst = pWalker->u.pConst;\n  assert( TK_GT==TK_EQ+1 );\n  assert( TK_LE==TK_EQ+2 );\n  assert( TK_LT==TK_EQ+3 );\n  assert( TK_GE==TK_EQ+4 );\n  if( pConst->bHasAffBlob ){\n    if( (pExpr->op>=TK_EQ && pExpr->op<=TK_GE)\n     || pExpr->op==TK_IS\n    ){\n      propagateConstantExprRewriteOne(pConst, pExpr->pLeft, 0);\n      if( pConst->pOomFault[0] ) return WRC_Prune;\n      if( sqlite3ExprAffinity(pExpr->pLeft)!=SQLITE_AFF_TEXT ){\n        propagateConstantExprRewriteOne(pConst, pExpr->pRight, 0);\n      }\n    }\n  }\n  return propagateConstantExprRewriteOne(pConst, pExpr, pConst->bHasAffBlob);\n}\n\n/*\n** The WHERE-clause constant propagation optimization.\n**\n** If the WHERE clause contains terms of the form COLUMN=CONSTANT or\n** CONSTANT=COLUMN that are top-level AND-connected terms that are not\n** part of a ON clause from a LEFT JOIN, then throughout the query\n** replace all other occurrences of COLUMN with CONSTANT.\n**\n** For example, the query:\n**\n**      SELECT * FROM t1, t2, t3 WHERE t1.a=39 AND t2.b=t1.a AND t3.c=t2.b\n**\n** Is transformed into\n**\n**      SELECT * FROM t1, t2, t3 WHERE t1.a=39 AND t2.b=39 AND t3.c=39\n**\n** Return true if any transformations where made and false if not.\n**\n** Implementation note:  Constant propagation is tricky due to affinity\n** and collating sequence interactions.  Consider this example:\n**\n**    CREATE TABLE t1(a INT,b TEXT);\n**    INSERT INTO t1 VALUES(123,'0123');\n**    SELECT * FROM t1 WHERE a=123 AND b=a;\n**    SELECT * FROM t1 WHERE a=123 AND b=123;\n**\n** The two SELECT statements above should return different answers.  b=a\n** is always true because the comparison uses numeric affinity, but b=123\n** is false because it uses text affinity and '0123' is not the same as '123'.\n** To work around this, the expression tree is not actually changed from\n** \"b=a\" to \"b=123\" but rather the \"a\" in \"b=a\" is tagged with EP_FixedCol\n** and the \"123\" value is hung off of the pLeft pointer.  Code generator\n** routines know to generate the constant \"123\" instead of looking up the\n** column value.  Also, to avoid collation problems, this optimization is\n** only attempted if the \"a=123\" term uses the default BINARY collation.\n**\n** 2021-05-25 forum post 6a06202608: Another troublesome case is...\n**\n**    CREATE TABLE t1(x);\n**    INSERT INTO t1 VALUES(10.0);\n**    SELECT 1 FROM t1 WHERE x=10 AND x LIKE 10;\n**\n** The query should return no rows, because the t1.x value is '10.0' not '10'\n** and '10.0' is not LIKE '10'.  But if we are not careful, the first WHERE\n** term \"x=10\" will cause the second WHERE term to become \"10 LIKE 10\",\n** resulting in a false positive.  To avoid this, constant propagation for\n** columns with BLOB affinity is only allowed if the constant is used with\n** operators ==, <=, <, >=, >, or IS in a way that will cause the correct\n** type conversions to occur.  See logic associated with the bHasAffBlob flag\n** for details.\n*/\nstatic int propagateConstants(\n  Parse *pParse,   /* The parsing context */\n  Select *p        /* The query in which to propagate constants */\n){\n  WhereConst x;\n  Walker w;\n  int nChng = 0;\n  x.pParse = pParse;\n  x.pOomFault = &pParse->db->mallocFailed;\n  do{\n    x.nConst = 0;\n    x.nChng = 0;\n    x.apExpr = 0;\n    x.bHasAffBlob = 0;\n    if( ALWAYS(p->pSrc!=0)\n     && p->pSrc->nSrc>0\n     && (p->pSrc->a[0].fg.jointype & JT_LTORJ)!=0\n    ){\n      /* Do not propagate constants on any ON clause if there is a\n      ** RIGHT JOIN anywhere in the query */\n      x.mExcludeOn = EP_InnerON | EP_OuterON;\n    }else{\n      /* Do not propagate constants through the ON clause of a LEFT JOIN */\n      x.mExcludeOn = EP_OuterON;\n    }\n    findConstInWhere(&x, p->pWhere);\n    if( x.nConst ){\n      memset(&w, 0, sizeof(w));\n      w.pParse = pParse;\n      w.xExprCallback = propagateConstantExprRewrite;\n      w.xSelectCallback = sqlite3SelectWalkNoop;\n      w.xSelectCallback2 = 0;\n      w.walkerDepth = 0;\n      w.u.pConst = &x;\n      sqlite3WalkExpr(&w, p->pWhere);\n      sqlite3DbFree(x.pParse->db, x.apExpr);\n      nChng += x.nChng;\n    }\n  }while( x.nChng );\n  return nChng;\n}\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n# if !defined(SQLITE_OMIT_WINDOWFUNC)\n/*\n** This function is called to determine whether or not it is safe to\n** push WHERE clause expression pExpr down to FROM clause sub-query\n** pSubq, which contains at least one window function. Return 1\n** if it is safe and the expression should be pushed down, or 0\n** otherwise.\n**\n** It is only safe to push the expression down if it consists only\n** of constants and copies of expressions that appear in the PARTITION\n** BY clause of all window function used by the sub-query. It is safe\n** to filter out entire partitions, but not rows within partitions, as\n** this may change the results of the window functions.\n**\n** At the time this function is called it is guaranteed that\n**\n**   * the sub-query uses only one distinct window frame, and\n**   * that the window frame has a PARTITION BY clause.\n*/\nstatic int pushDownWindowCheck(Parse *pParse, Select *pSubq, Expr *pExpr){\n  assert( pSubq->pWin->pPartition );\n  assert( (pSubq->selFlags & SF_MultiPart)==0 );\n  assert( pSubq->pPrior==0 );\n  return sqlite3ExprIsConstantOrGroupBy(pParse, pExpr, pSubq->pWin->pPartition);\n}\n# endif /* SQLITE_OMIT_WINDOWFUNC */\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n/*\n** Make copies of relevant WHERE clause terms of the outer query into\n** the WHERE clause of subquery.  Example:\n**\n**    SELECT * FROM (SELECT a AS x, c-d AS y FROM t1) WHERE x=5 AND y=10;\n**\n** Transformed into:\n**\n**    SELECT * FROM (SELECT a AS x, c-d AS y FROM t1 WHERE a=5 AND c-d=10)\n**     WHERE x=5 AND y=10;\n**\n** The hope is that the terms added to the inner query will make it more\n** efficient.\n**\n** NAME AMBIGUITY\n**\n** This optimization is called the \"WHERE-clause push-down optimization\"\n** or sometimes the \"predicate push-down optimization\".\n**\n** Do not confuse this optimization with another unrelated optimization\n** with a similar name:  The \"MySQL push-down optimization\" causes WHERE\n** clause terms that can be evaluated using only the index and without\n** reference to the table are run first, so that if they are false,\n** unnecessary table seeks are avoided.\n**\n** RULES\n**\n** Do not attempt this optimization if:\n**\n**   (1) (** This restriction was removed on 2017-09-29.  We used to\n**           disallow this optimization for aggregate subqueries, but now\n**           it is allowed by putting the extra terms on the HAVING clause.\n**           The added HAVING clause is pointless if the subquery lacks\n**           a GROUP BY clause.  But such a HAVING clause is also harmless\n**           so there does not appear to be any reason to add extra logic\n**           to suppress it. **)\n**\n**   (2) The inner query is the recursive part of a common table expression.\n**\n**   (3) The inner query has a LIMIT clause (since the changes to the WHERE\n**       clause would change the meaning of the LIMIT).\n**\n**   (4) The inner query is the right operand of a LEFT JOIN and the\n**       expression to be pushed down does not come from the ON clause\n**       on that LEFT JOIN.\n**\n**   (5) The WHERE clause expression originates in the ON or USING clause\n**       of a LEFT JOIN where iCursor is not the right-hand table of that\n**       left join.  An example:\n**\n**           SELECT *\n**           FROM (SELECT 1 AS a1 UNION ALL SELECT 2) AS aa\n**           JOIN (SELECT 1 AS b2 UNION ALL SELECT 2) AS bb ON (a1=b2)\n**           LEFT JOIN (SELECT 8 AS c3 UNION ALL SELECT 9) AS cc ON (b2=2);\n**\n**       The correct answer is three rows:  (1,1,NULL),(2,2,8),(2,2,9).\n**       But if the (b2=2) term were to be pushed down into the bb subquery,\n**       then the (1,1,NULL) row would be suppressed.\n**\n**   (6) Window functions make things tricky as changes to the WHERE clause\n**       of the inner query could change the window over which window\n**       functions are calculated. Therefore, do not attempt the optimization\n**       if:\n**\n**     (6a) The inner query uses multiple incompatible window partitions.\n**\n**     (6b) The inner query is a compound and uses window-functions.\n**\n**     (6c) The WHERE clause does not consist entirely of constants and\n**          copies of expressions found in the PARTITION BY clause of\n**          all window-functions used by the sub-query. It is safe to\n**          filter out entire partitions, as this does not change the\n**          window over which any window-function is calculated.\n**\n**   (7) The inner query is a Common Table Expression (CTE) that should\n**       be materialized.  (This restriction is implemented in the calling\n**       routine.)\n**\n**   (8) If the subquery is a compound that uses UNION, INTERSECT,\n**       or EXCEPT, then all of the result set columns for all arms of\n**       the compound must use the BINARY collating sequence.\n**\n**   (9) All three of the following are true:\n**\n**       (9a) The WHERE clause expression originates in the ON or USING clause\n**            of a join (either an INNER or an OUTER join), and\n**\n**       (9b) The subquery is to the right of the ON/USING clause\n**\n**       (9c) There is a RIGHT JOIN (or FULL JOIN) in between the ON/USING\n**            clause and the subquery.\n**\n**       Without this restriction, the WHERE-clause push-down optimization\n**       might move the ON/USING filter expression from the left side of a\n**       RIGHT JOIN over to the right side, which leads to incorrect answers.\n**       See also restriction (6) in sqlite3ExprIsSingleTableConstraint().\n**\n**  (10) The inner query is not the right-hand table of a RIGHT JOIN.\n**\n**  (11) The subquery is not a VALUES clause\n**\n**  (12) The WHERE clause is not \"rowid ISNULL\" or the equivalent.  This\n**       case only comes up if SQLite is compiled using\n**       SQLITE_ALLOW_ROWID_IN_VIEW.\n**\n** Return 0 if no changes are made and non-zero if one or more WHERE clause\n** terms are duplicated into the subquery.\n*/\nstatic int pushDownWhereTerms(\n  Parse *pParse,        /* Parse context (for malloc() and error reporting) */\n  Select *pSubq,        /* The subquery whose WHERE clause is to be augmented */\n  Expr *pWhere,         /* The WHERE clause of the outer query */\n  SrcList *pSrcList,    /* The complete from clause of the outer query */\n  int iSrc              /* Which FROM clause term to try to push into  */\n){\n  Expr *pNew;\n  SrcItem *pSrc;        /* The subquery FROM term into which WHERE is pushed */\n  int nChng = 0;\n  pSrc = &pSrcList->a[iSrc];\n  if( pWhere==0 ) return 0;\n  if( pSubq->selFlags & (SF_Recursive|SF_MultiPart) ){\n    return 0;           /* restrictions (2) and (11) */\n  }\n  if( pSrc->fg.jointype & (JT_LTORJ|JT_RIGHT) ){\n    return 0;           /* restrictions (10) */\n  }\n\n  if( pSubq->pPrior ){\n    Select *pSel;\n    int notUnionAll = 0;\n    for(pSel=pSubq; pSel; pSel=pSel->pPrior){\n      u8 op = pSel->op;\n      assert( op==TK_ALL || op==TK_SELECT\n           || op==TK_UNION || op==TK_INTERSECT || op==TK_EXCEPT );\n      if( op!=TK_ALL && op!=TK_SELECT ){\n        notUnionAll = 1;\n      }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( pSel->pWin ) return 0;    /* restriction (6b) */\n#endif\n    }\n    if( notUnionAll ){\n      /* If any of the compound arms are connected using UNION, INTERSECT,\n      ** or EXCEPT, then we must ensure that none of the columns use a\n      ** non-BINARY collating sequence. */\n      for(pSel=pSubq; pSel; pSel=pSel->pPrior){\n        int ii;\n        const ExprList *pList = pSel->pEList;\n        assert( pList!=0 );\n        for(ii=0; ii<pList->nExpr; ii++){\n          CollSeq *pColl = sqlite3ExprCollSeq(pParse, pList->a[ii].pExpr);\n          if( !sqlite3IsBinary(pColl) ){\n            return 0;  /* Restriction (8) */\n          }\n        }\n      }\n    }\n  }else{\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( pSubq->pWin && pSubq->pWin->pPartition==0 ) return 0;\n#endif\n  }\n\n#ifdef SQLITE_DEBUG\n  /* Only the first term of a compound can have a WITH clause.  But make\n  ** sure no other terms are marked SF_Recursive in case something changes\n  ** in the future.\n  */\n  {\n    Select *pX;\n    for(pX=pSubq; pX; pX=pX->pPrior){\n      assert( (pX->selFlags & (SF_Recursive))==0 );\n    }\n  }\n#endif\n\n  if( pSubq->pLimit!=0 ){\n    return 0; /* restriction (3) */\n  }\n  while( pWhere->op==TK_AND ){\n    nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrcList, iSrc);\n    pWhere = pWhere->pLeft;\n  }\n\n#if 0 /* These checks now done by sqlite3ExprIsSingleTableConstraint() */\n  if( ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) /* (9a) */\n   && (pSrcList->a[0].fg.jointype & JT_LTORJ)!=0     /* Fast pre-test of (9c) */\n  ){\n    int jj;\n    for(jj=0; jj<iSrc; jj++){\n      if( pWhere->w.iJoin==pSrcList->a[jj].iCursor ){\n        /* If we reach this point, both (9a) and (9b) are satisfied.\n        ** The following loop checks (9c):\n        */\n        for(jj++; jj<iSrc; jj++){\n          if( (pSrcList->a[jj].fg.jointype & JT_RIGHT)!=0 ){\n            return 0;  /* restriction (9) */\n          }\n        }\n      }\n    }\n  }\n  if( isLeftJoin\n   && (ExprHasProperty(pWhere,EP_OuterON)==0\n         || pWhere->w.iJoin!=iCursor)\n  ){\n    return 0; /* restriction (4) */\n  }\n  if( ExprHasProperty(pWhere,EP_OuterON)\n   && pWhere->w.iJoin!=iCursor\n  ){\n    return 0; /* restriction (5) */\n  }\n#endif\n\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n  if( ViewCanHaveRowid && (pWhere->op==TK_ISNULL || pWhere->op==TK_NOTNULL) ){\n    Expr *pLeft = pWhere->pLeft;\n    if( ALWAYS(pLeft)\n     && pLeft->op==TK_COLUMN\n     && pLeft->iColumn < 0\n    ){\n      return 0;  /* Restriction (12) */\n    }\n  }\n#endif\n\n  if( sqlite3ExprIsSingleTableConstraint(pWhere, pSrcList, iSrc, 1) ){\n    nChng++;\n    pSubq->selFlags |= SF_PushDown;\n    while( pSubq ){\n      SubstContext x;\n      pNew = sqlite3ExprDup(pParse->db, pWhere, 0);\n      unsetJoinExpr(pNew, -1, 1);\n      x.pParse = pParse;\n      x.iTable = pSrc->iCursor;\n      x.iNewTable = pSrc->iCursor;\n      x.isOuterJoin = 0;\n      x.nSelDepth = 0;\n      x.pEList = pSubq->pEList;\n      x.pCList = findLeftmostExprlist(pSubq);\n      pNew = substExpr(&x, pNew);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      if( pSubq->pWin && 0==pushDownWindowCheck(pParse, pSubq, pNew) ){\n        /* Restriction 6c has prevented push-down in this case */\n        sqlite3ExprDelete(pParse->db, pNew);\n        nChng--;\n        break;\n      }\n#endif\n      if( pSubq->selFlags & SF_Aggregate ){\n        pSubq->pHaving = sqlite3ExprAnd(pParse, pSubq->pHaving, pNew);\n      }else{\n        pSubq->pWhere = sqlite3ExprAnd(pParse, pSubq->pWhere, pNew);\n      }\n      pSubq = pSubq->pPrior;\n    }\n  }\n  return nChng;\n}\n#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */\n\n/*\n** Check to see if a subquery contains result-set columns that are\n** never used.  If it does, change the value of those result-set columns\n** to NULL so that they do not cause unnecessary work to compute.\n**\n** Return the number of column that were changed to NULL.\n*/\nstatic int disableUnusedSubqueryResultColumns(SrcItem *pItem){\n  int nCol;\n  Select *pSub;      /* The subquery to be simplified */\n  Select *pX;        /* For looping over compound elements of pSub */\n  Table *pTab;       /* The table that describes the subquery */\n  int j;             /* Column number */\n  int nChng = 0;     /* Number of columns converted to NULL */\n  Bitmask colUsed;   /* Columns that may not be NULLed out */\n\n  assert( pItem!=0 );\n  if( pItem->fg.isCorrelated || pItem->fg.isCte ){\n    return 0;\n  }\n  assert( pItem->pSTab!=0 );\n  pTab = pItem->pSTab;\n  assert( pItem->fg.isSubquery );\n  pSub = pItem->u4.pSubq->pSelect;\n  assert( pSub->pEList->nExpr==pTab->nCol );\n  for(pX=pSub; pX; pX=pX->pPrior){\n    if( (pX->selFlags & (SF_Distinct|SF_Aggregate))!=0 ){\n      testcase( pX->selFlags & SF_Distinct );\n      testcase( pX->selFlags & SF_Aggregate );\n      return 0;\n    }\n    if( pX->pPrior && pX->op!=TK_ALL ){\n      /* This optimization does not work for compound subqueries that\n      ** use UNION, INTERSECT, or EXCEPT.  Only UNION ALL is allowed. */\n      return 0;\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( pX->pWin ){\n      /* This optimization does not work for subqueries that use window\n      ** functions. */\n      return 0;\n    }\n#endif\n  }\n  colUsed = pItem->colUsed;\n  if( pSub->pOrderBy ){\n    ExprList *pList = pSub->pOrderBy;\n    for(j=0; j<pList->nExpr; j++){\n      u16 iCol = pList->a[j].u.x.iOrderByCol;\n      if( iCol>0 ){\n        iCol--;\n        colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);\n      }\n    }\n  }\n  nCol = pTab->nCol;\n  for(j=0; j<nCol; j++){\n    Bitmask m = j<BMS-1 ? MASKBIT(j) : TOPBIT;\n    if( (m & colUsed)!=0 ) continue;\n    for(pX=pSub; pX; pX=pX->pPrior) {\n      Expr *pY = pX->pEList->a[j].pExpr;\n      if( pY->op==TK_NULL ) continue;\n      pY->op = TK_NULL;\n      ExprClearProperty(pY, EP_Skip|EP_Unlikely);\n      pX->selFlags |= SF_PushDown;\n      nChng++;\n    }\n  }\n  return nChng;\n}\n\n\n/*\n** The pFunc is the only aggregate function in the query.  Check to see\n** if the query is a candidate for the min/max optimization.\n**\n** If the query is a candidate for the min/max optimization, then set\n** *ppMinMax to be an ORDER BY clause to be used for the optimization\n** and return either WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX depending on\n** whether pFunc is a min() or max() function.\n**\n** If the query is not a candidate for the min/max optimization, return\n** WHERE_ORDERBY_NORMAL (which must be zero).\n**\n** This routine must be called after aggregate functions have been\n** located but before their arguments have been subjected to aggregate\n** analysis.\n*/\nstatic u8 minMaxQuery(sqlite3 *db, Expr *pFunc, ExprList **ppMinMax){\n  int eRet = WHERE_ORDERBY_NORMAL;      /* Return value */\n  ExprList *pEList;                     /* Arguments to agg function */\n  const char *zFunc;                    /* Name of aggregate function pFunc */\n  ExprList *pOrderBy;\n  u8 sortFlags = 0;\n\n  assert( *ppMinMax==0 );\n  assert( pFunc->op==TK_AGG_FUNCTION );\n  assert( !IsWindowFunc(pFunc) );\n  assert( ExprUseXList(pFunc) );\n  pEList = pFunc->x.pList;\n  if( pEList==0\n   || pEList->nExpr!=1\n   || ExprHasProperty(pFunc, EP_WinFunc)\n   || OptimizationDisabled(db, SQLITE_MinMaxOpt)\n  ){\n    return eRet;\n  }\n  assert( !ExprHasProperty(pFunc, EP_IntValue) );\n  zFunc = pFunc->u.zToken;\n  if( sqlite3StrICmp(zFunc, \"min\")==0 ){\n    eRet = WHERE_ORDERBY_MIN;\n    if( sqlite3ExprCanBeNull(pEList->a[0].pExpr) ){\n      sortFlags = KEYINFO_ORDER_BIGNULL;\n    }\n  }else if( sqlite3StrICmp(zFunc, \"max\")==0 ){\n    eRet = WHERE_ORDERBY_MAX;\n    sortFlags = KEYINFO_ORDER_DESC;\n  }else{\n    return eRet;\n  }\n  *ppMinMax = pOrderBy = sqlite3ExprListDup(db, pEList, 0);\n  assert( pOrderBy!=0 || db->mallocFailed );\n  if( pOrderBy ) pOrderBy->a[0].fg.sortFlags = sortFlags;\n  return eRet;\n}\n\n/*\n** The select statement passed as the first argument is an aggregate query.\n** The second argument is the associated aggregate-info object. This\n** function tests if the SELECT is of the form:\n**\n**   SELECT count(*) FROM <tbl>\n**\n** where table is a database table, not a sub-select or view. If the query\n** does match this pattern, then a pointer to the Table object representing\n** <tbl> is returned. Otherwise, NULL is returned.\n**\n** This routine checks to see if it is safe to use the count optimization.\n** A correct answer is still obtained (though perhaps more slowly) if\n** this routine returns NULL when it could have returned a table pointer.\n** But returning the pointer when NULL should have been returned can\n** result in incorrect answers and/or crashes.  So, when in doubt, return NULL.\n*/\nstatic Table *isSimpleCount(Select *p, AggInfo *pAggInfo){\n  Table *pTab;\n  Expr *pExpr;\n\n  assert( !p->pGroupBy );\n\n  if( p->pWhere\n   || p->pEList->nExpr!=1\n   || p->pSrc->nSrc!=1\n   || p->pSrc->a[0].fg.isSubquery\n   || pAggInfo->nFunc!=1\n   || p->pHaving\n  ){\n    return 0;\n  }\n  pTab = p->pSrc->a[0].pSTab;\n  assert( pTab!=0 );\n  assert( !IsView(pTab) );\n  if( !IsOrdinaryTable(pTab) ) return 0;\n  pExpr = p->pEList->a[0].pExpr;\n  assert( pExpr!=0 );\n  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;\n  if( pExpr->pAggInfo!=pAggInfo ) return 0;\n  if( (pAggInfo->aFunc[0].pFunc->funcFlags&SQLITE_FUNC_COUNT)==0 ) return 0;\n  assert( pAggInfo->aFunc[0].pFExpr==pExpr );\n  testcase( ExprHasProperty(pExpr, EP_Distinct) );\n  testcase( ExprHasProperty(pExpr, EP_WinFunc) );\n  if( ExprHasProperty(pExpr, EP_Distinct|EP_WinFunc) ) return 0;\n\n  return pTab;\n}\n\n/*\n** If the source-list item passed as an argument was augmented with an\n** INDEXED BY clause, then try to locate the specified index. If there\n** was such a clause and the named index cannot be found, return\n** SQLITE_ERROR and leave an error in pParse. Otherwise, populate\n** pFrom->pIndex and return SQLITE_OK.\n*/\nSQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, SrcItem *pFrom){\n  Table *pTab = pFrom->pSTab;\n  char *zIndexedBy = pFrom->u1.zIndexedBy;\n  Index *pIdx;\n  assert( pTab!=0 );\n  assert( pFrom->fg.isIndexedBy!=0 );\n\n  for(pIdx=pTab->pIndex;\n      pIdx && sqlite3StrICmp(pIdx->zName, zIndexedBy);\n      pIdx=pIdx->pNext\n  );\n  if( !pIdx ){\n    sqlite3ErrorMsg(pParse, \"no such index: %s\", zIndexedBy, 0);\n    pParse->checkSchema = 1;\n    return SQLITE_ERROR;\n  }\n  assert( pFrom->fg.isCte==0 );\n  pFrom->u2.pIBIndex = pIdx;\n  return SQLITE_OK;\n}\n\n/*\n** Detect compound SELECT statements that use an ORDER BY clause with\n** an alternative collating sequence.\n**\n**    SELECT ... FROM t1 EXCEPT SELECT ... FROM t2 ORDER BY .. COLLATE ...\n**\n** These are rewritten as a subquery:\n**\n**    SELECT * FROM (SELECT ... FROM t1 EXCEPT SELECT ... FROM t2)\n**     ORDER BY ... COLLATE ...\n**\n** This transformation is necessary because the multiSelectOrderBy() routine\n** above that generates the code for a compound SELECT with an ORDER BY clause\n** uses a merge algorithm that requires the same collating sequence on the\n** result columns as on the ORDER BY clause.  See ticket\n** http://sqlite.org/src/info/6709574d2a\n**\n** This transformation is only needed for EXCEPT, INTERSECT, and UNION.\n** The UNION ALL operator works fine with multiSelectOrderBy() even when\n** there are COLLATE terms in the ORDER BY.\n*/\nstatic int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){\n  int i;\n  Select *pNew;\n  Select *pX;\n  sqlite3 *db;\n  struct ExprList_item *a;\n  SrcList *pNewSrc;\n  Parse *pParse;\n  Token dummy;\n\n  if( p->pPrior==0 ) return WRC_Continue;\n  if( p->pOrderBy==0 ) return WRC_Continue;\n  for(pX=p; pX && (pX->op==TK_ALL || pX->op==TK_SELECT); pX=pX->pPrior){}\n  if( pX==0 ) return WRC_Continue;\n  a = p->pOrderBy->a;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  /* If iOrderByCol is already non-zero, then it has already been matched\n  ** to a result column of the SELECT statement. This occurs when the\n  ** SELECT is rewritten for window-functions processing and then passed\n  ** to sqlite3SelectPrep() and similar a second time. The rewriting done\n  ** by this function is not required in this case. */\n  if( a[0].u.x.iOrderByCol ) return WRC_Continue;\n#endif\n  for(i=p->pOrderBy->nExpr-1; i>=0; i--){\n    if( a[i].pExpr->flags & EP_Collate ) break;\n  }\n  if( i<0 ) return WRC_Continue;\n\n  /* If we reach this point, that means the transformation is required. */\n\n  pParse = pWalker->pParse;\n  db = pParse->db;\n  pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );\n  if( pNew==0 ) return WRC_Abort;\n  memset(&dummy, 0, sizeof(dummy));\n  pNewSrc = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&dummy,pNew,0);\n  assert( pNewSrc!=0 || pParse->nErr );\n  if( pParse->nErr ){\n    sqlite3SrcListDelete(db, pNewSrc);\n    return WRC_Abort;\n  }\n  *pNew = *p;\n  p->pSrc = pNewSrc;\n  p->pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ASTERISK, 0));\n  p->op = TK_SELECT;\n  p->pWhere = 0;\n  pNew->pGroupBy = 0;\n  pNew->pHaving = 0;\n  pNew->pOrderBy = 0;\n  p->pPrior = 0;\n  p->pNext = 0;\n  p->pWith = 0;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  p->pWinDefn = 0;\n#endif\n  p->selFlags &= ~(u32)SF_Compound;\n  assert( (p->selFlags & SF_Converted)==0 );\n  p->selFlags |= SF_Converted;\n  assert( pNew->pPrior!=0 );\n  pNew->pPrior->pNext = pNew;\n  pNew->pLimit = 0;\n  return WRC_Continue;\n}\n\n/*\n** Check to see if the FROM clause term pFrom has table-valued function\n** arguments.  If it does, leave an error message in pParse and return\n** non-zero, since pFrom is not allowed to be a table-valued function.\n*/\nstatic int cannotBeFunction(Parse *pParse, SrcItem *pFrom){\n  if( pFrom->fg.isTabFunc ){\n    sqlite3ErrorMsg(pParse, \"'%s' is not a function\", pFrom->zName);\n    return 1;\n  }\n  return 0;\n}\n\n#ifndef SQLITE_OMIT_CTE\n/*\n** Argument pWith (which may be NULL) points to a linked list of nested\n** WITH contexts, from inner to outermost. If the table identified by\n** FROM clause element pItem is really a common-table-expression (CTE)\n** then return a pointer to the CTE definition for that table. Otherwise\n** return NULL.\n**\n** If a non-NULL value is returned, set *ppContext to point to the With\n** object that the returned CTE belongs to.\n*/\nstatic struct Cte *searchWith(\n  With *pWith,                    /* Current innermost WITH clause */\n  SrcItem *pItem,                 /* FROM clause element to resolve */\n  With **ppContext                /* OUT: WITH clause return value belongs to */\n){\n  const char *zName = pItem->zName;\n  With *p;\n  assert( pItem->fg.fixedSchema || pItem->u4.zDatabase==0 );\n  assert( zName!=0 );\n  for(p=pWith; p; p=p->pOuter){\n    int i;\n    for(i=0; i<p->nCte; i++){\n      if( sqlite3StrICmp(zName, p->a[i].zName)==0 ){\n        *ppContext = p;\n        return &p->a[i];\n      }\n    }\n    if( p->bView ) break;\n  }\n  return 0;\n}\n\n/* The code generator maintains a stack of active WITH clauses\n** with the inner-most WITH clause being at the top of the stack.\n**\n** This routine pushes the WITH clause passed as the second argument\n** onto the top of the stack. If argument bFree is true, then this\n** WITH clause will never be popped from the stack but should instead\n** be freed along with the Parse object. In other cases, when\n** bFree==0, the With object will be freed along with the SELECT\n** statement with which it is associated.\n**\n** This routine returns a copy of pWith.  Or, if bFree is true and\n** the pWith object is destroyed immediately due to an OOM condition,\n** then this routine return NULL.\n**\n** If bFree is true, do not continue to use the pWith pointer after\n** calling this routine,  Instead, use only the return value.\n*/\nSQLITE_PRIVATE With *sqlite3WithPush(Parse *pParse, With *pWith, u8 bFree){\n  if( pWith ){\n    if( bFree ){\n      pWith = (With*)sqlite3ParserAddCleanup(pParse, sqlite3WithDeleteGeneric,\n                      pWith);\n      if( pWith==0 ) return 0;\n    }\n    if( pParse->nErr==0 ){\n      assert( pParse->pWith!=pWith );\n      pWith->pOuter = pParse->pWith;\n      pParse->pWith = pWith;\n    }\n  }\n  return pWith;\n}\n\n/*\n** This function checks if argument pFrom refers to a CTE declared by\n** a WITH clause on the stack currently maintained by the parser (on the\n** pParse->pWith linked list).  And if currently processing a CTE\n** CTE expression, through routine checks to see if the reference is\n** a recursive reference to the CTE.\n**\n** If pFrom matches a CTE according to either of these two above, pFrom->pSTab\n** and other fields are populated accordingly.\n**\n** Return 0 if no match is found.\n** Return 1 if a match is found.\n** Return 2 if an error condition is detected.\n*/\nstatic int resolveFromTermToCte(\n  Parse *pParse,                  /* The parsing context */\n  Walker *pWalker,                /* Current tree walker */\n  SrcItem *pFrom                  /* The FROM clause term to check */\n){\n  Cte *pCte;               /* Matched CTE (or NULL if no match) */\n  With *pWith;             /* The matching WITH */\n\n  assert( pFrom->pSTab==0 );\n  if( pParse->pWith==0 ){\n    /* There are no WITH clauses in the stack.  No match is possible */\n    return 0;\n  }\n  if( pParse->nErr ){\n    /* Prior errors might have left pParse->pWith in a goofy state, so\n    ** go no further. */\n    return 0;\n  }\n  assert( pFrom->fg.hadSchema==0 || pFrom->fg.notCte!=0 );\n  if( pFrom->fg.fixedSchema==0 && pFrom->u4.zDatabase!=0 ){\n    /* The FROM term contains a schema qualifier (ex: main.t1) and so\n    ** it cannot possibly be a CTE reference. */\n    return 0;\n  }\n  if( pFrom->fg.notCte ){\n    /* The FROM term is specifically excluded from matching a CTE.\n    **   (1)  It is part of a trigger that used to have zDatabase but had\n    **        zDatabase removed by sqlite3FixTriggerStep().\n    **   (2)  This is the first term in the FROM clause of an UPDATE.\n    */\n    return 0;\n  }\n  pCte = searchWith(pParse->pWith, pFrom, &pWith);\n  if( pCte ){\n    sqlite3 *db = pParse->db;\n    Table *pTab;\n    ExprList *pEList;\n    Select *pSel;\n    Select *pLeft;                /* Left-most SELECT statement */\n    Select *pRecTerm;             /* Left-most recursive term */\n    int bMayRecursive;            /* True if compound joined by UNION [ALL] */\n    With *pSavedWith;             /* Initial value of pParse->pWith */\n    int iRecTab = -1;             /* Cursor for recursive table */\n    CteUse *pCteUse;\n\n    /* If pCte->zCteErr is non-NULL at this point, then this is an illegal\n    ** recursive reference to CTE pCte. Leave an error in pParse and return\n    ** early. If pCte->zCteErr is NULL, then this is not a recursive reference.\n    ** In this case, proceed.  */\n    if( pCte->zCteErr ){\n      sqlite3ErrorMsg(pParse, pCte->zCteErr, pCte->zName);\n      return 2;\n    }\n    if( cannotBeFunction(pParse, pFrom) ) return 2;\n\n    assert( pFrom->pSTab==0 );\n    pTab = sqlite3DbMallocZero(db, sizeof(Table));\n    if( pTab==0 ) return 2;\n    pCteUse = pCte->pUse;\n    if( pCteUse==0 ){\n      pCte->pUse = pCteUse = sqlite3DbMallocZero(db, sizeof(pCteUse[0]));\n      if( pCteUse==0\n       || sqlite3ParserAddCleanup(pParse,sqlite3DbFree,pCteUse)==0\n      ){\n        sqlite3DbFree(db, pTab);\n        return 2;\n      }\n      pCteUse->eM10d = pCte->eM10d;\n    }\n    pFrom->pSTab = pTab;\n    pTab->nTabRef = 1;\n    pTab->zName = sqlite3DbStrDup(db, pCte->zName);\n    pTab->iPKey = -1;\n    pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );\n    pTab->tabFlags |= TF_Ephemeral | TF_NoVisibleRowid;\n    sqlite3SrcItemAttachSubquery(pParse, pFrom, pCte->pSelect, 1);\n    if( db->mallocFailed ) return 2;\n    assert( pFrom->fg.isSubquery && pFrom->u4.pSubq );\n    pSel = pFrom->u4.pSubq->pSelect;\n    assert( pSel!=0 );\n    pSel->selFlags |= SF_CopyCte;\n    if( pFrom->fg.isIndexedBy ){\n      sqlite3ErrorMsg(pParse, \"no such index: \\\"%s\\\"\", pFrom->u1.zIndexedBy);\n      return 2;\n    }\n    assert( !pFrom->fg.isIndexedBy );\n    pFrom->fg.isCte = 1;\n    pFrom->u2.pCteUse = pCteUse;\n    pCteUse->nUse++;\n\n    /* Check if this is a recursive CTE. */\n    pRecTerm = pSel;\n    bMayRecursive = ( pSel->op==TK_ALL || pSel->op==TK_UNION );\n    while( bMayRecursive && pRecTerm->op==pSel->op ){\n      int i;\n      SrcList *pSrc = pRecTerm->pSrc;\n      assert( pRecTerm->pPrior!=0 );\n      for(i=0; i<pSrc->nSrc; i++){\n        SrcItem *pItem = &pSrc->a[i];\n        if( pItem->zName!=0\n         && !pItem->fg.hadSchema\n         && ALWAYS( !pItem->fg.isSubquery )\n         && (pItem->fg.fixedSchema || pItem->u4.zDatabase==0)\n         && 0==sqlite3StrICmp(pItem->zName, pCte->zName)\n        ){\n          pItem->pSTab = pTab;\n          pTab->nTabRef++;\n          pItem->fg.isRecursive = 1;\n          if( pRecTerm->selFlags & SF_Recursive ){\n            sqlite3ErrorMsg(pParse,\n               \"multiple references to recursive table: %s\", pCte->zName\n            );\n            return 2;\n          }\n          pRecTerm->selFlags |= SF_Recursive;\n          if( iRecTab<0 ) iRecTab = pParse->nTab++;\n          pItem->iCursor = iRecTab;\n        }\n      }\n      if( (pRecTerm->selFlags & SF_Recursive)==0 ) break;\n      pRecTerm = pRecTerm->pPrior;\n    }\n\n    pCte->zCteErr = \"circular reference: %s\";\n    pSavedWith = pParse->pWith;\n    pParse->pWith = pWith;\n    if( pSel->selFlags & SF_Recursive ){\n      int rc;\n      assert( pRecTerm!=0 );\n      assert( (pRecTerm->selFlags & SF_Recursive)==0 );\n      assert( pRecTerm->pNext!=0 );\n      assert( (pRecTerm->pNext->selFlags & SF_Recursive)!=0 );\n      assert( pRecTerm->pWith==0 );\n      pRecTerm->pWith = pSel->pWith;\n      rc = sqlite3WalkSelect(pWalker, pRecTerm);\n      pRecTerm->pWith = 0;\n      if( rc ){\n        pParse->pWith = pSavedWith;\n        return 2;\n      }\n    }else{\n      if( sqlite3WalkSelect(pWalker, pSel) ){\n        pParse->pWith = pSavedWith;\n        return 2;\n      }\n    }\n    pParse->pWith = pWith;\n\n    for(pLeft=pSel; pLeft->pPrior; pLeft=pLeft->pPrior);\n    pEList = pLeft->pEList;\n    if( pCte->pCols ){\n      if( pEList && pEList->nExpr!=pCte->pCols->nExpr ){\n        sqlite3ErrorMsg(pParse, \"table %s has %d values for %d columns\",\n            pCte->zName, pEList->nExpr, pCte->pCols->nExpr\n        );\n        pParse->pWith = pSavedWith;\n        return 2;\n      }\n      pEList = pCte->pCols;\n    }\n\n    sqlite3ColumnsFromExprList(pParse, pEList, &pTab->nCol, &pTab->aCol);\n    if( bMayRecursive ){\n      if( pSel->selFlags & SF_Recursive ){\n        pCte->zCteErr = \"multiple recursive references: %s\";\n      }else{\n        pCte->zCteErr = \"recursive reference in a subquery: %s\";\n      }\n      sqlite3WalkSelect(pWalker, pSel);\n    }\n    pCte->zCteErr = 0;\n    pParse->pWith = pSavedWith;\n    return 1;  /* Success */\n  }\n  return 0;  /* No match */\n}\n#endif\n\n#ifndef SQLITE_OMIT_CTE\n/*\n** If the SELECT passed as the second argument has an associated WITH\n** clause, pop it from the stack stored as part of the Parse object.\n**\n** This function is used as the xSelectCallback2() callback by\n** sqlite3SelectExpand() when walking a SELECT tree to resolve table\n** names and other FROM clause elements.\n*/\nSQLITE_PRIVATE void sqlite3SelectPopWith(Walker *pWalker, Select *p){\n  Parse *pParse = pWalker->pParse;\n  if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){\n    With *pWith = findRightmost(p)->pWith;\n    if( pWith!=0 ){\n      assert( pParse->pWith==pWith || pParse->nErr );\n      pParse->pWith = pWith->pOuter;\n    }\n  }\n}\n#endif\n\n/*\n** The SrcItem structure passed as the second argument represents a\n** sub-query in the FROM clause of a SELECT statement. This function\n** allocates and populates the SrcItem.pTab object. If successful,\n** SQLITE_OK is returned. Otherwise, if an OOM error is encountered,\n** SQLITE_NOMEM.\n*/\nSQLITE_PRIVATE int sqlite3ExpandSubquery(Parse *pParse, SrcItem *pFrom){\n  Select *pSel;\n  Table *pTab;\n\n  assert( pFrom->fg.isSubquery );\n  assert( pFrom->u4.pSubq!=0 );\n  pSel = pFrom->u4.pSubq->pSelect;\n  assert( pSel );\n  pFrom->pSTab = pTab = sqlite3DbMallocZero(pParse->db, sizeof(Table));\n  if( pTab==0 ) return SQLITE_NOMEM;\n  pTab->nTabRef = 1;\n  if( pFrom->zAlias ){\n    pTab->zName = sqlite3DbStrDup(pParse->db, pFrom->zAlias);\n  }else{\n    pTab->zName = sqlite3MPrintf(pParse->db, \"%!S\", pFrom);\n  }\n  while( pSel->pPrior ){ pSel = pSel->pPrior; }\n  sqlite3ColumnsFromExprList(pParse, pSel->pEList,&pTab->nCol,&pTab->aCol);\n  pTab->iPKey = -1;\n  pTab->eTabType = TABTYP_VIEW;\n  pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );\n#ifndef SQLITE_ALLOW_ROWID_IN_VIEW\n  /* The usual case - do not allow ROWID on a subquery */\n  pTab->tabFlags |= TF_Ephemeral | TF_NoVisibleRowid;\n#else\n  /* Legacy compatibility mode */\n  pTab->tabFlags |= TF_Ephemeral | sqlite3Config.mNoVisibleRowid;\n#endif\n  return pParse->nErr ? SQLITE_ERROR : SQLITE_OK;\n}\n\n\n/*\n** Check the N SrcItem objects to the right of pBase.  (N might be zero!)\n** If any of those SrcItem objects have a USING clause containing zName\n** then return true.\n**\n** If N is zero, or none of the N SrcItem objects to the right of pBase\n** contains a USING clause, or if none of the USING clauses contain zName,\n** then return false.\n*/\nstatic int inAnyUsingClause(\n  const char *zName, /* Name we are looking for */\n  SrcItem *pBase,    /* The base SrcItem.  Looking at pBase[1] and following */\n  int N              /* How many SrcItems to check */\n){\n  while( N>0 ){\n    N--;\n    pBase++;\n    if( pBase->fg.isUsing==0 ) continue;\n    if( NEVER(pBase->u3.pUsing==0) ) continue;\n    if( sqlite3IdListIndex(pBase->u3.pUsing, zName)>=0 ) return 1;\n  }\n  return 0;\n}\n\n\n/*\n** This routine is a Walker callback for \"expanding\" a SELECT statement.\n** \"Expanding\" means to do the following:\n**\n**    (1)  Make sure VDBE cursor numbers have been assigned to every\n**         element of the FROM clause.\n**\n**    (2)  Fill in the pTabList->a[].pTab fields in the SrcList that\n**         defines FROM clause.  When views appear in the FROM clause,\n**         fill pTabList->a[].pSelect with a copy of the SELECT statement\n**         that implements the view.  A copy is made of the view's SELECT\n**         statement so that we can freely modify or delete that statement\n**         without worrying about messing up the persistent representation\n**         of the view.\n**\n**    (3)  Add terms to the WHERE clause to accommodate the NATURAL keyword\n**         on joins and the ON and USING clause of joins.\n**\n**    (4)  Scan the list of columns in the result set (pEList) looking\n**         for instances of the \"*\" operator or the TABLE.* operator.\n**         If found, expand each \"*\" to be every column in every table\n**         and TABLE.* to be every column in TABLE.\n**\n*/\nstatic int selectExpander(Walker *pWalker, Select *p){\n  Parse *pParse = pWalker->pParse;\n  int i, j, k, rc;\n  SrcList *pTabList;\n  ExprList *pEList;\n  SrcItem *pFrom;\n  sqlite3 *db = pParse->db;\n  Expr *pE, *pRight, *pExpr;\n  u16 selFlags = p->selFlags;\n  u32 elistFlags = 0;\n\n  p->selFlags |= SF_Expanded;\n  if( db->mallocFailed  ){\n    return WRC_Abort;\n  }\n  assert( p->pSrc!=0 );\n  if( (selFlags & SF_Expanded)!=0 ){\n    return WRC_Prune;\n  }\n  if( pWalker->eCode ){\n    /* Renumber selId because it has been copied from a view */\n    p->selId = ++pParse->nSelect;\n  }\n  pTabList = p->pSrc;\n  pEList = p->pEList;\n  if( pParse->pWith && (p->selFlags & SF_View) ){\n    if( p->pWith==0 ){\n      p->pWith = (With*)sqlite3DbMallocZero(db, SZ_WITH(1) );\n      if( p->pWith==0 ){\n        return WRC_Abort;\n      }\n    }\n    p->pWith->bView = 1;\n  }\n  sqlite3WithPush(pParse, p->pWith, 0);\n\n  /* Make sure cursor numbers have been assigned to all entries in\n  ** the FROM clause of the SELECT statement.\n  */\n  sqlite3SrcListAssignCursors(pParse, pTabList);\n\n  /* Look up every table named in the FROM clause of the select.  If\n  ** an entry of the FROM clause is a subquery instead of a table or view,\n  ** then create a transient table structure to describe the subquery.\n  */\n  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){\n    Table *pTab;\n    assert( pFrom->fg.isRecursive==0 || pFrom->pSTab!=0 );\n    if( pFrom->pSTab ) continue;\n    assert( pFrom->fg.isRecursive==0 );\n    if( pFrom->zName==0 ){\n#ifndef SQLITE_OMIT_SUBQUERY\n      Select *pSel;\n      assert( pFrom->fg.isSubquery && pFrom->u4.pSubq!=0 );\n      pSel = pFrom->u4.pSubq->pSelect;\n      /* A sub-query in the FROM clause of a SELECT */\n      assert( pSel!=0 );\n      assert( pFrom->pSTab==0 );\n      if( sqlite3WalkSelect(pWalker, pSel) ) return WRC_Abort;\n      if( sqlite3ExpandSubquery(pParse, pFrom) ) return WRC_Abort;\n#endif\n#ifndef SQLITE_OMIT_CTE\n    }else if( (rc = resolveFromTermToCte(pParse, pWalker, pFrom))!=0 ){\n      if( rc>1 ) return WRC_Abort;\n      pTab = pFrom->pSTab;\n      assert( pTab!=0 );\n#endif\n    }else{\n      /* An ordinary table or view name in the FROM clause */\n      assert( pFrom->pSTab==0 );\n      pFrom->pSTab = pTab = sqlite3LocateTableItem(pParse, 0, pFrom);\n      if( pTab==0 ) return WRC_Abort;\n      if( pTab->nTabRef>=0xffff ){\n        sqlite3ErrorMsg(pParse, \"too many references to \\\"%s\\\": max 65535\",\n           pTab->zName);\n        pFrom->pSTab = 0;\n        return WRC_Abort;\n      }\n      pTab->nTabRef++;\n      if( !IsVirtual(pTab) && cannotBeFunction(pParse, pFrom) ){\n        return WRC_Abort;\n      }\n#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)\n      if( !IsOrdinaryTable(pTab) ){\n        i16 nCol;\n        u8 eCodeOrig = pWalker->eCode;\n        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;\n        assert( pFrom->fg.isSubquery==0 );\n        if( IsView(pTab) ){\n          if( (db->flags & SQLITE_EnableView)==0\n           && pTab->pSchema!=db->aDb[1].pSchema\n          ){\n            sqlite3ErrorMsg(pParse, \"access to view \\\"%s\\\" prohibited\",\n              pTab->zName);\n          }\n          sqlite3SrcItemAttachSubquery(pParse, pFrom, pTab->u.view.pSelect, 1);\n        }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n        else if( ALWAYS(IsVirtual(pTab))\n         && pFrom->fg.fromDDL\n         && ALWAYS(pTab->u.vtab.p!=0)\n         && pTab->u.vtab.p->eVtabRisk > ((db->flags & SQLITE_TrustedSchema)!=0)\n        ){\n          sqlite3ErrorMsg(pParse, \"unsafe use of virtual table \\\"%s\\\"\",\n                                  pTab->zName);\n        }\n        assert( SQLITE_VTABRISK_Normal==1 && SQLITE_VTABRISK_High==2 );\n#endif\n        nCol = pTab->nCol;\n        pTab->nCol = -1;\n        pWalker->eCode = 1;  /* Turn on Select.selId renumbering */\n        if( pFrom->fg.isSubquery ){\n          sqlite3WalkSelect(pWalker, pFrom->u4.pSubq->pSelect);\n        }\n        pWalker->eCode = eCodeOrig;\n        pTab->nCol = nCol;\n      }\n#endif\n    }\n\n    /* Locate the index named by the INDEXED BY clause, if any. */\n    if( pFrom->fg.isIndexedBy && sqlite3IndexedByLookup(pParse, pFrom) ){\n      return WRC_Abort;\n    }\n  }\n\n  /* Process NATURAL keywords, and ON and USING clauses of joins.\n  */\n  assert( db->mallocFailed==0 || pParse->nErr!=0 );\n  if( pParse->nErr || sqlite3ProcessJoin(pParse, p) ){\n    return WRC_Abort;\n  }\n\n  /* For every \"*\" that occurs in the column list, insert the names of\n  ** all columns in all tables.  And for every TABLE.* insert the names\n  ** of all columns in TABLE.  The parser inserted a special expression\n  ** with the TK_ASTERISK operator for each \"*\" that it found in the column\n  ** list.  The following code just has to locate the TK_ASTERISK\n  ** expressions and expand each one to the list of all columns in\n  ** all tables.\n  **\n  ** The first loop just checks to see if there are any \"*\" operators\n  ** that need expanding.\n  */\n  for(k=0; k<pEList->nExpr; k++){\n    pE = pEList->a[k].pExpr;\n    if( pE->op==TK_ASTERISK ) break;\n    assert( pE->op!=TK_DOT || pE->pRight!=0 );\n    assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );\n    if( pE->op==TK_DOT && pE->pRight->op==TK_ASTERISK ) break;\n    elistFlags |= pE->flags;\n  }\n  if( k<pEList->nExpr ){\n    /*\n    ** If we get here it means the result set contains one or more \"*\"\n    ** operators that need to be expanded.  Loop through each expression\n    ** in the result set and expand them one by one.\n    */\n    struct ExprList_item *a = pEList->a;\n    ExprList *pNew = 0;\n    int flags = pParse->db->flags;\n    int longNames = (flags & SQLITE_FullColNames)!=0\n                      && (flags & SQLITE_ShortColNames)==0;\n\n    for(k=0; k<pEList->nExpr; k++){\n      pE = a[k].pExpr;\n      elistFlags |= pE->flags;\n      pRight = pE->pRight;\n      assert( pE->op!=TK_DOT || pRight!=0 );\n      if( pE->op!=TK_ASTERISK\n       && (pE->op!=TK_DOT || pRight->op!=TK_ASTERISK)\n      ){\n        /* This particular expression does not need to be expanded.\n        */\n        pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);\n        if( pNew ){\n          pNew->a[pNew->nExpr-1].zEName = a[k].zEName;\n          pNew->a[pNew->nExpr-1].fg.eEName = a[k].fg.eEName;\n          a[k].zEName = 0;\n        }\n        a[k].pExpr = 0;\n      }else{\n        /* This expression is a \"*\" or a \"TABLE.*\" and needs to be\n        ** expanded. */\n        int tableSeen = 0;      /* Set to 1 when TABLE matches */\n        char *zTName = 0;       /* text of name of TABLE */\n        int iErrOfst;\n        if( pE->op==TK_DOT ){\n          assert( (selFlags & SF_NestedFrom)==0 );\n          assert( pE->pLeft!=0 );\n          assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );\n          zTName = pE->pLeft->u.zToken;\n          assert( ExprUseWOfst(pE->pLeft) );\n          iErrOfst = pE->pRight->w.iOfst;\n        }else{\n          assert( ExprUseWOfst(pE) );\n          iErrOfst = pE->w.iOfst;\n        }\n        for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){\n          int nAdd;                    /* Number of cols including rowid */\n          Table *pTab = pFrom->pSTab;  /* Table for this data source */\n          ExprList *pNestedFrom;       /* Result-set of a nested FROM clause */\n          char *zTabName;              /* AS name for this data source */\n          const char *zSchemaName = 0; /* Schema name for this data source */\n          int iDb;                     /* Schema index for this data src */\n          IdList *pUsing;              /* USING clause for pFrom[1] */\n\n          if( (zTabName = pFrom->zAlias)==0 ){\n            zTabName = pTab->zName;\n          }\n          if( db->mallocFailed ) break;\n          assert( (int)pFrom->fg.isNestedFrom == IsNestedFrom(pFrom) );\n          if( pFrom->fg.isNestedFrom ){\n            assert( pFrom->fg.isSubquery && pFrom->u4.pSubq );\n            assert( pFrom->u4.pSubq->pSelect!=0 );\n            pNestedFrom = pFrom->u4.pSubq->pSelect->pEList;\n            assert( pNestedFrom!=0 );\n            assert( pNestedFrom->nExpr==pTab->nCol );\n            assert( VisibleRowid(pTab)==0 || ViewCanHaveRowid );\n          }else{\n            if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){\n              continue;\n            }\n            pNestedFrom = 0;\n            iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n            zSchemaName = iDb>=0 ? db->aDb[iDb].zDbSName : \"*\";\n          }\n          if( i+1<pTabList->nSrc\n           && pFrom[1].fg.isUsing\n           && (selFlags & SF_NestedFrom)!=0\n          ){\n            int ii;\n            pUsing = pFrom[1].u3.pUsing;\n            for(ii=0; ii<pUsing->nId; ii++){\n              const char *zUName = pUsing->a[ii].zName;\n              pRight = sqlite3Expr(db, TK_ID, zUName);\n              sqlite3ExprSetErrorOffset(pRight, iErrOfst);\n              pNew = sqlite3ExprListAppend(pParse, pNew, pRight);\n              if( pNew ){\n                struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];\n                assert( pX->zEName==0 );\n                pX->zEName = sqlite3MPrintf(db,\"..%s\", zUName);\n                pX->fg.eEName = ENAME_TAB;\n                pX->fg.bUsingTerm = 1;\n              }\n            }\n          }else{\n            pUsing = 0;\n          }\n\n          nAdd = pTab->nCol;\n          if( VisibleRowid(pTab) && (selFlags & SF_NestedFrom)!=0 ) nAdd++;\n          for(j=0; j<nAdd; j++){\n            const char *zName;\n            struct ExprList_item *pX; /* Newly added ExprList term */\n\n            if( j==pTab->nCol ){\n              zName = sqlite3RowidAlias(pTab);\n              if( zName==0 ) continue;\n            }else{\n              zName = pTab->aCol[j].zCnName;\n\n              /* If pTab is actually an SF_NestedFrom sub-select, do not\n              ** expand any ENAME_ROWID columns.  */\n              if( pNestedFrom && pNestedFrom->a[j].fg.eEName==ENAME_ROWID ){\n                continue;\n              }\n\n              if( zTName\n               && pNestedFrom\n               && sqlite3MatchEName(&pNestedFrom->a[j], 0, zTName, 0, 0)==0\n              ){\n                continue;\n              }\n\n              /* If a column is marked as 'hidden', omit it from the expanded\n              ** result-set list unless the SELECT has the SF_IncludeHidden\n              ** bit set.\n              */\n              if( (p->selFlags & SF_IncludeHidden)==0\n                && IsHiddenColumn(&pTab->aCol[j])\n              ){\n                continue;\n              }\n              if( (pTab->aCol[j].colFlags & COLFLAG_NOEXPAND)!=0\n               && zTName==0\n               && (selFlags & (SF_NestedFrom))==0\n              ){\n                continue;\n              }\n            }\n            assert( zName );\n            tableSeen = 1;\n\n            if( i>0 && zTName==0 && (selFlags & SF_NestedFrom)==0 ){\n              if( pFrom->fg.isUsing\n               && sqlite3IdListIndex(pFrom->u3.pUsing, zName)>=0\n              ){\n                /* In a join with a USING clause, omit columns in the\n                ** using clause from the table on the right. */\n                continue;\n              }\n            }\n            pRight = sqlite3Expr(db, TK_ID, zName);\n            if( (pTabList->nSrc>1\n                 && (  (pFrom->fg.jointype & JT_LTORJ)==0\n                     || (selFlags & SF_NestedFrom)!=0\n                     || !inAnyUsingClause(zName,pFrom,pTabList->nSrc-i-1)\n                    )\n                )\n             || IN_RENAME_OBJECT\n            ){\n              Expr *pLeft;\n              pLeft = sqlite3Expr(db, TK_ID, zTabName);\n              pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);\n              if( IN_RENAME_OBJECT && pE->pLeft ){\n                sqlite3RenameTokenRemap(pParse, pLeft, pE->pLeft);\n              }\n              if( zSchemaName ){\n                pLeft = sqlite3Expr(db, TK_ID, zSchemaName);\n                pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pExpr);\n              }\n            }else{\n              pExpr = pRight;\n            }\n            sqlite3ExprSetErrorOffset(pExpr, iErrOfst);\n            pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);\n            if( pNew==0 ){\n              break;  /* OOM */\n            }\n            pX = &pNew->a[pNew->nExpr-1];\n            assert( pX->zEName==0 );\n            if( (selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){\n              if( pNestedFrom && (!ViewCanHaveRowid || j<pNestedFrom->nExpr) ){\n                assert( j<pNestedFrom->nExpr );\n                pX->zEName = sqlite3DbStrDup(db, pNestedFrom->a[j].zEName);\n                testcase( pX->zEName==0 );\n              }else{\n                pX->zEName = sqlite3MPrintf(db, \"%s.%s.%s\",\n                                           zSchemaName, zTabName, zName);\n                testcase( pX->zEName==0 );\n              }\n              pX->fg.eEName = (j==pTab->nCol ? ENAME_ROWID : ENAME_TAB);\n              if( (pFrom->fg.isUsing\n                   && sqlite3IdListIndex(pFrom->u3.pUsing, zName)>=0)\n               || (pUsing && sqlite3IdListIndex(pUsing, zName)>=0)\n               || (j<pTab->nCol && (pTab->aCol[j].colFlags & COLFLAG_NOEXPAND))\n              ){\n                pX->fg.bNoExpand = 1;\n              }\n            }else if( longNames ){\n              pX->zEName = sqlite3MPrintf(db, \"%s.%s\", zTabName, zName);\n              pX->fg.eEName = ENAME_NAME;\n            }else{\n              pX->zEName = sqlite3DbStrDup(db, zName);\n              pX->fg.eEName = ENAME_NAME;\n            }\n          }\n        }\n        if( !tableSeen ){\n          if( zTName ){\n            sqlite3ErrorMsg(pParse, \"no such table: %s\", zTName);\n          }else{\n            sqlite3ErrorMsg(pParse, \"no tables specified\");\n          }\n        }\n      }\n    }\n    sqlite3ExprListDelete(db, pEList);\n    p->pEList = pNew;\n  }\n  if( p->pEList ){\n    if( p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){\n      sqlite3ErrorMsg(pParse, \"too many columns in result set\");\n      return WRC_Abort;\n    }\n    if( (elistFlags & (EP_HasFunc|EP_Subquery))!=0 ){\n      p->selFlags |= SF_ComplexResult;\n    }\n  }\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x8 ){\n    TREETRACE(0x8,pParse,p,(\"After result-set wildcard expansion:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n  return WRC_Continue;\n}\n\n#if SQLITE_DEBUG\n/*\n** Always assert.  This xSelectCallback2 implementation proves that the\n** xSelectCallback2 is never invoked.\n*/\nSQLITE_PRIVATE void sqlite3SelectWalkAssert2(Walker *NotUsed, Select *NotUsed2){\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  assert( 0 );\n}\n#endif\n/*\n** This routine \"expands\" a SELECT statement and all of its subqueries.\n** For additional information on what it means to \"expand\" a SELECT\n** statement, see the comment on the selectExpand worker callback above.\n**\n** Expanding a SELECT statement is the first step in processing a\n** SELECT statement.  The SELECT statement must be expanded before\n** name resolution is performed.\n**\n** If anything goes wrong, an error message is written into pParse.\n** The calling function can detect the problem by looking at pParse->nErr\n** and/or pParse->db->mallocFailed.\n*/\nstatic void sqlite3SelectExpand(Parse *pParse, Select *pSelect){\n  Walker w;\n  w.xExprCallback = sqlite3ExprWalkNoop;\n  w.pParse = pParse;\n  if( OK_IF_ALWAYS_TRUE(pParse->hasCompound) ){\n    w.xSelectCallback = convertCompoundSelectToSubquery;\n    w.xSelectCallback2 = 0;\n    sqlite3WalkSelect(&w, pSelect);\n  }\n  w.xSelectCallback = selectExpander;\n  w.xSelectCallback2 = sqlite3SelectPopWith;\n  w.eCode = 0;\n  sqlite3WalkSelect(&w, pSelect);\n}\n\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()\n** interface.\n**\n** For each FROM-clause subquery, add Column.zType, Column.zColl, and\n** Column.affinity information to the Table structure that represents\n** the result set of that subquery.\n**\n** The Table structure that represents the result set was constructed\n** by selectExpander() but the type and collation and affinity information\n** was omitted at that point because identifiers had not yet been resolved.\n** This routine is called after identifier resolution.\n*/\nstatic void selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){\n  Parse *pParse;\n  int i;\n  SrcList *pTabList;\n  SrcItem *pFrom;\n\n  if( p->selFlags & SF_HasTypeInfo ) return;\n  p->selFlags |= SF_HasTypeInfo;\n  pParse = pWalker->pParse;\n  assert( (p->selFlags & SF_Resolved) );\n  pTabList = p->pSrc;\n  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){\n    Table *pTab = pFrom->pSTab;\n    assert( pTab!=0 );\n    if( (pTab->tabFlags & TF_Ephemeral)!=0 && pFrom->fg.isSubquery ){\n      /* A sub-query in the FROM clause of a SELECT */\n      Select *pSel = pFrom->u4.pSubq->pSelect;\n      sqlite3SubqueryColumnTypes(pParse, pTab, pSel, SQLITE_AFF_NONE);\n    }\n  }\n}\n#endif\n\n\n/*\n** This routine adds datatype and collating sequence information to\n** the Table structures of all FROM-clause subqueries in a\n** SELECT statement.\n**\n** Use this routine after name resolution.\n*/\nstatic void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){\n#ifndef SQLITE_OMIT_SUBQUERY\n  Walker w;\n  w.xSelectCallback = sqlite3SelectWalkNoop;\n  w.xSelectCallback2 = selectAddSubqueryTypeInfo;\n  w.xExprCallback = sqlite3ExprWalkNoop;\n  w.pParse = pParse;\n  sqlite3WalkSelect(&w, pSelect);\n#endif\n}\n\n\n/*\n** This routine sets up a SELECT statement for processing.  The\n** following is accomplished:\n**\n**     *  VDBE Cursor numbers are assigned to all FROM-clause terms.\n**     *  Ephemeral Table objects are created for all FROM-clause subqueries.\n**     *  ON and USING clauses are shifted into WHERE statements\n**     *  Wildcards \"*\" and \"TABLE.*\" in result sets are expanded.\n**     *  Identifiers in expression are matched to tables.\n**\n** This routine acts recursively on all subqueries within the SELECT.\n*/\nSQLITE_PRIVATE void sqlite3SelectPrep(\n  Parse *pParse,         /* The parser context */\n  Select *p,             /* The SELECT statement being coded. */\n  NameContext *pOuterNC  /* Name context for container */\n){\n  assert( p!=0 || pParse->db->mallocFailed );\n  assert( pParse->db->pParse==pParse );\n  if( pParse->db->mallocFailed ) return;\n  if( p->selFlags & SF_HasTypeInfo ) return;\n  sqlite3SelectExpand(pParse, p);\n  if( pParse->nErr ) return;\n  sqlite3ResolveSelectNames(pParse, p, pOuterNC);\n  if( pParse->nErr ) return;\n  sqlite3SelectAddTypeInfo(pParse, p);\n}\n\n#if TREETRACE_ENABLED\n/*\n** Display all information about an AggInfo object\n*/\nstatic void printAggInfo(AggInfo *pAggInfo){\n  int ii;\n  sqlite3DebugPrintf(\"AggInfo %d/%p:\\n\",\n     pAggInfo->selId, pAggInfo);\n  for(ii=0; ii<pAggInfo->nColumn; ii++){\n    struct AggInfo_col *pCol = &pAggInfo->aCol[ii];\n    sqlite3DebugPrintf(\n       \"agg-column[%d] pTab=%s iTable=%d iColumn=%d iMem=%d\"\n       \" iSorterColumn=%d %s\\n\",\n       ii, pCol->pTab ? pCol->pTab->zName : \"NULL\",\n       pCol->iTable, pCol->iColumn, pAggInfo->iFirstReg+ii,\n       pCol->iSorterColumn,\n       ii>=pAggInfo->nAccumulator ? \"\" : \" Accumulator\");\n    sqlite3TreeViewExpr(0, pAggInfo->aCol[ii].pCExpr, 0);\n  }\n  for(ii=0; ii<pAggInfo->nFunc; ii++){\n    sqlite3DebugPrintf(\"agg-func[%d]: iMem=%d\\n\",\n        ii, pAggInfo->iFirstReg+pAggInfo->nColumn+ii);\n    sqlite3TreeViewExpr(0, pAggInfo->aFunc[ii].pFExpr, 0);\n  }\n}\n#endif /* TREETRACE_ENABLED */\n\n/*\n** Analyze the arguments to aggregate functions.  Create new pAggInfo->aCol[]\n** entries for columns that are arguments to aggregate functions but which\n** are not otherwise used.\n**\n** The aCol[] entries in AggInfo prior to nAccumulator are columns that\n** are referenced outside of aggregate functions.  These might be columns\n** that are part of the GROUP by clause, for example.  Other database engines\n** would throw an error if there is a column reference that is not in the\n** GROUP BY clause and that is not part of an aggregate function argument.\n** But SQLite allows this.\n**\n** The aCol[] entries beginning with the aCol[nAccumulator] and following\n** are column references that are used exclusively as arguments to\n** aggregate functions.  This routine is responsible for computing\n** (or recomputing) those aCol[] entries.\n*/\nstatic void analyzeAggFuncArgs(\n  AggInfo *pAggInfo,\n  NameContext *pNC\n){\n  int i;\n  assert( pAggInfo!=0 );\n  assert( pAggInfo->iFirstReg==0 );\n  pNC->ncFlags |= NC_InAggFunc;\n  for(i=0; i<pAggInfo->nFunc; i++){\n    Expr *pExpr = pAggInfo->aFunc[i].pFExpr;\n    assert( pExpr->op==TK_FUNCTION || pExpr->op==TK_AGG_FUNCTION );\n    assert( ExprUseXList(pExpr) );\n    sqlite3ExprAnalyzeAggList(pNC, pExpr->x.pList);\n    if( pExpr->pLeft ){\n      assert( pExpr->pLeft->op==TK_ORDER );\n      assert( ExprUseXList(pExpr->pLeft) );\n      sqlite3ExprAnalyzeAggList(pNC, pExpr->pLeft->x.pList);\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    assert( !IsWindowFunc(pExpr) );\n    if( ExprHasProperty(pExpr, EP_WinFunc) ){\n      sqlite3ExprAnalyzeAggregates(pNC, pExpr->y.pWin->pFilter);\n    }\n#endif\n  }\n  pNC->ncFlags &= ~NC_InAggFunc;\n}\n\n/*\n** An index on expressions is being used in the inner loop of an\n** aggregate query with a GROUP BY clause.  This routine attempts\n** to adjust the AggInfo object to take advantage of index and to\n** perhaps use the index as a covering index.\n**\n*/\nstatic void optimizeAggregateUseOfIndexedExpr(\n  Parse *pParse,          /* Parsing context */\n  Select *pSelect,        /* The SELECT statement being processed */\n  AggInfo *pAggInfo,      /* The aggregate info */\n  NameContext *pNC        /* Name context used to resolve agg-func args */\n){\n  assert( pAggInfo->iFirstReg==0 );\n  assert( pSelect!=0 );\n  assert( pSelect->pGroupBy!=0 );\n  pAggInfo->nColumn = pAggInfo->nAccumulator;\n  if( ALWAYS(pAggInfo->nSortingColumn>0) ){\n    int mx = pSelect->pGroupBy->nExpr - 1;\n    int j, k;\n    for(j=0; j<pAggInfo->nColumn; j++){\n      k = pAggInfo->aCol[j].iSorterColumn;\n      if( k>mx ) mx = k;\n    }\n    pAggInfo->nSortingColumn = mx+1;\n  }\n  analyzeAggFuncArgs(pAggInfo, pNC);\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x20 ){\n    IndexedExpr *pIEpr;\n    TREETRACE(0x20, pParse, pSelect,\n        (\"AggInfo (possibly) adjusted for Indexed Exprs\\n\"));\n    sqlite3TreeViewSelect(0, pSelect, 0);\n    for(pIEpr=pParse->pIdxEpr; pIEpr; pIEpr=pIEpr->pIENext){\n      printf(\"data-cursor=%d index={%d,%d}\\n\",\n          pIEpr->iDataCur, pIEpr->iIdxCur, pIEpr->iIdxCol);\n      sqlite3TreeViewExpr(0, pIEpr->pExpr, 0);\n    }\n    printAggInfo(pAggInfo);\n  }\n#else\n  UNUSED_PARAMETER(pSelect);\n  UNUSED_PARAMETER(pParse);\n#endif\n}\n\n/*\n** Walker callback for aggregateConvertIndexedExprRefToColumn().\n*/\nstatic int aggregateIdxEprRefToColCallback(Walker *pWalker, Expr *pExpr){\n  AggInfo *pAggInfo;\n  struct AggInfo_col *pCol;\n  UNUSED_PARAMETER(pWalker);\n  if( pExpr->pAggInfo==0 ) return WRC_Continue;\n  if( pExpr->op==TK_AGG_COLUMN ) return WRC_Continue;\n  if( pExpr->op==TK_AGG_FUNCTION ) return WRC_Continue;\n  if( pExpr->op==TK_IF_NULL_ROW ) return WRC_Continue;\n  pAggInfo = pExpr->pAggInfo;\n  if( NEVER(pExpr->iAgg>=pAggInfo->nColumn) ) return WRC_Continue;\n  assert( pExpr->iAgg>=0 );\n  pCol = &pAggInfo->aCol[pExpr->iAgg];\n  pExpr->op = TK_AGG_COLUMN;\n  pExpr->iTable = pCol->iTable;\n  pExpr->iColumn = pCol->iColumn;\n  ExprClearProperty(pExpr, EP_Skip|EP_Collate|EP_Unlikely);\n  return WRC_Prune;\n}\n\n/*\n** Convert every pAggInfo->aFunc[].pExpr such that any node within\n** those expressions that has pAppInfo set is changed into a TK_AGG_COLUMN\n** opcode.\n*/\nstatic void aggregateConvertIndexedExprRefToColumn(AggInfo *pAggInfo){\n  int i;\n  Walker w;\n  memset(&w, 0, sizeof(w));\n  w.xExprCallback = aggregateIdxEprRefToColCallback;\n  for(i=0; i<pAggInfo->nFunc; i++){\n    sqlite3WalkExpr(&w, pAggInfo->aFunc[i].pFExpr);\n  }\n}\n\n\n/*\n** Allocate a block of registers so that there is one register for each\n** pAggInfo->aCol[] and pAggInfo->aFunc[] entry in pAggInfo.  The first\n** register in this block is stored in pAggInfo->iFirstReg.\n**\n** This routine may only be called once for each AggInfo object.  Prior\n** to calling this routine:\n**\n**     *  The aCol[] and aFunc[] arrays may be modified\n**     *  The AggInfoColumnReg() and AggInfoFuncReg() macros may not be used\n**\n** After calling this routine:\n**\n**     *  The aCol[] and aFunc[] arrays are fixed\n**     *  The AggInfoColumnReg() and AggInfoFuncReg() macros may be used\n**\n*/\nstatic void assignAggregateRegisters(Parse *pParse, AggInfo *pAggInfo){\n  assert( pAggInfo!=0 );\n  assert( pAggInfo->iFirstReg==0 );\n  pAggInfo->iFirstReg = pParse->nMem + 1;\n  pParse->nMem += pAggInfo->nColumn + pAggInfo->nFunc;\n}\n\n/*\n** Reset the aggregate accumulator.\n**\n** The aggregate accumulator is a set of memory cells that hold\n** intermediate results while calculating an aggregate.  This\n** routine generates code that stores NULLs in all of those memory\n** cells.\n*/\nstatic void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  struct AggInfo_func *pFunc;\n  int nReg = pAggInfo->nFunc + pAggInfo->nColumn;\n  assert( pAggInfo->iFirstReg>0 );\n  assert( pParse->db->pParse==pParse );\n  assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 );\n  if( nReg==0 ) return;\n  if( pParse->nErr ) return;\n  sqlite3VdbeAddOp3(v, OP_Null, 0, pAggInfo->iFirstReg,\n                    pAggInfo->iFirstReg+nReg-1);\n  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){\n    if( pFunc->iDistinct>=0 ){\n      Expr *pE = pFunc->pFExpr;\n      assert( ExprUseXList(pE) );\n      if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){\n        sqlite3ErrorMsg(pParse, \"DISTINCT aggregates must have exactly one \"\n           \"argument\");\n        pFunc->iDistinct = -1;\n      }else{\n        KeyInfo *pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pE->x.pList,0,0);\n        pFunc->iDistAddr = sqlite3VdbeAddOp4(v, OP_OpenEphemeral,\n            pFunc->iDistinct, 0, 0, (char*)pKeyInfo, P4_KEYINFO);\n        ExplainQueryPlan((pParse, 0, \"USE TEMP B-TREE FOR %s(DISTINCT)\",\n                          pFunc->pFunc->zName));\n      }\n    }\n    if( pFunc->iOBTab>=0 ){\n      ExprList *pOBList;\n      KeyInfo *pKeyInfo;\n      int nExtra = 0;\n      assert( pFunc->pFExpr->pLeft!=0 );\n      assert( pFunc->pFExpr->pLeft->op==TK_ORDER );\n      assert( ExprUseXList(pFunc->pFExpr->pLeft) );\n      assert( pFunc->pFunc!=0 );\n      pOBList = pFunc->pFExpr->pLeft->x.pList;\n      if( !pFunc->bOBUnique ){\n        nExtra++;  /* One extra column for the OP_Sequence */\n      }\n      if( pFunc->bOBPayload ){\n        /* extra columns for the function arguments */\n        assert( ExprUseXList(pFunc->pFExpr) );\n        assert( pFunc->pFExpr->x.pList!=0 );\n        nExtra += pFunc->pFExpr->x.pList->nExpr;\n      }\n      if( pFunc->bUseSubtype ){\n        nExtra += pFunc->pFExpr->x.pList->nExpr;\n      }\n      pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pOBList, 0, nExtra);\n      if( !pFunc->bOBUnique && pParse->nErr==0 ){\n        pKeyInfo->nKeyField++;\n      }\n      sqlite3VdbeAddOp4(v, OP_OpenEphemeral,\n            pFunc->iOBTab, pOBList->nExpr+nExtra, 0,\n            (char*)pKeyInfo, P4_KEYINFO);\n      ExplainQueryPlan((pParse, 0, \"USE TEMP B-TREE FOR %s(ORDER BY)\",\n                          pFunc->pFunc->zName));\n    }\n  }\n}\n\n/*\n** Invoke the OP_AggFinalize opcode for every aggregate function\n** in the AggInfo structure.\n*/\nstatic void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  struct AggInfo_func *pF;\n  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){\n    ExprList *pList;\n    assert( ExprUseXList(pF->pFExpr) );\n    if( pParse->nErr ) return;\n    pList = pF->pFExpr->x.pList;\n    if( pF->iOBTab>=0 ){\n      /* For an ORDER BY aggregate, calls to OP_AggStep were deferred.  Inputs\n      ** were stored in emphermal table pF->iOBTab.  Here, we extract those\n      ** inputs (in ORDER BY order) and make all calls to OP_AggStep\n      ** before doing the OP_AggFinal call. */\n      int iTop;        /* Start of loop for extracting columns */\n      int nArg;        /* Number of columns to extract */\n      int nKey;        /* Key columns to be skipped */\n      int regAgg;      /* Extract into this array */\n      int j;           /* Loop counter */\n\n      assert( pF->pFunc!=0 );\n      nArg = pList->nExpr;\n      regAgg = sqlite3GetTempRange(pParse, nArg);\n\n      if( pF->bOBPayload==0 ){\n        nKey = 0;\n      }else{\n        assert( pF->pFExpr->pLeft!=0 );\n        assert( ExprUseXList(pF->pFExpr->pLeft) );\n        assert( pF->pFExpr->pLeft->x.pList!=0 );\n        nKey = pF->pFExpr->pLeft->x.pList->nExpr;\n        if( ALWAYS(!pF->bOBUnique) ) nKey++;\n      }\n      iTop = sqlite3VdbeAddOp1(v, OP_Rewind, pF->iOBTab); VdbeCoverage(v);\n      for(j=nArg-1; j>=0; j--){\n        sqlite3VdbeAddOp3(v, OP_Column, pF->iOBTab, nKey+j, regAgg+j);\n      }\n      if( pF->bUseSubtype ){\n        int regSubtype = sqlite3GetTempReg(pParse);\n        int iBaseCol = nKey + nArg + (pF->bOBPayload==0 && pF->bOBUnique==0);\n        for(j=nArg-1; j>=0; j--){\n          sqlite3VdbeAddOp3(v, OP_Column, pF->iOBTab, iBaseCol+j, regSubtype);\n          sqlite3VdbeAddOp2(v, OP_SetSubtype, regSubtype, regAgg+j);\n        }\n        sqlite3ReleaseTempReg(pParse, regSubtype);\n      }\n      sqlite3VdbeAddOp3(v, OP_AggStep, 0, regAgg, AggInfoFuncReg(pAggInfo,i));\n      sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF);\n      sqlite3VdbeChangeP5(v, (u16)nArg);\n      sqlite3VdbeAddOp2(v, OP_Next, pF->iOBTab, iTop+1); VdbeCoverage(v);\n      sqlite3VdbeJumpHere(v, iTop);\n      sqlite3ReleaseTempRange(pParse, regAgg, nArg);\n    }\n    sqlite3VdbeAddOp2(v, OP_AggFinal, AggInfoFuncReg(pAggInfo,i),\n                      pList ? pList->nExpr : 0);\n    sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF);\n  }\n}\n\n/*\n** Generate code that will update the accumulator memory cells for an\n** aggregate based on the current cursor position.\n**\n** If regAcc is non-zero and there are no min() or max() aggregates\n** in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator\n** registers if register regAcc contains 0. The caller will take care\n** of setting and clearing regAcc.\n**\n** For an ORDER BY aggregate, the actual accumulator memory cell update\n** is deferred until after all input rows have been received, so that they\n** can be run in the requested order.  In that case, instead of invoking\n** OP_AggStep to update the accumulator, just add the arguments that would\n** have been passed into OP_AggStep into the sorting ephemeral table\n** (along with the appropriate sort key).\n*/\nstatic void updateAccumulator(\n  Parse *pParse,\n  int regAcc,\n  AggInfo *pAggInfo,\n  int eDistinctType\n){\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  int regHit = 0;\n  int addrHitTest = 0;\n  struct AggInfo_func *pF;\n  struct AggInfo_col *pC;\n\n  assert( pAggInfo->iFirstReg>0 );\n  if( pParse->nErr ) return;\n  pAggInfo->directMode = 1;\n  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){\n    int nArg;\n    int addrNext = 0;\n    int regAgg;\n    int regAggSz = 0;\n    int regDistinct = 0;\n    ExprList *pList;\n    assert( ExprUseXList(pF->pFExpr) );\n    assert( !IsWindowFunc(pF->pFExpr) );\n    assert( pF->pFunc!=0 );\n    pList = pF->pFExpr->x.pList;\n    if( ExprHasProperty(pF->pFExpr, EP_WinFunc) ){\n      Expr *pFilter = pF->pFExpr->y.pWin->pFilter;\n      if( pAggInfo->nAccumulator\n       && (pF->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL)\n       && regAcc\n      ){\n        /* If regAcc==0, there there exists some min() or max() function\n        ** without a FILTER clause that will ensure the magnet registers\n        ** are populated. */\n        if( regHit==0 ) regHit = ++pParse->nMem;\n        /* If this is the first row of the group (regAcc contains 0), clear the\n        ** \"magnet\" register regHit so that the accumulator registers\n        ** are populated if the FILTER clause jumps over the the\n        ** invocation of min() or max() altogether. Or, if this is not\n        ** the first row (regAcc contains 1), set the magnet register so that\n        ** the accumulators are not populated unless the min()/max() is invoked\n        ** and indicates that they should be.  */\n        sqlite3VdbeAddOp2(v, OP_Copy, regAcc, regHit);\n      }\n      addrNext = sqlite3VdbeMakeLabel(pParse);\n      sqlite3ExprIfFalse(pParse, pFilter, addrNext, SQLITE_JUMPIFNULL);\n    }\n    if( pF->iOBTab>=0 ){\n      /* Instead of invoking AggStep, we must push the arguments that would\n      ** have been passed to AggStep onto the sorting table. */\n      int jj;                /* Registered used so far in building the record */\n      ExprList *pOBList;     /* The ORDER BY clause */\n      assert( pList!=0 );\n      nArg = pList->nExpr;\n      assert( nArg>0 );\n      assert( pF->pFExpr->pLeft!=0 );\n      assert( pF->pFExpr->pLeft->op==TK_ORDER );\n      assert( ExprUseXList(pF->pFExpr->pLeft) );\n      pOBList = pF->pFExpr->pLeft->x.pList;\n      assert( pOBList!=0 );\n      assert( pOBList->nExpr>0 );\n      regAggSz = pOBList->nExpr;\n      if( !pF->bOBUnique ){\n        regAggSz++;   /* One register for OP_Sequence */\n      }\n      if( pF->bOBPayload ){\n        regAggSz += nArg;\n      }\n      if( pF->bUseSubtype ){\n        regAggSz += nArg;\n      }\n      regAggSz++;  /* One extra register to hold result of MakeRecord */\n      regAgg = sqlite3GetTempRange(pParse, regAggSz);\n      regDistinct = regAgg;\n      sqlite3ExprCodeExprList(pParse, pOBList, regAgg, 0, SQLITE_ECEL_DUP);\n      jj = pOBList->nExpr;\n      if( !pF->bOBUnique ){\n        sqlite3VdbeAddOp2(v, OP_Sequence, pF->iOBTab, regAgg+jj);\n        jj++;\n      }\n      if( pF->bOBPayload ){\n        regDistinct = regAgg+jj;\n        sqlite3ExprCodeExprList(pParse, pList, regDistinct, 0, SQLITE_ECEL_DUP);\n        jj += nArg;\n      }\n      if( pF->bUseSubtype ){\n        int kk;\n        int regBase = pF->bOBPayload ? regDistinct : regAgg;\n        for(kk=0; kk<nArg; kk++, jj++){\n          sqlite3VdbeAddOp2(v, OP_GetSubtype, regBase+kk, regAgg+jj);\n        }\n      }\n    }else if( pList ){\n      nArg = pList->nExpr;\n      regAgg = sqlite3GetTempRange(pParse, nArg);\n      regDistinct = regAgg;\n      sqlite3ExprCodeExprList(pParse, pList, regAgg, 0, SQLITE_ECEL_DUP);\n    }else{\n      nArg = 0;\n      regAgg = 0;\n    }\n    if( pF->iDistinct>=0 && pList ){\n      if( addrNext==0 ){\n        addrNext = sqlite3VdbeMakeLabel(pParse);\n      }\n      pF->iDistinct = codeDistinct(pParse, eDistinctType,\n          pF->iDistinct, addrNext, pList, regDistinct);\n    }\n    if( pF->iOBTab>=0 ){\n      /* Insert a new record into the ORDER BY table */\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regAgg, regAggSz-1,\n                        regAgg+regAggSz-1);\n      sqlite3VdbeAddOp4Int(v, OP_IdxInsert, pF->iOBTab, regAgg+regAggSz-1,\n                           regAgg, regAggSz-1);\n      sqlite3ReleaseTempRange(pParse, regAgg, regAggSz);\n    }else{\n      /* Invoke the AggStep function */\n      if( pF->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL ){\n        CollSeq *pColl = 0;\n        struct ExprList_item *pItem;\n        int j;\n        assert( pList!=0 );  /* pList!=0 if pF->pFunc has NEEDCOLL */\n        for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){\n          pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);\n        }\n        if( !pColl ){\n          pColl = pParse->db->pDfltColl;\n        }\n        if( regHit==0 && pAggInfo->nAccumulator ) regHit = ++pParse->nMem;\n        sqlite3VdbeAddOp4(v, OP_CollSeq, regHit, 0, 0,\n                         (char *)pColl, P4_COLLSEQ);\n      }\n      sqlite3VdbeAddOp3(v, OP_AggStep, 0, regAgg, AggInfoFuncReg(pAggInfo,i));\n      sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF);\n      sqlite3VdbeChangeP5(v, (u16)nArg);\n      sqlite3ReleaseTempRange(pParse, regAgg, nArg);\n    }\n    if( addrNext ){\n      sqlite3VdbeResolveLabel(v, addrNext);\n    }\n    if( pParse->nErr ) return;\n  }\n  if( regHit==0 && pAggInfo->nAccumulator ){\n    regHit = regAcc;\n  }\n  if( regHit ){\n    addrHitTest = sqlite3VdbeAddOp1(v, OP_If, regHit); VdbeCoverage(v);\n  }\n  for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){\n    sqlite3ExprCode(pParse, pC->pCExpr, AggInfoColumnReg(pAggInfo,i));\n    if( pParse->nErr ) return;\n  }\n\n  pAggInfo->directMode = 0;\n  if( addrHitTest ){\n    sqlite3VdbeJumpHereOrPopInst(v, addrHitTest);\n  }\n}\n\n/*\n** Add a single OP_Explain instruction to the VDBE to explain a simple\n** count(*) query (\"SELECT count(*) FROM pTab\").\n*/\n#ifndef SQLITE_OMIT_EXPLAIN\nstatic void explainSimpleCount(\n  Parse *pParse,                  /* Parse context */\n  Table *pTab,                    /* Table being queried */\n  Index *pIdx                     /* Index used to optimize scan, or NULL */\n){\n  if( pParse->explain==2 ){\n    int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));\n    sqlite3VdbeExplain(pParse, 0, \"SCAN %s%s%s\",\n        pTab->zName,\n        bCover ? \" USING COVERING INDEX \" : \"\",\n        bCover ? pIdx->zName : \"\"\n    );\n  }\n}\n#else\n# define explainSimpleCount(a,b,c)\n#endif\n\n/*\n** sqlite3WalkExpr() callback used by havingToWhere().\n**\n** If the node passed to the callback is a TK_AND node, return\n** WRC_Continue to tell sqlite3WalkExpr() to iterate through child nodes.\n**\n** Otherwise, return WRC_Prune. In this case, also check if the\n** sub-expression matches the criteria for being moved to the WHERE\n** clause. If so, add it to the WHERE clause and replace the sub-expression\n** within the HAVING expression with a constant \"1\".\n*/\nstatic int havingToWhereExprCb(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op!=TK_AND ){\n    Select *pS = pWalker->u.pSelect;\n    /* This routine is called before the HAVING clause of the current\n    ** SELECT is analyzed for aggregates. So if pExpr->pAggInfo is set\n    ** here, it indicates that the expression is a correlated reference to a\n    ** column from an outer aggregate query, or an aggregate function that\n    ** belongs to an outer query. Do not move the expression to the WHERE\n    ** clause in this obscure case, as doing so may corrupt the outer Select\n    ** statements AggInfo structure.  */\n    if( sqlite3ExprIsConstantOrGroupBy(pWalker->pParse, pExpr, pS->pGroupBy)\n     && ExprAlwaysFalse(pExpr)==0\n     && pExpr->pAggInfo==0\n    ){\n      sqlite3 *db = pWalker->pParse->db;\n      Expr *pNew = sqlite3Expr(db, TK_INTEGER, \"1\");\n      if( pNew ){\n        Expr *pWhere = pS->pWhere;\n        SWAP(Expr, *pNew, *pExpr);\n        pNew = sqlite3ExprAnd(pWalker->pParse, pWhere, pNew);\n        pS->pWhere = pNew;\n        pWalker->eCode = 1;\n      }\n    }\n    return WRC_Prune;\n  }\n  return WRC_Continue;\n}\n\n/*\n** Transfer eligible terms from the HAVING clause of a query, which is\n** processed after grouping, to the WHERE clause, which is processed before\n** grouping. For example, the query:\n**\n**   SELECT * FROM <tables> WHERE a=? GROUP BY b HAVING b=? AND c=?\n**\n** can be rewritten as:\n**\n**   SELECT * FROM <tables> WHERE a=? AND b=? GROUP BY b HAVING c=?\n**\n** A term of the HAVING expression is eligible for transfer if it consists\n** entirely of constants and expressions that are also GROUP BY terms that\n** use the \"BINARY\" collation sequence.\n*/\nstatic void havingToWhere(Parse *pParse, Select *p){\n  Walker sWalker;\n  memset(&sWalker, 0, sizeof(sWalker));\n  sWalker.pParse = pParse;\n  sWalker.xExprCallback = havingToWhereExprCb;\n  sWalker.u.pSelect = p;\n  sqlite3WalkExpr(&sWalker, p->pHaving);\n#if TREETRACE_ENABLED\n  if( sWalker.eCode && (sqlite3TreeTrace & 0x100)!=0 ){\n    TREETRACE(0x100,pParse,p,(\"Move HAVING terms into WHERE:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n}\n\n/*\n** Check to see if the pThis entry of pTabList is a self-join of another view.\n** Search FROM-clause entries in the range of iFirst..iEnd, including iFirst\n** but stopping before iEnd.\n**\n** If pThis is a self-join, then return the SrcItem for the first other\n** instance of that view found.  If pThis is not a self-join then return 0.\n*/\nstatic SrcItem *isSelfJoinView(\n  SrcList *pTabList,           /* Search for self-joins in this FROM clause */\n  SrcItem *pThis,              /* Search for prior reference to this subquery */\n  int iFirst, int iEnd        /* Range of FROM-clause entries to search. */\n){\n  SrcItem *pItem;\n  Select *pSel;\n  assert( pThis->fg.isSubquery );\n  pSel = pThis->u4.pSubq->pSelect;\n  assert( pSel!=0 );\n  if( pSel->selFlags & SF_PushDown ) return 0;\n  while( iFirst<iEnd ){\n    Select *pS1;\n    pItem = &pTabList->a[iFirst++];\n    if( !pItem->fg.isSubquery ) continue;\n    if( pItem->fg.viaCoroutine ) continue;\n    if( pItem->zName==0 ) continue;\n    assert( pItem->pSTab!=0 );\n    assert( pThis->pSTab!=0 );\n    if( pItem->pSTab->pSchema!=pThis->pSTab->pSchema ) continue;\n    if( sqlite3_stricmp(pItem->zName, pThis->zName)!=0 ) continue;\n    pS1 = pItem->u4.pSubq->pSelect;\n    if( pItem->pSTab->pSchema==0 && pSel->selId!=pS1->selId ){\n      /* The query flattener left two different CTE tables with identical\n      ** names in the same FROM clause. */\n      continue;\n    }\n    if( pS1->selFlags & SF_PushDown ){\n      /* The view was modified by some other optimization such as\n      ** pushDownWhereTerms() */\n      continue;\n    }\n    return pItem;\n  }\n  return 0;\n}\n\n/*\n** Deallocate a single AggInfo object\n*/\nstatic void agginfoFree(sqlite3 *db, void *pArg){\n  AggInfo *p = (AggInfo*)pArg;\n  sqlite3DbFree(db, p->aCol);\n  sqlite3DbFree(db, p->aFunc);\n  sqlite3DbFreeNN(db, p);\n}\n\n/*\n** Attempt to transform a query of the form\n**\n**    SELECT count(*) FROM (SELECT x FROM t1 UNION ALL SELECT y FROM t2)\n**\n** Into this:\n**\n**    SELECT (SELECT count(*) FROM t1)+(SELECT count(*) FROM t2)\n**\n** The transformation only works if all of the following are true:\n**\n**   *  The subquery is a UNION ALL of two or more terms\n**   *  The subquery does not have a LIMIT clause\n**   *  There is no WHERE or GROUP BY or HAVING clauses on the subqueries\n**   *  The outer query is a simple count(*) with no WHERE clause or other\n**      extraneous syntax.\n**   *  None of the subqueries are DISTINCT (forumpost/a860f5fb2e 2025-03-10)\n**\n** Return TRUE if the optimization is undertaken.\n*/\nstatic int countOfViewOptimization(Parse *pParse, Select *p){\n  Select *pSub, *pPrior;\n  Expr *pExpr;\n  Expr *pCount;\n  sqlite3 *db;\n  SrcItem *pFrom;\n  if( (p->selFlags & SF_Aggregate)==0 ) return 0;   /* This is an aggregate */\n  if( p->pEList->nExpr!=1 ) return 0;               /* Single result column */\n  if( p->pWhere ) return 0;\n  if( p->pHaving ) return 0;\n  if( p->pGroupBy ) return 0;\n  if( p->pOrderBy ) return 0;\n  pExpr = p->pEList->a[0].pExpr;\n  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;        /* Result is an aggregate */\n  assert( ExprUseUToken(pExpr) );\n  if( sqlite3_stricmp(pExpr->u.zToken,\"count\") ) return 0;  /* Is count() */\n  assert( ExprUseXList(pExpr) );\n  if( pExpr->x.pList!=0 ) return 0;                 /* Must be count(*) */\n  if( p->pSrc->nSrc!=1 ) return 0;                  /* One table in FROM  */\n  if( ExprHasProperty(pExpr, EP_WinFunc) ) return 0;/* Not a window function */\n  pFrom = p->pSrc->a;\n  if( pFrom->fg.isSubquery==0 ) return 0;    /* FROM is a subquery */\n  pSub = pFrom->u4.pSubq->pSelect;\n  if( pSub->pPrior==0 ) return 0;                   /* Must be a compound */\n  if( pSub->selFlags & SF_CopyCte ) return 0;       /* Not a CTE */\n  do{\n    if( pSub->op!=TK_ALL && pSub->pPrior ) return 0;  /* Must be UNION ALL */\n    if( pSub->pWhere ) return 0;                      /* No WHERE clause */\n    if( pSub->pLimit ) return 0;                      /* No LIMIT clause */\n    if( pSub->selFlags & (SF_Aggregate|SF_Distinct) ){\n       testcase( pSub->selFlags & SF_Aggregate );\n       testcase( pSub->selFlags & SF_Distinct );\n       return 0;     /* Not an aggregate nor DISTINCT */\n    }\n    assert( pSub->pHaving==0 );  /* Due to the previous */\n    pSub = pSub->pPrior;                              /* Repeat over compound */\n  }while( pSub );\n\n  /* If we reach this point then it is OK to perform the transformation */\n\n  db = pParse->db;\n  pCount = pExpr;\n  pExpr = 0;\n  pSub = sqlite3SubqueryDetach(db, pFrom);\n  sqlite3SrcListDelete(db, p->pSrc);\n  p->pSrc = sqlite3DbMallocZero(pParse->db, SZ_SRCLIST_1);\n  while( pSub ){\n    Expr *pTerm;\n    pPrior = pSub->pPrior;\n    pSub->pPrior = 0;\n    pSub->pNext = 0;\n    pSub->selFlags |= SF_Aggregate;\n    pSub->selFlags &= ~(u32)SF_Compound;\n    pSub->nSelectRow = 0;\n    sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric, pSub->pEList);\n    pTerm = pPrior ? sqlite3ExprDup(db, pCount, 0) : pCount;\n    pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);\n    pTerm = sqlite3PExpr(pParse, TK_SELECT, 0, 0);\n    sqlite3PExprAddSelect(pParse, pTerm, pSub);\n    if( pExpr==0 ){\n      pExpr = pTerm;\n    }else{\n      pExpr = sqlite3PExpr(pParse, TK_PLUS, pTerm, pExpr);\n    }\n    pSub = pPrior;\n  }\n  p->pEList->a[0].pExpr = pExpr;\n  p->selFlags &= ~(u32)SF_Aggregate;\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x200 ){\n    TREETRACE(0x200,pParse,p,(\"After count-of-view optimization:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n  return 1;\n}\n\n/*\n** If any term of pSrc, or any SF_NestedFrom sub-query, is not the same\n** as pSrcItem but has the same alias as p0, then return true.\n** Otherwise return false.\n*/\nstatic int sameSrcAlias(SrcItem *p0, SrcList *pSrc){\n  int i;\n  for(i=0; i<pSrc->nSrc; i++){\n    SrcItem *p1 = &pSrc->a[i];\n    if( p1==p0 ) continue;\n    if( p0->pSTab==p1->pSTab && 0==sqlite3_stricmp(p0->zAlias, p1->zAlias) ){\n      return 1;\n    }\n    if( p1->fg.isSubquery\n     && (p1->u4.pSubq->pSelect->selFlags & SF_NestedFrom)!=0\n     && sameSrcAlias(p0, p1->u4.pSubq->pSelect->pSrc)\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Return TRUE (non-zero) if the i-th entry in the pTabList SrcList can\n** be implemented as a co-routine.  The i-th entry is guaranteed to be\n** a subquery.\n**\n** The subquery is implemented as a co-routine if all of the following are\n** true:\n**\n**    (1)  The subquery will likely be implemented in the outer loop of\n**         the query.  This will be the case if any one of the following\n**         conditions hold:\n**         (a)  The subquery is the only term in the FROM clause\n**         (b)  The subquery is the left-most term and a CROSS JOIN or similar\n**              requires it to be the outer loop\n**         (c)  All of the following are true:\n**                (i) The subquery is the left-most subquery in the FROM clause\n**               (ii) There is nothing that would prevent the subquery from\n**                    being used as the outer loop if the sqlite3WhereBegin()\n**                    routine nominates it to that position.\n**              (iii) The query is not a UPDATE ... FROM\n**    (2)  The subquery is not a CTE that should be materialized because\n**         (a) the AS MATERIALIZED keyword is used, or\n**         (b) the CTE is used multiple times and does not have the\n**             NOT MATERIALIZED keyword\n**    (3)  The subquery is not part of a left operand for a RIGHT JOIN\n**    (4)  The SQLITE_Coroutine optimization disable flag is not set\n**    (5)  The subquery is not self-joined\n*/\nstatic int fromClauseTermCanBeCoroutine(\n  Parse *pParse,          /* Parsing context */\n  SrcList *pTabList,      /* FROM clause */\n  int i,                  /* Which term of the FROM clause holds the subquery */\n  int selFlags            /* Flags on the SELECT statement */\n){\n  SrcItem *pItem = &pTabList->a[i];\n  if( pItem->fg.isCte ){\n    const CteUse *pCteUse = pItem->u2.pCteUse;\n    if( pCteUse->eM10d==M10d_Yes ) return 0;                          /* (2a) */\n    if( pCteUse->nUse>=2 && pCteUse->eM10d!=M10d_No ) return 0;       /* (2b) */\n  }\n  if( pTabList->a[0].fg.jointype & JT_LTORJ ) return 0;               /* (3)  */\n  if( OptimizationDisabled(pParse->db, SQLITE_Coroutines) ) return 0; /* (4)  */\n  if( isSelfJoinView(pTabList, pItem, i+1, pTabList->nSrc)!=0 ){\n    return 0;                                                          /* (5) */\n  }\n  if( i==0 ){\n    if( pTabList->nSrc==1 ) return 1;                             /* (1a) */\n    if( pTabList->a[1].fg.jointype & JT_CROSS ) return 1;         /* (1b) */\n    if( selFlags & SF_UpdateFrom )              return 0;         /* (1c-iii) */\n    return 1;\n  }\n  if( selFlags & SF_UpdateFrom ) return 0;                        /* (1c-iii) */\n  while( 1 /*exit-by-break*/ ){\n    if( pItem->fg.jointype & (JT_OUTER|JT_CROSS)  ) return 0;     /* (1c-ii) */\n    if( i==0 ) break;\n    i--;\n    pItem--;\n    if( pItem->fg.isSubquery ) return 0;                          /* (1c-i) */\n  }\n  return 1;\n}\n\n/*\n** Argument pWhere is the WHERE clause belonging to SELECT statement p. This\n** function attempts to transform expressions of the form:\n**\n**     EXISTS (SELECT ...)\n**\n** into joins. For example, given\n**\n**    CREATE TABLE sailors(sid INTEGER PRIMARY KEY, name TEXT);\n**    CREATE TABLE reserves(sid INT, day DATE, PRIMARY KEY(sid, day));\n**\n**    SELECT name FROM sailors AS S WHERE EXISTS (\n**      SELECT * FROM reserves AS R WHERE S.sid = R.sid AND R.day = '2022-10-25'\n**    );\n**\n** the SELECT statement may be transformed as follows:\n**\n**    SELECT name FROM sailors AS S, reserves AS R\n**      WHERE S.sid = R.sid AND R.day = '2022-10-25';\n**\n** **Approximately**.  Really, we have to ensure that the FROM-clause term\n** that was formerly inside the EXISTS is only executed once.  This is handled\n** by setting the SrcItem.fg.fromExists flag, which then causes code in\n** the where.c file to exit the corresponding loop after the first successful\n** match (if any).\n*/\nstatic SQLITE_NOINLINE void existsToJoin(\n  Parse *pParse,  /* Parsing context */\n  Select *p,      /* The SELECT statement being optimized */\n  Expr *pWhere    /* part of the WHERE clause currently being examined */\n){\n  if( pParse->nErr==0\n   && pWhere!=0\n   && !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON)\n   && ALWAYS(p->pSrc!=0)\n   && p->pSrc->nSrc<BMS\n  ){\n    if( pWhere->op==TK_AND ){\n      Expr *pRight = pWhere->pRight;\n      existsToJoin(pParse, p, pWhere->pLeft);\n      existsToJoin(pParse, p, pRight);\n    }\n    else if( pWhere->op==TK_EXISTS ){\n      Select *pSub = pWhere->x.pSelect;\n      Expr *pSubWhere = pSub->pWhere;\n      if( pSub->pSrc->nSrc==1\n       && (pSub->selFlags & SF_Aggregate)==0\n       && !pSub->pSrc->a[0].fg.isSubquery\n       && pSub->pLimit==0\n       && pSub->pPrior==0\n      ){\n        /* Before combining the sub-select with the parent, renumber the\n        ** cursor used by the subselect. This is because the EXISTS expression\n        ** might be a copy of another EXISTS expression from somewhere\n        ** else in the tree, and in this case it is important that it use\n        ** a unique cursor number.  */\n        sqlite3 *db = pParse->db;\n        int *aCsrMap = sqlite3DbMallocZero(db, (pParse->nTab+2)*sizeof(int));\n        if( aCsrMap==0 ) return;\n        aCsrMap[0] = (pParse->nTab+1);\n        renumberCursors(pParse, pSub, -1, aCsrMap);\n        sqlite3DbFree(db, aCsrMap);\n\n        memset(pWhere, 0, sizeof(*pWhere));\n        pWhere->op = TK_INTEGER;\n        pWhere->u.iValue = 1;\n        ExprSetProperty(pWhere, EP_IntValue);\n        assert( p->pWhere!=0 );\n        pSub->pSrc->a[0].fg.fromExists = 1;\n        pSub->pSrc->a[0].fg.jointype |= JT_CROSS;\n        p->pSrc = sqlite3SrcListAppendList(pParse, p->pSrc, pSub->pSrc);\n        if( pSubWhere ){\n          p->pWhere = sqlite3PExpr(pParse, TK_AND, p->pWhere, pSubWhere);\n          pSub->pWhere = 0;\n        }\n        pSub->pSrc = 0;\n        sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pSub);\n#if TREETRACE_ENABLED\n        if( sqlite3TreeTrace & 0x100000 ){\n          TREETRACE(0x100000,pParse,p,\n                    (\"After EXISTS-to-JOIN optimization:\\n\"));\n          sqlite3TreeViewSelect(0, p, 0);\n        }\n#endif\n        existsToJoin(pParse, p, pSubWhere);\n      }\n    }\n  }\n}\n\n/*\n** Type used for Walker callbacks by selectCheckOnClauses().\n*/\ntypedef struct CheckOnCtx CheckOnCtx;\nstruct CheckOnCtx {\n  SrcList *pSrc;                  /* SrcList for this context */\n  int iJoin;                      /* Cursor numbers must be =< than this */\n  CheckOnCtx *pParent;            /* Parent context */\n};\n\n/*\n** True if the SrcList passed as the only argument contains at least\n** one RIGHT or FULL JOIN. False otherwise.\n*/\n#define hasRightJoin(pSrc) (((pSrc)->a[0].fg.jointype & JT_LTORJ)!=0)\n\n/*\n** The xExpr callback for the search of invalid ON clause terms.\n*/\nstatic int selectCheckOnClausesExpr(Walker *pWalker, Expr *pExpr){\n  CheckOnCtx *pCtx = pWalker->u.pCheckOnCtx;\n\n  /* Check if pExpr is root or near-root of an ON clause constraint that needs\n  ** to be checked to ensure that it does not refer to tables in its FROM\n  ** clause to the right of itself. i.e. it is either:\n  **\n  **   + an ON clause on an OUTER join, or\n  **   + an ON clause on an INNER join within a FROM that features at\n  **     least one RIGHT or FULL join.\n  */\n  if( (ExprHasProperty(pExpr, EP_OuterON))\n   || (ExprHasProperty(pExpr, EP_InnerON) && hasRightJoin(pCtx->pSrc))\n  ){\n    /* If CheckOnCtx.iJoin is already set, then fall through and process\n    ** this expression node as normal. Or, if CheckOnCtx.iJoin is still 0,\n    ** set it to the cursor number of the RHS of the join to which this\n    ** ON expression was attached and then iterate through the entire\n    ** expression.  */\n    assert( pCtx->iJoin==0 || pCtx->iJoin==pExpr->w.iJoin );\n    if( pCtx->iJoin==0 ){\n      pCtx->iJoin = pExpr->w.iJoin;\n      sqlite3WalkExprNN(pWalker, pExpr);\n      pCtx->iJoin = 0;\n      return WRC_Prune;\n    }\n  }\n\n  if( pExpr->op==TK_COLUMN ){\n    /* A column expression. Find the SrcList (if any) to which it refers.\n    ** Then, if CheckOnCtx.iJoin indicates that this expression is part of an\n    ** ON clause from that SrcList (i.e. if iJoin is non-zero), check that it\n    ** does not refer to a table to the right of CheckOnCtx.iJoin. */\n    do {\n      SrcList *pSrc = pCtx->pSrc;\n      int iTab = pExpr->iTable;\n      if( iTab>=pSrc->a[0].iCursor && iTab<=pSrc->a[pSrc->nSrc-1].iCursor ){\n        if( pCtx->iJoin && iTab>pCtx->iJoin ){\n          sqlite3ErrorMsg(pWalker->pParse,\n              \"ON clause references tables to its right\");\n          return WRC_Abort;\n        }\n        break;\n      }\n      pCtx = pCtx->pParent;\n    }while( pCtx );\n  }\n  return WRC_Continue;\n}\n\n/*\n** The xSelect callback for the search of invalid ON clause terms.\n*/\nstatic int selectCheckOnClausesSelect(Walker *pWalker, Select *pSelect){\n  CheckOnCtx *pCtx = pWalker->u.pCheckOnCtx;\n  if( pSelect->pSrc==pCtx->pSrc || pSelect->pSrc->nSrc==0 ){\n    return WRC_Continue;\n  }else{\n    CheckOnCtx sCtx;\n    memset(&sCtx, 0, sizeof(sCtx));\n    sCtx.pSrc = pSelect->pSrc;\n    sCtx.pParent = pCtx;\n    pWalker->u.pCheckOnCtx = &sCtx;\n    sqlite3WalkSelect(pWalker, pSelect);\n    pWalker->u.pCheckOnCtx = pCtx;\n    pSelect->selFlags &= ~SF_OnToWhere;\n    return WRC_Prune;\n  }\n}\n\n/*\n** Check all ON clauses in pSelect to verify that they do not reference\n** columns to the right.\n*/\nstatic void selectCheckOnClauses(Parse *pParse, Select *pSelect){\n  Walker w;\n  CheckOnCtx sCtx;\n  assert( pSelect->selFlags & SF_OnToWhere );\n  assert( pSelect->pSrc!=0 && pSelect->pSrc->nSrc>=2 );\n  memset(&w, 0, sizeof(w));\n  w.pParse = pParse;\n  w.xExprCallback = selectCheckOnClausesExpr;\n  w.xSelectCallback = selectCheckOnClausesSelect;\n  w.u.pCheckOnCtx = &sCtx;\n  memset(&sCtx, 0, sizeof(sCtx));\n  sCtx.pSrc = pSelect->pSrc;\n  sqlite3WalkExprNN(&w, pSelect->pWhere);\n  pSelect->selFlags &= ~SF_OnToWhere;\n}\n\n/*\n** Generate byte-code for the SELECT statement given in the p argument.\n**\n** The results are returned according to the SelectDest structure.\n** See comments in sqliteInt.h for further information.\n**\n** This routine returns the number of errors.  If any errors are\n** encountered, then an appropriate error message is left in\n** pParse->zErrMsg.\n**\n** This routine does NOT free the Select structure passed in.  The\n** calling function needs to do that.\n**\n** This is a long function.  The following is an outline of the processing\n** steps, with tags referencing various milestones:\n**\n**  *  Resolve names and similar preparation                tag-select-0100\n**  *  Scan of the FROM clause                              tag-select-0200\n**      +  OUTER JOIN strength reduction                      tag-select-0220\n**      +  Sub-query ORDER BY removal                         tag-select-0230\n**      +  Query flattening                                   tag-select-0240\n**  *  Separate subroutine for compound-SELECT              tag-select-0300\n**  *  WHERE-clause constant propagation                    tag-select-0330\n**  *  Count()-of-VIEW optimization                         tag-select-0350\n**  *  Scan of the FROM clause again                        tag-select-0400\n**      +  Authorize unreferenced tables                      tag-select-0410\n**      +  Predicate push-down optimization                   tag-select-0420\n**      +  Omit unused subquery columns optimization          tag-select-0440\n**      +  Generate code to implement subqueries              tag-select-0480\n**         -  Co-routines                                       tag-select-0482\n**         -  Reuse previously computed CTE                     tag-select-0484\n**         -  REuse previously computed VIEW                    tag-select-0486\n**         -  Materialize a VIEW or CTE                         tag-select-0488\n**  *  DISTINCT ORDER BY -> GROUP BY optimization           tag-select-0500\n**  *  Set up for ORDER BY                                  tag-select-0600\n**  *  Create output table                                  tag-select-0630\n**  *  Prepare registers for LIMIT                          tag-select-0650\n**  *  Setup for DISTINCT                                   tag-select-0680\n**  *  Generate code for non-aggregate and non-GROUP BY     tag-select-0700\n**  *  Generate code for aggregate and/or GROUP BY          tag-select-0800\n**      +  GROUP BY queries                                   tag-select-0810\n**      +  non-GROUP BY queries                               tag-select-0820\n**         -  Special case of count() w/o GROUP BY              tag-select-0821\n**         -  General case of non-GROUP BY aggregates           tag-select-0822\n**  *  Sort results, as needed                              tag-select-0900\n**  *  Internal self-checks                                 tag-select-1000\n*/\nSQLITE_PRIVATE int sqlite3Select(\n  Parse *pParse,         /* The parser context */\n  Select *p,             /* The SELECT statement being coded. */\n  SelectDest *pDest      /* What to do with the query results */\n){\n  int i, j;              /* Loop counters */\n  WhereInfo *pWInfo;     /* Return from sqlite3WhereBegin() */\n  Vdbe *v;               /* The virtual machine under construction */\n  int isAgg;             /* True for select lists like \"count(*)\" */\n  ExprList *pEList = 0;  /* List of columns to extract. */\n  SrcList *pTabList;     /* List of tables to select from */\n  Expr *pWhere;          /* The WHERE clause.  May be NULL */\n  ExprList *pGroupBy;    /* The GROUP BY clause.  May be NULL */\n  Expr *pHaving;         /* The HAVING clause.  May be NULL */\n  AggInfo *pAggInfo = 0; /* Aggregate information */\n  int rc = 1;            /* Value to return from this function */\n  DistinctCtx sDistinct; /* Info on how to code the DISTINCT keyword */\n  SortCtx sSort;         /* Info on how to code the ORDER BY clause */\n  int iEnd;              /* Address of the end of the query */\n  sqlite3 *db;           /* The database connection */\n  ExprList *pMinMaxOrderBy = 0;  /* Added ORDER BY for min/max queries */\n  u8 minMaxFlag;                 /* Flag for min/max queries */\n\n  db = pParse->db;\n  assert( pParse==db->pParse );\n  v = sqlite3GetVdbe(pParse);\n  if( p==0 || pParse->nErr ){\n    return 1;\n  }\n  assert( db->mallocFailed==0 );\n  if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;\n#if TREETRACE_ENABLED\n  TREETRACE(0x1,pParse,p, (\"begin processing:\\n\", pParse->addrExplain));\n  if( sqlite3TreeTrace & 0x10000 ){\n    if( (sqlite3TreeTrace & 0x10001)==0x10000 ){\n      sqlite3TreeViewLine(0, \"In sqlite3Select() at %s:%d\",\n                           __FILE__, __LINE__);\n    }\n    sqlite3ShowSelect(p);\n  }\n#endif\n\n  /* tag-select-0100 */\n  assert( p->pOrderBy==0 || pDest->eDest!=SRT_DistFifo );\n  assert( p->pOrderBy==0 || pDest->eDest!=SRT_Fifo );\n  assert( p->pOrderBy==0 || pDest->eDest!=SRT_DistQueue );\n  assert( p->pOrderBy==0 || pDest->eDest!=SRT_Queue );\n  if( IgnorableDistinct(pDest) ){\n    assert(pDest->eDest==SRT_Exists     || pDest->eDest==SRT_Union ||\n           pDest->eDest==SRT_Except     || pDest->eDest==SRT_Discard ||\n           pDest->eDest==SRT_DistQueue  || pDest->eDest==SRT_DistFifo );\n    /* All of these destinations are also able to ignore the ORDER BY clause */\n    if( p->pOrderBy ){\n#if TREETRACE_ENABLED\n      TREETRACE(0x800,pParse,p, (\"dropping superfluous ORDER BY:\\n\"));\n      if( sqlite3TreeTrace & 0x800 ){\n        sqlite3TreeViewExprList(0, p->pOrderBy, 0, \"ORDERBY\");\n      }\n#endif\n      sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric,\n                              p->pOrderBy);\n      testcase( pParse->earlyCleanup );\n      p->pOrderBy = 0;\n    }\n    p->selFlags &= ~(u32)SF_Distinct;\n    p->selFlags |= SF_NoopOrderBy;\n  }\n  sqlite3SelectPrep(pParse, p, 0);\n  if( pParse->nErr ){\n    goto select_end;\n  }\n  assert( db->mallocFailed==0 );\n  assert( p->pEList!=0 );\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x10 ){\n    TREETRACE(0x10,pParse,p, (\"after name resolution:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n\n  /* If the SELECT statement contains ON clauses that were moved into\n  ** the WHERE clause, go through and verify that none of the terms\n  ** in the ON clauses reference tables to the right of the ON clause.\n  ** Do this now, after name resolution, but before query flattening\n  */\n  if( p->selFlags & SF_OnToWhere ){\n    selectCheckOnClauses(pParse, p);\n    if( pParse->nErr ){\n      goto select_end;\n    }\n  }\n\n  /* If the SF_UFSrcCheck flag is set, then this function is being called\n  ** as part of populating the temp table for an UPDATE...FROM statement.\n  ** In this case, it is an error if the target object (pSrc->a[0]) name\n  ** or alias is duplicated within FROM clause (pSrc->a[1..n]).\n  **\n  ** Postgres disallows this case too. The reason is that some other\n  ** systems handle this case differently, and not all the same way,\n  ** which is just confusing. To avoid this, we follow PG's lead and\n  ** disallow it altogether.  */\n  if( p->selFlags & SF_UFSrcCheck ){\n    SrcItem *p0 = &p->pSrc->a[0];\n    if( sameSrcAlias(p0, p->pSrc) ){\n      sqlite3ErrorMsg(pParse,\n          \"target object/alias may not appear in FROM clause: %s\",\n          p0->zAlias ? p0->zAlias : p0->pSTab->zName\n      );\n      goto select_end;\n    }\n\n    /* Clear the SF_UFSrcCheck flag. The check has already been performed,\n    ** and leaving this flag set can cause errors if a compound sub-query\n    ** in p->pSrc is flattened into this query and this function called\n    ** again as part of compound SELECT processing.  */\n    p->selFlags &= ~(u32)SF_UFSrcCheck;\n  }\n\n  if( pDest->eDest==SRT_Output ){\n    sqlite3GenerateColumnNames(pParse, p);\n  }\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( sqlite3WindowRewrite(pParse, p) ){\n    assert( pParse->nErr );\n    goto select_end;\n  }\n#if TREETRACE_ENABLED\n  if( p->pWin && (sqlite3TreeTrace & 0x40)!=0 ){\n    TREETRACE(0x40,pParse,p, (\"after window rewrite:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n  pTabList = p->pSrc;\n  isAgg = (p->selFlags & SF_Aggregate)!=0;\n  memset(&sSort, 0, sizeof(sSort));\n  sSort.pOrderBy = p->pOrderBy;\n\n  /* Try to do various optimizations (flattening subqueries, and strength\n  ** reduction of join operators) in the FROM clause up into the main query\n  ** tag-select-0200\n  */\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n  for(i=0; !p->pPrior && i<pTabList->nSrc; i++){\n    SrcItem *pItem = &pTabList->a[i];\n    Select *pSub = pItem->fg.isSubquery ? pItem->u4.pSubq->pSelect : 0;\n    Table *pTab = pItem->pSTab;\n\n    /* The expander should have already created transient Table objects\n    ** even for FROM clause elements such as subqueries that do not correspond\n    ** to a real table */\n    assert( pTab!=0 );\n\n    /* Try to simplify joins:\n    **\n    **      LEFT JOIN  ->  JOIN\n    **     RIGHT JOIN  ->  JOIN\n    **      FULL JOIN  ->  RIGHT JOIN\n    **\n    ** If terms of the i-th table are used in the WHERE clause in such a\n    ** way that the i-th table cannot be the NULL row of a join, then\n    ** perform the appropriate simplification. This is called\n    ** \"OUTER JOIN strength reduction\" in the SQLite documentation.\n    ** tag-select-0220\n    */\n    if( (pItem->fg.jointype & (JT_LEFT|JT_LTORJ))!=0\n     && sqlite3ExprImpliesNonNullRow(p->pWhere, pItem->iCursor,\n                                     pItem->fg.jointype & JT_LTORJ)\n     && OptimizationEnabled(db, SQLITE_SimplifyJoin)\n    ){\n      if( pItem->fg.jointype & JT_LEFT ){\n        if( pItem->fg.jointype & JT_RIGHT ){\n          TREETRACE(0x1000,pParse,p,\n                    (\"FULL-JOIN simplifies to RIGHT-JOIN on term %d\\n\",i));\n          pItem->fg.jointype &= ~JT_LEFT;\n        }else{\n          TREETRACE(0x1000,pParse,p,\n                    (\"LEFT-JOIN simplifies to JOIN on term %d\\n\",i));\n          pItem->fg.jointype &= ~(JT_LEFT|JT_OUTER);\n          unsetJoinExpr(p->pWhere, pItem->iCursor, 0);\n        }\n      }\n      if( pItem->fg.jointype & JT_LTORJ ){\n        for(j=i+1; j<pTabList->nSrc; j++){\n          SrcItem *pI2 = &pTabList->a[j];\n          if( pI2->fg.jointype & JT_RIGHT ){\n            if( pI2->fg.jointype & JT_LEFT ){\n              TREETRACE(0x1000,pParse,p,\n                        (\"FULL-JOIN simplifies to LEFT-JOIN on term %d\\n\",j));\n              pI2->fg.jointype &= ~JT_RIGHT;\n            }else{\n              TREETRACE(0x1000,pParse,p,\n                        (\"RIGHT-JOIN simplifies to JOIN on term %d\\n\",j));\n              pI2->fg.jointype &= ~(JT_RIGHT|JT_OUTER);\n              unsetJoinExpr(p->pWhere, pI2->iCursor, 1);\n            }\n          }\n        }\n        for(j=pTabList->nSrc-1; j>=0; j--){\n          pTabList->a[j].fg.jointype &= ~JT_LTORJ;\n          if( pTabList->a[j].fg.jointype & JT_RIGHT ) break;\n        }\n      }\n    }\n\n    /* No further action if this term of the FROM clause is not a subquery */\n    if( pSub==0 ) continue;\n\n    /* Catch mismatch in the declared columns of a view and the number of\n    ** columns in the SELECT on the RHS */\n    if( pTab->nCol!=pSub->pEList->nExpr ){\n      sqlite3ErrorMsg(pParse, \"expected %d columns for '%s' but got %d\",\n                      pTab->nCol, pTab->zName, pSub->pEList->nExpr);\n      goto select_end;\n    }\n\n    /* Do not attempt the usual optimizations (flattening and ORDER BY\n    ** elimination) on a MATERIALIZED common table expression because\n    ** a MATERIALIZED common table expression is an optimization fence.\n    */\n    if( pItem->fg.isCte && pItem->u2.pCteUse->eM10d==M10d_Yes ){\n      continue;\n    }\n\n    /* Do not try to flatten an aggregate subquery.\n    **\n    ** Flattening an aggregate subquery is only possible if the outer query\n    ** is not a join.  But if the outer query is not a join, then the subquery\n    ** will be implemented as a co-routine and there is no advantage to\n    ** flattening in that case.\n    */\n    if( (pSub->selFlags & SF_Aggregate)!=0 ) continue;\n    assert( pSub->pGroupBy==0 );\n\n    /* tag-select-0230:\n    ** If a FROM-clause subquery has an ORDER BY clause that is not\n    ** really doing anything, then delete it now so that it does not\n    ** interfere with query flattening.  See the discussion at\n    ** https://sqlite.org/forum/forumpost/2d76f2bcf65d256a\n    **\n    ** Beware of these cases where the ORDER BY clause may not be safely\n    ** omitted:\n    **\n    **    (1)   There is also a LIMIT clause\n    **    (2)   The subquery was added to help with window-function\n    **          processing\n    **    (3)   The subquery is in the FROM clause of an UPDATE\n    **    (4)   The outer query uses an aggregate function other than\n    **          the built-in count(), min(), or max().\n    **    (5)   The ORDER BY isn't going to accomplish anything because\n    **          one of:\n    **            (a)  The outer query has a different ORDER BY clause\n    **            (b)  The subquery is part of a join\n    **          See forum post 062d576715d277c8\n    **    (6)   The subquery is not a recursive CTE.  ORDER BY has a different\n    **          meaning for recursive CTEs and this optimization does not\n    **          apply.\n    **\n    ** Also retain the ORDER BY if the OmitOrderBy optimization is disabled.\n    */\n    if( pSub->pOrderBy!=0\n     && (p->pOrderBy!=0 || pTabList->nSrc>1)      /* Condition (5) */\n     && pSub->pLimit==0                           /* Condition (1) */\n     && (pSub->selFlags & (SF_OrderByReqd|SF_Recursive))==0  /* (2) and (6) */\n     && (p->selFlags & SF_OrderByReqd)==0         /* Condition (3) and (4) */\n     && OptimizationEnabled(db, SQLITE_OmitOrderBy)\n    ){\n      TREETRACE(0x800,pParse,p,\n                (\"omit superfluous ORDER BY on %r FROM-clause subquery\\n\",i+1));\n      sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric,\n                              pSub->pOrderBy);\n      pSub->pOrderBy = 0;\n    }\n\n    /* If the outer query contains a \"complex\" result set (that is,\n    ** if the result set of the outer query uses functions or subqueries)\n    ** and if the subquery contains an ORDER BY clause and if\n    ** it will be implemented as a co-routine, then do not flatten.  This\n    ** restriction allows SQL constructs like this:\n    **\n    **  SELECT expensive_function(x)\n    **    FROM (SELECT x FROM tab ORDER BY y LIMIT 10);\n    **\n    ** The expensive_function() is only computed on the 10 rows that\n    ** are output, rather than every row of the table.\n    **\n    ** The requirement that the outer query have a complex result set\n    ** means that flattening does occur on simpler SQL constraints without\n    ** the expensive_function() like:\n    **\n    **  SELECT x FROM (SELECT x FROM tab ORDER BY y LIMIT 10);\n    */\n    if( pSub->pOrderBy!=0\n     && i==0\n     && (p->selFlags & SF_ComplexResult)!=0\n     && (pTabList->nSrc==1\n         || (pTabList->a[1].fg.jointype&(JT_OUTER|JT_CROSS))!=0)\n    ){\n      continue;\n    }\n\n    /* tag-select-0240 */\n    if( flattenSubquery(pParse, p, i, isAgg) ){\n      if( pParse->nErr ) goto select_end;\n      /* This subquery can be absorbed into its parent. */\n      i = -1;\n    }\n    pTabList = p->pSrc;\n    if( db->mallocFailed ) goto select_end;\n    if( !IgnorableOrderby(pDest) ){\n      sSort.pOrderBy = p->pOrderBy;\n    }\n  }\n#endif\n\n#ifndef SQLITE_OMIT_COMPOUND_SELECT\n  /* Handle compound SELECT statements using the separate multiSelect()\n  ** procedure.  tag-select-0300\n  */\n  if( p->pPrior ){\n    rc = multiSelect(pParse, p, pDest);\n#if TREETRACE_ENABLED\n    TREETRACE(0x400,pParse,p,(\"end compound-select processing\\n\"));\n    if( (sqlite3TreeTrace & 0x400)!=0 && ExplainQueryPlanParent(pParse)==0 ){\n      sqlite3TreeViewSelect(0, p, 0);\n    }\n#endif\n    if( p->pNext==0 ) ExplainQueryPlanPop(pParse);\n    return rc;\n  }\n#endif\n\n  /* If there may be an \"EXISTS (SELECT ...)\" in the WHERE clause, attempt\n  ** to change it into a join.  */\n  if( pParse->bHasExists && OptimizationEnabled(db,SQLITE_ExistsToJoin) ){\n    existsToJoin(pParse, p, p->pWhere);\n    pTabList = p->pSrc;\n  }\n\n  /* Do the WHERE-clause constant propagation optimization if this is\n  ** a join.  No need to spend time on this operation for non-join queries\n  ** as the equivalent optimization will be handled by query planner in\n  ** sqlite3WhereBegin().  tag-select-0330\n  */\n  if( p->pWhere!=0\n   && p->pWhere->op==TK_AND\n   && OptimizationEnabled(db, SQLITE_PropagateConst)\n   && propagateConstants(pParse, p)\n  ){\n#if TREETRACE_ENABLED\n    if( sqlite3TreeTrace & 0x2000 ){\n      TREETRACE(0x2000,pParse,p,(\"After constant propagation:\\n\"));\n      sqlite3TreeViewSelect(0, p, 0);\n    }\n#endif\n  }else{\n    TREETRACE(0x2000,pParse,p,(\"Constant propagation not helpful\\n\"));\n  }\n\n  /* tag-select-0350 */\n  if( OptimizationEnabled(db, SQLITE_QueryFlattener|SQLITE_CountOfView)\n   && countOfViewOptimization(pParse, p)\n  ){\n    if( db->mallocFailed ) goto select_end;\n    pTabList = p->pSrc;\n  }\n\n  /* Loop over all terms in the FROM clause and do two things for each term:\n  **\n  **   (1) Authorize unreferenced tables\n  **   (2) Generate code for all sub-queries\n  **\n  ** tag-select-0400\n  */\n  for(i=0; i<pTabList->nSrc; i++){\n    SrcItem *pItem = &pTabList->a[i];\n    SrcItem *pPrior;\n    SelectDest dest;\n    Subquery *pSubq;\n    Select *pSub;\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n    const char *zSavedAuthContext;\n#endif\n\n    /* Authorized unreferenced tables.  tag-select-0410\n    **\n    ** Issue SQLITE_READ authorizations with a fake column name for any\n    ** tables that are referenced but from which no values are extracted.\n    ** Examples of where these kinds of null SQLITE_READ authorizations\n    ** would occur:\n    **\n    **     SELECT count(*) FROM t1;   -- SQLITE_READ t1.\"\"\n    **     SELECT t1.* FROM t1, t2;   -- SQLITE_READ t2.\"\"\n    **\n    ** The fake column name is an empty string.  It is possible for a table to\n    ** have a column named by the empty string, in which case there is no way to\n    ** distinguish between an unreferenced table and an actual reference to the\n    ** \"\" column. The original design was for the fake column name to be a NULL,\n    ** which would be unambiguous.  But legacy authorization callbacks might\n    ** assume the column name is non-NULL and segfault.  The use of an empty\n    ** string for the fake column name seems safer.\n    */\n    if( pItem->colUsed==0 && pItem->zName!=0 ){\n      const char *zDb;\n      if( pItem->fg.fixedSchema ){\n        int iDb = sqlite3SchemaToIndex(pParse->db, pItem->u4.pSchema);\n        zDb = db->aDb[iDb].zDbSName;\n      }else if( pItem->fg.isSubquery ){\n        zDb = 0;\n      }else{\n        zDb = pItem->u4.zDatabase;\n      }\n      sqlite3AuthCheck(pParse, SQLITE_READ, pItem->zName, \"\", zDb);\n    }\n\n#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)\n    /* Generate code for all sub-queries in the FROM clause\n    */\n    if( pItem->fg.isSubquery==0 ) continue;\n    pSubq = pItem->u4.pSubq;\n    assert( pSubq!=0 );\n    pSub = pSubq->pSelect;\n\n    /* The code for a subquery should only be generated once. */\n    if( pSubq->addrFillSub!=0 ) continue;\n\n    /* Increment Parse.nHeight by the height of the largest expression\n    ** tree referred to by this, the parent select. The child select\n    ** may contain expression trees of at most\n    ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit\n    ** more conservative than necessary, but much easier than enforcing\n    ** an exact limit.\n    */\n    pParse->nHeight += sqlite3SelectExprHeight(p);\n\n    /* Make copies of constant WHERE-clause terms in the outer query down\n    ** inside the subquery.  This can help the subquery to run more efficiently.\n    ** This is the \"predicate push-down optimization\".  tag-select-0420\n    */\n    if( OptimizationEnabled(db, SQLITE_PushDown)\n     && (pItem->fg.isCte==0\n         || (pItem->u2.pCteUse->eM10d!=M10d_Yes && pItem->u2.pCteUse->nUse<2))\n     && pushDownWhereTerms(pParse, pSub, p->pWhere, pTabList, i)\n    ){\n#if TREETRACE_ENABLED\n      if( sqlite3TreeTrace & 0x4000 ){\n        TREETRACE(0x4000,pParse,p,\n            (\"After WHERE-clause push-down into subquery %d:\\n\", pSub->selId));\n        sqlite3TreeViewSelect(0, p, 0);\n      }\n#endif\n      assert( pSubq->pSelect && (pSub->selFlags & SF_PushDown)!=0 );\n    }else{\n      TREETRACE(0x4000,pParse,p,(\"WHERE-clause push-down not possible\\n\"));\n    }\n\n    /* Convert unused result columns of the subquery into simple NULL\n    ** expressions, to avoid unneeded searching and computation.\n    ** tag-select-0440\n    */\n    if( OptimizationEnabled(db, SQLITE_NullUnusedCols)\n     && disableUnusedSubqueryResultColumns(pItem)\n    ){\n#if TREETRACE_ENABLED\n      if( sqlite3TreeTrace & 0x4000 ){\n        TREETRACE(0x4000,pParse,p,\n            (\"Change unused result columns to NULL for subquery %d:\\n\",\n             pSub->selId));\n        sqlite3TreeViewSelect(0, p, 0);\n      }\n#endif\n    }\n\n    zSavedAuthContext = pParse->zAuthContext;\n    pParse->zAuthContext = pItem->zName;\n\n    /* Generate byte-code to implement the subquery  tag-select-0480\n    */\n    if( fromClauseTermCanBeCoroutine(pParse, pTabList, i, p->selFlags) ){\n      /* Implement a co-routine that will return a single row of the result\n      ** set on each invocation.  tag-select-0482\n      */\n      int addrTop = sqlite3VdbeCurrentAddr(v)+1;\n\n      pSubq->regReturn = ++pParse->nMem;\n      sqlite3VdbeAddOp3(v, OP_InitCoroutine, pSubq->regReturn, 0, addrTop);\n      VdbeComment((v, \"%!S\", pItem));\n      pSubq->addrFillSub = addrTop;\n      sqlite3SelectDestInit(&dest, SRT_Coroutine, pSubq->regReturn);\n      ExplainQueryPlan((pParse, 1, \"CO-ROUTINE %!S\", pItem));\n      sqlite3Select(pParse, pSub, &dest);\n      pItem->pSTab->nRowLogEst = pSub->nSelectRow;\n      pItem->fg.viaCoroutine = 1;\n      pSubq->regResult = dest.iSdst;\n      sqlite3VdbeEndCoroutine(v, pSubq->regReturn);\n      VdbeComment((v, \"end %!S\", pItem));\n      sqlite3VdbeJumpHere(v, addrTop-1);\n      sqlite3ClearTempRegCache(pParse);\n    }else if( pItem->fg.isCte && pItem->u2.pCteUse->addrM9e>0 ){\n      /* This is a CTE for which materialization code has already been\n      ** generated.  Invoke the subroutine to compute the materialization,\n      ** then make the pItem->iCursor be a copy of the ephemeral table that\n      ** holds the result of the materialization. tag-select-0484 */\n      CteUse *pCteUse = pItem->u2.pCteUse;\n      sqlite3VdbeAddOp2(v, OP_Gosub, pCteUse->regRtn, pCteUse->addrM9e);\n      if( pItem->iCursor!=pCteUse->iCur ){\n        sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pCteUse->iCur);\n        VdbeComment((v, \"%!S\", pItem));\n      }\n      pSub->nSelectRow = pCteUse->nRowEst;\n    }else if( (pPrior = isSelfJoinView(pTabList, pItem, 0, i))!=0 ){\n      /* This view has already been materialized by a prior entry in\n      ** this same FROM clause.  Reuse it.  tag-select-0486 */\n      Subquery *pPriorSubq;\n      assert( pPrior->fg.isSubquery );\n      pPriorSubq = pPrior->u4.pSubq;\n      assert( pPriorSubq!=0 );\n      if( pPriorSubq->addrFillSub ){\n        sqlite3VdbeAddOp2(v, OP_Gosub, pPriorSubq->regReturn,\n                                       pPriorSubq->addrFillSub);\n      }\n      sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pPrior->iCursor);\n      pSub->nSelectRow = pPriorSubq->pSelect->nSelectRow;\n    }else{\n      /* Materialize the view.  If the view is not correlated, generate a\n      ** subroutine to do the materialization so that subsequent uses of\n      ** the same view can reuse the materialization.  tag-select-0488 */\n      int topAddr;\n      int onceAddr = 0;\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n      int addrExplain;\n#endif\n\n      pSubq->regReturn = ++pParse->nMem;\n      topAddr = sqlite3VdbeAddOp0(v, OP_Goto);\n      pSubq->addrFillSub = topAddr+1;\n      pItem->fg.isMaterialized = 1;\n      if( pItem->fg.isCorrelated==0 ){\n        /* If the subquery is not correlated and if we are not inside of\n        ** a trigger, then we only need to compute the value of the subquery\n        ** once. */\n        onceAddr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n        VdbeComment((v, \"materialize %!S\", pItem));\n      }else{\n        VdbeNoopComment((v, \"materialize %!S\", pItem));\n      }\n      sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);\n\n      ExplainQueryPlan2(addrExplain, (pParse, 1, \"MATERIALIZE %!S\", pItem));\n      sqlite3Select(pParse, pSub, &dest);\n      pItem->pSTab->nRowLogEst = pSub->nSelectRow;\n      if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);\n      sqlite3VdbeAddOp2(v, OP_Return, pSubq->regReturn, topAddr+1);\n      VdbeComment((v, \"end %!S\", pItem));\n      sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1);\n      sqlite3VdbeJumpHere(v, topAddr);\n      sqlite3ClearTempRegCache(pParse);\n      if( pItem->fg.isCte && pItem->fg.isCorrelated==0 ){\n        CteUse *pCteUse = pItem->u2.pCteUse;\n        pCteUse->addrM9e = pSubq->addrFillSub;\n        pCteUse->regRtn = pSubq->regReturn;\n        pCteUse->iCur = pItem->iCursor;\n        pCteUse->nRowEst = pSub->nSelectRow;\n      }\n    }\n    if( db->mallocFailed ) goto select_end;\n    pParse->nHeight -= sqlite3SelectExprHeight(p);\n    pParse->zAuthContext = zSavedAuthContext;\n#endif\n  }\n\n  /* Various elements of the SELECT copied into local variables for\n  ** convenience */\n  pEList = p->pEList;\n  pWhere = p->pWhere;\n  pGroupBy = p->pGroupBy;\n  pHaving = p->pHaving;\n  sDistinct.isTnct = (p->selFlags & SF_Distinct)!=0;\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x8000 ){\n    TREETRACE(0x8000,pParse,p,(\"After all FROM-clause analysis:\\n\"));\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n\n  /* tag-select-0500\n  **\n  ** If the query is DISTINCT with an ORDER BY but is not an aggregate, and\n  ** if the select-list is the same as the ORDER BY list, then this query\n  ** can be rewritten as a GROUP BY. In other words, this:\n  **\n  **     SELECT DISTINCT xyz FROM ... ORDER BY xyz\n  **\n  ** is transformed to:\n  **\n  **     SELECT xyz FROM ... GROUP BY xyz ORDER BY xyz\n  **\n  ** The second form is preferred as a single index (or temp-table) may be\n  ** used for both the ORDER BY and DISTINCT processing. As originally\n  ** written the query must use a temp-table for at least one of the ORDER\n  ** BY and DISTINCT, and an index or separate temp-table for the other.\n  */\n  if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct\n   && sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0\n   && OptimizationEnabled(db, SQLITE_GroupByOrder)\n#ifndef SQLITE_OMIT_WINDOWFUNC\n   && p->pWin==0\n#endif\n  ){\n    p->selFlags &= ~(u32)SF_Distinct;\n    pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0);\n    if( pGroupBy ){\n      for(i=0; i<pGroupBy->nExpr; i++){\n        pGroupBy->a[i].u.x.iOrderByCol = i+1;\n      }\n    }\n    p->selFlags |= SF_Aggregate;\n    /* Notice that even thought SF_Distinct has been cleared from p->selFlags,\n    ** the sDistinct.isTnct is still set.  Hence, isTnct represents the\n    ** original setting of the SF_Distinct flag, not the current setting */\n    assert( sDistinct.isTnct );\n    sDistinct.isTnct = 2;\n\n#if TREETRACE_ENABLED\n    if( sqlite3TreeTrace & 0x20000 ){\n      TREETRACE(0x20000,pParse,p,(\"Transform DISTINCT into GROUP BY:\\n\"));\n      sqlite3TreeViewSelect(0, p, 0);\n    }\n#endif\n  }\n\n  /* If there is an ORDER BY clause, then create an ephemeral index to\n  ** do the sorting.  But this sorting ephemeral index might end up\n  ** being unused if the data can be extracted in pre-sorted order.\n  ** If that is the case, then the OP_OpenEphemeral instruction will be\n  ** changed to an OP_Noop once we figure out that the sorting index is\n  ** not needed.  The sSort.addrSortIndex variable is used to facilitate\n  ** that change.  tag-select-0600\n  */\n  if( sSort.pOrderBy ){\n    KeyInfo *pKeyInfo;\n    pKeyInfo = sqlite3KeyInfoFromExprList(\n        pParse, sSort.pOrderBy, 0, pEList->nExpr);\n    sSort.iECursor = pParse->nTab++;\n    sSort.addrSortIndex =\n      sqlite3VdbeAddOp4(v, OP_OpenEphemeral,\n          sSort.iECursor, sSort.pOrderBy->nExpr+1+pEList->nExpr, 0,\n          (char*)pKeyInfo, P4_KEYINFO\n      );\n  }else{\n    sSort.addrSortIndex = -1;\n  }\n\n  /* If the output is destined for a temporary table, open that table.\n  ** tag-select-0630\n  */\n  if( pDest->eDest==SRT_EphemTab ){\n    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pDest->iSDParm, pEList->nExpr);\n    if( p->selFlags & SF_NestedFrom ){\n      /* Delete or NULL-out result columns that will never be used */\n      int ii;\n      for(ii=pEList->nExpr-1; ii>0 && pEList->a[ii].fg.bUsed==0; ii--){\n        sqlite3ExprDelete(db, pEList->a[ii].pExpr);\n        sqlite3DbFree(db, pEList->a[ii].zEName);\n        pEList->nExpr--;\n      }\n      for(ii=0; ii<pEList->nExpr; ii++){\n        if( pEList->a[ii].fg.bUsed==0 ) pEList->a[ii].pExpr->op = TK_NULL;\n      }\n    }\n  }\n\n  /* Set the limiter.  tag-select-0650\n  */\n  iEnd = sqlite3VdbeMakeLabel(pParse);\n  if( (p->selFlags & SF_FixedLimit)==0 ){\n    p->nSelectRow = 320;  /* 4 billion rows */\n  }\n  if( p->pLimit ) computeLimitRegisters(pParse, p, iEnd);\n  if( p->iLimit==0 && sSort.addrSortIndex>=0 ){\n    sqlite3VdbeChangeOpcode(v, sSort.addrSortIndex, OP_SorterOpen);\n    sSort.sortFlags |= SORTFLAG_UseSorter;\n  }\n\n  /* Open an ephemeral index to use for the distinct set. tag-select-0680\n  */\n  if( p->selFlags & SF_Distinct ){\n    sDistinct.tabTnct = pParse->nTab++;\n    sDistinct.addrTnct = sqlite3VdbeAddOp4(v, OP_OpenEphemeral,\n                       sDistinct.tabTnct, 0, 0,\n                       (char*)sqlite3KeyInfoFromExprList(pParse, p->pEList,0,0),\n                       P4_KEYINFO);\n    sqlite3VdbeChangeP5(v, BTREE_UNORDERED);\n    sDistinct.eTnctType = WHERE_DISTINCT_UNORDERED;\n  }else{\n    sDistinct.eTnctType = WHERE_DISTINCT_NOOP;\n  }\n\n  if( !isAgg && pGroupBy==0 ){\n    /* No aggregate functions and no GROUP BY clause.  tag-select-0700 */\n    u16 wctrlFlags = (sDistinct.isTnct ? WHERE_WANT_DISTINCT : 0)\n                   | (p->selFlags & SF_FixedLimit);\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    Window *pWin = p->pWin;      /* Main window object (or NULL) */\n    if( pWin ){\n      sqlite3WindowCodeInit(pParse, p);\n    }\n#endif\n    assert( WHERE_USE_LIMIT==SF_FixedLimit );\n\n\n    /* Begin the database scan. */\n    TREETRACE(0x2,pParse,p,(\"WhereBegin\\n\"));\n    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, sSort.pOrderBy,\n                               p->pEList, p, wctrlFlags, p->nSelectRow);\n    if( pWInfo==0 ) goto select_end;\n    if( sqlite3WhereOutputRowCount(pWInfo) < p->nSelectRow ){\n      p->nSelectRow = sqlite3WhereOutputRowCount(pWInfo);\n      if( pDest->eDest<=SRT_DistQueue && pDest->eDest>=SRT_DistFifo ){\n        /* TUNING: For a UNION CTE, because UNION is implies DISTINCT,\n        ** reduce the estimated output row count by 8 (LogEst 30).\n        ** Search for tag-20250414a to see other cases */\n        p->nSelectRow -= 30;\n      }\n    }\n    if( sDistinct.isTnct && sqlite3WhereIsDistinct(pWInfo) ){\n      sDistinct.eTnctType = sqlite3WhereIsDistinct(pWInfo);\n    }\n    if( sSort.pOrderBy ){\n      sSort.nOBSat = sqlite3WhereIsOrdered(pWInfo);\n      sSort.labelOBLopt = sqlite3WhereOrderByLimitOptLabel(pWInfo);\n      if( sSort.nOBSat==sSort.pOrderBy->nExpr ){\n        sSort.pOrderBy = 0;\n      }\n    }\n    TREETRACE(0x2,pParse,p,(\"WhereBegin returns\\n\"));\n\n    /* If sorting index that was created by a prior OP_OpenEphemeral\n    ** instruction ended up not being needed, then change the OP_OpenEphemeral\n    ** into an OP_Noop.\n    */\n    if( sSort.addrSortIndex>=0 && sSort.pOrderBy==0 ){\n      sqlite3VdbeChangeToNoop(v, sSort.addrSortIndex);\n    }\n\n    assert( p->pEList==pEList );\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( pWin ){\n      int addrGosub = sqlite3VdbeMakeLabel(pParse);\n      int iCont = sqlite3VdbeMakeLabel(pParse);\n      int iBreak = sqlite3VdbeMakeLabel(pParse);\n      int regGosub = ++pParse->nMem;\n\n      sqlite3WindowCodeStep(pParse, p, pWInfo, regGosub, addrGosub);\n\n      sqlite3VdbeAddOp2(v, OP_Goto, 0, iBreak);\n      sqlite3VdbeResolveLabel(v, addrGosub);\n      VdbeNoopComment((v, \"inner-loop subroutine\"));\n      sSort.labelOBLopt = 0;\n      selectInnerLoop(pParse, p, -1, &sSort, &sDistinct, pDest, iCont, iBreak);\n      sqlite3VdbeResolveLabel(v, iCont);\n      sqlite3VdbeAddOp1(v, OP_Return, regGosub);\n      VdbeComment((v, \"end inner-loop subroutine\"));\n      sqlite3VdbeResolveLabel(v, iBreak);\n    }else\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n    {\n      /* Use the standard inner loop. */\n      selectInnerLoop(pParse, p, -1, &sSort, &sDistinct, pDest,\n          sqlite3WhereContinueLabel(pWInfo),\n          sqlite3WhereBreakLabel(pWInfo));\n\n      /* End the database scan loop.\n      */\n      TREETRACE(0x2,pParse,p,(\"WhereEnd\\n\"));\n      sqlite3WhereEnd(pWInfo);\n    }\n  }else{\n    /* This case is for when there exist aggregate functions or a GROUP BY\n    ** clause or both.  tag-select-0800 */\n    NameContext sNC;    /* Name context for processing aggregate information */\n    int iAMem;          /* First Mem address for storing current GROUP BY */\n    int iBMem;          /* First Mem address for previous GROUP BY */\n    int iUseFlag;       /* Mem address holding flag indicating that at least\n                        ** one row of the input to the aggregator has been\n                        ** processed */\n    int iAbortFlag;     /* Mem address which causes query abort if positive */\n    int groupBySort;    /* Rows come from source in GROUP BY order */\n    int addrEnd;        /* End of processing for this SELECT */\n    int sortPTab = 0;   /* Pseudotable used to decode sorting results */\n    int sortOut = 0;    /* Output register from the sorter */\n    int orderByGrp = 0; /* True if the GROUP BY and ORDER BY are the same */\n\n    /* Remove any and all aliases between the result set and the\n    ** GROUP BY clause.\n    */\n    if( pGroupBy ){\n      int k;                        /* Loop counter */\n      struct ExprList_item *pItem;  /* For looping over expression in a list */\n\n      for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){\n        pItem->u.x.iAlias = 0;\n      }\n      for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){\n        pItem->u.x.iAlias = 0;\n      }\n      assert( 66==sqlite3LogEst(100) );\n      if( p->nSelectRow>66 ) p->nSelectRow = 66;\n\n      /* If there is both a GROUP BY and an ORDER BY clause and they are\n      ** identical, then it may be possible to disable the ORDER BY clause\n      ** on the grounds that the GROUP BY will cause elements to come out\n      ** in the correct order. It also may not - the GROUP BY might use a\n      ** database index that causes rows to be grouped together as required\n      ** but not actually sorted. Either way, record the fact that the\n      ** ORDER BY and GROUP BY clauses are the same by setting the orderByGrp\n      ** variable.  */\n      if( sSort.pOrderBy && pGroupBy->nExpr==sSort.pOrderBy->nExpr ){\n        int ii;\n        /* The GROUP BY processing doesn't care whether rows are delivered in\n        ** ASC or DESC order - only that each group is returned contiguously.\n        ** So set the ASC/DESC flags in the GROUP BY to match those in the\n        ** ORDER BY to maximize the chances of rows being delivered in an\n        ** order that makes the ORDER BY redundant.  */\n        for(ii=0; ii<pGroupBy->nExpr; ii++){\n          u8 sortFlags;\n          sortFlags = sSort.pOrderBy->a[ii].fg.sortFlags & KEYINFO_ORDER_DESC;\n          pGroupBy->a[ii].fg.sortFlags = sortFlags;\n        }\n        if( sqlite3ExprListCompare(pGroupBy, sSort.pOrderBy, -1)==0 ){\n          orderByGrp = 1;\n        }\n      }\n    }else{\n      assert( 0==sqlite3LogEst(1) );\n      p->nSelectRow = 0;\n    }\n\n    /* Create a label to jump to when we want to abort the query */\n    addrEnd = sqlite3VdbeMakeLabel(pParse);\n\n    /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in\n    ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the\n    ** SELECT statement.\n    */\n    pAggInfo = sqlite3DbMallocZero(db, sizeof(*pAggInfo) );\n    if( pAggInfo ){\n      sqlite3ParserAddCleanup(pParse, agginfoFree, pAggInfo);\n      testcase( pParse->earlyCleanup );\n    }\n    if( db->mallocFailed ){\n      goto select_end;\n    }\n    pAggInfo->selId = p->selId;\n#ifdef SQLITE_DEBUG\n    pAggInfo->pSelect = p;\n#endif\n    memset(&sNC, 0, sizeof(sNC));\n    sNC.pParse = pParse;\n    sNC.pSrcList = pTabList;\n    sNC.uNC.pAggInfo = pAggInfo;\n    VVA_ONLY( sNC.ncFlags = NC_UAggInfo; )\n    pAggInfo->nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0;\n    pAggInfo->pGroupBy = pGroupBy;\n    sqlite3ExprAnalyzeAggList(&sNC, pEList);\n    sqlite3ExprAnalyzeAggList(&sNC, sSort.pOrderBy);\n    if( pHaving ){\n      if( pGroupBy ){\n        assert( pWhere==p->pWhere );\n        assert( pHaving==p->pHaving );\n        assert( pGroupBy==p->pGroupBy );\n        havingToWhere(pParse, p);\n        pWhere = p->pWhere;\n      }\n      sqlite3ExprAnalyzeAggregates(&sNC, pHaving);\n    }\n    pAggInfo->nAccumulator = pAggInfo->nColumn;\n    if( p->pGroupBy==0 && p->pHaving==0 && pAggInfo->nFunc==1 ){\n      minMaxFlag = minMaxQuery(db, pAggInfo->aFunc[0].pFExpr, &pMinMaxOrderBy);\n    }else{\n      minMaxFlag = WHERE_ORDERBY_NORMAL;\n    }\n    analyzeAggFuncArgs(pAggInfo, &sNC);\n    if( db->mallocFailed ) goto select_end;\n#if TREETRACE_ENABLED\n    if( sqlite3TreeTrace & 0x20 ){\n      TREETRACE(0x20,pParse,p,(\"After aggregate analysis %p:\\n\", pAggInfo));\n      sqlite3TreeViewSelect(0, p, 0);\n      if( minMaxFlag ){\n        sqlite3DebugPrintf(\"MIN/MAX Optimization (0x%02x) adds:\\n\", minMaxFlag);\n        sqlite3TreeViewExprList(0, pMinMaxOrderBy, 0, \"ORDERBY\");\n      }\n      printAggInfo(pAggInfo);\n    }\n#endif\n\n\n    /* Processing for aggregates with GROUP BY is very different and\n    ** much more complex than aggregates without a GROUP BY.  tag-select-0810\n    */\n    if( pGroupBy ){\n      KeyInfo *pKeyInfo;  /* Keying information for the group by clause */\n      int addr1;          /* A-vs-B comparison jump */\n      int addrOutputRow;  /* Start of subroutine that outputs a result row */\n      int regOutputRow;   /* Return address register for output subroutine */\n      int addrSetAbort;   /* Set the abort flag and return */\n      int addrTopOfLoop;  /* Top of the input loop */\n      int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */\n      int addrReset;      /* Subroutine for resetting the accumulator */\n      int regReset;       /* Return address register for reset subroutine */\n      ExprList *pDistinct = 0;\n      u16 distFlag = 0;\n      int eDist = WHERE_DISTINCT_NOOP;\n\n      if( pAggInfo->nFunc==1\n       && pAggInfo->aFunc[0].iDistinct>=0\n       && ALWAYS(pAggInfo->aFunc[0].pFExpr!=0)\n       && ALWAYS(ExprUseXList(pAggInfo->aFunc[0].pFExpr))\n       && pAggInfo->aFunc[0].pFExpr->x.pList!=0\n      ){\n        Expr *pExpr = pAggInfo->aFunc[0].pFExpr->x.pList->a[0].pExpr;\n        pExpr = sqlite3ExprDup(db, pExpr, 0);\n        pDistinct = sqlite3ExprListDup(db, pGroupBy, 0);\n        pDistinct = sqlite3ExprListAppend(pParse, pDistinct, pExpr);\n        distFlag = pDistinct ? (WHERE_WANT_DISTINCT|WHERE_AGG_DISTINCT) : 0;\n      }\n\n      /* If there is a GROUP BY clause we might need a sorting index to\n      ** implement it.  Allocate that sorting index now.  If it turns out\n      ** that we do not need it after all, the OP_SorterOpen instruction\n      ** will be converted into a Noop.\n      */\n      pAggInfo->sortingIdx = pParse->nTab++;\n      pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pGroupBy,\n                                            0, pAggInfo->nColumn);\n      addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen,\n          pAggInfo->sortingIdx, pAggInfo->nSortingColumn,\n          0, (char*)pKeyInfo, P4_KEYINFO);\n\n      /* Initialize memory locations used by GROUP BY aggregate processing\n      */\n      iUseFlag = ++pParse->nMem;\n      iAbortFlag = ++pParse->nMem;\n      regOutputRow = ++pParse->nMem;\n      addrOutputRow = sqlite3VdbeMakeLabel(pParse);\n      regReset = ++pParse->nMem;\n      addrReset = sqlite3VdbeMakeLabel(pParse);\n      iAMem = pParse->nMem + 1;\n      pParse->nMem += pGroupBy->nExpr;\n      iBMem = pParse->nMem + 1;\n      pParse->nMem += pGroupBy->nExpr;\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);\n      VdbeComment((v, \"clear abort flag\"));\n      sqlite3VdbeAddOp3(v, OP_Null, 0, iAMem, iAMem+pGroupBy->nExpr-1);\n      sqlite3ExprNullRegisterRange(pParse, iAMem, pGroupBy->nExpr);\n\n      /* Begin a loop that will extract all source rows in GROUP BY order.\n      ** This might involve two separate loops with an OP_Sort in between, or\n      ** it might be a single loop that uses an index to extract information\n      ** in the right order to begin with.\n      */\n      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);\n      TREETRACE(0x2,pParse,p,(\"WhereBegin\\n\"));\n      pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, pDistinct,\n          p, (sDistinct.isTnct==2 ? WHERE_DISTINCTBY : WHERE_GROUPBY)\n          |  (orderByGrp ? WHERE_SORTBYGROUP : 0) | distFlag, 0\n      );\n      if( pWInfo==0 ){\n        sqlite3ExprListDelete(db, pDistinct);\n        goto select_end;\n      }\n      if( pParse->pIdxEpr ){\n        optimizeAggregateUseOfIndexedExpr(pParse, p, pAggInfo, &sNC);\n      }\n      assignAggregateRegisters(pParse, pAggInfo);\n      eDist = sqlite3WhereIsDistinct(pWInfo);\n      TREETRACE(0x2,pParse,p,(\"WhereBegin returns\\n\"));\n      if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){\n        /* The optimizer is able to deliver rows in group by order so\n        ** we do not have to sort.  The OP_OpenEphemeral table will be\n        ** cancelled later because we still need to use the pKeyInfo\n        */\n        groupBySort = 0;\n      }else{\n        /* Rows are coming out in undetermined order.  We have to push\n        ** each row into a sorting index, terminate the first loop,\n        ** then loop over the sorting index in order to get the output\n        ** in sorted order\n        */\n        int regBase;\n        int regRecord;\n        int nCol;\n        int nGroupBy;\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n        int addrExp;              /* Address of OP_Explain instruction */\n#endif\n        ExplainQueryPlan2(addrExp, (pParse, 0, \"USE TEMP B-TREE FOR %s\",\n            (sDistinct.isTnct && (p->selFlags&SF_Distinct)==0) ?\n                    \"DISTINCT\" : \"GROUP BY\"\n        ));\n\n        groupBySort = 1;\n        nGroupBy = pGroupBy->nExpr;\n        nCol = nGroupBy;\n        j = nGroupBy;\n        for(i=0; i<pAggInfo->nColumn; i++){\n          if( pAggInfo->aCol[i].iSorterColumn>=j ){\n            nCol++;\n            j++;\n          }\n        }\n        regBase = sqlite3GetTempRange(pParse, nCol);\n        sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0, 0);\n        j = nGroupBy;\n        pAggInfo->directMode = 1;\n        for(i=0; i<pAggInfo->nColumn; i++){\n          struct AggInfo_col *pCol = &pAggInfo->aCol[i];\n          if( pCol->iSorterColumn>=j ){\n            sqlite3ExprCode(pParse, pCol->pCExpr, j + regBase);\n            j++;\n          }\n        }\n        pAggInfo->directMode = 0;\n        regRecord = sqlite3GetTempReg(pParse);\n        sqlite3VdbeScanStatusCounters(v, addrExp, 0, sqlite3VdbeCurrentAddr(v));\n        sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);\n        sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord);\n        sqlite3VdbeScanStatusRange(v, addrExp, sqlite3VdbeCurrentAddr(v)-2, -1);\n        sqlite3ReleaseTempReg(pParse, regRecord);\n        sqlite3ReleaseTempRange(pParse, regBase, nCol);\n        TREETRACE(0x2,pParse,p,(\"WhereEnd\\n\"));\n        sqlite3WhereEnd(pWInfo);\n        pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++;\n        sortOut = sqlite3GetTempReg(pParse);\n        sqlite3VdbeScanStatusCounters(v, addrExp, sqlite3VdbeCurrentAddr(v), 0);\n        sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol);\n        sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd);\n        VdbeComment((v, \"GROUP BY sort\")); VdbeCoverage(v);\n        pAggInfo->useSortingIdx = 1;\n        sqlite3VdbeScanStatusRange(v, addrExp, -1, sortPTab);\n        sqlite3VdbeScanStatusRange(v, addrExp, -1, pAggInfo->sortingIdx);\n      }\n\n      /* If there are entries in pAgggInfo->aFunc[] that contain subexpressions\n      ** that are indexed (and that were previously identified and tagged\n      ** in optimizeAggregateUseOfIndexedExpr()) then those subexpressions\n      ** must now be converted into a TK_AGG_COLUMN node so that the value\n      ** is correctly pulled from the index rather than being recomputed. */\n      if( pParse->pIdxEpr ){\n        aggregateConvertIndexedExprRefToColumn(pAggInfo);\n#if TREETRACE_ENABLED\n        if( sqlite3TreeTrace & 0x20 ){\n          TREETRACE(0x20, pParse, p,\n             (\"AggInfo function expressions converted to reference index\\n\"));\n          sqlite3TreeViewSelect(0, p, 0);\n          printAggInfo(pAggInfo);\n        }\n#endif\n      }\n\n      /* If the index or temporary table used by the GROUP BY sort\n      ** will naturally deliver rows in the order required by the ORDER BY\n      ** clause, cancel the ephemeral table open coded earlier.\n      **\n      ** This is an optimization - the correct answer should result regardless.\n      ** Use the SQLITE_GroupByOrder flag with SQLITE_TESTCTRL_OPTIMIZER to\n      ** disable this optimization for testing purposes.  */\n      if( orderByGrp && OptimizationEnabled(db, SQLITE_GroupByOrder)\n       && (groupBySort || sqlite3WhereIsSorted(pWInfo))\n      ){\n        sSort.pOrderBy = 0;\n        sqlite3VdbeChangeToNoop(v, sSort.addrSortIndex);\n      }\n\n      /* Evaluate the current GROUP BY terms and store in b0, b1, b2...\n      ** (b0 is memory location iBMem+0, b1 is iBMem+1, and so forth)\n      ** Then compare the current GROUP BY terms against the GROUP BY terms\n      ** from the previous row currently stored in a0, a1, a2...\n      */\n      addrTopOfLoop = sqlite3VdbeCurrentAddr(v);\n      if( groupBySort ){\n        sqlite3VdbeAddOp3(v, OP_SorterData, pAggInfo->sortingIdx,\n                          sortOut, sortPTab);\n      }\n      for(j=0; j<pGroupBy->nExpr; j++){\n        int iOrderByCol = pGroupBy->a[j].u.x.iOrderByCol;\n\n        if( groupBySort ){\n          sqlite3VdbeAddOp3(v, OP_Column, sortPTab, j, iBMem+j);\n        }else{\n          pAggInfo->directMode = 1;\n          sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);\n        }\n\n        if( iOrderByCol ){\n          Expr *pX = p->pEList->a[iOrderByCol-1].pExpr;\n          Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX);\n          while( ALWAYS(pBase!=0) && pBase->op==TK_IF_NULL_ROW ){\n            pX = pBase->pLeft;\n            pBase = sqlite3ExprSkipCollateAndLikely(pX);\n          }\n          if( ALWAYS(pBase!=0)\n           && pBase->op!=TK_AGG_COLUMN\n           && pBase->op!=TK_REGISTER\n          ){\n            sqlite3ExprToRegister(pX, iAMem+j);\n          }\n        }\n      }\n      sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,\n                          (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);\n      addr1 = sqlite3VdbeCurrentAddr(v);\n      sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v);\n\n      /* Generate code that runs whenever the GROUP BY changes.\n      ** Changes in the GROUP BY are detected by the previous code\n      ** block.  If there were no changes, this block is skipped.\n      **\n      ** This code copies current group by terms in b0,b1,b2,...\n      ** over to a0,a1,a2.  It then calls the output subroutine\n      ** and resets the aggregate accumulator registers in preparation\n      ** for the next GROUP BY batch.\n      */\n      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);\n      VdbeComment((v, \"output one row of %d\", p->selId));\n      sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr);\n      sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd); VdbeCoverage(v);\n      VdbeComment((v, \"check abort flag\"));\n      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);\n      VdbeComment((v, \"reset accumulator %d\", p->selId));\n\n      /* Update the aggregate accumulators based on the content of\n      ** the current row\n      */\n      sqlite3VdbeJumpHere(v, addr1);\n      updateAccumulator(pParse, iUseFlag, pAggInfo, eDist);\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);\n      VdbeComment((v, \"indicate data in accumulator %d\", p->selId));\n\n      /* End of the loop\n      */\n      if( groupBySort ){\n        sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop);\n        VdbeCoverage(v);\n      }else{\n        TREETRACE(0x2,pParse,p,(\"WhereEnd\\n\"));\n        sqlite3WhereEnd(pWInfo);\n        sqlite3VdbeChangeToNoop(v, addrSortingIdx);\n      }\n      sqlite3ExprListDelete(db, pDistinct);\n\n      /* Output the final row of result\n      */\n      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);\n      VdbeComment((v, \"output final row of %d\", p->selId));\n\n      /* Jump over the subroutines\n      */\n      sqlite3VdbeGoto(v, addrEnd);\n\n      /* Generate a subroutine that outputs a single row of the result\n      ** set.  This subroutine first looks at the iUseFlag.  If iUseFlag\n      ** is less than or equal to zero, the subroutine is a no-op.  If\n      ** the processing calls for the query to abort, this subroutine\n      ** increments the iAbortFlag memory location before returning in\n      ** order to signal the caller to abort.\n      */\n      addrSetAbort = sqlite3VdbeCurrentAddr(v);\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, iAbortFlag);\n      VdbeComment((v, \"set abort flag\"));\n      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);\n      sqlite3VdbeResolveLabel(v, addrOutputRow);\n      addrOutputRow = sqlite3VdbeCurrentAddr(v);\n      sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2);\n      VdbeCoverage(v);\n      VdbeComment((v, \"Groupby result generator entry point %d\", p->selId));\n      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);\n      finalizeAggFunctions(pParse, pAggInfo);\n      sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL);\n      selectInnerLoop(pParse, p, -1, &sSort,\n                      &sDistinct, pDest,\n                      addrOutputRow+1, addrSetAbort);\n      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);\n      VdbeComment((v, \"end groupby result generator %d\", p->selId));\n\n      /* Generate a subroutine that will reset the group-by accumulator\n      */\n      sqlite3VdbeResolveLabel(v, addrReset);\n      resetAccumulator(pParse, pAggInfo);\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, iUseFlag);\n      VdbeComment((v, \"indicate accumulator %d empty\", p->selId));\n      sqlite3VdbeAddOp1(v, OP_Return, regReset);\n\n      if( distFlag!=0 && eDist!=WHERE_DISTINCT_NOOP ){\n        struct AggInfo_func *pF = &pAggInfo->aFunc[0];\n        fixDistinctOpenEph(pParse, eDist, pF->iDistinct, pF->iDistAddr);\n      }\n    } /* endif pGroupBy.  Begin aggregate queries without GROUP BY: */\n    else {\n      /* Aggregate functions without GROUP BY. tag-select-0820 */\n      Table *pTab;\n      if( (pTab = isSimpleCount(p, pAggInfo))!=0 ){\n        /* tag-select-0821\n        **\n        ** If isSimpleCount() returns a pointer to a Table structure, then\n        ** the SQL statement is of the form:\n        **\n        **   SELECT count(*) FROM <tbl>\n        **\n        ** where the Table structure returned represents table <tbl>.\n        **\n        ** This statement is so common that it is optimized specially. The\n        ** OP_Count instruction is executed either on the intkey table that\n        ** contains the data for table <tbl> or on one of its indexes. It\n        ** is better to execute the op on an index, as indexes are almost\n        ** always spread across less pages than their corresponding tables.\n        */\n        const int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n        const int iCsr = pParse->nTab++;     /* Cursor to scan b-tree */\n        Index *pIdx;                         /* Iterator variable */\n        KeyInfo *pKeyInfo = 0;               /* Keyinfo for scanned index */\n        Index *pBest = 0;                    /* Best index found so far */\n        Pgno iRoot = pTab->tnum;             /* Root page of scanned b-tree */\n\n        sqlite3CodeVerifySchema(pParse, iDb);\n        sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);\n\n        /* Search for the index that has the lowest scan cost.\n        **\n        ** (2011-04-15) Do not do a full scan of an unordered index.\n        **\n        ** (2013-10-03) Do not count the entries in a partial index.\n        **\n        ** In practice the KeyInfo structure will not be used. It is only\n        ** passed to keep OP_OpenRead happy.\n        */\n        if( !HasRowid(pTab) ) pBest = sqlite3PrimaryKeyIndex(pTab);\n        if( !p->pSrc->a[0].fg.notIndexed ){\n          for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n            if( pIdx->bUnordered==0\n             && pIdx->szIdxRow<pTab->szTabRow\n             && pIdx->pPartIdxWhere==0\n             && (!pBest || pIdx->szIdxRow<pBest->szIdxRow)\n            ){\n              pBest = pIdx;\n            }\n          }\n        }\n        if( pBest ){\n          iRoot = pBest->tnum;\n          pKeyInfo = sqlite3KeyInfoOfIndex(pParse, pBest);\n        }\n\n        /* Open a read-only cursor, execute the OP_Count, close the cursor. */\n        sqlite3VdbeAddOp4Int(v, OP_OpenRead, iCsr, (int)iRoot, iDb, 1);\n        if( pKeyInfo ){\n          sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO);\n        }\n        assignAggregateRegisters(pParse, pAggInfo);\n        sqlite3VdbeAddOp2(v, OP_Count, iCsr, AggInfoFuncReg(pAggInfo,0));\n        sqlite3VdbeAddOp1(v, OP_Close, iCsr);\n        explainSimpleCount(pParse, pTab, pBest);\n      }else{\n        /* The general case of an aggregate query without GROUP BY\n        ** tag-select-0822 */\n        int regAcc = 0;           /* \"populate accumulators\" flag */\n        ExprList *pDistinct = 0;\n        u16 distFlag = 0;\n        int eDist;\n\n        /* If there are accumulator registers but no min() or max() functions\n        ** without FILTER clauses, allocate register regAcc. Register regAcc\n        ** will contain 0 the first time the inner loop runs, and 1 thereafter.\n        ** The code generated by updateAccumulator() uses this to ensure\n        ** that the accumulator registers are (a) updated only once if\n        ** there are no min() or max functions or (b) always updated for the\n        ** first row visited by the aggregate, so that they are updated at\n        ** least once even if the FILTER clause means the min() or max()\n        ** function visits zero rows.  */\n        if( pAggInfo->nAccumulator ){\n          for(i=0; i<pAggInfo->nFunc; i++){\n            if( ExprHasProperty(pAggInfo->aFunc[i].pFExpr, EP_WinFunc) ){\n              continue;\n            }\n            if( pAggInfo->aFunc[i].pFunc->funcFlags&SQLITE_FUNC_NEEDCOLL ){\n              break;\n            }\n          }\n          if( i==pAggInfo->nFunc ){\n            regAcc = ++pParse->nMem;\n            sqlite3VdbeAddOp2(v, OP_Integer, 0, regAcc);\n          }\n        }else if( pAggInfo->nFunc==1 && pAggInfo->aFunc[0].iDistinct>=0 ){\n          assert( ExprUseXList(pAggInfo->aFunc[0].pFExpr) );\n          pDistinct = pAggInfo->aFunc[0].pFExpr->x.pList;\n          distFlag = pDistinct ? (WHERE_WANT_DISTINCT|WHERE_AGG_DISTINCT) : 0;\n        }\n        assignAggregateRegisters(pParse, pAggInfo);\n\n        /* This case runs if the aggregate has no GROUP BY clause.  The\n        ** processing is much simpler since there is only a single row\n        ** of output.\n        */\n        assert( p->pGroupBy==0 );\n        resetAccumulator(pParse, pAggInfo);\n\n        /* If this query is a candidate for the min/max optimization, then\n        ** minMaxFlag will have been previously set to either\n        ** WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX and pMinMaxOrderBy will\n        ** be an appropriate ORDER BY expression for the optimization.\n        */\n        assert( minMaxFlag==WHERE_ORDERBY_NORMAL || pMinMaxOrderBy!=0 );\n        assert( pMinMaxOrderBy==0 || pMinMaxOrderBy->nExpr==1 );\n\n        TREETRACE(0x2,pParse,p,(\"WhereBegin\\n\"));\n        pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy,\n                                   pDistinct, p, minMaxFlag|distFlag, 0);\n        if( pWInfo==0 ){\n          goto select_end;\n        }\n        TREETRACE(0x2,pParse,p,(\"WhereBegin returns\\n\"));\n        eDist = sqlite3WhereIsDistinct(pWInfo);\n        updateAccumulator(pParse, regAcc, pAggInfo, eDist);\n        if( eDist!=WHERE_DISTINCT_NOOP ){\n          struct AggInfo_func *pF = pAggInfo->aFunc;\n          if( pF ){\n            fixDistinctOpenEph(pParse, eDist, pF->iDistinct, pF->iDistAddr);\n          }\n        }\n\n        if( regAcc ) sqlite3VdbeAddOp2(v, OP_Integer, 1, regAcc);\n        if( minMaxFlag ){\n          sqlite3WhereMinMaxOptEarlyOut(v, pWInfo);\n        }\n        TREETRACE(0x2,pParse,p,(\"WhereEnd\\n\"));\n        sqlite3WhereEnd(pWInfo);\n        finalizeAggFunctions(pParse, pAggInfo);\n      }\n\n      sSort.pOrderBy = 0;\n      sqlite3ExprIfFalse(pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL);\n      selectInnerLoop(pParse, p, -1, 0, 0,\n                      pDest, addrEnd, addrEnd);\n    }\n    sqlite3VdbeResolveLabel(v, addrEnd);\n\n  } /* endif aggregate query */\n\n  if( sDistinct.eTnctType==WHERE_DISTINCT_UNORDERED ){\n    explainTempTable(pParse, \"DISTINCT\");\n  }\n\n  /* If there is an ORDER BY clause, then we need to sort the results\n  ** and send them to the callback one by one.  tag-select-0900\n  */\n  if( sSort.pOrderBy ){\n    assert( p->pEList==pEList );\n    generateSortTail(pParse, p, &sSort, pEList->nExpr, pDest);\n  }\n\n  /* Jump here to skip this query\n  */\n  sqlite3VdbeResolveLabel(v, iEnd);\n\n  /* The SELECT has been coded. If there is an error in the Parse structure,\n  ** set the return code to 1. Otherwise 0. */\n  rc = (pParse->nErr>0);\n\n  /* Control jumps to here if an error is encountered above, or upon\n  ** successful coding of the SELECT.\n  */\nselect_end:\n  assert( db->mallocFailed==0 || db->mallocFailed==1 );\n  assert( db->mallocFailed==0 || pParse->nErr!=0 );\n  sqlite3ExprListDelete(db, pMinMaxOrderBy);\n#ifdef SQLITE_DEBUG\n  /* Internal self-checks.  tag-select-1000 */\n  if( pAggInfo && !db->mallocFailed ){\n#if TREETRACE_ENABLED\n    if( sqlite3TreeTrace & 0x20 ){\n      TREETRACE(0x20,pParse,p,(\"Finished with AggInfo\\n\"));\n      printAggInfo(pAggInfo);\n    }\n#endif\n    for(i=0; i<pAggInfo->nColumn; i++){\n      Expr *pExpr = pAggInfo->aCol[i].pCExpr;\n      if( pExpr==0 ) continue;\n      assert( pExpr->pAggInfo==pAggInfo );\n      assert( pExpr->iAgg==i );\n    }\n    for(i=0; i<pAggInfo->nFunc; i++){\n      Expr *pExpr = pAggInfo->aFunc[i].pFExpr;\n      assert( pExpr!=0 );\n      assert( pExpr->pAggInfo==pAggInfo );\n      assert( pExpr->iAgg==i );\n    }\n  }\n#endif\n\n#if TREETRACE_ENABLED\n  TREETRACE(0x1,pParse,p,(\"end processing\\n\"));\n  if( (sqlite3TreeTrace & 0x40000)!=0 && ExplainQueryPlanParent(pParse)==0 ){\n    sqlite3TreeViewSelect(0, p, 0);\n  }\n#endif\n  ExplainQueryPlanPop(pParse);\n  return rc;\n}\n\n/************** End of select.c **********************************************/\n/************** Begin file table.c *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the sqlite3_get_table() and sqlite3_free_table()\n** interface routines.  These are just wrappers around the main\n** interface routine of sqlite3_exec().\n**\n** These routines are in a separate files so that they will not be linked\n** if they are not used.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_GET_TABLE\n\n/*\n** This structure is used to pass data from sqlite3_get_table() through\n** to the callback function is uses to build the result.\n*/\ntypedef struct TabResult {\n  char **azResult;   /* Accumulated output */\n  char *zErrMsg;     /* Error message text, if an error occurs */\n  u32 nAlloc;        /* Slots allocated for azResult[] */\n  u32 nRow;          /* Number of rows in the result */\n  u32 nColumn;       /* Number of columns in the result */\n  u32 nData;         /* Slots used in azResult[].  (nRow+1)*nColumn */\n  int rc;            /* Return code from sqlite3_exec() */\n} TabResult;\n\n/*\n** This routine is called once for each row in the result table.  Its job\n** is to fill in the TabResult structure appropriately, allocating new\n** memory as necessary.\n*/\nstatic int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){\n  TabResult *p = (TabResult*)pArg;  /* Result accumulator */\n  int need;                         /* Slots needed in p->azResult[] */\n  int i;                            /* Loop counter */\n  char *z;                          /* A single column of result */\n\n  /* Make sure there is enough space in p->azResult to hold everything\n  ** we need to remember from this invocation of the callback.\n  */\n  if( p->nRow==0 && argv!=0 ){\n    need = nCol*2;\n  }else{\n    need = nCol;\n  }\n  if( p->nData + need > p->nAlloc ){\n    char **azNew;\n    p->nAlloc = p->nAlloc*2 + need;\n    azNew = sqlite3Realloc( p->azResult, sizeof(char*)*p->nAlloc );\n    if( azNew==0 ) goto malloc_failed;\n    p->azResult = azNew;\n  }\n\n  /* If this is the first row, then generate an extra row containing\n  ** the names of all columns.\n  */\n  if( p->nRow==0 ){\n    p->nColumn = nCol;\n    for(i=0; i<nCol; i++){\n      z = sqlite3_mprintf(\"%s\", colv[i]);\n      if( z==0 ) goto malloc_failed;\n      p->azResult[p->nData++] = z;\n    }\n  }else if( (int)p->nColumn!=nCol ){\n    sqlite3_free(p->zErrMsg);\n    p->zErrMsg = sqlite3_mprintf(\n       \"sqlite3_get_table() called with two or more incompatible queries\"\n    );\n    p->rc = SQLITE_ERROR;\n    return 1;\n  }\n\n  /* Copy over the row data\n  */\n  if( argv!=0 ){\n    for(i=0; i<nCol; i++){\n      if( argv[i]==0 ){\n        z = 0;\n      }else{\n        int n = sqlite3Strlen30(argv[i])+1;\n        z = sqlite3_malloc64( n );\n        if( z==0 ) goto malloc_failed;\n        memcpy(z, argv[i], n);\n      }\n      p->azResult[p->nData++] = z;\n    }\n    p->nRow++;\n  }\n  return 0;\n\nmalloc_failed:\n  p->rc = SQLITE_NOMEM_BKPT;\n  return 1;\n}\n\n/*\n** Query the database.  But instead of invoking a callback for each row,\n** malloc() for space to hold the result and return the entire results\n** at the conclusion of the call.\n**\n** The result that is written to ***pazResult is held in memory obtained\n** from malloc().  But the caller cannot free this memory directly.\n** Instead, the entire table should be passed to sqlite3_free_table() when\n** the calling procedure is finished using it.\n*/\nSQLITE_API int sqlite3_get_table(\n  sqlite3 *db,                /* The database on which the SQL executes */\n  const char *zSql,           /* The SQL to be executed */\n  char ***pazResult,          /* Write the result table here */\n  int *pnRow,                 /* Write the number of rows in the result here */\n  int *pnColumn,              /* Write the number of columns of result here */\n  char **pzErrMsg             /* Write error messages here */\n){\n  int rc;\n  TabResult res;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || pazResult==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  *pazResult = 0;\n  if( pnColumn ) *pnColumn = 0;\n  if( pnRow ) *pnRow = 0;\n  if( pzErrMsg ) *pzErrMsg = 0;\n  res.zErrMsg = 0;\n  res.nRow = 0;\n  res.nColumn = 0;\n  res.nData = 1;\n  res.nAlloc = 20;\n  res.rc = SQLITE_OK;\n  res.azResult = sqlite3_malloc64(sizeof(char*)*res.nAlloc );\n  if( res.azResult==0 ){\n     db->errCode = SQLITE_NOMEM;\n     return SQLITE_NOMEM_BKPT;\n  }\n  res.azResult[0] = 0;\n  rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);\n  assert( sizeof(res.azResult[0])>= sizeof(res.nData) );\n  res.azResult[0] = SQLITE_INT_TO_PTR(res.nData);\n  if( (rc&0xff)==SQLITE_ABORT ){\n    sqlite3_free_table(&res.azResult[1]);\n    if( res.zErrMsg ){\n      if( pzErrMsg ){\n        sqlite3_free(*pzErrMsg);\n        *pzErrMsg = sqlite3_mprintf(\"%s\",res.zErrMsg);\n      }\n      sqlite3_free(res.zErrMsg);\n    }\n    db->errCode = res.rc;  /* Assume 32-bit assignment is atomic */\n    return res.rc;\n  }\n  sqlite3_free(res.zErrMsg);\n  if( rc!=SQLITE_OK ){\n    sqlite3_free_table(&res.azResult[1]);\n    return rc;\n  }\n  if( res.nAlloc>res.nData ){\n    char **azNew;\n    azNew = sqlite3Realloc( res.azResult, sizeof(char*)*res.nData );\n    if( azNew==0 ){\n      sqlite3_free_table(&res.azResult[1]);\n      db->errCode = SQLITE_NOMEM;\n      return SQLITE_NOMEM_BKPT;\n    }\n    res.azResult = azNew;\n  }\n  *pazResult = &res.azResult[1];\n  if( pnColumn ) *pnColumn = res.nColumn;\n  if( pnRow ) *pnRow = res.nRow;\n  return rc;\n}\n\n/*\n** This routine frees the space the sqlite3_get_table() malloced.\n*/\nSQLITE_API void sqlite3_free_table(\n  char **azResult            /* Result returned from sqlite3_get_table() */\n){\n  if( azResult ){\n    int i, n;\n    azResult--;\n    assert( azResult!=0 );\n    n = SQLITE_PTR_TO_INT(azResult[0]);\n    for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }\n    sqlite3_free(azResult);\n  }\n}\n\n#endif /* SQLITE_OMIT_GET_TABLE */\n\n/************** End of table.c ***********************************************/\n/************** Begin file trigger.c *****************************************/\n/*\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains the implementation for TRIGGERs\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_TRIGGER\n/*\n** Delete a linked list of TriggerStep structures.\n*/\nSQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){\n  while( pTriggerStep ){\n    TriggerStep * pTmp = pTriggerStep;\n    pTriggerStep = pTriggerStep->pNext;\n\n    sqlite3ExprDelete(db, pTmp->pWhere);\n    sqlite3ExprListDelete(db, pTmp->pExprList);\n    sqlite3SelectDelete(db, pTmp->pSelect);\n    sqlite3IdListDelete(db, pTmp->pIdList);\n    sqlite3UpsertDelete(db, pTmp->pUpsert);\n    sqlite3SrcListDelete(db, pTmp->pFrom);\n    sqlite3DbFree(db, pTmp->zSpan);\n\n    sqlite3DbFree(db, pTmp);\n  }\n}\n\n/*\n** Given table pTab, return a list of all the triggers attached to\n** the table. The list is connected by Trigger.pNext pointers.\n**\n** All of the triggers on pTab that are in the same database as pTab\n** are already attached to pTab->pTrigger.  But there might be additional\n** triggers on pTab in the TEMP schema.  This routine prepends all\n** TEMP triggers on pTab to the beginning of the pTab->pTrigger list\n** and returns the combined list.\n**\n** To state it another way:  This routine returns a list of all triggers\n** that fire off of pTab.  The list will include any TEMP triggers on\n** pTab as well as the triggers lised in pTab->pTrigger.\n*/\nSQLITE_PRIVATE Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){\n  Schema *pTmpSchema;       /* Schema of the pTab table */\n  Trigger *pList;           /* List of triggers to return */\n  HashElem *p;              /* Loop variable for TEMP triggers */\n\n  assert( pParse->disableTriggers==0 );\n  pTmpSchema = pParse->db->aDb[1].pSchema;\n  p = sqliteHashFirst(&pTmpSchema->trigHash);\n  pList = pTab->pTrigger;\n  while( p ){\n    Trigger *pTrig = (Trigger *)sqliteHashData(p);\n    if( pTrig->pTabSchema==pTab->pSchema\n     && pTrig->table\n     && 0==sqlite3StrICmp(pTrig->table, pTab->zName)\n     && (pTrig->pTabSchema!=pTmpSchema || pTrig->bReturning)\n    ){\n      pTrig->pNext = pList;\n      pList = pTrig;\n    }else if( pTrig->op==TK_RETURNING ){\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n      assert( pParse->db->pVtabCtx==0 );\n#endif\n      assert( pParse->bReturning );\n      assert( !pParse->isCreate );\n      assert( &(pParse->u1.d.pReturning->retTrig) == pTrig );\n      pTrig->table = pTab->zName;\n      pTrig->pTabSchema = pTab->pSchema;\n      pTrig->pNext = pList;\n      pList = pTrig;\n    }\n    p = sqliteHashNext(p);\n  }\n#if 0\n  if( pList ){\n    Trigger *pX;\n    printf(\"Triggers for %s:\", pTab->zName);\n    for(pX=pList; pX; pX=pX->pNext){\n      printf(\" %s\", pX->zName);\n    }\n    printf(\"\\n\");\n    fflush(stdout);\n  }\n#endif\n  return pList;\n}\n\n/*\n** This is called by the parser when it sees a CREATE TRIGGER statement\n** up to the point of the BEGIN before the trigger actions.  A Trigger\n** structure is generated based on the information available and stored\n** in pParse->pNewTrigger.  After the trigger actions have been parsed, the\n** sqlite3FinishTrigger() function is called to complete the trigger\n** construction process.\n*/\nSQLITE_PRIVATE void sqlite3BeginTrigger(\n  Parse *pParse,      /* The parse context of the CREATE TRIGGER statement */\n  Token *pName1,      /* The name of the trigger */\n  Token *pName2,      /* The name of the trigger */\n  int tr_tm,          /* One of TK_BEFORE, TK_AFTER, TK_INSTEAD */\n  int op,             /* One of TK_INSERT, TK_UPDATE, TK_DELETE */\n  IdList *pColumns,   /* column list if this is an UPDATE OF trigger */\n  SrcList *pTableName,/* The name of the table/view the trigger applies to */\n  Expr *pWhen,        /* WHEN clause */\n  int isTemp,         /* True if the TEMPORARY keyword is present */\n  int noErr           /* Suppress errors if the trigger already exists */\n){\n  Trigger *pTrigger = 0;  /* The new trigger */\n  Table *pTab;            /* Table that the trigger fires off of */\n  char *zName = 0;        /* Name of the trigger */\n  sqlite3 *db = pParse->db;  /* The database connection */\n  int iDb;                /* The database to store the trigger in */\n  Token *pName;           /* The unqualified db name */\n  DbFixer sFix;           /* State vector for the DB fixer */\n\n  assert( pName1!=0 );   /* pName1->z might be NULL, but not pName1 itself */\n  assert( pName2!=0 );\n  assert( op==TK_INSERT || op==TK_UPDATE || op==TK_DELETE );\n  assert( op>0 && op<0xff );\n  if( isTemp ){\n    /* If TEMP was specified, then the trigger name may not be qualified. */\n    if( pName2->n>0 ){\n      sqlite3ErrorMsg(pParse, \"temporary trigger may not have qualified name\");\n      goto trigger_cleanup;\n    }\n    iDb = 1;\n    pName = pName1;\n  }else{\n    /* Figure out the db that the trigger will be created in */\n    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);\n    if( iDb<0 ){\n      goto trigger_cleanup;\n    }\n  }\n  if( !pTableName || db->mallocFailed ){\n    goto trigger_cleanup;\n  }\n\n  /* A long-standing parser bug is that this syntax was allowed:\n  **\n  **    CREATE TRIGGER attached.demo AFTER INSERT ON attached.tab ....\n  **                                                 ^^^^^^^^\n  **\n  ** To maintain backwards compatibility, ignore the database\n  ** name on pTableName if we are reparsing out of the schema table\n  */\n  if( db->init.busy && iDb!=1 ){\n    assert( pTableName->a[0].fg.fixedSchema==0 );\n    assert( pTableName->a[0].fg.isSubquery==0 );\n    sqlite3DbFree(db, pTableName->a[0].u4.zDatabase);\n    pTableName->a[0].u4.zDatabase = 0;\n  }\n\n  /* If the trigger name was unqualified, and the table is a temp table,\n  ** then set iDb to 1 to create the trigger in the temporary database.\n  ** If sqlite3SrcListLookup() returns 0, indicating the table does not\n  ** exist, the error is caught by the block below.\n  */\n  pTab = sqlite3SrcListLookup(pParse, pTableName);\n  if( db->init.busy==0 && pName2->n==0 && pTab\n        && pTab->pSchema==db->aDb[1].pSchema ){\n    iDb = 1;\n  }\n\n  /* Ensure the table name matches database name and that the table exists */\n  if( db->mallocFailed ) goto trigger_cleanup;\n  assert( pTableName->nSrc==1 );\n  sqlite3FixInit(&sFix, pParse, iDb, \"trigger\", pName);\n  if( sqlite3FixSrcList(&sFix, pTableName) ){\n    goto trigger_cleanup;\n  }\n  pTab = sqlite3SrcListLookup(pParse, pTableName);\n  if( !pTab ){\n    /* The table does not exist. */\n    goto trigger_orphan_error;\n  }\n  if( IsVirtual(pTab) ){\n    sqlite3ErrorMsg(pParse, \"cannot create triggers on virtual tables\");\n    goto trigger_orphan_error;\n  }\n  if( (pTab->tabFlags & TF_Shadow)!=0 && sqlite3ReadOnlyShadowTables(db) ){\n    sqlite3ErrorMsg(pParse, \"cannot create triggers on shadow tables\");\n    goto trigger_orphan_error;\n  }\n\n  /* Check that the trigger name is not reserved and that no trigger of the\n  ** specified name exists */\n  zName = sqlite3NameFromToken(db, pName);\n  if( zName==0 ){\n    assert( db->mallocFailed );\n    goto trigger_cleanup;\n  }\n  if( sqlite3CheckObjectName(pParse, zName, \"trigger\", pTab->zName) ){\n    goto trigger_cleanup;\n  }\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  if( !IN_RENAME_OBJECT ){\n    if( sqlite3HashFind(&(db->aDb[iDb].pSchema->trigHash),zName) ){\n      if( !noErr ){\n        sqlite3ErrorMsg(pParse, \"trigger %T already exists\", pName);\n      }else{\n        assert( !db->init.busy );\n        sqlite3CodeVerifySchema(pParse, iDb);\n        VVA_ONLY( pParse->ifNotExists = 1; )\n      }\n      goto trigger_cleanup;\n    }\n  }\n\n  /* Do not create a trigger on a system table */\n  if( sqlite3StrNICmp(pTab->zName, \"sqlite_\", 7)==0 ){\n    sqlite3ErrorMsg(pParse, \"cannot create trigger on system table\");\n    goto trigger_cleanup;\n  }\n\n  /* INSTEAD of triggers are only for views and views only support INSTEAD\n  ** of triggers.\n  */\n  if( IsView(pTab) && tr_tm!=TK_INSTEAD ){\n    sqlite3ErrorMsg(pParse, \"cannot create %s trigger on view: %S\",\n        (tr_tm == TK_BEFORE)?\"BEFORE\":\"AFTER\", pTableName->a);\n    goto trigger_orphan_error;\n  }\n  if( !IsView(pTab) && tr_tm==TK_INSTEAD ){\n    sqlite3ErrorMsg(pParse, \"cannot create INSTEAD OF\"\n        \" trigger on table: %S\", pTableName->a);\n    goto trigger_orphan_error;\n  }\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( !IN_RENAME_OBJECT ){\n    int iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n    int code = SQLITE_CREATE_TRIGGER;\n    const char *zDb = db->aDb[iTabDb].zDbSName;\n    const char *zDbTrig = isTemp ? db->aDb[1].zDbSName : zDb;\n    if( iTabDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER;\n    if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){\n      goto trigger_cleanup;\n    }\n    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iTabDb),0,zDb)){\n      goto trigger_cleanup;\n    }\n  }\n#endif\n\n  /* INSTEAD OF triggers can only appear on views and BEFORE triggers\n  ** cannot appear on views.  So we might as well translate every\n  ** INSTEAD OF trigger into a BEFORE trigger.  It simplifies code\n  ** elsewhere.\n  */\n  if (tr_tm == TK_INSTEAD){\n    tr_tm = TK_BEFORE;\n  }\n\n  /* Build the Trigger object */\n  pTrigger = (Trigger*)sqlite3DbMallocZero(db, sizeof(Trigger));\n  if( pTrigger==0 ) goto trigger_cleanup;\n  pTrigger->zName = zName;\n  zName = 0;\n  pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);\n  pTrigger->pSchema = db->aDb[iDb].pSchema;\n  pTrigger->pTabSchema = pTab->pSchema;\n  pTrigger->op = (u8)op;\n  pTrigger->tr_tm = tr_tm==TK_BEFORE ? TRIGGER_BEFORE : TRIGGER_AFTER;\n  if( IN_RENAME_OBJECT ){\n    sqlite3RenameTokenRemap(pParse, pTrigger->table, pTableName->a[0].zName);\n    pTrigger->pWhen = pWhen;\n    pWhen = 0;\n  }else{\n    pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);\n  }\n  pTrigger->pColumns = pColumns;\n  pColumns = 0;\n  assert( pParse->pNewTrigger==0 );\n  pParse->pNewTrigger = pTrigger;\n\ntrigger_cleanup:\n  sqlite3DbFree(db, zName);\n  sqlite3SrcListDelete(db, pTableName);\n  sqlite3IdListDelete(db, pColumns);\n  sqlite3ExprDelete(db, pWhen);\n  if( !pParse->pNewTrigger ){\n    sqlite3DeleteTrigger(db, pTrigger);\n  }else{\n    assert( pParse->pNewTrigger==pTrigger );\n  }\n  return;\n\ntrigger_orphan_error:\n  if( db->init.iDb==1 ){\n    /* Ticket #3810.\n    ** Normally, whenever a table is dropped, all associated triggers are\n    ** dropped too.  But if a TEMP trigger is created on a non-TEMP table\n    ** and the table is dropped by a different database connection, the\n    ** trigger is not visible to the database connection that does the\n    ** drop so the trigger cannot be dropped.  This results in an\n    ** \"orphaned trigger\" - a trigger whose associated table is missing.\n    **\n    ** 2020-11-05 see also https://sqlite.org/forum/forumpost/157dc791df\n    */\n    db->init.orphanTrigger = 1;\n  }\n  goto trigger_cleanup;\n}\n\n/*\n** This routine is called after all of the trigger actions have been parsed\n** in order to complete the process of building the trigger.\n*/\nSQLITE_PRIVATE void sqlite3FinishTrigger(\n  Parse *pParse,          /* Parser context */\n  TriggerStep *pStepList, /* The triggered program */\n  Token *pAll             /* Token that describes the complete CREATE TRIGGER */\n){\n  Trigger *pTrig = pParse->pNewTrigger;   /* Trigger being finished */\n  char *zName;                            /* Name of trigger */\n  sqlite3 *db = pParse->db;               /* The database */\n  DbFixer sFix;                           /* Fixer object */\n  int iDb;                                /* Database containing the trigger */\n  Token nameToken;                        /* Trigger name for error reporting */\n\n  pParse->pNewTrigger = 0;\n  if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup;\n  zName = pTrig->zName;\n  iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);\n  pTrig->step_list = pStepList;\n  while( pStepList ){\n    pStepList->pTrig = pTrig;\n    pStepList = pStepList->pNext;\n  }\n  sqlite3TokenInit(&nameToken, pTrig->zName);\n  sqlite3FixInit(&sFix, pParse, iDb, \"trigger\", &nameToken);\n  if( sqlite3FixTriggerStep(&sFix, pTrig->step_list)\n   || sqlite3FixExpr(&sFix, pTrig->pWhen)\n  ){\n    goto triggerfinish_cleanup;\n  }\n\n#ifndef SQLITE_OMIT_ALTERTABLE\n  if( IN_RENAME_OBJECT ){\n    assert( !db->init.busy );\n    pParse->pNewTrigger = pTrig;\n    pTrig = 0;\n  }else\n#endif\n\n  /* if we are not initializing,\n  ** build the sqlite_schema entry\n  */\n  if( !db->init.busy ){\n    Vdbe *v;\n    char *z;\n\n    /* If this is a new CREATE TABLE statement, and if shadow tables\n    ** are read-only, and the trigger makes a change to a shadow table,\n    ** then raise an error - do not allow the trigger to be created. */\n    if( sqlite3ReadOnlyShadowTables(db) ){\n      TriggerStep *pStep;\n      for(pStep=pTrig->step_list; pStep; pStep=pStep->pNext){\n        if( pStep->zTarget!=0\n         && sqlite3ShadowTableName(db, pStep->zTarget)\n        ){\n          sqlite3ErrorMsg(pParse,\n            \"trigger \\\"%s\\\" may not write to shadow table \\\"%s\\\"\",\n            pTrig->zName, pStep->zTarget);\n          goto triggerfinish_cleanup;\n        }\n      }\n    }\n\n    /* Make an entry in the sqlite_schema table */\n    v = sqlite3GetVdbe(pParse);\n    if( v==0 ) goto triggerfinish_cleanup;\n    sqlite3BeginWriteOperation(pParse, 0, iDb);\n    z = sqlite3DbStrNDup(db, (char*)pAll->z, pAll->n);\n    testcase( z==0 );\n    sqlite3NestedParse(pParse,\n       \"INSERT INTO %Q.\" LEGACY_SCHEMA_TABLE\n       \" VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\",\n       db->aDb[iDb].zDbSName, zName,\n       pTrig->table, z);\n    sqlite3DbFree(db, z);\n    sqlite3ChangeCookie(pParse, iDb);\n    sqlite3VdbeAddParseSchemaOp(v, iDb,\n        sqlite3MPrintf(db, \"type='trigger' AND name='%q'\", zName), 0);\n  }\n\n  if( db->init.busy ){\n    Trigger *pLink = pTrig;\n    Hash *pHash = &db->aDb[iDb].pSchema->trigHash;\n    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n    assert( pLink!=0 );\n    pTrig = sqlite3HashInsert(pHash, zName, pTrig);\n    if( pTrig ){\n      sqlite3OomFault(db);\n    }else if( pLink->pSchema==pLink->pTabSchema ){\n      Table *pTab;\n      pTab = sqlite3HashFind(&pLink->pTabSchema->tblHash, pLink->table);\n      assert( pTab!=0 );\n      pLink->pNext = pTab->pTrigger;\n      pTab->pTrigger = pLink;\n    }\n  }\n\ntriggerfinish_cleanup:\n  sqlite3DeleteTrigger(db, pTrig);\n  assert( IN_RENAME_OBJECT || !pParse->pNewTrigger );\n  sqlite3DeleteTriggerStep(db, pStepList);\n}\n\n/*\n** Duplicate a range of text from an SQL statement, then convert all\n** whitespace characters into ordinary space characters.\n*/\nstatic char *triggerSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){\n  char *z = sqlite3DbSpanDup(db, zStart, zEnd);\n  int i;\n  if( z ) for(i=0; z[i]; i++) if( sqlite3Isspace(z[i]) ) z[i] = ' ';\n  return z;\n}\n\n/*\n** Turn a SELECT statement (that the pSelect parameter points to) into\n** a trigger step.  Return a pointer to a TriggerStep structure.\n**\n** The parser calls this routine when it finds a SELECT statement in\n** body of a TRIGGER.\n*/\nSQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(\n  sqlite3 *db,                /* Database connection */\n  Select *pSelect,            /* The SELECT statement */\n  const char *zStart,         /* Start of SQL text */\n  const char *zEnd            /* End of SQL text */\n){\n  TriggerStep *pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep));\n  if( pTriggerStep==0 ) {\n    sqlite3SelectDelete(db, pSelect);\n    return 0;\n  }\n  pTriggerStep->op = TK_SELECT;\n  pTriggerStep->pSelect = pSelect;\n  pTriggerStep->orconf = OE_Default;\n  pTriggerStep->zSpan = triggerSpanDup(db, zStart, zEnd);\n  return pTriggerStep;\n}\n\n/*\n** Allocate space to hold a new trigger step.  The allocated space\n** holds both the TriggerStep object and the TriggerStep.target.z string.\n**\n** If an OOM error occurs, NULL is returned and db->mallocFailed is set.\n*/\nstatic TriggerStep *triggerStepAllocate(\n  Parse *pParse,              /* Parser context */\n  u8 op,                      /* Trigger opcode */\n  Token *pName,               /* The target name */\n  const char *zStart,         /* Start of SQL text */\n  const char *zEnd            /* End of SQL text */\n){\n  sqlite3 *db = pParse->db;\n  TriggerStep *pTriggerStep;\n\n  if( pParse->nErr ) return 0;\n  pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep) + pName->n + 1);\n  if( pTriggerStep ){\n    char *z = (char*)&pTriggerStep[1];\n    memcpy(z, pName->z, pName->n);\n    sqlite3Dequote(z);\n    pTriggerStep->zTarget = z;\n    pTriggerStep->op = op;\n    pTriggerStep->zSpan = triggerSpanDup(db, zStart, zEnd);\n    if( IN_RENAME_OBJECT ){\n      sqlite3RenameTokenMap(pParse, pTriggerStep->zTarget, pName);\n    }\n  }\n  return pTriggerStep;\n}\n\n/*\n** Build a trigger step out of an INSERT statement.  Return a pointer\n** to the new trigger step.\n**\n** The parser calls this routine when it sees an INSERT inside the\n** body of a trigger.\n*/\nSQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(\n  Parse *pParse,      /* Parser */\n  Token *pTableName,  /* Name of the table into which we insert */\n  IdList *pColumn,    /* List of columns in pTableName to insert into */\n  Select *pSelect,    /* A SELECT statement that supplies values */\n  u8 orconf,          /* The conflict algorithm (OE_Abort, OE_Replace, etc.) */\n  Upsert *pUpsert,    /* ON CONFLICT clauses for upsert */\n  const char *zStart, /* Start of SQL text */\n  const char *zEnd    /* End of SQL text */\n){\n  sqlite3 *db = pParse->db;\n  TriggerStep *pTriggerStep;\n\n  assert(pSelect != 0 || db->mallocFailed);\n\n  pTriggerStep = triggerStepAllocate(pParse, TK_INSERT, pTableName,zStart,zEnd);\n  if( pTriggerStep ){\n    if( IN_RENAME_OBJECT ){\n      pTriggerStep->pSelect = pSelect;\n      pSelect = 0;\n    }else{\n      pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);\n    }\n    pTriggerStep->pIdList = pColumn;\n    pTriggerStep->pUpsert = pUpsert;\n    pTriggerStep->orconf = orconf;\n    if( pUpsert ){\n      sqlite3HasExplicitNulls(pParse, pUpsert->pUpsertTarget);\n    }\n  }else{\n    testcase( pColumn );\n    sqlite3IdListDelete(db, pColumn);\n    testcase( pUpsert );\n    sqlite3UpsertDelete(db, pUpsert);\n  }\n  sqlite3SelectDelete(db, pSelect);\n\n  return pTriggerStep;\n}\n\n/*\n** Construct a trigger step that implements an UPDATE statement and return\n** a pointer to that trigger step.  The parser calls this routine when it\n** sees an UPDATE statement inside the body of a CREATE TRIGGER.\n*/\nSQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(\n  Parse *pParse,          /* Parser */\n  Token *pTableName,   /* Name of the table to be updated */\n  SrcList *pFrom,      /* FROM clause for an UPDATE-FROM, or NULL */\n  ExprList *pEList,    /* The SET clause: list of column and new values */\n  Expr *pWhere,        /* The WHERE clause */\n  u8 orconf,           /* The conflict algorithm. (OE_Abort, OE_Ignore, etc) */\n  const char *zStart,  /* Start of SQL text */\n  const char *zEnd     /* End of SQL text */\n){\n  sqlite3 *db = pParse->db;\n  TriggerStep *pTriggerStep;\n\n  pTriggerStep = triggerStepAllocate(pParse, TK_UPDATE, pTableName,zStart,zEnd);\n  if( pTriggerStep ){\n    if( IN_RENAME_OBJECT ){\n      pTriggerStep->pExprList = pEList;\n      pTriggerStep->pWhere = pWhere;\n      pTriggerStep->pFrom = pFrom;\n      pEList = 0;\n      pWhere = 0;\n      pFrom = 0;\n    }else{\n      pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);\n      pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);\n      pTriggerStep->pFrom = sqlite3SrcListDup(db, pFrom, EXPRDUP_REDUCE);\n    }\n    pTriggerStep->orconf = orconf;\n  }\n  sqlite3ExprListDelete(db, pEList);\n  sqlite3ExprDelete(db, pWhere);\n  sqlite3SrcListDelete(db, pFrom);\n  return pTriggerStep;\n}\n\n/*\n** Construct a trigger step that implements a DELETE statement and return\n** a pointer to that trigger step.  The parser calls this routine when it\n** sees a DELETE statement inside the body of a CREATE TRIGGER.\n*/\nSQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(\n  Parse *pParse,          /* Parser */\n  Token *pTableName,      /* The table from which rows are deleted */\n  Expr *pWhere,           /* The WHERE clause */\n  const char *zStart,     /* Start of SQL text */\n  const char *zEnd        /* End of SQL text */\n){\n  sqlite3 *db = pParse->db;\n  TriggerStep *pTriggerStep;\n\n  pTriggerStep = triggerStepAllocate(pParse, TK_DELETE, pTableName,zStart,zEnd);\n  if( pTriggerStep ){\n    if( IN_RENAME_OBJECT ){\n      pTriggerStep->pWhere = pWhere;\n      pWhere = 0;\n    }else{\n      pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);\n    }\n    pTriggerStep->orconf = OE_Default;\n  }\n  sqlite3ExprDelete(db, pWhere);\n  return pTriggerStep;\n}\n\n/*\n** Recursively delete a Trigger structure\n*/\nSQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){\n  if( pTrigger==0 || pTrigger->bReturning ) return;\n  sqlite3DeleteTriggerStep(db, pTrigger->step_list);\n  sqlite3DbFree(db, pTrigger->zName);\n  sqlite3DbFree(db, pTrigger->table);\n  sqlite3ExprDelete(db, pTrigger->pWhen);\n  sqlite3IdListDelete(db, pTrigger->pColumns);\n  sqlite3DbFree(db, pTrigger);\n}\n\n/*\n** This function is called to drop a trigger from the database schema.\n**\n** This may be called directly from the parser and therefore identifies\n** the trigger by name.  The sqlite3DropTriggerPtr() routine does the\n** same job as this routine except it takes a pointer to the trigger\n** instead of the trigger name.\n**/\nSQLITE_PRIVATE void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){\n  Trigger *pTrigger = 0;\n  int i;\n  const char *zDb;\n  const char *zName;\n  sqlite3 *db = pParse->db;\n\n  if( db->mallocFailed ) goto drop_trigger_cleanup;\n  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){\n    goto drop_trigger_cleanup;\n  }\n\n  assert( pName->nSrc==1 );\n  assert( pName->a[0].fg.fixedSchema==0 && pName->a[0].fg.isSubquery==0 );\n  zDb = pName->a[0].u4.zDatabase;\n  zName = pName->a[0].zName;\n  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );\n  for(i=OMIT_TEMPDB; i<db->nDb; i++){\n    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */\n    if( zDb && sqlite3DbIsNamed(db, j, zDb)==0 ) continue;\n    assert( sqlite3SchemaMutexHeld(db, j, 0) );\n    pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName);\n    if( pTrigger ) break;\n  }\n  if( !pTrigger ){\n    if( !noErr ){\n      sqlite3ErrorMsg(pParse, \"no such trigger: %S\", pName->a);\n    }else{\n      sqlite3CodeVerifyNamedSchema(pParse, zDb);\n    }\n    pParse->checkSchema = 1;\n    goto drop_trigger_cleanup;\n  }\n  sqlite3DropTriggerPtr(pParse, pTrigger);\n\ndrop_trigger_cleanup:\n  sqlite3SrcListDelete(db, pName);\n}\n\n/*\n** Return a pointer to the Table structure for the table that a trigger\n** is set on.\n*/\nstatic Table *tableOfTrigger(Trigger *pTrigger){\n  return sqlite3HashFind(&pTrigger->pTabSchema->tblHash, pTrigger->table);\n}\n\n\n/*\n** Drop a trigger given a pointer to that trigger.\n*/\nSQLITE_PRIVATE void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger){\n  Table   *pTable;\n  Vdbe *v;\n  sqlite3 *db = pParse->db;\n  int iDb;\n\n  iDb = sqlite3SchemaToIndex(pParse->db, pTrigger->pSchema);\n  assert( iDb>=0 && iDb<db->nDb );\n  pTable = tableOfTrigger(pTrigger);\n  assert( (pTable && pTable->pSchema==pTrigger->pSchema) || iDb==1 );\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  if( pTable ){\n    int code = SQLITE_DROP_TRIGGER;\n    const char *zDb = db->aDb[iDb].zDbSName;\n    const char *zTab = SCHEMA_TABLE(iDb);\n    if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;\n    if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||\n      sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){\n      return;\n    }\n  }\n#endif\n\n  /* Generate code to destroy the database record of the trigger.\n  */\n  if( (v = sqlite3GetVdbe(pParse))!=0 ){\n    sqlite3NestedParse(pParse,\n       \"DELETE FROM %Q.\" LEGACY_SCHEMA_TABLE \" WHERE name=%Q AND type='trigger'\",\n       db->aDb[iDb].zDbSName, pTrigger->zName\n    );\n    sqlite3ChangeCookie(pParse, iDb);\n    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);\n  }\n}\n\n/*\n** Remove a trigger from the hash tables of the sqlite* pointer.\n*/\nSQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){\n  Trigger *pTrigger;\n  Hash *pHash;\n\n  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );\n  pHash = &(db->aDb[iDb].pSchema->trigHash);\n  pTrigger = sqlite3HashInsert(pHash, zName, 0);\n  if( ALWAYS(pTrigger) ){\n    if( pTrigger->pSchema==pTrigger->pTabSchema ){\n      Table *pTab = tableOfTrigger(pTrigger);\n      if( pTab ){\n        Trigger **pp;\n        for(pp=&pTab->pTrigger; *pp; pp=&((*pp)->pNext)){\n          if( *pp==pTrigger ){\n            *pp = (*pp)->pNext;\n            break;\n          }\n        }\n      }\n    }\n    sqlite3DeleteTrigger(db, pTrigger);\n    db->mDbFlags |= DBFLAG_SchemaChange;\n  }\n}\n\n/*\n** pEList is the SET clause of an UPDATE statement.  Each entry\n** in pEList is of the format <id>=<expr>.  If any of the entries\n** in pEList have an <id> which matches an identifier in pIdList,\n** then return TRUE.  If pIdList==NULL, then it is considered a\n** wildcard that matches anything.  Likewise if pEList==NULL then\n** it matches anything so always return true.  Return false only\n** if there is no match.\n*/\nstatic int checkColumnOverlap(IdList *pIdList, ExprList *pEList){\n  int e;\n  if( pIdList==0 || NEVER(pEList==0) ) return 1;\n  for(e=0; e<pEList->nExpr; e++){\n    if( sqlite3IdListIndex(pIdList, pEList->a[e].zEName)>=0 ) return 1;\n  }\n  return 0;\n}\n\n/*\n** Return true if any TEMP triggers exist\n*/\nstatic int tempTriggersExist(sqlite3 *db){\n  if( NEVER(db->aDb[1].pSchema==0) ) return 0;\n  if( sqliteHashFirst(&db->aDb[1].pSchema->trigHash)==0 ) return 0;\n  return 1;\n}\n\n/*\n** Return a list of all triggers on table pTab if there exists at least\n** one trigger that must be fired when an operation of type 'op' is\n** performed on the table, and, if that operation is an UPDATE, if at\n** least one of the columns in pChanges is being modified.\n*/\nstatic SQLITE_NOINLINE Trigger *triggersReallyExist(\n  Parse *pParse,          /* Parse context */\n  Table *pTab,            /* The table the contains the triggers */\n  int op,                 /* one of TK_DELETE, TK_INSERT, TK_UPDATE */\n  ExprList *pChanges,     /* Columns that change in an UPDATE statement */\n  int *pMask              /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */\n){\n  int mask = 0;\n  Trigger *pList = 0;\n  Trigger *p;\n\n  pList = sqlite3TriggerList(pParse, pTab);\n  assert( pList==0 || IsVirtual(pTab)==0\n           || (pList->bReturning && pList->pNext==0) );\n  if( pList!=0 ){\n    p = pList;\n    if( (pParse->db->flags & SQLITE_EnableTrigger)==0\n     && pTab->pTrigger!=0\n    ){\n      /* The SQLITE_DBCONFIG_ENABLE_TRIGGER setting is off.  That means that\n      ** only TEMP triggers are allowed.  Truncate the pList so that it\n      ** includes only TEMP triggers */\n      if( pList==pTab->pTrigger ){\n        pList = 0;\n        goto exit_triggers_exist;\n      }\n      while( ALWAYS(p->pNext) && p->pNext!=pTab->pTrigger ) p = p->pNext;\n      p->pNext = 0;\n      p = pList;\n    }\n    do{\n      if( p->op==op && checkColumnOverlap(p->pColumns, pChanges) ){\n        mask |= p->tr_tm;\n      }else if( p->op==TK_RETURNING ){\n        /* The first time a RETURNING trigger is seen, the \"op\" value tells\n        ** us what time of trigger it should be. */\n        assert( sqlite3IsToplevel(pParse) );\n        p->op = op;\n        if( IsVirtual(pTab) ){\n          if( op!=TK_INSERT ){\n            sqlite3ErrorMsg(pParse,\n              \"%s RETURNING is not available on virtual tables\",\n              op==TK_DELETE ? \"DELETE\" : \"UPDATE\");\n          }\n          p->tr_tm = TRIGGER_BEFORE;\n        }else{\n          p->tr_tm = TRIGGER_AFTER;\n        }\n        mask |= p->tr_tm;\n      }else if( p->bReturning && p->op==TK_INSERT && op==TK_UPDATE\n                && sqlite3IsToplevel(pParse) ){\n        /* Also fire a RETURNING trigger for an UPSERT */\n        mask |= p->tr_tm;\n      }\n      p = p->pNext;\n    }while( p );\n  }\nexit_triggers_exist:\n  if( pMask ){\n    *pMask = mask;\n  }\n  return (mask ? pList : 0);\n}\nSQLITE_PRIVATE Trigger *sqlite3TriggersExist(\n  Parse *pParse,          /* Parse context */\n  Table *pTab,            /* The table the contains the triggers */\n  int op,                 /* one of TK_DELETE, TK_INSERT, TK_UPDATE */\n  ExprList *pChanges,     /* Columns that change in an UPDATE statement */\n  int *pMask              /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */\n){\n  assert( pTab!=0 );\n  if( (pTab->pTrigger==0 && !tempTriggersExist(pParse->db))\n   || pParse->disableTriggers\n  ){\n    if( pMask ) *pMask = 0;\n    return 0;\n  }\n  return triggersReallyExist(pParse,pTab,op,pChanges,pMask);\n}\n\n/*\n** Convert the pStep->zTarget string into a SrcList and return a pointer\n** to that SrcList.\n**\n** This routine adds a specific database name, if needed, to the target when\n** forming the SrcList.  This prevents a trigger in one database from\n** referring to a target in another database.  An exception is when the\n** trigger is in TEMP in which case it can refer to any other database it\n** wants.\n*/\nSQLITE_PRIVATE SrcList *sqlite3TriggerStepSrc(\n  Parse *pParse,       /* The parsing context */\n  TriggerStep *pStep   /* The trigger containing the target token */\n){\n  sqlite3 *db = pParse->db;\n  SrcList *pSrc;                  /* SrcList to be returned */\n  char *zName = sqlite3DbStrDup(db, pStep->zTarget);\n  pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0);\n  assert( pSrc==0 || pSrc->nSrc==1 );\n  assert( zName || pSrc==0 );\n  if( pSrc ){\n    Schema *pSchema = pStep->pTrig->pSchema;\n    pSrc->a[0].zName = zName;\n    if( pSchema!=db->aDb[1].pSchema ){\n      assert( pSrc->a[0].fg.fixedSchema || pSrc->a[0].u4.zDatabase==0 );\n      pSrc->a[0].u4.pSchema = pSchema;\n      pSrc->a[0].fg.fixedSchema = 1;\n    }\n    if( pStep->pFrom ){\n      SrcList *pDup = sqlite3SrcListDup(db, pStep->pFrom, 0);\n      if( pDup && pDup->nSrc>1 && !IN_RENAME_OBJECT ){\n        Select *pSubquery;\n        Token as;\n        pSubquery = sqlite3SelectNew(pParse,0,pDup,0,0,0,0,SF_NestedFrom,0);\n        as.n = 0;\n        as.z = 0;\n        pDup = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&as,pSubquery,0);\n      }\n      pSrc = sqlite3SrcListAppendList(pParse, pSrc, pDup);\n    }\n  }else{\n    sqlite3DbFree(db, zName);\n  }\n  return pSrc;\n}\n\n/*\n** Return true if the pExpr term from the RETURNING clause argument\n** list is of the form \"*\".  Raise an error if the terms if of the\n** form \"table.*\".\n*/\nstatic int isAsteriskTerm(\n  Parse *pParse,      /* Parsing context */\n  Expr *pTerm         /* A term in the RETURNING clause */\n){\n  assert( pTerm!=0 );\n  if( pTerm->op==TK_ASTERISK ) return 1;\n  if( pTerm->op!=TK_DOT ) return 0;\n  assert( pTerm->pRight!=0 );\n  assert( pTerm->pLeft!=0 );\n  if( pTerm->pRight->op!=TK_ASTERISK ) return 0;\n  sqlite3ErrorMsg(pParse, \"RETURNING may not use \\\"TABLE.*\\\" wildcards\");\n  return 1;\n}\n\n/* The input list pList is the list of result set terms from a RETURNING\n** clause.  The table that we are returning from is pTab.\n**\n** This routine makes a copy of the pList, and at the same time expands\n** any \"*\" wildcards to be the complete set of columns from pTab.\n*/\nstatic ExprList *sqlite3ExpandReturning(\n  Parse *pParse,        /* Parsing context */\n  ExprList *pList,      /* The arguments to RETURNING */\n  Table *pTab           /* The table being updated */\n){\n  ExprList *pNew = 0;\n  sqlite3 *db = pParse->db;\n  int i;\n\n  for(i=0; i<pList->nExpr; i++){\n    Expr *pOldExpr = pList->a[i].pExpr;\n    if( NEVER(pOldExpr==0) ) continue;\n    if( isAsteriskTerm(pParse, pOldExpr) ){\n      int jj;\n      for(jj=0; jj<pTab->nCol; jj++){\n        Expr *pNewExpr;\n        if( IsHiddenColumn(pTab->aCol+jj) ) continue;\n        pNewExpr = sqlite3Expr(db, TK_ID, pTab->aCol[jj].zCnName);\n        pNew = sqlite3ExprListAppend(pParse, pNew, pNewExpr);\n        if( !db->mallocFailed ){\n          struct ExprList_item *pItem = &pNew->a[pNew->nExpr-1];\n          pItem->zEName = sqlite3DbStrDup(db, pTab->aCol[jj].zCnName);\n          pItem->fg.eEName = ENAME_NAME;\n        }\n      }\n    }else{\n      Expr *pNewExpr = sqlite3ExprDup(db, pOldExpr, 0);\n      pNew = sqlite3ExprListAppend(pParse, pNew, pNewExpr);\n      if( !db->mallocFailed && ALWAYS(pList->a[i].zEName!=0) ){\n        struct ExprList_item *pItem = &pNew->a[pNew->nExpr-1];\n        pItem->zEName = sqlite3DbStrDup(db, pList->a[i].zEName);\n        pItem->fg.eEName = pList->a[i].fg.eEName;\n      }\n    }\n  }\n  return pNew;\n}\n\n/* If the Expr node is a subquery or an EXISTS operator or an IN operator that\n** uses a subquery, and if the subquery is SF_Correlated, then mark the\n** expression as EP_VarSelect.\n*/\nstatic int sqlite3ReturningSubqueryVarSelect(Walker *NotUsed, Expr *pExpr){\n  UNUSED_PARAMETER(NotUsed);\n  if( ExprUseXSelect(pExpr)\n   && (pExpr->x.pSelect->selFlags & SF_Correlated)!=0\n  ){\n    testcase( ExprHasProperty(pExpr, EP_VarSelect) );\n    ExprSetProperty(pExpr, EP_VarSelect);\n  }\n  return WRC_Continue;\n}\n\n\n/*\n** If the SELECT references the table pWalker->u.pTab, then do two things:\n**\n**    (1) Mark the SELECT as as SF_Correlated.\n**    (2) Set pWalker->eCode to non-zero so that the caller will know\n**        that (1) has happened.\n*/\nstatic int sqlite3ReturningSubqueryCorrelated(Walker *pWalker, Select *pSelect){\n  int i;\n  SrcList *pSrc;\n  assert( pSelect!=0 );\n  pSrc = pSelect->pSrc;\n  assert( pSrc!=0 );\n  for(i=0; i<pSrc->nSrc; i++){\n    if( pSrc->a[i].pSTab==pWalker->u.pTab ){\n      testcase( pSelect->selFlags & SF_Correlated );\n      pSelect->selFlags |= SF_Correlated;\n      pWalker->eCode = 1;\n      break;\n    }\n  }\n  return WRC_Continue;\n}\n\n/*\n** Scan the expression list that is the argument to RETURNING looking\n** for subqueries that depend on the table which is being modified in the\n** statement that is hosting the RETURNING clause (pTab).  Mark all such\n** subqueries as SF_Correlated.  If the subqueries are part of an\n** expression, mark the expression as EP_VarSelect.\n**\n** https://sqlite.org/forum/forumpost/2c83569ce8945d39\n*/\nstatic void sqlite3ProcessReturningSubqueries(\n  ExprList *pEList,\n  Table *pTab\n){\n  Walker w;\n  memset(&w, 0, sizeof(w));\n  w.xExprCallback = sqlite3ExprWalkNoop;\n  w.xSelectCallback = sqlite3ReturningSubqueryCorrelated;\n  w.u.pTab = pTab;\n  sqlite3WalkExprList(&w, pEList);\n  if( w.eCode ){\n    w.xExprCallback = sqlite3ReturningSubqueryVarSelect;\n    w.xSelectCallback = sqlite3SelectWalkNoop;\n    sqlite3WalkExprList(&w, pEList);\n  }\n}\n\n/*\n** Generate code for the RETURNING trigger.  Unlike other triggers\n** that invoke a subprogram in the bytecode, the code for RETURNING\n** is generated in-line.\n*/\nstatic void codeReturningTrigger(\n  Parse *pParse,       /* Parse context */\n  Trigger *pTrigger,   /* The trigger step that defines the RETURNING */\n  Table *pTab,         /* The table to code triggers from */\n  int regIn            /* The first in an array of registers */\n){\n  Vdbe *v = pParse->pVdbe;\n  sqlite3 *db = pParse->db;\n  ExprList *pNew;\n  Returning *pReturning;\n  Select sSelect;\n  SrcList *pFrom;\n  union {\n    SrcList sSrc;\n    u8 fromSpace[SZ_SRCLIST_1];\n  } uSrc;\n\n  assert( v!=0 );\n  if( !pParse->bReturning ){\n    /* This RETURNING trigger must be for a different statement as\n    ** this statement lacks a RETURNING clause. */\n    return;\n  }\n  assert( db->pParse==pParse );\n  assert( !pParse->isCreate );\n  pReturning = pParse->u1.d.pReturning;\n  if( pTrigger != &(pReturning->retTrig) ){\n    /* This RETURNING trigger is for a different statement */\n    return;\n  }\n  memset(&sSelect, 0, sizeof(sSelect));\n  memset(&uSrc, 0, sizeof(uSrc));\n  pFrom = &uSrc.sSrc;\n  sSelect.pEList = sqlite3ExprListDup(db, pReturning->pReturnEL, 0);\n  sSelect.pSrc = pFrom;\n  pFrom->nSrc = 1;\n  pFrom->a[0].pSTab = pTab;\n  pFrom->a[0].zName = pTab->zName; /* tag-20240424-1 */\n  pFrom->a[0].iCursor = -1;\n  sqlite3SelectPrep(pParse, &sSelect, 0);\n  if( pParse->nErr==0 ){\n    assert( db->mallocFailed==0 );\n    sqlite3GenerateColumnNames(pParse, &sSelect);\n  }\n  sqlite3ExprListDelete(db, sSelect.pEList);\n  pNew = sqlite3ExpandReturning(pParse, pReturning->pReturnEL, pTab);\n  if( pParse->nErr==0 ){\n    NameContext sNC;\n    memset(&sNC, 0, sizeof(sNC));\n    if( pReturning->nRetCol==0 ){\n      pReturning->nRetCol = pNew->nExpr;\n      pReturning->iRetCur = pParse->nTab++;\n    }\n    sNC.pParse = pParse;\n    sNC.uNC.iBaseReg = regIn;\n    sNC.ncFlags = NC_UBaseReg;\n    pParse->eTriggerOp = pTrigger->op;\n    pParse->pTriggerTab = pTab;\n    if( sqlite3ResolveExprListNames(&sNC, pNew)==SQLITE_OK\n     && ALWAYS(!db->mallocFailed)\n    ){\n      int i;\n      int nCol = pNew->nExpr;\n      int reg = pParse->nMem+1;\n      sqlite3ProcessReturningSubqueries(pNew, pTab);\n      pParse->nMem += nCol+2;\n      pReturning->iRetReg = reg;\n      for(i=0; i<nCol; i++){\n        Expr *pCol = pNew->a[i].pExpr;\n        assert( pCol!=0 ); /* Due to !db->mallocFailed ~9 lines above */\n        sqlite3ExprCodeFactorable(pParse, pCol, reg+i);\n        if( sqlite3ExprAffinity(pCol)==SQLITE_AFF_REAL ){\n          sqlite3VdbeAddOp1(v, OP_RealAffinity, reg+i);\n        }\n      }\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, reg, i, reg+i);\n      sqlite3VdbeAddOp2(v, OP_NewRowid, pReturning->iRetCur, reg+i+1);\n      sqlite3VdbeAddOp3(v, OP_Insert, pReturning->iRetCur, reg+i, reg+i+1);\n    }\n  }\n  sqlite3ExprListDelete(db, pNew);\n  pParse->eTriggerOp = 0;\n  pParse->pTriggerTab = 0;\n}\n\n\n\n/*\n** Generate VDBE code for the statements inside the body of a single\n** trigger.\n*/\nstatic int codeTriggerProgram(\n  Parse *pParse,            /* The parser context */\n  TriggerStep *pStepList,   /* List of statements inside the trigger body */\n  int orconf                /* Conflict algorithm. (OE_Abort, etc) */\n){\n  TriggerStep *pStep;\n  Vdbe *v = pParse->pVdbe;\n  sqlite3 *db = pParse->db;\n\n  assert( pParse->pTriggerTab && pParse->pToplevel );\n  assert( pStepList );\n  assert( v!=0 );\n  for(pStep=pStepList; pStep; pStep=pStep->pNext){\n    /* Figure out the ON CONFLICT policy that will be used for this step\n    ** of the trigger program. If the statement that caused this trigger\n    ** to fire had an explicit ON CONFLICT, then use it. Otherwise, use\n    ** the ON CONFLICT policy that was specified as part of the trigger\n    ** step statement. Example:\n    **\n    **   CREATE TRIGGER AFTER INSERT ON t1 BEGIN;\n    **     INSERT OR REPLACE INTO t2 VALUES(new.a, new.b);\n    **   END;\n    **\n    **   INSERT INTO t1 ... ;            -- insert into t2 uses REPLACE policy\n    **   INSERT OR IGNORE INTO t1 ... ;  -- insert into t2 uses IGNORE policy\n    */\n    pParse->eOrconf = (orconf==OE_Default)?pStep->orconf:(u8)orconf;\n    assert( pParse->okConstFactor==0 );\n\n#ifndef SQLITE_OMIT_TRACE\n    if( pStep->zSpan ){\n      sqlite3VdbeAddOp4(v, OP_Trace, 0x7fffffff, 1, 0,\n                        sqlite3MPrintf(db, \"-- %s\", pStep->zSpan),\n                        P4_DYNAMIC);\n    }\n#endif\n\n    switch( pStep->op ){\n      case TK_UPDATE: {\n        sqlite3Update(pParse,\n          sqlite3TriggerStepSrc(pParse, pStep),\n          sqlite3ExprListDup(db, pStep->pExprList, 0),\n          sqlite3ExprDup(db, pStep->pWhere, 0),\n          pParse->eOrconf, 0, 0, 0\n        );\n        sqlite3VdbeAddOp0(v, OP_ResetCount);\n        break;\n      }\n      case TK_INSERT: {\n        sqlite3Insert(pParse,\n          sqlite3TriggerStepSrc(pParse, pStep),\n          sqlite3SelectDup(db, pStep->pSelect, 0),\n          sqlite3IdListDup(db, pStep->pIdList),\n          pParse->eOrconf,\n          sqlite3UpsertDup(db, pStep->pUpsert)\n        );\n        sqlite3VdbeAddOp0(v, OP_ResetCount);\n        break;\n      }\n      case TK_DELETE: {\n        sqlite3DeleteFrom(pParse,\n          sqlite3TriggerStepSrc(pParse, pStep),\n          sqlite3ExprDup(db, pStep->pWhere, 0), 0, 0\n        );\n        sqlite3VdbeAddOp0(v, OP_ResetCount);\n        break;\n      }\n      default: assert( pStep->op==TK_SELECT ); {\n        SelectDest sDest;\n        Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0);\n        sqlite3SelectDestInit(&sDest, SRT_Discard, 0);\n        sqlite3Select(pParse, pSelect, &sDest);\n        sqlite3SelectDelete(db, pSelect);\n        break;\n      }\n    }\n  }\n\n  return 0;\n}\n\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n/*\n** This function is used to add VdbeComment() annotations to a VDBE\n** program. It is not used in production code, only for debugging.\n*/\nstatic const char *onErrorText(int onError){\n  switch( onError ){\n    case OE_Abort:    return \"abort\";\n    case OE_Rollback: return \"rollback\";\n    case OE_Fail:     return \"fail\";\n    case OE_Replace:  return \"replace\";\n    case OE_Ignore:   return \"ignore\";\n    case OE_Default:  return \"default\";\n  }\n  return \"n/a\";\n}\n#endif\n\n/*\n** Parse context structure pFrom has just been used to create a sub-vdbe\n** (trigger program). If an error has occurred, transfer error information\n** from pFrom to pTo.\n*/\nstatic void transferParseError(Parse *pTo, Parse *pFrom){\n  assert( pFrom->zErrMsg==0 || pFrom->nErr );\n  assert( pTo->zErrMsg==0 || pTo->nErr );\n  if( pTo->nErr==0 ){\n    pTo->zErrMsg = pFrom->zErrMsg;\n    pTo->nErr = pFrom->nErr;\n    pTo->rc = pFrom->rc;\n  }else{\n    sqlite3DbFree(pFrom->db, pFrom->zErrMsg);\n  }\n}\n\n/*\n** Create and populate a new TriggerPrg object with a sub-program\n** implementing trigger pTrigger with ON CONFLICT policy orconf.\n*/\nstatic TriggerPrg *codeRowTrigger(\n  Parse *pParse,       /* Current parse context */\n  Trigger *pTrigger,   /* Trigger to code */\n  Table *pTab,         /* The table pTrigger is attached to */\n  int orconf           /* ON CONFLICT policy to code trigger program with */\n){\n  Parse *pTop = sqlite3ParseToplevel(pParse);\n  sqlite3 *db = pParse->db;   /* Database handle */\n  TriggerPrg *pPrg;           /* Value to return */\n  Expr *pWhen = 0;            /* Duplicate of trigger WHEN expression */\n  Vdbe *v;                    /* Temporary VM */\n  NameContext sNC;            /* Name context for sub-vdbe */\n  SubProgram *pProgram = 0;   /* Sub-vdbe for trigger program */\n  int iEndTrigger = 0;        /* Label to jump to if WHEN is false */\n  Parse sSubParse;            /* Parse context for sub-vdbe */\n\n  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );\n  assert( pTop->pVdbe );\n\n  /* Allocate the TriggerPrg and SubProgram objects. To ensure that they\n  ** are freed if an error occurs, link them into the Parse.pTriggerPrg\n  ** list of the top-level Parse object sooner rather than later.  */\n  pPrg = sqlite3DbMallocZero(db, sizeof(TriggerPrg));\n  if( !pPrg ) return 0;\n  pPrg->pNext = pTop->pTriggerPrg;\n  pTop->pTriggerPrg = pPrg;\n  pPrg->pProgram = pProgram = sqlite3DbMallocZero(db, sizeof(SubProgram));\n  if( !pProgram ) return 0;\n  sqlite3VdbeLinkSubProgram(pTop->pVdbe, pProgram);\n  pPrg->pTrigger = pTrigger;\n  pPrg->orconf = orconf;\n  pPrg->aColmask[0] = 0xffffffff;\n  pPrg->aColmask[1] = 0xffffffff;\n\n  /* Allocate and populate a new Parse context to use for coding the\n  ** trigger sub-program.  */\n  sqlite3ParseObjectInit(&sSubParse, db);\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pParse = &sSubParse;\n  sSubParse.pTriggerTab = pTab;\n  sSubParse.pToplevel = pTop;\n  sSubParse.zAuthContext = pTrigger->zName;\n  sSubParse.eTriggerOp = pTrigger->op;\n  sSubParse.nQueryLoop = pParse->nQueryLoop;\n  sSubParse.prepFlags = pParse->prepFlags;\n  sSubParse.oldmask = 0;\n  sSubParse.newmask = 0;\n\n  v = sqlite3GetVdbe(&sSubParse);\n  if( v ){\n    VdbeComment((v, \"Start: %s.%s (%s %s%s%s ON %s)\",\n      pTrigger->zName, onErrorText(orconf),\n      (pTrigger->tr_tm==TRIGGER_BEFORE ? \"BEFORE\" : \"AFTER\"),\n        (pTrigger->op==TK_UPDATE ? \"UPDATE\" : \"\"),\n        (pTrigger->op==TK_INSERT ? \"INSERT\" : \"\"),\n        (pTrigger->op==TK_DELETE ? \"DELETE\" : \"\"),\n      pTab->zName\n    ));\n#ifndef SQLITE_OMIT_TRACE\n    if( pTrigger->zName ){\n      sqlite3VdbeChangeP4(v, -1,\n        sqlite3MPrintf(db, \"-- TRIGGER %s\", pTrigger->zName), P4_DYNAMIC\n      );\n    }\n#endif\n\n    /* If one was specified, code the WHEN clause. If it evaluates to false\n    ** (or NULL) the sub-vdbe is immediately halted by jumping to the\n    ** OP_Halt inserted at the end of the program.  */\n    if( pTrigger->pWhen ){\n      pWhen = sqlite3ExprDup(db, pTrigger->pWhen, 0);\n      if( db->mallocFailed==0\n       && SQLITE_OK==sqlite3ResolveExprNames(&sNC, pWhen)\n      ){\n        iEndTrigger = sqlite3VdbeMakeLabel(&sSubParse);\n        sqlite3ExprIfFalse(&sSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL);\n      }\n      sqlite3ExprDelete(db, pWhen);\n    }\n\n    /* Code the trigger program into the sub-vdbe. */\n    codeTriggerProgram(&sSubParse, pTrigger->step_list, orconf);\n\n    /* Insert an OP_Halt at the end of the sub-program. */\n    if( iEndTrigger ){\n      sqlite3VdbeResolveLabel(v, iEndTrigger);\n    }\n    sqlite3VdbeAddOp0(v, OP_Halt);\n    VdbeComment((v, \"End: %s.%s\", pTrigger->zName, onErrorText(orconf)));\n    transferParseError(pParse, &sSubParse);\n\n    if( pParse->nErr==0 ){\n      assert( db->mallocFailed==0 );\n      pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);\n    }\n    pProgram->nMem = sSubParse.nMem;\n    pProgram->nCsr = sSubParse.nTab;\n    pProgram->token = (void *)pTrigger;\n    pPrg->aColmask[0] = sSubParse.oldmask;\n    pPrg->aColmask[1] = sSubParse.newmask;\n    sqlite3VdbeDelete(v);\n  }else{\n    transferParseError(pParse, &sSubParse);\n  }\n\n  assert( !sSubParse.pTriggerPrg && !sSubParse.nMaxArg );\n  sqlite3ParseObjectReset(&sSubParse);\n  return pPrg;\n}\n\n/*\n** Return a pointer to a TriggerPrg object containing the sub-program for\n** trigger pTrigger with default ON CONFLICT algorithm orconf. If no such\n** TriggerPrg object exists, a new object is allocated and populated before\n** being returned.\n*/\nstatic TriggerPrg *getRowTrigger(\n  Parse *pParse,       /* Current parse context */\n  Trigger *pTrigger,   /* Trigger to code */\n  Table *pTab,         /* The table trigger pTrigger is attached to */\n  int orconf           /* ON CONFLICT algorithm. */\n){\n  Parse *pRoot = sqlite3ParseToplevel(pParse);\n  TriggerPrg *pPrg;\n\n  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );\n\n  /* It may be that this trigger has already been coded (or is in the\n  ** process of being coded). If this is the case, then an entry with\n  ** a matching TriggerPrg.pTrigger field will be present somewhere\n  ** in the Parse.pTriggerPrg list. Search for such an entry.  */\n  for(pPrg=pRoot->pTriggerPrg;\n      pPrg && (pPrg->pTrigger!=pTrigger || pPrg->orconf!=orconf);\n      pPrg=pPrg->pNext\n  );\n\n  /* If an existing TriggerPrg could not be located, create a new one. */\n  if( !pPrg ){\n    pPrg = codeRowTrigger(pParse, pTrigger, pTab, orconf);\n    pParse->db->errByteOffset = -1;\n  }\n\n  return pPrg;\n}\n\n/*\n** Generate code for the trigger program associated with trigger p on\n** table pTab. The reg, orconf and ignoreJump parameters passed to this\n** function are the same as those described in the header function for\n** sqlite3CodeRowTrigger()\n*/\nSQLITE_PRIVATE void sqlite3CodeRowTriggerDirect(\n  Parse *pParse,       /* Parse context */\n  Trigger *p,          /* Trigger to code */\n  Table *pTab,         /* The table to code triggers from */\n  int reg,             /* Reg array containing OLD.* and NEW.* values */\n  int orconf,          /* ON CONFLICT policy */\n  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */\n){\n  Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */\n  TriggerPrg *pPrg;\n  pPrg = getRowTrigger(pParse, p, pTab, orconf);\n  assert( pPrg || pParse->nErr );\n\n  /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program\n  ** is a pointer to the sub-vdbe containing the trigger program.  */\n  if( pPrg ){\n    int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));\n\n    sqlite3VdbeAddOp4(v, OP_Program, reg, ignoreJump, ++pParse->nMem,\n                      (const char *)pPrg->pProgram, P4_SUBPROGRAM);\n    VdbeComment(\n        (v, \"Call: %s.%s\", (p->zName?p->zName:\"fkey\"), onErrorText(orconf)));\n\n    /* Set the P5 operand of the OP_Program instruction to non-zero if\n    ** recursive invocation of this trigger program is disallowed. Recursive\n    ** invocation is disallowed if (a) the sub-program is really a trigger,\n    ** not a foreign key action, and (b) the flag to enable recursive triggers\n    ** is clear.  */\n    sqlite3VdbeChangeP5(v, (u16)bRecursive);\n  }\n}\n\n/*\n** This is called to code the required FOR EACH ROW triggers for an operation\n** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)\n** is given by the op parameter. The tr_tm parameter determines whether the\n** BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then\n** parameter pChanges is passed the list of columns being modified.\n**\n** If there are no triggers that fire at the specified time for the specified\n** operation on pTab, this function is a no-op.\n**\n** The reg argument is the address of the first in an array of registers\n** that contain the values substituted for the new.* and old.* references\n** in the trigger program. If N is the number of columns in table pTab\n** (a copy of pTab->nCol), then registers are populated as follows:\n**\n**   Register       Contains\n**   ------------------------------------------------------\n**   reg+0          OLD.rowid\n**   reg+1          OLD.* value of left-most column of pTab\n**   ...            ...\n**   reg+N          OLD.* value of right-most column of pTab\n**   reg+N+1        NEW.rowid\n**   reg+N+2        NEW.* value of left-most column of pTab\n**   ...            ...\n**   reg+N+N+1      NEW.* value of right-most column of pTab\n**\n** For ON DELETE triggers, the registers containing the NEW.* values will\n** never be accessed by the trigger program, so they are not allocated or\n** populated by the caller (there is no data to populate them with anyway).\n** Similarly, for ON INSERT triggers the values stored in the OLD.* registers\n** are never accessed, and so are not allocated by the caller. So, for an\n** ON INSERT trigger, the value passed to this function as parameter reg\n** is not a readable register, although registers (reg+N) through\n** (reg+N+N+1) are.\n**\n** Parameter orconf is the default conflict resolution algorithm for the\n** trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump\n** is the instruction that control should jump to if a trigger program\n** raises an IGNORE exception.\n*/\nSQLITE_PRIVATE void sqlite3CodeRowTrigger(\n  Parse *pParse,       /* Parse context */\n  Trigger *pTrigger,   /* List of triggers on table pTab */\n  int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */\n  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */\n  int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */\n  Table *pTab,         /* The table to code triggers from */\n  int reg,             /* The first in an array of registers (see above) */\n  int orconf,          /* ON CONFLICT policy */\n  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */\n){\n  Trigger *p;          /* Used to iterate through pTrigger list */\n\n  assert( op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE );\n  assert( tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER );\n  assert( (op==TK_UPDATE)==(pChanges!=0) );\n\n  for(p=pTrigger; p; p=p->pNext){\n\n    /* Sanity checking:  The schema for the trigger and for the table are\n    ** always defined.  The trigger must be in the same schema as the table\n    ** or else it must be a TEMP trigger. */\n    assert( p->pSchema!=0 );\n    assert( p->pTabSchema!=0 );\n    assert( p->pSchema==p->pTabSchema\n         || p->pSchema==pParse->db->aDb[1].pSchema );\n\n    /* Determine whether we should code this trigger.  One of two choices:\n    **   1. The trigger is an exact match to the current DML statement\n    **   2. This is a RETURNING trigger for INSERT but we are currently\n    **      doing the UPDATE part of an UPSERT.\n    */\n    if( (p->op==op || (p->bReturning && p->op==TK_INSERT && op==TK_UPDATE))\n     && p->tr_tm==tr_tm\n     && checkColumnOverlap(p->pColumns, pChanges)\n    ){\n      if( !p->bReturning ){\n        sqlite3CodeRowTriggerDirect(pParse, p, pTab, reg, orconf, ignoreJump);\n      }else if( sqlite3IsToplevel(pParse) ){\n        codeReturningTrigger(pParse, p, pTab, reg);\n      }\n    }\n  }\n}\n\n/*\n** Triggers may access values stored in the old.* or new.* pseudo-table.\n** This function returns a 32-bit bitmask indicating which columns of the\n** old.* or new.* tables actually are used by triggers. This information\n** may be used by the caller, for example, to avoid having to load the entire\n** old.* record into memory when executing an UPDATE or DELETE command.\n**\n** Bit 0 of the returned mask is set if the left-most column of the\n** table may be accessed using an [old|new].<col> reference. Bit 1 is set if\n** the second leftmost column value is required, and so on. If there\n** are more than 32 columns in the table, and at least one of the columns\n** with an index greater than 32 may be accessed, 0xffffffff is returned.\n**\n** It is not possible to determine if the old.rowid or new.rowid column is\n** accessed by triggers. The caller must always assume that it is.\n**\n** Parameter isNew must be either 1 or 0. If it is 0, then the mask returned\n** applies to the old.* table. If 1, the new.* table.\n**\n** Parameter tr_tm must be a mask with one or both of the TRIGGER_BEFORE\n** and TRIGGER_AFTER bits set. Values accessed by BEFORE triggers are only\n** included in the returned mask if the TRIGGER_BEFORE bit is set in the\n** tr_tm parameter. Similarly, values accessed by AFTER triggers are only\n** included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm.\n*/\nSQLITE_PRIVATE u32 sqlite3TriggerColmask(\n  Parse *pParse,       /* Parse context */\n  Trigger *pTrigger,   /* List of triggers on table pTab */\n  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */\n  int isNew,           /* 1 for new.* ref mask, 0 for old.* ref mask */\n  int tr_tm,           /* Mask of TRIGGER_BEFORE|TRIGGER_AFTER */\n  Table *pTab,         /* The table to code triggers from */\n  int orconf           /* Default ON CONFLICT policy for trigger steps */\n){\n  const int op = pChanges ? TK_UPDATE : TK_DELETE;\n  u32 mask = 0;\n  Trigger *p;\n\n  assert( isNew==1 || isNew==0 );\n  if( IsView(pTab) ){\n    return 0xffffffff;\n  }\n  for(p=pTrigger; p; p=p->pNext){\n    if( p->op==op\n     && (tr_tm&p->tr_tm)\n     && checkColumnOverlap(p->pColumns,pChanges)\n    ){\n      if( p->bReturning ){\n        mask = 0xffffffff;\n      }else{\n        TriggerPrg *pPrg;\n        pPrg = getRowTrigger(pParse, p, pTab, orconf);\n        if( pPrg ){\n          mask |= pPrg->aColmask[isNew];\n        }\n      }\n    }\n  }\n\n  return mask;\n}\n\n#endif /* !defined(SQLITE_OMIT_TRIGGER) */\n\n/************** End of trigger.c *********************************************/\n/************** Begin file update.c ******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains C code routines that are called by the parser\n** to handle UPDATE statements.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* Forward declaration */\nstatic void updateVirtualTable(\n  Parse *pParse,       /* The parsing context */\n  SrcList *pSrc,       /* The virtual table to be modified */\n  Table *pTab,         /* The virtual table */\n  ExprList *pChanges,  /* The columns to change in the UPDATE statement */\n  Expr *pRowidExpr,    /* Expression used to recompute the rowid */\n  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */\n  Expr *pWhere,        /* WHERE clause of the UPDATE statement */\n  int onError          /* ON CONFLICT strategy */\n);\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n/*\n** The most recently coded instruction was an OP_Column to retrieve the\n** i-th column of table pTab. This routine sets the P4 parameter of the\n** OP_Column to the default value, if any.\n**\n** The default value of a column is specified by a DEFAULT clause in the\n** column definition. This was either supplied by the user when the table\n** was created, or added later to the table definition by an ALTER TABLE\n** command. If the latter, then the row-records in the table btree on disk\n** may not contain a value for the column and the default value, taken\n** from the P4 parameter of the OP_Column instruction, is returned instead.\n** If the former, then all row-records are guaranteed to include a value\n** for the column and the P4 value is not required.\n**\n** Column definitions created by an ALTER TABLE command may only have\n** literal default values specified: a number, null or a string. (If a more\n** complicated default expression value was provided, it is evaluated\n** when the ALTER TABLE is executed and one of the literal values written\n** into the sqlite_schema table.)\n**\n** Therefore, the P4 parameter is only required if the default value for\n** the column is a literal number, string or null. The sqlite3ValueFromExpr()\n** function is capable of transforming these types of expressions into\n** sqlite3_value objects.\n**\n** If column as REAL affinity and the table is an ordinary b-tree table\n** (not a virtual table) then the value might have been stored as an\n** integer.  In that case, add an OP_RealAffinity opcode to make sure\n** it has been converted into REAL.\n*/\nSQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){\n  Column *pCol;\n  assert( pTab!=0 );\n  assert( pTab->nCol>i );\n  pCol = &pTab->aCol[i];\n  if( pCol->iDflt ){\n    sqlite3_value *pValue = 0;\n    u8 enc = ENC(sqlite3VdbeDb(v));\n    assert( !IsView(pTab) );\n    VdbeComment((v, \"%s.%s\", pTab->zName, pCol->zCnName));\n    assert( i<pTab->nCol );\n    sqlite3ValueFromExpr(sqlite3VdbeDb(v),\n                         sqlite3ColumnExpr(pTab,pCol), enc,\n                         pCol->affinity, &pValue);\n    if( pValue ){\n      sqlite3VdbeAppendP4(v, pValue, P4_MEM);\n    }\n  }\n#ifndef SQLITE_OMIT_FLOATING_POINT\n  if( pCol->affinity==SQLITE_AFF_REAL && !IsVirtual(pTab) ){\n    sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg);\n  }\n#endif\n}\n\n/*\n** Check to see if column iCol of index pIdx references any of the\n** columns defined by aXRef and chngRowid.  Return true if it does\n** and false if not.  This is an optimization.  False-positives are a\n** performance degradation, but false-negatives can result in a corrupt\n** index and incorrect answers.\n**\n** aXRef[j] will be non-negative if column j of the original table is\n** being updated.  chngRowid will be true if the rowid of the table is\n** being updated.\n*/\nstatic int indexColumnIsBeingUpdated(\n  Index *pIdx,      /* The index to check */\n  int iCol,         /* Which column of the index to check */\n  int *aXRef,       /* aXRef[j]>=0 if column j is being updated */\n  int chngRowid     /* true if the rowid is being updated */\n){\n  i16 iIdxCol = pIdx->aiColumn[iCol];\n  assert( iIdxCol!=XN_ROWID ); /* Cannot index rowid */\n  if( iIdxCol>=0 ){\n    return aXRef[iIdxCol]>=0;\n  }\n  assert( iIdxCol==XN_EXPR );\n  assert( pIdx->aColExpr!=0 );\n  assert( pIdx->aColExpr->a[iCol].pExpr!=0 );\n  return sqlite3ExprReferencesUpdatedColumn(pIdx->aColExpr->a[iCol].pExpr,\n                                            aXRef,chngRowid);\n}\n\n/*\n** Check to see if index pIdx is a partial index whose conditional\n** expression might change values due to an UPDATE.  Return true if\n** the index is subject to change and false if the index is guaranteed\n** to be unchanged.  This is an optimization.  False-positives are a\n** performance degradation, but false-negatives can result in a corrupt\n** index and incorrect answers.\n**\n** aXRef[j] will be non-negative if column j of the original table is\n** being updated.  chngRowid will be true if the rowid of the table is\n** being updated.\n*/\nstatic int indexWhereClauseMightChange(\n  Index *pIdx,      /* The index to check */\n  int *aXRef,       /* aXRef[j]>=0 if column j is being updated */\n  int chngRowid     /* true if the rowid is being updated */\n){\n  if( pIdx->pPartIdxWhere==0 ) return 0;\n  return sqlite3ExprReferencesUpdatedColumn(pIdx->pPartIdxWhere,\n                                            aXRef, chngRowid);\n}\n\n/*\n** Allocate and return a pointer to an expression of type TK_ROW with\n** Expr.iColumn set to value (iCol+1). The resolver will modify the\n** expression to be a TK_COLUMN reading column iCol of the first\n** table in the source-list (pSrc->a[0]).\n*/\nstatic Expr *exprRowColumn(Parse *pParse, int iCol){\n  Expr *pRet = sqlite3PExpr(pParse, TK_ROW, 0, 0);\n  if( pRet ) pRet->iColumn = iCol+1;\n  return pRet;\n}\n\n/*\n** Assuming both the pLimit and pOrderBy parameters are NULL, this function\n** generates VM code to run the query:\n**\n**   SELECT <other-columns>, pChanges FROM pTabList WHERE pWhere\n**\n** and write the results to the ephemeral table already opened as cursor\n** iEph. None of pChanges, pTabList or pWhere are modified or consumed by\n** this function, they must be deleted by the caller.\n**\n** Or, if pLimit and pOrderBy are not NULL, and pTab is not a view:\n**\n**   SELECT <other-columns>, pChanges FROM pTabList\n**   WHERE pWhere\n**   GROUP BY <other-columns>\n**   ORDER BY pOrderBy LIMIT pLimit\n**\n** If pTab is a view, the GROUP BY clause is omitted.\n**\n** Exactly how results are written to table iEph, and exactly what\n** the <other-columns> in the query above are is determined by the type\n** of table pTabList->a[0].pTab.\n**\n** If the table is a WITHOUT ROWID table, then argument pPk must be its\n** PRIMARY KEY. In this case <other-columns> are the primary key columns\n** of the table, in order. The results of the query are written to ephemeral\n** table iEph as index keys, using OP_IdxInsert.\n**\n** If the table is actually a view, then <other-columns> are all columns of\n** the view. The results are written to the ephemeral table iEph as records\n** with automatically assigned integer keys.\n**\n** If the table is a virtual or ordinary intkey table, then <other-columns>\n** is its rowid. For a virtual table, the results are written to iEph as\n** records with automatically assigned integer keys For intkey tables, the\n** rowid value in <other-columns> is used as the integer key, and the\n** remaining fields make up the table record.\n*/\nstatic void updateFromSelect(\n  Parse *pParse,                  /* Parse context */\n  int iEph,                       /* Cursor for open eph. table */\n  Index *pPk,                     /* PK if table 0 is WITHOUT ROWID */\n  ExprList *pChanges,             /* List of expressions to return */\n  SrcList *pTabList,              /* List of tables to select from */\n  Expr *pWhere,                   /* WHERE clause for query */\n  ExprList *pOrderBy,             /* ORDER BY clause */\n  Expr *pLimit                    /* LIMIT clause */\n){\n  int i;\n  SelectDest dest;\n  Select *pSelect = 0;\n  ExprList *pList = 0;\n  ExprList *pGrp = 0;\n  Expr *pLimit2 = 0;\n  ExprList *pOrderBy2 = 0;\n  sqlite3 *db = pParse->db;\n  Table *pTab = pTabList->a[0].pSTab;\n  SrcList *pSrc;\n  Expr *pWhere2;\n  int eDest;\n\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n  if( pOrderBy && pLimit==0 ) {\n    sqlite3ErrorMsg(pParse, \"ORDER BY without LIMIT on UPDATE\");\n    return;\n  }\n  pOrderBy2 = sqlite3ExprListDup(db, pOrderBy, 0);\n  pLimit2 = sqlite3ExprDup(db, pLimit, 0);\n#else\n  UNUSED_PARAMETER(pOrderBy);\n  UNUSED_PARAMETER(pLimit);\n#endif\n\n  pSrc = sqlite3SrcListDup(db, pTabList, 0);\n  pWhere2 = sqlite3ExprDup(db, pWhere, 0);\n\n  assert( pTabList->nSrc>1 );\n  if( pSrc ){\n    assert( pSrc->a[0].fg.notCte );\n    pSrc->a[0].iCursor = -1;\n    pSrc->a[0].pSTab->nTabRef--;\n    pSrc->a[0].pSTab = 0;\n  }\n  if( pPk ){\n    for(i=0; i<pPk->nKeyCol; i++){\n      Expr *pNew = exprRowColumn(pParse, pPk->aiColumn[i]);\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n      if( pLimit ){\n        pGrp = sqlite3ExprListAppend(pParse, pGrp, sqlite3ExprDup(db, pNew, 0));\n      }\n#endif\n      pList = sqlite3ExprListAppend(pParse, pList, pNew);\n    }\n    eDest = IsVirtual(pTab) ? SRT_Table : SRT_Upfrom;\n  }else if( IsView(pTab) ){\n    for(i=0; i<pTab->nCol; i++){\n      pList = sqlite3ExprListAppend(pParse, pList, exprRowColumn(pParse, i));\n    }\n    eDest = SRT_Table;\n  }else{\n    eDest = IsVirtual(pTab) ? SRT_Table : SRT_Upfrom;\n    pList = sqlite3ExprListAppend(pParse, 0, sqlite3PExpr(pParse,TK_ROW,0,0));\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n    if( pLimit ){\n      pGrp = sqlite3ExprListAppend(pParse, 0, sqlite3PExpr(pParse,TK_ROW,0,0));\n    }\n#endif\n  }\n  assert( pChanges!=0 || pParse->db->mallocFailed );\n  if( pChanges ){\n    for(i=0; i<pChanges->nExpr; i++){\n      pList = sqlite3ExprListAppend(pParse, pList,\n          sqlite3ExprDup(db, pChanges->a[i].pExpr, 0)\n      );\n    }\n  }\n  pSelect = sqlite3SelectNew(pParse, pList,\n      pSrc, pWhere2, pGrp, 0, pOrderBy2,\n      SF_UFSrcCheck|SF_IncludeHidden|SF_UpdateFrom, pLimit2\n  );\n  if( pSelect ) pSelect->selFlags |= SF_OrderByReqd;\n  sqlite3SelectDestInit(&dest, eDest, iEph);\n  dest.iSDParm2 = (pPk ? pPk->nKeyCol : -1);\n  sqlite3Select(pParse, pSelect, &dest);\n  sqlite3SelectDelete(db, pSelect);\n}\n\n/*\n** Process an UPDATE statement.\n**\n**   UPDATE OR IGNORE tbl SET a=b, c=d FROM tbl2... WHERE e<5 AND f NOT NULL;\n**          \\_______/ \\_/     \\______/      \\_____/       \\________________/\n**           onError   |      pChanges         |                pWhere\n**                     \\_______________________/\n**                               pTabList\n*/\nSQLITE_PRIVATE void sqlite3Update(\n  Parse *pParse,         /* The parser context */\n  SrcList *pTabList,     /* The table in which we should change things */\n  ExprList *pChanges,    /* Things to be changed */\n  Expr *pWhere,          /* The WHERE clause.  May be null */\n  int onError,           /* How to handle constraint errors */\n  ExprList *pOrderBy,    /* ORDER BY clause. May be null */\n  Expr *pLimit,          /* LIMIT clause. May be null */\n  Upsert *pUpsert        /* ON CONFLICT clause, or null */\n){\n  int i, j, k;           /* Loop counters */\n  Table *pTab;           /* The table to be updated */\n  int addrTop = 0;       /* VDBE instruction address of the start of the loop */\n  WhereInfo *pWInfo = 0; /* Information about the WHERE clause */\n  Vdbe *v;               /* The virtual database engine */\n  Index *pIdx;           /* For looping over indices */\n  Index *pPk;            /* The PRIMARY KEY index for WITHOUT ROWID tables */\n  int nIdx;              /* Number of indices that need updating */\n  int nAllIdx;           /* Total number of indexes */\n  int iBaseCur;          /* Base cursor number */\n  int iDataCur;          /* Cursor for the canonical data btree */\n  int iIdxCur;           /* Cursor for the first index */\n  sqlite3 *db;           /* The database structure */\n  int *aRegIdx = 0;      /* Registers for to each index and the main table */\n  int *aXRef = 0;        /* aXRef[i] is the index in pChanges->a[] of the\n                         ** an expression for the i-th column of the table.\n                         ** aXRef[i]==-1 if the i-th column is not changed. */\n  u8 *aToOpen;           /* 1 for tables and indices to be opened */\n  u8 chngPk;             /* PRIMARY KEY changed in a WITHOUT ROWID table */\n  u8 chngRowid;          /* Rowid changed in a normal table */\n  u8 chngKey;            /* Either chngPk or chngRowid */\n  Expr *pRowidExpr = 0;  /* Expression defining the new record number */\n  int iRowidExpr = -1;   /* Index of \"rowid=\" (or IPK) assignment in pChanges */\n  AuthContext sContext;  /* The authorization context */\n  NameContext sNC;       /* The name-context to resolve expressions in */\n  int iDb;               /* Database containing the table being updated */\n  int eOnePass;          /* ONEPASS_XXX value from where.c */\n  int hasFK;             /* True if foreign key processing is required */\n  int labelBreak;        /* Jump here to break out of UPDATE loop */\n  int labelContinue;     /* Jump here to continue next step of UPDATE loop */\n  int flags;             /* Flags for sqlite3WhereBegin() */\n\n#ifndef SQLITE_OMIT_TRIGGER\n  int isView;            /* True when updating a view (INSTEAD OF trigger) */\n  Trigger *pTrigger;     /* List of triggers on pTab, if required */\n  int tmask;             /* Mask of TRIGGER_BEFORE|TRIGGER_AFTER */\n#endif\n  int newmask;           /* Mask of NEW.* columns accessed by BEFORE triggers */\n  int iEph = 0;          /* Ephemeral table holding all primary key values */\n  int nKey = 0;          /* Number of elements in regKey for WITHOUT ROWID */\n  int aiCurOnePass[2];   /* The write cursors opened by WHERE_ONEPASS */\n  int addrOpen = 0;      /* Address of OP_OpenEphemeral */\n  int iPk = 0;           /* First of nPk cells holding PRIMARY KEY value */\n  i16 nPk = 0;           /* Number of components of the PRIMARY KEY */\n  int bReplace = 0;      /* True if REPLACE conflict resolution might happen */\n  int bFinishSeek = 1;   /* The OP_FinishSeek opcode is needed */\n  int nChangeFrom = 0;   /* If there is a FROM, pChanges->nExpr, else 0 */\n\n  /* Register Allocations */\n  int regRowCount = 0;   /* A count of rows changed */\n  int regOldRowid = 0;   /* The old rowid */\n  int regNewRowid = 0;   /* The new rowid */\n  int regNew = 0;        /* Content of the NEW.* table in triggers */\n  int regOld = 0;        /* Content of OLD.* table in triggers */\n  int regRowSet = 0;     /* Rowset of rows to be updated */\n  int regKey = 0;        /* composite PRIMARY KEY value */\n\n  memset(&sContext, 0, sizeof(sContext));\n  db = pParse->db;\n  assert( db->pParse==pParse );\n  if( pParse->nErr ){\n    goto update_cleanup;\n  }\n  assert( db->mallocFailed==0 );\n\n  /* Locate the table which we want to update.\n  */\n  pTab = sqlite3SrcListLookup(pParse, pTabList);\n  if( pTab==0 ) goto update_cleanup;\n  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);\n\n  /* Figure out if we have any triggers and if the table being\n  ** updated is a view.\n  */\n#ifndef SQLITE_OMIT_TRIGGER\n  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges, &tmask);\n  isView = IsView(pTab);\n  assert( pTrigger || tmask==0 );\n#else\n# define pTrigger 0\n# define isView 0\n# define tmask 0\n#endif\n#ifdef SQLITE_OMIT_VIEW\n# undef isView\n# define isView 0\n#endif\n\n#if TREETRACE_ENABLED\n  if( sqlite3TreeTrace & 0x10000 ){\n    sqlite3TreeViewLine(0, \"In sqlite3Update() at %s:%d\", __FILE__, __LINE__);\n    sqlite3TreeViewUpdate(pParse->pWith, pTabList, pChanges, pWhere,\n                          onError, pOrderBy, pLimit, pUpsert, pTrigger);\n  }\n#endif\n\n  /* If there was a FROM clause, set nChangeFrom to the number of expressions\n  ** in the change-list. Otherwise, set it to 0. There cannot be a FROM\n  ** clause if this function is being called to generate code for part of\n  ** an UPSERT statement.  */\n  nChangeFrom = (pTabList->nSrc>1) ? pChanges->nExpr : 0;\n  assert( nChangeFrom==0 || pUpsert==0 );\n\n#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT\n  if( !isView && nChangeFrom==0 ){\n    pWhere = sqlite3LimitWhere(\n        pParse, pTabList, pWhere, pOrderBy, pLimit, \"UPDATE\"\n    );\n    pOrderBy = 0;\n    pLimit = 0;\n  }\n#endif\n\n  if( sqlite3ViewGetColumnNames(pParse, pTab) ){\n    goto update_cleanup;\n  }\n  if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){\n    goto update_cleanup;\n  }\n\n  /* Allocate a cursors for the main database table and for all indices.\n  ** The index cursors might not be used, but if they are used they\n  ** need to occur right after the database cursor.  So go ahead and\n  ** allocate enough space, just in case.\n  */\n  iBaseCur = iDataCur = pParse->nTab++;\n  iIdxCur = iDataCur+1;\n  pPk = HasRowid(pTab) ? 0 : sqlite3PrimaryKeyIndex(pTab);\n  testcase( pPk!=0 && pPk!=pTab->pIndex );\n  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){\n    if( pPk==pIdx ){\n      iDataCur = pParse->nTab;\n    }\n    pParse->nTab++;\n  }\n  if( pUpsert ){\n    /* On an UPSERT, reuse the same cursors already opened by INSERT */\n    iDataCur = pUpsert->iDataCur;\n    iIdxCur = pUpsert->iIdxCur;\n    pParse->nTab = iBaseCur;\n  }\n  pTabList->a[0].iCursor = iDataCur;\n\n  /* Allocate space for aXRef[], aRegIdx[], and aToOpen[].\n  ** Initialize aXRef[] and aToOpen[] to their default values.\n  */\n  aXRef = sqlite3DbMallocRawNN(db, sizeof(int) * (pTab->nCol+nIdx+1) + nIdx+2 );\n  if( aXRef==0 ) goto update_cleanup;\n  aRegIdx = aXRef+pTab->nCol;\n  aToOpen = (u8*)(aRegIdx+nIdx+1);\n  memset(aToOpen, 1, nIdx+1);\n  aToOpen[nIdx+1] = 0;\n  for(i=0; i<pTab->nCol; i++) aXRef[i] = -1;\n\n  /* Initialize the name-context */\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pParse = pParse;\n  sNC.pSrcList = pTabList;\n  sNC.uNC.pUpsert = pUpsert;\n  sNC.ncFlags = NC_UUpsert;\n\n  /* Begin generating code. */\n  v = sqlite3GetVdbe(pParse);\n  if( v==0 ) goto update_cleanup;\n\n  /* Resolve the column names in all the expressions of the\n  ** of the UPDATE statement.  Also find the column index\n  ** for each column to be updated in the pChanges array.  For each\n  ** column to be updated, make sure we have authorization to change\n  ** that column.\n  */\n  chngRowid = chngPk = 0;\n  for(i=0; i<pChanges->nExpr; i++){\n    /* If this is an UPDATE with a FROM clause, do not resolve expressions\n    ** here. The call to sqlite3Select() below will do that. */\n    if( nChangeFrom==0 && sqlite3ResolveExprNames(&sNC, pChanges->a[i].pExpr) ){\n      goto update_cleanup;\n    }\n    j = sqlite3ColumnIndex(pTab, pChanges->a[i].zEName);\n    if( j>=0 ){\n      if( j==pTab->iPKey ){\n        chngRowid = 1;\n        pRowidExpr = pChanges->a[i].pExpr;\n        iRowidExpr = i;\n      }else if( pPk && (pTab->aCol[j].colFlags & COLFLAG_PRIMKEY)!=0 ){\n        chngPk = 1;\n      }\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n      else if( pTab->aCol[j].colFlags & COLFLAG_GENERATED ){\n        testcase( pTab->aCol[j].colFlags & COLFLAG_VIRTUAL );\n        testcase( pTab->aCol[j].colFlags & COLFLAG_STORED );\n        sqlite3ErrorMsg(pParse,\n           \"cannot UPDATE generated column \\\"%s\\\"\",\n           pTab->aCol[j].zCnName);\n        goto update_cleanup;\n      }\n#endif\n      aXRef[j] = i;\n    }else{\n      if( pPk==0 && sqlite3IsRowid(pChanges->a[i].zEName) ){\n        j = -1;\n        chngRowid = 1;\n        pRowidExpr = pChanges->a[i].pExpr;\n        iRowidExpr = i;\n      }else{\n        sqlite3ErrorMsg(pParse, \"no such column: %s\", pChanges->a[i].zEName);\n        pParse->checkSchema = 1;\n        goto update_cleanup;\n      }\n    }\n#ifndef SQLITE_OMIT_AUTHORIZATION\n    {\n      int rc;\n      rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,\n                            j<0 ? \"ROWID\" : pTab->aCol[j].zCnName,\n                            db->aDb[iDb].zDbSName);\n      if( rc==SQLITE_DENY ){\n        goto update_cleanup;\n      }else if( rc==SQLITE_IGNORE ){\n        aXRef[j] = -1;\n      }\n    }\n#endif\n  }\n  assert( (chngRowid & chngPk)==0 );\n  assert( chngRowid==0 || chngRowid==1 );\n  assert( chngPk==0 || chngPk==1 );\n  chngKey = chngRowid + chngPk;\n\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  /* Mark generated columns as changing if their generator expressions\n  ** reference any changing column.  The actual aXRef[] value for\n  ** generated expressions is not used, other than to check to see that it\n  ** is non-negative, so the value of aXRef[] for generated columns can be\n  ** set to any non-negative number.  We use 99999 so that the value is\n  ** obvious when looking at aXRef[] in a symbolic debugger.\n  */\n  if( pTab->tabFlags & TF_HasGenerated ){\n    int bProgress;\n    testcase( pTab->tabFlags & TF_HasVirtual );\n    testcase( pTab->tabFlags & TF_HasStored );\n    do{\n      bProgress = 0;\n      for(i=0; i<pTab->nCol; i++){\n        if( aXRef[i]>=0 ) continue;\n        if( (pTab->aCol[i].colFlags & COLFLAG_GENERATED)==0 ) continue;\n        if( sqlite3ExprReferencesUpdatedColumn(\n                sqlite3ColumnExpr(pTab, &pTab->aCol[i]),\n                 aXRef, chngRowid)\n        ){\n          aXRef[i] = 99999;\n          bProgress = 1;\n        }\n      }\n    }while( bProgress );\n  }\n#endif\n\n  /* The SET expressions are not actually used inside the WHERE loop.\n  ** So reset the colUsed mask. Unless this is a virtual table. In that\n  ** case, set all bits of the colUsed mask (to ensure that the virtual\n  ** table implementation makes all columns available).\n  */\n  pTabList->a[0].colUsed = IsVirtual(pTab) ? ALLBITS : 0;\n\n  hasFK = sqlite3FkRequired(pParse, pTab, aXRef, chngKey);\n\n  /* There is one entry in the aRegIdx[] array for each index on the table\n  ** being updated.  Fill in aRegIdx[] with a register number that will hold\n  ** the key for accessing each index.\n  */\n  if( onError==OE_Replace ) bReplace = 1;\n  for(nAllIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nAllIdx++){\n    int reg;\n    if( chngKey || hasFK>1 || pIdx==pPk\n     || indexWhereClauseMightChange(pIdx,aXRef,chngRowid)\n    ){\n      reg = ++pParse->nMem;\n      pParse->nMem += pIdx->nColumn;\n    }else{\n      reg = 0;\n      for(i=0; i<pIdx->nKeyCol; i++){\n        if( indexColumnIsBeingUpdated(pIdx, i, aXRef, chngRowid) ){\n          reg = ++pParse->nMem;\n          pParse->nMem += pIdx->nColumn;\n          if( onError==OE_Default && pIdx->onError==OE_Replace ){\n            bReplace = 1;\n          }\n          break;\n        }\n      }\n    }\n    if( reg==0 ) aToOpen[nAllIdx+1] = 0;\n    aRegIdx[nAllIdx] = reg;\n  }\n  aRegIdx[nAllIdx] = ++pParse->nMem;  /* Register storing the table record */\n  if( bReplace ){\n    /* If REPLACE conflict resolution might be invoked, open cursors on all\n    ** indexes in case they are needed to delete records.  */\n    memset(aToOpen, 1, nIdx+1);\n  }\n\n  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);\n  sqlite3BeginWriteOperation(pParse, pTrigger || hasFK, iDb);\n\n  /* Allocate required registers. */\n  if( !IsVirtual(pTab) ){\n    /* For now, regRowSet and aRegIdx[nAllIdx] share the same register.\n    ** If regRowSet turns out to be needed, then aRegIdx[nAllIdx] will be\n    ** reallocated.  aRegIdx[nAllIdx] is the register in which the main\n    ** table record is written.  regRowSet holds the RowSet for the\n    ** two-pass update algorithm. */\n    assert( aRegIdx[nAllIdx]==pParse->nMem );\n    regRowSet = aRegIdx[nAllIdx];\n    regOldRowid = regNewRowid = ++pParse->nMem;\n    if( chngPk || pTrigger || hasFK ){\n      regOld = pParse->nMem + 1;\n      pParse->nMem += pTab->nCol;\n    }\n    if( chngKey || pTrigger || hasFK ){\n      regNewRowid = ++pParse->nMem;\n    }\n    regNew = pParse->nMem + 1;\n    pParse->nMem += pTab->nCol;\n  }\n\n  /* Start the view context. */\n  if( isView ){\n    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);\n  }\n\n  /* If we are trying to update a view, realize that view into\n  ** an ephemeral table.\n  */\n#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)\n  if( nChangeFrom==0 && isView ){\n    sqlite3MaterializeView(pParse, pTab,\n        pWhere, pOrderBy, pLimit, iDataCur\n    );\n    pOrderBy = 0;\n    pLimit = 0;\n  }\n#endif\n\n  /* Resolve the column names in all the expressions in the\n  ** WHERE clause.\n  */\n  if( nChangeFrom==0 && sqlite3ResolveExprNames(&sNC, pWhere) ){\n    goto update_cleanup;\n  }\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  /* Virtual tables must be handled separately */\n  if( IsVirtual(pTab) ){\n    updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,\n                       pWhere, onError);\n    goto update_cleanup;\n  }\n#endif\n\n  /* Jump to labelBreak to abandon further processing of this UPDATE */\n  labelContinue = labelBreak = sqlite3VdbeMakeLabel(pParse);\n\n  /* Not an UPSERT.  Normal processing.  Begin by\n  ** initialize the count of updated rows */\n  if( (db->flags&SQLITE_CountRows)!=0\n   && !pParse->pTriggerTab\n   && !pParse->nested\n   && !pParse->bReturning\n   && pUpsert==0\n  ){\n    regRowCount = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);\n  }\n\n  if( nChangeFrom==0 && HasRowid(pTab) ){\n    sqlite3VdbeAddOp3(v, OP_Null, 0, regRowSet, regOldRowid);\n    iEph = pParse->nTab++;\n    addrOpen = sqlite3VdbeAddOp3(v, OP_OpenEphemeral, iEph, 0, regRowSet);\n  }else{\n    assert( pPk!=0 || HasRowid(pTab) );\n    nPk = pPk ? pPk->nKeyCol : 0;\n    iPk = pParse->nMem+1;\n    pParse->nMem += nPk;\n    pParse->nMem += nChangeFrom;\n    regKey = ++pParse->nMem;\n    if( pUpsert==0 ){\n      int nEphCol = nPk + nChangeFrom + (isView ? pTab->nCol : 0);\n      iEph = pParse->nTab++;\n      if( pPk ) sqlite3VdbeAddOp3(v, OP_Null, 0, iPk, iPk+nPk-1);\n      addrOpen = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, iEph, nEphCol);\n      if( pPk ){\n        KeyInfo *pKeyInfo = sqlite3KeyInfoOfIndex(pParse, pPk);\n        if( pKeyInfo ){\n          pKeyInfo->nAllField = nEphCol;\n          sqlite3VdbeAppendP4(v, pKeyInfo, P4_KEYINFO);\n        }\n      }\n      if( nChangeFrom ){\n        updateFromSelect(\n            pParse, iEph, pPk, pChanges, pTabList, pWhere, pOrderBy, pLimit\n        );\n#ifndef SQLITE_OMIT_SUBQUERY\n        if( isView ) iDataCur = iEph;\n#endif\n      }\n    }\n  }\n\n  if( nChangeFrom ){\n    sqlite3MultiWrite(pParse);\n    eOnePass = ONEPASS_OFF;\n    nKey = nPk;\n    regKey = iPk;\n  }else{\n    if( pUpsert ){\n      /* If this is an UPSERT, then all cursors have already been opened by\n      ** the outer INSERT and the data cursor should be pointing at the row\n      ** that is to be updated.  So bypass the code that searches for the\n      ** row(s) to be updated.\n      */\n      pWInfo = 0;\n      eOnePass = ONEPASS_SINGLE;\n      sqlite3ExprIfFalse(pParse, pWhere, labelBreak, SQLITE_JUMPIFNULL);\n      bFinishSeek = 0;\n    }else{\n      /* Begin the database scan.\n      **\n      ** Do not consider a single-pass strategy for a multi-row update if\n      ** there is anything that might disrupt the cursor being used to do\n      ** the UPDATE:\n      **   (1) This is a nested UPDATE\n      **   (2) There are triggers\n      **   (3) There are FOREIGN KEY constraints\n      **   (4) There are REPLACE conflict handlers\n      **   (5) There are subqueries in the WHERE clause\n      */\n      flags = WHERE_ONEPASS_DESIRED;\n      if( !pParse->nested\n       && !pTrigger\n       && !hasFK\n       && !chngKey\n       && !bReplace\n       && (pWhere==0 || !ExprHasProperty(pWhere, EP_Subquery))\n      ){\n        flags |= WHERE_ONEPASS_MULTIROW;\n      }\n      pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,0,0,flags,iIdxCur);\n      if( pWInfo==0 ) goto update_cleanup;\n\n      /* A one-pass strategy that might update more than one row may not\n      ** be used if any column of the index used for the scan is being\n      ** updated. Otherwise, if there is an index on \"b\", statements like\n      ** the following could create an infinite loop:\n      **\n      **   UPDATE t1 SET b=b+1 WHERE b>?\n      **\n      ** Fall back to ONEPASS_OFF if where.c has selected a ONEPASS_MULTI\n      ** strategy that uses an index for which one or more columns are being\n      ** updated.  */\n      eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);\n      bFinishSeek = sqlite3WhereUsesDeferredSeek(pWInfo);\n      if( eOnePass!=ONEPASS_SINGLE ){\n        sqlite3MultiWrite(pParse);\n        if( eOnePass==ONEPASS_MULTI ){\n          int iCur = aiCurOnePass[1];\n          if( iCur>=0 && iCur!=iDataCur && aToOpen[iCur-iBaseCur] ){\n            eOnePass = ONEPASS_OFF;\n          }\n          assert( iCur!=iDataCur || !HasRowid(pTab) );\n        }\n      }\n    }\n\n    if( HasRowid(pTab) ){\n      /* Read the rowid of the current row of the WHERE scan. In ONEPASS_OFF\n      ** mode, write the rowid into the FIFO. In either of the one-pass modes,\n      ** leave it in register regOldRowid.  */\n      sqlite3VdbeAddOp2(v, OP_Rowid, iDataCur, regOldRowid);\n      if( eOnePass==ONEPASS_OFF ){\n        aRegIdx[nAllIdx] = ++pParse->nMem;\n        sqlite3VdbeAddOp3(v, OP_Insert, iEph, regRowSet, regOldRowid);\n      }else{\n        if( ALWAYS(addrOpen) ) sqlite3VdbeChangeToNoop(v, addrOpen);\n      }\n    }else{\n      /* Read the PK of the current row into an array of registers. In\n      ** ONEPASS_OFF mode, serialize the array into a record and store it in\n      ** the ephemeral table. Or, in ONEPASS_SINGLE or MULTI mode, change\n      ** the OP_OpenEphemeral instruction to a Noop (the ephemeral table\n      ** is not required) and leave the PK fields in the array of registers.  */\n      for(i=0; i<nPk; i++){\n        assert( pPk->aiColumn[i]>=0 );\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur,\n                                        pPk->aiColumn[i], iPk+i);\n      }\n      if( eOnePass ){\n        if( addrOpen ) sqlite3VdbeChangeToNoop(v, addrOpen);\n        nKey = nPk;\n        regKey = iPk;\n      }else{\n        sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, regKey,\n                          sqlite3IndexAffinityStr(db, pPk), nPk);\n        sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iEph, regKey, iPk, nPk);\n      }\n    }\n  }\n\n  if( pUpsert==0 ){\n    if( nChangeFrom==0 && eOnePass!=ONEPASS_MULTI ){\n      sqlite3WhereEnd(pWInfo);\n    }\n\n    if( !isView ){\n      int addrOnce = 0;\n      int iNotUsed1 = 0;\n      int iNotUsed2 = 0;\n\n      /* Open every index that needs updating. */\n      if( eOnePass!=ONEPASS_OFF ){\n        if( aiCurOnePass[0]>=0 ) aToOpen[aiCurOnePass[0]-iBaseCur] = 0;\n        if( aiCurOnePass[1]>=0 ) aToOpen[aiCurOnePass[1]-iBaseCur] = 0;\n      }\n\n      if( eOnePass==ONEPASS_MULTI && (nIdx-(aiCurOnePass[1]>=0))>0 ){\n        addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n      }\n      sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, 0, iBaseCur,\n                                 aToOpen, &iNotUsed1, &iNotUsed2);\n      if( addrOnce ){\n        sqlite3VdbeJumpHereOrPopInst(v, addrOnce);\n      }\n    }\n\n    /* Top of the update loop */\n    if( eOnePass!=ONEPASS_OFF ){\n      if( aiCurOnePass[0]!=iDataCur\n       && aiCurOnePass[1]!=iDataCur\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n       && !isView\n#endif\n      ){\n        assert( pPk );\n        sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey,nKey);\n        VdbeCoverage(v);\n      }\n      if( eOnePass!=ONEPASS_SINGLE ){\n        labelContinue = sqlite3VdbeMakeLabel(pParse);\n      }\n      sqlite3VdbeAddOp2(v, OP_IsNull, pPk ? regKey : regOldRowid, labelBreak);\n      VdbeCoverageIf(v, pPk==0);\n      VdbeCoverageIf(v, pPk!=0);\n    }else if( pPk || nChangeFrom ){\n      labelContinue = sqlite3VdbeMakeLabel(pParse);\n      sqlite3VdbeAddOp2(v, OP_Rewind, iEph, labelBreak); VdbeCoverage(v);\n      addrTop = sqlite3VdbeCurrentAddr(v);\n      if( nChangeFrom ){\n        if( !isView ){\n          if( pPk ){\n            for(i=0; i<nPk; i++){\n              sqlite3VdbeAddOp3(v, OP_Column, iEph, i, iPk+i);\n            }\n            sqlite3VdbeAddOp4Int(\n                v, OP_NotFound, iDataCur, labelContinue, iPk, nPk\n            ); VdbeCoverage(v);\n          }else{\n            sqlite3VdbeAddOp2(v, OP_Rowid, iEph, regOldRowid);\n            sqlite3VdbeAddOp3(\n                v, OP_NotExists, iDataCur, labelContinue, regOldRowid\n            ); VdbeCoverage(v);\n          }\n        }\n      }else{\n        sqlite3VdbeAddOp2(v, OP_RowData, iEph, regKey);\n        sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelContinue, regKey,0);\n        VdbeCoverage(v);\n      }\n    }else{\n      sqlite3VdbeAddOp2(v, OP_Rewind, iEph, labelBreak); VdbeCoverage(v);\n      labelContinue = sqlite3VdbeMakeLabel(pParse);\n      addrTop = sqlite3VdbeAddOp2(v, OP_Rowid, iEph, regOldRowid);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, labelContinue, regOldRowid);\n      VdbeCoverage(v);\n    }\n  }\n\n  /* If the rowid value will change, set register regNewRowid to\n  ** contain the new value. If the rowid is not being modified,\n  ** then regNewRowid is the same register as regOldRowid, which is\n  ** already populated.  */\n  assert( chngKey || pTrigger || hasFK || regOldRowid==regNewRowid );\n  if( chngRowid ){\n    assert( iRowidExpr>=0 );\n    if( nChangeFrom==0 ){\n      sqlite3ExprCode(pParse, pRowidExpr, regNewRowid);\n    }else{\n      sqlite3VdbeAddOp3(v, OP_Column, iEph, iRowidExpr, regNewRowid);\n    }\n    sqlite3VdbeAddOp1(v, OP_MustBeInt, regNewRowid); VdbeCoverage(v);\n  }\n\n  /* Compute the old pre-UPDATE content of the row being changed, if that\n  ** information is needed */\n  if( chngPk || hasFK || pTrigger ){\n    u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);\n    oldmask |= sqlite3TriggerColmask(pParse,\n        pTrigger, pChanges, 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, onError\n    );\n    for(i=0; i<pTab->nCol; i++){\n      u32 colFlags = pTab->aCol[i].colFlags;\n      k = sqlite3TableColumnToStorage(pTab, i) + regOld;\n      if( oldmask==0xffffffff\n       || (i<32 && (oldmask & MASKBIT32(i))!=0)\n       || (colFlags & COLFLAG_PRIMKEY)!=0\n      ){\n        testcase(  oldmask!=0xffffffff && i==31 );\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, i, k);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Null, 0, k);\n      }\n    }\n    if( chngRowid==0 && pPk==0 ){\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n      if( isView ) sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid);\n#endif\n      sqlite3VdbeAddOp2(v, OP_Copy, regOldRowid, regNewRowid);\n    }\n  }\n\n  /* Populate the array of registers beginning at regNew with the new\n  ** row data. This array is used to check constants, create the new\n  ** table and index records, and as the values for any new.* references\n  ** made by triggers.\n  **\n  ** If there are one or more BEFORE triggers, then do not populate the\n  ** registers associated with columns that are (a) not modified by\n  ** this UPDATE statement and (b) not accessed by new.* references. The\n  ** values for registers not modified by the UPDATE must be reloaded from\n  ** the database after the BEFORE triggers are fired anyway (as the trigger\n  ** may have modified them). So not loading those that are not going to\n  ** be used eliminates some redundant opcodes.\n  */\n  newmask = sqlite3TriggerColmask(\n      pParse, pTrigger, pChanges, 1, TRIGGER_BEFORE, pTab, onError\n  );\n  for(i=0, k=regNew; i<pTab->nCol; i++, k++){\n    if( i==pTab->iPKey ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, k);\n    }else if( (pTab->aCol[i].colFlags & COLFLAG_GENERATED)!=0 ){\n      if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ) k--;\n    }else{\n      j = aXRef[i];\n      if( j>=0 ){\n        if( nChangeFrom ){\n          int nOff = (isView ? pTab->nCol : nPk);\n          assert( eOnePass==ONEPASS_OFF );\n          sqlite3VdbeAddOp3(v, OP_Column, iEph, nOff+j, k);\n        }else{\n          sqlite3ExprCode(pParse, pChanges->a[j].pExpr, k);\n        }\n      }else if( 0==(tmask&TRIGGER_BEFORE) || i>31 || (newmask & MASKBIT32(i)) ){\n        /* This branch loads the value of a column that will not be changed\n        ** into a register. This is done if there are no BEFORE triggers, or\n        ** if there are one or more BEFORE triggers that use this value via\n        ** a new.* reference in a trigger program.\n        */\n        testcase( i==31 );\n        testcase( i==32 );\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, i, k);\n        bFinishSeek = 0;\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Null, 0, k);\n      }\n    }\n  }\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n  if( pTab->tabFlags & TF_HasGenerated ){\n    testcase( pTab->tabFlags & TF_HasVirtual );\n    testcase( pTab->tabFlags & TF_HasStored );\n    sqlite3ComputeGeneratedColumns(pParse, regNew, pTab);\n  }\n#endif\n\n  /* Fire any BEFORE UPDATE triggers. This happens before constraints are\n  ** verified. One could argue that this is wrong.\n  */\n  if( tmask&TRIGGER_BEFORE ){\n    sqlite3TableAffinity(v, pTab, regNew);\n    sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges,\n        TRIGGER_BEFORE, pTab, regOldRowid, onError, labelContinue);\n\n    if( !isView ){\n      /* The row-trigger may have deleted the row being updated. In this\n      ** case, jump to the next row. No updates or AFTER triggers are\n      ** required. This behavior - what happens when the row being updated\n      ** is deleted or renamed by a BEFORE trigger - is left undefined in the\n      ** documentation.\n      */\n      if( pPk ){\n        sqlite3VdbeAddOp4Int(v, OP_NotFound,iDataCur,labelContinue,regKey,nKey);\n        VdbeCoverage(v);\n      }else{\n        sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, labelContinue,regOldRowid);\n        VdbeCoverage(v);\n      }\n\n      /* After-BEFORE-trigger-reload-loop:\n      ** If it did not delete it, the BEFORE trigger may still have modified\n      ** some of the columns of the row being updated. Load the values for\n      ** all columns not modified by the update statement into their registers\n      ** in case this has happened. Only unmodified columns are reloaded.\n      ** The values computed for modified columns use the values before the\n      ** BEFORE trigger runs.  See test case trigger1-18.0 (added 2018-04-26)\n      ** for an example.\n      */\n      for(i=0, k=regNew; i<pTab->nCol; i++, k++){\n        if( pTab->aCol[i].colFlags & COLFLAG_GENERATED ){\n          if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ) k--;\n        }else if( aXRef[i]<0 && i!=pTab->iPKey ){\n          sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, i, k);\n        }\n      }\n#ifndef SQLITE_OMIT_GENERATED_COLUMNS\n      if( pTab->tabFlags & TF_HasGenerated ){\n        testcase( pTab->tabFlags & TF_HasVirtual );\n        testcase( pTab->tabFlags & TF_HasStored );\n        sqlite3ComputeGeneratedColumns(pParse, regNew, pTab);\n      }\n#endif\n    }\n  }\n\n  if( !isView ){\n    /* Do constraint checks. */\n    assert( regOldRowid>0 );\n    sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,\n        regNewRowid, regOldRowid, chngKey, onError, labelContinue, &bReplace,\n        aXRef, 0);\n\n    /* If REPLACE conflict handling may have been used, or if the PK of the\n    ** row is changing, then the GenerateConstraintChecks() above may have\n    ** moved cursor iDataCur. Reseek it. */\n    if( bReplace || chngKey ){\n      if( pPk ){\n        sqlite3VdbeAddOp4Int(v, OP_NotFound,iDataCur,labelContinue,regKey,nKey);\n      }else{\n        sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, labelContinue,regOldRowid);\n      }\n      VdbeCoverage(v);\n    }\n\n    /* Do FK constraint checks. */\n    if( hasFK ){\n      sqlite3FkCheck(pParse, pTab, regOldRowid, 0, aXRef, chngKey);\n    }\n\n    /* Delete the index entries associated with the current record.  */\n    sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);\n\n    /* We must run the OP_FinishSeek opcode to resolve a prior\n    ** OP_DeferredSeek if there is any possibility that there have been\n    ** no OP_Column opcodes since the OP_DeferredSeek was issued.  But\n    ** we want to avoid the OP_FinishSeek if possible, as running it\n    ** costs CPU cycles. */\n    if( bFinishSeek ){\n      sqlite3VdbeAddOp1(v, OP_FinishSeek, iDataCur);\n    }\n\n    /* If changing the rowid value, or if there are foreign key constraints\n    ** to process, delete the old record. Otherwise, add a noop OP_Delete\n    ** to invoke the pre-update hook.\n    **\n    ** That (regNew==regnewRowid+1) is true is also important for the\n    ** pre-update hook. If the caller invokes preupdate_new(), the returned\n    ** value is copied from memory cell (regNewRowid+1+iCol), where iCol\n    ** is the column index supplied by the user.\n    */\n    assert( regNew==regNewRowid+1 );\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n    sqlite3VdbeAddOp3(v, OP_Delete, iDataCur,\n        OPFLAG_ISUPDATE | ((hasFK>1 || chngKey) ? 0 : OPFLAG_ISNOOP),\n        regNewRowid\n    );\n    if( eOnePass==ONEPASS_MULTI ){\n      assert( hasFK==0 && chngKey==0 );\n      sqlite3VdbeChangeP5(v, OPFLAG_SAVEPOSITION);\n    }\n    if( !pParse->nested ){\n      sqlite3VdbeAppendP4(v, pTab, P4_TABLE);\n    }\n#else\n    if( hasFK>1 || chngKey ){\n      sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);\n    }\n#endif\n\n    if( hasFK ){\n      sqlite3FkCheck(pParse, pTab, 0, regNewRowid, aXRef, chngKey);\n    }\n\n    /* Insert the new index entries and the new record. */\n    sqlite3CompleteInsertion(\n        pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx,\n        OPFLAG_ISUPDATE | (eOnePass==ONEPASS_MULTI ? OPFLAG_SAVEPOSITION : 0),\n        0, 0\n    );\n\n    /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to\n    ** handle rows (possibly in other tables) that refer via a foreign key\n    ** to the row just updated. */\n    if( hasFK ){\n      sqlite3FkActions(pParse, pTab, pChanges, regOldRowid, aXRef, chngKey);\n    }\n  }\n\n  /* Increment the row counter\n  */\n  if( regRowCount ){\n    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);\n  }\n\n  if( pTrigger ){\n    sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges,\n        TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue);\n  }\n\n  /* Repeat the above with the next record to be updated, until\n  ** all record selected by the WHERE clause have been updated.\n  */\n  if( eOnePass==ONEPASS_SINGLE ){\n    /* Nothing to do at end-of-loop for a single-pass */\n  }else if( eOnePass==ONEPASS_MULTI ){\n    sqlite3VdbeResolveLabel(v, labelContinue);\n    sqlite3WhereEnd(pWInfo);\n  }else{\n    sqlite3VdbeResolveLabel(v, labelContinue);\n    sqlite3VdbeAddOp2(v, OP_Next, iEph, addrTop); VdbeCoverage(v);\n  }\n  sqlite3VdbeResolveLabel(v, labelBreak);\n\n  /* Update the sqlite_sequence table by storing the content of the\n  ** maximum rowid counter values recorded while inserting into\n  ** autoincrement tables.\n  */\n  if( pParse->nested==0 && pParse->pTriggerTab==0 && pUpsert==0 ){\n    sqlite3AutoincrementEnd(pParse);\n  }\n\n  /*\n  ** Return the number of rows that were changed, if we are tracking\n  ** that information.\n  */\n  if( regRowCount ){\n    sqlite3CodeChangeCount(v, regRowCount, \"rows updated\");\n  }\n\nupdate_cleanup:\n  sqlite3AuthContextPop(&sContext);\n  sqlite3DbFree(db, aXRef); /* Also frees aRegIdx[] and aToOpen[] */\n  sqlite3SrcListDelete(db, pTabList);\n  sqlite3ExprListDelete(db, pChanges);\n  sqlite3ExprDelete(db, pWhere);\n#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT)\n  sqlite3ExprListDelete(db, pOrderBy);\n  sqlite3ExprDelete(db, pLimit);\n#endif\n  return;\n}\n/* Make sure \"isView\" and other macros defined above are undefined. Otherwise\n** they may interfere with compilation of other functions in this file\n** (or in another file, if this file becomes part of the amalgamation).  */\n#ifdef isView\n #undef isView\n#endif\n#ifdef pTrigger\n #undef pTrigger\n#endif\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Generate code for an UPDATE of a virtual table.\n**\n** There are two possible strategies - the default and the special\n** \"onepass\" strategy. Onepass is only used if the virtual table\n** implementation indicates that pWhere may match at most one row.\n**\n** The default strategy is to create an ephemeral table that contains\n** for each row to be changed:\n**\n**   (A)  The original rowid of that row.\n**   (B)  The revised rowid for the row.\n**   (C)  The content of every column in the row.\n**\n** Then loop through the contents of this ephemeral table executing a\n** VUpdate for each row. When finished, drop the ephemeral table.\n**\n** The \"onepass\" strategy does not use an ephemeral table. Instead, it\n** stores the same values (A, B and C above) in a register array and\n** makes a single invocation of VUpdate.\n*/\nstatic void updateVirtualTable(\n  Parse *pParse,       /* The parsing context */\n  SrcList *pSrc,       /* The virtual table to be modified */\n  Table *pTab,         /* The virtual table */\n  ExprList *pChanges,  /* The columns to change in the UPDATE statement */\n  Expr *pRowid,        /* Expression used to recompute the rowid */\n  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */\n  Expr *pWhere,        /* WHERE clause of the UPDATE statement */\n  int onError          /* ON CONFLICT strategy */\n){\n  Vdbe *v = pParse->pVdbe;  /* Virtual machine under construction */\n  int ephemTab;             /* Table holding the result of the SELECT */\n  int i;                    /* Loop counter */\n  sqlite3 *db = pParse->db; /* Database connection */\n  const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);\n  WhereInfo *pWInfo = 0;\n  int nArg = 2 + pTab->nCol;      /* Number of arguments to VUpdate */\n  int regArg;                     /* First register in VUpdate arg array */\n  int regRec;                     /* Register in which to assemble record */\n  int regRowid;                   /* Register for ephemeral table rowid */\n  int iCsr = pSrc->a[0].iCursor;  /* Cursor used for virtual table scan */\n  int aDummy[2];                  /* Unused arg for sqlite3WhereOkOnePass() */\n  int eOnePass;                   /* True to use onepass strategy */\n  int addr;                       /* Address of OP_OpenEphemeral */\n\n  /* Allocate nArg registers in which to gather the arguments for VUpdate. Then\n  ** create and open the ephemeral table in which the records created from\n  ** these arguments will be temporarily stored. */\n  assert( v );\n  ephemTab = pParse->nTab++;\n  addr= sqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, nArg);\n  regArg = pParse->nMem + 1;\n  pParse->nMem += nArg;\n  if( pSrc->nSrc>1 ){\n    Index *pPk = 0;\n    Expr *pRow;\n    ExprList *pList;\n    if( HasRowid(pTab) ){\n      if( pRowid ){\n        pRow = sqlite3ExprDup(db, pRowid, 0);\n      }else{\n        pRow = sqlite3PExpr(pParse, TK_ROW, 0, 0);\n      }\n    }else{\n      i16 iPk;      /* PRIMARY KEY column */\n      pPk = sqlite3PrimaryKeyIndex(pTab);\n      assert( pPk!=0 );\n      assert( pPk->nKeyCol==1 );\n      iPk = pPk->aiColumn[0];\n      if( aXRef[iPk]>=0 ){\n        pRow = sqlite3ExprDup(db, pChanges->a[aXRef[iPk]].pExpr, 0);\n      }else{\n        pRow = exprRowColumn(pParse, iPk);\n      }\n    }\n    pList = sqlite3ExprListAppend(pParse, 0, pRow);\n\n    for(i=0; i<pTab->nCol; i++){\n      if( aXRef[i]>=0 ){\n        pList = sqlite3ExprListAppend(pParse, pList,\n          sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0)\n        );\n      }else{\n        Expr *pRowExpr = exprRowColumn(pParse, i);\n        if( pRowExpr ) pRowExpr->op2 = OPFLAG_NOCHNG;\n        pList = sqlite3ExprListAppend(pParse, pList, pRowExpr);\n      }\n    }\n\n    updateFromSelect(pParse, ephemTab, pPk, pList, pSrc, pWhere, 0, 0);\n    sqlite3ExprListDelete(db, pList);\n    eOnePass = ONEPASS_OFF;\n  }else{\n    regRec = ++pParse->nMem;\n    regRowid = ++pParse->nMem;\n\n    /* Start scanning the virtual table */\n    pWInfo = sqlite3WhereBegin(\n        pParse, pSrc, pWhere, 0, 0, 0, WHERE_ONEPASS_DESIRED, 0\n    );\n    if( pWInfo==0 ) return;\n\n    /* Populate the argument registers. */\n    for(i=0; i<pTab->nCol; i++){\n      assert( (pTab->aCol[i].colFlags & COLFLAG_GENERATED)==0 );\n      if( aXRef[i]>=0 ){\n        sqlite3ExprCode(pParse, pChanges->a[aXRef[i]].pExpr, regArg+2+i);\n      }else{\n        sqlite3VdbeAddOp3(v, OP_VColumn, iCsr, i, regArg+2+i);\n        sqlite3VdbeChangeP5(v, OPFLAG_NOCHNG);/* For sqlite3_vtab_nochange() */\n      }\n    }\n    if( HasRowid(pTab) ){\n      sqlite3VdbeAddOp2(v, OP_Rowid, iCsr, regArg);\n      if( pRowid ){\n        sqlite3ExprCode(pParse, pRowid, regArg+1);\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Rowid, iCsr, regArg+1);\n      }\n    }else{\n      Index *pPk;   /* PRIMARY KEY index */\n      i16 iPk;      /* PRIMARY KEY column */\n      pPk = sqlite3PrimaryKeyIndex(pTab);\n      assert( pPk!=0 );\n      assert( pPk->nKeyCol==1 );\n      iPk = pPk->aiColumn[0];\n      sqlite3VdbeAddOp3(v, OP_VColumn, iCsr, iPk, regArg);\n      sqlite3VdbeAddOp2(v, OP_SCopy, regArg+2+iPk, regArg+1);\n    }\n\n    eOnePass = sqlite3WhereOkOnePass(pWInfo, aDummy);\n\n    /* There is no ONEPASS_MULTI on virtual tables */\n    assert( eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE );\n\n    if( eOnePass ){\n      /* If using the onepass strategy, no-op out the OP_OpenEphemeral coded\n      ** above. */\n      sqlite3VdbeChangeToNoop(v, addr);\n      sqlite3VdbeAddOp1(v, OP_Close, iCsr);\n    }else{\n      /* Create a record from the argument register contents and insert it into\n      ** the ephemeral table. */\n      sqlite3MultiWrite(pParse);\n      sqlite3VdbeAddOp3(v, OP_MakeRecord, regArg, nArg, regRec);\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_ENABLE_NULL_TRIM)\n      /* Signal an assert() within OP_MakeRecord that it is allowed to\n      ** accept no-change records with serial_type 10 */\n      sqlite3VdbeChangeP5(v, OPFLAG_NOCHNG_MAGIC);\n#endif\n      sqlite3VdbeAddOp2(v, OP_NewRowid, ephemTab, regRowid);\n      sqlite3VdbeAddOp3(v, OP_Insert, ephemTab, regRec, regRowid);\n    }\n  }\n\n\n  if( eOnePass==ONEPASS_OFF ){\n    /* End the virtual table scan */\n    if( pSrc->nSrc==1 ){\n      sqlite3WhereEnd(pWInfo);\n    }\n\n    /* Begin scanning through the ephemeral table. */\n    addr = sqlite3VdbeAddOp1(v, OP_Rewind, ephemTab); VdbeCoverage(v);\n\n    /* Extract arguments from the current row of the ephemeral table and\n    ** invoke the VUpdate method.  */\n    for(i=0; i<nArg; i++){\n      sqlite3VdbeAddOp3(v, OP_Column, ephemTab, i, regArg+i);\n    }\n  }\n  sqlite3VtabMakeWritable(pParse, pTab);\n  sqlite3VdbeAddOp4(v, OP_VUpdate, 0, nArg, regArg, pVTab, P4_VTAB);\n  sqlite3VdbeChangeP5(v, onError==OE_Default ? OE_Abort : onError);\n  sqlite3MayAbort(pParse);\n\n  /* End of the ephemeral table scan. Or, if using the onepass strategy,\n  ** jump to here if the scan visited zero rows. */\n  if( eOnePass==ONEPASS_OFF ){\n    sqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1); VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addr);\n    sqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);\n  }else{\n    sqlite3WhereEnd(pWInfo);\n  }\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n/************** End of update.c **********************************************/\n/************** Begin file upsert.c ******************************************/\n/*\n** 2018-04-12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code to implement various aspects of UPSERT\n** processing and handling of the Upsert object.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_UPSERT\n/*\n** Free a list of Upsert objects\n*/\nstatic void SQLITE_NOINLINE upsertDelete(sqlite3 *db, Upsert *p){\n  do{\n    Upsert *pNext = p->pNextUpsert;\n    sqlite3ExprListDelete(db, p->pUpsertTarget);\n    sqlite3ExprDelete(db, p->pUpsertTargetWhere);\n    sqlite3ExprListDelete(db, p->pUpsertSet);\n    sqlite3ExprDelete(db, p->pUpsertWhere);\n    sqlite3DbFree(db, p->pToFree);\n    sqlite3DbFree(db, p);\n    p = pNext;\n  }while( p );\n}\nSQLITE_PRIVATE void sqlite3UpsertDelete(sqlite3 *db, Upsert *p){\n  if( p ) upsertDelete(db, p);\n}\n\n\n/*\n** Duplicate an Upsert object.\n*/\nSQLITE_PRIVATE Upsert *sqlite3UpsertDup(sqlite3 *db, Upsert *p){\n  if( p==0 ) return 0;\n  return sqlite3UpsertNew(db,\n           sqlite3ExprListDup(db, p->pUpsertTarget, 0),\n           sqlite3ExprDup(db, p->pUpsertTargetWhere, 0),\n           sqlite3ExprListDup(db, p->pUpsertSet, 0),\n           sqlite3ExprDup(db, p->pUpsertWhere, 0),\n           sqlite3UpsertDup(db, p->pNextUpsert)\n         );\n}\n\n/*\n** Create a new Upsert object.\n*/\nSQLITE_PRIVATE Upsert *sqlite3UpsertNew(\n  sqlite3 *db,           /* Determines which memory allocator to use */\n  ExprList *pTarget,     /* Target argument to ON CONFLICT, or NULL */\n  Expr *pTargetWhere,    /* Optional WHERE clause on the target */\n  ExprList *pSet,        /* UPDATE columns, or NULL for a DO NOTHING */\n  Expr *pWhere,          /* WHERE clause for the ON CONFLICT UPDATE */\n  Upsert *pNext          /* Next ON CONFLICT clause in the list */\n){\n  Upsert *pNew;\n  pNew = sqlite3DbMallocZero(db, sizeof(Upsert));\n  if( pNew==0 ){\n    sqlite3ExprListDelete(db, pTarget);\n    sqlite3ExprDelete(db, pTargetWhere);\n    sqlite3ExprListDelete(db, pSet);\n    sqlite3ExprDelete(db, pWhere);\n    sqlite3UpsertDelete(db, pNext);\n    return 0;\n  }else{\n    pNew->pUpsertTarget = pTarget;\n    pNew->pUpsertTargetWhere = pTargetWhere;\n    pNew->pUpsertSet = pSet;\n    pNew->pUpsertWhere = pWhere;\n    pNew->isDoUpdate = pSet!=0;\n    pNew->pNextUpsert = pNext;\n  }\n  return pNew;\n}\n\n/*\n** Analyze the ON CONFLICT clause described by pUpsert.  Resolve all\n** symbols in the conflict-target.\n**\n** Return SQLITE_OK if everything works, or an error code is something\n** is wrong.\n*/\nSQLITE_PRIVATE int sqlite3UpsertAnalyzeTarget(\n  Parse *pParse,     /* The parsing context */\n  SrcList *pTabList, /* Table into which we are inserting */\n  Upsert *pUpsert,   /* The ON CONFLICT clauses */\n  Upsert *pAll       /* Complete list of all ON CONFLICT clauses */\n){\n  Table *pTab;            /* That table into which we are inserting */\n  int rc;                 /* Result code */\n  int iCursor;            /* Cursor used by pTab */\n  Index *pIdx;            /* One of the indexes of pTab */\n  ExprList *pTarget;      /* The conflict-target clause */\n  Expr *pTerm;            /* One term of the conflict-target clause */\n  NameContext sNC;        /* Context for resolving symbolic names */\n  Expr sCol[2];           /* Index column converted into an Expr */\n  int nClause = 0;        /* Counter of ON CONFLICT clauses */\n\n  assert( pTabList->nSrc==1 );\n  assert( pTabList->a[0].pSTab!=0 );\n  assert( pUpsert!=0 );\n  assert( pUpsert->pUpsertTarget!=0 );\n\n  /* Resolve all symbolic names in the conflict-target clause, which\n  ** includes both the list of columns and the optional partial-index\n  ** WHERE clause.\n  */\n  memset(&sNC, 0, sizeof(sNC));\n  sNC.pParse = pParse;\n  sNC.pSrcList = pTabList;\n  for(; pUpsert && pUpsert->pUpsertTarget;\n        pUpsert=pUpsert->pNextUpsert, nClause++){\n    rc = sqlite3ResolveExprListNames(&sNC, pUpsert->pUpsertTarget);\n    if( rc ) return rc;\n    rc = sqlite3ResolveExprNames(&sNC, pUpsert->pUpsertTargetWhere);\n    if( rc ) return rc;\n\n    /* Check to see if the conflict target matches the rowid. */\n    pTab = pTabList->a[0].pSTab;\n    pTarget = pUpsert->pUpsertTarget;\n    iCursor = pTabList->a[0].iCursor;\n    if( HasRowid(pTab)\n     && pTarget->nExpr==1\n     && (pTerm = pTarget->a[0].pExpr)->op==TK_COLUMN\n     && pTerm->iColumn==XN_ROWID\n    ){\n      /* The conflict-target is the rowid of the primary table */\n      assert( pUpsert->pUpsertIdx==0 );\n      continue;\n    }\n\n    /* Initialize sCol[0..1] to be an expression parse tree for a\n    ** single column of an index.  The sCol[0] node will be the TK_COLLATE\n    ** operator and sCol[1] will be the TK_COLUMN operator.  Code below\n    ** will populate the specific collation and column number values\n    ** prior to comparing against the conflict-target expression.\n    */\n    memset(sCol, 0, sizeof(sCol));\n    sCol[0].op = TK_COLLATE;\n    sCol[0].pLeft = &sCol[1];\n    sCol[1].op = TK_COLUMN;\n    sCol[1].iTable = pTabList->a[0].iCursor;\n\n    /* Check for matches against other indexes */\n    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      int ii, jj, nn;\n      if( !IsUniqueIndex(pIdx) ) continue;\n      if( pTarget->nExpr!=pIdx->nKeyCol ) continue;\n      if( pIdx->pPartIdxWhere ){\n        if( pUpsert->pUpsertTargetWhere==0 ) continue;\n        if( sqlite3ExprCompare(pParse, pUpsert->pUpsertTargetWhere,\n                               pIdx->pPartIdxWhere, iCursor)!=0 ){\n          continue;\n        }\n      }\n      nn = pIdx->nKeyCol;\n      for(ii=0; ii<nn; ii++){\n        Expr *pExpr;\n        sCol[0].u.zToken = (char*)pIdx->azColl[ii];\n        if( pIdx->aiColumn[ii]==XN_EXPR ){\n          assert( pIdx->aColExpr!=0 );\n          assert( pIdx->aColExpr->nExpr>ii );\n          assert( pIdx->bHasExpr );\n          pExpr = pIdx->aColExpr->a[ii].pExpr;\n          if( pExpr->op!=TK_COLLATE ){\n            sCol[0].pLeft = pExpr;\n            pExpr = &sCol[0];\n          }\n        }else{\n          sCol[0].pLeft = &sCol[1];\n          sCol[1].iColumn = pIdx->aiColumn[ii];\n          pExpr = &sCol[0];\n        }\n        for(jj=0; jj<nn; jj++){\n          if( sqlite3ExprCompare(0,pTarget->a[jj].pExpr,pExpr,iCursor)<2 ){\n            break;  /* Column ii of the index matches column jj of target */\n          }\n        }\n        if( jj>=nn ){\n          /* The target contains no match for column jj of the index */\n          break;\n        }\n      }\n      if( ii<nn ){\n        /* Column ii of the index did not match any term of the conflict target.\n        ** Continue the search with the next index. */\n        continue;\n      }\n      pUpsert->pUpsertIdx = pIdx;\n      if( sqlite3UpsertOfIndex(pAll,pIdx)!=pUpsert ){\n        /* Really this should be an error.  The isDup ON CONFLICT clause will\n        ** never fire.  But this problem was not discovered until three years\n        ** after multi-CONFLICT upsert was added, and so we silently ignore\n        ** the problem to prevent breaking applications that might actually\n        ** have redundant ON CONFLICT clauses. */\n        pUpsert->isDup = 1;\n      }\n      break;\n    }\n    if( pUpsert->pUpsertIdx==0 ){\n      char zWhich[16];\n      if( nClause==0 && pUpsert->pNextUpsert==0 ){\n        zWhich[0] = 0;\n      }else{\n        sqlite3_snprintf(sizeof(zWhich),zWhich,\"%r \", nClause+1);\n      }\n      sqlite3ErrorMsg(pParse, \"%sON CONFLICT clause does not match any \"\n                              \"PRIMARY KEY or UNIQUE constraint\", zWhich);\n      return SQLITE_ERROR;\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return true if pUpsert is the last ON CONFLICT clause with a\n** conflict target, or if pUpsert is followed by another ON CONFLICT\n** clause that targets the INTEGER PRIMARY KEY.\n*/\nSQLITE_PRIVATE int sqlite3UpsertNextIsIPK(Upsert *pUpsert){\n  Upsert *pNext;\n  if( NEVER(pUpsert==0) ) return 0;\n  pNext = pUpsert->pNextUpsert;\n  while( 1 /*exit-by-return*/ ){\n    if( pNext==0 ) return 1;\n    if( pNext->pUpsertTarget==0 ) return 1;\n    if( pNext->pUpsertIdx==0 ) return 1;\n    if( !pNext->isDup ) return 0;\n    pNext = pNext->pNextUpsert;\n  }\n  return 0;\n}\n\n/*\n** Given the list of ON CONFLICT clauses described by pUpsert, and\n** a particular index pIdx, return a pointer to the particular ON CONFLICT\n** clause that applies to the index.  Or, if the index is not subject to\n** any ON CONFLICT clause, return NULL.\n*/\nSQLITE_PRIVATE Upsert *sqlite3UpsertOfIndex(Upsert *pUpsert, Index *pIdx){\n  while(\n      pUpsert\n   && pUpsert->pUpsertTarget!=0\n   && pUpsert->pUpsertIdx!=pIdx\n  ){\n     pUpsert = pUpsert->pNextUpsert;\n  }\n  return pUpsert;\n}\n\n/*\n** Generate bytecode that does an UPDATE as part of an upsert.\n**\n** If pIdx is NULL, then the UNIQUE constraint that failed was the IPK.\n** In this case parameter iCur is a cursor open on the table b-tree that\n** currently points to the conflicting table row. Otherwise, if pIdx\n** is not NULL, then pIdx is the constraint that failed and iCur is a\n** cursor points to the conflicting row.\n*/\nSQLITE_PRIVATE void sqlite3UpsertDoUpdate(\n  Parse *pParse,        /* The parsing and code-generating context */\n  Upsert *pUpsert,      /* The ON CONFLICT clause for the upsert */\n  Table *pTab,          /* The table being updated */\n  Index *pIdx,          /* The UNIQUE constraint that failed */\n  int iCur              /* Cursor for pIdx (or pTab if pIdx==NULL) */\n){\n  Vdbe *v = pParse->pVdbe;\n  sqlite3 *db = pParse->db;\n  SrcList *pSrc;            /* FROM clause for the UPDATE */\n  int iDataCur;\n  int i;\n  Upsert *pTop = pUpsert;\n\n  assert( v!=0 );\n  assert( pUpsert!=0 );\n  iDataCur = pUpsert->iDataCur;\n  pUpsert = sqlite3UpsertOfIndex(pTop, pIdx);\n  VdbeNoopComment((v, \"Begin DO UPDATE of UPSERT\"));\n  if( pIdx && iCur!=iDataCur ){\n    if( HasRowid(pTab) ){\n      int regRowid = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp2(v, OP_IdxRowid, iCur, regRowid);\n      sqlite3VdbeAddOp3(v, OP_SeekRowid, iDataCur, 0, regRowid);\n      VdbeCoverage(v);\n      sqlite3ReleaseTempReg(pParse, regRowid);\n    }else{\n      Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n      int nPk = pPk->nKeyCol;\n      int iPk = pParse->nMem+1;\n      pParse->nMem += nPk;\n      for(i=0; i<nPk; i++){\n        int k;\n        assert( pPk->aiColumn[i]>=0 );\n        k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[i]);\n        sqlite3VdbeAddOp3(v, OP_Column, iCur, k, iPk+i);\n        VdbeComment((v, \"%s.%s\", pIdx->zName,\n                    pTab->aCol[pPk->aiColumn[i]].zCnName));\n      }\n      sqlite3VdbeVerifyAbortable(v, OE_Abort);\n      i = sqlite3VdbeAddOp4Int(v, OP_Found, iDataCur, 0, iPk, nPk);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0,\n            \"corrupt database\", P4_STATIC);\n      sqlite3MayAbort(pParse);\n      sqlite3VdbeJumpHere(v, i);\n    }\n  }\n  /* pUpsert does not own pTop->pUpsertSrc - the outer INSERT statement does.\n  ** So we have to make a copy before passing it down into sqlite3Update() */\n  pSrc = sqlite3SrcListDup(db, pTop->pUpsertSrc, 0);\n  /* excluded.* columns of type REAL need to be converted to a hard real */\n  for(i=0; i<pTab->nCol; i++){\n    if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){\n      sqlite3VdbeAddOp1(v, OP_RealAffinity, pTop->regData+i);\n    }\n  }\n  sqlite3Update(pParse, pSrc, sqlite3ExprListDup(db,pUpsert->pUpsertSet,0),\n      sqlite3ExprDup(db,pUpsert->pUpsertWhere,0), OE_Abort, 0, 0, pUpsert);\n  VdbeNoopComment((v, \"End DO UPDATE of UPSERT\"));\n}\n\n#endif /* SQLITE_OMIT_UPSERT */\n\n/************** End of upsert.c **********************************************/\n/************** Begin file vacuum.c ******************************************/\n/*\n** 2003 April 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to implement the VACUUM command.\n**\n** Most of the code in this file may be omitted by defining the\n** SQLITE_OMIT_VACUUM macro.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"vdbeInt.h\" */\n\n#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)\n\n/*\n** Execute zSql on database db.\n**\n** If zSql returns rows, then each row will have exactly one\n** column.  (This will only happen if zSql begins with \"SELECT\".)\n** Take each row of result and call execSql() again recursively.\n**\n** The execSqlF() routine does the same thing, except it accepts\n** a format string as its third argument\n*/\nstatic int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){\n  sqlite3_stmt *pStmt;\n  int rc;\n\n  /* printf(\"SQL: [%s]\\n\", zSql); fflush(stdout); */\n  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);\n  if( rc!=SQLITE_OK ) return rc;\n  while( SQLITE_ROW==(rc = sqlite3_step(pStmt)) ){\n    const char *zSubSql = (const char*)sqlite3_column_text(pStmt,0);\n    assert( sqlite3_strnicmp(zSql,\"SELECT\",6)==0 );\n    /* The secondary SQL must be one of CREATE TABLE, CREATE INDEX,\n    ** or INSERT.  Historically there have been attacks that first\n    ** corrupt the sqlite_schema.sql field with other kinds of statements\n    ** then run VACUUM to get those statements to execute at inappropriate\n    ** times. */\n    if( zSubSql\n     && (strncmp(zSubSql,\"CRE\",3)==0 || strncmp(zSubSql,\"INS\",3)==0)\n    ){\n      rc = execSql(db, pzErrMsg, zSubSql);\n      if( rc!=SQLITE_OK ) break;\n    }\n  }\n  assert( rc!=SQLITE_ROW );\n  if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n  if( rc ){\n    sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db));\n  }\n  (void)sqlite3_finalize(pStmt);\n  return rc;\n}\nstatic int execSqlF(sqlite3 *db, char **pzErrMsg, const char *zSql, ...){\n  char *z;\n  va_list ap;\n  int rc;\n  va_start(ap, zSql);\n  z = sqlite3VMPrintf(db, zSql, ap);\n  va_end(ap);\n  if( z==0 ) return SQLITE_NOMEM;\n  rc = execSql(db, pzErrMsg, z);\n  sqlite3DbFree(db, z);\n  return rc;\n}\n\n/*\n** The VACUUM command is used to clean up the database,\n** collapse free space, etc.  It is modelled after the VACUUM command\n** in PostgreSQL.  The VACUUM command works as follows:\n**\n**   (1)  Create a new transient database file\n**   (2)  Copy all content from the database being vacuumed into\n**        the new transient database file\n**   (3)  Copy content from the transient database back into the\n**        original database.\n**\n** The transient database requires temporary disk space approximately\n** equal to the size of the original database.  The copy operation of\n** step (3) requires additional temporary disk space approximately equal\n** to the size of the original database for the rollback journal.\n** Hence, temporary disk space that is approximately 2x the size of the\n** original database is required.  Every page of the database is written\n** approximately 3 times:  Once for step (2) and twice for step (3).\n** Two writes per page are required in step (3) because the original\n** database content must be written into the rollback journal prior to\n** overwriting the database with the vacuumed content.\n**\n** Only 1x temporary space and only 1x writes would be required if\n** the copy of step (3) were replaced by deleting the original database\n** and renaming the transient database as the original.  But that will\n** not work if other processes are attached to the original database.\n** And a power loss in between deleting the original and renaming the\n** transient would cause the database file to appear to be deleted\n** following reboot.\n*/\nSQLITE_PRIVATE void sqlite3Vacuum(Parse *pParse, Token *pNm, Expr *pInto){\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  int iDb = 0;\n  if( v==0 ) goto build_vacuum_end;\n  if( pParse->nErr ) goto build_vacuum_end;\n  if( pNm ){\n#ifndef SQLITE_BUG_COMPATIBLE_20160819\n    /* Default behavior:  Report an error if the argument to VACUUM is\n    ** not recognized */\n    iDb = sqlite3TwoPartName(pParse, pNm, pNm, &pNm);\n    if( iDb<0 ) goto build_vacuum_end;\n#else\n    /* When SQLITE_BUG_COMPATIBLE_20160819 is defined, unrecognized arguments\n    ** to VACUUM are silently ignored.  This is a back-out of a bug fix that\n    ** occurred on 2016-08-19 (https://sqlite.org/src/info/083f9e6270).\n    ** The buggy behavior is required for binary compatibility with some\n    ** legacy applications. */\n    iDb = sqlite3FindDb(pParse->db, pNm);\n    if( iDb<0 ) iDb = 0;\n#endif\n  }\n  if( iDb!=1 ){\n    int iIntoReg = 0;\n    if( pInto && sqlite3ResolveSelfReference(pParse,0,0,pInto,0)==0 ){\n      iIntoReg = ++pParse->nMem;\n      sqlite3ExprCode(pParse, pInto, iIntoReg);\n    }\n    sqlite3VdbeAddOp2(v, OP_Vacuum, iDb, iIntoReg);\n    sqlite3VdbeUsesBtree(v, iDb);\n  }\nbuild_vacuum_end:\n  sqlite3ExprDelete(pParse->db, pInto);\n  return;\n}\n\n/*\n** This routine implements the OP_Vacuum opcode of the VDBE.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE int sqlite3RunVacuum(\n  char **pzErrMsg,        /* Write error message here */\n  sqlite3 *db,            /* Database connection */\n  int iDb,                /* Which attached DB to vacuum */\n  sqlite3_value *pOut     /* Write results here, if not NULL. VACUUM INTO */\n){\n  int rc = SQLITE_OK;     /* Return code from service routines */\n  Btree *pMain;           /* The database being vacuumed */\n  Btree *pTemp;           /* The temporary database we vacuum into */\n  u32 saved_mDbFlags;     /* Saved value of db->mDbFlags */\n  u64 saved_flags;        /* Saved value of db->flags */\n  i64 saved_nChange;      /* Saved value of db->nChange */\n  i64 saved_nTotalChange; /* Saved value of db->nTotalChange */\n  u32 saved_openFlags;    /* Saved value of db->openFlags */\n  u8 saved_mTrace;        /* Saved trace settings */\n  Db *pDb = 0;            /* Database to detach at end of vacuum */\n  int isMemDb;            /* True if vacuuming a :memory: database */\n  int nRes;               /* Bytes of reserved space at the end of each page */\n  int nDb;                /* Number of attached databases */\n  const char *zDbMain;    /* Schema name of database to vacuum */\n  const char *zOut;       /* Name of output file */\n  u32 pgflags = PAGER_SYNCHRONOUS_OFF; /* sync flags for output db */\n  u64 iRandom;            /* Random value used for zDbVacuum[] */\n  char zDbVacuum[42];     /* Name of the ATTACH-ed database used for vacuum */\n\n\n  if( !db->autoCommit ){\n    sqlite3SetString(pzErrMsg, db, \"cannot VACUUM from within a transaction\");\n    return SQLITE_ERROR; /* IMP: R-12218-18073 */\n  }\n  if( db->nVdbeActive>1 ){\n    sqlite3SetString(pzErrMsg, db,\"cannot VACUUM - SQL statements in progress\");\n    return SQLITE_ERROR; /* IMP: R-15610-35227 */\n  }\n  saved_openFlags = db->openFlags;\n  if( pOut ){\n    if( sqlite3_value_type(pOut)!=SQLITE_TEXT ){\n      sqlite3SetString(pzErrMsg, db, \"non-text filename\");\n      return SQLITE_ERROR;\n    }\n    zOut = (const char*)sqlite3_value_text(pOut);\n    db->openFlags &= ~SQLITE_OPEN_READONLY;\n    db->openFlags |= SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE;\n  }else{\n    zOut = \"\";\n  }\n\n  /* Save the current value of the database flags so that it can be\n  ** restored before returning. Then set the writable-schema flag, and\n  ** disable CHECK and foreign key constraints.  */\n  saved_flags = db->flags;\n  saved_mDbFlags = db->mDbFlags;\n  saved_nChange = db->nChange;\n  saved_nTotalChange = db->nTotalChange;\n  saved_mTrace = db->mTrace;\n  db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks | SQLITE_Comments\n               | SQLITE_AttachCreate | SQLITE_AttachWrite;\n  db->mDbFlags |= DBFLAG_PreferBuiltin | DBFLAG_Vacuum;\n  db->flags &= ~(u64)(SQLITE_ForeignKeys | SQLITE_ReverseOrder\n                   | SQLITE_Defensive | SQLITE_CountRows);\n  db->mTrace = 0;\n\n  zDbMain = db->aDb[iDb].zDbSName;\n  pMain = db->aDb[iDb].pBt;\n  isMemDb = sqlite3PagerIsMemdb(sqlite3BtreePager(pMain));\n\n  /* Attach the temporary database as 'vacuum_XXXXXX'. The synchronous pragma\n  ** can be set to 'off' for this file, as it is not recovered if a crash\n  ** occurs anyway. The integrity of the database is maintained by a\n  ** (possibly synchronous) transaction opened on the main database before\n  ** sqlite3BtreeCopyFile() is called.\n  **\n  ** An optimization would be to use a non-journaled pager.\n  ** (Later:) I tried setting \"PRAGMA vacuum_XXXXXX.journal_mode=OFF\" but\n  ** that actually made the VACUUM run slower.  Very little journalling\n  ** actually occurs when doing a vacuum since the vacuum_db is initially\n  ** empty.  Only the journal header is written.  Apparently it takes more\n  ** time to parse and run the PRAGMA to turn journalling off than it does\n  ** to write the journal header file.\n  */\n  sqlite3_randomness(sizeof(iRandom),&iRandom);\n  sqlite3_snprintf(sizeof(zDbVacuum), zDbVacuum, \"vacuum_%016llx\", iRandom);\n  nDb = db->nDb;\n  rc = execSqlF(db, pzErrMsg, \"ATTACH %Q AS %s\", zOut, zDbVacuum);\n  db->openFlags = saved_openFlags;\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n  assert( (db->nDb-1)==nDb );\n  pDb = &db->aDb[nDb];\n  assert( strcmp(pDb->zDbSName,zDbVacuum)==0 );\n  pTemp = pDb->pBt;\n  if( pOut ){\n    sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));\n    i64 sz = 0;\n    if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){\n      rc = SQLITE_ERROR;\n      sqlite3SetString(pzErrMsg, db, \"output file already exists\");\n      goto end_of_vacuum;\n    }\n    db->mDbFlags |= DBFLAG_VacuumInto;\n\n    /* For a VACUUM INTO, the pager-flags are set to the same values as\n    ** they are for the database being vacuumed, except that PAGER_CACHESPILL\n    ** is always set. */\n    pgflags = db->aDb[iDb].safety_level | (db->flags & PAGER_FLAGS_MASK);\n  }\n  nRes = sqlite3BtreeGetRequestedReserve(pMain);\n\n  sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);\n  sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));\n  sqlite3BtreeSetPagerFlags(pTemp, pgflags|PAGER_CACHESPILL);\n\n  /* Begin a transaction and take an exclusive lock on the main database\n  ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,\n  ** to ensure that we do not try to change the page-size on a WAL database.\n  */\n  rc = execSql(db, pzErrMsg, \"BEGIN\");\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n  rc = sqlite3BtreeBeginTrans(pMain, pOut==0 ? 2 : 0, 0);\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n\n  /* Do not attempt to change the page size for a WAL database */\n  if( sqlite3PagerGetJournalMode(sqlite3BtreePager(pMain))\n                                               ==PAGER_JOURNALMODE_WAL\n   && pOut==0\n  ){\n    db->nextPagesize = 0;\n  }\n\n  if( sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain), nRes, 0)\n   || (!isMemDb && sqlite3BtreeSetPageSize(pTemp, db->nextPagesize, nRes, 0))\n   || NEVER(db->mallocFailed)\n  ){\n    rc = SQLITE_NOMEM_BKPT;\n    goto end_of_vacuum;\n  }\n\n#ifndef SQLITE_OMIT_AUTOVACUUM\n  sqlite3BtreeSetAutoVacuum(pTemp, db->nextAutovac>=0 ? db->nextAutovac :\n                                           sqlite3BtreeGetAutoVacuum(pMain));\n#endif\n\n  /* Query the schema of the main database. Create a mirror schema\n  ** in the temporary database.\n  */\n  db->init.iDb = nDb; /* force new CREATE statements into vacuum_db */\n  rc = execSqlF(db, pzErrMsg,\n      \"SELECT sql FROM \\\"%w\\\".sqlite_schema\"\n      \" WHERE type='table'AND name<>'sqlite_sequence'\"\n      \" AND coalesce(rootpage,1)>0\",\n      zDbMain\n  );\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n  rc = execSqlF(db, pzErrMsg,\n      \"SELECT sql FROM \\\"%w\\\".sqlite_schema\"\n      \" WHERE type='index'\",\n      zDbMain\n  );\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n  db->init.iDb = 0;\n\n  /* Loop through the tables in the main database. For each, do\n  ** an \"INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;\" to copy\n  ** the contents to the temporary database.\n  */\n  rc = execSqlF(db, pzErrMsg,\n      \"SELECT'INSERT INTO %s.'||quote(name)\"\n      \"||' SELECT*FROM\\\"%w\\\".'||quote(name)\"\n      \"FROM %s.sqlite_schema \"\n      \"WHERE type='table'AND coalesce(rootpage,1)>0\",\n      zDbVacuum, zDbMain, zDbVacuum\n  );\n  assert( (db->mDbFlags & DBFLAG_Vacuum)!=0 );\n  db->mDbFlags &= ~DBFLAG_Vacuum;\n  if( rc!=SQLITE_OK ) goto end_of_vacuum;\n\n  /* Copy the triggers, views, and virtual tables from the main database\n  ** over to the temporary database.  None of these objects has any\n  ** associated storage, so all we have to do is copy their entries\n  ** from the schema table.\n  */\n  rc = execSqlF(db, pzErrMsg,\n      \"INSERT INTO %s.sqlite_schema\"\n      \" SELECT*FROM \\\"%w\\\".sqlite_schema\"\n      \" WHERE type IN('view','trigger')\"\n      \" OR(type='table'AND rootpage=0)\",\n      zDbVacuum, zDbMain\n  );\n  if( rc ) goto end_of_vacuum;\n\n  /* At this point, there is a write transaction open on both the\n  ** vacuum database and the main database. Assuming no error occurs,\n  ** both transactions are closed by this block - the main database\n  ** transaction by sqlite3BtreeCopyFile() and the other by an explicit\n  ** call to sqlite3BtreeCommit().\n  */\n  {\n    u32 meta;\n    int i;\n\n    /* This array determines which meta meta values are preserved in the\n    ** vacuum.  Even entries are the meta value number and odd entries\n    ** are an increment to apply to the meta value after the vacuum.\n    ** The increment is used to increase the schema cookie so that other\n    ** connections to the same database will know to reread the schema.\n    */\n    static const unsigned char aCopy[] = {\n       BTREE_SCHEMA_VERSION,     1,  /* Add one to the old schema cookie */\n       BTREE_DEFAULT_CACHE_SIZE, 0,  /* Preserve the default page cache size */\n       BTREE_TEXT_ENCODING,      0,  /* Preserve the text encoding */\n       BTREE_USER_VERSION,       0,  /* Preserve the user version */\n       BTREE_APPLICATION_ID,     0,  /* Preserve the application id */\n    };\n\n    assert( SQLITE_TXN_WRITE==sqlite3BtreeTxnState(pTemp) );\n    assert( pOut!=0 || SQLITE_TXN_WRITE==sqlite3BtreeTxnState(pMain) );\n\n    /* Copy Btree meta values */\n    for(i=0; i<ArraySize(aCopy); i+=2){\n      /* GetMeta() and UpdateMeta() cannot fail in this context because\n      ** we already have page 1 loaded into cache and marked dirty. */\n      sqlite3BtreeGetMeta(pMain, aCopy[i], &meta);\n      rc = sqlite3BtreeUpdateMeta(pTemp, aCopy[i], meta+aCopy[i+1]);\n      if( NEVER(rc!=SQLITE_OK) ) goto end_of_vacuum;\n    }\n\n    if( pOut==0 ){\n      rc = sqlite3BtreeCopyFile(pMain, pTemp);\n    }\n    if( rc!=SQLITE_OK ) goto end_of_vacuum;\n    rc = sqlite3BtreeCommit(pTemp);\n    if( rc!=SQLITE_OK ) goto end_of_vacuum;\n#ifndef SQLITE_OMIT_AUTOVACUUM\n    if( pOut==0 ){\n      sqlite3BtreeSetAutoVacuum(pMain, sqlite3BtreeGetAutoVacuum(pTemp));\n    }\n#endif\n  }\n\n  assert( rc==SQLITE_OK );\n  if( pOut==0 ){\n    nRes = sqlite3BtreeGetRequestedReserve(pTemp);\n    rc = sqlite3BtreeSetPageSize(pMain, sqlite3BtreeGetPageSize(pTemp), nRes,1);\n  }\n\nend_of_vacuum:\n  /* Restore the original value of db->flags */\n  db->init.iDb = 0;\n  db->mDbFlags = saved_mDbFlags;\n  db->flags = saved_flags;\n  db->nChange = saved_nChange;\n  db->nTotalChange = saved_nTotalChange;\n  db->mTrace = saved_mTrace;\n  sqlite3BtreeSetPageSize(pMain, -1, 0, 1);\n\n  /* Currently there is an SQL level transaction open on the vacuum\n  ** database. No locks are held on any other files (since the main file\n  ** was committed at the btree level). So it safe to end the transaction\n  ** by manually setting the autoCommit flag to true and detaching the\n  ** vacuum database. The vacuum_db journal file is deleted when the pager\n  ** is closed by the DETACH.\n  */\n  db->autoCommit = 1;\n\n  if( pDb ){\n    sqlite3BtreeClose(pDb->pBt);\n    pDb->pBt = 0;\n    pDb->pSchema = 0;\n  }\n\n  /* This both clears the schemas and reduces the size of the db->aDb[]\n  ** array. */\n  sqlite3ResetAllSchemasOfConnection(db);\n\n  return rc;\n}\n\n#endif  /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */\n\n/************** End of vacuum.c **********************************************/\n/************** Begin file vtab.c ********************************************/\n/*\n** 2006 June 10\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code used to help implement virtual tables.\n*/\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/* #include \"sqliteInt.h\" */\n\n/*\n** Before a virtual table xCreate() or xConnect() method is invoked, the\n** sqlite3.pVtabCtx member variable is set to point to an instance of\n** this struct allocated on the stack. It is used by the implementation of\n** the sqlite3_declare_vtab() and sqlite3_vtab_config() APIs, both of which\n** are invoked only from within xCreate and xConnect methods.\n*/\nstruct VtabCtx {\n  VTable *pVTable;    /* The virtual table being constructed */\n  Table *pTab;        /* The Table object to which the virtual table belongs */\n  VtabCtx *pPrior;    /* Parent context (if any) */\n  int bDeclared;      /* True after sqlite3_declare_vtab() is called */\n};\n\n/*\n** Construct and install a Module object for a virtual table.  When this\n** routine is called, it is guaranteed that all appropriate locks are held\n** and the module is not already part of the connection.\n**\n** If there already exists a module with zName, replace it with the new one.\n** If pModule==0, then delete the module zName if it exists.\n*/\nSQLITE_PRIVATE Module *sqlite3VtabCreateModule(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux,                     /* Context pointer for xCreate/xConnect */\n  void (*xDestroy)(void *)        /* Module destructor function */\n){\n  Module *pMod;\n  Module *pDel;\n  char *zCopy;\n  if( pModule==0 ){\n    zCopy = (char*)zName;\n    pMod = 0;\n  }else{\n    int nName = sqlite3Strlen30(zName);\n    pMod = (Module *)sqlite3Malloc(sizeof(Module) + nName + 1);\n    if( pMod==0 ){\n      sqlite3OomFault(db);\n      return 0;\n    }\n    zCopy = (char *)(&pMod[1]);\n    memcpy(zCopy, zName, nName+1);\n    pMod->zName = zCopy;\n    pMod->pModule = pModule;\n    pMod->pAux = pAux;\n    pMod->xDestroy = xDestroy;\n    pMod->pEpoTab = 0;\n    pMod->nRefModule = 1;\n  }\n  pDel = (Module *)sqlite3HashInsert(&db->aModule,zCopy,(void*)pMod);\n  if( pDel ){\n    if( pDel==pMod ){\n      sqlite3OomFault(db);\n      sqlite3DbFree(db, pDel);\n      pMod = 0;\n    }else{\n      sqlite3VtabEponymousTableClear(db, pDel);\n      sqlite3VtabModuleUnref(db, pDel);\n    }\n  }\n  return pMod;\n}\n\n/*\n** The actual function that does the work of creating a new module.\n** This function implements the sqlite3_create_module() and\n** sqlite3_create_module_v2() interfaces.\n*/\nstatic int createModule(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux,                     /* Context pointer for xCreate/xConnect */\n  void (*xDestroy)(void *)        /* Module destructor function */\n){\n  int rc = SQLITE_OK;\n\n  sqlite3_mutex_enter(db->mutex);\n  (void)sqlite3VtabCreateModule(db, zName, pModule, pAux, xDestroy);\n  rc = sqlite3ApiExit(db, rc);\n  if( rc!=SQLITE_OK && xDestroy ) xDestroy(pAux);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n\n/*\n** External API function used to create a new virtual-table module.\n*/\nSQLITE_API int sqlite3_create_module(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux                      /* Context pointer for xCreate/xConnect */\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  return createModule(db, zName, pModule, pAux, 0);\n}\n\n/*\n** External API function used to create a new virtual-table module.\n*/\nSQLITE_API int sqlite3_create_module_v2(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux,                     /* Context pointer for xCreate/xConnect */\n  void (*xDestroy)(void *)        /* Module destructor function */\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  return createModule(db, zName, pModule, pAux, xDestroy);\n}\n\n/*\n** External API to drop all virtual-table modules, except those named\n** on the azNames list.\n*/\nSQLITE_API int sqlite3_drop_modules(sqlite3 *db, const char** azNames){\n  HashElem *pThis, *pNext;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  for(pThis=sqliteHashFirst(&db->aModule); pThis; pThis=pNext){\n    Module *pMod = (Module*)sqliteHashData(pThis);\n    pNext = sqliteHashNext(pThis);\n    if( azNames ){\n      int ii;\n      for(ii=0; azNames[ii]!=0 && strcmp(azNames[ii],pMod->zName)!=0; ii++){}\n      if( azNames[ii]!=0 ) continue;\n    }\n    createModule(db, pMod->zName, 0, 0, 0);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Decrement the reference count on a Module object.  Destroy the\n** module when the reference count reaches zero.\n*/\nSQLITE_PRIVATE void sqlite3VtabModuleUnref(sqlite3 *db, Module *pMod){\n  assert( pMod->nRefModule>0 );\n  pMod->nRefModule--;\n  if( pMod->nRefModule==0 ){\n    if( pMod->xDestroy ){\n      pMod->xDestroy(pMod->pAux);\n    }\n    assert( pMod->pEpoTab==0 );\n    sqlite3DbFree(db, pMod);\n  }\n}\n\n/*\n** Lock the virtual table so that it cannot be disconnected.\n** Locks nest.  Every lock should have a corresponding unlock.\n** If an unlock is omitted, resources leaks will occur.\n**\n** If a disconnect is attempted while a virtual table is locked,\n** the disconnect is deferred until all locks have been removed.\n*/\nSQLITE_PRIVATE void sqlite3VtabLock(VTable *pVTab){\n  pVTab->nRef++;\n}\n\n\n/*\n** pTab is a pointer to a Table structure representing a virtual-table.\n** Return a pointer to the VTable object used by connection db to access\n** this virtual-table, if one has been created, or NULL otherwise.\n*/\nSQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){\n  VTable *pVtab;\n  assert( IsVirtual(pTab) );\n  for(pVtab=pTab->u.vtab.p; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);\n  return pVtab;\n}\n\n/*\n** Decrement the ref-count on a virtual table object. When the ref-count\n** reaches zero, call the xDisconnect() method to delete the object.\n*/\nSQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){\n  sqlite3 *db = pVTab->db;\n\n  assert( db );\n  assert( pVTab->nRef>0 );\n  assert( db->eOpenState==SQLITE_STATE_OPEN\n       || db->eOpenState==SQLITE_STATE_ZOMBIE );\n\n  pVTab->nRef--;\n  if( pVTab->nRef==0 ){\n    sqlite3_vtab *p = pVTab->pVtab;\n    if( p ){\n      p->pModule->xDisconnect(p);\n    }\n    sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod);\n    sqlite3DbFree(db, pVTab);\n  }\n}\n\n/*\n** Table p is a virtual table. This function moves all elements in the\n** p->u.vtab.p list to the sqlite3.pDisconnect lists of their associated\n** database connections to be disconnected at the next opportunity.\n** Except, if argument db is not NULL, then the entry associated with\n** connection db is left in the p->u.vtab.p list.\n*/\nstatic VTable *vtabDisconnectAll(sqlite3 *db, Table *p){\n  VTable *pRet = 0;\n  VTable *pVTable;\n\n  assert( IsVirtual(p) );\n  pVTable = p->u.vtab.p;\n  p->u.vtab.p = 0;\n\n  /* Assert that the mutex (if any) associated with the BtShared database\n  ** that contains table p is held by the caller. See header comments\n  ** above function sqlite3VtabUnlockList() for an explanation of why\n  ** this makes it safe to access the sqlite3.pDisconnect list of any\n  ** database connection that may have an entry in the p->u.vtab.p list.\n  */\n  assert( db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema) );\n\n  while( pVTable ){\n    sqlite3 *db2 = pVTable->db;\n    VTable *pNext = pVTable->pNext;\n    assert( db2 );\n    if( db2==db ){\n      pRet = pVTable;\n      p->u.vtab.p = pRet;\n      pRet->pNext = 0;\n    }else{\n      pVTable->pNext = db2->pDisconnect;\n      db2->pDisconnect = pVTable;\n    }\n    pVTable = pNext;\n  }\n\n  assert( !db || pRet );\n  return pRet;\n}\n\n/*\n** Table *p is a virtual table. This function removes the VTable object\n** for table *p associated with database connection db from the linked\n** list in p->pVTab. It also decrements the VTable ref count. This is\n** used when closing database connection db to free all of its VTable\n** objects without disturbing the rest of the Schema object (which may\n** be being used by other shared-cache connections).\n*/\nSQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p){\n  VTable **ppVTab;\n\n  assert( IsVirtual(p) );\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  assert( sqlite3_mutex_held(db->mutex) );\n\n  for(ppVTab=&p->u.vtab.p; *ppVTab; ppVTab=&(*ppVTab)->pNext){\n    if( (*ppVTab)->db==db  ){\n      VTable *pVTab = *ppVTab;\n      *ppVTab = pVTab->pNext;\n      sqlite3VtabUnlock(pVTab);\n      break;\n    }\n  }\n}\n\n\n/*\n** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.\n**\n** This function may only be called when the mutexes associated with all\n** shared b-tree databases opened using connection db are held by the\n** caller. This is done to protect the sqlite3.pDisconnect list. The\n** sqlite3.pDisconnect list is accessed only as follows:\n**\n**   1) By this function. In this case, all BtShared mutexes and the mutex\n**      associated with the database handle itself must be held.\n**\n**   2) By function vtabDisconnectAll(), when it adds a VTable entry to\n**      the sqlite3.pDisconnect list. In this case either the BtShared mutex\n**      associated with the database the virtual table is stored in is held\n**      or, if the virtual table is stored in a non-sharable database, then\n**      the database handle mutex is held.\n**\n** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously\n** by multiple threads. It is thread-safe.\n*/\nSQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){\n  VTable *p = db->pDisconnect;\n\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  assert( sqlite3_mutex_held(db->mutex) );\n\n  if( p ){\n    db->pDisconnect = 0;\n    do {\n      VTable *pNext = p->pNext;\n      sqlite3VtabUnlock(p);\n      p = pNext;\n    }while( p );\n  }\n}\n\n/*\n** Clear any and all virtual-table information from the Table record.\n** This routine is called, for example, just before deleting the Table\n** record.\n**\n** Since it is a virtual-table, the Table structure contains a pointer\n** to the head of a linked list of VTable structures. Each VTable\n** structure is associated with a single sqlite3* user of the schema.\n** The reference count of the VTable structure associated with database\n** connection db is decremented immediately (which may lead to the\n** structure being xDisconnected and free). Any other VTable structures\n** in the list are moved to the sqlite3.pDisconnect list of the associated\n** database connection.\n*/\nSQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){\n  assert( IsVirtual(p) );\n  assert( db!=0 );\n  if( db->pnBytesFreed==0 ) vtabDisconnectAll(0, p);\n  if( p->u.vtab.azArg ){\n    int i;\n    for(i=0; i<p->u.vtab.nArg; i++){\n      if( i!=1 ) sqlite3DbFree(db, p->u.vtab.azArg[i]);\n    }\n    sqlite3DbFree(db, p->u.vtab.azArg);\n  }\n}\n\n/*\n** Add a new module argument to pTable->u.vtab.azArg[].\n** The string is not copied - the pointer is stored.  The\n** string will be freed automatically when the table is\n** deleted.\n*/\nstatic void addModuleArgument(Parse *pParse, Table *pTable, char *zArg){\n  sqlite3_int64 nBytes;\n  char **azModuleArg;\n  sqlite3 *db = pParse->db;\n\n  assert( IsVirtual(pTable) );\n  nBytes = sizeof(char *)*(2+pTable->u.vtab.nArg);\n  if( pTable->u.vtab.nArg+3>=db->aLimit[SQLITE_LIMIT_COLUMN] ){\n    sqlite3ErrorMsg(pParse, \"too many columns on %s\", pTable->zName);\n  }\n  azModuleArg = sqlite3DbRealloc(db, pTable->u.vtab.azArg, nBytes);\n  if( azModuleArg==0 ){\n    sqlite3DbFree(db, zArg);\n  }else{\n    int i = pTable->u.vtab.nArg++;\n    azModuleArg[i] = zArg;\n    azModuleArg[i+1] = 0;\n    pTable->u.vtab.azArg = azModuleArg;\n  }\n}\n\n/*\n** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE\n** statement.  The module name has been parsed, but the optional list\n** of parameters that follow the module name are still pending.\n*/\nSQLITE_PRIVATE void sqlite3VtabBeginParse(\n  Parse *pParse,        /* Parsing context */\n  Token *pName1,        /* Name of new table, or database name */\n  Token *pName2,        /* Name of new table or NULL */\n  Token *pModuleName,   /* Name of the module for the virtual table */\n  int ifNotExists       /* No error if the table already exists */\n){\n  Table *pTable;        /* The new virtual table */\n  sqlite3 *db;          /* Database connection */\n\n  sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, ifNotExists);\n  pTable = pParse->pNewTable;\n  if( pTable==0 ) return;\n  assert( 0==pTable->pIndex );\n  pTable->eTabType = TABTYP_VTAB;\n\n  db = pParse->db;\n\n  assert( pTable->u.vtab.nArg==0 );\n  addModuleArgument(pParse, pTable, sqlite3NameFromToken(db, pModuleName));\n  addModuleArgument(pParse, pTable, 0);\n  addModuleArgument(pParse, pTable, sqlite3DbStrDup(db, pTable->zName));\n  assert( (pParse->sNameToken.z==pName2->z && pName2->z!=0)\n       || (pParse->sNameToken.z==pName1->z && pName2->z==0)\n  );\n  pParse->sNameToken.n = (int)(\n      &pModuleName->z[pModuleName->n] - pParse->sNameToken.z\n  );\n\n#ifndef SQLITE_OMIT_AUTHORIZATION\n  /* Creating a virtual table invokes the authorization callback twice.\n  ** The first invocation, to obtain permission to INSERT a row into the\n  ** sqlite_schema table, has already been made by sqlite3StartTable().\n  ** The second call, to obtain permission to create the table, is made now.\n  */\n  if( pTable->u.vtab.azArg ){\n    int iDb = sqlite3SchemaToIndex(db, pTable->pSchema);\n    assert( iDb>=0 ); /* The database the table is being created in */\n    sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName,\n            pTable->u.vtab.azArg[0], pParse->db->aDb[iDb].zDbSName);\n  }\n#endif\n}\n\n/*\n** This routine takes the module argument that has been accumulating\n** in pParse->zArg[] and appends it to the list of arguments on the\n** virtual table currently under construction in pParse->pTable.\n*/\nstatic void addArgumentToVtab(Parse *pParse){\n  if( pParse->sArg.z && pParse->pNewTable ){\n    const char *z = (const char*)pParse->sArg.z;\n    int n = pParse->sArg.n;\n    sqlite3 *db = pParse->db;\n    addModuleArgument(pParse, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));\n  }\n}\n\n/*\n** The parser calls this routine after the CREATE VIRTUAL TABLE statement\n** has been completely parsed.\n*/\nSQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){\n  Table *pTab = pParse->pNewTable;  /* The table being constructed */\n  sqlite3 *db = pParse->db;         /* The database connection */\n\n  if( pTab==0 ) return;\n  assert( IsVirtual(pTab) );\n  addArgumentToVtab(pParse);\n  pParse->sArg.z = 0;\n  if( pTab->u.vtab.nArg<1 ) return;\n\n  /* If the CREATE VIRTUAL TABLE statement is being entered for the\n  ** first time (in other words if the virtual table is actually being\n  ** created now instead of just being read out of sqlite_schema) then\n  ** do additional initialization work and store the statement text\n  ** in the sqlite_schema table.\n  */\n  if( !db->init.busy ){\n    char *zStmt;\n    char *zWhere;\n    int iDb;\n    int iReg;\n    Vdbe *v;\n\n    sqlite3MayAbort(pParse);\n\n    /* Compute the complete text of the CREATE VIRTUAL TABLE statement */\n    if( pEnd ){\n      pParse->sNameToken.n = (int)(pEnd->z - pParse->sNameToken.z) + pEnd->n;\n    }\n    zStmt = sqlite3MPrintf(db, \"CREATE VIRTUAL TABLE %T\", &pParse->sNameToken);\n\n    /* A slot for the record has already been allocated in the\n    ** schema table.  We just need to update that slot with all\n    ** the information we've collected.\n    **\n    ** The VM register number pParse->u1.cr.regRowid holds the rowid of an\n    ** entry in the sqlite_schema table that was created for this vtab\n    ** by sqlite3StartTable().\n    */\n    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n    assert( pParse->isCreate );\n    sqlite3NestedParse(pParse,\n      \"UPDATE %Q.\" LEGACY_SCHEMA_TABLE \" \"\n         \"SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q \"\n       \"WHERE rowid=#%d\",\n      db->aDb[iDb].zDbSName,\n      pTab->zName,\n      pTab->zName,\n      zStmt,\n      pParse->u1.cr.regRowid\n    );\n    v = sqlite3GetVdbe(pParse);\n    sqlite3ChangeCookie(pParse, iDb);\n\n    sqlite3VdbeAddOp0(v, OP_Expire);\n    zWhere = sqlite3MPrintf(db, \"name=%Q AND sql=%Q\", pTab->zName, zStmt);\n    sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere, 0);\n    sqlite3DbFree(db, zStmt);\n\n    iReg = ++pParse->nMem;\n    sqlite3VdbeLoadString(v, iReg, pTab->zName);\n    sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg);\n  }else{\n    /* If we are rereading the sqlite_schema table create the in-memory\n    ** record of the table. */\n    Table *pOld;\n    Schema *pSchema = pTab->pSchema;\n    const char *zName = pTab->zName;\n    assert( zName!=0 );\n    sqlite3MarkAllShadowTablesOf(db, pTab);\n    pOld = sqlite3HashInsert(&pSchema->tblHash, zName, pTab);\n    if( pOld ){\n      sqlite3OomFault(db);\n      assert( pTab==pOld );  /* Malloc must have failed inside HashInsert() */\n      return;\n    }\n    pParse->pNewTable = 0;\n  }\n}\n\n/*\n** The parser calls this routine when it sees the first token\n** of an argument to the module name in a CREATE VIRTUAL TABLE statement.\n*/\nSQLITE_PRIVATE void sqlite3VtabArgInit(Parse *pParse){\n  addArgumentToVtab(pParse);\n  pParse->sArg.z = 0;\n  pParse->sArg.n = 0;\n}\n\n/*\n** The parser calls this routine for each token after the first token\n** in an argument to the module name in a CREATE VIRTUAL TABLE statement.\n*/\nSQLITE_PRIVATE void sqlite3VtabArgExtend(Parse *pParse, Token *p){\n  Token *pArg = &pParse->sArg;\n  if( pArg->z==0 ){\n    pArg->z = p->z;\n    pArg->n = p->n;\n  }else{\n    assert(pArg->z <= p->z);\n    pArg->n = (int)(&p->z[p->n] - pArg->z);\n  }\n}\n\n/*\n** Invoke a virtual table constructor (either xCreate or xConnect). The\n** pointer to the function to invoke is passed as the fourth parameter\n** to this procedure.\n*/\nstatic int vtabCallConstructor(\n  sqlite3 *db,\n  Table *pTab,\n  Module *pMod,\n  int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),\n  char **pzErr\n){\n  VtabCtx sCtx;\n  VTable *pVTable;\n  int rc;\n  const char *const*azArg;\n  int nArg = pTab->u.vtab.nArg;\n  char *zErr = 0;\n  char *zModuleName;\n  int iDb;\n  VtabCtx *pCtx;\n\n  assert( IsVirtual(pTab) );\n  azArg = (const char *const*)pTab->u.vtab.azArg;\n\n  /* Check that the virtual-table is not already being initialized */\n  for(pCtx=db->pVtabCtx; pCtx; pCtx=pCtx->pPrior){\n    if( pCtx->pTab==pTab ){\n      *pzErr = sqlite3MPrintf(db,\n          \"vtable constructor called recursively: %s\", pTab->zName\n      );\n      return SQLITE_LOCKED;\n    }\n  }\n\n  zModuleName = sqlite3DbStrDup(db, pTab->zName);\n  if( !zModuleName ){\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  pVTable = sqlite3MallocZero(sizeof(VTable));\n  if( !pVTable ){\n    sqlite3OomFault(db);\n    sqlite3DbFree(db, zModuleName);\n    return SQLITE_NOMEM_BKPT;\n  }\n  pVTable->db = db;\n  pVTable->pMod = pMod;\n  pVTable->eVtabRisk = SQLITE_VTABRISK_Normal;\n\n  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n  pTab->u.vtab.azArg[1] = db->aDb[iDb].zDbSName;\n\n  /* Invoke the virtual table constructor */\n  assert( &db->pVtabCtx );\n  assert( xConstruct );\n  sCtx.pTab = pTab;\n  sCtx.pVTable = pVTable;\n  sCtx.pPrior = db->pVtabCtx;\n  sCtx.bDeclared = 0;\n  db->pVtabCtx = &sCtx;\n  pTab->nTabRef++;\n  rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);\n  assert( pTab!=0 );\n  assert( pTab->nTabRef>1 || rc!=SQLITE_OK );\n  sqlite3DeleteTable(db, pTab);\n  db->pVtabCtx = sCtx.pPrior;\n  if( rc==SQLITE_NOMEM ) sqlite3OomFault(db);\n  assert( sCtx.pTab==pTab );\n\n  if( SQLITE_OK!=rc ){\n    if( zErr==0 ){\n      *pzErr = sqlite3MPrintf(db, \"vtable constructor failed: %s\", zModuleName);\n    }else {\n      *pzErr = sqlite3MPrintf(db, \"%s\", zErr);\n      sqlite3_free(zErr);\n    }\n    sqlite3DbFree(db, pVTable);\n  }else if( ALWAYS(pVTable->pVtab) ){\n    /* Justification of ALWAYS():  A correct vtab constructor must allocate\n    ** the sqlite3_vtab object if successful.  */\n    memset(pVTable->pVtab, 0, sizeof(pVTable->pVtab[0]));\n    pVTable->pVtab->pModule = pMod->pModule;\n    pMod->nRefModule++;\n    pVTable->nRef = 1;\n    if( sCtx.bDeclared==0 ){\n      const char *zFormat = \"vtable constructor did not declare schema: %s\";\n      *pzErr = sqlite3MPrintf(db, zFormat, zModuleName);\n      sqlite3VtabUnlock(pVTable);\n      rc = SQLITE_ERROR;\n    }else{\n      int iCol;\n      u16 oooHidden = 0;\n      /* If everything went according to plan, link the new VTable structure\n      ** into the linked list headed by pTab->u.vtab.p. Then loop through the\n      ** columns of the table to see if any of them contain the token \"hidden\".\n      ** If so, set the Column COLFLAG_HIDDEN flag and remove the token from\n      ** the type string.  */\n      pVTable->pNext = pTab->u.vtab.p;\n      pTab->u.vtab.p = pVTable;\n\n      for(iCol=0; iCol<pTab->nCol; iCol++){\n        char *zType = sqlite3ColumnType(&pTab->aCol[iCol], \"\");\n        int nType;\n        int i = 0;\n        nType = sqlite3Strlen30(zType);\n        for(i=0; i<nType; i++){\n          if( 0==sqlite3StrNICmp(\"hidden\", &zType[i], 6)\n           && (i==0 || zType[i-1]==' ')\n           && (zType[i+6]=='\\0' || zType[i+6]==' ')\n          ){\n            break;\n          }\n        }\n        if( i<nType ){\n          int j;\n          int nDel = 6 + (zType[i+6] ? 1 : 0);\n          for(j=i; (j+nDel)<=nType; j++){\n            zType[j] = zType[j+nDel];\n          }\n          if( zType[i]=='\\0' && i>0 ){\n            assert(zType[i-1]==' ');\n            zType[i-1] = '\\0';\n          }\n          pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN;\n          pTab->tabFlags |= TF_HasHidden;\n          oooHidden = TF_OOOHidden;\n        }else{\n          pTab->tabFlags |= oooHidden;\n        }\n      }\n    }\n  }\n\n  sqlite3DbFree(db, zModuleName);\n  return rc;\n}\n\n/*\n** This function is invoked by the parser to call the xConnect() method\n** of the virtual table pTab. If an error occurs, an error code is returned\n** and an error left in pParse.\n**\n** This call is a no-op if table pTab is not a virtual table.\n*/\nSQLITE_PRIVATE int sqlite3VtabCallConnect(Parse *pParse, Table *pTab){\n  sqlite3 *db = pParse->db;\n  const char *zMod;\n  Module *pMod;\n  int rc;\n\n  assert( pTab );\n  assert( IsVirtual(pTab) );\n  if( sqlite3GetVTable(db, pTab) ){\n    return SQLITE_OK;\n  }\n\n  /* Locate the required virtual table module */\n  zMod = pTab->u.vtab.azArg[0];\n  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod);\n\n  if( !pMod ){\n    const char *zModule = pTab->u.vtab.azArg[0];\n    sqlite3ErrorMsg(pParse, \"no such module: %s\", zModule);\n    rc = SQLITE_ERROR;\n  }else{\n    char *zErr = 0;\n    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);\n    if( rc!=SQLITE_OK ){\n      sqlite3ErrorMsg(pParse, \"%s\", zErr);\n      pParse->rc = rc;\n    }\n    sqlite3DbFree(db, zErr);\n  }\n\n  return rc;\n}\n/*\n** Grow the db->aVTrans[] array so that there is room for at least one\n** more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise.\n*/\nstatic int growVTrans(sqlite3 *db){\n  const int ARRAY_INCR = 5;\n\n  /* Grow the sqlite3.aVTrans array if required */\n  if( (db->nVTrans%ARRAY_INCR)==0 ){\n    VTable **aVTrans;\n    sqlite3_int64 nBytes = sizeof(sqlite3_vtab*)*\n                                 ((sqlite3_int64)db->nVTrans + ARRAY_INCR);\n    aVTrans = sqlite3DbRealloc(db, (void *)db->aVTrans, nBytes);\n    if( !aVTrans ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    memset(&aVTrans[db->nVTrans], 0, sizeof(sqlite3_vtab *)*ARRAY_INCR);\n    db->aVTrans = aVTrans;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should\n** have already been reserved using growVTrans().\n*/\nstatic void addToVTrans(sqlite3 *db, VTable *pVTab){\n  /* Add pVtab to the end of sqlite3.aVTrans */\n  db->aVTrans[db->nVTrans++] = pVTab;\n  sqlite3VtabLock(pVTab);\n}\n\n/*\n** This function is invoked by the vdbe to call the xCreate method\n** of the virtual table named zTab in database iDb.\n**\n** If an error occurs, *pzErr is set to point to an English language\n** description of the error and an SQLITE_XXX error code is returned.\n** In this case the caller must call sqlite3DbFree(db, ) on *pzErr.\n*/\nSQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){\n  int rc = SQLITE_OK;\n  Table *pTab;\n  Module *pMod;\n  const char *zMod;\n\n  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zDbSName);\n  assert( pTab && IsVirtual(pTab) && !pTab->u.vtab.p );\n\n  /* Locate the required virtual table module */\n  zMod = pTab->u.vtab.azArg[0];\n  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod);\n\n  /* If the module has been registered and includes a Create method,\n  ** invoke it now. If the module has not been registered, return an\n  ** error. Otherwise, do nothing.\n  */\n  if( pMod==0 || pMod->pModule->xCreate==0 || pMod->pModule->xDestroy==0 ){\n    *pzErr = sqlite3MPrintf(db, \"no such module: %s\", zMod);\n    rc = SQLITE_ERROR;\n  }else{\n    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xCreate, pzErr);\n  }\n\n  /* Justification of ALWAYS():  The xConstructor method is required to\n  ** create a valid sqlite3_vtab if it returns SQLITE_OK. */\n  if( rc==SQLITE_OK && ALWAYS(sqlite3GetVTable(db, pTab)) ){\n    rc = growVTrans(db);\n    if( rc==SQLITE_OK ){\n      addToVTrans(db, sqlite3GetVTable(db, pTab));\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is used to set the schema of a virtual table.  It is only\n** valid to call this function from within the xCreate() or xConnect() of a\n** virtual table module.\n*/\nSQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){\n  VtabCtx *pCtx;\n  int rc = SQLITE_OK;\n  Table *pTab;\n  Parse sParse;\n  int initBusy;\n  int i;\n  const unsigned char *z;\n  static const u8 aKeyword[] = { TK_CREATE, TK_TABLE, 0 };\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zCreateTable==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n\n  /* Verify that the first two keywords in the CREATE TABLE statement\n  ** really are \"CREATE\" and \"TABLE\".  If this is not the case, then\n  ** sqlite3_declare_vtab() is being misused.\n  */\n  z = (const unsigned char*)zCreateTable;\n  for(i=0; aKeyword[i]; i++){\n    int tokenType = 0;\n    do{\n      z += sqlite3GetToken(z, &tokenType);\n    }while( tokenType==TK_SPACE || tokenType==TK_COMMENT );\n    if( tokenType!=aKeyword[i] ){\n      sqlite3ErrorWithMsg(db, SQLITE_ERROR, \"syntax error\");\n      return SQLITE_ERROR;\n    }\n  }\n\n  sqlite3_mutex_enter(db->mutex);\n  pCtx = db->pVtabCtx;\n  if( !pCtx || pCtx->bDeclared ){\n    sqlite3Error(db, SQLITE_MISUSE_BKPT);\n    sqlite3_mutex_leave(db->mutex);\n    return SQLITE_MISUSE_BKPT;\n  }\n\n  pTab = pCtx->pTab;\n  assert( IsVirtual(pTab) );\n\n  sqlite3ParseObjectInit(&sParse, db);\n  sParse.eParseMode = PARSE_MODE_DECLARE_VTAB;\n  sParse.disableTriggers = 1;\n  /* We should never be able to reach this point while loading the\n  ** schema.  Nevertheless, defend against that (turn off db->init.busy)\n  ** in case a bug arises. */\n  assert( db->init.busy==0 );\n  initBusy = db->init.busy;\n  db->init.busy = 0;\n  sParse.nQueryLoop = 1;\n  if( SQLITE_OK==sqlite3RunParser(&sParse, zCreateTable) ){\n    assert( sParse.pNewTable!=0 );\n    assert( !db->mallocFailed );\n    assert( IsOrdinaryTable(sParse.pNewTable) );\n    assert( sParse.zErrMsg==0 );\n    if( !pTab->aCol ){\n      Table *pNew = sParse.pNewTable;\n      Index *pIdx;\n      pTab->aCol = pNew->aCol;\n      assert( IsOrdinaryTable(pNew) );\n      sqlite3ExprListDelete(db, pNew->u.tab.pDfltList);\n      pTab->nNVCol = pTab->nCol = pNew->nCol;\n      pTab->tabFlags |= pNew->tabFlags & (TF_WithoutRowid|TF_NoVisibleRowid);\n      pNew->nCol = 0;\n      pNew->aCol = 0;\n      assert( pTab->pIndex==0 );\n      assert( HasRowid(pNew) || sqlite3PrimaryKeyIndex(pNew)!=0 );\n      if( !HasRowid(pNew)\n       && pCtx->pVTable->pMod->pModule->xUpdate!=0\n       && sqlite3PrimaryKeyIndex(pNew)->nKeyCol!=1\n      ){\n        /* WITHOUT ROWID virtual tables must either be read-only (xUpdate==0)\n        ** or else must have a single-column PRIMARY KEY */\n        rc = SQLITE_ERROR;\n      }\n      pIdx = pNew->pIndex;\n      if( pIdx ){\n        assert( pIdx->pNext==0 );\n        pTab->pIndex = pIdx;\n        pNew->pIndex = 0;\n        pIdx->pTable = pTab;\n      }\n    }\n    pCtx->bDeclared = 1;\n  }else{\n    sqlite3ErrorWithMsg(db, SQLITE_ERROR,\n          (sParse.zErrMsg ? \"%s\" : 0), sParse.zErrMsg);\n    sqlite3DbFree(db, sParse.zErrMsg);\n    rc = SQLITE_ERROR;\n  }\n  sParse.eParseMode = PARSE_MODE_NORMAL;\n\n  if( sParse.pVdbe ){\n    sqlite3VdbeFinalize(sParse.pVdbe);\n  }\n  sqlite3DeleteTable(db, sParse.pNewTable);\n  sqlite3ParseObjectReset(&sParse);\n  db->init.busy = initBusy;\n\n  assert( (rc&0xff)==rc );\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** This function is invoked by the vdbe to call the xDestroy method\n** of the virtual table named zTab in database iDb. This occurs\n** when a DROP TABLE is mentioned.\n**\n** This call is a no-op if zTab is not a virtual table.\n*/\nSQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){\n  int rc = SQLITE_OK;\n  Table *pTab;\n\n  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zDbSName);\n  if( ALWAYS(pTab!=0)\n   && ALWAYS(IsVirtual(pTab))\n   && ALWAYS(pTab->u.vtab.p!=0)\n  ){\n    VTable *p;\n    int (*xDestroy)(sqlite3_vtab *);\n    for(p=pTab->u.vtab.p; p; p=p->pNext){\n      assert( p->pVtab );\n      if( p->pVtab->nRef>0 ){\n        return SQLITE_LOCKED;\n      }\n    }\n    p = vtabDisconnectAll(db, pTab);\n    xDestroy = p->pMod->pModule->xDestroy;\n    if( xDestroy==0 ) xDestroy = p->pMod->pModule->xDisconnect;\n    assert( xDestroy!=0 );\n    pTab->nTabRef++;\n    rc = xDestroy(p->pVtab);\n    /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */\n    if( rc==SQLITE_OK ){\n      assert( pTab->u.vtab.p==p && p->pNext==0 );\n      p->pVtab = 0;\n      pTab->u.vtab.p = 0;\n      sqlite3VtabUnlock(p);\n    }\n    sqlite3DeleteTable(db, pTab);\n  }\n\n  return rc;\n}\n\n/*\n** This function invokes either the xRollback or xCommit method\n** of each of the virtual tables in the sqlite3.aVTrans array. The method\n** called is identified by the second argument, \"offset\", which is\n** the offset of the method to call in the sqlite3_module structure.\n**\n** The array is cleared after invoking the callbacks.\n*/\nstatic void callFinaliser(sqlite3 *db, int offset){\n  int i;\n  if( db->aVTrans ){\n    VTable **aVTrans = db->aVTrans;\n    db->aVTrans = 0;\n    for(i=0; i<db->nVTrans; i++){\n      VTable *pVTab = aVTrans[i];\n      sqlite3_vtab *p = pVTab->pVtab;\n      if( p ){\n        int (*x)(sqlite3_vtab *);\n        x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);\n        if( x ) x(p);\n      }\n      pVTab->iSavepoint = 0;\n      sqlite3VtabUnlock(pVTab);\n    }\n    sqlite3DbFree(db, aVTrans);\n    db->nVTrans = 0;\n  }\n}\n\n/*\n** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans\n** array. Return the error code for the first error that occurs, or\n** SQLITE_OK if all xSync operations are successful.\n**\n** If an error message is available, leave it in p->zErrMsg.\n*/\nSQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, Vdbe *p){\n  int i;\n  int rc = SQLITE_OK;\n  VTable **aVTrans = db->aVTrans;\n\n  db->aVTrans = 0;\n  for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){\n    int (*x)(sqlite3_vtab *);\n    sqlite3_vtab *pVtab = aVTrans[i]->pVtab;\n    if( pVtab && (x = pVtab->pModule->xSync)!=0 ){\n      rc = x(pVtab);\n      sqlite3VtabImportErrmsg(p, pVtab);\n    }\n  }\n  db->aVTrans = aVTrans;\n  return rc;\n}\n\n/*\n** Invoke the xRollback method of all virtual tables in the\n** sqlite3.aVTrans array. Then clear the array itself.\n*/\nSQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){\n  callFinaliser(db, offsetof(sqlite3_module,xRollback));\n  return SQLITE_OK;\n}\n\n/*\n** Invoke the xCommit method of all virtual tables in the\n** sqlite3.aVTrans array. Then clear the array itself.\n*/\nSQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){\n  callFinaliser(db, offsetof(sqlite3_module,xCommit));\n  return SQLITE_OK;\n}\n\n/*\n** If the virtual table pVtab supports the transaction interface\n** (xBegin/xRollback/xCommit and optionally xSync) and a transaction is\n** not currently open, invoke the xBegin method now.\n**\n** If the xBegin call is successful, place the sqlite3_vtab pointer\n** in the sqlite3.aVTrans array.\n*/\nSQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){\n  int rc = SQLITE_OK;\n  const sqlite3_module *pModule;\n\n  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater\n  ** than zero, then this function is being called from within a\n  ** virtual module xSync() callback. It is illegal to write to\n  ** virtual module tables in this case, so return SQLITE_LOCKED.\n  */\n  if( sqlite3VtabInSync(db) ){\n    return SQLITE_LOCKED;\n  }\n  if( !pVTab ){\n    return SQLITE_OK;\n  }\n  pModule = pVTab->pVtab->pModule;\n\n  if( pModule->xBegin ){\n    int i;\n\n    /* If pVtab is already in the aVTrans array, return early */\n    for(i=0; i<db->nVTrans; i++){\n      if( db->aVTrans[i]==pVTab ){\n        return SQLITE_OK;\n      }\n    }\n\n    /* Invoke the xBegin method. If successful, add the vtab to the\n    ** sqlite3.aVTrans[] array. */\n    rc = growVTrans(db);\n    if( rc==SQLITE_OK ){\n      rc = pModule->xBegin(pVTab->pVtab);\n      if( rc==SQLITE_OK ){\n        int iSvpt = db->nStatement + db->nSavepoint;\n        addToVTrans(db, pVTab);\n        if( iSvpt && pModule->xSavepoint ){\n          pVTab->iSavepoint = iSvpt;\n          rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1);\n        }\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Invoke either the xSavepoint, xRollbackTo or xRelease method of all\n** virtual tables that currently have an open transaction. Pass iSavepoint\n** as the second argument to the virtual table method invoked.\n**\n** If op is SAVEPOINT_BEGIN, the xSavepoint method is invoked. If it is\n** SAVEPOINT_ROLLBACK, the xRollbackTo method. Otherwise, if op is\n** SAVEPOINT_RELEASE, then the xRelease method of each virtual table with\n** an open transaction is invoked.\n**\n** If any virtual table method returns an error code other than SQLITE_OK,\n** processing is abandoned and the error returned to the caller of this\n** function immediately. If all calls to virtual table methods are successful,\n** SQLITE_OK is returned.\n*/\nSQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){\n  int rc = SQLITE_OK;\n\n  assert( op==SAVEPOINT_RELEASE||op==SAVEPOINT_ROLLBACK||op==SAVEPOINT_BEGIN );\n  assert( iSavepoint>=-1 );\n  if( db->aVTrans ){\n    int i;\n    for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){\n      VTable *pVTab = db->aVTrans[i];\n      const sqlite3_module *pMod = pVTab->pMod->pModule;\n      if( pVTab->pVtab && pMod->iVersion>=2 ){\n        int (*xMethod)(sqlite3_vtab *, int);\n        sqlite3VtabLock(pVTab);\n        switch( op ){\n          case SAVEPOINT_BEGIN:\n            xMethod = pMod->xSavepoint;\n            pVTab->iSavepoint = iSavepoint+1;\n            break;\n          case SAVEPOINT_ROLLBACK:\n            xMethod = pMod->xRollbackTo;\n            break;\n          default:\n            xMethod = pMod->xRelease;\n            break;\n        }\n        if( xMethod && pVTab->iSavepoint>iSavepoint ){\n          u64 savedFlags = (db->flags & SQLITE_Defensive);\n          db->flags &= ~(u64)SQLITE_Defensive;\n          rc = xMethod(pVTab->pVtab, iSavepoint);\n          db->flags |= savedFlags;\n        }\n        sqlite3VtabUnlock(pVTab);\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** The first parameter (pDef) is a function implementation.  The\n** second parameter (pExpr) is the first argument to this function.\n** If pExpr is a column in a virtual table, then let the virtual\n** table implementation have an opportunity to overload the function.\n**\n** This routine is used to allow virtual table implementations to\n** overload MATCH, LIKE, GLOB, and REGEXP operators.\n**\n** Return either the pDef argument (indicating no change) or a\n** new FuncDef structure that is marked as ephemeral using the\n** SQLITE_FUNC_EPHEM flag.\n*/\nSQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(\n  sqlite3 *db,    /* Database connection for reporting malloc problems */\n  FuncDef *pDef,  /* Function to possibly overload */\n  int nArg,       /* Number of arguments to the function */\n  Expr *pExpr     /* First argument to the function */\n){\n  Table *pTab;\n  sqlite3_vtab *pVtab;\n  sqlite3_module *pMod;\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value**) = 0;\n  void *pArg = 0;\n  FuncDef *pNew;\n  int rc = 0;\n\n  /* Check to see the left operand is a column in a virtual table */\n  if( NEVER(pExpr==0) ) return pDef;\n  if( pExpr->op!=TK_COLUMN ) return pDef;\n  assert( ExprUseYTab(pExpr) );\n  pTab = pExpr->y.pTab;\n  if( NEVER(pTab==0) ) return pDef;\n  if( !IsVirtual(pTab) ) return pDef;\n  pVtab = sqlite3GetVTable(db, pTab)->pVtab;\n  assert( pVtab!=0 );\n  assert( pVtab->pModule!=0 );\n  pMod = (sqlite3_module *)pVtab->pModule;\n  if( pMod->xFindFunction==0 ) return pDef;\n\n  /* Call the xFindFunction method on the virtual table implementation\n  ** to see if the implementation wants to overload this function.\n  **\n  ** Though undocumented, we have historically always invoked xFindFunction\n  ** with an all lower-case function name.  Continue in this tradition to\n  ** avoid any chance of an incompatibility.\n  */\n#ifdef SQLITE_DEBUG\n  {\n    int i;\n    for(i=0; pDef->zName[i]; i++){\n      unsigned char x = (unsigned char)pDef->zName[i];\n      assert( x==sqlite3UpperToLower[x] );\n    }\n  }\n#endif\n  rc = pMod->xFindFunction(pVtab, nArg, pDef->zName, &xSFunc, &pArg);\n  if( rc==0 ){\n    return pDef;\n  }\n\n  /* Create a new ephemeral function definition for the overloaded\n  ** function */\n  pNew = sqlite3DbMallocZero(db, sizeof(*pNew)\n                             + sqlite3Strlen30(pDef->zName) + 1);\n  if( pNew==0 ){\n    return pDef;\n  }\n  *pNew = *pDef;\n  pNew->zName = (const char*)&pNew[1];\n  memcpy((char*)&pNew[1], pDef->zName, sqlite3Strlen30(pDef->zName)+1);\n  pNew->xSFunc = xSFunc;\n  pNew->pUserData = pArg;\n  pNew->funcFlags |= SQLITE_FUNC_EPHEM;\n  return pNew;\n}\n\n/*\n** Make sure virtual table pTab is contained in the pParse->apVirtualLock[]\n** array so that an OP_VBegin will get generated for it.  Add pTab to the\n** array if it is missing.  If pTab is already in the array, this routine\n** is a no-op.\n*/\nSQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){\n  Parse *pToplevel = sqlite3ParseToplevel(pParse);\n  int i, n;\n  Table **apVtabLock;\n\n  assert( IsVirtual(pTab) );\n  for(i=0; i<pToplevel->nVtabLock; i++){\n    if( pTab==pToplevel->apVtabLock[i] ) return;\n  }\n  n = (pToplevel->nVtabLock+1)*sizeof(pToplevel->apVtabLock[0]);\n  apVtabLock = sqlite3Realloc(pToplevel->apVtabLock, n);\n  if( apVtabLock ){\n    pToplevel->apVtabLock = apVtabLock;\n    pToplevel->apVtabLock[pToplevel->nVtabLock++] = pTab;\n  }else{\n    sqlite3OomFault(pToplevel->db);\n  }\n}\n\n/*\n** Check to see if virtual table module pMod can be have an eponymous\n** virtual table instance.  If it can, create one if one does not already\n** exist. Return non-zero if either the eponymous virtual table instance\n** exists when this routine returns or if an attempt to create it failed\n** and an error message was left in pParse.\n**\n** An eponymous virtual table instance is one that is named after its\n** module, and more importantly, does not require a CREATE VIRTUAL TABLE\n** statement in order to come into existence.  Eponymous virtual table\n** instances always exist.  They cannot be DROP-ed.\n**\n** Any virtual table module for which xConnect and xCreate are the same\n** method can have an eponymous virtual table instance.\n*/\nSQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse *pParse, Module *pMod){\n  const sqlite3_module *pModule = pMod->pModule;\n  Table *pTab;\n  char *zErr = 0;\n  int rc;\n  sqlite3 *db = pParse->db;\n  if( pMod->pEpoTab ) return 1;\n  if( pModule->xCreate!=0 && pModule->xCreate!=pModule->xConnect ) return 0;\n  pTab = sqlite3DbMallocZero(db, sizeof(Table));\n  if( pTab==0 ) return 0;\n  pTab->zName = sqlite3DbStrDup(db, pMod->zName);\n  if( pTab->zName==0 ){\n    sqlite3DbFree(db, pTab);\n    return 0;\n  }\n  pMod->pEpoTab = pTab;\n  pTab->nTabRef = 1;\n  pTab->eTabType = TABTYP_VTAB;\n  pTab->pSchema = db->aDb[0].pSchema;\n  assert( pTab->u.vtab.nArg==0 );\n  pTab->iPKey = -1;\n  pTab->tabFlags |= TF_Eponymous;\n  addModuleArgument(pParse, pTab, sqlite3DbStrDup(db, pTab->zName));\n  addModuleArgument(pParse, pTab, 0);\n  addModuleArgument(pParse, pTab, sqlite3DbStrDup(db, pTab->zName));\n  db->nSchemaLock++;\n  rc = vtabCallConstructor(db, pTab, pMod, pModule->xConnect, &zErr);\n  db->nSchemaLock--;\n  if( rc ){\n    sqlite3ErrorMsg(pParse, \"%s\", zErr);\n    pParse->rc = rc;\n    sqlite3DbFree(db, zErr);\n    sqlite3VtabEponymousTableClear(db, pMod);\n  }\n  return 1;\n}\n\n/*\n** Erase the eponymous virtual table instance associated with\n** virtual table module pMod, if it exists.\n*/\nSQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3 *db, Module *pMod){\n  Table *pTab = pMod->pEpoTab;\n  if( pTab!=0 ){\n    /* Mark the table as Ephemeral prior to deleting it, so that the\n    ** sqlite3DeleteTable() routine will know that it is not stored in\n    ** the schema. */\n    pTab->tabFlags |= TF_Ephemeral;\n    sqlite3DeleteTable(db, pTab);\n    pMod->pEpoTab = 0;\n  }\n}\n\n/*\n** Return the ON CONFLICT resolution mode in effect for the virtual\n** table update operation currently in progress.\n**\n** The results of this routine are undefined unless it is called from\n** within an xUpdate method.\n*/\nSQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){\n  static const unsigned char aMap[] = {\n    SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE\n  };\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  assert( OE_Rollback==1 && OE_Abort==2 && OE_Fail==3 );\n  assert( OE_Ignore==4 && OE_Replace==5 );\n  assert( db->vtabOnConflict>=1 && db->vtabOnConflict<=5 );\n  return (int)aMap[db->vtabOnConflict-1];\n}\n\n/*\n** Call from within the xCreate() or xConnect() methods to provide\n** the SQLite core with additional information about the behavior\n** of the virtual table being implemented.\n*/\nSQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){\n  va_list ap;\n  int rc = SQLITE_OK;\n  VtabCtx *p;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  p = db->pVtabCtx;\n  if( !p ){\n    rc = SQLITE_MISUSE_BKPT;\n  }else{\n    assert( p->pTab==0 || IsVirtual(p->pTab) );\n    va_start(ap, op);\n    switch( op ){\n      case SQLITE_VTAB_CONSTRAINT_SUPPORT: {\n        p->pVTable->bConstraint = (u8)va_arg(ap, int);\n        break;\n      }\n      case SQLITE_VTAB_INNOCUOUS: {\n        p->pVTable->eVtabRisk = SQLITE_VTABRISK_Low;\n        break;\n      }\n      case SQLITE_VTAB_DIRECTONLY: {\n        p->pVTable->eVtabRisk = SQLITE_VTABRISK_High;\n        break;\n      }\n      case SQLITE_VTAB_USES_ALL_SCHEMAS: {\n        p->pVTable->bAllSchemas = 1;\n        break;\n      }\n      default: {\n        rc = SQLITE_MISUSE_BKPT;\n        break;\n      }\n    }\n    va_end(ap);\n  }\n\n  if( rc!=SQLITE_OK ) sqlite3Error(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n/************** End of vtab.c ************************************************/\n/************** Begin file wherecode.c ***************************************/\n/*\n** 2015-06-06\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This module contains C code that generates VDBE code used to process\n** the WHERE clause of SQL statements.\n**\n** This file was split off from where.c on 2015-06-06 in order to reduce the\n** size of where.c and make it easier to edit.  This file contains the routines\n** that actually generate the bulk of the WHERE loop code.  The original where.c\n** file retains the code that does query planning and analysis.\n*/\n/* #include \"sqliteInt.h\" */\n/************** Include whereInt.h in the middle of wherecode.c **************/\n/************** Begin file whereInt.h ****************************************/\n/*\n** 2013-11-12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains structure and macro definitions for the query\n** planner logic in \"where.c\".  These definitions are broken out into\n** a separate source file for easier editing.\n*/\n#ifndef SQLITE_WHEREINT_H\n#define SQLITE_WHEREINT_H\n\n\n/* Forward references\n*/\ntypedef struct WhereClause WhereClause;\ntypedef struct WhereMaskSet WhereMaskSet;\ntypedef struct WhereOrInfo WhereOrInfo;\ntypedef struct WhereAndInfo WhereAndInfo;\ntypedef struct WhereLevel WhereLevel;\ntypedef struct WhereLoop WhereLoop;\ntypedef struct WherePath WherePath;\ntypedef struct WhereTerm WhereTerm;\ntypedef struct WhereLoopBuilder WhereLoopBuilder;\ntypedef struct WhereScan WhereScan;\ntypedef struct WhereOrCost WhereOrCost;\ntypedef struct WhereOrSet WhereOrSet;\ntypedef struct WhereMemBlock WhereMemBlock;\ntypedef struct WhereRightJoin WhereRightJoin;\n\n/*\n** This object is a header on a block of allocated memory that will be\n** automatically freed when its WInfo object is destructed.\n*/\nstruct WhereMemBlock {\n  WhereMemBlock *pNext;      /* Next block in the chain */\n  u64 sz;                    /* Bytes of space */\n};\n\n/*\n** Extra information attached to a WhereLevel that is a RIGHT JOIN.\n*/\nstruct WhereRightJoin {\n  int iMatch;          /* Cursor used to determine prior matched rows */\n  int regBloom;        /* Bloom filter for iRJMatch */\n  int regReturn;       /* Return register for the interior subroutine */\n  int addrSubrtn;      /* Starting address for the interior subroutine */\n  int endSubrtn;       /* The last opcode in the interior subroutine */\n};\n\n/*\n** This object contains information needed to implement a single nested\n** loop in WHERE clause.\n**\n** Contrast this object with WhereLoop.  This object describes the\n** implementation of the loop.  WhereLoop describes the algorithm.\n** This object contains a pointer to the WhereLoop algorithm as one of\n** its elements.\n**\n** The WhereInfo object contains a single instance of this object for\n** each term in the FROM clause (which is to say, for each of the\n** nested loops as implemented).  The order of WhereLevel objects determines\n** the loop nested order, with WhereInfo.a[0] being the outer loop and\n** WhereInfo.a[WhereInfo.nLevel-1] being the inner loop.\n*/\nstruct WhereLevel {\n  int iLeftJoin;        /* Memory cell used to implement LEFT OUTER JOIN */\n  int iTabCur;          /* The VDBE cursor used to access the table */\n  int iIdxCur;          /* The VDBE cursor used to access pIdx */\n  int addrBrk;          /* Jump here to break out of the loop */\n  int addrHalt;         /* Abort the query due to empty table or similar */\n  int addrNxt;          /* Jump here to start the next IN combination */\n  int addrSkip;         /* Jump here for next iteration of skip-scan */\n  int addrCont;         /* Jump here to continue with the next loop cycle */\n  int addrFirst;        /* First instruction of interior of the loop */\n  int addrBody;         /* Beginning of the body of this loop */\n  int regBignull;       /* big-null flag reg. True if a NULL-scan is needed */\n  int addrBignull;      /* Jump here for next part of big-null scan */\n#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n  u32 iLikeRepCntr;     /* LIKE range processing counter register (times 2) */\n  int addrLikeRep;      /* LIKE range processing address */\n#endif\n  int regFilter;        /* Bloom filter */\n  WhereRightJoin *pRJ;  /* Extra information for RIGHT JOIN */\n  u8 iFrom;             /* Which entry in the FROM clause */\n  u8 op, p3, p5;        /* Opcode, P3 & P5 of the opcode that ends the loop */\n  int p1, p2;           /* Operands of the opcode used to end the loop */\n  union {               /* Information that depends on pWLoop->wsFlags */\n    struct {\n      int nIn;              /* Number of entries in aInLoop[] */\n      struct InLoop {\n        int iCur;              /* The VDBE cursor used by this IN operator */\n        int addrInTop;         /* Top of the IN loop */\n        int iBase;             /* Base register of multi-key index record */\n        int nPrefix;           /* Number of prior entries in the key */\n        u8 eEndLoopOp;         /* IN Loop terminator. OP_Next or OP_Prev */\n      } *aInLoop;           /* Information about each nested IN operator */\n    } in;                 /* Used when pWLoop->wsFlags&WHERE_IN_ABLE */\n    Index *pCoveringIdx;  /* Possible covering index for WHERE_MULTI_OR */\n  } u;\n  struct WhereLoop *pWLoop;  /* The selected WhereLoop object */\n  Bitmask notReady;          /* FROM entries not usable at this level */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int addrVisit;        /* Address at which row is visited */\n#endif\n};\n\n/*\n** Each instance of this object represents an algorithm for evaluating one\n** term of a join.  Every term of the FROM clause will have at least\n** one corresponding WhereLoop object (unless INDEXED BY constraints\n** prevent a query solution - which is an error) and many terms of the\n** FROM clause will have multiple WhereLoop objects, each describing a\n** potential way of implementing that FROM-clause term, together with\n** dependencies and cost estimates for using the chosen algorithm.\n**\n** Query planning consists of building up a collection of these WhereLoop\n** objects, then computing a particular sequence of WhereLoop objects, with\n** one WhereLoop object per FROM clause term, that satisfy all dependencies\n** and that minimize the overall cost.\n*/\nstruct WhereLoop {\n  Bitmask prereq;       /* Bitmask of other loops that must run first */\n  Bitmask maskSelf;     /* Bitmask identifying table iTab */\n#ifdef SQLITE_DEBUG\n  char cId;             /* Symbolic ID of this loop for debugging use */\n#endif\n  u8 iTab;              /* Position in FROM clause of table for this loop */\n  u8 iSortIdx;          /* Sorting index number.  0==None */\n  LogEst rSetup;        /* One-time setup cost (ex: create transient index) */\n  LogEst rRun;          /* Cost of running each loop */\n  LogEst nOut;          /* Estimated number of output rows */\n  union {\n    struct {               /* Information for internal btree tables */\n      u16 nEq;               /* Number of equality constraints */\n      u16 nBtm;              /* Size of BTM vector */\n      u16 nTop;              /* Size of TOP vector */\n      u16 nDistinctCol;      /* Index columns used to sort for DISTINCT */\n      Index *pIndex;         /* Index used, or NULL */\n      ExprList *pOrderBy;    /* ORDER BY clause if this is really a subquery */\n    } btree;\n    struct {               /* Information for virtual tables */\n      int idxNum;            /* Index number */\n      u32 needFree : 1;      /* True if sqlite3_free(idxStr) is needed */\n      u32 bOmitOffset : 1;   /* True to let virtual table handle offset */\n      u32 bIdxNumHex : 1;    /* Show idxNum as hex in EXPLAIN QUERY PLAN */\n      i8 isOrdered;          /* True if satisfies ORDER BY */\n      u16 omitMask;          /* Terms that may be omitted */\n      char *idxStr;          /* Index identifier string */\n      u32 mHandleIn;         /* Terms to handle as IN(...) instead of == */\n    } vtab;\n  } u;\n  u32 wsFlags;          /* WHERE_* flags describing the plan */\n  u16 nLTerm;           /* Number of entries in aLTerm[] */\n  u16 nSkip;            /* Number of NULL aLTerm[] entries */\n  /**** whereLoopXfer() copies fields above ***********************/\n# define WHERE_LOOP_XFER_SZ offsetof(WhereLoop,nLSlot)\n  u16 nLSlot;           /* Number of slots allocated for aLTerm[] */\n#ifdef WHERETRACE_ENABLED\n  LogEst rStarDelta;    /* Cost delta due to star-schema heuristic.  Not\n                        ** initialized unless pWInfo->bStarUsed */\n#endif\n  WhereTerm **aLTerm;   /* WhereTerms used */\n  WhereLoop *pNextLoop; /* Next WhereLoop object in the WhereClause */\n  WhereTerm *aLTermSpace[3];  /* Initial aLTerm[] space */\n};\n\n/* This object holds the prerequisites and the cost of running a\n** subquery on one operand of an OR operator in the WHERE clause.\n** See WhereOrSet for additional information\n*/\nstruct WhereOrCost {\n  Bitmask prereq;     /* Prerequisites */\n  LogEst rRun;        /* Cost of running this subquery */\n  LogEst nOut;        /* Number of outputs for this subquery */\n};\n\n/* The WhereOrSet object holds a set of possible WhereOrCosts that\n** correspond to the subquery(s) of OR-clause processing.  Only the\n** best N_OR_COST elements are retained.\n*/\n#define N_OR_COST 3\nstruct WhereOrSet {\n  u16 n;                      /* Number of valid a[] entries */\n  WhereOrCost a[N_OR_COST];   /* Set of best costs */\n};\n\n/*\n** Each instance of this object holds a sequence of WhereLoop objects\n** that implement some or all of a query plan.\n**\n** Think of each WhereLoop object as a node in a graph with arcs\n** showing dependencies and costs for travelling between nodes.  (That is\n** not a completely accurate description because WhereLoop costs are a\n** vector, not a scalar, and because dependencies are many-to-one, not\n** one-to-one as are graph nodes.  But it is a useful visualization aid.)\n** Then a WherePath object is a path through the graph that visits some\n** or all of the WhereLoop objects once.\n**\n** The \"solver\" works by creating the N best WherePath objects of length\n** 1.  Then using those as a basis to compute the N best WherePath objects\n** of length 2.  And so forth until the length of WherePaths equals the\n** number of nodes in the FROM clause.  The best (lowest cost) WherePath\n** at the end is the chosen query plan.\n*/\nstruct WherePath {\n  Bitmask maskLoop;     /* Bitmask of all WhereLoop objects in this path */\n  Bitmask revLoop;      /* aLoop[]s that should be reversed for ORDER BY */\n  LogEst nRow;          /* Estimated number of rows generated by this path */\n  LogEst rCost;         /* Total cost of this path */\n  LogEst rUnsort;       /* Total cost of this path ignoring sorting costs */\n  i8 isOrdered;         /* No. of ORDER BY terms satisfied. -1 for unknown */\n  WhereLoop **aLoop;    /* Array of WhereLoop objects implementing this path */\n};\n\n/*\n** The query generator uses an array of instances of this structure to\n** help it analyze the subexpressions of the WHERE clause.  Each WHERE\n** clause subexpression is separated from the others by AND operators,\n** usually, or sometimes subexpressions separated by OR.\n**\n** All WhereTerms are collected into a single WhereClause structure.\n** The following identity holds:\n**\n**        WhereTerm.pWC->a[WhereTerm.idx] == WhereTerm\n**\n** When a term is of the form:\n**\n**              X <op> <expr>\n**\n** where X is a column name and <op> is one of certain operators,\n** then WhereTerm.leftCursor and WhereTerm.u.leftColumn record the\n** cursor number and column number for X.  WhereTerm.eOperator records\n** the <op> using a bitmask encoding defined by WO_xxx below.  The\n** use of a bitmask encoding for the operator allows us to search\n** quickly for terms that match any of several different operators.\n**\n** A WhereTerm might also be two or more subterms connected by OR:\n**\n**         (t1.X <op> <expr>) OR (t1.Y <op> <expr>) OR ....\n**\n** In this second case, wtFlag has the TERM_ORINFO bit set and eOperator==WO_OR\n** and the WhereTerm.u.pOrInfo field points to auxiliary information that\n** is collected about the OR clause.\n**\n** If a term in the WHERE clause does not match either of the two previous\n** categories, then eOperator==0.  The WhereTerm.pExpr field is still set\n** to the original subexpression content and wtFlags is set up appropriately\n** but no other fields in the WhereTerm object are meaningful.\n**\n** When eOperator!=0, prereqRight and prereqAll record sets of cursor numbers,\n** but they do so indirectly.  A single WhereMaskSet structure translates\n** cursor number into bits and the translated bit is stored in the prereq\n** fields.  The translation is used in order to maximize the number of\n** bits that will fit in a Bitmask.  The VDBE cursor numbers might be\n** spread out over the non-negative integers.  For example, the cursor\n** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45.  The WhereMaskSet\n** translates these sparse cursor numbers into consecutive integers\n** beginning with 0 in order to make the best possible use of the available\n** bits in the Bitmask.  So, in the example above, the cursor numbers\n** would be mapped into integers 0 through 7.\n**\n** The number of terms in a join is limited by the number of bits\n** in prereqRight and prereqAll.  The default is 64 bits, hence SQLite\n** is only able to process joins with 64 or fewer tables.\n*/\nstruct WhereTerm {\n  Expr *pExpr;            /* Pointer to the subexpression that is this term */\n  WhereClause *pWC;       /* The clause this term is part of */\n  LogEst truthProb;       /* Probability of truth for this expression */\n  u16 wtFlags;            /* TERM_xxx bit flags.  See below */\n  u16 eOperator;          /* A WO_xx value describing <op> */\n  u8 nChild;              /* Number of children that must disable us */\n  u8 eMatchOp;            /* Op for vtab MATCH/LIKE/GLOB/REGEXP terms */\n  int iParent;            /* Disable pWC->a[iParent] when this term disabled */\n  int leftCursor;         /* Cursor number of X in \"X <op> <expr>\" */\n#ifdef SQLITE_DEBUG\n  int iTerm;              /* Which WhereTerm is this, for debug purposes */\n#endif\n  union {\n    struct {\n      int leftColumn;         /* Column number of X in \"X <op> <expr>\" */\n      int iField;             /* Field in (?,?,?) IN (SELECT...) vector */\n    } x;                    /* Opcode other than OP_OR or OP_AND */\n    WhereOrInfo *pOrInfo;   /* Extra information if (eOperator & WO_OR)!=0 */\n    WhereAndInfo *pAndInfo; /* Extra information if (eOperator& WO_AND)!=0 */\n  } u;\n  Bitmask prereqRight;    /* Bitmask of tables used by pExpr->pRight */\n  Bitmask prereqAll;      /* Bitmask of tables referenced by pExpr */\n};\n\n/*\n** Allowed values of WhereTerm.wtFlags\n*/\n#define TERM_DYNAMIC    0x0001 /* Need to call sqlite3ExprDelete(db, pExpr) */\n#define TERM_VIRTUAL    0x0002 /* Added by the optimizer.  Do not code */\n#define TERM_CODED      0x0004 /* This term is already coded */\n#define TERM_COPIED     0x0008 /* Has a child */\n#define TERM_ORINFO     0x0010 /* Need to free the WhereTerm.u.pOrInfo object */\n#define TERM_ANDINFO    0x0020 /* Need to free the WhereTerm.u.pAndInfo obj */\n#define TERM_OK         0x0040 /* Used during OR-clause processing */\n#define TERM_VNULL      0x0080 /* Manufactured x>NULL or x<=NULL term */\n#define TERM_LIKEOPT    0x0100 /* Virtual terms from the LIKE optimization */\n#define TERM_LIKECOND   0x0200 /* Conditionally this LIKE operator term */\n#define TERM_LIKE       0x0400 /* The original LIKE operator */\n#define TERM_IS         0x0800 /* Term.pExpr is an IS operator */\n#define TERM_VARSELECT  0x1000 /* Term.pExpr contains a correlated sub-query */\n#define TERM_HEURTRUTH  0x2000 /* Heuristic truthProb used */\n#ifdef SQLITE_ENABLE_STAT4\n#  define TERM_HIGHTRUTH  0x4000 /* Term excludes few rows */\n#else\n#  define TERM_HIGHTRUTH  0      /* Only used with STAT4 */\n#endif\n#define TERM_SLICE      0x8000 /* One slice of a row-value/vector comparison */\n\n/*\n** An instance of the WhereScan object is used as an iterator for locating\n** terms in the WHERE clause that are useful to the query planner.\n*/\nstruct WhereScan {\n  WhereClause *pOrigWC;      /* Original, innermost WhereClause */\n  WhereClause *pWC;          /* WhereClause currently being scanned */\n  const char *zCollName;     /* Required collating sequence, if not NULL */\n  Expr *pIdxExpr;            /* Search for this index expression */\n  int k;                     /* Resume scanning at this->pWC->a[this->k] */\n  u32 opMask;                /* Acceptable operators */\n  char idxaff;               /* Must match this affinity, if zCollName!=NULL */\n  unsigned char iEquiv;      /* Current slot in aiCur[] and aiColumn[] */\n  unsigned char nEquiv;      /* Number of entries in aiCur[] and aiColumn[] */\n  int aiCur[11];             /* Cursors in the equivalence class */\n  i16 aiColumn[11];          /* Corresponding column number in the eq-class */\n};\n\n/*\n** An instance of the following structure holds all information about a\n** WHERE clause.  Mostly this is a container for one or more WhereTerms.\n**\n** Explanation of pOuter:  For a WHERE clause of the form\n**\n**           a AND ((b AND c) OR (d AND e)) AND f\n**\n** There are separate WhereClause objects for the whole clause and for\n** the subclauses \"(b AND c)\" and \"(d AND e)\".  The pOuter field of the\n** subclauses points to the WhereClause object for the whole clause.\n*/\nstruct WhereClause {\n  WhereInfo *pWInfo;       /* WHERE clause processing context */\n  WhereClause *pOuter;     /* Outer conjunction */\n  u8 op;                   /* Split operator.  TK_AND or TK_OR */\n  u8 hasOr;                /* True if any a[].eOperator is WO_OR */\n  int nTerm;               /* Number of terms */\n  int nSlot;               /* Number of entries in a[] */\n  int nBase;               /* Number of terms through the last non-Virtual */\n  WhereTerm *a;            /* Each a[] describes a term of the WHERE clause */\n#if defined(SQLITE_SMALL_STACK)\n  WhereTerm aStatic[1];    /* Initial static space for a[] */\n#else\n  WhereTerm aStatic[8];    /* Initial static space for a[] */\n#endif\n};\n\n/*\n** A WhereTerm with eOperator==WO_OR has its u.pOrInfo pointer set to\n** a dynamically allocated instance of the following structure.\n*/\nstruct WhereOrInfo {\n  WhereClause wc;          /* Decomposition into subterms */\n  Bitmask indexable;       /* Bitmask of all indexable tables in the clause */\n};\n\n/*\n** A WhereTerm with eOperator==WO_AND has its u.pAndInfo pointer set to\n** a dynamically allocated instance of the following structure.\n*/\nstruct WhereAndInfo {\n  WhereClause wc;          /* The subexpression broken out */\n};\n\n/*\n** An instance of the following structure keeps track of a mapping\n** between VDBE cursor numbers and bits of the bitmasks in WhereTerm.\n**\n** The VDBE cursor numbers are small integers contained in\n** SrcItem.iCursor and Expr.iTable fields.  For any given WHERE\n** clause, the cursor numbers might not begin with 0 and they might\n** contain gaps in the numbering sequence.  But we want to make maximum\n** use of the bits in our bitmasks.  This structure provides a mapping\n** from the sparse cursor numbers into consecutive integers beginning\n** with 0.\n**\n** If WhereMaskSet.ix[A]==B it means that The A-th bit of a Bitmask\n** corresponds VDBE cursor number B.  The A-th bit of a bitmask is 1<<A.\n**\n** For example, if the WHERE clause expression used these VDBE\n** cursors:  4, 5, 8, 29, 57, 73.  Then the  WhereMaskSet structure\n** would map those cursor numbers into bits 0 through 5.\n**\n** Note that the mapping is not necessarily ordered.  In the example\n** above, the mapping might go like this:  4->3, 5->1, 8->2, 29->0,\n** 57->5, 73->4.  Or one of 719 other combinations might be used. It\n** does not really matter.  What is important is that sparse cursor\n** numbers all get mapped into bit numbers that begin with 0 and contain\n** no gaps.\n*/\nstruct WhereMaskSet {\n  int bVarSelect;               /* Used by sqlite3WhereExprUsage() */\n  int n;                        /* Number of assigned cursor values */\n  int ix[BMS];                  /* Cursor assigned to each bit */\n};\n\n/*\n** This object is a convenience wrapper holding all information needed\n** to construct WhereLoop objects for a particular query.\n*/\nstruct WhereLoopBuilder {\n  WhereInfo *pWInfo;        /* Information about this WHERE */\n  WhereClause *pWC;         /* WHERE clause terms */\n  WhereLoop *pNew;          /* Template WhereLoop */\n  WhereOrSet *pOrSet;       /* Record best loops here, if not NULL */\n#ifdef SQLITE_ENABLE_STAT4\n  UnpackedRecord *pRec;     /* Probe for stat4 (if required) */\n  int nRecValid;            /* Number of valid fields currently in pRec */\n#endif\n  unsigned char bldFlags1;  /* First set of SQLITE_BLDF_* flags */\n  unsigned char bldFlags2;  /* Second set of SQLITE_BLDF_* flags */\n  unsigned int iPlanLimit;  /* Search limiter */\n};\n\n/* Allowed values for WhereLoopBuider.bldFlags */\n#define SQLITE_BLDF1_INDEXED  0x0001   /* An index is used */\n#define SQLITE_BLDF1_UNIQUE   0x0002   /* All keys of a UNIQUE index used */\n\n#define SQLITE_BLDF2_2NDPASS  0x0004   /* Second builder pass needed */\n\n/* The WhereLoopBuilder.iPlanLimit is used to limit the number of\n** index+constraint combinations the query planner will consider for a\n** particular query.  If this parameter is unlimited, then certain\n** pathological queries can spend excess time in the sqlite3WhereBegin()\n** routine.  The limit is high enough that is should not impact real-world\n** queries.\n**\n** SQLITE_QUERY_PLANNER_LIMIT is the baseline limit.  The limit is\n** increased by SQLITE_QUERY_PLANNER_LIMIT_INCR before each term of the FROM\n** clause is processed, so that every table in a join is guaranteed to be\n** able to propose a some index+constraint combinations even if the initial\n** baseline limit was exhausted by prior tables of the join.\n*/\n#ifndef SQLITE_QUERY_PLANNER_LIMIT\n# define SQLITE_QUERY_PLANNER_LIMIT 20000\n#endif\n#ifndef SQLITE_QUERY_PLANNER_LIMIT_INCR\n# define SQLITE_QUERY_PLANNER_LIMIT_INCR 1000\n#endif\n\n/*\n** The WHERE clause processing routine has two halves.  The\n** first part does the start of the WHERE loop and the second\n** half does the tail of the WHERE loop.  An instance of\n** this structure is returned by the first half and passed\n** into the second half to give some continuity.\n**\n** An instance of this object holds the complete state of the query\n** planner.\n*/\nstruct WhereInfo {\n  Parse *pParse;            /* Parsing and code generating context */\n  SrcList *pTabList;        /* List of tables in the join */\n  ExprList *pOrderBy;       /* The ORDER BY clause or NULL */\n  ExprList *pResultSet;     /* Result set of the query */\n#if WHERETRACE_ENABLED\n  Expr *pWhere;             /* The complete WHERE clause */\n#endif\n  Select *pSelect;          /* The entire SELECT statement containing WHERE */\n  int aiCurOnePass[2];      /* OP_OpenWrite cursors for the ONEPASS opt */\n  int iContinue;            /* Jump here to continue with next record */\n  int iBreak;               /* Jump here to break out of the loop */\n  int savedNQueryLoop;      /* pParse->nQueryLoop outside the WHERE loop */\n  u16 wctrlFlags;           /* Flags originally passed to sqlite3WhereBegin() */\n  LogEst iLimit;            /* LIMIT if wctrlFlags has WHERE_USE_LIMIT */\n  u8 nLevel;                /* Number of nested loop */\n  i8 nOBSat;                /* Number of ORDER BY terms satisfied by indices */\n  u8 eOnePass;              /* ONEPASS_OFF, or _SINGLE, or _MULTI */\n  u8 eDistinct;             /* One of the WHERE_DISTINCT_* values */\n  unsigned bDeferredSeek :1;   /* Uses OP_DeferredSeek */\n  unsigned untestedTerms :1;   /* Not all WHERE terms resolved by outer loop */\n  unsigned bOrderedInnerLoop:1;/* True if only the inner-most loop is ordered */\n  unsigned sorted        :1;   /* True if really sorted (not just grouped) */\n  unsigned bStarDone     :1;   /* True if check for star-query is complete */\n  unsigned bStarUsed     :1;   /* True if star-query heuristic is used */\n  LogEst nRowOut;           /* Estimated number of output rows */\n#ifdef WHERETRACE_ENABLED\n  LogEst rTotalCost;        /* Total cost of the solution */\n#endif\n  int iTop;                 /* The very beginning of the WHERE loop */\n  int iEndWhere;            /* End of the WHERE clause itself */\n  WhereLoop *pLoops;        /* List of all WhereLoop objects */\n  WhereMemBlock *pMemToFree;/* Memory to free when this object destroyed */\n  Bitmask revMask;          /* Mask of ORDER BY terms that need reversing */\n  WhereClause sWC;          /* Decomposition of the WHERE clause */\n  WhereMaskSet sMaskSet;    /* Map cursor numbers to bitmasks */\n  WhereLevel a[FLEXARRAY];  /* Information about each nest loop in WHERE */\n};\n\n/*\n** The size (in bytes) of a WhereInfo object that holds N WhereLevels.\n*/\n#define SZ_WHEREINFO(N) ROUND8(offsetof(WhereInfo,a)+(N)*sizeof(WhereLevel))\n\n/*\n** Private interfaces - callable only by other where.c routines.\n**\n** where.c:\n*/\nSQLITE_PRIVATE Bitmask sqlite3WhereGetMask(WhereMaskSet*,int);\n#ifdef WHERETRACE_ENABLED\nSQLITE_PRIVATE void sqlite3WhereClausePrint(WhereClause *pWC);\nSQLITE_PRIVATE void sqlite3WhereTermPrint(WhereTerm *pTerm, int iTerm);\nSQLITE_PRIVATE void sqlite3WhereLoopPrint(const WhereLoop *p, const WhereClause *pWC);\n#endif\nSQLITE_PRIVATE WhereTerm *sqlite3WhereFindTerm(\n  WhereClause *pWC,     /* The WHERE clause to be searched */\n  int iCur,             /* Cursor number of LHS */\n  int iColumn,          /* Column number of LHS */\n  Bitmask notReady,     /* RHS must not overlap with this mask */\n  u32 op,               /* Mask of WO_xx values describing operator */\n  Index *pIdx           /* Must be compatible with this index, if not NULL */\n);\nSQLITE_PRIVATE void *sqlite3WhereMalloc(WhereInfo *pWInfo, u64 nByte);\nSQLITE_PRIVATE void *sqlite3WhereRealloc(WhereInfo *pWInfo, void *pOld, u64 nByte);\n\n/* wherecode.c: */\n#ifndef SQLITE_OMIT_EXPLAIN\nSQLITE_PRIVATE int sqlite3WhereExplainOneScan(\n  Parse *pParse,                  /* Parse context */\n  SrcList *pTabList,              /* Table list this loop refers to */\n  WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */\n  u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */\n);\nSQLITE_PRIVATE int sqlite3WhereExplainBloomFilter(\n  const Parse *pParse,            /* Parse context */\n  const WhereInfo *pWInfo,        /* WHERE clause */\n  const WhereLevel *pLevel        /* Bloom filter on this level */\n);\nSQLITE_PRIVATE void sqlite3WhereAddExplainText(\n  Parse *pParse,                  /* Parse context */\n  int addr,\n  SrcList *pTabList,              /* Table list this loop refers to */\n  WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */\n  u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */\n);\n#else\n# define sqlite3WhereExplainOneScan(u,v,w,x) 0\n# define sqlite3WhereExplainBloomFilter(u,v,w) 0\n# define  sqlite3WhereAddExplainText(u,v,w,x,y)\n#endif /* SQLITE_OMIT_EXPLAIN */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\nSQLITE_PRIVATE void sqlite3WhereAddScanStatus(\n  Vdbe *v,                        /* Vdbe to add scanstatus entry to */\n  SrcList *pSrclist,              /* FROM clause pLvl reads data from */\n  WhereLevel *pLvl,               /* Level to add scanstatus() entry for */\n  int addrExplain                 /* Address of OP_Explain (or 0) */\n);\n#else\n# define sqlite3WhereAddScanStatus(a, b, c, d) ((void)d)\n#endif\nSQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(\n  Parse *pParse,       /* Parsing context */\n  Vdbe *v,             /* Prepared statement under construction */\n  WhereInfo *pWInfo,   /* Complete information about the WHERE clause */\n  int iLevel,          /* Which level of pWInfo->a[] should be coded */\n  WhereLevel *pLevel,  /* The current level pointer */\n  Bitmask notReady     /* Which tables are currently available */\n);\nSQLITE_PRIVATE SQLITE_NOINLINE void sqlite3WhereRightJoinLoop(\n  WhereInfo *pWInfo,\n  int iLevel,\n  WhereLevel *pLevel\n);\n\n/* whereexpr.c: */\nSQLITE_PRIVATE void sqlite3WhereClauseInit(WhereClause*,WhereInfo*);\nSQLITE_PRIVATE void sqlite3WhereClauseClear(WhereClause*);\nSQLITE_PRIVATE void sqlite3WhereSplit(WhereClause*,Expr*,u8);\nSQLITE_PRIVATE void sqlite3WhereAddLimit(WhereClause*, Select*);\nSQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet*, Expr*);\nSQLITE_PRIVATE Bitmask sqlite3WhereExprUsageNN(WhereMaskSet*, Expr*);\nSQLITE_PRIVATE Bitmask sqlite3WhereExprListUsage(WhereMaskSet*, ExprList*);\nSQLITE_PRIVATE void sqlite3WhereExprAnalyze(SrcList*, WhereClause*);\nSQLITE_PRIVATE void sqlite3WhereTabFuncArgs(Parse*, SrcItem*, WhereClause*);\n\n\n\n\n\n/*\n** Bitmasks for the operators on WhereTerm objects.  These are all\n** operators that are of interest to the query planner.  An\n** OR-ed combination of these values can be used when searching for\n** particular WhereTerms within a WhereClause.\n**\n** Value constraints:\n**     WO_EQ    == SQLITE_INDEX_CONSTRAINT_EQ\n**     WO_LT    == SQLITE_INDEX_CONSTRAINT_LT\n**     WO_LE    == SQLITE_INDEX_CONSTRAINT_LE\n**     WO_GT    == SQLITE_INDEX_CONSTRAINT_GT\n**     WO_GE    == SQLITE_INDEX_CONSTRAINT_GE\n*/\n#define WO_IN     0x0001\n#define WO_EQ     0x0002\n#define WO_LT     (WO_EQ<<(TK_LT-TK_EQ))\n#define WO_LE     (WO_EQ<<(TK_LE-TK_EQ))\n#define WO_GT     (WO_EQ<<(TK_GT-TK_EQ))\n#define WO_GE     (WO_EQ<<(TK_GE-TK_EQ))\n#define WO_AUX    0x0040       /* Op useful to virtual tables only */\n#define WO_IS     0x0080\n#define WO_ISNULL 0x0100\n#define WO_OR     0x0200       /* Two or more OR-connected terms */\n#define WO_AND    0x0400       /* Two or more AND-connected terms */\n#define WO_EQUIV  0x0800       /* Of the form A==B, both columns */\n#define WO_NOOP   0x1000       /* This term does not restrict search space */\n#define WO_ROWVAL 0x2000       /* A row-value term */\n\n#define WO_ALL    0x3fff       /* Mask of all possible WO_* values */\n#define WO_SINGLE 0x01ff       /* Mask of all non-compound WO_* values */\n\n/*\n** These are definitions of bits in the WhereLoop.wsFlags field.\n** The particular combination of bits in each WhereLoop help to\n** determine the algorithm that WhereLoop represents.\n*/\n#define WHERE_COLUMN_EQ    0x00000001  /* x=EXPR */\n#define WHERE_COLUMN_RANGE 0x00000002  /* x<EXPR and/or x>EXPR */\n#define WHERE_COLUMN_IN    0x00000004  /* x IN (...) */\n#define WHERE_COLUMN_NULL  0x00000008  /* x IS NULL */\n#define WHERE_CONSTRAINT   0x0000000f  /* Any of the WHERE_COLUMN_xxx values */\n#define WHERE_TOP_LIMIT    0x00000010  /* x<EXPR or x<=EXPR constraint */\n#define WHERE_BTM_LIMIT    0x00000020  /* x>EXPR or x>=EXPR constraint */\n#define WHERE_BOTH_LIMIT   0x00000030  /* Both x>EXPR and x<EXPR */\n#define WHERE_IDX_ONLY     0x00000040  /* Use index only - omit table */\n#define WHERE_IPK          0x00000100  /* x is the INTEGER PRIMARY KEY */\n#define WHERE_INDEXED      0x00000200  /* WhereLoop.u.btree.pIndex is valid */\n#define WHERE_VIRTUALTABLE 0x00000400  /* WhereLoop.u.vtab is valid */\n#define WHERE_IN_ABLE      0x00000800  /* Able to support an IN operator */\n#define WHERE_ONEROW       0x00001000  /* Selects no more than one row */\n#define WHERE_MULTI_OR     0x00002000  /* OR using multiple indices */\n#define WHERE_AUTO_INDEX   0x00004000  /* Uses an ephemeral index */\n#define WHERE_SKIPSCAN     0x00008000  /* Uses the skip-scan algorithm */\n#define WHERE_UNQ_WANTED   0x00010000  /* WHERE_ONEROW would have been helpful*/\n#define WHERE_PARTIALIDX   0x00020000  /* The automatic index is partial */\n#define WHERE_IN_EARLYOUT  0x00040000  /* Perhaps quit IN loops early */\n#define WHERE_BIGNULL_SORT 0x00080000  /* Column nEq of index is BIGNULL */\n#define WHERE_IN_SEEKSCAN  0x00100000  /* Seek-scan optimization for IN */\n#define WHERE_TRANSCONS    0x00200000  /* Uses a transitive constraint */\n#define WHERE_BLOOMFILTER  0x00400000  /* Consider using a Bloom-filter */\n#define WHERE_SELFCULL     0x00800000  /* nOut reduced by extra WHERE terms */\n#define WHERE_OMIT_OFFSET  0x01000000  /* Set offset counter to zero */\n#define WHERE_COROUTINE    0x02000000  /* Implemented by co-routine.\n                                       ** NB: False-negatives are possible */\n#define WHERE_EXPRIDX      0x04000000  /* Uses an index-on-expressions */\n\n#endif /* !defined(SQLITE_WHEREINT_H) */\n\n/************** End of whereInt.h ********************************************/\n/************** Continuing where we left off in wherecode.c ******************/\n\n#ifndef SQLITE_OMIT_EXPLAIN\n\n/*\n** Return the name of the i-th column of the pIdx index.\n*/\nstatic const char *explainIndexColumnName(Index *pIdx, int i){\n  i = pIdx->aiColumn[i];\n  if( i==XN_EXPR ) return \"<expr>\";\n  if( i==XN_ROWID ) return \"rowid\";\n  return pIdx->pTable->aCol[i].zCnName;\n}\n\n/*\n** This routine is a helper for explainIndexRange() below\n**\n** pStr holds the text of an expression that we are building up one term\n** at a time.  This routine adds a new term to the end of the expression.\n** Terms are separated by AND so add the \"AND\" text for second and subsequent\n** terms only.\n*/\nstatic void explainAppendTerm(\n  StrAccum *pStr,             /* The text expression being built */\n  Index *pIdx,                /* Index to read column names from */\n  int nTerm,                  /* Number of terms */\n  int iTerm,                  /* Zero-based index of first term. */\n  int bAnd,                   /* Non-zero to append \" AND \" */\n  const char *zOp             /* Name of the operator */\n){\n  int i;\n\n  assert( nTerm>=1 );\n  if( bAnd ) sqlite3_str_append(pStr, \" AND \", 5);\n\n  if( nTerm>1 ) sqlite3_str_append(pStr, \"(\", 1);\n  for(i=0; i<nTerm; i++){\n    if( i ) sqlite3_str_append(pStr, \",\", 1);\n    sqlite3_str_appendall(pStr, explainIndexColumnName(pIdx, iTerm+i));\n  }\n  if( nTerm>1 ) sqlite3_str_append(pStr, \")\", 1);\n\n  sqlite3_str_append(pStr, zOp, 1);\n\n  if( nTerm>1 ) sqlite3_str_append(pStr, \"(\", 1);\n  for(i=0; i<nTerm; i++){\n    if( i ) sqlite3_str_append(pStr, \",\", 1);\n    sqlite3_str_append(pStr, \"?\", 1);\n  }\n  if( nTerm>1 ) sqlite3_str_append(pStr, \")\", 1);\n}\n\n/*\n** Argument pLevel describes a strategy for scanning table pTab. This\n** function appends text to pStr that describes the subset of table\n** rows scanned by the strategy in the form of an SQL expression.\n**\n** For example, if the query:\n**\n**   SELECT * FROM t1 WHERE a=1 AND b>2;\n**\n** is run and there is an index on (a, b), then this function returns a\n** string similar to:\n**\n**   \"a=? AND b>?\"\n*/\nstatic void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop){\n  Index *pIndex = pLoop->u.btree.pIndex;\n  u16 nEq = pLoop->u.btree.nEq;\n  u16 nSkip = pLoop->nSkip;\n  int i, j;\n\n  if( nEq==0 && (pLoop->wsFlags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ) return;\n  sqlite3_str_append(pStr, \" (\", 2);\n  for(i=0; i<nEq; i++){\n    const char *z = explainIndexColumnName(pIndex, i);\n    if( i ) sqlite3_str_append(pStr, \" AND \", 5);\n    sqlite3_str_appendf(pStr, i>=nSkip ? \"%s=?\" : \"ANY(%s)\", z);\n  }\n\n  j = i;\n  if( pLoop->wsFlags&WHERE_BTM_LIMIT ){\n    explainAppendTerm(pStr, pIndex, pLoop->u.btree.nBtm, j, i, \">\");\n    i = 1;\n  }\n  if( pLoop->wsFlags&WHERE_TOP_LIMIT ){\n    explainAppendTerm(pStr, pIndex, pLoop->u.btree.nTop, j, i, \"<\");\n  }\n  sqlite3_str_append(pStr, \")\", 1);\n}\n\n/*\n** This function sets the P4 value of an existing OP_Explain opcode to\n** text describing the loop in pLevel. If the OP_Explain opcode already has\n** a P4 value, it is freed before it is overwritten.\n*/\nSQLITE_PRIVATE void sqlite3WhereAddExplainText(\n  Parse *pParse,                  /* Parse context */\n  int addr,                       /* Address of OP_Explain opcode */\n  SrcList *pTabList,              /* Table list this loop refers to */\n  WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */\n  u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */\n){\n#if !defined(SQLITE_DEBUG)\n  if( sqlite3ParseToplevel(pParse)->explain==2 || IS_STMT_SCANSTATUS(pParse->db) )\n#endif\n  {\n    VdbeOp *pOp = sqlite3VdbeGetOp(pParse->pVdbe, addr);\n    SrcItem *pItem = &pTabList->a[pLevel->iFrom];\n    sqlite3 *db = pParse->db;     /* Database handle */\n    int isSearch;                 /* True for a SEARCH. False for SCAN. */\n    WhereLoop *pLoop;             /* The controlling WhereLoop object */\n    u32 flags;                    /* Flags that describe this loop */\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)\n    char *zMsg;                   /* Text to add to EQP output */\n#endif\n    StrAccum str;                 /* EQP output string */\n    char zBuf[100];               /* Initial space for EQP output string */\n\n    if( db->mallocFailed ) return;\n\n    pLoop = pLevel->pWLoop;\n    flags = pLoop->wsFlags;\n\n    isSearch = (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0\n            || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))\n            || (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));\n\n    sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);\n    str.printfFlags = SQLITE_PRINTF_INTERNAL;\n    sqlite3_str_appendf(&str, \"%s %S%s\",\n       isSearch ? \"SEARCH\" : \"SCAN\",\n       pItem,\n       pItem->fg.fromExists ? \" EXISTS\" : \"\");\n    if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){\n      const char *zFmt = 0;\n      Index *pIdx;\n\n      assert( pLoop->u.btree.pIndex!=0 );\n      pIdx = pLoop->u.btree.pIndex;\n      assert( !(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY) );\n      if( !HasRowid(pItem->pSTab) && IsPrimaryKeyIndex(pIdx) ){\n        if( isSearch ){\n          zFmt = \"PRIMARY KEY\";\n        }\n      }else if( flags & WHERE_PARTIALIDX ){\n        zFmt = \"AUTOMATIC PARTIAL COVERING INDEX\";\n      }else if( flags & WHERE_AUTO_INDEX ){\n        zFmt = \"AUTOMATIC COVERING INDEX\";\n      }else if( flags & (WHERE_IDX_ONLY|WHERE_EXPRIDX) ){\n        zFmt = \"COVERING INDEX %s\";\n      }else{\n        zFmt = \"INDEX %s\";\n      }\n      if( zFmt ){\n        sqlite3_str_append(&str, \" USING \", 7);\n        sqlite3_str_appendf(&str, zFmt, pIdx->zName);\n        explainIndexRange(&str, pLoop);\n      }\n    }else if( (flags & WHERE_IPK)!=0 && (flags & WHERE_CONSTRAINT)!=0 ){\n      char cRangeOp;\n#if 0  /* Better output, but breaks many tests */\n      const Table *pTab = pItem->pTab;\n      const char *zRowid = pTab->iPKey>=0 ? pTab->aCol[pTab->iPKey].zCnName:\n                              \"rowid\";\n#else\n      const char *zRowid = \"rowid\";\n#endif\n      sqlite3_str_appendf(&str, \" USING INTEGER PRIMARY KEY (%s\", zRowid);\n      if( flags&(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) ){\n        cRangeOp = '=';\n      }else if( (flags&WHERE_BOTH_LIMIT)==WHERE_BOTH_LIMIT ){\n        sqlite3_str_appendf(&str, \">? AND %s\", zRowid);\n        cRangeOp = '<';\n      }else if( flags&WHERE_BTM_LIMIT ){\n        cRangeOp = '>';\n      }else{\n        assert( flags&WHERE_TOP_LIMIT);\n        cRangeOp = '<';\n      }\n      sqlite3_str_appendf(&str, \"%c?)\", cRangeOp);\n    }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    else if( (flags & WHERE_VIRTUALTABLE)!=0 ){\n      sqlite3_str_appendall(&str, \" VIRTUAL TABLE INDEX \");\n      sqlite3_str_appendf(&str,\n                  pLoop->u.vtab.bIdxNumHex ? \"0x%x:%s\" : \"%d:%s\",\n                  pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);\n    }\n#endif\n    if( pItem->fg.jointype & JT_LEFT ){\n      sqlite3_str_appendf(&str, \" LEFT-JOIN\");\n    }\n#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS\n    if( pLoop->nOut>=10 ){\n      sqlite3_str_appendf(&str, \" (~%llu rows)\",\n             sqlite3LogEstToInt(pLoop->nOut));\n    }else{\n      sqlite3_str_append(&str, \" (~1 row)\", 9);\n    }\n#endif\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)\n    zMsg = sqlite3StrAccumFinish(&str);\n    sqlite3ExplainBreakpoint(\"\",zMsg);\n#endif\n\n    assert( pOp->opcode==OP_Explain );\n    assert( pOp->p4type==P4_DYNAMIC || pOp->p4.z==0 );\n    sqlite3DbFree(db, pOp->p4.z);\n    pOp->p4type = P4_DYNAMIC;\n    pOp->p4.z = sqlite3StrAccumFinish(&str);\n  }\n}\n\n\n/*\n** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN\n** command, or if stmt_scanstatus_v2() stats are enabled, or if SQLITE_DEBUG\n** was defined at compile-time. If it is not a no-op, a single OP_Explain\n** opcode is added to the output to describe the table scan strategy in pLevel.\n**\n** If an OP_Explain opcode is added to the VM, its address is returned.\n** Otherwise, if no OP_Explain is coded, zero is returned.\n*/\nSQLITE_PRIVATE int sqlite3WhereExplainOneScan(\n  Parse *pParse,                  /* Parse context */\n  SrcList *pTabList,              /* Table list this loop refers to */\n  WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */\n  u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */\n){\n  int ret = 0;\n#if !defined(SQLITE_DEBUG)\n  if( sqlite3ParseToplevel(pParse)->explain==2 || IS_STMT_SCANSTATUS(pParse->db) )\n#endif\n  {\n    if( (pLevel->pWLoop->wsFlags & WHERE_MULTI_OR)==0\n     && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0\n    ){\n      Vdbe *v = pParse->pVdbe;\n      int addr = sqlite3VdbeCurrentAddr(v);\n      ret = sqlite3VdbeAddOp3(\n          v, OP_Explain, addr, pParse->addrExplain, pLevel->pWLoop->rRun\n      );\n      sqlite3WhereAddExplainText(pParse, addr, pTabList, pLevel, wctrlFlags);\n    }\n  }\n  return ret;\n}\n\n/*\n** Add a single OP_Explain opcode that describes a Bloom filter.\n**\n** Or if not processing EXPLAIN QUERY PLAN and not in a SQLITE_DEBUG and/or\n** SQLITE_ENABLE_STMT_SCANSTATUS build, then OP_Explain opcodes are not\n** required and this routine is a no-op.\n**\n** If an OP_Explain opcode is added to the VM, its address is returned.\n** Otherwise, if no OP_Explain is coded, zero is returned.\n*/\nSQLITE_PRIVATE int sqlite3WhereExplainBloomFilter(\n  const Parse *pParse,               /* Parse context */\n  const WhereInfo *pWInfo,           /* WHERE clause */\n  const WhereLevel *pLevel           /* Bloom filter on this level */\n){\n  int ret = 0;\n  SrcItem *pItem = &pWInfo->pTabList->a[pLevel->iFrom];\n  Vdbe *v = pParse->pVdbe;      /* VM being constructed */\n  sqlite3 *db = pParse->db;     /* Database handle */\n  char *zMsg;                   /* Text to add to EQP output */\n  int i;                        /* Loop counter */\n  WhereLoop *pLoop;             /* The where loop */\n  StrAccum str;                 /* EQP output string */\n  char zBuf[100];               /* Initial space for EQP output string */\n\n  sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);\n  str.printfFlags = SQLITE_PRINTF_INTERNAL;\n  sqlite3_str_appendf(&str, \"BLOOM FILTER ON %S (\", pItem);\n  pLoop = pLevel->pWLoop;\n  if( pLoop->wsFlags & WHERE_IPK ){\n    const Table *pTab = pItem->pSTab;\n    if( pTab->iPKey>=0 ){\n      sqlite3_str_appendf(&str, \"%s=?\", pTab->aCol[pTab->iPKey].zCnName);\n    }else{\n      sqlite3_str_appendf(&str, \"rowid=?\");\n    }\n  }else{\n    for(i=pLoop->nSkip; i<pLoop->u.btree.nEq; i++){\n      const char *z = explainIndexColumnName(pLoop->u.btree.pIndex, i);\n      if( i>pLoop->nSkip ) sqlite3_str_append(&str, \" AND \", 5);\n      sqlite3_str_appendf(&str, \"%s=?\", z);\n    }\n  }\n  sqlite3_str_append(&str, \")\", 1);\n  zMsg = sqlite3StrAccumFinish(&str);\n  ret = sqlite3VdbeAddOp4(v, OP_Explain, sqlite3VdbeCurrentAddr(v),\n                          pParse->addrExplain, 0, zMsg,P4_DYNAMIC);\n\n  sqlite3VdbeScanStatus(v, sqlite3VdbeCurrentAddr(v)-1, 0, 0, 0, 0);\n  return ret;\n}\n#endif /* SQLITE_OMIT_EXPLAIN */\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n/*\n** Configure the VM passed as the first argument with an\n** sqlite3_stmt_scanstatus() entry corresponding to the scan used to\n** implement level pLvl. Argument pSrclist is a pointer to the FROM\n** clause that the scan reads data from.\n**\n** If argument addrExplain is not 0, it must be the address of an\n** OP_Explain instruction that describes the same loop.\n*/\nSQLITE_PRIVATE void sqlite3WhereAddScanStatus(\n  Vdbe *v,                        /* Vdbe to add scanstatus entry to */\n  SrcList *pSrclist,              /* FROM clause pLvl reads data from */\n  WhereLevel *pLvl,               /* Level to add scanstatus() entry for */\n  int addrExplain                 /* Address of OP_Explain (or 0) */\n){\n  if( IS_STMT_SCANSTATUS( sqlite3VdbeDb(v) ) ){\n    const char *zObj = 0;\n    WhereLoop *pLoop = pLvl->pWLoop;\n    int wsFlags = pLoop->wsFlags;\n    int viaCoroutine = 0;\n\n    if( (wsFlags & WHERE_VIRTUALTABLE)==0  &&  pLoop->u.btree.pIndex!=0 ){\n      zObj = pLoop->u.btree.pIndex->zName;\n    }else{\n      zObj = pSrclist->a[pLvl->iFrom].zName;\n      viaCoroutine = pSrclist->a[pLvl->iFrom].fg.viaCoroutine;\n    }\n    sqlite3VdbeScanStatus(\n        v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj\n    );\n\n    if( viaCoroutine==0 ){\n      if( (wsFlags & (WHERE_MULTI_OR|WHERE_AUTO_INDEX))==0 ){\n        sqlite3VdbeScanStatusRange(v, addrExplain, -1, pLvl->iTabCur);\n      }\n      if( wsFlags & WHERE_INDEXED ){\n        sqlite3VdbeScanStatusRange(v, addrExplain, -1, pLvl->iIdxCur);\n      }\n    }else{\n      int addr;\n      VdbeOp *pOp;\n      assert( pSrclist->a[pLvl->iFrom].fg.isSubquery );\n      addr = pSrclist->a[pLvl->iFrom].u4.pSubq->addrFillSub;\n      pOp = sqlite3VdbeGetOp(v, addr-1);\n      assert( sqlite3VdbeDb(v)->mallocFailed || pOp->opcode==OP_InitCoroutine );\n      assert( sqlite3VdbeDb(v)->mallocFailed || pOp->p2>addr );\n      sqlite3VdbeScanStatusRange(v, addrExplain, addr, pOp->p2-1);\n    }\n  }\n}\n#endif\n\n\n/*\n** Disable a term in the WHERE clause.  Except, do not disable the term\n** if it controls a LEFT OUTER JOIN and it did not originate in the ON\n** or USING clause of that join.\n**\n** Consider the term t2.z='ok' in the following queries:\n**\n**   (1)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'\n**   (2)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'\n**   (3)  SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'\n**\n** The t2.z='ok' is disabled in the in (2) because it originates\n** in the ON clause.  The term is disabled in (3) because it is not part\n** of a LEFT OUTER JOIN.  In (1), the term is not disabled.\n**\n** Disabling a term causes that term to not be tested in the inner loop\n** of the join.  Disabling is an optimization.  When terms are satisfied\n** by indices, we disable them to prevent redundant tests in the inner\n** loop.  We would get the correct results if nothing were ever disabled,\n** but joins might run a little slower.  The trick is to disable as much\n** as we can without disabling too much.  If we disabled in (1), we'd get\n** the wrong answer.  See ticket #813.\n**\n** If all the children of a term are disabled, then that term is also\n** automatically disabled.  In this way, terms get disabled if derived\n** virtual terms are tested first.  For example:\n**\n**      x GLOB 'abc*' AND x>='abc' AND x<'acd'\n**      \\___________/     \\______/     \\_____/\n**         parent          child1       child2\n**\n** Only the parent term was in the original WHERE clause.  The child1\n** and child2 terms were added by the LIKE optimization.  If both of\n** the virtual child terms are valid, then testing of the parent can be\n** skipped.\n**\n** Usually the parent term is marked as TERM_CODED.  But if the parent\n** term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead.\n** The TERM_LIKECOND marking indicates that the term should be coded inside\n** a conditional such that is only evaluated on the second pass of a\n** LIKE-optimization loop, when scanning BLOBs instead of strings.\n*/\nstatic void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){\n  int nLoop = 0;\n  assert( pTerm!=0 );\n  while( (pTerm->wtFlags & TERM_CODED)==0\n      && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_OuterON))\n      && (pLevel->notReady & pTerm->prereqAll)==0\n  ){\n    if( nLoop && (pTerm->wtFlags & TERM_LIKE)!=0 ){\n      pTerm->wtFlags |= TERM_LIKECOND;\n    }else{\n      pTerm->wtFlags |= TERM_CODED;\n    }\n#ifdef WHERETRACE_ENABLED\n    if( (sqlite3WhereTrace & 0x4001)==0x4001 ){\n      sqlite3DebugPrintf(\"DISABLE-\");\n      sqlite3WhereTermPrint(pTerm, (int)(pTerm - (pTerm->pWC->a)));\n    }\n#endif\n    if( pTerm->iParent<0 ) break;\n    pTerm = &pTerm->pWC->a[pTerm->iParent];\n    assert( pTerm!=0 );\n    pTerm->nChild--;\n    if( pTerm->nChild!=0 ) break;\n    nLoop++;\n  }\n}\n\n/*\n** Code an OP_Affinity opcode to apply the column affinity string zAff\n** to the n registers starting at base.\n**\n** As an optimization, SQLITE_AFF_BLOB and SQLITE_AFF_NONE entries (which\n** are no-ops) at the beginning and end of zAff are ignored.  If all entries\n** in zAff are SQLITE_AFF_BLOB or SQLITE_AFF_NONE, then no code gets generated.\n**\n** This routine makes its own copy of zAff so that the caller is free\n** to modify zAff after this routine returns.\n*/\nstatic void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){\n  Vdbe *v = pParse->pVdbe;\n  if( zAff==0 ){\n    assert( pParse->db->mallocFailed );\n    return;\n  }\n  assert( v!=0 );\n\n  /* Adjust base and n to skip over SQLITE_AFF_BLOB and SQLITE_AFF_NONE\n  ** entries at the beginning and end of the affinity string.\n  */\n  assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB );\n  while( n>0 && zAff[0]<=SQLITE_AFF_BLOB ){\n    n--;\n    base++;\n    zAff++;\n  }\n  while( n>1 && zAff[n-1]<=SQLITE_AFF_BLOB ){\n    n--;\n  }\n\n  /* Code the OP_Affinity opcode if there is anything left to do. */\n  if( n>0 ){\n    sqlite3VdbeAddOp4(v, OP_Affinity, base, n, 0, zAff, n);\n  }\n}\n\n/*\n** Expression pRight, which is the RHS of a comparison operation, is\n** either a vector of n elements or, if n==1, a scalar expression.\n** Before the comparison operation, affinity zAff is to be applied\n** to the pRight values. This function modifies characters within the\n** affinity string to SQLITE_AFF_BLOB if either:\n**\n**   * the comparison will be performed with no affinity, or\n**   * the affinity change in zAff is guaranteed not to change the value.\n*/\nstatic void updateRangeAffinityStr(\n  Expr *pRight,                   /* RHS of comparison */\n  int n,                          /* Number of vector elements in comparison */\n  char *zAff                      /* Affinity string to modify */\n){\n  int i;\n  for(i=0; i<n; i++){\n    Expr *p = sqlite3VectorFieldSubexpr(pRight, i);\n    if( sqlite3CompareAffinity(p, zAff[i])==SQLITE_AFF_BLOB\n     || sqlite3ExprNeedsNoAffinityChange(p, zAff[i])\n    ){\n      zAff[i] = SQLITE_AFF_BLOB;\n    }\n  }\n}\n\n/*\n** The pOrderBy->a[].u.x.iOrderByCol values might be incorrect because\n** columns might have been rearranged in the result set.  This routine\n** fixes them up.\n**\n** pEList is the new result set.  The pEList->a[].u.x.iOrderByCol values\n** contain the *old* locations of each expression.  This is a temporary\n** use of u.x.iOrderByCol, not its intended use.  The caller must reset\n** u.x.iOrderByCol back to zero for all entries in pEList before the\n** caller returns.\n**\n** This routine changes pOrderBy->a[].u.x.iOrderByCol values from\n** pEList->a[N].u.x.iOrderByCol into N+1.  (The \"+1\" is because of the 1-based\n** indexing used by iOrderByCol.)  Or if no match, iOrderByCol is set to zero.\n*/\nstatic void adjustOrderByCol(ExprList *pOrderBy, ExprList *pEList){\n  int i, j;\n  if( pOrderBy==0 ) return;\n  for(i=0; i<pOrderBy->nExpr; i++){\n    int t = pOrderBy->a[i].u.x.iOrderByCol;\n    if( t==0 ) continue;\n    for(j=0; j<pEList->nExpr; j++){\n      if( pEList->a[j].u.x.iOrderByCol==t ){\n        pOrderBy->a[i].u.x.iOrderByCol = j+1;\n        break;\n      }\n    }\n    if( j>=pEList->nExpr ){\n      pOrderBy->a[i].u.x.iOrderByCol = 0;\n    }\n  }\n}\n\n\n/*\n** pX is an expression of the form:  (vector) IN (SELECT ...)\n** In other words, it is a vector IN operator with a SELECT clause on the\n** RHS.  But not all terms in the vector are indexable and the terms might\n** not be in the correct order for indexing.\n**\n** This routine makes a copy of the input pX expression and then adjusts\n** the vector on the LHS with corresponding changes to the SELECT so that\n** the vector contains only index terms and those terms are in the correct\n** order.  The modified IN expression is returned.  The caller is responsible\n** for deleting the returned expression.\n**\n** Example:\n**\n**    CREATE TABLE t1(a,b,c,d,e,f);\n**    CREATE INDEX t1x1 ON t1(e,c);\n**    SELECT * FROM t1 WHERE (a,b,c,d,e) IN (SELECT v,w,x,y,z FROM t2)\n**                           \\_______________________________________/\n**                                     The pX expression\n**\n** Since only columns e and c can be used with the index, in that order,\n** the modified IN expression that is returned will be:\n**\n**        (e,c) IN (SELECT z,x FROM t2)\n**\n** The reduced pX is different from the original (obviously) and thus is\n** only used for indexing, to improve performance.  The original unaltered\n** IN expression must also be run on each output row for correctness.\n*/\nstatic Expr *removeUnindexableInClauseTerms(\n  Parse *pParse,        /* The parsing context */\n  int iEq,              /* Look at loop terms starting here */\n  WhereLoop *pLoop,     /* The current loop */\n  Expr *pX              /* The IN expression to be reduced */\n){\n  sqlite3 *db = pParse->db;\n  Select *pSelect;            /* Pointer to the SELECT on the RHS */\n  Expr *pNew;\n  pNew = sqlite3ExprDup(db, pX, 0);\n  if( db->mallocFailed==0 ){\n    for(pSelect=pNew->x.pSelect; pSelect; pSelect=pSelect->pPrior){\n      ExprList *pOrigRhs;         /* Original unmodified RHS */\n      ExprList *pOrigLhs = 0;     /* Original unmodified LHS */\n      ExprList *pRhs = 0;         /* New RHS after modifications */\n      ExprList *pLhs = 0;         /* New LHS after mods */\n      int i;                      /* Loop counter */\n\n      assert( ExprUseXSelect(pNew) );\n      pOrigRhs = pSelect->pEList;\n      assert( pNew->pLeft!=0 );\n      assert( ExprUseXList(pNew->pLeft) );\n      if( pSelect==pNew->x.pSelect ){\n        pOrigLhs = pNew->pLeft->x.pList;\n      }\n      for(i=iEq; i<pLoop->nLTerm; i++){\n        if( pLoop->aLTerm[i]->pExpr==pX ){\n          int iField;\n          assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 );\n          iField = pLoop->aLTerm[i]->u.x.iField - 1;\n          if( NEVER(pOrigRhs->a[iField].pExpr==0) ){\n            continue; /* Duplicate PK column */\n          }\n          pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr);\n          pOrigRhs->a[iField].pExpr = 0;\n          if( pRhs ) pRhs->a[pRhs->nExpr-1].u.x.iOrderByCol = iField+1;\n          if( pOrigLhs ){\n            assert( pOrigLhs->a[iField].pExpr!=0 );\n            pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr);\n            pOrigLhs->a[iField].pExpr = 0;\n          }\n        }\n      }\n      sqlite3ExprListDelete(db, pOrigRhs);\n      if( pOrigLhs ){\n        sqlite3ExprListDelete(db, pOrigLhs);\n        pNew->pLeft->x.pList = pLhs;\n      }\n      pSelect->pEList = pRhs;\n      pSelect->selId = ++pParse->nSelect; /* Req'd for SubrtnSig validity */\n      if( pLhs && pLhs->nExpr==1 ){\n        /* Take care here not to generate a TK_VECTOR containing only a\n        ** single value. Since the parser never creates such a vector, some\n        ** of the subroutines do not handle this case.  */\n        Expr *p = pLhs->a[0].pExpr;\n        pLhs->a[0].pExpr = 0;\n        sqlite3ExprDelete(db, pNew->pLeft);\n        pNew->pLeft = p;\n      }\n\n      /* If either the ORDER BY clause or the GROUP BY clause contains\n      ** references to result-set columns, those references might now be\n      ** obsolete.  So fix them up.\n      */\n      assert( pRhs!=0 || db->mallocFailed );\n      if( pRhs ){\n        adjustOrderByCol(pSelect->pOrderBy, pRhs);\n        adjustOrderByCol(pSelect->pGroupBy, pRhs);\n        for(i=0; i<pRhs->nExpr; i++) pRhs->a[i].u.x.iOrderByCol = 0;\n      }\n\n#if 0\n      printf(\"For indexing, change the IN expr:\\n\");\n      sqlite3TreeViewExpr(0, pX, 0);\n      printf(\"Into:\\n\");\n      sqlite3TreeViewExpr(0, pNew, 0);\n#endif\n    }\n  }\n  return pNew;\n}\n\n\n#ifndef SQLITE_OMIT_SUBQUERY\n/*\n** Generate code for a single X IN (....) term of the WHERE clause.\n**\n** This is a special-case of codeEqualityTerm() that works for IN operators\n** only.  It is broken out into a subroutine because this case is\n** uncommon and by splitting it off into a subroutine, the common case\n** runs faster.\n**\n** The current value for the constraint is left in  register iTarget.\n** This routine sets up a loop that will iterate over all values of X.\n*/\nstatic SQLITE_NOINLINE void codeINTerm(\n  Parse *pParse,      /* The parsing context */\n  WhereTerm *pTerm,   /* The term of the WHERE clause to be coded */\n  WhereLevel *pLevel, /* The level of the FROM clause we are working on */\n  int iEq,            /* Index of the equality term within this level */\n  int bRev,           /* True for reverse-order IN operations */\n  int iTarget         /* Attempt to leave results in this register */\n){\n  Expr *pX = pTerm->pExpr;\n  int eType = IN_INDEX_NOOP;\n  int iTab;\n  struct InLoop *pIn;\n  WhereLoop *pLoop = pLevel->pWLoop;\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  int nEq = 0;\n  int *aiMap = 0;\n\n  if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0\n    && pLoop->u.btree.pIndex!=0\n    && pLoop->u.btree.pIndex->aSortOrder[iEq]\n  ){\n    testcase( iEq==0 );\n    testcase( bRev );\n    bRev = !bRev;\n  }\n  assert( pX->op==TK_IN );\n\n  for(i=0; i<iEq; i++){\n    if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){\n      disableTerm(pLevel, pTerm);\n      return;\n    }\n  }\n  for(i=iEq; i<pLoop->nLTerm; i++){\n    assert( pLoop->aLTerm[i]!=0 );\n    if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;\n  }\n\n  iTab = 0;\n  if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){\n    eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);\n  }else{\n    sqlite3 *db = pParse->db;\n    Expr *pXMod = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);\n    if( !db->mallocFailed ){\n      aiMap = (int*)sqlite3DbMallocZero(db, sizeof(int)*nEq);\n      eType = sqlite3FindInIndex(pParse, pXMod, IN_INDEX_LOOP, 0, aiMap, &iTab);\n    }\n    sqlite3ExprDelete(db, pXMod);\n  }\n\n  if( eType==IN_INDEX_INDEX_DESC ){\n    testcase( bRev );\n    bRev = !bRev;\n  }\n  sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);\n  VdbeCoverageIf(v, bRev);\n  VdbeCoverageIf(v, !bRev);\n\n  assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );\n  pLoop->wsFlags |= WHERE_IN_ABLE;\n  if( pLevel->u.in.nIn==0 ){\n    pLevel->addrNxt = sqlite3VdbeMakeLabel(pParse);\n  }\n  if( iEq>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0 ){\n    pLoop->wsFlags |= WHERE_IN_EARLYOUT;\n  }\n\n  i = pLevel->u.in.nIn;\n  pLevel->u.in.nIn += nEq;\n  pLevel->u.in.aInLoop =\n     sqlite3WhereRealloc(pTerm->pWC->pWInfo,\n                         pLevel->u.in.aInLoop,\n                         sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);\n  pIn = pLevel->u.in.aInLoop;\n  if( pIn ){\n    int iMap = 0;               /* Index in aiMap[] */\n    pIn += i;\n    for(i=iEq; i<pLoop->nLTerm; i++){\n      if( pLoop->aLTerm[i]->pExpr==pX ){\n        int iOut = iTarget + i - iEq;\n        if( eType==IN_INDEX_ROWID ){\n          pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);\n        }else{\n          int iCol = aiMap ? aiMap[iMap++] : 0;\n          pIn->addrInTop = sqlite3VdbeAddOp3(v,OP_Column,iTab, iCol, iOut);\n        }\n        sqlite3VdbeAddOp1(v, OP_IsNull, iOut); VdbeCoverage(v);\n        if( i==iEq ){\n          pIn->iCur = iTab;\n          pIn->eEndLoopOp = bRev ? OP_Prev : OP_Next;\n          if( iEq>0 ){\n            pIn->iBase = iTarget - i;\n            pIn->nPrefix = i;\n          }else{\n            pIn->nPrefix = 0;\n          }\n        }else{\n          pIn->eEndLoopOp = OP_Noop;\n        }\n        pIn++;\n      }\n    }\n    testcase( iEq>0\n              && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0\n              && (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 );\n    if( iEq>0\n     && (pLoop->wsFlags & (WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE))==0\n    ){\n      sqlite3VdbeAddOp3(v, OP_SeekHit, pLevel->iIdxCur, 0, iEq);\n    }\n  }else{\n    pLevel->u.in.nIn = 0;\n  }\n  sqlite3DbFree(pParse->db, aiMap);\n}\n#endif\n\n\n/*\n** Generate code for a single equality term of the WHERE clause.  An equality\n** term can be either X=expr or X IN (...).   pTerm is the term to be\n** coded.\n**\n** The current value for the constraint is left in a register, the index\n** of which is returned.  An attempt is made store the result in iTarget but\n** this is only guaranteed for TK_ISNULL and TK_IN constraints.  If the\n** constraint is a TK_EQ or TK_IS, then the current value might be left in\n** some other register and it is the caller's responsibility to compensate.\n**\n** For a constraint of the form X=expr, the expression is evaluated in\n** straight-line code.  For constraints of the form X IN (...)\n** this routine sets up a loop that will iterate over all values of X.\n*/\nstatic int codeEqualityTerm(\n  Parse *pParse,      /* The parsing context */\n  WhereTerm *pTerm,   /* The term of the WHERE clause to be coded */\n  WhereLevel *pLevel, /* The level of the FROM clause we are working on */\n  int iEq,            /* Index of the equality term within this level */\n  int bRev,           /* True for reverse-order IN operations */\n  int iTarget         /* Attempt to leave results in this register */\n){\n  Expr *pX = pTerm->pExpr;\n  int iReg;                  /* Register holding results */\n\n  assert( pLevel->pWLoop->aLTerm[iEq]==pTerm );\n  assert( iTarget>0 );\n  if( pX->op==TK_EQ || pX->op==TK_IS ){\n    iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);\n  }else if( pX->op==TK_ISNULL ){\n    iReg = iTarget;\n    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Null, 0, iReg);\n#ifndef SQLITE_OMIT_SUBQUERY\n  }else{\n    assert( pX->op==TK_IN );\n    iReg = iTarget;\n    codeINTerm(pParse, pTerm, pLevel, iEq, bRev, iTarget);\n#endif\n  }\n\n  /* As an optimization, try to disable the WHERE clause term that is\n  ** driving the index as it will always be true.  The correct answer is\n  ** obtained regardless, but we might get the answer with fewer CPU cycles\n  ** by omitting the term.\n  **\n  ** But do not disable the term unless we are certain that the term is\n  ** not a transitive constraint.  For an example of where that does not\n  ** work, see https://sqlite.org/forum/forumpost/eb8613976a (2021-05-04)\n  */\n  if( (pLevel->pWLoop->wsFlags & WHERE_TRANSCONS)==0\n   || (pTerm->eOperator & WO_EQUIV)==0\n  ){\n    disableTerm(pLevel, pTerm);\n  }\n\n  return iReg;\n}\n\n/*\n** Generate code that will evaluate all == and IN constraints for an\n** index scan.\n**\n** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).\n** Suppose the WHERE clause is this:  a==5 AND b IN (1,2,3) AND c>5 AND c<10\n** The index has as many as three equality constraints, but in this\n** example, the third \"c\" value is an inequality.  So only two\n** constraints are coded.  This routine will generate code to evaluate\n** a==5 and b IN (1,2,3).  The current values for a and b will be stored\n** in consecutive registers and the index of the first register is returned.\n**\n** In the example above nEq==2.  But this subroutine works for any value\n** of nEq including 0.  If nEq==0, this routine is nearly a no-op.\n** The only thing it does is allocate the pLevel->iMem memory cell and\n** compute the affinity string.\n**\n** The nExtraReg parameter is 0 or 1.  It is 0 if all WHERE clause constraints\n** are == or IN and are covered by the nEq.  nExtraReg is 1 if there is\n** an inequality constraint (such as the \"c>=5 AND c<10\" in the example) that\n** occurs after the nEq quality constraints.\n**\n** This routine allocates a range of nEq+nExtraReg memory cells and returns\n** the index of the first memory cell in that range. The code that\n** calls this routine will use that memory range to store keys for\n** start and termination conditions of the loop.\n** key value of the loop.  If one or more IN operators appear, then\n** this routine allocates an additional nEq memory cells for internal\n** use.\n**\n** Before returning, *pzAff is set to point to a buffer containing a\n** copy of the column affinity string of the index allocated using\n** sqlite3DbMalloc(). Except, entries in the copy of the string associated\n** with equality constraints that use BLOB or NONE affinity are set to\n** SQLITE_AFF_BLOB. This is to deal with SQL such as the following:\n**\n**   CREATE TABLE t1(a TEXT PRIMARY KEY, b);\n**   SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;\n**\n** In the example above, the index on t1(a) has TEXT affinity. But since\n** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,\n** no conversion should be attempted before using a t2.b value as part of\n** a key to search the index. Hence the first byte in the returned affinity\n** string in this example would be set to SQLITE_AFF_BLOB.\n*/\nstatic int codeAllEqualityTerms(\n  Parse *pParse,        /* Parsing context */\n  WhereLevel *pLevel,   /* Which nested loop of the FROM we are coding */\n  int bRev,             /* Reverse the order of IN operators */\n  int nExtraReg,        /* Number of extra registers to allocate */\n  char **pzAff          /* OUT: Set to point to affinity string */\n){\n  u16 nEq;                      /* The number of == or IN constraints to code */\n  u16 nSkip;                    /* Number of left-most columns to skip */\n  Vdbe *v = pParse->pVdbe;      /* The vm under construction */\n  Index *pIdx;                  /* The index being used for this loop */\n  WhereTerm *pTerm;             /* A single constraint term */\n  WhereLoop *pLoop;             /* The WhereLoop object */\n  int j;                        /* Loop counter */\n  int regBase;                  /* Base register */\n  int nReg;                     /* Number of registers to allocate */\n  char *zAff;                   /* Affinity string to return */\n\n  /* This module is only called on query plans that use an index. */\n  pLoop = pLevel->pWLoop;\n  assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );\n  nEq = pLoop->u.btree.nEq;\n  nSkip = pLoop->nSkip;\n  pIdx = pLoop->u.btree.pIndex;\n  assert( pIdx!=0 );\n\n  /* Figure out how many memory cells we will need then allocate them.\n  */\n  regBase = pParse->nMem + 1;\n  nReg = nEq + nExtraReg;\n  pParse->nMem += nReg;\n\n  zAff = sqlite3DbStrDup(pParse->db,sqlite3IndexAffinityStr(pParse->db,pIdx));\n  assert( zAff!=0 || pParse->db->mallocFailed );\n\n  if( nSkip ){\n    int iIdxCur = pLevel->iIdxCur;\n    sqlite3VdbeAddOp3(v, OP_Null, 0, regBase, regBase+nSkip-1);\n    sqlite3VdbeAddOp1(v, (bRev?OP_Last:OP_Rewind), iIdxCur);\n    VdbeCoverageIf(v, bRev==0);\n    VdbeCoverageIf(v, bRev!=0);\n    VdbeComment((v, \"begin skip-scan on %s\", pIdx->zName));\n    j = sqlite3VdbeAddOp0(v, OP_Goto);\n    assert( pLevel->addrSkip==0 );\n    pLevel->addrSkip = sqlite3VdbeAddOp4Int(v, (bRev?OP_SeekLT:OP_SeekGT),\n                            iIdxCur, 0, regBase, nSkip);\n    VdbeCoverageIf(v, bRev==0);\n    VdbeCoverageIf(v, bRev!=0);\n    sqlite3VdbeJumpHere(v, j);\n    for(j=0; j<nSkip; j++){\n      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, j, regBase+j);\n      testcase( pIdx->aiColumn[j]==XN_EXPR );\n      VdbeComment((v, \"%s\", explainIndexColumnName(pIdx, j)));\n    }\n  }\n\n  /* Evaluate the equality constraints\n  */\n  assert( zAff==0 || (int)strlen(zAff)>=nEq );\n  for(j=nSkip; j<nEq; j++){\n    int r1;\n    pTerm = pLoop->aLTerm[j];\n    assert( pTerm!=0 );\n    /* The following testcase is true for indices with redundant columns.\n    ** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */\n    testcase( (pTerm->wtFlags & TERM_CODED)!=0 );\n    testcase( pTerm->wtFlags & TERM_VIRTUAL );\n    r1 = codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, regBase+j);\n    if( r1!=regBase+j ){\n      if( nReg==1 ){\n        sqlite3ReleaseTempReg(pParse, regBase);\n        regBase = r1;\n      }else{\n        sqlite3VdbeAddOp2(v, OP_Copy, r1, regBase+j);\n      }\n    }\n    if( pTerm->eOperator & WO_IN ){\n      if( pTerm->pExpr->flags & EP_xIsSelect ){\n        /* No affinity ever needs to be (or should be) applied to a value\n        ** from the RHS of an \"? IN (SELECT ...)\" expression. The\n        ** sqlite3FindInIndex() routine has already ensured that the\n        ** affinity of the comparison has been applied to the value.  */\n        if( zAff ) zAff[j] = SQLITE_AFF_BLOB;\n      }\n    }else if( (pTerm->eOperator & WO_ISNULL)==0 ){\n      Expr *pRight = pTerm->pExpr->pRight;\n      if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){\n        sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);\n        VdbeCoverage(v);\n      }\n      if( pParse->nErr==0 ){\n        assert( pParse->db->mallocFailed==0 );\n        if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){\n          zAff[j] = SQLITE_AFF_BLOB;\n        }\n        if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){\n          zAff[j] = SQLITE_AFF_BLOB;\n        }\n      }\n    }\n  }\n  *pzAff = zAff;\n  return regBase;\n}\n\n#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n/*\n** If the most recently coded instruction is a constant range constraint\n** (a string literal) that originated from the LIKE optimization, then\n** set P3 and P5 on the OP_String opcode so that the string will be cast\n** to a BLOB at appropriate times.\n**\n** The LIKE optimization trys to evaluate \"x LIKE 'abc%'\" as a range\n** expression: \"x>='ABC' AND x<'abd'\".  But this requires that the range\n** scan loop run twice, once for strings and a second time for BLOBs.\n** The OP_String opcodes on the second pass convert the upper and lower\n** bound string constants to blobs.  This routine makes the necessary changes\n** to the OP_String opcodes for that to happen.\n**\n** Except, of course, if SQLITE_LIKE_DOESNT_MATCH_BLOBS is defined, then\n** only the one pass through the string space is required, so this routine\n** becomes a no-op.\n*/\nstatic void whereLikeOptimizationStringFixup(\n  Vdbe *v,                /* prepared statement under construction */\n  WhereLevel *pLevel,     /* The loop that contains the LIKE operator */\n  WhereTerm *pTerm        /* The upper or lower bound just coded */\n){\n  if( pTerm->wtFlags & TERM_LIKEOPT ){\n    VdbeOp *pOp;\n    assert( pLevel->iLikeRepCntr>0 );\n    pOp = sqlite3VdbeGetLastOp(v);\n    assert( pOp!=0 );\n    assert( pOp->opcode==OP_String8\n            || pTerm->pWC->pWInfo->pParse->db->mallocFailed );\n    pOp->p3 = (int)(pLevel->iLikeRepCntr>>1);  /* Register holding counter */\n    pOp->p5 = (u8)(pLevel->iLikeRepCntr&1);    /* ASC or DESC */\n  }\n}\n#else\n# define whereLikeOptimizationStringFixup(A,B,C)\n#endif\n\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n/*\n** Information is passed from codeCursorHint() down to individual nodes of\n** the expression tree (by sqlite3WalkExpr()) using an instance of this\n** structure.\n*/\nstruct CCurHint {\n  int iTabCur;    /* Cursor for the main table */\n  int iIdxCur;    /* Cursor for the index, if pIdx!=0.  Unused otherwise */\n  Index *pIdx;    /* The index used to access the table */\n};\n\n/*\n** This function is called for every node of an expression that is a candidate\n** for a cursor hint on an index cursor.  For TK_COLUMN nodes that reference\n** the table CCurHint.iTabCur, verify that the same column can be\n** accessed through the index.  If it cannot, then set pWalker->eCode to 1.\n*/\nstatic int codeCursorHintCheckExpr(Walker *pWalker, Expr *pExpr){\n  struct CCurHint *pHint = pWalker->u.pCCurHint;\n  assert( pHint->pIdx!=0 );\n  if( pExpr->op==TK_COLUMN\n   && pExpr->iTable==pHint->iTabCur\n   && sqlite3TableColumnToIndex(pHint->pIdx, pExpr->iColumn)<0\n  ){\n    pWalker->eCode = 1;\n  }\n  return WRC_Continue;\n}\n\n/*\n** Test whether or not expression pExpr, which was part of a WHERE clause,\n** should be included in the cursor-hint for a table that is on the rhs\n** of a LEFT JOIN. Set Walker.eCode to non-zero before returning if the\n** expression is not suitable.\n**\n** An expression is unsuitable if it might evaluate to non NULL even if\n** a TK_COLUMN node that does affect the value of the expression is set\n** to NULL. For example:\n**\n**   col IS NULL\n**   col IS NOT NULL\n**   coalesce(col, 1)\n**   CASE WHEN col THEN 0 ELSE 1 END\n*/\nstatic int codeCursorHintIsOrFunction(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_IS\n   || pExpr->op==TK_ISNULL || pExpr->op==TK_ISNOT\n   || pExpr->op==TK_NOTNULL || pExpr->op==TK_CASE\n  ){\n    pWalker->eCode = 1;\n  }else if( pExpr->op==TK_FUNCTION ){\n    int d1;\n    char d2[4];\n    if( 0==sqlite3IsLikeFunction(pWalker->pParse->db, pExpr, &d1, d2) ){\n      pWalker->eCode = 1;\n    }\n  }\n\n  return WRC_Continue;\n}\n\n\n/*\n** This function is called on every node of an expression tree used as an\n** argument to the OP_CursorHint instruction. If the node is a TK_COLUMN\n** that accesses any table other than the one identified by\n** CCurHint.iTabCur, then do the following:\n**\n**   1) allocate a register and code an OP_Column instruction to read\n**      the specified column into the new register, and\n**\n**   2) transform the expression node to a TK_REGISTER node that reads\n**      from the newly populated register.\n**\n** Also, if the node is a TK_COLUMN that does access the table identified\n** by pCCurHint.iTabCur, and an index is being used (which we will\n** know because CCurHint.pIdx!=0) then transform the TK_COLUMN into\n** an access of the index rather than the original table.\n*/\nstatic int codeCursorHintFixExpr(Walker *pWalker, Expr *pExpr){\n  int rc = WRC_Continue;\n  int reg;\n  struct CCurHint *pHint = pWalker->u.pCCurHint;\n  if( pExpr->op==TK_COLUMN ){\n    if( pExpr->iTable!=pHint->iTabCur ){\n      reg = ++pWalker->pParse->nMem;   /* Register for column value */\n      reg = sqlite3ExprCodeTarget(pWalker->pParse, pExpr, reg);\n      pExpr->op = TK_REGISTER;\n      pExpr->iTable = reg;\n    }else if( pHint->pIdx!=0 ){\n      pExpr->iTable = pHint->iIdxCur;\n      pExpr->iColumn = sqlite3TableColumnToIndex(pHint->pIdx, pExpr->iColumn);\n      assert( pExpr->iColumn>=0 );\n    }\n  }else if( pExpr->pAggInfo ){\n    rc = WRC_Prune;\n    reg = ++pWalker->pParse->nMem;   /* Register for column value */\n    reg = sqlite3ExprCodeTarget(pWalker->pParse, pExpr, reg);\n    pExpr->op = TK_REGISTER;\n    pExpr->iTable = reg;\n  }else if( pExpr->op==TK_TRUEFALSE ){\n    /* Do not walk disabled expressions.  tag-20230504-1 */\n    return WRC_Prune;\n  }\n  return rc;\n}\n\n/*\n** Insert an OP_CursorHint instruction if it is appropriate to do so.\n*/\nstatic void codeCursorHint(\n  SrcItem *pTabItem,  /* FROM clause item */\n  WhereInfo *pWInfo,    /* The where clause */\n  WhereLevel *pLevel,   /* Which loop to provide hints for */\n  WhereTerm *pEndRange  /* Hint this end-of-scan boundary term if not NULL */\n){\n  Parse *pParse = pWInfo->pParse;\n  sqlite3 *db = pParse->db;\n  Vdbe *v = pParse->pVdbe;\n  Expr *pExpr = 0;\n  WhereLoop *pLoop = pLevel->pWLoop;\n  int iCur;\n  WhereClause *pWC;\n  WhereTerm *pTerm;\n  int i, j;\n  struct CCurHint sHint;\n  Walker sWalker;\n\n  if( OptimizationDisabled(db, SQLITE_CursorHints) ) return;\n  iCur = pLevel->iTabCur;\n  assert( iCur==pWInfo->pTabList->a[pLevel->iFrom].iCursor );\n  sHint.iTabCur = iCur;\n  sHint.iIdxCur = pLevel->iIdxCur;\n  sHint.pIdx = pLoop->u.btree.pIndex;\n  memset(&sWalker, 0, sizeof(sWalker));\n  sWalker.pParse = pParse;\n  sWalker.u.pCCurHint = &sHint;\n  pWC = &pWInfo->sWC;\n  for(i=0; i<pWC->nBase; i++){\n    pTerm = &pWC->a[i];\n    if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;\n    if( pTerm->prereqAll & pLevel->notReady ) continue;\n\n    /* Any terms specified as part of the ON(...) clause for any LEFT\n    ** JOIN for which the current table is not the rhs are omitted\n    ** from the cursor-hint.\n    **\n    ** If this table is the rhs of a LEFT JOIN, \"IS\" or \"IS NULL\" terms\n    ** that were specified as part of the WHERE clause must be excluded.\n    ** This is to address the following:\n    **\n    **   SELECT ... t1 LEFT JOIN t2 ON (t1.a=t2.b) WHERE t2.c IS NULL;\n    **\n    ** Say there is a single row in t2 that matches (t1.a=t2.b), but its\n    ** t2.c values is not NULL. If the (t2.c IS NULL) constraint is\n    ** pushed down to the cursor, this row is filtered out, causing\n    ** SQLite to synthesize a row of NULL values. Which does match the\n    ** WHERE clause, and so the query returns a row. Which is incorrect.\n    **\n    ** For the same reason, WHERE terms such as:\n    **\n    **   WHERE 1 = (t2.c IS NULL)\n    **\n    ** are also excluded. See codeCursorHintIsOrFunction() for details.\n    */\n    if( pTabItem->fg.jointype & JT_LEFT ){\n      Expr *pExpr = pTerm->pExpr;\n      if( !ExprHasProperty(pExpr, EP_OuterON)\n       || pExpr->w.iJoin!=pTabItem->iCursor\n      ){\n        sWalker.eCode = 0;\n        sWalker.xExprCallback = codeCursorHintIsOrFunction;\n        sqlite3WalkExpr(&sWalker, pTerm->pExpr);\n        if( sWalker.eCode ) continue;\n      }\n    }else{\n      if( ExprHasProperty(pTerm->pExpr, EP_OuterON) ) continue;\n    }\n\n    /* All terms in pWLoop->aLTerm[] except pEndRange are used to initialize\n    ** the cursor.  These terms are not needed as hints for a pure range\n    ** scan (that has no == terms) so omit them. */\n    if( pLoop->u.btree.nEq==0 && pTerm!=pEndRange ){\n      for(j=0; j<pLoop->nLTerm && pLoop->aLTerm[j]!=pTerm; j++){}\n      if( j<pLoop->nLTerm ) continue;\n    }\n\n    /* No subqueries or non-deterministic functions allowed */\n    if( sqlite3ExprContainsSubquery(pTerm->pExpr) ) continue;\n\n    /* For an index scan, make sure referenced columns are actually in\n    ** the index. */\n    if( sHint.pIdx!=0 ){\n      sWalker.eCode = 0;\n      sWalker.xExprCallback = codeCursorHintCheckExpr;\n      sqlite3WalkExpr(&sWalker, pTerm->pExpr);\n      if( sWalker.eCode ) continue;\n    }\n\n    /* If we survive all prior tests, that means this term is worth hinting */\n    pExpr = sqlite3ExprAnd(pParse, pExpr, sqlite3ExprDup(db, pTerm->pExpr, 0));\n  }\n  if( pExpr!=0 ){\n    sWalker.xExprCallback = codeCursorHintFixExpr;\n    if( pParse->nErr==0 ) sqlite3WalkExpr(&sWalker, pExpr);\n    sqlite3VdbeAddOp4(v, OP_CursorHint,\n                      (sHint.pIdx ? sHint.iIdxCur : sHint.iTabCur), 0, 0,\n                      (const char*)pExpr, P4_EXPR);\n  }\n}\n#else\n# define codeCursorHint(A,B,C,D)  /* No-op */\n#endif /* SQLITE_ENABLE_CURSOR_HINTS */\n\n/*\n** Cursor iCur is open on an intkey b-tree (a table). Register iRowid contains\n** a rowid value just read from cursor iIdxCur, open on index pIdx. This\n** function generates code to do a deferred seek of cursor iCur to the\n** rowid stored in register iRowid.\n**\n** Normally, this is just:\n**\n**   OP_DeferredSeek $iCur $iRowid\n**\n** Which causes a seek on $iCur to the row with rowid $iRowid.\n**\n** However, if the scan currently being coded is a branch of an OR-loop and\n** the statement currently being coded is a SELECT, then additional information\n** is added that might allow OP_Column to omit the seek and instead do its\n** lookup on the index, thus avoiding an expensive seek operation.  To\n** enable this optimization, the P3 of OP_DeferredSeek is set to iIdxCur\n** and P4 is set to an array of integers containing one entry for each column\n** in the table.  For each table column, if the column is the i'th\n** column of the index, then the corresponding array entry is set to (i+1).\n** If the column does not appear in the index at all, the array entry is set\n** to 0.  The OP_Column opcode can check this array to see if the column it\n** wants is in the index and if it is, it will substitute the index cursor\n** and column number and continue with those new values, rather than seeking\n** the table cursor.\n*/\nstatic void codeDeferredSeek(\n  WhereInfo *pWInfo,              /* Where clause context */\n  Index *pIdx,                    /* Index scan is using */\n  int iCur,                       /* Cursor for IPK b-tree */\n  int iIdxCur                     /* Index cursor */\n){\n  Parse *pParse = pWInfo->pParse; /* Parse context */\n  Vdbe *v = pParse->pVdbe;        /* Vdbe to generate code within */\n\n  assert( iIdxCur>0 );\n  assert( pIdx->aiColumn[pIdx->nColumn-1]==-1 );\n\n  pWInfo->bDeferredSeek = 1;\n  sqlite3VdbeAddOp3(v, OP_DeferredSeek, iIdxCur, 0, iCur);\n  if( (pWInfo->wctrlFlags & (WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN))\n   && DbMaskAllZero(sqlite3ParseToplevel(pParse)->writeMask)\n  ){\n    int i;\n    Table *pTab = pIdx->pTable;\n    u32 *ai = (u32*)sqlite3DbMallocZero(pParse->db, sizeof(u32)*(pTab->nCol+1));\n    if( ai ){\n      ai[0] = pTab->nCol;\n      for(i=0; i<pIdx->nColumn-1; i++){\n        int x1, x2;\n        assert( pIdx->aiColumn[i]<pTab->nCol );\n        x1 = pIdx->aiColumn[i];\n        x2 = sqlite3TableColumnToStorage(pTab, x1);\n        testcase( x1!=x2 );\n        if( x1>=0 ) ai[x2+1] = i+1;\n      }\n      sqlite3VdbeChangeP4(v, -1, (char*)ai, P4_INTARRAY);\n    }\n  }\n}\n\n/*\n** If the expression passed as the second argument is a vector, generate\n** code to write the first nReg elements of the vector into an array\n** of registers starting with iReg.\n**\n** If the expression is not a vector, then nReg must be passed 1. In\n** this case, generate code to evaluate the expression and leave the\n** result in register iReg.\n*/\nstatic void codeExprOrVector(Parse *pParse, Expr *p, int iReg, int nReg){\n  assert( nReg>0 );\n  if( p && sqlite3ExprIsVector(p) ){\n#ifndef SQLITE_OMIT_SUBQUERY\n    if( ExprUseXSelect(p) ){\n      Vdbe *v = pParse->pVdbe;\n      int iSelect;\n      assert( p->op==TK_SELECT );\n      iSelect = sqlite3CodeSubselect(pParse, p);\n      sqlite3VdbeAddOp3(v, OP_Copy, iSelect, iReg, nReg-1);\n    }else\n#endif\n    {\n      int i;\n      const ExprList *pList;\n      assert( ExprUseXList(p) );\n      pList = p->x.pList;\n      assert( nReg<=pList->nExpr );\n      for(i=0; i<nReg; i++){\n        sqlite3ExprCode(pParse, pList->a[i].pExpr, iReg+i);\n      }\n    }\n  }else{\n    assert( nReg==1 || pParse->nErr );\n    sqlite3ExprCode(pParse, p, iReg);\n  }\n}\n\n/*\n** The pTruth expression is always true because it is the WHERE clause\n** a partial index that is driving a query loop.  Look through all of the\n** WHERE clause terms on the query, and if any of those terms must be\n** true because pTruth is true, then mark those WHERE clause terms as\n** coded.\n*/\nstatic void whereApplyPartialIndexConstraints(\n  Expr *pTruth,\n  int iTabCur,\n  WhereClause *pWC\n){\n  int i;\n  WhereTerm *pTerm;\n  while( pTruth->op==TK_AND ){\n    whereApplyPartialIndexConstraints(pTruth->pLeft, iTabCur, pWC);\n    pTruth = pTruth->pRight;\n  }\n  for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){\n    Expr *pExpr;\n    if( pTerm->wtFlags & TERM_CODED ) continue;\n    pExpr = pTerm->pExpr;\n    if( sqlite3ExprCompare(0, pExpr, pTruth, iTabCur)==0 ){\n      pTerm->wtFlags |= TERM_CODED;\n    }\n  }\n}\n\n/*\n** This routine is called right after An OP_Filter has been generated and\n** before the corresponding index search has been performed.  This routine\n** checks to see if there are additional Bloom filters in inner loops that\n** can be checked prior to doing the index lookup.  If there are available\n** inner-loop Bloom filters, then evaluate those filters now, before the\n** index lookup.  The idea is that a Bloom filter check is way faster than\n** an index lookup, and the Bloom filter might return false, meaning that\n** the index lookup can be skipped.\n**\n** We know that an inner loop uses a Bloom filter because it has the\n** WhereLevel.regFilter set.  If an inner-loop Bloom filter is checked,\n** then clear the WhereLevel.regFilter value to prevent the Bloom filter\n** from being checked a second time when the inner loop is evaluated.\n*/\nstatic SQLITE_NOINLINE void filterPullDown(\n  Parse *pParse,       /* Parsing context */\n  WhereInfo *pWInfo,   /* Complete information about the WHERE clause */\n  int iLevel,          /* Which level of pWInfo->a[] should be coded */\n  int addrNxt,         /* Jump here to bypass inner loops */\n  Bitmask notReady     /* Loops that are not ready */\n){\n  int saved_addrBrk;\n  while( ++iLevel < pWInfo->nLevel ){\n    WhereLevel *pLevel = &pWInfo->a[iLevel];\n    WhereLoop *pLoop = pLevel->pWLoop;\n    if( pLevel->regFilter==0 ) continue;\n    if( pLevel->pWLoop->nSkip ) continue;\n    /*         ,--- Because sqlite3ConstructBloomFilter() has will not have set\n    **  vvvvv--'    pLevel->regFilter if this were true. */\n    if( NEVER(pLoop->prereq & notReady) ) continue;\n    saved_addrBrk = pLevel->addrBrk;\n    pLevel->addrBrk = addrNxt;\n    if( pLoop->wsFlags & WHERE_IPK ){\n      WhereTerm *pTerm = pLoop->aLTerm[0];\n      int regRowid;\n      assert( pTerm!=0 );\n      assert( pTerm->pExpr!=0 );\n      testcase( pTerm->wtFlags & TERM_VIRTUAL );\n      regRowid = sqlite3GetTempReg(pParse);\n      regRowid = codeEqualityTerm(pParse, pTerm, pLevel, 0, 0, regRowid);\n      sqlite3VdbeAddOp2(pParse->pVdbe, OP_MustBeInt, regRowid, addrNxt);\n      VdbeCoverage(pParse->pVdbe);\n      sqlite3VdbeAddOp4Int(pParse->pVdbe, OP_Filter, pLevel->regFilter,\n                           addrNxt, regRowid, 1);\n      VdbeCoverage(pParse->pVdbe);\n    }else{\n      u16 nEq = pLoop->u.btree.nEq;\n      int r1;\n      char *zStartAff;\n\n      assert( pLoop->wsFlags & WHERE_INDEXED );\n      assert( (pLoop->wsFlags & WHERE_COLUMN_IN)==0 );\n      r1 = codeAllEqualityTerms(pParse,pLevel,0,0,&zStartAff);\n      codeApplyAffinity(pParse, r1, nEq, zStartAff);\n      sqlite3DbFree(pParse->db, zStartAff);\n      sqlite3VdbeAddOp4Int(pParse->pVdbe, OP_Filter, pLevel->regFilter,\n                           addrNxt, r1, nEq);\n      VdbeCoverage(pParse->pVdbe);\n    }\n    pLevel->regFilter = 0;\n    pLevel->addrBrk = saved_addrBrk;\n  }\n}\n\n/*\n** Loop pLoop is a WHERE_INDEXED level that uses at least one IN(...)\n** operator. Return true if level pLoop is guaranteed to visit only one\n** row for each key generated for the index.\n*/\nstatic int whereLoopIsOneRow(WhereLoop *pLoop){\n  if( pLoop->u.btree.pIndex->onError\n   && pLoop->nSkip==0\n   && pLoop->u.btree.nEq==pLoop->u.btree.pIndex->nKeyCol\n  ){\n    int ii;\n    for(ii=0; ii<pLoop->u.btree.nEq; ii++){\n      if( pLoop->aLTerm[ii]->eOperator & (WO_IS|WO_ISNULL) ){\n        return 0;\n      }\n    }\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** Generate code for the start of the iLevel-th loop in the WHERE clause\n** implementation described by pWInfo.\n*/\nSQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(\n  Parse *pParse,       /* Parsing context */\n  Vdbe *v,             /* Prepared statement under construction */\n  WhereInfo *pWInfo,   /* Complete information about the WHERE clause */\n  int iLevel,          /* Which level of pWInfo->a[] should be coded */\n  WhereLevel *pLevel,  /* The current level pointer */\n  Bitmask notReady     /* Which tables are currently available */\n){\n  int j, k;            /* Loop counters */\n  int iCur;            /* The VDBE cursor for the table */\n  int addrNxt;         /* Where to jump to continue with the next IN case */\n  int bRev;            /* True if we need to scan in reverse order */\n  WhereLoop *pLoop;    /* The WhereLoop object being coded */\n  WhereClause *pWC;    /* Decomposition of the entire WHERE clause */\n  WhereTerm *pTerm;               /* A WHERE clause term */\n  sqlite3 *db;                    /* Database connection */\n  SrcItem *pTabItem;              /* FROM clause term being coded */\n  int addrBrk;                    /* Jump here to break out of the loop */\n  int addrCont;                   /* Jump here to continue with next cycle */\n  int iRowidReg = 0;        /* Rowid is stored in this register, if not zero */\n  int iReleaseReg = 0;      /* Temp register to free before returning */\n  Index *pIdx = 0;          /* Index used by loop (if any) */\n  int iLoop;                /* Iteration of constraint generator loop */\n\n  pWC = &pWInfo->sWC;\n  db = pParse->db;\n  pLoop = pLevel->pWLoop;\n  pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];\n  iCur = pTabItem->iCursor;\n  pLevel->notReady = notReady & ~sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur);\n  bRev = (pWInfo->revMask>>iLevel)&1;\n  VdbeModuleComment((v, \"Begin WHERE-loop%d: %s\",\n                     iLevel, pTabItem->pSTab->zName));\n#if WHERETRACE_ENABLED /* 0x4001 */\n  if( sqlite3WhereTrace & 0x1 ){\n    sqlite3DebugPrintf(\"Coding level %d of %d:  notReady=%llx  iFrom=%d\\n\",\n       iLevel, pWInfo->nLevel, (u64)notReady, pLevel->iFrom);\n    if( sqlite3WhereTrace & 0x1000 ){\n      sqlite3WhereLoopPrint(pLoop, pWC);\n    }\n  }\n  if( (sqlite3WhereTrace & 0x4001)==0x4001 ){\n    if( iLevel==0 ){\n      sqlite3DebugPrintf(\"WHERE clause being coded:\\n\");\n      sqlite3TreeViewExpr(0, pWInfo->pWhere, 0);\n    }\n    sqlite3DebugPrintf(\"All WHERE-clause terms before coding:\\n\");\n    sqlite3WhereClausePrint(pWC);\n  }\n#endif\n\n  /* Create labels for the \"break\" and \"continue\" instructions\n  ** for the current loop.  Jump to addrBrk to break out of a loop.\n  ** Jump to cont to go immediately to the next iteration of the\n  ** loop.\n  **\n  ** When there is an IN operator, we also have a \"addrNxt\" label that\n  ** means to continue with the next IN value combination.  When\n  ** there are no IN operators in the constraints, the \"addrNxt\" label\n  ** is the same as \"addrBrk\".\n  */\n  addrBrk = pLevel->addrNxt = pLevel->addrBrk;\n  addrCont = pLevel->addrCont = sqlite3VdbeMakeLabel(pParse);\n\n  /* If this is the right table of a LEFT OUTER JOIN, allocate and\n  ** initialize a memory cell that records if this table matches any\n  ** row of the left table of the join.\n  */\n  assert( (pWInfo->wctrlFlags & (WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN))\n       || pLevel->iFrom>0 || (pTabItem[0].fg.jointype & JT_LEFT)==0\n  );\n  if( pLevel->iFrom>0 && (pTabItem[0].fg.jointype & JT_LEFT)!=0 ){\n    pLevel->iLeftJoin = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, pLevel->iLeftJoin);\n    VdbeComment((v, \"init LEFT JOIN match flag\"));\n  }\n\n  /* Special case of a FROM clause subquery implemented as a co-routine */\n  if( pTabItem->fg.viaCoroutine ){\n    int regYield;\n    Subquery *pSubq;\n    assert( pTabItem->fg.isSubquery && pTabItem->u4.pSubq!=0 );\n    pSubq = pTabItem->u4.pSubq;\n    regYield = pSubq->regReturn;\n    sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pSubq->addrFillSub);\n    pLevel->p2 =  sqlite3VdbeAddOp2(v, OP_Yield, regYield, addrBrk);\n    VdbeCoverage(v);\n    VdbeComment((v, \"next row of %s\", pTabItem->pSTab->zName));\n    pLevel->op = OP_Goto;\n  }else\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  if(  (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){\n    /* Case 1:  The table is a virtual-table.  Use the VFilter and VNext\n    **          to access the data.\n    */\n    int iReg;   /* P3 Value for OP_VFilter */\n    int addrNotFound;\n    int nConstraint = pLoop->nLTerm;\n\n    iReg = sqlite3GetTempRange(pParse, nConstraint+2);\n    addrNotFound = pLevel->addrBrk;\n    for(j=0; j<nConstraint; j++){\n      int iTarget = iReg+j+2;\n      pTerm = pLoop->aLTerm[j];\n      if( NEVER(pTerm==0) ) continue;\n      if( pTerm->eOperator & WO_IN ){\n        if( SMASKBIT32(j) & pLoop->u.vtab.mHandleIn ){\n          int iTab = pParse->nTab++;\n          int iCache = ++pParse->nMem;\n          sqlite3CodeRhsOfIN(pParse, pTerm->pExpr, iTab);\n          sqlite3VdbeAddOp3(v, OP_VInitIn, iTab, iTarget, iCache);\n        }else{\n          codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, iTarget);\n          addrNotFound = pLevel->addrNxt;\n        }\n      }else{\n        Expr *pRight = pTerm->pExpr->pRight;\n        codeExprOrVector(pParse, pRight, iTarget, 1);\n        if( pTerm->eMatchOp==SQLITE_INDEX_CONSTRAINT_OFFSET\n         && pLoop->u.vtab.bOmitOffset\n        ){\n          assert( pTerm->eOperator==WO_AUX );\n          assert( pWInfo->pSelect!=0 );\n          assert( pWInfo->pSelect->iOffset>0 );\n          sqlite3VdbeAddOp2(v, OP_Integer, 0, pWInfo->pSelect->iOffset);\n          VdbeComment((v,\"Zero OFFSET counter\"));\n        }\n      }\n    }\n    sqlite3VdbeAddOp2(v, OP_Integer, pLoop->u.vtab.idxNum, iReg);\n    sqlite3VdbeAddOp2(v, OP_Integer, nConstraint, iReg+1);\n    /* The instruction immediately prior to OP_VFilter must be an OP_Integer\n    ** that sets the \"argc\" value for xVFilter.  This is necessary for\n    ** resolveP2() to work correctly.  See tag-20250207a. */\n    sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrNotFound, iReg,\n                      pLoop->u.vtab.idxStr,\n                      pLoop->u.vtab.needFree ? P4_DYNAMIC : P4_STATIC);\n    VdbeCoverage(v);\n    pLoop->u.vtab.needFree = 0;\n    /* An OOM inside of AddOp4(OP_VFilter) instruction above might have freed\n    ** the u.vtab.idxStr.  NULL it out to prevent a use-after-free */\n    if( db->mallocFailed ) pLoop->u.vtab.idxStr = 0;\n    pLevel->p1 = iCur;\n    pLevel->op = pWInfo->eOnePass ? OP_Noop : OP_VNext;\n    pLevel->p2 = sqlite3VdbeCurrentAddr(v);\n    assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );\n\n    for(j=0; j<nConstraint; j++){\n      pTerm = pLoop->aLTerm[j];\n      if( j<16 && (pLoop->u.vtab.omitMask>>j)&1 ){\n        disableTerm(pLevel, pTerm);\n        continue;\n      }\n      if( (pTerm->eOperator & WO_IN)!=0\n       && (SMASKBIT32(j) & pLoop->u.vtab.mHandleIn)==0\n       && !db->mallocFailed\n      ){\n        Expr *pCompare;  /* The comparison operator */\n        Expr *pRight;    /* RHS of the comparison */\n        VdbeOp *pOp;     /* Opcode to access the value of the IN constraint */\n        int iIn;         /* IN loop corresponding to the j-th constraint */\n\n        /* Reload the constraint value into reg[iReg+j+2].  The same value\n        ** was loaded into the same register prior to the OP_VFilter, but\n        ** the xFilter implementation might have changed the datatype or\n        ** encoding of the value in the register, so it *must* be reloaded.\n        */\n        for(iIn=0; ALWAYS(iIn<pLevel->u.in.nIn); iIn++){\n          pOp = sqlite3VdbeGetOp(v, pLevel->u.in.aInLoop[iIn].addrInTop);\n          if( (pOp->opcode==OP_Column && pOp->p3==iReg+j+2)\n           || (pOp->opcode==OP_Rowid && pOp->p2==iReg+j+2)\n          ){\n            testcase( pOp->opcode==OP_Rowid );\n            sqlite3VdbeAddOp3(v, pOp->opcode, pOp->p1, pOp->p2, pOp->p3);\n            break;\n          }\n        }\n\n        /* Generate code that will continue to the next row if\n        ** the IN constraint is not satisfied\n        */\n        pCompare = sqlite3PExpr(pParse, TK_EQ, 0, 0);\n        if( !db->mallocFailed ){\n          int iFld = pTerm->u.x.iField;\n          Expr *pLeft = pTerm->pExpr->pLeft;\n          assert( pLeft!=0 );\n          if( iFld>0 ){\n            assert( pLeft->op==TK_VECTOR );\n            assert( ExprUseXList(pLeft) );\n            assert( iFld<=pLeft->x.pList->nExpr );\n            pCompare->pLeft = pLeft->x.pList->a[iFld-1].pExpr;\n          }else{\n            pCompare->pLeft = pLeft;\n          }\n          pCompare->pRight = pRight = sqlite3Expr(db, TK_REGISTER, 0);\n          if( pRight ){\n            pRight->iTable = iReg+j+2;\n            sqlite3ExprIfFalse(\n                pParse, pCompare, pLevel->addrCont, SQLITE_JUMPIFNULL\n            );\n          }\n          pCompare->pLeft = 0;\n        }\n        sqlite3ExprDelete(db, pCompare);\n      }\n    }\n\n    /* These registers need to be preserved in case there is an IN operator\n    ** loop.  So we could deallocate the registers here (and potentially\n    ** reuse them later) if (pLoop->wsFlags & WHERE_IN_ABLE)==0.  But it seems\n    ** simpler and safer to simply not reuse the registers.\n    **\n    **    sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);\n    */\n  }else\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n  if( (pLoop->wsFlags & WHERE_IPK)!=0\n   && (pLoop->wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_EQ))!=0\n  ){\n    /* Case 2:  We can directly reference a single row using an\n    **          equality comparison against the ROWID field.  Or\n    **          we reference multiple rows using a \"rowid IN (...)\"\n    **          construct.\n    */\n    assert( pLoop->u.btree.nEq==1 );\n    pTerm = pLoop->aLTerm[0];\n    assert( pTerm!=0 );\n    assert( pTerm->pExpr!=0 );\n    testcase( pTerm->wtFlags & TERM_VIRTUAL );\n    iReleaseReg = ++pParse->nMem;\n    iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);\n    if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);\n    addrNxt = pLevel->addrNxt;\n    if( pLevel->regFilter ){\n      sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp4Int(v, OP_Filter, pLevel->regFilter, addrNxt,\n                           iRowidReg, 1);\n      VdbeCoverage(v);\n      filterPullDown(pParse, pWInfo, iLevel, addrNxt, notReady);\n    }\n    sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);\n    VdbeCoverage(v);\n    pLevel->op = OP_Noop;\n  }else if( (pLoop->wsFlags & WHERE_IPK)!=0\n         && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0\n  ){\n    /* Case 3:  We have an inequality comparison against the ROWID field.\n    */\n    int testOp = OP_Noop;\n    int start;\n    int memEndValue = 0;\n    WhereTerm *pStart, *pEnd;\n\n    j = 0;\n    pStart = pEnd = 0;\n    if( pLoop->wsFlags & WHERE_BTM_LIMIT ) pStart = pLoop->aLTerm[j++];\n    if( pLoop->wsFlags & WHERE_TOP_LIMIT ) pEnd = pLoop->aLTerm[j++];\n    assert( pStart!=0 || pEnd!=0 );\n    if( bRev ){\n      pTerm = pStart;\n      pStart = pEnd;\n      pEnd = pTerm;\n    }\n    codeCursorHint(pTabItem, pWInfo, pLevel, pEnd);\n    if( pStart ){\n      Expr *pX;             /* The expression that defines the start bound */\n      int r1, rTemp;        /* Registers for holding the start boundary */\n      int op;               /* Cursor seek operation */\n\n      /* The following constant maps TK_xx codes into corresponding\n      ** seek opcodes.  It depends on a particular ordering of TK_xx\n      */\n      const u8 aMoveOp[] = {\n           /* TK_GT */  OP_SeekGT,\n           /* TK_LE */  OP_SeekLE,\n           /* TK_LT */  OP_SeekLT,\n           /* TK_GE */  OP_SeekGE\n      };\n      assert( TK_LE==TK_GT+1 );      /* Make sure the ordering.. */\n      assert( TK_LT==TK_GT+2 );      /*  ... of the TK_xx values... */\n      assert( TK_GE==TK_GT+3 );      /*  ... is correct. */\n\n      assert( (pStart->wtFlags & TERM_VNULL)==0 );\n      testcase( pStart->wtFlags & TERM_VIRTUAL );\n      pX = pStart->pExpr;\n      assert( pX!=0 );\n      testcase( pStart->leftCursor!=iCur ); /* transitive constraints */\n      if( sqlite3ExprIsVector(pX->pRight) ){\n        r1 = rTemp = sqlite3GetTempReg(pParse);\n        codeExprOrVector(pParse, pX->pRight, r1, 1);\n        testcase( pX->op==TK_GT );\n        testcase( pX->op==TK_GE );\n        testcase( pX->op==TK_LT );\n        testcase( pX->op==TK_LE );\n        op = aMoveOp[((pX->op - TK_GT - 1) & 0x3) | 0x1];\n        assert( pX->op!=TK_GT || op==OP_SeekGE );\n        assert( pX->op!=TK_GE || op==OP_SeekGE );\n        assert( pX->op!=TK_LT || op==OP_SeekLE );\n        assert( pX->op!=TK_LE || op==OP_SeekLE );\n      }else{\n        r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);\n        disableTerm(pLevel, pStart);\n        op = aMoveOp[(pX->op - TK_GT)];\n      }\n      sqlite3VdbeAddOp3(v, op, iCur, addrBrk, r1);\n      VdbeComment((v, \"pk\"));\n      VdbeCoverageIf(v, pX->op==TK_GT);\n      VdbeCoverageIf(v, pX->op==TK_LE);\n      VdbeCoverageIf(v, pX->op==TK_LT);\n      VdbeCoverageIf(v, pX->op==TK_GE);\n      sqlite3ReleaseTempReg(pParse, rTemp);\n    }else{\n      sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, pLevel->addrHalt);\n      VdbeCoverageIf(v, bRev==0);\n      VdbeCoverageIf(v, bRev!=0);\n    }\n    if( pEnd ){\n      Expr *pX;\n      pX = pEnd->pExpr;\n      assert( pX!=0 );\n      assert( (pEnd->wtFlags & TERM_VNULL)==0 );\n      testcase( pEnd->leftCursor!=iCur ); /* Transitive constraints */\n      testcase( pEnd->wtFlags & TERM_VIRTUAL );\n      memEndValue = ++pParse->nMem;\n      codeExprOrVector(pParse, pX->pRight, memEndValue, 1);\n      if( 0==sqlite3ExprIsVector(pX->pRight)\n       && (pX->op==TK_LT || pX->op==TK_GT)\n      ){\n        testOp = bRev ? OP_Le : OP_Ge;\n      }else{\n        testOp = bRev ? OP_Lt : OP_Gt;\n      }\n      if( 0==sqlite3ExprIsVector(pX->pRight) ){\n        disableTerm(pLevel, pEnd);\n      }\n    }\n    start = sqlite3VdbeCurrentAddr(v);\n    pLevel->op = bRev ? OP_Prev : OP_Next;\n    pLevel->p1 = iCur;\n    pLevel->p2 = start;\n    assert( pLevel->p5==0 );\n    if( testOp!=OP_Noop ){\n      iRowidReg = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);\n      sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);\n      VdbeCoverageIf(v, testOp==OP_Le);\n      VdbeCoverageIf(v, testOp==OP_Lt);\n      VdbeCoverageIf(v, testOp==OP_Ge);\n      VdbeCoverageIf(v, testOp==OP_Gt);\n      sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL);\n    }\n  }else if( pLoop->wsFlags & WHERE_INDEXED ){\n    /* Case 4: Search using an index.\n    **\n    ** The WHERE clause may contain zero or more equality\n    ** terms (\"==\" or \"IN\" or \"IS\" operators) that refer to the N\n    ** left-most columns of the index. It may also contain\n    ** inequality constraints (>, <, >= or <=) on the indexed\n    ** column that immediately follows the N equalities. Only\n    ** the right-most column can be an inequality - the rest must\n    ** use the \"==\", \"IN\", or \"IS\" operators. For example, if the\n    ** index is on (x,y,z), then the following clauses are all\n    ** optimized:\n    **\n    **    x=5\n    **    x=5 AND y=10\n    **    x=5 AND y<10\n    **    x=5 AND y>5 AND y<10\n    **    x=5 AND y=5 AND z<=10\n    **\n    ** The z<10 term of the following cannot be used, only\n    ** the x=5 term:\n    **\n    **    x=5 AND z<10\n    **\n    ** N may be zero if there are inequality constraints.\n    ** If there are no inequality constraints, then N is at\n    ** least one.\n    **\n    ** This case is also used when there are no WHERE clause\n    ** constraints but an index is selected anyway, in order\n    ** to force the output order to conform to an ORDER BY.\n    */\n    static const u8 aStartOp[] = {\n      0,\n      0,\n      OP_Rewind,           /* 2: (!start_constraints && startEq &&  !bRev) */\n      OP_Last,             /* 3: (!start_constraints && startEq &&   bRev) */\n      OP_SeekGT,           /* 4: (start_constraints  && !startEq && !bRev) */\n      OP_SeekLT,           /* 5: (start_constraints  && !startEq &&  bRev) */\n      OP_SeekGE,           /* 6: (start_constraints  &&  startEq && !bRev) */\n      OP_SeekLE            /* 7: (start_constraints  &&  startEq &&  bRev) */\n    };\n    static const u8 aEndOp[] = {\n      OP_IdxGE,            /* 0: (end_constraints && !bRev && !endEq) */\n      OP_IdxGT,            /* 1: (end_constraints && !bRev &&  endEq) */\n      OP_IdxLE,            /* 2: (end_constraints &&  bRev && !endEq) */\n      OP_IdxLT,            /* 3: (end_constraints &&  bRev &&  endEq) */\n    };\n    u16 nEq = pLoop->u.btree.nEq;     /* Number of == or IN terms */\n    u16 nBtm = pLoop->u.btree.nBtm;   /* Length of BTM vector */\n    u16 nTop = pLoop->u.btree.nTop;   /* Length of TOP vector */\n    int regBase;                 /* Base register holding constraint values */\n    WhereTerm *pRangeStart = 0;  /* Inequality constraint at range start */\n    WhereTerm *pRangeEnd = 0;    /* Inequality constraint at range end */\n    int startEq;                 /* True if range start uses ==, >= or <= */\n    int endEq;                   /* True if range end uses ==, >= or <= */\n    int start_constraints;       /* Start of range is constrained */\n    int nConstraint;             /* Number of constraint terms */\n    int iIdxCur;                 /* The VDBE cursor for the index */\n    int nExtraReg = 0;           /* Number of extra registers needed */\n    int op;                      /* Instruction opcode */\n    char *zStartAff;             /* Affinity for start of range constraint */\n    char *zEndAff = 0;           /* Affinity for end of range constraint */\n    u8 bSeekPastNull = 0;        /* True to seek past initial nulls */\n    u8 bStopAtNull = 0;          /* Add condition to terminate at NULLs */\n    int omitTable;               /* True if we use the index only */\n    int regBignull = 0;          /* big-null flag register */\n    int addrSeekScan = 0;        /* Opcode of the OP_SeekScan, if any */\n\n    pIdx = pLoop->u.btree.pIndex;\n    iIdxCur = pLevel->iIdxCur;\n    assert( nEq>=pLoop->nSkip );\n\n    /* Find any inequality constraint terms for the start and end\n    ** of the range.\n    */\n    j = nEq;\n    if( pLoop->wsFlags & WHERE_BTM_LIMIT ){\n      pRangeStart = pLoop->aLTerm[j++];\n      nExtraReg = MAX(nExtraReg, pLoop->u.btree.nBtm);\n      /* Like optimization range constraints always occur in pairs */\n      assert( (pRangeStart->wtFlags & TERM_LIKEOPT)==0 ||\n              (pLoop->wsFlags & WHERE_TOP_LIMIT)!=0 );\n    }\n    if( pLoop->wsFlags & WHERE_TOP_LIMIT ){\n      pRangeEnd = pLoop->aLTerm[j++];\n      nExtraReg = MAX(nExtraReg, pLoop->u.btree.nTop);\n#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n      if( (pRangeEnd->wtFlags & TERM_LIKEOPT)!=0 ){\n        assert( pRangeStart!=0 );                     /* LIKE opt constraints */\n        assert( pRangeStart->wtFlags & TERM_LIKEOPT );   /* occur in pairs */\n        pLevel->iLikeRepCntr = (u32)++pParse->nMem;\n        sqlite3VdbeAddOp2(v, OP_Integer, 1, (int)pLevel->iLikeRepCntr);\n        VdbeComment((v, \"LIKE loop counter\"));\n        pLevel->addrLikeRep = sqlite3VdbeCurrentAddr(v);\n        /* iLikeRepCntr actually stores 2x the counter register number.  The\n        ** bottom bit indicates whether the search order is ASC or DESC. */\n        testcase( bRev );\n        testcase( pIdx->aSortOrder[nEq]==SQLITE_SO_DESC );\n        assert( (bRev & ~1)==0 );\n        pLevel->iLikeRepCntr <<=1;\n        pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);\n      }\n#endif\n      if( pRangeStart==0 ){\n        j = pIdx->aiColumn[nEq];\n        if( (j>=0 && pIdx->pTable->aCol[j].notNull==0) || j==XN_EXPR ){\n          bSeekPastNull = 1;\n        }\n      }\n    }\n    assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );\n\n    /* If the WHERE_BIGNULL_SORT flag is set, then index column nEq uses\n    ** a non-default \"big-null\" sort (either ASC NULLS LAST or DESC NULLS\n    ** FIRST). In both cases separate ordered scans are made of those\n    ** index entries for which the column is null and for those for which\n    ** it is not. For an ASC sort, the non-NULL entries are scanned first.\n    ** For DESC, NULL entries are scanned first.\n    */\n    if( (pLoop->wsFlags & (WHERE_TOP_LIMIT|WHERE_BTM_LIMIT))==0\n     && (pLoop->wsFlags & WHERE_BIGNULL_SORT)!=0\n    ){\n      assert( bSeekPastNull==0 && nExtraReg==0 && nBtm==0 && nTop==0 );\n      assert( pRangeEnd==0 && pRangeStart==0 );\n      testcase( pLoop->nSkip>0 );\n      nExtraReg = 1;\n      bSeekPastNull = 1;\n      pLevel->regBignull = regBignull = ++pParse->nMem;\n      if( pLevel->iLeftJoin ){\n        sqlite3VdbeAddOp2(v, OP_Integer, 0, regBignull);\n      }\n      pLevel->addrBignull = sqlite3VdbeMakeLabel(pParse);\n    }\n\n    /* If we are doing a reverse order scan on an ascending index, or\n    ** a forward order scan on a descending index, interchange the\n    ** start and end terms (pRangeStart and pRangeEnd).\n    */\n    if( (nEq<pIdx->nColumn && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC)) ){\n      SWAP(WhereTerm *, pRangeEnd, pRangeStart);\n      SWAP(u8, bSeekPastNull, bStopAtNull);\n      SWAP(u8, nBtm, nTop);\n    }\n\n    if( iLevel>0 && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)!=0 ){\n      /* In case OP_SeekScan is used, ensure that the index cursor does not\n      ** point to a valid row for the first iteration of this loop. */\n      sqlite3VdbeAddOp1(v, OP_NullRow, iIdxCur);\n    }\n\n    /* Generate code to evaluate all constraint terms using == or IN\n    ** and store the values of those terms in an array of registers\n    ** starting at regBase.\n    */\n    codeCursorHint(pTabItem, pWInfo, pLevel, pRangeEnd);\n    regBase = codeAllEqualityTerms(pParse,pLevel,bRev,nExtraReg,&zStartAff);\n    assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq );\n    if( zStartAff && nTop ){\n      zEndAff = sqlite3DbStrDup(db, &zStartAff[nEq]);\n    }\n    addrNxt = (regBignull ? pLevel->addrBignull : pLevel->addrNxt);\n\n    testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );\n    testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );\n    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_LE)!=0 );\n    testcase( pRangeEnd && (pRangeEnd->eOperator & WO_GE)!=0 );\n    startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);\n    endEq =   !pRangeEnd || pRangeEnd->eOperator & (WO_LE|WO_GE);\n    start_constraints = pRangeStart || nEq>0;\n\n    /* Seek the index cursor to the start of the range. */\n    nConstraint = nEq;\n    if( pRangeStart ){\n      Expr *pRight = pRangeStart->pExpr->pRight;\n      codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);\n      whereLikeOptimizationStringFixup(v, pLevel, pRangeStart);\n      if( (pRangeStart->wtFlags & TERM_VNULL)==0\n       && sqlite3ExprCanBeNull(pRight)\n      ){\n        sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);\n        VdbeCoverage(v);\n      }\n      if( zStartAff ){\n        updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);\n      }\n      nConstraint += nBtm;\n      testcase( pRangeStart->wtFlags & TERM_VIRTUAL );\n      if( sqlite3ExprIsVector(pRight)==0 ){\n        disableTerm(pLevel, pRangeStart);\n      }else{\n        startEq = 1;\n      }\n      bSeekPastNull = 0;\n    }else if( bSeekPastNull ){\n      startEq = 0;\n      sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);\n      start_constraints = 1;\n      nConstraint++;\n    }else if( regBignull ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);\n      start_constraints = 1;\n      nConstraint++;\n    }\n    codeApplyAffinity(pParse, regBase, nConstraint - bSeekPastNull, zStartAff);\n    if( pLoop->nSkip>0 && nConstraint==pLoop->nSkip ){\n      /* The skip-scan logic inside the call to codeAllEqualityConstraints()\n      ** above has already left the cursor sitting on the correct row,\n      ** so no further seeking is needed */\n    }else{\n      if( regBignull ){\n        sqlite3VdbeAddOp2(v, OP_Integer, 1, regBignull);\n        VdbeComment((v, \"NULL-scan pass ctr\"));\n      }\n      if( pLevel->regFilter ){\n        sqlite3VdbeAddOp4Int(v, OP_Filter, pLevel->regFilter, addrNxt,\n                             regBase, nEq);\n        VdbeCoverage(v);\n        filterPullDown(pParse, pWInfo, iLevel, addrNxt, notReady);\n      }\n\n      op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];\n      assert( op!=0 );\n      if( (pLoop->wsFlags & WHERE_IN_SEEKSCAN)!=0 && op==OP_SeekGE ){\n        assert( regBignull==0 );\n        /* TUNING:  The OP_SeekScan opcode seeks to reduce the number\n        ** of expensive seek operations by replacing a single seek with\n        ** 1 or more step operations.  The question is, how many steps\n        ** should we try before giving up and going with a seek.  The cost\n        ** of a seek is proportional to the logarithm of the of the number\n        ** of entries in the tree, so basing the number of steps to try\n        ** on the estimated number of rows in the btree seems like a good\n        ** guess. */\n        addrSeekScan = sqlite3VdbeAddOp1(v, OP_SeekScan,\n                                         (pIdx->aiRowLogEst[0]+9)/10);\n        if( pRangeStart || pRangeEnd ){\n          sqlite3VdbeChangeP5(v, 1);\n          sqlite3VdbeChangeP2(v, addrSeekScan, sqlite3VdbeCurrentAddr(v)+1);\n          addrSeekScan = 0;\n        }\n        VdbeCoverage(v);\n      }\n      sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);\n      VdbeCoverage(v);\n      VdbeCoverageIf(v, op==OP_Rewind);  testcase( op==OP_Rewind );\n      VdbeCoverageIf(v, op==OP_Last);    testcase( op==OP_Last );\n      VdbeCoverageIf(v, op==OP_SeekGT);  testcase( op==OP_SeekGT );\n      VdbeCoverageIf(v, op==OP_SeekGE);  testcase( op==OP_SeekGE );\n      VdbeCoverageIf(v, op==OP_SeekLE);  testcase( op==OP_SeekLE );\n      VdbeCoverageIf(v, op==OP_SeekLT);  testcase( op==OP_SeekLT );\n\n      assert( bSeekPastNull==0 || bStopAtNull==0 );\n      if( regBignull ){\n        assert( bSeekPastNull==1 || bStopAtNull==1 );\n        assert( bSeekPastNull==!bStopAtNull );\n        assert( bStopAtNull==startEq );\n        sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2);\n        op = aStartOp[(nConstraint>1)*4 + 2 + bRev];\n        sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase,\n                             nConstraint-startEq);\n        VdbeCoverage(v);\n        VdbeCoverageIf(v, op==OP_Rewind);  testcase( op==OP_Rewind );\n        VdbeCoverageIf(v, op==OP_Last);    testcase( op==OP_Last );\n        VdbeCoverageIf(v, op==OP_SeekGE);  testcase( op==OP_SeekGE );\n        VdbeCoverageIf(v, op==OP_SeekLE);  testcase( op==OP_SeekLE );\n        assert( op==OP_Rewind || op==OP_Last || op==OP_SeekGE || op==OP_SeekLE);\n      }\n    }\n\n    /* Load the value for the inequality constraint at the end of the\n    ** range (if any).\n    */\n    nConstraint = nEq;\n    assert( pLevel->p2==0 );\n    if( pRangeEnd ){\n      Expr *pRight = pRangeEnd->pExpr->pRight;\n      assert( addrSeekScan==0 );\n      codeExprOrVector(pParse, pRight, regBase+nEq, nTop);\n      whereLikeOptimizationStringFixup(v, pLevel, pRangeEnd);\n      if( (pRangeEnd->wtFlags & TERM_VNULL)==0\n       && sqlite3ExprCanBeNull(pRight)\n      ){\n        sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);\n        VdbeCoverage(v);\n      }\n      if( zEndAff ){\n        updateRangeAffinityStr(pRight, nTop, zEndAff);\n        codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);\n      }else{\n        assert( pParse->db->mallocFailed );\n      }\n      nConstraint += nTop;\n      testcase( pRangeEnd->wtFlags & TERM_VIRTUAL );\n\n      if( sqlite3ExprIsVector(pRight)==0 ){\n        disableTerm(pLevel, pRangeEnd);\n      }else{\n        endEq = 1;\n      }\n    }else if( bStopAtNull ){\n      if( regBignull==0 ){\n        sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);\n        endEq = 0;\n      }\n      nConstraint++;\n    }\n    if( zStartAff ) sqlite3DbNNFreeNN(db, zStartAff);\n    if( zEndAff ) sqlite3DbNNFreeNN(db, zEndAff);\n\n    /* Top of the loop body */\n    pLevel->p2 = sqlite3VdbeCurrentAddr(v);\n\n    /* Check if the index cursor is past the end of the range. */\n    if( nConstraint ){\n      if( regBignull ){\n        /* Except, skip the end-of-range check while doing the NULL-scan */\n        sqlite3VdbeAddOp2(v, OP_IfNot, regBignull, sqlite3VdbeCurrentAddr(v)+3);\n        VdbeComment((v, \"If NULL-scan 2nd pass\"));\n        VdbeCoverage(v);\n      }\n      op = aEndOp[bRev*2 + endEq];\n      sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);\n      testcase( op==OP_IdxGT );  VdbeCoverageIf(v, op==OP_IdxGT );\n      testcase( op==OP_IdxGE );  VdbeCoverageIf(v, op==OP_IdxGE );\n      testcase( op==OP_IdxLT );  VdbeCoverageIf(v, op==OP_IdxLT );\n      testcase( op==OP_IdxLE );  VdbeCoverageIf(v, op==OP_IdxLE );\n      if( addrSeekScan ) sqlite3VdbeJumpHere(v, addrSeekScan);\n    }\n    if( regBignull ){\n      /* During a NULL-scan, check to see if we have reached the end of\n      ** the NULLs */\n      assert( bSeekPastNull==!bStopAtNull );\n      assert( bSeekPastNull+bStopAtNull==1 );\n      assert( nConstraint+bSeekPastNull>0 );\n      sqlite3VdbeAddOp2(v, OP_If, regBignull, sqlite3VdbeCurrentAddr(v)+2);\n      VdbeComment((v, \"If NULL-scan 1st pass\"));\n      VdbeCoverage(v);\n      op = aEndOp[bRev*2 + bSeekPastNull];\n      sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase,\n                           nConstraint+bSeekPastNull);\n      testcase( op==OP_IdxGT );  VdbeCoverageIf(v, op==OP_IdxGT );\n      testcase( op==OP_IdxGE );  VdbeCoverageIf(v, op==OP_IdxGE );\n      testcase( op==OP_IdxLT );  VdbeCoverageIf(v, op==OP_IdxLT );\n      testcase( op==OP_IdxLE );  VdbeCoverageIf(v, op==OP_IdxLE );\n    }\n\n    if( (pLoop->wsFlags & WHERE_IN_EARLYOUT)!=0 ){\n      sqlite3VdbeAddOp3(v, OP_SeekHit, iIdxCur, nEq, nEq);\n    }\n\n    /* Seek the table cursor, if required */\n    omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0\n           && (pWInfo->wctrlFlags & (WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN))==0;\n    if( omitTable ){\n      /* pIdx is a covering index.  No need to access the main table. */\n    }else if( HasRowid(pIdx->pTable) ){\n      codeDeferredSeek(pWInfo, pIdx, iCur, iIdxCur);\n    }else if( iCur!=iIdxCur ){\n      Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable);\n      iRowidReg = sqlite3GetTempRange(pParse, pPk->nKeyCol);\n      for(j=0; j<pPk->nKeyCol; j++){\n        k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[j]);\n        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, iRowidReg+j);\n      }\n      sqlite3VdbeAddOp4Int(v, OP_NotFound, iCur, addrCont,\n                           iRowidReg, pPk->nKeyCol); VdbeCoverage(v);\n    }\n\n    if( pLevel->iLeftJoin==0 ){\n      /* If a partial index is driving the loop, try to eliminate WHERE clause\n      ** terms from the query that must be true due to the WHERE clause of\n      ** the partial index.  This optimization does not work on an outer join,\n      ** as shown by:\n      **\n      ** 2019-11-02 ticket 623eff57e76d45f6      (LEFT JOIN)\n      ** 2025-05-29 forum post 7dee41d32506c4ae  (RIGHT JOIN)\n      */\n      if( pIdx->pPartIdxWhere && pLevel->pRJ==0 ){\n        whereApplyPartialIndexConstraints(pIdx->pPartIdxWhere, iCur, pWC);\n      }\n    }else{\n      testcase( pIdx->pPartIdxWhere );\n      /* The following assert() is not a requirement, merely an observation:\n      ** The OR-optimization doesn't work for the right hand table of\n      ** a LEFT JOIN: */\n      assert( (pWInfo->wctrlFlags & (WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN))==0 );\n    }\n\n    /* Record the instruction used to terminate the loop. */\n    if( (pLoop->wsFlags & WHERE_ONEROW)\n     || (pLevel->u.in.nIn && regBignull==0 && whereLoopIsOneRow(pLoop))\n    ){\n      pLevel->op = OP_Noop;\n    }else if( bRev ){\n      pLevel->op = OP_Prev;\n    }else{\n      pLevel->op = OP_Next;\n    }\n    pLevel->p1 = iIdxCur;\n    pLevel->p3 = (pLoop->wsFlags&WHERE_UNQ_WANTED)!=0 ? 1:0;\n    if( (pLoop->wsFlags & WHERE_CONSTRAINT)==0 ){\n      pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;\n    }else{\n      assert( pLevel->p5==0 );\n    }\n    if( omitTable ) pIdx = 0;\n  }else\n\n#ifndef SQLITE_OMIT_OR_OPTIMIZATION\n  if( pLoop->wsFlags & WHERE_MULTI_OR ){\n    /* Case 5:  Two or more separately indexed terms connected by OR\n    **\n    ** Example:\n    **\n    **   CREATE TABLE t1(a,b,c,d);\n    **   CREATE INDEX i1 ON t1(a);\n    **   CREATE INDEX i2 ON t1(b);\n    **   CREATE INDEX i3 ON t1(c);\n    **\n    **   SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)\n    **\n    ** In the example, there are three indexed terms connected by OR.\n    ** The top of the loop looks like this:\n    **\n    **          Null       1                # Zero the rowset in reg 1\n    **\n    ** Then, for each indexed term, the following. The arguments to\n    ** RowSetTest are such that the rowid of the current row is inserted\n    ** into the RowSet. If it is already present, control skips the\n    ** Gosub opcode and jumps straight to the code generated by WhereEnd().\n    **\n    **        sqlite3WhereBegin(<term>)\n    **          RowSetTest                  # Insert rowid into rowset\n    **          Gosub      2 A\n    **        sqlite3WhereEnd()\n    **\n    ** Following the above, code to terminate the loop. Label A, the target\n    ** of the Gosub above, jumps to the instruction right after the Goto.\n    **\n    **          Null       1                # Zero the rowset in reg 1\n    **          Goto       B                # The loop is finished.\n    **\n    **       A: <loop body>                 # Return data, whatever.\n    **\n    **          Return     2                # Jump back to the Gosub\n    **\n    **       B: <after the loop>\n    **\n    ** Added 2014-05-26: If the table is a WITHOUT ROWID table, then\n    ** use an ephemeral index instead of a RowSet to record the primary\n    ** keys of the rows we have already seen.\n    **\n    */\n    WhereClause *pOrWc;    /* The OR-clause broken out into subterms */\n    SrcList *pOrTab;       /* Shortened table list or OR-clause generation */\n    Index *pCov = 0;             /* Potential covering index (or NULL) */\n    int iCovCur = pParse->nTab++;  /* Cursor used for index scans (if any) */\n\n    int regReturn = ++pParse->nMem;           /* Register used with OP_Gosub */\n    int regRowset = 0;                        /* Register for RowSet object */\n    int regRowid = 0;                         /* Register holding rowid */\n    int iLoopBody = sqlite3VdbeMakeLabel(pParse);/* Start of loop body */\n    int iRetInit;                             /* Address of regReturn init */\n    int untestedTerms = 0;             /* Some terms not completely tested */\n    int ii;                            /* Loop counter */\n    Expr *pAndExpr = 0;                /* An \".. AND (...)\" expression */\n    Table *pTab = pTabItem->pSTab;\n\n    pTerm = pLoop->aLTerm[0];\n    assert( pTerm!=0 );\n    assert( pTerm->eOperator & WO_OR );\n    assert( (pTerm->wtFlags & TERM_ORINFO)!=0 );\n    pOrWc = &pTerm->u.pOrInfo->wc;\n    pLevel->op = OP_Return;\n    pLevel->p1 = regReturn;\n\n    /* Set up a new SrcList in pOrTab containing the table being scanned\n    ** by this loop in the a[0] slot and all notReady tables in a[1..] slots.\n    ** This becomes the SrcList in the recursive call to sqlite3WhereBegin().\n    */\n    if( pWInfo->nLevel>1 ){\n      int nNotReady;                 /* The number of notReady tables */\n      SrcItem *origSrc;              /* Original list of tables */\n      nNotReady = pWInfo->nLevel - iLevel - 1;\n      pOrTab = sqlite3DbMallocRawNN(db, SZ_SRCLIST(nNotReady+1));\n      if( pOrTab==0 ) return notReady;\n      pOrTab->nAlloc = (u8)(nNotReady + 1);\n      pOrTab->nSrc = pOrTab->nAlloc;\n      memcpy(pOrTab->a, pTabItem, sizeof(*pTabItem));\n      origSrc = pWInfo->pTabList->a;\n      for(k=1; k<=nNotReady; k++){\n        memcpy(&pOrTab->a[k], &origSrc[pLevel[k].iFrom], sizeof(pOrTab->a[k]));\n      }\n    }else{\n      pOrTab = pWInfo->pTabList;\n    }\n\n    /* Initialize the rowset register to contain NULL. An SQL NULL is\n    ** equivalent to an empty rowset.  Or, create an ephemeral index\n    ** capable of holding primary keys in the case of a WITHOUT ROWID.\n    **\n    ** Also initialize regReturn to contain the address of the instruction\n    ** immediately following the OP_Return at the bottom of the loop. This\n    ** is required in a few obscure LEFT JOIN cases where control jumps\n    ** over the top of the loop into the body of it. In this case the\n    ** correct response for the end-of-loop code (the OP_Return) is to\n    ** fall through to the next instruction, just as an OP_Next does if\n    ** called on an uninitialized cursor.\n    */\n    if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){\n      if( HasRowid(pTab) ){\n        regRowset = ++pParse->nMem;\n        sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset);\n      }else{\n        Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n        regRowset = pParse->nTab++;\n        sqlite3VdbeAddOp2(v, OP_OpenEphemeral, regRowset, pPk->nKeyCol);\n        sqlite3VdbeSetP4KeyInfo(pParse, pPk);\n      }\n      regRowid = ++pParse->nMem;\n    }\n    iRetInit = sqlite3VdbeAddOp2(v, OP_Integer, 0, regReturn);\n\n    /* If the original WHERE clause is z of the form:  (x1 OR x2 OR ...) AND y\n    ** Then for every term xN, evaluate as the subexpression: xN AND y\n    ** That way, terms in y that are factored into the disjunction will\n    ** be picked up by the recursive calls to sqlite3WhereBegin() below.\n    **\n    ** Actually, each subexpression is converted to \"xN AND w\" where w is\n    ** the \"interesting\" terms of z - terms that did not originate in the\n    ** ON or USING clause of a LEFT JOIN, and terms that are usable as\n    ** indices.\n    **\n    ** This optimization also only applies if the (x1 OR x2 OR ...) term\n    ** is not contained in the ON clause of a LEFT JOIN.\n    ** See ticket http://sqlite.org/src/info/f2369304e4\n    **\n    ** 2022-02-04:  Do not push down slices of a row-value comparison.\n    ** In other words, \"w\" or \"y\" may not be a slice of a vector.  Otherwise,\n    ** the initialization of the right-hand operand of the vector comparison\n    ** might not occur, or might occur only in an OR branch that is not\n    ** taken.  dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1.\n    **\n    ** 2022-03-03:  Do not push down expressions that involve subqueries.\n    ** The subquery might get coded as a subroutine.  Any table-references\n    ** in the subquery might be resolved to index-references for the index on\n    ** the OR branch in which the subroutine is coded.  But if the subroutine\n    ** is invoked from a different OR branch that uses a different index, such\n    ** index-references will not work.  tag-20220303a\n    ** https://sqlite.org/forum/forumpost/36937b197273d403\n    */\n    if( pWC->nTerm>1 ){\n      int iTerm;\n      for(iTerm=0; iTerm<pWC->nTerm; iTerm++){\n        Expr *pExpr = pWC->a[iTerm].pExpr;\n        if( &pWC->a[iTerm] == pTerm ) continue;\n        testcase( pWC->a[iTerm].wtFlags & TERM_VIRTUAL );\n        testcase( pWC->a[iTerm].wtFlags & TERM_CODED );\n        testcase( pWC->a[iTerm].wtFlags & TERM_SLICE );\n        if( (pWC->a[iTerm].wtFlags & (TERM_VIRTUAL|TERM_CODED|TERM_SLICE))!=0 ){\n          continue;\n        }\n        if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;\n        if( ExprHasProperty(pExpr, EP_Subquery) ) continue;  /* tag-20220303a */\n        pExpr = sqlite3ExprDup(db, pExpr, 0);\n        pAndExpr = sqlite3ExprAnd(pParse, pAndExpr, pExpr);\n      }\n      if( pAndExpr ){\n        /* The extra 0x10000 bit on the opcode is masked off and does not\n        ** become part of the new Expr.op.  However, it does make the\n        ** op==TK_AND comparison inside of sqlite3PExpr() false, and this\n        ** prevents sqlite3PExpr() from applying the AND short-circuit\n        ** optimization, which we do not want here. */\n        pAndExpr = sqlite3PExpr(pParse, TK_AND|0x10000, 0, pAndExpr);\n      }\n    }\n\n    /* Run a separate WHERE clause for each term of the OR clause.  After\n    ** eliminating duplicates from other WHERE clauses, the action for each\n    ** sub-WHERE clause is to to invoke the main loop body as a subroutine.\n    */\n    ExplainQueryPlan((pParse, 1, \"MULTI-INDEX OR\"));\n    for(ii=0; ii<pOrWc->nTerm; ii++){\n      WhereTerm *pOrTerm = &pOrWc->a[ii];\n      if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){\n        WhereInfo *pSubWInfo;           /* Info for single OR-term scan */\n        Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */\n        Expr *pDelete;                  /* Local copy of OR clause term */\n        int jmp1 = 0;                   /* Address of jump operation */\n        testcase( (pTabItem[0].fg.jointype & JT_LEFT)!=0\n               && !ExprHasProperty(pOrExpr, EP_OuterON)\n        ); /* See TH3 vtab25.400 and ticket 614b25314c766238 */\n        pDelete = pOrExpr = sqlite3ExprDup(db, pOrExpr, 0);\n        if( db->mallocFailed ){\n          sqlite3ExprDelete(db, pDelete);\n          continue;\n        }\n        if( pAndExpr ){\n          pAndExpr->pLeft = pOrExpr;\n          pOrExpr = pAndExpr;\n        }\n        /* Loop through table entries that match term pOrTerm. */\n        ExplainQueryPlan((pParse, 1, \"INDEX %d\", ii+1));\n        WHERETRACE(0xffffffff, (\"Subplan for OR-clause:\\n\"));\n        pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0, 0,\n                                      WHERE_OR_SUBCLAUSE, iCovCur);\n        assert( pSubWInfo || pParse->nErr );\n        if( pSubWInfo ){\n          WhereLoop *pSubLoop;\n          int addrExplain = sqlite3WhereExplainOneScan(\n              pParse, pOrTab, &pSubWInfo->a[0], 0\n          );\n          sqlite3WhereAddScanStatus(v, pOrTab, &pSubWInfo->a[0], addrExplain);\n\n          /* This is the sub-WHERE clause body.  First skip over\n          ** duplicate rows from prior sub-WHERE clauses, and record the\n          ** rowid (or PRIMARY KEY) for the current row so that the same\n          ** row will be skipped in subsequent sub-WHERE clauses.\n          */\n          if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){\n            int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);\n            if( HasRowid(pTab) ){\n              sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, -1, regRowid);\n              jmp1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0,\n                                          regRowid, iSet);\n              VdbeCoverage(v);\n            }else{\n              Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n              int nPk = pPk->nKeyCol;\n              int iPk;\n              int r;\n\n              /* Read the PK into an array of temp registers. */\n              r = sqlite3GetTempRange(pParse, nPk);\n              for(iPk=0; iPk<nPk; iPk++){\n                int iCol = pPk->aiColumn[iPk];\n                sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol,r+iPk);\n              }\n\n              /* Check if the temp table already contains this key. If so,\n              ** the row has already been included in the result set and\n              ** can be ignored (by jumping past the Gosub below). Otherwise,\n              ** insert the key into the temp table and proceed with processing\n              ** the row.\n              **\n              ** Use some of the same optimizations as OP_RowSetTest: If iSet\n              ** is zero, assume that the key cannot already be present in\n              ** the temp table. And if iSet is -1, assume that there is no\n              ** need to insert the key into the temp table, as it will never\n              ** be tested for.  */\n              if( iSet ){\n                jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);\n                VdbeCoverage(v);\n              }\n              if( iSet>=0 ){\n                sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);\n                sqlite3VdbeAddOp4Int(v, OP_IdxInsert, regRowset, regRowid,\n                                     r, nPk);\n                if( iSet ) sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n              }\n\n              /* Release the array of temp registers */\n              sqlite3ReleaseTempRange(pParse, r, nPk);\n            }\n          }\n\n          /* Invoke the main loop body as a subroutine */\n          sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);\n\n          /* Jump here (skipping the main loop body subroutine) if the\n          ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */\n          if( jmp1 ) sqlite3VdbeJumpHere(v, jmp1);\n\n          /* The pSubWInfo->untestedTerms flag means that this OR term\n          ** contained one or more AND term from a notReady table.  The\n          ** terms from the notReady table could not be tested and will\n          ** need to be tested later.\n          */\n          if( pSubWInfo->untestedTerms ) untestedTerms = 1;\n\n          /* If all of the OR-connected terms are optimized using the same\n          ** index, and the index is opened using the same cursor number\n          ** by each call to sqlite3WhereBegin() made by this loop, it may\n          ** be possible to use that index as a covering index.\n          **\n          ** If the call to sqlite3WhereBegin() above resulted in a scan that\n          ** uses an index, and this is either the first OR-connected term\n          ** processed or the index is the same as that used by all previous\n          ** terms, set pCov to the candidate covering index. Otherwise, set\n          ** pCov to NULL to indicate that no candidate covering index will\n          ** be available.\n          */\n          pSubLoop = pSubWInfo->a[0].pWLoop;\n          assert( (pSubLoop->wsFlags & WHERE_AUTO_INDEX)==0 );\n          if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0\n           && (ii==0 || pSubLoop->u.btree.pIndex==pCov)\n           && (HasRowid(pTab) || !IsPrimaryKeyIndex(pSubLoop->u.btree.pIndex))\n          ){\n            assert( pSubWInfo->a[0].iIdxCur==iCovCur );\n            pCov = pSubLoop->u.btree.pIndex;\n          }else{\n            pCov = 0;\n          }\n          if( sqlite3WhereUsesDeferredSeek(pSubWInfo) ){\n            pWInfo->bDeferredSeek = 1;\n          }\n\n          /* Finish the loop through table entries that match term pOrTerm. */\n          sqlite3WhereEnd(pSubWInfo);\n          ExplainQueryPlanPop(pParse);\n        }\n        sqlite3ExprDelete(db, pDelete);\n      }\n    }\n    ExplainQueryPlanPop(pParse);\n    assert( pLevel->pWLoop==pLoop );\n    assert( (pLoop->wsFlags & WHERE_MULTI_OR)!=0 );\n    assert( (pLoop->wsFlags & WHERE_IN_ABLE)==0 );\n    pLevel->u.pCoveringIdx = pCov;\n    if( pCov ) pLevel->iIdxCur = iCovCur;\n    if( pAndExpr ){\n      pAndExpr->pLeft = 0;\n      sqlite3ExprDelete(db, pAndExpr);\n    }\n    sqlite3VdbeChangeP1(v, iRetInit, sqlite3VdbeCurrentAddr(v));\n    sqlite3VdbeGoto(v, pLevel->addrBrk);\n    sqlite3VdbeResolveLabel(v, iLoopBody);\n\n    /* Set the P2 operand of the OP_Return opcode that will end the current\n    ** loop to point to this spot, which is the top of the next containing\n    ** loop.  The byte-code formatter will use that P2 value as a hint to\n    ** indent everything in between the this point and the final OP_Return.\n    ** See tag-20220407a in vdbe.c and shell.c */\n    assert( pLevel->op==OP_Return );\n    pLevel->p2 = sqlite3VdbeCurrentAddr(v);\n\n    if( pWInfo->nLevel>1 ){ sqlite3DbFreeNN(db, pOrTab); }\n    if( !untestedTerms ) disableTerm(pLevel, pTerm);\n  }else\n#endif /* SQLITE_OMIT_OR_OPTIMIZATION */\n\n  {\n    /* Case 6:  There is no usable index.  We must do a complete\n    **          scan of the entire table.\n    */\n    static const u8 aStep[] = { OP_Next, OP_Prev };\n    static const u8 aStart[] = { OP_Rewind, OP_Last };\n    assert( bRev==0 || bRev==1 );\n    if( pTabItem->fg.isRecursive ){\n      /* Tables marked isRecursive have only a single row that is stored in\n      ** a pseudo-cursor.  No need to Rewind or Next such cursors. */\n      pLevel->op = OP_Noop;\n    }else{\n      codeCursorHint(pTabItem, pWInfo, pLevel, 0);\n      pLevel->op = aStep[bRev];\n      pLevel->p1 = iCur;\n      pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev],iCur,pLevel->addrHalt);\n      VdbeCoverageIf(v, bRev==0);\n      VdbeCoverageIf(v, bRev!=0);\n      pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;\n    }\n  }\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  pLevel->addrVisit = sqlite3VdbeCurrentAddr(v);\n#endif\n\n  /* Insert code to test every subexpression that can be completely\n  ** computed using the current set of tables.\n  **\n  ** This loop may run between one and three times, depending on the\n  ** constraints to be generated. The value of stack variable iLoop\n  ** determines the constraints coded by each iteration, as follows:\n  **\n  ** iLoop==1: Code only expressions that are entirely covered by pIdx.\n  ** iLoop==2: Code remaining expressions that do not contain correlated\n  **           sub-queries.\n  ** iLoop==3: Code all remaining expressions.\n  **\n  ** An effort is made to skip unnecessary iterations of the loop.\n  **\n  ** This optimization of causing simple query restrictions to occur before\n  ** more complex one is call the \"push-down\" optimization in MySQL.  Here\n  ** in SQLite, the name is \"MySQL push-down\", since there is also another\n  ** totally unrelated optimization called \"WHERE-clause push-down\".\n  ** Sometimes the qualifier is omitted, resulting in an ambiguity, so beware.\n  */\n  iLoop = (pIdx ? 1 : 2);\n  do{\n    int iNext = 0;                /* Next value for iLoop */\n    for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){\n      Expr *pE;\n      int skipLikeAddr = 0;\n      testcase( pTerm->wtFlags & TERM_VIRTUAL );\n      testcase( pTerm->wtFlags & TERM_CODED );\n      if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;\n      if( (pTerm->prereqAll & pLevel->notReady)!=0 ){\n        testcase( pWInfo->untestedTerms==0\n            && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 );\n        pWInfo->untestedTerms = 1;\n        continue;\n      }\n      pE = pTerm->pExpr;\n      assert( pE!=0 );\n      if( pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ){\n        if( !ExprHasProperty(pE,EP_OuterON|EP_InnerON) ){\n          /* Defer processing WHERE clause constraints until after outer\n          ** join processing.  tag-20220513a */\n          continue;\n        }else if( (pTabItem->fg.jointype & JT_LEFT)==JT_LEFT\n               && !ExprHasProperty(pE,EP_OuterON) ){\n          continue;\n        }else{\n          Bitmask m = sqlite3WhereGetMask(&pWInfo->sMaskSet, pE->w.iJoin);\n          if( m & pLevel->notReady ){\n            /* An ON clause that is not ripe */\n            continue;\n          }\n        }\n      }\n      if( iLoop==1 && !sqlite3ExprCoveredByIndex(pE, pLevel->iTabCur, pIdx) ){\n        iNext = 2;\n        continue;\n      }\n      if( iLoop<3 && (pTerm->wtFlags & TERM_VARSELECT) ){\n        if( iNext==0 ) iNext = 3;\n        continue;\n      }\n\n      if( (pTerm->wtFlags & TERM_LIKECOND)!=0 ){\n        /* If the TERM_LIKECOND flag is set, that means that the range search\n        ** is sufficient to guarantee that the LIKE operator is true, so we\n        ** can skip the call to the like(A,B) function.  But this only works\n        ** for strings.  So do not skip the call to the function on the pass\n        ** that compares BLOBs. */\n#ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n        continue;\n#else\n        u32 x = pLevel->iLikeRepCntr;\n        if( x>0 ){\n          skipLikeAddr = sqlite3VdbeAddOp1(v, (x&1)?OP_IfNot:OP_If,(int)(x>>1));\n          VdbeCoverageIf(v, (x&1)==1);\n          VdbeCoverageIf(v, (x&1)==0);\n        }\n#endif\n      }\n#ifdef WHERETRACE_ENABLED /* 0xffffffff */\n      if( sqlite3WhereTrace ){\n        VdbeNoopComment((v, \"WhereTerm[%d] (%p) priority=%d\",\n                         pWC->nTerm-j, pTerm, iLoop));\n      }\n      if( sqlite3WhereTrace & 0x4000 ){\n        sqlite3DebugPrintf(\"Coding auxiliary constraint:\\n\");\n        sqlite3WhereTermPrint(pTerm, pWC->nTerm-j);\n      }\n#endif\n      sqlite3ExprIfFalse(pParse, pE, addrCont, SQLITE_JUMPIFNULL);\n      if( skipLikeAddr ) sqlite3VdbeJumpHere(v, skipLikeAddr);\n      pTerm->wtFlags |= TERM_CODED;\n    }\n    iLoop = iNext;\n  }while( iLoop>0 );\n\n  /* Insert code to test for implied constraints based on transitivity\n  ** of the \"==\" operator.\n  **\n  ** Example: If the WHERE clause contains \"t1.a=t2.b\" and \"t2.b=123\"\n  ** and we are coding the t1 loop and the t2 loop has not yet coded,\n  ** then we cannot use the \"t1.a=t2.b\" constraint, but we can code\n  ** the implied \"t1.a=123\" constraint.\n  */\n  for(pTerm=pWC->a, j=pWC->nBase; j>0; j--, pTerm++){\n    Expr *pE, sEAlt;\n    WhereTerm *pAlt;\n    if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;\n    if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) continue;\n    if( (pTerm->eOperator & WO_EQUIV)==0 ) continue;\n    if( pTerm->leftCursor!=iCur ) continue;\n    if( pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ) continue;\n    pE = pTerm->pExpr;\n#ifdef WHERETRACE_ENABLED /* 0x4001 */\n    if( (sqlite3WhereTrace & 0x4001)==0x4001 ){\n      sqlite3DebugPrintf(\"Coding transitive constraint:\\n\");\n      sqlite3WhereTermPrint(pTerm, pWC->nTerm-j);\n    }\n#endif\n    assert( !ExprHasProperty(pE, EP_OuterON) );\n    assert( (pTerm->prereqRight & pLevel->notReady)!=0 );\n    assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n    pAlt = sqlite3WhereFindTerm(pWC, iCur, pTerm->u.x.leftColumn, notReady,\n                    WO_EQ|WO_IN|WO_IS, 0);\n    if( pAlt==0 ) continue;\n    if( pAlt->wtFlags & (TERM_CODED) ) continue;\n    if( (pAlt->eOperator & WO_IN)\n     && ExprUseXSelect(pAlt->pExpr)\n     && (pAlt->pExpr->x.pSelect->pEList->nExpr>1)\n    ){\n      continue;\n    }\n    testcase( pAlt->eOperator & WO_EQ );\n    testcase( pAlt->eOperator & WO_IS );\n    testcase( pAlt->eOperator & WO_IN );\n    VdbeModuleComment((v, \"begin transitive constraint\"));\n    sEAlt = *pAlt->pExpr;\n    sEAlt.pLeft = pE->pLeft;\n    sqlite3ExprIfFalse(pParse, &sEAlt, addrCont, SQLITE_JUMPIFNULL);\n    pAlt->wtFlags |= TERM_CODED;\n  }\n\n  /* For a RIGHT OUTER JOIN, record the fact that the current row has\n  ** been matched at least once.\n  */\n  if( pLevel->pRJ ){\n    Table *pTab;\n    int nPk;\n    int r;\n    int jmp1 = 0;\n    WhereRightJoin *pRJ = pLevel->pRJ;\n\n    /* pTab is the right-hand table of the RIGHT JOIN.  Generate code that\n    ** will record that the current row of that table has been matched at\n    ** least once.  This is accomplished by storing the PK for the row in\n    ** both the iMatch index and the regBloom Bloom filter.\n    */\n    pTab = pWInfo->pTabList->a[pLevel->iFrom].pSTab;\n    if( HasRowid(pTab) ){\n      r = sqlite3GetTempRange(pParse, 2);\n      sqlite3ExprCodeGetColumnOfTable(v, pTab, pLevel->iTabCur, -1, r+1);\n      nPk = 1;\n    }else{\n      int iPk;\n      Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n      nPk = pPk->nKeyCol;\n      r = sqlite3GetTempRange(pParse, nPk+1);\n      for(iPk=0; iPk<nPk; iPk++){\n        int iCol = pPk->aiColumn[iPk];\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol,r+1+iPk);\n      }\n    }\n    jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, pRJ->iMatch, 0, r+1, nPk);\n    VdbeCoverage(v);\n    VdbeComment((v, \"match against %s\", pTab->zName));\n    sqlite3VdbeAddOp3(v, OP_MakeRecord, r+1, nPk, r);\n    sqlite3VdbeAddOp4Int(v, OP_IdxInsert, pRJ->iMatch, r, r+1, nPk);\n    sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pRJ->regBloom, 0, r+1, nPk);\n    sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n    sqlite3VdbeJumpHere(v, jmp1);\n    sqlite3ReleaseTempRange(pParse, r, nPk+1);\n  }\n\n  /* For a LEFT OUTER JOIN, generate code that will record the fact that\n  ** at least one row of the right table has matched the left table.\n  */\n  if( pLevel->iLeftJoin ){\n    pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);\n    sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);\n    VdbeComment((v, \"record LEFT JOIN hit\"));\n    if( pLevel->pRJ==0 ){\n      goto code_outer_join_constraints; /* WHERE clause constraints */\n    }\n  }\n\n  if( pLevel->pRJ ){\n    /* Create a subroutine used to process all interior loops and code\n    ** of the RIGHT JOIN.  During normal operation, the subroutine will\n    ** be in-line with the rest of the code.  But at the end, a separate\n    ** loop will run that invokes this subroutine for unmatched rows\n    ** of pTab, with all tables to left begin set to NULL.\n    */\n    WhereRightJoin *pRJ = pLevel->pRJ;\n    sqlite3VdbeAddOp2(v, OP_BeginSubrtn, 0, pRJ->regReturn);\n    pRJ->addrSubrtn = sqlite3VdbeCurrentAddr(v);\n    assert( pParse->withinRJSubrtn < 255 );\n    pParse->withinRJSubrtn++;\n\n    /* WHERE clause constraints must be deferred until after outer join\n    ** row elimination has completed, since WHERE clause constraints apply\n    ** to the results of the OUTER JOIN.  The following loop generates the\n    ** appropriate WHERE clause constraint checks.  tag-20220513a.\n    */\n  code_outer_join_constraints:\n    for(pTerm=pWC->a, j=0; j<pWC->nBase; j++, pTerm++){\n      testcase( pTerm->wtFlags & TERM_VIRTUAL );\n      testcase( pTerm->wtFlags & TERM_CODED );\n      if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;\n      if( (pTerm->prereqAll & pLevel->notReady)!=0 ){\n        assert( pWInfo->untestedTerms );\n        continue;\n      }\n      if( pTabItem->fg.jointype & JT_LTORJ ) continue;\n      assert( pTerm->pExpr );\n      sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);\n      pTerm->wtFlags |= TERM_CODED;\n    }\n  }\n\n#if WHERETRACE_ENABLED /* 0x4001 */\n  if( sqlite3WhereTrace & 0x4000 ){\n    sqlite3DebugPrintf(\"All WHERE-clause terms after coding level %d:\\n\",\n                       iLevel);\n    sqlite3WhereClausePrint(pWC);\n  }\n  if( sqlite3WhereTrace & 0x1 ){\n    sqlite3DebugPrintf(\"End Coding level %d:  notReady=%llx\\n\",\n       iLevel, (u64)pLevel->notReady);\n  }\n#endif\n  return pLevel->notReady;\n}\n\n/*\n** Generate the code for the loop that finds all non-matched terms\n** for a RIGHT JOIN.\n*/\nSQLITE_PRIVATE SQLITE_NOINLINE void sqlite3WhereRightJoinLoop(\n  WhereInfo *pWInfo,\n  int iLevel,\n  WhereLevel *pLevel\n){\n  Parse *pParse = pWInfo->pParse;\n  Vdbe *v = pParse->pVdbe;\n  WhereRightJoin *pRJ = pLevel->pRJ;\n  Expr *pSubWhere = 0;\n  WhereClause *pWC = &pWInfo->sWC;\n  WhereInfo *pSubWInfo;\n  WhereLoop *pLoop = pLevel->pWLoop;\n  SrcItem *pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];\n  SrcList *pFrom;\n  union {\n    SrcList sSrc;\n    u8 fromSpace[SZ_SRCLIST_1];\n  } uSrc;\n  Bitmask mAll = 0;\n  int k;\n\n  ExplainQueryPlan((pParse, 1, \"RIGHT-JOIN %s\", pTabItem->pSTab->zName));\n  sqlite3VdbeNoJumpsOutsideSubrtn(v, pRJ->addrSubrtn, pRJ->endSubrtn,\n                                  pRJ->regReturn);\n  for(k=0; k<iLevel; k++){\n    int iIdxCur;\n    SrcItem *pRight;\n    assert( pWInfo->a[k].pWLoop->iTab == pWInfo->a[k].iFrom );\n    pRight = &pWInfo->pTabList->a[pWInfo->a[k].iFrom];\n    mAll |= pWInfo->a[k].pWLoop->maskSelf;\n    if( pRight->fg.viaCoroutine ){\n      Subquery *pSubq;\n      assert( pRight->fg.isSubquery && pRight->u4.pSubq!=0 );\n      pSubq = pRight->u4.pSubq;\n      assert( pSubq->pSelect!=0 && pSubq->pSelect->pEList!=0 );\n      sqlite3VdbeAddOp3(\n          v, OP_Null, 0, pSubq->regResult,\n          pSubq->regResult + pSubq->pSelect->pEList->nExpr-1\n      );\n    }\n    sqlite3VdbeAddOp1(v, OP_NullRow, pWInfo->a[k].iTabCur);\n    iIdxCur = pWInfo->a[k].iIdxCur;\n    if( iIdxCur ){\n      sqlite3VdbeAddOp1(v, OP_NullRow, iIdxCur);\n    }\n  }\n  if( (pTabItem->fg.jointype & JT_LTORJ)==0 ){\n    mAll |= pLoop->maskSelf;\n    for(k=0; k<pWC->nTerm; k++){\n      WhereTerm *pTerm = &pWC->a[k];\n      if( (pTerm->wtFlags & (TERM_VIRTUAL|TERM_SLICE))!=0\n       && pTerm->eOperator!=WO_ROWVAL\n      ){\n        break;\n      }\n      if( pTerm->prereqAll & ~mAll ) continue;\n      if( ExprHasProperty(pTerm->pExpr, EP_OuterON|EP_InnerON) ) continue;\n      pSubWhere = sqlite3ExprAnd(pParse, pSubWhere,\n                                 sqlite3ExprDup(pParse->db, pTerm->pExpr, 0));\n    }\n  }\n  pFrom = &uSrc.sSrc;\n  pFrom->nSrc = 1;\n  pFrom->nAlloc = 1;\n  memcpy(&pFrom->a[0], pTabItem, sizeof(SrcItem));\n  pFrom->a[0].fg.jointype = 0;\n  assert( pParse->withinRJSubrtn < 100 );\n  pParse->withinRJSubrtn++;\n  pSubWInfo = sqlite3WhereBegin(pParse, pFrom, pSubWhere, 0, 0, 0,\n                                WHERE_RIGHT_JOIN, 0);\n  if( pSubWInfo ){\n    int iCur = pLevel->iTabCur;\n    int r = ++pParse->nMem;\n    int nPk;\n    int jmp;\n    int addrCont = sqlite3WhereContinueLabel(pSubWInfo);\n    Table *pTab = pTabItem->pSTab;\n    if( HasRowid(pTab) ){\n      sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, -1, r);\n      nPk = 1;\n    }else{\n      int iPk;\n      Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n      nPk = pPk->nKeyCol;\n      pParse->nMem += nPk - 1;\n      for(iPk=0; iPk<nPk; iPk++){\n        int iCol = pPk->aiColumn[iPk];\n        sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol,r+iPk);\n      }\n    }\n    jmp = sqlite3VdbeAddOp4Int(v, OP_Filter, pRJ->regBloom, 0, r, nPk);\n    VdbeCoverage(v);\n    sqlite3VdbeAddOp4Int(v, OP_Found, pRJ->iMatch, addrCont, r, nPk);\n    VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, jmp);\n    sqlite3VdbeAddOp2(v, OP_Gosub, pRJ->regReturn, pRJ->addrSubrtn);\n    sqlite3WhereEnd(pSubWInfo);\n  }\n  sqlite3ExprDelete(pParse->db, pSubWhere);\n  ExplainQueryPlanPop(pParse);\n  assert( pParse->withinRJSubrtn>0 );\n  pParse->withinRJSubrtn--;\n}\n\n/************** End of wherecode.c *******************************************/\n/************** Begin file whereexpr.c ***************************************/\n/*\n** 2015-06-08\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This module contains C code that generates VDBE code used to process\n** the WHERE clause of SQL statements.\n**\n** This file was originally part of where.c but was split out to improve\n** readability and editability.  This file contains utility routines for\n** analyzing Expr objects in the WHERE clause.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"whereInt.h\" */\n\n/* Forward declarations */\nstatic void exprAnalyze(SrcList*, WhereClause*, int);\n\n/*\n** Deallocate all memory associated with a WhereOrInfo object.\n*/\nstatic void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){\n  sqlite3WhereClauseClear(&p->wc);\n  sqlite3DbFree(db, p);\n}\n\n/*\n** Deallocate all memory associated with a WhereAndInfo object.\n*/\nstatic void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){\n  sqlite3WhereClauseClear(&p->wc);\n  sqlite3DbFree(db, p);\n}\n\n/*\n** Add a single new WhereTerm entry to the WhereClause object pWC.\n** The new WhereTerm object is constructed from Expr p and with wtFlags.\n** The index in pWC->a[] of the new WhereTerm is returned on success.\n** 0 is returned if the new WhereTerm could not be added due to a memory\n** allocation error.  The memory allocation failure will be recorded in\n** the db->mallocFailed flag so that higher-level functions can detect it.\n**\n** This routine will increase the size of the pWC->a[] array as necessary.\n**\n** If the wtFlags argument includes TERM_DYNAMIC, then responsibility\n** for freeing the expression p is assumed by the WhereClause object pWC.\n** This is true even if this routine fails to allocate a new WhereTerm.\n**\n** WARNING:  This routine might reallocate the space used to store\n** WhereTerms.  All pointers to WhereTerms should be invalidated after\n** calling this routine.  Such pointers may be reinitialized by referencing\n** the pWC->a[] array.\n*/\nstatic int whereClauseInsert(WhereClause *pWC, Expr *p, u16 wtFlags){\n  WhereTerm *pTerm;\n  int idx;\n  testcase( wtFlags & TERM_VIRTUAL );\n  if( pWC->nTerm>=pWC->nSlot ){\n    WhereTerm *pOld = pWC->a;\n    sqlite3 *db = pWC->pWInfo->pParse->db;\n    pWC->a = sqlite3WhereMalloc(pWC->pWInfo, sizeof(pWC->a[0])*pWC->nSlot*2 );\n    if( pWC->a==0 ){\n      if( wtFlags & TERM_DYNAMIC ){\n        sqlite3ExprDelete(db, p);\n      }\n      pWC->a = pOld;\n      return 0;\n    }\n    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);\n    pWC->nSlot = pWC->nSlot*2;\n  }\n  pTerm = &pWC->a[idx = pWC->nTerm++];\n  if( (wtFlags & TERM_VIRTUAL)==0 ) pWC->nBase = pWC->nTerm;\n  if( p && ExprHasProperty(p, EP_Unlikely) ){\n    pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;\n  }else{\n    pTerm->truthProb = 1;\n  }\n  pTerm->pExpr = sqlite3ExprSkipCollateAndLikely(p);\n  pTerm->wtFlags = wtFlags;\n  pTerm->pWC = pWC;\n  pTerm->iParent = -1;\n  memset(&pTerm->eOperator, 0,\n         sizeof(WhereTerm) - offsetof(WhereTerm,eOperator));\n  return idx;\n}\n\n/*\n** Return TRUE if the given operator is one of the operators that is\n** allowed for an indexable WHERE clause term.  The allowed operators are\n** \"=\", \"<\", \">\", \"<=\", \">=\", \"IN\", \"IS\", and \"IS NULL\"\n*/\nstatic int allowedOp(int op){\n  assert( TK_GT>TK_EQ && TK_GT<TK_GE );\n  assert( TK_LT>TK_EQ && TK_LT<TK_GE );\n  assert( TK_LE>TK_EQ && TK_LE<TK_GE );\n  assert( TK_GE==TK_EQ+4 );\n  assert( TK_IN<TK_EQ );\n  assert( TK_IS<TK_EQ );\n  assert( TK_ISNULL<TK_EQ );\n  if( op>TK_GE ) return 0;\n  if( op>=TK_EQ ) return 1;\n  return op==TK_IN || op==TK_ISNULL || op==TK_IS;\n}\n\n/*\n** Commute a comparison operator.  Expressions of the form \"X op Y\"\n** are converted into \"Y op X\".\n*/\nstatic u16 exprCommute(Parse *pParse, Expr *pExpr){\n  if( pExpr->pLeft->op==TK_VECTOR\n   || pExpr->pRight->op==TK_VECTOR\n   || sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=\n      sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft)\n  ){\n    pExpr->flags ^= EP_Commuted;\n  }\n  SWAP(Expr*,pExpr->pRight,pExpr->pLeft);\n  if( pExpr->op>=TK_GT ){\n    assert( TK_LT==TK_GT+2 );\n    assert( TK_GE==TK_LE+2 );\n    assert( TK_GT>TK_EQ );\n    assert( TK_GT<TK_LE );\n    assert( pExpr->op>=TK_GT && pExpr->op<=TK_GE );\n    pExpr->op = ((pExpr->op-TK_GT)^2)+TK_GT;\n  }\n  return 0;\n}\n\n/*\n** Translate from TK_xx operator to WO_xx bitmask.\n*/\nstatic u16 operatorMask(int op){\n  u16 c;\n  assert( allowedOp(op) );\n  if( op>=TK_EQ ){\n    assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );\n    c = (u16)(WO_EQ<<(op-TK_EQ));\n  }else if( op==TK_IN ){\n    c = WO_IN;\n  }else if( op==TK_ISNULL ){\n    c = WO_ISNULL;\n  }else{\n    assert( op==TK_IS );\n    c = WO_IS;\n  }\n  assert( op!=TK_ISNULL || c==WO_ISNULL );\n  assert( op!=TK_IN || c==WO_IN );\n  assert( op!=TK_EQ || c==WO_EQ );\n  assert( op!=TK_LT || c==WO_LT );\n  assert( op!=TK_LE || c==WO_LE );\n  assert( op!=TK_GT || c==WO_GT );\n  assert( op!=TK_GE || c==WO_GE );\n  assert( op!=TK_IS || c==WO_IS );\n  return c;\n}\n\n\n#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION\n/*\n** Check to see if the given expression is a LIKE or GLOB operator that\n** can be optimized using inequality constraints.  Return TRUE if it is\n** so and false if not.\n**\n** In order for the operator to be optimizible, the RHS must be a string\n** literal that does not begin with a wildcard.  The LHS must be a column\n** that may only be NULL, a string, or a BLOB, never a number. (This means\n** that virtual tables cannot participate in the LIKE optimization.)  The\n** collating sequence for the column on the LHS must be appropriate for\n** the operator.\n*/\nstatic int isLikeOrGlob(\n  Parse *pParse,    /* Parsing and code generating context */\n  Expr *pExpr,      /* Test this expression */\n  Expr **ppPrefix,  /* Pointer to TK_STRING expression with pattern prefix */\n  int *pisComplete, /* True if the only wildcard is % in the last character */\n  int *pnoCase      /* True if uppercase is equivalent to lowercase */\n){\n  const u8 *z = 0;           /* String on RHS of LIKE operator */\n  Expr *pRight, *pLeft;      /* Right and left size of LIKE operator */\n  ExprList *pList;           /* List of operands to the LIKE operator */\n  u8 c;                      /* One character in z[] */\n  int cnt;                   /* Number of non-wildcard prefix characters */\n  u8 wc[4];                  /* Wildcard characters */\n  sqlite3 *db = pParse->db;  /* Database connection */\n  sqlite3_value *pVal = 0;\n  int op;                    /* Opcode of pRight */\n  int rc;                    /* Result code to return */\n\n  if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, (char*)wc) ){\n    return 0;\n  }\n#ifdef SQLITE_EBCDIC\n  if( *pnoCase ) return 0;\n#endif\n  assert( ExprUseXList(pExpr) );\n  pList = pExpr->x.pList;\n  pLeft = pList->a[1].pExpr;\n\n  pRight = sqlite3ExprSkipCollate(pList->a[0].pExpr);\n  op = pRight->op;\n  if( op==TK_VARIABLE && (db->flags & SQLITE_EnableQPSG)==0 ){\n    Vdbe *pReprepare = pParse->pReprepare;\n    int iCol = pRight->iColumn;\n    pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_BLOB);\n    if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){\n      z = sqlite3_value_text(pVal);\n    }\n    sqlite3VdbeSetVarmask(pParse->pVdbe, iCol);\n    assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );\n  }else if( op==TK_STRING ){\n    assert( !ExprHasProperty(pRight, EP_IntValue) );\n     z = (u8*)pRight->u.zToken;\n  }\n  if( z ){\n    /* Count the number of prefix bytes prior to the first wildcard,\n    ** U+fffd character, or malformed utf-8. If the underlying database\n    ** has a UTF16LE encoding, then only consider ASCII characters.  Note that\n    ** the encoding of z[] is UTF8 - we are dealing with only UTF8 here in this\n    ** code, but the database engine itself might be processing content using a\n    ** different encoding. */\n    cnt = 0;\n    while( (c=z[cnt])!=0 && c!=wc[0] && c!=wc[1] && c!=wc[2] ){\n      cnt++;\n      if( c==wc[3] && z[cnt]>0 && z[cnt]<0x80 ){\n        cnt++;\n      }else if( c>=0x80 ){\n        const u8 *z2 = z+cnt-1;\n        if( c==0xff || sqlite3Utf8Read(&z2)==0xfffd  /* bad utf-8 */\n         || ENC(db)==SQLITE_UTF16LE\n        ){\n          cnt--;\n          break;\n        }else{\n          cnt = (int)(z2-z);\n        }\n      }\n    }\n\n    /* The optimization is possible only if (1) the pattern does not begin\n    ** with a wildcard and if (2) the non-wildcard prefix does not end with\n    ** an (illegal 0xff) character, or (3) the pattern does not consist of\n    ** a single escape character. The second condition is necessary so\n    ** that we can increment the prefix key to find an upper bound for the\n    ** range search. The third is because the caller assumes that the pattern\n    ** consists of at least one character after all escapes have been\n    ** removed.  */\n    if( (cnt>1 || (cnt>0 && z[0]!=wc[3])) && ALWAYS(255!=(u8)z[cnt-1]) ){\n      Expr *pPrefix;\n\n      /* A \"complete\" match if the pattern ends with \"*\" or \"%\" */\n      *pisComplete = c==wc[0] && z[cnt+1]==0 && ENC(db)!=SQLITE_UTF16LE;\n\n      /* Get the pattern prefix.  Remove all escapes from the prefix. */\n      pPrefix = sqlite3Expr(db, TK_STRING, (char*)z);\n      if( pPrefix ){\n        int iFrom, iTo;\n        char *zNew;\n        assert( !ExprHasProperty(pPrefix, EP_IntValue) );\n        zNew = pPrefix->u.zToken;\n        zNew[cnt] = 0;\n        for(iFrom=iTo=0; iFrom<cnt; iFrom++){\n          if( zNew[iFrom]==wc[3] ) iFrom++;\n          zNew[iTo++] = zNew[iFrom];\n        }\n        zNew[iTo] = 0;\n        assert( iTo>0 );\n\n        /* If the LHS is not an ordinary column with TEXT affinity, then the\n        ** pattern prefix boundaries (both the start and end boundaries) must\n        ** not look like a number.  Otherwise the pattern might be treated as\n        ** a number, which will invalidate the LIKE optimization.\n        **\n        ** Getting this right has been a persistent source of bugs in the\n        ** LIKE optimization.  See, for example:\n        **    2018-09-10 https://sqlite.org/src/info/c94369cae9b561b1\n        **    2019-05-02 https://sqlite.org/src/info/b043a54c3de54b28\n        **    2019-06-10 https://sqlite.org/src/info/fd76310a5e843e07\n        **    2019-06-14 https://sqlite.org/src/info/ce8717f0885af975\n        **    2019-09-03 https://sqlite.org/src/info/0f0428096f17252a\n        */\n        if( pLeft->op!=TK_COLUMN\n         || sqlite3ExprAffinity(pLeft)!=SQLITE_AFF_TEXT\n         || (ALWAYS( ExprUseYTab(pLeft) )\n             && ALWAYS(pLeft->y.pTab)\n             && IsVirtual(pLeft->y.pTab))  /* Might be numeric */\n        ){\n          int isNum;\n          double rDummy;\n          isNum = sqlite3AtoF(zNew, &rDummy, iTo, SQLITE_UTF8);\n          if( isNum<=0 ){\n            if( iTo==1 && zNew[0]=='-' ){\n              isNum = +1;\n            }else{\n              zNew[iTo-1]++;\n              isNum = sqlite3AtoF(zNew, &rDummy, iTo, SQLITE_UTF8);\n              zNew[iTo-1]--;\n            }\n          }\n          if( isNum>0 ){\n            sqlite3ExprDelete(db, pPrefix);\n            sqlite3ValueFree(pVal);\n            return 0;\n          }\n        }\n      }\n      *ppPrefix = pPrefix;\n\n      /* If the RHS pattern is a bound parameter, make arrangements to\n      ** reprepare the statement when that parameter is rebound */\n      if( op==TK_VARIABLE ){\n        Vdbe *v = pParse->pVdbe;\n        sqlite3VdbeSetVarmask(v, pRight->iColumn);\n        assert( !ExprHasProperty(pRight, EP_IntValue) );\n        if( *pisComplete && pRight->u.zToken[1] ){\n          /* If the rhs of the LIKE expression is a variable, and the current\n          ** value of the variable means there is no need to invoke the LIKE\n          ** function, then no OP_Variable will be added to the program.\n          ** This causes problems for the sqlite3_bind_parameter_name()\n          ** API. To work around them, add a dummy OP_Variable here.\n          */\n          int r1 = sqlite3GetTempReg(pParse);\n          sqlite3ExprCodeTarget(pParse, pRight, r1);\n          sqlite3VdbeChangeP3(v, sqlite3VdbeCurrentAddr(v)-1, 0);\n          sqlite3ReleaseTempReg(pParse, r1);\n        }\n      }\n    }else{\n      z = 0;\n    }\n  }\n\n  rc = (z!=0);\n  sqlite3ValueFree(pVal);\n  return rc;\n}\n#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */\n\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Check to see if the pExpr expression is a form that needs to be passed\n** to the xBestIndex method of virtual tables.  Forms of interest include:\n**\n**          Expression                   Virtual Table Operator\n**          -----------------------      ---------------------------------\n**      1.  column MATCH expr            SQLITE_INDEX_CONSTRAINT_MATCH\n**      2.  column GLOB expr             SQLITE_INDEX_CONSTRAINT_GLOB\n**      3.  column LIKE expr             SQLITE_INDEX_CONSTRAINT_LIKE\n**      4.  column REGEXP expr           SQLITE_INDEX_CONSTRAINT_REGEXP\n**      5.  column != expr               SQLITE_INDEX_CONSTRAINT_NE\n**      6.  expr != column               SQLITE_INDEX_CONSTRAINT_NE\n**      7.  column IS NOT expr           SQLITE_INDEX_CONSTRAINT_ISNOT\n**      8.  expr IS NOT column           SQLITE_INDEX_CONSTRAINT_ISNOT\n**      9.  column IS NOT NULL           SQLITE_INDEX_CONSTRAINT_ISNOTNULL\n**\n** In every case, \"column\" must be a column of a virtual table.  If there\n** is a match, set *ppLeft to the \"column\" expression, set *ppRight to the\n** \"expr\" expression (even though in forms (6) and (8) the column is on the\n** right and the expression is on the left).  Also set *peOp2 to the\n** appropriate virtual table operator.  The return value is 1 or 2 if there\n** is a match.  The usual return is 1, but if the RHS is also a column\n** of virtual table in forms (5) or (7) then return 2.\n**\n** If the expression matches none of the patterns above, return 0.\n*/\nstatic int isAuxiliaryVtabOperator(\n  sqlite3 *db,                    /* Parsing context */\n  Expr *pExpr,                    /* Test this expression */\n  unsigned char *peOp2,           /* OUT: 0 for MATCH, or else an op2 value */\n  Expr **ppLeft,                  /* Column expression to left of MATCH/op2 */\n  Expr **ppRight                  /* Expression to left of MATCH/op2 */\n){\n  if( pExpr->op==TK_FUNCTION ){\n    static const struct Op2 {\n      const char *zOp;\n      unsigned char eOp2;\n    } aOp[] = {\n      { \"match\",  SQLITE_INDEX_CONSTRAINT_MATCH },\n      { \"glob\",   SQLITE_INDEX_CONSTRAINT_GLOB },\n      { \"like\",   SQLITE_INDEX_CONSTRAINT_LIKE },\n      { \"regexp\", SQLITE_INDEX_CONSTRAINT_REGEXP }\n    };\n    ExprList *pList;\n    Expr *pCol;                     /* Column reference */\n    int i;\n\n    assert( ExprUseXList(pExpr) );\n    pList = pExpr->x.pList;\n    if( pList==0 || pList->nExpr!=2 ){\n      return 0;\n    }\n\n    /* Built-in operators MATCH, GLOB, LIKE, and REGEXP attach to a\n    ** virtual table on their second argument, which is the same as\n    ** the left-hand side operand in their in-fix form.\n    **\n    **       vtab_column MATCH expression\n    **       MATCH(expression,vtab_column)\n    */\n    pCol = pList->a[1].pExpr;\n    assert( pCol->op!=TK_COLUMN || (ExprUseYTab(pCol) && pCol->y.pTab!=0) );\n    if( ExprIsVtab(pCol) ){\n      for(i=0; i<ArraySize(aOp); i++){\n        assert( !ExprHasProperty(pExpr, EP_IntValue) );\n        if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){\n          *peOp2 = aOp[i].eOp2;\n          *ppRight = pList->a[0].pExpr;\n          *ppLeft = pCol;\n          return 1;\n        }\n      }\n    }\n\n    /* We can also match against the first column of overloaded\n    ** functions where xFindFunction returns a value of at least\n    ** SQLITE_INDEX_CONSTRAINT_FUNCTION.\n    **\n    **      OVERLOADED(vtab_column,expression)\n    **\n    ** Historically, xFindFunction expected to see lower-case function\n    ** names.  But for this use case, xFindFunction is expected to deal\n    ** with function names in an arbitrary case.\n    */\n    pCol = pList->a[0].pExpr;\n    assert( pCol->op!=TK_COLUMN || ExprUseYTab(pCol) );\n    assert( pCol->op!=TK_COLUMN || (ExprUseYTab(pCol) && pCol->y.pTab!=0) );\n    if( ExprIsVtab(pCol) ){\n      sqlite3_vtab *pVtab;\n      sqlite3_module *pMod;\n      void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);\n      void *pNotUsed;\n      pVtab = sqlite3GetVTable(db, pCol->y.pTab)->pVtab;\n      assert( pVtab!=0 );\n      assert( pVtab->pModule!=0 );\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      pMod = (sqlite3_module *)pVtab->pModule;\n      if( pMod->xFindFunction!=0 ){\n        i = pMod->xFindFunction(pVtab,2, pExpr->u.zToken, &xNotUsed, &pNotUsed);\n        if( i>=SQLITE_INDEX_CONSTRAINT_FUNCTION ){\n          *peOp2 = i;\n          *ppRight = pList->a[1].pExpr;\n          *ppLeft = pCol;\n          return 1;\n        }\n      }\n    }\n  }else if( pExpr->op>=TK_EQ ){\n    /* Comparison operators are a common case.  Save a few comparisons for\n    ** that common case by terminating early. */\n    assert( TK_NE < TK_EQ );\n    assert( TK_ISNOT < TK_EQ );\n    assert( TK_NOTNULL < TK_EQ );\n    return 0;\n  }else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){\n    int res = 0;\n    Expr *pLeft = pExpr->pLeft;\n    Expr *pRight = pExpr->pRight;\n    assert( pLeft->op!=TK_COLUMN || (ExprUseYTab(pLeft) && pLeft->y.pTab!=0) );\n    if( ExprIsVtab(pLeft) ){\n      res++;\n    }\n    assert( pRight==0 || pRight->op!=TK_COLUMN\n            || (ExprUseYTab(pRight) && pRight->y.pTab!=0) );\n    if( pRight && ExprIsVtab(pRight) ){\n      res++;\n      SWAP(Expr*, pLeft, pRight);\n    }\n    *ppLeft = pLeft;\n    *ppRight = pRight;\n    if( pExpr->op==TK_NE ) *peOp2 = SQLITE_INDEX_CONSTRAINT_NE;\n    if( pExpr->op==TK_ISNOT ) *peOp2 = SQLITE_INDEX_CONSTRAINT_ISNOT;\n    if( pExpr->op==TK_NOTNULL ) *peOp2 = SQLITE_INDEX_CONSTRAINT_ISNOTNULL;\n    return res;\n  }\n  return 0;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n/*\n** If the pBase expression originated in the ON or USING clause of\n** a join, then transfer the appropriate markings over to derived.\n*/\nstatic void transferJoinMarkings(Expr *pDerived, Expr *pBase){\n  if( pDerived && ExprHasProperty(pBase, EP_OuterON|EP_InnerON) ){\n    pDerived->flags |= pBase->flags & (EP_OuterON|EP_InnerON);\n    pDerived->w.iJoin = pBase->w.iJoin;\n  }\n}\n\n/*\n** Mark term iChild as being a child of term iParent\n*/\nstatic void markTermAsChild(WhereClause *pWC, int iChild, int iParent){\n  pWC->a[iChild].iParent = iParent;\n  pWC->a[iChild].truthProb = pWC->a[iParent].truthProb;\n  pWC->a[iParent].nChild++;\n}\n\n/*\n** Return the N-th AND-connected subterm of pTerm.  Or if pTerm is not\n** a conjunction, then return just pTerm when N==0.  If N is exceeds\n** the number of available subterms, return NULL.\n*/\nstatic WhereTerm *whereNthSubterm(WhereTerm *pTerm, int N){\n  if( pTerm->eOperator!=WO_AND ){\n    return N==0 ? pTerm : 0;\n  }\n  if( N<pTerm->u.pAndInfo->wc.nTerm ){\n    return &pTerm->u.pAndInfo->wc.a[N];\n  }\n  return 0;\n}\n\n/*\n** Subterms pOne and pTwo are contained within WHERE clause pWC.  The\n** two subterms are in disjunction - they are OR-ed together.\n**\n** If these two terms are both of the form:  \"A op B\" with the same\n** A and B values but different operators and if the operators are\n** compatible (if one is = and the other is <, for example) then\n** add a new virtual AND term to pWC that is the combination of the\n** two.\n**\n** Some examples:\n**\n**    x<y OR x=y    -->     x<=y\n**    x=y OR x=y    -->     x=y\n**    x<=y OR x<y   -->     x<=y\n**\n** The following is NOT generated:\n**\n**    x<y OR x>y    -->     x!=y\n*/\nstatic void whereCombineDisjuncts(\n  SrcList *pSrc,         /* the FROM clause */\n  WhereClause *pWC,      /* The complete WHERE clause */\n  WhereTerm *pOne,       /* First disjunct */\n  WhereTerm *pTwo        /* Second disjunct */\n){\n  u16 eOp = pOne->eOperator | pTwo->eOperator;\n  sqlite3 *db;           /* Database connection (for malloc) */\n  Expr *pNew;            /* New virtual expression */\n  int op;                /* Operator for the combined expression */\n  int idxNew;            /* Index in pWC of the next virtual term */\n\n  if( (pOne->wtFlags | pTwo->wtFlags) & TERM_VNULL ) return;\n  if( (pOne->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE))==0 ) return;\n  if( (pTwo->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE))==0 ) return;\n  if( (eOp & (WO_EQ|WO_LT|WO_LE))!=eOp\n   && (eOp & (WO_EQ|WO_GT|WO_GE))!=eOp ) return;\n  assert( pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0 );\n  assert( pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0 );\n  if( sqlite3ExprCompare(0,pOne->pExpr->pLeft, pTwo->pExpr->pLeft, -1) ) return;\n  if( sqlite3ExprCompare(0,pOne->pExpr->pRight, pTwo->pExpr->pRight,-1) )return;\n  /* If we reach this point, it means the two subterms can be combined */\n  if( (eOp & (eOp-1))!=0 ){\n    if( eOp & (WO_LT|WO_LE) ){\n      eOp = WO_LE;\n    }else{\n      assert( eOp & (WO_GT|WO_GE) );\n      eOp = WO_GE;\n    }\n  }\n  db = pWC->pWInfo->pParse->db;\n  pNew = sqlite3ExprDup(db, pOne->pExpr, 0);\n  if( pNew==0 ) return;\n  for(op=TK_EQ; eOp!=(WO_EQ<<(op-TK_EQ)); op++){ assert( op<TK_GE ); }\n  pNew->op = op;\n  idxNew = whereClauseInsert(pWC, pNew, TERM_VIRTUAL|TERM_DYNAMIC);\n  exprAnalyze(pSrc, pWC, idxNew);\n}\n\n#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)\n/*\n** Analyze a term that consists of two or more OR-connected\n** subterms.  So in:\n**\n**     ... WHERE  (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)\n**                          ^^^^^^^^^^^^^^^^^^^^\n**\n** This routine analyzes terms such as the middle term in the above example.\n** A WhereOrTerm object is computed and attached to the term under\n** analysis, regardless of the outcome of the analysis.  Hence:\n**\n**     WhereTerm.wtFlags   |=  TERM_ORINFO\n**     WhereTerm.u.pOrInfo  =  a dynamically allocated WhereOrTerm object\n**\n** The term being analyzed must have two or more of OR-connected subterms.\n** A single subterm might be a set of AND-connected sub-subterms.\n** Examples of terms under analysis:\n**\n**     (A)     t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5\n**     (B)     x=expr1 OR expr2=x OR x=expr3\n**     (C)     t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)\n**     (D)     x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')\n**     (E)     (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)\n**     (F)     x>A OR (x=A AND y>=B)\n**\n** CASE 1:\n**\n** If all subterms are of the form T.C=expr for some single column of C and\n** a single table T (as shown in example B above) then create a new virtual\n** term that is an equivalent IN expression.  In other words, if the term\n** being analyzed is:\n**\n**      x = expr1  OR  expr2 = x  OR  x = expr3\n**\n** then create a new virtual term like this:\n**\n**      x IN (expr1,expr2,expr3)\n**\n** CASE 2:\n**\n** If there are exactly two disjuncts and one side has x>A and the other side\n** has x=A (for the same x and A) then add a new virtual conjunct term to the\n** WHERE clause of the form \"x>=A\".  Example:\n**\n**      x>A OR (x=A AND y>B)    adds:    x>=A\n**\n** The added conjunct can sometimes be helpful in query planning.\n**\n** CASE 3:\n**\n** If all subterms are indexable by a single table T, then set\n**\n**     WhereTerm.eOperator              =  WO_OR\n**     WhereTerm.u.pOrInfo->indexable  |=  the cursor number for table T\n**\n** A subterm is \"indexable\" if it is of the form\n** \"T.C <op> <expr>\" where C is any column of table T and\n** <op> is one of \"=\", \"<\", \"<=\", \">\", \">=\", \"IS NULL\", or \"IN\".\n** A subterm is also indexable if it is an AND of two or more\n** subsubterms at least one of which is indexable.  Indexable AND\n** subterms have their eOperator set to WO_AND and they have\n** u.pAndInfo set to a dynamically allocated WhereAndTerm object.\n**\n** From another point of view, \"indexable\" means that the subterm could\n** potentially be used with an index if an appropriate index exists.\n** This analysis does not consider whether or not the index exists; that\n** is decided elsewhere.  This analysis only looks at whether subterms\n** appropriate for indexing exist.\n**\n** All examples A through E above satisfy case 3.  But if a term\n** also satisfies case 1 (such as B) we know that the optimizer will\n** always prefer case 1, so in that case we pretend that case 3 is not\n** satisfied.\n**\n** It might be the case that multiple tables are indexable.  For example,\n** (E) above is indexable on tables P, Q, and R.\n**\n** Terms that satisfy case 3 are candidates for lookup by using\n** separate indices to find rowids for each subterm and composing\n** the union of all rowids using a RowSet object.  This is similar\n** to \"bitmap indices\" in other database engines.\n**\n** OTHERWISE:\n**\n** If none of cases 1, 2, or 3 apply, then leave the eOperator set to\n** zero.  This term is not useful for search.\n*/\nstatic void exprAnalyzeOrTerm(\n  SrcList *pSrc,            /* the FROM clause */\n  WhereClause *pWC,         /* the complete WHERE clause */\n  int idxTerm               /* Index of the OR-term to be analyzed */\n){\n  WhereInfo *pWInfo = pWC->pWInfo;        /* WHERE clause processing context */\n  Parse *pParse = pWInfo->pParse;         /* Parser context */\n  sqlite3 *db = pParse->db;               /* Database connection */\n  WhereTerm *pTerm = &pWC->a[idxTerm];    /* The term to be analyzed */\n  Expr *pExpr = pTerm->pExpr;             /* The expression of the term */\n  int i;                                  /* Loop counters */\n  WhereClause *pOrWc;       /* Breakup of pTerm into subterms */\n  WhereTerm *pOrTerm;       /* A Sub-term within the pOrWc */\n  WhereOrInfo *pOrInfo;     /* Additional information associated with pTerm */\n  Bitmask chngToIN;         /* Tables that might satisfy case 1 */\n  Bitmask indexable;        /* Tables that are indexable, satisfying case 2 */\n\n  /*\n  ** Break the OR clause into its separate subterms.  The subterms are\n  ** stored in a WhereClause structure containing within the WhereOrInfo\n  ** object that is attached to the original OR clause term.\n  */\n  assert( (pTerm->wtFlags & (TERM_DYNAMIC|TERM_ORINFO|TERM_ANDINFO))==0 );\n  assert( pExpr->op==TK_OR );\n  pTerm->u.pOrInfo = pOrInfo = sqlite3DbMallocZero(db, sizeof(*pOrInfo));\n  if( pOrInfo==0 ) return;\n  pTerm->wtFlags |= TERM_ORINFO;\n  pOrWc = &pOrInfo->wc;\n  memset(pOrWc->aStatic, 0, sizeof(pOrWc->aStatic));\n  sqlite3WhereClauseInit(pOrWc, pWInfo);\n  sqlite3WhereSplit(pOrWc, pExpr, TK_OR);\n  sqlite3WhereExprAnalyze(pSrc, pOrWc);\n  if( db->mallocFailed ) return;\n  assert( pOrWc->nTerm>=2 );\n\n  /*\n  ** Compute the set of tables that might satisfy cases 1 or 3.\n  */\n  indexable = ~(Bitmask)0;\n  chngToIN = ~(Bitmask)0;\n  for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0 && indexable; i--, pOrTerm++){\n    if( (pOrTerm->eOperator & WO_SINGLE)==0 ){\n      WhereAndInfo *pAndInfo;\n      assert( (pOrTerm->wtFlags & (TERM_ANDINFO|TERM_ORINFO))==0 );\n      chngToIN = 0;\n      pAndInfo = sqlite3DbMallocRawNN(db, sizeof(*pAndInfo));\n      if( pAndInfo ){\n        WhereClause *pAndWC;\n        WhereTerm *pAndTerm;\n        int j;\n        Bitmask b = 0;\n        pOrTerm->u.pAndInfo = pAndInfo;\n        pOrTerm->wtFlags |= TERM_ANDINFO;\n        pOrTerm->eOperator = WO_AND;\n        pOrTerm->leftCursor = -1;\n        pAndWC = &pAndInfo->wc;\n        memset(pAndWC->aStatic, 0, sizeof(pAndWC->aStatic));\n        sqlite3WhereClauseInit(pAndWC, pWC->pWInfo);\n        sqlite3WhereSplit(pAndWC, pOrTerm->pExpr, TK_AND);\n        sqlite3WhereExprAnalyze(pSrc, pAndWC);\n        pAndWC->pOuter = pWC;\n        if( !db->mallocFailed ){\n          for(j=0, pAndTerm=pAndWC->a; j<pAndWC->nTerm; j++, pAndTerm++){\n            assert( pAndTerm->pExpr );\n            if( allowedOp(pAndTerm->pExpr->op)\n             || pAndTerm->eOperator==WO_AUX\n            ){\n              b |= sqlite3WhereGetMask(&pWInfo->sMaskSet, pAndTerm->leftCursor);\n            }\n          }\n        }\n        indexable &= b;\n      }\n    }else if( pOrTerm->wtFlags & TERM_COPIED ){\n      /* Skip this term for now.  We revisit it when we process the\n      ** corresponding TERM_VIRTUAL term */\n    }else{\n      Bitmask b;\n      b = sqlite3WhereGetMask(&pWInfo->sMaskSet, pOrTerm->leftCursor);\n      if( pOrTerm->wtFlags & TERM_VIRTUAL ){\n        WhereTerm *pOther = &pOrWc->a[pOrTerm->iParent];\n        b |= sqlite3WhereGetMask(&pWInfo->sMaskSet, pOther->leftCursor);\n      }\n      indexable &= b;\n      if( (pOrTerm->eOperator & WO_EQ)==0 ){\n        chngToIN = 0;\n      }else{\n        chngToIN &= b;\n      }\n    }\n  }\n\n  /*\n  ** Record the set of tables that satisfy case 3.  The set might be\n  ** empty.\n  */\n  pOrInfo->indexable = indexable;\n  pTerm->eOperator = WO_OR;\n  pTerm->leftCursor = -1;\n  if( indexable ){\n    pWC->hasOr = 1;\n  }\n\n  /* For a two-way OR, attempt to implementation case 2.\n  */\n  if( indexable && pOrWc->nTerm==2 ){\n    int iOne = 0;\n    WhereTerm *pOne;\n    while( (pOne = whereNthSubterm(&pOrWc->a[0],iOne++))!=0 ){\n      int iTwo = 0;\n      WhereTerm *pTwo;\n      while( (pTwo = whereNthSubterm(&pOrWc->a[1],iTwo++))!=0 ){\n        whereCombineDisjuncts(pSrc, pWC, pOne, pTwo);\n      }\n    }\n  }\n\n  /*\n  ** chngToIN holds a set of tables that *might* satisfy case 1.  But\n  ** we have to do some additional checking to see if case 1 really\n  ** is satisfied.\n  **\n  ** chngToIN will hold either 0, 1, or 2 bits.  The 0-bit case means\n  ** that there is no possibility of transforming the OR clause into an\n  ** IN operator because one or more terms in the OR clause contain\n  ** something other than == on a column in the single table.  The 1-bit\n  ** case means that every term of the OR clause is of the form\n  ** \"table.column=expr\" for some single table.  The one bit that is set\n  ** will correspond to the common table.  We still need to check to make\n  ** sure the same column is used on all terms.  The 2-bit case is when\n  ** the all terms are of the form \"table1.column=table2.column\".  It\n  ** might be possible to form an IN operator with either table1.column\n  ** or table2.column as the LHS if either is common to every term of\n  ** the OR clause.\n  **\n  ** Note that terms of the form \"table.column1=table.column2\" (the\n  ** same table on both sizes of the ==) cannot be optimized.\n  */\n  if( chngToIN ){\n    int okToChngToIN = 0;     /* True if the conversion to IN is valid */\n    int iColumn = -1;         /* Column index on lhs of IN operator */\n    int iCursor = -1;         /* Table cursor common to all terms */\n    int j = 0;                /* Loop counter */\n\n    /* Search for a table and column that appears on one side or the\n    ** other of the == operator in every subterm.  That table and column\n    ** will be recorded in iCursor and iColumn.  There might not be any\n    ** such table and column.  Set okToChngToIN if an appropriate table\n    ** and column is found but leave okToChngToIN false if not found.\n    */\n    for(j=0; j<2 && !okToChngToIN; j++){\n      Expr *pLeft = 0;\n      pOrTerm = pOrWc->a;\n      for(i=pOrWc->nTerm-1; i>=0; i--, pOrTerm++){\n        assert( pOrTerm->eOperator & WO_EQ );\n        pOrTerm->wtFlags &= ~TERM_OK;\n        if( pOrTerm->leftCursor==iCursor ){\n          /* This is the 2-bit case and we are on the second iteration and\n          ** current term is from the first iteration.  So skip this term. */\n          assert( j==1 );\n          continue;\n        }\n        if( (chngToIN & sqlite3WhereGetMask(&pWInfo->sMaskSet,\n                                            pOrTerm->leftCursor))==0 ){\n          /* This term must be of the form t1.a==t2.b where t2 is in the\n          ** chngToIN set but t1 is not.  This term will be either preceded\n          ** or followed by an inverted copy (t2.b==t1.a).  Skip this term\n          ** and use its inversion. */\n          testcase( pOrTerm->wtFlags & TERM_COPIED );\n          testcase( pOrTerm->wtFlags & TERM_VIRTUAL );\n          assert( pOrTerm->wtFlags & (TERM_COPIED|TERM_VIRTUAL) );\n          continue;\n        }\n        assert( (pOrTerm->eOperator & (WO_OR|WO_AND))==0 );\n        iColumn = pOrTerm->u.x.leftColumn;\n        iCursor = pOrTerm->leftCursor;\n        pLeft = pOrTerm->pExpr->pLeft;\n        break;\n      }\n      if( i<0 ){\n        /* No candidate table+column was found.  This can only occur\n        ** on the second iteration */\n        assert( j==1 );\n        assert( IsPowerOfTwo(chngToIN) );\n        assert( chngToIN==sqlite3WhereGetMask(&pWInfo->sMaskSet, iCursor) );\n        break;\n      }\n      testcase( j==1 );\n\n      /* We have found a candidate table and column.  Check to see if that\n      ** table and column is common to every term in the OR clause */\n      okToChngToIN = 1;\n      for(; i>=0 && okToChngToIN; i--, pOrTerm++){\n        assert( pOrTerm->eOperator & WO_EQ );\n        assert( (pOrTerm->eOperator & (WO_OR|WO_AND))==0 );\n        if( pOrTerm->leftCursor!=iCursor ){\n          pOrTerm->wtFlags &= ~TERM_OK;\n        }else if( pOrTerm->u.x.leftColumn!=iColumn || (iColumn==XN_EXPR\n               && sqlite3ExprCompare(pParse, pOrTerm->pExpr->pLeft, pLeft, -1)\n        )){\n          okToChngToIN = 0;\n        }else{\n          int affLeft, affRight;\n          /* If the right-hand side is also a column, then the affinities\n          ** of both right and left sides must be such that no type\n          ** conversions are required on the right.  (Ticket #2249)\n          */\n          affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);\n          affLeft = sqlite3ExprAffinity(pOrTerm->pExpr->pLeft);\n          if( affRight!=0 && affRight!=affLeft ){\n            okToChngToIN = 0;\n          }else{\n            pOrTerm->wtFlags |= TERM_OK;\n          }\n        }\n      }\n    }\n\n    /* At this point, okToChngToIN is true if original pTerm satisfies\n    ** case 1.  In that case, construct a new virtual term that is\n    ** pTerm converted into an IN operator.\n    */\n    if( okToChngToIN ){\n      Expr *pDup;            /* A transient duplicate expression */\n      ExprList *pList = 0;   /* The RHS of the IN operator */\n      Expr *pLeft = 0;       /* The LHS of the IN operator */\n      Expr *pNew;            /* The complete IN operator */\n\n      for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0; i--, pOrTerm++){\n        if( (pOrTerm->wtFlags & TERM_OK)==0 ) continue;\n        assert( pOrTerm->eOperator & WO_EQ );\n        assert( (pOrTerm->eOperator & (WO_OR|WO_AND))==0 );\n        assert( pOrTerm->leftCursor==iCursor );\n        assert( pOrTerm->u.x.leftColumn==iColumn );\n        pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);\n        pList = sqlite3ExprListAppend(pWInfo->pParse, pList, pDup);\n        pLeft = pOrTerm->pExpr->pLeft;\n      }\n      assert( pLeft!=0 );\n      pDup = sqlite3ExprDup(db, pLeft, 0);\n      pNew = sqlite3PExpr(pParse, TK_IN, pDup, 0);\n      if( pNew ){\n        int idxNew;\n        transferJoinMarkings(pNew, pExpr);\n        assert( ExprUseXList(pNew) );\n        pNew->x.pList = pList;\n        idxNew = whereClauseInsert(pWC, pNew, TERM_VIRTUAL|TERM_DYNAMIC);\n        testcase( idxNew==0 );\n        exprAnalyze(pSrc, pWC, idxNew);\n        /* pTerm = &pWC->a[idxTerm]; // would be needed if pTerm where reused */\n        markTermAsChild(pWC, idxNew, idxTerm);\n      }else{\n        sqlite3ExprListDelete(db, pList);\n      }\n    }\n  }\n}\n#endif /* !SQLITE_OMIT_OR_OPTIMIZATION && !SQLITE_OMIT_SUBQUERY */\n\n/*\n** We already know that pExpr is a binary operator where both operands are\n** column references.  This routine checks to see if pExpr is an equivalence\n** relation:\n**   1.  The SQLITE_Transitive optimization must be enabled\n**   2.  Must be either an == or an IS operator\n**   3.  Not originating in the ON clause of an OUTER JOIN\n**   4.  The operator is not IS or else the query does not contain RIGHT JOIN\n**   5.  The affinities of A and B must be compatible\n**   6a. Both operands use the same collating sequence OR\n**   6b. The overall collating sequence is BINARY\n** If this routine returns TRUE, that means that the RHS can be substituted\n** for the LHS anyplace else in the WHERE clause where the LHS column occurs.\n** This is an optimization.  No harm comes from returning 0.  But if 1 is\n** returned when it should not be, then incorrect answers might result.\n*/\nstatic int termIsEquivalence(Parse *pParse, Expr *pExpr, SrcList *pSrc){\n  char aff1, aff2;\n  CollSeq *pColl;\n  if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0;  /* (1) */\n  if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0;                 /* (2) */\n  if( ExprHasProperty(pExpr, EP_OuterON) ) return 0;                   /* (3) */\n  assert( pSrc!=0 );\n  if( pExpr->op==TK_IS\n   && pSrc->nSrc>=2\n   && (pSrc->a[0].fg.jointype & JT_LTORJ)!=0\n  ){\n    return 0;                                                          /* (4) */\n  }\n  aff1 = sqlite3ExprAffinity(pExpr->pLeft);\n  aff2 = sqlite3ExprAffinity(pExpr->pRight);\n  if( aff1!=aff2\n   && (!sqlite3IsNumericAffinity(aff1) || !sqlite3IsNumericAffinity(aff2))\n  ){\n    return 0;                                                          /* (5) */\n  }\n  pColl = sqlite3ExprCompareCollSeq(pParse, pExpr);\n  if( !sqlite3IsBinary(pColl)\n   && !sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight)\n  ){\n    return 0;                                                          /* (6) */\n  }\n  return 1;\n}\n\n/*\n** Recursively walk the expressions of a SELECT statement and generate\n** a bitmask indicating which tables are used in that expression\n** tree.\n*/\nstatic Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){\n  Bitmask mask = 0;\n  while( pS ){\n    SrcList *pSrc = pS->pSrc;\n    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pEList);\n    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pGroupBy);\n    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pOrderBy);\n    mask |= sqlite3WhereExprUsage(pMaskSet, pS->pWhere);\n    mask |= sqlite3WhereExprUsage(pMaskSet, pS->pHaving);\n    if( ALWAYS(pSrc!=0) ){\n      int i;\n      for(i=0; i<pSrc->nSrc; i++){\n        if( pSrc->a[i].fg.isSubquery ){\n          mask |= exprSelectUsage(pMaskSet, pSrc->a[i].u4.pSubq->pSelect);\n        }\n        if( pSrc->a[i].fg.isUsing==0 ){\n          mask |= sqlite3WhereExprUsage(pMaskSet, pSrc->a[i].u3.pOn);\n        }\n        if( pSrc->a[i].fg.isTabFunc ){\n          mask |= sqlite3WhereExprListUsage(pMaskSet, pSrc->a[i].u1.pFuncArg);\n        }\n      }\n    }\n    pS = pS->pPrior;\n  }\n  return mask;\n}\n\n/*\n** Expression pExpr is one operand of a comparison operator that might\n** be useful for indexing.  This routine checks to see if pExpr appears\n** in any index.  Return TRUE (1) if pExpr is an indexed term and return\n** FALSE (0) if not.  If TRUE is returned, also set aiCurCol[0] to the cursor\n** number of the table that is indexed and aiCurCol[1] to the column number\n** of the column that is indexed, or XN_EXPR (-2) if an expression is being\n** indexed.\n**\n** If pExpr is a TK_COLUMN column reference, then this routine always returns\n** true even if that particular column is not indexed, because the column\n** might be added to an automatic index later.\n*/\nstatic SQLITE_NOINLINE int exprMightBeIndexed2(\n  SrcList *pFrom,        /* The FROM clause */\n  int *aiCurCol,         /* Write the referenced table cursor and column here */\n  Expr *pExpr,           /* An operand of a comparison operator */\n  int j                  /* Start looking with the j-th pFrom entry */\n){\n  Index *pIdx;\n  int i;\n  int iCur;\n  do{\n    iCur = pFrom->a[j].iCursor;\n    for(pIdx=pFrom->a[j].pSTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      if( pIdx->aColExpr==0 ) continue;\n      for(i=0; i<pIdx->nKeyCol; i++){\n        if( pIdx->aiColumn[i]!=XN_EXPR ) continue;\n        assert( pIdx->bHasExpr );\n        if( sqlite3ExprCompareSkip(pExpr,pIdx->aColExpr->a[i].pExpr,iCur)==0\n         && !sqlite3ExprIsConstant(0,pIdx->aColExpr->a[i].pExpr)\n        ){\n          aiCurCol[0] = iCur;\n          aiCurCol[1] = XN_EXPR;\n          return 1;\n        }\n      }\n    }\n  }while( ++j < pFrom->nSrc );\n  return 0;\n}\nstatic int exprMightBeIndexed(\n  SrcList *pFrom,        /* The FROM clause */\n  int *aiCurCol,         /* Write the referenced table cursor & column here */\n  Expr *pExpr,           /* An operand of a comparison operator */\n  int op                 /* The specific comparison operator */\n){\n  int i;\n\n  /* If this expression is a vector to the left or right of a\n  ** inequality constraint (>, <, >= or <=), perform the processing\n  ** on the first element of the vector.  */\n  assert( TK_GT+1==TK_LE && TK_GT+2==TK_LT && TK_GT+3==TK_GE );\n  assert( TK_IS<TK_GE && TK_ISNULL<TK_GE && TK_IN<TK_GE );\n  assert( op<=TK_GE );\n  if( pExpr->op==TK_VECTOR && (op>=TK_GT && ALWAYS(op<=TK_GE)) ){\n    assert( ExprUseXList(pExpr) );\n    pExpr = pExpr->x.pList->a[0].pExpr;\n  }\n\n  if( pExpr->op==TK_COLUMN ){\n    aiCurCol[0] = pExpr->iTable;\n    aiCurCol[1] = pExpr->iColumn;\n    return 1;\n  }\n\n  for(i=0; i<pFrom->nSrc; i++){\n    Index *pIdx;\n    for(pIdx=pFrom->a[i].pSTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      if( pIdx->aColExpr ){\n        return exprMightBeIndexed2(pFrom,aiCurCol,pExpr,i);\n      }\n    }\n  }\n  return 0;\n}\n\n\n/*\n** The input to this routine is an WhereTerm structure with only the\n** \"pExpr\" field filled in.  The job of this routine is to analyze the\n** subexpression and populate all the other fields of the WhereTerm\n** structure.\n**\n** If the expression is of the form \"<expr> <op> X\" it gets commuted\n** to the standard form of \"X <op> <expr>\".\n**\n** If the expression is of the form \"X <op> Y\" where both X and Y are\n** columns, then the original expression is unchanged and a new virtual\n** term of the form \"Y <op> X\" is added to the WHERE clause and\n** analyzed separately.  The original term is marked with TERM_COPIED\n** and the new term is marked with TERM_DYNAMIC (because it's pExpr\n** needs to be freed with the WhereClause) and TERM_VIRTUAL (because it\n** is a commuted copy of a prior term.)  The original term has nChild=1\n** and the copy has idxParent set to the index of the original term.\n*/\nstatic void exprAnalyze(\n  SrcList *pSrc,            /* the FROM clause */\n  WhereClause *pWC,         /* the WHERE clause */\n  int idxTerm               /* Index of the term to be analyzed */\n){\n  WhereInfo *pWInfo = pWC->pWInfo; /* WHERE clause processing context */\n  WhereTerm *pTerm;                /* The term to be analyzed */\n  WhereMaskSet *pMaskSet;          /* Set of table index masks */\n  Expr *pExpr;                     /* The expression to be analyzed */\n  Bitmask prereqLeft;              /* Prerequisites of the pExpr->pLeft */\n  Bitmask prereqAll;               /* Prerequisites of pExpr */\n  Bitmask extraRight = 0;          /* Extra dependencies on LEFT JOIN */\n  Expr *pStr1 = 0;                 /* RHS of LIKE/GLOB operator */\n  int isComplete = 0;              /* RHS of LIKE/GLOB ends with wildcard */\n  int noCase = 0;                  /* uppercase equivalent to lowercase */\n  int op;                          /* Top-level operator.  pExpr->op */\n  Parse *pParse = pWInfo->pParse;  /* Parsing context */\n  sqlite3 *db = pParse->db;        /* Database connection */\n  unsigned char eOp2 = 0;          /* op2 value for LIKE/REGEXP/GLOB */\n  int nLeft;                       /* Number of elements on left side vector */\n\n  if( db->mallocFailed ){\n    return;\n  }\n  assert( pWC->nTerm > idxTerm );\n  pTerm = &pWC->a[idxTerm];\n#ifdef SQLITE_DEBUG\n  pTerm->iTerm = idxTerm;\n#endif\n  pMaskSet = &pWInfo->sMaskSet;\n  pExpr = pTerm->pExpr;\n  assert( pExpr!=0 ); /* Because malloc() has not failed */\n  assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE );\n  pMaskSet->bVarSelect = 0;\n  prereqLeft = sqlite3WhereExprUsage(pMaskSet, pExpr->pLeft);\n  op = pExpr->op;\n  if( op==TK_IN ){\n    assert( pExpr->pRight==0 );\n    if( sqlite3ExprCheckIN(pParse, pExpr) ) return;\n    if( ExprUseXSelect(pExpr) ){\n      pTerm->prereqRight = exprSelectUsage(pMaskSet, pExpr->x.pSelect);\n    }else{\n      pTerm->prereqRight = sqlite3WhereExprListUsage(pMaskSet, pExpr->x.pList);\n    }\n    prereqAll = prereqLeft | pTerm->prereqRight;\n  }else{\n    pTerm->prereqRight = sqlite3WhereExprUsage(pMaskSet, pExpr->pRight);\n    if( pExpr->pLeft==0\n     || ExprHasProperty(pExpr, EP_xIsSelect|EP_IfNullRow)\n     || pExpr->x.pList!=0\n    ){\n      prereqAll = sqlite3WhereExprUsageNN(pMaskSet, pExpr);\n    }else{\n      prereqAll = prereqLeft | pTerm->prereqRight;\n    }\n  }\n  if( pMaskSet->bVarSelect ) pTerm->wtFlags |= TERM_VARSELECT;\n\n#ifdef SQLITE_DEBUG\n  if( prereqAll!=sqlite3WhereExprUsageNN(pMaskSet, pExpr) ){\n    printf(\"\\n*** Incorrect prereqAll computed for:\\n\");\n    sqlite3TreeViewExpr(0,pExpr,0);\n    assert( 0 );\n  }\n#endif\n\n  if( ExprHasProperty(pExpr, EP_OuterON|EP_InnerON) ){\n    Bitmask x = sqlite3WhereGetMask(pMaskSet, pExpr->w.iJoin);\n    if( ExprHasProperty(pExpr, EP_OuterON) ){\n      prereqAll |= x;\n      extraRight = x-1;  /* ON clause terms may not be used with an index\n                         ** on left table of a LEFT JOIN.  Ticket #3015 */\n    }else if( (prereqAll>>1)>=x ){\n      ExprClearProperty(pExpr, EP_InnerON);\n    }\n  }\n  pTerm->prereqAll = prereqAll;\n  pTerm->leftCursor = -1;\n  pTerm->iParent = -1;\n  pTerm->eOperator = 0;\n  if( allowedOp(op) ){\n    int aiCurCol[2];\n    Expr *pLeft = sqlite3ExprSkipCollate(pExpr->pLeft);\n    Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);\n    u16 opMask = (pTerm->prereqRight & prereqLeft)==0 ? WO_ALL : WO_EQUIV;\n\n    if( pTerm->u.x.iField>0 ){\n      assert( op==TK_IN );\n      assert( pLeft->op==TK_VECTOR );\n      assert( ExprUseXList(pLeft) );\n      pLeft = pLeft->x.pList->a[pTerm->u.x.iField-1].pExpr;\n    }\n\n    if( exprMightBeIndexed(pSrc, aiCurCol, pLeft, op) ){\n      pTerm->leftCursor = aiCurCol[0];\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      pTerm->u.x.leftColumn = aiCurCol[1];\n      pTerm->eOperator = operatorMask(op) & opMask;\n    }\n    if( op==TK_IS ) pTerm->wtFlags |= TERM_IS;\n    if( pRight\n     && exprMightBeIndexed(pSrc, aiCurCol, pRight, op)\n     && !ExprHasProperty(pRight, EP_FixedCol)\n    ){\n      WhereTerm *pNew;\n      Expr *pDup;\n      u16 eExtraOp = 0;        /* Extra bits for pNew->eOperator */\n      assert( pTerm->u.x.iField==0 );\n      if( pTerm->leftCursor>=0 ){\n        int idxNew;\n        pDup = sqlite3ExprDup(db, pExpr, 0);\n        if( db->mallocFailed ){\n          sqlite3ExprDelete(db, pDup);\n          return;\n        }\n        idxNew = whereClauseInsert(pWC, pDup, TERM_VIRTUAL|TERM_DYNAMIC);\n        if( idxNew==0 ) return;\n        pNew = &pWC->a[idxNew];\n        markTermAsChild(pWC, idxNew, idxTerm);\n        if( op==TK_IS ) pNew->wtFlags |= TERM_IS;\n        pTerm = &pWC->a[idxTerm];\n        pTerm->wtFlags |= TERM_COPIED;\n        assert( pWInfo->pTabList!=0 );\n        if( termIsEquivalence(pParse, pDup, pWInfo->pTabList) ){\n          pTerm->eOperator |= WO_EQUIV;\n          eExtraOp = WO_EQUIV;\n        }\n      }else{\n        pDup = pExpr;\n        pNew = pTerm;\n      }\n      pNew->wtFlags |= exprCommute(pParse, pDup);\n      pNew->leftCursor = aiCurCol[0];\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      pNew->u.x.leftColumn = aiCurCol[1];\n      testcase( (prereqLeft | extraRight) != prereqLeft );\n      pNew->prereqRight = prereqLeft | extraRight;\n      pNew->prereqAll = prereqAll;\n      pNew->eOperator = (operatorMask(pDup->op) + eExtraOp) & opMask;\n    }else\n    if( op==TK_ISNULL\n     && !ExprHasProperty(pExpr,EP_OuterON)\n     && 0==sqlite3ExprCanBeNull(pLeft)\n    ){\n      assert( !ExprHasProperty(pExpr, EP_IntValue) );\n      pExpr->op = TK_TRUEFALSE;  /* See tag-20230504-1 */\n      pExpr->u.zToken = \"false\";\n      ExprSetProperty(pExpr, EP_IsFalse);\n      pTerm->prereqAll = 0;\n      pTerm->eOperator = 0;\n    }\n  }\n\n#ifndef SQLITE_OMIT_BETWEEN_OPTIMIZATION\n  /* If a term is the BETWEEN operator, create two new virtual terms\n  ** that define the range that the BETWEEN implements.  For example:\n  **\n  **      a BETWEEN b AND c\n  **\n  ** is converted into:\n  **\n  **      (a BETWEEN b AND c) AND (a>=b) AND (a<=c)\n  **\n  ** The two new terms are added onto the end of the WhereClause object.\n  ** The new terms are \"dynamic\" and are children of the original BETWEEN\n  ** term.  That means that if the BETWEEN term is coded, the children are\n  ** skipped.  Or, if the children are satisfied by an index, the original\n  ** BETWEEN term is skipped.\n  */\n  else if( pExpr->op==TK_BETWEEN && pWC->op==TK_AND ){\n    ExprList *pList;\n    int i;\n    static const u8 ops[] = {TK_GE, TK_LE};\n    assert( ExprUseXList(pExpr) );\n    pList = pExpr->x.pList;\n    assert( pList!=0 );\n    assert( pList->nExpr==2 );\n    for(i=0; i<2; i++){\n      Expr *pNewExpr;\n      int idxNew;\n      pNewExpr = sqlite3PExpr(pParse, ops[i],\n                             sqlite3ExprDup(db, pExpr->pLeft, 0),\n                             sqlite3ExprDup(db, pList->a[i].pExpr, 0));\n      transferJoinMarkings(pNewExpr, pExpr);\n      idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);\n      testcase( idxNew==0 );\n      exprAnalyze(pSrc, pWC, idxNew);\n      pTerm = &pWC->a[idxTerm];\n      markTermAsChild(pWC, idxNew, idxTerm);\n    }\n  }\n#endif /* SQLITE_OMIT_BETWEEN_OPTIMIZATION */\n\n#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)\n  /* Analyze a term that is composed of two or more subterms connected by\n  ** an OR operator.\n  */\n  else if( pExpr->op==TK_OR ){\n    assert( pWC->op==TK_AND );\n    exprAnalyzeOrTerm(pSrc, pWC, idxTerm);\n    pTerm = &pWC->a[idxTerm];\n  }\n#endif /* SQLITE_OMIT_OR_OPTIMIZATION */\n  /* The form \"x IS NOT NULL\" can sometimes be evaluated more efficiently\n  ** as \"x>NULL\" if x is not an INTEGER PRIMARY KEY.  So construct a\n  ** virtual term of that form.\n  **\n  ** The virtual term must be tagged with TERM_VNULL.\n  */\n  else if( pExpr->op==TK_NOTNULL ){\n    if( pExpr->pLeft->op==TK_COLUMN\n     && pExpr->pLeft->iColumn>=0\n     && !ExprHasProperty(pExpr, EP_OuterON)\n    ){\n      Expr *pNewExpr;\n      Expr *pLeft = pExpr->pLeft;\n      int idxNew;\n      WhereTerm *pNewTerm;\n\n      pNewExpr = sqlite3PExpr(pParse, TK_GT,\n                              sqlite3ExprDup(db, pLeft, 0),\n                              sqlite3ExprAlloc(db, TK_NULL, 0, 0));\n\n      idxNew = whereClauseInsert(pWC, pNewExpr,\n                                TERM_VIRTUAL|TERM_DYNAMIC|TERM_VNULL);\n      if( idxNew ){\n        pNewTerm = &pWC->a[idxNew];\n        pNewTerm->prereqRight = 0;\n        pNewTerm->leftCursor = pLeft->iTable;\n        pNewTerm->u.x.leftColumn = pLeft->iColumn;\n        pNewTerm->eOperator = WO_GT;\n        markTermAsChild(pWC, idxNew, idxTerm);\n        pTerm = &pWC->a[idxTerm];\n        pTerm->wtFlags |= TERM_COPIED;\n        pNewTerm->prereqAll = pTerm->prereqAll;\n      }\n    }\n  }\n\n\n#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION\n  /* Add constraints to reduce the search space on a LIKE or GLOB\n  ** operator.\n  **\n  ** A like pattern of the form \"x LIKE 'aBc%'\" is changed into constraints\n  **\n  **          x>='ABC' AND x<'abd' AND x LIKE 'aBc%'\n  **\n  ** The last character of the prefix \"abc\" is incremented to form the\n  ** termination condition \"abd\".  If case is not significant (the default\n  ** for LIKE) then the lower-bound is made all uppercase and the upper-\n  ** bound is made all lowercase so that the bounds also work when comparing\n  ** BLOBs.\n  */\n  else if( pExpr->op==TK_FUNCTION\n   && pWC->op==TK_AND\n   && isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)\n  ){\n    Expr *pLeft;       /* LHS of LIKE/GLOB operator */\n    Expr *pStr2;       /* Copy of pStr1 - RHS of LIKE/GLOB operator */\n    Expr *pNewExpr1;\n    Expr *pNewExpr2;\n    int idxNew1;\n    int idxNew2;\n    const char *zCollSeqName;     /* Name of collating sequence */\n    const u16 wtFlags = TERM_LIKEOPT | TERM_VIRTUAL | TERM_DYNAMIC;\n\n    assert( ExprUseXList(pExpr) );\n    pLeft = pExpr->x.pList->a[1].pExpr;\n    pStr2 = sqlite3ExprDup(db, pStr1, 0);\n    assert( pStr1==0 || !ExprHasProperty(pStr1, EP_IntValue) );\n    assert( pStr2==0 || !ExprHasProperty(pStr2, EP_IntValue) );\n\n\n    /* Convert the lower bound to upper-case and the upper bound to\n    ** lower-case (upper-case is less than lower-case in ASCII) so that\n    ** the range constraints also work for BLOBs\n    */\n    if( noCase && !pParse->db->mallocFailed ){\n      int i;\n      char c;\n      pTerm->wtFlags |= TERM_LIKE;\n      for(i=0; (c = pStr1->u.zToken[i])!=0; i++){\n        pStr1->u.zToken[i] = sqlite3Toupper(c);\n        pStr2->u.zToken[i] = sqlite3Tolower(c);\n      }\n    }\n\n    if( !db->mallocFailed ){\n      u8 *pC;       /* Last character before the first wildcard */\n      pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];\n      if( noCase ){\n        /* The point is to increment the last character before the first\n        ** wildcard.  But if we increment '@', that will push it into the\n        ** alphabetic range where case conversions will mess up the\n        ** inequality.  To avoid this, make sure to also run the full\n        ** LIKE on all candidate expressions by clearing the isComplete flag\n        */\n        if( *pC=='A'-1 ) isComplete = 0;\n        *pC = sqlite3UpperToLower[*pC];\n      }\n\n      /* Increment the value of the last utf8 character in the prefix. */\n      while( *pC==0xBF && pC>(u8*)pStr2->u.zToken ){\n        *pC = 0x80;\n        pC--;\n      }\n      assert( *pC!=0xFF );        /* isLikeOrGlob() guarantees this */\n      (*pC)++;\n    }\n    zCollSeqName = noCase ? \"NOCASE\" : sqlite3StrBINARY;\n    pNewExpr1 = sqlite3ExprDup(db, pLeft, 0);\n    pNewExpr1 = sqlite3PExpr(pParse, TK_GE,\n           sqlite3ExprAddCollateString(pParse,pNewExpr1,zCollSeqName),\n           pStr1);\n    transferJoinMarkings(pNewExpr1, pExpr);\n    idxNew1 = whereClauseInsert(pWC, pNewExpr1, wtFlags);\n    testcase( idxNew1==0 );\n    pNewExpr2 = sqlite3ExprDup(db, pLeft, 0);\n    pNewExpr2 = sqlite3PExpr(pParse, TK_LT,\n           sqlite3ExprAddCollateString(pParse,pNewExpr2,zCollSeqName),\n           pStr2);\n    transferJoinMarkings(pNewExpr2, pExpr);\n    idxNew2 = whereClauseInsert(pWC, pNewExpr2, wtFlags);\n    testcase( idxNew2==0 );\n    exprAnalyze(pSrc, pWC, idxNew1);\n    exprAnalyze(pSrc, pWC, idxNew2);\n    pTerm = &pWC->a[idxTerm];\n    if( isComplete ){\n      markTermAsChild(pWC, idxNew1, idxTerm);\n      markTermAsChild(pWC, idxNew2, idxTerm);\n    }\n  }\n#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */\n\n  /* If there is a vector == or IS term - e.g. \"(a, b) == (?, ?)\" - create\n  ** new terms for each component comparison - \"a = ?\" and \"b = ?\".  The\n  ** new terms completely replace the original vector comparison, which is\n  ** no longer used.\n  **\n  ** This is only required if at least one side of the comparison operation\n  ** is not a sub-select.\n  **\n  ** tag-20220128a\n  */\n  if( (pExpr->op==TK_EQ || pExpr->op==TK_IS)\n   && (nLeft = sqlite3ExprVectorSize(pExpr->pLeft))>1\n   && sqlite3ExprVectorSize(pExpr->pRight)==nLeft\n   && ( (pExpr->pLeft->flags & EP_xIsSelect)==0\n     || (pExpr->pRight->flags & EP_xIsSelect)==0)\n   && pWC->op==TK_AND\n  ){\n    int i;\n    for(i=0; i<nLeft; i++){\n      int idxNew;\n      Expr *pNew;\n      Expr *pLeft = sqlite3ExprForVectorField(pParse, pExpr->pLeft, i, nLeft);\n      Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i, nLeft);\n\n      pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight);\n      transferJoinMarkings(pNew, pExpr);\n      idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC|TERM_SLICE);\n      exprAnalyze(pSrc, pWC, idxNew);\n    }\n    pTerm = &pWC->a[idxTerm];\n    pTerm->wtFlags |= TERM_CODED|TERM_VIRTUAL;  /* Disable the original */\n    pTerm->eOperator = WO_ROWVAL;\n  }\n\n  /* If there is a vector IN term - e.g. \"(a, b) IN (SELECT ...)\" - create\n  ** a virtual term for each vector component. The expression object\n  ** used by each such virtual term is pExpr (the full vector IN(...)\n  ** expression). The WhereTerm.u.x.iField variable identifies the index within\n  ** the vector on the LHS that the virtual term represents.\n  **\n  ** This only works if the RHS is a simple SELECT (not a compound) that does\n  ** not use window functions.\n  */\n  else if( pExpr->op==TK_IN\n   && pTerm->u.x.iField==0\n   && pExpr->pLeft->op==TK_VECTOR\n   && ALWAYS( ExprUseXSelect(pExpr) )\n   && (pExpr->x.pSelect->pPrior==0 || (pExpr->x.pSelect->selFlags & SF_Values))\n#ifndef SQLITE_OMIT_WINDOWFUNC\n   && pExpr->x.pSelect->pWin==0\n#endif\n   && pWC->op==TK_AND\n  ){\n    int i;\n    for(i=0; i<sqlite3ExprVectorSize(pExpr->pLeft); i++){\n      int idxNew;\n      idxNew = whereClauseInsert(pWC, pExpr, TERM_VIRTUAL|TERM_SLICE);\n      pWC->a[idxNew].u.x.iField = i+1;\n      exprAnalyze(pSrc, pWC, idxNew);\n      markTermAsChild(pWC, idxNew, idxTerm);\n    }\n  }\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  /* Add a WO_AUX auxiliary term to the constraint set if the\n  ** current expression is of the form \"column OP expr\" where OP\n  ** is an operator that gets passed into virtual tables but which is\n  ** not normally optimized for ordinary tables.  In other words, OP\n  ** is one of MATCH, LIKE, GLOB, REGEXP, !=, IS, IS NOT, or NOT NULL.\n  ** This information is used by the xBestIndex methods of\n  ** virtual tables.  The native query optimizer does not attempt\n  ** to do anything with MATCH functions.\n  */\n  else if( pWC->op==TK_AND ){\n    Expr *pRight = 0, *pLeft = 0;\n    int res = isAuxiliaryVtabOperator(db, pExpr, &eOp2, &pLeft, &pRight);\n    while( res-- > 0 ){\n      int idxNew;\n      WhereTerm *pNewTerm;\n      Bitmask prereqColumn, prereqExpr;\n\n      prereqExpr = sqlite3WhereExprUsage(pMaskSet, pRight);\n      prereqColumn = sqlite3WhereExprUsage(pMaskSet, pLeft);\n      if( (prereqExpr & prereqColumn)==0 ){\n        Expr *pNewExpr;\n        pNewExpr = sqlite3PExpr(pParse, TK_MATCH,\n            0, sqlite3ExprDup(db, pRight, 0));\n        if( ExprHasProperty(pExpr, EP_OuterON) && pNewExpr ){\n          ExprSetProperty(pNewExpr, EP_OuterON);\n          pNewExpr->w.iJoin = pExpr->w.iJoin;\n        }\n        idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);\n        testcase( idxNew==0 );\n        pNewTerm = &pWC->a[idxNew];\n        pNewTerm->prereqRight = prereqExpr | extraRight;\n        pNewTerm->leftCursor = pLeft->iTable;\n        pNewTerm->u.x.leftColumn = pLeft->iColumn;\n        pNewTerm->eOperator = WO_AUX;\n        pNewTerm->eMatchOp = eOp2;\n        markTermAsChild(pWC, idxNew, idxTerm);\n        pTerm = &pWC->a[idxTerm];\n        pTerm->wtFlags |= TERM_COPIED;\n        pNewTerm->prereqAll = pTerm->prereqAll;\n      }\n      SWAP(Expr*, pLeft, pRight);\n    }\n  }\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n  /* Prevent ON clause terms of a LEFT JOIN from being used to drive\n  ** an index for tables to the left of the join.\n  */\n  testcase( pTerm!=&pWC->a[idxTerm] );\n  pTerm = &pWC->a[idxTerm];\n  pTerm->prereqRight |= extraRight;\n}\n\n/***************************************************************************\n** Routines with file scope above.  Interface to the rest of the where.c\n** subsystem follows.\n***************************************************************************/\n\n/*\n** This routine identifies subexpressions in the WHERE clause where\n** each subexpression is separated by the AND operator or some other\n** operator specified in the op parameter.  The WhereClause structure\n** is filled with pointers to subexpressions.  For example:\n**\n**    WHERE  a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)\n**           \\________/     \\_______________/     \\________________/\n**            slot[0]            slot[1]               slot[2]\n**\n** The original WHERE clause in pExpr is unaltered.  All this routine\n** does is make slot[] entries point to substructure within pExpr.\n**\n** In the previous sentence and in the diagram, \"slot[]\" refers to\n** the WhereClause.a[] array.  The slot[] array grows as needed to contain\n** all terms of the WHERE clause.\n*/\nSQLITE_PRIVATE void sqlite3WhereSplit(WhereClause *pWC, Expr *pExpr, u8 op){\n  Expr *pE2 = sqlite3ExprSkipCollateAndLikely(pExpr);\n  pWC->op = op;\n  assert( pE2!=0 || pExpr==0 );\n  if( pE2==0 ) return;\n  if( pE2->op!=op ){\n    whereClauseInsert(pWC, pExpr, 0);\n  }else{\n    sqlite3WhereSplit(pWC, pE2->pLeft, op);\n    sqlite3WhereSplit(pWC, pE2->pRight, op);\n  }\n}\n\n/*\n** Add either a LIMIT (if eMatchOp==SQLITE_INDEX_CONSTRAINT_LIMIT) or\n** OFFSET (if eMatchOp==SQLITE_INDEX_CONSTRAINT_OFFSET) term to the\n** where-clause passed as the first argument. The value for the term\n** is found in register iReg.\n**\n** In the common case where the value is a simple integer\n** (example: \"LIMIT 5 OFFSET 10\") then the expression codes as a\n** TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value().\n** If not, then it codes as a TK_REGISTER expression.\n*/\nstatic void whereAddLimitExpr(\n  WhereClause *pWC,   /* Add the constraint to this WHERE clause */\n  int iReg,           /* Register that will hold value of the limit/offset */\n  Expr *pExpr,        /* Expression that defines the limit/offset */\n  int iCsr,           /* Cursor to which the constraint applies */\n  int eMatchOp        /* SQLITE_INDEX_CONSTRAINT_LIMIT or _OFFSET */\n){\n  Parse *pParse = pWC->pWInfo->pParse;\n  sqlite3 *db = pParse->db;\n  Expr *pNew;\n  int iVal = 0;\n\n  if( sqlite3ExprIsInteger(pExpr, &iVal, pParse) && iVal>=0 ){\n    Expr *pVal = sqlite3Expr(db, TK_INTEGER, 0);\n    if( pVal==0 ) return;\n    ExprSetProperty(pVal, EP_IntValue);\n    pVal->u.iValue = iVal;\n    pNew = sqlite3PExpr(pParse, TK_MATCH, 0, pVal);\n  }else{\n    Expr *pVal = sqlite3Expr(db, TK_REGISTER, 0);\n    if( pVal==0 ) return;\n    pVal->iTable = iReg;\n    pNew = sqlite3PExpr(pParse, TK_MATCH, 0, pVal);\n  }\n  if( pNew ){\n    WhereTerm *pTerm;\n    int idx;\n    idx = whereClauseInsert(pWC, pNew, TERM_DYNAMIC|TERM_VIRTUAL);\n    pTerm = &pWC->a[idx];\n    pTerm->leftCursor = iCsr;\n    pTerm->eOperator = WO_AUX;\n    pTerm->eMatchOp = eMatchOp;\n  }\n}\n\n/*\n** Possibly add terms corresponding to the LIMIT and OFFSET clauses of the\n** SELECT statement passed as the second argument. These terms are only\n** added if:\n**\n**   1. The SELECT statement has a LIMIT clause, and\n**   2. The SELECT statement is not an aggregate or DISTINCT query, and\n**   3. The SELECT statement has exactly one object in its FROM clause, and\n**      that object is a virtual table, and\n**   4. There are no terms in the WHERE clause that will not be passed\n**      to the virtual table xBestIndex method.\n**   5. The ORDER BY clause, if any, will be made available to the xBestIndex\n**      method.\n**\n** LIMIT and OFFSET terms are ignored by most of the planner code. They\n** exist only so that they may be passed to the xBestIndex method of the\n** single virtual table in the FROM clause of the SELECT.\n*/\nSQLITE_PRIVATE void SQLITE_NOINLINE sqlite3WhereAddLimit(WhereClause *pWC, Select *p){\n  assert( p!=0 && p->pLimit!=0 );                 /* 1 -- checked by caller */\n  if( p->pGroupBy==0\n   && (p->selFlags & (SF_Distinct|SF_Aggregate))==0             /* 2 */\n   && (p->pSrc->nSrc==1 && IsVirtual(p->pSrc->a[0].pSTab))      /* 3 */\n  ){\n    ExprList *pOrderBy = p->pOrderBy;\n    int iCsr = p->pSrc->a[0].iCursor;\n    int ii;\n\n    /* Check condition (4). Return early if it is not met. */\n    for(ii=0; ii<pWC->nTerm; ii++){\n      if( pWC->a[ii].wtFlags & TERM_CODED ){\n        /* This term is a vector operation that has been decomposed into\n        ** other, subsequent terms.  It can be ignored. See tag-20220128a */\n        assert( pWC->a[ii].wtFlags & TERM_VIRTUAL );\n        assert( pWC->a[ii].eOperator==WO_ROWVAL );\n        continue;\n      }\n      if( pWC->a[ii].nChild ){\n        /* If this term has child terms, then they are also part of the\n        ** pWC->a[] array. So this term can be ignored, as a LIMIT clause\n        ** will only be added if each of the child terms passes the\n        ** (leftCursor==iCsr) test below.  */\n        continue;\n      }\n      if( pWC->a[ii].leftCursor==iCsr && pWC->a[ii].prereqRight==0 ) continue;\n\n      /* If this term has a parent with exactly one child, and the parent will\n      ** be passed through to xBestIndex, then this term can be ignored.  */\n      if( pWC->a[ii].iParent>=0 ){\n        WhereTerm *pParent = &pWC->a[ pWC->a[ii].iParent ];\n        if( pParent->leftCursor==iCsr\n         && pParent->prereqRight==0\n         && pParent->nChild==1\n        ){\n          continue;\n        }\n      }\n\n      /* This term will not be passed through. Do not add a LIMIT clause. */\n      return;\n    }\n\n    /* Check condition (5). Return early if it is not met. */\n    if( pOrderBy ){\n      for(ii=0; ii<pOrderBy->nExpr; ii++){\n        Expr *pExpr = pOrderBy->a[ii].pExpr;\n        if( pExpr->op!=TK_COLUMN ) return;\n        if( pExpr->iTable!=iCsr ) return;\n        if( pOrderBy->a[ii].fg.sortFlags & KEYINFO_ORDER_BIGNULL ) return;\n      }\n    }\n\n    /* All conditions are met. Add the terms to the where-clause object. */\n    assert( p->pLimit->op==TK_LIMIT );\n    if( p->iOffset!=0 && (p->selFlags & SF_Compound)==0 ){\n      whereAddLimitExpr(pWC, p->iOffset, p->pLimit->pRight,\n                        iCsr, SQLITE_INDEX_CONSTRAINT_OFFSET);\n    }\n    if( p->iOffset==0 || (p->selFlags & SF_Compound)==0 ){\n      whereAddLimitExpr(pWC, p->iLimit, p->pLimit->pLeft,\n                        iCsr, SQLITE_INDEX_CONSTRAINT_LIMIT);\n    }\n  }\n}\n\n/*\n** Initialize a preallocated WhereClause structure.\n*/\nSQLITE_PRIVATE void sqlite3WhereClauseInit(\n  WhereClause *pWC,        /* The WhereClause to be initialized */\n  WhereInfo *pWInfo        /* The WHERE processing context */\n){\n  pWC->pWInfo = pWInfo;\n  pWC->hasOr = 0;\n  pWC->pOuter = 0;\n  pWC->nTerm = 0;\n  pWC->nBase = 0;\n  pWC->nSlot = ArraySize(pWC->aStatic);\n  pWC->a = pWC->aStatic;\n}\n\n/*\n** Deallocate a WhereClause structure.  The WhereClause structure\n** itself is not freed.  This routine is the inverse of\n** sqlite3WhereClauseInit().\n*/\nSQLITE_PRIVATE void sqlite3WhereClauseClear(WhereClause *pWC){\n  sqlite3 *db = pWC->pWInfo->pParse->db;\n  assert( pWC->nTerm>=pWC->nBase );\n  if( pWC->nTerm>0 ){\n    WhereTerm *a = pWC->a;\n    WhereTerm *aLast = &pWC->a[pWC->nTerm-1];\n#ifdef SQLITE_DEBUG\n    int i;\n    /* Verify that every term past pWC->nBase is virtual */\n    for(i=pWC->nBase; i<pWC->nTerm; i++){\n      assert( (pWC->a[i].wtFlags & TERM_VIRTUAL)!=0 );\n    }\n#endif\n    while(1){\n      assert( a->eMatchOp==0 || a->eOperator==WO_AUX );\n      if( a->wtFlags & TERM_DYNAMIC ){\n        sqlite3ExprDelete(db, a->pExpr);\n      }\n      if( a->wtFlags & (TERM_ORINFO|TERM_ANDINFO) ){\n        if( a->wtFlags & TERM_ORINFO ){\n          assert( (a->wtFlags & TERM_ANDINFO)==0 );\n          whereOrInfoDelete(db, a->u.pOrInfo);\n        }else{\n          assert( (a->wtFlags & TERM_ANDINFO)!=0 );\n          whereAndInfoDelete(db, a->u.pAndInfo);\n        }\n      }\n      if( a==aLast ) break;\n      a++;\n    }\n  }\n}\n\n\n/*\n** These routines walk (recursively) an expression tree and generate\n** a bitmask indicating which tables are used in that expression\n** tree.\n**\n** sqlite3WhereExprUsage(MaskSet, Expr) ->\n**\n**       Return a Bitmask of all tables referenced by Expr.  Expr can be\n**       be NULL, in which case 0 is returned.\n**\n** sqlite3WhereExprUsageNN(MaskSet, Expr) ->\n**\n**       Same as sqlite3WhereExprUsage() except that Expr must not be\n**       NULL.  The \"NN\" suffix on the name stands for \"Not Null\".\n**\n** sqlite3WhereExprListUsage(MaskSet, ExprList) ->\n**\n**       Return a Bitmask of all tables referenced by every expression\n**       in the expression list ExprList.  ExprList can be NULL, in which\n**       case 0 is returned.\n**\n** sqlite3WhereExprUsageFull(MaskSet, ExprList) ->\n**\n**       Internal use only.  Called only by sqlite3WhereExprUsageNN() for\n**       complex expressions that require pushing register values onto\n**       the stack.  Many calls to sqlite3WhereExprUsageNN() do not need\n**       the more complex analysis done by this routine.  Hence, the\n**       computations done by this routine are broken out into a separate\n**       \"no-inline\" function to avoid the stack push overhead in the\n**       common case where it is not needed.\n*/\nstatic SQLITE_NOINLINE Bitmask sqlite3WhereExprUsageFull(\n  WhereMaskSet *pMaskSet,\n  Expr *p\n){\n  Bitmask mask;\n  mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0;\n  if( p->pLeft ) mask |= sqlite3WhereExprUsageNN(pMaskSet, p->pLeft);\n  if( p->pRight ){\n    mask |= sqlite3WhereExprUsageNN(pMaskSet, p->pRight);\n    assert( p->x.pList==0 );\n  }else if( ExprUseXSelect(p) ){\n    if( ExprHasProperty(p, EP_VarSelect) ) pMaskSet->bVarSelect = 1;\n    mask |= exprSelectUsage(pMaskSet, p->x.pSelect);\n  }else if( p->x.pList ){\n    mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList);\n  }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n  if( (p->op==TK_FUNCTION || p->op==TK_AGG_FUNCTION) && ExprUseYWin(p) ){\n    assert( p->y.pWin!=0 );\n    mask |= sqlite3WhereExprListUsage(pMaskSet, p->y.pWin->pPartition);\n    mask |= sqlite3WhereExprListUsage(pMaskSet, p->y.pWin->pOrderBy);\n    mask |= sqlite3WhereExprUsage(pMaskSet, p->y.pWin->pFilter);\n  }\n#endif\n  return mask;\n}\nSQLITE_PRIVATE Bitmask sqlite3WhereExprUsageNN(WhereMaskSet *pMaskSet, Expr *p){\n  if( p->op==TK_COLUMN && !ExprHasProperty(p, EP_FixedCol) ){\n    return sqlite3WhereGetMask(pMaskSet, p->iTable);\n  }else if( ExprHasProperty(p, EP_TokenOnly|EP_Leaf) ){\n    assert( p->op!=TK_IF_NULL_ROW );\n    return 0;\n  }\n  return sqlite3WhereExprUsageFull(pMaskSet, p);\n}\nSQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){\n  return p ? sqlite3WhereExprUsageNN(pMaskSet,p) : 0;\n}\nSQLITE_PRIVATE Bitmask sqlite3WhereExprListUsage(WhereMaskSet *pMaskSet, ExprList *pList){\n  int i;\n  Bitmask mask = 0;\n  if( pList ){\n    for(i=0; i<pList->nExpr; i++){\n      mask |= sqlite3WhereExprUsage(pMaskSet, pList->a[i].pExpr);\n    }\n  }\n  return mask;\n}\n\n\n/*\n** Call exprAnalyze on all terms in a WHERE clause.\n**\n** Note that exprAnalyze() might add new virtual terms onto the\n** end of the WHERE clause.  We do not want to analyze these new\n** virtual terms, so start analyzing at the end and work forward\n** so that the added virtual terms are never processed.\n*/\nSQLITE_PRIVATE void sqlite3WhereExprAnalyze(\n  SrcList *pTabList,       /* the FROM clause */\n  WhereClause *pWC         /* the WHERE clause to be analyzed */\n){\n  int i;\n  for(i=pWC->nTerm-1; i>=0; i--){\n    exprAnalyze(pTabList, pWC, i);\n  }\n}\n\n/*\n** For table-valued-functions, transform the function arguments into\n** new WHERE clause terms.\n**\n** Each function argument translates into an equality constraint against\n** a HIDDEN column in the table.\n*/\nSQLITE_PRIVATE void sqlite3WhereTabFuncArgs(\n  Parse *pParse,                    /* Parsing context */\n  SrcItem *pItem,                   /* The FROM clause term to process */\n  WhereClause *pWC                  /* Xfer function arguments to here */\n){\n  Table *pTab;\n  int j, k;\n  ExprList *pArgs;\n  Expr *pColRef;\n  Expr *pTerm;\n  if( pItem->fg.isTabFunc==0 ) return;\n  pTab = pItem->pSTab;\n  assert( pTab!=0 );\n  pArgs = pItem->u1.pFuncArg;\n  if( pArgs==0 ) return;\n  for(j=k=0; j<pArgs->nExpr; j++){\n    Expr *pRhs;\n    u32 joinType;\n    while( k<pTab->nCol && (pTab->aCol[k].colFlags & COLFLAG_HIDDEN)==0 ){k++;}\n    if( k>=pTab->nCol ){\n      sqlite3ErrorMsg(pParse, \"too many arguments on %s() - max %d\",\n                      pTab->zName, j);\n      return;\n    }\n    pColRef = sqlite3ExprAlloc(pParse->db, TK_COLUMN, 0, 0);\n    if( pColRef==0 ) return;\n    pColRef->iTable = pItem->iCursor;\n    pColRef->iColumn = k++;\n    assert( ExprUseYTab(pColRef) );\n    pColRef->y.pTab = pTab;\n    pItem->colUsed |= sqlite3ExprColUsed(pColRef);\n    pRhs = sqlite3PExpr(pParse, TK_UPLUS,\n        sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0);\n    pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs);\n    if( pItem->fg.jointype & (JT_LEFT|JT_RIGHT) ){\n      testcase( pItem->fg.jointype & JT_LEFT );  /* testtag-20230227a */\n      testcase( pItem->fg.jointype & JT_RIGHT ); /* testtag-20230227b */\n      joinType = EP_OuterON;\n    }else{\n      testcase( pItem->fg.jointype & JT_LTORJ ); /* testtag-20230227c */\n      joinType = EP_InnerON;\n    }\n    sqlite3SetJoinExpr(pTerm, pItem->iCursor, joinType);\n    whereClauseInsert(pWC, pTerm, TERM_DYNAMIC);\n  }\n}\n\n/************** End of whereexpr.c *******************************************/\n/************** Begin file where.c *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This module contains C code that generates VDBE code used to process\n** the WHERE clause of SQL statements.  This module is responsible for\n** generating the code that loops through a table looking for applicable\n** rows.  Indices are selected and used to speed the search when doing\n** so is applicable.  Because this module is responsible for selecting\n** indices, you might also think of this module as the \"query optimizer\".\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"whereInt.h\" */\n\n/*\n** Extra information appended to the end of sqlite3_index_info but not\n** visible to the xBestIndex function, at least not directly.  The\n** sqlite3_vtab_collation() interface knows how to reach it, however.\n**\n** This object is not an API and can be changed from one release to the\n** next.  As long as allocateIndexInfo() and sqlite3_vtab_collation()\n** agree on the structure, all will be well.\n*/\ntypedef struct HiddenIndexInfo HiddenIndexInfo;\nstruct HiddenIndexInfo {\n  WhereClause *pWC;        /* The Where clause being analyzed */\n  Parse *pParse;           /* The parsing context */\n  int eDistinct;           /* Value to return from sqlite3_vtab_distinct() */\n  u32 mIn;                 /* Mask of terms that are <col> IN (...) */\n  u32 mHandleIn;           /* Terms that vtab will handle as <col> IN (...) */\n  sqlite3_value *aRhs[FLEXARRAY];  /* RHS values for constraints. MUST BE LAST\n                                   ** Extra space is allocated to hold up\n                                   ** to nTerm such values */\n};\n\n/* Size (in bytes) of a HiddenIndeInfo object sufficient to hold as\n** many as N constraints */\n#define SZ_HIDDENINDEXINFO(N) \\\n                  (offsetof(HiddenIndexInfo,aRhs) + (N)*sizeof(sqlite3_value*))\n\n/* Forward declaration of methods */\nstatic int whereLoopResize(sqlite3*, WhereLoop*, int);\n\n/*\n** Return the estimated number of output rows from a WHERE clause\n*/\nSQLITE_PRIVATE LogEst sqlite3WhereOutputRowCount(WhereInfo *pWInfo){\n  return pWInfo->nRowOut;\n}\n\n/*\n** Return one of the WHERE_DISTINCT_xxxxx values to indicate how this\n** WHERE clause returns outputs for DISTINCT processing.\n*/\nSQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo *pWInfo){\n  return pWInfo->eDistinct;\n}\n\n/*\n** Return the number of ORDER BY terms that are satisfied by the\n** WHERE clause.  A return of 0 means that the output must be\n** completely sorted.  A return equal to the number of ORDER BY\n** terms means that no sorting is needed at all.  A return that\n** is positive but less than the number of ORDER BY terms means that\n** block sorting is required.\n*/\nSQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo *pWInfo){\n  return pWInfo->nOBSat<0 ? 0 : pWInfo->nOBSat;\n}\n\n/*\n** In the ORDER BY LIMIT optimization, if the inner-most loop is known\n** to emit rows in increasing order, and if the last row emitted by the\n** inner-most loop did not fit within the sorter, then we can skip all\n** subsequent rows for the current iteration of the inner loop (because they\n** will not fit in the sorter either) and continue with the second inner\n** loop - the loop immediately outside the inner-most.\n**\n** When a row does not fit in the sorter (because the sorter already\n** holds LIMIT+OFFSET rows that are smaller), then a jump is made to the\n** label returned by this function.\n**\n** If the ORDER BY LIMIT optimization applies, the jump destination should\n** be the continuation for the second-inner-most loop.  If the ORDER BY\n** LIMIT optimization does not apply, then the jump destination should\n** be the continuation for the inner-most loop.\n**\n** It is always safe for this routine to return the continuation of the\n** inner-most loop, in the sense that a correct answer will result.\n** Returning the continuation the second inner loop is an optimization\n** that might make the code run a little faster, but should not change\n** the final answer.\n*/\nSQLITE_PRIVATE int sqlite3WhereOrderByLimitOptLabel(WhereInfo *pWInfo){\n  WhereLevel *pInner;\n  if( !pWInfo->bOrderedInnerLoop ){\n    /* The ORDER BY LIMIT optimization does not apply.  Jump to the\n    ** continuation of the inner-most loop. */\n    return pWInfo->iContinue;\n  }\n  pInner = &pWInfo->a[pWInfo->nLevel-1];\n  assert( pInner->addrNxt!=0 );\n  return pInner->pRJ ? pWInfo->iContinue : pInner->addrNxt;\n}\n\n/*\n** While generating code for the min/max optimization, after handling\n** the aggregate-step call to min() or max(), check to see if any\n** additional looping is required.  If the output order is such that\n** we are certain that the correct answer has already been found, then\n** code an OP_Goto to by pass subsequent processing.\n**\n** Any extra OP_Goto that is coded here is an optimization.  The\n** correct answer should be obtained regardless.  This OP_Goto just\n** makes the answer appear faster.\n*/\nSQLITE_PRIVATE void sqlite3WhereMinMaxOptEarlyOut(Vdbe *v, WhereInfo *pWInfo){\n  WhereLevel *pInner;\n  int i;\n  if( !pWInfo->bOrderedInnerLoop ) return;\n  if( pWInfo->nOBSat==0 ) return;\n  for(i=pWInfo->nLevel-1; i>=0; i--){\n    pInner = &pWInfo->a[i];\n    if( (pInner->pWLoop->wsFlags & WHERE_COLUMN_IN)!=0 ){\n      sqlite3VdbeGoto(v, pInner->addrNxt);\n      return;\n    }\n  }\n  sqlite3VdbeGoto(v, pWInfo->iBreak);\n}\n\n/*\n** Return the VDBE address or label to jump to in order to continue\n** immediately with the next row of a WHERE clause.\n*/\nSQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo *pWInfo){\n  assert( pWInfo->iContinue!=0 );\n  return pWInfo->iContinue;\n}\n\n/*\n** Return the VDBE address or label to jump to in order to break\n** out of a WHERE loop.\n*/\nSQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo *pWInfo){\n  return pWInfo->iBreak;\n}\n\n/*\n** Return ONEPASS_OFF (0) if an UPDATE or DELETE statement is unable to\n** operate directly on the rowids returned by a WHERE clause.  Return\n** ONEPASS_SINGLE (1) if the statement can operation directly because only\n** a single row is to be changed.  Return ONEPASS_MULTI (2) if the one-pass\n** optimization can be used on multiple\n**\n** If the ONEPASS optimization is used (if this routine returns true)\n** then also write the indices of open cursors used by ONEPASS\n** into aiCur[0] and aiCur[1].  iaCur[0] gets the cursor of the data\n** table and iaCur[1] gets the cursor used by an auxiliary index.\n** Either value may be -1, indicating that cursor is not used.\n** Any cursors returned will have been opened for writing.\n**\n** aiCur[0] and aiCur[1] both get -1 if the where-clause logic is\n** unable to use the ONEPASS optimization.\n*/\nSQLITE_PRIVATE int sqlite3WhereOkOnePass(WhereInfo *pWInfo, int *aiCur){\n  memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);\n#ifdef WHERETRACE_ENABLED\n  if( sqlite3WhereTrace && pWInfo->eOnePass!=ONEPASS_OFF ){\n    sqlite3DebugPrintf(\"%s cursors: %d %d\\n\",\n         pWInfo->eOnePass==ONEPASS_SINGLE ? \"ONEPASS_SINGLE\" : \"ONEPASS_MULTI\",\n         aiCur[0], aiCur[1]);\n  }\n#endif\n  return pWInfo->eOnePass;\n}\n\n/*\n** Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move\n** the data cursor to the row selected by the index cursor.\n*/\nSQLITE_PRIVATE int sqlite3WhereUsesDeferredSeek(WhereInfo *pWInfo){\n  return pWInfo->bDeferredSeek;\n}\n\n/*\n** Move the content of pSrc into pDest\n*/\nstatic void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){\n  pDest->n = pSrc->n;\n  memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));\n}\n\n/*\n** Try to insert a new prerequisite/cost entry into the WhereOrSet pSet.\n**\n** The new entry might overwrite an existing entry, or it might be\n** appended, or it might be discarded.  Do whatever is the right thing\n** so that pSet keeps the N_OR_COST best entries seen so far.\n*/\nstatic int whereOrInsert(\n  WhereOrSet *pSet,      /* The WhereOrSet to be updated */\n  Bitmask prereq,        /* Prerequisites of the new entry */\n  LogEst rRun,           /* Run-cost of the new entry */\n  LogEst nOut            /* Number of outputs for the new entry */\n){\n  u16 i;\n  WhereOrCost *p;\n  for(i=pSet->n, p=pSet->a; i>0; i--, p++){\n    if( rRun<=p->rRun && (prereq & p->prereq)==prereq ){\n      goto whereOrInsert_done;\n    }\n    if( p->rRun<=rRun && (p->prereq & prereq)==p->prereq ){\n      return 0;\n    }\n  }\n  if( pSet->n<N_OR_COST ){\n    p = &pSet->a[pSet->n++];\n    p->nOut = nOut;\n  }else{\n    p = pSet->a;\n    for(i=1; i<pSet->n; i++){\n      if( p->rRun>pSet->a[i].rRun ) p = pSet->a + i;\n    }\n    if( p->rRun<=rRun ) return 0;\n  }\nwhereOrInsert_done:\n  p->prereq = prereq;\n  p->rRun = rRun;\n  if( p->nOut>nOut ) p->nOut = nOut;\n  return 1;\n}\n\n/*\n** Return the bitmask for the given cursor number.  Return 0 if\n** iCursor is not in the set.\n*/\nSQLITE_PRIVATE Bitmask sqlite3WhereGetMask(WhereMaskSet *pMaskSet, int iCursor){\n  int i;\n  assert( pMaskSet->n<=(int)sizeof(Bitmask)*8 );\n  assert( pMaskSet->n>0 || pMaskSet->ix[0]<0 );\n  assert( iCursor>=-1 );\n  if( pMaskSet->ix[0]==iCursor ){\n    return 1;\n  }\n  for(i=1; i<pMaskSet->n; i++){\n    if( pMaskSet->ix[i]==iCursor ){\n      return MASKBIT(i);\n    }\n  }\n  return 0;\n}\n\n/* Allocate memory that is automatically freed when pWInfo is freed.\n*/\nSQLITE_PRIVATE void *sqlite3WhereMalloc(WhereInfo *pWInfo, u64 nByte){\n  WhereMemBlock *pBlock;\n  pBlock = sqlite3DbMallocRawNN(pWInfo->pParse->db, nByte+sizeof(*pBlock));\n  if( pBlock ){\n    pBlock->pNext = pWInfo->pMemToFree;\n    pBlock->sz = nByte;\n    pWInfo->pMemToFree = pBlock;\n    pBlock++;\n  }\n  return (void*)pBlock;\n}\nSQLITE_PRIVATE void *sqlite3WhereRealloc(WhereInfo *pWInfo, void *pOld, u64 nByte){\n  void *pNew = sqlite3WhereMalloc(pWInfo, nByte);\n  if( pNew && pOld ){\n    WhereMemBlock *pOldBlk = (WhereMemBlock*)pOld;\n    pOldBlk--;\n    assert( pOldBlk->sz<nByte );\n    memcpy(pNew, pOld, pOldBlk->sz);\n  }\n  return pNew;\n}\n\n/*\n** Create a new mask for cursor iCursor.\n**\n** There is one cursor per table in the FROM clause.  The number of\n** tables in the FROM clause is limited by a test early in the\n** sqlite3WhereBegin() routine.  So we know that the pMaskSet->ix[]\n** array will never overflow.\n*/\nstatic void createMask(WhereMaskSet *pMaskSet, int iCursor){\n  assert( pMaskSet->n < ArraySize(pMaskSet->ix) );\n  pMaskSet->ix[pMaskSet->n++] = iCursor;\n}\n\n/*\n** If the right-hand branch of the expression is a TK_COLUMN, then return\n** a pointer to the right-hand branch.  Otherwise, return NULL.\n*/\nstatic Expr *whereRightSubexprIsColumn(Expr *p){\n  p = sqlite3ExprSkipCollateAndLikely(p->pRight);\n  if( ALWAYS(p!=0) && p->op==TK_COLUMN && !ExprHasProperty(p, EP_FixedCol) ){\n    return p;\n  }\n  return 0;\n}\n\n/*\n** Term pTerm is guaranteed to be a WO_IN term. It may be a component term\n** of a vector IN expression of the form \"(x, y, ...) IN (SELECT ...)\".\n** This function checks to see if the term is compatible with an index\n** column with affinity idxaff (one of the SQLITE_AFF_XYZ values). If so,\n** it returns a pointer to the name of the collation sequence (e.g. \"BINARY\"\n** or \"NOCASE\") used by the comparison in pTerm. If it is not compatible\n** with affinity idxaff, NULL is returned.\n*/\nstatic SQLITE_NOINLINE const char *indexInAffinityOk(\n  Parse *pParse,\n  WhereTerm *pTerm,\n  u8 idxaff\n){\n  Expr *pX = pTerm->pExpr;\n  Expr inexpr;\n\n  assert( pTerm->eOperator & WO_IN );\n\n  if( sqlite3ExprIsVector(pX->pLeft) ){\n    int iField = pTerm->u.x.iField - 1;\n    inexpr.flags = 0;\n    inexpr.op = TK_EQ;\n    inexpr.pLeft = pX->pLeft->x.pList->a[iField].pExpr;\n    assert( ExprUseXSelect(pX) );\n    inexpr.pRight = pX->x.pSelect->pEList->a[iField].pExpr;\n    pX = &inexpr;\n  }\n\n  if( sqlite3IndexAffinityOk(pX, idxaff) ){\n    CollSeq *pRet = sqlite3ExprCompareCollSeq(pParse, pX);\n    return pRet ? pRet->zName : sqlite3StrBINARY;\n  }\n  return 0;\n}\n\n/*\n** Advance to the next WhereTerm that matches according to the criteria\n** established when the pScan object was initialized by whereScanInit().\n** Return NULL if there are no more matching WhereTerms.\n*/\nstatic WhereTerm *whereScanNext(WhereScan *pScan){\n  int iCur;            /* The cursor on the LHS of the term */\n  i16 iColumn;         /* The column on the LHS of the term.  -1 for IPK */\n  Expr *pX;            /* An expression being tested */\n  WhereClause *pWC;    /* Shorthand for pScan->pWC */\n  WhereTerm *pTerm;    /* The term being tested */\n  int k = pScan->k;    /* Where to start scanning */\n\n  assert( pScan->iEquiv<=pScan->nEquiv );\n  pWC = pScan->pWC;\n  while(1){\n    iColumn = pScan->aiColumn[pScan->iEquiv-1];\n    iCur = pScan->aiCur[pScan->iEquiv-1];\n    assert( pWC!=0 );\n    assert( iCur>=0 );\n    do{\n      for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){\n        assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 || pTerm->leftCursor<0 );\n        if( pTerm->leftCursor==iCur\n         && pTerm->u.x.leftColumn==iColumn\n         && (iColumn!=XN_EXPR\n             || sqlite3ExprCompareSkip(pTerm->pExpr->pLeft,\n                                       pScan->pIdxExpr,iCur)==0)\n         && (pScan->iEquiv<=1 || !ExprHasProperty(pTerm->pExpr, EP_OuterON))\n        ){\n          if( (pTerm->eOperator & WO_EQUIV)!=0\n           && pScan->nEquiv<ArraySize(pScan->aiCur)\n           && (pX = whereRightSubexprIsColumn(pTerm->pExpr))!=0\n          ){\n            int j;\n            for(j=0; j<pScan->nEquiv; j++){\n              if( pScan->aiCur[j]==pX->iTable\n               && pScan->aiColumn[j]==pX->iColumn ){\n                  break;\n              }\n            }\n            if( j==pScan->nEquiv ){\n              pScan->aiCur[j] = pX->iTable;\n              pScan->aiColumn[j] = pX->iColumn;\n              pScan->nEquiv++;\n            }\n          }\n          if( (pTerm->eOperator & pScan->opMask)!=0 ){\n            /* Verify the affinity and collating sequence match */\n            if( pScan->zCollName && (pTerm->eOperator & WO_ISNULL)==0 ){\n              const char *zCollName;\n              Parse *pParse = pWC->pWInfo->pParse;\n              pX = pTerm->pExpr;\n\n              if( (pTerm->eOperator & WO_IN) ){\n                zCollName = indexInAffinityOk(pParse, pTerm, pScan->idxaff);\n                if( !zCollName ) continue;\n              }else{\n                CollSeq *pColl;\n                if( !sqlite3IndexAffinityOk(pX, pScan->idxaff) ){\n                  continue;\n                }\n                assert(pX->pLeft);\n                pColl = sqlite3ExprCompareCollSeq(pParse, pX);\n                zCollName = pColl ? pColl->zName : sqlite3StrBINARY;\n              }\n\n              if( sqlite3StrICmp(zCollName, pScan->zCollName) ){\n                continue;\n              }\n            }\n            if( (pTerm->eOperator & (WO_EQ|WO_IS))!=0\n             && (pX = pTerm->pExpr->pRight, ALWAYS(pX!=0))\n             && pX->op==TK_COLUMN\n             && pX->iTable==pScan->aiCur[0]\n             && pX->iColumn==pScan->aiColumn[0]\n            ){\n              testcase( pTerm->eOperator & WO_IS );\n              continue;\n            }\n            pScan->pWC = pWC;\n            pScan->k = k+1;\n#ifdef WHERETRACE_ENABLED\n            if( (sqlite3WhereTrace & 0x20000)!=0 && pScan->nEquiv>1 ){\n              int ii;\n              sqlite3DebugPrintf(\"EQUIVALENT TO {%d:%d} (due to TERM-%d):\",\n                 pScan->aiCur[0], pScan->aiColumn[0], pTerm->iTerm);\n              for(ii=1; ii<pScan->nEquiv; ii++){\n                sqlite3DebugPrintf(\" {%d:%d}\",\n                   pScan->aiCur[ii], pScan->aiColumn[ii]);\n              }\n              sqlite3DebugPrintf(\"\\n\");\n            }\n#endif\n            return pTerm;\n          }\n        }\n      }\n      pWC = pWC->pOuter;\n      k = 0;\n    }while( pWC!=0 );\n    if( pScan->iEquiv>=pScan->nEquiv ) break;\n    pWC = pScan->pOrigWC;\n    k = 0;\n    pScan->iEquiv++;\n  }\n  return 0;\n}\n\n/*\n** This is whereScanInit() for the case of an index on an expression.\n** It is factored out into a separate tail-recursion subroutine so that\n** the normal whereScanInit() routine, which is a high-runner, does not\n** need to push registers onto the stack as part of its prologue.\n*/\nstatic SQLITE_NOINLINE WhereTerm *whereScanInitIndexExpr(WhereScan *pScan){\n  pScan->idxaff = sqlite3ExprAffinity(pScan->pIdxExpr);\n  return whereScanNext(pScan);\n}\n\n/*\n** Initialize a WHERE clause scanner object.  Return a pointer to the\n** first match.  Return NULL if there are no matches.\n**\n** The scanner will be searching the WHERE clause pWC.  It will look\n** for terms of the form \"X <op> <expr>\" where X is column iColumn of table\n** iCur.   Or if pIdx!=0 then X is column iColumn of index pIdx.  pIdx\n** must be one of the indexes of table iCur.\n**\n** The <op> must be one of the operators described by opMask.\n**\n** If the search is for X and the WHERE clause contains terms of the\n** form X=Y then this routine might also return terms of the form\n** \"Y <op> <expr>\".  The number of levels of transitivity is limited,\n** but is enough to handle most commonly occurring SQL statements.\n**\n** If X is not the INTEGER PRIMARY KEY then X must be compatible with\n** index pIdx.\n*/\nstatic WhereTerm *whereScanInit(\n  WhereScan *pScan,       /* The WhereScan object being initialized */\n  WhereClause *pWC,       /* The WHERE clause to be scanned */\n  int iCur,               /* Cursor to scan for */\n  int iColumn,            /* Column to scan for */\n  u32 opMask,             /* Operator(s) to scan for */\n  Index *pIdx             /* Must be compatible with this index */\n){\n  pScan->pOrigWC = pWC;\n  pScan->pWC = pWC;\n  pScan->pIdxExpr = 0;\n  pScan->idxaff = 0;\n  pScan->zCollName = 0;\n  pScan->opMask = opMask;\n  pScan->k = 0;\n  pScan->aiCur[0] = iCur;\n  pScan->nEquiv = 1;\n  pScan->iEquiv = 1;\n  if( pIdx ){\n    int j = iColumn;\n    iColumn = pIdx->aiColumn[j];\n    if( iColumn==pIdx->pTable->iPKey ){\n      iColumn = XN_ROWID;\n    }else if( iColumn>=0 ){\n      pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;\n      pScan->zCollName = pIdx->azColl[j];\n    }else if( iColumn==XN_EXPR ){\n      pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;\n      pScan->zCollName = pIdx->azColl[j];\n      pScan->aiColumn[0] = XN_EXPR;\n      return whereScanInitIndexExpr(pScan);\n    }\n  }else if( iColumn==XN_EXPR ){\n    return 0;\n  }\n  pScan->aiColumn[0] = iColumn;\n  return whereScanNext(pScan);\n}\n\n/*\n** Search for a term in the WHERE clause that is of the form \"X <op> <expr>\"\n** where X is a reference to the iColumn of table iCur or of index pIdx\n** if pIdx!=0 and <op> is one of the WO_xx operator codes specified by\n** the op parameter.  Return a pointer to the term.  Return 0 if not found.\n**\n** If pIdx!=0 then it must be one of the indexes of table iCur.\n** Search for terms matching the iColumn-th column of pIdx\n** rather than the iColumn-th column of table iCur.\n**\n** The term returned might by Y=<expr> if there is another constraint in\n** the WHERE clause that specifies that X=Y.  Any such constraints will be\n** identified by the WO_EQUIV bit in the pTerm->eOperator field.  The\n** aiCur[]/iaColumn[] arrays hold X and all its equivalents. There are 11\n** slots in aiCur[]/aiColumn[] so that means we can look for X plus up to 10\n** other equivalent values.  Hence a search for X will return <expr> if X=A1\n** and A1=A2 and A2=A3 and ... and A9=A10 and A10=<expr>.\n**\n** If there are multiple terms in the WHERE clause of the form \"X <op> <expr>\"\n** then try for the one with no dependencies on <expr> - in other words where\n** <expr> is a constant expression of some kind.  Only return entries of\n** the form \"X <op> Y\" where Y is a column in another table if no terms of\n** the form \"X <op> <const-expr>\" exist.   If no terms with a constant RHS\n** exist, try to return a term that does not use WO_EQUIV.\n*/\nSQLITE_PRIVATE WhereTerm *sqlite3WhereFindTerm(\n  WhereClause *pWC,     /* The WHERE clause to be searched */\n  int iCur,             /* Cursor number of LHS */\n  int iColumn,          /* Column number of LHS */\n  Bitmask notReady,     /* RHS must not overlap with this mask */\n  u32 op,               /* Mask of WO_xx values describing operator */\n  Index *pIdx           /* Must be compatible with this index, if not NULL */\n){\n  WhereTerm *pResult = 0;\n  WhereTerm *p;\n  WhereScan scan;\n\n  p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx);\n  op &= WO_EQ|WO_IS;\n  while( p ){\n    if( (p->prereqRight & notReady)==0 ){\n      if( p->prereqRight==0 && (p->eOperator&op)!=0 ){\n        testcase( p->eOperator & WO_IS );\n        return p;\n      }\n      if( pResult==0 ) pResult = p;\n    }\n    p = whereScanNext(&scan);\n  }\n  return pResult;\n}\n\n/*\n** This function searches pList for an entry that matches the iCol-th column\n** of index pIdx.\n**\n** If such an expression is found, its index in pList->a[] is returned. If\n** no expression is found, -1 is returned.\n*/\nstatic int findIndexCol(\n  Parse *pParse,                  /* Parse context */\n  ExprList *pList,                /* Expression list to search */\n  int iBase,                      /* Cursor for table associated with pIdx */\n  Index *pIdx,                    /* Index to match column of */\n  int iCol                        /* Column of index to match */\n){\n  int i;\n  const char *zColl = pIdx->azColl[iCol];\n\n  for(i=0; i<pList->nExpr; i++){\n    Expr *p = sqlite3ExprSkipCollateAndLikely(pList->a[i].pExpr);\n    if( ALWAYS(p!=0)\n     && (p->op==TK_COLUMN || p->op==TK_AGG_COLUMN)\n     && p->iColumn==pIdx->aiColumn[iCol]\n     && p->iTable==iBase\n    ){\n      CollSeq *pColl = sqlite3ExprNNCollSeq(pParse, pList->a[i].pExpr);\n      if( 0==sqlite3StrICmp(pColl->zName, zColl) ){\n        return i;\n      }\n    }\n  }\n\n  return -1;\n}\n\n/*\n** Return TRUE if the iCol-th column of index pIdx is NOT NULL\n*/\nstatic int indexColumnNotNull(Index *pIdx, int iCol){\n  int j;\n  assert( pIdx!=0 );\n  assert( iCol>=0 && iCol<pIdx->nColumn );\n  j = pIdx->aiColumn[iCol];\n  if( j>=0 ){\n    return pIdx->pTable->aCol[j].notNull;\n  }else if( j==(-1) ){\n    return 1;\n  }else{\n    assert( j==(-2) );\n    return 0;  /* Assume an indexed expression can always yield a NULL */\n\n  }\n}\n\n/*\n** Return true if the DISTINCT expression-list passed as the third argument\n** is redundant.\n**\n** A DISTINCT list is redundant if any subset of the columns in the\n** DISTINCT list are collectively unique and individually non-null.\n*/\nstatic int isDistinctRedundant(\n  Parse *pParse,            /* Parsing context */\n  SrcList *pTabList,        /* The FROM clause */\n  WhereClause *pWC,         /* The WHERE clause */\n  ExprList *pDistinct       /* The result set that needs to be DISTINCT */\n){\n  Table *pTab;\n  Index *pIdx;\n  int i;\n  int iBase;\n\n  /* If there is more than one table or sub-select in the FROM clause of\n  ** this query, then it will not be possible to show that the DISTINCT\n  ** clause is redundant. */\n  if( pTabList->nSrc!=1 ) return 0;\n  iBase = pTabList->a[0].iCursor;\n  pTab = pTabList->a[0].pSTab;\n\n  /* If any of the expressions is an IPK column on table iBase, then return\n  ** true. Note: The (p->iTable==iBase) part of this test may be false if the\n  ** current SELECT is a correlated sub-query.\n  */\n  for(i=0; i<pDistinct->nExpr; i++){\n    Expr *p = sqlite3ExprSkipCollateAndLikely(pDistinct->a[i].pExpr);\n    if( NEVER(p==0) ) continue;\n    if( p->op!=TK_COLUMN && p->op!=TK_AGG_COLUMN ) continue;\n    if( p->iTable==iBase && p->iColumn<0 ) return 1;\n  }\n\n  /* Loop through all indices on the table, checking each to see if it makes\n  ** the DISTINCT qualifier redundant. It does so if:\n  **\n  **   1. The index is itself UNIQUE, and\n  **\n  **   2. All of the columns in the index are either part of the pDistinct\n  **      list, or else the WHERE clause contains a term of the form \"col=X\",\n  **      where X is a constant value. The collation sequences of the\n  **      comparison and select-list expressions must match those of the index.\n  **\n  **   3. All of those index columns for which the WHERE clause does not\n  **      contain a \"col=X\" term are subject to a NOT NULL constraint.\n  */\n  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n    if( !IsUniqueIndex(pIdx) ) continue;\n    if( pIdx->pPartIdxWhere ) continue;\n    for(i=0; i<pIdx->nKeyCol; i++){\n      if( 0==sqlite3WhereFindTerm(pWC, iBase, i, ~(Bitmask)0, WO_EQ, pIdx) ){\n        if( findIndexCol(pParse, pDistinct, iBase, pIdx, i)<0 ) break;\n        if( indexColumnNotNull(pIdx, i)==0 ) break;\n      }\n    }\n    if( i==pIdx->nKeyCol ){\n      /* This index implies that the DISTINCT qualifier is redundant. */\n      return 1;\n    }\n  }\n\n  return 0;\n}\n\n\n/*\n** Estimate the logarithm of the input value to base 2.\n*/\nstatic LogEst estLog(LogEst N){\n  return N<=10 ? 0 : sqlite3LogEst(N) - 33;\n}\n\n/*\n** Convert OP_Column opcodes to OP_Copy in previously generated code.\n**\n** This routine runs over generated VDBE code and translates OP_Column\n** opcodes into OP_Copy when the table is being accessed via co-routine\n** instead of via table lookup.\n**\n** If the iAutoidxCur is not zero, then any OP_Rowid instructions on\n** cursor iTabCur are transformed into OP_Sequence opcode for the\n** iAutoidxCur cursor, in order to generate unique rowids for the\n** automatic index being generated.\n*/\nstatic void translateColumnToCopy(\n  Parse *pParse,      /* Parsing context */\n  int iStart,         /* Translate from this opcode to the end */\n  int iTabCur,        /* OP_Column/OP_Rowid references to this table */\n  int iRegister,      /* The first column is in this register */\n  int iAutoidxCur     /* If non-zero, cursor of autoindex being generated */\n){\n  Vdbe *v = pParse->pVdbe;\n  VdbeOp *pOp = sqlite3VdbeGetOp(v, iStart);\n  int iEnd = sqlite3VdbeCurrentAddr(v);\n  if( pParse->db->mallocFailed ) return;\n#ifdef SQLITE_DEBUG\n  if( pParse->db->flags & SQLITE_VdbeAddopTrace ){\n    printf(\"CHECKING for column-to-copy on cursor %d for %d..%d\\n\",\n            iTabCur, iStart, iEnd);\n  }\n#endif\n  for(; iStart<iEnd; iStart++, pOp++){\n    if( pOp->p1!=iTabCur ) continue;\n    if( pOp->opcode==OP_Column ){\n#ifdef SQLITE_DEBUG\n      if( pParse->db->flags & SQLITE_VdbeAddopTrace ){\n        printf(\"TRANSLATE OP_Column to OP_Copy at %d\\n\", iStart);\n      }\n#endif\n      pOp->opcode = OP_Copy;\n      pOp->p1 = pOp->p2 + iRegister;\n      pOp->p2 = pOp->p3;\n      pOp->p3 = 0;\n      pOp->p5 = 2;  /* Cause the MEM_Subtype flag to be cleared */\n    }else if( pOp->opcode==OP_Rowid ){\n#ifdef SQLITE_DEBUG\n      if( pParse->db->flags & SQLITE_VdbeAddopTrace ){\n        printf(\"TRANSLATE OP_Rowid to OP_Sequence at %d\\n\", iStart);\n      }\n#endif\n      pOp->opcode = OP_Sequence;\n      pOp->p1 = iAutoidxCur;\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n      if( iAutoidxCur==0 ){\n        pOp->opcode = OP_Null;\n        pOp->p3 = 0;\n      }\n#endif\n    }\n  }\n}\n\n/*\n** Two routines for printing the content of an sqlite3_index_info\n** structure.  Used for testing and debugging only.  If neither\n** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines\n** are no-ops.\n*/\n#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(WHERETRACE_ENABLED)\nstatic void whereTraceIndexInfoInputs(\n  sqlite3_index_info *p,   /* The IndexInfo object */\n  Table *pTab              /* The TABLE that is the virtual table */\n){\n  int i;\n  if( (sqlite3WhereTrace & 0x10)==0 ) return;\n  sqlite3DebugPrintf(\"sqlite3_index_info inputs for %s:\\n\", pTab->zName);\n  for(i=0; i<p->nConstraint; i++){\n    sqlite3DebugPrintf(\n       \"  constraint[%d]: col=%d termid=%d op=%d usabled=%d collseq=%s\\n\",\n       i,\n       p->aConstraint[i].iColumn,\n       p->aConstraint[i].iTermOffset,\n       p->aConstraint[i].op,\n       p->aConstraint[i].usable,\n       sqlite3_vtab_collation(p,i));\n  }\n  for(i=0; i<p->nOrderBy; i++){\n    sqlite3DebugPrintf(\"  orderby[%d]: col=%d desc=%d\\n\",\n       i,\n       p->aOrderBy[i].iColumn,\n       p->aOrderBy[i].desc);\n  }\n}\nstatic void whereTraceIndexInfoOutputs(\n  sqlite3_index_info *p,   /* The IndexInfo object */\n  Table *pTab              /* The TABLE that is the virtual table */\n){\n  int i;\n  if( (sqlite3WhereTrace & 0x10)==0 ) return;\n  sqlite3DebugPrintf(\"sqlite3_index_info outputs for %s:\\n\", pTab->zName);\n  for(i=0; i<p->nConstraint; i++){\n    sqlite3DebugPrintf(\"  usage[%d]: argvIdx=%d omit=%d\\n\",\n       i,\n       p->aConstraintUsage[i].argvIndex,\n       p->aConstraintUsage[i].omit);\n  }\n  sqlite3DebugPrintf(\"  idxNum=%d\\n\", p->idxNum);\n  sqlite3DebugPrintf(\"  idxStr=%s\\n\", p->idxStr);\n  sqlite3DebugPrintf(\"  orderByConsumed=%d\\n\", p->orderByConsumed);\n  sqlite3DebugPrintf(\"  estimatedCost=%g\\n\", p->estimatedCost);\n  sqlite3DebugPrintf(\"  estimatedRows=%lld\\n\", p->estimatedRows);\n}\n#else\n#define whereTraceIndexInfoInputs(A,B)\n#define whereTraceIndexInfoOutputs(A,B)\n#endif\n\n/*\n** We know that pSrc is an operand of an outer join.  Return true if\n** pTerm is a constraint that is compatible with that join.\n**\n** pTerm must be EP_OuterON if pSrc is the right operand of an\n** outer join.  pTerm can be either EP_OuterON or EP_InnerON if pSrc\n** is the left operand of a RIGHT join.\n**\n** See https://sqlite.org/forum/forumpost/206d99a16dd9212f\n** for an example of a WHERE clause constraints that may not be used on\n** the right table of a RIGHT JOIN because the constraint implies a\n** not-NULL condition on the left table of the RIGHT JOIN.\n*/\nstatic int constraintCompatibleWithOuterJoin(\n  const WhereTerm *pTerm,       /* WHERE clause term to check */\n  const SrcItem *pSrc           /* Table we are trying to access */\n){\n  assert( (pSrc->fg.jointype&(JT_LEFT|JT_LTORJ|JT_RIGHT))!=0 ); /* By caller */\n  testcase( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))==JT_LEFT );\n  testcase( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))==JT_LTORJ );\n  testcase( ExprHasProperty(pTerm->pExpr, EP_OuterON) )\n  testcase( ExprHasProperty(pTerm->pExpr, EP_InnerON) );\n  if( !ExprHasProperty(pTerm->pExpr, EP_OuterON|EP_InnerON)\n   || pTerm->pExpr->w.iJoin != pSrc->iCursor\n  ){\n    return 0;\n  }\n  if( (pSrc->fg.jointype & (JT_LEFT|JT_RIGHT))!=0\n   && NEVER(ExprHasProperty(pTerm->pExpr, EP_InnerON))\n  ){\n    return 0;\n  }\n  return 1;\n}\n\n#ifndef SQLITE_OMIT_AUTOMATIC_INDEX\n/*\n** Return true if column iCol of table pTab seem like it might be a\n** good column to use as part of a query-time index.\n**\n** Current algorithm (subject to improvement!):\n**\n**   1.   If iCol is already the left-most column of some other index,\n**        then return false.\n**\n**   2.   If iCol is part of an existing index that has an aiRowLogEst of\n**        more than 20, then return false.\n**\n**   3.   If no disqualifying conditions above are found, return true.\n**\n** 2025-01-03: I experimented with a new rule that returns false if the\n** the datatype of the column is \"BOOLEAN\". This did not improve\n** performance on any queries at hand, but it did burn CPU cycles, so the\n** idea was not committed.\n*/\nstatic SQLITE_NOINLINE int columnIsGoodIndexCandidate(\n  const Table *pTab,\n  int iCol\n){\n  const Index *pIdx;\n  for(pIdx = pTab->pIndex; pIdx!=0; pIdx=pIdx->pNext){\n    int j;\n    for(j=0; j<pIdx->nKeyCol; j++){\n       if( pIdx->aiColumn[j]==iCol ){\n         if( j==0 ) return 0;\n         if( pIdx->hasStat1 && pIdx->aiRowLogEst[j+1]>20 ) return 0;\n         break;\n       }\n    }\n  }\n  return 1;\n}\n#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */\n\n\n\n#ifndef SQLITE_OMIT_AUTOMATIC_INDEX\n/*\n** Return TRUE if the WHERE clause term pTerm is of a form where it\n** could be used with an index to access pSrc, assuming an appropriate\n** index existed.\n*/\nstatic int termCanDriveIndex(\n  const WhereTerm *pTerm,        /* WHERE clause term to check */\n  const SrcItem *pSrc,           /* Table we are trying to access */\n  const Bitmask notReady         /* Tables in outer loops of the join */\n){\n  char aff;\n  int leftCol;\n\n  if( pTerm->leftCursor!=pSrc->iCursor ) return 0;\n  if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0;\n  assert( (pSrc->fg.jointype & JT_RIGHT)==0 );\n  if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0\n   && !constraintCompatibleWithOuterJoin(pTerm,pSrc)\n  ){\n    return 0;  /* See https://sqlite.org/forum/forumpost/51e6959f61 */\n  }\n  if( (pTerm->prereqRight & notReady)!=0 ) return 0;\n  assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n  leftCol = pTerm->u.x.leftColumn;\n  if( leftCol<0 ) return 0;\n  aff = pSrc->pSTab->aCol[leftCol].affinity;\n  if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0;\n  testcase( pTerm->pExpr->op==TK_IS );\n  return columnIsGoodIndexCandidate(pSrc->pSTab, leftCol);\n}\n#endif\n\n\n#ifndef SQLITE_OMIT_AUTOMATIC_INDEX\n\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n/*\n** Argument pIdx represents an automatic index that the current statement\n** will create and populate. Add an OP_Explain with text of the form:\n**\n**     CREATE AUTOMATIC INDEX ON <table>(<cols>) [WHERE <expr>]\n**\n** This is only required if sqlite3_stmt_scanstatus() is enabled, to\n** associate an SQLITE_SCANSTAT_NCYCLE and SQLITE_SCANSTAT_NLOOP\n** values with. In order to avoid breaking legacy code and test cases,\n** the OP_Explain is not added if this is an EXPLAIN QUERY PLAN command.\n*/\nstatic void explainAutomaticIndex(\n  Parse *pParse,\n  Index *pIdx,                    /* Automatic index to explain */\n  int bPartial,                   /* True if pIdx is a partial index */\n  int *pAddrExplain               /* OUT: Address of OP_Explain */\n){\n  if( IS_STMT_SCANSTATUS(pParse->db) && pParse->explain!=2 ){\n    Table *pTab = pIdx->pTable;\n    const char *zSep = \"\";\n    char *zText = 0;\n    int ii = 0;\n    sqlite3_str *pStr = sqlite3_str_new(pParse->db);\n    sqlite3_str_appendf(pStr,\"CREATE AUTOMATIC INDEX ON %s(\", pTab->zName);\n    assert( pIdx->nColumn>1 );\n    assert( pIdx->aiColumn[pIdx->nColumn-1]==XN_ROWID || !HasRowid(pTab) );\n    for(ii=0; ii<(pIdx->nColumn-1); ii++){\n      const char *zName = 0;\n      int iCol = pIdx->aiColumn[ii];\n\n      zName = pTab->aCol[iCol].zCnName;\n      sqlite3_str_appendf(pStr, \"%s%s\", zSep, zName);\n      zSep = \", \";\n    }\n    zText = sqlite3_str_finish(pStr);\n    if( zText==0 ){\n      sqlite3OomFault(pParse->db);\n    }else{\n      *pAddrExplain = sqlite3VdbeExplain(\n          pParse, 0, \"%s)%s\", zText, (bPartial ? \" WHERE <expr>\" : \"\")\n      );\n      sqlite3_free(zText);\n    }\n  }\n}\n#else\n# define explainAutomaticIndex(a,b,c,d)\n#endif\n\n/*\n** Generate code to construct the Index object for an automatic index\n** and to set up the WhereLevel object pLevel so that the code generator\n** makes use of the automatic index.\n*/\nstatic SQLITE_NOINLINE void constructAutomaticIndex(\n  Parse *pParse,              /* The parsing context */\n  WhereClause *pWC,           /* The WHERE clause */\n  const Bitmask notReady,     /* Mask of cursors that are not available */\n  WhereLevel *pLevel          /* Write new index here */\n){\n  int nKeyCol;                /* Number of columns in the constructed index */\n  WhereTerm *pTerm;           /* A single term of the WHERE clause */\n  WhereTerm *pWCEnd;          /* End of pWC->a[] */\n  Index *pIdx;                /* Object describing the transient index */\n  Vdbe *v;                    /* Prepared statement under construction */\n  int addrInit;               /* Address of the initialization bypass jump */\n  Table *pTable;              /* The table being indexed */\n  int addrTop;                /* Top of the index fill loop */\n  int regRecord;              /* Register holding an index record */\n  int n;                      /* Column counter */\n  int i;                      /* Loop counter */\n  int mxBitCol;               /* Maximum column in pSrc->colUsed */\n  CollSeq *pColl;             /* Collating sequence to on a column */\n  WhereLoop *pLoop;           /* The Loop object */\n  char *zNotUsed;             /* Extra space on the end of pIdx */\n  Bitmask idxCols;            /* Bitmap of columns used for indexing */\n  Bitmask extraCols;          /* Bitmap of additional columns */\n  u8 sentWarning = 0;         /* True if a warning has been issued */\n  u8 useBloomFilter = 0;      /* True to also add a Bloom filter */\n  Expr *pPartial = 0;         /* Partial Index Expression */\n  int iContinue = 0;          /* Jump here to skip excluded rows */\n  SrcList *pTabList;          /* The complete FROM clause */\n  SrcItem *pSrc;              /* The FROM clause term to get the next index */\n  int addrCounter = 0;        /* Address where integer counter is initialized */\n  int regBase;                /* Array of registers where record is assembled */\n#ifdef SQLITE_ENABLE_STMT_SCANSTATUS\n  int addrExp = 0;            /* Address of OP_Explain */\n#endif\n\n  /* Generate code to skip over the creation and initialization of the\n  ** transient index on 2nd and subsequent iterations of the loop. */\n  v = pParse->pVdbe;\n  assert( v!=0 );\n  addrInit = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n\n  /* Count the number of columns that will be added to the index\n  ** and used to match WHERE clause constraints */\n  nKeyCol = 0;\n  pTabList = pWC->pWInfo->pTabList;\n  pSrc = &pTabList->a[pLevel->iFrom];\n  pTable = pSrc->pSTab;\n  pWCEnd = &pWC->a[pWC->nTerm];\n  pLoop = pLevel->pWLoop;\n  idxCols = 0;\n  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){\n    Expr *pExpr = pTerm->pExpr;\n    /* Make the automatic index a partial index if there are terms in the\n    ** WHERE clause (or the ON clause of a LEFT join) that constrain which\n    ** rows of the target table (pSrc) that can be used. */\n    if( (pTerm->wtFlags & TERM_VIRTUAL)==0\n     && sqlite3ExprIsSingleTableConstraint(pExpr, pTabList, pLevel->iFrom, 0)\n    ){\n      pPartial = sqlite3ExprAnd(pParse, pPartial,\n                                sqlite3ExprDup(pParse->db, pExpr, 0));\n    }\n    if( termCanDriveIndex(pTerm, pSrc, notReady) ){\n      int iCol;\n      Bitmask cMask;\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      iCol = pTerm->u.x.leftColumn;\n      cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);\n      testcase( iCol==BMS );\n      testcase( iCol==BMS-1 );\n      if( !sentWarning ){\n        sqlite3_log(SQLITE_WARNING_AUTOINDEX,\n            \"automatic index on %s(%s)\", pTable->zName,\n            pTable->aCol[iCol].zCnName);\n        sentWarning = 1;\n      }\n      if( (idxCols & cMask)==0 ){\n        if( whereLoopResize(pParse->db, pLoop, nKeyCol+1) ){\n          goto end_auto_index_create;\n        }\n        pLoop->aLTerm[nKeyCol++] = pTerm;\n        idxCols |= cMask;\n      }\n    }\n  }\n  assert( nKeyCol>0 || pParse->db->mallocFailed );\n  pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;\n  pLoop->wsFlags = WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WHERE_INDEXED\n                     | WHERE_AUTO_INDEX;\n\n  /* Count the number of additional columns needed to create a\n  ** covering index.  A \"covering index\" is an index that contains all\n  ** columns that are needed by the query.  With a covering index, the\n  ** original table never needs to be accessed.  Automatic indices must\n  ** be a covering index because the index will not be updated if the\n  ** original table changes and the index and table cannot both be used\n  ** if they go out of sync.\n  */\n  if( IsView(pTable) ){\n    extraCols = ALLBITS & ~idxCols;\n  }else{\n    extraCols = pSrc->colUsed & (~idxCols | MASKBIT(BMS-1));\n  }\n  if( !HasRowid(pTable) ){\n    /* For WITHOUT ROWID tables, ensure that all PRIMARY KEY columns are\n    ** either in the idxCols mask or in the extraCols mask */\n    for(i=0; i<pTable->nCol; i++){\n      if( (pTable->aCol[i].colFlags & COLFLAG_PRIMKEY)==0 ) continue;\n      if( i>=BMS-1 ){\n        extraCols |= MASKBIT(BMS-1);\n        break;\n      }\n      if( idxCols & MASKBIT(i) ) continue;\n      extraCols |= MASKBIT(i);\n    }\n  }\n  mxBitCol = MIN(BMS-1,pTable->nCol);\n  testcase( pTable->nCol==BMS-1 );\n  testcase( pTable->nCol==BMS-2 );\n  for(i=0; i<mxBitCol; i++){\n    if( extraCols & MASKBIT(i) ) nKeyCol++;\n  }\n  if( pSrc->colUsed & MASKBIT(BMS-1) ){\n    nKeyCol += pTable->nCol - BMS + 1;\n  }\n\n  /* Construct the Index object to describe this index */\n  assert( nKeyCol <= pTable->nCol + MAX(0, pTable->nCol - BMS + 1) );\n  /* ^-- This guarantees that the number of index columns will fit in the u16 */\n  pIdx = sqlite3AllocateIndexObject(pParse->db, nKeyCol+HasRowid(pTable),\n                                    0, &zNotUsed);\n  if( pIdx==0 ) goto end_auto_index_create;\n  pLoop->u.btree.pIndex = pIdx;\n  pIdx->zName = \"auto-index\";\n  pIdx->pTable = pTable;\n  n = 0;\n  idxCols = 0;\n  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){\n    if( termCanDriveIndex(pTerm, pSrc, notReady) ){\n      int iCol;\n      Bitmask cMask;\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      iCol = pTerm->u.x.leftColumn;\n      cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);\n      testcase( iCol==BMS-1 );\n      testcase( iCol==BMS );\n      if( (idxCols & cMask)==0 ){\n        Expr *pX = pTerm->pExpr;\n        idxCols |= cMask;\n        pIdx->aiColumn[n] = pTerm->u.x.leftColumn;\n        pColl = sqlite3ExprCompareCollSeq(pParse, pX);\n        assert( pColl!=0 || pParse->nErr>0 ); /* TH3 collate01.800 */\n        pIdx->azColl[n] = pColl ? pColl->zName : sqlite3StrBINARY;\n        n++;\n        if( ALWAYS(pX->pLeft!=0)\n         && sqlite3ExprAffinity(pX->pLeft)!=SQLITE_AFF_TEXT\n        ){\n          /* TUNING: only use a Bloom filter on an automatic index\n          ** if one or more key columns has the ability to hold numeric\n          ** values, since strings all have the same hash in the Bloom\n          ** filter implementation and hence a Bloom filter on a text column\n          ** is not usually helpful. */\n          useBloomFilter = 1;\n        }\n      }\n    }\n  }\n  assert( (u32)n==pLoop->u.btree.nEq );\n\n  /* Add additional columns needed to make the automatic index into\n  ** a covering index */\n  for(i=0; i<mxBitCol; i++){\n    if( extraCols & MASKBIT(i) ){\n      pIdx->aiColumn[n] = i;\n      pIdx->azColl[n] = sqlite3StrBINARY;\n      n++;\n    }\n  }\n  if( pSrc->colUsed & MASKBIT(BMS-1) ){\n    for(i=BMS-1; i<pTable->nCol; i++){\n      pIdx->aiColumn[n] = i;\n      pIdx->azColl[n] = sqlite3StrBINARY;\n      n++;\n    }\n  }\n  assert( n==nKeyCol );\n  if( HasRowid(pTable) ){\n    pIdx->aiColumn[n] = XN_ROWID;\n    pIdx->azColl[n] = sqlite3StrBINARY;\n  }\n\n  /* Create the automatic index */\n  explainAutomaticIndex(pParse, pIdx, pPartial!=0, &addrExp);\n  assert( pLevel->iIdxCur>=0 );\n  pLevel->iIdxCur = pParse->nTab++;\n  sqlite3VdbeAddOp2(v, OP_OpenAutoindex, pLevel->iIdxCur, nKeyCol+1);\n  sqlite3VdbeSetP4KeyInfo(pParse, pIdx);\n  VdbeComment((v, \"for %s\", pTable->zName));\n  if( OptimizationEnabled(pParse->db, SQLITE_BloomFilter) && useBloomFilter ){\n    sqlite3WhereExplainBloomFilter(pParse, pWC->pWInfo, pLevel);\n    pLevel->regFilter = ++pParse->nMem;\n    sqlite3VdbeAddOp2(v, OP_Blob, 10000, pLevel->regFilter);\n  }\n\n  /* Fill the automatic index with content */\n  assert( pSrc == &pWC->pWInfo->pTabList->a[pLevel->iFrom] );\n  if( pSrc->fg.viaCoroutine ){\n    int regYield;\n    Subquery *pSubq;\n    assert( pSrc->fg.isSubquery );\n    pSubq = pSrc->u4.pSubq;\n    assert( pSubq!=0 );\n    regYield = pSubq->regReturn;\n    addrCounter = sqlite3VdbeAddOp2(v, OP_Integer, 0, 0);\n    sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pSubq->addrFillSub);\n    addrTop =  sqlite3VdbeAddOp1(v, OP_Yield, regYield);\n    VdbeCoverage(v);\n    VdbeComment((v, \"next row of %s\", pSrc->pSTab->zName));\n  }else{\n    assert( pLevel->addrHalt );\n    addrTop = sqlite3VdbeAddOp2(v, OP_Rewind,pLevel->iTabCur,pLevel->addrHalt);\n    VdbeCoverage(v);\n  }\n  if( pPartial ){\n    iContinue = sqlite3VdbeMakeLabel(pParse);\n    sqlite3ExprIfFalse(pParse, pPartial, iContinue, SQLITE_JUMPIFNULL);\n    pLoop->wsFlags |= WHERE_PARTIALIDX;\n  }\n  regRecord = sqlite3GetTempReg(pParse);\n  regBase = sqlite3GenerateIndexKey(\n      pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0\n  );\n  if( pLevel->regFilter ){\n    sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0,\n                         regBase, pLoop->u.btree.nEq);\n  }\n  sqlite3VdbeScanStatusCounters(v, addrExp, addrExp, sqlite3VdbeCurrentAddr(v));\n  sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord);\n  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);\n  if( pPartial ) sqlite3VdbeResolveLabel(v, iContinue);\n  if( pSrc->fg.viaCoroutine ){\n    assert( pSrc->fg.isSubquery && pSrc->u4.pSubq!=0 );\n    sqlite3VdbeChangeP2(v, addrCounter, regBase+n);\n    testcase( pParse->db->mallocFailed );\n    assert( pLevel->iIdxCur>0 );\n    translateColumnToCopy(pParse, addrTop, pLevel->iTabCur,\n                          pSrc->u4.pSubq->regResult, pLevel->iIdxCur);\n    sqlite3VdbeGoto(v, addrTop);\n    pSrc->fg.viaCoroutine = 0;\n    sqlite3VdbeJumpHere(v, addrTop);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v);\n    sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX);\n    if( (pSrc->fg.jointype & JT_LEFT)!=0 ){\n      sqlite3VdbeJumpHere(v, addrTop);\n    }\n  }\n  sqlite3ReleaseTempReg(pParse, regRecord);\n\n  /* Jump here when skipping the initialization */\n  sqlite3VdbeJumpHere(v, addrInit);\n  sqlite3VdbeScanStatusRange(v, addrExp, addrExp, -1);\n\nend_auto_index_create:\n  sqlite3ExprDelete(pParse->db, pPartial);\n}\n#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */\n\n/*\n** Generate bytecode that will initialize a Bloom filter that is appropriate\n** for pLevel.\n**\n** If there are inner loops within pLevel that have the WHERE_BLOOMFILTER\n** flag set, initialize a Bloomfilter for them as well.  Except don't do\n** this recursive initialization if the SQLITE_BloomPulldown optimization has\n** been turned off.\n**\n** When the Bloom filter is initialized, the WHERE_BLOOMFILTER flag is cleared\n** from the loop, but the regFilter value is set to a register that implements\n** the Bloom filter.  When regFilter is positive, the\n** sqlite3WhereCodeOneLoopStart() will generate code to test the Bloom filter\n** and skip the subsequence B-Tree seek if the Bloom filter indicates that\n** no matching rows exist.\n**\n** This routine may only be called if it has previously been determined that\n** the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit\n** is set.\n*/\nstatic SQLITE_NOINLINE void sqlite3ConstructBloomFilter(\n  WhereInfo *pWInfo,    /* The WHERE clause */\n  int iLevel,           /* Index in pWInfo->a[] that is pLevel */\n  WhereLevel *pLevel,   /* Make a Bloom filter for this FROM term */\n  Bitmask notReady      /* Loops that are not ready */\n){\n  int addrOnce;                        /* Address of opening OP_Once */\n  int addrTop;                         /* Address of OP_Rewind */\n  int addrCont;                        /* Jump here to skip a row */\n  const WhereTerm *pTerm;              /* For looping over WHERE clause terms */\n  const WhereTerm *pWCEnd;             /* Last WHERE clause term */\n  Parse *pParse = pWInfo->pParse;      /* Parsing context */\n  Vdbe *v = pParse->pVdbe;             /* VDBE under construction */\n  WhereLoop *pLoop = pLevel->pWLoop;   /* The loop being coded */\n  int iCur;                            /* Cursor for table getting the filter */\n  IndexedExpr *saved_pIdxEpr;          /* saved copy of Parse.pIdxEpr */\n  IndexedExpr *saved_pIdxPartExpr;     /* saved copy of Parse.pIdxPartExpr */\n\n  saved_pIdxEpr = pParse->pIdxEpr;\n  saved_pIdxPartExpr = pParse->pIdxPartExpr;\n  pParse->pIdxEpr = 0;\n  pParse->pIdxPartExpr = 0;\n\n  assert( pLoop!=0 );\n  assert( v!=0 );\n  assert( pLoop->wsFlags & WHERE_BLOOMFILTER );\n  assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 );\n\n  addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n  do{\n    const SrcList *pTabList;\n    const SrcItem *pItem;\n    const Table *pTab;\n    u64 sz;\n    int iSrc;\n    sqlite3WhereExplainBloomFilter(pParse, pWInfo, pLevel);\n    addrCont = sqlite3VdbeMakeLabel(pParse);\n    iCur = pLevel->iTabCur;\n    pLevel->regFilter = ++pParse->nMem;\n\n    /* The Bloom filter is a Blob held in a register.  Initialize it\n    ** to zero-filled blob of at least 80K bits, but maybe more if the\n    ** estimated size of the table is larger.  We could actually\n    ** measure the size of the table at run-time using OP_Count with\n    ** P3==1 and use that value to initialize the blob.  But that makes\n    ** testing complicated.  By basing the blob size on the value in the\n    ** sqlite_stat1 table, testing is much easier.\n    */\n    pTabList = pWInfo->pTabList;\n    iSrc = pLevel->iFrom;\n    pItem = &pTabList->a[iSrc];\n    assert( pItem!=0 );\n    pTab = pItem->pSTab;\n    assert( pTab!=0 );\n    sz = sqlite3LogEstToInt(pTab->nRowLogEst);\n    if( sz<10000 ){\n      sz = 10000;\n    }else if( sz>10000000 ){\n      sz = 10000000;\n    }\n    sqlite3VdbeAddOp2(v, OP_Blob, (int)sz, pLevel->regFilter);\n\n    addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);\n    pWCEnd = &pWInfo->sWC.a[pWInfo->sWC.nTerm];\n    for(pTerm=pWInfo->sWC.a; pTerm<pWCEnd; pTerm++){\n      Expr *pExpr = pTerm->pExpr;\n      if( (pTerm->wtFlags & TERM_VIRTUAL)==0\n       && sqlite3ExprIsSingleTableConstraint(pExpr, pTabList, iSrc, 0)\n      ){\n        sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);\n      }\n    }\n    if( pLoop->wsFlags & WHERE_IPK ){\n      int r1 = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp2(v, OP_Rowid, iCur, r1);\n      sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, r1, 1);\n      sqlite3ReleaseTempReg(pParse, r1);\n    }else{\n      Index *pIdx = pLoop->u.btree.pIndex;\n      int n = pLoop->u.btree.nEq;\n      int r1 = sqlite3GetTempRange(pParse, n);\n      int jj;\n      for(jj=0; jj<n; jj++){\n        assert( pIdx->pTable==pItem->pSTab );\n        sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iCur, jj, r1+jj);\n      }\n      sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, r1, n);\n      sqlite3ReleaseTempRange(pParse, r1, n);\n    }\n    sqlite3VdbeResolveLabel(v, addrCont);\n    sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1);\n    VdbeCoverage(v);\n    sqlite3VdbeJumpHere(v, addrTop);\n    pLoop->wsFlags &= ~WHERE_BLOOMFILTER;\n    if( OptimizationDisabled(pParse->db, SQLITE_BloomPulldown) ) break;\n    while( ++iLevel < pWInfo->nLevel ){\n      const SrcItem *pTabItem;\n      pLevel = &pWInfo->a[iLevel];\n      pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];\n      if( pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ) ) continue;\n      pLoop = pLevel->pWLoop;\n      if( NEVER(pLoop==0) ) continue;\n      if( pLoop->prereq & notReady ) continue;\n      if( (pLoop->wsFlags & (WHERE_BLOOMFILTER|WHERE_COLUMN_IN))\n                 ==WHERE_BLOOMFILTER\n      ){\n        /* This is a candidate for bloom-filter pull-down (early evaluation).\n        ** The test that WHERE_COLUMN_IN is omitted is important, as we are\n        ** not able to do early evaluation of bloom filters that make use of\n        ** the IN operator */\n        break;\n      }\n    }\n  }while( iLevel < pWInfo->nLevel );\n  sqlite3VdbeJumpHere(v, addrOnce);\n  pParse->pIdxEpr = saved_pIdxEpr;\n  pParse->pIdxPartExpr = saved_pIdxPartExpr;\n}\n\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/*\n** Return term iTerm of the WhereClause passed as the first argument. Terms\n** are numbered from 0 upwards, starting with the terms in pWC->a[], then\n** those in pWC->pOuter->a[] (if any), and so on.\n*/\nstatic WhereTerm *termFromWhereClause(WhereClause *pWC, int iTerm){\n  WhereClause *p;\n  for(p=pWC; p; p=p->pOuter){\n    if( iTerm<p->nTerm ) return &p->a[iTerm];\n    iTerm -= p->nTerm;\n  }\n  return 0;\n}\n\n/*\n** Allocate and populate an sqlite3_index_info structure. It is the\n** responsibility of the caller to eventually release the structure\n** by passing the pointer returned by this function to freeIndexInfo().\n*/\nstatic sqlite3_index_info *allocateIndexInfo(\n  WhereInfo *pWInfo,              /* The WHERE clause */\n  WhereClause *pWC,               /* The WHERE clause being analyzed */\n  Bitmask mUnusable,              /* Ignore terms with these prereqs */\n  SrcItem *pSrc,                  /* The FROM clause term that is the vtab */\n  u16 *pmNoOmit                   /* Mask of terms not to omit */\n){\n  int i, j;\n  int nTerm;\n  Parse *pParse = pWInfo->pParse;\n  struct sqlite3_index_constraint *pIdxCons;\n  struct sqlite3_index_orderby *pIdxOrderBy;\n  struct sqlite3_index_constraint_usage *pUsage;\n  struct HiddenIndexInfo *pHidden;\n  WhereTerm *pTerm;\n  int nOrderBy;\n  sqlite3_index_info *pIdxInfo;\n  u16 mNoOmit = 0;\n  const Table *pTab;\n  int eDistinct = 0;\n  ExprList *pOrderBy = pWInfo->pOrderBy;\n  WhereClause *p;\n\n  assert( pSrc!=0 );\n  pTab = pSrc->pSTab;\n  assert( pTab!=0 );\n  assert( IsVirtual(pTab) );\n\n  /* Find all WHERE clause constraints referring to this virtual table.\n  ** Mark each term with the TERM_OK flag.  Set nTerm to the number of\n  ** terms found.\n  */\n  for(p=pWC, nTerm=0; p; p=p->pOuter){\n    for(i=0, pTerm=p->a; i<p->nTerm; i++, pTerm++){\n      pTerm->wtFlags &= ~TERM_OK;\n      if( pTerm->leftCursor != pSrc->iCursor ) continue;\n      if( pTerm->prereqRight & mUnusable ) continue;\n      assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );\n      testcase( pTerm->eOperator & WO_IN );\n      testcase( pTerm->eOperator & WO_ISNULL );\n      testcase( pTerm->eOperator & WO_IS );\n      testcase( pTerm->eOperator & WO_ALL );\n      if( (pTerm->eOperator & ~(WO_EQUIV))==0 ) continue;\n      if( pTerm->wtFlags & TERM_VNULL ) continue;\n\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      assert( pTerm->u.x.leftColumn>=XN_ROWID );\n      assert( pTerm->u.x.leftColumn<pTab->nCol );\n      if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0\n          && !constraintCompatibleWithOuterJoin(pTerm,pSrc)\n        ){\n        continue;\n      }\n      nTerm++;\n      pTerm->wtFlags |= TERM_OK;\n    }\n  }\n\n  /* If the ORDER BY clause contains only columns in the current\n  ** virtual table then allocate space for the aOrderBy part of\n  ** the sqlite3_index_info structure.\n  */\n  nOrderBy = 0;\n  if( pOrderBy ){\n    int n = pOrderBy->nExpr;\n    for(i=0; i<n; i++){\n      Expr *pExpr = pOrderBy->a[i].pExpr;\n      Expr *pE2;\n\n      /* Skip over constant terms in the ORDER BY clause */\n      if( sqlite3ExprIsConstant(0, pExpr) ){\n        continue;\n      }\n\n      /* Virtual tables are unable to deal with NULLS FIRST */\n      if( pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_BIGNULL ) break;\n\n      /* First case - a direct column references without a COLLATE operator */\n      if( pExpr->op==TK_COLUMN && pExpr->iTable==pSrc->iCursor ){\n        assert( pExpr->iColumn>=XN_ROWID && pExpr->iColumn<pTab->nCol );\n        continue;\n      }\n\n      /* 2nd case - a column reference with a COLLATE operator.  Only match\n      ** of the COLLATE operator matches the collation of the column. */\n      if( pExpr->op==TK_COLLATE\n       && (pE2 = pExpr->pLeft)->op==TK_COLUMN\n       && pE2->iTable==pSrc->iCursor\n      ){\n        const char *zColl;  /* The collating sequence name */\n        assert( !ExprHasProperty(pExpr, EP_IntValue) );\n        assert( pExpr->u.zToken!=0 );\n        assert( pE2->iColumn>=XN_ROWID && pE2->iColumn<pTab->nCol );\n        pExpr->iColumn = pE2->iColumn;\n        if( pE2->iColumn<0 ) continue;  /* Collseq does not matter for rowid */\n        zColl = sqlite3ColumnColl(&pTab->aCol[pE2->iColumn]);\n        if( zColl==0 ) zColl = sqlite3StrBINARY;\n        if( sqlite3_stricmp(pExpr->u.zToken, zColl)==0 ) continue;\n      }\n\n      /* No matches cause a break out of the loop */\n      break;\n    }\n    if( i==n ){\n      nOrderBy = n;\n      if( (pWInfo->wctrlFlags & WHERE_DISTINCTBY) && !pSrc->fg.rowidUsed ){\n        eDistinct = 2 + ((pWInfo->wctrlFlags & WHERE_SORTBYGROUP)!=0);\n      }else if( pWInfo->wctrlFlags & WHERE_GROUPBY ){\n        eDistinct = 1;\n      }\n    }\n  }\n\n  /* Allocate the sqlite3_index_info structure\n  */\n  pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)\n                           + (sizeof(*pIdxCons) + sizeof(*pUsage))*nTerm\n                           + sizeof(*pIdxOrderBy)*nOrderBy\n                           + SZ_HIDDENINDEXINFO(nTerm) );\n  if( pIdxInfo==0 ){\n    sqlite3ErrorMsg(pParse, \"out of memory\");\n    return 0;\n  }\n  pHidden = (struct HiddenIndexInfo*)&pIdxInfo[1];\n  pIdxCons = (struct sqlite3_index_constraint*)&pHidden->aRhs[nTerm];\n  pIdxOrderBy = (struct sqlite3_index_orderby*)&pIdxCons[nTerm];\n  pUsage = (struct sqlite3_index_constraint_usage*)&pIdxOrderBy[nOrderBy];\n  pIdxInfo->aConstraint = pIdxCons;\n  pIdxInfo->aOrderBy = pIdxOrderBy;\n  pIdxInfo->aConstraintUsage = pUsage;\n  pIdxInfo->colUsed = (sqlite3_int64)pSrc->colUsed;\n  if( HasRowid(pTab)==0 ){\n    /* Ensure that all bits associated with PK columns are set. This is to\n    ** ensure they are available for cases like RIGHT joins or OR loops. */\n    Index *pPk = sqlite3PrimaryKeyIndex((Table*)pTab);\n    assert( pPk!=0 );\n    for(i=0; i<pPk->nKeyCol; i++){\n      int iCol = pPk->aiColumn[i];\n      assert( iCol>=0 );\n      if( iCol>=BMS-1 ) iCol = BMS-1;\n      pIdxInfo->colUsed |= MASKBIT(iCol);\n    }\n  }\n  pHidden->pWC = pWC;\n  pHidden->pParse = pParse;\n  pHidden->eDistinct = eDistinct;\n  pHidden->mIn = 0;\n  for(p=pWC, i=j=0; p; p=p->pOuter){\n    int nLast = i+p->nTerm;;\n    for(pTerm=p->a; i<nLast; i++, pTerm++){\n      u16 op;\n      if( (pTerm->wtFlags & TERM_OK)==0 ) continue;\n      pIdxCons[j].iColumn = pTerm->u.x.leftColumn;\n      pIdxCons[j].iTermOffset = i;\n      op = pTerm->eOperator & WO_ALL;\n      if( op==WO_IN ){\n        if( (pTerm->wtFlags & TERM_SLICE)==0 ){\n          pHidden->mIn |= SMASKBIT32(j);\n        }\n        op = WO_EQ;\n      }\n      if( op==WO_AUX ){\n        pIdxCons[j].op = pTerm->eMatchOp;\n      }else if( op & (WO_ISNULL|WO_IS) ){\n        if( op==WO_ISNULL ){\n          pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_ISNULL;\n        }else{\n          pIdxCons[j].op = SQLITE_INDEX_CONSTRAINT_IS;\n        }\n      }else{\n        pIdxCons[j].op = (u8)op;\n        /* The direct assignment in the previous line is possible only because\n        ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical.  The\n        ** following asserts verify this fact. */\n        assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );\n        assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );\n        assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );\n        assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );\n        assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );\n        assert( pTerm->eOperator&(WO_IN|WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_AUX) );\n\n        if( op & (WO_LT|WO_LE|WO_GT|WO_GE)\n            && sqlite3ExprIsVector(pTerm->pExpr->pRight)\n          ){\n          testcase( j!=i );\n          if( j<16 ) mNoOmit |= (1 << j);\n          if( op==WO_LT ) pIdxCons[j].op = WO_LE;\n          if( op==WO_GT ) pIdxCons[j].op = WO_GE;\n        }\n      }\n\n      j++;\n    }\n  }\n  assert( j==nTerm );\n  pIdxInfo->nConstraint = j;\n  for(i=j=0; i<nOrderBy; i++){\n    Expr *pExpr = pOrderBy->a[i].pExpr;\n    if( sqlite3ExprIsConstant(0, pExpr) ) continue;\n    assert( pExpr->op==TK_COLUMN\n         || (pExpr->op==TK_COLLATE && pExpr->pLeft->op==TK_COLUMN\n              && pExpr->iColumn==pExpr->pLeft->iColumn) );\n    pIdxOrderBy[j].iColumn = pExpr->iColumn;\n    pIdxOrderBy[j].desc = pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_DESC;\n    j++;\n  }\n  pIdxInfo->nOrderBy = j;\n\n  *pmNoOmit = mNoOmit;\n  return pIdxInfo;\n}\n\n/*\n** Free and zero the sqlite3_index_info.idxStr value if needed.\n*/\nstatic void freeIdxStr(sqlite3_index_info *pIdxInfo){\n  if( pIdxInfo->needToFreeIdxStr ){\n    sqlite3_free(pIdxInfo->idxStr);\n    pIdxInfo->idxStr = 0;\n    pIdxInfo->needToFreeIdxStr = 0;\n  }\n}\n\n/*\n** Free an sqlite3_index_info structure allocated by allocateIndexInfo()\n** and possibly modified by xBestIndex methods.\n*/\nstatic void freeIndexInfo(sqlite3 *db, sqlite3_index_info *pIdxInfo){\n  HiddenIndexInfo *pHidden;\n  int i;\n  assert( pIdxInfo!=0 );\n  pHidden = (HiddenIndexInfo*)&pIdxInfo[1];\n  assert( pHidden->pParse!=0 );\n  assert( pHidden->pParse->db==db );\n  for(i=0; i<pIdxInfo->nConstraint; i++){\n    sqlite3ValueFree(pHidden->aRhs[i]); /* IMP: R-14553-25174 */\n    pHidden->aRhs[i] = 0;\n  }\n  freeIdxStr(pIdxInfo);\n  sqlite3DbFree(db, pIdxInfo);\n}\n\n/*\n** The table object reference passed as the second argument to this function\n** must represent a virtual table. This function invokes the xBestIndex()\n** method of the virtual table with the sqlite3_index_info object that\n** comes in as the 3rd argument to this function.\n**\n** If an error occurs, pParse is populated with an error message and an\n** appropriate error code is returned.  A return of SQLITE_CONSTRAINT from\n** xBestIndex is not considered an error.  SQLITE_CONSTRAINT indicates that\n** the current configuration of \"unusable\" flags in sqlite3_index_info can\n** not result in a valid plan.\n**\n** Whether or not an error is returned, it is the responsibility of the\n** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates\n** that this is required.\n*/\nstatic int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){\n  int rc;\n  sqlite3_vtab *pVtab;\n\n  assert( IsVirtual(pTab) );\n  pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;\n  whereTraceIndexInfoInputs(p, pTab);\n  pParse->db->nSchemaLock++;\n  rc = pVtab->pModule->xBestIndex(pVtab, p);\n  pParse->db->nSchemaLock--;\n  whereTraceIndexInfoOutputs(p, pTab);\n\n  if( rc!=SQLITE_OK && rc!=SQLITE_CONSTRAINT ){\n    if( rc==SQLITE_NOMEM ){\n      sqlite3OomFault(pParse->db);\n    }else if( !pVtab->zErrMsg ){\n      sqlite3ErrorMsg(pParse, \"%s\", sqlite3ErrStr(rc));\n    }else{\n      sqlite3ErrorMsg(pParse, \"%s\", pVtab->zErrMsg);\n    }\n  }\n  if( pTab->u.vtab.p->bAllSchemas ){\n    sqlite3VtabUsesAllSchemas(pParse);\n  }\n  sqlite3_free(pVtab->zErrMsg);\n  pVtab->zErrMsg = 0;\n  return rc;\n}\n#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Estimate the location of a particular key among all keys in an\n** index.  Store the results in aStat as follows:\n**\n**    aStat[0]      Est. number of rows less than pRec\n**    aStat[1]      Est. number of rows equal to pRec\n**\n** Return the index of the sample that is the smallest sample that\n** is greater than or equal to pRec. Note that this index is not an index\n** into the aSample[] array - it is an index into a virtual set of samples\n** based on the contents of aSample[] and the number of fields in record\n** pRec.\n*/\nstatic int whereKeyStats(\n  Parse *pParse,              /* Database connection */\n  Index *pIdx,                /* Index to consider domain of */\n  UnpackedRecord *pRec,       /* Vector of values to consider */\n  int roundUp,                /* Round up if true.  Round down if false */\n  tRowcnt *aStat              /* OUT: stats written here */\n){\n  IndexSample *aSample = pIdx->aSample;\n  int iCol;                   /* Index of required stats in anEq[] etc. */\n  int i;                      /* Index of first sample >= pRec */\n  int iSample;                /* Smallest sample larger than or equal to pRec */\n  int iMin = 0;               /* Smallest sample not yet tested */\n  int iTest;                  /* Next sample to test */\n  int res;                    /* Result of comparison operation */\n  int nField;                 /* Number of fields in pRec */\n  tRowcnt iLower = 0;         /* anLt[] + anEq[] of largest sample pRec is > */\n\n#ifndef SQLITE_DEBUG\n  UNUSED_PARAMETER( pParse );\n#endif\n  assert( pRec!=0 );\n  assert( pIdx->nSample>0 );\n  assert( pRec->nField>0 );\n\n\n  /* Do a binary search to find the first sample greater than or equal\n  ** to pRec. If pRec contains a single field, the set of samples to search\n  ** is simply the aSample[] array. If the samples in aSample[] contain more\n  ** than one fields, all fields following the first are ignored.\n  **\n  ** If pRec contains N fields, where N is more than one, then as well as the\n  ** samples in aSample[] (truncated to N fields), the search also has to\n  ** consider prefixes of those samples. For example, if the set of samples\n  ** in aSample is:\n  **\n  **     aSample[0] = (a, 5)\n  **     aSample[1] = (a, 10)\n  **     aSample[2] = (b, 5)\n  **     aSample[3] = (c, 100)\n  **     aSample[4] = (c, 105)\n  **\n  ** Then the search space should ideally be the samples above and the\n  ** unique prefixes [a], [b] and [c]. But since that is hard to organize,\n  ** the code actually searches this set:\n  **\n  **     0: (a)\n  **     1: (a, 5)\n  **     2: (a, 10)\n  **     3: (a, 10)\n  **     4: (b)\n  **     5: (b, 5)\n  **     6: (c)\n  **     7: (c, 100)\n  **     8: (c, 105)\n  **     9: (c, 105)\n  **\n  ** For each sample in the aSample[] array, N samples are present in the\n  ** effective sample array. In the above, samples 0 and 1 are based on\n  ** sample aSample[0]. Samples 2 and 3 on aSample[1] etc.\n  **\n  ** Often, sample i of each block of N effective samples has (i+1) fields.\n  ** Except, each sample may be extended to ensure that it is greater than or\n  ** equal to the previous sample in the array. For example, in the above,\n  ** sample 2 is the first sample of a block of N samples, so at first it\n  ** appears that it should be 1 field in size. However, that would make it\n  ** smaller than sample 1, so the binary search would not work. As a result,\n  ** it is extended to two fields. The duplicates that this creates do not\n  ** cause any problems.\n  */\n  if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){\n    nField = pIdx->nKeyCol;\n  }else{\n    nField = pIdx->nColumn;\n  }\n  nField = MIN(pRec->nField, nField);\n  iCol = 0;\n  iSample = pIdx->nSample * nField;\n  do{\n    int iSamp;                    /* Index in aSample[] of test sample */\n    int n;                        /* Number of fields in test sample */\n\n    iTest = (iMin+iSample)/2;\n    iSamp = iTest / nField;\n    if( iSamp>0 ){\n      /* The proposed effective sample is a prefix of sample aSample[iSamp].\n      ** Specifically, the shortest prefix of at least (1 + iTest%nField)\n      ** fields that is greater than the previous effective sample.  */\n      for(n=(iTest % nField) + 1; n<nField; n++){\n        if( aSample[iSamp-1].anLt[n-1]!=aSample[iSamp].anLt[n-1] ) break;\n      }\n    }else{\n      n = iTest + 1;\n    }\n\n    pRec->nField = n;\n    res = sqlite3VdbeRecordCompare(aSample[iSamp].n, aSample[iSamp].p, pRec);\n    if( res<0 ){\n      iLower = aSample[iSamp].anLt[n-1] + aSample[iSamp].anEq[n-1];\n      iMin = iTest+1;\n    }else if( res==0 && n<nField ){\n      iLower = aSample[iSamp].anLt[n-1];\n      iMin = iTest+1;\n      res = -1;\n    }else{\n      iSample = iTest;\n      iCol = n-1;\n    }\n  }while( res && iMin<iSample );\n  i = iSample / nField;\n\n#ifdef SQLITE_DEBUG\n  /* The following assert statements check that the binary search code\n  ** above found the right answer. This block serves no purpose other\n  ** than to invoke the asserts.  */\n  if( pParse->db->mallocFailed==0 ){\n    if( res==0 ){\n      /* If (res==0) is true, then pRec must be equal to sample i. */\n      assert( i<pIdx->nSample );\n      assert( iCol==nField-1 );\n      pRec->nField = nField;\n      assert( 0==sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)\n           || pParse->db->mallocFailed\n      );\n    }else{\n      /* Unless i==pIdx->nSample, indicating that pRec is larger than\n      ** all samples in the aSample[] array, pRec must be smaller than the\n      ** (iCol+1) field prefix of sample i.  */\n      assert( i<=pIdx->nSample && i>=0 );\n      pRec->nField = iCol+1;\n      assert( i==pIdx->nSample\n           || sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)>0\n           || pParse->db->mallocFailed );\n\n      /* if i==0 and iCol==0, then record pRec is smaller than all samples\n      ** in the aSample[] array. Otherwise, if (iCol>0) then pRec must\n      ** be greater than or equal to the (iCol) field prefix of sample i.\n      ** If (i>0), then pRec must also be greater than sample (i-1).  */\n      if( iCol>0 ){\n        pRec->nField = iCol;\n        assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0\n             || pParse->db->mallocFailed || CORRUPT_DB );\n      }\n      if( i>0 ){\n        pRec->nField = nField;\n        assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0\n             || pParse->db->mallocFailed || CORRUPT_DB );\n      }\n    }\n  }\n#endif /* ifdef SQLITE_DEBUG */\n\n  if( res==0 ){\n    /* Record pRec is equal to sample i */\n    assert( iCol==nField-1 );\n    aStat[0] = aSample[i].anLt[iCol];\n    aStat[1] = aSample[i].anEq[iCol];\n  }else{\n    /* At this point, the (iCol+1) field prefix of aSample[i] is the first\n    ** sample that is greater than pRec. Or, if i==pIdx->nSample then pRec\n    ** is larger than all samples in the array. */\n    tRowcnt iUpper, iGap;\n    if( i>=pIdx->nSample ){\n      iUpper = pIdx->nRowEst0;\n    }else{\n      iUpper = aSample[i].anLt[iCol];\n    }\n\n    if( iLower>=iUpper ){\n      iGap = 0;\n    }else{\n      iGap = iUpper - iLower;\n    }\n    if( roundUp ){\n      iGap = (iGap*2)/3;\n    }else{\n      iGap = iGap/3;\n    }\n    aStat[0] = iLower + iGap;\n    aStat[1] = pIdx->aAvgEq[nField-1];\n  }\n\n  /* Restore the pRec->nField value before returning.  */\n  pRec->nField = nField;\n  return i;\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n/*\n** If it is not NULL, pTerm is a term that provides an upper or lower\n** bound on a range scan. Without considering pTerm, it is estimated\n** that the scan will visit nNew rows. This function returns the number\n** estimated to be visited after taking pTerm into account.\n**\n** If the user explicitly specified a likelihood() value for this term,\n** then the return value is the likelihood multiplied by the number of\n** input rows. Otherwise, this function assumes that an \"IS NOT NULL\" term\n** has a likelihood of 0.50, and any other term a likelihood of 0.25.\n*/\nstatic LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){\n  LogEst nRet = nNew;\n  if( pTerm ){\n    if( pTerm->truthProb<=0 ){\n      nRet += pTerm->truthProb;\n    }else if( (pTerm->wtFlags & TERM_VNULL)==0 ){\n      nRet -= 20;        assert( 20==sqlite3LogEst(4) );\n    }\n  }\n  return nRet;\n}\n\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Return the affinity for a single column of an index.\n*/\nSQLITE_PRIVATE char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){\n  assert( iCol>=0 && iCol<pIdx->nColumn );\n  if( !pIdx->zColAff ){\n    if( sqlite3IndexAffinityStr(db, pIdx)==0 ) return SQLITE_AFF_BLOB;\n  }\n  assert( pIdx->zColAff[iCol]!=0 );\n  return pIdx->zColAff[iCol];\n}\n#endif\n\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** This function is called to estimate the number of rows visited by a\n** range-scan on a skip-scan index. For example:\n**\n**   CREATE INDEX i1 ON t1(a, b, c);\n**   SELECT * FROM t1 WHERE a=? AND c BETWEEN ? AND ?;\n**\n** Value pLoop->nOut is currently set to the estimated number of rows\n** visited for scanning (a=? AND b=?). This function reduces that estimate\n** by some factor to account for the (c BETWEEN ? AND ?) expression based\n** on the stat4 data for the index. this scan will be performed multiple\n** times (once for each (a,b) combination that matches a=?) is dealt with\n** by the caller.\n**\n** It does this by scanning through all stat4 samples, comparing values\n** extracted from pLower and pUpper with the corresponding column in each\n** sample. If L and U are the number of samples found to be less than or\n** equal to the values extracted from pLower and pUpper respectively, and\n** N is the total number of samples, the pLoop->nOut value is adjusted\n** as follows:\n**\n**   nOut = nOut * ( min(U - L, 1) / N )\n**\n** If pLower is NULL, or a value cannot be extracted from the term, L is\n** set to zero. If pUpper is NULL, or a value cannot be extracted from it,\n** U is set to N.\n**\n** Normally, this function sets *pbDone to 1 before returning. However,\n** if no value can be extracted from either pLower or pUpper (and so the\n** estimate of the number of rows delivered remains unchanged), *pbDone\n** is left as is.\n**\n** If an error occurs, an SQLite error code is returned. Otherwise,\n** SQLITE_OK.\n*/\nstatic int whereRangeSkipScanEst(\n  Parse *pParse,       /* Parsing & code generating context */\n  WhereTerm *pLower,   /* Lower bound on the range. ex: \"x>123\" Might be NULL */\n  WhereTerm *pUpper,   /* Upper bound on the range. ex: \"x<455\" Might be NULL */\n  WhereLoop *pLoop,    /* Update the .nOut value of this loop */\n  int *pbDone          /* Set to true if at least one expr. value extracted */\n){\n  Index *p = pLoop->u.btree.pIndex;\n  int nEq = pLoop->u.btree.nEq;\n  sqlite3 *db = pParse->db;\n  int nLower = -1;\n  int nUpper = p->nSample+1;\n  int rc = SQLITE_OK;\n  u8 aff = sqlite3IndexColumnAffinity(db, p, nEq);\n  CollSeq *pColl;\n\n  sqlite3_value *p1 = 0;          /* Value extracted from pLower */\n  sqlite3_value *p2 = 0;          /* Value extracted from pUpper */\n  sqlite3_value *pVal = 0;        /* Value extracted from record */\n\n  pColl = sqlite3LocateCollSeq(pParse, p->azColl[nEq]);\n  if( pLower ){\n    rc = sqlite3Stat4ValueFromExpr(pParse, pLower->pExpr->pRight, aff, &p1);\n    nLower = 0;\n  }\n  if( pUpper && rc==SQLITE_OK ){\n    rc = sqlite3Stat4ValueFromExpr(pParse, pUpper->pExpr->pRight, aff, &p2);\n    nUpper = p2 ? 0 : p->nSample;\n  }\n\n  if( p1 || p2 ){\n    int i;\n    int nDiff;\n    for(i=0; rc==SQLITE_OK && i<p->nSample; i++){\n      rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);\n      if( rc==SQLITE_OK && p1 ){\n        int res = sqlite3MemCompare(p1, pVal, pColl);\n        if( res>=0 ) nLower++;\n      }\n      if( rc==SQLITE_OK && p2 ){\n        int res = sqlite3MemCompare(p2, pVal, pColl);\n        if( res>=0 ) nUpper++;\n      }\n    }\n    nDiff = (nUpper - nLower);\n    if( nDiff<=0 ) nDiff = 1;\n\n    /* If there is both an upper and lower bound specified, and the\n    ** comparisons indicate that they are close together, use the fallback\n    ** method (assume that the scan visits 1/64 of the rows) for estimating\n    ** the number of rows visited. Otherwise, estimate the number of rows\n    ** using the method described in the header comment for this function. */\n    if( nDiff!=1 || pUpper==0 || pLower==0 ){\n      int nAdjust = (sqlite3LogEst(p->nSample) - sqlite3LogEst(nDiff));\n      pLoop->nOut -= nAdjust;\n      *pbDone = 1;\n      WHERETRACE(0x20, (\"range skip-scan regions: %u..%u  adjust=%d est=%d\\n\",\n                           nLower, nUpper, nAdjust*-1, pLoop->nOut));\n    }\n\n  }else{\n    assert( *pbDone==0 );\n  }\n\n  sqlite3ValueFree(p1);\n  sqlite3ValueFree(p2);\n  sqlite3ValueFree(pVal);\n\n  return rc;\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n/*\n** This function is used to estimate the number of rows that will be visited\n** by scanning an index for a range of values. The range may have an upper\n** bound, a lower bound, or both. The WHERE clause terms that set the upper\n** and lower bounds are represented by pLower and pUpper respectively. For\n** example, assuming that index p is on t1(a):\n**\n**   ... FROM t1 WHERE a > ? AND a < ? ...\n**                    |_____|   |_____|\n**                       |         |\n**                     pLower    pUpper\n**\n** If either of the upper or lower bound is not present, then NULL is passed in\n** place of the corresponding WhereTerm.\n**\n** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index\n** column subject to the range constraint. Or, equivalently, the number of\n** equality constraints optimized by the proposed index scan. For example,\n** assuming index p is on t1(a, b), and the SQL query is:\n**\n**   ... FROM t1 WHERE a = ? AND b > ? AND b < ? ...\n**\n** then nEq is set to 1 (as the range restricted column, b, is the second\n** left-most column of the index). Or, if the query is:\n**\n**   ... FROM t1 WHERE a > ? AND a < ? ...\n**\n** then nEq is set to 0.\n**\n** When this function is called, *pnOut is set to the sqlite3LogEst() of the\n** number of rows that the index scan is expected to visit without\n** considering the range constraints. If nEq is 0, then *pnOut is the number of\n** rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced)\n** to account for the range constraints pLower and pUpper.\n**\n** In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be\n** used, a single range inequality reduces the search space by a factor of 4.\n** and a pair of constraints (x>? AND x<?) reduces the expected number of\n** rows visited by a factor of 64.\n*/\nstatic int whereRangeScanEst(\n  Parse *pParse,       /* Parsing & code generating context */\n  WhereLoopBuilder *pBuilder,\n  WhereTerm *pLower,   /* Lower bound on the range. ex: \"x>123\" Might be NULL */\n  WhereTerm *pUpper,   /* Upper bound on the range. ex: \"x<455\" Might be NULL */\n  WhereLoop *pLoop     /* Modify the .nOut and maybe .rRun fields */\n){\n  int rc = SQLITE_OK;\n  int nOut = pLoop->nOut;\n  LogEst nNew;\n\n#ifdef SQLITE_ENABLE_STAT4\n  Index *p = pLoop->u.btree.pIndex;\n  int nEq = pLoop->u.btree.nEq;\n\n  if( p->nSample>0 && ALWAYS(nEq<p->nSampleCol)\n   && OptimizationEnabled(pParse->db, SQLITE_Stat4)\n  ){\n    if( nEq==pBuilder->nRecValid ){\n      UnpackedRecord *pRec = pBuilder->pRec;\n      tRowcnt a[2];\n      int nBtm = pLoop->u.btree.nBtm;\n      int nTop = pLoop->u.btree.nTop;\n\n      /* Variable iLower will be set to the estimate of the number of rows in\n      ** the index that are less than the lower bound of the range query. The\n      ** lower bound being the concatenation of $P and $L, where $P is the\n      ** key-prefix formed by the nEq values matched against the nEq left-most\n      ** columns of the index, and $L is the value in pLower.\n      **\n      ** Or, if pLower is NULL or $L cannot be extracted from it (because it\n      ** is not a simple variable or literal value), the lower bound of the\n      ** range is $P. Due to a quirk in the way whereKeyStats() works, even\n      ** if $L is available, whereKeyStats() is called for both ($P) and\n      ** ($P:$L) and the larger of the two returned values is used.\n      **\n      ** Similarly, iUpper is to be set to the estimate of the number of rows\n      ** less than the upper bound of the range query. Where the upper bound\n      ** is either ($P) or ($P:$U). Again, even if $U is available, both values\n      ** of iUpper are requested of whereKeyStats() and the smaller used.\n      **\n      ** The number of rows between the two bounds is then just iUpper-iLower.\n      */\n      tRowcnt iLower;     /* Rows less than the lower bound */\n      tRowcnt iUpper;     /* Rows less than the upper bound */\n      int iLwrIdx = -2;   /* aSample[] for the lower bound */\n      int iUprIdx = -1;   /* aSample[] for the upper bound */\n\n      if( pRec ){\n        testcase( pRec->nField!=pBuilder->nRecValid );\n        pRec->nField = pBuilder->nRecValid;\n      }\n      /* Determine iLower and iUpper using ($P) only. */\n      if( nEq==0 ){\n        iLower = 0;\n        iUpper = p->nRowEst0;\n      }else{\n        /* Note: this call could be optimized away - since the same values must\n        ** have been requested when testing key $P in whereEqualScanEst().  */\n        whereKeyStats(pParse, p, pRec, 0, a);\n        iLower = a[0];\n        iUpper = a[0] + a[1];\n      }\n\n      assert( pLower==0 || (pLower->eOperator & (WO_GT|WO_GE))!=0 );\n      assert( pUpper==0 || (pUpper->eOperator & (WO_LT|WO_LE))!=0 );\n      assert( p->aSortOrder!=0 );\n      if( p->aSortOrder[nEq] ){\n        /* The roles of pLower and pUpper are swapped for a DESC index */\n        SWAP(WhereTerm*, pLower, pUpper);\n        SWAP(int, nBtm, nTop);\n      }\n\n      /* If possible, improve on the iLower estimate using ($P:$L). */\n      if( pLower ){\n        int n;                    /* Values extracted from pExpr */\n        Expr *pExpr = pLower->pExpr->pRight;\n        rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nBtm, nEq, &n);\n        if( rc==SQLITE_OK && n ){\n          tRowcnt iNew;\n          u16 mask = WO_GT|WO_LE;\n          if( sqlite3ExprVectorSize(pExpr)>n ) mask = (WO_LE|WO_LT);\n          iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);\n          iNew = a[0] + ((pLower->eOperator & mask) ? a[1] : 0);\n          if( iNew>iLower ) iLower = iNew;\n          nOut--;\n          pLower = 0;\n        }\n      }\n\n      /* If possible, improve on the iUpper estimate using ($P:$U). */\n      if( pUpper ){\n        int n;                    /* Values extracted from pExpr */\n        Expr *pExpr = pUpper->pExpr->pRight;\n        rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, nTop, nEq, &n);\n        if( rc==SQLITE_OK && n ){\n          tRowcnt iNew;\n          u16 mask = WO_GT|WO_LE;\n          if( sqlite3ExprVectorSize(pExpr)>n ) mask = (WO_LE|WO_LT);\n          iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);\n          iNew = a[0] + ((pUpper->eOperator & mask) ? a[1] : 0);\n          if( iNew<iUpper ) iUpper = iNew;\n          nOut--;\n          pUpper = 0;\n        }\n      }\n\n      pBuilder->pRec = pRec;\n      if( rc==SQLITE_OK ){\n        if( iUpper>iLower ){\n          nNew = sqlite3LogEst(iUpper - iLower);\n          /* TUNING:  If both iUpper and iLower are derived from the same\n          ** sample, then assume they are 4x more selective.  This brings\n          ** the estimated selectivity more in line with what it would be\n          ** if estimated without the use of STAT4 tables. */\n          if( iLwrIdx==iUprIdx ){ nNew -= 20; }\n          assert( 20==sqlite3LogEst(4) );\n        }else{\n          nNew = 10;        assert( 10==sqlite3LogEst(2) );\n        }\n        if( nNew<nOut ){\n          nOut = nNew;\n        }\n        WHERETRACE(0x20, (\"STAT4 range scan: %u..%u  est=%d\\n\",\n                           (u32)iLower, (u32)iUpper, nOut));\n      }\n    }else{\n      int bDone = 0;\n      rc = whereRangeSkipScanEst(pParse, pLower, pUpper, pLoop, &bDone);\n      if( bDone ) return rc;\n    }\n  }\n#else\n  UNUSED_PARAMETER(pParse);\n  UNUSED_PARAMETER(pBuilder);\n  assert( pLower || pUpper );\n#endif\n  assert( pUpper==0 || (pUpper->wtFlags & TERM_VNULL)==0 || pParse->nErr>0 );\n  nNew = whereRangeAdjust(pLower, nOut);\n  nNew = whereRangeAdjust(pUpper, nNew);\n\n  /* TUNING: If there is both an upper and lower limit and neither limit\n  ** has an application-defined likelihood(), assume the range is\n  ** reduced by an additional 75%. This means that, by default, an open-ended\n  ** range query (e.g. col > ?) is assumed to match 1/4 of the rows in the\n  ** index. While a closed range (e.g. col BETWEEN ? AND ?) is estimated to\n  ** match 1/64 of the index. */\n  if( pLower && pLower->truthProb>0 && pUpper && pUpper->truthProb>0 ){\n    nNew -= 20;\n  }\n\n  nOut -= (pLower!=0) + (pUpper!=0);\n  if( nNew<10 ) nNew = 10;\n  if( nNew<nOut ) nOut = nNew;\n#if defined(WHERETRACE_ENABLED)\n  if( pLoop->nOut>nOut ){\n    WHERETRACE(0x20,(\"Range scan lowers nOut from %d to %d\\n\",\n                    pLoop->nOut, nOut));\n  }\n#endif\n  pLoop->nOut = (LogEst)nOut;\n  return rc;\n}\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Estimate the number of rows that will be returned based on\n** an equality constraint x=VALUE and where that VALUE occurs in\n** the histogram data.  This only works when x is the left-most\n** column of an index and sqlite_stat4 histogram data is available\n** for that index.  When pExpr==NULL that means the constraint is\n** \"x IS NULL\" instead of \"x=VALUE\".\n**\n** Write the estimated row count into *pnRow and return SQLITE_OK.\n** If unable to make an estimate, leave *pnRow unchanged and return\n** non-zero.\n**\n** This routine can fail if it is unable to load a collating sequence\n** required for string comparison, or if unable to allocate memory\n** for a UTF conversion required for comparison.  The error is stored\n** in the pParse structure.\n*/\nstatic int whereEqualScanEst(\n  Parse *pParse,       /* Parsing & code generating context */\n  WhereLoopBuilder *pBuilder,\n  Expr *pExpr,         /* Expression for VALUE in the x=VALUE constraint */\n  tRowcnt *pnRow       /* Write the revised row estimate here */\n){\n  Index *p = pBuilder->pNew->u.btree.pIndex;\n  int nEq = pBuilder->pNew->u.btree.nEq;\n  UnpackedRecord *pRec = pBuilder->pRec;\n  int rc;                   /* Subfunction return code */\n  tRowcnt a[2];             /* Statistics */\n  int bOk;\n\n  assert( nEq>=1 );\n  assert( nEq<=p->nColumn );\n  assert( p->aSample!=0 );\n  assert( p->nSample>0 );\n  assert( pBuilder->nRecValid<nEq );\n\n  /* If values are not available for all fields of the index to the left\n  ** of this one, no estimate can be made. Return SQLITE_NOTFOUND. */\n  if( pBuilder->nRecValid<(nEq-1) ){\n    return SQLITE_NOTFOUND;\n  }\n\n  /* This is an optimization only. The call to sqlite3Stat4ProbeSetValue()\n  ** below would return the same value.  */\n  if( nEq>=p->nColumn ){\n    *pnRow = 1;\n    return SQLITE_OK;\n  }\n\n  rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, 1, nEq-1, &bOk);\n  pBuilder->pRec = pRec;\n  if( rc!=SQLITE_OK ) return rc;\n  if( bOk==0 ) return SQLITE_NOTFOUND;\n  pBuilder->nRecValid = nEq;\n\n  whereKeyStats(pParse, p, pRec, 0, a);\n  WHERETRACE(0x20,(\"equality scan regions %s(%d): %d\\n\",\n                   p->zName, nEq-1, (int)a[1]));\n  *pnRow = a[1];\n\n  return rc;\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n#ifdef SQLITE_ENABLE_STAT4\n/*\n** Estimate the number of rows that will be returned based on\n** an IN constraint where the right-hand side of the IN operator\n** is a list of values.  Example:\n**\n**        WHERE x IN (1,2,3,4)\n**\n** Write the estimated row count into *pnRow and return SQLITE_OK.\n** If unable to make an estimate, leave *pnRow unchanged and return\n** non-zero.\n**\n** This routine can fail if it is unable to load a collating sequence\n** required for string comparison, or if unable to allocate memory\n** for a UTF conversion required for comparison.  The error is stored\n** in the pParse structure.\n*/\nstatic int whereInScanEst(\n  Parse *pParse,       /* Parsing & code generating context */\n  WhereLoopBuilder *pBuilder,\n  ExprList *pList,     /* The value list on the RHS of \"x IN (v1,v2,v3,...)\" */\n  tRowcnt *pnRow       /* Write the revised row estimate here */\n){\n  Index *p = pBuilder->pNew->u.btree.pIndex;\n  i64 nRow0 = sqlite3LogEstToInt(p->aiRowLogEst[0]);\n  int nRecValid = pBuilder->nRecValid;\n  int rc = SQLITE_OK;     /* Subfunction return code */\n  tRowcnt nEst;           /* Number of rows for a single term */\n  tRowcnt nRowEst = 0;    /* New estimate of the number of rows */\n  int i;                  /* Loop counter */\n\n  assert( p->aSample!=0 );\n  for(i=0; rc==SQLITE_OK && i<pList->nExpr; i++){\n    nEst = nRow0;\n    rc = whereEqualScanEst(pParse, pBuilder, pList->a[i].pExpr, &nEst);\n    nRowEst += nEst;\n    pBuilder->nRecValid = nRecValid;\n  }\n\n  if( rc==SQLITE_OK ){\n    if( nRowEst > (tRowcnt)nRow0 ) nRowEst = nRow0;\n    *pnRow = nRowEst;\n    WHERETRACE(0x20,(\"IN row estimate: est=%d\\n\", nRowEst));\n  }\n  assert( pBuilder->nRecValid==nRecValid );\n  return rc;\n}\n#endif /* SQLITE_ENABLE_STAT4 */\n\n\n#if defined(WHERETRACE_ENABLED) || defined(SQLITE_DEBUG)\n/*\n** Print the content of a WhereTerm object\n*/\nSQLITE_PRIVATE void sqlite3WhereTermPrint(WhereTerm *pTerm, int iTerm){\n  if( pTerm==0 ){\n    sqlite3DebugPrintf(\"TERM-%-3d NULL\\n\", iTerm);\n  }else{\n    char zType[8];\n    char zLeft[50];\n    memcpy(zType, \"....\", 5);\n    if( pTerm->wtFlags & TERM_VIRTUAL ) zType[0] = 'V';\n    if( pTerm->eOperator & WO_EQUIV  ) zType[1] = 'E';\n    if( ExprHasProperty(pTerm->pExpr, EP_OuterON) ) zType[2] = 'L';\n    if( pTerm->wtFlags & TERM_CODED  ) zType[3] = 'C';\n    if( pTerm->eOperator & WO_SINGLE ){\n      assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );\n      sqlite3_snprintf(sizeof(zLeft),zLeft,\"left={%d:%d}\",\n                       pTerm->leftCursor, pTerm->u.x.leftColumn);\n    }else if( (pTerm->eOperator & WO_OR)!=0 && pTerm->u.pOrInfo!=0 ){\n      sqlite3_snprintf(sizeof(zLeft),zLeft,\"indexable=0x%llx\",\n                       pTerm->u.pOrInfo->indexable);\n    }else{\n      sqlite3_snprintf(sizeof(zLeft),zLeft,\"left=%d\", pTerm->leftCursor);\n    }\n    iTerm = pTerm->iTerm = MAX(iTerm,pTerm->iTerm);\n    sqlite3DebugPrintf(\n       \"TERM-%-3d %p %s %-12s op=%03x wtFlags=%04x\",\n       iTerm, pTerm, zType, zLeft, pTerm->eOperator, pTerm->wtFlags);\n    /* The 0x10000 .wheretrace flag causes extra information to be\n    ** shown about each Term */\n    if( sqlite3WhereTrace & 0x10000 ){\n      sqlite3DebugPrintf(\" prob=%-3d prereq=%llx,%llx\",\n        pTerm->truthProb, (u64)pTerm->prereqAll, (u64)pTerm->prereqRight);\n    }\n    if( (pTerm->eOperator & (WO_OR|WO_AND))==0 && pTerm->u.x.iField ){\n      sqlite3DebugPrintf(\" iField=%d\", pTerm->u.x.iField);\n    }\n    if( pTerm->iParent>=0 ){\n      sqlite3DebugPrintf(\" iParent=%d\", pTerm->iParent);\n    }\n    sqlite3DebugPrintf(\"\\n\");\n    sqlite3TreeViewExpr(0, pTerm->pExpr, 0);\n  }\n}\nSQLITE_PRIVATE void sqlite3ShowWhereTerm(WhereTerm *pTerm){\n  sqlite3WhereTermPrint(pTerm, 0);\n}\n#endif\n\n#ifdef WHERETRACE_ENABLED\n/*\n** Show the complete content of a WhereClause\n*/\nSQLITE_PRIVATE void sqlite3WhereClausePrint(WhereClause *pWC){\n  int i;\n  for(i=0; i<pWC->nTerm; i++){\n    sqlite3WhereTermPrint(&pWC->a[i], i);\n  }\n}\n#endif\n\n#ifdef WHERETRACE_ENABLED\n/*\n** Print a WhereLoop object for debugging purposes\n**\n** Format example:\n**\n**     .--- Position in WHERE clause           rSetup, rRun, nOut ---.\n**     |                                                             |\n**     |  .--- selfMask                       nTerm ------.          |\n**     |  |                                               |          |\n**     |  |   .-- prereq    Idx          wsFlags----.     |          |\n**     |  |   |             Name                    |     |          |\n**     |  |   |           __|__        nEq ---.  ___|__   |        __|__\n**     | / \\ / \\         /     \\              | /      \\ / \\      /     \\\n**     1.002.001         t2.t2xy              2 f 010241 N 2 cost 0,56,31\n*/\nSQLITE_PRIVATE void sqlite3WhereLoopPrint(const WhereLoop *p, const WhereClause *pWC){\n  WhereInfo *pWInfo;\n  if( pWC ){\n    pWInfo = pWC->pWInfo;\n    int nb = 1+(pWInfo->pTabList->nSrc+3)/4;\n    SrcItem *pItem = pWInfo->pTabList->a + p->iTab;\n    Table *pTab = pItem->pSTab;\n    Bitmask mAll = (((Bitmask)1)<<(nb*4)) - 1;\n    sqlite3DebugPrintf(\"%c%2d.%0*llx.%0*llx\", p->cId,\n                       p->iTab, nb, p->maskSelf, nb, p->prereq & mAll);\n    sqlite3DebugPrintf(\" %12s\",\n                       pItem->zAlias ? pItem->zAlias : pTab->zName);\n  }else{\n    pWInfo = 0;\n    sqlite3DebugPrintf(\"%c%2d.%03llx.%03llx %c%d\",\n         p->cId, p->iTab, p->maskSelf, p->prereq & 0xfff, p->cId, p->iTab);\n  }\n  if( (p->wsFlags & WHERE_VIRTUALTABLE)==0 ){\n    const char *zName;\n    if( p->u.btree.pIndex && (zName = p->u.btree.pIndex->zName)!=0 ){\n      if( strncmp(zName, \"sqlite_autoindex_\", 17)==0 ){\n        int i = sqlite3Strlen30(zName) - 1;\n        while( zName[i]!='_' ) i--;\n        zName += i;\n      }\n      sqlite3DebugPrintf(\".%-16s %2d\", zName, p->u.btree.nEq);\n    }else{\n      sqlite3DebugPrintf(\"%20s\",\"\");\n    }\n  }else{\n    char *z;\n    if( p->u.vtab.idxStr ){\n      z = sqlite3_mprintf(\"(%d,\\\"%s\\\",%#x)\",\n                p->u.vtab.idxNum, p->u.vtab.idxStr, p->u.vtab.omitMask);\n    }else{\n      z = sqlite3_mprintf(\"(%d,%x)\", p->u.vtab.idxNum, p->u.vtab.omitMask);\n    }\n    sqlite3DebugPrintf(\" %-19s\", z);\n    sqlite3_free(z);\n  }\n  if( p->wsFlags & WHERE_SKIPSCAN ){\n    sqlite3DebugPrintf(\" f %06x %d-%d\", p->wsFlags, p->nLTerm,p->nSkip);\n  }else{\n    sqlite3DebugPrintf(\" f %06x N %d\", p->wsFlags, p->nLTerm);\n  }\n  if( pWInfo && pWInfo->bStarUsed && p->rStarDelta!=0 ){\n    sqlite3DebugPrintf(\" cost %d,%d,%d delta=%d\\n\",\n                       p->rSetup, p->rRun, p->nOut, p->rStarDelta);\n  }else{\n    sqlite3DebugPrintf(\" cost %d,%d,%d\\n\", p->rSetup, p->rRun, p->nOut);\n  }\n  if( p->nLTerm && (sqlite3WhereTrace & 0x4000)!=0 ){\n    int i;\n    for(i=0; i<p->nLTerm; i++){\n      sqlite3WhereTermPrint(p->aLTerm[i], i);\n    }\n  }\n}\nSQLITE_PRIVATE void sqlite3ShowWhereLoop(const WhereLoop *p){\n  if( p ) sqlite3WhereLoopPrint(p, 0);\n}\nSQLITE_PRIVATE void sqlite3ShowWhereLoopList(const WhereLoop *p){\n  while( p ){\n    sqlite3ShowWhereLoop(p);\n    p = p->pNextLoop;\n  }\n}\n#endif\n\n/*\n** Convert bulk memory into a valid WhereLoop that can be passed\n** to whereLoopClear harmlessly.\n*/\nstatic void whereLoopInit(WhereLoop *p){\n  p->aLTerm = p->aLTermSpace;\n  p->nLTerm = 0;\n  p->nLSlot = ArraySize(p->aLTermSpace);\n  p->wsFlags = 0;\n}\n\n/*\n** Clear the WhereLoop.u union.  Leave WhereLoop.pLTerm intact.\n*/\nstatic void whereLoopClearUnion(sqlite3 *db, WhereLoop *p){\n  if( p->wsFlags & (WHERE_VIRTUALTABLE|WHERE_AUTO_INDEX) ){\n    if( (p->wsFlags & WHERE_VIRTUALTABLE)!=0 && p->u.vtab.needFree ){\n      sqlite3_free(p->u.vtab.idxStr);\n      p->u.vtab.needFree = 0;\n      p->u.vtab.idxStr = 0;\n    }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){\n      sqlite3DbFree(db, p->u.btree.pIndex->zColAff);\n      sqlite3DbFreeNN(db, p->u.btree.pIndex);\n      p->u.btree.pIndex = 0;\n    }\n  }\n}\n\n/*\n** Deallocate internal memory used by a WhereLoop object.  Leave the\n** object in an initialized state, as if it had been newly allocated.\n*/\nstatic void whereLoopClear(sqlite3 *db, WhereLoop *p){\n  if( p->aLTerm!=p->aLTermSpace ){\n    sqlite3DbFreeNN(db, p->aLTerm);\n    p->aLTerm = p->aLTermSpace;\n    p->nLSlot = ArraySize(p->aLTermSpace);\n  }\n  whereLoopClearUnion(db, p);\n  p->nLTerm = 0;\n  p->wsFlags = 0;\n}\n\n/*\n** Increase the memory allocation for pLoop->aLTerm[] to be at least n.\n*/\nstatic int whereLoopResize(sqlite3 *db, WhereLoop *p, int n){\n  WhereTerm **paNew;\n  if( p->nLSlot>=n ) return SQLITE_OK;\n  n = (n+7)&~7;\n  paNew = sqlite3DbMallocRawNN(db, sizeof(p->aLTerm[0])*n);\n  if( paNew==0 ) return SQLITE_NOMEM_BKPT;\n  memcpy(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot);\n  if( p->aLTerm!=p->aLTermSpace ) sqlite3DbFreeNN(db, p->aLTerm);\n  p->aLTerm = paNew;\n  p->nLSlot = n;\n  return SQLITE_OK;\n}\n\n/*\n** Transfer content from the second pLoop into the first.\n*/\nstatic int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){\n  whereLoopClearUnion(db, pTo);\n  if( pFrom->nLTerm > pTo->nLSlot\n   && whereLoopResize(db, pTo, pFrom->nLTerm)\n  ){\n    memset(pTo, 0, WHERE_LOOP_XFER_SZ);\n    return SQLITE_NOMEM_BKPT;\n  }\n  memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ);\n  memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));\n  if( pFrom->wsFlags & WHERE_VIRTUALTABLE ){\n    pFrom->u.vtab.needFree = 0;\n  }else if( (pFrom->wsFlags & WHERE_AUTO_INDEX)!=0 ){\n    pFrom->u.btree.pIndex = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Delete a WhereLoop object\n*/\nstatic void whereLoopDelete(sqlite3 *db, WhereLoop *p){\n  assert( db!=0 );\n  whereLoopClear(db, p);\n  sqlite3DbNNFreeNN(db, p);\n}\n\n/*\n** Free a WhereInfo structure\n*/\nstatic void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){\n  assert( pWInfo!=0 );\n  assert( db!=0 );\n  sqlite3WhereClauseClear(&pWInfo->sWC);\n  while( pWInfo->pLoops ){\n    WhereLoop *p = pWInfo->pLoops;\n    pWInfo->pLoops = p->pNextLoop;\n    whereLoopDelete(db, p);\n  }\n  while( pWInfo->pMemToFree ){\n    WhereMemBlock *pNext = pWInfo->pMemToFree->pNext;\n    sqlite3DbNNFreeNN(db, pWInfo->pMemToFree);\n    pWInfo->pMemToFree = pNext;\n  }\n  sqlite3DbNNFreeNN(db, pWInfo);\n}\n\n/*\n** Return TRUE if X is a proper subset of Y but is of equal or less cost.\n** In other words, return true if all constraints of X are also part of Y\n** and Y has additional constraints that might speed the search that X lacks\n** but the cost of running X is not more than the cost of running Y.\n**\n** In other words, return true if the cost relationship between X and Y\n** is inverted and needs to be adjusted.\n**\n** Case 1:\n**\n**   (1a)  X and Y use the same index.\n**   (1b)  X has fewer == terms than Y\n**   (1c)  Neither X nor Y use skip-scan\n**   (1d)  X does not have a a greater cost than Y\n**\n** Case 2:\n**\n**   (2a)  X has the same or lower cost, or returns the same or fewer rows,\n**         than Y.\n**   (2b)  X uses fewer WHERE clause terms than Y\n**   (2c)  Every WHERE clause term used by X is also used by Y\n**   (2d)  X skips at least as many columns as Y\n**   (2e)  If X is a covering index, than Y is too\n*/\nstatic int whereLoopCheaperProperSubset(\n  const WhereLoop *pX,       /* First WhereLoop to compare */\n  const WhereLoop *pY        /* Compare against this WhereLoop */\n){\n  int i, j;\n  if( pX->rRun>pY->rRun && pX->nOut>pY->nOut ) return 0; /* (1d) and (2a) */\n  assert( (pX->wsFlags & WHERE_VIRTUALTABLE)==0 );\n  assert( (pY->wsFlags & WHERE_VIRTUALTABLE)==0 );\n  if( pX->u.btree.nEq < pY->u.btree.nEq                  /* (1b) */\n   && pX->u.btree.pIndex==pY->u.btree.pIndex             /* (1a) */\n   && pX->nSkip==0 && pY->nSkip==0                       /* (1c) */\n  ){\n    return 1;  /* Case 1 is true */\n  }\n  if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){\n    return 0;                                            /* (2b) */\n  }\n  if( pY->nSkip > pX->nSkip ) return 0;                  /* (2d) */\n  for(i=pX->nLTerm-1; i>=0; i--){\n    if( pX->aLTerm[i]==0 ) continue;\n    for(j=pY->nLTerm-1; j>=0; j--){\n      if( pY->aLTerm[j]==pX->aLTerm[i] ) break;\n    }\n    if( j<0 ) return 0;                                  /* (2c) */\n  }\n  if( (pX->wsFlags&WHERE_IDX_ONLY)!=0\n   && (pY->wsFlags&WHERE_IDX_ONLY)==0 ){\n    return 0;                                            /* (2e) */\n  }\n  return 1;  /* Case 2 is true */\n}\n\n/*\n** Try to adjust the cost and number of output rows of WhereLoop pTemplate\n** upwards or downwards so that:\n**\n**   (1) pTemplate costs less than any other WhereLoops that are a proper\n**       subset of pTemplate\n**\n**   (2) pTemplate costs more than any other WhereLoops for which pTemplate\n**       is a proper subset.\n**\n** To say \"WhereLoop X is a proper subset of Y\" means that X uses fewer\n** WHERE clause terms than Y and that every WHERE clause term used by X is\n** also used by Y.\n*/\nstatic void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){\n  if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;\n  for(; p; p=p->pNextLoop){\n    if( p->iTab!=pTemplate->iTab ) continue;\n    if( (p->wsFlags & WHERE_INDEXED)==0 ) continue;\n    if( whereLoopCheaperProperSubset(p, pTemplate) ){\n      /* Adjust pTemplate cost downward so that it is cheaper than its\n      ** subset p. */\n      WHERETRACE(0x80,(\"subset cost adjustment %d,%d to %d,%d\\n\",\n                       pTemplate->rRun, pTemplate->nOut,\n                       MIN(p->rRun, pTemplate->rRun),\n                       MIN(p->nOut - 1, pTemplate->nOut)));\n      pTemplate->rRun = MIN(p->rRun, pTemplate->rRun);\n      pTemplate->nOut = MIN(p->nOut - 1, pTemplate->nOut);\n    }else if( whereLoopCheaperProperSubset(pTemplate, p) ){\n      /* Adjust pTemplate cost upward so that it is costlier than p since\n      ** pTemplate is a proper subset of p */\n      WHERETRACE(0x80,(\"subset cost adjustment %d,%d to %d,%d\\n\",\n                       pTemplate->rRun, pTemplate->nOut,\n                       MAX(p->rRun, pTemplate->rRun),\n                       MAX(p->nOut + 1, pTemplate->nOut)));\n      pTemplate->rRun = MAX(p->rRun, pTemplate->rRun);\n      pTemplate->nOut = MAX(p->nOut + 1, pTemplate->nOut);\n    }\n  }\n}\n\n/*\n** Search the list of WhereLoops in *ppPrev looking for one that can be\n** replaced by pTemplate.\n**\n** Return NULL if pTemplate does not belong on the WhereLoop list.\n** In other words if pTemplate ought to be dropped from further consideration.\n**\n** If pX is a WhereLoop that pTemplate can replace, then return the\n** link that points to pX.\n**\n** If pTemplate cannot replace any existing element of the list but needs\n** to be added to the list as a new entry, then return a pointer to the\n** tail of the list.\n*/\nstatic WhereLoop **whereLoopFindLesser(\n  WhereLoop **ppPrev,\n  const WhereLoop *pTemplate\n){\n  WhereLoop *p;\n  for(p=(*ppPrev); p; ppPrev=&p->pNextLoop, p=*ppPrev){\n    if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){\n      /* If either the iTab or iSortIdx values for two WhereLoop are different\n      ** then those WhereLoops need to be considered separately.  Neither is\n      ** a candidate to replace the other. */\n      continue;\n    }\n    /* In the current implementation, the rSetup value is either zero\n    ** or the cost of building an automatic index (NlogN) and the NlogN\n    ** is the same for compatible WhereLoops. */\n    assert( p->rSetup==0 || pTemplate->rSetup==0\n                 || p->rSetup==pTemplate->rSetup );\n\n    /* whereLoopAddBtree() always generates and inserts the automatic index\n    ** case first.  Hence compatible candidate WhereLoops never have a larger\n    ** rSetup. Call this SETUP-INVARIANT */\n    assert( p->rSetup>=pTemplate->rSetup );\n\n    /* Any loop using an application-defined index (or PRIMARY KEY or\n    ** UNIQUE constraint) with one or more == constraints is better\n    ** than an automatic index. Unless it is a skip-scan. */\n    if( (p->wsFlags & WHERE_AUTO_INDEX)!=0\n     && (pTemplate->nSkip)==0\n     && (pTemplate->wsFlags & WHERE_INDEXED)!=0\n     && (pTemplate->wsFlags & WHERE_COLUMN_EQ)!=0\n     && (p->prereq & pTemplate->prereq)==pTemplate->prereq\n    ){\n      break;\n    }\n\n    /* If existing WhereLoop p is better than pTemplate, pTemplate can be\n    ** discarded.  WhereLoop p is better if:\n    **   (1)  p has no more dependencies than pTemplate, and\n    **   (2)  p has an equal or lower cost than pTemplate\n    */\n    if( (p->prereq & pTemplate->prereq)==p->prereq    /* (1)  */\n     && p->rSetup<=pTemplate->rSetup                  /* (2a) */\n     && p->rRun<=pTemplate->rRun                      /* (2b) */\n     && p->nOut<=pTemplate->nOut                      /* (2c) */\n    ){\n      return 0;  /* Discard pTemplate */\n    }\n\n    /* If pTemplate is always better than p, then cause p to be overwritten\n    ** with pTemplate.  pTemplate is better than p if:\n    **   (1)  pTemplate has no more dependencies than p, and\n    **   (2)  pTemplate has an equal or lower cost than p.\n    */\n    if( (p->prereq & pTemplate->prereq)==pTemplate->prereq   /* (1)  */\n     && p->rRun>=pTemplate->rRun                             /* (2a) */\n     && p->nOut>=pTemplate->nOut                             /* (2b) */\n    ){\n      assert( p->rSetup>=pTemplate->rSetup ); /* SETUP-INVARIANT above */\n      break;   /* Cause p to be overwritten by pTemplate */\n    }\n  }\n  return ppPrev;\n}\n\n/*\n** Insert or replace a WhereLoop entry using the template supplied.\n**\n** An existing WhereLoop entry might be overwritten if the new template\n** is better and has fewer dependencies.  Or the template will be ignored\n** and no insert will occur if an existing WhereLoop is faster and has\n** fewer dependencies than the template.  Otherwise a new WhereLoop is\n** added based on the template.\n**\n** If pBuilder->pOrSet is not NULL then we care about only the\n** prerequisites and rRun and nOut costs of the N best loops.  That\n** information is gathered in the pBuilder->pOrSet object.  This special\n** processing mode is used only for OR clause processing.\n**\n** When accumulating multiple loops (when pBuilder->pOrSet is NULL) we\n** still might overwrite similar loops with the new template if the\n** new template is better.  Loops may be overwritten if the following\n** conditions are met:\n**\n**    (1)  They have the same iTab.\n**    (2)  They have the same iSortIdx.\n**    (3)  The template has same or fewer dependencies than the current loop\n**    (4)  The template has the same or lower cost than the current loop\n*/\nstatic int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){\n  WhereLoop **ppPrev, *p;\n  WhereInfo *pWInfo = pBuilder->pWInfo;\n  sqlite3 *db = pWInfo->pParse->db;\n  int rc;\n\n  /* Stop the search once we hit the query planner search limit */\n  if( pBuilder->iPlanLimit==0 ){\n    WHERETRACE(0xffffffff,(\"=== query planner search limit reached ===\\n\"));\n    if( pBuilder->pOrSet ) pBuilder->pOrSet->n = 0;\n    return SQLITE_DONE;\n  }\n  pBuilder->iPlanLimit--;\n\n  whereLoopAdjustCost(pWInfo->pLoops, pTemplate);\n\n  /* If pBuilder->pOrSet is defined, then only keep track of the costs\n  ** and prereqs.\n  */\n  if( pBuilder->pOrSet!=0 ){\n    if( pTemplate->nLTerm ){\n#if WHERETRACE_ENABLED\n      u16 n = pBuilder->pOrSet->n;\n      int x =\n#endif\n      whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,\n                                    pTemplate->nOut);\n#if WHERETRACE_ENABLED /* 0x8 */\n      if( sqlite3WhereTrace & 0x8 ){\n        sqlite3DebugPrintf(x?\"   or-%d:  \":\"   or-X:  \", n);\n        sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC);\n      }\n#endif\n    }\n    return SQLITE_OK;\n  }\n\n  /* Look for an existing WhereLoop to replace with pTemplate\n  */\n  ppPrev = whereLoopFindLesser(&pWInfo->pLoops, pTemplate);\n\n  if( ppPrev==0 ){\n    /* There already exists a WhereLoop on the list that is better\n    ** than pTemplate, so just ignore pTemplate */\n#if WHERETRACE_ENABLED /* 0x8 */\n    if( sqlite3WhereTrace & 0x8 ){\n      sqlite3DebugPrintf(\"   skip: \");\n      sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC);\n    }\n#endif\n    return SQLITE_OK;\n  }else{\n    p = *ppPrev;\n  }\n\n  /* If we reach this point it means that either p[] should be overwritten\n  ** with pTemplate[] if p[] exists, or if p==NULL then allocate a new\n  ** WhereLoop and insert it.\n  */\n#if WHERETRACE_ENABLED /* 0x8 */\n  if( sqlite3WhereTrace & 0x8 ){\n    if( p!=0 ){\n      sqlite3DebugPrintf(\"replace: \");\n      sqlite3WhereLoopPrint(p, pBuilder->pWC);\n      sqlite3DebugPrintf(\"   with: \");\n    }else{\n      sqlite3DebugPrintf(\"    add: \");\n    }\n    sqlite3WhereLoopPrint(pTemplate, pBuilder->pWC);\n  }\n#endif\n  if( p==0 ){\n    /* Allocate a new WhereLoop to add to the end of the list */\n    *ppPrev = p = sqlite3DbMallocRawNN(db, sizeof(WhereLoop));\n    if( p==0 ) return SQLITE_NOMEM_BKPT;\n    whereLoopInit(p);\n    p->pNextLoop = 0;\n  }else{\n    /* We will be overwriting WhereLoop p[].  But before we do, first\n    ** go through the rest of the list and delete any other entries besides\n    ** p[] that are also supplanted by pTemplate */\n    WhereLoop **ppTail = &p->pNextLoop;\n    WhereLoop *pToDel;\n    while( *ppTail ){\n      ppTail = whereLoopFindLesser(ppTail, pTemplate);\n      if( ppTail==0 ) break;\n      pToDel = *ppTail;\n      if( pToDel==0 ) break;\n      *ppTail = pToDel->pNextLoop;\n#if WHERETRACE_ENABLED /* 0x8 */\n      if( sqlite3WhereTrace & 0x8 ){\n        sqlite3DebugPrintf(\" delete: \");\n        sqlite3WhereLoopPrint(pToDel, pBuilder->pWC);\n      }\n#endif\n      whereLoopDelete(db, pToDel);\n    }\n  }\n  rc = whereLoopXfer(db, p, pTemplate);\n  if( (p->wsFlags & WHERE_VIRTUALTABLE)==0 ){\n    Index *pIndex = p->u.btree.pIndex;\n    if( pIndex && pIndex->idxType==SQLITE_IDXTYPE_IPK ){\n      p->u.btree.pIndex = 0;\n    }\n  }\n  return rc;\n}\n\n/*\n** Adjust the WhereLoop.nOut value downward to account for terms of the\n** WHERE clause that reference the loop but which are not used by an\n** index.\n*\n** For every WHERE clause term that is not used by the index\n** and which has a truth probability assigned by one of the likelihood(),\n** likely(), or unlikely() SQL functions, reduce the estimated number\n** of output rows by the probability specified.\n**\n** TUNING:  For every WHERE clause term that is not used by the index\n** and which does not have an assigned truth probability, heuristics\n** described below are used to try to estimate the truth probability.\n** TODO --> Perhaps this is something that could be improved by better\n** table statistics.\n**\n** Heuristic 1:  Estimate the truth probability as 93.75%.  The 93.75%\n** value corresponds to -1 in LogEst notation, so this means decrement\n** the WhereLoop.nOut field for every such WHERE clause term.\n**\n** Heuristic 2:  If there exists one or more WHERE clause terms of the\n** form \"x==EXPR\" and EXPR is not a constant 0 or 1, then make sure the\n** final output row estimate is no greater than 1/4 of the total number\n** of rows in the table.  In other words, assume that x==EXPR will filter\n** out at least 3 out of 4 rows.  If EXPR is -1 or 0 or 1, then maybe the\n** \"x\" column is boolean or else -1 or 0 or 1 is a common default value\n** on the \"x\" column and so in that case only cap the output row estimate\n** at 1/2 instead of 1/4.\n*/\nstatic void whereLoopOutputAdjust(\n  WhereClause *pWC,      /* The WHERE clause */\n  WhereLoop *pLoop,      /* The loop to adjust downward */\n  LogEst nRow            /* Number of rows in the entire table */\n){\n  WhereTerm *pTerm, *pX;\n  Bitmask notAllowed = ~(pLoop->prereq|pLoop->maskSelf);\n  int i, j;\n  LogEst iReduce = 0;    /* pLoop->nOut should not exceed nRow-iReduce */\n\n  assert( (pLoop->wsFlags & WHERE_AUTO_INDEX)==0 );\n  for(i=pWC->nBase, pTerm=pWC->a; i>0; i--, pTerm++){\n    assert( pTerm!=0 );\n    if( (pTerm->prereqAll & notAllowed)!=0 ) continue;\n    if( (pTerm->prereqAll & pLoop->maskSelf)==0 ) continue;\n    if( (pTerm->wtFlags & TERM_VIRTUAL)!=0 ) continue;\n    for(j=pLoop->nLTerm-1; j>=0; j--){\n      pX = pLoop->aLTerm[j];\n      if( pX==0 ) continue;\n      if( pX==pTerm ) break;\n      if( pX->iParent>=0 && (&pWC->a[pX->iParent])==pTerm ) break;\n    }\n    if( j<0 ){\n      sqlite3ProgressCheck(pWC->pWInfo->pParse);\n      if( pLoop->maskSelf==pTerm->prereqAll ){\n        /* If there are extra terms in the WHERE clause not used by an index\n        ** that depend only on the table being scanned, and that will tend to\n        ** cause many rows to be omitted, then mark that table as\n        ** \"self-culling\".\n        **\n        ** 2022-03-24:  Self-culling only applies if either the extra terms\n        ** are straight comparison operators that are non-true with NULL\n        ** operand, or if the loop is not an OUTER JOIN.\n        */\n        if( (pTerm->eOperator & 0x3f)!=0\n         || (pWC->pWInfo->pTabList->a[pLoop->iTab].fg.jointype\n                  & (JT_LEFT|JT_LTORJ))==0\n        ){\n          pLoop->wsFlags |= WHERE_SELFCULL;\n        }\n      }\n      if( pTerm->truthProb<=0 ){\n        /* If a truth probability is specified using the likelihood() hints,\n        ** then use the probability provided by the application. */\n        pLoop->nOut += pTerm->truthProb;\n      }else{\n        /* In the absence of explicit truth probabilities, use heuristics to\n        ** guess a reasonable truth probability. */\n        pLoop->nOut--;\n        if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0\n         && (pTerm->wtFlags & TERM_HIGHTRUTH)==0  /* tag-20200224-1 */\n        ){\n          Expr *pRight = pTerm->pExpr->pRight;\n          int k = 0;\n          testcase( pTerm->pExpr->op==TK_IS );\n          if( sqlite3ExprIsInteger(pRight, &k, 0) && k>=(-1) && k<=1 ){\n            k = 10;\n          }else{\n            k = 20;\n          }\n          if( iReduce<k ){\n            pTerm->wtFlags |= TERM_HEURTRUTH;\n            iReduce = k;\n          }\n        }\n      }\n    }\n  }\n  if( pLoop->nOut > nRow-iReduce ){\n    pLoop->nOut = nRow - iReduce;\n  }\n}\n\n/*\n** Term pTerm is a vector range comparison operation. The first comparison\n** in the vector can be optimized using column nEq of the index. This\n** function returns the total number of vector elements that can be used\n** as part of the range comparison.\n**\n** For example, if the query is:\n**\n**   WHERE a = ? AND (b, c, d) > (?, ?, ?)\n**\n** and the index:\n**\n**   CREATE INDEX ... ON (a, b, c, d, e)\n**\n** then this function would be invoked with nEq=1. The value returned in\n** this case is 3.\n*/\nstatic int whereRangeVectorLen(\n  Parse *pParse,       /* Parsing context */\n  int iCur,            /* Cursor open on pIdx */\n  Index *pIdx,         /* The index to be used for a inequality constraint */\n  int nEq,             /* Number of prior equality constraints on same index */\n  WhereTerm *pTerm     /* The vector inequality constraint */\n){\n  int nCmp = sqlite3ExprVectorSize(pTerm->pExpr->pLeft);\n  int i;\n\n  nCmp = MIN(nCmp, (pIdx->nColumn - nEq));\n  for(i=1; i<nCmp; i++){\n    /* Test if comparison i of pTerm is compatible with column (i+nEq)\n    ** of the index. If not, exit the loop.  */\n    char aff;                     /* Comparison affinity */\n    char idxaff = 0;              /* Indexed columns affinity */\n    CollSeq *pColl;               /* Comparison collation sequence */\n    Expr *pLhs, *pRhs;\n\n    assert( ExprUseXList(pTerm->pExpr->pLeft) );\n    pLhs = pTerm->pExpr->pLeft->x.pList->a[i].pExpr;\n    pRhs = pTerm->pExpr->pRight;\n    if( ExprUseXSelect(pRhs) ){\n      pRhs = pRhs->x.pSelect->pEList->a[i].pExpr;\n    }else{\n      pRhs = pRhs->x.pList->a[i].pExpr;\n    }\n\n    /* Check that the LHS of the comparison is a column reference to\n    ** the right column of the right source table. And that the sort\n    ** order of the index column is the same as the sort order of the\n    ** leftmost index column.  */\n    if( pLhs->op!=TK_COLUMN\n     || pLhs->iTable!=iCur\n     || pLhs->iColumn!=pIdx->aiColumn[i+nEq]\n     || pIdx->aSortOrder[i+nEq]!=pIdx->aSortOrder[nEq]\n    ){\n      break;\n    }\n\n    testcase( pLhs->iColumn==XN_ROWID );\n    aff = sqlite3CompareAffinity(pRhs, sqlite3ExprAffinity(pLhs));\n    idxaff = sqlite3TableColumnAffinity(pIdx->pTable, pLhs->iColumn);\n    if( aff!=idxaff ) break;\n\n    pColl = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);\n    if( pColl==0 ) break;\n    if( sqlite3StrICmp(pColl->zName, pIdx->azColl[i+nEq]) ) break;\n  }\n  return i;\n}\n\n/*\n** Adjust the cost C by the costMult factor T.  This only occurs if\n** compiled with -DSQLITE_ENABLE_COSTMULT\n*/\n#ifdef SQLITE_ENABLE_COSTMULT\n# define ApplyCostMultiplier(C,T)  C += T\n#else\n# define ApplyCostMultiplier(C,T)\n#endif\n\n/*\n** We have so far matched pBuilder->pNew->u.btree.nEq terms of the\n** index pIndex. Try to match one more.\n**\n** When this function is called, pBuilder->pNew->nOut contains the\n** number of rows expected to be visited by filtering using the nEq\n** terms only. If it is modified, this value is restored before this\n** function returns.\n**\n** If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is\n** a fake index used for the INTEGER PRIMARY KEY.\n*/\nstatic int whereLoopAddBtreeIndex(\n  WhereLoopBuilder *pBuilder,     /* The WhereLoop factory */\n  SrcItem *pSrc,                  /* FROM clause term being analyzed */\n  Index *pProbe,                  /* An index on pSrc */\n  LogEst nInMul                   /* log(Number of iterations due to IN) */\n){\n  WhereInfo *pWInfo = pBuilder->pWInfo;  /* WHERE analyze context */\n  Parse *pParse = pWInfo->pParse;        /* Parsing context */\n  sqlite3 *db = pParse->db;       /* Database connection malloc context */\n  WhereLoop *pNew;                /* Template WhereLoop under construction */\n  WhereTerm *pTerm;               /* A WhereTerm under consideration */\n  int opMask;                     /* Valid operators for constraints */\n  WhereScan scan;                 /* Iterator for WHERE terms */\n  Bitmask saved_prereq;           /* Original value of pNew->prereq */\n  u16 saved_nLTerm;               /* Original value of pNew->nLTerm */\n  u16 saved_nEq;                  /* Original value of pNew->u.btree.nEq */\n  u16 saved_nBtm;                 /* Original value of pNew->u.btree.nBtm */\n  u16 saved_nTop;                 /* Original value of pNew->u.btree.nTop */\n  u16 saved_nSkip;                /* Original value of pNew->nSkip */\n  u32 saved_wsFlags;              /* Original value of pNew->wsFlags */\n  LogEst saved_nOut;              /* Original value of pNew->nOut */\n  int rc = SQLITE_OK;             /* Return code */\n  LogEst rSize;                   /* Number of rows in the table */\n  LogEst rLogSize;                /* Logarithm of table size */\n  WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */\n\n  pNew = pBuilder->pNew;\n  assert( db->mallocFailed==0 || pParse->nErr>0 );\n  if( pParse->nErr ){\n    return pParse->rc;\n  }\n  WHERETRACE(0x800, (\"BEGIN %s.addBtreeIdx(%s), nEq=%d, nSkip=%d, rRun=%d\\n\",\n                     pProbe->pTable->zName,pProbe->zName,\n                     pNew->u.btree.nEq, pNew->nSkip, pNew->rRun));\n\n  assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );\n  assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 );\n  if( pNew->wsFlags & WHERE_BTM_LIMIT ){\n    opMask = WO_LT|WO_LE;\n  }else{\n    assert( pNew->u.btree.nBtm==0 );\n    opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE|WO_ISNULL|WO_IS;\n  }\n  if( pProbe->bUnordered ){\n    opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE);\n  }\n\n  assert( pNew->u.btree.nEq<pProbe->nColumn );\n  assert( pNew->u.btree.nEq<pProbe->nKeyCol\n       || pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY );\n\n  saved_nEq = pNew->u.btree.nEq;\n  saved_nBtm = pNew->u.btree.nBtm;\n  saved_nTop = pNew->u.btree.nTop;\n  saved_nSkip = pNew->nSkip;\n  saved_nLTerm = pNew->nLTerm;\n  saved_wsFlags = pNew->wsFlags;\n  saved_prereq = pNew->prereq;\n  saved_nOut = pNew->nOut;\n  pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, saved_nEq,\n                        opMask, pProbe);\n  pNew->rSetup = 0;\n  rSize = pProbe->aiRowLogEst[0];\n  rLogSize = estLog(rSize);\n  for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){\n    u16 eOp = pTerm->eOperator;   /* Shorthand for pTerm->eOperator */\n    LogEst rCostIdx;\n    LogEst nOutUnadjusted;        /* nOut before IN() and WHERE adjustments */\n    int nIn = 0;\n#ifdef SQLITE_ENABLE_STAT4\n    int nRecValid = pBuilder->nRecValid;\n#endif\n    if( (eOp==WO_ISNULL || (pTerm->wtFlags&TERM_VNULL)!=0)\n     && indexColumnNotNull(pProbe, saved_nEq)\n    ){\n      continue; /* ignore IS [NOT] NULL constraints on NOT NULL columns */\n    }\n    if( pTerm->prereqRight & pNew->maskSelf ) continue;\n\n    /* Do not allow the upper bound of a LIKE optimization range constraint\n    ** to mix with a lower range bound from some other source */\n    if( pTerm->wtFlags & TERM_LIKEOPT && pTerm->eOperator==WO_LT ) continue;\n\n    if( (pSrc->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0\n     && !constraintCompatibleWithOuterJoin(pTerm,pSrc)\n    ){\n      continue;\n    }\n    if( IsUniqueIndex(pProbe) && saved_nEq==pProbe->nKeyCol-1 ){\n      pBuilder->bldFlags1 |= SQLITE_BLDF1_UNIQUE;\n    }else{\n      pBuilder->bldFlags1 |= SQLITE_BLDF1_INDEXED;\n    }\n    pNew->wsFlags = saved_wsFlags;\n    pNew->u.btree.nEq = saved_nEq;\n    pNew->u.btree.nBtm = saved_nBtm;\n    pNew->u.btree.nTop = saved_nTop;\n    pNew->nLTerm = saved_nLTerm;\n    if( pNew->nLTerm>=pNew->nLSlot\n     && whereLoopResize(db, pNew, pNew->nLTerm+1)\n    ){\n       break; /* OOM while trying to enlarge the pNew->aLTerm array */\n    }\n    pNew->aLTerm[pNew->nLTerm++] = pTerm;\n    pNew->prereq = (saved_prereq | pTerm->prereqRight) & ~pNew->maskSelf;\n\n    assert( nInMul==0\n        || (pNew->wsFlags & WHERE_COLUMN_NULL)!=0\n        || (pNew->wsFlags & WHERE_COLUMN_IN)!=0\n        || (pNew->wsFlags & WHERE_SKIPSCAN)!=0\n    );\n\n    if( eOp & WO_IN ){\n      Expr *pExpr = pTerm->pExpr;\n      if( ExprUseXSelect(pExpr) ){\n        /* \"x IN (SELECT ...)\":  TUNING: the SELECT returns 25 rows */\n        int i;\n        int bRedundant = 0;\n        nIn = 46;  assert( 46==sqlite3LogEst(25) );\n\n        /* The expression may actually be of the form (x, y) IN (SELECT...).\n        ** In this case there is a separate term for each of (x) and (y).\n        ** However, the nIn multiplier should only be applied once, not once\n        ** for each such term. The following loop checks that pTerm is the\n        ** first such term in use, and sets nIn back to 0 if it is not. */\n        for(i=0; i<pNew->nLTerm-1; i++){\n          if( pNew->aLTerm[i] && pNew->aLTerm[i]->pExpr==pExpr ){\n            nIn = 0;\n            if( pNew->aLTerm[i]->u.x.iField == pTerm->u.x.iField ){\n              /* Detect when two or more columns of an index match the same\n              ** column of a vector IN operater, and avoid adding the column\n              ** to the WhereLoop more than once.  See tag-20250707-01\n              ** in test/rowvalue.test */\n              bRedundant = 1;\n            }\n          }\n        }\n        if( bRedundant ){\n          pNew->nLTerm--;\n          continue;\n        }\n      }else if( ALWAYS(pExpr->x.pList && pExpr->x.pList->nExpr) ){\n        /* \"x IN (value, value, ...)\" */\n        nIn = sqlite3LogEst(pExpr->x.pList->nExpr);\n      }\n      if( pProbe->hasStat1 && rLogSize>=10 ){\n        LogEst M, logK, x;\n        /* Let:\n        **   N = the total number of rows in the table\n        **   K = the number of entries on the RHS of the IN operator\n        **   M = the number of rows in the table that match terms to the\n        **       to the left in the same index.  If the IN operator is on\n        **       the left-most index column, M==N.\n        **\n        ** Given the definitions above, it is better to omit the IN operator\n        ** from the index lookup and instead do a scan of the M elements,\n        ** testing each scanned row against the IN operator separately, if:\n        **\n        **        M*log(K) < K*log(N)\n        **\n        ** Our estimates for M, K, and N might be inaccurate, so we build in\n        ** a safety margin of 2 (LogEst: 10) that favors using the IN operator\n        ** with the index, as using an index has better worst-case behavior.\n        ** If we do not have real sqlite_stat1 data, always prefer to use\n        ** the index.  Do not bother with this optimization on very small\n        ** tables (less than 2 rows) as it is pointless in that case.\n        */\n        M = pProbe->aiRowLogEst[saved_nEq];\n        logK = estLog(nIn);\n        /* TUNING      v-----  10 to bias toward indexed IN */\n        x = M + logK + 10 - (nIn + rLogSize);\n        if( x>=0 ){\n          WHERETRACE(0x40,\n            (\"IN operator (N=%d M=%d logK=%d nIn=%d rLogSize=%d x=%d) \"\n             \"prefers indexed lookup\\n\",\n             saved_nEq, M, logK, nIn, rLogSize, x));\n        }else if( nInMul<2 && OptimizationEnabled(db, SQLITE_SeekScan) ){\n          WHERETRACE(0x40,\n            (\"IN operator (N=%d M=%d logK=%d nIn=%d rLogSize=%d x=%d\"\n             \" nInMul=%d) prefers skip-scan\\n\",\n             saved_nEq, M, logK, nIn, rLogSize, x, nInMul));\n          pNew->wsFlags |= WHERE_IN_SEEKSCAN;\n        }else{\n          WHERETRACE(0x40,\n            (\"IN operator (N=%d M=%d logK=%d nIn=%d rLogSize=%d x=%d\"\n             \" nInMul=%d) prefers normal scan\\n\",\n             saved_nEq, M, logK, nIn, rLogSize, x, nInMul));\n          continue;\n        }\n      }\n      pNew->wsFlags |= WHERE_COLUMN_IN;\n    }else if( eOp & (WO_EQ|WO_IS) ){\n      int iCol = pProbe->aiColumn[saved_nEq];\n      pNew->wsFlags |= WHERE_COLUMN_EQ;\n      assert( saved_nEq==pNew->u.btree.nEq );\n      if( iCol==XN_ROWID\n       || (iCol>=0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1)\n      ){\n        if( iCol==XN_ROWID || pProbe->uniqNotNull\n         || (pProbe->nKeyCol==1 && pProbe->onError && (eOp & WO_EQ))\n        ){\n          pNew->wsFlags |= WHERE_ONEROW;\n        }else{\n          pNew->wsFlags |= WHERE_UNQ_WANTED;\n        }\n      }\n      if( scan.iEquiv>1 ) pNew->wsFlags |= WHERE_TRANSCONS;\n    }else if( eOp & WO_ISNULL ){\n      pNew->wsFlags |= WHERE_COLUMN_NULL;\n    }else{\n      int nVecLen = whereRangeVectorLen(\n          pParse, pSrc->iCursor, pProbe, saved_nEq, pTerm\n      );\n      if( eOp & (WO_GT|WO_GE) ){\n        testcase( eOp & WO_GT );\n        testcase( eOp & WO_GE );\n        pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_BTM_LIMIT;\n        pNew->u.btree.nBtm = nVecLen;\n        pBtm = pTerm;\n        pTop = 0;\n        if( pTerm->wtFlags & TERM_LIKEOPT ){\n          /* Range constraints that come from the LIKE optimization are\n          ** always used in pairs. */\n          pTop = &pTerm[1];\n          assert( (pTop-(pTerm->pWC->a))<pTerm->pWC->nTerm );\n          assert( pTop->wtFlags & TERM_LIKEOPT );\n          assert( pTop->eOperator==WO_LT );\n          if( whereLoopResize(db, pNew, pNew->nLTerm+1) ) break; /* OOM */\n          pNew->aLTerm[pNew->nLTerm++] = pTop;\n          pNew->wsFlags |= WHERE_TOP_LIMIT;\n          pNew->u.btree.nTop = 1;\n        }\n      }else{\n        assert( eOp & (WO_LT|WO_LE) );\n        testcase( eOp & WO_LT );\n        testcase( eOp & WO_LE );\n        pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_TOP_LIMIT;\n        pNew->u.btree.nTop = nVecLen;\n        pTop = pTerm;\n        pBtm = (pNew->wsFlags & WHERE_BTM_LIMIT)!=0 ?\n                       pNew->aLTerm[pNew->nLTerm-2] : 0;\n      }\n    }\n\n    /* At this point pNew->nOut is set to the number of rows expected to\n    ** be visited by the index scan before considering term pTerm, or the\n    ** values of nIn and nInMul. In other words, assuming that all\n    ** \"x IN(...)\" terms are replaced with \"x = ?\". This block updates\n    ** the value of pNew->nOut to account for pTerm (but not nIn/nInMul).  */\n    assert( pNew->nOut==saved_nOut );\n    if( pNew->wsFlags & WHERE_COLUMN_RANGE ){\n      /* Adjust nOut using stat4 data. Or, if there is no stat4\n      ** data, using some other estimate.  */\n      whereRangeScanEst(pParse, pBuilder, pBtm, pTop, pNew);\n    }else{\n      int nEq = ++pNew->u.btree.nEq;\n      assert( eOp & (WO_ISNULL|WO_EQ|WO_IN|WO_IS) );\n\n      assert( pNew->nOut==saved_nOut );\n      if( pTerm->truthProb<=0 && pProbe->aiColumn[saved_nEq]>=0 ){\n        assert( (eOp & WO_IN) || nIn==0 );\n        testcase( eOp & WO_IN );\n        pNew->nOut += pTerm->truthProb;\n        pNew->nOut -= nIn;\n      }else{\n#ifdef SQLITE_ENABLE_STAT4\n        tRowcnt nOut = 0;\n        if( nInMul==0\n         && pProbe->nSample\n         && ALWAYS(pNew->u.btree.nEq<=pProbe->nSampleCol)\n         && ((eOp & WO_IN)==0 || ExprUseXList(pTerm->pExpr))\n         && OptimizationEnabled(db, SQLITE_Stat4)\n        ){\n          Expr *pExpr = pTerm->pExpr;\n          if( (eOp & (WO_EQ|WO_ISNULL|WO_IS))!=0 ){\n            testcase( eOp & WO_EQ );\n            testcase( eOp & WO_IS );\n            testcase( eOp & WO_ISNULL );\n            rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);\n          }else{\n            rc = whereInScanEst(pParse, pBuilder, pExpr->x.pList, &nOut);\n          }\n          if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;\n          if( rc!=SQLITE_OK ) break;          /* Jump out of the pTerm loop */\n          if( nOut ){\n            pNew->nOut = sqlite3LogEst(nOut);\n            if( nEq==1\n             /* TUNING: Mark terms as \"low selectivity\" if they seem likely\n             ** to be true for half or more of the rows in the table.\n             ** See tag-202002240-1 */\n             && pNew->nOut+10 > pProbe->aiRowLogEst[0]\n            ){\n#if WHERETRACE_ENABLED /* 0x01 */\n              if( sqlite3WhereTrace & 0x20 ){\n                sqlite3DebugPrintf(\n                   \"STAT4 determines term has low selectivity:\\n\");\n                sqlite3WhereTermPrint(pTerm, 999);\n              }\n#endif\n              pTerm->wtFlags |= TERM_HIGHTRUTH;\n              if( pTerm->wtFlags & TERM_HEURTRUTH ){\n                /* If the term has previously been used with an assumption of\n                ** higher selectivity, then set the flag to rerun the\n                ** loop computations. */\n                pBuilder->bldFlags2 |= SQLITE_BLDF2_2NDPASS;\n              }\n            }\n            if( pNew->nOut>saved_nOut ) pNew->nOut = saved_nOut;\n            pNew->nOut -= nIn;\n          }\n        }\n        if( nOut==0 )\n#endif\n        {\n          pNew->nOut += (pProbe->aiRowLogEst[nEq] - pProbe->aiRowLogEst[nEq-1]);\n          if( eOp & WO_ISNULL ){\n            /* TUNING: If there is no likelihood() value, assume that a\n            ** \"col IS NULL\" expression matches twice as many rows\n            ** as (col=?). */\n            pNew->nOut += 10;\n          }\n        }\n      }\n    }\n\n    /* Set rCostIdx to the estimated cost of visiting selected rows in the\n    ** index.  The estimate is the sum of two values:\n    **   1.  The cost of doing one search-by-key to find the first matching\n    **       entry\n    **   2.  Stepping forward in the index pNew->nOut times to find all\n    **       additional matching entries.\n    */\n    assert( pSrc->pSTab->szTabRow>0 );\n    if( pProbe->idxType==SQLITE_IDXTYPE_IPK ){\n      /* The pProbe->szIdxRow is low for an IPK table since the interior\n      ** pages are small.  Thus szIdxRow gives a good estimate of seek cost.\n      ** But the leaf pages are full-size, so pProbe->szIdxRow would badly\n      ** under-estimate the scanning cost. */\n      rCostIdx = pNew->nOut + 16;\n    }else{\n      rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pSTab->szTabRow;\n    }\n    rCostIdx = sqlite3LogEstAdd(rLogSize, rCostIdx);\n\n    /* Estimate the cost of running the loop.  If all data is coming\n    ** from the index, then this is just the cost of doing the index\n    ** lookup and scan.  But if some data is coming out of the main table,\n    ** we also have to add in the cost of doing pNew->nOut searches to\n    ** locate the row in the main table that corresponds to the index entry.\n    */\n    pNew->rRun = rCostIdx;\n    if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK|WHERE_EXPRIDX))==0 ){\n      pNew->rRun = sqlite3LogEstAdd(pNew->rRun, pNew->nOut + 16);\n    }\n    ApplyCostMultiplier(pNew->rRun, pProbe->pTable->costMult);\n\n    nOutUnadjusted = pNew->nOut;\n    pNew->rRun += nInMul + nIn;\n    pNew->nOut += nInMul + nIn;\n    whereLoopOutputAdjust(pBuilder->pWC, pNew, rSize);\n    rc = whereLoopInsert(pBuilder, pNew);\n\n    if( pNew->wsFlags & WHERE_COLUMN_RANGE ){\n      pNew->nOut = saved_nOut;\n    }else{\n      pNew->nOut = nOutUnadjusted;\n    }\n\n    if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0\n     && pNew->u.btree.nEq<pProbe->nColumn\n     && (pNew->u.btree.nEq<pProbe->nKeyCol ||\n          pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY)\n    ){\n      if( pNew->u.btree.nEq>3 ){\n        sqlite3ProgressCheck(pParse);\n      }\n      whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn);\n    }\n    pNew->nOut = saved_nOut;\n#ifdef SQLITE_ENABLE_STAT4\n    pBuilder->nRecValid = nRecValid;\n#endif\n  }\n  pNew->prereq = saved_prereq;\n  pNew->u.btree.nEq = saved_nEq;\n  pNew->u.btree.nBtm = saved_nBtm;\n  pNew->u.btree.nTop = saved_nTop;\n  pNew->nSkip = saved_nSkip;\n  pNew->wsFlags = saved_wsFlags;\n  pNew->nOut = saved_nOut;\n  pNew->nLTerm = saved_nLTerm;\n\n  /* Consider using a skip-scan if there are no WHERE clause constraints\n  ** available for the left-most terms of the index, and if the average\n  ** number of repeats in the left-most terms is at least 18.\n  **\n  ** The magic number 18 is selected on the basis that scanning 17 rows\n  ** is almost always quicker than an index seek (even though if the index\n  ** contains fewer than 2^17 rows we assume otherwise in other parts of\n  ** the code). And, even if it is not, it should not be too much slower.\n  ** On the other hand, the extra seeks could end up being significantly\n  ** more expensive.  */\n  assert( 42==sqlite3LogEst(18) );\n  if( saved_nEq==saved_nSkip\n   && saved_nEq+1<pProbe->nKeyCol\n   && saved_nEq==pNew->nLTerm\n   && pProbe->noSkipScan==0\n   && pProbe->hasStat1!=0\n   && OptimizationEnabled(db, SQLITE_SkipScan)\n   && pProbe->aiRowLogEst[saved_nEq+1]>=42  /* TUNING: Minimum for skip-scan */\n   && pSrc->fg.fromExists==0\n   && (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK\n  ){\n    LogEst nIter;\n    pNew->u.btree.nEq++;\n    pNew->nSkip++;\n    pNew->aLTerm[pNew->nLTerm++] = 0;\n    pNew->wsFlags |= WHERE_SKIPSCAN;\n    nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];\n    pNew->nOut -= nIter;\n    /* TUNING:  Because uncertainties in the estimates for skip-scan queries,\n    ** add a 1.375 fudge factor to make skip-scan slightly less likely. */\n    nIter += 5;\n    whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);\n    pNew->nOut = saved_nOut;\n    pNew->u.btree.nEq = saved_nEq;\n    pNew->nSkip = saved_nSkip;\n    pNew->wsFlags = saved_wsFlags;\n  }\n\n  WHERETRACE(0x800, (\"END %s.addBtreeIdx(%s), nEq=%d, rc=%d\\n\",\n                      pProbe->pTable->zName, pProbe->zName, saved_nEq, rc));\n  return rc;\n}\n\n/*\n** Return True if it is possible that pIndex might be useful in\n** implementing the ORDER BY clause in pBuilder.\n**\n** Return False if pBuilder does not contain an ORDER BY clause or\n** if there is no way for pIndex to be useful in implementing that\n** ORDER BY clause.\n*/\nstatic int indexMightHelpWithOrderBy(\n  WhereLoopBuilder *pBuilder,\n  Index *pIndex,\n  int iCursor\n){\n  ExprList *pOB;\n  ExprList *aColExpr;\n  int ii, jj;\n\n  if( pIndex->bUnordered ) return 0;\n  if( (pOB = pBuilder->pWInfo->pOrderBy)==0 ) return 0;\n  for(ii=0; ii<pOB->nExpr; ii++){\n    Expr *pExpr = sqlite3ExprSkipCollateAndLikely(pOB->a[ii].pExpr);\n    if( NEVER(pExpr==0) ) continue;\n    if( (pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN)\n     && pExpr->iTable==iCursor\n    ){\n      if( pExpr->iColumn<0 ) return 1;\n      for(jj=0; jj<pIndex->nKeyCol; jj++){\n        if( pExpr->iColumn==pIndex->aiColumn[jj] ) return 1;\n      }\n    }else if( (aColExpr = pIndex->aColExpr)!=0 ){\n      for(jj=0; jj<pIndex->nKeyCol; jj++){\n        if( pIndex->aiColumn[jj]!=XN_EXPR ) continue;\n        if( sqlite3ExprCompareSkip(pExpr,aColExpr->a[jj].pExpr,iCursor)==0 ){\n          return 1;\n        }\n      }\n    }\n  }\n  return 0;\n}\n\n/* Check to see if a partial index with pPartIndexWhere can be used\n** in the current query.  Return true if it can be and false if not.\n*/\nstatic int whereUsablePartialIndex(\n  int iTab,             /* The table for which we want an index */\n  u8 jointype,          /* The JT_* flags on the join */\n  WhereClause *pWC,     /* The WHERE clause of the query */\n  Expr *pWhere          /* The WHERE clause from the partial index */\n){\n  int i;\n  WhereTerm *pTerm;\n  Parse *pParse;\n\n  if( jointype & JT_LTORJ ) return 0;\n  pParse = pWC->pWInfo->pParse;\n  while( pWhere->op==TK_AND ){\n    if( !whereUsablePartialIndex(iTab,jointype,pWC,pWhere->pLeft) ) return 0;\n    pWhere = pWhere->pRight;\n  }\n  for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){\n    Expr *pExpr;\n    pExpr = pTerm->pExpr;\n    if( (!ExprHasProperty(pExpr, EP_OuterON) || pExpr->w.iJoin==iTab)\n     && ((jointype & JT_OUTER)==0 || ExprHasProperty(pExpr, EP_OuterON))\n     && sqlite3ExprImpliesExpr(pParse, pExpr, pWhere, iTab)\n     && !sqlite3ExprImpliesExpr(pParse, pExpr, pWhere, -1)\n     && (pTerm->wtFlags & TERM_VNULL)==0\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** pIdx is an index containing expressions.  Check it see if any of the\n** expressions in the index match the pExpr expression.\n*/\nstatic int exprIsCoveredByIndex(\n  const Expr *pExpr,\n  const Index *pIdx,\n  int iTabCur\n){\n  int i;\n  for(i=0; i<pIdx->nColumn; i++){\n    if( pIdx->aiColumn[i]==XN_EXPR\n     && sqlite3ExprCompare(0, pExpr, pIdx->aColExpr->a[i].pExpr, iTabCur)==0\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Structure passed to the whereIsCoveringIndex Walker callback.\n*/\ntypedef struct CoveringIndexCheck CoveringIndexCheck;\nstruct CoveringIndexCheck {\n  Index *pIdx;       /* The index */\n  int iTabCur;       /* Cursor number for the corresponding table */\n  u8 bExpr;          /* Uses an indexed expression */\n  u8 bUnidx;         /* Uses an unindexed column not within an indexed expr */\n};\n\n/*\n** Information passed in is pWalk->u.pCovIdxCk.  Call it pCk.\n**\n** If the Expr node references the table with cursor pCk->iTabCur, then\n** make sure that column is covered by the index pCk->pIdx.  We know that\n** all columns less than 63 (really BMS-1) are covered, so we don't need\n** to check them.  But we do need to check any column at 63 or greater.\n**\n** If the index does not cover the column, then set pWalk->eCode to\n** non-zero and return WRC_Abort to stop the search.\n**\n** If this node does not disprove that the index can be a covering index,\n** then just return WRC_Continue, to continue the search.\n**\n** If pCk->pIdx contains indexed expressions and one of those expressions\n** matches pExpr, then prune the search.\n*/\nstatic int whereIsCoveringIndexWalkCallback(Walker *pWalk, Expr *pExpr){\n  int i;                    /* Loop counter */\n  const Index *pIdx;        /* The index of interest */\n  const i16 *aiColumn;      /* Columns contained in the index */\n  u16 nColumn;              /* Number of columns in the index */\n  CoveringIndexCheck *pCk;  /* Info about this search */\n\n  pCk = pWalk->u.pCovIdxCk;\n  pIdx = pCk->pIdx;\n  if( (pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN) ){\n    /* if( pExpr->iColumn<(BMS-1) && pIdx->bHasExpr==0 ) return WRC_Continue;*/\n    if( pExpr->iTable!=pCk->iTabCur ) return WRC_Continue;\n    pIdx = pWalk->u.pCovIdxCk->pIdx;\n    aiColumn = pIdx->aiColumn;\n    nColumn = pIdx->nColumn;\n    for(i=0; i<nColumn; i++){\n      if( aiColumn[i]==pExpr->iColumn ) return WRC_Continue;\n    }\n    pCk->bUnidx = 1;\n    return WRC_Abort;\n  }else if( pIdx->bHasExpr\n         && exprIsCoveredByIndex(pExpr, pIdx, pWalk->u.pCovIdxCk->iTabCur) ){\n    pCk->bExpr = 1;\n    return WRC_Prune;\n  }\n  return WRC_Continue;\n}\n\n\n/*\n** pIdx is an index that covers all of the low-number columns used by\n** pWInfo->pSelect (columns from 0 through 62) or an index that has\n** expressions terms.  Hence, we cannot determine whether or not it is\n** a covering index by using the colUsed bitmasks.  We have to do a search\n** to see if the index is covering.  This routine does that search.\n**\n** The return value is one of these:\n**\n**      0                The index is definitely not a covering index\n**\n**      WHERE_IDX_ONLY   The index is definitely a covering index\n**\n**      WHERE_EXPRIDX    The index is likely a covering index, but it is\n**                       difficult to determine precisely because of the\n**                       expressions that are indexed.  Score it as a\n**                       covering index, but still keep the main table open\n**                       just in case we need it.\n**\n** This routine is an optimization.  It is always safe to return zero.\n** But returning one of the other two values when zero should have been\n** returned can lead to incorrect bytecode and assertion faults.\n*/\nstatic SQLITE_NOINLINE u32 whereIsCoveringIndex(\n  WhereInfo *pWInfo,     /* The WHERE clause context */\n  Index *pIdx,           /* Index that is being tested */\n  int iTabCur            /* Cursor for the table being indexed */\n){\n  int i, rc;\n  struct CoveringIndexCheck ck;\n  Walker w;\n  if( pWInfo->pSelect==0 ){\n    /* We don't have access to the full query, so we cannot check to see\n    ** if pIdx is covering.  Assume it is not. */\n    return 0;\n  }\n  if( pIdx->bHasExpr==0 ){\n    for(i=0; i<pIdx->nColumn; i++){\n      if( pIdx->aiColumn[i]>=BMS-1 ) break;\n    }\n    if( i>=pIdx->nColumn ){\n      /* pIdx does not index any columns greater than 62, but we know from\n      ** colMask that columns greater than 62 are used, so this is not a\n      ** covering index */\n      return 0;\n    }\n  }\n  ck.pIdx = pIdx;\n  ck.iTabCur = iTabCur;\n  ck.bExpr = 0;\n  ck.bUnidx = 0;\n  memset(&w, 0, sizeof(w));\n  w.xExprCallback = whereIsCoveringIndexWalkCallback;\n  w.xSelectCallback = sqlite3SelectWalkNoop;\n  w.u.pCovIdxCk = &ck;\n  sqlite3WalkSelect(&w, pWInfo->pSelect);\n  if( ck.bUnidx ){\n    rc = 0;\n  }else if( ck.bExpr ){\n    rc = WHERE_EXPRIDX;\n  }else{\n    rc = WHERE_IDX_ONLY;\n  }\n  return rc;\n}\n\n/*\n** This is an sqlite3ParserAddCleanup() callback that is invoked to\n** free the Parse->pIdxEpr list when the Parse object is destroyed.\n*/\nstatic void whereIndexedExprCleanup(sqlite3 *db, void *pObject){\n  IndexedExpr **pp = (IndexedExpr**)pObject;\n  while( *pp!=0 ){\n    IndexedExpr *p = *pp;\n    *pp = p->pIENext;\n    sqlite3ExprDelete(db, p->pExpr);\n    sqlite3DbFreeNN(db, p);\n  }\n}\n\n/*\n** This function is called for a partial index - one with a WHERE clause - in\n** two scenarios. In both cases, it determines whether or not the WHERE\n** clause on the index implies that a column of the table may be safely\n** replaced by a constant expression. For example, in the following\n** SELECT:\n**\n**   CREATE INDEX i1 ON t1(b, c) WHERE a=<expr>;\n**   SELECT a, b, c FROM t1 WHERE a=<expr> AND b=?;\n**\n** The \"a\" in the select-list may be replaced by <expr>, iff:\n**\n**    (a) <expr> is a constant expression, and\n**    (b) The (a=<expr>) comparison uses the BINARY collation sequence, and\n**    (c) Column \"a\" has an affinity other than NONE or BLOB.\n**\n** If argument pItem is NULL, then pMask must not be NULL. In this case this\n** function is being called as part of determining whether or not pIdx\n** is a covering index. This function clears any bits in (*pMask)\n** corresponding to columns that may be replaced by constants as described\n** above.\n**\n** Otherwise, if pItem is not NULL, then this function is being called\n** as part of coding a loop that uses index pIdx. In this case, add entries\n** to the Parse.pIdxPartExpr list for each column that can be replaced\n** by a constant.\n*/\nstatic void wherePartIdxExpr(\n  Parse *pParse,                  /* Parse context */\n  Index *pIdx,                    /* Partial index being processed */\n  Expr *pPart,                    /* WHERE clause being processed */\n  Bitmask *pMask,                 /* Mask to clear bits in */\n  int iIdxCur,                    /* Cursor number for index */\n  SrcItem *pItem                  /* The FROM clause entry for the table */\n){\n  assert( pItem==0 || (pItem->fg.jointype & JT_RIGHT)==0 );\n  assert( (pItem==0 || pMask==0) && (pMask!=0 || pItem!=0) );\n\n  if( pPart->op==TK_AND ){\n    wherePartIdxExpr(pParse, pIdx, pPart->pRight, pMask, iIdxCur, pItem);\n    pPart = pPart->pLeft;\n  }\n\n  if( (pPart->op==TK_EQ || pPart->op==TK_IS) ){\n    Expr *pLeft = pPart->pLeft;\n    Expr *pRight = pPart->pRight;\n    u8 aff;\n\n    if( pLeft->op!=TK_COLUMN ) return;\n    if( !sqlite3ExprIsConstant(0, pRight) ) return;\n    if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pParse, pPart)) ) return;\n    if( pLeft->iColumn<0 ) return;\n    aff = pIdx->pTable->aCol[pLeft->iColumn].affinity;\n    if( aff>=SQLITE_AFF_TEXT ){\n      if( pItem ){\n        sqlite3 *db = pParse->db;\n        IndexedExpr *p = (IndexedExpr*)sqlite3DbMallocRaw(db, sizeof(*p));\n        if( p ){\n          int bNullRow = (pItem->fg.jointype&(JT_LEFT|JT_LTORJ))!=0;\n          p->pExpr = sqlite3ExprDup(db, pRight, 0);\n          p->iDataCur = pItem->iCursor;\n          p->iIdxCur = iIdxCur;\n          p->iIdxCol = pLeft->iColumn;\n          p->bMaybeNullRow = bNullRow;\n          p->pIENext = pParse->pIdxPartExpr;\n          p->aff = aff;\n          pParse->pIdxPartExpr = p;\n          if( p->pIENext==0 ){\n            void *pArg = (void*)&pParse->pIdxPartExpr;\n            sqlite3ParserAddCleanup(pParse, whereIndexedExprCleanup, pArg);\n          }\n        }\n      }else if( pLeft->iColumn<(BMS-1) ){\n        *pMask &= ~((Bitmask)1 << pLeft->iColumn);\n      }\n    }\n  }\n}\n\n\n/*\n** Add all WhereLoop objects for a single table of the join where the table\n** is identified by pBuilder->pNew->iTab.  That table is guaranteed to be\n** a b-tree table, not a virtual table.\n**\n** The costs (WhereLoop.rRun) of the b-tree loops added by this function\n** are calculated as follows:\n**\n** For a full scan, assuming the table (or index) contains nRow rows:\n**\n**     cost = nRow * 3.0                    // full-table scan\n**     cost = nRow * K                      // scan of covering index\n**     cost = nRow * (K+3.0)                // scan of non-covering index\n**\n** where K is a value between 1.1 and 3.0 set based on the relative\n** estimated average size of the index and table records.\n**\n** For an index scan, where nVisit is the number of index rows visited\n** by the scan, and nSeek is the number of seek operations required on\n** the index b-tree:\n**\n**     cost = nSeek * (log(nRow) + K * nVisit)          // covering index\n**     cost = nSeek * (log(nRow) + (K+3.0) * nVisit)    // non-covering index\n**\n** Normally, nSeek is 1. nSeek values greater than 1 come about if the\n** WHERE clause includes \"x IN (....)\" terms used in place of \"x=?\". Or when\n** implicit \"x IN (SELECT x FROM tbl)\" terms are added for skip-scans.\n**\n** The estimated values (nRow, nVisit, nSeek) often contain a large amount\n** of uncertainty.  For this reason, scoring is designed to pick plans that\n** \"do the least harm\" if the estimates are inaccurate.  For example, a\n** log(nRow) factor is omitted from a non-covering index scan in order to\n** bias the scoring in favor of using an index, since the worst-case\n** performance of using an index is far better than the worst-case performance\n** of a full table scan.\n*/\nstatic int whereLoopAddBtree(\n  WhereLoopBuilder *pBuilder, /* WHERE clause information */\n  Bitmask mPrereq             /* Extra prerequisites for using this table */\n){\n  WhereInfo *pWInfo;          /* WHERE analysis context */\n  Index *pProbe;              /* An index we are evaluating */\n  Index sPk;                  /* A fake index object for the primary key */\n  LogEst aiRowEstPk[2];       /* The aiRowLogEst[] value for the sPk index */\n  i16 aiColumnPk = -1;        /* The aColumn[] value for the sPk index */\n  SrcList *pTabList;          /* The FROM clause */\n  SrcItem *pSrc;              /* The FROM clause btree term to add */\n  WhereLoop *pNew;            /* Template WhereLoop object */\n  int rc = SQLITE_OK;         /* Return code */\n  int iSortIdx = 1;           /* Index number */\n  int b;                      /* A boolean value */\n  LogEst rSize;               /* number of rows in the table */\n  WhereClause *pWC;           /* The parsed WHERE clause */\n  Table *pTab;                /* Table being queried */\n\n  pNew = pBuilder->pNew;\n  pWInfo = pBuilder->pWInfo;\n  pTabList = pWInfo->pTabList;\n  pSrc = pTabList->a + pNew->iTab;\n  pTab = pSrc->pSTab;\n  pWC = pBuilder->pWC;\n  assert( !IsVirtual(pSrc->pSTab) );\n\n  if( pSrc->fg.isIndexedBy ){\n    assert( pSrc->fg.isCte==0 );\n    /* An INDEXED BY clause specifies a particular index to use */\n    pProbe = pSrc->u2.pIBIndex;\n  }else if( !HasRowid(pTab) ){\n    pProbe = pTab->pIndex;\n  }else{\n    /* There is no INDEXED BY clause.  Create a fake Index object in local\n    ** variable sPk to represent the rowid primary key index.  Make this\n    ** fake index the first in a chain of Index objects with all of the real\n    ** indices to follow */\n    Index *pFirst;                  /* First of real indices on the table */\n    memset(&sPk, 0, sizeof(Index));\n    sPk.nKeyCol = 1;\n    sPk.nColumn = 1;\n    sPk.aiColumn = &aiColumnPk;\n    sPk.aiRowLogEst = aiRowEstPk;\n    sPk.onError = OE_Replace;\n    sPk.pTable = pTab;\n    sPk.szIdxRow = 3;  /* TUNING: Interior rows of IPK table are very small */\n    sPk.idxType = SQLITE_IDXTYPE_IPK;\n    aiRowEstPk[0] = pTab->nRowLogEst;\n    aiRowEstPk[1] = 0;\n    pFirst = pSrc->pSTab->pIndex;\n    if( pSrc->fg.notIndexed==0 ){\n      /* The real indices of the table are only considered if the\n      ** NOT INDEXED qualifier is omitted from the FROM clause */\n      sPk.pNext = pFirst;\n    }\n    pProbe = &sPk;\n  }\n  rSize = pTab->nRowLogEst;\n\n#ifndef SQLITE_OMIT_AUTOMATIC_INDEX\n  /* Automatic indexes */\n  if( !pBuilder->pOrSet      /* Not part of an OR optimization */\n   && (pWInfo->wctrlFlags & (WHERE_RIGHT_JOIN|WHERE_OR_SUBCLAUSE))==0\n   && (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0\n   && !pSrc->fg.isIndexedBy  /* Has no INDEXED BY clause */\n   && !pSrc->fg.notIndexed   /* Has no NOT INDEXED clause */\n   && !pSrc->fg.isCorrelated /* Not a correlated subquery */\n   && !pSrc->fg.isRecursive  /* Not a recursive common table expression. */\n   && (pSrc->fg.jointype & JT_RIGHT)==0 /* Not the right tab of a RIGHT JOIN */\n  ){\n    /* Generate auto-index WhereLoops */\n    LogEst rLogSize;         /* Logarithm of the number of rows in the table */\n    WhereTerm *pTerm;\n    WhereTerm *pWCEnd = pWC->a + pWC->nTerm;\n    rLogSize = estLog(rSize);\n    for(pTerm=pWC->a; rc==SQLITE_OK && pTerm<pWCEnd; pTerm++){\n      if( pTerm->prereqRight & pNew->maskSelf ) continue;\n      if( termCanDriveIndex(pTerm, pSrc, 0) ){\n        pNew->u.btree.nEq = 1;\n        pNew->nSkip = 0;\n        pNew->u.btree.pIndex = 0;\n        pNew->nLTerm = 1;\n        pNew->aLTerm[0] = pTerm;\n        /* TUNING: One-time cost for computing the automatic index is\n        ** estimated to be X*N*log2(N) where N is the number of rows in\n        ** the table being indexed and where X is 7 (LogEst=28) for normal\n        ** tables or 0.5 (LogEst=-10) for views and subqueries.  The value\n        ** of X is smaller for views and subqueries so that the query planner\n        ** will be more aggressive about generating automatic indexes for\n        ** those objects, since there is no opportunity to add schema\n        ** indexes on subqueries and views. */\n        pNew->rSetup = rLogSize + rSize;\n        if( !IsView(pTab) && (pTab->tabFlags & TF_Ephemeral)==0 ){\n          pNew->rSetup += 28;\n        }else{\n          pNew->rSetup -= 25;  /* Greatly reduced setup cost for auto indexes\n                               ** on ephemeral materializations of views */\n        }\n        ApplyCostMultiplier(pNew->rSetup, pTab->costMult);\n        if( pNew->rSetup<0 ) pNew->rSetup = 0;\n        /* TUNING: Each index lookup yields 20 rows in the table.  This\n        ** is more than the usual guess of 10 rows, since we have no way\n        ** of knowing how selective the index will ultimately be.  It would\n        ** not be unreasonable to make this value much larger. */\n        pNew->nOut = 43;  assert( 43==sqlite3LogEst(20) );\n        pNew->rRun = sqlite3LogEstAdd(rLogSize,pNew->nOut);\n        pNew->wsFlags = WHERE_AUTO_INDEX;\n        pNew->prereq = mPrereq | pTerm->prereqRight;\n        rc = whereLoopInsert(pBuilder, pNew);\n      }\n    }\n  }\n#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */\n\n  /* Loop over all indices. If there was an INDEXED BY clause, then only\n  ** consider index pProbe.  */\n  for(; rc==SQLITE_OK && pProbe;\n      pProbe=(pSrc->fg.isIndexedBy ? 0 : pProbe->pNext), iSortIdx++\n  ){\n    if( pProbe->pPartIdxWhere!=0\n     && !whereUsablePartialIndex(pSrc->iCursor, pSrc->fg.jointype, pWC,\n                                 pProbe->pPartIdxWhere)\n    ){\n      testcase( pNew->iTab!=pSrc->iCursor );  /* See ticket [98d973b8f5] */\n      continue;  /* Partial index inappropriate for this query */\n    }\n    if( pProbe->bNoQuery ) continue;\n    rSize = pProbe->aiRowLogEst[0];\n    pNew->u.btree.nEq = 0;\n    pNew->u.btree.nBtm = 0;\n    pNew->u.btree.nTop = 0;\n    pNew->u.btree.nDistinctCol = 0;\n    pNew->nSkip = 0;\n    pNew->nLTerm = 0;\n    pNew->iSortIdx = 0;\n    pNew->rSetup = 0;\n    pNew->prereq = mPrereq;\n    pNew->nOut = rSize;\n    pNew->u.btree.pIndex = pProbe;\n    pNew->u.btree.pOrderBy = 0;\n    b = indexMightHelpWithOrderBy(pBuilder, pProbe, pSrc->iCursor);\n\n    /* The ONEPASS_DESIRED flags never occurs together with ORDER BY */\n    assert( (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || b==0 );\n    if( pProbe->idxType==SQLITE_IDXTYPE_IPK ){\n      /* Integer primary key index */\n      pNew->wsFlags = WHERE_IPK;\n\n      /* Full table scan */\n      pNew->iSortIdx = b ? iSortIdx : 0;\n      /* TUNING: Cost of full table scan is 3.0*N.  The 3.0 factor is an\n      ** extra cost designed to discourage the use of full table scans,\n      ** since index lookups have better worst-case performance if our\n      ** stat guesses are wrong.  Reduce the 3.0 penalty slightly\n      ** (to 2.75) if we have valid STAT4 information for the table.\n      ** At 2.75, a full table scan is preferred over using an index on\n      ** a column with just two distinct values where each value has about\n      ** an equal number of appearances.  Without STAT4 data, we still want\n      ** to use an index in that case, since the constraint might be for\n      ** the scarcer of the two values, and in that case an index lookup is\n      ** better.\n      */\n#ifdef SQLITE_ENABLE_STAT4\n      pNew->rRun = rSize + 16 - 2*((pTab->tabFlags & TF_HasStat4)!=0);\n#else\n      pNew->rRun = rSize + 16;\n#endif\n      ApplyCostMultiplier(pNew->rRun, pTab->costMult);\n      whereLoopOutputAdjust(pWC, pNew, rSize);\n      if( pSrc->fg.isSubquery ){\n        if( pSrc->fg.viaCoroutine ) pNew->wsFlags |= WHERE_COROUTINE;\n        pNew->u.btree.pOrderBy = pSrc->u4.pSubq->pSelect->pOrderBy;\n      }\n      rc = whereLoopInsert(pBuilder, pNew);\n      pNew->nOut = rSize;\n      if( rc ) break;\n    }else{\n      Bitmask m;\n      if( pProbe->isCovering ){\n        m = 0;\n        pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED;\n      }else{\n        m = pSrc->colUsed & pProbe->colNotIdxed;\n        if( pProbe->pPartIdxWhere ){\n          wherePartIdxExpr(\n              pWInfo->pParse, pProbe, pProbe->pPartIdxWhere, &m, 0, 0\n          );\n        }\n        pNew->wsFlags = WHERE_INDEXED;\n        if( m==TOPBIT || (pProbe->bHasExpr && !pProbe->bHasVCol && m!=0) ){\n          u32 isCov = whereIsCoveringIndex(pWInfo, pProbe, pSrc->iCursor);\n          if( isCov==0 ){\n            WHERETRACE(0x200,\n               (\"-> %s is not a covering index\"\n                \" according to whereIsCoveringIndex()\\n\", pProbe->zName));\n            assert( m!=0 );\n          }else{\n            m = 0;\n            pNew->wsFlags |= isCov;\n            if( isCov & WHERE_IDX_ONLY ){\n              WHERETRACE(0x200,\n                 (\"-> %s is a covering expression index\"\n                  \" according to whereIsCoveringIndex()\\n\", pProbe->zName));\n            }else{\n              assert( isCov==WHERE_EXPRIDX );\n              WHERETRACE(0x200,\n                 (\"-> %s might be a covering expression index\"\n                  \" according to whereIsCoveringIndex()\\n\", pProbe->zName));\n            }\n          }\n        }else if( m==0\n           && (HasRowid(pTab) || pWInfo->pSelect!=0 || sqlite3FaultSim(700))\n        ){\n          WHERETRACE(0x200,\n             (\"-> %s is a covering index according to bitmasks\\n\",\n             pProbe->zName, m==0 ? \"is\" : \"is not\"));\n          pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED;\n        }\n      }\n\n      /* Full scan via index */\n      if( b\n       || !HasRowid(pTab)\n       || pProbe->pPartIdxWhere!=0\n       || pSrc->fg.isIndexedBy\n       || ( m==0\n         && pProbe->bUnordered==0\n         && (pProbe->szIdxRow<pTab->szTabRow)\n         && (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0\n         && sqlite3GlobalConfig.bUseCis\n         && OptimizationEnabled(pWInfo->pParse->db, SQLITE_CoverIdxScan)\n          )\n      ){\n        pNew->iSortIdx = b ? iSortIdx : 0;\n\n        /* The cost of visiting the index rows is N*K, where K is\n        ** between 1.1 and 3.0, depending on the relative sizes of the\n        ** index and table rows. */\n        pNew->rRun = rSize + 1 + (15*pProbe->szIdxRow)/pTab->szTabRow;\n        if( m!=0 ){\n          /* If this is a non-covering index scan, add in the cost of\n          ** doing table lookups.  The cost will be 3x the number of\n          ** lookups.  Take into account WHERE clause terms that can be\n          ** satisfied using just the index, and that do not require a\n          ** table lookup. */\n          LogEst nLookup = rSize + 16;  /* Base cost:  N*3 */\n          int ii;\n          int iCur = pSrc->iCursor;\n          WhereClause *pWC2 = &pWInfo->sWC;\n          for(ii=0; ii<pWC2->nTerm; ii++){\n            WhereTerm *pTerm = &pWC2->a[ii];\n            if( !sqlite3ExprCoveredByIndex(pTerm->pExpr, iCur, pProbe) ){\n              break;\n            }\n            /* pTerm can be evaluated using just the index.  So reduce\n            ** the expected number of table lookups accordingly */\n            if( pTerm->truthProb<=0 ){\n              nLookup += pTerm->truthProb;\n            }else{\n              nLookup--;\n              if( pTerm->eOperator & (WO_EQ|WO_IS) ) nLookup -= 19;\n            }\n          }\n\n          pNew->rRun = sqlite3LogEstAdd(pNew->rRun, nLookup);\n        }\n        ApplyCostMultiplier(pNew->rRun, pTab->costMult);\n        whereLoopOutputAdjust(pWC, pNew, rSize);\n        if( (pSrc->fg.jointype & JT_RIGHT)!=0 && pProbe->aColExpr ){\n          /* Do not do an SCAN of a index-on-expression in a RIGHT JOIN\n          ** because the cursor used to access the index might not be\n          ** positioned to the correct row during the right-join no-match\n          ** loop. */\n        }else{\n          rc = whereLoopInsert(pBuilder, pNew);\n        }\n        pNew->nOut = rSize;\n        if( rc ) break;\n      }\n    }\n\n    pBuilder->bldFlags1 = 0;\n    rc = whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, 0);\n    if( pBuilder->bldFlags1==SQLITE_BLDF1_INDEXED ){\n      /* If a non-unique index is used, or if a prefix of the key for\n      ** unique index is used (making the index functionally non-unique)\n      ** then the sqlite_stat1 data becomes important for scoring the\n      ** plan */\n      pTab->tabFlags |= TF_MaybeReanalyze;\n    }\n#ifdef SQLITE_ENABLE_STAT4\n    sqlite3Stat4ProbeFree(pBuilder->pRec);\n    pBuilder->nRecValid = 0;\n    pBuilder->pRec = 0;\n#endif\n  }\n  return rc;\n}\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n\n/*\n** Return true if pTerm is a virtual table LIMIT or OFFSET term.\n*/\nstatic int isLimitTerm(WhereTerm *pTerm){\n  assert( pTerm->eOperator==WO_AUX || pTerm->eMatchOp==0 );\n  return pTerm->eMatchOp>=SQLITE_INDEX_CONSTRAINT_LIMIT\n      && pTerm->eMatchOp<=SQLITE_INDEX_CONSTRAINT_OFFSET;\n}\n\n/*\n** Return true if the first nCons constraints in the pUsage array are\n** marked as in-use (have argvIndex>0). False otherwise.\n*/\nstatic int allConstraintsUsed(\n  struct sqlite3_index_constraint_usage *aUsage,\n  int nCons\n){\n  int ii;\n  for(ii=0; ii<nCons; ii++){\n    if( aUsage[ii].argvIndex<=0 ) return 0;\n  }\n  return 1;\n}\n\n/*\n** Argument pIdxInfo is already populated with all constraints that may\n** be used by the virtual table identified by pBuilder->pNew->iTab. This\n** function marks a subset of those constraints usable, invokes the\n** xBestIndex method and adds the returned plan to pBuilder.\n**\n** A constraint is marked usable if:\n**\n**   * Argument mUsable indicates that its prerequisites are available, and\n**\n**   * It is not one of the operators specified in the mExclude mask passed\n**     as the fourth argument (which in practice is either WO_IN or 0).\n**\n** Argument mPrereq is a mask of tables that must be scanned before the\n** virtual table in question. These are added to the plans prerequisites\n** before it is added to pBuilder.\n**\n** Output parameter *pbIn is set to true if the plan added to pBuilder\n** uses one or more WO_IN terms, or false otherwise.\n*/\nstatic int whereLoopAddVirtualOne(\n  WhereLoopBuilder *pBuilder,\n  Bitmask mPrereq,                /* Mask of tables that must be used. */\n  Bitmask mUsable,                /* Mask of usable tables */\n  u16 mExclude,                   /* Exclude terms using these operators */\n  sqlite3_index_info *pIdxInfo,   /* Populated object for xBestIndex */\n  u16 mNoOmit,                    /* Do not omit these constraints */\n  int *pbIn,                      /* OUT: True if plan uses an IN(...) op */\n  int *pbRetryLimit               /* OUT: Retry without LIMIT/OFFSET */\n){\n  WhereClause *pWC = pBuilder->pWC;\n  HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];\n  struct sqlite3_index_constraint *pIdxCons;\n  struct sqlite3_index_constraint_usage *pUsage = pIdxInfo->aConstraintUsage;\n  int i;\n  int mxTerm;\n  int rc = SQLITE_OK;\n  WhereLoop *pNew = pBuilder->pNew;\n  Parse *pParse = pBuilder->pWInfo->pParse;\n  SrcItem *pSrc = &pBuilder->pWInfo->pTabList->a[pNew->iTab];\n  int nConstraint = pIdxInfo->nConstraint;\n\n  assert( (mUsable & mPrereq)==mPrereq );\n  *pbIn = 0;\n  pNew->prereq = mPrereq;\n\n  /* Set the usable flag on the subset of constraints identified by\n  ** arguments mUsable and mExclude. */\n  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;\n  for(i=0; i<nConstraint; i++, pIdxCons++){\n    WhereTerm *pTerm = termFromWhereClause(pWC, pIdxCons->iTermOffset);\n    pIdxCons->usable = 0;\n    if( (pTerm->prereqRight & mUsable)==pTerm->prereqRight\n     && (pTerm->eOperator & mExclude)==0\n     && (pbRetryLimit || !isLimitTerm(pTerm))\n    ){\n      pIdxCons->usable = 1;\n    }\n  }\n\n  /* Initialize the output fields of the sqlite3_index_info structure */\n  memset(pUsage, 0, sizeof(pUsage[0])*nConstraint);\n  assert( pIdxInfo->needToFreeIdxStr==0 );\n  pIdxInfo->idxStr = 0;\n  pIdxInfo->idxNum = 0;\n  pIdxInfo->orderByConsumed = 0;\n  pIdxInfo->estimatedCost = SQLITE_BIG_DBL / (double)2;\n  pIdxInfo->estimatedRows = 25;\n  pIdxInfo->idxFlags = 0;\n  pHidden->mHandleIn = 0;\n\n  /* Invoke the virtual table xBestIndex() method */\n  rc = vtabBestIndex(pParse, pSrc->pSTab, pIdxInfo);\n  if( rc ){\n    if( rc==SQLITE_CONSTRAINT ){\n      /* If the xBestIndex method returns SQLITE_CONSTRAINT, that means\n      ** that the particular combination of parameters provided is unusable.\n      ** Make no entries in the loop table.\n      */\n      WHERETRACE(0xffffffff, (\"  ^^^^--- non-viable plan rejected!\\n\"));\n      freeIdxStr(pIdxInfo);\n      return SQLITE_OK;\n    }\n    return rc;\n  }\n\n  mxTerm = -1;\n  assert( pNew->nLSlot>=nConstraint );\n  memset(pNew->aLTerm, 0, sizeof(pNew->aLTerm[0])*nConstraint );\n  memset(&pNew->u.vtab, 0, sizeof(pNew->u.vtab));\n  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;\n  for(i=0; i<nConstraint; i++, pIdxCons++){\n    int iTerm;\n    if( (iTerm = pUsage[i].argvIndex - 1)>=0 ){\n      WhereTerm *pTerm;\n      int j = pIdxCons->iTermOffset;\n      if( iTerm>=nConstraint\n       || j<0\n       || (pTerm = termFromWhereClause(pWC, j))==0\n       || pNew->aLTerm[iTerm]!=0\n       || pIdxCons->usable==0\n      ){\n        sqlite3ErrorMsg(pParse,\"%s.xBestIndex malfunction\",pSrc->pSTab->zName);\n        freeIdxStr(pIdxInfo);\n        return SQLITE_ERROR;\n      }\n      testcase( iTerm==nConstraint-1 );\n      testcase( j==0 );\n      testcase( j==pWC->nTerm-1 );\n      pNew->prereq |= pTerm->prereqRight;\n      assert( iTerm<pNew->nLSlot );\n      pNew->aLTerm[iTerm] = pTerm;\n      if( iTerm>mxTerm ) mxTerm = iTerm;\n      testcase( iTerm==15 );\n      testcase( iTerm==16 );\n      if( pUsage[i].omit ){\n        if( i<16 && ((1<<i)&mNoOmit)==0 ){\n          testcase( i!=iTerm );\n          pNew->u.vtab.omitMask |= 1<<iTerm;\n        }else{\n          testcase( i!=iTerm );\n        }\n        if( pTerm->eMatchOp==SQLITE_INDEX_CONSTRAINT_OFFSET ){\n          pNew->u.vtab.bOmitOffset = 1;\n        }\n      }\n      if( SMASKBIT32(i) & pHidden->mHandleIn ){\n        pNew->u.vtab.mHandleIn |= MASKBIT32(iTerm);\n      }else if( (pTerm->eOperator & WO_IN)!=0 ){\n        /* A virtual table that is constrained by an IN clause may not\n        ** consume the ORDER BY clause because (1) the order of IN terms\n        ** is not necessarily related to the order of output terms and\n        ** (2) Multiple outputs from a single IN value will not merge\n        ** together.  */\n        pIdxInfo->orderByConsumed = 0;\n        pIdxInfo->idxFlags &= ~SQLITE_INDEX_SCAN_UNIQUE;\n        *pbIn = 1; assert( (mExclude & WO_IN)==0 );\n      }\n\n      /* Unless pbRetryLimit is non-NULL, there should be no LIMIT/OFFSET\n      ** terms. And if there are any, they should follow all other terms. */\n      assert( pbRetryLimit || !isLimitTerm(pTerm) );\n      assert( !isLimitTerm(pTerm) || i>=nConstraint-2 );\n      assert( !isLimitTerm(pTerm) || i==nConstraint-1 || isLimitTerm(pTerm+1) );\n\n      if( isLimitTerm(pTerm) && (*pbIn || !allConstraintsUsed(pUsage, i)) ){\n        /* If there is an IN(...) term handled as an == (separate call to\n        ** xFilter for each value on the RHS of the IN) and a LIMIT or\n        ** OFFSET term handled as well, the plan is unusable. Similarly,\n        ** if there is a LIMIT/OFFSET and there are other unused terms,\n        ** the plan cannot be used. In these cases set variable *pbRetryLimit\n        ** to true to tell the caller to retry with LIMIT and OFFSET\n        ** disabled. */\n        freeIdxStr(pIdxInfo);\n        *pbRetryLimit = 1;\n        return SQLITE_OK;\n      }\n    }\n  }\n\n  pNew->nLTerm = mxTerm+1;\n  for(i=0; i<=mxTerm; i++){\n    if( pNew->aLTerm[i]==0 ){\n      /* The non-zero argvIdx values must be contiguous.  Raise an\n      ** error if they are not */\n      sqlite3ErrorMsg(pParse,\"%s.xBestIndex malfunction\",pSrc->pSTab->zName);\n      freeIdxStr(pIdxInfo);\n      return SQLITE_ERROR;\n    }\n  }\n  assert( pNew->nLTerm<=pNew->nLSlot );\n  pNew->u.vtab.idxNum = pIdxInfo->idxNum;\n  pNew->u.vtab.needFree = pIdxInfo->needToFreeIdxStr;\n  pIdxInfo->needToFreeIdxStr = 0;\n  pNew->u.vtab.idxStr = pIdxInfo->idxStr;\n  pNew->u.vtab.isOrdered = (i8)(pIdxInfo->orderByConsumed ?\n      pIdxInfo->nOrderBy : 0);\n  pNew->u.vtab.bIdxNumHex = (pIdxInfo->idxFlags&SQLITE_INDEX_SCAN_HEX)!=0;\n  pNew->rSetup = 0;\n  pNew->rRun = sqlite3LogEstFromDouble(pIdxInfo->estimatedCost);\n  pNew->nOut = sqlite3LogEst(pIdxInfo->estimatedRows);\n\n  /* Set the WHERE_ONEROW flag if the xBestIndex() method indicated\n  ** that the scan will visit at most one row. Clear it otherwise. */\n  if( pIdxInfo->idxFlags & SQLITE_INDEX_SCAN_UNIQUE ){\n    pNew->wsFlags |= WHERE_ONEROW;\n  }else{\n    pNew->wsFlags &= ~WHERE_ONEROW;\n  }\n  rc = whereLoopInsert(pBuilder, pNew);\n  if( pNew->u.vtab.needFree ){\n    sqlite3_free(pNew->u.vtab.idxStr);\n    pNew->u.vtab.needFree = 0;\n  }\n  WHERETRACE(0xffffffff, (\"  bIn=%d prereqIn=%04llx prereqOut=%04llx\\n\",\n                      *pbIn, (sqlite3_uint64)mPrereq,\n                      (sqlite3_uint64)(pNew->prereq & ~mPrereq)));\n\n  return rc;\n}\n\n/*\n** Return the collating sequence for a constraint passed into xBestIndex.\n**\n** pIdxInfo must be an sqlite3_index_info structure passed into xBestIndex.\n** This routine depends on there being a HiddenIndexInfo structure immediately\n** following the sqlite3_index_info structure.\n**\n** Return a pointer to the collation name:\n**\n**    1. If there is an explicit COLLATE operator on the constraint, return it.\n**\n**    2. Else, if the column has an alternative collation, return that.\n**\n**    3. Otherwise, return \"BINARY\".\n*/\nSQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info *pIdxInfo, int iCons){\n  HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];\n  const char *zRet = 0;\n  if( iCons>=0 && iCons<pIdxInfo->nConstraint ){\n    CollSeq *pC = 0;\n    int iTerm = pIdxInfo->aConstraint[iCons].iTermOffset;\n    Expr *pX = termFromWhereClause(pHidden->pWC, iTerm)->pExpr;\n    if( pX->pLeft ){\n      pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);\n    }\n    zRet = (pC ? pC->zName : sqlite3StrBINARY);\n  }\n  return zRet;\n}\n\n/*\n** Return true if constraint iCons is really an IN(...) constraint, or\n** false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0)\n** or clear (if bHandle==0) the flag to handle it using an iterator.\n*/\nSQLITE_API int sqlite3_vtab_in(sqlite3_index_info *pIdxInfo, int iCons, int bHandle){\n  HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];\n  u32 m = SMASKBIT32(iCons);\n  if( m & pHidden->mIn ){\n    if( bHandle==0 ){\n      pHidden->mHandleIn &= ~m;\n    }else if( bHandle>0 ){\n      pHidden->mHandleIn |= m;\n    }\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** This interface is callable from within the xBestIndex callback only.\n**\n** If possible, set (*ppVal) to point to an object containing the value\n** on the right-hand-side of constraint iCons.\n*/\nSQLITE_API int sqlite3_vtab_rhs_value(\n  sqlite3_index_info *pIdxInfo,   /* Copy of first argument to xBestIndex */\n  int iCons,                      /* Constraint for which RHS is wanted */\n  sqlite3_value **ppVal           /* Write value extracted here */\n){\n  HiddenIndexInfo *pH = (HiddenIndexInfo*)&pIdxInfo[1];\n  sqlite3_value *pVal = 0;\n  int rc = SQLITE_OK;\n  if( iCons<0 || iCons>=pIdxInfo->nConstraint ){\n    rc = SQLITE_MISUSE_BKPT; /* EV: R-30545-25046 */\n  }else{\n    if( pH->aRhs[iCons]==0 ){\n      WhereTerm *pTerm = termFromWhereClause(\n          pH->pWC, pIdxInfo->aConstraint[iCons].iTermOffset\n      );\n      rc = sqlite3ValueFromExpr(\n          pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),\n          SQLITE_AFF_BLOB, &pH->aRhs[iCons]\n      );\n      testcase( rc!=SQLITE_OK );\n    }\n    pVal = pH->aRhs[iCons];\n  }\n  *ppVal = pVal;\n\n  if( rc==SQLITE_OK && pVal==0 ){  /* IMP: R-19933-32160 */\n    rc = SQLITE_NOTFOUND;          /* IMP: R-36424-56542 */\n  }\n\n  return rc;\n}\n\n/*\n** Return true if ORDER BY clause may be handled as DISTINCT.\n*/\nSQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *pIdxInfo){\n  HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1];\n  assert( pHidden->eDistinct>=0 && pHidden->eDistinct<=3 );\n  return pHidden->eDistinct;\n}\n\n/*\n** Cause the prepared statement that is associated with a call to\n** xBestIndex to potentially use all schemas.  If the statement being\n** prepared is read-only, then just start read transactions on all\n** schemas.  But if this is a write operation, start writes on all\n** schemas.\n**\n** This is used by the (built-in) sqlite_dbpage virtual table.\n*/\nSQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(Parse *pParse){\n  int nDb = pParse->db->nDb;\n  int i;\n  for(i=0; i<nDb; i++){\n    sqlite3CodeVerifySchema(pParse, i);\n  }\n  if( DbMaskNonZero(pParse->writeMask) ){\n    for(i=0; i<nDb; i++){\n      sqlite3BeginWriteOperation(pParse, 0, i);\n    }\n  }\n}\n\n/*\n** Add all WhereLoop objects for a table of the join identified by\n** pBuilder->pNew->iTab.  That table is guaranteed to be a virtual table.\n**\n** If there are no LEFT or CROSS JOIN joins in the query, both mPrereq and\n** mUnusable are set to 0. Otherwise, mPrereq is a mask of all FROM clause\n** entries that occur before the virtual table in the FROM clause and are\n** separated from it by at least one LEFT or CROSS JOIN. Similarly, the\n** mUnusable mask contains all FROM clause entries that occur after the\n** virtual table and are separated from it by at least one LEFT or\n** CROSS JOIN.\n**\n** For example, if the query were:\n**\n**   ... FROM t1, t2 LEFT JOIN t3, t4, vt CROSS JOIN t5, t6;\n**\n** then mPrereq corresponds to (t1, t2) and mUnusable to (t5, t6).\n**\n** All the tables in mPrereq must be scanned before the current virtual\n** table. So any terms for which all prerequisites are satisfied by\n** mPrereq may be specified as \"usable\" in all calls to xBestIndex.\n** Conversely, all tables in mUnusable must be scanned after the current\n** virtual table, so any terms for which the prerequisites overlap with\n** mUnusable should always be configured as \"not-usable\" for xBestIndex.\n*/\nstatic int whereLoopAddVirtual(\n  WhereLoopBuilder *pBuilder,  /* WHERE clause information */\n  Bitmask mPrereq,             /* Tables that must be scanned before this one */\n  Bitmask mUnusable            /* Tables that must be scanned after this one */\n){\n  int rc = SQLITE_OK;          /* Return code */\n  WhereInfo *pWInfo;           /* WHERE analysis context */\n  Parse *pParse;               /* The parsing context */\n  WhereClause *pWC;            /* The WHERE clause */\n  SrcItem *pSrc;               /* The FROM clause term to search */\n  sqlite3_index_info *p;       /* Object to pass to xBestIndex() */\n  int nConstraint;             /* Number of constraints in p */\n  int bIn;                     /* True if plan uses IN(...) operator */\n  WhereLoop *pNew;\n  Bitmask mBest;               /* Tables used by best possible plan */\n  u16 mNoOmit;\n  int bRetry = 0;              /* True to retry with LIMIT/OFFSET disabled */\n\n  assert( (mPrereq & mUnusable)==0 );\n  pWInfo = pBuilder->pWInfo;\n  pParse = pWInfo->pParse;\n  pWC = pBuilder->pWC;\n  pNew = pBuilder->pNew;\n  pSrc = &pWInfo->pTabList->a[pNew->iTab];\n  assert( IsVirtual(pSrc->pSTab) );\n  p = allocateIndexInfo(pWInfo, pWC, mUnusable, pSrc, &mNoOmit);\n  if( p==0 ) return SQLITE_NOMEM_BKPT;\n  pNew->rSetup = 0;\n  pNew->wsFlags = WHERE_VIRTUALTABLE;\n  pNew->nLTerm = 0;\n  pNew->u.vtab.needFree = 0;\n  nConstraint = p->nConstraint;\n  if( whereLoopResize(pParse->db, pNew, nConstraint) ){\n    freeIndexInfo(pParse->db, p);\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  /* First call xBestIndex() with all constraints usable. */\n  WHERETRACE(0x800, (\"BEGIN %s.addVirtual()\\n\", pSrc->pSTab->zName));\n  WHERETRACE(0x800, (\"  VirtualOne: all usable\\n\"));\n  rc = whereLoopAddVirtualOne(\n      pBuilder, mPrereq, ALLBITS, 0, p, mNoOmit, &bIn, &bRetry\n  );\n  if( bRetry ){\n    assert( rc==SQLITE_OK );\n    rc = whereLoopAddVirtualOne(\n        pBuilder, mPrereq, ALLBITS, 0, p, mNoOmit, &bIn, 0\n    );\n  }\n\n  /* If the call to xBestIndex() with all terms enabled produced a plan\n  ** that does not require any source tables (IOW: a plan with mBest==0)\n  ** and does not use an IN(...) operator, then there is no point in making\n  ** any further calls to xBestIndex() since they will all return the same\n  ** result (if the xBestIndex() implementation is sane). */\n  if( rc==SQLITE_OK && ((mBest = (pNew->prereq & ~mPrereq))!=0 || bIn) ){\n    int seenZero = 0;             /* True if a plan with no prereqs seen */\n    int seenZeroNoIN = 0;         /* Plan with no prereqs and no IN(...) seen */\n    Bitmask mPrev = 0;\n    Bitmask mBestNoIn = 0;\n\n    /* If the plan produced by the earlier call uses an IN(...) term, call\n    ** xBestIndex again, this time with IN(...) terms disabled. */\n    if( bIn ){\n      WHERETRACE(0x800, (\"  VirtualOne: all usable w/o IN\\n\"));\n      rc = whereLoopAddVirtualOne(\n          pBuilder, mPrereq, ALLBITS, WO_IN, p, mNoOmit, &bIn, 0);\n      assert( bIn==0 );\n      mBestNoIn = pNew->prereq & ~mPrereq;\n      if( mBestNoIn==0 ){\n        seenZero = 1;\n        seenZeroNoIN = 1;\n      }\n    }\n\n    /* Call xBestIndex once for each distinct value of (prereqRight & ~mPrereq)\n    ** in the set of terms that apply to the current virtual table.  */\n    while( rc==SQLITE_OK ){\n      int i;\n      Bitmask mNext = ALLBITS;\n      assert( mNext>0 );\n      for(i=0; i<nConstraint; i++){\n        int iTerm = p->aConstraint[i].iTermOffset;\n        Bitmask mThis = termFromWhereClause(pWC, iTerm)->prereqRight & ~mPrereq;\n        if( mThis>mPrev && mThis<mNext ) mNext = mThis;\n      }\n      mPrev = mNext;\n      if( mNext==ALLBITS ) break;\n      if( mNext==mBest || mNext==mBestNoIn ) continue;\n      WHERETRACE(0x800, (\"  VirtualOne: mPrev=%04llx mNext=%04llx\\n\",\n                       (sqlite3_uint64)mPrev, (sqlite3_uint64)mNext));\n      rc = whereLoopAddVirtualOne(\n          pBuilder, mPrereq, mNext|mPrereq, 0, p, mNoOmit, &bIn, 0);\n      if( pNew->prereq==mPrereq ){\n        seenZero = 1;\n        if( bIn==0 ) seenZeroNoIN = 1;\n      }\n    }\n\n    /* If the calls to xBestIndex() in the above loop did not find a plan\n    ** that requires no source tables at all (i.e. one guaranteed to be\n    ** usable), make a call here with all source tables disabled */\n    if( rc==SQLITE_OK && seenZero==0 ){\n      WHERETRACE(0x800, (\"  VirtualOne: all disabled\\n\"));\n      rc = whereLoopAddVirtualOne(\n          pBuilder, mPrereq, mPrereq, 0, p, mNoOmit, &bIn, 0);\n      if( bIn==0 ) seenZeroNoIN = 1;\n    }\n\n    /* If the calls to xBestIndex() have so far failed to find a plan\n    ** that requires no source tables at all and does not use an IN(...)\n    ** operator, make a final call to obtain one here.  */\n    if( rc==SQLITE_OK && seenZeroNoIN==0 ){\n      WHERETRACE(0x800, (\"  VirtualOne: all disabled and w/o IN\\n\"));\n      rc = whereLoopAddVirtualOne(\n          pBuilder, mPrereq, mPrereq, WO_IN, p, mNoOmit, &bIn, 0);\n    }\n  }\n\n  freeIndexInfo(pParse->db, p);\n  WHERETRACE(0x800, (\"END %s.addVirtual(), rc=%d\\n\", pSrc->pSTab->zName, rc));\n  return rc;\n}\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\n/*\n** Add WhereLoop entries to handle OR terms.  This works for either\n** btrees or virtual tables.\n*/\nstatic int whereLoopAddOr(\n  WhereLoopBuilder *pBuilder,\n  Bitmask mPrereq,\n  Bitmask mUnusable\n){\n  WhereInfo *pWInfo = pBuilder->pWInfo;\n  WhereClause *pWC;\n  WhereLoop *pNew;\n  WhereTerm *pTerm, *pWCEnd;\n  int rc = SQLITE_OK;\n  int iCur;\n  WhereClause tempWC;\n  WhereLoopBuilder sSubBuild;\n  WhereOrSet sSum, sCur;\n  SrcItem *pItem;\n\n  pWC = pBuilder->pWC;\n  pWCEnd = pWC->a + pWC->nTerm;\n  pNew = pBuilder->pNew;\n  memset(&sSum, 0, sizeof(sSum));\n  pItem = pWInfo->pTabList->a + pNew->iTab;\n  iCur = pItem->iCursor;\n\n  /* The multi-index OR optimization does not work for RIGHT and FULL JOIN */\n  if( pItem->fg.jointype & JT_RIGHT ) return SQLITE_OK;\n\n  for(pTerm=pWC->a; pTerm<pWCEnd && rc==SQLITE_OK; pTerm++){\n    if( (pTerm->eOperator & WO_OR)!=0\n     && (pTerm->u.pOrInfo->indexable & pNew->maskSelf)!=0\n    ){\n      WhereClause * const pOrWC = &pTerm->u.pOrInfo->wc;\n      WhereTerm * const pOrWCEnd = &pOrWC->a[pOrWC->nTerm];\n      WhereTerm *pOrTerm;\n      int once = 1;\n      int i, j;\n\n      sSubBuild = *pBuilder;\n      sSubBuild.pOrSet = &sCur;\n\n      WHERETRACE(0x400, (\"Begin processing OR-clause %p\\n\", pTerm));\n      for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){\n        if( (pOrTerm->eOperator & WO_AND)!=0 ){\n          sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;\n        }else if( pOrTerm->leftCursor==iCur ){\n          tempWC.pWInfo = pWC->pWInfo;\n          tempWC.pOuter = pWC;\n          tempWC.op = TK_AND;\n          tempWC.nTerm = 1;\n          tempWC.nBase = 1;\n          tempWC.a = pOrTerm;\n          sSubBuild.pWC = &tempWC;\n        }else{\n          continue;\n        }\n        sCur.n = 0;\n#ifdef WHERETRACE_ENABLED\n        WHERETRACE(0x400, (\"OR-term %d of %p has %d subterms:\\n\",\n                   (int)(pOrTerm-pOrWC->a), pTerm, sSubBuild.pWC->nTerm));\n        if( sqlite3WhereTrace & 0x20000 ){\n          sqlite3WhereClausePrint(sSubBuild.pWC);\n        }\n#endif\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n        if( IsVirtual(pItem->pSTab) ){\n          rc = whereLoopAddVirtual(&sSubBuild, mPrereq, mUnusable);\n        }else\n#endif\n        {\n          rc = whereLoopAddBtree(&sSubBuild, mPrereq);\n        }\n        if( rc==SQLITE_OK ){\n          rc = whereLoopAddOr(&sSubBuild, mPrereq, mUnusable);\n        }\n        testcase( rc==SQLITE_NOMEM && sCur.n>0 );\n        testcase( rc==SQLITE_DONE );\n        if( sCur.n==0 ){\n          sSum.n = 0;\n          break;\n        }else if( once ){\n          whereOrMove(&sSum, &sCur);\n          once = 0;\n        }else{\n          WhereOrSet sPrev;\n          whereOrMove(&sPrev, &sSum);\n          sSum.n = 0;\n          for(i=0; i<sPrev.n; i++){\n            for(j=0; j<sCur.n; j++){\n              whereOrInsert(&sSum, sPrev.a[i].prereq | sCur.a[j].prereq,\n                            sqlite3LogEstAdd(sPrev.a[i].rRun, sCur.a[j].rRun),\n                            sqlite3LogEstAdd(sPrev.a[i].nOut, sCur.a[j].nOut));\n            }\n          }\n        }\n      }\n      pNew->nLTerm = 1;\n      pNew->aLTerm[0] = pTerm;\n      pNew->wsFlags = WHERE_MULTI_OR;\n      pNew->rSetup = 0;\n      pNew->iSortIdx = 0;\n      memset(&pNew->u, 0, sizeof(pNew->u));\n      for(i=0; rc==SQLITE_OK && i<sSum.n; i++){\n        /* TUNING: Currently sSum.a[i].rRun is set to the sum of the costs\n        ** of all sub-scans required by the OR-scan. However, due to rounding\n        ** errors, it may be that the cost of the OR-scan is equal to its\n        ** most expensive sub-scan. Add the smallest possible penalty\n        ** (equivalent to multiplying the cost by 1.07) to ensure that\n        ** this does not happen. Otherwise, for WHERE clauses such as the\n        ** following where there is an index on \"y\":\n        **\n        **     WHERE likelihood(x=?, 0.99) OR y=?\n        **\n        ** the planner may elect to \"OR\" together a full-table scan and an\n        ** index lookup. And other similarly odd results.  */\n        pNew->rRun = sSum.a[i].rRun + 1;\n        pNew->nOut = sSum.a[i].nOut;\n        pNew->prereq = sSum.a[i].prereq;\n        rc = whereLoopInsert(pBuilder, pNew);\n      }\n      WHERETRACE(0x400, (\"End processing OR-clause %p\\n\", pTerm));\n    }\n  }\n  return rc;\n}\n\n/*\n** Add all WhereLoop objects for all tables\n*/\nstatic int whereLoopAddAll(WhereLoopBuilder *pBuilder){\n  WhereInfo *pWInfo = pBuilder->pWInfo;\n  Bitmask mPrereq = 0;\n  Bitmask mPrior = 0;\n  int iTab;\n  SrcList *pTabList = pWInfo->pTabList;\n  SrcItem *pItem;\n  SrcItem *pEnd = &pTabList->a[pWInfo->nLevel];\n  sqlite3 *db = pWInfo->pParse->db;\n  int rc = SQLITE_OK;\n  int bFirstPastRJ = 0;\n  int hasRightJoin = 0;\n  WhereLoop *pNew;\n\n\n  /* Loop over the tables in the join, from left to right */\n  pNew = pBuilder->pNew;\n\n  /* Verify that pNew has already been initialized */\n  assert( pNew->nLTerm==0 );\n  assert( pNew->wsFlags==0 );\n  assert( pNew->nLSlot>=ArraySize(pNew->aLTermSpace) );\n  assert( pNew->aLTerm!=0 );\n\n  pBuilder->iPlanLimit = SQLITE_QUERY_PLANNER_LIMIT;\n  for(iTab=0, pItem=pTabList->a; pItem<pEnd; iTab++, pItem++){\n    Bitmask mUnusable = 0;\n    pNew->iTab = iTab;\n    pBuilder->iPlanLimit += SQLITE_QUERY_PLANNER_LIMIT_INCR;\n    pNew->maskSelf = sqlite3WhereGetMask(&pWInfo->sMaskSet, pItem->iCursor);\n    if( bFirstPastRJ\n     || (pItem->fg.jointype & (JT_OUTER|JT_CROSS|JT_LTORJ))!=0\n    ){\n      /* Add prerequisites to prevent reordering of FROM clause terms\n      ** across CROSS joins and outer joins.  The bFirstPastRJ boolean\n      ** prevents the right operand of a RIGHT JOIN from being swapped with\n      ** other elements even further to the right.\n      **\n      ** The JT_LTORJ case and the hasRightJoin flag work together to\n      ** prevent FROM-clause terms from moving from the right side of\n      ** a LEFT JOIN over to the left side of that join if the LEFT JOIN\n      ** is itself on the left side of a RIGHT JOIN.\n      */\n      if( pItem->fg.jointype & JT_LTORJ ) hasRightJoin = 1;\n      mPrereq |= mPrior;\n      bFirstPastRJ = (pItem->fg.jointype & JT_RIGHT)!=0;\n    }else if( !hasRightJoin ){\n      mPrereq = 0;\n    }\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( IsVirtual(pItem->pSTab) ){\n      SrcItem *p;\n      for(p=&pItem[1]; p<pEnd; p++){\n        if( mUnusable || (p->fg.jointype & (JT_OUTER|JT_CROSS)) ){\n          mUnusable |= sqlite3WhereGetMask(&pWInfo->sMaskSet, p->iCursor);\n        }\n      }\n      rc = whereLoopAddVirtual(pBuilder, mPrereq, mUnusable);\n    }else\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n    {\n      rc = whereLoopAddBtree(pBuilder, mPrereq);\n    }\n    if( rc==SQLITE_OK && pBuilder->pWC->hasOr ){\n      rc = whereLoopAddOr(pBuilder, mPrereq, mUnusable);\n    }\n    mPrior |= pNew->maskSelf;\n    if( rc || db->mallocFailed ){\n      if( rc==SQLITE_DONE ){\n        /* We hit the query planner search limit set by iPlanLimit */\n        sqlite3_log(SQLITE_WARNING, \"abbreviated query algorithm search\");\n        rc = SQLITE_OK;\n      }else{\n        break;\n      }\n    }\n  }\n\n  whereLoopClear(db, pNew);\n  return rc;\n}\n\n/* Implementation of the order-by-subquery optimization:\n**\n** WhereLoop pLoop, which the iLoop-th term of the nested loop, is really\n** a subquery or CTE that has an ORDER BY clause.  See if any of the terms\n** in the subquery ORDER BY clause will satisfy pOrderBy from the outer\n** query.  Mark off all satisfied terms (by setting bits in *pOBSat) and\n** return TRUE if they do.  If not, return false.\n**\n** Example:\n**\n**    CREATE TABLE t1(a,b,c, PRIMARY KEY(a,b));\n**    CREATE TABLE t2(x,y);\n**    WITH t3(p,q) AS MATERIALIZED (SELECT x+y, x-y FROM t2 ORDER BY x+y)\n**       SELECT * FROM t3 JOIN t1 ON a=q ORDER BY p, b;\n**\n** The CTE named \"t3\" comes out in the natural order of \"p\", so the first\n** first them of \"ORDER BY p,b\" is satisfied by a sequential scan of \"t3\"\n** and sorting only needs to occur on the second term \"b\".\n**\n** Limitations:\n**\n** (1)  The optimization is not applied if the outer ORDER BY contains\n**      a COLLATE clause.  The optimization might be applied if the\n**      outer ORDER BY uses NULLS FIRST, NULLS LAST, ASC, and/or DESC as\n**      long as the subquery ORDER BY does the same.  But if the\n**      outer ORDER BY uses COLLATE, even a redundant COLLATE, the\n**      optimization is bypassed.\n**\n** (2)  The subquery ORDER BY terms must exactly match subquery result\n**      columns, including any COLLATE annotations.  This routine relies\n**      on iOrderByCol to do matching between order by terms and result\n**      columns, and iOrderByCol will not be set if the result column\n**      and ORDER BY collations differ.\n**\n** (3)  The subquery and outer ORDER BY can be in opposite directions as\n**      long as  the subquery is materialized.  If the subquery is\n**      implemented as a co-routine, the sort orders must be in the same\n**      direction because there is no way to run a co-routine backwards.\n*/\nstatic SQLITE_NOINLINE int wherePathMatchSubqueryOB(\n  WhereInfo *pWInfo,      /* The WHERE clause */\n  WhereLoop *pLoop,       /* The nested loop term that is a subquery */\n  int iLoop,              /* Which level of the nested loop.  0==outermost */\n  int iCur,               /* Cursor used by the this loop */\n  ExprList *pOrderBy,     /* The ORDER BY clause on the whole query */\n  Bitmask *pRevMask,      /* When loops need to go in reverse order */\n  Bitmask *pOBSat         /* Which terms of pOrderBy are satisfied so far */\n){\n  int iOB;                /* Index into pOrderBy->a[] */\n  int jSub;               /* Index into pSubOB->a[] */\n  u8 rev = 0;             /* True if iOB and jSub sort in opposite directions */\n  u8 revIdx = 0;          /* Sort direction for jSub */\n  Expr *pOBExpr;          /* Current term of outer ORDER BY */\n  ExprList *pSubOB;       /* Complete ORDER BY on the subquery */\n\n  pSubOB = pLoop->u.btree.pOrderBy;\n  assert( pSubOB!=0 );\n  for(iOB=0; (MASKBIT(iOB) & *pOBSat)!=0; iOB++){}\n  for(jSub=0; jSub<pSubOB->nExpr && iOB<pOrderBy->nExpr; jSub++, iOB++){\n    if( pSubOB->a[jSub].u.x.iOrderByCol==0 ) break;\n    pOBExpr = pOrderBy->a[iOB].pExpr;\n    if( pOBExpr->op!=TK_COLUMN && pOBExpr->op!=TK_AGG_COLUMN ) break;\n    if( pOBExpr->iTable!=iCur ) break;\n    if( pOBExpr->iColumn!=pSubOB->a[jSub].u.x.iOrderByCol-1 ) break;\n    if( (pWInfo->wctrlFlags & WHERE_GROUPBY)==0 ){\n      u8 sfOB = pOrderBy->a[iOB].fg.sortFlags;   /* sortFlags for iOB */\n      u8 sfSub = pSubOB->a[jSub].fg.sortFlags;   /* sortFlags for jSub */\n      if( (sfSub & KEYINFO_ORDER_BIGNULL) != (sfOB & KEYINFO_ORDER_BIGNULL) ){\n        break;\n      }\n      revIdx = sfSub & KEYINFO_ORDER_DESC;\n      if( jSub>0 ){\n        if( (rev^revIdx)!=(sfOB & KEYINFO_ORDER_DESC) ){\n          break;\n        }\n      }else{\n        rev = revIdx ^ (sfOB & KEYINFO_ORDER_DESC);\n        if( rev ){\n          if( (pLoop->wsFlags & WHERE_COROUTINE)!=0 ){\n            /* Cannot run a co-routine in reverse order */\n            break;\n          }\n          *pRevMask |= MASKBIT(iLoop);\n        }\n      }\n    }\n    *pOBSat |= MASKBIT(iOB);\n  }\n  return jSub>0;\n}\n\n/*\n** Examine a WherePath (with the addition of the extra WhereLoop of the 6th\n** parameters) to see if it outputs rows in the requested ORDER BY\n** (or GROUP BY) without requiring a separate sort operation.  Return N:\n**\n**   N>0:   N terms of the ORDER BY clause are satisfied\n**   N==0:  No terms of the ORDER BY clause are satisfied\n**   N<0:   Unknown yet how many terms of ORDER BY might be satisfied.\n**\n** Note that processing for WHERE_GROUPBY and WHERE_DISTINCTBY is not as\n** strict.  With GROUP BY and DISTINCT the only requirement is that\n** equivalent rows appear immediately adjacent to one another.  GROUP BY\n** and DISTINCT do not require rows to appear in any particular order as long\n** as equivalent rows are grouped together.  Thus for GROUP BY and DISTINCT\n** the pOrderBy terms can be matched in any order.  With ORDER BY, the\n** pOrderBy terms must be matched in strict left-to-right order.\n*/\nstatic i8 wherePathSatisfiesOrderBy(\n  WhereInfo *pWInfo,    /* The WHERE clause */\n  ExprList *pOrderBy,   /* ORDER BY or GROUP BY or DISTINCT clause to check */\n  WherePath *pPath,     /* The WherePath to check */\n  u16 wctrlFlags,       /* WHERE_GROUPBY or _DISTINCTBY or _ORDERBY_LIMIT */\n  u16 nLoop,            /* Number of entries in pPath->aLoop[] */\n  WhereLoop *pLast,     /* Add this WhereLoop to the end of pPath->aLoop[] */\n  Bitmask *pRevMask     /* OUT: Mask of WhereLoops to run in reverse order */\n){\n  u8 revSet;            /* True if rev is known */\n  u8 rev;               /* Composite sort order */\n  u8 revIdx;            /* Index sort order */\n  u8 isOrderDistinct;   /* All prior WhereLoops are order-distinct */\n  u8 distinctColumns;   /* True if the loop has UNIQUE NOT NULL columns */\n  u8 isMatch;           /* iColumn matches a term of the ORDER BY clause */\n  u16 eqOpMask;         /* Allowed equality operators */\n  u16 nKeyCol;          /* Number of key columns in pIndex */\n  u16 nColumn;          /* Total number of ordered columns in the index */\n  u16 nOrderBy;         /* Number terms in the ORDER BY clause */\n  int iLoop;            /* Index of WhereLoop in pPath being processed */\n  int i, j;             /* Loop counters */\n  int iCur;             /* Cursor number for current WhereLoop */\n  int iColumn;          /* A column number within table iCur */\n  WhereLoop *pLoop = 0; /* Current WhereLoop being processed. */\n  WhereTerm *pTerm;     /* A single term of the WHERE clause */\n  Expr *pOBExpr;        /* An expression from the ORDER BY clause */\n  CollSeq *pColl;       /* COLLATE function from an ORDER BY clause term */\n  Index *pIndex;        /* The index associated with pLoop */\n  sqlite3 *db = pWInfo->pParse->db;  /* Database connection */\n  Bitmask obSat = 0;    /* Mask of ORDER BY terms satisfied so far */\n  Bitmask obDone;       /* Mask of all ORDER BY terms */\n  Bitmask orderDistinctMask;  /* Mask of all well-ordered loops */\n  Bitmask ready;              /* Mask of inner loops */\n\n  /*\n  ** We say the WhereLoop is \"one-row\" if it generates no more than one\n  ** row of output.  A WhereLoop is one-row if all of the following are true:\n  **  (a) All index columns match with WHERE_COLUMN_EQ.\n  **  (b) The index is unique\n  ** Any WhereLoop with an WHERE_COLUMN_EQ constraint on the rowid is one-row.\n  ** Every one-row WhereLoop will have the WHERE_ONEROW bit set in wsFlags.\n  **\n  ** We say the WhereLoop is \"order-distinct\" if the set of columns from\n  ** that WhereLoop that are in the ORDER BY clause are different for every\n  ** row of the WhereLoop.  Every one-row WhereLoop is automatically\n  ** order-distinct.   A WhereLoop that has no columns in the ORDER BY clause\n  ** is not order-distinct. To be order-distinct is not quite the same as being\n  ** UNIQUE since a UNIQUE column or index can have multiple rows that\n  ** are NULL and NULL values are equivalent for the purpose of order-distinct.\n  ** To be order-distinct, the columns must be UNIQUE and NOT NULL.\n  **\n  ** The rowid for a table is always UNIQUE and NOT NULL so whenever the\n  ** rowid appears in the ORDER BY clause, the corresponding WhereLoop is\n  ** automatically order-distinct.\n  */\n\n  assert( pOrderBy!=0 );\n  if( nLoop && OptimizationDisabled(db, SQLITE_OrderByIdxJoin) ) return 0;\n\n  nOrderBy = pOrderBy->nExpr;\n  testcase( nOrderBy==BMS-1 );\n  if( nOrderBy>BMS-1 ) return 0;  /* Cannot optimize overly large ORDER BYs */\n  isOrderDistinct = 1;\n  obDone = MASKBIT(nOrderBy)-1;\n  orderDistinctMask = 0;\n  ready = 0;\n  eqOpMask = WO_EQ | WO_IS | WO_ISNULL;\n  if( wctrlFlags & (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MAX|WHERE_ORDERBY_MIN) ){\n    eqOpMask |= WO_IN;\n  }\n  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){\n    if( iLoop>0 ) ready |= pLoop->maskSelf;\n    if( iLoop<nLoop ){\n      pLoop = pPath->aLoop[iLoop];\n      if( wctrlFlags & WHERE_ORDERBY_LIMIT ) continue;\n    }else{\n      pLoop = pLast;\n    }\n    if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){\n      if( pLoop->u.vtab.isOrdered\n       && ((wctrlFlags&(WHERE_DISTINCTBY|WHERE_SORTBYGROUP))!=WHERE_DISTINCTBY)\n      ){\n        obSat = obDone;\n      }else{\n        /* No further ORDER BY terms may be matched. So this call should\n        ** return >=0, not -1. Clear isOrderDistinct to ensure it does so. */\n        isOrderDistinct = 0;\n      }\n      break;\n    }\n    iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;\n\n    /* Mark off any ORDER BY term X that is a column in the table of\n    ** the current loop for which there is term in the WHERE\n    ** clause of the form X IS NULL or X=? that reference only outer\n    ** loops.\n    */\n    for(i=0; i<nOrderBy; i++){\n      if( MASKBIT(i) & obSat ) continue;\n      pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);\n      if( NEVER(pOBExpr==0) ) continue;\n      if( pOBExpr->op!=TK_COLUMN && pOBExpr->op!=TK_AGG_COLUMN ) continue;\n      if( pOBExpr->iTable!=iCur ) continue;\n      pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,\n                       ~ready, eqOpMask, 0);\n      if( pTerm==0 ) continue;\n      if( pTerm->eOperator==WO_IN ){\n        /* IN terms are only valid for sorting in the ORDER BY LIMIT\n        ** optimization, and then only if they are actually used\n        ** by the query plan */\n        assert( wctrlFlags &\n               (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) );\n        for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}\n        if( j>=pLoop->nLTerm ) continue;\n      }\n      if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){\n        Parse *pParse = pWInfo->pParse;\n        CollSeq *pColl1 = sqlite3ExprNNCollSeq(pParse, pOrderBy->a[i].pExpr);\n        CollSeq *pColl2 = sqlite3ExprCompareCollSeq(pParse, pTerm->pExpr);\n        assert( pColl1 );\n        if( pColl2==0 || sqlite3StrICmp(pColl1->zName, pColl2->zName) ){\n          continue;\n        }\n        testcase( pTerm->pExpr->op==TK_IS );\n      }\n      obSat |= MASKBIT(i);\n    }\n\n    if( (pLoop->wsFlags & WHERE_ONEROW)==0 ){\n      if( pLoop->wsFlags & WHERE_IPK ){\n        if( pLoop->u.btree.pOrderBy\n         && OptimizationEnabled(db, SQLITE_OrderBySubq)\n         &&  wherePathMatchSubqueryOB(pWInfo,pLoop,iLoop,iCur,\n                                     pOrderBy,pRevMask, &obSat)\n        ){\n          nColumn = 0;\n          isOrderDistinct = 0;\n        }else{\n          nColumn = 1;\n        }\n        pIndex = 0;\n        nKeyCol = 0;\n      }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){\n        return 0;\n      }else{\n        nKeyCol = pIndex->nKeyCol;\n        nColumn = pIndex->nColumn;\n        assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) );\n        assert( pIndex->aiColumn[nColumn-1]==XN_ROWID\n                          || !HasRowid(pIndex->pTable));\n        /* All relevant terms of the index must also be non-NULL in order\n        ** for isOrderDistinct to be true.  So the isOrderDistinct value\n        ** computed here might be a false positive.  Corrections will be\n        ** made at tag-20210426-1 below */\n        isOrderDistinct = IsUniqueIndex(pIndex)\n                          && (pLoop->wsFlags & WHERE_SKIPSCAN)==0;\n      }\n\n      /* Loop through all columns of the index and deal with the ones\n      ** that are not constrained by == or IN.\n      */\n      rev = revSet = 0;\n      distinctColumns = 0;\n      for(j=0; j<nColumn; j++){\n        u8 bOnce = 1; /* True to run the ORDER BY search loop */\n\n        assert( j>=pLoop->u.btree.nEq\n            || (pLoop->aLTerm[j]==0)==(j<pLoop->nSkip)\n        );\n        if( j<pLoop->u.btree.nEq && j>=pLoop->nSkip ){\n          u16 eOp = pLoop->aLTerm[j]->eOperator;\n\n          /* Skip over == and IS and ISNULL terms.  (Also skip IN terms when\n          ** doing WHERE_ORDERBY_LIMIT processing).  Except, IS and ISNULL\n          ** terms imply that the index is not UNIQUE NOT NULL in which case\n          ** the loop need to be marked as not order-distinct because it can\n          ** have repeated NULL rows.\n          **\n          ** If the current term is a column of an ((?,?) IN (SELECT...))\n          ** expression for which the SELECT returns more than one column,\n          ** check that it is the only column used by this loop. Otherwise,\n          ** if it is one of two or more, none of the columns can be\n          ** considered to match an ORDER BY term.\n          */\n          if( (eOp & eqOpMask)!=0 ){\n            if( eOp & (WO_ISNULL|WO_IS) ){\n              testcase( eOp & WO_ISNULL );\n              testcase( eOp & WO_IS );\n              testcase( isOrderDistinct );\n              isOrderDistinct = 0;\n            }\n            continue;\n          }else if( ALWAYS(eOp & WO_IN) ){\n            /* ALWAYS() justification: eOp is an equality operator due to the\n            ** j<pLoop->u.btree.nEq constraint above.  Any equality other\n            ** than WO_IN is captured by the previous \"if\".  So this one\n            ** always has to be WO_IN. */\n            Expr *pX = pLoop->aLTerm[j]->pExpr;\n            for(i=j+1; i<pLoop->u.btree.nEq; i++){\n              if( pLoop->aLTerm[i]->pExpr==pX ){\n                assert( (pLoop->aLTerm[i]->eOperator & WO_IN) );\n                bOnce = 0;\n                break;\n              }\n            }\n          }\n        }\n\n        /* Get the column number in the table (iColumn) and sort order\n        ** (revIdx) for the j-th column of the index.\n        */\n        if( pIndex ){\n          iColumn = pIndex->aiColumn[j];\n          revIdx = pIndex->aSortOrder[j] & KEYINFO_ORDER_DESC;\n          if( iColumn==pIndex->pTable->iPKey ) iColumn = XN_ROWID;\n        }else{\n          iColumn = XN_ROWID;\n          revIdx = 0;\n        }\n\n        /* An unconstrained column that might be NULL means that this\n        ** WhereLoop is not well-ordered.  tag-20210426-1\n        */\n        if( isOrderDistinct ){\n          if( iColumn>=0\n           && j>=pLoop->u.btree.nEq\n           && pIndex->pTable->aCol[iColumn].notNull==0\n          ){\n            isOrderDistinct = 0;\n          }\n          if( iColumn==XN_EXPR ){\n            isOrderDistinct = 0;\n          }\n        }\n\n        /* Find the ORDER BY term that corresponds to the j-th column\n        ** of the index and mark that ORDER BY term having been satisfied.\n        */\n        isMatch = 0;\n        for(i=0; bOnce && i<nOrderBy; i++){\n          if( MASKBIT(i) & obSat ) continue;\n          pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);\n          testcase( wctrlFlags & WHERE_GROUPBY );\n          testcase( wctrlFlags & WHERE_DISTINCTBY );\n          if( NEVER(pOBExpr==0) ) continue;\n          if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0;\n          if( iColumn>=XN_ROWID ){\n            if( pOBExpr->op!=TK_COLUMN && pOBExpr->op!=TK_AGG_COLUMN ) continue;\n            if( pOBExpr->iTable!=iCur ) continue;\n            if( pOBExpr->iColumn!=iColumn ) continue;\n          }else{\n            Expr *pIxExpr = pIndex->aColExpr->a[j].pExpr;\n            if( sqlite3ExprCompareSkip(pOBExpr, pIxExpr, iCur) ){\n              continue;\n            }\n          }\n          if( iColumn!=XN_ROWID ){\n            pColl = sqlite3ExprNNCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);\n            if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;\n          }\n          if( wctrlFlags & WHERE_DISTINCTBY ){\n            pLoop->u.btree.nDistinctCol = j+1;\n          }\n          isMatch = 1;\n          break;\n        }\n        if( isMatch && (wctrlFlags & WHERE_GROUPBY)==0 ){\n          /* Make sure the sort order is compatible in an ORDER BY clause.\n          ** Sort order is irrelevant for a GROUP BY clause. */\n          if( revSet ){\n            if( (rev ^ revIdx)\n                           != (pOrderBy->a[i].fg.sortFlags&KEYINFO_ORDER_DESC)\n            ){\n              isMatch = 0;\n            }\n          }else{\n            rev = revIdx ^ (pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_DESC);\n            if( rev ) *pRevMask |= MASKBIT(iLoop);\n            revSet = 1;\n          }\n        }\n        if( isMatch && (pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_BIGNULL) ){\n          if( j==pLoop->u.btree.nEq ){\n            pLoop->wsFlags |= WHERE_BIGNULL_SORT;\n          }else{\n            isMatch = 0;\n          }\n        }\n        if( isMatch ){\n          if( iColumn==XN_ROWID ){\n            testcase( distinctColumns==0 );\n            distinctColumns = 1;\n          }\n          obSat |= MASKBIT(i);\n        }else{\n          /* No match found */\n          if( j==0 || j<nKeyCol ){\n            testcase( isOrderDistinct!=0 );\n            isOrderDistinct = 0;\n          }\n          break;\n        }\n      } /* end Loop over all index columns */\n      if( distinctColumns ){\n        testcase( isOrderDistinct==0 );\n        isOrderDistinct = 1;\n      }\n    } /* end-if not one-row */\n\n    /* Mark off any other ORDER BY terms that reference pLoop */\n    if( isOrderDistinct ){\n      orderDistinctMask |= pLoop->maskSelf;\n      for(i=0; i<nOrderBy; i++){\n        Expr *p;\n        Bitmask mTerm;\n        if( MASKBIT(i) & obSat ) continue;\n        p = pOrderBy->a[i].pExpr;\n        mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);\n        if( mTerm==0 && !sqlite3ExprIsConstant(0,p) ) continue;\n        if( (mTerm&~orderDistinctMask)==0 ){\n          obSat |= MASKBIT(i);\n        }\n      }\n    }\n  } /* End the loop over all WhereLoops from outer-most down to inner-most */\n  if( obSat==obDone ) return (i8)nOrderBy;\n  if( !isOrderDistinct ){\n    for(i=nOrderBy-1; i>0; i--){\n      Bitmask m = ALWAYS(i<BMS) ? MASKBIT(i) - 1 : 0;\n      if( (obSat&m)==m ) return i;\n    }\n    return 0;\n  }\n  return -1;\n}\n\n\n/*\n** If the WHERE_GROUPBY flag is set in the mask passed to sqlite3WhereBegin(),\n** the planner assumes that the specified pOrderBy list is actually a GROUP\n** BY clause - and so any order that groups rows as required satisfies the\n** request.\n**\n** Normally, in this case it is not possible for the caller to determine\n** whether or not the rows are really being delivered in sorted order, or\n** just in some other order that provides the required grouping. However,\n** if the WHERE_SORTBYGROUP flag is also passed to sqlite3WhereBegin(), then\n** this function may be called on the returned WhereInfo object. It returns\n** true if the rows really will be sorted in the specified order, or false\n** otherwise.\n**\n** For example, assuming:\n**\n**   CREATE INDEX i1 ON t1(x, Y);\n**\n** then\n**\n**   SELECT * FROM t1 GROUP BY x,y ORDER BY x,y;   -- IsSorted()==1\n**   SELECT * FROM t1 GROUP BY y,x ORDER BY y,x;   -- IsSorted()==0\n*/\nSQLITE_PRIVATE int sqlite3WhereIsSorted(WhereInfo *pWInfo){\n  assert( pWInfo->wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY) );\n  assert( pWInfo->wctrlFlags & WHERE_SORTBYGROUP );\n  return pWInfo->sorted;\n}\n\n#ifdef WHERETRACE_ENABLED\n/* For debugging use only: */\nstatic const char *wherePathName(WherePath *pPath, int nLoop, WhereLoop *pLast){\n  static char zName[65];\n  int i;\n  for(i=0; i<nLoop; i++){ zName[i] = pPath->aLoop[i]->cId; }\n  if( pLast ) zName[i++] = pLast->cId;\n  zName[i] = 0;\n  return zName;\n}\n#endif\n\n/*\n** Return the cost of sorting nRow rows, assuming that the keys have\n** nOrderby columns and that the first nSorted columns are already in\n** order.\n*/\nstatic LogEst whereSortingCost(\n  WhereInfo *pWInfo, /* Query planning context */\n  LogEst nRow,       /* Estimated number of rows to sort */\n  int nOrderBy,      /* Number of ORDER BY clause terms */\n  int nSorted        /* Number of initial ORDER BY terms naturally in order */\n){\n  /* Estimated cost of a full external sort, where N is\n  ** the number of rows to sort is:\n  **\n  **   cost = (K * N * log(N)).\n  **\n  ** Or, if the order-by clause has X terms but only the last Y\n  ** terms are out of order, then block-sorting will reduce the\n  ** sorting cost to:\n  **\n  **   cost = (K * N * log(N)) * (Y/X)\n  **\n  ** The constant K is at least 2.0 but will be larger if there are a\n  ** large number of columns to be sorted, as the sorting time is\n  ** proportional to the amount of content to be sorted.  The algorithm\n  ** does not currently distinguish between fat columns (BLOBs and TEXTs)\n  ** and skinny columns (INTs).  It just uses the number of columns as\n  ** an approximation for the row width.\n  **\n  ** And extra factor of 2.0 or 3.0 is added to the sorting cost if the sort\n  ** is built using OP_IdxInsert and OP_Sort rather than with OP_SorterInsert.\n  */\n  LogEst rSortCost, nCol;\n  assert( pWInfo->pSelect!=0 );\n  assert( pWInfo->pSelect->pEList!=0 );\n  /* TUNING: sorting cost proportional to the number of output columns: */\n  nCol = sqlite3LogEst((pWInfo->pSelect->pEList->nExpr+59)/30);\n  rSortCost = nRow + nCol;\n  if( nSorted>0 ){\n    /* Scale the result by (Y/X) */\n    rSortCost += sqlite3LogEst((nOrderBy-nSorted)*100/nOrderBy) - 66;\n  }\n\n  /* Multiple by log(M) where M is the number of output rows.\n  ** Use the LIMIT for M if it is smaller.  Or if this sort is for\n  ** a DISTINCT operator, M will be the number of distinct output\n  ** rows, so fudge it downwards a bit.\n  */\n  if( (pWInfo->wctrlFlags & WHERE_USE_LIMIT)!=0 ){\n    rSortCost += 10;       /* TUNING: Extra 2.0x if using LIMIT */\n    if( nSorted!=0 ){\n      rSortCost += 6;      /* TUNING: Extra 1.5x if also using partial sort */\n    }\n    if( pWInfo->iLimit<nRow ){\n      nRow = pWInfo->iLimit;\n    }\n  }else if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT) ){\n    /* TUNING: In the sort for a DISTINCT operator, assume that the DISTINCT\n    ** reduces the number of output rows by a factor of 2 */\n    if( nRow>10 ){ nRow -= 10;  assert( 10==sqlite3LogEst(2) ); }\n  }\n  rSortCost += estLog(nRow);\n  return rSortCost;\n}\n\n/*\n** Compute the maximum number of paths in the solver algorithm, for\n** queries that have three or more terms in the FROM clause.  Queries with\n** two or fewer FROM clause terms are handled by the caller.\n**\n** Query planning is NP-hard.  We must limit the number of paths at\n** each step of the solver search algorithm to avoid exponential behavior.\n**\n** The value returned is a tuning parameter.  Currently the value is:\n**\n**     18    for star queries\n**     12    otherwise\n**\n** For the purposes of this heuristic, a star-query is defined as a query\n** with a large central table that is joined using an INNER JOIN,\n** not CROSS or OUTER JOINs, against four or more smaller tables.\n** The central table is called the \"fact\" table.  The smaller tables\n** that get joined are \"dimension tables\".  Also, any table that is\n** self-joined cannot be a dimension table; we assume that dimension\n** tables may only be joined against fact tables.\n**\n** SIDE EFFECT:  (and really the whole point of this subroutine)\n**\n** If pWInfo describes a star-query, then the cost for SCANs of dimension\n** WhereLoops is increased to be slightly larger than the cost of a SCAN\n** in the fact table.  Only SCAN costs are increased.  SEARCH costs are\n** unchanged. This heuristic helps keep fact tables in outer loops. Without\n** this heuristic, paths with fact tables in outer loops tend to get pruned\n** by the mxChoice limit on the number of paths, resulting in poor query\n** plans.  See the starschema1.test test module for examples of queries\n** that need this heuristic to find good query plans.\n**\n** This heuristic can be completely disabled, so that no query is\n** considered a star-query, using SQLITE_TESTCTRL_OPTIMIZATION to\n** disable the SQLITE_StarQuery optimization.  In the CLI, the command\n** to do that is:  \".testctrl opt -starquery\".\n**\n** HISTORICAL NOTES:\n**\n** This optimization was first added on 2024-05-09 by check-in 38db9b5c83d.\n** The original optimization reduced the cost and output size estimate for\n** fact tables to help them move to outer loops.  But months later (as people\n** started upgrading) performance regression reports started caming in,\n** including:\n**\n**    forum post b18ef983e68d06d1 (2024-12-21)\n**    forum post 0025389d0860af82 (2025-01-14)\n**    forum post d87570a145599033 (2025-01-17)\n**\n** To address these, the criteria for a star-query was tightened to exclude\n** cases where the fact and dimensions are separated by an outer join, and\n** the affect of star-schema detection was changed to increase the rRun cost\n** on just full table scans of dimension tables, rather than reducing costs\n** in the all access methods of the fact table.\n*/\nstatic int computeMxChoice(WhereInfo *pWInfo){\n  int nLoop = pWInfo->nLevel;    /* Number of terms in the join */\n  WhereLoop *pWLoop;             /* For looping over WhereLoops */\n\n#ifdef SQLITE_DEBUG\n  /* The star-query detection code below makes use of the following\n  ** properties of the WhereLoop list, so verify them before\n  ** continuing:\n  **    (1)  .maskSelf is the bitmask corresponding to .iTab\n  **    (2)  The WhereLoop list is in ascending .iTab order\n  */\n  for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){\n    assert( pWLoop->maskSelf==MASKBIT(pWLoop->iTab) );\n    assert( pWLoop->pNextLoop==0 || pWLoop->iTab<=pWLoop->pNextLoop->iTab );\n  }\n#endif /* SQLITE_DEBUG */\n\n  if( nLoop>=5\n   && !pWInfo->bStarDone\n   && OptimizationEnabled(pWInfo->pParse->db, SQLITE_StarQuery)\n  ){\n    SrcItem *aFromTabs;    /* All terms of the FROM clause */\n    int iFromIdx;          /* Term of FROM clause is the candidate fact-table */\n    Bitmask m;             /* Bitmask for candidate fact-table */\n    Bitmask mSelfJoin = 0; /* Tables that cannot be dimension tables */\n    WhereLoop *pStart;     /* Where to start searching for dimension-tables */\n\n    pWInfo->bStarDone = 1; /* Only do this computation once */\n\n    /* Look for fact tables with four or more dimensions where the\n    ** dimension tables are not separately from the fact tables by an outer\n    ** or cross join.  Adjust cost weights if found.\n    */\n    assert( !pWInfo->bStarUsed );\n    aFromTabs = pWInfo->pTabList->a;\n    pStart = pWInfo->pLoops;\n    for(iFromIdx=0, m=1; iFromIdx<nLoop; iFromIdx++, m<<=1){\n      int nDep = 0;             /* Number of dimension tables */\n      LogEst mxRun;             /* Maximum SCAN cost of a fact table */\n      Bitmask mSeen = 0;        /* Mask of dimension tables */\n      SrcItem *pFactTab;        /* The candidate fact table */\n\n      pFactTab = aFromTabs + iFromIdx;\n      if( (pFactTab->fg.jointype & (JT_OUTER|JT_CROSS))!=0 ){\n        /* If the candidate fact-table is the right table of an outer join\n        ** restrict the search for dimension-tables to be tables to the right\n        ** of the fact-table. */\n        if( iFromIdx+4 > nLoop ) break;  /* Impossible to reach nDep>=4 */\n        while( pStart && pStart->iTab<=iFromIdx ){\n          pStart = pStart->pNextLoop;\n        }\n      }\n      for(pWLoop=pStart; pWLoop; pWLoop=pWLoop->pNextLoop){\n        if( (aFromTabs[pWLoop->iTab].fg.jointype & (JT_OUTER|JT_CROSS))!=0 ){\n          /* Fact-tables and dimension-tables cannot be separated by an\n          ** outer join (at least for the definition of fact- and dimension-\n          ** used by this heuristic). */\n          break;\n        }\n        if( (pWLoop->prereq & m)!=0        /* pWInfo depends on iFromIdx */\n         && (pWLoop->maskSelf & mSeen)==0  /* pWInfo not already a dependency */\n         && (pWLoop->maskSelf & mSelfJoin)==0 /* Not a self-join */\n        ){\n          if( aFromTabs[pWLoop->iTab].pSTab==pFactTab->pSTab ){\n            mSelfJoin |= m;\n          }else{\n            nDep++;\n            mSeen |= pWLoop->maskSelf;\n          }\n        }\n      }\n      if( nDep<=3 ) continue;\n\n      /* If we reach this point, it means that pFactTab is a fact table\n      ** with four or more dimensions connected by inner joins.  Proceed\n      ** to make cost adjustments. */\n\n#ifdef WHERETRACE_ENABLED\n      /* Make sure rStarDelta values are initialized */\n      if( !pWInfo->bStarUsed ){\n        for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){\n          pWLoop->rStarDelta = 0;\n        }\n      }\n#endif\n      pWInfo->bStarUsed = 1;\n\n      /* Compute the maximum cost of any WhereLoop for the\n      ** fact table plus one epsilon */\n      mxRun = LOGEST_MIN;\n      for(pWLoop=pStart; pWLoop; pWLoop=pWLoop->pNextLoop){\n        if( pWLoop->iTab<iFromIdx ) continue;\n        if( pWLoop->iTab>iFromIdx ) break;\n        if( pWLoop->rRun>mxRun ) mxRun = pWLoop->rRun;\n      }\n      if( ALWAYS(mxRun<LOGEST_MAX) ) mxRun++;\n\n      /* Increase the cost of table scans for dimension tables to be\n      ** slightly more than the maximum cost of the fact table */\n      for(pWLoop=pStart; pWLoop; pWLoop=pWLoop->pNextLoop){\n        if( (pWLoop->maskSelf & mSeen)==0 ) continue;\n        if( pWLoop->nLTerm ) continue;\n        if( pWLoop->rRun<mxRun ){\n#ifdef WHERETRACE_ENABLED /* 0x80000 */\n          if( sqlite3WhereTrace & 0x80000 ){\n            SrcItem *pDim = aFromTabs + pWLoop->iTab;\n            sqlite3DebugPrintf(\n              \"Increase SCAN cost of dimension %s(%d) of fact %s(%d) to %d\\n\",\n              pDim->zAlias ? pDim->zAlias: pDim->pSTab->zName, pWLoop->iTab,\n              pFactTab->zAlias ? pFactTab->zAlias : pFactTab->pSTab->zName,\n              iFromIdx, mxRun\n            );\n          }\n          pWLoop->rStarDelta = mxRun - pWLoop->rRun;\n#endif /* WHERETRACE_ENABLED */\n          pWLoop->rRun = mxRun;\n        }\n      }\n    }\n#ifdef WHERETRACE_ENABLED /* 0x80000 */\n    if( (sqlite3WhereTrace & 0x80000)!=0 && pWInfo->bStarUsed ){\n      sqlite3DebugPrintf(\"WhereLoops changed by star-query heuristic:\\n\");\n      for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){\n        if( pWLoop->rStarDelta ){\n          sqlite3WhereLoopPrint(pWLoop, &pWInfo->sWC);\n        }\n      }\n    }\n#endif\n  }\n  return pWInfo->bStarUsed ? 18 : 12;\n}\n\n/*\n** Two WhereLoop objects, pCandidate and pBaseline, are known to have the\n** same cost.  Look deep into each to see if pCandidate is even slightly\n** better than pBaseline.  Return false if it is, if pCandidate is is preferred.\n** Return true if pBaseline is preferred or if we cannot tell the difference.\n**\n**    Result       Meaning\n**    --------     ----------------------------------------------------------\n**    true         We cannot tell the difference in pCandidate and pBaseline\n**    false        pCandidate seems like a better choice than pBaseline\n*/\nstatic SQLITE_NOINLINE int whereLoopIsNoBetter(\n  const WhereLoop *pCandidate,\n  const WhereLoop *pBaseline\n){\n  if( (pCandidate->wsFlags & WHERE_INDEXED)==0 ) return 1;\n  if( (pBaseline->wsFlags & WHERE_INDEXED)==0 ) return 1;\n  if( pCandidate->u.btree.pIndex->szIdxRow <\n        pBaseline->u.btree.pIndex->szIdxRow ) return 0;\n  return 1;\n}\n\n/*\n** Given the list of WhereLoop objects at pWInfo->pLoops, this routine\n** attempts to find the lowest cost path that visits each WhereLoop\n** once.  This path is then loaded into the pWInfo->a[].pWLoop fields.\n**\n** Assume that the total number of output rows that will need to be sorted\n** will be nRowEst (in the 10*log2 representation).  Or, ignore sorting\n** costs if nRowEst==0.\n**\n** Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation\n** error occurs.\n*/\nstatic int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){\n  int mxChoice;             /* Maximum number of simultaneous paths tracked */\n  int nLoop;                /* Number of terms in the join */\n  Parse *pParse;            /* Parsing context */\n  int iLoop;                /* Loop counter over the terms of the join */\n  int ii, jj;               /* Loop counters */\n  int mxI = 0;              /* Index of next entry to replace */\n  int nOrderBy;             /* Number of ORDER BY clause terms */\n  LogEst mxCost = 0;        /* Maximum cost of a set of paths */\n  LogEst mxUnsort = 0;      /* Maximum unsorted cost of a set of path */\n  int nTo, nFrom;           /* Number of valid entries in aTo[] and aFrom[] */\n  WherePath *aFrom;         /* All nFrom paths at the previous level */\n  WherePath *aTo;           /* The nTo best paths at the current level */\n  WherePath *pFrom;         /* An element of aFrom[] that we are working on */\n  WherePath *pTo;           /* An element of aTo[] that we are working on */\n  WhereLoop *pWLoop;        /* One of the WhereLoop objects */\n  WhereLoop **pX;           /* Used to divy up the pSpace memory */\n  LogEst *aSortCost = 0;    /* Sorting and partial sorting costs */\n  char *pSpace;             /* Temporary memory used by this routine */\n  int nSpace;               /* Bytes of space allocated at pSpace */\n\n  pParse = pWInfo->pParse;\n  nLoop = pWInfo->nLevel;\n  WHERETRACE(0x002, (\"---- begin solver.  (nRowEst=%d, nQueryLoop=%d)\\n\",\n                     nRowEst, pParse->nQueryLoop));\n  /* TUNING: mxChoice is the maximum number of possible paths to preserve\n  ** at each step.  Based on the number of loops in the FROM clause:\n  **\n  **     nLoop      mxChoice\n  **     -----      --------\n  **       1            1            // the most common case\n  **       2            5\n  **       3+        12 or 18        // see computeMxChoice()\n  */\n  if( nLoop<=1 ){\n    mxChoice = 1;\n  }else if( nLoop==2 ){\n    mxChoice = 5;\n  }else if( pParse->nErr ){\n    mxChoice = 1;\n  }else{\n    mxChoice = computeMxChoice(pWInfo);\n  }\n  assert( nLoop<=pWInfo->pTabList->nSrc );\n\n  /* If nRowEst is zero and there is an ORDER BY clause, ignore it. In this\n  ** case the purpose of this call is to estimate the number of rows returned\n  ** by the overall query. Once this estimate has been obtained, the caller\n  ** will invoke this function a second time, passing the estimate as the\n  ** nRowEst parameter.  */\n  if( pWInfo->pOrderBy==0 || nRowEst==0 ){\n    nOrderBy = 0;\n  }else{\n    nOrderBy = pWInfo->pOrderBy->nExpr;\n  }\n\n  /* Allocate and initialize space for aTo, aFrom and aSortCost[] */\n  nSpace = (sizeof(WherePath)+sizeof(WhereLoop*)*nLoop)*mxChoice*2;\n  nSpace += sizeof(LogEst) * nOrderBy;\n  pSpace = sqlite3StackAllocRawNN(pParse->db, nSpace);\n  if( pSpace==0 ) return SQLITE_NOMEM_BKPT;\n  aTo = (WherePath*)pSpace;\n  aFrom = aTo+mxChoice;\n  memset(aFrom, 0, sizeof(aFrom[0]));\n  pX = (WhereLoop**)(aFrom+mxChoice);\n  for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){\n    pFrom->aLoop = pX;\n  }\n  if( nOrderBy ){\n    /* If there is an ORDER BY clause and it is not being ignored, set up\n    ** space for the aSortCost[] array. Each element of the aSortCost array\n    ** is either zero - meaning it has not yet been initialized - or the\n    ** cost of sorting nRowEst rows of data where the first X terms of\n    ** the ORDER BY clause are already in order, where X is the array\n    ** index.  */\n    aSortCost = (LogEst*)pX;\n    memset(aSortCost, 0, sizeof(LogEst) * nOrderBy);\n  }\n  assert( aSortCost==0 || &pSpace[nSpace]==(char*)&aSortCost[nOrderBy] );\n  assert( aSortCost!=0 || &pSpace[nSpace]==(char*)pX );\n\n  /* Seed the search with a single WherePath containing zero WhereLoops.\n  **\n  ** TUNING: Do not let the number of iterations go above 28.  If the cost\n  ** of computing an automatic index is not paid back within the first 28\n  ** rows, then do not use the automatic index. */\n  aFrom[0].nRow = MIN(pParse->nQueryLoop, 48);  assert( 48==sqlite3LogEst(28) );\n  nFrom = 1;\n  assert( aFrom[0].isOrdered==0 );\n  if( nOrderBy ){\n    /* If nLoop is zero, then there are no FROM terms in the query. Since\n    ** in this case the query may return a maximum of one row, the results\n    ** are already in the requested order. Set isOrdered to nOrderBy to\n    ** indicate this. Or, if nLoop is greater than zero, set isOrdered to\n    ** -1, indicating that the result set may or may not be ordered,\n    ** depending on the loops added to the current plan.  */\n    aFrom[0].isOrdered = nLoop>0 ? -1 : nOrderBy;\n  }\n\n  /* Compute successively longer WherePaths using the previous generation\n  ** of WherePaths as the basis for the next.  Keep track of the mxChoice\n  ** best paths at each generation */\n  for(iLoop=0; iLoop<nLoop; iLoop++){\n    nTo = 0;\n    for(ii=0, pFrom=aFrom; ii<nFrom; ii++, pFrom++){\n      for(pWLoop=pWInfo->pLoops; pWLoop; pWLoop=pWLoop->pNextLoop){\n        LogEst nOut;                      /* Rows visited by (pFrom+pWLoop) */\n        LogEst rCost;                     /* Cost of path (pFrom+pWLoop) */\n        LogEst rUnsort;                   /* Unsorted cost of (pFrom+pWLoop) */\n        i8 isOrdered;                     /* isOrdered for (pFrom+pWLoop) */\n        Bitmask maskNew;                  /* Mask of src visited by (..) */\n        Bitmask revMask;                  /* Mask of rev-order loops for (..) */\n\n        if( (pWLoop->prereq & ~pFrom->maskLoop)!=0 ) continue;\n        if( (pWLoop->maskSelf & pFrom->maskLoop)!=0 ) continue;\n        if( (pWLoop->wsFlags & WHERE_AUTO_INDEX)!=0 && pFrom->nRow<3 ){\n          /* Do not use an automatic index if the this loop is expected\n          ** to run less than 1.25 times.  It is tempting to also exclude\n          ** automatic index usage on an outer loop, but sometimes an automatic\n          ** index is useful in the outer loop of a correlated subquery. */\n          assert( 10==sqlite3LogEst(2) );\n          continue;\n        }\n\n        /* At this point, pWLoop is a candidate to be the next loop.\n        ** Compute its cost */\n        rUnsort = pWLoop->rRun + pFrom->nRow;\n        if( pWLoop->rSetup ){\n          rUnsort = sqlite3LogEstAdd(pWLoop->rSetup, rUnsort);\n        }\n        rUnsort = sqlite3LogEstAdd(rUnsort, pFrom->rUnsort);\n        nOut = pFrom->nRow + pWLoop->nOut;\n        maskNew = pFrom->maskLoop | pWLoop->maskSelf;\n        isOrdered = pFrom->isOrdered;\n        if( isOrdered<0 ){\n          revMask = 0;\n          isOrdered = wherePathSatisfiesOrderBy(pWInfo,\n                       pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags,\n                       iLoop, pWLoop, &revMask);\n        }else{\n          revMask = pFrom->revLoop;\n        }\n        if( isOrdered>=0 && isOrdered<nOrderBy ){\n          if( aSortCost[isOrdered]==0 ){\n            aSortCost[isOrdered] = whereSortingCost(\n                pWInfo, nRowEst, nOrderBy, isOrdered\n            );\n          }\n          /* TUNING:  Add a small extra penalty (3) to sorting as an\n          ** extra encouragement to the query planner to select a plan\n          ** where the rows emerge in the correct order without any sorting\n          ** required. */\n          rCost = sqlite3LogEstAdd(rUnsort, aSortCost[isOrdered]) + 3;\n\n          WHERETRACE(0x002,\n              (\"---- sort cost=%-3d (%d/%d) increases cost %3d to %-3d\\n\",\n               aSortCost[isOrdered], (nOrderBy-isOrdered), nOrderBy,\n               rUnsort, rCost));\n        }else{\n          rCost = rUnsort;\n          rUnsort -= 2;  /* TUNING:  Slight bias in favor of no-sort plans */\n        }\n\n        /* Check to see if pWLoop should be added to the set of\n        ** mxChoice best-so-far paths.\n        **\n        ** First look for an existing path among best-so-far paths\n        ** that:\n        **     (1) covers the same set of loops, and\n        **     (2) has a compatible isOrdered value.\n        **\n        ** \"Compatible isOrdered value\" means either\n        **     (A) both have isOrdered==-1, or\n        **     (B) both have isOrder>=0, or\n        **     (C) ordering does not matter because this is the last round\n        **         of the solver.\n        **\n        ** The term \"((pTo->isOrdered^isOrdered)&0x80)==0\" is equivalent\n        ** to (pTo->isOrdered==(-1))==(isOrdered==(-1))\" for the range\n        ** of legal values for isOrdered, -1..64.\n        */\n        testcase( nTo==0 );\n        for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){\n          if( pTo->maskLoop==maskNew\n           && ( ((pTo->isOrdered^isOrdered)&0x80)==0 || iLoop==nLoop-1 )\n          ){\n            testcase( jj==nTo-1 );\n            break;\n          }\n        }\n        if( jj>=nTo ){\n          /* None of the existing best-so-far paths match the candidate. */\n          if( nTo>=mxChoice\n           && (rCost>mxCost || (rCost==mxCost && rUnsort>=mxUnsort))\n          ){\n            /* The current candidate is no better than any of the mxChoice\n            ** paths currently in the best-so-far buffer.  So discard\n            ** this candidate as not viable. */\n#ifdef WHERETRACE_ENABLED /* 0x4 */\n            if( sqlite3WhereTrace&0x4 ){\n              sqlite3DebugPrintf(\"Skip   %s cost=%-3d,%3d,%3d order=%c\\n\",\n                  wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsort,\n                  isOrdered>=0 ? isOrdered+'0' : '?');\n            }\n#endif\n            continue;\n          }\n          /* If we reach this points it means that the new candidate path\n          ** needs to be added to the set of best-so-far paths. */\n          if( nTo<mxChoice ){\n            /* Increase the size of the aTo set by one */\n            jj = nTo++;\n          }else{\n            /* New path replaces the prior worst to keep count below mxChoice */\n            jj = mxI;\n          }\n          pTo = &aTo[jj];\n#ifdef WHERETRACE_ENABLED /* 0x4 */\n          if( sqlite3WhereTrace&0x4 ){\n            sqlite3DebugPrintf(\"New    %s cost=%-3d,%3d,%3d order=%c\\n\",\n                wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsort,\n                isOrdered>=0 ? isOrdered+'0' : '?');\n          }\n#endif\n        }else{\n          /* Control reaches here if best-so-far path pTo=aTo[jj] covers the\n          ** same set of loops and has the same isOrdered setting as the\n          ** candidate path.  Check to see if the candidate should replace\n          ** pTo or if the candidate should be skipped.\n          **\n          ** The conditional is an expanded vector comparison equivalent to:\n          **   (pTo->rCost,pTo->nRow,pTo->rUnsort) <= (rCost,nOut,rUnsort)\n          */\n          if( (pTo->rCost<rCost)\n           || (pTo->rCost==rCost && pTo->nRow<nOut)\n           || (pTo->rCost==rCost && pTo->nRow==nOut && pTo->rUnsort<rUnsort)\n           || (pTo->rCost==rCost && pTo->nRow==nOut && pTo->rUnsort==rUnsort\n                  && whereLoopIsNoBetter(pWLoop, pTo->aLoop[iLoop]) )\n          ){\n#ifdef WHERETRACE_ENABLED /* 0x4 */\n            if( sqlite3WhereTrace&0x4 ){\n              sqlite3DebugPrintf(\n                  \"Skip   %s cost=%-3d,%3d,%3d order=%c\",\n                  wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsort,\n                  isOrdered>=0 ? isOrdered+'0' : '?');\n              sqlite3DebugPrintf(\"   vs %s cost=%-3d,%3d,%3d order=%c\\n\",\n                  wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,\n                  pTo->rUnsort, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?');\n            }\n#endif\n            /* Discard the candidate path from further consideration */\n            testcase( pTo->rCost==rCost );\n            continue;\n          }\n          testcase( pTo->rCost==rCost+1 );\n          /* Control reaches here if the candidate path is better than the\n          ** pTo path.  Replace pTo with the candidate. */\n#ifdef WHERETRACE_ENABLED /* 0x4 */\n          if( sqlite3WhereTrace&0x4 ){\n            sqlite3DebugPrintf(\n                \"Update %s cost=%-3d,%3d,%3d order=%c\",\n                wherePathName(pFrom, iLoop, pWLoop), rCost, nOut, rUnsort,\n                isOrdered>=0 ? isOrdered+'0' : '?');\n            sqlite3DebugPrintf(\"  was %s cost=%-3d,%3d,%3d order=%c\\n\",\n                wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,\n                pTo->rUnsort, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?');\n          }\n#endif\n        }\n        /* pWLoop is a winner.  Add it to the set of best so far */\n        pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf;\n        pTo->revLoop = revMask;\n        pTo->nRow = nOut;\n        pTo->rCost = rCost;\n        pTo->rUnsort = rUnsort;\n        pTo->isOrdered = isOrdered;\n        memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);\n        pTo->aLoop[iLoop] = pWLoop;\n        if( nTo>=mxChoice ){\n          mxI = 0;\n          mxCost = aTo[0].rCost;\n          mxUnsort = aTo[0].nRow;\n          for(jj=1, pTo=&aTo[1]; jj<mxChoice; jj++, pTo++){\n            if( pTo->rCost>mxCost\n             || (pTo->rCost==mxCost && pTo->rUnsort>mxUnsort)\n            ){\n              mxCost = pTo->rCost;\n              mxUnsort = pTo->rUnsort;\n              mxI = jj;\n            }\n          }\n        }\n      }\n    }\n\n#ifdef WHERETRACE_ENABLED  /* >=2 */\n    if( sqlite3WhereTrace & 0x02 ){\n      LogEst rMin, rFloor = 0;\n      int nDone = 0;\n      int nProgress;\n      sqlite3DebugPrintf(\"---- after round %d ----\\n\", iLoop);\n      do{\n        nProgress = 0;\n        rMin = 0x7fff;\n        for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){\n          if( pTo->rCost>rFloor && pTo->rCost<rMin ) rMin = pTo->rCost;\n        }\n        for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){\n          if( pTo->rCost==rMin ){\n            sqlite3DebugPrintf(\" %s cost=%-3d nrow=%-3d order=%c\",\n               wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,\n               pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?');\n            if( pTo->isOrdered>0 ){\n              sqlite3DebugPrintf(\" rev=0x%llx\\n\", pTo->revLoop);\n            }else{\n              sqlite3DebugPrintf(\"\\n\");\n            }\n            nDone++;\n            nProgress++;\n          }\n        }\n        rFloor = rMin;\n      }while( nDone<nTo && nProgress>0 );\n    }\n#endif\n\n    /* Swap the roles of aFrom and aTo for the next generation */\n    pFrom = aTo;\n    aTo = aFrom;\n    aFrom = pFrom;\n    nFrom = nTo;\n  }\n\n  if( nFrom==0 ){\n    sqlite3ErrorMsg(pParse, \"no query solution\");\n    sqlite3StackFreeNN(pParse->db, pSpace);\n    return SQLITE_ERROR;\n  }\n\n  /* Only one path is available, which is the best path */\n  assert( nFrom==1 );\n  pFrom = aFrom;\n\n  assert( pWInfo->nLevel==nLoop );\n  /* Load the lowest cost path into pWInfo */\n  for(iLoop=0; iLoop<nLoop; iLoop++){\n    WhereLevel *pLevel = pWInfo->a + iLoop;\n    pLevel->pWLoop = pWLoop = pFrom->aLoop[iLoop];\n    pLevel->iFrom = pWLoop->iTab;\n    pLevel->iTabCur = pWInfo->pTabList->a[pLevel->iFrom].iCursor;\n  }\n  if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0\n   && (pWInfo->wctrlFlags & WHERE_DISTINCTBY)==0\n   && pWInfo->eDistinct==WHERE_DISTINCT_NOOP\n   && nRowEst\n  ){\n    Bitmask notUsed;\n    int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pResultSet, pFrom,\n                 WHERE_DISTINCTBY, nLoop-1, pFrom->aLoop[nLoop-1], &notUsed);\n    if( rc==pWInfo->pResultSet->nExpr ){\n      pWInfo->eDistinct = WHERE_DISTINCT_ORDERED;\n    }\n  }\n  pWInfo->bOrderedInnerLoop = 0;\n  if( pWInfo->pOrderBy ){\n    pWInfo->nOBSat = pFrom->isOrdered;\n    if( pWInfo->wctrlFlags & WHERE_DISTINCTBY ){\n      if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){\n        pWInfo->eDistinct = WHERE_DISTINCT_ORDERED;\n      }\n      /* vvv--- See check-in [12ad822d9b827777] on 2023-03-16 ---vvv */\n      assert( pWInfo->pSelect->pOrderBy==0\n           || pWInfo->nOBSat <= pWInfo->pSelect->pOrderBy->nExpr );\n    }else{\n      pWInfo->revMask = pFrom->revLoop;\n      if( pWInfo->nOBSat<=0 ){\n        pWInfo->nOBSat = 0;\n        if( nLoop>0 ){\n          u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;\n          if( (wsFlags & WHERE_ONEROW)==0\n           && (wsFlags&(WHERE_IPK|WHERE_COLUMN_IN))!=(WHERE_IPK|WHERE_COLUMN_IN)\n          ){\n            Bitmask m = 0;\n            int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,\n                      WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);\n            testcase( wsFlags & WHERE_IPK );\n            testcase( wsFlags & WHERE_COLUMN_IN );\n            if( rc==pWInfo->pOrderBy->nExpr ){\n              pWInfo->bOrderedInnerLoop = 1;\n              pWInfo->revMask = m;\n            }\n          }\n        }\n      }else if( nLoop\n            && pWInfo->nOBSat==1\n            && (pWInfo->wctrlFlags & (WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX))!=0\n            ){\n        pWInfo->bOrderedInnerLoop = 1;\n      }\n    }\n    if( (pWInfo->wctrlFlags & WHERE_SORTBYGROUP)\n        && pWInfo->nOBSat==pWInfo->pOrderBy->nExpr && nLoop>0\n    ){\n      Bitmask revMask = 0;\n      int nOrder = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy,\n          pFrom, 0, nLoop-1, pFrom->aLoop[nLoop-1], &revMask\n      );\n      assert( pWInfo->sorted==0 );\n      if( nOrder==pWInfo->pOrderBy->nExpr ){\n        pWInfo->sorted = 1;\n        pWInfo->revMask = revMask;\n      }\n    }\n  }\n\n  pWInfo->nRowOut = pFrom->nRow;\n#ifdef WHERETRACE_ENABLED\n  pWInfo->rTotalCost = pFrom->rCost;\n#endif\n\n  /* Free temporary memory and return success */\n  sqlite3StackFreeNN(pParse->db, pSpace);\n  return SQLITE_OK;\n}\n\n/*\n** This routine implements a heuristic designed to improve query planning.\n** This routine is called in between the first and second call to\n** wherePathSolver().  Hence the name \"Interstage\" \"Heuristic\".\n**\n** The first call to wherePathSolver() (hereafter just \"solver()\") computes\n** the best path without regard to the order of the outputs.  The second call\n** to the solver() builds upon the first call to try to find an alternative\n** path that satisfies the ORDER BY clause.\n**\n** This routine looks at the results of the first solver() run, and for\n** every FROM clause term in the resulting query plan that uses an equality\n** constraint against an index, disable other WhereLoops for that same\n** FROM clause term that would try to do a full-table scan.  This prevents\n** an index search from being converted into a full-table scan in order to\n** satisfy an ORDER BY clause, since even though we might get slightly better\n** performance using the full-scan without sorting if the output size\n** estimates are very precise, we might also get severe performance\n** degradation using the full-scan if the output size estimate is too large.\n** It is better to err on the side of caution.\n**\n** Except, if the first solver() call generated a full-table scan in an outer\n** loop then stop this analysis at the first full-scan, since the second\n** solver() run might try to swap that full-scan for another in order to\n** get the output into the correct order.  In other words, we allow a\n** rewrite like this:\n**\n**     First Solver()                      Second Solver()\n**       |-- SCAN t1                         |-- SCAN t2\n**       |-- SEARCH t2                       `-- SEARCH t1\n**       `-- SORT USING B-TREE\n**\n** The purpose of this routine is to disallow rewrites such as:\n**\n**     First Solver()                      Second Solver()\n**       |-- SEARCH t1                       |-- SCAN t2     <--- bad!\n**       |-- SEARCH t2                       `-- SEARCH t1\n**       `-- SORT USING B-TREE\n**\n** See test cases in test/whereN.test for the real-world query that\n** originally provoked this heuristic.\n*/\nstatic SQLITE_NOINLINE void whereInterstageHeuristic(WhereInfo *pWInfo){\n  int i;\n#ifdef WHERETRACE_ENABLED\n  int once = 0;\n#endif\n  for(i=0; i<pWInfo->nLevel; i++){\n    WhereLoop *p = pWInfo->a[i].pWLoop;\n    if( p==0 ) break;\n    if( (p->wsFlags & WHERE_VIRTUALTABLE)!=0 ){\n      /* Treat a vtab scan as similar to a full-table scan */\n      break;\n    }\n    if( (p->wsFlags & (WHERE_COLUMN_EQ|WHERE_COLUMN_NULL|WHERE_COLUMN_IN))!=0 ){\n      u8 iTab = p->iTab;\n      WhereLoop *pLoop;\n      for(pLoop=pWInfo->pLoops; pLoop; pLoop=pLoop->pNextLoop){\n        if( pLoop->iTab!=iTab ) continue;\n        if( (pLoop->wsFlags & (WHERE_CONSTRAINT|WHERE_AUTO_INDEX))!=0 ){\n          /* Auto-index and index-constrained loops allowed to remain */\n          continue;\n        }\n#ifdef WHERETRACE_ENABLED\n        if( sqlite3WhereTrace & 0x80 ){\n          if( once==0 ){\n            sqlite3DebugPrintf(\"Loops disabled by interstage heuristic:\\n\");\n            once = 1;\n          }\n          sqlite3WhereLoopPrint(pLoop, &pWInfo->sWC);\n        }\n#endif /* WHERETRACE_ENABLED */\n        pLoop->prereq = ALLBITS;  /* Prevent 2nd solver() from using this one */\n      }\n    }else{\n      break;\n    }\n  }\n}\n\n/*\n** Most queries use only a single table (they are not joins) and have\n** simple == constraints against indexed fields.  This routine attempts\n** to plan those simple cases using much less ceremony than the\n** general-purpose query planner, and thereby yield faster sqlite3_prepare()\n** times for the common case.\n**\n** Return non-zero on success, if this query can be handled by this\n** no-frills query planner.  Return zero if this query needs the\n** general-purpose query planner.\n*/\nstatic int whereShortCut(WhereLoopBuilder *pBuilder){\n  WhereInfo *pWInfo;\n  SrcItem *pItem;\n  WhereClause *pWC;\n  WhereTerm *pTerm;\n  WhereLoop *pLoop;\n  int iCur;\n  int j;\n  Table *pTab;\n  Index *pIdx;\n  WhereScan scan;\n\n  pWInfo = pBuilder->pWInfo;\n  if( pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE ) return 0;\n  assert( pWInfo->pTabList->nSrc>=1 );\n  pItem = pWInfo->pTabList->a;\n  pTab = pItem->pSTab;\n  if( IsVirtual(pTab) ) return 0;\n  if( pItem->fg.isIndexedBy || pItem->fg.notIndexed ){\n    testcase( pItem->fg.isIndexedBy );\n    testcase( pItem->fg.notIndexed );\n    return 0;\n  }\n  iCur = pItem->iCursor;\n  pWC = &pWInfo->sWC;\n  pLoop = pBuilder->pNew;\n  pLoop->wsFlags = 0;\n  pLoop->nSkip = 0;\n  pTerm = whereScanInit(&scan, pWC, iCur, -1, WO_EQ|WO_IS, 0);\n  while( pTerm && pTerm->prereqRight ) pTerm = whereScanNext(&scan);\n  if( pTerm ){\n    testcase( pTerm->eOperator & WO_IS );\n    pLoop->wsFlags = WHERE_COLUMN_EQ|WHERE_IPK|WHERE_ONEROW;\n    pLoop->aLTerm[0] = pTerm;\n    pLoop->nLTerm = 1;\n    pLoop->u.btree.nEq = 1;\n    /* TUNING: Cost of a rowid lookup is 10 */\n    pLoop->rRun = 33;  /* 33==sqlite3LogEst(10) */\n  }else{\n    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){\n      int opMask;\n      assert( pLoop->aLTermSpace==pLoop->aLTerm );\n      if( !IsUniqueIndex(pIdx)\n       || pIdx->pPartIdxWhere!=0\n       || pIdx->nKeyCol>ArraySize(pLoop->aLTermSpace)\n      ) continue;\n      opMask = pIdx->uniqNotNull ? (WO_EQ|WO_IS) : WO_EQ;\n      for(j=0; j<pIdx->nKeyCol; j++){\n        pTerm = whereScanInit(&scan, pWC, iCur, j, opMask, pIdx);\n        while( pTerm && pTerm->prereqRight ) pTerm = whereScanNext(&scan);\n        if( pTerm==0 ) break;\n        testcase( pTerm->eOperator & WO_IS );\n        pLoop->aLTerm[j] = pTerm;\n      }\n      if( j!=pIdx->nKeyCol ) continue;\n      pLoop->wsFlags = WHERE_COLUMN_EQ|WHERE_ONEROW|WHERE_INDEXED;\n      if( pIdx->isCovering || (pItem->colUsed & pIdx->colNotIdxed)==0 ){\n        pLoop->wsFlags |= WHERE_IDX_ONLY;\n      }\n      pLoop->nLTerm = j;\n      pLoop->u.btree.nEq = j;\n      pLoop->u.btree.pIndex = pIdx;\n      /* TUNING: Cost of a unique index lookup is 15 */\n      pLoop->rRun = 39;  /* 39==sqlite3LogEst(15) */\n      break;\n    }\n  }\n  if( pLoop->wsFlags ){\n    pLoop->nOut = (LogEst)1;\n    pWInfo->a[0].pWLoop = pLoop;\n    assert( pWInfo->sMaskSet.n==1 && iCur==pWInfo->sMaskSet.ix[0] );\n    pLoop->maskSelf = 1; /* sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur); */\n    pWInfo->a[0].iTabCur = iCur;\n    pWInfo->nRowOut = 1;\n    if( pWInfo->pOrderBy ) pWInfo->nOBSat =  pWInfo->pOrderBy->nExpr;\n    if( pWInfo->wctrlFlags & WHERE_WANT_DISTINCT ){\n      pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;\n    }\n    if( scan.iEquiv>1 ) pLoop->wsFlags |= WHERE_TRANSCONS;\n#ifdef SQLITE_DEBUG\n    pLoop->cId = '0';\n#endif\n#ifdef WHERETRACE_ENABLED\n    if( sqlite3WhereTrace & 0x02 ){\n      sqlite3DebugPrintf(\"whereShortCut() used to compute solution\\n\");\n    }\n#endif\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** Helper function for exprIsDeterministic().\n*/\nstatic int exprNodeIsDeterministic(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_FUNCTION && ExprHasProperty(pExpr, EP_ConstFunc)==0 ){\n    pWalker->eCode = 0;\n    return WRC_Abort;\n  }\n  return WRC_Continue;\n}\n\n/*\n** Return true if the expression contains no non-deterministic SQL\n** functions. Do not consider non-deterministic SQL functions that are\n** part of sub-select statements.\n*/\nstatic int exprIsDeterministic(Expr *p){\n  Walker w;\n  memset(&w, 0, sizeof(w));\n  w.eCode = 1;\n  w.xExprCallback = exprNodeIsDeterministic;\n  w.xSelectCallback = sqlite3SelectWalkFail;\n  sqlite3WalkExpr(&w, p);\n  return w.eCode;\n}\n\n\n#ifdef WHERETRACE_ENABLED\n/*\n** Display all WhereLoops in pWInfo\n*/\nstatic void showAllWhereLoops(WhereInfo *pWInfo, WhereClause *pWC){\n  if( sqlite3WhereTrace ){    /* Display all of the WhereLoop objects */\n    WhereLoop *p;\n    int i;\n    static const char zLabel[] = \"0123456789abcdefghijklmnopqrstuvwyxz\"\n                                           \"ABCDEFGHIJKLMNOPQRSTUVWYXZ\";\n    for(p=pWInfo->pLoops, i=0; p; p=p->pNextLoop, i++){\n      p->cId = zLabel[i%(sizeof(zLabel)-1)];\n      sqlite3WhereLoopPrint(p, pWC);\n    }\n  }\n}\n# define WHERETRACE_ALL_LOOPS(W,C) showAllWhereLoops(W,C)\n#else\n# define WHERETRACE_ALL_LOOPS(W,C)\n#endif\n\n/* Attempt to omit tables from a join that do not affect the result.\n** For a table to not affect the result, the following must be true:\n**\n**   1) The query must not be an aggregate.\n**   2) The table must be the RHS of a LEFT JOIN.\n**   3) Either the query must be DISTINCT, or else the ON or USING clause\n**      must contain a constraint that limits the scan of the table to\n**      at most a single row.\n**   4) The table must not be referenced by any part of the query apart\n**      from its own USING or ON clause.\n**   5) The table must not have an inner-join ON or USING clause if there is\n**      a RIGHT JOIN anywhere in the query.  Otherwise the ON/USING clause\n**      might move from the right side to the left side of the RIGHT JOIN.\n**      Note: Due to (2), this condition can only arise if the table is\n**      the right-most table of a subquery that was flattened into the\n**      main query and that subquery was the right-hand operand of an\n**      inner join that held an ON or USING clause.\n**   6) The ORDER BY clause has 63 or fewer terms\n**   7) The omit-noop-join optimization is enabled.\n**\n** Items (1), (6), and (7) are checked by the caller.\n**\n** For example, given:\n**\n**     CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1);\n**     CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2);\n**     CREATE TABLE t3(ipk INTEGER PRIMARY KEY, v3);\n**\n** then table t2 can be omitted from the following:\n**\n**     SELECT v1, v3 FROM t1\n**       LEFT JOIN t2 ON (t1.ipk=t2.ipk)\n**       LEFT JOIN t3 ON (t1.ipk=t3.ipk)\n**\n** or from:\n**\n**     SELECT DISTINCT v1, v3 FROM t1\n**       LEFT JOIN t2\n**       LEFT JOIN t3 ON (t1.ipk=t3.ipk)\n*/\nstatic SQLITE_NOINLINE Bitmask whereOmitNoopJoin(\n  WhereInfo *pWInfo,\n  Bitmask notReady\n){\n  int i;\n  Bitmask tabUsed;\n  int hasRightJoin;\n\n  /* Preconditions checked by the caller */\n  assert( pWInfo->nLevel>=2 );\n  assert( OptimizationEnabled(pWInfo->pParse->db, SQLITE_OmitNoopJoin) );\n\n  /* These two preconditions checked by the caller combine to guarantee\n  ** condition (1) of the header comment */\n  assert( pWInfo->pResultSet!=0 );\n  assert( 0==(pWInfo->wctrlFlags & WHERE_AGG_DISTINCT) );\n\n  tabUsed = sqlite3WhereExprListUsage(&pWInfo->sMaskSet, pWInfo->pResultSet);\n  if( pWInfo->pOrderBy ){\n    tabUsed |= sqlite3WhereExprListUsage(&pWInfo->sMaskSet, pWInfo->pOrderBy);\n  }\n  hasRightJoin = (pWInfo->pTabList->a[0].fg.jointype & JT_LTORJ)!=0;\n  for(i=pWInfo->nLevel-1; i>=1; i--){\n    WhereTerm *pTerm, *pEnd;\n    SrcItem *pItem;\n    WhereLoop *pLoop;\n    Bitmask m1;\n    pLoop = pWInfo->a[i].pWLoop;\n    pItem = &pWInfo->pTabList->a[pLoop->iTab];\n    if( (pItem->fg.jointype & (JT_LEFT|JT_RIGHT))!=JT_LEFT ) continue;\n    if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)==0\n     && (pLoop->wsFlags & WHERE_ONEROW)==0\n    ){\n      continue;\n    }\n    if( (tabUsed & pLoop->maskSelf)!=0 ) continue;\n    pEnd = pWInfo->sWC.a + pWInfo->sWC.nTerm;\n    for(pTerm=pWInfo->sWC.a; pTerm<pEnd; pTerm++){\n      if( (pTerm->prereqAll & pLoop->maskSelf)!=0 ){\n        if( !ExprHasProperty(pTerm->pExpr, EP_OuterON)\n         || pTerm->pExpr->w.iJoin!=pItem->iCursor\n        ){\n          break;\n        }\n      }\n      if( hasRightJoin\n       && ExprHasProperty(pTerm->pExpr, EP_InnerON)\n       && NEVER(pTerm->pExpr->w.iJoin==pItem->iCursor)\n      ){\n        break;  /* restriction (5) */\n      }\n    }\n    if( pTerm<pEnd ) continue;\n    WHERETRACE(0xffffffff,(\"-> omit unused FROM-clause term %c\\n\",pLoop->cId));\n    m1 = MASKBIT(i)-1;\n    testcase( ((pWInfo->revMask>>1) & ~m1)!=0 );\n    pWInfo->revMask = (m1 & pWInfo->revMask) | ((pWInfo->revMask>>1) & ~m1);\n    notReady &= ~pLoop->maskSelf;\n    for(pTerm=pWInfo->sWC.a; pTerm<pEnd; pTerm++){\n      if( (pTerm->prereqAll & pLoop->maskSelf)!=0 ){\n        pTerm->wtFlags |= TERM_CODED;\n      }\n    }\n    if( i!=pWInfo->nLevel-1 ){\n      int nByte = (pWInfo->nLevel-1-i) * sizeof(WhereLevel);\n      memmove(&pWInfo->a[i], &pWInfo->a[i+1], nByte);\n    }\n    pWInfo->nLevel--;\n    assert( pWInfo->nLevel>0 );\n  }\n  return notReady;\n}\n\n/*\n** Check to see if there are any SEARCH loops that might benefit from\n** using a Bloom filter.  Consider a Bloom filter if:\n**\n**   (1)  The SEARCH happens more than N times where N is the number\n**        of rows in the table that is being considered for the Bloom\n**        filter.\n**   (2)  Some searches are expected to find zero rows.  (This is determined\n**        by the WHERE_SELFCULL flag on the term.)\n**   (3)  Bloom-filter processing is not disabled.  (Checked by the\n**        caller.)\n**   (4)  The size of the table being searched is known by ANALYZE.\n**\n** This block of code merely checks to see if a Bloom filter would be\n** appropriate, and if so sets the WHERE_BLOOMFILTER flag on the\n** WhereLoop.  The implementation of the Bloom filter comes further\n** down where the code for each WhereLoop is generated.\n*/\nstatic SQLITE_NOINLINE void whereCheckIfBloomFilterIsUseful(\n  const WhereInfo *pWInfo\n){\n  int i;\n  LogEst nSearch = 0;\n\n  assert( pWInfo->nLevel>=2 );\n  assert( OptimizationEnabled(pWInfo->pParse->db, SQLITE_BloomFilter) );\n  for(i=0; i<pWInfo->nLevel; i++){\n    WhereLoop *pLoop = pWInfo->a[i].pWLoop;\n    const unsigned int reqFlags = (WHERE_SELFCULL|WHERE_COLUMN_EQ);\n    SrcItem *pItem = &pWInfo->pTabList->a[pLoop->iTab];\n    Table *pTab = pItem->pSTab;\n    if( (pTab->tabFlags & TF_HasStat1)==0 ) break;\n    pTab->tabFlags |= TF_MaybeReanalyze;\n    if( i>=1\n     && (pLoop->wsFlags & reqFlags)==reqFlags\n     /* vvvvvv--- Always the case if WHERE_COLUMN_EQ is defined */\n     && ALWAYS((pLoop->wsFlags & (WHERE_IPK|WHERE_INDEXED))!=0)\n    ){\n      if( nSearch > pTab->nRowLogEst ){\n        testcase( pItem->fg.jointype & JT_LEFT );\n        pLoop->wsFlags |= WHERE_BLOOMFILTER;\n        pLoop->wsFlags &= ~WHERE_IDX_ONLY;\n        WHERETRACE(0xffffffff, (\n           \"-> use Bloom-filter on loop %c because there are ~%.1e \"\n           \"lookups into %s which has only ~%.1e rows\\n\",\n           pLoop->cId, (double)sqlite3LogEstToInt(nSearch), pTab->zName,\n           (double)sqlite3LogEstToInt(pTab->nRowLogEst)));\n      }\n    }\n    nSearch += pLoop->nOut;\n  }\n}\n\n/*\n** The index pIdx is used by a query and contains one or more expressions.\n** In other words pIdx is an index on an expression.  iIdxCur is the cursor\n** number for the index and iDataCur is the cursor number for the corresponding\n** table.\n**\n** This routine adds IndexedExpr entries to the Parse->pIdxEpr field for\n** each of the expressions in the index so that the expression code generator\n** will know to replace occurrences of the indexed expression with\n** references to the corresponding column of the index.\n*/\nstatic SQLITE_NOINLINE void whereAddIndexedExpr(\n  Parse *pParse,     /* Add IndexedExpr entries to pParse->pIdxEpr */\n  Index *pIdx,       /* The index-on-expression that contains the expressions */\n  int iIdxCur,       /* Cursor number for pIdx */\n  SrcItem *pTabItem  /* The FROM clause entry for the table */\n){\n  int i;\n  IndexedExpr *p;\n  Table *pTab;\n  assert( pIdx->bHasExpr );\n  pTab = pIdx->pTable;\n  for(i=0; i<pIdx->nColumn; i++){\n    Expr *pExpr;\n    int j = pIdx->aiColumn[i];\n    if( j==XN_EXPR ){\n      pExpr = pIdx->aColExpr->a[i].pExpr;\n    }else if( j>=0 && (pTab->aCol[j].colFlags & COLFLAG_VIRTUAL)!=0 ){\n      pExpr = sqlite3ColumnExpr(pTab, &pTab->aCol[j]);\n    }else{\n      continue;\n    }\n    if( sqlite3ExprIsConstant(0,pExpr) ) continue;\n    p = sqlite3DbMallocRaw(pParse->db,  sizeof(IndexedExpr));\n    if( p==0 ) break;\n    p->pIENext = pParse->pIdxEpr;\n#ifdef WHERETRACE_ENABLED\n    if( sqlite3WhereTrace & 0x200 ){\n      sqlite3DebugPrintf(\"New pParse->pIdxEpr term {%d,%d}\\n\", iIdxCur, i);\n      if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(pExpr);\n    }\n#endif\n    p->pExpr = sqlite3ExprDup(pParse->db, pExpr, 0);\n    p->iDataCur = pTabItem->iCursor;\n    p->iIdxCur = iIdxCur;\n    p->iIdxCol = i;\n    p->bMaybeNullRow = (pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT))!=0;\n    if( sqlite3IndexAffinityStr(pParse->db, pIdx) ){\n      p->aff = pIdx->zColAff[i];\n    }\n#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS\n    p->zIdxName = pIdx->zName;\n#endif\n    pParse->pIdxEpr = p;\n    if( p->pIENext==0 ){\n      void *pArg = (void*)&pParse->pIdxEpr;\n      sqlite3ParserAddCleanup(pParse, whereIndexedExprCleanup, pArg);\n    }\n  }\n}\n\n/*\n** Set the reverse-scan order mask to one for all tables in the query\n** with the exception of MATERIALIZED common table expressions that have\n** their own internal ORDER BY clauses.\n**\n** This implements the PRAGMA reverse_unordered_selects=ON setting.\n** (Also SQLITE_DBCONFIG_REVERSE_SCANORDER).\n*/\nstatic SQLITE_NOINLINE void whereReverseScanOrder(WhereInfo *pWInfo){\n  int ii;\n  for(ii=0; ii<pWInfo->pTabList->nSrc; ii++){\n    SrcItem *pItem = &pWInfo->pTabList->a[ii];\n    if( !pItem->fg.isCte\n     || pItem->u2.pCteUse->eM10d!=M10d_Yes\n     || NEVER(pItem->fg.isSubquery==0)\n     || pItem->u4.pSubq->pSelect->pOrderBy==0\n    ){\n      pWInfo->revMask |= MASKBIT(ii);\n    }\n  }\n}\n\n/*\n** Generate the beginning of the loop used for WHERE clause processing.\n** The return value is a pointer to an opaque structure that contains\n** information needed to terminate the loop.  Later, the calling routine\n** should invoke sqlite3WhereEnd() with the return value of this function\n** in order to complete the WHERE clause processing.\n**\n** If an error occurs, this routine returns NULL.\n**\n** The basic idea is to do a nested loop, one loop for each table in\n** the FROM clause of a select.  (INSERT and UPDATE statements are the\n** same as a SELECT with only a single table in the FROM clause.)  For\n** example, if the SQL is this:\n**\n**       SELECT * FROM t1, t2, t3 WHERE ...;\n**\n** Then the code generated is conceptually like the following:\n**\n**      foreach row1 in t1 do       \\    Code generated\n**        foreach row2 in t2 do      |-- by sqlite3WhereBegin()\n**          foreach row3 in t3 do   /\n**            ...\n**          end                     \\    Code generated\n**        end                        |-- by sqlite3WhereEnd()\n**      end                         /\n**\n** Note that the loops might not be nested in the order in which they\n** appear in the FROM clause if a different order is better able to make\n** use of indices.  Note also that when the IN operator appears in\n** the WHERE clause, it might result in additional nested loops for\n** scanning through all values on the right-hand side of the IN.\n**\n** There are Btree cursors associated with each table.  t1 uses cursor\n** number pTabList->a[0].iCursor.  t2 uses the cursor pTabList->a[1].iCursor.\n** And so forth.  This routine generates code to open those VDBE cursors\n** and sqlite3WhereEnd() generates the code to close them.\n**\n** The code that sqlite3WhereBegin() generates leaves the cursors named\n** in pTabList pointing at their appropriate entries.  The [...] code\n** can use OP_Column and OP_Rowid opcodes on these cursors to extract\n** data from the various tables of the loop.\n**\n** If the WHERE clause is empty, the foreach loops must each scan their\n** entire tables.  Thus a three-way join is an O(N^3) operation.  But if\n** the tables have indices and there are terms in the WHERE clause that\n** refer to those indices, a complete table scan can be avoided and the\n** code will run much faster.  Most of the work of this routine is checking\n** to see if there are indices that can be used to speed up the loop.\n**\n** Terms of the WHERE clause are also used to limit which rows actually\n** make it to the \"...\" in the middle of the loop.  After each \"foreach\",\n** terms of the WHERE clause that use only terms in that loop and outer\n** loops are evaluated and if false a jump is made around all subsequent\n** inner loops (or around the \"...\" if the test occurs within the inner-\n** most loop)\n**\n** OUTER JOINS\n**\n** An outer join of tables t1 and t2 is conceptually coded as follows:\n**\n**    foreach row1 in t1 do\n**      flag = 0\n**      foreach row2 in t2 do\n**        start:\n**          ...\n**          flag = 1\n**      end\n**      if flag==0 then\n**        move the row2 cursor to a null row\n**        goto start\n**      fi\n**    end\n**\n** ORDER BY CLAUSE PROCESSING\n**\n** pOrderBy is a pointer to the ORDER BY clause (or the GROUP BY clause\n** if the WHERE_GROUPBY flag is set in wctrlFlags) of a SELECT statement\n** if there is one.  If there is no ORDER BY clause or if this routine\n** is called from an UPDATE or DELETE statement, then pOrderBy is NULL.\n**\n** The iIdxCur parameter is the cursor number of an index.  If\n** WHERE_OR_SUBCLAUSE is set, iIdxCur is the cursor number of an index\n** to use for OR clause processing.  The WHERE clause should use this\n** specific cursor.  If WHERE_ONEPASS_DESIRED is set, then iIdxCur is\n** the first cursor in an array of cursors for all indices.  iIdxCur should\n** be used to compute the appropriate cursor depending on which index is\n** used.\n*/\nSQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(\n  Parse *pParse,          /* The parser context */\n  SrcList *pTabList,      /* FROM clause: A list of all tables to be scanned */\n  Expr *pWhere,           /* The WHERE clause */\n  ExprList *pOrderBy,     /* An ORDER BY (or GROUP BY) clause, or NULL */\n  ExprList *pResultSet,   /* Query result set.  Req'd for DISTINCT */\n  Select *pSelect,        /* The entire SELECT statement */\n  u16 wctrlFlags,         /* The WHERE_* flags defined in sqliteInt.h */\n  int iAuxArg             /* If WHERE_OR_SUBCLAUSE is set, index cursor number\n                          ** If WHERE_USE_LIMIT, then the limit amount */\n){\n  int nByteWInfo;            /* Num. bytes allocated for WhereInfo struct */\n  int nTabList;              /* Number of elements in pTabList */\n  WhereInfo *pWInfo;         /* Will become the return value of this function */\n  Vdbe *v = pParse->pVdbe;   /* The virtual database engine */\n  Bitmask notReady;          /* Cursors that are not yet positioned */\n  WhereLoopBuilder sWLB;     /* The WhereLoop builder */\n  WhereMaskSet *pMaskSet;    /* The expression mask set */\n  WhereLevel *pLevel;        /* A single level in pWInfo->a[] */\n  WhereLoop *pLoop;          /* Pointer to a single WhereLoop object */\n  int ii;                    /* Loop counter */\n  sqlite3 *db;               /* Database connection */\n  int rc;                    /* Return code */\n  u8 bFordelete = 0;         /* OPFLAG_FORDELETE or zero, as appropriate */\n\n  assert( (wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || (\n        (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0\n     && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0\n  ));\n\n  /* Only one of WHERE_OR_SUBCLAUSE or WHERE_USE_LIMIT */\n  assert( (wctrlFlags & WHERE_OR_SUBCLAUSE)==0\n            || (wctrlFlags & WHERE_USE_LIMIT)==0 );\n\n  /* Variable initialization */\n  db = pParse->db;\n  memset(&sWLB, 0, sizeof(sWLB));\n\n  /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */\n  testcase( pOrderBy && pOrderBy->nExpr==BMS-1 );\n  if( pOrderBy && pOrderBy->nExpr>=BMS ){\n    pOrderBy = 0;\n    wctrlFlags &= ~WHERE_WANT_DISTINCT;\n    wctrlFlags |= WHERE_KEEP_ALL_JOINS; /* Disable omit-noop-join opt */\n  }\n\n  /* The number of tables in the FROM clause is limited by the number of\n  ** bits in a Bitmask\n  */\n  testcase( pTabList->nSrc==BMS );\n  if( pTabList->nSrc>BMS ){\n    sqlite3ErrorMsg(pParse, \"at most %d tables in a join\", BMS);\n    return 0;\n  }\n\n  /* This function normally generates a nested loop for all tables in\n  ** pTabList.  But if the WHERE_OR_SUBCLAUSE flag is set, then we should\n  ** only generate code for the first table in pTabList and assume that\n  ** any cursors associated with subsequent tables are uninitialized.\n  */\n  nTabList = (wctrlFlags & WHERE_OR_SUBCLAUSE) ? 1 : pTabList->nSrc;\n\n  /* Allocate and initialize the WhereInfo structure that will become the\n  ** return value. A single allocation is used to store the WhereInfo\n  ** struct, the contents of WhereInfo.a[], the WhereClause structure\n  ** and the WhereMaskSet structure. Since WhereClause contains an 8-byte\n  ** field (type Bitmask) it must be aligned on an 8-byte boundary on\n  ** some architectures. Hence the ROUND8() below.\n  */\n  nByteWInfo = SZ_WHEREINFO(nTabList);\n  pWInfo = sqlite3DbMallocRawNN(db, nByteWInfo + sizeof(WhereLoop));\n  if( db->mallocFailed ){\n    sqlite3DbFree(db, pWInfo);\n    pWInfo = 0;\n    goto whereBeginError;\n  }\n  pWInfo->pParse = pParse;\n  pWInfo->pTabList = pTabList;\n  pWInfo->pOrderBy = pOrderBy;\n#if WHERETRACE_ENABLED\n  pWInfo->pWhere = pWhere;\n#endif\n  pWInfo->pResultSet = pResultSet;\n  pWInfo->aiCurOnePass[0] = pWInfo->aiCurOnePass[1] = -1;\n  pWInfo->nLevel = nTabList;\n  pWInfo->iBreak = pWInfo->iContinue = sqlite3VdbeMakeLabel(pParse);\n  pWInfo->wctrlFlags = wctrlFlags;\n  pWInfo->iLimit = iAuxArg;\n  pWInfo->savedNQueryLoop = pParse->nQueryLoop;\n  pWInfo->pSelect = pSelect;\n  memset(&pWInfo->nOBSat, 0,\n         offsetof(WhereInfo,sWC) - offsetof(WhereInfo,nOBSat));\n  memset(&pWInfo->a[0], 0, sizeof(WhereLoop)+nTabList*sizeof(WhereLevel));\n  assert( pWInfo->eOnePass==ONEPASS_OFF );  /* ONEPASS defaults to OFF */\n  pMaskSet = &pWInfo->sMaskSet;\n  pMaskSet->n = 0;\n  pMaskSet->ix[0] = -99; /* Initialize ix[0] to a value that can never be\n                         ** a valid cursor number, to avoid an initial\n                         ** test for pMaskSet->n==0 in sqlite3WhereGetMask() */\n  sWLB.pWInfo = pWInfo;\n  sWLB.pWC = &pWInfo->sWC;\n  sWLB.pNew = (WhereLoop*)(((char*)pWInfo)+nByteWInfo);\n  assert( EIGHT_BYTE_ALIGNMENT(sWLB.pNew) );\n  whereLoopInit(sWLB.pNew);\n#ifdef SQLITE_DEBUG\n  sWLB.pNew->cId = '*';\n#endif\n\n  /* Split the WHERE clause into separate subexpressions where each\n  ** subexpression is separated by an AND operator.\n  */\n  sqlite3WhereClauseInit(&pWInfo->sWC, pWInfo);\n  sqlite3WhereSplit(&pWInfo->sWC, pWhere, TK_AND);\n\n  /* Special case: No FROM clause\n  */\n  if( nTabList==0 ){\n    if( pOrderBy ) pWInfo->nOBSat = pOrderBy->nExpr;\n    if( (wctrlFlags & WHERE_WANT_DISTINCT)!=0\n     && OptimizationEnabled(db, SQLITE_DistinctOpt)\n    ){\n      pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;\n    }\n    if( ALWAYS(pWInfo->pSelect)\n     && (pWInfo->pSelect->selFlags & SF_MultiValue)==0\n    ){\n      ExplainQueryPlan((pParse, 0, \"SCAN CONSTANT ROW\"));\n    }\n  }else{\n    /* Assign a bit from the bitmask to every term in the FROM clause.\n    **\n    ** The N-th term of the FROM clause is assigned a bitmask of 1<<N.\n    **\n    ** The rule of the previous sentence ensures that if X is the bitmask for\n    ** a table T, then X-1 is the bitmask for all other tables to the left of T.\n    ** Knowing the bitmask for all tables to the left of a left join is\n    ** important.  Ticket #3015.\n    **\n    ** Note that bitmasks are created for all pTabList->nSrc tables in\n    ** pTabList, not just the first nTabList tables.  nTabList is normally\n    ** equal to pTabList->nSrc but might be shortened to 1 if the\n    ** WHERE_OR_SUBCLAUSE flag is set.\n    */\n    ii = 0;\n    do{\n      createMask(pMaskSet, pTabList->a[ii].iCursor);\n      sqlite3WhereTabFuncArgs(pParse, &pTabList->a[ii], &pWInfo->sWC);\n    }while( (++ii)<pTabList->nSrc );\n  #ifdef SQLITE_DEBUG\n    {\n      Bitmask mx = 0;\n      for(ii=0; ii<pTabList->nSrc; ii++){\n        Bitmask m = sqlite3WhereGetMask(pMaskSet, pTabList->a[ii].iCursor);\n        assert( m>=mx );\n        mx = m;\n      }\n    }\n  #endif\n  }\n\n  /* Analyze all of the subexpressions. */\n  sqlite3WhereExprAnalyze(pTabList, &pWInfo->sWC);\n  if( pSelect && pSelect->pLimit ){\n    sqlite3WhereAddLimit(&pWInfo->sWC, pSelect);\n  }\n  if( pParse->nErr ) goto whereBeginError;\n\n  /* The False-WHERE-Term-Bypass optimization:\n  **\n  ** If there are WHERE terms that are false, then no rows will be output,\n  ** so skip over all of the code generated here.\n  **\n  ** Conditions:\n  **\n  **   (1)  The WHERE term must not refer to any tables in the join.\n  **   (2)  The term must not come from an ON clause on the\n  **        right-hand side of a LEFT or FULL JOIN.\n  **   (3)  The term must not come from an ON clause, or there must be\n  **        no RIGHT or FULL OUTER joins in pTabList.\n  **   (4)  If the expression contains non-deterministic functions\n  **        that are not within a sub-select. This is not required\n  **        for correctness but rather to preserves SQLite's legacy\n  **        behaviour in the following two cases:\n  **\n  **          WHERE random()>0;           -- eval random() once per row\n  **          WHERE (SELECT random())>0;  -- eval random() just once overall\n  **\n  ** Note that the Where term need not be a constant in order for this\n  ** optimization to apply, though it does need to be constant relative to\n  ** the current subquery (condition 1).  The term might include variables\n  ** from outer queries so that the value of the term changes from one\n  ** invocation of the current subquery to the next.\n  */\n  for(ii=0; ii<sWLB.pWC->nBase; ii++){\n    WhereTerm *pT = &sWLB.pWC->a[ii];  /* A term of the WHERE clause */\n    Expr *pX;                          /* The expression of pT */\n    if( pT->wtFlags & TERM_VIRTUAL ) continue;\n    pX = pT->pExpr;\n    assert( pX!=0 );\n    assert( pT->prereqAll!=0 || !ExprHasProperty(pX, EP_OuterON) );\n    if( pT->prereqAll==0                           /* Conditions (1) and (2) */\n     && (nTabList==0 || exprIsDeterministic(pX))   /* Condition (4) */\n     && !(ExprHasProperty(pX, EP_InnerON)          /* Condition (3) */\n          && (pTabList->a[0].fg.jointype & JT_LTORJ)!=0 )\n    ){\n      sqlite3ExprIfFalse(pParse, pX, pWInfo->iBreak, SQLITE_JUMPIFNULL);\n      pT->wtFlags |= TERM_CODED;\n    }\n  }\n\n  if( wctrlFlags & WHERE_WANT_DISTINCT ){\n    if( OptimizationDisabled(db, SQLITE_DistinctOpt) ){\n      /* Disable the DISTINCT optimization if SQLITE_DistinctOpt is set via\n      ** sqlite3_test_ctrl(SQLITE_TESTCTRL_OPTIMIZATIONS,...) */\n      wctrlFlags &= ~WHERE_WANT_DISTINCT;\n      pWInfo->wctrlFlags &= ~WHERE_WANT_DISTINCT;\n    }else if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pResultSet) ){\n      /* The DISTINCT marking is pointless.  Ignore it. */\n      pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;\n    }else if( pOrderBy==0 ){\n      /* Try to ORDER BY the result set to make distinct processing easier */\n      pWInfo->wctrlFlags |= WHERE_DISTINCTBY;\n      pWInfo->pOrderBy = pResultSet;\n    }\n  }\n\n  /* Construct the WhereLoop objects */\n#if defined(WHERETRACE_ENABLED)\n  if( sqlite3WhereTrace & 0xffffffff ){\n    sqlite3DebugPrintf(\"*** Optimizer Start *** (wctrlFlags: 0x%x\",wctrlFlags);\n    if( wctrlFlags & WHERE_USE_LIMIT ){\n      sqlite3DebugPrintf(\", limit: %d\", iAuxArg);\n    }\n    sqlite3DebugPrintf(\")\\n\");\n    if( sqlite3WhereTrace & 0x8000 ){\n      Select sSelect;\n      memset(&sSelect, 0, sizeof(sSelect));\n      sSelect.selFlags = SF_WhereBegin;\n      sSelect.pSrc = pTabList;\n      sSelect.pWhere = pWhere;\n      sSelect.pOrderBy = pOrderBy;\n      sSelect.pEList = pResultSet;\n      sqlite3TreeViewSelect(0, &sSelect, 0);\n    }\n    if( sqlite3WhereTrace & 0x4000 ){ /* Display all WHERE clause terms */\n      sqlite3DebugPrintf(\"---- WHERE clause at start of analysis:\\n\");\n      sqlite3WhereClausePrint(sWLB.pWC);\n    }\n  }\n#endif\n\n  if( nTabList!=1 || whereShortCut(&sWLB)==0 ){\n    rc = whereLoopAddAll(&sWLB);\n    if( rc ) goto whereBeginError;\n\n#ifdef SQLITE_ENABLE_STAT4\n    /* If one or more WhereTerm.truthProb values were used in estimating\n    ** loop parameters, but then those truthProb values were subsequently\n    ** changed based on STAT4 information while computing subsequent loops,\n    ** then we need to rerun the whole loop building process so that all\n    ** loops will be built using the revised truthProb values. */\n    if( sWLB.bldFlags2 & SQLITE_BLDF2_2NDPASS ){\n      WHERETRACE_ALL_LOOPS(pWInfo, sWLB.pWC);\n      WHERETRACE(0xffffffff,\n           (\"**** Redo all loop computations due to\"\n            \" TERM_HIGHTRUTH changes ****\\n\"));\n      while( pWInfo->pLoops ){\n        WhereLoop *p = pWInfo->pLoops;\n        pWInfo->pLoops = p->pNextLoop;\n        whereLoopDelete(db, p);\n      }\n      rc = whereLoopAddAll(&sWLB);\n      if( rc ) goto whereBeginError;\n    }\n#endif\n    WHERETRACE_ALL_LOOPS(pWInfo, sWLB.pWC);\n\n    wherePathSolver(pWInfo, 0);\n    if( db->mallocFailed ) goto whereBeginError;\n    if( pWInfo->pOrderBy ){\n       whereInterstageHeuristic(pWInfo);\n       wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1);\n       if( db->mallocFailed ) goto whereBeginError;\n    }\n\n    /* TUNING:  Assume that a DISTINCT clause on a subquery reduces\n    ** the output size by a factor of 8 (LogEst -30).  Search for\n    ** tag-20250414a to see other cases.\n    */\n    if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0 ){\n      WHERETRACE(0x0080,(\"nRowOut reduced from %d to %d due to DISTINCT\\n\",\n                         pWInfo->nRowOut, pWInfo->nRowOut-30));\n      pWInfo->nRowOut -= 30;\n    }\n\n  }\n  assert( pWInfo->pTabList!=0 );\n  if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){\n    whereReverseScanOrder(pWInfo);\n  }\n  if( pParse->nErr ){\n    goto whereBeginError;\n  }\n  assert( db->mallocFailed==0 );\n#ifdef WHERETRACE_ENABLED\n  if( sqlite3WhereTrace ){\n    sqlite3DebugPrintf(\"---- Solution cost=%d, nRow=%d\",\n                       pWInfo->rTotalCost, pWInfo->nRowOut);\n    if( pWInfo->nOBSat>0 ){\n      sqlite3DebugPrintf(\" ORDERBY=%d,0x%llx\", pWInfo->nOBSat, pWInfo->revMask);\n    }\n    switch( pWInfo->eDistinct ){\n      case WHERE_DISTINCT_UNIQUE: {\n        sqlite3DebugPrintf(\"  DISTINCT=unique\");\n        break;\n      }\n      case WHERE_DISTINCT_ORDERED: {\n        sqlite3DebugPrintf(\"  DISTINCT=ordered\");\n        break;\n      }\n      case WHERE_DISTINCT_UNORDERED: {\n        sqlite3DebugPrintf(\"  DISTINCT=unordered\");\n        break;\n      }\n    }\n    sqlite3DebugPrintf(\"\\n\");\n    for(ii=0; ii<pWInfo->nLevel; ii++){\n      sqlite3WhereLoopPrint(pWInfo->a[ii].pWLoop, sWLB.pWC);\n    }\n  }\n#endif\n\n  /* Attempt to omit tables from a join that do not affect the result.\n  ** See the comment on whereOmitNoopJoin() for further information.\n  **\n  ** This query optimization is factored out into a separate \"no-inline\"\n  ** procedure to keep the sqlite3WhereBegin() procedure from becoming\n  ** too large.  If sqlite3WhereBegin() becomes too large, that prevents\n  ** some C-compiler optimizers from in-lining the\n  ** sqlite3WhereCodeOneLoopStart() procedure, and it is important to\n  ** in-line sqlite3WhereCodeOneLoopStart() for performance reasons.\n  */\n  notReady = ~(Bitmask)0;\n  if( pWInfo->nLevel>=2       /* Must be a join, or this opt8n is pointless */\n   && pResultSet!=0           /* Condition (1) */\n   && 0==(wctrlFlags & (WHERE_AGG_DISTINCT|WHERE_KEEP_ALL_JOINS)) /* (1),(6) */\n   && OptimizationEnabled(db, SQLITE_OmitNoopJoin)                /* (7) */\n  ){\n    notReady = whereOmitNoopJoin(pWInfo, notReady);\n    nTabList = pWInfo->nLevel;\n    assert( nTabList>0 );\n  }\n\n  /* Check to see if there are any SEARCH loops that might benefit from\n  ** using a Bloom filter.\n  */\n  if( pWInfo->nLevel>=2\n   && OptimizationEnabled(db, SQLITE_BloomFilter)\n  ){\n    whereCheckIfBloomFilterIsUseful(pWInfo);\n  }\n\n#if defined(WHERETRACE_ENABLED)\n  if( sqlite3WhereTrace & 0x4000 ){ /* Display all terms of the WHERE clause */\n    sqlite3DebugPrintf(\"---- WHERE clause at end of analysis:\\n\");\n    sqlite3WhereClausePrint(sWLB.pWC);\n  }\n  WHERETRACE(0xffffffff,(\"*** Optimizer Finished ***\\n\"));\n#endif\n  pWInfo->pParse->nQueryLoop += pWInfo->nRowOut;\n\n  /* If the caller is an UPDATE or DELETE statement that is requesting\n  ** to use a one-pass algorithm, determine if this is appropriate.\n  **\n  ** A one-pass approach can be used if the caller has requested one\n  ** and either (a) the scan visits at most one row or (b) each\n  ** of the following are true:\n  **\n  **   * the caller has indicated that a one-pass approach can be used\n  **     with multiple rows (by setting WHERE_ONEPASS_MULTIROW), and\n  **   * the table is not a virtual table, and\n  **   * either the scan does not use the OR optimization or the caller\n  **     is a DELETE operation (WHERE_DUPLICATES_OK is only specified\n  **     for DELETE).\n  **\n  ** The last qualification is because an UPDATE statement uses\n  ** WhereInfo.aiCurOnePass[1] to determine whether or not it really can\n  ** use a one-pass approach, and this is not set accurately for scans\n  ** that use the OR optimization.\n  */\n  assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );\n  if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){\n    int wsFlags = pWInfo->a[0].pWLoop->wsFlags;\n    int bOnerow = (wsFlags & WHERE_ONEROW)!=0;\n    assert( !(wsFlags&WHERE_VIRTUALTABLE) || IsVirtual(pTabList->a[0].pSTab) );\n    if( bOnerow || (\n        0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW)\n     && !IsVirtual(pTabList->a[0].pSTab)\n     && (0==(wsFlags & WHERE_MULTI_OR) || (wctrlFlags & WHERE_DUPLICATES_OK))\n     && OptimizationEnabled(db, SQLITE_OnePass)\n    )){\n      pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI;\n      if( HasRowid(pTabList->a[0].pSTab) && (wsFlags & WHERE_IDX_ONLY) ){\n        if( wctrlFlags & WHERE_ONEPASS_MULTIROW ){\n          bFordelete = OPFLAG_FORDELETE;\n        }\n        pWInfo->a[0].pWLoop->wsFlags = (wsFlags & ~WHERE_IDX_ONLY);\n      }\n    }\n  }\n\n  /* Open all tables in the pTabList and any indices selected for\n  ** searching those tables.\n  */\n  for(ii=0, pLevel=pWInfo->a; ii<nTabList; ii++, pLevel++){\n    Table *pTab;     /* Table to open */\n    int iDb;         /* Index of database containing table/index */\n    SrcItem *pTabItem;\n\n    pTabItem = &pTabList->a[pLevel->iFrom];\n    pTab = pTabItem->pSTab;\n    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n    pLoop = pLevel->pWLoop;\n    pLevel->addrBrk = sqlite3VdbeMakeLabel(pParse);\n    if( ii==0 || (pTabItem[0].fg.jointype & JT_LEFT)!=0 ){\n      pLevel->addrHalt = pLevel->addrBrk;\n    }else if( pWInfo->a[ii-1].pRJ ){\n      pLevel->addrHalt = pWInfo->a[ii-1].addrBrk;\n    }else{\n      pLevel->addrHalt = pWInfo->a[ii-1].addrHalt;\n    }\n    if( (pTab->tabFlags & TF_Ephemeral)!=0 || IsView(pTab) ){\n      /* Do nothing */\n    }else\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n    if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){\n      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);\n      int iCur = pTabItem->iCursor;\n      sqlite3VdbeAddOp4(v, OP_VOpen, iCur, 0, 0, pVTab, P4_VTAB);\n    }else if( IsVirtual(pTab) ){\n      /* noop */\n    }else\n#endif\n    if( ((pLoop->wsFlags & WHERE_IDX_ONLY)==0\n         && (wctrlFlags & WHERE_OR_SUBCLAUSE)==0)\n     || (pTabItem->fg.jointype & (JT_LTORJ|JT_RIGHT))!=0\n    ){\n      int op = OP_OpenRead;\n      if( pWInfo->eOnePass!=ONEPASS_OFF ){\n        op = OP_OpenWrite;\n        pWInfo->aiCurOnePass[0] = pTabItem->iCursor;\n      };\n      sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, op);\n      assert( pTabItem->iCursor==pLevel->iTabCur );\n      testcase( pWInfo->eOnePass==ONEPASS_OFF && pTab->nCol==BMS-1 );\n      testcase( pWInfo->eOnePass==ONEPASS_OFF && pTab->nCol==BMS );\n      if( pWInfo->eOnePass==ONEPASS_OFF\n       && pTab->nCol<BMS\n       && (pTab->tabFlags & (TF_HasGenerated|TF_WithoutRowid))==0\n       && (pLoop->wsFlags & (WHERE_AUTO_INDEX|WHERE_BLOOMFILTER))==0\n      ){\n        /* If we know that only a prefix of the record will be used,\n        ** it is advantageous to reduce the \"column count\" field in\n        ** the P4 operand of the OP_OpenRead/Write opcode. */\n        Bitmask b = pTabItem->colUsed;\n        int n = 0;\n        for(; b; b=b>>1, n++){}\n        sqlite3VdbeChangeP4(v, -1, SQLITE_INT_TO_PTR(n), P4_INT32);\n        assert( n<=pTab->nCol );\n      }\n#ifdef SQLITE_ENABLE_CURSOR_HINTS\n      if( pLoop->u.btree.pIndex!=0 && (pTab->tabFlags & TF_WithoutRowid)==0 ){\n        sqlite3VdbeChangeP5(v, OPFLAG_SEEKEQ|bFordelete);\n      }else\n#endif\n      {\n        sqlite3VdbeChangeP5(v, bFordelete);\n      }\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n      sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed, pTabItem->iCursor, 0, 0,\n                            (const u8*)&pTabItem->colUsed, P4_INT64);\n#endif\n      if( ii>=2\n       && (pTabItem[0].fg.jointype & (JT_LTORJ|JT_LEFT))==0\n       && pLevel->addrHalt==pWInfo->a[0].addrHalt\n      ){\n        sqlite3VdbeAddOp2(v, OP_IfEmpty, pTabItem->iCursor, pWInfo->iBreak);\n        VdbeCoverage(v);\n      }\n    }else{\n      sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);\n    }\n    if( pLoop->wsFlags & WHERE_INDEXED ){\n      Index *pIx = pLoop->u.btree.pIndex;\n      int iIndexCur;\n      int op = OP_OpenRead;\n      /* iAuxArg is always set to a positive value if ONEPASS is possible */\n      assert( iAuxArg!=0 || (pWInfo->wctrlFlags & WHERE_ONEPASS_DESIRED)==0 );\n      if( !HasRowid(pTab) && IsPrimaryKeyIndex(pIx)\n       && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0\n      ){\n        /* This is one term of an OR-optimization using the PRIMARY KEY of a\n        ** WITHOUT ROWID table.  No need for a separate index */\n        iIndexCur = pLevel->iTabCur;\n        op = 0;\n      }else if( pWInfo->eOnePass!=ONEPASS_OFF ){\n        Index *pJ = pTabItem->pSTab->pIndex;\n        iIndexCur = iAuxArg;\n        assert( wctrlFlags & WHERE_ONEPASS_DESIRED );\n        while( ALWAYS(pJ) && pJ!=pIx ){\n          iIndexCur++;\n          pJ = pJ->pNext;\n        }\n        op = OP_OpenWrite;\n        pWInfo->aiCurOnePass[1] = iIndexCur;\n      }else if( iAuxArg && (wctrlFlags & WHERE_OR_SUBCLAUSE)!=0 ){\n        iIndexCur = iAuxArg;\n        op = OP_ReopenIdx;\n      }else{\n        iIndexCur = pParse->nTab++;\n        if( pIx->bHasExpr && OptimizationEnabled(db, SQLITE_IndexedExpr) ){\n          whereAddIndexedExpr(pParse, pIx, iIndexCur, pTabItem);\n        }\n        if( pIx->pPartIdxWhere && (pTabItem->fg.jointype & JT_RIGHT)==0 ){\n          wherePartIdxExpr(\n              pParse, pIx, pIx->pPartIdxWhere, 0, iIndexCur, pTabItem\n          );\n        }\n      }\n      pLevel->iIdxCur = iIndexCur;\n      assert( pIx!=0 );\n      assert( pIx->pSchema==pTab->pSchema );\n      assert( iIndexCur>=0 );\n      if( op ){\n        sqlite3VdbeAddOp3(v, op, iIndexCur, pIx->tnum, iDb);\n        sqlite3VdbeSetP4KeyInfo(pParse, pIx);\n        if( (pLoop->wsFlags & WHERE_CONSTRAINT)!=0\n         && (pLoop->wsFlags & (WHERE_COLUMN_RANGE|WHERE_SKIPSCAN))==0\n         && (pLoop->wsFlags & WHERE_BIGNULL_SORT)==0\n         && (pLoop->wsFlags & WHERE_IN_SEEKSCAN)==0\n         && (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0\n         && pWInfo->eDistinct!=WHERE_DISTINCT_ORDERED\n        ){\n          sqlite3VdbeChangeP5(v, OPFLAG_SEEKEQ);\n        }\n        VdbeComment((v, \"%s\", pIx->zName));\n#ifdef SQLITE_ENABLE_COLUMN_USED_MASK\n        {\n          u64 colUsed = 0;\n          int ii, jj;\n          for(ii=0; ii<pIx->nColumn; ii++){\n            jj = pIx->aiColumn[ii];\n            if( jj<0 ) continue;\n            if( jj>63 ) jj = 63;\n            if( (pTabItem->colUsed & MASKBIT(jj))==0 ) continue;\n            colUsed |= ((u64)1)<<(ii<63 ? ii : 63);\n          }\n          sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed, iIndexCur, 0, 0,\n                                (u8*)&colUsed, P4_INT64);\n        }\n#endif /* SQLITE_ENABLE_COLUMN_USED_MASK */\n      }\n    }\n    if( iDb>=0 ) sqlite3CodeVerifySchema(pParse, iDb);\n    if( (pTabItem->fg.jointype & JT_RIGHT)!=0\n     && (pLevel->pRJ = sqlite3WhereMalloc(pWInfo, sizeof(WhereRightJoin)))!=0\n    ){\n      WhereRightJoin *pRJ = pLevel->pRJ;\n      pRJ->iMatch = pParse->nTab++;\n      pRJ->regBloom = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Blob, 65536, pRJ->regBloom);\n      pRJ->regReturn = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Null, 0, pRJ->regReturn);\n      assert( pTab==pTabItem->pSTab );\n      if( HasRowid(pTab) ){\n        KeyInfo *pInfo;\n        sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRJ->iMatch, 1);\n        pInfo = sqlite3KeyInfoAlloc(pParse->db, 1, 0);\n        if( pInfo ){\n          pInfo->aColl[0] = 0;\n          pInfo->aSortFlags[0] = 0;\n          sqlite3VdbeAppendP4(v, pInfo, P4_KEYINFO);\n        }\n      }else{\n        Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n        sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRJ->iMatch, pPk->nKeyCol);\n        sqlite3VdbeSetP4KeyInfo(pParse, pPk);\n      }\n      pLoop->wsFlags &= ~WHERE_IDX_ONLY;\n      /* The nature of RIGHT JOIN processing is such that it messes up\n      ** the output order.  So omit any ORDER BY/GROUP BY elimination\n      ** optimizations.  We need to do an actual sort for RIGHT JOIN. */\n      pWInfo->nOBSat = 0;\n      pWInfo->eDistinct = WHERE_DISTINCT_UNORDERED;\n    }\n  }\n  pWInfo->iTop = sqlite3VdbeCurrentAddr(v);\n  if( db->mallocFailed ) goto whereBeginError;\n\n  /* Generate the code to do the search.  Each iteration of the for\n  ** loop below generates code for a single nested loop of the VM\n  ** program.\n  */\n  for(ii=0; ii<nTabList; ii++){\n    int addrExplain;\n    int wsFlags;\n    SrcItem *pSrc;\n    if( pParse->nErr ) goto whereBeginError;\n    pLevel = &pWInfo->a[ii];\n    wsFlags = pLevel->pWLoop->wsFlags;\n    pSrc = &pTabList->a[pLevel->iFrom];\n    if( pSrc->fg.isMaterialized ){\n      Subquery *pSubq;\n      int iOnce = 0;\n      assert( pSrc->fg.isSubquery );\n      pSubq = pSrc->u4.pSubq;\n      if( pSrc->fg.isCorrelated==0 ){\n        iOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);\n      }else{\n        iOnce = 0;\n      }\n      sqlite3VdbeAddOp2(v, OP_Gosub, pSubq->regReturn, pSubq->addrFillSub);\n      VdbeComment((v, \"materialize %!S\", pSrc));\n      if( iOnce )  sqlite3VdbeJumpHere(v, iOnce);\n    }\n    assert( pTabList == pWInfo->pTabList );\n    if( (wsFlags & (WHERE_AUTO_INDEX|WHERE_BLOOMFILTER))!=0 ){\n      if( (wsFlags & WHERE_AUTO_INDEX)!=0 ){\n#ifndef SQLITE_OMIT_AUTOMATIC_INDEX\n        constructAutomaticIndex(pParse, &pWInfo->sWC, notReady, pLevel);\n#endif\n      }else{\n        sqlite3ConstructBloomFilter(pWInfo, ii, pLevel, notReady);\n      }\n      if( db->mallocFailed ) goto whereBeginError;\n    }\n    addrExplain = sqlite3WhereExplainOneScan(\n        pParse, pTabList, pLevel, wctrlFlags\n    );\n    pLevel->addrBody = sqlite3VdbeCurrentAddr(v);\n    notReady = sqlite3WhereCodeOneLoopStart(pParse,v,pWInfo,ii,pLevel,notReady);\n    pWInfo->iContinue = pLevel->addrCont;\n    if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_OR_SUBCLAUSE)==0 ){\n      sqlite3WhereAddScanStatus(v, pTabList, pLevel, addrExplain);\n    }\n  }\n\n  /* Done. */\n  VdbeModuleComment((v, \"Begin WHERE-core\"));\n  pWInfo->iEndWhere = sqlite3VdbeCurrentAddr(v);\n  return pWInfo;\n\n  /* Jump here if malloc fails */\nwhereBeginError:\n  if( pWInfo ){\n    pParse->nQueryLoop = pWInfo->savedNQueryLoop;\n    whereInfoFree(db, pWInfo);\n  }\n#ifdef WHERETRACE_ENABLED\n  /* Prevent harmless compiler warnings about debugging routines\n  ** being declared but never used */\n  sqlite3ShowWhereLoopList(0);\n#endif /* WHERETRACE_ENABLED */\n  return 0;\n}\n\n/*\n** Part of sqlite3WhereEnd() will rewrite opcodes to reference the\n** index rather than the main table.  In SQLITE_DEBUG mode, we want\n** to trace those changes if PRAGMA vdbe_addoptrace=on.  This routine\n** does that.\n*/\n#ifndef SQLITE_DEBUG\n# define OpcodeRewriteTrace(D,K,P) /* no-op */\n#else\n# define OpcodeRewriteTrace(D,K,P) sqlite3WhereOpcodeRewriteTrace(D,K,P)\n  static void sqlite3WhereOpcodeRewriteTrace(\n    sqlite3 *db,\n    int pc,\n    VdbeOp *pOp\n  ){\n    if( (db->flags & SQLITE_VdbeAddopTrace)==0 ) return;\n    sqlite3VdbePrintOp(0, pc, pOp);\n    sqlite3ShowWhereTerm(0); /* So compiler won't complain about unused func */\n  }\n#endif\n\n/*\n** Generate the end of the WHERE loop.  See comments on\n** sqlite3WhereBegin() for additional information.\n*/\nSQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){\n  Parse *pParse = pWInfo->pParse;\n  Vdbe *v = pParse->pVdbe;\n  int i;\n  WhereLevel *pLevel;\n  WhereLoop *pLoop;\n  SrcList *pTabList = pWInfo->pTabList;\n  sqlite3 *db = pParse->db;\n  int iEnd = sqlite3VdbeCurrentAddr(v);\n  int nRJ = 0;\n#ifndef SQLITE_DISABLE_SKIPAHEAD_DISTINCT\n  int addrSeek = 0;\n#endif\n\n  /* Generate loop termination code.\n  */\n  VdbeModuleComment((v, \"End WHERE-core\"));\n  for(i=pWInfo->nLevel-1; i>=0; i--){\n    int addr;\n    pLevel = &pWInfo->a[i];\n    if( pLevel->pRJ ){\n      /* Terminate the subroutine that forms the interior of the loop of\n      ** the RIGHT JOIN table */\n      WhereRightJoin *pRJ = pLevel->pRJ;\n      sqlite3VdbeResolveLabel(v, pLevel->addrCont);\n      /* Replace addrCont with a new label that will never be used, just so\n      ** the subsequent call to resolve pLevel->addrCont will have something\n      ** to resolve. */\n      pLevel->addrCont = sqlite3VdbeMakeLabel(pParse);\n      pRJ->endSubrtn = sqlite3VdbeCurrentAddr(v);\n      sqlite3VdbeAddOp3(v, OP_Return, pRJ->regReturn, pRJ->addrSubrtn, 1);\n      VdbeCoverage(v);\n      nRJ++;\n    }\n    pLoop = pLevel->pWLoop;\n    if( pLevel->op!=OP_Noop ){\n#ifndef SQLITE_DISABLE_SKIPAHEAD_DISTINCT\n      Index *pIdx;\n      int n;\n      if( pWInfo->eDistinct==WHERE_DISTINCT_ORDERED\n       && i==pWInfo->nLevel-1  /* Ticket [ef9318757b152e3] 2017-10-21 */\n       && (pLoop->wsFlags & WHERE_INDEXED)!=0\n       && (pIdx = pLoop->u.btree.pIndex)->hasStat1\n       && (n = pLoop->u.btree.nDistinctCol)>0\n       && pIdx->aiRowLogEst[n]>=36\n      ){\n        int r1 = pParse->nMem+1;\n        int j, op;\n        for(j=0; j<n; j++){\n          sqlite3VdbeAddOp3(v, OP_Column, pLevel->iIdxCur, j, r1+j);\n        }\n        pParse->nMem += n+1;\n        op = pLevel->op==OP_Prev ? OP_SeekLT : OP_SeekGT;\n        addrSeek = sqlite3VdbeAddOp4Int(v, op, pLevel->iIdxCur, 0, r1, n);\n        VdbeCoverageIf(v, op==OP_SeekLT);\n        VdbeCoverageIf(v, op==OP_SeekGT);\n        sqlite3VdbeAddOp2(v, OP_Goto, 1, pLevel->p2);\n      }\n#endif /* SQLITE_DISABLE_SKIPAHEAD_DISTINCT */\n    }\n    if( pTabList->a[pLevel->iFrom].fg.fromExists && i==pWInfo->nLevel-1 ){\n      /* If the EXISTS-to-JOIN optimization was applied, then the EXISTS\n      ** loop(s) will be the inner-most loops of the join. There might be\n      ** multiple EXISTS loops, but they will all be nested, and the join\n      ** order will not have been changed by the query planner.  If the\n      ** inner-most EXISTS loop sees a single successful row, it should\n      ** break out of *all* EXISTS loops.  But only the inner-most of the\n      ** nested EXISTS loops should do this breakout. */\n      int nOuter = 0; /* Nr of outer EXISTS that this one is nested within */\n      while( nOuter<i ){\n        if( !pTabList->a[pLevel[-nOuter-1].iFrom].fg.fromExists ) break;\n        nOuter++;\n      }\n      testcase( nOuter>0 );\n      sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel[-nOuter].addrBrk);\n      VdbeComment((v, \"EXISTS break\"));\n    }\n    sqlite3VdbeResolveLabel(v, pLevel->addrCont);\n    if( pLevel->op!=OP_Noop ){\n      sqlite3VdbeAddOp3(v, pLevel->op, pLevel->p1, pLevel->p2, pLevel->p3);\n      sqlite3VdbeChangeP5(v, pLevel->p5);\n      VdbeCoverage(v);\n      VdbeCoverageIf(v, pLevel->op==OP_Next);\n      VdbeCoverageIf(v, pLevel->op==OP_Prev);\n      VdbeCoverageIf(v, pLevel->op==OP_VNext);\n      if( pLevel->regBignull ){\n        sqlite3VdbeResolveLabel(v, pLevel->addrBignull);\n        sqlite3VdbeAddOp2(v, OP_DecrJumpZero, pLevel->regBignull, pLevel->p2-1);\n        VdbeCoverage(v);\n      }\n#ifndef SQLITE_DISABLE_SKIPAHEAD_DISTINCT\n      if( addrSeek ){\n        sqlite3VdbeJumpHere(v, addrSeek);\n        addrSeek = 0;\n      }\n#endif\n    }\n    if( (pLoop->wsFlags & WHERE_IN_ABLE)!=0 && pLevel->u.in.nIn>0 ){\n      struct InLoop *pIn;\n      int j;\n      sqlite3VdbeResolveLabel(v, pLevel->addrNxt);\n      for(j=pLevel->u.in.nIn, pIn=&pLevel->u.in.aInLoop[j-1]; j>0; j--, pIn--){\n        assert( sqlite3VdbeGetOp(v, pIn->addrInTop+1)->opcode==OP_IsNull\n                 || pParse->db->mallocFailed );\n        sqlite3VdbeJumpHere(v, pIn->addrInTop+1);\n        if( pIn->eEndLoopOp!=OP_Noop ){\n          if( pIn->nPrefix ){\n            int bEarlyOut =\n                (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0\n                 && (pLoop->wsFlags & WHERE_IN_EARLYOUT)!=0;\n            if( pLevel->iLeftJoin ){\n              /* For LEFT JOIN queries, cursor pIn->iCur may not have been\n              ** opened yet. This occurs for WHERE clauses such as\n              ** \"a = ? AND b IN (...)\", where the index is on (a, b). If\n              ** the RHS of the (a=?) is NULL, then the \"b IN (...)\" may\n              ** never have been coded, but the body of the loop run to\n              ** return the null-row. So, if the cursor is not open yet,\n              ** jump over the OP_Next or OP_Prev instruction about to\n              ** be coded.  */\n              sqlite3VdbeAddOp2(v, OP_IfNotOpen, pIn->iCur,\n                  sqlite3VdbeCurrentAddr(v) + 2 + bEarlyOut);\n              VdbeCoverage(v);\n            }\n            if( bEarlyOut ){\n              sqlite3VdbeAddOp4Int(v, OP_IfNoHope, pLevel->iIdxCur,\n                  sqlite3VdbeCurrentAddr(v)+2,\n                  pIn->iBase, pIn->nPrefix);\n              VdbeCoverage(v);\n              /* Retarget the OP_IsNull against the left operand of IN so\n              ** it jumps past the OP_IfNoHope.  This is because the\n              ** OP_IsNull also bypasses the OP_Affinity opcode that is\n              ** required by OP_IfNoHope. */\n              sqlite3VdbeJumpHere(v, pIn->addrInTop+1);\n            }\n          }\n          sqlite3VdbeAddOp2(v, pIn->eEndLoopOp, pIn->iCur, pIn->addrInTop);\n          VdbeCoverage(v);\n          VdbeCoverageIf(v, pIn->eEndLoopOp==OP_Prev);\n          VdbeCoverageIf(v, pIn->eEndLoopOp==OP_Next);\n        }\n        sqlite3VdbeJumpHere(v, pIn->addrInTop-1);\n      }\n    }\n    sqlite3VdbeResolveLabel(v, pLevel->addrBrk);\n    if( pLevel->pRJ ){\n      sqlite3VdbeAddOp3(v, OP_Return, pLevel->pRJ->regReturn, 0, 1);\n      VdbeCoverage(v);\n    }\n    if( pLevel->addrSkip ){\n      sqlite3VdbeGoto(v, pLevel->addrSkip);\n      VdbeComment((v, \"next skip-scan on %s\", pLoop->u.btree.pIndex->zName));\n      sqlite3VdbeJumpHere(v, pLevel->addrSkip);\n      sqlite3VdbeJumpHere(v, pLevel->addrSkip-2);\n    }\n#ifndef SQLITE_LIKE_DOESNT_MATCH_BLOBS\n    if( pLevel->addrLikeRep ){\n      sqlite3VdbeAddOp2(v, OP_DecrJumpZero, (int)(pLevel->iLikeRepCntr>>1),\n                        pLevel->addrLikeRep);\n      VdbeCoverage(v);\n    }\n#endif\n    if( pLevel->iLeftJoin ){\n      int ws = pLoop->wsFlags;\n      addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);\n      assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );\n      if( (ws & WHERE_IDX_ONLY)==0 ){\n        SrcItem *pSrc = &pTabList->a[pLevel->iFrom];\n        assert( pLevel->iTabCur==pSrc->iCursor );\n        if( pSrc->fg.viaCoroutine ){\n          int m, n;\n          assert( pSrc->fg.isSubquery );\n          n = pSrc->u4.pSubq->regResult;\n          assert( pSrc->pSTab!=0 );\n          m = pSrc->pSTab->nCol;\n          sqlite3VdbeAddOp3(v, OP_Null, 0, n, n+m-1);\n        }\n        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iTabCur);\n      }\n      if( (ws & WHERE_INDEXED)\n       || ((ws & WHERE_MULTI_OR) && pLevel->u.pCoveringIdx)\n      ){\n        if( ws & WHERE_MULTI_OR ){\n          Index *pIx = pLevel->u.pCoveringIdx;\n          int iDb = sqlite3SchemaToIndex(db, pIx->pSchema);\n          sqlite3VdbeAddOp3(v, OP_ReopenIdx, pLevel->iIdxCur, pIx->tnum, iDb);\n          sqlite3VdbeSetP4KeyInfo(pParse, pIx);\n        }\n        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);\n      }\n      if( pLevel->op==OP_Return ){\n        sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);\n      }else{\n        sqlite3VdbeGoto(v, pLevel->addrFirst);\n      }\n      sqlite3VdbeJumpHere(v, addr);\n    }\n    VdbeModuleComment((v, \"End WHERE-loop%d: %s\", i,\n                     pWInfo->pTabList->a[pLevel->iFrom].pSTab->zName));\n  }\n\n  assert( pWInfo->nLevel<=pTabList->nSrc );\n  for(i=0, pLevel=pWInfo->a; i<pWInfo->nLevel; i++, pLevel++){\n    int k, last;\n    VdbeOp *pOp, *pLastOp;\n    Index *pIdx = 0;\n    SrcItem *pTabItem = &pTabList->a[pLevel->iFrom];\n    Table *pTab = pTabItem->pSTab;\n    assert( pTab!=0 );\n    pLoop = pLevel->pWLoop;\n\n    /* Do RIGHT JOIN processing.  Generate code that will output the\n    ** unmatched rows of the right operand of the RIGHT JOIN with\n    ** all of the columns of the left operand set to NULL.\n    */\n    if( pLevel->pRJ ){\n      sqlite3WhereRightJoinLoop(pWInfo, i, pLevel);\n      continue;\n    }\n\n    /* For a co-routine, change all OP_Column references to the table of\n    ** the co-routine into OP_Copy of result contained in a register.\n    ** OP_Rowid becomes OP_Null.\n    */\n    if( pTabItem->fg.viaCoroutine ){\n      testcase( pParse->db->mallocFailed );\n      assert( pTabItem->fg.isSubquery );\n      assert( pTabItem->u4.pSubq->regResult>=0 );\n      translateColumnToCopy(pParse, pLevel->addrBody, pLevel->iTabCur,\n                            pTabItem->u4.pSubq->regResult, 0);\n      continue;\n    }\n\n    /* If this scan uses an index, make VDBE code substitutions to read data\n    ** from the index instead of from the table where possible.  In some cases\n    ** this optimization prevents the table from ever being read, which can\n    ** yield a significant performance boost.\n    **\n    ** Calls to the code generator in between sqlite3WhereBegin and\n    ** sqlite3WhereEnd will have created code that references the table\n    ** directly.  This loop scans all that code looking for opcodes\n    ** that reference the table and converts them into opcodes that\n    ** reference the index.\n    */\n    if( pLoop->wsFlags & (WHERE_INDEXED|WHERE_IDX_ONLY) ){\n      pIdx = pLoop->u.btree.pIndex;\n    }else if( pLoop->wsFlags & WHERE_MULTI_OR ){\n      pIdx = pLevel->u.pCoveringIdx;\n    }\n    if( pIdx\n     && !db->mallocFailed\n    ){\n      if( pWInfo->eOnePass==ONEPASS_OFF || !HasRowid(pIdx->pTable) ){\n        last = iEnd;\n      }else{\n        last = pWInfo->iEndWhere;\n      }\n      if( pIdx->bHasExpr ){\n        IndexedExpr *p = pParse->pIdxEpr;\n        while( p ){\n          if( p->iIdxCur==pLevel->iIdxCur ){\n#ifdef WHERETRACE_ENABLED\n            if( sqlite3WhereTrace & 0x200 ){\n              sqlite3DebugPrintf(\"Disable pParse->pIdxEpr term {%d,%d}\\n\",\n                                  p->iIdxCur, p->iIdxCol);\n              if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(p->pExpr);\n            }\n#endif\n            p->iDataCur = -1;\n            p->iIdxCur = -1;\n          }\n          p = p->pIENext;\n        }\n      }\n      k = pLevel->addrBody + 1;\n#ifdef SQLITE_DEBUG\n      if( db->flags & SQLITE_VdbeAddopTrace ){\n        printf(\"TRANSLATE cursor %d->%d in opcode range %d..%d\\n\",\n                pLevel->iTabCur, pLevel->iIdxCur, k, last-1);\n      }\n      /* Proof that the \"+1\" on the k value above is safe */\n      pOp = sqlite3VdbeGetOp(v, k - 1);\n      assert( pOp->opcode!=OP_Column || pOp->p1!=pLevel->iTabCur );\n      assert( pOp->opcode!=OP_Rowid  || pOp->p1!=pLevel->iTabCur );\n      assert( pOp->opcode!=OP_IfNullRow || pOp->p1!=pLevel->iTabCur );\n#endif\n      pOp = sqlite3VdbeGetOp(v, k);\n      pLastOp = pOp + (last - k);\n      assert( pOp<=pLastOp );\n      do{\n        if( pOp->p1!=pLevel->iTabCur ){\n          /* no-op */\n        }else if( pOp->opcode==OP_Column\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n         || pOp->opcode==OP_Offset\n#endif\n        ){\n          int x = pOp->p2;\n          assert( pIdx->pTable==pTab );\n#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC\n          if( pOp->opcode==OP_Offset ){\n            /* Do not need to translate the column number */\n          }else\n#endif\n          if( !HasRowid(pTab) ){\n            Index *pPk = sqlite3PrimaryKeyIndex(pTab);\n            x = pPk->aiColumn[x];\n            assert( x>=0 );\n          }else{\n            testcase( x!=sqlite3StorageColumnToTable(pTab,x) );\n            x = sqlite3StorageColumnToTable(pTab,x);\n          }\n          x = sqlite3TableColumnToIndex(pIdx, x);\n          if( x>=0 ){\n            pOp->p2 = x;\n            pOp->p1 = pLevel->iIdxCur;\n            OpcodeRewriteTrace(db, k, pOp);\n          }else if( pLoop->wsFlags & (WHERE_IDX_ONLY|WHERE_EXPRIDX) ){\n            if( pLoop->wsFlags & WHERE_IDX_ONLY ){\n              /* An error. pLoop is supposed to be a covering index loop,\n              ** and yet the VM code refers to a column of the table that\n              ** is not part of the index.  */\n              sqlite3ErrorMsg(pParse, \"internal query planner error\");\n              pParse->rc = SQLITE_INTERNAL;\n            }else{\n              /* The WHERE_EXPRIDX flag is set by the planner when it is likely\n              ** that pLoop is a covering index loop, but it is not possible\n              ** to be 100% sure. In this case, any OP_Explain opcode\n              ** corresponding to this loop describes the index as a \"COVERING\n              ** INDEX\". But, pOp proves that pLoop is not actually a covering\n              ** index loop. So clear the WHERE_EXPRIDX flag and rewrite the\n              ** text that accompanies the OP_Explain opcode, if any.  */\n              pLoop->wsFlags &= ~WHERE_EXPRIDX;\n              sqlite3WhereAddExplainText(pParse,\n                  pLevel->addrBody-1,\n                  pTabList,\n                  pLevel,\n                  pWInfo->wctrlFlags\n              );\n            }\n          }\n        }else if( pOp->opcode==OP_Rowid ){\n          pOp->p1 = pLevel->iIdxCur;\n          pOp->opcode = OP_IdxRowid;\n          OpcodeRewriteTrace(db, k, pOp);\n        }else if( pOp->opcode==OP_IfNullRow ){\n          pOp->p1 = pLevel->iIdxCur;\n          OpcodeRewriteTrace(db, k, pOp);\n        }\n#ifdef SQLITE_DEBUG\n        k++;\n#endif\n      }while( (++pOp)<pLastOp );\n#ifdef SQLITE_DEBUG\n      if( db->flags & SQLITE_VdbeAddopTrace ) printf(\"TRANSLATE complete\\n\");\n#endif\n    }\n  }\n\n  /* The \"break\" point is here, just past the end of the outer loop.\n  ** Set it.\n  */\n  sqlite3VdbeResolveLabel(v, pWInfo->iBreak);\n\n  /* Final cleanup\n  */\n  pParse->nQueryLoop = pWInfo->savedNQueryLoop;\n  whereInfoFree(db, pWInfo);\n  pParse->withinRJSubrtn -= nRJ;\n  return;\n}\n\n/************** End of where.c ***********************************************/\n/************** Begin file window.c ******************************************/\n/*\n** 2018 May 08\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n\n/*\n** SELECT REWRITING\n**\n**   Any SELECT statement that contains one or more window functions in\n**   either the select list or ORDER BY clause (the only two places window\n**   functions may be used) is transformed by function sqlite3WindowRewrite()\n**   in order to support window function processing. For example, with the\n**   schema:\n**\n**     CREATE TABLE t1(a, b, c, d, e, f, g);\n**\n**   the statement:\n**\n**     SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM t1 ORDER BY e;\n**\n**   is transformed to:\n**\n**     SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM (\n**         SELECT a, e, c, d, b FROM t1 ORDER BY c, d\n**     ) ORDER BY e;\n**\n**   The flattening optimization is disabled when processing this transformed\n**   SELECT statement. This allows the implementation of the window function\n**   (in this case max()) to process rows sorted in order of (c, d), which\n**   makes things easier for obvious reasons. More generally:\n**\n**     * FROM, WHERE, GROUP BY and HAVING clauses are all moved to\n**       the sub-query.\n**\n**     * ORDER BY, LIMIT and OFFSET remain part of the parent query.\n**\n**     * Terminals from each of the expression trees that make up the\n**       select-list and ORDER BY expressions in the parent query are\n**       selected by the sub-query. For the purposes of the transformation,\n**       terminals are column references and aggregate functions.\n**\n**   If there is more than one window function in the SELECT that uses\n**   the same window declaration (the OVER bit), then a single scan may\n**   be used to process more than one window function. For example:\n**\n**     SELECT max(b) OVER (PARTITION BY c ORDER BY d),\n**            min(e) OVER (PARTITION BY c ORDER BY d)\n**     FROM t1;\n**\n**   is transformed in the same way as the example above. However:\n**\n**     SELECT max(b) OVER (PARTITION BY c ORDER BY d),\n**            min(e) OVER (PARTITION BY a ORDER BY b)\n**     FROM t1;\n**\n**   Must be transformed to:\n**\n**     SELECT max(b) OVER (PARTITION BY c ORDER BY d) FROM (\n**         SELECT e, min(e) OVER (PARTITION BY a ORDER BY b), c, d, b FROM\n**           SELECT a, e, c, d, b FROM t1 ORDER BY a, b\n**         ) ORDER BY c, d\n**     ) ORDER BY e;\n**\n**   so that both min() and max() may process rows in the order defined by\n**   their respective window declarations.\n**\n** INTERFACE WITH SELECT.C\n**\n**   When processing the rewritten SELECT statement, code in select.c calls\n**   sqlite3WhereBegin() to begin iterating through the results of the\n**   sub-query, which is always implemented as a co-routine. It then calls\n**   sqlite3WindowCodeStep() to process rows and finish the scan by calling\n**   sqlite3WhereEnd().\n**\n**   sqlite3WindowCodeStep() generates VM code so that, for each row returned\n**   by the sub-query a sub-routine (OP_Gosub) coded by select.c is invoked.\n**   When the sub-routine is invoked:\n**\n**     * The results of all window-functions for the row are stored\n**       in the associated Window.regResult registers.\n**\n**     * The required terminal values are stored in the current row of\n**       temp table Window.iEphCsr.\n**\n**   In some cases, depending on the window frame and the specific window\n**   functions invoked, sqlite3WindowCodeStep() caches each entire partition\n**   in a temp table before returning any rows. In other cases it does not.\n**   This detail is encapsulated within this file, the code generated by\n**   select.c is the same in either case.\n**\n** BUILT-IN WINDOW FUNCTIONS\n**\n**   This implementation features the following built-in window functions:\n**\n**     row_number()\n**     rank()\n**     dense_rank()\n**     percent_rank()\n**     cume_dist()\n**     ntile(N)\n**     lead(expr [, offset [, default]])\n**     lag(expr [, offset [, default]])\n**     first_value(expr)\n**     last_value(expr)\n**     nth_value(expr, N)\n**\n**   These are the same built-in window functions supported by Postgres.\n**   Although the behaviour of aggregate window functions (functions that\n**   can be used as either aggregates or window functions) allows them to\n**   be implemented using an API, built-in window functions are much more\n**   esoteric. Additionally, some window functions (e.g. nth_value())\n**   may only be implemented by caching the entire partition in memory.\n**   As such, some built-in window functions use the same API as aggregate\n**   window functions and some are implemented directly using VDBE\n**   instructions. Additionally, for those functions that use the API, the\n**   window frame is sometimes modified before the SELECT statement is\n**   rewritten. For example, regardless of the specified window frame, the\n**   row_number() function always uses:\n**\n**     ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n**\n**   See sqlite3WindowUpdate() for details.\n**\n**   As well as some of the built-in window functions, aggregate window\n**   functions min() and max() are implemented using VDBE instructions if\n**   the start of the window frame is declared as anything other than\n**   UNBOUNDED PRECEDING.\n*/\n\n/*\n** Implementation of built-in window function row_number(). Assumes that the\n** window frame has been coerced to:\n**\n**   ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n*/\nstatic void row_numberStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  i64 *p = (i64*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ) (*p)++;\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n}\nstatic void row_numberValueFunc(sqlite3_context *pCtx){\n  i64 *p = (i64*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  sqlite3_result_int64(pCtx, (p ? *p : 0));\n}\n\n/*\n** Context object type used by rank(), dense_rank(), percent_rank() and\n** cume_dist().\n*/\nstruct CallCount {\n  i64 nValue;\n  i64 nStep;\n  i64 nTotal;\n};\n\n/*\n** Implementation of built-in window function dense_rank(). Assumes that\n** the window frame has been set to:\n**\n**   RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n*/\nstatic void dense_rankStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ) p->nStep = 1;\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n}\nstatic void dense_rankValueFunc(sqlite3_context *pCtx){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    if( p->nStep ){\n      p->nValue++;\n      p->nStep = 0;\n    }\n    sqlite3_result_int64(pCtx, p->nValue);\n  }\n}\n\n/*\n** Implementation of built-in window function nth_value(). This\n** implementation is used in \"slow mode\" only - when the EXCLUDE clause\n** is not set to the default value \"NO OTHERS\".\n*/\nstruct NthValueCtx {\n  i64 nStep;\n  sqlite3_value *pValue;\n};\nstatic void nth_valueStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct NthValueCtx *p;\n  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    i64 iVal;\n    switch( sqlite3_value_numeric_type(apArg[1]) ){\n      case SQLITE_INTEGER:\n        iVal = sqlite3_value_int64(apArg[1]);\n        break;\n      case SQLITE_FLOAT: {\n        double fVal = sqlite3_value_double(apArg[1]);\n        if( ((i64)fVal)!=fVal ) goto error_out;\n        iVal = (i64)fVal;\n        break;\n      }\n      default:\n        goto error_out;\n    }\n    if( iVal<=0 ) goto error_out;\n\n    p->nStep++;\n    if( iVal==p->nStep ){\n      p->pValue = sqlite3_value_dup(apArg[0]);\n      if( !p->pValue ){\n        sqlite3_result_error_nomem(pCtx);\n      }\n    }\n  }\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n  return;\n\n error_out:\n  sqlite3_result_error(\n      pCtx, \"second argument to nth_value must be a positive integer\", -1\n  );\n}\nstatic void nth_valueFinalizeFunc(sqlite3_context *pCtx){\n  struct NthValueCtx *p;\n  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, 0);\n  if( p && p->pValue ){\n    sqlite3_result_value(pCtx, p->pValue);\n    sqlite3_value_free(p->pValue);\n    p->pValue = 0;\n  }\n}\n#define nth_valueInvFunc noopStepFunc\n#define nth_valueValueFunc noopValueFunc\n\nstatic void first_valueStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct NthValueCtx *p;\n  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p && p->pValue==0 ){\n    p->pValue = sqlite3_value_dup(apArg[0]);\n    if( !p->pValue ){\n      sqlite3_result_error_nomem(pCtx);\n    }\n  }\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n}\nstatic void first_valueFinalizeFunc(sqlite3_context *pCtx){\n  struct NthValueCtx *p;\n  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p && p->pValue ){\n    sqlite3_result_value(pCtx, p->pValue);\n    sqlite3_value_free(p->pValue);\n    p->pValue = 0;\n  }\n}\n#define first_valueInvFunc noopStepFunc\n#define first_valueValueFunc noopValueFunc\n\n/*\n** Implementation of built-in window function rank(). Assumes that\n** the window frame has been set to:\n**\n**   RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW\n*/\nstatic void rankStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    p->nStep++;\n    if( p->nValue==0 ){\n      p->nValue = p->nStep;\n    }\n  }\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n}\nstatic void rankValueFunc(sqlite3_context *pCtx){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    sqlite3_result_int64(pCtx, p->nValue);\n    p->nValue = 0;\n  }\n}\n\n/*\n** Implementation of built-in window function percent_rank(). Assumes that\n** the window frame has been set to:\n**\n**   GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING\n*/\nstatic void percent_rankStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  UNUSED_PARAMETER(nArg); assert( nArg==0 );\n  UNUSED_PARAMETER(apArg);\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    p->nTotal++;\n  }\n}\nstatic void percent_rankInvFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  UNUSED_PARAMETER(nArg); assert( nArg==0 );\n  UNUSED_PARAMETER(apArg);\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  p->nStep++;\n}\nstatic void percent_rankValueFunc(sqlite3_context *pCtx){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    p->nValue = p->nStep;\n    if( p->nTotal>1 ){\n      double r = (double)p->nValue / (double)(p->nTotal-1);\n      sqlite3_result_double(pCtx, r);\n    }else{\n      sqlite3_result_double(pCtx, 0.0);\n    }\n  }\n}\n#define percent_rankFinalizeFunc percent_rankValueFunc\n\n/*\n** Implementation of built-in window function cume_dist(). Assumes that\n** the window frame has been set to:\n**\n**   GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING\n*/\nstatic void cume_distStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  UNUSED_PARAMETER(nArg); assert( nArg==0 );\n  UNUSED_PARAMETER(apArg);\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    p->nTotal++;\n  }\n}\nstatic void cume_distInvFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct CallCount *p;\n  UNUSED_PARAMETER(nArg); assert( nArg==0 );\n  UNUSED_PARAMETER(apArg);\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  p->nStep++;\n}\nstatic void cume_distValueFunc(sqlite3_context *pCtx){\n  struct CallCount *p;\n  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, 0);\n  if( p ){\n    double r = (double)(p->nStep) / (double)(p->nTotal);\n    sqlite3_result_double(pCtx, r);\n  }\n}\n#define cume_distFinalizeFunc cume_distValueFunc\n\n/*\n** Context object for ntile() window function.\n*/\nstruct NtileCtx {\n  i64 nTotal;                     /* Total rows in partition */\n  i64 nParam;                     /* Parameter passed to ntile(N) */\n  i64 iRow;                       /* Current row */\n};\n\n/*\n** Implementation of ntile(). This assumes that the window frame has\n** been coerced to:\n**\n**   ROWS CURRENT ROW AND UNBOUNDED FOLLOWING\n*/\nstatic void ntileStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct NtileCtx *p;\n  assert( nArg==1 ); UNUSED_PARAMETER(nArg);\n  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    if( p->nTotal==0 ){\n      p->nParam = sqlite3_value_int64(apArg[0]);\n      if( p->nParam<=0 ){\n        sqlite3_result_error(\n            pCtx, \"argument of ntile must be a positive integer\", -1\n        );\n      }\n    }\n    p->nTotal++;\n  }\n}\nstatic void ntileInvFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct NtileCtx *p;\n  assert( nArg==1 ); UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  p->iRow++;\n}\nstatic void ntileValueFunc(sqlite3_context *pCtx){\n  struct NtileCtx *p;\n  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p && p->nParam>0 ){\n    int nSize = (p->nTotal / p->nParam);\n    if( nSize==0 ){\n      sqlite3_result_int64(pCtx, p->iRow+1);\n    }else{\n      i64 nLarge = p->nTotal - p->nParam*nSize;\n      i64 iSmall = nLarge*(nSize+1);\n      i64 iRow = p->iRow;\n\n      assert( (nLarge*(nSize+1) + (p->nParam-nLarge)*nSize)==p->nTotal );\n\n      if( iRow<iSmall ){\n        sqlite3_result_int64(pCtx, 1 + iRow/(nSize+1));\n      }else{\n        sqlite3_result_int64(pCtx, 1 + nLarge + (iRow-iSmall)/nSize);\n      }\n    }\n  }\n}\n#define ntileFinalizeFunc ntileValueFunc\n\n/*\n** Context object for last_value() window function.\n*/\nstruct LastValueCtx {\n  sqlite3_value *pVal;\n  int nVal;\n};\n\n/*\n** Implementation of last_value().\n*/\nstatic void last_valueStepFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct LastValueCtx *p;\n  UNUSED_PARAMETER(nArg);\n  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p ){\n    sqlite3_value_free(p->pVal);\n    p->pVal = sqlite3_value_dup(apArg[0]);\n    if( p->pVal==0 ){\n      sqlite3_result_error_nomem(pCtx);\n    }else{\n      p->nVal++;\n    }\n  }\n}\nstatic void last_valueInvFunc(\n  sqlite3_context *pCtx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  struct LastValueCtx *p;\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(apArg);\n  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( ALWAYS(p) ){\n    p->nVal--;\n    if( p->nVal==0 ){\n      sqlite3_value_free(p->pVal);\n      p->pVal = 0;\n    }\n  }\n}\nstatic void last_valueValueFunc(sqlite3_context *pCtx){\n  struct LastValueCtx *p;\n  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, 0);\n  if( p && p->pVal ){\n    sqlite3_result_value(pCtx, p->pVal);\n  }\n}\nstatic void last_valueFinalizeFunc(sqlite3_context *pCtx){\n  struct LastValueCtx *p;\n  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));\n  if( p && p->pVal ){\n    sqlite3_result_value(pCtx, p->pVal);\n    sqlite3_value_free(p->pVal);\n    p->pVal = 0;\n  }\n}\n\n/*\n** Static names for the built-in window function names.  These static\n** names are used, rather than string literals, so that FuncDef objects\n** can be associated with a particular window function by direct\n** comparison of the zName pointer.  Example:\n**\n**       if( pFuncDef->zName==row_valueName ){ ... }\n*/\nstatic const char row_numberName[] =   \"row_number\";\nstatic const char dense_rankName[] =   \"dense_rank\";\nstatic const char rankName[] =         \"rank\";\nstatic const char percent_rankName[] = \"percent_rank\";\nstatic const char cume_distName[] =    \"cume_dist\";\nstatic const char ntileName[] =        \"ntile\";\nstatic const char last_valueName[] =   \"last_value\";\nstatic const char nth_valueName[] =    \"nth_value\";\nstatic const char first_valueName[] =  \"first_value\";\nstatic const char leadName[] =         \"lead\";\nstatic const char lagName[] =          \"lag\";\n\n/*\n** No-op implementations of xStep() and xFinalize().  Used as place-holders\n** for built-in window functions that never call those interfaces.\n**\n** The noopValueFunc() is called but is expected to do nothing.  The\n** noopStepFunc() is never called, and so it is marked with NO_TEST to\n** let the test coverage routine know not to expect this function to be\n** invoked.\n*/\nstatic void noopStepFunc(    /*NO_TEST*/\n  sqlite3_context *p,        /*NO_TEST*/\n  int n,                     /*NO_TEST*/\n  sqlite3_value **a          /*NO_TEST*/\n){                           /*NO_TEST*/\n  UNUSED_PARAMETER(p);       /*NO_TEST*/\n  UNUSED_PARAMETER(n);       /*NO_TEST*/\n  UNUSED_PARAMETER(a);       /*NO_TEST*/\n  assert(0);                 /*NO_TEST*/\n}                            /*NO_TEST*/\nstatic void noopValueFunc(sqlite3_context *p){ UNUSED_PARAMETER(p); /*no-op*/ }\n\n/* Window functions that use all window interfaces: xStep, xFinal,\n** xValue, and xInverse */\n#define WINDOWFUNCALL(name,nArg,extra) {                                   \\\n  nArg, (SQLITE_FUNC_BUILTIN|SQLITE_UTF8|SQLITE_FUNC_WINDOW|extra), 0, 0,  \\\n  name ## StepFunc, name ## FinalizeFunc, name ## ValueFunc,               \\\n  name ## InvFunc, name ## Name, {0}                                       \\\n}\n\n/* Window functions that are implemented using bytecode and thus have\n** no-op routines for their methods */\n#define WINDOWFUNCNOOP(name,nArg,extra) {                                  \\\n  nArg, (SQLITE_FUNC_BUILTIN|SQLITE_UTF8|SQLITE_FUNC_WINDOW|extra), 0, 0,  \\\n  noopStepFunc, noopValueFunc, noopValueFunc,                              \\\n  noopStepFunc, name ## Name, {0}                                          \\\n}\n\n/* Window functions that use all window interfaces: xStep, the\n** same routine for xFinalize and xValue and which never call\n** xInverse. */\n#define WINDOWFUNCX(name,nArg,extra) {                                     \\\n  nArg, (SQLITE_FUNC_BUILTIN|SQLITE_UTF8|SQLITE_FUNC_WINDOW|extra), 0, 0,  \\\n  name ## StepFunc, name ## ValueFunc, name ## ValueFunc,                  \\\n  noopStepFunc, name ## Name, {0}                                          \\\n}\n\n\n/*\n** Register those built-in window functions that are not also aggregates.\n*/\nSQLITE_PRIVATE void sqlite3WindowFunctions(void){\n  static FuncDef aWindowFuncs[] = {\n    WINDOWFUNCX(row_number, 0, 0),\n    WINDOWFUNCX(dense_rank, 0, 0),\n    WINDOWFUNCX(rank, 0, 0),\n    WINDOWFUNCALL(percent_rank, 0, 0),\n    WINDOWFUNCALL(cume_dist, 0, 0),\n    WINDOWFUNCALL(ntile, 1, 0),\n    WINDOWFUNCALL(last_value, 1, 0),\n    WINDOWFUNCALL(nth_value, 2, 0),\n    WINDOWFUNCALL(first_value, 1, 0),\n    WINDOWFUNCNOOP(lead, 1, 0),\n    WINDOWFUNCNOOP(lead, 2, 0),\n    WINDOWFUNCNOOP(lead, 3, 0),\n    WINDOWFUNCNOOP(lag, 1, 0),\n    WINDOWFUNCNOOP(lag, 2, 0),\n    WINDOWFUNCNOOP(lag, 3, 0),\n  };\n  sqlite3InsertBuiltinFuncs(aWindowFuncs, ArraySize(aWindowFuncs));\n}\n\nstatic Window *windowFind(Parse *pParse, Window *pList, const char *zName){\n  Window *p;\n  for(p=pList; p; p=p->pNextWin){\n    if( sqlite3StrICmp(p->zName, zName)==0 ) break;\n  }\n  if( p==0 ){\n    sqlite3ErrorMsg(pParse, \"no such window: %s\", zName);\n  }\n  return p;\n}\n\n/*\n** This function is called immediately after resolving the function name\n** for a window function within a SELECT statement. Argument pList is a\n** linked list of WINDOW definitions for the current SELECT statement.\n** Argument pFunc is the function definition just resolved and pWin\n** is the Window object representing the associated OVER clause. This\n** function updates the contents of pWin as follows:\n**\n**   * If the OVER clause referred to a named window (as in \"max(x) OVER win\"),\n**     search list pList for a matching WINDOW definition, and update pWin\n**     accordingly. If no such WINDOW clause can be found, leave an error\n**     in pParse.\n**\n**   * If the function is a built-in window function that requires the\n**     window to be coerced (see \"BUILT-IN WINDOW FUNCTIONS\" at the top\n**     of this file), pWin is updated here.\n*/\nSQLITE_PRIVATE void sqlite3WindowUpdate(\n  Parse *pParse,\n  Window *pList,                  /* List of named windows for this SELECT */\n  Window *pWin,                   /* Window frame to update */\n  FuncDef *pFunc                  /* Window function definition */\n){\n  if( pWin->zName && pWin->eFrmType==0 ){\n    Window *p = windowFind(pParse, pList, pWin->zName);\n    if( p==0 ) return;\n    pWin->pPartition = sqlite3ExprListDup(pParse->db, p->pPartition, 0);\n    pWin->pOrderBy = sqlite3ExprListDup(pParse->db, p->pOrderBy, 0);\n    pWin->pStart = sqlite3ExprDup(pParse->db, p->pStart, 0);\n    pWin->pEnd = sqlite3ExprDup(pParse->db, p->pEnd, 0);\n    pWin->eStart = p->eStart;\n    pWin->eEnd = p->eEnd;\n    pWin->eFrmType = p->eFrmType;\n    pWin->eExclude = p->eExclude;\n  }else{\n    sqlite3WindowChain(pParse, pWin, pList);\n  }\n  if( (pWin->eFrmType==TK_RANGE)\n   && (pWin->pStart || pWin->pEnd)\n   && (pWin->pOrderBy==0 || pWin->pOrderBy->nExpr!=1)\n  ){\n    sqlite3ErrorMsg(pParse,\n      \"RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\"\n    );\n  }else\n  if( pFunc->funcFlags & SQLITE_FUNC_WINDOW ){\n    sqlite3 *db = pParse->db;\n    if( pWin->pFilter ){\n      sqlite3ErrorMsg(pParse,\n          \"FILTER clause may only be used with aggregate window functions\"\n      );\n    }else{\n      struct WindowUpdate {\n        const char *zFunc;\n        int eFrmType;\n        int eStart;\n        int eEnd;\n      } aUp[] = {\n        { row_numberName,   TK_ROWS,   TK_UNBOUNDED, TK_CURRENT },\n        { dense_rankName,   TK_RANGE,  TK_UNBOUNDED, TK_CURRENT },\n        { rankName,         TK_RANGE,  TK_UNBOUNDED, TK_CURRENT },\n        { percent_rankName, TK_GROUPS, TK_CURRENT,   TK_UNBOUNDED },\n        { cume_distName,    TK_GROUPS, TK_FOLLOWING, TK_UNBOUNDED },\n        { ntileName,        TK_ROWS,   TK_CURRENT,   TK_UNBOUNDED },\n        { leadName,         TK_ROWS,   TK_UNBOUNDED, TK_UNBOUNDED },\n        { lagName,          TK_ROWS,   TK_UNBOUNDED, TK_CURRENT },\n      };\n      int i;\n      for(i=0; i<ArraySize(aUp); i++){\n        if( pFunc->zName==aUp[i].zFunc ){\n          sqlite3ExprDelete(db, pWin->pStart);\n          sqlite3ExprDelete(db, pWin->pEnd);\n          pWin->pEnd = pWin->pStart = 0;\n          pWin->eFrmType = aUp[i].eFrmType;\n          pWin->eStart = aUp[i].eStart;\n          pWin->eEnd = aUp[i].eEnd;\n          pWin->eExclude = 0;\n          if( pWin->eStart==TK_FOLLOWING ){\n            pWin->pStart = sqlite3Expr(db, TK_INTEGER, \"1\");\n          }\n          break;\n        }\n      }\n    }\n  }\n  pWin->pWFunc = pFunc;\n}\n\n/*\n** Context object passed through sqlite3WalkExprList() to\n** selectWindowRewriteExprCb() by selectWindowRewriteEList().\n*/\ntypedef struct WindowRewrite WindowRewrite;\nstruct WindowRewrite {\n  Window *pWin;\n  SrcList *pSrc;\n  ExprList *pSub;\n  Table *pTab;\n  Select *pSubSelect;             /* Current sub-select, if any */\n};\n\n/*\n** Callback function used by selectWindowRewriteEList(). If necessary,\n** this function appends to the output expression-list and updates\n** expression (*ppExpr) in place.\n*/\nstatic int selectWindowRewriteExprCb(Walker *pWalker, Expr *pExpr){\n  struct WindowRewrite *p = pWalker->u.pRewrite;\n  Parse *pParse = pWalker->pParse;\n  assert( p!=0 );\n  assert( p->pWin!=0 );\n\n  /* If this function is being called from within a scalar sub-select\n  ** that used by the SELECT statement being processed, only process\n  ** TK_COLUMN expressions that refer to it (the outer SELECT). Do\n  ** not process aggregates or window functions at all, as they belong\n  ** to the scalar sub-select.  */\n  if( p->pSubSelect ){\n    if( pExpr->op!=TK_COLUMN ){\n      return WRC_Continue;\n    }else{\n      int nSrc = p->pSrc->nSrc;\n      int i;\n      for(i=0; i<nSrc; i++){\n        if( pExpr->iTable==p->pSrc->a[i].iCursor ) break;\n      }\n      if( i==nSrc ) return WRC_Continue;\n    }\n  }\n\n  switch( pExpr->op ){\n\n    case TK_FUNCTION:\n      if( !ExprHasProperty(pExpr, EP_WinFunc) ){\n        break;\n      }else{\n        Window *pWin;\n        for(pWin=p->pWin; pWin; pWin=pWin->pNextWin){\n          if( pExpr->y.pWin==pWin ){\n            assert( pWin->pOwner==pExpr );\n            return WRC_Prune;\n          }\n        }\n      }\n      /* no break */ deliberate_fall_through\n\n    case TK_IF_NULL_ROW:\n    case TK_AGG_FUNCTION:\n    case TK_COLUMN: {\n      int iCol = -1;\n      if( pParse->db->mallocFailed ) return WRC_Abort;\n      if( p->pSub ){\n        int i;\n        for(i=0; i<p->pSub->nExpr; i++){\n          if( 0==sqlite3ExprCompare(0, p->pSub->a[i].pExpr, pExpr, -1) ){\n            iCol = i;\n            break;\n          }\n        }\n      }\n      if( iCol<0 ){\n        Expr *pDup = sqlite3ExprDup(pParse->db, pExpr, 0);\n        if( pDup && pDup->op==TK_AGG_FUNCTION ) pDup->op = TK_FUNCTION;\n        p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup);\n      }\n      if( p->pSub ){\n        int f = pExpr->flags & EP_Collate;\n        assert( ExprHasProperty(pExpr, EP_Static)==0 );\n        ExprSetProperty(pExpr, EP_Static);\n        sqlite3ExprDelete(pParse->db, pExpr);\n        ExprClearProperty(pExpr, EP_Static);\n        memset(pExpr, 0, sizeof(Expr));\n\n        pExpr->op = TK_COLUMN;\n        pExpr->iColumn = (iCol<0 ? p->pSub->nExpr-1: iCol);\n        pExpr->iTable = p->pWin->iEphCsr;\n        pExpr->y.pTab = p->pTab;\n        pExpr->flags = f;\n      }\n      if( pParse->db->mallocFailed ) return WRC_Abort;\n      break;\n    }\n\n    default: /* no-op */\n      break;\n  }\n\n  return WRC_Continue;\n}\nstatic int selectWindowRewriteSelectCb(Walker *pWalker, Select *pSelect){\n  struct WindowRewrite *p = pWalker->u.pRewrite;\n  Select *pSave = p->pSubSelect;\n  if( pSave==pSelect ){\n    return WRC_Continue;\n  }else{\n    p->pSubSelect = pSelect;\n    sqlite3WalkSelect(pWalker, pSelect);\n    p->pSubSelect = pSave;\n  }\n  return WRC_Prune;\n}\n\n\n/*\n** Iterate through each expression in expression-list pEList. For each:\n**\n**   * TK_COLUMN,\n**   * aggregate function, or\n**   * window function with a Window object that is not a member of the\n**     Window list passed as the second argument (pWin).\n**\n** Append the node to output expression-list (*ppSub). And replace it\n** with a TK_COLUMN that reads the (N-1)th element of table\n** pWin->iEphCsr, where N is the number of elements in (*ppSub) after\n** appending the new one.\n*/\nstatic void selectWindowRewriteEList(\n  Parse *pParse,\n  Window *pWin,\n  SrcList *pSrc,\n  ExprList *pEList,               /* Rewrite expressions in this list */\n  Table *pTab,\n  ExprList **ppSub                /* IN/OUT: Sub-select expression-list */\n){\n  Walker sWalker;\n  WindowRewrite sRewrite;\n\n  assert( pWin!=0 );\n  memset(&sWalker, 0, sizeof(Walker));\n  memset(&sRewrite, 0, sizeof(WindowRewrite));\n\n  sRewrite.pSub = *ppSub;\n  sRewrite.pWin = pWin;\n  sRewrite.pSrc = pSrc;\n  sRewrite.pTab = pTab;\n\n  sWalker.pParse = pParse;\n  sWalker.xExprCallback = selectWindowRewriteExprCb;\n  sWalker.xSelectCallback = selectWindowRewriteSelectCb;\n  sWalker.u.pRewrite = &sRewrite;\n\n  (void)sqlite3WalkExprList(&sWalker, pEList);\n\n  *ppSub = sRewrite.pSub;\n}\n\n/*\n** Append a copy of each expression in expression-list pAppend to\n** expression list pList. Return a pointer to the result list.\n*/\nstatic ExprList *exprListAppendList(\n  Parse *pParse,          /* Parsing context */\n  ExprList *pList,        /* List to which to append. Might be NULL */\n  ExprList *pAppend,      /* List of values to append. Might be NULL */\n  int bIntToNull\n){\n  if( pAppend ){\n    int i;\n    int nInit = pList ? pList->nExpr : 0;\n    for(i=0; i<pAppend->nExpr; i++){\n      sqlite3 *db = pParse->db;\n      Expr *pDup = sqlite3ExprDup(db, pAppend->a[i].pExpr, 0);\n      if( db->mallocFailed ){\n        sqlite3ExprDelete(db, pDup);\n        break;\n      }\n      if( bIntToNull ){\n        int iDummy;\n        Expr *pSub;\n        pSub = sqlite3ExprSkipCollateAndLikely(pDup);\n        if( sqlite3ExprIsInteger(pSub, &iDummy, 0) ){\n          pSub->op = TK_NULL;\n          pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);\n          pSub->u.zToken = 0;\n        }\n      }\n      pList = sqlite3ExprListAppend(pParse, pList, pDup);\n      if( pList ) pList->a[nInit+i].fg.sortFlags = pAppend->a[i].fg.sortFlags;\n    }\n  }\n  return pList;\n}\n\n/*\n** When rewriting a query, if the new subquery in the FROM clause\n** contains TK_AGG_FUNCTION nodes that refer to an outer query,\n** then we have to increase the Expr->op2 values of those nodes\n** due to the extra subquery layer that was added.\n**\n** See also the incrAggDepth() routine in resolve.c\n*/\nstatic int sqlite3WindowExtraAggFuncDepth(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_AGG_FUNCTION\n   && pExpr->op2>=pWalker->walkerDepth\n  ){\n    pExpr->op2++;\n  }\n  return WRC_Continue;\n}\n\nstatic int disallowAggregatesInOrderByCb(Walker *pWalker, Expr *pExpr){\n  if( pExpr->op==TK_AGG_FUNCTION && pExpr->pAggInfo==0 ){\n    assert( !ExprHasProperty(pExpr, EP_IntValue) );\n     sqlite3ErrorMsg(pWalker->pParse,\n         \"misuse of aggregate: %s()\", pExpr->u.zToken);\n  }\n  return WRC_Continue;\n}\n\n/*\n** If the SELECT statement passed as the second argument does not invoke\n** any SQL window functions, this function is a no-op. Otherwise, it\n** rewrites the SELECT statement so that window function xStep functions\n** are invoked in the correct order as described under \"SELECT REWRITING\"\n** at the top of this file.\n*/\nSQLITE_PRIVATE int sqlite3WindowRewrite(Parse *pParse, Select *p){\n  int rc = SQLITE_OK;\n  if( p->pWin\n   && p->pPrior==0\n   && ALWAYS((p->selFlags & SF_WinRewrite)==0)\n   && ALWAYS(!IN_RENAME_OBJECT)\n  ){\n    Vdbe *v = sqlite3GetVdbe(pParse);\n    sqlite3 *db = pParse->db;\n    Select *pSub = 0;             /* The subquery */\n    SrcList *pSrc = p->pSrc;\n    Expr *pWhere = p->pWhere;\n    ExprList *pGroupBy = p->pGroupBy;\n    Expr *pHaving = p->pHaving;\n    ExprList *pSort = 0;\n\n    ExprList *pSublist = 0;       /* Expression list for sub-query */\n    Window *pMWin = p->pWin;      /* Main window object */\n    Window *pWin;                 /* Window object iterator */\n    Table *pTab;\n    Walker w;\n\n    u32 selFlags = p->selFlags;\n\n    pTab = sqlite3DbMallocZero(db, sizeof(Table));\n    if( pTab==0 ){\n      return sqlite3ErrorToParser(db, SQLITE_NOMEM);\n    }\n    sqlite3AggInfoPersistWalkerInit(&w, pParse);\n    sqlite3WalkSelect(&w, p);\n    if( (p->selFlags & SF_Aggregate)==0 ){\n      w.xExprCallback = disallowAggregatesInOrderByCb;\n      w.xSelectCallback = 0;\n      sqlite3WalkExprList(&w, p->pOrderBy);\n    }\n\n    p->pSrc = 0;\n    p->pWhere = 0;\n    p->pGroupBy = 0;\n    p->pHaving = 0;\n    p->selFlags &= ~(u32)SF_Aggregate;\n    p->selFlags |= SF_WinRewrite;\n\n    /* Create the ORDER BY clause for the sub-select. This is the concatenation\n    ** of the window PARTITION and ORDER BY clauses. Then, if this makes it\n    ** redundant, remove the ORDER BY from the parent SELECT.  */\n    pSort = exprListAppendList(pParse, 0, pMWin->pPartition, 1);\n    pSort = exprListAppendList(pParse, pSort, pMWin->pOrderBy, 1);\n    if( pSort && p->pOrderBy && p->pOrderBy->nExpr<=pSort->nExpr ){\n      int nSave = pSort->nExpr;\n      pSort->nExpr = p->pOrderBy->nExpr;\n      if( sqlite3ExprListCompare(pSort, p->pOrderBy, -1)==0 ){\n        sqlite3ExprListDelete(db, p->pOrderBy);\n        p->pOrderBy = 0;\n      }\n      pSort->nExpr = nSave;\n    }\n\n    /* Assign a cursor number for the ephemeral table used to buffer rows.\n    ** The OpenEphemeral instruction is coded later, after it is known how\n    ** many columns the table will have.  */\n    pMWin->iEphCsr = pParse->nTab++;\n    pParse->nTab += 3;\n\n    selectWindowRewriteEList(pParse, pMWin, pSrc, p->pEList, pTab, &pSublist);\n    selectWindowRewriteEList(pParse, pMWin, pSrc, p->pOrderBy, pTab, &pSublist);\n    pMWin->nBufferCol = (pSublist ? pSublist->nExpr : 0);\n\n    /* Append the PARTITION BY and ORDER BY expressions to the to the\n    ** sub-select expression list. They are required to figure out where\n    ** boundaries for partitions and sets of peer rows lie.  */\n    pSublist = exprListAppendList(pParse, pSublist, pMWin->pPartition, 0);\n    pSublist = exprListAppendList(pParse, pSublist, pMWin->pOrderBy, 0);\n\n    /* Append the arguments passed to each window function to the\n    ** sub-select expression list. Also allocate two registers for each\n    ** window function - one for the accumulator, another for interim\n    ** results.  */\n    for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n      ExprList *pArgs;\n      assert( ExprUseXList(pWin->pOwner) );\n      assert( pWin->pWFunc!=0 );\n      pArgs = pWin->pOwner->x.pList;\n      if( pWin->pWFunc->funcFlags & SQLITE_SUBTYPE ){\n        selectWindowRewriteEList(pParse, pMWin, pSrc, pArgs, pTab, &pSublist);\n        pWin->iArgCol = (pSublist ? pSublist->nExpr : 0);\n        pWin->bExprArgs = 1;\n      }else{\n        pWin->iArgCol = (pSublist ? pSublist->nExpr : 0);\n        pSublist = exprListAppendList(pParse, pSublist, pArgs, 0);\n      }\n      if( pWin->pFilter ){\n        Expr *pFilter = sqlite3ExprDup(db, pWin->pFilter, 0);\n        pSublist = sqlite3ExprListAppend(pParse, pSublist, pFilter);\n      }\n      pWin->regAccum = ++pParse->nMem;\n      pWin->regResult = ++pParse->nMem;\n      sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regAccum);\n    }\n\n    /* If there is no ORDER BY or PARTITION BY clause, and the window\n    ** function accepts zero arguments, and there are no other columns\n    ** selected (e.g. \"SELECT row_number() OVER () FROM t1\"), it is possible\n    ** that pSublist is still NULL here. Add a constant expression here to\n    ** keep everything legal in this case.\n    */\n    if( pSublist==0 ){\n      pSublist = sqlite3ExprListAppend(pParse, 0,\n        sqlite3Expr(db, TK_INTEGER, \"0\")\n      );\n    }\n\n    pSub = sqlite3SelectNew(\n        pParse, pSublist, pSrc, pWhere, pGroupBy, pHaving, pSort, 0, 0\n    );\n    TREETRACE(0x40,pParse,pSub,\n       (\"New window-function subquery in FROM clause of (%u/%p)\\n\",\n       p->selId, p));\n    p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0);\n    assert( pSub!=0 || p->pSrc==0 ); /* Due to db->mallocFailed test inside\n                                     ** of sqlite3DbMallocRawNN() called from\n                                     ** sqlite3SrcListAppend() */\n    if( p->pSrc==0 ){\n      sqlite3SelectDelete(db, pSub);\n    }else if( sqlite3SrcItemAttachSubquery(pParse, &p->pSrc->a[0], pSub, 0) ){\n      Table *pTab2;\n      p->pSrc->a[0].fg.isCorrelated = 1;\n      sqlite3SrcListAssignCursors(pParse, p->pSrc);\n      pSub->selFlags |= SF_Expanded|SF_OrderByReqd;\n      pTab2 = sqlite3ResultSetOfSelect(pParse, pSub, SQLITE_AFF_NONE);\n      pSub->selFlags |= (selFlags & SF_Aggregate);\n      if( pTab2==0 ){\n        /* Might actually be some other kind of error, but in that case\n        ** pParse->nErr will be set, so if SQLITE_NOMEM is set, we will get\n        ** the correct error message regardless. */\n        rc = SQLITE_NOMEM;\n      }else{\n        memcpy(pTab, pTab2, sizeof(Table));\n        pTab->tabFlags |= TF_Ephemeral;\n        p->pSrc->a[0].pSTab = pTab;\n        pTab = pTab2;\n        memset(&w, 0, sizeof(w));\n        w.xExprCallback = sqlite3WindowExtraAggFuncDepth;\n        w.xSelectCallback = sqlite3WalkerDepthIncrease;\n        w.xSelectCallback2 = sqlite3WalkerDepthDecrease;\n        sqlite3WalkSelect(&w, pSub);\n      }\n    }\n    if( db->mallocFailed ) rc = SQLITE_NOMEM;\n\n    /* Defer deleting the temporary table pTab because if an error occurred,\n    ** there could still be references to that table embedded in the\n    ** result-set or ORDER BY clause of the SELECT statement p.  */\n    sqlite3ParserAddCleanup(pParse, sqlite3DbFree, pTab);\n  }\n\n  assert( rc==SQLITE_OK || pParse->nErr!=0 );\n  return rc;\n}\n\n/*\n** Unlink the Window object from the Select to which it is attached,\n** if it is attached.\n*/\nSQLITE_PRIVATE void sqlite3WindowUnlinkFromSelect(Window *p){\n  if( p->ppThis ){\n    *p->ppThis = p->pNextWin;\n    if( p->pNextWin ) p->pNextWin->ppThis = p->ppThis;\n    p->ppThis = 0;\n  }\n}\n\n/*\n** Free the Window object passed as the second argument.\n*/\nSQLITE_PRIVATE void sqlite3WindowDelete(sqlite3 *db, Window *p){\n  if( p ){\n    sqlite3WindowUnlinkFromSelect(p);\n    sqlite3ExprDelete(db, p->pFilter);\n    sqlite3ExprListDelete(db, p->pPartition);\n    sqlite3ExprListDelete(db, p->pOrderBy);\n    sqlite3ExprDelete(db, p->pEnd);\n    sqlite3ExprDelete(db, p->pStart);\n    sqlite3DbFree(db, p->zName);\n    sqlite3DbFree(db, p->zBase);\n    sqlite3DbFree(db, p);\n  }\n}\n\n/*\n** Free the linked list of Window objects starting at the second argument.\n*/\nSQLITE_PRIVATE void sqlite3WindowListDelete(sqlite3 *db, Window *p){\n  while( p ){\n    Window *pNext = p->pNextWin;\n    sqlite3WindowDelete(db, p);\n    p = pNext;\n  }\n}\n\n/*\n** The argument expression is an PRECEDING or FOLLOWING offset.  The\n** value should be a non-negative integer.  If the value is not a\n** constant, change it to NULL.  The fact that it is then a non-negative\n** integer will be caught later.  But it is important not to leave\n** variable values in the expression tree.\n*/\nstatic Expr *sqlite3WindowOffsetExpr(Parse *pParse, Expr *pExpr){\n  if( 0==sqlite3ExprIsConstant(0,pExpr) ){\n    if( IN_RENAME_OBJECT ) sqlite3RenameExprUnmap(pParse, pExpr);\n    sqlite3ExprDelete(pParse->db, pExpr);\n    pExpr = sqlite3ExprAlloc(pParse->db, TK_NULL, 0, 0);\n  }\n  return pExpr;\n}\n\n/*\n** Allocate and return a new Window object describing a Window Definition.\n*/\nSQLITE_PRIVATE Window *sqlite3WindowAlloc(\n  Parse *pParse,    /* Parsing context */\n  int eType,        /* Frame type. TK_RANGE, TK_ROWS, TK_GROUPS, or 0 */\n  int eStart,       /* Start type: CURRENT, PRECEDING, FOLLOWING, UNBOUNDED */\n  Expr *pStart,     /* Start window size if TK_PRECEDING or FOLLOWING */\n  int eEnd,         /* End type: CURRENT, FOLLOWING, TK_UNBOUNDED, PRECEDING */\n  Expr *pEnd,       /* End window size if TK_FOLLOWING or PRECEDING */\n  u8 eExclude       /* EXCLUDE clause */\n){\n  Window *pWin = 0;\n  int bImplicitFrame = 0;\n\n  /* Parser assures the following: */\n  assert( eType==0 || eType==TK_RANGE || eType==TK_ROWS || eType==TK_GROUPS );\n  assert( eStart==TK_CURRENT || eStart==TK_PRECEDING\n           || eStart==TK_UNBOUNDED || eStart==TK_FOLLOWING );\n  assert( eEnd==TK_CURRENT || eEnd==TK_FOLLOWING\n           || eEnd==TK_UNBOUNDED || eEnd==TK_PRECEDING );\n  assert( (eStart==TK_PRECEDING || eStart==TK_FOLLOWING)==(pStart!=0) );\n  assert( (eEnd==TK_FOLLOWING || eEnd==TK_PRECEDING)==(pEnd!=0) );\n\n  if( eType==0 ){\n    bImplicitFrame = 1;\n    eType = TK_RANGE;\n  }\n\n  /* Additionally, the\n  ** starting boundary type may not occur earlier in the following list than\n  ** the ending boundary type:\n  **\n  **   UNBOUNDED PRECEDING\n  **   <expr> PRECEDING\n  **   CURRENT ROW\n  **   <expr> FOLLOWING\n  **   UNBOUNDED FOLLOWING\n  **\n  ** The parser ensures that \"UNBOUNDED PRECEDING\" cannot be used as an ending\n  ** boundary, and than \"UNBOUNDED FOLLOWING\" cannot be used as a starting\n  ** frame boundary.\n  */\n  if( (eStart==TK_CURRENT && eEnd==TK_PRECEDING)\n   || (eStart==TK_FOLLOWING && (eEnd==TK_PRECEDING || eEnd==TK_CURRENT))\n  ){\n    sqlite3ErrorMsg(pParse, \"unsupported frame specification\");\n    goto windowAllocErr;\n  }\n\n  pWin = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));\n  if( pWin==0 ) goto windowAllocErr;\n  pWin->eFrmType = eType;\n  pWin->eStart = eStart;\n  pWin->eEnd = eEnd;\n  if( eExclude==0 && OptimizationDisabled(pParse->db, SQLITE_WindowFunc) ){\n    eExclude = TK_NO;\n  }\n  pWin->eExclude = eExclude;\n  pWin->bImplicitFrame = bImplicitFrame;\n  pWin->pEnd = sqlite3WindowOffsetExpr(pParse, pEnd);\n  pWin->pStart = sqlite3WindowOffsetExpr(pParse, pStart);\n  return pWin;\n\nwindowAllocErr:\n  sqlite3ExprDelete(pParse->db, pEnd);\n  sqlite3ExprDelete(pParse->db, pStart);\n  return 0;\n}\n\n/*\n** Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window\n** pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the\n** equivalent nul-terminated string.\n*/\nSQLITE_PRIVATE Window *sqlite3WindowAssemble(\n  Parse *pParse,\n  Window *pWin,\n  ExprList *pPartition,\n  ExprList *pOrderBy,\n  Token *pBase\n){\n  if( pWin ){\n    pWin->pPartition = pPartition;\n    pWin->pOrderBy = pOrderBy;\n    if( pBase ){\n      pWin->zBase = sqlite3DbStrNDup(pParse->db, pBase->z, pBase->n);\n    }\n  }else{\n    sqlite3ExprListDelete(pParse->db, pPartition);\n    sqlite3ExprListDelete(pParse->db, pOrderBy);\n  }\n  return pWin;\n}\n\n/*\n** Window *pWin has just been created from a WINDOW clause. Token pBase\n** is the base window. Earlier windows from the same WINDOW clause are\n** stored in the linked list starting at pWin->pNextWin. This function\n** either updates *pWin according to the base specification, or else\n** leaves an error in pParse.\n*/\nSQLITE_PRIVATE void sqlite3WindowChain(Parse *pParse, Window *pWin, Window *pList){\n  if( pWin->zBase ){\n    sqlite3 *db = pParse->db;\n    Window *pExist = windowFind(pParse, pList, pWin->zBase);\n    if( pExist ){\n      const char *zErr = 0;\n      /* Check for errors */\n      if( pWin->pPartition ){\n        zErr = \"PARTITION clause\";\n      }else if( pExist->pOrderBy && pWin->pOrderBy ){\n        zErr = \"ORDER BY clause\";\n      }else if( pExist->bImplicitFrame==0 ){\n        zErr = \"frame specification\";\n      }\n      if( zErr ){\n        sqlite3ErrorMsg(pParse,\n            \"cannot override %s of window: %s\", zErr, pWin->zBase\n        );\n      }else{\n        pWin->pPartition = sqlite3ExprListDup(db, pExist->pPartition, 0);\n        if( pExist->pOrderBy ){\n          assert( pWin->pOrderBy==0 );\n          pWin->pOrderBy = sqlite3ExprListDup(db, pExist->pOrderBy, 0);\n        }\n        sqlite3DbFree(db, pWin->zBase);\n        pWin->zBase = 0;\n      }\n    }\n  }\n}\n\n/*\n** Attach window object pWin to expression p.\n*/\nSQLITE_PRIVATE void sqlite3WindowAttach(Parse *pParse, Expr *p, Window *pWin){\n  if( p ){\n    assert( p->op==TK_FUNCTION );\n    assert( pWin );\n    assert( ExprIsFullSize(p) );\n    p->y.pWin = pWin;\n    ExprSetProperty(p, EP_WinFunc|EP_FullSize);\n    pWin->pOwner = p;\n    if( (p->flags & EP_Distinct) && pWin->eFrmType!=TK_FILTER ){\n      sqlite3ErrorMsg(pParse,\n          \"DISTINCT is not supported for window functions\"\n      );\n    }\n  }else{\n    sqlite3WindowDelete(pParse->db, pWin);\n  }\n}\n\n/*\n** Possibly link window pWin into the list at pSel->pWin (window functions\n** to be processed as part of SELECT statement pSel). The window is linked\n** in if either (a) there are no other windows already linked to this\n** SELECT, or (b) the windows already linked use a compatible window frame.\n*/\nSQLITE_PRIVATE void sqlite3WindowLink(Select *pSel, Window *pWin){\n  if( pSel ){\n    if( 0==pSel->pWin || 0==sqlite3WindowCompare(0, pSel->pWin, pWin, 0) ){\n      pWin->pNextWin = pSel->pWin;\n      if( pSel->pWin ){\n        pSel->pWin->ppThis = &pWin->pNextWin;\n      }\n      pSel->pWin = pWin;\n      pWin->ppThis = &pSel->pWin;\n    }else{\n      if( sqlite3ExprListCompare(pWin->pPartition, pSel->pWin->pPartition,-1) ){\n        pSel->selFlags |= SF_MultiPart;\n      }\n    }\n  }\n}\n\n/*\n** Return 0 if the two window objects are identical, 1 if they are\n** different, or 2 if it cannot be determined if the objects are identical\n** or not. Identical window objects can be processed in a single scan.\n*/\nSQLITE_PRIVATE int sqlite3WindowCompare(\n  const Parse *pParse,\n  const Window *p1,\n  const Window *p2,\n  int bFilter\n){\n  int res;\n  if( NEVER(p1==0) || NEVER(p2==0) ) return 1;\n  if( p1->eFrmType!=p2->eFrmType ) return 1;\n  if( p1->eStart!=p2->eStart ) return 1;\n  if( p1->eEnd!=p2->eEnd ) return 1;\n  if( p1->eExclude!=p2->eExclude ) return 1;\n  if( sqlite3ExprCompare(pParse, p1->pStart, p2->pStart, -1) ) return 1;\n  if( sqlite3ExprCompare(pParse, p1->pEnd, p2->pEnd, -1) ) return 1;\n  if( (res = sqlite3ExprListCompare(p1->pPartition, p2->pPartition, -1)) ){\n    return res;\n  }\n  if( (res = sqlite3ExprListCompare(p1->pOrderBy, p2->pOrderBy, -1)) ){\n    return res;\n  }\n  if( bFilter ){\n    if( (res = sqlite3ExprCompare(pParse, p1->pFilter, p2->pFilter, -1)) ){\n      return res;\n    }\n  }\n  return 0;\n}\n\n\n/*\n** This is called by code in select.c before it calls sqlite3WhereBegin()\n** to begin iterating through the sub-query results. It is used to allocate\n** and initialize registers and cursors used by sqlite3WindowCodeStep().\n*/\nSQLITE_PRIVATE void sqlite3WindowCodeInit(Parse *pParse, Select *pSelect){\n  Window *pWin;\n  int nEphExpr;\n  Window *pMWin;\n  Vdbe *v;\n\n  assert( pSelect->pSrc->a[0].fg.isSubquery );\n  nEphExpr = pSelect->pSrc->a[0].u4.pSubq->pSelect->pEList->nExpr;\n  pMWin = pSelect->pWin;\n  v = sqlite3GetVdbe(pParse);\n\n  sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pMWin->iEphCsr, nEphExpr);\n  sqlite3VdbeAddOp2(v, OP_OpenDup, pMWin->iEphCsr+1, pMWin->iEphCsr);\n  sqlite3VdbeAddOp2(v, OP_OpenDup, pMWin->iEphCsr+2, pMWin->iEphCsr);\n  sqlite3VdbeAddOp2(v, OP_OpenDup, pMWin->iEphCsr+3, pMWin->iEphCsr);\n\n  /* Allocate registers to use for PARTITION BY values, if any. Initialize\n  ** said registers to NULL.  */\n  if( pMWin->pPartition ){\n    int nExpr = pMWin->pPartition->nExpr;\n    pMWin->regPart = pParse->nMem+1;\n    pParse->nMem += nExpr;\n    sqlite3VdbeAddOp3(v, OP_Null, 0, pMWin->regPart, pMWin->regPart+nExpr-1);\n  }\n\n  pMWin->regOne = ++pParse->nMem;\n  sqlite3VdbeAddOp2(v, OP_Integer, 1, pMWin->regOne);\n\n  if( pMWin->eExclude ){\n    pMWin->regStartRowid = ++pParse->nMem;\n    pMWin->regEndRowid = ++pParse->nMem;\n    pMWin->csrApp = pParse->nTab++;\n    sqlite3VdbeAddOp2(v, OP_Integer, 1, pMWin->regStartRowid);\n    sqlite3VdbeAddOp2(v, OP_Integer, 0, pMWin->regEndRowid);\n    sqlite3VdbeAddOp2(v, OP_OpenDup, pMWin->csrApp, pMWin->iEphCsr);\n    return;\n  }\n\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    FuncDef *p = pWin->pWFunc;\n    if( (p->funcFlags & SQLITE_FUNC_MINMAX) && pWin->eStart!=TK_UNBOUNDED ){\n      /* The inline versions of min() and max() require a single ephemeral\n      ** table and 3 registers. The registers are used as follows:\n      **\n      **   regApp+0: slot to copy min()/max() argument to for MakeRecord\n      **   regApp+1: integer value used to ensure keys are unique\n      **   regApp+2: output of MakeRecord\n      */\n      ExprList *pList;\n      KeyInfo *pKeyInfo;\n      assert( ExprUseXList(pWin->pOwner) );\n      pList = pWin->pOwner->x.pList;\n      pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pList, 0, 0);\n      pWin->csrApp = pParse->nTab++;\n      pWin->regApp = pParse->nMem+1;\n      pParse->nMem += 3;\n      if( pKeyInfo && pWin->pWFunc->zName[1]=='i' ){\n        assert( pKeyInfo->aSortFlags[0]==0 );\n        pKeyInfo->aSortFlags[0] = KEYINFO_ORDER_DESC;\n      }\n      sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pWin->csrApp, 2);\n      sqlite3VdbeAppendP4(v, pKeyInfo, P4_KEYINFO);\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, pWin->regApp+1);\n    }\n    else if( p->zName==nth_valueName || p->zName==first_valueName ){\n      /* Allocate two registers at pWin->regApp. These will be used to\n      ** store the start and end index of the current frame.  */\n      pWin->regApp = pParse->nMem+1;\n      pWin->csrApp = pParse->nTab++;\n      pParse->nMem += 2;\n      sqlite3VdbeAddOp2(v, OP_OpenDup, pWin->csrApp, pMWin->iEphCsr);\n    }\n    else if( p->zName==leadName || p->zName==lagName ){\n      pWin->csrApp = pParse->nTab++;\n      sqlite3VdbeAddOp2(v, OP_OpenDup, pWin->csrApp, pMWin->iEphCsr);\n    }\n  }\n}\n\n#define WINDOW_STARTING_INT  0\n#define WINDOW_ENDING_INT    1\n#define WINDOW_NTH_VALUE_INT 2\n#define WINDOW_STARTING_NUM  3\n#define WINDOW_ENDING_NUM    4\n\n/*\n** A \"PRECEDING <expr>\" (eCond==0) or \"FOLLOWING <expr>\" (eCond==1) or the\n** value of the second argument to nth_value() (eCond==2) has just been\n** evaluated and the result left in register reg. This function generates VM\n** code to check that the value is a non-negative integer and throws an\n** exception if it is not.\n*/\nstatic void windowCheckValue(Parse *pParse, int reg, int eCond){\n  static const char *azErr[] = {\n    \"frame starting offset must be a non-negative integer\",\n    \"frame ending offset must be a non-negative integer\",\n    \"second argument to nth_value must be a positive integer\",\n    \"frame starting offset must be a non-negative number\",\n    \"frame ending offset must be a non-negative number\",\n  };\n  static int aOp[] = { OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge };\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  int regZero = sqlite3GetTempReg(pParse);\n  assert( eCond>=0 && eCond<ArraySize(azErr) );\n  sqlite3VdbeAddOp2(v, OP_Integer, 0, regZero);\n  if( eCond>=WINDOW_STARTING_NUM ){\n    int regString = sqlite3GetTempReg(pParse);\n    sqlite3VdbeAddOp4(v, OP_String8, 0, regString, 0, \"\", P4_STATIC);\n    sqlite3VdbeAddOp3(v, OP_Ge, regString, sqlite3VdbeCurrentAddr(v)+2, reg);\n    sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL);\n    VdbeCoverage(v);\n    assert( eCond==3 || eCond==4 );\n    VdbeCoverageIf(v, eCond==3);\n    VdbeCoverageIf(v, eCond==4);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_MustBeInt, reg, sqlite3VdbeCurrentAddr(v)+2);\n    VdbeCoverage(v);\n    assert( eCond==0 || eCond==1 || eCond==2 );\n    VdbeCoverageIf(v, eCond==0);\n    VdbeCoverageIf(v, eCond==1);\n    VdbeCoverageIf(v, eCond==2);\n  }\n  sqlite3VdbeAddOp3(v, aOp[eCond], regZero, sqlite3VdbeCurrentAddr(v)+2, reg);\n  sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC);\n  VdbeCoverageNeverNullIf(v, eCond==0); /* NULL case captured by */\n  VdbeCoverageNeverNullIf(v, eCond==1); /*   the OP_MustBeInt */\n  VdbeCoverageNeverNullIf(v, eCond==2);\n  VdbeCoverageNeverNullIf(v, eCond==3); /* NULL case caught by */\n  VdbeCoverageNeverNullIf(v, eCond==4); /*   the OP_Ge */\n  sqlite3MayAbort(pParse);\n  sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_ERROR, OE_Abort);\n  sqlite3VdbeAppendP4(v, (void*)azErr[eCond], P4_STATIC);\n  sqlite3ReleaseTempReg(pParse, regZero);\n}\n\n/*\n** Return the number of arguments passed to the window-function associated\n** with the object passed as the only argument to this function.\n*/\nstatic int windowArgCount(Window *pWin){\n  const ExprList *pList;\n  assert( ExprUseXList(pWin->pOwner) );\n  pList = pWin->pOwner->x.pList;\n  return (pList ? pList->nExpr : 0);\n}\n\ntypedef struct WindowCodeArg WindowCodeArg;\ntypedef struct WindowCsrAndReg WindowCsrAndReg;\n\n/*\n** See comments above struct WindowCodeArg.\n*/\nstruct WindowCsrAndReg {\n  int csr;                        /* Cursor number */\n  int reg;                        /* First in array of peer values */\n};\n\n/*\n** A single instance of this structure is allocated on the stack by\n** sqlite3WindowCodeStep() and a pointer to it passed to the various helper\n** routines. This is to reduce the number of arguments required by each\n** helper function.\n**\n** regArg:\n**   Each window function requires an accumulator register (just as an\n**   ordinary aggregate function does). This variable is set to the first\n**   in an array of accumulator registers - one for each window function\n**   in the WindowCodeArg.pMWin list.\n**\n** eDelete:\n**   The window functions implementation sometimes caches the input rows\n**   that it processes in a temporary table. If it is not zero, this\n**   variable indicates when rows may be removed from the temp table (in\n**   order to reduce memory requirements - it would always be safe just\n**   to leave them there). Possible values for eDelete are:\n**\n**      WINDOW_RETURN_ROW:\n**        An input row can be discarded after it is returned to the caller.\n**\n**      WINDOW_AGGINVERSE:\n**        An input row can be discarded after the window functions xInverse()\n**        callbacks have been invoked in it.\n**\n**      WINDOW_AGGSTEP:\n**        An input row can be discarded after the window functions xStep()\n**        callbacks have been invoked in it.\n**\n** start,current,end\n**   Consider a window-frame similar to the following:\n**\n**     (ORDER BY a, b GROUPS BETWEEN 2 PRECEDING AND 2 FOLLOWING)\n**\n**   The windows functions implementation caches the input rows in a temp\n**   table, sorted by \"a, b\" (it actually populates the cache lazily, and\n**   aggressively removes rows once they are no longer required, but that's\n**   a mere detail). It keeps three cursors open on the temp table. One\n**   (current) that points to the next row to return to the query engine\n**   once its window function values have been calculated. Another (end)\n**   points to the next row to call the xStep() method of each window function\n**   on (so that it is 2 groups ahead of current). And a third (start) that\n**   points to the next row to call the xInverse() method of each window\n**   function on.\n**\n**   Each cursor (start, current and end) consists of a VDBE cursor\n**   (WindowCsrAndReg.csr) and an array of registers (starting at\n**   WindowCodeArg.reg) that always contains a copy of the peer values\n**   read from the corresponding cursor.\n**\n**   Depending on the window-frame in question, all three cursors may not\n**   be required. In this case both WindowCodeArg.csr and reg are set to\n**   0.\n*/\nstruct WindowCodeArg {\n  Parse *pParse;             /* Parse context */\n  Window *pMWin;             /* First in list of functions being processed */\n  Vdbe *pVdbe;               /* VDBE object */\n  int addrGosub;             /* OP_Gosub to this address to return one row */\n  int regGosub;              /* Register used with OP_Gosub(addrGosub) */\n  int regArg;                /* First in array of accumulator registers */\n  int eDelete;               /* See above */\n  int regRowid;\n\n  WindowCsrAndReg start;\n  WindowCsrAndReg current;\n  WindowCsrAndReg end;\n};\n\n/*\n** Generate VM code to read the window frames peer values from cursor csr into\n** an array of registers starting at reg.\n*/\nstatic void windowReadPeerValues(\n  WindowCodeArg *p,\n  int csr,\n  int reg\n){\n  Window *pMWin = p->pMWin;\n  ExprList *pOrderBy = pMWin->pOrderBy;\n  if( pOrderBy ){\n    Vdbe *v = sqlite3GetVdbe(p->pParse);\n    ExprList *pPart = pMWin->pPartition;\n    int iColOff = pMWin->nBufferCol + (pPart ? pPart->nExpr : 0);\n    int i;\n    for(i=0; i<pOrderBy->nExpr; i++){\n      sqlite3VdbeAddOp3(v, OP_Column, csr, iColOff+i, reg+i);\n    }\n  }\n}\n\n/*\n** Generate VM code to invoke either xStep() (if bInverse is 0) or\n** xInverse (if bInverse is non-zero) for each window function in the\n** linked list starting at pMWin. Or, for built-in window functions\n** that do not use the standard function API, generate the required\n** inline VM code.\n**\n** If argument csr is greater than or equal to 0, then argument reg is\n** the first register in an array of registers guaranteed to be large\n** enough to hold the array of arguments for each function. In this case\n** the arguments are extracted from the current row of csr into the\n** array of registers before invoking OP_AggStep or OP_AggInverse\n**\n** Or, if csr is less than zero, then the array of registers at reg is\n** already populated with all columns from the current row of the sub-query.\n**\n** If argument regPartSize is non-zero, then it is a register containing the\n** number of rows in the current partition.\n*/\nstatic void windowAggStep(\n  WindowCodeArg *p,\n  Window *pMWin,                  /* Linked list of window functions */\n  int csr,                        /* Read arguments from this cursor */\n  int bInverse,                   /* True to invoke xInverse instead of xStep */\n  int reg                         /* Array of registers */\n){\n  Parse *pParse = p->pParse;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  Window *pWin;\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    FuncDef *pFunc = pWin->pWFunc;\n    int regArg;\n    int nArg = pWin->bExprArgs ? 0 : windowArgCount(pWin);\n    int i;\n    int addrIf = 0;\n\n    assert( bInverse==0 || pWin->eStart!=TK_UNBOUNDED );\n\n    /* All OVER clauses in the same window function aggregate step must\n    ** be the same. */\n    assert( pWin==pMWin || sqlite3WindowCompare(pParse,pWin,pMWin,0)!=1 );\n\n    for(i=0; i<nArg; i++){\n      if( i!=1 || pFunc->zName!=nth_valueName ){\n        sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+i, reg+i);\n      }else{\n        sqlite3VdbeAddOp3(v, OP_Column, pMWin->iEphCsr, pWin->iArgCol+i, reg+i);\n      }\n    }\n    regArg = reg;\n\n    if( pWin->pFilter ){\n      int regTmp;\n      assert( ExprUseXList(pWin->pOwner) );\n      assert( pWin->bExprArgs || !nArg ||nArg==pWin->pOwner->x.pList->nExpr );\n      assert( pWin->bExprArgs || nArg  ||pWin->pOwner->x.pList==0 );\n      regTmp = sqlite3GetTempReg(pParse);\n      sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol+nArg,regTmp);\n      addrIf = sqlite3VdbeAddOp3(v, OP_IfNot, regTmp, 0, 1);\n      VdbeCoverage(v);\n      sqlite3ReleaseTempReg(pParse, regTmp);\n    }\n\n    if( pMWin->regStartRowid==0\n     && (pFunc->funcFlags & SQLITE_FUNC_MINMAX)\n     && (pWin->eStart!=TK_UNBOUNDED)\n    ){\n      int addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regArg);\n      VdbeCoverage(v);\n      if( bInverse==0 ){\n        sqlite3VdbeAddOp2(v, OP_AddImm, pWin->regApp+1, 1);\n        sqlite3VdbeAddOp2(v, OP_SCopy, regArg, pWin->regApp);\n        sqlite3VdbeAddOp3(v, OP_MakeRecord, pWin->regApp, 2, pWin->regApp+2);\n        sqlite3VdbeAddOp2(v, OP_IdxInsert, pWin->csrApp, pWin->regApp+2);\n      }else{\n        sqlite3VdbeAddOp4Int(v, OP_SeekGE, pWin->csrApp, 0, regArg, 1);\n        VdbeCoverageNeverTaken(v);\n        sqlite3VdbeAddOp1(v, OP_Delete, pWin->csrApp);\n        sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);\n      }\n      sqlite3VdbeJumpHere(v, addrIsNull);\n    }else if( pWin->regApp ){\n      assert( pWin->pFilter==0 );\n      assert( pFunc->zName==nth_valueName\n           || pFunc->zName==first_valueName\n      );\n      assert( bInverse==0 || bInverse==1 );\n      sqlite3VdbeAddOp2(v, OP_AddImm, pWin->regApp+1-bInverse, 1);\n    }else if( pFunc->xSFunc!=noopStepFunc ){\n      if( pWin->bExprArgs ){\n        int iOp = sqlite3VdbeCurrentAddr(v);\n        int iEnd;\n\n        assert( ExprUseXList(pWin->pOwner) );\n        nArg = pWin->pOwner->x.pList->nExpr;\n        regArg = sqlite3GetTempRange(pParse, nArg);\n        sqlite3ExprCodeExprList(pParse, pWin->pOwner->x.pList, regArg, 0, 0);\n\n        for(iEnd=sqlite3VdbeCurrentAddr(v); iOp<iEnd; iOp++){\n          VdbeOp *pOp = sqlite3VdbeGetOp(v, iOp);\n          if( pOp->opcode==OP_Column && pOp->p1==pMWin->iEphCsr ){\n            pOp->p1 = csr;\n          }\n        }\n      }\n      if( pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL ){\n        CollSeq *pColl;\n        assert( nArg>0 );\n        assert( ExprUseXList(pWin->pOwner) );\n        pColl = sqlite3ExprNNCollSeq(pParse, pWin->pOwner->x.pList->a[0].pExpr);\n        sqlite3VdbeAddOp4(v, OP_CollSeq, 0,0,0, (const char*)pColl, P4_COLLSEQ);\n      }\n      sqlite3VdbeAddOp3(v, bInverse? OP_AggInverse : OP_AggStep,\n                        bInverse, regArg, pWin->regAccum);\n      sqlite3VdbeAppendP4(v, pFunc, P4_FUNCDEF);\n      sqlite3VdbeChangeP5(v, (u16)nArg);\n      if( pWin->bExprArgs ){\n        sqlite3ReleaseTempRange(pParse, regArg, nArg);\n      }\n    }\n\n    if( addrIf ) sqlite3VdbeJumpHere(v, addrIf);\n  }\n}\n\n/*\n** Values that may be passed as the second argument to windowCodeOp().\n*/\n#define WINDOW_RETURN_ROW 1\n#define WINDOW_AGGINVERSE 2\n#define WINDOW_AGGSTEP    3\n\n/*\n** Generate VM code to invoke either xValue() (bFin==0) or xFinalize()\n** (bFin==1) for each window function in the linked list starting at\n** pMWin. Or, for built-in window-functions that do not use the standard\n** API, generate the equivalent VM code.\n*/\nstatic void windowAggFinal(WindowCodeArg *p, int bFin){\n  Parse *pParse = p->pParse;\n  Window *pMWin = p->pMWin;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  Window *pWin;\n\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    if( pMWin->regStartRowid==0\n     && (pWin->pWFunc->funcFlags & SQLITE_FUNC_MINMAX)\n     && (pWin->eStart!=TK_UNBOUNDED)\n    ){\n      sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regResult);\n      sqlite3VdbeAddOp1(v, OP_Last, pWin->csrApp);\n      VdbeCoverage(v);\n      sqlite3VdbeAddOp3(v, OP_Column, pWin->csrApp, 0, pWin->regResult);\n      sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);\n    }else if( pWin->regApp ){\n      assert( pMWin->regStartRowid==0 );\n    }else{\n      int nArg = windowArgCount(pWin);\n      if( bFin ){\n        sqlite3VdbeAddOp2(v, OP_AggFinal, pWin->regAccum, nArg);\n        sqlite3VdbeAppendP4(v, pWin->pWFunc, P4_FUNCDEF);\n        sqlite3VdbeAddOp2(v, OP_Copy, pWin->regAccum, pWin->regResult);\n        sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regAccum);\n      }else{\n        sqlite3VdbeAddOp3(v, OP_AggValue,pWin->regAccum,nArg,pWin->regResult);\n        sqlite3VdbeAppendP4(v, pWin->pWFunc, P4_FUNCDEF);\n      }\n    }\n  }\n}\n\n/*\n** Generate code to calculate the current values of all window functions in the\n** p->pMWin list by doing a full scan of the current window frame. Store the\n** results in the Window.regResult registers, ready to return the upper\n** layer.\n*/\nstatic void windowFullScan(WindowCodeArg *p){\n  Window *pWin;\n  Parse *pParse = p->pParse;\n  Window *pMWin = p->pMWin;\n  Vdbe *v = p->pVdbe;\n\n  int regCRowid = 0;              /* Current rowid value */\n  int regCPeer = 0;               /* Current peer values */\n  int regRowid = 0;               /* AggStep rowid value */\n  int regPeer = 0;                /* AggStep peer values */\n\n  int nPeer;\n  int lblNext;\n  int lblBrk;\n  int addrNext;\n  int csr;\n\n  VdbeModuleComment((v, \"windowFullScan begin\"));\n\n  assert( pMWin!=0 );\n  csr = pMWin->csrApp;\n  nPeer = (pMWin->pOrderBy ? pMWin->pOrderBy->nExpr : 0);\n\n  lblNext = sqlite3VdbeMakeLabel(pParse);\n  lblBrk = sqlite3VdbeMakeLabel(pParse);\n\n  regCRowid = sqlite3GetTempReg(pParse);\n  regRowid = sqlite3GetTempReg(pParse);\n  if( nPeer ){\n    regCPeer = sqlite3GetTempRange(pParse, nPeer);\n    regPeer = sqlite3GetTempRange(pParse, nPeer);\n  }\n\n  sqlite3VdbeAddOp2(v, OP_Rowid, pMWin->iEphCsr, regCRowid);\n  windowReadPeerValues(p, pMWin->iEphCsr, regCPeer);\n\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regAccum);\n  }\n\n  sqlite3VdbeAddOp3(v, OP_SeekGE, csr, lblBrk, pMWin->regStartRowid);\n  VdbeCoverage(v);\n  addrNext = sqlite3VdbeCurrentAddr(v);\n  sqlite3VdbeAddOp2(v, OP_Rowid, csr, regRowid);\n  sqlite3VdbeAddOp3(v, OP_Gt, pMWin->regEndRowid, lblBrk, regRowid);\n  VdbeCoverageNeverNull(v);\n\n  if( pMWin->eExclude==TK_CURRENT ){\n    sqlite3VdbeAddOp3(v, OP_Eq, regCRowid, lblNext, regRowid);\n    VdbeCoverageNeverNull(v);\n  }else if( pMWin->eExclude!=TK_NO ){\n    int addr;\n    int addrEq = 0;\n    KeyInfo *pKeyInfo = 0;\n\n    if( pMWin->pOrderBy ){\n      pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pMWin->pOrderBy, 0, 0);\n    }\n    if( pMWin->eExclude==TK_TIES ){\n      addrEq = sqlite3VdbeAddOp3(v, OP_Eq, regCRowid, 0, regRowid);\n      VdbeCoverageNeverNull(v);\n    }\n    if( pKeyInfo ){\n      windowReadPeerValues(p, csr, regPeer);\n      sqlite3VdbeAddOp3(v, OP_Compare, regPeer, regCPeer, nPeer);\n      sqlite3VdbeAppendP4(v, (void*)pKeyInfo, P4_KEYINFO);\n      addr = sqlite3VdbeCurrentAddr(v)+1;\n      sqlite3VdbeAddOp3(v, OP_Jump, addr, lblNext, addr);\n      VdbeCoverageEqNe(v);\n    }else{\n      sqlite3VdbeAddOp2(v, OP_Goto, 0, lblNext);\n    }\n    if( addrEq ) sqlite3VdbeJumpHere(v, addrEq);\n  }\n\n  windowAggStep(p, pMWin, csr, 0, p->regArg);\n\n  sqlite3VdbeResolveLabel(v, lblNext);\n  sqlite3VdbeAddOp2(v, OP_Next, csr, addrNext);\n  VdbeCoverage(v);\n  sqlite3VdbeJumpHere(v, addrNext-1);\n  sqlite3VdbeJumpHere(v, addrNext+1);\n  sqlite3ReleaseTempReg(pParse, regRowid);\n  sqlite3ReleaseTempReg(pParse, regCRowid);\n  if( nPeer ){\n    sqlite3ReleaseTempRange(pParse, regPeer, nPeer);\n    sqlite3ReleaseTempRange(pParse, regCPeer, nPeer);\n  }\n\n  windowAggFinal(p, 1);\n  VdbeModuleComment((v, \"windowFullScan end\"));\n}\n\n/*\n** Invoke the sub-routine at regGosub (generated by code in select.c) to\n** return the current row of Window.iEphCsr. If all window functions are\n** aggregate window functions that use the standard API, a single\n** OP_Gosub instruction is all that this routine generates. Extra VM code\n** for per-row processing is only generated for the following built-in window\n** functions:\n**\n**   nth_value()\n**   first_value()\n**   lag()\n**   lead()\n*/\nstatic void windowReturnOneRow(WindowCodeArg *p){\n  Window *pMWin = p->pMWin;\n  Vdbe *v = p->pVdbe;\n\n  if( pMWin->regStartRowid ){\n    windowFullScan(p);\n  }else{\n    Parse *pParse = p->pParse;\n    Window *pWin;\n\n    for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n      FuncDef *pFunc = pWin->pWFunc;\n      assert( ExprUseXList(pWin->pOwner) );\n      if( pFunc->zName==nth_valueName\n       || pFunc->zName==first_valueName\n      ){\n        int csr = pWin->csrApp;\n        int lbl = sqlite3VdbeMakeLabel(pParse);\n        int tmpReg = sqlite3GetTempReg(pParse);\n        sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regResult);\n\n        if( pFunc->zName==nth_valueName ){\n          sqlite3VdbeAddOp3(v, OP_Column,pMWin->iEphCsr,pWin->iArgCol+1,tmpReg);\n          windowCheckValue(pParse, tmpReg, 2);\n        }else{\n          sqlite3VdbeAddOp2(v, OP_Integer, 1, tmpReg);\n        }\n        sqlite3VdbeAddOp3(v, OP_Add, tmpReg, pWin->regApp, tmpReg);\n        sqlite3VdbeAddOp3(v, OP_Gt, pWin->regApp+1, lbl, tmpReg);\n        VdbeCoverageNeverNull(v);\n        sqlite3VdbeAddOp3(v, OP_SeekRowid, csr, 0, tmpReg);\n        VdbeCoverageNeverTaken(v);\n        sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol, pWin->regResult);\n        sqlite3VdbeResolveLabel(v, lbl);\n        sqlite3ReleaseTempReg(pParse, tmpReg);\n      }\n      else if( pFunc->zName==leadName || pFunc->zName==lagName ){\n        int nArg = pWin->pOwner->x.pList->nExpr;\n        int csr = pWin->csrApp;\n        int lbl = sqlite3VdbeMakeLabel(pParse);\n        int tmpReg = sqlite3GetTempReg(pParse);\n        int iEph = pMWin->iEphCsr;\n\n        if( nArg<3 ){\n          sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regResult);\n        }else{\n          sqlite3VdbeAddOp3(v, OP_Column, iEph,pWin->iArgCol+2,pWin->regResult);\n        }\n        sqlite3VdbeAddOp2(v, OP_Rowid, iEph, tmpReg);\n        if( nArg<2 ){\n          int val = (pFunc->zName==leadName ? 1 : -1);\n          sqlite3VdbeAddOp2(v, OP_AddImm, tmpReg, val);\n        }else{\n          int op = (pFunc->zName==leadName ? OP_Add : OP_Subtract);\n          int tmpReg2 = sqlite3GetTempReg(pParse);\n          sqlite3VdbeAddOp3(v, OP_Column, iEph, pWin->iArgCol+1, tmpReg2);\n          sqlite3VdbeAddOp3(v, op, tmpReg2, tmpReg, tmpReg);\n          sqlite3ReleaseTempReg(pParse, tmpReg2);\n        }\n\n        sqlite3VdbeAddOp3(v, OP_SeekRowid, csr, lbl, tmpReg);\n        VdbeCoverage(v);\n        sqlite3VdbeAddOp3(v, OP_Column, csr, pWin->iArgCol, pWin->regResult);\n        sqlite3VdbeResolveLabel(v, lbl);\n        sqlite3ReleaseTempReg(pParse, tmpReg);\n      }\n    }\n  }\n  sqlite3VdbeAddOp2(v, OP_Gosub, p->regGosub, p->addrGosub);\n}\n\n/*\n** Generate code to set the accumulator register for each window function\n** in the linked list passed as the second argument to NULL. And perform\n** any equivalent initialization required by any built-in window functions\n** in the list.\n*/\nstatic int windowInitAccum(Parse *pParse, Window *pMWin){\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  int regArg;\n  int nArg = 0;\n  Window *pWin;\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    FuncDef *pFunc = pWin->pWFunc;\n    assert( pWin->regAccum );\n    sqlite3VdbeAddOp2(v, OP_Null, 0, pWin->regAccum);\n    nArg = MAX(nArg, windowArgCount(pWin));\n    if( pMWin->regStartRowid==0 ){\n      if( pFunc->zName==nth_valueName || pFunc->zName==first_valueName ){\n        sqlite3VdbeAddOp2(v, OP_Integer, 0, pWin->regApp);\n        sqlite3VdbeAddOp2(v, OP_Integer, 0, pWin->regApp+1);\n      }\n\n      if( (pFunc->funcFlags & SQLITE_FUNC_MINMAX) && pWin->csrApp ){\n        assert( pWin->eStart!=TK_UNBOUNDED );\n        sqlite3VdbeAddOp1(v, OP_ResetSorter, pWin->csrApp);\n        sqlite3VdbeAddOp2(v, OP_Integer, 0, pWin->regApp+1);\n      }\n    }\n  }\n  regArg = pParse->nMem+1;\n  pParse->nMem += nArg;\n  return regArg;\n}\n\n/*\n** Return true if the current frame should be cached in the ephemeral table,\n** even if there are no xInverse() calls required.\n*/\nstatic int windowCacheFrame(Window *pMWin){\n  Window *pWin;\n  if( pMWin->regStartRowid ) return 1;\n  for(pWin=pMWin; pWin; pWin=pWin->pNextWin){\n    FuncDef *pFunc = pWin->pWFunc;\n    if( (pFunc->zName==nth_valueName)\n     || (pFunc->zName==first_valueName)\n     || (pFunc->zName==leadName)\n     || (pFunc->zName==lagName)\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** regOld and regNew are each the first register in an array of size\n** pOrderBy->nExpr. This function generates code to compare the two\n** arrays of registers using the collation sequences and other comparison\n** parameters specified by pOrderBy.\n**\n** If the two arrays are not equal, the contents of regNew is copied to\n** regOld and control falls through. Otherwise, if the contents of the arrays\n** are equal, an OP_Goto is executed. The address of the OP_Goto is returned.\n*/\nstatic void windowIfNewPeer(\n  Parse *pParse,\n  ExprList *pOrderBy,\n  int regNew,                     /* First in array of new values */\n  int regOld,                     /* First in array of old values */\n  int addr                        /* Jump here */\n){\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  if( pOrderBy ){\n    int nVal = pOrderBy->nExpr;\n    KeyInfo *pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pOrderBy, 0, 0);\n    sqlite3VdbeAddOp3(v, OP_Compare, regOld, regNew, nVal);\n    sqlite3VdbeAppendP4(v, (void*)pKeyInfo, P4_KEYINFO);\n    sqlite3VdbeAddOp3(v, OP_Jump,\n      sqlite3VdbeCurrentAddr(v)+1, addr, sqlite3VdbeCurrentAddr(v)+1\n    );\n    VdbeCoverageEqNe(v);\n    sqlite3VdbeAddOp3(v, OP_Copy, regNew, regOld, nVal-1);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);\n  }\n}\n\n/*\n** This function is called as part of generating VM programs for RANGE\n** offset PRECEDING/FOLLOWING frame boundaries. Assuming \"ASC\" order for\n** the ORDER BY term in the window, and that argument op is OP_Ge, it generates\n** code equivalent to:\n**\n**   if( csr1.peerVal + regVal >= csr2.peerVal ) goto lbl;\n**\n** The value of parameter op may also be OP_Gt or OP_Le. In these cases the\n** operator in the above pseudo-code is replaced with \">\" or \"<=\", respectively.\n**\n** If the sort-order for the ORDER BY term in the window is DESC, then the\n** comparison is reversed. Instead of adding regVal to csr1.peerVal, it is\n** subtracted. And the comparison operator is inverted to - \">=\" becomes \"<=\",\n** \">\" becomes \"<\", and so on. So, with DESC sort order, if the argument op\n** is OP_Ge, the generated code is equivalent to:\n**\n**   if( csr1.peerVal - regVal <= csr2.peerVal ) goto lbl;\n**\n** A special type of arithmetic is used such that if csr1.peerVal is not\n** a numeric type (real or integer), then the result of the addition\n** or subtraction is a a copy of csr1.peerVal.\n*/\nstatic void windowCodeRangeTest(\n  WindowCodeArg *p,\n  int op,                         /* OP_Ge, OP_Gt, or OP_Le */\n  int csr1,                       /* Cursor number for cursor 1 */\n  int regVal,                     /* Register containing non-negative number */\n  int csr2,                       /* Cursor number for cursor 2 */\n  int lbl                         /* Jump destination if condition is true */\n){\n  Parse *pParse = p->pParse;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  ExprList *pOrderBy = p->pMWin->pOrderBy;  /* ORDER BY clause for window */\n  int reg1 = sqlite3GetTempReg(pParse);     /* Reg. for csr1.peerVal+regVal */\n  int reg2 = sqlite3GetTempReg(pParse);     /* Reg. for csr2.peerVal */\n  int regString = ++pParse->nMem;           /* Reg. for constant value '' */\n  int arith = OP_Add;                       /* OP_Add or OP_Subtract */\n  int addrGe;                               /* Jump destination */\n  int addrDone = sqlite3VdbeMakeLabel(pParse);   /* Address past OP_Ge */\n  CollSeq *pColl;\n\n  /* Read the peer-value from each cursor into a register */\n  windowReadPeerValues(p, csr1, reg1);\n  windowReadPeerValues(p, csr2, reg2);\n\n  assert( op==OP_Ge || op==OP_Gt || op==OP_Le );\n  assert( pOrderBy && pOrderBy->nExpr==1 );\n  if( pOrderBy->a[0].fg.sortFlags & KEYINFO_ORDER_DESC ){\n    switch( op ){\n      case OP_Ge: op = OP_Le; break;\n      case OP_Gt: op = OP_Lt; break;\n      default: assert( op==OP_Le ); op = OP_Ge; break;\n    }\n    arith = OP_Subtract;\n  }\n\n  VdbeModuleComment((v, \"CodeRangeTest: if( R%d %s R%d %s R%d ) goto lbl\",\n      reg1, (arith==OP_Add ? \"+\" : \"-\"), regVal,\n      ((op==OP_Ge) ? \">=\" : (op==OP_Le) ? \"<=\" : (op==OP_Gt) ? \">\" : \"<\"), reg2\n  ));\n\n  /* If the BIGNULL flag is set for the ORDER BY, then it is required to\n  ** consider NULL values to be larger than all other values, instead of\n  ** the usual smaller. The VDBE opcodes OP_Ge and so on do not handle this\n  ** (and adding that capability causes a performance regression), so\n  ** instead if the BIGNULL flag is set then cases where either reg1 or\n  ** reg2 are NULL are handled separately in the following block. The code\n  ** generated is equivalent to:\n  **\n  **   if( reg1 IS NULL ){\n  **     if( op==OP_Ge ) goto lbl;\n  **     if( op==OP_Gt && reg2 IS NOT NULL ) goto lbl;\n  **     if( op==OP_Le && reg2 IS NULL ) goto lbl;\n  **   }else if( reg2 IS NULL ){\n  **     if( op==OP_Le ) goto lbl;\n  **   }\n  **\n  ** Additionally, if either reg1 or reg2 are NULL but the jump to lbl is\n  ** not taken, control jumps over the comparison operator coded below this\n  ** block.  */\n  if( pOrderBy->a[0].fg.sortFlags & KEYINFO_ORDER_BIGNULL ){\n    /* This block runs if reg1 contains a NULL. */\n    int addr = sqlite3VdbeAddOp1(v, OP_NotNull, reg1); VdbeCoverage(v);\n    switch( op ){\n      case OP_Ge:\n        sqlite3VdbeAddOp2(v, OP_Goto, 0, lbl);\n        break;\n      case OP_Gt:\n        sqlite3VdbeAddOp2(v, OP_NotNull, reg2, lbl);\n        VdbeCoverage(v);\n        break;\n      case OP_Le:\n        sqlite3VdbeAddOp2(v, OP_IsNull, reg2, lbl);\n        VdbeCoverage(v);\n        break;\n      default: assert( op==OP_Lt ); /* no-op */ break;\n    }\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrDone);\n\n    /* This block runs if reg1 is not NULL, but reg2 is. */\n    sqlite3VdbeJumpHere(v, addr);\n    sqlite3VdbeAddOp2(v, OP_IsNull, reg2,\n                      (op==OP_Gt || op==OP_Ge) ? addrDone : lbl);\n    VdbeCoverage(v);\n  }\n\n  /* Register reg1 currently contains csr1.peerVal (the peer-value from csr1).\n  ** This block adds (or subtracts for DESC) the numeric value in regVal\n  ** from it. Or, if reg1 is not numeric (it is a NULL, a text value or a blob),\n  ** then leave reg1 as it is. In pseudo-code, this is implemented as:\n  **\n  **   if( reg1>='' ) goto addrGe;\n  **   reg1 = reg1 +/- regVal\n  **   addrGe:\n  **\n  ** Since all strings and blobs are greater-than-or-equal-to an empty string,\n  ** the add/subtract is skipped for these, as required. If reg1 is a NULL,\n  ** then the arithmetic is performed, but since adding or subtracting from\n  ** NULL is always NULL anyway, this case is handled as required too.  */\n  sqlite3VdbeAddOp4(v, OP_String8, 0, regString, 0, \"\", P4_STATIC);\n  addrGe = sqlite3VdbeAddOp3(v, OP_Ge, regString, 0, reg1);\n  VdbeCoverage(v);\n  if( (op==OP_Ge && arith==OP_Add) || (op==OP_Le && arith==OP_Subtract) ){\n    sqlite3VdbeAddOp3(v, op, reg2, lbl, reg1); VdbeCoverage(v);\n  }\n  sqlite3VdbeAddOp3(v, arith, regVal, reg1, reg1);\n  sqlite3VdbeJumpHere(v, addrGe);\n\n  /* Compare registers reg2 and reg1, taking the jump if required. Note that\n  ** control skips over this test if the BIGNULL flag is set and either\n  ** reg1 or reg2 contain a NULL value.  */\n  sqlite3VdbeAddOp3(v, op, reg2, lbl, reg1); VdbeCoverage(v);\n  pColl = sqlite3ExprNNCollSeq(pParse, pOrderBy->a[0].pExpr);\n  sqlite3VdbeAppendP4(v, (void*)pColl, P4_COLLSEQ);\n  sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);\n  sqlite3VdbeResolveLabel(v, addrDone);\n\n  assert( op==OP_Ge || op==OP_Gt || op==OP_Lt || op==OP_Le );\n  testcase(op==OP_Ge); VdbeCoverageIf(v, op==OP_Ge);\n  testcase(op==OP_Lt); VdbeCoverageIf(v, op==OP_Lt);\n  testcase(op==OP_Le); VdbeCoverageIf(v, op==OP_Le);\n  testcase(op==OP_Gt); VdbeCoverageIf(v, op==OP_Gt);\n  sqlite3ReleaseTempReg(pParse, reg1);\n  sqlite3ReleaseTempReg(pParse, reg2);\n\n  VdbeModuleComment((v, \"CodeRangeTest: end\"));\n}\n\n/*\n** Helper function for sqlite3WindowCodeStep(). Each call to this function\n** generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE\n** operation. Refer to the header comment for sqlite3WindowCodeStep() for\n** details.\n*/\nstatic int windowCodeOp(\n WindowCodeArg *p,                /* Context object */\n int op,                          /* WINDOW_RETURN_ROW, AGGSTEP or AGGINVERSE */\n int regCountdown,                /* Register for OP_IfPos countdown */\n int jumpOnEof                    /* Jump here if stepped cursor reaches EOF */\n){\n  int csr, reg;\n  Parse *pParse = p->pParse;\n  Window *pMWin = p->pMWin;\n  int ret = 0;\n  Vdbe *v = p->pVdbe;\n  int addrContinue = 0;\n  int bPeer = (pMWin->eFrmType!=TK_ROWS);\n\n  int lblDone = sqlite3VdbeMakeLabel(pParse);\n  int addrNextRange = 0;\n\n  /* Special case - WINDOW_AGGINVERSE is always a no-op if the frame\n  ** starts with UNBOUNDED PRECEDING. */\n  if( op==WINDOW_AGGINVERSE && pMWin->eStart==TK_UNBOUNDED ){\n    assert( regCountdown==0 && jumpOnEof==0 );\n    return 0;\n  }\n\n  if( regCountdown>0 ){\n    if( pMWin->eFrmType==TK_RANGE ){\n      addrNextRange = sqlite3VdbeCurrentAddr(v);\n      assert( op==WINDOW_AGGINVERSE || op==WINDOW_AGGSTEP );\n      if( op==WINDOW_AGGINVERSE ){\n        if( pMWin->eStart==TK_FOLLOWING ){\n          windowCodeRangeTest(\n              p, OP_Le, p->current.csr, regCountdown, p->start.csr, lblDone\n          );\n        }else{\n          windowCodeRangeTest(\n              p, OP_Ge, p->start.csr, regCountdown, p->current.csr, lblDone\n          );\n        }\n      }else{\n        windowCodeRangeTest(\n            p, OP_Gt, p->end.csr, regCountdown, p->current.csr, lblDone\n        );\n      }\n    }else{\n      sqlite3VdbeAddOp3(v, OP_IfPos, regCountdown, lblDone, 1);\n      VdbeCoverage(v);\n    }\n  }\n\n  if( op==WINDOW_RETURN_ROW && pMWin->regStartRowid==0 ){\n    windowAggFinal(p, 0);\n  }\n  addrContinue = sqlite3VdbeCurrentAddr(v);\n\n  /* If this is a (RANGE BETWEEN a FOLLOWING AND b FOLLOWING) or\n  ** (RANGE BETWEEN b PRECEDING AND a PRECEDING) frame, ensure the\n  ** start cursor does not advance past the end cursor within the\n  ** temporary table. It otherwise might, if (a>b). Also ensure that,\n  ** if the input cursor is still finding new rows, that the end\n  ** cursor does not go past it to EOF. */\n  if( pMWin->eStart==pMWin->eEnd && regCountdown\n   && pMWin->eFrmType==TK_RANGE\n  ){\n    int regRowid1 = sqlite3GetTempReg(pParse);\n    int regRowid2 = sqlite3GetTempReg(pParse);\n    if( op==WINDOW_AGGINVERSE ){\n      sqlite3VdbeAddOp2(v, OP_Rowid, p->start.csr, regRowid1);\n      sqlite3VdbeAddOp2(v, OP_Rowid, p->end.csr, regRowid2);\n      sqlite3VdbeAddOp3(v, OP_Ge, regRowid2, lblDone, regRowid1);\n      VdbeCoverage(v);\n    }else if( p->regRowid ){\n      sqlite3VdbeAddOp2(v, OP_Rowid, p->end.csr, regRowid1);\n      sqlite3VdbeAddOp3(v, OP_Ge, p->regRowid, lblDone, regRowid1);\n      VdbeCoverageNeverNull(v);\n    }\n    sqlite3ReleaseTempReg(pParse, regRowid1);\n    sqlite3ReleaseTempReg(pParse, regRowid2);\n    assert( pMWin->eStart==TK_PRECEDING || pMWin->eStart==TK_FOLLOWING );\n  }\n\n  switch( op ){\n    case WINDOW_RETURN_ROW:\n      csr = p->current.csr;\n      reg = p->current.reg;\n      windowReturnOneRow(p);\n      break;\n\n    case WINDOW_AGGINVERSE:\n      csr = p->start.csr;\n      reg = p->start.reg;\n      if( pMWin->regStartRowid ){\n        assert( pMWin->regEndRowid );\n        sqlite3VdbeAddOp2(v, OP_AddImm, pMWin->regStartRowid, 1);\n      }else{\n        windowAggStep(p, pMWin, csr, 1, p->regArg);\n      }\n      break;\n\n    default:\n      assert( op==WINDOW_AGGSTEP );\n      csr = p->end.csr;\n      reg = p->end.reg;\n      if( pMWin->regStartRowid ){\n        assert( pMWin->regEndRowid );\n        sqlite3VdbeAddOp2(v, OP_AddImm, pMWin->regEndRowid, 1);\n      }else{\n        windowAggStep(p, pMWin, csr, 0, p->regArg);\n      }\n      break;\n  }\n\n  if( op==p->eDelete ){\n    sqlite3VdbeAddOp1(v, OP_Delete, csr);\n    sqlite3VdbeChangeP5(v, OPFLAG_SAVEPOSITION);\n  }\n\n  if( jumpOnEof ){\n    sqlite3VdbeAddOp2(v, OP_Next, csr, sqlite3VdbeCurrentAddr(v)+2);\n    VdbeCoverage(v);\n    ret = sqlite3VdbeAddOp0(v, OP_Goto);\n  }else{\n    sqlite3VdbeAddOp2(v, OP_Next, csr, sqlite3VdbeCurrentAddr(v)+1+bPeer);\n    VdbeCoverage(v);\n    if( bPeer ){\n      sqlite3VdbeAddOp2(v, OP_Goto, 0, lblDone);\n    }\n  }\n\n  if( bPeer ){\n    int nReg = (pMWin->pOrderBy ? pMWin->pOrderBy->nExpr : 0);\n    int regTmp = (nReg ? sqlite3GetTempRange(pParse, nReg) : 0);\n    windowReadPeerValues(p, csr, regTmp);\n    windowIfNewPeer(pParse, pMWin->pOrderBy, regTmp, reg, addrContinue);\n    sqlite3ReleaseTempRange(pParse, regTmp, nReg);\n  }\n\n  if( addrNextRange ){\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNextRange);\n  }\n  sqlite3VdbeResolveLabel(v, lblDone);\n  return ret;\n}\n\n\n/*\n** Allocate and return a duplicate of the Window object indicated by the\n** third argument. Set the Window.pOwner field of the new object to\n** pOwner.\n*/\nSQLITE_PRIVATE Window *sqlite3WindowDup(sqlite3 *db, Expr *pOwner, Window *p){\n  Window *pNew = 0;\n  if( ALWAYS(p) ){\n    pNew = sqlite3DbMallocZero(db, sizeof(Window));\n    if( pNew ){\n      pNew->zName = sqlite3DbStrDup(db, p->zName);\n      pNew->zBase = sqlite3DbStrDup(db, p->zBase);\n      pNew->pFilter = sqlite3ExprDup(db, p->pFilter, 0);\n      pNew->pWFunc = p->pWFunc;\n      pNew->pPartition = sqlite3ExprListDup(db, p->pPartition, 0);\n      pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, 0);\n      pNew->eFrmType = p->eFrmType;\n      pNew->eEnd = p->eEnd;\n      pNew->eStart = p->eStart;\n      pNew->eExclude = p->eExclude;\n      pNew->regResult = p->regResult;\n      pNew->regAccum = p->regAccum;\n      pNew->iArgCol = p->iArgCol;\n      pNew->iEphCsr = p->iEphCsr;\n      pNew->bExprArgs = p->bExprArgs;\n      pNew->pStart = sqlite3ExprDup(db, p->pStart, 0);\n      pNew->pEnd = sqlite3ExprDup(db, p->pEnd, 0);\n      pNew->pOwner = pOwner;\n      pNew->bImplicitFrame = p->bImplicitFrame;\n    }\n  }\n  return pNew;\n}\n\n/*\n** Return a copy of the linked list of Window objects passed as the\n** second argument.\n*/\nSQLITE_PRIVATE Window *sqlite3WindowListDup(sqlite3 *db, Window *p){\n  Window *pWin;\n  Window *pRet = 0;\n  Window **pp = &pRet;\n\n  for(pWin=p; pWin; pWin=pWin->pNextWin){\n    *pp = sqlite3WindowDup(db, 0, pWin);\n    if( *pp==0 ) break;\n    pp = &((*pp)->pNextWin);\n  }\n\n  return pRet;\n}\n\n/*\n** Return true if it can be determined at compile time that expression\n** pExpr evaluates to a value that, when cast to an integer, is greater\n** than zero. False otherwise.\n**\n** If an OOM error occurs, this function sets the Parse.db.mallocFailed\n** flag and returns zero.\n*/\nstatic int windowExprGtZero(Parse *pParse, Expr *pExpr){\n  int ret = 0;\n  sqlite3 *db = pParse->db;\n  sqlite3_value *pVal = 0;\n  sqlite3ValueFromExpr(db, pExpr, db->enc, SQLITE_AFF_NUMERIC, &pVal);\n  if( pVal && sqlite3_value_int(pVal)>0 ){\n    ret = 1;\n  }\n  sqlite3ValueFree(pVal);\n  return ret;\n}\n\n/*\n** sqlite3WhereBegin() has already been called for the SELECT statement\n** passed as the second argument when this function is invoked. It generates\n** code to populate the Window.regResult register for each window function\n** and invoke the sub-routine at instruction addrGosub once for each row.\n** sqlite3WhereEnd() is always called before returning.\n**\n** This function handles several different types of window frames, which\n** require slightly different processing. The following pseudo code is\n** used to implement window frames of the form:\n**\n**   ROWS BETWEEN <expr1> PRECEDING AND <expr2> FOLLOWING\n**\n** Other window frame types use variants of the following:\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**       if( new partition ){\n**         Gosub flush\n**       }\n**       Insert new row into eph table.\n**\n**       if( first row of partition ){\n**         // Rewind three cursors, all open on the eph table.\n**         Rewind(csrEnd);\n**         Rewind(csrStart);\n**         Rewind(csrCurrent);\n**\n**         regEnd = <expr2>          // FOLLOWING expression\n**         regStart = <expr1>        // PRECEDING expression\n**       }else{\n**         // First time this branch is taken, the eph table contains two\n**         // rows. The first row in the partition, which all three cursors\n**         // currently point to, and the following row.\n**         AGGSTEP\n**         if( (regEnd--)<=0 ){\n**           RETURN_ROW\n**           if( (regStart--)<=0 ){\n**             AGGINVERSE\n**           }\n**         }\n**       }\n**     }\n**     flush:\n**       AGGSTEP\n**       while( 1 ){\n**         RETURN ROW\n**         if( csrCurrent is EOF ) break;\n**         if( (regStart--)<=0 ){\n**           AggInverse(csrStart)\n**           Next(csrStart)\n**         }\n**       }\n**\n** The pseudo-code above uses the following shorthand:\n**\n**   AGGSTEP:    invoke the aggregate xStep() function for each window function\n**               with arguments read from the current row of cursor csrEnd, then\n**               step cursor csrEnd forward one row (i.e. sqlite3BtreeNext()).\n**\n**   RETURN_ROW: return a row to the caller based on the contents of the\n**               current row of csrCurrent and the current state of all\n**               aggregates. Then step cursor csrCurrent forward one row.\n**\n**   AGGINVERSE: invoke the aggregate xInverse() function for each window\n**               functions with arguments read from the current row of cursor\n**               csrStart. Then step csrStart forward one row.\n**\n** There are two other ROWS window frames that are handled significantly\n** differently from the above - \"BETWEEN <expr> PRECEDING AND <expr> PRECEDING\"\n** and \"BETWEEN <expr> FOLLOWING AND <expr> FOLLOWING\". These are special\n** cases because they change the order in which the three cursors (csrStart,\n** csrCurrent and csrEnd) iterate through the ephemeral table. Cases that\n** use UNBOUNDED or CURRENT ROW are much simpler variations on one of these\n** three.\n**\n**   ROWS BETWEEN <expr1> PRECEDING AND <expr2> PRECEDING\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**       if( new partition ){\n**         Gosub flush\n**       }\n**       Insert new row into eph table.\n**       if( first row of partition ){\n**         Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**         regEnd = <expr2>\n**         regStart = <expr1>\n**       }else{\n**         if( (regEnd--)<=0 ){\n**           AGGSTEP\n**         }\n**         RETURN_ROW\n**         if( (regStart--)<=0 ){\n**           AGGINVERSE\n**         }\n**       }\n**     }\n**     flush:\n**       if( (regEnd--)<=0 ){\n**         AGGSTEP\n**       }\n**       RETURN_ROW\n**\n**\n**   ROWS BETWEEN <expr1> FOLLOWING AND <expr2> FOLLOWING\n**\n**   ... loop started by sqlite3WhereBegin() ...\n**     if( new partition ){\n**       Gosub flush\n**     }\n**     Insert new row into eph table.\n**     if( first row of partition ){\n**       Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**       regEnd = <expr2>\n**       regStart = regEnd - <expr1>\n**     }else{\n**       AGGSTEP\n**       if( (regEnd--)<=0 ){\n**         RETURN_ROW\n**       }\n**       if( (regStart--)<=0 ){\n**         AGGINVERSE\n**       }\n**     }\n**   }\n**   flush:\n**     AGGSTEP\n**     while( 1 ){\n**       if( (regEnd--)<=0 ){\n**         RETURN_ROW\n**         if( eof ) break;\n**       }\n**       if( (regStart--)<=0 ){\n**         AGGINVERSE\n**         if( eof ) break\n**       }\n**     }\n**     while( !eof csrCurrent ){\n**       RETURN_ROW\n**     }\n**\n** For the most part, the patterns above are adapted to support UNBOUNDED by\n** assuming that it is equivalent to \"infinity PRECEDING/FOLLOWING\" and\n** CURRENT ROW by assuming that it is equivalent to \"0 PRECEDING/FOLLOWING\".\n** This is optimized of course - branches that will never be taken and\n** conditions that are always true are omitted from the VM code. The only\n** exceptional case is:\n**\n**   ROWS BETWEEN <expr1> FOLLOWING AND UNBOUNDED FOLLOWING\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**     if( new partition ){\n**       Gosub flush\n**     }\n**     Insert new row into eph table.\n**     if( first row of partition ){\n**       Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**       regStart = <expr1>\n**     }else{\n**       AGGSTEP\n**     }\n**   }\n**   flush:\n**     AGGSTEP\n**     while( 1 ){\n**       if( (regStart--)<=0 ){\n**         AGGINVERSE\n**         if( eof ) break\n**       }\n**       RETURN_ROW\n**     }\n**     while( !eof csrCurrent ){\n**       RETURN_ROW\n**     }\n**\n** Also requiring special handling are the cases:\n**\n**   ROWS BETWEEN <expr1> PRECEDING AND <expr2> PRECEDING\n**   ROWS BETWEEN <expr1> FOLLOWING AND <expr2> FOLLOWING\n**\n** when (expr1 < expr2). This is detected at runtime, not by this function.\n** To handle this case, the pseudo-code programs depicted above are modified\n** slightly to be:\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**     if( new partition ){\n**       Gosub flush\n**     }\n**     Insert new row into eph table.\n**     if( first row of partition ){\n**       Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**       regEnd = <expr2>\n**       regStart = <expr1>\n**       if( regEnd < regStart ){\n**         RETURN_ROW\n**         delete eph table contents\n**         continue\n**       }\n**     ...\n**\n** The new \"continue\" statement in the above jumps to the next iteration\n** of the outer loop - the one started by sqlite3WhereBegin().\n**\n** The various GROUPS cases are implemented using the same patterns as\n** ROWS. The VM code is modified slightly so that:\n**\n**   1. The else branch in the main loop is only taken if the row just\n**      added to the ephemeral table is the start of a new group. In\n**      other words, it becomes:\n**\n**         ... loop started by sqlite3WhereBegin() ...\n**         if( new partition ){\n**           Gosub flush\n**         }\n**         Insert new row into eph table.\n**         if( first row of partition ){\n**           Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**           regEnd = <expr2>\n**           regStart = <expr1>\n**         }else if( new group ){\n**           ...\n**         }\n**       }\n**\n**   2. Instead of processing a single row, each RETURN_ROW, AGGSTEP or\n**      AGGINVERSE step processes the current row of the relevant cursor and\n**      all subsequent rows belonging to the same group.\n**\n** RANGE window frames are a little different again. As for GROUPS, the\n** main loop runs once per group only. And RETURN_ROW, AGGSTEP and AGGINVERSE\n** deal in groups instead of rows. As for ROWS and GROUPS, there are three\n** basic cases:\n**\n**   RANGE BETWEEN <expr1> PRECEDING AND <expr2> FOLLOWING\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**       if( new partition ){\n**         Gosub flush\n**       }\n**       Insert new row into eph table.\n**       if( first row of partition ){\n**         Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**         regEnd = <expr2>\n**         regStart = <expr1>\n**       }else{\n**         AGGSTEP\n**         while( (csrCurrent.key + regEnd) < csrEnd.key ){\n**           RETURN_ROW\n**           while( csrStart.key + regStart) < csrCurrent.key ){\n**             AGGINVERSE\n**           }\n**         }\n**       }\n**     }\n**     flush:\n**       AGGSTEP\n**       while( 1 ){\n**         RETURN ROW\n**         if( csrCurrent is EOF ) break;\n**           while( csrStart.key + regStart) < csrCurrent.key ){\n**             AGGINVERSE\n**           }\n**         }\n**       }\n**\n** In the above notation, \"csr.key\" means the current value of the ORDER BY\n** expression (there is only ever 1 for a RANGE that uses an <expr> FOLLOWING\n** or <expr PRECEDING) read from cursor csr.\n**\n**   RANGE BETWEEN <expr1> PRECEDING AND <expr2> PRECEDING\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**       if( new partition ){\n**         Gosub flush\n**       }\n**       Insert new row into eph table.\n**       if( first row of partition ){\n**         Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**         regEnd = <expr2>\n**         regStart = <expr1>\n**       }else{\n**         while( (csrEnd.key + regEnd) <= csrCurrent.key ){\n**           AGGSTEP\n**         }\n**         while( (csrStart.key + regStart) < csrCurrent.key ){\n**           AGGINVERSE\n**         }\n**         RETURN_ROW\n**       }\n**     }\n**     flush:\n**       while( (csrEnd.key + regEnd) <= csrCurrent.key ){\n**         AGGSTEP\n**       }\n**       while( (csrStart.key + regStart) < csrCurrent.key ){\n**         AGGINVERSE\n**       }\n**       RETURN_ROW\n**\n**   RANGE BETWEEN <expr1> FOLLOWING AND <expr2> FOLLOWING\n**\n**     ... loop started by sqlite3WhereBegin() ...\n**       if( new partition ){\n**         Gosub flush\n**       }\n**       Insert new row into eph table.\n**       if( first row of partition ){\n**         Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent)\n**         regEnd = <expr2>\n**         regStart = <expr1>\n**       }else{\n**         AGGSTEP\n**         while( (csrCurrent.key + regEnd) < csrEnd.key ){\n**           while( (csrCurrent.key + regStart) > csrStart.key ){\n**             AGGINVERSE\n**           }\n**           RETURN_ROW\n**         }\n**       }\n**     }\n**     flush:\n**       AGGSTEP\n**       while( 1 ){\n**         while( (csrCurrent.key + regStart) > csrStart.key ){\n**           AGGINVERSE\n**           if( eof ) break \"while( 1 )\" loop.\n**         }\n**         RETURN_ROW\n**       }\n**       while( !eof csrCurrent ){\n**         RETURN_ROW\n**       }\n**\n** The text above leaves out many details. Refer to the code and comments\n** below for a more complete picture.\n*/\nSQLITE_PRIVATE void sqlite3WindowCodeStep(\n  Parse *pParse,                  /* Parse context */\n  Select *p,                      /* Rewritten SELECT statement */\n  WhereInfo *pWInfo,              /* Context returned by sqlite3WhereBegin() */\n  int regGosub,                   /* Register for OP_Gosub */\n  int addrGosub                   /* OP_Gosub here to return each row */\n){\n  Window *pMWin = p->pWin;\n  ExprList *pOrderBy = pMWin->pOrderBy;\n  Vdbe *v = sqlite3GetVdbe(pParse);\n  int csrWrite;                   /* Cursor used to write to eph. table */\n  int csrInput = p->pSrc->a[0].iCursor;     /* Cursor of sub-select */\n  int nInput = p->pSrc->a[0].pSTab->nCol;   /* Number of cols returned by sub */\n  int iInput;                               /* To iterate through sub cols */\n  int addrNe;                     /* Address of OP_Ne */\n  int addrGosubFlush = 0;         /* Address of OP_Gosub to flush: */\n  int addrInteger = 0;            /* Address of OP_Integer */\n  int addrEmpty;                  /* Address of OP_Rewind in flush: */\n  int regNew;                     /* Array of registers holding new input row */\n  int regRecord;                  /* regNew array in record form */\n  int regNewPeer = 0;             /* Peer values for new row (part of regNew) */\n  int regPeer = 0;                /* Peer values for current row */\n  int regFlushPart = 0;           /* Register for \"Gosub flush_partition\" */\n  WindowCodeArg s;                /* Context object for sub-routines */\n  int lblWhereEnd;                /* Label just before sqlite3WhereEnd() code */\n  int regStart = 0;               /* Value of <expr> PRECEDING */\n  int regEnd = 0;                 /* Value of <expr> FOLLOWING */\n\n  assert( pMWin->eStart==TK_PRECEDING || pMWin->eStart==TK_CURRENT\n       || pMWin->eStart==TK_FOLLOWING || pMWin->eStart==TK_UNBOUNDED\n  );\n  assert( pMWin->eEnd==TK_FOLLOWING || pMWin->eEnd==TK_CURRENT\n       || pMWin->eEnd==TK_UNBOUNDED || pMWin->eEnd==TK_PRECEDING\n  );\n  assert( pMWin->eExclude==0 || pMWin->eExclude==TK_CURRENT\n       || pMWin->eExclude==TK_GROUP || pMWin->eExclude==TK_TIES\n       || pMWin->eExclude==TK_NO\n  );\n\n  lblWhereEnd = sqlite3VdbeMakeLabel(pParse);\n\n  /* Fill in the context object */\n  memset(&s, 0, sizeof(WindowCodeArg));\n  s.pParse = pParse;\n  s.pMWin = pMWin;\n  s.pVdbe = v;\n  s.regGosub = regGosub;\n  s.addrGosub = addrGosub;\n  s.current.csr = pMWin->iEphCsr;\n  csrWrite = s.current.csr+1;\n  s.start.csr = s.current.csr+2;\n  s.end.csr = s.current.csr+3;\n\n  /* Figure out when rows may be deleted from the ephemeral table. There\n  ** are four options - they may never be deleted (eDelete==0), they may\n  ** be deleted as soon as they are no longer part of the window frame\n  ** (eDelete==WINDOW_AGGINVERSE), they may be deleted as after the row\n  ** has been returned to the caller (WINDOW_RETURN_ROW), or they may\n  ** be deleted after they enter the frame (WINDOW_AGGSTEP). */\n  switch( pMWin->eStart ){\n    case TK_FOLLOWING:\n      if( pMWin->eFrmType!=TK_RANGE\n       && windowExprGtZero(pParse, pMWin->pStart)\n      ){\n        s.eDelete = WINDOW_RETURN_ROW;\n      }\n      break;\n    case TK_UNBOUNDED:\n      if( windowCacheFrame(pMWin)==0 ){\n        if( pMWin->eEnd==TK_PRECEDING ){\n          if( pMWin->eFrmType!=TK_RANGE\n           && windowExprGtZero(pParse, pMWin->pEnd)\n          ){\n            s.eDelete = WINDOW_AGGSTEP;\n          }\n        }else{\n          s.eDelete = WINDOW_RETURN_ROW;\n        }\n      }\n      break;\n    default:\n      s.eDelete = WINDOW_AGGINVERSE;\n      break;\n  }\n\n  /* Allocate registers for the array of values from the sub-query, the\n  ** same values in record form, and the rowid used to insert said record\n  ** into the ephemeral table.  */\n  regNew = pParse->nMem+1;\n  pParse->nMem += nInput;\n  regRecord = ++pParse->nMem;\n  s.regRowid = ++pParse->nMem;\n\n  /* If the window frame contains an \"<expr> PRECEDING\" or \"<expr> FOLLOWING\"\n  ** clause, allocate registers to store the results of evaluating each\n  ** <expr>.  */\n  if( pMWin->eStart==TK_PRECEDING || pMWin->eStart==TK_FOLLOWING ){\n    regStart = ++pParse->nMem;\n  }\n  if( pMWin->eEnd==TK_PRECEDING || pMWin->eEnd==TK_FOLLOWING ){\n    regEnd = ++pParse->nMem;\n  }\n\n  /* If this is not a \"ROWS BETWEEN ...\" frame, then allocate arrays of\n  ** registers to store copies of the ORDER BY expressions (peer values)\n  ** for the main loop, and for each cursor (start, current and end). */\n  if( pMWin->eFrmType!=TK_ROWS ){\n    int nPeer = (pOrderBy ? pOrderBy->nExpr : 0);\n    regNewPeer = regNew + pMWin->nBufferCol;\n    if( pMWin->pPartition ) regNewPeer += pMWin->pPartition->nExpr;\n    regPeer = pParse->nMem+1;       pParse->nMem += nPeer;\n    s.start.reg = pParse->nMem+1;   pParse->nMem += nPeer;\n    s.current.reg = pParse->nMem+1; pParse->nMem += nPeer;\n    s.end.reg = pParse->nMem+1;     pParse->nMem += nPeer;\n  }\n\n  /* Load the column values for the row returned by the sub-select\n  ** into an array of registers starting at regNew. Assemble them into\n  ** a record in register regRecord. */\n  for(iInput=0; iInput<nInput; iInput++){\n    sqlite3VdbeAddOp3(v, OP_Column, csrInput, iInput, regNew+iInput);\n  }\n  sqlite3VdbeAddOp3(v, OP_MakeRecord, regNew, nInput, regRecord);\n\n  /* An input row has just been read into an array of registers starting\n  ** at regNew. If the window has a PARTITION clause, this block generates\n  ** VM code to check if the input row is the start of a new partition.\n  ** If so, it does an OP_Gosub to an address to be filled in later. The\n  ** address of the OP_Gosub is stored in local variable addrGosubFlush. */\n  if( pMWin->pPartition ){\n    int addr;\n    ExprList *pPart = pMWin->pPartition;\n    int nPart = pPart->nExpr;\n    int regNewPart = regNew + pMWin->nBufferCol;\n    KeyInfo *pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pPart, 0, 0);\n\n    regFlushPart = ++pParse->nMem;\n    addr = sqlite3VdbeAddOp3(v, OP_Compare, regNewPart, pMWin->regPart, nPart);\n    sqlite3VdbeAppendP4(v, (void*)pKeyInfo, P4_KEYINFO);\n    sqlite3VdbeAddOp3(v, OP_Jump, addr+2, addr+4, addr+2);\n    VdbeCoverageEqNe(v);\n    addrGosubFlush = sqlite3VdbeAddOp1(v, OP_Gosub, regFlushPart);\n    VdbeComment((v, \"call flush_partition\"));\n    sqlite3VdbeAddOp3(v, OP_Copy, regNewPart, pMWin->regPart, nPart-1);\n  }\n\n  /* Insert the new row into the ephemeral table */\n  sqlite3VdbeAddOp2(v, OP_NewRowid, csrWrite, s.regRowid);\n  sqlite3VdbeAddOp3(v, OP_Insert, csrWrite, regRecord, s.regRowid);\n  addrNe = sqlite3VdbeAddOp3(v, OP_Ne, pMWin->regOne, 0, s.regRowid);\n  VdbeCoverageNeverNull(v);\n\n  /* This block is run for the first row of each partition */\n  s.regArg = windowInitAccum(pParse, pMWin);\n\n  if( regStart ){\n    sqlite3ExprCode(pParse, pMWin->pStart, regStart);\n    windowCheckValue(pParse, regStart, 0 + (pMWin->eFrmType==TK_RANGE?3:0));\n  }\n  if( regEnd ){\n    sqlite3ExprCode(pParse, pMWin->pEnd, regEnd);\n    windowCheckValue(pParse, regEnd, 1 + (pMWin->eFrmType==TK_RANGE?3:0));\n  }\n\n  if( pMWin->eFrmType!=TK_RANGE && pMWin->eStart==pMWin->eEnd && regStart ){\n    int op = ((pMWin->eStart==TK_FOLLOWING) ? OP_Ge : OP_Le);\n    int addrGe = sqlite3VdbeAddOp3(v, op, regStart, 0, regEnd);\n    VdbeCoverageNeverNullIf(v, op==OP_Ge); /* NeverNull because bound <expr> */\n    VdbeCoverageNeverNullIf(v, op==OP_Le); /*   values previously checked */\n    windowAggFinal(&s, 0);\n    sqlite3VdbeAddOp1(v, OP_Rewind, s.current.csr);\n    windowReturnOneRow(&s);\n    sqlite3VdbeAddOp1(v, OP_ResetSorter, s.current.csr);\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, lblWhereEnd);\n    sqlite3VdbeJumpHere(v, addrGe);\n  }\n  if( pMWin->eStart==TK_FOLLOWING && pMWin->eFrmType!=TK_RANGE && regEnd ){\n    assert( pMWin->eEnd==TK_FOLLOWING );\n    sqlite3VdbeAddOp3(v, OP_Subtract, regStart, regEnd, regStart);\n  }\n\n  if( pMWin->eStart!=TK_UNBOUNDED ){\n    sqlite3VdbeAddOp1(v, OP_Rewind, s.start.csr);\n  }\n  sqlite3VdbeAddOp1(v, OP_Rewind, s.current.csr);\n  sqlite3VdbeAddOp1(v, OP_Rewind, s.end.csr);\n  if( regPeer && pOrderBy ){\n    sqlite3VdbeAddOp3(v, OP_Copy, regNewPeer, regPeer, pOrderBy->nExpr-1);\n    sqlite3VdbeAddOp3(v, OP_Copy, regPeer, s.start.reg, pOrderBy->nExpr-1);\n    sqlite3VdbeAddOp3(v, OP_Copy, regPeer, s.current.reg, pOrderBy->nExpr-1);\n    sqlite3VdbeAddOp3(v, OP_Copy, regPeer, s.end.reg, pOrderBy->nExpr-1);\n  }\n\n  sqlite3VdbeAddOp2(v, OP_Goto, 0, lblWhereEnd);\n\n  sqlite3VdbeJumpHere(v, addrNe);\n\n  /* Beginning of the block executed for the second and subsequent rows. */\n  if( regPeer ){\n    windowIfNewPeer(pParse, pOrderBy, regNewPeer, regPeer, lblWhereEnd);\n  }\n  if( pMWin->eStart==TK_FOLLOWING ){\n    windowCodeOp(&s, WINDOW_AGGSTEP, 0, 0);\n    if( pMWin->eEnd!=TK_UNBOUNDED ){\n      if( pMWin->eFrmType==TK_RANGE ){\n        int lbl = sqlite3VdbeMakeLabel(pParse);\n        int addrNext = sqlite3VdbeCurrentAddr(v);\n        windowCodeRangeTest(&s, OP_Ge, s.current.csr, regEnd, s.end.csr, lbl);\n        windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n        windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 0);\n        sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext);\n        sqlite3VdbeResolveLabel(v, lbl);\n      }else{\n        windowCodeOp(&s, WINDOW_RETURN_ROW, regEnd, 0);\n        windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n      }\n    }\n  }else\n  if( pMWin->eEnd==TK_PRECEDING ){\n    int bRPS = (pMWin->eStart==TK_PRECEDING && pMWin->eFrmType==TK_RANGE);\n    windowCodeOp(&s, WINDOW_AGGSTEP, regEnd, 0);\n    if( bRPS ) windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n    windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 0);\n    if( !bRPS ) windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n  }else{\n    int addr = 0;\n    windowCodeOp(&s, WINDOW_AGGSTEP, 0, 0);\n    if( pMWin->eEnd!=TK_UNBOUNDED ){\n      if( pMWin->eFrmType==TK_RANGE ){\n        int lbl = 0;\n        addr = sqlite3VdbeCurrentAddr(v);\n        if( regEnd ){\n          lbl = sqlite3VdbeMakeLabel(pParse);\n          windowCodeRangeTest(&s, OP_Ge, s.current.csr, regEnd, s.end.csr, lbl);\n        }\n        windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 0);\n        windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n        if( regEnd ){\n          sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);\n          sqlite3VdbeResolveLabel(v, lbl);\n        }\n      }else{\n        if( regEnd ){\n          addr = sqlite3VdbeAddOp3(v, OP_IfPos, regEnd, 0, 1);\n          VdbeCoverage(v);\n        }\n        windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 0);\n        windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n        if( regEnd ) sqlite3VdbeJumpHere(v, addr);\n      }\n    }\n  }\n\n  /* End of the main input loop */\n  sqlite3VdbeResolveLabel(v, lblWhereEnd);\n  sqlite3WhereEnd(pWInfo);\n\n  /* Fall through */\n  if( pMWin->pPartition ){\n    addrInteger = sqlite3VdbeAddOp2(v, OP_Integer, 0, regFlushPart);\n    sqlite3VdbeJumpHere(v, addrGosubFlush);\n  }\n\n  s.regRowid = 0;\n  addrEmpty = sqlite3VdbeAddOp1(v, OP_Rewind, csrWrite);\n  VdbeCoverage(v);\n  if( pMWin->eEnd==TK_PRECEDING ){\n    int bRPS = (pMWin->eStart==TK_PRECEDING && pMWin->eFrmType==TK_RANGE);\n    windowCodeOp(&s, WINDOW_AGGSTEP, regEnd, 0);\n    if( bRPS ) windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n    windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 0);\n  }else if( pMWin->eStart==TK_FOLLOWING ){\n    int addrStart;\n    int addrBreak1;\n    int addrBreak2;\n    int addrBreak3;\n    windowCodeOp(&s, WINDOW_AGGSTEP, 0, 0);\n    if( pMWin->eFrmType==TK_RANGE ){\n      addrStart = sqlite3VdbeCurrentAddr(v);\n      addrBreak2 = windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 1);\n      addrBreak1 = windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 1);\n    }else\n    if( pMWin->eEnd==TK_UNBOUNDED ){\n      addrStart = sqlite3VdbeCurrentAddr(v);\n      addrBreak1 = windowCodeOp(&s, WINDOW_RETURN_ROW, regStart, 1);\n      addrBreak2 = windowCodeOp(&s, WINDOW_AGGINVERSE, 0, 1);\n    }else{\n      assert( pMWin->eEnd==TK_FOLLOWING );\n      /* assert( regStart>=0 );\n      ** regEnd = regEnd - regStart;\n      ** regStart = 0;   */\n      sqlite3VdbeAddOp3(v, OP_Subtract, regStart, regEnd, regEnd);\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, regStart);\n\n      addrStart = sqlite3VdbeCurrentAddr(v);\n      addrBreak1 = windowCodeOp(&s, WINDOW_RETURN_ROW, regEnd, 1);\n      addrBreak2 = windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 1);\n    }\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrStart);\n    sqlite3VdbeJumpHere(v, addrBreak2);\n    addrStart = sqlite3VdbeCurrentAddr(v);\n    addrBreak3 = windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 1);\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrStart);\n    sqlite3VdbeJumpHere(v, addrBreak1);\n    sqlite3VdbeJumpHere(v, addrBreak3);\n  }else{\n    int addrBreak;\n    int addrStart;\n    windowCodeOp(&s, WINDOW_AGGSTEP, 0, 0);\n    addrStart = sqlite3VdbeCurrentAddr(v);\n    addrBreak = windowCodeOp(&s, WINDOW_RETURN_ROW, 0, 1);\n    windowCodeOp(&s, WINDOW_AGGINVERSE, regStart, 0);\n    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrStart);\n    sqlite3VdbeJumpHere(v, addrBreak);\n  }\n  sqlite3VdbeJumpHere(v, addrEmpty);\n\n  sqlite3VdbeAddOp1(v, OP_ResetSorter, s.current.csr);\n  if( pMWin->pPartition ){\n    if( pMWin->regStartRowid ){\n      sqlite3VdbeAddOp2(v, OP_Integer, 1, pMWin->regStartRowid);\n      sqlite3VdbeAddOp2(v, OP_Integer, 0, pMWin->regEndRowid);\n    }\n    sqlite3VdbeChangeP1(v, addrInteger, sqlite3VdbeCurrentAddr(v));\n    sqlite3VdbeAddOp1(v, OP_Return, regFlushPart);\n  }\n}\n\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/************** End of window.c **********************************************/\n/************** Begin file parse.c *******************************************/\n/* This file is automatically generated by Lemon from input grammar\n** source file \"parse.y\".\n*/\n/*\n** 2001-09-15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains SQLite's SQL parser.\n**\n** The canonical source code to this file (\"parse.y\") is a Lemon grammar\n** file that specifies the input grammar and actions to take while parsing.\n** That input file is processed by Lemon to generate a C-language\n** implementation of a parser for the given grammar.  You might be reading\n** this comment as part of the translated C-code.  Edits should be made\n** to the original parse.y sources.\n*/\n\n/* #include \"sqliteInt.h\" */\n\n/*\n** Verify that the pParse->isCreate field is set\n*/\n#define ASSERT_IS_CREATE   assert(pParse->isCreate)\n\n/*\n** Disable all error recovery processing in the parser push-down\n** automaton.\n*/\n#define YYNOERRORRECOVERY 1\n\n/*\n** Make yytestcase() the same as testcase()\n*/\n#define yytestcase(X) testcase(X)\n\n/*\n** Indicate that sqlite3ParserFree() will never be called with a null\n** pointer.\n*/\n#define YYPARSEFREENEVERNULL 1\n\n/*\n** In the amalgamation, the parse.c file generated by lemon and the\n** tokenize.c file are concatenated.  In that case, sqlite3RunParser()\n** has access to the the size of the yyParser object and so the parser\n** engine can be allocated from stack.  In that case, only the\n** sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked\n** and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be\n** omitted.\n*/\n#ifdef SQLITE_AMALGAMATION\n# define sqlite3Parser_ENGINEALWAYSONSTACK 1\n#endif\n\n/*\n** Alternative datatype for the argument to the malloc() routine passed\n** into sqlite3ParserAlloc().  The default is size_t.\n*/\n#define YYMALLOCARGTYPE  u64\n\n/*\n** An instance of the following structure describes the event of a\n** TRIGGER.  \"a\" is the event type, one of TK_UPDATE, TK_INSERT,\n** TK_DELETE, or TK_INSTEAD.  If the event is of the form\n**\n**      UPDATE ON (a,b,c)\n**\n** Then the \"b\" IdList records the list \"a,b,c\".\n*/\nstruct TrigEvent { int a; IdList * b; };\n\nstruct FrameBound     { int eType; Expr *pExpr; };\n\n/*\n** Generate a syntax error\n*/\nstatic void parserSyntaxError(Parse *pParse, Token *p){\n  sqlite3ErrorMsg(pParse, \"near \\\"%T\\\": syntax error\", p);\n}\n\n/*\n** Disable lookaside memory allocation for objects that might be\n** shared across database connections.\n*/\nstatic void disableLookaside(Parse *pParse){\n  sqlite3 *db = pParse->db;\n  pParse->disableLookaside++;\n#ifdef SQLITE_DEBUG\n  pParse->isCreate = 1;\n#endif\n  memset(&pParse->u1.cr, 0, sizeof(pParse->u1.cr));\n  DisableLookaside;\n}\n\n#if !defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) \\\n && defined(SQLITE_UDL_CAPABLE_PARSER)\n/*\n** Issue an error message if an ORDER BY or LIMIT clause occurs on an\n** UPDATE or DELETE statement.\n*/\nstatic void updateDeleteLimitError(\n  Parse *pParse,\n  ExprList *pOrderBy,\n  Expr *pLimit\n){\n  if( pOrderBy ){\n    sqlite3ErrorMsg(pParse, \"syntax error near \\\"ORDER BY\\\"\");\n  }else{\n    sqlite3ErrorMsg(pParse, \"syntax error near \\\"LIMIT\\\"\");\n  }\n  sqlite3ExprListDelete(pParse->db, pOrderBy);\n  sqlite3ExprDelete(pParse->db, pLimit);\n}\n#endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */\n\n\n  /*\n  ** For a compound SELECT statement, make sure p->pPrior->pNext==p for\n  ** all elements in the list.  And make sure list length does not exceed\n  ** SQLITE_LIMIT_COMPOUND_SELECT.\n  */\n  static void parserDoubleLinkSelect(Parse *pParse, Select *p){\n    assert( p!=0 );\n    if( p->pPrior ){\n      Select *pNext = 0, *pLoop = p;\n      int mxSelect, cnt = 1;\n      while(1){\n        pLoop->pNext = pNext;\n        pLoop->selFlags |= SF_Compound;\n        pNext = pLoop;\n        pLoop = pLoop->pPrior;\n        if( pLoop==0 ) break;\n        cnt++;\n        if( pLoop->pOrderBy || pLoop->pLimit ){\n          sqlite3ErrorMsg(pParse,\"%s clause should come after %s not before\",\n             pLoop->pOrderBy!=0 ? \"ORDER BY\" : \"LIMIT\",\n             sqlite3SelectOpName(pNext->op));\n          break;\n        }\n      }\n      if( (p->selFlags & (SF_MultiValue|SF_Values))==0\n       && (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0\n       && cnt>mxSelect\n      ){\n        sqlite3ErrorMsg(pParse, \"too many terms in compound SELECT\");\n      }\n    }\n  }\n\n  /* Attach a With object describing the WITH clause to a Select\n  ** object describing the query for which the WITH clause is a prefix.\n  */\n  static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){\n    if( pSelect ){\n      pSelect->pWith = pWith;\n      parserDoubleLinkSelect(pParse, pSelect);\n    }else{\n      sqlite3WithDelete(pParse->db, pWith);\n    }\n    return pSelect;\n  }\n\n  /* Memory allocator for parser stack resizing.  This is a thin wrapper around\n  ** sqlite3_realloc() that includes a call to sqlite3FaultSim() to facilitate\n  ** testing.\n  */\n  static void *parserStackRealloc(void *pOld, sqlite3_uint64 newSize){\n    return sqlite3FaultSim(700) ? 0 : sqlite3_realloc(pOld, newSize);\n  }\n\n\n  /* Construct a new Expr object from a single token */\n  static Expr *tokenExpr(Parse *pParse, int op, Token t){\n    Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);\n    if( p ){\n      /* memset(p, 0, sizeof(Expr)); */\n      p->op = (u8)op;\n      p->affExpr = 0;\n      p->flags = EP_Leaf;\n      ExprClearVVAProperties(p);\n      /* p->iAgg = -1; // Not required */\n      p->pLeft = p->pRight = 0;\n      p->pAggInfo = 0;\n      memset(&p->x, 0, sizeof(p->x));\n      memset(&p->y, 0, sizeof(p->y));\n      p->op2 = 0;\n      p->iTable = 0;\n      p->iColumn = 0;\n      p->u.zToken = (char*)&p[1];\n      memcpy(p->u.zToken, t.z, t.n);\n      p->u.zToken[t.n] = 0;\n      p->w.iOfst = (int)(t.z - pParse->zTail);\n      if( sqlite3Isquote(p->u.zToken[0]) ){\n        sqlite3DequoteExpr(p);\n      }\n#if SQLITE_MAX_EXPR_DEPTH>0\n      p->nHeight = 1;\n#endif\n      if( IN_RENAME_OBJECT ){\n        return (Expr*)sqlite3RenameTokenMap(pParse, (void*)p, &t);\n      }\n    }\n    return p;\n  }\n\n\n  /* A routine to convert a binary TK_IS or TK_ISNOT expression into a\n  ** unary TK_ISNULL or TK_NOTNULL expression. */\n  static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){\n    sqlite3 *db = pParse->db;\n    if( pA && pY && pY->op==TK_NULL && !IN_RENAME_OBJECT ){\n      pA->op = (u8)op;\n      sqlite3ExprDelete(db, pA->pRight);\n      pA->pRight = 0;\n    }\n  }\n\n  /* Add a single new term to an ExprList that is used to store a\n  ** list of identifiers.  Report an error if the ID list contains\n  ** a COLLATE clause or an ASC or DESC keyword, except ignore the\n  ** error while parsing a legacy schema.\n  */\n  static ExprList *parserAddExprIdListTerm(\n    Parse *pParse,\n    ExprList *pPrior,\n    Token *pIdToken,\n    int hasCollate,\n    int sortOrder\n  ){\n    ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);\n    if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)\n        && pParse->db->init.busy==0\n    ){\n      sqlite3ErrorMsg(pParse, \"syntax error after column name \\\"%.*s\\\"\",\n                         pIdToken->n, pIdToken->z);\n    }\n    sqlite3ExprListSetName(pParse, p, pIdToken, 1);\n    return p;\n  }\n\n#if TK_SPAN>255\n# error too many tokens in the grammar\n#endif\n/**************** End of %include directives **********************************/\n/* These constants specify the various numeric values for terminal symbols.\n***************** Begin token definitions *************************************/\n#ifndef TK_SEMI\n#define TK_SEMI                            1\n#define TK_EXPLAIN                         2\n#define TK_QUERY                           3\n#define TK_PLAN                            4\n#define TK_BEGIN                           5\n#define TK_TRANSACTION                     6\n#define TK_DEFERRED                        7\n#define TK_IMMEDIATE                       8\n#define TK_EXCLUSIVE                       9\n#define TK_COMMIT                         10\n#define TK_END                            11\n#define TK_ROLLBACK                       12\n#define TK_SAVEPOINT                      13\n#define TK_RELEASE                        14\n#define TK_TO                             15\n#define TK_TABLE                          16\n#define TK_CREATE                         17\n#define TK_IF                             18\n#define TK_NOT                            19\n#define TK_EXISTS                         20\n#define TK_TEMP                           21\n#define TK_LP                             22\n#define TK_RP                             23\n#define TK_AS                             24\n#define TK_COMMA                          25\n#define TK_WITHOUT                        26\n#define TK_ABORT                          27\n#define TK_ACTION                         28\n#define TK_AFTER                          29\n#define TK_ANALYZE                        30\n#define TK_ASC                            31\n#define TK_ATTACH                         32\n#define TK_BEFORE                         33\n#define TK_BY                             34\n#define TK_CASCADE                        35\n#define TK_CAST                           36\n#define TK_CONFLICT                       37\n#define TK_DATABASE                       38\n#define TK_DESC                           39\n#define TK_DETACH                         40\n#define TK_EACH                           41\n#define TK_FAIL                           42\n#define TK_OR                             43\n#define TK_AND                            44\n#define TK_IS                             45\n#define TK_ISNOT                          46\n#define TK_MATCH                          47\n#define TK_LIKE_KW                        48\n#define TK_BETWEEN                        49\n#define TK_IN                             50\n#define TK_ISNULL                         51\n#define TK_NOTNULL                        52\n#define TK_NE                             53\n#define TK_EQ                             54\n#define TK_GT                             55\n#define TK_LE                             56\n#define TK_LT                             57\n#define TK_GE                             58\n#define TK_ESCAPE                         59\n#define TK_ID                             60\n#define TK_COLUMNKW                       61\n#define TK_DO                             62\n#define TK_FOR                            63\n#define TK_IGNORE                         64\n#define TK_INITIALLY                      65\n#define TK_INSTEAD                        66\n#define TK_NO                             67\n#define TK_KEY                            68\n#define TK_OF                             69\n#define TK_OFFSET                         70\n#define TK_PRAGMA                         71\n#define TK_RAISE                          72\n#define TK_RECURSIVE                      73\n#define TK_REPLACE                        74\n#define TK_RESTRICT                       75\n#define TK_ROW                            76\n#define TK_ROWS                           77\n#define TK_TRIGGER                        78\n#define TK_VACUUM                         79\n#define TK_VIEW                           80\n#define TK_VIRTUAL                        81\n#define TK_WITH                           82\n#define TK_NULLS                          83\n#define TK_FIRST                          84\n#define TK_LAST                           85\n#define TK_CURRENT                        86\n#define TK_FOLLOWING                      87\n#define TK_PARTITION                      88\n#define TK_PRECEDING                      89\n#define TK_RANGE                          90\n#define TK_UNBOUNDED                      91\n#define TK_EXCLUDE                        92\n#define TK_GROUPS                         93\n#define TK_OTHERS                         94\n#define TK_TIES                           95\n#define TK_GENERATED                      96\n#define TK_ALWAYS                         97\n#define TK_MATERIALIZED                   98\n#define TK_REINDEX                        99\n#define TK_RENAME                         100\n#define TK_CTIME_KW                       101\n#define TK_ANY                            102\n#define TK_BITAND                         103\n#define TK_BITOR                          104\n#define TK_LSHIFT                         105\n#define TK_RSHIFT                         106\n#define TK_PLUS                           107\n#define TK_MINUS                          108\n#define TK_STAR                           109\n#define TK_SLASH                          110\n#define TK_REM                            111\n#define TK_CONCAT                         112\n#define TK_PTR                            113\n#define TK_COLLATE                        114\n#define TK_BITNOT                         115\n#define TK_ON                             116\n#define TK_INDEXED                        117\n#define TK_STRING                         118\n#define TK_JOIN_KW                        119\n#define TK_CONSTRAINT                     120\n#define TK_DEFAULT                        121\n#define TK_NULL                           122\n#define TK_PRIMARY                        123\n#define TK_UNIQUE                         124\n#define TK_CHECK                          125\n#define TK_REFERENCES                     126\n#define TK_AUTOINCR                       127\n#define TK_INSERT                         128\n#define TK_DELETE                         129\n#define TK_UPDATE                         130\n#define TK_SET                            131\n#define TK_DEFERRABLE                     132\n#define TK_FOREIGN                        133\n#define TK_DROP                           134\n#define TK_UNION                          135\n#define TK_ALL                            136\n#define TK_EXCEPT                         137\n#define TK_INTERSECT                      138\n#define TK_SELECT                         139\n#define TK_VALUES                         140\n#define TK_DISTINCT                       141\n#define TK_DOT                            142\n#define TK_FROM                           143\n#define TK_JOIN                           144\n#define TK_USING                          145\n#define TK_ORDER                          146\n#define TK_GROUP                          147\n#define TK_HAVING                         148\n#define TK_LIMIT                          149\n#define TK_WHERE                          150\n#define TK_RETURNING                      151\n#define TK_INTO                           152\n#define TK_NOTHING                        153\n#define TK_FLOAT                          154\n#define TK_BLOB                           155\n#define TK_INTEGER                        156\n#define TK_VARIABLE                       157\n#define TK_CASE                           158\n#define TK_WHEN                           159\n#define TK_THEN                           160\n#define TK_ELSE                           161\n#define TK_INDEX                          162\n#define TK_ALTER                          163\n#define TK_ADD                            164\n#define TK_WINDOW                         165\n#define TK_OVER                           166\n#define TK_FILTER                         167\n#define TK_COLUMN                         168\n#define TK_AGG_FUNCTION                   169\n#define TK_AGG_COLUMN                     170\n#define TK_TRUEFALSE                      171\n#define TK_FUNCTION                       172\n#define TK_UPLUS                          173\n#define TK_UMINUS                         174\n#define TK_TRUTH                          175\n#define TK_REGISTER                       176\n#define TK_VECTOR                         177\n#define TK_SELECT_COLUMN                  178\n#define TK_IF_NULL_ROW                    179\n#define TK_ASTERISK                       180\n#define TK_SPAN                           181\n#define TK_ERROR                          182\n#define TK_QNUMBER                        183\n#define TK_SPACE                          184\n#define TK_COMMENT                        185\n#define TK_ILLEGAL                        186\n#endif\n/**************** End token definitions ***************************************/\n\n/* The next sections is a series of control #defines.\n** various aspects of the generated parser.\n**    YYCODETYPE         is the data type used to store the integer codes\n**                       that represent terminal and non-terminal symbols.\n**                       \"unsigned char\" is used if there are fewer than\n**                       256 symbols.  Larger types otherwise.\n**    YYNOCODE           is a number of type YYCODETYPE that is not used for\n**                       any terminal or nonterminal symbol.\n**    YYFALLBACK         If defined, this indicates that one or more tokens\n**                       (also known as: \"terminal symbols\") have fall-back\n**                       values which should be used if the original symbol\n**                       would not parse.  This permits keywords to sometimes\n**                       be used as identifiers, for example.\n**    YYACTIONTYPE       is the data type used for \"action codes\" - numbers\n**                       that indicate what to do in response to the next\n**                       token.\n**    sqlite3ParserTOKENTYPE     is the data type used for minor type for terminal\n**                       symbols.  Background: A \"minor type\" is a semantic\n**                       value associated with a terminal or non-terminal\n**                       symbols.  For example, for an \"ID\" terminal symbol,\n**                       the minor type might be the name of the identifier.\n**                       Each non-terminal can have a different minor type.\n**                       Terminal symbols all have the same minor type, though.\n**                       This macros defines the minor type for terminal\n**                       symbols.\n**    YYMINORTYPE        is the data type used for all minor types.\n**                       This is typically a union of many types, one of\n**                       which is sqlite3ParserTOKENTYPE.  The entry in the union\n**                       for terminal symbols is called \"yy0\".\n**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If\n**                       zero the stack is dynamically sized using realloc()\n**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument\n**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument\n**    sqlite3ParserARG_PARAM     Code to pass %extra_argument as a subroutine parameter\n**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser\n**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser\n**    sqlite3ParserCTX_*         As sqlite3ParserARG_ except for %extra_context\n**    YYREALLOC          Name of the realloc() function to use\n**    YYFREE             Name of the free() function to use\n**    YYDYNSTACK         True if stack space should be extended on heap\n**    YYERRORSYMBOL      is the code number of the error symbol.  If not\n**                       defined, then do no error processing.\n**    YYNSTATE           the combined number of states.\n**    YYNRULE            the number of rules in the grammar\n**    YYNTOKEN           Number of terminal symbols\n**    YY_MAX_SHIFT       Maximum value for shift actions\n**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions\n**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions\n**    YY_ERROR_ACTION    The yy_action[] code for syntax error\n**    YY_ACCEPT_ACTION   The yy_action[] code for accept\n**    YY_NO_ACTION       The yy_action[] code for no-op\n**    YY_MIN_REDUCE      Minimum value for reduce actions\n**    YY_MAX_REDUCE      Maximum value for reduce actions\n**    YY_MIN_DSTRCTR     Minimum symbol value that has a destructor\n**    YY_MAX_DSTRCTR     Maximum symbol value that has a destructor\n*/\n#ifndef INTERFACE\n# define INTERFACE 1\n#endif\n/************* Begin control #defines *****************************************/\n#define YYCODETYPE unsigned short int\n#define YYNOCODE 323\n#define YYACTIONTYPE unsigned short int\n#define YYWILDCARD 102\n#define sqlite3ParserTOKENTYPE Token\ntypedef union {\n  int yyinit;\n  sqlite3ParserTOKENTYPE yy0;\n  u32 yy9;\n  struct TrigEvent yy28;\n  With* yy125;\n  IdList* yy204;\n  struct FrameBound yy205;\n  TriggerStep* yy319;\n  const char* yy342;\n  Cte* yy361;\n  ExprList* yy402;\n  Upsert* yy403;\n  OnOrUsing yy421;\n  u8 yy444;\n  struct {int value; int mask;} yy481;\n  Window* yy483;\n  int yy502;\n  SrcList* yy563;\n  Expr* yy590;\n  Select* yy637;\n} YYMINORTYPE;\n#ifndef YYSTACKDEPTH\n#define YYSTACKDEPTH 100\n#endif\n#define sqlite3ParserARG_SDECL\n#define sqlite3ParserARG_PDECL\n#define sqlite3ParserARG_PARAM\n#define sqlite3ParserARG_FETCH\n#define sqlite3ParserARG_STORE\n#define YYREALLOC parserStackRealloc\n#define YYFREE sqlite3_free\n#define YYDYNSTACK 1\n#define sqlite3ParserCTX_SDECL Parse *pParse;\n#define sqlite3ParserCTX_PDECL ,Parse *pParse\n#define sqlite3ParserCTX_PARAM ,pParse\n#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;\n#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;\n#define YYFALLBACK 1\n#define YYNSTATE             583\n#define YYNRULE              409\n#define YYNRULE_WITH_ACTION  344\n#define YYNTOKEN             187\n#define YY_MAX_SHIFT         582\n#define YY_MIN_SHIFTREDUCE   845\n#define YY_MAX_SHIFTREDUCE   1253\n#define YY_ERROR_ACTION      1254\n#define YY_ACCEPT_ACTION     1255\n#define YY_NO_ACTION         1256\n#define YY_MIN_REDUCE        1257\n#define YY_MAX_REDUCE        1665\n#define YY_MIN_DSTRCTR       206\n#define YY_MAX_DSTRCTR       320\n/************* End control #defines *******************************************/\n#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))\n\n/* Define the yytestcase() macro to be a no-op if is not already defined\n** otherwise.\n**\n** Applications can choose to define yytestcase() in the %include section\n** to a macro that can assist in verifying code coverage.  For production\n** code the yytestcase() macro should be turned off.  But it is useful\n** for testing.\n*/\n#ifndef yytestcase\n# define yytestcase(X)\n#endif\n\n/* Macro to determine if stack space has the ability to grow using\n** heap memory.\n*/\n#if YYSTACKDEPTH<=0 || YYDYNSTACK\n# define YYGROWABLESTACK 1\n#else\n# define YYGROWABLESTACK 0\n#endif\n\n/* Guarantee a minimum number of initial stack slots.\n*/\n#if YYSTACKDEPTH<=0\n# undef YYSTACKDEPTH\n# define YYSTACKDEPTH 2  /* Need a minimum stack size */\n#endif\n\n\n/* Next are the tables used to determine what action to take based on the\n** current state and lookahead token.  These tables are used to implement\n** functions that take a state number and lookahead value and return an\n** action integer.\n**\n** Suppose the action integer is N.  Then the action is determined as\n** follows\n**\n**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead\n**                                      token onto the stack and goto state N.\n**\n**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then\n**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.\n**\n**   N == YY_ERROR_ACTION               A syntax error has occurred.\n**\n**   N == YY_ACCEPT_ACTION              The parser accepts its input.\n**\n**   N == YY_NO_ACTION                  No such action.  Denotes unused\n**                                      slots in the yy_action[] table.\n**\n**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE\n**     and YY_MAX_REDUCE\n**\n** The action table is constructed as a single large table named yy_action[].\n** Given state S and lookahead X, the action is computed as either:\n**\n**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]\n**    (B)   N = yy_default[S]\n**\n** The (A) formula is preferred.  The B formula is used instead if\n** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.\n**\n** The formulas above are for computing the action when the lookahead is\n** a terminal symbol.  If the lookahead is a non-terminal (as occurs after\n** a reduce action) then the yy_reduce_ofst[] array is used in place of\n** the yy_shift_ofst[] array.\n**\n** The following are the tables generated in this section:\n**\n**  yy_action[]        A single table containing all actions.\n**  yy_lookahead[]     A table containing the lookahead for each entry in\n**                     yy_action.  Used to detect hash collisions.\n**  yy_shift_ofst[]    For each state, the offset into yy_action for\n**                     shifting terminals.\n**  yy_reduce_ofst[]   For each state, the offset into yy_action for\n**                     shifting non-terminals after a reduce.\n**  yy_default[]       Default action for each state.\n**\n*********** Begin parsing tables **********************************************/\n#define YY_ACTTAB_COUNT (2207)\nstatic const YYACTIONTYPE yy_action[] = {\n /*     0 */   130,  127,  234,  282,  282, 1328,  576, 1307,  460,  289,\n /*    10 */   289,  576, 1622,  381,  576, 1328,  573,  576,  562,  413,\n /*    20 */  1300, 1542,  573,  481,  562,  524,  460,  459,  558,   82,\n /*    30 */    82,  983,  294,  375,   51,   51,  498,   61,   61,  984,\n /*    40 */    82,   82, 1577,  137,  138,   91,    7, 1228, 1228, 1063,\n /*    50 */  1066, 1053, 1053,  135,  135,  136,  136,  136,  136,  413,\n /*    60 */   288,  288,  182,  288,  288,  481,  536,  288,  288,  130,\n /*    70 */   127,  234,  432,  573,  525,  562,  573,  557,  562, 1290,\n /*    80 */   573,  421,  562,  137,  138,   91,  559, 1228, 1228, 1063,\n /*    90 */  1066, 1053, 1053,  135,  135,  136,  136,  136,  136,  296,\n /*   100 */   460,  398, 1249,  134,  134,  134,  134,  133,  133,  132,\n /*   110 */   132,  132,  131,  128,  451,  451, 1050, 1050, 1064, 1067,\n /*   120 */  1255,    1,    1,  582,    2, 1259,  581, 1174, 1259, 1174,\n /*   130 */   321,  413,  155,  321, 1584,  155,  379,  112,  481, 1341,\n /*   140 */   456,  299, 1341,  134,  134,  134,  134,  133,  133,  132,\n /*   150 */   132,  132,  131,  128,  451,  137,  138,   91,  498, 1228,\n /*   160 */  1228, 1063, 1066, 1053, 1053,  135,  135,  136,  136,  136,\n /*   170 */   136, 1204,  862, 1281,  288,  288,  283,  288,  288,  523,\n /*   180 */   523, 1250,  139,  578,    7,  578, 1345,  573, 1169,  562,\n /*   190 */   573, 1054,  562,  136,  136,  136,  136,  129,  573,  547,\n /*   200 */   562, 1169,  245, 1541, 1169,  245,  133,  133,  132,  132,\n /*   210 */   132,  131,  128,  451,  302,  134,  134,  134,  134,  133,\n /*   220 */   133,  132,  132,  132,  131,  128,  451, 1575, 1204, 1205,\n /*   230 */  1204,    7,  470,  550,  455,  413,  550,  455,  130,  127,\n /*   240 */   234,  134,  134,  134,  134,  133,  133,  132,  132,  132,\n /*   250 */   131,  128,  451,  136,  136,  136,  136,  538,  483,  137,\n /*   260 */   138,   91, 1019, 1228, 1228, 1063, 1066, 1053, 1053,  135,\n /*   270 */   135,  136,  136,  136,  136, 1085,  576, 1204,  132,  132,\n /*   280 */   132,  131,  128,  451,   93,  214,  134,  134,  134,  134,\n /*   290 */   133,  133,  132,  132,  132,  131,  128,  451,  401,   19,\n /*   300 */    19,  134,  134,  134,  134,  133,  133,  132,  132,  132,\n /*   310 */   131,  128,  451, 1498,  426,  267,  344,  467,  332,  134,\n /*   320 */   134,  134,  134,  133,  133,  132,  132,  132,  131,  128,\n /*   330 */   451, 1281,  576,    6, 1204, 1205, 1204,  257,  576,  413,\n /*   340 */   511,  508,  507, 1279,   94, 1019,  464, 1204,  551,  551,\n /*   350 */   506, 1224, 1571,   44,   38,   51,   51,  411,  576,  413,\n /*   360 */    45,   51,   51,  137,  138,   91,  530, 1228, 1228, 1063,\n /*   370 */  1066, 1053, 1053,  135,  135,  136,  136,  136,  136,  398,\n /*   380 */  1148,   82,   82,  137,  138,   91,   39, 1228, 1228, 1063,\n /*   390 */  1066, 1053, 1053,  135,  135,  136,  136,  136,  136,  344,\n /*   400 */    44,  288,  288,  375, 1204, 1205, 1204,  209, 1204, 1224,\n /*   410 */   320,  567,  471,  576,  573,  576,  562,  576,  316,  264,\n /*   420 */   231,   46,  160,  134,  134,  134,  134,  133,  133,  132,\n /*   430 */   132,  132,  131,  128,  451,  303,   82,   82,   82,   82,\n /*   440 */    82,   82,  442,  134,  134,  134,  134,  133,  133,  132,\n /*   450 */   132,  132,  131,  128,  451, 1582,  544,  320,  567, 1250,\n /*   460 */   874, 1582,  380,  382,  413, 1204, 1205, 1204,  360,  182,\n /*   470 */   288,  288, 1576,  557, 1339,  557,    7,  557, 1277,  472,\n /*   480 */   346,  526,  531,  573,  556,  562,  439, 1511,  137,  138,\n /*   490 */    91,  219, 1228, 1228, 1063, 1066, 1053, 1053,  135,  135,\n /*   500 */   136,  136,  136,  136,  465, 1511, 1513,  532,  413,  288,\n /*   510 */   288,  423,  512,  288,  288,  411,  288,  288,  874,  130,\n /*   520 */   127,  234,  573, 1107,  562, 1204,  573, 1107,  562,  573,\n /*   530 */   560,  562,  137,  138,   91, 1293, 1228, 1228, 1063, 1066,\n /*   540 */  1053, 1053,  135,  135,  136,  136,  136,  136,  134,  134,\n /*   550 */   134,  134,  133,  133,  132,  132,  132,  131,  128,  451,\n /*   560 */   493,  503, 1292, 1204,  257,  288,  288,  511,  508,  507,\n /*   570 */  1204, 1628, 1169,  123,  568,  275,    4,  506,  573, 1511,\n /*   580 */   562,  331, 1204, 1205, 1204, 1169,  548,  548, 1169,  261,\n /*   590 */   571,    7,  134,  134,  134,  134,  133,  133,  132,  132,\n /*   600 */   132,  131,  128,  451,  108,  533,  130,  127,  234, 1204,\n /*   610 */   448,  447,  413, 1451,  452,  983,  886,   96, 1598, 1233,\n /*   620 */  1204, 1205, 1204,  984, 1235, 1450,  565, 1204, 1205, 1204,\n /*   630 */   229,  522, 1234,  534, 1333, 1333,  137,  138,   91, 1449,\n /*   640 */  1228, 1228, 1063, 1066, 1053, 1053,  135,  135,  136,  136,\n /*   650 */   136,  136,  373, 1595,  971, 1040,  413, 1236,  418, 1236,\n /*   660 */   879,  121,  121,  948,  373, 1595, 1204, 1205, 1204,  122,\n /*   670 */  1204,  452,  577,  452,  363,  417, 1028,  882,  373, 1595,\n /*   680 */   137,  138,   91,  462, 1228, 1228, 1063, 1066, 1053, 1053,\n /*   690 */   135,  135,  136,  136,  136,  136,  134,  134,  134,  134,\n /*   700 */   133,  133,  132,  132,  132,  131,  128,  451, 1028, 1028,\n /*   710 */  1030, 1031,   35,  570,  570,  570,  197,  423, 1040,  198,\n /*   720 */  1204,  123,  568, 1204,    4,  320,  567, 1204, 1205, 1204,\n /*   730 */    40,  388,  576,  384,  882, 1029,  423, 1188,  571, 1028,\n /*   740 */   134,  134,  134,  134,  133,  133,  132,  132,  132,  131,\n /*   750 */   128,  451,  529, 1568, 1204,   19,   19, 1204,  575,  492,\n /*   760 */   413,  157,  452,  489, 1187, 1331, 1331,    5, 1204,  949,\n /*   770 */   431, 1028, 1028, 1030,  565,   22,   22, 1204, 1205, 1204,\n /*   780 */  1204, 1205, 1204,  477,  137,  138,   91,  212, 1228, 1228,\n /*   790 */  1063, 1066, 1053, 1053,  135,  135,  136,  136,  136,  136,\n /*   800 */  1188,   48,  111, 1040,  413, 1204,  213,  970, 1041,  121,\n /*   810 */   121, 1204, 1205, 1204, 1204, 1205, 1204,  122,  221,  452,\n /*   820 */   577,  452,   44,  487, 1028, 1204, 1205, 1204,  137,  138,\n /*   830 */    91,  378, 1228, 1228, 1063, 1066, 1053, 1053,  135,  135,\n /*   840 */   136,  136,  136,  136,  134,  134,  134,  134,  133,  133,\n /*   850 */   132,  132,  132,  131,  128,  451, 1028, 1028, 1030, 1031,\n /*   860 */    35,  461, 1204, 1205, 1204, 1569, 1040,  377,  214, 1149,\n /*   870 */  1657,  535, 1657,  437,  902,  320,  567, 1568,  364,  320,\n /*   880 */   567,  412,  329, 1029,  519, 1188,    3, 1028,  134,  134,\n /*   890 */   134,  134,  133,  133,  132,  132,  132,  131,  128,  451,\n /*   900 */  1659,  399, 1169,  307,  893,  307,  515,  576,  413,  214,\n /*   910 */   498,  944, 1024,  540,  903, 1169,  943,  392, 1169, 1028,\n /*   920 */  1028, 1030,  406,  298, 1204,   50, 1149, 1658,  413, 1658,\n /*   930 */   145,  145,  137,  138,   91,  293, 1228, 1228, 1063, 1066,\n /*   940 */  1053, 1053,  135,  135,  136,  136,  136,  136, 1188, 1147,\n /*   950 */   514, 1568,  137,  138,   91, 1505, 1228, 1228, 1063, 1066,\n /*   960 */  1053, 1053,  135,  135,  136,  136,  136,  136,  434,  323,\n /*   970 */   435,  539,  111, 1506,  274,  291,  372,  517,  367,  516,\n /*   980 */   262, 1204, 1205, 1204, 1574,  481,  363,  576,    7, 1569,\n /*   990 */  1568,  377,  134,  134,  134,  134,  133,  133,  132,  132,\n /*  1000 */   132,  131,  128,  451, 1568,  576, 1147,  576,  232,  576,\n /*  1010 */    19,   19,  134,  134,  134,  134,  133,  133,  132,  132,\n /*  1020 */   132,  131,  128,  451, 1169,  433,  576, 1207,   19,   19,\n /*  1030 */    19,   19,   19,   19, 1627,  576,  911, 1169,   47,  120,\n /*  1040 */  1169,  117,  413,  306,  498,  438, 1125,  206,  336,   19,\n /*  1050 */    19, 1435,   49,  449,  449,  449, 1368,  315,   81,   81,\n /*  1060 */   576,  304,  413, 1570,  207,  377,  137,  138,   91,  115,\n /*  1070 */  1228, 1228, 1063, 1066, 1053, 1053,  135,  135,  136,  136,\n /*  1080 */   136,  136,  576,   82,   82, 1207,  137,  138,   91, 1340,\n /*  1090 */  1228, 1228, 1063, 1066, 1053, 1053,  135,  135,  136,  136,\n /*  1100 */   136,  136, 1569,  386,  377,   82,   82,  463, 1126, 1552,\n /*  1110 */   333,  463,  335,  131,  128,  451, 1569,  161,  377,   16,\n /*  1120 */   317,  387,  428, 1127,  448,  447,  134,  134,  134,  134,\n /*  1130 */   133,  133,  132,  132,  132,  131,  128,  451, 1128,  576,\n /*  1140 */  1105,   10,  445,  267,  576, 1554,  134,  134,  134,  134,\n /*  1150 */   133,  133,  132,  132,  132,  131,  128,  451,  532,  576,\n /*  1160 */   922,  576,   19,   19,  576, 1573,  576,  147,  147,    7,\n /*  1170 */   923, 1236,  498, 1236,  576,  487,  413,  552,  285, 1224,\n /*  1180 */   969,  215,   82,   82,   66,   66, 1435,   67,   67,   21,\n /*  1190 */    21, 1110, 1110,  495,  334,  297,  413,   53,   53,  297,\n /*  1200 */   137,  138,   91,  119, 1228, 1228, 1063, 1066, 1053, 1053,\n /*  1210 */   135,  135,  136,  136,  136,  136,  413, 1336, 1311,  446,\n /*  1220 */   137,  138,   91,  227, 1228, 1228, 1063, 1066, 1053, 1053,\n /*  1230 */   135,  135,  136,  136,  136,  136,  574, 1224,  936,  936,\n /*  1240 */   137,  126,   91,  141, 1228, 1228, 1063, 1066, 1053, 1053,\n /*  1250 */   135,  135,  136,  136,  136,  136,  533,  429,  472,  346,\n /*  1260 */   134,  134,  134,  134,  133,  133,  132,  132,  132,  131,\n /*  1270 */   128,  451,  576,  457,  233,  343, 1435,  403,  498, 1550,\n /*  1280 */   134,  134,  134,  134,  133,  133,  132,  132,  132,  131,\n /*  1290 */   128,  451,  576,  324,  576,   82,   82,  487,  576,  969,\n /*  1300 */   134,  134,  134,  134,  133,  133,  132,  132,  132,  131,\n /*  1310 */   128,  451,  288,  288,  546,   68,   68,   54,   54,  553,\n /*  1320 */   413,   69,   69,  351,    6,  573,  944,  562,  410,  409,\n /*  1330 */  1435,  943,  450,  545,  260,  259,  258,  576,  158,  576,\n /*  1340 */   413,  222, 1180,  479,  969,  138,   91,  430, 1228, 1228,\n /*  1350 */  1063, 1066, 1053, 1053,  135,  135,  136,  136,  136,  136,\n /*  1360 */    70,   70,   71,   71,  576, 1126,   91,  576, 1228, 1228,\n /*  1370 */  1063, 1066, 1053, 1053,  135,  135,  136,  136,  136,  136,\n /*  1380 */  1127,  166,  850,  851,  852, 1282,  419,   72,   72,  108,\n /*  1390 */    73,   73, 1310,  358, 1180, 1128,  576,  305,  576,  123,\n /*  1400 */   568,  494,    4,  488,  134,  134,  134,  134,  133,  133,\n /*  1410 */   132,  132,  132,  131,  128,  451,  571,  564,  534,   55,\n /*  1420 */    55,   56,   56,  576,  134,  134,  134,  134,  133,  133,\n /*  1430 */   132,  132,  132,  131,  128,  451,  576, 1104,  233, 1104,\n /*  1440 */   452, 1602,  582,    2, 1259,  576,   57,   57,  576,  321,\n /*  1450 */   576,  155,  565, 1435,  485,  353,  576,  356, 1341,   59,\n /*  1460 */    59,  576,   44,  969,  569,  419,  576,  238,   60,   60,\n /*  1470 */   261,   74,   74,   75,   75,  287,  231,  576, 1366,   76,\n /*  1480 */    76, 1040,  420,  184,   20,   20,  576,  121,  121,   77,\n /*  1490 */    77,   97,  218,  288,  288,  122,  125,  452,  577,  452,\n /*  1500 */   143,  143, 1028,  576,  520,  576,  573,  576,  562,  144,\n /*  1510 */   144,  474,  227, 1244,  478,  123,  568,  576,    4,  320,\n /*  1520 */   567,  245,  411,  576,  443,  411,   78,   78,   62,   62,\n /*  1530 */    79,   79,  571,  319, 1028, 1028, 1030, 1031,   35,  418,\n /*  1540 */    63,   63,  576,  290,  411,    9,   80,   80, 1144,  576,\n /*  1550 */   400,  576,  486,  455,  576, 1223,  452,  576,  325,  342,\n /*  1560 */   576,  111,  576, 1188,  242,   64,   64,  473,  565,  576,\n /*  1570 */    23,  576,  170,  170,  171,  171,  576,   87,   87,  328,\n /*  1580 */    65,   65,  542,   83,   83,  146,  146,  541,  123,  568,\n /*  1590 */   341,    4,   84,   84,  168,  168,  576, 1040,  576,  148,\n /*  1600 */   148,  576, 1380,  121,  121,  571, 1021,  576,  266,  576,\n /*  1610 */   424,  122,  576,  452,  577,  452,  576,  553, 1028,  142,\n /*  1620 */   142,  169,  169,  576,  162,  162,  528,  889,  371,  452,\n /*  1630 */   152,  152,  151,  151, 1379,  149,  149,  109,  370,  150,\n /*  1640 */   150,  565,  576,  480,  576,  266,   86,   86,  576, 1092,\n /*  1650 */  1028, 1028, 1030, 1031,   35,  542,  482,  576,  266,  466,\n /*  1660 */   543,  123,  568, 1616,    4,   88,   88,   85,   85,  475,\n /*  1670 */  1040,   52,   52,  222,  901,  900,  121,  121,  571, 1188,\n /*  1680 */    58,   58,  244, 1032,  122,  889,  452,  577,  452,  908,\n /*  1690 */   909, 1028,  300,  347,  504,  111,  263,  361,  165,  111,\n /*  1700 */   111, 1088,  452,  263,  974, 1153,  266, 1092,  986,  987,\n /*  1710 */   942,  939,  125,  125,  565, 1103,  872, 1103,  159,  941,\n /*  1720 */  1309,  125, 1557, 1028, 1028, 1030, 1031,   35,  542,  337,\n /*  1730 */  1530,  205, 1529,  541,  499, 1589,  490,  348, 1376,  352,\n /*  1740 */   355, 1032,  357, 1040,  359, 1324, 1308,  366,  563,  121,\n /*  1750 */   121,  376, 1188, 1389, 1434, 1362,  280,  122, 1374,  452,\n /*  1760 */   577,  452,  167, 1439, 1028, 1289, 1280, 1268, 1267, 1269,\n /*  1770 */  1609, 1359,  312,  313,  314,  397,   12,  237,  224, 1421,\n /*  1780 */   295, 1416, 1409, 1426,  339,  484,  340,  509, 1371, 1612,\n /*  1790 */  1372, 1425, 1244,  404,  301,  228, 1028, 1028, 1030, 1031,\n /*  1800 */    35, 1601, 1192,  454,  345, 1307,  292,  369, 1502, 1501,\n /*  1810 */   270,  396,  396,  395,  277,  393, 1370, 1369,  859, 1549,\n /*  1820 */   186,  123,  568,  235,    4, 1188,  391,  210,  211,  223,\n /*  1830 */  1547,  239, 1241,  327,  422,   96,  220,  195,  571,  180,\n /*  1840 */   188,  326,  468,  469,  190,  191,  502,  192,  193,  566,\n /*  1850 */   247,  109, 1430,  491,  199,  251,  102,  281,  402,  476,\n /*  1860 */   405, 1496,  452,  497,  253, 1422,   13, 1428,   14, 1427,\n /*  1870 */   203, 1507,  241,  500,  565,  354,  407,   92,   95, 1270,\n /*  1880 */   175,  254,  518,   43, 1327,  255, 1326, 1325,  436, 1518,\n /*  1890 */   350, 1318,  104,  229,  893, 1626,  440,  441, 1625,  408,\n /*  1900 */   240, 1296,  268, 1040,  310,  269, 1297,  527,  444,  121,\n /*  1910 */   121,  368, 1295, 1594, 1624,  311, 1394,  122, 1317,  452,\n /*  1920 */   577,  452,  374, 1580, 1028, 1393,  140,  553,   11,   90,\n /*  1930 */   568,  385,    4,  116,  318,  414, 1579,  110, 1483,  537,\n /*  1940 */   320,  567, 1350,  555,   42,  579,  571, 1349, 1198,  383,\n /*  1950 */   276,  390,  216,  389,  278,  279, 1028, 1028, 1030, 1031,\n /*  1960 */    35,  172,  580, 1265,  458, 1260,  415,  416,  185,  156,\n /*  1970 */   452, 1534, 1535,  173, 1533, 1532,   89,  308,  225,  226,\n /*  1980 */   846,  174,  565,  453,  217, 1188,  322,  236, 1102,  154,\n /*  1990 */  1100,  330,  187,  176, 1223,  243,  189,  925,  338,  246,\n /*  2000 */  1116,  194,  177,  425,  178,  427,   98,  196,   99,  100,\n /*  2010 */   101, 1040,  179, 1119, 1115,  248,  249,  121,  121,  163,\n /*  2020 */    24,  250,  349, 1238,  496,  122, 1108,  452,  577,  452,\n /*  2030 */  1192,  454, 1028,  266,  292,  200,  252,  201,  861,  396,\n /*  2040 */   396,  395,  277,  393,   15,  501,  859,  370,  292,  256,\n /*  2050 */   202,  554,  505,  396,  396,  395,  277,  393,  103,  239,\n /*  2060 */   859,  327,   25,   26, 1028, 1028, 1030, 1031,   35,  326,\n /*  2070 */   362,  510,  891,  239,  365,  327,  513,  904,  105,  309,\n /*  2080 */   164,  181,   27,  326,  106,  521,  107, 1185, 1069, 1155,\n /*  2090 */    17, 1154,  230, 1188,  284,  286,  265,  204,  125, 1171,\n /*  2100 */   241,   28,  978,  972,   29,   41, 1175, 1179,  175, 1173,\n /*  2110 */    30,   43,   31,    8,  241, 1178,   32, 1160,  208,  549,\n /*  2120 */    33,  111,  175, 1083, 1070,   43, 1068, 1072,  240,  113,\n /*  2130 */   114,   34,  561,  118, 1124,  271, 1073,   36,   18,  572,\n /*  2140 */  1033,  873,  240,  124,   37,  935,  272,  273, 1617,  183,\n /*  2150 */   153,  394, 1194, 1193, 1256, 1256, 1256, 1256, 1256, 1256,\n /*  2160 */  1256, 1256, 1256,  414, 1256, 1256, 1256, 1256,  320,  567,\n /*  2170 */  1256, 1256, 1256, 1256, 1256, 1256, 1256,  414, 1256, 1256,\n /*  2180 */  1256, 1256,  320,  567, 1256, 1256, 1256, 1256, 1256, 1256,\n /*  2190 */  1256, 1256,  458, 1256, 1256, 1256, 1256, 1256, 1256, 1256,\n /*  2200 */  1256, 1256, 1256, 1256, 1256, 1256,  458,\n};\nstatic const YYCODETYPE yy_lookahead[] = {\n /*     0 */   277,  278,  279,  241,  242,  225,  195,  227,  195,  241,\n /*    10 */   242,  195,  217,  221,  195,  235,  254,  195,  256,   19,\n /*    20 */   225,  298,  254,  195,  256,  206,  213,  214,  206,  218,\n /*    30 */   219,   31,  206,  195,  218,  219,  195,  218,  219,   39,\n /*    40 */   218,  219,  313,   43,   44,   45,  317,   47,   48,   49,\n /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,   58,   19,\n /*    60 */   241,  242,  195,  241,  242,  195,  255,  241,  242,  277,\n /*    70 */   278,  279,  234,  254,  255,  256,  254,  255,  256,  218,\n /*    80 */   254,  240,  256,   43,   44,   45,  264,   47,   48,   49,\n /*    90 */    50,   51,   52,   53,   54,   55,   56,   57,   58,  271,\n /*   100 */   287,   22,   23,  103,  104,  105,  106,  107,  108,  109,\n /*   110 */   110,  111,  112,  113,  114,  114,   47,   48,   49,   50,\n /*   120 */   187,  188,  189,  190,  191,  192,  190,   87,  192,   89,\n /*   130 */   197,   19,  199,  197,  318,  199,  320,   25,  195,  206,\n /*   140 */   299,  271,  206,  103,  104,  105,  106,  107,  108,  109,\n /*   150 */   110,  111,  112,  113,  114,   43,   44,   45,  195,   47,\n /*   160 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,\n /*   170 */    58,   60,   21,  195,  241,  242,  215,  241,  242,  312,\n /*   180 */   313,  102,   70,  205,  317,  207,  242,  254,   77,  256,\n /*   190 */   254,  122,  256,   55,   56,   57,   58,   59,  254,   88,\n /*   200 */   256,   90,  269,  240,   93,  269,  107,  108,  109,  110,\n /*   210 */   111,  112,  113,  114,  271,  103,  104,  105,  106,  107,\n /*   220 */   108,  109,  110,  111,  112,  113,  114,  313,  117,  118,\n /*   230 */   119,  317,   81,  195,  301,   19,  195,  301,  277,  278,\n /*   240 */   279,  103,  104,  105,  106,  107,  108,  109,  110,  111,\n /*   250 */   112,  113,  114,   55,   56,   57,   58,  146,  195,   43,\n /*   260 */    44,   45,   74,   47,   48,   49,   50,   51,   52,   53,\n /*   270 */    54,   55,   56,   57,   58,  124,  195,   60,  109,  110,\n /*   280 */   111,  112,  113,  114,   68,  195,  103,  104,  105,  106,\n /*   290 */   107,  108,  109,  110,  111,  112,  113,  114,  208,  218,\n /*   300 */   219,  103,  104,  105,  106,  107,  108,  109,  110,  111,\n /*   310 */   112,  113,  114,  162,  233,   24,  128,  129,  130,  103,\n /*   320 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  113,\n /*   330 */   114,  195,  195,  215,  117,  118,  119,  120,  195,   19,\n /*   340 */   123,  124,  125,  207,   24,   74,  246,   60,  310,  311,\n /*   350 */   133,   60,  311,   82,   22,  218,  219,  257,  195,   19,\n /*   360 */    73,  218,  219,   43,   44,   45,  206,   47,   48,   49,\n /*   370 */    50,   51,   52,   53,   54,   55,   56,   57,   58,   22,\n /*   380 */    23,  218,  219,   43,   44,   45,   54,   47,   48,   49,\n /*   390 */    50,   51,   52,   53,   54,   55,   56,   57,   58,  128,\n /*   400 */    82,  241,  242,  195,  117,  118,  119,  289,   60,  118,\n /*   410 */   139,  140,  294,  195,  254,  195,  256,  195,  255,  259,\n /*   420 */   260,   73,   22,  103,  104,  105,  106,  107,  108,  109,\n /*   430 */   110,  111,  112,  113,  114,  206,  218,  219,  218,  219,\n /*   440 */   218,  219,  234,  103,  104,  105,  106,  107,  108,  109,\n /*   450 */   110,  111,  112,  113,  114,  318,  319,  139,  140,  102,\n /*   460 */    60,  318,  319,  221,   19,  117,  118,  119,   23,  195,\n /*   470 */   241,  242,  313,  255,  206,  255,  317,  255,  206,  129,\n /*   480 */   130,  206,  264,  254,  264,  256,  264,  195,   43,   44,\n /*   490 */    45,  151,   47,   48,   49,   50,   51,   52,   53,   54,\n /*   500 */    55,   56,   57,   58,  246,  213,  214,   19,   19,  241,\n /*   510 */   242,  195,   23,  241,  242,  257,  241,  242,  118,  277,\n /*   520 */   278,  279,  254,   29,  256,   60,  254,   33,  256,  254,\n /*   530 */   206,  256,   43,   44,   45,  218,   47,   48,   49,   50,\n /*   540 */    51,   52,   53,   54,   55,   56,   57,   58,  103,  104,\n /*   550 */   105,  106,  107,  108,  109,  110,  111,  112,  113,  114,\n /*   560 */    66,   19,  218,   60,  120,  241,  242,  123,  124,  125,\n /*   570 */    60,  232,   77,   19,   20,   26,   22,  133,  254,  287,\n /*   580 */   256,  265,  117,  118,  119,   90,  312,  313,   93,   47,\n /*   590 */    36,  317,  103,  104,  105,  106,  107,  108,  109,  110,\n /*   600 */   111,  112,  113,  114,  116,  117,  277,  278,  279,   60,\n /*   610 */   107,  108,   19,  276,   60,   31,   23,  152,  195,  116,\n /*   620 */   117,  118,  119,   39,  121,  276,   72,  117,  118,  119,\n /*   630 */   166,  167,  129,  145,  237,  238,   43,   44,   45,  276,\n /*   640 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,\n /*   650 */    57,   58,  315,  316,  144,  101,   19,  154,  116,  156,\n /*   660 */    23,  107,  108,  109,  315,  316,  117,  118,  119,  115,\n /*   670 */    60,  117,  118,  119,  132,  200,  122,   60,  315,  316,\n /*   680 */    43,   44,   45,  272,   47,   48,   49,   50,   51,   52,\n /*   690 */    53,   54,   55,   56,   57,   58,  103,  104,  105,  106,\n /*   700 */   107,  108,  109,  110,  111,  112,  113,  114,  154,  155,\n /*   710 */   156,  157,  158,  212,  213,  214,   22,  195,  101,   22,\n /*   720 */    60,   19,   20,   60,   22,  139,  140,  117,  118,  119,\n /*   730 */    22,  251,  195,  253,  117,  118,  195,  183,   36,  122,\n /*   740 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,\n /*   750 */   113,  114,  195,  195,   60,  218,  219,   60,  195,  284,\n /*   760 */    19,   25,   60,  288,   23,  237,  238,   22,   60,  109,\n /*   770 */   233,  154,  155,  156,   72,  218,  219,  117,  118,  119,\n /*   780 */   117,  118,  119,  116,   43,   44,   45,  265,   47,   48,\n /*   790 */    49,   50,   51,   52,   53,   54,   55,   56,   57,   58,\n /*   800 */   183,  243,   25,  101,   19,   60,  265,  144,   23,  107,\n /*   810 */   108,  117,  118,  119,  117,  118,  119,  115,  151,  117,\n /*   820 */   118,  119,   82,  195,  122,  117,  118,  119,   43,   44,\n /*   830 */    45,  195,   47,   48,   49,   50,   51,   52,   53,   54,\n /*   840 */    55,   56,   57,   58,  103,  104,  105,  106,  107,  108,\n /*   850 */   109,  110,  111,  112,  113,  114,  154,  155,  156,  157,\n /*   860 */   158,  121,  117,  118,  119,  307,  101,  309,  195,   22,\n /*   870 */    23,  195,   25,   19,   35,  139,  140,  195,   24,  139,\n /*   880 */   140,  208,  195,  118,  109,  183,   22,  122,  103,  104,\n /*   890 */   105,  106,  107,  108,  109,  110,  111,  112,  113,  114,\n /*   900 */   304,  305,   77,  230,  127,  232,   67,  195,   19,  195,\n /*   910 */   195,  136,   23,   88,   75,   90,  141,  203,   93,  154,\n /*   920 */   155,  156,  208,  295,   60,  243,   22,   23,   19,   25,\n /*   930 */   218,  219,   43,   44,   45,  100,   47,   48,   49,   50,\n /*   940 */    51,   52,   53,   54,   55,   56,   57,   58,  183,  102,\n /*   950 */    96,  195,   43,   44,   45,  240,   47,   48,   49,   50,\n /*   960 */    51,   52,   53,   54,   55,   56,   57,   58,  114,  134,\n /*   970 */   131,  146,   25,  286,  120,  121,  122,  123,  124,  125,\n /*   980 */   126,  117,  118,  119,  313,  195,  132,  195,  317,  307,\n /*   990 */   195,  309,  103,  104,  105,  106,  107,  108,  109,  110,\n /*  1000 */   111,  112,  113,  114,  195,  195,  102,  195,  195,  195,\n /*  1010 */   218,  219,  103,  104,  105,  106,  107,  108,  109,  110,\n /*  1020 */   111,  112,  113,  114,   77,  233,  195,   60,  218,  219,\n /*  1030 */   218,  219,  218,  219,   23,  195,   25,   90,  243,  159,\n /*  1040 */    93,  161,   19,  233,  195,  233,   23,  233,   16,  218,\n /*  1050 */   219,  195,  243,  212,  213,  214,  262,  263,  218,  219,\n /*  1060 */   195,  271,   19,  307,  233,  309,   43,   44,   45,  160,\n /*  1070 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,\n /*  1080 */    57,   58,  195,  218,  219,  118,   43,   44,   45,  240,\n /*  1090 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,\n /*  1100 */    57,   58,  307,  195,  309,  218,  219,  263,   12,  195,\n /*  1110 */    78,  267,   80,  112,  113,  114,  307,   22,  309,   24,\n /*  1120 */   255,  281,  266,   27,  107,  108,  103,  104,  105,  106,\n /*  1130 */   107,  108,  109,  110,  111,  112,  113,  114,   42,  195,\n /*  1140 */    11,   22,  255,   24,  195,  195,  103,  104,  105,  106,\n /*  1150 */   107,  108,  109,  110,  111,  112,  113,  114,   19,  195,\n /*  1160 */    64,  195,  218,  219,  195,  313,  195,  218,  219,  317,\n /*  1170 */    74,  154,  195,  156,  195,  195,   19,  233,   23,   60,\n /*  1180 */    25,   24,  218,  219,  218,  219,  195,  218,  219,  218,\n /*  1190 */   219,  128,  129,  130,  162,  263,   19,  218,  219,  267,\n /*  1200 */    43,   44,   45,  160,   47,   48,   49,   50,   51,   52,\n /*  1210 */    53,   54,   55,   56,   57,   58,   19,  240,  228,  255,\n /*  1220 */    43,   44,   45,   25,   47,   48,   49,   50,   51,   52,\n /*  1230 */    53,   54,   55,   56,   57,   58,  135,  118,  137,  138,\n /*  1240 */    43,   44,   45,   22,   47,   48,   49,   50,   51,   52,\n /*  1250 */    53,   54,   55,   56,   57,   58,  117,  266,  129,  130,\n /*  1260 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,\n /*  1270 */   113,  114,  195,  195,  119,  295,  195,  206,  195,  195,\n /*  1280 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,\n /*  1290 */   113,  114,  195,  195,  195,  218,  219,  195,  195,  144,\n /*  1300 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,\n /*  1310 */   113,  114,  241,  242,   67,  218,  219,  218,  219,  146,\n /*  1320 */    19,  218,  219,  240,  215,  254,  136,  256,  107,  108,\n /*  1330 */   195,  141,  255,   86,  128,  129,  130,  195,  165,  195,\n /*  1340 */    19,  143,   95,  272,   25,   44,   45,  266,   47,   48,\n /*  1350 */    49,   50,   51,   52,   53,   54,   55,   56,   57,   58,\n /*  1360 */   218,  219,  218,  219,  195,   12,   45,  195,   47,   48,\n /*  1370 */    49,   50,   51,   52,   53,   54,   55,   56,   57,   58,\n /*  1380 */    27,   23,    7,    8,    9,  210,  211,  218,  219,  116,\n /*  1390 */   218,  219,  228,   16,  147,   42,  195,  295,  195,   19,\n /*  1400 */    20,  266,   22,  294,  103,  104,  105,  106,  107,  108,\n /*  1410 */   109,  110,  111,  112,  113,  114,   36,   64,  145,  218,\n /*  1420 */   219,  218,  219,  195,  103,  104,  105,  106,  107,  108,\n /*  1430 */   109,  110,  111,  112,  113,  114,  195,  154,  119,  156,\n /*  1440 */    60,  189,  190,  191,  192,  195,  218,  219,  195,  197,\n /*  1450 */   195,  199,   72,  195,   19,   78,  195,   80,  206,  218,\n /*  1460 */   219,  195,   82,  144,  210,  211,  195,   15,  218,  219,\n /*  1470 */    47,  218,  219,  218,  219,  259,  260,  195,  261,  218,\n /*  1480 */   219,  101,  302,  303,  218,  219,  195,  107,  108,  218,\n /*  1490 */   219,  150,  151,  241,  242,  115,   25,  117,  118,  119,\n /*  1500 */   218,  219,  122,  195,  146,  195,  254,  195,  256,  218,\n /*  1510 */   219,  246,   25,   61,  246,   19,   20,  195,   22,  139,\n /*  1520 */   140,  269,  257,  195,  266,  257,  218,  219,  218,  219,\n /*  1530 */   218,  219,   36,  246,  154,  155,  156,  157,  158,  116,\n /*  1540 */   218,  219,  195,   22,  257,   49,  218,  219,   23,  195,\n /*  1550 */    25,  195,  117,  301,  195,   25,   60,  195,  195,   23,\n /*  1560 */   195,   25,  195,  183,   24,  218,  219,  130,   72,  195,\n /*  1570 */    22,  195,  218,  219,  218,  219,  195,  218,  219,  195,\n /*  1580 */   218,  219,   86,  218,  219,  218,  219,   91,   19,   20,\n /*  1590 */   153,   22,  218,  219,  218,  219,  195,  101,  195,  218,\n /*  1600 */   219,  195,  195,  107,  108,   36,   23,  195,   25,  195,\n /*  1610 */    62,  115,  195,  117,  118,  119,  195,  146,  122,  218,\n /*  1620 */   219,  218,  219,  195,  218,  219,   19,   60,  122,   60,\n /*  1630 */   218,  219,  218,  219,  195,  218,  219,  150,  132,  218,\n /*  1640 */   219,   72,  195,   23,  195,   25,  218,  219,  195,   60,\n /*  1650 */   154,  155,  156,  157,  158,   86,   23,  195,   25,  195,\n /*  1660 */    91,   19,   20,  142,   22,  218,  219,  218,  219,  130,\n /*  1670 */   101,  218,  219,  143,  121,  122,  107,  108,   36,  183,\n /*  1680 */   218,  219,  142,   60,  115,  118,  117,  118,  119,    7,\n /*  1690 */     8,  122,  153,   23,   23,   25,   25,   23,   23,   25,\n /*  1700 */    25,   23,   60,   25,   23,   98,   25,  118,   84,   85,\n /*  1710 */    23,   23,   25,   25,   72,  154,   23,  156,   25,   23,\n /*  1720 */   228,   25,  195,  154,  155,  156,  157,  158,   86,  195,\n /*  1730 */   195,  258,  195,   91,  291,  322,  195,  195,  195,  195,\n /*  1740 */   195,  118,  195,  101,  195,  195,  195,  195,  238,  107,\n /*  1750 */   108,  195,  183,  195,  195,  195,  290,  115,  195,  117,\n /*  1760 */   118,  119,  244,  195,  122,  195,  195,  195,  195,  195,\n /*  1770 */   195,  258,  258,  258,  258,  193,  245,  300,  216,  274,\n /*  1780 */   247,  270,  270,  274,  296,  296,  248,  222,  262,  198,\n /*  1790 */   262,  274,   61,  274,  248,  231,  154,  155,  156,  157,\n /*  1800 */   158,    0,    1,    2,  247,  227,    5,  221,  221,  221,\n /*  1810 */   142,   10,   11,   12,   13,   14,  262,  262,   17,  202,\n /*  1820 */   300,   19,   20,  300,   22,  183,  247,  251,  251,  245,\n /*  1830 */   202,   30,   38,   32,  202,  152,  151,   22,   36,   43,\n /*  1840 */   236,   40,   18,  202,  239,  239,   18,  239,  239,  283,\n /*  1850 */   201,  150,  236,  202,  236,  201,  159,  202,  248,  248,\n /*  1860 */   248,  248,   60,   63,  201,  275,  273,  275,  273,  275,\n /*  1870 */    22,  286,   71,  223,   72,  202,  223,  297,  297,  202,\n /*  1880 */    79,  201,  116,   82,  220,  201,  220,  220,   65,  293,\n /*  1890 */   292,  229,   22,  166,  127,  226,   24,  114,  226,  223,\n /*  1900 */    99,  222,  202,  101,  285,   92,  220,  308,   83,  107,\n /*  1910 */   108,  220,  220,  316,  220,  285,  268,  115,  229,  117,\n /*  1920 */   118,  119,  223,  321,  122,  268,  149,  146,   22,   19,\n /*  1930 */    20,  202,   22,  159,  282,  134,  321,  148,  280,  147,\n /*  1940 */   139,  140,  252,  141,   25,  204,   36,  252,   13,  251,\n /*  1950 */   196,  248,  250,  249,  196,    6,  154,  155,  156,  157,\n /*  1960 */   158,  209,  194,  194,  163,  194,  306,  306,  303,  224,\n /*  1970 */    60,  215,  215,  209,  215,  215,  215,  224,  216,  216,\n /*  1980 */     4,  209,   72,    3,   22,  183,  164,   15,   23,   16,\n /*  1990 */    23,  140,  152,  131,   25,   24,  143,   20,   16,  145,\n /*  2000 */     1,  143,  131,   62,  131,   37,   54,  152,   54,   54,\n /*  2010 */    54,  101,  131,  117,    1,   34,  142,  107,  108,    5,\n /*  2020 */    22,  116,  162,   76,   41,  115,   69,  117,  118,  119,\n /*  2030 */     1,    2,  122,   25,    5,   69,  142,  116,   20,   10,\n /*  2040 */    11,   12,   13,   14,   24,   19,   17,  132,    5,  126,\n /*  2050 */    22,  141,   68,   10,   11,   12,   13,   14,   22,   30,\n /*  2060 */    17,   32,   22,   22,  154,  155,  156,  157,  158,   40,\n /*  2070 */    23,   68,   60,   30,   24,   32,   97,   28,   22,   68,\n /*  2080 */    23,   37,   34,   40,  150,   22,   25,   23,   23,   23,\n /*  2090 */    22,   98,  142,  183,   23,   23,   34,   22,   25,   89,\n /*  2100 */    71,   34,  117,  144,   34,   22,   76,   76,   79,   87,\n /*  2110 */    34,   82,   34,   44,   71,   94,   34,   23,   25,   24,\n /*  2120 */    34,   25,   79,   23,   23,   82,   23,   23,   99,  143,\n /*  2130 */   143,   22,   25,   25,   23,   22,   11,   22,   22,   25,\n /*  2140 */    23,   23,   99,   22,   22,  136,  142,  142,  142,   25,\n /*  2150 */    23,   15,    1,    1,  323,  323,  323,  323,  323,  323,\n /*  2160 */   323,  323,  323,  134,  323,  323,  323,  323,  139,  140,\n /*  2170 */   323,  323,  323,  323,  323,  323,  323,  134,  323,  323,\n /*  2180 */   323,  323,  139,  140,  323,  323,  323,  323,  323,  323,\n /*  2190 */   323,  323,  163,  323,  323,  323,  323,  323,  323,  323,\n /*  2200 */   323,  323,  323,  323,  323,  323,  163,  323,  323,  323,\n /*  2210 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2220 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2230 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2240 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2250 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2260 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2270 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2280 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2290 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2300 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2310 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2320 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2330 */   323,  323,  323,  323,  323,  323,  323,  323,  323,  323,\n /*  2340 */   323,  187,  187,  187,  187,  187,  187,  187,  187,  187,\n /*  2350 */   187,  187,  187,  187,  187,  187,  187,  187,  187,  187,\n /*  2360 */   187,  187,  187,  187,  187,  187,  187,  187,  187,  187,\n /*  2370 */   187,  187,  187,  187,  187,  187,  187,  187,  187,  187,\n /*  2380 */   187,  187,  187,  187,  187,  187,  187,  187,  187,  187,\n /*  2390 */   187,  187,  187,  187,\n};\n#define YY_SHIFT_COUNT    (582)\n#define YY_SHIFT_MIN      (0)\n#define YY_SHIFT_MAX      (2152)\nstatic const unsigned short int yy_shift_ofst[] = {\n /*     0 */  2029, 1801, 2043, 1380, 1380,  318,  271, 1496, 1569, 1642,\n /*    10 */   702,  702,  702,  740,  318,  318,  318,  318,  318,    0,\n /*    20 */     0,  216, 1177,  702,  702,  702,  702,  702,  702,  702,\n /*    30 */   702,  702,  702,  702,  702,  702,  702,  702,  503,  503,\n /*    40 */   111,  111,  217,  287,  348,  610,  610,  736,  736,  736,\n /*    50 */   736,   40,  112,  320,  340,  445,  489,  593,  637,  741,\n /*    60 */   785,  889,  909, 1023, 1043, 1157, 1177, 1177, 1177, 1177,\n /*    70 */  1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177,\n /*    80 */  1177, 1177, 1177, 1177, 1197, 1177, 1301, 1321, 1321,  554,\n /*    90 */  1802, 1910,  702,  702,  702,  702,  702,  702,  702,  702,\n /*   100 */   702,  702,  702,  702,  702,  702,  702,  702,  702,  702,\n /*   110 */   702,  702,  702,  702,  702,  702,  702,  702,  702,  702,\n /*   120 */   702,  702,  702,  702,  702,  702,  702,  702,  702,  702,\n /*   130 */   702,  702,  702,  702,  702,  702,  702,  702,  702,  702,\n /*   140 */   702,  702,  138,  198,  198,  198,  198,  198,  198,  198,\n /*   150 */   183,   99,  169,  549,  610,  151,  542,  610,  610, 1017,\n /*   160 */  1017,  610, 1001,  350,  464,  464,  464,  586,    1,    1,\n /*   170 */  2207, 2207,  854,  854,  854,  465,  694,  694,  694,  694,\n /*   180 */  1096, 1096,  825,  549,  847,  904,  610,  610,  610,  610,\n /*   190 */   610,  610,  610,  610,  610,  610,  610,  610,  610,  610,\n /*   200 */   610,  610,  610,  610,  610,  488,  947,  947,  610, 1129,\n /*   210 */   495,  495, 1139, 1139,  967,  967, 1173, 2207, 2207, 2207,\n /*   220 */  2207, 2207, 2207, 2207,  617,  765,  765,  697,  444,  708,\n /*   230 */   660,  745,  510,  663,  864,  610,  610,  610,  610,  610,\n /*   240 */   610,  610,  610,  610,  610,  188,  610,  610,  610,  610,\n /*   250 */   610,  610,  610,  610,  610,  610,  610,  610,  839,  839,\n /*   260 */   839,  610,  610,  610, 1155,  610,  610,  610, 1119, 1247,\n /*   270 */   610, 1353,  610,  610,  610,  610,  610,  610,  610,  610,\n /*   280 */  1063,  494, 1101,  291,  291,  291,  291, 1319, 1101, 1101,\n /*   290 */   775, 1221, 1375, 1452,  667, 1341, 1198, 1341, 1435, 1487,\n /*   300 */   667,  667, 1487,  667, 1198, 1435,  777, 1011, 1423,  584,\n /*   310 */   584,  584, 1273, 1273, 1273, 1273, 1471, 1471,  880, 1530,\n /*   320 */  1190, 1095, 1731, 1731, 1668, 1668, 1794, 1794, 1668, 1683,\n /*   330 */  1685, 1815, 1796, 1824, 1824, 1824, 1824, 1668, 1828, 1701,\n /*   340 */  1685, 1685, 1701, 1815, 1796, 1701, 1796, 1701, 1668, 1828,\n /*   350 */  1697, 1800, 1668, 1828, 1848, 1668, 1828, 1668, 1828, 1848,\n /*   360 */  1766, 1766, 1766, 1823, 1870, 1870, 1848, 1766, 1767, 1766,\n /*   370 */  1823, 1766, 1766, 1727, 1872, 1783, 1783, 1848, 1668, 1813,\n /*   380 */  1813, 1825, 1825, 1777, 1781, 1906, 1668, 1774, 1777, 1789,\n /*   390 */  1792, 1701, 1919, 1935, 1935, 1949, 1949, 1949, 2207, 2207,\n /*   400 */  2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 2207,\n /*   410 */  2207, 2207, 2207,   69, 1032,   79,  357, 1377, 1206,  400,\n /*   420 */  1525,  835,  332, 1540, 1437, 1539, 1536, 1548, 1583, 1620,\n /*   430 */  1633, 1670, 1671, 1674, 1567, 1553, 1682, 1506, 1675, 1358,\n /*   440 */  1607, 1589, 1678, 1681, 1624, 1687, 1688, 1283, 1561, 1693,\n /*   450 */  1696, 1623, 1521, 1976, 1980, 1962, 1822, 1972, 1973, 1965,\n /*   460 */  1967, 1851, 1840, 1862, 1969, 1969, 1971, 1853, 1977, 1854,\n /*   470 */  1982, 1999, 1858, 1871, 1969, 1873, 1941, 1968, 1969, 1855,\n /*   480 */  1952, 1954, 1955, 1956, 1881, 1896, 1981, 1874, 2013, 2014,\n /*   490 */  1998, 1905, 1860, 1957, 2008, 1966, 1947, 1983, 1894, 1921,\n /*   500 */  2020, 2018, 2026, 1915, 1923, 2028, 1984, 2036, 2040, 2047,\n /*   510 */  2041, 2003, 2012, 2050, 1979, 2049, 2056, 2011, 2044, 2057,\n /*   520 */  2048, 1934, 2063, 2064, 2065, 2061, 2066, 2068, 1993, 1950,\n /*   530 */  2071, 2072, 1985, 2062, 2075, 1959, 2073, 2067, 2070, 2076,\n /*   540 */  2078, 2010, 2030, 2022, 2069, 2031, 2021, 2082, 2094, 2083,\n /*   550 */  2095, 2093, 2096, 2086, 1986, 1987, 2100, 2073, 2101, 2103,\n /*   560 */  2104, 2109, 2107, 2108, 2111, 2113, 2125, 2115, 2116, 2117,\n /*   570 */  2118, 2121, 2122, 2114, 2009, 2004, 2005, 2006, 2124, 2127,\n /*   580 */  2136, 2151, 2152,\n};\n#define YY_REDUCE_COUNT (412)\n#define YY_REDUCE_MIN   (-277)\n#define YY_REDUCE_MAX   (1772)\nstatic const short yy_reduce_ofst[] = {\n /*     0 */   -67, 1252,  -64, -178, -181,  160, 1071,  143, -184,  137,\n /*    10 */   218,  220,  222, -174,  229,  268,  272,  275,  324, -208,\n /*    20 */   242, -277,  -39,   81,  537,  792,  810,  812, -189,  814,\n /*    30 */   831,  163,  865,  944,  887,  840,  964, 1077, -187,  292,\n /*    40 */  -133,  274,  673,  558,  682,  795,  809, -238, -232, -238,\n /*    50 */  -232,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*    60 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*    70 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*    80 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  557,\n /*    90 */   712,  949,  966,  969,  971,  979, 1097, 1099, 1103, 1142,\n /*   100 */  1144, 1169, 1172, 1201, 1203, 1228, 1241, 1250, 1253, 1255,\n /*   110 */  1261, 1266, 1271, 1282, 1291, 1308, 1310, 1312, 1322, 1328,\n /*   120 */  1347, 1354, 1356, 1359, 1362, 1365, 1367, 1374, 1376, 1381,\n /*   130 */  1401, 1403, 1406, 1412, 1414, 1417, 1421, 1428, 1447, 1449,\n /*   140 */  1453, 1462,  329,  329,  329,  329,  329,  329,  329,  329,\n /*   150 */   329,  329,  329,  -22, -159,  475, -220,  756,   38,  501,\n /*   160 */   841,  714,  329,  118,  337,  349,  363,  -56,  329,  329,\n /*   170 */   329,  329, -205, -205, -205,  687, -172, -130,  -57,  790,\n /*   180 */   397,  528, -271,  136,  596,  596,   90,  316,  522,  541,\n /*   190 */   -37,  715,  849,  977,  628,  856,  980,  991, 1081, 1102,\n /*   200 */  1135, 1083, -162,  208, 1258,  794,  -86,  159,   41, 1109,\n /*   210 */   671,  852,  844,  932, 1175, 1254,  480, 1180,  100,  258,\n /*   220 */  1265, 1268, 1216, 1287, -139,  317,  344,   63,  339,  423,\n /*   230 */   563,  636,  676,  813,  908,  914,  950, 1078, 1084, 1098,\n /*   240 */  1363, 1384, 1407, 1439, 1464,  411, 1527, 1534, 1535, 1537,\n /*   250 */  1541, 1542, 1543, 1544, 1545, 1547, 1549, 1550,  990, 1164,\n /*   260 */  1492, 1551, 1552, 1556, 1217, 1558, 1559, 1560, 1473, 1413,\n /*   270 */  1563, 1510, 1568,  563, 1570, 1571, 1572, 1573, 1574, 1575,\n /*   280 */  1443, 1466, 1518, 1513, 1514, 1515, 1516, 1217, 1518, 1518,\n /*   290 */  1531, 1562, 1582, 1477, 1505, 1511, 1533, 1512, 1488, 1538,\n /*   300 */  1509, 1517, 1546, 1519, 1557, 1489, 1565, 1564, 1578, 1586,\n /*   310 */  1587, 1588, 1526, 1528, 1554, 1555, 1576, 1577, 1566, 1579,\n /*   320 */  1584, 1591, 1520, 1523, 1617, 1628, 1580, 1581, 1632, 1585,\n /*   330 */  1590, 1593, 1604, 1605, 1606, 1608, 1609, 1641, 1649, 1610,\n /*   340 */  1592, 1594, 1611, 1595, 1616, 1612, 1618, 1613, 1651, 1654,\n /*   350 */  1596, 1598, 1655, 1663, 1650, 1673, 1680, 1677, 1684, 1653,\n /*   360 */  1664, 1666, 1667, 1662, 1669, 1672, 1676, 1686, 1679, 1691,\n /*   370 */  1689, 1692, 1694, 1597, 1599, 1619, 1630, 1699, 1700, 1602,\n /*   380 */  1615, 1648, 1657, 1690, 1698, 1658, 1729, 1652, 1695, 1702,\n /*   390 */  1704, 1703, 1741, 1754, 1758, 1768, 1769, 1771, 1660, 1661,\n /*   400 */  1665, 1752, 1756, 1757, 1759, 1760, 1764, 1745, 1753, 1762,\n /*   410 */  1763, 1761, 1772,\n};\nstatic const YYACTIONTYPE yy_default[] = {\n /*     0 */  1663, 1663, 1663, 1491, 1254, 1367, 1254, 1254, 1254, 1254,\n /*    10 */  1491, 1491, 1491, 1254, 1254, 1254, 1254, 1254, 1254, 1397,\n /*    20 */  1397, 1544, 1287, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*    30 */  1254, 1254, 1254, 1254, 1254, 1490, 1254, 1254, 1254, 1254,\n /*    40 */  1578, 1578, 1254, 1254, 1254, 1254, 1254, 1563, 1562, 1254,\n /*    50 */  1254, 1254, 1406, 1254, 1413, 1254, 1254, 1254, 1254, 1254,\n /*    60 */  1492, 1493, 1254, 1254, 1254, 1254, 1543, 1545, 1508, 1420,\n /*    70 */  1419, 1418, 1417, 1526, 1385, 1411, 1404, 1408, 1487, 1488,\n /*    80 */  1486, 1641, 1493, 1492, 1254, 1407, 1455, 1471, 1454, 1254,\n /*    90 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   100 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   110 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   120 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   130 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   140 */  1254, 1254, 1463, 1470, 1469, 1468, 1477, 1467, 1464, 1457,\n /*   150 */  1456, 1458, 1459, 1278, 1254, 1275, 1329, 1254, 1254, 1254,\n /*   160 */  1254, 1254, 1460, 1287, 1448, 1447, 1446, 1254, 1474, 1461,\n /*   170 */  1473, 1472, 1551, 1615, 1614, 1509, 1254, 1254, 1254, 1254,\n /*   180 */  1254, 1254, 1578, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   190 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   200 */  1254, 1254, 1254, 1254, 1254, 1387, 1578, 1578, 1254, 1287,\n /*   210 */  1578, 1578, 1388, 1388, 1283, 1283, 1391, 1558, 1358, 1358,\n /*   220 */  1358, 1358, 1367, 1358, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   230 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1548,\n /*   240 */  1546, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   250 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   260 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1363, 1254,\n /*   270 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1608,\n /*   280 */  1254, 1521, 1343, 1363, 1363, 1363, 1363, 1365, 1344, 1342,\n /*   290 */  1357, 1288, 1261, 1655, 1423, 1412, 1364, 1412, 1652, 1410,\n /*   300 */  1423, 1423, 1410, 1423, 1364, 1652, 1304, 1630, 1299, 1397,\n /*   310 */  1397, 1397, 1387, 1387, 1387, 1387, 1391, 1391, 1489, 1364,\n /*   320 */  1357, 1254, 1655, 1655, 1373, 1373, 1654, 1654, 1373, 1509,\n /*   330 */  1638, 1432, 1332, 1338, 1338, 1338, 1338, 1373, 1272, 1410,\n /*   340 */  1638, 1638, 1410, 1432, 1332, 1410, 1332, 1410, 1373, 1272,\n /*   350 */  1525, 1649, 1373, 1272, 1499, 1373, 1272, 1373, 1272, 1499,\n /*   360 */  1330, 1330, 1330, 1319, 1254, 1254, 1499, 1330, 1304, 1330,\n /*   370 */  1319, 1330, 1330, 1596, 1254, 1503, 1503, 1499, 1373, 1588,\n /*   380 */  1588, 1400, 1400, 1405, 1391, 1494, 1373, 1254, 1405, 1403,\n /*   390 */  1401, 1410, 1322, 1611, 1611, 1607, 1607, 1607, 1660, 1660,\n /*   400 */  1558, 1623, 1287, 1287, 1287, 1287, 1623, 1306, 1306, 1288,\n /*   410 */  1288, 1287, 1623, 1254, 1254, 1254, 1254, 1254, 1254, 1618,\n /*   420 */  1254, 1553, 1510, 1377, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   430 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   440 */  1564, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   450 */  1254, 1254, 1437, 1254, 1257, 1555, 1254, 1254, 1254, 1254,\n /*   460 */  1254, 1254, 1254, 1254, 1414, 1415, 1378, 1254, 1254, 1254,\n /*   470 */  1254, 1254, 1254, 1254, 1429, 1254, 1254, 1254, 1424, 1254,\n /*   480 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1651, 1254, 1254,\n /*   490 */  1254, 1254, 1254, 1254, 1524, 1523, 1254, 1254, 1375, 1254,\n /*   500 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   510 */  1254, 1254, 1302, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   520 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   530 */  1254, 1254, 1254, 1254, 1254, 1254, 1402, 1254, 1254, 1254,\n /*   540 */  1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   550 */  1254, 1593, 1392, 1254, 1254, 1254, 1254, 1642, 1254, 1254,\n /*   560 */  1254, 1254, 1352, 1254, 1254, 1254, 1254, 1254, 1254, 1254,\n /*   570 */  1254, 1254, 1254, 1634, 1346, 1438, 1254, 1441, 1276, 1254,\n /*   580 */  1266, 1254, 1254,\n};\n/********** End of lemon-generated parsing tables *****************************/\n\n/* The next table maps tokens (terminal symbols) into fallback tokens.\n** If a construct like the following:\n**\n**      %fallback ID X Y Z.\n**\n** appears in the grammar, then ID becomes a fallback token for X, Y,\n** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser\n** but it does not parse, the type of the token is changed to ID and\n** the parse is retried before an error is thrown.\n**\n** This feature can be used, for example, to cause some keywords in a language\n** to revert to identifiers if they keyword does not apply in the context where\n** it appears.\n*/\n#ifdef YYFALLBACK\nstatic const YYCODETYPE yyFallback[] = {\n    0,  /*          $ => nothing */\n    0,  /*       SEMI => nothing */\n   60,  /*    EXPLAIN => ID */\n   60,  /*      QUERY => ID */\n   60,  /*       PLAN => ID */\n   60,  /*      BEGIN => ID */\n    0,  /* TRANSACTION => nothing */\n   60,  /*   DEFERRED => ID */\n   60,  /*  IMMEDIATE => ID */\n   60,  /*  EXCLUSIVE => ID */\n    0,  /*     COMMIT => nothing */\n   60,  /*        END => ID */\n   60,  /*   ROLLBACK => ID */\n   60,  /*  SAVEPOINT => ID */\n   60,  /*    RELEASE => ID */\n    0,  /*         TO => nothing */\n    0,  /*      TABLE => nothing */\n    0,  /*     CREATE => nothing */\n   60,  /*         IF => ID */\n    0,  /*        NOT => nothing */\n    0,  /*     EXISTS => nothing */\n   60,  /*       TEMP => ID */\n    0,  /*         LP => nothing */\n    0,  /*         RP => nothing */\n    0,  /*         AS => nothing */\n    0,  /*      COMMA => nothing */\n   60,  /*    WITHOUT => ID */\n   60,  /*      ABORT => ID */\n   60,  /*     ACTION => ID */\n   60,  /*      AFTER => ID */\n   60,  /*    ANALYZE => ID */\n   60,  /*        ASC => ID */\n   60,  /*     ATTACH => ID */\n   60,  /*     BEFORE => ID */\n   60,  /*         BY => ID */\n   60,  /*    CASCADE => ID */\n   60,  /*       CAST => ID */\n   60,  /*   CONFLICT => ID */\n   60,  /*   DATABASE => ID */\n   60,  /*       DESC => ID */\n   60,  /*     DETACH => ID */\n   60,  /*       EACH => ID */\n   60,  /*       FAIL => ID */\n    0,  /*         OR => nothing */\n    0,  /*        AND => nothing */\n    0,  /*         IS => nothing */\n    0,  /*      ISNOT => nothing */\n   60,  /*      MATCH => ID */\n   60,  /*    LIKE_KW => ID */\n    0,  /*    BETWEEN => nothing */\n    0,  /*         IN => nothing */\n    0,  /*     ISNULL => nothing */\n    0,  /*    NOTNULL => nothing */\n    0,  /*         NE => nothing */\n    0,  /*         EQ => nothing */\n    0,  /*         GT => nothing */\n    0,  /*         LE => nothing */\n    0,  /*         LT => nothing */\n    0,  /*         GE => nothing */\n    0,  /*     ESCAPE => nothing */\n    0,  /*         ID => nothing */\n   60,  /*   COLUMNKW => ID */\n   60,  /*         DO => ID */\n   60,  /*        FOR => ID */\n   60,  /*     IGNORE => ID */\n   60,  /*  INITIALLY => ID */\n   60,  /*    INSTEAD => ID */\n   60,  /*         NO => ID */\n   60,  /*        KEY => ID */\n   60,  /*         OF => ID */\n   60,  /*     OFFSET => ID */\n   60,  /*     PRAGMA => ID */\n   60,  /*      RAISE => ID */\n   60,  /*  RECURSIVE => ID */\n   60,  /*    REPLACE => ID */\n   60,  /*   RESTRICT => ID */\n   60,  /*        ROW => ID */\n   60,  /*       ROWS => ID */\n   60,  /*    TRIGGER => ID */\n   60,  /*     VACUUM => ID */\n   60,  /*       VIEW => ID */\n   60,  /*    VIRTUAL => ID */\n   60,  /*       WITH => ID */\n   60,  /*      NULLS => ID */\n   60,  /*      FIRST => ID */\n   60,  /*       LAST => ID */\n   60,  /*    CURRENT => ID */\n   60,  /*  FOLLOWING => ID */\n   60,  /*  PARTITION => ID */\n   60,  /*  PRECEDING => ID */\n   60,  /*      RANGE => ID */\n   60,  /*  UNBOUNDED => ID */\n   60,  /*    EXCLUDE => ID */\n   60,  /*     GROUPS => ID */\n   60,  /*     OTHERS => ID */\n   60,  /*       TIES => ID */\n   60,  /*  GENERATED => ID */\n   60,  /*     ALWAYS => ID */\n   60,  /* MATERIALIZED => ID */\n   60,  /*    REINDEX => ID */\n   60,  /*     RENAME => ID */\n   60,  /*   CTIME_KW => ID */\n    0,  /*        ANY => nothing */\n    0,  /*     BITAND => nothing */\n    0,  /*      BITOR => nothing */\n    0,  /*     LSHIFT => nothing */\n    0,  /*     RSHIFT => nothing */\n    0,  /*       PLUS => nothing */\n    0,  /*      MINUS => nothing */\n    0,  /*       STAR => nothing */\n    0,  /*      SLASH => nothing */\n    0,  /*        REM => nothing */\n    0,  /*     CONCAT => nothing */\n    0,  /*        PTR => nothing */\n    0,  /*    COLLATE => nothing */\n    0,  /*     BITNOT => nothing */\n    0,  /*         ON => nothing */\n    0,  /*    INDEXED => nothing */\n    0,  /*     STRING => nothing */\n    0,  /*    JOIN_KW => nothing */\n    0,  /* CONSTRAINT => nothing */\n    0,  /*    DEFAULT => nothing */\n    0,  /*       NULL => nothing */\n    0,  /*    PRIMARY => nothing */\n    0,  /*     UNIQUE => nothing */\n    0,  /*      CHECK => nothing */\n    0,  /* REFERENCES => nothing */\n    0,  /*   AUTOINCR => nothing */\n    0,  /*     INSERT => nothing */\n    0,  /*     DELETE => nothing */\n    0,  /*     UPDATE => nothing */\n    0,  /*        SET => nothing */\n    0,  /* DEFERRABLE => nothing */\n    0,  /*    FOREIGN => nothing */\n    0,  /*       DROP => nothing */\n    0,  /*      UNION => nothing */\n    0,  /*        ALL => nothing */\n    0,  /*     EXCEPT => nothing */\n    0,  /*  INTERSECT => nothing */\n    0,  /*     SELECT => nothing */\n    0,  /*     VALUES => nothing */\n    0,  /*   DISTINCT => nothing */\n    0,  /*        DOT => nothing */\n    0,  /*       FROM => nothing */\n    0,  /*       JOIN => nothing */\n    0,  /*      USING => nothing */\n    0,  /*      ORDER => nothing */\n    0,  /*      GROUP => nothing */\n    0,  /*     HAVING => nothing */\n    0,  /*      LIMIT => nothing */\n    0,  /*      WHERE => nothing */\n    0,  /*  RETURNING => nothing */\n    0,  /*       INTO => nothing */\n    0,  /*    NOTHING => nothing */\n    0,  /*      FLOAT => nothing */\n    0,  /*       BLOB => nothing */\n    0,  /*    INTEGER => nothing */\n    0,  /*   VARIABLE => nothing */\n    0,  /*       CASE => nothing */\n    0,  /*       WHEN => nothing */\n    0,  /*       THEN => nothing */\n    0,  /*       ELSE => nothing */\n    0,  /*      INDEX => nothing */\n    0,  /*      ALTER => nothing */\n    0,  /*        ADD => nothing */\n    0,  /*     WINDOW => nothing */\n    0,  /*       OVER => nothing */\n    0,  /*     FILTER => nothing */\n    0,  /*     COLUMN => nothing */\n    0,  /* AGG_FUNCTION => nothing */\n    0,  /* AGG_COLUMN => nothing */\n    0,  /*  TRUEFALSE => nothing */\n    0,  /*   FUNCTION => nothing */\n    0,  /*      UPLUS => nothing */\n    0,  /*     UMINUS => nothing */\n    0,  /*      TRUTH => nothing */\n    0,  /*   REGISTER => nothing */\n    0,  /*     VECTOR => nothing */\n    0,  /* SELECT_COLUMN => nothing */\n    0,  /* IF_NULL_ROW => nothing */\n    0,  /*   ASTERISK => nothing */\n    0,  /*       SPAN => nothing */\n    0,  /*      ERROR => nothing */\n    0,  /*    QNUMBER => nothing */\n    0,  /*      SPACE => nothing */\n    0,  /*    COMMENT => nothing */\n    0,  /*    ILLEGAL => nothing */\n};\n#endif /* YYFALLBACK */\n\n/* The following structure represents a single element of the\n** parser's stack.  Information stored includes:\n**\n**   +  The state number for the parser at this level of the stack.\n**\n**   +  The value of the token stored at this level of the stack.\n**      (In other words, the \"major\" token.)\n**\n**   +  The semantic value stored at this level of the stack.  This is\n**      the information used by the action routines in the grammar.\n**      It is sometimes called the \"minor\" token.\n**\n** After the \"shift\" half of a SHIFTREDUCE action, the stateno field\n** actually contains the reduce action for the second half of the\n** SHIFTREDUCE.\n*/\nstruct yyStackEntry {\n  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */\n  YYCODETYPE major;      /* The major token value.  This is the code\n                         ** number for the token at this stack level */\n  YYMINORTYPE minor;     /* The user-supplied minor token value.  This\n                         ** is the value of the token  */\n};\ntypedef struct yyStackEntry yyStackEntry;\n\n/* The state of the parser is completely contained in an instance of\n** the following structure */\nstruct yyParser {\n  yyStackEntry *yytos;          /* Pointer to top element of the stack */\n#ifdef YYTRACKMAXSTACKDEPTH\n  int yyhwm;                    /* High-water mark of the stack */\n#endif\n#ifndef YYNOERRORRECOVERY\n  int yyerrcnt;                 /* Shifts left before out of the error */\n#endif\n  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */\n  sqlite3ParserCTX_SDECL                /* A place to hold %extra_context */\n  yyStackEntry *yystackEnd;           /* Last entry in the stack */\n  yyStackEntry *yystack;              /* The parser stack */\n  yyStackEntry yystk0[YYSTACKDEPTH];  /* Initial stack space */\n};\ntypedef struct yyParser yyParser;\n\n/* #include <assert.h> */\n#ifndef NDEBUG\n/* #include <stdio.h> */\nstatic FILE *yyTraceFILE = 0;\nstatic char *yyTracePrompt = 0;\n#endif /* NDEBUG */\n\n#ifndef NDEBUG\n/*\n** Turn parser tracing on by giving a stream to which to write the trace\n** and a prompt to preface each trace message.  Tracing is turned off\n** by making either argument NULL\n**\n** Inputs:\n** <ul>\n** <li> A FILE* to which trace output should be written.\n**      If NULL, then tracing is turned off.\n** <li> A prefix string written at the beginning of every\n**      line of trace output.  If NULL, then tracing is\n**      turned off.\n** </ul>\n**\n** Outputs:\n** None.\n*/\nSQLITE_PRIVATE void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){\n  yyTraceFILE = TraceFILE;\n  yyTracePrompt = zTracePrompt;\n  if( yyTraceFILE==0 ) yyTracePrompt = 0;\n  else if( yyTracePrompt==0 ) yyTraceFILE = 0;\n}\n#endif /* NDEBUG */\n\n#if defined(YYCOVERAGE) || !defined(NDEBUG)\n/* For tracing shifts, the names of all terminals and nonterminals\n** are required.  The following table supplies these names */\nstatic const char *const yyTokenName[] = {\n  /*    0 */ \"$\",\n  /*    1 */ \"SEMI\",\n  /*    2 */ \"EXPLAIN\",\n  /*    3 */ \"QUERY\",\n  /*    4 */ \"PLAN\",\n  /*    5 */ \"BEGIN\",\n  /*    6 */ \"TRANSACTION\",\n  /*    7 */ \"DEFERRED\",\n  /*    8 */ \"IMMEDIATE\",\n  /*    9 */ \"EXCLUSIVE\",\n  /*   10 */ \"COMMIT\",\n  /*   11 */ \"END\",\n  /*   12 */ \"ROLLBACK\",\n  /*   13 */ \"SAVEPOINT\",\n  /*   14 */ \"RELEASE\",\n  /*   15 */ \"TO\",\n  /*   16 */ \"TABLE\",\n  /*   17 */ \"CREATE\",\n  /*   18 */ \"IF\",\n  /*   19 */ \"NOT\",\n  /*   20 */ \"EXISTS\",\n  /*   21 */ \"TEMP\",\n  /*   22 */ \"LP\",\n  /*   23 */ \"RP\",\n  /*   24 */ \"AS\",\n  /*   25 */ \"COMMA\",\n  /*   26 */ \"WITHOUT\",\n  /*   27 */ \"ABORT\",\n  /*   28 */ \"ACTION\",\n  /*   29 */ \"AFTER\",\n  /*   30 */ \"ANALYZE\",\n  /*   31 */ \"ASC\",\n  /*   32 */ \"ATTACH\",\n  /*   33 */ \"BEFORE\",\n  /*   34 */ \"BY\",\n  /*   35 */ \"CASCADE\",\n  /*   36 */ \"CAST\",\n  /*   37 */ \"CONFLICT\",\n  /*   38 */ \"DATABASE\",\n  /*   39 */ \"DESC\",\n  /*   40 */ \"DETACH\",\n  /*   41 */ \"EACH\",\n  /*   42 */ \"FAIL\",\n  /*   43 */ \"OR\",\n  /*   44 */ \"AND\",\n  /*   45 */ \"IS\",\n  /*   46 */ \"ISNOT\",\n  /*   47 */ \"MATCH\",\n  /*   48 */ \"LIKE_KW\",\n  /*   49 */ \"BETWEEN\",\n  /*   50 */ \"IN\",\n  /*   51 */ \"ISNULL\",\n  /*   52 */ \"NOTNULL\",\n  /*   53 */ \"NE\",\n  /*   54 */ \"EQ\",\n  /*   55 */ \"GT\",\n  /*   56 */ \"LE\",\n  /*   57 */ \"LT\",\n  /*   58 */ \"GE\",\n  /*   59 */ \"ESCAPE\",\n  /*   60 */ \"ID\",\n  /*   61 */ \"COLUMNKW\",\n  /*   62 */ \"DO\",\n  /*   63 */ \"FOR\",\n  /*   64 */ \"IGNORE\",\n  /*   65 */ \"INITIALLY\",\n  /*   66 */ \"INSTEAD\",\n  /*   67 */ \"NO\",\n  /*   68 */ \"KEY\",\n  /*   69 */ \"OF\",\n  /*   70 */ \"OFFSET\",\n  /*   71 */ \"PRAGMA\",\n  /*   72 */ \"RAISE\",\n  /*   73 */ \"RECURSIVE\",\n  /*   74 */ \"REPLACE\",\n  /*   75 */ \"RESTRICT\",\n  /*   76 */ \"ROW\",\n  /*   77 */ \"ROWS\",\n  /*   78 */ \"TRIGGER\",\n  /*   79 */ \"VACUUM\",\n  /*   80 */ \"VIEW\",\n  /*   81 */ \"VIRTUAL\",\n  /*   82 */ \"WITH\",\n  /*   83 */ \"NULLS\",\n  /*   84 */ \"FIRST\",\n  /*   85 */ \"LAST\",\n  /*   86 */ \"CURRENT\",\n  /*   87 */ \"FOLLOWING\",\n  /*   88 */ \"PARTITION\",\n  /*   89 */ \"PRECEDING\",\n  /*   90 */ \"RANGE\",\n  /*   91 */ \"UNBOUNDED\",\n  /*   92 */ \"EXCLUDE\",\n  /*   93 */ \"GROUPS\",\n  /*   94 */ \"OTHERS\",\n  /*   95 */ \"TIES\",\n  /*   96 */ \"GENERATED\",\n  /*   97 */ \"ALWAYS\",\n  /*   98 */ \"MATERIALIZED\",\n  /*   99 */ \"REINDEX\",\n  /*  100 */ \"RENAME\",\n  /*  101 */ \"CTIME_KW\",\n  /*  102 */ \"ANY\",\n  /*  103 */ \"BITAND\",\n  /*  104 */ \"BITOR\",\n  /*  105 */ \"LSHIFT\",\n  /*  106 */ \"RSHIFT\",\n  /*  107 */ \"PLUS\",\n  /*  108 */ \"MINUS\",\n  /*  109 */ \"STAR\",\n  /*  110 */ \"SLASH\",\n  /*  111 */ \"REM\",\n  /*  112 */ \"CONCAT\",\n  /*  113 */ \"PTR\",\n  /*  114 */ \"COLLATE\",\n  /*  115 */ \"BITNOT\",\n  /*  116 */ \"ON\",\n  /*  117 */ \"INDEXED\",\n  /*  118 */ \"STRING\",\n  /*  119 */ \"JOIN_KW\",\n  /*  120 */ \"CONSTRAINT\",\n  /*  121 */ \"DEFAULT\",\n  /*  122 */ \"NULL\",\n  /*  123 */ \"PRIMARY\",\n  /*  124 */ \"UNIQUE\",\n  /*  125 */ \"CHECK\",\n  /*  126 */ \"REFERENCES\",\n  /*  127 */ \"AUTOINCR\",\n  /*  128 */ \"INSERT\",\n  /*  129 */ \"DELETE\",\n  /*  130 */ \"UPDATE\",\n  /*  131 */ \"SET\",\n  /*  132 */ \"DEFERRABLE\",\n  /*  133 */ \"FOREIGN\",\n  /*  134 */ \"DROP\",\n  /*  135 */ \"UNION\",\n  /*  136 */ \"ALL\",\n  /*  137 */ \"EXCEPT\",\n  /*  138 */ \"INTERSECT\",\n  /*  139 */ \"SELECT\",\n  /*  140 */ \"VALUES\",\n  /*  141 */ \"DISTINCT\",\n  /*  142 */ \"DOT\",\n  /*  143 */ \"FROM\",\n  /*  144 */ \"JOIN\",\n  /*  145 */ \"USING\",\n  /*  146 */ \"ORDER\",\n  /*  147 */ \"GROUP\",\n  /*  148 */ \"HAVING\",\n  /*  149 */ \"LIMIT\",\n  /*  150 */ \"WHERE\",\n  /*  151 */ \"RETURNING\",\n  /*  152 */ \"INTO\",\n  /*  153 */ \"NOTHING\",\n  /*  154 */ \"FLOAT\",\n  /*  155 */ \"BLOB\",\n  /*  156 */ \"INTEGER\",\n  /*  157 */ \"VARIABLE\",\n  /*  158 */ \"CASE\",\n  /*  159 */ \"WHEN\",\n  /*  160 */ \"THEN\",\n  /*  161 */ \"ELSE\",\n  /*  162 */ \"INDEX\",\n  /*  163 */ \"ALTER\",\n  /*  164 */ \"ADD\",\n  /*  165 */ \"WINDOW\",\n  /*  166 */ \"OVER\",\n  /*  167 */ \"FILTER\",\n  /*  168 */ \"COLUMN\",\n  /*  169 */ \"AGG_FUNCTION\",\n  /*  170 */ \"AGG_COLUMN\",\n  /*  171 */ \"TRUEFALSE\",\n  /*  172 */ \"FUNCTION\",\n  /*  173 */ \"UPLUS\",\n  /*  174 */ \"UMINUS\",\n  /*  175 */ \"TRUTH\",\n  /*  176 */ \"REGISTER\",\n  /*  177 */ \"VECTOR\",\n  /*  178 */ \"SELECT_COLUMN\",\n  /*  179 */ \"IF_NULL_ROW\",\n  /*  180 */ \"ASTERISK\",\n  /*  181 */ \"SPAN\",\n  /*  182 */ \"ERROR\",\n  /*  183 */ \"QNUMBER\",\n  /*  184 */ \"SPACE\",\n  /*  185 */ \"COMMENT\",\n  /*  186 */ \"ILLEGAL\",\n  /*  187 */ \"input\",\n  /*  188 */ \"cmdlist\",\n  /*  189 */ \"ecmd\",\n  /*  190 */ \"cmdx\",\n  /*  191 */ \"explain\",\n  /*  192 */ \"cmd\",\n  /*  193 */ \"transtype\",\n  /*  194 */ \"trans_opt\",\n  /*  195 */ \"nm\",\n  /*  196 */ \"savepoint_opt\",\n  /*  197 */ \"create_table\",\n  /*  198 */ \"create_table_args\",\n  /*  199 */ \"createkw\",\n  /*  200 */ \"temp\",\n  /*  201 */ \"ifnotexists\",\n  /*  202 */ \"dbnm\",\n  /*  203 */ \"columnlist\",\n  /*  204 */ \"conslist_opt\",\n  /*  205 */ \"table_option_set\",\n  /*  206 */ \"select\",\n  /*  207 */ \"table_option\",\n  /*  208 */ \"columnname\",\n  /*  209 */ \"carglist\",\n  /*  210 */ \"typetoken\",\n  /*  211 */ \"typename\",\n  /*  212 */ \"signed\",\n  /*  213 */ \"plus_num\",\n  /*  214 */ \"minus_num\",\n  /*  215 */ \"scanpt\",\n  /*  216 */ \"scantok\",\n  /*  217 */ \"ccons\",\n  /*  218 */ \"term\",\n  /*  219 */ \"expr\",\n  /*  220 */ \"onconf\",\n  /*  221 */ \"sortorder\",\n  /*  222 */ \"autoinc\",\n  /*  223 */ \"eidlist_opt\",\n  /*  224 */ \"refargs\",\n  /*  225 */ \"defer_subclause\",\n  /*  226 */ \"generated\",\n  /*  227 */ \"refarg\",\n  /*  228 */ \"refact\",\n  /*  229 */ \"init_deferred_pred_opt\",\n  /*  230 */ \"conslist\",\n  /*  231 */ \"tconscomma\",\n  /*  232 */ \"tcons\",\n  /*  233 */ \"sortlist\",\n  /*  234 */ \"eidlist\",\n  /*  235 */ \"defer_subclause_opt\",\n  /*  236 */ \"orconf\",\n  /*  237 */ \"resolvetype\",\n  /*  238 */ \"raisetype\",\n  /*  239 */ \"ifexists\",\n  /*  240 */ \"fullname\",\n  /*  241 */ \"selectnowith\",\n  /*  242 */ \"oneselect\",\n  /*  243 */ \"wqlist\",\n  /*  244 */ \"multiselect_op\",\n  /*  245 */ \"distinct\",\n  /*  246 */ \"selcollist\",\n  /*  247 */ \"from\",\n  /*  248 */ \"where_opt\",\n  /*  249 */ \"groupby_opt\",\n  /*  250 */ \"having_opt\",\n  /*  251 */ \"orderby_opt\",\n  /*  252 */ \"limit_opt\",\n  /*  253 */ \"window_clause\",\n  /*  254 */ \"values\",\n  /*  255 */ \"nexprlist\",\n  /*  256 */ \"mvalues\",\n  /*  257 */ \"sclp\",\n  /*  258 */ \"as\",\n  /*  259 */ \"seltablist\",\n  /*  260 */ \"stl_prefix\",\n  /*  261 */ \"joinop\",\n  /*  262 */ \"on_using\",\n  /*  263 */ \"indexed_by\",\n  /*  264 */ \"exprlist\",\n  /*  265 */ \"xfullname\",\n  /*  266 */ \"idlist\",\n  /*  267 */ \"indexed_opt\",\n  /*  268 */ \"nulls\",\n  /*  269 */ \"with\",\n  /*  270 */ \"where_opt_ret\",\n  /*  271 */ \"setlist\",\n  /*  272 */ \"insert_cmd\",\n  /*  273 */ \"idlist_opt\",\n  /*  274 */ \"upsert\",\n  /*  275 */ \"returning\",\n  /*  276 */ \"filter_over\",\n  /*  277 */ \"likeop\",\n  /*  278 */ \"between_op\",\n  /*  279 */ \"in_op\",\n  /*  280 */ \"paren_exprlist\",\n  /*  281 */ \"case_operand\",\n  /*  282 */ \"case_exprlist\",\n  /*  283 */ \"case_else\",\n  /*  284 */ \"uniqueflag\",\n  /*  285 */ \"collate\",\n  /*  286 */ \"vinto\",\n  /*  287 */ \"nmnum\",\n  /*  288 */ \"trigger_decl\",\n  /*  289 */ \"trigger_cmd_list\",\n  /*  290 */ \"trigger_time\",\n  /*  291 */ \"trigger_event\",\n  /*  292 */ \"foreach_clause\",\n  /*  293 */ \"when_clause\",\n  /*  294 */ \"trigger_cmd\",\n  /*  295 */ \"trnm\",\n  /*  296 */ \"tridxby\",\n  /*  297 */ \"database_kw_opt\",\n  /*  298 */ \"key_opt\",\n  /*  299 */ \"add_column_fullname\",\n  /*  300 */ \"kwcolumn_opt\",\n  /*  301 */ \"create_vtab\",\n  /*  302 */ \"vtabarglist\",\n  /*  303 */ \"vtabarg\",\n  /*  304 */ \"vtabargtoken\",\n  /*  305 */ \"lp\",\n  /*  306 */ \"anylist\",\n  /*  307 */ \"wqitem\",\n  /*  308 */ \"wqas\",\n  /*  309 */ \"withnm\",\n  /*  310 */ \"windowdefn_list\",\n  /*  311 */ \"windowdefn\",\n  /*  312 */ \"window\",\n  /*  313 */ \"frame_opt\",\n  /*  314 */ \"part_opt\",\n  /*  315 */ \"filter_clause\",\n  /*  316 */ \"over_clause\",\n  /*  317 */ \"range_or_rows\",\n  /*  318 */ \"frame_bound\",\n  /*  319 */ \"frame_bound_s\",\n  /*  320 */ \"frame_bound_e\",\n  /*  321 */ \"frame_exclude_opt\",\n  /*  322 */ \"frame_exclude\",\n};\n#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */\n\n#ifndef NDEBUG\n/* For tracing reduce actions, the names of all rules are required.\n*/\nstatic const char *const yyRuleName[] = {\n /*   0 */ \"explain ::= EXPLAIN\",\n /*   1 */ \"explain ::= EXPLAIN QUERY PLAN\",\n /*   2 */ \"cmdx ::= cmd\",\n /*   3 */ \"cmd ::= BEGIN transtype trans_opt\",\n /*   4 */ \"transtype ::=\",\n /*   5 */ \"transtype ::= DEFERRED\",\n /*   6 */ \"transtype ::= IMMEDIATE\",\n /*   7 */ \"transtype ::= EXCLUSIVE\",\n /*   8 */ \"cmd ::= COMMIT|END trans_opt\",\n /*   9 */ \"cmd ::= ROLLBACK trans_opt\",\n /*  10 */ \"cmd ::= SAVEPOINT nm\",\n /*  11 */ \"cmd ::= RELEASE savepoint_opt nm\",\n /*  12 */ \"cmd ::= ROLLBACK trans_opt TO savepoint_opt nm\",\n /*  13 */ \"create_table ::= createkw temp TABLE ifnotexists nm dbnm\",\n /*  14 */ \"createkw ::= CREATE\",\n /*  15 */ \"ifnotexists ::=\",\n /*  16 */ \"ifnotexists ::= IF NOT EXISTS\",\n /*  17 */ \"temp ::= TEMP\",\n /*  18 */ \"temp ::=\",\n /*  19 */ \"create_table_args ::= LP columnlist conslist_opt RP table_option_set\",\n /*  20 */ \"create_table_args ::= AS select\",\n /*  21 */ \"table_option_set ::=\",\n /*  22 */ \"table_option_set ::= table_option_set COMMA table_option\",\n /*  23 */ \"table_option ::= WITHOUT nm\",\n /*  24 */ \"table_option ::= nm\",\n /*  25 */ \"columnname ::= nm typetoken\",\n /*  26 */ \"typetoken ::=\",\n /*  27 */ \"typetoken ::= typename LP signed RP\",\n /*  28 */ \"typetoken ::= typename LP signed COMMA signed RP\",\n /*  29 */ \"typename ::= typename ID|STRING\",\n /*  30 */ \"scanpt ::=\",\n /*  31 */ \"scantok ::=\",\n /*  32 */ \"ccons ::= CONSTRAINT nm\",\n /*  33 */ \"ccons ::= DEFAULT scantok term\",\n /*  34 */ \"ccons ::= DEFAULT LP expr RP\",\n /*  35 */ \"ccons ::= DEFAULT PLUS scantok term\",\n /*  36 */ \"ccons ::= DEFAULT MINUS scantok term\",\n /*  37 */ \"ccons ::= DEFAULT scantok ID|INDEXED\",\n /*  38 */ \"ccons ::= NOT NULL onconf\",\n /*  39 */ \"ccons ::= PRIMARY KEY sortorder onconf autoinc\",\n /*  40 */ \"ccons ::= UNIQUE onconf\",\n /*  41 */ \"ccons ::= CHECK LP expr RP\",\n /*  42 */ \"ccons ::= REFERENCES nm eidlist_opt refargs\",\n /*  43 */ \"ccons ::= defer_subclause\",\n /*  44 */ \"ccons ::= COLLATE ID|STRING\",\n /*  45 */ \"generated ::= LP expr RP\",\n /*  46 */ \"generated ::= LP expr RP ID\",\n /*  47 */ \"autoinc ::=\",\n /*  48 */ \"autoinc ::= AUTOINCR\",\n /*  49 */ \"refargs ::=\",\n /*  50 */ \"refargs ::= refargs refarg\",\n /*  51 */ \"refarg ::= MATCH nm\",\n /*  52 */ \"refarg ::= ON INSERT refact\",\n /*  53 */ \"refarg ::= ON DELETE refact\",\n /*  54 */ \"refarg ::= ON UPDATE refact\",\n /*  55 */ \"refact ::= SET NULL\",\n /*  56 */ \"refact ::= SET DEFAULT\",\n /*  57 */ \"refact ::= CASCADE\",\n /*  58 */ \"refact ::= RESTRICT\",\n /*  59 */ \"refact ::= NO ACTION\",\n /*  60 */ \"defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt\",\n /*  61 */ \"defer_subclause ::= DEFERRABLE init_deferred_pred_opt\",\n /*  62 */ \"init_deferred_pred_opt ::=\",\n /*  63 */ \"init_deferred_pred_opt ::= INITIALLY DEFERRED\",\n /*  64 */ \"init_deferred_pred_opt ::= INITIALLY IMMEDIATE\",\n /*  65 */ \"conslist_opt ::=\",\n /*  66 */ \"tconscomma ::= COMMA\",\n /*  67 */ \"tcons ::= CONSTRAINT nm\",\n /*  68 */ \"tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf\",\n /*  69 */ \"tcons ::= UNIQUE LP sortlist RP onconf\",\n /*  70 */ \"tcons ::= CHECK LP expr RP onconf\",\n /*  71 */ \"tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt\",\n /*  72 */ \"defer_subclause_opt ::=\",\n /*  73 */ \"onconf ::=\",\n /*  74 */ \"onconf ::= ON CONFLICT resolvetype\",\n /*  75 */ \"orconf ::=\",\n /*  76 */ \"orconf ::= OR resolvetype\",\n /*  77 */ \"resolvetype ::= IGNORE\",\n /*  78 */ \"resolvetype ::= REPLACE\",\n /*  79 */ \"cmd ::= DROP TABLE ifexists fullname\",\n /*  80 */ \"ifexists ::= IF EXISTS\",\n /*  81 */ \"ifexists ::=\",\n /*  82 */ \"cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select\",\n /*  83 */ \"cmd ::= DROP VIEW ifexists fullname\",\n /*  84 */ \"cmd ::= select\",\n /*  85 */ \"select ::= WITH wqlist selectnowith\",\n /*  86 */ \"select ::= WITH RECURSIVE wqlist selectnowith\",\n /*  87 */ \"select ::= selectnowith\",\n /*  88 */ \"selectnowith ::= selectnowith multiselect_op oneselect\",\n /*  89 */ \"multiselect_op ::= UNION\",\n /*  90 */ \"multiselect_op ::= UNION ALL\",\n /*  91 */ \"multiselect_op ::= EXCEPT|INTERSECT\",\n /*  92 */ \"oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt\",\n /*  93 */ \"oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt\",\n /*  94 */ \"values ::= VALUES LP nexprlist RP\",\n /*  95 */ \"oneselect ::= mvalues\",\n /*  96 */ \"mvalues ::= values COMMA LP nexprlist RP\",\n /*  97 */ \"mvalues ::= mvalues COMMA LP nexprlist RP\",\n /*  98 */ \"distinct ::= DISTINCT\",\n /*  99 */ \"distinct ::= ALL\",\n /* 100 */ \"distinct ::=\",\n /* 101 */ \"sclp ::=\",\n /* 102 */ \"selcollist ::= sclp scanpt expr scanpt as\",\n /* 103 */ \"selcollist ::= sclp scanpt STAR\",\n /* 104 */ \"selcollist ::= sclp scanpt nm DOT STAR\",\n /* 105 */ \"as ::= AS nm\",\n /* 106 */ \"as ::=\",\n /* 107 */ \"from ::=\",\n /* 108 */ \"from ::= FROM seltablist\",\n /* 109 */ \"stl_prefix ::= seltablist joinop\",\n /* 110 */ \"stl_prefix ::=\",\n /* 111 */ \"seltablist ::= stl_prefix nm dbnm as on_using\",\n /* 112 */ \"seltablist ::= stl_prefix nm dbnm as indexed_by on_using\",\n /* 113 */ \"seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using\",\n /* 114 */ \"seltablist ::= stl_prefix LP select RP as on_using\",\n /* 115 */ \"seltablist ::= stl_prefix LP seltablist RP as on_using\",\n /* 116 */ \"dbnm ::=\",\n /* 117 */ \"dbnm ::= DOT nm\",\n /* 118 */ \"fullname ::= nm\",\n /* 119 */ \"fullname ::= nm DOT nm\",\n /* 120 */ \"xfullname ::= nm\",\n /* 121 */ \"xfullname ::= nm DOT nm\",\n /* 122 */ \"xfullname ::= nm DOT nm AS nm\",\n /* 123 */ \"xfullname ::= nm AS nm\",\n /* 124 */ \"joinop ::= COMMA|JOIN\",\n /* 125 */ \"joinop ::= JOIN_KW JOIN\",\n /* 126 */ \"joinop ::= JOIN_KW nm JOIN\",\n /* 127 */ \"joinop ::= JOIN_KW nm nm JOIN\",\n /* 128 */ \"on_using ::= ON expr\",\n /* 129 */ \"on_using ::= USING LP idlist RP\",\n /* 130 */ \"on_using ::=\",\n /* 131 */ \"indexed_opt ::=\",\n /* 132 */ \"indexed_by ::= INDEXED BY nm\",\n /* 133 */ \"indexed_by ::= NOT INDEXED\",\n /* 134 */ \"orderby_opt ::=\",\n /* 135 */ \"orderby_opt ::= ORDER BY sortlist\",\n /* 136 */ \"sortlist ::= sortlist COMMA expr sortorder nulls\",\n /* 137 */ \"sortlist ::= expr sortorder nulls\",\n /* 138 */ \"sortorder ::= ASC\",\n /* 139 */ \"sortorder ::= DESC\",\n /* 140 */ \"sortorder ::=\",\n /* 141 */ \"nulls ::= NULLS FIRST\",\n /* 142 */ \"nulls ::= NULLS LAST\",\n /* 143 */ \"nulls ::=\",\n /* 144 */ \"groupby_opt ::=\",\n /* 145 */ \"groupby_opt ::= GROUP BY nexprlist\",\n /* 146 */ \"having_opt ::=\",\n /* 147 */ \"having_opt ::= HAVING expr\",\n /* 148 */ \"limit_opt ::=\",\n /* 149 */ \"limit_opt ::= LIMIT expr\",\n /* 150 */ \"limit_opt ::= LIMIT expr OFFSET expr\",\n /* 151 */ \"limit_opt ::= LIMIT expr COMMA expr\",\n /* 152 */ \"cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret\",\n /* 153 */ \"where_opt ::=\",\n /* 154 */ \"where_opt ::= WHERE expr\",\n /* 155 */ \"where_opt_ret ::=\",\n /* 156 */ \"where_opt_ret ::= WHERE expr\",\n /* 157 */ \"where_opt_ret ::= RETURNING selcollist\",\n /* 158 */ \"where_opt_ret ::= WHERE expr RETURNING selcollist\",\n /* 159 */ \"cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret\",\n /* 160 */ \"setlist ::= setlist COMMA nm EQ expr\",\n /* 161 */ \"setlist ::= setlist COMMA LP idlist RP EQ expr\",\n /* 162 */ \"setlist ::= nm EQ expr\",\n /* 163 */ \"setlist ::= LP idlist RP EQ expr\",\n /* 164 */ \"cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert\",\n /* 165 */ \"cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning\",\n /* 166 */ \"upsert ::=\",\n /* 167 */ \"upsert ::= RETURNING selcollist\",\n /* 168 */ \"upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert\",\n /* 169 */ \"upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert\",\n /* 170 */ \"upsert ::= ON CONFLICT DO NOTHING returning\",\n /* 171 */ \"upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning\",\n /* 172 */ \"returning ::= RETURNING selcollist\",\n /* 173 */ \"insert_cmd ::= INSERT orconf\",\n /* 174 */ \"insert_cmd ::= REPLACE\",\n /* 175 */ \"idlist_opt ::=\",\n /* 176 */ \"idlist_opt ::= LP idlist RP\",\n /* 177 */ \"idlist ::= idlist COMMA nm\",\n /* 178 */ \"idlist ::= nm\",\n /* 179 */ \"expr ::= LP expr RP\",\n /* 180 */ \"expr ::= ID|INDEXED|JOIN_KW\",\n /* 181 */ \"expr ::= nm DOT nm\",\n /* 182 */ \"expr ::= nm DOT nm DOT nm\",\n /* 183 */ \"term ::= NULL|FLOAT|BLOB\",\n /* 184 */ \"term ::= STRING\",\n /* 185 */ \"term ::= INTEGER\",\n /* 186 */ \"expr ::= VARIABLE\",\n /* 187 */ \"expr ::= expr COLLATE ID|STRING\",\n /* 188 */ \"expr ::= CAST LP expr AS typetoken RP\",\n /* 189 */ \"expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP\",\n /* 190 */ \"expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP\",\n /* 191 */ \"expr ::= ID|INDEXED|JOIN_KW LP STAR RP\",\n /* 192 */ \"expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over\",\n /* 193 */ \"expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over\",\n /* 194 */ \"expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over\",\n /* 195 */ \"term ::= CTIME_KW\",\n /* 196 */ \"expr ::= LP nexprlist COMMA expr RP\",\n /* 197 */ \"expr ::= expr AND expr\",\n /* 198 */ \"expr ::= expr OR expr\",\n /* 199 */ \"expr ::= expr LT|GT|GE|LE expr\",\n /* 200 */ \"expr ::= expr EQ|NE expr\",\n /* 201 */ \"expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr\",\n /* 202 */ \"expr ::= expr PLUS|MINUS expr\",\n /* 203 */ \"expr ::= expr STAR|SLASH|REM expr\",\n /* 204 */ \"expr ::= expr CONCAT expr\",\n /* 205 */ \"likeop ::= NOT LIKE_KW|MATCH\",\n /* 206 */ \"expr ::= expr likeop expr\",\n /* 207 */ \"expr ::= expr likeop expr ESCAPE expr\",\n /* 208 */ \"expr ::= expr ISNULL|NOTNULL\",\n /* 209 */ \"expr ::= expr NOT NULL\",\n /* 210 */ \"expr ::= expr IS expr\",\n /* 211 */ \"expr ::= expr IS NOT expr\",\n /* 212 */ \"expr ::= expr IS NOT DISTINCT FROM expr\",\n /* 213 */ \"expr ::= expr IS DISTINCT FROM expr\",\n /* 214 */ \"expr ::= NOT expr\",\n /* 215 */ \"expr ::= BITNOT expr\",\n /* 216 */ \"expr ::= PLUS|MINUS expr\",\n /* 217 */ \"expr ::= expr PTR expr\",\n /* 218 */ \"between_op ::= BETWEEN\",\n /* 219 */ \"between_op ::= NOT BETWEEN\",\n /* 220 */ \"expr ::= expr between_op expr AND expr\",\n /* 221 */ \"in_op ::= IN\",\n /* 222 */ \"in_op ::= NOT IN\",\n /* 223 */ \"expr ::= expr in_op LP exprlist RP\",\n /* 224 */ \"expr ::= LP select RP\",\n /* 225 */ \"expr ::= expr in_op LP select RP\",\n /* 226 */ \"expr ::= expr in_op nm dbnm paren_exprlist\",\n /* 227 */ \"expr ::= EXISTS LP select RP\",\n /* 228 */ \"expr ::= CASE case_operand case_exprlist case_else END\",\n /* 229 */ \"case_exprlist ::= case_exprlist WHEN expr THEN expr\",\n /* 230 */ \"case_exprlist ::= WHEN expr THEN expr\",\n /* 231 */ \"case_else ::= ELSE expr\",\n /* 232 */ \"case_else ::=\",\n /* 233 */ \"case_operand ::=\",\n /* 234 */ \"exprlist ::=\",\n /* 235 */ \"nexprlist ::= nexprlist COMMA expr\",\n /* 236 */ \"nexprlist ::= expr\",\n /* 237 */ \"paren_exprlist ::=\",\n /* 238 */ \"paren_exprlist ::= LP exprlist RP\",\n /* 239 */ \"cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt\",\n /* 240 */ \"uniqueflag ::= UNIQUE\",\n /* 241 */ \"uniqueflag ::=\",\n /* 242 */ \"eidlist_opt ::=\",\n /* 243 */ \"eidlist_opt ::= LP eidlist RP\",\n /* 244 */ \"eidlist ::= eidlist COMMA nm collate sortorder\",\n /* 245 */ \"eidlist ::= nm collate sortorder\",\n /* 246 */ \"collate ::=\",\n /* 247 */ \"collate ::= COLLATE ID|STRING\",\n /* 248 */ \"cmd ::= DROP INDEX ifexists fullname\",\n /* 249 */ \"cmd ::= VACUUM vinto\",\n /* 250 */ \"cmd ::= VACUUM nm vinto\",\n /* 251 */ \"vinto ::= INTO expr\",\n /* 252 */ \"vinto ::=\",\n /* 253 */ \"cmd ::= PRAGMA nm dbnm\",\n /* 254 */ \"cmd ::= PRAGMA nm dbnm EQ nmnum\",\n /* 255 */ \"cmd ::= PRAGMA nm dbnm LP nmnum RP\",\n /* 256 */ \"cmd ::= PRAGMA nm dbnm EQ minus_num\",\n /* 257 */ \"cmd ::= PRAGMA nm dbnm LP minus_num RP\",\n /* 258 */ \"plus_num ::= PLUS INTEGER|FLOAT\",\n /* 259 */ \"minus_num ::= MINUS INTEGER|FLOAT\",\n /* 260 */ \"cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END\",\n /* 261 */ \"trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause\",\n /* 262 */ \"trigger_time ::= BEFORE|AFTER\",\n /* 263 */ \"trigger_time ::= INSTEAD OF\",\n /* 264 */ \"trigger_time ::=\",\n /* 265 */ \"trigger_event ::= DELETE|INSERT\",\n /* 266 */ \"trigger_event ::= UPDATE\",\n /* 267 */ \"trigger_event ::= UPDATE OF idlist\",\n /* 268 */ \"when_clause ::=\",\n /* 269 */ \"when_clause ::= WHEN expr\",\n /* 270 */ \"trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI\",\n /* 271 */ \"trigger_cmd_list ::= trigger_cmd SEMI\",\n /* 272 */ \"trnm ::= nm DOT nm\",\n /* 273 */ \"tridxby ::= INDEXED BY nm\",\n /* 274 */ \"tridxby ::= NOT INDEXED\",\n /* 275 */ \"trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt\",\n /* 276 */ \"trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt\",\n /* 277 */ \"trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt\",\n /* 278 */ \"trigger_cmd ::= scanpt select scanpt\",\n /* 279 */ \"expr ::= RAISE LP IGNORE RP\",\n /* 280 */ \"expr ::= RAISE LP raisetype COMMA expr RP\",\n /* 281 */ \"raisetype ::= ROLLBACK\",\n /* 282 */ \"raisetype ::= ABORT\",\n /* 283 */ \"raisetype ::= FAIL\",\n /* 284 */ \"cmd ::= DROP TRIGGER ifexists fullname\",\n /* 285 */ \"cmd ::= ATTACH database_kw_opt expr AS expr key_opt\",\n /* 286 */ \"cmd ::= DETACH database_kw_opt expr\",\n /* 287 */ \"key_opt ::=\",\n /* 288 */ \"key_opt ::= KEY expr\",\n /* 289 */ \"cmd ::= REINDEX\",\n /* 290 */ \"cmd ::= REINDEX nm dbnm\",\n /* 291 */ \"cmd ::= ANALYZE\",\n /* 292 */ \"cmd ::= ANALYZE nm dbnm\",\n /* 293 */ \"cmd ::= ALTER TABLE fullname RENAME TO nm\",\n /* 294 */ \"cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist\",\n /* 295 */ \"cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm\",\n /* 296 */ \"add_column_fullname ::= fullname\",\n /* 297 */ \"cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm\",\n /* 298 */ \"cmd ::= create_vtab\",\n /* 299 */ \"cmd ::= create_vtab LP vtabarglist RP\",\n /* 300 */ \"create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm\",\n /* 301 */ \"vtabarg ::=\",\n /* 302 */ \"vtabargtoken ::= ANY\",\n /* 303 */ \"vtabargtoken ::= lp anylist RP\",\n /* 304 */ \"lp ::= LP\",\n /* 305 */ \"with ::= WITH wqlist\",\n /* 306 */ \"with ::= WITH RECURSIVE wqlist\",\n /* 307 */ \"wqas ::= AS\",\n /* 308 */ \"wqas ::= AS MATERIALIZED\",\n /* 309 */ \"wqas ::= AS NOT MATERIALIZED\",\n /* 310 */ \"wqitem ::= withnm eidlist_opt wqas LP select RP\",\n /* 311 */ \"withnm ::= nm\",\n /* 312 */ \"wqlist ::= wqitem\",\n /* 313 */ \"wqlist ::= wqlist COMMA wqitem\",\n /* 314 */ \"windowdefn_list ::= windowdefn_list COMMA windowdefn\",\n /* 315 */ \"windowdefn ::= nm AS LP window RP\",\n /* 316 */ \"window ::= PARTITION BY nexprlist orderby_opt frame_opt\",\n /* 317 */ \"window ::= nm PARTITION BY nexprlist orderby_opt frame_opt\",\n /* 318 */ \"window ::= ORDER BY sortlist frame_opt\",\n /* 319 */ \"window ::= nm ORDER BY sortlist frame_opt\",\n /* 320 */ \"window ::= nm frame_opt\",\n /* 321 */ \"frame_opt ::=\",\n /* 322 */ \"frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt\",\n /* 323 */ \"frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt\",\n /* 324 */ \"range_or_rows ::= RANGE|ROWS|GROUPS\",\n /* 325 */ \"frame_bound_s ::= frame_bound\",\n /* 326 */ \"frame_bound_s ::= UNBOUNDED PRECEDING\",\n /* 327 */ \"frame_bound_e ::= frame_bound\",\n /* 328 */ \"frame_bound_e ::= UNBOUNDED FOLLOWING\",\n /* 329 */ \"frame_bound ::= expr PRECEDING|FOLLOWING\",\n /* 330 */ \"frame_bound ::= CURRENT ROW\",\n /* 331 */ \"frame_exclude_opt ::=\",\n /* 332 */ \"frame_exclude_opt ::= EXCLUDE frame_exclude\",\n /* 333 */ \"frame_exclude ::= NO OTHERS\",\n /* 334 */ \"frame_exclude ::= CURRENT ROW\",\n /* 335 */ \"frame_exclude ::= GROUP|TIES\",\n /* 336 */ \"window_clause ::= WINDOW windowdefn_list\",\n /* 337 */ \"filter_over ::= filter_clause over_clause\",\n /* 338 */ \"filter_over ::= over_clause\",\n /* 339 */ \"filter_over ::= filter_clause\",\n /* 340 */ \"over_clause ::= OVER LP window RP\",\n /* 341 */ \"over_clause ::= OVER nm\",\n /* 342 */ \"filter_clause ::= FILTER LP WHERE expr RP\",\n /* 343 */ \"term ::= QNUMBER\",\n /* 344 */ \"input ::= cmdlist\",\n /* 345 */ \"cmdlist ::= cmdlist ecmd\",\n /* 346 */ \"cmdlist ::= ecmd\",\n /* 347 */ \"ecmd ::= SEMI\",\n /* 348 */ \"ecmd ::= cmdx SEMI\",\n /* 349 */ \"ecmd ::= explain cmdx SEMI\",\n /* 350 */ \"trans_opt ::=\",\n /* 351 */ \"trans_opt ::= TRANSACTION\",\n /* 352 */ \"trans_opt ::= TRANSACTION nm\",\n /* 353 */ \"savepoint_opt ::= SAVEPOINT\",\n /* 354 */ \"savepoint_opt ::=\",\n /* 355 */ \"cmd ::= create_table create_table_args\",\n /* 356 */ \"table_option_set ::= table_option\",\n /* 357 */ \"columnlist ::= columnlist COMMA columnname carglist\",\n /* 358 */ \"columnlist ::= columnname carglist\",\n /* 359 */ \"nm ::= ID|INDEXED|JOIN_KW\",\n /* 360 */ \"nm ::= STRING\",\n /* 361 */ \"typetoken ::= typename\",\n /* 362 */ \"typename ::= ID|STRING\",\n /* 363 */ \"signed ::= plus_num\",\n /* 364 */ \"signed ::= minus_num\",\n /* 365 */ \"carglist ::= carglist ccons\",\n /* 366 */ \"carglist ::=\",\n /* 367 */ \"ccons ::= NULL onconf\",\n /* 368 */ \"ccons ::= GENERATED ALWAYS AS generated\",\n /* 369 */ \"ccons ::= AS generated\",\n /* 370 */ \"conslist_opt ::= COMMA conslist\",\n /* 371 */ \"conslist ::= conslist tconscomma tcons\",\n /* 372 */ \"conslist ::= tcons\",\n /* 373 */ \"tconscomma ::=\",\n /* 374 */ \"defer_subclause_opt ::= defer_subclause\",\n /* 375 */ \"resolvetype ::= raisetype\",\n /* 376 */ \"selectnowith ::= oneselect\",\n /* 377 */ \"oneselect ::= values\",\n /* 378 */ \"sclp ::= selcollist COMMA\",\n /* 379 */ \"as ::= ID|STRING\",\n /* 380 */ \"indexed_opt ::= indexed_by\",\n /* 381 */ \"returning ::=\",\n /* 382 */ \"expr ::= term\",\n /* 383 */ \"likeop ::= LIKE_KW|MATCH\",\n /* 384 */ \"case_operand ::= expr\",\n /* 385 */ \"exprlist ::= nexprlist\",\n /* 386 */ \"nmnum ::= plus_num\",\n /* 387 */ \"nmnum ::= nm\",\n /* 388 */ \"nmnum ::= ON\",\n /* 389 */ \"nmnum ::= DELETE\",\n /* 390 */ \"nmnum ::= DEFAULT\",\n /* 391 */ \"plus_num ::= INTEGER|FLOAT\",\n /* 392 */ \"foreach_clause ::=\",\n /* 393 */ \"foreach_clause ::= FOR EACH ROW\",\n /* 394 */ \"trnm ::= nm\",\n /* 395 */ \"tridxby ::=\",\n /* 396 */ \"database_kw_opt ::= DATABASE\",\n /* 397 */ \"database_kw_opt ::=\",\n /* 398 */ \"kwcolumn_opt ::=\",\n /* 399 */ \"kwcolumn_opt ::= COLUMNKW\",\n /* 400 */ \"vtabarglist ::= vtabarg\",\n /* 401 */ \"vtabarglist ::= vtabarglist COMMA vtabarg\",\n /* 402 */ \"vtabarg ::= vtabarg vtabargtoken\",\n /* 403 */ \"anylist ::=\",\n /* 404 */ \"anylist ::= anylist LP anylist RP\",\n /* 405 */ \"anylist ::= anylist ANY\",\n /* 406 */ \"with ::=\",\n /* 407 */ \"windowdefn_list ::= windowdefn\",\n /* 408 */ \"window ::= frame_opt\",\n};\n#endif /* NDEBUG */\n\n\n#if YYGROWABLESTACK\n/*\n** Try to increase the size of the parser stack.  Return the number\n** of errors.  Return 0 on success.\n*/\nstatic int yyGrowStack(yyParser *p){\n  int oldSize = 1 + (int)(p->yystackEnd - p->yystack);\n  int newSize;\n  int idx;\n  yyStackEntry *pNew;\n\n  newSize = oldSize*2 + 100;\n  idx = (int)(p->yytos - p->yystack);\n  if( p->yystack==p->yystk0 ){\n    pNew = YYREALLOC(0, newSize*sizeof(pNew[0]));\n    if( pNew==0 ) return 1;\n    memcpy(pNew, p->yystack, oldSize*sizeof(pNew[0]));\n  }else{\n    pNew = YYREALLOC(p->yystack, newSize*sizeof(pNew[0]));\n    if( pNew==0 ) return 1;\n  }\n  p->yystack = pNew;\n  p->yytos = &p->yystack[idx];\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    fprintf(yyTraceFILE,\"%sStack grows from %d to %d entries.\\n\",\n            yyTracePrompt, oldSize, newSize);\n  }\n#endif\n  p->yystackEnd = &p->yystack[newSize-1];\n  return 0;\n}\n#endif /* YYGROWABLESTACK */\n\n#if !YYGROWABLESTACK\n/* For builds that do no have a growable stack, yyGrowStack always\n** returns an error.\n*/\n# define yyGrowStack(X) 1\n#endif\n\n/* Datatype of the argument to the memory allocated passed as the\n** second argument to sqlite3ParserAlloc() below.  This can be changed by\n** putting an appropriate #define in the %include section of the input\n** grammar.\n*/\n#ifndef YYMALLOCARGTYPE\n# define YYMALLOCARGTYPE size_t\n#endif\n\n/* Initialize a new parser that has already been allocated.\n*/\nSQLITE_PRIVATE void sqlite3ParserInit(void *yypRawParser sqlite3ParserCTX_PDECL){\n  yyParser *yypParser = (yyParser*)yypRawParser;\n  sqlite3ParserCTX_STORE\n#ifdef YYTRACKMAXSTACKDEPTH\n  yypParser->yyhwm = 0;\n#endif\n  yypParser->yystack = yypParser->yystk0;\n  yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];\n#ifndef YYNOERRORRECOVERY\n  yypParser->yyerrcnt = -1;\n#endif\n  yypParser->yytos = yypParser->yystack;\n  yypParser->yystack[0].stateno = 0;\n  yypParser->yystack[0].major = 0;\n}\n\n#ifndef sqlite3Parser_ENGINEALWAYSONSTACK\n/*\n** This function allocates a new parser.\n** The only argument is a pointer to a function which works like\n** malloc.\n**\n** Inputs:\n** A pointer to the function used to allocate memory.\n**\n** Outputs:\n** A pointer to a parser.  This pointer is used in subsequent calls\n** to sqlite3Parser and sqlite3ParserFree.\n*/\nSQLITE_PRIVATE void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) sqlite3ParserCTX_PDECL){\n  yyParser *yypParser;\n  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );\n  if( yypParser ){\n    sqlite3ParserCTX_STORE\n    sqlite3ParserInit(yypParser sqlite3ParserCTX_PARAM);\n  }\n  return (void*)yypParser;\n}\n#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */\n\n\n/* The following function deletes the \"minor type\" or semantic value\n** associated with a symbol.  The symbol can be either a terminal\n** or nonterminal. \"yymajor\" is the symbol code, and \"yypminor\" is\n** a pointer to the value to be deleted.  The code used to do the\n** deletions is derived from the %destructor and/or %token_destructor\n** directives of the input grammar.\n*/\nstatic void yy_destructor(\n  yyParser *yypParser,    /* The parser */\n  YYCODETYPE yymajor,     /* Type code for object to destroy */\n  YYMINORTYPE *yypminor   /* The object to be destroyed */\n){\n  sqlite3ParserARG_FETCH\n  sqlite3ParserCTX_FETCH\n  switch( yymajor ){\n    /* Here is inserted the actions which take place when a\n    ** terminal or non-terminal is destroyed.  This can happen\n    ** when the symbol is popped from the stack during a\n    ** reduce or during error processing or when a parser is\n    ** being destroyed before it is finished parsing.\n    **\n    ** Note: during a reduce, the only symbols destroyed are those\n    ** which appear on the RHS of the rule, but which are *not* used\n    ** inside the C code.\n    */\n/********* Begin destructor definitions ***************************************/\n    case 206: /* select */\n    case 241: /* selectnowith */\n    case 242: /* oneselect */\n    case 254: /* values */\n    case 256: /* mvalues */\n{\nsqlite3SelectDelete(pParse->db, (yypminor->yy637));\n}\n      break;\n    case 218: /* term */\n    case 219: /* expr */\n    case 248: /* where_opt */\n    case 250: /* having_opt */\n    case 270: /* where_opt_ret */\n    case 281: /* case_operand */\n    case 283: /* case_else */\n    case 286: /* vinto */\n    case 293: /* when_clause */\n    case 298: /* key_opt */\n    case 315: /* filter_clause */\n{\nsqlite3ExprDelete(pParse->db, (yypminor->yy590));\n}\n      break;\n    case 223: /* eidlist_opt */\n    case 233: /* sortlist */\n    case 234: /* eidlist */\n    case 246: /* selcollist */\n    case 249: /* groupby_opt */\n    case 251: /* orderby_opt */\n    case 255: /* nexprlist */\n    case 257: /* sclp */\n    case 264: /* exprlist */\n    case 271: /* setlist */\n    case 280: /* paren_exprlist */\n    case 282: /* case_exprlist */\n    case 314: /* part_opt */\n{\nsqlite3ExprListDelete(pParse->db, (yypminor->yy402));\n}\n      break;\n    case 240: /* fullname */\n    case 247: /* from */\n    case 259: /* seltablist */\n    case 260: /* stl_prefix */\n    case 265: /* xfullname */\n{\nsqlite3SrcListDelete(pParse->db, (yypminor->yy563));\n}\n      break;\n    case 243: /* wqlist */\n{\nsqlite3WithDelete(pParse->db, (yypminor->yy125));\n}\n      break;\n    case 253: /* window_clause */\n    case 310: /* windowdefn_list */\n{\nsqlite3WindowListDelete(pParse->db, (yypminor->yy483));\n}\n      break;\n    case 266: /* idlist */\n    case 273: /* idlist_opt */\n{\nsqlite3IdListDelete(pParse->db, (yypminor->yy204));\n}\n      break;\n    case 276: /* filter_over */\n    case 311: /* windowdefn */\n    case 312: /* window */\n    case 313: /* frame_opt */\n    case 316: /* over_clause */\n{\nsqlite3WindowDelete(pParse->db, (yypminor->yy483));\n}\n      break;\n    case 289: /* trigger_cmd_list */\n    case 294: /* trigger_cmd */\n{\nsqlite3DeleteTriggerStep(pParse->db, (yypminor->yy319));\n}\n      break;\n    case 291: /* trigger_event */\n{\nsqlite3IdListDelete(pParse->db, (yypminor->yy28).b);\n}\n      break;\n    case 318: /* frame_bound */\n    case 319: /* frame_bound_s */\n    case 320: /* frame_bound_e */\n{\nsqlite3ExprDelete(pParse->db, (yypminor->yy205).pExpr);\n}\n      break;\n/********* End destructor definitions *****************************************/\n    default:  break;   /* If no destructor action specified: do nothing */\n  }\n}\n\n/*\n** Pop the parser's stack once.\n**\n** If there is a destructor routine associated with the token which\n** is popped from the stack, then call it.\n*/\nstatic void yy_pop_parser_stack(yyParser *pParser){\n  yyStackEntry *yytos;\n  assert( pParser->yytos!=0 );\n  assert( pParser->yytos > pParser->yystack );\n  yytos = pParser->yytos--;\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    fprintf(yyTraceFILE,\"%sPopping %s\\n\",\n      yyTracePrompt,\n      yyTokenName[yytos->major]);\n  }\n#endif\n  yy_destructor(pParser, yytos->major, &yytos->minor);\n}\n\n/*\n** Clear all secondary memory allocations from the parser\n*/\nSQLITE_PRIVATE void sqlite3ParserFinalize(void *p){\n  yyParser *pParser = (yyParser*)p;\n\n  /* In-lined version of calling yy_pop_parser_stack() for each\n  ** element left in the stack */\n  yyStackEntry *yytos = pParser->yytos;\n  while( yytos>pParser->yystack ){\n#ifndef NDEBUG\n    if( yyTraceFILE ){\n      fprintf(yyTraceFILE,\"%sPopping %s\\n\",\n        yyTracePrompt,\n        yyTokenName[yytos->major]);\n    }\n#endif\n    if( yytos->major>=YY_MIN_DSTRCTR ){\n      yy_destructor(pParser, yytos->major, &yytos->minor);\n    }\n    yytos--;\n  }\n\n#if YYGROWABLESTACK\n  if( pParser->yystack!=pParser->yystk0 ) YYFREE(pParser->yystack);\n#endif\n}\n\n#ifndef sqlite3Parser_ENGINEALWAYSONSTACK\n/*\n** Deallocate and destroy a parser.  Destructors are called for\n** all stack elements before shutting the parser down.\n**\n** If the YYPARSEFREENEVERNULL macro exists (for example because it\n** is defined in a %include section of the input grammar) then it is\n** assumed that the input pointer is never NULL.\n*/\nSQLITE_PRIVATE void sqlite3ParserFree(\n  void *p,                    /* The parser to be deleted */\n  void (*freeProc)(void*)     /* Function used to reclaim memory */\n){\n#ifndef YYPARSEFREENEVERNULL\n  if( p==0 ) return;\n#endif\n  sqlite3ParserFinalize(p);\n  (*freeProc)(p);\n}\n#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */\n\n/*\n** Return the peak depth of the stack for a parser.\n*/\n#ifdef YYTRACKMAXSTACKDEPTH\nSQLITE_PRIVATE int sqlite3ParserStackPeak(void *p){\n  yyParser *pParser = (yyParser*)p;\n  return pParser->yyhwm;\n}\n#endif\n\n/* This array of booleans keeps track of the parser statement\n** coverage.  The element yycoverage[X][Y] is set when the parser\n** is in state X and has a lookahead token Y.  In a well-tested\n** systems, every element of this matrix should end up being set.\n*/\n#if defined(YYCOVERAGE)\nstatic unsigned char yycoverage[YYNSTATE][YYNTOKEN];\n#endif\n\n/*\n** Write into out a description of every state/lookahead combination that\n**\n**   (1)  has not been used by the parser, and\n**   (2)  is not a syntax error.\n**\n** Return the number of missed state/lookahead combinations.\n*/\n#if defined(YYCOVERAGE)\nSQLITE_PRIVATE int sqlite3ParserCoverage(FILE *out){\n  int stateno, iLookAhead, i;\n  int nMissed = 0;\n  for(stateno=0; stateno<YYNSTATE; stateno++){\n    i = yy_shift_ofst[stateno];\n    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){\n      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;\n      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;\n      if( out ){\n        fprintf(out,\"State %d lookahead %s %s\\n\", stateno,\n                yyTokenName[iLookAhead],\n                yycoverage[stateno][iLookAhead] ? \"ok\" : \"missed\");\n      }\n    }\n  }\n  return nMissed;\n}\n#endif\n\n/*\n** Find the appropriate action for a parser given the terminal\n** look-ahead token iLookAhead.\n*/\nstatic YYACTIONTYPE yy_find_shift_action(\n  YYCODETYPE iLookAhead,    /* The look-ahead token */\n  YYACTIONTYPE stateno      /* Current state number */\n){\n  int i;\n\n  if( stateno>YY_MAX_SHIFT ) return stateno;\n  assert( stateno <= YY_SHIFT_COUNT );\n#if defined(YYCOVERAGE)\n  yycoverage[stateno][iLookAhead] = 1;\n#endif\n  do{\n    i = yy_shift_ofst[stateno];\n    assert( i>=0 );\n    assert( i<=YY_ACTTAB_COUNT );\n    assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );\n    assert( iLookAhead!=YYNOCODE );\n    assert( iLookAhead < YYNTOKEN );\n    i += iLookAhead;\n    assert( i<(int)YY_NLOOKAHEAD );\n    if( yy_lookahead[i]!=iLookAhead ){\n#ifdef YYFALLBACK\n      YYCODETYPE iFallback;            /* Fallback token */\n      assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );\n      iFallback = yyFallback[iLookAhead];\n      if( iFallback!=0 ){\n#ifndef NDEBUG\n        if( yyTraceFILE ){\n          fprintf(yyTraceFILE, \"%sFALLBACK %s => %s\\n\",\n             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);\n        }\n#endif\n        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */\n        iLookAhead = iFallback;\n        continue;\n      }\n#endif\n#ifdef YYWILDCARD\n      {\n        int j = i - iLookAhead + YYWILDCARD;\n        assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );\n        if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){\n#ifndef NDEBUG\n          if( yyTraceFILE ){\n            fprintf(yyTraceFILE, \"%sWILDCARD %s => %s\\n\",\n               yyTracePrompt, yyTokenName[iLookAhead],\n               yyTokenName[YYWILDCARD]);\n          }\n#endif /* NDEBUG */\n          return yy_action[j];\n        }\n      }\n#endif /* YYWILDCARD */\n      return yy_default[stateno];\n    }else{\n      assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );\n      return yy_action[i];\n    }\n  }while(1);\n}\n\n/*\n** Find the appropriate action for a parser given the non-terminal\n** look-ahead token iLookAhead.\n*/\nstatic YYACTIONTYPE yy_find_reduce_action(\n  YYACTIONTYPE stateno,     /* Current state number */\n  YYCODETYPE iLookAhead     /* The look-ahead token */\n){\n  int i;\n#ifdef YYERRORSYMBOL\n  if( stateno>YY_REDUCE_COUNT ){\n    return yy_default[stateno];\n  }\n#else\n  assert( stateno<=YY_REDUCE_COUNT );\n#endif\n  i = yy_reduce_ofst[stateno];\n  assert( iLookAhead!=YYNOCODE );\n  i += iLookAhead;\n#ifdef YYERRORSYMBOL\n  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){\n    return yy_default[stateno];\n  }\n#else\n  assert( i>=0 && i<YY_ACTTAB_COUNT );\n  assert( yy_lookahead[i]==iLookAhead );\n#endif\n  return yy_action[i];\n}\n\n/*\n** The following routine is called if the stack overflows.\n*/\nstatic void yyStackOverflow(yyParser *yypParser){\n   sqlite3ParserARG_FETCH\n   sqlite3ParserCTX_FETCH\n#ifndef NDEBUG\n   if( yyTraceFILE ){\n     fprintf(yyTraceFILE,\"%sStack Overflow!\\n\",yyTracePrompt);\n   }\n#endif\n   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);\n   /* Here code is inserted which will execute if the parser\n   ** stack every overflows */\n/******** Begin %stack_overflow code ******************************************/\n\n  sqlite3OomFault(pParse->db);\n/******** End %stack_overflow code ********************************************/\n   sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */\n   sqlite3ParserCTX_STORE\n}\n\n/*\n** Print tracing information for a SHIFT action\n*/\n#ifndef NDEBUG\nstatic void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){\n  if( yyTraceFILE ){\n    if( yyNewState<YYNSTATE ){\n      fprintf(yyTraceFILE,\"%s%s '%s', go to state %d\\n\",\n         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],\n         yyNewState);\n    }else{\n      fprintf(yyTraceFILE,\"%s%s '%s', pending reduce %d\\n\",\n         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],\n         yyNewState - YY_MIN_REDUCE);\n    }\n  }\n}\n#else\n# define yyTraceShift(X,Y,Z)\n#endif\n\n/*\n** Perform a shift action.\n*/\nstatic void yy_shift(\n  yyParser *yypParser,          /* The parser to be shifted */\n  YYACTIONTYPE yyNewState,      /* The new state to shift in */\n  YYCODETYPE yyMajor,           /* The major token to shift in */\n  sqlite3ParserTOKENTYPE yyMinor        /* The minor token to shift in */\n){\n  yyStackEntry *yytos;\n  yypParser->yytos++;\n#ifdef YYTRACKMAXSTACKDEPTH\n  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){\n    yypParser->yyhwm++;\n    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );\n  }\n#endif\n  yytos = yypParser->yytos;\n  if( yytos>yypParser->yystackEnd ){\n    if( yyGrowStack(yypParser) ){\n      yypParser->yytos--;\n      yyStackOverflow(yypParser);\n      return;\n    }\n    yytos = yypParser->yytos;\n    assert( yytos <= yypParser->yystackEnd );\n  }\n  if( yyNewState > YY_MAX_SHIFT ){\n    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;\n  }\n  yytos->stateno = yyNewState;\n  yytos->major = yyMajor;\n  yytos->minor.yy0 = yyMinor;\n  yyTraceShift(yypParser, yyNewState, \"Shift\");\n}\n\n/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side\n** of that rule */\nstatic const YYCODETYPE yyRuleInfoLhs[] = {\n   191,  /* (0) explain ::= EXPLAIN */\n   191,  /* (1) explain ::= EXPLAIN QUERY PLAN */\n   190,  /* (2) cmdx ::= cmd */\n   192,  /* (3) cmd ::= BEGIN transtype trans_opt */\n   193,  /* (4) transtype ::= */\n   193,  /* (5) transtype ::= DEFERRED */\n   193,  /* (6) transtype ::= IMMEDIATE */\n   193,  /* (7) transtype ::= EXCLUSIVE */\n   192,  /* (8) cmd ::= COMMIT|END trans_opt */\n   192,  /* (9) cmd ::= ROLLBACK trans_opt */\n   192,  /* (10) cmd ::= SAVEPOINT nm */\n   192,  /* (11) cmd ::= RELEASE savepoint_opt nm */\n   192,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */\n   197,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */\n   199,  /* (14) createkw ::= CREATE */\n   201,  /* (15) ifnotexists ::= */\n   201,  /* (16) ifnotexists ::= IF NOT EXISTS */\n   200,  /* (17) temp ::= TEMP */\n   200,  /* (18) temp ::= */\n   198,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */\n   198,  /* (20) create_table_args ::= AS select */\n   205,  /* (21) table_option_set ::= */\n   205,  /* (22) table_option_set ::= table_option_set COMMA table_option */\n   207,  /* (23) table_option ::= WITHOUT nm */\n   207,  /* (24) table_option ::= nm */\n   208,  /* (25) columnname ::= nm typetoken */\n   210,  /* (26) typetoken ::= */\n   210,  /* (27) typetoken ::= typename LP signed RP */\n   210,  /* (28) typetoken ::= typename LP signed COMMA signed RP */\n   211,  /* (29) typename ::= typename ID|STRING */\n   215,  /* (30) scanpt ::= */\n   216,  /* (31) scantok ::= */\n   217,  /* (32) ccons ::= CONSTRAINT nm */\n   217,  /* (33) ccons ::= DEFAULT scantok term */\n   217,  /* (34) ccons ::= DEFAULT LP expr RP */\n   217,  /* (35) ccons ::= DEFAULT PLUS scantok term */\n   217,  /* (36) ccons ::= DEFAULT MINUS scantok term */\n   217,  /* (37) ccons ::= DEFAULT scantok ID|INDEXED */\n   217,  /* (38) ccons ::= NOT NULL onconf */\n   217,  /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */\n   217,  /* (40) ccons ::= UNIQUE onconf */\n   217,  /* (41) ccons ::= CHECK LP expr RP */\n   217,  /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */\n   217,  /* (43) ccons ::= defer_subclause */\n   217,  /* (44) ccons ::= COLLATE ID|STRING */\n   226,  /* (45) generated ::= LP expr RP */\n   226,  /* (46) generated ::= LP expr RP ID */\n   222,  /* (47) autoinc ::= */\n   222,  /* (48) autoinc ::= AUTOINCR */\n   224,  /* (49) refargs ::= */\n   224,  /* (50) refargs ::= refargs refarg */\n   227,  /* (51) refarg ::= MATCH nm */\n   227,  /* (52) refarg ::= ON INSERT refact */\n   227,  /* (53) refarg ::= ON DELETE refact */\n   227,  /* (54) refarg ::= ON UPDATE refact */\n   228,  /* (55) refact ::= SET NULL */\n   228,  /* (56) refact ::= SET DEFAULT */\n   228,  /* (57) refact ::= CASCADE */\n   228,  /* (58) refact ::= RESTRICT */\n   228,  /* (59) refact ::= NO ACTION */\n   225,  /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */\n   225,  /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */\n   229,  /* (62) init_deferred_pred_opt ::= */\n   229,  /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */\n   229,  /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */\n   204,  /* (65) conslist_opt ::= */\n   231,  /* (66) tconscomma ::= COMMA */\n   232,  /* (67) tcons ::= CONSTRAINT nm */\n   232,  /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */\n   232,  /* (69) tcons ::= UNIQUE LP sortlist RP onconf */\n   232,  /* (70) tcons ::= CHECK LP expr RP onconf */\n   232,  /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */\n   235,  /* (72) defer_subclause_opt ::= */\n   220,  /* (73) onconf ::= */\n   220,  /* (74) onconf ::= ON CONFLICT resolvetype */\n   236,  /* (75) orconf ::= */\n   236,  /* (76) orconf ::= OR resolvetype */\n   237,  /* (77) resolvetype ::= IGNORE */\n   237,  /* (78) resolvetype ::= REPLACE */\n   192,  /* (79) cmd ::= DROP TABLE ifexists fullname */\n   239,  /* (80) ifexists ::= IF EXISTS */\n   239,  /* (81) ifexists ::= */\n   192,  /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */\n   192,  /* (83) cmd ::= DROP VIEW ifexists fullname */\n   192,  /* (84) cmd ::= select */\n   206,  /* (85) select ::= WITH wqlist selectnowith */\n   206,  /* (86) select ::= WITH RECURSIVE wqlist selectnowith */\n   206,  /* (87) select ::= selectnowith */\n   241,  /* (88) selectnowith ::= selectnowith multiselect_op oneselect */\n   244,  /* (89) multiselect_op ::= UNION */\n   244,  /* (90) multiselect_op ::= UNION ALL */\n   244,  /* (91) multiselect_op ::= EXCEPT|INTERSECT */\n   242,  /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */\n   242,  /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */\n   254,  /* (94) values ::= VALUES LP nexprlist RP */\n   242,  /* (95) oneselect ::= mvalues */\n   256,  /* (96) mvalues ::= values COMMA LP nexprlist RP */\n   256,  /* (97) mvalues ::= mvalues COMMA LP nexprlist RP */\n   245,  /* (98) distinct ::= DISTINCT */\n   245,  /* (99) distinct ::= ALL */\n   245,  /* (100) distinct ::= */\n   257,  /* (101) sclp ::= */\n   246,  /* (102) selcollist ::= sclp scanpt expr scanpt as */\n   246,  /* (103) selcollist ::= sclp scanpt STAR */\n   246,  /* (104) selcollist ::= sclp scanpt nm DOT STAR */\n   258,  /* (105) as ::= AS nm */\n   258,  /* (106) as ::= */\n   247,  /* (107) from ::= */\n   247,  /* (108) from ::= FROM seltablist */\n   260,  /* (109) stl_prefix ::= seltablist joinop */\n   260,  /* (110) stl_prefix ::= */\n   259,  /* (111) seltablist ::= stl_prefix nm dbnm as on_using */\n   259,  /* (112) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */\n   259,  /* (113) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */\n   259,  /* (114) seltablist ::= stl_prefix LP select RP as on_using */\n   259,  /* (115) seltablist ::= stl_prefix LP seltablist RP as on_using */\n   202,  /* (116) dbnm ::= */\n   202,  /* (117) dbnm ::= DOT nm */\n   240,  /* (118) fullname ::= nm */\n   240,  /* (119) fullname ::= nm DOT nm */\n   265,  /* (120) xfullname ::= nm */\n   265,  /* (121) xfullname ::= nm DOT nm */\n   265,  /* (122) xfullname ::= nm DOT nm AS nm */\n   265,  /* (123) xfullname ::= nm AS nm */\n   261,  /* (124) joinop ::= COMMA|JOIN */\n   261,  /* (125) joinop ::= JOIN_KW JOIN */\n   261,  /* (126) joinop ::= JOIN_KW nm JOIN */\n   261,  /* (127) joinop ::= JOIN_KW nm nm JOIN */\n   262,  /* (128) on_using ::= ON expr */\n   262,  /* (129) on_using ::= USING LP idlist RP */\n   262,  /* (130) on_using ::= */\n   267,  /* (131) indexed_opt ::= */\n   263,  /* (132) indexed_by ::= INDEXED BY nm */\n   263,  /* (133) indexed_by ::= NOT INDEXED */\n   251,  /* (134) orderby_opt ::= */\n   251,  /* (135) orderby_opt ::= ORDER BY sortlist */\n   233,  /* (136) sortlist ::= sortlist COMMA expr sortorder nulls */\n   233,  /* (137) sortlist ::= expr sortorder nulls */\n   221,  /* (138) sortorder ::= ASC */\n   221,  /* (139) sortorder ::= DESC */\n   221,  /* (140) sortorder ::= */\n   268,  /* (141) nulls ::= NULLS FIRST */\n   268,  /* (142) nulls ::= NULLS LAST */\n   268,  /* (143) nulls ::= */\n   249,  /* (144) groupby_opt ::= */\n   249,  /* (145) groupby_opt ::= GROUP BY nexprlist */\n   250,  /* (146) having_opt ::= */\n   250,  /* (147) having_opt ::= HAVING expr */\n   252,  /* (148) limit_opt ::= */\n   252,  /* (149) limit_opt ::= LIMIT expr */\n   252,  /* (150) limit_opt ::= LIMIT expr OFFSET expr */\n   252,  /* (151) limit_opt ::= LIMIT expr COMMA expr */\n   192,  /* (152) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */\n   248,  /* (153) where_opt ::= */\n   248,  /* (154) where_opt ::= WHERE expr */\n   270,  /* (155) where_opt_ret ::= */\n   270,  /* (156) where_opt_ret ::= WHERE expr */\n   270,  /* (157) where_opt_ret ::= RETURNING selcollist */\n   270,  /* (158) where_opt_ret ::= WHERE expr RETURNING selcollist */\n   192,  /* (159) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */\n   271,  /* (160) setlist ::= setlist COMMA nm EQ expr */\n   271,  /* (161) setlist ::= setlist COMMA LP idlist RP EQ expr */\n   271,  /* (162) setlist ::= nm EQ expr */\n   271,  /* (163) setlist ::= LP idlist RP EQ expr */\n   192,  /* (164) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */\n   192,  /* (165) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */\n   274,  /* (166) upsert ::= */\n   274,  /* (167) upsert ::= RETURNING selcollist */\n   274,  /* (168) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */\n   274,  /* (169) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */\n   274,  /* (170) upsert ::= ON CONFLICT DO NOTHING returning */\n   274,  /* (171) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */\n   275,  /* (172) returning ::= RETURNING selcollist */\n   272,  /* (173) insert_cmd ::= INSERT orconf */\n   272,  /* (174) insert_cmd ::= REPLACE */\n   273,  /* (175) idlist_opt ::= */\n   273,  /* (176) idlist_opt ::= LP idlist RP */\n   266,  /* (177) idlist ::= idlist COMMA nm */\n   266,  /* (178) idlist ::= nm */\n   219,  /* (179) expr ::= LP expr RP */\n   219,  /* (180) expr ::= ID|INDEXED|JOIN_KW */\n   219,  /* (181) expr ::= nm DOT nm */\n   219,  /* (182) expr ::= nm DOT nm DOT nm */\n   218,  /* (183) term ::= NULL|FLOAT|BLOB */\n   218,  /* (184) term ::= STRING */\n   218,  /* (185) term ::= INTEGER */\n   219,  /* (186) expr ::= VARIABLE */\n   219,  /* (187) expr ::= expr COLLATE ID|STRING */\n   219,  /* (188) expr ::= CAST LP expr AS typetoken RP */\n   219,  /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */\n   219,  /* (190) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */\n   219,  /* (191) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */\n   219,  /* (192) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */\n   219,  /* (193) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */\n   219,  /* (194) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */\n   218,  /* (195) term ::= CTIME_KW */\n   219,  /* (196) expr ::= LP nexprlist COMMA expr RP */\n   219,  /* (197) expr ::= expr AND expr */\n   219,  /* (198) expr ::= expr OR expr */\n   219,  /* (199) expr ::= expr LT|GT|GE|LE expr */\n   219,  /* (200) expr ::= expr EQ|NE expr */\n   219,  /* (201) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */\n   219,  /* (202) expr ::= expr PLUS|MINUS expr */\n   219,  /* (203) expr ::= expr STAR|SLASH|REM expr */\n   219,  /* (204) expr ::= expr CONCAT expr */\n   277,  /* (205) likeop ::= NOT LIKE_KW|MATCH */\n   219,  /* (206) expr ::= expr likeop expr */\n   219,  /* (207) expr ::= expr likeop expr ESCAPE expr */\n   219,  /* (208) expr ::= expr ISNULL|NOTNULL */\n   219,  /* (209) expr ::= expr NOT NULL */\n   219,  /* (210) expr ::= expr IS expr */\n   219,  /* (211) expr ::= expr IS NOT expr */\n   219,  /* (212) expr ::= expr IS NOT DISTINCT FROM expr */\n   219,  /* (213) expr ::= expr IS DISTINCT FROM expr */\n   219,  /* (214) expr ::= NOT expr */\n   219,  /* (215) expr ::= BITNOT expr */\n   219,  /* (216) expr ::= PLUS|MINUS expr */\n   219,  /* (217) expr ::= expr PTR expr */\n   278,  /* (218) between_op ::= BETWEEN */\n   278,  /* (219) between_op ::= NOT BETWEEN */\n   219,  /* (220) expr ::= expr between_op expr AND expr */\n   279,  /* (221) in_op ::= IN */\n   279,  /* (222) in_op ::= NOT IN */\n   219,  /* (223) expr ::= expr in_op LP exprlist RP */\n   219,  /* (224) expr ::= LP select RP */\n   219,  /* (225) expr ::= expr in_op LP select RP */\n   219,  /* (226) expr ::= expr in_op nm dbnm paren_exprlist */\n   219,  /* (227) expr ::= EXISTS LP select RP */\n   219,  /* (228) expr ::= CASE case_operand case_exprlist case_else END */\n   282,  /* (229) case_exprlist ::= case_exprlist WHEN expr THEN expr */\n   282,  /* (230) case_exprlist ::= WHEN expr THEN expr */\n   283,  /* (231) case_else ::= ELSE expr */\n   283,  /* (232) case_else ::= */\n   281,  /* (233) case_operand ::= */\n   264,  /* (234) exprlist ::= */\n   255,  /* (235) nexprlist ::= nexprlist COMMA expr */\n   255,  /* (236) nexprlist ::= expr */\n   280,  /* (237) paren_exprlist ::= */\n   280,  /* (238) paren_exprlist ::= LP exprlist RP */\n   192,  /* (239) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */\n   284,  /* (240) uniqueflag ::= UNIQUE */\n   284,  /* (241) uniqueflag ::= */\n   223,  /* (242) eidlist_opt ::= */\n   223,  /* (243) eidlist_opt ::= LP eidlist RP */\n   234,  /* (244) eidlist ::= eidlist COMMA nm collate sortorder */\n   234,  /* (245) eidlist ::= nm collate sortorder */\n   285,  /* (246) collate ::= */\n   285,  /* (247) collate ::= COLLATE ID|STRING */\n   192,  /* (248) cmd ::= DROP INDEX ifexists fullname */\n   192,  /* (249) cmd ::= VACUUM vinto */\n   192,  /* (250) cmd ::= VACUUM nm vinto */\n   286,  /* (251) vinto ::= INTO expr */\n   286,  /* (252) vinto ::= */\n   192,  /* (253) cmd ::= PRAGMA nm dbnm */\n   192,  /* (254) cmd ::= PRAGMA nm dbnm EQ nmnum */\n   192,  /* (255) cmd ::= PRAGMA nm dbnm LP nmnum RP */\n   192,  /* (256) cmd ::= PRAGMA nm dbnm EQ minus_num */\n   192,  /* (257) cmd ::= PRAGMA nm dbnm LP minus_num RP */\n   213,  /* (258) plus_num ::= PLUS INTEGER|FLOAT */\n   214,  /* (259) minus_num ::= MINUS INTEGER|FLOAT */\n   192,  /* (260) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */\n   288,  /* (261) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */\n   290,  /* (262) trigger_time ::= BEFORE|AFTER */\n   290,  /* (263) trigger_time ::= INSTEAD OF */\n   290,  /* (264) trigger_time ::= */\n   291,  /* (265) trigger_event ::= DELETE|INSERT */\n   291,  /* (266) trigger_event ::= UPDATE */\n   291,  /* (267) trigger_event ::= UPDATE OF idlist */\n   293,  /* (268) when_clause ::= */\n   293,  /* (269) when_clause ::= WHEN expr */\n   289,  /* (270) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */\n   289,  /* (271) trigger_cmd_list ::= trigger_cmd SEMI */\n   295,  /* (272) trnm ::= nm DOT nm */\n   296,  /* (273) tridxby ::= INDEXED BY nm */\n   296,  /* (274) tridxby ::= NOT INDEXED */\n   294,  /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */\n   294,  /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */\n   294,  /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */\n   294,  /* (278) trigger_cmd ::= scanpt select scanpt */\n   219,  /* (279) expr ::= RAISE LP IGNORE RP */\n   219,  /* (280) expr ::= RAISE LP raisetype COMMA expr RP */\n   238,  /* (281) raisetype ::= ROLLBACK */\n   238,  /* (282) raisetype ::= ABORT */\n   238,  /* (283) raisetype ::= FAIL */\n   192,  /* (284) cmd ::= DROP TRIGGER ifexists fullname */\n   192,  /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */\n   192,  /* (286) cmd ::= DETACH database_kw_opt expr */\n   298,  /* (287) key_opt ::= */\n   298,  /* (288) key_opt ::= KEY expr */\n   192,  /* (289) cmd ::= REINDEX */\n   192,  /* (290) cmd ::= REINDEX nm dbnm */\n   192,  /* (291) cmd ::= ANALYZE */\n   192,  /* (292) cmd ::= ANALYZE nm dbnm */\n   192,  /* (293) cmd ::= ALTER TABLE fullname RENAME TO nm */\n   192,  /* (294) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */\n   192,  /* (295) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */\n   299,  /* (296) add_column_fullname ::= fullname */\n   192,  /* (297) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */\n   192,  /* (298) cmd ::= create_vtab */\n   192,  /* (299) cmd ::= create_vtab LP vtabarglist RP */\n   301,  /* (300) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */\n   303,  /* (301) vtabarg ::= */\n   304,  /* (302) vtabargtoken ::= ANY */\n   304,  /* (303) vtabargtoken ::= lp anylist RP */\n   305,  /* (304) lp ::= LP */\n   269,  /* (305) with ::= WITH wqlist */\n   269,  /* (306) with ::= WITH RECURSIVE wqlist */\n   308,  /* (307) wqas ::= AS */\n   308,  /* (308) wqas ::= AS MATERIALIZED */\n   308,  /* (309) wqas ::= AS NOT MATERIALIZED */\n   307,  /* (310) wqitem ::= withnm eidlist_opt wqas LP select RP */\n   309,  /* (311) withnm ::= nm */\n   243,  /* (312) wqlist ::= wqitem */\n   243,  /* (313) wqlist ::= wqlist COMMA wqitem */\n   310,  /* (314) windowdefn_list ::= windowdefn_list COMMA windowdefn */\n   311,  /* (315) windowdefn ::= nm AS LP window RP */\n   312,  /* (316) window ::= PARTITION BY nexprlist orderby_opt frame_opt */\n   312,  /* (317) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */\n   312,  /* (318) window ::= ORDER BY sortlist frame_opt */\n   312,  /* (319) window ::= nm ORDER BY sortlist frame_opt */\n   312,  /* (320) window ::= nm frame_opt */\n   313,  /* (321) frame_opt ::= */\n   313,  /* (322) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */\n   313,  /* (323) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */\n   317,  /* (324) range_or_rows ::= RANGE|ROWS|GROUPS */\n   319,  /* (325) frame_bound_s ::= frame_bound */\n   319,  /* (326) frame_bound_s ::= UNBOUNDED PRECEDING */\n   320,  /* (327) frame_bound_e ::= frame_bound */\n   320,  /* (328) frame_bound_e ::= UNBOUNDED FOLLOWING */\n   318,  /* (329) frame_bound ::= expr PRECEDING|FOLLOWING */\n   318,  /* (330) frame_bound ::= CURRENT ROW */\n   321,  /* (331) frame_exclude_opt ::= */\n   321,  /* (332) frame_exclude_opt ::= EXCLUDE frame_exclude */\n   322,  /* (333) frame_exclude ::= NO OTHERS */\n   322,  /* (334) frame_exclude ::= CURRENT ROW */\n   322,  /* (335) frame_exclude ::= GROUP|TIES */\n   253,  /* (336) window_clause ::= WINDOW windowdefn_list */\n   276,  /* (337) filter_over ::= filter_clause over_clause */\n   276,  /* (338) filter_over ::= over_clause */\n   276,  /* (339) filter_over ::= filter_clause */\n   316,  /* (340) over_clause ::= OVER LP window RP */\n   316,  /* (341) over_clause ::= OVER nm */\n   315,  /* (342) filter_clause ::= FILTER LP WHERE expr RP */\n   218,  /* (343) term ::= QNUMBER */\n   187,  /* (344) input ::= cmdlist */\n   188,  /* (345) cmdlist ::= cmdlist ecmd */\n   188,  /* (346) cmdlist ::= ecmd */\n   189,  /* (347) ecmd ::= SEMI */\n   189,  /* (348) ecmd ::= cmdx SEMI */\n   189,  /* (349) ecmd ::= explain cmdx SEMI */\n   194,  /* (350) trans_opt ::= */\n   194,  /* (351) trans_opt ::= TRANSACTION */\n   194,  /* (352) trans_opt ::= TRANSACTION nm */\n   196,  /* (353) savepoint_opt ::= SAVEPOINT */\n   196,  /* (354) savepoint_opt ::= */\n   192,  /* (355) cmd ::= create_table create_table_args */\n   205,  /* (356) table_option_set ::= table_option */\n   203,  /* (357) columnlist ::= columnlist COMMA columnname carglist */\n   203,  /* (358) columnlist ::= columnname carglist */\n   195,  /* (359) nm ::= ID|INDEXED|JOIN_KW */\n   195,  /* (360) nm ::= STRING */\n   210,  /* (361) typetoken ::= typename */\n   211,  /* (362) typename ::= ID|STRING */\n   212,  /* (363) signed ::= plus_num */\n   212,  /* (364) signed ::= minus_num */\n   209,  /* (365) carglist ::= carglist ccons */\n   209,  /* (366) carglist ::= */\n   217,  /* (367) ccons ::= NULL onconf */\n   217,  /* (368) ccons ::= GENERATED ALWAYS AS generated */\n   217,  /* (369) ccons ::= AS generated */\n   204,  /* (370) conslist_opt ::= COMMA conslist */\n   230,  /* (371) conslist ::= conslist tconscomma tcons */\n   230,  /* (372) conslist ::= tcons */\n   231,  /* (373) tconscomma ::= */\n   235,  /* (374) defer_subclause_opt ::= defer_subclause */\n   237,  /* (375) resolvetype ::= raisetype */\n   241,  /* (376) selectnowith ::= oneselect */\n   242,  /* (377) oneselect ::= values */\n   257,  /* (378) sclp ::= selcollist COMMA */\n   258,  /* (379) as ::= ID|STRING */\n   267,  /* (380) indexed_opt ::= indexed_by */\n   275,  /* (381) returning ::= */\n   219,  /* (382) expr ::= term */\n   277,  /* (383) likeop ::= LIKE_KW|MATCH */\n   281,  /* (384) case_operand ::= expr */\n   264,  /* (385) exprlist ::= nexprlist */\n   287,  /* (386) nmnum ::= plus_num */\n   287,  /* (387) nmnum ::= nm */\n   287,  /* (388) nmnum ::= ON */\n   287,  /* (389) nmnum ::= DELETE */\n   287,  /* (390) nmnum ::= DEFAULT */\n   213,  /* (391) plus_num ::= INTEGER|FLOAT */\n   292,  /* (392) foreach_clause ::= */\n   292,  /* (393) foreach_clause ::= FOR EACH ROW */\n   295,  /* (394) trnm ::= nm */\n   296,  /* (395) tridxby ::= */\n   297,  /* (396) database_kw_opt ::= DATABASE */\n   297,  /* (397) database_kw_opt ::= */\n   300,  /* (398) kwcolumn_opt ::= */\n   300,  /* (399) kwcolumn_opt ::= COLUMNKW */\n   302,  /* (400) vtabarglist ::= vtabarg */\n   302,  /* (401) vtabarglist ::= vtabarglist COMMA vtabarg */\n   303,  /* (402) vtabarg ::= vtabarg vtabargtoken */\n   306,  /* (403) anylist ::= */\n   306,  /* (404) anylist ::= anylist LP anylist RP */\n   306,  /* (405) anylist ::= anylist ANY */\n   269,  /* (406) with ::= */\n   310,  /* (407) windowdefn_list ::= windowdefn */\n   312,  /* (408) window ::= frame_opt */\n};\n\n/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number\n** of symbols on the right-hand side of that rule. */\nstatic const signed char yyRuleInfoNRhs[] = {\n   -1,  /* (0) explain ::= EXPLAIN */\n   -3,  /* (1) explain ::= EXPLAIN QUERY PLAN */\n   -1,  /* (2) cmdx ::= cmd */\n   -3,  /* (3) cmd ::= BEGIN transtype trans_opt */\n    0,  /* (4) transtype ::= */\n   -1,  /* (5) transtype ::= DEFERRED */\n   -1,  /* (6) transtype ::= IMMEDIATE */\n   -1,  /* (7) transtype ::= EXCLUSIVE */\n   -2,  /* (8) cmd ::= COMMIT|END trans_opt */\n   -2,  /* (9) cmd ::= ROLLBACK trans_opt */\n   -2,  /* (10) cmd ::= SAVEPOINT nm */\n   -3,  /* (11) cmd ::= RELEASE savepoint_opt nm */\n   -5,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */\n   -6,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */\n   -1,  /* (14) createkw ::= CREATE */\n    0,  /* (15) ifnotexists ::= */\n   -3,  /* (16) ifnotexists ::= IF NOT EXISTS */\n   -1,  /* (17) temp ::= TEMP */\n    0,  /* (18) temp ::= */\n   -5,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */\n   -2,  /* (20) create_table_args ::= AS select */\n    0,  /* (21) table_option_set ::= */\n   -3,  /* (22) table_option_set ::= table_option_set COMMA table_option */\n   -2,  /* (23) table_option ::= WITHOUT nm */\n   -1,  /* (24) table_option ::= nm */\n   -2,  /* (25) columnname ::= nm typetoken */\n    0,  /* (26) typetoken ::= */\n   -4,  /* (27) typetoken ::= typename LP signed RP */\n   -6,  /* (28) typetoken ::= typename LP signed COMMA signed RP */\n   -2,  /* (29) typename ::= typename ID|STRING */\n    0,  /* (30) scanpt ::= */\n    0,  /* (31) scantok ::= */\n   -2,  /* (32) ccons ::= CONSTRAINT nm */\n   -3,  /* (33) ccons ::= DEFAULT scantok term */\n   -4,  /* (34) ccons ::= DEFAULT LP expr RP */\n   -4,  /* (35) ccons ::= DEFAULT PLUS scantok term */\n   -4,  /* (36) ccons ::= DEFAULT MINUS scantok term */\n   -3,  /* (37) ccons ::= DEFAULT scantok ID|INDEXED */\n   -3,  /* (38) ccons ::= NOT NULL onconf */\n   -5,  /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */\n   -2,  /* (40) ccons ::= UNIQUE onconf */\n   -4,  /* (41) ccons ::= CHECK LP expr RP */\n   -4,  /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */\n   -1,  /* (43) ccons ::= defer_subclause */\n   -2,  /* (44) ccons ::= COLLATE ID|STRING */\n   -3,  /* (45) generated ::= LP expr RP */\n   -4,  /* (46) generated ::= LP expr RP ID */\n    0,  /* (47) autoinc ::= */\n   -1,  /* (48) autoinc ::= AUTOINCR */\n    0,  /* (49) refargs ::= */\n   -2,  /* (50) refargs ::= refargs refarg */\n   -2,  /* (51) refarg ::= MATCH nm */\n   -3,  /* (52) refarg ::= ON INSERT refact */\n   -3,  /* (53) refarg ::= ON DELETE refact */\n   -3,  /* (54) refarg ::= ON UPDATE refact */\n   -2,  /* (55) refact ::= SET NULL */\n   -2,  /* (56) refact ::= SET DEFAULT */\n   -1,  /* (57) refact ::= CASCADE */\n   -1,  /* (58) refact ::= RESTRICT */\n   -2,  /* (59) refact ::= NO ACTION */\n   -3,  /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */\n   -2,  /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */\n    0,  /* (62) init_deferred_pred_opt ::= */\n   -2,  /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */\n   -2,  /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */\n    0,  /* (65) conslist_opt ::= */\n   -1,  /* (66) tconscomma ::= COMMA */\n   -2,  /* (67) tcons ::= CONSTRAINT nm */\n   -7,  /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */\n   -5,  /* (69) tcons ::= UNIQUE LP sortlist RP onconf */\n   -5,  /* (70) tcons ::= CHECK LP expr RP onconf */\n  -10,  /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */\n    0,  /* (72) defer_subclause_opt ::= */\n    0,  /* (73) onconf ::= */\n   -3,  /* (74) onconf ::= ON CONFLICT resolvetype */\n    0,  /* (75) orconf ::= */\n   -2,  /* (76) orconf ::= OR resolvetype */\n   -1,  /* (77) resolvetype ::= IGNORE */\n   -1,  /* (78) resolvetype ::= REPLACE */\n   -4,  /* (79) cmd ::= DROP TABLE ifexists fullname */\n   -2,  /* (80) ifexists ::= IF EXISTS */\n    0,  /* (81) ifexists ::= */\n   -9,  /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */\n   -4,  /* (83) cmd ::= DROP VIEW ifexists fullname */\n   -1,  /* (84) cmd ::= select */\n   -3,  /* (85) select ::= WITH wqlist selectnowith */\n   -4,  /* (86) select ::= WITH RECURSIVE wqlist selectnowith */\n   -1,  /* (87) select ::= selectnowith */\n   -3,  /* (88) selectnowith ::= selectnowith multiselect_op oneselect */\n   -1,  /* (89) multiselect_op ::= UNION */\n   -2,  /* (90) multiselect_op ::= UNION ALL */\n   -1,  /* (91) multiselect_op ::= EXCEPT|INTERSECT */\n   -9,  /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */\n  -10,  /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */\n   -4,  /* (94) values ::= VALUES LP nexprlist RP */\n   -1,  /* (95) oneselect ::= mvalues */\n   -5,  /* (96) mvalues ::= values COMMA LP nexprlist RP */\n   -5,  /* (97) mvalues ::= mvalues COMMA LP nexprlist RP */\n   -1,  /* (98) distinct ::= DISTINCT */\n   -1,  /* (99) distinct ::= ALL */\n    0,  /* (100) distinct ::= */\n    0,  /* (101) sclp ::= */\n   -5,  /* (102) selcollist ::= sclp scanpt expr scanpt as */\n   -3,  /* (103) selcollist ::= sclp scanpt STAR */\n   -5,  /* (104) selcollist ::= sclp scanpt nm DOT STAR */\n   -2,  /* (105) as ::= AS nm */\n    0,  /* (106) as ::= */\n    0,  /* (107) from ::= */\n   -2,  /* (108) from ::= FROM seltablist */\n   -2,  /* (109) stl_prefix ::= seltablist joinop */\n    0,  /* (110) stl_prefix ::= */\n   -5,  /* (111) seltablist ::= stl_prefix nm dbnm as on_using */\n   -6,  /* (112) seltablist ::= stl_prefix nm dbnm as indexed_by on_using */\n   -8,  /* (113) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */\n   -6,  /* (114) seltablist ::= stl_prefix LP select RP as on_using */\n   -6,  /* (115) seltablist ::= stl_prefix LP seltablist RP as on_using */\n    0,  /* (116) dbnm ::= */\n   -2,  /* (117) dbnm ::= DOT nm */\n   -1,  /* (118) fullname ::= nm */\n   -3,  /* (119) fullname ::= nm DOT nm */\n   -1,  /* (120) xfullname ::= nm */\n   -3,  /* (121) xfullname ::= nm DOT nm */\n   -5,  /* (122) xfullname ::= nm DOT nm AS nm */\n   -3,  /* (123) xfullname ::= nm AS nm */\n   -1,  /* (124) joinop ::= COMMA|JOIN */\n   -2,  /* (125) joinop ::= JOIN_KW JOIN */\n   -3,  /* (126) joinop ::= JOIN_KW nm JOIN */\n   -4,  /* (127) joinop ::= JOIN_KW nm nm JOIN */\n   -2,  /* (128) on_using ::= ON expr */\n   -4,  /* (129) on_using ::= USING LP idlist RP */\n    0,  /* (130) on_using ::= */\n    0,  /* (131) indexed_opt ::= */\n   -3,  /* (132) indexed_by ::= INDEXED BY nm */\n   -2,  /* (133) indexed_by ::= NOT INDEXED */\n    0,  /* (134) orderby_opt ::= */\n   -3,  /* (135) orderby_opt ::= ORDER BY sortlist */\n   -5,  /* (136) sortlist ::= sortlist COMMA expr sortorder nulls */\n   -3,  /* (137) sortlist ::= expr sortorder nulls */\n   -1,  /* (138) sortorder ::= ASC */\n   -1,  /* (139) sortorder ::= DESC */\n    0,  /* (140) sortorder ::= */\n   -2,  /* (141) nulls ::= NULLS FIRST */\n   -2,  /* (142) nulls ::= NULLS LAST */\n    0,  /* (143) nulls ::= */\n    0,  /* (144) groupby_opt ::= */\n   -3,  /* (145) groupby_opt ::= GROUP BY nexprlist */\n    0,  /* (146) having_opt ::= */\n   -2,  /* (147) having_opt ::= HAVING expr */\n    0,  /* (148) limit_opt ::= */\n   -2,  /* (149) limit_opt ::= LIMIT expr */\n   -4,  /* (150) limit_opt ::= LIMIT expr OFFSET expr */\n   -4,  /* (151) limit_opt ::= LIMIT expr COMMA expr */\n   -6,  /* (152) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */\n    0,  /* (153) where_opt ::= */\n   -2,  /* (154) where_opt ::= WHERE expr */\n    0,  /* (155) where_opt_ret ::= */\n   -2,  /* (156) where_opt_ret ::= WHERE expr */\n   -2,  /* (157) where_opt_ret ::= RETURNING selcollist */\n   -4,  /* (158) where_opt_ret ::= WHERE expr RETURNING selcollist */\n   -9,  /* (159) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */\n   -5,  /* (160) setlist ::= setlist COMMA nm EQ expr */\n   -7,  /* (161) setlist ::= setlist COMMA LP idlist RP EQ expr */\n   -3,  /* (162) setlist ::= nm EQ expr */\n   -5,  /* (163) setlist ::= LP idlist RP EQ expr */\n   -7,  /* (164) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */\n   -8,  /* (165) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */\n    0,  /* (166) upsert ::= */\n   -2,  /* (167) upsert ::= RETURNING selcollist */\n  -12,  /* (168) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */\n   -9,  /* (169) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */\n   -5,  /* (170) upsert ::= ON CONFLICT DO NOTHING returning */\n   -8,  /* (171) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */\n   -2,  /* (172) returning ::= RETURNING selcollist */\n   -2,  /* (173) insert_cmd ::= INSERT orconf */\n   -1,  /* (174) insert_cmd ::= REPLACE */\n    0,  /* (175) idlist_opt ::= */\n   -3,  /* (176) idlist_opt ::= LP idlist RP */\n   -3,  /* (177) idlist ::= idlist COMMA nm */\n   -1,  /* (178) idlist ::= nm */\n   -3,  /* (179) expr ::= LP expr RP */\n   -1,  /* (180) expr ::= ID|INDEXED|JOIN_KW */\n   -3,  /* (181) expr ::= nm DOT nm */\n   -5,  /* (182) expr ::= nm DOT nm DOT nm */\n   -1,  /* (183) term ::= NULL|FLOAT|BLOB */\n   -1,  /* (184) term ::= STRING */\n   -1,  /* (185) term ::= INTEGER */\n   -1,  /* (186) expr ::= VARIABLE */\n   -3,  /* (187) expr ::= expr COLLATE ID|STRING */\n   -6,  /* (188) expr ::= CAST LP expr AS typetoken RP */\n   -5,  /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */\n   -8,  /* (190) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */\n   -4,  /* (191) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */\n   -6,  /* (192) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */\n   -9,  /* (193) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */\n   -5,  /* (194) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */\n   -1,  /* (195) term ::= CTIME_KW */\n   -5,  /* (196) expr ::= LP nexprlist COMMA expr RP */\n   -3,  /* (197) expr ::= expr AND expr */\n   -3,  /* (198) expr ::= expr OR expr */\n   -3,  /* (199) expr ::= expr LT|GT|GE|LE expr */\n   -3,  /* (200) expr ::= expr EQ|NE expr */\n   -3,  /* (201) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */\n   -3,  /* (202) expr ::= expr PLUS|MINUS expr */\n   -3,  /* (203) expr ::= expr STAR|SLASH|REM expr */\n   -3,  /* (204) expr ::= expr CONCAT expr */\n   -2,  /* (205) likeop ::= NOT LIKE_KW|MATCH */\n   -3,  /* (206) expr ::= expr likeop expr */\n   -5,  /* (207) expr ::= expr likeop expr ESCAPE expr */\n   -2,  /* (208) expr ::= expr ISNULL|NOTNULL */\n   -3,  /* (209) expr ::= expr NOT NULL */\n   -3,  /* (210) expr ::= expr IS expr */\n   -4,  /* (211) expr ::= expr IS NOT expr */\n   -6,  /* (212) expr ::= expr IS NOT DISTINCT FROM expr */\n   -5,  /* (213) expr ::= expr IS DISTINCT FROM expr */\n   -2,  /* (214) expr ::= NOT expr */\n   -2,  /* (215) expr ::= BITNOT expr */\n   -2,  /* (216) expr ::= PLUS|MINUS expr */\n   -3,  /* (217) expr ::= expr PTR expr */\n   -1,  /* (218) between_op ::= BETWEEN */\n   -2,  /* (219) between_op ::= NOT BETWEEN */\n   -5,  /* (220) expr ::= expr between_op expr AND expr */\n   -1,  /* (221) in_op ::= IN */\n   -2,  /* (222) in_op ::= NOT IN */\n   -5,  /* (223) expr ::= expr in_op LP exprlist RP */\n   -3,  /* (224) expr ::= LP select RP */\n   -5,  /* (225) expr ::= expr in_op LP select RP */\n   -5,  /* (226) expr ::= expr in_op nm dbnm paren_exprlist */\n   -4,  /* (227) expr ::= EXISTS LP select RP */\n   -5,  /* (228) expr ::= CASE case_operand case_exprlist case_else END */\n   -5,  /* (229) case_exprlist ::= case_exprlist WHEN expr THEN expr */\n   -4,  /* (230) case_exprlist ::= WHEN expr THEN expr */\n   -2,  /* (231) case_else ::= ELSE expr */\n    0,  /* (232) case_else ::= */\n    0,  /* (233) case_operand ::= */\n    0,  /* (234) exprlist ::= */\n   -3,  /* (235) nexprlist ::= nexprlist COMMA expr */\n   -1,  /* (236) nexprlist ::= expr */\n    0,  /* (237) paren_exprlist ::= */\n   -3,  /* (238) paren_exprlist ::= LP exprlist RP */\n  -12,  /* (239) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */\n   -1,  /* (240) uniqueflag ::= UNIQUE */\n    0,  /* (241) uniqueflag ::= */\n    0,  /* (242) eidlist_opt ::= */\n   -3,  /* (243) eidlist_opt ::= LP eidlist RP */\n   -5,  /* (244) eidlist ::= eidlist COMMA nm collate sortorder */\n   -3,  /* (245) eidlist ::= nm collate sortorder */\n    0,  /* (246) collate ::= */\n   -2,  /* (247) collate ::= COLLATE ID|STRING */\n   -4,  /* (248) cmd ::= DROP INDEX ifexists fullname */\n   -2,  /* (249) cmd ::= VACUUM vinto */\n   -3,  /* (250) cmd ::= VACUUM nm vinto */\n   -2,  /* (251) vinto ::= INTO expr */\n    0,  /* (252) vinto ::= */\n   -3,  /* (253) cmd ::= PRAGMA nm dbnm */\n   -5,  /* (254) cmd ::= PRAGMA nm dbnm EQ nmnum */\n   -6,  /* (255) cmd ::= PRAGMA nm dbnm LP nmnum RP */\n   -5,  /* (256) cmd ::= PRAGMA nm dbnm EQ minus_num */\n   -6,  /* (257) cmd ::= PRAGMA nm dbnm LP minus_num RP */\n   -2,  /* (258) plus_num ::= PLUS INTEGER|FLOAT */\n   -2,  /* (259) minus_num ::= MINUS INTEGER|FLOAT */\n   -5,  /* (260) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */\n  -11,  /* (261) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */\n   -1,  /* (262) trigger_time ::= BEFORE|AFTER */\n   -2,  /* (263) trigger_time ::= INSTEAD OF */\n    0,  /* (264) trigger_time ::= */\n   -1,  /* (265) trigger_event ::= DELETE|INSERT */\n   -1,  /* (266) trigger_event ::= UPDATE */\n   -3,  /* (267) trigger_event ::= UPDATE OF idlist */\n    0,  /* (268) when_clause ::= */\n   -2,  /* (269) when_clause ::= WHEN expr */\n   -3,  /* (270) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */\n   -2,  /* (271) trigger_cmd_list ::= trigger_cmd SEMI */\n   -3,  /* (272) trnm ::= nm DOT nm */\n   -3,  /* (273) tridxby ::= INDEXED BY nm */\n   -2,  /* (274) tridxby ::= NOT INDEXED */\n   -9,  /* (275) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */\n   -8,  /* (276) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */\n   -6,  /* (277) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */\n   -3,  /* (278) trigger_cmd ::= scanpt select scanpt */\n   -4,  /* (279) expr ::= RAISE LP IGNORE RP */\n   -6,  /* (280) expr ::= RAISE LP raisetype COMMA expr RP */\n   -1,  /* (281) raisetype ::= ROLLBACK */\n   -1,  /* (282) raisetype ::= ABORT */\n   -1,  /* (283) raisetype ::= FAIL */\n   -4,  /* (284) cmd ::= DROP TRIGGER ifexists fullname */\n   -6,  /* (285) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */\n   -3,  /* (286) cmd ::= DETACH database_kw_opt expr */\n    0,  /* (287) key_opt ::= */\n   -2,  /* (288) key_opt ::= KEY expr */\n   -1,  /* (289) cmd ::= REINDEX */\n   -3,  /* (290) cmd ::= REINDEX nm dbnm */\n   -1,  /* (291) cmd ::= ANALYZE */\n   -3,  /* (292) cmd ::= ANALYZE nm dbnm */\n   -6,  /* (293) cmd ::= ALTER TABLE fullname RENAME TO nm */\n   -7,  /* (294) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */\n   -6,  /* (295) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */\n   -1,  /* (296) add_column_fullname ::= fullname */\n   -8,  /* (297) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */\n   -1,  /* (298) cmd ::= create_vtab */\n   -4,  /* (299) cmd ::= create_vtab LP vtabarglist RP */\n   -8,  /* (300) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */\n    0,  /* (301) vtabarg ::= */\n   -1,  /* (302) vtabargtoken ::= ANY */\n   -3,  /* (303) vtabargtoken ::= lp anylist RP */\n   -1,  /* (304) lp ::= LP */\n   -2,  /* (305) with ::= WITH wqlist */\n   -3,  /* (306) with ::= WITH RECURSIVE wqlist */\n   -1,  /* (307) wqas ::= AS */\n   -2,  /* (308) wqas ::= AS MATERIALIZED */\n   -3,  /* (309) wqas ::= AS NOT MATERIALIZED */\n   -6,  /* (310) wqitem ::= withnm eidlist_opt wqas LP select RP */\n   -1,  /* (311) withnm ::= nm */\n   -1,  /* (312) wqlist ::= wqitem */\n   -3,  /* (313) wqlist ::= wqlist COMMA wqitem */\n   -3,  /* (314) windowdefn_list ::= windowdefn_list COMMA windowdefn */\n   -5,  /* (315) windowdefn ::= nm AS LP window RP */\n   -5,  /* (316) window ::= PARTITION BY nexprlist orderby_opt frame_opt */\n   -6,  /* (317) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */\n   -4,  /* (318) window ::= ORDER BY sortlist frame_opt */\n   -5,  /* (319) window ::= nm ORDER BY sortlist frame_opt */\n   -2,  /* (320) window ::= nm frame_opt */\n    0,  /* (321) frame_opt ::= */\n   -3,  /* (322) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */\n   -6,  /* (323) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */\n   -1,  /* (324) range_or_rows ::= RANGE|ROWS|GROUPS */\n   -1,  /* (325) frame_bound_s ::= frame_bound */\n   -2,  /* (326) frame_bound_s ::= UNBOUNDED PRECEDING */\n   -1,  /* (327) frame_bound_e ::= frame_bound */\n   -2,  /* (328) frame_bound_e ::= UNBOUNDED FOLLOWING */\n   -2,  /* (329) frame_bound ::= expr PRECEDING|FOLLOWING */\n   -2,  /* (330) frame_bound ::= CURRENT ROW */\n    0,  /* (331) frame_exclude_opt ::= */\n   -2,  /* (332) frame_exclude_opt ::= EXCLUDE frame_exclude */\n   -2,  /* (333) frame_exclude ::= NO OTHERS */\n   -2,  /* (334) frame_exclude ::= CURRENT ROW */\n   -1,  /* (335) frame_exclude ::= GROUP|TIES */\n   -2,  /* (336) window_clause ::= WINDOW windowdefn_list */\n   -2,  /* (337) filter_over ::= filter_clause over_clause */\n   -1,  /* (338) filter_over ::= over_clause */\n   -1,  /* (339) filter_over ::= filter_clause */\n   -4,  /* (340) over_clause ::= OVER LP window RP */\n   -2,  /* (341) over_clause ::= OVER nm */\n   -5,  /* (342) filter_clause ::= FILTER LP WHERE expr RP */\n   -1,  /* (343) term ::= QNUMBER */\n   -1,  /* (344) input ::= cmdlist */\n   -2,  /* (345) cmdlist ::= cmdlist ecmd */\n   -1,  /* (346) cmdlist ::= ecmd */\n   -1,  /* (347) ecmd ::= SEMI */\n   -2,  /* (348) ecmd ::= cmdx SEMI */\n   -3,  /* (349) ecmd ::= explain cmdx SEMI */\n    0,  /* (350) trans_opt ::= */\n   -1,  /* (351) trans_opt ::= TRANSACTION */\n   -2,  /* (352) trans_opt ::= TRANSACTION nm */\n   -1,  /* (353) savepoint_opt ::= SAVEPOINT */\n    0,  /* (354) savepoint_opt ::= */\n   -2,  /* (355) cmd ::= create_table create_table_args */\n   -1,  /* (356) table_option_set ::= table_option */\n   -4,  /* (357) columnlist ::= columnlist COMMA columnname carglist */\n   -2,  /* (358) columnlist ::= columnname carglist */\n   -1,  /* (359) nm ::= ID|INDEXED|JOIN_KW */\n   -1,  /* (360) nm ::= STRING */\n   -1,  /* (361) typetoken ::= typename */\n   -1,  /* (362) typename ::= ID|STRING */\n   -1,  /* (363) signed ::= plus_num */\n   -1,  /* (364) signed ::= minus_num */\n   -2,  /* (365) carglist ::= carglist ccons */\n    0,  /* (366) carglist ::= */\n   -2,  /* (367) ccons ::= NULL onconf */\n   -4,  /* (368) ccons ::= GENERATED ALWAYS AS generated */\n   -2,  /* (369) ccons ::= AS generated */\n   -2,  /* (370) conslist_opt ::= COMMA conslist */\n   -3,  /* (371) conslist ::= conslist tconscomma tcons */\n   -1,  /* (372) conslist ::= tcons */\n    0,  /* (373) tconscomma ::= */\n   -1,  /* (374) defer_subclause_opt ::= defer_subclause */\n   -1,  /* (375) resolvetype ::= raisetype */\n   -1,  /* (376) selectnowith ::= oneselect */\n   -1,  /* (377) oneselect ::= values */\n   -2,  /* (378) sclp ::= selcollist COMMA */\n   -1,  /* (379) as ::= ID|STRING */\n   -1,  /* (380) indexed_opt ::= indexed_by */\n    0,  /* (381) returning ::= */\n   -1,  /* (382) expr ::= term */\n   -1,  /* (383) likeop ::= LIKE_KW|MATCH */\n   -1,  /* (384) case_operand ::= expr */\n   -1,  /* (385) exprlist ::= nexprlist */\n   -1,  /* (386) nmnum ::= plus_num */\n   -1,  /* (387) nmnum ::= nm */\n   -1,  /* (388) nmnum ::= ON */\n   -1,  /* (389) nmnum ::= DELETE */\n   -1,  /* (390) nmnum ::= DEFAULT */\n   -1,  /* (391) plus_num ::= INTEGER|FLOAT */\n    0,  /* (392) foreach_clause ::= */\n   -3,  /* (393) foreach_clause ::= FOR EACH ROW */\n   -1,  /* (394) trnm ::= nm */\n    0,  /* (395) tridxby ::= */\n   -1,  /* (396) database_kw_opt ::= DATABASE */\n    0,  /* (397) database_kw_opt ::= */\n    0,  /* (398) kwcolumn_opt ::= */\n   -1,  /* (399) kwcolumn_opt ::= COLUMNKW */\n   -1,  /* (400) vtabarglist ::= vtabarg */\n   -3,  /* (401) vtabarglist ::= vtabarglist COMMA vtabarg */\n   -2,  /* (402) vtabarg ::= vtabarg vtabargtoken */\n    0,  /* (403) anylist ::= */\n   -4,  /* (404) anylist ::= anylist LP anylist RP */\n   -2,  /* (405) anylist ::= anylist ANY */\n    0,  /* (406) with ::= */\n   -1,  /* (407) windowdefn_list ::= windowdefn */\n   -1,  /* (408) window ::= frame_opt */\n};\n\nstatic void yy_accept(yyParser*);  /* Forward Declaration */\n\n/*\n** Perform a reduce action and the shift that must immediately\n** follow the reduce.\n**\n** The yyLookahead and yyLookaheadToken parameters provide reduce actions\n** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE\n** if the lookahead token has already been consumed.  As this procedure is\n** only called from one place, optimizing compilers will in-line it, which\n** means that the extra parameters have no performance impact.\n*/\nstatic YYACTIONTYPE yy_reduce(\n  yyParser *yypParser,         /* The parser */\n  unsigned int yyruleno,       /* Number of the rule by which to reduce */\n  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */\n  sqlite3ParserTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */\n  sqlite3ParserCTX_PDECL                   /* %extra_context */\n){\n  int yygoto;                     /* The next state */\n  YYACTIONTYPE yyact;             /* The next action */\n  yyStackEntry *yymsp;            /* The top of the parser's stack */\n  int yysize;                     /* Amount to pop the stack */\n  sqlite3ParserARG_FETCH\n  (void)yyLookahead;\n  (void)yyLookaheadToken;\n  yymsp = yypParser->yytos;\n\n  switch( yyruleno ){\n  /* Beginning here are the reduction cases.  A typical example\n  ** follows:\n  **   case 0:\n  **  #line <lineno> <grammarfile>\n  **     { ... }           // User supplied code\n  **  #line <lineno> <thisfile>\n  **     break;\n  */\n/********** Begin reduce actions **********************************************/\n        YYMINORTYPE yylhsminor;\n      case 0: /* explain ::= EXPLAIN */\n{ if( pParse->pReprepare==0 ) pParse->explain = 1; }\n        break;\n      case 1: /* explain ::= EXPLAIN QUERY PLAN */\n{ if( pParse->pReprepare==0 ) pParse->explain = 2; }\n        break;\n      case 2: /* cmdx ::= cmd */\n{ sqlite3FinishCoding(pParse); }\n        break;\n      case 3: /* cmd ::= BEGIN transtype trans_opt */\n{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy502);}\n        break;\n      case 4: /* transtype ::= */\n{yymsp[1].minor.yy502 = TK_DEFERRED;}\n        break;\n      case 5: /* transtype ::= DEFERRED */\n      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);\n      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);\n      case 324: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==324);\n{yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-X*/}\n        break;\n      case 8: /* cmd ::= COMMIT|END trans_opt */\n      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);\n{sqlite3EndTransaction(pParse,yymsp[-1].major);}\n        break;\n      case 10: /* cmd ::= SAVEPOINT nm */\n{\n  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);\n}\n        break;\n      case 11: /* cmd ::= RELEASE savepoint_opt nm */\n{\n  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);\n}\n        break;\n      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */\n{\n  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);\n}\n        break;\n      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */\n{\n   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy502,0,0,yymsp[-2].minor.yy502);\n}\n        break;\n      case 14: /* createkw ::= CREATE */\n{\n  disableLookaside(pParse);\n}\n        break;\n      case 15: /* ifnotexists ::= */\n      case 18: /* temp ::= */ yytestcase(yyruleno==18);\n      case 47: /* autoinc ::= */ yytestcase(yyruleno==47);\n      case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);\n      case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);\n      case 81: /* ifexists ::= */ yytestcase(yyruleno==81);\n      case 100: /* distinct ::= */ yytestcase(yyruleno==100);\n      case 246: /* collate ::= */ yytestcase(yyruleno==246);\n{yymsp[1].minor.yy502 = 0;}\n        break;\n      case 16: /* ifnotexists ::= IF NOT EXISTS */\n{yymsp[-2].minor.yy502 = 1;}\n        break;\n      case 17: /* temp ::= TEMP */\n{yymsp[0].minor.yy502 = pParse->db->init.busy==0;}\n        break;\n      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */\n{\n  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy9,0);\n}\n        break;\n      case 20: /* create_table_args ::= AS select */\n{\n  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy637);\n  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy637);\n}\n        break;\n      case 21: /* table_option_set ::= */\n{yymsp[1].minor.yy9 = 0;}\n        break;\n      case 22: /* table_option_set ::= table_option_set COMMA table_option */\n{yylhsminor.yy9 = yymsp[-2].minor.yy9|yymsp[0].minor.yy9;}\n  yymsp[-2].minor.yy9 = yylhsminor.yy9;\n        break;\n      case 23: /* table_option ::= WITHOUT nm */\n{\n  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,\"rowid\",5)==0 ){\n    yymsp[-1].minor.yy9 = TF_WithoutRowid | TF_NoVisibleRowid;\n  }else{\n    yymsp[-1].minor.yy9 = 0;\n    sqlite3ErrorMsg(pParse, \"unknown table option: %.*s\", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);\n  }\n}\n        break;\n      case 24: /* table_option ::= nm */\n{\n  if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,\"strict\",6)==0 ){\n    yylhsminor.yy9 = TF_Strict;\n  }else{\n    yylhsminor.yy9 = 0;\n    sqlite3ErrorMsg(pParse, \"unknown table option: %.*s\", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);\n  }\n}\n  yymsp[0].minor.yy9 = yylhsminor.yy9;\n        break;\n      case 25: /* columnname ::= nm typetoken */\n{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}\n        break;\n      case 26: /* typetoken ::= */\n      case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);\n      case 106: /* as ::= */ yytestcase(yyruleno==106);\n{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}\n        break;\n      case 27: /* typetoken ::= typename LP signed RP */\n{\n  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);\n}\n        break;\n      case 28: /* typetoken ::= typename LP signed COMMA signed RP */\n{\n  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);\n}\n        break;\n      case 29: /* typename ::= typename ID|STRING */\n{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}\n        break;\n      case 30: /* scanpt ::= */\n{\n  assert( yyLookahead!=YYNOCODE );\n  yymsp[1].minor.yy342 = yyLookaheadToken.z;\n}\n        break;\n      case 31: /* scantok ::= */\n{\n  assert( yyLookahead!=YYNOCODE );\n  yymsp[1].minor.yy0 = yyLookaheadToken;\n}\n        break;\n      case 32: /* ccons ::= CONSTRAINT nm */\n      case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);\n{ASSERT_IS_CREATE; pParse->u1.cr.constraintName = yymsp[0].minor.yy0;}\n        break;\n      case 33: /* ccons ::= DEFAULT scantok term */\n{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy590,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}\n        break;\n      case 34: /* ccons ::= DEFAULT LP expr RP */\n{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy590,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}\n        break;\n      case 35: /* ccons ::= DEFAULT PLUS scantok term */\n{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy590,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}\n        break;\n      case 36: /* ccons ::= DEFAULT MINUS scantok term */\n{\n  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy590, 0);\n  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);\n}\n        break;\n      case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */\n{\n  Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);\n  if( p ){\n    sqlite3ExprIdToTrueFalse(p);\n    testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );\n  }\n    sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);\n}\n        break;\n      case 38: /* ccons ::= NOT NULL onconf */\n{sqlite3AddNotNull(pParse, yymsp[0].minor.yy502);}\n        break;\n      case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */\n{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy502,yymsp[0].minor.yy502,yymsp[-2].minor.yy502);}\n        break;\n      case 40: /* ccons ::= UNIQUE onconf */\n{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy502,0,0,0,0,\n                                   SQLITE_IDXTYPE_UNIQUE);}\n        break;\n      case 41: /* ccons ::= CHECK LP expr RP */\n{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy590,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}\n        break;\n      case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */\n{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy402,yymsp[0].minor.yy502);}\n        break;\n      case 43: /* ccons ::= defer_subclause */\n{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy502);}\n        break;\n      case 44: /* ccons ::= COLLATE ID|STRING */\n{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}\n        break;\n      case 45: /* generated ::= LP expr RP */\n{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy590,0);}\n        break;\n      case 46: /* generated ::= LP expr RP ID */\n{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy590,&yymsp[0].minor.yy0);}\n        break;\n      case 48: /* autoinc ::= AUTOINCR */\n{yymsp[0].minor.yy502 = 1;}\n        break;\n      case 49: /* refargs ::= */\n{ yymsp[1].minor.yy502 = OE_None*0x0101; /* EV: R-19803-45884 */}\n        break;\n      case 50: /* refargs ::= refargs refarg */\n{ yymsp[-1].minor.yy502 = (yymsp[-1].minor.yy502 & ~yymsp[0].minor.yy481.mask) | yymsp[0].minor.yy481.value; }\n        break;\n      case 51: /* refarg ::= MATCH nm */\n{ yymsp[-1].minor.yy481.value = 0;     yymsp[-1].minor.yy481.mask = 0x000000; }\n        break;\n      case 52: /* refarg ::= ON INSERT refact */\n{ yymsp[-2].minor.yy481.value = 0;     yymsp[-2].minor.yy481.mask = 0x000000; }\n        break;\n      case 53: /* refarg ::= ON DELETE refact */\n{ yymsp[-2].minor.yy481.value = yymsp[0].minor.yy502;     yymsp[-2].minor.yy481.mask = 0x0000ff; }\n        break;\n      case 54: /* refarg ::= ON UPDATE refact */\n{ yymsp[-2].minor.yy481.value = yymsp[0].minor.yy502<<8;  yymsp[-2].minor.yy481.mask = 0x00ff00; }\n        break;\n      case 55: /* refact ::= SET NULL */\n{ yymsp[-1].minor.yy502 = OE_SetNull;  /* EV: R-33326-45252 */}\n        break;\n      case 56: /* refact ::= SET DEFAULT */\n{ yymsp[-1].minor.yy502 = OE_SetDflt;  /* EV: R-33326-45252 */}\n        break;\n      case 57: /* refact ::= CASCADE */\n{ yymsp[0].minor.yy502 = OE_Cascade;  /* EV: R-33326-45252 */}\n        break;\n      case 58: /* refact ::= RESTRICT */\n{ yymsp[0].minor.yy502 = OE_Restrict; /* EV: R-33326-45252 */}\n        break;\n      case 59: /* refact ::= NO ACTION */\n{ yymsp[-1].minor.yy502 = OE_None;     /* EV: R-33326-45252 */}\n        break;\n      case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */\n{yymsp[-2].minor.yy502 = 0;}\n        break;\n      case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */\n      case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);\n      case 173: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==173);\n{yymsp[-1].minor.yy502 = yymsp[0].minor.yy502;}\n        break;\n      case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */\n      case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);\n      case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);\n      case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);\n      case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);\n{yymsp[-1].minor.yy502 = 1;}\n        break;\n      case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */\n{yymsp[-1].minor.yy502 = 0;}\n        break;\n      case 66: /* tconscomma ::= COMMA */\n{ASSERT_IS_CREATE; pParse->u1.cr.constraintName.n = 0;}\n        break;\n      case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */\n{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy402,yymsp[0].minor.yy502,yymsp[-2].minor.yy502,0);}\n        break;\n      case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */\n{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy402,yymsp[0].minor.yy502,0,0,0,0,\n                                       SQLITE_IDXTYPE_UNIQUE);}\n        break;\n      case 70: /* tcons ::= CHECK LP expr RP onconf */\n{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy590,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}\n        break;\n      case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */\n{\n    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy402, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy402, yymsp[-1].minor.yy502);\n    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy502);\n}\n        break;\n      case 73: /* onconf ::= */\n      case 75: /* orconf ::= */ yytestcase(yyruleno==75);\n{yymsp[1].minor.yy502 = OE_Default;}\n        break;\n      case 74: /* onconf ::= ON CONFLICT resolvetype */\n{yymsp[-2].minor.yy502 = yymsp[0].minor.yy502;}\n        break;\n      case 77: /* resolvetype ::= IGNORE */\n{yymsp[0].minor.yy502 = OE_Ignore;}\n        break;\n      case 78: /* resolvetype ::= REPLACE */\n      case 174: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==174);\n{yymsp[0].minor.yy502 = OE_Replace;}\n        break;\n      case 79: /* cmd ::= DROP TABLE ifexists fullname */\n{\n  sqlite3DropTable(pParse, yymsp[0].minor.yy563, 0, yymsp[-1].minor.yy502);\n}\n        break;\n      case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */\n{\n  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy402, yymsp[0].minor.yy637, yymsp[-7].minor.yy502, yymsp[-5].minor.yy502);\n}\n        break;\n      case 83: /* cmd ::= DROP VIEW ifexists fullname */\n{\n  sqlite3DropTable(pParse, yymsp[0].minor.yy563, 1, yymsp[-1].minor.yy502);\n}\n        break;\n      case 84: /* cmd ::= select */\n{\n  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};\n  if( (pParse->db->mDbFlags & DBFLAG_EncodingFixed)!=0\n   || sqlite3ReadSchema(pParse)==SQLITE_OK\n  ){\n    sqlite3Select(pParse, yymsp[0].minor.yy637, &dest);\n  }\n  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy637);\n}\n        break;\n      case 85: /* select ::= WITH wqlist selectnowith */\n{yymsp[-2].minor.yy637 = attachWithToSelect(pParse,yymsp[0].minor.yy637,yymsp[-1].minor.yy125);}\n        break;\n      case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */\n{yymsp[-3].minor.yy637 = attachWithToSelect(pParse,yymsp[0].minor.yy637,yymsp[-1].minor.yy125);}\n        break;\n      case 87: /* select ::= selectnowith */\n{\n  Select *p = yymsp[0].minor.yy637;\n  if( p ){\n    parserDoubleLinkSelect(pParse, p);\n  }\n}\n        break;\n      case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */\n{\n  Select *pRhs = yymsp[0].minor.yy637;\n  Select *pLhs = yymsp[-2].minor.yy637;\n  if( pRhs && pRhs->pPrior ){\n    SrcList *pFrom;\n    Token x;\n    x.n = 0;\n    parserDoubleLinkSelect(pParse, pRhs);\n    pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0);\n    pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);\n  }\n  if( pRhs ){\n    pRhs->op = (u8)yymsp[-1].minor.yy502;\n    pRhs->pPrior = pLhs;\n    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~(u32)SF_MultiValue;\n    pRhs->selFlags &= ~(u32)SF_MultiValue;\n    if( yymsp[-1].minor.yy502!=TK_ALL ) pParse->hasCompound = 1;\n  }else{\n    sqlite3SelectDelete(pParse->db, pLhs);\n  }\n  yymsp[-2].minor.yy637 = pRhs;\n}\n        break;\n      case 89: /* multiselect_op ::= UNION */\n      case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);\n{yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-OP*/}\n        break;\n      case 90: /* multiselect_op ::= UNION ALL */\n{yymsp[-1].minor.yy502 = TK_ALL;}\n        break;\n      case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */\n{\n  yymsp[-8].minor.yy637 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy402,yymsp[-5].minor.yy563,yymsp[-4].minor.yy590,yymsp[-3].minor.yy402,yymsp[-2].minor.yy590,yymsp[-1].minor.yy402,yymsp[-7].minor.yy502,yymsp[0].minor.yy590);\n}\n        break;\n      case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */\n{\n  yymsp[-9].minor.yy637 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy402,yymsp[-6].minor.yy563,yymsp[-5].minor.yy590,yymsp[-4].minor.yy402,yymsp[-3].minor.yy590,yymsp[-1].minor.yy402,yymsp[-8].minor.yy502,yymsp[0].minor.yy590);\n  if( yymsp[-9].minor.yy637 ){\n    yymsp[-9].minor.yy637->pWinDefn = yymsp[-2].minor.yy483;\n  }else{\n    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy483);\n  }\n}\n        break;\n      case 94: /* values ::= VALUES LP nexprlist RP */\n{\n  yymsp[-3].minor.yy637 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy402,0,0,0,0,0,SF_Values,0);\n}\n        break;\n      case 95: /* oneselect ::= mvalues */\n{\n  sqlite3MultiValuesEnd(pParse, yymsp[0].minor.yy637);\n}\n        break;\n      case 96: /* mvalues ::= values COMMA LP nexprlist RP */\n      case 97: /* mvalues ::= mvalues COMMA LP nexprlist RP */ yytestcase(yyruleno==97);\n{\n  yymsp[-4].minor.yy637 = sqlite3MultiValues(pParse, yymsp[-4].minor.yy637, yymsp[-1].minor.yy402);\n}\n        break;\n      case 98: /* distinct ::= DISTINCT */\n{yymsp[0].minor.yy502 = SF_Distinct;}\n        break;\n      case 99: /* distinct ::= ALL */\n{yymsp[0].minor.yy502 = SF_All;}\n        break;\n      case 101: /* sclp ::= */\n      case 134: /* orderby_opt ::= */ yytestcase(yyruleno==134);\n      case 144: /* groupby_opt ::= */ yytestcase(yyruleno==144);\n      case 234: /* exprlist ::= */ yytestcase(yyruleno==234);\n      case 237: /* paren_exprlist ::= */ yytestcase(yyruleno==237);\n      case 242: /* eidlist_opt ::= */ yytestcase(yyruleno==242);\n{yymsp[1].minor.yy402 = 0;}\n        break;\n      case 102: /* selcollist ::= sclp scanpt expr scanpt as */\n{\n   yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy402, yymsp[-2].minor.yy590);\n   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy402, &yymsp[0].minor.yy0, 1);\n   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy402,yymsp[-3].minor.yy342,yymsp[-1].minor.yy342);\n}\n        break;\n      case 103: /* selcollist ::= sclp scanpt STAR */\n{\n  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);\n  sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail));\n  yymsp[-2].minor.yy402 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy402, p);\n}\n        break;\n      case 104: /* selcollist ::= sclp scanpt nm DOT STAR */\n{\n  Expr *pRight, *pLeft, *pDot;\n  pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);\n  sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));\n  pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0);\n  pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy402, pDot);\n}\n        break;\n      case 105: /* as ::= AS nm */\n      case 117: /* dbnm ::= DOT nm */ yytestcase(yyruleno==117);\n      case 258: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==258);\n      case 259: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==259);\n{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}\n        break;\n      case 107: /* from ::= */\n      case 110: /* stl_prefix ::= */ yytestcase(yyruleno==110);\n{yymsp[1].minor.yy563 = 0;}\n        break;\n      case 108: /* from ::= FROM seltablist */\n{\n  yymsp[-1].minor.yy563 = yymsp[0].minor.yy563;\n  sqlite3SrcListShiftJoinType(pParse,yymsp[-1].minor.yy563);\n}\n        break;\n      case 109: /* stl_prefix ::= seltablist joinop */\n{\n   if( ALWAYS(yymsp[-1].minor.yy563 && yymsp[-1].minor.yy563->nSrc>0) ) yymsp[-1].minor.yy563->a[yymsp[-1].minor.yy563->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy502;\n}\n        break;\n      case 111: /* seltablist ::= stl_prefix nm dbnm as on_using */\n{\n  yymsp[-4].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-4].minor.yy563,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy421);\n}\n        break;\n      case 112: /* seltablist ::= stl_prefix nm dbnm as indexed_by on_using */\n{\n  yymsp[-5].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy563,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,&yymsp[0].minor.yy421);\n  sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy563, &yymsp[-1].minor.yy0);\n}\n        break;\n      case 113: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_using */\n{\n  yymsp[-7].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-7].minor.yy563,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy421);\n  sqlite3SrcListFuncArgs(pParse, yymsp[-7].minor.yy563, yymsp[-3].minor.yy402);\n}\n        break;\n      case 114: /* seltablist ::= stl_prefix LP select RP as on_using */\n{\n    yymsp[-5].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy563,0,0,&yymsp[-1].minor.yy0,yymsp[-3].minor.yy637,&yymsp[0].minor.yy421);\n  }\n        break;\n      case 115: /* seltablist ::= stl_prefix LP seltablist RP as on_using */\n{\n    if( yymsp[-5].minor.yy563==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy421.pOn==0 && yymsp[0].minor.yy421.pUsing==0 ){\n      yymsp[-5].minor.yy563 = yymsp[-3].minor.yy563;\n    }else if( ALWAYS(yymsp[-3].minor.yy563!=0) && yymsp[-3].minor.yy563->nSrc==1 ){\n      yymsp[-5].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy563,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy421);\n      if( yymsp[-5].minor.yy563 ){\n        SrcItem *pNew = &yymsp[-5].minor.yy563->a[yymsp[-5].minor.yy563->nSrc-1];\n        SrcItem *pOld = yymsp[-3].minor.yy563->a;\n        assert( pOld->fg.fixedSchema==0 );\n        pNew->zName = pOld->zName;\n        assert( pOld->fg.fixedSchema==0 );\n        if( pOld->fg.isSubquery ){\n          pNew->fg.isSubquery = 1;\n          pNew->u4.pSubq = pOld->u4.pSubq;\n          pOld->u4.pSubq = 0;\n          pOld->fg.isSubquery = 0;\n          assert( pNew->u4.pSubq!=0 && pNew->u4.pSubq->pSelect!=0 );\n          if( (pNew->u4.pSubq->pSelect->selFlags & SF_NestedFrom)!=0 ){\n            pNew->fg.isNestedFrom = 1;\n          }\n        }else{\n          pNew->u4.zDatabase = pOld->u4.zDatabase;\n          pOld->u4.zDatabase = 0;\n        }\n        if( pOld->fg.isTabFunc ){\n          pNew->u1.pFuncArg = pOld->u1.pFuncArg;\n          pOld->u1.pFuncArg = 0;\n          pOld->fg.isTabFunc = 0;\n          pNew->fg.isTabFunc = 1;\n        }\n        pOld->zName = 0;\n      }\n      sqlite3SrcListDelete(pParse->db, yymsp[-3].minor.yy563);\n    }else{\n      Select *pSubquery;\n      sqlite3SrcListShiftJoinType(pParse,yymsp[-3].minor.yy563);\n      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-3].minor.yy563,0,0,0,0,SF_NestedFrom,0);\n      yymsp[-5].minor.yy563 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy563,0,0,&yymsp[-1].minor.yy0,pSubquery,&yymsp[0].minor.yy421);\n    }\n  }\n        break;\n      case 116: /* dbnm ::= */\n      case 131: /* indexed_opt ::= */ yytestcase(yyruleno==131);\n{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}\n        break;\n      case 118: /* fullname ::= nm */\n{\n  yylhsminor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);\n  if( IN_RENAME_OBJECT && yylhsminor.yy563 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy563->a[0].zName, &yymsp[0].minor.yy0);\n}\n  yymsp[0].minor.yy563 = yylhsminor.yy563;\n        break;\n      case 119: /* fullname ::= nm DOT nm */\n{\n  yylhsminor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);\n  if( IN_RENAME_OBJECT && yylhsminor.yy563 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy563->a[0].zName, &yymsp[0].minor.yy0);\n}\n  yymsp[-2].minor.yy563 = yylhsminor.yy563;\n        break;\n      case 120: /* xfullname ::= nm */\n{yymsp[0].minor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}\n        break;\n      case 121: /* xfullname ::= nm DOT nm */\n{yymsp[-2].minor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}\n        break;\n      case 122: /* xfullname ::= nm DOT nm AS nm */\n{\n   yymsp[-4].minor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/\n   if( yymsp[-4].minor.yy563 ) yymsp[-4].minor.yy563->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);\n}\n        break;\n      case 123: /* xfullname ::= nm AS nm */\n{\n   yymsp[-2].minor.yy563 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/\n   if( yymsp[-2].minor.yy563 ) yymsp[-2].minor.yy563->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);\n}\n        break;\n      case 124: /* joinop ::= COMMA|JOIN */\n{ yymsp[0].minor.yy502 = JT_INNER; }\n        break;\n      case 125: /* joinop ::= JOIN_KW JOIN */\n{yymsp[-1].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}\n        break;\n      case 126: /* joinop ::= JOIN_KW nm JOIN */\n{yymsp[-2].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}\n        break;\n      case 127: /* joinop ::= JOIN_KW nm nm JOIN */\n{yymsp[-3].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}\n        break;\n      case 128: /* on_using ::= ON expr */\n{yymsp[-1].minor.yy421.pOn = yymsp[0].minor.yy590; yymsp[-1].minor.yy421.pUsing = 0;}\n        break;\n      case 129: /* on_using ::= USING LP idlist RP */\n{yymsp[-3].minor.yy421.pOn = 0; yymsp[-3].minor.yy421.pUsing = yymsp[-1].minor.yy204;}\n        break;\n      case 130: /* on_using ::= */\n{yymsp[1].minor.yy421.pOn = 0; yymsp[1].minor.yy421.pUsing = 0;}\n        break;\n      case 132: /* indexed_by ::= INDEXED BY nm */\n{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}\n        break;\n      case 133: /* indexed_by ::= NOT INDEXED */\n{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}\n        break;\n      case 135: /* orderby_opt ::= ORDER BY sortlist */\n      case 145: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==145);\n{yymsp[-2].minor.yy402 = yymsp[0].minor.yy402;}\n        break;\n      case 136: /* sortlist ::= sortlist COMMA expr sortorder nulls */\n{\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy402,yymsp[-2].minor.yy590);\n  sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy402,yymsp[-1].minor.yy502,yymsp[0].minor.yy502);\n}\n        break;\n      case 137: /* sortlist ::= expr sortorder nulls */\n{\n  yymsp[-2].minor.yy402 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy590); /*A-overwrites-Y*/\n  sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy402,yymsp[-1].minor.yy502,yymsp[0].minor.yy502);\n}\n        break;\n      case 138: /* sortorder ::= ASC */\n{yymsp[0].minor.yy502 = SQLITE_SO_ASC;}\n        break;\n      case 139: /* sortorder ::= DESC */\n{yymsp[0].minor.yy502 = SQLITE_SO_DESC;}\n        break;\n      case 140: /* sortorder ::= */\n      case 143: /* nulls ::= */ yytestcase(yyruleno==143);\n{yymsp[1].minor.yy502 = SQLITE_SO_UNDEFINED;}\n        break;\n      case 141: /* nulls ::= NULLS FIRST */\n{yymsp[-1].minor.yy502 = SQLITE_SO_ASC;}\n        break;\n      case 142: /* nulls ::= NULLS LAST */\n{yymsp[-1].minor.yy502 = SQLITE_SO_DESC;}\n        break;\n      case 146: /* having_opt ::= */\n      case 148: /* limit_opt ::= */ yytestcase(yyruleno==148);\n      case 153: /* where_opt ::= */ yytestcase(yyruleno==153);\n      case 155: /* where_opt_ret ::= */ yytestcase(yyruleno==155);\n      case 232: /* case_else ::= */ yytestcase(yyruleno==232);\n      case 233: /* case_operand ::= */ yytestcase(yyruleno==233);\n      case 252: /* vinto ::= */ yytestcase(yyruleno==252);\n{yymsp[1].minor.yy590 = 0;}\n        break;\n      case 147: /* having_opt ::= HAVING expr */\n      case 154: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==154);\n      case 156: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==156);\n      case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);\n      case 251: /* vinto ::= INTO expr */ yytestcase(yyruleno==251);\n{yymsp[-1].minor.yy590 = yymsp[0].minor.yy590;}\n        break;\n      case 149: /* limit_opt ::= LIMIT expr */\n{yymsp[-1].minor.yy590 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy590,0);}\n        break;\n      case 150: /* limit_opt ::= LIMIT expr OFFSET expr */\n{yymsp[-3].minor.yy590 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy590,yymsp[0].minor.yy590);}\n        break;\n      case 151: /* limit_opt ::= LIMIT expr COMMA expr */\n{yymsp[-3].minor.yy590 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy590,yymsp[-2].minor.yy590);}\n        break;\n      case 152: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */\n{\n  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy563, &yymsp[-1].minor.yy0);\n  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy563,yymsp[0].minor.yy590,0,0);\n}\n        break;\n      case 157: /* where_opt_ret ::= RETURNING selcollist */\n{sqlite3AddReturning(pParse,yymsp[0].minor.yy402); yymsp[-1].minor.yy590 = 0;}\n        break;\n      case 158: /* where_opt_ret ::= WHERE expr RETURNING selcollist */\n{sqlite3AddReturning(pParse,yymsp[0].minor.yy402); yymsp[-3].minor.yy590 = yymsp[-2].minor.yy590;}\n        break;\n      case 159: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */\n{\n  sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy563, &yymsp[-4].minor.yy0);\n  sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy402,\"set list\");\n  if( yymsp[-1].minor.yy563 ){\n    SrcList *pFromClause = yymsp[-1].minor.yy563;\n    if( pFromClause->nSrc>1 ){\n      Select *pSubquery;\n      Token as;\n      pSubquery = sqlite3SelectNew(pParse,0,pFromClause,0,0,0,0,SF_NestedFrom,0);\n      as.n = 0;\n      as.z = 0;\n      pFromClause = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&as,pSubquery,0);\n    }\n    yymsp[-5].minor.yy563 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy563, pFromClause);\n  }\n  sqlite3Update(pParse,yymsp[-5].minor.yy563,yymsp[-2].minor.yy402,yymsp[0].minor.yy590,yymsp[-6].minor.yy502,0,0,0);\n}\n        break;\n      case 160: /* setlist ::= setlist COMMA nm EQ expr */\n{\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy402, yymsp[0].minor.yy590);\n  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy402, &yymsp[-2].minor.yy0, 1);\n}\n        break;\n      case 161: /* setlist ::= setlist COMMA LP idlist RP EQ expr */\n{\n  yymsp[-6].minor.yy402 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy402, yymsp[-3].minor.yy204, yymsp[0].minor.yy590);\n}\n        break;\n      case 162: /* setlist ::= nm EQ expr */\n{\n  yylhsminor.yy402 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy590);\n  sqlite3ExprListSetName(pParse, yylhsminor.yy402, &yymsp[-2].minor.yy0, 1);\n}\n  yymsp[-2].minor.yy402 = yylhsminor.yy402;\n        break;\n      case 163: /* setlist ::= LP idlist RP EQ expr */\n{\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy204, yymsp[0].minor.yy590);\n}\n        break;\n      case 164: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */\n{\n  sqlite3Insert(pParse, yymsp[-3].minor.yy563, yymsp[-1].minor.yy637, yymsp[-2].minor.yy204, yymsp[-5].minor.yy502, yymsp[0].minor.yy403);\n}\n        break;\n      case 165: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */\n{\n  sqlite3Insert(pParse, yymsp[-4].minor.yy563, 0, yymsp[-3].minor.yy204, yymsp[-6].minor.yy502, 0);\n}\n        break;\n      case 166: /* upsert ::= */\n{ yymsp[1].minor.yy403 = 0; }\n        break;\n      case 167: /* upsert ::= RETURNING selcollist */\n{ yymsp[-1].minor.yy403 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy402); }\n        break;\n      case 168: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */\n{ yymsp[-11].minor.yy403 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy402,yymsp[-6].minor.yy590,yymsp[-2].minor.yy402,yymsp[-1].minor.yy590,yymsp[0].minor.yy403);}\n        break;\n      case 169: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */\n{ yymsp[-8].minor.yy403 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy402,yymsp[-3].minor.yy590,0,0,yymsp[0].minor.yy403); }\n        break;\n      case 170: /* upsert ::= ON CONFLICT DO NOTHING returning */\n{ yymsp[-4].minor.yy403 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }\n        break;\n      case 171: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */\n{ yymsp[-7].minor.yy403 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy402,yymsp[-1].minor.yy590,0);}\n        break;\n      case 172: /* returning ::= RETURNING selcollist */\n{sqlite3AddReturning(pParse,yymsp[0].minor.yy402);}\n        break;\n      case 175: /* idlist_opt ::= */\n{yymsp[1].minor.yy204 = 0;}\n        break;\n      case 176: /* idlist_opt ::= LP idlist RP */\n{yymsp[-2].minor.yy204 = yymsp[-1].minor.yy204;}\n        break;\n      case 177: /* idlist ::= idlist COMMA nm */\n{yymsp[-2].minor.yy204 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy204,&yymsp[0].minor.yy0);}\n        break;\n      case 178: /* idlist ::= nm */\n{yymsp[0].minor.yy204 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}\n        break;\n      case 179: /* expr ::= LP expr RP */\n{yymsp[-2].minor.yy590 = yymsp[-1].minor.yy590;}\n        break;\n      case 180: /* expr ::= ID|INDEXED|JOIN_KW */\n{yymsp[0].minor.yy590=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}\n        break;\n      case 181: /* expr ::= nm DOT nm */\n{\n  Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);\n  Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);\n  yylhsminor.yy590 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);\n}\n  yymsp[-2].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 182: /* expr ::= nm DOT nm DOT nm */\n{\n  Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0);\n  Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0);\n  Expr *temp3 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0);\n  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);\n  if( IN_RENAME_OBJECT ){\n    sqlite3RenameTokenRemap(pParse, 0, temp1);\n  }\n  yylhsminor.yy590 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);\n}\n  yymsp[-4].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 183: /* term ::= NULL|FLOAT|BLOB */\n      case 184: /* term ::= STRING */ yytestcase(yyruleno==184);\n{yymsp[0].minor.yy590=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}\n        break;\n      case 185: /* term ::= INTEGER */\n{\n  yylhsminor.yy590 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);\n  if( yylhsminor.yy590 ) yylhsminor.yy590->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail);\n}\n  yymsp[0].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 186: /* expr ::= VARIABLE */\n{\n  if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){\n    u32 n = yymsp[0].minor.yy0.n;\n    yymsp[0].minor.yy590 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);\n    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy590, n);\n  }else{\n    /* When doing a nested parse, one can include terms in an expression\n    ** that look like this:   #1 #2 ...  These terms refer to registers\n    ** in the virtual machine.  #N is the N-th register. */\n    Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/\n    assert( t.n>=2 );\n    if( pParse->nested==0 ){\n      parserSyntaxError(pParse, &t);\n      yymsp[0].minor.yy590 = 0;\n    }else{\n      yymsp[0].minor.yy590 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);\n      if( yymsp[0].minor.yy590 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy590->iTable);\n    }\n  }\n}\n        break;\n      case 187: /* expr ::= expr COLLATE ID|STRING */\n{\n  yymsp[-2].minor.yy590 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy590, &yymsp[0].minor.yy0, 1);\n}\n        break;\n      case 188: /* expr ::= CAST LP expr AS typetoken RP */\n{\n  yymsp[-5].minor.yy590 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);\n  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy590, yymsp[-3].minor.yy590, 0);\n}\n        break;\n      case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy402, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy502);\n}\n  yymsp[-4].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 190: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, yymsp[-4].minor.yy402, &yymsp[-7].minor.yy0, yymsp[-5].minor.yy502);\n  sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy590, yymsp[-1].minor.yy402);\n}\n  yymsp[-7].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 191: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);\n}\n  yymsp[-3].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 192: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy402, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy502);\n  sqlite3WindowAttach(pParse, yylhsminor.yy590, yymsp[0].minor.yy483);\n}\n  yymsp[-5].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 193: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist ORDER BY sortlist RP filter_over */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, yymsp[-5].minor.yy402, &yymsp[-8].minor.yy0, yymsp[-6].minor.yy502);\n  sqlite3WindowAttach(pParse, yylhsminor.yy590, yymsp[0].minor.yy483);\n  sqlite3ExprAddFunctionOrderBy(pParse, yylhsminor.yy590, yymsp[-2].minor.yy402);\n}\n  yymsp[-8].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 194: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);\n  sqlite3WindowAttach(pParse, yylhsminor.yy590, yymsp[0].minor.yy483);\n}\n  yymsp[-4].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 195: /* term ::= CTIME_KW */\n{\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);\n}\n  yymsp[0].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 196: /* expr ::= LP nexprlist COMMA expr RP */\n{\n  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy402, yymsp[-1].minor.yy590);\n  yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);\n  if( yymsp[-4].minor.yy590 ){\n    yymsp[-4].minor.yy590->x.pList = pList;\n    if( ALWAYS(pList->nExpr) ){\n      yymsp[-4].minor.yy590->flags |= pList->a[0].pExpr->flags & EP_Propagate;\n    }\n  }else{\n    sqlite3ExprListDelete(pParse->db, pList);\n  }\n}\n        break;\n      case 197: /* expr ::= expr AND expr */\n{yymsp[-2].minor.yy590=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy590,yymsp[0].minor.yy590);}\n        break;\n      case 198: /* expr ::= expr OR expr */\n      case 199: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==199);\n      case 200: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==200);\n      case 201: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==201);\n      case 202: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==202);\n      case 203: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==203);\n      case 204: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==204);\n{yymsp[-2].minor.yy590=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy590,yymsp[0].minor.yy590);}\n        break;\n      case 205: /* likeop ::= NOT LIKE_KW|MATCH */\n{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}\n        break;\n      case 206: /* expr ::= expr likeop expr */\n{\n  ExprList *pList;\n  int bNot = yymsp[-1].minor.yy0.n & 0x80000000;\n  yymsp[-1].minor.yy0.n &= 0x7fffffff;\n  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy590);\n  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy590);\n  yymsp[-2].minor.yy590 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);\n  if( bNot ) yymsp[-2].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy590, 0);\n  if( yymsp[-2].minor.yy590 ) yymsp[-2].minor.yy590->flags |= EP_InfixFunc;\n}\n        break;\n      case 207: /* expr ::= expr likeop expr ESCAPE expr */\n{\n  ExprList *pList;\n  int bNot = yymsp[-3].minor.yy0.n & 0x80000000;\n  yymsp[-3].minor.yy0.n &= 0x7fffffff;\n  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy590);\n  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy590);\n  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy590);\n  yymsp[-4].minor.yy590 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);\n  if( bNot ) yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy590, 0);\n  if( yymsp[-4].minor.yy590 ) yymsp[-4].minor.yy590->flags |= EP_InfixFunc;\n}\n        break;\n      case 208: /* expr ::= expr ISNULL|NOTNULL */\n{yymsp[-1].minor.yy590 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy590,0);}\n        break;\n      case 209: /* expr ::= expr NOT NULL */\n{yymsp[-2].minor.yy590 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy590,0);}\n        break;\n      case 210: /* expr ::= expr IS expr */\n{\n  yymsp[-2].minor.yy590 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy590,yymsp[0].minor.yy590);\n  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy590, yymsp[-2].minor.yy590, TK_ISNULL);\n}\n        break;\n      case 211: /* expr ::= expr IS NOT expr */\n{\n  yymsp[-3].minor.yy590 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy590,yymsp[0].minor.yy590);\n  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy590, yymsp[-3].minor.yy590, TK_NOTNULL);\n}\n        break;\n      case 212: /* expr ::= expr IS NOT DISTINCT FROM expr */\n{\n  yymsp[-5].minor.yy590 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy590,yymsp[0].minor.yy590);\n  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy590, yymsp[-5].minor.yy590, TK_ISNULL);\n}\n        break;\n      case 213: /* expr ::= expr IS DISTINCT FROM expr */\n{\n  yymsp[-4].minor.yy590 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy590,yymsp[0].minor.yy590);\n  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy590, yymsp[-4].minor.yy590, TK_NOTNULL);\n}\n        break;\n      case 214: /* expr ::= NOT expr */\n      case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);\n{yymsp[-1].minor.yy590 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy590, 0);/*A-overwrites-B*/}\n        break;\n      case 216: /* expr ::= PLUS|MINUS expr */\n{\n  Expr *p = yymsp[0].minor.yy590;\n  u8 op = yymsp[-1].major + (TK_UPLUS-TK_PLUS);\n  assert( TK_UPLUS>TK_PLUS );\n  assert( TK_UMINUS == TK_MINUS + (TK_UPLUS - TK_PLUS) );\n  if( p && p->op==TK_UPLUS ){\n    p->op = op;\n    yymsp[-1].minor.yy590 = p;\n  }else{\n    yymsp[-1].minor.yy590 = sqlite3PExpr(pParse, op, p, 0);\n    /*A-overwrites-B*/\n  }\n}\n        break;\n      case 217: /* expr ::= expr PTR expr */\n{\n  ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy590);\n  pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy590);\n  yylhsminor.yy590 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);\n}\n  yymsp[-2].minor.yy590 = yylhsminor.yy590;\n        break;\n      case 218: /* between_op ::= BETWEEN */\n      case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);\n{yymsp[0].minor.yy502 = 0;}\n        break;\n      case 220: /* expr ::= expr between_op expr AND expr */\n{\n  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy590);\n  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy590);\n  yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy590, 0);\n  if( yymsp[-4].minor.yy590 ){\n    yymsp[-4].minor.yy590->x.pList = pList;\n  }else{\n    sqlite3ExprListDelete(pParse->db, pList);\n  }\n  if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy590, 0);\n}\n        break;\n      case 223: /* expr ::= expr in_op LP exprlist RP */\n{\n    if( yymsp[-1].minor.yy402==0 ){\n      /* Expressions of the form\n      **\n      **      expr1 IN ()\n      **      expr1 NOT IN ()\n      **\n      ** simplify to constants 0 (false) and 1 (true), respectively.\n      **\n      ** Except, do not apply this optimization if expr1 contains a function\n      ** because that function might be an aggregate (we don't know yet whether\n      ** it is or not) and if it is an aggregate, that could change the meaning\n      ** of the whole query.\n      */\n      Expr *pB = sqlite3Expr(pParse->db, TK_STRING, yymsp[-3].minor.yy502 ? \"true\" : \"false\");\n      if( pB ) sqlite3ExprIdToTrueFalse(pB);\n      if( !ExprHasProperty(yymsp[-4].minor.yy590, EP_HasFunc) ){\n        sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy590);\n        yymsp[-4].minor.yy590 = pB;\n      }else{\n        yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, yymsp[-3].minor.yy502 ? TK_OR : TK_AND, pB, yymsp[-4].minor.yy590);\n      }\n    }else{\n      Expr *pRHS = yymsp[-1].minor.yy402->a[0].pExpr;\n      if( yymsp[-1].minor.yy402->nExpr==1 && sqlite3ExprIsConstant(pParse,pRHS) && yymsp[-4].minor.yy590->op!=TK_VECTOR ){\n        yymsp[-1].minor.yy402->a[0].pExpr = 0;\n        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy402);\n        pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);\n        yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy590, pRHS);\n      }else if( yymsp[-1].minor.yy402->nExpr==1 && pRHS->op==TK_SELECT ){\n        yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy590, 0);\n        sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy590, pRHS->x.pSelect);\n        pRHS->x.pSelect = 0;\n        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy402);\n      }else{\n        yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy590, 0);\n        if( yymsp[-4].minor.yy590==0 ){\n          sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy402);\n        }else if( yymsp[-4].minor.yy590->pLeft->op==TK_VECTOR ){\n          int nExpr = yymsp[-4].minor.yy590->pLeft->x.pList->nExpr;\n          Select *pSelectRHS = sqlite3ExprListToValues(pParse, nExpr, yymsp[-1].minor.yy402);\n          if( pSelectRHS ){\n            parserDoubleLinkSelect(pParse, pSelectRHS);\n            sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy590, pSelectRHS);\n          }\n        }else{\n          yymsp[-4].minor.yy590->x.pList = yymsp[-1].minor.yy402;\n          sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy590);\n        }\n      }\n      if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy590, 0);\n    }\n  }\n        break;\n      case 224: /* expr ::= LP select RP */\n{\n    yymsp[-2].minor.yy590 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);\n    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy590, yymsp[-1].minor.yy637);\n  }\n        break;\n      case 225: /* expr ::= expr in_op LP select RP */\n{\n    yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy590, 0);\n    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy590, yymsp[-1].minor.yy637);\n    if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy590, 0);\n  }\n        break;\n      case 226: /* expr ::= expr in_op nm dbnm paren_exprlist */\n{\n    SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);\n    Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);\n    if( yymsp[0].minor.yy402 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy402);\n    yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy590, 0);\n    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy590, pSelect);\n    if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy590, 0);\n  }\n        break;\n      case 227: /* expr ::= EXISTS LP select RP */\n{\n    Expr *p;\n    p = yymsp[-3].minor.yy590 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);\n    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy637);\n  }\n        break;\n      case 228: /* expr ::= CASE case_operand case_exprlist case_else END */\n{\n  yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy590, 0);\n  if( yymsp[-4].minor.yy590 ){\n    yymsp[-4].minor.yy590->x.pList = yymsp[-1].minor.yy590 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy402,yymsp[-1].minor.yy590) : yymsp[-2].minor.yy402;\n    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy590);\n  }else{\n    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy402);\n    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy590);\n  }\n}\n        break;\n      case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */\n{\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy402, yymsp[-2].minor.yy590);\n  yymsp[-4].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy402, yymsp[0].minor.yy590);\n}\n        break;\n      case 230: /* case_exprlist ::= WHEN expr THEN expr */\n{\n  yymsp[-3].minor.yy402 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy590);\n  yymsp[-3].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy402, yymsp[0].minor.yy590);\n}\n        break;\n      case 235: /* nexprlist ::= nexprlist COMMA expr */\n{yymsp[-2].minor.yy402 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy402,yymsp[0].minor.yy590);}\n        break;\n      case 236: /* nexprlist ::= expr */\n{yymsp[0].minor.yy402 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy590); /*A-overwrites-Y*/}\n        break;\n      case 238: /* paren_exprlist ::= LP exprlist RP */\n      case 243: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==243);\n{yymsp[-2].minor.yy402 = yymsp[-1].minor.yy402;}\n        break;\n      case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */\n{\n  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,\n                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy402, yymsp[-10].minor.yy502,\n                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy590, SQLITE_SO_ASC, yymsp[-8].minor.yy502, SQLITE_IDXTYPE_APPDEF);\n  if( IN_RENAME_OBJECT && pParse->pNewIndex ){\n    sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);\n  }\n}\n        break;\n      case 240: /* uniqueflag ::= UNIQUE */\n      case 282: /* raisetype ::= ABORT */ yytestcase(yyruleno==282);\n{yymsp[0].minor.yy502 = OE_Abort;}\n        break;\n      case 241: /* uniqueflag ::= */\n{yymsp[1].minor.yy502 = OE_None;}\n        break;\n      case 244: /* eidlist ::= eidlist COMMA nm collate sortorder */\n{\n  yymsp[-4].minor.yy402 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy402, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy502, yymsp[0].minor.yy502);\n}\n        break;\n      case 245: /* eidlist ::= nm collate sortorder */\n{\n  yymsp[-2].minor.yy402 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy502, yymsp[0].minor.yy502); /*A-overwrites-Y*/\n}\n        break;\n      case 248: /* cmd ::= DROP INDEX ifexists fullname */\n{sqlite3DropIndex(pParse, yymsp[0].minor.yy563, yymsp[-1].minor.yy502);}\n        break;\n      case 249: /* cmd ::= VACUUM vinto */\n{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy590);}\n        break;\n      case 250: /* cmd ::= VACUUM nm vinto */\n{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy590);}\n        break;\n      case 253: /* cmd ::= PRAGMA nm dbnm */\n{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}\n        break;\n      case 254: /* cmd ::= PRAGMA nm dbnm EQ nmnum */\n{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}\n        break;\n      case 255: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */\n{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}\n        break;\n      case 256: /* cmd ::= PRAGMA nm dbnm EQ minus_num */\n{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}\n        break;\n      case 257: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */\n{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}\n        break;\n      case 260: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */\n{\n  Token all;\n  all.z = yymsp[-3].minor.yy0.z;\n  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;\n  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy319, &all);\n}\n        break;\n      case 261: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */\n{\n  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy502, yymsp[-4].minor.yy28.a, yymsp[-4].minor.yy28.b, yymsp[-2].minor.yy563, yymsp[0].minor.yy590, yymsp[-10].minor.yy502, yymsp[-8].minor.yy502);\n  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/\n#ifdef SQLITE_DEBUG\n  assert( pParse->isCreate ); /* Set by createkw reduce action */\n  pParse->isCreate = 0;       /* But, should not be set for CREATE TRIGGER */\n#endif\n}\n        break;\n      case 262: /* trigger_time ::= BEFORE|AFTER */\n{ yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-X*/ }\n        break;\n      case 263: /* trigger_time ::= INSTEAD OF */\n{ yymsp[-1].minor.yy502 = TK_INSTEAD;}\n        break;\n      case 264: /* trigger_time ::= */\n{ yymsp[1].minor.yy502 = TK_BEFORE; }\n        break;\n      case 265: /* trigger_event ::= DELETE|INSERT */\n      case 266: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==266);\n{yymsp[0].minor.yy28.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy28.b = 0;}\n        break;\n      case 267: /* trigger_event ::= UPDATE OF idlist */\n{yymsp[-2].minor.yy28.a = TK_UPDATE; yymsp[-2].minor.yy28.b = yymsp[0].minor.yy204;}\n        break;\n      case 268: /* when_clause ::= */\n      case 287: /* key_opt ::= */ yytestcase(yyruleno==287);\n{ yymsp[1].minor.yy590 = 0; }\n        break;\n      case 269: /* when_clause ::= WHEN expr */\n      case 288: /* key_opt ::= KEY expr */ yytestcase(yyruleno==288);\n{ yymsp[-1].minor.yy590 = yymsp[0].minor.yy590; }\n        break;\n      case 270: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */\n{\n  assert( yymsp[-2].minor.yy319!=0 );\n  yymsp[-2].minor.yy319->pLast->pNext = yymsp[-1].minor.yy319;\n  yymsp[-2].minor.yy319->pLast = yymsp[-1].minor.yy319;\n}\n        break;\n      case 271: /* trigger_cmd_list ::= trigger_cmd SEMI */\n{\n  assert( yymsp[-1].minor.yy319!=0 );\n  yymsp[-1].minor.yy319->pLast = yymsp[-1].minor.yy319;\n}\n        break;\n      case 272: /* trnm ::= nm DOT nm */\n{\n  yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;\n  sqlite3ErrorMsg(pParse,\n        \"qualified table names are not allowed on INSERT, UPDATE, and DELETE \"\n        \"statements within triggers\");\n}\n        break;\n      case 273: /* tridxby ::= INDEXED BY nm */\n{\n  sqlite3ErrorMsg(pParse,\n        \"the INDEXED BY clause is not allowed on UPDATE or DELETE statements \"\n        \"within triggers\");\n}\n        break;\n      case 274: /* tridxby ::= NOT INDEXED */\n{\n  sqlite3ErrorMsg(pParse,\n        \"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements \"\n        \"within triggers\");\n}\n        break;\n      case 275: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */\n{yylhsminor.yy319 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy563, yymsp[-3].minor.yy402, yymsp[-1].minor.yy590, yymsp[-7].minor.yy502, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy342);}\n  yymsp[-8].minor.yy319 = yylhsminor.yy319;\n        break;\n      case 276: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */\n{\n   yylhsminor.yy319 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy204,yymsp[-2].minor.yy637,yymsp[-6].minor.yy502,yymsp[-1].minor.yy403,yymsp[-7].minor.yy342,yymsp[0].minor.yy342);/*yylhsminor.yy319-overwrites-yymsp[-6].minor.yy502*/\n}\n  yymsp[-7].minor.yy319 = yylhsminor.yy319;\n        break;\n      case 277: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */\n{yylhsminor.yy319 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy590, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy342);}\n  yymsp[-5].minor.yy319 = yylhsminor.yy319;\n        break;\n      case 278: /* trigger_cmd ::= scanpt select scanpt */\n{yylhsminor.yy319 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy637, yymsp[-2].minor.yy342, yymsp[0].minor.yy342); /*yylhsminor.yy319-overwrites-yymsp[-1].minor.yy637*/}\n  yymsp[-2].minor.yy319 = yylhsminor.yy319;\n        break;\n      case 279: /* expr ::= RAISE LP IGNORE RP */\n{\n  yymsp[-3].minor.yy590 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);\n  if( yymsp[-3].minor.yy590 ){\n    yymsp[-3].minor.yy590->affExpr = OE_Ignore;\n  }\n}\n        break;\n      case 280: /* expr ::= RAISE LP raisetype COMMA expr RP */\n{\n  yymsp[-5].minor.yy590 = sqlite3PExpr(pParse, TK_RAISE, yymsp[-1].minor.yy590, 0);\n  if( yymsp[-5].minor.yy590 ) {\n    yymsp[-5].minor.yy590->affExpr = (char)yymsp[-3].minor.yy502;\n  }\n}\n        break;\n      case 281: /* raisetype ::= ROLLBACK */\n{yymsp[0].minor.yy502 = OE_Rollback;}\n        break;\n      case 283: /* raisetype ::= FAIL */\n{yymsp[0].minor.yy502 = OE_Fail;}\n        break;\n      case 284: /* cmd ::= DROP TRIGGER ifexists fullname */\n{\n  sqlite3DropTrigger(pParse,yymsp[0].minor.yy563,yymsp[-1].minor.yy502);\n}\n        break;\n      case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */\n{\n  sqlite3Attach(pParse, yymsp[-3].minor.yy590, yymsp[-1].minor.yy590, yymsp[0].minor.yy590);\n}\n        break;\n      case 286: /* cmd ::= DETACH database_kw_opt expr */\n{\n  sqlite3Detach(pParse, yymsp[0].minor.yy590);\n}\n        break;\n      case 289: /* cmd ::= REINDEX */\n{sqlite3Reindex(pParse, 0, 0);}\n        break;\n      case 290: /* cmd ::= REINDEX nm dbnm */\n{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}\n        break;\n      case 291: /* cmd ::= ANALYZE */\n{sqlite3Analyze(pParse, 0, 0);}\n        break;\n      case 292: /* cmd ::= ANALYZE nm dbnm */\n{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}\n        break;\n      case 293: /* cmd ::= ALTER TABLE fullname RENAME TO nm */\n{\n  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy563,&yymsp[0].minor.yy0);\n}\n        break;\n      case 294: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */\n{\n  yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;\n  sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);\n}\n        break;\n      case 295: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */\n{\n  sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy563, &yymsp[0].minor.yy0);\n}\n        break;\n      case 296: /* add_column_fullname ::= fullname */\n{\n  disableLookaside(pParse);\n  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy563);\n}\n        break;\n      case 297: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */\n{\n  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy563, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);\n}\n        break;\n      case 298: /* cmd ::= create_vtab */\n{sqlite3VtabFinishParse(pParse,0);}\n        break;\n      case 299: /* cmd ::= create_vtab LP vtabarglist RP */\n{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}\n        break;\n      case 300: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */\n{\n    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy502);\n}\n        break;\n      case 301: /* vtabarg ::= */\n{sqlite3VtabArgInit(pParse);}\n        break;\n      case 302: /* vtabargtoken ::= ANY */\n      case 303: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==303);\n      case 304: /* lp ::= LP */ yytestcase(yyruleno==304);\n{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}\n        break;\n      case 305: /* with ::= WITH wqlist */\n      case 306: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==306);\n{ sqlite3WithPush(pParse, yymsp[0].minor.yy125, 1); }\n        break;\n      case 307: /* wqas ::= AS */\n{yymsp[0].minor.yy444 = M10d_Any;}\n        break;\n      case 308: /* wqas ::= AS MATERIALIZED */\n{yymsp[-1].minor.yy444 = M10d_Yes;}\n        break;\n      case 309: /* wqas ::= AS NOT MATERIALIZED */\n{yymsp[-2].minor.yy444 = M10d_No;}\n        break;\n      case 310: /* wqitem ::= withnm eidlist_opt wqas LP select RP */\n{\n  yymsp[-5].minor.yy361 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy402, yymsp[-1].minor.yy637, yymsp[-3].minor.yy444); /*A-overwrites-X*/\n}\n        break;\n      case 311: /* withnm ::= nm */\n{pParse->bHasWith = 1;}\n        break;\n      case 312: /* wqlist ::= wqitem */\n{\n  yymsp[0].minor.yy125 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy361); /*A-overwrites-X*/\n}\n        break;\n      case 313: /* wqlist ::= wqlist COMMA wqitem */\n{\n  yymsp[-2].minor.yy125 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy125, yymsp[0].minor.yy361);\n}\n        break;\n      case 314: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */\n{\n  assert( yymsp[0].minor.yy483!=0 );\n  sqlite3WindowChain(pParse, yymsp[0].minor.yy483, yymsp[-2].minor.yy483);\n  yymsp[0].minor.yy483->pNextWin = yymsp[-2].minor.yy483;\n  yylhsminor.yy483 = yymsp[0].minor.yy483;\n}\n  yymsp[-2].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 315: /* windowdefn ::= nm AS LP window RP */\n{\n  if( ALWAYS(yymsp[-1].minor.yy483) ){\n    yymsp[-1].minor.yy483->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);\n  }\n  yylhsminor.yy483 = yymsp[-1].minor.yy483;\n}\n  yymsp[-4].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 316: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */\n{\n  yymsp[-4].minor.yy483 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy483, yymsp[-2].minor.yy402, yymsp[-1].minor.yy402, 0);\n}\n        break;\n      case 317: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */\n{\n  yylhsminor.yy483 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy483, yymsp[-2].minor.yy402, yymsp[-1].minor.yy402, &yymsp[-5].minor.yy0);\n}\n  yymsp[-5].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 318: /* window ::= ORDER BY sortlist frame_opt */\n{\n  yymsp[-3].minor.yy483 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy483, 0, yymsp[-1].minor.yy402, 0);\n}\n        break;\n      case 319: /* window ::= nm ORDER BY sortlist frame_opt */\n{\n  yylhsminor.yy483 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy483, 0, yymsp[-1].minor.yy402, &yymsp[-4].minor.yy0);\n}\n  yymsp[-4].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 320: /* window ::= nm frame_opt */\n{\n  yylhsminor.yy483 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy483, 0, 0, &yymsp[-1].minor.yy0);\n}\n  yymsp[-1].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 321: /* frame_opt ::= */\n{\n  yymsp[1].minor.yy483 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);\n}\n        break;\n      case 322: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */\n{\n  yylhsminor.yy483 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy502, yymsp[-1].minor.yy205.eType, yymsp[-1].minor.yy205.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy444);\n}\n  yymsp[-2].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 323: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */\n{\n  yylhsminor.yy483 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy502, yymsp[-3].minor.yy205.eType, yymsp[-3].minor.yy205.pExpr, yymsp[-1].minor.yy205.eType, yymsp[-1].minor.yy205.pExpr, yymsp[0].minor.yy444);\n}\n  yymsp[-5].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 325: /* frame_bound_s ::= frame_bound */\n      case 327: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==327);\n{yylhsminor.yy205 = yymsp[0].minor.yy205;}\n  yymsp[0].minor.yy205 = yylhsminor.yy205;\n        break;\n      case 326: /* frame_bound_s ::= UNBOUNDED PRECEDING */\n      case 328: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==328);\n      case 330: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==330);\n{yylhsminor.yy205.eType = yymsp[-1].major; yylhsminor.yy205.pExpr = 0;}\n  yymsp[-1].minor.yy205 = yylhsminor.yy205;\n        break;\n      case 329: /* frame_bound ::= expr PRECEDING|FOLLOWING */\n{yylhsminor.yy205.eType = yymsp[0].major; yylhsminor.yy205.pExpr = yymsp[-1].minor.yy590;}\n  yymsp[-1].minor.yy205 = yylhsminor.yy205;\n        break;\n      case 331: /* frame_exclude_opt ::= */\n{yymsp[1].minor.yy444 = 0;}\n        break;\n      case 332: /* frame_exclude_opt ::= EXCLUDE frame_exclude */\n{yymsp[-1].minor.yy444 = yymsp[0].minor.yy444;}\n        break;\n      case 333: /* frame_exclude ::= NO OTHERS */\n      case 334: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==334);\n{yymsp[-1].minor.yy444 = yymsp[-1].major; /*A-overwrites-X*/}\n        break;\n      case 335: /* frame_exclude ::= GROUP|TIES */\n{yymsp[0].minor.yy444 = yymsp[0].major; /*A-overwrites-X*/}\n        break;\n      case 336: /* window_clause ::= WINDOW windowdefn_list */\n{ yymsp[-1].minor.yy483 = yymsp[0].minor.yy483; }\n        break;\n      case 337: /* filter_over ::= filter_clause over_clause */\n{\n  if( yymsp[0].minor.yy483 ){\n    yymsp[0].minor.yy483->pFilter = yymsp[-1].minor.yy590;\n  }else{\n    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy590);\n  }\n  yylhsminor.yy483 = yymsp[0].minor.yy483;\n}\n  yymsp[-1].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 338: /* filter_over ::= over_clause */\n{\n  yylhsminor.yy483 = yymsp[0].minor.yy483;\n}\n  yymsp[0].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 339: /* filter_over ::= filter_clause */\n{\n  yylhsminor.yy483 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));\n  if( yylhsminor.yy483 ){\n    yylhsminor.yy483->eFrmType = TK_FILTER;\n    yylhsminor.yy483->pFilter = yymsp[0].minor.yy590;\n  }else{\n    sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy590);\n  }\n}\n  yymsp[0].minor.yy483 = yylhsminor.yy483;\n        break;\n      case 340: /* over_clause ::= OVER LP window RP */\n{\n  yymsp[-3].minor.yy483 = yymsp[-1].minor.yy483;\n  assert( yymsp[-3].minor.yy483!=0 );\n}\n        break;\n      case 341: /* over_clause ::= OVER nm */\n{\n  yymsp[-1].minor.yy483 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));\n  if( yymsp[-1].minor.yy483 ){\n    yymsp[-1].minor.yy483->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);\n  }\n}\n        break;\n      case 342: /* filter_clause ::= FILTER LP WHERE expr RP */\n{ yymsp[-4].minor.yy590 = yymsp[-1].minor.yy590; }\n        break;\n      case 343: /* term ::= QNUMBER */\n{\n  yylhsminor.yy590=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0);\n  sqlite3DequoteNumber(pParse, yylhsminor.yy590);\n}\n  yymsp[0].minor.yy590 = yylhsminor.yy590;\n        break;\n      default:\n      /* (344) input ::= cmdlist */ yytestcase(yyruleno==344);\n      /* (345) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==345);\n      /* (346) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=346);\n      /* (347) ecmd ::= SEMI */ yytestcase(yyruleno==347);\n      /* (348) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==348);\n      /* (349) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=349);\n      /* (350) trans_opt ::= */ yytestcase(yyruleno==350);\n      /* (351) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==351);\n      /* (352) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==352);\n      /* (353) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==353);\n      /* (354) savepoint_opt ::= */ yytestcase(yyruleno==354);\n      /* (355) cmd ::= create_table create_table_args */ yytestcase(yyruleno==355);\n      /* (356) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=356);\n      /* (357) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==357);\n      /* (358) columnlist ::= columnname carglist */ yytestcase(yyruleno==358);\n      /* (359) nm ::= ID|INDEXED|JOIN_KW */ yytestcase(yyruleno==359);\n      /* (360) nm ::= STRING */ yytestcase(yyruleno==360);\n      /* (361) typetoken ::= typename */ yytestcase(yyruleno==361);\n      /* (362) typename ::= ID|STRING */ yytestcase(yyruleno==362);\n      /* (363) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=363);\n      /* (364) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=364);\n      /* (365) carglist ::= carglist ccons */ yytestcase(yyruleno==365);\n      /* (366) carglist ::= */ yytestcase(yyruleno==366);\n      /* (367) ccons ::= NULL onconf */ yytestcase(yyruleno==367);\n      /* (368) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==368);\n      /* (369) ccons ::= AS generated */ yytestcase(yyruleno==369);\n      /* (370) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==370);\n      /* (371) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==371);\n      /* (372) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=372);\n      /* (373) tconscomma ::= */ yytestcase(yyruleno==373);\n      /* (374) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=374);\n      /* (375) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=375);\n      /* (376) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=376);\n      /* (377) oneselect ::= values */ yytestcase(yyruleno==377);\n      /* (378) sclp ::= selcollist COMMA */ yytestcase(yyruleno==378);\n      /* (379) as ::= ID|STRING */ yytestcase(yyruleno==379);\n      /* (380) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=380);\n      /* (381) returning ::= */ yytestcase(yyruleno==381);\n      /* (382) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=382);\n      /* (383) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==383);\n      /* (384) case_operand ::= expr */ yytestcase(yyruleno==384);\n      /* (385) exprlist ::= nexprlist */ yytestcase(yyruleno==385);\n      /* (386) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=386);\n      /* (387) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=387);\n      /* (388) nmnum ::= ON */ yytestcase(yyruleno==388);\n      /* (389) nmnum ::= DELETE */ yytestcase(yyruleno==389);\n      /* (390) nmnum ::= DEFAULT */ yytestcase(yyruleno==390);\n      /* (391) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==391);\n      /* (392) foreach_clause ::= */ yytestcase(yyruleno==392);\n      /* (393) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==393);\n      /* (394) trnm ::= nm */ yytestcase(yyruleno==394);\n      /* (395) tridxby ::= */ yytestcase(yyruleno==395);\n      /* (396) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==396);\n      /* (397) database_kw_opt ::= */ yytestcase(yyruleno==397);\n      /* (398) kwcolumn_opt ::= */ yytestcase(yyruleno==398);\n      /* (399) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==399);\n      /* (400) vtabarglist ::= vtabarg */ yytestcase(yyruleno==400);\n      /* (401) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==401);\n      /* (402) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==402);\n      /* (403) anylist ::= */ yytestcase(yyruleno==403);\n      /* (404) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==404);\n      /* (405) anylist ::= anylist ANY */ yytestcase(yyruleno==405);\n      /* (406) with ::= */ yytestcase(yyruleno==406);\n      /* (407) windowdefn_list ::= windowdefn (OPTIMIZED OUT) */ assert(yyruleno!=407);\n      /* (408) window ::= frame_opt (OPTIMIZED OUT) */ assert(yyruleno!=408);\n        break;\n/********** End reduce actions ************************************************/\n  };\n  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );\n  yygoto = yyRuleInfoLhs[yyruleno];\n  yysize = yyRuleInfoNRhs[yyruleno];\n  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);\n\n  /* There are no SHIFTREDUCE actions on nonterminals because the table\n  ** generator has simplified them to pure REDUCE actions. */\n  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );\n\n  /* It is not possible for a REDUCE to be followed by an error */\n  assert( yyact!=YY_ERROR_ACTION );\n\n  yymsp += yysize+1;\n  yypParser->yytos = yymsp;\n  yymsp->stateno = (YYACTIONTYPE)yyact;\n  yymsp->major = (YYCODETYPE)yygoto;\n  yyTraceShift(yypParser, yyact, \"... then shift\");\n  return yyact;\n}\n\n/*\n** The following code executes when the parse fails\n*/\n#ifndef YYNOERRORRECOVERY\nstatic void yy_parse_failed(\n  yyParser *yypParser           /* The parser */\n){\n  sqlite3ParserARG_FETCH\n  sqlite3ParserCTX_FETCH\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    fprintf(yyTraceFILE,\"%sFail!\\n\",yyTracePrompt);\n  }\n#endif\n  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);\n  /* Here code is inserted which will be executed whenever the\n  ** parser fails */\n/************ Begin %parse_failure code ***************************************/\n/************ End %parse_failure code *****************************************/\n  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3ParserCTX_STORE\n}\n#endif /* YYNOERRORRECOVERY */\n\n/*\n** The following code executes when a syntax error first occurs.\n*/\nstatic void yy_syntax_error(\n  yyParser *yypParser,           /* The parser */\n  int yymajor,                   /* The major type of the error token */\n  sqlite3ParserTOKENTYPE yyminor         /* The minor type of the error token */\n){\n  sqlite3ParserARG_FETCH\n  sqlite3ParserCTX_FETCH\n#define TOKEN yyminor\n/************ Begin %syntax_error code ****************************************/\n\n  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */\n  if( TOKEN.z[0] ){\n    parserSyntaxError(pParse, &TOKEN);\n  }else{\n    sqlite3ErrorMsg(pParse, \"incomplete input\");\n  }\n/************ End %syntax_error code ******************************************/\n  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3ParserCTX_STORE\n}\n\n/*\n** The following is executed when the parser accepts\n*/\nstatic void yy_accept(\n  yyParser *yypParser           /* The parser */\n){\n  sqlite3ParserARG_FETCH\n  sqlite3ParserCTX_FETCH\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    fprintf(yyTraceFILE,\"%sAccept!\\n\",yyTracePrompt);\n  }\n#endif\n#ifndef YYNOERRORRECOVERY\n  yypParser->yyerrcnt = -1;\n#endif\n  assert( yypParser->yytos==yypParser->yystack );\n  /* Here code is inserted which will be executed whenever the\n  ** parser accepts */\n/*********** Begin %parse_accept code *****************************************/\n/*********** End %parse_accept code *******************************************/\n  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3ParserCTX_STORE\n}\n\n/* The main parser program.\n** The first argument is a pointer to a structure obtained from\n** \"sqlite3ParserAlloc\" which describes the current state of the parser.\n** The second argument is the major token number.  The third is\n** the minor token.  The fourth optional argument is whatever the\n** user wants (and specified in the grammar) and is available for\n** use by the action routines.\n**\n** Inputs:\n** <ul>\n** <li> A pointer to the parser (an opaque structure.)\n** <li> The major token number.\n** <li> The minor token number.\n** <li> An option argument of a grammar-specified type.\n** </ul>\n**\n** Outputs:\n** None.\n*/\nSQLITE_PRIVATE void sqlite3Parser(\n  void *yyp,                   /* The parser */\n  int yymajor,                 /* The major token code number */\n  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */\n  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */\n){\n  YYMINORTYPE yyminorunion;\n  YYACTIONTYPE yyact;   /* The parser action. */\n#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)\n  int yyendofinput;     /* True if we are at the end of input */\n#endif\n#ifdef YYERRORSYMBOL\n  int yyerrorhit = 0;   /* True if yymajor has invoked an error */\n#endif\n  yyParser *yypParser = (yyParser*)yyp;  /* The parser */\n  sqlite3ParserCTX_FETCH\n  sqlite3ParserARG_STORE\n\n  assert( yypParser->yytos!=0 );\n#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)\n  yyendofinput = (yymajor==0);\n#endif\n\n  yyact = yypParser->yytos->stateno;\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    if( yyact < YY_MIN_REDUCE ){\n      fprintf(yyTraceFILE,\"%sInput '%s' in state %d\\n\",\n              yyTracePrompt,yyTokenName[yymajor],yyact);\n    }else{\n      fprintf(yyTraceFILE,\"%sInput '%s' with pending reduce %d\\n\",\n              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);\n    }\n  }\n#endif\n\n  while(1){ /* Exit by \"break\" */\n    assert( yypParser->yytos>=yypParser->yystack );\n    assert( yyact==yypParser->yytos->stateno );\n    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);\n    if( yyact >= YY_MIN_REDUCE ){\n      unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */\n#ifndef NDEBUG\n      assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );\n      if( yyTraceFILE ){\n        int yysize = yyRuleInfoNRhs[yyruleno];\n        if( yysize ){\n          fprintf(yyTraceFILE, \"%sReduce %d [%s]%s, pop back to state %d.\\n\",\n            yyTracePrompt,\n            yyruleno, yyRuleName[yyruleno],\n            yyruleno<YYNRULE_WITH_ACTION ? \"\" : \" without external action\",\n            yypParser->yytos[yysize].stateno);\n        }else{\n          fprintf(yyTraceFILE, \"%sReduce %d [%s]%s.\\n\",\n            yyTracePrompt, yyruleno, yyRuleName[yyruleno],\n            yyruleno<YYNRULE_WITH_ACTION ? \"\" : \" without external action\");\n        }\n      }\n#endif /* NDEBUG */\n\n      /* Check that the stack is large enough to grow by a single entry\n      ** if the RHS of the rule is empty.  This ensures that there is room\n      ** enough on the stack to push the LHS value */\n      if( yyRuleInfoNRhs[yyruleno]==0 ){\n#ifdef YYTRACKMAXSTACKDEPTH\n        if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){\n          yypParser->yyhwm++;\n          assert( yypParser->yyhwm ==\n                  (int)(yypParser->yytos - yypParser->yystack));\n        }\n#endif\n        if( yypParser->yytos>=yypParser->yystackEnd ){\n          if( yyGrowStack(yypParser) ){\n            yyStackOverflow(yypParser);\n            break;\n          }\n        }\n      }\n      yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor sqlite3ParserCTX_PARAM);\n    }else if( yyact <= YY_MAX_SHIFTREDUCE ){\n      yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);\n#ifndef YYNOERRORRECOVERY\n      yypParser->yyerrcnt--;\n#endif\n      break;\n    }else if( yyact==YY_ACCEPT_ACTION ){\n      yypParser->yytos--;\n      yy_accept(yypParser);\n      return;\n    }else{\n      assert( yyact == YY_ERROR_ACTION );\n      yyminorunion.yy0 = yyminor;\n#ifdef YYERRORSYMBOL\n      int yymx;\n#endif\n#ifndef NDEBUG\n      if( yyTraceFILE ){\n        fprintf(yyTraceFILE,\"%sSyntax Error!\\n\",yyTracePrompt);\n      }\n#endif\n#ifdef YYERRORSYMBOL\n      /* A syntax error has occurred.\n      ** The response to an error depends upon whether or not the\n      ** grammar defines an error token \"ERROR\".\n      **\n      ** This is what we do if the grammar does define ERROR:\n      **\n      **  * Call the %syntax_error function.\n      **\n      **  * Begin popping the stack until we enter a state where\n      **    it is legal to shift the error symbol, then shift\n      **    the error symbol.\n      **\n      **  * Set the error count to three.\n      **\n      **  * Begin accepting and shifting new tokens.  No new error\n      **    processing will occur until three tokens have been\n      **    shifted successfully.\n      **\n      */\n      if( yypParser->yyerrcnt<0 ){\n        yy_syntax_error(yypParser,yymajor,yyminor);\n      }\n      yymx = yypParser->yytos->major;\n      if( yymx==YYERRORSYMBOL || yyerrorhit ){\n#ifndef NDEBUG\n        if( yyTraceFILE ){\n          fprintf(yyTraceFILE,\"%sDiscard input token %s\\n\",\n             yyTracePrompt,yyTokenName[yymajor]);\n        }\n#endif\n        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);\n        yymajor = YYNOCODE;\n      }else{\n        while( yypParser->yytos > yypParser->yystack ){\n          yyact = yy_find_reduce_action(yypParser->yytos->stateno,\n                                        YYERRORSYMBOL);\n          if( yyact<=YY_MAX_SHIFTREDUCE ) break;\n          yy_pop_parser_stack(yypParser);\n        }\n        if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){\n          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);\n          yy_parse_failed(yypParser);\n#ifndef YYNOERRORRECOVERY\n          yypParser->yyerrcnt = -1;\n#endif\n          yymajor = YYNOCODE;\n        }else if( yymx!=YYERRORSYMBOL ){\n          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);\n        }\n      }\n      yypParser->yyerrcnt = 3;\n      yyerrorhit = 1;\n      if( yymajor==YYNOCODE ) break;\n      yyact = yypParser->yytos->stateno;\n#elif defined(YYNOERRORRECOVERY)\n      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to\n      ** do any kind of error recovery.  Instead, simply invoke the syntax\n      ** error routine and continue going as if nothing had happened.\n      **\n      ** Applications can set this macro (for example inside %include) if\n      ** they intend to abandon the parse upon the first syntax error seen.\n      */\n      yy_syntax_error(yypParser,yymajor, yyminor);\n      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);\n      break;\n#else  /* YYERRORSYMBOL is not defined */\n      /* This is what we do if the grammar does not define ERROR:\n      **\n      **  * Report an error message, and throw away the input token.\n      **\n      **  * If the input token is $, then fail the parse.\n      **\n      ** As before, subsequent error messages are suppressed until\n      ** three input tokens have been successfully shifted.\n      */\n      if( yypParser->yyerrcnt<=0 ){\n        yy_syntax_error(yypParser,yymajor, yyminor);\n      }\n      yypParser->yyerrcnt = 3;\n      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);\n      if( yyendofinput ){\n        yy_parse_failed(yypParser);\n#ifndef YYNOERRORRECOVERY\n        yypParser->yyerrcnt = -1;\n#endif\n      }\n      break;\n#endif\n    }\n  }\n#ifndef NDEBUG\n  if( yyTraceFILE ){\n    yyStackEntry *i;\n    char cDiv = '[';\n    fprintf(yyTraceFILE,\"%sReturn. Stack=\",yyTracePrompt);\n    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){\n      fprintf(yyTraceFILE,\"%c%s\", cDiv, yyTokenName[i->major]);\n      cDiv = ' ';\n    }\n    fprintf(yyTraceFILE,\"]\\n\");\n  }\n#endif\n  return;\n}\n\n/*\n** Return the fallback token corresponding to canonical token iToken, or\n** 0 if iToken has no fallback.\n*/\nSQLITE_PRIVATE int sqlite3ParserFallback(int iToken){\n#ifdef YYFALLBACK\n  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );\n  return yyFallback[iToken];\n#else\n  (void)iToken;\n  return 0;\n#endif\n}\n\n/************** End of parse.c ***********************************************/\n/************** Begin file tokenize.c ****************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** An tokenizer for SQL\n**\n** This file contains C code that splits an SQL input string up into\n** individual tokens and sends those tokens one-by-one over to the\n** parser for analysis.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include <stdlib.h> */\n\n/* Character classes for tokenizing\n**\n** In the sqlite3GetToken() function, a switch() on aiClass[c] is implemented\n** using a lookup table, whereas a switch() directly on c uses a binary search.\n** The lookup table is much faster.  To maximize speed, and to ensure that\n** a lookup table is used, all of the classes need to be small integers and\n** all of them need to be used within the switch.\n*/\n#define CC_X          0    /* The letter 'x', or start of BLOB literal */\n#define CC_KYWD0      1    /* First letter of a keyword */\n#define CC_KYWD       2    /* Alphabetics or '_'.  Usable in a keyword */\n#define CC_DIGIT      3    /* Digits */\n#define CC_DOLLAR     4    /* '$' */\n#define CC_VARALPHA   5    /* '@', '#', ':'.  Alphabetic SQL variables */\n#define CC_VARNUM     6    /* '?'.  Numeric SQL variables */\n#define CC_SPACE      7    /* Space characters */\n#define CC_QUOTE      8    /* '\"', '\\'', or '`'.  String literals, quoted ids */\n#define CC_QUOTE2     9    /* '['.   [...] style quoted ids */\n#define CC_PIPE      10    /* '|'.   Bitwise OR or concatenate */\n#define CC_MINUS     11    /* '-'.  Minus or SQL-style comment */\n#define CC_LT        12    /* '<'.  Part of < or <= or <> */\n#define CC_GT        13    /* '>'.  Part of > or >= */\n#define CC_EQ        14    /* '='.  Part of = or == */\n#define CC_BANG      15    /* '!'.  Part of != */\n#define CC_SLASH     16    /* '/'.  / or c-style comment */\n#define CC_LP        17    /* '(' */\n#define CC_RP        18    /* ')' */\n#define CC_SEMI      19    /* ';' */\n#define CC_PLUS      20    /* '+' */\n#define CC_STAR      21    /* '*' */\n#define CC_PERCENT   22    /* '%' */\n#define CC_COMMA     23    /* ',' */\n#define CC_AND       24    /* '&' */\n#define CC_TILDA     25    /* '~' */\n#define CC_DOT       26    /* '.' */\n#define CC_ID        27    /* unicode characters usable in IDs */\n#define CC_ILLEGAL   28    /* Illegal character */\n#define CC_NUL       29    /* 0x00 */\n#define CC_BOM       30    /* First byte of UTF8 BOM:  0xEF 0xBB 0xBF */\n\nstatic const unsigned char aiClass[] = {\n#ifdef SQLITE_ASCII\n/*         x0  x1  x2  x3  x4  x5  x6  x7  x8  x9  xa  xb  xc  xd  xe  xf */\n/* 0x */   29, 28, 28, 28, 28, 28, 28, 28, 28,  7,  7, 28,  7,  7, 28, 28,\n/* 1x */   28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n/* 2x */    7, 15,  8,  5,  4, 22, 24,  8, 17, 18, 21, 20, 23, 11, 26, 16,\n/* 3x */    3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  5, 19, 12, 14, 13,  6,\n/* 4x */    5,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,\n/* 5x */    1,  1,  1,  1,  1,  1,  1,  1,  0,  2,  2,  9, 28, 28, 28,  2,\n/* 6x */    8,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,\n/* 7x */    1,  1,  1,  1,  1,  1,  1,  1,  0,  2,  2, 28, 10, 28, 25, 28,\n/* 8x */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* 9x */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* Ax */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* Bx */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* Cx */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* Dx */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,\n/* Ex */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 30,\n/* Fx */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27\n#endif\n#ifdef SQLITE_EBCDIC\n/*         x0  x1  x2  x3  x4  x5  x6  x7  x8  x9  xa  xb  xc  xd  xe  xf */\n/* 0x */   29, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28,  7,  7, 28, 28,\n/* 1x */   28, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n/* 2x */   28, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n/* 3x */   28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n/* 4x */    7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 26, 12, 17, 20, 10,\n/* 5x */   24, 28, 28, 28, 28, 28, 28, 28, 28, 28, 15,  4, 21, 18, 19, 28,\n/* 6x */   11, 16, 28, 28, 28, 28, 28, 28, 28, 28, 28, 23, 22,  2, 13,  6,\n/* 7x */   28, 28, 28, 28, 28, 28, 28, 28, 28,  8,  5,  5,  5,  8, 14,  8,\n/* 8x */   28,  1,  1,  1,  1,  1,  1,  1,  1,  1, 28, 28, 28, 28, 28, 28,\n/* 9x */   28,  1,  1,  1,  1,  1,  1,  1,  1,  1, 28, 28, 28, 28, 28, 28,\n/* Ax */   28, 25,  1,  1,  1,  1,  1,  0,  2,  2, 28, 28, 28, 28, 28, 28,\n/* Bx */   28, 28, 28, 28, 28, 28, 28, 28, 28, 28,  9, 28, 28, 28, 28, 28,\n/* Cx */   28,  1,  1,  1,  1,  1,  1,  1,  1,  1, 28, 28, 28, 28, 28, 28,\n/* Dx */   28,  1,  1,  1,  1,  1,  1,  1,  1,  1, 28, 28, 28, 28, 28, 28,\n/* Ex */   28, 28,  1,  1,  1,  1,  1,  0,  2,  2, 28, 28, 28, 28, 28, 28,\n/* Fx */    3,  3,  3,  3,  3,  3,  3,  3,  3,  3, 28, 28, 28, 28, 28, 28,\n#endif\n};\n\n/*\n** The charMap() macro maps alphabetic characters (only) into their\n** lower-case ASCII equivalent.  On ASCII machines, this is just\n** an upper-to-lower case map.  On EBCDIC machines we also need\n** to adjust the encoding.  The mapping is only valid for alphabetics\n** which are the only characters for which this feature is used.\n**\n** Used by keywordhash.h\n*/\n#ifdef SQLITE_ASCII\n# define charMap(X) sqlite3UpperToLower[(unsigned char)X]\n#endif\n#ifdef SQLITE_EBCDIC\n# define charMap(X) ebcdicToAscii[(unsigned char)X]\nconst unsigned char ebcdicToAscii[] = {\n/* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 0x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 1x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 2x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 3x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 4x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 5x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 95,  0,  0,  /* 6x */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 7x */\n   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* 8x */\n   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* 9x */\n   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ax */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Bx */\n   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* Cx */\n   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* Dx */\n   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ex */\n   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Fx */\n};\n#endif\n\n/*\n** The sqlite3KeywordCode function looks up an identifier to determine if\n** it is a keyword.  If it is a keyword, the token code of that keyword is\n** returned.  If the input is not a keyword, TK_ID is returned.\n**\n** The implementation of this routine was generated by a program,\n** mkkeywordhash.c, located in the tool subdirectory of the distribution.\n** The output of the mkkeywordhash.c program is written into a file\n** named keywordhash.h and then included into this source file by\n** the #include below.\n*/\n/************** Include keywordhash.h in the middle of tokenize.c ************/\n/************** Begin file keywordhash.h *************************************/\n/***** This file contains automatically generated code ******\n**\n** The code in this file has been automatically generated by\n**\n**   sqlite/tool/mkkeywordhash.c\n**\n** The code in this file implements a function that determines whether\n** or not a given identifier is really an SQL keyword.  The same thing\n** might be implemented more directly using a hand-written hash table.\n** But by using this automatically generated code, the size of the code\n** is substantially reduced.  This is important for embedded applications\n** on platforms with limited memory.\n*/\n/* Hash score: 231 */\n/* zKWText[] encodes 1007 bytes of keyword text in 667 bytes */\n/*   REINDEXEDESCAPEACHECKEYBEFOREIGNOREGEXPLAINSTEADDATABASELECT       */\n/*   ABLEFTHENDEFERRABLELSEXCLUDELETEMPORARYISNULLSAVEPOINTERSECT       */\n/*   IESNOTNULLIKEXCEPTRANSACTIONATURALTERAISEXCLUSIVEXISTS             */\n/*   CONSTRAINTOFFSETRIGGERANGENERATEDETACHAVINGLOBEGINNEREFERENCES     */\n/*   UNIQUERYWITHOUTERELEASEATTACHBETWEENOTHINGROUPSCASCADEFAULT        */\n/*   CASECOLLATECREATECURRENT_DATEIMMEDIATEJOINSERTMATCHPLANALYZE       */\n/*   PRAGMATERIALIZEDEFERREDISTINCTUPDATEVALUESVIRTUALWAYSWHENWHERE     */\n/*   CURSIVEABORTAFTERENAMEANDROPARTITIONAUTOINCREMENTCASTCOLUMN        */\n/*   COMMITCONFLICTCROSSCURRENT_TIMESTAMPRECEDINGFAILASTFILTER          */\n/*   EPLACEFIRSTFOLLOWINGFROMFULLIMITIFORDERESTRICTOTHERSOVER           */\n/*   ETURNINGRIGHTROLLBACKROWSUNBOUNDEDUNIONUSINGVACUUMVIEWINDOWBY      */\n/*   INITIALLYPRIMARY                                                   */\nstatic const char zKWText[666] = {\n  'R','E','I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H',\n  'E','C','K','E','Y','B','E','F','O','R','E','I','G','N','O','R','E','G',\n  'E','X','P','L','A','I','N','S','T','E','A','D','D','A','T','A','B','A',\n  'S','E','L','E','C','T','A','B','L','E','F','T','H','E','N','D','E','F',\n  'E','R','R','A','B','L','E','L','S','E','X','C','L','U','D','E','L','E',\n  'T','E','M','P','O','R','A','R','Y','I','S','N','U','L','L','S','A','V',\n  'E','P','O','I','N','T','E','R','S','E','C','T','I','E','S','N','O','T',\n  'N','U','L','L','I','K','E','X','C','E','P','T','R','A','N','S','A','C',\n  'T','I','O','N','A','T','U','R','A','L','T','E','R','A','I','S','E','X',\n  'C','L','U','S','I','V','E','X','I','S','T','S','C','O','N','S','T','R',\n  'A','I','N','T','O','F','F','S','E','T','R','I','G','G','E','R','A','N',\n  'G','E','N','E','R','A','T','E','D','E','T','A','C','H','A','V','I','N',\n  'G','L','O','B','E','G','I','N','N','E','R','E','F','E','R','E','N','C',\n  'E','S','U','N','I','Q','U','E','R','Y','W','I','T','H','O','U','T','E',\n  'R','E','L','E','A','S','E','A','T','T','A','C','H','B','E','T','W','E',\n  'E','N','O','T','H','I','N','G','R','O','U','P','S','C','A','S','C','A',\n  'D','E','F','A','U','L','T','C','A','S','E','C','O','L','L','A','T','E',\n  'C','R','E','A','T','E','C','U','R','R','E','N','T','_','D','A','T','E',\n  'I','M','M','E','D','I','A','T','E','J','O','I','N','S','E','R','T','M',\n  'A','T','C','H','P','L','A','N','A','L','Y','Z','E','P','R','A','G','M',\n  'A','T','E','R','I','A','L','I','Z','E','D','E','F','E','R','R','E','D',\n  'I','S','T','I','N','C','T','U','P','D','A','T','E','V','A','L','U','E',\n  'S','V','I','R','T','U','A','L','W','A','Y','S','W','H','E','N','W','H',\n  'E','R','E','C','U','R','S','I','V','E','A','B','O','R','T','A','F','T',\n  'E','R','E','N','A','M','E','A','N','D','R','O','P','A','R','T','I','T',\n  'I','O','N','A','U','T','O','I','N','C','R','E','M','E','N','T','C','A',\n  'S','T','C','O','L','U','M','N','C','O','M','M','I','T','C','O','N','F',\n  'L','I','C','T','C','R','O','S','S','C','U','R','R','E','N','T','_','T',\n  'I','M','E','S','T','A','M','P','R','E','C','E','D','I','N','G','F','A',\n  'I','L','A','S','T','F','I','L','T','E','R','E','P','L','A','C','E','F',\n  'I','R','S','T','F','O','L','L','O','W','I','N','G','F','R','O','M','F',\n  'U','L','L','I','M','I','T','I','F','O','R','D','E','R','E','S','T','R',\n  'I','C','T','O','T','H','E','R','S','O','V','E','R','E','T','U','R','N',\n  'I','N','G','R','I','G','H','T','R','O','L','L','B','A','C','K','R','O',\n  'W','S','U','N','B','O','U','N','D','E','D','U','N','I','O','N','U','S',\n  'I','N','G','V','A','C','U','U','M','V','I','E','W','I','N','D','O','W',\n  'B','Y','I','N','I','T','I','A','L','L','Y','P','R','I','M','A','R','Y',\n};\n/* aKWHash[i] is the hash value for the i-th keyword */\nstatic const unsigned char aKWHash[127] = {\n    84,  92, 134,  82, 105,  29,   0,   0,  94,   0,  85,  72,   0,\n    53,  35,  86,  15,   0,  42,  97,  54,  89, 135,  19,   0,   0,\n   140,   0,  40, 129,   0,  22, 107,   0,   9,   0,   0, 123,  80,\n     0,  78,   6,   0,  65, 103, 147,   0, 136, 115,   0,   0,  48,\n     0,  90,  24,   0,  17,   0,  27,  70,  23,  26,   5,  60, 142,\n   110, 122,   0,  73,  91,  71, 145,  61, 120,  74,   0,  49,   0,\n    11,  41,   0, 113,   0,   0,   0, 109,  10, 111, 116, 125,  14,\n    50, 124,   0, 100,   0,  18, 121, 144,  56, 130, 139,  88,  83,\n    37,  30, 126,   0,   0, 108,  51, 131, 128,   0,  34,   0,   0,\n   132,   0,  98,  38,  39,   0,  20,  45, 117,  93,\n};\n/* aKWNext[] forms the hash collision chain.  If aKWHash[i]==0\n** then the i-th keyword has no more hash collisions.  Otherwise,\n** the next keyword with the same hash is aKWHash[i]-1. */\nstatic const unsigned char aKWNext[148] = {0,\n     0,   0,   0,   0,   4,   0,  43,   0,   0, 106, 114,   0,   0,\n     0,   2,   0,   0, 143,   0,   0,   0,  13,   0,   0,   0,   0,\n   141,   0,   0, 119,  52,   0,   0, 137,  12,   0,   0,  62,   0,\n   138,   0, 133,   0,   0,  36,   0,   0,  28,  77,   0,   0,   0,\n     0,  59,   0,  47,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n     0,  69,   0,   0,   0,   0,   0, 146,   3,   0,  58,   0,   1,\n    75,   0,   0,   0,  31,   0,   0,   0,   0,   0, 127,   0, 104,\n     0,  64,  66,  63,   0,   0,   0,   0,   0,  46,   0,  16,   8,\n     0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  81, 101,   0,\n   112,  21,   7,  67,   0,  79,  96, 118,   0,   0,  68,   0,   0,\n    99,  44,   0,  55,   0,  76,   0,  95,  32,  33,  57,  25,   0,\n   102,   0,   0,  87,\n};\n/* aKWLen[i] is the length (in bytes) of the i-th keyword */\nstatic const unsigned char aKWLen[148] = {0,\n     7,   7,   5,   4,   6,   4,   5,   3,   6,   7,   3,   6,   6,\n     7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   7,\n     6,   9,   4,   2,   6,   5,   9,   9,   4,   7,   3,   2,   4,\n     4,   6,  11,   6,   2,   7,   5,   5,   9,   6,  10,   4,   6,\n     2,   3,   7,   5,   9,   6,   6,   4,   5,   5,  10,   6,   5,\n     7,   4,   5,   7,   6,   7,   7,   6,   5,   7,   3,   7,   4,\n     7,   6,  12,   9,   4,   6,   5,   4,   7,   6,  12,   8,   8,\n     2,   6,   6,   7,   6,   4,   5,   9,   5,   5,   6,   3,   4,\n     9,  13,   2,   2,   4,   6,   6,   8,   5,  17,  12,   7,   9,\n     4,   4,   6,   7,   5,   9,   4,   4,   5,   2,   5,   8,   6,\n     4,   9,   5,   8,   4,   3,   9,   5,   5,   6,   4,   6,   2,\n     2,   9,   3,   7,\n};\n/* aKWOffset[i] is the index into zKWText[] of the start of\n** the text for the i-th keyword. */\nstatic const unsigned short int aKWOffset[148] = {0,\n     0,   2,   2,   8,   9,  14,  16,  20,  23,  25,  25,  29,  33,\n    36,  41,  46,  48,  53,  54,  59,  62,  65,  67,  69,  78,  81,\n    86,  90,  90,  94,  99, 101, 105, 111, 119, 123, 123, 123, 126,\n   129, 132, 137, 142, 146, 147, 152, 156, 160, 168, 174, 181, 184,\n   184, 187, 189, 195, 198, 206, 211, 216, 219, 222, 226, 236, 239,\n   244, 244, 248, 252, 259, 265, 271, 277, 277, 283, 284, 288, 295,\n   299, 306, 312, 324, 333, 335, 341, 346, 348, 355, 359, 370, 377,\n   378, 385, 391, 397, 402, 408, 412, 415, 424, 429, 433, 439, 441,\n   444, 453, 455, 457, 466, 470, 476, 482, 490, 495, 495, 495, 511,\n   520, 523, 527, 532, 539, 544, 553, 557, 560, 565, 567, 571, 579,\n   585, 588, 597, 602, 610, 610, 614, 623, 628, 633, 639, 642, 645,\n   648, 650, 655, 659,\n};\n/* aKWCode[i] is the parser symbol code for the i-th keyword */\nstatic const unsigned char aKWCode[148] = {0,\n  TK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,\n  TK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOREIGN,\n  TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,\n  TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,\n  TK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,\n  TK_EXCLUDE,    TK_DELETE,     TK_TEMP,       TK_TEMP,       TK_OR,\n  TK_ISNULL,     TK_NULLS,      TK_SAVEPOINT,  TK_INTERSECT,  TK_TIES,\n  TK_NOTNULL,    TK_NOT,        TK_NO,         TK_NULL,       TK_LIKE_KW,\n  TK_EXCEPT,     TK_TRANSACTION,TK_ACTION,     TK_ON,         TK_JOIN_KW,\n  TK_ALTER,      TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_CONSTRAINT,\n  TK_INTO,       TK_OFFSET,     TK_OF,         TK_SET,        TK_TRIGGER,\n  TK_RANGE,      TK_GENERATED,  TK_DETACH,     TK_HAVING,     TK_LIKE_KW,\n  TK_BEGIN,      TK_JOIN_KW,    TK_REFERENCES, TK_UNIQUE,     TK_QUERY,\n  TK_WITHOUT,    TK_WITH,       TK_JOIN_KW,    TK_RELEASE,    TK_ATTACH,\n  TK_BETWEEN,    TK_NOTHING,    TK_GROUPS,     TK_GROUP,      TK_CASCADE,\n  TK_ASC,        TK_DEFAULT,    TK_CASE,       TK_COLLATE,    TK_CREATE,\n  TK_CTIME_KW,   TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,     TK_MATCH,\n  TK_PLAN,       TK_ANALYZE,    TK_PRAGMA,     TK_MATERIALIZED, TK_DEFERRED,\n  TK_DISTINCT,   TK_IS,         TK_UPDATE,     TK_VALUES,     TK_VIRTUAL,\n  TK_ALWAYS,     TK_WHEN,       TK_WHERE,      TK_RECURSIVE,  TK_ABORT,\n  TK_AFTER,      TK_RENAME,     TK_AND,        TK_DROP,       TK_PARTITION,\n  TK_AUTOINCR,   TK_TO,         TK_IN,         TK_CAST,       TK_COLUMNKW,\n  TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,\n  TK_CURRENT,    TK_PRECEDING,  TK_FAIL,       TK_LAST,       TK_FILTER,\n  TK_REPLACE,    TK_FIRST,      TK_FOLLOWING,  TK_FROM,       TK_JOIN_KW,\n  TK_LIMIT,      TK_IF,         TK_ORDER,      TK_RESTRICT,   TK_OTHERS,\n  TK_OVER,       TK_RETURNING,  TK_JOIN_KW,    TK_ROLLBACK,   TK_ROWS,\n  TK_ROW,        TK_UNBOUNDED,  TK_UNION,      TK_USING,      TK_VACUUM,\n  TK_VIEW,       TK_WINDOW,     TK_DO,         TK_BY,         TK_INITIALLY,\n  TK_ALL,        TK_PRIMARY,\n};\n/* Hash table decoded:\n**   0: INSERT\n**   1: IS\n**   2: ROLLBACK TRIGGER\n**   3: IMMEDIATE\n**   4: PARTITION\n**   5: TEMP\n**   6:\n**   7:\n**   8: VALUES WITHOUT\n**   9:\n**  10: MATCH\n**  11: NOTHING\n**  12:\n**  13: OF\n**  14: TIES IGNORE\n**  15: PLAN\n**  16: INSTEAD INDEXED\n**  17:\n**  18: TRANSACTION RIGHT\n**  19: WHEN\n**  20: SET HAVING\n**  21: MATERIALIZED IF\n**  22: ROWS\n**  23: SELECT\n**  24:\n**  25:\n**  26: VACUUM SAVEPOINT\n**  27:\n**  28: LIKE UNION VIRTUAL REFERENCES\n**  29: RESTRICT\n**  30:\n**  31: THEN REGEXP\n**  32: TO\n**  33:\n**  34: BEFORE\n**  35:\n**  36:\n**  37: FOLLOWING COLLATE CASCADE\n**  38: CREATE\n**  39:\n**  40: CASE REINDEX\n**  41: EACH\n**  42:\n**  43: QUERY\n**  44: AND ADD\n**  45: PRIMARY ANALYZE\n**  46:\n**  47: ROW ASC DETACH\n**  48: CURRENT_TIME CURRENT_DATE\n**  49:\n**  50:\n**  51: EXCLUSIVE TEMPORARY\n**  52:\n**  53: DEFERRED\n**  54: DEFERRABLE\n**  55:\n**  56: DATABASE\n**  57:\n**  58: DELETE VIEW GENERATED\n**  59: ATTACH\n**  60: END\n**  61: EXCLUDE\n**  62: ESCAPE DESC\n**  63: GLOB\n**  64: WINDOW ELSE\n**  65: COLUMN\n**  66: FIRST\n**  67:\n**  68: GROUPS ALL\n**  69: DISTINCT DROP KEY\n**  70: BETWEEN\n**  71: INITIALLY\n**  72: BEGIN\n**  73: FILTER CHECK ACTION\n**  74: GROUP INDEX\n**  75:\n**  76: EXISTS DEFAULT\n**  77:\n**  78: FOR CURRENT_TIMESTAMP\n**  79: EXCEPT\n**  80:\n**  81: CROSS\n**  82:\n**  83:\n**  84:\n**  85: CAST\n**  86: FOREIGN AUTOINCREMENT\n**  87: COMMIT\n**  88: CURRENT AFTER ALTER\n**  89: FULL FAIL CONFLICT\n**  90: EXPLAIN\n**  91: CONSTRAINT\n**  92: FROM ALWAYS\n**  93:\n**  94: ABORT\n**  95:\n**  96: AS DO\n**  97: REPLACE WITH RELEASE\n**  98: BY RENAME\n**  99: RANGE RAISE\n** 100: OTHERS\n** 101: USING NULLS\n** 102: PRAGMA\n** 103: JOIN ISNULL OFFSET\n** 104: NOT\n** 105: OR LAST LEFT\n** 106: LIMIT\n** 107:\n** 108:\n** 109: IN\n** 110: INTO\n** 111: OVER RECURSIVE\n** 112: ORDER OUTER\n** 113:\n** 114: INTERSECT UNBOUNDED\n** 115:\n** 116:\n** 117: RETURNING ON\n** 118:\n** 119: WHERE\n** 120: NO INNER\n** 121: NULL\n** 122:\n** 123: TABLE\n** 124: NATURAL NOTNULL\n** 125: PRECEDING\n** 126: UPDATE UNIQUE\n*/\n/* Check to see if z[0..n-1] is a keyword. If it is, write the\n** parser symbol code for that keyword into *pType.  Always\n** return the integer n (the length of the token). */\nstatic int keywordCode(const char *z, int n, int *pType){\n  int i, j;\n  const char *zKW;\n  assert( n>=2 );\n  i = ((charMap(z[0])*4) ^ (charMap(z[n-1])*3) ^ n*1) % 127;\n  for(i=(int)aKWHash[i]; i>0; i=aKWNext[i]){\n    if( aKWLen[i]!=n ) continue;\n    zKW = &zKWText[aKWOffset[i]];\n#ifdef SQLITE_ASCII\n    if( (z[0]&~0x20)!=zKW[0] ) continue;\n    if( (z[1]&~0x20)!=zKW[1] ) continue;\n    j = 2;\n    while( j<n && (z[j]&~0x20)==zKW[j] ){ j++; }\n#endif\n#ifdef SQLITE_EBCDIC\n    if( toupper(z[0])!=zKW[0] ) continue;\n    if( toupper(z[1])!=zKW[1] ) continue;\n    j = 2;\n    while( j<n && toupper(z[j])==zKW[j] ){ j++; }\n#endif\n    if( j<n ) continue;\n    testcase( i==1 ); /* REINDEX */\n    testcase( i==2 ); /* INDEXED */\n    testcase( i==3 ); /* INDEX */\n    testcase( i==4 ); /* DESC */\n    testcase( i==5 ); /* ESCAPE */\n    testcase( i==6 ); /* EACH */\n    testcase( i==7 ); /* CHECK */\n    testcase( i==8 ); /* KEY */\n    testcase( i==9 ); /* BEFORE */\n    testcase( i==10 ); /* FOREIGN */\n    testcase( i==11 ); /* FOR */\n    testcase( i==12 ); /* IGNORE */\n    testcase( i==13 ); /* REGEXP */\n    testcase( i==14 ); /* EXPLAIN */\n    testcase( i==15 ); /* INSTEAD */\n    testcase( i==16 ); /* ADD */\n    testcase( i==17 ); /* DATABASE */\n    testcase( i==18 ); /* AS */\n    testcase( i==19 ); /* SELECT */\n    testcase( i==20 ); /* TABLE */\n    testcase( i==21 ); /* LEFT */\n    testcase( i==22 ); /* THEN */\n    testcase( i==23 ); /* END */\n    testcase( i==24 ); /* DEFERRABLE */\n    testcase( i==25 ); /* ELSE */\n    testcase( i==26 ); /* EXCLUDE */\n    testcase( i==27 ); /* DELETE */\n    testcase( i==28 ); /* TEMPORARY */\n    testcase( i==29 ); /* TEMP */\n    testcase( i==30 ); /* OR */\n    testcase( i==31 ); /* ISNULL */\n    testcase( i==32 ); /* NULLS */\n    testcase( i==33 ); /* SAVEPOINT */\n    testcase( i==34 ); /* INTERSECT */\n    testcase( i==35 ); /* TIES */\n    testcase( i==36 ); /* NOTNULL */\n    testcase( i==37 ); /* NOT */\n    testcase( i==38 ); /* NO */\n    testcase( i==39 ); /* NULL */\n    testcase( i==40 ); /* LIKE */\n    testcase( i==41 ); /* EXCEPT */\n    testcase( i==42 ); /* TRANSACTION */\n    testcase( i==43 ); /* ACTION */\n    testcase( i==44 ); /* ON */\n    testcase( i==45 ); /* NATURAL */\n    testcase( i==46 ); /* ALTER */\n    testcase( i==47 ); /* RAISE */\n    testcase( i==48 ); /* EXCLUSIVE */\n    testcase( i==49 ); /* EXISTS */\n    testcase( i==50 ); /* CONSTRAINT */\n    testcase( i==51 ); /* INTO */\n    testcase( i==52 ); /* OFFSET */\n    testcase( i==53 ); /* OF */\n    testcase( i==54 ); /* SET */\n    testcase( i==55 ); /* TRIGGER */\n    testcase( i==56 ); /* RANGE */\n    testcase( i==57 ); /* GENERATED */\n    testcase( i==58 ); /* DETACH */\n    testcase( i==59 ); /* HAVING */\n    testcase( i==60 ); /* GLOB */\n    testcase( i==61 ); /* BEGIN */\n    testcase( i==62 ); /* INNER */\n    testcase( i==63 ); /* REFERENCES */\n    testcase( i==64 ); /* UNIQUE */\n    testcase( i==65 ); /* QUERY */\n    testcase( i==66 ); /* WITHOUT */\n    testcase( i==67 ); /* WITH */\n    testcase( i==68 ); /* OUTER */\n    testcase( i==69 ); /* RELEASE */\n    testcase( i==70 ); /* ATTACH */\n    testcase( i==71 ); /* BETWEEN */\n    testcase( i==72 ); /* NOTHING */\n    testcase( i==73 ); /* GROUPS */\n    testcase( i==74 ); /* GROUP */\n    testcase( i==75 ); /* CASCADE */\n    testcase( i==76 ); /* ASC */\n    testcase( i==77 ); /* DEFAULT */\n    testcase( i==78 ); /* CASE */\n    testcase( i==79 ); /* COLLATE */\n    testcase( i==80 ); /* CREATE */\n    testcase( i==81 ); /* CURRENT_DATE */\n    testcase( i==82 ); /* IMMEDIATE */\n    testcase( i==83 ); /* JOIN */\n    testcase( i==84 ); /* INSERT */\n    testcase( i==85 ); /* MATCH */\n    testcase( i==86 ); /* PLAN */\n    testcase( i==87 ); /* ANALYZE */\n    testcase( i==88 ); /* PRAGMA */\n    testcase( i==89 ); /* MATERIALIZED */\n    testcase( i==90 ); /* DEFERRED */\n    testcase( i==91 ); /* DISTINCT */\n    testcase( i==92 ); /* IS */\n    testcase( i==93 ); /* UPDATE */\n    testcase( i==94 ); /* VALUES */\n    testcase( i==95 ); /* VIRTUAL */\n    testcase( i==96 ); /* ALWAYS */\n    testcase( i==97 ); /* WHEN */\n    testcase( i==98 ); /* WHERE */\n    testcase( i==99 ); /* RECURSIVE */\n    testcase( i==100 ); /* ABORT */\n    testcase( i==101 ); /* AFTER */\n    testcase( i==102 ); /* RENAME */\n    testcase( i==103 ); /* AND */\n    testcase( i==104 ); /* DROP */\n    testcase( i==105 ); /* PARTITION */\n    testcase( i==106 ); /* AUTOINCREMENT */\n    testcase( i==107 ); /* TO */\n    testcase( i==108 ); /* IN */\n    testcase( i==109 ); /* CAST */\n    testcase( i==110 ); /* COLUMN */\n    testcase( i==111 ); /* COMMIT */\n    testcase( i==112 ); /* CONFLICT */\n    testcase( i==113 ); /* CROSS */\n    testcase( i==114 ); /* CURRENT_TIMESTAMP */\n    testcase( i==115 ); /* CURRENT_TIME */\n    testcase( i==116 ); /* CURRENT */\n    testcase( i==117 ); /* PRECEDING */\n    testcase( i==118 ); /* FAIL */\n    testcase( i==119 ); /* LAST */\n    testcase( i==120 ); /* FILTER */\n    testcase( i==121 ); /* REPLACE */\n    testcase( i==122 ); /* FIRST */\n    testcase( i==123 ); /* FOLLOWING */\n    testcase( i==124 ); /* FROM */\n    testcase( i==125 ); /* FULL */\n    testcase( i==126 ); /* LIMIT */\n    testcase( i==127 ); /* IF */\n    testcase( i==128 ); /* ORDER */\n    testcase( i==129 ); /* RESTRICT */\n    testcase( i==130 ); /* OTHERS */\n    testcase( i==131 ); /* OVER */\n    testcase( i==132 ); /* RETURNING */\n    testcase( i==133 ); /* RIGHT */\n    testcase( i==134 ); /* ROLLBACK */\n    testcase( i==135 ); /* ROWS */\n    testcase( i==136 ); /* ROW */\n    testcase( i==137 ); /* UNBOUNDED */\n    testcase( i==138 ); /* UNION */\n    testcase( i==139 ); /* USING */\n    testcase( i==140 ); /* VACUUM */\n    testcase( i==141 ); /* VIEW */\n    testcase( i==142 ); /* WINDOW */\n    testcase( i==143 ); /* DO */\n    testcase( i==144 ); /* BY */\n    testcase( i==145 ); /* INITIALLY */\n    testcase( i==146 ); /* ALL */\n    testcase( i==147 ); /* PRIMARY */\n    *pType = aKWCode[i];\n    break;\n  }\n  return n;\n}\nSQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){\n  int id = TK_ID;\n  if( n>=2 ) keywordCode((char*)z, n, &id);\n  return id;\n}\n#define SQLITE_N_KEYWORD 147\nSQLITE_API int sqlite3_keyword_name(int i,const char **pzName,int *pnName){\n  if( i<0 || i>=SQLITE_N_KEYWORD ) return SQLITE_ERROR;\n  i++;\n  *pzName = zKWText + aKWOffset[i];\n  *pnName = aKWLen[i];\n  return SQLITE_OK;\n}\nSQLITE_API int sqlite3_keyword_count(void){ return SQLITE_N_KEYWORD; }\nSQLITE_API int sqlite3_keyword_check(const char *zName, int nName){\n  return TK_ID!=sqlite3KeywordCode((const u8*)zName, nName);\n}\n\n/************** End of keywordhash.h *****************************************/\n/************** Continuing where we left off in tokenize.c *******************/\n\n\n/*\n** If X is a character that can be used in an identifier then\n** IdChar(X) will be true.  Otherwise it is false.\n**\n** For ASCII, any character with the high-order bit set is\n** allowed in an identifier.  For 7-bit characters,\n** sqlite3IsIdChar[X] must be 1.\n**\n** For EBCDIC, the rules are more complex but have the same\n** end result.\n**\n** Ticket #1066.  the SQL standard does not allow '$' in the\n** middle of identifiers.  But many SQL implementations do.\n** SQLite will allow '$' in identifiers for compatibility.\n** But the feature is undocumented.\n*/\n#ifdef SQLITE_ASCII\n#define IdChar(C)  ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)\n#endif\n#ifdef SQLITE_EBCDIC\nSQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[] = {\n/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */\n    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 4x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0,  /* 5x */\n    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,  /* 6x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,  /* 7x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0,  /* 8x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0,  /* 9x */\n    1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0,  /* Ax */\n    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* Bx */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Cx */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Dx */\n    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Ex */\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,  /* Fx */\n};\n#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))\n#endif\n\n/* Make the IdChar function accessible from ctime.c and alter.c */\nSQLITE_PRIVATE int sqlite3IsIdChar(u8 c){ return IdChar(c); }\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** Return the id of the next token in string (*pz). Before returning, set\n** (*pz) to point to the byte following the parsed token.\n*/\nstatic int getToken(const unsigned char **pz){\n  const unsigned char *z = *pz;\n  int t;                          /* Token type to return */\n  do {\n    z += sqlite3GetToken(z, &t);\n  }while( t==TK_SPACE || t==TK_COMMENT );\n  if( t==TK_ID\n   || t==TK_STRING\n   || t==TK_JOIN_KW\n   || t==TK_WINDOW\n   || t==TK_OVER\n   || sqlite3ParserFallback(t)==TK_ID\n  ){\n    t = TK_ID;\n  }\n  *pz = z;\n  return t;\n}\n\n/*\n** The following three functions are called immediately after the tokenizer\n** reads the keywords WINDOW, OVER and FILTER, respectively, to determine\n** whether the token should be treated as a keyword or an SQL identifier.\n** This cannot be handled by the usual lemon %fallback method, due to\n** the ambiguity in some constructions. e.g.\n**\n**   SELECT sum(x) OVER ...\n**\n** In the above, \"OVER\" might be a keyword, or it might be an alias for the\n** sum(x) expression. If a \"%fallback ID OVER\" directive were added to\n** grammar, then SQLite would always treat \"OVER\" as an alias, making it\n** impossible to call a window-function without a FILTER clause.\n**\n** WINDOW is treated as a keyword if:\n**\n**   * the following token is an identifier, or a keyword that can fallback\n**     to being an identifier, and\n**   * the token after than one is TK_AS.\n**\n** OVER is a keyword if:\n**\n**   * the previous token was TK_RP, and\n**   * the next token is either TK_LP or an identifier.\n**\n** FILTER is a keyword if:\n**\n**   * the previous token was TK_RP, and\n**   * the next token is TK_LP.\n*/\nstatic int analyzeWindowKeyword(const unsigned char *z){\n  int t;\n  t = getToken(&z);\n  if( t!=TK_ID ) return TK_ID;\n  t = getToken(&z);\n  if( t!=TK_AS ) return TK_ID;\n  return TK_WINDOW;\n}\nstatic int analyzeOverKeyword(const unsigned char *z, int lastToken){\n  if( lastToken==TK_RP ){\n    int t = getToken(&z);\n    if( t==TK_LP || t==TK_ID ) return TK_OVER;\n  }\n  return TK_ID;\n}\nstatic int analyzeFilterKeyword(const unsigned char *z, int lastToken){\n  if( lastToken==TK_RP && getToken(&z)==TK_LP ){\n    return TK_FILTER;\n  }\n  return TK_ID;\n}\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n\n/*\n** Return the length (in bytes) of the token that begins at z[0].\n** Store the token type in *tokenType before returning.\n*/\nSQLITE_PRIVATE i64 sqlite3GetToken(const unsigned char *z, int *tokenType){\n  i64 i;\n  int c;\n  switch( aiClass[*z] ){  /* Switch on the character-class of the first byte\n                          ** of the token. See the comment on the CC_ defines\n                          ** above. */\n    case CC_SPACE: {\n      testcase( z[0]==' ' );\n      testcase( z[0]=='\\t' );\n      testcase( z[0]=='\\n' );\n      testcase( z[0]=='\\f' );\n      testcase( z[0]=='\\r' );\n      for(i=1; sqlite3Isspace(z[i]); i++){}\n      *tokenType = TK_SPACE;\n      return i;\n    }\n    case CC_MINUS: {\n      if( z[1]=='-' ){\n        for(i=2; (c=z[i])!=0 && c!='\\n'; i++){}\n        *tokenType = TK_COMMENT;\n        return i;\n      }else if( z[1]=='>' ){\n        *tokenType = TK_PTR;\n        return 2 + (z[2]=='>');\n      }\n      *tokenType = TK_MINUS;\n      return 1;\n    }\n    case CC_LP: {\n      *tokenType = TK_LP;\n      return 1;\n    }\n    case CC_RP: {\n      *tokenType = TK_RP;\n      return 1;\n    }\n    case CC_SEMI: {\n      *tokenType = TK_SEMI;\n      return 1;\n    }\n    case CC_PLUS: {\n      *tokenType = TK_PLUS;\n      return 1;\n    }\n    case CC_STAR: {\n      *tokenType = TK_STAR;\n      return 1;\n    }\n    case CC_SLASH: {\n      if( z[1]!='*' || z[2]==0 ){\n        *tokenType = TK_SLASH;\n        return 1;\n      }\n      for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}\n      if( c ) i++;\n      *tokenType = TK_COMMENT;\n      return i;\n    }\n    case CC_PERCENT: {\n      *tokenType = TK_REM;\n      return 1;\n    }\n    case CC_EQ: {\n      *tokenType = TK_EQ;\n      return 1 + (z[1]=='=');\n    }\n    case CC_LT: {\n      if( (c=z[1])=='=' ){\n        *tokenType = TK_LE;\n        return 2;\n      }else if( c=='>' ){\n        *tokenType = TK_NE;\n        return 2;\n      }else if( c=='<' ){\n        *tokenType = TK_LSHIFT;\n        return 2;\n      }else{\n        *tokenType = TK_LT;\n        return 1;\n      }\n    }\n    case CC_GT: {\n      if( (c=z[1])=='=' ){\n        *tokenType = TK_GE;\n        return 2;\n      }else if( c=='>' ){\n        *tokenType = TK_RSHIFT;\n        return 2;\n      }else{\n        *tokenType = TK_GT;\n        return 1;\n      }\n    }\n    case CC_BANG: {\n      if( z[1]!='=' ){\n        *tokenType = TK_ILLEGAL;\n        return 1;\n      }else{\n        *tokenType = TK_NE;\n        return 2;\n      }\n    }\n    case CC_PIPE: {\n      if( z[1]!='|' ){\n        *tokenType = TK_BITOR;\n        return 1;\n      }else{\n        *tokenType = TK_CONCAT;\n        return 2;\n      }\n    }\n    case CC_COMMA: {\n      *tokenType = TK_COMMA;\n      return 1;\n    }\n    case CC_AND: {\n      *tokenType = TK_BITAND;\n      return 1;\n    }\n    case CC_TILDA: {\n      *tokenType = TK_BITNOT;\n      return 1;\n    }\n    case CC_QUOTE: {\n      int delim = z[0];\n      testcase( delim=='`' );\n      testcase( delim=='\\'' );\n      testcase( delim=='\"' );\n      for(i=1; (c=z[i])!=0; i++){\n        if( c==delim ){\n          if( z[i+1]==delim ){\n            i++;\n          }else{\n            break;\n          }\n        }\n      }\n      if( c=='\\'' ){\n        *tokenType = TK_STRING;\n        return i+1;\n      }else if( c!=0 ){\n        *tokenType = TK_ID;\n        return i+1;\n      }else{\n        *tokenType = TK_ILLEGAL;\n        return i;\n      }\n    }\n    case CC_DOT: {\n#ifndef SQLITE_OMIT_FLOATING_POINT\n      if( !sqlite3Isdigit(z[1]) )\n#endif\n      {\n        *tokenType = TK_DOT;\n        return 1;\n      }\n      /* If the next character is a digit, this is a floating point\n      ** number that begins with \".\".  Fall thru into the next case */\n      /* no break */ deliberate_fall_through\n    }\n    case CC_DIGIT: {\n      testcase( z[0]=='0' );  testcase( z[0]=='1' );  testcase( z[0]=='2' );\n      testcase( z[0]=='3' );  testcase( z[0]=='4' );  testcase( z[0]=='5' );\n      testcase( z[0]=='6' );  testcase( z[0]=='7' );  testcase( z[0]=='8' );\n      testcase( z[0]=='9' );  testcase( z[0]=='.' );\n      *tokenType = TK_INTEGER;\n#ifndef SQLITE_OMIT_HEX_INTEGER\n      if( z[0]=='0' && (z[1]=='x' || z[1]=='X') && sqlite3Isxdigit(z[2]) ){\n        for(i=3; 1; i++){\n          if( sqlite3Isxdigit(z[i])==0 ){\n            if( z[i]==SQLITE_DIGIT_SEPARATOR ){\n              *tokenType = TK_QNUMBER;\n            }else{\n              break;\n            }\n          }\n        }\n      }else\n#endif\n        {\n        for(i=0; 1; i++){\n          if( sqlite3Isdigit(z[i])==0 ){\n            if( z[i]==SQLITE_DIGIT_SEPARATOR ){\n              *tokenType = TK_QNUMBER;\n            }else{\n              break;\n            }\n          }\n        }\n#ifndef SQLITE_OMIT_FLOATING_POINT\n        if( z[i]=='.' ){\n          if( *tokenType==TK_INTEGER ) *tokenType = TK_FLOAT;\n          for(i++; 1; i++){\n            if( sqlite3Isdigit(z[i])==0 ){\n              if( z[i]==SQLITE_DIGIT_SEPARATOR ){\n                *tokenType = TK_QNUMBER;\n              }else{\n                break;\n              }\n            }\n          }\n        }\n        if( (z[i]=='e' || z[i]=='E') &&\n             ( sqlite3Isdigit(z[i+1])\n              || ((z[i+1]=='+' || z[i+1]=='-') && sqlite3Isdigit(z[i+2]))\n             )\n        ){\n          if( *tokenType==TK_INTEGER ) *tokenType = TK_FLOAT;\n          for(i+=2; 1; i++){\n            if( sqlite3Isdigit(z[i])==0 ){\n              if( z[i]==SQLITE_DIGIT_SEPARATOR ){\n                *tokenType = TK_QNUMBER;\n              }else{\n                break;\n              }\n            }\n          }\n        }\n#endif\n      }\n      while( IdChar(z[i]) ){\n        *tokenType = TK_ILLEGAL;\n        i++;\n      }\n      return i;\n    }\n    case CC_QUOTE2: {\n      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}\n      *tokenType = c==']' ? TK_ID : TK_ILLEGAL;\n      return i;\n    }\n    case CC_VARNUM: {\n      *tokenType = TK_VARIABLE;\n      for(i=1; sqlite3Isdigit(z[i]); i++){}\n      return i;\n    }\n    case CC_DOLLAR:\n    case CC_VARALPHA: {\n      int n = 0;\n      testcase( z[0]=='$' );  testcase( z[0]=='@' );\n      testcase( z[0]==':' );  testcase( z[0]=='#' );\n      *tokenType = TK_VARIABLE;\n      for(i=1; (c=z[i])!=0; i++){\n        if( IdChar(c) ){\n          n++;\n#ifndef SQLITE_OMIT_TCL_VARIABLE\n        }else if( c=='(' && n>0 ){\n          do{\n            i++;\n          }while( (c=z[i])!=0 && !sqlite3Isspace(c) && c!=')' );\n          if( c==')' ){\n            i++;\n          }else{\n            *tokenType = TK_ILLEGAL;\n          }\n          break;\n        }else if( c==':' && z[i+1]==':' ){\n          i++;\n#endif\n        }else{\n          break;\n        }\n      }\n      if( n==0 ) *tokenType = TK_ILLEGAL;\n      return i;\n    }\n    case CC_KYWD0: {\n      if( aiClass[z[1]]>CC_KYWD ){ i = 1;  break; }\n      for(i=2; aiClass[z[i]]<=CC_KYWD; i++){}\n      if( IdChar(z[i]) ){\n        /* This token started out using characters that can appear in keywords,\n        ** but z[i] is a character not allowed within keywords, so this must\n        ** be an identifier instead */\n        i++;\n        break;\n      }\n      *tokenType = TK_ID;\n      return keywordCode((char*)z, i, tokenType);\n    }\n    case CC_X: {\n#ifndef SQLITE_OMIT_BLOB_LITERAL\n      testcase( z[0]=='x' ); testcase( z[0]=='X' );\n      if( z[1]=='\\'' ){\n        *tokenType = TK_BLOB;\n        for(i=2; sqlite3Isxdigit(z[i]); i++){}\n        if( z[i]!='\\'' || i%2 ){\n          *tokenType = TK_ILLEGAL;\n          while( z[i] && z[i]!='\\'' ){ i++; }\n        }\n        if( z[i] ) i++;\n        return i;\n      }\n#endif\n      /* If it is not a BLOB literal, then it must be an ID, since no\n      ** SQL keywords start with the letter 'x'.  Fall through */\n      /* no break */ deliberate_fall_through\n    }\n    case CC_KYWD:\n    case CC_ID: {\n      i = 1;\n      break;\n    }\n    case CC_BOM: {\n      if( z[1]==0xbb && z[2]==0xbf ){\n        *tokenType = TK_SPACE;\n        return 3;\n      }\n      i = 1;\n      break;\n    }\n    case CC_NUL: {\n      *tokenType = TK_ILLEGAL;\n      return 0;\n    }\n    default: {\n      *tokenType = TK_ILLEGAL;\n      return 1;\n    }\n  }\n  while( IdChar(z[i]) ){ i++; }\n  *tokenType = TK_ID;\n  return i;\n}\n\n/*\n** Run the parser on the given SQL string.\n*/\nSQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql){\n  int nErr = 0;                   /* Number of errors encountered */\n  void *pEngine;                  /* The LEMON-generated LALR(1) parser */\n  i64 n = 0;                      /* Length of the next token token */\n  int tokenType;                  /* type of the next token */\n  int lastTokenParsed = -1;       /* type of the previous token */\n  sqlite3 *db = pParse->db;       /* The database connection */\n  int mxSqlLen;                   /* Max length of an SQL string */\n  Parse *pParentParse = 0;        /* Outer parse context, if any */\n#ifdef sqlite3Parser_ENGINEALWAYSONSTACK\n  yyParser sEngine;    /* Space to hold the Lemon-generated Parser object */\n#endif\n  VVA_ONLY( u8 startedWithOom = db->mallocFailed );\n\n  assert( zSql!=0 );\n  mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];\n  if( db->nVdbeActive==0 ){\n    AtomicStore(&db->u1.isInterrupted, 0);\n  }\n  pParse->rc = SQLITE_OK;\n  pParse->zTail = zSql;\n#ifdef SQLITE_DEBUG\n  if( db->flags & SQLITE_ParserTrace ){\n    printf(\"parser: [[[%s]]]\\n\", zSql);\n    sqlite3ParserTrace(stdout, \"parser: \");\n  }else{\n    sqlite3ParserTrace(0, 0);\n  }\n#endif\n#ifdef sqlite3Parser_ENGINEALWAYSONSTACK\n  pEngine = &sEngine;\n  sqlite3ParserInit(pEngine, pParse);\n#else\n  pEngine = sqlite3ParserAlloc(sqlite3Malloc, pParse);\n  if( pEngine==0 ){\n    sqlite3OomFault(db);\n    return SQLITE_NOMEM_BKPT;\n  }\n#endif\n  assert( pParse->pNewTable==0 );\n  assert( pParse->pNewTrigger==0 );\n  assert( pParse->nVar==0 );\n  assert( pParse->pVList==0 );\n  pParentParse = db->pParse;\n  db->pParse = pParse;\n  while( 1 ){\n    n = sqlite3GetToken((u8*)zSql, &tokenType);\n    mxSqlLen -= n;\n    if( mxSqlLen<0 ){\n      pParse->rc = SQLITE_TOOBIG;\n      pParse->nErr++;\n      break;\n    }\n#ifndef SQLITE_OMIT_WINDOWFUNC\n    if( tokenType>=TK_WINDOW ){\n      assert( tokenType==TK_SPACE || tokenType==TK_OVER || tokenType==TK_FILTER\n           || tokenType==TK_ILLEGAL || tokenType==TK_WINDOW\n           || tokenType==TK_QNUMBER || tokenType==TK_COMMENT\n      );\n#else\n    if( tokenType>=TK_SPACE ){\n      assert( tokenType==TK_SPACE || tokenType==TK_ILLEGAL\n           || tokenType==TK_QNUMBER || tokenType==TK_COMMENT\n      );\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n      if( AtomicLoad(&db->u1.isInterrupted) ){\n        pParse->rc = SQLITE_INTERRUPT;\n        pParse->nErr++;\n        break;\n      }\n      if( tokenType==TK_SPACE ){\n        zSql += n;\n        continue;\n      }\n      if( zSql[0]==0 ){\n        /* Upon reaching the end of input, call the parser two more times\n        ** with tokens TK_SEMI and 0, in that order. */\n        if( lastTokenParsed==TK_SEMI ){\n          tokenType = 0;\n        }else if( lastTokenParsed==0 ){\n          break;\n        }else{\n          tokenType = TK_SEMI;\n        }\n        n = 0;\n#ifndef SQLITE_OMIT_WINDOWFUNC\n      }else if( tokenType==TK_WINDOW ){\n        assert( n==6 );\n        tokenType = analyzeWindowKeyword((const u8*)&zSql[6]);\n      }else if( tokenType==TK_OVER ){\n        assert( n==4 );\n        tokenType = analyzeOverKeyword((const u8*)&zSql[4], lastTokenParsed);\n      }else if( tokenType==TK_FILTER ){\n        assert( n==6 );\n        tokenType = analyzeFilterKeyword((const u8*)&zSql[6], lastTokenParsed);\n#endif /* SQLITE_OMIT_WINDOWFUNC */\n      }else if( tokenType==TK_COMMENT\n             && (db->init.busy || (db->flags & SQLITE_Comments)!=0)\n      ){\n        /* Ignore SQL comments if either (1) we are reparsing the schema or\n        ** (2) SQLITE_DBCONFIG_ENABLE_COMMENTS is turned on (the default). */\n        zSql += n;\n        continue;\n      }else if( tokenType!=TK_QNUMBER ){\n        Token x;\n        x.z = zSql;\n        x.n = (u32)n;\n        sqlite3ErrorMsg(pParse, \"unrecognized token: \\\"%T\\\"\", &x);\n        break;\n      }\n    }\n    pParse->sLastToken.z = zSql;\n    pParse->sLastToken.n = (u32)n;\n    sqlite3Parser(pEngine, tokenType, pParse->sLastToken);\n    lastTokenParsed = tokenType;\n    zSql += n;\n    assert( db->mallocFailed==0 || pParse->rc!=SQLITE_OK || startedWithOom );\n    if( pParse->rc!=SQLITE_OK ) break;\n  }\n  assert( nErr==0 );\n#ifdef YYTRACKMAXSTACKDEPTH\n  sqlite3_mutex_enter(sqlite3MallocMutex());\n  sqlite3StatusHighwater(SQLITE_STATUS_PARSER_STACK,\n      sqlite3ParserStackPeak(pEngine)\n  );\n  sqlite3_mutex_leave(sqlite3MallocMutex());\n#endif /* YYDEBUG */\n#ifdef sqlite3Parser_ENGINEALWAYSONSTACK\n  sqlite3ParserFinalize(pEngine);\n#else\n  sqlite3ParserFree(pEngine, sqlite3_free);\n#endif\n  if( db->mallocFailed ){\n    pParse->rc = SQLITE_NOMEM_BKPT;\n  }\n  if( pParse->zErrMsg || (pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE) ){\n    if( pParse->zErrMsg==0 ){\n      pParse->zErrMsg = sqlite3MPrintf(db, \"%s\", sqlite3ErrStr(pParse->rc));\n    }\n    if( (pParse->prepFlags & SQLITE_PREPARE_DONT_LOG)==0 ){\n      sqlite3_log(pParse->rc, \"%s in \\\"%s\\\"\", pParse->zErrMsg, pParse->zTail);\n    }\n    nErr++;\n  }\n  pParse->zTail = zSql;\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  sqlite3_free(pParse->apVtabLock);\n#endif\n\n  if( pParse->pNewTable && !IN_SPECIAL_PARSE ){\n    /* If the pParse->declareVtab flag is set, do not delete any table\n    ** structure built up in pParse->pNewTable. The calling code (see vtab.c)\n    ** will take responsibility for freeing the Table structure.\n    */\n    sqlite3DeleteTable(db, pParse->pNewTable);\n  }\n  if( pParse->pNewTrigger && !IN_RENAME_OBJECT ){\n    sqlite3DeleteTrigger(db, pParse->pNewTrigger);\n  }\n  if( pParse->pVList ) sqlite3DbNNFreeNN(db, pParse->pVList);\n  db->pParse = pParentParse;\n  assert( nErr==0 || pParse->rc!=SQLITE_OK );\n  return nErr;\n}\n\n\n#ifdef SQLITE_ENABLE_NORMALIZE\n/*\n** Insert a single space character into pStr if the current string\n** ends with an identifier\n*/\nstatic void addSpaceSeparator(sqlite3_str *pStr){\n  if( pStr->nChar && sqlite3IsIdChar(pStr->zText[pStr->nChar-1]) ){\n    sqlite3_str_append(pStr, \" \", 1);\n  }\n}\n\n/*\n** Compute a normalization of the SQL given by zSql[0..nSql-1].  Return\n** the normalization in space obtained from sqlite3DbMalloc().  Or return\n** NULL if anything goes wrong or if zSql is NULL.\n*/\nSQLITE_PRIVATE char *sqlite3Normalize(\n  Vdbe *pVdbe,       /* VM being reprepared */\n  const char *zSql   /* The original SQL string */\n){\n  sqlite3 *db;       /* The database connection */\n  int i;             /* Next unread byte of zSql[] */\n  i64 n;             /* length of current token */\n  int tokenType;     /* type of current token */\n  int prevType = 0;  /* Previous non-whitespace token */\n  int nParen;        /* Number of nested levels of parentheses */\n  int iStartIN;      /* Start of RHS of IN operator in z[] */\n  int nParenAtIN;    /* Value of nParent at start of RHS of IN operator */\n  u32 j;             /* Bytes of normalized SQL generated so far */\n  sqlite3_str *pStr; /* The normalized SQL string under construction */\n\n  db = sqlite3VdbeDb(pVdbe);\n  tokenType = -1;\n  nParen = iStartIN = nParenAtIN = 0;\n  pStr = sqlite3_str_new(db);\n  assert( pStr!=0 );  /* sqlite3_str_new() never returns NULL */\n  for(i=0; zSql[i] && pStr->accError==0; i+=n){\n    if( tokenType!=TK_SPACE ){\n      prevType = tokenType;\n    }\n    n = sqlite3GetToken((unsigned char*)zSql+i, &tokenType);\n    if( NEVER(n<=0) ) break;\n    switch( tokenType ){\n      case TK_COMMENT:\n      case TK_SPACE: {\n        break;\n      }\n      case TK_NULL: {\n        if( prevType==TK_IS || prevType==TK_NOT ){\n          sqlite3_str_append(pStr, \" NULL\", 5);\n          break;\n        }\n        /* Fall through */\n      }\n      case TK_STRING:\n      case TK_INTEGER:\n      case TK_FLOAT:\n      case TK_VARIABLE:\n      case TK_BLOB: {\n        sqlite3_str_append(pStr, \"?\", 1);\n        break;\n      }\n      case TK_LP: {\n        nParen++;\n        if( prevType==TK_IN ){\n          iStartIN = pStr->nChar;\n          nParenAtIN = nParen;\n        }\n        sqlite3_str_append(pStr, \"(\", 1);\n        break;\n      }\n      case TK_RP: {\n        if( iStartIN>0 && nParen==nParenAtIN ){\n          assert( pStr->nChar>=(u32)iStartIN );\n          pStr->nChar = iStartIN+1;\n          sqlite3_str_append(pStr, \"?,?,?\", 5);\n          iStartIN = 0;\n        }\n        nParen--;\n        sqlite3_str_append(pStr, \")\", 1);\n        break;\n      }\n      case TK_ID: {\n        iStartIN = 0;\n        j = pStr->nChar;\n        if( sqlite3Isquote(zSql[i]) ){\n          char *zId = sqlite3DbStrNDup(db, zSql+i, n);\n          int nId;\n          int eType = 0;\n          if( zId==0 ) break;\n          sqlite3Dequote(zId);\n          if( zSql[i]=='\"' && sqlite3VdbeUsesDoubleQuotedString(pVdbe, zId) ){\n            sqlite3_str_append(pStr, \"?\", 1);\n            sqlite3DbFree(db, zId);\n            break;\n          }\n          nId = sqlite3Strlen30(zId);\n          if( sqlite3GetToken((u8*)zId, &eType)==nId && eType==TK_ID ){\n            addSpaceSeparator(pStr);\n            sqlite3_str_append(pStr, zId, nId);\n          }else{\n            sqlite3_str_appendf(pStr, \"\\\"%w\\\"\", zId);\n          }\n          sqlite3DbFree(db, zId);\n        }else{\n          addSpaceSeparator(pStr);\n          sqlite3_str_append(pStr, zSql+i, n);\n        }\n        while( j<pStr->nChar ){\n          pStr->zText[j] = sqlite3Tolower(pStr->zText[j]);\n          j++;\n        }\n        break;\n      }\n      case TK_SELECT: {\n        iStartIN = 0;\n        /* fall through */\n      }\n      default: {\n        if( sqlite3IsIdChar(zSql[i]) ) addSpaceSeparator(pStr);\n        j = pStr->nChar;\n        sqlite3_str_append(pStr, zSql+i, n);\n        while( j<pStr->nChar ){\n          pStr->zText[j] = sqlite3Toupper(pStr->zText[j]);\n          j++;\n        }\n        break;\n      }\n    }\n  }\n  if( tokenType!=TK_SEMI ) sqlite3_str_append(pStr, \";\", 1);\n  return sqlite3_str_finish(pStr);\n}\n#endif /* SQLITE_ENABLE_NORMALIZE */\n\n/************** End of tokenize.c ********************************************/\n/************** Begin file complete.c ****************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** An tokenizer for SQL\n**\n** This file contains C code that implements the sqlite3_complete() API.\n** This code used to be part of the tokenizer.c source file.  But by\n** separating it out, the code will be automatically omitted from\n** static links that do not use it.\n*/\n/* #include \"sqliteInt.h\" */\n#ifndef SQLITE_OMIT_COMPLETE\n\n/*\n** This is defined in tokenize.c.  We just have to import the definition.\n*/\n#ifndef SQLITE_AMALGAMATION\n#ifdef SQLITE_ASCII\n#define IdChar(C)  ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)\n#endif\n#ifdef SQLITE_EBCDIC\nSQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];\n#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))\n#endif\n#endif /* SQLITE_AMALGAMATION */\n\n\n/*\n** Token types used by the sqlite3_complete() routine.  See the header\n** comments on that procedure for additional information.\n*/\n#define tkSEMI    0\n#define tkWS      1\n#define tkOTHER   2\n#ifndef SQLITE_OMIT_TRIGGER\n#define tkEXPLAIN 3\n#define tkCREATE  4\n#define tkTEMP    5\n#define tkTRIGGER 6\n#define tkEND     7\n#endif\n\n/*\n** Return TRUE if the given SQL string ends in a semicolon.\n**\n** Special handling is require for CREATE TRIGGER statements.\n** Whenever the CREATE TRIGGER keywords are seen, the statement\n** must end with \";END;\".\n**\n** This implementation uses a state machine with 8 states:\n**\n**   (0) INVALID   We have not yet seen a non-whitespace character.\n**\n**   (1) START     At the beginning or end of an SQL statement.  This routine\n**                 returns 1 if it ends in the START state and 0 if it ends\n**                 in any other state.\n**\n**   (2) NORMAL    We are in the middle of statement which ends with a single\n**                 semicolon.\n**\n**   (3) EXPLAIN   The keyword EXPLAIN has been seen at the beginning of\n**                 a statement.\n**\n**   (4) CREATE    The keyword CREATE has been seen at the beginning of a\n**                 statement, possibly preceded by EXPLAIN and/or followed by\n**                 TEMP or TEMPORARY\n**\n**   (5) TRIGGER   We are in the middle of a trigger definition that must be\n**                 ended by a semicolon, the keyword END, and another semicolon.\n**\n**   (6) SEMI      We've seen the first semicolon in the \";END;\" that occurs at\n**                 the end of a trigger definition.\n**\n**   (7) END       We've seen the \";END\" of the \";END;\" that occurs at the end\n**                 of a trigger definition.\n**\n** Transitions between states above are determined by tokens extracted\n** from the input.  The following tokens are significant:\n**\n**   (0) tkSEMI      A semicolon.\n**   (1) tkWS        Whitespace.\n**   (2) tkOTHER     Any other SQL token.\n**   (3) tkEXPLAIN   The \"explain\" keyword.\n**   (4) tkCREATE    The \"create\" keyword.\n**   (5) tkTEMP      The \"temp\" or \"temporary\" keyword.\n**   (6) tkTRIGGER   The \"trigger\" keyword.\n**   (7) tkEND       The \"end\" keyword.\n**\n** Whitespace never causes a state transition and is always ignored.\n** This means that a SQL string of all whitespace is invalid.\n**\n** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed\n** to recognize the end of a trigger can be omitted.  All we have to do\n** is look for a semicolon that is not part of an string or comment.\n*/\nSQLITE_API int sqlite3_complete(const char *zSql){\n  u8 state = 0;   /* Current state, using numbers defined in header comment */\n  u8 token;       /* Value of the next token */\n\n#ifndef SQLITE_OMIT_TRIGGER\n  /* A complex statement machine used to detect the end of a CREATE TRIGGER\n  ** statement.  This is the normal case.\n  */\n  static const u8 trans[8][8] = {\n                     /* Token:                                                */\n     /* State:       **  SEMI  WS  OTHER  EXPLAIN  CREATE  TEMP  TRIGGER  END */\n     /* 0 INVALID: */ {    1,  0,     2,       3,      4,    2,       2,   2, },\n     /* 1   START: */ {    1,  1,     2,       3,      4,    2,       2,   2, },\n     /* 2  NORMAL: */ {    1,  2,     2,       2,      2,    2,       2,   2, },\n     /* 3 EXPLAIN: */ {    1,  3,     3,       2,      4,    2,       2,   2, },\n     /* 4  CREATE: */ {    1,  4,     2,       2,      2,    4,       5,   2, },\n     /* 5 TRIGGER: */ {    6,  5,     5,       5,      5,    5,       5,   5, },\n     /* 6    SEMI: */ {    6,  6,     5,       5,      5,    5,       5,   7, },\n     /* 7     END: */ {    1,  7,     5,       5,      5,    5,       5,   5, },\n  };\n#else\n  /* If triggers are not supported by this compile then the statement machine\n  ** used to detect the end of a statement is much simpler\n  */\n  static const u8 trans[3][3] = {\n                     /* Token:           */\n     /* State:       **  SEMI  WS  OTHER */\n     /* 0 INVALID: */ {    1,  0,     2, },\n     /* 1   START: */ {    1,  1,     2, },\n     /* 2  NORMAL: */ {    1,  2,     2, },\n  };\n#endif /* SQLITE_OMIT_TRIGGER */\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( zSql==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n\n  while( *zSql ){\n    switch( *zSql ){\n      case ';': {  /* A semicolon */\n        token = tkSEMI;\n        break;\n      }\n      case ' ':\n      case '\\r':\n      case '\\t':\n      case '\\n':\n      case '\\f': {  /* White space is ignored */\n        token = tkWS;\n        break;\n      }\n      case '/': {   /* C-style comments */\n        if( zSql[1]!='*' ){\n          token = tkOTHER;\n          break;\n        }\n        zSql += 2;\n        while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }\n        if( zSql[0]==0 ) return 0;\n        zSql++;\n        token = tkWS;\n        break;\n      }\n      case '-': {   /* SQL-style comments from \"--\" to end of line */\n        if( zSql[1]!='-' ){\n          token = tkOTHER;\n          break;\n        }\n        while( *zSql && *zSql!='\\n' ){ zSql++; }\n        if( *zSql==0 ) return state==1;\n        token = tkWS;\n        break;\n      }\n      case '[': {   /* Microsoft-style identifiers in [...] */\n        zSql++;\n        while( *zSql && *zSql!=']' ){ zSql++; }\n        if( *zSql==0 ) return 0;\n        token = tkOTHER;\n        break;\n      }\n      case '`':     /* Grave-accent quoted symbols used by MySQL */\n      case '\"':     /* single- and double-quoted strings */\n      case '\\'': {\n        int c = *zSql;\n        zSql++;\n        while( *zSql && *zSql!=c ){ zSql++; }\n        if( *zSql==0 ) return 0;\n        token = tkOTHER;\n        break;\n      }\n      default: {\n#ifdef SQLITE_EBCDIC\n        unsigned char c;\n#endif\n        if( IdChar((u8)*zSql) ){\n          /* Keywords and unquoted identifiers */\n          int nId;\n          for(nId=1; IdChar(zSql[nId]); nId++){}\n#ifdef SQLITE_OMIT_TRIGGER\n          token = tkOTHER;\n#else\n          switch( *zSql ){\n            case 'c': case 'C': {\n              if( nId==6 && sqlite3StrNICmp(zSql, \"create\", 6)==0 ){\n                token = tkCREATE;\n              }else{\n                token = tkOTHER;\n              }\n              break;\n            }\n            case 't': case 'T': {\n              if( nId==7 && sqlite3StrNICmp(zSql, \"trigger\", 7)==0 ){\n                token = tkTRIGGER;\n              }else if( nId==4 && sqlite3StrNICmp(zSql, \"temp\", 4)==0 ){\n                token = tkTEMP;\n              }else if( nId==9 && sqlite3StrNICmp(zSql, \"temporary\", 9)==0 ){\n                token = tkTEMP;\n              }else{\n                token = tkOTHER;\n              }\n              break;\n            }\n            case 'e':  case 'E': {\n              if( nId==3 && sqlite3StrNICmp(zSql, \"end\", 3)==0 ){\n                token = tkEND;\n              }else\n#ifndef SQLITE_OMIT_EXPLAIN\n              if( nId==7 && sqlite3StrNICmp(zSql, \"explain\", 7)==0 ){\n                token = tkEXPLAIN;\n              }else\n#endif\n              {\n                token = tkOTHER;\n              }\n              break;\n            }\n            default: {\n              token = tkOTHER;\n              break;\n            }\n          }\n#endif /* SQLITE_OMIT_TRIGGER */\n          zSql += nId-1;\n        }else{\n          /* Operators and special symbols */\n          token = tkOTHER;\n        }\n        break;\n      }\n    }\n    state = trans[state][token];\n    zSql++;\n  }\n  return state==1;\n}\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** This routine is the same as the sqlite3_complete() routine described\n** above, except that the parameter is required to be UTF-16 encoded, not\n** UTF-8.\n*/\nSQLITE_API int sqlite3_complete16(const void *zSql){\n  sqlite3_value *pVal;\n  char const *zSql8;\n  int rc;\n\n#ifndef SQLITE_OMIT_AUTOINIT\n  rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n  pVal = sqlite3ValueNew(0);\n  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);\n  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);\n  if( zSql8 ){\n    rc = sqlite3_complete(zSql8);\n  }else{\n    rc = SQLITE_NOMEM_BKPT;\n  }\n  sqlite3ValueFree(pVal);\n  return rc & 0xff;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n#endif /* SQLITE_OMIT_COMPLETE */\n\n/************** End of complete.c ********************************************/\n/************** Begin file main.c ********************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Main file for the SQLite library.  The routines in this file\n** implement the programmer interface to the library.  Routines in\n** other files are for internal use by SQLite and should not be\n** accessed by users of the library.\n*/\n/* #include \"sqliteInt.h\" */\n\n#ifdef SQLITE_ENABLE_FTS3\n/************** Include fts3.h in the middle of main.c ***********************/\n/************** Begin file fts3.h ********************************************/\n/*\n** 2006 Oct 10\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This header file is used by programs that want to link against the\n** FTS3 library.  All it does is declare the sqlite3Fts3Init() interface.\n*/\n/* #include \"sqlite3.h\" */\n\n#if 0\nextern \"C\" {\n#endif  /* __cplusplus */\n\nSQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);\n\n#if 0\n}  /* extern \"C\" */\n#endif  /* __cplusplus */\n\n/************** End of fts3.h ************************************************/\n/************** Continuing where we left off in main.c ***********************/\n#endif\n#ifdef SQLITE_ENABLE_RTREE\n/************** Include rtree.h in the middle of main.c **********************/\n/************** Begin file rtree.h *******************************************/\n/*\n** 2008 May 26\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This header file is used by programs that want to link against the\n** RTREE library.  All it does is declare the sqlite3RtreeInit() interface.\n*/\n/* #include \"sqlite3.h\" */\n\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n# undef SQLITE_ENABLE_RTREE\n#endif\n\n#if 0\nextern \"C\" {\n#endif  /* __cplusplus */\n\nSQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);\n\n#if 0\n}  /* extern \"C\" */\n#endif  /* __cplusplus */\n\n/************** End of rtree.h ***********************************************/\n/************** Continuing where we left off in main.c ***********************/\n#endif\n#if defined(SQLITE_ENABLE_ICU) || defined(SQLITE_ENABLE_ICU_COLLATIONS)\n/************** Include sqliteicu.h in the middle of main.c ******************/\n/************** Begin file sqliteicu.h ***************************************/\n/*\n** 2008 May 26\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This header file is used by programs that want to link against the\n** ICU extension.  All it does is declare the sqlite3IcuInit() interface.\n*/\n/* #include \"sqlite3.h\" */\n\n#if 0\nextern \"C\" {\n#endif  /* __cplusplus */\n\nSQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);\n\n#if 0\n}  /* extern \"C\" */\n#endif  /* __cplusplus */\n\n/************** End of sqliteicu.h *******************************************/\n/************** Continuing where we left off in main.c ***********************/\n#endif\n\n/*\n** This is an extension initializer that is a no-op and always\n** succeeds, except that it fails if the fault-simulation is set\n** to 500.\n*/\nstatic int sqlite3TestExtInit(sqlite3 *db){\n  (void)db;\n  return sqlite3FaultSim(500);\n}\n\n\n/*\n** Forward declarations of external module initializer functions\n** for modules that need them.\n*/\n#ifdef SQLITE_ENABLE_FTS5\nSQLITE_PRIVATE int sqlite3Fts5Init(sqlite3*);\n#endif\n#ifdef SQLITE_ENABLE_STMTVTAB\nSQLITE_PRIVATE int sqlite3StmtVtabInit(sqlite3*);\n#endif\n#ifdef SQLITE_EXTRA_AUTOEXT\nint SQLITE_EXTRA_AUTOEXT(sqlite3*);\n#endif\n/*\n** An array of pointers to extension initializer functions for\n** built-in extensions.\n*/\nstatic int (*const sqlite3BuiltinExtensions[])(sqlite3*) = {\n#ifdef SQLITE_ENABLE_FTS3\n  sqlite3Fts3Init,\n#endif\n#ifdef SQLITE_ENABLE_FTS5\n  sqlite3Fts5Init,\n#endif\n#if defined(SQLITE_ENABLE_ICU) || defined(SQLITE_ENABLE_ICU_COLLATIONS)\n  sqlite3IcuInit,\n#endif\n#ifdef SQLITE_ENABLE_RTREE\n  sqlite3RtreeInit,\n#endif\n#ifdef SQLITE_ENABLE_DBPAGE_VTAB\n  sqlite3DbpageRegister,\n#endif\n#ifdef SQLITE_ENABLE_DBSTAT_VTAB\n  sqlite3DbstatRegister,\n#endif\n  sqlite3TestExtInit,\n#ifdef SQLITE_ENABLE_STMTVTAB\n  sqlite3StmtVtabInit,\n#endif\n#ifdef SQLITE_ENABLE_BYTECODE_VTAB\n  sqlite3VdbeBytecodeVtabInit,\n#endif\n#ifdef SQLITE_EXTRA_AUTOEXT\n  SQLITE_EXTRA_AUTOEXT,\n#endif\n};\n\n#ifndef SQLITE_AMALGAMATION\n/* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant\n** contains the text of SQLITE_VERSION macro.\n*/\nSQLITE_API const char sqlite3_version[] = SQLITE_VERSION;\n#endif\n\n/* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns\n** a pointer to the to the sqlite3_version[] string constant.\n*/\nSQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }\n\n/* IMPLEMENTATION-OF: R-25063-23286 The sqlite3_sourceid() function returns a\n** pointer to a string constant whose value is the same as the\n** SQLITE_SOURCE_ID C preprocessor macro. Except if SQLite is built using\n** an edited copy of the amalgamation, then the last four characters of\n** the hash might be different from SQLITE_SOURCE_ID.\n*/\n/* SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } */\n\n/* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function\n** returns an integer equal to SQLITE_VERSION_NUMBER.\n*/\nSQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }\n\n/* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns\n** zero if and only if SQLite was compiled with mutexing code omitted due to\n** the SQLITE_THREADSAFE compile-time option being set to 0.\n*/\nSQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }\n\n/*\n** When compiling the test fixture or with debugging enabled (on Win32),\n** this variable being set to non-zero will cause OSTRACE macros to emit\n** extra diagnostic information.\n*/\n#ifdef SQLITE_HAVE_OS_TRACE\n# ifndef SQLITE_DEBUG_OS_TRACE\n#   define SQLITE_DEBUG_OS_TRACE 0\n# endif\n  int sqlite3OSTrace = SQLITE_DEBUG_OS_TRACE;\n#endif\n\n#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)\n/*\n** If the following function pointer is not NULL and if\n** SQLITE_ENABLE_IOTRACE is enabled, then messages describing\n** I/O active are written using this function.  These messages\n** are intended for debugging activity only.\n*/\nSQLITE_API void (SQLITE_CDECL *sqlite3IoTrace)(const char*, ...) = 0;\n#endif\n\n/*\n** If the following global variable points to a string which is the\n** name of a directory, then that directory will be used to store\n** temporary files.\n**\n** See also the \"PRAGMA temp_store_directory\" SQL command.\n*/\nSQLITE_API char *sqlite3_temp_directory = 0;\n\n/*\n** If the following global variable points to a string which is the\n** name of a directory, then that directory will be used to store\n** all database files specified with a relative pathname.\n**\n** See also the \"PRAGMA data_store_directory\" SQL command.\n*/\nSQLITE_API char *sqlite3_data_directory = 0;\n\n/*\n** Initialize SQLite.\n**\n** This routine must be called to initialize the memory allocation,\n** VFS, and mutex subsystems prior to doing any serious work with\n** SQLite.  But as long as you do not compile with SQLITE_OMIT_AUTOINIT\n** this routine will be called automatically by key routines such as\n** sqlite3_open().\n**\n** This routine is a no-op except on its very first call for the process,\n** or for the first call after a call to sqlite3_shutdown.\n**\n** The first thread to call this routine runs the initialization to\n** completion.  If subsequent threads call this routine before the first\n** thread has finished the initialization process, then the subsequent\n** threads must block until the first thread finishes with the initialization.\n**\n** The first thread might call this routine recursively.  Recursive\n** calls to this routine should not block, of course.  Otherwise the\n** initialization process would never complete.\n**\n** Let X be the first thread to enter this routine.  Let Y be some other\n** thread.  Then while the initial invocation of this routine by X is\n** incomplete, it is required that:\n**\n**    *  Calls to this routine from Y must block until the outer-most\n**       call by X completes.\n**\n**    *  Recursive calls to this routine from thread X return immediately\n**       without blocking.\n*/\nSQLITE_API int sqlite3_initialize(void){\n  MUTEX_LOGIC( sqlite3_mutex *pMainMtx; )      /* The main static mutex */\n  int rc;                                      /* Result code */\n#ifdef SQLITE_EXTRA_INIT\n  int bRunExtraInit = 0;                       /* Extra initialization needed */\n#endif\n\n#ifdef SQLITE_OMIT_WSD\n  rc = sqlite3_wsd_init(4096, 24);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n#endif\n\n  /* If the following assert() fails on some obscure processor/compiler\n  ** combination, the work-around is to set the correct pointer\n  ** size at compile-time using -DSQLITE_PTRSIZE=n compile-time option */\n  assert( SQLITE_PTRSIZE==sizeof(char*) );\n\n  /* If SQLite is already completely initialized, then this call\n  ** to sqlite3_initialize() should be a no-op.  But the initialization\n  ** must be complete.  So isInit must not be set until the very end\n  ** of this routine.\n  */\n  if( sqlite3GlobalConfig.isInit ){\n    sqlite3MemoryBarrier();\n    return SQLITE_OK;\n  }\n\n  /* Make sure the mutex subsystem is initialized.  If unable to\n  ** initialize the mutex subsystem, return early with the error.\n  ** If the system is so sick that we are unable to allocate a mutex,\n  ** there is not much SQLite is going to be able to do.\n  **\n  ** The mutex subsystem must take care of serializing its own\n  ** initialization.\n  */\n  rc = sqlite3MutexInit();\n  if( rc ) return rc;\n\n  /* Initialize the malloc() system and the recursive pInitMutex mutex.\n  ** This operation is protected by the STATIC_MAIN mutex.  Note that\n  ** MutexAlloc() is called for a static mutex prior to initializing the\n  ** malloc subsystem - this implies that the allocation of a static\n  ** mutex must not require support from the malloc subsystem.\n  */\n  MUTEX_LOGIC( pMainMtx = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN); )\n  sqlite3_mutex_enter(pMainMtx);\n  sqlite3GlobalConfig.isMutexInit = 1;\n  if( !sqlite3GlobalConfig.isMallocInit ){\n    rc = sqlite3MallocInit();\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3GlobalConfig.isMallocInit = 1;\n    if( !sqlite3GlobalConfig.pInitMutex ){\n      sqlite3GlobalConfig.pInitMutex =\n           sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);\n      if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){\n        rc = SQLITE_NOMEM_BKPT;\n      }\n    }\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3GlobalConfig.nRefInitMutex++;\n  }\n  sqlite3_mutex_leave(pMainMtx);\n\n  /* If rc is not SQLITE_OK at this point, then either the malloc\n  ** subsystem could not be initialized or the system failed to allocate\n  ** the pInitMutex mutex. Return an error in either case.  */\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  /* Do the rest of the initialization under the recursive mutex so\n  ** that we will be able to handle recursive calls into\n  ** sqlite3_initialize().  The recursive calls normally come through\n  ** sqlite3_os_init() when it invokes sqlite3_vfs_register(), but other\n  ** recursive calls might also be possible.\n  **\n  ** IMPLEMENTATION-OF: R-00140-37445 SQLite automatically serializes calls\n  ** to the xInit method, so the xInit method need not be threadsafe.\n  **\n  ** The following mutex is what serializes access to the appdef pcache xInit\n  ** methods.  The sqlite3_pcache_methods.xInit() all is embedded in the\n  ** call to sqlite3PcacheInitialize().\n  */\n  sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);\n  if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){\n    sqlite3GlobalConfig.inProgress = 1;\n#ifdef SQLITE_ENABLE_SQLLOG\n    {\n      extern void sqlite3_init_sqllog(void);\n      sqlite3_init_sqllog();\n    }\n#endif\n    memset(&sqlite3BuiltinFunctions, 0, sizeof(sqlite3BuiltinFunctions));\n    sqlite3RegisterBuiltinFunctions();\n    if( sqlite3GlobalConfig.isPCacheInit==0 ){\n      rc = sqlite3PcacheInitialize();\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3GlobalConfig.isPCacheInit = 1;\n      rc = sqlite3OsInit();\n    }\n#ifndef SQLITE_OMIT_DESERIALIZE\n    if( rc==SQLITE_OK ){\n      rc = sqlite3MemdbInit();\n    }\n#endif\n    if( rc==SQLITE_OK ){\n      sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage,\n          sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);\n#ifdef SQLITE_EXTRA_INIT_MUTEXED\n      {\n        int SQLITE_EXTRA_INIT_MUTEXED(const char*);\n        rc = SQLITE_EXTRA_INIT_MUTEXED(0);\n      }\n#endif\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3MemoryBarrier();\n      sqlite3GlobalConfig.isInit = 1;\n#ifdef SQLITE_EXTRA_INIT\n      bRunExtraInit = 1;\n#endif\n    }\n    sqlite3GlobalConfig.inProgress = 0;\n  }\n  sqlite3_mutex_leave(sqlite3GlobalConfig.pInitMutex);\n\n  /* Go back under the static mutex and clean up the recursive\n  ** mutex to prevent a resource leak.\n  */\n  sqlite3_mutex_enter(pMainMtx);\n  sqlite3GlobalConfig.nRefInitMutex--;\n  if( sqlite3GlobalConfig.nRefInitMutex<=0 ){\n    assert( sqlite3GlobalConfig.nRefInitMutex==0 );\n    sqlite3_mutex_free(sqlite3GlobalConfig.pInitMutex);\n    sqlite3GlobalConfig.pInitMutex = 0;\n  }\n  sqlite3_mutex_leave(pMainMtx);\n\n  /* The following is just a sanity check to make sure SQLite has\n  ** been compiled correctly.  It is important to run this code, but\n  ** we don't want to run it too often and soak up CPU cycles for no\n  ** reason.  So we run it once during initialization.\n  */\n#ifndef NDEBUG\n#ifndef SQLITE_OMIT_FLOATING_POINT\n  /* This section of code's only \"output\" is via assert() statements. */\n  if( rc==SQLITE_OK ){\n    u64 x = (((u64)1)<<63)-1;\n    double y;\n    assert(sizeof(x)==8);\n    assert(sizeof(x)==sizeof(y));\n    memcpy(&y, &x, 8);\n    assert( sqlite3IsNaN(y) );\n  }\n#endif\n#endif\n\n  /* Do extra initialization steps requested by the SQLITE_EXTRA_INIT\n  ** compile-time option.\n  */\n#ifdef SQLITE_EXTRA_INIT\n  if( bRunExtraInit ){\n    int SQLITE_EXTRA_INIT(const char*);\n    rc = SQLITE_EXTRA_INIT(0);\n  }\n#endif\n  return rc;\n}\n\n/*\n** Undo the effects of sqlite3_initialize().  Must not be called while\n** there are outstanding database connections or memory allocations or\n** while any part of SQLite is otherwise in use in any thread.  This\n** routine is not threadsafe.  But it is safe to invoke this routine\n** on when SQLite is already shut down.  If SQLite is already shut down\n** when this routine is invoked, then this routine is a harmless no-op.\n*/\nSQLITE_API int sqlite3_shutdown(void){\n#ifdef SQLITE_OMIT_WSD\n  int rc = sqlite3_wsd_init(4096, 24);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n#endif\n\n  if( sqlite3GlobalConfig.isInit ){\n#ifdef SQLITE_EXTRA_SHUTDOWN\n    void SQLITE_EXTRA_SHUTDOWN(void);\n    SQLITE_EXTRA_SHUTDOWN();\n#endif\n    sqlite3_os_end();\n    sqlite3_reset_auto_extension();\n    sqlite3GlobalConfig.isInit = 0;\n  }\n  if( sqlite3GlobalConfig.isPCacheInit ){\n    sqlite3PcacheShutdown();\n    sqlite3GlobalConfig.isPCacheInit = 0;\n  }\n  if( sqlite3GlobalConfig.isMallocInit ){\n    sqlite3MallocEnd();\n    sqlite3GlobalConfig.isMallocInit = 0;\n\n#ifndef SQLITE_OMIT_SHUTDOWN_DIRECTORIES\n    /* The heap subsystem has now been shutdown and these values are supposed\n    ** to be NULL or point to memory that was obtained from sqlite3_malloc(),\n    ** which would rely on that heap subsystem; therefore, make sure these\n    ** values cannot refer to heap memory that was just invalidated when the\n    ** heap subsystem was shutdown.  This is only done if the current call to\n    ** this function resulted in the heap subsystem actually being shutdown.\n    */\n    sqlite3_data_directory = 0;\n    sqlite3_temp_directory = 0;\n#endif\n  }\n  if( sqlite3GlobalConfig.isMutexInit ){\n    sqlite3MutexEnd();\n    sqlite3GlobalConfig.isMutexInit = 0;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** This API allows applications to modify the global configuration of\n** the SQLite library at run-time.\n**\n** This routine should only be called when there are no outstanding\n** database connections or memory allocations.  This routine is not\n** threadsafe.  Failure to heed these warnings can lead to unpredictable\n** behavior.\n*/\nSQLITE_API int sqlite3_config(int op, ...){\n  va_list ap;\n  int rc = SQLITE_OK;\n\n  /* sqlite3_config() normally returns SQLITE_MISUSE if it is invoked while\n  ** the SQLite library is in use.  Except, a few selected opcodes\n  ** are allowed.\n  */\n  if( sqlite3GlobalConfig.isInit ){\n    static const u64 mAnytimeConfigOption = 0\n       | MASKBIT64( SQLITE_CONFIG_LOG )\n       | MASKBIT64( SQLITE_CONFIG_PCACHE_HDRSZ )\n    ;\n    if( op<0 || op>63 || (MASKBIT64(op) & mAnytimeConfigOption)==0 ){\n      return SQLITE_MISUSE_BKPT;\n    }\n    testcase( op==SQLITE_CONFIG_LOG );\n    testcase( op==SQLITE_CONFIG_PCACHE_HDRSZ );\n  }\n\n  va_start(ap, op);\n  switch( op ){\n\n    /* Mutex configuration options are only available in a threadsafe\n    ** compile.\n    */\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0  /* IMP: R-54466-46756 */\n    case SQLITE_CONFIG_SINGLETHREAD: {\n      /* EVIDENCE-OF: R-02748-19096 This option sets the threading mode to\n      ** Single-thread. */\n      sqlite3GlobalConfig.bCoreMutex = 0;  /* Disable mutex on core */\n      sqlite3GlobalConfig.bFullMutex = 0;  /* Disable mutex on connections */\n      break;\n    }\n#endif\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-20520-54086 */\n    case SQLITE_CONFIG_MULTITHREAD: {\n      /* EVIDENCE-OF: R-14374-42468 This option sets the threading mode to\n      ** Multi-thread. */\n      sqlite3GlobalConfig.bCoreMutex = 1;  /* Enable mutex on core */\n      sqlite3GlobalConfig.bFullMutex = 0;  /* Disable mutex on connections */\n      break;\n    }\n#endif\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-59593-21810 */\n    case SQLITE_CONFIG_SERIALIZED: {\n      /* EVIDENCE-OF: R-41220-51800 This option sets the threading mode to\n      ** Serialized. */\n      sqlite3GlobalConfig.bCoreMutex = 1;  /* Enable mutex on core */\n      sqlite3GlobalConfig.bFullMutex = 1;  /* Enable mutex on connections */\n      break;\n    }\n#endif\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-63666-48755 */\n    case SQLITE_CONFIG_MUTEX: {\n      /* Specify an alternative mutex implementation */\n      sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);\n      break;\n    }\n#endif\n#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-14450-37597 */\n    case SQLITE_CONFIG_GETMUTEX: {\n      /* Retrieve the current mutex implementation */\n      *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;\n      break;\n    }\n#endif\n\n    case SQLITE_CONFIG_MALLOC: {\n      /* EVIDENCE-OF: R-55594-21030 The SQLITE_CONFIG_MALLOC option takes a\n      ** single argument which is a pointer to an instance of the\n      ** sqlite3_mem_methods structure. The argument specifies alternative\n      ** low-level memory allocation routines to be used in place of the memory\n      ** allocation routines built into SQLite. */\n      sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);\n      break;\n    }\n    case SQLITE_CONFIG_GETMALLOC: {\n      /* EVIDENCE-OF: R-51213-46414 The SQLITE_CONFIG_GETMALLOC option takes a\n      ** single argument which is a pointer to an instance of the\n      ** sqlite3_mem_methods structure. The sqlite3_mem_methods structure is\n      ** filled with the currently defined memory allocation routines. */\n      if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();\n      *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;\n      break;\n    }\n    case SQLITE_CONFIG_MEMSTATUS: {\n      assert( !sqlite3GlobalConfig.isInit );  /* Cannot change at runtime */\n      /* EVIDENCE-OF: R-61275-35157 The SQLITE_CONFIG_MEMSTATUS option takes\n      ** single argument of type int, interpreted as a boolean, which enables\n      ** or disables the collection of memory allocation statistics. */\n      sqlite3GlobalConfig.bMemstat = va_arg(ap, int);\n      break;\n    }\n    case SQLITE_CONFIG_SMALL_MALLOC: {\n      sqlite3GlobalConfig.bSmallMalloc = va_arg(ap, int);\n      break;\n    }\n    case SQLITE_CONFIG_PAGECACHE: {\n      /* EVIDENCE-OF: R-18761-36601 There are three arguments to\n      ** SQLITE_CONFIG_PAGECACHE: A pointer to 8-byte aligned memory (pMem),\n      ** the size of each page cache line (sz), and the number of cache lines\n      ** (N). */\n      sqlite3GlobalConfig.pPage = va_arg(ap, void*);\n      sqlite3GlobalConfig.szPage = va_arg(ap, int);\n      sqlite3GlobalConfig.nPage = va_arg(ap, int);\n      break;\n    }\n    case SQLITE_CONFIG_PCACHE_HDRSZ: {\n      /* EVIDENCE-OF: R-39100-27317 The SQLITE_CONFIG_PCACHE_HDRSZ option takes\n      ** a single parameter which is a pointer to an integer and writes into\n      ** that integer the number of extra bytes per page required for each page\n      ** in SQLITE_CONFIG_PAGECACHE. */\n      *va_arg(ap, int*) =\n          sqlite3HeaderSizeBtree() +\n          sqlite3HeaderSizePcache() +\n          sqlite3HeaderSizePcache1();\n      break;\n    }\n\n    case SQLITE_CONFIG_PCACHE: {\n      /* no-op */\n      break;\n    }\n    case SQLITE_CONFIG_GETPCACHE: {\n      /* now an error */\n      rc = SQLITE_ERROR;\n      break;\n    }\n\n    case SQLITE_CONFIG_PCACHE2: {\n      /* EVIDENCE-OF: R-63325-48378 The SQLITE_CONFIG_PCACHE2 option takes a\n      ** single argument which is a pointer to an sqlite3_pcache_methods2\n      ** object. This object specifies the interface to a custom page cache\n      ** implementation. */\n      sqlite3GlobalConfig.pcache2 = *va_arg(ap, sqlite3_pcache_methods2*);\n      break;\n    }\n    case SQLITE_CONFIG_GETPCACHE2: {\n      /* EVIDENCE-OF: R-22035-46182 The SQLITE_CONFIG_GETPCACHE2 option takes a\n      ** single argument which is a pointer to an sqlite3_pcache_methods2\n      ** object. SQLite copies of the current page cache implementation into\n      ** that object. */\n      if( sqlite3GlobalConfig.pcache2.xInit==0 ){\n        sqlite3PCacheSetDefault();\n      }\n      *va_arg(ap, sqlite3_pcache_methods2*) = sqlite3GlobalConfig.pcache2;\n      break;\n    }\n\n/* EVIDENCE-OF: R-06626-12911 The SQLITE_CONFIG_HEAP option is only\n** available if SQLite is compiled with either SQLITE_ENABLE_MEMSYS3 or\n** SQLITE_ENABLE_MEMSYS5 and returns SQLITE_ERROR if invoked otherwise. */\n#if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5)\n    case SQLITE_CONFIG_HEAP: {\n      /* EVIDENCE-OF: R-19854-42126 There are three arguments to\n      ** SQLITE_CONFIG_HEAP: An 8-byte aligned pointer to the memory, the\n      ** number of bytes in the memory buffer, and the minimum allocation size.\n      */\n      sqlite3GlobalConfig.pHeap = va_arg(ap, void*);\n      sqlite3GlobalConfig.nHeap = va_arg(ap, int);\n      sqlite3GlobalConfig.mnReq = va_arg(ap, int);\n\n      if( sqlite3GlobalConfig.mnReq<1 ){\n        sqlite3GlobalConfig.mnReq = 1;\n      }else if( sqlite3GlobalConfig.mnReq>(1<<12) ){\n        /* cap min request size at 2^12 */\n        sqlite3GlobalConfig.mnReq = (1<<12);\n      }\n\n      if( sqlite3GlobalConfig.pHeap==0 ){\n        /* EVIDENCE-OF: R-49920-60189 If the first pointer (the memory pointer)\n        ** is NULL, then SQLite reverts to using its default memory allocator\n        ** (the system malloc() implementation), undoing any prior invocation of\n        ** SQLITE_CONFIG_MALLOC.\n        **\n        ** Setting sqlite3GlobalConfig.m to all zeros will cause malloc to\n        ** revert to its default implementation when sqlite3_initialize() is run\n        */\n        memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));\n      }else{\n        /* EVIDENCE-OF: R-61006-08918 If the memory pointer is not NULL then the\n        ** alternative memory allocator is engaged to handle all of SQLites\n        ** memory allocation needs. */\n#ifdef SQLITE_ENABLE_MEMSYS3\n        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();\n#endif\n#ifdef SQLITE_ENABLE_MEMSYS5\n        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();\n#endif\n      }\n      break;\n    }\n#endif\n\n    case SQLITE_CONFIG_LOOKASIDE: {\n      sqlite3GlobalConfig.szLookaside = va_arg(ap, int);\n      sqlite3GlobalConfig.nLookaside = va_arg(ap, int);\n      break;\n    }\n\n    /* Record a pointer to the logger function and its first argument.\n    ** The default is NULL.  Logging is disabled if the function pointer is\n    ** NULL.\n    */\n    case SQLITE_CONFIG_LOG: {\n      /* MSVC is picky about pulling func ptrs from va lists.\n      ** http://support.microsoft.com/kb/47961\n      ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));\n      */\n      typedef void(*LOGFUNC_t)(void*,int,const char*);\n      LOGFUNC_t xLog = va_arg(ap, LOGFUNC_t);\n      void *pLogArg = va_arg(ap, void*);\n      AtomicStore(&sqlite3GlobalConfig.xLog, xLog);\n      AtomicStore(&sqlite3GlobalConfig.pLogArg, pLogArg);\n      break;\n    }\n\n    /* EVIDENCE-OF: R-55548-33817 The compile-time setting for URI filenames\n    ** can be changed at start-time using the\n    ** sqlite3_config(SQLITE_CONFIG_URI,1) or\n    ** sqlite3_config(SQLITE_CONFIG_URI,0) configuration calls.\n    */\n    case SQLITE_CONFIG_URI: {\n      /* EVIDENCE-OF: R-25451-61125 The SQLITE_CONFIG_URI option takes a single\n      ** argument of type int. If non-zero, then URI handling is globally\n      ** enabled. If the parameter is zero, then URI handling is globally\n      ** disabled. */\n      int bOpenUri = va_arg(ap, int);\n      AtomicStore(&sqlite3GlobalConfig.bOpenUri, bOpenUri);\n      break;\n    }\n\n    case SQLITE_CONFIG_COVERING_INDEX_SCAN: {\n      /* EVIDENCE-OF: R-36592-02772 The SQLITE_CONFIG_COVERING_INDEX_SCAN\n      ** option takes a single integer argument which is interpreted as a\n      ** boolean in order to enable or disable the use of covering indices for\n      ** full table scans in the query optimizer. */\n      sqlite3GlobalConfig.bUseCis = va_arg(ap, int);\n      break;\n    }\n\n#ifdef SQLITE_ENABLE_SQLLOG\n    case SQLITE_CONFIG_SQLLOG: {\n      typedef void(*SQLLOGFUNC_t)(void*, sqlite3*, const char*, int);\n      sqlite3GlobalConfig.xSqllog = va_arg(ap, SQLLOGFUNC_t);\n      sqlite3GlobalConfig.pSqllogArg = va_arg(ap, void *);\n      break;\n    }\n#endif\n\n    case SQLITE_CONFIG_MMAP_SIZE: {\n      /* EVIDENCE-OF: R-58063-38258 SQLITE_CONFIG_MMAP_SIZE takes two 64-bit\n      ** integer (sqlite3_int64) values that are the default mmap size limit\n      ** (the default setting for PRAGMA mmap_size) and the maximum allowed\n      ** mmap size limit. */\n      sqlite3_int64 szMmap = va_arg(ap, sqlite3_int64);\n      sqlite3_int64 mxMmap = va_arg(ap, sqlite3_int64);\n      /* EVIDENCE-OF: R-53367-43190 If either argument to this option is\n      ** negative, then that argument is changed to its compile-time default.\n      **\n      ** EVIDENCE-OF: R-34993-45031 The maximum allowed mmap size will be\n      ** silently truncated if necessary so that it does not exceed the\n      ** compile-time maximum mmap size set by the SQLITE_MAX_MMAP_SIZE\n      ** compile-time option.\n      */\n      if( mxMmap<0 || mxMmap>SQLITE_MAX_MMAP_SIZE ){\n        mxMmap = SQLITE_MAX_MMAP_SIZE;\n      }\n      if( szMmap<0 ) szMmap = SQLITE_DEFAULT_MMAP_SIZE;\n      if( szMmap>mxMmap) szMmap = mxMmap;\n      sqlite3GlobalConfig.mxMmap = mxMmap;\n      sqlite3GlobalConfig.szMmap = szMmap;\n      break;\n    }\n\n#if SQLITE_OS_WIN && defined(SQLITE_WIN32_MALLOC) /* IMP: R-04780-55815 */\n    case SQLITE_CONFIG_WIN32_HEAPSIZE: {\n      /* EVIDENCE-OF: R-34926-03360 SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit\n      ** unsigned integer value that specifies the maximum size of the created\n      ** heap. */\n      sqlite3GlobalConfig.nHeap = va_arg(ap, int);\n      break;\n    }\n#endif\n\n    case SQLITE_CONFIG_PMASZ: {\n      sqlite3GlobalConfig.szPma = va_arg(ap, unsigned int);\n      break;\n    }\n\n    case SQLITE_CONFIG_STMTJRNL_SPILL: {\n      sqlite3GlobalConfig.nStmtSpill = va_arg(ap, int);\n      break;\n    }\n\n#ifdef SQLITE_ENABLE_SORTER_REFERENCES\n    case SQLITE_CONFIG_SORTERREF_SIZE: {\n      int iVal = va_arg(ap, int);\n      if( iVal<0 ){\n        iVal = SQLITE_DEFAULT_SORTERREF_SIZE;\n      }\n      sqlite3GlobalConfig.szSorterRef = (u32)iVal;\n      break;\n    }\n#endif /* SQLITE_ENABLE_SORTER_REFERENCES */\n\n#ifndef SQLITE_OMIT_DESERIALIZE\n    case SQLITE_CONFIG_MEMDB_MAXSIZE: {\n      sqlite3GlobalConfig.mxMemdbSize = va_arg(ap, sqlite3_int64);\n      break;\n    }\n#endif /* SQLITE_OMIT_DESERIALIZE */\n\n    case SQLITE_CONFIG_ROWID_IN_VIEW: {\n      int *pVal = va_arg(ap,int*);\n#ifdef SQLITE_ALLOW_ROWID_IN_VIEW\n      if( 0==*pVal ) sqlite3GlobalConfig.mNoVisibleRowid = TF_NoVisibleRowid;\n      if( 1==*pVal ) sqlite3GlobalConfig.mNoVisibleRowid = 0;\n      *pVal = (sqlite3GlobalConfig.mNoVisibleRowid==0);\n#else\n      *pVal = 0;\n#endif\n      break;\n    }\n\n    default: {\n      rc = SQLITE_ERROR;\n      break;\n    }\n  }\n  va_end(ap);\n  return rc;\n}\n\n/*\n** Set up the lookaside buffers for a database connection.\n** Return SQLITE_OK on success.\n** If lookaside is already active, return SQLITE_BUSY.\n**\n** The sz parameter is the number of bytes in each lookaside slot.\n** The cnt parameter is the number of slots.  If pBuf is NULL the\n** space for the lookaside memory is obtained from sqlite3_malloc()\n** or similar.  If pBuf is not NULL then it is sz*cnt bytes of memory\n** to use for the lookaside memory.\n*/\nstatic int setupLookaside(\n  sqlite3 *db,    /* Database connection being configured */\n  void *pBuf,     /* Memory to use for lookaside.  May be NULL */\n  int sz,         /* Desired size of each lookaside memory slot */\n  int cnt         /* Number of slots to allocate */\n){\n#ifndef SQLITE_OMIT_LOOKASIDE\n  void *pStart;          /* Start of the lookaside buffer */\n  sqlite3_int64 szAlloc; /* Total space set aside for lookaside memory */\n  int nBig;              /* Number of full-size slots */\n  int nSm;               /* Number smaller LOOKASIDE_SMALL-byte slots */\n\n  if( sqlite3LookasideUsed(db,0)>0 ){\n    return SQLITE_BUSY;\n  }\n  /* Free any existing lookaside buffer for this handle before\n  ** allocating a new one so we don't have to have space for\n  ** both at the same time.\n  */\n  if( db->lookaside.bMalloced ){\n    sqlite3_free(db->lookaside.pStart);\n  }\n  /* The size of a lookaside slot after ROUNDDOWN8 needs to be larger\n  ** than a pointer and small enough to fit in a u16.\n  */\n  sz = ROUNDDOWN8(sz);\n  if( sz<=(int)sizeof(LookasideSlot*) ) sz = 0;\n  if( sz>65528 ) sz = 65528;\n  /* Count must be at least 1 to be useful, but not so large as to use\n  ** more than 0x7fff0000 total bytes for lookaside. */\n  if( cnt<1 ) cnt = 0;\n  if( sz>0 && cnt>(0x7fff0000/sz) ) cnt = 0x7fff0000/sz;\n  szAlloc = (i64)sz*(i64)cnt;\n  if( szAlloc==0 ){\n    sz = 0;\n    pStart = 0;\n  }else if( pBuf==0 ){\n    sqlite3BeginBenignMalloc();\n    pStart = sqlite3Malloc( szAlloc );\n    sqlite3EndBenignMalloc();\n    if( pStart ) szAlloc = sqlite3MallocSize(pStart);\n  }else{\n    pStart = pBuf;\n  }\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n  if( sz>=LOOKASIDE_SMALL*3 ){\n    nBig = szAlloc/(3*LOOKASIDE_SMALL+sz);\n    nSm = (szAlloc - (i64)sz*(i64)nBig)/LOOKASIDE_SMALL;\n  }else if( sz>=LOOKASIDE_SMALL*2 ){\n    nBig = szAlloc/(LOOKASIDE_SMALL+sz);\n    nSm = (szAlloc - (i64)sz*(i64)nBig)/LOOKASIDE_SMALL;\n  }else\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n  if( sz>0 ){\n    nBig = szAlloc/sz;\n    nSm = 0;\n  }else{\n    nBig = nSm = 0;\n  }\n  db->lookaside.pStart = pStart;\n  db->lookaside.pInit = 0;\n  db->lookaside.pFree = 0;\n  db->lookaside.sz = (u16)sz;\n  db->lookaside.szTrue = (u16)sz;\n  if( pStart ){\n    int i;\n    LookasideSlot *p;\n    assert( sz > (int)sizeof(LookasideSlot*) );\n    p = (LookasideSlot*)pStart;\n    for(i=0; i<nBig; i++){\n      p->pNext = db->lookaside.pInit;\n      db->lookaside.pInit = p;\n      p = (LookasideSlot*)&((u8*)p)[sz];\n    }\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n    db->lookaside.pSmallInit = 0;\n    db->lookaside.pSmallFree = 0;\n    db->lookaside.pMiddle = p;\n    for(i=0; i<nSm; i++){\n      p->pNext = db->lookaside.pSmallInit;\n      db->lookaside.pSmallInit = p;\n      p = (LookasideSlot*)&((u8*)p)[LOOKASIDE_SMALL];\n    }\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n    assert( ((uptr)p)<=szAlloc + (uptr)pStart );\n    db->lookaside.pEnd = p;\n    db->lookaside.bDisable = 0;\n    db->lookaside.bMalloced = pBuf==0 ?1:0;\n    db->lookaside.nSlot = nBig+nSm;\n  }else{\n    db->lookaside.pStart = 0;\n#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE\n    db->lookaside.pSmallInit = 0;\n    db->lookaside.pSmallFree = 0;\n    db->lookaside.pMiddle = 0;\n#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */\n    db->lookaside.pEnd = 0;\n    db->lookaside.bDisable = 1;\n    db->lookaside.sz = 0;\n    db->lookaside.bMalloced = 0;\n    db->lookaside.nSlot = 0;\n  }\n  db->lookaside.pTrueEnd = db->lookaside.pEnd;\n  assert( sqlite3LookasideUsed(db,0)==0 );\n#endif /* SQLITE_OMIT_LOOKASIDE */\n  return SQLITE_OK;\n}\n\n/*\n** Return the mutex associated with a database connection.\n*/\nSQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return db->mutex;\n}\n\n/*\n** Free up as much memory as we can from the given database\n** connection.\n*/\nSQLITE_API int sqlite3_db_release_memory(sqlite3 *db){\n  int i;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  sqlite3BtreeEnterAll(db);\n  for(i=0; i<db->nDb; i++){\n    Btree *pBt = db->aDb[i].pBt;\n    if( pBt ){\n      Pager *pPager = sqlite3BtreePager(pBt);\n      sqlite3PagerShrink(pPager);\n    }\n  }\n  sqlite3BtreeLeaveAll(db);\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n/*\n** Flush any dirty pages in the pager-cache for any attached database\n** to disk.\n*/\nSQLITE_API int sqlite3_db_cacheflush(sqlite3 *db){\n  int i;\n  int rc = SQLITE_OK;\n  int bSeenBusy = 0;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  sqlite3BtreeEnterAll(db);\n  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n    Btree *pBt = db->aDb[i].pBt;\n    if( pBt && sqlite3BtreeTxnState(pBt)==SQLITE_TXN_WRITE ){\n      Pager *pPager = sqlite3BtreePager(pBt);\n      rc = sqlite3PagerFlush(pPager);\n      if( rc==SQLITE_BUSY ){\n        bSeenBusy = 1;\n        rc = SQLITE_OK;\n      }\n    }\n  }\n  sqlite3BtreeLeaveAll(db);\n  sqlite3_mutex_leave(db->mutex);\n  return ((rc==SQLITE_OK && bSeenBusy) ? SQLITE_BUSY : rc);\n}\n\n/*\n** Configuration settings for an individual database connection\n*/\nSQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){\n  va_list ap;\n  int rc;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  va_start(ap, op);\n  switch( op ){\n    case SQLITE_DBCONFIG_MAINDBNAME: {\n      /* IMP: R-06824-28531 */\n      /* IMP: R-36257-52125 */\n      db->aDb[0].zDbSName = va_arg(ap,char*);\n      rc = SQLITE_OK;\n      break;\n    }\n    case SQLITE_DBCONFIG_LOOKASIDE: {\n      void *pBuf = va_arg(ap, void*); /* IMP: R-26835-10964 */\n      int sz = va_arg(ap, int);       /* IMP: R-47871-25994 */\n      int cnt = va_arg(ap, int);      /* IMP: R-04460-53386 */\n      rc = setupLookaside(db, pBuf, sz, cnt);\n      break;\n    }\n    default: {\n      static const struct {\n        int op;      /* The opcode */\n        u64 mask;    /* Mask of the bit in sqlite3.flags to set/clear */\n      } aFlagOp[] = {\n        { SQLITE_DBCONFIG_ENABLE_FKEY,           SQLITE_ForeignKeys    },\n        { SQLITE_DBCONFIG_ENABLE_TRIGGER,        SQLITE_EnableTrigger  },\n        { SQLITE_DBCONFIG_ENABLE_VIEW,           SQLITE_EnableView     },\n        { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer  },\n        { SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SQLITE_LoadExtension  },\n        { SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE,      SQLITE_NoCkptOnClose  },\n        { SQLITE_DBCONFIG_ENABLE_QPSG,           SQLITE_EnableQPSG     },\n        { SQLITE_DBCONFIG_TRIGGER_EQP,           SQLITE_TriggerEQP     },\n        { SQLITE_DBCONFIG_RESET_DATABASE,        SQLITE_ResetDatabase  },\n        { SQLITE_DBCONFIG_DEFENSIVE,             SQLITE_Defensive      },\n        { SQLITE_DBCONFIG_WRITABLE_SCHEMA,       SQLITE_WriteSchema|\n                                                 SQLITE_NoSchemaError  },\n        { SQLITE_DBCONFIG_LEGACY_ALTER_TABLE,    SQLITE_LegacyAlter    },\n        { SQLITE_DBCONFIG_DQS_DDL,               SQLITE_DqsDDL         },\n        { SQLITE_DBCONFIG_DQS_DML,               SQLITE_DqsDML         },\n        { SQLITE_DBCONFIG_LEGACY_FILE_FORMAT,    SQLITE_LegacyFileFmt  },\n        { SQLITE_DBCONFIG_TRUSTED_SCHEMA,        SQLITE_TrustedSchema  },\n        { SQLITE_DBCONFIG_STMT_SCANSTATUS,       SQLITE_StmtScanStatus },\n        { SQLITE_DBCONFIG_REVERSE_SCANORDER,     SQLITE_ReverseOrder   },\n        { SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE,  SQLITE_AttachCreate   },\n        { SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE,   SQLITE_AttachWrite    },\n        { SQLITE_DBCONFIG_ENABLE_COMMENTS,       SQLITE_Comments       },\n      };\n      unsigned int i;\n      rc = SQLITE_ERROR; /* IMP: R-42790-23372 */\n      for(i=0; i<ArraySize(aFlagOp); i++){\n        if( aFlagOp[i].op==op ){\n          int onoff = va_arg(ap, int);\n          int *pRes = va_arg(ap, int*);\n          u64 oldFlags = db->flags;\n          if( onoff>0 ){\n            db->flags |= aFlagOp[i].mask;\n          }else if( onoff==0 ){\n            db->flags &= ~(u64)aFlagOp[i].mask;\n          }\n          if( oldFlags!=db->flags ){\n            sqlite3ExpirePreparedStatements(db, 0);\n          }\n          if( pRes ){\n            *pRes = (db->flags & aFlagOp[i].mask)!=0;\n          }\n          rc = SQLITE_OK;\n          break;\n        }\n      }\n      break;\n    }\n  }\n  va_end(ap);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** This is the default collating function named \"BINARY\" which is always\n** available.\n*/\nstatic int binCollFunc(\n  void *NotUsed,\n  int nKey1, const void *pKey1,\n  int nKey2, const void *pKey2\n){\n  int rc, n;\n  UNUSED_PARAMETER(NotUsed);\n  n = nKey1<nKey2 ? nKey1 : nKey2;\n  /* EVIDENCE-OF: R-65033-28449 The built-in BINARY collation compares\n  ** strings byte by byte using the memcmp() function from the standard C\n  ** library. */\n  assert( pKey1 && pKey2 );\n  rc = memcmp(pKey1, pKey2, n);\n  if( rc==0 ){\n    rc = nKey1 - nKey2;\n  }\n  return rc;\n}\n\n/*\n** This is the collating function named \"RTRIM\" which is always\n** available.  Ignore trailing spaces.\n*/\nstatic int rtrimCollFunc(\n  void *pUser,\n  int nKey1, const void *pKey1,\n  int nKey2, const void *pKey2\n){\n  const u8 *pK1 = (const u8*)pKey1;\n  const u8 *pK2 = (const u8*)pKey2;\n  while( nKey1 && pK1[nKey1-1]==' ' ) nKey1--;\n  while( nKey2 && pK2[nKey2-1]==' ' ) nKey2--;\n  return binCollFunc(pUser, nKey1, pKey1, nKey2, pKey2);\n}\n\n/*\n** Return true if CollSeq is the default built-in BINARY.\n*/\nSQLITE_PRIVATE int sqlite3IsBinary(const CollSeq *p){\n  assert( p==0 || p->xCmp!=binCollFunc || strcmp(p->zName,\"BINARY\")==0 );\n  return p==0 || p->xCmp==binCollFunc;\n}\n\n/*\n** Another built-in collating sequence: NOCASE.\n**\n** This collating sequence is intended to be used for \"case independent\n** comparison\". SQLite's knowledge of upper and lower case equivalents\n** extends only to the 26 characters used in the English language.\n**\n** At the moment there is only a UTF-8 implementation.\n*/\nstatic int nocaseCollatingFunc(\n  void *NotUsed,\n  int nKey1, const void *pKey1,\n  int nKey2, const void *pKey2\n){\n  int r = sqlite3StrNICmp(\n      (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2);\n  UNUSED_PARAMETER(NotUsed);\n  if( 0==r ){\n    r = nKey1-nKey2;\n  }\n  return r;\n}\n\n/*\n** Return the ROWID of the most recent insert\n*/\nSQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return db->lastRowid;\n}\n\n/*\n** Set the value returned by the sqlite3_last_insert_rowid() API function.\n*/\nSQLITE_API void sqlite3_set_last_insert_rowid(sqlite3 *db, sqlite3_int64 iRowid){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->lastRowid = iRowid;\n  sqlite3_mutex_leave(db->mutex);\n}\n\n/*\n** Return the number of changes in the most recent call to sqlite3_exec().\n*/\nSQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return db->nChange;\n}\nSQLITE_API int sqlite3_changes(sqlite3 *db){\n  return (int)sqlite3_changes64(db);\n}\n\n/*\n** Return the number of changes since the database handle was opened.\n*/\nSQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return db->nTotalChange;\n}\nSQLITE_API int sqlite3_total_changes(sqlite3 *db){\n  return (int)sqlite3_total_changes64(db);\n}\n\n/*\n** Close all open savepoints. This function only manipulates fields of the\n** database handle object, it does not close any savepoints that may be open\n** at the b-tree/pager level.\n*/\nSQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){\n  while( db->pSavepoint ){\n    Savepoint *pTmp = db->pSavepoint;\n    db->pSavepoint = pTmp->pNext;\n    sqlite3DbFree(db, pTmp);\n  }\n  db->nSavepoint = 0;\n  db->nStatement = 0;\n  db->isTransactionSavepoint = 0;\n}\n\n/*\n** Invoke the destructor function associated with FuncDef p, if any. Except,\n** if this is not the last copy of the function, do not invoke it. Multiple\n** copies of a single function are created when create_function() is called\n** with SQLITE_ANY as the encoding.\n*/\nstatic void functionDestroy(sqlite3 *db, FuncDef *p){\n  FuncDestructor *pDestructor;\n  assert( (p->funcFlags & SQLITE_FUNC_BUILTIN)==0 );\n  pDestructor = p->u.pDestructor;\n  if( pDestructor ){\n    pDestructor->nRef--;\n    if( pDestructor->nRef==0 ){\n      pDestructor->xDestroy(pDestructor->pUserData);\n      sqlite3DbFree(db, pDestructor);\n    }\n  }\n}\n\n/*\n** Disconnect all sqlite3_vtab objects that belong to database connection\n** db. This is called when db is being closed.\n*/\nstatic void disconnectAllVtab(sqlite3 *db){\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  int i;\n  HashElem *p;\n  sqlite3BtreeEnterAll(db);\n  for(i=0; i<db->nDb; i++){\n    Schema *pSchema = db->aDb[i].pSchema;\n    if( pSchema ){\n      for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){\n        Table *pTab = (Table *)sqliteHashData(p);\n        if( IsVirtual(pTab) ) sqlite3VtabDisconnect(db, pTab);\n      }\n    }\n  }\n  for(p=sqliteHashFirst(&db->aModule); p; p=sqliteHashNext(p)){\n    Module *pMod = (Module *)sqliteHashData(p);\n    if( pMod->pEpoTab ){\n      sqlite3VtabDisconnect(db, pMod->pEpoTab);\n    }\n  }\n  sqlite3VtabUnlockList(db);\n  sqlite3BtreeLeaveAll(db);\n#else\n  UNUSED_PARAMETER(db);\n#endif\n}\n\n/*\n** Return TRUE if database connection db has unfinalized prepared\n** statements or unfinished sqlite3_backup objects.\n*/\nstatic int connectionIsBusy(sqlite3 *db){\n  int j;\n  assert( sqlite3_mutex_held(db->mutex) );\n  if( db->pVdbe ) return 1;\n  for(j=0; j<db->nDb; j++){\n    Btree *pBt = db->aDb[j].pBt;\n    if( pBt && sqlite3BtreeIsInBackup(pBt) ) return 1;\n  }\n  return 0;\n}\n\n/*\n** Close an existing SQLite database\n*/\nstatic int sqlite3Close(sqlite3 *db, int forceZombie){\n  if( !db ){\n    /* EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or\n    ** sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. */\n    return SQLITE_OK;\n  }\n  if( !sqlite3SafetyCheckSickOrOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  sqlite3_mutex_enter(db->mutex);\n  if( db->mTrace & SQLITE_TRACE_CLOSE ){\n    db->trace.xV2(SQLITE_TRACE_CLOSE, db->pTraceArg, db, 0);\n  }\n\n  /* Force xDisconnect calls on all virtual tables */\n  disconnectAllVtab(db);\n\n  /* If a transaction is open, the disconnectAllVtab() call above\n  ** will not have called the xDisconnect() method on any virtual\n  ** tables in the db->aVTrans[] array. The following sqlite3VtabRollback()\n  ** call will do so. We need to do this before the check for active\n  ** SQL statements below, as the v-table implementation may be storing\n  ** some prepared statements internally.\n  */\n  sqlite3VtabRollback(db);\n\n  /* Legacy behavior (sqlite3_close() behavior) is to return\n  ** SQLITE_BUSY if the connection can not be closed immediately.\n  */\n  if( !forceZombie && connectionIsBusy(db) ){\n    sqlite3ErrorWithMsg(db, SQLITE_BUSY, \"unable to close due to unfinalized \"\n       \"statements or unfinished backups\");\n    sqlite3_mutex_leave(db->mutex);\n    return SQLITE_BUSY;\n  }\n\n#ifdef SQLITE_ENABLE_SQLLOG\n  if( sqlite3GlobalConfig.xSqllog ){\n    /* Closing the handle. Fourth parameter is passed the value 2. */\n    sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 2);\n  }\n#endif\n\n  while( db->pDbData ){\n    DbClientData *p = db->pDbData;\n    db->pDbData = p->pNext;\n    assert( p->pData!=0 );\n    if( p->xDestructor ) p->xDestructor(p->pData);\n    sqlite3_free(p);\n  }\n\n  /* Convert the connection into a zombie and then close it.\n  */\n  db->eOpenState = SQLITE_STATE_ZOMBIE;\n  sqlite3LeaveMutexAndCloseZombie(db);\n  return SQLITE_OK;\n}\n\n/*\n** Return the transaction state for a single databse, or the maximum\n** transaction state over all attached databases if zSchema is null.\n*/\nSQLITE_API int sqlite3_txn_state(sqlite3 *db, const char *zSchema){\n  int iDb, nDb;\n  int iTxn = -1;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return -1;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( zSchema ){\n    nDb = iDb = sqlite3FindDbName(db, zSchema);\n    if( iDb<0 ) nDb--;\n  }else{\n    iDb = 0;\n    nDb = db->nDb-1;\n  }\n  for(; iDb<=nDb; iDb++){\n    Btree *pBt = db->aDb[iDb].pBt;\n    int x = pBt!=0 ? sqlite3BtreeTxnState(pBt) : SQLITE_TXN_NONE;\n    if( x>iTxn ) iTxn = x;\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return iTxn;\n}\n\n/*\n** Two variations on the public interface for closing a database\n** connection. The sqlite3_close() version returns SQLITE_BUSY and\n** leaves the connection open if there are unfinalized prepared\n** statements or unfinished sqlite3_backups.  The sqlite3_close_v2()\n** version forces the connection to become a zombie if there are\n** unclosed resources, and arranges for deallocation when the last\n** prepare statement or sqlite3_backup closes.\n*/\nSQLITE_API int sqlite3_close(sqlite3 *db){ return sqlite3Close(db,0); }\nSQLITE_API int sqlite3_close_v2(sqlite3 *db){ return sqlite3Close(db,1); }\n\n\n/*\n** Close the mutex on database connection db.\n**\n** Furthermore, if database connection db is a zombie (meaning that there\n** has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and\n** every sqlite3_stmt has now been finalized and every sqlite3_backup has\n** finished, then free all resources.\n*/\nSQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){\n  HashElem *i;                    /* Hash table iterator */\n  int j;\n\n  /* If there are outstanding sqlite3_stmt or sqlite3_backup objects\n  ** or if the connection has not yet been closed by sqlite3_close_v2(),\n  ** then just leave the mutex and return.\n  */\n  if( db->eOpenState!=SQLITE_STATE_ZOMBIE || connectionIsBusy(db) ){\n    sqlite3_mutex_leave(db->mutex);\n    return;\n  }\n\n  /* If we reach this point, it means that the database connection has\n  ** closed all sqlite3_stmt and sqlite3_backup objects and has been\n  ** passed to sqlite3_close (meaning that it is a zombie).  Therefore,\n  ** go ahead and free all resources.\n  */\n\n  /* If a transaction is open, roll it back. This also ensures that if\n  ** any database schemas have been modified by an uncommitted transaction\n  ** they are reset. And that the required b-tree mutex is held to make\n  ** the pager rollback and schema reset an atomic operation. */\n  sqlite3RollbackAll(db, SQLITE_OK);\n\n  /* Free any outstanding Savepoint structures. */\n  sqlite3CloseSavepoints(db);\n\n  /* Close all database connections */\n  for(j=0; j<db->nDb; j++){\n    struct Db *pDb = &db->aDb[j];\n    if( pDb->pBt ){\n      sqlite3BtreeClose(pDb->pBt);\n      pDb->pBt = 0;\n      if( j!=1 ){\n        pDb->pSchema = 0;\n      }\n    }\n  }\n  /* Clear the TEMP schema separately and last */\n  if( db->aDb[1].pSchema ){\n    sqlite3SchemaClear(db->aDb[1].pSchema);\n    assert( db->aDb[1].pSchema->trigHash.count==0 );\n  }\n  sqlite3VtabUnlockList(db);\n\n  /* Free up the array of auxiliary databases */\n  sqlite3CollapseDatabaseArray(db);\n  assert( db->nDb<=2 );\n  assert( db->aDb==db->aDbStatic );\n\n  /* Tell the code in notify.c that the connection no longer holds any\n  ** locks and does not require any further unlock-notify callbacks.\n  */\n  sqlite3ConnectionClosed(db);\n\n  for(i=sqliteHashFirst(&db->aFunc); i; i=sqliteHashNext(i)){\n    FuncDef *pNext, *p;\n    p = sqliteHashData(i);\n    do{\n      functionDestroy(db, p);\n      pNext = p->pNext;\n      sqlite3DbFree(db, p);\n      p = pNext;\n    }while( p );\n  }\n  sqlite3HashClear(&db->aFunc);\n  for(i=sqliteHashFirst(&db->aCollSeq); i; i=sqliteHashNext(i)){\n    CollSeq *pColl = (CollSeq *)sqliteHashData(i);\n    /* Invoke any destructors registered for collation sequence user data. */\n    for(j=0; j<3; j++){\n      if( pColl[j].xDel ){\n        pColl[j].xDel(pColl[j].pUser);\n      }\n    }\n    sqlite3DbFree(db, pColl);\n  }\n  sqlite3HashClear(&db->aCollSeq);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  for(i=sqliteHashFirst(&db->aModule); i; i=sqliteHashNext(i)){\n    Module *pMod = (Module *)sqliteHashData(i);\n    sqlite3VtabEponymousTableClear(db, pMod);\n    sqlite3VtabModuleUnref(db, pMod);\n  }\n  sqlite3HashClear(&db->aModule);\n#endif\n\n  sqlite3Error(db, SQLITE_OK); /* Deallocates any cached error strings. */\n  sqlite3ValueFree(db->pErr);\n  sqlite3CloseExtensions(db);\n\n  db->eOpenState = SQLITE_STATE_ERROR;\n\n  /* The temp-database schema is allocated differently from the other schema\n  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).\n  ** So it needs to be freed here. Todo: Why not roll the temp schema into\n  ** the same sqliteMalloc() as the one that allocates the database\n  ** structure?\n  */\n  sqlite3DbFree(db, db->aDb[1].pSchema);\n  if( db->xAutovacDestr ){\n    db->xAutovacDestr(db->pAutovacPagesArg);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  db->eOpenState = SQLITE_STATE_CLOSED;\n  sqlite3_mutex_free(db->mutex);\n  assert( sqlite3LookasideUsed(db,0)==0 );\n  if( db->lookaside.bMalloced ){\n    sqlite3_free(db->lookaside.pStart);\n  }\n  sqlite3_free(db);\n}\n\n/*\n** Rollback all database files.  If tripCode is not SQLITE_OK, then\n** any write cursors are invalidated (\"tripped\" - as in \"tripping a circuit\n** breaker\") and made to return tripCode if there are any further\n** attempts to use that cursor.  Read cursors remain open and valid\n** but are \"saved\" in case the table pages are moved around.\n*/\nSQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){\n  int i;\n  int inTrans = 0;\n  int schemaChange;\n  assert( sqlite3_mutex_held(db->mutex) );\n  sqlite3BeginBenignMalloc();\n\n  /* Obtain all b-tree mutexes before making any calls to BtreeRollback().\n  ** This is important in case the transaction being rolled back has\n  ** modified the database schema. If the b-tree mutexes are not taken\n  ** here, then another shared-cache connection might sneak in between\n  ** the database rollback and schema reset, which can cause false\n  ** corruption reports in some cases.  */\n  sqlite3BtreeEnterAll(db);\n  schemaChange = (db->mDbFlags & DBFLAG_SchemaChange)!=0 && db->init.busy==0;\n\n  for(i=0; i<db->nDb; i++){\n    Btree *p = db->aDb[i].pBt;\n    if( p ){\n      if( sqlite3BtreeTxnState(p)==SQLITE_TXN_WRITE ){\n        inTrans = 1;\n      }\n      sqlite3BtreeRollback(p, tripCode, !schemaChange);\n    }\n  }\n  sqlite3VtabRollback(db);\n  sqlite3EndBenignMalloc();\n\n  if( schemaChange ){\n    sqlite3ExpirePreparedStatements(db, 0);\n    sqlite3ResetAllSchemasOfConnection(db);\n  }\n  sqlite3BtreeLeaveAll(db);\n\n  /* Any deferred constraint violations have now been resolved. */\n  db->nDeferredCons = 0;\n  db->nDeferredImmCons = 0;\n  db->flags &= ~(u64)(SQLITE_DeferFKs|SQLITE_CorruptRdOnly);\n\n  /* If one has been configured, invoke the rollback-hook callback */\n  if( db->xRollbackCallback && (inTrans || !db->autoCommit) ){\n    db->xRollbackCallback(db->pRollbackArg);\n  }\n}\n\n/*\n** Return a static string containing the name corresponding to the error code\n** specified in the argument.\n*/\n#if defined(SQLITE_NEED_ERR_NAME)\nSQLITE_PRIVATE const char *sqlite3ErrName(int rc){\n  const char *zName = 0;\n  int i, origRc = rc;\n  for(i=0; i<2 && zName==0; i++, rc &= 0xff){\n    switch( rc ){\n      case SQLITE_OK:                 zName = \"SQLITE_OK\";                break;\n      case SQLITE_ERROR:              zName = \"SQLITE_ERROR\";             break;\n      case SQLITE_ERROR_SNAPSHOT:     zName = \"SQLITE_ERROR_SNAPSHOT\";    break;\n      case SQLITE_ERROR_RETRY:        zName = \"SQLITE_ERROR_RETRY\";       break;\n      case SQLITE_ERROR_MISSING_COLLSEQ:\n                                zName = \"SQLITE_ERROR_MISSING_COLLSEQ\";   break;\n      case SQLITE_INTERNAL:           zName = \"SQLITE_INTERNAL\";          break;\n      case SQLITE_PERM:               zName = \"SQLITE_PERM\";              break;\n      case SQLITE_ABORT:              zName = \"SQLITE_ABORT\";             break;\n      case SQLITE_ABORT_ROLLBACK:     zName = \"SQLITE_ABORT_ROLLBACK\";    break;\n      case SQLITE_BUSY:               zName = \"SQLITE_BUSY\";              break;\n      case SQLITE_BUSY_RECOVERY:      zName = \"SQLITE_BUSY_RECOVERY\";     break;\n      case SQLITE_BUSY_SNAPSHOT:      zName = \"SQLITE_BUSY_SNAPSHOT\";     break;\n      case SQLITE_LOCKED:             zName = \"SQLITE_LOCKED\";            break;\n      case SQLITE_LOCKED_SHAREDCACHE: zName = \"SQLITE_LOCKED_SHAREDCACHE\";break;\n      case SQLITE_NOMEM:              zName = \"SQLITE_NOMEM\";             break;\n      case SQLITE_READONLY:           zName = \"SQLITE_READONLY\";          break;\n      case SQLITE_READONLY_RECOVERY:  zName = \"SQLITE_READONLY_RECOVERY\"; break;\n      case SQLITE_READONLY_CANTINIT:  zName = \"SQLITE_READONLY_CANTINIT\"; break;\n      case SQLITE_READONLY_ROLLBACK:  zName = \"SQLITE_READONLY_ROLLBACK\"; break;\n      case SQLITE_READONLY_DBMOVED:   zName = \"SQLITE_READONLY_DBMOVED\";  break;\n      case SQLITE_READONLY_DIRECTORY: zName = \"SQLITE_READONLY_DIRECTORY\";break;\n      case SQLITE_INTERRUPT:          zName = \"SQLITE_INTERRUPT\";         break;\n      case SQLITE_IOERR:              zName = \"SQLITE_IOERR\";             break;\n      case SQLITE_IOERR_READ:         zName = \"SQLITE_IOERR_READ\";        break;\n      case SQLITE_IOERR_SHORT_READ:   zName = \"SQLITE_IOERR_SHORT_READ\";  break;\n      case SQLITE_IOERR_WRITE:        zName = \"SQLITE_IOERR_WRITE\";       break;\n      case SQLITE_IOERR_FSYNC:        zName = \"SQLITE_IOERR_FSYNC\";       break;\n      case SQLITE_IOERR_DIR_FSYNC:    zName = \"SQLITE_IOERR_DIR_FSYNC\";   break;\n      case SQLITE_IOERR_TRUNCATE:     zName = \"SQLITE_IOERR_TRUNCATE\";    break;\n      case SQLITE_IOERR_FSTAT:        zName = \"SQLITE_IOERR_FSTAT\";       break;\n      case SQLITE_IOERR_UNLOCK:       zName = \"SQLITE_IOERR_UNLOCK\";      break;\n      case SQLITE_IOERR_RDLOCK:       zName = \"SQLITE_IOERR_RDLOCK\";      break;\n      case SQLITE_IOERR_DELETE:       zName = \"SQLITE_IOERR_DELETE\";      break;\n      case SQLITE_IOERR_NOMEM:        zName = \"SQLITE_IOERR_NOMEM\";       break;\n      case SQLITE_IOERR_ACCESS:       zName = \"SQLITE_IOERR_ACCESS\";      break;\n      case SQLITE_IOERR_CHECKRESERVEDLOCK:\n                                zName = \"SQLITE_IOERR_CHECKRESERVEDLOCK\"; break;\n      case SQLITE_IOERR_LOCK:         zName = \"SQLITE_IOERR_LOCK\";        break;\n      case SQLITE_IOERR_CLOSE:        zName = \"SQLITE_IOERR_CLOSE\";       break;\n      case SQLITE_IOERR_DIR_CLOSE:    zName = \"SQLITE_IOERR_DIR_CLOSE\";   break;\n      case SQLITE_IOERR_SHMOPEN:      zName = \"SQLITE_IOERR_SHMOPEN\";     break;\n      case SQLITE_IOERR_SHMSIZE:      zName = \"SQLITE_IOERR_SHMSIZE\";     break;\n      case SQLITE_IOERR_SHMLOCK:      zName = \"SQLITE_IOERR_SHMLOCK\";     break;\n      case SQLITE_IOERR_SHMMAP:       zName = \"SQLITE_IOERR_SHMMAP\";      break;\n      case SQLITE_IOERR_SEEK:         zName = \"SQLITE_IOERR_SEEK\";        break;\n      case SQLITE_IOERR_DELETE_NOENT: zName = \"SQLITE_IOERR_DELETE_NOENT\";break;\n      case SQLITE_IOERR_MMAP:         zName = \"SQLITE_IOERR_MMAP\";        break;\n      case SQLITE_IOERR_GETTEMPPATH:  zName = \"SQLITE_IOERR_GETTEMPPATH\"; break;\n      case SQLITE_IOERR_CONVPATH:     zName = \"SQLITE_IOERR_CONVPATH\";    break;\n      case SQLITE_CORRUPT:            zName = \"SQLITE_CORRUPT\";           break;\n      case SQLITE_CORRUPT_VTAB:       zName = \"SQLITE_CORRUPT_VTAB\";      break;\n      case SQLITE_NOTFOUND:           zName = \"SQLITE_NOTFOUND\";          break;\n      case SQLITE_FULL:               zName = \"SQLITE_FULL\";              break;\n      case SQLITE_CANTOPEN:           zName = \"SQLITE_CANTOPEN\";          break;\n      case SQLITE_CANTOPEN_NOTEMPDIR: zName = \"SQLITE_CANTOPEN_NOTEMPDIR\";break;\n      case SQLITE_CANTOPEN_ISDIR:     zName = \"SQLITE_CANTOPEN_ISDIR\";    break;\n      case SQLITE_CANTOPEN_FULLPATH:  zName = \"SQLITE_CANTOPEN_FULLPATH\"; break;\n      case SQLITE_CANTOPEN_CONVPATH:  zName = \"SQLITE_CANTOPEN_CONVPATH\"; break;\n      case SQLITE_CANTOPEN_SYMLINK:   zName = \"SQLITE_CANTOPEN_SYMLINK\";  break;\n      case SQLITE_PROTOCOL:           zName = \"SQLITE_PROTOCOL\";          break;\n      case SQLITE_EMPTY:              zName = \"SQLITE_EMPTY\";             break;\n      case SQLITE_SCHEMA:             zName = \"SQLITE_SCHEMA\";            break;\n      case SQLITE_TOOBIG:             zName = \"SQLITE_TOOBIG\";            break;\n      case SQLITE_CONSTRAINT:         zName = \"SQLITE_CONSTRAINT\";        break;\n      case SQLITE_CONSTRAINT_UNIQUE:  zName = \"SQLITE_CONSTRAINT_UNIQUE\"; break;\n      case SQLITE_CONSTRAINT_TRIGGER: zName = \"SQLITE_CONSTRAINT_TRIGGER\";break;\n      case SQLITE_CONSTRAINT_FOREIGNKEY:\n                                zName = \"SQLITE_CONSTRAINT_FOREIGNKEY\";   break;\n      case SQLITE_CONSTRAINT_CHECK:   zName = \"SQLITE_CONSTRAINT_CHECK\";  break;\n      case SQLITE_CONSTRAINT_PRIMARYKEY:\n                                zName = \"SQLITE_CONSTRAINT_PRIMARYKEY\";   break;\n      case SQLITE_CONSTRAINT_NOTNULL: zName = \"SQLITE_CONSTRAINT_NOTNULL\";break;\n      case SQLITE_CONSTRAINT_COMMITHOOK:\n                                zName = \"SQLITE_CONSTRAINT_COMMITHOOK\";   break;\n      case SQLITE_CONSTRAINT_VTAB:    zName = \"SQLITE_CONSTRAINT_VTAB\";   break;\n      case SQLITE_CONSTRAINT_FUNCTION:\n                                zName = \"SQLITE_CONSTRAINT_FUNCTION\";     break;\n      case SQLITE_CONSTRAINT_ROWID:   zName = \"SQLITE_CONSTRAINT_ROWID\";  break;\n      case SQLITE_MISMATCH:           zName = \"SQLITE_MISMATCH\";          break;\n      case SQLITE_MISUSE:             zName = \"SQLITE_MISUSE\";            break;\n      case SQLITE_NOLFS:              zName = \"SQLITE_NOLFS\";             break;\n      case SQLITE_AUTH:               zName = \"SQLITE_AUTH\";              break;\n      case SQLITE_FORMAT:             zName = \"SQLITE_FORMAT\";            break;\n      case SQLITE_RANGE:              zName = \"SQLITE_RANGE\";             break;\n      case SQLITE_NOTADB:             zName = \"SQLITE_NOTADB\";            break;\n      case SQLITE_ROW:                zName = \"SQLITE_ROW\";               break;\n      case SQLITE_NOTICE:             zName = \"SQLITE_NOTICE\";            break;\n      case SQLITE_NOTICE_RECOVER_WAL: zName = \"SQLITE_NOTICE_RECOVER_WAL\";break;\n      case SQLITE_NOTICE_RECOVER_ROLLBACK:\n                                zName = \"SQLITE_NOTICE_RECOVER_ROLLBACK\"; break;\n      case SQLITE_NOTICE_RBU:         zName = \"SQLITE_NOTICE_RBU\"; break;\n      case SQLITE_WARNING:            zName = \"SQLITE_WARNING\";           break;\n      case SQLITE_WARNING_AUTOINDEX:  zName = \"SQLITE_WARNING_AUTOINDEX\"; break;\n      case SQLITE_DONE:               zName = \"SQLITE_DONE\";              break;\n    }\n  }\n  if( zName==0 ){\n    static char zBuf[50];\n    sqlite3_snprintf(sizeof(zBuf), zBuf, \"SQLITE_UNKNOWN(%d)\", origRc);\n    zName = zBuf;\n  }\n  return zName;\n}\n#endif\n\n/*\n** Return a static string that describes the kind of error specified in the\n** argument.\n*/\nSQLITE_PRIVATE const char *sqlite3ErrStr(int rc){\n  static const char* const aMsg[] = {\n    /* SQLITE_OK          */ \"not an error\",\n    /* SQLITE_ERROR       */ \"SQL logic error\",\n    /* SQLITE_INTERNAL    */ 0,\n    /* SQLITE_PERM        */ \"access permission denied\",\n    /* SQLITE_ABORT       */ \"query aborted\",\n    /* SQLITE_BUSY        */ \"database is locked\",\n    /* SQLITE_LOCKED      */ \"database table is locked\",\n    /* SQLITE_NOMEM       */ \"out of memory\",\n    /* SQLITE_READONLY    */ \"attempt to write a readonly database\",\n    /* SQLITE_INTERRUPT   */ \"interrupted\",\n    /* SQLITE_IOERR       */ \"disk I/O error\",\n    /* SQLITE_CORRUPT     */ \"database disk image is malformed\",\n    /* SQLITE_NOTFOUND    */ \"unknown operation\",\n    /* SQLITE_FULL        */ \"database or disk is full\",\n    /* SQLITE_CANTOPEN    */ \"unable to open database file\",\n    /* SQLITE_PROTOCOL    */ \"locking protocol\",\n    /* SQLITE_EMPTY       */ 0,\n    /* SQLITE_SCHEMA      */ \"database schema has changed\",\n    /* SQLITE_TOOBIG      */ \"string or blob too big\",\n    /* SQLITE_CONSTRAINT  */ \"constraint failed\",\n    /* SQLITE_MISMATCH    */ \"datatype mismatch\",\n    /* SQLITE_MISUSE      */ \"bad parameter or other API misuse\",\n#ifdef SQLITE_DISABLE_LFS\n    /* SQLITE_NOLFS       */ \"large file support is disabled\",\n#else\n    /* SQLITE_NOLFS       */ 0,\n#endif\n    /* SQLITE_AUTH        */ \"authorization denied\",\n    /* SQLITE_FORMAT      */ 0,\n    /* SQLITE_RANGE       */ \"column index out of range\",\n    /* SQLITE_NOTADB      */ \"file is not a database\",\n    /* SQLITE_NOTICE      */ \"notification message\",\n    /* SQLITE_WARNING     */ \"warning message\",\n  };\n  const char *zErr = \"unknown error\";\n  switch( rc ){\n    case SQLITE_ABORT_ROLLBACK: {\n      zErr = \"abort due to ROLLBACK\";\n      break;\n    }\n    case SQLITE_ROW: {\n      zErr = \"another row available\";\n      break;\n    }\n    case SQLITE_DONE: {\n      zErr = \"no more rows available\";\n      break;\n    }\n    default: {\n      rc &= 0xff;\n      if( ALWAYS(rc>=0) && rc<ArraySize(aMsg) && aMsg[rc]!=0 ){\n        zErr = aMsg[rc];\n      }\n      break;\n    }\n  }\n  return zErr;\n}\n\n/*\n** This routine implements a busy callback that sleeps and tries\n** again until a timeout value is reached.  The timeout value is\n** an integer number of milliseconds passed in as the first\n** argument.\n**\n** Return non-zero to retry the lock.  Return zero to stop trying\n** and cause SQLite to return SQLITE_BUSY.\n*/\nstatic int sqliteDefaultBusyCallback(\n  void *ptr,               /* Database connection */\n  int count                /* Number of times table has been busy */\n){\n#if SQLITE_OS_WIN || !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP\n  /* This case is for systems that have support for sleeping for fractions of\n  ** a second.  Examples:  All windows systems, unix systems with nanosleep() */\n  static const u8 delays[] =\n     { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50, 100 };\n  static const u8 totals[] =\n     { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228 };\n# define NDELAY ArraySize(delays)\n  sqlite3 *db = (sqlite3 *)ptr;\n  int tmout = db->busyTimeout;\n  int delay, prior;\n\n  assert( count>=0 );\n  if( count < NDELAY ){\n    delay = delays[count];\n    prior = totals[count];\n  }else{\n    delay = delays[NDELAY-1];\n    prior = totals[NDELAY-1] + delay*(count-(NDELAY-1));\n  }\n  if( prior + delay > tmout ){\n    delay = tmout - prior;\n    if( delay<=0 ) return 0;\n  }\n  sqlite3OsSleep(db->pVfs, delay*1000);\n  return 1;\n#else\n  /* This case for unix systems that lack usleep() support.  Sleeping\n  ** must be done in increments of whole seconds */\n  sqlite3 *db = (sqlite3 *)ptr;\n  int tmout = ((sqlite3 *)ptr)->busyTimeout;\n  if( (count+1)*1000 > tmout ){\n    return 0;\n  }\n  sqlite3OsSleep(db->pVfs, 1000000);\n  return 1;\n#endif\n}\n\n/*\n** Invoke the given busy handler.\n**\n** This routine is called when an operation failed to acquire a\n** lock on VFS file pFile.\n**\n** If this routine returns non-zero, the lock is retried.  If it\n** returns 0, the operation aborts with an SQLITE_BUSY error.\n*/\nSQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler *p){\n  int rc;\n  if( p->xBusyHandler==0 || p->nBusy<0 ) return 0;\n  rc = p->xBusyHandler(p->pBusyArg, p->nBusy);\n  if( rc==0 ){\n    p->nBusy = -1;\n  }else{\n    p->nBusy++;\n  }\n  return rc;\n}\n\n/*\n** This routine sets the busy callback for an Sqlite database to the\n** given callback function with the given argument.\n*/\nSQLITE_API int sqlite3_busy_handler(\n  sqlite3 *db,\n  int (*xBusy)(void*,int),\n  void *pArg\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->busyHandler.xBusyHandler = xBusy;\n  db->busyHandler.pBusyArg = pArg;\n  db->busyHandler.nBusy = 0;\n  db->busyTimeout = 0;\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  db->setlkTimeout = 0;\n#endif\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_PROGRESS_CALLBACK\n/*\n** This routine sets the progress callback for an Sqlite database to the\n** given callback function with the given argument. The progress callback will\n** be invoked every nOps opcodes.\n*/\nSQLITE_API void sqlite3_progress_handler(\n  sqlite3 *db,\n  int nOps,\n  int (*xProgress)(void*),\n  void *pArg\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( nOps>0 ){\n    db->xProgress = xProgress;\n    db->nProgressOps = (unsigned)nOps;\n    db->pProgressArg = pArg;\n  }else{\n    db->xProgress = 0;\n    db->nProgressOps = 0;\n    db->pProgressArg = 0;\n  }\n  sqlite3_mutex_leave(db->mutex);\n}\n#endif\n\n\n/*\n** This routine installs a default busy handler that waits for the\n** specified number of milliseconds before returning 0.\n*/\nSQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  if( ms>0 ){\n    sqlite3_busy_handler(db, (int(*)(void*,int))sqliteDefaultBusyCallback,\n                             (void*)db);\n    db->busyTimeout = ms;\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n    db->setlkTimeout = ms;\n#endif\n  }else{\n    sqlite3_busy_handler(db, 0, 0);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Set the setlk timeout value.\n*/\nSQLITE_API int sqlite3_setlk_timeout(sqlite3 *db, int ms, int flags){\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  int iDb;\n  int bBOC = ((flags & SQLITE_SETLK_BLOCK_ON_CONNECT) ? 1 : 0);\n#endif\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  if( ms<-1 ) return SQLITE_RANGE;\n#ifdef SQLITE_ENABLE_SETLK_TIMEOUT\n  sqlite3_mutex_enter(db->mutex);\n  db->setlkTimeout = ms;\n  db->setlkFlags = flags;\n  sqlite3BtreeEnterAll(db);\n  for(iDb=0; iDb<db->nDb; iDb++){\n    Btree *pBt = db->aDb[iDb].pBt;\n    if( pBt ){\n      sqlite3_file *fd = sqlite3PagerFile(sqlite3BtreePager(pBt));\n      sqlite3OsFileControlHint(fd, SQLITE_FCNTL_BLOCK_ON_CONNECT, (void*)&bBOC);\n    }\n  }\n  sqlite3BtreeLeaveAll(db);\n  sqlite3_mutex_leave(db->mutex);\n#endif\n#if !defined(SQLITE_ENABLE_API_ARMOR) && !defined(SQLITE_ENABLE_SETLK_TIMEOUT)\n  UNUSED_PARAMETER(db);\n  UNUSED_PARAMETER(flags);\n#endif\n  return SQLITE_OK;\n}\n\n/*\n** Cause any pending operation to stop at its earliest opportunity.\n*/\nSQLITE_API void sqlite3_interrupt(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db)\n   && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE)\n  ){\n    (void)SQLITE_MISUSE_BKPT;\n    return;\n  }\n#endif\n  AtomicStore(&db->u1.isInterrupted, 1);\n}\n\n/*\n** Return true or false depending on whether or not an interrupt is\n** pending on connection db.\n*/\nSQLITE_API int sqlite3_is_interrupted(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db)\n   && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE)\n  ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return AtomicLoad(&db->u1.isInterrupted)!=0;\n}\n\n/*\n** This function is exactly the same as sqlite3_create_function(), except\n** that it is designed to be called by internal code. The difference is\n** that if a malloc() fails in sqlite3_create_function(), an error code\n** is returned and the mallocFailed flag cleared.\n*/\nSQLITE_PRIVATE int sqlite3CreateFunc(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int enc,\n  void *pUserData,\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value **),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value **),\n  void (*xFinal)(sqlite3_context*),\n  void (*xValue)(sqlite3_context*),\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value **),\n  FuncDestructor *pDestructor\n){\n  FuncDef *p;\n  int extraFlags;\n\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( xValue==0 || xSFunc==0 );\n  if( zFunctionName==0                /* Must have a valid name */\n   || (xSFunc!=0 && xFinal!=0)        /* Not both xSFunc and xFinal */\n   || ((xFinal==0)!=(xStep==0))       /* Both or neither of xFinal and xStep */\n   || ((xValue==0)!=(xInverse==0))    /* Both or neither of xValue, xInverse */\n   || (nArg<-1 || nArg>SQLITE_MAX_FUNCTION_ARG)\n   || (255<sqlite3Strlen30(zFunctionName))\n  ){\n    return SQLITE_MISUSE_BKPT;\n  }\n\n  assert( SQLITE_FUNC_CONSTANT==SQLITE_DETERMINISTIC );\n  assert( SQLITE_FUNC_DIRECT==SQLITE_DIRECTONLY );\n  extraFlags = enc &  (SQLITE_DETERMINISTIC|SQLITE_DIRECTONLY|\n                       SQLITE_SUBTYPE|SQLITE_INNOCUOUS|\n                       SQLITE_RESULT_SUBTYPE|SQLITE_SELFORDER1);\n  enc &= (SQLITE_FUNC_ENCMASK|SQLITE_ANY);\n\n  /* The SQLITE_INNOCUOUS flag is the same bit as SQLITE_FUNC_UNSAFE.  But\n  ** the meaning is inverted.  So flip the bit. */\n  assert( SQLITE_FUNC_UNSAFE==SQLITE_INNOCUOUS );\n  extraFlags ^= SQLITE_FUNC_UNSAFE;  /* tag-20230109-1 */\n\n\n#ifndef SQLITE_OMIT_UTF16\n  /* If SQLITE_UTF16 is specified as the encoding type, transform this\n  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the\n  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.\n  **\n  ** If SQLITE_ANY is specified, add three versions of the function\n  ** to the hash table.\n  */\n  switch( enc ){\n    case SQLITE_UTF16:\n      enc = SQLITE_UTF16NATIVE;\n      break;\n    case SQLITE_ANY: {\n      int rc;\n      rc = sqlite3CreateFunc(db, zFunctionName, nArg,\n           (SQLITE_UTF8|extraFlags)^SQLITE_FUNC_UNSAFE, /* tag-20230109-1 */\n           pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3CreateFunc(db, zFunctionName, nArg,\n             (SQLITE_UTF16LE|extraFlags)^SQLITE_FUNC_UNSAFE, /* tag-20230109-1*/\n             pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor);\n      }\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      enc = SQLITE_UTF16BE;\n      break;\n    }\n    case SQLITE_UTF8:\n    case SQLITE_UTF16LE:\n    case SQLITE_UTF16BE:\n      break;\n    default:\n      enc = SQLITE_UTF8;\n      break;\n  }\n#else\n  enc = SQLITE_UTF8;\n#endif\n\n  /* Check if an existing function is being overridden or deleted. If so,\n  ** and there are active VMs, then return SQLITE_BUSY. If a function\n  ** is being overridden/deleted but there are no active VMs, allow the\n  ** operation to continue but invalidate all precompiled statements.\n  */\n  p = sqlite3FindFunction(db, zFunctionName, nArg, (u8)enc, 0);\n  if( p && (p->funcFlags & SQLITE_FUNC_ENCMASK)==(u32)enc && p->nArg==nArg ){\n    if( db->nVdbeActive ){\n      sqlite3ErrorWithMsg(db, SQLITE_BUSY,\n        \"unable to delete/modify user-function due to active statements\");\n      assert( !db->mallocFailed );\n      return SQLITE_BUSY;\n    }else{\n      sqlite3ExpirePreparedStatements(db, 0);\n    }\n  }else if( xSFunc==0 && xFinal==0 ){\n    /* Trying to delete a function that does not exist.  This is a no-op.\n    ** https://sqlite.org/forum/forumpost/726219164b */\n    return SQLITE_OK;\n  }\n\n  p = sqlite3FindFunction(db, zFunctionName, nArg, (u8)enc, 1);\n  assert(p || db->mallocFailed);\n  if( !p ){\n    return SQLITE_NOMEM_BKPT;\n  }\n\n  /* If an older version of the function with a configured destructor is\n  ** being replaced invoke the destructor function here. */\n  functionDestroy(db, p);\n\n  if( pDestructor ){\n    pDestructor->nRef++;\n  }\n  p->u.pDestructor = pDestructor;\n  p->funcFlags = (p->funcFlags & SQLITE_FUNC_ENCMASK) | extraFlags;\n  testcase( p->funcFlags & SQLITE_DETERMINISTIC );\n  testcase( p->funcFlags & SQLITE_DIRECTONLY );\n  p->xSFunc = xSFunc ? xSFunc : xStep;\n  p->xFinalize = xFinal;\n  p->xValue = xValue;\n  p->xInverse = xInverse;\n  p->pUserData = pUserData;\n  p->nArg = (u16)nArg;\n  return SQLITE_OK;\n}\n\n/*\n** Worker function used by utf-8 APIs that create new functions:\n**\n**    sqlite3_create_function()\n**    sqlite3_create_function_v2()\n**    sqlite3_create_window_function()\n*/\nstatic int createFunctionApi(\n  sqlite3 *db,\n  const char *zFunc,\n  int nArg,\n  int enc,\n  void *p,\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*),\n  void (*xValue)(sqlite3_context*),\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value**),\n  void(*xDestroy)(void*)\n){\n  int rc = SQLITE_ERROR;\n  FuncDestructor *pArg = 0;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( xDestroy ){\n    pArg = (FuncDestructor *)sqlite3Malloc(sizeof(FuncDestructor));\n    if( !pArg ){\n      sqlite3OomFault(db);\n      xDestroy(p);\n      goto out;\n    }\n    pArg->nRef = 0;\n    pArg->xDestroy = xDestroy;\n    pArg->pUserData = p;\n  }\n  rc = sqlite3CreateFunc(db, zFunc, nArg, enc, p,\n      xSFunc, xStep, xFinal, xValue, xInverse, pArg\n  );\n  if( pArg && pArg->nRef==0 ){\n    assert( rc!=SQLITE_OK || (xStep==0 && xFinal==0) );\n    xDestroy(p);\n    sqlite3_free(pArg);\n  }\n\n out:\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Create new user functions.\n*/\nSQLITE_API int sqlite3_create_function(\n  sqlite3 *db,\n  const char *zFunc,\n  int nArg,\n  int enc,\n  void *p,\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value **),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value **),\n  void (*xFinal)(sqlite3_context*)\n){\n  return createFunctionApi(db, zFunc, nArg, enc, p, xSFunc, xStep,\n                                    xFinal, 0, 0, 0);\n}\nSQLITE_API int sqlite3_create_function_v2(\n  sqlite3 *db,\n  const char *zFunc,\n  int nArg,\n  int enc,\n  void *p,\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value **),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value **),\n  void (*xFinal)(sqlite3_context*),\n  void (*xDestroy)(void *)\n){\n  return createFunctionApi(db, zFunc, nArg, enc, p, xSFunc, xStep,\n                                    xFinal, 0, 0, xDestroy);\n}\nSQLITE_API int sqlite3_create_window_function(\n  sqlite3 *db,\n  const char *zFunc,\n  int nArg,\n  int enc,\n  void *p,\n  void (*xStep)(sqlite3_context*,int,sqlite3_value **),\n  void (*xFinal)(sqlite3_context*),\n  void (*xValue)(sqlite3_context*),\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value **),\n  void (*xDestroy)(void *)\n){\n  return createFunctionApi(db, zFunc, nArg, enc, p, 0, xStep,\n                                    xFinal, xValue, xInverse, xDestroy);\n}\n\n#ifndef SQLITE_OMIT_UTF16\nSQLITE_API int sqlite3_create_function16(\n  sqlite3 *db,\n  const void *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *p,\n  void (*xSFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n){\n  int rc;\n  char *zFunc8;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zFunctionName==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  assert( !db->mallocFailed );\n  zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1, SQLITE_UTF16NATIVE);\n  rc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xSFunc,xStep,xFinal,0,0,0);\n  sqlite3DbFree(db, zFunc8);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n#endif\n\n\n/*\n** The following is the implementation of an SQL function that always\n** fails with an error message stating that the function is used in the\n** wrong context.  The sqlite3_overload_function() API might construct\n** SQL function that use this routine so that the functions will exist\n** for name resolution but are actually overloaded by the xFindFunction\n** method of virtual tables.\n*/\nstatic void sqlite3InvalidFunction(\n  sqlite3_context *context,  /* The function calling context */\n  int NotUsed,               /* Number of arguments to the function */\n  sqlite3_value **NotUsed2   /* Value of each argument */\n){\n  const char *zName = (const char*)sqlite3_user_data(context);\n  char *zErr;\n  UNUSED_PARAMETER2(NotUsed, NotUsed2);\n  zErr = sqlite3_mprintf(\n      \"unable to use function %s in the requested context\", zName);\n  sqlite3_result_error(context, zErr, -1);\n  sqlite3_free(zErr);\n}\n\n/*\n** Declare that a function has been overloaded by a virtual table.\n**\n** If the function already exists as a regular global function, then\n** this routine is a no-op.  If the function does not exist, then create\n** a new one that always throws a run-time error.\n**\n** When virtual tables intend to provide an overloaded function, they\n** should call this routine to make sure the global function exists.\n** A global function must exist in order for name resolution to work\n** properly.\n*/\nSQLITE_API int sqlite3_overload_function(\n  sqlite3 *db,\n  const char *zName,\n  int nArg\n){\n  int rc;\n  char *zCopy;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zName==0 || nArg<-2 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  rc = sqlite3FindFunction(db, zName, nArg, SQLITE_UTF8, 0)!=0;\n  sqlite3_mutex_leave(db->mutex);\n  if( rc ) return SQLITE_OK;\n  zCopy = sqlite3_mprintf(\"%s\", zName);\n  if( zCopy==0 ) return SQLITE_NOMEM;\n  return sqlite3_create_function_v2(db, zName, nArg, SQLITE_UTF8,\n                           zCopy, sqlite3InvalidFunction, 0, 0, sqlite3_free);\n}\n\n#ifndef SQLITE_OMIT_TRACE\n/*\n** Register a trace function.  The pArg from the previously registered trace\n** is returned.\n**\n** A NULL trace function means that no tracing is executes.  A non-NULL\n** trace is a pointer to a function that is invoked at the start of each\n** SQL statement.\n*/\n#ifndef SQLITE_OMIT_DEPRECATED\nSQLITE_API void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){\n  void *pOld;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pOld = db->pTraceArg;\n  db->mTrace = xTrace ? SQLITE_TRACE_LEGACY : 0;\n  db->trace.xLegacy = xTrace;\n  db->pTraceArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pOld;\n}\n#endif /* SQLITE_OMIT_DEPRECATED */\n\n/* Register a trace callback using the version-2 interface.\n*/\nSQLITE_API int sqlite3_trace_v2(\n  sqlite3 *db,                               /* Trace this connection */\n  unsigned mTrace,                           /* Mask of events to be traced */\n  int(*xTrace)(unsigned,void*,void*,void*),  /* Callback to invoke */\n  void *pArg                                 /* Context */\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( mTrace==0 ) xTrace = 0;\n  if( xTrace==0 ) mTrace = 0;\n  db->mTrace = mTrace;\n  db->trace.xV2 = xTrace;\n  db->pTraceArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** Register a profile function.  The pArg from the previously registered\n** profile function is returned.\n**\n** A NULL profile function means that no profiling is executes.  A non-NULL\n** profile is a pointer to a function that is invoked at the conclusion of\n** each SQL statement that is run.\n*/\nSQLITE_API void *sqlite3_profile(\n  sqlite3 *db,\n  void (*xProfile)(void*,const char*,sqlite_uint64),\n  void *pArg\n){\n  void *pOld;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pOld = db->pProfileArg;\n  db->xProfile = xProfile;\n  db->pProfileArg = pArg;\n  db->mTrace &= SQLITE_TRACE_NONLEGACY_MASK;\n  if( db->xProfile ) db->mTrace |= SQLITE_TRACE_XPROFILE;\n  sqlite3_mutex_leave(db->mutex);\n  return pOld;\n}\n#endif /* SQLITE_OMIT_DEPRECATED */\n#endif /* SQLITE_OMIT_TRACE */\n\n/*\n** Register a function to be invoked when a transaction commits.\n** If the invoked function returns non-zero, then the commit becomes a\n** rollback.\n*/\nSQLITE_API void *sqlite3_commit_hook(\n  sqlite3 *db,              /* Attach the hook to this database */\n  int (*xCallback)(void*),  /* Function to invoke on each commit */\n  void *pArg                /* Argument to the function */\n){\n  void *pOld;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pOld = db->pCommitArg;\n  db->xCommitCallback = xCallback;\n  db->pCommitArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pOld;\n}\n\n/*\n** Register a callback to be invoked each time a row is updated,\n** inserted or deleted using this database connection.\n*/\nSQLITE_API void *sqlite3_update_hook(\n  sqlite3 *db,              /* Attach the hook to this database */\n  void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),\n  void *pArg                /* Argument to the function */\n){\n  void *pRet;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pRet = db->pUpdateArg;\n  db->xUpdateCallback = xCallback;\n  db->pUpdateArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pRet;\n}\n\n/*\n** Register a callback to be invoked each time a transaction is rolled\n** back by this database connection.\n*/\nSQLITE_API void *sqlite3_rollback_hook(\n  sqlite3 *db,              /* Attach the hook to this database */\n  void (*xCallback)(void*), /* Callback function */\n  void *pArg                /* Argument to the function */\n){\n  void *pRet;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pRet = db->pRollbackArg;\n  db->xRollbackCallback = xCallback;\n  db->pRollbackArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pRet;\n}\n\n#ifdef SQLITE_ENABLE_PREUPDATE_HOOK\n/*\n** Register a callback to be invoked each time a row is updated,\n** inserted or deleted using this database connection.\n*/\nSQLITE_API void *sqlite3_preupdate_hook(\n  sqlite3 *db,              /* Attach the hook to this database */\n  void(*xCallback)(         /* Callback function */\n    void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64),\n  void *pArg                /* First callback argument */\n){\n  void *pRet;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( db==0 ){\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pRet = db->pPreUpdateArg;\n  db->xPreUpdateCallback = xCallback;\n  db->pPreUpdateArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pRet;\n}\n#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */\n\n/*\n** Register a function to be invoked prior to each autovacuum that\n** determines the number of pages to vacuum.\n*/\nSQLITE_API int sqlite3_autovacuum_pages(\n  sqlite3 *db,                 /* Attach the hook to this database */\n  unsigned int (*xCallback)(void*,const char*,u32,u32,u32),\n  void *pArg,                  /* Argument to the function */\n  void (*xDestructor)(void*)   /* Destructor for pArg */\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    if( xDestructor ) xDestructor(pArg);\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( db->xAutovacDestr ){\n    db->xAutovacDestr(db->pAutovacPagesArg);\n  }\n  db->xAutovacPages = xCallback;\n  db->pAutovacPagesArg = pArg;\n  db->xAutovacDestr = xDestructor;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** The sqlite3_wal_hook() callback registered by sqlite3_wal_autocheckpoint().\n** Invoke sqlite3_wal_checkpoint if the number of frames in the log file\n** is greater than sqlite3.pWalArg cast to an integer (the value configured by\n** wal_autocheckpoint()).\n*/\nSQLITE_PRIVATE int sqlite3WalDefaultHook(\n  void *pClientData,     /* Argument */\n  sqlite3 *db,           /* Connection */\n  const char *zDb,       /* Database */\n  int nFrame             /* Size of WAL */\n){\n  if( nFrame>=SQLITE_PTR_TO_INT(pClientData) ){\n    sqlite3BeginBenignMalloc();\n    sqlite3_wal_checkpoint(db, zDb);\n    sqlite3EndBenignMalloc();\n  }\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OMIT_WAL */\n\n/*\n** Configure an sqlite3_wal_hook() callback to automatically checkpoint\n** a database after committing a transaction if there are nFrame or\n** more frames in the log file. Passing zero or a negative value as the\n** nFrame parameter disables automatic checkpoints entirely.\n**\n** The callback registered by this function replaces any existing callback\n** registered using sqlite3_wal_hook(). Likewise, registering a callback\n** using sqlite3_wal_hook() disables the automatic checkpoint mechanism\n** configured by this function.\n*/\nSQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){\n#ifdef SQLITE_OMIT_WAL\n  UNUSED_PARAMETER(db);\n  UNUSED_PARAMETER(nFrame);\n#else\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  if( nFrame>0 ){\n    sqlite3_wal_hook(db, sqlite3WalDefaultHook, SQLITE_INT_TO_PTR(nFrame));\n  }else{\n    sqlite3_wal_hook(db, 0, 0);\n  }\n#endif\n  return SQLITE_OK;\n}\n\n/*\n** Register a callback to be invoked each time a transaction is written\n** into the write-ahead-log by this database connection.\n*/\nSQLITE_API void *sqlite3_wal_hook(\n  sqlite3 *db,                    /* Attach the hook to this db handle */\n  int(*xCallback)(void *, sqlite3*, const char*, int),\n  void *pArg                      /* First argument passed to xCallback() */\n){\n#ifndef SQLITE_OMIT_WAL\n  void *pRet;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pRet = db->pWalArg;\n  db->xWalCallback = xCallback;\n  db->pWalArg = pArg;\n  sqlite3_mutex_leave(db->mutex);\n  return pRet;\n#else\n  return 0;\n#endif\n}\n\n/*\n** Checkpoint database zDb.\n*/\nSQLITE_API int sqlite3_wal_checkpoint_v2(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of attached database (or NULL) */\n  int eMode,                      /* SQLITE_CHECKPOINT_* value */\n  int *pnLog,                     /* OUT: Size of WAL log in frames */\n  int *pnCkpt                     /* OUT: Total number of frames checkpointed */\n){\n#ifdef SQLITE_OMIT_WAL\n  return SQLITE_OK;\n#else\n  int rc;                         /* Return code */\n  int iDb;                        /* Schema to checkpoint */\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n\n  /* Initialize the output variables to -1 in case an error occurs. */\n  if( pnLog ) *pnLog = -1;\n  if( pnCkpt ) *pnCkpt = -1;\n\n  assert( SQLITE_CHECKPOINT_PASSIVE==0 );\n  assert( SQLITE_CHECKPOINT_FULL==1 );\n  assert( SQLITE_CHECKPOINT_RESTART==2 );\n  assert( SQLITE_CHECKPOINT_TRUNCATE==3 );\n  if( eMode<SQLITE_CHECKPOINT_PASSIVE || eMode>SQLITE_CHECKPOINT_TRUNCATE ){\n    /* EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint\n    ** mode: */\n    return SQLITE_MISUSE_BKPT;\n  }\n\n  sqlite3_mutex_enter(db->mutex);\n  if( zDb && zDb[0] ){\n    iDb = sqlite3FindDbName(db, zDb);\n  }else{\n    iDb = SQLITE_MAX_DB;   /* This means process all schemas */\n  }\n  if( iDb<0 ){\n    rc = SQLITE_ERROR;\n    sqlite3ErrorWithMsg(db, SQLITE_ERROR, \"unknown database: %s\", zDb);\n  }else{\n    db->busyHandler.nBusy = 0;\n    rc = sqlite3Checkpoint(db, iDb, eMode, pnLog, pnCkpt);\n    sqlite3Error(db, rc);\n  }\n  rc = sqlite3ApiExit(db, rc);\n\n  /* If there are no active statements, clear the interrupt flag at this\n  ** point.  */\n  if( db->nVdbeActive==0 ){\n    AtomicStore(&db->u1.isInterrupted, 0);\n  }\n\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n#endif\n}\n\n\n/*\n** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points\n** to contains a zero-length string, all attached databases are\n** checkpointed.\n*/\nSQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){\n  /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to\n  ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */\n  return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);\n}\n\n#ifndef SQLITE_OMIT_WAL\n/*\n** Run a checkpoint on database iDb. This is a no-op if database iDb is\n** not currently open in WAL mode.\n**\n** If a transaction is open on the database being checkpointed, this\n** function returns SQLITE_LOCKED and a checkpoint is not attempted. If\n** an error occurs while running the checkpoint, an SQLite error code is\n** returned (i.e. SQLITE_IOERR). Otherwise, SQLITE_OK.\n**\n** The mutex on database handle db should be held by the caller. The mutex\n** associated with the specific b-tree being checkpointed is taken by\n** this function while the checkpoint is running.\n**\n** If iDb is passed SQLITE_MAX_DB then all attached databases are\n** checkpointed. If an error is encountered it is returned immediately -\n** no attempt is made to checkpoint any remaining databases.\n**\n** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART\n** or TRUNCATE.\n*/\nSQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* Used to iterate through attached dbs */\n  int bBusy = 0;                  /* True if SQLITE_BUSY has been encountered */\n\n  assert( sqlite3_mutex_held(db->mutex) );\n  assert( !pnLog || *pnLog==-1 );\n  assert( !pnCkpt || *pnCkpt==-1 );\n  testcase( iDb==SQLITE_MAX_ATTACHED ); /* See forum post a006d86f72 */\n  testcase( iDb==SQLITE_MAX_DB );\n\n  for(i=0; i<db->nDb && rc==SQLITE_OK; i++){\n    if( i==iDb || iDb==SQLITE_MAX_DB ){\n      rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt, eMode, pnLog, pnCkpt);\n      pnLog = 0;\n      pnCkpt = 0;\n      if( rc==SQLITE_BUSY ){\n        bBusy = 1;\n        rc = SQLITE_OK;\n      }\n    }\n  }\n\n  return (rc==SQLITE_OK && bBusy) ? SQLITE_BUSY : rc;\n}\n#endif /* SQLITE_OMIT_WAL */\n\n/*\n** This function returns true if main-memory should be used instead of\n** a temporary file for transient pager files and statement journals.\n** The value returned depends on the value of db->temp_store (runtime\n** parameter) and the compile time value of SQLITE_TEMP_STORE. The\n** following table describes the relationship between these two values\n** and this functions return value.\n**\n**   SQLITE_TEMP_STORE     db->temp_store     Location of temporary database\n**   -----------------     --------------     ------------------------------\n**   0                     any                file      (return 0)\n**   1                     1                  file      (return 0)\n**   1                     2                  memory    (return 1)\n**   1                     0                  file      (return 0)\n**   2                     1                  file      (return 0)\n**   2                     2                  memory    (return 1)\n**   2                     0                  memory    (return 1)\n**   3                     any                memory    (return 1)\n*/\nSQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){\n#if SQLITE_TEMP_STORE==1\n  return ( db->temp_store==2 );\n#endif\n#if SQLITE_TEMP_STORE==2\n  return ( db->temp_store!=1 );\n#endif\n#if SQLITE_TEMP_STORE==3\n  UNUSED_PARAMETER(db);\n  return 1;\n#endif\n#if SQLITE_TEMP_STORE<1 || SQLITE_TEMP_STORE>3\n  UNUSED_PARAMETER(db);\n  return 0;\n#endif\n}\n\n/*\n** Return UTF-8 encoded English language explanation of the most recent\n** error.\n*/\nSQLITE_API const char *sqlite3_errmsg(sqlite3 *db){\n  const char *z;\n  if( !db ){\n    return sqlite3ErrStr(SQLITE_NOMEM_BKPT);\n  }\n  if( !sqlite3SafetyCheckSickOrOk(db) ){\n    return sqlite3ErrStr(SQLITE_MISUSE_BKPT);\n  }\n  sqlite3_mutex_enter(db->mutex);\n  if( db->mallocFailed ){\n    z = sqlite3ErrStr(SQLITE_NOMEM_BKPT);\n  }else{\n    testcase( db->pErr==0 );\n    z = db->errCode ? (char*)sqlite3_value_text(db->pErr) : 0;\n    assert( !db->mallocFailed );\n    if( z==0 ){\n      z = sqlite3ErrStr(db->errCode);\n    }\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return z;\n}\n\n/*\n** Set the error code and error message associated with the database handle.\n**\n** This routine is intended to be called by outside extensions (ex: the\n** Session extension). Internal logic should invoke sqlite3Error() or\n** sqlite3ErrorWithMsg() directly.\n*/\nSQLITE_API int sqlite3_set_errmsg(sqlite3 *db, int errcode, const char *zMsg){\n  int rc = SQLITE_OK;\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  sqlite3_mutex_enter(db->mutex);\n  if( zMsg ){\n    sqlite3ErrorWithMsg(db, errcode, \"%s\", zMsg);\n  }else{\n    sqlite3Error(db, errcode);\n  }\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Return the byte offset of the most recent error\n*/\nSQLITE_API int sqlite3_error_offset(sqlite3 *db){\n  int iOffset = -1;\n  if( db && sqlite3SafetyCheckSickOrOk(db) && db->errCode ){\n    sqlite3_mutex_enter(db->mutex);\n    iOffset = db->errByteOffset;\n    sqlite3_mutex_leave(db->mutex);\n  }\n  return iOffset;\n}\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Return UTF-16 encoded English language explanation of the most recent\n** error.\n*/\nSQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){\n  static const u16 outOfMem[] = {\n    'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0\n  };\n  static const u16 misuse[] = {\n    'b', 'a', 'd', ' ', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', ' ',\n    'o', 'r', ' ', 'o', 't', 'h', 'e', 'r', ' ', 'A', 'P', 'I', ' ',\n    'm', 'i', 's', 'u', 's', 'e', 0\n  };\n\n  const void *z;\n  if( !db ){\n    return (void *)outOfMem;\n  }\n  if( !sqlite3SafetyCheckSickOrOk(db) ){\n    return (void *)misuse;\n  }\n  sqlite3_mutex_enter(db->mutex);\n  if( db->mallocFailed ){\n    z = (void *)outOfMem;\n  }else{\n    z = sqlite3_value_text16(db->pErr);\n    if( z==0 ){\n      sqlite3ErrorWithMsg(db, db->errCode, sqlite3ErrStr(db->errCode));\n      z = sqlite3_value_text16(db->pErr);\n    }\n    /* A malloc() may have failed within the call to sqlite3_value_text16()\n    ** above. If this is the case, then the db->mallocFailed flag needs to\n    ** be cleared before returning. Do this directly, instead of via\n    ** sqlite3ApiExit(), to avoid setting the database handle error message.\n    */\n    sqlite3OomClear(db);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return z;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Return the most recent error code generated by an SQLite routine. If NULL is\n** passed to this function, we assume a malloc() failed during sqlite3_open().\n*/\nSQLITE_API int sqlite3_errcode(sqlite3 *db){\n  if( db && !sqlite3SafetyCheckSickOrOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  if( !db || db->mallocFailed ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  return db->errCode & db->errMask;\n}\nSQLITE_API int sqlite3_extended_errcode(sqlite3 *db){\n  if( db && !sqlite3SafetyCheckSickOrOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n  if( !db || db->mallocFailed ){\n    return SQLITE_NOMEM_BKPT;\n  }\n  return db->errCode;\n}\nSQLITE_API int sqlite3_system_errno(sqlite3 *db){\n  return db ? db->iSysErrno : 0;\n}\n\n/*\n** Return a string that describes the kind of error specified in the\n** argument.  For now, this simply calls the internal sqlite3ErrStr()\n** function.\n*/\nSQLITE_API const char *sqlite3_errstr(int rc){\n  return sqlite3ErrStr(rc);\n}\n\n/*\n** Create a new collating function for database \"db\".  The name is zName\n** and the encoding is enc.\n*/\nstatic int createCollation(\n  sqlite3* db,\n  const char *zName,\n  u8 enc,\n  void* pCtx,\n  int(*xCompare)(void*,int,const void*,int,const void*),\n  void(*xDel)(void*)\n){\n  CollSeq *pColl;\n  int enc2;\n\n  assert( sqlite3_mutex_held(db->mutex) );\n\n  /* If SQLITE_UTF16 is specified as the encoding type, transform this\n  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the\n  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.\n  */\n  enc2 = enc;\n  testcase( enc2==SQLITE_UTF16 );\n  testcase( enc2==SQLITE_UTF16_ALIGNED );\n  if( enc2==SQLITE_UTF16 || enc2==SQLITE_UTF16_ALIGNED ){\n    enc2 = SQLITE_UTF16NATIVE;\n  }\n  if( enc2<SQLITE_UTF8 || enc2>SQLITE_UTF16BE ){\n    return SQLITE_MISUSE_BKPT;\n  }\n\n  /* Check if this call is removing or replacing an existing collation\n  ** sequence. If so, and there are active VMs, return busy. If there\n  ** are no active VMs, invalidate any pre-compiled statements.\n  */\n  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);\n  if( pColl && pColl->xCmp ){\n    if( db->nVdbeActive ){\n      sqlite3ErrorWithMsg(db, SQLITE_BUSY,\n        \"unable to delete/modify collation sequence due to active statements\");\n      return SQLITE_BUSY;\n    }\n    sqlite3ExpirePreparedStatements(db, 0);\n\n    /* If collation sequence pColl was created directly by a call to\n    ** sqlite3_create_collation, and not generated by synthCollSeq(),\n    ** then any copies made by synthCollSeq() need to be invalidated.\n    ** Also, collation destructor - CollSeq.xDel() - function may need\n    ** to be called.\n    */\n    if( (pColl->enc & ~SQLITE_UTF16_ALIGNED)==enc2 ){\n      CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName);\n      int j;\n      for(j=0; j<3; j++){\n        CollSeq *p = &aColl[j];\n        if( p->enc==pColl->enc ){\n          if( p->xDel ){\n            p->xDel(p->pUser);\n          }\n          p->xCmp = 0;\n        }\n      }\n    }\n  }\n\n  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);\n  if( pColl==0 ) return SQLITE_NOMEM_BKPT;\n  pColl->xCmp = xCompare;\n  pColl->pUser = pCtx;\n  pColl->xDel = xDel;\n  pColl->enc = (u8)(enc2 | (enc & SQLITE_UTF16_ALIGNED));\n  sqlite3Error(db, SQLITE_OK);\n  return SQLITE_OK;\n}\n\n\n/*\n** This array defines hard upper bounds on limit values.  The\n** initializer must be kept in sync with the SQLITE_LIMIT_*\n** #defines in sqlite3.h.\n*/\nstatic const int aHardLimit[] = {\n  SQLITE_MAX_LENGTH,\n  SQLITE_MAX_SQL_LENGTH,\n  SQLITE_MAX_COLUMN,\n  SQLITE_MAX_EXPR_DEPTH,\n  SQLITE_MAX_COMPOUND_SELECT,\n  SQLITE_MAX_VDBE_OP,\n  SQLITE_MAX_FUNCTION_ARG,\n  SQLITE_MAX_ATTACHED,\n  SQLITE_MAX_LIKE_PATTERN_LENGTH,\n  SQLITE_MAX_VARIABLE_NUMBER,      /* IMP: R-38091-32352 */\n  SQLITE_MAX_TRIGGER_DEPTH,\n  SQLITE_MAX_WORKER_THREADS,\n};\n\n/*\n** Make sure the hard limits are set to reasonable values\n*/\n#if SQLITE_MAX_LENGTH<100\n# error SQLITE_MAX_LENGTH must be at least 100\n#endif\n#if SQLITE_MAX_SQL_LENGTH<100\n# error SQLITE_MAX_SQL_LENGTH must be at least 100\n#endif\n#if SQLITE_MAX_SQL_LENGTH>SQLITE_MAX_LENGTH\n# error SQLITE_MAX_SQL_LENGTH must not be greater than SQLITE_MAX_LENGTH\n#endif\n#if SQLITE_MAX_COMPOUND_SELECT<2\n# error SQLITE_MAX_COMPOUND_SELECT must be at least 2\n#endif\n#if SQLITE_MAX_VDBE_OP<40\n# error SQLITE_MAX_VDBE_OP must be at least 40\n#endif\n#if SQLITE_MAX_FUNCTION_ARG<0 || SQLITE_MAX_FUNCTION_ARG>32767\n# error SQLITE_MAX_FUNCTION_ARG must be between 0 and 32767\n#endif\n#if SQLITE_MAX_ATTACHED<0 || SQLITE_MAX_ATTACHED>125\n# error SQLITE_MAX_ATTACHED must be between 0 and 125\n#endif\n#if SQLITE_MAX_LIKE_PATTERN_LENGTH<1\n# error SQLITE_MAX_LIKE_PATTERN_LENGTH must be at least 1\n#endif\n#if SQLITE_MAX_COLUMN>32767\n# error SQLITE_MAX_COLUMN must not exceed 32767\n#endif\n#if SQLITE_MAX_TRIGGER_DEPTH<1\n# error SQLITE_MAX_TRIGGER_DEPTH must be at least 1\n#endif\n#if SQLITE_MAX_WORKER_THREADS<0 || SQLITE_MAX_WORKER_THREADS>50\n# error SQLITE_MAX_WORKER_THREADS must be between 0 and 50\n#endif\n\n\n/*\n** Change the value of a limit.  Report the old value.\n** If an invalid limit index is supplied, report -1.\n** Make no changes but still report the old value if the\n** new limit is negative.\n**\n** A new lower limit does not shrink existing constructs.\n** It merely prevents new constructs that exceed the limit\n** from forming.\n*/\nSQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){\n  int oldLimit;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return -1;\n  }\n#endif\n\n  /* EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME\n  ** there is a hard upper bound set at compile-time by a C preprocessor\n  ** macro called SQLITE_MAX_NAME. (The \"_LIMIT_\" in the name is changed to\n  ** \"_MAX_\".)\n  */\n  assert( aHardLimit[SQLITE_LIMIT_LENGTH]==SQLITE_MAX_LENGTH );\n  assert( aHardLimit[SQLITE_LIMIT_SQL_LENGTH]==SQLITE_MAX_SQL_LENGTH );\n  assert( aHardLimit[SQLITE_LIMIT_COLUMN]==SQLITE_MAX_COLUMN );\n  assert( aHardLimit[SQLITE_LIMIT_EXPR_DEPTH]==SQLITE_MAX_EXPR_DEPTH );\n  assert( aHardLimit[SQLITE_LIMIT_COMPOUND_SELECT]==SQLITE_MAX_COMPOUND_SELECT);\n  assert( aHardLimit[SQLITE_LIMIT_VDBE_OP]==SQLITE_MAX_VDBE_OP );\n  assert( aHardLimit[SQLITE_LIMIT_FUNCTION_ARG]==SQLITE_MAX_FUNCTION_ARG );\n  assert( aHardLimit[SQLITE_LIMIT_ATTACHED]==SQLITE_MAX_ATTACHED );\n  assert( aHardLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]==\n                                               SQLITE_MAX_LIKE_PATTERN_LENGTH );\n  assert( aHardLimit[SQLITE_LIMIT_VARIABLE_NUMBER]==SQLITE_MAX_VARIABLE_NUMBER);\n  assert( aHardLimit[SQLITE_LIMIT_TRIGGER_DEPTH]==SQLITE_MAX_TRIGGER_DEPTH );\n  assert( aHardLimit[SQLITE_LIMIT_WORKER_THREADS]==SQLITE_MAX_WORKER_THREADS );\n  assert( SQLITE_LIMIT_WORKER_THREADS==(SQLITE_N_LIMIT-1) );\n\n\n  if( limitId<0 || limitId>=SQLITE_N_LIMIT ){\n    return -1;\n  }\n  oldLimit = db->aLimit[limitId];\n  if( newLimit>=0 ){                   /* IMP: R-52476-28732 */\n    if( newLimit>aHardLimit[limitId] ){\n      newLimit = aHardLimit[limitId];  /* IMP: R-51463-25634 */\n    }else if( newLimit<SQLITE_MIN_LENGTH && limitId==SQLITE_LIMIT_LENGTH ){\n      newLimit = SQLITE_MIN_LENGTH;\n    }\n    db->aLimit[limitId] = newLimit;\n  }\n  return oldLimit;                     /* IMP: R-53341-35419 */\n}\n\n/*\n** This function is used to parse both URIs and non-URI filenames passed by the\n** user to API functions sqlite3_open() or sqlite3_open_v2(), and for database\n** URIs specified as part of ATTACH statements.\n**\n** The first argument to this function is the name of the VFS to use (or\n** a NULL to signify the default VFS) if the URI does not contain a \"vfs=xxx\"\n** query parameter. The second argument contains the URI (or non-URI filename)\n** itself. When this function is called the *pFlags variable should contain\n** the default flags to open the database handle with. The value stored in\n** *pFlags may be updated before returning if the URI filename contains\n** \"cache=xxx\" or \"mode=xxx\" query parameters.\n**\n** If successful, SQLITE_OK is returned. In this case *ppVfs is set to point to\n** the VFS that should be used to open the database file. *pzFile is set to\n** point to a buffer containing the name of the file to open.  The value\n** stored in *pzFile is a database name acceptable to sqlite3_uri_parameter()\n** and is in the same format as names created using sqlite3_create_filename().\n** The caller must invoke sqlite3_free_filename() (not sqlite3_free()!) on\n** the value returned in *pzFile to avoid a memory leak.\n**\n** If an error occurs, then an SQLite error code is returned and *pzErrMsg\n** may be set to point to a buffer containing an English language error\n** message. It is the responsibility of the caller to eventually release\n** this buffer by calling sqlite3_free().\n*/\nSQLITE_PRIVATE int sqlite3ParseUri(\n  const char *zDefaultVfs,        /* VFS to use if no \"vfs=xxx\" query option */\n  const char *zUri,               /* Nul-terminated URI to parse */\n  unsigned int *pFlags,           /* IN/OUT: SQLITE_OPEN_XXX flags */\n  sqlite3_vfs **ppVfs,            /* OUT: VFS to use */\n  char **pzFile,                  /* OUT: Filename component of URI */\n  char **pzErrMsg                 /* OUT: Error message (if rc!=SQLITE_OK) */\n){\n  int rc = SQLITE_OK;\n  unsigned int flags = *pFlags;\n  const char *zVfs = zDefaultVfs;\n  char *zFile;\n  char c;\n  int nUri = sqlite3Strlen30(zUri);\n\n  assert( *pzErrMsg==0 );\n\n  if( ((flags & SQLITE_OPEN_URI)                     /* IMP: R-48725-32206 */\n       || AtomicLoad(&sqlite3GlobalConfig.bOpenUri)) /* IMP: R-51689-46548 */\n   && nUri>=5 && memcmp(zUri, \"file:\", 5)==0         /* IMP: R-57884-37496 */\n  ){\n    char *zOpt;\n    int eState;                   /* Parser state when parsing URI */\n    int iIn;                      /* Input character index */\n    int iOut = 0;                 /* Output character index */\n    u64 nByte = nUri+8;           /* Bytes of space to allocate */\n\n    /* Make sure the SQLITE_OPEN_URI flag is set to indicate to the VFS xOpen\n    ** method that there may be extra parameters following the file-name.  */\n    flags |= SQLITE_OPEN_URI;\n\n    for(iIn=0; iIn<nUri; iIn++) nByte += (zUri[iIn]=='&');\n    zFile = sqlite3_malloc64(nByte);\n    if( !zFile ) return SQLITE_NOMEM_BKPT;\n\n    memset(zFile, 0, 4);  /* 4-byte of 0x00 is the start of DB name marker */\n    zFile += 4;\n\n    iIn = 5;\n#ifdef SQLITE_ALLOW_URI_AUTHORITY\n    if( strncmp(zUri+5, \"///\", 3)==0 ){\n      iIn = 7;\n      /* The following condition causes URIs with five leading / characters\n      ** like file://///host/path to be converted into UNCs like //host/path.\n      ** The correct URI for that UNC has only two or four leading / characters\n      ** file://host/path or file:////host/path.  But 5 leading slashes is a\n      ** common error, we are told, so we handle it as a special case. */\n      if( strncmp(zUri+7, \"///\", 3)==0 ){ iIn++; }\n    }else if( strncmp(zUri+5, \"//localhost/\", 12)==0 ){\n      iIn = 16;\n    }\n#else\n    /* Discard the scheme and authority segments of the URI. */\n    if( zUri[5]=='/' && zUri[6]=='/' ){\n      iIn = 7;\n      while( zUri[iIn] && zUri[iIn]!='/' ) iIn++;\n      if( iIn!=7 && (iIn!=16 || memcmp(\"localhost\", &zUri[7], 9)) ){\n        *pzErrMsg = sqlite3_mprintf(\"invalid uri authority: %.*s\",\n            iIn-7, &zUri[7]);\n        rc = SQLITE_ERROR;\n        goto parse_uri_out;\n      }\n    }\n#endif\n\n    /* Copy the filename and any query parameters into the zFile buffer.\n    ** Decode %HH escape codes along the way.\n    **\n    ** Within this loop, variable eState may be set to 0, 1 or 2, depending\n    ** on the parsing context. As follows:\n    **\n    **   0: Parsing file-name.\n    **   1: Parsing name section of a name=value query parameter.\n    **   2: Parsing value section of a name=value query parameter.\n    */\n    eState = 0;\n    while( (c = zUri[iIn])!=0 && c!='#' ){\n      iIn++;\n      if( c=='%'\n       && sqlite3Isxdigit(zUri[iIn])\n       && sqlite3Isxdigit(zUri[iIn+1])\n      ){\n        int octet = (sqlite3HexToInt(zUri[iIn++]) << 4);\n        octet += sqlite3HexToInt(zUri[iIn++]);\n\n        assert( octet>=0 && octet<256 );\n        if( octet==0 ){\n#ifndef SQLITE_ENABLE_URI_00_ERROR\n          /* This branch is taken when \"%00\" appears within the URI. In this\n          ** case we ignore all text in the remainder of the path, name or\n          ** value currently being parsed. So ignore the current character\n          ** and skip to the next \"?\", \"=\" or \"&\", as appropriate. */\n          while( (c = zUri[iIn])!=0 && c!='#'\n              && (eState!=0 || c!='?')\n              && (eState!=1 || (c!='=' && c!='&'))\n              && (eState!=2 || c!='&')\n          ){\n            iIn++;\n          }\n          continue;\n#else\n          /* If ENABLE_URI_00_ERROR is defined, \"%00\" in a URI is an error. */\n          *pzErrMsg = sqlite3_mprintf(\"unexpected %%00 in uri\");\n          rc = SQLITE_ERROR;\n          goto parse_uri_out;\n#endif\n        }\n        c = octet;\n      }else if( eState==1 && (c=='&' || c=='=') ){\n        if( zFile[iOut-1]==0 ){\n          /* An empty option name. Ignore this option altogether. */\n          while( zUri[iIn] && zUri[iIn]!='#' && zUri[iIn-1]!='&' ) iIn++;\n          continue;\n        }\n        if( c=='&' ){\n          zFile[iOut++] = '\\0';\n        }else{\n          eState = 2;\n        }\n        c = 0;\n      }else if( (eState==0 && c=='?') || (eState==2 && c=='&') ){\n        c = 0;\n        eState = 1;\n      }\n      zFile[iOut++] = c;\n    }\n    if( eState==1 ) zFile[iOut++] = '\\0';\n    memset(zFile+iOut, 0, 4); /* end-of-options + empty journal filenames */\n\n    /* Check if there were any options specified that should be interpreted\n    ** here. Options that are interpreted here include \"vfs\" and those that\n    ** correspond to flags that may be passed to the sqlite3_open_v2()\n    ** method. */\n    zOpt = &zFile[sqlite3Strlen30(zFile)+1];\n    while( zOpt[0] ){\n      int nOpt = sqlite3Strlen30(zOpt);\n      char *zVal = &zOpt[nOpt+1];\n      int nVal = sqlite3Strlen30(zVal);\n\n      if( nOpt==3 && memcmp(\"vfs\", zOpt, 3)==0 ){\n        zVfs = zVal;\n      }else{\n        struct OpenMode {\n          const char *z;\n          int mode;\n        } *aMode = 0;\n        char *zModeType = 0;\n        int mask = 0;\n        int limit = 0;\n\n        if( nOpt==5 && memcmp(\"cache\", zOpt, 5)==0 ){\n          static struct OpenMode aCacheMode[] = {\n            { \"shared\",  SQLITE_OPEN_SHAREDCACHE },\n            { \"private\", SQLITE_OPEN_PRIVATECACHE },\n            { 0, 0 }\n          };\n\n          mask = SQLITE_OPEN_SHAREDCACHE|SQLITE_OPEN_PRIVATECACHE;\n          aMode = aCacheMode;\n          limit = mask;\n          zModeType = \"cache\";\n        }\n        if( nOpt==4 && memcmp(\"mode\", zOpt, 4)==0 ){\n          static struct OpenMode aOpenMode[] = {\n            { \"ro\",  SQLITE_OPEN_READONLY },\n            { \"rw\",  SQLITE_OPEN_READWRITE },\n            { \"rwc\", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE },\n            { \"memory\", SQLITE_OPEN_MEMORY },\n            { 0, 0 }\n          };\n\n          mask = SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE\n                   | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY;\n          aMode = aOpenMode;\n          limit = mask & flags;\n          zModeType = \"access\";\n        }\n\n        if( aMode ){\n          int i;\n          int mode = 0;\n          for(i=0; aMode[i].z; i++){\n            const char *z = aMode[i].z;\n            if( nVal==sqlite3Strlen30(z) && 0==memcmp(zVal, z, nVal) ){\n              mode = aMode[i].mode;\n              break;\n            }\n          }\n          if( mode==0 ){\n            *pzErrMsg = sqlite3_mprintf(\"no such %s mode: %s\", zModeType, zVal);\n            rc = SQLITE_ERROR;\n            goto parse_uri_out;\n          }\n          if( (mode & ~SQLITE_OPEN_MEMORY)>limit ){\n            *pzErrMsg = sqlite3_mprintf(\"%s mode not allowed: %s\",\n                                        zModeType, zVal);\n            rc = SQLITE_PERM;\n            goto parse_uri_out;\n          }\n          flags = (flags & ~mask) | mode;\n        }\n      }\n\n      zOpt = &zVal[nVal+1];\n    }\n\n  }else{\n    zFile = sqlite3_malloc64(nUri+8);\n    if( !zFile ) return SQLITE_NOMEM_BKPT;\n    memset(zFile, 0, 4);\n    zFile += 4;\n    if( nUri ){\n      memcpy(zFile, zUri, nUri);\n    }\n    memset(zFile+nUri, 0, 4);\n    flags &= ~SQLITE_OPEN_URI;\n  }\n\n  *ppVfs = sqlite3_vfs_find(zVfs);\n  if( *ppVfs==0 ){\n    *pzErrMsg = sqlite3_mprintf(\"no such vfs: %s\", zVfs);\n    rc = SQLITE_ERROR;\n  }\n parse_uri_out:\n  if( rc!=SQLITE_OK ){\n    sqlite3_free_filename(zFile);\n    zFile = 0;\n  }\n  *pFlags = flags;\n  *pzFile = zFile;\n  return rc;\n}\n\n/*\n** This routine does the core work of extracting URI parameters from a\n** database filename for the sqlite3_uri_parameter() interface.\n*/\nstatic const char *uriParameter(const char *zFilename, const char *zParam){\n  zFilename += sqlite3Strlen30(zFilename) + 1;\n  while( ALWAYS(zFilename!=0) && zFilename[0] ){\n    int x = strcmp(zFilename, zParam);\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n    if( x==0 ) return zFilename;\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n  }\n  return 0;\n}\n\n\n\n/*\n** This routine does the work of opening a database on behalf of\n** sqlite3_open() and sqlite3_open16(). The database filename \"zFilename\"\n** is UTF-8 encoded.\n*/\nstatic int openDatabase(\n  const char *zFilename, /* Database filename UTF-8 encoded */\n  sqlite3 **ppDb,        /* OUT: Returned database handle */\n  unsigned int flags,    /* Operational flags */\n  const char *zVfs       /* Name of the VFS to use */\n){\n  sqlite3 *db;                    /* Store allocated handle here */\n  int rc;                         /* Return code */\n  int isThreadsafe;               /* True for threadsafe connections */\n  char *zOpen = 0;                /* Filename argument to pass to BtreeOpen() */\n  char *zErrMsg = 0;              /* Error message from sqlite3ParseUri() */\n  int i;                          /* Loop counter */\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ppDb==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  *ppDb = 0;\n#ifndef SQLITE_OMIT_AUTOINIT\n  rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n\n  if( sqlite3GlobalConfig.bCoreMutex==0 ){\n    isThreadsafe = 0;\n  }else if( flags & SQLITE_OPEN_NOMUTEX ){\n    isThreadsafe = 0;\n  }else if( flags & SQLITE_OPEN_FULLMUTEX ){\n    isThreadsafe = 1;\n  }else{\n    isThreadsafe = sqlite3GlobalConfig.bFullMutex;\n  }\n\n  if( flags & SQLITE_OPEN_PRIVATECACHE ){\n    flags &= ~SQLITE_OPEN_SHAREDCACHE;\n  }else if( sqlite3GlobalConfig.sharedCacheEnabled ){\n    flags |= SQLITE_OPEN_SHAREDCACHE;\n  }\n\n  /* Remove harmful bits from the flags parameter\n  **\n  ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were\n  ** dealt with in the previous code block.  Besides these, the only\n  ** valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY,\n  ** SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE, SQLITE_OPEN_SHAREDCACHE,\n  ** SQLITE_OPEN_PRIVATECACHE, SQLITE_OPEN_EXRESCODE, and some reserved\n  ** bits.  Silently mask off all other flags.\n  */\n  flags &=  ~( SQLITE_OPEN_DELETEONCLOSE |\n               SQLITE_OPEN_EXCLUSIVE |\n               SQLITE_OPEN_MAIN_DB |\n               SQLITE_OPEN_TEMP_DB |\n               SQLITE_OPEN_TRANSIENT_DB |\n               SQLITE_OPEN_MAIN_JOURNAL |\n               SQLITE_OPEN_TEMP_JOURNAL |\n               SQLITE_OPEN_SUBJOURNAL |\n               SQLITE_OPEN_SUPER_JOURNAL |\n               SQLITE_OPEN_NOMUTEX |\n               SQLITE_OPEN_FULLMUTEX |\n               SQLITE_OPEN_WAL\n             );\n\n  /* Allocate the sqlite data structure */\n  db = sqlite3MallocZero( sizeof(sqlite3) );\n  if( db==0 ) goto opendb_out;\n  if( isThreadsafe\n#ifdef SQLITE_ENABLE_MULTITHREADED_CHECKS\n   || sqlite3GlobalConfig.bCoreMutex\n#endif\n  ){\n    db->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);\n    if( db->mutex==0 ){\n      sqlite3_free(db);\n      db = 0;\n      goto opendb_out;\n    }\n    if( isThreadsafe==0 ){\n      sqlite3MutexWarnOnContention(db->mutex);\n    }\n  }\n  sqlite3_mutex_enter(db->mutex);\n  db->errMask = (flags & SQLITE_OPEN_EXRESCODE)!=0 ? 0xffffffff : 0xff;\n  db->nDb = 2;\n  db->eOpenState = SQLITE_STATE_BUSY;\n  db->aDb = db->aDbStatic;\n  db->lookaside.bDisable = 1;\n  db->lookaside.sz = 0;\n\n  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );\n  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));\n  db->aLimit[SQLITE_LIMIT_WORKER_THREADS] = SQLITE_DEFAULT_WORKER_THREADS;\n  db->autoCommit = 1;\n  db->nextAutovac = -1;\n  db->szMmap = sqlite3GlobalConfig.szMmap;\n  db->nextPagesize = 0;\n  db->init.azInit = sqlite3StdType; /* Any array of string ptrs will do */\n#ifdef SQLITE_ENABLE_SORTER_MMAP\n  /* Beginning with version 3.37.0, using the VFS xFetch() API to memory-map\n  ** the temporary files used to do external sorts (see code in vdbesort.c)\n  ** is disabled. It can still be used either by defining\n  ** SQLITE_ENABLE_SORTER_MMAP at compile time or by using the\n  ** SQLITE_TESTCTRL_SORTER_MMAP test-control at runtime. */\n  db->nMaxSorterMmap = 0x7FFFFFFF;\n#endif\n  db->flags |= SQLITE_ShortColNames\n                 | SQLITE_EnableTrigger\n                 | SQLITE_EnableView\n                 | SQLITE_CacheSpill\n                 | SQLITE_AttachCreate\n                 | SQLITE_AttachWrite\n                 | SQLITE_Comments\n#if !defined(SQLITE_TRUSTED_SCHEMA) || SQLITE_TRUSTED_SCHEMA+0!=0\n                 | SQLITE_TrustedSchema\n#endif\n/* The SQLITE_DQS compile-time option determines the default settings\n** for SQLITE_DBCONFIG_DQS_DDL and SQLITE_DBCONFIG_DQS_DML.\n**\n**    SQLITE_DQS     SQLITE_DBCONFIG_DQS_DDL    SQLITE_DBCONFIG_DQS_DML\n**    ----------     -----------------------    -----------------------\n**     undefined               on                          on\n**         3                   on                          on\n**         2                   on                         off\n**         1                  off                          on\n**         0                  off                         off\n**\n** Legacy behavior is 3 (double-quoted string literals are allowed anywhere)\n** and so that is the default.  But developers are encouraged to use\n** -DSQLITE_DQS=0 (best) or -DSQLITE_DQS=1 (second choice) if possible.\n*/\n#if !defined(SQLITE_DQS)\n# define SQLITE_DQS 3\n#endif\n#if (SQLITE_DQS&1)==1\n                 | SQLITE_DqsDML\n#endif\n#if (SQLITE_DQS&2)==2\n                 | SQLITE_DqsDDL\n#endif\n\n#if !defined(SQLITE_DEFAULT_AUTOMATIC_INDEX) || SQLITE_DEFAULT_AUTOMATIC_INDEX\n                 | SQLITE_AutoIndex\n#endif\n#if SQLITE_DEFAULT_CKPTFULLFSYNC\n                 | SQLITE_CkptFullFSync\n#endif\n#if SQLITE_DEFAULT_FILE_FORMAT<4\n                 | SQLITE_LegacyFileFmt\n#endif\n#ifdef SQLITE_ENABLE_LOAD_EXTENSION\n                 | SQLITE_LoadExtension\n#endif\n#if SQLITE_DEFAULT_RECURSIVE_TRIGGERS\n                 | SQLITE_RecTriggers\n#endif\n#if defined(SQLITE_DEFAULT_FOREIGN_KEYS) && SQLITE_DEFAULT_FOREIGN_KEYS\n                 | SQLITE_ForeignKeys\n#endif\n#if defined(SQLITE_REVERSE_UNORDERED_SELECTS)\n                 | SQLITE_ReverseOrder\n#endif\n#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)\n                 | SQLITE_CellSizeCk\n#endif\n#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)\n                 | SQLITE_Fts3Tokenizer\n#endif\n#if defined(SQLITE_ENABLE_QPSG)\n                 | SQLITE_EnableQPSG\n#endif\n#if defined(SQLITE_DEFAULT_DEFENSIVE)\n                 | SQLITE_Defensive\n#endif\n#if defined(SQLITE_DEFAULT_LEGACY_ALTER_TABLE)\n                 | SQLITE_LegacyAlter\n#endif\n#if defined(SQLITE_ENABLE_STMT_SCANSTATUS)\n                 | SQLITE_StmtScanStatus\n#endif\n      ;\n  sqlite3HashInit(&db->aCollSeq);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  sqlite3HashInit(&db->aModule);\n#endif\n\n  /* Add the default collation sequence BINARY. BINARY works for both UTF-8\n  ** and UTF-16, so add a version for each to avoid any unnecessary\n  ** conversions. The only error that can occur here is a malloc() failure.\n  **\n  ** EVIDENCE-OF: R-52786-44878 SQLite defines three built-in collating\n  ** functions:\n  */\n  createCollation(db, sqlite3StrBINARY, SQLITE_UTF8, 0, binCollFunc, 0);\n  createCollation(db, sqlite3StrBINARY, SQLITE_UTF16BE, 0, binCollFunc, 0);\n  createCollation(db, sqlite3StrBINARY, SQLITE_UTF16LE, 0, binCollFunc, 0);\n  createCollation(db, \"NOCASE\", SQLITE_UTF8, 0, nocaseCollatingFunc, 0);\n  createCollation(db, \"RTRIM\", SQLITE_UTF8, 0, rtrimCollFunc, 0);\n  if( db->mallocFailed ){\n    goto opendb_out;\n  }\n\n#if SQLITE_OS_UNIX && defined(SQLITE_OS_KV_OPTIONAL)\n  /* Process magic filenames \":localStorage:\" and \":sessionStorage:\" */\n  if( zFilename && zFilename[0]==':' ){\n    if( strcmp(zFilename, \":localStorage:\")==0 ){\n      zFilename = \"file:local?vfs=kvvfs\";\n      flags |= SQLITE_OPEN_URI;\n    }else if( strcmp(zFilename, \":sessionStorage:\")==0 ){\n      zFilename = \"file:session?vfs=kvvfs\";\n      flags |= SQLITE_OPEN_URI;\n    }\n  }\n#endif /* SQLITE_OS_UNIX && defined(SQLITE_OS_KV_OPTIONAL) */\n\n  /* Parse the filename/URI argument\n  **\n  ** Only allow sensible combinations of bits in the flags argument.\n  ** Throw an error if any non-sense combination is used.  If we\n  ** do not block illegal combinations here, it could trigger\n  ** assert() statements in deeper layers.  Sensible combinations\n  ** are:\n  **\n  **  1:  SQLITE_OPEN_READONLY\n  **  2:  SQLITE_OPEN_READWRITE\n  **  6:  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE\n  */\n  db->openFlags = flags;\n  assert( SQLITE_OPEN_READONLY  == 0x01 );\n  assert( SQLITE_OPEN_READWRITE == 0x02 );\n  assert( SQLITE_OPEN_CREATE    == 0x04 );\n  testcase( (1<<(flags&7))==0x02 ); /* READONLY */\n  testcase( (1<<(flags&7))==0x04 ); /* READWRITE */\n  testcase( (1<<(flags&7))==0x40 ); /* READWRITE | CREATE */\n  if( ((1<<(flags&7)) & 0x46)==0 ){\n    rc = SQLITE_MISUSE_BKPT;  /* IMP: R-18321-05872 */\n  }else{\n    if( zFilename==0 ) zFilename = \":memory:\";\n    rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg);\n  }\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_NOMEM ) sqlite3OomFault(db);\n    sqlite3ErrorWithMsg(db, rc, zErrMsg ? \"%s\" : 0, zErrMsg);\n    sqlite3_free(zErrMsg);\n    goto opendb_out;\n  }\n  assert( db->pVfs!=0 );\n#if SQLITE_OS_KV || defined(SQLITE_OS_KV_OPTIONAL)\n  if( sqlite3_stricmp(db->pVfs->zName, \"kvvfs\")==0 ){\n    db->temp_store = 2;\n  }\n#endif\n\n  /* Open the backend database driver */\n  rc = sqlite3BtreeOpen(db->pVfs, zOpen, db, &db->aDb[0].pBt, 0,\n                        flags | SQLITE_OPEN_MAIN_DB);\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_IOERR_NOMEM ){\n      rc = SQLITE_NOMEM_BKPT;\n    }\n    sqlite3Error(db, rc);\n    goto opendb_out;\n  }\n  sqlite3BtreeEnter(db->aDb[0].pBt);\n  db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt);\n  if( !db->mallocFailed ){\n    sqlite3SetTextEncoding(db, SCHEMA_ENC(db));\n  }\n  sqlite3BtreeLeave(db->aDb[0].pBt);\n  db->aDb[1].pSchema = sqlite3SchemaGet(db, 0);\n\n  /* The default safety_level for the main database is FULL; for the temp\n  ** database it is OFF. This matches the pager layer defaults.\n  */\n  db->aDb[0].zDbSName = \"main\";\n  db->aDb[0].safety_level = SQLITE_DEFAULT_SYNCHRONOUS+1;\n  db->aDb[1].zDbSName = \"temp\";\n  db->aDb[1].safety_level = PAGER_SYNCHRONOUS_OFF;\n\n  db->eOpenState = SQLITE_STATE_OPEN;\n  if( db->mallocFailed ){\n    goto opendb_out;\n  }\n\n  /* Register all built-in functions, but do not attempt to read the\n  ** database schema yet. This is delayed until the first time the database\n  ** is accessed.\n  */\n  sqlite3Error(db, SQLITE_OK);\n  sqlite3RegisterPerConnectionBuiltinFunctions(db);\n  rc = sqlite3_errcode(db);\n\n\n  /* Load compiled-in extensions */\n  for(i=0; rc==SQLITE_OK && i<ArraySize(sqlite3BuiltinExtensions); i++){\n    rc = sqlite3BuiltinExtensions[i](db);\n  }\n\n  /* Load automatic extensions - extensions that have been registered\n  ** using the sqlite3_automatic_extension() API.\n  */\n  if( rc==SQLITE_OK ){\n    sqlite3AutoLoadExtensions(db);\n    rc = sqlite3_errcode(db);\n    if( rc!=SQLITE_OK ){\n      goto opendb_out;\n    }\n  }\n\n#ifdef SQLITE_ENABLE_INTERNAL_FUNCTIONS\n  /* Testing use only!!! The -DSQLITE_ENABLE_INTERNAL_FUNCTIONS=1 compile-time\n  ** option gives access to internal functions by default.\n  ** Testing use only!!! */\n  db->mDbFlags |= DBFLAG_InternalFunc;\n#endif\n\n  /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking\n  ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking\n  ** mode.  Doing nothing at all also makes NORMAL the default.\n  */\n#ifdef SQLITE_DEFAULT_LOCKING_MODE\n  db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;\n  sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),\n                          SQLITE_DEFAULT_LOCKING_MODE);\n#endif\n\n  if( rc ) sqlite3Error(db, rc);\n\n  /* Enable the lookaside-malloc subsystem */\n  setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,\n                        sqlite3GlobalConfig.nLookaside);\n\n  sqlite3_wal_autocheckpoint(db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT);\n\nopendb_out:\n  if( db ){\n    assert( db->mutex!=0 || isThreadsafe==0\n           || sqlite3GlobalConfig.bFullMutex==0 );\n    sqlite3_mutex_leave(db->mutex);\n  }\n  rc = sqlite3_errcode(db);\n  assert( db!=0 || (rc&0xff)==SQLITE_NOMEM );\n  if( (rc&0xff)==SQLITE_NOMEM ){\n    sqlite3_close(db);\n    db = 0;\n  }else if( rc!=SQLITE_OK ){\n    db->eOpenState = SQLITE_STATE_SICK;\n  }\n  *ppDb = db;\n#ifdef SQLITE_ENABLE_SQLLOG\n  if( sqlite3GlobalConfig.xSqllog ){\n    /* Opening a db handle. Fourth parameter is passed 0. */\n    void *pArg = sqlite3GlobalConfig.pSqllogArg;\n    sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);\n  }\n#endif\n  sqlite3_free_filename(zOpen);\n  return rc;\n}\n\n\n/*\n** Open a new database handle.\n*/\nSQLITE_API int sqlite3_open(\n  const char *zFilename,\n  sqlite3 **ppDb\n){\n  return openDatabase(zFilename, ppDb,\n                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);\n}\nSQLITE_API int sqlite3_open_v2(\n  const char *filename,   /* Database filename (UTF-8) */\n  sqlite3 **ppDb,         /* OUT: SQLite db handle */\n  int flags,              /* Flags */\n  const char *zVfs        /* Name of VFS module to use */\n){\n  return openDatabase(filename, ppDb, (unsigned int)flags, zVfs);\n}\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Open a new database handle.\n*/\nSQLITE_API int sqlite3_open16(\n  const void *zFilename,\n  sqlite3 **ppDb\n){\n  char const *zFilename8;   /* zFilename encoded in UTF-8 instead of UTF-16 */\n  sqlite3_value *pVal;\n  int rc;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( ppDb==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  *ppDb = 0;\n#ifndef SQLITE_OMIT_AUTOINIT\n  rc = sqlite3_initialize();\n  if( rc ) return rc;\n#endif\n  if( zFilename==0 ) zFilename = \"\\000\\000\";\n  pVal = sqlite3ValueNew(0);\n  sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);\n  zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);\n  if( zFilename8 ){\n    rc = openDatabase(zFilename8, ppDb,\n                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);\n    assert( *ppDb || rc==SQLITE_NOMEM );\n    if( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){\n      SCHEMA_ENC(*ppDb) = ENC(*ppDb) = SQLITE_UTF16NATIVE;\n    }\n  }else{\n    rc = SQLITE_NOMEM_BKPT;\n  }\n  sqlite3ValueFree(pVal);\n\n  return rc & 0xff;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Register a new collation sequence with the database handle db.\n*/\nSQLITE_API int sqlite3_create_collation(\n  sqlite3* db,\n  const char *zName,\n  int enc,\n  void* pCtx,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n){\n  return sqlite3_create_collation_v2(db, zName, enc, pCtx, xCompare, 0);\n}\n\n/*\n** Register a new collation sequence with the database handle db.\n*/\nSQLITE_API int sqlite3_create_collation_v2(\n  sqlite3* db,\n  const char *zName,\n  int enc,\n  void* pCtx,\n  int(*xCompare)(void*,int,const void*,int,const void*),\n  void(*xDel)(void*)\n){\n  int rc;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  assert( !db->mallocFailed );\n  rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Register a new collation sequence with the database handle db.\n*/\nSQLITE_API int sqlite3_create_collation16(\n  sqlite3* db,\n  const void *zName,\n  int enc,\n  void* pCtx,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n){\n  int rc = SQLITE_OK;\n  char *zName8;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  assert( !db->mallocFailed );\n  zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);\n  if( zName8 ){\n    rc = createCollation(db, zName8, (u8)enc, pCtx, xCompare, 0);\n    sqlite3DbFree(db, zName8);\n  }\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Register a collation sequence factory callback with the database handle\n** db. Replace any previously installed collation sequence factory.\n*/\nSQLITE_API int sqlite3_collation_needed(\n  sqlite3 *db,\n  void *pCollNeededArg,\n  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->xCollNeeded = xCollNeeded;\n  db->xCollNeeded16 = 0;\n  db->pCollNeededArg = pCollNeededArg;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n#ifndef SQLITE_OMIT_UTF16\n/*\n** Register a collation sequence factory callback with the database handle\n** db. Replace any previously installed collation sequence factory.\n*/\nSQLITE_API int sqlite3_collation_needed16(\n  sqlite3 *db,\n  void *pCollNeededArg,\n  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)\n){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->xCollNeeded = 0;\n  db->xCollNeeded16 = xCollNeeded16;\n  db->pCollNeededArg = pCollNeededArg;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n#endif /* SQLITE_OMIT_UTF16 */\n\n/*\n** Find existing client data.\n*/\nSQLITE_API void *sqlite3_get_clientdata(sqlite3 *db, const char *zName){\n  DbClientData *p;\n  sqlite3_mutex_enter(db->mutex);\n  for(p=db->pDbData; p; p=p->pNext){\n    if( strcmp(p->zName, zName)==0 ){\n      void *pResult = p->pData;\n      sqlite3_mutex_leave(db->mutex);\n      return pResult;\n    }\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return 0;\n}\n\n/*\n** Add new client data to a database connection.\n*/\nSQLITE_API int sqlite3_set_clientdata(\n  sqlite3 *db,                   /* Attach client data to this connection */\n  const char *zName,             /* Name of the client data */\n  void *pData,                   /* The client data itself */\n  void (*xDestructor)(void*)     /* Destructor */\n){\n  DbClientData *p, **pp;\n  sqlite3_mutex_enter(db->mutex);\n  pp = &db->pDbData;\n  for(p=db->pDbData; p && strcmp(p->zName,zName); p=p->pNext){\n    pp = &p->pNext;\n  }\n  if( p ){\n    assert( p->pData!=0 );\n    if( p->xDestructor ) p->xDestructor(p->pData);\n    if( pData==0 ){\n      *pp = p->pNext;\n      sqlite3_free(p);\n      sqlite3_mutex_leave(db->mutex);\n      return SQLITE_OK;\n    }\n  }else if( pData==0 ){\n    sqlite3_mutex_leave(db->mutex);\n    return SQLITE_OK;\n  }else{\n    size_t n = strlen(zName);\n    p = sqlite3_malloc64( SZ_DBCLIENTDATA(n+1) );\n    if( p==0 ){\n      if( xDestructor ) xDestructor(pData);\n      sqlite3_mutex_leave(db->mutex);\n      return SQLITE_NOMEM;\n    }\n    memcpy(p->zName, zName, n+1);\n    p->pNext = db->pDbData;\n    db->pDbData = p;\n  }\n  p->pData = pData;\n  p->xDestructor = xDestructor;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** This function is now an anachronism. It used to be used to recover from a\n** malloc() failure, but SQLite now does this automatically.\n*/\nSQLITE_API int sqlite3_global_recover(void){\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** Test to see whether or not the database connection is in autocommit\n** mode.  Return TRUE if it is and FALSE if not.  Autocommit mode is on\n** by default.  Autocommit is disabled by a BEGIN statement and reenabled\n** by the next COMMIT or ROLLBACK.\n*/\nSQLITE_API int sqlite3_get_autocommit(sqlite3 *db){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  return db->autoCommit;\n}\n\n/*\n** The following routines are substitutes for constants SQLITE_CORRUPT,\n** SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_NOMEM and possibly other error\n** constants.  They serve two purposes:\n**\n**   1.  Serve as a convenient place to set a breakpoint in a debugger\n**       to detect when version error conditions occurs.\n**\n**   2.  Invoke sqlite3_log() to provide the source code location where\n**       a low-level error is first detected.\n*/\nSQLITE_PRIVATE int sqlite3ReportError(int iErr, int lineno, const char *zType){\n  sqlite3_log(iErr, \"%s at line %d of [%.10s]\",\n              zType, lineno, 20+sqlite3_sourceid());\n  return iErr;\n}\nSQLITE_PRIVATE int sqlite3CorruptError(int lineno){\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_CORRUPT, lineno, \"database corruption\");\n}\nSQLITE_PRIVATE int sqlite3MisuseError(int lineno){\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_MISUSE, lineno, \"misuse\");\n}\nSQLITE_PRIVATE int sqlite3CantopenError(int lineno){\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_CANTOPEN, lineno, \"cannot open file\");\n}\n#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_CORRUPT_PGNO)\nSQLITE_PRIVATE int sqlite3CorruptPgnoError(int lineno, Pgno pgno){\n  char zMsg[100];\n  sqlite3_snprintf(sizeof(zMsg), zMsg, \"database corruption page %d\", pgno);\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_CORRUPT, lineno, zMsg);\n}\n#endif\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3NomemError(int lineno){\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_NOMEM, lineno, \"OOM\");\n}\nSQLITE_PRIVATE int sqlite3IoerrnomemError(int lineno){\n  testcase( sqlite3GlobalConfig.xLog!=0 );\n  return sqlite3ReportError(SQLITE_IOERR_NOMEM, lineno, \"I/O OOM error\");\n}\n#endif\n\n#ifndef SQLITE_OMIT_DEPRECATED\n/*\n** This is a convenience routine that makes sure that all thread-specific\n** data for this thread has been deallocated.\n**\n** SQLite no longer uses thread-specific data so this routine is now a\n** no-op.  It is retained for historical compatibility.\n*/\nSQLITE_API void sqlite3_thread_cleanup(void){\n}\n#endif\n\n/*\n** Return meta information about a specific column of a database table.\n** See comment in sqlite3.h (sqlite.h.in) for details.\n*/\nSQLITE_API int sqlite3_table_column_metadata(\n  sqlite3 *db,                /* Connection handle */\n  const char *zDbName,        /* Database name or NULL */\n  const char *zTableName,     /* Table name */\n  const char *zColumnName,    /* Column name */\n  char const **pzDataType,    /* OUTPUT: Declared data type */\n  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */\n  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */\n  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */\n  int *pAutoinc               /* OUTPUT: True if column is auto-increment */\n){\n  int rc;\n  char *zErrMsg = 0;\n  Table *pTab = 0;\n  Column *pCol = 0;\n  int iCol = 0;\n  char const *zDataType = 0;\n  char const *zCollSeq = 0;\n  int notnull = 0;\n  int primarykey = 0;\n  int autoinc = 0;\n\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) || zTableName==0 ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n\n  /* Ensure the database schema has been loaded */\n  sqlite3_mutex_enter(db->mutex);\n  sqlite3BtreeEnterAll(db);\n  rc = sqlite3Init(db, &zErrMsg);\n  if( SQLITE_OK!=rc ){\n    goto error_out;\n  }\n\n  /* Locate the table in question */\n  pTab = sqlite3FindTable(db, zTableName, zDbName);\n  if( !pTab || IsView(pTab) ){\n    pTab = 0;\n    goto error_out;\n  }\n\n  /* Find the column for which info is requested */\n  if( zColumnName==0 ){\n    /* Query for existence of table only */\n  }else{\n    iCol = sqlite3ColumnIndex(pTab, zColumnName);\n    if( iCol>=0 ){\n      pCol = &pTab->aCol[iCol];\n    }else{\n      if( HasRowid(pTab) && sqlite3IsRowid(zColumnName) ){\n        iCol = pTab->iPKey;\n        pCol = iCol>=0 ? &pTab->aCol[iCol] : 0;\n      }else{\n        pTab = 0;\n        goto error_out;\n      }\n    }\n  }\n\n  /* The following block stores the meta information that will be returned\n  ** to the caller in local variables zDataType, zCollSeq, notnull, primarykey\n  ** and autoinc. At this point there are two possibilities:\n  **\n  **     1. The specified column name was rowid\", \"oid\" or \"_rowid_\"\n  **        and there is no explicitly declared IPK column.\n  **\n  **     2. The table is not a view and the column name identified an\n  **        explicitly declared column. Copy meta information from *pCol.\n  */\n  if( pCol ){\n    zDataType = sqlite3ColumnType(pCol,0);\n    zCollSeq = sqlite3ColumnColl(pCol);\n    notnull = pCol->notNull!=0;\n    primarykey  = (pCol->colFlags & COLFLAG_PRIMKEY)!=0;\n    autoinc = pTab->iPKey==iCol && (pTab->tabFlags & TF_Autoincrement)!=0;\n  }else{\n    zDataType = \"INTEGER\";\n    primarykey = 1;\n  }\n  if( !zCollSeq ){\n    zCollSeq = sqlite3StrBINARY;\n  }\n\nerror_out:\n  sqlite3BtreeLeaveAll(db);\n\n  /* Whether the function call succeeded or failed, set the output parameters\n  ** to whatever their local counterparts contain. If an error did occur,\n  ** this has the effect of zeroing all output parameters.\n  */\n  if( pzDataType ) *pzDataType = zDataType;\n  if( pzCollSeq ) *pzCollSeq = zCollSeq;\n  if( pNotNull ) *pNotNull = notnull;\n  if( pPrimaryKey ) *pPrimaryKey = primarykey;\n  if( pAutoinc ) *pAutoinc = autoinc;\n\n  if( SQLITE_OK==rc && !pTab ){\n    sqlite3DbFree(db, zErrMsg);\n    zErrMsg = sqlite3MPrintf(db, \"no such table column: %s.%s\", zTableName,\n        zColumnName);\n    rc = SQLITE_ERROR;\n  }\n  sqlite3ErrorWithMsg(db, rc, (zErrMsg?\"%s\":0), zErrMsg);\n  sqlite3DbFree(db, zErrMsg);\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Sleep for a little while.  Return the amount of time slept.\n*/\nSQLITE_API int sqlite3_sleep(int ms){\n  sqlite3_vfs *pVfs;\n  int rc;\n  pVfs = sqlite3_vfs_find(0);\n  if( pVfs==0 ) return 0;\n\n  /* This function works in milliseconds, but the underlying OsSleep()\n  ** API uses microseconds. Hence the 1000's.\n  */\n  rc = (sqlite3OsSleep(pVfs, ms<0 ? 0 : 1000*ms)/1000);\n  return rc;\n}\n\n/*\n** Enable or disable the extended result codes.\n*/\nSQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  db->errMask = onoff ? 0xffffffff : 0xff;\n  sqlite3_mutex_leave(db->mutex);\n  return SQLITE_OK;\n}\n\n/*\n** Invoke the xFileControl method on a particular database.\n*/\nSQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){\n  int rc = SQLITE_ERROR;\n  Btree *pBtree;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  pBtree = sqlite3DbNameToBtree(db, zDbName);\n  if( pBtree ){\n    Pager *pPager;\n    sqlite3_file *fd;\n    sqlite3BtreeEnter(pBtree);\n    pPager = sqlite3BtreePager(pBtree);\n    assert( pPager!=0 );\n    fd = sqlite3PagerFile(pPager);\n    assert( fd!=0 );\n    if( op==SQLITE_FCNTL_FILE_POINTER ){\n      *(sqlite3_file**)pArg = fd;\n      rc = SQLITE_OK;\n    }else if( op==SQLITE_FCNTL_VFS_POINTER ){\n      *(sqlite3_vfs**)pArg = sqlite3PagerVfs(pPager);\n      rc = SQLITE_OK;\n    }else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){\n      *(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);\n      rc = SQLITE_OK;\n    }else if( op==SQLITE_FCNTL_DATA_VERSION ){\n      *(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);\n      rc = SQLITE_OK;\n    }else if( op==SQLITE_FCNTL_RESERVE_BYTES ){\n      int iNew = *(int*)pArg;\n      *(int*)pArg = sqlite3BtreeGetRequestedReserve(pBtree);\n      if( iNew>=0 && iNew<=255 ){\n        sqlite3BtreeSetPageSize(pBtree, 0, iNew, 0);\n      }\n      rc = SQLITE_OK;\n    }else if( op==SQLITE_FCNTL_RESET_CACHE ){\n      sqlite3BtreeClearCache(pBtree);\n      rc = SQLITE_OK;\n    }else{\n      int nSave = db->busyHandler.nBusy;\n      rc = sqlite3OsFileControl(fd, op, pArg);\n      db->busyHandler.nBusy = nSave;\n    }\n    sqlite3BtreeLeave(pBtree);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** Interface to the testing logic.\n*/\nSQLITE_API int sqlite3_test_control(int op, ...){\n  int rc = 0;\n#ifdef SQLITE_UNTESTABLE\n  UNUSED_PARAMETER(op);\n#else\n  va_list ap;\n  va_start(ap, op);\n  switch( op ){\n\n    /*\n    ** Save the current state of the PRNG.\n    */\n    case SQLITE_TESTCTRL_PRNG_SAVE: {\n      sqlite3PrngSaveState();\n      break;\n    }\n\n    /*\n    ** Restore the state of the PRNG to the last state saved using\n    ** PRNG_SAVE.  If PRNG_SAVE has never before been called, then\n    ** this verb acts like PRNG_RESET.\n    */\n    case SQLITE_TESTCTRL_PRNG_RESTORE: {\n      sqlite3PrngRestoreState();\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_PRNG_SEED, int x, sqlite3 *db);\n    **\n    ** Control the seed for the pseudo-random number generator (PRNG) that\n    ** is built into SQLite.  Cases:\n    **\n    **    x!=0 && db!=0       Seed the PRNG to the current value of the\n    **                        schema cookie in the main database for db, or\n    **                        x if the schema cookie is zero.  This case\n    **                        is convenient to use with database fuzzers\n    **                        as it allows the fuzzer some control over the\n    **                        the PRNG seed.\n    **\n    **    x!=0 && db==0       Seed the PRNG to the value of x.\n    **\n    **    x==0 && db==0       Revert to default behavior of using the\n    **                        xRandomness method on the primary VFS.\n    **\n    ** This test-control also resets the PRNG so that the new seed will\n    ** be used for the next call to sqlite3_randomness().\n    */\n#ifndef SQLITE_OMIT_WSD\n    case SQLITE_TESTCTRL_PRNG_SEED: {\n      int x = va_arg(ap, int);\n      int y;\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      assert( db==0 || db->aDb[0].pSchema!=0 );\n      if( db && (y = db->aDb[0].pSchema->schema_cookie)!=0 ){ x = y; }\n      sqlite3Config.iPrngSeed = x;\n      sqlite3_randomness(0,0);\n      break;\n    }\n#endif\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_FK_NO_ACTION, sqlite3 *db, int b);\n    **\n    ** If b is true, then activate the SQLITE_FkNoAction setting.  If b is\n    ** false then clear that setting.  If the SQLITE_FkNoAction setting is\n    ** enabled, all foreign key ON DELETE and ON UPDATE actions behave as if\n    ** they were NO ACTION, regardless of how they are defined.\n    **\n    ** NB:  One must usually run \"PRAGMA writable_schema=RESET\" after\n    ** using this test-control, before it will take full effect.  failing\n    ** to reset the schema can result in some unexpected behavior.\n    */\n    case SQLITE_TESTCTRL_FK_NO_ACTION: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      int b = va_arg(ap, int);\n      if( b ){\n        db->flags |= SQLITE_FkNoAction;\n      }else{\n        db->flags &= ~SQLITE_FkNoAction;\n      }\n      break;\n    }\n\n    /*\n    **  sqlite3_test_control(BITVEC_TEST, size, program)\n    **\n    ** Run a test against a Bitvec object of size.  The program argument\n    ** is an array of integers that defines the test.  Return -1 on a\n    ** memory allocation error, 0 on success, or non-zero for an error.\n    ** See the sqlite3BitvecBuiltinTest() for additional information.\n    */\n    case SQLITE_TESTCTRL_BITVEC_TEST: {\n      int sz = va_arg(ap, int);\n      int *aProg = va_arg(ap, int*);\n      rc = sqlite3BitvecBuiltinTest(sz, aProg);\n      break;\n    }\n\n    /*\n    **  sqlite3_test_control(FAULT_INSTALL, xCallback)\n    **\n    ** Arrange to invoke xCallback() whenever sqlite3FaultSim() is called,\n    ** if xCallback is not NULL.\n    **\n    ** As a test of the fault simulator mechanism itself, sqlite3FaultSim(0)\n    ** is called immediately after installing the new callback and the return\n    ** value from sqlite3FaultSim(0) becomes the return from\n    ** sqlite3_test_control().\n    */\n    case SQLITE_TESTCTRL_FAULT_INSTALL: {\n      /* A bug in MSVC prevents it from understanding pointers to functions\n      ** types in the second argument to va_arg().  Work around the problem\n      ** using a typedef.\n      ** http://support.microsoft.com/kb/47961  <-- dead hyperlink\n      ** Search at http://web.archive.org/ to find the 2015-03-16 archive\n      ** of the link above to see the original text.\n      ** sqlite3GlobalConfig.xTestCallback = va_arg(ap, int(*)(int));\n      */\n      typedef int(*sqlite3FaultFuncType)(int);\n      sqlite3GlobalConfig.xTestCallback = va_arg(ap, sqlite3FaultFuncType);\n      rc = sqlite3FaultSim(0);\n      break;\n    }\n\n    /*\n    **  sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd)\n    **\n    ** Register hooks to call to indicate which malloc() failures\n    ** are benign.\n    */\n    case SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: {\n      typedef void (*void_function)(void);\n      void_function xBenignBegin;\n      void_function xBenignEnd;\n      xBenignBegin = va_arg(ap, void_function);\n      xBenignEnd = va_arg(ap, void_function);\n      sqlite3BenignMallocHooks(xBenignBegin, xBenignEnd);\n      break;\n    }\n\n    /*\n    **  sqlite3_test_control(SQLITE_TESTCTRL_PENDING_BYTE, unsigned int X)\n    **\n    ** Set the PENDING byte to the value in the argument, if X>0.\n    ** Make no changes if X==0.  Return the value of the pending byte\n    ** as it existing before this routine was called.\n    **\n    ** IMPORTANT:  Changing the PENDING byte from 0x40000000 results in\n    ** an incompatible database file format.  Changing the PENDING byte\n    ** while any database connection is open results in undefined and\n    ** deleterious behavior.\n    */\n    case SQLITE_TESTCTRL_PENDING_BYTE: {\n      rc = PENDING_BYTE;\n#ifndef SQLITE_OMIT_WSD\n      {\n        unsigned int newVal = va_arg(ap, unsigned int);\n        if( newVal ) sqlite3PendingByte = newVal;\n      }\n#endif\n      break;\n    }\n\n    /*\n    **  sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, int X)\n    **\n    ** This action provides a run-time test to see whether or not\n    ** assert() was enabled at compile-time.  If X is true and assert()\n    ** is enabled, then the return value is true.  If X is true and\n    ** assert() is disabled, then the return value is zero.  If X is\n    ** false and assert() is enabled, then the assertion fires and the\n    ** process aborts.  If X is false and assert() is disabled, then the\n    ** return value is zero.\n    */\n    case SQLITE_TESTCTRL_ASSERT: {\n      volatile int x = 0;\n      assert( /*side-effects-ok*/ (x = va_arg(ap,int))!=0 );\n      rc = x;\n#if defined(SQLITE_DEBUG)\n      /* Invoke these debugging routines so that the compiler does not\n      ** issue \"defined but not used\" warnings. */\n      if( x==9999 ){\n        sqlite3ShowExpr(0);\n        sqlite3ShowExprList(0);\n        sqlite3ShowIdList(0);\n        sqlite3ShowSrcList(0);\n        sqlite3ShowWith(0);\n        sqlite3ShowUpsert(0);\n#ifndef SQLITE_OMIT_TRIGGER\n        sqlite3ShowTriggerStep(0);\n        sqlite3ShowTriggerStepList(0);\n        sqlite3ShowTrigger(0);\n        sqlite3ShowTriggerList(0);\n#endif\n#ifndef SQLITE_OMIT_WINDOWFUNC\n        sqlite3ShowWindow(0);\n        sqlite3ShowWinFunc(0);\n#endif\n        sqlite3ShowSelect(0);\n      }\n#endif\n      break;\n    }\n\n\n    /*\n    **  sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, int X)\n    **\n    ** This action provides a run-time test to see how the ALWAYS and\n    ** NEVER macros were defined at compile-time.\n    **\n    ** The return value is ALWAYS(X) if X is true, or 0 if X is false.\n    **\n    ** The recommended test is X==2.  If the return value is 2, that means\n    ** ALWAYS() and NEVER() are both no-op pass-through macros, which is the\n    ** default setting.  If the return value is 1, then ALWAYS() is either\n    ** hard-coded to true or else it asserts if its argument is false.\n    ** The first behavior (hard-coded to true) is the case if\n    ** SQLITE_TESTCTRL_ASSERT shows that assert() is disabled and the second\n    ** behavior (assert if the argument to ALWAYS() is false) is the case if\n    ** SQLITE_TESTCTRL_ASSERT shows that assert() is enabled.\n    **\n    ** The run-time test procedure might look something like this:\n    **\n    **    if( sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, 2)==2 ){\n    **      // ALWAYS() and NEVER() are no-op pass-through macros\n    **    }else if( sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, 1) ){\n    **      // ALWAYS(x) asserts that x is true. NEVER(x) asserts x is false.\n    **    }else{\n    **      // ALWAYS(x) is a constant 1.  NEVER(x) is a constant 0.\n    **    }\n    */\n    case SQLITE_TESTCTRL_ALWAYS: {\n      int x = va_arg(ap,int);\n      rc = x ? ALWAYS(x) : 0;\n      break;\n    }\n\n    /*\n    **   sqlite3_test_control(SQLITE_TESTCTRL_BYTEORDER);\n    **\n    ** The integer returned reveals the byte-order of the computer on which\n    ** SQLite is running:\n    **\n    **       1     big-endian,    determined at run-time\n    **      10     little-endian, determined at run-time\n    **  432101     big-endian,    determined at compile-time\n    **  123410     little-endian, determined at compile-time\n    */\n    case SQLITE_TESTCTRL_BYTEORDER: {\n      rc = SQLITE_BYTEORDER*100 + SQLITE_LITTLEENDIAN*10 + SQLITE_BIGENDIAN;\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)\n    **\n    ** Enable or disable various optimizations for testing purposes.  The\n    ** argument N is a bitmask of optimizations to be disabled.  For normal\n    ** operation N should be 0.  The idea is that a test program (like the\n    ** SQL Logic Test or SLT test module) can run the same SQL multiple times\n    ** with various optimizations disabled to verify that the same answer\n    ** is obtained in every case.\n    */\n    case SQLITE_TESTCTRL_OPTIMIZATIONS: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      db->dbOptFlags = va_arg(ap, u32);\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_GETOPT, sqlite3 *db, int *N)\n    **\n    ** Write the current optimization settings into *N.  A zero bit means that\n    ** the optimization is on, and a 1 bit means that the optimization is off.\n    */\n    case SQLITE_TESTCTRL_GETOPT: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      int *pN = va_arg(ap, int*);\n      *pN = db->dbOptFlags;\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, onoff, xAlt);\n    **\n    ** If parameter onoff is 1, subsequent calls to localtime() fail.\n    ** If 2, then invoke xAlt() instead of localtime().  If 0, normal\n    ** processing.\n    **\n    ** xAlt arguments are void pointers, but they really want to be:\n    **\n    **    int xAlt(const time_t*, struct tm*);\n    **\n    ** xAlt should write results in to struct tm object of its 2nd argument\n    ** and return zero on success, or return non-zero on failure.\n    */\n    case SQLITE_TESTCTRL_LOCALTIME_FAULT: {\n      sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);\n      if( sqlite3GlobalConfig.bLocaltimeFault==2 ){\n        typedef int(*sqlite3LocaltimeType)(const void*,void*);\n        sqlite3GlobalConfig.xAltLocaltime = va_arg(ap, sqlite3LocaltimeType);\n      }else{\n        sqlite3GlobalConfig.xAltLocaltime = 0;\n      }\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, sqlite3*);\n    **\n    ** Toggle the ability to use internal functions on or off for\n    ** the database connection given in the argument.\n    */\n    case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      db->mDbFlags ^= DBFLAG_InternalFunc;\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_NEVER_CORRUPT, int);\n    **\n    ** Set or clear a flag that indicates that the database file is always well-\n    ** formed and never corrupt.  This flag is clear by default, indicating that\n    ** database files might have arbitrary corruption.  Setting the flag during\n    ** testing causes certain assert() statements in the code to be activated\n    ** that demonstrate invariants on well-formed database files.\n    */\n    case SQLITE_TESTCTRL_NEVER_CORRUPT: {\n      sqlite3GlobalConfig.neverCorrupt = va_arg(ap, int);\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS, int);\n    **\n    ** Set or clear a flag that causes SQLite to verify that type, name,\n    ** and tbl_name fields of the sqlite_schema table.  This is normally\n    ** on, but it is sometimes useful to turn it off for testing.\n    **\n    ** 2020-07-22:  Disabling EXTRA_SCHEMA_CHECKS also disables the\n    ** verification of rootpage numbers when parsing the schema.  This\n    ** is useful to make it easier to reach strange internal error states\n    ** during testing.  The EXTRA_SCHEMA_CHECKS setting is always enabled\n    ** in production.\n    */\n    case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: {\n      sqlite3GlobalConfig.bExtraSchemaChecks = va_arg(ap, int);\n      break;\n    }\n\n    /* Set the threshold at which OP_Once counters reset back to zero.\n    ** By default this is 0x7ffffffe (over 2 billion), but that value is\n    ** too big to test in a reasonable amount of time, so this control is\n    ** provided to set a small and easily reachable reset value.\n    */\n    case SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: {\n      sqlite3GlobalConfig.iOnceResetThreshold = va_arg(ap, int);\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE, xCallback, ptr);\n    **\n    ** Set the VDBE coverage callback function to xCallback with context\n    ** pointer ptr.\n    */\n    case SQLITE_TESTCTRL_VDBE_COVERAGE: {\n#ifdef SQLITE_VDBE_COVERAGE\n      typedef void (*branch_callback)(void*,unsigned int,\n                                      unsigned char,unsigned char);\n      sqlite3GlobalConfig.xVdbeBranch = va_arg(ap,branch_callback);\n      sqlite3GlobalConfig.pVdbeBranchArg = va_arg(ap,void*);\n#endif\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_SORTER_MMAP, db, nMax); */\n    case SQLITE_TESTCTRL_SORTER_MMAP: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      db->nMaxSorterMmap = va_arg(ap, int);\n      break;\n    }\n\n    /*   sqlite3_test_control(SQLITE_TESTCTRL_ISINIT);\n    **\n    ** Return SQLITE_OK if SQLite has been initialized and SQLITE_ERROR if\n    ** not.\n    */\n    case SQLITE_TESTCTRL_ISINIT: {\n      if( sqlite3GlobalConfig.isInit==0 ) rc = SQLITE_ERROR;\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, db, dbName, mode, tnum);\n    **\n    ** This test control is used to create imposter tables.  \"db\" is a pointer\n    ** to the database connection.  dbName is the database name (ex: \"main\" or\n    ** \"temp\") which will receive the imposter.  \"mode\" turns imposter mode on\n    ** or off.  mode==0 means imposter mode is off.  mode==1 means imposter mode\n    ** is on.  mode==2 means imposter mode is on but results in an imposter\n    ** table that is read-only unless writable_schema is on.  \"tnum\" is the\n    ** root page of the b-tree to which the imposter table should connect.\n    **\n    ** Enable imposter mode only when the schema has already been parsed.  Then\n    ** run a single CREATE TABLE statement to construct the imposter table in\n    ** the parsed schema.  Then turn imposter mode back off again.\n    **\n    ** If onOff==0 and tnum>0 then reset the schema for all databases, causing\n    ** the schema to be reparsed the next time it is needed.  This has the\n    ** effect of erasing all imposter tables.\n    */\n    case SQLITE_TESTCTRL_IMPOSTER: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      int iDb;\n      sqlite3_mutex_enter(db->mutex);\n      iDb = sqlite3FindDbName(db, va_arg(ap,const char*));\n      if( iDb>=0 ){\n        db->init.iDb = iDb;\n        db->init.busy = db->init.imposterTable = va_arg(ap,int);\n        db->init.newTnum = va_arg(ap,int);\n        if( db->init.busy==0 && db->init.newTnum>0 ){\n          sqlite3ResetAllSchemasOfConnection(db);\n        }\n      }\n      sqlite3_mutex_leave(db->mutex);\n      break;\n    }\n\n#if defined(YYCOVERAGE)\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_PARSER_COVERAGE, FILE *out)\n    **\n    ** This test control (only available when SQLite is compiled with\n    ** -DYYCOVERAGE) writes a report onto \"out\" that shows all\n    ** state/lookahead combinations in the parser state machine\n    ** which are never exercised.  If any state is missed, make the\n    ** return code SQLITE_ERROR.\n    */\n    case SQLITE_TESTCTRL_PARSER_COVERAGE: {\n      FILE *out = va_arg(ap, FILE*);\n      if( sqlite3ParserCoverage(out) ) rc = SQLITE_ERROR;\n      break;\n    }\n#endif /* defined(YYCOVERAGE) */\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_RESULT_INTREAL, sqlite3_context*);\n    **\n    ** This test-control causes the most recent sqlite3_result_int64() value\n    ** to be interpreted as a MEM_IntReal instead of as an MEM_Int.  Normally,\n    ** MEM_IntReal values only arise during an INSERT operation of integer\n    ** values into a REAL column, so they can be challenging to test.  This\n    ** test-control enables us to write an intreal() SQL function that can\n    ** inject an intreal() value at arbitrary places in an SQL statement,\n    ** for testing purposes.\n    */\n    case SQLITE_TESTCTRL_RESULT_INTREAL: {\n      sqlite3_context *pCtx = va_arg(ap, sqlite3_context*);\n      sqlite3ResultIntReal(pCtx);\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_SEEK_COUNT,\n    **    sqlite3 *db,    // Database connection\n    **    u64 *pnSeek     // Write seek count here\n    **  );\n    **\n    ** This test-control queries the seek-counter on the \"main\" database\n    ** file.  The seek-counter is written into *pnSeek and is then reset.\n    ** The seek-count is only available if compiled with SQLITE_DEBUG.\n    */\n    case SQLITE_TESTCTRL_SEEK_COUNT: {\n      sqlite3 *db = va_arg(ap, sqlite3*);\n      u64 *pn = va_arg(ap, sqlite3_uint64*);\n      *pn = sqlite3BtreeSeekCount(db->aDb->pBt);\n      (void)db;  /* Silence harmless unused variable warning */\n      break;\n    }\n\n    /*  sqlite3_test_control(SQLITE_TESTCTRL_TRACEFLAGS, op, ptr)\n    **\n    **  \"ptr\" is a pointer to a u32.\n    **\n    **   op==0       Store the current sqlite3TreeTrace in *ptr\n    **   op==1       Set sqlite3TreeTrace to the value *ptr\n    **   op==2       Store the current sqlite3WhereTrace in *ptr\n    **   op==3       Set sqlite3WhereTrace to the value *ptr\n    */\n    case SQLITE_TESTCTRL_TRACEFLAGS: {\n       int opTrace = va_arg(ap, int);\n       u32 *ptr = va_arg(ap, u32*);\n       switch( opTrace ){\n         case 0:   *ptr = sqlite3TreeTrace;      break;\n         case 1:   sqlite3TreeTrace = *ptr;      break;\n         case 2:   *ptr = sqlite3WhereTrace;     break;\n         case 3:   sqlite3WhereTrace = *ptr;     break;\n       }\n       break;\n    }\n\n    /* sqlite3_test_control(SQLITE_TESTCTRL_LOGEST,\n    **      double fIn,     // Input value\n    **      int *pLogEst,   // sqlite3LogEstFromDouble(fIn)\n    **      u64 *pInt,      // sqlite3LogEstToInt(*pLogEst)\n    **      int *pLogEst2   // sqlite3LogEst(*pInt)\n    ** );\n    **\n    ** Test access for the LogEst conversion routines.\n    */\n    case SQLITE_TESTCTRL_LOGEST: {\n      double rIn = va_arg(ap, double);\n      LogEst rLogEst = sqlite3LogEstFromDouble(rIn);\n      int *pI1 = va_arg(ap,int*);\n      u64 *pU64 = va_arg(ap,u64*);\n      int *pI2 = va_arg(ap,int*);\n      *pI1 = rLogEst;\n      *pU64 = sqlite3LogEstToInt(rLogEst);\n      *pI2 = sqlite3LogEst(*pU64);\n      break;\n    }\n\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD)\n    /* sqlite3_test_control(SQLITE_TESTCTRL_TUNE, id, *piValue)\n    **\n    ** If \"id\" is an integer between 1 and SQLITE_NTUNE then set the value\n    ** of the id-th tuning parameter to *piValue.  If \"id\" is between -1\n    ** and -SQLITE_NTUNE, then write the current value of the (-id)-th\n    ** tuning parameter into *piValue.\n    **\n    ** Tuning parameters are for use during transient development builds,\n    ** to help find the best values for constants in the query planner.\n    ** Access tuning parameters using the Tuning(ID) macro.  Set the\n    ** parameters in the CLI using \".testctrl tune ID VALUE\".\n    **\n    ** Transient use only.  Tuning parameters should not be used in\n    ** checked-in code.\n    */\n    case SQLITE_TESTCTRL_TUNE: {\n      int id = va_arg(ap, int);\n      int *piValue = va_arg(ap, int*);\n      if( id>0 && id<=SQLITE_NTUNE ){\n        Tuning(id) = *piValue;\n      }else if( id<0 && id>=-SQLITE_NTUNE ){\n        *piValue = Tuning(-id);\n      }else{\n        rc = SQLITE_NOTFOUND;\n      }\n      break;\n    }\n#endif\n\n    /* sqlite3_test_control(SQLITE_TESTCTRL_JSON_SELFCHECK, &onOff);\n    **\n    ** Activate or deactivate validation of JSONB that is generated from\n    ** text.  Off by default, as the validation is slow.  Validation is\n    ** only available if compiled using SQLITE_DEBUG.\n    **\n    ** If onOff is initially 1, then turn it on.  If onOff is initially\n    ** off, turn it off.  If onOff is initially -1, then change onOff\n    ** to be the current setting.\n    */\n    case SQLITE_TESTCTRL_JSON_SELFCHECK: {\n#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD)\n      int *pOnOff = va_arg(ap, int*);\n      if( *pOnOff<0 ){\n        *pOnOff = sqlite3Config.bJsonSelfcheck;\n      }else{\n        sqlite3Config.bJsonSelfcheck = (u8)((*pOnOff)&0xff);\n      }\n#endif\n      break;\n    }\n  }\n  va_end(ap);\n#endif /* SQLITE_UNTESTABLE */\n  return rc;\n}\n\n/*\n** The Pager stores the Database filename, Journal filename, and WAL filename\n** consecutively in memory, in that order.  The database filename is prefixed\n** by four zero bytes.  Locate the start of the database filename by searching\n** backwards for the first byte following four consecutive zero bytes.\n**\n** This only works if the filename passed in was obtained from the Pager.\n*/\nstatic const char *databaseName(const char *zName){\n  while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){\n    zName--;\n  }\n  return zName;\n}\n\n/*\n** Append text z[] to the end of p[].  Return a pointer to the first\n** character after then zero terminator on the new text in p[].\n*/\nstatic char *appendText(char *p, const char *z){\n  size_t n = strlen(z);\n  memcpy(p, z, n+1);\n  return p+n+1;\n}\n\n/*\n** Allocate memory to hold names for a database, journal file, WAL file,\n** and query parameters.  The pointer returned is valid for use by\n** sqlite3_filename_database() and sqlite3_uri_parameter() and related\n** functions.\n**\n** Memory layout must be compatible with that generated by the pager\n** and expected by sqlite3_uri_parameter() and databaseName().\n*/\nSQLITE_API const char *sqlite3_create_filename(\n  const char *zDatabase,\n  const char *zJournal,\n  const char *zWal,\n  int nParam,\n  const char **azParam\n){\n  sqlite3_int64 nByte;\n  int i;\n  char *pResult, *p;\n  nByte = strlen(zDatabase) + strlen(zJournal) + strlen(zWal) + 10;\n  for(i=0; i<nParam*2; i++){\n    nByte += strlen(azParam[i])+1;\n  }\n  pResult = p = sqlite3_malloc64( nByte );\n  if( p==0 ) return 0;\n  memset(p, 0, 4);\n  p += 4;\n  p = appendText(p, zDatabase);\n  for(i=0; i<nParam*2; i++){\n    p = appendText(p, azParam[i]);\n  }\n  *(p++) = 0;\n  p = appendText(p, zJournal);\n  p = appendText(p, zWal);\n  *(p++) = 0;\n  *(p++) = 0;\n  assert( (sqlite3_int64)(p - pResult)==nByte );\n  return pResult + 4;\n}\n\n/*\n** Free memory obtained from sqlite3_create_filename().  It is a severe\n** error to call this routine with any parameter other than a pointer\n** previously obtained from sqlite3_create_filename() or a NULL pointer.\n*/\nSQLITE_API void sqlite3_free_filename(const char *p){\n  if( p==0 ) return;\n  p = databaseName(p);\n  sqlite3_free((char*)p - 4);\n}\n\n\n/*\n** This is a utility routine, useful to VFS implementations, that checks\n** to see if a database file was a URI that contained a specific query\n** parameter, and if so obtains the value of the query parameter.\n**\n** The zFilename argument is the filename pointer passed into the xOpen()\n** method of a VFS implementation.  The zParam argument is the name of the\n** query parameter we seek.  This routine returns the value of the zParam\n** parameter if it exists.  If the parameter does not exist, this routine\n** returns a NULL pointer.\n*/\nSQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){\n  if( zFilename==0 || zParam==0 ) return 0;\n  zFilename = databaseName(zFilename);\n  return uriParameter(zFilename, zParam);\n}\n\n/*\n** Return a pointer to the name of Nth query parameter of the filename.\n*/\nSQLITE_API const char *sqlite3_uri_key(const char *zFilename, int N){\n  if( zFilename==0 || N<0 ) return 0;\n  zFilename = databaseName(zFilename);\n  zFilename += sqlite3Strlen30(zFilename) + 1;\n  while( ALWAYS(zFilename) && zFilename[0] && (N--)>0 ){\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n  }\n  return zFilename[0] ? zFilename : 0;\n}\n\n/*\n** Return a boolean value for a query parameter.\n*/\nSQLITE_API int sqlite3_uri_boolean(const char *zFilename, const char *zParam, int bDflt){\n  const char *z = sqlite3_uri_parameter(zFilename, zParam);\n  bDflt = bDflt!=0;\n  return z ? sqlite3GetBoolean(z, bDflt) : bDflt;\n}\n\n/*\n** Return a 64-bit integer value for a query parameter.\n*/\nSQLITE_API sqlite3_int64 sqlite3_uri_int64(\n  const char *zFilename,    /* Filename as passed to xOpen */\n  const char *zParam,       /* URI parameter sought */\n  sqlite3_int64 bDflt       /* return if parameter is missing */\n){\n  const char *z = sqlite3_uri_parameter(zFilename, zParam);\n  sqlite3_int64 v;\n  if( z && sqlite3DecOrHexToI64(z, &v)==0 ){\n    bDflt = v;\n  }\n  return bDflt;\n}\n\n/*\n** Translate a filename that was handed to a VFS routine into the corresponding\n** database, journal, or WAL file.\n**\n** It is an error to pass this routine a filename string that was not\n** passed into the VFS from the SQLite core.  Doing so is similar to\n** passing free() a pointer that was not obtained from malloc() - it is\n** an error that we cannot easily detect but that will likely cause memory\n** corruption.\n*/\nSQLITE_API const char *sqlite3_filename_database(const char *zFilename){\n  if( zFilename==0 ) return 0;\n  return databaseName(zFilename);\n}\nSQLITE_API const char *sqlite3_filename_journal(const char *zFilename){\n  if( zFilename==0 ) return 0;\n  zFilename = databaseName(zFilename);\n  zFilename += sqlite3Strlen30(zFilename) + 1;\n  while( ALWAYS(zFilename) && zFilename[0] ){\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n    zFilename += sqlite3Strlen30(zFilename) + 1;\n  }\n  return zFilename + 1;\n}\nSQLITE_API const char *sqlite3_filename_wal(const char *zFilename){\n#ifdef SQLITE_OMIT_WAL\n  return 0;\n#else\n  zFilename = sqlite3_filename_journal(zFilename);\n  if( zFilename ) zFilename += sqlite3Strlen30(zFilename) + 1;\n  return zFilename;\n#endif\n}\n\n/*\n** Return the Btree pointer identified by zDbName.  Return NULL if not found.\n*/\nSQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){\n  int iDb = zDbName ? sqlite3FindDbName(db, zDbName) : 0;\n  return iDb<0 ? 0 : db->aDb[iDb].pBt;\n}\n\n/*\n** Return the name of the N-th database schema.  Return NULL if N is out\n** of range.\n*/\nSQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N){\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  if( N<0 || N>=db->nDb ){\n    return 0;\n  }else{\n    return db->aDb[N].zDbSName;\n  }\n}\n\n/*\n** Return the filename of the database associated with a database\n** connection.\n*/\nSQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){\n  Btree *pBt;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n  pBt = sqlite3DbNameToBtree(db, zDbName);\n  return pBt ? sqlite3BtreeGetFilename(pBt) : 0;\n}\n\n/*\n** Return 1 if database is read-only or 0 if read/write.  Return -1 if\n** no such database exists.\n*/\nSQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){\n  Btree *pBt;\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    (void)SQLITE_MISUSE_BKPT;\n    return -1;\n  }\n#endif\n  pBt = sqlite3DbNameToBtree(db, zDbName);\n  return pBt ? sqlite3BtreeIsReadonly(pBt) : -1;\n}\n\n#ifdef SQLITE_ENABLE_SNAPSHOT\n/*\n** Obtain a snapshot handle for the snapshot of database zDb currently\n** being read by handle db.\n*/\nSQLITE_API int sqlite3_snapshot_get(\n  sqlite3 *db,\n  const char *zDb,\n  sqlite3_snapshot **ppSnapshot\n){\n  int rc = SQLITE_ERROR;\n#ifndef SQLITE_OMIT_WAL\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n\n  if( db->autoCommit==0 ){\n    int iDb = sqlite3FindDbName(db, zDb);\n    if( iDb==0 || iDb>1 ){\n      Btree *pBt = db->aDb[iDb].pBt;\n      if( SQLITE_TXN_WRITE!=sqlite3BtreeTxnState(pBt) ){\n        Pager *pPager = sqlite3BtreePager(pBt);\n        i64 dummy = 0;\n        sqlite3PagerSnapshotOpen(pPager, (sqlite3_snapshot*)&dummy);\n        rc = sqlite3BtreeBeginTrans(pBt, 0, 0);\n        sqlite3PagerSnapshotOpen(pPager, 0);\n        if( rc==SQLITE_OK ){\n          rc = sqlite3PagerSnapshotGet(sqlite3BtreePager(pBt), ppSnapshot);\n        }\n      }\n    }\n  }\n\n  sqlite3_mutex_leave(db->mutex);\n#endif   /* SQLITE_OMIT_WAL */\n  return rc;\n}\n\n/*\n** Open a read-transaction on the snapshot identified by pSnapshot.\n*/\nSQLITE_API int sqlite3_snapshot_open(\n  sqlite3 *db,\n  const char *zDb,\n  sqlite3_snapshot *pSnapshot\n){\n  int rc = SQLITE_ERROR;\n#ifndef SQLITE_OMIT_WAL\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  if( db->autoCommit==0 ){\n    int iDb;\n    iDb = sqlite3FindDbName(db, zDb);\n    if( iDb==0 || iDb>1 ){\n      Btree *pBt = db->aDb[iDb].pBt;\n      if( sqlite3BtreeTxnState(pBt)!=SQLITE_TXN_WRITE ){\n        Pager *pPager = sqlite3BtreePager(pBt);\n        int bUnlock = 0;\n        if( sqlite3BtreeTxnState(pBt)!=SQLITE_TXN_NONE ){\n          if( db->nVdbeActive==0 ){\n            rc = sqlite3PagerSnapshotCheck(pPager, pSnapshot);\n            if( rc==SQLITE_OK ){\n              bUnlock = 1;\n              rc = sqlite3BtreeCommit(pBt);\n            }\n          }\n        }else{\n          rc = SQLITE_OK;\n        }\n        if( rc==SQLITE_OK ){\n          rc = sqlite3PagerSnapshotOpen(pPager, pSnapshot);\n        }\n        if( rc==SQLITE_OK ){\n          rc = sqlite3BtreeBeginTrans(pBt, 0, 0);\n          sqlite3PagerSnapshotOpen(pPager, 0);\n        }\n        if( bUnlock ){\n          sqlite3PagerSnapshotUnlock(pPager);\n        }\n      }\n    }\n  }\n\n  sqlite3_mutex_leave(db->mutex);\n#endif   /* SQLITE_OMIT_WAL */\n  return rc;\n}\n\n/*\n** Recover as many snapshots as possible from the wal file associated with\n** schema zDb of database db.\n*/\nSQLITE_API int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb){\n  int rc = SQLITE_ERROR;\n#ifndef SQLITE_OMIT_WAL\n  int iDb;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ){\n    return SQLITE_MISUSE_BKPT;\n  }\n#endif\n\n  sqlite3_mutex_enter(db->mutex);\n  iDb = sqlite3FindDbName(db, zDb);\n  if( iDb==0 || iDb>1 ){\n    Btree *pBt = db->aDb[iDb].pBt;\n    if( SQLITE_TXN_NONE==sqlite3BtreeTxnState(pBt) ){\n      rc = sqlite3BtreeBeginTrans(pBt, 0, 0);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3PagerSnapshotRecover(sqlite3BtreePager(pBt));\n        sqlite3BtreeCommit(pBt);\n      }\n    }\n  }\n  sqlite3_mutex_leave(db->mutex);\n#endif   /* SQLITE_OMIT_WAL */\n  return rc;\n}\n\n/*\n** Free a snapshot handle obtained from sqlite3_snapshot_get().\n*/\nSQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot *pSnapshot){\n  sqlite3_free(pSnapshot);\n}\n#endif /* SQLITE_ENABLE_SNAPSHOT */\n\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\n/*\n** Given the name of a compile-time option, return true if that option\n** was used and false if not.\n**\n** The name can optionally begin with \"SQLITE_\" but the \"SQLITE_\" prefix\n** is not required for a match.\n*/\nSQLITE_API int sqlite3_compileoption_used(const char *zOptName){\n  int i, n;\n  int nOpt;\n  const char **azCompileOpt;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( zOptName==0 ){\n    (void)SQLITE_MISUSE_BKPT;\n    return 0;\n  }\n#endif\n\n  azCompileOpt = sqlite3CompileOptions(&nOpt);\n\n  if( sqlite3StrNICmp(zOptName, \"SQLITE_\", 7)==0 ) zOptName += 7;\n  n = sqlite3Strlen30(zOptName);\n\n  /* Since nOpt is normally in single digits, a linear search is\n  ** adequate. No need for a binary search. */\n  for(i=0; i<nOpt; i++){\n    if( sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0\n     && sqlite3IsIdChar((unsigned char)azCompileOpt[i][n])==0\n    ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n/*\n** Return the N-th compile-time option string.  If N is out of range,\n** return a NULL pointer.\n*/\nSQLITE_API const char *sqlite3_compileoption_get(int N){\n  int nOpt;\n  const char **azCompileOpt;\n  azCompileOpt = sqlite3CompileOptions(&nOpt);\n  if( N>=0 && N<nOpt ){\n    return azCompileOpt[N];\n  }\n  return 0;\n}\n#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */\n\n/************** End of main.c ************************************************/\n/************** Begin file notify.c ******************************************/\n/*\n** 2009 March 3\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains the implementation of the sqlite3_unlock_notify()\n** API method and its associated functionality.\n*/\n/* #include \"sqliteInt.h\" */\n/* #include \"btreeInt.h\" */\n\n/* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\n\n/*\n** Public interfaces:\n**\n**   sqlite3ConnectionBlocked()\n**   sqlite3ConnectionUnlocked()\n**   sqlite3ConnectionClosed()\n**   sqlite3_unlock_notify()\n*/\n\n#define assertMutexHeld() \\\n  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN)) )\n\n/*\n** Head of a linked list of all sqlite3 objects created by this process\n** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection\n** is not NULL. This variable may only accessed while the STATIC_MAIN\n** mutex is held.\n*/\nstatic sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;\n\n#ifndef NDEBUG\n/*\n** This function is a complex assert() that verifies the following\n** properties of the blocked connections list:\n**\n**   1) Each entry in the list has a non-NULL value for either\n**      pUnlockConnection or pBlockingConnection, or both.\n**\n**   2) All entries in the list that share a common value for\n**      xUnlockNotify are grouped together.\n**\n**   3) If the argument db is not NULL, then none of the entries in the\n**      blocked connections list have pUnlockConnection or pBlockingConnection\n**      set to db. This is used when closing connection db.\n*/\nstatic void checkListProperties(sqlite3 *db){\n  sqlite3 *p;\n  for(p=sqlite3BlockedList; p; p=p->pNextBlocked){\n    int seen = 0;\n    sqlite3 *p2;\n\n    /* Verify property (1) */\n    assert( p->pUnlockConnection || p->pBlockingConnection );\n\n    /* Verify property (2) */\n    for(p2=sqlite3BlockedList; p2!=p; p2=p2->pNextBlocked){\n      if( p2->xUnlockNotify==p->xUnlockNotify ) seen = 1;\n      assert( p2->xUnlockNotify==p->xUnlockNotify || !seen );\n      assert( db==0 || p->pUnlockConnection!=db );\n      assert( db==0 || p->pBlockingConnection!=db );\n    }\n  }\n}\n#else\n# define checkListProperties(x)\n#endif\n\n/*\n** Remove connection db from the blocked connections list. If connection\n** db is not currently a part of the list, this function is a no-op.\n*/\nstatic void removeFromBlockedList(sqlite3 *db){\n  sqlite3 **pp;\n  assertMutexHeld();\n  for(pp=&sqlite3BlockedList; *pp; pp = &(*pp)->pNextBlocked){\n    if( *pp==db ){\n      *pp = (*pp)->pNextBlocked;\n      break;\n    }\n  }\n}\n\n/*\n** Add connection db to the blocked connections list. It is assumed\n** that it is not already a part of the list.\n*/\nstatic void addToBlockedList(sqlite3 *db){\n  sqlite3 **pp;\n  assertMutexHeld();\n  for(\n    pp=&sqlite3BlockedList;\n    *pp && (*pp)->xUnlockNotify!=db->xUnlockNotify;\n    pp=&(*pp)->pNextBlocked\n  );\n  db->pNextBlocked = *pp;\n  *pp = db;\n}\n\n/*\n** Obtain the STATIC_MAIN mutex.\n*/\nstatic void enterMutex(void){\n  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN));\n  checkListProperties(0);\n}\n\n/*\n** Release the STATIC_MAIN mutex.\n*/\nstatic void leaveMutex(void){\n  assertMutexHeld();\n  checkListProperties(0);\n  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN));\n}\n\n/*\n** Register an unlock-notify callback.\n**\n** This is called after connection \"db\" has attempted some operation\n** but has received an SQLITE_LOCKED error because another connection\n** (call it pOther) in the same process was busy using the same shared\n** cache.  pOther is found by looking at db->pBlockingConnection.\n**\n** If there is no blocking connection, the callback is invoked immediately,\n** before this routine returns.\n**\n** If pOther is already blocked on db, then report SQLITE_LOCKED, to indicate\n** a deadlock.\n**\n** Otherwise, make arrangements to invoke xNotify when pOther drops\n** its locks.\n**\n** Each call to this routine overrides any prior callbacks registered\n** on the same \"db\".  If xNotify==0 then any prior callbacks are immediately\n** cancelled.\n*/\nSQLITE_API int sqlite3_unlock_notify(\n  sqlite3 *db,\n  void (*xNotify)(void **, int),\n  void *pArg\n){\n  int rc = SQLITE_OK;\n\n#ifdef SQLITE_ENABLE_API_ARMOR\n  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;\n#endif\n  sqlite3_mutex_enter(db->mutex);\n  enterMutex();\n\n  if( xNotify==0 ){\n    removeFromBlockedList(db);\n    db->pBlockingConnection = 0;\n    db->pUnlockConnection = 0;\n    db->xUnlockNotify = 0;\n    db->pUnlockArg = 0;\n  }else if( 0==db->pBlockingConnection ){\n    /* The blocking transaction has been concluded. Or there never was a\n    ** blocking transaction. In either case, invoke the notify callback\n    ** immediately.\n    */\n    xNotify(&pArg, 1);\n  }else{\n    sqlite3 *p;\n\n    for(p=db->pBlockingConnection; p && p!=db; p=p->pUnlockConnection){}\n    if( p ){\n      rc = SQLITE_LOCKED;              /* Deadlock detected. */\n    }else{\n      db->pUnlockConnection = db->pBlockingConnection;\n      db->xUnlockNotify = xNotify;\n      db->pUnlockArg = pArg;\n      removeFromBlockedList(db);\n      addToBlockedList(db);\n    }\n  }\n\n  leaveMutex();\n  assert( !db->mallocFailed );\n  sqlite3ErrorWithMsg(db, rc, (rc?\"database is deadlocked\":0));\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** This function is called while stepping or preparing a statement\n** associated with connection db. The operation will return SQLITE_LOCKED\n** to the user because it requires a lock that will not be available\n** until connection pBlocker concludes its current transaction.\n*/\nSQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){\n  enterMutex();\n  if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){\n    addToBlockedList(db);\n  }\n  db->pBlockingConnection = pBlocker;\n  leaveMutex();\n}\n\n/*\n** This function is called when\n** the transaction opened by database db has just finished. Locks held\n** by database connection db have been released.\n**\n** This function loops through each entry in the blocked connections\n** list and does the following:\n**\n**   1) If the sqlite3.pBlockingConnection member of a list entry is\n**      set to db, then set pBlockingConnection=0.\n**\n**   2) If the sqlite3.pUnlockConnection member of a list entry is\n**      set to db, then invoke the configured unlock-notify callback and\n**      set pUnlockConnection=0.\n**\n**   3) If the two steps above mean that pBlockingConnection==0 and\n**      pUnlockConnection==0, remove the entry from the blocked connections\n**      list.\n*/\nSQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){\n  void (*xUnlockNotify)(void **, int) = 0; /* Unlock-notify cb to invoke */\n  int nArg = 0;                            /* Number of entries in aArg[] */\n  sqlite3 **pp;                            /* Iterator variable */\n  void **aArg;               /* Arguments to the unlock callback */\n  void **aDyn = 0;           /* Dynamically allocated space for aArg[] */\n  void *aStatic[16];         /* Starter space for aArg[].  No malloc required */\n\n  aArg = aStatic;\n  enterMutex();         /* Enter STATIC_MAIN mutex */\n\n  /* This loop runs once for each entry in the blocked-connections list. */\n  for(pp=&sqlite3BlockedList; *pp; /* no-op */ ){\n    sqlite3 *p = *pp;\n\n    /* Step 1. */\n    if( p->pBlockingConnection==db ){\n      p->pBlockingConnection = 0;\n    }\n\n    /* Step 2. */\n    if( p->pUnlockConnection==db ){\n      assert( p->xUnlockNotify );\n      if( p->xUnlockNotify!=xUnlockNotify && nArg!=0 ){\n        xUnlockNotify(aArg, nArg);\n        nArg = 0;\n      }\n\n      sqlite3BeginBenignMalloc();\n      assert( aArg==aDyn || (aDyn==0 && aArg==aStatic) );\n      assert( nArg<=(int)ArraySize(aStatic) || aArg==aDyn );\n      if( (!aDyn && nArg==(int)ArraySize(aStatic))\n       || (aDyn && nArg==(int)(sqlite3MallocSize(aDyn)/sizeof(void*)))\n      ){\n        /* The aArg[] array needs to grow. */\n        void **pNew = (void **)sqlite3Malloc(nArg*sizeof(void *)*2);\n        if( pNew ){\n          memcpy(pNew, aArg, nArg*sizeof(void *));\n          sqlite3_free(aDyn);\n          aDyn = aArg = pNew;\n        }else{\n          /* This occurs when the array of context pointers that need to\n          ** be passed to the unlock-notify callback is larger than the\n          ** aStatic[] array allocated on the stack and the attempt to\n          ** allocate a larger array from the heap has failed.\n          **\n          ** This is a difficult situation to handle. Returning an error\n          ** code to the caller is insufficient, as even if an error code\n          ** is returned the transaction on connection db will still be\n          ** closed and the unlock-notify callbacks on blocked connections\n          ** will go unissued. This might cause the application to wait\n          ** indefinitely for an unlock-notify callback that will never\n          ** arrive.\n          **\n          ** Instead, invoke the unlock-notify callback with the context\n          ** array already accumulated. We can then clear the array and\n          ** begin accumulating any further context pointers without\n          ** requiring any dynamic allocation. This is sub-optimal because\n          ** it means that instead of one callback with a large array of\n          ** context pointers the application will receive two or more\n          ** callbacks with smaller arrays of context pointers, which will\n          ** reduce the applications ability to prioritize multiple\n          ** connections. But it is the best that can be done under the\n          ** circumstances.\n          */\n          xUnlockNotify(aArg, nArg);\n          nArg = 0;\n        }\n      }\n      sqlite3EndBenignMalloc();\n\n      aArg[nArg++] = p->pUnlockArg;\n      xUnlockNotify = p->xUnlockNotify;\n      p->pUnlockConnection = 0;\n      p->xUnlockNotify = 0;\n      p->pUnlockArg = 0;\n    }\n\n    /* Step 3. */\n    if( p->pBlockingConnection==0 && p->pUnlockConnection==0 ){\n      /* Remove connection p from the blocked connections list. */\n      *pp = p->pNextBlocked;\n      p->pNextBlocked = 0;\n    }else{\n      pp = &p->pNextBlocked;\n    }\n  }\n\n  if( nArg!=0 ){\n    xUnlockNotify(aArg, nArg);\n  }\n  sqlite3_free(aDyn);\n  leaveMutex();         /* Leave STATIC_MAIN mutex */\n}\n\n/*\n** This is called when the database connection passed as an argument is\n** being closed. The connection is removed from the blocked list.\n*/\nSQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){\n  sqlite3ConnectionUnlocked(db);\n  enterMutex();\n  removeFromBlockedList(db);\n  checkListProperties(db);\n  leaveMutex();\n}\n#endif\n\n/************** End of notify.c **********************************************/\n/************** Begin file fts3.c ********************************************/\n/*\n** 2006 Oct 10\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This is an SQLite module implementing full-text search.\n*/\n\n/*\n** The code in this file is only compiled if:\n**\n**     * The FTS3 module is being built as an extension\n**       (in which case SQLITE_CORE is not defined), or\n**\n**     * The FTS3 module is being built into the core of\n**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).\n*/\n\n/* The full-text index is stored in a series of b+tree (-like)\n** structures called segments which map terms to doclists.  The\n** structures are like b+trees in layout, but are constructed from the\n** bottom up in optimal fashion and are not updatable.  Since trees\n** are built from the bottom up, things will be described from the\n** bottom up.\n**\n**\n**** Varints ****\n** The basic unit of encoding is a variable-length integer called a\n** varint.  We encode variable-length integers in little-endian order\n** using seven bits * per byte as follows:\n**\n** KEY:\n**         A = 0xxxxxxx    7 bits of data and one flag bit\n**         B = 1xxxxxxx    7 bits of data and one flag bit\n**\n**  7 bits - A\n** 14 bits - BA\n** 21 bits - BBA\n** and so on.\n**\n** This is similar in concept to how sqlite encodes \"varints\" but\n** the encoding is not the same.  SQLite varints are big-endian\n** are are limited to 9 bytes in length whereas FTS3 varints are\n** little-endian and can be up to 10 bytes in length (in theory).\n**\n** Example encodings:\n**\n**     1:    0x01\n**   127:    0x7f\n**   128:    0x81 0x00\n**\n**\n**** Document lists ****\n** A doclist (document list) holds a docid-sorted list of hits for a\n** given term.  Doclists hold docids and associated token positions.\n** A docid is the unique integer identifier for a single document.\n** A position is the index of a word within the document.  The first\n** word of the document has a position of 0.\n**\n** FTS3 used to optionally store character offsets using a compile-time\n** option.  But that functionality is no longer supported.\n**\n** A doclist is stored like this:\n**\n** array {\n**   varint docid;          (delta from previous doclist)\n**   array {                (position list for column 0)\n**     varint position;     (2 more than the delta from previous position)\n**   }\n**   array {\n**     varint POS_COLUMN;   (marks start of position list for new column)\n**     varint column;       (index of new column)\n**     array {\n**       varint position;   (2 more than the delta from previous position)\n**     }\n**   }\n**   varint POS_END;        (marks end of positions for this document.\n** }\n**\n** Here, array { X } means zero or more occurrences of X, adjacent in\n** memory.  A \"position\" is an index of a token in the token stream\n** generated by the tokenizer. Note that POS_END and POS_COLUMN occur\n** in the same logical place as the position element, and act as sentinels\n** ending a position list array.  POS_END is 0.  POS_COLUMN is 1.\n** The positions numbers are not stored literally but rather as two more\n** than the difference from the prior position, or the just the position plus\n** 2 for the first position.  Example:\n**\n**   label:       A B C D E  F  G H   I  J K\n**   value:     123 5 9 1 1 14 35 0 234 72 0\n**\n** The 123 value is the first docid.  For column zero in this document\n** there are two matches at positions 3 and 10 (5-2 and 9-2+3).  The 1\n** at D signals the start of a new column; the 1 at E indicates that the\n** new column is column number 1.  There are two positions at 12 and 45\n** (14-2 and 35-2+12).  The 0 at H indicate the end-of-document.  The\n** 234 at I is the delta to next docid (357).  It has one position 70\n** (72-2) and then terminates with the 0 at K.\n**\n** A \"position-list\" is the list of positions for multiple columns for\n** a single docid.  A \"column-list\" is the set of positions for a single\n** column.  Hence, a position-list consists of one or more column-lists,\n** a document record consists of a docid followed by a position-list and\n** a doclist consists of one or more document records.\n**\n** A bare doclist omits the position information, becoming an\n** array of varint-encoded docids.\n**\n**** Segment leaf nodes ****\n** Segment leaf nodes store terms and doclists, ordered by term.  Leaf\n** nodes are written using LeafWriter, and read using LeafReader (to\n** iterate through a single leaf node's data) and LeavesReader (to\n** iterate through a segment's entire leaf layer).  Leaf nodes have\n** the format:\n**\n** varint iHeight;             (height from leaf level, always 0)\n** varint nTerm;               (length of first term)\n** char pTerm[nTerm];          (content of first term)\n** varint nDoclist;            (length of term's associated doclist)\n** char pDoclist[nDoclist];    (content of doclist)\n** array {\n**                             (further terms are delta-encoded)\n**   varint nPrefix;           (length of prefix shared with previous term)\n**   varint nSuffix;           (length of unshared suffix)\n**   char pTermSuffix[nSuffix];(unshared suffix of next term)\n**   varint nDoclist;          (length of term's associated doclist)\n**   char pDoclist[nDoclist];  (content of doclist)\n** }\n**\n** Here, array { X } means zero or more occurrences of X, adjacent in\n** memory.\n**\n** Leaf nodes are broken into blocks which are stored contiguously in\n** the %_segments table in sorted order.  This means that when the end\n** of a node is reached, the next term is in the node with the next\n** greater node id.\n**\n** New data is spilled to a new leaf node when the current node\n** exceeds LEAF_MAX bytes (default 2048).  New data which itself is\n** larger than STANDALONE_MIN (default 1024) is placed in a standalone\n** node (a leaf node with a single term and doclist).  The goal of\n** these settings is to pack together groups of small doclists while\n** making it efficient to directly access large doclists.  The\n** assumption is that large doclists represent terms which are more\n** likely to be query targets.\n**\n** TODO(shess) It may be useful for blocking decisions to be more\n** dynamic.  For instance, it may make more sense to have a 2.5k leaf\n** node rather than splitting into 2k and .5k nodes.  My intuition is\n** that this might extend through 2x or 4x the pagesize.\n**\n**\n**** Segment interior nodes ****\n** Segment interior nodes store blockids for subtree nodes and terms\n** to describe what data is stored by the each subtree.  Interior\n** nodes are written using InteriorWriter, and read using\n** InteriorReader.  InteriorWriters are created as needed when\n** SegmentWriter creates new leaf nodes, or when an interior node\n** itself grows too big and must be split.  The format of interior\n** nodes:\n**\n** varint iHeight;           (height from leaf level, always >0)\n** varint iBlockid;          (block id of node's leftmost subtree)\n** optional {\n**   varint nTerm;           (length of first term)\n**   char pTerm[nTerm];      (content of first term)\n**   array {\n**                                (further terms are delta-encoded)\n**     varint nPrefix;            (length of shared prefix with previous term)\n**     varint nSuffix;            (length of unshared suffix)\n**     char pTermSuffix[nSuffix]; (unshared suffix of next term)\n**   }\n** }\n**\n** Here, optional { X } means an optional element, while array { X }\n** means zero or more occurrences of X, adjacent in memory.\n**\n** An interior node encodes n terms separating n+1 subtrees.  The\n** subtree blocks are contiguous, so only the first subtree's blockid\n** is encoded.  The subtree at iBlockid will contain all terms less\n** than the first term encoded (or all terms if no term is encoded).\n** Otherwise, for terms greater than or equal to pTerm[i] but less\n** than pTerm[i+1], the subtree for that term will be rooted at\n** iBlockid+i.  Interior nodes only store enough term data to\n** distinguish adjacent children (if the rightmost term of the left\n** child is \"something\", and the leftmost term of the right child is\n** \"wicked\", only \"w\" is stored).\n**\n** New data is spilled to a new interior node at the same height when\n** the current node exceeds INTERIOR_MAX bytes (default 2048).\n** INTERIOR_MIN_TERMS (default 7) keeps large terms from monopolizing\n** interior nodes and making the tree too skinny.  The interior nodes\n** at a given height are naturally tracked by interior nodes at\n** height+1, and so on.\n**\n**\n**** Segment directory ****\n** The segment directory in table %_segdir stores meta-information for\n** merging and deleting segments, and also the root node of the\n** segment's tree.\n**\n** The root node is the top node of the segment's tree after encoding\n** the entire segment, restricted to ROOT_MAX bytes (default 1024).\n** This could be either a leaf node or an interior node.  If the top\n** node requires more than ROOT_MAX bytes, it is flushed to %_segments\n** and a new root interior node is generated (which should always fit\n** within ROOT_MAX because it only needs space for 2 varints, the\n** height and the blockid of the previous root).\n**\n** The meta-information in the segment directory is:\n**   level               - segment level (see below)\n**   idx                 - index within level\n**                       - (level,idx uniquely identify a segment)\n**   start_block         - first leaf node\n**   leaves_end_block    - last leaf node\n**   end_block           - last block (including interior nodes)\n**   root                - contents of root node\n**\n** If the root node is a leaf node, then start_block,\n** leaves_end_block, and end_block are all 0.\n**\n**\n**** Segment merging ****\n** To amortize update costs, segments are grouped into levels and\n** merged in batches.  Each increase in level represents exponentially\n** more documents.\n**\n** New documents (actually, document updates) are tokenized and\n** written individually (using LeafWriter) to a level 0 segment, with\n** incrementing idx.  When idx reaches MERGE_COUNT (default 16), all\n** level 0 segments are merged into a single level 1 segment.  Level 1\n** is populated like level 0, and eventually MERGE_COUNT level 1\n** segments are merged to a single level 2 segment (representing\n** MERGE_COUNT^2 updates), and so on.\n**\n** A segment merge traverses all segments at a given level in\n** parallel, performing a straightforward sorted merge.  Since segment\n** leaf nodes are written in to the %_segments table in order, this\n** merge traverses the underlying sqlite disk structures efficiently.\n** After the merge, all segment blocks from the merged level are\n** deleted.\n**\n** MERGE_COUNT controls how often we merge segments.  16 seems to be\n** somewhat of a sweet spot for insertion performance.  32 and 64 show\n** very similar performance numbers to 16 on insertion, though they're\n** a tiny bit slower (perhaps due to more overhead in merge-time\n** sorting).  8 is about 20% slower than 16, 4 about 50% slower than\n** 16, 2 about 66% slower than 16.\n**\n** At query time, high MERGE_COUNT increases the number of segments\n** which need to be scanned and merged.  For instance, with 100k docs\n** inserted:\n**\n**    MERGE_COUNT   segments\n**       16           25\n**        8           12\n**        4           10\n**        2            6\n**\n** This appears to have only a moderate impact on queries for very\n** frequent terms (which are somewhat dominated by segment merge\n** costs), and infrequent and non-existent terms still seem to be fast\n** even with many segments.\n**\n** TODO(shess) That said, it would be nice to have a better query-side\n** argument for MERGE_COUNT of 16.  Also, it is possible/likely that\n** optimizations to things like doclist merging will swing the sweet\n** spot around.\n**\n**\n**\n**** Handling of deletions and updates ****\n** Since we're using a segmented structure, with no docid-oriented\n** index into the term index, we clearly cannot simply update the term\n** index when a document is deleted or updated.  For deletions, we\n** write an empty doclist (varint(docid) varint(POS_END)), for updates\n** we simply write the new doclist.  Segment merges overwrite older\n** data for a particular docid with newer data, so deletes or updates\n** will eventually overtake the earlier data and knock it out.  The\n** query logic likewise merges doclists so that newer data knocks out\n** older data.\n*/\n\n/************** Include fts3Int.h in the middle of fts3.c ********************/\n/************** Begin file fts3Int.h *****************************************/\n/*\n** 2009 Nov 12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n#ifndef _FTSINT_H\n#define _FTSINT_H\n\n/*\n** Activate assert() only if SQLITE_TEST is enabled.\n*/\n#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)\n# define NDEBUG 1\n#endif\n\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <stddef.h> */\n/* #include <stdio.h> */\n/* #include <string.h> */\n/* #include <stdarg.h> */\n\n/* FTS3/FTS4 require virtual tables */\n#ifdef SQLITE_OMIT_VIRTUALTABLE\n# undef SQLITE_ENABLE_FTS3\n# undef SQLITE_ENABLE_FTS4\n#endif\n\n/*\n** FTS4 is really an extension for FTS3.  It is enabled using the\n** SQLITE_ENABLE_FTS3 macro.  But to avoid confusion we also all\n** the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3.\n*/\n#if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3)\n# define SQLITE_ENABLE_FTS3\n#endif\n\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* If not building as part of the core, include sqlite3ext.h. */\n#ifndef SQLITE_CORE\n/* # include \"sqlite3ext.h\" */\nSQLITE_EXTENSION_INIT3\n#endif\n\n/* #include \"sqlite3.h\" */\n/************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/\n/************** Begin file fts3_tokenizer.h **********************************/\n/*\n** 2006 July 10\n**\n** The author disclaims copyright to this source code.\n**\n*************************************************************************\n** Defines the interface to tokenizers used by fulltext-search.  There\n** are three basic components:\n**\n** sqlite3_tokenizer_module is a singleton defining the tokenizer\n** interface functions.  This is essentially the class structure for\n** tokenizers.\n**\n** sqlite3_tokenizer is used to define a particular tokenizer, perhaps\n** including customization information defined at creation time.\n**\n** sqlite3_tokenizer_cursor is generated by a tokenizer to generate\n** tokens from a particular input.\n*/\n#ifndef _FTS3_TOKENIZER_H_\n#define _FTS3_TOKENIZER_H_\n\n/* TODO(shess) Only used for SQLITE_OK and SQLITE_DONE at this time.\n** If tokenizers are to be allowed to call sqlite3_*() functions, then\n** we will need a way to register the API consistently.\n*/\n/* #include \"sqlite3.h\" */\n\n/*\n** Structures used by the tokenizer interface. When a new tokenizer\n** implementation is registered, the caller provides a pointer to\n** an sqlite3_tokenizer_module containing pointers to the callback\n** functions that make up an implementation.\n**\n** When an fts3 table is created, it passes any arguments passed to\n** the tokenizer clause of the CREATE VIRTUAL TABLE statement to the\n** sqlite3_tokenizer_module.xCreate() function of the requested tokenizer\n** implementation. The xCreate() function in turn returns an\n** sqlite3_tokenizer structure representing the specific tokenizer to\n** be used for the fts3 table (customized by the tokenizer clause arguments).\n**\n** To tokenize an input buffer, the sqlite3_tokenizer_module.xOpen()\n** method is called. It returns an sqlite3_tokenizer_cursor object\n** that may be used to tokenize a specific input buffer based on\n** the tokenization rules supplied by a specific sqlite3_tokenizer\n** object.\n*/\ntypedef struct sqlite3_tokenizer_module sqlite3_tokenizer_module;\ntypedef struct sqlite3_tokenizer sqlite3_tokenizer;\ntypedef struct sqlite3_tokenizer_cursor sqlite3_tokenizer_cursor;\n\nstruct sqlite3_tokenizer_module {\n\n  /*\n  ** Structure version. Should always be set to 0 or 1.\n  */\n  int iVersion;\n\n  /*\n  ** Create a new tokenizer. The values in the argv[] array are the\n  ** arguments passed to the \"tokenizer\" clause of the CREATE VIRTUAL\n  ** TABLE statement that created the fts3 table. For example, if\n  ** the following SQL is executed:\n  **\n  **   CREATE .. USING fts3( ... , tokenizer <tokenizer-name> arg1 arg2)\n  **\n  ** then argc is set to 2, and the argv[] array contains pointers\n  ** to the strings \"arg1\" and \"arg2\".\n  **\n  ** This method should return either SQLITE_OK (0), or an SQLite error\n  ** code. If SQLITE_OK is returned, then *ppTokenizer should be set\n  ** to point at the newly created tokenizer structure. The generic\n  ** sqlite3_tokenizer.pModule variable should not be initialized by\n  ** this callback. The caller will do so.\n  */\n  int (*xCreate)(\n    int argc,                           /* Size of argv array */\n    const char *const*argv,             /* Tokenizer argument strings */\n    sqlite3_tokenizer **ppTokenizer     /* OUT: Created tokenizer */\n  );\n\n  /*\n  ** Destroy an existing tokenizer. The fts3 module calls this method\n  ** exactly once for each successful call to xCreate().\n  */\n  int (*xDestroy)(sqlite3_tokenizer *pTokenizer);\n\n  /*\n  ** Create a tokenizer cursor to tokenize an input buffer. The caller\n  ** is responsible for ensuring that the input buffer remains valid\n  ** until the cursor is closed (using the xClose() method).\n  */\n  int (*xOpen)(\n    sqlite3_tokenizer *pTokenizer,       /* Tokenizer object */\n    const char *pInput, int nBytes,      /* Input buffer */\n    sqlite3_tokenizer_cursor **ppCursor  /* OUT: Created tokenizer cursor */\n  );\n\n  /*\n  ** Destroy an existing tokenizer cursor. The fts3 module calls this\n  ** method exactly once for each successful call to xOpen().\n  */\n  int (*xClose)(sqlite3_tokenizer_cursor *pCursor);\n\n  /*\n  ** Retrieve the next token from the tokenizer cursor pCursor. This\n  ** method should either return SQLITE_OK and set the values of the\n  ** \"OUT\" variables identified below, or SQLITE_DONE to indicate that\n  ** the end of the buffer has been reached, or an SQLite error code.\n  **\n  ** *ppToken should be set to point at a buffer containing the\n  ** normalized version of the token (i.e. after any case-folding and/or\n  ** stemming has been performed). *pnBytes should be set to the length\n  ** of this buffer in bytes. The input text that generated the token is\n  ** identified by the byte offsets returned in *piStartOffset and\n  ** *piEndOffset. *piStartOffset should be set to the index of the first\n  ** byte of the token in the input buffer. *piEndOffset should be set\n  ** to the index of the first byte just past the end of the token in\n  ** the input buffer.\n  **\n  ** The buffer *ppToken is set to point at is managed by the tokenizer\n  ** implementation. It is only required to be valid until the next call\n  ** to xNext() or xClose().\n  */\n  /* TODO(shess) current implementation requires pInput to be\n  ** nul-terminated.  This should either be fixed, or pInput/nBytes\n  ** should be converted to zInput.\n  */\n  int (*xNext)(\n    sqlite3_tokenizer_cursor *pCursor,   /* Tokenizer cursor */\n    const char **ppToken, int *pnBytes,  /* OUT: Normalized text for token */\n    int *piStartOffset,  /* OUT: Byte offset of token in input buffer */\n    int *piEndOffset,    /* OUT: Byte offset of end of token in input buffer */\n    int *piPosition      /* OUT: Number of tokens returned before this one */\n  );\n\n  /***********************************************************************\n  ** Methods below this point are only available if iVersion>=1.\n  */\n\n  /*\n  ** Configure the language id of a tokenizer cursor.\n  */\n  int (*xLanguageid)(sqlite3_tokenizer_cursor *pCsr, int iLangid);\n};\n\nstruct sqlite3_tokenizer {\n  const sqlite3_tokenizer_module *pModule;  /* The module for this tokenizer */\n  /* Tokenizer implementations will typically add additional fields */\n};\n\nstruct sqlite3_tokenizer_cursor {\n  sqlite3_tokenizer *pTokenizer;       /* Tokenizer for this cursor. */\n  /* Tokenizer implementations will typically add additional fields */\n};\n\nint fts3_global_term_cnt(int iTerm, int iCol);\nint fts3_term_cnt(int iTerm, int iCol);\n\n\n#endif /* _FTS3_TOKENIZER_H_ */\n\n/************** End of fts3_tokenizer.h **************************************/\n/************** Continuing where we left off in fts3Int.h ********************/\n/************** Include fts3_hash.h in the middle of fts3Int.h ***************/\n/************** Begin file fts3_hash.h ***************************************/\n/*\n** 2001 September 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the header file for the generic hash-table implementation\n** used in SQLite.  We've modified it slightly to serve as a standalone\n** hash table implementation for the full-text indexing module.\n**\n*/\n#ifndef _FTS3_HASH_H_\n#define _FTS3_HASH_H_\n\n/* Forward declarations of structures. */\ntypedef struct Fts3Hash Fts3Hash;\ntypedef struct Fts3HashElem Fts3HashElem;\n\n/* A complete hash table is an instance of the following structure.\n** The internals of this structure are intended to be opaque -- client\n** code should not attempt to access or modify the fields of this structure\n** directly.  Change this structure only by using the routines below.\n** However, many of the \"procedures\" and \"functions\" for modifying and\n** accessing this structure are really macros, so we can't really make\n** this structure opaque.\n*/\nstruct Fts3Hash {\n  char keyClass;          /* HASH_INT, _POINTER, _STRING, _BINARY */\n  char copyKey;           /* True if copy of key made on insert */\n  int count;              /* Number of entries in this table */\n  Fts3HashElem *first;    /* The first element of the array */\n  int htsize;             /* Number of buckets in the hash table */\n  struct _fts3ht {        /* the hash table */\n    int count;               /* Number of entries with this hash */\n    Fts3HashElem *chain;     /* Pointer to first entry with this hash */\n  } *ht;\n};\n\n/* Each element in the hash table is an instance of the following\n** structure.  All elements are stored on a single doubly-linked list.\n**\n** Again, this structure is intended to be opaque, but it can't really\n** be opaque because it is used by macros.\n*/\nstruct Fts3HashElem {\n  Fts3HashElem *next, *prev; /* Next and previous elements in the table */\n  void *data;                /* Data associated with this element */\n  void *pKey; int nKey;      /* Key associated with this element */\n};\n\n/*\n** There are 2 different modes of operation for a hash table:\n**\n**   FTS3_HASH_STRING        pKey points to a string that is nKey bytes long\n**                           (including the null-terminator, if any).  Case\n**                           is respected in comparisons.\n**\n**   FTS3_HASH_BINARY        pKey points to binary data nKey bytes long.\n**                           memcmp() is used to compare keys.\n**\n** A copy of the key is made if the copyKey parameter to fts3HashInit is 1.\n*/\n#define FTS3_HASH_STRING    1\n#define FTS3_HASH_BINARY    2\n\n/*\n** Access routines.  To delete, insert a NULL pointer.\n*/\nSQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey);\nSQLITE_PRIVATE void *sqlite3Fts3HashInsert(Fts3Hash*, const void *pKey, int nKey, void *pData);\nSQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash*, const void *pKey, int nKey);\nSQLITE_PRIVATE void sqlite3Fts3HashClear(Fts3Hash*);\nSQLITE_PRIVATE Fts3HashElem *sqlite3Fts3HashFindElem(const Fts3Hash *, const void *, int);\n\n/*\n** Shorthand for the functions above\n*/\n#define fts3HashInit     sqlite3Fts3HashInit\n#define fts3HashInsert   sqlite3Fts3HashInsert\n#define fts3HashFind     sqlite3Fts3HashFind\n#define fts3HashClear    sqlite3Fts3HashClear\n#define fts3HashFindElem sqlite3Fts3HashFindElem\n\n/*\n** Macros for looping over all elements of a hash table.  The idiom is\n** like this:\n**\n**   Fts3Hash h;\n**   Fts3HashElem *p;\n**   ...\n**   for(p=fts3HashFirst(&h); p; p=fts3HashNext(p)){\n**     SomeStructure *pData = fts3HashData(p);\n**     // do something with pData\n**   }\n*/\n#define fts3HashFirst(H)  ((H)->first)\n#define fts3HashNext(E)   ((E)->next)\n#define fts3HashData(E)   ((E)->data)\n#define fts3HashKey(E)    ((E)->pKey)\n#define fts3HashKeysize(E) ((E)->nKey)\n\n/*\n** Number of entries in a hash table\n*/\n#define fts3HashCount(H)  ((H)->count)\n\n#endif /* _FTS3_HASH_H_ */\n\n/************** End of fts3_hash.h *******************************************/\n/************** Continuing where we left off in fts3Int.h ********************/\n\n/*\n** This constant determines the maximum depth of an FTS expression tree\n** that the library will create and use. FTS uses recursion to perform\n** various operations on the query tree, so the disadvantage of a large\n** limit is that it may allow very large queries to use large amounts\n** of stack space (perhaps causing a stack overflow).\n*/\n#ifndef SQLITE_FTS3_MAX_EXPR_DEPTH\n# define SQLITE_FTS3_MAX_EXPR_DEPTH 12\n#endif\n\n\n/*\n** This constant controls how often segments are merged. Once there are\n** FTS3_MERGE_COUNT segments of level N, they are merged into a single\n** segment of level N+1.\n*/\n#define FTS3_MERGE_COUNT 16\n\n/*\n** This is the maximum amount of data (in bytes) to store in the\n** Fts3Table.pendingTerms hash table. Normally, the hash table is\n** populated as documents are inserted/updated/deleted in a transaction\n** and used to create a new segment when the transaction is committed.\n** However if this limit is reached midway through a transaction, a new\n** segment is created and the hash table cleared immediately.\n*/\n#define FTS3_MAX_PENDING_DATA (1*1024*1024)\n\n/*\n** Macro to return the number of elements in an array. SQLite has a\n** similar macro called ArraySize(). Use a different name to avoid\n** a collision when building an amalgamation with built-in FTS3.\n*/\n#define SizeofArray(X) ((int)(sizeof(X)/sizeof(X[0])))\n\n\n#ifndef MIN\n# define MIN(x,y) ((x)<(y)?(x):(y))\n#endif\n#ifndef MAX\n# define MAX(x,y) ((x)>(y)?(x):(y))\n#endif\n\n/*\n** Maximum length of a varint encoded integer. The varint format is different\n** from that used by SQLite, so the maximum length is 10, not 9.\n*/\n#define FTS3_VARINT_MAX 10\n\n#define FTS3_BUFFER_PADDING 8\n\n/*\n** FTS4 virtual tables may maintain multiple indexes - one index of all terms\n** in the document set and zero or more prefix indexes. All indexes are stored\n** as one or more b+-trees in the %_segments and %_segdir tables.\n**\n** It is possible to determine which index a b+-tree belongs to based on the\n** value stored in the \"%_segdir.level\" column. Given this value L, the index\n** that the b+-tree belongs to is (L<<10). In other words, all b+-trees with\n** level values between 0 and 1023 (inclusive) belong to index 0, all levels\n** between 1024 and 2047 to index 1, and so on.\n**\n** It is considered impossible for an index to use more than 1024 levels. In\n** theory though this may happen, but only after at least\n** (FTS3_MERGE_COUNT^1024) separate flushes of the pending-terms tables.\n*/\n#define FTS3_SEGDIR_MAXLEVEL      1024\n#define FTS3_SEGDIR_MAXLEVEL_STR \"1024\"\n\n/*\n** The testcase() macro is only used by the amalgamation.  If undefined,\n** make it a no-op.\n*/\n#ifndef testcase\n# define testcase(X)\n#endif\n\n/*\n** Terminator values for position-lists and column-lists.\n*/\n#define POS_COLUMN  (1)     /* Column-list terminator */\n#define POS_END     (0)     /* Position-list terminator */\n\n/*\n** The assert_fts3_nc() macro is similar to the assert() macro, except that it\n** is used for assert() conditions that are true only if it can be\n** guranteed that the database is not corrupt.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_API extern int sqlite3_fts3_may_be_corrupt;\n# define assert_fts3_nc(x) assert(sqlite3_fts3_may_be_corrupt || (x))\n#else\n# define assert_fts3_nc(x) assert(x)\n#endif\n\n/*\n** This section provides definitions to allow the\n** FTS3 extension to be compiled outside of the\n** amalgamation.\n*/\n#ifndef SQLITE_AMALGAMATION\n/*\n** Macros indicating that conditional expressions are always true or\n** false.\n*/\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)\n# define SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS 1\n#endif\n#if defined(SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS)\n# define ALWAYS(X)      (1)\n# define NEVER(X)       (0)\n#elif !defined(NDEBUG)\n# define ALWAYS(X)      ((X)?1:(assert(0),0))\n# define NEVER(X)       ((X)?(assert(0),1):0)\n#else\n# define ALWAYS(X)      (X)\n# define NEVER(X)       (X)\n#endif\n\n/*\n** Internal types used by SQLite.\n*/\ntypedef unsigned char u8;         /* 1-byte (or larger) unsigned integer */\ntypedef short int i16;            /* 2-byte (or larger) signed integer */\ntypedef unsigned int u32;         /* 4-byte unsigned integer */\ntypedef sqlite3_uint64 u64;       /* 8-byte unsigned integer */\ntypedef sqlite3_int64 i64;        /* 8-byte signed integer */\n\n/*\n** Macro used to suppress compiler warnings for unused parameters.\n*/\n#define UNUSED_PARAMETER(x) (void)(x)\n\n/*\n** The TESTONLY macro is used to enclose variable declarations or\n** other bits of code that are needed to support the arguments\n** within testcase() and assert() macros.\n*/\n#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)\n# define TESTONLY(X)  X\n#else\n# define TESTONLY(X)\n#endif\n\n#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))\n#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)\n\n#define deliberate_fall_through\n\n/*\n** Macros needed to provide flexible arrays in a portable way\n*/\n#ifndef offsetof\n# define offsetof(ST,M) ((size_t)((char*)&((ST*)0)->M - (char*)0))\n#endif\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)\n# define FLEXARRAY\n#else\n# define FLEXARRAY 1\n#endif\n\n\n#endif /* SQLITE_AMALGAMATION */\n\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3Fts3Corrupt(void);\n# define FTS_CORRUPT_VTAB sqlite3Fts3Corrupt()\n#else\n# define FTS_CORRUPT_VTAB SQLITE_CORRUPT_VTAB\n#endif\n\ntypedef struct Fts3Table Fts3Table;\ntypedef struct Fts3Cursor Fts3Cursor;\ntypedef struct Fts3Expr Fts3Expr;\ntypedef struct Fts3Phrase Fts3Phrase;\ntypedef struct Fts3PhraseToken Fts3PhraseToken;\n\ntypedef struct Fts3Doclist Fts3Doclist;\ntypedef struct Fts3SegFilter Fts3SegFilter;\ntypedef struct Fts3DeferredToken Fts3DeferredToken;\ntypedef struct Fts3SegReader Fts3SegReader;\ntypedef struct Fts3MultiSegReader Fts3MultiSegReader;\n\ntypedef struct MatchinfoBuffer MatchinfoBuffer;\n\n/*\n** A connection to a fulltext index is an instance of the following\n** structure. The xCreate and xConnect methods create an instance\n** of this structure and xDestroy and xDisconnect free that instance.\n** All other methods receive a pointer to the structure as one of their\n** arguments.\n*/\nstruct Fts3Table {\n  sqlite3_vtab base;              /* Base class used by SQLite core */\n  sqlite3 *db;                    /* The database connection */\n  const char *zDb;                /* logical database name */\n  const char *zName;              /* virtual table name */\n  int nColumn;                    /* number of named columns in virtual table */\n  char **azColumn;                /* column names.  malloced */\n  u8 *abNotindexed;               /* True for 'notindexed' columns */\n  sqlite3_tokenizer *pTokenizer;  /* tokenizer for inserts and queries */\n  char *zContentTbl;              /* content=xxx option, or NULL */\n  char *zLanguageid;              /* languageid=xxx option, or NULL */\n  int nAutoincrmerge;             /* Value configured by 'automerge' */\n  u32 nLeafAdd;                   /* Number of leaf blocks added this trans */\n  int bLock;                      /* Used to prevent recursive content= tbls */\n\n  /* Precompiled statements used by the implementation. Each of these\n  ** statements is run and reset within a single virtual table API call.\n  */\n  sqlite3_stmt *aStmt[40];\n  sqlite3_stmt *pSeekStmt;        /* Cache for fts3CursorSeekStmt() */\n\n  char *zReadExprlist;\n  char *zWriteExprlist;\n\n  int nNodeSize;                  /* Soft limit for node size */\n  u8 bFts4;                       /* True for FTS4, false for FTS3 */\n  u8 bHasStat;                    /* True if %_stat table exists (2==unknown) */\n  u8 bHasDocsize;                 /* True if %_docsize table exists */\n  u8 bDescIdx;                    /* True if doclists are in reverse order */\n  u8 bIgnoreSavepoint;            /* True to ignore xSavepoint invocations */\n  int nPgsz;                      /* Page size for host database */\n  char *zSegmentsTbl;             /* Name of %_segments table */\n  sqlite3_blob *pSegments;        /* Blob handle open on %_segments table */\n  int iSavepoint;\n\n  /*\n  ** The following array of hash tables is used to buffer pending index\n  ** updates during transactions. All pending updates buffered at any one\n  ** time must share a common language-id (see the FTS4 langid= feature).\n  ** The current language id is stored in variable iPrevLangid.\n  **\n  ** A single FTS4 table may have multiple full-text indexes. For each index\n  ** there is an entry in the aIndex[] array. Index 0 is an index of all the\n  ** terms that appear in the document set. Each subsequent index in aIndex[]\n  ** is an index of prefixes of a specific length.\n  **\n  ** Variable nPendingData contains an estimate the memory consumed by the\n  ** pending data structures, including hash table overhead, but not including\n  ** malloc overhead.  When nPendingData exceeds nMaxPendingData, all hash\n  ** tables are flushed to disk. Variable iPrevDocid is the docid of the most\n  ** recently inserted record.\n  */\n  int nIndex;                     /* Size of aIndex[] */\n  struct Fts3Index {\n    int nPrefix;                  /* Prefix length (0 for main terms index) */\n    Fts3Hash hPending;            /* Pending terms table for this index */\n  } *aIndex;\n  int nMaxPendingData;            /* Max pending data before flush to disk */\n  int nPendingData;               /* Current bytes of pending data */\n  sqlite_int64 iPrevDocid;        /* Docid of most recently inserted document */\n  int iPrevLangid;                /* Langid of recently inserted document */\n  int bPrevDelete;                /* True if last operation was a delete */\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)\n  /* State variables used for validating that the transaction control\n  ** methods of the virtual table are called at appropriate times.  These\n  ** values do not contribute to FTS functionality; they are used for\n  ** verifying the operation of the SQLite core.\n  */\n  int inTransaction;     /* True after xBegin but before xCommit/xRollback */\n  int mxSavepoint;       /* Largest valid xSavepoint integer */\n#endif\n\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  /* True to disable the incremental doclist optimization. This is controlled\n  ** by special insert command 'test-no-incr-doclist'.  */\n  int bNoIncrDoclist;\n\n  /* Number of segments in a level */\n  int nMergeCount;\n#endif\n};\n\n/* Macro to find the number of segments to merge */\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n# define MergeCount(P) ((P)->nMergeCount)\n#else\n# define MergeCount(P) FTS3_MERGE_COUNT\n#endif\n\n/*\n** When the core wants to read from the virtual table, it creates a\n** virtual table cursor (an instance of the following structure) using\n** the xOpen method. Cursors are destroyed using the xClose method.\n*/\nstruct Fts3Cursor {\n  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */\n  i16 eSearch;                    /* Search strategy (see below) */\n  u8 isEof;                       /* True if at End Of Results */\n  u8 isRequireSeek;               /* True if must seek pStmt to %_content row */\n  u8 bSeekStmt;                   /* True if pStmt is a seek */\n  sqlite3_stmt *pStmt;            /* Prepared statement in use by the cursor */\n  Fts3Expr *pExpr;                /* Parsed MATCH query string */\n  int iLangid;                    /* Language being queried for */\n  int nPhrase;                    /* Number of matchable phrases in query */\n  Fts3DeferredToken *pDeferred;   /* Deferred search tokens, if any */\n  sqlite3_int64 iPrevId;          /* Previous id read from aDoclist */\n  char *pNextId;                  /* Pointer into the body of aDoclist */\n  char *aDoclist;                 /* List of docids for full-text queries */\n  int nDoclist;                   /* Size of buffer at aDoclist */\n  u8 bDesc;                       /* True to sort in descending order */\n  int eEvalmode;                  /* An FTS3_EVAL_XX constant */\n  int nRowAvg;                    /* Average size of database rows, in pages */\n  sqlite3_int64 nDoc;             /* Documents in table */\n  i64 iMinDocid;                  /* Minimum docid to return */\n  i64 iMaxDocid;                  /* Maximum docid to return */\n  int isMatchinfoNeeded;          /* True when aMatchinfo[] needs filling in */\n  MatchinfoBuffer *pMIBuffer;     /* Buffer for matchinfo data */\n};\n\n#define FTS3_EVAL_FILTER    0\n#define FTS3_EVAL_NEXT      1\n#define FTS3_EVAL_MATCHINFO 2\n\n/*\n** The Fts3Cursor.eSearch member is always set to one of the following.\n** Actually, Fts3Cursor.eSearch can be greater than or equal to\n** FTS3_FULLTEXT_SEARCH.  If so, then Fts3Cursor.eSearch - 2 is the index\n** of the column to be searched.  For example, in\n**\n**     CREATE VIRTUAL TABLE ex1 USING fts3(a,b,c,d);\n**     SELECT docid FROM ex1 WHERE b MATCH 'one two three';\n**\n** Because the LHS of the MATCH operator is 2nd column \"b\",\n** Fts3Cursor.eSearch will be set to FTS3_FULLTEXT_SEARCH+1.  (+0 for a,\n** +1 for b, +2 for c, +3 for d.)  If the LHS of MATCH were \"ex1\"\n** indicating that all columns should be searched,\n** then eSearch would be set to FTS3_FULLTEXT_SEARCH+4.\n*/\n#define FTS3_FULLSCAN_SEARCH 0    /* Linear scan of %_content table */\n#define FTS3_DOCID_SEARCH    1    /* Lookup by rowid on %_content table */\n#define FTS3_FULLTEXT_SEARCH 2    /* Full-text index search */\n\n/*\n** The lower 16-bits of the sqlite3_index_info.idxNum value set by\n** the xBestIndex() method contains the Fts3Cursor.eSearch value described\n** above. The upper 16-bits contain a combination of the following\n** bits, used to describe extra constraints on full-text searches.\n*/\n#define FTS3_HAVE_LANGID    0x00010000      /* languageid=? */\n#define FTS3_HAVE_DOCID_GE  0x00020000      /* docid>=? */\n#define FTS3_HAVE_DOCID_LE  0x00040000      /* docid<=? */\n\nstruct Fts3Doclist {\n  char *aAll;                    /* Array containing doclist (or NULL) */\n  int nAll;                      /* Size of a[] in bytes */\n  char *pNextDocid;              /* Pointer to next docid */\n\n  sqlite3_int64 iDocid;          /* Current docid (if pList!=0) */\n  int bFreeList;                 /* True if pList should be sqlite3_free()d */\n  char *pList;                   /* Pointer to position list following iDocid */\n  int nList;                     /* Length of position list */\n};\n\n/*\n** A \"phrase\" is a sequence of one or more tokens that must match in\n** sequence.  A single token is the base case and the most common case.\n** For a sequence of tokens contained in double-quotes (i.e. \"one two three\")\n** nToken will be the number of tokens in the string.\n*/\nstruct Fts3PhraseToken {\n  char *z;                        /* Text of the token */\n  int n;                          /* Number of bytes in buffer z */\n  int isPrefix;                   /* True if token ends with a \"*\" character */\n  int bFirst;                     /* True if token must appear at position 0 */\n\n  /* Variables above this point are populated when the expression is\n  ** parsed (by code in fts3_expr.c). Below this point the variables are\n  ** used when evaluating the expression. */\n  Fts3DeferredToken *pDeferred;   /* Deferred token object for this token */\n  Fts3MultiSegReader *pSegcsr;    /* Segment-reader for this token */\n};\n\nstruct Fts3Phrase {\n  /* Cache of doclist for this phrase. */\n  Fts3Doclist doclist;\n  int bIncr;                 /* True if doclist is loaded incrementally */\n  int iDoclistToken;\n\n  /* Used by sqlite3Fts3EvalPhrasePoslist() if this is a descendent of an\n  ** OR condition.  */\n  char *pOrPoslist;\n  i64 iOrDocid;\n\n  /* Variables below this point are populated by fts3_expr.c when parsing\n  ** a MATCH expression. Everything above is part of the evaluation phase.\n  */\n  int nToken;                /* Number of tokens in the phrase */\n  int iColumn;               /* Index of column this phrase must match */\n  Fts3PhraseToken aToken[FLEXARRAY]; /* One for each token in the phrase */\n};\n\n/* Size (in bytes) of an Fts3Phrase object large enough to hold N tokens */\n#define SZ_FTS3PHRASE(N) \\\n  (offsetof(Fts3Phrase,aToken)+(N)*sizeof(Fts3PhraseToken))\n\n/*\n** A tree of these objects forms the RHS of a MATCH operator.\n**\n** If Fts3Expr.eType is FTSQUERY_PHRASE and isLoaded is true, then aDoclist\n** points to a malloced buffer, size nDoclist bytes, containing the results\n** of this phrase query in FTS3 doclist format. As usual, the initial\n** \"Length\" field found in doclists stored on disk is omitted from this\n** buffer.\n**\n** Variable aMI is used only for FTSQUERY_NEAR nodes to store the global\n** matchinfo data. If it is not NULL, it points to an array of size nCol*3,\n** where nCol is the number of columns in the queried FTS table. The array\n** is populated as follows:\n**\n**   aMI[iCol*3 + 0] = Undefined\n**   aMI[iCol*3 + 1] = Number of occurrences\n**   aMI[iCol*3 + 2] = Number of rows containing at least one instance\n**\n** The aMI array is allocated using sqlite3_malloc(). It should be freed\n** when the expression node is.\n*/\nstruct Fts3Expr {\n  int eType;                 /* One of the FTSQUERY_XXX values defined below */\n  int nNear;                 /* Valid if eType==FTSQUERY_NEAR */\n  Fts3Expr *pParent;         /* pParent->pLeft==this or pParent->pRight==this */\n  Fts3Expr *pLeft;           /* Left operand */\n  Fts3Expr *pRight;          /* Right operand */\n  Fts3Phrase *pPhrase;       /* Valid if eType==FTSQUERY_PHRASE */\n\n  /* The following are used by the fts3_eval.c module. */\n  sqlite3_int64 iDocid;      /* Current docid */\n  u8 bEof;                   /* True this expression is at EOF already */\n  u8 bStart;                 /* True if iDocid is valid */\n  u8 bDeferred;              /* True if this expression is entirely deferred */\n\n  /* The following are used by the fts3_snippet.c module. */\n  int iPhrase;               /* Index of this phrase in matchinfo() results */\n  u32 *aMI;                  /* See above */\n};\n\n/*\n** Candidate values for Fts3Query.eType. Note that the order of the first\n** four values is in order of precedence when parsing expressions. For\n** example, the following:\n**\n**   \"a OR b AND c NOT d NEAR e\"\n**\n** is equivalent to:\n**\n**   \"a OR (b AND (c NOT (d NEAR e)))\"\n*/\n#define FTSQUERY_NEAR   1\n#define FTSQUERY_NOT    2\n#define FTSQUERY_AND    3\n#define FTSQUERY_OR     4\n#define FTSQUERY_PHRASE 5\n\n\n/* fts3_write.c */\nSQLITE_PRIVATE int sqlite3Fts3UpdateMethod(sqlite3_vtab*,int,sqlite3_value**,sqlite3_int64*);\nSQLITE_PRIVATE int sqlite3Fts3PendingTermsFlush(Fts3Table *);\nSQLITE_PRIVATE void sqlite3Fts3PendingTermsClear(Fts3Table *);\nSQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *);\nSQLITE_PRIVATE int sqlite3Fts3SegReaderNew(int, int, sqlite3_int64,\n  sqlite3_int64, sqlite3_int64, const char *, int, Fts3SegReader**);\nSQLITE_PRIVATE int sqlite3Fts3SegReaderPending(\n  Fts3Table*,int,const char*,int,int,Fts3SegReader**);\nSQLITE_PRIVATE void sqlite3Fts3SegReaderFree(Fts3SegReader *);\nSQLITE_PRIVATE int sqlite3Fts3AllSegdirs(Fts3Table*, int, int, int, sqlite3_stmt **);\nSQLITE_PRIVATE int sqlite3Fts3ReadBlock(Fts3Table*, sqlite3_int64, char **, int*, int*);\n\nSQLITE_PRIVATE int sqlite3Fts3SelectDoctotal(Fts3Table *, sqlite3_stmt **);\nSQLITE_PRIVATE int sqlite3Fts3SelectDocsize(Fts3Table *, sqlite3_int64, sqlite3_stmt **);\n\n#ifndef SQLITE_DISABLE_FTS4_DEFERRED\nSQLITE_PRIVATE void sqlite3Fts3FreeDeferredTokens(Fts3Cursor *);\nSQLITE_PRIVATE int sqlite3Fts3DeferToken(Fts3Cursor *, Fts3PhraseToken *, int);\nSQLITE_PRIVATE int sqlite3Fts3CacheDeferredDoclists(Fts3Cursor *);\nSQLITE_PRIVATE void sqlite3Fts3FreeDeferredDoclists(Fts3Cursor *);\nSQLITE_PRIVATE int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);\n#else\n# define sqlite3Fts3FreeDeferredTokens(x)\n# define sqlite3Fts3DeferToken(x,y,z) SQLITE_OK\n# define sqlite3Fts3CacheDeferredDoclists(x) SQLITE_OK\n# define sqlite3Fts3FreeDeferredDoclists(x)\n# define sqlite3Fts3DeferredTokenList(x,y,z) SQLITE_OK\n#endif\n\nSQLITE_PRIVATE void sqlite3Fts3SegmentsClose(Fts3Table *);\nSQLITE_PRIVATE int sqlite3Fts3MaxLevel(Fts3Table *, int *);\n\n/* Special values interpreted by sqlite3SegReaderCursor() */\n#define FTS3_SEGCURSOR_PENDING        -1\n#define FTS3_SEGCURSOR_ALL            -2\n\nSQLITE_PRIVATE int sqlite3Fts3SegReaderStart(Fts3Table*, Fts3MultiSegReader*, Fts3SegFilter*);\nSQLITE_PRIVATE int sqlite3Fts3SegReaderStep(Fts3Table *, Fts3MultiSegReader *);\nSQLITE_PRIVATE void sqlite3Fts3SegReaderFinish(Fts3MultiSegReader *);\n\nSQLITE_PRIVATE int sqlite3Fts3SegReaderCursor(Fts3Table *,\n    int, int, int, const char *, int, int, int, Fts3MultiSegReader *);\n\n/* Flags allowed as part of the 4th argument to SegmentReaderIterate() */\n#define FTS3_SEGMENT_REQUIRE_POS   0x00000001\n#define FTS3_SEGMENT_IGNORE_EMPTY  0x00000002\n#define FTS3_SEGMENT_COLUMN_FILTER 0x00000004\n#define FTS3_SEGMENT_PREFIX        0x00000008\n#define FTS3_SEGMENT_SCAN          0x00000010\n#define FTS3_SEGMENT_FIRST         0x00000020\n\n/* Type passed as 4th argument to SegmentReaderIterate() */\nstruct Fts3SegFilter {\n  const char *zTerm;\n  int nTerm;\n  int iCol;\n  int flags;\n};\n\nstruct Fts3MultiSegReader {\n  /* Used internally by sqlite3Fts3SegReaderXXX() calls */\n  Fts3SegReader **apSegment;      /* Array of Fts3SegReader objects */\n  int nSegment;                   /* Size of apSegment array */\n  int nAdvance;                   /* How many seg-readers to advance */\n  Fts3SegFilter *pFilter;         /* Pointer to filter object */\n  char *aBuffer;                  /* Buffer to merge doclists in */\n  i64 nBuffer;                    /* Allocated size of aBuffer[] in bytes */\n\n  int iColFilter;                 /* If >=0, filter for this column */\n  int bRestart;\n\n  /* Used by fts3.c only. */\n  int nCost;                      /* Cost of running iterator */\n  int bLookup;                    /* True if a lookup of a single entry. */\n\n  /* Output values. Valid only after Fts3SegReaderStep() returns SQLITE_ROW. */\n  char *zTerm;                    /* Pointer to term buffer */\n  int nTerm;                      /* Size of zTerm in bytes */\n  char *aDoclist;                 /* Pointer to doclist buffer */\n  int nDoclist;                   /* Size of aDoclist[] in bytes */\n};\n\nSQLITE_PRIVATE int sqlite3Fts3Incrmerge(Fts3Table*,int,int);\n\n#define fts3GetVarint32(p, piVal) (                                           \\\n  (*(u8*)(p)&0x80) ? sqlite3Fts3GetVarint32(p, piVal) : (*piVal=*(u8*)(p), 1) \\\n)\n\n/* fts3.c */\nSQLITE_PRIVATE void sqlite3Fts3ErrMsg(char**,const char*,...);\nSQLITE_PRIVATE int sqlite3Fts3PutVarint(char *, sqlite3_int64);\nSQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *, sqlite_int64 *);\nSQLITE_PRIVATE int sqlite3Fts3GetVarintU(const char *, sqlite_uint64 *);\nSQLITE_PRIVATE int sqlite3Fts3GetVarintBounded(const char*,const char*,sqlite3_int64*);\nSQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *, int *);\nSQLITE_PRIVATE int sqlite3Fts3VarintLen(sqlite3_uint64);\nSQLITE_PRIVATE void sqlite3Fts3Dequote(char *);\nSQLITE_PRIVATE void sqlite3Fts3DoclistPrev(int,char*,int,char**,sqlite3_int64*,int*,u8*);\nSQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(Fts3Cursor *, Fts3Expr *, u32 *);\nSQLITE_PRIVATE int sqlite3Fts3FirstFilter(sqlite3_int64, char *, int, char *);\nSQLITE_PRIVATE void sqlite3Fts3CreateStatTable(int*, Fts3Table*);\nSQLITE_PRIVATE int sqlite3Fts3EvalTestDeferred(Fts3Cursor *pCsr, int *pRc);\nSQLITE_PRIVATE int sqlite3Fts3ReadInt(const char *z, int *pnOut);\n\n/* fts3_tokenizer.c */\nSQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *, int *);\nSQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);\nSQLITE_PRIVATE int sqlite3Fts3InitTokenizer(Fts3Hash *pHash, const char *,\n    sqlite3_tokenizer **, char **\n);\nSQLITE_PRIVATE int sqlite3Fts3IsIdChar(char);\n\n/* fts3_snippet.c */\nSQLITE_PRIVATE void sqlite3Fts3Offsets(sqlite3_context*, Fts3Cursor*);\nSQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context *, Fts3Cursor *, const char *,\n  const char *, const char *, int, int\n);\nSQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *, const char *);\nSQLITE_PRIVATE void sqlite3Fts3MIBufferFree(MatchinfoBuffer *p);\n\n/* fts3_expr.c */\nSQLITE_PRIVATE int sqlite3Fts3ExprParse(sqlite3_tokenizer *, int,\n  char **, int, int, int, const char *, int, Fts3Expr **, char **\n);\nSQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *);\n#ifdef SQLITE_TEST\nSQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash*);\nSQLITE_PRIVATE int sqlite3Fts3InitTerm(sqlite3 *db);\n#endif\nSQLITE_PRIVATE void *sqlite3Fts3MallocZero(i64 nByte);\n\nSQLITE_PRIVATE int sqlite3Fts3OpenTokenizer(sqlite3_tokenizer *, int, const char *, int,\n  sqlite3_tokenizer_cursor **\n);\n\n/* fts3_aux.c */\nSQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db);\n\nSQLITE_PRIVATE void sqlite3Fts3EvalPhraseCleanup(Fts3Phrase *);\n\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrStart(\n    Fts3Table*, Fts3MultiSegReader*, int, const char*, int);\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrNext(\n    Fts3Table *, Fts3MultiSegReader *, sqlite3_int64 *, char **, int *);\nSQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iCol, char **);\nSQLITE_PRIVATE int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);\nSQLITE_PRIVATE int sqlite3Fts3MsrCancel(Fts3Cursor*, Fts3Expr*);\n\n/* fts3_tokenize_vtab.c */\nSQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3*, Fts3Hash *, void(*xDestroy)(void*));\n\n/* fts3_unicode2.c (functions generated by parsing unicode text files) */\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\nSQLITE_PRIVATE int sqlite3FtsUnicodeFold(int, int);\nSQLITE_PRIVATE int sqlite3FtsUnicodeIsalnum(int);\nSQLITE_PRIVATE int sqlite3FtsUnicodeIsdiacritic(int);\n#endif\n\nSQLITE_PRIVATE int sqlite3Fts3ExprIterate(Fts3Expr*, int (*x)(Fts3Expr*,int,void*), void*);\n\nSQLITE_PRIVATE int sqlite3Fts3IntegrityCheck(Fts3Table *p, int *pbOk);\n\n#endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */\n#endif /* _FTSINT_H */\n\n/************** End of fts3Int.h *********************************************/\n/************** Continuing where we left off in fts3.c ***********************/\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)\n# define SQLITE_CORE 1\n#endif\n\n\n/* #include \"fts3.h\" */\n#ifndef SQLITE_CORE\n/* # include \"sqlite3ext.h\" */\n  SQLITE_EXTENSION_INIT1\n#endif\n\ntypedef struct Fts3HashWrapper Fts3HashWrapper;\nstruct Fts3HashWrapper {\n  Fts3Hash hash;                  /* Hash table */\n  int nRef;                       /* Number of pointers to this object */\n};\n\nstatic int fts3EvalNext(Fts3Cursor *pCsr);\nstatic int fts3EvalStart(Fts3Cursor *pCsr);\nstatic int fts3TermSegReaderCursor(\n    Fts3Cursor *, const char *, int, int, Fts3MultiSegReader **);\n\n/*\n** This variable is set to false when running tests for which the on disk\n** structures should not be corrupt. Otherwise, true. If it is false, extra\n** assert() conditions in the fts3 code are activated - conditions that are\n** only true if it is guaranteed that the fts3 database is not corrupt.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_API int sqlite3_fts3_may_be_corrupt = 1;\n#endif\n\n/*\n** Write a 64-bit variable-length integer to memory starting at p[0].\n** The length of data written will be between 1 and FTS3_VARINT_MAX bytes.\n** The number of bytes written is returned.\n*/\nSQLITE_PRIVATE int sqlite3Fts3PutVarint(char *p, sqlite_int64 v){\n  unsigned char *q = (unsigned char *) p;\n  sqlite_uint64 vu = v;\n  do{\n    *q++ = (unsigned char) ((vu & 0x7f) | 0x80);\n    vu >>= 7;\n  }while( vu!=0 );\n  q[-1] &= 0x7f;  /* turn off high bit in final byte */\n  assert( q - (unsigned char *)p <= FTS3_VARINT_MAX );\n  return (int) (q - (unsigned char *)p);\n}\n\n#define GETVARINT_STEP(v, ptr, shift, mask1, mask2, var, ret) \\\n  v = (v & mask1) | ( (*(const unsigned char*)(ptr++)) << shift );  \\\n  if( (v & mask2)==0 ){ var = v; return ret; }\n#define GETVARINT_INIT(v, ptr, shift, mask1, mask2, var, ret) \\\n  v = (*ptr++);                                               \\\n  if( (v & mask2)==0 ){ var = v; return ret; }\n\nSQLITE_PRIVATE int sqlite3Fts3GetVarintU(const char *pBuf, sqlite_uint64 *v){\n  const unsigned char *p = (const unsigned char*)pBuf;\n  const unsigned char *pStart = p;\n  u32 a;\n  u64 b;\n  int shift;\n\n  GETVARINT_INIT(a, p, 0,  0x00,     0x80, *v, 1);\n  GETVARINT_STEP(a, p, 7,  0x7F,     0x4000, *v, 2);\n  GETVARINT_STEP(a, p, 14, 0x3FFF,   0x200000, *v, 3);\n  GETVARINT_STEP(a, p, 21, 0x1FFFFF, 0x10000000, *v, 4);\n  b = (a & 0x0FFFFFFF );\n\n  for(shift=28; shift<=63; shift+=7){\n    u64 c = *p++;\n    b += (c&0x7F) << shift;\n    if( (c & 0x80)==0 ) break;\n  }\n  *v = b;\n  return (int)(p - pStart);\n}\n\n/*\n** Read a 64-bit variable-length integer from memory starting at p[0].\n** Return the number of bytes read, or 0 on error.\n** The value is stored in *v.\n*/\nSQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *pBuf, sqlite_int64 *v){\n  return sqlite3Fts3GetVarintU(pBuf, (sqlite3_uint64*)v);\n}\n\n/*\n** Read a 64-bit variable-length integer from memory starting at p[0] and\n** not extending past pEnd[-1].\n** Return the number of bytes read, or 0 on error.\n** The value is stored in *v.\n*/\nSQLITE_PRIVATE int sqlite3Fts3GetVarintBounded(\n  const char *pBuf,\n  const char *pEnd,\n  sqlite_int64 *v\n){\n  const unsigned char *p = (const unsigned char*)pBuf;\n  const unsigned char *pStart = p;\n  const unsigned char *pX = (const unsigned char*)pEnd;\n  u64 b = 0;\n  int shift;\n  for(shift=0; shift<=63; shift+=7){\n    u64 c = p<pX ? *p : 0;\n    p++;\n    b += (c&0x7F) << shift;\n    if( (c & 0x80)==0 ) break;\n  }\n  *v = b;\n  return (int)(p - pStart);\n}\n\n/*\n** Similar to sqlite3Fts3GetVarint(), except that the output is truncated to\n** a non-negative 32-bit integer before it is returned.\n*/\nSQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *p, int *pi){\n  const unsigned char *ptr = (const unsigned char*)p;\n  u32 a;\n\n#ifndef fts3GetVarint32\n  GETVARINT_INIT(a, ptr, 0,  0x00,     0x80, *pi, 1);\n#else\n  a = (*ptr++);\n  assert( a & 0x80 );\n#endif\n\n  GETVARINT_STEP(a, ptr, 7,  0x7F,     0x4000, *pi, 2);\n  GETVARINT_STEP(a, ptr, 14, 0x3FFF,   0x200000, *pi, 3);\n  GETVARINT_STEP(a, ptr, 21, 0x1FFFFF, 0x10000000, *pi, 4);\n  a = (a & 0x0FFFFFFF );\n  *pi = (int)(a | ((u32)(*ptr & 0x07) << 28));\n  assert( 0==(a & 0x80000000) );\n  assert( *pi>=0 );\n  return 5;\n}\n\n/*\n** Return the number of bytes required to encode v as a varint\n*/\nSQLITE_PRIVATE int sqlite3Fts3VarintLen(sqlite3_uint64 v){\n  int i = 0;\n  do{\n    i++;\n    v >>= 7;\n  }while( v!=0 );\n  return i;\n}\n\n/*\n** Convert an SQL-style quoted string into a normal string by removing\n** the quote characters.  The conversion is done in-place.  If the\n** input does not begin with a quote character, then this routine\n** is a no-op.\n**\n** Examples:\n**\n**     \"abc\"   becomes   abc\n**     'xyz'   becomes   xyz\n**     [pqr]   becomes   pqr\n**     `mno`   becomes   mno\n**\n*/\nSQLITE_PRIVATE void sqlite3Fts3Dequote(char *z){\n  char quote;                     /* Quote character (if any ) */\n\n  quote = z[0];\n  if( quote=='[' || quote=='\\'' || quote=='\"' || quote=='`' ){\n    int iIn = 1;                  /* Index of next byte to read from input */\n    int iOut = 0;                 /* Index of next byte to write to output */\n\n    /* If the first byte was a '[', then the close-quote character is a ']' */\n    if( quote=='[' ) quote = ']';\n\n    while( z[iIn] ){\n      if( z[iIn]==quote ){\n        if( z[iIn+1]!=quote ) break;\n        z[iOut++] = quote;\n        iIn += 2;\n      }else{\n        z[iOut++] = z[iIn++];\n      }\n    }\n    z[iOut] = '\\0';\n  }\n}\n\n/*\n** Read a single varint from the doclist at *pp and advance *pp to point\n** to the first byte past the end of the varint.  Add the value of the varint\n** to *pVal.\n*/\nstatic void fts3GetDeltaVarint(char **pp, sqlite3_int64 *pVal){\n  sqlite3_int64 iVal;\n  *pp += sqlite3Fts3GetVarint(*pp, &iVal);\n  *pVal += iVal;\n}\n\n/*\n** When this function is called, *pp points to the first byte following a\n** varint that is part of a doclist (or position-list, or any other list\n** of varints). This function moves *pp to point to the start of that varint,\n** and sets *pVal by the varint value.\n**\n** Argument pStart points to the first byte of the doclist that the\n** varint is part of.\n*/\nstatic void fts3GetReverseVarint(\n  char **pp,\n  char *pStart,\n  sqlite3_int64 *pVal\n){\n  sqlite3_int64 iVal;\n  char *p;\n\n  /* Pointer p now points at the first byte past the varint we are\n  ** interested in. So, unless the doclist is corrupt, the 0x80 bit is\n  ** clear on character p[-1]. */\n  for(p = (*pp)-2; p>=pStart && *p&0x80; p--);\n  p++;\n  *pp = p;\n\n  sqlite3Fts3GetVarint(p, &iVal);\n  *pVal = iVal;\n}\n\n/*\n** The xDisconnect() virtual table method.\n*/\nstatic int fts3DisconnectMethod(sqlite3_vtab *pVtab){\n  Fts3Table *p = (Fts3Table *)pVtab;\n  int i;\n\n  assert( p->nPendingData==0 );\n  assert( p->pSegments==0 );\n\n  /* Free any prepared statements held */\n  sqlite3_finalize(p->pSeekStmt);\n  for(i=0; i<SizeofArray(p->aStmt); i++){\n    sqlite3_finalize(p->aStmt[i]);\n  }\n  sqlite3_free(p->zSegmentsTbl);\n  sqlite3_free(p->zReadExprlist);\n  sqlite3_free(p->zWriteExprlist);\n  sqlite3_free(p->zContentTbl);\n  sqlite3_free(p->zLanguageid);\n\n  /* Invoke the tokenizer destructor to free the tokenizer. */\n  p->pTokenizer->pModule->xDestroy(p->pTokenizer);\n\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n/*\n** Write an error message into *pzErr\n*/\nSQLITE_PRIVATE void sqlite3Fts3ErrMsg(char **pzErr, const char *zFormat, ...){\n  va_list ap;\n  sqlite3_free(*pzErr);\n  va_start(ap, zFormat);\n  *pzErr = sqlite3_vmprintf(zFormat, ap);\n  va_end(ap);\n}\n\n/*\n** Construct one or more SQL statements from the format string given\n** and then evaluate those statements. The success code is written\n** into *pRc.\n**\n** If *pRc is initially non-zero then this routine is a no-op.\n*/\nstatic void fts3DbExec(\n  int *pRc,              /* Success code */\n  sqlite3 *db,           /* Database in which to run SQL */\n  const char *zFormat,   /* Format string for SQL */\n  ...                    /* Arguments to the format string */\n){\n  va_list ap;\n  char *zSql;\n  if( *pRc ) return;\n  va_start(ap, zFormat);\n  zSql = sqlite3_vmprintf(zFormat, ap);\n  va_end(ap);\n  if( zSql==0 ){\n    *pRc = SQLITE_NOMEM;\n  }else{\n    *pRc = sqlite3_exec(db, zSql, 0, 0, 0);\n    sqlite3_free(zSql);\n  }\n}\n\n/*\n** The xDestroy() virtual table method.\n*/\nstatic int fts3DestroyMethod(sqlite3_vtab *pVtab){\n  Fts3Table *p = (Fts3Table *)pVtab;\n  int rc = SQLITE_OK;              /* Return code */\n  const char *zDb = p->zDb;        /* Name of database (e.g. \"main\", \"temp\") */\n  sqlite3 *db = p->db;             /* Database handle */\n\n  /* Drop the shadow tables */\n  fts3DbExec(&rc, db,\n    \"DROP TABLE IF EXISTS %Q.'%q_segments';\"\n    \"DROP TABLE IF EXISTS %Q.'%q_segdir';\"\n    \"DROP TABLE IF EXISTS %Q.'%q_docsize';\"\n    \"DROP TABLE IF EXISTS %Q.'%q_stat';\"\n    \"%s DROP TABLE IF EXISTS %Q.'%q_content';\",\n    zDb, p->zName,\n    zDb, p->zName,\n    zDb, p->zName,\n    zDb, p->zName,\n    (p->zContentTbl ? \"--\" : \"\"), zDb,p->zName\n  );\n\n  /* If everything has worked, invoke fts3DisconnectMethod() to free the\n  ** memory associated with the Fts3Table structure and return SQLITE_OK.\n  ** Otherwise, return an SQLite error code.\n  */\n  return (rc==SQLITE_OK ? fts3DisconnectMethod(pVtab) : rc);\n}\n\n\n/*\n** Invoke sqlite3_declare_vtab() to declare the schema for the FTS3 table\n** passed as the first argument. This is done as part of the xConnect()\n** and xCreate() methods.\n**\n** If *pRc is non-zero when this function is called, it is a no-op.\n** Otherwise, if an error occurs, an SQLite error code is stored in *pRc\n** before returning.\n*/\nstatic void fts3DeclareVtab(int *pRc, Fts3Table *p){\n  if( *pRc==SQLITE_OK ){\n    int i;                        /* Iterator variable */\n    int rc;                       /* Return code */\n    char *zSql;                   /* SQL statement passed to declare_vtab() */\n    char *zCols;                  /* List of user defined columns */\n    const char *zLanguageid;\n\n    zLanguageid = (p->zLanguageid ? p->zLanguageid : \"__langid\");\n    sqlite3_vtab_config(p->db, SQLITE_VTAB_CONSTRAINT_SUPPORT, 1);\n    sqlite3_vtab_config(p->db, SQLITE_VTAB_INNOCUOUS);\n\n    /* Create a list of user columns for the virtual table */\n    zCols = sqlite3_mprintf(\"%Q, \", p->azColumn[0]);\n    for(i=1; zCols && i<p->nColumn; i++){\n      zCols = sqlite3_mprintf(\"%z%Q, \", zCols, p->azColumn[i]);\n    }\n\n    /* Create the whole \"CREATE TABLE\" statement to pass to SQLite */\n    zSql = sqlite3_mprintf(\n        \"CREATE TABLE x(%s %Q HIDDEN, docid HIDDEN, %Q HIDDEN)\",\n        zCols, p->zName, zLanguageid\n    );\n    if( !zCols || !zSql ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_declare_vtab(p->db, zSql);\n    }\n\n    sqlite3_free(zSql);\n    sqlite3_free(zCols);\n    *pRc = rc;\n  }\n}\n\n/*\n** Create the %_stat table if it does not already exist.\n*/\nSQLITE_PRIVATE void sqlite3Fts3CreateStatTable(int *pRc, Fts3Table *p){\n  fts3DbExec(pRc, p->db,\n      \"CREATE TABLE IF NOT EXISTS %Q.'%q_stat'\"\n          \"(id INTEGER PRIMARY KEY, value BLOB);\",\n      p->zDb, p->zName\n  );\n  if( (*pRc)==SQLITE_OK ) p->bHasStat = 1;\n}\n\n/*\n** Create the backing store tables (%_content, %_segments and %_segdir)\n** required by the FTS3 table passed as the only argument. This is done\n** as part of the vtab xCreate() method.\n**\n** If the p->bHasDocsize boolean is true (indicating that this is an\n** FTS4 table, not an FTS3 table) then also create the %_docsize and\n** %_stat tables required by FTS4.\n*/\nstatic int fts3CreateTables(Fts3Table *p){\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* Iterator variable */\n  sqlite3 *db = p->db;            /* The database connection */\n\n  if( p->zContentTbl==0 ){\n    const char *zLanguageid = p->zLanguageid;\n    char *zContentCols;           /* Columns of %_content table */\n\n    /* Create a list of user columns for the content table */\n    zContentCols = sqlite3_mprintf(\"docid INTEGER PRIMARY KEY\");\n    for(i=0; zContentCols && i<p->nColumn; i++){\n      char *z = p->azColumn[i];\n      zContentCols = sqlite3_mprintf(\"%z, 'c%d%q'\", zContentCols, i, z);\n    }\n    if( zLanguageid && zContentCols ){\n      zContentCols = sqlite3_mprintf(\"%z, langid\", zContentCols, zLanguageid);\n    }\n    if( zContentCols==0 ) rc = SQLITE_NOMEM;\n\n    /* Create the content table */\n    fts3DbExec(&rc, db,\n       \"CREATE TABLE %Q.'%q_content'(%s)\",\n       p->zDb, p->zName, zContentCols\n    );\n    sqlite3_free(zContentCols);\n  }\n\n  /* Create other tables */\n  fts3DbExec(&rc, db,\n      \"CREATE TABLE %Q.'%q_segments'(blockid INTEGER PRIMARY KEY, block BLOB);\",\n      p->zDb, p->zName\n  );\n  fts3DbExec(&rc, db,\n      \"CREATE TABLE %Q.'%q_segdir'(\"\n        \"level INTEGER,\"\n        \"idx INTEGER,\"\n        \"start_block INTEGER,\"\n        \"leaves_end_block INTEGER,\"\n        \"end_block INTEGER,\"\n        \"root BLOB,\"\n        \"PRIMARY KEY(level, idx)\"\n      \");\",\n      p->zDb, p->zName\n  );\n  if( p->bHasDocsize ){\n    fts3DbExec(&rc, db,\n        \"CREATE TABLE %Q.'%q_docsize'(docid INTEGER PRIMARY KEY, size BLOB);\",\n        p->zDb, p->zName\n    );\n  }\n  assert( p->bHasStat==p->bFts4 );\n  if( p->bHasStat ){\n    sqlite3Fts3CreateStatTable(&rc, p);\n  }\n  return rc;\n}\n\n/*\n** Store the current database page-size in bytes in p->nPgsz.\n**\n** If *pRc is non-zero when this function is called, it is a no-op.\n** Otherwise, if an error occurs, an SQLite error code is stored in *pRc\n** before returning.\n*/\nstatic void fts3DatabasePageSize(int *pRc, Fts3Table *p){\n  if( *pRc==SQLITE_OK ){\n    int rc;                       /* Return code */\n    char *zSql;                   /* SQL text \"PRAGMA %Q.page_size\" */\n    sqlite3_stmt *pStmt;          /* Compiled \"PRAGMA %Q.page_size\" statement */\n\n    zSql = sqlite3_mprintf(\"PRAGMA %Q.page_size\", p->zDb);\n    if( !zSql ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);\n      if( rc==SQLITE_OK ){\n        sqlite3_step(pStmt);\n        p->nPgsz = sqlite3_column_int(pStmt, 0);\n        rc = sqlite3_finalize(pStmt);\n      }else if( rc==SQLITE_AUTH ){\n        p->nPgsz = 1024;\n        rc = SQLITE_OK;\n      }\n    }\n    assert( p->nPgsz>0 || rc!=SQLITE_OK );\n    sqlite3_free(zSql);\n    *pRc = rc;\n  }\n}\n\n/*\n** \"Special\" FTS4 arguments are column specifications of the following form:\n**\n**   <key> = <value>\n**\n** There may not be whitespace surrounding the \"=\" character. The <value>\n** term may be quoted, but the <key> may not.\n*/\nstatic int fts3IsSpecialColumn(\n  const char *z,\n  int *pnKey,\n  char **pzValue\n){\n  char *zValue;\n  const char *zCsr = z;\n\n  while( *zCsr!='=' ){\n    if( *zCsr=='\\0' ) return 0;\n    zCsr++;\n  }\n\n  *pnKey = (int)(zCsr-z);\n  zValue = sqlite3_mprintf(\"%s\", &zCsr[1]);\n  if( zValue ){\n    sqlite3Fts3Dequote(zValue);\n  }\n  *pzValue = zValue;\n  return 1;\n}\n\n/*\n** Append the output of a printf() style formatting to an existing string.\n*/\nstatic void fts3Appendf(\n  int *pRc,                       /* IN/OUT: Error code */\n  char **pz,                      /* IN/OUT: Pointer to string buffer */\n  const char *zFormat,            /* Printf format string to append */\n  ...                             /* Arguments for printf format string */\n){\n  if( *pRc==SQLITE_OK ){\n    va_list ap;\n    char *z;\n    va_start(ap, zFormat);\n    z = sqlite3_vmprintf(zFormat, ap);\n    va_end(ap);\n    if( z && *pz ){\n      char *z2 = sqlite3_mprintf(\"%s%s\", *pz, z);\n      sqlite3_free(z);\n      z = z2;\n    }\n    if( z==0 ) *pRc = SQLITE_NOMEM;\n    sqlite3_free(*pz);\n    *pz = z;\n  }\n}\n\n/*\n** Return a copy of input string zInput enclosed in double-quotes (\") and\n** with all double quote characters escaped. For example:\n**\n**     fts3QuoteId(\"un \\\"zip\\\"\")   ->    \"un \\\"\\\"zip\\\"\\\"\"\n**\n** The pointer returned points to memory obtained from sqlite3_malloc(). It\n** is the callers responsibility to call sqlite3_free() to release this\n** memory.\n*/\nstatic char *fts3QuoteId(char const *zInput){\n  sqlite3_int64 nRet;\n  char *zRet;\n  nRet = 2 + (int)strlen(zInput)*2 + 1;\n  zRet = sqlite3_malloc64(nRet);\n  if( zRet ){\n    int i;\n    char *z = zRet;\n    *(z++) = '\"';\n    for(i=0; zInput[i]; i++){\n      if( zInput[i]=='\"' ) *(z++) = '\"';\n      *(z++) = zInput[i];\n    }\n    *(z++) = '\"';\n    *(z++) = '\\0';\n  }\n  return zRet;\n}\n\n/*\n** Return a list of comma separated SQL expressions and a FROM clause that\n** could be used in a SELECT statement such as the following:\n**\n**     SELECT <list of expressions> FROM %_content AS x ...\n**\n** to return the docid, followed by each column of text data in order\n** from left to write. If parameter zFunc is not NULL, then instead of\n** being returned directly each column of text data is passed to an SQL\n** function named zFunc first. For example, if zFunc is \"unzip\" and the\n** table has the three user-defined columns \"a\", \"b\", and \"c\", the following\n** string is returned:\n**\n**     \"docid, unzip(x.'a'), unzip(x.'b'), unzip(x.'c') FROM %_content AS x\"\n**\n** The pointer returned points to a buffer allocated by sqlite3_malloc(). It\n** is the responsibility of the caller to eventually free it.\n**\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and\n** a NULL pointer is returned). Otherwise, if an OOM error is encountered\n** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If\n** no error occurs, *pRc is left unmodified.\n*/\nstatic char *fts3ReadExprList(Fts3Table *p, const char *zFunc, int *pRc){\n  char *zRet = 0;\n  char *zFree = 0;\n  char *zFunction;\n  int i;\n\n  if( p->zContentTbl==0 ){\n    if( !zFunc ){\n      zFunction = \"\";\n    }else{\n      zFree = zFunction = fts3QuoteId(zFunc);\n    }\n    fts3Appendf(pRc, &zRet, \"docid\");\n    for(i=0; i<p->nColumn; i++){\n      fts3Appendf(pRc, &zRet, \",%s(x.'c%d%q')\", zFunction, i, p->azColumn[i]);\n    }\n    if( p->zLanguageid ){\n      fts3Appendf(pRc, &zRet, \", x.%Q\", \"langid\");\n    }\n    sqlite3_free(zFree);\n  }else{\n    fts3Appendf(pRc, &zRet, \"rowid\");\n    for(i=0; i<p->nColumn; i++){\n      fts3Appendf(pRc, &zRet, \", x.'%q'\", p->azColumn[i]);\n    }\n    if( p->zLanguageid ){\n      fts3Appendf(pRc, &zRet, \", x.%Q\", p->zLanguageid);\n    }\n  }\n  fts3Appendf(pRc, &zRet, \" FROM '%q'.'%q%s' AS x\",\n      p->zDb,\n      (p->zContentTbl ? p->zContentTbl : p->zName),\n      (p->zContentTbl ? \"\" : \"_content\")\n  );\n  return zRet;\n}\n\n/*\n** Return a list of N comma separated question marks, where N is the number\n** of columns in the %_content table (one for the docid plus one for each\n** user-defined text column).\n**\n** If argument zFunc is not NULL, then all but the first question mark\n** is preceded by zFunc and an open bracket, and followed by a closed\n** bracket. For example, if zFunc is \"zip\" and the FTS3 table has three\n** user-defined text columns, the following string is returned:\n**\n**     \"?, zip(?), zip(?), zip(?)\"\n**\n** The pointer returned points to a buffer allocated by sqlite3_malloc(). It\n** is the responsibility of the caller to eventually free it.\n**\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and\n** a NULL pointer is returned). Otherwise, if an OOM error is encountered\n** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If\n** no error occurs, *pRc is left unmodified.\n*/\nstatic char *fts3WriteExprList(Fts3Table *p, const char *zFunc, int *pRc){\n  char *zRet = 0;\n  char *zFree = 0;\n  char *zFunction;\n  int i;\n\n  if( !zFunc ){\n    zFunction = \"\";\n  }else{\n    zFree = zFunction = fts3QuoteId(zFunc);\n  }\n  fts3Appendf(pRc, &zRet, \"?\");\n  for(i=0; i<p->nColumn; i++){\n    fts3Appendf(pRc, &zRet, \",%s(?)\", zFunction);\n  }\n  if( p->zLanguageid ){\n    fts3Appendf(pRc, &zRet, \", ?\");\n  }\n  sqlite3_free(zFree);\n  return zRet;\n}\n\n/*\n** Buffer z contains a positive integer value encoded as utf-8 text.\n** Decode this value and store it in *pnOut, returning the number of bytes\n** consumed. If an overflow error occurs return a negative value.\n*/\nSQLITE_PRIVATE int sqlite3Fts3ReadInt(const char *z, int *pnOut){\n  u64 iVal = 0;\n  int i;\n  for(i=0; z[i]>='0' && z[i]<='9'; i++){\n    iVal = iVal*10 + (z[i] - '0');\n    if( iVal>0x7FFFFFFF ) return -1;\n  }\n  *pnOut = (int)iVal;\n  return i;\n}\n\n/*\n** This function interprets the string at (*pp) as a non-negative integer\n** value. It reads the integer and sets *pnOut to the value read, then\n** sets *pp to point to the byte immediately following the last byte of\n** the integer value.\n**\n** Only decimal digits ('0'..'9') may be part of an integer value.\n**\n** If *pp does not being with a decimal digit SQLITE_ERROR is returned and\n** the output value undefined. Otherwise SQLITE_OK is returned.\n**\n** This function is used when parsing the \"prefix=\" FTS4 parameter.\n*/\nstatic int fts3GobbleInt(const char **pp, int *pnOut){\n  const int MAX_NPREFIX = 10000000;\n  int nInt = 0;                   /* Output value */\n  int nByte;\n  nByte = sqlite3Fts3ReadInt(*pp, &nInt);\n  if( nInt>MAX_NPREFIX ){\n    nInt = 0;\n  }\n  if( nByte==0 ){\n    return SQLITE_ERROR;\n  }\n  *pnOut = nInt;\n  *pp += nByte;\n  return SQLITE_OK;\n}\n\n/*\n** This function is called to allocate an array of Fts3Index structures\n** representing the indexes maintained by the current FTS table. FTS tables\n** always maintain the main \"terms\" index, but may also maintain one or\n** more \"prefix\" indexes, depending on the value of the \"prefix=\" parameter\n** (if any) specified as part of the CREATE VIRTUAL TABLE statement.\n**\n** Argument zParam is passed the value of the \"prefix=\" option if one was\n** specified, or NULL otherwise.\n**\n** If no error occurs, SQLITE_OK is returned and *apIndex set to point to\n** the allocated array. *pnIndex is set to the number of elements in the\n** array. If an error does occur, an SQLite error code is returned.\n**\n** Regardless of whether or not an error is returned, it is the responsibility\n** of the caller to call sqlite3_free() on the output array to free it.\n*/\nstatic int fts3PrefixParameter(\n  const char *zParam,             /* ABC in prefix=ABC parameter to parse */\n  int *pnIndex,                   /* OUT: size of *apIndex[] array */\n  struct Fts3Index **apIndex      /* OUT: Array of indexes for this table */\n){\n  struct Fts3Index *aIndex;       /* Allocated array */\n  int nIndex = 1;                 /* Number of entries in array */\n\n  if( zParam && zParam[0] ){\n    const char *p;\n    nIndex++;\n    for(p=zParam; *p; p++){\n      if( *p==',' ) nIndex++;\n    }\n  }\n\n  aIndex = sqlite3_malloc64(sizeof(struct Fts3Index) * nIndex);\n  *apIndex = aIndex;\n  if( !aIndex ){\n    return SQLITE_NOMEM;\n  }\n\n  memset(aIndex, 0, sizeof(struct Fts3Index) * nIndex);\n  if( zParam ){\n    const char *p = zParam;\n    int i;\n    for(i=1; i<nIndex; i++){\n      int nPrefix = 0;\n      if( fts3GobbleInt(&p, &nPrefix) ) return SQLITE_ERROR;\n      assert( nPrefix>=0 );\n      if( nPrefix==0 ){\n        nIndex--;\n        i--;\n      }else{\n        aIndex[i].nPrefix = nPrefix;\n      }\n      p++;\n    }\n  }\n\n  *pnIndex = nIndex;\n  return SQLITE_OK;\n}\n\n/*\n** This function is called when initializing an FTS4 table that uses the\n** content=xxx option. It determines the number of and names of the columns\n** of the new FTS4 table.\n**\n** The third argument passed to this function is the value passed to the\n** config=xxx option (i.e. \"xxx\"). This function queries the database for\n** a table of that name. If found, the output variables are populated\n** as follows:\n**\n**   *pnCol:   Set to the number of columns table xxx has,\n**\n**   *pnStr:   Set to the total amount of space required to store a copy\n**             of each columns name, including the nul-terminator.\n**\n**   *pazCol:  Set to point to an array of *pnCol strings. Each string is\n**             the name of the corresponding column in table xxx. The array\n**             and its contents are allocated using a single allocation. It\n**             is the responsibility of the caller to free this allocation\n**             by eventually passing the *pazCol value to sqlite3_free().\n**\n** If the table cannot be found, an error code is returned and the output\n** variables are undefined. Or, if an OOM is encountered, SQLITE_NOMEM is\n** returned (and the output variables are undefined).\n*/\nstatic int fts3ContentColumns(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of db (i.e. \"main\", \"temp\" etc.) */\n  const char *zTbl,               /* Name of content table */\n  const char ***pazCol,           /* OUT: Malloc'd array of column names */\n  int *pnCol,                     /* OUT: Size of array *pazCol */\n  int *pnStr,                     /* OUT: Bytes of string content */\n  char **pzErr                    /* OUT: error message */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  char *zSql;                     /* \"SELECT *\" statement on zTbl */\n  sqlite3_stmt *pStmt = 0;        /* Compiled version of zSql */\n\n  zSql = sqlite3_mprintf(\"SELECT * FROM %Q.%Q\", zDb, zTbl);\n  if( !zSql ){\n    rc = SQLITE_NOMEM;\n  }else{\n    rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);\n    if( rc!=SQLITE_OK ){\n      sqlite3Fts3ErrMsg(pzErr, \"%s\", sqlite3_errmsg(db));\n    }\n  }\n  sqlite3_free(zSql);\n\n  if( rc==SQLITE_OK ){\n    const char **azCol;           /* Output array */\n    sqlite3_int64 nStr = 0;       /* Size of all column names (incl. 0x00) */\n    int nCol;                     /* Number of table columns */\n    int i;                        /* Used to iterate through columns */\n\n    /* Loop through the returned columns. Set nStr to the number of bytes of\n    ** space required to store a copy of each column name, including the\n    ** nul-terminator byte.  */\n    nCol = sqlite3_column_count(pStmt);\n    for(i=0; i<nCol; i++){\n      const char *zCol = sqlite3_column_name(pStmt, i);\n      nStr += strlen(zCol) + 1;\n    }\n\n    /* Allocate and populate the array to return. */\n    azCol = (const char **)sqlite3_malloc64(sizeof(char *) * nCol + nStr);\n    if( azCol==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      char *p = (char *)&azCol[nCol];\n      for(i=0; i<nCol; i++){\n        const char *zCol = sqlite3_column_name(pStmt, i);\n        int n = (int)strlen(zCol)+1;\n        memcpy(p, zCol, n);\n        azCol[i] = p;\n        p += n;\n      }\n    }\n    sqlite3_finalize(pStmt);\n\n    /* Set the output variables. */\n    *pnCol = nCol;\n    *pnStr = nStr;\n    *pazCol = azCol;\n  }\n\n  return rc;\n}\n\n/*\n** This function is the implementation of both the xConnect and xCreate\n** methods of the FTS3 virtual table.\n**\n** The argv[] array contains the following:\n**\n**   argv[0]   -> module name  (\"fts3\" or \"fts4\")\n**   argv[1]   -> database name\n**   argv[2]   -> table name\n**   argv[...] -> \"column name\" and other module argument fields.\n*/\nstatic int fts3InitVtab(\n  int isCreate,                   /* True for xCreate, false for xConnect */\n  sqlite3 *db,                    /* The SQLite database connection */\n  void *pAux,                     /* Hash table containing tokenizers */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVTab,          /* Write the resulting vtab structure here */\n  char **pzErr                    /* Write any error message here */\n){\n  Fts3Hash *pHash = &((Fts3HashWrapper*)pAux)->hash;\n  Fts3Table *p = 0;               /* Pointer to allocated vtab */\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* Iterator variable */\n  sqlite3_int64 nByte;            /* Size of allocation used for *p */\n  int iCol;                       /* Column index */\n  int nString = 0;                /* Bytes required to hold all column names */\n  int nCol = 0;                   /* Number of columns in the FTS table */\n  char *zCsr;                     /* Space for holding column names */\n  int nDb;                        /* Bytes required to hold database name */\n  int nName;                      /* Bytes required to hold table name */\n  int isFts4 = (argv[0][3]=='4'); /* True for FTS4, false for FTS3 */\n  const char **aCol;              /* Array of column names */\n  sqlite3_tokenizer *pTokenizer = 0;        /* Tokenizer for this table */\n\n  int nIndex = 0;                 /* Size of aIndex[] array */\n  struct Fts3Index *aIndex = 0;   /* Array of indexes for this table */\n\n  /* The results of parsing supported FTS4 key=value options: */\n  int bNoDocsize = 0;             /* True to omit %_docsize table */\n  int bDescIdx = 0;               /* True to store descending indexes */\n  char *zPrefix = 0;              /* Prefix parameter value (or NULL) */\n  char *zCompress = 0;            /* compress=? parameter (or NULL) */\n  char *zUncompress = 0;          /* uncompress=? parameter (or NULL) */\n  char *zContent = 0;             /* content=? parameter (or NULL) */\n  char *zLanguageid = 0;          /* languageid=? parameter (or NULL) */\n  char **azNotindexed = 0;        /* The set of notindexed= columns */\n  int nNotindexed = 0;            /* Size of azNotindexed[] array */\n\n  assert( strlen(argv[0])==4 );\n  assert( (sqlite3_strnicmp(argv[0], \"fts4\", 4)==0 && isFts4)\n       || (sqlite3_strnicmp(argv[0], \"fts3\", 4)==0 && !isFts4)\n  );\n\n  nDb = (int)strlen(argv[1]) + 1;\n  nName = (int)strlen(argv[2]) + 1;\n\n  nByte = sizeof(const char *) * (argc-2);\n  aCol = (const char **)sqlite3_malloc64(nByte);\n  if( aCol ){\n    memset((void*)aCol, 0, nByte);\n    azNotindexed = (char **)sqlite3_malloc64(nByte);\n  }\n  if( azNotindexed ){\n    memset(azNotindexed, 0, nByte);\n  }\n  if( !aCol || !azNotindexed ){\n    rc = SQLITE_NOMEM;\n    goto fts3_init_out;\n  }\n\n  /* Loop through all of the arguments passed by the user to the FTS3/4\n  ** module (i.e. all the column names and special arguments). This loop\n  ** does the following:\n  **\n  **   + Figures out the number of columns the FTSX table will have, and\n  **     the number of bytes of space that must be allocated to store copies\n  **     of the column names.\n  **\n  **   + If there is a tokenizer specification included in the arguments,\n  **     initializes the tokenizer pTokenizer.\n  */\n  for(i=3; rc==SQLITE_OK && i<argc; i++){\n    char const *z = argv[i];\n    int nKey;\n    char *zVal;\n\n    /* Check if this is a tokenizer specification */\n    if( !pTokenizer\n     && strlen(z)>8\n     && 0==sqlite3_strnicmp(z, \"tokenize\", 8)\n     && 0==sqlite3Fts3IsIdChar(z[8])\n    ){\n      rc = sqlite3Fts3InitTokenizer(pHash, &z[9], &pTokenizer, pzErr);\n    }\n\n    /* Check if it is an FTS4 special argument. */\n    else if( isFts4 && fts3IsSpecialColumn(z, &nKey, &zVal) ){\n      struct Fts4Option {\n        const char *zOpt;\n        int nOpt;\n      } aFts4Opt[] = {\n        { \"matchinfo\",   9 },     /* 0 -> MATCHINFO */\n        { \"prefix\",      6 },     /* 1 -> PREFIX */\n        { \"compress\",    8 },     /* 2 -> COMPRESS */\n        { \"uncompress\", 10 },     /* 3 -> UNCOMPRESS */\n        { \"order\",       5 },     /* 4 -> ORDER */\n        { \"content\",     7 },     /* 5 -> CONTENT */\n        { \"languageid\", 10 },     /* 6 -> LANGUAGEID */\n        { \"notindexed\", 10 }      /* 7 -> NOTINDEXED */\n      };\n\n      int iOpt;\n      if( !zVal ){\n        rc = SQLITE_NOMEM;\n      }else{\n        for(iOpt=0; iOpt<SizeofArray(aFts4Opt); iOpt++){\n          struct Fts4Option *pOp = &aFts4Opt[iOpt];\n          if( nKey==pOp->nOpt && !sqlite3_strnicmp(z, pOp->zOpt, pOp->nOpt) ){\n            break;\n          }\n        }\n        switch( iOpt ){\n          case 0:               /* MATCHINFO */\n            if( strlen(zVal)!=4 || sqlite3_strnicmp(zVal, \"fts3\", 4) ){\n              sqlite3Fts3ErrMsg(pzErr, \"unrecognized matchinfo: %s\", zVal);\n              rc = SQLITE_ERROR;\n            }\n            bNoDocsize = 1;\n            break;\n\n          case 1:               /* PREFIX */\n            sqlite3_free(zPrefix);\n            zPrefix = zVal;\n            zVal = 0;\n            break;\n\n          case 2:               /* COMPRESS */\n            sqlite3_free(zCompress);\n            zCompress = zVal;\n            zVal = 0;\n            break;\n\n          case 3:               /* UNCOMPRESS */\n            sqlite3_free(zUncompress);\n            zUncompress = zVal;\n            zVal = 0;\n            break;\n\n          case 4:               /* ORDER */\n            if( (strlen(zVal)!=3 || sqlite3_strnicmp(zVal, \"asc\", 3))\n             && (strlen(zVal)!=4 || sqlite3_strnicmp(zVal, \"desc\", 4))\n            ){\n              sqlite3Fts3ErrMsg(pzErr, \"unrecognized order: %s\", zVal);\n              rc = SQLITE_ERROR;\n            }\n            bDescIdx = (zVal[0]=='d' || zVal[0]=='D');\n            break;\n\n          case 5:              /* CONTENT */\n            sqlite3_free(zContent);\n            zContent = zVal;\n            zVal = 0;\n            break;\n\n          case 6:              /* LANGUAGEID */\n            assert( iOpt==6 );\n            sqlite3_free(zLanguageid);\n            zLanguageid = zVal;\n            zVal = 0;\n            break;\n\n          case 7:              /* NOTINDEXED */\n            azNotindexed[nNotindexed++] = zVal;\n            zVal = 0;\n            break;\n\n          default:\n            assert( iOpt==SizeofArray(aFts4Opt) );\n            sqlite3Fts3ErrMsg(pzErr, \"unrecognized parameter: %s\", z);\n            rc = SQLITE_ERROR;\n            break;\n        }\n        sqlite3_free(zVal);\n      }\n    }\n\n    /* Otherwise, the argument is a column name. */\n    else {\n      nString += (int)(strlen(z) + 1);\n      aCol[nCol++] = z;\n    }\n  }\n\n  /* If a content=xxx option was specified, the following:\n  **\n  **   1. Ignore any compress= and uncompress= options.\n  **\n  **   2. If no column names were specified as part of the CREATE VIRTUAL\n  **      TABLE statement, use all columns from the content table.\n  */\n  if( rc==SQLITE_OK && zContent ){\n    sqlite3_free(zCompress);\n    sqlite3_free(zUncompress);\n    zCompress = 0;\n    zUncompress = 0;\n    if( nCol==0 ){\n      sqlite3_free((void*)aCol);\n      aCol = 0;\n      rc = fts3ContentColumns(db, argv[1], zContent,&aCol,&nCol,&nString,pzErr);\n\n      /* If a languageid= option was specified, remove the language id\n      ** column from the aCol[] array. */\n      if( rc==SQLITE_OK && zLanguageid ){\n        int j;\n        for(j=0; j<nCol; j++){\n          if( sqlite3_stricmp(zLanguageid, aCol[j])==0 ){\n            int k;\n            for(k=j; k<nCol; k++) aCol[k] = aCol[k+1];\n            nCol--;\n            break;\n          }\n        }\n      }\n    }\n  }\n  if( rc!=SQLITE_OK ) goto fts3_init_out;\n\n  if( nCol==0 ){\n    assert( nString==0 );\n    aCol[0] = \"content\";\n    nString = 8;\n    nCol = 1;\n  }\n\n  if( pTokenizer==0 ){\n    rc = sqlite3Fts3InitTokenizer(pHash, \"simple\", &pTokenizer, pzErr);\n    if( rc!=SQLITE_OK ) goto fts3_init_out;\n  }\n  assert( pTokenizer );\n\n  rc = fts3PrefixParameter(zPrefix, &nIndex, &aIndex);\n  if( rc==SQLITE_ERROR ){\n    assert( zPrefix );\n    sqlite3Fts3ErrMsg(pzErr, \"error parsing prefix parameter: %s\", zPrefix);\n  }\n  if( rc!=SQLITE_OK ) goto fts3_init_out;\n\n  /* Allocate and populate the Fts3Table structure. */\n  nByte = sizeof(Fts3Table) +                  /* Fts3Table */\n          nCol * sizeof(char *) +              /* azColumn */\n          nIndex * sizeof(struct Fts3Index) +  /* aIndex */\n          nCol * sizeof(u8) +                  /* abNotindexed */\n          nName +                              /* zName */\n          nDb +                                /* zDb */\n          nString;                             /* Space for azColumn strings */\n  p = (Fts3Table*)sqlite3_malloc64(nByte);\n  if( p==0 ){\n    rc = SQLITE_NOMEM;\n    goto fts3_init_out;\n  }\n  memset(p, 0, nByte);\n  p->db = db;\n  p->nColumn = nCol;\n  p->nPendingData = 0;\n  p->azColumn = (char **)&p[1];\n  p->pTokenizer = pTokenizer;\n  p->nMaxPendingData = FTS3_MAX_PENDING_DATA;\n  p->bHasDocsize = (isFts4 && bNoDocsize==0);\n  p->bHasStat = (u8)isFts4;\n  p->bFts4 = (u8)isFts4;\n  p->bDescIdx = (u8)bDescIdx;\n  p->nAutoincrmerge = 0xff;   /* 0xff means setting unknown */\n  p->zContentTbl = zContent;\n  p->zLanguageid = zLanguageid;\n  zContent = 0;\n  zLanguageid = 0;\n  TESTONLY( p->inTransaction = -1 );\n  TESTONLY( p->mxSavepoint = -1 );\n\n  p->aIndex = (struct Fts3Index *)&p->azColumn[nCol];\n  memcpy(p->aIndex, aIndex, sizeof(struct Fts3Index) * nIndex);\n  p->nIndex = nIndex;\n  for(i=0; i<nIndex; i++){\n    fts3HashInit(&p->aIndex[i].hPending, FTS3_HASH_STRING, 1);\n  }\n  p->abNotindexed = (u8 *)&p->aIndex[nIndex];\n\n  /* Fill in the zName and zDb fields of the vtab structure. */\n  zCsr = (char *)&p->abNotindexed[nCol];\n  p->zName = zCsr;\n  memcpy(zCsr, argv[2], nName);\n  zCsr += nName;\n  p->zDb = zCsr;\n  memcpy(zCsr, argv[1], nDb);\n  zCsr += nDb;\n\n  /* Fill in the azColumn array */\n  for(iCol=0; iCol<nCol; iCol++){\n    char *z;\n    int n = 0;\n    z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);\n    if( n>0 ){\n      memcpy(zCsr, z, n);\n    }\n    zCsr[n] = '\\0';\n    sqlite3Fts3Dequote(zCsr);\n    p->azColumn[iCol] = zCsr;\n    zCsr += n+1;\n    assert( zCsr <= &((char *)p)[nByte] );\n  }\n\n  /* Fill in the abNotindexed array */\n  for(iCol=0; iCol<nCol; iCol++){\n    int n = (int)strlen(p->azColumn[iCol]);\n    for(i=0; i<nNotindexed; i++){\n      char *zNot = azNotindexed[i];\n      if( zNot && n==(int)strlen(zNot)\n       && 0==sqlite3_strnicmp(p->azColumn[iCol], zNot, n)\n      ){\n        p->abNotindexed[iCol] = 1;\n        sqlite3_free(zNot);\n        azNotindexed[i] = 0;\n      }\n    }\n  }\n  for(i=0; i<nNotindexed; i++){\n    if( azNotindexed[i] ){\n      sqlite3Fts3ErrMsg(pzErr, \"no such column: %s\", azNotindexed[i]);\n      rc = SQLITE_ERROR;\n    }\n  }\n\n  if( rc==SQLITE_OK && (zCompress==0)!=(zUncompress==0) ){\n    char const *zMiss = (zCompress==0 ? \"compress\" : \"uncompress\");\n    rc = SQLITE_ERROR;\n    sqlite3Fts3ErrMsg(pzErr, \"missing %s parameter in fts4 constructor\", zMiss);\n  }\n  p->zReadExprlist = fts3ReadExprList(p, zUncompress, &rc);\n  p->zWriteExprlist = fts3WriteExprList(p, zCompress, &rc);\n  if( rc!=SQLITE_OK ) goto fts3_init_out;\n\n  /* If this is an xCreate call, create the underlying tables in the\n  ** database. TODO: For xConnect(), it could verify that said tables exist.\n  */\n  if( isCreate ){\n    rc = fts3CreateTables(p);\n  }\n\n  /* Check to see if a legacy fts3 table has been \"upgraded\" by the\n  ** addition of a %_stat table so that it can use incremental merge.\n  */\n  if( !isFts4 && !isCreate ){\n    p->bHasStat = 2;\n  }\n\n  /* Figure out the page-size for the database. This is required in order to\n  ** estimate the cost of loading large doclists from the database.  */\n  fts3DatabasePageSize(&rc, p);\n  p->nNodeSize = p->nPgsz-35;\n\n#if defined(SQLITE_DEBUG)||defined(SQLITE_TEST)\n  p->nMergeCount = FTS3_MERGE_COUNT;\n#endif\n\n  /* Declare the table schema to SQLite. */\n  fts3DeclareVtab(&rc, p);\n\nfts3_init_out:\n  sqlite3_free(zPrefix);\n  sqlite3_free(aIndex);\n  sqlite3_free(zCompress);\n  sqlite3_free(zUncompress);\n  sqlite3_free(zContent);\n  sqlite3_free(zLanguageid);\n  for(i=0; i<nNotindexed; i++) sqlite3_free(azNotindexed[i]);\n  sqlite3_free((void *)aCol);\n  sqlite3_free((void *)azNotindexed);\n  if( rc!=SQLITE_OK ){\n    if( p ){\n      fts3DisconnectMethod((sqlite3_vtab *)p);\n    }else if( pTokenizer ){\n      pTokenizer->pModule->xDestroy(pTokenizer);\n    }\n  }else{\n    assert( p->pSegments==0 );\n    *ppVTab = &p->base;\n  }\n  return rc;\n}\n\n/*\n** The xConnect() and xCreate() methods for the virtual table. All the\n** work is done in function fts3InitVtab().\n*/\nstatic int fts3ConnectMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts3InitVtab(0, db, pAux, argc, argv, ppVtab, pzErr);\n}\nstatic int fts3CreateMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts3InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr);\n}\n\n/*\n** Set the pIdxInfo->estimatedRows variable to nRow. Unless this\n** extension is currently being used by a version of SQLite too old to\n** support estimatedRows. In that case this function is a no-op.\n*/\nstatic void fts3SetEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){\n#if SQLITE_VERSION_NUMBER>=3008002\n  if( sqlite3_libversion_number()>=3008002 ){\n    pIdxInfo->estimatedRows = nRow;\n  }\n#endif\n}\n\n/*\n** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this\n** extension is currently being used by a version of SQLite too old to\n** support index-info flags. In that case this function is a no-op.\n*/\nstatic void fts3SetUniqueFlag(sqlite3_index_info *pIdxInfo){\n#if SQLITE_VERSION_NUMBER>=3008012\n  if( sqlite3_libversion_number()>=3008012 ){\n    pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;\n  }\n#endif\n}\n\n/*\n** Implementation of the xBestIndex method for FTS3 tables. There\n** are three possible strategies, in order of preference:\n**\n**   1. Direct lookup by rowid or docid.\n**   2. Full-text search using a MATCH operator on a non-docid column.\n**   3. Linear scan of %_content table.\n*/\nstatic int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){\n  Fts3Table *p = (Fts3Table *)pVTab;\n  int i;                          /* Iterator variable */\n  int iCons = -1;                 /* Index of constraint to use */\n\n  int iLangidCons = -1;           /* Index of langid=x constraint, if present */\n  int iDocidGe = -1;              /* Index of docid>=x constraint, if present */\n  int iDocidLe = -1;              /* Index of docid<=x constraint, if present */\n  int iIdx;\n\n  if( p->bLock ){\n    return SQLITE_ERROR;\n  }\n\n  /* By default use a full table scan. This is an expensive option,\n  ** so search through the constraints to see if a more efficient\n  ** strategy is possible.\n  */\n  pInfo->idxNum = FTS3_FULLSCAN_SEARCH;\n  pInfo->estimatedCost = 5000000;\n  for(i=0; i<pInfo->nConstraint; i++){\n    int bDocid;                 /* True if this constraint is on docid */\n    struct sqlite3_index_constraint *pCons = &pInfo->aConstraint[i];\n    if( pCons->usable==0 ){\n      if( pCons->op==SQLITE_INDEX_CONSTRAINT_MATCH ){\n        /* There exists an unusable MATCH constraint. This means that if\n        ** the planner does elect to use the results of this call as part\n        ** of the overall query plan the user will see an \"unable to use\n        ** function MATCH in the requested context\" error. To discourage\n        ** this, return a very high cost here.  */\n        pInfo->idxNum = FTS3_FULLSCAN_SEARCH;\n        pInfo->estimatedCost = 1e50;\n        fts3SetEstimatedRows(pInfo, ((sqlite3_int64)1) << 50);\n        return SQLITE_OK;\n      }\n      continue;\n    }\n\n    bDocid = (pCons->iColumn<0 || pCons->iColumn==p->nColumn+1);\n\n    /* A direct lookup on the rowid or docid column. Assign a cost of 1.0. */\n    if( iCons<0 && pCons->op==SQLITE_INDEX_CONSTRAINT_EQ && bDocid ){\n      pInfo->idxNum = FTS3_DOCID_SEARCH;\n      pInfo->estimatedCost = 1.0;\n      iCons = i;\n    }\n\n    /* A MATCH constraint. Use a full-text search.\n    **\n    ** If there is more than one MATCH constraint available, use the first\n    ** one encountered. If there is both a MATCH constraint and a direct\n    ** rowid/docid lookup, prefer the MATCH strategy. This is done even\n    ** though the rowid/docid lookup is faster than a MATCH query, selecting\n    ** it would lead to an \"unable to use function MATCH in the requested\n    ** context\" error.\n    */\n    if( pCons->op==SQLITE_INDEX_CONSTRAINT_MATCH\n     && pCons->iColumn>=0 && pCons->iColumn<=p->nColumn\n    ){\n      pInfo->idxNum = FTS3_FULLTEXT_SEARCH + pCons->iColumn;\n      pInfo->estimatedCost = 2.0;\n      iCons = i;\n    }\n\n    /* Equality constraint on the langid column */\n    if( pCons->op==SQLITE_INDEX_CONSTRAINT_EQ\n     && pCons->iColumn==p->nColumn + 2\n    ){\n      iLangidCons = i;\n    }\n\n    if( bDocid ){\n      switch( pCons->op ){\n        case SQLITE_INDEX_CONSTRAINT_GE:\n        case SQLITE_INDEX_CONSTRAINT_GT:\n          iDocidGe = i;\n          break;\n\n        case SQLITE_INDEX_CONSTRAINT_LE:\n        case SQLITE_INDEX_CONSTRAINT_LT:\n          iDocidLe = i;\n          break;\n      }\n    }\n  }\n\n  /* If using a docid=? or rowid=? strategy, set the UNIQUE flag. */\n  if( pInfo->idxNum==FTS3_DOCID_SEARCH ) fts3SetUniqueFlag(pInfo);\n\n  iIdx = 1;\n  if( iCons>=0 ){\n    pInfo->aConstraintUsage[iCons].argvIndex = iIdx++;\n    pInfo->aConstraintUsage[iCons].omit = 1;\n  }\n  if( iLangidCons>=0 ){\n    pInfo->idxNum |= FTS3_HAVE_LANGID;\n    pInfo->aConstraintUsage[iLangidCons].argvIndex = iIdx++;\n  }\n  if( iDocidGe>=0 ){\n    pInfo->idxNum |= FTS3_HAVE_DOCID_GE;\n    pInfo->aConstraintUsage[iDocidGe].argvIndex = iIdx++;\n  }\n  if( iDocidLe>=0 ){\n    pInfo->idxNum |= FTS3_HAVE_DOCID_LE;\n    pInfo->aConstraintUsage[iDocidLe].argvIndex = iIdx++;\n  }\n\n  /* Regardless of the strategy selected, FTS can deliver rows in rowid (or\n  ** docid) order. Both ascending and descending are possible.\n  */\n  if( pInfo->nOrderBy==1 ){\n    struct sqlite3_index_orderby *pOrder = &pInfo->aOrderBy[0];\n    if( pOrder->iColumn<0 || pOrder->iColumn==p->nColumn+1 ){\n      if( pOrder->desc ){\n        pInfo->idxStr = \"DESC\";\n      }else{\n        pInfo->idxStr = \"ASC\";\n      }\n      pInfo->orderByConsumed = 1;\n    }\n  }\n\n  assert( p->pSegments==0 );\n  return SQLITE_OK;\n}\n\n/*\n** Implementation of xOpen method.\n*/\nstatic int fts3OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){\n  sqlite3_vtab_cursor *pCsr;               /* Allocated cursor */\n\n  UNUSED_PARAMETER(pVTab);\n\n  /* Allocate a buffer large enough for an Fts3Cursor structure. If the\n  ** allocation succeeds, zero it and return SQLITE_OK. Otherwise,\n  ** if the allocation fails, return SQLITE_NOMEM.\n  */\n  *ppCsr = pCsr = (sqlite3_vtab_cursor *)sqlite3_malloc(sizeof(Fts3Cursor));\n  if( !pCsr ){\n    return SQLITE_NOMEM;\n  }\n  memset(pCsr, 0, sizeof(Fts3Cursor));\n  return SQLITE_OK;\n}\n\n/*\n** Finalize the statement handle at pCsr->pStmt.\n**\n** Or, if that statement handle is one created by fts3CursorSeekStmt(),\n** and the Fts3Table.pSeekStmt slot is currently NULL, save the statement\n** pointer there instead of finalizing it.\n*/\nstatic void fts3CursorFinalizeStmt(Fts3Cursor *pCsr){\n  if( pCsr->bSeekStmt ){\n    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;\n    if( p->pSeekStmt==0 ){\n      p->pSeekStmt = pCsr->pStmt;\n      sqlite3_reset(pCsr->pStmt);\n      pCsr->pStmt = 0;\n    }\n    pCsr->bSeekStmt = 0;\n  }\n  sqlite3_finalize(pCsr->pStmt);\n}\n\n/*\n** Free all resources currently held by the cursor passed as the only\n** argument.\n*/\nstatic void fts3ClearCursor(Fts3Cursor *pCsr){\n  fts3CursorFinalizeStmt(pCsr);\n  sqlite3Fts3FreeDeferredTokens(pCsr);\n  sqlite3_free(pCsr->aDoclist);\n  sqlite3Fts3MIBufferFree(pCsr->pMIBuffer);\n  sqlite3Fts3ExprFree(pCsr->pExpr);\n  memset(&(&pCsr->base)[1], 0, sizeof(Fts3Cursor)-sizeof(sqlite3_vtab_cursor));\n}\n\n/*\n** Close the cursor.  For additional information see the documentation\n** on the xClose method of the virtual table interface.\n*/\nstatic int fts3CloseMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;\n  assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );\n  fts3ClearCursor(pCsr);\n  assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** If pCsr->pStmt has not been prepared (i.e. if pCsr->pStmt==0), then\n** compose and prepare an SQL statement of the form:\n**\n**    \"SELECT <columns> FROM %_content WHERE rowid = ?\"\n**\n** (or the equivalent for a content=xxx table) and set pCsr->pStmt to\n** it. If an error occurs, return an SQLite error code.\n*/\nstatic int fts3CursorSeekStmt(Fts3Cursor *pCsr){\n  int rc = SQLITE_OK;\n  if( pCsr->pStmt==0 ){\n    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;\n    char *zSql;\n    if( p->pSeekStmt ){\n      pCsr->pStmt = p->pSeekStmt;\n      p->pSeekStmt = 0;\n    }else{\n      zSql = sqlite3_mprintf(\"SELECT %s WHERE rowid = ?\", p->zReadExprlist);\n      if( !zSql ) return SQLITE_NOMEM;\n      p->bLock++;\n      rc = sqlite3_prepare_v3(\n          p->db, zSql,-1,SQLITE_PREPARE_PERSISTENT,&pCsr->pStmt,0\n      );\n      p->bLock--;\n      sqlite3_free(zSql);\n    }\n    if( rc==SQLITE_OK ) pCsr->bSeekStmt = 1;\n  }\n  return rc;\n}\n\n/*\n** Position the pCsr->pStmt statement so that it is on the row\n** of the %_content table that contains the last match.  Return\n** SQLITE_OK on success.\n*/\nstatic int fts3CursorSeek(sqlite3_context *pContext, Fts3Cursor *pCsr){\n  int rc = SQLITE_OK;\n  if( pCsr->isRequireSeek ){\n    rc = fts3CursorSeekStmt(pCsr);\n    if( rc==SQLITE_OK ){\n      Fts3Table *pTab = (Fts3Table*)pCsr->base.pVtab;\n      pTab->bLock++;\n      sqlite3_bind_int64(pCsr->pStmt, 1, pCsr->iPrevId);\n      pCsr->isRequireSeek = 0;\n      if( SQLITE_ROW==sqlite3_step(pCsr->pStmt) ){\n        pTab->bLock--;\n        return SQLITE_OK;\n      }else{\n        pTab->bLock--;\n        rc = sqlite3_reset(pCsr->pStmt);\n        if( rc==SQLITE_OK && ((Fts3Table *)pCsr->base.pVtab)->zContentTbl==0 ){\n          /* If no row was found and no error has occurred, then the %_content\n          ** table is missing a row that is present in the full-text index.\n          ** The data structures are corrupt.  */\n          rc = FTS_CORRUPT_VTAB;\n          pCsr->isEof = 1;\n        }\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK && pContext ){\n    sqlite3_result_error_code(pContext, rc);\n  }\n  return rc;\n}\n\n/*\n** This function is used to process a single interior node when searching\n** a b-tree for a term or term prefix. The node data is passed to this\n** function via the zNode/nNode parameters. The term to search for is\n** passed in zTerm/nTerm.\n**\n** If piFirst is not NULL, then this function sets *piFirst to the blockid\n** of the child node that heads the sub-tree that may contain the term.\n**\n** If piLast is not NULL, then *piLast is set to the right-most child node\n** that heads a sub-tree that may contain a term for which zTerm/nTerm is\n** a prefix.\n**\n** If an OOM error occurs, SQLITE_NOMEM is returned. Otherwise, SQLITE_OK.\n*/\nstatic int fts3ScanInteriorNode(\n  const char *zTerm,              /* Term to select leaves for */\n  int nTerm,                      /* Size of term zTerm in bytes */\n  const char *zNode,              /* Buffer containing segment interior node */\n  int nNode,                      /* Size of buffer at zNode */\n  sqlite3_int64 *piFirst,         /* OUT: Selected child node */\n  sqlite3_int64 *piLast           /* OUT: Selected child node */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  const char *zCsr = zNode;       /* Cursor to iterate through node */\n  const char *zEnd = &zCsr[nNode];/* End of interior node buffer */\n  char *zBuffer = 0;              /* Buffer to load terms into */\n  i64 nAlloc = 0;                 /* Size of allocated buffer */\n  int isFirstTerm = 1;            /* True when processing first term on page */\n  u64 iChild;                     /* Block id of child node to descend to */\n  int nBuffer = 0;                /* Total term size */\n\n  /* Skip over the 'height' varint that occurs at the start of every\n  ** interior node. Then load the blockid of the left-child of the b-tree\n  ** node into variable iChild.\n  **\n  ** Even if the data structure on disk is corrupted, this (reading two\n  ** varints from the buffer) does not risk an overread. If zNode is a\n  ** root node, then the buffer comes from a SELECT statement. SQLite does\n  ** not make this guarantee explicitly, but in practice there are always\n  ** either more than 20 bytes of allocated space following the nNode bytes of\n  ** contents, or two zero bytes. Or, if the node is read from the %_segments\n  ** table, then there are always 20 bytes of zeroed padding following the\n  ** nNode bytes of content (see sqlite3Fts3ReadBlock() for details).\n  */\n  zCsr += sqlite3Fts3GetVarintU(zCsr, &iChild);\n  zCsr += sqlite3Fts3GetVarintU(zCsr, &iChild);\n  if( zCsr>zEnd ){\n    return FTS_CORRUPT_VTAB;\n  }\n\n  while( zCsr<zEnd && (piFirst || piLast) ){\n    int cmp;                      /* memcmp() result */\n    int nSuffix;                  /* Size of term suffix */\n    int nPrefix = 0;              /* Size of term prefix */\n\n    /* Load the next term on the node into zBuffer. Use realloc() to expand\n    ** the size of zBuffer if required.  */\n    if( !isFirstTerm ){\n      zCsr += fts3GetVarint32(zCsr, &nPrefix);\n      if( nPrefix>nBuffer ){\n        rc = FTS_CORRUPT_VTAB;\n        goto finish_scan;\n      }\n    }\n    isFirstTerm = 0;\n    zCsr += fts3GetVarint32(zCsr, &nSuffix);\n\n    assert( nPrefix>=0 && nSuffix>=0 );\n    if( nPrefix>zCsr-zNode || nSuffix>zEnd-zCsr || nSuffix==0 ){\n      rc = FTS_CORRUPT_VTAB;\n      goto finish_scan;\n    }\n    if( (i64)nPrefix+nSuffix>nAlloc ){\n      char *zNew;\n      nAlloc = ((i64)nPrefix+nSuffix) * 2;\n      zNew = (char *)sqlite3_realloc64(zBuffer, nAlloc);\n      if( !zNew ){\n        rc = SQLITE_NOMEM;\n        goto finish_scan;\n      }\n      zBuffer = zNew;\n    }\n    assert( zBuffer );\n    memcpy(&zBuffer[nPrefix], zCsr, nSuffix);\n    nBuffer = nPrefix + nSuffix;\n    zCsr += nSuffix;\n\n    /* Compare the term we are searching for with the term just loaded from\n    ** the interior node. If the specified term is greater than or equal\n    ** to the term from the interior node, then all terms on the sub-tree\n    ** headed by node iChild are smaller than zTerm. No need to search\n    ** iChild.\n    **\n    ** If the interior node term is larger than the specified term, then\n    ** the tree headed by iChild may contain the specified term.\n    */\n    cmp = memcmp(zTerm, zBuffer, (nBuffer>nTerm ? nTerm : nBuffer));\n    if( piFirst && (cmp<0 || (cmp==0 && nBuffer>nTerm)) ){\n      *piFirst = (i64)iChild;\n      piFirst = 0;\n    }\n\n    if( piLast && cmp<0 ){\n      *piLast = (i64)iChild;\n      piLast = 0;\n    }\n\n    iChild++;\n  };\n\n  if( piFirst ) *piFirst = (i64)iChild;\n  if( piLast ) *piLast = (i64)iChild;\n\n finish_scan:\n  sqlite3_free(zBuffer);\n  return rc;\n}\n\n\n/*\n** The buffer pointed to by argument zNode (size nNode bytes) contains an\n** interior node of a b-tree segment. The zTerm buffer (size nTerm bytes)\n** contains a term. This function searches the sub-tree headed by the zNode\n** node for the range of leaf nodes that may contain the specified term\n** or terms for which the specified term is a prefix.\n**\n** If piLeaf is not NULL, then *piLeaf is set to the blockid of the\n** left-most leaf node in the tree that may contain the specified term.\n** If piLeaf2 is not NULL, then *piLeaf2 is set to the blockid of the\n** right-most leaf node that may contain a term for which the specified\n** term is a prefix.\n**\n** It is possible that the range of returned leaf nodes does not contain\n** the specified term or any terms for which it is a prefix. However, if the\n** segment does contain any such terms, they are stored within the identified\n** range. Because this function only inspects interior segment nodes (and\n** never loads leaf nodes into memory), it is not possible to be sure.\n**\n** If an error occurs, an error code other than SQLITE_OK is returned.\n*/\nstatic int fts3SelectLeaf(\n  Fts3Table *p,                   /* Virtual table handle */\n  const char *zTerm,              /* Term to select leaves for */\n  int nTerm,                      /* Size of term zTerm in bytes */\n  const char *zNode,              /* Buffer containing segment interior node */\n  int nNode,                      /* Size of buffer at zNode */\n  sqlite3_int64 *piLeaf,          /* Selected leaf node */\n  sqlite3_int64 *piLeaf2          /* Selected leaf node */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  int iHeight;                    /* Height of this node in tree */\n\n  assert( piLeaf || piLeaf2 );\n\n  fts3GetVarint32(zNode, &iHeight);\n  rc = fts3ScanInteriorNode(zTerm, nTerm, zNode, nNode, piLeaf, piLeaf2);\n  assert_fts3_nc( !piLeaf2 || !piLeaf || rc!=SQLITE_OK || (*piLeaf<=*piLeaf2) );\n\n  if( rc==SQLITE_OK && iHeight>1 ){\n    char *zBlob = 0;              /* Blob read from %_segments table */\n    int nBlob = 0;                /* Size of zBlob in bytes */\n\n    if( piLeaf && piLeaf2 && (*piLeaf!=*piLeaf2) ){\n      rc = sqlite3Fts3ReadBlock(p, *piLeaf, &zBlob, &nBlob, 0);\n      if( rc==SQLITE_OK ){\n        rc = fts3SelectLeaf(p, zTerm, nTerm, zBlob, nBlob, piLeaf, 0);\n      }\n      sqlite3_free(zBlob);\n      piLeaf = 0;\n      zBlob = 0;\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts3ReadBlock(p, piLeaf?*piLeaf:*piLeaf2, &zBlob, &nBlob, 0);\n    }\n    if( rc==SQLITE_OK ){\n      int iNewHeight = 0;\n      fts3GetVarint32(zBlob, &iNewHeight);\n      if( iNewHeight>=iHeight ){\n        rc = FTS_CORRUPT_VTAB;\n      }else{\n        rc = fts3SelectLeaf(p, zTerm, nTerm, zBlob, nBlob, piLeaf, piLeaf2);\n      }\n    }\n    sqlite3_free(zBlob);\n  }\n\n  return rc;\n}\n\n/*\n** This function is used to create delta-encoded serialized lists of FTS3\n** varints. Each call to this function appends a single varint to a list.\n*/\nstatic void fts3PutDeltaVarint(\n  char **pp,                      /* IN/OUT: Output pointer */\n  sqlite3_int64 *piPrev,          /* IN/OUT: Previous value written to list */\n  sqlite3_int64 iVal              /* Write this value to the list */\n){\n  assert_fts3_nc( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );\n  *pp += sqlite3Fts3PutVarint(*pp, iVal-*piPrev);\n  *piPrev = iVal;\n}\n\n/*\n** When this function is called, *ppPoslist is assumed to point to the\n** start of a position-list. After it returns, *ppPoslist points to the\n** first byte after the position-list.\n**\n** A position list is list of positions (delta encoded) and columns for\n** a single document record of a doclist.  So, in other words, this\n** routine advances *ppPoslist so that it points to the next docid in\n** the doclist, or to the first byte past the end of the doclist.\n**\n** If pp is not NULL, then the contents of the position list are copied\n** to *pp. *pp is set to point to the first byte past the last byte copied\n** before this function returns.\n*/\nstatic void fts3PoslistCopy(char **pp, char **ppPoslist){\n  char *pEnd = *ppPoslist;\n  char c = 0;\n\n  /* The end of a position list is marked by a zero encoded as an FTS3\n  ** varint. A single POS_END (0) byte. Except, if the 0 byte is preceded by\n  ** a byte with the 0x80 bit set, then it is not a varint 0, but the tail\n  ** of some other, multi-byte, value.\n  **\n  ** The following while-loop moves pEnd to point to the first byte that is not\n  ** immediately preceded by a byte with the 0x80 bit set. Then increments\n  ** pEnd once more so that it points to the byte immediately following the\n  ** last byte in the position-list.\n  */\n  while( *pEnd | c ){\n    c = *pEnd++ & 0x80;\n    testcase( c!=0 && (*pEnd)==0 );\n  }\n  pEnd++;  /* Advance past the POS_END terminator byte */\n\n  if( pp ){\n    int n = (int)(pEnd - *ppPoslist);\n    char *p = *pp;\n    memcpy(p, *ppPoslist, n);\n    p += n;\n    *pp = p;\n  }\n  *ppPoslist = pEnd;\n}\n\n/*\n** When this function is called, *ppPoslist is assumed to point to the\n** start of a column-list. After it returns, *ppPoslist points to the\n** to the terminator (POS_COLUMN or POS_END) byte of the column-list.\n**\n** A column-list is list of delta-encoded positions for a single column\n** within a single document within a doclist.\n**\n** The column-list is terminated either by a POS_COLUMN varint (1) or\n** a POS_END varint (0).  This routine leaves *ppPoslist pointing to\n** the POS_COLUMN or POS_END that terminates the column-list.\n**\n** If pp is not NULL, then the contents of the column-list are copied\n** to *pp. *pp is set to point to the first byte past the last byte copied\n** before this function returns.  The POS_COLUMN or POS_END terminator\n** is not copied into *pp.\n*/\nstatic void fts3ColumnlistCopy(char **pp, char **ppPoslist){\n  char *pEnd = *ppPoslist;\n  char c = 0;\n\n  /* A column-list is terminated by either a 0x01 or 0x00 byte that is\n  ** not part of a multi-byte varint.\n  */\n  while( 0xFE & (*pEnd | c) ){\n    c = *pEnd++ & 0x80;\n    testcase( c!=0 && ((*pEnd)&0xfe)==0 );\n  }\n  if( pp ){\n    int n = (int)(pEnd - *ppPoslist);\n    char *p = *pp;\n    memcpy(p, *ppPoslist, n);\n    p += n;\n    *pp = p;\n  }\n  *ppPoslist = pEnd;\n}\n\n/*\n** Value used to signify the end of an position-list. This must be\n** as large or larger than any value that might appear on the\n** position-list, even a position list that has been corrupted.\n*/\n#define POSITION_LIST_END LARGEST_INT64\n\n/*\n** This function is used to help parse position-lists. When this function is\n** called, *pp may point to the start of the next varint in the position-list\n** being parsed, or it may point to 1 byte past the end of the position-list\n** (in which case **pp will be a terminator bytes POS_END (0) or\n** (1)).\n**\n** If *pp points past the end of the current position-list, set *pi to\n** POSITION_LIST_END and return. Otherwise, read the next varint from *pp,\n** increment the current value of *pi by the value read, and set *pp to\n** point to the next value before returning.\n**\n** Before calling this routine *pi must be initialized to the value of\n** the previous position, or zero if we are reading the first position\n** in the position-list.  Because positions are delta-encoded, the value\n** of the previous position is needed in order to compute the value of\n** the next position.\n*/\nstatic void fts3ReadNextPos(\n  char **pp,                    /* IN/OUT: Pointer into position-list buffer */\n  sqlite3_int64 *pi             /* IN/OUT: Value read from position-list */\n){\n  if( (**pp)&0xFE ){\n    int iVal;\n    *pp += fts3GetVarint32((*pp), &iVal);\n    *pi += iVal;\n    *pi -= 2;\n  }else{\n    *pi = POSITION_LIST_END;\n  }\n}\n\n/*\n** If parameter iCol is not 0, write an POS_COLUMN (1) byte followed by\n** the value of iCol encoded as a varint to *pp.   This will start a new\n** column list.\n**\n** Set *pp to point to the byte just after the last byte written before\n** returning (do not modify it if iCol==0). Return the total number of bytes\n** written (0 if iCol==0).\n*/\nstatic int fts3PutColNumber(char **pp, int iCol){\n  int n = 0;                      /* Number of bytes written */\n  if( iCol ){\n    char *p = *pp;                /* Output pointer */\n    n = 1 + sqlite3Fts3PutVarint(&p[1], iCol);\n    *p = 0x01;\n    *pp = &p[n];\n  }\n  return n;\n}\n\n/*\n** Compute the union of two position lists.  The output written\n** into *pp contains all positions of both *pp1 and *pp2 in sorted\n** order and with any duplicates removed.  All pointers are\n** updated appropriately.   The caller is responsible for insuring\n** that there is enough space in *pp to hold the complete output.\n*/\nstatic int fts3PoslistMerge(\n  char **pp,                      /* Output buffer */\n  char **pp1,                     /* Left input list */\n  char **pp2                      /* Right input list */\n){\n  char *p = *pp;\n  char *p1 = *pp1;\n  char *p2 = *pp2;\n\n  while( *p1 || *p2 ){\n    int iCol1;         /* The current column index in pp1 */\n    int iCol2;         /* The current column index in pp2 */\n\n    if( *p1==POS_COLUMN ){\n      fts3GetVarint32(&p1[1], &iCol1);\n      if( iCol1==0 ) return FTS_CORRUPT_VTAB;\n    }\n    else if( *p1==POS_END ) iCol1 = 0x7fffffff;\n    else iCol1 = 0;\n\n    if( *p2==POS_COLUMN ){\n      fts3GetVarint32(&p2[1], &iCol2);\n      if( iCol2==0 ) return FTS_CORRUPT_VTAB;\n    }\n    else if( *p2==POS_END ) iCol2 = 0x7fffffff;\n    else iCol2 = 0;\n\n    if( iCol1==iCol2 ){\n      sqlite3_int64 i1 = 0;       /* Last position from pp1 */\n      sqlite3_int64 i2 = 0;       /* Last position from pp2 */\n      sqlite3_int64 iPrev = 0;\n      int n = fts3PutColNumber(&p, iCol1);\n      p1 += n;\n      p2 += n;\n\n      /* At this point, both p1 and p2 point to the start of column-lists\n      ** for the same column (the column with index iCol1 and iCol2).\n      ** A column-list is a list of non-negative delta-encoded varints, each\n      ** incremented by 2 before being stored. Each list is terminated by a\n      ** POS_END (0) or POS_COLUMN (1). The following block merges the two lists\n      ** and writes the results to buffer p. p is left pointing to the byte\n      ** after the list written. No terminator (POS_END or POS_COLUMN) is\n      ** written to the output.\n      */\n      fts3GetDeltaVarint(&p1, &i1);\n      fts3GetDeltaVarint(&p2, &i2);\n      if( i1<2 || i2<2 ){\n        break;\n      }\n      do {\n        fts3PutDeltaVarint(&p, &iPrev, (i1<i2) ? i1 : i2);\n        iPrev -= 2;\n        if( i1==i2 ){\n          fts3ReadNextPos(&p1, &i1);\n          fts3ReadNextPos(&p2, &i2);\n        }else if( i1<i2 ){\n          fts3ReadNextPos(&p1, &i1);\n        }else{\n          fts3ReadNextPos(&p2, &i2);\n        }\n      }while( i1!=POSITION_LIST_END || i2!=POSITION_LIST_END );\n    }else if( iCol1<iCol2 ){\n      p1 += fts3PutColNumber(&p, iCol1);\n      fts3ColumnlistCopy(&p, &p1);\n    }else{\n      p2 += fts3PutColNumber(&p, iCol2);\n      fts3ColumnlistCopy(&p, &p2);\n    }\n  }\n\n  *p++ = POS_END;\n  *pp = p;\n  *pp1 = p1 + 1;\n  *pp2 = p2 + 1;\n  return SQLITE_OK;\n}\n\n/*\n** This function is used to merge two position lists into one. When it is\n** called, *pp1 and *pp2 must both point to position lists. A position-list is\n** the part of a doclist that follows each document id. For example, if a row\n** contains:\n**\n**     'a b c'|'x y z'|'a b b a'\n**\n** Then the position list for this row for token 'b' would consist of:\n**\n**     0x02 0x01 0x02 0x03 0x03 0x00\n**\n** When this function returns, both *pp1 and *pp2 are left pointing to the\n** byte following the 0x00 terminator of their respective position lists.\n**\n** If isSaveLeft is 0, an entry is added to the output position list for\n** each position in *pp2 for which there exists one or more positions in\n** *pp1 so that (pos(*pp2)>pos(*pp1) && pos(*pp2)-pos(*pp1)<=nToken). i.e.\n** when the *pp1 token appears before the *pp2 token, but not more than nToken\n** slots before it.\n**\n** e.g. nToken==1 searches for adjacent positions.\n*/\nstatic int fts3PoslistPhraseMerge(\n  char **pp,                      /* IN/OUT: Preallocated output buffer */\n  int nToken,                     /* Maximum difference in token positions */\n  int isSaveLeft,                 /* Save the left position */\n  int isExact,                    /* If *pp1 is exactly nTokens before *pp2 */\n  char **pp1,                     /* IN/OUT: Left input list */\n  char **pp2                      /* IN/OUT: Right input list */\n){\n  char *p = *pp;\n  char *p1 = *pp1;\n  char *p2 = *pp2;\n  int iCol1 = 0;\n  int iCol2 = 0;\n\n  /* Never set both isSaveLeft and isExact for the same invocation. */\n  assert( isSaveLeft==0 || isExact==0 );\n\n  assert_fts3_nc( p!=0 && *p1!=0 && *p2!=0 );\n  if( *p1==POS_COLUMN ){\n    p1++;\n    p1 += fts3GetVarint32(p1, &iCol1);\n    /* iCol1==0 indicates corruption. Column 0 does not have a POS_COLUMN\n    ** entry, so this is actually end-of-doclist. */\n    if( iCol1==0 ) return 0;\n  }\n  if( *p2==POS_COLUMN ){\n    p2++;\n    p2 += fts3GetVarint32(p2, &iCol2);\n    /* As above, iCol2==0 indicates corruption. */\n    if( iCol2==0 ) return 0;\n  }\n\n  while( 1 ){\n    if( iCol1==iCol2 ){\n      char *pSave = p;\n      sqlite3_int64 iPrev = 0;\n      sqlite3_int64 iPos1 = 0;\n      sqlite3_int64 iPos2 = 0;\n\n      if( iCol1 ){\n        *p++ = POS_COLUMN;\n        p += sqlite3Fts3PutVarint(p, iCol1);\n      }\n\n      fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;\n      fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;\n      if( iPos1<0 || iPos2<0 ) break;\n\n      while( 1 ){\n        if( iPos2==iPos1+nToken\n         || (isExact==0 && iPos2>iPos1 && iPos2<=iPos1+nToken)\n        ){\n          sqlite3_int64 iSave;\n          iSave = isSaveLeft ? iPos1 : iPos2;\n          fts3PutDeltaVarint(&p, &iPrev, iSave+2); iPrev -= 2;\n          pSave = 0;\n          assert( p );\n        }\n        if( (!isSaveLeft && iPos2<=(iPos1+nToken)) || iPos2<=iPos1 ){\n          if( (*p2&0xFE)==0 ) break;\n          fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;\n        }else{\n          if( (*p1&0xFE)==0 ) break;\n          fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;\n        }\n      }\n\n      if( pSave ){\n        assert( pp && p );\n        p = pSave;\n      }\n\n      fts3ColumnlistCopy(0, &p1);\n      fts3ColumnlistCopy(0, &p2);\n      assert( (*p1&0xFE)==0 && (*p2&0xFE)==0 );\n      if( 0==*p1 || 0==*p2 ) break;\n\n      p1++;\n      p1 += fts3GetVarint32(p1, &iCol1);\n      p2++;\n      p2 += fts3GetVarint32(p2, &iCol2);\n    }\n\n    /* Advance pointer p1 or p2 (whichever corresponds to the smaller of\n    ** iCol1 and iCol2) so that it points to either the 0x00 that marks the\n    ** end of the position list, or the 0x01 that precedes the next\n    ** column-number in the position list.\n    */\n    else if( iCol1<iCol2 ){\n      fts3ColumnlistCopy(0, &p1);\n      if( 0==*p1 ) break;\n      p1++;\n      p1 += fts3GetVarint32(p1, &iCol1);\n    }else{\n      fts3ColumnlistCopy(0, &p2);\n      if( 0==*p2 ) break;\n      p2++;\n      p2 += fts3GetVarint32(p2, &iCol2);\n    }\n  }\n\n  fts3PoslistCopy(0, &p2);\n  fts3PoslistCopy(0, &p1);\n  *pp1 = p1;\n  *pp2 = p2;\n  if( *pp==p ){\n    return 0;\n  }\n  *p++ = 0x00;\n  *pp = p;\n  return 1;\n}\n\n/*\n** Merge two position-lists as required by the NEAR operator. The argument\n** position lists correspond to the left and right phrases of an expression\n** like:\n**\n**     \"phrase 1\" NEAR \"phrase number 2\"\n**\n** Position list *pp1 corresponds to the left-hand side of the NEAR\n** expression and *pp2 to the right. As usual, the indexes in the position\n** lists are the offsets of the last token in each phrase (tokens \"1\" and \"2\"\n** in the example above).\n**\n** The output position list - written to *pp - is a copy of *pp2 with those\n** entries that are not sufficiently NEAR entries in *pp1 removed.\n*/\nstatic int fts3PoslistNearMerge(\n  char **pp,                      /* Output buffer */\n  char *aTmp,                     /* Temporary buffer space */\n  int nRight,                     /* Maximum difference in token positions */\n  int nLeft,                      /* Maximum difference in token positions */\n  char **pp1,                     /* IN/OUT: Left input list */\n  char **pp2                      /* IN/OUT: Right input list */\n){\n  char *p1 = *pp1;\n  char *p2 = *pp2;\n\n  char *pTmp1 = aTmp;\n  char *pTmp2;\n  char *aTmp2;\n  int res = 1;\n\n  fts3PoslistPhraseMerge(&pTmp1, nRight, 0, 0, pp1, pp2);\n  aTmp2 = pTmp2 = pTmp1;\n  *pp1 = p1;\n  *pp2 = p2;\n  fts3PoslistPhraseMerge(&pTmp2, nLeft, 1, 0, pp2, pp1);\n  if( pTmp1!=aTmp && pTmp2!=aTmp2 ){\n    fts3PoslistMerge(pp, &aTmp, &aTmp2);\n  }else if( pTmp1!=aTmp ){\n    fts3PoslistCopy(pp, &aTmp);\n  }else if( pTmp2!=aTmp2 ){\n    fts3PoslistCopy(pp, &aTmp2);\n  }else{\n    res = 0;\n  }\n\n  return res;\n}\n\n/*\n** An instance of this function is used to merge together the (potentially\n** large number of) doclists for each term that matches a prefix query.\n** See function fts3TermSelectMerge() for details.\n*/\ntypedef struct TermSelect TermSelect;\nstruct TermSelect {\n  char *aaOutput[16];             /* Malloc'd output buffers */\n  int anOutput[16];               /* Size each output buffer in bytes */\n};\n\n/*\n** This function is used to read a single varint from a buffer. Parameter\n** pEnd points 1 byte past the end of the buffer. When this function is\n** called, if *pp points to pEnd or greater, then the end of the buffer\n** has been reached. In this case *pp is set to 0 and the function returns.\n**\n** If *pp does not point to or past pEnd, then a single varint is read\n** from *pp. *pp is then set to point 1 byte past the end of the read varint.\n**\n** If bDescIdx is false, the value read is added to *pVal before returning.\n** If it is true, the value read is subtracted from *pVal before this\n** function returns.\n*/\nstatic void fts3GetDeltaVarint3(\n  char **pp,                      /* IN/OUT: Point to read varint from */\n  char *pEnd,                     /* End of buffer */\n  int bDescIdx,                   /* True if docids are descending */\n  sqlite3_int64 *pVal             /* IN/OUT: Integer value */\n){\n  if( *pp>=pEnd ){\n    *pp = 0;\n  }else{\n    u64 iVal;\n    *pp += sqlite3Fts3GetVarintU(*pp, &iVal);\n    if( bDescIdx ){\n      *pVal = (i64)((u64)*pVal - iVal);\n    }else{\n      *pVal = (i64)((u64)*pVal + iVal);\n    }\n  }\n}\n\n/*\n** This function is used to write a single varint to a buffer. The varint\n** is written to *pp. Before returning, *pp is set to point 1 byte past the\n** end of the value written.\n**\n** If *pbFirst is zero when this function is called, the value written to\n** the buffer is that of parameter iVal.\n**\n** If *pbFirst is non-zero when this function is called, then the value\n** written is either (iVal-*piPrev) (if bDescIdx is zero) or (*piPrev-iVal)\n** (if bDescIdx is non-zero).\n**\n** Before returning, this function always sets *pbFirst to 1 and *piPrev\n** to the value of parameter iVal.\n*/\nstatic void fts3PutDeltaVarint3(\n  char **pp,                      /* IN/OUT: Output pointer */\n  int bDescIdx,                   /* True for descending docids */\n  sqlite3_int64 *piPrev,          /* IN/OUT: Previous value written to list */\n  int *pbFirst,                   /* IN/OUT: True after first int written */\n  sqlite3_int64 iVal              /* Write this value to the list */\n){\n  sqlite3_uint64 iWrite;\n  if( bDescIdx==0 || *pbFirst==0 ){\n    assert_fts3_nc( *pbFirst==0 || iVal>=*piPrev );\n    iWrite = (u64)iVal - (u64)*piPrev;\n  }else{\n    assert_fts3_nc( *piPrev>=iVal );\n    iWrite = (u64)*piPrev - (u64)iVal;\n  }\n  assert( *pbFirst || *piPrev==0 );\n  assert_fts3_nc( *pbFirst==0 || iWrite>0 );\n  *pp += sqlite3Fts3PutVarint(*pp, iWrite);\n  *piPrev = iVal;\n  *pbFirst = 1;\n}\n\n\n/*\n** This macro is used by various functions that merge doclists. The two\n** arguments are 64-bit docid values. If the value of the stack variable\n** bDescDoclist is 0 when this macro is invoked, then it returns (i1-i2).\n** Otherwise, (i2-i1).\n**\n** Using this makes it easier to write code that can merge doclists that are\n** sorted in either ascending or descending order.\n*/\n/* #define DOCID_CMP(i1, i2) ((bDescDoclist?-1:1) * (i64)((u64)i1-i2)) */\n#define DOCID_CMP(i1, i2) ((bDescDoclist?-1:1) * (i1>i2?1:((i1==i2)?0:-1)))\n\n/*\n** This function does an \"OR\" merge of two doclists (output contains all\n** positions contained in either argument doclist). If the docids in the\n** input doclists are sorted in ascending order, parameter bDescDoclist\n** should be false. If they are sorted in ascending order, it should be\n** passed a non-zero value.\n**\n** If no error occurs, *paOut is set to point at an sqlite3_malloc'd buffer\n** containing the output doclist and SQLITE_OK is returned. In this case\n** *pnOut is set to the number of bytes in the output doclist.\n**\n** If an error occurs, an SQLite error code is returned. The output values\n** are undefined in this case.\n*/\nstatic int fts3DoclistOrMerge(\n  int bDescDoclist,               /* True if arguments are desc */\n  char *a1, int n1,               /* First doclist */\n  char *a2, int n2,               /* Second doclist */\n  char **paOut, int *pnOut        /* OUT: Malloc'd doclist */\n){\n  int rc = SQLITE_OK;\n  sqlite3_int64 i1 = 0;\n  sqlite3_int64 i2 = 0;\n  sqlite3_int64 iPrev = 0;\n  char *pEnd1 = &a1[n1];\n  char *pEnd2 = &a2[n2];\n  char *p1 = a1;\n  char *p2 = a2;\n  char *p;\n  char *aOut;\n  int bFirstOut = 0;\n\n  *paOut = 0;\n  *pnOut = 0;\n\n  /* Allocate space for the output. Both the input and output doclists\n  ** are delta encoded. If they are in ascending order (bDescDoclist==0),\n  ** then the first docid in each list is simply encoded as a varint. For\n  ** each subsequent docid, the varint stored is the difference between the\n  ** current and previous docid (a positive number - since the list is in\n  ** ascending order).\n  **\n  ** The first docid written to the output is therefore encoded using the\n  ** same number of bytes as it is in whichever of the input lists it is\n  ** read from. And each subsequent docid read from the same input list\n  ** consumes either the same or less bytes as it did in the input (since\n  ** the difference between it and the previous value in the output must\n  ** be a positive value less than or equal to the delta value read from\n  ** the input list). The same argument applies to all but the first docid\n  ** read from the 'other' list. And to the contents of all position lists\n  ** that will be copied and merged from the input to the output.\n  **\n  ** However, if the first docid copied to the output is a negative number,\n  ** then the encoding of the first docid from the 'other' input list may\n  ** be larger in the output than it was in the input (since the delta value\n  ** may be a larger positive integer than the actual docid).\n  **\n  ** The space required to store the output is therefore the sum of the\n  ** sizes of the two inputs, plus enough space for exactly one of the input\n  ** docids to grow.\n  **\n  ** A symmetric argument may be made if the doclists are in descending\n  ** order.\n  */\n  aOut = sqlite3_malloc64((i64)n1+n2+FTS3_VARINT_MAX-1+FTS3_BUFFER_PADDING);\n  if( !aOut ) return SQLITE_NOMEM;\n\n  p = aOut;\n  fts3GetDeltaVarint3(&p1, pEnd1, 0, &i1);\n  fts3GetDeltaVarint3(&p2, pEnd2, 0, &i2);\n  while( p1 || p2 ){\n    sqlite3_int64 iDiff = DOCID_CMP(i1, i2);\n\n    if( p2 && p1 && iDiff==0 ){\n      fts3PutDeltaVarint3(&p, bDescDoclist, &iPrev, &bFirstOut, i1);\n      rc = fts3PoslistMerge(&p, &p1, &p2);\n      if( rc ) break;\n      fts3GetDeltaVarint3(&p1, pEnd1, bDescDoclist, &i1);\n      fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);\n    }else if( !p2 || (p1 && iDiff<0) ){\n      fts3PutDeltaVarint3(&p, bDescDoclist, &iPrev, &bFirstOut, i1);\n      fts3PoslistCopy(&p, &p1);\n      fts3GetDeltaVarint3(&p1, pEnd1, bDescDoclist, &i1);\n    }else{\n      fts3PutDeltaVarint3(&p, bDescDoclist, &iPrev, &bFirstOut, i2);\n      fts3PoslistCopy(&p, &p2);\n      fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);\n    }\n\n    assert( (p-aOut)<=((p1?(p1-a1):n1)+(p2?(p2-a2):n2)+FTS3_VARINT_MAX-1) );\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(aOut);\n    p = aOut = 0;\n  }else{\n    assert( (p-aOut)<=n1+n2+FTS3_VARINT_MAX-1 );\n    memset(&aOut[(p-aOut)], 0, FTS3_BUFFER_PADDING);\n  }\n  *paOut = aOut;\n  *pnOut = (int)(p-aOut);\n  return rc;\n}\n\n/*\n** This function does a \"phrase\" merge of two doclists. In a phrase merge,\n** the output contains a copy of each position from the right-hand input\n** doclist for which there is a position in the left-hand input doclist\n** exactly nDist tokens before it.\n**\n** If the docids in the input doclists are sorted in ascending order,\n** parameter bDescDoclist should be false. If they are sorted in ascending\n** order, it should be passed a non-zero value.\n**\n** The right-hand input doclist is overwritten by this function.\n*/\nstatic int fts3DoclistPhraseMerge(\n  int bDescDoclist,               /* True if arguments are desc */\n  int nDist,                      /* Distance from left to right (1=adjacent) */\n  char *aLeft, int nLeft,         /* Left doclist */\n  char **paRight, int *pnRight    /* IN/OUT: Right/output doclist */\n){\n  sqlite3_int64 i1 = 0;\n  sqlite3_int64 i2 = 0;\n  sqlite3_int64 iPrev = 0;\n  char *aRight = *paRight;\n  char *pEnd1 = &aLeft[nLeft];\n  char *pEnd2 = &aRight[*pnRight];\n  char *p1 = aLeft;\n  char *p2 = aRight;\n  char *p;\n  int bFirstOut = 0;\n  char *aOut;\n\n  assert( nDist>0 );\n  if( bDescDoclist ){\n    aOut = sqlite3_malloc64((sqlite3_int64)*pnRight + FTS3_VARINT_MAX);\n    if( aOut==0 ) return SQLITE_NOMEM;\n  }else{\n    aOut = aRight;\n  }\n  p = aOut;\n\n  fts3GetDeltaVarint3(&p1, pEnd1, 0, &i1);\n  fts3GetDeltaVarint3(&p2, pEnd2, 0, &i2);\n\n  while( p1 && p2 ){\n    sqlite3_int64 iDiff = DOCID_CMP(i1, i2);\n    if( iDiff==0 ){\n      char *pSave = p;\n      sqlite3_int64 iPrevSave = iPrev;\n      int bFirstOutSave = bFirstOut;\n\n      fts3PutDeltaVarint3(&p, bDescDoclist, &iPrev, &bFirstOut, i1);\n      if( 0==fts3PoslistPhraseMerge(&p, nDist, 0, 1, &p1, &p2) ){\n        p = pSave;\n        iPrev = iPrevSave;\n        bFirstOut = bFirstOutSave;\n      }\n      fts3GetDeltaVarint3(&p1, pEnd1, bDescDoclist, &i1);\n      fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);\n    }else if( iDiff<0 ){\n      fts3PoslistCopy(0, &p1);\n      fts3GetDeltaVarint3(&p1, pEnd1, bDescDoclist, &i1);\n    }else{\n      fts3PoslistCopy(0, &p2);\n      fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2);\n    }\n  }\n\n  *pnRight = (int)(p - aOut);\n  if( bDescDoclist ){\n    sqlite3_free(aRight);\n    *paRight = aOut;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Argument pList points to a position list nList bytes in size. This\n** function checks to see if the position list contains any entries for\n** a token in position 0 (of any column). If so, it writes argument iDelta\n** to the output buffer pOut, followed by a position list consisting only\n** of the entries from pList at position 0, and terminated by an 0x00 byte.\n** The value returned is the number of bytes written to pOut (if any).\n*/\nSQLITE_PRIVATE int sqlite3Fts3FirstFilter(\n  sqlite3_int64 iDelta,           /* Varint that may be written to pOut */\n  char *pList,                    /* Position list (no 0x00 term) */\n  int nList,                      /* Size of pList in bytes */\n  char *pOut                      /* Write output here */\n){\n  int nOut = 0;\n  int bWritten = 0;               /* True once iDelta has been written */\n  char *p = pList;\n  char *pEnd = &pList[nList];\n\n  if( *p!=0x01 ){\n    if( *p==0x02 ){\n      nOut += sqlite3Fts3PutVarint(&pOut[nOut], iDelta);\n      pOut[nOut++] = 0x02;\n      bWritten = 1;\n    }\n    fts3ColumnlistCopy(0, &p);\n  }\n\n  while( p<pEnd ){\n    sqlite3_int64 iCol;\n    p++;\n    p += sqlite3Fts3GetVarint(p, &iCol);\n    if( *p==0x02 ){\n      if( bWritten==0 ){\n        nOut += sqlite3Fts3PutVarint(&pOut[nOut], iDelta);\n        bWritten = 1;\n      }\n      pOut[nOut++] = 0x01;\n      nOut += sqlite3Fts3PutVarint(&pOut[nOut], iCol);\n      pOut[nOut++] = 0x02;\n    }\n    fts3ColumnlistCopy(0, &p);\n  }\n  if( bWritten ){\n    pOut[nOut++] = 0x00;\n  }\n\n  return nOut;\n}\n\n\n/*\n** Merge all doclists in the TermSelect.aaOutput[] array into a single\n** doclist stored in TermSelect.aaOutput[0]. If successful, delete all\n** other doclists (except the aaOutput[0] one) and return SQLITE_OK.\n**\n** If an OOM error occurs, return SQLITE_NOMEM. In this case it is\n** the responsibility of the caller to free any doclists left in the\n** TermSelect.aaOutput[] array.\n*/\nstatic int fts3TermSelectFinishMerge(Fts3Table *p, TermSelect *pTS){\n  char *aOut = 0;\n  int nOut = 0;\n  int i;\n\n  /* Loop through the doclists in the aaOutput[] array. Merge them all\n  ** into a single doclist.\n  */\n  for(i=0; i<SizeofArray(pTS->aaOutput); i++){\n    if( pTS->aaOutput[i] ){\n      if( !aOut ){\n        aOut = pTS->aaOutput[i];\n        nOut = pTS->anOutput[i];\n        pTS->aaOutput[i] = 0;\n      }else{\n        int nNew;\n        char *aNew;\n\n        int rc = fts3DoclistOrMerge(p->bDescIdx,\n            pTS->aaOutput[i], pTS->anOutput[i], aOut, nOut, &aNew, &nNew\n        );\n        if( rc!=SQLITE_OK ){\n          sqlite3_free(aOut);\n          return rc;\n        }\n\n        sqlite3_free(pTS->aaOutput[i]);\n        sqlite3_free(aOut);\n        pTS->aaOutput[i] = 0;\n        aOut = aNew;\n        nOut = nNew;\n      }\n    }\n  }\n\n  pTS->aaOutput[0] = aOut;\n  pTS->anOutput[0] = nOut;\n  return SQLITE_OK;\n}\n\n/*\n** Merge the doclist aDoclist/nDoclist into the TermSelect object passed\n** as the first argument. The merge is an \"OR\" merge (see function\n** fts3DoclistOrMerge() for details).\n**\n** This function is called with the doclist for each term that matches\n** a queried prefix. It merges all these doclists into one, the doclist\n** for the specified prefix. Since there can be a very large number of\n** doclists to merge, the merging is done pair-wise using the TermSelect\n** object.\n**\n** This function returns SQLITE_OK if the merge is successful, or an\n** SQLite error code (SQLITE_NOMEM) if an error occurs.\n*/\nstatic int fts3TermSelectMerge(\n  Fts3Table *p,                   /* FTS table handle */\n  TermSelect *pTS,                /* TermSelect object to merge into */\n  char *aDoclist,                 /* Pointer to doclist */\n  int nDoclist                    /* Size of aDoclist in bytes */\n){\n  if( pTS->aaOutput[0]==0 ){\n    /* If this is the first term selected, copy the doclist to the output\n    ** buffer using memcpy().\n    **\n    ** Add FTS3_VARINT_MAX bytes of unused space to the end of the\n    ** allocation. This is so as to ensure that the buffer is big enough\n    ** to hold the current doclist AND'd with any other doclist. If the\n    ** doclists are stored in order=ASC order, this padding would not be\n    ** required (since the size of [doclistA AND doclistB] is always less\n    ** than or equal to the size of [doclistA] in that case). But this is\n    ** not true for order=DESC. For example, a doclist containing (1, -1)\n    ** may be smaller than (-1), as in the first example the -1 may be stored\n    ** as a single-byte delta, whereas in the second it must be stored as a\n    ** FTS3_VARINT_MAX byte varint.\n    **\n    ** Similar padding is added in the fts3DoclistOrMerge() function.\n    */\n    pTS->aaOutput[0] = sqlite3_malloc64((i64)nDoclist + FTS3_VARINT_MAX + 1);\n    pTS->anOutput[0] = nDoclist;\n    if( pTS->aaOutput[0] ){\n      memcpy(pTS->aaOutput[0], aDoclist, nDoclist);\n      memset(&pTS->aaOutput[0][nDoclist], 0, FTS3_VARINT_MAX);\n    }else{\n      return SQLITE_NOMEM;\n    }\n  }else{\n    char *aMerge = aDoclist;\n    int nMerge = nDoclist;\n    int iOut;\n\n    for(iOut=0; iOut<SizeofArray(pTS->aaOutput); iOut++){\n      if( pTS->aaOutput[iOut]==0 ){\n        assert( iOut>0 );\n        pTS->aaOutput[iOut] = aMerge;\n        pTS->anOutput[iOut] = nMerge;\n        break;\n      }else{\n        char *aNew;\n        int nNew;\n\n        int rc = fts3DoclistOrMerge(p->bDescIdx, aMerge, nMerge,\n            pTS->aaOutput[iOut], pTS->anOutput[iOut], &aNew, &nNew\n        );\n        if( rc!=SQLITE_OK ){\n          if( aMerge!=aDoclist ) sqlite3_free(aMerge);\n          return rc;\n        }\n\n        if( aMerge!=aDoclist ) sqlite3_free(aMerge);\n        sqlite3_free(pTS->aaOutput[iOut]);\n        pTS->aaOutput[iOut] = 0;\n\n        aMerge = aNew;\n        nMerge = nNew;\n        if( (iOut+1)==SizeofArray(pTS->aaOutput) ){\n          pTS->aaOutput[iOut] = aMerge;\n          pTS->anOutput[iOut] = nMerge;\n        }\n      }\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Append SegReader object pNew to the end of the pCsr->apSegment[] array.\n*/\nstatic int fts3SegReaderCursorAppend(\n  Fts3MultiSegReader *pCsr,\n  Fts3SegReader *pNew\n){\n  if( (pCsr->nSegment%16)==0 ){\n    Fts3SegReader **apNew;\n    sqlite3_int64 nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);\n    apNew = (Fts3SegReader **)sqlite3_realloc64(pCsr->apSegment, nByte);\n    if( !apNew ){\n      sqlite3Fts3SegReaderFree(pNew);\n      return SQLITE_NOMEM;\n    }\n    pCsr->apSegment = apNew;\n  }\n  pCsr->apSegment[pCsr->nSegment++] = pNew;\n  return SQLITE_OK;\n}\n\n/*\n** Add seg-reader objects to the Fts3MultiSegReader object passed as the\n** 8th argument.\n**\n** This function returns SQLITE_OK if successful, or an SQLite error code\n** otherwise.\n*/\nstatic int fts3SegReaderCursor(\n  Fts3Table *p,                   /* FTS3 table handle */\n  int iLangid,                    /* Language id */\n  int iIndex,                     /* Index to search (from 0 to p->nIndex-1) */\n  int iLevel,                     /* Level of segments to scan */\n  const char *zTerm,              /* Term to query for */\n  int nTerm,                      /* Size of zTerm in bytes */\n  int isPrefix,                   /* True for a prefix search */\n  int isScan,                     /* True to scan from zTerm to EOF */\n  Fts3MultiSegReader *pCsr        /* Cursor object to populate */\n){\n  int rc = SQLITE_OK;             /* Error code */\n  sqlite3_stmt *pStmt = 0;        /* Statement to iterate through segments */\n  int rc2;                        /* Result of sqlite3_reset() */\n\n  /* If iLevel is less than 0 and this is not a scan, include a seg-reader\n  ** for the pending-terms. If this is a scan, then this call must be being\n  ** made by an fts4aux module, not an FTS table. In this case calling\n  ** Fts3SegReaderPending might segfault, as the data structures used by\n  ** fts4aux are not completely populated. So it's easiest to filter these\n  ** calls out here.  */\n  if( iLevel<0 && p->aIndex && p->iPrevLangid==iLangid ){\n    Fts3SegReader *pSeg = 0;\n    rc = sqlite3Fts3SegReaderPending(p, iIndex, zTerm, nTerm, isPrefix||isScan, &pSeg);\n    if( rc==SQLITE_OK && pSeg ){\n      rc = fts3SegReaderCursorAppend(pCsr, pSeg);\n    }\n  }\n\n  if( iLevel!=FTS3_SEGCURSOR_PENDING ){\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts3AllSegdirs(p, iLangid, iIndex, iLevel, &pStmt);\n    }\n\n    while( rc==SQLITE_OK && SQLITE_ROW==(rc = sqlite3_step(pStmt)) ){\n      Fts3SegReader *pSeg = 0;\n\n      /* Read the values returned by the SELECT into local variables. */\n      sqlite3_int64 iStartBlock = sqlite3_column_int64(pStmt, 1);\n      sqlite3_int64 iLeavesEndBlock = sqlite3_column_int64(pStmt, 2);\n      sqlite3_int64 iEndBlock = sqlite3_column_int64(pStmt, 3);\n      int nRoot = sqlite3_column_bytes(pStmt, 4);\n      char const *zRoot = sqlite3_column_blob(pStmt, 4);\n\n      /* If zTerm is not NULL, and this segment is not stored entirely on its\n      ** root node, the range of leaves scanned can be reduced. Do this. */\n      if( iStartBlock && zTerm && zRoot ){\n        sqlite3_int64 *pi = (isPrefix ? &iLeavesEndBlock : 0);\n        rc = fts3SelectLeaf(p, zTerm, nTerm, zRoot, nRoot, &iStartBlock, pi);\n        if( rc!=SQLITE_OK ) goto finished;\n        if( isPrefix==0 && isScan==0 ) iLeavesEndBlock = iStartBlock;\n      }\n\n      rc = sqlite3Fts3SegReaderNew(pCsr->nSegment+1,\n          (isPrefix==0 && isScan==0),\n          iStartBlock, iLeavesEndBlock,\n          iEndBlock, zRoot, nRoot, &pSeg\n      );\n      if( rc!=SQLITE_OK ) goto finished;\n      rc = fts3SegReaderCursorAppend(pCsr, pSeg);\n    }\n  }\n\n finished:\n  rc2 = sqlite3_reset(pStmt);\n  if( rc==SQLITE_DONE ) rc = rc2;\n\n  return rc;\n}\n\n/*\n** Set up a cursor object for iterating through a full-text index or a\n** single level therein.\n*/\nSQLITE_PRIVATE int sqlite3Fts3SegReaderCursor(\n  Fts3Table *p,                   /* FTS3 table handle */\n  int iLangid,                    /* Language-id to search */\n  int iIndex,                     /* Index to search (from 0 to p->nIndex-1) */\n  int iLevel,                     /* Level of segments to scan */\n  const char *zTerm,              /* Term to query for */\n  int nTerm,                      /* Size of zTerm in bytes */\n  int isPrefix,                   /* True for a prefix search */\n  int isScan,                     /* True to scan from zTerm to EOF */\n  Fts3MultiSegReader *pCsr       /* Cursor object to populate */\n){\n  assert( iIndex>=0 && iIndex<p->nIndex );\n  assert( iLevel==FTS3_SEGCURSOR_ALL\n      ||  iLevel==FTS3_SEGCURSOR_PENDING\n      ||  iLevel>=0\n  );\n  assert( iLevel<FTS3_SEGDIR_MAXLEVEL );\n  assert( FTS3_SEGCURSOR_ALL<0 && FTS3_SEGCURSOR_PENDING<0 );\n  assert( isPrefix==0 || isScan==0 );\n\n  memset(pCsr, 0, sizeof(Fts3MultiSegReader));\n  return fts3SegReaderCursor(\n      p, iLangid, iIndex, iLevel, zTerm, nTerm, isPrefix, isScan, pCsr\n  );\n}\n\n/*\n** In addition to its current configuration, have the Fts3MultiSegReader\n** passed as the 4th argument also scan the doclist for term zTerm/nTerm.\n**\n** SQLITE_OK is returned if no error occurs, otherwise an SQLite error code.\n*/\nstatic int fts3SegReaderCursorAddZero(\n  Fts3Table *p,                   /* FTS virtual table handle */\n  int iLangid,\n  const char *zTerm,              /* Term to scan doclist of */\n  int nTerm,                      /* Number of bytes in zTerm */\n  Fts3MultiSegReader *pCsr        /* Fts3MultiSegReader to modify */\n){\n  return fts3SegReaderCursor(p,\n      iLangid, 0, FTS3_SEGCURSOR_ALL, zTerm, nTerm, 0, 0,pCsr\n  );\n}\n\n/*\n** Open an Fts3MultiSegReader to scan the doclist for term zTerm/nTerm. Or,\n** if isPrefix is true, to scan the doclist for all terms for which\n** zTerm/nTerm is a prefix. If successful, return SQLITE_OK and write\n** a pointer to the new Fts3MultiSegReader to *ppSegcsr. Otherwise, return\n** an SQLite error code.\n**\n** It is the responsibility of the caller to free this object by eventually\n** passing it to fts3SegReaderCursorFree()\n**\n** SQLITE_OK is returned if no error occurs, otherwise an SQLite error code.\n** Output parameter *ppSegcsr is set to 0 if an error occurs.\n*/\nstatic int fts3TermSegReaderCursor(\n  Fts3Cursor *pCsr,               /* Virtual table cursor handle */\n  const char *zTerm,              /* Term to query for */\n  int nTerm,                      /* Size of zTerm in bytes */\n  int isPrefix,                   /* True for a prefix search */\n  Fts3MultiSegReader **ppSegcsr   /* OUT: Allocated seg-reader cursor */\n){\n  Fts3MultiSegReader *pSegcsr;    /* Object to allocate and return */\n  int rc = SQLITE_NOMEM;          /* Return code */\n\n  pSegcsr = sqlite3_malloc(sizeof(Fts3MultiSegReader));\n  if( pSegcsr ){\n    int i;\n    int bFound = 0;               /* True once an index has been found */\n    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;\n\n    if( isPrefix ){\n      for(i=1; bFound==0 && i<p->nIndex; i++){\n        if( p->aIndex[i].nPrefix==nTerm ){\n          bFound = 1;\n          rc = sqlite3Fts3SegReaderCursor(p, pCsr->iLangid,\n              i, FTS3_SEGCURSOR_ALL, zTerm, nTerm, 0, 0, pSegcsr\n          );\n          pSegcsr->bLookup = 1;\n        }\n      }\n\n      for(i=1; bFound==0 && i<p->nIndex; i++){\n        if( p->aIndex[i].nPrefix==nTerm+1 ){\n          bFound = 1;\n          rc = sqlite3Fts3SegReaderCursor(p, pCsr->iLangid,\n              i, FTS3_SEGCURSOR_ALL, zTerm, nTerm, 1, 0, pSegcsr\n          );\n          if( rc==SQLITE_OK ){\n            rc = fts3SegReaderCursorAddZero(\n                p, pCsr->iLangid, zTerm, nTerm, pSegcsr\n            );\n          }\n        }\n      }\n    }\n\n    if( bFound==0 ){\n      rc = sqlite3Fts3SegReaderCursor(p, pCsr->iLangid,\n          0, FTS3_SEGCURSOR_ALL, zTerm, nTerm, isPrefix, 0, pSegcsr\n      );\n      pSegcsr->bLookup = !isPrefix;\n    }\n  }\n\n  *ppSegcsr = pSegcsr;\n  return rc;\n}\n\n/*\n** Free an Fts3MultiSegReader allocated by fts3TermSegReaderCursor().\n*/\nstatic void fts3SegReaderCursorFree(Fts3MultiSegReader *pSegcsr){\n  sqlite3Fts3SegReaderFinish(pSegcsr);\n  sqlite3_free(pSegcsr);\n}\n\n/*\n** This function retrieves the doclist for the specified term (or term\n** prefix) from the database.\n*/\nstatic int fts3TermSelect(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3PhraseToken *pTok,          /* Token to query for */\n  int iColumn,                    /* Column to query (or -ve for all columns) */\n  int *pnOut,                     /* OUT: Size of buffer at *ppOut */\n  char **ppOut                    /* OUT: Malloced result buffer */\n){\n  int rc;                         /* Return code */\n  Fts3MultiSegReader *pSegcsr;    /* Seg-reader cursor for this term */\n  TermSelect tsc;                 /* Object for pair-wise doclist merging */\n  Fts3SegFilter filter;           /* Segment term filter configuration */\n\n  pSegcsr = pTok->pSegcsr;\n  memset(&tsc, 0, sizeof(TermSelect));\n\n  filter.flags = FTS3_SEGMENT_IGNORE_EMPTY | FTS3_SEGMENT_REQUIRE_POS\n        | (pTok->isPrefix ? FTS3_SEGMENT_PREFIX : 0)\n        | (pTok->bFirst ? FTS3_SEGMENT_FIRST : 0)\n        | (iColumn<p->nColumn ? FTS3_SEGMENT_COLUMN_FILTER : 0);\n  filter.iCol = iColumn;\n  filter.zTerm = pTok->z;\n  filter.nTerm = pTok->n;\n\n  rc = sqlite3Fts3SegReaderStart(p, pSegcsr, &filter);\n  while( SQLITE_OK==rc\n      && SQLITE_ROW==(rc = sqlite3Fts3SegReaderStep(p, pSegcsr))\n  ){\n    rc = fts3TermSelectMerge(p, &tsc, pSegcsr->aDoclist, pSegcsr->nDoclist);\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = fts3TermSelectFinishMerge(p, &tsc);\n  }\n  if( rc==SQLITE_OK ){\n    *ppOut = tsc.aaOutput[0];\n    *pnOut = tsc.anOutput[0];\n  }else{\n    int i;\n    for(i=0; i<SizeofArray(tsc.aaOutput); i++){\n      sqlite3_free(tsc.aaOutput[i]);\n    }\n  }\n\n  fts3SegReaderCursorFree(pSegcsr);\n  pTok->pSegcsr = 0;\n  return rc;\n}\n\n/*\n** This function counts the total number of docids in the doclist stored\n** in buffer aList[], size nList bytes.\n**\n** If the isPoslist argument is true, then it is assumed that the doclist\n** contains a position-list following each docid. Otherwise, it is assumed\n** that the doclist is simply a list of docids stored as delta encoded\n** varints.\n*/\nstatic int fts3DoclistCountDocids(char *aList, int nList){\n  int nDoc = 0;                   /* Return value */\n  if( aList ){\n    char *aEnd = &aList[nList];   /* Pointer to one byte after EOF */\n    char *p = aList;              /* Cursor */\n    while( p<aEnd ){\n      nDoc++;\n      while( (*p++)&0x80 );     /* Skip docid varint */\n      fts3PoslistCopy(0, &p);   /* Skip over position list */\n    }\n  }\n\n  return nDoc;\n}\n\n/*\n** Advance the cursor to the next row in the %_content table that\n** matches the search criteria.  For a MATCH search, this will be\n** the next row that matches. For a full-table scan, this will be\n** simply the next row in the %_content table.  For a docid lookup,\n** this routine simply sets the EOF flag.\n**\n** Return SQLITE_OK if nothing goes wrong.  SQLITE_OK is returned\n** even if we reach end-of-file.  The fts3EofMethod() will be called\n** subsequently to determine whether or not an EOF was hit.\n*/\nstatic int fts3NextMethod(sqlite3_vtab_cursor *pCursor){\n  int rc;\n  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;\n  if( pCsr->eSearch==FTS3_DOCID_SEARCH || pCsr->eSearch==FTS3_FULLSCAN_SEARCH ){\n    Fts3Table *pTab = (Fts3Table*)pCursor->pVtab;\n    pTab->bLock++;\n    if( SQLITE_ROW!=sqlite3_step(pCsr->pStmt) ){\n      pCsr->isEof = 1;\n      rc = sqlite3_reset(pCsr->pStmt);\n    }else{\n      pCsr->iPrevId = sqlite3_column_int64(pCsr->pStmt, 0);\n      rc = SQLITE_OK;\n    }\n    pTab->bLock--;\n  }else{\n    rc = fts3EvalNext((Fts3Cursor *)pCursor);\n  }\n  assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );\n  return rc;\n}\n\n/*\n** If the numeric type of argument pVal is \"integer\", then return it\n** converted to a 64-bit signed integer. Otherwise, return a copy of\n** the second parameter, iDefault.\n*/\nstatic sqlite3_int64 fts3DocidRange(sqlite3_value *pVal, i64 iDefault){\n  if( pVal ){\n    int eType = sqlite3_value_numeric_type(pVal);\n    if( eType==SQLITE_INTEGER ){\n      return sqlite3_value_int64(pVal);\n    }\n  }\n  return iDefault;\n}\n\n/*\n** This is the xFilter interface for the virtual table.  See\n** the virtual table xFilter method documentation for additional\n** information.\n**\n** If idxNum==FTS3_FULLSCAN_SEARCH then do a full table scan against\n** the %_content table.\n**\n** If idxNum==FTS3_DOCID_SEARCH then do a docid lookup for a single entry\n** in the %_content table.\n**\n** If idxNum>=FTS3_FULLTEXT_SEARCH then use the full text index.  The\n** column on the left-hand side of the MATCH operator is column\n** number idxNum-FTS3_FULLTEXT_SEARCH, 0 indexed.  argv[0] is the right-hand\n** side of the MATCH operator.\n*/\nstatic int fts3FilterMethod(\n  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */\n  int idxNum,                     /* Strategy index */\n  const char *idxStr,             /* Unused */\n  int nVal,                       /* Number of elements in apVal */\n  sqlite3_value **apVal           /* Arguments for the indexing scheme */\n){\n  int rc = SQLITE_OK;\n  char *zSql;                     /* SQL statement used to access %_content */\n  int eSearch;\n  Fts3Table *p = (Fts3Table *)pCursor->pVtab;\n  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;\n\n  sqlite3_value *pCons = 0;       /* The MATCH or rowid constraint, if any */\n  sqlite3_value *pLangid = 0;     /* The \"langid = ?\" constraint, if any */\n  sqlite3_value *pDocidGe = 0;    /* The \"docid >= ?\" constraint, if any */\n  sqlite3_value *pDocidLe = 0;    /* The \"docid <= ?\" constraint, if any */\n  int iIdx;\n\n  UNUSED_PARAMETER(idxStr);\n  UNUSED_PARAMETER(nVal);\n\n  if( p->bLock ){\n    return SQLITE_ERROR;\n  }\n\n  eSearch = (idxNum & 0x0000FFFF);\n  assert( eSearch>=0 && eSearch<=(FTS3_FULLTEXT_SEARCH+p->nColumn) );\n  assert( p->pSegments==0 );\n\n  /* Collect arguments into local variables */\n  iIdx = 0;\n  if( eSearch!=FTS3_FULLSCAN_SEARCH ) pCons = apVal[iIdx++];\n  if( idxNum & FTS3_HAVE_LANGID ) pLangid = apVal[iIdx++];\n  if( idxNum & FTS3_HAVE_DOCID_GE ) pDocidGe = apVal[iIdx++];\n  if( idxNum & FTS3_HAVE_DOCID_LE ) pDocidLe = apVal[iIdx++];\n  assert( iIdx==nVal );\n\n  /* In case the cursor has been used before, clear it now. */\n  fts3ClearCursor(pCsr);\n\n  /* Set the lower and upper bounds on docids to return */\n  pCsr->iMinDocid = fts3DocidRange(pDocidGe, SMALLEST_INT64);\n  pCsr->iMaxDocid = fts3DocidRange(pDocidLe, LARGEST_INT64);\n\n  if( idxStr ){\n    pCsr->bDesc = (idxStr[0]=='D');\n  }else{\n    pCsr->bDesc = p->bDescIdx;\n  }\n  pCsr->eSearch = (i16)eSearch;\n\n  if( eSearch!=FTS3_DOCID_SEARCH && eSearch!=FTS3_FULLSCAN_SEARCH ){\n    int iCol = eSearch-FTS3_FULLTEXT_SEARCH;\n    const char *zQuery = (const char *)sqlite3_value_text(pCons);\n\n    if( zQuery==0 && sqlite3_value_type(pCons)!=SQLITE_NULL ){\n      return SQLITE_NOMEM;\n    }\n\n    pCsr->iLangid = 0;\n    if( pLangid ) pCsr->iLangid = sqlite3_value_int(pLangid);\n\n    assert( p->base.zErrMsg==0 );\n    rc = sqlite3Fts3ExprParse(p->pTokenizer, pCsr->iLangid,\n        p->azColumn, p->bFts4, p->nColumn, iCol, zQuery, -1, &pCsr->pExpr,\n        &p->base.zErrMsg\n    );\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n\n    rc = fts3EvalStart(pCsr);\n    sqlite3Fts3SegmentsClose(p);\n    if( rc!=SQLITE_OK ) return rc;\n    pCsr->pNextId = pCsr->aDoclist;\n    pCsr->iPrevId = 0;\n  }\n\n  /* Compile a SELECT statement for this cursor. For a full-table-scan, the\n  ** statement loops through all rows of the %_content table. For a\n  ** full-text query or docid lookup, the statement retrieves a single\n  ** row by docid.\n  */\n  if( eSearch==FTS3_FULLSCAN_SEARCH ){\n    if( pDocidGe || pDocidLe ){\n      zSql = sqlite3_mprintf(\n          \"SELECT %s WHERE rowid BETWEEN %lld AND %lld ORDER BY rowid %s\",\n          p->zReadExprlist, pCsr->iMinDocid, pCsr->iMaxDocid,\n          (pCsr->bDesc ? \"DESC\" : \"ASC\")\n      );\n    }else{\n      zSql = sqlite3_mprintf(\"SELECT %s ORDER BY rowid %s\",\n          p->zReadExprlist, (pCsr->bDesc ? \"DESC\" : \"ASC\")\n      );\n    }\n    if( zSql ){\n      p->bLock++;\n      rc = sqlite3_prepare_v3(\n          p->db,zSql,-1,SQLITE_PREPARE_PERSISTENT,&pCsr->pStmt,0\n      );\n      p->bLock--;\n      sqlite3_free(zSql);\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n  }else if( eSearch==FTS3_DOCID_SEARCH ){\n    rc = fts3CursorSeekStmt(pCsr);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_bind_value(pCsr->pStmt, 1, pCons);\n    }\n  }\n  if( rc!=SQLITE_OK ) return rc;\n\n  return fts3NextMethod(pCursor);\n}\n\n/*\n** This is the xEof method of the virtual table. SQLite calls this\n** routine to find out if it has reached the end of a result set.\n*/\nstatic int fts3EofMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3Cursor *pCsr = (Fts3Cursor*)pCursor;\n  if( pCsr->isEof ){\n    fts3ClearCursor(pCsr);\n    pCsr->isEof = 1;\n  }\n  return pCsr->isEof;\n}\n\n/*\n** This is the xRowid method. The SQLite core calls this routine to\n** retrieve the rowid for the current row of the result set. fts3\n** exposes %_content.docid as the rowid for the virtual table. The\n** rowid should be written to *pRowid.\n*/\nstatic int fts3RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){\n  Fts3Cursor *pCsr = (Fts3Cursor *) pCursor;\n  *pRowid = pCsr->iPrevId;\n  return SQLITE_OK;\n}\n\n/*\n** This is the xColumn method, called by SQLite to request a value from\n** the row that the supplied cursor currently points to.\n**\n** If:\n**\n**   (iCol <  p->nColumn)   -> The value of the iCol'th user column.\n**   (iCol == p->nColumn)   -> Magic column with the same name as the table.\n**   (iCol == p->nColumn+1) -> Docid column\n**   (iCol == p->nColumn+2) -> Langid column\n*/\nstatic int fts3ColumnMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */\n  int iCol                        /* Index of column to read value from */\n){\n  int rc = SQLITE_OK;             /* Return Code */\n  Fts3Cursor *pCsr = (Fts3Cursor *) pCursor;\n  Fts3Table *p = (Fts3Table *)pCursor->pVtab;\n\n  /* The column value supplied by SQLite must be in range. */\n  assert( iCol>=0 && iCol<=p->nColumn+2 );\n\n  switch( iCol-p->nColumn ){\n    case 0:\n      /* The special 'table-name' column */\n      sqlite3_result_pointer(pCtx, pCsr, \"fts3cursor\", 0);\n      break;\n\n    case 1:\n      /* The docid column */\n      sqlite3_result_int64(pCtx, pCsr->iPrevId);\n      break;\n\n    case 2:\n      if( pCsr->pExpr ){\n        sqlite3_result_int64(pCtx, pCsr->iLangid);\n        break;\n      }else if( p->zLanguageid==0 ){\n        sqlite3_result_int(pCtx, 0);\n        break;\n      }else{\n        iCol = p->nColumn;\n        /* no break */ deliberate_fall_through\n      }\n\n    default:\n      /* A user column. Or, if this is a full-table scan, possibly the\n      ** language-id column. Seek the cursor. */\n      rc = fts3CursorSeek(0, pCsr);\n      if( rc==SQLITE_OK && sqlite3_data_count(pCsr->pStmt)-1>iCol ){\n        sqlite3_result_value(pCtx, sqlite3_column_value(pCsr->pStmt, iCol+1));\n      }\n      break;\n  }\n\n  assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );\n  return rc;\n}\n\n/*\n** This function is the implementation of the xUpdate callback used by\n** FTS3 virtual tables. It is invoked by SQLite each time a row is to be\n** inserted, updated or deleted.\n*/\nstatic int fts3UpdateMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  int nArg,                       /* Size of argument array */\n  sqlite3_value **apVal,          /* Array of arguments */\n  sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */\n){\n  return sqlite3Fts3UpdateMethod(pVtab, nArg, apVal, pRowid);\n}\n\n/*\n** Implementation of xSync() method. Flush the contents of the pending-terms\n** hash-table to the database.\n*/\nstatic int fts3SyncMethod(sqlite3_vtab *pVtab){\n\n  /* Following an incremental-merge operation, assuming that the input\n  ** segments are not completely consumed (the usual case), they are updated\n  ** in place to remove the entries that have already been merged. This\n  ** involves updating the leaf block that contains the smallest unmerged\n  ** entry and each block (if any) between the leaf and the root node. So\n  ** if the height of the input segment b-trees is N, and input segments\n  ** are merged eight at a time, updating the input segments at the end\n  ** of an incremental-merge requires writing (8*(1+N)) blocks. N is usually\n  ** small - often between 0 and 2. So the overhead of the incremental\n  ** merge is somewhere between 8 and 24 blocks. To avoid this overhead\n  ** dwarfing the actual productive work accomplished, the incremental merge\n  ** is only attempted if it will write at least 64 leaf blocks. Hence\n  ** nMinMerge.\n  **\n  ** Of course, updating the input segments also involves deleting a bunch\n  ** of blocks from the segments table. But this is not considered overhead\n  ** as it would also be required by a crisis-merge that used the same input\n  ** segments.\n  */\n  const u32 nMinMerge = 64;       /* Minimum amount of incr-merge work to do */\n\n  Fts3Table *p = (Fts3Table*)pVtab;\n  int rc;\n  i64 iLastRowid = sqlite3_last_insert_rowid(p->db);\n\n  rc = sqlite3Fts3PendingTermsFlush(p);\n  if( rc==SQLITE_OK\n   && p->nLeafAdd>(nMinMerge/16)\n   && p->nAutoincrmerge && p->nAutoincrmerge!=0xff\n  ){\n    int mxLevel = 0;              /* Maximum relative level value in db */\n    int A;                        /* Incr-merge parameter A */\n\n    rc = sqlite3Fts3MaxLevel(p, &mxLevel);\n    assert( rc==SQLITE_OK || mxLevel==0 );\n    A = p->nLeafAdd * mxLevel;\n    A += (A/2);\n    if( A>(int)nMinMerge ) rc = sqlite3Fts3Incrmerge(p, A, p->nAutoincrmerge);\n  }\n  sqlite3Fts3SegmentsClose(p);\n  sqlite3_set_last_insert_rowid(p->db, iLastRowid);\n  return rc;\n}\n\n/*\n** If it is currently unknown whether or not the FTS table has an %_stat\n** table (if p->bHasStat==2), attempt to determine this (set p->bHasStat\n** to 0 or 1). Return SQLITE_OK if successful, or an SQLite error code\n** if an error occurs.\n*/\nstatic int fts3SetHasStat(Fts3Table *p){\n  int rc = SQLITE_OK;\n  if( p->bHasStat==2 ){\n    char *zTbl = sqlite3_mprintf(\"%s_stat\", p->zName);\n    if( zTbl ){\n      int res = sqlite3_table_column_metadata(p->db, p->zDb, zTbl, 0,0,0,0,0,0);\n      sqlite3_free(zTbl);\n      p->bHasStat = (res==SQLITE_OK);\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n  }\n  return rc;\n}\n\n/*\n** Implementation of xBegin() method.\n*/\nstatic int fts3BeginMethod(sqlite3_vtab *pVtab){\n  Fts3Table *p = (Fts3Table*)pVtab;\n  int rc;\n  UNUSED_PARAMETER(pVtab);\n  assert( p->pSegments==0 );\n  assert( p->nPendingData==0 );\n  assert( p->inTransaction!=1 );\n  p->nLeafAdd = 0;\n  rc = fts3SetHasStat(p);\n#ifdef SQLITE_DEBUG\n  if( rc==SQLITE_OK ){\n    p->inTransaction = 1;\n    p->mxSavepoint = -1;\n  }\n#endif\n  return rc;\n}\n\n/*\n** Implementation of xCommit() method. This is a no-op. The contents of\n** the pending-terms hash-table have already been flushed into the database\n** by fts3SyncMethod().\n*/\nstatic int fts3CommitMethod(sqlite3_vtab *pVtab){\n  TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );\n  UNUSED_PARAMETER(pVtab);\n  assert( p->nPendingData==0 );\n  assert( p->inTransaction!=0 );\n  assert( p->pSegments==0 );\n  TESTONLY( p->inTransaction = 0 );\n  TESTONLY( p->mxSavepoint = -1; );\n  return SQLITE_OK;\n}\n\n/*\n** Implementation of xRollback(). Discard the contents of the pending-terms\n** hash-table. Any changes made to the database are reverted by SQLite.\n*/\nstatic int fts3RollbackMethod(sqlite3_vtab *pVtab){\n  Fts3Table *p = (Fts3Table*)pVtab;\n  sqlite3Fts3PendingTermsClear(p);\n  assert( p->inTransaction!=0 );\n  TESTONLY( p->inTransaction = 0 );\n  TESTONLY( p->mxSavepoint = -1; );\n  return SQLITE_OK;\n}\n\n/*\n** When called, *ppPoslist must point to the byte immediately following the\n** end of a position-list. i.e. ( (*ppPoslist)[-1]==POS_END ). This function\n** moves *ppPoslist so that it instead points to the first byte of the\n** same position list.\n*/\nstatic void fts3ReversePoslist(char *pStart, char **ppPoslist){\n  char *p = &(*ppPoslist)[-2];\n  char c = 0;\n\n  /* Skip backwards passed any trailing 0x00 bytes added by NearTrim() */\n  while( p>pStart && (c=*p--)==0 );\n\n  /* Search backwards for a varint with value zero (the end of the previous\n  ** poslist). This is an 0x00 byte preceded by some byte that does not\n  ** have the 0x80 bit set.  */\n  while( p>pStart && (*p & 0x80) | c ){\n    c = *p--;\n  }\n  assert( p==pStart || c==0 );\n\n  /* At this point p points to that preceding byte without the 0x80 bit\n  ** set. So to find the start of the poslist, skip forward 2 bytes then\n  ** over a varint.\n  **\n  ** Normally. The other case is that p==pStart and the poslist to return\n  ** is the first in the doclist. In this case do not skip forward 2 bytes.\n  ** The second part of the if condition (c==0 && *ppPoslist>&p[2])\n  ** is required for cases where the first byte of a doclist and the\n  ** doclist is empty. For example, if the first docid is 10, a doclist\n  ** that begins with:\n  **\n  **   0x0A 0x00 <next docid delta varint>\n  */\n  if( p>pStart || (c==0 && *ppPoslist>&p[2]) ){ p = &p[2]; }\n  while( *p++&0x80 );\n  *ppPoslist = p;\n}\n\n/*\n** Helper function used by the implementation of the overloaded snippet(),\n** offsets() and optimize() SQL functions.\n**\n** If the value passed as the third argument is a blob of size\n** sizeof(Fts3Cursor*), then the blob contents are copied to the\n** output variable *ppCsr and SQLITE_OK is returned. Otherwise, an error\n** message is written to context pContext and SQLITE_ERROR returned. The\n** string passed via zFunc is used as part of the error message.\n*/\nstatic int fts3FunctionArg(\n  sqlite3_context *pContext,      /* SQL function call context */\n  const char *zFunc,              /* Function name */\n  sqlite3_value *pVal,            /* argv[0] passed to function */\n  Fts3Cursor **ppCsr              /* OUT: Store cursor handle here */\n){\n  int rc;\n  *ppCsr = (Fts3Cursor*)sqlite3_value_pointer(pVal, \"fts3cursor\");\n  if( (*ppCsr)!=0 ){\n    rc = SQLITE_OK;\n  }else{\n    char *zErr = sqlite3_mprintf(\"illegal first argument to %s\", zFunc);\n    sqlite3_result_error(pContext, zErr, -1);\n    sqlite3_free(zErr);\n    rc = SQLITE_ERROR;\n  }\n  return rc;\n}\n\n/*\n** Implementation of the snippet() function for FTS3\n*/\nstatic void fts3SnippetFunc(\n  sqlite3_context *pContext,      /* SQLite function call context */\n  int nVal,                       /* Size of apVal[] array */\n  sqlite3_value **apVal           /* Array of arguments */\n){\n  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */\n  const char *zStart = \"<b>\";\n  const char *zEnd = \"</b>\";\n  const char *zEllipsis = \"<b>...</b>\";\n  int iCol = -1;\n  int nToken = 15;                /* Default number of tokens in snippet */\n\n  /* There must be at least one argument passed to this function (otherwise\n  ** the non-overloaded version would have been called instead of this one).\n  */\n  assert( nVal>=1 );\n\n  if( nVal>6 ){\n    sqlite3_result_error(pContext,\n        \"wrong number of arguments to function snippet()\", -1);\n    return;\n  }\n  if( fts3FunctionArg(pContext, \"snippet\", apVal[0], &pCsr) ) return;\n\n  switch( nVal ){\n    case 6: nToken = sqlite3_value_int(apVal[5]);\n            /* no break */ deliberate_fall_through\n    case 5: iCol = sqlite3_value_int(apVal[4]);\n            /* no break */ deliberate_fall_through\n    case 4: zEllipsis = (const char*)sqlite3_value_text(apVal[3]);\n            /* no break */ deliberate_fall_through\n    case 3: zEnd = (const char*)sqlite3_value_text(apVal[2]);\n            /* no break */ deliberate_fall_through\n    case 2: zStart = (const char*)sqlite3_value_text(apVal[1]);\n  }\n  if( !zEllipsis || !zEnd || !zStart ){\n    sqlite3_result_error_nomem(pContext);\n  }else if( nToken==0 ){\n    sqlite3_result_text(pContext, \"\", -1, SQLITE_STATIC);\n  }else if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){\n    sqlite3Fts3Snippet(pContext, pCsr, zStart, zEnd, zEllipsis, iCol, nToken);\n  }\n}\n\n/*\n** Implementation of the offsets() function for FTS3\n*/\nstatic void fts3OffsetsFunc(\n  sqlite3_context *pContext,      /* SQLite function call context */\n  int nVal,                       /* Size of argument array */\n  sqlite3_value **apVal           /* Array of arguments */\n){\n  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */\n\n  UNUSED_PARAMETER(nVal);\n\n  assert( nVal==1 );\n  if( fts3FunctionArg(pContext, \"offsets\", apVal[0], &pCsr) ) return;\n  assert( pCsr );\n  if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){\n    sqlite3Fts3Offsets(pContext, pCsr);\n  }\n}\n\n/*\n** Implementation of the special optimize() function for FTS3. This\n** function merges all segments in the database to a single segment.\n** Example usage is:\n**\n**   SELECT optimize(t) FROM t LIMIT 1;\n**\n** where 't' is the name of an FTS3 table.\n*/\nstatic void fts3OptimizeFunc(\n  sqlite3_context *pContext,      /* SQLite function call context */\n  int nVal,                       /* Size of argument array */\n  sqlite3_value **apVal           /* Array of arguments */\n){\n  int rc;                         /* Return code */\n  Fts3Table *p;                   /* Virtual table handle */\n  Fts3Cursor *pCursor;            /* Cursor handle passed through apVal[0] */\n\n  UNUSED_PARAMETER(nVal);\n\n  assert( nVal==1 );\n  if( fts3FunctionArg(pContext, \"optimize\", apVal[0], &pCursor) ) return;\n  p = (Fts3Table *)pCursor->base.pVtab;\n  assert( p );\n\n  rc = sqlite3Fts3Optimize(p);\n\n  switch( rc ){\n    case SQLITE_OK:\n      sqlite3_result_text(pContext, \"Index optimized\", -1, SQLITE_STATIC);\n      break;\n    case SQLITE_DONE:\n      sqlite3_result_text(pContext, \"Index already optimal\", -1, SQLITE_STATIC);\n      break;\n    default:\n      sqlite3_result_error_code(pContext, rc);\n      break;\n  }\n}\n\n/*\n** Implementation of the matchinfo() function for FTS3\n*/\nstatic void fts3MatchinfoFunc(\n  sqlite3_context *pContext,      /* SQLite function call context */\n  int nVal,                       /* Size of argument array */\n  sqlite3_value **apVal           /* Array of arguments */\n){\n  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */\n  assert( nVal==1 || nVal==2 );\n  if( SQLITE_OK==fts3FunctionArg(pContext, \"matchinfo\", apVal[0], &pCsr) ){\n    const char *zArg = 0;\n    if( nVal>1 ){\n      zArg = (const char *)sqlite3_value_text(apVal[1]);\n    }\n    sqlite3Fts3Matchinfo(pContext, pCsr, zArg);\n  }\n}\n\n/*\n** This routine implements the xFindFunction method for the FTS3\n** virtual table.\n*/\nstatic int fts3FindFunctionMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  int nArg,                       /* Number of SQL function arguments */\n  const char *zName,              /* Name of SQL function */\n  void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */\n  void **ppArg                    /* Unused */\n){\n  struct Overloaded {\n    const char *zName;\n    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);\n  } aOverload[] = {\n    { \"snippet\", fts3SnippetFunc },\n    { \"offsets\", fts3OffsetsFunc },\n    { \"optimize\", fts3OptimizeFunc },\n    { \"matchinfo\", fts3MatchinfoFunc },\n  };\n  int i;                          /* Iterator variable */\n\n  UNUSED_PARAMETER(pVtab);\n  UNUSED_PARAMETER(nArg);\n  UNUSED_PARAMETER(ppArg);\n\n  for(i=0; i<SizeofArray(aOverload); i++){\n    if( strcmp(zName, aOverload[i].zName)==0 ){\n      *pxFunc = aOverload[i].xFunc;\n      return 1;\n    }\n  }\n\n  /* No function of the specified name was found. Return 0. */\n  return 0;\n}\n\n/*\n** Implementation of FTS3 xRename method. Rename an fts3 table.\n*/\nstatic int fts3RenameMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  const char *zName               /* New name of table */\n){\n  Fts3Table *p = (Fts3Table *)pVtab;\n  sqlite3 *db = p->db;            /* Database connection */\n  int rc;                         /* Return Code */\n\n  /* At this point it must be known if the %_stat table exists or not.\n  ** So bHasStat may not be 2.  */\n  rc = fts3SetHasStat(p);\n\n  /* As it happens, the pending terms table is always empty here. This is\n  ** because an \"ALTER TABLE RENAME TABLE\" statement inside a transaction\n  ** always opens a savepoint transaction. And the xSavepoint() method\n  ** flushes the pending terms table. But leave the (no-op) call to\n  ** PendingTermsFlush() in in case that changes.\n  */\n  assert( p->nPendingData==0 );\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts3PendingTermsFlush(p);\n  }\n\n  p->bIgnoreSavepoint = 1;\n\n  if( p->zContentTbl==0 ){\n    fts3DbExec(&rc, db,\n      \"ALTER TABLE %Q.'%q_content'  RENAME TO '%q_content';\",\n      p->zDb, p->zName, zName\n    );\n  }\n\n  if( p->bHasDocsize ){\n    fts3DbExec(&rc, db,\n      \"ALTER TABLE %Q.'%q_docsize'  RENAME TO '%q_docsize';\",\n      p->zDb, p->zName, zName\n    );\n  }\n  if( p->bHasStat ){\n    fts3DbExec(&rc, db,\n      \"ALTER TABLE %Q.'%q_stat'  RENAME TO '%q_stat';\",\n      p->zDb, p->zName, zName\n    );\n  }\n  fts3DbExec(&rc, db,\n    \"ALTER TABLE %Q.'%q_segments' RENAME TO '%q_segments';\",\n    p->zDb, p->zName, zName\n  );\n  fts3DbExec(&rc, db,\n    \"ALTER TABLE %Q.'%q_segdir'   RENAME TO '%q_segdir';\",\n    p->zDb, p->zName, zName\n  );\n\n  p->bIgnoreSavepoint = 0;\n  return rc;\n}\n\n/*\n** The xSavepoint() method.\n**\n** Flush the contents of the pending-terms table to disk.\n*/\nstatic int fts3SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  int rc = SQLITE_OK;\n  Fts3Table *pTab = (Fts3Table*)pVtab;\n  assert( pTab->inTransaction );\n  assert( pTab->mxSavepoint<=iSavepoint );\n  TESTONLY( pTab->mxSavepoint = iSavepoint );\n\n  if( pTab->bIgnoreSavepoint==0 ){\n    if( fts3HashCount(&pTab->aIndex[0].hPending)>0 ){\n      char *zSql = sqlite3_mprintf(\"INSERT INTO %Q.%Q(%Q) VALUES('flush')\",\n          pTab->zDb, pTab->zName, pTab->zName\n          );\n      if( zSql ){\n        pTab->bIgnoreSavepoint = 1;\n        rc = sqlite3_exec(pTab->db, zSql, 0, 0, 0);\n        pTab->bIgnoreSavepoint = 0;\n        sqlite3_free(zSql);\n      }else{\n        rc = SQLITE_NOMEM;\n      }\n    }\n    if( rc==SQLITE_OK ){\n      pTab->iSavepoint = iSavepoint+1;\n    }\n  }\n  return rc;\n}\n\n/*\n** The xRelease() method.\n**\n** This is a no-op.\n*/\nstatic int fts3ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  Fts3Table *pTab = (Fts3Table*)pVtab;\n  assert( pTab->inTransaction );\n  assert( pTab->mxSavepoint >= iSavepoint );\n  TESTONLY( pTab->mxSavepoint = iSavepoint-1 );\n  pTab->iSavepoint = iSavepoint;\n  return SQLITE_OK;\n}\n\n/*\n** The xRollbackTo() method.\n**\n** Discard the contents of the pending terms table.\n*/\nstatic int fts3RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  Fts3Table *pTab = (Fts3Table*)pVtab;\n  UNUSED_PARAMETER(iSavepoint);\n  assert( pTab->inTransaction );\n  TESTONLY( pTab->mxSavepoint = iSavepoint );\n  if( (iSavepoint+1)<=pTab->iSavepoint ){\n    sqlite3Fts3PendingTermsClear(pTab);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return true if zName is the extension on one of the shadow tables used\n** by this module.\n*/\nstatic int fts3ShadowName(const char *zName){\n  static const char *azName[] = {\n    \"content\", \"docsize\", \"segdir\", \"segments\", \"stat\",\n  };\n  unsigned int i;\n  for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){\n    if( sqlite3_stricmp(zName, azName[i])==0 ) return 1;\n  }\n  return 0;\n}\n\n/*\n** Implementation of the xIntegrity() method on the FTS3/FTS4 virtual\n** table.\n*/\nstatic int fts3IntegrityMethod(\n  sqlite3_vtab *pVtab,      /* The virtual table to be checked */\n  const char *zSchema,      /* Name of schema in which pVtab lives */\n  const char *zTabname,     /* Name of the pVTab table */\n  int isQuick,              /* True if this is a quick_check */\n  char **pzErr              /* Write error message here */\n){\n  Fts3Table *p = (Fts3Table*)pVtab;\n  int rc = SQLITE_OK;\n  int bOk = 0;\n\n  UNUSED_PARAMETER(isQuick);\n  rc = sqlite3Fts3IntegrityCheck(p, &bOk);\n  assert( rc!=SQLITE_CORRUPT_VTAB );\n  if( rc==SQLITE_ERROR || (rc&0xFF)==SQLITE_CORRUPT ){\n    *pzErr = sqlite3_mprintf(\"unable to validate the inverted index for\"\n                             \" FTS%d table %s.%s: %s\",\n                p->bFts4 ? 4 : 3, zSchema, zTabname, sqlite3_errstr(rc));\n    if( *pzErr ) rc = SQLITE_OK;\n  }else if( rc==SQLITE_OK && bOk==0 ){\n    *pzErr = sqlite3_mprintf(\"malformed inverted index for FTS%d table %s.%s\",\n                p->bFts4 ? 4 : 3, zSchema, zTabname);\n    if( *pzErr==0 ) rc = SQLITE_NOMEM;\n  }\n  sqlite3Fts3SegmentsClose(p);\n  return rc;\n}\n\n\n\nstatic const sqlite3_module fts3Module = {\n  /* iVersion      */ 4,\n  /* xCreate       */ fts3CreateMethod,\n  /* xConnect      */ fts3ConnectMethod,\n  /* xBestIndex    */ fts3BestIndexMethod,\n  /* xDisconnect   */ fts3DisconnectMethod,\n  /* xDestroy      */ fts3DestroyMethod,\n  /* xOpen         */ fts3OpenMethod,\n  /* xClose        */ fts3CloseMethod,\n  /* xFilter       */ fts3FilterMethod,\n  /* xNext         */ fts3NextMethod,\n  /* xEof          */ fts3EofMethod,\n  /* xColumn       */ fts3ColumnMethod,\n  /* xRowid        */ fts3RowidMethod,\n  /* xUpdate       */ fts3UpdateMethod,\n  /* xBegin        */ fts3BeginMethod,\n  /* xSync         */ fts3SyncMethod,\n  /* xCommit       */ fts3CommitMethod,\n  /* xRollback     */ fts3RollbackMethod,\n  /* xFindFunction */ fts3FindFunctionMethod,\n  /* xRename */       fts3RenameMethod,\n  /* xSavepoint    */ fts3SavepointMethod,\n  /* xRelease      */ fts3ReleaseMethod,\n  /* xRollbackTo   */ fts3RollbackToMethod,\n  /* xShadowName   */ fts3ShadowName,\n  /* xIntegrity    */ fts3IntegrityMethod,\n};\n\n/*\n** This function is registered as the module destructor (called when an\n** FTS3 enabled database connection is closed). It frees the memory\n** allocated for the tokenizer hash table.\n*/\nstatic void hashDestroy(void *p){\n  Fts3HashWrapper *pHash = (Fts3HashWrapper *)p;\n  pHash->nRef--;\n  if( pHash->nRef<=0 ){\n    sqlite3Fts3HashClear(&pHash->hash);\n    sqlite3_free(pHash);\n  }\n}\n\n/*\n** The fts3 built-in tokenizers - \"simple\", \"porter\" and \"icu\"- are\n** implemented in files fts3_tokenizer1.c, fts3_porter.c and fts3_icu.c\n** respectively. The following three forward declarations are for functions\n** declared in these files used to retrieve the respective implementations.\n**\n** Calling sqlite3Fts3SimpleTokenizerModule() sets the value pointed\n** to by the argument to point to the \"simple\" tokenizer implementation.\n** And so on.\n*/\nSQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);\nSQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\nSQLITE_PRIVATE void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const**ppModule);\n#endif\n#ifdef SQLITE_ENABLE_ICU\nSQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);\n#endif\n\n/*\n** Initialize the fts3 extension. If this extension is built as part\n** of the sqlite library, then this function is called directly by\n** SQLite. If fts3 is built as a dynamically loadable extension, this\n** function is called by the sqlite3_extension_init() entry point.\n*/\nSQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){\n  int rc = SQLITE_OK;\n  Fts3HashWrapper *pHash = 0;\n  const sqlite3_tokenizer_module *pSimple = 0;\n  const sqlite3_tokenizer_module *pPorter = 0;\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\n  const sqlite3_tokenizer_module *pUnicode = 0;\n#endif\n\n#ifdef SQLITE_ENABLE_ICU\n  const sqlite3_tokenizer_module *pIcu = 0;\n  sqlite3Fts3IcuTokenizerModule(&pIcu);\n#endif\n\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\n  sqlite3Fts3UnicodeTokenizer(&pUnicode);\n#endif\n\n#ifdef SQLITE_TEST\n  rc = sqlite3Fts3InitTerm(db);\n  if( rc!=SQLITE_OK ) return rc;\n#endif\n\n  rc = sqlite3Fts3InitAux(db);\n  if( rc!=SQLITE_OK ) return rc;\n\n  sqlite3Fts3SimpleTokenizerModule(&pSimple);\n  sqlite3Fts3PorterTokenizerModule(&pPorter);\n\n  /* Allocate and initialize the hash-table used to store tokenizers. */\n  pHash = sqlite3_malloc(sizeof(Fts3HashWrapper));\n  if( !pHash ){\n    rc = SQLITE_NOMEM;\n  }else{\n    sqlite3Fts3HashInit(&pHash->hash, FTS3_HASH_STRING, 1);\n    pHash->nRef = 0;\n  }\n\n  /* Load the built-in tokenizers into the hash table */\n  if( rc==SQLITE_OK ){\n    if( sqlite3Fts3HashInsert(&pHash->hash, \"simple\", 7, (void *)pSimple)\n     || sqlite3Fts3HashInsert(&pHash->hash, \"porter\", 7, (void *)pPorter)\n\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\n     || sqlite3Fts3HashInsert(&pHash->hash, \"unicode61\", 10, (void *)pUnicode)\n#endif\n#ifdef SQLITE_ENABLE_ICU\n     || (pIcu && sqlite3Fts3HashInsert(&pHash->hash, \"icu\", 4, (void *)pIcu))\n#endif\n    ){\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n#ifdef SQLITE_TEST\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts3ExprInitTestInterface(db, &pHash->hash);\n  }\n#endif\n\n  /* Create the virtual table wrapper around the hash-table and overload\n  ** the four scalar functions. If this is successful, register the\n  ** module with sqlite.\n  */\n  if( SQLITE_OK==rc\n   && SQLITE_OK==(rc=sqlite3Fts3InitHashTable(db,&pHash->hash,\"fts3_tokenizer\"))\n   && SQLITE_OK==(rc = sqlite3_overload_function(db, \"snippet\", -1))\n   && SQLITE_OK==(rc = sqlite3_overload_function(db, \"offsets\", 1))\n   && SQLITE_OK==(rc = sqlite3_overload_function(db, \"matchinfo\", 1))\n   && SQLITE_OK==(rc = sqlite3_overload_function(db, \"matchinfo\", 2))\n   && SQLITE_OK==(rc = sqlite3_overload_function(db, \"optimize\", 1))\n  ){\n    pHash->nRef++;\n    rc = sqlite3_create_module_v2(\n        db, \"fts3\", &fts3Module, (void *)pHash, hashDestroy\n    );\n    if( rc==SQLITE_OK ){\n      pHash->nRef++;\n      rc = sqlite3_create_module_v2(\n          db, \"fts4\", &fts3Module, (void *)pHash, hashDestroy\n      );\n    }\n    if( rc==SQLITE_OK ){\n      pHash->nRef++;\n      rc = sqlite3Fts3InitTok(db, (void *)pHash, hashDestroy);\n    }\n    return rc;\n  }\n\n\n  /* An error has occurred. Delete the hash table and return the error code. */\n  assert( rc!=SQLITE_OK );\n  if( pHash ){\n    sqlite3Fts3HashClear(&pHash->hash);\n    sqlite3_free(pHash);\n  }\n  return rc;\n}\n\n/*\n** Allocate an Fts3MultiSegReader for each token in the expression headed\n** by pExpr.\n**\n** An Fts3SegReader object is a cursor that can seek or scan a range of\n** entries within a single segment b-tree. An Fts3MultiSegReader uses multiple\n** Fts3SegReader objects internally to provide an interface to seek or scan\n** within the union of all segments of a b-tree. Hence the name.\n**\n** If the allocated Fts3MultiSegReader just seeks to a single entry in a\n** segment b-tree (if the term is not a prefix or it is a prefix for which\n** there exists prefix b-tree of the right length) then it may be traversed\n** and merged incrementally. Otherwise, it has to be merged into an in-memory\n** doclist and then traversed.\n*/\nstatic void fts3EvalAllocateReaders(\n  Fts3Cursor *pCsr,               /* FTS cursor handle */\n  Fts3Expr *pExpr,                /* Allocate readers for this expression */\n  int *pnToken,                   /* OUT: Total number of tokens in phrase. */\n  int *pnOr,                      /* OUT: Total number of OR nodes in expr. */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  if( pExpr && SQLITE_OK==*pRc ){\n    if( pExpr->eType==FTSQUERY_PHRASE ){\n      int i;\n      int nToken = pExpr->pPhrase->nToken;\n      *pnToken += nToken;\n      for(i=0; i<nToken; i++){\n        Fts3PhraseToken *pToken = &pExpr->pPhrase->aToken[i];\n        int rc = fts3TermSegReaderCursor(pCsr,\n            pToken->z, pToken->n, pToken->isPrefix, &pToken->pSegcsr\n        );\n        if( rc!=SQLITE_OK ){\n          *pRc = rc;\n          return;\n        }\n      }\n      assert( pExpr->pPhrase->iDoclistToken==0 );\n      pExpr->pPhrase->iDoclistToken = -1;\n    }else{\n      *pnOr += (pExpr->eType==FTSQUERY_OR);\n      fts3EvalAllocateReaders(pCsr, pExpr->pLeft, pnToken, pnOr, pRc);\n      fts3EvalAllocateReaders(pCsr, pExpr->pRight, pnToken, pnOr, pRc);\n    }\n  }\n}\n\n/*\n** Arguments pList/nList contain the doclist for token iToken of phrase p.\n** It is merged into the main doclist stored in p->doclist.aAll/nAll.\n**\n** This function assumes that pList points to a buffer allocated using\n** sqlite3_malloc(). This function takes responsibility for eventually\n** freeing the buffer.\n**\n** SQLITE_OK is returned if successful, or SQLITE_NOMEM if an error occurs.\n*/\nstatic int fts3EvalPhraseMergeToken(\n  Fts3Table *pTab,                /* FTS Table pointer */\n  Fts3Phrase *p,                  /* Phrase to merge pList/nList into */\n  int iToken,                     /* Token pList/nList corresponds to */\n  char *pList,                    /* Pointer to doclist */\n  int nList                       /* Number of bytes in pList */\n){\n  int rc = SQLITE_OK;\n  assert( iToken!=p->iDoclistToken );\n\n  if( pList==0 ){\n    sqlite3_free(p->doclist.aAll);\n    p->doclist.aAll = 0;\n    p->doclist.nAll = 0;\n  }\n\n  else if( p->iDoclistToken<0 ){\n    p->doclist.aAll = pList;\n    p->doclist.nAll = nList;\n  }\n\n  else if( p->doclist.aAll==0 ){\n    sqlite3_free(pList);\n  }\n\n  else {\n    char *pLeft;\n    char *pRight;\n    int nLeft;\n    int nRight;\n    int nDiff;\n\n    if( p->iDoclistToken<iToken ){\n      pLeft = p->doclist.aAll;\n      nLeft = p->doclist.nAll;\n      pRight = pList;\n      nRight = nList;\n      nDiff = iToken - p->iDoclistToken;\n    }else{\n      pRight = p->doclist.aAll;\n      nRight = p->doclist.nAll;\n      pLeft = pList;\n      nLeft = nList;\n      nDiff = p->iDoclistToken - iToken;\n    }\n\n    rc = fts3DoclistPhraseMerge(\n        pTab->bDescIdx, nDiff, pLeft, nLeft, &pRight, &nRight\n    );\n    sqlite3_free(pLeft);\n    p->doclist.aAll = pRight;\n    p->doclist.nAll = nRight;\n  }\n\n  if( iToken>p->iDoclistToken ) p->iDoclistToken = iToken;\n  return rc;\n}\n\n/*\n** Load the doclist for phrase p into p->doclist.aAll/nAll. The loaded doclist\n** does not take deferred tokens into account.\n**\n** SQLITE_OK is returned if no error occurs, otherwise an SQLite error code.\n*/\nstatic int fts3EvalPhraseLoad(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Phrase *p                   /* Phrase object */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int iToken;\n  int rc = SQLITE_OK;\n\n  for(iToken=0; rc==SQLITE_OK && iToken<p->nToken; iToken++){\n    Fts3PhraseToken *pToken = &p->aToken[iToken];\n    assert( pToken->pDeferred==0 || pToken->pSegcsr==0 );\n\n    if( pToken->pSegcsr ){\n      int nThis = 0;\n      char *pThis = 0;\n      rc = fts3TermSelect(pTab, pToken, p->iColumn, &nThis, &pThis);\n      if( rc==SQLITE_OK ){\n        rc = fts3EvalPhraseMergeToken(pTab, p, iToken, pThis, nThis);\n      }\n    }\n    assert( pToken->pSegcsr==0 );\n  }\n\n  return rc;\n}\n\n#ifndef SQLITE_DISABLE_FTS4_DEFERRED\n/*\n** This function is called on each phrase after the position lists for\n** any deferred tokens have been loaded into memory. It updates the phrases\n** current position list to include only those positions that are really\n** instances of the phrase (after considering deferred tokens). If this\n** means that the phrase does not appear in the current row, doclist.pList\n** and doclist.nList are both zeroed.\n**\n** SQLITE_OK is returned if no error occurs, otherwise an SQLite error code.\n*/\nstatic int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){\n  int iToken;                     /* Used to iterate through phrase tokens */\n  char *aPoslist = 0;             /* Position list for deferred tokens */\n  int nPoslist = 0;               /* Number of bytes in aPoslist */\n  int iPrev = -1;                 /* Token number of previous deferred token */\n  char *aFree = (pPhrase->doclist.bFreeList ? pPhrase->doclist.pList : 0);\n\n  for(iToken=0; iToken<pPhrase->nToken; iToken++){\n    Fts3PhraseToken *pToken = &pPhrase->aToken[iToken];\n    Fts3DeferredToken *pDeferred = pToken->pDeferred;\n\n    if( pDeferred ){\n      char *pList;\n      int nList;\n      int rc = sqlite3Fts3DeferredTokenList(pDeferred, &pList, &nList);\n      if( rc!=SQLITE_OK ) return rc;\n\n      if( pList==0 ){\n        sqlite3_free(aPoslist);\n        sqlite3_free(aFree);\n        pPhrase->doclist.pList = 0;\n        pPhrase->doclist.nList = 0;\n        return SQLITE_OK;\n\n      }else if( aPoslist==0 ){\n        aPoslist = pList;\n        nPoslist = nList;\n\n      }else{\n        char *aOut = pList;\n        char *p1 = aPoslist;\n        char *p2 = aOut;\n\n        assert( iPrev>=0 );\n        fts3PoslistPhraseMerge(&aOut, iToken-iPrev, 0, 1, &p1, &p2);\n        sqlite3_free(aPoslist);\n        aPoslist = pList;\n        nPoslist = (int)(aOut - aPoslist);\n        if( nPoslist==0 ){\n          sqlite3_free(aPoslist);\n          sqlite3_free(aFree);\n          pPhrase->doclist.pList = 0;\n          pPhrase->doclist.nList = 0;\n          return SQLITE_OK;\n        }\n      }\n      iPrev = iToken;\n    }\n  }\n\n  if( iPrev>=0 ){\n    int nMaxUndeferred = pPhrase->iDoclistToken;\n    if( nMaxUndeferred<0 ){\n      pPhrase->doclist.pList = aPoslist;\n      pPhrase->doclist.nList = nPoslist;\n      pPhrase->doclist.iDocid = pCsr->iPrevId;\n      pPhrase->doclist.bFreeList = 1;\n    }else{\n      int nDistance;\n      char *p1;\n      char *p2;\n      char *aOut;\n\n      if( nMaxUndeferred>iPrev ){\n        p1 = aPoslist;\n        p2 = pPhrase->doclist.pList;\n        nDistance = nMaxUndeferred - iPrev;\n      }else{\n        p1 = pPhrase->doclist.pList;\n        p2 = aPoslist;\n        nDistance = iPrev - nMaxUndeferred;\n      }\n\n      aOut = (char *)sqlite3Fts3MallocZero(((i64)nPoslist)+FTS3_BUFFER_PADDING);\n      if( !aOut ){\n        sqlite3_free(aPoslist);\n        return SQLITE_NOMEM;\n      }\n\n      pPhrase->doclist.pList = aOut;\n      assert( p1 && p2 );\n      if( fts3PoslistPhraseMerge(&aOut, nDistance, 0, 1, &p1, &p2) ){\n        pPhrase->doclist.bFreeList = 1;\n        pPhrase->doclist.nList = (int)(aOut - pPhrase->doclist.pList);\n      }else{\n        sqlite3_free(aOut);\n        pPhrase->doclist.pList = 0;\n        pPhrase->doclist.nList = 0;\n      }\n      sqlite3_free(aPoslist);\n    }\n  }\n\n  if( pPhrase->doclist.pList!=aFree ) sqlite3_free(aFree);\n  return SQLITE_OK;\n}\n#endif /* SQLITE_DISABLE_FTS4_DEFERRED */\n\n/*\n** Maximum number of tokens a phrase may have to be considered for the\n** incremental doclists strategy.\n*/\n#define MAX_INCR_PHRASE_TOKENS 4\n\n/*\n** This function is called for each Fts3Phrase in a full-text query\n** expression to initialize the mechanism for returning rows. Once this\n** function has been called successfully on an Fts3Phrase, it may be\n** used with fts3EvalPhraseNext() to iterate through the matching docids.\n**\n** If parameter bOptOk is true, then the phrase may (or may not) use the\n** incremental loading strategy. Otherwise, the entire doclist is loaded into\n** memory within this call.\n**\n** SQLITE_OK is returned if no error occurs, otherwise an SQLite error code.\n*/\nstatic int fts3EvalPhraseStart(Fts3Cursor *pCsr, int bOptOk, Fts3Phrase *p){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc = SQLITE_OK;             /* Error code */\n  int i;\n\n  /* Determine if doclists may be loaded from disk incrementally. This is\n  ** possible if the bOptOk argument is true, the FTS doclists will be\n  ** scanned in forward order, and the phrase consists of\n  ** MAX_INCR_PHRASE_TOKENS or fewer tokens, none of which are are \"^first\"\n  ** tokens or prefix tokens that cannot use a prefix-index.  */\n  int bHaveIncr = 0;\n  int bIncrOk = (bOptOk\n   && pCsr->bDesc==pTab->bDescIdx\n   && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n   && pTab->bNoIncrDoclist==0\n#endif\n  );\n  for(i=0; bIncrOk==1 && i<p->nToken; i++){\n    Fts3PhraseToken *pToken = &p->aToken[i];\n    if( pToken->bFirst || (pToken->pSegcsr!=0 && !pToken->pSegcsr->bLookup) ){\n      bIncrOk = 0;\n    }\n    if( pToken->pSegcsr ) bHaveIncr = 1;\n  }\n\n  if( bIncrOk && bHaveIncr ){\n    /* Use the incremental approach. */\n    int iCol = (p->iColumn >= pTab->nColumn ? -1 : p->iColumn);\n    for(i=0; rc==SQLITE_OK && i<p->nToken; i++){\n      Fts3PhraseToken *pToken = &p->aToken[i];\n      Fts3MultiSegReader *pSegcsr = pToken->pSegcsr;\n      if( pSegcsr ){\n        rc = sqlite3Fts3MsrIncrStart(pTab, pSegcsr, iCol, pToken->z, pToken->n);\n      }\n    }\n    p->bIncr = 1;\n  }else{\n    /* Load the full doclist for the phrase into memory. */\n    rc = fts3EvalPhraseLoad(pCsr, p);\n    p->bIncr = 0;\n  }\n\n  assert( rc!=SQLITE_OK || p->nToken<1 || p->aToken[0].pSegcsr==0 || p->bIncr );\n  return rc;\n}\n\n/*\n** This function is used to iterate backwards (from the end to start)\n** through doclists. It is used by this module to iterate through phrase\n** doclists in reverse and by the fts3_write.c module to iterate through\n** pending-terms lists when writing to databases with \"order=desc\".\n**\n** The doclist may be sorted in ascending (parameter bDescIdx==0) or\n** descending (parameter bDescIdx==1) order of docid. Regardless, this\n** function iterates from the end of the doclist to the beginning.\n*/\nSQLITE_PRIVATE void sqlite3Fts3DoclistPrev(\n  int bDescIdx,                   /* True if the doclist is desc */\n  char *aDoclist,                 /* Pointer to entire doclist */\n  int nDoclist,                   /* Length of aDoclist in bytes */\n  char **ppIter,                  /* IN/OUT: Iterator pointer */\n  sqlite3_int64 *piDocid,         /* IN/OUT: Docid pointer */\n  int *pnList,                    /* OUT: List length pointer */\n  u8 *pbEof                       /* OUT: End-of-file flag */\n){\n  char *p = *ppIter;\n\n  assert( nDoclist>0 );\n  assert( *pbEof==0 );\n  assert_fts3_nc( p || *piDocid==0 );\n  assert( !p || (p>aDoclist && p<&aDoclist[nDoclist]) );\n\n  if( p==0 ){\n    sqlite3_int64 iDocid = 0;\n    char *pNext = 0;\n    char *pDocid = aDoclist;\n    char *pEnd = &aDoclist[nDoclist];\n    int iMul = 1;\n\n    while( pDocid<pEnd ){\n      sqlite3_int64 iDelta;\n      pDocid += sqlite3Fts3GetVarint(pDocid, &iDelta);\n      iDocid += (iMul * iDelta);\n      pNext = pDocid;\n      fts3PoslistCopy(0, &pDocid);\n      while( pDocid<pEnd && *pDocid==0 ) pDocid++;\n      iMul = (bDescIdx ? -1 : 1);\n    }\n\n    *pnList = (int)(pEnd - pNext);\n    *ppIter = pNext;\n    *piDocid = iDocid;\n  }else{\n    int iMul = (bDescIdx ? -1 : 1);\n    sqlite3_int64 iDelta;\n    fts3GetReverseVarint(&p, aDoclist, &iDelta);\n    *piDocid -= (iMul * iDelta);\n\n    if( p==aDoclist ){\n      *pbEof = 1;\n    }else{\n      char *pSave = p;\n      fts3ReversePoslist(aDoclist, &p);\n      *pnList = (int)(pSave - p);\n    }\n    *ppIter = p;\n  }\n}\n\n/*\n** Iterate forwards through a doclist.\n*/\nSQLITE_PRIVATE void sqlite3Fts3DoclistNext(\n  int bDescIdx,                   /* True if the doclist is desc */\n  char *aDoclist,                 /* Pointer to entire doclist */\n  int nDoclist,                   /* Length of aDoclist in bytes */\n  char **ppIter,                  /* IN/OUT: Iterator pointer */\n  sqlite3_int64 *piDocid,         /* IN/OUT: Docid pointer */\n  u8 *pbEof                       /* OUT: End-of-file flag */\n){\n  char *p = *ppIter;\n\n  assert( nDoclist>0 );\n  assert( *pbEof==0 );\n  assert_fts3_nc( p || *piDocid==0 );\n  assert( !p || (p>=aDoclist && p<=&aDoclist[nDoclist]) );\n\n  if( p==0 ){\n    p = aDoclist;\n    p += sqlite3Fts3GetVarint(p, piDocid);\n  }else{\n    fts3PoslistCopy(0, &p);\n    while( p<&aDoclist[nDoclist] && *p==0 ) p++;\n    if( p>=&aDoclist[nDoclist] ){\n      *pbEof = 1;\n    }else{\n      sqlite3_int64 iVar;\n      p += sqlite3Fts3GetVarint(p, &iVar);\n      *piDocid += ((bDescIdx ? -1 : 1) * iVar);\n    }\n  }\n\n  *ppIter = p;\n}\n\n/*\n** Advance the iterator pDL to the next entry in pDL->aAll/nAll. Set *pbEof\n** to true if EOF is reached.\n*/\nstatic void fts3EvalDlPhraseNext(\n  Fts3Table *pTab,\n  Fts3Doclist *pDL,\n  u8 *pbEof\n){\n  char *pIter;                            /* Used to iterate through aAll */\n  char *pEnd;                             /* 1 byte past end of aAll */\n\n  if( pDL->pNextDocid ){\n    pIter = pDL->pNextDocid;\n    assert( pDL->aAll!=0 || pIter==0 );\n  }else{\n    pIter = pDL->aAll;\n  }\n\n  if( pIter==0 || pIter>=(pEnd = pDL->aAll + pDL->nAll) ){\n    /* We have already reached the end of this doclist. EOF. */\n    *pbEof = 1;\n  }else{\n    sqlite3_int64 iDelta;\n    pIter += sqlite3Fts3GetVarint(pIter, &iDelta);\n    if( pTab->bDescIdx==0 || pDL->pNextDocid==0 ){\n      pDL->iDocid += iDelta;\n    }else{\n      pDL->iDocid -= iDelta;\n    }\n    pDL->pList = pIter;\n    fts3PoslistCopy(0, &pIter);\n    pDL->nList = (int)(pIter - pDL->pList);\n\n    /* pIter now points just past the 0x00 that terminates the position-\n    ** list for document pDL->iDocid. However, if this position-list was\n    ** edited in place by fts3EvalNearTrim(), then pIter may not actually\n    ** point to the start of the next docid value. The following line deals\n    ** with this case by advancing pIter past the zero-padding added by\n    ** fts3EvalNearTrim().  */\n    while( pIter<pEnd && *pIter==0 ) pIter++;\n\n    pDL->pNextDocid = pIter;\n    assert( pIter>=&pDL->aAll[pDL->nAll] || *pIter );\n    *pbEof = 0;\n  }\n}\n\n/*\n** Helper type used by fts3EvalIncrPhraseNext() and incrPhraseTokenNext().\n*/\ntypedef struct TokenDoclist TokenDoclist;\nstruct TokenDoclist {\n  int bIgnore;\n  sqlite3_int64 iDocid;\n  char *pList;\n  int nList;\n};\n\n/*\n** Token pToken is an incrementally loaded token that is part of a\n** multi-token phrase. Advance it to the next matching document in the\n** database and populate output variable *p with the details of the new\n** entry. Or, if the iterator has reached EOF, set *pbEof to true.\n**\n** If an error occurs, return an SQLite error code. Otherwise, return\n** SQLITE_OK.\n*/\nstatic int incrPhraseTokenNext(\n  Fts3Table *pTab,                /* Virtual table handle */\n  Fts3Phrase *pPhrase,            /* Phrase to advance token of */\n  int iToken,                     /* Specific token to advance */\n  TokenDoclist *p,                /* OUT: Docid and doclist for new entry */\n  u8 *pbEof                       /* OUT: True if iterator is at EOF */\n){\n  int rc = SQLITE_OK;\n\n  if( pPhrase->iDoclistToken==iToken ){\n    assert( p->bIgnore==0 );\n    assert( pPhrase->aToken[iToken].pSegcsr==0 );\n    fts3EvalDlPhraseNext(pTab, &pPhrase->doclist, pbEof);\n    p->pList = pPhrase->doclist.pList;\n    p->nList = pPhrase->doclist.nList;\n    p->iDocid = pPhrase->doclist.iDocid;\n  }else{\n    Fts3PhraseToken *pToken = &pPhrase->aToken[iToken];\n    assert( pToken->pDeferred==0 );\n    assert( pToken->pSegcsr || pPhrase->iDoclistToken>=0 );\n    if( pToken->pSegcsr ){\n      assert( p->bIgnore==0 );\n      rc = sqlite3Fts3MsrIncrNext(\n          pTab, pToken->pSegcsr, &p->iDocid, &p->pList, &p->nList\n      );\n      if( p->pList==0 ) *pbEof = 1;\n    }else{\n      p->bIgnore = 1;\n    }\n  }\n\n  return rc;\n}\n\n\n/*\n** The phrase iterator passed as the second argument:\n**\n**   * features at least one token that uses an incremental doclist, and\n**\n**   * does not contain any deferred tokens.\n**\n** Advance it to the next matching document in the database and populate\n** the Fts3Doclist.pList and nList fields.\n**\n** If there is no \"next\" entry and no error occurs, then *pbEof is set to\n** 1 before returning. Otherwise, if no error occurs and the iterator is\n** successfully advanced, *pbEof is set to 0.\n**\n** If an error occurs, return an SQLite error code. Otherwise, return\n** SQLITE_OK.\n*/\nstatic int fts3EvalIncrPhraseNext(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Phrase *p,                  /* Phrase object to advance to next docid */\n  u8 *pbEof                       /* OUT: Set to 1 if EOF */\n){\n  int rc = SQLITE_OK;\n  Fts3Doclist *pDL = &p->doclist;\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  u8 bEof = 0;\n\n  /* This is only called if it is guaranteed that the phrase has at least\n  ** one incremental token. In which case the bIncr flag is set. */\n  assert( p->bIncr==1 );\n\n  if( p->nToken==1 ){\n    rc = sqlite3Fts3MsrIncrNext(pTab, p->aToken[0].pSegcsr,\n        &pDL->iDocid, &pDL->pList, &pDL->nList\n    );\n    if( pDL->pList==0 ) bEof = 1;\n  }else{\n    int bDescDoclist = pCsr->bDesc;\n    struct TokenDoclist a[MAX_INCR_PHRASE_TOKENS];\n\n    memset(a, 0, sizeof(a));\n    assert( p->nToken<=MAX_INCR_PHRASE_TOKENS );\n    assert( p->iDoclistToken<MAX_INCR_PHRASE_TOKENS );\n\n    while( bEof==0 ){\n      int bMaxSet = 0;\n      sqlite3_int64 iMax = 0;     /* Largest docid for all iterators */\n      int i;                      /* Used to iterate through tokens */\n\n      /* Advance the iterator for each token in the phrase once. */\n      for(i=0; rc==SQLITE_OK && i<p->nToken && bEof==0; i++){\n        rc = incrPhraseTokenNext(pTab, p, i, &a[i], &bEof);\n        if( a[i].bIgnore==0 && (bMaxSet==0 || DOCID_CMP(iMax, a[i].iDocid)<0) ){\n          iMax = a[i].iDocid;\n          bMaxSet = 1;\n        }\n      }\n      assert( rc!=SQLITE_OK || (p->nToken>=1 && a[p->nToken-1].bIgnore==0) );\n      assert( rc!=SQLITE_OK || bMaxSet );\n\n      /* Keep advancing iterators until they all point to the same document */\n      for(i=0; i<p->nToken; i++){\n        while( rc==SQLITE_OK && bEof==0\n            && a[i].bIgnore==0 && DOCID_CMP(a[i].iDocid, iMax)<0\n        ){\n          rc = incrPhraseTokenNext(pTab, p, i, &a[i], &bEof);\n          if( DOCID_CMP(a[i].iDocid, iMax)>0 ){\n            iMax = a[i].iDocid;\n            i = 0;\n          }\n        }\n      }\n\n      /* Check if the current entries really are a phrase match */\n      if( bEof==0 ){\n        int nList = 0;\n        int nByte = a[p->nToken-1].nList;\n        char *aDoclist = sqlite3_malloc64((i64)nByte+FTS3_BUFFER_PADDING);\n        if( !aDoclist ) return SQLITE_NOMEM;\n        memcpy(aDoclist, a[p->nToken-1].pList, nByte+1);\n        memset(&aDoclist[nByte], 0, FTS3_BUFFER_PADDING);\n\n        for(i=0; i<(p->nToken-1); i++){\n          if( a[i].bIgnore==0 ){\n            char *pL = a[i].pList;\n            char *pR = aDoclist;\n            char *pOut = aDoclist;\n            int nDist = p->nToken-1-i;\n            int res = fts3PoslistPhraseMerge(&pOut, nDist, 0, 1, &pL, &pR);\n            if( res==0 ) break;\n            nList = (int)(pOut - aDoclist);\n          }\n        }\n        if( i==(p->nToken-1) ){\n          pDL->iDocid = iMax;\n          pDL->pList = aDoclist;\n          pDL->nList = nList;\n          pDL->bFreeList = 1;\n          break;\n        }\n        sqlite3_free(aDoclist);\n      }\n    }\n  }\n\n  *pbEof = bEof;\n  return rc;\n}\n\n/*\n** Attempt to move the phrase iterator to point to the next matching docid.\n** If an error occurs, return an SQLite error code. Otherwise, return\n** SQLITE_OK.\n**\n** If there is no \"next\" entry and no error occurs, then *pbEof is set to\n** 1 before returning. Otherwise, if no error occurs and the iterator is\n** successfully advanced, *pbEof is set to 0.\n*/\nstatic int fts3EvalPhraseNext(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Phrase *p,                  /* Phrase object to advance to next docid */\n  u8 *pbEof                       /* OUT: Set to 1 if EOF */\n){\n  int rc = SQLITE_OK;\n  Fts3Doclist *pDL = &p->doclist;\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n\n  if( p->bIncr ){\n    rc = fts3EvalIncrPhraseNext(pCsr, p, pbEof);\n  }else if( pCsr->bDesc!=pTab->bDescIdx && pDL->nAll ){\n    sqlite3Fts3DoclistPrev(pTab->bDescIdx, pDL->aAll, pDL->nAll,\n        &pDL->pNextDocid, &pDL->iDocid, &pDL->nList, pbEof\n    );\n    pDL->pList = pDL->pNextDocid;\n  }else{\n    fts3EvalDlPhraseNext(pTab, pDL, pbEof);\n  }\n\n  return rc;\n}\n\n/*\n**\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op.\n** Otherwise, fts3EvalPhraseStart() is called on all phrases within the\n** expression. Also the Fts3Expr.bDeferred variable is set to true for any\n** expressions for which all descendent tokens are deferred.\n**\n** If parameter bOptOk is zero, then it is guaranteed that the\n** Fts3Phrase.doclist.aAll/nAll variables contain the entire doclist for\n** each phrase in the expression (subject to deferred token processing).\n** Or, if bOptOk is non-zero, then one or more tokens within the expression\n** may be loaded incrementally, meaning doclist.aAll/nAll is not available.\n**\n** If an error occurs within this function, *pRc is set to an SQLite error\n** code before returning.\n*/\nstatic void fts3EvalStartReaders(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Expr *pExpr,                /* Expression to initialize phrases in */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  if( pExpr && SQLITE_OK==*pRc ){\n    if( pExpr->eType==FTSQUERY_PHRASE ){\n      int nToken = pExpr->pPhrase->nToken;\n      if( nToken ){\n        int i;\n        for(i=0; i<nToken; i++){\n          if( pExpr->pPhrase->aToken[i].pDeferred==0 ) break;\n        }\n        pExpr->bDeferred = (i==nToken);\n      }\n      *pRc = fts3EvalPhraseStart(pCsr, 1, pExpr->pPhrase);\n    }else{\n      fts3EvalStartReaders(pCsr, pExpr->pLeft, pRc);\n      fts3EvalStartReaders(pCsr, pExpr->pRight, pRc);\n      pExpr->bDeferred = (pExpr->pLeft->bDeferred && pExpr->pRight->bDeferred);\n    }\n  }\n}\n\n/*\n** An array of the following structures is assembled as part of the process\n** of selecting tokens to defer before the query starts executing (as part\n** of the xFilter() method). There is one element in the array for each\n** token in the FTS expression.\n**\n** Tokens are divided into AND/NEAR clusters. All tokens in a cluster belong\n** to phrases that are connected only by AND and NEAR operators (not OR or\n** NOT). When determining tokens to defer, each AND/NEAR cluster is considered\n** separately. The root of a tokens AND/NEAR cluster is stored in\n** Fts3TokenAndCost.pRoot.\n*/\ntypedef struct Fts3TokenAndCost Fts3TokenAndCost;\nstruct Fts3TokenAndCost {\n  Fts3Phrase *pPhrase;            /* The phrase the token belongs to */\n  int iToken;                     /* Position of token in phrase */\n  Fts3PhraseToken *pToken;        /* The token itself */\n  Fts3Expr *pRoot;                /* Root of NEAR/AND cluster */\n  int nOvfl;                      /* Number of overflow pages to load doclist */\n  int iCol;                       /* The column the token must match */\n};\n\n/*\n** This function is used to populate an allocated Fts3TokenAndCost array.\n**\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op.\n** Otherwise, if an error occurs during execution, *pRc is set to an\n** SQLite error code.\n*/\nstatic void fts3EvalTokenCosts(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Expr *pRoot,                /* Root of current AND/NEAR cluster */\n  Fts3Expr *pExpr,                /* Expression to consider */\n  Fts3TokenAndCost **ppTC,        /* Write new entries to *(*ppTC)++ */\n  Fts3Expr ***ppOr,               /* Write new OR root to *(*ppOr)++ */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  if( *pRc==SQLITE_OK ){\n    if( pExpr->eType==FTSQUERY_PHRASE ){\n      Fts3Phrase *pPhrase = pExpr->pPhrase;\n      int i;\n      for(i=0; *pRc==SQLITE_OK && i<pPhrase->nToken; i++){\n        Fts3TokenAndCost *pTC = (*ppTC)++;\n        pTC->pPhrase = pPhrase;\n        pTC->iToken = i;\n        pTC->pRoot = pRoot;\n        pTC->pToken = &pPhrase->aToken[i];\n        pTC->iCol = pPhrase->iColumn;\n        *pRc = sqlite3Fts3MsrOvfl(pCsr, pTC->pToken->pSegcsr, &pTC->nOvfl);\n      }\n    }else if( pExpr->eType!=FTSQUERY_NOT ){\n      assert( pExpr->eType==FTSQUERY_OR\n           || pExpr->eType==FTSQUERY_AND\n           || pExpr->eType==FTSQUERY_NEAR\n      );\n      assert( pExpr->pLeft && pExpr->pRight );\n      if( pExpr->eType==FTSQUERY_OR ){\n        pRoot = pExpr->pLeft;\n        **ppOr = pRoot;\n        (*ppOr)++;\n      }\n      fts3EvalTokenCosts(pCsr, pRoot, pExpr->pLeft, ppTC, ppOr, pRc);\n      if( pExpr->eType==FTSQUERY_OR ){\n        pRoot = pExpr->pRight;\n        **ppOr = pRoot;\n        (*ppOr)++;\n      }\n      fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);\n    }\n  }\n}\n\n/*\n** Determine the average document (row) size in pages. If successful,\n** write this value to *pnPage and return SQLITE_OK. Otherwise, return\n** an SQLite error code.\n**\n** The average document size in pages is calculated by first calculating\n** determining the average size in bytes, B. If B is less than the amount\n** of data that will fit on a single leaf page of an intkey table in\n** this database, then the average docsize is 1. Otherwise, it is 1 plus\n** the number of overflow pages consumed by a record B bytes in size.\n*/\nstatic int fts3EvalAverageDocsize(Fts3Cursor *pCsr, int *pnPage){\n  int rc = SQLITE_OK;\n  if( pCsr->nRowAvg==0 ){\n    /* The average document size, which is required to calculate the cost\n    ** of each doclist, has not yet been determined. Read the required\n    ** data from the %_stat table to calculate it.\n    **\n    ** Entry 0 of the %_stat table is a blob containing (nCol+1) FTS3\n    ** varints, where nCol is the number of columns in the FTS3 table.\n    ** The first varint is the number of documents currently stored in\n    ** the table. The following nCol varints contain the total amount of\n    ** data stored in all rows of each column of the table, from left\n    ** to right.\n    */\n    Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;\n    sqlite3_stmt *pStmt;\n    sqlite3_int64 nDoc = 0;\n    sqlite3_int64 nByte = 0;\n    const char *pEnd;\n    const char *a;\n\n    rc = sqlite3Fts3SelectDoctotal(p, &pStmt);\n    if( rc!=SQLITE_OK ) return rc;\n    a = sqlite3_column_blob(pStmt, 0);\n    testcase( a==0 );  /* If %_stat.value set to X'' */\n    if( a ){\n      pEnd = &a[sqlite3_column_bytes(pStmt, 0)];\n      a += sqlite3Fts3GetVarintBounded(a, pEnd, &nDoc);\n      while( a<pEnd ){\n        a += sqlite3Fts3GetVarintBounded(a, pEnd, &nByte);\n      }\n    }\n    if( nDoc==0 || nByte==0 ){\n      sqlite3_reset(pStmt);\n      return FTS_CORRUPT_VTAB;\n    }\n\n    pCsr->nDoc = nDoc;\n    pCsr->nRowAvg = (int)(((nByte / nDoc) + p->nPgsz) / p->nPgsz);\n    assert( pCsr->nRowAvg>0 );\n    rc = sqlite3_reset(pStmt);\n  }\n\n  *pnPage = pCsr->nRowAvg;\n  return rc;\n}\n\n/*\n** This function is called to select the tokens (if any) that will be\n** deferred. The array aTC[] has already been populated when this is\n** called.\n**\n** This function is called once for each AND/NEAR cluster in the\n** expression. Each invocation determines which tokens to defer within\n** the cluster with root node pRoot. See comments above the definition\n** of struct Fts3TokenAndCost for more details.\n**\n** If no error occurs, SQLITE_OK is returned and sqlite3Fts3DeferToken()\n** called on each token to defer. Otherwise, an SQLite error code is\n** returned.\n*/\nstatic int fts3EvalSelectDeferred(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Expr *pRoot,                /* Consider tokens with this root node */\n  Fts3TokenAndCost *aTC,          /* Array of expression tokens and costs */\n  int nTC                         /* Number of entries in aTC[] */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int nDocSize = 0;               /* Number of pages per doc loaded */\n  int rc = SQLITE_OK;             /* Return code */\n  int ii;                         /* Iterator variable for various purposes */\n  int nOvfl = 0;                  /* Total overflow pages used by doclists */\n  int nToken = 0;                 /* Total number of tokens in cluster */\n\n  int nMinEst = 0;                /* The minimum count for any phrase so far. */\n  int nLoad4 = 1;                 /* (Phrases that will be loaded)^4. */\n\n  /* Tokens are never deferred for FTS tables created using the content=xxx\n  ** option. The reason being that it is not guaranteed that the content\n  ** table actually contains the same data as the index. To prevent this from\n  ** causing any problems, the deferred token optimization is completely\n  ** disabled for content=xxx tables. */\n  if( pTab->zContentTbl ){\n    return SQLITE_OK;\n  }\n\n  /* Count the tokens in this AND/NEAR cluster. If none of the doclists\n  ** associated with the tokens spill onto overflow pages, or if there is\n  ** only 1 token, exit early. No tokens to defer in this case. */\n  for(ii=0; ii<nTC; ii++){\n    if( aTC[ii].pRoot==pRoot ){\n      nOvfl += aTC[ii].nOvfl;\n      nToken++;\n    }\n  }\n  if( nOvfl==0 || nToken<2 ) return SQLITE_OK;\n\n  /* Obtain the average docsize (in pages). */\n  rc = fts3EvalAverageDocsize(pCsr, &nDocSize);\n  assert( rc!=SQLITE_OK || nDocSize>0 );\n\n\n  /* Iterate through all tokens in this AND/NEAR cluster, in ascending order\n  ** of the number of overflow pages that will be loaded by the pager layer\n  ** to retrieve the entire doclist for the token from the full-text index.\n  ** Load the doclists for tokens that are either:\n  **\n  **   a. The cheapest token in the entire query (i.e. the one visited by the\n  **      first iteration of this loop), or\n  **\n  **   b. Part of a multi-token phrase.\n  **\n  ** After each token doclist is loaded, merge it with the others from the\n  ** same phrase and count the number of documents that the merged doclist\n  ** contains. Set variable \"nMinEst\" to the smallest number of documents in\n  ** any phrase doclist for which 1 or more token doclists have been loaded.\n  ** Let nOther be the number of other phrases for which it is certain that\n  ** one or more tokens will not be deferred.\n  **\n  ** Then, for each token, defer it if loading the doclist would result in\n  ** loading N or more overflow pages into memory, where N is computed as:\n  **\n  **    (nMinEst + 4^nOther - 1) / (4^nOther)\n  */\n  for(ii=0; ii<nToken && rc==SQLITE_OK; ii++){\n    int iTC;                      /* Used to iterate through aTC[] array. */\n    Fts3TokenAndCost *pTC = 0;    /* Set to cheapest remaining token. */\n\n    /* Set pTC to point to the cheapest remaining token. */\n    for(iTC=0; iTC<nTC; iTC++){\n      if( aTC[iTC].pToken && aTC[iTC].pRoot==pRoot\n       && (!pTC || aTC[iTC].nOvfl<pTC->nOvfl)\n      ){\n        pTC = &aTC[iTC];\n      }\n    }\n    assert( pTC );\n\n    if( ii && pTC->nOvfl>=((nMinEst+(nLoad4/4)-1)/(nLoad4/4))*nDocSize ){\n      /* The number of overflow pages to load for this (and therefore all\n      ** subsequent) tokens is greater than the estimated number of pages\n      ** that will be loaded if all subsequent tokens are deferred.\n      */\n      Fts3PhraseToken *pToken = pTC->pToken;\n      rc = sqlite3Fts3DeferToken(pCsr, pToken, pTC->iCol);\n      fts3SegReaderCursorFree(pToken->pSegcsr);\n      pToken->pSegcsr = 0;\n    }else{\n      /* Set nLoad4 to the value of (4^nOther) for the next iteration of the\n      ** for-loop. Except, limit the value to 2^24 to prevent it from\n      ** overflowing the 32-bit integer it is stored in. */\n      if( ii<12 ) nLoad4 = nLoad4*4;\n\n      if( ii==0 || (pTC->pPhrase->nToken>1 && ii!=nToken-1) ){\n        /* Either this is the cheapest token in the entire query, or it is\n        ** part of a multi-token phrase. Either way, the entire doclist will\n        ** (eventually) be loaded into memory. It may as well be now. */\n        Fts3PhraseToken *pToken = pTC->pToken;\n        int nList = 0;\n        char *pList = 0;\n        rc = fts3TermSelect(pTab, pToken, pTC->iCol, &nList, &pList);\n        assert( rc==SQLITE_OK || pList==0 );\n        if( rc==SQLITE_OK ){\n          rc = fts3EvalPhraseMergeToken(\n              pTab, pTC->pPhrase, pTC->iToken,pList,nList\n          );\n        }\n        if( rc==SQLITE_OK ){\n          int nCount;\n          nCount = fts3DoclistCountDocids(\n              pTC->pPhrase->doclist.aAll, pTC->pPhrase->doclist.nAll\n          );\n          if( ii==0 || nCount<nMinEst ) nMinEst = nCount;\n        }\n      }\n    }\n    pTC->pToken = 0;\n  }\n\n  return rc;\n}\n\n/*\n** This function is called from within the xFilter method. It initializes\n** the full-text query currently stored in pCsr->pExpr. To iterate through\n** the results of a query, the caller does:\n**\n**    fts3EvalStart(pCsr);\n**    while( 1 ){\n**      fts3EvalNext(pCsr);\n**      if( pCsr->bEof ) break;\n**      ... return row pCsr->iPrevId to the caller ...\n**    }\n*/\nstatic int fts3EvalStart(Fts3Cursor *pCsr){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc = SQLITE_OK;\n  int nToken = 0;\n  int nOr = 0;\n\n  /* Allocate a MultiSegReader for each token in the expression. */\n  fts3EvalAllocateReaders(pCsr, pCsr->pExpr, &nToken, &nOr, &rc);\n\n  /* Determine which, if any, tokens in the expression should be deferred. */\n#ifndef SQLITE_DISABLE_FTS4_DEFERRED\n  if( rc==SQLITE_OK && nToken>1 && pTab->bFts4 ){\n    Fts3TokenAndCost *aTC;\n    aTC = (Fts3TokenAndCost *)sqlite3_malloc64(\n        sizeof(Fts3TokenAndCost) * nToken\n      + sizeof(Fts3Expr *) * nOr * 2\n    );\n\n    if( !aTC ){\n      rc = SQLITE_NOMEM;\n    }else{\n      Fts3Expr **apOr = (Fts3Expr **)&aTC[nToken];\n      int ii;\n      Fts3TokenAndCost *pTC = aTC;\n      Fts3Expr **ppOr = apOr;\n\n      fts3EvalTokenCosts(pCsr, 0, pCsr->pExpr, &pTC, &ppOr, &rc);\n      nToken = (int)(pTC-aTC);\n      nOr = (int)(ppOr-apOr);\n\n      if( rc==SQLITE_OK ){\n        rc = fts3EvalSelectDeferred(pCsr, 0, aTC, nToken);\n        for(ii=0; rc==SQLITE_OK && ii<nOr; ii++){\n          rc = fts3EvalSelectDeferred(pCsr, apOr[ii], aTC, nToken);\n        }\n      }\n\n      sqlite3_free(aTC);\n    }\n  }\n#endif\n\n  fts3EvalStartReaders(pCsr, pCsr->pExpr, &rc);\n  return rc;\n}\n\n/*\n** Invalidate the current position list for phrase pPhrase.\n*/\nstatic void fts3EvalInvalidatePoslist(Fts3Phrase *pPhrase){\n  if( pPhrase->doclist.bFreeList ){\n    sqlite3_free(pPhrase->doclist.pList);\n  }\n  pPhrase->doclist.pList = 0;\n  pPhrase->doclist.nList = 0;\n  pPhrase->doclist.bFreeList = 0;\n}\n\n/*\n** This function is called to edit the position list associated with\n** the phrase object passed as the fifth argument according to a NEAR\n** condition. For example:\n**\n**     abc NEAR/5 \"def ghi\"\n**\n** Parameter nNear is passed the NEAR distance of the expression (5 in\n** the example above). When this function is called, *paPoslist points to\n** the position list, and *pnToken is the number of phrase tokens in the\n** phrase on the other side of the NEAR operator to pPhrase. For example,\n** if pPhrase refers to the \"def ghi\" phrase, then *paPoslist points to\n** the position list associated with phrase \"abc\".\n**\n** All positions in the pPhrase position list that are not sufficiently\n** close to a position in the *paPoslist position list are removed. If this\n** leaves 0 positions, zero is returned. Otherwise, non-zero.\n**\n** Before returning, *paPoslist is set to point to the position lsit\n** associated with pPhrase. And *pnToken is set to the number of tokens in\n** pPhrase.\n*/\nstatic int fts3EvalNearTrim(\n  int nNear,                      /* NEAR distance. As in \"NEAR/nNear\". */\n  char *aTmp,                     /* Temporary space to use */\n  char **paPoslist,               /* IN/OUT: Position list */\n  int *pnToken,                   /* IN/OUT: Tokens in phrase of *paPoslist */\n  Fts3Phrase *pPhrase             /* The phrase object to trim the doclist of */\n){\n  int nParam1 = nNear + pPhrase->nToken;\n  int nParam2 = nNear + *pnToken;\n  int nNew;\n  char *p2;\n  char *pOut;\n  int res;\n\n  assert( pPhrase->doclist.pList );\n\n  p2 = pOut = pPhrase->doclist.pList;\n  res = fts3PoslistNearMerge(\n    &pOut, aTmp, nParam1, nParam2, paPoslist, &p2\n  );\n  if( res ){\n    nNew = (int)(pOut - pPhrase->doclist.pList) - 1;\n    assert_fts3_nc( nNew<=pPhrase->doclist.nList && nNew>0 );\n    if( nNew>=0 && nNew<=pPhrase->doclist.nList ){\n      assert( pPhrase->doclist.pList[nNew]=='\\0' );\n      memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);\n      pPhrase->doclist.nList = nNew;\n    }\n    *paPoslist = pPhrase->doclist.pList;\n    *pnToken = pPhrase->nToken;\n  }\n\n  return res;\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is called.\n** Otherwise, it advances the expression passed as the second argument to\n** point to the next matching row in the database. Expressions iterate through\n** matching rows in docid order. Ascending order if Fts3Cursor.bDesc is zero,\n** or descending if it is non-zero.\n**\n** If an error occurs, *pRc is set to an SQLite error code. Otherwise, if\n** successful, the following variables in pExpr are set:\n**\n**   Fts3Expr.bEof                (non-zero if EOF - there is no next row)\n**   Fts3Expr.iDocid              (valid if bEof==0. The docid of the next row)\n**\n** If the expression is of type FTSQUERY_PHRASE, and the expression is not\n** at EOF, then the following variables are populated with the position list\n** for the phrase for the visited row:\n**\n**   FTs3Expr.pPhrase->doclist.nList        (length of pList in bytes)\n**   FTs3Expr.pPhrase->doclist.pList        (pointer to position list)\n**\n** It says above that this function advances the expression to the next\n** matching row. This is usually true, but there are the following exceptions:\n**\n**   1. Deferred tokens are not taken into account. If a phrase consists\n**      entirely of deferred tokens, it is assumed to match every row in\n**      the db. In this case the position-list is not populated at all.\n**\n**      Or, if a phrase contains one or more deferred tokens and one or\n**      more non-deferred tokens, then the expression is advanced to the\n**      next possible match, considering only non-deferred tokens. In other\n**      words, if the phrase is \"A B C\", and \"B\" is deferred, the expression\n**      is advanced to the next row that contains an instance of \"A * C\",\n**      where \"*\" may match any single token. The position list in this case\n**      is populated as for \"A * C\" before returning.\n**\n**   2. NEAR is treated as AND. If the expression is \"x NEAR y\", it is\n**      advanced to point to the next row that matches \"x AND y\".\n**\n** See sqlite3Fts3EvalTestDeferred() for details on testing if a row is\n** really a match, taking into account deferred tokens and NEAR operators.\n*/\nstatic void fts3EvalNextRow(\n  Fts3Cursor *pCsr,               /* FTS Cursor handle */\n  Fts3Expr *pExpr,                /* Expr. to advance to next matching row */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  if( *pRc==SQLITE_OK && pExpr->bEof==0 ){\n    int bDescDoclist = pCsr->bDesc;         /* Used by DOCID_CMP() macro */\n    pExpr->bStart = 1;\n\n    switch( pExpr->eType ){\n      case FTSQUERY_NEAR:\n      case FTSQUERY_AND: {\n        Fts3Expr *pLeft = pExpr->pLeft;\n        Fts3Expr *pRight = pExpr->pRight;\n        assert( !pLeft->bDeferred || !pRight->bDeferred );\n\n        if( pLeft->bDeferred ){\n          /* LHS is entirely deferred. So we assume it matches every row.\n          ** Advance the RHS iterator to find the next row visited. */\n          fts3EvalNextRow(pCsr, pRight, pRc);\n          pExpr->iDocid = pRight->iDocid;\n          pExpr->bEof = pRight->bEof;\n        }else if( pRight->bDeferred ){\n          /* RHS is entirely deferred. So we assume it matches every row.\n          ** Advance the LHS iterator to find the next row visited. */\n          fts3EvalNextRow(pCsr, pLeft, pRc);\n          pExpr->iDocid = pLeft->iDocid;\n          pExpr->bEof = pLeft->bEof;\n        }else{\n          /* Neither the RHS or LHS are deferred. */\n          fts3EvalNextRow(pCsr, pLeft, pRc);\n          fts3EvalNextRow(pCsr, pRight, pRc);\n          while( !pLeft->bEof && !pRight->bEof && *pRc==SQLITE_OK ){\n            sqlite3_int64 iDiff = DOCID_CMP(pLeft->iDocid, pRight->iDocid);\n            if( iDiff==0 ) break;\n            if( iDiff<0 ){\n              fts3EvalNextRow(pCsr, pLeft, pRc);\n            }else{\n              fts3EvalNextRow(pCsr, pRight, pRc);\n            }\n          }\n          pExpr->iDocid = pLeft->iDocid;\n          pExpr->bEof = (pLeft->bEof || pRight->bEof);\n          if( pExpr->eType==FTSQUERY_NEAR && pExpr->bEof ){\n            assert( pRight->eType==FTSQUERY_PHRASE );\n            if( pRight->pPhrase->doclist.aAll ){\n              Fts3Doclist *pDl = &pRight->pPhrase->doclist;\n              while( *pRc==SQLITE_OK && pRight->bEof==0 ){\n                memset(pDl->pList, 0, pDl->nList);\n                fts3EvalNextRow(pCsr, pRight, pRc);\n              }\n            }\n            if( pLeft->pPhrase && pLeft->pPhrase->doclist.aAll ){\n              Fts3Doclist *pDl = &pLeft->pPhrase->doclist;\n              while( *pRc==SQLITE_OK && pLeft->bEof==0 ){\n                memset(pDl->pList, 0, pDl->nList);\n                fts3EvalNextRow(pCsr, pLeft, pRc);\n              }\n            }\n            pRight->bEof = pLeft->bEof = 1;\n          }\n        }\n        break;\n      }\n\n      case FTSQUERY_OR: {\n        Fts3Expr *pLeft = pExpr->pLeft;\n        Fts3Expr *pRight = pExpr->pRight;\n        sqlite3_int64 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);\n\n        assert_fts3_nc( pLeft->bStart || pLeft->iDocid==pRight->iDocid );\n        assert_fts3_nc( pRight->bStart || pLeft->iDocid==pRight->iDocid );\n\n        if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){\n          fts3EvalNextRow(pCsr, pLeft, pRc);\n        }else if( pLeft->bEof || iCmp>0 ){\n          fts3EvalNextRow(pCsr, pRight, pRc);\n        }else{\n          fts3EvalNextRow(pCsr, pLeft, pRc);\n          fts3EvalNextRow(pCsr, pRight, pRc);\n        }\n\n        pExpr->bEof = (pLeft->bEof && pRight->bEof);\n        iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);\n        if( pRight->bEof || (pLeft->bEof==0 &&  iCmp<0) ){\n          pExpr->iDocid = pLeft->iDocid;\n        }else{\n          pExpr->iDocid = pRight->iDocid;\n        }\n\n        break;\n      }\n\n      case FTSQUERY_NOT: {\n        Fts3Expr *pLeft = pExpr->pLeft;\n        Fts3Expr *pRight = pExpr->pRight;\n\n        if( pRight->bStart==0 ){\n          fts3EvalNextRow(pCsr, pRight, pRc);\n          assert( *pRc!=SQLITE_OK || pRight->bStart );\n        }\n\n        fts3EvalNextRow(pCsr, pLeft, pRc);\n        if( pLeft->bEof==0 ){\n          while( !*pRc\n              && !pRight->bEof\n              && DOCID_CMP(pLeft->iDocid, pRight->iDocid)>0\n          ){\n            fts3EvalNextRow(pCsr, pRight, pRc);\n          }\n        }\n        pExpr->iDocid = pLeft->iDocid;\n        pExpr->bEof = pLeft->bEof;\n        break;\n      }\n\n      default: {\n        Fts3Phrase *pPhrase = pExpr->pPhrase;\n        fts3EvalInvalidatePoslist(pPhrase);\n        *pRc = fts3EvalPhraseNext(pCsr, pPhrase, &pExpr->bEof);\n        pExpr->iDocid = pPhrase->doclist.iDocid;\n        break;\n      }\n    }\n  }\n}\n\n/*\n** If *pRc is not SQLITE_OK, or if pExpr is not the root node of a NEAR\n** cluster, then this function returns 1 immediately.\n**\n** Otherwise, it checks if the current row really does match the NEAR\n** expression, using the data currently stored in the position lists\n** (Fts3Expr->pPhrase.doclist.pList/nList) for each phrase in the expression.\n**\n** If the current row is a match, the position list associated with each\n** phrase in the NEAR expression is edited in place to contain only those\n** phrase instances sufficiently close to their peers to satisfy all NEAR\n** constraints. In this case it returns 1. If the NEAR expression does not\n** match the current row, 0 is returned. The position lists may or may not\n** be edited if 0 is returned.\n*/\nstatic int fts3EvalNearTest(Fts3Expr *pExpr, int *pRc){\n  int res = 1;\n\n  /* The following block runs if pExpr is the root of a NEAR query.\n  ** For example, the query:\n  **\n  **         \"w\" NEAR \"x\" NEAR \"y\" NEAR \"z\"\n  **\n  ** which is represented in tree form as:\n  **\n  **                               |\n  **                          +--NEAR--+      <-- root of NEAR query\n  **                          |        |\n  **                     +--NEAR--+   \"z\"\n  **                     |        |\n  **                +--NEAR--+   \"y\"\n  **                |        |\n  **               \"w\"      \"x\"\n  **\n  ** The right-hand child of a NEAR node is always a phrase. The\n  ** left-hand child may be either a phrase or a NEAR node. There are\n  ** no exceptions to this - it's the way the parser in fts3_expr.c works.\n  */\n  if( *pRc==SQLITE_OK\n   && pExpr->eType==FTSQUERY_NEAR\n   && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)\n  ){\n    Fts3Expr *p;\n    sqlite3_int64 nTmp = 0;       /* Bytes of temp space */\n    char *aTmp;                   /* Temp space for PoslistNearMerge() */\n\n    /* Allocate temporary working space. */\n    for(p=pExpr; p->pLeft; p=p->pLeft){\n      assert( p->pRight->pPhrase->doclist.nList>0 );\n      nTmp += p->pRight->pPhrase->doclist.nList;\n    }\n    nTmp += p->pPhrase->doclist.nList;\n    aTmp = sqlite3_malloc64(nTmp*2 + FTS3_VARINT_MAX);\n    if( !aTmp ){\n      *pRc = SQLITE_NOMEM;\n      res = 0;\n    }else{\n      char *aPoslist = p->pPhrase->doclist.pList;\n      int nToken = p->pPhrase->nToken;\n\n      for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){\n        Fts3Phrase *pPhrase = p->pRight->pPhrase;\n        int nNear = p->nNear;\n        res = fts3EvalNearTrim(nNear, aTmp, &aPoslist, &nToken, pPhrase);\n      }\n\n      aPoslist = pExpr->pRight->pPhrase->doclist.pList;\n      nToken = pExpr->pRight->pPhrase->nToken;\n      for(p=pExpr->pLeft; p && res; p=p->pLeft){\n        int nNear;\n        Fts3Phrase *pPhrase;\n        assert( p->pParent && p->pParent->pLeft==p );\n        nNear = p->pParent->nNear;\n        pPhrase = (\n            p->eType==FTSQUERY_NEAR ? p->pRight->pPhrase : p->pPhrase\n        );\n        res = fts3EvalNearTrim(nNear, aTmp, &aPoslist, &nToken, pPhrase);\n      }\n    }\n\n    sqlite3_free(aTmp);\n  }\n\n  return res;\n}\n\n/*\n** This function is a helper function for sqlite3Fts3EvalTestDeferred().\n** Assuming no error occurs or has occurred, It returns non-zero if the\n** expression passed as the second argument matches the row that pCsr\n** currently points to, or zero if it does not.\n**\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op.\n** If an error occurs during execution of this function, *pRc is set to\n** the appropriate SQLite error code. In this case the returned value is\n** undefined.\n*/\nstatic int fts3EvalTestExpr(\n  Fts3Cursor *pCsr,               /* FTS cursor handle */\n  Fts3Expr *pExpr,                /* Expr to test. May or may not be root. */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  int bHit = 1;                   /* Return value */\n  if( *pRc==SQLITE_OK ){\n    switch( pExpr->eType ){\n      case FTSQUERY_NEAR:\n      case FTSQUERY_AND:\n        bHit = (\n            fts3EvalTestExpr(pCsr, pExpr->pLeft, pRc)\n         && fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)\n         && fts3EvalNearTest(pExpr, pRc)\n        );\n\n        /* If the NEAR expression does not match any rows, zero the doclist for\n        ** all phrases involved in the NEAR. This is because the snippet(),\n        ** offsets() and matchinfo() functions are not supposed to recognize\n        ** any instances of phrases that are part of unmatched NEAR queries.\n        ** For example if this expression:\n        **\n        **    ... MATCH 'a OR (b NEAR c)'\n        **\n        ** is matched against a row containing:\n        **\n        **        'a b d e'\n        **\n        ** then any snippet() should ony highlight the \"a\" term, not the \"b\"\n        ** (as \"b\" is part of a non-matching NEAR clause).\n        */\n        if( bHit==0\n         && pExpr->eType==FTSQUERY_NEAR\n         && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)\n        ){\n          Fts3Expr *p;\n          for(p=pExpr; p->pPhrase==0; p=p->pLeft){\n            if( p->pRight->iDocid==pCsr->iPrevId ){\n              fts3EvalInvalidatePoslist(p->pRight->pPhrase);\n            }\n          }\n          if( p->iDocid==pCsr->iPrevId ){\n            fts3EvalInvalidatePoslist(p->pPhrase);\n          }\n        }\n\n        break;\n\n      case FTSQUERY_OR: {\n        int bHit1 = fts3EvalTestExpr(pCsr, pExpr->pLeft, pRc);\n        int bHit2 = fts3EvalTestExpr(pCsr, pExpr->pRight, pRc);\n        bHit = bHit1 || bHit2;\n        break;\n      }\n\n      case FTSQUERY_NOT:\n        bHit = (\n            fts3EvalTestExpr(pCsr, pExpr->pLeft, pRc)\n         && !fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)\n        );\n        break;\n\n      default: {\n#ifndef SQLITE_DISABLE_FTS4_DEFERRED\n        if( pCsr->pDeferred && (pExpr->bDeferred || (\n            pExpr->iDocid==pCsr->iPrevId && pExpr->pPhrase->doclist.pList\n        ))){\n          Fts3Phrase *pPhrase = pExpr->pPhrase;\n          if( pExpr->bDeferred ){\n            fts3EvalInvalidatePoslist(pPhrase);\n          }\n          *pRc = fts3EvalDeferredPhrase(pCsr, pPhrase);\n          bHit = (pPhrase->doclist.pList!=0);\n          pExpr->iDocid = pCsr->iPrevId;\n        }else\n#endif\n        {\n          bHit = (\n              pExpr->bEof==0 && pExpr->iDocid==pCsr->iPrevId\n           && pExpr->pPhrase->doclist.nList>0\n          );\n        }\n        break;\n      }\n    }\n  }\n  return bHit;\n}\n\n/*\n** This function is called as the second part of each xNext operation when\n** iterating through the results of a full-text query. At this point the\n** cursor points to a row that matches the query expression, with the\n** following caveats:\n**\n**   * Up until this point, \"NEAR\" operators in the expression have been\n**     treated as \"AND\".\n**\n**   * Deferred tokens have not yet been considered.\n**\n** If *pRc is not SQLITE_OK when this function is called, it immediately\n** returns 0. Otherwise, it tests whether or not after considering NEAR\n** operators and deferred tokens the current row is still a match for the\n** expression. It returns 1 if both of the following are true:\n**\n**   1. *pRc is SQLITE_OK when this function returns, and\n**\n**   2. After scanning the current FTS table row for the deferred tokens,\n**      it is determined that the row does *not* match the query.\n**\n** Or, if no error occurs and it seems the current row does match the FTS\n** query, return 0.\n*/\nSQLITE_PRIVATE int sqlite3Fts3EvalTestDeferred(Fts3Cursor *pCsr, int *pRc){\n  int rc = *pRc;\n  int bMiss = 0;\n  if( rc==SQLITE_OK ){\n\n    /* If there are one or more deferred tokens, load the current row into\n    ** memory and scan it to determine the position list for each deferred\n    ** token. Then, see if this row is really a match, considering deferred\n    ** tokens and NEAR operators (neither of which were taken into account\n    ** earlier, by fts3EvalNextRow()).\n    */\n    if( pCsr->pDeferred ){\n      rc = fts3CursorSeek(0, pCsr);\n      if( rc==SQLITE_OK ){\n        rc = sqlite3Fts3CacheDeferredDoclists(pCsr);\n      }\n    }\n    bMiss = (0==fts3EvalTestExpr(pCsr, pCsr->pExpr, &rc));\n\n    /* Free the position-lists accumulated for each deferred token above. */\n    sqlite3Fts3FreeDeferredDoclists(pCsr);\n    *pRc = rc;\n  }\n  return (rc==SQLITE_OK && bMiss);\n}\n\n/*\n** Advance to the next document that matches the FTS expression in\n** Fts3Cursor.pExpr.\n*/\nstatic int fts3EvalNext(Fts3Cursor *pCsr){\n  int rc = SQLITE_OK;             /* Return Code */\n  Fts3Expr *pExpr = pCsr->pExpr;\n  assert( pCsr->isEof==0 );\n  if( pExpr==0 ){\n    pCsr->isEof = 1;\n  }else{\n    do {\n      if( pCsr->isRequireSeek==0 ){\n        sqlite3_reset(pCsr->pStmt);\n      }\n      assert( sqlite3_data_count(pCsr->pStmt)==0 );\n      fts3EvalNextRow(pCsr, pExpr, &rc);\n      pCsr->isEof = pExpr->bEof;\n      pCsr->isRequireSeek = 1;\n      pCsr->isMatchinfoNeeded = 1;\n      pCsr->iPrevId = pExpr->iDocid;\n    }while( pCsr->isEof==0 && sqlite3Fts3EvalTestDeferred(pCsr, &rc) );\n  }\n\n  /* Check if the cursor is past the end of the docid range specified\n  ** by Fts3Cursor.iMinDocid/iMaxDocid. If so, set the EOF flag.  */\n  if( rc==SQLITE_OK && (\n        (pCsr->bDesc==0 && pCsr->iPrevId>pCsr->iMaxDocid)\n     || (pCsr->bDesc!=0 && pCsr->iPrevId<pCsr->iMinDocid)\n  )){\n    pCsr->isEof = 1;\n  }\n\n  return rc;\n}\n\n/*\n** Restart iteration for expression pExpr so that the next call to\n** fts3EvalNext() visits the first row. Do not allow incremental\n** loading or merging of phrase doclists for this iteration.\n**\n** If *pRc is other than SQLITE_OK when this function is called, it is\n** a no-op. If an error occurs within this function, *pRc is set to an\n** SQLite error code before returning.\n*/\nstatic void fts3EvalRestart(\n  Fts3Cursor *pCsr,\n  Fts3Expr *pExpr,\n  int *pRc\n){\n  if( pExpr && *pRc==SQLITE_OK ){\n    Fts3Phrase *pPhrase = pExpr->pPhrase;\n\n    if( pPhrase ){\n      fts3EvalInvalidatePoslist(pPhrase);\n      if( pPhrase->bIncr ){\n        int i;\n        for(i=0; i<pPhrase->nToken; i++){\n          Fts3PhraseToken *pToken = &pPhrase->aToken[i];\n          assert( pToken->pDeferred==0 );\n          if( pToken->pSegcsr ){\n            sqlite3Fts3MsrIncrRestart(pToken->pSegcsr);\n          }\n        }\n        *pRc = fts3EvalPhraseStart(pCsr, 0, pPhrase);\n      }\n      pPhrase->doclist.pNextDocid = 0;\n      pPhrase->doclist.iDocid = 0;\n      pPhrase->pOrPoslist = 0;\n    }\n\n    pExpr->iDocid = 0;\n    pExpr->bEof = 0;\n    pExpr->bStart = 0;\n\n    fts3EvalRestart(pCsr, pExpr->pLeft, pRc);\n    fts3EvalRestart(pCsr, pExpr->pRight, pRc);\n  }\n}\n\n/*\n** Expression node pExpr is an MSR phrase. This function restarts pExpr\n** so that it is a regular phrase query, not an MSR. SQLITE_OK is returned\n** if successful, or an SQLite error code otherwise.\n*/\nSQLITE_PRIVATE int sqlite3Fts3MsrCancel(Fts3Cursor *pCsr, Fts3Expr *pExpr){\n  int rc = SQLITE_OK;\n  if( pExpr->bEof==0 ){\n    i64 iDocid = pExpr->iDocid;\n    fts3EvalRestart(pCsr, pExpr, &rc);\n    while( rc==SQLITE_OK && pExpr->iDocid!=iDocid ){\n      fts3EvalNextRow(pCsr, pExpr, &rc);\n      if( pExpr->bEof ) rc = FTS_CORRUPT_VTAB;\n    }\n  }\n  return rc;\n}\n\n/*\n** After allocating the Fts3Expr.aMI[] array for each phrase in the\n** expression rooted at pExpr, the cursor iterates through all rows matched\n** by pExpr, calling this function for each row. This function increments\n** the values in Fts3Expr.aMI[] according to the position-list currently\n** found in Fts3Expr.pPhrase->doclist.pList for each of the phrase\n** expression nodes.\n*/\nstatic void fts3EvalUpdateCounts(Fts3Expr *pExpr, int nCol){\n  if( pExpr ){\n    Fts3Phrase *pPhrase = pExpr->pPhrase;\n    if( pPhrase && pPhrase->doclist.pList ){\n      int iCol = 0;\n      char *p = pPhrase->doclist.pList;\n\n      do{\n        u8 c = 0;\n        int iCnt = 0;\n        while( 0xFE & (*p | c) ){\n          if( (c&0x80)==0 ) iCnt++;\n          c = *p++ & 0x80;\n        }\n\n        /* aMI[iCol*3 + 1] = Number of occurrences\n        ** aMI[iCol*3 + 2] = Number of rows containing at least one instance\n        */\n        pExpr->aMI[iCol*3 + 1] += iCnt;\n        pExpr->aMI[iCol*3 + 2] += (iCnt>0);\n        if( *p==0x00 ) break;\n        p++;\n        p += fts3GetVarint32(p, &iCol);\n      }while( iCol<nCol );\n    }\n\n    fts3EvalUpdateCounts(pExpr->pLeft, nCol);\n    fts3EvalUpdateCounts(pExpr->pRight, nCol);\n  }\n}\n\n/*\n** This is an sqlite3Fts3ExprIterate() callback. If the Fts3Expr.aMI[] array\n** has not yet been allocated, allocate and zero it. Otherwise, just zero\n** it.\n*/\nstatic int fts3AllocateMSI(Fts3Expr *pExpr, int iPhrase, void *pCtx){\n  Fts3Table *pTab = (Fts3Table*)pCtx;\n  UNUSED_PARAMETER(iPhrase);\n  if( pExpr->aMI==0 ){\n    pExpr->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32));\n    if( pExpr->aMI==0 ) return SQLITE_NOMEM;\n  }\n  memset(pExpr->aMI, 0, pTab->nColumn * 3 * sizeof(u32));\n  return SQLITE_OK;\n}\n\n/*\n** Expression pExpr must be of type FTSQUERY_PHRASE.\n**\n** If it is not already allocated and populated, this function allocates and\n** populates the Fts3Expr.aMI[] array for expression pExpr. If pExpr is part\n** of a NEAR expression, then it also allocates and populates the same array\n** for all other phrases that are part of the NEAR expression.\n**\n** SQLITE_OK is returned if the aMI[] array is successfully allocated and\n** populated. Otherwise, if an error occurs, an SQLite error code is returned.\n*/\nstatic int fts3EvalGatherStats(\n  Fts3Cursor *pCsr,               /* Cursor object */\n  Fts3Expr *pExpr                 /* FTSQUERY_PHRASE expression */\n){\n  int rc = SQLITE_OK;             /* Return code */\n\n  assert( pExpr->eType==FTSQUERY_PHRASE );\n  if( pExpr->aMI==0 ){\n    Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n    Fts3Expr *pRoot;                /* Root of NEAR expression */\n\n    sqlite3_int64 iPrevId = pCsr->iPrevId;\n    sqlite3_int64 iDocid;\n    u8 bEof;\n\n    /* Find the root of the NEAR expression */\n    pRoot = pExpr;\n    while( pRoot->pParent\n        && (pRoot->pParent->eType==FTSQUERY_NEAR || pRoot->bDeferred)\n    ){\n      pRoot = pRoot->pParent;\n    }\n    iDocid = pRoot->iDocid;\n    bEof = pRoot->bEof;\n    assert( pRoot->bStart );\n\n    /* Allocate space for the aMSI[] array of each FTSQUERY_PHRASE node */\n    rc = sqlite3Fts3ExprIterate(pRoot, fts3AllocateMSI, (void*)pTab);\n    if( rc!=SQLITE_OK ) return rc;\n    fts3EvalRestart(pCsr, pRoot, &rc);\n\n    while( pCsr->isEof==0 && rc==SQLITE_OK ){\n\n      do {\n        /* Ensure the %_content statement is reset. */\n        if( pCsr->isRequireSeek==0 ) sqlite3_reset(pCsr->pStmt);\n        assert( sqlite3_data_count(pCsr->pStmt)==0 );\n\n        /* Advance to the next document */\n        fts3EvalNextRow(pCsr, pRoot, &rc);\n        pCsr->isEof = pRoot->bEof;\n        pCsr->isRequireSeek = 1;\n        pCsr->isMatchinfoNeeded = 1;\n        pCsr->iPrevId = pRoot->iDocid;\n      }while( pCsr->isEof==0\n           && pRoot->eType==FTSQUERY_NEAR\n           && sqlite3Fts3EvalTestDeferred(pCsr, &rc)\n      );\n\n      if( rc==SQLITE_OK && pCsr->isEof==0 ){\n        fts3EvalUpdateCounts(pRoot, pTab->nColumn);\n      }\n    }\n\n    pCsr->isEof = 0;\n    pCsr->iPrevId = iPrevId;\n\n    if( bEof ){\n      pRoot->bEof = bEof;\n    }else{\n      /* Caution: pRoot may iterate through docids in ascending or descending\n      ** order. For this reason, even though it seems more defensive, the\n      ** do loop can not be written:\n      **\n      **   do {...} while( pRoot->iDocid<iDocid && rc==SQLITE_OK );\n      */\n      fts3EvalRestart(pCsr, pRoot, &rc);\n      do {\n        fts3EvalNextRow(pCsr, pRoot, &rc);\n        assert_fts3_nc( pRoot->bEof==0 );\n        if( pRoot->bEof ) rc = FTS_CORRUPT_VTAB;\n      }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );\n    }\n  }\n  return rc;\n}\n\n/*\n** This function is used by the matchinfo() module to query a phrase\n** expression node for the following information:\n**\n**   1. The total number of occurrences of the phrase in each column of\n**      the FTS table (considering all rows), and\n**\n**   2. For each column, the number of rows in the table for which the\n**      column contains at least one instance of the phrase.\n**\n** If no error occurs, SQLITE_OK is returned and the values for each column\n** written into the array aiOut as follows:\n**\n**   aiOut[iCol*3 + 1] = Number of occurrences\n**   aiOut[iCol*3 + 2] = Number of rows containing at least one instance\n**\n** Caveats:\n**\n**   * If a phrase consists entirely of deferred tokens, then all output\n**     values are set to the number of documents in the table. In other\n**     words we assume that very common tokens occur exactly once in each\n**     column of each row of the table.\n**\n**   * If a phrase contains some deferred tokens (and some non-deferred\n**     tokens), count the potential occurrence identified by considering\n**     the non-deferred tokens instead of actual phrase occurrences.\n**\n**   * If the phrase is part of a NEAR expression, then only phrase instances\n**     that meet the NEAR constraint are included in the counts.\n*/\nSQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(\n  Fts3Cursor *pCsr,               /* FTS cursor handle */\n  Fts3Expr *pExpr,                /* Phrase expression */\n  u32 *aiOut                      /* Array to write results into (see above) */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc = SQLITE_OK;\n  int iCol;\n\n  if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){\n    assert( pCsr->nDoc>0 );\n    for(iCol=0; iCol<pTab->nColumn; iCol++){\n      aiOut[iCol*3 + 1] = (u32)pCsr->nDoc;\n      aiOut[iCol*3 + 2] = (u32)pCsr->nDoc;\n    }\n  }else{\n    rc = fts3EvalGatherStats(pCsr, pExpr);\n    if( rc==SQLITE_OK ){\n      assert( pExpr->aMI );\n      for(iCol=0; iCol<pTab->nColumn; iCol++){\n        aiOut[iCol*3 + 1] = pExpr->aMI[iCol*3 + 1];\n        aiOut[iCol*3 + 2] = pExpr->aMI[iCol*3 + 2];\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** The expression pExpr passed as the second argument to this function\n** must be of type FTSQUERY_PHRASE.\n**\n** The returned value is either NULL or a pointer to a buffer containing\n** a position-list indicating the occurrences of the phrase in column iCol\n** of the current row.\n**\n** More specifically, the returned buffer contains 1 varint for each\n** occurrence of the phrase in the column, stored using the normal (delta+2)\n** compression and is terminated by either an 0x01 or 0x00 byte. For example,\n** if the requested column contains \"a b X c d X X\" and the position-list\n** for 'X' is requested, the buffer returned may contain:\n**\n**     0x04 0x05 0x03 0x01   or   0x04 0x05 0x03 0x00\n**\n** This function works regardless of whether or not the phrase is deferred,\n** incremental, or neither.\n*/\nSQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(\n  Fts3Cursor *pCsr,               /* FTS3 cursor object */\n  Fts3Expr *pExpr,                /* Phrase to return doclist for */\n  int iCol,                       /* Column to return position list for */\n  char **ppOut                    /* OUT: Pointer to position list */\n){\n  Fts3Phrase *pPhrase = pExpr->pPhrase;\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  char *pIter;\n  int iThis;\n  sqlite3_int64 iDocid;\n\n  /* If this phrase is applies specifically to some column other than\n  ** column iCol, return a NULL pointer.  */\n  *ppOut = 0;\n  assert( iCol>=0 && iCol<pTab->nColumn );\n  if( (pPhrase->iColumn<pTab->nColumn && pPhrase->iColumn!=iCol) ){\n    return SQLITE_OK;\n  }\n\n  iDocid = pExpr->iDocid;\n  pIter = pPhrase->doclist.pList;\n  if( iDocid!=pCsr->iPrevId || pExpr->bEof ){\n    int rc = SQLITE_OK;\n    int bDescDoclist = pTab->bDescIdx;      /* For DOCID_CMP macro */\n    int bOr = 0;\n    u8 bTreeEof = 0;\n    Fts3Expr *p;                  /* Used to iterate from pExpr to root */\n    Fts3Expr *pNear;              /* Most senior NEAR ancestor (or pExpr) */\n    Fts3Expr *pRun;               /* Closest non-deferred ancestor of pNear */\n    int bMatch;\n\n    /* Check if this phrase descends from an OR expression node. If not,\n    ** return NULL. Otherwise, the entry that corresponds to docid\n    ** pCsr->iPrevId may lie earlier in the doclist buffer. Or, if the\n    ** tree that the node is part of has been marked as EOF, but the node\n    ** itself is not EOF, then it may point to an earlier entry. */\n    pNear = pExpr;\n    for(p=pExpr->pParent; p; p=p->pParent){\n      if( p->eType==FTSQUERY_OR ) bOr = 1;\n      if( p->eType==FTSQUERY_NEAR ) pNear = p;\n      if( p->bEof ) bTreeEof = 1;\n    }\n    if( bOr==0 ) return SQLITE_OK;\n    pRun = pNear;\n    while( pRun->bDeferred ){\n      assert( pRun->pParent );\n      pRun = pRun->pParent;\n    }\n\n    /* This is the descendent of an OR node. In this case we cannot use\n    ** an incremental phrase. Load the entire doclist for the phrase\n    ** into memory in this case.  */\n    if( pPhrase->bIncr ){\n      int bEofSave = pRun->bEof;\n      fts3EvalRestart(pCsr, pRun, &rc);\n      while( rc==SQLITE_OK && !pRun->bEof ){\n        fts3EvalNextRow(pCsr, pRun, &rc);\n        if( bEofSave==0 && pRun->iDocid==iDocid ) break;\n      }\n      assert( rc!=SQLITE_OK || pPhrase->bIncr==0 );\n      if( rc==SQLITE_OK && pRun->bEof!=bEofSave ){\n        rc = FTS_CORRUPT_VTAB;\n      }\n    }\n    if( bTreeEof ){\n      while( rc==SQLITE_OK && !pRun->bEof ){\n        fts3EvalNextRow(pCsr, pRun, &rc);\n      }\n    }\n    if( rc!=SQLITE_OK ) return rc;\n\n    bMatch = 1;\n    for(p=pNear; p; p=p->pLeft){\n      u8 bEof = 0;\n      Fts3Expr *pTest = p;\n      Fts3Phrase *pPh;\n      assert( pTest->eType==FTSQUERY_NEAR || pTest->eType==FTSQUERY_PHRASE );\n      if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;\n      assert( pTest->eType==FTSQUERY_PHRASE );\n      pPh = pTest->pPhrase;\n\n      pIter = pPh->pOrPoslist;\n      iDocid = pPh->iOrDocid;\n      if( pCsr->bDesc==bDescDoclist ){\n        bEof = !pPh->doclist.nAll ||\n          (pIter >= (pPh->doclist.aAll + pPh->doclist.nAll));\n        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){\n          sqlite3Fts3DoclistNext(\n              bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll,\n              &pIter, &iDocid, &bEof\n          );\n        }\n      }else{\n        bEof = !pPh->doclist.nAll || (pIter && pIter<=pPh->doclist.aAll);\n        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){\n          int dummy;\n          sqlite3Fts3DoclistPrev(\n              bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll,\n              &pIter, &iDocid, &dummy, &bEof\n              );\n        }\n      }\n      pPh->pOrPoslist = pIter;\n      pPh->iOrDocid = iDocid;\n      if( bEof || iDocid!=pCsr->iPrevId ) bMatch = 0;\n    }\n\n    if( bMatch ){\n      pIter = pPhrase->pOrPoslist;\n    }else{\n      pIter = 0;\n    }\n  }\n  if( pIter==0 ) return SQLITE_OK;\n\n  if( *pIter==0x01 ){\n    pIter++;\n    pIter += fts3GetVarint32(pIter, &iThis);\n  }else{\n    iThis = 0;\n  }\n  while( iThis<iCol ){\n    fts3ColumnlistCopy(0, &pIter);\n    if( *pIter==0x00 ) return SQLITE_OK;\n    pIter++;\n    pIter += fts3GetVarint32(pIter, &iThis);\n  }\n  if( *pIter==0x00 ){\n    pIter = 0;\n  }\n\n  *ppOut = ((iCol==iThis)?pIter:0);\n  return SQLITE_OK;\n}\n\n/*\n** Free all components of the Fts3Phrase structure that were allocated by\n** the eval module. Specifically, this means to free:\n**\n**   * the contents of pPhrase->doclist, and\n**   * any Fts3MultiSegReader objects held by phrase tokens.\n*/\nSQLITE_PRIVATE void sqlite3Fts3EvalPhraseCleanup(Fts3Phrase *pPhrase){\n  if( pPhrase ){\n    int i;\n    sqlite3_free(pPhrase->doclist.aAll);\n    fts3EvalInvalidatePoslist(pPhrase);\n    memset(&pPhrase->doclist, 0, sizeof(Fts3Doclist));\n    for(i=0; i<pPhrase->nToken; i++){\n      fts3SegReaderCursorFree(pPhrase->aToken[i].pSegcsr);\n      pPhrase->aToken[i].pSegcsr = 0;\n    }\n  }\n}\n\n\n/*\n** Return SQLITE_CORRUPT_VTAB.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_PRIVATE int sqlite3Fts3Corrupt(){\n  return SQLITE_CORRUPT_VTAB;\n}\n#endif\n\n#if !defined(SQLITE_CORE)\n/*\n** Initialize API pointer table, if required.\n*/\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_fts3_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  SQLITE_EXTENSION_INIT2(pApi)\n  return sqlite3Fts3Init(db);\n}\n#endif\n\n#endif\n\n/************** End of fts3.c ************************************************/\n/************** Begin file fts3_aux.c ****************************************/\n/*\n** 2011 Jan 27\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <string.h> */\n/* #include <assert.h> */\n\ntypedef struct Fts3auxTable Fts3auxTable;\ntypedef struct Fts3auxCursor Fts3auxCursor;\n\nstruct Fts3auxTable {\n  sqlite3_vtab base;              /* Base class used by SQLite core */\n  Fts3Table *pFts3Tab;\n};\n\nstruct Fts3auxCursor {\n  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */\n  Fts3MultiSegReader csr;        /* Must be right after \"base\" */\n  Fts3SegFilter filter;\n  char *zStop;\n  int nStop;                      /* Byte-length of string zStop */\n  int iLangid;                    /* Language id to query */\n  int isEof;                      /* True if cursor is at EOF */\n  sqlite3_int64 iRowid;           /* Current rowid */\n\n  int iCol;                       /* Current value of 'col' column */\n  int nStat;                      /* Size of aStat[] array */\n  struct Fts3auxColstats {\n    sqlite3_int64 nDoc;           /* 'documents' values for current csr row */\n    sqlite3_int64 nOcc;           /* 'occurrences' values for current csr row */\n  } *aStat;\n};\n\n/*\n** Schema of the terms table.\n*/\n#define FTS3_AUX_SCHEMA \\\n  \"CREATE TABLE x(term, col, documents, occurrences, languageid HIDDEN)\"\n\n/*\n** This function does all the work for both the xConnect and xCreate methods.\n** These tables have no persistent representation of their own, so xConnect\n** and xCreate are identical operations.\n*/\nstatic int fts3auxConnectMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pUnused,                  /* Unused */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  char const *zDb;                /* Name of database (e.g. \"main\") */\n  char const *zFts3;              /* Name of fts3 table */\n  int nDb;                        /* Result of strlen(zDb) */\n  int nFts3;                      /* Result of strlen(zFts3) */\n  sqlite3_int64 nByte;            /* Bytes of space to allocate here */\n  int rc;                         /* value returned by declare_vtab() */\n  Fts3auxTable *p;                /* Virtual table object to return */\n\n  UNUSED_PARAMETER(pUnused);\n\n  /* The user should invoke this in one of two forms:\n  **\n  **     CREATE VIRTUAL TABLE xxx USING fts4aux(fts4-table);\n  **     CREATE VIRTUAL TABLE xxx USING fts4aux(fts4-table-db, fts4-table);\n  */\n  if( argc!=4 && argc!=5 ) goto bad_args;\n\n  zDb = argv[1];\n  nDb = (int)strlen(zDb);\n  if( argc==5 ){\n    if( nDb==4 && 0==sqlite3_strnicmp(\"temp\", zDb, 4) ){\n      zDb = argv[3];\n      nDb = (int)strlen(zDb);\n      zFts3 = argv[4];\n    }else{\n      goto bad_args;\n    }\n  }else{\n    zFts3 = argv[3];\n  }\n  nFts3 = (int)strlen(zFts3);\n\n  rc = sqlite3_declare_vtab(db, FTS3_AUX_SCHEMA);\n  if( rc!=SQLITE_OK ) return rc;\n\n  nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;\n  p = (Fts3auxTable *)sqlite3_malloc64(nByte);\n  if( !p ) return SQLITE_NOMEM;\n  memset(p, 0, nByte);\n\n  p->pFts3Tab = (Fts3Table *)&p[1];\n  p->pFts3Tab->zDb = (char *)&p->pFts3Tab[1];\n  p->pFts3Tab->zName = &p->pFts3Tab->zDb[nDb+1];\n  p->pFts3Tab->db = db;\n  p->pFts3Tab->nIndex = 1;\n\n  memcpy((char *)p->pFts3Tab->zDb, zDb, nDb);\n  memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);\n  sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);\n\n  *ppVtab = (sqlite3_vtab *)p;\n  return SQLITE_OK;\n\n bad_args:\n  sqlite3Fts3ErrMsg(pzErr, \"invalid arguments to fts4aux constructor\");\n  return SQLITE_ERROR;\n}\n\n/*\n** This function does the work for both the xDisconnect and xDestroy methods.\n** These tables have no persistent representation of their own, so xDisconnect\n** and xDestroy are identical operations.\n*/\nstatic int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){\n  Fts3auxTable *p = (Fts3auxTable *)pVtab;\n  Fts3Table *pFts3 = p->pFts3Tab;\n  int i;\n\n  /* Free any prepared statements held */\n  for(i=0; i<SizeofArray(pFts3->aStmt); i++){\n    sqlite3_finalize(pFts3->aStmt[i]);\n  }\n  sqlite3_free(pFts3->zSegmentsTbl);\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n#define FTS4AUX_EQ_CONSTRAINT 1\n#define FTS4AUX_GE_CONSTRAINT 2\n#define FTS4AUX_LE_CONSTRAINT 4\n\n/*\n** xBestIndex - Analyze a WHERE and ORDER BY clause.\n*/\nstatic int fts3auxBestIndexMethod(\n  sqlite3_vtab *pVTab,\n  sqlite3_index_info *pInfo\n){\n  int i;\n  int iEq = -1;\n  int iGe = -1;\n  int iLe = -1;\n  int iLangid = -1;\n  int iNext = 1;                  /* Next free argvIndex value */\n\n  UNUSED_PARAMETER(pVTab);\n\n  /* This vtab delivers always results in \"ORDER BY term ASC\" order. */\n  if( pInfo->nOrderBy==1\n   && pInfo->aOrderBy[0].iColumn==0\n   && pInfo->aOrderBy[0].desc==0\n  ){\n    pInfo->orderByConsumed = 1;\n  }\n\n  /* Search for equality and range constraints on the \"term\" column.\n  ** And equality constraints on the hidden \"languageid\" column. */\n  for(i=0; i<pInfo->nConstraint; i++){\n    if( pInfo->aConstraint[i].usable ){\n      int op = pInfo->aConstraint[i].op;\n      int iCol = pInfo->aConstraint[i].iColumn;\n\n      if( iCol==0 ){\n        if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iEq = i;\n        if( op==SQLITE_INDEX_CONSTRAINT_LT ) iLe = i;\n        if( op==SQLITE_INDEX_CONSTRAINT_LE ) iLe = i;\n        if( op==SQLITE_INDEX_CONSTRAINT_GT ) iGe = i;\n        if( op==SQLITE_INDEX_CONSTRAINT_GE ) iGe = i;\n      }\n      if( iCol==4 ){\n        if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iLangid = i;\n      }\n    }\n  }\n\n  if( iEq>=0 ){\n    pInfo->idxNum = FTS4AUX_EQ_CONSTRAINT;\n    pInfo->aConstraintUsage[iEq].argvIndex = iNext++;\n    pInfo->estimatedCost = 5;\n  }else{\n    pInfo->idxNum = 0;\n    pInfo->estimatedCost = 20000;\n    if( iGe>=0 ){\n      pInfo->idxNum += FTS4AUX_GE_CONSTRAINT;\n      pInfo->aConstraintUsage[iGe].argvIndex = iNext++;\n      pInfo->estimatedCost /= 2;\n    }\n    if( iLe>=0 ){\n      pInfo->idxNum += FTS4AUX_LE_CONSTRAINT;\n      pInfo->aConstraintUsage[iLe].argvIndex = iNext++;\n      pInfo->estimatedCost /= 2;\n    }\n  }\n  if( iLangid>=0 ){\n    pInfo->aConstraintUsage[iLangid].argvIndex = iNext++;\n    pInfo->estimatedCost--;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** xOpen - Open a cursor.\n*/\nstatic int fts3auxOpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){\n  Fts3auxCursor *pCsr;            /* Pointer to cursor object to return */\n\n  UNUSED_PARAMETER(pVTab);\n\n  pCsr = (Fts3auxCursor *)sqlite3_malloc(sizeof(Fts3auxCursor));\n  if( !pCsr ) return SQLITE_NOMEM;\n  memset(pCsr, 0, sizeof(Fts3auxCursor));\n\n  *ppCsr = (sqlite3_vtab_cursor *)pCsr;\n  return SQLITE_OK;\n}\n\n/*\n** xClose - Close a cursor.\n*/\nstatic int fts3auxCloseMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;\n  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;\n\n  sqlite3Fts3SegmentsClose(pFts3);\n  sqlite3Fts3SegReaderFinish(&pCsr->csr);\n  sqlite3_free((void *)pCsr->filter.zTerm);\n  sqlite3_free(pCsr->zStop);\n  sqlite3_free(pCsr->aStat);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\nstatic int fts3auxGrowStatArray(Fts3auxCursor *pCsr, int nSize){\n  if( nSize>pCsr->nStat ){\n    struct Fts3auxColstats *aNew;\n    aNew = (struct Fts3auxColstats *)sqlite3_realloc64(pCsr->aStat,\n        sizeof(struct Fts3auxColstats) * nSize\n    );\n    if( aNew==0 ) return SQLITE_NOMEM;\n    memset(&aNew[pCsr->nStat], 0,\n        sizeof(struct Fts3auxColstats) * (nSize - pCsr->nStat)\n    );\n    pCsr->aStat = aNew;\n    pCsr->nStat = nSize;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** xNext - Advance the cursor to the next row, if any.\n*/\nstatic int fts3auxNextMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;\n  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;\n  int rc;\n\n  /* Increment our pretend rowid value. */\n  pCsr->iRowid++;\n\n  for(pCsr->iCol++; pCsr->iCol<pCsr->nStat; pCsr->iCol++){\n    if( pCsr->aStat[pCsr->iCol].nDoc>0 ) return SQLITE_OK;\n  }\n\n  rc = sqlite3Fts3SegReaderStep(pFts3, &pCsr->csr);\n  if( rc==SQLITE_ROW ){\n    int i = 0;\n    int nDoclist = pCsr->csr.nDoclist;\n    char *aDoclist = pCsr->csr.aDoclist;\n    int iCol;\n\n    int eState = 0;\n\n    if( pCsr->zStop ){\n      int n = (pCsr->nStop<pCsr->csr.nTerm) ? pCsr->nStop : pCsr->csr.nTerm;\n      int mc = memcmp(pCsr->zStop, pCsr->csr.zTerm, n);\n      if( mc<0 || (mc==0 && pCsr->csr.nTerm>pCsr->nStop) ){\n        pCsr->isEof = 1;\n        return SQLITE_OK;\n      }\n    }\n\n    if( fts3auxGrowStatArray(pCsr, 2) ) return SQLITE_NOMEM;\n    memset(pCsr->aStat, 0, sizeof(struct Fts3auxColstats) * pCsr->nStat);\n    iCol = 0;\n    rc = SQLITE_OK;\n\n    while( i<nDoclist ){\n      sqlite3_int64 v = 0;\n\n      i += sqlite3Fts3GetVarint(&aDoclist[i], &v);\n      switch( eState ){\n        /* State 0. In this state the integer just read was a docid. */\n        case 0:\n          pCsr->aStat[0].nDoc++;\n          eState = 1;\n          iCol = 0;\n          break;\n\n        /* State 1. In this state we are expecting either a 1, indicating\n        ** that the following integer will be a column number, or the\n        ** start of a position list for column 0.\n        **\n        ** The only difference between state 1 and state 2 is that if the\n        ** integer encountered in state 1 is not 0 or 1, then we need to\n        ** increment the column 0 \"nDoc\" count for this term.\n        */\n        case 1:\n          assert( iCol==0 );\n          if( v>1 ){\n            pCsr->aStat[1].nDoc++;\n          }\n          eState = 2;\n          /* fall through */\n\n        case 2:\n          if( v==0 ){       /* 0x00. Next integer will be a docid. */\n            eState = 0;\n          }else if( v==1 ){ /* 0x01. Next integer will be a column number. */\n            eState = 3;\n          }else{            /* 2 or greater. A position. */\n            pCsr->aStat[iCol+1].nOcc++;\n            pCsr->aStat[0].nOcc++;\n          }\n          break;\n\n        /* State 3. The integer just read is a column number. */\n        default: assert( eState==3 );\n          iCol = (int)v;\n          if( iCol<1 ){\n            rc = SQLITE_CORRUPT_VTAB;\n            break;\n          }\n          if( fts3auxGrowStatArray(pCsr, iCol+2) ) return SQLITE_NOMEM;\n          pCsr->aStat[iCol+1].nDoc++;\n          eState = 2;\n          break;\n      }\n    }\n\n    pCsr->iCol = 0;\n  }else{\n    pCsr->isEof = 1;\n  }\n  return rc;\n}\n\n/*\n** xFilter - Initialize a cursor to point at the start of its data.\n*/\nstatic int fts3auxFilterMethod(\n  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */\n  int idxNum,                     /* Strategy index */\n  const char *idxStr,             /* Unused */\n  int nVal,                       /* Number of elements in apVal */\n  sqlite3_value **apVal           /* Arguments for the indexing scheme */\n){\n  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;\n  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;\n  int rc;\n  int isScan = 0;\n  int iLangVal = 0;               /* Language id to query */\n\n  int iEq = -1;                   /* Index of term=? value in apVal */\n  int iGe = -1;                   /* Index of term>=? value in apVal */\n  int iLe = -1;                   /* Index of term<=? value in apVal */\n  int iLangid = -1;               /* Index of languageid=? value in apVal */\n  int iNext = 0;\n\n  UNUSED_PARAMETER(nVal);\n  UNUSED_PARAMETER(idxStr);\n\n  assert( idxStr==0 );\n  assert( idxNum==FTS4AUX_EQ_CONSTRAINT || idxNum==0\n       || idxNum==FTS4AUX_LE_CONSTRAINT || idxNum==FTS4AUX_GE_CONSTRAINT\n       || idxNum==(FTS4AUX_LE_CONSTRAINT|FTS4AUX_GE_CONSTRAINT)\n  );\n\n  if( idxNum==FTS4AUX_EQ_CONSTRAINT ){\n    iEq = iNext++;\n  }else{\n    isScan = 1;\n    if( idxNum & FTS4AUX_GE_CONSTRAINT ){\n      iGe = iNext++;\n    }\n    if( idxNum & FTS4AUX_LE_CONSTRAINT ){\n      iLe = iNext++;\n    }\n  }\n  if( iNext<nVal ){\n    iLangid = iNext++;\n  }\n\n  /* In case this cursor is being reused, close and zero it. */\n  testcase(pCsr->filter.zTerm);\n  sqlite3Fts3SegReaderFinish(&pCsr->csr);\n  sqlite3_free((void *)pCsr->filter.zTerm);\n  sqlite3_free(pCsr->aStat);\n  sqlite3_free(pCsr->zStop);\n  memset(&pCsr->csr, 0, ((u8*)&pCsr[1]) - (u8*)&pCsr->csr);\n\n  pCsr->filter.flags = FTS3_SEGMENT_REQUIRE_POS|FTS3_SEGMENT_IGNORE_EMPTY;\n  if( isScan ) pCsr->filter.flags |= FTS3_SEGMENT_SCAN;\n\n  if( iEq>=0 || iGe>=0 ){\n    const unsigned char *zStr = sqlite3_value_text(apVal[0]);\n    assert( (iEq==0 && iGe==-1) || (iEq==-1 && iGe==0) );\n    if( zStr ){\n      pCsr->filter.zTerm = sqlite3_mprintf(\"%s\", zStr);\n      if( pCsr->filter.zTerm==0 ) return SQLITE_NOMEM;\n      pCsr->filter.nTerm = (int)strlen(pCsr->filter.zTerm);\n    }\n  }\n\n  if( iLe>=0 ){\n    pCsr->zStop = sqlite3_mprintf(\"%s\", sqlite3_value_text(apVal[iLe]));\n    if( pCsr->zStop==0 ) return SQLITE_NOMEM;\n    pCsr->nStop = (int)strlen(pCsr->zStop);\n  }\n\n  if( iLangid>=0 ){\n    iLangVal = sqlite3_value_int(apVal[iLangid]);\n\n    /* If the user specified a negative value for the languageid, use zero\n    ** instead. This works, as the \"languageid=?\" constraint will also\n    ** be tested by the VDBE layer. The test will always be false (since\n    ** this module will not return a row with a negative languageid), and\n    ** so the overall query will return zero rows.  */\n    if( iLangVal<0 ) iLangVal = 0;\n  }\n  pCsr->iLangid = iLangVal;\n\n  rc = sqlite3Fts3SegReaderCursor(pFts3, iLangVal, 0, FTS3_SEGCURSOR_ALL,\n      pCsr->filter.zTerm, pCsr->filter.nTerm, 0, isScan, &pCsr->csr\n  );\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts3SegReaderStart(pFts3, &pCsr->csr, &pCsr->filter);\n  }\n\n  if( rc==SQLITE_OK ) rc = fts3auxNextMethod(pCursor);\n  return rc;\n}\n\n/*\n** xEof - Return true if the cursor is at EOF, or false otherwise.\n*/\nstatic int fts3auxEofMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;\n  return pCsr->isEof;\n}\n\n/*\n** xColumn - Return a column value.\n*/\nstatic int fts3auxColumnMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */\n  int iCol                        /* Index of column to read value from */\n){\n  Fts3auxCursor *p = (Fts3auxCursor *)pCursor;\n\n  assert( p->isEof==0 );\n  switch( iCol ){\n    case 0: /* term */\n      sqlite3_result_text(pCtx, p->csr.zTerm, p->csr.nTerm, SQLITE_TRANSIENT);\n      break;\n\n    case 1: /* col */\n      if( p->iCol ){\n        sqlite3_result_int(pCtx, p->iCol-1);\n      }else{\n        sqlite3_result_text(pCtx, \"*\", -1, SQLITE_STATIC);\n      }\n      break;\n\n    case 2: /* documents */\n      sqlite3_result_int64(pCtx, p->aStat[p->iCol].nDoc);\n      break;\n\n    case 3: /* occurrences */\n      sqlite3_result_int64(pCtx, p->aStat[p->iCol].nOcc);\n      break;\n\n    default: /* languageid */\n      assert( iCol==4 );\n      sqlite3_result_int(pCtx, p->iLangid);\n      break;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** xRowid - Return the current rowid for the cursor.\n*/\nstatic int fts3auxRowidMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite_int64 *pRowid            /* OUT: Rowid value */\n){\n  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;\n  *pRowid = pCsr->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Register the fts3aux module with database connection db. Return SQLITE_OK\n** if successful or an error code if sqlite3_create_module() fails.\n*/\nSQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){\n  static const sqlite3_module fts3aux_module = {\n     0,                           /* iVersion      */\n     fts3auxConnectMethod,        /* xCreate       */\n     fts3auxConnectMethod,        /* xConnect      */\n     fts3auxBestIndexMethod,      /* xBestIndex    */\n     fts3auxDisconnectMethod,     /* xDisconnect   */\n     fts3auxDisconnectMethod,     /* xDestroy      */\n     fts3auxOpenMethod,           /* xOpen         */\n     fts3auxCloseMethod,          /* xClose        */\n     fts3auxFilterMethod,         /* xFilter       */\n     fts3auxNextMethod,           /* xNext         */\n     fts3auxEofMethod,            /* xEof          */\n     fts3auxColumnMethod,         /* xColumn       */\n     fts3auxRowidMethod,          /* xRowid        */\n     0,                           /* xUpdate       */\n     0,                           /* xBegin        */\n     0,                           /* xSync         */\n     0,                           /* xCommit       */\n     0,                           /* xRollback     */\n     0,                           /* xFindFunction */\n     0,                           /* xRename       */\n     0,                           /* xSavepoint    */\n     0,                           /* xRelease      */\n     0,                           /* xRollbackTo   */\n     0,                           /* xShadowName   */\n     0                            /* xIntegrity    */\n  };\n  int rc;                         /* Return code */\n\n  rc = sqlite3_create_module(db, \"fts4aux\", &fts3aux_module, 0);\n  return rc;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_aux.c ********************************************/\n/************** Begin file fts3_expr.c ***************************************/\n/*\n** 2008 Nov 28\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This module contains code that implements a parser for fts3 query strings\n** (the right-hand argument to the MATCH operator). Because the supported\n** syntax is relatively simple, the whole tokenizer/parser system is\n** hand-coded.\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/*\n** By default, this module parses the legacy syntax that has been\n** traditionally used by fts3. Or, if SQLITE_ENABLE_FTS3_PARENTHESIS\n** is defined, then it uses the new syntax. The differences between\n** the new and the old syntaxes are:\n**\n**  a) The new syntax supports parenthesis. The old does not.\n**\n**  b) The new syntax supports the AND and NOT operators. The old does not.\n**\n**  c) The old syntax supports the \"-\" token qualifier. This is not\n**     supported by the new syntax (it is replaced by the NOT operator).\n**\n**  d) When using the old syntax, the OR operator has a greater precedence\n**     than an implicit AND. When using the new, both implicity and explicit\n**     AND operators have a higher precedence than OR.\n**\n** If compiled with SQLITE_TEST defined, then this module exports the\n** symbol \"int sqlite3_fts3_enable_parentheses\". Setting this variable\n** to zero causes the module to use the old syntax. If it is set to\n** non-zero the new syntax is activated. This is so both syntaxes can\n** be tested using a single build of testfixture.\n**\n** The following describes the syntax supported by the fts3 MATCH\n** operator in a similar format to that used by the lemon parser\n** generator. This module does not use actually lemon, it uses a\n** custom parser.\n**\n**   query ::= andexpr (OR andexpr)*.\n**\n**   andexpr ::= notexpr (AND? notexpr)*.\n**\n**   notexpr ::= nearexpr (NOT nearexpr|-TOKEN)*.\n**   notexpr ::= LP query RP.\n**\n**   nearexpr ::= phrase (NEAR distance_opt nearexpr)*.\n**\n**   distance_opt ::= .\n**   distance_opt ::= / INTEGER.\n**\n**   phrase ::= TOKEN.\n**   phrase ::= COLUMN:TOKEN.\n**   phrase ::= \"TOKEN TOKEN TOKEN...\".\n*/\n\n#ifdef SQLITE_TEST\nSQLITE_API int sqlite3_fts3_enable_parentheses = 0;\n#else\n# ifdef SQLITE_ENABLE_FTS3_PARENTHESIS\n#  define sqlite3_fts3_enable_parentheses 1\n# else\n#  define sqlite3_fts3_enable_parentheses 0\n# endif\n#endif\n\n/*\n** Default span for NEAR operators.\n*/\n#define SQLITE_FTS3_DEFAULT_NEAR_PARAM 10\n\n/* #include <string.h> */\n/* #include <assert.h> */\n\n/*\n** isNot:\n**   This variable is used by function getNextNode(). When getNextNode() is\n**   called, it sets ParseContext.isNot to true if the 'next node' is a\n**   FTSQUERY_PHRASE with a unary \"-\" attached to it. i.e. \"mysql\" in the\n**   FTS3 query \"sqlite -mysql\". Otherwise, ParseContext.isNot is set to\n**   zero.\n*/\ntypedef struct ParseContext ParseContext;\nstruct ParseContext {\n  sqlite3_tokenizer *pTokenizer;      /* Tokenizer module */\n  int iLangid;                        /* Language id used with tokenizer */\n  const char **azCol;                 /* Array of column names for fts3 table */\n  int bFts4;                          /* True to allow FTS4-only syntax */\n  int nCol;                           /* Number of entries in azCol[] */\n  int iDefaultCol;                    /* Default column to query */\n  int isNot;                          /* True if getNextNode() sees a unary - */\n  sqlite3_context *pCtx;              /* Write error message here */\n  int nNest;                          /* Number of nested brackets */\n};\n\n/*\n** This function is equivalent to the standard isspace() function.\n**\n** The standard isspace() can be awkward to use safely, because although it\n** is defined to accept an argument of type int, its behavior when passed\n** an integer that falls outside of the range of the unsigned char type\n** is undefined (and sometimes, \"undefined\" means segfault). This wrapper\n** is defined to accept an argument of type char, and always returns 0 for\n** any values that fall outside of the range of the unsigned char type (i.e.\n** negative values).\n*/\nstatic int fts3isspace(char c){\n  return c==' ' || c=='\\t' || c=='\\n' || c=='\\r' || c=='\\v' || c=='\\f';\n}\n\n/*\n** Allocate nByte bytes of memory using sqlite3_malloc(). If successful,\n** zero the memory before returning a pointer to it. If unsuccessful,\n** return NULL.\n*/\nSQLITE_PRIVATE void *sqlite3Fts3MallocZero(sqlite3_int64 nByte){\n  void *pRet = sqlite3_malloc64(nByte);\n  if( pRet ) memset(pRet, 0, nByte);\n  return pRet;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3OpenTokenizer(\n  sqlite3_tokenizer *pTokenizer,\n  int iLangid,\n  const char *z,\n  int n,\n  sqlite3_tokenizer_cursor **ppCsr\n){\n  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;\n  sqlite3_tokenizer_cursor *pCsr = 0;\n  int rc;\n\n  rc = pModule->xOpen(pTokenizer, z, n, &pCsr);\n  assert( rc==SQLITE_OK || pCsr==0 );\n  if( rc==SQLITE_OK ){\n    pCsr->pTokenizer = pTokenizer;\n    if( pModule->iVersion>=1 ){\n      rc = pModule->xLanguageid(pCsr, iLangid);\n      if( rc!=SQLITE_OK ){\n        pModule->xClose(pCsr);\n        pCsr = 0;\n      }\n    }\n  }\n  *ppCsr = pCsr;\n  return rc;\n}\n\n/*\n** Function getNextNode(), which is called by fts3ExprParse(), may itself\n** call fts3ExprParse(). So this forward declaration is required.\n*/\nstatic int fts3ExprParse(ParseContext *, const char *, int, Fts3Expr **, int *);\n\n/*\n** Search buffer z[], size n, for a '\"' character. Or, if enable_parenthesis\n** is defined, search for '(' and ')' as well. Return the index of the first\n** such character in the buffer. If there is no such character, return -1.\n*/\nstatic int findBarredChar(const char *z, int n){\n  int ii;\n  for(ii=0; ii<n; ii++){\n    if( (z[ii]=='\"')\n     || (sqlite3_fts3_enable_parentheses && (z[ii]=='(' || z[ii]==')'))\n    ){\n      return ii;\n    }\n  }\n  return -1;\n}\n\n/*\n** Extract the next token from buffer z (length n) using the tokenizer\n** and other information (column names etc.) in pParse. Create an Fts3Expr\n** structure of type FTSQUERY_PHRASE containing a phrase consisting of this\n** single token and set *ppExpr to point to it. If the end of the buffer is\n** reached before a token is found, set *ppExpr to zero. It is the\n** responsibility of the caller to eventually deallocate the allocated\n** Fts3Expr structure (if any) by passing it to sqlite3_free().\n**\n** Return SQLITE_OK if successful, or SQLITE_NOMEM if a memory allocation\n** fails.\n*/\nstatic int getNextToken(\n  ParseContext *pParse,                   /* fts3 query parse context */\n  int iCol,                               /* Value for Fts3Phrase.iColumn */\n  const char *z, int n,                   /* Input string */\n  Fts3Expr **ppExpr,                      /* OUT: expression */\n  int *pnConsumed                         /* OUT: Number of bytes consumed */\n){\n  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;\n  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;\n  int rc;\n  sqlite3_tokenizer_cursor *pCursor;\n  Fts3Expr *pRet = 0;\n\n  *pnConsumed = n;\n  rc = sqlite3Fts3OpenTokenizer(pTokenizer, pParse->iLangid, z, n, &pCursor);\n  if( rc==SQLITE_OK ){\n    const char *zToken;\n    int nToken = 0, iStart = 0, iEnd = 0, iPosition = 0;\n    sqlite3_int64 nByte;                    /* total space to allocate */\n\n    rc = pModule->xNext(pCursor, &zToken, &nToken, &iStart, &iEnd, &iPosition);\n    if( rc==SQLITE_OK ){\n      /* Check that this tokenization did not gobble up any \" characters. Or,\n      ** if enable_parenthesis is true, that it did not gobble up any\n      ** open or close parenthesis characters either. If it did, call\n      ** getNextToken() again, but pass only that part of the input buffer\n      ** up to the first such character.  */\n      int iBarred = findBarredChar(z, iEnd);\n      if( iBarred>=0 ){\n        pModule->xClose(pCursor);\n        return getNextToken(pParse, iCol, z, iBarred, ppExpr, pnConsumed);\n      }\n\n      nByte = sizeof(Fts3Expr) + SZ_FTS3PHRASE(1) + nToken;\n      pRet = (Fts3Expr *)sqlite3Fts3MallocZero(nByte);\n      if( !pRet ){\n        rc = SQLITE_NOMEM;\n      }else{\n        pRet->eType = FTSQUERY_PHRASE;\n        pRet->pPhrase = (Fts3Phrase *)&pRet[1];\n        pRet->pPhrase->nToken = 1;\n        pRet->pPhrase->iColumn = iCol;\n        pRet->pPhrase->aToken[0].n = nToken;\n        pRet->pPhrase->aToken[0].z = (char*)&pRet->pPhrase->aToken[1];\n        memcpy(pRet->pPhrase->aToken[0].z, zToken, nToken);\n\n        if( iEnd<n && z[iEnd]=='*' ){\n          pRet->pPhrase->aToken[0].isPrefix = 1;\n          iEnd++;\n        }\n\n        while( 1 ){\n          if( !sqlite3_fts3_enable_parentheses\n           && iStart>0 && z[iStart-1]=='-'\n          ){\n            pParse->isNot = 1;\n            iStart--;\n          }else if( pParse->bFts4 && iStart>0 && z[iStart-1]=='^' ){\n            pRet->pPhrase->aToken[0].bFirst = 1;\n            iStart--;\n          }else{\n            break;\n          }\n        }\n\n      }\n      *pnConsumed = iEnd;\n    }else if( n && rc==SQLITE_DONE ){\n      int iBarred = findBarredChar(z, n);\n      if( iBarred>=0 ){\n        *pnConsumed = iBarred;\n      }\n      rc = SQLITE_OK;\n    }\n\n    pModule->xClose(pCursor);\n  }\n\n  *ppExpr = pRet;\n  return rc;\n}\n\n\n/*\n** Enlarge a memory allocation.  If an out-of-memory allocation occurs,\n** then free the old allocation.\n*/\nstatic void *fts3ReallocOrFree(void *pOrig, sqlite3_int64 nNew){\n  void *pRet = sqlite3_realloc64(pOrig, nNew);\n  if( !pRet ){\n    sqlite3_free(pOrig);\n  }\n  return pRet;\n}\n\n/*\n** Buffer zInput, length nInput, contains the contents of a quoted string\n** that appeared as part of an fts3 query expression. Neither quote character\n** is included in the buffer. This function attempts to tokenize the entire\n** input buffer and create an Fts3Expr structure of type FTSQUERY_PHRASE\n** containing the results.\n**\n** If successful, SQLITE_OK is returned and *ppExpr set to point at the\n** allocated Fts3Expr structure. Otherwise, either SQLITE_NOMEM (out of memory\n** error) or SQLITE_ERROR (tokenization error) is returned and *ppExpr set\n** to 0.\n*/\nstatic int getNextString(\n  ParseContext *pParse,                   /* fts3 query parse context */\n  const char *zInput, int nInput,         /* Input string */\n  Fts3Expr **ppExpr                       /* OUT: expression */\n){\n  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;\n  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;\n  int rc;\n  Fts3Expr *p = 0;\n  sqlite3_tokenizer_cursor *pCursor = 0;\n  char *zTemp = 0;\n  i64 nTemp = 0;\n\n  const int nSpace = sizeof(Fts3Expr) + SZ_FTS3PHRASE(1);\n  int nToken = 0;\n\n  /* The final Fts3Expr data structure, including the Fts3Phrase,\n  ** Fts3PhraseToken structures token buffers are all stored as a single\n  ** allocation so that the expression can be freed with a single call to\n  ** sqlite3_free(). Setting this up requires a two pass approach.\n  **\n  ** The first pass, in the block below, uses a tokenizer cursor to iterate\n  ** through the tokens in the expression. This pass uses fts3ReallocOrFree()\n  ** to assemble data in two dynamic buffers:\n  **\n  **   Buffer p: Points to the Fts3Expr structure, followed by the Fts3Phrase\n  **             structure, followed by the array of Fts3PhraseToken\n  **             structures. This pass only populates the Fts3PhraseToken array.\n  **\n  **   Buffer zTemp: Contains copies of all tokens.\n  **\n  ** The second pass, in the block that begins \"if( rc==SQLITE_DONE )\" below,\n  ** appends buffer zTemp to buffer p, and fills in the Fts3Expr and Fts3Phrase\n  ** structures.\n  */\n  rc = sqlite3Fts3OpenTokenizer(\n      pTokenizer, pParse->iLangid, zInput, nInput, &pCursor);\n  if( rc==SQLITE_OK ){\n    int ii;\n    for(ii=0; rc==SQLITE_OK; ii++){\n      const char *zByte;\n      int nByte = 0, iBegin = 0, iEnd = 0, iPos = 0;\n      rc = pModule->xNext(pCursor, &zByte, &nByte, &iBegin, &iEnd, &iPos);\n      if( rc==SQLITE_OK ){\n        Fts3PhraseToken *pToken;\n\n        p = fts3ReallocOrFree(p, nSpace + ii*sizeof(Fts3PhraseToken));\n        zTemp = fts3ReallocOrFree(zTemp, nTemp + nByte);\n        if( !zTemp || !p ){\n          rc = SQLITE_NOMEM;\n          goto getnextstring_out;\n        }\n\n        assert( nToken==ii );\n        pToken = &((Fts3Phrase *)(&p[1]))->aToken[ii];\n        memset(pToken, 0, sizeof(Fts3PhraseToken));\n\n        memcpy(&zTemp[nTemp], zByte, nByte);\n        nTemp += nByte;\n\n        pToken->n = nByte;\n        pToken->isPrefix = (iEnd<nInput && zInput[iEnd]=='*');\n        pToken->bFirst = (iBegin>0 && zInput[iBegin-1]=='^');\n        nToken = ii+1;\n      }\n    }\n  }\n\n  if( rc==SQLITE_DONE ){\n    int jj;\n    char *zBuf = 0;\n\n    p = fts3ReallocOrFree(p, nSpace + nToken*sizeof(Fts3PhraseToken) + nTemp);\n    if( !p ){\n      rc = SQLITE_NOMEM;\n      goto getnextstring_out;\n    }\n    memset(p, 0, (char *)&(((Fts3Phrase *)&p[1])->aToken[0])-(char *)p);\n    p->eType = FTSQUERY_PHRASE;\n    p->pPhrase = (Fts3Phrase *)&p[1];\n    p->pPhrase->iColumn = pParse->iDefaultCol;\n    p->pPhrase->nToken = nToken;\n\n    zBuf = (char *)&p->pPhrase->aToken[nToken];\n    assert( nTemp==0 || zTemp );\n    if( zTemp ){\n      memcpy(zBuf, zTemp, nTemp);\n    }\n\n    for(jj=0; jj<p->pPhrase->nToken; jj++){\n      p->pPhrase->aToken[jj].z = zBuf;\n      zBuf += p->pPhrase->aToken[jj].n;\n    }\n    rc = SQLITE_OK;\n  }\n\n getnextstring_out:\n  if( pCursor ){\n    pModule->xClose(pCursor);\n  }\n  sqlite3_free(zTemp);\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(p);\n    p = 0;\n  }\n  *ppExpr = p;\n  return rc;\n}\n\n/*\n** The output variable *ppExpr is populated with an allocated Fts3Expr\n** structure, or set to 0 if the end of the input buffer is reached.\n**\n** Returns an SQLite error code. SQLITE_OK if everything works, SQLITE_NOMEM\n** if a malloc failure occurs, or SQLITE_ERROR if a parse error is encountered.\n** If SQLITE_ERROR is returned, pContext is populated with an error message.\n*/\nstatic int getNextNode(\n  ParseContext *pParse,                   /* fts3 query parse context */\n  const char *z, int n,                   /* Input string */\n  Fts3Expr **ppExpr,                      /* OUT: expression */\n  int *pnConsumed                         /* OUT: Number of bytes consumed */\n){\n  static const struct Fts3Keyword {\n    char *z;                              /* Keyword text */\n    unsigned char n;                      /* Length of the keyword */\n    unsigned char parenOnly;              /* Only valid in paren mode */\n    unsigned char eType;                  /* Keyword code */\n  } aKeyword[] = {\n    { \"OR\" ,  2, 0, FTSQUERY_OR   },\n    { \"AND\",  3, 1, FTSQUERY_AND  },\n    { \"NOT\",  3, 1, FTSQUERY_NOT  },\n    { \"NEAR\", 4, 0, FTSQUERY_NEAR }\n  };\n  int ii;\n  int iCol;\n  int iColLen;\n  int rc;\n  Fts3Expr *pRet = 0;\n\n  const char *zInput = z;\n  int nInput = n;\n\n  pParse->isNot = 0;\n\n  /* Skip over any whitespace before checking for a keyword, an open or\n  ** close bracket, or a quoted string.\n  */\n  while( nInput>0 && fts3isspace(*zInput) ){\n    nInput--;\n    zInput++;\n  }\n  if( nInput==0 ){\n    return SQLITE_DONE;\n  }\n\n  /* See if we are dealing with a keyword. */\n  for(ii=0; ii<(int)(sizeof(aKeyword)/sizeof(struct Fts3Keyword)); ii++){\n    const struct Fts3Keyword *pKey = &aKeyword[ii];\n\n    if( (pKey->parenOnly & ~sqlite3_fts3_enable_parentheses)!=0 ){\n      continue;\n    }\n\n    if( nInput>=pKey->n && 0==memcmp(zInput, pKey->z, pKey->n) ){\n      int nNear = SQLITE_FTS3_DEFAULT_NEAR_PARAM;\n      int nKey = pKey->n;\n      char cNext;\n\n      /* If this is a \"NEAR\" keyword, check for an explicit nearness. */\n      if( pKey->eType==FTSQUERY_NEAR ){\n        assert( nKey==4 );\n        if( zInput[4]=='/' && zInput[5]>='0' && zInput[5]<='9' ){\n          nKey += 1+sqlite3Fts3ReadInt(&zInput[nKey+1], &nNear);\n        }\n      }\n\n      /* At this point this is probably a keyword. But for that to be true,\n      ** the next byte must contain either whitespace, an open or close\n      ** parenthesis, a quote character, or EOF.\n      */\n      cNext = zInput[nKey];\n      if( fts3isspace(cNext)\n       || cNext=='\"' || cNext=='(' || cNext==')' || cNext==0\n      ){\n        pRet = (Fts3Expr *)sqlite3Fts3MallocZero(sizeof(Fts3Expr));\n        if( !pRet ){\n          return SQLITE_NOMEM;\n        }\n        pRet->eType = pKey->eType;\n        pRet->nNear = nNear;\n        *ppExpr = pRet;\n        *pnConsumed = (int)((zInput - z) + nKey);\n        return SQLITE_OK;\n      }\n\n      /* Turns out that wasn't a keyword after all. This happens if the\n      ** user has supplied a token such as \"ORacle\". Continue.\n      */\n    }\n  }\n\n  /* See if we are dealing with a quoted phrase. If this is the case, then\n  ** search for the closing quote and pass the whole string to getNextString()\n  ** for processing. This is easy to do, as fts3 has no syntax for escaping\n  ** a quote character embedded in a string.\n  */\n  if( *zInput=='\"' ){\n    for(ii=1; ii<nInput && zInput[ii]!='\"'; ii++);\n    *pnConsumed = (int)((zInput - z) + ii + 1);\n    if( ii==nInput ){\n      return SQLITE_ERROR;\n    }\n    return getNextString(pParse, &zInput[1], ii-1, ppExpr);\n  }\n\n  if( sqlite3_fts3_enable_parentheses ){\n    if( *zInput=='(' ){\n      int nConsumed = 0;\n      pParse->nNest++;\n#if !defined(SQLITE_MAX_EXPR_DEPTH)\n      if( pParse->nNest>1000 ) return SQLITE_ERROR;\n#elif SQLITE_MAX_EXPR_DEPTH>0\n      if( pParse->nNest>SQLITE_MAX_EXPR_DEPTH ) return SQLITE_ERROR;\n#endif\n      rc = fts3ExprParse(pParse, zInput+1, nInput-1, ppExpr, &nConsumed);\n      *pnConsumed = (int)(zInput - z) + 1 + nConsumed;\n      return rc;\n    }else if( *zInput==')' ){\n      pParse->nNest--;\n      *pnConsumed = (int)((zInput - z) + 1);\n      *ppExpr = 0;\n      return SQLITE_DONE;\n    }\n  }\n\n  /* If control flows to this point, this must be a regular token, or\n  ** the end of the input. Read a regular token using the sqlite3_tokenizer\n  ** interface. Before doing so, figure out if there is an explicit\n  ** column specifier for the token.\n  **\n  ** TODO: Strangely, it is not possible to associate a column specifier\n  ** with a quoted phrase, only with a single token. Not sure if this was\n  ** an implementation artifact or an intentional decision when fts3 was\n  ** first implemented. Whichever it was, this module duplicates the\n  ** limitation.\n  */\n  iCol = pParse->iDefaultCol;\n  iColLen = 0;\n  for(ii=0; ii<pParse->nCol; ii++){\n    const char *zStr = pParse->azCol[ii];\n    int nStr = (int)strlen(zStr);\n    if( nInput>nStr && zInput[nStr]==':'\n     && sqlite3_strnicmp(zStr, zInput, nStr)==0\n    ){\n      iCol = ii;\n      iColLen = (int)((zInput - z) + nStr + 1);\n      break;\n    }\n  }\n  rc = getNextToken(pParse, iCol, &z[iColLen], n-iColLen, ppExpr, pnConsumed);\n  *pnConsumed += iColLen;\n  return rc;\n}\n\n/*\n** The argument is an Fts3Expr structure for a binary operator (any type\n** except an FTSQUERY_PHRASE). Return an integer value representing the\n** precedence of the operator. Lower values have a higher precedence (i.e.\n** group more tightly). For example, in the C language, the == operator\n** groups more tightly than ||, and would therefore have a higher precedence.\n**\n** When using the new fts3 query syntax (when SQLITE_ENABLE_FTS3_PARENTHESIS\n** is defined), the order of the operators in precedence from highest to\n** lowest is:\n**\n**   NEAR\n**   NOT\n**   AND (including implicit ANDs)\n**   OR\n**\n** Note that when using the old query syntax, the OR operator has a higher\n** precedence than the AND operator.\n*/\nstatic int opPrecedence(Fts3Expr *p){\n  assert( p->eType!=FTSQUERY_PHRASE );\n  if( sqlite3_fts3_enable_parentheses ){\n    return p->eType;\n  }else if( p->eType==FTSQUERY_NEAR ){\n    return 1;\n  }else if( p->eType==FTSQUERY_OR ){\n    return 2;\n  }\n  assert( p->eType==FTSQUERY_AND );\n  return 3;\n}\n\n/*\n** Argument ppHead contains a pointer to the current head of a query\n** expression tree being parsed. pPrev is the expression node most recently\n** inserted into the tree. This function adds pNew, which is always a binary\n** operator node, into the expression tree based on the relative precedence\n** of pNew and the existing nodes of the tree. This may result in the head\n** of the tree changing, in which case *ppHead is set to the new root node.\n*/\nstatic void insertBinaryOperator(\n  Fts3Expr **ppHead,       /* Pointer to the root node of a tree */\n  Fts3Expr *pPrev,         /* Node most recently inserted into the tree */\n  Fts3Expr *pNew           /* New binary node to insert into expression tree */\n){\n  Fts3Expr *pSplit = pPrev;\n  while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){\n    pSplit = pSplit->pParent;\n  }\n\n  if( pSplit->pParent ){\n    assert( pSplit->pParent->pRight==pSplit );\n    pSplit->pParent->pRight = pNew;\n    pNew->pParent = pSplit->pParent;\n  }else{\n    *ppHead = pNew;\n  }\n  pNew->pLeft = pSplit;\n  pSplit->pParent = pNew;\n}\n\n/*\n** Parse the fts3 query expression found in buffer z, length n. This function\n** returns either when the end of the buffer is reached or an unmatched\n** closing bracket - ')' - is encountered.\n**\n** If successful, SQLITE_OK is returned, *ppExpr is set to point to the\n** parsed form of the expression and *pnConsumed is set to the number of\n** bytes read from buffer z. Otherwise, *ppExpr is set to 0 and SQLITE_NOMEM\n** (out of memory error) or SQLITE_ERROR (parse error) is returned.\n*/\nstatic int fts3ExprParse(\n  ParseContext *pParse,                   /* fts3 query parse context */\n  const char *z, int n,                   /* Text of MATCH query */\n  Fts3Expr **ppExpr,                      /* OUT: Parsed query structure */\n  int *pnConsumed                         /* OUT: Number of bytes consumed */\n){\n  Fts3Expr *pRet = 0;\n  Fts3Expr *pPrev = 0;\n  Fts3Expr *pNotBranch = 0;               /* Only used in legacy parse mode */\n  int nIn = n;\n  const char *zIn = z;\n  int rc = SQLITE_OK;\n  int isRequirePhrase = 1;\n\n  while( rc==SQLITE_OK ){\n    Fts3Expr *p = 0;\n    int nByte = 0;\n\n    rc = getNextNode(pParse, zIn, nIn, &p, &nByte);\n    assert( nByte>0 || (rc!=SQLITE_OK && p==0) );\n    if( rc==SQLITE_OK ){\n      if( p ){\n        int isPhrase;\n\n        if( !sqlite3_fts3_enable_parentheses\n            && p->eType==FTSQUERY_PHRASE && pParse->isNot\n        ){\n          /* Create an implicit NOT operator. */\n          Fts3Expr *pNot = sqlite3Fts3MallocZero(sizeof(Fts3Expr));\n          if( !pNot ){\n            sqlite3Fts3ExprFree(p);\n            rc = SQLITE_NOMEM;\n            goto exprparse_out;\n          }\n          pNot->eType = FTSQUERY_NOT;\n          pNot->pRight = p;\n          p->pParent = pNot;\n          if( pNotBranch ){\n            pNot->pLeft = pNotBranch;\n            pNotBranch->pParent = pNot;\n          }\n          pNotBranch = pNot;\n          p = pPrev;\n        }else{\n          int eType = p->eType;\n          isPhrase = (eType==FTSQUERY_PHRASE || p->pLeft);\n\n          /* The isRequirePhrase variable is set to true if a phrase or\n          ** an expression contained in parenthesis is required. If a\n          ** binary operator (AND, OR, NOT or NEAR) is encountered when\n          ** isRequirePhrase is set, this is a syntax error.\n          */\n          if( !isPhrase && isRequirePhrase ){\n            sqlite3Fts3ExprFree(p);\n            rc = SQLITE_ERROR;\n            goto exprparse_out;\n          }\n\n          if( isPhrase && !isRequirePhrase ){\n            /* Insert an implicit AND operator. */\n            Fts3Expr *pAnd;\n            assert( pRet && pPrev );\n            pAnd = sqlite3Fts3MallocZero(sizeof(Fts3Expr));\n            if( !pAnd ){\n              sqlite3Fts3ExprFree(p);\n              rc = SQLITE_NOMEM;\n              goto exprparse_out;\n            }\n            pAnd->eType = FTSQUERY_AND;\n            insertBinaryOperator(&pRet, pPrev, pAnd);\n            pPrev = pAnd;\n          }\n\n          /* This test catches attempts to make either operand of a NEAR\n           ** operator something other than a phrase. For example, either of\n           ** the following:\n           **\n           **    (bracketed expression) NEAR phrase\n           **    phrase NEAR (bracketed expression)\n           **\n           ** Return an error in either case.\n           */\n          if( pPrev && (\n            (eType==FTSQUERY_NEAR && !isPhrase && pPrev->eType!=FTSQUERY_PHRASE)\n         || (eType!=FTSQUERY_PHRASE && isPhrase && pPrev->eType==FTSQUERY_NEAR)\n          )){\n            sqlite3Fts3ExprFree(p);\n            rc = SQLITE_ERROR;\n            goto exprparse_out;\n          }\n\n          if( isPhrase ){\n            if( pRet ){\n              assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );\n              pPrev->pRight = p;\n              p->pParent = pPrev;\n            }else{\n              pRet = p;\n            }\n          }else{\n            insertBinaryOperator(&pRet, pPrev, p);\n          }\n          isRequirePhrase = !isPhrase;\n        }\n        pPrev = p;\n      }\n      assert( nByte>0 );\n    }\n    assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );\n    nIn -= nByte;\n    zIn += nByte;\n  }\n\n  if( rc==SQLITE_DONE && pRet && isRequirePhrase ){\n    rc = SQLITE_ERROR;\n  }\n\n  if( rc==SQLITE_DONE ){\n    rc = SQLITE_OK;\n    if( !sqlite3_fts3_enable_parentheses && pNotBranch ){\n      if( !pRet ){\n        rc = SQLITE_ERROR;\n      }else{\n        Fts3Expr *pIter = pNotBranch;\n        while( pIter->pLeft ){\n          pIter = pIter->pLeft;\n        }\n        pIter->pLeft = pRet;\n        pRet->pParent = pIter;\n        pRet = pNotBranch;\n      }\n    }\n  }\n  *pnConsumed = n - nIn;\n\nexprparse_out:\n  if( rc!=SQLITE_OK ){\n    sqlite3Fts3ExprFree(pRet);\n    sqlite3Fts3ExprFree(pNotBranch);\n    pRet = 0;\n  }\n  *ppExpr = pRet;\n  return rc;\n}\n\n/*\n** Return SQLITE_ERROR if the maximum depth of the expression tree passed\n** as the only argument is more than nMaxDepth.\n*/\nstatic int fts3ExprCheckDepth(Fts3Expr *p, int nMaxDepth){\n  int rc = SQLITE_OK;\n  if( p ){\n    if( nMaxDepth<0 ){\n      rc = SQLITE_TOOBIG;\n    }else{\n      rc = fts3ExprCheckDepth(p->pLeft, nMaxDepth-1);\n      if( rc==SQLITE_OK ){\n        rc = fts3ExprCheckDepth(p->pRight, nMaxDepth-1);\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** This function attempts to transform the expression tree at (*pp) to\n** an equivalent but more balanced form. The tree is modified in place.\n** If successful, SQLITE_OK is returned and (*pp) set to point to the\n** new root expression node.\n**\n** nMaxDepth is the maximum allowable depth of the balanced sub-tree.\n**\n** Otherwise, if an error occurs, an SQLite error code is returned and\n** expression (*pp) freed.\n*/\nstatic int fts3ExprBalance(Fts3Expr **pp, int nMaxDepth){\n  int rc = SQLITE_OK;             /* Return code */\n  Fts3Expr *pRoot = *pp;          /* Initial root node */\n  Fts3Expr *pFree = 0;            /* List of free nodes. Linked by pParent. */\n  int eType = pRoot->eType;       /* Type of node in this tree */\n\n  if( nMaxDepth==0 ){\n    rc = SQLITE_ERROR;\n  }\n\n  if( rc==SQLITE_OK ){\n    if( (eType==FTSQUERY_AND || eType==FTSQUERY_OR) ){\n      Fts3Expr **apLeaf;\n      apLeaf = (Fts3Expr **)sqlite3_malloc64(sizeof(Fts3Expr *) * nMaxDepth);\n      if( 0==apLeaf ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memset(apLeaf, 0, sizeof(Fts3Expr *) * nMaxDepth);\n      }\n\n      if( rc==SQLITE_OK ){\n        int i;\n        Fts3Expr *p;\n\n        /* Set $p to point to the left-most leaf in the tree of eType nodes. */\n        for(p=pRoot; p->eType==eType; p=p->pLeft){\n          assert( p->pParent==0 || p->pParent->pLeft==p );\n          assert( p->pLeft && p->pRight );\n        }\n\n        /* This loop runs once for each leaf in the tree of eType nodes. */\n        while( 1 ){\n          int iLvl;\n          Fts3Expr *pParent = p->pParent;     /* Current parent of p */\n\n          assert( pParent==0 || pParent->pLeft==p );\n          p->pParent = 0;\n          if( pParent ){\n            pParent->pLeft = 0;\n          }else{\n            pRoot = 0;\n          }\n          rc = fts3ExprBalance(&p, nMaxDepth-1);\n          if( rc!=SQLITE_OK ) break;\n\n          for(iLvl=0; p && iLvl<nMaxDepth; iLvl++){\n            if( apLeaf[iLvl]==0 ){\n              apLeaf[iLvl] = p;\n              p = 0;\n            }else{\n              assert( pFree );\n              pFree->pLeft = apLeaf[iLvl];\n              pFree->pRight = p;\n              pFree->pLeft->pParent = pFree;\n              pFree->pRight->pParent = pFree;\n\n              p = pFree;\n              pFree = pFree->pParent;\n              p->pParent = 0;\n              apLeaf[iLvl] = 0;\n            }\n          }\n          if( p ){\n            sqlite3Fts3ExprFree(p);\n            rc = SQLITE_TOOBIG;\n            break;\n          }\n\n          /* If that was the last leaf node, break out of the loop */\n          if( pParent==0 ) break;\n\n          /* Set $p to point to the next leaf in the tree of eType nodes */\n          for(p=pParent->pRight; p->eType==eType; p=p->pLeft);\n\n          /* Remove pParent from the original tree. */\n          assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );\n          pParent->pRight->pParent = pParent->pParent;\n          if( pParent->pParent ){\n            pParent->pParent->pLeft = pParent->pRight;\n          }else{\n            assert( pParent==pRoot );\n            pRoot = pParent->pRight;\n          }\n\n          /* Link pParent into the free node list. It will be used as an\n          ** internal node of the new tree.  */\n          pParent->pParent = pFree;\n          pFree = pParent;\n        }\n\n        if( rc==SQLITE_OK ){\n          p = 0;\n          for(i=0; i<nMaxDepth; i++){\n            if( apLeaf[i] ){\n              if( p==0 ){\n                p = apLeaf[i];\n                p->pParent = 0;\n              }else{\n                assert( pFree!=0 );\n                pFree->pRight = p;\n                pFree->pLeft = apLeaf[i];\n                pFree->pLeft->pParent = pFree;\n                pFree->pRight->pParent = pFree;\n\n                p = pFree;\n                pFree = pFree->pParent;\n                p->pParent = 0;\n              }\n            }\n          }\n          pRoot = p;\n        }else{\n          /* An error occurred. Delete the contents of the apLeaf[] array\n          ** and pFree list. Everything else is cleaned up by the call to\n          ** sqlite3Fts3ExprFree(pRoot) below.  */\n          Fts3Expr *pDel;\n          for(i=0; i<nMaxDepth; i++){\n            sqlite3Fts3ExprFree(apLeaf[i]);\n          }\n          while( (pDel=pFree)!=0 ){\n            pFree = pDel->pParent;\n            sqlite3_free(pDel);\n          }\n        }\n\n        assert( pFree==0 );\n        sqlite3_free( apLeaf );\n      }\n    }else if( eType==FTSQUERY_NOT ){\n      Fts3Expr *pLeft = pRoot->pLeft;\n      Fts3Expr *pRight = pRoot->pRight;\n\n      pRoot->pLeft = 0;\n      pRoot->pRight = 0;\n      pLeft->pParent = 0;\n      pRight->pParent = 0;\n\n      rc = fts3ExprBalance(&pLeft, nMaxDepth-1);\n      if( rc==SQLITE_OK ){\n        rc = fts3ExprBalance(&pRight, nMaxDepth-1);\n      }\n\n      if( rc!=SQLITE_OK ){\n        sqlite3Fts3ExprFree(pRight);\n        sqlite3Fts3ExprFree(pLeft);\n      }else{\n        assert( pLeft && pRight );\n        pRoot->pLeft = pLeft;\n        pLeft->pParent = pRoot;\n        pRoot->pRight = pRight;\n        pRight->pParent = pRoot;\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3Fts3ExprFree(pRoot);\n    pRoot = 0;\n  }\n  *pp = pRoot;\n  return rc;\n}\n\n/*\n** This function is similar to sqlite3Fts3ExprParse(), with the following\n** differences:\n**\n**   1. It does not do expression rebalancing.\n**   2. It does not check that the expression does not exceed the\n**      maximum allowable depth.\n**   3. Even if it fails, *ppExpr may still be set to point to an\n**      expression tree. It should be deleted using sqlite3Fts3ExprFree()\n**      in this case.\n*/\nstatic int fts3ExprParseUnbalanced(\n  sqlite3_tokenizer *pTokenizer,      /* Tokenizer module */\n  int iLangid,                        /* Language id for tokenizer */\n  char **azCol,                       /* Array of column names for fts3 table */\n  int bFts4,                          /* True to allow FTS4-only syntax */\n  int nCol,                           /* Number of entries in azCol[] */\n  int iDefaultCol,                    /* Default column to query */\n  const char *z, int n,               /* Text of MATCH query */\n  Fts3Expr **ppExpr                   /* OUT: Parsed query structure */\n){\n  int nParsed;\n  int rc;\n  ParseContext sParse;\n\n  memset(&sParse, 0, sizeof(ParseContext));\n  sParse.pTokenizer = pTokenizer;\n  sParse.iLangid = iLangid;\n  sParse.azCol = (const char **)azCol;\n  sParse.nCol = nCol;\n  sParse.iDefaultCol = iDefaultCol;\n  sParse.bFts4 = bFts4;\n  if( z==0 ){\n    *ppExpr = 0;\n    return SQLITE_OK;\n  }\n  if( n<0 ){\n    n = (int)strlen(z);\n  }\n  rc = fts3ExprParse(&sParse, z, n, ppExpr, &nParsed);\n  assert( rc==SQLITE_OK || *ppExpr==0 );\n\n  /* Check for mismatched parenthesis */\n  if( rc==SQLITE_OK && sParse.nNest ){\n    rc = SQLITE_ERROR;\n  }\n\n  return rc;\n}\n\n/*\n** Parameters z and n contain a pointer to and length of a buffer containing\n** an fts3 query expression, respectively. This function attempts to parse the\n** query expression and create a tree of Fts3Expr structures representing the\n** parsed expression. If successful, *ppExpr is set to point to the head\n** of the parsed expression tree and SQLITE_OK is returned. If an error\n** occurs, either SQLITE_NOMEM (out-of-memory error) or SQLITE_ERROR (parse\n** error) is returned and *ppExpr is set to 0.\n**\n** If parameter n is a negative number, then z is assumed to point to a\n** nul-terminated string and the length is determined using strlen().\n**\n** The first parameter, pTokenizer, is passed the fts3 tokenizer module to\n** use to normalize query tokens while parsing the expression. The azCol[]\n** array, which is assumed to contain nCol entries, should contain the names\n** of each column in the target fts3 table, in order from left to right.\n** Column names must be nul-terminated strings.\n**\n** The iDefaultCol parameter should be passed the index of the table column\n** that appears on the left-hand-side of the MATCH operator (the default\n** column to match against for tokens for which a column name is not explicitly\n** specified as part of the query string), or -1 if tokens may by default\n** match any table column.\n*/\nSQLITE_PRIVATE int sqlite3Fts3ExprParse(\n  sqlite3_tokenizer *pTokenizer,      /* Tokenizer module */\n  int iLangid,                        /* Language id for tokenizer */\n  char **azCol,                       /* Array of column names for fts3 table */\n  int bFts4,                          /* True to allow FTS4-only syntax */\n  int nCol,                           /* Number of entries in azCol[] */\n  int iDefaultCol,                    /* Default column to query */\n  const char *z, int n,               /* Text of MATCH query */\n  Fts3Expr **ppExpr,                  /* OUT: Parsed query structure */\n  char **pzErr                        /* OUT: Error message (sqlite3_malloc) */\n){\n  int rc = fts3ExprParseUnbalanced(\n      pTokenizer, iLangid, azCol, bFts4, nCol, iDefaultCol, z, n, ppExpr\n  );\n\n  /* Rebalance the expression. And check that its depth does not exceed\n  ** SQLITE_FTS3_MAX_EXPR_DEPTH.  */\n  if( rc==SQLITE_OK && *ppExpr ){\n    rc = fts3ExprBalance(ppExpr, SQLITE_FTS3_MAX_EXPR_DEPTH);\n    if( rc==SQLITE_OK ){\n      rc = fts3ExprCheckDepth(*ppExpr, SQLITE_FTS3_MAX_EXPR_DEPTH);\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3Fts3ExprFree(*ppExpr);\n    *ppExpr = 0;\n    if( rc==SQLITE_TOOBIG ){\n      sqlite3Fts3ErrMsg(pzErr,\n          \"FTS expression tree is too large (maximum depth %d)\",\n          SQLITE_FTS3_MAX_EXPR_DEPTH\n      );\n      rc = SQLITE_ERROR;\n    }else if( rc==SQLITE_ERROR ){\n      sqlite3Fts3ErrMsg(pzErr, \"malformed MATCH expression: [%s]\", z);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Free a single node of an expression tree.\n*/\nstatic void fts3FreeExprNode(Fts3Expr *p){\n  assert( p->eType==FTSQUERY_PHRASE || p->pPhrase==0 );\n  sqlite3Fts3EvalPhraseCleanup(p->pPhrase);\n  sqlite3_free(p->aMI);\n  sqlite3_free(p);\n}\n\n/*\n** Free a parsed fts3 query expression allocated by sqlite3Fts3ExprParse().\n**\n** This function would be simpler if it recursively called itself. But\n** that would mean passing a sufficiently large expression to ExprParse()\n** could cause a stack overflow.\n*/\nSQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *pDel){\n  Fts3Expr *p;\n  assert( pDel==0 || pDel->pParent==0 );\n  for(p=pDel; p && (p->pLeft||p->pRight); p=(p->pLeft ? p->pLeft : p->pRight)){\n    assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );\n  }\n  while( p ){\n    Fts3Expr *pParent = p->pParent;\n    fts3FreeExprNode(p);\n    if( pParent && p==pParent->pLeft && pParent->pRight ){\n      p = pParent->pRight;\n      while( p && (p->pLeft || p->pRight) ){\n        assert( p==p->pParent->pRight || p==p->pParent->pLeft );\n        p = (p->pLeft ? p->pLeft : p->pRight);\n      }\n    }else{\n      p = pParent;\n    }\n  }\n}\n\n/****************************************************************************\n*****************************************************************************\n** Everything after this point is just test code.\n*/\n\n#ifdef SQLITE_TEST\n\n/* #include <stdio.h> */\n\n/*\n** Return a pointer to a buffer containing a text representation of the\n** expression passed as the first argument. The buffer is obtained from\n** sqlite3_malloc(). It is the responsibility of the caller to use\n** sqlite3_free() to release the memory. If an OOM condition is encountered,\n** NULL is returned.\n**\n** If the second argument is not NULL, then its contents are prepended to\n** the returned expression text and then freed using sqlite3_free().\n*/\nstatic char *exprToString(Fts3Expr *pExpr, char *zBuf){\n  if( pExpr==0 ){\n    return sqlite3_mprintf(\"\");\n  }\n  switch( pExpr->eType ){\n    case FTSQUERY_PHRASE: {\n      Fts3Phrase *pPhrase = pExpr->pPhrase;\n      int i;\n      zBuf = sqlite3_mprintf(\n          \"%zPHRASE %d 0\", zBuf, pPhrase->iColumn);\n      for(i=0; zBuf && i<pPhrase->nToken; i++){\n        zBuf = sqlite3_mprintf(\"%z %.*s%s\", zBuf,\n            pPhrase->aToken[i].n, pPhrase->aToken[i].z,\n            (pPhrase->aToken[i].isPrefix?\"+\":\"\")\n        );\n      }\n      return zBuf;\n    }\n\n    case FTSQUERY_NEAR:\n      zBuf = sqlite3_mprintf(\"%zNEAR/%d \", zBuf, pExpr->nNear);\n      break;\n    case FTSQUERY_NOT:\n      zBuf = sqlite3_mprintf(\"%zNOT \", zBuf);\n      break;\n    case FTSQUERY_AND:\n      zBuf = sqlite3_mprintf(\"%zAND \", zBuf);\n      break;\n    case FTSQUERY_OR:\n      zBuf = sqlite3_mprintf(\"%zOR \", zBuf);\n      break;\n  }\n\n  if( zBuf ) zBuf = sqlite3_mprintf(\"%z{\", zBuf);\n  if( zBuf ) zBuf = exprToString(pExpr->pLeft, zBuf);\n  if( zBuf ) zBuf = sqlite3_mprintf(\"%z} {\", zBuf);\n\n  if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);\n  if( zBuf ) zBuf = sqlite3_mprintf(\"%z}\", zBuf);\n\n  return zBuf;\n}\n\n/*\n** This is the implementation of a scalar SQL function used to test the\n** expression parser. It should be called as follows:\n**\n**   fts3_exprtest(<tokenizer>, <expr>, <column 1>, ...);\n**\n** The first argument, <tokenizer>, is the name of the fts3 tokenizer used\n** to parse the query expression (see README.tokenizers). The second argument\n** is the query expression to parse. Each subsequent argument is the name\n** of a column of the fts3 table that the query expression may refer to.\n** For example:\n**\n**   SELECT fts3_exprtest('simple', 'Bill col2:Bloggs', 'col1', 'col2');\n*/\nstatic void fts3ExprTestCommon(\n  int bRebalance,\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  sqlite3_tokenizer *pTokenizer = 0;\n  int rc;\n  char **azCol = 0;\n  const char *zExpr;\n  int nExpr;\n  int nCol;\n  int ii;\n  Fts3Expr *pExpr;\n  char *zBuf = 0;\n  Fts3Hash *pHash = (Fts3Hash*)sqlite3_user_data(context);\n  const char *zTokenizer = 0;\n  char *zErr = 0;\n\n  if( argc<3 ){\n    sqlite3_result_error(context,\n        \"Usage: fts3_exprtest(tokenizer, expr, col1, ...\", -1\n    );\n    return;\n  }\n\n  zTokenizer = (const char*)sqlite3_value_text(argv[0]);\n  rc = sqlite3Fts3InitTokenizer(pHash, zTokenizer, &pTokenizer, &zErr);\n  if( rc!=SQLITE_OK ){\n    if( rc==SQLITE_NOMEM ){\n      sqlite3_result_error_nomem(context);\n    }else{\n      sqlite3_result_error(context, zErr, -1);\n    }\n    sqlite3_free(zErr);\n    return;\n  }\n\n  zExpr = (const char *)sqlite3_value_text(argv[1]);\n  nExpr = sqlite3_value_bytes(argv[1]);\n  nCol = argc-2;\n  azCol = (char **)sqlite3_malloc64(nCol*sizeof(char *));\n  if( !azCol ){\n    sqlite3_result_error_nomem(context);\n    goto exprtest_out;\n  }\n  for(ii=0; ii<nCol; ii++){\n    azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);\n  }\n\n  if( bRebalance ){\n    char *zDummy = 0;\n    rc = sqlite3Fts3ExprParse(\n        pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr, &zDummy\n    );\n    assert( rc==SQLITE_OK || pExpr==0 );\n    sqlite3_free(zDummy);\n  }else{\n    rc = fts3ExprParseUnbalanced(\n        pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr\n    );\n  }\n\n  if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM ){\n    sqlite3_result_error(context, \"Error parsing expression\", -1);\n  }else if( rc==SQLITE_NOMEM || !(zBuf = exprToString(pExpr, 0)) ){\n    sqlite3_result_error_nomem(context);\n  }else{\n    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);\n    sqlite3_free(zBuf);\n  }\n\n  sqlite3Fts3ExprFree(pExpr);\n\nexprtest_out:\n  if( pTokenizer ){\n    rc = pTokenizer->pModule->xDestroy(pTokenizer);\n  }\n  sqlite3_free(azCol);\n}\n\nstatic void fts3ExprTest(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  fts3ExprTestCommon(0, context, argc, argv);\n}\nstatic void fts3ExprTestRebalance(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  fts3ExprTestCommon(1, context, argc, argv);\n}\n\n/*\n** Register the query expression parser test function fts3_exprtest()\n** with database connection db.\n*/\nSQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash *pHash){\n  int rc = sqlite3_create_function(\n      db, \"fts3_exprtest\", -1, SQLITE_UTF8, (void*)pHash, fts3ExprTest, 0, 0\n  );\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_function(db, \"fts3_exprtest_rebalance\",\n        -1, SQLITE_UTF8, (void*)pHash, fts3ExprTestRebalance, 0, 0\n    );\n  }\n  return rc;\n}\n\n#endif\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_expr.c *******************************************/\n/************** Begin file fts3_hash.c ***************************************/\n/*\n** 2001 September 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This is the implementation of generic hash-tables used in SQLite.\n** We've modified it slightly to serve as a standalone hash table\n** implementation for the full-text indexing module.\n*/\n\n/*\n** The code in this file is only compiled if:\n**\n**     * The FTS3 module is being built as an extension\n**       (in which case SQLITE_CORE is not defined), or\n**\n**     * The FTS3 module is being built into the core of\n**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <string.h> */\n\n/* #include \"fts3_hash.h\" */\n\n/*\n** Malloc and Free functions\n*/\nstatic void *fts3HashMalloc(sqlite3_int64 n){\n  void *p = sqlite3_malloc64(n);\n  if( p ){\n    memset(p, 0, n);\n  }\n  return p;\n}\nstatic void fts3HashFree(void *p){\n  sqlite3_free(p);\n}\n\n/* Turn bulk memory into a hash table object by initializing the\n** fields of the Hash structure.\n**\n** \"pNew\" is a pointer to the hash table that is to be initialized.\n** keyClass is one of the constants\n** FTS3_HASH_BINARY or FTS3_HASH_STRING.  The value of keyClass\n** determines what kind of key the hash table will use.  \"copyKey\" is\n** true if the hash table should make its own private copy of keys and\n** false if it should just use the supplied pointer.\n*/\nSQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey){\n  assert( pNew!=0 );\n  assert( keyClass>=FTS3_HASH_STRING && keyClass<=FTS3_HASH_BINARY );\n  pNew->keyClass = keyClass;\n  pNew->copyKey = copyKey;\n  pNew->first = 0;\n  pNew->count = 0;\n  pNew->htsize = 0;\n  pNew->ht = 0;\n}\n\n/* Remove all entries from a hash table.  Reclaim all memory.\n** Call this routine to delete a hash table or to reset a hash table\n** to the empty state.\n*/\nSQLITE_PRIVATE void sqlite3Fts3HashClear(Fts3Hash *pH){\n  Fts3HashElem *elem;         /* For looping over all elements of the table */\n\n  assert( pH!=0 );\n  elem = pH->first;\n  pH->first = 0;\n  fts3HashFree(pH->ht);\n  pH->ht = 0;\n  pH->htsize = 0;\n  while( elem ){\n    Fts3HashElem *next_elem = elem->next;\n    if( pH->copyKey && elem->pKey ){\n      fts3HashFree(elem->pKey);\n    }\n    fts3HashFree(elem);\n    elem = next_elem;\n  }\n  pH->count = 0;\n}\n\n/*\n** Hash and comparison functions when the mode is FTS3_HASH_STRING\n*/\nstatic int fts3StrHash(const void *pKey, int nKey){\n  const char *z = (const char *)pKey;\n  unsigned h = 0;\n  if( nKey<=0 ) nKey = (int) strlen(z);\n  while( nKey > 0  ){\n    h = (h<<3) ^ h ^ *z++;\n    nKey--;\n  }\n  return (int)(h & 0x7fffffff);\n}\nstatic int fts3StrCompare(const void *pKey1, int n1, const void *pKey2, int n2){\n  if( n1!=n2 ) return 1;\n  return strncmp((const char*)pKey1,(const char*)pKey2,n1);\n}\n\n/*\n** Hash and comparison functions when the mode is FTS3_HASH_BINARY\n*/\nstatic int fts3BinHash(const void *pKey, int nKey){\n  int h = 0;\n  const char *z = (const char *)pKey;\n  while( nKey-- > 0 ){\n    h = (h<<3) ^ h ^ *(z++);\n  }\n  return h & 0x7fffffff;\n}\nstatic int fts3BinCompare(const void *pKey1, int n1, const void *pKey2, int n2){\n  if( n1!=n2 ) return 1;\n  return memcmp(pKey1,pKey2,n1);\n}\n\n/*\n** Return a pointer to the appropriate hash function given the key class.\n**\n** The C syntax in this function definition may be unfamilar to some\n** programmers, so we provide the following additional explanation:\n**\n** The name of the function is \"ftsHashFunction\".  The function takes a\n** single parameter \"keyClass\".  The return value of ftsHashFunction()\n** is a pointer to another function.  Specifically, the return value\n** of ftsHashFunction() is a pointer to a function that takes two parameters\n** with types \"const void*\" and \"int\" and returns an \"int\".\n*/\nstatic int (*ftsHashFunction(int keyClass))(const void*,int){\n  if( keyClass==FTS3_HASH_STRING ){\n    return &fts3StrHash;\n  }else{\n    assert( keyClass==FTS3_HASH_BINARY );\n    return &fts3BinHash;\n  }\n}\n\n/*\n** Return a pointer to the appropriate hash function given the key class.\n**\n** For help in interpreted the obscure C code in the function definition,\n** see the header comment on the previous function.\n*/\nstatic int (*ftsCompareFunction(int keyClass))(const void*,int,const void*,int){\n  if( keyClass==FTS3_HASH_STRING ){\n    return &fts3StrCompare;\n  }else{\n    assert( keyClass==FTS3_HASH_BINARY );\n    return &fts3BinCompare;\n  }\n}\n\n/* Link an element into the hash table\n*/\nstatic void fts3HashInsertElement(\n  Fts3Hash *pH,            /* The complete hash table */\n  struct _fts3ht *pEntry,  /* The entry into which pNew is inserted */\n  Fts3HashElem *pNew       /* The element to be inserted */\n){\n  Fts3HashElem *pHead;     /* First element already in pEntry */\n  pHead = pEntry->chain;\n  if( pHead ){\n    pNew->next = pHead;\n    pNew->prev = pHead->prev;\n    if( pHead->prev ){ pHead->prev->next = pNew; }\n    else             { pH->first = pNew; }\n    pHead->prev = pNew;\n  }else{\n    pNew->next = pH->first;\n    if( pH->first ){ pH->first->prev = pNew; }\n    pNew->prev = 0;\n    pH->first = pNew;\n  }\n  pEntry->count++;\n  pEntry->chain = pNew;\n}\n\n\n/* Resize the hash table so that it contains \"new_size\" buckets.\n** \"new_size\" must be a power of 2.  The hash table might fail\n** to resize if sqliteMalloc() fails.\n**\n** Return non-zero if a memory allocation error occurs.\n*/\nstatic int fts3Rehash(Fts3Hash *pH, int new_size){\n  struct _fts3ht *new_ht;          /* The new hash table */\n  Fts3HashElem *elem, *next_elem;  /* For looping over existing elements */\n  int (*xHash)(const void*,int);   /* The hash function */\n\n  assert( (new_size & (new_size-1))==0 );\n  new_ht = (struct _fts3ht *)fts3HashMalloc( new_size*sizeof(struct _fts3ht) );\n  if( new_ht==0 ) return 1;\n  fts3HashFree(pH->ht);\n  pH->ht = new_ht;\n  pH->htsize = new_size;\n  xHash = ftsHashFunction(pH->keyClass);\n  for(elem=pH->first, pH->first=0; elem; elem = next_elem){\n    int h = (*xHash)(elem->pKey, elem->nKey) & (new_size-1);\n    next_elem = elem->next;\n    fts3HashInsertElement(pH, &new_ht[h], elem);\n  }\n  return 0;\n}\n\n/* This function (for internal use only) locates an element in an\n** hash table that matches the given key.  The hash for this key has\n** already been computed and is passed as the 4th parameter.\n*/\nstatic Fts3HashElem *fts3FindElementByHash(\n  const Fts3Hash *pH, /* The pH to be searched */\n  const void *pKey,   /* The key we are searching for */\n  int nKey,\n  int h               /* The hash for this key. */\n){\n  Fts3HashElem *elem;            /* Used to loop thru the element list */\n  int count;                     /* Number of elements left to test */\n  int (*xCompare)(const void*,int,const void*,int);  /* comparison function */\n\n  if( pH->ht ){\n    struct _fts3ht *pEntry = &pH->ht[h];\n    elem = pEntry->chain;\n    count = pEntry->count;\n    xCompare = ftsCompareFunction(pH->keyClass);\n    while( count-- && elem ){\n      if( (*xCompare)(elem->pKey,elem->nKey,pKey,nKey)==0 ){\n        return elem;\n      }\n      elem = elem->next;\n    }\n  }\n  return 0;\n}\n\n/* Remove a single entry from the hash table given a pointer to that\n** element and a hash on the element's key.\n*/\nstatic void fts3RemoveElementByHash(\n  Fts3Hash *pH,         /* The pH containing \"elem\" */\n  Fts3HashElem* elem,   /* The element to be removed from the pH */\n  int h                 /* Hash value for the element */\n){\n  struct _fts3ht *pEntry;\n  if( elem->prev ){\n    elem->prev->next = elem->next;\n  }else{\n    pH->first = elem->next;\n  }\n  if( elem->next ){\n    elem->next->prev = elem->prev;\n  }\n  pEntry = &pH->ht[h];\n  if( pEntry->chain==elem ){\n    pEntry->chain = elem->next;\n  }\n  pEntry->count--;\n  if( pEntry->count<=0 ){\n    pEntry->chain = 0;\n  }\n  if( pH->copyKey && elem->pKey ){\n    fts3HashFree(elem->pKey);\n  }\n  fts3HashFree( elem );\n  pH->count--;\n  if( pH->count<=0 ){\n    assert( pH->first==0 );\n    assert( pH->count==0 );\n    fts3HashClear(pH);\n  }\n}\n\nSQLITE_PRIVATE Fts3HashElem *sqlite3Fts3HashFindElem(\n  const Fts3Hash *pH,\n  const void *pKey,\n  int nKey\n){\n  int h;                          /* A hash on key */\n  int (*xHash)(const void*,int);  /* The hash function */\n\n  if( pH==0 || pH->ht==0 ) return 0;\n  xHash = ftsHashFunction(pH->keyClass);\n  assert( xHash!=0 );\n  h = (*xHash)(pKey,nKey);\n  assert( (pH->htsize & (pH->htsize-1))==0 );\n  return fts3FindElementByHash(pH,pKey,nKey, h & (pH->htsize-1));\n}\n\n/*\n** Attempt to locate an element of the hash table pH with a key\n** that matches pKey,nKey.  Return the data for this element if it is\n** found, or NULL if there is no match.\n*/\nSQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash *pH, const void *pKey, int nKey){\n  Fts3HashElem *pElem;            /* The element that matches key (if any) */\n\n  pElem = sqlite3Fts3HashFindElem(pH, pKey, nKey);\n  return pElem ? pElem->data : 0;\n}\n\n/* Insert an element into the hash table pH.  The key is pKey,nKey\n** and the data is \"data\".\n**\n** If no element exists with a matching key, then a new\n** element is created.  A copy of the key is made if the copyKey\n** flag is set.  NULL is returned.\n**\n** If another element already exists with the same key, then the\n** new data replaces the old data and the old data is returned.\n** The key is not copied in this instance.  If a malloc fails, then\n** the new data is returned and the hash table is unchanged.\n**\n** If the \"data\" parameter to this function is NULL, then the\n** element corresponding to \"key\" is removed from the hash table.\n*/\nSQLITE_PRIVATE void *sqlite3Fts3HashInsert(\n  Fts3Hash *pH,        /* The hash table to insert into */\n  const void *pKey,    /* The key */\n  int nKey,            /* Number of bytes in the key */\n  void *data           /* The data */\n){\n  int hraw;                 /* Raw hash value of the key */\n  int h;                    /* the hash of the key modulo hash table size */\n  Fts3HashElem *elem;       /* Used to loop thru the element list */\n  Fts3HashElem *new_elem;   /* New element added to the pH */\n  int (*xHash)(const void*,int);  /* The hash function */\n\n  assert( pH!=0 );\n  xHash = ftsHashFunction(pH->keyClass);\n  assert( xHash!=0 );\n  hraw = (*xHash)(pKey, nKey);\n  assert( (pH->htsize & (pH->htsize-1))==0 );\n  h = hraw & (pH->htsize-1);\n  elem = fts3FindElementByHash(pH,pKey,nKey,h);\n  if( elem ){\n    void *old_data = elem->data;\n    if( data==0 ){\n      fts3RemoveElementByHash(pH,elem,h);\n    }else{\n      elem->data = data;\n    }\n    return old_data;\n  }\n  if( data==0 ) return 0;\n  if( (pH->htsize==0 && fts3Rehash(pH,8))\n   || (pH->count>=pH->htsize && fts3Rehash(pH, pH->htsize*2))\n  ){\n    pH->count = 0;\n    return data;\n  }\n  assert( pH->htsize>0 );\n  new_elem = (Fts3HashElem*)fts3HashMalloc( sizeof(Fts3HashElem) );\n  if( new_elem==0 ) return data;\n  if( pH->copyKey && pKey!=0 ){\n    new_elem->pKey = fts3HashMalloc( nKey );\n    if( new_elem->pKey==0 ){\n      fts3HashFree(new_elem);\n      return data;\n    }\n    memcpy((void*)new_elem->pKey, pKey, nKey);\n  }else{\n    new_elem->pKey = (void*)pKey;\n  }\n  new_elem->nKey = nKey;\n  pH->count++;\n  assert( pH->htsize>0 );\n  assert( (pH->htsize & (pH->htsize-1))==0 );\n  h = hraw & (pH->htsize-1);\n  fts3HashInsertElement(pH, &pH->ht[h], new_elem);\n  new_elem->data = data;\n  return 0;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_hash.c *******************************************/\n/************** Begin file fts3_porter.c *************************************/\n/*\n** 2006 September 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Implementation of the full-text-search tokenizer that implements\n** a Porter stemmer.\n*/\n\n/*\n** The code in this file is only compiled if:\n**\n**     * The FTS3 module is being built as an extension\n**       (in which case SQLITE_CORE is not defined), or\n**\n**     * The FTS3 module is being built into the core of\n**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <stdio.h> */\n/* #include <string.h> */\n\n/* #include \"fts3_tokenizer.h\" */\n\n/*\n** Class derived from sqlite3_tokenizer\n*/\ntypedef struct porter_tokenizer {\n  sqlite3_tokenizer base;      /* Base class */\n} porter_tokenizer;\n\n/*\n** Class derived from sqlite3_tokenizer_cursor\n*/\ntypedef struct porter_tokenizer_cursor {\n  sqlite3_tokenizer_cursor base;\n  const char *zInput;          /* input we are tokenizing */\n  int nInput;                  /* size of the input */\n  int iOffset;                 /* current position in zInput */\n  int iToken;                  /* index of next token to be returned */\n  char *zToken;                /* storage for current token */\n  int nAllocated;              /* space allocated to zToken buffer */\n} porter_tokenizer_cursor;\n\n\n/*\n** Create a new tokenizer instance.\n*/\nstatic int porterCreate(\n  int argc, const char * const *argv,\n  sqlite3_tokenizer **ppTokenizer\n){\n  porter_tokenizer *t;\n\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(argv);\n\n  t = (porter_tokenizer *) sqlite3_malloc(sizeof(*t));\n  if( t==NULL ) return SQLITE_NOMEM;\n  memset(t, 0, sizeof(*t));\n  *ppTokenizer = &t->base;\n  return SQLITE_OK;\n}\n\n/*\n** Destroy a tokenizer\n*/\nstatic int porterDestroy(sqlite3_tokenizer *pTokenizer){\n  sqlite3_free(pTokenizer);\n  return SQLITE_OK;\n}\n\n/*\n** Prepare to begin tokenizing a particular string.  The input\n** string to be tokenized is zInput[0..nInput-1].  A cursor\n** used to incrementally tokenize this string is returned in\n** *ppCursor.\n*/\nstatic int porterOpen(\n  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */\n  const char *zInput, int nInput,        /* String to be tokenized */\n  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */\n){\n  porter_tokenizer_cursor *c;\n\n  UNUSED_PARAMETER(pTokenizer);\n\n  c = (porter_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));\n  if( c==NULL ) return SQLITE_NOMEM;\n\n  c->zInput = zInput;\n  if( zInput==0 ){\n    c->nInput = 0;\n  }else if( nInput<0 ){\n    c->nInput = (int)strlen(zInput);\n  }else{\n    c->nInput = nInput;\n  }\n  c->iOffset = 0;                 /* start tokenizing at the beginning */\n  c->iToken = 0;\n  c->zToken = NULL;               /* no space allocated, yet. */\n  c->nAllocated = 0;\n\n  *ppCursor = &c->base;\n  return SQLITE_OK;\n}\n\n/*\n** Close a tokenization cursor previously opened by a call to\n** porterOpen() above.\n*/\nstatic int porterClose(sqlite3_tokenizer_cursor *pCursor){\n  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;\n  sqlite3_free(c->zToken);\n  sqlite3_free(c);\n  return SQLITE_OK;\n}\n/*\n** Vowel or consonant\n*/\nstatic const char cType[] = {\n   0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,\n   1, 1, 1, 2, 1\n};\n\n/*\n** isConsonant() and isVowel() determine if their first character in\n** the string they point to is a consonant or a vowel, according\n** to Porter ruls.\n**\n** A consonate is any letter other than 'a', 'e', 'i', 'o', or 'u'.\n** 'Y' is a consonant unless it follows another consonant,\n** in which case it is a vowel.\n**\n** In these routine, the letters are in reverse order.  So the 'y' rule\n** is that 'y' is a consonant unless it is followed by another\n** consonent.\n*/\nstatic int isVowel(const char*);\nstatic int isConsonant(const char *z){\n  int j;\n  char x = *z;\n  if( x==0 ) return 0;\n  assert( x>='a' && x<='z' );\n  j = cType[x-'a'];\n  if( j<2 ) return j;\n  return z[1]==0 || isVowel(z + 1);\n}\nstatic int isVowel(const char *z){\n  int j;\n  char x = *z;\n  if( x==0 ) return 0;\n  assert( x>='a' && x<='z' );\n  j = cType[x-'a'];\n  if( j<2 ) return 1-j;\n  return isConsonant(z + 1);\n}\n\n/*\n** Let any sequence of one or more vowels be represented by V and let\n** C be sequence of one or more consonants.  Then every word can be\n** represented as:\n**\n**           [C] (VC){m} [V]\n**\n** In prose:  A word is an optional consonant followed by zero or\n** vowel-consonant pairs followed by an optional vowel.  \"m\" is the\n** number of vowel consonant pairs.  This routine computes the value\n** of m for the first i bytes of a word.\n**\n** Return true if the m-value for z is 1 or more.  In other words,\n** return true if z contains at least one vowel that is followed\n** by a consonant.\n**\n** In this routine z[] is in reverse order.  So we are really looking\n** for an instance of a consonant followed by a vowel.\n*/\nstatic int m_gt_0(const char *z){\n  while( isVowel(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isConsonant(z) ){ z++; }\n  return *z!=0;\n}\n\n/* Like mgt0 above except we are looking for a value of m which is\n** exactly 1\n*/\nstatic int m_eq_1(const char *z){\n  while( isVowel(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isConsonant(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isVowel(z) ){ z++; }\n  if( *z==0 ) return 1;\n  while( isConsonant(z) ){ z++; }\n  return *z==0;\n}\n\n/* Like mgt0 above except we are looking for a value of m>1 instead\n** or m>0\n*/\nstatic int m_gt_1(const char *z){\n  while( isVowel(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isConsonant(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isVowel(z) ){ z++; }\n  if( *z==0 ) return 0;\n  while( isConsonant(z) ){ z++; }\n  return *z!=0;\n}\n\n/*\n** Return TRUE if there is a vowel anywhere within z[0..n-1]\n*/\nstatic int hasVowel(const char *z){\n  while( isConsonant(z) ){ z++; }\n  return *z!=0;\n}\n\n/*\n** Return TRUE if the word ends in a double consonant.\n**\n** The text is reversed here. So we are really looking at\n** the first two characters of z[].\n*/\nstatic int doubleConsonant(const char *z){\n  return isConsonant(z) && z[0]==z[1];\n}\n\n/*\n** Return TRUE if the word ends with three letters which\n** are consonant-vowel-consonent and where the final consonant\n** is not 'w', 'x', or 'y'.\n**\n** The word is reversed here.  So we are really checking the\n** first three letters and the first one cannot be in [wxy].\n*/\nstatic int star_oh(const char *z){\n  return\n    isConsonant(z) &&\n    z[0]!='w' && z[0]!='x' && z[0]!='y' &&\n    isVowel(z+1) &&\n    isConsonant(z+2);\n}\n\n/*\n** If the word ends with zFrom and xCond() is true for the stem\n** of the word that precedes the zFrom ending, then change the\n** ending to zTo.\n**\n** The input word *pz and zFrom are both in reverse order.  zTo\n** is in normal order.\n**\n** Return TRUE if zFrom matches.  Return FALSE if zFrom does not\n** match.  Not that TRUE is returned even if xCond() fails and\n** no substitution occurs.\n*/\nstatic int stem(\n  char **pz,             /* The word being stemmed (Reversed) */\n  const char *zFrom,     /* If the ending matches this... (Reversed) */\n  const char *zTo,       /* ... change the ending to this (not reversed) */\n  int (*xCond)(const char*)   /* Condition that must be true */\n){\n  char *z = *pz;\n  while( *zFrom && *zFrom==*z ){ z++; zFrom++; }\n  if( *zFrom!=0 ) return 0;\n  if( xCond && !xCond(z) ) return 1;\n  while( *zTo ){\n    *(--z) = *(zTo++);\n  }\n  *pz = z;\n  return 1;\n}\n\n/*\n** This is the fallback stemmer used when the porter stemmer is\n** inappropriate.  The input word is copied into the output with\n** US-ASCII case folding.  If the input word is too long (more\n** than 20 bytes if it contains no digits or more than 6 bytes if\n** it contains digits) then word is truncated to 20 or 6 bytes\n** by taking 10 or 3 bytes from the beginning and end.\n*/\nstatic void copy_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){\n  int i, mx, j;\n  int hasDigit = 0;\n  for(i=0; i<nIn; i++){\n    char c = zIn[i];\n    if( c>='A' && c<='Z' ){\n      zOut[i] = c - 'A' + 'a';\n    }else{\n      if( c>='0' && c<='9' ) hasDigit = 1;\n      zOut[i] = c;\n    }\n  }\n  mx = hasDigit ? 3 : 10;\n  if( nIn>mx*2 ){\n    for(j=mx, i=nIn-mx; i<nIn; i++, j++){\n      zOut[j] = zOut[i];\n    }\n    i = j;\n  }\n  zOut[i] = 0;\n  *pnOut = i;\n}\n\n\n/*\n** Stem the input word zIn[0..nIn-1].  Store the output in zOut.\n** zOut is at least big enough to hold nIn bytes.  Write the actual\n** size of the output word (exclusive of the '\\0' terminator) into *pnOut.\n**\n** Any upper-case characters in the US-ASCII character set ([A-Z])\n** are converted to lower case.  Upper-case UTF characters are\n** unchanged.\n**\n** Words that are longer than about 20 bytes are stemmed by retaining\n** a few bytes from the beginning and the end of the word.  If the\n** word contains digits, 3 bytes are taken from the beginning and\n** 3 bytes from the end.  For long words without digits, 10 bytes\n** are taken from each end.  US-ASCII case folding still applies.\n**\n** If the input word contains not digits but does characters not\n** in [a-zA-Z] then no stemming is attempted and this routine just\n** copies the input into the input into the output with US-ASCII\n** case folding.\n**\n** Stemming never increases the length of the word.  So there is\n** no chance of overflowing the zOut buffer.\n*/\nstatic void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){\n  int i, j;\n  char zReverse[28];\n  char *z, *z2;\n  if( nIn<3 || nIn>=(int)sizeof(zReverse)-7 ){\n    /* The word is too big or too small for the porter stemmer.\n    ** Fallback to the copy stemmer */\n    copy_stemmer(zIn, nIn, zOut, pnOut);\n    return;\n  }\n  for(i=0, j=sizeof(zReverse)-6; i<nIn; i++, j--){\n    char c = zIn[i];\n    if( c>='A' && c<='Z' ){\n      zReverse[j] = c + 'a' - 'A';\n    }else if( c>='a' && c<='z' ){\n      zReverse[j] = c;\n    }else{\n      /* The use of a character not in [a-zA-Z] means that we fallback\n      ** to the copy stemmer */\n      copy_stemmer(zIn, nIn, zOut, pnOut);\n      return;\n    }\n  }\n  memset(&zReverse[sizeof(zReverse)-5], 0, 5);\n  z = &zReverse[j+1];\n\n\n  /* Step 1a */\n  if( z[0]=='s' ){\n    if(\n     !stem(&z, \"sess\", \"ss\", 0) &&\n     !stem(&z, \"sei\", \"i\", 0)  &&\n     !stem(&z, \"ss\", \"ss\", 0)\n    ){\n      z++;\n    }\n  }\n\n  /* Step 1b */\n  z2 = z;\n  if( stem(&z, \"dee\", \"ee\", m_gt_0) ){\n    /* Do nothing.  The work was all in the test */\n  }else if(\n     (stem(&z, \"gni\", \"\", hasVowel) || stem(&z, \"de\", \"\", hasVowel))\n      && z!=z2\n  ){\n     if( stem(&z, \"ta\", \"ate\", 0) ||\n         stem(&z, \"lb\", \"ble\", 0) ||\n         stem(&z, \"zi\", \"ize\", 0) ){\n       /* Do nothing.  The work was all in the test */\n     }else if( doubleConsonant(z) && (*z!='l' && *z!='s' && *z!='z') ){\n       z++;\n     }else if( m_eq_1(z) && star_oh(z) ){\n       *(--z) = 'e';\n     }\n  }\n\n  /* Step 1c */\n  if( z[0]=='y' && hasVowel(z+1) ){\n    z[0] = 'i';\n  }\n\n  /* Step 2 */\n  switch( z[1] ){\n   case 'a':\n     if( !stem(&z, \"lanoita\", \"ate\", m_gt_0) ){\n       stem(&z, \"lanoit\", \"tion\", m_gt_0);\n     }\n     break;\n   case 'c':\n     if( !stem(&z, \"icne\", \"ence\", m_gt_0) ){\n       stem(&z, \"icna\", \"ance\", m_gt_0);\n     }\n     break;\n   case 'e':\n     stem(&z, \"rezi\", \"ize\", m_gt_0);\n     break;\n   case 'g':\n     stem(&z, \"igol\", \"log\", m_gt_0);\n     break;\n   case 'l':\n     if( !stem(&z, \"ilb\", \"ble\", m_gt_0)\n      && !stem(&z, \"illa\", \"al\", m_gt_0)\n      && !stem(&z, \"iltne\", \"ent\", m_gt_0)\n      && !stem(&z, \"ile\", \"e\", m_gt_0)\n     ){\n       stem(&z, \"ilsuo\", \"ous\", m_gt_0);\n     }\n     break;\n   case 'o':\n     if( !stem(&z, \"noitazi\", \"ize\", m_gt_0)\n      && !stem(&z, \"noita\", \"ate\", m_gt_0)\n     ){\n       stem(&z, \"rota\", \"ate\", m_gt_0);\n     }\n     break;\n   case 's':\n     if( !stem(&z, \"msila\", \"al\", m_gt_0)\n      && !stem(&z, \"ssenevi\", \"ive\", m_gt_0)\n      && !stem(&z, \"ssenluf\", \"ful\", m_gt_0)\n     ){\n       stem(&z, \"ssensuo\", \"ous\", m_gt_0);\n     }\n     break;\n   case 't':\n     if( !stem(&z, \"itila\", \"al\", m_gt_0)\n      && !stem(&z, \"itivi\", \"ive\", m_gt_0)\n     ){\n       stem(&z, \"itilib\", \"ble\", m_gt_0);\n     }\n     break;\n  }\n\n  /* Step 3 */\n  switch( z[0] ){\n   case 'e':\n     if( !stem(&z, \"etaci\", \"ic\", m_gt_0)\n      && !stem(&z, \"evita\", \"\", m_gt_0)\n     ){\n       stem(&z, \"ezila\", \"al\", m_gt_0);\n     }\n     break;\n   case 'i':\n     stem(&z, \"itici\", \"ic\", m_gt_0);\n     break;\n   case 'l':\n     if( !stem(&z, \"laci\", \"ic\", m_gt_0) ){\n       stem(&z, \"luf\", \"\", m_gt_0);\n     }\n     break;\n   case 's':\n     stem(&z, \"ssen\", \"\", m_gt_0);\n     break;\n  }\n\n  /* Step 4 */\n  switch( z[1] ){\n   case 'a':\n     if( z[0]=='l' && m_gt_1(z+2) ){\n       z += 2;\n     }\n     break;\n   case 'c':\n     if( z[0]=='e' && z[2]=='n' && (z[3]=='a' || z[3]=='e')  && m_gt_1(z+4)  ){\n       z += 4;\n     }\n     break;\n   case 'e':\n     if( z[0]=='r' && m_gt_1(z+2) ){\n       z += 2;\n     }\n     break;\n   case 'i':\n     if( z[0]=='c' && m_gt_1(z+2) ){\n       z += 2;\n     }\n     break;\n   case 'l':\n     if( z[0]=='e' && z[2]=='b' && (z[3]=='a' || z[3]=='i') && m_gt_1(z+4) ){\n       z += 4;\n     }\n     break;\n   case 'n':\n     if( z[0]=='t' ){\n       if( z[2]=='a' ){\n         if( m_gt_1(z+3) ){\n           z += 3;\n         }\n       }else if( z[2]=='e' ){\n         if( !stem(&z, \"tneme\", \"\", m_gt_1)\n          && !stem(&z, \"tnem\", \"\", m_gt_1)\n         ){\n           stem(&z, \"tne\", \"\", m_gt_1);\n         }\n       }\n     }\n     break;\n   case 'o':\n     if( z[0]=='u' ){\n       if( m_gt_1(z+2) ){\n         z += 2;\n       }\n     }else if( z[3]=='s' || z[3]=='t' ){\n       stem(&z, \"noi\", \"\", m_gt_1);\n     }\n     break;\n   case 's':\n     if( z[0]=='m' && z[2]=='i' && m_gt_1(z+3) ){\n       z += 3;\n     }\n     break;\n   case 't':\n     if( !stem(&z, \"eta\", \"\", m_gt_1) ){\n       stem(&z, \"iti\", \"\", m_gt_1);\n     }\n     break;\n   case 'u':\n     if( z[0]=='s' && z[2]=='o' && m_gt_1(z+3) ){\n       z += 3;\n     }\n     break;\n   case 'v':\n   case 'z':\n     if( z[0]=='e' && z[2]=='i' && m_gt_1(z+3) ){\n       z += 3;\n     }\n     break;\n  }\n\n  /* Step 5a */\n  if( z[0]=='e' ){\n    if( m_gt_1(z+1) ){\n      z++;\n    }else if( m_eq_1(z+1) && !star_oh(z+1) ){\n      z++;\n    }\n  }\n\n  /* Step 5b */\n  if( m_gt_1(z) && z[0]=='l' && z[1]=='l' ){\n    z++;\n  }\n\n  /* z[] is now the stemmed word in reverse order.  Flip it back\n  ** around into forward order and return.\n  */\n  *pnOut = i = (int)strlen(z);\n  zOut[i] = 0;\n  while( *z ){\n    zOut[--i] = *(z++);\n  }\n}\n\n/*\n** Characters that can be part of a token.  We assume any character\n** whose value is greater than 0x80 (any UTF character) can be\n** part of a token.  In other words, delimiters all must have\n** values of 0x7f or lower.\n*/\nstatic const char porterIdChar[] = {\n/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */\n};\n#define isDelim(C) (((ch=C)&0x80)==0 && (ch<0x30 || !porterIdChar[ch-0x30]))\n\n/*\n** Extract the next token from a tokenization cursor.  The cursor must\n** have been opened by a prior call to porterOpen().\n*/\nstatic int porterNext(\n  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by porterOpen */\n  const char **pzToken,               /* OUT: *pzToken is the token text */\n  int *pnBytes,                       /* OUT: Number of bytes in token */\n  int *piStartOffset,                 /* OUT: Starting offset of token */\n  int *piEndOffset,                   /* OUT: Ending offset of token */\n  int *piPosition                     /* OUT: Position integer of token */\n){\n  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;\n  const char *z = c->zInput;\n\n  while( c->iOffset<c->nInput ){\n    int iStartOffset, ch;\n\n    /* Scan past delimiter characters */\n    while( c->iOffset<c->nInput && isDelim(z[c->iOffset]) ){\n      c->iOffset++;\n    }\n\n    /* Count non-delimiter characters. */\n    iStartOffset = c->iOffset;\n    while( c->iOffset<c->nInput && !isDelim(z[c->iOffset]) ){\n      c->iOffset++;\n    }\n\n    if( c->iOffset>iStartOffset ){\n      int n = c->iOffset-iStartOffset;\n      if( n>c->nAllocated ){\n        char *pNew;\n        c->nAllocated = n+20;\n        pNew = sqlite3_realloc64(c->zToken, c->nAllocated);\n        if( !pNew ) return SQLITE_NOMEM;\n        c->zToken = pNew;\n      }\n      porter_stemmer(&z[iStartOffset], n, c->zToken, pnBytes);\n      *pzToken = c->zToken;\n      *piStartOffset = iStartOffset;\n      *piEndOffset = c->iOffset;\n      *piPosition = c->iToken++;\n      return SQLITE_OK;\n    }\n  }\n  return SQLITE_DONE;\n}\n\n/*\n** The set of routines that implement the porter-stemmer tokenizer\n*/\nstatic const sqlite3_tokenizer_module porterTokenizerModule = {\n  0,\n  porterCreate,\n  porterDestroy,\n  porterOpen,\n  porterClose,\n  porterNext,\n  0\n};\n\n/*\n** Allocate a new porter tokenizer.  Return a pointer to the new\n** tokenizer in *ppModule\n*/\nSQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(\n  sqlite3_tokenizer_module const**ppModule\n){\n  *ppModule = &porterTokenizerModule;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_porter.c *****************************************/\n/************** Begin file fts3_tokenizer.c **********************************/\n/*\n** 2007 June 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This is part of an SQLite module implementing full-text search.\n** This particular file implements the generic tokenizer interface.\n*/\n\n/*\n** The code in this file is only compiled if:\n**\n**     * The FTS3 module is being built as an extension\n**       (in which case SQLITE_CORE is not defined), or\n**\n**     * The FTS3 module is being built into the core of\n**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <assert.h> */\n/* #include <string.h> */\n\n/*\n** Return true if the two-argument version of fts3_tokenizer()\n** has been activated via a prior call to sqlite3_db_config(db,\n** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);\n*/\nstatic int fts3TokenizerEnabled(sqlite3_context *context){\n  sqlite3 *db = sqlite3_context_db_handle(context);\n  int isEnabled = 0;\n  sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,-1,&isEnabled);\n  return isEnabled;\n}\n\n/*\n** Implementation of the SQL scalar function for accessing the underlying\n** hash table. This function may be called as follows:\n**\n**   SELECT <function-name>(<key-name>);\n**   SELECT <function-name>(<key-name>, <pointer>);\n**\n** where <function-name> is the name passed as the second argument\n** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer').\n**\n** If the <pointer> argument is specified, it must be a blob value\n** containing a pointer to be stored as the hash data corresponding\n** to the string <key-name>. If <pointer> is not specified, then\n** the string <key-name> must already exist in the has table. Otherwise,\n** an error is returned.\n**\n** Whether or not the <pointer> argument is specified, the value returned\n** is a blob containing the pointer stored as the hash data corresponding\n** to string <key-name> (after the hash-table is updated, if applicable).\n*/\nstatic void fts3TokenizerFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  Fts3Hash *pHash;\n  void *pPtr = 0;\n  const unsigned char *zName;\n  int nName;\n\n  assert( argc==1 || argc==2 );\n\n  pHash = (Fts3Hash *)sqlite3_user_data(context);\n\n  zName = sqlite3_value_text(argv[0]);\n  nName = sqlite3_value_bytes(argv[0])+1;\n\n  if( argc==2 ){\n    if( fts3TokenizerEnabled(context) || sqlite3_value_frombind(argv[1]) ){\n      void *pOld;\n      int n = sqlite3_value_bytes(argv[1]);\n      if( zName==0 || n!=sizeof(pPtr) ){\n        sqlite3_result_error(context, \"argument type mismatch\", -1);\n        return;\n      }\n      pPtr = *(void **)sqlite3_value_blob(argv[1]);\n      pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);\n      if( pOld==pPtr ){\n        sqlite3_result_error(context, \"out of memory\", -1);\n      }\n    }else{\n      sqlite3_result_error(context, \"fts3tokenize disabled\", -1);\n      return;\n    }\n  }else{\n    if( zName ){\n      pPtr = sqlite3Fts3HashFind(pHash, zName, nName);\n    }\n    if( !pPtr ){\n      char *zErr = sqlite3_mprintf(\"unknown tokenizer: %s\", zName);\n      sqlite3_result_error(context, zErr, -1);\n      sqlite3_free(zErr);\n      return;\n    }\n  }\n  if( fts3TokenizerEnabled(context) || sqlite3_value_frombind(argv[0]) ){\n    sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);\n  }\n}\n\nSQLITE_PRIVATE int sqlite3Fts3IsIdChar(char c){\n  static const char isFtsIdChar[] = {\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 0x */\n      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 1x */\n      0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 2x */\n      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */\n      0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */\n      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */\n      0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */\n      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */\n  };\n  return (c&0x80 || isFtsIdChar[(int)(c)]);\n}\n\nSQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *zStr, int *pn){\n  const char *z1;\n  const char *z2 = 0;\n\n  /* Find the start of the next token. */\n  z1 = zStr;\n  while( z2==0 ){\n    char c = *z1;\n    switch( c ){\n      case '\\0': return 0;        /* No more tokens here */\n      case '\\'':\n      case '\"':\n      case '`': {\n        z2 = z1;\n        while( *++z2 && (*z2!=c || *++z2==c) );\n        break;\n      }\n      case '[':\n        z2 = &z1[1];\n        while( *z2 && z2[0]!=']' ) z2++;\n        if( *z2 ) z2++;\n        break;\n\n      default:\n        if( sqlite3Fts3IsIdChar(*z1) ){\n          z2 = &z1[1];\n          while( sqlite3Fts3IsIdChar(*z2) ) z2++;\n        }else{\n          z1++;\n        }\n    }\n  }\n\n  *pn = (int)(z2-z1);\n  return z1;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3InitTokenizer(\n  Fts3Hash *pHash,                /* Tokenizer hash table */\n  const char *zArg,               /* Tokenizer name */\n  sqlite3_tokenizer **ppTok,      /* OUT: Tokenizer (if applicable) */\n  char **pzErr                    /* OUT: Set to malloced error message */\n){\n  int rc;\n  char *z = (char *)zArg;\n  int n = 0;\n  char *zCopy;\n  char *zEnd;                     /* Pointer to nul-term of zCopy */\n  sqlite3_tokenizer_module *m;\n\n  zCopy = sqlite3_mprintf(\"%s\", zArg);\n  if( !zCopy ) return SQLITE_NOMEM;\n  zEnd = &zCopy[strlen(zCopy)];\n\n  z = (char *)sqlite3Fts3NextToken(zCopy, &n);\n  if( z==0 ){\n    assert( n==0 );\n    z = zCopy;\n  }\n  z[n] = '\\0';\n  sqlite3Fts3Dequote(z);\n\n  m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash,z,(int)strlen(z)+1);\n  if( !m ){\n    sqlite3Fts3ErrMsg(pzErr, \"unknown tokenizer: %s\", z);\n    rc = SQLITE_ERROR;\n  }else{\n    char const **aArg = 0;\n    int iArg = 0;\n    z = &z[n+1];\n    while( z<zEnd && (NULL!=(z = (char *)sqlite3Fts3NextToken(z, &n))) ){\n      sqlite3_int64 nNew = sizeof(char *)*(iArg+1);\n      char const **aNew = (const char **)sqlite3_realloc64((void *)aArg, nNew);\n      if( !aNew ){\n        sqlite3_free(zCopy);\n        sqlite3_free((void *)aArg);\n        return SQLITE_NOMEM;\n      }\n      aArg = aNew;\n      aArg[iArg++] = z;\n      z[n] = '\\0';\n      sqlite3Fts3Dequote(z);\n      z = &z[n+1];\n    }\n    rc = m->xCreate(iArg, aArg, ppTok);\n    assert( rc!=SQLITE_OK || *ppTok );\n    if( rc!=SQLITE_OK ){\n      sqlite3Fts3ErrMsg(pzErr, \"unknown tokenizer\");\n    }else{\n      (*ppTok)->pModule = m;\n    }\n    sqlite3_free((void *)aArg);\n  }\n\n  sqlite3_free(zCopy);\n  return rc;\n}\n\n\n#ifdef SQLITE_TEST\n\n#include \"tclsqlite.h\"\n/* #include <string.h> */\n\n/*\n** Implementation of a special SQL scalar function for testing tokenizers\n** designed to be used in concert with the Tcl testing framework. This\n** function must be called with two or more arguments:\n**\n**   SELECT <function-name>(<key-name>, ..., <input-string>);\n**\n** where <function-name> is the name passed as the second argument\n** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')\n** concatenated with the string '_test' (e.g. 'fts3_tokenizer_test').\n**\n** The return value is a string that may be interpreted as a Tcl\n** list. For each token in the <input-string>, three elements are\n** added to the returned list. The first is the token position, the\n** second is the token text (folded, stemmed, etc.) and the third is the\n** substring of <input-string> associated with the token. For example,\n** using the built-in \"simple\" tokenizer:\n**\n**   SELECT fts_tokenizer_test('simple', 'I don't see how');\n**\n** will return the string:\n**\n**   \"{0 i I 1 dont don't 2 see see 3 how how}\"\n**\n*/\nstatic void testFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  Fts3Hash *pHash;\n  sqlite3_tokenizer_module *p;\n  sqlite3_tokenizer *pTokenizer = 0;\n  sqlite3_tokenizer_cursor *pCsr = 0;\n\n  const char *zErr = 0;\n\n  const char *zName;\n  int nName;\n  const char *zInput;\n  int nInput;\n\n  const char *azArg[64];\n\n  const char *zToken;\n  int nToken = 0;\n  int iStart = 0;\n  int iEnd = 0;\n  int iPos = 0;\n  int i;\n\n  Tcl_Obj *pRet;\n\n  if( argc<2 ){\n    sqlite3_result_error(context, \"insufficient arguments\", -1);\n    return;\n  }\n\n  nName = sqlite3_value_bytes(argv[0]);\n  zName = (const char *)sqlite3_value_text(argv[0]);\n  nInput = sqlite3_value_bytes(argv[argc-1]);\n  zInput = (const char *)sqlite3_value_text(argv[argc-1]);\n\n  pHash = (Fts3Hash *)sqlite3_user_data(context);\n  p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);\n\n  if( !p ){\n    char *zErr2 = sqlite3_mprintf(\"unknown tokenizer: %s\", zName);\n    sqlite3_result_error(context, zErr2, -1);\n    sqlite3_free(zErr2);\n    return;\n  }\n\n  pRet = Tcl_NewObj();\n  Tcl_IncrRefCount(pRet);\n\n  for(i=1; i<argc-1; i++){\n    azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);\n  }\n\n  if( SQLITE_OK!=p->xCreate(argc-2, azArg, &pTokenizer) ){\n    zErr = \"error in xCreate()\";\n    goto finish;\n  }\n  pTokenizer->pModule = p;\n  if( sqlite3Fts3OpenTokenizer(pTokenizer, 0, zInput, nInput, &pCsr) ){\n    zErr = \"error in xOpen()\";\n    goto finish;\n  }\n\n  while( SQLITE_OK==p->xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos) ){\n    Tcl_ListObjAppendElement(0, pRet, Tcl_NewIntObj(iPos));\n    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));\n    zToken = &zInput[iStart];\n    nToken = iEnd-iStart;\n    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));\n  }\n\n  if( SQLITE_OK!=p->xClose(pCsr) ){\n    zErr = \"error in xClose()\";\n    goto finish;\n  }\n  if( SQLITE_OK!=p->xDestroy(pTokenizer) ){\n    zErr = \"error in xDestroy()\";\n    goto finish;\n  }\n\nfinish:\n  if( zErr ){\n    sqlite3_result_error(context, zErr, -1);\n  }else{\n    sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT);\n  }\n  Tcl_DecrRefCount(pRet);\n}\n\nstatic\nint registerTokenizer(\n  sqlite3 *db,\n  char *zName,\n  const sqlite3_tokenizer_module *p\n){\n  int rc;\n  sqlite3_stmt *pStmt;\n  const char zSql[] = \"SELECT fts3_tokenizer(?, ?)\";\n\n  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);\n  sqlite3_bind_blob(pStmt, 2, &p, sizeof(p), SQLITE_STATIC);\n  sqlite3_step(pStmt);\n\n  return sqlite3_finalize(pStmt);\n}\n\n\nstatic\nint queryTokenizer(\n  sqlite3 *db,\n  char *zName,\n  const sqlite3_tokenizer_module **pp\n){\n  int rc;\n  sqlite3_stmt *pStmt;\n  const char zSql[] = \"SELECT fts3_tokenizer(?)\";\n\n  *pp = 0;\n  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);\n  if( SQLITE_ROW==sqlite3_step(pStmt) ){\n    if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB\n     && sqlite3_column_bytes(pStmt, 0)==sizeof(*pp)\n    ){\n      memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));\n    }\n  }\n\n  return sqlite3_finalize(pStmt);\n}\n\nSQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);\n\n/*\n** Implementation of the scalar function fts3_tokenizer_internal_test().\n** This function is used for testing only, it is not included in the\n** build unless SQLITE_TEST is defined.\n**\n** The purpose of this is to test that the fts3_tokenizer() function\n** can be used as designed by the C-code in the queryTokenizer and\n** registerTokenizer() functions above. These two functions are repeated\n** in the README.tokenizer file as an example, so it is important to\n** test them.\n**\n** To run the tests, evaluate the fts3_tokenizer_internal_test() scalar\n** function with no arguments. An assert() will fail if a problem is\n** detected. i.e.:\n**\n**     SELECT fts3_tokenizer_internal_test();\n**\n*/\nstatic void intTestFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  int rc;\n  const sqlite3_tokenizer_module *p1;\n  const sqlite3_tokenizer_module *p2;\n  sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);\n\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(argv);\n\n  /* Test the query function */\n  sqlite3Fts3SimpleTokenizerModule(&p1);\n  rc = queryTokenizer(db, \"simple\", &p2);\n  assert( rc==SQLITE_OK );\n  assert( p1==p2 );\n  rc = queryTokenizer(db, \"nosuchtokenizer\", &p2);\n  assert( rc==SQLITE_ERROR );\n  assert( p2==0 );\n  assert( 0==strcmp(sqlite3_errmsg(db), \"unknown tokenizer: nosuchtokenizer\") );\n\n  /* Test the storage function */\n  if( fts3TokenizerEnabled(context) ){\n    rc = registerTokenizer(db, \"nosuchtokenizer\", p1);\n    assert( rc==SQLITE_OK );\n    rc = queryTokenizer(db, \"nosuchtokenizer\", &p2);\n    assert( rc==SQLITE_OK );\n    assert( p2==p1 );\n  }\n\n  sqlite3_result_text(context, \"ok\", -1, SQLITE_STATIC);\n}\n\n#endif\n\n/*\n** Set up SQL objects in database db used to access the contents of\n** the hash table pointed to by argument pHash. The hash table must\n** been initialized to use string keys, and to take a private copy\n** of the key when a value is inserted. i.e. by a call similar to:\n**\n**    sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);\n**\n** This function adds a scalar function (see header comment above\n** fts3TokenizerFunc() in this file for details) and, if ENABLE_TABLE is\n** defined at compilation time, a temporary virtual table (see header\n** comment above struct HashTableVtab) to the database schema. Both\n** provide read/write access to the contents of *pHash.\n**\n** The third argument to this function, zName, is used as the name\n** of both the scalar and, if created, the virtual table.\n*/\nSQLITE_PRIVATE int sqlite3Fts3InitHashTable(\n  sqlite3 *db,\n  Fts3Hash *pHash,\n  const char *zName\n){\n  int rc = SQLITE_OK;\n  void *p = (void *)pHash;\n  const int any = SQLITE_UTF8|SQLITE_DIRECTONLY;\n\n#ifdef SQLITE_TEST\n  char *zTest = 0;\n  char *zTest2 = 0;\n  void *pdb = (void *)db;\n  zTest = sqlite3_mprintf(\"%s_test\", zName);\n  zTest2 = sqlite3_mprintf(\"%s_internal_test\", zName);\n  if( !zTest || !zTest2 ){\n    rc = SQLITE_NOMEM;\n  }\n#endif\n\n  if( SQLITE_OK==rc ){\n    rc = sqlite3_create_function(db, zName, 1, any, p, fts3TokenizerFunc, 0, 0);\n  }\n  if( SQLITE_OK==rc ){\n    rc = sqlite3_create_function(db, zName, 2, any, p, fts3TokenizerFunc, 0, 0);\n  }\n#ifdef SQLITE_TEST\n  if( SQLITE_OK==rc ){\n    rc = sqlite3_create_function(db, zTest, -1, any, p, testFunc, 0, 0);\n  }\n  if( SQLITE_OK==rc ){\n    rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0);\n  }\n#endif\n\n#ifdef SQLITE_TEST\n  sqlite3_free(zTest);\n  sqlite3_free(zTest2);\n#endif\n\n  return rc;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_tokenizer.c **************************************/\n/************** Begin file fts3_tokenizer1.c *********************************/\n/*\n** 2006 Oct 10\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Implementation of the \"simple\" full-text-search tokenizer.\n*/\n\n/*\n** The code in this file is only compiled if:\n**\n**     * The FTS3 module is being built as an extension\n**       (in which case SQLITE_CORE is not defined), or\n**\n**     * The FTS3 module is being built into the core of\n**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <stdio.h> */\n/* #include <string.h> */\n\n/* #include \"fts3_tokenizer.h\" */\n\ntypedef struct simple_tokenizer {\n  sqlite3_tokenizer base;\n  char delim[128];             /* flag ASCII delimiters */\n} simple_tokenizer;\n\ntypedef struct simple_tokenizer_cursor {\n  sqlite3_tokenizer_cursor base;\n  const char *pInput;          /* input we are tokenizing */\n  int nBytes;                  /* size of the input */\n  int iOffset;                 /* current position in pInput */\n  int iToken;                  /* index of next token to be returned */\n  char *pToken;                /* storage for current token */\n  int nTokenAllocated;         /* space allocated to zToken buffer */\n} simple_tokenizer_cursor;\n\n\nstatic int simpleDelim(simple_tokenizer *t, unsigned char c){\n  return c<0x80 && t->delim[c];\n}\nstatic int fts3_isalnum(int x){\n  return (x>='0' && x<='9') || (x>='A' && x<='Z') || (x>='a' && x<='z');\n}\n\n/*\n** Create a new tokenizer instance.\n*/\nstatic int simpleCreate(\n  int argc, const char * const *argv,\n  sqlite3_tokenizer **ppTokenizer\n){\n  simple_tokenizer *t;\n\n  t = (simple_tokenizer *) sqlite3_malloc(sizeof(*t));\n  if( t==NULL ) return SQLITE_NOMEM;\n  memset(t, 0, sizeof(*t));\n\n  /* TODO(shess) Delimiters need to remain the same from run to run,\n  ** else we need to reindex.  One solution would be a meta-table to\n  ** track such information in the database, then we'd only want this\n  ** information on the initial create.\n  */\n  if( argc>1 ){\n    int i, n = (int)strlen(argv[1]);\n    for(i=0; i<n; i++){\n      unsigned char ch = argv[1][i];\n      /* We explicitly don't support UTF-8 delimiters for now. */\n      if( ch>=0x80 ){\n        sqlite3_free(t);\n        return SQLITE_ERROR;\n      }\n      t->delim[ch] = 1;\n    }\n  } else {\n    /* Mark non-alphanumeric ASCII characters as delimiters */\n    int i;\n    for(i=1; i<0x80; i++){\n      t->delim[i] = !fts3_isalnum(i) ? -1 : 0;\n    }\n  }\n\n  *ppTokenizer = &t->base;\n  return SQLITE_OK;\n}\n\n/*\n** Destroy a tokenizer\n*/\nstatic int simpleDestroy(sqlite3_tokenizer *pTokenizer){\n  sqlite3_free(pTokenizer);\n  return SQLITE_OK;\n}\n\n/*\n** Prepare to begin tokenizing a particular string.  The input\n** string to be tokenized is pInput[0..nBytes-1].  A cursor\n** used to incrementally tokenize this string is returned in\n** *ppCursor.\n*/\nstatic int simpleOpen(\n  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */\n  const char *pInput, int nBytes,        /* String to be tokenized */\n  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */\n){\n  simple_tokenizer_cursor *c;\n\n  UNUSED_PARAMETER(pTokenizer);\n\n  c = (simple_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));\n  if( c==NULL ) return SQLITE_NOMEM;\n\n  c->pInput = pInput;\n  if( pInput==0 ){\n    c->nBytes = 0;\n  }else if( nBytes<0 ){\n    c->nBytes = (int)strlen(pInput);\n  }else{\n    c->nBytes = nBytes;\n  }\n  c->iOffset = 0;                 /* start tokenizing at the beginning */\n  c->iToken = 0;\n  c->pToken = NULL;               /* no space allocated, yet. */\n  c->nTokenAllocated = 0;\n\n  *ppCursor = &c->base;\n  return SQLITE_OK;\n}\n\n/*\n** Close a tokenization cursor previously opened by a call to\n** simpleOpen() above.\n*/\nstatic int simpleClose(sqlite3_tokenizer_cursor *pCursor){\n  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;\n  sqlite3_free(c->pToken);\n  sqlite3_free(c);\n  return SQLITE_OK;\n}\n\n/*\n** Extract the next token from a tokenization cursor.  The cursor must\n** have been opened by a prior call to simpleOpen().\n*/\nstatic int simpleNext(\n  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */\n  const char **ppToken,               /* OUT: *ppToken is the token text */\n  int *pnBytes,                       /* OUT: Number of bytes in token */\n  int *piStartOffset,                 /* OUT: Starting offset of token */\n  int *piEndOffset,                   /* OUT: Ending offset of token */\n  int *piPosition                     /* OUT: Position integer of token */\n){\n  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;\n  simple_tokenizer *t = (simple_tokenizer *) pCursor->pTokenizer;\n  unsigned char *p = (unsigned char *)c->pInput;\n\n  while( c->iOffset<c->nBytes ){\n    int iStartOffset;\n\n    /* Scan past delimiter characters */\n    while( c->iOffset<c->nBytes && simpleDelim(t, p[c->iOffset]) ){\n      c->iOffset++;\n    }\n\n    /* Count non-delimiter characters. */\n    iStartOffset = c->iOffset;\n    while( c->iOffset<c->nBytes && !simpleDelim(t, p[c->iOffset]) ){\n      c->iOffset++;\n    }\n\n    if( c->iOffset>iStartOffset ){\n      int i, n = c->iOffset-iStartOffset;\n      if( n>c->nTokenAllocated ){\n        char *pNew;\n        c->nTokenAllocated = n+20;\n        pNew = sqlite3_realloc64(c->pToken, c->nTokenAllocated);\n        if( !pNew ) return SQLITE_NOMEM;\n        c->pToken = pNew;\n      }\n      for(i=0; i<n; i++){\n        /* TODO(shess) This needs expansion to handle UTF-8\n        ** case-insensitivity.\n        */\n        unsigned char ch = p[iStartOffset+i];\n        c->pToken[i] = (char)((ch>='A' && ch<='Z') ? ch-'A'+'a' : ch);\n      }\n      *ppToken = c->pToken;\n      *pnBytes = n;\n      *piStartOffset = iStartOffset;\n      *piEndOffset = c->iOffset;\n      *piPosition = c->iToken++;\n\n      return SQLITE_OK;\n    }\n  }\n  return SQLITE_DONE;\n}\n\n/*\n** The set of routines that implement the simple tokenizer\n*/\nstatic const sqlite3_tokenizer_module simpleTokenizerModule = {\n  0,\n  simpleCreate,\n  simpleDestroy,\n  simpleOpen,\n  simpleClose,\n  simpleNext,\n  0,\n};\n\n/*\n** Allocate a new simple tokenizer.  Return a pointer to the new\n** tokenizer in *ppModule\n*/\nSQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(\n  sqlite3_tokenizer_module const**ppModule\n){\n  *ppModule = &simpleTokenizerModule;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_tokenizer1.c *************************************/\n/************** Begin file fts3_tokenize_vtab.c ******************************/\n/*\n** 2013 Apr 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains code for the \"fts3tokenize\" virtual table module.\n** An fts3tokenize virtual table is created as follows:\n**\n**   CREATE VIRTUAL TABLE <tbl> USING fts3tokenize(\n**       <tokenizer-name>, <arg-1>, ...\n**   );\n**\n** The table created has the following schema:\n**\n**   CREATE TABLE <tbl>(input, token, start, end, position)\n**\n** When queried, the query must include a WHERE clause of type:\n**\n**   input = <string>\n**\n** The virtual table module tokenizes this <string>, using the FTS3\n** tokenizer specified by the arguments to the CREATE VIRTUAL TABLE\n** statement and returns one row for each token in the result. With\n** fields set as follows:\n**\n**   input:   Always set to a copy of <string>\n**   token:   A token from the input.\n**   start:   Byte offset of the token within the input <string>.\n**   end:     Byte offset of the byte immediately following the end of the\n**            token within the input string.\n**   pos:     Token offset of token within input.\n**\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <string.h> */\n/* #include <assert.h> */\n\ntypedef struct Fts3tokTable Fts3tokTable;\ntypedef struct Fts3tokCursor Fts3tokCursor;\n\n/*\n** Virtual table structure.\n*/\nstruct Fts3tokTable {\n  sqlite3_vtab base;              /* Base class used by SQLite core */\n  const sqlite3_tokenizer_module *pMod;\n  sqlite3_tokenizer *pTok;\n};\n\n/*\n** Virtual table cursor structure.\n*/\nstruct Fts3tokCursor {\n  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */\n  char *zInput;                   /* Input string */\n  sqlite3_tokenizer_cursor *pCsr; /* Cursor to iterate through zInput */\n  int iRowid;                     /* Current 'rowid' value */\n  const char *zToken;             /* Current 'token' value */\n  int nToken;                     /* Size of zToken in bytes */\n  int iStart;                     /* Current 'start' value */\n  int iEnd;                       /* Current 'end' value */\n  int iPos;                       /* Current 'pos' value */\n};\n\n/*\n** Query FTS for the tokenizer implementation named zName.\n*/\nstatic int fts3tokQueryTokenizer(\n  Fts3Hash *pHash,\n  const char *zName,\n  const sqlite3_tokenizer_module **pp,\n  char **pzErr\n){\n  sqlite3_tokenizer_module *p;\n  int nName = (int)strlen(zName);\n\n  p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);\n  if( !p ){\n    sqlite3Fts3ErrMsg(pzErr, \"unknown tokenizer: %s\", zName);\n    return SQLITE_ERROR;\n  }\n\n  *pp = p;\n  return SQLITE_OK;\n}\n\n/*\n** The second argument, argv[], is an array of pointers to nul-terminated\n** strings. This function makes a copy of the array and strings into a\n** single block of memory. It then dequotes any of the strings that appear\n** to be quoted.\n**\n** If successful, output parameter *pazDequote is set to point at the\n** array of dequoted strings and SQLITE_OK is returned. The caller is\n** responsible for eventually calling sqlite3_free() to free the array\n** in this case. Or, if an error occurs, an SQLite error code is returned.\n** The final value of *pazDequote is undefined in this case.\n*/\nstatic int fts3tokDequoteArray(\n  int argc,                       /* Number of elements in argv[] */\n  const char * const *argv,       /* Input array */\n  char ***pazDequote              /* Output array */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  if( argc==0 ){\n    *pazDequote = 0;\n  }else{\n    int i;\n    int nByte = 0;\n    char **azDequote;\n\n    for(i=0; i<argc; i++){\n      nByte += (int)(strlen(argv[i]) + 1);\n    }\n\n    *pazDequote = azDequote = sqlite3_malloc64(sizeof(char *)*argc + nByte);\n    if( azDequote==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      char *pSpace = (char *)&azDequote[argc];\n      for(i=0; i<argc; i++){\n        int n = (int)strlen(argv[i]);\n        azDequote[i] = pSpace;\n        memcpy(pSpace, argv[i], n+1);\n        sqlite3Fts3Dequote(pSpace);\n        pSpace += (n+1);\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Schema of the tokenizer table.\n*/\n#define FTS3_TOK_SCHEMA \"CREATE TABLE x(input, token, start, end, position)\"\n\n/*\n** This function does all the work for both the xConnect and xCreate methods.\n** These tables have no persistent representation of their own, so xConnect\n** and xCreate are identical operations.\n**\n**   argv[0]: module name\n**   argv[1]: database name\n**   argv[2]: table name\n**   argv[3]: first argument (tokenizer name)\n*/\nstatic int fts3tokConnectMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pHash,                    /* Hash table of tokenizers */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  Fts3tokTable *pTab = 0;\n  const sqlite3_tokenizer_module *pMod = 0;\n  sqlite3_tokenizer *pTok = 0;\n  int rc;\n  char **azDequote = 0;\n  int nDequote;\n\n  rc = sqlite3_declare_vtab(db, FTS3_TOK_SCHEMA);\n  if( rc!=SQLITE_OK ) return rc;\n\n  nDequote = argc-3;\n  rc = fts3tokDequoteArray(nDequote, &argv[3], &azDequote);\n\n  if( rc==SQLITE_OK ){\n    const char *zModule;\n    if( nDequote<1 ){\n      zModule = \"simple\";\n    }else{\n      zModule = azDequote[0];\n    }\n    rc = fts3tokQueryTokenizer((Fts3Hash*)pHash, zModule, &pMod, pzErr);\n  }\n\n  assert( (rc==SQLITE_OK)==(pMod!=0) );\n  if( rc==SQLITE_OK ){\n    const char * const *azArg = 0;\n    if( nDequote>1 ) azArg = (const char * const *)&azDequote[1];\n    rc = pMod->xCreate((nDequote>1 ? nDequote-1 : 0), azArg, &pTok);\n  }\n\n  if( rc==SQLITE_OK ){\n    pTab = (Fts3tokTable *)sqlite3_malloc(sizeof(Fts3tokTable));\n    if( pTab==0 ){\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    memset(pTab, 0, sizeof(Fts3tokTable));\n    pTab->pMod = pMod;\n    pTab->pTok = pTok;\n    *ppVtab = &pTab->base;\n  }else{\n    if( pTok ){\n      pMod->xDestroy(pTok);\n    }\n  }\n\n  sqlite3_free(azDequote);\n  return rc;\n}\n\n/*\n** This function does the work for both the xDisconnect and xDestroy methods.\n** These tables have no persistent representation of their own, so xDisconnect\n** and xDestroy are identical operations.\n*/\nstatic int fts3tokDisconnectMethod(sqlite3_vtab *pVtab){\n  Fts3tokTable *pTab = (Fts3tokTable *)pVtab;\n\n  pTab->pMod->xDestroy(pTab->pTok);\n  sqlite3_free(pTab);\n  return SQLITE_OK;\n}\n\n/*\n** xBestIndex - Analyze a WHERE and ORDER BY clause.\n*/\nstatic int fts3tokBestIndexMethod(\n  sqlite3_vtab *pVTab,\n  sqlite3_index_info *pInfo\n){\n  int i;\n  UNUSED_PARAMETER(pVTab);\n\n  for(i=0; i<pInfo->nConstraint; i++){\n    if( pInfo->aConstraint[i].usable\n     && pInfo->aConstraint[i].iColumn==0\n     && pInfo->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ\n    ){\n      pInfo->idxNum = 1;\n      pInfo->aConstraintUsage[i].argvIndex = 1;\n      pInfo->aConstraintUsage[i].omit = 1;\n      pInfo->estimatedCost = 1;\n      return SQLITE_OK;\n    }\n  }\n\n  pInfo->idxNum = 0;\n  assert( pInfo->estimatedCost>1000000.0 );\n\n  return SQLITE_OK;\n}\n\n/*\n** xOpen - Open a cursor.\n*/\nstatic int fts3tokOpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){\n  Fts3tokCursor *pCsr;\n  UNUSED_PARAMETER(pVTab);\n\n  pCsr = (Fts3tokCursor *)sqlite3_malloc(sizeof(Fts3tokCursor));\n  if( pCsr==0 ){\n    return SQLITE_NOMEM;\n  }\n  memset(pCsr, 0, sizeof(Fts3tokCursor));\n\n  *ppCsr = (sqlite3_vtab_cursor *)pCsr;\n  return SQLITE_OK;\n}\n\n/*\n** Reset the tokenizer cursor passed as the only argument. As if it had\n** just been returned by fts3tokOpenMethod().\n*/\nstatic void fts3tokResetCursor(Fts3tokCursor *pCsr){\n  if( pCsr->pCsr ){\n    Fts3tokTable *pTab = (Fts3tokTable *)(pCsr->base.pVtab);\n    pTab->pMod->xClose(pCsr->pCsr);\n    pCsr->pCsr = 0;\n  }\n  sqlite3_free(pCsr->zInput);\n  pCsr->zInput = 0;\n  pCsr->zToken = 0;\n  pCsr->nToken = 0;\n  pCsr->iStart = 0;\n  pCsr->iEnd = 0;\n  pCsr->iPos = 0;\n  pCsr->iRowid = 0;\n}\n\n/*\n** xClose - Close a cursor.\n*/\nstatic int fts3tokCloseMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n\n  fts3tokResetCursor(pCsr);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** xNext - Advance the cursor to the next row, if any.\n*/\nstatic int fts3tokNextMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n  Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);\n  int rc;                         /* Return code */\n\n  pCsr->iRowid++;\n  rc = pTab->pMod->xNext(pCsr->pCsr,\n      &pCsr->zToken, &pCsr->nToken,\n      &pCsr->iStart, &pCsr->iEnd, &pCsr->iPos\n  );\n\n  if( rc!=SQLITE_OK ){\n    fts3tokResetCursor(pCsr);\n    if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n  }\n\n  return rc;\n}\n\n/*\n** xFilter - Initialize a cursor to point at the start of its data.\n*/\nstatic int fts3tokFilterMethod(\n  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */\n  int idxNum,                     /* Strategy index */\n  const char *idxStr,             /* Unused */\n  int nVal,                       /* Number of elements in apVal */\n  sqlite3_value **apVal           /* Arguments for the indexing scheme */\n){\n  int rc = SQLITE_ERROR;\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n  Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);\n  UNUSED_PARAMETER(idxStr);\n  UNUSED_PARAMETER(nVal);\n\n  fts3tokResetCursor(pCsr);\n  if( idxNum==1 ){\n    const char *zByte = (const char *)sqlite3_value_text(apVal[0]);\n    sqlite3_int64 nByte = sqlite3_value_bytes(apVal[0]);\n    pCsr->zInput = sqlite3_malloc64(nByte+1);\n    if( pCsr->zInput==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      if( nByte>0 ) memcpy(pCsr->zInput, zByte, nByte);\n      pCsr->zInput[nByte] = 0;\n      rc = pTab->pMod->xOpen(pTab->pTok, pCsr->zInput, nByte, &pCsr->pCsr);\n      if( rc==SQLITE_OK ){\n        pCsr->pCsr->pTokenizer = pTab->pTok;\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ) return rc;\n  return fts3tokNextMethod(pCursor);\n}\n\n/*\n** xEof - Return true if the cursor is at EOF, or false otherwise.\n*/\nstatic int fts3tokEofMethod(sqlite3_vtab_cursor *pCursor){\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n  return (pCsr->zToken==0);\n}\n\n/*\n** xColumn - Return a column value.\n*/\nstatic int fts3tokColumnMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */\n  int iCol                        /* Index of column to read value from */\n){\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n\n  /* CREATE TABLE x(input, token, start, end, position) */\n  switch( iCol ){\n    case 0:\n      sqlite3_result_text(pCtx, pCsr->zInput, -1, SQLITE_TRANSIENT);\n      break;\n    case 1:\n      sqlite3_result_text(pCtx, pCsr->zToken, pCsr->nToken, SQLITE_TRANSIENT);\n      break;\n    case 2:\n      sqlite3_result_int(pCtx, pCsr->iStart);\n      break;\n    case 3:\n      sqlite3_result_int(pCtx, pCsr->iEnd);\n      break;\n    default:\n      assert( iCol==4 );\n      sqlite3_result_int(pCtx, pCsr->iPos);\n      break;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** xRowid - Return the current rowid for the cursor.\n*/\nstatic int fts3tokRowidMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite_int64 *pRowid            /* OUT: Rowid value */\n){\n  Fts3tokCursor *pCsr = (Fts3tokCursor *)pCursor;\n  *pRowid = (sqlite3_int64)pCsr->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Register the fts3tok module with database connection db. Return SQLITE_OK\n** if successful or an error code if sqlite3_create_module() fails.\n*/\nSQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash, void(*xDestroy)(void*)){\n  static const sqlite3_module fts3tok_module = {\n     0,                           /* iVersion      */\n     fts3tokConnectMethod,        /* xCreate       */\n     fts3tokConnectMethod,        /* xConnect      */\n     fts3tokBestIndexMethod,      /* xBestIndex    */\n     fts3tokDisconnectMethod,     /* xDisconnect   */\n     fts3tokDisconnectMethod,     /* xDestroy      */\n     fts3tokOpenMethod,           /* xOpen         */\n     fts3tokCloseMethod,          /* xClose        */\n     fts3tokFilterMethod,         /* xFilter       */\n     fts3tokNextMethod,           /* xNext         */\n     fts3tokEofMethod,            /* xEof          */\n     fts3tokColumnMethod,         /* xColumn       */\n     fts3tokRowidMethod,          /* xRowid        */\n     0,                           /* xUpdate       */\n     0,                           /* xBegin        */\n     0,                           /* xSync         */\n     0,                           /* xCommit       */\n     0,                           /* xRollback     */\n     0,                           /* xFindFunction */\n     0,                           /* xRename       */\n     0,                           /* xSavepoint    */\n     0,                           /* xRelease      */\n     0,                           /* xRollbackTo   */\n     0,                           /* xShadowName   */\n     0                            /* xIntegrity    */\n  };\n  int rc;                         /* Return code */\n\n  rc = sqlite3_create_module_v2(\n      db, \"fts3tokenize\", &fts3tok_module, (void*)pHash, xDestroy\n  );\n  return rc;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_tokenize_vtab.c **********************************/\n/************** Begin file fts3_write.c **************************************/\n/*\n** 2009 Oct 23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file is part of the SQLite FTS3 extension module. Specifically,\n** this file contains code to insert, update and delete rows from FTS3\n** tables. It also contains code to merge FTS3 b-tree segments. Some\n** of the sub-routines used to merge segments are also used by the query\n** code in fts3.c.\n*/\n\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <string.h> */\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <stdio.h> */\n\n#define FTS_MAX_APPENDABLE_HEIGHT 16\n\n/*\n** When full-text index nodes are loaded from disk, the buffer that they\n** are loaded into has the following number of bytes of padding at the end\n** of it. i.e. if a full-text index node is 900 bytes in size, then a buffer\n** of 920 bytes is allocated for it.\n**\n** This means that if we have a pointer into a buffer containing node data,\n** it is always safe to read up to two varints from it without risking an\n** overread, even if the node data is corrupted.\n*/\n#define FTS3_NODE_PADDING (FTS3_VARINT_MAX*2)\n\n/*\n** Under certain circumstances, b-tree nodes (doclists) can be loaded into\n** memory incrementally instead of all at once. This can be a big performance\n** win (reduced IO and CPU) if SQLite stops calling the virtual table xNext()\n** method before retrieving all query results (as may happen, for example,\n** if a query has a LIMIT clause).\n**\n** Incremental loading is used for b-tree nodes FTS3_NODE_CHUNK_THRESHOLD\n** bytes and larger. Nodes are loaded in chunks of FTS3_NODE_CHUNKSIZE bytes.\n** The code is written so that the hard lower-limit for each of these values\n** is 1. Clearly such small values would be inefficient, but can be useful\n** for testing purposes.\n**\n** If this module is built with SQLITE_TEST defined, these constants may\n** be overridden at runtime for testing purposes. File fts3_test.c contains\n** a Tcl interface to read and write the values.\n*/\n#ifdef SQLITE_TEST\nint test_fts3_node_chunksize = (4*1024);\nint test_fts3_node_chunk_threshold = (4*1024)*4;\n# define FTS3_NODE_CHUNKSIZE       test_fts3_node_chunksize\n# define FTS3_NODE_CHUNK_THRESHOLD test_fts3_node_chunk_threshold\n#else\n# define FTS3_NODE_CHUNKSIZE (4*1024)\n# define FTS3_NODE_CHUNK_THRESHOLD (FTS3_NODE_CHUNKSIZE*4)\n#endif\n\n/*\n** The values that may be meaningfully bound to the :1 parameter in\n** statements SQL_REPLACE_STAT and SQL_SELECT_STAT.\n*/\n#define FTS_STAT_DOCTOTAL      0\n#define FTS_STAT_INCRMERGEHINT 1\n#define FTS_STAT_AUTOINCRMERGE 2\n\n/*\n** If FTS_LOG_MERGES is defined, call sqlite3_log() to report each automatic\n** and incremental merge operation that takes place. This is used for\n** debugging FTS only, it should not usually be turned on in production\n** systems.\n*/\n#ifdef FTS3_LOG_MERGES\nstatic void fts3LogMerge(int nMerge, sqlite3_int64 iAbsLevel){\n  sqlite3_log(SQLITE_OK, \"%d-way merge from level %d\", nMerge, (int)iAbsLevel);\n}\n#else\n#define fts3LogMerge(x, y)\n#endif\n\n\ntypedef struct PendingList PendingList;\ntypedef struct SegmentNode SegmentNode;\ntypedef struct SegmentWriter SegmentWriter;\n\n/*\n** An instance of the following data structure is used to build doclists\n** incrementally. See function fts3PendingListAppend() for details.\n*/\nstruct PendingList {\n  int nData;\n  char *aData;\n  int nSpace;\n  sqlite3_int64 iLastDocid;\n  sqlite3_int64 iLastCol;\n  sqlite3_int64 iLastPos;\n};\n\n\n/*\n** Each cursor has a (possibly empty) linked list of the following objects.\n*/\nstruct Fts3DeferredToken {\n  Fts3PhraseToken *pToken;        /* Pointer to corresponding expr token */\n  int iCol;                       /* Column token must occur in */\n  Fts3DeferredToken *pNext;       /* Next in list of deferred tokens */\n  PendingList *pList;             /* Doclist is assembled here */\n};\n\n/*\n** An instance of this structure is used to iterate through the terms on\n** a contiguous set of segment b-tree leaf nodes. Although the details of\n** this structure are only manipulated by code in this file, opaque handles\n** of type Fts3SegReader* are also used by code in fts3.c to iterate through\n** terms when querying the full-text index. See functions:\n**\n**   sqlite3Fts3SegReaderNew()\n**   sqlite3Fts3SegReaderFree()\n**   sqlite3Fts3SegReaderIterate()\n**\n** Methods used to manipulate Fts3SegReader structures:\n**\n**   fts3SegReaderNext()\n**   fts3SegReaderFirstDocid()\n**   fts3SegReaderNextDocid()\n*/\nstruct Fts3SegReader {\n  int iIdx;                       /* Index within level, or 0x7FFFFFFF for PT */\n  u8 bLookup;                     /* True for a lookup only */\n  u8 rootOnly;                    /* True for a root-only reader */\n\n  sqlite3_int64 iStartBlock;      /* Rowid of first leaf block to traverse */\n  sqlite3_int64 iLeafEndBlock;    /* Rowid of final leaf block to traverse */\n  sqlite3_int64 iEndBlock;        /* Rowid of final block in segment (or 0) */\n  sqlite3_int64 iCurrentBlock;    /* Current leaf block (or 0) */\n\n  char *aNode;                    /* Pointer to node data (or NULL) */\n  int nNode;                      /* Size of buffer at aNode (or 0) */\n  int nPopulate;                  /* If >0, bytes of buffer aNode[] loaded */\n  sqlite3_blob *pBlob;            /* If not NULL, blob handle to read node */\n\n  Fts3HashElem **ppNextElem;\n\n  /* Variables set by fts3SegReaderNext(). These may be read directly\n  ** by the caller. They are valid from the time SegmentReaderNew() returns\n  ** until SegmentReaderNext() returns something other than SQLITE_OK\n  ** (i.e. SQLITE_DONE).\n  */\n  int nTerm;                      /* Number of bytes in current term */\n  char *zTerm;                    /* Pointer to current term */\n  int nTermAlloc;                 /* Allocated size of zTerm buffer */\n  char *aDoclist;                 /* Pointer to doclist of current entry */\n  int nDoclist;                   /* Size of doclist in current entry */\n\n  /* The following variables are used by fts3SegReaderNextDocid() to iterate\n  ** through the current doclist (aDoclist/nDoclist).\n  */\n  char *pOffsetList;\n  int nOffsetList;                /* For descending pending seg-readers only */\n  sqlite3_int64 iDocid;\n};\n\n#define fts3SegReaderIsPending(p) ((p)->ppNextElem!=0)\n#define fts3SegReaderIsRootOnly(p) ((p)->rootOnly!=0)\n\n/*\n** An instance of this structure is used to create a segment b-tree in the\n** database. The internal details of this type are only accessed by the\n** following functions:\n**\n**   fts3SegWriterAdd()\n**   fts3SegWriterFlush()\n**   fts3SegWriterFree()\n*/\nstruct SegmentWriter {\n  SegmentNode *pTree;             /* Pointer to interior tree structure */\n  sqlite3_int64 iFirst;           /* First slot in %_segments written */\n  sqlite3_int64 iFree;            /* Next free slot in %_segments */\n  char *zTerm;                    /* Pointer to previous term buffer */\n  int nTerm;                      /* Number of bytes in zTerm */\n  int nMalloc;                    /* Size of malloc'd buffer at zMalloc */\n  char *zMalloc;                  /* Malloc'd space (possibly) used for zTerm */\n  int nSize;                      /* Size of allocation at aData */\n  int nData;                      /* Bytes of data in aData */\n  char *aData;                    /* Pointer to block from malloc() */\n  i64 nLeafData;                  /* Number of bytes of leaf data written */\n};\n\n/*\n** Type SegmentNode is used by the following three functions to create\n** the interior part of the segment b+-tree structures (everything except\n** the leaf nodes). These functions and type are only ever used by code\n** within the fts3SegWriterXXX() family of functions described above.\n**\n**   fts3NodeAddTerm()\n**   fts3NodeWrite()\n**   fts3NodeFree()\n**\n** When a b+tree is written to the database (either as a result of a merge\n** or the pending-terms table being flushed), leaves are written into the\n** database file as soon as they are completely populated. The interior of\n** the tree is assembled in memory and written out only once all leaves have\n** been populated and stored. This is Ok, as the b+-tree fanout is usually\n** very large, meaning that the interior of the tree consumes relatively\n** little memory.\n*/\nstruct SegmentNode {\n  SegmentNode *pParent;           /* Parent node (or NULL for root node) */\n  SegmentNode *pRight;            /* Pointer to right-sibling */\n  SegmentNode *pLeftmost;         /* Pointer to left-most node of this depth */\n  int nEntry;                     /* Number of terms written to node so far */\n  char *zTerm;                    /* Pointer to previous term buffer */\n  int nTerm;                      /* Number of bytes in zTerm */\n  int nMalloc;                    /* Size of malloc'd buffer at zMalloc */\n  char *zMalloc;                  /* Malloc'd space (possibly) used for zTerm */\n  int nData;                      /* Bytes of valid data so far */\n  char *aData;                    /* Node data */\n};\n\n/*\n** Valid values for the second argument to fts3SqlStmt().\n*/\n#define SQL_DELETE_CONTENT             0\n#define SQL_IS_EMPTY                   1\n#define SQL_DELETE_ALL_CONTENT         2\n#define SQL_DELETE_ALL_SEGMENTS        3\n#define SQL_DELETE_ALL_SEGDIR          4\n#define SQL_DELETE_ALL_DOCSIZE         5\n#define SQL_DELETE_ALL_STAT            6\n#define SQL_SELECT_CONTENT_BY_ROWID    7\n#define SQL_NEXT_SEGMENT_INDEX         8\n#define SQL_INSERT_SEGMENTS            9\n#define SQL_NEXT_SEGMENTS_ID          10\n#define SQL_INSERT_SEGDIR             11\n#define SQL_SELECT_LEVEL              12\n#define SQL_SELECT_LEVEL_RANGE        13\n#define SQL_SELECT_LEVEL_COUNT        14\n#define SQL_SELECT_SEGDIR_MAX_LEVEL   15\n#define SQL_DELETE_SEGDIR_LEVEL       16\n#define SQL_DELETE_SEGMENTS_RANGE     17\n#define SQL_CONTENT_INSERT            18\n#define SQL_DELETE_DOCSIZE            19\n#define SQL_REPLACE_DOCSIZE           20\n#define SQL_SELECT_DOCSIZE            21\n#define SQL_SELECT_STAT               22\n#define SQL_REPLACE_STAT              23\n\n#define SQL_SELECT_ALL_PREFIX_LEVEL   24\n#define SQL_DELETE_ALL_TERMS_SEGDIR   25\n#define SQL_DELETE_SEGDIR_RANGE       26\n#define SQL_SELECT_ALL_LANGID         27\n#define SQL_FIND_MERGE_LEVEL          28\n#define SQL_MAX_LEAF_NODE_ESTIMATE    29\n#define SQL_DELETE_SEGDIR_ENTRY       30\n#define SQL_SHIFT_SEGDIR_ENTRY        31\n#define SQL_SELECT_SEGDIR             32\n#define SQL_CHOMP_SEGDIR              33\n#define SQL_SEGMENT_IS_APPENDABLE     34\n#define SQL_SELECT_INDEXES            35\n#define SQL_SELECT_MXLEVEL            36\n\n#define SQL_SELECT_LEVEL_RANGE2       37\n#define SQL_UPDATE_LEVEL_IDX          38\n#define SQL_UPDATE_LEVEL              39\n\n/*\n** This function is used to obtain an SQLite prepared statement handle\n** for the statement identified by the second argument. If successful,\n** *pp is set to the requested statement handle and SQLITE_OK returned.\n** Otherwise, an SQLite error code is returned and *pp is set to 0.\n**\n** If argument apVal is not NULL, then it must point to an array with\n** at least as many entries as the requested statement has bound\n** parameters. The values are bound to the statements parameters before\n** returning.\n*/\nstatic int fts3SqlStmt(\n  Fts3Table *p,                   /* Virtual table handle */\n  int eStmt,                      /* One of the SQL_XXX constants above */\n  sqlite3_stmt **pp,              /* OUT: Statement handle */\n  sqlite3_value **apVal           /* Values to bind to statement */\n){\n  const char *azSql[] = {\n/* 0  */  \"DELETE FROM %Q.'%q_content' WHERE rowid = ?\",\n/* 1  */  \"SELECT NOT EXISTS(SELECT docid FROM %Q.'%q_content' WHERE rowid!=?)\",\n/* 2  */  \"DELETE FROM %Q.'%q_content'\",\n/* 3  */  \"DELETE FROM %Q.'%q_segments'\",\n/* 4  */  \"DELETE FROM %Q.'%q_segdir'\",\n/* 5  */  \"DELETE FROM %Q.'%q_docsize'\",\n/* 6  */  \"DELETE FROM %Q.'%q_stat'\",\n/* 7  */  \"SELECT %s WHERE rowid=?\",\n/* 8  */  \"SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1\",\n/* 9  */  \"REPLACE INTO %Q.'%q_segments'(blockid, block) VALUES(?, ?)\",\n/* 10 */  \"SELECT coalesce((SELECT max(blockid) FROM %Q.'%q_segments') + 1, 1)\",\n/* 11 */  \"REPLACE INTO %Q.'%q_segdir' VALUES(?,?,?,?,?,?)\",\n\n          /* Return segments in order from oldest to newest.*/\n/* 12 */  \"SELECT idx, start_block, leaves_end_block, end_block, root \"\n            \"FROM %Q.'%q_segdir' WHERE level = ? ORDER BY idx ASC\",\n/* 13 */  \"SELECT idx, start_block, leaves_end_block, end_block, root \"\n            \"FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?\"\n            \"ORDER BY level DESC, idx ASC\",\n\n/* 14 */  \"SELECT count(*) FROM %Q.'%q_segdir' WHERE level = ?\",\n/* 15 */  \"SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?\",\n\n/* 16 */  \"DELETE FROM %Q.'%q_segdir' WHERE level = ?\",\n/* 17 */  \"DELETE FROM %Q.'%q_segments' WHERE blockid BETWEEN ? AND ?\",\n/* 18 */  \"INSERT INTO %Q.'%q_content' VALUES(%s)\",\n/* 19 */  \"DELETE FROM %Q.'%q_docsize' WHERE docid = ?\",\n/* 20 */  \"REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\",\n/* 21 */  \"SELECT size FROM %Q.'%q_docsize' WHERE docid=?\",\n/* 22 */  \"SELECT value FROM %Q.'%q_stat' WHERE id=?\",\n/* 23 */  \"REPLACE INTO %Q.'%q_stat' VALUES(?,?)\",\n/* 24 */  \"\",\n/* 25 */  \"\",\n\n/* 26 */ \"DELETE FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?\",\n/* 27 */ \"SELECT ? UNION SELECT level / (1024 * ?) FROM %Q.'%q_segdir'\",\n\n/* This statement is used to determine which level to read the input from\n** when performing an incremental merge. It returns the absolute level number\n** of the oldest level in the db that contains at least ? segments. Or,\n** if no level in the FTS index contains more than ? segments, the statement\n** returns zero rows.  */\n/* 28 */ \"SELECT level, count(*) AS cnt FROM %Q.'%q_segdir' \"\n         \"  GROUP BY level HAVING cnt>=?\"\n         \"  ORDER BY (level %% 1024) ASC, 2 DESC LIMIT 1\",\n\n/* Estimate the upper limit on the number of leaf nodes in a new segment\n** created by merging the oldest :2 segments from absolute level :1. See\n** function sqlite3Fts3Incrmerge() for details.  */\n/* 29 */ \"SELECT 2 * total(1 + leaves_end_block - start_block) \"\n         \"  FROM (SELECT * FROM %Q.'%q_segdir' \"\n         \"        WHERE level = ? ORDER BY idx ASC LIMIT ?\"\n         \"  )\",\n\n/* SQL_DELETE_SEGDIR_ENTRY\n**   Delete the %_segdir entry on absolute level :1 with index :2.  */\n/* 30 */ \"DELETE FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?\",\n\n/* SQL_SHIFT_SEGDIR_ENTRY\n**   Modify the idx value for the segment with idx=:3 on absolute level :2\n**   to :1.  */\n/* 31 */ \"UPDATE %Q.'%q_segdir' SET idx = ? WHERE level=? AND idx=?\",\n\n/* SQL_SELECT_SEGDIR\n**   Read a single entry from the %_segdir table. The entry from absolute\n**   level :1 with index value :2.  */\n/* 32 */  \"SELECT idx, start_block, leaves_end_block, end_block, root \"\n            \"FROM %Q.'%q_segdir' WHERE level = ? AND idx = ?\",\n\n/* SQL_CHOMP_SEGDIR\n**   Update the start_block (:1) and root (:2) fields of the %_segdir\n**   entry located on absolute level :3 with index :4.  */\n/* 33 */  \"UPDATE %Q.'%q_segdir' SET start_block = ?, root = ?\"\n            \"WHERE level = ? AND idx = ?\",\n\n/* SQL_SEGMENT_IS_APPENDABLE\n**   Return a single row if the segment with end_block=? is appendable. Or\n**   no rows otherwise.  */\n/* 34 */  \"SELECT 1 FROM %Q.'%q_segments' WHERE blockid=? AND block IS NULL\",\n\n/* SQL_SELECT_INDEXES\n**   Return the list of valid segment indexes for absolute level ?  */\n/* 35 */  \"SELECT idx FROM %Q.'%q_segdir' WHERE level=? ORDER BY 1 ASC\",\n\n/* SQL_SELECT_MXLEVEL\n**   Return the largest relative level in the FTS index or indexes.  */\n/* 36 */  \"SELECT max( level %% 1024 ) FROM %Q.'%q_segdir'\",\n\n          /* Return segments in order from oldest to newest.*/\n/* 37 */  \"SELECT level, idx, end_block \"\n            \"FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ? \"\n            \"ORDER BY level DESC, idx ASC\",\n\n          /* Update statements used while promoting segments */\n/* 38 */  \"UPDATE OR FAIL %Q.'%q_segdir' SET level=-1,idx=? \"\n            \"WHERE level=? AND idx=?\",\n/* 39 */  \"UPDATE OR FAIL %Q.'%q_segdir' SET level=? WHERE level=-1\"\n\n  };\n  int rc = SQLITE_OK;\n  sqlite3_stmt *pStmt;\n\n  assert( SizeofArray(azSql)==SizeofArray(p->aStmt) );\n  assert( eStmt<SizeofArray(azSql) && eStmt>=0 );\n\n  pStmt = p->aStmt[eStmt];\n  if( !pStmt ){\n    int f = SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_NO_VTAB;\n    char *zSql;\n    if( eStmt==SQL_CONTENT_INSERT ){\n      zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);\n    }else if( eStmt==SQL_SELECT_CONTENT_BY_ROWID ){\n      f &= ~SQLITE_PREPARE_NO_VTAB;\n      zSql = sqlite3_mprintf(azSql[eStmt], p->zReadExprlist);\n    }else{\n      zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);\n    }\n    if( !zSql ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_prepare_v3(p->db, zSql, -1, f, &pStmt, NULL);\n      sqlite3_free(zSql);\n      assert( rc==SQLITE_OK || pStmt==0 );\n      p->aStmt[eStmt] = pStmt;\n    }\n  }\n  if( apVal ){\n    int i;\n    int nParam = sqlite3_bind_parameter_count(pStmt);\n    for(i=0; rc==SQLITE_OK && i<nParam; i++){\n      rc = sqlite3_bind_value(pStmt, i+1, apVal[i]);\n    }\n  }\n  *pp = pStmt;\n  return rc;\n}\n\n\nstatic int fts3SelectDocsize(\n  Fts3Table *pTab,                /* FTS3 table handle */\n  sqlite3_int64 iDocid,           /* Docid to bind for SQL_SELECT_DOCSIZE */\n  sqlite3_stmt **ppStmt           /* OUT: Statement handle */\n){\n  sqlite3_stmt *pStmt = 0;        /* Statement requested from fts3SqlStmt() */\n  int rc;                         /* Return code */\n\n  rc = fts3SqlStmt(pTab, SQL_SELECT_DOCSIZE, &pStmt, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pStmt, 1, iDocid);\n    rc = sqlite3_step(pStmt);\n    if( rc!=SQLITE_ROW || sqlite3_column_type(pStmt, 0)!=SQLITE_BLOB ){\n      rc = sqlite3_reset(pStmt);\n      if( rc==SQLITE_OK ) rc = FTS_CORRUPT_VTAB;\n      pStmt = 0;\n    }else{\n      rc = SQLITE_OK;\n    }\n  }\n\n  *ppStmt = pStmt;\n  return rc;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3SelectDoctotal(\n  Fts3Table *pTab,                /* Fts3 table handle */\n  sqlite3_stmt **ppStmt           /* OUT: Statement handle */\n){\n  sqlite3_stmt *pStmt = 0;\n  int rc;\n  rc = fts3SqlStmt(pTab, SQL_SELECT_STAT, &pStmt, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int(pStmt, 1, FTS_STAT_DOCTOTAL);\n    if( sqlite3_step(pStmt)!=SQLITE_ROW\n     || sqlite3_column_type(pStmt, 0)!=SQLITE_BLOB\n    ){\n      rc = sqlite3_reset(pStmt);\n      if( rc==SQLITE_OK ) rc = FTS_CORRUPT_VTAB;\n      pStmt = 0;\n    }\n  }\n  *ppStmt = pStmt;\n  return rc;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3SelectDocsize(\n  Fts3Table *pTab,                /* Fts3 table handle */\n  sqlite3_int64 iDocid,           /* Docid to read size data for */\n  sqlite3_stmt **ppStmt           /* OUT: Statement handle */\n){\n  return fts3SelectDocsize(pTab, iDocid, ppStmt);\n}\n\n/*\n** Similar to fts3SqlStmt(). Except, after binding the parameters in\n** array apVal[] to the SQL statement identified by eStmt, the statement\n** is executed.\n**\n** Returns SQLITE_OK if the statement is successfully executed, or an\n** SQLite error code otherwise.\n*/\nstatic void fts3SqlExec(\n  int *pRC,                /* Result code */\n  Fts3Table *p,            /* The FTS3 table */\n  int eStmt,               /* Index of statement to evaluate */\n  sqlite3_value **apVal    /* Parameters to bind */\n){\n  sqlite3_stmt *pStmt;\n  int rc;\n  if( *pRC ) return;\n  rc = fts3SqlStmt(p, eStmt, &pStmt, apVal);\n  if( rc==SQLITE_OK ){\n    sqlite3_step(pStmt);\n    rc = sqlite3_reset(pStmt);\n  }\n  *pRC = rc;\n}\n\n\n/*\n** This function ensures that the caller has obtained an exclusive\n** shared-cache table-lock on the %_segdir table. This is required before\n** writing data to the fts3 table. If this lock is not acquired first, then\n** the caller may end up attempting to take this lock as part of committing\n** a transaction, causing SQLite to return SQLITE_LOCKED or\n** LOCKED_SHAREDCACHEto a COMMIT command.\n**\n** It is best to avoid this because if FTS3 returns any error when\n** committing a transaction, the whole transaction will be rolled back.\n** And this is not what users expect when they get SQLITE_LOCKED_SHAREDCACHE.\n** It can still happen if the user locks the underlying tables directly\n** instead of accessing them via FTS.\n*/\nstatic int fts3Writelock(Fts3Table *p){\n  int rc = SQLITE_OK;\n\n  if( p->nPendingData==0 ){\n    sqlite3_stmt *pStmt;\n    rc = fts3SqlStmt(p, SQL_DELETE_SEGDIR_LEVEL, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_null(pStmt, 1);\n      sqlite3_step(pStmt);\n      rc = sqlite3_reset(pStmt);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** FTS maintains a separate indexes for each language-id (a 32-bit integer).\n** Within each language id, a separate index is maintained to store the\n** document terms, and each configured prefix size (configured the FTS\n** \"prefix=\" option). And each index consists of multiple levels (\"relative\n** levels\").\n**\n** All three of these values (the language id, the specific index and the\n** level within the index) are encoded in 64-bit integer values stored\n** in the %_segdir table on disk. This function is used to convert three\n** separate component values into the single 64-bit integer value that\n** can be used to query the %_segdir table.\n**\n** Specifically, each language-id/index combination is allocated 1024\n** 64-bit integer level values (\"absolute levels\"). The main terms index\n** for language-id 0 is allocate values 0-1023. The first prefix index\n** (if any) for language-id 0 is allocated values 1024-2047. And so on.\n** Language 1 indexes are allocated immediately following language 0.\n**\n** So, for a system with nPrefix prefix indexes configured, the block of\n** absolute levels that corresponds to language-id iLangid and index\n** iIndex starts at absolute level ((iLangid * (nPrefix+1) + iIndex) * 1024).\n*/\nstatic sqlite3_int64 getAbsoluteLevel(\n  Fts3Table *p,                   /* FTS3 table handle */\n  int iLangid,                    /* Language id */\n  int iIndex,                     /* Index in p->aIndex[] */\n  int iLevel                      /* Level of segments */\n){\n  sqlite3_int64 iBase;            /* First absolute level for iLangid/iIndex */\n  assert_fts3_nc( iLangid>=0 );\n  assert( p->nIndex>0 );\n  assert( iIndex>=0 && iIndex<p->nIndex );\n\n  iBase = ((sqlite3_int64)iLangid * p->nIndex + iIndex) * FTS3_SEGDIR_MAXLEVEL;\n  return iBase + iLevel;\n}\n\n/*\n** Set *ppStmt to a statement handle that may be used to iterate through\n** all rows in the %_segdir table, from oldest to newest. If successful,\n** return SQLITE_OK. If an error occurs while preparing the statement,\n** return an SQLite error code.\n**\n** There is only ever one instance of this SQL statement compiled for\n** each FTS3 table.\n**\n** The statement returns the following columns from the %_segdir table:\n**\n**   0: idx\n**   1: start_block\n**   2: leaves_end_block\n**   3: end_block\n**   4: root\n*/\nSQLITE_PRIVATE int sqlite3Fts3AllSegdirs(\n  Fts3Table *p,                   /* FTS3 table */\n  int iLangid,                    /* Language being queried */\n  int iIndex,                     /* Index for p->aIndex[] */\n  int iLevel,                     /* Level to select (relative level) */\n  sqlite3_stmt **ppStmt           /* OUT: Compiled statement */\n){\n  int rc;\n  sqlite3_stmt *pStmt = 0;\n\n  assert( iLevel==FTS3_SEGCURSOR_ALL || iLevel>=0 );\n  assert( iLevel<FTS3_SEGDIR_MAXLEVEL );\n  assert( iIndex>=0 && iIndex<p->nIndex );\n\n  if( iLevel<0 ){\n    /* \"SELECT * FROM %_segdir WHERE level BETWEEN ? AND ? ORDER BY ...\" */\n    rc = fts3SqlStmt(p, SQL_SELECT_LEVEL_RANGE, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pStmt, 1, getAbsoluteLevel(p, iLangid, iIndex, 0));\n      sqlite3_bind_int64(pStmt, 2,\n          getAbsoluteLevel(p, iLangid, iIndex, FTS3_SEGDIR_MAXLEVEL-1)\n      );\n    }\n  }else{\n    /* \"SELECT * FROM %_segdir WHERE level = ? ORDER BY ...\" */\n    rc = fts3SqlStmt(p, SQL_SELECT_LEVEL, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pStmt, 1, getAbsoluteLevel(p, iLangid, iIndex,iLevel));\n    }\n  }\n  *ppStmt = pStmt;\n  return rc;\n}\n\n\n/*\n** Append a single varint to a PendingList buffer. SQLITE_OK is returned\n** if successful, or an SQLite error code otherwise.\n**\n** This function also serves to allocate the PendingList structure itself.\n** For example, to create a new PendingList structure containing two\n** varints:\n**\n**   PendingList *p = 0;\n**   fts3PendingListAppendVarint(&p, 1);\n**   fts3PendingListAppendVarint(&p, 2);\n*/\nstatic int fts3PendingListAppendVarint(\n  PendingList **pp,               /* IN/OUT: Pointer to PendingList struct */\n  sqlite3_int64 i                 /* Value to append to data */\n){\n  PendingList *p = *pp;\n\n  /* Allocate or grow the PendingList as required. */\n  if( !p ){\n    p = sqlite3_malloc64(sizeof(*p) + 100);\n    if( !p ){\n      return SQLITE_NOMEM;\n    }\n    p->nSpace = 100;\n    p->aData = (char *)&p[1];\n    p->nData = 0;\n  }\n  else if( p->nData+FTS3_VARINT_MAX+1>p->nSpace ){\n    i64 nNew = p->nSpace * 2;\n    p = sqlite3_realloc64(p, sizeof(*p) + nNew);\n    if( !p ){\n      sqlite3_free(*pp);\n      *pp = 0;\n      return SQLITE_NOMEM;\n    }\n    p->nSpace = (int)nNew;\n    p->aData = (char *)&p[1];\n  }\n\n  /* Append the new serialized varint to the end of the list. */\n  p->nData += sqlite3Fts3PutVarint(&p->aData[p->nData], i);\n  p->aData[p->nData] = '\\0';\n  *pp = p;\n  return SQLITE_OK;\n}\n\n/*\n** Add a docid/column/position entry to a PendingList structure. Non-zero\n** is returned if the structure is sqlite3_realloced as part of adding\n** the entry. Otherwise, zero.\n**\n** If an OOM error occurs, *pRc is set to SQLITE_NOMEM before returning.\n** Zero is always returned in this case. Otherwise, if no OOM error occurs,\n** it is set to SQLITE_OK.\n*/\nstatic int fts3PendingListAppend(\n  PendingList **pp,               /* IN/OUT: PendingList structure */\n  sqlite3_int64 iDocid,           /* Docid for entry to add */\n  sqlite3_int64 iCol,             /* Column for entry to add */\n  sqlite3_int64 iPos,             /* Position of term for entry to add */\n  int *pRc                        /* OUT: Return code */\n){\n  PendingList *p = *pp;\n  int rc = SQLITE_OK;\n\n  assert( !p || p->iLastDocid<=iDocid );\n\n  if( !p || p->iLastDocid!=iDocid ){\n    u64 iDelta = (u64)iDocid - (u64)(p ? p->iLastDocid : 0);\n    if( p ){\n      assert( p->nData<p->nSpace );\n      assert( p->aData[p->nData]==0 );\n      p->nData++;\n    }\n    if( SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, iDelta)) ){\n      goto pendinglistappend_out;\n    }\n    p->iLastCol = -1;\n    p->iLastPos = 0;\n    p->iLastDocid = iDocid;\n  }\n  if( iCol>0 && p->iLastCol!=iCol ){\n    if( SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, 1))\n     || SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, iCol))\n    ){\n      goto pendinglistappend_out;\n    }\n    p->iLastCol = iCol;\n    p->iLastPos = 0;\n  }\n  if( iCol>=0 ){\n    assert( iPos>p->iLastPos || (iPos==0 && p->iLastPos==0) );\n    rc = fts3PendingListAppendVarint(&p, 2+iPos-p->iLastPos);\n    if( rc==SQLITE_OK ){\n      p->iLastPos = iPos;\n    }\n  }\n\n pendinglistappend_out:\n  *pRc = rc;\n  if( p!=*pp ){\n    *pp = p;\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** Free a PendingList object allocated by fts3PendingListAppend().\n*/\nstatic void fts3PendingListDelete(PendingList *pList){\n  sqlite3_free(pList);\n}\n\n/*\n** Add an entry to one of the pending-terms hash tables.\n*/\nstatic int fts3PendingTermsAddOne(\n  Fts3Table *p,\n  int iCol,\n  int iPos,\n  Fts3Hash *pHash,                /* Pending terms hash table to add entry to */\n  const char *zToken,\n  int nToken\n){\n  PendingList *pList;\n  int rc = SQLITE_OK;\n\n  pList = (PendingList *)fts3HashFind(pHash, zToken, nToken);\n  if( pList ){\n    p->nPendingData -= (pList->nData + nToken + sizeof(Fts3HashElem));\n  }\n  if( fts3PendingListAppend(&pList, p->iPrevDocid, iCol, iPos, &rc) ){\n    if( pList==fts3HashInsert(pHash, zToken, nToken, pList) ){\n      /* Malloc failed while inserting the new entry. This can only\n      ** happen if there was no previous entry for this token.\n      */\n      assert( 0==fts3HashFind(pHash, zToken, nToken) );\n      sqlite3_free(pList);\n      rc = SQLITE_NOMEM;\n    }\n  }\n  if( rc==SQLITE_OK ){\n    p->nPendingData += (pList->nData + nToken + sizeof(Fts3HashElem));\n  }\n  return rc;\n}\n\n/*\n** Tokenize the nul-terminated string zText and add all tokens to the\n** pending-terms hash-table. The docid used is that currently stored in\n** p->iPrevDocid, and the column is specified by argument iCol.\n**\n** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.\n*/\nstatic int fts3PendingTermsAdd(\n  Fts3Table *p,                   /* Table into which text will be inserted */\n  int iLangid,                    /* Language id to use */\n  const char *zText,              /* Text of document to be inserted */\n  int iCol,                       /* Column into which text is being inserted */\n  u32 *pnWord                     /* IN/OUT: Incr. by number tokens inserted */\n){\n  int rc;\n  int iStart = 0;\n  int iEnd = 0;\n  int iPos = 0;\n  int nWord = 0;\n\n  char const *zToken;\n  int nToken = 0;\n\n  sqlite3_tokenizer *pTokenizer = p->pTokenizer;\n  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;\n  sqlite3_tokenizer_cursor *pCsr;\n  int (*xNext)(sqlite3_tokenizer_cursor *pCursor,\n      const char**,int*,int*,int*,int*);\n\n  assert( pTokenizer && pModule );\n\n  /* If the user has inserted a NULL value, this function may be called with\n  ** zText==0. In this case, add zero token entries to the hash table and\n  ** return early. */\n  if( zText==0 ){\n    *pnWord = 0;\n    return SQLITE_OK;\n  }\n\n  rc = sqlite3Fts3OpenTokenizer(pTokenizer, iLangid, zText, -1, &pCsr);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  xNext = pModule->xNext;\n  while( SQLITE_OK==rc\n      && SQLITE_OK==(rc = xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos))\n  ){\n    int i;\n    if( iPos>=nWord ) nWord = iPos+1;\n\n    /* Positions cannot be negative; we use -1 as a terminator internally.\n    ** Tokens must have a non-zero length.\n    */\n    if( iPos<0 || !zToken || nToken<=0 ){\n      rc = SQLITE_ERROR;\n      break;\n    }\n\n    /* Add the term to the terms index */\n    rc = fts3PendingTermsAddOne(\n        p, iCol, iPos, &p->aIndex[0].hPending, zToken, nToken\n    );\n\n    /* Add the term to each of the prefix indexes that it is not too\n    ** short for. */\n    for(i=1; rc==SQLITE_OK && i<p->nIndex; i++){\n      struct Fts3Index *pIndex = &p->aIndex[i];\n      if( nToken<pIndex->nPrefix ) continue;\n      rc = fts3PendingTermsAddOne(\n          p, iCol, iPos, &pIndex->hPending, zToken, pIndex->nPrefix\n      );\n    }\n  }\n\n  pModule->xClose(pCsr);\n  *pnWord += nWord;\n  return (rc==SQLITE_DONE ? SQLITE_OK : rc);\n}\n\n/*\n** Calling this function indicates that subsequent calls to\n** fts3PendingTermsAdd() are to add term/position-list pairs for the\n** contents of the document with docid iDocid.\n*/\nstatic int fts3PendingTermsDocid(\n  Fts3Table *p,                   /* Full-text table handle */\n  int bDelete,                    /* True if this op is a delete */\n  int iLangid,                    /* Language id of row being written */\n  sqlite_int64 iDocid             /* Docid of row being written */\n){\n  assert( iLangid>=0 );\n  assert( bDelete==1 || bDelete==0 );\n\n  /* TODO(shess) Explore whether partially flushing the buffer on\n  ** forced-flush would provide better performance.  I suspect that if\n  ** we ordered the doclists by size and flushed the largest until the\n  ** buffer was half empty, that would let the less frequent terms\n  ** generate longer doclists.\n  */\n  if( iDocid<p->iPrevDocid\n   || (iDocid==p->iPrevDocid && p->bPrevDelete==0)\n   || p->iPrevLangid!=iLangid\n   || p->nPendingData>p->nMaxPendingData\n  ){\n    int rc = sqlite3Fts3PendingTermsFlush(p);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  p->iPrevDocid = iDocid;\n  p->iPrevLangid = iLangid;\n  p->bPrevDelete = bDelete;\n  return SQLITE_OK;\n}\n\n/*\n** Discard the contents of the pending-terms hash tables.\n*/\nSQLITE_PRIVATE void sqlite3Fts3PendingTermsClear(Fts3Table *p){\n  int i;\n  for(i=0; i<p->nIndex; i++){\n    Fts3HashElem *pElem;\n    Fts3Hash *pHash = &p->aIndex[i].hPending;\n    for(pElem=fts3HashFirst(pHash); pElem; pElem=fts3HashNext(pElem)){\n      PendingList *pList = (PendingList *)fts3HashData(pElem);\n      fts3PendingListDelete(pList);\n    }\n    fts3HashClear(pHash);\n  }\n  p->nPendingData = 0;\n}\n\n/*\n** This function is called by the xUpdate() method as part of an INSERT\n** operation. It adds entries for each term in the new record to the\n** pendingTerms hash table.\n**\n** Argument apVal is the same as the similarly named argument passed to\n** fts3InsertData(). Parameter iDocid is the docid of the new row.\n*/\nstatic int fts3InsertTerms(\n  Fts3Table *p,\n  int iLangid,\n  sqlite3_value **apVal,\n  u32 *aSz\n){\n  int i;                          /* Iterator variable */\n  for(i=2; i<p->nColumn+2; i++){\n    int iCol = i-2;\n    if( p->abNotindexed[iCol]==0 ){\n      const char *zText = (const char *)sqlite3_value_text(apVal[i]);\n      int rc = fts3PendingTermsAdd(p, iLangid, zText, iCol, &aSz[iCol]);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      aSz[p->nColumn] += sqlite3_value_bytes(apVal[i]);\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This function is called by the xUpdate() method for an INSERT operation.\n** The apVal parameter is passed a copy of the apVal argument passed by\n** SQLite to the xUpdate() method. i.e:\n**\n**   apVal[0]                Not used for INSERT.\n**   apVal[1]                rowid\n**   apVal[2]                Left-most user-defined column\n**   ...\n**   apVal[p->nColumn+1]     Right-most user-defined column\n**   apVal[p->nColumn+2]     Hidden column with same name as table\n**   apVal[p->nColumn+3]     Hidden \"docid\" column (alias for rowid)\n**   apVal[p->nColumn+4]     Hidden languageid column\n*/\nstatic int fts3InsertData(\n  Fts3Table *p,                   /* Full-text table */\n  sqlite3_value **apVal,          /* Array of values to insert */\n  sqlite3_int64 *piDocid          /* OUT: Docid for row just inserted */\n){\n  int rc;                         /* Return code */\n  sqlite3_stmt *pContentInsert;   /* INSERT INTO %_content VALUES(...) */\n\n  if( p->zContentTbl ){\n    sqlite3_value *pRowid = apVal[p->nColumn+3];\n    if( sqlite3_value_type(pRowid)==SQLITE_NULL ){\n      pRowid = apVal[1];\n    }\n    if( sqlite3_value_type(pRowid)!=SQLITE_INTEGER ){\n      return SQLITE_CONSTRAINT;\n    }\n    *piDocid = sqlite3_value_int64(pRowid);\n    return SQLITE_OK;\n  }\n\n  /* Locate the statement handle used to insert data into the %_content\n  ** table. The SQL for this statement is:\n  **\n  **   INSERT INTO %_content VALUES(?, ?, ?, ...)\n  **\n  ** The statement features N '?' variables, where N is the number of user\n  ** defined columns in the FTS3 table, plus one for the docid field.\n  */\n  rc = fts3SqlStmt(p, SQL_CONTENT_INSERT, &pContentInsert, &apVal[1]);\n  if( rc==SQLITE_OK && p->zLanguageid ){\n    rc = sqlite3_bind_int(\n        pContentInsert, p->nColumn+2,\n        sqlite3_value_int(apVal[p->nColumn+4])\n    );\n  }\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* There is a quirk here. The users INSERT statement may have specified\n  ** a value for the \"rowid\" field, for the \"docid\" field, or for both.\n  ** Which is a problem, since \"rowid\" and \"docid\" are aliases for the\n  ** same value. For example:\n  **\n  **   INSERT INTO fts3tbl(rowid, docid) VALUES(1, 2);\n  **\n  ** In FTS3, this is an error. It is an error to specify non-NULL values\n  ** for both docid and some other rowid alias.\n  */\n  if( SQLITE_NULL!=sqlite3_value_type(apVal[3+p->nColumn]) ){\n    if( SQLITE_NULL==sqlite3_value_type(apVal[0])\n     && SQLITE_NULL!=sqlite3_value_type(apVal[1])\n    ){\n      /* A rowid/docid conflict. */\n      return SQLITE_ERROR;\n    }\n    rc = sqlite3_bind_value(pContentInsert, 1, apVal[3+p->nColumn]);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n\n  /* Execute the statement to insert the record. Set *piDocid to the\n  ** new docid value.\n  */\n  sqlite3_step(pContentInsert);\n  rc = sqlite3_reset(pContentInsert);\n\n  *piDocid = sqlite3_last_insert_rowid(p->db);\n  return rc;\n}\n\n\n\n/*\n** Remove all data from the FTS3 table. Clear the hash table containing\n** pending terms.\n*/\nstatic int fts3DeleteAll(Fts3Table *p, int bContent){\n  int rc = SQLITE_OK;             /* Return code */\n\n  /* Discard the contents of the pending-terms hash table. */\n  sqlite3Fts3PendingTermsClear(p);\n\n  /* Delete everything from the shadow tables. Except, leave %_content as\n  ** is if bContent is false.  */\n  assert( p->zContentTbl==0 || bContent==0 );\n  if( bContent ) fts3SqlExec(&rc, p, SQL_DELETE_ALL_CONTENT, 0);\n  fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGMENTS, 0);\n  fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGDIR, 0);\n  if( p->bHasDocsize ){\n    fts3SqlExec(&rc, p, SQL_DELETE_ALL_DOCSIZE, 0);\n  }\n  if( p->bHasStat ){\n    fts3SqlExec(&rc, p, SQL_DELETE_ALL_STAT, 0);\n  }\n  return rc;\n}\n\n/*\n**\n*/\nstatic int langidFromSelect(Fts3Table *p, sqlite3_stmt *pSelect){\n  int iLangid = 0;\n  if( p->zLanguageid ) iLangid = sqlite3_column_int(pSelect, p->nColumn+1);\n  return iLangid;\n}\n\n/*\n** The first element in the apVal[] array is assumed to contain the docid\n** (an integer) of a row about to be deleted. Remove all terms from the\n** full-text index.\n*/\nstatic void fts3DeleteTerms(\n  int *pRC,               /* Result code */\n  Fts3Table *p,           /* The FTS table to delete from */\n  sqlite3_value *pRowid,  /* The docid to be deleted */\n  u32 *aSz,               /* Sizes of deleted document written here */\n  int *pbFound            /* OUT: Set to true if row really does exist */\n){\n  int rc;\n  sqlite3_stmt *pSelect;\n\n  assert( *pbFound==0 );\n  if( *pRC ) return;\n  rc = fts3SqlStmt(p, SQL_SELECT_CONTENT_BY_ROWID, &pSelect, &pRowid);\n  if( rc==SQLITE_OK ){\n    if( SQLITE_ROW==sqlite3_step(pSelect) ){\n      int i;\n      int iLangid = langidFromSelect(p, pSelect);\n      i64 iDocid = sqlite3_column_int64(pSelect, 0);\n      rc = fts3PendingTermsDocid(p, 1, iLangid, iDocid);\n      for(i=1; rc==SQLITE_OK && i<=p->nColumn; i++){\n        int iCol = i-1;\n        if( p->abNotindexed[iCol]==0 ){\n          const char *zText = (const char *)sqlite3_column_text(pSelect, i);\n          rc = fts3PendingTermsAdd(p, iLangid, zText, -1, &aSz[iCol]);\n          aSz[p->nColumn] += sqlite3_column_bytes(pSelect, i);\n        }\n      }\n      if( rc!=SQLITE_OK ){\n        sqlite3_reset(pSelect);\n        *pRC = rc;\n        return;\n      }\n      *pbFound = 1;\n    }\n    rc = sqlite3_reset(pSelect);\n  }else{\n    sqlite3_reset(pSelect);\n  }\n  *pRC = rc;\n}\n\n/*\n** Forward declaration to account for the circular dependency between\n** functions fts3SegmentMerge() and fts3AllocateSegdirIdx().\n*/\nstatic int fts3SegmentMerge(Fts3Table *, int, int, int);\n\n/*\n** This function allocates a new level iLevel index in the segdir table.\n** Usually, indexes are allocated within a level sequentially starting\n** with 0, so the allocated index is one greater than the value returned\n** by:\n**\n**   SELECT max(idx) FROM %_segdir WHERE level = :iLevel\n**\n** However, if there are already FTS3_MERGE_COUNT indexes at the requested\n** level, they are merged into a single level (iLevel+1) segment and the\n** allocated index is 0.\n**\n** If successful, *piIdx is set to the allocated index slot and SQLITE_OK\n** returned. Otherwise, an SQLite error code is returned.\n*/\nstatic int fts3AllocateSegdirIdx(\n  Fts3Table *p,\n  int iLangid,                    /* Language id */\n  int iIndex,                     /* Index for p->aIndex */\n  int iLevel,\n  int *piIdx\n){\n  int rc;                         /* Return Code */\n  sqlite3_stmt *pNextIdx;         /* Query for next idx at level iLevel */\n  int iNext = 0;                  /* Result of query pNextIdx */\n\n  assert( iLangid>=0 );\n  assert( p->nIndex>=1 );\n\n  /* Set variable iNext to the next available segdir index at level iLevel. */\n  rc = fts3SqlStmt(p, SQL_NEXT_SEGMENT_INDEX, &pNextIdx, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(\n        pNextIdx, 1, getAbsoluteLevel(p, iLangid, iIndex, iLevel)\n    );\n    if( SQLITE_ROW==sqlite3_step(pNextIdx) ){\n      iNext = sqlite3_column_int(pNextIdx, 0);\n    }\n    rc = sqlite3_reset(pNextIdx);\n  }\n\n  if( rc==SQLITE_OK ){\n    /* If iNext is FTS3_MERGE_COUNT, indicating that level iLevel is already\n    ** full, merge all segments in level iLevel into a single iLevel+1\n    ** segment and allocate (newly freed) index 0 at level iLevel. Otherwise,\n    ** if iNext is less than FTS3_MERGE_COUNT, allocate index iNext.\n    */\n    if( iNext>=MergeCount(p) ){\n      fts3LogMerge(16, getAbsoluteLevel(p, iLangid, iIndex, iLevel));\n      rc = fts3SegmentMerge(p, iLangid, iIndex, iLevel);\n      *piIdx = 0;\n    }else{\n      *piIdx = iNext;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** The %_segments table is declared as follows:\n**\n**   CREATE TABLE %_segments(blockid INTEGER PRIMARY KEY, block BLOB)\n**\n** This function reads data from a single row of the %_segments table. The\n** specific row is identified by the iBlockid parameter. If paBlob is not\n** NULL, then a buffer is allocated using sqlite3_malloc() and populated\n** with the contents of the blob stored in the \"block\" column of the\n** identified table row is. Whether or not paBlob is NULL, *pnBlob is set\n** to the size of the blob in bytes before returning.\n**\n** If an error occurs, or the table does not contain the specified row,\n** an SQLite error code is returned. Otherwise, SQLITE_OK is returned. If\n** paBlob is non-NULL, then it is the responsibility of the caller to\n** eventually free the returned buffer.\n**\n** This function may leave an open sqlite3_blob* handle in the\n** Fts3Table.pSegments variable. This handle is reused by subsequent calls\n** to this function. The handle may be closed by calling the\n** sqlite3Fts3SegmentsClose() function. Reusing a blob handle is a handy\n** performance improvement, but the blob handle should always be closed\n** before control is returned to the user (to prevent a lock being held\n** on the database file for longer than necessary). Thus, any virtual table\n** method (xFilter etc.) that may directly or indirectly call this function\n** must call sqlite3Fts3SegmentsClose() before returning.\n*/\nSQLITE_PRIVATE int sqlite3Fts3ReadBlock(\n  Fts3Table *p,                   /* FTS3 table handle */\n  sqlite3_int64 iBlockid,         /* Access the row with blockid=$iBlockid */\n  char **paBlob,                  /* OUT: Blob data in malloc'd buffer */\n  int *pnBlob,                    /* OUT: Size of blob data */\n  int *pnLoad                     /* OUT: Bytes actually loaded */\n){\n  int rc;                         /* Return code */\n\n  /* pnBlob must be non-NULL. paBlob may be NULL or non-NULL. */\n  assert( pnBlob );\n\n  if( p->pSegments ){\n    rc = sqlite3_blob_reopen(p->pSegments, iBlockid);\n  }else{\n    if( 0==p->zSegmentsTbl ){\n      p->zSegmentsTbl = sqlite3_mprintf(\"%s_segments\", p->zName);\n      if( 0==p->zSegmentsTbl ) return SQLITE_NOMEM;\n    }\n    rc = sqlite3_blob_open(\n       p->db, p->zDb, p->zSegmentsTbl, \"block\", iBlockid, 0, &p->pSegments\n    );\n  }\n\n  if( rc==SQLITE_OK ){\n    int nByte = sqlite3_blob_bytes(p->pSegments);\n    *pnBlob = nByte;\n    if( paBlob ){\n      char *aByte = sqlite3_malloc64((i64)nByte + FTS3_NODE_PADDING);\n      if( !aByte ){\n        rc = SQLITE_NOMEM;\n      }else{\n        if( pnLoad && nByte>(FTS3_NODE_CHUNK_THRESHOLD) ){\n          nByte = FTS3_NODE_CHUNKSIZE;\n          *pnLoad = nByte;\n        }\n        rc = sqlite3_blob_read(p->pSegments, aByte, nByte, 0);\n        memset(&aByte[nByte], 0, FTS3_NODE_PADDING);\n        if( rc!=SQLITE_OK ){\n          sqlite3_free(aByte);\n          aByte = 0;\n        }\n      }\n      *paBlob = aByte;\n    }\n  }else if( rc==SQLITE_ERROR ){\n    rc = FTS_CORRUPT_VTAB;\n  }\n\n  return rc;\n}\n\n/*\n** Close the blob handle at p->pSegments, if it is open. See comments above\n** the sqlite3Fts3ReadBlock() function for details.\n*/\nSQLITE_PRIVATE void sqlite3Fts3SegmentsClose(Fts3Table *p){\n  sqlite3_blob_close(p->pSegments);\n  p->pSegments = 0;\n}\n\nstatic int fts3SegReaderIncrRead(Fts3SegReader *pReader){\n  int nRead;                      /* Number of bytes to read */\n  int rc;                         /* Return code */\n\n  nRead = MIN(pReader->nNode - pReader->nPopulate, FTS3_NODE_CHUNKSIZE);\n  rc = sqlite3_blob_read(\n      pReader->pBlob,\n      &pReader->aNode[pReader->nPopulate],\n      nRead,\n      pReader->nPopulate\n  );\n\n  if( rc==SQLITE_OK ){\n    pReader->nPopulate += nRead;\n    memset(&pReader->aNode[pReader->nPopulate], 0, FTS3_NODE_PADDING);\n    if( pReader->nPopulate==pReader->nNode ){\n      sqlite3_blob_close(pReader->pBlob);\n      pReader->pBlob = 0;\n      pReader->nPopulate = 0;\n    }\n  }\n  return rc;\n}\n\nstatic int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){\n  int rc = SQLITE_OK;\n  assert( !pReader->pBlob\n       || (pFrom>=pReader->aNode && pFrom<&pReader->aNode[pReader->nNode])\n  );\n  while( pReader->pBlob && rc==SQLITE_OK\n     &&  (pFrom - pReader->aNode + nByte)>pReader->nPopulate\n  ){\n    rc = fts3SegReaderIncrRead(pReader);\n  }\n  return rc;\n}\n\n/*\n** Set an Fts3SegReader cursor to point at EOF.\n*/\nstatic void fts3SegReaderSetEof(Fts3SegReader *pSeg){\n  if( !fts3SegReaderIsRootOnly(pSeg) ){\n    sqlite3_free(pSeg->aNode);\n    sqlite3_blob_close(pSeg->pBlob);\n    pSeg->pBlob = 0;\n  }\n  pSeg->aNode = 0;\n}\n\n/*\n** Move the iterator passed as the first argument to the next term in the\n** segment. If successful, SQLITE_OK is returned. If there is no next term,\n** SQLITE_DONE. Otherwise, an SQLite error code.\n*/\nstatic int fts3SegReaderNext(\n  Fts3Table *p,\n  Fts3SegReader *pReader,\n  int bIncr\n){\n  int rc;                         /* Return code of various sub-routines */\n  char *pNext;                    /* Cursor variable */\n  int nPrefix;                    /* Number of bytes in term prefix */\n  int nSuffix;                    /* Number of bytes in term suffix */\n\n  if( !pReader->aDoclist ){\n    pNext = pReader->aNode;\n  }else{\n    pNext = &pReader->aDoclist[pReader->nDoclist];\n  }\n\n  if( !pNext || pNext>=&pReader->aNode[pReader->nNode] ){\n\n    if( fts3SegReaderIsPending(pReader) ){\n      Fts3HashElem *pElem = *(pReader->ppNextElem);\n      sqlite3_free(pReader->aNode);\n      pReader->aNode = 0;\n      if( pElem ){\n        char *aCopy;\n        PendingList *pList = (PendingList *)fts3HashData(pElem);\n        int nCopy = pList->nData+1;\n\n        int nTerm = fts3HashKeysize(pElem);\n        if( (nTerm+1)>pReader->nTermAlloc ){\n          sqlite3_free(pReader->zTerm);\n          pReader->zTerm = (char*)sqlite3_malloc64(((i64)nTerm+1)*2);\n          if( !pReader->zTerm ) return SQLITE_NOMEM;\n          pReader->nTermAlloc = (nTerm+1)*2;\n        }\n        memcpy(pReader->zTerm, fts3HashKey(pElem), nTerm);\n        pReader->zTerm[nTerm] = '\\0';\n        pReader->nTerm = nTerm;\n\n        aCopy = (char*)sqlite3_malloc64(nCopy);\n        if( !aCopy ) return SQLITE_NOMEM;\n        memcpy(aCopy, pList->aData, nCopy);\n        pReader->nNode = pReader->nDoclist = nCopy;\n        pReader->aNode = pReader->aDoclist = aCopy;\n        pReader->ppNextElem++;\n        assert( pReader->aNode );\n      }\n      return SQLITE_OK;\n    }\n\n    fts3SegReaderSetEof(pReader);\n\n    /* If iCurrentBlock>=iLeafEndBlock, this is an EOF condition. All leaf\n    ** blocks have already been traversed.  */\n#ifdef CORRUPT_DB\n    assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock || CORRUPT_DB );\n#endif\n    if( pReader->iCurrentBlock>=pReader->iLeafEndBlock ){\n      return SQLITE_OK;\n    }\n\n    rc = sqlite3Fts3ReadBlock(\n        p, ++pReader->iCurrentBlock, &pReader->aNode, &pReader->nNode,\n        (bIncr ? &pReader->nPopulate : 0)\n    );\n    if( rc!=SQLITE_OK ) return rc;\n    assert( pReader->pBlob==0 );\n    if( bIncr && pReader->nPopulate<pReader->nNode ){\n      pReader->pBlob = p->pSegments;\n      p->pSegments = 0;\n    }\n    pNext = pReader->aNode;\n  }\n\n  assert( !fts3SegReaderIsPending(pReader) );\n\n  rc = fts3SegReaderRequire(pReader, pNext, FTS3_VARINT_MAX*2);\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* Because of the FTS3_NODE_PADDING bytes of padding, the following is\n  ** safe (no risk of overread) even if the node data is corrupted. */\n  pNext += fts3GetVarint32(pNext, &nPrefix);\n  pNext += fts3GetVarint32(pNext, &nSuffix);\n  if( nSuffix<=0\n   || (&pReader->aNode[pReader->nNode] - pNext)<nSuffix\n   || nPrefix>pReader->nTerm\n  ){\n    return FTS_CORRUPT_VTAB;\n  }\n\n  /* Both nPrefix and nSuffix were read by fts3GetVarint32() and so are\n  ** between 0 and 0x7FFFFFFF. But the sum of the two may cause integer\n  ** overflow - hence the (i64) casts.  */\n  if( (i64)nPrefix+nSuffix>(i64)pReader->nTermAlloc ){\n    i64 nNew = ((i64)nPrefix+nSuffix)*2;\n    char *zNew = sqlite3_realloc64(pReader->zTerm, nNew);\n    if( !zNew ){\n      return SQLITE_NOMEM;\n    }\n    pReader->zTerm = zNew;\n    pReader->nTermAlloc = nNew;\n  }\n\n  rc = fts3SegReaderRequire(pReader, pNext, nSuffix+FTS3_VARINT_MAX);\n  if( rc!=SQLITE_OK ) return rc;\n\n  memcpy(&pReader->zTerm[nPrefix], pNext, nSuffix);\n  pReader->nTerm = nPrefix+nSuffix;\n  pNext += nSuffix;\n  pNext += fts3GetVarint32(pNext, &pReader->nDoclist);\n  pReader->aDoclist = pNext;\n  pReader->pOffsetList = 0;\n\n  /* Check that the doclist does not appear to extend past the end of the\n  ** b-tree node. And that the final byte of the doclist is 0x00. If either\n  ** of these statements is untrue, then the data structure is corrupt.\n  */\n  if( pReader->nDoclist > pReader->nNode-(pReader->aDoclist-pReader->aNode)\n   || (pReader->nPopulate==0 && pReader->aDoclist[pReader->nDoclist-1])\n   || pReader->nDoclist==0\n  ){\n    return FTS_CORRUPT_VTAB;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Set the SegReader to point to the first docid in the doclist associated\n** with the current term.\n*/\nstatic int fts3SegReaderFirstDocid(Fts3Table *pTab, Fts3SegReader *pReader){\n  int rc = SQLITE_OK;\n  assert( pReader->aDoclist );\n  assert( !pReader->pOffsetList );\n  if( pTab->bDescIdx && fts3SegReaderIsPending(pReader) ){\n    u8 bEof = 0;\n    pReader->iDocid = 0;\n    pReader->nOffsetList = 0;\n    sqlite3Fts3DoclistPrev(0,\n        pReader->aDoclist, pReader->nDoclist, &pReader->pOffsetList,\n        &pReader->iDocid, &pReader->nOffsetList, &bEof\n    );\n  }else{\n    rc = fts3SegReaderRequire(pReader, pReader->aDoclist, FTS3_VARINT_MAX);\n    if( rc==SQLITE_OK ){\n      int n = sqlite3Fts3GetVarint(pReader->aDoclist, &pReader->iDocid);\n      pReader->pOffsetList = &pReader->aDoclist[n];\n    }\n  }\n  return rc;\n}\n\n/*\n** Advance the SegReader to point to the next docid in the doclist\n** associated with the current term.\n**\n** If arguments ppOffsetList and pnOffsetList are not NULL, then\n** *ppOffsetList is set to point to the first column-offset list\n** in the doclist entry (i.e. immediately past the docid varint).\n** *pnOffsetList is set to the length of the set of column-offset\n** lists, not including the nul-terminator byte. For example:\n*/\nstatic int fts3SegReaderNextDocid(\n  Fts3Table *pTab,\n  Fts3SegReader *pReader,         /* Reader to advance to next docid */\n  char **ppOffsetList,            /* OUT: Pointer to current position-list */\n  int *pnOffsetList               /* OUT: Length of *ppOffsetList in bytes */\n){\n  int rc = SQLITE_OK;\n  char *p = pReader->pOffsetList;\n  char c = 0;\n\n  assert( p );\n\n  if( pTab->bDescIdx && fts3SegReaderIsPending(pReader) ){\n    /* A pending-terms seg-reader for an FTS4 table that uses order=desc.\n    ** Pending-terms doclists are always built up in ascending order, so\n    ** we have to iterate through them backwards here. */\n    u8 bEof = 0;\n    if( ppOffsetList ){\n      *ppOffsetList = pReader->pOffsetList;\n      *pnOffsetList = pReader->nOffsetList - 1;\n    }\n    sqlite3Fts3DoclistPrev(0,\n        pReader->aDoclist, pReader->nDoclist, &p, &pReader->iDocid,\n        &pReader->nOffsetList, &bEof\n    );\n    if( bEof ){\n      pReader->pOffsetList = 0;\n    }else{\n      pReader->pOffsetList = p;\n    }\n  }else{\n    char *pEnd = &pReader->aDoclist[pReader->nDoclist];\n\n    /* Pointer p currently points at the first byte of an offset list. The\n    ** following block advances it to point one byte past the end of\n    ** the same offset list. */\n    while( 1 ){\n\n      /* The following line of code (and the \"p++\" below the while() loop) is\n      ** normally all that is required to move pointer p to the desired\n      ** position. The exception is if this node is being loaded from disk\n      ** incrementally and pointer \"p\" now points to the first byte past\n      ** the populated part of pReader->aNode[].\n      */\n      while( *p | c ) c = *p++ & 0x80;\n      assert( *p==0 );\n\n      if( pReader->pBlob==0 || p<&pReader->aNode[pReader->nPopulate] ) break;\n      rc = fts3SegReaderIncrRead(pReader);\n      if( rc!=SQLITE_OK ) return rc;\n    }\n    p++;\n\n    /* If required, populate the output variables with a pointer to and the\n    ** size of the previous offset-list.\n    */\n    if( ppOffsetList ){\n      *ppOffsetList = pReader->pOffsetList;\n      *pnOffsetList = (int)(p - pReader->pOffsetList - 1);\n    }\n\n    /* List may have been edited in place by fts3EvalNearTrim() */\n    while( p<pEnd && *p==0 ) p++;\n\n    /* If there are no more entries in the doclist, set pOffsetList to\n    ** NULL. Otherwise, set Fts3SegReader.iDocid to the next docid and\n    ** Fts3SegReader.pOffsetList to point to the next offset list before\n    ** returning.\n    */\n    if( p>=pEnd ){\n      pReader->pOffsetList = 0;\n    }else{\n      rc = fts3SegReaderRequire(pReader, p, FTS3_VARINT_MAX);\n      if( rc==SQLITE_OK ){\n        u64 iDelta;\n        pReader->pOffsetList = p + sqlite3Fts3GetVarintU(p, &iDelta);\n        if( pTab->bDescIdx ){\n          pReader->iDocid = (i64)((u64)pReader->iDocid - iDelta);\n        }else{\n          pReader->iDocid = (i64)((u64)pReader->iDocid + iDelta);\n        }\n      }\n    }\n  }\n\n  return rc;\n}\n\n\nSQLITE_PRIVATE int sqlite3Fts3MsrOvfl(\n  Fts3Cursor *pCsr,\n  Fts3MultiSegReader *pMsr,\n  int *pnOvfl\n){\n  Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;\n  int nOvfl = 0;\n  int ii;\n  int rc = SQLITE_OK;\n  int pgsz = p->nPgsz;\n\n  assert( p->bFts4 );\n  assert( pgsz>0 );\n\n  for(ii=0; rc==SQLITE_OK && ii<pMsr->nSegment; ii++){\n    Fts3SegReader *pReader = pMsr->apSegment[ii];\n    if( !fts3SegReaderIsPending(pReader)\n     && !fts3SegReaderIsRootOnly(pReader)\n    ){\n      sqlite3_int64 jj;\n      for(jj=pReader->iStartBlock; jj<=pReader->iLeafEndBlock; jj++){\n        int nBlob;\n        rc = sqlite3Fts3ReadBlock(p, jj, 0, &nBlob, 0);\n        if( rc!=SQLITE_OK ) break;\n        if( (nBlob+35)>pgsz ){\n          nOvfl += (nBlob + 34)/pgsz;\n        }\n      }\n    }\n  }\n  *pnOvfl = nOvfl;\n  return rc;\n}\n\n/*\n** Free all allocations associated with the iterator passed as the\n** second argument.\n*/\nSQLITE_PRIVATE void sqlite3Fts3SegReaderFree(Fts3SegReader *pReader){\n  if( pReader ){\n    sqlite3_free(pReader->zTerm);\n    if( !fts3SegReaderIsRootOnly(pReader) ){\n      sqlite3_free(pReader->aNode);\n    }\n    sqlite3_blob_close(pReader->pBlob);\n  }\n  sqlite3_free(pReader);\n}\n\n/*\n** Allocate a new SegReader object.\n*/\nSQLITE_PRIVATE int sqlite3Fts3SegReaderNew(\n  int iAge,                       /* Segment \"age\". */\n  int bLookup,                    /* True for a lookup only */\n  sqlite3_int64 iStartLeaf,       /* First leaf to traverse */\n  sqlite3_int64 iEndLeaf,         /* Final leaf to traverse */\n  sqlite3_int64 iEndBlock,        /* Final block of segment */\n  const char *zRoot,              /* Buffer containing root node */\n  int nRoot,                      /* Size of buffer containing root node */\n  Fts3SegReader **ppReader        /* OUT: Allocated Fts3SegReader */\n){\n  Fts3SegReader *pReader;         /* Newly allocated SegReader object */\n  int nExtra = 0;                 /* Bytes to allocate segment root node */\n\n  assert( zRoot!=0 || nRoot==0 );\n#ifdef CORRUPT_DB\n  assert( zRoot!=0 || CORRUPT_DB );\n#endif\n\n  if( iStartLeaf==0 ){\n    if( iEndLeaf!=0 ) return FTS_CORRUPT_VTAB;\n    nExtra = nRoot + FTS3_NODE_PADDING;\n  }\n\n  pReader = (Fts3SegReader *)sqlite3_malloc64(sizeof(Fts3SegReader) + nExtra);\n  if( !pReader ){\n    return SQLITE_NOMEM;\n  }\n  memset(pReader, 0, sizeof(Fts3SegReader));\n  pReader->iIdx = iAge;\n  pReader->bLookup = bLookup!=0;\n  pReader->iStartBlock = iStartLeaf;\n  pReader->iLeafEndBlock = iEndLeaf;\n  pReader->iEndBlock = iEndBlock;\n\n  if( nExtra ){\n    /* The entire segment is stored in the root node. */\n    pReader->aNode = (char *)&pReader[1];\n    pReader->rootOnly = 1;\n    pReader->nNode = nRoot;\n    if( nRoot ) memcpy(pReader->aNode, zRoot, nRoot);\n    memset(&pReader->aNode[nRoot], 0, FTS3_NODE_PADDING);\n  }else{\n    pReader->iCurrentBlock = iStartLeaf-1;\n  }\n  *ppReader = pReader;\n  return SQLITE_OK;\n}\n\n/*\n** This is a comparison function used as a qsort() callback when sorting\n** an array of pending terms by term. This occurs as part of flushing\n** the contents of the pending-terms hash table to the database.\n*/\nstatic int SQLITE_CDECL fts3CompareElemByTerm(\n  const void *lhs,\n  const void *rhs\n){\n  char *z1 = fts3HashKey(*(Fts3HashElem **)lhs);\n  char *z2 = fts3HashKey(*(Fts3HashElem **)rhs);\n  int n1 = fts3HashKeysize(*(Fts3HashElem **)lhs);\n  int n2 = fts3HashKeysize(*(Fts3HashElem **)rhs);\n\n  int n = (n1<n2 ? n1 : n2);\n  int c = memcmp(z1, z2, n);\n  if( c==0 ){\n    c = n1 - n2;\n  }\n  return c;\n}\n\n/*\n** This function is used to allocate an Fts3SegReader that iterates through\n** a subset of the terms stored in the Fts3Table.pendingTerms array.\n**\n** If the isPrefixIter parameter is zero, then the returned SegReader iterates\n** through each term in the pending-terms table. Or, if isPrefixIter is\n** non-zero, it iterates through each term and its prefixes. For example, if\n** the pending terms hash table contains the terms \"sqlite\", \"mysql\" and\n** \"firebird\", then the iterator visits the following 'terms' (in the order\n** shown):\n**\n**   f fi fir fire fireb firebi firebir firebird\n**   m my mys mysq mysql\n**   s sq sql sqli sqlit sqlite\n**\n** Whereas if isPrefixIter is zero, the terms visited are:\n**\n**   firebird mysql sqlite\n*/\nSQLITE_PRIVATE int sqlite3Fts3SegReaderPending(\n  Fts3Table *p,                   /* Virtual table handle */\n  int iIndex,                     /* Index for p->aIndex */\n  const char *zTerm,              /* Term to search for */\n  int nTerm,                      /* Size of buffer zTerm */\n  int bPrefix,                    /* True for a prefix iterator */\n  Fts3SegReader **ppReader        /* OUT: SegReader for pending-terms */\n){\n  Fts3SegReader *pReader = 0;     /* Fts3SegReader object to return */\n  Fts3HashElem *pE;               /* Iterator variable */\n  Fts3HashElem **aElem = 0;       /* Array of term hash entries to scan */\n  int nElem = 0;                  /* Size of array at aElem */\n  int rc = SQLITE_OK;             /* Return Code */\n  Fts3Hash *pHash;\n\n  pHash = &p->aIndex[iIndex].hPending;\n  if( bPrefix ){\n    int nAlloc = 0;               /* Size of allocated array at aElem */\n\n    for(pE=fts3HashFirst(pHash); pE; pE=fts3HashNext(pE)){\n      char *zKey = (char *)fts3HashKey(pE);\n      int nKey = fts3HashKeysize(pE);\n      if( nTerm==0 || (nKey>=nTerm && 0==memcmp(zKey, zTerm, nTerm)) ){\n        if( nElem==nAlloc ){\n          Fts3HashElem **aElem2;\n          nAlloc += 16;\n          aElem2 = (Fts3HashElem **)sqlite3_realloc64(\n              aElem, nAlloc*sizeof(Fts3HashElem *)\n          );\n          if( !aElem2 ){\n            rc = SQLITE_NOMEM;\n            nElem = 0;\n            break;\n          }\n          aElem = aElem2;\n        }\n\n        aElem[nElem++] = pE;\n      }\n    }\n\n    /* If more than one term matches the prefix, sort the Fts3HashElem\n    ** objects in term order using qsort(). This uses the same comparison\n    ** callback as is used when flushing terms to disk.\n    */\n    if( nElem>1 ){\n      qsort(aElem, nElem, sizeof(Fts3HashElem *), fts3CompareElemByTerm);\n    }\n\n  }else{\n    /* The query is a simple term lookup that matches at most one term in\n    ** the index. All that is required is a straight hash-lookup.\n    **\n    ** Because the stack address of pE may be accessed via the aElem pointer\n    ** below, the \"Fts3HashElem *pE\" must be declared so that it is valid\n    ** within this entire function, not just this \"else{...}\" block.\n    */\n    pE = fts3HashFindElem(pHash, zTerm, nTerm);\n    if( pE ){\n      aElem = &pE;\n      nElem = 1;\n    }\n  }\n\n  if( nElem>0 ){\n    sqlite3_int64 nByte;\n    nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);\n    pReader = (Fts3SegReader *)sqlite3_malloc64(nByte);\n    if( !pReader ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(pReader, 0, nByte);\n      pReader->iIdx = 0x7FFFFFFF;\n      pReader->ppNextElem = (Fts3HashElem **)&pReader[1];\n      memcpy(pReader->ppNextElem, aElem, nElem*sizeof(Fts3HashElem *));\n    }\n  }\n\n  if( bPrefix ){\n    sqlite3_free(aElem);\n  }\n  *ppReader = pReader;\n  return rc;\n}\n\n/*\n** Compare the entries pointed to by two Fts3SegReader structures.\n** Comparison is as follows:\n**\n**   1) EOF is greater than not EOF.\n**\n**   2) The current terms (if any) are compared using memcmp(). If one\n**      term is a prefix of another, the longer term is considered the\n**      larger.\n**\n**   3) By segment age. An older segment is considered larger.\n*/\nstatic int fts3SegReaderCmp(Fts3SegReader *pLhs, Fts3SegReader *pRhs){\n  int rc;\n  if( pLhs->aNode && pRhs->aNode ){\n    int rc2 = pLhs->nTerm - pRhs->nTerm;\n    if( rc2<0 ){\n      rc = memcmp(pLhs->zTerm, pRhs->zTerm, pLhs->nTerm);\n    }else{\n      rc = memcmp(pLhs->zTerm, pRhs->zTerm, pRhs->nTerm);\n    }\n    if( rc==0 ){\n      rc = rc2;\n    }\n  }else{\n    rc = (pLhs->aNode==0) - (pRhs->aNode==0);\n  }\n  if( rc==0 ){\n    rc = pRhs->iIdx - pLhs->iIdx;\n  }\n  assert_fts3_nc( rc!=0 );\n  return rc;\n}\n\n/*\n** A different comparison function for SegReader structures. In this\n** version, it is assumed that each SegReader points to an entry in\n** a doclist for identical terms. Comparison is made as follows:\n**\n**   1) EOF (end of doclist in this case) is greater than not EOF.\n**\n**   2) By current docid.\n**\n**   3) By segment age. An older segment is considered larger.\n*/\nstatic int fts3SegReaderDoclistCmp(Fts3SegReader *pLhs, Fts3SegReader *pRhs){\n  int rc = (pLhs->pOffsetList==0)-(pRhs->pOffsetList==0);\n  if( rc==0 ){\n    if( pLhs->iDocid==pRhs->iDocid ){\n      rc = pRhs->iIdx - pLhs->iIdx;\n    }else{\n      rc = (pLhs->iDocid > pRhs->iDocid) ? 1 : -1;\n    }\n  }\n  assert( pLhs->aNode && pRhs->aNode );\n  return rc;\n}\nstatic int fts3SegReaderDoclistCmpRev(Fts3SegReader *pLhs, Fts3SegReader *pRhs){\n  int rc = (pLhs->pOffsetList==0)-(pRhs->pOffsetList==0);\n  if( rc==0 ){\n    if( pLhs->iDocid==pRhs->iDocid ){\n      rc = pRhs->iIdx - pLhs->iIdx;\n    }else{\n      rc = (pLhs->iDocid < pRhs->iDocid) ? 1 : -1;\n    }\n  }\n  assert( pLhs->aNode && pRhs->aNode );\n  return rc;\n}\n\n/*\n** Compare the term that the Fts3SegReader object passed as the first argument\n** points to with the term specified by arguments zTerm and nTerm.\n**\n** If the pSeg iterator is already at EOF, return 0. Otherwise, return\n** -ve if the pSeg term is less than zTerm/nTerm, 0 if the two terms are\n** equal, or +ve if the pSeg term is greater than zTerm/nTerm.\n*/\nstatic int fts3SegReaderTermCmp(\n  Fts3SegReader *pSeg,            /* Segment reader object */\n  const char *zTerm,              /* Term to compare to */\n  int nTerm                       /* Size of term zTerm in bytes */\n){\n  int res = 0;\n  if( pSeg->aNode ){\n    if( pSeg->nTerm>nTerm ){\n      res = memcmp(pSeg->zTerm, zTerm, nTerm);\n    }else{\n      res = memcmp(pSeg->zTerm, zTerm, pSeg->nTerm);\n    }\n    if( res==0 ){\n      res = pSeg->nTerm-nTerm;\n    }\n  }\n  return res;\n}\n\n/*\n** Argument apSegment is an array of nSegment elements. It is known that\n** the final (nSegment-nSuspect) members are already in sorted order\n** (according to the comparison function provided). This function shuffles\n** the array around until all entries are in sorted order.\n*/\nstatic void fts3SegReaderSort(\n  Fts3SegReader **apSegment,                     /* Array to sort entries of */\n  int nSegment,                                  /* Size of apSegment array */\n  int nSuspect,                                  /* Unsorted entry count */\n  int (*xCmp)(Fts3SegReader *, Fts3SegReader *)  /* Comparison function */\n){\n  int i;                          /* Iterator variable */\n\n  assert( nSuspect<=nSegment );\n\n  if( nSuspect==nSegment ) nSuspect--;\n  for(i=nSuspect-1; i>=0; i--){\n    int j;\n    for(j=i; j<(nSegment-1); j++){\n      Fts3SegReader *pTmp;\n      if( xCmp(apSegment[j], apSegment[j+1])<0 ) break;\n      pTmp = apSegment[j+1];\n      apSegment[j+1] = apSegment[j];\n      apSegment[j] = pTmp;\n    }\n  }\n\n#ifndef NDEBUG\n  /* Check that the list really is sorted now. */\n  for(i=0; i<(nSuspect-1); i++){\n    assert( xCmp(apSegment[i], apSegment[i+1])<0 );\n  }\n#endif\n}\n\n/*\n** Insert a record into the %_segments table.\n*/\nstatic int fts3WriteSegment(\n  Fts3Table *p,                   /* Virtual table handle */\n  sqlite3_int64 iBlock,           /* Block id for new block */\n  char *z,                        /* Pointer to buffer containing block data */\n  int n                           /* Size of buffer z in bytes */\n){\n  sqlite3_stmt *pStmt;\n  int rc = fts3SqlStmt(p, SQL_INSERT_SEGMENTS, &pStmt, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pStmt, 1, iBlock);\n    sqlite3_bind_blob(pStmt, 2, z, n, SQLITE_STATIC);\n    sqlite3_step(pStmt);\n    rc = sqlite3_reset(pStmt);\n    sqlite3_bind_null(pStmt, 2);\n  }\n  return rc;\n}\n\n/*\n** Find the largest relative level number in the table. If successful, set\n** *pnMax to this value and return SQLITE_OK. Otherwise, if an error occurs,\n** set *pnMax to zero and return an SQLite error code.\n*/\nSQLITE_PRIVATE int sqlite3Fts3MaxLevel(Fts3Table *p, int *pnMax){\n  int rc;\n  int mxLevel = 0;\n  sqlite3_stmt *pStmt = 0;\n\n  rc = fts3SqlStmt(p, SQL_SELECT_MXLEVEL, &pStmt, 0);\n  if( rc==SQLITE_OK ){\n    if( SQLITE_ROW==sqlite3_step(pStmt) ){\n      mxLevel = sqlite3_column_int(pStmt, 0);\n    }\n    rc = sqlite3_reset(pStmt);\n  }\n  *pnMax = mxLevel;\n  return rc;\n}\n\n/*\n** Insert a record into the %_segdir table.\n*/\nstatic int fts3WriteSegdir(\n  Fts3Table *p,                   /* Virtual table handle */\n  sqlite3_int64 iLevel,           /* Value for \"level\" field (absolute level) */\n  int iIdx,                       /* Value for \"idx\" field */\n  sqlite3_int64 iStartBlock,      /* Value for \"start_block\" field */\n  sqlite3_int64 iLeafEndBlock,    /* Value for \"leaves_end_block\" field */\n  sqlite3_int64 iEndBlock,        /* Value for \"end_block\" field */\n  sqlite3_int64 nLeafData,        /* Bytes of leaf data in segment */\n  char *zRoot,                    /* Blob value for \"root\" field */\n  int nRoot                       /* Number of bytes in buffer zRoot */\n){\n  sqlite3_stmt *pStmt;\n  int rc = fts3SqlStmt(p, SQL_INSERT_SEGDIR, &pStmt, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pStmt, 1, iLevel);\n    sqlite3_bind_int(pStmt, 2, iIdx);\n    sqlite3_bind_int64(pStmt, 3, iStartBlock);\n    sqlite3_bind_int64(pStmt, 4, iLeafEndBlock);\n    if( nLeafData==0 ){\n      sqlite3_bind_int64(pStmt, 5, iEndBlock);\n    }else{\n      char *zEnd = sqlite3_mprintf(\"%lld %lld\", iEndBlock, nLeafData);\n      if( !zEnd ) return SQLITE_NOMEM;\n      sqlite3_bind_text(pStmt, 5, zEnd, -1, sqlite3_free);\n    }\n    sqlite3_bind_blob(pStmt, 6, zRoot, nRoot, SQLITE_STATIC);\n    sqlite3_step(pStmt);\n    rc = sqlite3_reset(pStmt);\n    sqlite3_bind_null(pStmt, 6);\n  }\n  return rc;\n}\n\n/*\n** Return the size of the common prefix (if any) shared by zPrev and\n** zNext, in bytes. For example,\n**\n**   fts3PrefixCompress(\"abc\", 3, \"abcdef\", 6)   // returns 3\n**   fts3PrefixCompress(\"abX\", 3, \"abcdef\", 6)   // returns 2\n**   fts3PrefixCompress(\"abX\", 3, \"Xbcdef\", 6)   // returns 0\n*/\nstatic int fts3PrefixCompress(\n  const char *zPrev,              /* Buffer containing previous term */\n  int nPrev,                      /* Size of buffer zPrev in bytes */\n  const char *zNext,              /* Buffer containing next term */\n  int nNext                       /* Size of buffer zNext in bytes */\n){\n  int n;\n  for(n=0; n<nPrev && n<nNext && zPrev[n]==zNext[n]; n++);\n  assert_fts3_nc( n<nNext );\n  return n;\n}\n\n/*\n** Add term zTerm to the SegmentNode. It is guaranteed that zTerm is larger\n** (according to memcmp) than the previous term.\n*/\nstatic int fts3NodeAddTerm(\n  Fts3Table *p,                   /* Virtual table handle */\n  SegmentNode **ppTree,           /* IN/OUT: SegmentNode handle */\n  int isCopyTerm,                 /* True if zTerm/nTerm is transient */\n  const char *zTerm,              /* Pointer to buffer containing term */\n  int nTerm                       /* Size of term in bytes */\n){\n  SegmentNode *pTree = *ppTree;\n  int rc;\n  SegmentNode *pNew;\n\n  /* First try to append the term to the current node. Return early if\n  ** this is possible.\n  */\n  if( pTree ){\n    int nData = pTree->nData;     /* Current size of node in bytes */\n    int nReq = nData;             /* Required space after adding zTerm */\n    int nPrefix;                  /* Number of bytes of prefix compression */\n    int nSuffix;                  /* Suffix length */\n\n    nPrefix = fts3PrefixCompress(pTree->zTerm, pTree->nTerm, zTerm, nTerm);\n    nSuffix = nTerm-nPrefix;\n\n    /* If nSuffix is zero or less, then zTerm/nTerm must be a prefix of\n    ** pWriter->zTerm/pWriter->nTerm. i.e. must be equal to or less than when\n    ** compared with BINARY collation. This indicates corruption.  */\n    if( nSuffix<=0 ) return FTS_CORRUPT_VTAB;\n\n    nReq += sqlite3Fts3VarintLen(nPrefix)+sqlite3Fts3VarintLen(nSuffix)+nSuffix;\n    if( nReq<=p->nNodeSize || !pTree->zTerm ){\n\n      if( nReq>p->nNodeSize ){\n        /* An unusual case: this is the first term to be added to the node\n        ** and the static node buffer (p->nNodeSize bytes) is not large\n        ** enough. Use a separately malloced buffer instead This wastes\n        ** p->nNodeSize bytes, but since this scenario only comes about when\n        ** the database contain two terms that share a prefix of almost 2KB,\n        ** this is not expected to be a serious problem.\n        */\n        assert( pTree->aData==(char *)&pTree[1] );\n        pTree->aData = (char *)sqlite3_malloc64(nReq);\n        if( !pTree->aData ){\n          return SQLITE_NOMEM;\n        }\n      }\n\n      if( pTree->zTerm ){\n        /* There is no prefix-length field for first term in a node */\n        nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nPrefix);\n      }\n\n      nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nSuffix);\n      memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);\n      pTree->nData = nData + nSuffix;\n      pTree->nEntry++;\n\n      if( isCopyTerm ){\n        if( pTree->nMalloc<nTerm ){\n          char *zNew = sqlite3_realloc64(pTree->zMalloc, (i64)nTerm*2);\n          if( !zNew ){\n            return SQLITE_NOMEM;\n          }\n          pTree->nMalloc = nTerm*2;\n          pTree->zMalloc = zNew;\n        }\n        pTree->zTerm = pTree->zMalloc;\n        memcpy(pTree->zTerm, zTerm, nTerm);\n        pTree->nTerm = nTerm;\n      }else{\n        pTree->zTerm = (char *)zTerm;\n        pTree->nTerm = nTerm;\n      }\n      return SQLITE_OK;\n    }\n  }\n\n  /* If control flows to here, it was not possible to append zTerm to the\n  ** current node. Create a new node (a right-sibling of the current node).\n  ** If this is the first node in the tree, the term is added to it.\n  **\n  ** Otherwise, the term is not added to the new node, it is left empty for\n  ** now. Instead, the term is inserted into the parent of pTree. If pTree\n  ** has no parent, one is created here.\n  */\n  pNew = (SegmentNode *)sqlite3_malloc64(sizeof(SegmentNode) + p->nNodeSize);\n  if( !pNew ){\n    return SQLITE_NOMEM;\n  }\n  memset(pNew, 0, sizeof(SegmentNode));\n  pNew->nData = 1 + FTS3_VARINT_MAX;\n  pNew->aData = (char *)&pNew[1];\n\n  if( pTree ){\n    SegmentNode *pParent = pTree->pParent;\n    rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);\n    if( pTree->pParent==0 ){\n      pTree->pParent = pParent;\n    }\n    pTree->pRight = pNew;\n    pNew->pLeftmost = pTree->pLeftmost;\n    pNew->pParent = pParent;\n    pNew->zMalloc = pTree->zMalloc;\n    pNew->nMalloc = pTree->nMalloc;\n    pTree->zMalloc = 0;\n  }else{\n    pNew->pLeftmost = pNew;\n    rc = fts3NodeAddTerm(p, &pNew, isCopyTerm, zTerm, nTerm);\n  }\n\n  *ppTree = pNew;\n  return rc;\n}\n\n/*\n** Helper function for fts3NodeWrite().\n*/\nstatic int fts3TreeFinishNode(\n  SegmentNode *pTree,\n  int iHeight,\n  sqlite3_int64 iLeftChild\n){\n  int nStart;\n  assert( iHeight>=1 && iHeight<128 );\n  nStart = FTS3_VARINT_MAX - sqlite3Fts3VarintLen(iLeftChild);\n  pTree->aData[nStart] = (char)iHeight;\n  sqlite3Fts3PutVarint(&pTree->aData[nStart+1], iLeftChild);\n  return nStart;\n}\n\n/*\n** Write the buffer for the segment node pTree and all of its peers to the\n** database. Then call this function recursively to write the parent of\n** pTree and its peers to the database.\n**\n** Except, if pTree is a root node, do not write it to the database. Instead,\n** set output variables *paRoot and *pnRoot to contain the root node.\n**\n** If successful, SQLITE_OK is returned and output variable *piLast is\n** set to the largest blockid written to the database (or zero if no\n** blocks were written to the db). Otherwise, an SQLite error code is\n** returned.\n*/\nstatic int fts3NodeWrite(\n  Fts3Table *p,                   /* Virtual table handle */\n  SegmentNode *pTree,             /* SegmentNode handle */\n  int iHeight,                    /* Height of this node in tree */\n  sqlite3_int64 iLeaf,            /* Block id of first leaf node */\n  sqlite3_int64 iFree,            /* Block id of next free slot in %_segments */\n  sqlite3_int64 *piLast,          /* OUT: Block id of last entry written */\n  char **paRoot,                  /* OUT: Data for root node */\n  int *pnRoot                     /* OUT: Size of root node in bytes */\n){\n  int rc = SQLITE_OK;\n\n  if( !pTree->pParent ){\n    /* Root node of the tree. */\n    int nStart = fts3TreeFinishNode(pTree, iHeight, iLeaf);\n    *piLast = iFree-1;\n    *pnRoot = pTree->nData - nStart;\n    *paRoot = &pTree->aData[nStart];\n  }else{\n    SegmentNode *pIter;\n    sqlite3_int64 iNextFree = iFree;\n    sqlite3_int64 iNextLeaf = iLeaf;\n    for(pIter=pTree->pLeftmost; pIter && rc==SQLITE_OK; pIter=pIter->pRight){\n      int nStart = fts3TreeFinishNode(pIter, iHeight, iNextLeaf);\n      int nWrite = pIter->nData - nStart;\n\n      rc = fts3WriteSegment(p, iNextFree, &pIter->aData[nStart], nWrite);\n      iNextFree++;\n      iNextLeaf += (pIter->nEntry+1);\n    }\n    if( rc==SQLITE_OK ){\n      assert( iNextLeaf==iFree );\n      rc = fts3NodeWrite(\n          p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot\n      );\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Free all memory allocations associated with the tree pTree.\n*/\nstatic void fts3NodeFree(SegmentNode *pTree){\n  if( pTree ){\n    SegmentNode *p = pTree->pLeftmost;\n    fts3NodeFree(p->pParent);\n    while( p ){\n      SegmentNode *pRight = p->pRight;\n      if( p->aData!=(char *)&p[1] ){\n        sqlite3_free(p->aData);\n      }\n      assert( pRight==0 || p->zMalloc==0 );\n      sqlite3_free(p->zMalloc);\n      sqlite3_free(p);\n      p = pRight;\n    }\n  }\n}\n\n/*\n** Add a term to the segment being constructed by the SegmentWriter object\n** *ppWriter. When adding the first term to a segment, *ppWriter should\n** be passed NULL. This function will allocate a new SegmentWriter object\n** and return it via the input/output variable *ppWriter in this case.\n**\n** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.\n*/\nstatic int fts3SegWriterAdd(\n  Fts3Table *p,                   /* Virtual table handle */\n  SegmentWriter **ppWriter,       /* IN/OUT: SegmentWriter handle */\n  int isCopyTerm,                 /* True if buffer zTerm must be copied */\n  const char *zTerm,              /* Pointer to buffer containing term */\n  int nTerm,                      /* Size of term in bytes */\n  const char *aDoclist,           /* Pointer to buffer containing doclist */\n  int nDoclist                    /* Size of doclist in bytes */\n){\n  int nPrefix;                    /* Size of term prefix in bytes */\n  int nSuffix;                    /* Size of term suffix in bytes */\n  i64 nReq;                       /* Number of bytes required on leaf page */\n  int nData;\n  SegmentWriter *pWriter = *ppWriter;\n\n  if( !pWriter ){\n    int rc;\n    sqlite3_stmt *pStmt;\n\n    /* Allocate the SegmentWriter structure */\n    pWriter = (SegmentWriter *)sqlite3_malloc64(sizeof(SegmentWriter));\n    if( !pWriter ) return SQLITE_NOMEM;\n    memset(pWriter, 0, sizeof(SegmentWriter));\n    *ppWriter = pWriter;\n\n    /* Allocate a buffer in which to accumulate data */\n    pWriter->aData = (char *)sqlite3_malloc64(p->nNodeSize);\n    if( !pWriter->aData ) return SQLITE_NOMEM;\n    pWriter->nSize = p->nNodeSize;\n\n    /* Find the next free blockid in the %_segments table */\n    rc = fts3SqlStmt(p, SQL_NEXT_SEGMENTS_ID, &pStmt, 0);\n    if( rc!=SQLITE_OK ) return rc;\n    if( SQLITE_ROW==sqlite3_step(pStmt) ){\n      pWriter->iFree = sqlite3_column_int64(pStmt, 0);\n      pWriter->iFirst = pWriter->iFree;\n    }\n    rc = sqlite3_reset(pStmt);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  nData = pWriter->nData;\n\n  nPrefix = fts3PrefixCompress(pWriter->zTerm, pWriter->nTerm, zTerm, nTerm);\n  nSuffix = nTerm-nPrefix;\n\n  /* If nSuffix is zero or less, then zTerm/nTerm must be a prefix of\n  ** pWriter->zTerm/pWriter->nTerm. i.e. must be equal to or less than when\n  ** compared with BINARY collation. This indicates corruption.  */\n  if( nSuffix<=0 ) return FTS_CORRUPT_VTAB;\n\n  /* Figure out how many bytes are required by this new entry */\n  nReq = sqlite3Fts3VarintLen(nPrefix) +    /* varint containing prefix size */\n    sqlite3Fts3VarintLen(nSuffix) +         /* varint containing suffix size */\n    nSuffix +                               /* Term suffix */\n    sqlite3Fts3VarintLen(nDoclist) +        /* Size of doclist */\n    nDoclist;                               /* Doclist data */\n\n  if( nData>0 && nData+nReq>p->nNodeSize ){\n    int rc;\n\n    /* The current leaf node is full. Write it out to the database. */\n    if( pWriter->iFree==LARGEST_INT64 ) return FTS_CORRUPT_VTAB;\n    rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);\n    if( rc!=SQLITE_OK ) return rc;\n    p->nLeafAdd++;\n\n    /* Add the current term to the interior node tree. The term added to\n    ** the interior tree must:\n    **\n    **   a) be greater than the largest term on the leaf node just written\n    **      to the database (still available in pWriter->zTerm), and\n    **\n    **   b) be less than or equal to the term about to be added to the new\n    **      leaf node (zTerm/nTerm).\n    **\n    ** In other words, it must be the prefix of zTerm 1 byte longer than\n    ** the common prefix (if any) of zTerm and pWriter->zTerm.\n    */\n    assert( nPrefix<nTerm );\n    rc = fts3NodeAddTerm(p, &pWriter->pTree, isCopyTerm, zTerm, nPrefix+1);\n    if( rc!=SQLITE_OK ) return rc;\n\n    nData = 0;\n    pWriter->nTerm = 0;\n\n    nPrefix = 0;\n    nSuffix = nTerm;\n    nReq = 1 +                              /* varint containing prefix size */\n      sqlite3Fts3VarintLen(nTerm) +         /* varint containing suffix size */\n      nTerm +                               /* Term suffix */\n      sqlite3Fts3VarintLen(nDoclist) +      /* Size of doclist */\n      nDoclist;                             /* Doclist data */\n  }\n\n  /* Increase the total number of bytes written to account for the new entry. */\n  pWriter->nLeafData += nReq;\n\n  /* If the buffer currently allocated is too small for this entry, realloc\n  ** the buffer to make it large enough.\n  */\n  if( nReq>pWriter->nSize ){\n    char *aNew = sqlite3_realloc64(pWriter->aData, nReq);\n    if( !aNew ) return SQLITE_NOMEM;\n    pWriter->aData = aNew;\n    pWriter->nSize = nReq;\n  }\n  assert( nData+nReq<=pWriter->nSize );\n\n  /* Append the prefix-compressed term and doclist to the buffer. */\n  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nPrefix);\n  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nSuffix);\n  assert( nSuffix>0 );\n  memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);\n  nData += nSuffix;\n  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nDoclist);\n  assert( nDoclist>0 );\n  memcpy(&pWriter->aData[nData], aDoclist, nDoclist);\n  pWriter->nData = nData + nDoclist;\n\n  /* Save the current term so that it can be used to prefix-compress the next.\n  ** If the isCopyTerm parameter is true, then the buffer pointed to by\n  ** zTerm is transient, so take a copy of the term data. Otherwise, just\n  ** store a copy of the pointer.\n  */\n  if( isCopyTerm ){\n    if( nTerm>pWriter->nMalloc ){\n      char *zNew = sqlite3_realloc64(pWriter->zMalloc, (i64)nTerm*2);\n      if( !zNew ){\n        return SQLITE_NOMEM;\n      }\n      pWriter->nMalloc = nTerm*2;\n      pWriter->zMalloc = zNew;\n      pWriter->zTerm = zNew;\n    }\n    assert( pWriter->zTerm==pWriter->zMalloc );\n    assert( nTerm>0 );\n    memcpy(pWriter->zTerm, zTerm, nTerm);\n  }else{\n    pWriter->zTerm = (char *)zTerm;\n  }\n  pWriter->nTerm = nTerm;\n\n  return SQLITE_OK;\n}\n\n/*\n** Flush all data associated with the SegmentWriter object pWriter to the\n** database. This function must be called after all terms have been added\n** to the segment using fts3SegWriterAdd(). If successful, SQLITE_OK is\n** returned. Otherwise, an SQLite error code.\n*/\nstatic int fts3SegWriterFlush(\n  Fts3Table *p,                   /* Virtual table handle */\n  SegmentWriter *pWriter,         /* SegmentWriter to flush to the db */\n  sqlite3_int64 iLevel,           /* Value for 'level' column of %_segdir */\n  int iIdx                        /* Value for 'idx' column of %_segdir */\n){\n  int rc;                         /* Return code */\n  if( pWriter->pTree ){\n    sqlite3_int64 iLast = 0;      /* Largest block id written to database */\n    sqlite3_int64 iLastLeaf;      /* Largest leaf block id written to db */\n    char *zRoot = NULL;           /* Pointer to buffer containing root node */\n    int nRoot = 0;                /* Size of buffer zRoot */\n\n    iLastLeaf = pWriter->iFree;\n    rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, pWriter->nData);\n    if( rc==SQLITE_OK ){\n      rc = fts3NodeWrite(p, pWriter->pTree, 1,\n          pWriter->iFirst, pWriter->iFree, &iLast, &zRoot, &nRoot);\n    }\n    if( rc==SQLITE_OK ){\n      rc = fts3WriteSegdir(p, iLevel, iIdx,\n          pWriter->iFirst, iLastLeaf, iLast, pWriter->nLeafData, zRoot, nRoot);\n    }\n  }else{\n    /* The entire tree fits on the root node. Write it to the segdir table. */\n    rc = fts3WriteSegdir(p, iLevel, iIdx,\n        0, 0, 0, pWriter->nLeafData, pWriter->aData, pWriter->nData);\n  }\n  p->nLeafAdd++;\n  return rc;\n}\n\n/*\n** Release all memory held by the SegmentWriter object passed as the\n** first argument.\n*/\nstatic void fts3SegWriterFree(SegmentWriter *pWriter){\n  if( pWriter ){\n    sqlite3_free(pWriter->aData);\n    sqlite3_free(pWriter->zMalloc);\n    fts3NodeFree(pWriter->pTree);\n    sqlite3_free(pWriter);\n  }\n}\n\n/*\n** The first value in the apVal[] array is assumed to contain an integer.\n** This function tests if there exist any documents with docid values that\n** are different from that integer. i.e. if deleting the document with docid\n** pRowid would mean the FTS3 table were empty.\n**\n** If successful, *pisEmpty is set to true if the table is empty except for\n** document pRowid, or false otherwise, and SQLITE_OK is returned. If an\n** error occurs, an SQLite error code is returned.\n*/\nstatic int fts3IsEmpty(Fts3Table *p, sqlite3_value *pRowid, int *pisEmpty){\n  sqlite3_stmt *pStmt;\n  int rc;\n  if( p->zContentTbl ){\n    /* If using the content=xxx option, assume the table is never empty */\n    *pisEmpty = 0;\n    rc = SQLITE_OK;\n  }else{\n    rc = fts3SqlStmt(p, SQL_IS_EMPTY, &pStmt, &pRowid);\n    if( rc==SQLITE_OK ){\n      if( SQLITE_ROW==sqlite3_step(pStmt) ){\n        *pisEmpty = sqlite3_column_int(pStmt, 0);\n      }\n      rc = sqlite3_reset(pStmt);\n    }\n  }\n  return rc;\n}\n\n/*\n** Set *pnMax to the largest segment level in the database for the index\n** iIndex.\n**\n** Segment levels are stored in the 'level' column of the %_segdir table.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if not.\n*/\nstatic int fts3SegmentMaxLevel(\n  Fts3Table *p,\n  int iLangid,\n  int iIndex,\n  sqlite3_int64 *pnMax\n){\n  sqlite3_stmt *pStmt;\n  int rc;\n  assert( iIndex>=0 && iIndex<p->nIndex );\n\n  /* Set pStmt to the compiled version of:\n  **\n  **   SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?\n  **\n  ** (1024 is actually the value of macro FTS3_SEGDIR_PREFIXLEVEL_STR).\n  */\n  rc = fts3SqlStmt(p, SQL_SELECT_SEGDIR_MAX_LEVEL, &pStmt, 0);\n  if( rc!=SQLITE_OK ) return rc;\n  sqlite3_bind_int64(pStmt, 1, getAbsoluteLevel(p, iLangid, iIndex, 0));\n  sqlite3_bind_int64(pStmt, 2,\n      getAbsoluteLevel(p, iLangid, iIndex, FTS3_SEGDIR_MAXLEVEL-1)\n  );\n  if( SQLITE_ROW==sqlite3_step(pStmt) ){\n    *pnMax = sqlite3_column_int64(pStmt, 0);\n  }\n  return sqlite3_reset(pStmt);\n}\n\n/*\n** iAbsLevel is an absolute level that may be assumed to exist within\n** the database. This function checks if it is the largest level number\n** within its index. Assuming no error occurs, *pbMax is set to 1 if\n** iAbsLevel is indeed the largest level, or 0 otherwise, and SQLITE_OK\n** is returned. If an error occurs, an error code is returned and the\n** final value of *pbMax is undefined.\n*/\nstatic int fts3SegmentIsMaxLevel(Fts3Table *p, i64 iAbsLevel, int *pbMax){\n\n  /* Set pStmt to the compiled version of:\n  **\n  **   SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?\n  **\n  ** (1024 is actually the value of macro FTS3_SEGDIR_PREFIXLEVEL_STR).\n  */\n  sqlite3_stmt *pStmt;\n  int rc = fts3SqlStmt(p, SQL_SELECT_SEGDIR_MAX_LEVEL, &pStmt, 0);\n  if( rc!=SQLITE_OK ) return rc;\n  sqlite3_bind_int64(pStmt, 1, iAbsLevel+1);\n  sqlite3_bind_int64(pStmt, 2,\n      (((u64)iAbsLevel/FTS3_SEGDIR_MAXLEVEL)+1) * FTS3_SEGDIR_MAXLEVEL\n  );\n\n  *pbMax = 0;\n  if( SQLITE_ROW==sqlite3_step(pStmt) ){\n    *pbMax = sqlite3_column_type(pStmt, 0)==SQLITE_NULL;\n  }\n  return sqlite3_reset(pStmt);\n}\n\n/*\n** Delete all entries in the %_segments table associated with the segment\n** opened with seg-reader pSeg. This function does not affect the contents\n** of the %_segdir table.\n*/\nstatic int fts3DeleteSegment(\n  Fts3Table *p,                   /* FTS table handle */\n  Fts3SegReader *pSeg             /* Segment to delete */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  if( pSeg->iStartBlock ){\n    sqlite3_stmt *pDelete;        /* SQL statement to delete rows */\n    rc = fts3SqlStmt(p, SQL_DELETE_SEGMENTS_RANGE, &pDelete, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pDelete, 1, pSeg->iStartBlock);\n      sqlite3_bind_int64(pDelete, 2, pSeg->iEndBlock);\n      sqlite3_step(pDelete);\n      rc = sqlite3_reset(pDelete);\n    }\n  }\n  return rc;\n}\n\n/*\n** This function is used after merging multiple segments into a single large\n** segment to delete the old, now redundant, segment b-trees. Specifically,\n** it:\n**\n**   1) Deletes all %_segments entries for the segments associated with\n**      each of the SegReader objects in the array passed as the third\n**      argument, and\n**\n**   2) deletes all %_segdir entries with level iLevel, or all %_segdir\n**      entries regardless of level if (iLevel<0).\n**\n** SQLITE_OK is returned if successful, otherwise an SQLite error code.\n*/\nstatic int fts3DeleteSegdir(\n  Fts3Table *p,                   /* Virtual table handle */\n  int iLangid,                    /* Language id */\n  int iIndex,                     /* Index for p->aIndex */\n  int iLevel,                     /* Level of %_segdir entries to delete */\n  Fts3SegReader **apSegment,      /* Array of SegReader objects */\n  int nReader                     /* Size of array apSegment */\n){\n  int rc = SQLITE_OK;             /* Return Code */\n  int i;                          /* Iterator variable */\n  sqlite3_stmt *pDelete = 0;      /* SQL statement to delete rows */\n\n  for(i=0; rc==SQLITE_OK && i<nReader; i++){\n    rc = fts3DeleteSegment(p, apSegment[i]);\n  }\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  assert( iLevel>=0 || iLevel==FTS3_SEGCURSOR_ALL );\n  if( iLevel==FTS3_SEGCURSOR_ALL ){\n    rc = fts3SqlStmt(p, SQL_DELETE_SEGDIR_RANGE, &pDelete, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pDelete, 1, getAbsoluteLevel(p, iLangid, iIndex, 0));\n      sqlite3_bind_int64(pDelete, 2,\n          getAbsoluteLevel(p, iLangid, iIndex, FTS3_SEGDIR_MAXLEVEL-1)\n      );\n    }\n  }else{\n    rc = fts3SqlStmt(p, SQL_DELETE_SEGDIR_LEVEL, &pDelete, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(\n          pDelete, 1, getAbsoluteLevel(p, iLangid, iIndex, iLevel)\n      );\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    sqlite3_step(pDelete);\n    rc = sqlite3_reset(pDelete);\n  }\n\n  return rc;\n}\n\n/*\n** When this function is called, buffer *ppList (size *pnList bytes) contains\n** a position list that may (or may not) feature multiple columns. This\n** function adjusts the pointer *ppList and the length *pnList so that they\n** identify the subset of the position list that corresponds to column iCol.\n**\n** If there are no entries in the input position list for column iCol, then\n** *pnList is set to zero before returning.\n**\n** If parameter bZero is non-zero, then any part of the input list following\n** the end of the output list is zeroed before returning.\n*/\nstatic void fts3ColumnFilter(\n  int iCol,                       /* Column to filter on */\n  int bZero,                      /* Zero out anything following *ppList */\n  char **ppList,                  /* IN/OUT: Pointer to position list */\n  int *pnList                     /* IN/OUT: Size of buffer *ppList in bytes */\n){\n  char *pList = *ppList;\n  int nList = *pnList;\n  char *pEnd = &pList[nList];\n  int iCurrent = 0;\n  char *p = pList;\n\n  assert( iCol>=0 );\n  while( 1 ){\n    char c = 0;\n    while( p<pEnd && (c | *p)&0xFE ) c = *p++ & 0x80;\n\n    if( iCol==iCurrent ){\n      nList = (int)(p - pList);\n      break;\n    }\n\n    nList -= (int)(p - pList);\n    pList = p;\n    if( nList<=0 ){\n      break;\n    }\n    p = &pList[1];\n    p += fts3GetVarint32(p, &iCurrent);\n  }\n\n  if( bZero && (pEnd - &pList[nList])>0){\n    memset(&pList[nList], 0, pEnd - &pList[nList]);\n  }\n  *ppList = pList;\n  *pnList = nList;\n}\n\n/*\n** Cache data in the Fts3MultiSegReader.aBuffer[] buffer (overwriting any\n** existing data). Grow the buffer if required.\n**\n** If successful, return SQLITE_OK. Otherwise, if an OOM error is encountered\n** trying to resize the buffer, return SQLITE_NOMEM.\n*/\nstatic int fts3MsrBufferData(\n  Fts3MultiSegReader *pMsr,       /* Multi-segment-reader handle */\n  char *pList,\n  i64 nList\n){\n  if( (nList+FTS3_NODE_PADDING)>pMsr->nBuffer ){\n    char *pNew;\n    int nNew = nList*2 + FTS3_NODE_PADDING;\n    pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, nNew);\n    if( !pNew ) return SQLITE_NOMEM;\n    pMsr->aBuffer = pNew;\n    pMsr->nBuffer = nNew;\n  }\n\n  assert( nList>0 );\n  memcpy(pMsr->aBuffer, pList, nList);\n  memset(&pMsr->aBuffer[nList], 0, FTS3_NODE_PADDING);\n  return SQLITE_OK;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrNext(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3MultiSegReader *pMsr,       /* Multi-segment-reader handle */\n  sqlite3_int64 *piDocid,         /* OUT: Docid value */\n  char **paPoslist,               /* OUT: Pointer to position list */\n  int *pnPoslist                  /* OUT: Size of position list in bytes */\n){\n  int nMerge = pMsr->nAdvance;\n  Fts3SegReader **apSegment = pMsr->apSegment;\n  int (*xCmp)(Fts3SegReader *, Fts3SegReader *) = (\n    p->bDescIdx ? fts3SegReaderDoclistCmpRev : fts3SegReaderDoclistCmp\n  );\n\n  if( nMerge==0 ){\n    *paPoslist = 0;\n    return SQLITE_OK;\n  }\n\n  while( 1 ){\n    Fts3SegReader *pSeg;\n    pSeg = pMsr->apSegment[0];\n\n    if( pSeg->pOffsetList==0 ){\n      *paPoslist = 0;\n      break;\n    }else{\n      int rc;\n      char *pList;\n      int nList;\n      int j;\n      sqlite3_int64 iDocid = apSegment[0]->iDocid;\n\n      rc = fts3SegReaderNextDocid(p, apSegment[0], &pList, &nList);\n      j = 1;\n      while( rc==SQLITE_OK\n        && j<nMerge\n        && apSegment[j]->pOffsetList\n        && apSegment[j]->iDocid==iDocid\n      ){\n        rc = fts3SegReaderNextDocid(p, apSegment[j], 0, 0);\n        j++;\n      }\n      if( rc!=SQLITE_OK ) return rc;\n      fts3SegReaderSort(pMsr->apSegment, nMerge, j, xCmp);\n\n      if( nList>0 && fts3SegReaderIsPending(apSegment[0]) ){\n        rc = fts3MsrBufferData(pMsr, pList, (i64)nList+1);\n        if( rc!=SQLITE_OK ) return rc;\n        assert( (pMsr->aBuffer[nList] & 0xFE)==0x00 );\n        pList = pMsr->aBuffer;\n      }\n\n      if( pMsr->iColFilter>=0 ){\n        fts3ColumnFilter(pMsr->iColFilter, 1, &pList, &nList);\n      }\n\n      if( nList>0 ){\n        *paPoslist = pList;\n        *piDocid = iDocid;\n        *pnPoslist = nList;\n        break;\n      }\n    }\n  }\n\n  return SQLITE_OK;\n}\n\nstatic int fts3SegReaderStart(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3MultiSegReader *pCsr,       /* Cursor object */\n  const char *zTerm,              /* Term searched for (or NULL) */\n  int nTerm                       /* Length of zTerm in bytes */\n){\n  int i;\n  int nSeg = pCsr->nSegment;\n\n  /* If the Fts3SegFilter defines a specific term (or term prefix) to search\n  ** for, then advance each segment iterator until it points to a term of\n  ** equal or greater value than the specified term. This prevents many\n  ** unnecessary merge/sort operations for the case where single segment\n  ** b-tree leaf nodes contain more than one term.\n  */\n  for(i=0; pCsr->bRestart==0 && i<pCsr->nSegment; i++){\n    int res = 0;\n    Fts3SegReader *pSeg = pCsr->apSegment[i];\n    do {\n      int rc = fts3SegReaderNext(p, pSeg, 0);\n      if( rc!=SQLITE_OK ) return rc;\n    }while( zTerm && (res = fts3SegReaderTermCmp(pSeg, zTerm, nTerm))<0 );\n\n    if( pSeg->bLookup && res!=0 ){\n      fts3SegReaderSetEof(pSeg);\n    }\n  }\n  fts3SegReaderSort(pCsr->apSegment, nSeg, nSeg, fts3SegReaderCmp);\n\n  return SQLITE_OK;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3SegReaderStart(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3MultiSegReader *pCsr,       /* Cursor object */\n  Fts3SegFilter *pFilter          /* Restrictions on range of iteration */\n){\n  pCsr->pFilter = pFilter;\n  return fts3SegReaderStart(p, pCsr, pFilter->zTerm, pFilter->nTerm);\n}\n\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrStart(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3MultiSegReader *pCsr,       /* Cursor object */\n  int iCol,                       /* Column to match on. */\n  const char *zTerm,              /* Term to iterate through a doclist for */\n  int nTerm                       /* Number of bytes in zTerm */\n){\n  int i;\n  int rc;\n  int nSegment = pCsr->nSegment;\n  int (*xCmp)(Fts3SegReader *, Fts3SegReader *) = (\n    p->bDescIdx ? fts3SegReaderDoclistCmpRev : fts3SegReaderDoclistCmp\n  );\n\n  assert( pCsr->pFilter==0 );\n  assert( zTerm && nTerm>0 );\n\n  /* Advance each segment iterator until it points to the term zTerm/nTerm. */\n  rc = fts3SegReaderStart(p, pCsr, zTerm, nTerm);\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* Determine how many of the segments actually point to zTerm/nTerm. */\n  for(i=0; i<nSegment; i++){\n    Fts3SegReader *pSeg = pCsr->apSegment[i];\n    if( !pSeg->aNode || fts3SegReaderTermCmp(pSeg, zTerm, nTerm) ){\n      break;\n    }\n  }\n  pCsr->nAdvance = i;\n\n  /* Advance each of the segments to point to the first docid. */\n  for(i=0; i<pCsr->nAdvance; i++){\n    rc = fts3SegReaderFirstDocid(p, pCsr->apSegment[i]);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  fts3SegReaderSort(pCsr->apSegment, i, i, xCmp);\n\n  assert( iCol<0 || iCol<p->nColumn );\n  pCsr->iColFilter = iCol;\n\n  return SQLITE_OK;\n}\n\n/*\n** This function is called on a MultiSegReader that has been started using\n** sqlite3Fts3MsrIncrStart(). One or more calls to MsrIncrNext() may also\n** have been made. Calling this function puts the MultiSegReader in such\n** a state that if the next two calls are:\n**\n**   sqlite3Fts3SegReaderStart()\n**   sqlite3Fts3SegReaderStep()\n**\n** then the entire doclist for the term is available in\n** MultiSegReader.aDoclist/nDoclist.\n*/\nSQLITE_PRIVATE int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr){\n  int i;                          /* Used to iterate through segment-readers */\n\n  assert( pCsr->zTerm==0 );\n  assert( pCsr->nTerm==0 );\n  assert( pCsr->aDoclist==0 );\n  assert( pCsr->nDoclist==0 );\n\n  pCsr->nAdvance = 0;\n  pCsr->bRestart = 1;\n  for(i=0; i<pCsr->nSegment; i++){\n    pCsr->apSegment[i]->pOffsetList = 0;\n    pCsr->apSegment[i]->nOffsetList = 0;\n    pCsr->apSegment[i]->iDocid = 0;\n  }\n\n  return SQLITE_OK;\n}\n\nstatic int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, i64 nReq){\n  if( nReq>pCsr->nBuffer ){\n    char *aNew;\n    pCsr->nBuffer = nReq*2;\n    aNew = sqlite3_realloc64(pCsr->aBuffer, pCsr->nBuffer);\n    if( !aNew ){\n      return SQLITE_NOMEM;\n    }\n    pCsr->aBuffer = aNew;\n  }\n  return SQLITE_OK;\n}\n\n\nSQLITE_PRIVATE int sqlite3Fts3SegReaderStep(\n  Fts3Table *p,                   /* Virtual table handle */\n  Fts3MultiSegReader *pCsr        /* Cursor object */\n){\n  int rc = SQLITE_OK;\n\n  int isIgnoreEmpty =  (pCsr->pFilter->flags & FTS3_SEGMENT_IGNORE_EMPTY);\n  int isRequirePos =   (pCsr->pFilter->flags & FTS3_SEGMENT_REQUIRE_POS);\n  int isColFilter =    (pCsr->pFilter->flags & FTS3_SEGMENT_COLUMN_FILTER);\n  int isPrefix =       (pCsr->pFilter->flags & FTS3_SEGMENT_PREFIX);\n  int isScan =         (pCsr->pFilter->flags & FTS3_SEGMENT_SCAN);\n  int isFirst =        (pCsr->pFilter->flags & FTS3_SEGMENT_FIRST);\n\n  Fts3SegReader **apSegment = pCsr->apSegment;\n  int nSegment = pCsr->nSegment;\n  Fts3SegFilter *pFilter = pCsr->pFilter;\n  int (*xCmp)(Fts3SegReader *, Fts3SegReader *) = (\n    p->bDescIdx ? fts3SegReaderDoclistCmpRev : fts3SegReaderDoclistCmp\n  );\n\n  if( pCsr->nSegment==0 ) return SQLITE_OK;\n\n  do {\n    int nMerge;\n    int i;\n\n    /* Advance the first pCsr->nAdvance entries in the apSegment[] array\n    ** forward. Then sort the list in order of current term again.\n    */\n    for(i=0; i<pCsr->nAdvance; i++){\n      Fts3SegReader *pSeg = apSegment[i];\n      if( pSeg->bLookup ){\n        fts3SegReaderSetEof(pSeg);\n      }else{\n        rc = fts3SegReaderNext(p, pSeg, 0);\n      }\n      if( rc!=SQLITE_OK ) return rc;\n    }\n    fts3SegReaderSort(apSegment, nSegment, pCsr->nAdvance, fts3SegReaderCmp);\n    pCsr->nAdvance = 0;\n\n    /* If all the seg-readers are at EOF, we're finished. return SQLITE_OK. */\n    assert( rc==SQLITE_OK );\n    if( apSegment[0]->aNode==0 ) break;\n\n    pCsr->nTerm = apSegment[0]->nTerm;\n    pCsr->zTerm = apSegment[0]->zTerm;\n\n    /* If this is a prefix-search, and if the term that apSegment[0] points\n    ** to does not share a suffix with pFilter->zTerm/nTerm, then all\n    ** required callbacks have been made. In this case exit early.\n    **\n    ** Similarly, if this is a search for an exact match, and the first term\n    ** of segment apSegment[0] is not a match, exit early.\n    */\n    if( pFilter->zTerm && !isScan ){\n      if( pCsr->nTerm<pFilter->nTerm\n       || (!isPrefix && pCsr->nTerm>pFilter->nTerm)\n       || memcmp(pCsr->zTerm, pFilter->zTerm, pFilter->nTerm)\n      ){\n        break;\n      }\n    }\n\n    nMerge = 1;\n    while( nMerge<nSegment\n        && apSegment[nMerge]->aNode\n        && apSegment[nMerge]->nTerm==pCsr->nTerm\n        && 0==memcmp(pCsr->zTerm, apSegment[nMerge]->zTerm, pCsr->nTerm)\n    ){\n      nMerge++;\n    }\n\n    assert( isIgnoreEmpty || (isRequirePos && !isColFilter) );\n    if( nMerge==1\n     && !isIgnoreEmpty\n     && !isFirst\n     && (p->bDescIdx==0 || fts3SegReaderIsPending(apSegment[0])==0)\n    ){\n      pCsr->nDoclist = apSegment[0]->nDoclist;\n      if( fts3SegReaderIsPending(apSegment[0]) ){\n        rc = fts3MsrBufferData(pCsr, apSegment[0]->aDoclist,\n                               (i64)pCsr->nDoclist);\n        pCsr->aDoclist = pCsr->aBuffer;\n      }else{\n        pCsr->aDoclist = apSegment[0]->aDoclist;\n      }\n      if( rc==SQLITE_OK ) rc = SQLITE_ROW;\n    }else{\n      int nDoclist = 0;           /* Size of doclist */\n      sqlite3_int64 iPrev = 0;    /* Previous docid stored in doclist */\n\n      /* The current term of the first nMerge entries in the array\n      ** of Fts3SegReader objects is the same. The doclists must be merged\n      ** and a single term returned with the merged doclist.\n      */\n      for(i=0; i<nMerge; i++){\n        fts3SegReaderFirstDocid(p, apSegment[i]);\n      }\n      fts3SegReaderSort(apSegment, nMerge, nMerge, xCmp);\n      while( apSegment[0]->pOffsetList ){\n        int j;                    /* Number of segments that share a docid */\n        char *pList = 0;\n        int nList = 0;\n        int nByte;\n        sqlite3_int64 iDocid = apSegment[0]->iDocid;\n        fts3SegReaderNextDocid(p, apSegment[0], &pList, &nList);\n        j = 1;\n        while( j<nMerge\n            && apSegment[j]->pOffsetList\n            && apSegment[j]->iDocid==iDocid\n        ){\n          fts3SegReaderNextDocid(p, apSegment[j], 0, 0);\n          j++;\n        }\n\n        if( isColFilter ){\n          fts3ColumnFilter(pFilter->iCol, 0, &pList, &nList);\n        }\n\n        if( !isIgnoreEmpty || nList>0 ){\n\n          /* Calculate the 'docid' delta value to write into the merged\n          ** doclist. */\n          sqlite3_int64 iDelta;\n          if( p->bDescIdx && nDoclist>0 ){\n            if( iPrev<=iDocid ) return FTS_CORRUPT_VTAB;\n            iDelta = (i64)((u64)iPrev - (u64)iDocid);\n          }else{\n            if( nDoclist>0 && iPrev>=iDocid ) return FTS_CORRUPT_VTAB;\n            iDelta = (i64)((u64)iDocid - (u64)iPrev);\n          }\n\n          nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);\n\n          rc = fts3GrowSegReaderBuffer(pCsr,\n                                   (i64)nByte+nDoclist+FTS3_NODE_PADDING);\n          if( rc ) return rc;\n\n          if( isFirst ){\n            char *a = &pCsr->aBuffer[nDoclist];\n            int nWrite;\n\n            nWrite = sqlite3Fts3FirstFilter(iDelta, pList, nList, a);\n            if( nWrite ){\n              iPrev = iDocid;\n              nDoclist += nWrite;\n            }\n          }else{\n            nDoclist += sqlite3Fts3PutVarint(&pCsr->aBuffer[nDoclist], iDelta);\n            iPrev = iDocid;\n            if( isRequirePos ){\n              memcpy(&pCsr->aBuffer[nDoclist], pList, nList);\n              nDoclist += nList;\n              pCsr->aBuffer[nDoclist++] = '\\0';\n            }\n          }\n        }\n\n        fts3SegReaderSort(apSegment, nMerge, j, xCmp);\n      }\n      if( nDoclist>0 ){\n        rc = fts3GrowSegReaderBuffer(pCsr, (i64)nDoclist+FTS3_NODE_PADDING);\n        if( rc ) return rc;\n        memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);\n        pCsr->aDoclist = pCsr->aBuffer;\n        pCsr->nDoclist = nDoclist;\n        rc = SQLITE_ROW;\n      }\n    }\n    pCsr->nAdvance = nMerge;\n  }while( rc==SQLITE_OK );\n\n  return rc;\n}\n\n\nSQLITE_PRIVATE void sqlite3Fts3SegReaderFinish(\n  Fts3MultiSegReader *pCsr       /* Cursor object */\n){\n  if( pCsr ){\n    int i;\n    for(i=0; i<pCsr->nSegment; i++){\n      sqlite3Fts3SegReaderFree(pCsr->apSegment[i]);\n    }\n    sqlite3_free(pCsr->apSegment);\n    sqlite3_free(pCsr->aBuffer);\n\n    pCsr->nSegment = 0;\n    pCsr->apSegment = 0;\n    pCsr->aBuffer = 0;\n  }\n}\n\n/*\n** Decode the \"end_block\" field, selected by column iCol of the SELECT\n** statement passed as the first argument.\n**\n** The \"end_block\" field may contain either an integer, or a text field\n** containing the text representation of two non-negative integers separated\n** by one or more space (0x20) characters. In the first case, set *piEndBlock\n** to the integer value and *pnByte to zero before returning. In the second,\n** set *piEndBlock to the first value and *pnByte to the second.\n*/\nstatic void fts3ReadEndBlockField(\n  sqlite3_stmt *pStmt,\n  int iCol,\n  i64 *piEndBlock,\n  i64 *pnByte\n){\n  const unsigned char *zText = sqlite3_column_text(pStmt, iCol);\n  if( zText ){\n    int i;\n    int iMul = 1;\n    u64 iVal = 0;\n    for(i=0; zText[i]>='0' && zText[i]<='9'; i++){\n      iVal = iVal*10 + (zText[i] - '0');\n    }\n    *piEndBlock = (i64)iVal;\n    while( zText[i]==' ' ) i++;\n    iVal = 0;\n    if( zText[i]=='-' ){\n      i++;\n      iMul = -1;\n    }\n    for(/* no-op */; zText[i]>='0' && zText[i]<='9'; i++){\n      iVal = iVal*10 + (zText[i] - '0');\n    }\n    *pnByte = ((i64)iVal * (i64)iMul);\n  }\n}\n\n\n/*\n** A segment of size nByte bytes has just been written to absolute level\n** iAbsLevel. Promote any segments that should be promoted as a result.\n*/\nstatic int fts3PromoteSegments(\n  Fts3Table *p,                   /* FTS table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level just updated */\n  sqlite3_int64 nByte             /* Size of new segment at iAbsLevel */\n){\n  int rc = SQLITE_OK;\n  sqlite3_stmt *pRange;\n\n  rc = fts3SqlStmt(p, SQL_SELECT_LEVEL_RANGE2, &pRange, 0);\n\n  if( rc==SQLITE_OK ){\n    int bOk = 0;\n    i64 iLast = (iAbsLevel/FTS3_SEGDIR_MAXLEVEL + 1) * FTS3_SEGDIR_MAXLEVEL - 1;\n    i64 nLimit = (nByte*3)/2;\n\n    /* Loop through all entries in the %_segdir table corresponding to\n    ** segments in this index on levels greater than iAbsLevel. If there is\n    ** at least one such segment, and it is possible to determine that all\n    ** such segments are smaller than nLimit bytes in size, they will be\n    ** promoted to level iAbsLevel.  */\n    sqlite3_bind_int64(pRange, 1, iAbsLevel+1);\n    sqlite3_bind_int64(pRange, 2, iLast);\n    while( SQLITE_ROW==sqlite3_step(pRange) ){\n      i64 nSize = 0, dummy;\n      fts3ReadEndBlockField(pRange, 2, &dummy, &nSize);\n      if( nSize<=0 || nSize>nLimit ){\n        /* If nSize==0, then the %_segdir.end_block field does not not\n        ** contain a size value. This happens if it was written by an\n        ** old version of FTS. In this case it is not possible to determine\n        ** the size of the segment, and so segment promotion does not\n        ** take place.  */\n        bOk = 0;\n        break;\n      }\n      bOk = 1;\n    }\n    rc = sqlite3_reset(pRange);\n\n    if( bOk ){\n      int iIdx = 0;\n      sqlite3_stmt *pUpdate1 = 0;\n      sqlite3_stmt *pUpdate2 = 0;\n\n      if( rc==SQLITE_OK ){\n        rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL_IDX, &pUpdate1, 0);\n      }\n      if( rc==SQLITE_OK ){\n        rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL, &pUpdate2, 0);\n      }\n\n      if( rc==SQLITE_OK ){\n\n        /* Loop through all %_segdir entries for segments in this index with\n        ** levels equal to or greater than iAbsLevel. As each entry is visited,\n        ** updated it to set (level = -1) and (idx = N), where N is 0 for the\n        ** oldest segment in the range, 1 for the next oldest, and so on.\n        **\n        ** In other words, move all segments being promoted to level -1,\n        ** setting the \"idx\" fields as appropriate to keep them in the same\n        ** order. The contents of level -1 (which is never used, except\n        ** transiently here), will be moved back to level iAbsLevel below.  */\n        sqlite3_bind_int64(pRange, 1, iAbsLevel);\n        while( SQLITE_ROW==sqlite3_step(pRange) ){\n          sqlite3_bind_int(pUpdate1, 1, iIdx++);\n          sqlite3_bind_int(pUpdate1, 2, sqlite3_column_int(pRange, 0));\n          sqlite3_bind_int(pUpdate1, 3, sqlite3_column_int(pRange, 1));\n          sqlite3_step(pUpdate1);\n          rc = sqlite3_reset(pUpdate1);\n          if( rc!=SQLITE_OK ){\n            sqlite3_reset(pRange);\n            break;\n          }\n        }\n      }\n      if( rc==SQLITE_OK ){\n        rc = sqlite3_reset(pRange);\n      }\n\n      /* Move level -1 to level iAbsLevel */\n      if( rc==SQLITE_OK ){\n        sqlite3_bind_int64(pUpdate2, 1, iAbsLevel);\n        sqlite3_step(pUpdate2);\n        rc = sqlite3_reset(pUpdate2);\n      }\n    }\n  }\n\n\n  return rc;\n}\n\n/*\n** Merge all level iLevel segments in the database into a single\n** iLevel+1 segment. Or, if iLevel<0, merge all segments into a\n** single segment with a level equal to the numerically largest level\n** currently present in the database.\n**\n** If this function is called with iLevel<0, but there is only one\n** segment in the database, SQLITE_DONE is returned immediately.\n** Otherwise, if successful, SQLITE_OK is returned. If an error occurs,\n** an SQLite error code is returned.\n*/\nstatic int fts3SegmentMerge(\n  Fts3Table *p,\n  int iLangid,                    /* Language id to merge */\n  int iIndex,                     /* Index in p->aIndex[] to merge */\n  int iLevel                      /* Level to merge */\n){\n  int rc;                         /* Return code */\n  int iIdx = 0;                   /* Index of new segment */\n  sqlite3_int64 iNewLevel = 0;    /* Level/index to create new segment at */\n  SegmentWriter *pWriter = 0;     /* Used to write the new, merged, segment */\n  Fts3SegFilter filter;           /* Segment term filter condition */\n  Fts3MultiSegReader csr;         /* Cursor to iterate through level(s) */\n  int bIgnoreEmpty = 0;           /* True to ignore empty segments */\n  i64 iMaxLevel = 0;              /* Max level number for this index/langid */\n\n  assert( iLevel==FTS3_SEGCURSOR_ALL\n       || iLevel==FTS3_SEGCURSOR_PENDING\n       || iLevel>=0\n  );\n  assert( iLevel<FTS3_SEGDIR_MAXLEVEL );\n  assert( iIndex>=0 && iIndex<p->nIndex );\n\n  rc = sqlite3Fts3SegReaderCursor(p, iLangid, iIndex, iLevel, 0, 0, 1, 0, &csr);\n  if( rc!=SQLITE_OK || csr.nSegment==0 ) goto finished;\n\n  if( iLevel!=FTS3_SEGCURSOR_PENDING ){\n    rc = fts3SegmentMaxLevel(p, iLangid, iIndex, &iMaxLevel);\n    if( rc!=SQLITE_OK ) goto finished;\n  }\n\n  if( iLevel==FTS3_SEGCURSOR_ALL ){\n    /* This call is to merge all segments in the database to a single\n    ** segment. The level of the new segment is equal to the numerically\n    ** greatest segment level currently present in the database for this\n    ** index. The idx of the new segment is always 0.  */\n    if( csr.nSegment==1 && 0==fts3SegReaderIsPending(csr.apSegment[0]) ){\n      rc = SQLITE_DONE;\n      goto finished;\n    }\n    iNewLevel = iMaxLevel;\n    bIgnoreEmpty = 1;\n\n  }else{\n    /* This call is to merge all segments at level iLevel. find the next\n    ** available segment index at level iLevel+1. The call to\n    ** fts3AllocateSegdirIdx() will merge the segments at level iLevel+1 to\n    ** a single iLevel+2 segment if necessary.  */\n    assert( FTS3_SEGCURSOR_PENDING==-1 );\n    iNewLevel = getAbsoluteLevel(p, iLangid, iIndex, iLevel+1);\n    rc = fts3AllocateSegdirIdx(p, iLangid, iIndex, iLevel+1, &iIdx);\n    bIgnoreEmpty = (iLevel!=FTS3_SEGCURSOR_PENDING) && (iNewLevel>iMaxLevel);\n  }\n  if( rc!=SQLITE_OK ) goto finished;\n\n  assert( csr.nSegment>0 );\n  assert_fts3_nc( iNewLevel>=getAbsoluteLevel(p, iLangid, iIndex, 0) );\n  assert_fts3_nc(\n    iNewLevel<getAbsoluteLevel(p, iLangid, iIndex,FTS3_SEGDIR_MAXLEVEL)\n  );\n\n  memset(&filter, 0, sizeof(Fts3SegFilter));\n  filter.flags = FTS3_SEGMENT_REQUIRE_POS;\n  filter.flags |= (bIgnoreEmpty ? FTS3_SEGMENT_IGNORE_EMPTY : 0);\n\n  rc = sqlite3Fts3SegReaderStart(p, &csr, &filter);\n  while( SQLITE_OK==rc ){\n    rc = sqlite3Fts3SegReaderStep(p, &csr);\n    if( rc!=SQLITE_ROW ) break;\n    rc = fts3SegWriterAdd(p, &pWriter, 1,\n        csr.zTerm, csr.nTerm, csr.aDoclist, csr.nDoclist);\n  }\n  if( rc!=SQLITE_OK ) goto finished;\n  assert_fts3_nc( pWriter || bIgnoreEmpty );\n\n  if( iLevel!=FTS3_SEGCURSOR_PENDING ){\n    rc = fts3DeleteSegdir(\n        p, iLangid, iIndex, iLevel, csr.apSegment, csr.nSegment\n    );\n    if( rc!=SQLITE_OK ) goto finished;\n  }\n  if( pWriter ){\n    rc = fts3SegWriterFlush(p, pWriter, iNewLevel, iIdx);\n    if( rc==SQLITE_OK ){\n      if( iLevel==FTS3_SEGCURSOR_PENDING || iNewLevel<iMaxLevel ){\n        rc = fts3PromoteSegments(p, iNewLevel, pWriter->nLeafData);\n      }\n    }\n  }\n\n finished:\n  fts3SegWriterFree(pWriter);\n  sqlite3Fts3SegReaderFinish(&csr);\n  return rc;\n}\n\n\n/*\n** Flush the contents of pendingTerms to level 0 segments.\n*/\nSQLITE_PRIVATE int sqlite3Fts3PendingTermsFlush(Fts3Table *p){\n  int rc = SQLITE_OK;\n  int i;\n\n  for(i=0; rc==SQLITE_OK && i<p->nIndex; i++){\n    rc = fts3SegmentMerge(p, p->iPrevLangid, i, FTS3_SEGCURSOR_PENDING);\n    if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n  }\n\n  /* Determine the auto-incr-merge setting if unknown.  If enabled,\n  ** estimate the number of leaf blocks of content to be written\n  */\n  if( rc==SQLITE_OK && p->bHasStat\n   && p->nAutoincrmerge==0xff && p->nLeafAdd>0\n  ){\n    sqlite3_stmt *pStmt = 0;\n    rc = fts3SqlStmt(p, SQL_SELECT_STAT, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int(pStmt, 1, FTS_STAT_AUTOINCRMERGE);\n      rc = sqlite3_step(pStmt);\n      if( rc==SQLITE_ROW ){\n        p->nAutoincrmerge = sqlite3_column_int(pStmt, 0);\n        if( p->nAutoincrmerge==1 ) p->nAutoincrmerge = 8;\n      }else if( rc==SQLITE_DONE ){\n        p->nAutoincrmerge = 0;\n      }\n      rc = sqlite3_reset(pStmt);\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    sqlite3Fts3PendingTermsClear(p);\n  }\n  return rc;\n}\n\n/*\n** Encode N integers as varints into a blob.\n*/\nstatic void fts3EncodeIntArray(\n  int N,             /* The number of integers to encode */\n  u32 *a,            /* The integer values */\n  char *zBuf,        /* Write the BLOB here */\n  int *pNBuf         /* Write number of bytes if zBuf[] used here */\n){\n  int i, j;\n  for(i=j=0; i<N; i++){\n    j += sqlite3Fts3PutVarint(&zBuf[j], (sqlite3_int64)a[i]);\n  }\n  *pNBuf = j;\n}\n\n/*\n** Decode a blob of varints into N integers\n*/\nstatic void fts3DecodeIntArray(\n  int N,             /* The number of integers to decode */\n  u32 *a,            /* Write the integer values */\n  const char *zBuf,  /* The BLOB containing the varints */\n  int nBuf           /* size of the BLOB */\n){\n  int i = 0;\n  if( nBuf && (zBuf[nBuf-1]&0x80)==0 ){\n    int j;\n    for(i=j=0; i<N && j<nBuf; i++){\n      sqlite3_int64 x;\n      j += sqlite3Fts3GetVarint(&zBuf[j], &x);\n      a[i] = (u32)(x & 0xffffffff);\n    }\n  }\n  while( i<N ) a[i++] = 0;\n}\n\n/*\n** Insert the sizes (in tokens) for each column of the document\n** with docid equal to p->iPrevDocid.  The sizes are encoded as\n** a blob of varints.\n*/\nstatic void fts3InsertDocsize(\n  int *pRC,                       /* Result code */\n  Fts3Table *p,                   /* Table into which to insert */\n  u32 *aSz                        /* Sizes of each column, in tokens */\n){\n  char *pBlob;             /* The BLOB encoding of the document size */\n  int nBlob;               /* Number of bytes in the BLOB */\n  sqlite3_stmt *pStmt;     /* Statement used to insert the encoding */\n  int rc;                  /* Result code from subfunctions */\n\n  if( *pRC ) return;\n  pBlob = sqlite3_malloc64( 10*(sqlite3_int64)p->nColumn );\n  if( pBlob==0 ){\n    *pRC = SQLITE_NOMEM;\n    return;\n  }\n  fts3EncodeIntArray(p->nColumn, aSz, pBlob, &nBlob);\n  rc = fts3SqlStmt(p, SQL_REPLACE_DOCSIZE, &pStmt, 0);\n  if( rc ){\n    sqlite3_free(pBlob);\n    *pRC = rc;\n    return;\n  }\n  sqlite3_bind_int64(pStmt, 1, p->iPrevDocid);\n  sqlite3_bind_blob(pStmt, 2, pBlob, nBlob, sqlite3_free);\n  sqlite3_step(pStmt);\n  *pRC = sqlite3_reset(pStmt);\n}\n\n/*\n** Record 0 of the %_stat table contains a blob consisting of N varints,\n** where N is the number of user defined columns in the fts3 table plus\n** two. If nCol is the number of user defined columns, then values of the\n** varints are set as follows:\n**\n**   Varint 0:       Total number of rows in the table.\n**\n**   Varint 1..nCol: For each column, the total number of tokens stored in\n**                   the column for all rows of the table.\n**\n**   Varint 1+nCol:  The total size, in bytes, of all text values in all\n**                   columns of all rows of the table.\n**\n*/\nstatic void fts3UpdateDocTotals(\n  int *pRC,                       /* The result code */\n  Fts3Table *p,                   /* Table being updated */\n  u32 *aSzIns,                    /* Size increases */\n  u32 *aSzDel,                    /* Size decreases */\n  int nChng                       /* Change in the number of documents */\n){\n  char *pBlob;             /* Storage for BLOB written into %_stat */\n  int nBlob;               /* Size of BLOB written into %_stat */\n  u32 *a;                  /* Array of integers that becomes the BLOB */\n  sqlite3_stmt *pStmt;     /* Statement for reading and writing */\n  int i;                   /* Loop counter */\n  int rc;                  /* Result code from subfunctions */\n\n  const int nStat = p->nColumn+2;\n\n  if( *pRC ) return;\n  a = sqlite3_malloc64( (sizeof(u32)+10)*(sqlite3_int64)nStat );\n  if( a==0 ){\n    *pRC = SQLITE_NOMEM;\n    return;\n  }\n  pBlob = (char*)&a[nStat];\n  rc = fts3SqlStmt(p, SQL_SELECT_STAT, &pStmt, 0);\n  if( rc ){\n    sqlite3_free(a);\n    *pRC = rc;\n    return;\n  }\n  sqlite3_bind_int(pStmt, 1, FTS_STAT_DOCTOTAL);\n  if( sqlite3_step(pStmt)==SQLITE_ROW ){\n    fts3DecodeIntArray(nStat, a,\n         sqlite3_column_blob(pStmt, 0),\n         sqlite3_column_bytes(pStmt, 0));\n  }else{\n    memset(a, 0, sizeof(u32)*(nStat) );\n  }\n  rc = sqlite3_reset(pStmt);\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(a);\n    *pRC = rc;\n    return;\n  }\n  if( nChng<0 && a[0]<(u32)(-nChng) ){\n    a[0] = 0;\n  }else{\n    a[0] += nChng;\n  }\n  for(i=0; i<p->nColumn+1; i++){\n    u32 x = a[i+1];\n    if( x+aSzIns[i] < aSzDel[i] ){\n      x = 0;\n    }else{\n      x = x + aSzIns[i] - aSzDel[i];\n    }\n    a[i+1] = x;\n  }\n  fts3EncodeIntArray(nStat, a, pBlob, &nBlob);\n  rc = fts3SqlStmt(p, SQL_REPLACE_STAT, &pStmt, 0);\n  if( rc ){\n    sqlite3_free(a);\n    *pRC = rc;\n    return;\n  }\n  sqlite3_bind_int(pStmt, 1, FTS_STAT_DOCTOTAL);\n  sqlite3_bind_blob(pStmt, 2, pBlob, nBlob, SQLITE_STATIC);\n  sqlite3_step(pStmt);\n  *pRC = sqlite3_reset(pStmt);\n  sqlite3_bind_null(pStmt, 2);\n  sqlite3_free(a);\n}\n\n/*\n** Merge the entire database so that there is one segment for each\n** iIndex/iLangid combination.\n*/\nstatic int fts3DoOptimize(Fts3Table *p, int bReturnDone){\n  int bSeenDone = 0;\n  int rc;\n  sqlite3_stmt *pAllLangid = 0;\n\n  rc = sqlite3Fts3PendingTermsFlush(p);\n  if( rc==SQLITE_OK ){\n    rc = fts3SqlStmt(p, SQL_SELECT_ALL_LANGID, &pAllLangid, 0);\n  }\n  if( rc==SQLITE_OK ){\n    int rc2;\n    sqlite3_bind_int(pAllLangid, 1, p->iPrevLangid);\n    sqlite3_bind_int(pAllLangid, 2, p->nIndex);\n    while( sqlite3_step(pAllLangid)==SQLITE_ROW ){\n      int i;\n      int iLangid = sqlite3_column_int(pAllLangid, 0);\n      for(i=0; rc==SQLITE_OK && i<p->nIndex; i++){\n        rc = fts3SegmentMerge(p, iLangid, i, FTS3_SEGCURSOR_ALL);\n        if( rc==SQLITE_DONE ){\n          bSeenDone = 1;\n          rc = SQLITE_OK;\n        }\n      }\n    }\n    rc2 = sqlite3_reset(pAllLangid);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  sqlite3Fts3SegmentsClose(p);\n\n  return (rc==SQLITE_OK && bReturnDone && bSeenDone) ? SQLITE_DONE : rc;\n}\n\n/*\n** This function is called when the user executes the following statement:\n**\n**     INSERT INTO <tbl>(<tbl>) VALUES('rebuild');\n**\n** The entire FTS index is discarded and rebuilt. If the table is one\n** created using the content=xxx option, then the new index is based on\n** the current contents of the xxx table. Otherwise, it is rebuilt based\n** on the contents of the %_content table.\n*/\nstatic int fts3DoRebuild(Fts3Table *p){\n  int rc;                         /* Return Code */\n\n  rc = fts3DeleteAll(p, 0);\n  if( rc==SQLITE_OK ){\n    u32 *aSz = 0;\n    u32 *aSzIns = 0;\n    u32 *aSzDel = 0;\n    sqlite3_stmt *pStmt = 0;\n    int nEntry = 0;\n\n    /* Compose and prepare an SQL statement to loop through the content table */\n    char *zSql = sqlite3_mprintf(\"SELECT %s\" , p->zReadExprlist);\n    if( !zSql ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);\n      sqlite3_free(zSql);\n    }\n\n    if( rc==SQLITE_OK ){\n      sqlite3_int64 nByte = sizeof(u32) * ((sqlite3_int64)p->nColumn+1)*3;\n      aSz = (u32 *)sqlite3_malloc64(nByte);\n      if( aSz==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memset(aSz, 0, nByte);\n        aSzIns = &aSz[p->nColumn+1];\n        aSzDel = &aSzIns[p->nColumn+1];\n      }\n    }\n\n    while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n      int iCol;\n      int iLangid = langidFromSelect(p, pStmt);\n      rc = fts3PendingTermsDocid(p, 0, iLangid, sqlite3_column_int64(pStmt, 0));\n      memset(aSz, 0, sizeof(aSz[0]) * (p->nColumn+1));\n      for(iCol=0; rc==SQLITE_OK && iCol<p->nColumn; iCol++){\n        if( p->abNotindexed[iCol]==0 ){\n          const char *z = (const char *) sqlite3_column_text(pStmt, iCol+1);\n          rc = fts3PendingTermsAdd(p, iLangid, z, iCol, &aSz[iCol]);\n          aSz[p->nColumn] += sqlite3_column_bytes(pStmt, iCol+1);\n        }\n      }\n      if( p->bHasDocsize ){\n        fts3InsertDocsize(&rc, p, aSz);\n      }\n      if( rc!=SQLITE_OK ){\n        sqlite3_finalize(pStmt);\n        pStmt = 0;\n      }else{\n        nEntry++;\n        for(iCol=0; iCol<=p->nColumn; iCol++){\n          aSzIns[iCol] += aSz[iCol];\n        }\n      }\n    }\n    if( p->bFts4 ){\n      fts3UpdateDocTotals(&rc, p, aSzIns, aSzDel, nEntry);\n    }\n    sqlite3_free(aSz);\n\n    if( pStmt ){\n      int rc2 = sqlite3_finalize(pStmt);\n      if( rc==SQLITE_OK ){\n        rc = rc2;\n      }\n    }\n  }\n\n  return rc;\n}\n\n\n/*\n** This function opens a cursor used to read the input data for an\n** incremental merge operation. Specifically, it opens a cursor to scan\n** the oldest nSeg segments (idx=0 through idx=(nSeg-1)) in absolute\n** level iAbsLevel.\n*/\nstatic int fts3IncrmergeCsr(\n  Fts3Table *p,                   /* FTS3 table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level to open */\n  int nSeg,                       /* Number of segments to merge */\n  Fts3MultiSegReader *pCsr        /* Cursor object to populate */\n){\n  int rc;                         /* Return Code */\n  sqlite3_stmt *pStmt = 0;        /* Statement used to read %_segdir entry */\n  sqlite3_int64 nByte;            /* Bytes allocated at pCsr->apSegment[] */\n\n  /* Allocate space for the Fts3MultiSegReader.aCsr[] array */\n  memset(pCsr, 0, sizeof(*pCsr));\n  nByte = sizeof(Fts3SegReader *) * nSeg;\n  pCsr->apSegment = (Fts3SegReader **)sqlite3_malloc64(nByte);\n\n  if( pCsr->apSegment==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    memset(pCsr->apSegment, 0, nByte);\n    rc = fts3SqlStmt(p, SQL_SELECT_LEVEL, &pStmt, 0);\n  }\n  if( rc==SQLITE_OK ){\n    int i;\n    int rc2;\n    sqlite3_bind_int64(pStmt, 1, iAbsLevel);\n    assert( pCsr->nSegment==0 );\n    for(i=0; rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW && i<nSeg; i++){\n      rc = sqlite3Fts3SegReaderNew(i, 0,\n          sqlite3_column_int64(pStmt, 1),        /* segdir.start_block */\n          sqlite3_column_int64(pStmt, 2),        /* segdir.leaves_end_block */\n          sqlite3_column_int64(pStmt, 3),        /* segdir.end_block */\n          sqlite3_column_blob(pStmt, 4),         /* segdir.root */\n          sqlite3_column_bytes(pStmt, 4),        /* segdir.root */\n          &pCsr->apSegment[i]\n      );\n      pCsr->nSegment++;\n    }\n    rc2 = sqlite3_reset(pStmt);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  return rc;\n}\n\ntypedef struct IncrmergeWriter IncrmergeWriter;\ntypedef struct NodeWriter NodeWriter;\ntypedef struct Blob Blob;\ntypedef struct NodeReader NodeReader;\n\n/*\n** An instance of the following structure is used as a dynamic buffer\n** to build up nodes or other blobs of data in.\n**\n** The function blobGrowBuffer() is used to extend the allocation.\n*/\nstruct Blob {\n  char *a;                        /* Pointer to allocation */\n  int n;                          /* Number of valid bytes of data in a[] */\n  int nAlloc;                     /* Allocated size of a[] (nAlloc>=n) */\n};\n\n/*\n** This structure is used to build up buffers containing segment b-tree\n** nodes (blocks).\n*/\nstruct NodeWriter {\n  sqlite3_int64 iBlock;           /* Current block id */\n  Blob key;                       /* Last key written to the current block */\n  Blob block;                     /* Current block image */\n};\n\n/*\n** An object of this type contains the state required to create or append\n** to an appendable b-tree segment.\n*/\nstruct IncrmergeWriter {\n  i64 nLeafEst;                   /* Space allocated for leaf blocks */\n  i64 nWork;                      /* Number of leaf pages flushed */\n  sqlite3_int64 iAbsLevel;        /* Absolute level of input segments */\n  int iIdx;                       /* Index of *output* segment in iAbsLevel+1 */\n  sqlite3_int64 iStart;           /* Block number of first allocated block */\n  sqlite3_int64 iEnd;             /* Block number of last allocated block */\n  sqlite3_int64 nLeafData;        /* Bytes of leaf page data so far */\n  u8 bNoLeafData;                 /* If true, store 0 for segment size */\n  NodeWriter aNodeWriter[FTS_MAX_APPENDABLE_HEIGHT];\n};\n\n/*\n** An object of the following type is used to read data from a single\n** FTS segment node. See the following functions:\n**\n**     nodeReaderInit()\n**     nodeReaderNext()\n**     nodeReaderRelease()\n*/\nstruct NodeReader {\n  const char *aNode;\n  int nNode;\n  int iOff;                       /* Current offset within aNode[] */\n\n  /* Output variables. Containing the current node entry. */\n  sqlite3_int64 iChild;           /* Pointer to child node */\n  Blob term;                      /* Current term */\n  const char *aDoclist;           /* Pointer to doclist */\n  int nDoclist;                   /* Size of doclist in bytes */\n};\n\n/*\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op.\n** Otherwise, if the allocation at pBlob->a is not already at least nMin\n** bytes in size, extend (realloc) it to be so.\n**\n** If an OOM error occurs, set *pRc to SQLITE_NOMEM and leave pBlob->a\n** unmodified. Otherwise, if the allocation succeeds, update pBlob->nAlloc\n** to reflect the new size of the pBlob->a[] buffer.\n*/\nstatic void blobGrowBuffer(Blob *pBlob, int nMin, int *pRc){\n  if( *pRc==SQLITE_OK && nMin>pBlob->nAlloc ){\n    int nAlloc = nMin;\n    char *a = (char *)sqlite3_realloc64(pBlob->a, nAlloc);\n    if( a ){\n      pBlob->nAlloc = nAlloc;\n      pBlob->a = a;\n    }else{\n      *pRc = SQLITE_NOMEM;\n    }\n  }\n}\n\n/*\n** Attempt to advance the node-reader object passed as the first argument to\n** the next entry on the node.\n**\n** Return an error code if an error occurs (SQLITE_NOMEM is possible).\n** Otherwise return SQLITE_OK. If there is no next entry on the node\n** (e.g. because the current entry is the last) set NodeReader->aNode to\n** NULL to indicate EOF. Otherwise, populate the NodeReader structure output\n** variables for the new entry.\n*/\nstatic int nodeReaderNext(NodeReader *p){\n  int bFirst = (p->term.n==0);    /* True for first term on the node */\n  int nPrefix = 0;                /* Bytes to copy from previous term */\n  int nSuffix = 0;                /* Bytes to append to the prefix */\n  int rc = SQLITE_OK;             /* Return code */\n\n  assert( p->aNode );\n  if( p->iChild && bFirst==0 ) p->iChild++;\n  if( p->iOff>=p->nNode ){\n    /* EOF */\n    p->aNode = 0;\n  }else{\n    if( bFirst==0 ){\n      p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nPrefix);\n    }\n    p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);\n\n    if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){\n      return FTS_CORRUPT_VTAB;\n    }\n    blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);\n    if( rc==SQLITE_OK && ALWAYS(p->term.a!=0) ){\n      memcpy(&p->term.a[nPrefix], &p->aNode[p->iOff], nSuffix);\n      p->term.n = nPrefix+nSuffix;\n      p->iOff += nSuffix;\n      if( p->iChild==0 ){\n        p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &p->nDoclist);\n        if( (p->nNode-p->iOff)<p->nDoclist ){\n          return FTS_CORRUPT_VTAB;\n        }\n        p->aDoclist = &p->aNode[p->iOff];\n        p->iOff += p->nDoclist;\n      }\n    }\n  }\n\n  assert_fts3_nc( p->iOff<=p->nNode );\n  return rc;\n}\n\n/*\n** Release all dynamic resources held by node-reader object *p.\n*/\nstatic void nodeReaderRelease(NodeReader *p){\n  sqlite3_free(p->term.a);\n}\n\n/*\n** Initialize a node-reader object to read the node in buffer aNode/nNode.\n**\n** If successful, SQLITE_OK is returned and the NodeReader object set to\n** point to the first entry on the node (if any). Otherwise, an SQLite\n** error code is returned.\n*/\nstatic int nodeReaderInit(NodeReader *p, const char *aNode, int nNode){\n  memset(p, 0, sizeof(NodeReader));\n  p->aNode = aNode;\n  p->nNode = nNode;\n\n  /* Figure out if this is a leaf or an internal node. */\n  if( aNode && aNode[0] ){\n    /* An internal node. */\n    p->iOff = 1 + sqlite3Fts3GetVarint(&p->aNode[1], &p->iChild);\n  }else{\n    p->iOff = 1;\n  }\n\n  return aNode ? nodeReaderNext(p) : SQLITE_OK;\n}\n\n/*\n** This function is called while writing an FTS segment each time a leaf o\n** node is finished and written to disk. The key (zTerm/nTerm) is guaranteed\n** to be greater than the largest key on the node just written, but smaller\n** than or equal to the first key that will be written to the next leaf\n** node.\n**\n** The block id of the leaf node just written to disk may be found in\n** (pWriter->aNodeWriter[0].iBlock) when this function is called.\n*/\nstatic int fts3IncrmergePush(\n  Fts3Table *p,                   /* Fts3 table handle */\n  IncrmergeWriter *pWriter,       /* Writer object */\n  const char *zTerm,              /* Term to write to internal node */\n  int nTerm                       /* Bytes at zTerm */\n){\n  sqlite3_int64 iPtr = pWriter->aNodeWriter[0].iBlock;\n  int iLayer;\n\n  assert( nTerm>0 );\n  for(iLayer=1; ALWAYS(iLayer<FTS_MAX_APPENDABLE_HEIGHT); iLayer++){\n    sqlite3_int64 iNextPtr = 0;\n    NodeWriter *pNode = &pWriter->aNodeWriter[iLayer];\n    int rc = SQLITE_OK;\n    int nPrefix;\n    int nSuffix;\n    int nSpace;\n\n    /* Figure out how much space the key will consume if it is written to\n    ** the current node of layer iLayer. Due to the prefix compression,\n    ** the space required changes depending on which node the key is to\n    ** be added to.  */\n    nPrefix = fts3PrefixCompress(pNode->key.a, pNode->key.n, zTerm, nTerm);\n    nSuffix = nTerm - nPrefix;\n    if(nSuffix<=0 ) return FTS_CORRUPT_VTAB;\n    nSpace  = sqlite3Fts3VarintLen(nPrefix);\n    nSpace += sqlite3Fts3VarintLen(nSuffix) + nSuffix;\n\n    if( pNode->key.n==0 || (pNode->block.n + nSpace)<=p->nNodeSize ){\n      /* If the current node of layer iLayer contains zero keys, or if adding\n      ** the key to it will not cause it to grow to larger than nNodeSize\n      ** bytes in size, write the key here.  */\n\n      Blob *pBlk = &pNode->block;\n      if( pBlk->n==0 ){\n        blobGrowBuffer(pBlk, p->nNodeSize, &rc);\n        if( rc==SQLITE_OK ){\n          pBlk->a[0] = (char)iLayer;\n          pBlk->n = 1 + sqlite3Fts3PutVarint(&pBlk->a[1], iPtr);\n        }\n      }\n      blobGrowBuffer(pBlk, pBlk->n + nSpace, &rc);\n      blobGrowBuffer(&pNode->key, nTerm, &rc);\n\n      if( rc==SQLITE_OK ){\n        if( pNode->key.n ){\n          pBlk->n += sqlite3Fts3PutVarint(&pBlk->a[pBlk->n], nPrefix);\n        }\n        pBlk->n += sqlite3Fts3PutVarint(&pBlk->a[pBlk->n], nSuffix);\n        assert( nPrefix+nSuffix<=nTerm );\n        assert( nPrefix>=0 );\n        memcpy(&pBlk->a[pBlk->n], &zTerm[nPrefix], nSuffix);\n        pBlk->n += nSuffix;\n\n        memcpy(pNode->key.a, zTerm, nTerm);\n        pNode->key.n = nTerm;\n      }\n    }else{\n      /* Otherwise, flush the current node of layer iLayer to disk.\n      ** Then allocate a new, empty sibling node. The key will be written\n      ** into the parent of this node. */\n      rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n);\n\n      assert( pNode->block.nAlloc>=p->nNodeSize );\n      pNode->block.a[0] = (char)iLayer;\n      pNode->block.n = 1 + sqlite3Fts3PutVarint(&pNode->block.a[1], iPtr+1);\n\n      iNextPtr = pNode->iBlock;\n      pNode->iBlock++;\n      pNode->key.n = 0;\n    }\n\n    if( rc!=SQLITE_OK || iNextPtr==0 ) return rc;\n    iPtr = iNextPtr;\n  }\n\n  assert( 0 );\n  return 0;\n}\n\n/*\n** Append a term and (optionally) doclist to the FTS segment node currently\n** stored in blob *pNode. The node need not contain any terms, but the\n** header must be written before this function is called.\n**\n** A node header is a single 0x00 byte for a leaf node, or a height varint\n** followed by the left-hand-child varint for an internal node.\n**\n** The term to be appended is passed via arguments zTerm/nTerm. For a\n** leaf node, the doclist is passed as aDoclist/nDoclist. For an internal\n** node, both aDoclist and nDoclist must be passed 0.\n**\n** If the size of the value in blob pPrev is zero, then this is the first\n** term written to the node. Otherwise, pPrev contains a copy of the\n** previous term. Before this function returns, it is updated to contain a\n** copy of zTerm/nTerm.\n**\n** It is assumed that the buffer associated with pNode is already large\n** enough to accommodate the new entry. The buffer associated with pPrev\n** is extended by this function if required.\n**\n** If an error (i.e. OOM condition) occurs, an SQLite error code is\n** returned. Otherwise, SQLITE_OK.\n*/\nstatic int fts3AppendToNode(\n  Blob *pNode,                    /* Current node image to append to */\n  Blob *pPrev,                    /* Buffer containing previous term written */\n  const char *zTerm,              /* New term to write */\n  int nTerm,                      /* Size of zTerm in bytes */\n  const char *aDoclist,           /* Doclist (or NULL) to write */\n  int nDoclist                    /* Size of aDoclist in bytes */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  int bFirst = (pPrev->n==0);     /* True if this is the first term written */\n  int nPrefix;                    /* Size of term prefix in bytes */\n  int nSuffix;                    /* Size of term suffix in bytes */\n\n  /* Node must have already been started. There must be a doclist for a\n  ** leaf node, and there must not be a doclist for an internal node.  */\n  assert( pNode->n>0 );\n  assert_fts3_nc( (pNode->a[0]=='\\0')==(aDoclist!=0) );\n\n  blobGrowBuffer(pPrev, nTerm, &rc);\n  if( rc!=SQLITE_OK ) return rc;\n  assert( pPrev!=0 );\n  assert( pPrev->a!=0 );\n\n  nPrefix = fts3PrefixCompress(pPrev->a, pPrev->n, zTerm, nTerm);\n  nSuffix = nTerm - nPrefix;\n  if( nSuffix<=0 ) return FTS_CORRUPT_VTAB;\n  memcpy(pPrev->a, zTerm, nTerm);\n  pPrev->n = nTerm;\n\n  if( bFirst==0 ){\n    pNode->n += sqlite3Fts3PutVarint(&pNode->a[pNode->n], nPrefix);\n  }\n  pNode->n += sqlite3Fts3PutVarint(&pNode->a[pNode->n], nSuffix);\n  memcpy(&pNode->a[pNode->n], &zTerm[nPrefix], nSuffix);\n  pNode->n += nSuffix;\n\n  if( aDoclist ){\n    pNode->n += sqlite3Fts3PutVarint(&pNode->a[pNode->n], nDoclist);\n    memcpy(&pNode->a[pNode->n], aDoclist, nDoclist);\n    pNode->n += nDoclist;\n  }\n\n  assert( pNode->n<=pNode->nAlloc );\n\n  return SQLITE_OK;\n}\n\n/*\n** Append the current term and doclist pointed to by cursor pCsr to the\n** appendable b-tree segment opened for writing by pWriter.\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise.\n*/\nstatic int fts3IncrmergeAppend(\n  Fts3Table *p,                   /* Fts3 table handle */\n  IncrmergeWriter *pWriter,       /* Writer object */\n  Fts3MultiSegReader *pCsr        /* Cursor containing term and doclist */\n){\n  const char *zTerm = pCsr->zTerm;\n  int nTerm = pCsr->nTerm;\n  const char *aDoclist = pCsr->aDoclist;\n  int nDoclist = pCsr->nDoclist;\n  int rc = SQLITE_OK;           /* Return code */\n  int nSpace;                   /* Total space in bytes required on leaf */\n  int nPrefix;                  /* Size of prefix shared with previous term */\n  int nSuffix;                  /* Size of suffix (nTerm - nPrefix) */\n  NodeWriter *pLeaf;            /* Object used to write leaf nodes */\n\n  pLeaf = &pWriter->aNodeWriter[0];\n  nPrefix = fts3PrefixCompress(pLeaf->key.a, pLeaf->key.n, zTerm, nTerm);\n  nSuffix = nTerm - nPrefix;\n  if(nSuffix<=0 ) return FTS_CORRUPT_VTAB;\n\n  nSpace  = sqlite3Fts3VarintLen(nPrefix);\n  nSpace += sqlite3Fts3VarintLen(nSuffix) + nSuffix;\n  nSpace += sqlite3Fts3VarintLen(nDoclist) + nDoclist;\n\n  /* If the current block is not empty, and if adding this term/doclist\n  ** to the current block would make it larger than Fts3Table.nNodeSize bytes,\n  ** and if there is still room for another leaf page, write this block out to\n  ** the database. */\n  if( pLeaf->block.n>0\n   && (pLeaf->block.n + nSpace)>p->nNodeSize\n   && pLeaf->iBlock < (pWriter->iStart + pWriter->nLeafEst)\n  ){\n    rc = fts3WriteSegment(p, pLeaf->iBlock, pLeaf->block.a, pLeaf->block.n);\n    pWriter->nWork++;\n\n    /* Add the current term to the parent node. The term added to the\n    ** parent must:\n    **\n    **   a) be greater than the largest term on the leaf node just written\n    **      to the database (still available in pLeaf->key), and\n    **\n    **   b) be less than or equal to the term about to be added to the new\n    **      leaf node (zTerm/nTerm).\n    **\n    ** In other words, it must be the prefix of zTerm 1 byte longer than\n    ** the common prefix (if any) of zTerm and pWriter->zTerm.\n    */\n    if( rc==SQLITE_OK ){\n      rc = fts3IncrmergePush(p, pWriter, zTerm, nPrefix+1);\n    }\n\n    /* Advance to the next output block */\n    pLeaf->iBlock++;\n    pLeaf->key.n = 0;\n    pLeaf->block.n = 0;\n\n    nSuffix = nTerm;\n    nSpace  = 1;\n    nSpace += sqlite3Fts3VarintLen(nSuffix) + nSuffix;\n    nSpace += sqlite3Fts3VarintLen(nDoclist) + nDoclist;\n  }\n\n  pWriter->nLeafData += nSpace;\n  blobGrowBuffer(&pLeaf->block, pLeaf->block.n + nSpace, &rc);\n  if( rc==SQLITE_OK ){\n    if( pLeaf->block.n==0 ){\n      pLeaf->block.n = 1;\n      pLeaf->block.a[0] = '\\0';\n    }\n    rc = fts3AppendToNode(\n        &pLeaf->block, &pLeaf->key, zTerm, nTerm, aDoclist, nDoclist\n    );\n  }\n\n  return rc;\n}\n\n/*\n** This function is called to release all dynamic resources held by the\n** merge-writer object pWriter, and if no error has occurred, to flush\n** all outstanding node buffers held by pWriter to disk.\n**\n** If *pRc is not SQLITE_OK when this function is called, then no attempt\n** is made to write any data to disk. Instead, this function serves only\n** to release outstanding resources.\n**\n** Otherwise, if *pRc is initially SQLITE_OK and an error occurs while\n** flushing buffers to disk, *pRc is set to an SQLite error code before\n** returning.\n*/\nstatic void fts3IncrmergeRelease(\n  Fts3Table *p,                   /* FTS3 table handle */\n  IncrmergeWriter *pWriter,       /* Merge-writer object */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  int i;                          /* Used to iterate through non-root layers */\n  int iRoot;                      /* Index of root in pWriter->aNodeWriter */\n  NodeWriter *pRoot;              /* NodeWriter for root node */\n  int rc = *pRc;                  /* Error code */\n\n  /* Set iRoot to the index in pWriter->aNodeWriter[] of the output segment\n  ** root node. If the segment fits entirely on a single leaf node, iRoot\n  ** will be set to 0. If the root node is the parent of the leaves, iRoot\n  ** will be 1. And so on.  */\n  for(iRoot=FTS_MAX_APPENDABLE_HEIGHT-1; iRoot>=0; iRoot--){\n    NodeWriter *pNode = &pWriter->aNodeWriter[iRoot];\n    if( pNode->block.n>0 ) break;\n    assert( *pRc || pNode->block.nAlloc==0 );\n    assert( *pRc || pNode->key.nAlloc==0 );\n    sqlite3_free(pNode->block.a);\n    sqlite3_free(pNode->key.a);\n  }\n\n  /* Empty output segment. This is a no-op. */\n  if( iRoot<0 ) return;\n\n  /* The entire output segment fits on a single node. Normally, this means\n  ** the node would be stored as a blob in the \"root\" column of the %_segdir\n  ** table. However, this is not permitted in this case. The problem is that\n  ** space has already been reserved in the %_segments table, and so the\n  ** start_block and end_block fields of the %_segdir table must be populated.\n  ** And, by design or by accident, released versions of FTS cannot handle\n  ** segments that fit entirely on the root node with start_block!=0.\n  **\n  ** Instead, create a synthetic root node that contains nothing but a\n  ** pointer to the single content node. So that the segment consists of a\n  ** single leaf and a single interior (root) node.\n  **\n  ** Todo: Better might be to defer allocating space in the %_segments\n  ** table until we are sure it is needed.\n  */\n  if( iRoot==0 ){\n    Blob *pBlock = &pWriter->aNodeWriter[1].block;\n    blobGrowBuffer(pBlock, 1 + FTS3_VARINT_MAX, &rc);\n    if( rc==SQLITE_OK ){\n      pBlock->a[0] = 0x01;\n      pBlock->n = 1 + sqlite3Fts3PutVarint(\n          &pBlock->a[1], pWriter->aNodeWriter[0].iBlock\n      );\n    }\n    iRoot = 1;\n  }\n  pRoot = &pWriter->aNodeWriter[iRoot];\n\n  /* Flush all currently outstanding nodes to disk. */\n  for(i=0; i<iRoot; i++){\n    NodeWriter *pNode = &pWriter->aNodeWriter[i];\n    if( pNode->block.n>0 && rc==SQLITE_OK ){\n      rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n);\n    }\n    sqlite3_free(pNode->block.a);\n    sqlite3_free(pNode->key.a);\n  }\n\n  /* Write the %_segdir record. */\n  if( rc==SQLITE_OK ){\n    rc = fts3WriteSegdir(p,\n        pWriter->iAbsLevel+1,               /* level */\n        pWriter->iIdx,                      /* idx */\n        pWriter->iStart,                    /* start_block */\n        pWriter->aNodeWriter[0].iBlock,     /* leaves_end_block */\n        pWriter->iEnd,                      /* end_block */\n        (pWriter->bNoLeafData==0 ? pWriter->nLeafData : 0),   /* end_block */\n        pRoot->block.a, pRoot->block.n      /* root */\n    );\n  }\n  sqlite3_free(pRoot->block.a);\n  sqlite3_free(pRoot->key.a);\n\n  *pRc = rc;\n}\n\n/*\n** Compare the term in buffer zLhs (size in bytes nLhs) with that in\n** zRhs (size in bytes nRhs) using memcmp. If one term is a prefix of\n** the other, it is considered to be smaller than the other.\n**\n** Return -ve if zLhs is smaller than zRhs, 0 if it is equal, or +ve\n** if it is greater.\n*/\nstatic int fts3TermCmp(\n  const char *zLhs, int nLhs,     /* LHS of comparison */\n  const char *zRhs, int nRhs      /* RHS of comparison */\n){\n  int nCmp = MIN(nLhs, nRhs);\n  int res;\n\n  if( nCmp && ALWAYS(zLhs) && ALWAYS(zRhs) ){\n    res = memcmp(zLhs, zRhs, nCmp);\n  }else{\n    res = 0;\n  }\n  if( res==0 ) res = nLhs - nRhs;\n\n  return res;\n}\n\n\n/*\n** Query to see if the entry in the %_segments table with blockid iEnd is\n** NULL. If no error occurs and the entry is NULL, set *pbRes 1 before\n** returning. Otherwise, set *pbRes to 0.\n**\n** Or, if an error occurs while querying the database, return an SQLite\n** error code. The final value of *pbRes is undefined in this case.\n**\n** This is used to test if a segment is an \"appendable\" segment. If it\n** is, then a NULL entry has been inserted into the %_segments table\n** with blockid %_segdir.end_block.\n*/\nstatic int fts3IsAppendable(Fts3Table *p, sqlite3_int64 iEnd, int *pbRes){\n  int bRes = 0;                   /* Result to set *pbRes to */\n  sqlite3_stmt *pCheck = 0;       /* Statement to query database with */\n  int rc;                         /* Return code */\n\n  rc = fts3SqlStmt(p, SQL_SEGMENT_IS_APPENDABLE, &pCheck, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pCheck, 1, iEnd);\n    if( SQLITE_ROW==sqlite3_step(pCheck) ) bRes = 1;\n    rc = sqlite3_reset(pCheck);\n  }\n\n  *pbRes = bRes;\n  return rc;\n}\n\n/*\n** This function is called when initializing an incremental-merge operation.\n** It checks if the existing segment with index value iIdx at absolute level\n** (iAbsLevel+1) can be appended to by the incremental merge. If it can, the\n** merge-writer object *pWriter is initialized to write to it.\n**\n** An existing segment can be appended to by an incremental merge if:\n**\n**   * It was initially created as an appendable segment (with all required\n**     space pre-allocated), and\n**\n**   * The first key read from the input (arguments zKey and nKey) is\n**     greater than the largest key currently stored in the potential\n**     output segment.\n*/\nstatic int fts3IncrmergeLoad(\n  Fts3Table *p,                   /* Fts3 table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level of input segments */\n  int iIdx,                       /* Index of candidate output segment */\n  const char *zKey,               /* First key to write */\n  int nKey,                       /* Number of bytes in nKey */\n  IncrmergeWriter *pWriter        /* Populate this object */\n){\n  int rc;                         /* Return code */\n  sqlite3_stmt *pSelect = 0;      /* SELECT to read %_segdir entry */\n\n  rc = fts3SqlStmt(p, SQL_SELECT_SEGDIR, &pSelect, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_int64 iStart = 0;     /* Value of %_segdir.start_block */\n    sqlite3_int64 iLeafEnd = 0;   /* Value of %_segdir.leaves_end_block */\n    sqlite3_int64 iEnd = 0;       /* Value of %_segdir.end_block */\n    const char *aRoot = 0;        /* Pointer to %_segdir.root buffer */\n    int nRoot = 0;                /* Size of aRoot[] in bytes */\n    int rc2;                      /* Return code from sqlite3_reset() */\n    int bAppendable = 0;          /* Set to true if segment is appendable */\n\n    /* Read the %_segdir entry for index iIdx absolute level (iAbsLevel+1) */\n    sqlite3_bind_int64(pSelect, 1, iAbsLevel+1);\n    sqlite3_bind_int(pSelect, 2, iIdx);\n    if( sqlite3_step(pSelect)==SQLITE_ROW ){\n      iStart = sqlite3_column_int64(pSelect, 1);\n      iLeafEnd = sqlite3_column_int64(pSelect, 2);\n      fts3ReadEndBlockField(pSelect, 3, &iEnd, &pWriter->nLeafData);\n      if( pWriter->nLeafData<0 ){\n        pWriter->nLeafData = pWriter->nLeafData * -1;\n      }\n      pWriter->bNoLeafData = (pWriter->nLeafData==0);\n      nRoot = sqlite3_column_bytes(pSelect, 4);\n      aRoot = sqlite3_column_blob(pSelect, 4);\n      if( aRoot==0 ){\n        sqlite3_reset(pSelect);\n        return nRoot ? SQLITE_NOMEM : FTS_CORRUPT_VTAB;\n      }\n    }else{\n      return sqlite3_reset(pSelect);\n    }\n\n    /* Check for the zero-length marker in the %_segments table */\n    rc = fts3IsAppendable(p, iEnd, &bAppendable);\n\n    /* Check that zKey/nKey is larger than the largest key the candidate */\n    if( rc==SQLITE_OK && bAppendable ){\n      char *aLeaf = 0;\n      int nLeaf = 0;\n\n      rc = sqlite3Fts3ReadBlock(p, iLeafEnd, &aLeaf, &nLeaf, 0);\n      if( rc==SQLITE_OK ){\n        NodeReader reader;\n        for(rc = nodeReaderInit(&reader, aLeaf, nLeaf);\n            rc==SQLITE_OK && reader.aNode;\n            rc = nodeReaderNext(&reader)\n        ){\n          assert( reader.aNode );\n        }\n        if( fts3TermCmp(zKey, nKey, reader.term.a, reader.term.n)<=0 ){\n          bAppendable = 0;\n        }\n        nodeReaderRelease(&reader);\n      }\n      sqlite3_free(aLeaf);\n    }\n\n    if( rc==SQLITE_OK && bAppendable ){\n      /* It is possible to append to this segment. Set up the IncrmergeWriter\n      ** object to do so.  */\n      int i;\n      int nHeight = (int)aRoot[0];\n      NodeWriter *pNode;\n      if( nHeight<1 || nHeight>=FTS_MAX_APPENDABLE_HEIGHT ){\n        sqlite3_reset(pSelect);\n        return FTS_CORRUPT_VTAB;\n      }\n\n      pWriter->nLeafEst = (int)((iEnd - iStart) + 1)/FTS_MAX_APPENDABLE_HEIGHT;\n      pWriter->iStart = iStart;\n      pWriter->iEnd = iEnd;\n      pWriter->iAbsLevel = iAbsLevel;\n      pWriter->iIdx = iIdx;\n\n      for(i=nHeight+1; i<FTS_MAX_APPENDABLE_HEIGHT; i++){\n        pWriter->aNodeWriter[i].iBlock = pWriter->iStart + i*pWriter->nLeafEst;\n      }\n\n      pNode = &pWriter->aNodeWriter[nHeight];\n      pNode->iBlock = pWriter->iStart + pWriter->nLeafEst*nHeight;\n      blobGrowBuffer(&pNode->block,\n          MAX(nRoot, p->nNodeSize)+FTS3_NODE_PADDING, &rc\n      );\n      if( rc==SQLITE_OK ){\n        memcpy(pNode->block.a, aRoot, nRoot);\n        pNode->block.n = nRoot;\n        memset(&pNode->block.a[nRoot], 0, FTS3_NODE_PADDING);\n      }\n\n      for(i=nHeight; i>=0 && rc==SQLITE_OK; i--){\n        NodeReader reader;\n        memset(&reader, 0, sizeof(reader));\n        pNode = &pWriter->aNodeWriter[i];\n\n        if( pNode->block.a){\n          rc = nodeReaderInit(&reader, pNode->block.a, pNode->block.n);\n          while( reader.aNode && rc==SQLITE_OK ) rc = nodeReaderNext(&reader);\n          blobGrowBuffer(&pNode->key, reader.term.n, &rc);\n          if( rc==SQLITE_OK ){\n            assert_fts3_nc( reader.term.n>0 || reader.aNode==0 );\n            if( reader.term.n>0 ){\n              memcpy(pNode->key.a, reader.term.a, reader.term.n);\n            }\n            pNode->key.n = reader.term.n;\n            if( i>0 ){\n              char *aBlock = 0;\n              int nBlock = 0;\n              pNode = &pWriter->aNodeWriter[i-1];\n              pNode->iBlock = reader.iChild;\n              rc = sqlite3Fts3ReadBlock(p, reader.iChild, &aBlock, &nBlock,0);\n              blobGrowBuffer(&pNode->block,\n                  MAX(nBlock, p->nNodeSize)+FTS3_NODE_PADDING, &rc\n              );\n              if( rc==SQLITE_OK ){\n                memcpy(pNode->block.a, aBlock, nBlock);\n                pNode->block.n = nBlock;\n                memset(&pNode->block.a[nBlock], 0, FTS3_NODE_PADDING);\n              }\n              sqlite3_free(aBlock);\n            }\n          }\n        }\n        nodeReaderRelease(&reader);\n      }\n    }\n\n    rc2 = sqlite3_reset(pSelect);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  return rc;\n}\n\n/*\n** Determine the largest segment index value that exists within absolute\n** level iAbsLevel+1. If no error occurs, set *piIdx to this value plus\n** one before returning SQLITE_OK. Or, if there are no segments at all\n** within level iAbsLevel, set *piIdx to zero.\n**\n** If an error occurs, return an SQLite error code. The final value of\n** *piIdx is undefined in this case.\n*/\nstatic int fts3IncrmergeOutputIdx(\n  Fts3Table *p,                   /* FTS Table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute index of input segments */\n  int *piIdx                      /* OUT: Next free index at iAbsLevel+1 */\n){\n  int rc;\n  sqlite3_stmt *pOutputIdx = 0;   /* SQL used to find output index */\n\n  rc = fts3SqlStmt(p, SQL_NEXT_SEGMENT_INDEX, &pOutputIdx, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pOutputIdx, 1, iAbsLevel+1);\n    sqlite3_step(pOutputIdx);\n    *piIdx = sqlite3_column_int(pOutputIdx, 0);\n    rc = sqlite3_reset(pOutputIdx);\n  }\n\n  return rc;\n}\n\n/*\n** Allocate an appendable output segment on absolute level iAbsLevel+1\n** with idx value iIdx.\n**\n** In the %_segdir table, a segment is defined by the values in three\n** columns:\n**\n**     start_block\n**     leaves_end_block\n**     end_block\n**\n** When an appendable segment is allocated, it is estimated that the\n** maximum number of leaf blocks that may be required is the sum of the\n** number of leaf blocks consumed by the input segments, plus the number\n** of input segments, multiplied by two. This value is stored in stack\n** variable nLeafEst.\n**\n** A total of 16*nLeafEst blocks are allocated when an appendable segment\n** is created ((1 + end_block - start_block)==16*nLeafEst). The contiguous\n** array of leaf nodes starts at the first block allocated. The array\n** of interior nodes that are parents of the leaf nodes start at block\n** (start_block + (1 + end_block - start_block) / 16). And so on.\n**\n** In the actual code below, the value \"16\" is replaced with the\n** pre-processor macro FTS_MAX_APPENDABLE_HEIGHT.\n*/\nstatic int fts3IncrmergeWriter(\n  Fts3Table *p,                   /* Fts3 table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level of input segments */\n  int iIdx,                       /* Index of new output segment */\n  Fts3MultiSegReader *pCsr,       /* Cursor that data will be read from */\n  IncrmergeWriter *pWriter        /* Populate this object */\n){\n  int rc;                         /* Return Code */\n  int i;                          /* Iterator variable */\n  i64 nLeafEst = 0;               /* Blocks allocated for leaf nodes */\n  sqlite3_stmt *pLeafEst = 0;     /* SQL used to determine nLeafEst */\n  sqlite3_stmt *pFirstBlock = 0;  /* SQL used to determine first block */\n\n  /* Calculate nLeafEst. */\n  rc = fts3SqlStmt(p, SQL_MAX_LEAF_NODE_ESTIMATE, &pLeafEst, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pLeafEst, 1, iAbsLevel);\n    sqlite3_bind_int64(pLeafEst, 2, pCsr->nSegment);\n    if( SQLITE_ROW==sqlite3_step(pLeafEst) ){\n      nLeafEst = sqlite3_column_int64(pLeafEst, 0);\n    }\n    rc = sqlite3_reset(pLeafEst);\n  }\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* Calculate the first block to use in the output segment */\n  rc = fts3SqlStmt(p, SQL_NEXT_SEGMENTS_ID, &pFirstBlock, 0);\n  if( rc==SQLITE_OK ){\n    if( SQLITE_ROW==sqlite3_step(pFirstBlock) ){\n      pWriter->iStart = sqlite3_column_int64(pFirstBlock, 0);\n      pWriter->iEnd = pWriter->iStart - 1;\n      pWriter->iEnd += nLeafEst * FTS_MAX_APPENDABLE_HEIGHT;\n    }\n    rc = sqlite3_reset(pFirstBlock);\n  }\n  if( rc!=SQLITE_OK ) return rc;\n\n  /* Insert the marker in the %_segments table to make sure nobody tries\n  ** to steal the space just allocated. This is also used to identify\n  ** appendable segments.  */\n  rc = fts3WriteSegment(p, pWriter->iEnd, 0, 0);\n  if( rc!=SQLITE_OK ) return rc;\n\n  pWriter->iAbsLevel = iAbsLevel;\n  pWriter->nLeafEst = nLeafEst;\n  pWriter->iIdx = iIdx;\n\n  /* Set up the array of NodeWriter objects */\n  for(i=0; i<FTS_MAX_APPENDABLE_HEIGHT; i++){\n    pWriter->aNodeWriter[i].iBlock = pWriter->iStart + i*pWriter->nLeafEst;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Remove an entry from the %_segdir table. This involves running the\n** following two statements:\n**\n**   DELETE FROM %_segdir WHERE level = :iAbsLevel AND idx = :iIdx\n**   UPDATE %_segdir SET idx = idx - 1 WHERE level = :iAbsLevel AND idx > :iIdx\n**\n** The DELETE statement removes the specific %_segdir level. The UPDATE\n** statement ensures that the remaining segments have contiguously allocated\n** idx values.\n*/\nstatic int fts3RemoveSegdirEntry(\n  Fts3Table *p,                   /* FTS3 table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level to delete from */\n  int iIdx                        /* Index of %_segdir entry to delete */\n){\n  int rc;                         /* Return code */\n  sqlite3_stmt *pDelete = 0;      /* DELETE statement */\n\n  rc = fts3SqlStmt(p, SQL_DELETE_SEGDIR_ENTRY, &pDelete, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pDelete, 1, iAbsLevel);\n    sqlite3_bind_int(pDelete, 2, iIdx);\n    sqlite3_step(pDelete);\n    rc = sqlite3_reset(pDelete);\n  }\n\n  return rc;\n}\n\n/*\n** One or more segments have just been removed from absolute level iAbsLevel.\n** Update the 'idx' values of the remaining segments in the level so that\n** the idx values are a contiguous sequence starting from 0.\n*/\nstatic int fts3RepackSegdirLevel(\n  Fts3Table *p,                   /* FTS3 table handle */\n  sqlite3_int64 iAbsLevel         /* Absolute level to repack */\n){\n  int rc;                         /* Return code */\n  int *aIdx = 0;                  /* Array of remaining idx values */\n  int nIdx = 0;                   /* Valid entries in aIdx[] */\n  int nAlloc = 0;                 /* Allocated size of aIdx[] */\n  int i;                          /* Iterator variable */\n  sqlite3_stmt *pSelect = 0;      /* Select statement to read idx values */\n  sqlite3_stmt *pUpdate = 0;      /* Update statement to modify idx values */\n\n  rc = fts3SqlStmt(p, SQL_SELECT_INDEXES, &pSelect, 0);\n  if( rc==SQLITE_OK ){\n    int rc2;\n    sqlite3_bind_int64(pSelect, 1, iAbsLevel);\n    while( SQLITE_ROW==sqlite3_step(pSelect) ){\n      if( nIdx>=nAlloc ){\n        int *aNew;\n        nAlloc += 16;\n        aNew = sqlite3_realloc64(aIdx, nAlloc*sizeof(int));\n        if( !aNew ){\n          rc = SQLITE_NOMEM;\n          break;\n        }\n        aIdx = aNew;\n      }\n      aIdx[nIdx++] = sqlite3_column_int(pSelect, 0);\n    }\n    rc2 = sqlite3_reset(pSelect);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = fts3SqlStmt(p, SQL_SHIFT_SEGDIR_ENTRY, &pUpdate, 0);\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pUpdate, 2, iAbsLevel);\n  }\n\n  assert( p->bIgnoreSavepoint==0 );\n  p->bIgnoreSavepoint = 1;\n  for(i=0; rc==SQLITE_OK && i<nIdx; i++){\n    if( aIdx[i]!=i ){\n      sqlite3_bind_int(pUpdate, 3, aIdx[i]);\n      sqlite3_bind_int(pUpdate, 1, i);\n      sqlite3_step(pUpdate);\n      rc = sqlite3_reset(pUpdate);\n    }\n  }\n  p->bIgnoreSavepoint = 0;\n\n  sqlite3_free(aIdx);\n  return rc;\n}\n\nstatic void fts3StartNode(Blob *pNode, int iHeight, sqlite3_int64 iChild){\n  pNode->a[0] = (char)iHeight;\n  if( iChild ){\n    assert( pNode->nAlloc>=1+sqlite3Fts3VarintLen(iChild) );\n    pNode->n = 1 + sqlite3Fts3PutVarint(&pNode->a[1], iChild);\n  }else{\n    assert( pNode->nAlloc>=1 );\n    pNode->n = 1;\n  }\n}\n\n/*\n** The first two arguments are a pointer to and the size of a segment b-tree\n** node. The node may be a leaf or an internal node.\n**\n** This function creates a new node image in blob object *pNew by copying\n** all terms that are greater than or equal to zTerm/nTerm (for leaf nodes)\n** or greater than zTerm/nTerm (for internal nodes) from aNode/nNode.\n*/\nstatic int fts3TruncateNode(\n  const char *aNode,              /* Current node image */\n  int nNode,                      /* Size of aNode in bytes */\n  Blob *pNew,                     /* OUT: Write new node image here */\n  const char *zTerm,              /* Omit all terms smaller than this */\n  int nTerm,                      /* Size of zTerm in bytes */\n  sqlite3_int64 *piBlock          /* OUT: Block number in next layer down */\n){\n  NodeReader reader;              /* Reader object */\n  Blob prev = {0, 0, 0};          /* Previous term written to new node */\n  int rc = SQLITE_OK;             /* Return code */\n  int bLeaf;                       /* True for a leaf node */\n\n  if( nNode<1 ) return FTS_CORRUPT_VTAB;\n  bLeaf = aNode[0]=='\\0';\n\n  /* Allocate required output space */\n  blobGrowBuffer(pNew, nNode, &rc);\n  if( rc!=SQLITE_OK ) return rc;\n  pNew->n = 0;\n\n  /* Populate new node buffer */\n  for(rc = nodeReaderInit(&reader, aNode, nNode);\n      rc==SQLITE_OK && reader.aNode;\n      rc = nodeReaderNext(&reader)\n  ){\n    if( pNew->n==0 ){\n      int res = fts3TermCmp(reader.term.a, reader.term.n, zTerm, nTerm);\n      if( res<0 || (bLeaf==0 && res==0) ) continue;\n      fts3StartNode(pNew, (int)aNode[0], reader.iChild);\n      *piBlock = reader.iChild;\n    }\n    rc = fts3AppendToNode(\n        pNew, &prev, reader.term.a, reader.term.n,\n        reader.aDoclist, reader.nDoclist\n    );\n    if( rc!=SQLITE_OK ) break;\n  }\n  if( pNew->n==0 ){\n    fts3StartNode(pNew, (int)aNode[0], reader.iChild);\n    *piBlock = reader.iChild;\n  }\n  assert( pNew->n<=pNew->nAlloc );\n\n  nodeReaderRelease(&reader);\n  sqlite3_free(prev.a);\n  return rc;\n}\n\n/*\n** Remove all terms smaller than zTerm/nTerm from segment iIdx in absolute\n** level iAbsLevel. This may involve deleting entries from the %_segments\n** table, and modifying existing entries in both the %_segments and %_segdir\n** tables.\n**\n** SQLITE_OK is returned if the segment is updated successfully. Or an\n** SQLite error code otherwise.\n*/\nstatic int fts3TruncateSegment(\n  Fts3Table *p,                   /* FTS3 table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level of segment to modify */\n  int iIdx,                       /* Index within level of segment to modify */\n  const char *zTerm,              /* Remove terms smaller than this */\n  int nTerm                      /* Number of bytes in buffer zTerm */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  Blob root = {0,0,0};            /* New root page image */\n  Blob block = {0,0,0};           /* Buffer used for any other block */\n  sqlite3_int64 iBlock = 0;       /* Block id */\n  sqlite3_int64 iNewStart = 0;    /* New value for iStartBlock */\n  sqlite3_int64 iOldStart = 0;    /* Old value for iStartBlock */\n  sqlite3_stmt *pFetch = 0;       /* Statement used to fetch segdir */\n\n  rc = fts3SqlStmt(p, SQL_SELECT_SEGDIR, &pFetch, 0);\n  if( rc==SQLITE_OK ){\n    int rc2;                      /* sqlite3_reset() return code */\n    sqlite3_bind_int64(pFetch, 1, iAbsLevel);\n    sqlite3_bind_int(pFetch, 2, iIdx);\n    if( SQLITE_ROW==sqlite3_step(pFetch) ){\n      const char *aRoot = sqlite3_column_blob(pFetch, 4);\n      int nRoot = sqlite3_column_bytes(pFetch, 4);\n      iOldStart = sqlite3_column_int64(pFetch, 1);\n      rc = fts3TruncateNode(aRoot, nRoot, &root, zTerm, nTerm, &iBlock);\n    }\n    rc2 = sqlite3_reset(pFetch);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  while( rc==SQLITE_OK && iBlock ){\n    char *aBlock = 0;\n    int nBlock = 0;\n    iNewStart = iBlock;\n\n    rc = sqlite3Fts3ReadBlock(p, iBlock, &aBlock, &nBlock, 0);\n    if( rc==SQLITE_OK ){\n      rc = fts3TruncateNode(aBlock, nBlock, &block, zTerm, nTerm, &iBlock);\n    }\n    if( rc==SQLITE_OK ){\n      rc = fts3WriteSegment(p, iNewStart, block.a, block.n);\n    }\n    sqlite3_free(aBlock);\n  }\n\n  /* Variable iNewStart now contains the first valid leaf node. */\n  if( rc==SQLITE_OK && iNewStart ){\n    sqlite3_stmt *pDel = 0;\n    rc = fts3SqlStmt(p, SQL_DELETE_SEGMENTS_RANGE, &pDel, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pDel, 1, iOldStart);\n      sqlite3_bind_int64(pDel, 2, iNewStart-1);\n      sqlite3_step(pDel);\n      rc = sqlite3_reset(pDel);\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    sqlite3_stmt *pChomp = 0;\n    rc = fts3SqlStmt(p, SQL_CHOMP_SEGDIR, &pChomp, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pChomp, 1, iNewStart);\n      sqlite3_bind_blob(pChomp, 2, root.a, root.n, SQLITE_STATIC);\n      sqlite3_bind_int64(pChomp, 3, iAbsLevel);\n      sqlite3_bind_int(pChomp, 4, iIdx);\n      sqlite3_step(pChomp);\n      rc = sqlite3_reset(pChomp);\n      sqlite3_bind_null(pChomp, 2);\n    }\n  }\n\n  sqlite3_free(root.a);\n  sqlite3_free(block.a);\n  return rc;\n}\n\n/*\n** This function is called after an incrmental-merge operation has run to\n** merge (or partially merge) two or more segments from absolute level\n** iAbsLevel.\n**\n** Each input segment is either removed from the db completely (if all of\n** its data was copied to the output segment by the incrmerge operation)\n** or modified in place so that it no longer contains those entries that\n** have been duplicated in the output segment.\n*/\nstatic int fts3IncrmergeChomp(\n  Fts3Table *p,                   /* FTS table handle */\n  sqlite3_int64 iAbsLevel,        /* Absolute level containing segments */\n  Fts3MultiSegReader *pCsr,       /* Chomp all segments opened by this cursor */\n  int *pnRem                      /* Number of segments not deleted */\n){\n  int i;\n  int nRem = 0;\n  int rc = SQLITE_OK;\n\n  for(i=pCsr->nSegment-1; i>=0 && rc==SQLITE_OK; i--){\n    Fts3SegReader *pSeg = 0;\n    int j;\n\n    /* Find the Fts3SegReader object with Fts3SegReader.iIdx==i. It is hiding\n    ** somewhere in the pCsr->apSegment[] array.  */\n    for(j=0; ALWAYS(j<pCsr->nSegment); j++){\n      pSeg = pCsr->apSegment[j];\n      if( pSeg->iIdx==i ) break;\n    }\n    assert( j<pCsr->nSegment && pSeg->iIdx==i );\n\n    if( pSeg->aNode==0 ){\n      /* Seg-reader is at EOF. Remove the entire input segment. */\n      rc = fts3DeleteSegment(p, pSeg);\n      if( rc==SQLITE_OK ){\n        rc = fts3RemoveSegdirEntry(p, iAbsLevel, pSeg->iIdx);\n      }\n      *pnRem = 0;\n    }else{\n      /* The incremental merge did not copy all the data from this\n      ** segment to the upper level. The segment is modified in place\n      ** so that it contains no keys smaller than zTerm/nTerm. */\n      const char *zTerm = pSeg->zTerm;\n      int nTerm = pSeg->nTerm;\n      rc = fts3TruncateSegment(p, iAbsLevel, pSeg->iIdx, zTerm, nTerm);\n      nRem++;\n    }\n  }\n\n  if( rc==SQLITE_OK && nRem!=pCsr->nSegment ){\n    rc = fts3RepackSegdirLevel(p, iAbsLevel);\n  }\n\n  *pnRem = nRem;\n  return rc;\n}\n\n/*\n** Store an incr-merge hint in the database.\n*/\nstatic int fts3IncrmergeHintStore(Fts3Table *p, Blob *pHint){\n  sqlite3_stmt *pReplace = 0;\n  int rc;                         /* Return code */\n\n  rc = fts3SqlStmt(p, SQL_REPLACE_STAT, &pReplace, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int(pReplace, 1, FTS_STAT_INCRMERGEHINT);\n    sqlite3_bind_blob(pReplace, 2, pHint->a, pHint->n, SQLITE_STATIC);\n    sqlite3_step(pReplace);\n    rc = sqlite3_reset(pReplace);\n    sqlite3_bind_null(pReplace, 2);\n  }\n\n  return rc;\n}\n\n/*\n** Load an incr-merge hint from the database. The incr-merge hint, if one\n** exists, is stored in the rowid==1 row of the %_stat table.\n**\n** If successful, populate blob *pHint with the value read from the %_stat\n** table and return SQLITE_OK. Otherwise, if an error occurs, return an\n** SQLite error code.\n*/\nstatic int fts3IncrmergeHintLoad(Fts3Table *p, Blob *pHint){\n  sqlite3_stmt *pSelect = 0;\n  int rc;\n\n  pHint->n = 0;\n  rc = fts3SqlStmt(p, SQL_SELECT_STAT, &pSelect, 0);\n  if( rc==SQLITE_OK ){\n    int rc2;\n    sqlite3_bind_int(pSelect, 1, FTS_STAT_INCRMERGEHINT);\n    if( SQLITE_ROW==sqlite3_step(pSelect) ){\n      const char *aHint = sqlite3_column_blob(pSelect, 0);\n      int nHint = sqlite3_column_bytes(pSelect, 0);\n      if( aHint ){\n        blobGrowBuffer(pHint, nHint, &rc);\n        if( rc==SQLITE_OK ){\n          if( ALWAYS(pHint->a!=0) ) memcpy(pHint->a, aHint, nHint);\n          pHint->n = nHint;\n        }\n      }\n    }\n    rc2 = sqlite3_reset(pSelect);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  return rc;\n}\n\n/*\n** If *pRc is not SQLITE_OK when this function is called, it is a no-op.\n** Otherwise, append an entry to the hint stored in blob *pHint. Each entry\n** consists of two varints, the absolute level number of the input segments\n** and the number of input segments.\n**\n** If successful, leave *pRc set to SQLITE_OK and return. If an error occurs,\n** set *pRc to an SQLite error code before returning.\n*/\nstatic void fts3IncrmergeHintPush(\n  Blob *pHint,                    /* Hint blob to append to */\n  i64 iAbsLevel,                  /* First varint to store in hint */\n  int nInput,                     /* Second varint to store in hint */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  blobGrowBuffer(pHint, pHint->n + 2*FTS3_VARINT_MAX, pRc);\n  if( *pRc==SQLITE_OK ){\n    pHint->n += sqlite3Fts3PutVarint(&pHint->a[pHint->n], iAbsLevel);\n    pHint->n += sqlite3Fts3PutVarint(&pHint->a[pHint->n], (i64)nInput);\n  }\n}\n\n/*\n** Read the last entry (most recently pushed) from the hint blob *pHint\n** and then remove the entry. Write the two values read to *piAbsLevel and\n** *pnInput before returning.\n**\n** If no error occurs, return SQLITE_OK. If the hint blob in *pHint does\n** not contain at least two valid varints, return SQLITE_CORRUPT_VTAB.\n*/\nstatic int fts3IncrmergeHintPop(Blob *pHint, i64 *piAbsLevel, int *pnInput){\n  const int nHint = pHint->n;\n  int i;\n\n  i = pHint->n-1;\n  if( (pHint->a[i] & 0x80) ) return FTS_CORRUPT_VTAB;\n  while( i>0 && (pHint->a[i-1] & 0x80) ) i--;\n  if( i==0 ) return FTS_CORRUPT_VTAB;\n  i--;\n  while( i>0 && (pHint->a[i-1] & 0x80) ) i--;\n\n  pHint->n = i;\n  i += sqlite3Fts3GetVarint(&pHint->a[i], piAbsLevel);\n  i += fts3GetVarint32(&pHint->a[i], pnInput);\n  assert( i<=nHint );\n  if( i!=nHint ) return FTS_CORRUPT_VTAB;\n\n  return SQLITE_OK;\n}\n\n\n/*\n** Attempt an incremental merge that writes nMerge leaf blocks.\n**\n** Incremental merges happen nMin segments at a time. The segments\n** to be merged are the nMin oldest segments (the ones with the smallest\n** values for the _segdir.idx field) in the highest level that contains\n** at least nMin segments. Multiple merges might occur in an attempt to\n** write the quota of nMerge leaf blocks.\n*/\nSQLITE_PRIVATE int sqlite3Fts3Incrmerge(Fts3Table *p, int nMerge, int nMin){\n  int rc;                         /* Return code */\n  int nRem = nMerge;              /* Number of leaf pages yet to  be written */\n  Fts3MultiSegReader *pCsr;       /* Cursor used to read input data */\n  Fts3SegFilter *pFilter;         /* Filter used with cursor pCsr */\n  IncrmergeWriter *pWriter;       /* Writer object */\n  int nSeg = 0;                   /* Number of input segments */\n  sqlite3_int64 iAbsLevel = 0;    /* Absolute level number to work on */\n  Blob hint = {0, 0, 0};          /* Hint read from %_stat table */\n  int bDirtyHint = 0;             /* True if blob 'hint' has been modified */\n\n  /* Allocate space for the cursor, filter and writer objects */\n  const int nAlloc = sizeof(*pCsr) + sizeof(*pFilter) + sizeof(*pWriter);\n  pWriter = (IncrmergeWriter *)sqlite3_malloc64(nAlloc);\n  if( !pWriter ) return SQLITE_NOMEM;\n  pFilter = (Fts3SegFilter *)&pWriter[1];\n  pCsr = (Fts3MultiSegReader *)&pFilter[1];\n\n  rc = fts3IncrmergeHintLoad(p, &hint);\n  while( rc==SQLITE_OK && nRem>0 ){\n    const i64 nMod = FTS3_SEGDIR_MAXLEVEL * p->nIndex;\n    sqlite3_stmt *pFindLevel = 0; /* SQL used to determine iAbsLevel */\n    int bUseHint = 0;             /* True if attempting to append */\n    int iIdx = 0;                 /* Largest idx in level (iAbsLevel+1) */\n\n    /* Search the %_segdir table for the absolute level with the smallest\n    ** relative level number that contains at least nMin segments, if any.\n    ** If one is found, set iAbsLevel to the absolute level number and\n    ** nSeg to nMin. If no level with at least nMin segments can be found,\n    ** set nSeg to -1.\n    */\n    rc = fts3SqlStmt(p, SQL_FIND_MERGE_LEVEL, &pFindLevel, 0);\n    sqlite3_bind_int(pFindLevel, 1, MAX(2, nMin));\n    if( sqlite3_step(pFindLevel)==SQLITE_ROW ){\n      iAbsLevel = sqlite3_column_int64(pFindLevel, 0);\n      nSeg = sqlite3_column_int(pFindLevel, 1);\n      assert( nSeg>=2 );\n    }else{\n      nSeg = -1;\n    }\n    rc = sqlite3_reset(pFindLevel);\n\n    /* If the hint read from the %_stat table is not empty, check if the\n    ** last entry in it specifies a relative level smaller than or equal\n    ** to the level identified by the block above (if any). If so, this\n    ** iteration of the loop will work on merging at the hinted level.\n    */\n    if( rc==SQLITE_OK && hint.n ){\n      int nHint = hint.n;\n      sqlite3_int64 iHintAbsLevel = 0;      /* Hint level */\n      int nHintSeg = 0;                     /* Hint number of segments */\n\n      rc = fts3IncrmergeHintPop(&hint, &iHintAbsLevel, &nHintSeg);\n      if( nSeg<0 || (iAbsLevel % nMod) >= (iHintAbsLevel % nMod) ){\n        /* Based on the scan in the block above, it is known that there\n        ** are no levels with a relative level smaller than that of\n        ** iAbsLevel with more than nSeg segments, or if nSeg is -1,\n        ** no levels with more than nMin segments. Use this to limit the\n        ** value of nHintSeg to avoid a large memory allocation in case the\n        ** merge-hint is corrupt*/\n        iAbsLevel = iHintAbsLevel;\n        nSeg = MIN(MAX(nMin,nSeg), nHintSeg);\n        bUseHint = 1;\n        bDirtyHint = 1;\n      }else{\n        /* This undoes the effect of the HintPop() above - so that no entry\n        ** is removed from the hint blob.  */\n        hint.n = nHint;\n      }\n    }\n\n    /* If nSeg is less that zero, then there is no level with at least\n    ** nMin segments and no hint in the %_stat table. No work to do.\n    ** Exit early in this case.  */\n    if( nSeg<=0 ) break;\n\n    assert( nMod<=0x7FFFFFFF );\n    if( iAbsLevel<0 || iAbsLevel>(nMod<<32) ){\n      rc = FTS_CORRUPT_VTAB;\n      break;\n    }\n\n    /* Open a cursor to iterate through the contents of the oldest nSeg\n    ** indexes of absolute level iAbsLevel. If this cursor is opened using\n    ** the 'hint' parameters, it is possible that there are less than nSeg\n    ** segments available in level iAbsLevel. In this case, no work is\n    ** done on iAbsLevel - fall through to the next iteration of the loop\n    ** to start work on some other level.  */\n    memset(pWriter, 0, nAlloc);\n    pFilter->flags = FTS3_SEGMENT_REQUIRE_POS;\n\n    if( rc==SQLITE_OK ){\n      rc = fts3IncrmergeOutputIdx(p, iAbsLevel, &iIdx);\n      assert( bUseHint==1 || bUseHint==0 );\n      if( iIdx==0 || (bUseHint && iIdx==1) ){\n        int bIgnore = 0;\n        rc = fts3SegmentIsMaxLevel(p, iAbsLevel+1, &bIgnore);\n        if( bIgnore ){\n          pFilter->flags |= FTS3_SEGMENT_IGNORE_EMPTY;\n        }\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = fts3IncrmergeCsr(p, iAbsLevel, nSeg, pCsr);\n    }\n    if( SQLITE_OK==rc && pCsr->nSegment==nSeg\n     && SQLITE_OK==(rc = sqlite3Fts3SegReaderStart(p, pCsr, pFilter))\n    ){\n      int bEmpty = 0;\n      rc = sqlite3Fts3SegReaderStep(p, pCsr);\n      if( rc==SQLITE_OK ){\n        bEmpty = 1;\n      }else if( rc!=SQLITE_ROW ){\n        sqlite3Fts3SegReaderFinish(pCsr);\n        break;\n      }\n      if( bUseHint && iIdx>0 ){\n        const char *zKey = pCsr->zTerm;\n        int nKey = pCsr->nTerm;\n        rc = fts3IncrmergeLoad(p, iAbsLevel, iIdx-1, zKey, nKey, pWriter);\n      }else{\n        rc = fts3IncrmergeWriter(p, iAbsLevel, iIdx, pCsr, pWriter);\n      }\n\n      if( rc==SQLITE_OK && pWriter->nLeafEst ){\n        fts3LogMerge(nSeg, iAbsLevel);\n        if( bEmpty==0 ){\n          do {\n            rc = fts3IncrmergeAppend(p, pWriter, pCsr);\n            if( rc==SQLITE_OK ) rc = sqlite3Fts3SegReaderStep(p, pCsr);\n            if( pWriter->nWork>=nRem && rc==SQLITE_ROW ) rc = SQLITE_OK;\n          }while( rc==SQLITE_ROW );\n        }\n\n        /* Update or delete the input segments */\n        if( rc==SQLITE_OK ){\n          nRem -= (1 + pWriter->nWork);\n          rc = fts3IncrmergeChomp(p, iAbsLevel, pCsr, &nSeg);\n          if( nSeg!=0 ){\n            bDirtyHint = 1;\n            fts3IncrmergeHintPush(&hint, iAbsLevel, nSeg, &rc);\n          }\n        }\n      }\n\n      if( nSeg!=0 ){\n        pWriter->nLeafData = pWriter->nLeafData * -1;\n      }\n      fts3IncrmergeRelease(p, pWriter, &rc);\n      if( nSeg==0 && pWriter->bNoLeafData==0 ){\n        fts3PromoteSegments(p, iAbsLevel+1, pWriter->nLeafData);\n      }\n    }\n\n    sqlite3Fts3SegReaderFinish(pCsr);\n  }\n\n  /* Write the hint values into the %_stat table for the next incr-merger */\n  if( bDirtyHint && rc==SQLITE_OK ){\n    rc = fts3IncrmergeHintStore(p, &hint);\n  }\n\n  sqlite3_free(pWriter);\n  sqlite3_free(hint.a);\n  return rc;\n}\n\n/*\n** Convert the text beginning at *pz into an integer and return\n** its value.  Advance *pz to point to the first character past\n** the integer.\n**\n** This function used for parameters to merge= and incrmerge=\n** commands.\n*/\nstatic int fts3Getint(const char **pz){\n  const char *z = *pz;\n  int i = 0;\n  while( (*z)>='0' && (*z)<='9' && i<214748363 ) i = 10*i + *(z++) - '0';\n  *pz = z;\n  return i;\n}\n\n/*\n** Process statements of the form:\n**\n**    INSERT INTO table(table) VALUES('merge=A,B');\n**\n** A and B are integers that decode to be the number of leaf pages\n** written for the merge, and the minimum number of segments on a level\n** before it will be selected for a merge, respectively.\n*/\nstatic int fts3DoIncrmerge(\n  Fts3Table *p,                   /* FTS3 table handle */\n  const char *zParam              /* Nul-terminated string containing \"A,B\" */\n){\n  int rc;\n  int nMin = (MergeCount(p) / 2);\n  int nMerge = 0;\n  const char *z = zParam;\n\n  /* Read the first integer value */\n  nMerge = fts3Getint(&z);\n\n  /* If the first integer value is followed by a ',',  read the second\n  ** integer value. */\n  if( z[0]==',' && z[1]!='\\0' ){\n    z++;\n    nMin = fts3Getint(&z);\n  }\n\n  if( z[0]!='\\0' || nMin<2 ){\n    rc = SQLITE_ERROR;\n  }else{\n    rc = SQLITE_OK;\n    if( !p->bHasStat ){\n      assert( p->bFts4==0 );\n      sqlite3Fts3CreateStatTable(&rc, p);\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts3Incrmerge(p, nMerge, nMin);\n    }\n    sqlite3Fts3SegmentsClose(p);\n  }\n  return rc;\n}\n\n/*\n** Process statements of the form:\n**\n**    INSERT INTO table(table) VALUES('automerge=X');\n**\n** where X is an integer.  X==0 means to turn automerge off.  X!=0 means\n** turn it on.  The setting is persistent.\n*/\nstatic int fts3DoAutoincrmerge(\n  Fts3Table *p,                   /* FTS3 table handle */\n  const char *zParam              /* Nul-terminated string containing boolean */\n){\n  int rc = SQLITE_OK;\n  sqlite3_stmt *pStmt = 0;\n  p->nAutoincrmerge = fts3Getint(&zParam);\n  if( p->nAutoincrmerge==1 || p->nAutoincrmerge>MergeCount(p) ){\n    p->nAutoincrmerge = 8;\n  }\n  if( !p->bHasStat ){\n    assert( p->bFts4==0 );\n    sqlite3Fts3CreateStatTable(&rc, p);\n    if( rc ) return rc;\n  }\n  rc = fts3SqlStmt(p, SQL_REPLACE_STAT, &pStmt, 0);\n  if( rc ) return rc;\n  sqlite3_bind_int(pStmt, 1, FTS_STAT_AUTOINCRMERGE);\n  sqlite3_bind_int(pStmt, 2, p->nAutoincrmerge);\n  sqlite3_step(pStmt);\n  rc = sqlite3_reset(pStmt);\n  return rc;\n}\n\n/*\n** Return a 64-bit checksum for the FTS index entry specified by the\n** arguments to this function.\n*/\nstatic u64 fts3ChecksumEntry(\n  const char *zTerm,              /* Pointer to buffer containing term */\n  int nTerm,                      /* Size of zTerm in bytes */\n  int iLangid,                    /* Language id for current row */\n  int iIndex,                     /* Index (0..Fts3Table.nIndex-1) */\n  i64 iDocid,                     /* Docid for current row. */\n  int iCol,                       /* Column number */\n  int iPos                        /* Position */\n){\n  int i;\n  u64 ret = (u64)iDocid;\n\n  ret += (ret<<3) + iLangid;\n  ret += (ret<<3) + iIndex;\n  ret += (ret<<3) + iCol;\n  ret += (ret<<3) + iPos;\n  for(i=0; i<nTerm; i++) ret += (ret<<3) + zTerm[i];\n\n  return ret;\n}\n\n/*\n** Return a checksum of all entries in the FTS index that correspond to\n** language id iLangid. The checksum is calculated by XORing the checksums\n** of each individual entry (see fts3ChecksumEntry()) together.\n**\n** If successful, the checksum value is returned and *pRc set to SQLITE_OK.\n** Otherwise, if an error occurs, *pRc is set to an SQLite error code. The\n** return value is undefined in this case.\n*/\nstatic u64 fts3ChecksumIndex(\n  Fts3Table *p,                   /* FTS3 table handle */\n  int iLangid,                    /* Language id to return cksum for */\n  int iIndex,                     /* Index to cksum (0..p->nIndex-1) */\n  int *pRc                        /* OUT: Return code */\n){\n  Fts3SegFilter filter;\n  Fts3MultiSegReader csr;\n  int rc;\n  u64 cksum = 0;\n\n  if( *pRc ) return 0;\n\n  memset(&filter, 0, sizeof(filter));\n  memset(&csr, 0, sizeof(csr));\n  filter.flags =  FTS3_SEGMENT_REQUIRE_POS|FTS3_SEGMENT_IGNORE_EMPTY;\n  filter.flags |= FTS3_SEGMENT_SCAN;\n\n  rc = sqlite3Fts3SegReaderCursor(\n      p, iLangid, iIndex, FTS3_SEGCURSOR_ALL, 0, 0, 0, 1,&csr\n  );\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts3SegReaderStart(p, &csr, &filter);\n  }\n\n  if( rc==SQLITE_OK ){\n    while( SQLITE_ROW==(rc = sqlite3Fts3SegReaderStep(p, &csr)) ){\n      char *pCsr = csr.aDoclist;\n      char *pEnd = &pCsr[csr.nDoclist];\n\n      i64 iDocid = 0;\n      i64 iCol = 0;\n      u64 iPos = 0;\n\n      pCsr += sqlite3Fts3GetVarint(pCsr, &iDocid);\n      while( pCsr<pEnd ){\n        u64 iVal = 0;\n        pCsr += sqlite3Fts3GetVarintU(pCsr, &iVal);\n        if( pCsr<pEnd ){\n          if( iVal==0 || iVal==1 ){\n            iCol = 0;\n            iPos = 0;\n            if( iVal ){\n              pCsr += sqlite3Fts3GetVarint(pCsr, &iCol);\n            }else{\n              pCsr += sqlite3Fts3GetVarintU(pCsr, &iVal);\n              if( p->bDescIdx ){\n                iDocid = (i64)((u64)iDocid - iVal);\n              }else{\n                iDocid = (i64)((u64)iDocid + iVal);\n              }\n            }\n          }else{\n            iPos += (iVal - 2);\n            cksum = cksum ^ fts3ChecksumEntry(\n                csr.zTerm, csr.nTerm, iLangid, iIndex, iDocid,\n                (int)iCol, (int)iPos\n            );\n          }\n        }\n      }\n    }\n  }\n  sqlite3Fts3SegReaderFinish(&csr);\n\n  *pRc = rc;\n  return cksum;\n}\n\n/*\n** Check if the contents of the FTS index match the current contents of the\n** content table. If no error occurs and the contents do match, set *pbOk\n** to true and return SQLITE_OK. Or if the contents do not match, set *pbOk\n** to false before returning.\n**\n** If an error occurs (e.g. an OOM or IO error), return an SQLite error\n** code. The final value of *pbOk is undefined in this case.\n*/\nSQLITE_PRIVATE int sqlite3Fts3IntegrityCheck(Fts3Table *p, int *pbOk){\n  int rc = SQLITE_OK;             /* Return code */\n  u64 cksum1 = 0;                 /* Checksum based on FTS index contents */\n  u64 cksum2 = 0;                 /* Checksum based on %_content contents */\n  sqlite3_stmt *pAllLangid = 0;   /* Statement to return all language-ids */\n\n  /* This block calculates the checksum according to the FTS index. */\n  rc = fts3SqlStmt(p, SQL_SELECT_ALL_LANGID, &pAllLangid, 0);\n  if( rc==SQLITE_OK ){\n    int rc2;\n    sqlite3_bind_int(pAllLangid, 1, p->iPrevLangid);\n    sqlite3_bind_int(pAllLangid, 2, p->nIndex);\n    while( rc==SQLITE_OK && sqlite3_step(pAllLangid)==SQLITE_ROW ){\n      int iLangid = sqlite3_column_int(pAllLangid, 0);\n      int i;\n      for(i=0; i<p->nIndex; i++){\n        cksum1 = cksum1 ^ fts3ChecksumIndex(p, iLangid, i, &rc);\n      }\n    }\n    rc2 = sqlite3_reset(pAllLangid);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  /* This block calculates the checksum according to the %_content table */\n  if( rc==SQLITE_OK ){\n    sqlite3_tokenizer_module const *pModule = p->pTokenizer->pModule;\n    sqlite3_stmt *pStmt = 0;\n    char *zSql;\n\n    zSql = sqlite3_mprintf(\"SELECT %s\" , p->zReadExprlist);\n    if( !zSql ){\n      rc = SQLITE_NOMEM;\n    }else{\n      rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);\n      sqlite3_free(zSql);\n    }\n\n    while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n      i64 iDocid = sqlite3_column_int64(pStmt, 0);\n      int iLang = langidFromSelect(p, pStmt);\n      int iCol;\n\n      for(iCol=0; rc==SQLITE_OK && iCol<p->nColumn; iCol++){\n        if( p->abNotindexed[iCol]==0 ){\n          const char *zText = (const char *)sqlite3_column_text(pStmt, iCol+1);\n          sqlite3_tokenizer_cursor *pT = 0;\n\n          rc = sqlite3Fts3OpenTokenizer(p->pTokenizer, iLang, zText, -1, &pT);\n          while( rc==SQLITE_OK ){\n            char const *zToken;       /* Buffer containing token */\n            int nToken = 0;           /* Number of bytes in token */\n            int iDum1 = 0, iDum2 = 0; /* Dummy variables */\n            int iPos = 0;             /* Position of token in zText */\n\n            rc = pModule->xNext(pT, &zToken, &nToken, &iDum1, &iDum2, &iPos);\n            if( rc==SQLITE_OK ){\n              int i;\n              cksum2 = cksum2 ^ fts3ChecksumEntry(\n                  zToken, nToken, iLang, 0, iDocid, iCol, iPos\n              );\n              for(i=1; i<p->nIndex; i++){\n                if( p->aIndex[i].nPrefix<=nToken ){\n                  cksum2 = cksum2 ^ fts3ChecksumEntry(\n                      zToken, p->aIndex[i].nPrefix, iLang, i, iDocid, iCol, iPos\n                  );\n                }\n              }\n            }\n          }\n          if( pT ) pModule->xClose(pT);\n          if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n        }\n      }\n    }\n\n    sqlite3_finalize(pStmt);\n  }\n\n  if( rc==SQLITE_CORRUPT_VTAB ){\n    rc = SQLITE_OK;\n    *pbOk = 0;\n  }else{\n    *pbOk = (rc==SQLITE_OK && cksum1==cksum2);\n  }\n  return rc;\n}\n\n/*\n** Run the integrity-check. If no error occurs and the current contents of\n** the FTS index are correct, return SQLITE_OK. Or, if the contents of the\n** FTS index are incorrect, return SQLITE_CORRUPT_VTAB.\n**\n** Or, if an error (e.g. an OOM or IO error) occurs, return an SQLite\n** error code.\n**\n** The integrity-check works as follows. For each token and indexed token\n** prefix in the document set, a 64-bit checksum is calculated (by code\n** in fts3ChecksumEntry()) based on the following:\n**\n**     + The index number (0 for the main index, 1 for the first prefix\n**       index etc.),\n**     + The token (or token prefix) text itself,\n**     + The language-id of the row it appears in,\n**     + The docid of the row it appears in,\n**     + The column it appears in, and\n**     + The tokens position within that column.\n**\n** The checksums for all entries in the index are XORed together to create\n** a single checksum for the entire index.\n**\n** The integrity-check code calculates the same checksum in two ways:\n**\n**     1. By scanning the contents of the FTS index, and\n**     2. By scanning and tokenizing the content table.\n**\n** If the two checksums are identical, the integrity-check is deemed to have\n** passed.\n*/\nstatic int fts3DoIntegrityCheck(\n  Fts3Table *p                    /* FTS3 table handle */\n){\n  int rc;\n  int bOk = 0;\n  rc = sqlite3Fts3IntegrityCheck(p, &bOk);\n  if( rc==SQLITE_OK && bOk==0 ) rc = FTS_CORRUPT_VTAB;\n  return rc;\n}\n\n/*\n** Handle a 'special' INSERT of the form:\n**\n**   \"INSERT INTO tbl(tbl) VALUES(<expr>)\"\n**\n** Argument pVal contains the result of <expr>. Currently the only\n** meaningful value to insert is the text 'optimize'.\n*/\nstatic int fts3SpecialInsert(Fts3Table *p, sqlite3_value *pVal){\n  int rc = SQLITE_ERROR;           /* Return Code */\n  const char *zVal = (const char *)sqlite3_value_text(pVal);\n  int nVal = sqlite3_value_bytes(pVal);\n\n  if( !zVal ){\n    return SQLITE_NOMEM;\n  }else if( nVal==8 && 0==sqlite3_strnicmp(zVal, \"optimize\", 8) ){\n    rc = fts3DoOptimize(p, 0);\n  }else if( nVal==7 && 0==sqlite3_strnicmp(zVal, \"rebuild\", 7) ){\n    rc = fts3DoRebuild(p);\n  }else if( nVal==15 && 0==sqlite3_strnicmp(zVal, \"integrity-check\", 15) ){\n    rc = fts3DoIntegrityCheck(p);\n  }else if( nVal>6 && 0==sqlite3_strnicmp(zVal, \"merge=\", 6) ){\n    rc = fts3DoIncrmerge(p, &zVal[6]);\n  }else if( nVal>10 && 0==sqlite3_strnicmp(zVal, \"automerge=\", 10) ){\n    rc = fts3DoAutoincrmerge(p, &zVal[10]);\n  }else if( nVal==5 && 0==sqlite3_strnicmp(zVal, \"flush\", 5) ){\n    rc = sqlite3Fts3PendingTermsFlush(p);\n  }\n#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)\n  else{\n    int v;\n    if( nVal>9 && 0==sqlite3_strnicmp(zVal, \"nodesize=\", 9) ){\n      v = atoi(&zVal[9]);\n      if( v>=24 && v<=p->nPgsz-35 ) p->nNodeSize = v;\n      rc = SQLITE_OK;\n    }else if( nVal>11 && 0==sqlite3_strnicmp(zVal, \"maxpending=\", 9) ){\n      v = atoi(&zVal[11]);\n      if( v>=64 && v<=FTS3_MAX_PENDING_DATA ) p->nMaxPendingData = v;\n      rc = SQLITE_OK;\n    }else if( nVal>21 && 0==sqlite3_strnicmp(zVal,\"test-no-incr-doclist=\",21) ){\n      p->bNoIncrDoclist = atoi(&zVal[21]);\n      rc = SQLITE_OK;\n    }else if( nVal>11 && 0==sqlite3_strnicmp(zVal,\"mergecount=\",11) ){\n      v = atoi(&zVal[11]);\n      if( v>=4 && v<=FTS3_MERGE_COUNT && (v&1)==0 ) p->nMergeCount = v;\n      rc = SQLITE_OK;\n    }\n  }\n#endif\n  return rc;\n}\n\n#ifndef SQLITE_DISABLE_FTS4_DEFERRED\n/*\n** Delete all cached deferred doclists. Deferred doclists are cached\n** (allocated) by the sqlite3Fts3CacheDeferredDoclists() function.\n*/\nSQLITE_PRIVATE void sqlite3Fts3FreeDeferredDoclists(Fts3Cursor *pCsr){\n  Fts3DeferredToken *pDef;\n  for(pDef=pCsr->pDeferred; pDef; pDef=pDef->pNext){\n    fts3PendingListDelete(pDef->pList);\n    pDef->pList = 0;\n  }\n}\n\n/*\n** Free all entries in the pCsr->pDeffered list. Entries are added to\n** this list using sqlite3Fts3DeferToken().\n*/\nSQLITE_PRIVATE void sqlite3Fts3FreeDeferredTokens(Fts3Cursor *pCsr){\n  Fts3DeferredToken *pDef;\n  Fts3DeferredToken *pNext;\n  for(pDef=pCsr->pDeferred; pDef; pDef=pNext){\n    pNext = pDef->pNext;\n    fts3PendingListDelete(pDef->pList);\n    sqlite3_free(pDef);\n  }\n  pCsr->pDeferred = 0;\n}\n\n/*\n** Generate deferred-doclists for all tokens in the pCsr->pDeferred list\n** based on the row that pCsr currently points to.\n**\n** A deferred-doclist is like any other doclist with position information\n** included, except that it only contains entries for a single row of the\n** table, not for all rows.\n*/\nSQLITE_PRIVATE int sqlite3Fts3CacheDeferredDoclists(Fts3Cursor *pCsr){\n  int rc = SQLITE_OK;             /* Return code */\n  if( pCsr->pDeferred ){\n    int i;                        /* Used to iterate through table columns */\n    sqlite3_int64 iDocid;         /* Docid of the row pCsr points to */\n    Fts3DeferredToken *pDef;      /* Used to iterate through deferred tokens */\n\n    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;\n    sqlite3_tokenizer *pT = p->pTokenizer;\n    sqlite3_tokenizer_module const *pModule = pT->pModule;\n\n    assert( pCsr->isRequireSeek==0 );\n    iDocid = sqlite3_column_int64(pCsr->pStmt, 0);\n\n    for(i=0; i<p->nColumn && rc==SQLITE_OK; i++){\n      if( p->abNotindexed[i]==0 ){\n        const char *zText = (const char *)sqlite3_column_text(pCsr->pStmt, i+1);\n        sqlite3_tokenizer_cursor *pTC = 0;\n\n        rc = sqlite3Fts3OpenTokenizer(pT, pCsr->iLangid, zText, -1, &pTC);\n        while( rc==SQLITE_OK ){\n          char const *zToken;       /* Buffer containing token */\n          int nToken = 0;           /* Number of bytes in token */\n          int iDum1 = 0, iDum2 = 0; /* Dummy variables */\n          int iPos = 0;             /* Position of token in zText */\n\n          rc = pModule->xNext(pTC, &zToken, &nToken, &iDum1, &iDum2, &iPos);\n          for(pDef=pCsr->pDeferred; pDef && rc==SQLITE_OK; pDef=pDef->pNext){\n            Fts3PhraseToken *pPT = pDef->pToken;\n            if( (pDef->iCol>=p->nColumn || pDef->iCol==i)\n                && (pPT->bFirst==0 || iPos==0)\n                && (pPT->n==nToken || (pPT->isPrefix && pPT->n<nToken))\n                && (0==memcmp(zToken, pPT->z, pPT->n))\n              ){\n              fts3PendingListAppend(&pDef->pList, iDocid, i, iPos, &rc);\n            }\n          }\n        }\n        if( pTC ) pModule->xClose(pTC);\n        if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n      }\n    }\n\n    for(pDef=pCsr->pDeferred; pDef && rc==SQLITE_OK; pDef=pDef->pNext){\n      if( pDef->pList ){\n        rc = fts3PendingListAppendVarint(&pDef->pList, 0);\n      }\n    }\n  }\n\n  return rc;\n}\n\nSQLITE_PRIVATE int sqlite3Fts3DeferredTokenList(\n  Fts3DeferredToken *p,\n  char **ppData,\n  int *pnData\n){\n  char *pRet;\n  int nSkip;\n  sqlite3_int64 dummy;\n\n  *ppData = 0;\n  *pnData = 0;\n\n  if( p->pList==0 ){\n    return SQLITE_OK;\n  }\n\n  pRet = (char *)sqlite3_malloc64(p->pList->nData);\n  if( !pRet ) return SQLITE_NOMEM;\n\n  nSkip = sqlite3Fts3GetVarint(p->pList->aData, &dummy);\n  *pnData = p->pList->nData - nSkip;\n  *ppData = pRet;\n\n  memcpy(pRet, &p->pList->aData[nSkip], *pnData);\n  return SQLITE_OK;\n}\n\n/*\n** Add an entry for token pToken to the pCsr->pDeferred list.\n*/\nSQLITE_PRIVATE int sqlite3Fts3DeferToken(\n  Fts3Cursor *pCsr,               /* Fts3 table cursor */\n  Fts3PhraseToken *pToken,        /* Token to defer */\n  int iCol                        /* Column that token must appear in (or -1) */\n){\n  Fts3DeferredToken *pDeferred;\n  pDeferred = sqlite3_malloc64(sizeof(*pDeferred));\n  if( !pDeferred ){\n    return SQLITE_NOMEM;\n  }\n  memset(pDeferred, 0, sizeof(*pDeferred));\n  pDeferred->pToken = pToken;\n  pDeferred->pNext = pCsr->pDeferred;\n  pDeferred->iCol = iCol;\n  pCsr->pDeferred = pDeferred;\n\n  assert( pToken->pDeferred==0 );\n  pToken->pDeferred = pDeferred;\n\n  return SQLITE_OK;\n}\n#endif\n\n/*\n** SQLite value pRowid contains the rowid of a row that may or may not be\n** present in the FTS3 table. If it is, delete it and adjust the contents\n** of subsidiary data structures accordingly.\n*/\nstatic int fts3DeleteByRowid(\n  Fts3Table *p,\n  sqlite3_value *pRowid,\n  int *pnChng,                    /* IN/OUT: Decrement if row is deleted */\n  u32 *aSzDel\n){\n  int rc = SQLITE_OK;             /* Return code */\n  int bFound = 0;                 /* True if *pRowid really is in the table */\n\n  fts3DeleteTerms(&rc, p, pRowid, aSzDel, &bFound);\n  if( bFound && rc==SQLITE_OK ){\n    int isEmpty = 0;              /* Deleting *pRowid leaves the table empty */\n    rc = fts3IsEmpty(p, pRowid, &isEmpty);\n    if( rc==SQLITE_OK ){\n      if( isEmpty ){\n        /* Deleting this row means the whole table is empty. In this case\n        ** delete the contents of all three tables and throw away any\n        ** data in the pendingTerms hash table.  */\n        rc = fts3DeleteAll(p, 1);\n        *pnChng = 0;\n        memset(aSzDel, 0, sizeof(u32) * (p->nColumn+1) * 2);\n      }else{\n        *pnChng = *pnChng - 1;\n        if( p->zContentTbl==0 ){\n          fts3SqlExec(&rc, p, SQL_DELETE_CONTENT, &pRowid);\n        }\n        if( p->bHasDocsize ){\n          fts3SqlExec(&rc, p, SQL_DELETE_DOCSIZE, &pRowid);\n        }\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function does the work for the xUpdate method of FTS3 virtual\n** tables. The schema of the virtual table being:\n**\n**     CREATE TABLE <table name>(\n**       <user columns>,\n**       <table name> HIDDEN,\n**       docid HIDDEN,\n**       <langid> HIDDEN\n**     );\n**\n**\n*/\nSQLITE_PRIVATE int sqlite3Fts3UpdateMethod(\n  sqlite3_vtab *pVtab,            /* FTS3 vtab object */\n  int nArg,                       /* Size of argument array */\n  sqlite3_value **apVal,          /* Array of arguments */\n  sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */\n){\n  Fts3Table *p = (Fts3Table *)pVtab;\n  int rc = SQLITE_OK;             /* Return Code */\n  u32 *aSzIns = 0;                /* Sizes of inserted documents */\n  u32 *aSzDel = 0;                /* Sizes of deleted documents */\n  int nChng = 0;                  /* Net change in number of documents */\n  int bInsertDone = 0;\n\n  /* At this point it must be known if the %_stat table exists or not.\n  ** So bHasStat may not be 2.  */\n  assert( p->bHasStat==0 || p->bHasStat==1 );\n\n  assert( p->pSegments==0 );\n  assert(\n      nArg==1                     /* DELETE operations */\n   || nArg==(2 + p->nColumn + 3)  /* INSERT or UPDATE operations */\n  );\n\n  /* Check for a \"special\" INSERT operation. One of the form:\n  **\n  **   INSERT INTO xyz(xyz) VALUES('command');\n  */\n  if( nArg>1\n   && sqlite3_value_type(apVal[0])==SQLITE_NULL\n   && sqlite3_value_type(apVal[p->nColumn+2])!=SQLITE_NULL\n  ){\n    rc = fts3SpecialInsert(p, apVal[p->nColumn+2]);\n    goto update_out;\n  }\n\n  if( nArg>1 && sqlite3_value_int(apVal[2 + p->nColumn + 2])<0 ){\n    rc = SQLITE_CONSTRAINT;\n    goto update_out;\n  }\n\n  /* Allocate space to hold the change in document sizes */\n  aSzDel = sqlite3_malloc64(sizeof(aSzDel[0])*((sqlite3_int64)p->nColumn+1)*2);\n  if( aSzDel==0 ){\n    rc = SQLITE_NOMEM;\n    goto update_out;\n  }\n  aSzIns = &aSzDel[p->nColumn+1];\n  memset(aSzDel, 0, sizeof(aSzDel[0])*(p->nColumn+1)*2);\n\n  rc = fts3Writelock(p);\n  if( rc!=SQLITE_OK ) goto update_out;\n\n  /* If this is an INSERT operation, or an UPDATE that modifies the rowid\n  ** value, then this operation requires constraint handling.\n  **\n  ** If the on-conflict mode is REPLACE, this means that the existing row\n  ** should be deleted from the database before inserting the new row. Or,\n  ** if the on-conflict mode is other than REPLACE, then this method must\n  ** detect the conflict and return SQLITE_CONSTRAINT before beginning to\n  ** modify the database file.\n  */\n  if( nArg>1 && p->zContentTbl==0 ){\n    /* Find the value object that holds the new rowid value. */\n    sqlite3_value *pNewRowid = apVal[3+p->nColumn];\n    if( sqlite3_value_type(pNewRowid)==SQLITE_NULL ){\n      pNewRowid = apVal[1];\n    }\n\n    if( sqlite3_value_type(pNewRowid)!=SQLITE_NULL && (\n        sqlite3_value_type(apVal[0])==SQLITE_NULL\n     || sqlite3_value_int64(apVal[0])!=sqlite3_value_int64(pNewRowid)\n    )){\n      /* The new rowid is not NULL (in this case the rowid will be\n      ** automatically assigned and there is no chance of a conflict), and\n      ** the statement is either an INSERT or an UPDATE that modifies the\n      ** rowid column. So if the conflict mode is REPLACE, then delete any\n      ** existing row with rowid=pNewRowid.\n      **\n      ** Or, if the conflict mode is not REPLACE, insert the new record into\n      ** the %_content table. If we hit the duplicate rowid constraint (or any\n      ** other error) while doing so, return immediately.\n      **\n      ** This branch may also run if pNewRowid contains a value that cannot\n      ** be losslessly converted to an integer. In this case, the eventual\n      ** call to fts3InsertData() (either just below or further on in this\n      ** function) will return SQLITE_MISMATCH. If fts3DeleteByRowid is\n      ** invoked, it will delete zero rows (since no row will have\n      ** docid=$pNewRowid if $pNewRowid is not an integer value).\n      */\n      if( sqlite3_vtab_on_conflict(p->db)==SQLITE_REPLACE ){\n        rc = fts3DeleteByRowid(p, pNewRowid, &nChng, aSzDel);\n      }else{\n        rc = fts3InsertData(p, apVal, pRowid);\n        bInsertDone = 1;\n      }\n    }\n  }\n  if( rc!=SQLITE_OK ){\n    goto update_out;\n  }\n\n  /* If this is a DELETE or UPDATE operation, remove the old record. */\n  if( sqlite3_value_type(apVal[0])!=SQLITE_NULL ){\n    assert( sqlite3_value_type(apVal[0])==SQLITE_INTEGER );\n    rc = fts3DeleteByRowid(p, apVal[0], &nChng, aSzDel);\n  }\n\n  /* If this is an INSERT or UPDATE operation, insert the new record. */\n  if( nArg>1 && rc==SQLITE_OK ){\n    int iLangid = sqlite3_value_int(apVal[2 + p->nColumn + 2]);\n    if( bInsertDone==0 ){\n      rc = fts3InsertData(p, apVal, pRowid);\n      if( rc==SQLITE_CONSTRAINT && p->zContentTbl==0 ){\n        rc = FTS_CORRUPT_VTAB;\n      }\n    }\n    if( rc==SQLITE_OK ){\n      rc = fts3PendingTermsDocid(p, 0, iLangid, *pRowid);\n    }\n    if( rc==SQLITE_OK ){\n      assert( p->iPrevDocid==*pRowid );\n      rc = fts3InsertTerms(p, iLangid, apVal, aSzIns);\n    }\n    if( p->bHasDocsize ){\n      fts3InsertDocsize(&rc, p, aSzIns);\n    }\n    nChng++;\n  }\n\n  if( p->bFts4 ){\n    fts3UpdateDocTotals(&rc, p, aSzIns, aSzDel, nChng);\n  }\n\n update_out:\n  sqlite3_free(aSzDel);\n  sqlite3Fts3SegmentsClose(p);\n  return rc;\n}\n\n/*\n** Flush any data in the pending-terms hash table to disk. If successful,\n** merge all segments in the database (including the new segment, if\n** there was any data to flush) into a single segment.\n*/\nSQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){\n  int rc;\n  rc = sqlite3_exec(p->db, \"SAVEPOINT fts3\", 0, 0, 0);\n  if( rc==SQLITE_OK ){\n    rc = fts3DoOptimize(p, 1);\n    if( rc==SQLITE_OK || rc==SQLITE_DONE ){\n      int rc2 = sqlite3_exec(p->db, \"RELEASE fts3\", 0, 0, 0);\n      if( rc2!=SQLITE_OK ) rc = rc2;\n    }else{\n      sqlite3_exec(p->db, \"ROLLBACK TO fts3\", 0, 0, 0);\n      sqlite3_exec(p->db, \"RELEASE fts3\", 0, 0, 0);\n    }\n  }\n  sqlite3Fts3SegmentsClose(p);\n  return rc;\n}\n\n#endif\n\n/************** End of fts3_write.c ******************************************/\n/************** Begin file fts3_snippet.c ************************************/\n/*\n** 2009 Oct 23\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <string.h> */\n/* #include <assert.h> */\n\n/*\n** Characters that may appear in the second argument to matchinfo().\n*/\n#define FTS3_MATCHINFO_NPHRASE   'p'        /* 1 value */\n#define FTS3_MATCHINFO_NCOL      'c'        /* 1 value */\n#define FTS3_MATCHINFO_NDOC      'n'        /* 1 value */\n#define FTS3_MATCHINFO_AVGLENGTH 'a'        /* nCol values */\n#define FTS3_MATCHINFO_LENGTH    'l'        /* nCol values */\n#define FTS3_MATCHINFO_LCS       's'        /* nCol values */\n#define FTS3_MATCHINFO_HITS      'x'        /* 3*nCol*nPhrase values */\n#define FTS3_MATCHINFO_LHITS     'y'        /* nCol*nPhrase values */\n#define FTS3_MATCHINFO_LHITS_BM  'b'        /* nCol*nPhrase values */\n\n/*\n** The default value for the second argument to matchinfo().\n*/\n#define FTS3_MATCHINFO_DEFAULT   \"pcx\"\n\n\n/*\n** Used as an sqlite3Fts3ExprIterate() context when loading phrase doclists to\n** Fts3Expr.aDoclist[]/nDoclist.\n*/\ntypedef struct LoadDoclistCtx LoadDoclistCtx;\nstruct LoadDoclistCtx {\n  Fts3Cursor *pCsr;               /* FTS3 Cursor */\n  int nPhrase;                    /* Number of phrases seen so far */\n  int nToken;                     /* Number of tokens seen so far */\n};\n\n/*\n** The following types are used as part of the implementation of the\n** fts3BestSnippet() routine.\n*/\ntypedef struct SnippetIter SnippetIter;\ntypedef struct SnippetPhrase SnippetPhrase;\ntypedef struct SnippetFragment SnippetFragment;\n\nstruct SnippetIter {\n  Fts3Cursor *pCsr;               /* Cursor snippet is being generated from */\n  int iCol;                       /* Extract snippet from this column */\n  int nSnippet;                   /* Requested snippet length (in tokens) */\n  int nPhrase;                    /* Number of phrases in query */\n  SnippetPhrase *aPhrase;         /* Array of size nPhrase */\n  int iCurrent;                   /* First token of current snippet */\n};\n\nstruct SnippetPhrase {\n  int nToken;                     /* Number of tokens in phrase */\n  char *pList;                    /* Pointer to start of phrase position list */\n  i64 iHead;                      /* Next value in position list */\n  char *pHead;                    /* Position list data following iHead */\n  i64 iTail;                      /* Next value in trailing position list */\n  char *pTail;                    /* Position list data following iTail */\n};\n\nstruct SnippetFragment {\n  int iCol;                       /* Column snippet is extracted from */\n  int iPos;                       /* Index of first token in snippet */\n  u64 covered;                    /* Mask of query phrases covered */\n  u64 hlmask;                     /* Mask of snippet terms to highlight */\n};\n\n/*\n** This type is used as an sqlite3Fts3ExprIterate() context object while\n** accumulating the data returned by the matchinfo() function.\n*/\ntypedef struct MatchInfo MatchInfo;\nstruct MatchInfo {\n  Fts3Cursor *pCursor;            /* FTS3 Cursor */\n  int nCol;                       /* Number of columns in table */\n  int nPhrase;                    /* Number of matchable phrases in query */\n  sqlite3_int64 nDoc;             /* Number of docs in database */\n  char flag;\n  u32 *aMatchinfo;                /* Pre-allocated buffer */\n};\n\n/*\n** An instance of this structure is used to manage a pair of buffers, each\n** (nElem * sizeof(u32)) bytes in size. See the MatchinfoBuffer code below\n** for details.\n*/\nstruct MatchinfoBuffer {\n  u8 aRef[3];\n  int nElem;\n  int bGlobal;                    /* Set if global data is loaded */\n  char *zMatchinfo;\n  u32 aMI[FLEXARRAY];\n};\n\n/* Size (in bytes) of a MatchinfoBuffer sufficient for N elements */\n#define SZ_MATCHINFOBUFFER(N) \\\n            (offsetof(MatchinfoBuffer,aMI)+(((N)+1)/2)*sizeof(u64))\n\n\n/*\n** The snippet() and offsets() functions both return text values. An instance\n** of the following structure is used to accumulate those values while the\n** functions are running. See fts3StringAppend() for details.\n*/\ntypedef struct StrBuffer StrBuffer;\nstruct StrBuffer {\n  char *z;                        /* Pointer to buffer containing string */\n  int n;                          /* Length of z in bytes (excl. nul-term) */\n  int nAlloc;                     /* Allocated size of buffer z in bytes */\n};\n\n\n/*************************************************************************\n** Start of MatchinfoBuffer code.\n*/\n\n/*\n** Allocate a two-slot MatchinfoBuffer object.\n*/\nstatic MatchinfoBuffer *fts3MIBufferNew(size_t nElem, const char *zMatchinfo){\n  MatchinfoBuffer *pRet;\n  sqlite3_int64 nByte = sizeof(u32) * (2*(sqlite3_int64)nElem + 1)\n                           + SZ_MATCHINFOBUFFER(1);\n  sqlite3_int64 nStr = strlen(zMatchinfo);\n\n  pRet = sqlite3Fts3MallocZero(nByte + nStr+1);\n  if( pRet ){\n    pRet->aMI[0] = (u8*)(&pRet->aMI[1]) - (u8*)pRet;\n    pRet->aMI[1+nElem] = pRet->aMI[0]\n                                      + sizeof(u32)*((int)nElem+1);\n    pRet->nElem = (int)nElem;\n    pRet->zMatchinfo = ((char*)pRet) + nByte;\n    memcpy(pRet->zMatchinfo, zMatchinfo, nStr+1);\n    pRet->aRef[0] = 1;\n  }\n\n  return pRet;\n}\n\nstatic void fts3MIBufferFree(void *p){\n  MatchinfoBuffer *pBuf = (MatchinfoBuffer*)((u8*)p - ((u32*)p)[-1]);\n\n  assert( (u32*)p==&pBuf->aMI[1]\n       || (u32*)p==&pBuf->aMI[pBuf->nElem+2]\n  );\n  if( (u32*)p==&pBuf->aMI[1] ){\n    pBuf->aRef[1] = 0;\n  }else{\n    pBuf->aRef[2] = 0;\n  }\n\n  if( pBuf->aRef[0]==0 && pBuf->aRef[1]==0 && pBuf->aRef[2]==0 ){\n    sqlite3_free(pBuf);\n  }\n}\n\nstatic void (*fts3MIBufferAlloc(MatchinfoBuffer *p, u32 **paOut))(void*){\n  void (*xRet)(void*) = 0;\n  u32 *aOut = 0;\n\n  if( p->aRef[1]==0 ){\n    p->aRef[1] = 1;\n    aOut = &p->aMI[1];\n    xRet = fts3MIBufferFree;\n  }\n  else if( p->aRef[2]==0 ){\n    p->aRef[2] = 1;\n    aOut = &p->aMI[p->nElem+2];\n    xRet = fts3MIBufferFree;\n  }else{\n    aOut = (u32*)sqlite3_malloc64(p->nElem * sizeof(u32));\n    if( aOut ){\n      xRet = sqlite3_free;\n      if( p->bGlobal ) memcpy(aOut, &p->aMI[1], p->nElem*sizeof(u32));\n    }\n  }\n\n  *paOut = aOut;\n  return xRet;\n}\n\nstatic void fts3MIBufferSetGlobal(MatchinfoBuffer *p){\n  p->bGlobal = 1;\n  memcpy(&p->aMI[2+p->nElem], &p->aMI[1], p->nElem*sizeof(u32));\n}\n\n/*\n** Free a MatchinfoBuffer object allocated using fts3MIBufferNew()\n*/\nSQLITE_PRIVATE void sqlite3Fts3MIBufferFree(MatchinfoBuffer *p){\n  if( p ){\n    assert( p->aRef[0]==1 );\n    p->aRef[0] = 0;\n    if( p->aRef[0]==0 && p->aRef[1]==0 && p->aRef[2]==0 ){\n      sqlite3_free(p);\n    }\n  }\n}\n\n/*\n** End of MatchinfoBuffer code.\n*************************************************************************/\n\n\n/*\n** This function is used to help iterate through a position-list. A position\n** list is a list of unique integers, sorted from smallest to largest. Each\n** element of the list is represented by an FTS3 varint that takes the value\n** of the difference between the current element and the previous one plus\n** two. For example, to store the position-list:\n**\n**     4 9 113\n**\n** the three varints:\n**\n**     6 7 106\n**\n** are encoded.\n**\n** When this function is called, *pp points to the start of an element of\n** the list. *piPos contains the value of the previous entry in the list.\n** After it returns, *piPos contains the value of the next element of the\n** list and *pp is advanced to the following varint.\n*/\nstatic void fts3GetDeltaPosition(char **pp, i64 *piPos){\n  int iVal;\n  *pp += fts3GetVarint32(*pp, &iVal);\n  *piPos += (iVal-2);\n}\n\n/*\n** Helper function for sqlite3Fts3ExprIterate() (see below).\n*/\nstatic int fts3ExprIterate2(\n  Fts3Expr *pExpr,                /* Expression to iterate phrases of */\n  int *piPhrase,                  /* Pointer to phrase counter */\n  int (*x)(Fts3Expr*,int,void*),  /* Callback function to invoke for phrases */\n  void *pCtx                      /* Second argument to pass to callback */\n){\n  int rc;                         /* Return code */\n  int eType = pExpr->eType;     /* Type of expression node pExpr */\n\n  if( eType!=FTSQUERY_PHRASE ){\n    assert( pExpr->pLeft && pExpr->pRight );\n    rc = fts3ExprIterate2(pExpr->pLeft, piPhrase, x, pCtx);\n    if( rc==SQLITE_OK && eType!=FTSQUERY_NOT ){\n      rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx);\n    }\n  }else{\n    rc = x(pExpr, *piPhrase, pCtx);\n    (*piPhrase)++;\n  }\n  return rc;\n}\n\n/*\n** Iterate through all phrase nodes in an FTS3 query, except those that\n** are part of a sub-tree that is the right-hand-side of a NOT operator.\n** For each phrase node found, the supplied callback function is invoked.\n**\n** If the callback function returns anything other than SQLITE_OK,\n** the iteration is abandoned and the error code returned immediately.\n** Otherwise, SQLITE_OK is returned after a callback has been made for\n** all eligible phrase nodes.\n*/\nSQLITE_PRIVATE int sqlite3Fts3ExprIterate(\n  Fts3Expr *pExpr,                /* Expression to iterate phrases of */\n  int (*x)(Fts3Expr*,int,void*),  /* Callback function to invoke for phrases */\n  void *pCtx                      /* Second argument to pass to callback */\n){\n  int iPhrase = 0;                /* Variable used as the phrase counter */\n  return fts3ExprIterate2(pExpr, &iPhrase, x, pCtx);\n}\n\n/*\n** This is an sqlite3Fts3ExprIterate() callback used while loading the\n** doclists for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also\n** fts3ExprLoadDoclists().\n*/\nstatic int fts3ExprLoadDoclistsCb(Fts3Expr *pExpr, int iPhrase, void *ctx){\n  int rc = SQLITE_OK;\n  Fts3Phrase *pPhrase = pExpr->pPhrase;\n  LoadDoclistCtx *p = (LoadDoclistCtx *)ctx;\n\n  UNUSED_PARAMETER(iPhrase);\n\n  p->nPhrase++;\n  p->nToken += pPhrase->nToken;\n\n  return rc;\n}\n\n/*\n** Load the doclists for each phrase in the query associated with FTS3 cursor\n** pCsr.\n**\n** If pnPhrase is not NULL, then *pnPhrase is set to the number of matchable\n** phrases in the expression (all phrases except those directly or\n** indirectly descended from the right-hand-side of a NOT operator). If\n** pnToken is not NULL, then it is set to the number of tokens in all\n** matchable phrases of the expression.\n*/\nstatic int fts3ExprLoadDoclists(\n  Fts3Cursor *pCsr,               /* Fts3 cursor for current query */\n  int *pnPhrase,                  /* OUT: Number of phrases in query */\n  int *pnToken                    /* OUT: Number of tokens in query */\n){\n  int rc;                         /* Return Code */\n  LoadDoclistCtx sCtx = {0,0,0};  /* Context for sqlite3Fts3ExprIterate() */\n  sCtx.pCsr = pCsr;\n  rc = sqlite3Fts3ExprIterate(pCsr->pExpr,fts3ExprLoadDoclistsCb,(void*)&sCtx);\n  if( pnPhrase ) *pnPhrase = sCtx.nPhrase;\n  if( pnToken ) *pnToken = sCtx.nToken;\n  return rc;\n}\n\nstatic int fts3ExprPhraseCountCb(Fts3Expr *pExpr, int iPhrase, void *ctx){\n  (*(int *)ctx)++;\n  pExpr->iPhrase = iPhrase;\n  return SQLITE_OK;\n}\nstatic int fts3ExprPhraseCount(Fts3Expr *pExpr){\n  int nPhrase = 0;\n  (void)sqlite3Fts3ExprIterate(pExpr, fts3ExprPhraseCountCb, (void *)&nPhrase);\n  return nPhrase;\n}\n\n/*\n** Advance the position list iterator specified by the first two\n** arguments so that it points to the first element with a value greater\n** than or equal to parameter iNext.\n*/\nstatic void fts3SnippetAdvance(char **ppIter, i64 *piIter, int iNext){\n  char *pIter = *ppIter;\n  if( pIter ){\n    i64 iIter = *piIter;\n\n    while( iIter<iNext ){\n      if( 0==(*pIter & 0xFE) ){\n        iIter = -1;\n        pIter = 0;\n        break;\n      }\n      fts3GetDeltaPosition(&pIter, &iIter);\n    }\n\n    *piIter = iIter;\n    *ppIter = pIter;\n  }\n}\n\n/*\n** Advance the snippet iterator to the next candidate snippet.\n*/\nstatic int fts3SnippetNextCandidate(SnippetIter *pIter){\n  int i;                          /* Loop counter */\n\n  if( pIter->iCurrent<0 ){\n    /* The SnippetIter object has just been initialized. The first snippet\n    ** candidate always starts at offset 0 (even if this candidate has a\n    ** score of 0.0).\n    */\n    pIter->iCurrent = 0;\n\n    /* Advance the 'head' iterator of each phrase to the first offset that\n    ** is greater than or equal to (iNext+nSnippet).\n    */\n    for(i=0; i<pIter->nPhrase; i++){\n      SnippetPhrase *pPhrase = &pIter->aPhrase[i];\n      fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, pIter->nSnippet);\n    }\n  }else{\n    int iStart;\n    int iEnd = 0x7FFFFFFF;\n\n    for(i=0; i<pIter->nPhrase; i++){\n      SnippetPhrase *pPhrase = &pIter->aPhrase[i];\n      if( pPhrase->pHead && pPhrase->iHead<iEnd ){\n        iEnd = pPhrase->iHead;\n      }\n    }\n    if( iEnd==0x7FFFFFFF ){\n      return 1;\n    }\n\n    assert( pIter->nSnippet>=0 );\n    pIter->iCurrent = iStart = iEnd - pIter->nSnippet + 1;\n    for(i=0; i<pIter->nPhrase; i++){\n      SnippetPhrase *pPhrase = &pIter->aPhrase[i];\n      fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, iEnd+1);\n      fts3SnippetAdvance(&pPhrase->pTail, &pPhrase->iTail, iStart);\n    }\n  }\n\n  return 0;\n}\n\n/*\n** Retrieve information about the current candidate snippet of snippet\n** iterator pIter.\n*/\nstatic void fts3SnippetDetails(\n  SnippetIter *pIter,             /* Snippet iterator */\n  u64 mCovered,                   /* Bitmask of phrases already covered */\n  int *piToken,                   /* OUT: First token of proposed snippet */\n  int *piScore,                   /* OUT: \"Score\" for this snippet */\n  u64 *pmCover,                   /* OUT: Bitmask of phrases covered */\n  u64 *pmHighlight                /* OUT: Bitmask of terms to highlight */\n){\n  int iStart = pIter->iCurrent;   /* First token of snippet */\n  int iScore = 0;                 /* Score of this snippet */\n  int i;                          /* Loop counter */\n  u64 mCover = 0;                 /* Mask of phrases covered by this snippet */\n  u64 mHighlight = 0;             /* Mask of tokens to highlight in snippet */\n\n  for(i=0; i<pIter->nPhrase; i++){\n    SnippetPhrase *pPhrase = &pIter->aPhrase[i];\n    if( pPhrase->pTail ){\n      char *pCsr = pPhrase->pTail;\n      i64 iCsr = pPhrase->iTail;\n\n      while( iCsr<(iStart+pIter->nSnippet) && iCsr>=iStart ){\n        int j;\n        u64 mPhrase = (u64)1 << (i%64);\n        u64 mPos = (u64)1 << (iCsr - iStart);\n        assert( iCsr>=iStart && (iCsr - iStart)<=64 );\n        assert( i>=0 );\n        if( (mCover|mCovered)&mPhrase ){\n          iScore++;\n        }else{\n          iScore += 1000;\n        }\n        mCover |= mPhrase;\n\n        for(j=0; j<pPhrase->nToken && j<pIter->nSnippet; j++){\n          mHighlight |= (mPos>>j);\n        }\n\n        if( 0==(*pCsr & 0x0FE) ) break;\n        fts3GetDeltaPosition(&pCsr, &iCsr);\n      }\n    }\n  }\n\n  /* Set the output variables before returning. */\n  *piToken = iStart;\n  *piScore = iScore;\n  *pmCover = mCover;\n  *pmHighlight = mHighlight;\n}\n\n/*\n** This function is an sqlite3Fts3ExprIterate() callback used by\n** fts3BestSnippet().  Each invocation populates an element of the\n** SnippetIter.aPhrase[] array.\n*/\nstatic int fts3SnippetFindPositions(Fts3Expr *pExpr, int iPhrase, void *ctx){\n  SnippetIter *p = (SnippetIter *)ctx;\n  SnippetPhrase *pPhrase = &p->aPhrase[iPhrase];\n  char *pCsr;\n  int rc;\n\n  pPhrase->nToken = pExpr->pPhrase->nToken;\n  rc = sqlite3Fts3EvalPhrasePoslist(p->pCsr, pExpr, p->iCol, &pCsr);\n  assert( rc==SQLITE_OK || pCsr==0 );\n  if( pCsr ){\n    i64 iFirst = 0;\n    pPhrase->pList = pCsr;\n    fts3GetDeltaPosition(&pCsr, &iFirst);\n    if( iFirst<0 ){\n      rc = FTS_CORRUPT_VTAB;\n    }else{\n      pPhrase->pHead = pCsr;\n      pPhrase->pTail = pCsr;\n      pPhrase->iHead = iFirst;\n      pPhrase->iTail = iFirst;\n    }\n  }else{\n    assert( rc!=SQLITE_OK || (\n       pPhrase->pList==0 && pPhrase->pHead==0 && pPhrase->pTail==0\n    ));\n  }\n\n  return rc;\n}\n\n/*\n** Select the fragment of text consisting of nFragment contiguous tokens\n** from column iCol that represent the \"best\" snippet. The best snippet\n** is the snippet with the highest score, where scores are calculated\n** by adding:\n**\n**   (a) +1 point for each occurrence of a matchable phrase in the snippet.\n**\n**   (b) +1000 points for the first occurrence of each matchable phrase in\n**       the snippet for which the corresponding mCovered bit is not set.\n**\n** The selected snippet parameters are stored in structure *pFragment before\n** returning. The score of the selected snippet is stored in *piScore\n** before returning.\n*/\nstatic int fts3BestSnippet(\n  int nSnippet,                   /* Desired snippet length */\n  Fts3Cursor *pCsr,               /* Cursor to create snippet for */\n  int iCol,                       /* Index of column to create snippet from */\n  u64 mCovered,                   /* Mask of phrases already covered */\n  u64 *pmSeen,                    /* IN/OUT: Mask of phrases seen */\n  SnippetFragment *pFragment,     /* OUT: Best snippet found */\n  int *piScore                    /* OUT: Score of snippet pFragment */\n){\n  int rc;                         /* Return Code */\n  int nList;                      /* Number of phrases in expression */\n  SnippetIter sIter;              /* Iterates through snippet candidates */\n  sqlite3_int64 nByte;            /* Number of bytes of space to allocate */\n  int iBestScore = -1;            /* Best snippet score found so far */\n  int i;                          /* Loop counter */\n\n  memset(&sIter, 0, sizeof(sIter));\n\n  /* Iterate through the phrases in the expression to count them. The same\n  ** callback makes sure the doclists are loaded for each phrase.\n  */\n  rc = fts3ExprLoadDoclists(pCsr, &nList, 0);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  /* Now that it is known how many phrases there are, allocate and zero\n  ** the required space using malloc().\n  */\n  nByte = sizeof(SnippetPhrase) * nList;\n  sIter.aPhrase = (SnippetPhrase *)sqlite3Fts3MallocZero(nByte);\n  if( !sIter.aPhrase ){\n    return SQLITE_NOMEM;\n  }\n\n  /* Initialize the contents of the SnippetIter object. Then iterate through\n  ** the set of phrases in the expression to populate the aPhrase[] array.\n  */\n  sIter.pCsr = pCsr;\n  sIter.iCol = iCol;\n  sIter.nSnippet = nSnippet;\n  sIter.nPhrase = nList;\n  sIter.iCurrent = -1;\n  rc = sqlite3Fts3ExprIterate(\n      pCsr->pExpr, fts3SnippetFindPositions, (void*)&sIter\n  );\n  if( rc==SQLITE_OK ){\n\n    /* Set the *pmSeen output variable. */\n    for(i=0; i<nList; i++){\n      if( sIter.aPhrase[i].pHead ){\n        *pmSeen |= (u64)1 << (i%64);\n      }\n    }\n\n    /* Loop through all candidate snippets. Store the best snippet in\n     ** *pFragment. Store its associated 'score' in iBestScore.\n     */\n    pFragment->iCol = iCol;\n    while( !fts3SnippetNextCandidate(&sIter) ){\n      int iPos;\n      int iScore;\n      u64 mCover;\n      u64 mHighlite;\n      fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover,&mHighlite);\n      assert( iScore>=0 );\n      if( iScore>iBestScore ){\n        pFragment->iPos = iPos;\n        pFragment->hlmask = mHighlite;\n        pFragment->covered = mCover;\n        iBestScore = iScore;\n      }\n    }\n\n    *piScore = iBestScore;\n  }\n  sqlite3_free(sIter.aPhrase);\n  return rc;\n}\n\n\n/*\n** Append a string to the string-buffer passed as the first argument.\n**\n** If nAppend is negative, then the length of the string zAppend is\n** determined using strlen().\n*/\nstatic int fts3StringAppend(\n  StrBuffer *pStr,                /* Buffer to append to */\n  const char *zAppend,            /* Pointer to data to append to buffer */\n  int nAppend                     /* Size of zAppend in bytes (or -1) */\n){\n  if( nAppend<0 ){\n    nAppend = (int)strlen(zAppend);\n  }\n\n  /* If there is insufficient space allocated at StrBuffer.z, use realloc()\n  ** to grow the buffer until so that it is big enough to accommodate the\n  ** appended data.\n  */\n  if( pStr->n+nAppend+1>=pStr->nAlloc ){\n    sqlite3_int64 nAlloc = pStr->nAlloc+(sqlite3_int64)nAppend+100;\n    char *zNew = sqlite3_realloc64(pStr->z, nAlloc);\n    if( !zNew ){\n      return SQLITE_NOMEM;\n    }\n    pStr->z = zNew;\n    pStr->nAlloc = nAlloc;\n  }\n  assert( pStr->z!=0 && (pStr->nAlloc >= pStr->n+nAppend+1) );\n\n  /* Append the data to the string buffer. */\n  memcpy(&pStr->z[pStr->n], zAppend, nAppend);\n  pStr->n += nAppend;\n  pStr->z[pStr->n] = '\\0';\n\n  return SQLITE_OK;\n}\n\n/*\n** The fts3BestSnippet() function often selects snippets that end with a\n** query term. That is, the final term of the snippet is always a term\n** that requires highlighting. For example, if 'X' is a highlighted term\n** and '.' is a non-highlighted term, BestSnippet() may select:\n**\n**     ........X.....X\n**\n** This function \"shifts\" the beginning of the snippet forward in the\n** document so that there are approximately the same number of\n** non-highlighted terms to the right of the final highlighted term as there\n** are to the left of the first highlighted term. For example, to this:\n**\n**     ....X.....X....\n**\n** This is done as part of extracting the snippet text, not when selecting\n** the snippet. Snippet selection is done based on doclists only, so there\n** is no way for fts3BestSnippet() to know whether or not the document\n** actually contains terms that follow the final highlighted term.\n*/\nstatic int fts3SnippetShift(\n  Fts3Table *pTab,                /* FTS3 table snippet comes from */\n  int iLangid,                    /* Language id to use in tokenizing */\n  int nSnippet,                   /* Number of tokens desired for snippet */\n  const char *zDoc,               /* Document text to extract snippet from */\n  int nDoc,                       /* Size of buffer zDoc in bytes */\n  int *piPos,                     /* IN/OUT: First token of snippet */\n  u64 *pHlmask                    /* IN/OUT: Mask of tokens to highlight */\n){\n  u64 hlmask = *pHlmask;          /* Local copy of initial highlight-mask */\n\n  if( hlmask ){\n    int nLeft;                    /* Tokens to the left of first highlight */\n    int nRight;                   /* Tokens to the right of last highlight */\n    int nDesired;                 /* Ideal number of tokens to shift forward */\n\n    for(nLeft=0; !(hlmask & ((u64)1 << nLeft)); nLeft++);\n    for(nRight=0; !(hlmask & ((u64)1 << (nSnippet-1-nRight))); nRight++);\n    assert( (nSnippet-1-nRight)<=63 && (nSnippet-1-nRight)>=0 );\n    nDesired = (nLeft-nRight)/2;\n\n    /* Ideally, the start of the snippet should be pushed forward in the\n    ** document nDesired tokens. This block checks if there are actually\n    ** nDesired tokens to the right of the snippet. If so, *piPos and\n    ** *pHlMask are updated to shift the snippet nDesired tokens to the\n    ** right. Otherwise, the snippet is shifted by the number of tokens\n    ** available.\n    */\n    if( nDesired>0 ){\n      int nShift;                 /* Number of tokens to shift snippet by */\n      int iCurrent = 0;           /* Token counter */\n      int rc;                     /* Return Code */\n      sqlite3_tokenizer_module *pMod;\n      sqlite3_tokenizer_cursor *pC;\n      pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule;\n\n      /* Open a cursor on zDoc/nDoc. Check if there are (nSnippet+nDesired)\n      ** or more tokens in zDoc/nDoc.\n      */\n      rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, iLangid, zDoc, nDoc, &pC);\n      if( rc!=SQLITE_OK ){\n        return rc;\n      }\n      while( rc==SQLITE_OK && iCurrent<(nSnippet+nDesired) ){\n        const char *ZDUMMY; int DUMMY1 = 0, DUMMY2 = 0, DUMMY3 = 0;\n        rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);\n      }\n      pMod->xClose(pC);\n      if( rc!=SQLITE_OK && rc!=SQLITE_DONE ){ return rc; }\n\n      nShift = (rc==SQLITE_DONE)+iCurrent-nSnippet;\n      assert( nShift<=nDesired );\n      if( nShift>0 ){\n        *piPos += nShift;\n        *pHlmask = hlmask >> nShift;\n      }\n    }\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Extract the snippet text for fragment pFragment from cursor pCsr and\n** append it to string buffer pOut.\n*/\nstatic int fts3SnippetText(\n  Fts3Cursor *pCsr,               /* FTS3 Cursor */\n  SnippetFragment *pFragment,     /* Snippet to extract */\n  int iFragment,                  /* Fragment number */\n  int isLast,                     /* True for final fragment in snippet */\n  int nSnippet,                   /* Number of tokens in extracted snippet */\n  const char *zOpen,              /* String inserted before highlighted term */\n  const char *zClose,             /* String inserted after highlighted term */\n  const char *zEllipsis,          /* String inserted between snippets */\n  StrBuffer *pOut                 /* Write output here */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc;                         /* Return code */\n  const char *zDoc;               /* Document text to extract snippet from */\n  int nDoc;                       /* Size of zDoc in bytes */\n  int iCurrent = 0;               /* Current token number of document */\n  int iEnd = 0;                   /* Byte offset of end of current token */\n  int isShiftDone = 0;            /* True after snippet is shifted */\n  int iPos = pFragment->iPos;     /* First token of snippet */\n  u64 hlmask = pFragment->hlmask; /* Highlight-mask for snippet */\n  int iCol = pFragment->iCol+1;   /* Query column to extract text from */\n  sqlite3_tokenizer_module *pMod; /* Tokenizer module methods object */\n  sqlite3_tokenizer_cursor *pC;   /* Tokenizer cursor open on zDoc/nDoc */\n\n  zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol);\n  if( zDoc==0 ){\n    if( sqlite3_column_type(pCsr->pStmt, iCol)!=SQLITE_NULL ){\n      return SQLITE_NOMEM;\n    }\n    return SQLITE_OK;\n  }\n  nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol);\n\n  /* Open a token cursor on the document. */\n  pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule;\n  rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid, zDoc,nDoc,&pC);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  while( rc==SQLITE_OK ){\n    const char *ZDUMMY;           /* Dummy argument used with tokenizer */\n    int DUMMY1 = -1;              /* Dummy argument used with tokenizer */\n    int iBegin = 0;               /* Offset in zDoc of start of token */\n    int iFin = 0;                 /* Offset in zDoc of end of token */\n    int isHighlight = 0;          /* True for highlighted terms */\n\n    /* Variable DUMMY1 is initialized to a negative value above. Elsewhere\n    ** in the FTS code the variable that the third argument to xNext points to\n    ** is initialized to zero before the first (*but not necessarily\n    ** subsequent*) call to xNext(). This is done for a particular application\n    ** that needs to know whether or not the tokenizer is being used for\n    ** snippet generation or for some other purpose.\n    **\n    ** Extreme care is required when writing code to depend on this\n    ** initialization. It is not a documented part of the tokenizer interface.\n    ** If a tokenizer is used directly by any code outside of FTS, this\n    ** convention might not be respected.  */\n    rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);\n    if( rc!=SQLITE_OK ){\n      if( rc==SQLITE_DONE ){\n        /* Special case - the last token of the snippet is also the last token\n        ** of the column. Append any punctuation that occurred between the end\n        ** of the previous token and the end of the document to the output.\n        ** Then break out of the loop. */\n        rc = fts3StringAppend(pOut, &zDoc[iEnd], -1);\n      }\n      break;\n    }\n    if( iCurrent<iPos ){ continue; }\n\n    if( !isShiftDone ){\n      int n = nDoc - iBegin;\n      rc = fts3SnippetShift(\n          pTab, pCsr->iLangid, nSnippet, &zDoc[iBegin], n, &iPos, &hlmask\n      );\n      isShiftDone = 1;\n\n      /* Now that the shift has been done, check if the initial \"...\" are\n      ** required. They are required if (a) this is not the first fragment,\n      ** or (b) this fragment does not begin at position 0 of its column.\n      */\n      if( rc==SQLITE_OK ){\n        if( iPos>0 || iFragment>0 ){\n          rc = fts3StringAppend(pOut, zEllipsis, -1);\n        }else if( iBegin ){\n          rc = fts3StringAppend(pOut, zDoc, iBegin);\n        }\n      }\n      if( rc!=SQLITE_OK || iCurrent<iPos ) continue;\n    }\n\n    if( iCurrent>=(iPos+nSnippet) ){\n      if( isLast ){\n        rc = fts3StringAppend(pOut, zEllipsis, -1);\n      }\n      break;\n    }\n\n    /* Set isHighlight to true if this term should be highlighted. */\n    isHighlight = (hlmask & ((u64)1 << (iCurrent-iPos)))!=0;\n\n    if( iCurrent>iPos ) rc = fts3StringAppend(pOut, &zDoc[iEnd], iBegin-iEnd);\n    if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zOpen, -1);\n    if( rc==SQLITE_OK ) rc = fts3StringAppend(pOut, &zDoc[iBegin], iFin-iBegin);\n    if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zClose, -1);\n\n    iEnd = iFin;\n  }\n\n  pMod->xClose(pC);\n  return rc;\n}\n\n\n/*\n** This function is used to count the entries in a column-list (a\n** delta-encoded list of term offsets within a single column of a single\n** row). When this function is called, *ppCollist should point to the\n** beginning of the first varint in the column-list (the varint that\n** contains the position of the first matching term in the column data).\n** Before returning, *ppCollist is set to point to the first byte after\n** the last varint in the column-list (either the 0x00 signifying the end\n** of the position-list, or the 0x01 that precedes the column number of\n** the next column in the position-list).\n**\n** The number of elements in the column-list is returned.\n*/\nstatic int fts3ColumnlistCount(char **ppCollist){\n  char *pEnd = *ppCollist;\n  char c = 0;\n  int nEntry = 0;\n\n  /* A column-list is terminated by either a 0x01 or 0x00. */\n  while( 0xFE & (*pEnd | c) ){\n    c = *pEnd++ & 0x80;\n    if( !c ) nEntry++;\n  }\n\n  *ppCollist = pEnd;\n  return nEntry;\n}\n\n/*\n** This function gathers 'y' or 'b' data for a single phrase.\n*/\nstatic int fts3ExprLHits(\n  Fts3Expr *pExpr,                /* Phrase expression node */\n  MatchInfo *p                    /* Matchinfo context */\n){\n  Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;\n  int iStart;\n  Fts3Phrase *pPhrase = pExpr->pPhrase;\n  char *pIter = pPhrase->doclist.pList;\n  int iCol = 0;\n\n  assert( p->flag==FTS3_MATCHINFO_LHITS_BM || p->flag==FTS3_MATCHINFO_LHITS );\n  if( p->flag==FTS3_MATCHINFO_LHITS ){\n    iStart = pExpr->iPhrase * p->nCol;\n  }else{\n    iStart = pExpr->iPhrase * ((p->nCol + 31) / 32);\n  }\n\n  if( pIter ) while( 1 ){\n    int nHit = fts3ColumnlistCount(&pIter);\n    if( (pPhrase->iColumn>=pTab->nColumn || pPhrase->iColumn==iCol) ){\n      if( p->flag==FTS3_MATCHINFO_LHITS ){\n        p->aMatchinfo[iStart + iCol] = (u32)nHit;\n      }else if( nHit ){\n        p->aMatchinfo[iStart + (iCol+1)/32] |= (1 << (iCol&0x1F));\n      }\n    }\n    assert( *pIter==0x00 || *pIter==0x01 );\n    if( *pIter!=0x01 ) break;\n    pIter++;\n    pIter += fts3GetVarint32(pIter, &iCol);\n    if( iCol>=p->nCol ) return FTS_CORRUPT_VTAB;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Gather the results for matchinfo directives 'y' and 'b'.\n*/\nstatic int fts3ExprLHitGather(\n  Fts3Expr *pExpr,\n  MatchInfo *p\n){\n  int rc = SQLITE_OK;\n  assert( (pExpr->pLeft==0)==(pExpr->pRight==0) );\n  if( pExpr->bEof==0 && pExpr->iDocid==p->pCursor->iPrevId ){\n    if( pExpr->pLeft ){\n      rc = fts3ExprLHitGather(pExpr->pLeft, p);\n      if( rc==SQLITE_OK ) rc = fts3ExprLHitGather(pExpr->pRight, p);\n    }else{\n      rc = fts3ExprLHits(pExpr, p);\n    }\n  }\n  return rc;\n}\n\n/*\n** sqlite3Fts3ExprIterate() callback used to collect the \"global\" matchinfo\n** stats for a single query.\n**\n** sqlite3Fts3ExprIterate() callback to load the 'global' elements of a\n** FTS3_MATCHINFO_HITS matchinfo array. The global stats are those elements\n** of the matchinfo array that are constant for all rows returned by the\n** current query.\n**\n** Argument pCtx is actually a pointer to a struct of type MatchInfo. This\n** function populates Matchinfo.aMatchinfo[] as follows:\n**\n**   for(iCol=0; iCol<nCol; iCol++){\n**     aMatchinfo[3*iPhrase*nCol + 3*iCol + 1] = X;\n**     aMatchinfo[3*iPhrase*nCol + 3*iCol + 2] = Y;\n**   }\n**\n** where X is the number of matches for phrase iPhrase is column iCol of all\n** rows of the table. Y is the number of rows for which column iCol contains\n** at least one instance of phrase iPhrase.\n**\n** If the phrase pExpr consists entirely of deferred tokens, then all X and\n** Y values are set to nDoc, where nDoc is the number of documents in the\n** file system. This is done because the full-text index doclist is required\n** to calculate these values properly, and the full-text index doclist is\n** not available for deferred tokens.\n*/\nstatic int fts3ExprGlobalHitsCb(\n  Fts3Expr *pExpr,                /* Phrase expression node */\n  int iPhrase,                    /* Phrase number (numbered from zero) */\n  void *pCtx                      /* Pointer to MatchInfo structure */\n){\n  MatchInfo *p = (MatchInfo *)pCtx;\n  return sqlite3Fts3EvalPhraseStats(\n      p->pCursor, pExpr, &p->aMatchinfo[3*iPhrase*p->nCol]\n  );\n}\n\n/*\n** sqlite3Fts3ExprIterate() callback used to collect the \"local\" part of the\n** FTS3_MATCHINFO_HITS array. The local stats are those elements of the\n** array that are different for each row returned by the query.\n*/\nstatic int fts3ExprLocalHitsCb(\n  Fts3Expr *pExpr,                /* Phrase expression node */\n  int iPhrase,                    /* Phrase number */\n  void *pCtx                      /* Pointer to MatchInfo structure */\n){\n  int rc = SQLITE_OK;\n  MatchInfo *p = (MatchInfo *)pCtx;\n  int iStart = iPhrase * p->nCol * 3;\n  int i;\n\n  for(i=0; i<p->nCol && rc==SQLITE_OK; i++){\n    char *pCsr;\n    rc = sqlite3Fts3EvalPhrasePoslist(p->pCursor, pExpr, i, &pCsr);\n    if( pCsr ){\n      p->aMatchinfo[iStart+i*3] = fts3ColumnlistCount(&pCsr);\n    }else{\n      p->aMatchinfo[iStart+i*3] = 0;\n    }\n  }\n\n  return rc;\n}\n\nstatic int fts3MatchinfoCheck(\n  Fts3Table *pTab,\n  char cArg,\n  char **pzErr\n){\n  if( (cArg==FTS3_MATCHINFO_NPHRASE)\n   || (cArg==FTS3_MATCHINFO_NCOL)\n   || (cArg==FTS3_MATCHINFO_NDOC && pTab->bFts4)\n   || (cArg==FTS3_MATCHINFO_AVGLENGTH && pTab->bFts4)\n   || (cArg==FTS3_MATCHINFO_LENGTH && pTab->bHasDocsize)\n   || (cArg==FTS3_MATCHINFO_LCS)\n   || (cArg==FTS3_MATCHINFO_HITS)\n   || (cArg==FTS3_MATCHINFO_LHITS)\n   || (cArg==FTS3_MATCHINFO_LHITS_BM)\n  ){\n    return SQLITE_OK;\n  }\n  sqlite3Fts3ErrMsg(pzErr, \"unrecognized matchinfo request: %c\", cArg);\n  return SQLITE_ERROR;\n}\n\nstatic size_t fts3MatchinfoSize(MatchInfo *pInfo, char cArg){\n  size_t nVal;                      /* Number of integers output by cArg */\n\n  switch( cArg ){\n    case FTS3_MATCHINFO_NDOC:\n    case FTS3_MATCHINFO_NPHRASE:\n    case FTS3_MATCHINFO_NCOL:\n      nVal = 1;\n      break;\n\n    case FTS3_MATCHINFO_AVGLENGTH:\n    case FTS3_MATCHINFO_LENGTH:\n    case FTS3_MATCHINFO_LCS:\n      nVal = pInfo->nCol;\n      break;\n\n    case FTS3_MATCHINFO_LHITS:\n      nVal = (size_t)pInfo->nCol * pInfo->nPhrase;\n      break;\n\n    case FTS3_MATCHINFO_LHITS_BM:\n      nVal = (size_t)pInfo->nPhrase * ((pInfo->nCol + 31) / 32);\n      break;\n\n    default:\n      assert( cArg==FTS3_MATCHINFO_HITS );\n      nVal = (size_t)pInfo->nCol * pInfo->nPhrase * 3;\n      break;\n  }\n\n  return nVal;\n}\n\nstatic int fts3MatchinfoSelectDoctotal(\n  Fts3Table *pTab,\n  sqlite3_stmt **ppStmt,\n  sqlite3_int64 *pnDoc,\n  const char **paLen,\n  const char **ppEnd\n){\n  sqlite3_stmt *pStmt;\n  const char *a;\n  const char *pEnd;\n  sqlite3_int64 nDoc;\n  int n;\n\n\n  if( !*ppStmt ){\n    int rc = sqlite3Fts3SelectDoctotal(pTab, ppStmt);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  pStmt = *ppStmt;\n  assert( sqlite3_data_count(pStmt)==1 );\n\n  n = sqlite3_column_bytes(pStmt, 0);\n  a = sqlite3_column_blob(pStmt, 0);\n  if( a==0 ){\n    return FTS_CORRUPT_VTAB;\n  }\n  pEnd = a + n;\n  a += sqlite3Fts3GetVarintBounded(a, pEnd, &nDoc);\n  if( nDoc<=0 || a>pEnd ){\n    return FTS_CORRUPT_VTAB;\n  }\n  *pnDoc = nDoc;\n\n  if( paLen ) *paLen = a;\n  if( ppEnd ) *ppEnd = pEnd;\n  return SQLITE_OK;\n}\n\n/*\n** An instance of the following structure is used to store state while\n** iterating through a multi-column position-list corresponding to the\n** hits for a single phrase on a single row in order to calculate the\n** values for a matchinfo() FTS3_MATCHINFO_LCS request.\n*/\ntypedef struct LcsIterator LcsIterator;\nstruct LcsIterator {\n  Fts3Expr *pExpr;                /* Pointer to phrase expression */\n  int iPosOffset;                 /* Tokens count up to end of this phrase */\n  char *pRead;                    /* Cursor used to iterate through aDoclist */\n  int iPos;                       /* Current position */\n};\n\n/*\n** If LcsIterator.iCol is set to the following value, the iterator has\n** finished iterating through all offsets for all columns.\n*/\n#define LCS_ITERATOR_FINISHED 0x7FFFFFFF;\n\nstatic int fts3MatchinfoLcsCb(\n  Fts3Expr *pExpr,                /* Phrase expression node */\n  int iPhrase,                    /* Phrase number (numbered from zero) */\n  void *pCtx                      /* Pointer to MatchInfo structure */\n){\n  LcsIterator *aIter = (LcsIterator *)pCtx;\n  aIter[iPhrase].pExpr = pExpr;\n  return SQLITE_OK;\n}\n\n/*\n** Advance the iterator passed as an argument to the next position. Return\n** 1 if the iterator is at EOF or if it now points to the start of the\n** position list for the next column.\n*/\nstatic int fts3LcsIteratorAdvance(LcsIterator *pIter){\n  char *pRead;\n  sqlite3_int64 iRead;\n  int rc = 0;\n\n  if( NEVER(pIter==0) ) return 1;\n  pRead = pIter->pRead;\n  pRead += sqlite3Fts3GetVarint(pRead, &iRead);\n  if( iRead==0 || iRead==1 ){\n    pRead = 0;\n    rc = 1;\n  }else{\n    pIter->iPos += (int)(iRead-2);\n  }\n\n  pIter->pRead = pRead;\n  return rc;\n}\n\n/*\n** This function implements the FTS3_MATCHINFO_LCS matchinfo() flag.\n**\n** If the call is successful, the longest-common-substring lengths for each\n** column are written into the first nCol elements of the pInfo->aMatchinfo[]\n** array before returning. SQLITE_OK is returned in this case.\n**\n** Otherwise, if an error occurs, an SQLite error code is returned and the\n** data written to the first nCol elements of pInfo->aMatchinfo[] is\n** undefined.\n*/\nstatic int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){\n  LcsIterator *aIter;\n  int i;\n  int iCol;\n  int nToken = 0;\n  int rc = SQLITE_OK;\n\n  /* Allocate and populate the array of LcsIterator objects. The array\n  ** contains one element for each matchable phrase in the query.\n  **/\n  aIter = sqlite3Fts3MallocZero(sizeof(LcsIterator) * pCsr->nPhrase);\n  if( !aIter ) return SQLITE_NOMEM;\n  (void)sqlite3Fts3ExprIterate(pCsr->pExpr, fts3MatchinfoLcsCb, (void*)aIter);\n\n  for(i=0; i<pInfo->nPhrase; i++){\n    LcsIterator *pIter = &aIter[i];\n    nToken -= pIter->pExpr->pPhrase->nToken;\n    pIter->iPosOffset = nToken;\n  }\n\n  for(iCol=0; iCol<pInfo->nCol; iCol++){\n    int nLcs = 0;                 /* LCS value for this column */\n    int nLive = 0;                /* Number of iterators in aIter not at EOF */\n\n    for(i=0; i<pInfo->nPhrase; i++){\n      LcsIterator *pIt = &aIter[i];\n      rc = sqlite3Fts3EvalPhrasePoslist(pCsr, pIt->pExpr, iCol, &pIt->pRead);\n      if( rc!=SQLITE_OK ) goto matchinfo_lcs_out;\n      if( pIt->pRead ){\n        pIt->iPos = pIt->iPosOffset;\n        fts3LcsIteratorAdvance(pIt);\n        if( pIt->pRead==0 ){\n          rc = FTS_CORRUPT_VTAB;\n          goto matchinfo_lcs_out;\n        }\n        nLive++;\n      }\n    }\n\n    while( nLive>0 ){\n      LcsIterator *pAdv = 0;      /* The iterator to advance by one position */\n      int nThisLcs = 0;           /* LCS for the current iterator positions */\n\n      for(i=0; i<pInfo->nPhrase; i++){\n        LcsIterator *pIter = &aIter[i];\n        if( pIter->pRead==0 ){\n          /* This iterator is already at EOF for this column. */\n          nThisLcs = 0;\n        }else{\n          if( pAdv==0 || pIter->iPos<pAdv->iPos ){\n            pAdv = pIter;\n          }\n          if( nThisLcs==0 || pIter->iPos==pIter[-1].iPos ){\n            nThisLcs++;\n          }else{\n            nThisLcs = 1;\n          }\n          if( nThisLcs>nLcs ) nLcs = nThisLcs;\n        }\n      }\n      if( fts3LcsIteratorAdvance(pAdv) ) nLive--;\n    }\n\n    pInfo->aMatchinfo[iCol] = nLcs;\n  }\n\n matchinfo_lcs_out:\n  sqlite3_free(aIter);\n  return rc;\n}\n\n/*\n** Populate the buffer pInfo->aMatchinfo[] with an array of integers to\n** be returned by the matchinfo() function. Argument zArg contains the\n** format string passed as the second argument to matchinfo (or the\n** default value \"pcx\" if no second argument was specified). The format\n** string has already been validated and the pInfo->aMatchinfo[] array\n** is guaranteed to be large enough for the output.\n**\n** If bGlobal is true, then populate all fields of the matchinfo() output.\n** If it is false, then assume that those fields that do not change between\n** rows (i.e. FTS3_MATCHINFO_NPHRASE, NCOL, NDOC, AVGLENGTH and part of HITS)\n** have already been populated.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs. If a value other than SQLITE_OK is returned, the state the\n** pInfo->aMatchinfo[] buffer is left in is undefined.\n*/\nstatic int fts3MatchinfoValues(\n  Fts3Cursor *pCsr,               /* FTS3 cursor object */\n  int bGlobal,                    /* True to grab the global stats */\n  MatchInfo *pInfo,               /* Matchinfo context object */\n  const char *zArg                /* Matchinfo format string */\n){\n  int rc = SQLITE_OK;\n  int i;\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  sqlite3_stmt *pSelect = 0;\n\n  for(i=0; rc==SQLITE_OK && zArg[i]; i++){\n    pInfo->flag = zArg[i];\n    switch( zArg[i] ){\n      case FTS3_MATCHINFO_NPHRASE:\n        if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;\n        break;\n\n      case FTS3_MATCHINFO_NCOL:\n        if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nCol;\n        break;\n\n      case FTS3_MATCHINFO_NDOC:\n        if( bGlobal ){\n          sqlite3_int64 nDoc = 0;\n          rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, 0, 0);\n          pInfo->aMatchinfo[0] = (u32)nDoc;\n        }\n        break;\n\n      case FTS3_MATCHINFO_AVGLENGTH:\n        if( bGlobal ){\n          sqlite3_int64 nDoc;     /* Number of rows in table */\n          const char *a;          /* Aggregate column length array */\n          const char *pEnd;       /* First byte past end of length array */\n\n          rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, &a, &pEnd);\n          if( rc==SQLITE_OK ){\n            int iCol;\n            for(iCol=0; iCol<pInfo->nCol; iCol++){\n              u32 iVal;\n              sqlite3_int64 nToken;\n              a += sqlite3Fts3GetVarint(a, &nToken);\n              if( a>pEnd ){\n                rc = SQLITE_CORRUPT_VTAB;\n                break;\n              }\n              iVal = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);\n              pInfo->aMatchinfo[iCol] = iVal;\n            }\n          }\n        }\n        break;\n\n      case FTS3_MATCHINFO_LENGTH: {\n        sqlite3_stmt *pSelectDocsize = 0;\n        rc = sqlite3Fts3SelectDocsize(pTab, pCsr->iPrevId, &pSelectDocsize);\n        if( rc==SQLITE_OK ){\n          int iCol;\n          const char *a = sqlite3_column_blob(pSelectDocsize, 0);\n          const char *pEnd = a + sqlite3_column_bytes(pSelectDocsize, 0);\n          for(iCol=0; iCol<pInfo->nCol; iCol++){\n            sqlite3_int64 nToken;\n            a += sqlite3Fts3GetVarintBounded(a, pEnd, &nToken);\n            if( a>pEnd ){\n              rc = SQLITE_CORRUPT_VTAB;\n              break;\n            }\n            pInfo->aMatchinfo[iCol] = (u32)nToken;\n          }\n        }\n        sqlite3_reset(pSelectDocsize);\n        break;\n      }\n\n      case FTS3_MATCHINFO_LCS:\n        rc = fts3ExprLoadDoclists(pCsr, 0, 0);\n        if( rc==SQLITE_OK ){\n          rc = fts3MatchinfoLcs(pCsr, pInfo);\n        }\n        break;\n\n      case FTS3_MATCHINFO_LHITS_BM:\n      case FTS3_MATCHINFO_LHITS: {\n        size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);\n        memset(pInfo->aMatchinfo, 0, nZero);\n        rc = fts3ExprLHitGather(pCsr->pExpr, pInfo);\n        break;\n      }\n\n      default: {\n        Fts3Expr *pExpr;\n        assert( zArg[i]==FTS3_MATCHINFO_HITS );\n        pExpr = pCsr->pExpr;\n        rc = fts3ExprLoadDoclists(pCsr, 0, 0);\n        if( rc!=SQLITE_OK ) break;\n        if( bGlobal ){\n          if( pCsr->pDeferred ){\n            rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc,0,0);\n            if( rc!=SQLITE_OK ) break;\n          }\n          rc = sqlite3Fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo);\n          sqlite3Fts3EvalTestDeferred(pCsr, &rc);\n          if( rc!=SQLITE_OK ) break;\n        }\n        (void)sqlite3Fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo);\n        break;\n      }\n    }\n\n    pInfo->aMatchinfo += fts3MatchinfoSize(pInfo, zArg[i]);\n  }\n\n  sqlite3_reset(pSelect);\n  return rc;\n}\n\n\n/*\n** Populate pCsr->aMatchinfo[] with data for the current row. The\n** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).\n*/\nstatic void fts3GetMatchinfo(\n  sqlite3_context *pCtx,        /* Return results here */\n  Fts3Cursor *pCsr,               /* FTS3 Cursor object */\n  const char *zArg                /* Second argument to matchinfo() function */\n){\n  MatchInfo sInfo;\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc = SQLITE_OK;\n  int bGlobal = 0;                /* Collect 'global' stats as well as local */\n\n  u32 *aOut = 0;\n  void (*xDestroyOut)(void*) = 0;\n\n  memset(&sInfo, 0, sizeof(MatchInfo));\n  sInfo.pCursor = pCsr;\n  sInfo.nCol = pTab->nColumn;\n\n  /* If there is cached matchinfo() data, but the format string for the\n  ** cache does not match the format string for this request, discard\n  ** the cached data. */\n  if( pCsr->pMIBuffer && strcmp(pCsr->pMIBuffer->zMatchinfo, zArg) ){\n    sqlite3Fts3MIBufferFree(pCsr->pMIBuffer);\n    pCsr->pMIBuffer = 0;\n  }\n\n  /* If Fts3Cursor.pMIBuffer is NULL, then this is the first time the\n  ** matchinfo function has been called for this query. In this case\n  ** allocate the array used to accumulate the matchinfo data and\n  ** initialize those elements that are constant for every row.\n  */\n  if( pCsr->pMIBuffer==0 ){\n    size_t nMatchinfo = 0;        /* Number of u32 elements in match-info */\n    int i;                        /* Used to iterate through zArg */\n\n    /* Determine the number of phrases in the query */\n    pCsr->nPhrase = fts3ExprPhraseCount(pCsr->pExpr);\n    sInfo.nPhrase = pCsr->nPhrase;\n\n    /* Determine the number of integers in the buffer returned by this call. */\n    for(i=0; zArg[i]; i++){\n      char *zErr = 0;\n      if( fts3MatchinfoCheck(pTab, zArg[i], &zErr) ){\n        sqlite3_result_error(pCtx, zErr, -1);\n        sqlite3_free(zErr);\n        return;\n      }\n      nMatchinfo += fts3MatchinfoSize(&sInfo, zArg[i]);\n    }\n\n    /* Allocate space for Fts3Cursor.aMatchinfo[] and Fts3Cursor.zMatchinfo. */\n    pCsr->pMIBuffer = fts3MIBufferNew(nMatchinfo, zArg);\n    if( !pCsr->pMIBuffer ) rc = SQLITE_NOMEM;\n\n    pCsr->isMatchinfoNeeded = 1;\n    bGlobal = 1;\n  }\n\n  if( rc==SQLITE_OK ){\n    xDestroyOut = fts3MIBufferAlloc(pCsr->pMIBuffer, &aOut);\n    if( xDestroyOut==0 ){\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    sInfo.aMatchinfo = aOut;\n    sInfo.nPhrase = pCsr->nPhrase;\n    rc = fts3MatchinfoValues(pCsr, bGlobal, &sInfo, zArg);\n    if( bGlobal ){\n      fts3MIBufferSetGlobal(pCsr->pMIBuffer);\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx, rc);\n    if( xDestroyOut ) xDestroyOut(aOut);\n  }else{\n    int n = pCsr->pMIBuffer->nElem * sizeof(u32);\n    sqlite3_result_blob(pCtx, aOut, n, xDestroyOut);\n  }\n}\n\n/*\n** Implementation of snippet() function.\n*/\nSQLITE_PRIVATE void sqlite3Fts3Snippet(\n  sqlite3_context *pCtx,          /* SQLite function call context */\n  Fts3Cursor *pCsr,               /* Cursor object */\n  const char *zStart,             /* Snippet start text - \"<b>\" */\n  const char *zEnd,               /* Snippet end text - \"</b>\" */\n  const char *zEllipsis,          /* Snippet ellipsis text - \"<b>...</b>\" */\n  int iCol,                       /* Extract snippet from this column */\n  int nToken                      /* Approximate number of tokens in snippet */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  int rc = SQLITE_OK;\n  int i;\n  StrBuffer res = {0, 0, 0};\n\n  /* The returned text includes up to four fragments of text extracted from\n  ** the data in the current row. The first iteration of the for(...) loop\n  ** below attempts to locate a single fragment of text nToken tokens in\n  ** size that contains at least one instance of all phrases in the query\n  ** expression that appear in the current row. If such a fragment of text\n  ** cannot be found, the second iteration of the loop attempts to locate\n  ** a pair of fragments, and so on.\n  */\n  int nSnippet = 0;               /* Number of fragments in this snippet */\n  SnippetFragment aSnippet[4];    /* Maximum of 4 fragments per snippet */\n  int nFToken = -1;               /* Number of tokens in each fragment */\n\n  if( !pCsr->pExpr ){\n    sqlite3_result_text(pCtx, \"\", 0, SQLITE_STATIC);\n    return;\n  }\n\n  /* Limit the snippet length to 64 tokens. */\n  if( nToken<-64 ) nToken = -64;\n  if( nToken>+64 ) nToken = +64;\n\n  for(nSnippet=1; 1; nSnippet++){\n\n    int iSnip;                    /* Loop counter 0..nSnippet-1 */\n    u64 mCovered = 0;             /* Bitmask of phrases covered by snippet */\n    u64 mSeen = 0;                /* Bitmask of phrases seen by BestSnippet() */\n\n    if( nToken>=0 ){\n      nFToken = (nToken+nSnippet-1) / nSnippet;\n    }else{\n      nFToken = -1 * nToken;\n    }\n\n    for(iSnip=0; iSnip<nSnippet; iSnip++){\n      int iBestScore = -1;        /* Best score of columns checked so far */\n      int iRead;                  /* Used to iterate through columns */\n      SnippetFragment *pFragment = &aSnippet[iSnip];\n\n      memset(pFragment, 0, sizeof(*pFragment));\n\n      /* Loop through all columns of the table being considered for snippets.\n      ** If the iCol argument to this function was negative, this means all\n      ** columns of the FTS3 table. Otherwise, only column iCol is considered.\n      */\n      for(iRead=0; iRead<pTab->nColumn; iRead++){\n        SnippetFragment sF = {0, 0, 0, 0};\n        int iS = 0;\n        if( iCol>=0 && iRead!=iCol ) continue;\n\n        /* Find the best snippet of nFToken tokens in column iRead. */\n        rc = fts3BestSnippet(nFToken, pCsr, iRead, mCovered, &mSeen, &sF, &iS);\n        if( rc!=SQLITE_OK ){\n          goto snippet_out;\n        }\n        if( iS>iBestScore ){\n          *pFragment = sF;\n          iBestScore = iS;\n        }\n      }\n\n      mCovered |= pFragment->covered;\n    }\n\n    /* If all query phrases seen by fts3BestSnippet() are present in at least\n    ** one of the nSnippet snippet fragments, break out of the loop.\n    */\n    assert( (mCovered&mSeen)==mCovered );\n    if( mSeen==mCovered || nSnippet==SizeofArray(aSnippet) ) break;\n  }\n\n  assert( nFToken>0 );\n\n  for(i=0; i<nSnippet && rc==SQLITE_OK; i++){\n    rc = fts3SnippetText(pCsr, &aSnippet[i],\n        i, (i==nSnippet-1), nFToken, zStart, zEnd, zEllipsis, &res\n    );\n  }\n\n snippet_out:\n  sqlite3Fts3SegmentsClose(pTab);\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx, rc);\n    sqlite3_free(res.z);\n  }else{\n    sqlite3_result_text(pCtx, res.z, -1, sqlite3_free);\n  }\n}\n\n\ntypedef struct TermOffset TermOffset;\ntypedef struct TermOffsetCtx TermOffsetCtx;\n\nstruct TermOffset {\n  char *pList;                    /* Position-list */\n  i64 iPos;                       /* Position just read from pList */\n  i64 iOff;                       /* Offset of this term from read positions */\n};\n\nstruct TermOffsetCtx {\n  Fts3Cursor *pCsr;\n  int iCol;                       /* Column of table to populate aTerm for */\n  int iTerm;\n  sqlite3_int64 iDocid;\n  TermOffset *aTerm;\n};\n\n/*\n** This function is an sqlite3Fts3ExprIterate() callback used by sqlite3Fts3Offsets().\n*/\nstatic int fts3ExprTermOffsetInit(Fts3Expr *pExpr, int iPhrase, void *ctx){\n  TermOffsetCtx *p = (TermOffsetCtx *)ctx;\n  int nTerm;                      /* Number of tokens in phrase */\n  int iTerm;                      /* For looping through nTerm phrase terms */\n  char *pList;                    /* Pointer to position list for phrase */\n  i64 iPos = 0;                   /* First position in position-list */\n  int rc;\n\n  UNUSED_PARAMETER(iPhrase);\n  rc = sqlite3Fts3EvalPhrasePoslist(p->pCsr, pExpr, p->iCol, &pList);\n  nTerm = pExpr->pPhrase->nToken;\n  if( pList ){\n    fts3GetDeltaPosition(&pList, &iPos);\n    assert_fts3_nc( iPos>=0 );\n  }\n\n  for(iTerm=0; iTerm<nTerm; iTerm++){\n    TermOffset *pT = &p->aTerm[p->iTerm++];\n    pT->iOff = nTerm-iTerm-1;\n    pT->pList = pList;\n    pT->iPos = iPos;\n  }\n\n  return rc;\n}\n\n/*\n** If expression pExpr is a phrase expression that uses an MSR query,\n** restart it as a regular, non-incremental query. Return SQLITE_OK\n** if successful, or an SQLite error code otherwise.\n*/\nstatic int fts3ExprRestartIfCb(Fts3Expr *pExpr, int iPhrase, void *ctx){\n  TermOffsetCtx *p = (TermOffsetCtx*)ctx;\n  int rc = SQLITE_OK;\n  UNUSED_PARAMETER(iPhrase);\n  if( pExpr->pPhrase && pExpr->pPhrase->bIncr ){\n    rc = sqlite3Fts3MsrCancel(p->pCsr, pExpr);\n    pExpr->pPhrase->bIncr = 0;\n  }\n  return rc;\n}\n\n/*\n** Implementation of offsets() function.\n*/\nSQLITE_PRIVATE void sqlite3Fts3Offsets(\n  sqlite3_context *pCtx,          /* SQLite function call context */\n  Fts3Cursor *pCsr                /* Cursor object */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  sqlite3_tokenizer_module const *pMod = pTab->pTokenizer->pModule;\n  int rc;                         /* Return Code */\n  int nToken;                     /* Number of tokens in query */\n  int iCol;                       /* Column currently being processed */\n  StrBuffer res = {0, 0, 0};      /* Result string */\n  TermOffsetCtx sCtx;             /* Context for fts3ExprTermOffsetInit() */\n\n  if( !pCsr->pExpr ){\n    sqlite3_result_text(pCtx, \"\", 0, SQLITE_STATIC);\n    return;\n  }\n\n  memset(&sCtx, 0, sizeof(sCtx));\n  assert( pCsr->isRequireSeek==0 );\n\n  /* Count the number of terms in the query */\n  rc = fts3ExprLoadDoclists(pCsr, 0, &nToken);\n  if( rc!=SQLITE_OK ) goto offsets_out;\n\n  /* Allocate the array of TermOffset iterators. */\n  sCtx.aTerm = (TermOffset *)sqlite3Fts3MallocZero(sizeof(TermOffset)*nToken);\n  if( 0==sCtx.aTerm ){\n    rc = SQLITE_NOMEM;\n    goto offsets_out;\n  }\n  sCtx.iDocid = pCsr->iPrevId;\n  sCtx.pCsr = pCsr;\n\n  /* If a query restart will be required, do it here, rather than later of\n  ** after pointers to poslist buffers that may be invalidated by a restart\n  ** have been saved.  */\n  rc = sqlite3Fts3ExprIterate(pCsr->pExpr, fts3ExprRestartIfCb, (void*)&sCtx);\n  if( rc!=SQLITE_OK ) goto offsets_out;\n\n  /* Loop through the table columns, appending offset information to\n  ** string-buffer res for each column.\n  */\n  for(iCol=0; iCol<pTab->nColumn; iCol++){\n    sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */\n    const char *ZDUMMY;           /* Dummy argument used with xNext() */\n    int NDUMMY = 0;               /* Dummy argument used with xNext() */\n    int iStart = 0;\n    int iEnd = 0;\n    int iCurrent = 0;\n    const char *zDoc;\n    int nDoc;\n\n    /* Initialize the contents of sCtx.aTerm[] for column iCol. This\n    ** operation may fail if the database contains corrupt records.\n    */\n    sCtx.iCol = iCol;\n    sCtx.iTerm = 0;\n    rc = sqlite3Fts3ExprIterate(\n        pCsr->pExpr, fts3ExprTermOffsetInit, (void*)&sCtx\n    );\n    if( rc!=SQLITE_OK ) goto offsets_out;\n\n    /* Retreive the text stored in column iCol. If an SQL NULL is stored\n    ** in column iCol, jump immediately to the next iteration of the loop.\n    ** If an OOM occurs while retrieving the data (this can happen if SQLite\n    ** needs to transform the data from utf-16 to utf-8), return SQLITE_NOMEM\n    ** to the caller.\n    */\n    zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1);\n    nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol+1);\n    if( zDoc==0 ){\n      if( sqlite3_column_type(pCsr->pStmt, iCol+1)==SQLITE_NULL ){\n        continue;\n      }\n      rc = SQLITE_NOMEM;\n      goto offsets_out;\n    }\n\n    /* Initialize a tokenizer iterator to iterate through column iCol. */\n    rc = sqlite3Fts3OpenTokenizer(pTab->pTokenizer, pCsr->iLangid,\n        zDoc, nDoc, &pC\n    );\n    if( rc!=SQLITE_OK ) goto offsets_out;\n\n    rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);\n    while( rc==SQLITE_OK ){\n      int i;                      /* Used to loop through terms */\n      int iMinPos = 0x7FFFFFFF;   /* Position of next token */\n      TermOffset *pTerm = 0;      /* TermOffset associated with next token */\n\n      for(i=0; i<nToken; i++){\n        TermOffset *pT = &sCtx.aTerm[i];\n        if( pT->pList && (pT->iPos-pT->iOff)<iMinPos ){\n          iMinPos = pT->iPos-pT->iOff;\n          pTerm = pT;\n        }\n      }\n\n      if( !pTerm ){\n        /* All offsets for this column have been gathered. */\n        rc = SQLITE_DONE;\n      }else{\n        assert_fts3_nc( iCurrent<=iMinPos );\n        if( 0==(0xFE&*pTerm->pList) ){\n          pTerm->pList = 0;\n        }else{\n          fts3GetDeltaPosition(&pTerm->pList, &pTerm->iPos);\n        }\n        while( rc==SQLITE_OK && iCurrent<iMinPos ){\n          rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);\n        }\n        if( rc==SQLITE_OK ){\n          char aBuffer[64];\n          sqlite3_snprintf(sizeof(aBuffer), aBuffer,\n              \"%d %d %d %d \", iCol, pTerm-sCtx.aTerm, iStart, iEnd-iStart\n          );\n          rc = fts3StringAppend(&res, aBuffer, -1);\n        }else if( rc==SQLITE_DONE && pTab->zContentTbl==0 ){\n          rc = FTS_CORRUPT_VTAB;\n        }\n      }\n    }\n    if( rc==SQLITE_DONE ){\n      rc = SQLITE_OK;\n    }\n\n    pMod->xClose(pC);\n    if( rc!=SQLITE_OK ) goto offsets_out;\n  }\n\n offsets_out:\n  sqlite3_free(sCtx.aTerm);\n  assert( rc!=SQLITE_DONE );\n  sqlite3Fts3SegmentsClose(pTab);\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx,  rc);\n    sqlite3_free(res.z);\n  }else{\n    sqlite3_result_text(pCtx, res.z, res.n-1, sqlite3_free);\n  }\n  return;\n}\n\n/*\n** Implementation of matchinfo() function.\n*/\nSQLITE_PRIVATE void sqlite3Fts3Matchinfo(\n  sqlite3_context *pContext,      /* Function call context */\n  Fts3Cursor *pCsr,               /* FTS3 table cursor */\n  const char *zArg                /* Second arg to matchinfo() function */\n){\n  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;\n  const char *zFormat;\n\n  if( zArg ){\n    zFormat = zArg;\n  }else{\n    zFormat = FTS3_MATCHINFO_DEFAULT;\n  }\n\n  if( !pCsr->pExpr ){\n    sqlite3_result_blob(pContext, \"\", 0, SQLITE_STATIC);\n    return;\n  }else{\n    /* Retrieve matchinfo() data. */\n    fts3GetMatchinfo(pContext, pCsr, zFormat);\n    sqlite3Fts3SegmentsClose(pTab);\n  }\n}\n\n#endif\n\n/************** End of fts3_snippet.c ****************************************/\n/************** Begin file fts3_unicode.c ************************************/\n/*\n** 2012 May 24\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Implementation of the \"unicode\" full-text-search tokenizer.\n*/\n\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\n\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n/* #include <stdio.h> */\n/* #include <string.h> */\n\n/* #include \"fts3_tokenizer.h\" */\n\n/*\n** The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied\n** from the sqlite3 source file utf.c. If this file is compiled as part\n** of the amalgamation, they are not required.\n*/\n#ifndef SQLITE_AMALGAMATION\n\nstatic const unsigned char sqlite3Utf8Trans1[] = {\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,\n};\n\n#define READ_UTF8(zIn, zTerm, c)                           \\\n  c = *(zIn++);                                            \\\n  if( c>=0xc0 ){                                           \\\n    c = sqlite3Utf8Trans1[c-0xc0];                         \\\n    while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){            \\\n      c = (c<<6) + (0x3f & *(zIn++));                      \\\n    }                                                      \\\n    if( c<0x80                                             \\\n        || (c&0xFFFFF800)==0xD800                          \\\n        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \\\n  }\n\n#define WRITE_UTF8(zOut, c) {                          \\\n  if( c<0x00080 ){                                     \\\n    *zOut++ = (u8)(c&0xFF);                            \\\n  }                                                    \\\n  else if( c<0x00800 ){                                \\\n    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }                                                    \\\n  else if( c<0x10000 ){                                \\\n    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \\\n    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }else{                                               \\\n    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \\\n    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \\\n    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n  }                                                    \\\n}\n\n#endif /* ifndef SQLITE_AMALGAMATION */\n\ntypedef struct unicode_tokenizer unicode_tokenizer;\ntypedef struct unicode_cursor unicode_cursor;\n\nstruct unicode_tokenizer {\n  sqlite3_tokenizer base;\n  int eRemoveDiacritic;\n  int nException;\n  int *aiException;\n};\n\nstruct unicode_cursor {\n  sqlite3_tokenizer_cursor base;\n  const unsigned char *aInput;    /* Input text being tokenized */\n  int nInput;                     /* Size of aInput[] in bytes */\n  int iOff;                       /* Current offset within aInput[] */\n  int iToken;                     /* Index of next token to be returned */\n  char *zToken;                   /* storage for current token */\n  int nAlloc;                     /* space allocated at zToken */\n};\n\n\n/*\n** Destroy a tokenizer allocated by unicodeCreate().\n*/\nstatic int unicodeDestroy(sqlite3_tokenizer *pTokenizer){\n  if( pTokenizer ){\n    unicode_tokenizer *p = (unicode_tokenizer *)pTokenizer;\n    sqlite3_free(p->aiException);\n    sqlite3_free(p);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** As part of a tokenchars= or separators= option, the CREATE VIRTUAL TABLE\n** statement has specified that the tokenizer for this table shall consider\n** all characters in string zIn/nIn to be separators (if bAlnum==0) or\n** token characters (if bAlnum==1).\n**\n** For each codepoint in the zIn/nIn string, this function checks if the\n** sqlite3FtsUnicodeIsalnum() function already returns the desired result.\n** If so, no action is taken. Otherwise, the codepoint is added to the\n** unicode_tokenizer.aiException[] array. For the purposes of tokenization,\n** the return value of sqlite3FtsUnicodeIsalnum() is inverted for all\n** codepoints in the aiException[] array.\n**\n** If a standalone diacritic mark (one that sqlite3FtsUnicodeIsdiacritic()\n** identifies as a diacritic) occurs in the zIn/nIn string it is ignored.\n** It is not possible to change the behavior of the tokenizer with respect\n** to these codepoints.\n*/\nstatic int unicodeAddExceptions(\n  unicode_tokenizer *p,           /* Tokenizer to add exceptions to */\n  int bAlnum,                     /* Replace Isalnum() return value with this */\n  const char *zIn,                /* Array of characters to make exceptions */\n  int nIn                         /* Length of z in bytes */\n){\n  const unsigned char *z = (const unsigned char *)zIn;\n  const unsigned char *zTerm = &z[nIn];\n  unsigned int iCode;\n  int nEntry = 0;\n\n  assert( bAlnum==0 || bAlnum==1 );\n\n  while( z<zTerm ){\n    READ_UTF8(z, zTerm, iCode);\n    assert( (sqlite3FtsUnicodeIsalnum((int)iCode) & 0xFFFFFFFE)==0 );\n    if( sqlite3FtsUnicodeIsalnum((int)iCode)!=bAlnum\n     && sqlite3FtsUnicodeIsdiacritic((int)iCode)==0\n    ){\n      nEntry++;\n    }\n  }\n\n  if( nEntry ){\n    int *aNew;                    /* New aiException[] array */\n    int nNew;                     /* Number of valid entries in array aNew[] */\n\n    aNew = sqlite3_realloc64(p->aiException,(p->nException+nEntry)*sizeof(int));\n    if( aNew==0 ) return SQLITE_NOMEM;\n    nNew = p->nException;\n\n    z = (const unsigned char *)zIn;\n    while( z<zTerm ){\n      READ_UTF8(z, zTerm, iCode);\n      if( sqlite3FtsUnicodeIsalnum((int)iCode)!=bAlnum\n       && sqlite3FtsUnicodeIsdiacritic((int)iCode)==0\n      ){\n        int i, j;\n        for(i=0; i<nNew && aNew[i]<(int)iCode; i++);\n        for(j=nNew; j>i; j--) aNew[j] = aNew[j-1];\n        aNew[i] = (int)iCode;\n        nNew++;\n      }\n    }\n    p->aiException = aNew;\n    p->nException = nNew;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Return true if the p->aiException[] array contains the value iCode.\n*/\nstatic int unicodeIsException(unicode_tokenizer *p, int iCode){\n  if( p->nException>0 ){\n    int *a = p->aiException;\n    int iLo = 0;\n    int iHi = p->nException-1;\n\n    while( iHi>=iLo ){\n      int iTest = (iHi + iLo) / 2;\n      if( iCode==a[iTest] ){\n        return 1;\n      }else if( iCode>a[iTest] ){\n        iLo = iTest+1;\n      }else{\n        iHi = iTest-1;\n      }\n    }\n  }\n\n  return 0;\n}\n\n/*\n** Return true if, for the purposes of tokenization, codepoint iCode is\n** considered a token character (not a separator).\n*/\nstatic int unicodeIsAlnum(unicode_tokenizer *p, int iCode){\n  assert( (sqlite3FtsUnicodeIsalnum(iCode) & 0xFFFFFFFE)==0 );\n  return sqlite3FtsUnicodeIsalnum(iCode) ^ unicodeIsException(p, iCode);\n}\n\n/*\n** Create a new tokenizer instance.\n*/\nstatic int unicodeCreate(\n  int nArg,                       /* Size of array argv[] */\n  const char * const *azArg,      /* Tokenizer creation arguments */\n  sqlite3_tokenizer **pp          /* OUT: New tokenizer handle */\n){\n  unicode_tokenizer *pNew;        /* New tokenizer object */\n  int i;\n  int rc = SQLITE_OK;\n\n  pNew = (unicode_tokenizer *) sqlite3_malloc(sizeof(unicode_tokenizer));\n  if( pNew==NULL ) return SQLITE_NOMEM;\n  memset(pNew, 0, sizeof(unicode_tokenizer));\n  pNew->eRemoveDiacritic = 1;\n\n  for(i=0; rc==SQLITE_OK && i<nArg; i++){\n    const char *z = azArg[i];\n    int n = (int)strlen(z);\n\n    if( n==19 && memcmp(\"remove_diacritics=1\", z, 19)==0 ){\n      pNew->eRemoveDiacritic = 1;\n    }\n    else if( n==19 && memcmp(\"remove_diacritics=0\", z, 19)==0 ){\n      pNew->eRemoveDiacritic = 0;\n    }\n    else if( n==19 && memcmp(\"remove_diacritics=2\", z, 19)==0 ){\n      pNew->eRemoveDiacritic = 2;\n    }\n    else if( n>=11 && memcmp(\"tokenchars=\", z, 11)==0 ){\n      rc = unicodeAddExceptions(pNew, 1, &z[11], n-11);\n    }\n    else if( n>=11 && memcmp(\"separators=\", z, 11)==0 ){\n      rc = unicodeAddExceptions(pNew, 0, &z[11], n-11);\n    }\n    else{\n      /* Unrecognized argument */\n      rc  = SQLITE_ERROR;\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    unicodeDestroy((sqlite3_tokenizer *)pNew);\n    pNew = 0;\n  }\n  *pp = (sqlite3_tokenizer *)pNew;\n  return rc;\n}\n\n/*\n** Prepare to begin tokenizing a particular string.  The input\n** string to be tokenized is pInput[0..nBytes-1].  A cursor\n** used to incrementally tokenize this string is returned in\n** *ppCursor.\n*/\nstatic int unicodeOpen(\n  sqlite3_tokenizer *p,           /* The tokenizer */\n  const char *aInput,             /* Input string */\n  int nInput,                     /* Size of string aInput in bytes */\n  sqlite3_tokenizer_cursor **pp   /* OUT: New cursor object */\n){\n  unicode_cursor *pCsr;\n\n  pCsr = (unicode_cursor *)sqlite3_malloc(sizeof(unicode_cursor));\n  if( pCsr==0 ){\n    return SQLITE_NOMEM;\n  }\n  memset(pCsr, 0, sizeof(unicode_cursor));\n\n  pCsr->aInput = (const unsigned char *)aInput;\n  if( aInput==0 ){\n    pCsr->nInput = 0;\n    pCsr->aInput = (const unsigned char*)\"\";\n  }else if( nInput<0 ){\n    pCsr->nInput = (int)strlen(aInput);\n  }else{\n    pCsr->nInput = nInput;\n  }\n\n  *pp = &pCsr->base;\n  UNUSED_PARAMETER(p);\n  return SQLITE_OK;\n}\n\n/*\n** Close a tokenization cursor previously opened by a call to\n** simpleOpen() above.\n*/\nstatic int unicodeClose(sqlite3_tokenizer_cursor *pCursor){\n  unicode_cursor *pCsr = (unicode_cursor *) pCursor;\n  sqlite3_free(pCsr->zToken);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** Extract the next token from a tokenization cursor.  The cursor must\n** have been opened by a prior call to simpleOpen().\n*/\nstatic int unicodeNext(\n  sqlite3_tokenizer_cursor *pC,   /* Cursor returned by simpleOpen */\n  const char **paToken,           /* OUT: Token text */\n  int *pnToken,                   /* OUT: Number of bytes at *paToken */\n  int *piStart,                   /* OUT: Starting offset of token */\n  int *piEnd,                     /* OUT: Ending offset of token */\n  int *piPos                      /* OUT: Position integer of token */\n){\n  unicode_cursor *pCsr = (unicode_cursor *)pC;\n  unicode_tokenizer *p = ((unicode_tokenizer *)pCsr->base.pTokenizer);\n  unsigned int iCode = 0;\n  char *zOut;\n  const unsigned char *z = &pCsr->aInput[pCsr->iOff];\n  const unsigned char *zStart = z;\n  const unsigned char *zEnd;\n  const unsigned char *zTerm = &pCsr->aInput[pCsr->nInput];\n\n  /* Scan past any delimiter characters before the start of the next token.\n  ** Return SQLITE_DONE early if this takes us all the way to the end of\n  ** the input.  */\n  while( z<zTerm ){\n    READ_UTF8(z, zTerm, iCode);\n    if( unicodeIsAlnum(p, (int)iCode) ) break;\n    zStart = z;\n  }\n  if( zStart>=zTerm ) return SQLITE_DONE;\n\n  zOut = pCsr->zToken;\n  do {\n    int iOut;\n\n    /* Grow the output buffer if required. */\n    if( (zOut-pCsr->zToken)>=(pCsr->nAlloc-4) ){\n      char *zNew = sqlite3_realloc64(pCsr->zToken, pCsr->nAlloc+64);\n      if( !zNew ) return SQLITE_NOMEM;\n      zOut = &zNew[zOut - pCsr->zToken];\n      pCsr->zToken = zNew;\n      pCsr->nAlloc += 64;\n    }\n\n    /* Write the folded case of the last character read to the output */\n    zEnd = z;\n    iOut = sqlite3FtsUnicodeFold((int)iCode, p->eRemoveDiacritic);\n    if( iOut ){\n      WRITE_UTF8(zOut, iOut);\n    }\n\n    /* If the cursor is not at EOF, read the next character */\n    if( z>=zTerm ) break;\n    READ_UTF8(z, zTerm, iCode);\n  }while( unicodeIsAlnum(p, (int)iCode)\n       || sqlite3FtsUnicodeIsdiacritic((int)iCode)\n  );\n\n  /* Set the output variables and return. */\n  pCsr->iOff = (int)(z - pCsr->aInput);\n  *paToken = pCsr->zToken;\n  *pnToken = (int)(zOut - pCsr->zToken);\n  *piStart = (int)(zStart - pCsr->aInput);\n  *piEnd = (int)(zEnd - pCsr->aInput);\n  *piPos = pCsr->iToken++;\n  return SQLITE_OK;\n}\n\n/*\n** Set *ppModule to a pointer to the sqlite3_tokenizer_module\n** structure for the unicode tokenizer.\n*/\nSQLITE_PRIVATE void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const **ppModule){\n  static const sqlite3_tokenizer_module module = {\n    0,\n    unicodeCreate,\n    unicodeDestroy,\n    unicodeOpen,\n    unicodeClose,\n    unicodeNext,\n    0,\n  };\n  *ppModule = &module;\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n#endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */\n\n/************** End of fts3_unicode.c ****************************************/\n/************** Begin file fts3_unicode2.c ***********************************/\n/*\n** 2012-05-25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n/*\n** DO NOT EDIT THIS MACHINE GENERATED FILE.\n*/\n\n#ifndef SQLITE_DISABLE_FTS3_UNICODE\n#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)\n\n/* #include <assert.h> */\n\n/*\n** Return true if the argument corresponds to a unicode codepoint\n** classified as either a letter or a number. Otherwise false.\n**\n** The results are undefined if the value passed to this function\n** is less than zero.\n*/\nSQLITE_PRIVATE int sqlite3FtsUnicodeIsalnum(int c){\n  /* Each unsigned integer in the following array corresponds to a contiguous\n  ** range of unicode codepoints that are not either letters or numbers (i.e.\n  ** codepoints for which this function should return 0).\n  **\n  ** The most significant 22 bits in each 32-bit value contain the first\n  ** codepoint in the range. The least significant 10 bits are used to store\n  ** the size of the range (always at least 1). In other words, the value\n  ** ((C<<22) + N) represents a range of N codepoints starting with codepoint\n  ** C. It is not possible to represent a range larger than 1023 codepoints\n  ** using this format.\n  */\n  static const unsigned int aEntry[] = {\n    0x00000030, 0x0000E807, 0x00016C06, 0x0001EC2F, 0x0002AC07,\n    0x0002D001, 0x0002D803, 0x0002EC01, 0x0002FC01, 0x00035C01,\n    0x0003DC01, 0x000B0804, 0x000B480E, 0x000B9407, 0x000BB401,\n    0x000BBC81, 0x000DD401, 0x000DF801, 0x000E1002, 0x000E1C01,\n    0x000FD801, 0x00120808, 0x00156806, 0x00162402, 0x00163C01,\n    0x00164437, 0x0017CC02, 0x00180005, 0x00181816, 0x00187802,\n    0x00192C15, 0x0019A804, 0x0019C001, 0x001B5001, 0x001B580F,\n    0x001B9C07, 0x001BF402, 0x001C000E, 0x001C3C01, 0x001C4401,\n    0x001CC01B, 0x001E980B, 0x001FAC09, 0x001FD804, 0x00205804,\n    0x00206C09, 0x00209403, 0x0020A405, 0x0020C00F, 0x00216403,\n    0x00217801, 0x0023901B, 0x00240004, 0x0024E803, 0x0024F812,\n    0x00254407, 0x00258804, 0x0025C001, 0x00260403, 0x0026F001,\n    0x0026F807, 0x00271C02, 0x00272C03, 0x00275C01, 0x00278802,\n    0x0027C802, 0x0027E802, 0x00280403, 0x0028F001, 0x0028F805,\n    0x00291C02, 0x00292C03, 0x00294401, 0x0029C002, 0x0029D401,\n    0x002A0403, 0x002AF001, 0x002AF808, 0x002B1C03, 0x002B2C03,\n    0x002B8802, 0x002BC002, 0x002C0403, 0x002CF001, 0x002CF807,\n    0x002D1C02, 0x002D2C03, 0x002D5802, 0x002D8802, 0x002DC001,\n    0x002E0801, 0x002EF805, 0x002F1803, 0x002F2804, 0x002F5C01,\n    0x002FCC08, 0x00300403, 0x0030F807, 0x00311803, 0x00312804,\n    0x00315402, 0x00318802, 0x0031FC01, 0x00320802, 0x0032F001,\n    0x0032F807, 0x00331803, 0x00332804, 0x00335402, 0x00338802,\n    0x00340802, 0x0034F807, 0x00351803, 0x00352804, 0x00355C01,\n    0x00358802, 0x0035E401, 0x00360802, 0x00372801, 0x00373C06,\n    0x00375801, 0x00376008, 0x0037C803, 0x0038C401, 0x0038D007,\n    0x0038FC01, 0x00391C09, 0x00396802, 0x003AC401, 0x003AD006,\n    0x003AEC02, 0x003B2006, 0x003C041F, 0x003CD00C, 0x003DC417,\n    0x003E340B, 0x003E6424, 0x003EF80F, 0x003F380D, 0x0040AC14,\n    0x00412806, 0x00415804, 0x00417803, 0x00418803, 0x00419C07,\n    0x0041C404, 0x0042080C, 0x00423C01, 0x00426806, 0x0043EC01,\n    0x004D740C, 0x004E400A, 0x00500001, 0x0059B402, 0x005A0001,\n    0x005A6C02, 0x005BAC03, 0x005C4803, 0x005CC805, 0x005D4802,\n    0x005DC802, 0x005ED023, 0x005F6004, 0x005F7401, 0x0060000F,\n    0x0062A401, 0x0064800C, 0x0064C00C, 0x00650001, 0x00651002,\n    0x0066C011, 0x00672002, 0x00677822, 0x00685C05, 0x00687802,\n    0x0069540A, 0x0069801D, 0x0069FC01, 0x006A8007, 0x006AA006,\n    0x006C0005, 0x006CD011, 0x006D6823, 0x006E0003, 0x006E840D,\n    0x006F980E, 0x006FF004, 0x00709014, 0x0070EC05, 0x0071F802,\n    0x00730008, 0x00734019, 0x0073B401, 0x0073C803, 0x00770027,\n    0x0077F004, 0x007EF401, 0x007EFC03, 0x007F3403, 0x007F7403,\n    0x007FB403, 0x007FF402, 0x00800065, 0x0081A806, 0x0081E805,\n    0x00822805, 0x0082801A, 0x00834021, 0x00840002, 0x00840C04,\n    0x00842002, 0x00845001, 0x00845803, 0x00847806, 0x00849401,\n    0x00849C01, 0x0084A401, 0x0084B801, 0x0084E802, 0x00850005,\n    0x00852804, 0x00853C01, 0x00864264, 0x00900027, 0x0091000B,\n    0x0092704E, 0x00940200, 0x009C0475, 0x009E53B9, 0x00AD400A,\n    0x00B39406, 0x00B3BC03, 0x00B3E404, 0x00B3F802, 0x00B5C001,\n    0x00B5FC01, 0x00B7804F, 0x00B8C00C, 0x00BA001A, 0x00BA6C59,\n    0x00BC00D6, 0x00BFC00C, 0x00C00005, 0x00C02019, 0x00C0A807,\n    0x00C0D802, 0x00C0F403, 0x00C26404, 0x00C28001, 0x00C3EC01,\n    0x00C64002, 0x00C6580A, 0x00C70024, 0x00C8001F, 0x00C8A81E,\n    0x00C94001, 0x00C98020, 0x00CA2827, 0x00CB003F, 0x00CC0100,\n    0x01370040, 0x02924037, 0x0293F802, 0x02983403, 0x0299BC10,\n    0x029A7C01, 0x029BC008, 0x029C0017, 0x029C8002, 0x029E2402,\n    0x02A00801, 0x02A01801, 0x02A02C01, 0x02A08C09, 0x02A0D804,\n    0x02A1D004, 0x02A20002, 0x02A2D011, 0x02A33802, 0x02A38012,\n    0x02A3E003, 0x02A4980A, 0x02A51C0D, 0x02A57C01, 0x02A60004,\n    0x02A6CC1B, 0x02A77802, 0x02A8A40E, 0x02A90C01, 0x02A93002,\n    0x02A97004, 0x02A9DC03, 0x02A9EC01, 0x02AAC001, 0x02AAC803,\n    0x02AADC02, 0x02AAF802, 0x02AB0401, 0x02AB7802, 0x02ABAC07,\n    0x02ABD402, 0x02AF8C0B, 0x03600001, 0x036DFC02, 0x036FFC02,\n    0x037FFC01, 0x03EC7801, 0x03ECA401, 0x03EEC810, 0x03F4F802,\n    0x03F7F002, 0x03F8001A, 0x03F88007, 0x03F8C023, 0x03F95013,\n    0x03F9A004, 0x03FBFC01, 0x03FC040F, 0x03FC6807, 0x03FCEC06,\n    0x03FD6C0B, 0x03FF8007, 0x03FFA007, 0x03FFE405, 0x04040003,\n    0x0404DC09, 0x0405E411, 0x0406400C, 0x0407402E, 0x040E7C01,\n    0x040F4001, 0x04215C01, 0x04247C01, 0x0424FC01, 0x04280403,\n    0x04281402, 0x04283004, 0x0428E003, 0x0428FC01, 0x04294009,\n    0x0429FC01, 0x042CE407, 0x04400003, 0x0440E016, 0x04420003,\n    0x0442C012, 0x04440003, 0x04449C0E, 0x04450004, 0x04460003,\n    0x0446CC0E, 0x04471404, 0x045AAC0D, 0x0491C004, 0x05BD442E,\n    0x05BE3C04, 0x074000F6, 0x07440027, 0x0744A4B5, 0x07480046,\n    0x074C0057, 0x075B0401, 0x075B6C01, 0x075BEC01, 0x075C5401,\n    0x075CD401, 0x075D3C01, 0x075DBC01, 0x075E2401, 0x075EA401,\n    0x075F0C01, 0x07BBC002, 0x07C0002C, 0x07C0C064, 0x07C2800F,\n    0x07C2C40E, 0x07C3040F, 0x07C3440F, 0x07C4401F, 0x07C4C03C,\n    0x07C5C02B, 0x07C7981D, 0x07C8402B, 0x07C90009, 0x07C94002,\n    0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014, 0x07CE8025,\n    0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001, 0x07D108B6,\n    0x07D3E404, 0x07D4003E, 0x07D50004, 0x07D54018, 0x07D7EC46,\n    0x07D9140B, 0x07DA0046, 0x07DC0074, 0x38000401, 0x38008060,\n    0x380400F0,\n  };\n  static const unsigned int aAscii[4] = {\n    0xFFFFFFFF, 0xFC00FFFF, 0xF8000001, 0xF8000001,\n  };\n\n  if( (unsigned int)c<128 ){\n    return ( (aAscii[c >> 5] & ((unsigned int)1 << (c & 0x001F)))==0 );\n  }else if( (unsigned int)c<(1<<22) ){\n    unsigned int key = (((unsigned int)c)<<10) | 0x000003FF;\n    int iRes = 0;\n    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;\n    int iLo = 0;\n    while( iHi>=iLo ){\n      int iTest = (iHi + iLo) / 2;\n      if( key >= aEntry[iTest] ){\n        iRes = iTest;\n        iLo = iTest+1;\n      }else{\n        iHi = iTest-1;\n      }\n    }\n    assert( aEntry[0]<key );\n    assert( key>=aEntry[iRes] );\n    return (((unsigned int)c) >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));\n  }\n  return 1;\n}\n\n\n/*\n** If the argument is a codepoint corresponding to a lowercase letter\n** in the ASCII range with a diacritic added, return the codepoint\n** of the ASCII letter only. For example, if passed 235 - \"LATIN\n** SMALL LETTER E WITH DIAERESIS\" - return 65 (\"LATIN SMALL LETTER\n** E\"). The resuls of passing a codepoint that corresponds to an\n** uppercase letter are undefined.\n*/\nstatic int remove_diacritic(int c, int bComplex){\n  unsigned short aDia[] = {\n        0,  1797,  1848,  1859,  1891,  1928,  1940,  1995,\n     2024,  2040,  2060,  2110,  2168,  2206,  2264,  2286,\n     2344,  2383,  2472,  2488,  2516,  2596,  2668,  2732,\n     2782,  2842,  2894,  2954,  2984,  3000,  3028,  3336,\n     3456,  3696,  3712,  3728,  3744,  3766,  3832,  3896,\n     3912,  3928,  3944,  3968,  4008,  4040,  4056,  4106,\n     4138,  4170,  4202,  4234,  4266,  4296,  4312,  4344,\n     4408,  4424,  4442,  4472,  4488,  4504,  6148,  6198,\n     6264,  6280,  6360,  6429,  6505,  6529, 61448, 61468,\n    61512, 61534, 61592, 61610, 61642, 61672, 61688, 61704,\n    61726, 61784, 61800, 61816, 61836, 61880, 61896, 61914,\n    61948, 61998, 62062, 62122, 62154, 62184, 62200, 62218,\n    62252, 62302, 62364, 62410, 62442, 62478, 62536, 62554,\n    62584, 62604, 62640, 62648, 62656, 62664, 62730, 62766,\n    62830, 62890, 62924, 62974, 63032, 63050, 63082, 63118,\n    63182, 63242, 63274, 63310, 63368, 63390,\n  };\n#define HIBIT ((unsigned char)0x80)\n  unsigned char aChar[] = {\n    '\\0',      'a',       'c',       'e',       'i',       'n',\n    'o',       'u',       'y',       'y',       'a',       'c',\n    'd',       'e',       'e',       'g',       'h',       'i',\n    'j',       'k',       'l',       'n',       'o',       'r',\n    's',       't',       'u',       'u',       'w',       'y',\n    'z',       'o',       'u',       'a',       'i',       'o',\n    'u',       'u'|HIBIT, 'a'|HIBIT, 'g',       'k',       'o',\n    'o'|HIBIT, 'j',       'g',       'n',       'a'|HIBIT, 'a',\n    'e',       'i',       'o',       'r',       'u',       's',\n    't',       'h',       'a',       'e',       'o'|HIBIT, 'o',\n    'o'|HIBIT, 'y',       '\\0',      '\\0',      '\\0',      '\\0',\n    '\\0',      '\\0',      '\\0',      '\\0',      'a',       'b',\n    'c'|HIBIT, 'd',       'd',       'e'|HIBIT, 'e',       'e'|HIBIT,\n    'f',       'g',       'h',       'h',       'i',       'i'|HIBIT,\n    'k',       'l',       'l'|HIBIT, 'l',       'm',       'n',\n    'o'|HIBIT, 'p',       'r',       'r'|HIBIT, 'r',       's',\n    's'|HIBIT, 't',       'u',       'u'|HIBIT, 'v',       'w',\n    'w',       'x',       'y',       'z',       'h',       't',\n    'w',       'y',       'a',       'a'|HIBIT, 'a'|HIBIT, 'a'|HIBIT,\n    'e',       'e'|HIBIT, 'e'|HIBIT, 'i',       'o',       'o'|HIBIT,\n    'o'|HIBIT, 'o'|HIBIT, 'u',       'u'|HIBIT, 'u'|HIBIT, 'y',\n  };\n\n  unsigned int key = (((unsigned int)c)<<3) | 0x00000007;\n  int iRes = 0;\n  int iHi = sizeof(aDia)/sizeof(aDia[0]) - 1;\n  int iLo = 0;\n  while( iHi>=iLo ){\n    int iTest = (iHi + iLo) / 2;\n    if( key >= aDia[iTest] ){\n      iRes = iTest;\n      iLo = iTest+1;\n    }else{\n      iHi = iTest-1;\n    }\n  }\n  assert( key>=aDia[iRes] );\n  if( bComplex==0 && (aChar[iRes] & 0x80) ) return c;\n  return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : ((int)aChar[iRes] & 0x7F);\n}\n\n\n/*\n** Return true if the argument interpreted as a unicode codepoint\n** is a diacritical modifier character.\n*/\nSQLITE_PRIVATE int sqlite3FtsUnicodeIsdiacritic(int c){\n  unsigned int mask0 = 0x08029FDF;\n  unsigned int mask1 = 0x000361F8;\n  if( c<768 || c>817 ) return 0;\n  return (c < 768+32) ?\n      (mask0 & ((unsigned int)1 << (c-768))) :\n      (mask1 & ((unsigned int)1 << (c-768-32)));\n}\n\n\n/*\n** Interpret the argument as a unicode codepoint. If the codepoint\n** is an upper case character that has a lower case equivalent,\n** return the codepoint corresponding to the lower case version.\n** Otherwise, return a copy of the argument.\n**\n** The results are undefined if the value passed to this function\n** is less than zero.\n*/\nSQLITE_PRIVATE int sqlite3FtsUnicodeFold(int c, int eRemoveDiacritic){\n  /* Each entry in the following array defines a rule for folding a range\n  ** of codepoints to lower case. The rule applies to a range of nRange\n  ** codepoints starting at codepoint iCode.\n  **\n  ** If the least significant bit in flags is clear, then the rule applies\n  ** to all nRange codepoints (i.e. all nRange codepoints are upper case and\n  ** need to be folded). Or, if it is set, then the rule only applies to\n  ** every second codepoint in the range, starting with codepoint C.\n  **\n  ** The 7 most significant bits in flags are an index into the aiOff[]\n  ** array. If a specific codepoint C does require folding, then its lower\n  ** case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF).\n  **\n  ** The contents of this array are generated by parsing the CaseFolding.txt\n  ** file distributed as part of the \"Unicode Character Database\". See\n  ** http://www.unicode.org for details.\n  */\n  static const struct TableEntry {\n    unsigned short iCode;\n    unsigned char flags;\n    unsigned char nRange;\n  } aEntry[] = {\n    {65, 14, 26},          {181, 64, 1},          {192, 14, 23},\n    {216, 14, 7},          {256, 1, 48},          {306, 1, 6},\n    {313, 1, 16},          {330, 1, 46},          {376, 116, 1},\n    {377, 1, 6},           {383, 104, 1},         {385, 50, 1},\n    {386, 1, 4},           {390, 44, 1},          {391, 0, 1},\n    {393, 42, 2},          {395, 0, 1},           {398, 32, 1},\n    {399, 38, 1},          {400, 40, 1},          {401, 0, 1},\n    {403, 42, 1},          {404, 46, 1},          {406, 52, 1},\n    {407, 48, 1},          {408, 0, 1},           {412, 52, 1},\n    {413, 54, 1},          {415, 56, 1},          {416, 1, 6},\n    {422, 60, 1},          {423, 0, 1},           {425, 60, 1},\n    {428, 0, 1},           {430, 60, 1},          {431, 0, 1},\n    {433, 58, 2},          {435, 1, 4},           {439, 62, 1},\n    {440, 0, 1},           {444, 0, 1},           {452, 2, 1},\n    {453, 0, 1},           {455, 2, 1},           {456, 0, 1},\n    {458, 2, 1},           {459, 1, 18},          {478, 1, 18},\n    {497, 2, 1},           {498, 1, 4},           {502, 122, 1},\n    {503, 134, 1},         {504, 1, 40},          {544, 110, 1},\n    {546, 1, 18},          {570, 70, 1},          {571, 0, 1},\n    {573, 108, 1},         {574, 68, 1},          {577, 0, 1},\n    {579, 106, 1},         {580, 28, 1},          {581, 30, 1},\n    {582, 1, 10},          {837, 36, 1},          {880, 1, 4},\n    {886, 0, 1},           {902, 18, 1},          {904, 16, 3},\n    {908, 26, 1},          {910, 24, 2},          {913, 14, 17},\n    {931, 14, 9},          {962, 0, 1},           {975, 4, 1},\n    {976, 140, 1},         {977, 142, 1},         {981, 146, 1},\n    {982, 144, 1},         {984, 1, 24},          {1008, 136, 1},\n    {1009, 138, 1},        {1012, 130, 1},        {1013, 128, 1},\n    {1015, 0, 1},          {1017, 152, 1},        {1018, 0, 1},\n    {1021, 110, 3},        {1024, 34, 16},        {1040, 14, 32},\n    {1120, 1, 34},         {1162, 1, 54},         {1216, 6, 1},\n    {1217, 1, 14},         {1232, 1, 88},         {1329, 22, 38},\n    {4256, 66, 38},        {4295, 66, 1},         {4301, 66, 1},\n    {7680, 1, 150},        {7835, 132, 1},        {7838, 96, 1},\n    {7840, 1, 96},         {7944, 150, 8},        {7960, 150, 6},\n    {7976, 150, 8},        {7992, 150, 8},        {8008, 150, 6},\n    {8025, 151, 8},        {8040, 150, 8},        {8072, 150, 8},\n    {8088, 150, 8},        {8104, 150, 8},        {8120, 150, 2},\n    {8122, 126, 2},        {8124, 148, 1},        {8126, 100, 1},\n    {8136, 124, 4},        {8140, 148, 1},        {8152, 150, 2},\n    {8154, 120, 2},        {8168, 150, 2},        {8170, 118, 2},\n    {8172, 152, 1},        {8184, 112, 2},        {8186, 114, 2},\n    {8188, 148, 1},        {8486, 98, 1},         {8490, 92, 1},\n    {8491, 94, 1},         {8498, 12, 1},         {8544, 8, 16},\n    {8579, 0, 1},          {9398, 10, 26},        {11264, 22, 47},\n    {11360, 0, 1},         {11362, 88, 1},        {11363, 102, 1},\n    {11364, 90, 1},        {11367, 1, 6},         {11373, 84, 1},\n    {11374, 86, 1},        {11375, 80, 1},        {11376, 82, 1},\n    {11378, 0, 1},         {11381, 0, 1},         {11390, 78, 2},\n    {11392, 1, 100},       {11499, 1, 4},         {11506, 0, 1},\n    {42560, 1, 46},        {42624, 1, 24},        {42786, 1, 14},\n    {42802, 1, 62},        {42873, 1, 4},         {42877, 76, 1},\n    {42878, 1, 10},        {42891, 0, 1},         {42893, 74, 1},\n    {42896, 1, 4},         {42912, 1, 10},        {42922, 72, 1},\n    {65313, 14, 26},\n  };\n  static const unsigned short aiOff[] = {\n   1,     2,     8,     15,    16,    26,    28,    32,\n   37,    38,    40,    48,    63,    64,    69,    71,\n   79,    80,    116,   202,   203,   205,   206,   207,\n   209,   210,   211,   213,   214,   217,   218,   219,\n   775,   7264,  10792, 10795, 23228, 23256, 30204, 54721,\n   54753, 54754, 54756, 54787, 54793, 54809, 57153, 57274,\n   57921, 58019, 58363, 61722, 65268, 65341, 65373, 65406,\n   65408, 65410, 65415, 65424, 65436, 65439, 65450, 65462,\n   65472, 65476, 65478, 65480, 65482, 65488, 65506, 65511,\n   65514, 65521, 65527, 65528, 65529,\n  };\n\n  int ret = c;\n\n  assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );\n\n  if( c<128 ){\n    if( c>='A' && c<='Z' ) ret = c + ('a' - 'A');\n  }else if( c<65536 ){\n    const struct TableEntry *p;\n    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;\n    int iLo = 0;\n    int iRes = -1;\n\n    assert( c>aEntry[0].iCode );\n    while( iHi>=iLo ){\n      int iTest = (iHi + iLo) / 2;\n      int cmp = (c - aEntry[iTest].iCode);\n      if( cmp>=0 ){\n        iRes = iTest;\n        iLo = iTest+1;\n      }else{\n        iHi = iTest-1;\n      }\n    }\n\n    assert( iRes>=0 && c>=aEntry[iRes].iCode );\n    p = &aEntry[iRes];\n    if( c<(p->iCode + p->nRange) && 0==(0x01 & p->flags & (p->iCode ^ c)) ){\n      ret = (c + (aiOff[p->flags>>1])) & 0x0000FFFF;\n      assert( ret>0 );\n    }\n\n    if( eRemoveDiacritic ){\n      ret = remove_diacritic(ret, eRemoveDiacritic==2);\n    }\n  }\n\n  else if( c>=66560 && c<66600 ){\n    ret = c + 40;\n  }\n\n  return ret;\n}\n#endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */\n#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */\n\n/************** End of fts3_unicode2.c ***************************************/\n/************** Begin file json.c ********************************************/\n/*\n** 2015-08-12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** SQLite JSON functions.\n**\n** This file began as an extension in ext/misc/json1.c in 2015.  That\n** extension proved so useful that it has now been moved into the core.\n**\n** The original design stored all JSON as pure text, canonical RFC-8259.\n** Support for JSON-5 extensions was added with version 3.42.0 (2023-05-16).\n** All generated JSON text still conforms strictly to RFC-8259, but text\n** with JSON-5 extensions is accepted as input.\n**\n** Beginning with version 3.45.0 (circa 2024-01-01), these routines also\n** accept BLOB values that have JSON encoded using a binary representation\n** called \"JSONB\".  The name JSONB comes from PostgreSQL, however the on-disk\n** format for SQLite-JSONB is completely different and incompatible with\n** PostgreSQL-JSONB.\n**\n** Decoding and interpreting JSONB is still O(N) where N is the size of\n** the input, the same as text JSON.  However, the constant of proportionality\n** for JSONB is much smaller due to faster parsing.  The size of each\n** element in JSONB is encoded in its header, so there is no need to search\n** for delimiters using persnickety syntax rules.  JSONB seems to be about\n** 3x faster than text JSON as a result.  JSONB is also tends to be slightly\n** smaller than text JSON, by 5% or 10%, but there are corner cases where\n** JSONB can be slightly larger.  So you are not far mistaken to say that\n** a JSONB blob is the same size as the equivalent RFC-8259 text.\n**\n**\n** THE JSONB ENCODING:\n**\n** Every JSON element is encoded in JSONB as a header and a payload.\n** The header is between 1 and 9 bytes in size.  The payload is zero\n** or more bytes.\n**\n** The lower 4 bits of the first byte of the header determines the\n** element type:\n**\n**    0:   NULL\n**    1:   TRUE\n**    2:   FALSE\n**    3:   INT        -- RFC-8259 integer literal\n**    4:   INT5       -- JSON5 integer literal\n**    5:   FLOAT      -- RFC-8259 floating point literal\n**    6:   FLOAT5     -- JSON5 floating point literal\n**    7:   TEXT       -- Text literal acceptable to both SQL and JSON\n**    8:   TEXTJ      -- Text containing RFC-8259 escapes\n**    9:   TEXT5      -- Text containing JSON5 and/or RFC-8259 escapes\n**   10:   TEXTRAW    -- Text containing unescaped syntax characters\n**   11:   ARRAY\n**   12:   OBJECT\n**\n** The other three possible values (13-15) are reserved for future\n** enhancements.\n**\n** The upper 4 bits of the first byte determine the size of the header\n** and sometimes also the size of the payload.  If X is the first byte\n** of the element and if X>>4 is between 0 and 11, then the payload\n** will be that many bytes in size and the header is exactly one byte\n** in size.  Other four values for X>>4 (12-15) indicate that the header\n** is more than one byte in size and that the payload size is determined\n** by the remainder of the header, interpreted as a unsigned big-endian\n** integer.\n**\n**   Value of X>>4         Size integer        Total header size\n**   -------------     --------------------    -----------------\n**        12           1 byte (0-255)                2\n**        13           2 byte (0-65535)              3\n**        14           4 byte (0-4294967295)         5\n**        15           8 byte (0-1.8e19)             9\n**\n** The payload size need not be expressed in its minimal form.  For example,\n** if the payload size is 10, the size can be expressed in any of 5 different\n** ways: (1) (X>>4)==10, (2) (X>>4)==12 following by one 0x0a byte,\n** (3) (X>>4)==13 followed by 0x00 and 0x0a, (4) (X>>4)==14 followed by\n** 0x00 0x00 0x00 0x0a, or (5) (X>>4)==15 followed by 7 bytes of 0x00 and\n** a single byte of 0x0a.  The shorter forms are preferred, of course, but\n** sometimes when generating JSONB, the payload size is not known in advance\n** and it is convenient to reserve sufficient header space to cover the\n** largest possible payload size and then come back later and patch up\n** the size when it becomes known, resulting in a non-minimal encoding.\n**\n** The value (X>>4)==15 is not actually used in the current implementation\n** (as SQLite is currently unable to handle BLOBs larger than about 2GB)\n** but is included in the design to allow for future enhancements.\n**\n** The payload follows the header.  NULL, TRUE, and FALSE have no payload and\n** their payload size must always be zero.  The payload for INT, INT5,\n** FLOAT, FLOAT5, TEXT, TEXTJ, TEXT5, and TEXTROW is text.  Note that the\n** \"...\" or '...' delimiters are omitted from the various text encodings.\n** The payload for ARRAY and OBJECT is a list of additional elements that\n** are the content for the array or object.  The payload for an OBJECT\n** must be an even number of elements.  The first element of each pair is\n** the label and must be of type TEXT, TEXTJ, TEXT5, or TEXTRAW.\n**\n** A valid JSONB blob consists of a single element, as described above.\n** Usually this will be an ARRAY or OBJECT element which has many more\n** elements as its content.  But the overall blob is just a single element.\n**\n** Input validation for JSONB blobs simply checks that the element type\n** code is between 0 and 12 and that the total size of the element\n** (header plus payload) is the same as the size of the BLOB.  If those\n** checks are true, the BLOB is assumed to be JSONB and processing continues.\n** Errors are only raised if some other miscoding is discovered during\n** processing.\n**\n** Additional information can be found in the doc/jsonb.md file of the\n** canonical SQLite source tree.\n*/\n#ifndef SQLITE_OMIT_JSON\n/* #include \"sqliteInt.h\" */\n\n/* JSONB element types\n*/\n#define JSONB_NULL     0   /* \"null\" */\n#define JSONB_TRUE     1   /* \"true\" */\n#define JSONB_FALSE    2   /* \"false\" */\n#define JSONB_INT      3   /* integer acceptable to JSON and SQL */\n#define JSONB_INT5     4   /* integer in 0x000 notation */\n#define JSONB_FLOAT    5   /* float acceptable to JSON and SQL */\n#define JSONB_FLOAT5   6   /* float with JSON5 extensions */\n#define JSONB_TEXT     7   /* Text compatible with both JSON and SQL */\n#define JSONB_TEXTJ    8   /* Text with JSON escapes */\n#define JSONB_TEXT5    9   /* Text with JSON-5 escape */\n#define JSONB_TEXTRAW 10   /* SQL text that needs escaping for JSON */\n#define JSONB_ARRAY   11   /* An array */\n#define JSONB_OBJECT  12   /* An object */\n\n/* Human-readable names for the JSONB values.  The index for each\n** string must correspond to the JSONB_* integer above.\n*/\nstatic const char * const jsonbType[] = {\n  \"null\", \"true\", \"false\", \"integer\", \"integer\",\n  \"real\", \"real\", \"text\",  \"text\",    \"text\",\n  \"text\", \"array\", \"object\", \"\", \"\", \"\", \"\"\n};\n\n/*\n** Growing our own isspace() routine this way is twice as fast as\n** the library isspace() function, resulting in a 7% overall performance\n** increase for the text-JSON parser.  (Ubuntu14.10 gcc 4.8.4 x64 with -Os).\n*/\nstatic const char jsonIsSpace[] = {\n#ifdef SQLITE_ASCII\n/*0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f  */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 1, 1, 0, 0, 1, 0, 0,  /* 0 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 1 */\n  1, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 2 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 3 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 4 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 5 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 6 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 7 */\n\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 8 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 9 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* a */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* b */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* c */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* d */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* e */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* f */\n#endif\n#ifdef SQLITE_EBCDIC\n/*0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f  */\n  0, 0, 0, 0, 0, 1, 0, 0,  0, 0, 0, 0, 0, 1, 0, 0,  /* 0 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 1 */\n  0, 0, 0, 0, 0, 1, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 2 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 3 */\n  1, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 4 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 5 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 6 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 7 */\n\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 8 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 9 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* a */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* b */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* c */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* d */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* e */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* f */\n#endif\n\n};\n#define jsonIsspace(x) (jsonIsSpace[(unsigned char)x])\n\n/*\n** The set of all space characters recognized by jsonIsspace().\n** Useful as the second argument to strspn().\n*/\n#ifdef SQLITE_ASCII\nstatic const char jsonSpaces[] = \"\\011\\012\\015\\040\";\n#endif\n#ifdef SQLITE_EBCDIC\nstatic const char jsonSpaces[] = \"\\005\\045\\015\\100\";\n#endif\n\n\n/*\n** Characters that are special to JSON.  Control characters,\n** '\"' and '\\\\' and '\\''.  Actually, '\\'' is not special to\n** canonical JSON, but it is special in JSON-5, so we include\n** it in the set of special characters.\n*/\nstatic const char jsonIsOk[256] = {\n#ifdef SQLITE_ASCII\n/*0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f  */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 0 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 1 */\n  1, 1, 0, 1, 1, 1, 1, 0,  1, 1, 1, 1, 1, 1, 1, 1,  /* 2 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 3 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 4 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 0, 1, 1, 1,  /* 5 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 6 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 7 */\n\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 8 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 9 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* a */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* b */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* c */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* d */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* e */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1   /* f */\n#endif\n#ifdef SQLITE_EBCDIC\n/*0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f  */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 0 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 1 */\n  0, 0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0,  /* 2 */\n  1, 1, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 1, 0,  /* 3 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 4 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 5 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 6 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 0, 1, 0,  /* 7 */\n\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 8 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* 9 */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* a */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* b */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* c */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* d */\n  0, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1,  /* e */\n  1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1, 1, 1, 1, 1   /* f */\n#endif\n};\n\n/* Objects */\ntypedef struct JsonCache JsonCache;\ntypedef struct JsonString JsonString;\ntypedef struct JsonParse JsonParse;\n\n/*\n** Magic number used for the JSON parse cache in sqlite3_get_auxdata()\n*/\n#define JSON_CACHE_ID    (-429938)  /* Cache entry */\n#define JSON_CACHE_SIZE  4          /* Max number of cache entries */\n\n/*\n** jsonUnescapeOneChar() returns this invalid code point if it encounters\n** a syntax error.\n*/\n#define JSON_INVALID_CHAR 0x99999\n\n/* A cache mapping JSON text into JSONB blobs.\n**\n** Each cache entry is a JsonParse object with the following restrictions:\n**\n**    *   The bReadOnly flag must be set\n**\n**    *   The aBlob[] array must be owned by the JsonParse object.  In other\n**        words, nBlobAlloc must be non-zero.\n**\n**    *   eEdit and delta must be zero.\n**\n**    *   zJson must be an RCStr.  In other words bJsonIsRCStr must be true.\n*/\nstruct JsonCache {\n  sqlite3 *db;                    /* Database connection */\n  int nUsed;                      /* Number of active entries in the cache */\n  JsonParse *a[JSON_CACHE_SIZE];  /* One line for each cache entry */\n};\n\n/* An instance of this object represents a JSON string\n** under construction.  Really, this is a generic string accumulator\n** that can be and is used to create strings other than JSON.\n**\n** If the generated string is longer than will fit into the zSpace[] buffer,\n** then it will be an RCStr string.  This aids with caching of large\n** JSON strings.\n*/\nstruct JsonString {\n  sqlite3_context *pCtx;   /* Function context - put error messages here */\n  char *zBuf;              /* Append JSON content here */\n  u64 nAlloc;              /* Bytes of storage available in zBuf[] */\n  u64 nUsed;               /* Bytes of zBuf[] currently used */\n  u8 bStatic;              /* True if zBuf is static space */\n  u8 eErr;                 /* True if an error has been encountered */\n  char zSpace[100];        /* Initial static space */\n};\n\n/* Allowed values for JsonString.eErr */\n#define JSTRING_OOM         0x01   /* Out of memory */\n#define JSTRING_MALFORMED   0x02   /* Malformed JSONB */\n#define JSTRING_ERR         0x04   /* Error already sent to sqlite3_result */\n\n/* The \"subtype\" set for text JSON values passed through using\n** sqlite3_result_subtype() and sqlite3_value_subtype().\n*/\n#define JSON_SUBTYPE  74    /* Ascii for \"J\" */\n\n/*\n** Bit values for the flags passed into various SQL function implementations\n** via the sqlite3_user_data() value.\n*/\n#define JSON_JSON      0x01        /* Result is always JSON */\n#define JSON_SQL       0x02        /* Result is always SQL */\n#define JSON_ABPATH    0x03        /* Allow abbreviated JSON path specs */\n#define JSON_ISSET     0x04        /* json_set(), not json_insert() */\n#define JSON_BLOB      0x08        /* Use the BLOB output format */\n\n\n/* A parsed JSON value.  Lifecycle:\n**\n**   1.  JSON comes in and is parsed into a JSONB value in aBlob.  The\n**       original text is stored in zJson.  This step is skipped if the\n**       input is JSONB instead of text JSON.\n**\n**   2.  The aBlob[] array is searched using the JSON path notation, if needed.\n**\n**   3.  Zero or more changes are made to aBlob[] (via json_remove() or\n**       json_replace() or json_patch() or similar).\n**\n**   4.  New JSON text is generated from the aBlob[] for output.  This step\n**       is skipped if the function is one of the jsonb_* functions that\n**       returns JSONB instead of text JSON.\n*/\nstruct JsonParse {\n  u8 *aBlob;         /* JSONB representation of JSON value */\n  u32 nBlob;         /* Bytes of aBlob[] actually used */\n  u32 nBlobAlloc;    /* Bytes allocated to aBlob[].  0 if aBlob is external */\n  char *zJson;       /* Json text used for parsing */\n  sqlite3 *db;       /* The database connection to which this object belongs */\n  int nJson;         /* Length of the zJson string in bytes */\n  u32 nJPRef;        /* Number of references to this object */\n  u32 iErr;          /* Error location in zJson[] */\n  u16 iDepth;        /* Nesting depth */\n  u8 nErr;           /* Number of errors seen */\n  u8 oom;            /* Set to true if out of memory */\n  u8 bJsonIsRCStr;   /* True if zJson is an RCStr */\n  u8 hasNonstd;      /* True if input uses non-standard features like JSON5 */\n  u8 bReadOnly;      /* Do not modify. */\n  /* Search and edit information.  See jsonLookupStep() */\n  u8 eEdit;          /* Edit operation to apply */\n  int delta;         /* Size change due to the edit */\n  u32 nIns;          /* Number of bytes to insert */\n  u32 iLabel;        /* Location of label if search landed on an object value */\n  u8 *aIns;          /* Content to be inserted */\n};\n\n/* Allowed values for JsonParse.eEdit */\n#define JEDIT_DEL   1   /* Delete if exists */\n#define JEDIT_REPL  2   /* Overwrite if exists */\n#define JEDIT_INS   3   /* Insert if not exists */\n#define JEDIT_SET   4   /* Insert or overwrite */\n\n/*\n** Maximum nesting depth of JSON for this implementation.\n**\n** This limit is needed to avoid a stack overflow in the recursive\n** descent parser.  A depth of 1000 is far deeper than any sane JSON\n** should go.  Historical note: This limit was 2000 prior to version 3.42.0\n*/\n#ifndef SQLITE_JSON_MAX_DEPTH\n# define JSON_MAX_DEPTH  1000\n#else\n# define JSON_MAX_DEPTH SQLITE_JSON_MAX_DEPTH\n#endif\n\n/*\n** Allowed values for the flgs argument to jsonParseFuncArg();\n*/\n#define JSON_EDITABLE  0x01   /* Generate a writable JsonParse object */\n#define JSON_KEEPERROR 0x02   /* Return non-NULL even if there is an error */\n\n/**************************************************************************\n** Forward references\n**************************************************************************/\nstatic void jsonReturnStringAsBlob(JsonString*);\nstatic int jsonArgIsJsonb(sqlite3_value *pJson, JsonParse *p);\nstatic u32 jsonTranslateBlobToText(const JsonParse*,u32,JsonString*);\nstatic void jsonReturnParse(sqlite3_context*,JsonParse*);\nstatic JsonParse *jsonParseFuncArg(sqlite3_context*,sqlite3_value*,u32);\nstatic void jsonParseFree(JsonParse*);\nstatic u32 jsonbPayloadSize(const JsonParse*, u32, u32*);\nstatic u32 jsonUnescapeOneChar(const char*, u32, u32*);\n\n/**************************************************************************\n** Utility routines for dealing with JsonCache objects\n**************************************************************************/\n\n/*\n** Free a JsonCache object.\n*/\nstatic void jsonCacheDelete(JsonCache *p){\n  int i;\n  for(i=0; i<p->nUsed; i++){\n    jsonParseFree(p->a[i]);\n  }\n  sqlite3DbFree(p->db, p);\n}\nstatic void jsonCacheDeleteGeneric(void *p){\n  jsonCacheDelete((JsonCache*)p);\n}\n\n/*\n** Insert a new entry into the cache.  If the cache is full, expel\n** the least recently used entry.  Return SQLITE_OK on success or a\n** result code otherwise.\n**\n** Cache entries are stored in age order, oldest first.\n*/\nstatic int jsonCacheInsert(\n  sqlite3_context *ctx,   /* The SQL statement context holding the cache */\n  JsonParse *pParse       /* The parse object to be added to the cache */\n){\n  JsonCache *p;\n\n  assert( pParse->zJson!=0 );\n  assert( pParse->bJsonIsRCStr );\n  assert( pParse->delta==0 );\n  p = sqlite3_get_auxdata(ctx, JSON_CACHE_ID);\n  if( p==0 ){\n    sqlite3 *db = sqlite3_context_db_handle(ctx);\n    p = sqlite3DbMallocZero(db, sizeof(*p));\n    if( p==0 ) return SQLITE_NOMEM;\n    p->db = db;\n    sqlite3_set_auxdata(ctx, JSON_CACHE_ID, p, jsonCacheDeleteGeneric);\n    p = sqlite3_get_auxdata(ctx, JSON_CACHE_ID);\n    if( p==0 ) return SQLITE_NOMEM;\n  }\n  if( p->nUsed >= JSON_CACHE_SIZE ){\n    jsonParseFree(p->a[0]);\n    memmove(p->a, &p->a[1], (JSON_CACHE_SIZE-1)*sizeof(p->a[0]));\n    p->nUsed = JSON_CACHE_SIZE-1;\n  }\n  assert( pParse->nBlobAlloc>0 );\n  pParse->eEdit = 0;\n  pParse->nJPRef++;\n  pParse->bReadOnly = 1;\n  p->a[p->nUsed] = pParse;\n  p->nUsed++;\n  return SQLITE_OK;\n}\n\n/*\n** Search for a cached translation the json text supplied by pArg.  Return\n** the JsonParse object if found.  Return NULL if not found.\n**\n** When a match if found, the matching entry is moved to become the\n** most-recently used entry if it isn't so already.\n**\n** The JsonParse object returned still belongs to the Cache and might\n** be deleted at any moment.  If the caller wants the JsonParse to\n** linger, it needs to increment the nPJRef reference counter.\n*/\nstatic JsonParse *jsonCacheSearch(\n  sqlite3_context *ctx,    /* The SQL statement context holding the cache */\n  sqlite3_value *pArg      /* Function argument containing SQL text */\n){\n  JsonCache *p;\n  int i;\n  const char *zJson;\n  int nJson;\n\n  if( sqlite3_value_type(pArg)!=SQLITE_TEXT ){\n    return 0;\n  }\n  zJson = (const char*)sqlite3_value_text(pArg);\n  if( zJson==0 ) return 0;\n  nJson = sqlite3_value_bytes(pArg);\n\n  p = sqlite3_get_auxdata(ctx, JSON_CACHE_ID);\n  if( p==0 ){\n    return 0;\n  }\n  for(i=0; i<p->nUsed; i++){\n    if( p->a[i]->zJson==zJson ) break;\n  }\n  if( i>=p->nUsed ){\n    for(i=0; i<p->nUsed; i++){\n      if( p->a[i]->nJson!=nJson ) continue;\n      if( memcmp(p->a[i]->zJson, zJson, nJson)==0 ) break;\n    }\n  }\n  if( i<p->nUsed ){\n    if( i<p->nUsed-1 ){\n      /* Make the matching entry the most recently used entry */\n      JsonParse *tmp = p->a[i];\n      memmove(&p->a[i], &p->a[i+1], (p->nUsed-i-1)*sizeof(tmp));\n      p->a[p->nUsed-1] = tmp;\n      i = p->nUsed - 1;\n    }\n    assert( p->a[i]->delta==0 );\n    return p->a[i];\n  }else{\n    return 0;\n  }\n}\n\n/**************************************************************************\n** Utility routines for dealing with JsonString objects\n**************************************************************************/\n\n/* Turn uninitialized bulk memory into a valid JsonString object\n** holding a zero-length string.\n*/\nstatic void jsonStringZero(JsonString *p){\n  p->zBuf = p->zSpace;\n  p->nAlloc = sizeof(p->zSpace);\n  p->nUsed = 0;\n  p->bStatic = 1;\n}\n\n/* Initialize the JsonString object\n*/\nstatic void jsonStringInit(JsonString *p, sqlite3_context *pCtx){\n  p->pCtx = pCtx;\n  p->eErr = 0;\n  jsonStringZero(p);\n}\n\n/* Free all allocated memory and reset the JsonString object back to its\n** initial state.\n*/\nstatic void jsonStringReset(JsonString *p){\n  if( !p->bStatic ) sqlite3RCStrUnref(p->zBuf);\n  jsonStringZero(p);\n}\n\n/* Report an out-of-memory (OOM) condition\n*/\nstatic void jsonStringOom(JsonString *p){\n  p->eErr |= JSTRING_OOM;\n  if( p->pCtx ) sqlite3_result_error_nomem(p->pCtx);\n  jsonStringReset(p);\n}\n\n/* Enlarge pJson->zBuf so that it can hold at least N more bytes.\n** Return zero on success.  Return non-zero on an OOM error\n*/\nstatic int jsonStringGrow(JsonString *p, u32 N){\n  u64 nTotal = N<p->nAlloc ? p->nAlloc*2 : p->nAlloc+N+10;\n  char *zNew;\n  if( p->bStatic ){\n    if( p->eErr ) return 1;\n    zNew = sqlite3RCStrNew(nTotal);\n    if( zNew==0 ){\n      jsonStringOom(p);\n      return SQLITE_NOMEM;\n    }\n    memcpy(zNew, p->zBuf, (size_t)p->nUsed);\n    p->zBuf = zNew;\n    p->bStatic = 0;\n  }else{\n    p->zBuf = sqlite3RCStrResize(p->zBuf, nTotal);\n    if( p->zBuf==0 ){\n      p->eErr |= JSTRING_OOM;\n      jsonStringZero(p);\n      return SQLITE_NOMEM;\n    }\n  }\n  p->nAlloc = nTotal;\n  return SQLITE_OK;\n}\n\n/* Append N bytes from zIn onto the end of the JsonString string.\n*/\nstatic SQLITE_NOINLINE void jsonStringExpandAndAppend(\n  JsonString *p,\n  const char *zIn,\n  u32 N\n){\n  assert( N>0 );\n  if( jsonStringGrow(p,N) ) return;\n  memcpy(p->zBuf+p->nUsed, zIn, N);\n  p->nUsed += N;\n}\nstatic void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){\n  if( N==0 ) return;\n  if( N+p->nUsed >= p->nAlloc ){\n    jsonStringExpandAndAppend(p,zIn,N);\n  }else{\n    memcpy(p->zBuf+p->nUsed, zIn, N);\n    p->nUsed += N;\n  }\n}\nstatic void jsonAppendRawNZ(JsonString *p, const char *zIn, u32 N){\n  assert( N>0 );\n  if( N+p->nUsed >= p->nAlloc ){\n    jsonStringExpandAndAppend(p,zIn,N);\n  }else{\n    memcpy(p->zBuf+p->nUsed, zIn, N);\n    p->nUsed += N;\n  }\n}\n\n/* Append formatted text (not to exceed N bytes) to the JsonString.\n*/\nstatic void jsonPrintf(int N, JsonString *p, const char *zFormat, ...){\n  va_list ap;\n  if( (p->nUsed + N >= p->nAlloc) && jsonStringGrow(p, N) ) return;\n  va_start(ap, zFormat);\n  sqlite3_vsnprintf(N, p->zBuf+p->nUsed, zFormat, ap);\n  va_end(ap);\n  p->nUsed += (int)strlen(p->zBuf+p->nUsed);\n}\n\n/* Append a single character\n*/\nstatic SQLITE_NOINLINE void jsonAppendCharExpand(JsonString *p, char c){\n  if( jsonStringGrow(p,1) ) return;\n  p->zBuf[p->nUsed++] = c;\n}\nstatic void jsonAppendChar(JsonString *p, char c){\n  if( p->nUsed>=p->nAlloc ){\n    jsonAppendCharExpand(p,c);\n  }else{\n    p->zBuf[p->nUsed++] = c;\n  }\n}\n\n/* Remove a single character from the end of the string\n*/\nstatic void jsonStringTrimOneChar(JsonString *p){\n  if( p->eErr==0 ){\n    assert( p->nUsed>0 );\n    p->nUsed--;\n  }\n}\n\n\n/* Make sure there is a zero terminator on p->zBuf[]\n**\n** Return true on success.  Return false if an OOM prevents this\n** from happening.\n*/\nstatic int jsonStringTerminate(JsonString *p){\n  jsonAppendChar(p, 0);\n  jsonStringTrimOneChar(p);\n  return p->eErr==0;\n}\n\n/* Append a comma separator to the output buffer, if the previous\n** character is not '[' or '{'.\n*/\nstatic void jsonAppendSeparator(JsonString *p){\n  char c;\n  if( p->nUsed==0 ) return;\n  c = p->zBuf[p->nUsed-1];\n  if( c=='[' || c=='{' ) return;\n  jsonAppendChar(p, ',');\n}\n\n/* c is a control character.  Append the canonical JSON representation\n** of that control character to p.\n**\n** This routine assumes that the output buffer has already been enlarged\n** sufficiently to hold the worst-case encoding plus a nul terminator.\n*/\nstatic void jsonAppendControlChar(JsonString *p, u8 c){\n  static const char aSpecial[] = {\n     0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0,\n     0, 0, 0, 0, 0, 0, 0, 0,   0,   0,   0, 0,   0,   0, 0, 0\n  };\n  assert( sizeof(aSpecial)==32 );\n  assert( aSpecial['\\b']=='b' );\n  assert( aSpecial['\\f']=='f' );\n  assert( aSpecial['\\n']=='n' );\n  assert( aSpecial['\\r']=='r' );\n  assert( aSpecial['\\t']=='t' );\n  assert( c>=0 && c<sizeof(aSpecial) );\n  assert( p->nUsed+7 <= p->nAlloc );\n  if( aSpecial[c] ){\n    p->zBuf[p->nUsed] = '\\\\';\n    p->zBuf[p->nUsed+1] = aSpecial[c];\n    p->nUsed += 2;\n  }else{\n    p->zBuf[p->nUsed] = '\\\\';\n    p->zBuf[p->nUsed+1] = 'u';\n    p->zBuf[p->nUsed+2] = '0';\n    p->zBuf[p->nUsed+3] = '0';\n    p->zBuf[p->nUsed+4] = \"0123456789abcdef\"[c>>4];\n    p->zBuf[p->nUsed+5] = \"0123456789abcdef\"[c&0xf];\n    p->nUsed += 6;\n  }\n}\n\n/* Append the N-byte string in zIn to the end of the JsonString string\n** under construction.  Enclose the string in double-quotes (\"...\") and\n** escape any double-quotes or backslash characters contained within the\n** string.\n**\n** This routine is a high-runner.  There is a measurable performance\n** increase associated with unwinding the jsonIsOk[] loop.\n*/\nstatic void jsonAppendString(JsonString *p, const char *zIn, u32 N){\n  u32 k;\n  u8 c;\n  const u8 *z = (const u8*)zIn;\n  if( z==0 ) return;\n  if( (N+p->nUsed+2 >= p->nAlloc) && jsonStringGrow(p,N+2)!=0 ) return;\n  p->zBuf[p->nUsed++] = '\"';\n  while( 1 /*exit-by-break*/ ){\n    k = 0;\n    /* The following while() is the 4-way unwound equivalent of\n    **\n    **     while( k<N && jsonIsOk[z[k]] ){ k++; }\n    */\n    while( 1 /* Exit by break */ ){\n      if( k+3>=N ){\n        while( k<N && jsonIsOk[z[k]] ){ k++; }\n        break;\n      }\n      if( !jsonIsOk[z[k]] ){\n        break;\n      }\n      if( !jsonIsOk[z[k+1]] ){\n        k += 1;\n        break;\n      }\n      if( !jsonIsOk[z[k+2]] ){\n        k += 2;\n        break;\n      }\n      if( !jsonIsOk[z[k+3]] ){\n        k += 3;\n        break;\n      }else{\n        k += 4;\n      }\n    }\n    if( k>=N ){\n      if( k>0 ){\n        memcpy(&p->zBuf[p->nUsed], z, k);\n        p->nUsed += k;\n      }\n      break;\n    }\n    if( k>0 ){\n      memcpy(&p->zBuf[p->nUsed], z, k);\n      p->nUsed += k;\n      z += k;\n      N -= k;\n    }\n    c = z[0];\n    if( c=='\"' || c=='\\\\' ){\n      if( (p->nUsed+N+3 > p->nAlloc) && jsonStringGrow(p,N+3)!=0 ) return;\n      p->zBuf[p->nUsed++] = '\\\\';\n      p->zBuf[p->nUsed++] = c;\n    }else if( c=='\\'' ){\n      p->zBuf[p->nUsed++] = c;\n    }else{\n      if( (p->nUsed+N+7 > p->nAlloc) && jsonStringGrow(p,N+7)!=0 ) return;\n      jsonAppendControlChar(p, c);\n    }\n    z++;\n    N--;\n  }\n  p->zBuf[p->nUsed++] = '\"';\n  assert( p->nUsed<p->nAlloc );\n}\n\n/*\n** Append an sqlite3_value (such as a function parameter) to the JSON\n** string under construction in p.\n*/\nstatic void jsonAppendSqlValue(\n  JsonString *p,                 /* Append to this JSON string */\n  sqlite3_value *pValue          /* Value to append */\n){\n  switch( sqlite3_value_type(pValue) ){\n    case SQLITE_NULL: {\n      jsonAppendRawNZ(p, \"null\", 4);\n      break;\n    }\n    case SQLITE_FLOAT: {\n      jsonPrintf(100, p, \"%!0.15g\", sqlite3_value_double(pValue));\n      break;\n    }\n    case SQLITE_INTEGER: {\n      const char *z = (const char*)sqlite3_value_text(pValue);\n      u32 n = (u32)sqlite3_value_bytes(pValue);\n      jsonAppendRaw(p, z, n);\n      break;\n    }\n    case SQLITE_TEXT: {\n      const char *z = (const char*)sqlite3_value_text(pValue);\n      u32 n = (u32)sqlite3_value_bytes(pValue);\n      if( sqlite3_value_subtype(pValue)==JSON_SUBTYPE ){\n        jsonAppendRaw(p, z, n);\n      }else{\n        jsonAppendString(p, z, n);\n      }\n      break;\n    }\n    default: {\n      JsonParse px;\n      memset(&px, 0, sizeof(px));\n      if( jsonArgIsJsonb(pValue, &px) ){\n        jsonTranslateBlobToText(&px, 0, p);\n      }else if( p->eErr==0 ){\n        sqlite3_result_error(p->pCtx, \"JSON cannot hold BLOB values\", -1);\n        p->eErr = JSTRING_ERR;\n        jsonStringReset(p);\n      }\n      break;\n    }\n  }\n}\n\n/* Make the text in p (which is probably a generated JSON text string)\n** the result of the SQL function.\n**\n** The JsonString is reset.\n**\n** If pParse and ctx are both non-NULL, then the SQL string in p is\n** loaded into the zJson field of the pParse object as a RCStr and the\n** pParse is added to the cache.\n*/\nstatic void jsonReturnString(\n  JsonString *p,            /* String to return */\n  JsonParse *pParse,        /* JSONB source or NULL */\n  sqlite3_context *ctx      /* Where to cache */\n){\n  assert( (pParse!=0)==(ctx!=0) );\n  assert( ctx==0 || ctx==p->pCtx );\n  if( p->eErr==0 ){\n    int flags = SQLITE_PTR_TO_INT(sqlite3_user_data(p->pCtx));\n    if( flags & JSON_BLOB ){\n      jsonReturnStringAsBlob(p);\n    }else if( p->bStatic ){\n      sqlite3_result_text64(p->pCtx, p->zBuf, p->nUsed,\n                            SQLITE_TRANSIENT, SQLITE_UTF8);\n    }else if( jsonStringTerminate(p) ){\n      if( pParse && pParse->bJsonIsRCStr==0 && pParse->nBlobAlloc>0 ){\n        int rc;\n        pParse->zJson = sqlite3RCStrRef(p->zBuf);\n        pParse->nJson = p->nUsed;\n        pParse->bJsonIsRCStr = 1;\n        rc = jsonCacheInsert(ctx, pParse);\n        if( rc==SQLITE_NOMEM ){\n          sqlite3_result_error_nomem(ctx);\n          jsonStringReset(p);\n          return;\n        }\n      }\n      sqlite3_result_text64(p->pCtx, sqlite3RCStrRef(p->zBuf), p->nUsed,\n                            sqlite3RCStrUnref,\n                            SQLITE_UTF8);\n    }else{\n      sqlite3_result_error_nomem(p->pCtx);\n    }\n  }else if( p->eErr & JSTRING_OOM ){\n    sqlite3_result_error_nomem(p->pCtx);\n  }else if( p->eErr & JSTRING_MALFORMED ){\n    sqlite3_result_error(p->pCtx, \"malformed JSON\", -1);\n  }\n  jsonStringReset(p);\n}\n\n/**************************************************************************\n** Utility routines for dealing with JsonParse objects\n**************************************************************************/\n\n/*\n** Reclaim all memory allocated by a JsonParse object.  But do not\n** delete the JsonParse object itself.\n*/\nstatic void jsonParseReset(JsonParse *pParse){\n  assert( pParse->nJPRef<=1 );\n  if( pParse->bJsonIsRCStr ){\n    sqlite3RCStrUnref(pParse->zJson);\n    pParse->zJson = 0;\n    pParse->nJson = 0;\n    pParse->bJsonIsRCStr = 0;\n  }\n  if( pParse->nBlobAlloc ){\n    sqlite3DbFree(pParse->db, pParse->aBlob);\n    pParse->aBlob = 0;\n    pParse->nBlob = 0;\n    pParse->nBlobAlloc = 0;\n  }\n}\n\n/*\n** Decrement the reference count on the JsonParse object.  When the\n** count reaches zero, free the object.\n*/\nstatic void jsonParseFree(JsonParse *pParse){\n  if( pParse ){\n    if( pParse->nJPRef>1 ){\n      pParse->nJPRef--;\n    }else{\n      jsonParseReset(pParse);\n      sqlite3DbFree(pParse->db, pParse);\n    }\n  }\n}\n\n/**************************************************************************\n** Utility routines for the JSON text parser\n**************************************************************************/\n\n/*\n** Translate a single byte of Hex into an integer.\n** This routine only gives a correct answer if h really is a valid hexadecimal\n** character:  0..9a..fA..F.  But unlike sqlite3HexToInt(), it does not\n** assert() if the digit is not hex.\n*/\nstatic u8 jsonHexToInt(int h){\n#ifdef SQLITE_ASCII\n  h += 9*(1&(h>>6));\n#endif\n#ifdef SQLITE_EBCDIC\n  h += 9*(1&~(h>>4));\n#endif\n  return (u8)(h & 0xf);\n}\n\n/*\n** Convert a 4-byte hex string into an integer\n*/\nstatic u32 jsonHexToInt4(const char *z){\n  u32 v;\n  v = (jsonHexToInt(z[0])<<12)\n    + (jsonHexToInt(z[1])<<8)\n    + (jsonHexToInt(z[2])<<4)\n    + jsonHexToInt(z[3]);\n  return v;\n}\n\n/*\n** Return true if z[] begins with 2 (or more) hexadecimal digits\n*/\nstatic int jsonIs2Hex(const char *z){\n  return sqlite3Isxdigit(z[0]) && sqlite3Isxdigit(z[1]);\n}\n\n/*\n** Return true if z[] begins with 4 (or more) hexadecimal digits\n*/\nstatic int jsonIs4Hex(const char *z){\n  return jsonIs2Hex(z) && jsonIs2Hex(&z[2]);\n}\n\n/*\n** Return the number of bytes of JSON5 whitespace at the beginning of\n** the input string z[].\n**\n** JSON5 whitespace consists of any of the following characters:\n**\n**    Unicode  UTF-8         Name\n**    U+0009   09            horizontal tab\n**    U+000a   0a            line feed\n**    U+000b   0b            vertical tab\n**    U+000c   0c            form feed\n**    U+000d   0d            carriage return\n**    U+0020   20            space\n**    U+00a0   c2 a0         non-breaking space\n**    U+1680   e1 9a 80      ogham space mark\n**    U+2000   e2 80 80      en quad\n**    U+2001   e2 80 81      em quad\n**    U+2002   e2 80 82      en space\n**    U+2003   e2 80 83      em space\n**    U+2004   e2 80 84      three-per-em space\n**    U+2005   e2 80 85      four-per-em space\n**    U+2006   e2 80 86      six-per-em space\n**    U+2007   e2 80 87      figure space\n**    U+2008   e2 80 88      punctuation space\n**    U+2009   e2 80 89      thin space\n**    U+200a   e2 80 8a      hair space\n**    U+2028   e2 80 a8      line separator\n**    U+2029   e2 80 a9      paragraph separator\n**    U+202f   e2 80 af      narrow no-break space (NNBSP)\n**    U+205f   e2 81 9f      medium mathematical space (MMSP)\n**    U+3000   e3 80 80      ideographical space\n**    U+FEFF   ef bb bf      byte order mark\n**\n** In addition, comments between '/', '*' and '*', '/' and\n** from '/', '/' to end-of-line are also considered to be whitespace.\n*/\nstatic int json5Whitespace(const char *zIn){\n  int n = 0;\n  const u8 *z = (u8*)zIn;\n  while( 1 /*exit by \"goto whitespace_done\"*/ ){\n    switch( z[n] ){\n      case 0x09:\n      case 0x0a:\n      case 0x0b:\n      case 0x0c:\n      case 0x0d:\n      case 0x20: {\n        n++;\n        break;\n      }\n      case '/': {\n        if( z[n+1]=='*' && z[n+2]!=0 ){\n          int j;\n          for(j=n+3; z[j]!='/' || z[j-1]!='*'; j++){\n            if( z[j]==0 ) goto whitespace_done;\n          }\n          n = j+1;\n          break;\n        }else if( z[n+1]=='/' ){\n          int j;\n          char c;\n          for(j=n+2; (c = z[j])!=0; j++){\n            if( c=='\\n' || c=='\\r' ) break;\n            if( 0xe2==(u8)c && 0x80==(u8)z[j+1]\n             && (0xa8==(u8)z[j+2] || 0xa9==(u8)z[j+2])\n            ){\n              j += 2;\n              break;\n            }\n          }\n          n = j;\n          if( z[n] ) n++;\n          break;\n        }\n        goto whitespace_done;\n      }\n      case 0xc2: {\n        if( z[n+1]==0xa0 ){\n          n += 2;\n          break;\n        }\n        goto whitespace_done;\n      }\n      case 0xe1: {\n        if( z[n+1]==0x9a && z[n+2]==0x80 ){\n          n += 3;\n          break;\n        }\n        goto whitespace_done;\n      }\n      case 0xe2: {\n        if( z[n+1]==0x80 ){\n          u8 c = z[n+2];\n          if( c<0x80 ) goto whitespace_done;\n          if( c<=0x8a || c==0xa8 || c==0xa9 || c==0xaf ){\n            n += 3;\n            break;\n          }\n        }else if( z[n+1]==0x81 && z[n+2]==0x9f ){\n          n += 3;\n          break;\n        }\n        goto whitespace_done;\n      }\n      case 0xe3: {\n        if( z[n+1]==0x80 && z[n+2]==0x80 ){\n          n += 3;\n          break;\n        }\n        goto whitespace_done;\n      }\n      case 0xef: {\n        if( z[n+1]==0xbb && z[n+2]==0xbf ){\n          n += 3;\n          break;\n        }\n        goto whitespace_done;\n      }\n      default: {\n        goto whitespace_done;\n      }\n    }\n  }\n  whitespace_done:\n  return n;\n}\n\n/*\n** Extra floating-point literals to allow in JSON.\n*/\nstatic const struct NanInfName {\n  char c1;\n  char c2;\n  char n;\n  char eType;\n  char nRepl;\n  char *zMatch;\n  char *zRepl;\n} aNanInfName[] = {\n  { 'i', 'I', 3, JSONB_FLOAT, 7, \"inf\", \"9.0e999\" },\n  { 'i', 'I', 8, JSONB_FLOAT, 7, \"infinity\", \"9.0e999\" },\n  { 'n', 'N', 3, JSONB_NULL, 4, \"NaN\", \"null\" },\n  { 'q', 'Q', 4, JSONB_NULL, 4, \"QNaN\", \"null\" },\n  { 's', 'S', 4, JSONB_NULL, 4, \"SNaN\", \"null\" },\n};\n\n\n/*\n** Report the wrong number of arguments for json_insert(), json_replace()\n** or json_set().\n*/\nstatic void jsonWrongNumArgs(\n  sqlite3_context *pCtx,\n  const char *zFuncName\n){\n  char *zMsg = sqlite3_mprintf(\"json_%s() needs an odd number of arguments\",\n                               zFuncName);\n  sqlite3_result_error(pCtx, zMsg, -1);\n  sqlite3_free(zMsg);\n}\n\n/****************************************************************************\n** Utility routines for dealing with the binary BLOB representation of JSON\n****************************************************************************/\n\n/*\n** Expand pParse->aBlob so that it holds at least N bytes.\n**\n** Return the number of errors.\n*/\nstatic int jsonBlobExpand(JsonParse *pParse, u32 N){\n  u8 *aNew;\n  u64 t;\n  assert( N>pParse->nBlobAlloc );\n  if( pParse->nBlobAlloc==0 ){\n    t = 100;\n  }else{\n    t = pParse->nBlobAlloc*2;\n  }\n  if( t<N ) t = N+100;\n  aNew = sqlite3DbRealloc(pParse->db, pParse->aBlob, t);\n  if( aNew==0 ){ pParse->oom = 1; return 1; }\n  assert( t<0x7fffffff );\n  pParse->aBlob = aNew;\n  pParse->nBlobAlloc = (u32)t;\n  return 0;\n}\n\n/*\n** If pParse->aBlob is not previously editable (because it is taken\n** from sqlite3_value_blob(), as indicated by the fact that\n** pParse->nBlobAlloc==0 and pParse->nBlob>0) then make it editable\n** by making a copy into space obtained from malloc.\n**\n** Return true on success.  Return false on OOM.\n*/\nstatic int jsonBlobMakeEditable(JsonParse *pParse, u32 nExtra){\n  u8 *aOld;\n  u32 nSize;\n  assert( !pParse->bReadOnly );\n  if( pParse->oom ) return 0;\n  if( pParse->nBlobAlloc>0 ) return 1;\n  aOld = pParse->aBlob;\n  nSize = pParse->nBlob + nExtra;\n  pParse->aBlob = 0;\n  if( jsonBlobExpand(pParse, nSize) ){\n    return 0;\n  }\n  assert( pParse->nBlobAlloc >= pParse->nBlob + nExtra );\n  memcpy(pParse->aBlob, aOld, pParse->nBlob);\n  return 1;\n}\n\n/* Expand pParse->aBlob and append one bytes.\n*/\nstatic SQLITE_NOINLINE void jsonBlobExpandAndAppendOneByte(\n  JsonParse *pParse,\n  u8 c\n){\n  jsonBlobExpand(pParse, pParse->nBlob+1);\n  if( pParse->oom==0 ){\n    assert( pParse->nBlob+1<=pParse->nBlobAlloc );\n    pParse->aBlob[pParse->nBlob++] = c;\n  }\n}\n\n/* Append a single character.\n*/\nstatic void jsonBlobAppendOneByte(JsonParse *pParse, u8 c){\n  if( pParse->nBlob >= pParse->nBlobAlloc ){\n    jsonBlobExpandAndAppendOneByte(pParse, c);\n  }else{\n    pParse->aBlob[pParse->nBlob++] = c;\n  }\n}\n\n/* Slow version of jsonBlobAppendNode() that first resizes the\n** pParse->aBlob structure.\n*/\nstatic void jsonBlobAppendNode(JsonParse*,u8,u32,const void*);\nstatic SQLITE_NOINLINE void jsonBlobExpandAndAppendNode(\n  JsonParse *pParse,\n  u8 eType,\n  u32 szPayload,\n  const void *aPayload\n){\n  if( jsonBlobExpand(pParse, pParse->nBlob+szPayload+9) ) return;\n  jsonBlobAppendNode(pParse, eType, szPayload, aPayload);\n}\n\n\n/* Append a node type byte together with the payload size and\n** possibly also the payload.\n**\n** If aPayload is not NULL, then it is a pointer to the payload which\n** is also appended.  If aPayload is NULL, the pParse->aBlob[] array\n** is resized (if necessary) so that it is big enough to hold the\n** payload, but the payload is not appended and pParse->nBlob is left\n** pointing to where the first byte of payload will eventually be.\n*/\nstatic void jsonBlobAppendNode(\n  JsonParse *pParse,          /* The JsonParse object under construction */\n  u8 eType,                   /* Node type.  One of JSONB_* */\n  u32 szPayload,              /* Number of bytes of payload */\n  const void *aPayload        /* The payload.  Might be NULL */\n){\n  u8 *a;\n  if( pParse->nBlob+szPayload+9 > pParse->nBlobAlloc ){\n    jsonBlobExpandAndAppendNode(pParse,eType,szPayload,aPayload);\n    return;\n  }\n  assert( pParse->aBlob!=0 );\n  a = &pParse->aBlob[pParse->nBlob];\n  if( szPayload<=11 ){\n    a[0] = eType | (szPayload<<4);\n    pParse->nBlob += 1;\n  }else if( szPayload<=0xff ){\n    a[0] = eType | 0xc0;\n    a[1] = szPayload & 0xff;\n    pParse->nBlob += 2;\n  }else if( szPayload<=0xffff ){\n    a[0] = eType | 0xd0;\n    a[1] = (szPayload >> 8) & 0xff;\n    a[2] = szPayload & 0xff;\n    pParse->nBlob += 3;\n  }else{\n    a[0] = eType | 0xe0;\n    a[1] = (szPayload >> 24) & 0xff;\n    a[2] = (szPayload >> 16) & 0xff;\n    a[3] = (szPayload >> 8) & 0xff;\n    a[4] = szPayload & 0xff;\n    pParse->nBlob += 5;\n  }\n  if( aPayload ){\n    pParse->nBlob += szPayload;\n    memcpy(&pParse->aBlob[pParse->nBlob-szPayload], aPayload, szPayload);\n  }\n}\n\n/* Change the payload size for the node at index i to be szPayload.\n*/\nstatic int jsonBlobChangePayloadSize(\n  JsonParse *pParse,\n  u32 i,\n  u32 szPayload\n){\n  u8 *a;\n  u8 szType;\n  u8 nExtra;\n  u8 nNeeded;\n  int delta;\n  if( pParse->oom ) return 0;\n  a = &pParse->aBlob[i];\n  szType = a[0]>>4;\n  if( szType<=11 ){\n    nExtra = 0;\n  }else if( szType==12 ){\n    nExtra = 1;\n  }else if( szType==13 ){\n    nExtra = 2;\n  }else if( szType==14 ){\n    nExtra = 4;\n  }else{\n    nExtra = 8;\n  }\n  if( szPayload<=11 ){\n    nNeeded = 0;\n  }else if( szPayload<=0xff ){\n    nNeeded = 1;\n  }else if( szPayload<=0xffff ){\n    nNeeded = 2;\n  }else{\n    nNeeded = 4;\n  }\n  delta = nNeeded - nExtra;\n  if( delta ){\n    u32 newSize = pParse->nBlob + delta;\n    if( delta>0 ){\n      if( newSize>pParse->nBlobAlloc && jsonBlobExpand(pParse, newSize) ){\n        return 0;  /* OOM error.  Error state recorded in pParse->oom. */\n      }\n      a = &pParse->aBlob[i];\n      memmove(&a[1+delta], &a[1], pParse->nBlob - (i+1));\n    }else{\n      memmove(&a[1], &a[1-delta], pParse->nBlob - (i+1-delta));\n    }\n    pParse->nBlob = newSize;\n  }\n  if( nNeeded==0 ){\n    a[0] = (a[0] & 0x0f) | (szPayload<<4);\n  }else if( nNeeded==1 ){\n    a[0] = (a[0] & 0x0f) | 0xc0;\n    a[1] = szPayload & 0xff;\n  }else if( nNeeded==2 ){\n    a[0] = (a[0] & 0x0f) | 0xd0;\n    a[1] = (szPayload >> 8) & 0xff;\n    a[2] = szPayload & 0xff;\n  }else{\n    a[0] = (a[0] & 0x0f) | 0xe0;\n    a[1] = (szPayload >> 24) & 0xff;\n    a[2] = (szPayload >> 16) & 0xff;\n    a[3] = (szPayload >> 8) & 0xff;\n    a[4] = szPayload & 0xff;\n  }\n  return delta;\n}\n\n/*\n** If z[0] is 'u' and is followed by exactly 4 hexadecimal character,\n** then set *pOp to JSONB_TEXTJ and return true.  If not, do not make\n** any changes to *pOp and return false.\n*/\nstatic int jsonIs4HexB(const char *z, int *pOp){\n  if( z[0]!='u' ) return 0;\n  if( !jsonIs4Hex(&z[1]) ) return 0;\n  *pOp = JSONB_TEXTJ;\n  return 1;\n}\n\n/*\n** Check a single element of the JSONB in pParse for validity.\n**\n** The element to be checked starts at offset i and must end at on the\n** last byte before iEnd.\n**\n** Return 0 if everything is correct.  Return the 1-based byte offset of the\n** error if a problem is detected.  (In other words, if the error is at offset\n** 0, return 1).\n*/\nstatic u32 jsonbValidityCheck(\n  const JsonParse *pParse,    /* Input JSONB.  Only aBlob and nBlob are used */\n  u32 i,                      /* Start of element as pParse->aBlob[i] */\n  u32 iEnd,                   /* One more than the last byte of the element */\n  u32 iDepth                  /* Current nesting depth */\n){\n  u32 n, sz, j, k;\n  const u8 *z;\n  u8 x;\n  if( iDepth>JSON_MAX_DEPTH ) return i+1;\n  sz = 0;\n  n = jsonbPayloadSize(pParse, i, &sz);\n  if( NEVER(n==0) ) return i+1;          /* Checked by caller */\n  if( NEVER(i+n+sz!=iEnd) ) return i+1;  /* Checked by caller */\n  z = pParse->aBlob;\n  x = z[i] & 0x0f;\n  switch( x ){\n    case JSONB_NULL:\n    case JSONB_TRUE:\n    case JSONB_FALSE: {\n      return n+sz==1 ? 0 : i+1;\n    }\n    case JSONB_INT: {\n      if( sz<1 ) return i+1;\n      j = i+n;\n      if( z[j]=='-' ){\n        j++;\n        if( sz<2 ) return i+1;\n      }\n      k = i+n+sz;\n      while( j<k ){\n        if( sqlite3Isdigit(z[j]) ){\n          j++;\n        }else{\n          return j+1;\n        }\n      }\n      return 0;\n    }\n    case JSONB_INT5: {\n      if( sz<3 ) return i+1;\n      j = i+n;\n      if( z[j]=='-' ){\n        if( sz<4 ) return i+1;\n        j++;\n      }\n      if( z[j]!='0' ) return i+1;\n      if( z[j+1]!='x' && z[j+1]!='X' ) return j+2;\n      j += 2;\n      k = i+n+sz;\n      while( j<k ){\n        if( sqlite3Isxdigit(z[j]) ){\n          j++;\n        }else{\n          return j+1;\n        }\n      }\n      return 0;\n    }\n    case JSONB_FLOAT:\n    case JSONB_FLOAT5: {\n      u8 seen = 0;   /* 0: initial.  1: '.' seen  2: 'e' seen */\n      if( sz<2 ) return i+1;\n      j = i+n;\n      k = j+sz;\n      if( z[j]=='-' ){\n        j++;\n        if( sz<3 ) return i+1;\n      }\n      if( z[j]=='.' ){\n        if( x==JSONB_FLOAT ) return j+1;\n        if( !sqlite3Isdigit(z[j+1]) ) return j+1;\n        j += 2;\n        seen = 1;\n      }else if( z[j]=='0' && x==JSONB_FLOAT ){\n        if( j+3>k ) return j+1;\n        if( z[j+1]!='.' && z[j+1]!='e' && z[j+1]!='E' ) return j+1;\n        j++;\n      }\n      for(; j<k; j++){\n        if( sqlite3Isdigit(z[j]) ) continue;\n        if( z[j]=='.' ){\n          if( seen>0 ) return j+1;\n          if( x==JSONB_FLOAT && (j==k-1 || !sqlite3Isdigit(z[j+1])) ){\n            return j+1;\n          }\n          seen = 1;\n          continue;\n        }\n        if( z[j]=='e' || z[j]=='E' ){\n          if( seen==2 ) return j+1;\n          if( j==k-1 ) return j+1;\n          if( z[j+1]=='+' || z[j+1]=='-' ){\n            j++;\n            if( j==k-1 ) return j+1;\n          }\n          seen = 2;\n          continue;\n        }\n        return j+1;\n      }\n      if( seen==0 ) return i+1;\n      return 0;\n    }\n    case JSONB_TEXT: {\n      j = i+n;\n      k = j+sz;\n      while( j<k ){\n        if( !jsonIsOk[z[j]] && z[j]!='\\'' ) return j+1;\n        j++;\n      }\n      return 0;\n    }\n    case JSONB_TEXTJ:\n    case JSONB_TEXT5: {\n      j = i+n;\n      k = j+sz;\n      while( j<k ){\n        if( !jsonIsOk[z[j]] && z[j]!='\\'' ){\n          if( z[j]=='\"' ){\n            if( x==JSONB_TEXTJ ) return j+1;\n          }else if( z[j]<=0x1f ){\n            /* Control characters in JSON5 string literals are ok */\n            if( x==JSONB_TEXTJ ) return j+1;\n          }else if( NEVER(z[j]!='\\\\') || j+1>=k ){\n            return j+1;\n          }else if( strchr(\"\\\"\\\\/bfnrt\",z[j+1])!=0 ){\n            j++;\n          }else if( z[j+1]=='u' ){\n            if( j+5>=k ) return j+1;\n            if( !jsonIs4Hex((const char*)&z[j+2]) ) return j+1;\n            j++;\n          }else if( x!=JSONB_TEXT5 ){\n            return j+1;\n          }else{\n            u32 c = 0;\n            u32 szC = jsonUnescapeOneChar((const char*)&z[j], k-j, &c);\n            if( c==JSON_INVALID_CHAR ) return j+1;\n            j += szC - 1;\n          }\n        }\n        j++;\n      }\n      return 0;\n    }\n    case JSONB_TEXTRAW: {\n      return 0;\n    }\n    case JSONB_ARRAY: {\n      u32 sub;\n      j = i+n;\n      k = j+sz;\n      while( j<k ){\n        sz = 0;\n        n = jsonbPayloadSize(pParse, j, &sz);\n        if( n==0 ) return j+1;\n        if( j+n+sz>k ) return j+1;\n        sub = jsonbValidityCheck(pParse, j, j+n+sz, iDepth+1);\n        if( sub ) return sub;\n        j += n + sz;\n      }\n      assert( j==k );\n      return 0;\n    }\n    case JSONB_OBJECT: {\n      u32 cnt = 0;\n      u32 sub;\n      j = i+n;\n      k = j+sz;\n      while( j<k ){\n        sz = 0;\n        n = jsonbPayloadSize(pParse, j, &sz);\n        if( n==0 ) return j+1;\n        if( j+n+sz>k ) return j+1;\n        if( (cnt & 1)==0 ){\n          x = z[j] & 0x0f;\n          if( x<JSONB_TEXT || x>JSONB_TEXTRAW ) return j+1;\n        }\n        sub = jsonbValidityCheck(pParse, j, j+n+sz, iDepth+1);\n        if( sub ) return sub;\n        cnt++;\n        j += n + sz;\n      }\n      assert( j==k );\n      if( (cnt & 1)!=0 ) return j+1;\n      return 0;\n    }\n    default: {\n      return i+1;\n    }\n  }\n}\n\n/*\n** Translate a single element of JSON text at pParse->zJson[i] into\n** its equivalent binary JSONB representation.  Append the translation into\n** pParse->aBlob[] beginning at pParse->nBlob.  The size of\n** pParse->aBlob[] is increased as necessary.\n**\n** Return the index of the first character past the end of the element parsed,\n** or one of the following special result codes:\n**\n**      0    End of input\n**     -1    Syntax error or OOM\n**     -2    '}' seen   \\\n**     -3    ']' seen    \\___  For these returns, pParse->iErr is set to\n**     -4    ',' seen    /     the index in zJson[] of the seen character\n**     -5    ':' seen   /\n*/\nstatic int jsonTranslateTextToBlob(JsonParse *pParse, u32 i){\n  char c;\n  u32 j;\n  u32 iThis, iStart;\n  int x;\n  u8 t;\n  const char *z = pParse->zJson;\njson_parse_restart:\n  switch( (u8)z[i] ){\n  case '{': {\n    /* Parse object */\n    iThis = pParse->nBlob;\n    jsonBlobAppendNode(pParse, JSONB_OBJECT, pParse->nJson-i, 0);\n    if( ++pParse->iDepth > JSON_MAX_DEPTH ){\n      pParse->iErr = i;\n      return -1;\n    }\n    iStart = pParse->nBlob;\n    for(j=i+1;;j++){\n      u32 iBlob = pParse->nBlob;\n      x = jsonTranslateTextToBlob(pParse, j);\n      if( x<=0 ){\n        int op;\n        if( x==(-2) ){\n          j = pParse->iErr;\n          if( pParse->nBlob!=(u32)iStart ) pParse->hasNonstd = 1;\n          break;\n        }\n        j += json5Whitespace(&z[j]);\n        op = JSONB_TEXT;\n        if( sqlite3JsonId1(z[j])\n         || (z[j]=='\\\\' && jsonIs4HexB(&z[j+1], &op))\n        ){\n          int k = j+1;\n          while( (sqlite3JsonId2(z[k]) && json5Whitespace(&z[k])==0)\n            || (z[k]=='\\\\' && jsonIs4HexB(&z[k+1], &op))\n          ){\n            k++;\n          }\n          assert( iBlob==pParse->nBlob );\n          jsonBlobAppendNode(pParse, op, k-j, &z[j]);\n          pParse->hasNonstd = 1;\n          x = k;\n        }else{\n          if( x!=-1 ) pParse->iErr = j;\n          return -1;\n        }\n      }\n      if( pParse->oom ) return -1;\n      t = pParse->aBlob[iBlob] & 0x0f;\n      if( t<JSONB_TEXT || t>JSONB_TEXTRAW ){\n        pParse->iErr = j;\n        return -1;\n      }\n      j = x;\n      if( z[j]==':' ){\n        j++;\n      }else{\n        if( jsonIsspace(z[j]) ){\n          /* strspn() is not helpful here */\n          do{ j++; }while( jsonIsspace(z[j]) );\n          if( z[j]==':' ){\n            j++;\n            goto parse_object_value;\n          }\n        }\n        x = jsonTranslateTextToBlob(pParse, j);\n        if( x!=(-5) ){\n          if( x!=(-1) ) pParse->iErr = j;\n          return -1;\n        }\n        j = pParse->iErr+1;\n      }\n    parse_object_value:\n      x = jsonTranslateTextToBlob(pParse, j);\n      if( x<=0 ){\n        if( x!=(-1) ) pParse->iErr = j;\n        return -1;\n      }\n      j = x;\n      if( z[j]==',' ){\n        continue;\n      }else if( z[j]=='}' ){\n        break;\n      }else{\n        if( jsonIsspace(z[j]) ){\n          j += 1 + (u32)strspn(&z[j+1], jsonSpaces);\n          if( z[j]==',' ){\n            continue;\n          }else if( z[j]=='}' ){\n            break;\n          }\n        }\n        x = jsonTranslateTextToBlob(pParse, j);\n        if( x==(-4) ){\n          j = pParse->iErr;\n          continue;\n        }\n        if( x==(-2) ){\n          j = pParse->iErr;\n          break;\n        }\n      }\n      pParse->iErr = j;\n      return -1;\n    }\n    jsonBlobChangePayloadSize(pParse, iThis, pParse->nBlob - iStart);\n    pParse->iDepth--;\n    return j+1;\n  }\n  case '[': {\n    /* Parse array */\n    iThis = pParse->nBlob;\n    assert( i<=(u32)pParse->nJson );\n    jsonBlobAppendNode(pParse, JSONB_ARRAY, pParse->nJson - i, 0);\n    iStart = pParse->nBlob;\n    if( pParse->oom ) return -1;\n    if( ++pParse->iDepth > JSON_MAX_DEPTH ){\n      pParse->iErr = i;\n      return -1;\n    }\n    for(j=i+1;;j++){\n      x = jsonTranslateTextToBlob(pParse, j);\n      if( x<=0 ){\n        if( x==(-3) ){\n          j = pParse->iErr;\n          if( pParse->nBlob!=iStart ) pParse->hasNonstd = 1;\n          break;\n        }\n        if( x!=(-1) ) pParse->iErr = j;\n        return -1;\n      }\n      j = x;\n      if( z[j]==',' ){\n        continue;\n      }else if( z[j]==']' ){\n        break;\n      }else{\n        if( jsonIsspace(z[j]) ){\n          j += 1 + (u32)strspn(&z[j+1], jsonSpaces);\n          if( z[j]==',' ){\n            continue;\n          }else if( z[j]==']' ){\n            break;\n          }\n        }\n        x = jsonTranslateTextToBlob(pParse, j);\n        if( x==(-4) ){\n          j = pParse->iErr;\n          continue;\n        }\n        if( x==(-3) ){\n          j = pParse->iErr;\n          break;\n        }\n      }\n      pParse->iErr = j;\n      return -1;\n    }\n    jsonBlobChangePayloadSize(pParse, iThis, pParse->nBlob - iStart);\n    pParse->iDepth--;\n    return j+1;\n  }\n  case '\\'': {\n    u8 opcode;\n    char cDelim;\n    pParse->hasNonstd = 1;\n    opcode = JSONB_TEXT;\n    goto parse_string;\n  case '\"':\n    /* Parse string */\n    opcode = JSONB_TEXT;\n  parse_string:\n    cDelim = z[i];\n    j = i+1;\n    while( 1 /*exit-by-break*/ ){\n      if( jsonIsOk[(u8)z[j]] ){\n        if( !jsonIsOk[(u8)z[j+1]] ){\n          j += 1;\n        }else if( !jsonIsOk[(u8)z[j+2]] ){\n          j += 2;\n        }else{\n          j += 3;\n          continue;\n        }\n      }\n      c = z[j];\n      if( c==cDelim ){\n        break;\n      }else if( c=='\\\\' ){\n        c = z[++j];\n        if( c=='\"' || c=='\\\\' || c=='/' || c=='b' || c=='f'\n           || c=='n' || c=='r' || c=='t'\n           || (c=='u' && jsonIs4Hex(&z[j+1])) ){\n          if( opcode==JSONB_TEXT ) opcode = JSONB_TEXTJ;\n        }else if( c=='\\'' ||  c=='v' || c=='\\n'\n#ifdef SQLITE_BUG_COMPATIBLE_20250510\n           || (c=='0')                            /* Legacy bug compatible */\n#else\n           || (c=='0' && !sqlite3Isdigit(z[j+1])) /* Correct implementation */\n#endif\n           || (0xe2==(u8)c && 0x80==(u8)z[j+1]\n                && (0xa8==(u8)z[j+2] || 0xa9==(u8)z[j+2]))\n           || (c=='x' && jsonIs2Hex(&z[j+1])) ){\n          opcode = JSONB_TEXT5;\n          pParse->hasNonstd = 1;\n        }else if( c=='\\r' ){\n          if( z[j+1]=='\\n' ) j++;\n          opcode = JSONB_TEXT5;\n          pParse->hasNonstd = 1;\n        }else{\n          pParse->iErr = j;\n          return -1;\n        }\n      }else if( c<=0x1f ){\n        if( c==0 ){\n          pParse->iErr = j;\n          return -1;\n        }\n        /* Control characters are not allowed in canonical JSON string\n        ** literals, but are allowed in JSON5 string literals. */\n        opcode = JSONB_TEXT5;\n        pParse->hasNonstd = 1;\n      }else if( c=='\"' ){\n        opcode = JSONB_TEXT5;\n      }\n      j++;\n    }\n    jsonBlobAppendNode(pParse, opcode, j-1-i, &z[i+1]);\n    return j+1;\n  }\n  case 't': {\n    if( strncmp(z+i,\"true\",4)==0 && !sqlite3Isalnum(z[i+4]) ){\n      jsonBlobAppendOneByte(pParse, JSONB_TRUE);\n      return i+4;\n    }\n    pParse->iErr = i;\n    return -1;\n  }\n  case 'f': {\n    if( strncmp(z+i,\"false\",5)==0 && !sqlite3Isalnum(z[i+5]) ){\n      jsonBlobAppendOneByte(pParse, JSONB_FALSE);\n      return i+5;\n    }\n    pParse->iErr = i;\n    return -1;\n  }\n  case '+': {\n    u8 seenE;\n    pParse->hasNonstd = 1;\n    t = 0x00;            /* Bit 0x01:  JSON5.   Bit 0x02:  FLOAT */\n    goto parse_number;\n  case '.':\n    if( sqlite3Isdigit(z[i+1]) ){\n      pParse->hasNonstd = 1;\n      t = 0x03;          /* Bit 0x01:  JSON5.   Bit 0x02:  FLOAT */\n      seenE = 0;\n      goto parse_number_2;\n    }\n    pParse->iErr = i;\n    return -1;\n  case '-':\n  case '0':\n  case '1':\n  case '2':\n  case '3':\n  case '4':\n  case '5':\n  case '6':\n  case '7':\n  case '8':\n  case '9':\n    /* Parse number */\n    t = 0x00;            /* Bit 0x01:  JSON5.   Bit 0x02:  FLOAT */\n  parse_number:\n    seenE = 0;\n    assert( '-' < '0' );\n    assert( '+' < '0' );\n    assert( '.' < '0' );\n    c = z[i];\n\n    if( c<='0' ){\n      if( c=='0' ){\n        if( (z[i+1]=='x' || z[i+1]=='X') && sqlite3Isxdigit(z[i+2]) ){\n          assert( t==0x00 );\n          pParse->hasNonstd = 1;\n          t = 0x01;\n          for(j=i+3; sqlite3Isxdigit(z[j]); j++){}\n          goto parse_number_finish;\n        }else if( sqlite3Isdigit(z[i+1]) ){\n          pParse->iErr = i+1;\n          return -1;\n        }\n      }else{\n        if( !sqlite3Isdigit(z[i+1]) ){\n          /* JSON5 allows for \"+Infinity\" and \"-Infinity\" using exactly\n          ** that case.  SQLite also allows these in any case and it allows\n          ** \"+inf\" and \"-inf\". */\n          if( (z[i+1]=='I' || z[i+1]=='i')\n           && sqlite3StrNICmp(&z[i+1], \"inf\",3)==0\n          ){\n            pParse->hasNonstd = 1;\n            if( z[i]=='-' ){\n              jsonBlobAppendNode(pParse, JSONB_FLOAT, 6, \"-9e999\");\n            }else{\n              jsonBlobAppendNode(pParse, JSONB_FLOAT, 5, \"9e999\");\n            }\n            return i + (sqlite3StrNICmp(&z[i+4],\"inity\",5)==0 ? 9 : 4);\n          }\n          if( z[i+1]=='.' ){\n            pParse->hasNonstd = 1;\n            t |= 0x01;\n            goto parse_number_2;\n          }\n          pParse->iErr = i;\n          return -1;\n        }\n        if( z[i+1]=='0' ){\n          if( sqlite3Isdigit(z[i+2]) ){\n            pParse->iErr = i+1;\n            return -1;\n          }else if( (z[i+2]=='x' || z[i+2]=='X') && sqlite3Isxdigit(z[i+3]) ){\n            pParse->hasNonstd = 1;\n            t |= 0x01;\n            for(j=i+4; sqlite3Isxdigit(z[j]); j++){}\n            goto parse_number_finish;\n          }\n        }\n      }\n    }\n\n  parse_number_2:\n    for(j=i+1;; j++){\n      c = z[j];\n      if( sqlite3Isdigit(c) ) continue;\n      if( c=='.' ){\n        if( (t & 0x02)!=0 ){\n          pParse->iErr = j;\n          return -1;\n        }\n        t |= 0x02;\n        continue;\n      }\n      if( c=='e' || c=='E' ){\n        if( z[j-1]<'0' ){\n          if( ALWAYS(z[j-1]=='.') && ALWAYS(j-2>=i) && sqlite3Isdigit(z[j-2]) ){\n            pParse->hasNonstd = 1;\n            t |= 0x01;\n          }else{\n            pParse->iErr = j;\n            return -1;\n          }\n        }\n        if( seenE ){\n          pParse->iErr = j;\n          return -1;\n        }\n        t |= 0x02;\n        seenE = 1;\n        c = z[j+1];\n        if( c=='+' || c=='-' ){\n          j++;\n          c = z[j+1];\n        }\n        if( c<'0' || c>'9' ){\n          pParse->iErr = j;\n          return -1;\n        }\n        continue;\n      }\n      break;\n    }\n    if( z[j-1]<'0' ){\n      if( ALWAYS(z[j-1]=='.') && ALWAYS(j-2>=i) && sqlite3Isdigit(z[j-2]) ){\n        pParse->hasNonstd = 1;\n        t |= 0x01;\n      }else{\n        pParse->iErr = j;\n        return -1;\n      }\n    }\n  parse_number_finish:\n    assert( JSONB_INT+0x01==JSONB_INT5 );\n    assert( JSONB_FLOAT+0x01==JSONB_FLOAT5 );\n    assert( JSONB_INT+0x02==JSONB_FLOAT );\n    if( z[i]=='+' ) i++;\n    jsonBlobAppendNode(pParse, JSONB_INT+t, j-i, &z[i]);\n    return j;\n  }\n  case '}': {\n    pParse->iErr = i;\n    return -2;  /* End of {...} */\n  }\n  case ']': {\n    pParse->iErr = i;\n    return -3;  /* End of [...] */\n  }\n  case ',': {\n    pParse->iErr = i;\n    return -4;  /* List separator */\n  }\n  case ':': {\n    pParse->iErr = i;\n    return -5;  /* Object label/value separator */\n  }\n  case 0: {\n    return 0;   /* End of file */\n  }\n  case 0x09:\n  case 0x0a:\n  case 0x0d:\n  case 0x20: {\n    i += 1 + (u32)strspn(&z[i+1], jsonSpaces);\n    goto json_parse_restart;\n  }\n  case 0x0b:\n  case 0x0c:\n  case '/':\n  case 0xc2:\n  case 0xe1:\n  case 0xe2:\n  case 0xe3:\n  case 0xef: {\n    j = json5Whitespace(&z[i]);\n    if( j>0 ){\n      i += j;\n      pParse->hasNonstd = 1;\n      goto json_parse_restart;\n    }\n    pParse->iErr = i;\n    return -1;\n  }\n  case 'n': {\n    if( strncmp(z+i,\"null\",4)==0 && !sqlite3Isalnum(z[i+4]) ){\n      jsonBlobAppendOneByte(pParse, JSONB_NULL);\n      return i+4;\n    }\n    /* fall-through into the default case that checks for NaN */\n    /* no break */ deliberate_fall_through\n  }\n  default: {\n    u32 k;\n    int nn;\n    c = z[i];\n    for(k=0; k<sizeof(aNanInfName)/sizeof(aNanInfName[0]); k++){\n      if( c!=aNanInfName[k].c1 && c!=aNanInfName[k].c2 ) continue;\n      nn = aNanInfName[k].n;\n      if( sqlite3StrNICmp(&z[i], aNanInfName[k].zMatch, nn)!=0 ){\n        continue;\n      }\n      if( sqlite3Isalnum(z[i+nn]) ) continue;\n      if( aNanInfName[k].eType==JSONB_FLOAT ){\n        jsonBlobAppendNode(pParse, JSONB_FLOAT, 5, \"9e999\");\n      }else{\n        jsonBlobAppendOneByte(pParse, JSONB_NULL);\n      }\n      pParse->hasNonstd = 1;\n      return i + nn;\n    }\n    pParse->iErr = i;\n    return -1;  /* Syntax error */\n  }\n  } /* End switch(z[i]) */\n}\n\n\n/*\n** Parse a complete JSON string.  Return 0 on success or non-zero if there\n** are any errors.  If an error occurs, free all memory held by pParse,\n** but not pParse itself.\n**\n** pParse must be initialized to an empty parse object prior to calling\n** this routine.\n*/\nstatic int jsonConvertTextToBlob(\n  JsonParse *pParse,           /* Initialize and fill this JsonParse object */\n  sqlite3_context *pCtx        /* Report errors here */\n){\n  int i;\n  const char *zJson = pParse->zJson;\n  i = jsonTranslateTextToBlob(pParse, 0);\n  if( pParse->oom ) i = -1;\n  if( i>0 ){\n#ifdef SQLITE_DEBUG\n    assert( pParse->iDepth==0 );\n    if( sqlite3Config.bJsonSelfcheck ){\n      assert( jsonbValidityCheck(pParse, 0, pParse->nBlob, 0)==0 );\n    }\n#endif\n    while( jsonIsspace(zJson[i]) ) i++;\n    if( zJson[i] ){\n      i += json5Whitespace(&zJson[i]);\n      if( zJson[i] ){\n        if( pCtx ) sqlite3_result_error(pCtx, \"malformed JSON\", -1);\n        jsonParseReset(pParse);\n        return 1;\n      }\n      pParse->hasNonstd = 1;\n    }\n  }\n  if( i<=0 ){\n    if( pCtx!=0 ){\n      if( pParse->oom ){\n        sqlite3_result_error_nomem(pCtx);\n      }else{\n        sqlite3_result_error(pCtx, \"malformed JSON\", -1);\n      }\n    }\n    jsonParseReset(pParse);\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** The input string pStr is a well-formed JSON text string.  Convert\n** this into the JSONB format and make it the return value of the\n** SQL function.\n*/\nstatic void jsonReturnStringAsBlob(JsonString *pStr){\n  JsonParse px;\n  memset(&px, 0, sizeof(px));\n  jsonStringTerminate(pStr);\n  if( pStr->eErr ){\n    sqlite3_result_error_nomem(pStr->pCtx);\n    return;\n  }\n  px.zJson = pStr->zBuf;\n  px.nJson = pStr->nUsed;\n  px.db = sqlite3_context_db_handle(pStr->pCtx);\n  (void)jsonTranslateTextToBlob(&px, 0);\n  if( px.oom ){\n    sqlite3DbFree(px.db, px.aBlob);\n    sqlite3_result_error_nomem(pStr->pCtx);\n  }else{\n    assert( px.nBlobAlloc>0 );\n    assert( !px.bReadOnly );\n    sqlite3_result_blob(pStr->pCtx, px.aBlob, px.nBlob, SQLITE_DYNAMIC);\n  }\n}\n\n/* The byte at index i is a node type-code.  This routine\n** determines the payload size for that node and writes that\n** payload size in to *pSz.  It returns the offset from i to the\n** beginning of the payload.  Return 0 on error.\n*/\nstatic u32 jsonbPayloadSize(const JsonParse *pParse, u32 i, u32 *pSz){\n  u8 x;\n  u32 sz;\n  u32 n;\n  assert( i<=pParse->nBlob );\n  x = pParse->aBlob[i]>>4;\n  if( x<=11 ){\n    sz = x;\n    n = 1;\n  }else if( x==12 ){\n    if( i+1>=pParse->nBlob ){\n      *pSz = 0;\n      return 0;\n    }\n    sz = pParse->aBlob[i+1];\n    n = 2;\n  }else if( x==13 ){\n    if( i+2>=pParse->nBlob ){\n      *pSz = 0;\n      return 0;\n    }\n    sz = (pParse->aBlob[i+1]<<8) + pParse->aBlob[i+2];\n    n = 3;\n  }else if( x==14 ){\n    if( i+4>=pParse->nBlob ){\n      *pSz = 0;\n      return 0;\n    }\n    sz = ((u32)pParse->aBlob[i+1]<<24) + (pParse->aBlob[i+2]<<16) +\n         (pParse->aBlob[i+3]<<8) + pParse->aBlob[i+4];\n    n = 5;\n  }else{\n    if( i+8>=pParse->nBlob\n     || pParse->aBlob[i+1]!=0\n     || pParse->aBlob[i+2]!=0\n     || pParse->aBlob[i+3]!=0\n     || pParse->aBlob[i+4]!=0\n    ){\n      *pSz = 0;\n      return 0;\n    }\n    sz = ((u32)pParse->aBlob[i+5]<<24) + (pParse->aBlob[i+6]<<16) +\n         (pParse->aBlob[i+7]<<8) + pParse->aBlob[i+8];\n    n = 9;\n  }\n  if( (i64)i+sz+n > pParse->nBlob\n   && (i64)i+sz+n > pParse->nBlob-pParse->delta\n  ){\n    *pSz = 0;\n    return 0;\n  }\n  *pSz = sz;\n  return n;\n}\n\n\n/*\n** Translate the binary JSONB representation of JSON beginning at\n** pParse->aBlob[i] into a JSON text string.  Append the JSON\n** text onto the end of pOut.  Return the index in pParse->aBlob[]\n** of the first byte past the end of the element that is translated.\n**\n** If an error is detected in the BLOB input, the pOut->eErr flag\n** might get set to JSTRING_MALFORMED.  But not all BLOB input errors\n** are detected.  So a malformed JSONB input might either result\n** in an error, or in incorrect JSON.\n**\n** The pOut->eErr JSTRING_OOM flag is set on a OOM.\n*/\nstatic u32 jsonTranslateBlobToText(\n  const JsonParse *pParse,       /* the complete parse of the JSON */\n  u32 i,                         /* Start rendering at this index */\n  JsonString *pOut               /* Write JSON here */\n){\n  u32 sz, n, j, iEnd;\n\n  n = jsonbPayloadSize(pParse, i, &sz);\n  if( n==0 ){\n    pOut->eErr |= JSTRING_MALFORMED;\n    return pParse->nBlob+1;\n  }\n  switch( pParse->aBlob[i] & 0x0f ){\n    case JSONB_NULL: {\n      jsonAppendRawNZ(pOut, \"null\", 4);\n      return i+1;\n    }\n    case JSONB_TRUE: {\n      jsonAppendRawNZ(pOut, \"true\", 4);\n      return i+1;\n    }\n    case JSONB_FALSE: {\n      jsonAppendRawNZ(pOut, \"false\", 5);\n      return i+1;\n    }\n    case JSONB_INT:\n    case JSONB_FLOAT: {\n      if( sz==0 ) goto malformed_jsonb;\n      jsonAppendRaw(pOut, (const char*)&pParse->aBlob[i+n], sz);\n      break;\n    }\n    case JSONB_INT5: {  /* Integer literal in hexadecimal notation */\n      u32 k = 2;\n      sqlite3_uint64 u = 0;\n      const char *zIn = (const char*)&pParse->aBlob[i+n];\n      int bOverflow = 0;\n      if( sz==0 ) goto malformed_jsonb;\n      if( zIn[0]=='-' ){\n        jsonAppendChar(pOut, '-');\n        k++;\n      }else if( zIn[0]=='+' ){\n        k++;\n      }\n      for(; k<sz; k++){\n        if( !sqlite3Isxdigit(zIn[k]) ){\n          pOut->eErr |= JSTRING_MALFORMED;\n          break;\n        }else if( (u>>60)!=0 ){\n          bOverflow = 1;\n        }else{\n          u = u*16 + sqlite3HexToInt(zIn[k]);\n        }\n      }\n      jsonPrintf(100,pOut,bOverflow?\"9.0e999\":\"%llu\", u);\n      break;\n    }\n    case JSONB_FLOAT5: { /* Float literal missing digits beside \".\" */\n      u32 k = 0;\n      const char *zIn = (const char*)&pParse->aBlob[i+n];\n      if( sz==0 ) goto malformed_jsonb;\n      if( zIn[0]=='-' ){\n        jsonAppendChar(pOut, '-');\n        k++;\n      }\n      if( zIn[k]=='.' ){\n        jsonAppendChar(pOut, '0');\n      }\n      for(; k<sz; k++){\n        jsonAppendChar(pOut, zIn[k]);\n        if( zIn[k]=='.' && (k+1==sz || !sqlite3Isdigit(zIn[k+1])) ){\n          jsonAppendChar(pOut, '0');\n        }\n      }\n      break;\n    }\n    case JSONB_TEXT:\n    case JSONB_TEXTJ: {\n      if( pOut->nUsed+sz+2<=pOut->nAlloc || jsonStringGrow(pOut, sz+2)==0 ){\n        pOut->zBuf[pOut->nUsed] = '\"';\n        memcpy(pOut->zBuf+pOut->nUsed+1,(const char*)&pParse->aBlob[i+n],sz);\n        pOut->zBuf[pOut->nUsed+sz+1] = '\"';\n        pOut->nUsed += sz+2;\n      }\n      break;\n    }\n    case JSONB_TEXT5: {\n      const char *zIn;\n      u32 k;\n      u32 sz2 = sz;\n      zIn = (const char*)&pParse->aBlob[i+n];\n      jsonAppendChar(pOut, '\"');\n      while( sz2>0 ){\n        for(k=0; k<sz2 && (jsonIsOk[(u8)zIn[k]] || zIn[k]=='\\''); k++){}\n        if( k>0 ){\n          jsonAppendRawNZ(pOut, zIn, k);\n          if( k>=sz2 ){\n            break;\n          }\n          zIn += k;\n          sz2 -= k;\n        }\n        if( zIn[0]=='\"' ){\n          jsonAppendRawNZ(pOut, \"\\\\\\\"\", 2);\n          zIn++;\n          sz2--;\n          continue;\n        }\n        if( zIn[0]<=0x1f ){\n          if( pOut->nUsed+7>pOut->nAlloc && jsonStringGrow(pOut,7) ) break;\n          jsonAppendControlChar(pOut, zIn[0]);\n          zIn++;\n          sz2--;\n          continue;\n        }\n        assert( zIn[0]=='\\\\' );\n        assert( sz2>=1 );\n        if( sz2<2 ){\n          pOut->eErr |= JSTRING_MALFORMED;\n          break;\n        }\n        switch( (u8)zIn[1] ){\n          case '\\'':\n            jsonAppendChar(pOut, '\\'');\n            break;\n          case 'v':\n            jsonAppendRawNZ(pOut, \"\\\\u000b\", 6);\n            break;\n          case 'x':\n            if( sz2<4 ){\n              pOut->eErr |= JSTRING_MALFORMED;\n              sz2 = 2;\n              break;\n            }\n            jsonAppendRawNZ(pOut, \"\\\\u00\", 4);\n            jsonAppendRawNZ(pOut, &zIn[2], 2);\n            zIn += 2;\n            sz2 -= 2;\n            break;\n          case '0':\n            jsonAppendRawNZ(pOut, \"\\\\u0000\", 6);\n            break;\n          case '\\r':\n            if( sz2>2 && zIn[2]=='\\n' ){\n              zIn++;\n              sz2--;\n            }\n            break;\n          case '\\n':\n            break;\n          case 0xe2:\n            /* '\\' followed by either U+2028 or U+2029 is ignored as\n            ** whitespace.  Not that in UTF8, U+2028 is 0xe2 0x80 0x29.\n            ** U+2029 is the same except for the last byte */\n            if( sz2<4\n             || 0x80!=(u8)zIn[2]\n             || (0xa8!=(u8)zIn[3] && 0xa9!=(u8)zIn[3])\n            ){\n              pOut->eErr |= JSTRING_MALFORMED;\n              sz2 = 2;\n              break;\n            }\n            zIn += 2;\n            sz2 -= 2;\n            break;\n          default:\n            jsonAppendRawNZ(pOut, zIn, 2);\n            break;\n        }\n        assert( sz2>=2 );\n        zIn += 2;\n        sz2 -= 2;\n      }\n      jsonAppendChar(pOut, '\"');\n      break;\n    }\n    case JSONB_TEXTRAW: {\n      jsonAppendString(pOut, (const char*)&pParse->aBlob[i+n], sz);\n      break;\n    }\n    case JSONB_ARRAY: {\n      jsonAppendChar(pOut, '[');\n      j = i+n;\n      iEnd = j+sz;\n      while( j<iEnd && pOut->eErr==0 ){\n        j = jsonTranslateBlobToText(pParse, j, pOut);\n        jsonAppendChar(pOut, ',');\n      }\n      if( j>iEnd ) pOut->eErr |= JSTRING_MALFORMED;\n      if( sz>0 ) jsonStringTrimOneChar(pOut);\n      jsonAppendChar(pOut, ']');\n      break;\n    }\n    case JSONB_OBJECT: {\n      int x = 0;\n      jsonAppendChar(pOut, '{');\n      j = i+n;\n      iEnd = j+sz;\n      while( j<iEnd && pOut->eErr==0 ){\n        j = jsonTranslateBlobToText(pParse, j, pOut);\n        jsonAppendChar(pOut, (x++ & 1) ? ',' : ':');\n      }\n      if( (x & 1)!=0 || j>iEnd ) pOut->eErr |= JSTRING_MALFORMED;\n      if( sz>0 ) jsonStringTrimOneChar(pOut);\n      jsonAppendChar(pOut, '}');\n      break;\n    }\n\n    default: {\n      malformed_jsonb:\n      pOut->eErr |= JSTRING_MALFORMED;\n      break;\n    }\n  }\n  return i+n+sz;\n}\n\n/* Context for recursion of json_pretty()\n*/\ntypedef struct JsonPretty JsonPretty;\nstruct JsonPretty {\n  JsonParse *pParse;        /* The BLOB being rendered */\n  JsonString *pOut;         /* Generate pretty output into this string */\n  const char *zIndent;      /* Use this text for indentation */\n  u32 szIndent;             /* Bytes in zIndent[] */\n  u32 nIndent;              /* Current level of indentation */\n};\n\n/* Append indentation to the pretty JSON under construction */\nstatic void jsonPrettyIndent(JsonPretty *pPretty){\n  u32 jj;\n  for(jj=0; jj<pPretty->nIndent; jj++){\n    jsonAppendRaw(pPretty->pOut, pPretty->zIndent, pPretty->szIndent);\n  }\n}\n\n/*\n** Translate the binary JSONB representation of JSON beginning at\n** pParse->aBlob[i] into a JSON text string.  Append the JSON\n** text onto the end of pOut.  Return the index in pParse->aBlob[]\n** of the first byte past the end of the element that is translated.\n**\n** This is a variant of jsonTranslateBlobToText() that \"pretty-prints\"\n** the output.  Extra whitespace is inserted to make the JSON easier\n** for humans to read.\n**\n** If an error is detected in the BLOB input, the pOut->eErr flag\n** might get set to JSTRING_MALFORMED.  But not all BLOB input errors\n** are detected.  So a malformed JSONB input might either result\n** in an error, or in incorrect JSON.\n**\n** The pOut->eErr JSTRING_OOM flag is set on a OOM.\n*/\nstatic u32 jsonTranslateBlobToPrettyText(\n  JsonPretty *pPretty,       /* Pretty-printing context */\n  u32 i                      /* Start rendering at this index */\n){\n  u32 sz, n, j, iEnd;\n  const JsonParse *pParse = pPretty->pParse;\n  JsonString *pOut = pPretty->pOut;\n  n = jsonbPayloadSize(pParse, i, &sz);\n  if( n==0 ){\n    pOut->eErr |= JSTRING_MALFORMED;\n    return pParse->nBlob+1;\n  }\n  switch( pParse->aBlob[i] & 0x0f ){\n    case JSONB_ARRAY: {\n      j = i+n;\n      iEnd = j+sz;\n      jsonAppendChar(pOut, '[');\n      if( j<iEnd ){\n        jsonAppendChar(pOut, '\\n');\n        pPretty->nIndent++;\n        while( pOut->eErr==0 ){\n          jsonPrettyIndent(pPretty);\n          j = jsonTranslateBlobToPrettyText(pPretty, j);\n          if( j>=iEnd ) break;\n          jsonAppendRawNZ(pOut, \",\\n\", 2);\n        }\n        jsonAppendChar(pOut, '\\n');\n        pPretty->nIndent--;\n        jsonPrettyIndent(pPretty);\n      }\n      jsonAppendChar(pOut, ']');\n      i = iEnd;\n      break;\n    }\n    case JSONB_OBJECT: {\n      j = i+n;\n      iEnd = j+sz;\n      jsonAppendChar(pOut, '{');\n      if( j<iEnd ){\n        jsonAppendChar(pOut, '\\n');\n        pPretty->nIndent++;\n        while( pOut->eErr==0 ){\n          jsonPrettyIndent(pPretty);\n          j = jsonTranslateBlobToText(pParse, j, pOut);\n          if( j>iEnd ){\n            pOut->eErr |= JSTRING_MALFORMED;\n            break;\n          }\n          jsonAppendRawNZ(pOut, \": \", 2);\n          j = jsonTranslateBlobToPrettyText(pPretty, j);\n          if( j>=iEnd ) break;\n          jsonAppendRawNZ(pOut, \",\\n\", 2);\n        }\n        jsonAppendChar(pOut, '\\n');\n        pPretty->nIndent--;\n        jsonPrettyIndent(pPretty);\n      }\n      jsonAppendChar(pOut, '}');\n      i = iEnd;\n      break;\n    }\n    default: {\n      i = jsonTranslateBlobToText(pParse, i, pOut);\n      break;\n    }\n  }\n  return i;\n}\n\n/*\n** Given that a JSONB_ARRAY object starts at offset i, return\n** the number of entries in that array.\n*/\nstatic u32 jsonbArrayCount(JsonParse *pParse, u32 iRoot){\n  u32 n, sz, i, iEnd;\n  u32 k = 0;\n  n = jsonbPayloadSize(pParse, iRoot, &sz);\n  iEnd = iRoot+n+sz;\n  for(i=iRoot+n; n>0 && i<iEnd; i+=sz+n, k++){\n    n = jsonbPayloadSize(pParse, i, &sz);\n  }\n  return k;\n}\n\n/*\n** Edit the payload size of the element at iRoot by the amount in\n** pParse->delta.\n*/\nstatic void jsonAfterEditSizeAdjust(JsonParse *pParse, u32 iRoot){\n  u32 sz = 0;\n  u32 nBlob;\n  assert( pParse->delta!=0 );\n  assert( pParse->nBlobAlloc >= pParse->nBlob );\n  nBlob = pParse->nBlob;\n  pParse->nBlob = pParse->nBlobAlloc;\n  (void)jsonbPayloadSize(pParse, iRoot, &sz);\n  pParse->nBlob = nBlob;\n  sz += pParse->delta;\n  pParse->delta += jsonBlobChangePayloadSize(pParse, iRoot, sz);\n}\n\n/*\n** If the JSONB at aIns[0..nIns-1] can be expanded (by denormalizing the\n** size field) by d bytes, then write the expansion into aOut[] and\n** return true.  In this way, an overwrite happens without changing the\n** size of the JSONB, which reduces memcpy() operations and also make it\n** faster and easier to update the B-Tree entry that contains the JSONB\n** in the database.\n**\n** If the expansion of aIns[] by d bytes cannot be (easily) accomplished\n** then return false.\n**\n** The d parameter is guaranteed to be between 1 and 8.\n**\n** This routine is an optimization.  A correct answer is obtained if it\n** always leaves the output unchanged and returns false.\n*/\nstatic int jsonBlobOverwrite(\n  u8 *aOut,                 /* Overwrite here */\n  const u8 *aIns,           /* New content */\n  u32 nIns,                 /* Bytes of new content */\n  u32 d                     /* Need to expand new content by this much */\n){\n  u32 szPayload;       /* Bytes of payload */\n  u32 i;               /* New header size, after expansion & a loop counter */\n  u8 szHdr;            /* Size of header before expansion */\n\n  /* Lookup table for finding the upper 4 bits of the first byte of the\n  ** expanded aIns[], based on the size of the expanded aIns[] header:\n  **\n  **                             2     3  4     5  6  7  8     9 */\n  static const u8 aType[] = { 0xc0, 0xd0, 0, 0xe0, 0, 0, 0, 0xf0 };\n\n  if( (aIns[0]&0x0f)<=2 ) return 0;    /* Cannot enlarge NULL, true, false */\n  switch( aIns[0]>>4 ){\n    default: {                         /* aIns[] header size 1 */\n      if( ((1<<d)&0x116)==0 ) return 0;  /* d must be 1, 2, 4, or 8 */\n      i = d + 1;                         /* New hdr sz: 2, 3, 5, or 9 */\n      szHdr = 1;\n      break;\n    }\n    case 12: {                         /* aIns[] header size is 2 */\n      if( ((1<<d)&0x8a)==0) return 0;    /* d must be 1, 3, or 7 */\n      i = d + 2;                         /* New hdr sz: 2, 5, or 9 */\n      szHdr = 2;\n      break;\n    }\n    case 13: {                         /* aIns[] header size is 3 */\n      if( d!=2 && d!=6 ) return 0;       /* d must be 2 or 6 */\n      i = d + 3;                         /* New hdr sz: 5 or 9 */\n      szHdr = 3;\n      break;\n    }\n    case 14: {                         /* aIns[] header size is 5 */\n      if( d!=4 ) return 0;               /* d must be 4 */\n      i = 9;                             /* New hdr sz: 9 */\n      szHdr = 5;\n      break;\n    }\n    case 15: {                         /* aIns[] header size is 9 */\n      return 0;                          /* No solution */\n    }\n  }\n  assert( i>=2 && i<=9 && aType[i-2]!=0 );\n  aOut[0] = (aIns[0] & 0x0f) | aType[i-2];\n  memcpy(&aOut[i], &aIns[szHdr], nIns-szHdr);\n  szPayload = nIns - szHdr;\n  while( 1/*edit-by-break*/ ){\n    i--;\n    aOut[i] = szPayload & 0xff;\n    if( i==1 ) break;\n    szPayload >>= 8;\n  }\n  assert( (szPayload>>8)==0 );\n  return 1;\n}\n\n/*\n** Modify the JSONB blob at pParse->aBlob by removing nDel bytes of\n** content beginning at iDel, and replacing them with nIns bytes of\n** content given by aIns.\n**\n** nDel may be zero, in which case no bytes are removed.  But iDel is\n** still important as new bytes will be insert beginning at iDel.\n**\n** aIns may be zero, in which case space is created to hold nIns bytes\n** beginning at iDel, but that space is uninitialized.\n**\n** Set pParse->oom if an OOM occurs.\n*/\nstatic void jsonBlobEdit(\n  JsonParse *pParse,     /* The JSONB to be modified is in pParse->aBlob */\n  u32 iDel,              /* First byte to be removed */\n  u32 nDel,              /* Number of bytes to remove */\n  const u8 *aIns,        /* Content to insert */\n  u32 nIns               /* Bytes of content to insert */\n){\n  i64 d = (i64)nIns - (i64)nDel;\n  if( d<0 && d>=(-8) && aIns!=0\n   && jsonBlobOverwrite(&pParse->aBlob[iDel], aIns, nIns, (int)-d)\n  ){\n    return;\n  }\n  if( d!=0 ){\n    if( pParse->nBlob + d > pParse->nBlobAlloc ){\n      jsonBlobExpand(pParse, pParse->nBlob+d);\n      if( pParse->oom ) return;\n    }\n    memmove(&pParse->aBlob[iDel+nIns],\n            &pParse->aBlob[iDel+nDel],\n            pParse->nBlob - (iDel+nDel));\n    pParse->nBlob += d;\n    pParse->delta += d;\n  }\n  if( nIns && aIns ){\n    memcpy(&pParse->aBlob[iDel], aIns, nIns);\n  }\n}\n\n/*\n** Return the number of escaped newlines to be ignored.\n** An escaped newline is a one of the following byte sequences:\n**\n**    0x5c 0x0a\n**    0x5c 0x0d\n**    0x5c 0x0d 0x0a\n**    0x5c 0xe2 0x80 0xa8\n**    0x5c 0xe2 0x80 0xa9\n*/\nstatic u32 jsonBytesToBypass(const char *z, u32 n){\n  u32 i = 0;\n  while( i+1<n ){\n    if( z[i]!='\\\\' ) return i;\n    if( z[i+1]=='\\n' ){\n      i += 2;\n      continue;\n    }\n    if( z[i+1]=='\\r' ){\n      if( i+2<n && z[i+2]=='\\n' ){\n        i += 3;\n      }else{\n        i += 2;\n      }\n      continue;\n    }\n    if( 0xe2==(u8)z[i+1]\n     && i+3<n\n     && 0x80==(u8)z[i+2]\n     && (0xa8==(u8)z[i+3] || 0xa9==(u8)z[i+3])\n    ){\n      i += 4;\n      continue;\n    }\n    break;\n  }\n  return i;\n}\n\n/*\n** Input z[0..n] defines JSON escape sequence including the leading '\\\\'.\n** Decode that escape sequence into a single character.  Write that\n** character into *piOut.  Return the number of bytes in the escape sequence.\n**\n** If there is a syntax error of some kind (for example too few characters\n** after the '\\\\' to complete the encoding) then *piOut is set to\n** JSON_INVALID_CHAR.\n*/\nstatic u32 jsonUnescapeOneChar(const char *z, u32 n, u32 *piOut){\n  assert( n>0 );\n  assert( z[0]=='\\\\' );\n  if( n<2 ){\n    *piOut = JSON_INVALID_CHAR;\n    return n;\n  }\n  switch( (u8)z[1] ){\n    case 'u': {\n      u32 v, vlo;\n      if( n<6 ){\n        *piOut = JSON_INVALID_CHAR;\n        return n;\n      }\n      v = jsonHexToInt4(&z[2]);\n      if( (v & 0xfc00)==0xd800\n       && n>=12\n       && z[6]=='\\\\'\n       && z[7]=='u'\n       && ((vlo = jsonHexToInt4(&z[8]))&0xfc00)==0xdc00\n      ){\n        *piOut = ((v&0x3ff)<<10) + (vlo&0x3ff) + 0x10000;\n        return 12;\n      }else{\n        *piOut = v;\n        return 6;\n      }\n    }\n    case 'b': {   *piOut = '\\b';  return 2; }\n    case 'f': {   *piOut = '\\f';  return 2; }\n    case 'n': {   *piOut = '\\n';  return 2; }\n    case 'r': {   *piOut = '\\r';  return 2; }\n    case 't': {   *piOut = '\\t';  return 2; }\n    case 'v': {   *piOut = '\\v';  return 2; }\n    case '0': {\n      /* JSON5 requires that the \\0 escape not be followed by a digit.\n      ** But SQLite did not enforce this restriction in versions 3.42.0\n      ** through 3.49.2.  That was a bug.  But some applications might have\n      ** come to depend on that bug.  Use the SQLITE_BUG_COMPATIBLE_20250510\n      ** option to restore the old buggy behavior. */\n#ifdef SQLITE_BUG_COMPATIBLE_20250510\n      /* Legacy bug-compatible behavior */\n      *piOut = 0;\n#else\n      /* Correct behavior */\n      *piOut = (n>2 && sqlite3Isdigit(z[2])) ? JSON_INVALID_CHAR : 0;\n#endif\n      return 2;\n    }\n    case '\\'':\n    case '\"':\n    case '/':\n    case '\\\\':{   *piOut = z[1];  return 2; }\n    case 'x': {\n      if( n<4 ){\n        *piOut = JSON_INVALID_CHAR;\n        return n;\n      }\n      *piOut = (jsonHexToInt(z[2])<<4) | jsonHexToInt(z[3]);\n      return 4;\n    }\n    case 0xe2:\n    case '\\r':\n    case '\\n': {\n      u32 nSkip = jsonBytesToBypass(z, n);\n      if( nSkip==0 ){\n        *piOut = JSON_INVALID_CHAR;\n        return n;\n      }else if( nSkip==n ){\n        *piOut = 0;\n        return n;\n      }else if( z[nSkip]=='\\\\' ){\n        return nSkip + jsonUnescapeOneChar(&z[nSkip], n-nSkip, piOut);\n      }else{\n        int sz = sqlite3Utf8ReadLimited((u8*)&z[nSkip], n-nSkip, piOut);\n        return nSkip + sz;\n      }\n    }\n    default: {\n      *piOut = JSON_INVALID_CHAR;\n      return 2;\n    }\n  }\n}\n\n\n/*\n** Compare two object labels.  Return 1 if they are equal and\n** 0 if they differ.\n**\n** In this version, we know that one or the other or both of the\n** two comparands contains an escape sequence.\n*/\nstatic SQLITE_NOINLINE int jsonLabelCompareEscaped(\n  const char *zLeft,          /* The left label */\n  u32 nLeft,                  /* Size of the left label in bytes */\n  int rawLeft,                /* True if zLeft contains no escapes */\n  const char *zRight,         /* The right label */\n  u32 nRight,                 /* Size of the right label in bytes */\n  int rawRight                /* True if zRight is escape-free */\n){\n  u32 cLeft, cRight;\n  assert( rawLeft==0 || rawRight==0 );\n  while( 1 /*exit-by-return*/ ){\n    if( nLeft==0 ){\n      cLeft = 0;\n    }else if( rawLeft || zLeft[0]!='\\\\' ){\n      cLeft = ((u8*)zLeft)[0];\n      if( cLeft>=0xc0 ){\n        int sz = sqlite3Utf8ReadLimited((u8*)zLeft, nLeft, &cLeft);\n        zLeft += sz;\n        nLeft -= sz;\n      }else{\n        zLeft++;\n        nLeft--;\n      }\n    }else{\n      u32 n = jsonUnescapeOneChar(zLeft, nLeft, &cLeft);\n      zLeft += n;\n      assert( n<=nLeft );\n      nLeft -= n;\n    }\n    if( nRight==0 ){\n      cRight = 0;\n    }else if( rawRight || zRight[0]!='\\\\' ){\n      cRight = ((u8*)zRight)[0];\n      if( cRight>=0xc0 ){\n        int sz = sqlite3Utf8ReadLimited((u8*)zRight, nRight, &cRight);\n        zRight += sz;\n        nRight -= sz;\n      }else{\n        zRight++;\n        nRight--;\n      }\n    }else{\n      u32 n = jsonUnescapeOneChar(zRight, nRight, &cRight);\n      zRight += n;\n      assert( n<=nRight );\n      nRight -= n;\n    }\n    if( cLeft!=cRight ) return 0;\n    if( cLeft==0 ) return 1;\n  }\n}\n\n/*\n** Compare two object labels.  Return 1 if they are equal and\n** 0 if they differ.  Return -1 if an OOM occurs.\n*/\nstatic int jsonLabelCompare(\n  const char *zLeft,          /* The left label */\n  u32 nLeft,                  /* Size of the left label in bytes */\n  int rawLeft,                /* True if zLeft contains no escapes */\n  const char *zRight,         /* The right label */\n  u32 nRight,                 /* Size of the right label in bytes */\n  int rawRight                /* True if zRight is escape-free */\n){\n  if( rawLeft && rawRight ){\n    /* Simpliest case:  Neither label contains escapes.  A simple\n    ** memcmp() is sufficient. */\n    if( nLeft!=nRight ) return 0;\n    return memcmp(zLeft, zRight, nLeft)==0;\n  }else{\n    return jsonLabelCompareEscaped(zLeft, nLeft, rawLeft,\n                                   zRight, nRight, rawRight);\n  }\n}\n\n/*\n** Error returns from jsonLookupStep()\n*/\n#define JSON_LOOKUP_ERROR      0xffffffff\n#define JSON_LOOKUP_NOTFOUND   0xfffffffe\n#define JSON_LOOKUP_PATHERROR  0xfffffffd\n#define JSON_LOOKUP_ISERROR(x) ((x)>=JSON_LOOKUP_PATHERROR)\n\n/* Forward declaration */\nstatic u32 jsonLookupStep(JsonParse*,u32,const char*,u32);\n\n\n/* This helper routine for jsonLookupStep() populates pIns with\n** binary data that is to be inserted into pParse.\n**\n** In the common case, pIns just points to pParse->aIns and pParse->nIns.\n** But if the zPath of the original edit operation includes path elements\n** that go deeper, additional substructure must be created.\n**\n** For example:\n**\n**     json_insert('{}', '$.a.b.c', 123);\n**\n** The search stops at '$.a'  But additional substructure must be\n** created for the \".b.c\" part of the patch so that the final result\n** is:  {\"a\":{\"b\":{\"c\"::123}}}.  This routine populates pIns with\n** the binary equivalent of {\"b\":{\"c\":123}} so that it can be inserted.\n**\n** The caller is responsible for resetting pIns when it has finished\n** using the substructure.\n*/\nstatic u32 jsonCreateEditSubstructure(\n  JsonParse *pParse,  /* The original JSONB that is being edited */\n  JsonParse *pIns,    /* Populate this with the blob data to insert */\n  const char *zTail   /* Tail of the path that determins substructure */\n){\n  static const u8 emptyObject[] = { JSONB_ARRAY, JSONB_OBJECT };\n  int rc;\n  memset(pIns, 0, sizeof(*pIns));\n  pIns->db = pParse->db;\n  if( zTail[0]==0 ){\n    /* No substructure.  Just insert what is given in pParse. */\n    pIns->aBlob = pParse->aIns;\n    pIns->nBlob = pParse->nIns;\n    rc = 0;\n  }else{\n    /* Construct the binary substructure */\n    pIns->nBlob = 1;\n    pIns->aBlob = (u8*)&emptyObject[zTail[0]=='.'];\n    pIns->eEdit = pParse->eEdit;\n    pIns->nIns = pParse->nIns;\n    pIns->aIns = pParse->aIns;\n    rc = jsonLookupStep(pIns, 0, zTail, 0);\n    pParse->oom |= pIns->oom;\n  }\n  return rc;  /* Error code only */\n}\n\n/*\n** Search along zPath to find the Json element specified.  Return an\n** index into pParse->aBlob[] for the start of that element's value.\n**\n** If the value found by this routine is the value half of label/value pair\n** within an object, then set pPath->iLabel to the start of the corresponding\n** label, before returning.\n**\n** Return one of the JSON_LOOKUP error codes if problems are seen.\n**\n** This routine will also modify the blob.  If pParse->eEdit is one of\n** JEDIT_DEL, JEDIT_REPL, JEDIT_INS, or JEDIT_SET, then changes might be\n** made to the selected value.  If an edit is performed, then the return\n** value does not necessarily point to the select element.  If an edit\n** is performed, the return value is only useful for detecting error\n** conditions.\n*/\nstatic u32 jsonLookupStep(\n  JsonParse *pParse,      /* The JSON to search */\n  u32 iRoot,              /* Begin the search at this element of aBlob[] */\n  const char *zPath,      /* The path to search */\n  u32 iLabel              /* Label if iRoot is a value of in an object */\n){\n  u32 i, j, k, nKey, sz, n, iEnd, rc;\n  const char *zKey;\n  u8 x;\n\n  if( zPath[0]==0 ){\n    if( pParse->eEdit && jsonBlobMakeEditable(pParse, pParse->nIns) ){\n      n = jsonbPayloadSize(pParse, iRoot, &sz);\n      sz += n;\n      if( pParse->eEdit==JEDIT_DEL ){\n        if( iLabel>0 ){\n          sz += iRoot - iLabel;\n          iRoot = iLabel;\n        }\n        jsonBlobEdit(pParse, iRoot, sz, 0, 0);\n      }else if( pParse->eEdit==JEDIT_INS ){\n        /* Already exists, so json_insert() is a no-op */\n      }else{\n        /* json_set() or json_replace() */\n        jsonBlobEdit(pParse, iRoot, sz, pParse->aIns, pParse->nIns);\n      }\n    }\n    pParse->iLabel = iLabel;\n    return iRoot;\n  }\n  if( zPath[0]=='.' ){\n    int rawKey = 1;\n    x = pParse->aBlob[iRoot];\n    zPath++;\n    if( zPath[0]=='\"' ){\n      zKey = zPath + 1;\n      for(i=1; zPath[i] && zPath[i]!='\"'; i++){\n        if( zPath[i]=='\\\\' && zPath[i+1]!=0 ) i++;\n      }\n      nKey = i-1;\n      if( zPath[i] ){\n        i++;\n      }else{\n        return JSON_LOOKUP_PATHERROR;\n      }\n      testcase( nKey==0 );\n      rawKey = memchr(zKey, '\\\\', nKey)==0;\n    }else{\n      zKey = zPath;\n      for(i=0; zPath[i] && zPath[i]!='.' && zPath[i]!='['; i++){}\n      nKey = i;\n      if( nKey==0 ){\n        return JSON_LOOKUP_PATHERROR;\n      }\n    }\n    if( (x & 0x0f)!=JSONB_OBJECT ) return JSON_LOOKUP_NOTFOUND;\n    n = jsonbPayloadSize(pParse, iRoot, &sz);\n    j = iRoot + n;  /* j is the index of a label */\n    iEnd = j+sz;\n    while( j<iEnd ){\n      int rawLabel;\n      const char *zLabel;\n      x = pParse->aBlob[j] & 0x0f;\n      if( x<JSONB_TEXT || x>JSONB_TEXTRAW ) return JSON_LOOKUP_ERROR;\n      n = jsonbPayloadSize(pParse, j, &sz);\n      if( n==0 ) return JSON_LOOKUP_ERROR;\n      k = j+n;  /* k is the index of the label text */\n      if( k+sz>=iEnd ) return JSON_LOOKUP_ERROR;\n      zLabel = (const char*)&pParse->aBlob[k];\n      rawLabel = x==JSONB_TEXT || x==JSONB_TEXTRAW;\n      if( jsonLabelCompare(zKey, nKey, rawKey, zLabel, sz, rawLabel) ){\n        u32 v = k+sz;  /* v is the index of the value */\n        if( ((pParse->aBlob[v])&0x0f)>JSONB_OBJECT ) return JSON_LOOKUP_ERROR;\n        n = jsonbPayloadSize(pParse, v, &sz);\n        if( n==0 || v+n+sz>iEnd ) return JSON_LOOKUP_ERROR;\n        assert( j>0 );\n        rc = jsonLookupStep(pParse, v, &zPath[i], j);\n        if( pParse->delta ) jsonAfterEditSizeAdjust(pParse, iRoot);\n        return rc;\n      }\n      j = k+sz;\n      if( ((pParse->aBlob[j])&0x0f)>JSONB_OBJECT ) return JSON_LOOKUP_ERROR;\n      n = jsonbPayloadSize(pParse, j, &sz);\n      if( n==0 ) return JSON_LOOKUP_ERROR;\n      j += n+sz;\n    }\n    if( j>iEnd ) return JSON_LOOKUP_ERROR;\n    if( pParse->eEdit>=JEDIT_INS ){\n      u32 nIns;          /* Total bytes to insert (label+value) */\n      JsonParse v;       /* BLOB encoding of the value to be inserted */\n      JsonParse ix;      /* Header of the label to be inserted */\n      testcase( pParse->eEdit==JEDIT_INS );\n      testcase( pParse->eEdit==JEDIT_SET );\n      memset(&ix, 0, sizeof(ix));\n      ix.db = pParse->db;\n      jsonBlobAppendNode(&ix, rawKey?JSONB_TEXTRAW:JSONB_TEXT5, nKey, 0);\n      pParse->oom |= ix.oom;\n      rc = jsonCreateEditSubstructure(pParse, &v, &zPath[i]);\n      if( !JSON_LOOKUP_ISERROR(rc)\n       && jsonBlobMakeEditable(pParse, ix.nBlob+nKey+v.nBlob)\n      ){\n        assert( !pParse->oom );\n        nIns = ix.nBlob + nKey + v.nBlob;\n        jsonBlobEdit(pParse, j, 0, 0, nIns);\n        if( !pParse->oom ){\n          assert( pParse->aBlob!=0 ); /* Because pParse->oom!=0 */\n          assert( ix.aBlob!=0 );      /* Because pPasre->oom!=0 */\n          memcpy(&pParse->aBlob[j], ix.aBlob, ix.nBlob);\n          k = j + ix.nBlob;\n          memcpy(&pParse->aBlob[k], zKey, nKey);\n          k += nKey;\n          memcpy(&pParse->aBlob[k], v.aBlob, v.nBlob);\n          if( ALWAYS(pParse->delta) ) jsonAfterEditSizeAdjust(pParse, iRoot);\n        }\n      }\n      jsonParseReset(&v);\n      jsonParseReset(&ix);\n      return rc;\n    }\n  }else if( zPath[0]=='[' ){\n    x = pParse->aBlob[iRoot] & 0x0f;\n    if( x!=JSONB_ARRAY )  return JSON_LOOKUP_NOTFOUND;\n    n = jsonbPayloadSize(pParse, iRoot, &sz);\n    k = 0;\n    i = 1;\n    while( sqlite3Isdigit(zPath[i]) ){\n      k = k*10 + zPath[i] - '0';\n      i++;\n    }\n    if( i<2 || zPath[i]!=']' ){\n      if( zPath[1]=='#' ){\n        k = jsonbArrayCount(pParse, iRoot);\n        i = 2;\n        if( zPath[2]=='-' && sqlite3Isdigit(zPath[3]) ){\n          unsigned int nn = 0;\n          i = 3;\n          do{\n            nn = nn*10 + zPath[i] - '0';\n            i++;\n          }while( sqlite3Isdigit(zPath[i]) );\n          if( nn>k ) return JSON_LOOKUP_NOTFOUND;\n          k -= nn;\n        }\n        if( zPath[i]!=']' ){\n          return JSON_LOOKUP_PATHERROR;\n        }\n      }else{\n        return JSON_LOOKUP_PATHERROR;\n      }\n    }\n    j = iRoot+n;\n    iEnd = j+sz;\n    while( j<iEnd ){\n      if( k==0 ){\n        rc = jsonLookupStep(pParse, j, &zPath[i+1], 0);\n        if( pParse->delta ) jsonAfterEditSizeAdjust(pParse, iRoot);\n        return rc;\n      }\n      k--;\n      n = jsonbPayloadSize(pParse, j, &sz);\n      if( n==0 ) return JSON_LOOKUP_ERROR;\n      j += n+sz;\n    }\n    if( j>iEnd ) return JSON_LOOKUP_ERROR;\n    if( k>0 ) return JSON_LOOKUP_NOTFOUND;\n    if( pParse->eEdit>=JEDIT_INS ){\n      JsonParse v;\n      testcase( pParse->eEdit==JEDIT_INS );\n      testcase( pParse->eEdit==JEDIT_SET );\n      rc = jsonCreateEditSubstructure(pParse, &v, &zPath[i+1]);\n      if( !JSON_LOOKUP_ISERROR(rc)\n       && jsonBlobMakeEditable(pParse, v.nBlob)\n      ){\n        assert( !pParse->oom );\n        jsonBlobEdit(pParse, j, 0, v.aBlob, v.nBlob);\n      }\n      jsonParseReset(&v);\n      if( pParse->delta ) jsonAfterEditSizeAdjust(pParse, iRoot);\n      return rc;\n    }\n  }else{\n    return JSON_LOOKUP_PATHERROR;\n  }\n  return JSON_LOOKUP_NOTFOUND;\n}\n\n/*\n** Convert a JSON BLOB into text and make that text the return value\n** of an SQL function.\n*/\nstatic void jsonReturnTextJsonFromBlob(\n  sqlite3_context *ctx,\n  const u8 *aBlob,\n  u32 nBlob\n){\n  JsonParse x;\n  JsonString s;\n\n  if( NEVER(aBlob==0) ) return;\n  memset(&x, 0, sizeof(x));\n  x.aBlob = (u8*)aBlob;\n  x.nBlob = nBlob;\n  jsonStringInit(&s, ctx);\n  jsonTranslateBlobToText(&x, 0, &s);\n  jsonReturnString(&s, 0, 0);\n}\n\n\n/*\n** Return the value of the BLOB node at index i.\n**\n** If the value is a primitive, return it as an SQL value.\n** If the value is an array or object, return it as either\n** JSON text or the BLOB encoding, depending on the eMode flag\n** as follows:\n**\n**     eMode==0     JSONB if the JSON_B flag is set in userdata or\n**                  text if the JSON_B flag is omitted from userdata.\n**\n**     eMode==1     Text\n**\n**     eMode==2     JSONB\n*/\nstatic void jsonReturnFromBlob(\n  JsonParse *pParse,          /* Complete JSON parse tree */\n  u32 i,                      /* Index of the node */\n  sqlite3_context *pCtx,      /* Return value for this function */\n  int eMode                   /* Format of return: text of JSONB */\n){\n  u32 n, sz;\n  int rc;\n  sqlite3 *db = sqlite3_context_db_handle(pCtx);\n\n  assert( eMode>=0 && eMode<=2 );\n  n = jsonbPayloadSize(pParse, i, &sz);\n  if( n==0 ){\n    sqlite3_result_error(pCtx, \"malformed JSON\", -1);\n    return;\n  }\n  switch( pParse->aBlob[i] & 0x0f ){\n    case JSONB_NULL: {\n      if( sz ) goto returnfromblob_malformed;\n      sqlite3_result_null(pCtx);\n      break;\n    }\n    case JSONB_TRUE: {\n      if( sz ) goto returnfromblob_malformed;\n      sqlite3_result_int(pCtx, 1);\n      break;\n    }\n    case JSONB_FALSE: {\n      if( sz ) goto returnfromblob_malformed;\n      sqlite3_result_int(pCtx, 0);\n      break;\n    }\n    case JSONB_INT5:\n    case JSONB_INT: {\n      sqlite3_int64 iRes = 0;\n      char *z;\n      int bNeg = 0;\n      char x;\n      if( sz==0 ) goto returnfromblob_malformed;\n      x = (char)pParse->aBlob[i+n];\n      if( x=='-' ){\n        if( sz<2 ) goto returnfromblob_malformed;\n        n++;\n        sz--;\n        bNeg = 1;\n      }\n      z = sqlite3DbStrNDup(db, (const char*)&pParse->aBlob[i+n], (int)sz);\n      if( z==0 ) goto returnfromblob_oom;\n      rc = sqlite3DecOrHexToI64(z, &iRes);\n      sqlite3DbFree(db, z);\n      if( rc==0 ){\n        if( iRes<0 ){\n          /* A hexadecimal literal with 16 significant digits and with the\n          ** high-order bit set is a negative integer in SQLite (and hence\n          ** iRes comes back as negative) but should be interpreted as a\n          ** positive value if it occurs within JSON.  The value is too\n          ** large to appear as an SQLite integer so it must be converted\n          ** into floating point. */\n          double r;\n          r = (double)*(sqlite3_uint64*)&iRes;\n          sqlite3_result_double(pCtx, bNeg ? -r : r);\n        }else{\n          sqlite3_result_int64(pCtx, bNeg ? -iRes : iRes);\n        }\n      }else if( rc==3 && bNeg ){\n        sqlite3_result_int64(pCtx, SMALLEST_INT64);\n      }else if( rc==1 ){\n        goto returnfromblob_malformed;\n      }else{\n        if( bNeg ){ n--; sz++; }\n        goto to_double;\n      }\n      break;\n    }\n    case JSONB_FLOAT5:\n    case JSONB_FLOAT: {\n      double r;\n      char *z;\n      if( sz==0 ) goto returnfromblob_malformed;\n    to_double:\n      z = sqlite3DbStrNDup(db, (const char*)&pParse->aBlob[i+n], (int)sz);\n      if( z==0 ) goto returnfromblob_oom;\n      rc = sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);\n      sqlite3DbFree(db, z);\n      if( rc<=0 ) goto returnfromblob_malformed;\n      sqlite3_result_double(pCtx, r);\n      break;\n    }\n    case JSONB_TEXTRAW:\n    case JSONB_TEXT: {\n      sqlite3_result_text(pCtx, (char*)&pParse->aBlob[i+n], sz,\n                          SQLITE_TRANSIENT);\n      break;\n    }\n    case JSONB_TEXT5:\n    case JSONB_TEXTJ: {\n      /* Translate JSON formatted string into raw text */\n      u32 iIn, iOut;\n      const char *z;\n      char *zOut;\n      u32 nOut = sz;\n      z = (const char*)&pParse->aBlob[i+n];\n      zOut = sqlite3DbMallocRaw(db, ((u64)nOut)+1);\n      if( zOut==0 ) goto returnfromblob_oom;\n      for(iIn=iOut=0; iIn<sz; iIn++){\n        char c = z[iIn];\n        if( c=='\\\\' ){\n          u32 v;\n          u32 szEscape = jsonUnescapeOneChar(&z[iIn], sz-iIn, &v);\n          if( v<=0x7f ){\n            zOut[iOut++] = (char)v;\n          }else if( v<=0x7ff ){\n            assert( szEscape>=2 );\n            zOut[iOut++] = (char)(0xc0 | (v>>6));\n            zOut[iOut++] = 0x80 | (v&0x3f);\n          }else if( v<0x10000 ){\n            assert( szEscape>=3 );\n            zOut[iOut++] = 0xe0 | (v>>12);\n            zOut[iOut++] = 0x80 | ((v>>6)&0x3f);\n            zOut[iOut++] = 0x80 | (v&0x3f);\n          }else if( v==JSON_INVALID_CHAR ){\n            /* Silently ignore illegal unicode */\n          }else{\n            assert( szEscape>=4 );\n            zOut[iOut++] = 0xf0 | (v>>18);\n            zOut[iOut++] = 0x80 | ((v>>12)&0x3f);\n            zOut[iOut++] = 0x80 | ((v>>6)&0x3f);\n            zOut[iOut++] = 0x80 | (v&0x3f);\n          }\n          iIn += szEscape - 1;\n        }else{\n          zOut[iOut++] = c;\n        }\n      } /* end for() */\n      assert( iOut<=nOut );\n      zOut[iOut] = 0;\n      sqlite3_result_text(pCtx, zOut, iOut, SQLITE_DYNAMIC);\n      break;\n    }\n    case JSONB_ARRAY:\n    case JSONB_OBJECT: {\n      if( eMode==0 ){\n        if( (SQLITE_PTR_TO_INT(sqlite3_user_data(pCtx)) & JSON_BLOB)!=0 ){\n          eMode = 2;\n        }else{\n          eMode = 1;\n        }\n      }\n      if( eMode==2 ){\n        sqlite3_result_blob(pCtx, &pParse->aBlob[i], sz+n, SQLITE_TRANSIENT);\n      }else{\n        jsonReturnTextJsonFromBlob(pCtx, &pParse->aBlob[i], sz+n);\n      }\n      break;\n    }\n    default: {\n      goto returnfromblob_malformed;\n    }\n  }\n  return;\n\nreturnfromblob_oom:\n  sqlite3_result_error_nomem(pCtx);\n  return;\n\nreturnfromblob_malformed:\n  sqlite3_result_error(pCtx, \"malformed JSON\", -1);\n  return;\n}\n\n/*\n** pArg is a function argument that might be an SQL value or a JSON\n** value.  Figure out what it is and encode it as a JSONB blob.\n** Return the results in pParse.\n**\n** pParse is uninitialized upon entry.  This routine will handle the\n** initialization of pParse.  The result will be contained in\n** pParse->aBlob and pParse->nBlob.  pParse->aBlob might be dynamically\n** allocated (if pParse->nBlobAlloc is greater than zero) in which case\n** the caller is responsible for freeing the space allocated to pParse->aBlob\n** when it has finished with it.  Or pParse->aBlob might be a static string\n** or a value obtained from sqlite3_value_blob(pArg).\n**\n** If the argument is a BLOB that is clearly not a JSONB, then this\n** function might set an error message in ctx and return non-zero.\n** It might also set an error message and return non-zero on an OOM error.\n*/\nstatic int jsonFunctionArgToBlob(\n  sqlite3_context *ctx,\n  sqlite3_value *pArg,\n  JsonParse *pParse\n){\n  int eType = sqlite3_value_type(pArg);\n  static u8 aNull[] = { 0x00 };\n  memset(pParse, 0, sizeof(pParse[0]));\n  pParse->db = sqlite3_context_db_handle(ctx);\n  switch( eType ){\n    default: {\n      pParse->aBlob = aNull;\n      pParse->nBlob = 1;\n      return 0;\n    }\n    case SQLITE_BLOB: {\n      if( !jsonArgIsJsonb(pArg, pParse) ){\n        sqlite3_result_error(ctx, \"JSON cannot hold BLOB values\", -1);\n        return 1;\n      }\n      break;\n    }\n    case SQLITE_TEXT: {\n      const char *zJson = (const char*)sqlite3_value_text(pArg);\n      int nJson = sqlite3_value_bytes(pArg);\n      if( zJson==0 ) return 1;\n      if( sqlite3_value_subtype(pArg)==JSON_SUBTYPE ){\n        pParse->zJson = (char*)zJson;\n        pParse->nJson = nJson;\n        if( jsonConvertTextToBlob(pParse, ctx) ){\n          sqlite3_result_error(ctx, \"malformed JSON\", -1);\n          sqlite3DbFree(pParse->db, pParse->aBlob);\n          memset(pParse, 0, sizeof(pParse[0]));\n          return 1;\n        }\n      }else{\n        jsonBlobAppendNode(pParse, JSONB_TEXTRAW, nJson, zJson);\n      }\n      break;\n    }\n    case SQLITE_FLOAT: {\n      double r = sqlite3_value_double(pArg);\n      if( NEVER(sqlite3IsNaN(r)) ){\n        jsonBlobAppendNode(pParse, JSONB_NULL, 0, 0);\n      }else{\n        int n = sqlite3_value_bytes(pArg);\n        const char *z = (const char*)sqlite3_value_text(pArg);\n        if( z==0 ) return 1;\n        if( z[0]=='I' ){\n          jsonBlobAppendNode(pParse, JSONB_FLOAT, 5, \"9e999\");\n        }else if( z[0]=='-' && z[1]=='I' ){\n          jsonBlobAppendNode(pParse, JSONB_FLOAT, 6, \"-9e999\");\n        }else{\n          jsonBlobAppendNode(pParse, JSONB_FLOAT, n, z);\n        }\n      }\n      break;\n    }\n    case SQLITE_INTEGER: {\n      int n = sqlite3_value_bytes(pArg);\n      const char *z = (const char*)sqlite3_value_text(pArg);\n      if( z==0 ) return 1;\n      jsonBlobAppendNode(pParse, JSONB_INT, n, z);\n      break;\n    }\n  }\n  if( pParse->oom ){\n    sqlite3_result_error_nomem(ctx);\n    return 1;\n  }else{\n    return 0;\n  }\n}\n\n/*\n** Generate a bad path error.\n**\n** If ctx is not NULL then push the error message into ctx and return NULL.\n** If ctx is NULL, then return the text of the error message.\n*/\nstatic char *jsonBadPathError(\n  sqlite3_context *ctx,     /* The function call containing the error */\n  const char *zPath         /* The path with the problem */\n){\n  char *zMsg = sqlite3_mprintf(\"bad JSON path: %Q\", zPath);\n  if( ctx==0 ) return zMsg;\n  if( zMsg ){\n    sqlite3_result_error(ctx, zMsg, -1);\n    sqlite3_free(zMsg);\n  }else{\n    sqlite3_result_error_nomem(ctx);\n  }\n  return 0;\n}\n\n/* argv[0] is a BLOB that seems likely to be a JSONB.  Subsequent\n** arguments come in pairs where each pair contains a JSON path and\n** content to insert or set at that patch.  Do the updates\n** and return the result.\n**\n** The specific operation is determined by eEdit, which can be one\n** of JEDIT_INS, JEDIT_REPL, or JEDIT_SET.\n*/\nstatic void jsonInsertIntoBlob(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv,\n  int eEdit                /* JEDIT_INS, JEDIT_REPL, or JEDIT_SET */\n){\n  int i;\n  u32 rc = 0;\n  const char *zPath = 0;\n  int flgs;\n  JsonParse *p;\n  JsonParse ax;\n\n  assert( (argc&1)==1 );\n  flgs = argc==1 ? 0 : JSON_EDITABLE;\n  p = jsonParseFuncArg(ctx, argv[0], flgs);\n  if( p==0 ) return;\n  for(i=1; i<argc-1; i+=2){\n    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) continue;\n    zPath = (const char*)sqlite3_value_text(argv[i]);\n    if( zPath==0 ){\n      sqlite3_result_error_nomem(ctx);\n      jsonParseFree(p);\n      return;\n    }\n    if( zPath[0]!='$' ) goto jsonInsertIntoBlob_patherror;\n    if( jsonFunctionArgToBlob(ctx, argv[i+1], &ax) ){\n      jsonParseReset(&ax);\n      jsonParseFree(p);\n      return;\n    }\n    if( zPath[1]==0 ){\n      if( eEdit==JEDIT_REPL || eEdit==JEDIT_SET ){\n        jsonBlobEdit(p, 0, p->nBlob, ax.aBlob, ax.nBlob);\n      }\n      rc = 0;\n   }else{\n      p->eEdit = eEdit;\n      p->nIns = ax.nBlob;\n      p->aIns = ax.aBlob;\n      p->delta = 0;\n      rc = jsonLookupStep(p, 0, zPath+1, 0);\n    }\n    jsonParseReset(&ax);\n    if( rc==JSON_LOOKUP_NOTFOUND ) continue;\n    if( JSON_LOOKUP_ISERROR(rc) ) goto jsonInsertIntoBlob_patherror;\n  }\n  jsonReturnParse(ctx, p);\n  jsonParseFree(p);\n  return;\n\njsonInsertIntoBlob_patherror:\n  jsonParseFree(p);\n  if( rc==JSON_LOOKUP_ERROR ){\n    sqlite3_result_error(ctx, \"malformed JSON\", -1);\n  }else{\n    jsonBadPathError(ctx, zPath);\n  }\n  return;\n}\n\n/*\n** If pArg is a blob that seems like a JSONB blob, then initialize\n** p to point to that JSONB and return TRUE.  If pArg does not seem like\n** a JSONB blob, then return FALSE.\n**\n** For small BLOBs (having no more than 7 bytes of payload) a full\n** validity check is done.  So for small BLOBs this routine only returns\n** true if the value is guaranteed to be a valid JSONB.  For larger BLOBs\n** (8 byte or more of payload) only the size of the outermost element is\n** checked to verify that the BLOB is superficially valid JSONB.\n**\n** A full JSONB validation is done on smaller BLOBs because those BLOBs might\n** also be text JSON that has been incorrectly cast into a BLOB.\n** (See tag-20240123-a and https://sqlite.org/forum/forumpost/012136abd5)\n** If the BLOB is 9 bytes are larger, then it is not possible for the\n** superficial size check done here to pass if the input is really text\n** JSON so we do not need to look deeper in that case.\n**\n** Why we only need to do full JSONB validation for smaller BLOBs:\n**\n** The first byte of valid JSON text must be one of: '{', '[', '\"', ' ', '\\n',\n** '\\r', '\\t', '-', or a digit '0' through '9'.  Of these, only a subset\n** can also be the first byte of JSONB:  '{', '[', and digits '3'\n** through '9'.  In every one of those cases, the payload size is 7 bytes\n** or less.  So if we do full JSONB validation for every BLOB where the\n** payload is less than 7 bytes, we will never get a false positive for\n** JSONB on an input that is really text JSON.\n*/\nstatic int jsonArgIsJsonb(sqlite3_value *pArg, JsonParse *p){\n  u32 n, sz = 0;\n  u8 c;\n  if( sqlite3_value_type(pArg)!=SQLITE_BLOB ) return 0;\n  p->aBlob = (u8*)sqlite3_value_blob(pArg);\n  p->nBlob = (u32)sqlite3_value_bytes(pArg);\n  if( p->nBlob>0\n   && ALWAYS(p->aBlob!=0)\n   && ((c = p->aBlob[0]) & 0x0f)<=JSONB_OBJECT\n   && (n = jsonbPayloadSize(p, 0, &sz))>0\n   && sz+n==p->nBlob\n   && ((c & 0x0f)>JSONB_FALSE || sz==0)\n   && (sz>7\n      || (c!=0x7b && c!=0x5b && !sqlite3Isdigit(c))\n      || jsonbValidityCheck(p, 0, p->nBlob, 1)==0)\n  ){\n    return 1;\n  }\n  p->aBlob = 0;\n  p->nBlob = 0;\n  return 0;\n}\n\n/*\n** Generate a JsonParse object, containing valid JSONB in aBlob and nBlob,\n** from the SQL function argument pArg.  Return a pointer to the new\n** JsonParse object.\n**\n** Ownership of the new JsonParse object is passed to the caller.  The\n** caller should invoke jsonParseFree() on the return value when it\n** has finished using it.\n**\n** If any errors are detected, an appropriate error messages is set\n** using sqlite3_result_error() or the equivalent and this routine\n** returns NULL.  This routine also returns NULL if the pArg argument\n** is an SQL NULL value, but no error message is set in that case.  This\n** is so that SQL functions that are given NULL arguments will return\n** a NULL value.\n*/\nstatic JsonParse *jsonParseFuncArg(\n  sqlite3_context *ctx,\n  sqlite3_value *pArg,\n  u32 flgs\n){\n  int eType;                   /* Datatype of pArg */\n  JsonParse *p = 0;            /* Value to be returned */\n  JsonParse *pFromCache = 0;   /* Value taken from cache */\n  sqlite3 *db;                 /* The database connection */\n\n  assert( ctx!=0 );\n  eType = sqlite3_value_type(pArg);\n  if( eType==SQLITE_NULL ){\n    return 0;\n  }\n  pFromCache = jsonCacheSearch(ctx, pArg);\n  if( pFromCache ){\n    pFromCache->nJPRef++;\n    if( (flgs & JSON_EDITABLE)==0 ){\n      return pFromCache;\n    }\n  }\n  db = sqlite3_context_db_handle(ctx);\nrebuild_from_cache:\n  p = sqlite3DbMallocZero(db, sizeof(*p));\n  if( p==0 ) goto json_pfa_oom;\n  memset(p, 0, sizeof(*p));\n  p->db = db;\n  p->nJPRef = 1;\n  if( pFromCache!=0 ){\n    u32 nBlob = pFromCache->nBlob;\n    p->aBlob = sqlite3DbMallocRaw(db, nBlob);\n    if( p->aBlob==0 ) goto json_pfa_oom;\n    memcpy(p->aBlob, pFromCache->aBlob, nBlob);\n    p->nBlobAlloc = p->nBlob = nBlob;\n    p->hasNonstd = pFromCache->hasNonstd;\n    jsonParseFree(pFromCache);\n    return p;\n  }\n  if( eType==SQLITE_BLOB ){\n    if( jsonArgIsJsonb(pArg,p) ){\n      if( (flgs & JSON_EDITABLE)!=0 && jsonBlobMakeEditable(p, 0)==0 ){\n        goto json_pfa_oom;\n      }\n      return p;\n    }\n    /* If the blob is not valid JSONB, fall through into trying to cast\n    ** the blob into text which is then interpreted as JSON.  (tag-20240123-a)\n    **\n    ** This goes against all historical documentation about how the SQLite\n    ** JSON functions were suppose to work.  From the beginning, blob was\n    ** reserved for expansion and a blob value should have raised an error.\n    ** But it did not, due to a bug.  And many applications came to depend\n    ** upon this buggy behavior, especially when using the CLI and reading\n    ** JSON text using readfile(), which returns a blob.  For this reason\n    ** we will continue to support the bug moving forward.\n    ** See for example https://sqlite.org/forum/forumpost/012136abd5292b8d\n    */\n  }\n  p->zJson = (char*)sqlite3_value_text(pArg);\n  p->nJson = sqlite3_value_bytes(pArg);\n  if( db->mallocFailed ) goto json_pfa_oom;\n  if( p->nJson==0 ) goto json_pfa_malformed;\n  assert( p->zJson!=0 );\n  if( jsonConvertTextToBlob(p, (flgs & JSON_KEEPERROR) ? 0 : ctx) ){\n    if( flgs & JSON_KEEPERROR ){\n      p->nErr = 1;\n      return p;\n    }else{\n      jsonParseFree(p);\n      return 0;\n    }\n  }else{\n    int isRCStr = sqlite3ValueIsOfClass(pArg, sqlite3RCStrUnref);\n    int rc;\n    if( !isRCStr ){\n      char *zNew = sqlite3RCStrNew( p->nJson );\n      if( zNew==0 ) goto json_pfa_oom;\n      memcpy(zNew, p->zJson, p->nJson);\n      p->zJson = zNew;\n      p->zJson[p->nJson] = 0;\n    }else{\n      sqlite3RCStrRef(p->zJson);\n    }\n    p->bJsonIsRCStr = 1;\n    rc = jsonCacheInsert(ctx, p);\n    if( rc==SQLITE_NOMEM ) goto json_pfa_oom;\n    if( flgs & JSON_EDITABLE ){\n      pFromCache = p;\n      p = 0;\n      goto rebuild_from_cache;\n    }\n  }\n  return p;\n\njson_pfa_malformed:\n  if( flgs & JSON_KEEPERROR ){\n    p->nErr = 1;\n    return p;\n  }else{\n    jsonParseFree(p);\n    sqlite3_result_error(ctx, \"malformed JSON\", -1);\n    return 0;\n  }\n\njson_pfa_oom:\n  jsonParseFree(pFromCache);\n  jsonParseFree(p);\n  sqlite3_result_error_nomem(ctx);\n  return 0;\n}\n\n/*\n** Make the return value of a JSON function either the raw JSONB blob\n** or make it JSON text, depending on whether the JSON_BLOB flag is\n** set on the function.\n*/\nstatic void jsonReturnParse(\n  sqlite3_context *ctx,\n  JsonParse *p\n){\n  int flgs;\n  if( p->oom ){\n    sqlite3_result_error_nomem(ctx);\n    return;\n  }\n  flgs = SQLITE_PTR_TO_INT(sqlite3_user_data(ctx));\n  if( flgs & JSON_BLOB ){\n    if( p->nBlobAlloc>0 && !p->bReadOnly ){\n      sqlite3_result_blob(ctx, p->aBlob, p->nBlob, SQLITE_DYNAMIC);\n      p->nBlobAlloc = 0;\n    }else{\n      sqlite3_result_blob(ctx, p->aBlob, p->nBlob, SQLITE_TRANSIENT);\n    }\n  }else{\n    JsonString s;\n    jsonStringInit(&s, ctx);\n    p->delta = 0;\n    jsonTranslateBlobToText(p, 0, &s);\n    jsonReturnString(&s, p, ctx);\n    sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n  }\n}\n\n/****************************************************************************\n** SQL functions used for testing and debugging\n****************************************************************************/\n\n#if SQLITE_DEBUG\n/*\n** Decode JSONB bytes in aBlob[] starting at iStart through but not\n** including iEnd.  Indent the\n** content by nIndent spaces.\n*/\nstatic void jsonDebugPrintBlob(\n  JsonParse *pParse, /* JSON content */\n  u32 iStart,        /* Start rendering here */\n  u32 iEnd,          /* Do not render this byte or any byte after this one */\n  int nIndent,       /* Indent by this many spaces */\n  sqlite3_str *pOut  /* Generate output into this sqlite3_str object */\n){\n  while( iStart<iEnd ){\n    u32 i, n, nn, sz = 0;\n    int showContent = 1;\n    u8 x = pParse->aBlob[iStart] & 0x0f;\n    u32 savedNBlob = pParse->nBlob;\n    sqlite3_str_appendf(pOut, \"%5d:%*s\", iStart, nIndent, \"\");\n    if( pParse->nBlobAlloc>pParse->nBlob ){\n      pParse->nBlob = pParse->nBlobAlloc;\n    }\n    nn = n = jsonbPayloadSize(pParse, iStart, &sz);\n    if( nn==0 ) nn = 1;\n    if( sz>0 && x<JSONB_ARRAY ){\n      nn += sz;\n    }\n    for(i=0; i<nn; i++){\n      sqlite3_str_appendf(pOut, \" %02x\", pParse->aBlob[iStart+i]);\n    }\n    if( n==0 ){\n      sqlite3_str_appendf(pOut, \"   ERROR invalid node size\\n\");\n      iStart = n==0 ? iStart+1 : iEnd;\n      continue;\n    }\n    pParse->nBlob = savedNBlob;\n    if( iStart+n+sz>iEnd ){\n      iEnd = iStart+n+sz;\n      if( iEnd>pParse->nBlob ){\n        if( pParse->nBlobAlloc>0 && iEnd>pParse->nBlobAlloc ){\n          iEnd = pParse->nBlobAlloc;\n        }else{\n          iEnd = pParse->nBlob;\n        }\n      }\n    }\n    sqlite3_str_appendall(pOut,\"  <-- \");\n    switch( x ){\n      case JSONB_NULL:     sqlite3_str_appendall(pOut,\"null\"); break;\n      case JSONB_TRUE:     sqlite3_str_appendall(pOut,\"true\"); break;\n      case JSONB_FALSE:    sqlite3_str_appendall(pOut,\"false\"); break;\n      case JSONB_INT:      sqlite3_str_appendall(pOut,\"int\"); break;\n      case JSONB_INT5:     sqlite3_str_appendall(pOut,\"int5\"); break;\n      case JSONB_FLOAT:    sqlite3_str_appendall(pOut,\"float\"); break;\n      case JSONB_FLOAT5:   sqlite3_str_appendall(pOut,\"float5\"); break;\n      case JSONB_TEXT:     sqlite3_str_appendall(pOut,\"text\"); break;\n      case JSONB_TEXTJ:    sqlite3_str_appendall(pOut,\"textj\"); break;\n      case JSONB_TEXT5:    sqlite3_str_appendall(pOut,\"text5\"); break;\n      case JSONB_TEXTRAW:  sqlite3_str_appendall(pOut,\"textraw\"); break;\n      case JSONB_ARRAY: {\n        sqlite3_str_appendf(pOut,\"array, %u bytes\\n\", sz);\n        jsonDebugPrintBlob(pParse, iStart+n, iStart+n+sz, nIndent+2, pOut);\n        showContent = 0;\n        break;\n      }\n      case JSONB_OBJECT: {\n        sqlite3_str_appendf(pOut, \"object, %u bytes\\n\", sz);\n        jsonDebugPrintBlob(pParse, iStart+n, iStart+n+sz, nIndent+2, pOut);\n        showContent = 0;\n        break;\n      }\n      default: {\n        sqlite3_str_appendall(pOut, \"ERROR: unknown node type\\n\");\n        showContent = 0;\n        break;\n      }\n    }\n    if( showContent ){\n      if( sz==0 && x<=JSONB_FALSE ){\n        sqlite3_str_append(pOut, \"\\n\", 1);\n      }else{\n        u32 j;\n        sqlite3_str_appendall(pOut, \": \\\"\");\n        for(j=iStart+n; j<iStart+n+sz; j++){\n          u8 c = pParse->aBlob[j];\n          if( c<0x20 || c>=0x7f ) c = '.';\n          sqlite3_str_append(pOut, (char*)&c, 1);\n        }\n        sqlite3_str_append(pOut, \"\\\"\\n\", 2);\n      }\n    }\n    iStart += n + sz;\n  }\n}\nstatic void jsonShowParse(JsonParse *pParse){\n  sqlite3_str out;\n  char zBuf[1000];\n  if( pParse==0 ){\n    printf(\"NULL pointer\\n\");\n    return;\n  }else{\n    printf(\"nBlobAlloc = %u\\n\", pParse->nBlobAlloc);\n    printf(\"nBlob = %u\\n\", pParse->nBlob);\n    printf(\"delta = %d\\n\", pParse->delta);\n    if( pParse->nBlob==0 ) return;\n    printf(\"content (bytes 0..%u):\\n\", pParse->nBlob-1);\n  }\n  sqlite3StrAccumInit(&out, 0, zBuf, sizeof(zBuf), 1000000);\n  jsonDebugPrintBlob(pParse, 0, pParse->nBlob, 0, &out);\n  printf(\"%s\", sqlite3_str_value(&out));\n  sqlite3_str_reset(&out);\n}\n#endif /* SQLITE_DEBUG */\n\n#ifdef SQLITE_DEBUG\n/*\n** SQL function:   json_parse(JSON)\n**\n** Parse JSON using jsonParseFuncArg().  Return text that is a\n** human-readable dump of the binary JSONB for the input parameter.\n*/\nstatic void jsonParseFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p;        /* The parse */\n  sqlite3_str out;\n\n  assert( argc>=1 );\n  sqlite3StrAccumInit(&out, 0, 0, 0, 1000000);\n  p = jsonParseFuncArg(ctx, argv[0], 0);\n  if( p==0 ) return;\n  if( argc==1 ){\n    jsonDebugPrintBlob(p, 0, p->nBlob, 0, &out);\n    sqlite3_result_text64(ctx,out.zText,out.nChar,SQLITE_TRANSIENT,SQLITE_UTF8);\n  }else{\n    jsonShowParse(p);\n  }\n  jsonParseFree(p);\n  sqlite3_str_reset(&out);\n}\n#endif /* SQLITE_DEBUG */\n\n/****************************************************************************\n** Scalar SQL function implementations\n****************************************************************************/\n\n/*\n** Implementation of the json_quote(VALUE) function.  Return a JSON value\n** corresponding to the SQL value input.  Mostly this means putting\n** double-quotes around strings and returning the unquoted string \"null\"\n** when given a NULL input.\n*/\nstatic void jsonQuoteFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonString jx;\n  UNUSED_PARAMETER(argc);\n\n  jsonStringInit(&jx, ctx);\n  jsonAppendSqlValue(&jx, argv[0]);\n  jsonReturnString(&jx, 0, 0);\n  sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n}\n\n/*\n** Implementation of the json_array(VALUE,...) function.  Return a JSON\n** array that contains all values given in arguments.  Or if any argument\n** is a BLOB, throw an error.\n*/\nstatic void jsonArrayFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  int i;\n  JsonString jx;\n\n  jsonStringInit(&jx, ctx);\n  jsonAppendChar(&jx, '[');\n  for(i=0; i<argc; i++){\n    jsonAppendSeparator(&jx);\n    jsonAppendSqlValue(&jx, argv[i]);\n  }\n  jsonAppendChar(&jx, ']');\n  jsonReturnString(&jx, 0, 0);\n  sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n}\n\n/*\n** json_array_length(JSON)\n** json_array_length(JSON, PATH)\n**\n** Return the number of elements in the top-level JSON array.\n** Return 0 if the input is not a well-formed JSON array.\n*/\nstatic void jsonArrayLengthFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p;          /* The parse */\n  sqlite3_int64 cnt = 0;\n  u32 i;\n  u8 eErr = 0;\n\n  p = jsonParseFuncArg(ctx, argv[0], 0);\n  if( p==0 ) return;\n  if( argc==2 ){\n    const char *zPath = (const char*)sqlite3_value_text(argv[1]);\n    if( zPath==0 ){\n      jsonParseFree(p);\n      return;\n    }\n    i = jsonLookupStep(p, 0, zPath[0]=='$' ? zPath+1 : \"@\", 0);\n    if( JSON_LOOKUP_ISERROR(i) ){\n      if( i==JSON_LOOKUP_NOTFOUND ){\n        /* no-op */\n      }else if( i==JSON_LOOKUP_PATHERROR ){\n        jsonBadPathError(ctx, zPath);\n      }else{\n        sqlite3_result_error(ctx, \"malformed JSON\", -1);\n      }\n      eErr = 1;\n      i = 0;\n    }\n  }else{\n    i = 0;\n  }\n  if( (p->aBlob[i] & 0x0f)==JSONB_ARRAY ){\n    cnt = jsonbArrayCount(p, i);\n  }\n  if( !eErr ) sqlite3_result_int64(ctx, cnt);\n  jsonParseFree(p);\n}\n\n/* True if the string is all alphanumerics and underscores */\nstatic int jsonAllAlphanum(const char *z, int n){\n  int i;\n  for(i=0; i<n && (sqlite3Isalnum(z[i]) || z[i]=='_'); i++){}\n  return i==n;\n}\n\n/*\n** json_extract(JSON, PATH, ...)\n** \"->\"(JSON,PATH)\n** \"->>\"(JSON,PATH)\n**\n** Return the element described by PATH.  Return NULL if that PATH element\n** is not found.\n**\n** If JSON_JSON is set or if more that one PATH argument is supplied then\n** always return a JSON representation of the result.  If JSON_SQL is set,\n** then always return an SQL representation of the result.  If neither flag\n** is present and argc==2, then return JSON for objects and arrays and SQL\n** for all other values.\n**\n** When multiple PATH arguments are supplied, the result is a JSON array\n** containing the result of each PATH.\n**\n** Abbreviated JSON path expressions are allows if JSON_ABPATH, for\n** compatibility with PG.\n*/\nstatic void jsonExtractFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p = 0;      /* The parse */\n  int flags;             /* Flags associated with the function */\n  int i;                 /* Loop counter */\n  JsonString jx;         /* String for array result */\n\n  if( argc<2 ) return;\n  p = jsonParseFuncArg(ctx, argv[0], 0);\n  if( p==0 ) return;\n  flags = SQLITE_PTR_TO_INT(sqlite3_user_data(ctx));\n  jsonStringInit(&jx, ctx);\n  if( argc>2 ){\n    jsonAppendChar(&jx, '[');\n  }\n  for(i=1; i<argc; i++){\n    /* With a single PATH argument */\n    const char *zPath = (const char*)sqlite3_value_text(argv[i]);\n    int nPath;\n    u32 j;\n    if( zPath==0 ) goto json_extract_error;\n    nPath = sqlite3Strlen30(zPath);\n    if( zPath[0]=='$' ){\n      j = jsonLookupStep(p, 0, zPath+1, 0);\n    }else if( (flags & JSON_ABPATH) ){\n      /* The -> and ->> operators accept abbreviated PATH arguments.  This\n      ** is mostly for compatibility with PostgreSQL, but also for\n      ** convenience.\n      **\n      **     NUMBER   ==>  $[NUMBER]     // PG compatible\n      **     LABEL    ==>  $.LABEL       // PG compatible\n      **     [NUMBER] ==>  $[NUMBER]     // Not PG.  Purely for convenience\n      **\n      ** Updated 2024-05-27:  If the NUMBER is negative, then PG counts from\n      ** the right of the array.  Hence for negative NUMBER:\n      **\n      **     NUMBER   ==>  $[#NUMBER]    // PG compatible\n      */\n      jsonStringInit(&jx, ctx);\n      if( sqlite3_value_type(argv[i])==SQLITE_INTEGER ){\n        jsonAppendRawNZ(&jx, \"[\", 1);\n        if( zPath[0]=='-' ) jsonAppendRawNZ(&jx,\"#\",1);\n        jsonAppendRaw(&jx, zPath, nPath);\n        jsonAppendRawNZ(&jx, \"]\", 2);\n      }else if( jsonAllAlphanum(zPath, nPath) ){\n        jsonAppendRawNZ(&jx, \".\", 1);\n        jsonAppendRaw(&jx, zPath, nPath);\n      }else if( zPath[0]=='[' && nPath>=3 && zPath[nPath-1]==']' ){\n        jsonAppendRaw(&jx, zPath, nPath);\n      }else{\n        jsonAppendRawNZ(&jx, \".\\\"\", 2);\n        jsonAppendRaw(&jx, zPath, nPath);\n        jsonAppendRawNZ(&jx, \"\\\"\", 1);\n      }\n      jsonStringTerminate(&jx);\n      j = jsonLookupStep(p, 0, jx.zBuf, 0);\n      jsonStringReset(&jx);\n    }else{\n      jsonBadPathError(ctx, zPath);\n      goto json_extract_error;\n    }\n    if( j<p->nBlob ){\n      if( argc==2 ){\n        if( flags & JSON_JSON ){\n          jsonStringInit(&jx, ctx);\n          jsonTranslateBlobToText(p, j, &jx);\n          jsonReturnString(&jx, 0, 0);\n          jsonStringReset(&jx);\n          assert( (flags & JSON_BLOB)==0 );\n          sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n        }else{\n          jsonReturnFromBlob(p, j, ctx, 0);\n          if( (flags & (JSON_SQL|JSON_BLOB))==0\n           && (p->aBlob[j]&0x0f)>=JSONB_ARRAY\n          ){\n            sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n          }\n        }\n      }else{\n        jsonAppendSeparator(&jx);\n        jsonTranslateBlobToText(p, j, &jx);\n      }\n    }else if( j==JSON_LOOKUP_NOTFOUND ){\n      if( argc==2 ){\n        goto json_extract_error;  /* Return NULL if not found */\n      }else{\n        jsonAppendSeparator(&jx);\n        jsonAppendRawNZ(&jx, \"null\", 4);\n      }\n    }else if( j==JSON_LOOKUP_ERROR ){\n      sqlite3_result_error(ctx, \"malformed JSON\", -1);\n      goto json_extract_error;\n    }else{\n      jsonBadPathError(ctx, zPath);\n      goto json_extract_error;\n    }\n  }\n  if( argc>2 ){\n    jsonAppendChar(&jx, ']');\n    jsonReturnString(&jx, 0, 0);\n    if( (flags & JSON_BLOB)==0 ){\n      sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n    }\n  }\njson_extract_error:\n  jsonStringReset(&jx);\n  jsonParseFree(p);\n  return;\n}\n\n/*\n** Return codes for jsonMergePatch()\n*/\n#define JSON_MERGE_OK          0     /* Success */\n#define JSON_MERGE_BADTARGET   1     /* Malformed TARGET blob */\n#define JSON_MERGE_BADPATCH    2     /* Malformed PATCH blob */\n#define JSON_MERGE_OOM         3     /* Out-of-memory condition */\n\n/*\n** RFC-7396 MergePatch for two JSONB blobs.\n**\n** pTarget is the target. pPatch is the patch.  The target is updated\n** in place.  The patch is read-only.\n**\n** The original RFC-7396 algorithm is this:\n**\n**   define MergePatch(Target, Patch):\n**     if Patch is an Object:\n**       if Target is not an Object:\n**         Target = {} # Ignore the contents and set it to an empty Object\n**     for each Name/Value pair in Patch:\n**         if Value is null:\n**           if Name exists in Target:\n**             remove the Name/Value pair from Target\n**         else:\n**           Target[Name] = MergePatch(Target[Name], Value)\n**       return Target\n**     else:\n**       return Patch\n**\n** Here is an equivalent algorithm restructured to show the actual\n** implementation:\n**\n** 01   define MergePatch(Target, Patch):\n** 02      if Patch is not an Object:\n** 03         return Patch\n** 04      else: // if Patch is an Object\n** 05         if Target is not an Object:\n** 06            Target = {}\n** 07      for each Name/Value pair in Patch:\n** 08         if Name exists in Target:\n** 09            if Value is null:\n** 10               remove the Name/Value pair from Target\n** 11            else\n** 12               Target[name] = MergePatch(Target[Name], Value)\n** 13         else if Value is not NULL:\n** 14            if Value is not an Object:\n** 15               Target[name] = Value\n** 16            else:\n** 17               Target[name] = MergePatch('{}',value)\n** 18      return Target\n**  |\n**  ^---- Line numbers referenced in comments in the implementation\n*/\nstatic int jsonMergePatch(\n  JsonParse *pTarget,      /* The JSON parser that contains the TARGET */\n  u32 iTarget,             /* Index of TARGET in pTarget->aBlob[] */\n  const JsonParse *pPatch, /* The PATCH */\n  u32 iPatch               /* Index of PATCH in pPatch->aBlob[] */\n){\n  u8 x;             /* Type of a single node */\n  u32 n, sz=0;      /* Return values from jsonbPayloadSize() */\n  u32 iTCursor;     /* Cursor position while scanning the target object */\n  u32 iTStart;      /* First label in the target object */\n  u32 iTEndBE;      /* Original first byte past end of target, before edit */\n  u32 iTEnd;        /* Current first byte past end of target */\n  u8 eTLabel;       /* Node type of the target label */\n  u32 iTLabel = 0;  /* Index of the label */\n  u32 nTLabel = 0;  /* Header size in bytes for the target label */\n  u32 szTLabel = 0; /* Size of the target label payload */\n  u32 iTValue = 0;  /* Index of the target value */\n  u32 nTValue = 0;  /* Header size of the target value */\n  u32 szTValue = 0; /* Payload size for the target value */\n\n  u32 iPCursor;     /* Cursor position while scanning the patch */\n  u32 iPEnd;        /* First byte past the end of the patch */\n  u8 ePLabel;       /* Node type of the patch label */\n  u32 iPLabel;      /* Start of patch label */\n  u32 nPLabel;      /* Size of header on the patch label */\n  u32 szPLabel;     /* Payload size of the patch label */\n  u32 iPValue;      /* Start of patch value */\n  u32 nPValue;      /* Header size for the patch value */\n  u32 szPValue;     /* Payload size of the patch value */\n\n  assert( iTarget>=0 && iTarget<pTarget->nBlob );\n  assert( iPatch>=0 && iPatch<pPatch->nBlob );\n  x = pPatch->aBlob[iPatch] & 0x0f;\n  if( x!=JSONB_OBJECT ){  /* Algorithm line 02 */\n    u32 szPatch;        /* Total size of the patch, header+payload */\n    u32 szTarget;       /* Total size of the target, header+payload */\n    n = jsonbPayloadSize(pPatch, iPatch, &sz);\n    szPatch = n+sz;\n    sz = 0;\n    n = jsonbPayloadSize(pTarget, iTarget, &sz);\n    szTarget = n+sz;\n    jsonBlobEdit(pTarget, iTarget, szTarget, pPatch->aBlob+iPatch, szPatch);\n    return pTarget->oom ? JSON_MERGE_OOM : JSON_MERGE_OK;  /* Line 03 */\n  }\n  x = pTarget->aBlob[iTarget] & 0x0f;\n  if( x!=JSONB_OBJECT ){  /* Algorithm line 05 */\n    n = jsonbPayloadSize(pTarget, iTarget, &sz);\n    jsonBlobEdit(pTarget, iTarget+n, sz, 0, 0);\n    x = pTarget->aBlob[iTarget];\n    pTarget->aBlob[iTarget] = (x & 0xf0) | JSONB_OBJECT;\n  }\n  n = jsonbPayloadSize(pPatch, iPatch, &sz);\n  if( NEVER(n==0) ) return JSON_MERGE_BADPATCH;\n  iPCursor = iPatch+n;\n  iPEnd = iPCursor+sz;\n  n = jsonbPayloadSize(pTarget, iTarget, &sz);\n  if( NEVER(n==0) ) return JSON_MERGE_BADTARGET;\n  iTStart = iTarget+n;\n  iTEndBE = iTStart+sz;\n\n  while( iPCursor<iPEnd ){  /* Algorithm line 07 */\n    iPLabel = iPCursor;\n    ePLabel = pPatch->aBlob[iPCursor] & 0x0f;\n    if( ePLabel<JSONB_TEXT || ePLabel>JSONB_TEXTRAW ){\n      return JSON_MERGE_BADPATCH;\n    }\n    nPLabel = jsonbPayloadSize(pPatch, iPCursor, &szPLabel);\n    if( nPLabel==0 ) return JSON_MERGE_BADPATCH;\n    iPValue = iPCursor + nPLabel + szPLabel;\n    if( iPValue>=iPEnd ) return JSON_MERGE_BADPATCH;\n    nPValue = jsonbPayloadSize(pPatch, iPValue, &szPValue);\n    if( nPValue==0 ) return JSON_MERGE_BADPATCH;\n    iPCursor = iPValue + nPValue + szPValue;\n    if( iPCursor>iPEnd ) return JSON_MERGE_BADPATCH;\n\n    iTCursor = iTStart;\n    iTEnd = iTEndBE + pTarget->delta;\n    while( iTCursor<iTEnd ){\n      int isEqual;   /* true if the patch and target labels match */\n      iTLabel = iTCursor;\n      eTLabel = pTarget->aBlob[iTCursor] & 0x0f;\n      if( eTLabel<JSONB_TEXT || eTLabel>JSONB_TEXTRAW ){\n        return JSON_MERGE_BADTARGET;\n      }\n      nTLabel = jsonbPayloadSize(pTarget, iTCursor, &szTLabel);\n      if( nTLabel==0 ) return JSON_MERGE_BADTARGET;\n      iTValue = iTLabel + nTLabel + szTLabel;\n      if( iTValue>=iTEnd ) return JSON_MERGE_BADTARGET;\n      nTValue = jsonbPayloadSize(pTarget, iTValue, &szTValue);\n      if( nTValue==0 ) return JSON_MERGE_BADTARGET;\n      if( iTValue + nTValue + szTValue > iTEnd ) return JSON_MERGE_BADTARGET;\n      isEqual = jsonLabelCompare(\n                   (const char*)&pPatch->aBlob[iPLabel+nPLabel],\n                   szPLabel,\n                   (ePLabel==JSONB_TEXT || ePLabel==JSONB_TEXTRAW),\n                   (const char*)&pTarget->aBlob[iTLabel+nTLabel],\n                   szTLabel,\n                   (eTLabel==JSONB_TEXT || eTLabel==JSONB_TEXTRAW));\n      if( isEqual ) break;\n      iTCursor = iTValue + nTValue + szTValue;\n    }\n    x = pPatch->aBlob[iPValue] & 0x0f;\n    if( iTCursor<iTEnd ){\n      /* A match was found.  Algorithm line 08 */\n      if( x==0 ){\n        /* Patch value is NULL.  Algorithm line 09 */\n        jsonBlobEdit(pTarget, iTLabel, nTLabel+szTLabel+nTValue+szTValue, 0,0);\n        /*  vvvvvv----- No OOM on a delete-only edit */\n        if( NEVER(pTarget->oom) ) return JSON_MERGE_OOM;\n      }else{\n        /* Algorithm line 12 */\n        int rc, savedDelta = pTarget->delta;\n        pTarget->delta = 0;\n        rc = jsonMergePatch(pTarget, iTValue, pPatch, iPValue);\n        if( rc ) return rc;\n        pTarget->delta += savedDelta;\n      }\n    }else if( x>0 ){  /* Algorithm line 13 */\n      /* No match and patch value is not NULL */\n      u32 szNew = szPLabel+nPLabel;\n      if( (pPatch->aBlob[iPValue] & 0x0f)!=JSONB_OBJECT ){  /* Line 14 */\n        jsonBlobEdit(pTarget, iTEnd, 0, 0, szPValue+nPValue+szNew);\n        if( pTarget->oom ) return JSON_MERGE_OOM;\n        memcpy(&pTarget->aBlob[iTEnd], &pPatch->aBlob[iPLabel], szNew);\n        memcpy(&pTarget->aBlob[iTEnd+szNew],\n               &pPatch->aBlob[iPValue], szPValue+nPValue);\n      }else{\n        int rc, savedDelta;\n        jsonBlobEdit(pTarget, iTEnd, 0, 0, szNew+1);\n        if( pTarget->oom ) return JSON_MERGE_OOM;\n        memcpy(&pTarget->aBlob[iTEnd], &pPatch->aBlob[iPLabel], szNew);\n        pTarget->aBlob[iTEnd+szNew] = 0x00;\n        savedDelta = pTarget->delta;\n        pTarget->delta = 0;\n        rc = jsonMergePatch(pTarget, iTEnd+szNew,pPatch,iPValue);\n        if( rc ) return rc;\n        pTarget->delta += savedDelta;\n      }\n    }\n  }\n  if( pTarget->delta ) jsonAfterEditSizeAdjust(pTarget, iTarget);\n  return pTarget->oom ? JSON_MERGE_OOM : JSON_MERGE_OK;\n}\n\n\n/*\n** Implementation of the json_mergepatch(JSON1,JSON2) function.  Return a JSON\n** object that is the result of running the RFC 7396 MergePatch() algorithm\n** on the two arguments.\n*/\nstatic void jsonPatchFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *pTarget;    /* The TARGET */\n  JsonParse *pPatch;     /* The PATCH */\n  int rc;                /* Result code */\n\n  UNUSED_PARAMETER(argc);\n  assert( argc==2 );\n  pTarget = jsonParseFuncArg(ctx, argv[0], JSON_EDITABLE);\n  if( pTarget==0 ) return;\n  pPatch = jsonParseFuncArg(ctx, argv[1], 0);\n  if( pPatch ){\n    rc = jsonMergePatch(pTarget, 0, pPatch, 0);\n    if( rc==JSON_MERGE_OK ){\n      jsonReturnParse(ctx, pTarget);\n    }else if( rc==JSON_MERGE_OOM ){\n      sqlite3_result_error_nomem(ctx);\n    }else{\n      sqlite3_result_error(ctx, \"malformed JSON\", -1);\n    }\n    jsonParseFree(pPatch);\n  }\n  jsonParseFree(pTarget);\n}\n\n\n/*\n** Implementation of the json_object(NAME,VALUE,...) function.  Return a JSON\n** object that contains all name/value given in arguments.  Or if any name\n** is not a string or if any value is a BLOB, throw an error.\n*/\nstatic void jsonObjectFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  int i;\n  JsonString jx;\n  const char *z;\n  u32 n;\n\n  if( argc&1 ){\n    sqlite3_result_error(ctx, \"json_object() requires an even number \"\n                                  \"of arguments\", -1);\n    return;\n  }\n  jsonStringInit(&jx, ctx);\n  jsonAppendChar(&jx, '{');\n  for(i=0; i<argc; i+=2){\n    if( sqlite3_value_type(argv[i])!=SQLITE_TEXT ){\n      sqlite3_result_error(ctx, \"json_object() labels must be TEXT\", -1);\n      jsonStringReset(&jx);\n      return;\n    }\n    jsonAppendSeparator(&jx);\n    z = (const char*)sqlite3_value_text(argv[i]);\n    n = sqlite3_value_bytes(argv[i]);\n    jsonAppendString(&jx, z, n);\n    jsonAppendChar(&jx, ':');\n    jsonAppendSqlValue(&jx, argv[i+1]);\n  }\n  jsonAppendChar(&jx, '}');\n  jsonReturnString(&jx, 0, 0);\n  sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n}\n\n\n/*\n** json_remove(JSON, PATH, ...)\n**\n** Remove the named elements from JSON and return the result.  malformed\n** JSON or PATH arguments result in an error.\n*/\nstatic void jsonRemoveFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p;          /* The parse */\n  const char *zPath = 0; /* Path of element to be removed */\n  int i;                 /* Loop counter */\n  u32 rc;                /* Subroutine return code */\n\n  if( argc<1 ) return;\n  p = jsonParseFuncArg(ctx, argv[0], argc>1 ? JSON_EDITABLE : 0);\n  if( p==0 ) return;\n  for(i=1; i<argc; i++){\n    zPath = (const char*)sqlite3_value_text(argv[i]);\n    if( zPath==0 ){\n      goto json_remove_done;\n    }\n    if( zPath[0]!='$' ){\n      goto json_remove_patherror;\n    }\n    if( zPath[1]==0 ){\n      /* json_remove(j,'$') returns NULL */\n      goto json_remove_done;\n    }\n    p->eEdit = JEDIT_DEL;\n    p->delta = 0;\n    rc = jsonLookupStep(p, 0, zPath+1, 0);\n    if( JSON_LOOKUP_ISERROR(rc) ){\n      if( rc==JSON_LOOKUP_NOTFOUND ){\n        continue;  /* No-op */\n      }else if( rc==JSON_LOOKUP_PATHERROR ){\n        jsonBadPathError(ctx, zPath);\n      }else{\n        sqlite3_result_error(ctx, \"malformed JSON\", -1);\n      }\n      goto json_remove_done;\n    }\n  }\n  jsonReturnParse(ctx, p);\n  jsonParseFree(p);\n  return;\n\njson_remove_patherror:\n  jsonBadPathError(ctx, zPath);\n\njson_remove_done:\n  jsonParseFree(p);\n  return;\n}\n\n/*\n** json_replace(JSON, PATH, VALUE, ...)\n**\n** Replace the value at PATH with VALUE.  If PATH does not already exist,\n** this routine is a no-op.  If JSON or PATH is malformed, throw an error.\n*/\nstatic void jsonReplaceFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  if( argc<1 ) return;\n  if( (argc&1)==0 ) {\n    jsonWrongNumArgs(ctx, \"replace\");\n    return;\n  }\n  jsonInsertIntoBlob(ctx, argc, argv, JEDIT_REPL);\n}\n\n\n/*\n** json_set(JSON, PATH, VALUE, ...)\n**\n** Set the value at PATH to VALUE.  Create the PATH if it does not already\n** exist.  Overwrite existing values that do exist.\n** If JSON or PATH is malformed, throw an error.\n**\n** json_insert(JSON, PATH, VALUE, ...)\n**\n** Create PATH and initialize it to VALUE.  If PATH already exists, this\n** routine is a no-op.  If JSON or PATH is malformed, throw an error.\n*/\nstatic void jsonSetFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n\n  int flags = SQLITE_PTR_TO_INT(sqlite3_user_data(ctx));\n  int bIsSet = (flags&JSON_ISSET)!=0;\n\n  if( argc<1 ) return;\n  if( (argc&1)==0 ) {\n    jsonWrongNumArgs(ctx, bIsSet ? \"set\" : \"insert\");\n    return;\n  }\n  jsonInsertIntoBlob(ctx, argc, argv, bIsSet ? JEDIT_SET : JEDIT_INS);\n}\n\n/*\n** json_type(JSON)\n** json_type(JSON, PATH)\n**\n** Return the top-level \"type\" of a JSON string.  json_type() raises an\n** error if either the JSON or PATH inputs are not well-formed.\n*/\nstatic void jsonTypeFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p;          /* The parse */\n  const char *zPath = 0;\n  u32 i;\n\n  p = jsonParseFuncArg(ctx, argv[0], 0);\n  if( p==0 ) return;\n  if( argc==2 ){\n    zPath = (const char*)sqlite3_value_text(argv[1]);\n    if( zPath==0 ) goto json_type_done;\n    if( zPath[0]!='$' ){\n      jsonBadPathError(ctx, zPath);\n      goto json_type_done;\n    }\n    i = jsonLookupStep(p, 0, zPath+1, 0);\n    if( JSON_LOOKUP_ISERROR(i) ){\n      if( i==JSON_LOOKUP_NOTFOUND ){\n        /* no-op */\n      }else if( i==JSON_LOOKUP_PATHERROR ){\n        jsonBadPathError(ctx, zPath);\n      }else{\n        sqlite3_result_error(ctx, \"malformed JSON\", -1);\n      }\n      goto json_type_done;\n    }\n  }else{\n    i = 0;\n  }\n  sqlite3_result_text(ctx, jsonbType[p->aBlob[i]&0x0f], -1, SQLITE_STATIC);\njson_type_done:\n  jsonParseFree(p);\n}\n\n/*\n** json_pretty(JSON)\n** json_pretty(JSON, INDENT)\n**\n** Return text that is a pretty-printed rendering of the input JSON.\n** If the argument is not valid JSON, return NULL.\n**\n** The INDENT argument is text that is used for indentation.  If omitted,\n** it defaults to four spaces (the same as PostgreSQL).\n*/\nstatic void jsonPrettyFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonString s;          /* The output string */\n  JsonPretty x;          /* Pretty printing context */\n\n  memset(&x, 0, sizeof(x));\n  x.pParse = jsonParseFuncArg(ctx, argv[0], 0);\n  if( x.pParse==0 ) return;\n  x.pOut = &s;\n  jsonStringInit(&s, ctx);\n  if( argc==1 || (x.zIndent = (const char*)sqlite3_value_text(argv[1]))==0 ){\n    x.zIndent = \"    \";\n    x.szIndent = 4;\n  }else{\n    x.szIndent = (u32)strlen(x.zIndent);\n  }\n  jsonTranslateBlobToPrettyText(&x, 0);\n  jsonReturnString(&s, 0, 0);\n  jsonParseFree(x.pParse);\n}\n\n/*\n** json_valid(JSON)\n** json_valid(JSON, FLAGS)\n**\n** Check the JSON argument to see if it is well-formed.  The FLAGS argument\n** encodes the various constraints on what is meant by \"well-formed\":\n**\n**     0x01      Canonical RFC-8259 JSON text\n**     0x02      JSON text with optional JSON-5 extensions\n**     0x04      Superficially appears to be JSONB\n**     0x08      Strictly well-formed JSONB\n**\n** If the FLAGS argument is omitted, it defaults to 1.  Useful values for\n** FLAGS include:\n**\n**    1          Strict canonical JSON text\n**    2          JSON text perhaps with JSON-5 extensions\n**    4          Superficially appears to be JSONB\n**    5          Canonical JSON text or superficial JSONB\n**    6          JSON-5 text or superficial JSONB\n**    8          Strict JSONB\n**    9          Canonical JSON text or strict JSONB\n**    10         JSON-5 text or strict JSONB\n**\n** Other flag combinations are redundant.  For example, every canonical\n** JSON text is also well-formed JSON-5 text, so FLAG values 2 and 3\n** are the same.  Similarly, any input that passes a strict JSONB validation\n** will also pass the superficial validation so 12 through 15 are the same\n** as 8 through 11 respectively.\n**\n** This routine runs in linear time to validate text and when doing strict\n** JSONB validation.  Superficial JSONB validation is constant time,\n** assuming the BLOB is already in memory.  The performance advantage\n** of superficial JSONB validation is why that option is provided.\n** Application developers can choose to do fast superficial validation or\n** slower strict validation, according to their specific needs.\n**\n** Only the lower four bits of the FLAGS argument are currently used.\n** Higher bits are reserved for future expansion.   To facilitate\n** compatibility, the current implementation raises an error if any bit\n** in FLAGS is set other than the lower four bits.\n**\n** The original circa 2015 implementation of the JSON routines in\n** SQLite only supported canonical RFC-8259 JSON text and the json_valid()\n** function only accepted one argument.  That is why the default value\n** for the FLAGS argument is 1, since FLAGS=1 causes this routine to only\n** recognize canonical RFC-8259 JSON text as valid.  The extra FLAGS\n** argument was added when the JSON routines were extended to support\n** JSON5-like extensions and binary JSONB stored in BLOBs.\n**\n** Return Values:\n**\n**   *   Raise an error if FLAGS is outside the range of 1 to 15.\n**   *   Return NULL if the input is NULL\n**   *   Return 1 if the input is well-formed.\n**   *   Return 0 if the input is not well-formed.\n*/\nstatic void jsonValidFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonParse *p;          /* The parse */\n  u8 flags = 1;\n  u8 res = 0;\n  if( argc==2 ){\n    i64 f = sqlite3_value_int64(argv[1]);\n    if( f<1 || f>15 ){\n      sqlite3_result_error(ctx, \"FLAGS parameter to json_valid() must be\"\n                                \" between 1 and 15\", -1);\n      return;\n    }\n    flags = f & 0x0f;\n  }\n  switch( sqlite3_value_type(argv[0]) ){\n    case SQLITE_NULL: {\n#ifdef SQLITE_LEGACY_JSON_VALID\n      /* Incorrect legacy behavior was to return FALSE for a NULL input */\n      sqlite3_result_int(ctx, 0);\n#endif\n      return;\n    }\n    case SQLITE_BLOB: {\n      JsonParse py;\n      memset(&py, 0, sizeof(py));\n      if( jsonArgIsJsonb(argv[0], &py) ){\n        if( flags & 0x04 ){\n          /* Superficial checking only - accomplished by the\n          ** jsonArgIsJsonb() call above. */\n          res = 1;\n        }else if( flags & 0x08 ){\n          /* Strict checking.  Check by translating BLOB->TEXT->BLOB.  If\n          ** no errors occur, call that a \"strict check\". */\n          res = 0==jsonbValidityCheck(&py, 0, py.nBlob, 1);\n        }\n        break;\n      }\n      /* Fall through into interpreting the input as text.  See note\n      ** above at tag-20240123-a. */\n      /* no break */ deliberate_fall_through\n    }\n    default: {\n      JsonParse px;\n      if( (flags & 0x3)==0 ) break;\n      memset(&px, 0, sizeof(px));\n\n      p = jsonParseFuncArg(ctx, argv[0], JSON_KEEPERROR);\n      if( p ){\n        if( p->oom ){\n          sqlite3_result_error_nomem(ctx);\n        }else if( p->nErr ){\n          /* no-op */\n        }else if( (flags & 0x02)!=0 || p->hasNonstd==0 ){\n          res = 1;\n        }\n        jsonParseFree(p);\n      }else{\n        sqlite3_result_error_nomem(ctx);\n      }\n      break;\n    }\n  }\n  sqlite3_result_int(ctx, res);\n}\n\n/*\n** json_error_position(JSON)\n**\n** If the argument is NULL, return NULL\n**\n** If the argument is BLOB, do a full validity check and return non-zero\n** if the check fails.  The return value is the approximate 1-based offset\n** to the byte of the element that contains the first error.\n**\n** Otherwise interpret the argument is TEXT (even if it is numeric) and\n** return the 1-based character position for where the parser first recognized\n** that the input was not valid JSON, or return 0 if the input text looks\n** ok.  JSON-5 extensions are accepted.\n*/\nstatic void jsonErrorFunc(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  i64 iErrPos = 0;       /* Error position to be returned */\n  JsonParse s;\n\n  assert( argc==1 );\n  UNUSED_PARAMETER(argc);\n  memset(&s, 0, sizeof(s));\n  s.db = sqlite3_context_db_handle(ctx);\n  if( jsonArgIsJsonb(argv[0], &s) ){\n    iErrPos = (i64)jsonbValidityCheck(&s, 0, s.nBlob, 1);\n  }else{\n    s.zJson = (char*)sqlite3_value_text(argv[0]);\n    if( s.zJson==0 ) return;  /* NULL input or OOM */\n    s.nJson = sqlite3_value_bytes(argv[0]);\n    if( jsonConvertTextToBlob(&s,0) ){\n      if( s.oom ){\n        iErrPos = -1;\n      }else{\n        /* Convert byte-offset s.iErr into a character offset */\n        u32 k;\n        assert( s.zJson!=0 );  /* Because s.oom is false */\n        for(k=0; k<s.iErr && ALWAYS(s.zJson[k]); k++){\n          if( (s.zJson[k] & 0xc0)!=0x80 ) iErrPos++;\n        }\n        iErrPos++;\n      }\n    }\n  }\n  jsonParseReset(&s);\n  if( iErrPos<0 ){\n    sqlite3_result_error_nomem(ctx);\n  }else{\n    sqlite3_result_int64(ctx, iErrPos);\n  }\n}\n\n/****************************************************************************\n** Aggregate SQL function implementations\n****************************************************************************/\n/*\n** json_group_array(VALUE)\n**\n** Return a JSON array composed of all values in the aggregate.\n*/\nstatic void jsonArrayStep(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonString *pStr;\n  UNUSED_PARAMETER(argc);\n  pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));\n  if( pStr ){\n    if( pStr->zBuf==0 ){\n      jsonStringInit(pStr, ctx);\n      jsonAppendChar(pStr, '[');\n    }else if( pStr->nUsed>1 ){\n      jsonAppendChar(pStr, ',');\n    }\n    pStr->pCtx = ctx;\n    jsonAppendSqlValue(pStr, argv[0]);\n  }\n}\nstatic void jsonArrayCompute(sqlite3_context *ctx, int isFinal){\n  JsonString *pStr;\n  pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);\n  if( pStr ){\n    int flags;\n    pStr->pCtx = ctx;\n    jsonAppendChar(pStr, ']');\n    flags = SQLITE_PTR_TO_INT(sqlite3_user_data(ctx));\n    if( pStr->eErr ){\n      jsonReturnString(pStr, 0, 0);\n      return;\n    }else if( flags & JSON_BLOB ){\n      jsonReturnStringAsBlob(pStr);\n      if( isFinal ){\n        if( !pStr->bStatic ) sqlite3RCStrUnref(pStr->zBuf);\n      }else{\n        jsonStringTrimOneChar(pStr);\n      }\n      return;\n    }else if( isFinal ){\n      sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed,\n                          pStr->bStatic ? SQLITE_TRANSIENT :\n                              sqlite3RCStrUnref);\n      pStr->bStatic = 1;\n    }else{\n      sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT);\n      jsonStringTrimOneChar(pStr);\n    }\n  }else{\n    sqlite3_result_text(ctx, \"[]\", 2, SQLITE_STATIC);\n  }\n  sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n}\nstatic void jsonArrayValue(sqlite3_context *ctx){\n  jsonArrayCompute(ctx, 0);\n}\nstatic void jsonArrayFinal(sqlite3_context *ctx){\n  jsonArrayCompute(ctx, 1);\n}\n\n#ifndef SQLITE_OMIT_WINDOWFUNC\n/*\n** This method works for both json_group_array() and json_group_object().\n** It works by removing the first element of the group by searching forward\n** to the first comma (\",\") that is not within a string and deleting all\n** text through that comma.\n*/\nstatic void jsonGroupInverse(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  unsigned int i;\n  int inStr = 0;\n  int nNest = 0;\n  char *z;\n  char c;\n  JsonString *pStr;\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(argv);\n  pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);\n#ifdef NEVER\n  /* pStr is always non-NULL since jsonArrayStep() or jsonObjectStep() will\n  ** always have been called to initialize it */\n  if( NEVER(!pStr) ) return;\n#endif\n  z = pStr->zBuf;\n  for(i=1; i<pStr->nUsed && ((c = z[i])!=',' || inStr || nNest); i++){\n    if( c=='\"' ){\n      inStr = !inStr;\n    }else if( c=='\\\\' ){\n      i++;\n    }else if( !inStr ){\n      if( c=='{' || c=='[' ) nNest++;\n      if( c=='}' || c==']' ) nNest--;\n    }\n  }\n  if( i<pStr->nUsed ){\n    pStr->nUsed -= i;\n    memmove(&z[1], &z[i+1], (size_t)pStr->nUsed-1);\n    z[pStr->nUsed] = 0;\n  }else{\n    pStr->nUsed = 1;\n  }\n}\n#else\n# define jsonGroupInverse 0\n#endif\n\n\n/*\n** json_group_obj(NAME,VALUE)\n**\n** Return a JSON object composed of all names and values in the aggregate.\n*/\nstatic void jsonObjectStep(\n  sqlite3_context *ctx,\n  int argc,\n  sqlite3_value **argv\n){\n  JsonString *pStr;\n  const char *z;\n  u32 n;\n  UNUSED_PARAMETER(argc);\n  pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));\n  if( pStr ){\n    z = (const char*)sqlite3_value_text(argv[0]);\n    n = sqlite3Strlen30(z);\n    if( pStr->zBuf==0 ){\n      jsonStringInit(pStr, ctx);\n      jsonAppendChar(pStr, '{');\n    }else if( pStr->nUsed>1 && z!=0 ){\n      jsonAppendChar(pStr, ',');\n    }\n    pStr->pCtx = ctx;\n    if( z!=0 ){\n      jsonAppendString(pStr, z, n);\n      jsonAppendChar(pStr, ':');\n      jsonAppendSqlValue(pStr, argv[1]);\n    }\n  }\n}\nstatic void jsonObjectCompute(sqlite3_context *ctx, int isFinal){\n  JsonString *pStr;\n  pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);\n  if( pStr ){\n    int flags;\n    jsonAppendChar(pStr, '}');\n    pStr->pCtx = ctx;\n    flags = SQLITE_PTR_TO_INT(sqlite3_user_data(ctx));\n    if( pStr->eErr ){\n      jsonReturnString(pStr, 0, 0);\n      return;\n    }else if( flags & JSON_BLOB ){\n      jsonReturnStringAsBlob(pStr);\n      if( isFinal ){\n        if( !pStr->bStatic ) sqlite3RCStrUnref(pStr->zBuf);\n      }else{\n        jsonStringTrimOneChar(pStr);\n      }\n      return;\n    }else if( isFinal ){\n      sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed,\n                          pStr->bStatic ? SQLITE_TRANSIENT :\n                          sqlite3RCStrUnref);\n      pStr->bStatic = 1;\n    }else{\n      sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT);\n      jsonStringTrimOneChar(pStr);\n    }\n  }else{\n    sqlite3_result_text(ctx, \"{}\", 2, SQLITE_STATIC);\n  }\n  sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n}\nstatic void jsonObjectValue(sqlite3_context *ctx){\n  jsonObjectCompute(ctx, 0);\n}\nstatic void jsonObjectFinal(sqlite3_context *ctx){\n  jsonObjectCompute(ctx, 1);\n}\n\n\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n/****************************************************************************\n** The json_each virtual table\n****************************************************************************/\ntypedef struct JsonParent JsonParent;\nstruct JsonParent {\n  u32 iHead;                 /* Start of object or array */\n  u32 iValue;                /* Start of the value */\n  u32 iEnd;                  /* First byte past the end */\n  u32 nPath;                 /* Length of path */\n  i64 iKey;                  /* Key for JSONB_ARRAY */\n};\n\ntypedef struct JsonEachCursor JsonEachCursor;\nstruct JsonEachCursor {\n  sqlite3_vtab_cursor base;  /* Base class - must be first */\n  u32 iRowid;                /* The rowid */\n  u32 i;                     /* Index in sParse.aBlob[] of current row */\n  u32 iEnd;                  /* EOF when i equals or exceeds this value */\n  u32 nRoot;                 /* Size of the root path in bytes */\n  u8 eType;                  /* Type of the container for element i */\n  u8 bRecursive;             /* True for json_tree().  False for json_each() */\n  u8 eMode;                  /* 1 for json_each().  2 for jsonb_each() */\n  u32 nParent;               /* Current nesting depth */\n  u32 nParentAlloc;          /* Space allocated for aParent[] */\n  JsonParent *aParent;       /* Parent elements of i */\n  sqlite3 *db;               /* Database connection */\n  JsonString path;           /* Current path */\n  JsonParse sParse;          /* Parse of the input JSON */\n};\ntypedef struct JsonEachConnection JsonEachConnection;\nstruct JsonEachConnection {\n  sqlite3_vtab base;         /* Base class - must be first */\n  sqlite3 *db;               /* Database connection */\n  u8 eMode;                  /* 1 for json_each().  2 for jsonb_each() */\n  u8 bRecursive;             /* True for json_tree().  False for json_each() */\n};\n\n\n/* Constructor for the json_each virtual table */\nstatic int jsonEachConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  JsonEachConnection *pNew;\n  int rc;\n\n/* Column numbers */\n#define JEACH_KEY     0\n#define JEACH_VALUE   1\n#define JEACH_TYPE    2\n#define JEACH_ATOM    3\n#define JEACH_ID      4\n#define JEACH_PARENT  5\n#define JEACH_FULLKEY 6\n#define JEACH_PATH    7\n/* The xBestIndex method assumes that the JSON and ROOT columns are\n** the last two columns in the table.  Should this ever changes, be\n** sure to update the xBestIndex method. */\n#define JEACH_JSON    8\n#define JEACH_ROOT    9\n\n  UNUSED_PARAMETER(pzErr);\n  UNUSED_PARAMETER(argv);\n  UNUSED_PARAMETER(argc);\n  UNUSED_PARAMETER(pAux);\n  rc = sqlite3_declare_vtab(db,\n     \"CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,\"\n                    \"json HIDDEN,root HIDDEN)\");\n  if( rc==SQLITE_OK ){\n    pNew = (JsonEachConnection*)sqlite3DbMallocZero(db, sizeof(*pNew));\n    *ppVtab = (sqlite3_vtab*)pNew;\n    if( pNew==0 ) return SQLITE_NOMEM;\n    sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);\n    pNew->db = db;\n    pNew->eMode = argv[0][4]=='b' ? 2 : 1;\n    pNew->bRecursive = argv[0][4+pNew->eMode]=='t';\n  }\n  return rc;\n}\n\n/* destructor for json_each virtual table */\nstatic int jsonEachDisconnect(sqlite3_vtab *pVtab){\n  JsonEachConnection *p = (JsonEachConnection*)pVtab;\n  sqlite3DbFree(p->db, pVtab);\n  return SQLITE_OK;\n}\n\n/* constructor for a JsonEachCursor object for json_each()/json_tree(). */\nstatic int jsonEachOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){\n  JsonEachConnection *pVtab = (JsonEachConnection*)p;\n  JsonEachCursor *pCur;\n\n  UNUSED_PARAMETER(p);\n  pCur = sqlite3DbMallocZero(pVtab->db, sizeof(*pCur));\n  if( pCur==0 ) return SQLITE_NOMEM;\n  pCur->db = pVtab->db;\n  pCur->eMode = pVtab->eMode;\n  pCur->bRecursive = pVtab->bRecursive;\n  jsonStringZero(&pCur->path);\n  *ppCursor = &pCur->base;\n  return SQLITE_OK;\n}\n\n/* Reset a JsonEachCursor back to its original state.  Free any memory\n** held. */\nstatic void jsonEachCursorReset(JsonEachCursor *p){\n  jsonParseReset(&p->sParse);\n  jsonStringReset(&p->path);\n  sqlite3DbFree(p->db, p->aParent);\n  p->iRowid = 0;\n  p->i = 0;\n  p->aParent = 0;\n  p->nParent = 0;\n  p->nParentAlloc = 0;\n  p->iEnd = 0;\n  p->eType = 0;\n}\n\n/* Destructor for a jsonEachCursor object */\nstatic int jsonEachClose(sqlite3_vtab_cursor *cur){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  jsonEachCursorReset(p);\n\n  sqlite3DbFree(p->db, cur);\n  return SQLITE_OK;\n}\n\n/* Return TRUE if the jsonEachCursor object has been advanced off the end\n** of the JSON object */\nstatic int jsonEachEof(sqlite3_vtab_cursor *cur){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  return p->i >= p->iEnd;\n}\n\n/*\n** If the cursor is currently pointing at the label of a object entry,\n** then return the index of the value.  For all other cases, return the\n** current pointer position, which is the value.\n*/\nstatic int jsonSkipLabel(JsonEachCursor *p){\n  if( p->eType==JSONB_OBJECT ){\n    u32 sz = 0;\n    u32 n = jsonbPayloadSize(&p->sParse, p->i, &sz);\n    return p->i + n + sz;\n  }else{\n    return p->i;\n  }\n}\n\n/*\n** Append the path name for the current element.\n*/\nstatic void jsonAppendPathName(JsonEachCursor *p){\n  assert( p->nParent>0 );\n  assert( p->eType==JSONB_ARRAY || p->eType==JSONB_OBJECT );\n  if( p->eType==JSONB_ARRAY ){\n    jsonPrintf(30, &p->path, \"[%lld]\", p->aParent[p->nParent-1].iKey);\n  }else{\n    u32 n, sz = 0, k, i;\n    const char *z;\n    int needQuote = 0;\n    n = jsonbPayloadSize(&p->sParse, p->i, &sz);\n    k = p->i + n;\n    z = (const char*)&p->sParse.aBlob[k];\n    if( sz==0 || !sqlite3Isalpha(z[0]) ){\n      needQuote = 1;\n    }else{\n      for(i=0; i<sz; i++){\n        if( !sqlite3Isalnum(z[i]) ){\n          needQuote = 1;\n          break;\n        }\n      }\n    }\n    if( needQuote ){\n      jsonPrintf(sz+4,&p->path,\".\\\"%.*s\\\"\", sz, z);\n    }else{\n      jsonPrintf(sz+2,&p->path,\".%.*s\", sz, z);\n    }\n  }\n}\n\n/* Advance the cursor to the next element for json_tree() */\nstatic int jsonEachNext(sqlite3_vtab_cursor *cur){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  int rc = SQLITE_OK;\n  if( p->bRecursive ){\n    u8 x;\n    u8 levelChange = 0;\n    u32 n, sz = 0;\n    u32 i = jsonSkipLabel(p);\n    x = p->sParse.aBlob[i] & 0x0f;\n    n = jsonbPayloadSize(&p->sParse, i, &sz);\n    if( x==JSONB_OBJECT || x==JSONB_ARRAY ){\n      JsonParent *pParent;\n      if( p->nParent>=p->nParentAlloc ){\n        JsonParent *pNew;\n        u64 nNew;\n        nNew = p->nParentAlloc*2 + 3;\n        pNew = sqlite3DbRealloc(p->db, p->aParent, sizeof(JsonParent)*nNew);\n        if( pNew==0 ) return SQLITE_NOMEM;\n        p->nParentAlloc = (u32)nNew;\n        p->aParent = pNew;\n      }\n      levelChange = 1;\n      pParent = &p->aParent[p->nParent];\n      pParent->iHead = p->i;\n      pParent->iValue = i;\n      pParent->iEnd = i + n + sz;\n      pParent->iKey = -1;\n      pParent->nPath = (u32)p->path.nUsed;\n      if( p->eType && p->nParent ){\n        jsonAppendPathName(p);\n        if( p->path.eErr ) rc = SQLITE_NOMEM;\n      }\n      p->nParent++;\n      p->i = i + n;\n    }else{\n      p->i = i + n + sz;\n    }\n    while( p->nParent>0 && p->i >= p->aParent[p->nParent-1].iEnd ){\n      p->nParent--;\n      p->path.nUsed = p->aParent[p->nParent].nPath;\n      levelChange = 1;\n    }\n    if( levelChange ){\n      if( p->nParent>0 ){\n        JsonParent *pParent = &p->aParent[p->nParent-1];\n        u32 iVal = pParent->iValue;\n        p->eType = p->sParse.aBlob[iVal] & 0x0f;\n      }else{\n        p->eType = 0;\n      }\n    }\n  }else{\n    u32 n, sz = 0;\n    u32 i = jsonSkipLabel(p);\n    n = jsonbPayloadSize(&p->sParse, i, &sz);\n    p->i = i + n + sz;\n  }\n  if( p->eType==JSONB_ARRAY && p->nParent ){\n    p->aParent[p->nParent-1].iKey++;\n  }\n  p->iRowid++;\n  return rc;\n}\n\n/* Length of the path for rowid==0 in bRecursive mode.\n*/\nstatic int jsonEachPathLength(JsonEachCursor *p){\n  u32 n = p->path.nUsed;\n  char *z = p->path.zBuf;\n  if( p->iRowid==0 && p->bRecursive && n>=2 ){\n    while( n>1 ){\n      n--;\n      if( z[n]=='[' || z[n]=='.' ){\n        u32 x, sz = 0;\n        char cSaved = z[n];\n        z[n] = 0;\n        assert( p->sParse.eEdit==0 );\n        x = jsonLookupStep(&p->sParse, 0, z+1, 0);\n        z[n] = cSaved;\n        if( JSON_LOOKUP_ISERROR(x) ) continue;\n        if( x + jsonbPayloadSize(&p->sParse, x, &sz) == p->i ) break;\n      }\n    }\n  }\n  return n;\n}\n\n/* Return the value of a column */\nstatic int jsonEachColumn(\n  sqlite3_vtab_cursor *cur,   /* The cursor */\n  sqlite3_context *ctx,       /* First argument to sqlite3_result_...() */\n  int iColumn                 /* Which column to return */\n){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  switch( iColumn ){\n    case JEACH_KEY: {\n      if( p->nParent==0 ){\n        u32 n, j;\n        if( p->nRoot==1 ) break;\n        j = jsonEachPathLength(p);\n        n = p->nRoot - j;\n        if( n==0 ){\n          break;\n        }else if( p->path.zBuf[j]=='[' ){\n          i64 x;\n          sqlite3Atoi64(&p->path.zBuf[j+1], &x, n-1, SQLITE_UTF8);\n          sqlite3_result_int64(ctx, x);\n        }else if( p->path.zBuf[j+1]=='\"' ){\n          sqlite3_result_text(ctx, &p->path.zBuf[j+2], n-3, SQLITE_TRANSIENT);\n        }else{\n          sqlite3_result_text(ctx, &p->path.zBuf[j+1], n-1, SQLITE_TRANSIENT);\n        }\n        break;\n      }\n      if( p->eType==JSONB_OBJECT ){\n        jsonReturnFromBlob(&p->sParse, p->i, ctx, 1);\n      }else{\n        assert( p->eType==JSONB_ARRAY );\n        sqlite3_result_int64(ctx, p->aParent[p->nParent-1].iKey);\n      }\n      break;\n    }\n    case JEACH_VALUE: {\n      u32 i = jsonSkipLabel(p);\n      jsonReturnFromBlob(&p->sParse, i, ctx, p->eMode);\n      if( (p->sParse.aBlob[i] & 0x0f)>=JSONB_ARRAY ){\n        sqlite3_result_subtype(ctx, JSON_SUBTYPE);\n      }\n      break;\n    }\n    case JEACH_TYPE: {\n      u32 i = jsonSkipLabel(p);\n      u8 eType = p->sParse.aBlob[i] & 0x0f;\n      sqlite3_result_text(ctx, jsonbType[eType], -1, SQLITE_STATIC);\n      break;\n    }\n    case JEACH_ATOM: {\n      u32 i = jsonSkipLabel(p);\n      if( (p->sParse.aBlob[i] & 0x0f)<JSONB_ARRAY ){\n        jsonReturnFromBlob(&p->sParse, i, ctx, 1);\n      }\n      break;\n    }\n    case JEACH_ID: {\n      sqlite3_result_int64(ctx, (sqlite3_int64)p->i);\n      break;\n    }\n    case JEACH_PARENT: {\n      if( p->nParent>0 && p->bRecursive ){\n        sqlite3_result_int64(ctx, p->aParent[p->nParent-1].iHead);\n      }\n      break;\n    }\n    case JEACH_FULLKEY: {\n      u64 nBase = p->path.nUsed;\n      if( p->nParent ) jsonAppendPathName(p);\n      sqlite3_result_text64(ctx, p->path.zBuf, p->path.nUsed,\n                            SQLITE_TRANSIENT, SQLITE_UTF8);\n      p->path.nUsed = nBase;\n      break;\n    }\n    case JEACH_PATH: {\n      u32 n = jsonEachPathLength(p);\n      sqlite3_result_text64(ctx, p->path.zBuf, n,\n                            SQLITE_TRANSIENT, SQLITE_UTF8);\n      break;\n    }\n    default: {\n      sqlite3_result_text(ctx, p->path.zBuf, p->nRoot, SQLITE_STATIC);\n      break;\n    }\n    case JEACH_JSON: {\n      if( p->sParse.zJson==0 ){\n        sqlite3_result_blob(ctx, p->sParse.aBlob, p->sParse.nBlob,\n                            SQLITE_TRANSIENT);\n      }else{\n        sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_TRANSIENT);\n      }\n      break;\n    }\n  }\n  return SQLITE_OK;\n}\n\n/* Return the current rowid value */\nstatic int jsonEachRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  *pRowid = p->iRowid;\n  return SQLITE_OK;\n}\n\n/* The query strategy is to look for an equality constraint on the json\n** column.  Without such a constraint, the table cannot operate.  idxNum is\n** 1 if the constraint is found, 3 if the constraint and zRoot are found,\n** and 0 otherwise.\n*/\nstatic int jsonEachBestIndex(\n  sqlite3_vtab *tab,\n  sqlite3_index_info *pIdxInfo\n){\n  int i;                     /* Loop counter or computed array index */\n  int aIdx[2];               /* Index of constraints for JSON and ROOT */\n  int unusableMask = 0;      /* Mask of unusable JSON and ROOT constraints */\n  int idxMask = 0;           /* Mask of usable == constraints JSON and ROOT */\n  const struct sqlite3_index_constraint *pConstraint;\n\n  /* This implementation assumes that JSON and ROOT are the last two\n  ** columns in the table */\n  assert( JEACH_ROOT == JEACH_JSON+1 );\n  UNUSED_PARAMETER(tab);\n  aIdx[0] = aIdx[1] = -1;\n  pConstraint = pIdxInfo->aConstraint;\n  for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){\n    int iCol;\n    int iMask;\n    if( pConstraint->iColumn < JEACH_JSON ) continue;\n    iCol = pConstraint->iColumn - JEACH_JSON;\n    assert( iCol==0 || iCol==1 );\n    testcase( iCol==0 );\n    iMask = 1 << iCol;\n    if( pConstraint->usable==0 ){\n      unusableMask |= iMask;\n    }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){\n      aIdx[iCol] = i;\n      idxMask |= iMask;\n    }\n  }\n  if( pIdxInfo->nOrderBy>0\n   && pIdxInfo->aOrderBy[0].iColumn<0\n   && pIdxInfo->aOrderBy[0].desc==0\n  ){\n    pIdxInfo->orderByConsumed = 1;\n  }\n\n  if( (unusableMask & ~idxMask)!=0 ){\n    /* If there are any unusable constraints on JSON or ROOT, then reject\n    ** this entire plan */\n    return SQLITE_CONSTRAINT;\n  }\n  if( aIdx[0]<0 ){\n    /* No JSON input.  Leave estimatedCost at the huge value that it was\n    ** initialized to to discourage the query planner from selecting this\n    ** plan. */\n    pIdxInfo->idxNum = 0;\n  }else{\n    pIdxInfo->estimatedCost = 1.0;\n    i = aIdx[0];\n    pIdxInfo->aConstraintUsage[i].argvIndex = 1;\n    pIdxInfo->aConstraintUsage[i].omit = 1;\n    if( aIdx[1]<0 ){\n      pIdxInfo->idxNum = 1;  /* Only JSON supplied.  Plan 1 */\n    }else{\n      i = aIdx[1];\n      pIdxInfo->aConstraintUsage[i].argvIndex = 2;\n      pIdxInfo->aConstraintUsage[i].omit = 1;\n      pIdxInfo->idxNum = 3;  /* Both JSON and ROOT are supplied.  Plan 3 */\n    }\n  }\n  return SQLITE_OK;\n}\n\n/* Start a search on a new JSON string */\nstatic int jsonEachFilter(\n  sqlite3_vtab_cursor *cur,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  JsonEachCursor *p = (JsonEachCursor*)cur;\n  const char *zRoot = 0;\n  u32 i, n, sz;\n\n  UNUSED_PARAMETER(idxStr);\n  UNUSED_PARAMETER(argc);\n  jsonEachCursorReset(p);\n  if( idxNum==0 ) return SQLITE_OK;\n  memset(&p->sParse, 0, sizeof(p->sParse));\n  p->sParse.nJPRef = 1;\n  p->sParse.db = p->db;\n  if( jsonArgIsJsonb(argv[0], &p->sParse) ){\n    /* We have JSONB */\n  }else{\n    p->sParse.zJson = (char*)sqlite3_value_text(argv[0]);\n    p->sParse.nJson = sqlite3_value_bytes(argv[0]);\n    if( p->sParse.zJson==0 ){\n      p->i = p->iEnd = 0;\n      return SQLITE_OK;\n    }\n    if( jsonConvertTextToBlob(&p->sParse, 0) ){\n      if( p->sParse.oom ){\n        return SQLITE_NOMEM;\n      }\n      goto json_each_malformed_input;\n    }\n  }\n  if( idxNum==3 ){\n    zRoot = (const char*)sqlite3_value_text(argv[1]);\n    if( zRoot==0 ) return SQLITE_OK;\n    if( zRoot[0]!='$' ){\n      sqlite3_free(cur->pVtab->zErrMsg);\n      cur->pVtab->zErrMsg = jsonBadPathError(0, zRoot);\n      jsonEachCursorReset(p);\n      return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;\n    }\n    p->nRoot = sqlite3Strlen30(zRoot);\n    if( zRoot[1]==0 ){\n      i = p->i = 0;\n      p->eType = 0;\n    }else{\n      i = jsonLookupStep(&p->sParse, 0, zRoot+1, 0);\n      if( JSON_LOOKUP_ISERROR(i) ){\n        if( i==JSON_LOOKUP_NOTFOUND ){\n          p->i = 0;\n          p->eType = 0;\n          p->iEnd = 0;\n          return SQLITE_OK;\n        }\n        sqlite3_free(cur->pVtab->zErrMsg);\n        cur->pVtab->zErrMsg = jsonBadPathError(0, zRoot);\n        jsonEachCursorReset(p);\n        return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;\n      }\n      if( p->sParse.iLabel ){\n        p->i = p->sParse.iLabel;\n        p->eType = JSONB_OBJECT;\n      }else{\n        p->i = i;\n        p->eType = JSONB_ARRAY;\n      }\n    }\n    jsonAppendRaw(&p->path, zRoot, p->nRoot);\n  }else{\n    i = p->i = 0;\n    p->eType = 0;\n    p->nRoot = 1;\n    jsonAppendRaw(&p->path, \"$\", 1);\n  }\n  p->nParent = 0;\n  n = jsonbPayloadSize(&p->sParse, i, &sz);\n  p->iEnd = i+n+sz;\n  if( (p->sParse.aBlob[i] & 0x0f)>=JSONB_ARRAY && !p->bRecursive ){\n    p->i = i + n;\n    p->eType = p->sParse.aBlob[i] & 0x0f;\n    p->aParent = sqlite3DbMallocZero(p->db, sizeof(JsonParent));\n    if( p->aParent==0 ) return SQLITE_NOMEM;\n    p->nParent = 1;\n    p->nParentAlloc = 1;\n    p->aParent[0].iKey = 0;\n    p->aParent[0].iEnd = p->iEnd;\n    p->aParent[0].iHead = p->i;\n    p->aParent[0].iValue = i;\n  }\n  return SQLITE_OK;\n\njson_each_malformed_input:\n  sqlite3_free(cur->pVtab->zErrMsg);\n  cur->pVtab->zErrMsg = sqlite3_mprintf(\"malformed JSON\");\n  jsonEachCursorReset(p);\n  return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;\n}\n\n/* The methods of the json_each virtual table */\nstatic sqlite3_module jsonEachModule = {\n  0,                         /* iVersion */\n  0,                         /* xCreate */\n  jsonEachConnect,           /* xConnect */\n  jsonEachBestIndex,         /* xBestIndex */\n  jsonEachDisconnect,        /* xDisconnect */\n  0,                         /* xDestroy */\n  jsonEachOpen,              /* xOpen - open a cursor */\n  jsonEachClose,             /* xClose - close a cursor */\n  jsonEachFilter,            /* xFilter - configure scan constraints */\n  jsonEachNext,              /* xNext - advance a cursor */\n  jsonEachEof,               /* xEof - check for end of scan */\n  jsonEachColumn,            /* xColumn - read data */\n  jsonEachRowid,             /* xRowid - read data */\n  0,                         /* xUpdate */\n  0,                         /* xBegin */\n  0,                         /* xSync */\n  0,                         /* xCommit */\n  0,                         /* xRollback */\n  0,                         /* xFindMethod */\n  0,                         /* xRename */\n  0,                         /* xSavepoint */\n  0,                         /* xRelease */\n  0,                         /* xRollbackTo */\n  0,                         /* xShadowName */\n  0                          /* xIntegrity */\n};\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n#endif /* !defined(SQLITE_OMIT_JSON) */\n\n/*\n** Register JSON functions.\n*/\nSQLITE_PRIVATE void sqlite3RegisterJsonFunctions(void){\n#ifndef SQLITE_OMIT_JSON\n  static FuncDef aJsonFunc[] = {\n    /*   sqlite3_result_subtype() ----,  ,--- sqlite3_value_subtype()       */\n    /*                                |  |                                  */\n    /*             Uses cache ------, |  | ,---- Returns JSONB              */\n    /*                              | |  | |                                */\n    /*     Number of arguments ---, | |  | | ,--- Flags                     */\n    /*                            | | |  | | |                              */\n    JFUNCTION(json,               1,1,1, 0,0,0,          jsonRemoveFunc),\n    JFUNCTION(jsonb,              1,1,0, 0,1,0,          jsonRemoveFunc),\n    JFUNCTION(json_array,        -1,0,1, 1,0,0,          jsonArrayFunc),\n    JFUNCTION(jsonb_array,       -1,0,1, 1,1,0,          jsonArrayFunc),\n    JFUNCTION(json_array_length,  1,1,0, 0,0,0,          jsonArrayLengthFunc),\n    JFUNCTION(json_array_length,  2,1,0, 0,0,0,          jsonArrayLengthFunc),\n    JFUNCTION(json_error_position,1,1,0, 0,0,0,          jsonErrorFunc),\n    JFUNCTION(json_extract,      -1,1,1, 0,0,0,          jsonExtractFunc),\n    JFUNCTION(jsonb_extract,     -1,1,0, 0,1,0,          jsonExtractFunc),\n    JFUNCTION(->,                 2,1,1, 0,0,JSON_JSON,  jsonExtractFunc),\n    JFUNCTION(->>,                2,1,0, 0,0,JSON_SQL,   jsonExtractFunc),\n    JFUNCTION(json_insert,       -1,1,1, 1,0,0,          jsonSetFunc),\n    JFUNCTION(jsonb_insert,      -1,1,0, 1,1,0,          jsonSetFunc),\n    JFUNCTION(json_object,       -1,0,1, 1,0,0,          jsonObjectFunc),\n    JFUNCTION(jsonb_object,      -1,0,1, 1,1,0,          jsonObjectFunc),\n    JFUNCTION(json_patch,         2,1,1, 0,0,0,          jsonPatchFunc),\n    JFUNCTION(jsonb_patch,        2,1,0, 0,1,0,          jsonPatchFunc),\n    JFUNCTION(json_pretty,        1,1,0, 0,0,0,          jsonPrettyFunc),\n    JFUNCTION(json_pretty,        2,1,0, 0,0,0,          jsonPrettyFunc),\n    JFUNCTION(json_quote,         1,0,1, 1,0,0,          jsonQuoteFunc),\n    JFUNCTION(json_remove,       -1,1,1, 0,0,0,          jsonRemoveFunc),\n    JFUNCTION(jsonb_remove,      -1,1,0, 0,1,0,          jsonRemoveFunc),\n    JFUNCTION(json_replace,      -1,1,1, 1,0,0,          jsonReplaceFunc),\n    JFUNCTION(jsonb_replace,     -1,1,0, 1,1,0,          jsonReplaceFunc),\n    JFUNCTION(json_set,          -1,1,1, 1,0,JSON_ISSET, jsonSetFunc),\n    JFUNCTION(jsonb_set,         -1,1,0, 1,1,JSON_ISSET, jsonSetFunc),\n    JFUNCTION(json_type,          1,1,0, 0,0,0,          jsonTypeFunc),\n    JFUNCTION(json_type,          2,1,0, 0,0,0,          jsonTypeFunc),\n    JFUNCTION(json_valid,         1,1,0, 0,0,0,          jsonValidFunc),\n    JFUNCTION(json_valid,         2,1,0, 0,0,0,          jsonValidFunc),\n#if SQLITE_DEBUG\n    JFUNCTION(json_parse,         1,1,0, 0,0,0,          jsonParseFunc),\n#endif\n    WAGGREGATE(json_group_array,  1, 0, 0,\n       jsonArrayStep, jsonArrayFinal, jsonArrayValue, jsonGroupInverse,\n       SQLITE_SUBTYPE|SQLITE_RESULT_SUBTYPE|SQLITE_UTF8|\n       SQLITE_DETERMINISTIC),\n    WAGGREGATE(jsonb_group_array, 1, JSON_BLOB, 0,\n       jsonArrayStep, jsonArrayFinal, jsonArrayValue, jsonGroupInverse,\n       SQLITE_SUBTYPE|SQLITE_RESULT_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC),\n    WAGGREGATE(json_group_object, 2, 0, 0,\n       jsonObjectStep, jsonObjectFinal, jsonObjectValue, jsonGroupInverse,\n       SQLITE_SUBTYPE|SQLITE_RESULT_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC),\n    WAGGREGATE(jsonb_group_object,2, JSON_BLOB, 0,\n       jsonObjectStep, jsonObjectFinal, jsonObjectValue, jsonGroupInverse,\n       SQLITE_SUBTYPE|SQLITE_RESULT_SUBTYPE|SQLITE_UTF8|\n       SQLITE_DETERMINISTIC)\n  };\n  sqlite3InsertBuiltinFuncs(aJsonFunc, ArraySize(aJsonFunc));\n#endif\n}\n\n#if  !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON)\n/*\n** Register the JSON table-valued function named zName and return a\n** pointer to its Module object.  Return NULL if something goes wrong.\n*/\nSQLITE_PRIVATE Module *sqlite3JsonVtabRegister(sqlite3 *db, const char *zName){\n  unsigned int i;\n  static const char *azModule[] = {\n    \"json_each\", \"json_tree\", \"jsonb_each\", \"jsonb_tree\"\n  };\n  assert( sqlite3HashFind(&db->aModule, zName)==0 );\n  for(i=0; i<sizeof(azModule)/sizeof(azModule[0]); i++){\n    if( sqlite3StrICmp(azModule[i],zName)==0 ){\n      return sqlite3VtabCreateModule(db, azModule[i], &jsonEachModule, 0, 0);\n    }\n  }\n  return 0;\n}\n#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && !defined(SQLITE_OMIT_JSON) */\n\n/************** End of json.c ************************************************/\n/************** Begin file rtree.c *******************************************/\n/*\n** 2001 September 15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file contains code for implementations of the r-tree and r*-tree\n** algorithms packaged as an SQLite virtual table module.\n*/\n\n/*\n** Database Format of R-Tree Tables\n** --------------------------------\n**\n** The data structure for a single virtual r-tree table is stored in three\n** native SQLite tables declared as follows. In each case, the '%' character\n** in the table name is replaced with the user-supplied name of the r-tree\n** table.\n**\n**   CREATE TABLE %_node(nodeno INTEGER PRIMARY KEY, data BLOB)\n**   CREATE TABLE %_parent(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)\n**   CREATE TABLE %_rowid(rowid INTEGER PRIMARY KEY, nodeno INTEGER, ...)\n**\n** The data for each node of the r-tree structure is stored in the %_node\n** table. For each node that is not the root node of the r-tree, there is\n** an entry in the %_parent table associating the node with its parent.\n** And for each row of data in the table, there is an entry in the %_rowid\n** table that maps from the entries rowid to the id of the node that it\n** is stored on.  If the r-tree contains auxiliary columns, those are stored\n** on the end of the %_rowid table.\n**\n** The root node of an r-tree always exists, even if the r-tree table is\n** empty. The nodeno of the root node is always 1. All other nodes in the\n** table must be the same size as the root node. The content of each node\n** is formatted as follows:\n**\n**   1. If the node is the root node (node 1), then the first 2 bytes\n**      of the node contain the tree depth as a big-endian integer.\n**      For non-root nodes, the first 2 bytes are left unused.\n**\n**   2. The next 2 bytes contain the number of entries currently\n**      stored in the node.\n**\n**   3. The remainder of the node contains the node entries. Each entry\n**      consists of a single 8-byte integer followed by an even number\n**      of 4-byte coordinates. For leaf nodes the integer is the rowid\n**      of a record. For internal nodes it is the node number of a\n**      child page.\n*/\n\n#if !defined(SQLITE_CORE) \\\n  || (defined(SQLITE_ENABLE_RTREE) && !defined(SQLITE_OMIT_VIRTUALTABLE))\n\n#ifndef SQLITE_CORE\n/*   #include \"sqlite3ext.h\" */\n  SQLITE_EXTENSION_INIT1\n#else\n/*   #include \"sqlite3.h\" */\n#endif\nSQLITE_PRIVATE sqlite3_int64 sqlite3GetToken(const unsigned char*,int*); /* In SQLite core */\n\n/* #include <stddef.h> */\n\n/*\n** If building separately, we will need some setup that is normally\n** found in sqliteInt.h\n*/\n#if !defined(SQLITE_AMALGAMATION)\n#include \"sqlite3rtree.h\"\ntypedef sqlite3_int64 i64;\ntypedef sqlite3_uint64 u64;\ntypedef unsigned char u8;\ntypedef unsigned short u16;\ntypedef unsigned int u32;\n#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)\n# define NDEBUG 1\n#endif\n#if defined(NDEBUG) && defined(SQLITE_DEBUG)\n# undef NDEBUG\n#endif\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)\n# define SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS 1\n#endif\n#if defined(SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS)\n# define ALWAYS(X)      (1)\n# define NEVER(X)       (0)\n#elif !defined(NDEBUG)\n# define ALWAYS(X)      ((X)?1:(assert(0),0))\n# define NEVER(X)       ((X)?(assert(0),1):0)\n#else\n# define ALWAYS(X)      (X)\n# define NEVER(X)       (X)\n#endif\n#ifndef offsetof\n# define offsetof(ST,M) ((size_t)((char*)&((ST*)0)->M - (char*)0))\n#endif\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)\n# define FLEXARRAY\n#else\n# define FLEXARRAY 1\n#endif\n#endif /* !defined(SQLITE_AMALGAMATION) */\n\n/* Macro to check for 4-byte alignment.  Only used inside of assert() */\n#ifdef SQLITE_DEBUG\n# define FOUR_BYTE_ALIGNED(X)  ((((char*)(X) - (char*)0) & 3)==0)\n#endif\n\n/* #include <string.h> */\n/* #include <stdio.h> */\n/* #include <assert.h> */\n/* #include <stdlib.h> */\n\n/*  The following macro is used to suppress compiler warnings.\n*/\n#ifndef UNUSED_PARAMETER\n# define UNUSED_PARAMETER(x) (void)(x)\n#endif\n\ntypedef struct Rtree Rtree;\ntypedef struct RtreeCursor RtreeCursor;\ntypedef struct RtreeNode RtreeNode;\ntypedef struct RtreeCell RtreeCell;\ntypedef struct RtreeConstraint RtreeConstraint;\ntypedef struct RtreeMatchArg RtreeMatchArg;\ntypedef struct RtreeGeomCallback RtreeGeomCallback;\ntypedef union RtreeCoord RtreeCoord;\ntypedef struct RtreeSearchPoint RtreeSearchPoint;\n\n/* The rtree may have between 1 and RTREE_MAX_DIMENSIONS dimensions. */\n#define RTREE_MAX_DIMENSIONS 5\n\n/* Maximum number of auxiliary columns */\n#define RTREE_MAX_AUX_COLUMN 100\n\n/* Size of hash table Rtree.aHash. This hash table is not expected to\n** ever contain very many entries, so a fixed number of buckets is\n** used.\n*/\n#define HASHSIZE 97\n\n/* The xBestIndex method of this virtual table requires an estimate of\n** the number of rows in the virtual table to calculate the costs of\n** various strategies. If possible, this estimate is loaded from the\n** sqlite_stat1 table (with RTREE_MIN_ROWEST as a hard-coded minimum).\n** Otherwise, if no sqlite_stat1 entry is available, use\n** RTREE_DEFAULT_ROWEST.\n*/\n#define RTREE_DEFAULT_ROWEST 1048576\n#define RTREE_MIN_ROWEST         100\n\n/*\n** An rtree virtual-table object.\n*/\nstruct Rtree {\n  sqlite3_vtab base;          /* Base class.  Must be first */\n  sqlite3 *db;                /* Host database connection */\n  int iNodeSize;              /* Size in bytes of each node in the node table */\n  u8 nDim;                    /* Number of dimensions */\n  u8 nDim2;                   /* Twice the number of dimensions */\n  u8 eCoordType;              /* RTREE_COORD_REAL32 or RTREE_COORD_INT32 */\n  u8 nBytesPerCell;           /* Bytes consumed per cell */\n  u8 inWrTrans;               /* True if inside write transaction */\n  u8 nAux;                    /* # of auxiliary columns in %_rowid */\n#ifdef SQLITE_ENABLE_GEOPOLY\n  u8 nAuxNotNull;             /* Number of initial not-null aux columns */\n#endif\n#ifdef SQLITE_DEBUG\n  u8 bCorrupt;                /* Shadow table corruption detected */\n#endif\n  int iDepth;                 /* Current depth of the r-tree structure */\n  char *zDb;                  /* Name of database containing r-tree table */\n  char *zName;                /* Name of r-tree table */\n  char *zNodeName;            /* Name of the %_node table */\n  u32 nBusy;                  /* Current number of users of this structure */\n  i64 nRowEst;                /* Estimated number of rows in this table */\n  u32 nCursor;                /* Number of open cursors */\n  u32 nNodeRef;               /* Number RtreeNodes with positive nRef */\n  char *zReadAuxSql;          /* SQL for statement to read aux data */\n\n  /* List of nodes removed during a CondenseTree operation. List is\n  ** linked together via the pointer normally used for hash chains -\n  ** RtreeNode.pNext. RtreeNode.iNode stores the depth of the sub-tree\n  ** headed by the node (leaf nodes have RtreeNode.iNode==0).\n  */\n  RtreeNode *pDeleted;\n\n  /* Blob I/O on xxx_node */\n  sqlite3_blob *pNodeBlob;\n\n  /* Statements to read/write/delete a record from xxx_node */\n  sqlite3_stmt *pWriteNode;\n  sqlite3_stmt *pDeleteNode;\n\n  /* Statements to read/write/delete a record from xxx_rowid */\n  sqlite3_stmt *pReadRowid;\n  sqlite3_stmt *pWriteRowid;\n  sqlite3_stmt *pDeleteRowid;\n\n  /* Statements to read/write/delete a record from xxx_parent */\n  sqlite3_stmt *pReadParent;\n  sqlite3_stmt *pWriteParent;\n  sqlite3_stmt *pDeleteParent;\n\n  /* Statement for writing to the \"aux:\" fields, if there are any */\n  sqlite3_stmt *pWriteAux;\n\n  RtreeNode *aHash[HASHSIZE]; /* Hash table of in-memory nodes. */\n};\n\n/* Possible values for Rtree.eCoordType: */\n#define RTREE_COORD_REAL32 0\n#define RTREE_COORD_INT32  1\n\n/*\n** If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will\n** only deal with integer coordinates.  No floating point operations\n** will be done.\n*/\n#ifdef SQLITE_RTREE_INT_ONLY\n  typedef sqlite3_int64 RtreeDValue;       /* High accuracy coordinate */\n  typedef int RtreeValue;                  /* Low accuracy coordinate */\n# define RTREE_ZERO 0\n#else\n  typedef double RtreeDValue;              /* High accuracy coordinate */\n  typedef float RtreeValue;                /* Low accuracy coordinate */\n# define RTREE_ZERO 0.0\n#endif\n\n/*\n** Set the Rtree.bCorrupt flag\n*/\n#ifdef SQLITE_DEBUG\n# define RTREE_IS_CORRUPT(X) ((X)->bCorrupt = 1)\n#else\n# define RTREE_IS_CORRUPT(X)\n#endif\n\n/*\n** When doing a search of an r-tree, instances of the following structure\n** record intermediate results from the tree walk.\n**\n** The id is always a node-id.  For iLevel>=1 the id is the node-id of\n** the node that the RtreeSearchPoint represents.  When iLevel==0, however,\n** the id is of the parent node and the cell that RtreeSearchPoint\n** represents is the iCell-th entry in the parent node.\n*/\nstruct RtreeSearchPoint {\n  RtreeDValue rScore;    /* The score for this node.  Smallest goes first. */\n  sqlite3_int64 id;      /* Node ID */\n  u8 iLevel;             /* 0=entries.  1=leaf node.  2+ for higher */\n  u8 eWithin;            /* PARTLY_WITHIN or FULLY_WITHIN */\n  u8 iCell;              /* Cell index within the node */\n};\n\n/*\n** The minimum number of cells allowed for a node is a third of the\n** maximum. In Gutman's notation:\n**\n**     m = M/3\n**\n** If an R*-tree \"Reinsert\" operation is required, the same number of\n** cells are removed from the overfull node and reinserted into the tree.\n*/\n#define RTREE_MINCELLS(p) ((((p)->iNodeSize-4)/(p)->nBytesPerCell)/3)\n#define RTREE_REINSERT(p) RTREE_MINCELLS(p)\n#define RTREE_MAXCELLS 51\n\n/*\n** The smallest possible node-size is (512-64)==448 bytes. And the largest\n** supported cell size is 48 bytes (8 byte rowid + ten 4 byte coordinates).\n** Therefore all non-root nodes must contain at least 3 entries. Since\n** 3^40 is greater than 2^64, an r-tree structure always has a depth of\n** 40 or less.\n*/\n#define RTREE_MAX_DEPTH 40\n\n\n/*\n** Number of entries in the cursor RtreeNode cache.  The first entry is\n** used to cache the RtreeNode for RtreeCursor.sPoint.  The remaining\n** entries cache the RtreeNode for the first elements of the priority queue.\n*/\n#define RTREE_CACHE_SZ  5\n\n/*\n** An rtree cursor object.\n*/\nstruct RtreeCursor {\n  sqlite3_vtab_cursor base;         /* Base class.  Must be first */\n  u8 atEOF;                         /* True if at end of search */\n  u8 bPoint;                        /* True if sPoint is valid */\n  u8 bAuxValid;                     /* True if pReadAux is valid */\n  int iStrategy;                    /* Copy of idxNum search parameter */\n  int nConstraint;                  /* Number of entries in aConstraint */\n  RtreeConstraint *aConstraint;     /* Search constraints. */\n  int nPointAlloc;                  /* Number of slots allocated for aPoint[] */\n  int nPoint;                       /* Number of slots used in aPoint[] */\n  int mxLevel;                      /* iLevel value for root of the tree */\n  RtreeSearchPoint *aPoint;         /* Priority queue for search points */\n  sqlite3_stmt *pReadAux;           /* Statement to read aux-data */\n  RtreeSearchPoint sPoint;          /* Cached next search point */\n  RtreeNode *aNode[RTREE_CACHE_SZ]; /* Rtree node cache */\n  u32 anQueue[RTREE_MAX_DEPTH+1];   /* Number of queued entries by iLevel */\n};\n\n/* Return the Rtree of a RtreeCursor */\n#define RTREE_OF_CURSOR(X)   ((Rtree*)((X)->base.pVtab))\n\n/*\n** A coordinate can be either a floating point number or a integer.  All\n** coordinates within a single R-Tree are always of the same time.\n*/\nunion RtreeCoord {\n  RtreeValue f;      /* Floating point value */\n  int i;             /* Integer value */\n  u32 u;             /* Unsigned for byte-order conversions */\n};\n\n/*\n** The argument is an RtreeCoord. Return the value stored within the RtreeCoord\n** formatted as a RtreeDValue (double or int64). This macro assumes that local\n** variable pRtree points to the Rtree structure associated with the\n** RtreeCoord.\n*/\n#ifdef SQLITE_RTREE_INT_ONLY\n# define DCOORD(coord) ((RtreeDValue)coord.i)\n#else\n# define DCOORD(coord) (                           \\\n    (pRtree->eCoordType==RTREE_COORD_REAL32) ?      \\\n      ((double)coord.f) :                           \\\n      ((double)coord.i)                             \\\n  )\n#endif\n\n/*\n** A search constraint.\n*/\nstruct RtreeConstraint {\n  int iCoord;                     /* Index of constrained coordinate */\n  int op;                         /* Constraining operation */\n  union {\n    RtreeDValue rValue;             /* Constraint value. */\n    int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*);\n    int (*xQueryFunc)(sqlite3_rtree_query_info*);\n  } u;\n  sqlite3_rtree_query_info *pInfo;  /* xGeom and xQueryFunc argument */\n};\n\n/* Possible values for RtreeConstraint.op */\n#define RTREE_EQ    0x41  /* A */\n#define RTREE_LE    0x42  /* B */\n#define RTREE_LT    0x43  /* C */\n#define RTREE_GE    0x44  /* D */\n#define RTREE_GT    0x45  /* E */\n#define RTREE_MATCH 0x46  /* F: Old-style sqlite3_rtree_geometry_callback() */\n#define RTREE_QUERY 0x47  /* G: New-style sqlite3_rtree_query_callback() */\n\n/* Special operators available only on cursors.  Needs to be consecutive\n** with the normal values above, but must be less than RTREE_MATCH.  These\n** are used in the cursor for contraints such as x=NULL (RTREE_FALSE) or\n** x<'xyz' (RTREE_TRUE) */\n#define RTREE_TRUE  0x3f  /* ? */\n#define RTREE_FALSE 0x40  /* @ */\n\n/*\n** An rtree structure node.\n*/\nstruct RtreeNode {\n  RtreeNode *pParent;         /* Parent node */\n  i64 iNode;                  /* The node number */\n  int nRef;                   /* Number of references to this node */\n  int isDirty;                /* True if the node needs to be written to disk */\n  u8 *zData;                  /* Content of the node, as should be on disk */\n  RtreeNode *pNext;           /* Next node in this hash collision chain */\n};\n\n/* Return the number of cells in a node  */\n#define NCELL(pNode) readInt16(&(pNode)->zData[2])\n\n/*\n** A single cell from a node, deserialized\n*/\nstruct RtreeCell {\n  i64 iRowid;                                 /* Node or entry ID */\n  RtreeCoord aCoord[RTREE_MAX_DIMENSIONS*2];  /* Bounding box coordinates */\n};\n\n\n/*\n** This object becomes the sqlite3_user_data() for the SQL functions\n** that are created by sqlite3_rtree_geometry_callback() and\n** sqlite3_rtree_query_callback() and which appear on the right of MATCH\n** operators in order to constrain a search.\n**\n** xGeom and xQueryFunc are the callback functions.  Exactly one of\n** xGeom and xQueryFunc fields is non-NULL, depending on whether the\n** SQL function was created using sqlite3_rtree_geometry_callback() or\n** sqlite3_rtree_query_callback().\n**\n** This object is deleted automatically by the destructor mechanism in\n** sqlite3_create_function_v2().\n*/\nstruct RtreeGeomCallback {\n  int (*xGeom)(sqlite3_rtree_geometry*, int, RtreeDValue*, int*);\n  int (*xQueryFunc)(sqlite3_rtree_query_info*);\n  void (*xDestructor)(void*);\n  void *pContext;\n};\n\n/*\n** An instance of this structure (in the form of a BLOB) is returned by\n** the SQL functions that sqlite3_rtree_geometry_callback() and\n** sqlite3_rtree_query_callback() create, and is read as the right-hand\n** operand to the MATCH operator of an R-Tree.\n*/\nstruct RtreeMatchArg {\n  u32 iSize;                  /* Size of this object */\n  RtreeGeomCallback cb;       /* Info about the callback functions */\n  int nParam;                 /* Number of parameters to the SQL function */\n  sqlite3_value **apSqlParam; /* Original SQL parameter values */\n  RtreeDValue aParam[FLEXARRAY]; /* Values for parameters to the SQL function */\n};\n\n/* Size of an RtreeMatchArg object with N parameters */\n#define SZ_RTREEMATCHARG(N)  \\\n        (offsetof(RtreeMatchArg,aParam)+(N)*sizeof(RtreeDValue))\n\n#ifndef MAX\n# define MAX(x,y) ((x) < (y) ? (y) : (x))\n#endif\n#ifndef MIN\n# define MIN(x,y) ((x) > (y) ? (y) : (x))\n#endif\n\n/* What version of GCC is being used.  0 means GCC is not being used .\n** Note that the GCC_VERSION macro will also be set correctly when using\n** clang, since clang works hard to be gcc compatible.  So the gcc\n** optimizations will also work when compiling with clang.\n*/\n#ifndef GCC_VERSION\n#if defined(__GNUC__) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define GCC_VERSION (__GNUC__*1000000+__GNUC_MINOR__*1000+__GNUC_PATCHLEVEL__)\n#else\n# define GCC_VERSION 0\n#endif\n#endif\n\n/* The testcase() macro should already be defined in the amalgamation.  If\n** it is not, make it a no-op.\n*/\n#ifndef SQLITE_AMALGAMATION\n# if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_DEBUG)\n    unsigned int sqlite3RtreeTestcase = 0;\n#   define testcase(X)  if( X ){ sqlite3RtreeTestcase += __LINE__; }\n# else\n#   define testcase(X)\n# endif\n#endif\n\n/*\n** Make sure that the compiler intrinsics we desire are enabled when\n** compiling with an appropriate version of MSVC unless prevented by\n** the SQLITE_DISABLE_INTRINSIC define.\n*/\n#if !defined(SQLITE_DISABLE_INTRINSIC)\n#  if defined(_MSC_VER) && _MSC_VER>=1400\n#    if !defined(_WIN32_WCE)\n/* #      include <intrin.h> */\n#      pragma intrinsic(_byteswap_ulong)\n#      pragma intrinsic(_byteswap_uint64)\n#    else\n/* #      include <cmnintrin.h> */\n#    endif\n#  endif\n#endif\n\n/*\n** Macros to determine whether the machine is big or little endian,\n** and whether or not that determination is run-time or compile-time.\n**\n** For best performance, an attempt is made to guess at the byte-order\n** using C-preprocessor macros.  If that is unsuccessful, or if\n** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined\n** at run-time.\n*/\n#ifndef SQLITE_BYTEORDER /* Replicate changes at tag-20230904a */\n# if defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__\n#   define SQLITE_BYTEORDER 4321\n# elif defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__\n#   define SQLITE_BYTEORDER 1234\n# elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1\n#   define SQLITE_BYTEORDER 4321\n# elif defined(i386)    || defined(__i386__)      || defined(_M_IX86) ||    \\\n     defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \\\n     defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \\\n     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)\n#   define SQLITE_BYTEORDER 1234\n# elif defined(sparc)   || defined(__ARMEB__)     || defined(__AARCH64EB__)\n#   define SQLITE_BYTEORDER 4321\n# else\n#   define SQLITE_BYTEORDER 0\n# endif\n#endif\n\n\n/* What version of MSVC is being used.  0 means MSVC is not being used */\n#ifndef MSVC_VERSION\n#if defined(_MSC_VER) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define MSVC_VERSION _MSC_VER\n#else\n# define MSVC_VERSION 0\n#endif\n#endif\n\n/*\n** Functions to deserialize a 16 bit integer, 32 bit real number and\n** 64 bit integer. The deserialized value is returned.\n*/\nstatic int readInt16(u8 *p){\n  return (p[0]<<8) + p[1];\n}\nstatic void readCoord(u8 *p, RtreeCoord *pCoord){\n  assert( FOUR_BYTE_ALIGNED(p) );\n#if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  pCoord->u = _byteswap_ulong(*(u32*)p);\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  pCoord->u = __builtin_bswap32(*(u32*)p);\n#elif SQLITE_BYTEORDER==4321\n  pCoord->u = *(u32*)p;\n#else\n  pCoord->u = (\n    (((u32)p[0]) << 24) +\n    (((u32)p[1]) << 16) +\n    (((u32)p[2]) <<  8) +\n    (((u32)p[3]) <<  0)\n  );\n#endif\n}\nstatic i64 readInt64(u8 *p){\n#if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  u64 x;\n  memcpy(&x, p, 8);\n  return (i64)_byteswap_uint64(x);\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  u64 x;\n  memcpy(&x, p, 8);\n  return (i64)__builtin_bswap64(x);\n#elif SQLITE_BYTEORDER==4321\n  i64 x;\n  memcpy(&x, p, 8);\n  return x;\n#else\n  return (i64)(\n    (((u64)p[0]) << 56) +\n    (((u64)p[1]) << 48) +\n    (((u64)p[2]) << 40) +\n    (((u64)p[3]) << 32) +\n    (((u64)p[4]) << 24) +\n    (((u64)p[5]) << 16) +\n    (((u64)p[6]) <<  8) +\n    (((u64)p[7]) <<  0)\n  );\n#endif\n}\n\n/*\n** Functions to serialize a 16 bit integer, 32 bit real number and\n** 64 bit integer. The value returned is the number of bytes written\n** to the argument buffer (always 2, 4 and 8 respectively).\n*/\nstatic void writeInt16(u8 *p, int i){\n  p[0] = (i>> 8)&0xFF;\n  p[1] = (i>> 0)&0xFF;\n}\nstatic int writeCoord(u8 *p, RtreeCoord *pCoord){\n  u32 i;\n  assert( FOUR_BYTE_ALIGNED(p) );\n  assert( sizeof(RtreeCoord)==4 );\n  assert( sizeof(u32)==4 );\n#if SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  i = __builtin_bswap32(pCoord->u);\n  memcpy(p, &i, 4);\n#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  i = _byteswap_ulong(pCoord->u);\n  memcpy(p, &i, 4);\n#elif SQLITE_BYTEORDER==4321\n  i = pCoord->u;\n  memcpy(p, &i, 4);\n#else\n  i = pCoord->u;\n  p[0] = (i>>24)&0xFF;\n  p[1] = (i>>16)&0xFF;\n  p[2] = (i>> 8)&0xFF;\n  p[3] = (i>> 0)&0xFF;\n#endif\n  return 4;\n}\nstatic int writeInt64(u8 *p, i64 i){\n#if SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n  i = (i64)__builtin_bswap64((u64)i);\n  memcpy(p, &i, 8);\n#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n  i = (i64)_byteswap_uint64((u64)i);\n  memcpy(p, &i, 8);\n#elif SQLITE_BYTEORDER==4321\n  memcpy(p, &i, 8);\n#else\n  p[0] = (i>>56)&0xFF;\n  p[1] = (i>>48)&0xFF;\n  p[2] = (i>>40)&0xFF;\n  p[3] = (i>>32)&0xFF;\n  p[4] = (i>>24)&0xFF;\n  p[5] = (i>>16)&0xFF;\n  p[6] = (i>> 8)&0xFF;\n  p[7] = (i>> 0)&0xFF;\n#endif\n  return 8;\n}\n\n/*\n** Increment the reference count of node p.\n*/\nstatic void nodeReference(RtreeNode *p){\n  if( p ){\n    assert( p->nRef>0 );\n    p->nRef++;\n  }\n}\n\n/*\n** Clear the content of node p (set all bytes to 0x00).\n*/\nstatic void nodeZero(Rtree *pRtree, RtreeNode *p){\n  memset(&p->zData[2], 0, pRtree->iNodeSize-2);\n  p->isDirty = 1;\n}\n\n/*\n** Given a node number iNode, return the corresponding key to use\n** in the Rtree.aHash table.\n*/\nstatic unsigned int nodeHash(i64 iNode){\n  return ((unsigned)iNode) % HASHSIZE;\n}\n\n/*\n** Search the node hash table for node iNode. If found, return a pointer\n** to it. Otherwise, return 0.\n*/\nstatic RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){\n  RtreeNode *p;\n  for(p=pRtree->aHash[nodeHash(iNode)]; p && p->iNode!=iNode; p=p->pNext);\n  return p;\n}\n\n/*\n** Add node pNode to the node hash table.\n*/\nstatic void nodeHashInsert(Rtree *pRtree, RtreeNode *pNode){\n  int iHash;\n  assert( pNode->pNext==0 );\n  iHash = nodeHash(pNode->iNode);\n  pNode->pNext = pRtree->aHash[iHash];\n  pRtree->aHash[iHash] = pNode;\n}\n\n/*\n** Remove node pNode from the node hash table.\n*/\nstatic void nodeHashDelete(Rtree *pRtree, RtreeNode *pNode){\n  RtreeNode **pp;\n  if( pNode->iNode!=0 ){\n    pp = &pRtree->aHash[nodeHash(pNode->iNode)];\n    for( ; (*pp)!=pNode; pp = &(*pp)->pNext){ assert(*pp); }\n    *pp = pNode->pNext;\n    pNode->pNext = 0;\n  }\n}\n\n/*\n** Allocate and return new r-tree node. Initially, (RtreeNode.iNode==0),\n** indicating that node has not yet been assigned a node number. It is\n** assigned a node number when nodeWrite() is called to write the\n** node contents out to the database.\n*/\nstatic RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){\n  RtreeNode *pNode;\n  pNode = (RtreeNode *)sqlite3_malloc64(sizeof(RtreeNode) + pRtree->iNodeSize);\n  if( pNode ){\n    memset(pNode, 0, sizeof(RtreeNode) + pRtree->iNodeSize);\n    pNode->zData = (u8 *)&pNode[1];\n    pNode->nRef = 1;\n    pRtree->nNodeRef++;\n    pNode->pParent = pParent;\n    pNode->isDirty = 1;\n    nodeReference(pParent);\n  }\n  return pNode;\n}\n\n/*\n** Clear the Rtree.pNodeBlob object\n*/\nstatic void nodeBlobReset(Rtree *pRtree){\n  sqlite3_blob *pBlob = pRtree->pNodeBlob;\n  pRtree->pNodeBlob = 0;\n  sqlite3_blob_close(pBlob);\n}\n\n/*\n** Obtain a reference to an r-tree node.\n*/\nstatic int nodeAcquire(\n  Rtree *pRtree,             /* R-tree structure */\n  i64 iNode,                 /* Node number to load */\n  RtreeNode *pParent,        /* Either the parent node or NULL */\n  RtreeNode **ppNode         /* OUT: Acquired node */\n){\n  int rc = SQLITE_OK;\n  RtreeNode *pNode = 0;\n\n  /* Check if the requested node is already in the hash table. If so,\n  ** increase its reference count and return it.\n  */\n  if( (pNode = nodeHashLookup(pRtree, iNode))!=0 ){\n    if( pParent && ALWAYS(pParent!=pNode->pParent) ){\n      RTREE_IS_CORRUPT(pRtree);\n      return SQLITE_CORRUPT_VTAB;\n    }\n    pNode->nRef++;\n    *ppNode = pNode;\n    return SQLITE_OK;\n  }\n\n  if( pRtree->pNodeBlob ){\n    sqlite3_blob *pBlob = pRtree->pNodeBlob;\n    pRtree->pNodeBlob = 0;\n    rc = sqlite3_blob_reopen(pBlob, iNode);\n    pRtree->pNodeBlob = pBlob;\n    if( rc ){\n      nodeBlobReset(pRtree);\n      if( rc==SQLITE_NOMEM ) return SQLITE_NOMEM;\n    }\n  }\n  if( pRtree->pNodeBlob==0 ){\n    rc = sqlite3_blob_open(pRtree->db, pRtree->zDb, pRtree->zNodeName,\n                           \"data\", iNode, 0,\n                           &pRtree->pNodeBlob);\n  }\n  if( rc ){\n    *ppNode = 0;\n    /* If unable to open an sqlite3_blob on the desired row, that can only\n    ** be because the shadow tables hold erroneous data. */\n    if( rc==SQLITE_ERROR ){\n      rc = SQLITE_CORRUPT_VTAB;\n      RTREE_IS_CORRUPT(pRtree);\n    }\n  }else if( pRtree->iNodeSize==sqlite3_blob_bytes(pRtree->pNodeBlob) ){\n    pNode = (RtreeNode *)sqlite3_malloc64(sizeof(RtreeNode)+pRtree->iNodeSize);\n    if( !pNode ){\n      rc = SQLITE_NOMEM;\n    }else{\n      pNode->pParent = pParent;\n      pNode->zData = (u8 *)&pNode[1];\n      pNode->nRef = 1;\n      pRtree->nNodeRef++;\n      pNode->iNode = iNode;\n      pNode->isDirty = 0;\n      pNode->pNext = 0;\n      rc = sqlite3_blob_read(pRtree->pNodeBlob, pNode->zData,\n                             pRtree->iNodeSize, 0);\n    }\n  }\n\n  /* If the root node was just loaded, set pRtree->iDepth to the height\n  ** of the r-tree structure. A height of zero means all data is stored on\n  ** the root node. A height of one means the children of the root node\n  ** are the leaves, and so on. If the depth as specified on the root node\n  ** is greater than RTREE_MAX_DEPTH, the r-tree structure must be corrupt.\n  */\n  if( rc==SQLITE_OK && pNode && iNode==1 ){\n    pRtree->iDepth = readInt16(pNode->zData);\n    if( pRtree->iDepth>RTREE_MAX_DEPTH ){\n      rc = SQLITE_CORRUPT_VTAB;\n      RTREE_IS_CORRUPT(pRtree);\n    }\n  }\n\n  /* If no error has occurred so far, check if the \"number of entries\"\n  ** field on the node is too large. If so, set the return code to\n  ** SQLITE_CORRUPT_VTAB.\n  */\n  if( pNode && rc==SQLITE_OK ){\n    if( NCELL(pNode)>((pRtree->iNodeSize-4)/pRtree->nBytesPerCell) ){\n      rc = SQLITE_CORRUPT_VTAB;\n      RTREE_IS_CORRUPT(pRtree);\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    if( pNode!=0 ){\n      nodeReference(pParent);\n      nodeHashInsert(pRtree, pNode);\n    }else{\n      rc = SQLITE_CORRUPT_VTAB;\n      RTREE_IS_CORRUPT(pRtree);\n    }\n    *ppNode = pNode;\n  }else{\n    nodeBlobReset(pRtree);\n    if( pNode ){\n      pRtree->nNodeRef--;\n      sqlite3_free(pNode);\n    }\n    *ppNode = 0;\n  }\n\n  return rc;\n}\n\n/*\n** Overwrite cell iCell of node pNode with the contents of pCell.\n*/\nstatic void nodeOverwriteCell(\n  Rtree *pRtree,             /* The overall R-Tree */\n  RtreeNode *pNode,          /* The node into which the cell is to be written */\n  RtreeCell *pCell,          /* The cell to write */\n  int iCell                  /* Index into pNode into which pCell is written */\n){\n  int ii;\n  u8 *p = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];\n  p += writeInt64(p, pCell->iRowid);\n  for(ii=0; ii<pRtree->nDim2; ii++){\n    p += writeCoord(p, &pCell->aCoord[ii]);\n  }\n  pNode->isDirty = 1;\n}\n\n/*\n** Remove the cell with index iCell from node pNode.\n*/\nstatic void nodeDeleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell){\n  u8 *pDst = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];\n  u8 *pSrc = &pDst[pRtree->nBytesPerCell];\n  int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;\n  memmove(pDst, pSrc, nByte);\n  writeInt16(&pNode->zData[2], NCELL(pNode)-1);\n  pNode->isDirty = 1;\n}\n\n/*\n** Insert the contents of cell pCell into node pNode. If the insert\n** is successful, return SQLITE_OK.\n**\n** If there is not enough free space in pNode, return SQLITE_FULL.\n*/\nstatic int nodeInsertCell(\n  Rtree *pRtree,                /* The overall R-Tree */\n  RtreeNode *pNode,             /* Write new cell into this node */\n  RtreeCell *pCell              /* The cell to be inserted */\n){\n  int nCell;                    /* Current number of cells in pNode */\n  int nMaxCell;                 /* Maximum number of cells for pNode */\n\n  nMaxCell = (pRtree->iNodeSize-4)/pRtree->nBytesPerCell;\n  nCell = NCELL(pNode);\n\n  assert( nCell<=nMaxCell );\n  if( nCell<nMaxCell ){\n    nodeOverwriteCell(pRtree, pNode, pCell, nCell);\n    writeInt16(&pNode->zData[2], nCell+1);\n    pNode->isDirty = 1;\n  }\n\n  return (nCell==nMaxCell);\n}\n\n/*\n** If the node is dirty, write it out to the database.\n*/\nstatic int nodeWrite(Rtree *pRtree, RtreeNode *pNode){\n  int rc = SQLITE_OK;\n  if( pNode->isDirty ){\n    sqlite3_stmt *p = pRtree->pWriteNode;\n    if( pNode->iNode ){\n      sqlite3_bind_int64(p, 1, pNode->iNode);\n    }else{\n      sqlite3_bind_null(p, 1);\n    }\n    sqlite3_bind_blob(p, 2, pNode->zData, pRtree->iNodeSize, SQLITE_STATIC);\n    sqlite3_step(p);\n    pNode->isDirty = 0;\n    rc = sqlite3_reset(p);\n    sqlite3_bind_null(p, 2);\n    if( pNode->iNode==0 && rc==SQLITE_OK ){\n      pNode->iNode = sqlite3_last_insert_rowid(pRtree->db);\n      nodeHashInsert(pRtree, pNode);\n    }\n  }\n  return rc;\n}\n\n/*\n** Release a reference to a node. If the node is dirty and the reference\n** count drops to zero, the node data is written to the database.\n*/\nstatic int nodeRelease(Rtree *pRtree, RtreeNode *pNode){\n  int rc = SQLITE_OK;\n  if( pNode ){\n    assert( pNode->nRef>0 );\n    assert( pRtree->nNodeRef>0 );\n    pNode->nRef--;\n    if( pNode->nRef==0 ){\n      pRtree->nNodeRef--;\n      if( pNode->iNode==1 ){\n        pRtree->iDepth = -1;\n      }\n      if( pNode->pParent ){\n        rc = nodeRelease(pRtree, pNode->pParent);\n      }\n      if( rc==SQLITE_OK ){\n        rc = nodeWrite(pRtree, pNode);\n      }\n      nodeHashDelete(pRtree, pNode);\n      sqlite3_free(pNode);\n    }\n  }\n  return rc;\n}\n\n/*\n** Return the 64-bit integer value associated with cell iCell of\n** node pNode. If pNode is a leaf node, this is a rowid. If it is\n** an internal node, then the 64-bit integer is a child page number.\n*/\nstatic i64 nodeGetRowid(\n  Rtree *pRtree,       /* The overall R-Tree */\n  RtreeNode *pNode,    /* The node from which to extract the ID */\n  int iCell            /* The cell index from which to extract the ID */\n){\n  assert( iCell<NCELL(pNode) );\n  return readInt64(&pNode->zData[4 + pRtree->nBytesPerCell*iCell]);\n}\n\n/*\n** Return coordinate iCoord from cell iCell in node pNode.\n*/\nstatic void nodeGetCoord(\n  Rtree *pRtree,               /* The overall R-Tree */\n  RtreeNode *pNode,            /* The node from which to extract a coordinate */\n  int iCell,                   /* The index of the cell within the node */\n  int iCoord,                  /* Which coordinate to extract */\n  RtreeCoord *pCoord           /* OUT: Space to write result to */\n){\n  assert( iCell<NCELL(pNode) );\n  readCoord(&pNode->zData[12 + pRtree->nBytesPerCell*iCell + 4*iCoord], pCoord);\n}\n\n/*\n** Deserialize cell iCell of node pNode. Populate the structure pointed\n** to by pCell with the results.\n*/\nstatic void nodeGetCell(\n  Rtree *pRtree,               /* The overall R-Tree */\n  RtreeNode *pNode,            /* The node containing the cell to be read */\n  int iCell,                   /* Index of the cell within the node */\n  RtreeCell *pCell             /* OUT: Write the cell contents here */\n){\n  u8 *pData;\n  RtreeCoord *pCoord;\n  int ii = 0;\n  pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);\n  pData = pNode->zData + (12 + pRtree->nBytesPerCell*iCell);\n  pCoord = pCell->aCoord;\n  do{\n    readCoord(pData, &pCoord[ii]);\n    readCoord(pData+4, &pCoord[ii+1]);\n    pData += 8;\n    ii += 2;\n  }while( ii<pRtree->nDim2 );\n}\n\n\n/* Forward declaration for the function that does the work of\n** the virtual table module xCreate() and xConnect() methods.\n*/\nstatic int rtreeInit(\n  sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int\n);\n\n/*\n** Rtree virtual table module xCreate method.\n*/\nstatic int rtreeCreate(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 1);\n}\n\n/*\n** Rtree virtual table module xConnect method.\n*/\nstatic int rtreeConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 0);\n}\n\n/*\n** Increment the r-tree reference count.\n*/\nstatic void rtreeReference(Rtree *pRtree){\n  pRtree->nBusy++;\n}\n\n/*\n** Decrement the r-tree reference count. When the reference count reaches\n** zero the structure is deleted.\n*/\nstatic void rtreeRelease(Rtree *pRtree){\n  pRtree->nBusy--;\n  if( pRtree->nBusy==0 ){\n    pRtree->inWrTrans = 0;\n    assert( pRtree->nCursor==0 );\n    nodeBlobReset(pRtree);\n    assert( pRtree->nNodeRef==0 || pRtree->bCorrupt );\n    sqlite3_finalize(pRtree->pWriteNode);\n    sqlite3_finalize(pRtree->pDeleteNode);\n    sqlite3_finalize(pRtree->pReadRowid);\n    sqlite3_finalize(pRtree->pWriteRowid);\n    sqlite3_finalize(pRtree->pDeleteRowid);\n    sqlite3_finalize(pRtree->pReadParent);\n    sqlite3_finalize(pRtree->pWriteParent);\n    sqlite3_finalize(pRtree->pDeleteParent);\n    sqlite3_finalize(pRtree->pWriteAux);\n    sqlite3_free(pRtree->zReadAuxSql);\n    sqlite3_free(pRtree);\n  }\n}\n\n/*\n** Rtree virtual table module xDisconnect method.\n*/\nstatic int rtreeDisconnect(sqlite3_vtab *pVtab){\n  rtreeRelease((Rtree *)pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** Rtree virtual table module xDestroy method.\n*/\nstatic int rtreeDestroy(sqlite3_vtab *pVtab){\n  Rtree *pRtree = (Rtree *)pVtab;\n  int rc;\n  char *zCreate = sqlite3_mprintf(\n    \"DROP TABLE '%q'.'%q_node';\"\n    \"DROP TABLE '%q'.'%q_rowid';\"\n    \"DROP TABLE '%q'.'%q_parent';\",\n    pRtree->zDb, pRtree->zName,\n    pRtree->zDb, pRtree->zName,\n    pRtree->zDb, pRtree->zName\n  );\n  if( !zCreate ){\n    rc = SQLITE_NOMEM;\n  }else{\n    nodeBlobReset(pRtree);\n    rc = sqlite3_exec(pRtree->db, zCreate, 0, 0, 0);\n    sqlite3_free(zCreate);\n  }\n  if( rc==SQLITE_OK ){\n    rtreeRelease(pRtree);\n  }\n\n  return rc;\n}\n\n/*\n** Rtree virtual table module xOpen method.\n*/\nstatic int rtreeOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){\n  int rc = SQLITE_NOMEM;\n  Rtree *pRtree = (Rtree *)pVTab;\n  RtreeCursor *pCsr;\n\n  pCsr = (RtreeCursor *)sqlite3_malloc64(sizeof(RtreeCursor));\n  if( pCsr ){\n    memset(pCsr, 0, sizeof(RtreeCursor));\n    pCsr->base.pVtab = pVTab;\n    rc = SQLITE_OK;\n    pRtree->nCursor++;\n  }\n  *ppCursor = (sqlite3_vtab_cursor *)pCsr;\n\n  return rc;\n}\n\n\n/*\n** Reset a cursor back to its initial state.\n*/\nstatic void resetCursor(RtreeCursor *pCsr){\n  Rtree *pRtree = (Rtree *)(pCsr->base.pVtab);\n  int ii;\n  sqlite3_stmt *pStmt;\n  if( pCsr->aConstraint ){\n    int i;                        /* Used to iterate through constraint array */\n    for(i=0; i<pCsr->nConstraint; i++){\n      sqlite3_rtree_query_info *pInfo = pCsr->aConstraint[i].pInfo;\n      if( pInfo ){\n        if( pInfo->xDelUser ) pInfo->xDelUser(pInfo->pUser);\n        sqlite3_free(pInfo);\n      }\n    }\n    sqlite3_free(pCsr->aConstraint);\n    pCsr->aConstraint = 0;\n  }\n  for(ii=0; ii<RTREE_CACHE_SZ; ii++) nodeRelease(pRtree, pCsr->aNode[ii]);\n  sqlite3_free(pCsr->aPoint);\n  pStmt = pCsr->pReadAux;\n  memset(pCsr, 0, sizeof(RtreeCursor));\n  pCsr->base.pVtab = (sqlite3_vtab*)pRtree;\n  pCsr->pReadAux = pStmt;\n\n  /* The following will only fail if the previous sqlite3_step() call failed,\n  ** in which case the error has already been caught. This statement never\n  ** encounters an error within an sqlite3_column_xxx() function, as it\n  ** calls sqlite3_column_value(), which does not use malloc(). So it is safe\n  ** to ignore the error code here.  */\n  sqlite3_reset(pStmt);\n}\n\n/*\n** Rtree virtual table module xClose method.\n*/\nstatic int rtreeClose(sqlite3_vtab_cursor *cur){\n  Rtree *pRtree = (Rtree *)(cur->pVtab);\n  RtreeCursor *pCsr = (RtreeCursor *)cur;\n  assert( pRtree->nCursor>0 );\n  resetCursor(pCsr);\n  sqlite3_finalize(pCsr->pReadAux);\n  sqlite3_free(pCsr);\n  pRtree->nCursor--;\n  if( pRtree->nCursor==0 && pRtree->inWrTrans==0 ){\n    nodeBlobReset(pRtree);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Rtree virtual table module xEof method.\n**\n** Return non-zero if the cursor does not currently point to a valid\n** record (i.e if the scan has finished), or zero otherwise.\n*/\nstatic int rtreeEof(sqlite3_vtab_cursor *cur){\n  RtreeCursor *pCsr = (RtreeCursor *)cur;\n  return pCsr->atEOF;\n}\n\n/*\n** Convert raw bits from the on-disk RTree record into a coordinate value.\n** The on-disk format is big-endian and needs to be converted for little-\n** endian platforms.  The on-disk record stores integer coordinates if\n** eInt is true and it stores 32-bit floating point records if eInt is\n** false.  a[] is the four bytes of the on-disk record to be decoded.\n** Store the results in \"r\".\n**\n** There are five versions of this macro.  The last one is generic.  The\n** other four are various architectures-specific optimizations.\n*/\n#if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300\n#define RTREE_DECODE_COORD(eInt, a, r) {                        \\\n    RtreeCoord c;    /* Coordinate decoded */                   \\\n    c.u = _byteswap_ulong(*(u32*)a);                            \\\n    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \\\n}\n#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000\n#define RTREE_DECODE_COORD(eInt, a, r) {                        \\\n    RtreeCoord c;    /* Coordinate decoded */                   \\\n    c.u = __builtin_bswap32(*(u32*)a);                          \\\n    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \\\n}\n#elif SQLITE_BYTEORDER==1234\n#define RTREE_DECODE_COORD(eInt, a, r) {                        \\\n    RtreeCoord c;    /* Coordinate decoded */                   \\\n    memcpy(&c.u,a,4);                                           \\\n    c.u = ((c.u>>24)&0xff)|((c.u>>8)&0xff00)|                   \\\n          ((c.u&0xff)<<24)|((c.u&0xff00)<<8);                   \\\n    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \\\n}\n#elif SQLITE_BYTEORDER==4321\n#define RTREE_DECODE_COORD(eInt, a, r) {                        \\\n    RtreeCoord c;    /* Coordinate decoded */                   \\\n    memcpy(&c.u,a,4);                                           \\\n    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \\\n}\n#else\n#define RTREE_DECODE_COORD(eInt, a, r) {                        \\\n    RtreeCoord c;    /* Coordinate decoded */                   \\\n    c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16)                     \\\n           +((u32)a[2]<<8) + a[3];                              \\\n    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \\\n}\n#endif\n\n/*\n** Check the RTree node or entry given by pCellData and p against the MATCH\n** constraint pConstraint.\n*/\nstatic int rtreeCallbackConstraint(\n  RtreeConstraint *pConstraint,  /* The constraint to test */\n  int eInt,                      /* True if RTree holding integer coordinates */\n  u8 *pCellData,                 /* Raw cell content */\n  RtreeSearchPoint *pSearch,     /* Container of this cell */\n  sqlite3_rtree_dbl *prScore,    /* OUT: score for the cell */\n  int *peWithin                  /* OUT: visibility of the cell */\n){\n  sqlite3_rtree_query_info *pInfo = pConstraint->pInfo; /* Callback info */\n  int nCoord = pInfo->nCoord;                           /* No. of coordinates */\n  int rc;                                             /* Callback return code */\n  RtreeCoord c;                                       /* Translator union */\n  sqlite3_rtree_dbl aCoord[RTREE_MAX_DIMENSIONS*2];   /* Decoded coordinates */\n\n  assert( pConstraint->op==RTREE_MATCH || pConstraint->op==RTREE_QUERY );\n  assert( nCoord==2 || nCoord==4 || nCoord==6 || nCoord==8 || nCoord==10 );\n\n  if( pConstraint->op==RTREE_QUERY && pSearch->iLevel==1 ){\n    pInfo->iRowid = readInt64(pCellData);\n  }\n  pCellData += 8;\n#ifndef SQLITE_RTREE_INT_ONLY\n  if( eInt==0 ){\n    switch( nCoord ){\n      case 10:  readCoord(pCellData+36, &c); aCoord[9] = c.f;\n                readCoord(pCellData+32, &c); aCoord[8] = c.f;\n      case 8:   readCoord(pCellData+28, &c); aCoord[7] = c.f;\n                readCoord(pCellData+24, &c); aCoord[6] = c.f;\n      case 6:   readCoord(pCellData+20, &c); aCoord[5] = c.f;\n                readCoord(pCellData+16, &c); aCoord[4] = c.f;\n      case 4:   readCoord(pCellData+12, &c); aCoord[3] = c.f;\n                readCoord(pCellData+8,  &c); aCoord[2] = c.f;\n      default:  readCoord(pCellData+4,  &c); aCoord[1] = c.f;\n                readCoord(pCellData,    &c); aCoord[0] = c.f;\n    }\n  }else\n#endif\n  {\n    switch( nCoord ){\n      case 10:  readCoord(pCellData+36, &c); aCoord[9] = c.i;\n                readCoord(pCellData+32, &c); aCoord[8] = c.i;\n      case 8:   readCoord(pCellData+28, &c); aCoord[7] = c.i;\n                readCoord(pCellData+24, &c); aCoord[6] = c.i;\n      case 6:   readCoord(pCellData+20, &c); aCoord[5] = c.i;\n                readCoord(pCellData+16, &c); aCoord[4] = c.i;\n      case 4:   readCoord(pCellData+12, &c); aCoord[3] = c.i;\n                readCoord(pCellData+8,  &c); aCoord[2] = c.i;\n      default:  readCoord(pCellData+4,  &c); aCoord[1] = c.i;\n                readCoord(pCellData,    &c); aCoord[0] = c.i;\n    }\n  }\n  if( pConstraint->op==RTREE_MATCH ){\n    int eWithin = 0;\n    rc = pConstraint->u.xGeom((sqlite3_rtree_geometry*)pInfo,\n                              nCoord, aCoord, &eWithin);\n    if( eWithin==0 ) *peWithin = NOT_WITHIN;\n    *prScore = RTREE_ZERO;\n  }else{\n    pInfo->aCoord = aCoord;\n    pInfo->iLevel = pSearch->iLevel - 1;\n    pInfo->rScore = pInfo->rParentScore = pSearch->rScore;\n    pInfo->eWithin = pInfo->eParentWithin = pSearch->eWithin;\n    rc = pConstraint->u.xQueryFunc(pInfo);\n    if( pInfo->eWithin<*peWithin ) *peWithin = pInfo->eWithin;\n    if( pInfo->rScore<*prScore || *prScore<RTREE_ZERO ){\n      *prScore = pInfo->rScore;\n    }\n  }\n  return rc;\n}\n\n/*\n** Check the internal RTree node given by pCellData against constraint p.\n** If this constraint cannot be satisfied by any child within the node,\n** set *peWithin to NOT_WITHIN.\n*/\nstatic void rtreeNonleafConstraint(\n  RtreeConstraint *p,        /* The constraint to test */\n  int eInt,                  /* True if RTree holds integer coordinates */\n  u8 *pCellData,             /* Raw cell content as appears on disk */\n  int *peWithin              /* Adjust downward, as appropriate */\n){\n  sqlite3_rtree_dbl val;     /* Coordinate value convert to a double */\n\n  /* p->iCoord might point to either a lower or upper bound coordinate\n  ** in a coordinate pair.  But make pCellData point to the lower bound.\n  */\n  pCellData += 8 + 4*(p->iCoord&0xfe);\n\n  assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE\n      || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_TRUE\n      || p->op==RTREE_FALSE );\n  assert( FOUR_BYTE_ALIGNED(pCellData) );\n  switch( p->op ){\n    case RTREE_TRUE:  return;   /* Always satisfied */\n    case RTREE_FALSE: break;    /* Never satisfied */\n    case RTREE_EQ:\n      RTREE_DECODE_COORD(eInt, pCellData, val);\n      /* val now holds the lower bound of the coordinate pair */\n      if( p->u.rValue>=val ){\n        pCellData += 4;\n        RTREE_DECODE_COORD(eInt, pCellData, val);\n        /* val now holds the upper bound of the coordinate pair */\n        if( p->u.rValue<=val ) return;\n      }\n      break;\n    case RTREE_LE:\n    case RTREE_LT:\n      RTREE_DECODE_COORD(eInt, pCellData, val);\n      /* val now holds the lower bound of the coordinate pair */\n      if( p->u.rValue>=val ) return;\n      break;\n\n    default:\n      pCellData += 4;\n      RTREE_DECODE_COORD(eInt, pCellData, val);\n      /* val now holds the upper bound of the coordinate pair */\n      if( p->u.rValue<=val ) return;\n      break;\n  }\n  *peWithin = NOT_WITHIN;\n}\n\n/*\n** Check the leaf RTree cell given by pCellData against constraint p.\n** If this constraint is not satisfied, set *peWithin to NOT_WITHIN.\n** If the constraint is satisfied, leave *peWithin unchanged.\n**\n** The constraint is of the form:  xN op $val\n**\n** The op is given by p->op.  The xN is p->iCoord-th coordinate in\n** pCellData.  $val is given by p->u.rValue.\n*/\nstatic void rtreeLeafConstraint(\n  RtreeConstraint *p,        /* The constraint to test */\n  int eInt,                  /* True if RTree holds integer coordinates */\n  u8 *pCellData,             /* Raw cell content as appears on disk */\n  int *peWithin              /* Adjust downward, as appropriate */\n){\n  RtreeDValue xN;      /* Coordinate value converted to a double */\n\n  assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE\n      || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_TRUE\n      || p->op==RTREE_FALSE );\n  pCellData += 8 + p->iCoord*4;\n  assert( FOUR_BYTE_ALIGNED(pCellData) );\n  RTREE_DECODE_COORD(eInt, pCellData, xN);\n  switch( p->op ){\n    case RTREE_TRUE:  return;   /* Always satisfied */\n    case RTREE_FALSE: break;    /* Never satisfied */\n    case RTREE_LE:    if( xN <= p->u.rValue ) return;  break;\n    case RTREE_LT:    if( xN <  p->u.rValue ) return;  break;\n    case RTREE_GE:    if( xN >= p->u.rValue ) return;  break;\n    case RTREE_GT:    if( xN >  p->u.rValue ) return;  break;\n    default:          if( xN == p->u.rValue ) return;  break;\n  }\n  *peWithin = NOT_WITHIN;\n}\n\n/*\n** One of the cells in node pNode is guaranteed to have a 64-bit\n** integer value equal to iRowid. Return the index of this cell.\n*/\nstatic int nodeRowidIndex(\n  Rtree *pRtree,\n  RtreeNode *pNode,\n  i64 iRowid,\n  int *piIndex\n){\n  int ii;\n  int nCell = NCELL(pNode);\n  assert( nCell<200 );\n  for(ii=0; ii<nCell; ii++){\n    if( nodeGetRowid(pRtree, pNode, ii)==iRowid ){\n      *piIndex = ii;\n      return SQLITE_OK;\n    }\n  }\n  RTREE_IS_CORRUPT(pRtree);\n  return SQLITE_CORRUPT_VTAB;\n}\n\n/*\n** Return the index of the cell containing a pointer to node pNode\n** in its parent. If pNode is the root node, return -1.\n*/\nstatic int nodeParentIndex(Rtree *pRtree, RtreeNode *pNode, int *piIndex){\n  RtreeNode *pParent = pNode->pParent;\n  if( ALWAYS(pParent) ){\n    return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);\n  }else{\n    *piIndex = -1;\n    return SQLITE_OK;\n  }\n}\n\n/*\n** Compare two search points.  Return negative, zero, or positive if the first\n** is less than, equal to, or greater than the second.\n**\n** The rScore is the primary key.  Smaller rScore values come first.\n** If the rScore is a tie, then use iLevel as the tie breaker with smaller\n** iLevel values coming first.  In this way, if rScore is the same for all\n** SearchPoints, then iLevel becomes the deciding factor and the result\n** is a depth-first search, which is the desired default behavior.\n*/\nstatic int rtreeSearchPointCompare(\n  const RtreeSearchPoint *pA,\n  const RtreeSearchPoint *pB\n){\n  if( pA->rScore<pB->rScore ) return -1;\n  if( pA->rScore>pB->rScore ) return +1;\n  if( pA->iLevel<pB->iLevel ) return -1;\n  if( pA->iLevel>pB->iLevel ) return +1;\n  return 0;\n}\n\n/*\n** Interchange two search points in a cursor.\n*/\nstatic void rtreeSearchPointSwap(RtreeCursor *p, int i, int j){\n  RtreeSearchPoint t = p->aPoint[i];\n  assert( i<j );\n  p->aPoint[i] = p->aPoint[j];\n  p->aPoint[j] = t;\n  i++; j++;\n  if( i<RTREE_CACHE_SZ ){\n    if( j>=RTREE_CACHE_SZ ){\n      nodeRelease(RTREE_OF_CURSOR(p), p->aNode[i]);\n      p->aNode[i] = 0;\n    }else{\n      RtreeNode *pTemp = p->aNode[i];\n      p->aNode[i] = p->aNode[j];\n      p->aNode[j] = pTemp;\n    }\n  }\n}\n\n/*\n** Return the search point with the lowest current score.\n*/\nstatic RtreeSearchPoint *rtreeSearchPointFirst(RtreeCursor *pCur){\n  return pCur->bPoint ? &pCur->sPoint : pCur->nPoint ? pCur->aPoint : 0;\n}\n\n/*\n** Get the RtreeNode for the search point with the lowest score.\n*/\nstatic RtreeNode *rtreeNodeOfFirstSearchPoint(RtreeCursor *pCur, int *pRC){\n  sqlite3_int64 id;\n  int ii = 1 - pCur->bPoint;\n  assert( ii==0 || ii==1 );\n  assert( pCur->bPoint || pCur->nPoint );\n  if( pCur->aNode[ii]==0 ){\n    assert( pRC!=0 );\n    id = ii ? pCur->aPoint[0].id : pCur->sPoint.id;\n    *pRC = nodeAcquire(RTREE_OF_CURSOR(pCur), id, 0, &pCur->aNode[ii]);\n  }\n  return pCur->aNode[ii];\n}\n\n/*\n** Push a new element onto the priority queue\n*/\nstatic RtreeSearchPoint *rtreeEnqueue(\n  RtreeCursor *pCur,    /* The cursor */\n  RtreeDValue rScore,   /* Score for the new search point */\n  u8 iLevel             /* Level for the new search point */\n){\n  int i, j;\n  RtreeSearchPoint *pNew;\n  if( pCur->nPoint>=pCur->nPointAlloc ){\n    int nNew = pCur->nPointAlloc*2 + 8;\n    pNew = sqlite3_realloc64(pCur->aPoint, nNew*sizeof(pCur->aPoint[0]));\n    if( pNew==0 ) return 0;\n    pCur->aPoint = pNew;\n    pCur->nPointAlloc = nNew;\n  }\n  i = pCur->nPoint++;\n  pNew = pCur->aPoint + i;\n  pNew->rScore = rScore;\n  pNew->iLevel = iLevel;\n  assert( iLevel<=RTREE_MAX_DEPTH );\n  while( i>0 ){\n    RtreeSearchPoint *pParent;\n    j = (i-1)/2;\n    pParent = pCur->aPoint + j;\n    if( rtreeSearchPointCompare(pNew, pParent)>=0 ) break;\n    rtreeSearchPointSwap(pCur, j, i);\n    i = j;\n    pNew = pParent;\n  }\n  return pNew;\n}\n\n/*\n** Allocate a new RtreeSearchPoint and return a pointer to it.  Return\n** NULL if malloc fails.\n*/\nstatic RtreeSearchPoint *rtreeSearchPointNew(\n  RtreeCursor *pCur,    /* The cursor */\n  RtreeDValue rScore,   /* Score for the new search point */\n  u8 iLevel             /* Level for the new search point */\n){\n  RtreeSearchPoint *pNew, *pFirst;\n  pFirst = rtreeSearchPointFirst(pCur);\n  pCur->anQueue[iLevel]++;\n  if( pFirst==0\n   || pFirst->rScore>rScore\n   || (pFirst->rScore==rScore && pFirst->iLevel>iLevel)\n  ){\n    if( pCur->bPoint ){\n      int ii;\n      pNew = rtreeEnqueue(pCur, rScore, iLevel);\n      if( pNew==0 ) return 0;\n      ii = (int)(pNew - pCur->aPoint) + 1;\n      assert( ii==1 );\n      if( ALWAYS(ii<RTREE_CACHE_SZ) ){\n        assert( pCur->aNode[ii]==0 );\n        pCur->aNode[ii] = pCur->aNode[0];\n      }else{\n        nodeRelease(RTREE_OF_CURSOR(pCur), pCur->aNode[0]);\n      }\n      pCur->aNode[0] = 0;\n      *pNew = pCur->sPoint;\n    }\n    pCur->sPoint.rScore = rScore;\n    pCur->sPoint.iLevel = iLevel;\n    pCur->bPoint = 1;\n    return &pCur->sPoint;\n  }else{\n    return rtreeEnqueue(pCur, rScore, iLevel);\n  }\n}\n\n#if 0\n/* Tracing routines for the RtreeSearchPoint queue */\nstatic void tracePoint(RtreeSearchPoint *p, int idx, RtreeCursor *pCur){\n  if( idx<0 ){ printf(\" s\"); }else{ printf(\"%2d\", idx); }\n  printf(\" %d.%05lld.%02d %g %d\",\n    p->iLevel, p->id, p->iCell, p->rScore, p->eWithin\n  );\n  idx++;\n  if( idx<RTREE_CACHE_SZ ){\n    printf(\" %p\\n\", pCur->aNode[idx]);\n  }else{\n    printf(\"\\n\");\n  }\n}\nstatic void traceQueue(RtreeCursor *pCur, const char *zPrefix){\n  int ii;\n  printf(\"=== %9s \", zPrefix);\n  if( pCur->bPoint ){\n    tracePoint(&pCur->sPoint, -1, pCur);\n  }\n  for(ii=0; ii<pCur->nPoint; ii++){\n    if( ii>0 || pCur->bPoint ) printf(\"              \");\n    tracePoint(&pCur->aPoint[ii], ii, pCur);\n  }\n}\n# define RTREE_QUEUE_TRACE(A,B) traceQueue(A,B)\n#else\n# define RTREE_QUEUE_TRACE(A,B)   /* no-op */\n#endif\n\n/* Remove the search point with the lowest current score.\n*/\nstatic void rtreeSearchPointPop(RtreeCursor *p){\n  int i, j, k, n;\n  i = 1 - p->bPoint;\n  assert( i==0 || i==1 );\n  if( p->aNode[i] ){\n    nodeRelease(RTREE_OF_CURSOR(p), p->aNode[i]);\n    p->aNode[i] = 0;\n  }\n  if( p->bPoint ){\n    p->anQueue[p->sPoint.iLevel]--;\n    p->bPoint = 0;\n  }else if( ALWAYS(p->nPoint) ){\n    p->anQueue[p->aPoint[0].iLevel]--;\n    n = --p->nPoint;\n    p->aPoint[0] = p->aPoint[n];\n    if( n<RTREE_CACHE_SZ-1 ){\n      p->aNode[1] = p->aNode[n+1];\n      p->aNode[n+1] = 0;\n    }\n    i = 0;\n    while( (j = i*2+1)<n ){\n      k = j+1;\n      if( k<n && rtreeSearchPointCompare(&p->aPoint[k], &p->aPoint[j])<0 ){\n        if( rtreeSearchPointCompare(&p->aPoint[k], &p->aPoint[i])<0 ){\n          rtreeSearchPointSwap(p, i, k);\n          i = k;\n        }else{\n          break;\n        }\n      }else{\n        if( rtreeSearchPointCompare(&p->aPoint[j], &p->aPoint[i])<0 ){\n          rtreeSearchPointSwap(p, i, j);\n          i = j;\n        }else{\n          break;\n        }\n      }\n    }\n  }\n}\n\n\n/*\n** Continue the search on cursor pCur until the front of the queue\n** contains an entry suitable for returning as a result-set row,\n** or until the RtreeSearchPoint queue is empty, indicating that the\n** query has completed.\n*/\nstatic int rtreeStepToLeaf(RtreeCursor *pCur){\n  RtreeSearchPoint *p;\n  Rtree *pRtree = RTREE_OF_CURSOR(pCur);\n  RtreeNode *pNode;\n  int eWithin;\n  int rc = SQLITE_OK;\n  int nCell;\n  int nConstraint = pCur->nConstraint;\n  int ii;\n  int eInt;\n  RtreeSearchPoint x;\n\n  eInt = pRtree->eCoordType==RTREE_COORD_INT32;\n  while( (p = rtreeSearchPointFirst(pCur))!=0 && p->iLevel>0 ){\n    u8 *pCellData;\n    pNode = rtreeNodeOfFirstSearchPoint(pCur, &rc);\n    if( rc ) return rc;\n    nCell = NCELL(pNode);\n    assert( nCell<200 );\n    pCellData = pNode->zData + (4+pRtree->nBytesPerCell*p->iCell);\n    while( p->iCell<nCell ){\n      sqlite3_rtree_dbl rScore = (sqlite3_rtree_dbl)-1;\n      eWithin = FULLY_WITHIN;\n      for(ii=0; ii<nConstraint; ii++){\n        RtreeConstraint *pConstraint = pCur->aConstraint + ii;\n        if( pConstraint->op>=RTREE_MATCH ){\n          rc = rtreeCallbackConstraint(pConstraint, eInt, pCellData, p,\n                                       &rScore, &eWithin);\n          if( rc ) return rc;\n        }else if( p->iLevel==1 ){\n          rtreeLeafConstraint(pConstraint, eInt, pCellData, &eWithin);\n        }else{\n          rtreeNonleafConstraint(pConstraint, eInt, pCellData, &eWithin);\n        }\n        if( eWithin==NOT_WITHIN ){\n          p->iCell++;\n          pCellData += pRtree->nBytesPerCell;\n          break;\n        }\n      }\n      if( eWithin==NOT_WITHIN ) continue;\n      p->iCell++;\n      x.iLevel = p->iLevel - 1;\n      if( x.iLevel ){\n        x.id = readInt64(pCellData);\n        for(ii=0; ii<pCur->nPoint; ii++){\n          if( pCur->aPoint[ii].id==x.id ){\n            RTREE_IS_CORRUPT(pRtree);\n            return SQLITE_CORRUPT_VTAB;\n          }\n        }\n        x.iCell = 0;\n      }else{\n        x.id = p->id;\n        x.iCell = p->iCell - 1;\n      }\n      if( p->iCell>=nCell ){\n        RTREE_QUEUE_TRACE(pCur, \"POP-S:\");\n        rtreeSearchPointPop(pCur);\n      }\n      if( rScore<RTREE_ZERO ) rScore = RTREE_ZERO;\n      p = rtreeSearchPointNew(pCur, rScore, x.iLevel);\n      if( p==0 ) return SQLITE_NOMEM;\n      p->eWithin = (u8)eWithin;\n      p->id = x.id;\n      p->iCell = x.iCell;\n      RTREE_QUEUE_TRACE(pCur, \"PUSH-S:\");\n      break;\n    }\n    if( p->iCell>=nCell ){\n      RTREE_QUEUE_TRACE(pCur, \"POP-Se:\");\n      rtreeSearchPointPop(pCur);\n    }\n  }\n  pCur->atEOF = p==0;\n  return SQLITE_OK;\n}\n\n/*\n** Rtree virtual table module xNext method.\n*/\nstatic int rtreeNext(sqlite3_vtab_cursor *pVtabCursor){\n  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;\n  int rc = SQLITE_OK;\n\n  /* Move to the next entry that matches the configured constraints. */\n  RTREE_QUEUE_TRACE(pCsr, \"POP-Nx:\");\n  if( pCsr->bAuxValid ){\n    pCsr->bAuxValid = 0;\n    sqlite3_reset(pCsr->pReadAux);\n  }\n  rtreeSearchPointPop(pCsr);\n  rc = rtreeStepToLeaf(pCsr);\n  return rc;\n}\n\n/*\n** Rtree virtual table module xRowid method.\n*/\nstatic int rtreeRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *pRowid){\n  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;\n  RtreeSearchPoint *p = rtreeSearchPointFirst(pCsr);\n  int rc = SQLITE_OK;\n  RtreeNode *pNode = rtreeNodeOfFirstSearchPoint(pCsr, &rc);\n  if( rc==SQLITE_OK && ALWAYS(p) ){\n    if( p->iCell>=NCELL(pNode) ){\n      rc = SQLITE_ABORT;\n    }else{\n      *pRowid = nodeGetRowid(RTREE_OF_CURSOR(pCsr), pNode, p->iCell);\n    }\n  }\n  return rc;\n}\n\n/*\n** Rtree virtual table module xColumn method.\n*/\nstatic int rtreeColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){\n  Rtree *pRtree = (Rtree *)cur->pVtab;\n  RtreeCursor *pCsr = (RtreeCursor *)cur;\n  RtreeSearchPoint *p = rtreeSearchPointFirst(pCsr);\n  RtreeCoord c;\n  int rc = SQLITE_OK;\n  RtreeNode *pNode = rtreeNodeOfFirstSearchPoint(pCsr, &rc);\n\n  if( rc ) return rc;\n  if( NEVER(p==0) ) return SQLITE_OK;\n  if( p->iCell>=NCELL(pNode) ) return SQLITE_ABORT;\n  if( i==0 ){\n    sqlite3_result_int64(ctx, nodeGetRowid(pRtree, pNode, p->iCell));\n  }else if( i<=pRtree->nDim2 ){\n    nodeGetCoord(pRtree, pNode, p->iCell, i-1, &c);\n#ifndef SQLITE_RTREE_INT_ONLY\n    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){\n      sqlite3_result_double(ctx, c.f);\n    }else\n#endif\n    {\n      assert( pRtree->eCoordType==RTREE_COORD_INT32 );\n      sqlite3_result_int(ctx, c.i);\n    }\n  }else{\n    if( !pCsr->bAuxValid ){\n      if( pCsr->pReadAux==0 ){\n        rc = sqlite3_prepare_v3(pRtree->db, pRtree->zReadAuxSql, -1, 0,\n                                &pCsr->pReadAux, 0);\n        if( rc ) return rc;\n      }\n      sqlite3_bind_int64(pCsr->pReadAux, 1,\n          nodeGetRowid(pRtree, pNode, p->iCell));\n      rc = sqlite3_step(pCsr->pReadAux);\n      if( rc==SQLITE_ROW ){\n        pCsr->bAuxValid = 1;\n      }else{\n        sqlite3_reset(pCsr->pReadAux);\n        if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n        return rc;\n      }\n    }\n    sqlite3_result_value(ctx,\n         sqlite3_column_value(pCsr->pReadAux, i - pRtree->nDim2 + 1));\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Use nodeAcquire() to obtain the leaf node containing the record with\n** rowid iRowid. If successful, set *ppLeaf to point to the node and\n** return SQLITE_OK. If there is no such record in the table, set\n** *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf\n** to zero and return an SQLite error code.\n*/\nstatic int findLeafNode(\n  Rtree *pRtree,              /* RTree to search */\n  i64 iRowid,                 /* The rowid searching for */\n  RtreeNode **ppLeaf,         /* Write the node here */\n  sqlite3_int64 *piNode       /* Write the node-id here */\n){\n  int rc;\n  *ppLeaf = 0;\n  sqlite3_bind_int64(pRtree->pReadRowid, 1, iRowid);\n  if( sqlite3_step(pRtree->pReadRowid)==SQLITE_ROW ){\n    i64 iNode = sqlite3_column_int64(pRtree->pReadRowid, 0);\n    if( piNode ) *piNode = iNode;\n    rc = nodeAcquire(pRtree, iNode, 0, ppLeaf);\n    sqlite3_reset(pRtree->pReadRowid);\n  }else{\n    rc = sqlite3_reset(pRtree->pReadRowid);\n  }\n  return rc;\n}\n\n/*\n** This function is called to configure the RtreeConstraint object passed\n** as the second argument for a MATCH constraint. The value passed as the\n** first argument to this function is the right-hand operand to the MATCH\n** operator.\n*/\nstatic int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){\n  RtreeMatchArg *pBlob, *pSrc;       /* BLOB returned by geometry function */\n  sqlite3_rtree_query_info *pInfo;   /* Callback information */\n\n  pSrc = sqlite3_value_pointer(pValue, \"RtreeMatchArg\");\n  if( pSrc==0 ) return SQLITE_ERROR;\n  pInfo = (sqlite3_rtree_query_info*)\n                sqlite3_malloc64( sizeof(*pInfo)+pSrc->iSize );\n  if( !pInfo ) return SQLITE_NOMEM;\n  memset(pInfo, 0, sizeof(*pInfo));\n  pBlob = (RtreeMatchArg*)&pInfo[1];\n  memcpy(pBlob, pSrc, pSrc->iSize);\n  pInfo->pContext = pBlob->cb.pContext;\n  pInfo->nParam = pBlob->nParam;\n  pInfo->aParam = pBlob->aParam;\n  pInfo->apSqlParam = pBlob->apSqlParam;\n\n  if( pBlob->cb.xGeom ){\n    pCons->u.xGeom = pBlob->cb.xGeom;\n  }else{\n    pCons->op = RTREE_QUERY;\n    pCons->u.xQueryFunc = pBlob->cb.xQueryFunc;\n  }\n  pCons->pInfo = pInfo;\n  return SQLITE_OK;\n}\n\nSQLITE_PRIVATE int sqlite3IntFloatCompare(i64,double);\n\n/*\n** Rtree virtual table module xFilter method.\n*/\nstatic int rtreeFilter(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;\n  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;\n  RtreeNode *pRoot = 0;\n  int ii;\n  int rc = SQLITE_OK;\n  int iCell = 0;\n\n  rtreeReference(pRtree);\n\n  /* Reset the cursor to the same state as rtreeOpen() leaves it in. */\n  resetCursor(pCsr);\n\n  pCsr->iStrategy = idxNum;\n  if( idxNum==1 ){\n    /* Special case - lookup by rowid. */\n    RtreeNode *pLeaf;        /* Leaf on which the required cell resides */\n    RtreeSearchPoint *p;     /* Search point for the leaf */\n    i64 iRowid = sqlite3_value_int64(argv[0]);\n    i64 iNode = 0;\n    int eType = sqlite3_value_numeric_type(argv[0]);\n    if( eType==SQLITE_INTEGER\n     || (eType==SQLITE_FLOAT\n         && 0==sqlite3IntFloatCompare(iRowid,sqlite3_value_double(argv[0])))\n    ){\n      rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);\n    }else{\n      rc = SQLITE_OK;\n      pLeaf = 0;\n    }\n    if( rc==SQLITE_OK && pLeaf!=0 ){\n      p = rtreeSearchPointNew(pCsr, RTREE_ZERO, 0);\n      assert( p!=0 );  /* Always returns pCsr->sPoint */\n      pCsr->aNode[0] = pLeaf;\n      p->id = iNode;\n      p->eWithin = PARTLY_WITHIN;\n      rc = nodeRowidIndex(pRtree, pLeaf, iRowid, &iCell);\n      p->iCell = (u8)iCell;\n      RTREE_QUEUE_TRACE(pCsr, \"PUSH-F1:\");\n    }else{\n      pCsr->atEOF = 1;\n    }\n  }else{\n    /* Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array\n    ** with the configured constraints.\n    */\n    rc = nodeAcquire(pRtree, 1, 0, &pRoot);\n    if( rc==SQLITE_OK && argc>0 ){\n      pCsr->aConstraint = sqlite3_malloc64(sizeof(RtreeConstraint)*argc);\n      pCsr->nConstraint = argc;\n      if( !pCsr->aConstraint ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memset(pCsr->aConstraint, 0, sizeof(RtreeConstraint)*argc);\n        memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));\n        assert( (idxStr==0 && argc==0)\n                || (idxStr && (int)strlen(idxStr)==argc*2) );\n        for(ii=0; ii<argc; ii++){\n          RtreeConstraint *p = &pCsr->aConstraint[ii];\n          int eType = sqlite3_value_numeric_type(argv[ii]);\n          p->op = idxStr[ii*2];\n          p->iCoord = idxStr[ii*2+1]-'0';\n          if( p->op>=RTREE_MATCH ){\n            /* A MATCH operator. The right-hand-side must be a blob that\n            ** can be cast into an RtreeMatchArg object. One created using\n            ** an sqlite3_rtree_geometry_callback() SQL user function.\n            */\n            rc = deserializeGeometry(argv[ii], p);\n            if( rc!=SQLITE_OK ){\n              break;\n            }\n            p->pInfo->nCoord = pRtree->nDim2;\n            p->pInfo->anQueue = pCsr->anQueue;\n            p->pInfo->mxLevel = pRtree->iDepth + 1;\n          }else if( eType==SQLITE_INTEGER ){\n            sqlite3_int64 iVal = sqlite3_value_int64(argv[ii]);\n#ifdef SQLITE_RTREE_INT_ONLY\n            p->u.rValue = iVal;\n#else\n            p->u.rValue = (double)iVal;\n            if( iVal>=((sqlite3_int64)1)<<48\n             || iVal<=-(((sqlite3_int64)1)<<48)\n            ){\n              if( p->op==RTREE_LT ) p->op = RTREE_LE;\n              if( p->op==RTREE_GT ) p->op = RTREE_GE;\n            }\n#endif\n          }else if( eType==SQLITE_FLOAT ){\n#ifdef SQLITE_RTREE_INT_ONLY\n            p->u.rValue = sqlite3_value_int64(argv[ii]);\n#else\n            p->u.rValue = sqlite3_value_double(argv[ii]);\n#endif\n          }else{\n            p->u.rValue = RTREE_ZERO;\n            if( eType==SQLITE_NULL ){\n              p->op = RTREE_FALSE;\n            }else if( p->op==RTREE_LT || p->op==RTREE_LE ){\n              p->op = RTREE_TRUE;\n            }else{\n              p->op = RTREE_FALSE;\n            }\n          }\n        }\n      }\n    }\n    if( rc==SQLITE_OK ){\n      RtreeSearchPoint *pNew;\n      assert( pCsr->bPoint==0 );  /* Due to the resetCursor() call above */\n      pNew = rtreeSearchPointNew(pCsr, RTREE_ZERO, (u8)(pRtree->iDepth+1));\n      if( NEVER(pNew==0) ){       /* Because pCsr->bPoint was FALSE */\n        return SQLITE_NOMEM;\n      }\n      pNew->id = 1;\n      pNew->iCell = 0;\n      pNew->eWithin = PARTLY_WITHIN;\n      assert( pCsr->bPoint==1 );\n      pCsr->aNode[0] = pRoot;\n      pRoot = 0;\n      RTREE_QUEUE_TRACE(pCsr, \"PUSH-Fm:\");\n      rc = rtreeStepToLeaf(pCsr);\n    }\n  }\n\n  nodeRelease(pRtree, pRoot);\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n/*\n** Rtree virtual table module xBestIndex method. There are three\n** table scan strategies to choose from (in order from most to\n** least desirable):\n**\n**   idxNum     idxStr        Strategy\n**   ------------------------------------------------\n**     1        Unused        Direct lookup by rowid.\n**     2        See below     R-tree query or full-table scan.\n**   ------------------------------------------------\n**\n** If strategy 1 is used, then idxStr is not meaningful. If strategy\n** 2 is used, idxStr is formatted to contain 2 bytes for each\n** constraint used. The first two bytes of idxStr correspond to\n** the constraint in sqlite3_index_info.aConstraintUsage[] with\n** (argvIndex==1) etc.\n**\n** The first of each pair of bytes in idxStr identifies the constraint\n** operator as follows:\n**\n**   Operator    Byte Value\n**   ----------------------\n**      =        0x41 ('A')\n**     <=        0x42 ('B')\n**      <        0x43 ('C')\n**     >=        0x44 ('D')\n**      >        0x45 ('E')\n**   MATCH       0x46 ('F')\n**   ----------------------\n**\n** The second of each pair of bytes identifies the coordinate column\n** to which the constraint applies. The leftmost coordinate column\n** is 'a', the second from the left 'b' etc.\n*/\nstatic int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){\n  Rtree *pRtree = (Rtree*)tab;\n  int rc = SQLITE_OK;\n  int ii;\n  int bMatch = 0;                 /* True if there exists a MATCH constraint */\n  i64 nRow;                       /* Estimated rows returned by this scan */\n\n  int iIdx = 0;\n  char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];\n  memset(zIdxStr, 0, sizeof(zIdxStr));\n\n  /* Check if there exists a MATCH constraint - even an unusable one. If there\n  ** is, do not consider the lookup-by-rowid plan as using such a plan would\n  ** require the VDBE to evaluate the MATCH constraint, which is not currently\n  ** possible. */\n  for(ii=0; ii<pIdxInfo->nConstraint; ii++){\n    if( pIdxInfo->aConstraint[ii].op==SQLITE_INDEX_CONSTRAINT_MATCH ){\n      bMatch = 1;\n    }\n  }\n\n  assert( pIdxInfo->idxStr==0 );\n  for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){\n    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];\n\n    if( bMatch==0 && p->usable\n     && p->iColumn<=0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ\n    ){\n      /* We have an equality constraint on the rowid. Use strategy 1. */\n      int jj;\n      for(jj=0; jj<ii; jj++){\n        pIdxInfo->aConstraintUsage[jj].argvIndex = 0;\n        pIdxInfo->aConstraintUsage[jj].omit = 0;\n      }\n      pIdxInfo->idxNum = 1;\n      pIdxInfo->aConstraintUsage[ii].argvIndex = 1;\n      pIdxInfo->aConstraintUsage[jj].omit = 1;\n\n      /* This strategy involves a two rowid lookups on an B-Tree structures\n      ** and then a linear search of an R-Tree node. This should be\n      ** considered almost as quick as a direct rowid lookup (for which\n      ** sqlite uses an internal cost of 0.0). It is expected to return\n      ** a single row.\n      */\n      pIdxInfo->estimatedCost = 30.0;\n      pIdxInfo->estimatedRows = 1;\n      pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;\n      return SQLITE_OK;\n    }\n\n    if( p->usable\n    && ((p->iColumn>0 && p->iColumn<=pRtree->nDim2)\n        || p->op==SQLITE_INDEX_CONSTRAINT_MATCH)\n    ){\n      u8 op;\n      u8 doOmit = 1;\n      switch( p->op ){\n        case SQLITE_INDEX_CONSTRAINT_EQ:    op = RTREE_EQ;    doOmit = 0; break;\n        case SQLITE_INDEX_CONSTRAINT_GT:    op = RTREE_GT;    doOmit = 0; break;\n        case SQLITE_INDEX_CONSTRAINT_LE:    op = RTREE_LE;    break;\n        case SQLITE_INDEX_CONSTRAINT_LT:    op = RTREE_LT;    doOmit = 0; break;\n        case SQLITE_INDEX_CONSTRAINT_GE:    op = RTREE_GE;    break;\n        case SQLITE_INDEX_CONSTRAINT_MATCH: op = RTREE_MATCH; break;\n        default:                            op = 0;           break;\n      }\n      if( op ){\n        zIdxStr[iIdx++] = op;\n        zIdxStr[iIdx++] = (char)(p->iColumn - 1 + '0');\n        pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);\n        pIdxInfo->aConstraintUsage[ii].omit = doOmit;\n      }\n    }\n  }\n\n  pIdxInfo->idxNum = 2;\n  pIdxInfo->needToFreeIdxStr = 1;\n  if( iIdx>0 ){\n    pIdxInfo->idxStr = sqlite3_malloc( iIdx+1 );\n    if( pIdxInfo->idxStr==0 ){\n      return SQLITE_NOMEM;\n    }\n    memcpy(pIdxInfo->idxStr, zIdxStr, iIdx+1);\n  }\n\n  nRow = pRtree->nRowEst >> (iIdx/2);\n  pIdxInfo->estimatedCost = (double)6.0 * (double)nRow;\n  pIdxInfo->estimatedRows = nRow;\n\n  return rc;\n}\n\n/*\n** Return the N-dimensional volume of the cell stored in *p.\n*/\nstatic RtreeDValue cellArea(Rtree *pRtree, RtreeCell *p){\n  RtreeDValue area = (RtreeDValue)1;\n  assert( pRtree->nDim>=1 && pRtree->nDim<=5 );\n#ifndef SQLITE_RTREE_INT_ONLY\n  if( pRtree->eCoordType==RTREE_COORD_REAL32 ){\n    switch( pRtree->nDim ){\n      case 5:  area  = p->aCoord[9].f - p->aCoord[8].f;\n      case 4:  area *= p->aCoord[7].f - p->aCoord[6].f;\n      case 3:  area *= p->aCoord[5].f - p->aCoord[4].f;\n      case 2:  area *= p->aCoord[3].f - p->aCoord[2].f;\n      default: area *= p->aCoord[1].f - p->aCoord[0].f;\n    }\n  }else\n#endif\n  {\n    switch( pRtree->nDim ){\n      case 5:  area  = (i64)p->aCoord[9].i - (i64)p->aCoord[8].i;\n      case 4:  area *= (i64)p->aCoord[7].i - (i64)p->aCoord[6].i;\n      case 3:  area *= (i64)p->aCoord[5].i - (i64)p->aCoord[4].i;\n      case 2:  area *= (i64)p->aCoord[3].i - (i64)p->aCoord[2].i;\n      default: area *= (i64)p->aCoord[1].i - (i64)p->aCoord[0].i;\n    }\n  }\n  return area;\n}\n\n/*\n** Return the margin length of cell p. The margin length is the sum\n** of the objects size in each dimension.\n*/\nstatic RtreeDValue cellMargin(Rtree *pRtree, RtreeCell *p){\n  RtreeDValue margin = 0;\n  int ii = pRtree->nDim2 - 2;\n  do{\n    margin += (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));\n    ii -= 2;\n  }while( ii>=0 );\n  return margin;\n}\n\n/*\n** Store the union of cells p1 and p2 in p1.\n*/\nstatic void cellUnion(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){\n  int ii = 0;\n  if( pRtree->eCoordType==RTREE_COORD_REAL32 ){\n    do{\n      p1->aCoord[ii].f = MIN(p1->aCoord[ii].f, p2->aCoord[ii].f);\n      p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f);\n      ii += 2;\n    }while( ii<pRtree->nDim2 );\n  }else{\n    do{\n      p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i);\n      p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i);\n      ii += 2;\n    }while( ii<pRtree->nDim2 );\n  }\n}\n\n/*\n** Return true if the area covered by p2 is a subset of the area covered\n** by p1. False otherwise.\n*/\nstatic int cellContains(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){\n  int ii;\n  if( pRtree->eCoordType==RTREE_COORD_INT32 ){\n    for(ii=0; ii<pRtree->nDim2; ii+=2){\n      RtreeCoord *a1 = &p1->aCoord[ii];\n      RtreeCoord *a2 = &p2->aCoord[ii];\n      if( a2[0].i<a1[0].i || a2[1].i>a1[1].i ) return 0;\n    }\n  }else{\n    for(ii=0; ii<pRtree->nDim2; ii+=2){\n      RtreeCoord *a1 = &p1->aCoord[ii];\n      RtreeCoord *a2 = &p2->aCoord[ii];\n      if( a2[0].f<a1[0].f || a2[1].f>a1[1].f ) return 0;\n    }\n  }\n  return 1;\n}\n\nstatic RtreeDValue cellOverlap(\n  Rtree *pRtree,\n  RtreeCell *p,\n  RtreeCell *aCell,\n  int nCell\n){\n  int ii;\n  RtreeDValue overlap = RTREE_ZERO;\n  for(ii=0; ii<nCell; ii++){\n    int jj;\n    RtreeDValue o = (RtreeDValue)1;\n    for(jj=0; jj<pRtree->nDim2; jj+=2){\n      RtreeDValue x1, x2;\n      x1 = MAX(DCOORD(p->aCoord[jj]), DCOORD(aCell[ii].aCoord[jj]));\n      x2 = MIN(DCOORD(p->aCoord[jj+1]), DCOORD(aCell[ii].aCoord[jj+1]));\n      if( x2<x1 ){\n        o = (RtreeDValue)0;\n        break;\n      }else{\n        o = o * (x2-x1);\n      }\n    }\n    overlap += o;\n  }\n  return overlap;\n}\n\n\n/*\n** This function implements the ChooseLeaf algorithm from Gutman[84].\n** ChooseSubTree in r*tree terminology.\n*/\nstatic int ChooseLeaf(\n  Rtree *pRtree,               /* Rtree table */\n  RtreeCell *pCell,            /* Cell to insert into rtree */\n  int iHeight,                 /* Height of sub-tree rooted at pCell */\n  RtreeNode **ppLeaf           /* OUT: Selected leaf page */\n){\n  int rc;\n  int ii;\n  RtreeNode *pNode = 0;\n  rc = nodeAcquire(pRtree, 1, 0, &pNode);\n\n  for(ii=0; rc==SQLITE_OK && ii<(pRtree->iDepth-iHeight); ii++){\n    int iCell;\n    sqlite3_int64 iBest = 0;\n    int bFound = 0;\n    RtreeDValue fMinGrowth = RTREE_ZERO;\n    RtreeDValue fMinArea = RTREE_ZERO;\n    int nCell = NCELL(pNode);\n    RtreeNode *pChild = 0;\n\n    /* First check to see if there is are any cells in pNode that completely\n    ** contains pCell.  If two or more cells in pNode completely contain pCell\n    ** then pick the smallest.\n    */\n    for(iCell=0; iCell<nCell; iCell++){\n      RtreeCell cell;\n      nodeGetCell(pRtree, pNode, iCell, &cell);\n      if( cellContains(pRtree, &cell, pCell) ){\n        RtreeDValue area = cellArea(pRtree, &cell);\n        if( bFound==0 || area<fMinArea ){\n          iBest = cell.iRowid;\n          fMinArea = area;\n          bFound = 1;\n        }\n      }\n    }\n    if( !bFound ){\n      /* No cells of pNode will completely contain pCell.  So pick the\n      ** cell of pNode that grows by the least amount when pCell is added.\n      ** Break ties by selecting the smaller cell.\n      */\n      for(iCell=0; iCell<nCell; iCell++){\n        RtreeCell cell;\n        RtreeDValue growth;\n        RtreeDValue area;\n        nodeGetCell(pRtree, pNode, iCell, &cell);\n        area = cellArea(pRtree, &cell);\n        cellUnion(pRtree, &cell, pCell);\n        growth = cellArea(pRtree, &cell)-area;\n        if( iCell==0\n         || growth<fMinGrowth\n         || (growth==fMinGrowth && area<fMinArea)\n        ){\n          fMinGrowth = growth;\n          fMinArea = area;\n          iBest = cell.iRowid;\n        }\n      }\n    }\n\n    rc = nodeAcquire(pRtree, iBest, pNode, &pChild);\n    nodeRelease(pRtree, pNode);\n    pNode = pChild;\n  }\n\n  *ppLeaf = pNode;\n  return rc;\n}\n\n/*\n** A cell with the same content as pCell has just been inserted into\n** the node pNode. This function updates the bounding box cells in\n** all ancestor elements.\n*/\nstatic int AdjustTree(\n  Rtree *pRtree,                    /* Rtree table */\n  RtreeNode *pNode,                 /* Adjust ancestry of this node. */\n  RtreeCell *pCell                  /* This cell was just inserted */\n){\n  RtreeNode *p = pNode;\n  int cnt = 0;\n  int rc;\n  while( p->pParent ){\n    RtreeNode *pParent = p->pParent;\n    RtreeCell cell;\n    int iCell;\n\n    cnt++;\n    if( NEVER(cnt>100) ){\n      RTREE_IS_CORRUPT(pRtree);\n      return SQLITE_CORRUPT_VTAB;\n    }\n    rc = nodeParentIndex(pRtree, p, &iCell);\n    if( NEVER(rc!=SQLITE_OK) ){\n      RTREE_IS_CORRUPT(pRtree);\n      return SQLITE_CORRUPT_VTAB;\n    }\n\n    nodeGetCell(pRtree, pParent, iCell, &cell);\n    if( !cellContains(pRtree, &cell, pCell) ){\n      cellUnion(pRtree, &cell, pCell);\n      nodeOverwriteCell(pRtree, pParent, &cell, iCell);\n    }\n\n    p = pParent;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Write mapping (iRowid->iNode) to the <rtree>_rowid table.\n*/\nstatic int rowidWrite(Rtree *pRtree, sqlite3_int64 iRowid, sqlite3_int64 iNode){\n  sqlite3_bind_int64(pRtree->pWriteRowid, 1, iRowid);\n  sqlite3_bind_int64(pRtree->pWriteRowid, 2, iNode);\n  sqlite3_step(pRtree->pWriteRowid);\n  return sqlite3_reset(pRtree->pWriteRowid);\n}\n\n/*\n** Write mapping (iNode->iPar) to the <rtree>_parent table.\n*/\nstatic int parentWrite(Rtree *pRtree, sqlite3_int64 iNode, sqlite3_int64 iPar){\n  sqlite3_bind_int64(pRtree->pWriteParent, 1, iNode);\n  sqlite3_bind_int64(pRtree->pWriteParent, 2, iPar);\n  sqlite3_step(pRtree->pWriteParent);\n  return sqlite3_reset(pRtree->pWriteParent);\n}\n\nstatic int rtreeInsertCell(Rtree *, RtreeNode *, RtreeCell *, int);\n\n\n\n/*\n** Arguments aIdx, aCell and aSpare all point to arrays of size\n** nIdx. The aIdx array contains the set of integers from 0 to\n** (nIdx-1) in no particular order. This function sorts the values\n** in aIdx according to dimension iDim of the cells in aCell. The\n** minimum value of dimension iDim is considered first, the\n** maximum used to break ties.\n**\n** The aSpare array is used as temporary working space by the\n** sorting algorithm.\n*/\nstatic void SortByDimension(\n  Rtree *pRtree,\n  int *aIdx,\n  int nIdx,\n  int iDim,\n  RtreeCell *aCell,\n  int *aSpare\n){\n  if( nIdx>1 ){\n\n    int iLeft = 0;\n    int iRight = 0;\n\n    int nLeft = nIdx/2;\n    int nRight = nIdx-nLeft;\n    int *aLeft = aIdx;\n    int *aRight = &aIdx[nLeft];\n\n    SortByDimension(pRtree, aLeft, nLeft, iDim, aCell, aSpare);\n    SortByDimension(pRtree, aRight, nRight, iDim, aCell, aSpare);\n\n    memcpy(aSpare, aLeft, sizeof(int)*nLeft);\n    aLeft = aSpare;\n    while( iLeft<nLeft || iRight<nRight ){\n      RtreeDValue xleft1 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2]);\n      RtreeDValue xleft2 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2+1]);\n      RtreeDValue xright1 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2]);\n      RtreeDValue xright2 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2+1]);\n      if( (iLeft!=nLeft) && ((iRight==nRight)\n       || (xleft1<xright1)\n       || (xleft1==xright1 && xleft2<xright2)\n      )){\n        aIdx[iLeft+iRight] = aLeft[iLeft];\n        iLeft++;\n      }else{\n        aIdx[iLeft+iRight] = aRight[iRight];\n        iRight++;\n      }\n    }\n\n#if 0\n    /* Check that the sort worked */\n    {\n      int jj;\n      for(jj=1; jj<nIdx; jj++){\n        RtreeDValue xleft1 = aCell[aIdx[jj-1]].aCoord[iDim*2];\n        RtreeDValue xleft2 = aCell[aIdx[jj-1]].aCoord[iDim*2+1];\n        RtreeDValue xright1 = aCell[aIdx[jj]].aCoord[iDim*2];\n        RtreeDValue xright2 = aCell[aIdx[jj]].aCoord[iDim*2+1];\n        assert( xleft1<=xright1 && (xleft1<xright1 || xleft2<=xright2) );\n      }\n    }\n#endif\n  }\n}\n\n/*\n** Implementation of the R*-tree variant of SplitNode from Beckman[1990].\n*/\nstatic int splitNodeStartree(\n  Rtree *pRtree,\n  RtreeCell *aCell,\n  int nCell,\n  RtreeNode *pLeft,\n  RtreeNode *pRight,\n  RtreeCell *pBboxLeft,\n  RtreeCell *pBboxRight\n){\n  int **aaSorted;\n  int *aSpare;\n  int ii;\n\n  int iBestDim = 0;\n  int iBestSplit = 0;\n  RtreeDValue fBestMargin = RTREE_ZERO;\n\n  sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));\n\n  aaSorted = (int **)sqlite3_malloc64(nByte);\n  if( !aaSorted ){\n    return SQLITE_NOMEM;\n  }\n\n  aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];\n  memset(aaSorted, 0, nByte);\n  for(ii=0; ii<pRtree->nDim; ii++){\n    int jj;\n    aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];\n    for(jj=0; jj<nCell; jj++){\n      aaSorted[ii][jj] = jj;\n    }\n    SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);\n  }\n\n  for(ii=0; ii<pRtree->nDim; ii++){\n    RtreeDValue margin = RTREE_ZERO;\n    RtreeDValue fBestOverlap = RTREE_ZERO;\n    RtreeDValue fBestArea = RTREE_ZERO;\n    int iBestLeft = 0;\n    int nLeft;\n\n    for(\n      nLeft=RTREE_MINCELLS(pRtree);\n      nLeft<=(nCell-RTREE_MINCELLS(pRtree));\n      nLeft++\n    ){\n      RtreeCell left;\n      RtreeCell right;\n      int kk;\n      RtreeDValue overlap;\n      RtreeDValue area;\n\n      memcpy(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell));\n      memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));\n      for(kk=1; kk<(nCell-1); kk++){\n        if( kk<nLeft ){\n          cellUnion(pRtree, &left, &aCell[aaSorted[ii][kk]]);\n        }else{\n          cellUnion(pRtree, &right, &aCell[aaSorted[ii][kk]]);\n        }\n      }\n      margin += cellMargin(pRtree, &left);\n      margin += cellMargin(pRtree, &right);\n      overlap = cellOverlap(pRtree, &left, &right, 1);\n      area = cellArea(pRtree, &left) + cellArea(pRtree, &right);\n      if( (nLeft==RTREE_MINCELLS(pRtree))\n       || (overlap<fBestOverlap)\n       || (overlap==fBestOverlap && area<fBestArea)\n      ){\n        iBestLeft = nLeft;\n        fBestOverlap = overlap;\n        fBestArea = area;\n      }\n    }\n\n    if( ii==0 || margin<fBestMargin ){\n      iBestDim = ii;\n      fBestMargin = margin;\n      iBestSplit = iBestLeft;\n    }\n  }\n\n  memcpy(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell));\n  memcpy(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell));\n  for(ii=0; ii<nCell; ii++){\n    RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;\n    RtreeCell *pBbox = (ii<iBestSplit)?pBboxLeft:pBboxRight;\n    RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];\n    nodeInsertCell(pRtree, pTarget, pCell);\n    cellUnion(pRtree, pBbox, pCell);\n  }\n\n  sqlite3_free(aaSorted);\n  return SQLITE_OK;\n}\n\n\nstatic int updateMapping(\n  Rtree *pRtree,\n  i64 iRowid,\n  RtreeNode *pNode,\n  int iHeight\n){\n  int (*xSetMapping)(Rtree *, sqlite3_int64, sqlite3_int64);\n  xSetMapping = ((iHeight==0)?rowidWrite:parentWrite);\n  if( iHeight>0 ){\n    RtreeNode *pChild = nodeHashLookup(pRtree, iRowid);\n    RtreeNode *p;\n    for(p=pNode; p; p=p->pParent){\n      if( p==pChild ) return SQLITE_CORRUPT_VTAB;\n    }\n    if( pChild ){\n      nodeRelease(pRtree, pChild->pParent);\n      nodeReference(pNode);\n      pChild->pParent = pNode;\n    }\n  }\n  if( NEVER(pNode==0) ) return SQLITE_ERROR;\n  return xSetMapping(pRtree, iRowid, pNode->iNode);\n}\n\nstatic int SplitNode(\n  Rtree *pRtree,\n  RtreeNode *pNode,\n  RtreeCell *pCell,\n  int iHeight\n){\n  int i;\n  int newCellIsRight = 0;\n\n  int rc = SQLITE_OK;\n  int nCell = NCELL(pNode);\n  RtreeCell *aCell;\n  int *aiUsed;\n\n  RtreeNode *pLeft = 0;\n  RtreeNode *pRight = 0;\n\n  RtreeCell leftbbox;\n  RtreeCell rightbbox;\n\n  /* Allocate an array and populate it with a copy of pCell and\n  ** all cells from node pLeft. Then zero the original node.\n  */\n  aCell = sqlite3_malloc64((sizeof(RtreeCell)+sizeof(int))*(nCell+1));\n  if( !aCell ){\n    rc = SQLITE_NOMEM;\n    goto splitnode_out;\n  }\n  aiUsed = (int *)&aCell[nCell+1];\n  memset(aiUsed, 0, sizeof(int)*(nCell+1));\n  for(i=0; i<nCell; i++){\n    nodeGetCell(pRtree, pNode, i, &aCell[i]);\n  }\n  nodeZero(pRtree, pNode);\n  memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));\n  nCell++;\n\n  if( pNode->iNode==1 ){\n    pRight = nodeNew(pRtree, pNode);\n    pLeft = nodeNew(pRtree, pNode);\n    pRtree->iDepth++;\n    pNode->isDirty = 1;\n    writeInt16(pNode->zData, pRtree->iDepth);\n  }else{\n    pLeft = pNode;\n    pRight = nodeNew(pRtree, pLeft->pParent);\n    pLeft->nRef++;\n  }\n\n  if( !pLeft || !pRight ){\n    rc = SQLITE_NOMEM;\n    goto splitnode_out;\n  }\n\n  memset(pLeft->zData, 0, pRtree->iNodeSize);\n  memset(pRight->zData, 0, pRtree->iNodeSize);\n\n  rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,\n                         &leftbbox, &rightbbox);\n  if( rc!=SQLITE_OK ){\n    goto splitnode_out;\n  }\n\n  /* Ensure both child nodes have node numbers assigned to them by calling\n  ** nodeWrite(). Node pRight always needs a node number, as it was created\n  ** by nodeNew() above. But node pLeft sometimes already has a node number.\n  ** In this case avoid the all to nodeWrite().\n  */\n  if( SQLITE_OK!=(rc = nodeWrite(pRtree, pRight))\n   || (0==pLeft->iNode && SQLITE_OK!=(rc = nodeWrite(pRtree, pLeft)))\n  ){\n    goto splitnode_out;\n  }\n\n  rightbbox.iRowid = pRight->iNode;\n  leftbbox.iRowid = pLeft->iNode;\n\n  if( pNode->iNode==1 ){\n    rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);\n    if( rc!=SQLITE_OK ){\n      goto splitnode_out;\n    }\n  }else{\n    RtreeNode *pParent = pLeft->pParent;\n    int iCell;\n    rc = nodeParentIndex(pRtree, pLeft, &iCell);\n    if( ALWAYS(rc==SQLITE_OK) ){\n      nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);\n      rc = AdjustTree(pRtree, pParent, &leftbbox);\n      assert( rc==SQLITE_OK );\n    }\n    if( NEVER(rc!=SQLITE_OK) ){\n      goto splitnode_out;\n    }\n  }\n  if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){\n    goto splitnode_out;\n  }\n\n  for(i=0; i<NCELL(pRight); i++){\n    i64 iRowid = nodeGetRowid(pRtree, pRight, i);\n    rc = updateMapping(pRtree, iRowid, pRight, iHeight);\n    if( iRowid==pCell->iRowid ){\n      newCellIsRight = 1;\n    }\n    if( rc!=SQLITE_OK ){\n      goto splitnode_out;\n    }\n  }\n  if( pNode->iNode==1 ){\n    for(i=0; i<NCELL(pLeft); i++){\n      i64 iRowid = nodeGetRowid(pRtree, pLeft, i);\n      rc = updateMapping(pRtree, iRowid, pLeft, iHeight);\n      if( rc!=SQLITE_OK ){\n        goto splitnode_out;\n      }\n    }\n  }else if( newCellIsRight==0 ){\n    rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = nodeRelease(pRtree, pRight);\n    pRight = 0;\n  }\n  if( rc==SQLITE_OK ){\n    rc = nodeRelease(pRtree, pLeft);\n    pLeft = 0;\n  }\n\nsplitnode_out:\n  nodeRelease(pRtree, pRight);\n  nodeRelease(pRtree, pLeft);\n  sqlite3_free(aCell);\n  return rc;\n}\n\n/*\n** If node pLeaf is not the root of the r-tree and its pParent pointer is\n** still NULL, load all ancestor nodes of pLeaf into memory and populate\n** the pLeaf->pParent chain all the way up to the root node.\n**\n** This operation is required when a row is deleted (or updated - an update\n** is implemented as a delete followed by an insert). SQLite provides the\n** rowid of the row to delete, which can be used to find the leaf on which\n** the entry resides (argument pLeaf). Once the leaf is located, this\n** function is called to determine its ancestry.\n*/\nstatic int fixLeafParent(Rtree *pRtree, RtreeNode *pLeaf){\n  int rc = SQLITE_OK;\n  RtreeNode *pChild = pLeaf;\n  while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){\n    int rc2 = SQLITE_OK;          /* sqlite3_reset() return code */\n    sqlite3_bind_int64(pRtree->pReadParent, 1, pChild->iNode);\n    rc = sqlite3_step(pRtree->pReadParent);\n    if( rc==SQLITE_ROW ){\n      RtreeNode *pTest;           /* Used to test for reference loops */\n      i64 iNode;                  /* Node number of parent node */\n\n      /* Before setting pChild->pParent, test that we are not creating a\n      ** loop of references (as we would if, say, pChild==pParent). We don't\n      ** want to do this as it leads to a memory leak when trying to delete\n      ** the referenced counted node structures.\n      */\n      iNode = sqlite3_column_int64(pRtree->pReadParent, 0);\n      for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);\n      if( pTest==0 ){\n        rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);\n      }\n    }\n    rc = sqlite3_reset(pRtree->pReadParent);\n    if( rc==SQLITE_OK ) rc = rc2;\n    if( rc==SQLITE_OK && !pChild->pParent ){\n      RTREE_IS_CORRUPT(pRtree);\n      rc = SQLITE_CORRUPT_VTAB;\n    }\n    pChild = pChild->pParent;\n  }\n  return rc;\n}\n\nstatic int deleteCell(Rtree *, RtreeNode *, int, int);\n\nstatic int removeNode(Rtree *pRtree, RtreeNode *pNode, int iHeight){\n  int rc;\n  int rc2;\n  RtreeNode *pParent = 0;\n  int iCell;\n\n  assert( pNode->nRef==1 );\n\n  /* Remove the entry in the parent cell. */\n  rc = nodeParentIndex(pRtree, pNode, &iCell);\n  if( rc==SQLITE_OK ){\n    pParent = pNode->pParent;\n    pNode->pParent = 0;\n    rc = deleteCell(pRtree, pParent, iCell, iHeight+1);\n    testcase( rc!=SQLITE_OK );\n  }\n  rc2 = nodeRelease(pRtree, pParent);\n  if( rc==SQLITE_OK ){\n    rc = rc2;\n  }\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  /* Remove the xxx_node entry. */\n  sqlite3_bind_int64(pRtree->pDeleteNode, 1, pNode->iNode);\n  sqlite3_step(pRtree->pDeleteNode);\n  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteNode)) ){\n    return rc;\n  }\n\n  /* Remove the xxx_parent entry. */\n  sqlite3_bind_int64(pRtree->pDeleteParent, 1, pNode->iNode);\n  sqlite3_step(pRtree->pDeleteParent);\n  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteParent)) ){\n    return rc;\n  }\n\n  /* Remove the node from the in-memory hash table and link it into\n  ** the Rtree.pDeleted list. Its contents will be re-inserted later on.\n  */\n  nodeHashDelete(pRtree, pNode);\n  pNode->iNode = iHeight;\n  pNode->pNext = pRtree->pDeleted;\n  pNode->nRef++;\n  pRtree->pDeleted = pNode;\n\n  return SQLITE_OK;\n}\n\nstatic int fixBoundingBox(Rtree *pRtree, RtreeNode *pNode){\n  RtreeNode *pParent = pNode->pParent;\n  int rc = SQLITE_OK;\n  if( pParent ){\n    int ii;\n    int nCell = NCELL(pNode);\n    RtreeCell box;                            /* Bounding box for pNode */\n    nodeGetCell(pRtree, pNode, 0, &box);\n    for(ii=1; ii<nCell; ii++){\n      RtreeCell cell;\n      nodeGetCell(pRtree, pNode, ii, &cell);\n      cellUnion(pRtree, &box, &cell);\n    }\n    box.iRowid = pNode->iNode;\n    rc = nodeParentIndex(pRtree, pNode, &ii);\n    if( rc==SQLITE_OK ){\n      nodeOverwriteCell(pRtree, pParent, &box, ii);\n      rc = fixBoundingBox(pRtree, pParent);\n    }\n  }\n  return rc;\n}\n\n/*\n** Delete the cell at index iCell of node pNode. After removing the\n** cell, adjust the r-tree data structure if required.\n*/\nstatic int deleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell, int iHeight){\n  RtreeNode *pParent;\n  int rc;\n\n  if( SQLITE_OK!=(rc = fixLeafParent(pRtree, pNode)) ){\n    return rc;\n  }\n\n  /* Remove the cell from the node. This call just moves bytes around\n  ** the in-memory node image, so it cannot fail.\n  */\n  nodeDeleteCell(pRtree, pNode, iCell);\n\n  /* If the node is not the tree root and now has less than the minimum\n  ** number of cells, remove it from the tree. Otherwise, update the\n  ** cell in the parent node so that it tightly contains the updated\n  ** node.\n  */\n  pParent = pNode->pParent;\n  assert( pParent || pNode->iNode==1 );\n  if( pParent ){\n    if( NCELL(pNode)<RTREE_MINCELLS(pRtree) ){\n      rc = removeNode(pRtree, pNode, iHeight);\n    }else{\n      rc = fixBoundingBox(pRtree, pNode);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Insert cell pCell into node pNode. Node pNode is the head of a\n** subtree iHeight high (leaf nodes have iHeight==0).\n*/\nstatic int rtreeInsertCell(\n  Rtree *pRtree,\n  RtreeNode *pNode,\n  RtreeCell *pCell,\n  int iHeight\n){\n  int rc = SQLITE_OK;\n  if( iHeight>0 ){\n    RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);\n    if( pChild ){\n      nodeRelease(pRtree, pChild->pParent);\n      nodeReference(pNode);\n      pChild->pParent = pNode;\n    }\n  }\n  if( nodeInsertCell(pRtree, pNode, pCell) ){\n    rc = SplitNode(pRtree, pNode, pCell, iHeight);\n  }else{\n    rc = AdjustTree(pRtree, pNode, pCell);\n    if( ALWAYS(rc==SQLITE_OK) ){\n      if( iHeight==0 ){\n        rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);\n      }else{\n        rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);\n      }\n    }\n  }\n  return rc;\n}\n\nstatic int reinsertNodeContent(Rtree *pRtree, RtreeNode *pNode){\n  int ii;\n  int rc = SQLITE_OK;\n  int nCell = NCELL(pNode);\n\n  for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){\n    RtreeNode *pInsert;\n    RtreeCell cell;\n    nodeGetCell(pRtree, pNode, ii, &cell);\n\n    /* Find a node to store this cell in. pNode->iNode currently contains\n    ** the height of the sub-tree headed by the cell.\n    */\n    rc = ChooseLeaf(pRtree, &cell, (int)pNode->iNode, &pInsert);\n    if( rc==SQLITE_OK ){\n      int rc2;\n      rc = rtreeInsertCell(pRtree, pInsert, &cell, (int)pNode->iNode);\n      rc2 = nodeRelease(pRtree, pInsert);\n      if( rc==SQLITE_OK ){\n        rc = rc2;\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Select a currently unused rowid for a new r-tree record.\n*/\nstatic int rtreeNewRowid(Rtree *pRtree, i64 *piRowid){\n  int rc;\n  sqlite3_bind_null(pRtree->pWriteRowid, 1);\n  sqlite3_bind_null(pRtree->pWriteRowid, 2);\n  sqlite3_step(pRtree->pWriteRowid);\n  rc = sqlite3_reset(pRtree->pWriteRowid);\n  *piRowid = sqlite3_last_insert_rowid(pRtree->db);\n  return rc;\n}\n\n/*\n** Remove the entry with rowid=iDelete from the r-tree structure.\n*/\nstatic int rtreeDeleteRowid(Rtree *pRtree, sqlite3_int64 iDelete){\n  int rc;                         /* Return code */\n  RtreeNode *pLeaf = 0;           /* Leaf node containing record iDelete */\n  int iCell;                      /* Index of iDelete cell in pLeaf */\n  RtreeNode *pRoot = 0;           /* Root node of rtree structure */\n\n\n  /* Obtain a reference to the root node to initialize Rtree.iDepth */\n  rc = nodeAcquire(pRtree, 1, 0, &pRoot);\n\n  /* Obtain a reference to the leaf node that contains the entry\n  ** about to be deleted.\n  */\n  if( rc==SQLITE_OK ){\n    rc = findLeafNode(pRtree, iDelete, &pLeaf, 0);\n  }\n\n#ifdef CORRUPT_DB\n  assert( pLeaf!=0 || rc!=SQLITE_OK || CORRUPT_DB );\n#endif\n\n  /* Delete the cell in question from the leaf node. */\n  if( rc==SQLITE_OK && pLeaf ){\n    int rc2;\n    rc = nodeRowidIndex(pRtree, pLeaf, iDelete, &iCell);\n    if( rc==SQLITE_OK ){\n      rc = deleteCell(pRtree, pLeaf, iCell, 0);\n    }\n    rc2 = nodeRelease(pRtree, pLeaf);\n    if( rc==SQLITE_OK ){\n      rc = rc2;\n    }\n  }\n\n  /* Delete the corresponding entry in the <rtree>_rowid table. */\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pRtree->pDeleteRowid, 1, iDelete);\n    sqlite3_step(pRtree->pDeleteRowid);\n    rc = sqlite3_reset(pRtree->pDeleteRowid);\n  }\n\n  /* Check if the root node now has exactly one child. If so, remove\n  ** it, schedule the contents of the child for reinsertion and\n  ** reduce the tree height by one.\n  **\n  ** This is equivalent to copying the contents of the child into\n  ** the root node (the operation that Gutman's paper says to perform\n  ** in this scenario).\n  */\n  if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){\n    int rc2;\n    RtreeNode *pChild = 0;\n    i64 iChild = nodeGetRowid(pRtree, pRoot, 0);\n    rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);  /* tag-20210916a */\n    if( rc==SQLITE_OK ){\n      rc = removeNode(pRtree, pChild, pRtree->iDepth-1);\n    }\n    rc2 = nodeRelease(pRtree, pChild);\n    if( rc==SQLITE_OK ) rc = rc2;\n    if( rc==SQLITE_OK ){\n      pRtree->iDepth--;\n      writeInt16(pRoot->zData, pRtree->iDepth);\n      pRoot->isDirty = 1;\n    }\n  }\n\n  /* Re-insert the contents of any underfull nodes removed from the tree. */\n  for(pLeaf=pRtree->pDeleted; pLeaf; pLeaf=pRtree->pDeleted){\n    if( rc==SQLITE_OK ){\n      rc = reinsertNodeContent(pRtree, pLeaf);\n    }\n    pRtree->pDeleted = pLeaf->pNext;\n    pRtree->nNodeRef--;\n    sqlite3_free(pLeaf);\n  }\n\n  /* Release the reference to the root node. */\n  if( rc==SQLITE_OK ){\n    rc = nodeRelease(pRtree, pRoot);\n  }else{\n    nodeRelease(pRtree, pRoot);\n  }\n\n  return rc;\n}\n\n/*\n** Rounding constants for float->double conversion.\n*/\n#define RNDTOWARDS  (1.0 - 1.0/8388608.0)  /* Round towards zero */\n#define RNDAWAY     (1.0 + 1.0/8388608.0)  /* Round away from zero */\n\n#if !defined(SQLITE_RTREE_INT_ONLY)\n/*\n** Convert an sqlite3_value into an RtreeValue (presumably a float)\n** while taking care to round toward negative or positive, respectively.\n*/\nstatic RtreeValue rtreeValueDown(sqlite3_value *v){\n  double d = sqlite3_value_double(v);\n  float f = (float)d;\n  if( f>d ){\n    f = (float)(d*(d<0 ? RNDAWAY : RNDTOWARDS));\n  }\n  return f;\n}\nstatic RtreeValue rtreeValueUp(sqlite3_value *v){\n  double d = sqlite3_value_double(v);\n  float f = (float)d;\n  if( f<d ){\n    f = (float)(d*(d<0 ? RNDTOWARDS : RNDAWAY));\n  }\n  return f;\n}\n#endif /* !defined(SQLITE_RTREE_INT_ONLY) */\n\n/*\n** A constraint has failed while inserting a row into an rtree table.\n** Assuming no OOM error occurs, this function sets the error message\n** (at pRtree->base.zErrMsg) to an appropriate value and returns\n** SQLITE_CONSTRAINT.\n**\n** Parameter iCol is the index of the leftmost column involved in the\n** constraint failure. If it is 0, then the constraint that failed is\n** the unique constraint on the id column. Otherwise, it is the rtree\n** (c1<=c2) constraint on columns iCol and iCol+1 that has failed.\n**\n** If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT.\n*/\nstatic int rtreeConstraintError(Rtree *pRtree, int iCol){\n  sqlite3_stmt *pStmt = 0;\n  char *zSql;\n  int rc;\n\n  assert( iCol==0 || iCol%2 );\n  zSql = sqlite3_mprintf(\"SELECT * FROM %Q.%Q\", pRtree->zDb, pRtree->zName);\n  if( zSql ){\n    rc = sqlite3_prepare_v2(pRtree->db, zSql, -1, &pStmt, 0);\n  }else{\n    rc = SQLITE_NOMEM;\n  }\n  sqlite3_free(zSql);\n\n  if( rc==SQLITE_OK ){\n    if( iCol==0 ){\n      const char *zCol = sqlite3_column_name(pStmt, 0);\n      pRtree->base.zErrMsg = sqlite3_mprintf(\n          \"UNIQUE constraint failed: %s.%s\", pRtree->zName, zCol\n      );\n    }else{\n      const char *zCol1 = sqlite3_column_name(pStmt, iCol);\n      const char *zCol2 = sqlite3_column_name(pStmt, iCol+1);\n      pRtree->base.zErrMsg = sqlite3_mprintf(\n          \"rtree constraint failed: %s.(%s<=%s)\", pRtree->zName, zCol1, zCol2\n      );\n    }\n  }\n\n  sqlite3_finalize(pStmt);\n  return (rc==SQLITE_OK ? SQLITE_CONSTRAINT : rc);\n}\n\n\n\n/*\n** The xUpdate method for rtree module virtual tables.\n*/\nstatic int rtreeUpdate(\n  sqlite3_vtab *pVtab,\n  int nData,\n  sqlite3_value **aData,\n  sqlite_int64 *pRowid\n){\n  Rtree *pRtree = (Rtree *)pVtab;\n  int rc = SQLITE_OK;\n  RtreeCell cell;                 /* New cell to insert if nData>1 */\n  int bHaveRowid = 0;             /* Set to 1 after new rowid is determined */\n\n  if( pRtree->nNodeRef ){\n    /* Unable to write to the btree while another cursor is reading from it,\n    ** since the write might do a rebalance which would disrupt the read\n    ** cursor. */\n    return SQLITE_LOCKED_VTAB;\n  }\n  rtreeReference(pRtree);\n  assert(nData>=1);\n\n  memset(&cell, 0, sizeof(cell));\n\n  /* Constraint handling. A write operation on an r-tree table may return\n  ** SQLITE_CONSTRAINT for two reasons:\n  **\n  **   1. A duplicate rowid value, or\n  **   2. The supplied data violates the \"x2>=x1\" constraint.\n  **\n  ** In the first case, if the conflict-handling mode is REPLACE, then\n  ** the conflicting row can be removed before proceeding. In the second\n  ** case, SQLITE_CONSTRAINT must be returned regardless of the\n  ** conflict-handling mode specified by the user.\n  */\n  if( nData>1 ){\n    int ii;\n    int nn = nData - 4;\n\n    if( nn > pRtree->nDim2 ) nn = pRtree->nDim2;\n    /* Populate the cell.aCoord[] array. The first coordinate is aData[3].\n    **\n    ** NB: nData can only be less than nDim*2+3 if the rtree is mis-declared\n    ** with \"column\" that are interpreted as table constraints.\n    ** Example:  CREATE VIRTUAL TABLE bad USING rtree(x,y,CHECK(y>5));\n    ** This problem was discovered after years of use, so we silently ignore\n    ** these kinds of misdeclared tables to avoid breaking any legacy.\n    */\n\n#ifndef SQLITE_RTREE_INT_ONLY\n    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){\n      for(ii=0; ii<nn; ii+=2){\n        cell.aCoord[ii].f = rtreeValueDown(aData[ii+3]);\n        cell.aCoord[ii+1].f = rtreeValueUp(aData[ii+4]);\n        if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){\n          rc = rtreeConstraintError(pRtree, ii+1);\n          goto constraint;\n        }\n      }\n    }else\n#endif\n    {\n      for(ii=0; ii<nn; ii+=2){\n        cell.aCoord[ii].i = sqlite3_value_int(aData[ii+3]);\n        cell.aCoord[ii+1].i = sqlite3_value_int(aData[ii+4]);\n        if( cell.aCoord[ii].i>cell.aCoord[ii+1].i ){\n          rc = rtreeConstraintError(pRtree, ii+1);\n          goto constraint;\n        }\n      }\n    }\n\n    /* If a rowid value was supplied, check if it is already present in\n    ** the table. If so, the constraint has failed. */\n    if( sqlite3_value_type(aData[2])!=SQLITE_NULL ){\n      cell.iRowid = sqlite3_value_int64(aData[2]);\n      if( sqlite3_value_type(aData[0])==SQLITE_NULL\n       || sqlite3_value_int64(aData[0])!=cell.iRowid\n      ){\n        int steprc;\n        sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);\n        steprc = sqlite3_step(pRtree->pReadRowid);\n        rc = sqlite3_reset(pRtree->pReadRowid);\n        if( SQLITE_ROW==steprc ){\n          if( sqlite3_vtab_on_conflict(pRtree->db)==SQLITE_REPLACE ){\n            rc = rtreeDeleteRowid(pRtree, cell.iRowid);\n          }else{\n            rc = rtreeConstraintError(pRtree, 0);\n            goto constraint;\n          }\n        }\n      }\n      bHaveRowid = 1;\n    }\n  }\n\n  /* If aData[0] is not an SQL NULL value, it is the rowid of a\n  ** record to delete from the r-tree table. The following block does\n  ** just that.\n  */\n  if( sqlite3_value_type(aData[0])!=SQLITE_NULL ){\n    rc = rtreeDeleteRowid(pRtree, sqlite3_value_int64(aData[0]));\n  }\n\n  /* If the aData[] array contains more than one element, elements\n  ** (aData[2]..aData[argc-1]) contain a new record to insert into\n  ** the r-tree structure.\n  */\n  if( rc==SQLITE_OK && nData>1 ){\n    /* Insert the new record into the r-tree */\n    RtreeNode *pLeaf = 0;\n\n    /* Figure out the rowid of the new row. */\n    if( bHaveRowid==0 ){\n      rc = rtreeNewRowid(pRtree, &cell.iRowid);\n    }\n    *pRowid = cell.iRowid;\n\n    if( rc==SQLITE_OK ){\n      rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);\n    }\n    if( rc==SQLITE_OK ){\n      int rc2;\n      rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);\n      rc2 = nodeRelease(pRtree, pLeaf);\n      if( rc==SQLITE_OK ){\n        rc = rc2;\n      }\n    }\n    if( rc==SQLITE_OK && pRtree->nAux ){\n      sqlite3_stmt *pUp = pRtree->pWriteAux;\n      int jj;\n      sqlite3_bind_int64(pUp, 1, *pRowid);\n      for(jj=0; jj<pRtree->nAux; jj++){\n        sqlite3_bind_value(pUp, jj+2, aData[pRtree->nDim2+3+jj]);\n      }\n      sqlite3_step(pUp);\n      rc = sqlite3_reset(pUp);\n    }\n  }\n\nconstraint:\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n/*\n** Called when a transaction starts.\n*/\nstatic int rtreeBeginTransaction(sqlite3_vtab *pVtab){\n  Rtree *pRtree = (Rtree *)pVtab;\n  assert( pRtree->inWrTrans==0 );\n  pRtree->inWrTrans = 1;\n  return SQLITE_OK;\n}\n\n/*\n** Called when a transaction completes (either by COMMIT or ROLLBACK).\n** The sqlite3_blob object should be released at this point.\n*/\nstatic int rtreeEndTransaction(sqlite3_vtab *pVtab){\n  Rtree *pRtree = (Rtree *)pVtab;\n  pRtree->inWrTrans = 0;\n  nodeBlobReset(pRtree);\n  return SQLITE_OK;\n}\nstatic int rtreeRollback(sqlite3_vtab *pVtab){\n  return rtreeEndTransaction(pVtab);\n}\n\n/*\n** The xRename method for rtree module virtual tables.\n*/\nstatic int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){\n  Rtree *pRtree = (Rtree *)pVtab;\n  int rc = SQLITE_NOMEM;\n  char *zSql = sqlite3_mprintf(\n    \"ALTER TABLE %Q.'%q_node'   RENAME TO \\\"%w_node\\\";\"\n    \"ALTER TABLE %Q.'%q_parent' RENAME TO \\\"%w_parent\\\";\"\n    \"ALTER TABLE %Q.'%q_rowid'  RENAME TO \\\"%w_rowid\\\";\"\n    , pRtree->zDb, pRtree->zName, zNewName\n    , pRtree->zDb, pRtree->zName, zNewName\n    , pRtree->zDb, pRtree->zName, zNewName\n  );\n  if( zSql ){\n    nodeBlobReset(pRtree);\n    rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);\n    sqlite3_free(zSql);\n  }\n  return rc;\n}\n\n/*\n** The xSavepoint method.\n**\n** This module does not need to do anything to support savepoints. However,\n** it uses this hook to close any open blob handle. This is done because a\n** DROP TABLE command - which fortunately always opens a savepoint - cannot\n** succeed if there are any open blob handles. i.e. if the blob handle were\n** not closed here, the following would fail:\n**\n**   BEGIN;\n**     INSERT INTO rtree...\n**     DROP TABLE <tablename>;    -- Would fail with SQLITE_LOCKED\n**   COMMIT;\n*/\nstatic int rtreeSavepoint(sqlite3_vtab *pVtab, int iSavepoint){\n  Rtree *pRtree = (Rtree *)pVtab;\n  u8 iwt = pRtree->inWrTrans;\n  UNUSED_PARAMETER(iSavepoint);\n  pRtree->inWrTrans = 0;\n  nodeBlobReset(pRtree);\n  pRtree->inWrTrans = iwt;\n  return SQLITE_OK;\n}\n\n/*\n** This function populates the pRtree->nRowEst variable with an estimate\n** of the number of rows in the virtual table. If possible, this is based\n** on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST.\n*/\nstatic int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){\n  const char *zFmt = \"SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\";\n  char *zSql;\n  sqlite3_stmt *p;\n  int rc;\n  i64 nRow = RTREE_MIN_ROWEST;\n\n  rc = sqlite3_table_column_metadata(\n      db, pRtree->zDb, \"sqlite_stat1\",0,0,0,0,0,0\n  );\n  if( rc!=SQLITE_OK ){\n    pRtree->nRowEst = RTREE_DEFAULT_ROWEST;\n    return rc==SQLITE_ERROR ? SQLITE_OK : rc;\n  }\n  zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    rc = sqlite3_prepare_v2(db, zSql, -1, &p, 0);\n    if( rc==SQLITE_OK ){\n      if( sqlite3_step(p)==SQLITE_ROW ) nRow = sqlite3_column_int64(p, 0);\n      rc = sqlite3_finalize(p);\n    }\n    sqlite3_free(zSql);\n  }\n  pRtree->nRowEst = MAX(nRow, RTREE_MIN_ROWEST);\n  return rc;\n}\n\n\n/*\n** Return true if zName is the extension on one of the shadow tables used\n** by this module.\n*/\nstatic int rtreeShadowName(const char *zName){\n  static const char *azName[] = {\n    \"node\", \"parent\", \"rowid\"\n  };\n  unsigned int i;\n  for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){\n    if( sqlite3_stricmp(zName, azName[i])==0 ) return 1;\n  }\n  return 0;\n}\n\n/* Forward declaration */\nstatic int rtreeIntegrity(sqlite3_vtab*, const char*, const char*, int, char**);\n\nstatic sqlite3_module rtreeModule = {\n  4,                          /* iVersion */\n  rtreeCreate,                /* xCreate - create a table */\n  rtreeConnect,               /* xConnect - connect to an existing table */\n  rtreeBestIndex,             /* xBestIndex - Determine search strategy */\n  rtreeDisconnect,            /* xDisconnect - Disconnect from a table */\n  rtreeDestroy,               /* xDestroy - Drop a table */\n  rtreeOpen,                  /* xOpen - open a cursor */\n  rtreeClose,                 /* xClose - close a cursor */\n  rtreeFilter,                /* xFilter - configure scan constraints */\n  rtreeNext,                  /* xNext - advance a cursor */\n  rtreeEof,                   /* xEof */\n  rtreeColumn,                /* xColumn - read data */\n  rtreeRowid,                 /* xRowid - read data */\n  rtreeUpdate,                /* xUpdate - write data */\n  rtreeBeginTransaction,      /* xBegin - begin transaction */\n  rtreeEndTransaction,        /* xSync - sync transaction */\n  rtreeEndTransaction,        /* xCommit - commit transaction */\n  rtreeRollback,              /* xRollback - rollback transaction */\n  0,                          /* xFindFunction - function overloading */\n  rtreeRename,                /* xRename - rename the table */\n  rtreeSavepoint,             /* xSavepoint */\n  0,                          /* xRelease */\n  0,                          /* xRollbackTo */\n  rtreeShadowName,            /* xShadowName */\n  rtreeIntegrity              /* xIntegrity */\n};\n\nstatic int rtreeSqlInit(\n  Rtree *pRtree,\n  sqlite3 *db,\n  const char *zDb,\n  const char *zPrefix,\n  int isCreate\n){\n  int rc = SQLITE_OK;\n\n  #define N_STATEMENT 8\n  static const char *azSql[N_STATEMENT] = {\n    /* Write the xxx_node table */\n    \"INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\",\n    \"DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\",\n\n    /* Read and write the xxx_rowid table */\n    \"SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\",\n    \"INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\",\n    \"DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\",\n\n    /* Read and write the xxx_parent table */\n    \"SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\",\n    \"INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\",\n    \"DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\"\n  };\n  sqlite3_stmt **appStmt[N_STATEMENT];\n  int i;\n  const int f = SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_NO_VTAB;\n\n  pRtree->db = db;\n\n  if( isCreate ){\n    char *zCreate;\n    sqlite3_str *p = sqlite3_str_new(db);\n    int ii;\n    sqlite3_str_appendf(p,\n       \"CREATE TABLE \\\"%w\\\".\\\"%w_rowid\\\"(rowid INTEGER PRIMARY KEY,nodeno\",\n       zDb, zPrefix);\n    for(ii=0; ii<pRtree->nAux; ii++){\n      sqlite3_str_appendf(p,\",a%d\",ii);\n    }\n    sqlite3_str_appendf(p,\n      \");CREATE TABLE \\\"%w\\\".\\\"%w_node\\\"(nodeno INTEGER PRIMARY KEY,data);\",\n      zDb, zPrefix);\n    sqlite3_str_appendf(p,\n    \"CREATE TABLE \\\"%w\\\".\\\"%w_parent\\\"(nodeno INTEGER PRIMARY KEY,parentnode);\",\n      zDb, zPrefix);\n    sqlite3_str_appendf(p,\n       \"INSERT INTO \\\"%w\\\".\\\"%w_node\\\"VALUES(1,zeroblob(%d))\",\n       zDb, zPrefix, pRtree->iNodeSize);\n    zCreate = sqlite3_str_finish(p);\n    if( !zCreate ){\n      return SQLITE_NOMEM;\n    }\n    rc = sqlite3_exec(db, zCreate, 0, 0, 0);\n    sqlite3_free(zCreate);\n    if( rc!=SQLITE_OK ){\n      return rc;\n    }\n  }\n\n  appStmt[0] = &pRtree->pWriteNode;\n  appStmt[1] = &pRtree->pDeleteNode;\n  appStmt[2] = &pRtree->pReadRowid;\n  appStmt[3] = &pRtree->pWriteRowid;\n  appStmt[4] = &pRtree->pDeleteRowid;\n  appStmt[5] = &pRtree->pReadParent;\n  appStmt[6] = &pRtree->pWriteParent;\n  appStmt[7] = &pRtree->pDeleteParent;\n\n  rc = rtreeQueryStat1(db, pRtree);\n  for(i=0; i<N_STATEMENT && rc==SQLITE_OK; i++){\n    char *zSql;\n    const char *zFormat;\n    if( i!=3 || pRtree->nAux==0 ){\n       zFormat = azSql[i];\n    }else {\n       /* An UPSERT is very slightly slower than REPLACE, but it is needed\n       ** if there are auxiliary columns */\n       zFormat = \"INSERT INTO\\\"%w\\\".\\\"%w_rowid\\\"(rowid,nodeno)VALUES(?1,?2)\"\n                  \"ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\";\n    }\n    zSql = sqlite3_mprintf(zFormat, zDb, zPrefix);\n    if( zSql ){\n      rc = sqlite3_prepare_v3(db, zSql, -1, f, appStmt[i], 0);\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n    sqlite3_free(zSql);\n  }\n  if( pRtree->nAux && rc!=SQLITE_NOMEM ){\n    pRtree->zReadAuxSql = sqlite3_mprintf(\n       \"SELECT * FROM \\\"%w\\\".\\\"%w_rowid\\\" WHERE rowid=?1\",\n       zDb, zPrefix);\n    if( pRtree->zReadAuxSql==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      sqlite3_str *p = sqlite3_str_new(db);\n      int ii;\n      char *zSql;\n      sqlite3_str_appendf(p, \"UPDATE \\\"%w\\\".\\\"%w_rowid\\\"SET \", zDb, zPrefix);\n      for(ii=0; ii<pRtree->nAux; ii++){\n        if( ii ) sqlite3_str_append(p, \",\", 1);\n#ifdef SQLITE_ENABLE_GEOPOLY\n        if( ii<pRtree->nAuxNotNull ){\n          sqlite3_str_appendf(p,\"a%d=coalesce(?%d,a%d)\",ii,ii+2,ii);\n        }else\n#endif\n        {\n          sqlite3_str_appendf(p,\"a%d=?%d\",ii,ii+2);\n        }\n      }\n      sqlite3_str_appendf(p, \" WHERE rowid=?1\");\n      zSql = sqlite3_str_finish(p);\n      if( zSql==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        rc = sqlite3_prepare_v3(db, zSql, -1, f, &pRtree->pWriteAux, 0);\n        sqlite3_free(zSql);\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** The second argument to this function contains the text of an SQL statement\n** that returns a single integer value. The statement is compiled and executed\n** using database connection db. If successful, the integer value returned\n** is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error\n** code is returned and the value of *piVal after returning is not defined.\n*/\nstatic int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){\n  int rc = SQLITE_NOMEM;\n  if( zSql ){\n    sqlite3_stmt *pStmt = 0;\n    rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      if( SQLITE_ROW==sqlite3_step(pStmt) ){\n        *piVal = sqlite3_column_int(pStmt, 0);\n      }\n      rc = sqlite3_finalize(pStmt);\n    }\n  }\n  return rc;\n}\n\n/*\n** This function is called from within the xConnect() or xCreate() method to\n** determine the node-size used by the rtree table being created or connected\n** to. If successful, pRtree->iNodeSize is populated and SQLITE_OK returned.\n** Otherwise, an SQLite error code is returned.\n**\n** If this function is being called as part of an xConnect(), then the rtree\n** table already exists. In this case the node-size is determined by inspecting\n** the root node of the tree.\n**\n** Otherwise, for an xCreate(), use 64 bytes less than the database page-size.\n** This ensures that each node is stored on a single database page. If the\n** database page-size is so large that more than RTREE_MAXCELLS entries\n** would fit in a single node, use a smaller node-size.\n*/\nstatic int getNodeSize(\n  sqlite3 *db,                    /* Database handle */\n  Rtree *pRtree,                  /* Rtree handle */\n  int isCreate,                   /* True for xCreate, false for xConnect */\n  char **pzErr                    /* OUT: Error message, if any */\n){\n  int rc;\n  char *zSql;\n  if( isCreate ){\n    int iPageSize = 0;\n    zSql = sqlite3_mprintf(\"PRAGMA %Q.page_size\", pRtree->zDb);\n    rc = getIntFromStmt(db, zSql, &iPageSize);\n    if( rc==SQLITE_OK ){\n      pRtree->iNodeSize = iPageSize-64;\n      if( (4+pRtree->nBytesPerCell*RTREE_MAXCELLS)<pRtree->iNodeSize ){\n        pRtree->iNodeSize = 4+pRtree->nBytesPerCell*RTREE_MAXCELLS;\n      }\n    }else{\n      *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n    }\n  }else{\n    zSql = sqlite3_mprintf(\n        \"SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\",\n        pRtree->zDb, pRtree->zName\n    );\n    rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize);\n    if( rc!=SQLITE_OK ){\n      *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n    }else if( pRtree->iNodeSize<(512-64) ){\n      rc = SQLITE_CORRUPT_VTAB;\n      RTREE_IS_CORRUPT(pRtree);\n      *pzErr = sqlite3_mprintf(\"undersize RTree blobs in \\\"%q_node\\\"\",\n                               pRtree->zName);\n    }\n  }\n\n  sqlite3_free(zSql);\n  return rc;\n}\n\n/*\n** Return the length of a token\n*/\nstatic int rtreeTokenLength(const char *z){\n  int dummy = 0;\n  return sqlite3GetToken((const unsigned char*)z,&dummy);\n}\n\n/*\n** This function is the implementation of both the xConnect and xCreate\n** methods of the r-tree virtual table.\n**\n**   argv[0]   -> module name\n**   argv[1]   -> database name\n**   argv[2]   -> table name\n**   argv[...] -> column names...\n*/\nstatic int rtreeInit(\n  sqlite3 *db,                        /* Database connection */\n  void *pAux,                         /* One of the RTREE_COORD_* constants */\n  int argc, const char *const*argv,   /* Parameters to CREATE TABLE statement */\n  sqlite3_vtab **ppVtab,              /* OUT: New virtual table */\n  char **pzErr,                       /* OUT: Error message, if any */\n  int isCreate                        /* True for xCreate, false for xConnect */\n){\n  int rc = SQLITE_OK;\n  Rtree *pRtree;\n  int nDb;              /* Length of string argv[1] */\n  int nName;            /* Length of string argv[2] */\n  int eCoordType = (pAux ? RTREE_COORD_INT32 : RTREE_COORD_REAL32);\n  sqlite3_str *pSql;\n  char *zSql;\n  int ii = 4;\n  int iErr;\n\n  const char *aErrMsg[] = {\n    0,                                                    /* 0 */\n    \"Wrong number of columns for an rtree table\",         /* 1 */\n    \"Too few columns for an rtree table\",                 /* 2 */\n    \"Too many columns for an rtree table\",                /* 3 */\n    \"Auxiliary rtree columns must be last\"                /* 4 */\n  };\n\n  assert( RTREE_MAX_AUX_COLUMN<256 ); /* Aux columns counted by a u8 */\n  if( argc<6 || argc>RTREE_MAX_AUX_COLUMN+3 ){\n    *pzErr = sqlite3_mprintf(\"%s\", aErrMsg[2 + (argc>=6)]);\n    return SQLITE_ERROR;\n  }\n\n  sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, 1);\n  sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);\n\n\n  /* Allocate the sqlite3_vtab structure */\n  nDb = (int)strlen(argv[1]);\n  nName = (int)strlen(argv[2]);\n  pRtree = (Rtree *)sqlite3_malloc64(sizeof(Rtree)+nDb+nName*2+8);\n  if( !pRtree ){\n    return SQLITE_NOMEM;\n  }\n  memset(pRtree, 0, sizeof(Rtree)+nDb+nName*2+8);\n  pRtree->nBusy = 1;\n  pRtree->base.pModule = &rtreeModule;\n  pRtree->zDb = (char *)&pRtree[1];\n  pRtree->zName = &pRtree->zDb[nDb+1];\n  pRtree->zNodeName = &pRtree->zName[nName+1];\n  pRtree->eCoordType = (u8)eCoordType;\n  memcpy(pRtree->zDb, argv[1], nDb);\n  memcpy(pRtree->zName, argv[2], nName);\n  memcpy(pRtree->zNodeName, argv[2], nName);\n  memcpy(&pRtree->zNodeName[nName], \"_node\", 6);\n\n\n  /* Create/Connect to the underlying relational database schema. If\n  ** that is successful, call sqlite3_declare_vtab() to configure\n  ** the r-tree table schema.\n  */\n  pSql = sqlite3_str_new(db);\n  sqlite3_str_appendf(pSql, \"CREATE TABLE x(%.*s INT\",\n                      rtreeTokenLength(argv[3]), argv[3]);\n  for(ii=4; ii<argc; ii++){\n    const char *zArg = argv[ii];\n    if( zArg[0]=='+' ){\n      pRtree->nAux++;\n      sqlite3_str_appendf(pSql, \",%.*s\", rtreeTokenLength(zArg+1), zArg+1);\n    }else if( pRtree->nAux>0 ){\n      break;\n    }else{\n      static const char *azFormat[] = {\",%.*s REAL\", \",%.*s INT\"};\n      pRtree->nDim2++;\n      sqlite3_str_appendf(pSql, azFormat[eCoordType],\n                          rtreeTokenLength(zArg), zArg);\n    }\n  }\n  sqlite3_str_appendf(pSql, \");\");\n  zSql = sqlite3_str_finish(pSql);\n  if( !zSql ){\n    rc = SQLITE_NOMEM;\n  }else if( ii<argc ){\n    *pzErr = sqlite3_mprintf(\"%s\", aErrMsg[4]);\n    rc = SQLITE_ERROR;\n  }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){\n    *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n  }\n  sqlite3_free(zSql);\n  if( rc ) goto rtreeInit_fail;\n  pRtree->nDim = pRtree->nDim2/2;\n  if( pRtree->nDim<1 ){\n    iErr = 2;\n  }else if( pRtree->nDim2>RTREE_MAX_DIMENSIONS*2 ){\n    iErr = 3;\n  }else if( pRtree->nDim2 % 2 ){\n    iErr = 1;\n  }else{\n    iErr = 0;\n  }\n  if( iErr ){\n    *pzErr = sqlite3_mprintf(\"%s\", aErrMsg[iErr]);\n    goto rtreeInit_fail;\n  }\n  pRtree->nBytesPerCell = 8 + pRtree->nDim2*4;\n\n  /* Figure out the node size to use. */\n  rc = getNodeSize(db, pRtree, isCreate, pzErr);\n  if( rc ) goto rtreeInit_fail;\n  rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate);\n  if( rc ){\n    *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n    goto rtreeInit_fail;\n  }\n\n  *ppVtab = (sqlite3_vtab *)pRtree;\n  return SQLITE_OK;\n\nrtreeInit_fail:\n  if( rc==SQLITE_OK ) rc = SQLITE_ERROR;\n  assert( *ppVtab==0 );\n  assert( pRtree->nBusy==1 );\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n\n/*\n** Implementation of a scalar function that decodes r-tree nodes to\n** human readable strings. This can be used for debugging and analysis.\n**\n** The scalar function takes two arguments: (1) the number of dimensions\n** to the rtree (between 1 and 5, inclusive) and (2) a blob of data containing\n** an r-tree node.  For a two-dimensional r-tree structure called \"rt\", to\n** deserialize all nodes, a statement like:\n**\n**   SELECT rtreenode(2, data) FROM rt_node;\n**\n** The human readable string takes the form of a Tcl list with one\n** entry for each cell in the r-tree node. Each entry is itself a\n** list, containing the 8-byte rowid/pageno followed by the\n** <num-dimension>*2 coordinates.\n*/\nstatic void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){\n  RtreeNode node;\n  Rtree tree;\n  int ii;\n  int nData;\n  int errCode;\n  sqlite3_str *pOut;\n\n  UNUSED_PARAMETER(nArg);\n  memset(&node, 0, sizeof(RtreeNode));\n  memset(&tree, 0, sizeof(Rtree));\n  tree.nDim = (u8)sqlite3_value_int(apArg[0]);\n  if( tree.nDim<1 || tree.nDim>5 ) return;\n  tree.nDim2 = tree.nDim*2;\n  tree.nBytesPerCell = 8 + 8 * tree.nDim;\n  node.zData = (u8 *)sqlite3_value_blob(apArg[1]);\n  if( node.zData==0 ) return;\n  nData = sqlite3_value_bytes(apArg[1]);\n  if( nData<4 ) return;\n  if( nData<4+NCELL(&node)*tree.nBytesPerCell ) return;\n\n  pOut = sqlite3_str_new(0);\n  for(ii=0; ii<NCELL(&node); ii++){\n    RtreeCell cell;\n    int jj;\n\n    nodeGetCell(&tree, &node, ii, &cell);\n    if( ii>0 ) sqlite3_str_append(pOut, \" \", 1);\n    sqlite3_str_appendf(pOut, \"{%lld\", cell.iRowid);\n    for(jj=0; jj<tree.nDim2; jj++){\n#ifndef SQLITE_RTREE_INT_ONLY\n      sqlite3_str_appendf(pOut, \" %g\", (double)cell.aCoord[jj].f);\n#else\n      sqlite3_str_appendf(pOut, \" %d\", cell.aCoord[jj].i);\n#endif\n    }\n    sqlite3_str_append(pOut, \"}\", 1);\n  }\n  errCode = sqlite3_str_errcode(pOut);\n  sqlite3_result_error_code(ctx, errCode);\n  sqlite3_result_text(ctx, sqlite3_str_finish(pOut), -1, sqlite3_free);\n}\n\n/* This routine implements an SQL function that returns the \"depth\" parameter\n** from the front of a blob that is an r-tree node.  For example:\n**\n**     SELECT rtreedepth(data) FROM rt_node WHERE nodeno=1;\n**\n** The depth value is 0 for all nodes other than the root node, and the root\n** node always has nodeno=1, so the example above is the primary use for this\n** routine.  This routine is intended for testing and analysis only.\n*/\nstatic void rtreedepth(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){\n  UNUSED_PARAMETER(nArg);\n  if( sqlite3_value_type(apArg[0])!=SQLITE_BLOB\n   || sqlite3_value_bytes(apArg[0])<2\n\n  ){\n    sqlite3_result_error(ctx, \"Invalid argument to rtreedepth()\", -1);\n  }else{\n    u8 *zBlob = (u8 *)sqlite3_value_blob(apArg[0]);\n    if( zBlob ){\n      sqlite3_result_int(ctx, readInt16(zBlob));\n    }else{\n      sqlite3_result_error_nomem(ctx);\n    }\n  }\n}\n\n/*\n** Context object passed between the various routines that make up the\n** implementation of integrity-check function rtreecheck().\n*/\ntypedef struct RtreeCheck RtreeCheck;\nstruct RtreeCheck {\n  sqlite3 *db;                    /* Database handle */\n  const char *zDb;                /* Database containing rtree table */\n  const char *zTab;               /* Name of rtree table */\n  int bInt;                       /* True for rtree_i32 table */\n  int nDim;                       /* Number of dimensions for this rtree tbl */\n  sqlite3_stmt *pGetNode;         /* Statement used to retrieve nodes */\n  sqlite3_stmt *aCheckMapping[2]; /* Statements to query %_parent/%_rowid */\n  int nLeaf;                      /* Number of leaf cells in table */\n  int nNonLeaf;                   /* Number of non-leaf cells in table */\n  int rc;                         /* Return code */\n  char *zReport;                  /* Message to report */\n  int nErr;                       /* Number of lines in zReport */\n};\n\n#define RTREE_CHECK_MAX_ERROR 100\n\n/*\n** Reset SQL statement pStmt. If the sqlite3_reset() call returns an error,\n** and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code.\n*/\nstatic void rtreeCheckReset(RtreeCheck *pCheck, sqlite3_stmt *pStmt){\n  int rc = sqlite3_reset(pStmt);\n  if( pCheck->rc==SQLITE_OK ) pCheck->rc = rc;\n}\n\n/*\n** The second and subsequent arguments to this function are a format string\n** and printf style arguments. This function formats the string and attempts\n** to compile it as an SQL statement.\n**\n** If successful, a pointer to the new SQL statement is returned. Otherwise,\n** NULL is returned and an error code left in RtreeCheck.rc.\n*/\nstatic sqlite3_stmt *rtreeCheckPrepare(\n  RtreeCheck *pCheck,             /* RtreeCheck object */\n  const char *zFmt, ...           /* Format string and trailing args */\n){\n  va_list ap;\n  char *z;\n  sqlite3_stmt *pRet = 0;\n\n  va_start(ap, zFmt);\n  z = sqlite3_vmprintf(zFmt, ap);\n\n  if( pCheck->rc==SQLITE_OK ){\n    if( z==0 ){\n      pCheck->rc = SQLITE_NOMEM;\n    }else{\n      pCheck->rc = sqlite3_prepare_v2(pCheck->db, z, -1, &pRet, 0);\n    }\n  }\n\n  sqlite3_free(z);\n  va_end(ap);\n  return pRet;\n}\n\n/*\n** The second and subsequent arguments to this function are a printf()\n** style format string and arguments. This function formats the string and\n** appends it to the report being accumulated in pCheck.\n*/\nstatic void rtreeCheckAppendMsg(RtreeCheck *pCheck, const char *zFmt, ...){\n  va_list ap;\n  va_start(ap, zFmt);\n  if( pCheck->rc==SQLITE_OK && pCheck->nErr<RTREE_CHECK_MAX_ERROR ){\n    char *z = sqlite3_vmprintf(zFmt, ap);\n    if( z==0 ){\n      pCheck->rc = SQLITE_NOMEM;\n    }else{\n      pCheck->zReport = sqlite3_mprintf(\"%z%s%z\",\n          pCheck->zReport, (pCheck->zReport ? \"\\n\" : \"\"), z\n      );\n      if( pCheck->zReport==0 ){\n        pCheck->rc = SQLITE_NOMEM;\n      }\n    }\n    pCheck->nErr++;\n  }\n  va_end(ap);\n}\n\n/*\n** This function is a no-op if there is already an error code stored\n** in the RtreeCheck object indicated by the first argument. NULL is\n** returned in this case.\n**\n** Otherwise, the contents of rtree table node iNode are loaded from\n** the database and copied into a buffer obtained from sqlite3_malloc().\n** If no error occurs, a pointer to the buffer is returned and (*pnNode)\n** is set to the size of the buffer in bytes.\n**\n** Or, if an error does occur, NULL is returned and an error code left\n** in the RtreeCheck object. The final value of *pnNode is undefined in\n** this case.\n*/\nstatic u8 *rtreeCheckGetNode(RtreeCheck *pCheck, i64 iNode, int *pnNode){\n  u8 *pRet = 0;                   /* Return value */\n\n  if( pCheck->rc==SQLITE_OK && pCheck->pGetNode==0 ){\n    pCheck->pGetNode = rtreeCheckPrepare(pCheck,\n        \"SELECT data FROM %Q.'%q_node' WHERE nodeno=?\",\n        pCheck->zDb, pCheck->zTab\n    );\n  }\n\n  if( pCheck->rc==SQLITE_OK ){\n    sqlite3_bind_int64(pCheck->pGetNode, 1, iNode);\n    if( sqlite3_step(pCheck->pGetNode)==SQLITE_ROW ){\n      int nNode = sqlite3_column_bytes(pCheck->pGetNode, 0);\n      const u8 *pNode = (const u8*)sqlite3_column_blob(pCheck->pGetNode, 0);\n      pRet = sqlite3_malloc64(nNode);\n      if( pRet==0 ){\n        pCheck->rc = SQLITE_NOMEM;\n      }else{\n        memcpy(pRet, pNode, nNode);\n        *pnNode = nNode;\n      }\n    }\n    rtreeCheckReset(pCheck, pCheck->pGetNode);\n    if( pCheck->rc==SQLITE_OK && pRet==0 ){\n      rtreeCheckAppendMsg(pCheck, \"Node %lld missing from database\", iNode);\n    }\n  }\n\n  return pRet;\n}\n\n/*\n** This function is used to check that the %_parent (if bLeaf==0) or %_rowid\n** (if bLeaf==1) table contains a specified entry. The schemas of the\n** two tables are:\n**\n**   CREATE TABLE %_parent(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)\n**   CREATE TABLE %_rowid(rowid INTEGER PRIMARY KEY, nodeno INTEGER, ...)\n**\n** In both cases, this function checks that there exists an entry with\n** IPK value iKey and the second column set to iVal.\n**\n*/\nstatic void rtreeCheckMapping(\n  RtreeCheck *pCheck,             /* RtreeCheck object */\n  int bLeaf,                      /* True for a leaf cell, false for interior */\n  i64 iKey,                       /* Key for mapping */\n  i64 iVal                        /* Expected value for mapping */\n){\n  int rc;\n  sqlite3_stmt *pStmt;\n  const char *azSql[2] = {\n    \"SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\",\n    \"SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\"\n  };\n\n  assert( bLeaf==0 || bLeaf==1 );\n  if( pCheck->aCheckMapping[bLeaf]==0 ){\n    pCheck->aCheckMapping[bLeaf] = rtreeCheckPrepare(pCheck,\n        azSql[bLeaf], pCheck->zDb, pCheck->zTab\n    );\n  }\n  if( pCheck->rc!=SQLITE_OK ) return;\n\n  pStmt = pCheck->aCheckMapping[bLeaf];\n  sqlite3_bind_int64(pStmt, 1, iKey);\n  rc = sqlite3_step(pStmt);\n  if( rc==SQLITE_DONE ){\n    rtreeCheckAppendMsg(pCheck, \"Mapping (%lld -> %lld) missing from %s table\",\n        iKey, iVal, (bLeaf ? \"%_rowid\" : \"%_parent\")\n    );\n  }else if( rc==SQLITE_ROW ){\n    i64 ii = sqlite3_column_int64(pStmt, 0);\n    if( ii!=iVal ){\n      rtreeCheckAppendMsg(pCheck,\n          \"Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\",\n          iKey, ii, (bLeaf ? \"%_rowid\" : \"%_parent\"), iKey, iVal\n      );\n    }\n  }\n  rtreeCheckReset(pCheck, pStmt);\n}\n\n/*\n** Argument pCell points to an array of coordinates stored on an rtree page.\n** This function checks that the coordinates are internally consistent (no\n** x1>x2 conditions) and adds an error message to the RtreeCheck object\n** if they are not.\n**\n** Additionally, if pParent is not NULL, then it is assumed to point to\n** the array of coordinates on the parent page that bound the page\n** containing pCell. In this case it is also verified that the two\n** sets of coordinates are mutually consistent and an error message added\n** to the RtreeCheck object if they are not.\n*/\nstatic void rtreeCheckCellCoord(\n  RtreeCheck *pCheck,\n  i64 iNode,                      /* Node id to use in error messages */\n  int iCell,                      /* Cell number to use in error messages */\n  u8 *pCell,                      /* Pointer to cell coordinates */\n  u8 *pParent                     /* Pointer to parent coordinates */\n){\n  RtreeCoord c1, c2;\n  RtreeCoord p1, p2;\n  int i;\n\n  for(i=0; i<pCheck->nDim; i++){\n    readCoord(&pCell[4*2*i], &c1);\n    readCoord(&pCell[4*(2*i + 1)], &c2);\n\n    /* printf(\"%e, %e\\n\", c1.u.f, c2.u.f); */\n    if( pCheck->bInt ? c1.i>c2.i : c1.f>c2.f ){\n      rtreeCheckAppendMsg(pCheck,\n          \"Dimension %d of cell %d on node %lld is corrupt\", i, iCell, iNode\n      );\n    }\n\n    if( pParent ){\n      readCoord(&pParent[4*2*i], &p1);\n      readCoord(&pParent[4*(2*i + 1)], &p2);\n\n      if( (pCheck->bInt ? c1.i<p1.i : c1.f<p1.f)\n       || (pCheck->bInt ? c2.i>p2.i : c2.f>p2.f)\n      ){\n        rtreeCheckAppendMsg(pCheck,\n            \"Dimension %d of cell %d on node %lld is corrupt relative to parent\"\n            , i, iCell, iNode\n        );\n      }\n    }\n  }\n}\n\n/*\n** Run rtreecheck() checks on node iNode, which is at depth iDepth within\n** the r-tree structure. Argument aParent points to the array of coordinates\n** that bound node iNode on the parent node.\n**\n** If any problems are discovered, an error message is appended to the\n** report accumulated in the RtreeCheck object.\n*/\nstatic void rtreeCheckNode(\n  RtreeCheck *pCheck,\n  int iDepth,                     /* Depth of iNode (0==leaf) */\n  u8 *aParent,                    /* Buffer containing parent coords */\n  i64 iNode                       /* Node to check */\n){\n  u8 *aNode = 0;\n  int nNode = 0;\n\n  assert( iNode==1 || aParent!=0 );\n  assert( pCheck->nDim>0 );\n\n  aNode = rtreeCheckGetNode(pCheck, iNode, &nNode);\n  if( aNode ){\n    if( nNode<4 ){\n      rtreeCheckAppendMsg(pCheck,\n          \"Node %lld is too small (%d bytes)\", iNode, nNode\n      );\n    }else{\n      int nCell;                  /* Number of cells on page */\n      int i;                      /* Used to iterate through cells */\n      if( aParent==0 ){\n        iDepth = readInt16(aNode);\n        if( iDepth>RTREE_MAX_DEPTH ){\n          rtreeCheckAppendMsg(pCheck, \"Rtree depth out of range (%d)\", iDepth);\n          sqlite3_free(aNode);\n          return;\n        }\n      }\n      nCell = readInt16(&aNode[2]);\n      if( (4 + nCell*(8 + pCheck->nDim*2*4))>nNode ){\n        rtreeCheckAppendMsg(pCheck,\n            \"Node %lld is too small for cell count of %d (%d bytes)\",\n            iNode, nCell, nNode\n        );\n      }else{\n        for(i=0; i<nCell; i++){\n          u8 *pCell = &aNode[4 + i*(8 + pCheck->nDim*2*4)];\n          i64 iVal = readInt64(pCell);\n          rtreeCheckCellCoord(pCheck, iNode, i, &pCell[8], aParent);\n\n          if( iDepth>0 ){\n            rtreeCheckMapping(pCheck, 0, iVal, iNode);\n            rtreeCheckNode(pCheck, iDepth-1, &pCell[8], iVal);\n            pCheck->nNonLeaf++;\n          }else{\n            rtreeCheckMapping(pCheck, 1, iVal, iNode);\n            pCheck->nLeaf++;\n          }\n        }\n      }\n    }\n    sqlite3_free(aNode);\n  }\n}\n\n/*\n** The second argument to this function must be either \"_rowid\" or\n** \"_parent\". This function checks that the number of entries in the\n** %_rowid or %_parent table is exactly nExpect. If not, it adds\n** an error message to the report in the RtreeCheck object indicated\n** by the first argument.\n*/\nstatic void rtreeCheckCount(RtreeCheck *pCheck, const char *zTbl, i64 nExpect){\n  if( pCheck->rc==SQLITE_OK ){\n    sqlite3_stmt *pCount;\n    pCount = rtreeCheckPrepare(pCheck, \"SELECT count(*) FROM %Q.'%q%s'\",\n        pCheck->zDb, pCheck->zTab, zTbl\n    );\n    if( pCount ){\n      if( sqlite3_step(pCount)==SQLITE_ROW ){\n        i64 nActual = sqlite3_column_int64(pCount, 0);\n        if( nActual!=nExpect ){\n          rtreeCheckAppendMsg(pCheck, \"Wrong number of entries in %%%s table\"\n              \" - expected %lld, actual %lld\" , zTbl, nExpect, nActual\n          );\n        }\n      }\n      pCheck->rc = sqlite3_finalize(pCount);\n    }\n  }\n}\n\n/*\n** This function does the bulk of the work for the rtree integrity-check.\n** It is called by rtreecheck(), which is the SQL function implementation.\n*/\nstatic int rtreeCheckTable(\n  sqlite3 *db,                    /* Database handle to access db through */\n  const char *zDb,                /* Name of db (\"main\", \"temp\" etc.) */\n  const char *zTab,               /* Name of rtree table to check */\n  char **pzReport                 /* OUT: sqlite3_malloc'd report text */\n){\n  RtreeCheck check;               /* Common context for various routines */\n  sqlite3_stmt *pStmt = 0;        /* Used to find column count of rtree table */\n  int nAux = 0;                   /* Number of extra columns. */\n\n  /* Initialize the context object */\n  memset(&check, 0, sizeof(check));\n  check.db = db;\n  check.zDb = zDb;\n  check.zTab = zTab;\n\n  /* Find the number of auxiliary columns */\n  pStmt = rtreeCheckPrepare(&check, \"SELECT * FROM %Q.'%q_rowid'\", zDb, zTab);\n  if( pStmt ){\n    nAux = sqlite3_column_count(pStmt) - 2;\n    sqlite3_finalize(pStmt);\n  }else\n  if( check.rc!=SQLITE_NOMEM ){\n    check.rc = SQLITE_OK;\n  }\n\n  /* Find number of dimensions in the rtree table. */\n  pStmt = rtreeCheckPrepare(&check, \"SELECT * FROM %Q.%Q\", zDb, zTab);\n  if( pStmt ){\n    int rc;\n    check.nDim = (sqlite3_column_count(pStmt) - 1 - nAux) / 2;\n    if( check.nDim<1 ){\n      rtreeCheckAppendMsg(&check, \"Schema corrupt or not an rtree\");\n    }else if( SQLITE_ROW==sqlite3_step(pStmt) ){\n      check.bInt = (sqlite3_column_type(pStmt, 1)==SQLITE_INTEGER);\n    }\n    rc = sqlite3_finalize(pStmt);\n    if( rc!=SQLITE_CORRUPT ) check.rc = rc;\n  }\n\n  /* Do the actual integrity-check */\n  if( check.nDim>=1 ){\n    if( check.rc==SQLITE_OK ){\n      rtreeCheckNode(&check, 0, 0, 1);\n    }\n    rtreeCheckCount(&check, \"_rowid\", check.nLeaf);\n    rtreeCheckCount(&check, \"_parent\", check.nNonLeaf);\n  }\n\n  /* Finalize SQL statements used by the integrity-check */\n  sqlite3_finalize(check.pGetNode);\n  sqlite3_finalize(check.aCheckMapping[0]);\n  sqlite3_finalize(check.aCheckMapping[1]);\n\n  *pzReport = check.zReport;\n  return check.rc;\n}\n\n/*\n** Implementation of the xIntegrity method for Rtree.\n*/\nstatic int rtreeIntegrity(\n  sqlite3_vtab *pVtab,   /* The virtual table to check */\n  const char *zSchema,   /* Schema in which the virtual table lives */\n  const char *zName,     /* Name of the virtual table */\n  int isQuick,           /* True for a quick_check */\n  char **pzErr           /* Write results here */\n){\n  Rtree *pRtree = (Rtree*)pVtab;\n  int rc;\n  assert( pzErr!=0 && *pzErr==0 );\n  UNUSED_PARAMETER(zSchema);\n  UNUSED_PARAMETER(zName);\n  UNUSED_PARAMETER(isQuick);\n  rc = rtreeCheckTable(pRtree->db, pRtree->zDb, pRtree->zName, pzErr);\n  if( rc==SQLITE_OK && *pzErr ){\n    *pzErr = sqlite3_mprintf(\"In RTree %s.%s:\\n%z\",\n                 pRtree->zDb, pRtree->zName, *pzErr);\n    if( (*pzErr)==0 ) rc = SQLITE_NOMEM;\n  }\n  return rc;\n}\n\n/*\n** Usage:\n**\n**   rtreecheck(<rtree-table>);\n**   rtreecheck(<database>, <rtree-table>);\n**\n** Invoking this SQL function runs an integrity-check on the named rtree\n** table. The integrity-check verifies the following:\n**\n**   1. For each cell in the r-tree structure (%_node table), that:\n**\n**       a) for each dimension, (coord1 <= coord2).\n**\n**       b) unless the cell is on the root node, that the cell is bounded\n**          by the parent cell on the parent node.\n**\n**       c) for leaf nodes, that there is an entry in the %_rowid\n**          table corresponding to the cell's rowid value that\n**          points to the correct node.\n**\n**       d) for cells on non-leaf nodes, that there is an entry in the\n**          %_parent table mapping from the cell's child node to the\n**          node that it resides on.\n**\n**   2. That there are the same number of entries in the %_rowid table\n**      as there are leaf cells in the r-tree structure, and that there\n**      is a leaf cell that corresponds to each entry in the %_rowid table.\n**\n**   3. That there are the same number of entries in the %_parent table\n**      as there are non-leaf cells in the r-tree structure, and that\n**      there is a non-leaf cell that corresponds to each entry in the\n**      %_parent table.\n*/\nstatic void rtreecheck(\n  sqlite3_context *ctx,\n  int nArg,\n  sqlite3_value **apArg\n){\n  if( nArg!=1 && nArg!=2 ){\n    sqlite3_result_error(ctx,\n        \"wrong number of arguments to function rtreecheck()\", -1\n    );\n  }else{\n    int rc;\n    char *zReport = 0;\n    const char *zDb = (const char*)sqlite3_value_text(apArg[0]);\n    const char *zTab;\n    if( nArg==1 ){\n      zTab = zDb;\n      zDb = \"main\";\n    }else{\n      zTab = (const char*)sqlite3_value_text(apArg[1]);\n    }\n    rc = rtreeCheckTable(sqlite3_context_db_handle(ctx), zDb, zTab, &zReport);\n    if( rc==SQLITE_OK ){\n      sqlite3_result_text(ctx, zReport ? zReport : \"ok\", -1, SQLITE_TRANSIENT);\n    }else{\n      sqlite3_result_error_code(ctx, rc);\n    }\n    sqlite3_free(zReport);\n  }\n}\n\n/* Conditionally include the geopoly code */\n#ifdef SQLITE_ENABLE_GEOPOLY\n/************** Include geopoly.c in the middle of rtree.c *******************/\n/************** Begin file geopoly.c *****************************************/\n/*\n** 2018-05-25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file implements an alternative R-Tree virtual table that\n** uses polygons to express the boundaries of 2-dimensional objects.\n**\n** This file is #include-ed onto the end of \"rtree.c\" so that it has\n** access to all of the R-Tree internals.\n*/\n/* #include <stdlib.h> */\n\n/* Enable -DGEOPOLY_ENABLE_DEBUG for debugging facilities */\n#ifdef GEOPOLY_ENABLE_DEBUG\n  static int geo_debug = 0;\n# define GEODEBUG(X) if(geo_debug)printf X\n#else\n# define GEODEBUG(X)\n#endif\n\n/* Character class routines */\n#ifdef sqlite3Isdigit\n   /* Use the SQLite core versions if this routine is part of the\n   ** SQLite amalgamation */\n#  define safe_isdigit(x)  sqlite3Isdigit(x)\n#  define safe_isalnum(x)  sqlite3Isalnum(x)\n#  define safe_isxdigit(x) sqlite3Isxdigit(x)\n#else\n   /* Use the standard library for separate compilation */\n#include <ctype.h>  /* amalgamator: keep */\n#  define safe_isdigit(x)  isdigit((unsigned char)(x))\n#  define safe_isalnum(x)  isalnum((unsigned char)(x))\n#  define safe_isxdigit(x) isxdigit((unsigned char)(x))\n#endif\n\n#ifndef JSON_NULL   /* The following stuff repeats things found in json1 */\n/*\n** Growing our own isspace() routine this way is twice as fast as\n** the library isspace() function.\n*/\nstatic const char geopolyIsSpace[] = {\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 1, 1, 0, 0, 1, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  1, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,\n};\n#define fast_isspace(x) (geopolyIsSpace[(unsigned char)x])\n#endif /* JSON NULL - back to original code */\n\n/* Compiler and version */\n#ifndef GCC_VERSION\n#if defined(__GNUC__) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define GCC_VERSION (__GNUC__*1000000+__GNUC_MINOR__*1000+__GNUC_PATCHLEVEL__)\n#else\n# define GCC_VERSION 0\n#endif\n#endif\n#ifndef MSVC_VERSION\n#if defined(_MSC_VER) && !defined(SQLITE_DISABLE_INTRINSIC)\n# define MSVC_VERSION _MSC_VER\n#else\n# define MSVC_VERSION 0\n#endif\n#endif\n\n/* Datatype for coordinates\n*/\ntypedef float GeoCoord;\n\n/*\n** Internal representation of a polygon.\n**\n** The polygon consists of a sequence of vertexes.  There is a line\n** segment between each pair of vertexes, and one final segment from\n** the last vertex back to the first.  (This differs from the GeoJSON\n** standard in which the final vertex is a repeat of the first.)\n**\n** The polygon follows the right-hand rule.  The area to the right of\n** each segment is \"outside\" and the area to the left is \"inside\".\n**\n** The on-disk representation consists of a 4-byte header followed by\n** the values.  The 4-byte header is:\n**\n**      encoding    (1 byte)   0=big-endian, 1=little-endian\n**      nvertex     (3 bytes)  Number of vertexes as a big-endian integer\n**\n** Enough space is allocated for 4 coordinates, to work around over-zealous\n** warnings coming from some compiler (notably, clang). In reality, the size\n** of each GeoPoly memory allocate is adjusted as necessary so that the\n** GeoPoly.a[] array at the end is the appropriate size.\n*/\ntypedef struct GeoPoly GeoPoly;\nstruct GeoPoly {\n  int nVertex;          /* Number of vertexes */\n  unsigned char hdr[4]; /* Header for on-disk representation */\n  GeoCoord a[8];        /* 2*nVertex values. X (longitude) first, then Y */\n};\n\n/* The size of a memory allocation needed for a GeoPoly object sufficient\n** to hold N coordinate pairs.\n*/\n#define GEOPOLY_SZ(N)  (sizeof(GeoPoly) + sizeof(GeoCoord)*2*((N)-4))\n\n/* Macros to access coordinates of a GeoPoly.\n** We have to use these macros, rather than just say p->a[i] in order\n** to silence (incorrect) UBSAN warnings if the array index is too large.\n*/\n#define GeoX(P,I)  (((GeoCoord*)(P)->a)[(I)*2])\n#define GeoY(P,I)  (((GeoCoord*)(P)->a)[(I)*2+1])\n\n\n/*\n** State of a parse of a GeoJSON input.\n*/\ntypedef struct GeoParse GeoParse;\nstruct GeoParse {\n  const unsigned char *z;   /* Unparsed input */\n  int nVertex;              /* Number of vertexes in a[] */\n  int nAlloc;               /* Space allocated to a[] */\n  int nErr;                 /* Number of errors encountered */\n  GeoCoord *a;          /* Array of vertexes.  From sqlite3_malloc64() */\n};\n\n/* Do a 4-byte byte swap */\nstatic void geopolySwab32(unsigned char *a){\n  unsigned char t = a[0];\n  a[0] = a[3];\n  a[3] = t;\n  t = a[1];\n  a[1] = a[2];\n  a[2] = t;\n}\n\n/* Skip whitespace.  Return the next non-whitespace character. */\nstatic char geopolySkipSpace(GeoParse *p){\n  while( fast_isspace(p->z[0]) ) p->z++;\n  return p->z[0];\n}\n\n/* Parse out a number.  Write the value into *pVal if pVal!=0.\n** return non-zero on success and zero if the next token is not a number.\n*/\nstatic int geopolyParseNumber(GeoParse *p, GeoCoord *pVal){\n  char c = geopolySkipSpace(p);\n  const unsigned char *z = p->z;\n  int j = 0;\n  int seenDP = 0;\n  int seenE = 0;\n  if( c=='-' ){\n    j = 1;\n    c = z[j];\n  }\n  if( c=='0' && z[j+1]>='0' && z[j+1]<='9' ) return 0;\n  for(;; j++){\n    c = z[j];\n    if( safe_isdigit(c) ) continue;\n    if( c=='.' ){\n      if( z[j-1]=='-' ) return 0;\n      if( seenDP ) return 0;\n      seenDP = 1;\n      continue;\n    }\n    if( c=='e' || c=='E' ){\n      if( z[j-1]<'0' ) return 0;\n      if( seenE ) return -1;\n      seenDP = seenE = 1;\n      c = z[j+1];\n      if( c=='+' || c=='-' ){\n        j++;\n        c = z[j+1];\n      }\n      if( c<'0' || c>'9' ) return 0;\n      continue;\n    }\n    break;\n  }\n  if( z[j-1]<'0' ) return 0;\n  if( pVal ){\n#ifdef SQLITE_AMALGAMATION\n     /* The sqlite3AtoF() routine is much much faster than atof(), if it\n     ** is available */\n     double r;\n     (void)sqlite3AtoF((const char*)p->z, &r, j, SQLITE_UTF8);\n     *pVal = r;\n#else\n     *pVal = (GeoCoord)atof((const char*)p->z);\n#endif\n  }\n  p->z += j;\n  return 1;\n}\n\n/*\n** If the input is a well-formed JSON array of coordinates with at least\n** four coordinates and where each coordinate is itself a two-value array,\n** then convert the JSON into a GeoPoly object and return a pointer to\n** that object.\n**\n** If any error occurs, return NULL.\n*/\nstatic GeoPoly *geopolyParseJson(const unsigned char *z, int *pRc){\n  GeoParse s;\n  int rc = SQLITE_OK;\n  memset(&s, 0, sizeof(s));\n  s.z = z;\n  if( geopolySkipSpace(&s)=='[' ){\n    s.z++;\n    while( geopolySkipSpace(&s)=='[' ){\n      int ii = 0;\n      char c;\n      s.z++;\n      if( s.nVertex>=s.nAlloc ){\n        GeoCoord *aNew;\n        s.nAlloc = s.nAlloc*2 + 16;\n        aNew = sqlite3_realloc64(s.a, s.nAlloc*sizeof(GeoCoord)*2 );\n        if( aNew==0 ){\n          rc = SQLITE_NOMEM;\n          s.nErr++;\n          break;\n        }\n        s.a = aNew;\n      }\n      while( geopolyParseNumber(&s, ii<=1 ? &s.a[s.nVertex*2+ii] : 0) ){\n        ii++;\n        if( ii==2 ) s.nVertex++;\n        c = geopolySkipSpace(&s);\n        s.z++;\n        if( c==',' ) continue;\n        if( c==']' && ii>=2 ) break;\n        s.nErr++;\n        rc = SQLITE_ERROR;\n        goto parse_json_err;\n      }\n      if( geopolySkipSpace(&s)==',' ){\n        s.z++;\n        continue;\n      }\n      break;\n    }\n    if( geopolySkipSpace(&s)==']'\n     && s.nVertex>=4\n     && s.a[0]==s.a[s.nVertex*2-2]\n     && s.a[1]==s.a[s.nVertex*2-1]\n     && (s.z++, geopolySkipSpace(&s)==0)\n    ){\n      GeoPoly *pOut;\n      int x = 1;\n      s.nVertex--;  /* Remove the redundant vertex at the end */\n      pOut = sqlite3_malloc64( GEOPOLY_SZ((sqlite3_int64)s.nVertex) );\n      x = 1;\n      if( pOut==0 ) goto parse_json_err;\n      pOut->nVertex = s.nVertex;\n      memcpy(pOut->a, s.a, s.nVertex*2*sizeof(GeoCoord));\n      pOut->hdr[0] = *(unsigned char*)&x;\n      pOut->hdr[1] = (s.nVertex>>16)&0xff;\n      pOut->hdr[2] = (s.nVertex>>8)&0xff;\n      pOut->hdr[3] = s.nVertex&0xff;\n      sqlite3_free(s.a);\n      if( pRc ) *pRc = SQLITE_OK;\n      return pOut;\n    }else{\n      s.nErr++;\n      rc = SQLITE_ERROR;\n    }\n  }\nparse_json_err:\n  if( pRc ) *pRc = rc;\n  sqlite3_free(s.a);\n  return 0;\n}\n\n/*\n** Given a function parameter, try to interpret it as a polygon, either\n** in the binary format or JSON text.  Compute a GeoPoly object and\n** return a pointer to that object.  Or if the input is not a well-formed\n** polygon, put an error message in sqlite3_context and return NULL.\n*/\nstatic GeoPoly *geopolyFuncParam(\n  sqlite3_context *pCtx,      /* Context for error messages */\n  sqlite3_value *pVal,        /* The value to decode */\n  int *pRc                    /* Write error here */\n){\n  GeoPoly *p = 0;\n  int nByte;\n  testcase( pCtx==0 );\n  if( sqlite3_value_type(pVal)==SQLITE_BLOB\n   && (nByte = sqlite3_value_bytes(pVal))>=(int)(4+6*sizeof(GeoCoord))\n  ){\n    const unsigned char *a = sqlite3_value_blob(pVal);\n    int nVertex;\n    if( a==0 ){\n      if( pCtx ) sqlite3_result_error_nomem(pCtx);\n      return 0;\n    }\n    nVertex = (a[1]<<16) + (a[2]<<8) + a[3];\n    if( (a[0]==0 || a[0]==1)\n     && (nVertex*2*sizeof(GeoCoord) + 4)==(unsigned int)nByte\n    ){\n      p = sqlite3_malloc64( sizeof(*p) + (nVertex-1)*2*sizeof(GeoCoord) );\n      if( p==0 ){\n        if( pRc ) *pRc = SQLITE_NOMEM;\n        if( pCtx ) sqlite3_result_error_nomem(pCtx);\n      }else{\n        int x = 1;\n        p->nVertex = nVertex;\n        memcpy(p->hdr, a, nByte);\n        if( a[0] != *(unsigned char*)&x ){\n          int ii;\n          for(ii=0; ii<nVertex; ii++){\n            geopolySwab32((unsigned char*)&GeoX(p,ii));\n            geopolySwab32((unsigned char*)&GeoY(p,ii));\n          }\n          p->hdr[0] ^= 1;\n        }\n      }\n    }\n    if( pRc ) *pRc = SQLITE_OK;\n    return p;\n  }else if( sqlite3_value_type(pVal)==SQLITE_TEXT ){\n    const unsigned char *zJson = sqlite3_value_text(pVal);\n    if( zJson==0 ){\n      if( pRc ) *pRc = SQLITE_NOMEM;\n      return 0;\n    }\n    return geopolyParseJson(zJson, pRc);\n  }else{\n    if( pRc ) *pRc = SQLITE_ERROR;\n    return 0;\n  }\n}\n\n/*\n** Implementation of the geopoly_blob(X) function.\n**\n** If the input is a well-formed Geopoly BLOB or JSON string\n** then return the BLOB representation of the polygon.  Otherwise\n** return NULL.\n*/\nstatic void geopolyBlobFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);\n  (void)argc;\n  if( p ){\n    sqlite3_result_blob(context, p->hdr,\n       4+8*p->nVertex, SQLITE_TRANSIENT);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** SQL function:     geopoly_json(X)\n**\n** Interpret X as a polygon and render it as a JSON array\n** of coordinates.  Or, if X is not a valid polygon, return NULL.\n*/\nstatic void geopolyJsonFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);\n  (void)argc;\n  if( p ){\n    sqlite3 *db = sqlite3_context_db_handle(context);\n    sqlite3_str *x = sqlite3_str_new(db);\n    int i;\n    sqlite3_str_append(x, \"[\", 1);\n    for(i=0; i<p->nVertex; i++){\n      sqlite3_str_appendf(x, \"[%!g,%!g],\", GeoX(p,i), GeoY(p,i));\n    }\n    sqlite3_str_appendf(x, \"[%!g,%!g]]\", GeoX(p,0), GeoY(p,0));\n    sqlite3_result_text(context, sqlite3_str_finish(x), -1, sqlite3_free);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** SQL function:     geopoly_svg(X, ....)\n**\n** Interpret X as a polygon and render it as a SVG <polyline>.\n** Additional arguments are added as attributes to the <polyline>.\n*/\nstatic void geopolySvgFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p;\n  if( argc<1 ) return;\n  p = geopolyFuncParam(context, argv[0], 0);\n  if( p ){\n    sqlite3 *db = sqlite3_context_db_handle(context);\n    sqlite3_str *x = sqlite3_str_new(db);\n    int i;\n    char cSep = '\\'';\n    sqlite3_str_appendf(x, \"<polyline points=\");\n    for(i=0; i<p->nVertex; i++){\n      sqlite3_str_appendf(x, \"%c%g,%g\", cSep, GeoX(p,i), GeoY(p,i));\n      cSep = ' ';\n    }\n    sqlite3_str_appendf(x, \" %g,%g'\", GeoX(p,0), GeoY(p,0));\n    for(i=1; i<argc; i++){\n      const char *z = (const char*)sqlite3_value_text(argv[i]);\n      if( z && z[0] ){\n        sqlite3_str_appendf(x, \" %s\", z);\n      }\n    }\n    sqlite3_str_appendf(x, \"></polyline>\");\n    sqlite3_result_text(context, sqlite3_str_finish(x), -1, sqlite3_free);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** SQL Function:      geopoly_xform(poly, A, B, C, D, E, F)\n**\n** Transform and/or translate a polygon as follows:\n**\n**      x1 = A*x0 + B*y0 + E\n**      y1 = C*x0 + D*y0 + F\n**\n** For a translation:\n**\n**      geopoly_xform(poly, 1, 0, 0, 1, x-offset, y-offset)\n**\n** Rotate by R around the point (0,0):\n**\n**      geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0)\n*/\nstatic void geopolyXformFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);\n  double A = sqlite3_value_double(argv[1]);\n  double B = sqlite3_value_double(argv[2]);\n  double C = sqlite3_value_double(argv[3]);\n  double D = sqlite3_value_double(argv[4]);\n  double E = sqlite3_value_double(argv[5]);\n  double F = sqlite3_value_double(argv[6]);\n  GeoCoord x1, y1, x0, y0;\n  int ii;\n  (void)argc;\n  if( p ){\n    for(ii=0; ii<p->nVertex; ii++){\n      x0 = GeoX(p,ii);\n      y0 = GeoY(p,ii);\n      x1 = (GeoCoord)(A*x0 + B*y0 + E);\n      y1 = (GeoCoord)(C*x0 + D*y0 + F);\n      GeoX(p,ii) = x1;\n      GeoY(p,ii) = y1;\n    }\n    sqlite3_result_blob(context, p->hdr,\n       4+8*p->nVertex, SQLITE_TRANSIENT);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Compute the area enclosed by the polygon.\n**\n** This routine can also be used to detect polygons that rotate in\n** the wrong direction.  Polygons are suppose to be counter-clockwise (CCW).\n** This routine returns a negative value for clockwise (CW) polygons.\n*/\nstatic double geopolyArea(GeoPoly *p){\n  double rArea = 0.0;\n  int ii;\n  for(ii=0; ii<p->nVertex-1; ii++){\n    rArea += (GeoX(p,ii) - GeoX(p,ii+1))           /* (x0 - x1) */\n              * (GeoY(p,ii) + GeoY(p,ii+1))        /* (y0 + y1) */\n              * 0.5;\n  }\n  rArea += (GeoX(p,ii) - GeoX(p,0))                /* (xN - x0) */\n           * (GeoY(p,ii) + GeoY(p,0))              /* (yN + y0) */\n           * 0.5;\n  return rArea;\n}\n\n/*\n** Implementation of the geopoly_area(X) function.\n**\n** If the input is a well-formed Geopoly BLOB then return the area\n** enclosed by the polygon.  If the polygon circulates clockwise instead\n** of counterclockwise (as it should) then return the negative of the\n** enclosed area.  Otherwise return NULL.\n*/\nstatic void geopolyAreaFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);\n  (void)argc;\n  if( p ){\n    sqlite3_result_double(context, geopolyArea(p));\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Implementation of the geopoly_ccw(X) function.\n**\n** If the rotation of polygon X is clockwise (incorrect) instead of\n** counter-clockwise (the correct winding order according to RFC7946)\n** then reverse the order of the vertexes in polygon X.\n**\n** In other words, this routine returns a CCW polygon regardless of the\n** winding order of its input.\n**\n** Use this routine to sanitize historical inputs that that sometimes\n** contain polygons that wind in the wrong direction.\n*/\nstatic void geopolyCcwFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);\n  (void)argc;\n  if( p ){\n    if( geopolyArea(p)<0.0 ){\n      int ii, jj;\n      for(ii=1, jj=p->nVertex-1; ii<jj; ii++, jj--){\n        GeoCoord t = GeoX(p,ii);\n        GeoX(p,ii) = GeoX(p,jj);\n        GeoX(p,jj) = t;\n        t = GeoY(p,ii);\n        GeoY(p,ii) = GeoY(p,jj);\n        GeoY(p,jj) = t;\n      }\n    }\n    sqlite3_result_blob(context, p->hdr,\n       4+8*p->nVertex, SQLITE_TRANSIENT);\n    sqlite3_free(p);\n  }\n}\n\n#define GEOPOLY_PI 3.1415926535897932385\n\n/* Fast approximation for sine(X) for X between -0.5*pi and 2*pi\n*/\nstatic double geopolySine(double r){\n  assert( r>=-0.5*GEOPOLY_PI && r<=2.0*GEOPOLY_PI );\n  if( r>=1.5*GEOPOLY_PI ){\n    r -= 2.0*GEOPOLY_PI;\n  }\n  if( r>=0.5*GEOPOLY_PI ){\n    return -geopolySine(r-GEOPOLY_PI);\n  }else{\n    double r2 = r*r;\n    double r3 = r2*r;\n    double r5 = r3*r2;\n    return 0.9996949*r - 0.1656700*r3 + 0.0075134*r5;\n  }\n}\n\n/*\n** Function:   geopoly_regular(X,Y,R,N)\n**\n** Construct a simple, convex, regular polygon centered at X, Y\n** with circumradius R and with N sides.\n*/\nstatic void geopolyRegularFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  double x = sqlite3_value_double(argv[0]);\n  double y = sqlite3_value_double(argv[1]);\n  double r = sqlite3_value_double(argv[2]);\n  int n = sqlite3_value_int(argv[3]);\n  int i;\n  GeoPoly *p;\n  (void)argc;\n\n  if( n<3 || r<=0.0 ) return;\n  if( n>1000 ) n = 1000;\n  p = sqlite3_malloc64( sizeof(*p) + (n-1)*2*sizeof(GeoCoord) );\n  if( p==0 ){\n    sqlite3_result_error_nomem(context);\n    return;\n  }\n  i = 1;\n  p->hdr[0] = *(unsigned char*)&i;\n  p->hdr[1] = 0;\n  p->hdr[2] = (n>>8)&0xff;\n  p->hdr[3] = n&0xff;\n  for(i=0; i<n; i++){\n    double rAngle = 2.0*GEOPOLY_PI*i/n;\n    GeoX(p,i) = x - r*geopolySine(rAngle-0.5*GEOPOLY_PI);\n    GeoY(p,i) = y + r*geopolySine(rAngle);\n  }\n  sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);\n  sqlite3_free(p);\n}\n\n/*\n** If pPoly is a polygon, compute its bounding box. Then:\n**\n**    (1) if aCoord!=0 store the bounding box in aCoord, returning NULL\n**    (2) otherwise, compute a GeoPoly for the bounding box and return the\n**        new GeoPoly\n**\n** If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from\n** the bounding box in aCoord and return a pointer to that GeoPoly.\n*/\nstatic GeoPoly *geopolyBBox(\n  sqlite3_context *context,   /* For recording the error */\n  sqlite3_value *pPoly,       /* The polygon */\n  RtreeCoord *aCoord,         /* Results here */\n  int *pRc                    /* Error code here */\n){\n  GeoPoly *pOut = 0;\n  GeoPoly *p;\n  float mnX, mxX, mnY, mxY;\n  if( pPoly==0 && aCoord!=0 ){\n    p = 0;\n    mnX = aCoord[0].f;\n    mxX = aCoord[1].f;\n    mnY = aCoord[2].f;\n    mxY = aCoord[3].f;\n    goto geopolyBboxFill;\n  }else{\n    p = geopolyFuncParam(context, pPoly, pRc);\n  }\n  if( p ){\n    int ii;\n    mnX = mxX = GeoX(p,0);\n    mnY = mxY = GeoY(p,0);\n    for(ii=1; ii<p->nVertex; ii++){\n      double r = GeoX(p,ii);\n      if( r<mnX ) mnX = (float)r;\n      else if( r>mxX ) mxX = (float)r;\n      r = GeoY(p,ii);\n      if( r<mnY ) mnY = (float)r;\n      else if( r>mxY ) mxY = (float)r;\n    }\n    if( pRc ) *pRc = SQLITE_OK;\n    if( aCoord==0 ){\n      geopolyBboxFill:\n      pOut = sqlite3_realloc64(p, GEOPOLY_SZ(4));\n      if( pOut==0 ){\n        sqlite3_free(p);\n        if( context ) sqlite3_result_error_nomem(context);\n        if( pRc ) *pRc = SQLITE_NOMEM;\n        return 0;\n      }\n      pOut->nVertex = 4;\n      ii = 1;\n      pOut->hdr[0] = *(unsigned char*)&ii;\n      pOut->hdr[1] = 0;\n      pOut->hdr[2] = 0;\n      pOut->hdr[3] = 4;\n      GeoX(pOut,0) = mnX;\n      GeoY(pOut,0) = mnY;\n      GeoX(pOut,1) = mxX;\n      GeoY(pOut,1) = mnY;\n      GeoX(pOut,2) = mxX;\n      GeoY(pOut,2) = mxY;\n      GeoX(pOut,3) = mnX;\n      GeoY(pOut,3) = mxY;\n    }else{\n      sqlite3_free(p);\n      aCoord[0].f = mnX;\n      aCoord[1].f = mxX;\n      aCoord[2].f = mnY;\n      aCoord[3].f = mxY;\n    }\n  }else if( aCoord ){\n    memset(aCoord, 0, sizeof(RtreeCoord)*4);\n  }\n  return pOut;\n}\n\n/*\n** Implementation of the geopoly_bbox(X) SQL function.\n*/\nstatic void geopolyBBoxFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p = geopolyBBox(context, argv[0], 0, 0);\n  (void)argc;\n  if( p ){\n    sqlite3_result_blob(context, p->hdr,\n       4+8*p->nVertex, SQLITE_TRANSIENT);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** State vector for the geopoly_group_bbox() aggregate function.\n*/\ntypedef struct GeoBBox GeoBBox;\nstruct GeoBBox {\n  int isInit;\n  RtreeCoord a[4];\n};\n\n\n/*\n** Implementation of the geopoly_group_bbox(X) aggregate SQL function.\n*/\nstatic void geopolyBBoxStep(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  RtreeCoord a[4];\n  int rc = SQLITE_OK;\n  (void)argc;\n  (void)geopolyBBox(context, argv[0], a, &rc);\n  if( rc==SQLITE_OK ){\n    GeoBBox *pBBox;\n    pBBox = (GeoBBox*)sqlite3_aggregate_context(context, sizeof(*pBBox));\n    if( pBBox==0 ) return;\n    if( pBBox->isInit==0 ){\n      pBBox->isInit = 1;\n      memcpy(pBBox->a, a, sizeof(RtreeCoord)*4);\n    }else{\n      if( a[0].f < pBBox->a[0].f ) pBBox->a[0] = a[0];\n      if( a[1].f > pBBox->a[1].f ) pBBox->a[1] = a[1];\n      if( a[2].f < pBBox->a[2].f ) pBBox->a[2] = a[2];\n      if( a[3].f > pBBox->a[3].f ) pBBox->a[3] = a[3];\n    }\n  }\n}\nstatic void geopolyBBoxFinal(\n  sqlite3_context *context\n){\n  GeoPoly *p;\n  GeoBBox *pBBox;\n  pBBox = (GeoBBox*)sqlite3_aggregate_context(context, 0);\n  if( pBBox==0 ) return;\n  p = geopolyBBox(context, 0, pBBox->a, 0);\n  if( p ){\n    sqlite3_result_blob(context, p->hdr,\n       4+8*p->nVertex, SQLITE_TRANSIENT);\n    sqlite3_free(p);\n  }\n}\n\n\n/*\n** Determine if point (x0,y0) is beneath line segment (x1,y1)->(x2,y2).\n** Returns:\n**\n**    +2  x0,y0 is on the line segment\n**\n**    +1  x0,y0 is beneath line segment\n**\n**    0   x0,y0 is not on or beneath the line segment or the line segment\n**        is vertical and x0,y0 is not on the line segment\n**\n** The left-most coordinate min(x1,x2) is not considered to be part of\n** the line segment for the purposes of this analysis.\n*/\nstatic int pointBeneathLine(\n  double x0, double y0,\n  double x1, double y1,\n  double x2, double y2\n){\n  double y;\n  if( x0==x1 && y0==y1 ) return 2;\n  if( x1<x2 ){\n    if( x0<=x1 || x0>x2 ) return 0;\n  }else if( x1>x2 ){\n    if( x0<=x2 || x0>x1 ) return 0;\n  }else{\n    /* Vertical line segment */\n    if( x0!=x1 ) return 0;\n    if( y0<y1 && y0<y2 ) return 0;\n    if( y0>y1 && y0>y2 ) return 0;\n    return 2;\n  }\n  y = y1 + (y2-y1)*(x0-x1)/(x2-x1);\n  if( y0==y ) return 2;\n  if( y0<y ) return 1;\n  return 0;\n}\n\n/*\n** SQL function:    geopoly_contains_point(P,X,Y)\n**\n** Return +2 if point X,Y is within polygon P.\n** Return +1 if point X,Y is on the polygon boundary.\n** Return 0 if point X,Y is outside the polygon\n*/\nstatic void geopolyContainsPointFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);\n  double x0 = sqlite3_value_double(argv[1]);\n  double y0 = sqlite3_value_double(argv[2]);\n  int v = 0;\n  int cnt = 0;\n  int ii;\n  (void)argc;\n\n  if( p1==0 ) return;\n  for(ii=0; ii<p1->nVertex-1; ii++){\n    v = pointBeneathLine(x0,y0,GeoX(p1,ii), GeoY(p1,ii),\n                               GeoX(p1,ii+1),GeoY(p1,ii+1));\n    if( v==2 ) break;\n    cnt += v;\n  }\n  if( v!=2 ){\n    v = pointBeneathLine(x0,y0,GeoX(p1,ii), GeoY(p1,ii),\n                               GeoX(p1,0),  GeoY(p1,0));\n  }\n  if( v==2 ){\n    sqlite3_result_int(context, 1);\n  }else if( ((v+cnt)&1)==0 ){\n    sqlite3_result_int(context, 0);\n  }else{\n    sqlite3_result_int(context, 2);\n  }\n  sqlite3_free(p1);\n}\n\n/* Forward declaration */\nstatic int geopolyOverlap(GeoPoly *p1, GeoPoly *p2);\n\n/*\n** SQL function:    geopoly_within(P1,P2)\n**\n** Return +2 if P1 and P2 are the same polygon\n** Return +1 if P2 is contained within P1\n** Return 0 if any part of P2 is on the outside of P1\n**\n*/\nstatic void geopolyWithinFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);\n  GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0);\n  (void)argc;\n  if( p1 && p2 ){\n    int x = geopolyOverlap(p1, p2);\n    if( x<0 ){\n      sqlite3_result_error_nomem(context);\n    }else{\n      sqlite3_result_int(context, x==2 ? 1 : x==4 ? 2 : 0);\n    }\n  }\n  sqlite3_free(p1);\n  sqlite3_free(p2);\n}\n\n/* Objects used by the overlap algorithm. */\ntypedef struct GeoEvent GeoEvent;\ntypedef struct GeoSegment GeoSegment;\ntypedef struct GeoOverlap GeoOverlap;\nstruct GeoEvent {\n  double x;              /* X coordinate at which event occurs */\n  int eType;             /* 0 for ADD, 1 for REMOVE */\n  GeoSegment *pSeg;      /* The segment to be added or removed */\n  GeoEvent *pNext;       /* Next event in the sorted list */\n};\nstruct GeoSegment {\n  double C, B;           /* y = C*x + B */\n  double y;              /* Current y value */\n  float y0;              /* Initial y value */\n  unsigned char side;    /* 1 for p1, 2 for p2 */\n  unsigned int idx;      /* Which segment within the side */\n  GeoSegment *pNext;     /* Next segment in a list sorted by y */\n};\nstruct GeoOverlap {\n  GeoEvent *aEvent;          /* Array of all events */\n  GeoSegment *aSegment;      /* Array of all segments */\n  int nEvent;                /* Number of events */\n  int nSegment;              /* Number of segments */\n};\n\n/*\n** Add a single segment and its associated events.\n*/\nstatic void geopolyAddOneSegment(\n  GeoOverlap *p,\n  GeoCoord x0,\n  GeoCoord y0,\n  GeoCoord x1,\n  GeoCoord y1,\n  unsigned char side,\n  unsigned int idx\n){\n  GeoSegment *pSeg;\n  GeoEvent *pEvent;\n  if( x0==x1 ) return;  /* Ignore vertical segments */\n  if( x0>x1 ){\n    GeoCoord t = x0;\n    x0 = x1;\n    x1 = t;\n    t = y0;\n    y0 = y1;\n    y1 = t;\n  }\n  pSeg = p->aSegment + p->nSegment;\n  p->nSegment++;\n  pSeg->C = (y1-y0)/(x1-x0);\n  pSeg->B = y1 - x1*pSeg->C;\n  pSeg->y0 = y0;\n  pSeg->side = side;\n  pSeg->idx = idx;\n  pEvent = p->aEvent + p->nEvent;\n  p->nEvent++;\n  pEvent->x = x0;\n  pEvent->eType = 0;\n  pEvent->pSeg = pSeg;\n  pEvent = p->aEvent + p->nEvent;\n  p->nEvent++;\n  pEvent->x = x1;\n  pEvent->eType = 1;\n  pEvent->pSeg = pSeg;\n}\n\n\n\n/*\n** Insert all segments and events for polygon pPoly.\n*/\nstatic void geopolyAddSegments(\n  GeoOverlap *p,          /* Add segments to this Overlap object */\n  GeoPoly *pPoly,         /* Take all segments from this polygon */\n  unsigned char side      /* The side of pPoly */\n){\n  unsigned int i;\n  GeoCoord *x;\n  for(i=0; i<(unsigned)pPoly->nVertex-1; i++){\n    x = &GeoX(pPoly,i);\n    geopolyAddOneSegment(p, x[0], x[1], x[2], x[3], side, i);\n  }\n  x = &GeoX(pPoly,i);\n  geopolyAddOneSegment(p, x[0], x[1], pPoly->a[0], pPoly->a[1], side, i);\n}\n\n/*\n** Merge two lists of sorted events by X coordinate\n*/\nstatic GeoEvent *geopolyEventMerge(GeoEvent *pLeft, GeoEvent *pRight){\n  GeoEvent head, *pLast;\n  head.pNext = 0;\n  pLast = &head;\n  while( pRight && pLeft ){\n    if( pRight->x <= pLeft->x ){\n      pLast->pNext = pRight;\n      pLast = pRight;\n      pRight = pRight->pNext;\n    }else{\n      pLast->pNext = pLeft;\n      pLast = pLeft;\n      pLeft = pLeft->pNext;\n    }\n  }\n  pLast->pNext = pRight ? pRight : pLeft;\n  return head.pNext;\n}\n\n/*\n** Sort an array of nEvent event objects into a list.\n*/\nstatic GeoEvent *geopolySortEventsByX(GeoEvent *aEvent, int nEvent){\n  int mx = 0;\n  int i, j;\n  GeoEvent *p;\n  GeoEvent *a[50];\n  for(i=0; i<nEvent; i++){\n    p = &aEvent[i];\n    p->pNext = 0;\n    for(j=0; j<mx && a[j]; j++){\n      p = geopolyEventMerge(a[j], p);\n      a[j] = 0;\n    }\n    a[j] = p;\n    if( j>=mx ) mx = j+1;\n  }\n  p = 0;\n  for(i=0; i<mx; i++){\n    p = geopolyEventMerge(a[i], p);\n  }\n  return p;\n}\n\n/*\n** Merge two lists of sorted segments by Y, and then by C.\n*/\nstatic GeoSegment *geopolySegmentMerge(GeoSegment *pLeft, GeoSegment *pRight){\n  GeoSegment head, *pLast;\n  head.pNext = 0;\n  pLast = &head;\n  while( pRight && pLeft ){\n    double r = pRight->y - pLeft->y;\n    if( r==0.0 ) r = pRight->C - pLeft->C;\n    if( r<0.0 ){\n      pLast->pNext = pRight;\n      pLast = pRight;\n      pRight = pRight->pNext;\n    }else{\n      pLast->pNext = pLeft;\n      pLast = pLeft;\n      pLeft = pLeft->pNext;\n    }\n  }\n  pLast->pNext = pRight ? pRight : pLeft;\n  return head.pNext;\n}\n\n/*\n** Sort a list of GeoSegments in order of increasing Y and in the event of\n** a tie, increasing C (slope).\n*/\nstatic GeoSegment *geopolySortSegmentsByYAndC(GeoSegment *pList){\n  int mx = 0;\n  int i;\n  GeoSegment *p;\n  GeoSegment *a[50];\n  while( pList ){\n    p = pList;\n    pList = pList->pNext;\n    p->pNext = 0;\n    for(i=0; i<mx && a[i]; i++){\n      p = geopolySegmentMerge(a[i], p);\n      a[i] = 0;\n    }\n    a[i] = p;\n    if( i>=mx ) mx = i+1;\n  }\n  p = 0;\n  for(i=0; i<mx; i++){\n    p = geopolySegmentMerge(a[i], p);\n  }\n  return p;\n}\n\n/*\n** Determine the overlap between two polygons\n*/\nstatic int geopolyOverlap(GeoPoly *p1, GeoPoly *p2){\n  sqlite3_int64 nVertex = p1->nVertex + p2->nVertex + 2;\n  GeoOverlap *p;\n  sqlite3_int64 nByte;\n  GeoEvent *pThisEvent;\n  double rX;\n  int rc = 0;\n  int needSort = 0;\n  GeoSegment *pActive = 0;\n  GeoSegment *pSeg;\n  unsigned char aOverlap[4];\n\n  nByte = sizeof(GeoEvent)*nVertex*2\n           + sizeof(GeoSegment)*nVertex\n           + sizeof(GeoOverlap);\n  p = sqlite3_malloc64( nByte );\n  if( p==0 ) return -1;\n  p->aEvent = (GeoEvent*)&p[1];\n  p->aSegment = (GeoSegment*)&p->aEvent[nVertex*2];\n  p->nEvent = p->nSegment = 0;\n  geopolyAddSegments(p, p1, 1);\n  geopolyAddSegments(p, p2, 2);\n  pThisEvent = geopolySortEventsByX(p->aEvent, p->nEvent);\n  rX = pThisEvent && pThisEvent->x==0.0 ? -1.0 : 0.0;\n  memset(aOverlap, 0, sizeof(aOverlap));\n  while( pThisEvent ){\n    if( pThisEvent->x!=rX ){\n      GeoSegment *pPrev = 0;\n      int iMask = 0;\n      GEODEBUG((\"Distinct X: %g\\n\", pThisEvent->x));\n      rX = pThisEvent->x;\n      if( needSort ){\n        GEODEBUG((\"SORT\\n\"));\n        pActive = geopolySortSegmentsByYAndC(pActive);\n        needSort = 0;\n      }\n      for(pSeg=pActive; pSeg; pSeg=pSeg->pNext){\n        if( pPrev ){\n          if( pPrev->y!=pSeg->y ){\n            GEODEBUG((\"MASK: %d\\n\", iMask));\n            aOverlap[iMask] = 1;\n          }\n        }\n        iMask ^= pSeg->side;\n        pPrev = pSeg;\n      }\n      pPrev = 0;\n      for(pSeg=pActive; pSeg; pSeg=pSeg->pNext){\n        double y = pSeg->C*rX + pSeg->B;\n        GEODEBUG((\"Segment %d.%d %g->%g\\n\", pSeg->side, pSeg->idx, pSeg->y, y));\n        pSeg->y = y;\n        if( pPrev ){\n          if( pPrev->y>pSeg->y && pPrev->side!=pSeg->side ){\n            rc = 1;\n            GEODEBUG((\"Crossing: %d.%d and %d.%d\\n\",\n                    pPrev->side, pPrev->idx,\n                    pSeg->side, pSeg->idx));\n            goto geopolyOverlapDone;\n          }else if( pPrev->y!=pSeg->y ){\n            GEODEBUG((\"MASK: %d\\n\", iMask));\n            aOverlap[iMask] = 1;\n          }\n        }\n        iMask ^= pSeg->side;\n        pPrev = pSeg;\n      }\n    }\n    GEODEBUG((\"%s %d.%d C=%g B=%g\\n\",\n      pThisEvent->eType ? \"RM \" : \"ADD\",\n      pThisEvent->pSeg->side, pThisEvent->pSeg->idx,\n      pThisEvent->pSeg->C,\n      pThisEvent->pSeg->B));\n    if( pThisEvent->eType==0 ){\n      /* Add a segment */\n      pSeg = pThisEvent->pSeg;\n      pSeg->y = pSeg->y0;\n      pSeg->pNext = pActive;\n      pActive = pSeg;\n      needSort = 1;\n    }else{\n      /* Remove a segment */\n      if( pActive==pThisEvent->pSeg ){\n        pActive = ALWAYS(pActive) ? pActive->pNext : 0;\n      }else{\n        for(pSeg=pActive; pSeg; pSeg=pSeg->pNext){\n          if( pSeg->pNext==pThisEvent->pSeg ){\n            pSeg->pNext = ALWAYS(pSeg->pNext) ? pSeg->pNext->pNext : 0;\n            break;\n          }\n        }\n      }\n    }\n    pThisEvent = pThisEvent->pNext;\n  }\n  if( aOverlap[3]==0 ){\n    rc = 0;\n  }else if( aOverlap[1]!=0 && aOverlap[2]==0 ){\n    rc = 3;\n  }else if( aOverlap[1]==0 && aOverlap[2]!=0 ){\n    rc = 2;\n  }else if( aOverlap[1]==0 && aOverlap[2]==0 ){\n    rc = 4;\n  }else{\n    rc = 1;\n  }\n\ngeopolyOverlapDone:\n  sqlite3_free(p);\n  return rc;\n}\n\n/*\n** SQL function:    geopoly_overlap(P1,P2)\n**\n** Determine whether or not P1 and P2 overlap. Return value:\n**\n**   0     The two polygons are disjoint\n**   1     They overlap\n**   2     P1 is completely contained within P2\n**   3     P2 is completely contained within P1\n**   4     P1 and P2 are the same polygon\n**   NULL  Either P1 or P2 or both are not valid polygons\n*/\nstatic void geopolyOverlapFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);\n  GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0);\n  (void)argc;\n  if( p1 && p2 ){\n    int x = geopolyOverlap(p1, p2);\n    if( x<0 ){\n      sqlite3_result_error_nomem(context);\n    }else{\n      sqlite3_result_int(context, x);\n    }\n  }\n  sqlite3_free(p1);\n  sqlite3_free(p2);\n}\n\n/*\n** Enable or disable debugging output\n*/\nstatic void geopolyDebugFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  (void)context;\n  (void)argc;\n#ifdef GEOPOLY_ENABLE_DEBUG\n  geo_debug = sqlite3_value_int(argv[0]);\n#else\n  (void)argv;\n#endif\n}\n\n/*\n** This function is the implementation of both the xConnect and xCreate\n** methods of the geopoly virtual table.\n**\n**   argv[0]   -> module name\n**   argv[1]   -> database name\n**   argv[2]   -> table name\n**   argv[...] -> column names...\n*/\nstatic int geopolyInit(\n  sqlite3 *db,                        /* Database connection */\n  void *pAux,                         /* One of the RTREE_COORD_* constants */\n  int argc, const char *const*argv,   /* Parameters to CREATE TABLE statement */\n  sqlite3_vtab **ppVtab,              /* OUT: New virtual table */\n  char **pzErr,                       /* OUT: Error message, if any */\n  int isCreate                        /* True for xCreate, false for xConnect */\n){\n  int rc = SQLITE_OK;\n  Rtree *pRtree;\n  sqlite3_int64 nDb;              /* Length of string argv[1] */\n  sqlite3_int64 nName;            /* Length of string argv[2] */\n  sqlite3_str *pSql;\n  char *zSql;\n  int ii;\n  (void)pAux;\n\n  sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, 1);\n  sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);\n\n  /* Allocate the sqlite3_vtab structure */\n  nDb = strlen(argv[1]);\n  nName = strlen(argv[2]);\n  pRtree = (Rtree *)sqlite3_malloc64(sizeof(Rtree)+nDb+nName*2+8);\n  if( !pRtree ){\n    return SQLITE_NOMEM;\n  }\n  memset(pRtree, 0, sizeof(Rtree)+nDb+nName*2+8);\n  pRtree->nBusy = 1;\n  pRtree->base.pModule = &rtreeModule;\n  pRtree->zDb = (char *)&pRtree[1];\n  pRtree->zName = &pRtree->zDb[nDb+1];\n  pRtree->zNodeName = &pRtree->zName[nName+1];\n  pRtree->eCoordType = RTREE_COORD_REAL32;\n  pRtree->nDim = 2;\n  pRtree->nDim2 = 4;\n  memcpy(pRtree->zDb, argv[1], nDb);\n  memcpy(pRtree->zName, argv[2], nName);\n  memcpy(pRtree->zNodeName, argv[2], nName);\n  memcpy(&pRtree->zNodeName[nName], \"_node\", 6);\n\n\n  /* Create/Connect to the underlying relational database schema. If\n  ** that is successful, call sqlite3_declare_vtab() to configure\n  ** the r-tree table schema.\n  */\n  pSql = sqlite3_str_new(db);\n  sqlite3_str_appendf(pSql, \"CREATE TABLE x(_shape\");\n  pRtree->nAux = 1;         /* Add one for _shape */\n  pRtree->nAuxNotNull = 1;  /* The _shape column is always not-null */\n  for(ii=3; ii<argc; ii++){\n    pRtree->nAux++;\n    sqlite3_str_appendf(pSql, \",%s\", argv[ii]);\n  }\n  sqlite3_str_appendf(pSql, \");\");\n  zSql = sqlite3_str_finish(pSql);\n  if( !zSql ){\n    rc = SQLITE_NOMEM;\n  }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){\n    *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n  }\n  sqlite3_free(zSql);\n  if( rc ) goto geopolyInit_fail;\n  pRtree->nBytesPerCell = 8 + pRtree->nDim2*4;\n\n  /* Figure out the node size to use. */\n  rc = getNodeSize(db, pRtree, isCreate, pzErr);\n  if( rc ) goto geopolyInit_fail;\n  rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate);\n  if( rc ){\n    *pzErr = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n    goto geopolyInit_fail;\n  }\n\n  *ppVtab = (sqlite3_vtab *)pRtree;\n  return SQLITE_OK;\n\ngeopolyInit_fail:\n  if( rc==SQLITE_OK ) rc = SQLITE_ERROR;\n  assert( *ppVtab==0 );\n  assert( pRtree->nBusy==1 );\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n\n/*\n** GEOPOLY virtual table module xCreate method.\n*/\nstatic int geopolyCreate(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  return geopolyInit(db, pAux, argc, argv, ppVtab, pzErr, 1);\n}\n\n/*\n** GEOPOLY virtual table module xConnect method.\n*/\nstatic int geopolyConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  return geopolyInit(db, pAux, argc, argv, ppVtab, pzErr, 0);\n}\n\n\n/*\n** GEOPOLY virtual table module xFilter method.\n**\n** Query plans:\n**\n**      1         rowid lookup\n**      2         search for objects overlapping the same bounding box\n**                that contains polygon argv[0]\n**      3         search for objects overlapping the same bounding box\n**                that contains polygon argv[0]\n**      4         full table scan\n*/\nstatic int geopolyFilter(\n  sqlite3_vtab_cursor *pVtabCursor,     /* The cursor to initialize */\n  int idxNum,                           /* Query plan */\n  const char *idxStr,                   /* Not Used */\n  int argc, sqlite3_value **argv        /* Parameters to the query plan */\n){\n  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;\n  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;\n  RtreeNode *pRoot = 0;\n  int rc = SQLITE_OK;\n  int iCell = 0;\n  (void)idxStr;\n\n  rtreeReference(pRtree);\n\n  /* Reset the cursor to the same state as rtreeOpen() leaves it in. */\n  resetCursor(pCsr);\n\n  pCsr->iStrategy = idxNum;\n  if( idxNum==1 ){\n    /* Special case - lookup by rowid. */\n    RtreeNode *pLeaf;        /* Leaf on which the required cell resides */\n    RtreeSearchPoint *p;     /* Search point for the leaf */\n    i64 iRowid = sqlite3_value_int64(argv[0]);\n    i64 iNode = 0;\n    rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);\n    if( rc==SQLITE_OK && pLeaf!=0 ){\n      p = rtreeSearchPointNew(pCsr, RTREE_ZERO, 0);\n      assert( p!=0 );  /* Always returns pCsr->sPoint */\n      pCsr->aNode[0] = pLeaf;\n      p->id = iNode;\n      p->eWithin = PARTLY_WITHIN;\n      rc = nodeRowidIndex(pRtree, pLeaf, iRowid, &iCell);\n      p->iCell = (u8)iCell;\n      RTREE_QUEUE_TRACE(pCsr, \"PUSH-F1:\");\n    }else{\n      pCsr->atEOF = 1;\n    }\n  }else{\n    /* Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array\n    ** with the configured constraints.\n    */\n    rc = nodeAcquire(pRtree, 1, 0, &pRoot);\n    if( rc==SQLITE_OK && idxNum<=3 ){\n      RtreeCoord bbox[4];\n      RtreeConstraint *p;\n      assert( argc==1 );\n      assert( argv[0]!=0 );\n      geopolyBBox(0, argv[0], bbox, &rc);\n      if( rc ){\n        goto geopoly_filter_end;\n      }\n      pCsr->aConstraint = p = sqlite3_malloc(sizeof(RtreeConstraint)*4);\n      pCsr->nConstraint = 4;\n      if( p==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memset(pCsr->aConstraint, 0, sizeof(RtreeConstraint)*4);\n        memset(pCsr->anQueue, 0, sizeof(u32)*(pRtree->iDepth + 1));\n        if( idxNum==2 ){\n          /* Overlap query */\n          p->op = 'B';\n          p->iCoord = 0;\n          p->u.rValue = bbox[1].f;\n          p++;\n          p->op = 'D';\n          p->iCoord = 1;\n          p->u.rValue = bbox[0].f;\n          p++;\n          p->op = 'B';\n          p->iCoord = 2;\n          p->u.rValue = bbox[3].f;\n          p++;\n          p->op = 'D';\n          p->iCoord = 3;\n          p->u.rValue = bbox[2].f;\n        }else{\n          /* Within query */\n          p->op = 'D';\n          p->iCoord = 0;\n          p->u.rValue = bbox[0].f;\n          p++;\n          p->op = 'B';\n          p->iCoord = 1;\n          p->u.rValue = bbox[1].f;\n          p++;\n          p->op = 'D';\n          p->iCoord = 2;\n          p->u.rValue = bbox[2].f;\n          p++;\n          p->op = 'B';\n          p->iCoord = 3;\n          p->u.rValue = bbox[3].f;\n        }\n      }\n    }\n    if( rc==SQLITE_OK ){\n      RtreeSearchPoint *pNew;\n      pNew = rtreeSearchPointNew(pCsr, RTREE_ZERO, (u8)(pRtree->iDepth+1));\n      if( pNew==0 ){\n        rc = SQLITE_NOMEM;\n        goto geopoly_filter_end;\n      }\n      pNew->id = 1;\n      pNew->iCell = 0;\n      pNew->eWithin = PARTLY_WITHIN;\n      assert( pCsr->bPoint==1 );\n      pCsr->aNode[0] = pRoot;\n      pRoot = 0;\n      RTREE_QUEUE_TRACE(pCsr, \"PUSH-Fm:\");\n      rc = rtreeStepToLeaf(pCsr);\n    }\n  }\n\ngeopoly_filter_end:\n  nodeRelease(pRtree, pRoot);\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n/*\n** Rtree virtual table module xBestIndex method. There are three\n** table scan strategies to choose from (in order from most to\n** least desirable):\n**\n**   idxNum     idxStr        Strategy\n**   ------------------------------------------------\n**     1        \"rowid\"       Direct lookup by rowid.\n**     2        \"rtree\"       R-tree overlap query using geopoly_overlap()\n**     3        \"rtree\"       R-tree within query using geopoly_within()\n**     4        \"fullscan\"    full-table scan.\n**   ------------------------------------------------\n*/\nstatic int geopolyBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){\n  int ii;\n  int iRowidTerm = -1;\n  int iFuncTerm = -1;\n  int idxNum = 0;\n  (void)tab;\n\n  for(ii=0; ii<pIdxInfo->nConstraint; ii++){\n    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];\n    if( !p->usable ) continue;\n    if( p->iColumn<0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ  ){\n      iRowidTerm = ii;\n      break;\n    }\n    if( p->iColumn==0 && p->op>=SQLITE_INDEX_CONSTRAINT_FUNCTION ){\n      /* p->op==SQLITE_INDEX_CONSTRAINT_FUNCTION for geopoly_overlap()\n      ** p->op==(SQLITE_INDEX_CONTRAINT_FUNCTION+1) for geopoly_within().\n      ** See geopolyFindFunction() */\n      iFuncTerm = ii;\n      idxNum = p->op - SQLITE_INDEX_CONSTRAINT_FUNCTION + 2;\n    }\n  }\n\n  if( iRowidTerm>=0 ){\n    pIdxInfo->idxNum = 1;\n    pIdxInfo->idxStr = \"rowid\";\n    pIdxInfo->aConstraintUsage[iRowidTerm].argvIndex = 1;\n    pIdxInfo->aConstraintUsage[iRowidTerm].omit = 1;\n    pIdxInfo->estimatedCost = 30.0;\n    pIdxInfo->estimatedRows = 1;\n    pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;\n    return SQLITE_OK;\n  }\n  if( iFuncTerm>=0 ){\n    pIdxInfo->idxNum = idxNum;\n    pIdxInfo->idxStr = \"rtree\";\n    pIdxInfo->aConstraintUsage[iFuncTerm].argvIndex = 1;\n    pIdxInfo->aConstraintUsage[iFuncTerm].omit = 0;\n    pIdxInfo->estimatedCost = 300.0;\n    pIdxInfo->estimatedRows = 10;\n    return SQLITE_OK;\n  }\n  pIdxInfo->idxNum = 4;\n  pIdxInfo->idxStr = \"fullscan\";\n  pIdxInfo->estimatedCost = 3000000.0;\n  pIdxInfo->estimatedRows = 100000;\n  return SQLITE_OK;\n}\n\n\n/*\n** GEOPOLY virtual table module xColumn method.\n*/\nstatic int geopolyColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){\n  Rtree *pRtree = (Rtree *)cur->pVtab;\n  RtreeCursor *pCsr = (RtreeCursor *)cur;\n  RtreeSearchPoint *p = rtreeSearchPointFirst(pCsr);\n  int rc = SQLITE_OK;\n  RtreeNode *pNode = rtreeNodeOfFirstSearchPoint(pCsr, &rc);\n\n  if( rc ) return rc;\n  if( p==0 ) return SQLITE_OK;\n  if( i==0 && sqlite3_vtab_nochange(ctx) ) return SQLITE_OK;\n  if( i<=pRtree->nAux ){\n    if( !pCsr->bAuxValid ){\n      if( pCsr->pReadAux==0 ){\n        rc = sqlite3_prepare_v3(pRtree->db, pRtree->zReadAuxSql, -1, 0,\n                                &pCsr->pReadAux, 0);\n        if( rc ) return rc;\n      }\n      sqlite3_bind_int64(pCsr->pReadAux, 1,\n          nodeGetRowid(pRtree, pNode, p->iCell));\n      rc = sqlite3_step(pCsr->pReadAux);\n      if( rc==SQLITE_ROW ){\n        pCsr->bAuxValid = 1;\n      }else{\n        sqlite3_reset(pCsr->pReadAux);\n        if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n        return rc;\n      }\n    }\n    sqlite3_result_value(ctx, sqlite3_column_value(pCsr->pReadAux, i+2));\n  }\n  return SQLITE_OK;\n}\n\n\n/*\n** The xUpdate method for GEOPOLY module virtual tables.\n**\n** For DELETE:\n**\n**     argv[0] = the rowid to be deleted\n**\n** For INSERT:\n**\n**     argv[0] = SQL NULL\n**     argv[1] = rowid to insert, or an SQL NULL to select automatically\n**     argv[2] = _shape column\n**     argv[3] = first application-defined column....\n**\n** For UPDATE:\n**\n**     argv[0] = rowid to modify.  Never NULL\n**     argv[1] = rowid after the change.  Never NULL\n**     argv[2] = new value for _shape\n**     argv[3] = new value for first application-defined column....\n*/\nstatic int geopolyUpdate(\n  sqlite3_vtab *pVtab,\n  int nData,\n  sqlite3_value **aData,\n  sqlite_int64 *pRowid\n){\n  Rtree *pRtree = (Rtree *)pVtab;\n  int rc = SQLITE_OK;\n  RtreeCell cell;                 /* New cell to insert if nData>1 */\n  i64 oldRowid;                   /* The old rowid */\n  int oldRowidValid;              /* True if oldRowid is valid */\n  i64 newRowid;                   /* The new rowid */\n  int newRowidValid;              /* True if newRowid is valid */\n  int coordChange = 0;            /* Change in coordinates */\n\n  if( pRtree->nNodeRef ){\n    /* Unable to write to the btree while another cursor is reading from it,\n    ** since the write might do a rebalance which would disrupt the read\n    ** cursor. */\n    return SQLITE_LOCKED_VTAB;\n  }\n  rtreeReference(pRtree);\n  assert(nData>=1);\n\n  oldRowidValid = sqlite3_value_type(aData[0])!=SQLITE_NULL;;\n  oldRowid = oldRowidValid ? sqlite3_value_int64(aData[0]) : 0;\n  newRowidValid = nData>1 && sqlite3_value_type(aData[1])!=SQLITE_NULL;\n  newRowid = newRowidValid ? sqlite3_value_int64(aData[1]) : 0;\n  cell.iRowid = newRowid;\n\n  if( nData>1                                 /* not a DELETE */\n   && (!oldRowidValid                         /* INSERT */\n        || !sqlite3_value_nochange(aData[2])  /* UPDATE _shape */\n        || oldRowid!=newRowid)                /* Rowid change */\n  ){\n    assert( aData[2]!=0 );\n    geopolyBBox(0, aData[2], cell.aCoord, &rc);\n    if( rc ){\n      if( rc==SQLITE_ERROR ){\n        pVtab->zErrMsg =\n          sqlite3_mprintf(\"_shape does not contain a valid polygon\");\n      }\n      goto geopoly_update_end;\n    }\n    coordChange = 1;\n\n    /* If a rowid value was supplied, check if it is already present in\n    ** the table. If so, the constraint has failed. */\n    if( newRowidValid && (!oldRowidValid || oldRowid!=newRowid) ){\n      int steprc;\n      sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);\n      steprc = sqlite3_step(pRtree->pReadRowid);\n      rc = sqlite3_reset(pRtree->pReadRowid);\n      if( SQLITE_ROW==steprc ){\n        if( sqlite3_vtab_on_conflict(pRtree->db)==SQLITE_REPLACE ){\n          rc = rtreeDeleteRowid(pRtree, cell.iRowid);\n        }else{\n          rc = rtreeConstraintError(pRtree, 0);\n        }\n      }\n    }\n  }\n\n  /* If aData[0] is not an SQL NULL value, it is the rowid of a\n  ** record to delete from the r-tree table. The following block does\n  ** just that.\n  */\n  if( rc==SQLITE_OK && (nData==1 || (coordChange && oldRowidValid)) ){\n    rc = rtreeDeleteRowid(pRtree, oldRowid);\n  }\n\n  /* If the aData[] array contains more than one element, elements\n  ** (aData[2]..aData[argc-1]) contain a new record to insert into\n  ** the r-tree structure.\n  */\n  if( rc==SQLITE_OK && nData>1 && coordChange ){\n    /* Insert the new record into the r-tree */\n    RtreeNode *pLeaf = 0;\n    if( !newRowidValid ){\n      rc = rtreeNewRowid(pRtree, &cell.iRowid);\n    }\n    *pRowid = cell.iRowid;\n    if( rc==SQLITE_OK ){\n      rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);\n    }\n    if( rc==SQLITE_OK ){\n      int rc2;\n      rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);\n      rc2 = nodeRelease(pRtree, pLeaf);\n      if( rc==SQLITE_OK ){\n        rc = rc2;\n      }\n    }\n  }\n\n  /* Change the data */\n  if( rc==SQLITE_OK && nData>1 ){\n    sqlite3_stmt *pUp = pRtree->pWriteAux;\n    int jj;\n    int nChange = 0;\n    sqlite3_bind_int64(pUp, 1, cell.iRowid);\n    assert( pRtree->nAux>=1 );\n    if( sqlite3_value_nochange(aData[2]) ){\n      sqlite3_bind_null(pUp, 2);\n    }else{\n      GeoPoly *p = 0;\n      if( sqlite3_value_type(aData[2])==SQLITE_TEXT\n       && (p = geopolyFuncParam(0, aData[2], &rc))!=0\n       && rc==SQLITE_OK\n      ){\n        sqlite3_bind_blob(pUp, 2, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT);\n      }else{\n        sqlite3_bind_value(pUp, 2, aData[2]);\n      }\n      sqlite3_free(p);\n      nChange = 1;\n    }\n    for(jj=1; jj<nData-2; jj++){\n      nChange++;\n      sqlite3_bind_value(pUp, jj+2, aData[jj+2]);\n    }\n    if( nChange ){\n      sqlite3_step(pUp);\n      rc = sqlite3_reset(pUp);\n    }\n  }\n\ngeopoly_update_end:\n  rtreeRelease(pRtree);\n  return rc;\n}\n\n/*\n** Report that geopoly_overlap() is an overloaded function suitable\n** for use in xBestIndex.\n*/\nstatic int geopolyFindFunction(\n  sqlite3_vtab *pVtab,\n  int nArg,\n  const char *zName,\n  void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),\n  void **ppArg\n){\n  (void)pVtab;\n  (void)nArg;\n  if( sqlite3_stricmp(zName, \"geopoly_overlap\")==0 ){\n    *pxFunc = geopolyOverlapFunc;\n    *ppArg = 0;\n    return SQLITE_INDEX_CONSTRAINT_FUNCTION;\n  }\n  if( sqlite3_stricmp(zName, \"geopoly_within\")==0 ){\n    *pxFunc = geopolyWithinFunc;\n    *ppArg = 0;\n    return SQLITE_INDEX_CONSTRAINT_FUNCTION+1;\n  }\n  return 0;\n}\n\n\nstatic sqlite3_module geopolyModule = {\n  3,                          /* iVersion */\n  geopolyCreate,              /* xCreate - create a table */\n  geopolyConnect,             /* xConnect - connect to an existing table */\n  geopolyBestIndex,           /* xBestIndex - Determine search strategy */\n  rtreeDisconnect,            /* xDisconnect - Disconnect from a table */\n  rtreeDestroy,               /* xDestroy - Drop a table */\n  rtreeOpen,                  /* xOpen - open a cursor */\n  rtreeClose,                 /* xClose - close a cursor */\n  geopolyFilter,              /* xFilter - configure scan constraints */\n  rtreeNext,                  /* xNext - advance a cursor */\n  rtreeEof,                   /* xEof */\n  geopolyColumn,              /* xColumn - read data */\n  rtreeRowid,                 /* xRowid - read data */\n  geopolyUpdate,              /* xUpdate - write data */\n  rtreeBeginTransaction,      /* xBegin - begin transaction */\n  rtreeEndTransaction,        /* xSync - sync transaction */\n  rtreeEndTransaction,        /* xCommit - commit transaction */\n  rtreeEndTransaction,        /* xRollback - rollback transaction */\n  geopolyFindFunction,        /* xFindFunction - function overloading */\n  rtreeRename,                /* xRename - rename the table */\n  rtreeSavepoint,             /* xSavepoint */\n  0,                          /* xRelease */\n  0,                          /* xRollbackTo */\n  rtreeShadowName,            /* xShadowName */\n  rtreeIntegrity              /* xIntegrity */\n};\n\nstatic int sqlite3_geopoly_init(sqlite3 *db){\n  int rc = SQLITE_OK;\n  static const struct {\n    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);\n    signed char nArg;\n    unsigned char bPure;\n    const char *zName;\n  } aFunc[] = {\n     { geopolyAreaFunc,          1, 1,    \"geopoly_area\"             },\n     { geopolyBlobFunc,          1, 1,    \"geopoly_blob\"             },\n     { geopolyJsonFunc,          1, 1,    \"geopoly_json\"             },\n     { geopolySvgFunc,          -1, 1,    \"geopoly_svg\"              },\n     { geopolyWithinFunc,        2, 1,    \"geopoly_within\"           },\n     { geopolyContainsPointFunc, 3, 1,    \"geopoly_contains_point\"   },\n     { geopolyOverlapFunc,       2, 1,    \"geopoly_overlap\"          },\n     { geopolyDebugFunc,         1, 0,    \"geopoly_debug\"            },\n     { geopolyBBoxFunc,          1, 1,    \"geopoly_bbox\"             },\n     { geopolyXformFunc,         7, 1,    \"geopoly_xform\"            },\n     { geopolyRegularFunc,       4, 1,    \"geopoly_regular\"          },\n     { geopolyCcwFunc,           1, 1,    \"geopoly_ccw\"              },\n  };\n  static const struct {\n    void (*xStep)(sqlite3_context*,int,sqlite3_value**);\n    void (*xFinal)(sqlite3_context*);\n    const char *zName;\n  } aAgg[] = {\n     { geopolyBBoxStep, geopolyBBoxFinal, \"geopoly_group_bbox\"    },\n  };\n  unsigned int i;\n  for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){\n    int enc;\n    if( aFunc[i].bPure ){\n      enc = SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS;\n    }else{\n      enc = SQLITE_UTF8|SQLITE_DIRECTONLY;\n    }\n    rc = sqlite3_create_function(db, aFunc[i].zName, aFunc[i].nArg,\n                                 enc, 0,\n                                 aFunc[i].xFunc, 0, 0);\n  }\n  for(i=0; i<sizeof(aAgg)/sizeof(aAgg[0]) && rc==SQLITE_OK; i++){\n    rc = sqlite3_create_function(db, aAgg[i].zName, 1,\n              SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS, 0,\n              0, aAgg[i].xStep, aAgg[i].xFinal);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_module_v2(db, \"geopoly\", &geopolyModule, 0, 0);\n  }\n  return rc;\n}\n\n/************** End of geopoly.c *********************************************/\n/************** Continuing where we left off in rtree.c **********************/\n#endif\n\n/*\n** Register the r-tree module with database handle db. This creates the\n** virtual table module \"rtree\" and the debugging/analysis scalar\n** function \"rtreenode\".\n*/\nSQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){\n  const int utf8 = SQLITE_UTF8;\n  int rc;\n\n  rc = sqlite3_create_function(db, \"rtreenode\", 2, utf8, 0, rtreenode, 0, 0);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_function(db, \"rtreedepth\", 1, utf8, 0,rtreedepth, 0, 0);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_function(db, \"rtreecheck\", -1, utf8, 0,rtreecheck, 0,0);\n  }\n  if( rc==SQLITE_OK ){\n#ifdef SQLITE_RTREE_INT_ONLY\n    void *c = (void *)RTREE_COORD_INT32;\n#else\n    void *c = (void *)RTREE_COORD_REAL32;\n#endif\n    rc = sqlite3_create_module_v2(db, \"rtree\", &rtreeModule, c, 0);\n  }\n  if( rc==SQLITE_OK ){\n    void *c = (void *)RTREE_COORD_INT32;\n    rc = sqlite3_create_module_v2(db, \"rtree_i32\", &rtreeModule, c, 0);\n  }\n#ifdef SQLITE_ENABLE_GEOPOLY\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_geopoly_init(db);\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** This routine deletes the RtreeGeomCallback object that was attached\n** one of the SQL functions create by sqlite3_rtree_geometry_callback()\n** or sqlite3_rtree_query_callback().  In other words, this routine is the\n** destructor for an RtreeGeomCallback objecct.  This routine is called when\n** the corresponding SQL function is deleted.\n*/\nstatic void rtreeFreeCallback(void *p){\n  RtreeGeomCallback *pInfo = (RtreeGeomCallback*)p;\n  if( pInfo->xDestructor ) pInfo->xDestructor(pInfo->pContext);\n  sqlite3_free(p);\n}\n\n/*\n** This routine frees the BLOB that is returned by geomCallback().\n*/\nstatic void rtreeMatchArgFree(void *pArg){\n  int i;\n  RtreeMatchArg *p = (RtreeMatchArg*)pArg;\n  for(i=0; i<p->nParam; i++){\n    sqlite3_value_free(p->apSqlParam[i]);\n  }\n  sqlite3_free(p);\n}\n\n/*\n** Each call to sqlite3_rtree_geometry_callback() or\n** sqlite3_rtree_query_callback() creates an ordinary SQLite\n** scalar function that is implemented by this routine.\n**\n** All this function does is construct an RtreeMatchArg object that\n** contains the geometry-checking callback routines and a list of\n** parameters to this function, then return that RtreeMatchArg object\n** as a BLOB.\n**\n** The R-Tree MATCH operator will read the returned BLOB, deserialize\n** the RtreeMatchArg object, and use the RtreeMatchArg object to figure\n** out which elements of the R-Tree should be returned by the query.\n*/\nstatic void geomCallback(sqlite3_context *ctx, int nArg, sqlite3_value **aArg){\n  RtreeGeomCallback *pGeomCtx = (RtreeGeomCallback *)sqlite3_user_data(ctx);\n  RtreeMatchArg *pBlob;\n  sqlite3_int64 nBlob;\n  int memErr = 0;\n\n  nBlob = SZ_RTREEMATCHARG(nArg) + nArg*sizeof(sqlite3_value*);\n  pBlob = (RtreeMatchArg *)sqlite3_malloc64(nBlob);\n  if( !pBlob ){\n    sqlite3_result_error_nomem(ctx);\n  }else{\n    int i;\n    pBlob->iSize = nBlob;\n    pBlob->cb = pGeomCtx[0];\n    pBlob->apSqlParam = (sqlite3_value**)&pBlob->aParam[nArg];\n    pBlob->nParam = nArg;\n    for(i=0; i<nArg; i++){\n      pBlob->apSqlParam[i] = sqlite3_value_dup(aArg[i]);\n      if( pBlob->apSqlParam[i]==0 ) memErr = 1;\n#ifdef SQLITE_RTREE_INT_ONLY\n      pBlob->aParam[i] = sqlite3_value_int64(aArg[i]);\n#else\n      pBlob->aParam[i] = sqlite3_value_double(aArg[i]);\n#endif\n    }\n    if( memErr ){\n      sqlite3_result_error_nomem(ctx);\n      rtreeMatchArgFree(pBlob);\n    }else{\n      sqlite3_result_pointer(ctx, pBlob, \"RtreeMatchArg\", rtreeMatchArgFree);\n    }\n  }\n}\n\n/*\n** Register a new geometry function for use with the r-tree MATCH operator.\n*/\nSQLITE_API int sqlite3_rtree_geometry_callback(\n  sqlite3 *db,                  /* Register SQL function on this connection */\n  const char *zGeom,            /* Name of the new SQL function */\n  int (*xGeom)(sqlite3_rtree_geometry*,int,RtreeDValue*,int*), /* Callback */\n  void *pContext                /* Extra data associated with the callback */\n){\n  RtreeGeomCallback *pGeomCtx;      /* Context object for new user-function */\n\n  /* Allocate and populate the context object. */\n  pGeomCtx = (RtreeGeomCallback *)sqlite3_malloc(sizeof(RtreeGeomCallback));\n  if( !pGeomCtx ) return SQLITE_NOMEM;\n  pGeomCtx->xGeom = xGeom;\n  pGeomCtx->xQueryFunc = 0;\n  pGeomCtx->xDestructor = 0;\n  pGeomCtx->pContext = pContext;\n  return sqlite3_create_function_v2(db, zGeom, -1, SQLITE_ANY,\n      (void *)pGeomCtx, geomCallback, 0, 0, rtreeFreeCallback\n  );\n}\n\n/*\n** Register a new 2nd-generation geometry function for use with the\n** r-tree MATCH operator.\n*/\nSQLITE_API int sqlite3_rtree_query_callback(\n  sqlite3 *db,                 /* Register SQL function on this connection */\n  const char *zQueryFunc,      /* Name of new SQL function */\n  int (*xQueryFunc)(sqlite3_rtree_query_info*), /* Callback */\n  void *pContext,              /* Extra data passed into the callback */\n  void (*xDestructor)(void*)   /* Destructor for the extra data */\n){\n  RtreeGeomCallback *pGeomCtx;      /* Context object for new user-function */\n\n  /* Allocate and populate the context object. */\n  pGeomCtx = (RtreeGeomCallback *)sqlite3_malloc(sizeof(RtreeGeomCallback));\n  if( !pGeomCtx ){\n    if( xDestructor ) xDestructor(pContext);\n    return SQLITE_NOMEM;\n  }\n  pGeomCtx->xGeom = 0;\n  pGeomCtx->xQueryFunc = xQueryFunc;\n  pGeomCtx->xDestructor = xDestructor;\n  pGeomCtx->pContext = pContext;\n  return sqlite3_create_function_v2(db, zQueryFunc, -1, SQLITE_ANY,\n      (void *)pGeomCtx, geomCallback, 0, 0, rtreeFreeCallback\n  );\n}\n\n#ifndef SQLITE_CORE\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_rtree_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  SQLITE_EXTENSION_INIT2(pApi)\n  return sqlite3RtreeInit(db);\n}\n#endif\n\n#endif\n\n/************** End of rtree.c ***********************************************/\n/************** Begin file icu.c *********************************************/\n/*\n** 2007 May 6\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** $Id: icu.c,v 1.7 2007/12/13 21:54:11 drh Exp $\n**\n** This file implements an integration between the ICU library\n** (\"International Components for Unicode\", an open-source library\n** for handling unicode data) and SQLite. The integration uses\n** ICU to provide the following to SQLite:\n**\n**   * An implementation of the SQL regexp() function (and hence REGEXP\n**     operator) using the ICU uregex_XX() APIs.\n**\n**   * Implementations of the SQL scalar upper() and lower() functions\n**     for case mapping.\n**\n**   * Integration of ICU and SQLite collation sequences.\n**\n**   * An implementation of the LIKE operator that uses ICU to\n**     provide case-independent matching.\n*/\n\n#if !defined(SQLITE_CORE)                  \\\n || defined(SQLITE_ENABLE_ICU)             \\\n || defined(SQLITE_ENABLE_ICU_COLLATIONS)\n\n/* Include ICU headers */\n#include <unicode/utypes.h>\n#include <unicode/uregex.h>\n#include <unicode/ustring.h>\n#include <unicode/ucol.h>\n\n/* #include <assert.h> */\n\n#ifndef SQLITE_CORE\n/*   #include \"sqlite3ext.h\" */\n  SQLITE_EXTENSION_INIT1\n#else\n/*   #include \"sqlite3.h\" */\n#endif\n\n/*\n** This function is called when an ICU function called from within\n** the implementation of an SQL scalar function returns an error.\n**\n** The scalar function context passed as the first argument is\n** loaded with an error message based on the following two args.\n*/\nstatic void icuFunctionError(\n  sqlite3_context *pCtx,       /* SQLite scalar function context */\n  const char *zName,           /* Name of ICU function that failed */\n  UErrorCode e                 /* Error code returned by ICU function */\n){\n  char zBuf[128];\n  sqlite3_snprintf(128, zBuf, \"ICU error: %s(): %s\", zName, u_errorName(e));\n  zBuf[127] = '\\0';\n  sqlite3_result_error(pCtx, zBuf, -1);\n}\n\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU)\n\n/*\n** Maximum length (in bytes) of the pattern in a LIKE or GLOB\n** operator.\n*/\n#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH\n# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000\n#endif\n\n/*\n** Version of sqlite3_free() that is always a function, never a macro.\n*/\nstatic void xFree(void *p){\n  sqlite3_free(p);\n}\n\n/*\n** This lookup table is used to help decode the first byte of\n** a multi-byte UTF8 character. It is copied here from SQLite source\n** code file utf8.c.\n*/\nstatic const unsigned char icuUtf8Trans1[] = {\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,\n};\n\n#define SQLITE_ICU_READ_UTF8(zIn, c)                       \\\n  c = *(zIn++);                                            \\\n  if( c>=0xc0 ){                                           \\\n    c = icuUtf8Trans1[c-0xc0];                             \\\n    while( (*zIn & 0xc0)==0x80 ){                          \\\n      c = (c<<6) + (0x3f & *(zIn++));                      \\\n    }                                                      \\\n  }\n\n#define SQLITE_ICU_SKIP_UTF8(zIn)                          \\\n  assert( *zIn );                                          \\\n  if( *(zIn++)>=0xc0 ){                                    \\\n    while( (*zIn & 0xc0)==0x80 ){zIn++;}                   \\\n  }\n\n\n/*\n** Compare two UTF-8 strings for equality where the first string is\n** a \"LIKE\" expression. Return true (1) if they are the same and\n** false (0) if they are different.\n*/\nstatic int icuLikeCompare(\n  const uint8_t *zPattern,   /* LIKE pattern */\n  const uint8_t *zString,    /* The UTF-8 string to compare against */\n  const UChar32 uEsc         /* The escape character */\n){\n  static const uint32_t MATCH_ONE = (uint32_t)'_';\n  static const uint32_t MATCH_ALL = (uint32_t)'%';\n\n  int prevEscape = 0;     /* True if the previous character was uEsc */\n\n  while( 1 ){\n\n    /* Read (and consume) the next character from the input pattern. */\n    uint32_t uPattern;\n    SQLITE_ICU_READ_UTF8(zPattern, uPattern);\n    if( uPattern==0 ) break;\n\n    /* There are now 4 possibilities:\n    **\n    **     1. uPattern is an unescaped match-all character \"%\",\n    **     2. uPattern is an unescaped match-one character \"_\",\n    **     3. uPattern is an unescaped escape character, or\n    **     4. uPattern is to be handled as an ordinary character\n    */\n    if( uPattern==MATCH_ALL && !prevEscape && uPattern!=(uint32_t)uEsc ){\n      /* Case 1. */\n      uint8_t c;\n\n      /* Skip any MATCH_ALL or MATCH_ONE characters that follow a\n      ** MATCH_ALL. For each MATCH_ONE, skip one character in the\n      ** test string.\n      */\n      while( (c=*zPattern) == MATCH_ALL || c == MATCH_ONE ){\n        if( c==MATCH_ONE ){\n          if( *zString==0 ) return 0;\n          SQLITE_ICU_SKIP_UTF8(zString);\n        }\n        zPattern++;\n      }\n\n      if( *zPattern==0 ) return 1;\n\n      while( *zString ){\n        if( icuLikeCompare(zPattern, zString, uEsc) ){\n          return 1;\n        }\n        SQLITE_ICU_SKIP_UTF8(zString);\n      }\n      return 0;\n\n    }else if( uPattern==MATCH_ONE && !prevEscape && uPattern!=(uint32_t)uEsc ){\n      /* Case 2. */\n      if( *zString==0 ) return 0;\n      SQLITE_ICU_SKIP_UTF8(zString);\n\n    }else if( uPattern==(uint32_t)uEsc && !prevEscape ){\n      /* Case 3. */\n      prevEscape = 1;\n\n    }else{\n      /* Case 4. */\n      uint32_t uString;\n      SQLITE_ICU_READ_UTF8(zString, uString);\n      uString = (uint32_t)u_foldCase((UChar32)uString, U_FOLD_CASE_DEFAULT);\n      uPattern = (uint32_t)u_foldCase((UChar32)uPattern, U_FOLD_CASE_DEFAULT);\n      if( uString!=uPattern ){\n        return 0;\n      }\n      prevEscape = 0;\n    }\n  }\n\n  return *zString==0;\n}\n\n/*\n** Implementation of the like() SQL function.  This function implements\n** the build-in LIKE operator.  The first argument to the function is the\n** pattern and the second argument is the string.  So, the SQL statements:\n**\n**       A LIKE B\n**\n** is implemented as like(B, A). If there is an escape character E,\n**\n**       A LIKE B ESCAPE E\n**\n** is mapped to like(B, A, E).\n*/\nstatic void icuLikeFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const unsigned char *zA = sqlite3_value_text(argv[0]);\n  const unsigned char *zB = sqlite3_value_text(argv[1]);\n  UChar32 uEsc = 0;\n\n  /* Limit the length of the LIKE or GLOB pattern to avoid problems\n  ** of deep recursion and N*N behavior in patternCompare().\n  */\n  if( sqlite3_value_bytes(argv[0])>SQLITE_MAX_LIKE_PATTERN_LENGTH ){\n    sqlite3_result_error(context, \"LIKE or GLOB pattern too complex\", -1);\n    return;\n  }\n\n\n  if( argc==3 ){\n    /* The escape character string must consist of a single UTF-8 character.\n    ** Otherwise, return an error.\n    */\n    int nE= sqlite3_value_bytes(argv[2]);\n    const unsigned char *zE = sqlite3_value_text(argv[2]);\n    int i = 0;\n    if( zE==0 ) return;\n    U8_NEXT(zE, i, nE, uEsc);\n    if( i!=nE){\n      sqlite3_result_error(context,\n          \"ESCAPE expression must be a single character\", -1);\n      return;\n    }\n  }\n\n  if( zA && zB ){\n    sqlite3_result_int(context, icuLikeCompare(zA, zB, uEsc));\n  }\n}\n\n/*\n** Function to delete compiled regexp objects. Registered as\n** a destructor function with sqlite3_set_auxdata().\n*/\nstatic void icuRegexpDelete(void *p){\n  URegularExpression *pExpr = (URegularExpression *)p;\n  uregex_close(pExpr);\n}\n\n/*\n** Implementation of SQLite REGEXP operator. This scalar function takes\n** two arguments. The first is a regular expression pattern to compile\n** the second is a string to match against that pattern. If either\n** argument is an SQL NULL, then NULL Is returned. Otherwise, the result\n** is 1 if the string matches the pattern, or 0 otherwise.\n**\n** SQLite maps the regexp() function to the regexp() operator such\n** that the following two are equivalent:\n**\n**     zString REGEXP zPattern\n**     regexp(zPattern, zString)\n**\n** Uses the following ICU regexp APIs:\n**\n**     uregex_open()\n**     uregex_matches()\n**     uregex_close()\n*/\nstatic void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){\n  UErrorCode status = U_ZERO_ERROR;\n  URegularExpression *pExpr;\n  UBool res;\n  const UChar *zString = sqlite3_value_text16(apArg[1]);\n\n  (void)nArg;  /* Unused parameter */\n\n  /* If the left hand side of the regexp operator is NULL,\n  ** then the result is also NULL.\n  */\n  if( !zString ){\n    return;\n  }\n\n  pExpr = sqlite3_get_auxdata(p, 0);\n  if( !pExpr ){\n    const UChar *zPattern = sqlite3_value_text16(apArg[0]);\n    if( !zPattern ){\n      return;\n    }\n    pExpr = uregex_open(zPattern, -1, 0, 0, &status);\n\n    if( U_SUCCESS(status) ){\n      sqlite3_set_auxdata(p, 0, pExpr, icuRegexpDelete);\n      pExpr = sqlite3_get_auxdata(p, 0);\n    }\n    if( !pExpr ){\n      icuFunctionError(p, \"uregex_open\", status);\n      return;\n    }\n  }\n\n  /* Configure the text that the regular expression operates on. */\n  uregex_setText(pExpr, zString, -1, &status);\n  if( !U_SUCCESS(status) ){\n    icuFunctionError(p, \"uregex_setText\", status);\n    return;\n  }\n\n  /* Attempt the match */\n  res = uregex_matches(pExpr, 0, &status);\n  if( !U_SUCCESS(status) ){\n    icuFunctionError(p, \"uregex_matches\", status);\n    return;\n  }\n\n  /* Set the text that the regular expression operates on to a NULL\n  ** pointer. This is not really necessary, but it is tidier than\n  ** leaving the regular expression object configured with an invalid\n  ** pointer after this function returns.\n  */\n  uregex_setText(pExpr, 0, 0, &status);\n\n  /* Return 1 or 0. */\n  sqlite3_result_int(p, res ? 1 : 0);\n}\n\n/*\n** Implementations of scalar functions for case mapping - upper() and\n** lower(). Function upper() converts its input to upper-case (ABC).\n** Function lower() converts to lower-case (abc).\n**\n** ICU provides two types of case mapping, \"general\" case mapping and\n** \"language specific\". Refer to ICU documentation for the differences\n** between the two.\n**\n** To utilise \"general\" case mapping, the upper() or lower() scalar\n** functions are invoked with one argument:\n**\n**     upper('ABC') -> 'abc'\n**     lower('abc') -> 'ABC'\n**\n** To access ICU \"language specific\" case mapping, upper() or lower()\n** should be invoked with two arguments. The second argument is the name\n** of the locale to use. Passing an empty string (\"\") or SQL NULL value\n** as the second argument is the same as invoking the 1 argument version\n** of upper() or lower().\n**\n**     lower('I', 'en_us') -> 'i'\n**     lower('I', 'tr_tr') -> '\\u131' (small dotless i)\n**\n** http://www.icu-project.org/userguide/posix.html#case_mappings\n*/\nstatic void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){\n  const UChar *zInput;            /* Pointer to input string */\n  UChar *zOutput = 0;             /* Pointer to output buffer */\n  int nInput;                     /* Size of utf-16 input string in bytes */\n  int nOut;                       /* Size of output buffer in bytes */\n  int cnt;\n  int bToUpper;                   /* True for toupper(), false for tolower() */\n  UErrorCode status;\n  const char *zLocale = 0;\n\n  assert(nArg==1 || nArg==2);\n  bToUpper = (sqlite3_user_data(p)!=0);\n  if( nArg==2 ){\n    zLocale = (const char *)sqlite3_value_text(apArg[1]);\n  }\n\n  zInput = sqlite3_value_text16(apArg[0]);\n  if( !zInput ){\n    return;\n  }\n  nOut = nInput = sqlite3_value_bytes16(apArg[0]);\n  if( nOut==0 ){\n    sqlite3_result_text16(p, \"\", 0, SQLITE_STATIC);\n    return;\n  }\n\n  for(cnt=0; cnt<2; cnt++){\n    UChar *zNew = sqlite3_realloc(zOutput, nOut);\n    if( zNew==0 ){\n      sqlite3_free(zOutput);\n      sqlite3_result_error_nomem(p);\n      return;\n    }\n    zOutput = zNew;\n    status = U_ZERO_ERROR;\n    if( bToUpper ){\n      nOut = 2*u_strToUpper(zOutput,nOut/2,zInput,nInput/2,zLocale,&status);\n    }else{\n      nOut = 2*u_strToLower(zOutput,nOut/2,zInput,nInput/2,zLocale,&status);\n    }\n\n    if( U_SUCCESS(status) ){\n      sqlite3_result_text16(p, zOutput, nOut, xFree);\n    }else if( status==U_BUFFER_OVERFLOW_ERROR ){\n      assert( cnt==0 );\n      continue;\n    }else{\n      icuFunctionError(p, bToUpper ? \"u_strToUpper\" : \"u_strToLower\", status);\n    }\n    return;\n  }\n  assert( 0 );     /* Unreachable */\n}\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU) */\n\n/*\n** Collation sequence destructor function. The pCtx argument points to\n** a UCollator structure previously allocated using ucol_open().\n*/\nstatic void icuCollationDel(void *pCtx){\n  UCollator *p = (UCollator *)pCtx;\n  ucol_close(p);\n}\n\n/*\n** Collation sequence comparison function. The pCtx argument points to\n** a UCollator structure previously allocated using ucol_open().\n*/\nstatic int icuCollationColl(\n  void *pCtx,\n  int nLeft,\n  const void *zLeft,\n  int nRight,\n  const void *zRight\n){\n  UCollationResult res;\n  UCollator *p = (UCollator *)pCtx;\n  res = ucol_strcoll(p, (UChar *)zLeft, nLeft/2, (UChar *)zRight, nRight/2);\n  switch( res ){\n    case UCOL_LESS:    return -1;\n    case UCOL_GREATER: return +1;\n    case UCOL_EQUAL:   return 0;\n  }\n  assert(!\"Unexpected return value from ucol_strcoll()\");\n  return 0;\n}\n\n/*\n** Implementation of the scalar function icu_load_collation().\n**\n** This scalar function is used to add ICU collation based collation\n** types to an SQLite database connection. It is intended to be called\n** as follows:\n**\n**     SELECT icu_load_collation(<locale>, <collation-name>);\n**\n** Where <locale> is a string containing an ICU locale identifier (i.e.\n** \"en_AU\", \"tr_TR\" etc.) and <collation-name> is the name of the\n** collation sequence to create.\n*/\nstatic void icuLoadCollation(\n  sqlite3_context *p,\n  int nArg,\n  sqlite3_value **apArg\n){\n  sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);\n  UErrorCode status = U_ZERO_ERROR;\n  const char *zLocale;      /* Locale identifier - (eg. \"jp_JP\") */\n  const char *zName;        /* SQL Collation sequence name (eg. \"japanese\") */\n  UCollator *pUCollator;    /* ICU library collation object */\n  int rc;                   /* Return code from sqlite3_create_collation_x() */\n\n  assert(nArg==2 || nArg==3);\n  (void)nArg; /* Unused parameter */\n  zLocale = (const char *)sqlite3_value_text(apArg[0]);\n  zName = (const char *)sqlite3_value_text(apArg[1]);\n\n  if( !zLocale || !zName ){\n    return;\n  }\n\n  pUCollator = ucol_open(zLocale, &status);\n  if( !U_SUCCESS(status) ){\n    icuFunctionError(p, \"ucol_open\", status);\n    return;\n  }\n  assert(p);\n  if(nArg==3){\n    const char *zOption = (const char*)sqlite3_value_text(apArg[2]);\n    static const struct {\n       const char *zName;\n       UColAttributeValue val;\n    } aStrength[] = {\n      {  \"PRIMARY\",      UCOL_PRIMARY           },\n      {  \"SECONDARY\",    UCOL_SECONDARY         },\n      {  \"TERTIARY\",     UCOL_TERTIARY          },\n      {  \"DEFAULT\",      UCOL_DEFAULT_STRENGTH  },\n      {  \"QUARTERNARY\",  UCOL_QUATERNARY        },\n      {  \"IDENTICAL\",    UCOL_IDENTICAL         },\n    };\n    unsigned int i;\n    for(i=0; i<sizeof(aStrength)/sizeof(aStrength[0]); i++){\n      if( sqlite3_stricmp(zOption,aStrength[i].zName)==0 ){\n        ucol_setStrength(pUCollator, aStrength[i].val);\n        break;\n      }\n    }\n    if( i>=sizeof(aStrength)/sizeof(aStrength[0]) ){\n      sqlite3_str *pStr = sqlite3_str_new(sqlite3_context_db_handle(p));\n      sqlite3_str_appendf(pStr,\n         \"unknown collation strength \\\"%s\\\" - should be one of:\",\n         zOption);\n      for(i=0; i<sizeof(aStrength)/sizeof(aStrength[0]); i++){\n         sqlite3_str_appendf(pStr, \" %s\", aStrength[i].zName);\n      }\n      sqlite3_result_error(p, sqlite3_str_value(pStr), -1);\n      sqlite3_free(sqlite3_str_finish(pStr));\n      return;\n    }\n  }\n  rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator,\n      icuCollationColl, icuCollationDel\n  );\n  if( rc!=SQLITE_OK ){\n    ucol_close(pUCollator);\n    sqlite3_result_error(p, \"Error registering collation function\", -1);\n  }\n}\n\n/*\n** Register the ICU extension functions with database db.\n*/\nSQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){\n# define SQLITEICU_EXTRAFLAGS (SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS)\n  static const struct IcuScalar {\n    const char *zName;                        /* Function name */\n    unsigned char nArg;                       /* Number of arguments */\n    unsigned int enc;                         /* Optimal text encoding */\n    unsigned char iContext;                   /* sqlite3_user_data() context */\n    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);\n  } scalars[] = {\n    {\"icu_load_collation\",2,SQLITE_UTF8|SQLITE_DIRECTONLY,1, icuLoadCollation},\n    {\"icu_load_collation\",3,SQLITE_UTF8|SQLITE_DIRECTONLY,1, icuLoadCollation},\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU)\n    {\"regexp\", 2, SQLITE_ANY|SQLITEICU_EXTRAFLAGS,         0, icuRegexpFunc},\n    {\"lower\",  1, SQLITE_UTF16|SQLITEICU_EXTRAFLAGS,       0, icuCaseFunc16},\n    {\"lower\",  2, SQLITE_UTF16|SQLITEICU_EXTRAFLAGS,       0, icuCaseFunc16},\n    {\"upper\",  1, SQLITE_UTF16|SQLITEICU_EXTRAFLAGS,       1, icuCaseFunc16},\n    {\"upper\",  2, SQLITE_UTF16|SQLITEICU_EXTRAFLAGS,       1, icuCaseFunc16},\n    {\"lower\",  1, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        0, icuCaseFunc16},\n    {\"lower\",  2, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        0, icuCaseFunc16},\n    {\"upper\",  1, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        1, icuCaseFunc16},\n    {\"upper\",  2, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        1, icuCaseFunc16},\n    {\"like\",   2, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        0, icuLikeFunc},\n    {\"like\",   3, SQLITE_UTF8|SQLITEICU_EXTRAFLAGS,        0, icuLikeFunc},\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU) */\n  };\n  int rc = SQLITE_OK;\n  int i;\n\n  for(i=0; rc==SQLITE_OK && i<(int)(sizeof(scalars)/sizeof(scalars[0])); i++){\n    const struct IcuScalar *p = &scalars[i];\n    rc = sqlite3_create_function(\n        db, p->zName, p->nArg, p->enc,\n        p->iContext ? (void*)db : (void*)0,\n        p->xFunc, 0, 0\n    );\n  }\n\n  return rc;\n}\n\n#ifndef SQLITE_CORE\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_icu_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  SQLITE_EXTENSION_INIT2(pApi)\n  return sqlite3IcuInit(db);\n}\n#endif\n\n#endif\n\n/************** End of icu.c *************************************************/\n/************** Begin file fts3_icu.c ****************************************/\n/*\n** 2007 June 22\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This file implements a tokenizer for fts3 based on the ICU library.\n*/\n/* #include \"fts3Int.h\" */\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)\n#ifdef SQLITE_ENABLE_ICU\n\n/* #include <assert.h> */\n/* #include <string.h> */\n/* #include \"fts3_tokenizer.h\" */\n\n#include <unicode/ubrk.h>\n/* #include <unicode/ucol.h> */\n/* #include <unicode/ustring.h> */\n#include <unicode/utf16.h>\n\ntypedef struct IcuTokenizer IcuTokenizer;\ntypedef struct IcuCursor IcuCursor;\n\nstruct IcuTokenizer {\n  sqlite3_tokenizer base;\n  char *zLocale;\n};\n\nstruct IcuCursor {\n  sqlite3_tokenizer_cursor base;\n\n  UBreakIterator *pIter;      /* ICU break-iterator object */\n  int nChar;                  /* Number of UChar elements in pInput */\n  UChar *aChar;               /* Copy of input using utf-16 encoding */\n  int *aOffset;               /* Offsets of each character in utf-8 input */\n\n  int nBuffer;\n  char *zBuffer;\n\n  int iToken;\n};\n\n/*\n** Create a new tokenizer instance.\n*/\nstatic int icuCreate(\n  int argc,                            /* Number of entries in argv[] */\n  const char * const *argv,            /* Tokenizer creation arguments */\n  sqlite3_tokenizer **ppTokenizer      /* OUT: Created tokenizer */\n){\n  IcuTokenizer *p;\n  int n = 0;\n\n  if( argc>0 ){\n    n = strlen(argv[0])+1;\n  }\n  p = (IcuTokenizer *)sqlite3_malloc64(sizeof(IcuTokenizer)+n);\n  if( !p ){\n    return SQLITE_NOMEM;\n  }\n  memset(p, 0, sizeof(IcuTokenizer));\n\n  if( n ){\n    p->zLocale = (char *)&p[1];\n    memcpy(p->zLocale, argv[0], n);\n  }\n\n  *ppTokenizer = (sqlite3_tokenizer *)p;\n\n  return SQLITE_OK;\n}\n\n/*\n** Destroy a tokenizer\n*/\nstatic int icuDestroy(sqlite3_tokenizer *pTokenizer){\n  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n/*\n** Prepare to begin tokenizing a particular string.  The input\n** string to be tokenized is pInput[0..nBytes-1].  A cursor\n** used to incrementally tokenize this string is returned in\n** *ppCursor.\n*/\nstatic int icuOpen(\n  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */\n  const char *zInput,                    /* Input string */\n  int nInput,                            /* Length of zInput in bytes */\n  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */\n){\n  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;\n  IcuCursor *pCsr;\n\n  const int32_t opt = U_FOLD_CASE_DEFAULT;\n  UErrorCode status = U_ZERO_ERROR;\n  int nChar;\n\n  UChar32 c;\n  int iInput = 0;\n  int iOut = 0;\n\n  *ppCursor = 0;\n\n  if( zInput==0 ){\n    nInput = 0;\n    zInput = \"\";\n  }else if( nInput<0 ){\n    nInput = strlen(zInput);\n  }\n  nChar = nInput+1;\n  pCsr = (IcuCursor *)sqlite3_malloc64(\n      sizeof(IcuCursor) +                /* IcuCursor */\n      ((nChar+3)&~3) * sizeof(UChar) +   /* IcuCursor.aChar[] */\n      (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */\n  );\n  if( !pCsr ){\n    return SQLITE_NOMEM;\n  }\n  memset(pCsr, 0, sizeof(IcuCursor));\n  pCsr->aChar = (UChar *)&pCsr[1];\n  pCsr->aOffset = (int *)&pCsr->aChar[(nChar+3)&~3];\n\n  pCsr->aOffset[iOut] = iInput;\n  U8_NEXT(zInput, iInput, nInput, c);\n  while( c>0 ){\n    int isError = 0;\n    c = u_foldCase(c, opt);\n    U16_APPEND(pCsr->aChar, iOut, nChar, c, isError);\n    if( isError ){\n      sqlite3_free(pCsr);\n      return SQLITE_ERROR;\n    }\n    pCsr->aOffset[iOut] = iInput;\n\n    if( iInput<nInput ){\n      U8_NEXT(zInput, iInput, nInput, c);\n    }else{\n      c = 0;\n    }\n  }\n\n  pCsr->pIter = ubrk_open(UBRK_WORD, p->zLocale, pCsr->aChar, iOut, &status);\n  if( !U_SUCCESS(status) ){\n    sqlite3_free(pCsr);\n    return SQLITE_ERROR;\n  }\n  pCsr->nChar = iOut;\n\n  ubrk_first(pCsr->pIter);\n  *ppCursor = (sqlite3_tokenizer_cursor *)pCsr;\n  return SQLITE_OK;\n}\n\n/*\n** Close a tokenization cursor previously opened by a call to icuOpen().\n*/\nstatic int icuClose(sqlite3_tokenizer_cursor *pCursor){\n  IcuCursor *pCsr = (IcuCursor *)pCursor;\n  ubrk_close(pCsr->pIter);\n  sqlite3_free(pCsr->zBuffer);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** Extract the next token from a tokenization cursor.\n*/\nstatic int icuNext(\n  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */\n  const char **ppToken,               /* OUT: *ppToken is the token text */\n  int *pnBytes,                       /* OUT: Number of bytes in token */\n  int *piStartOffset,                 /* OUT: Starting offset of token */\n  int *piEndOffset,                   /* OUT: Ending offset of token */\n  int *piPosition                     /* OUT: Position integer of token */\n){\n  IcuCursor *pCsr = (IcuCursor *)pCursor;\n\n  int iStart = 0;\n  int iEnd = 0;\n  int nByte = 0;\n\n  while( iStart==iEnd ){\n    UChar32 c;\n\n    iStart = ubrk_current(pCsr->pIter);\n    iEnd = ubrk_next(pCsr->pIter);\n    if( iEnd==UBRK_DONE ){\n      return SQLITE_DONE;\n    }\n\n    while( iStart<iEnd ){\n      int iWhite = iStart;\n      U16_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);\n      if( u_isspace(c) ){\n        iStart = iWhite;\n      }else{\n        break;\n      }\n    }\n    assert(iStart<=iEnd);\n  }\n\n  do {\n    UErrorCode status = U_ZERO_ERROR;\n    if( nByte ){\n      char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);\n      if( !zNew ){\n        return SQLITE_NOMEM;\n      }\n      pCsr->zBuffer = zNew;\n      pCsr->nBuffer = nByte;\n    }\n\n    u_strToUTF8(\n        pCsr->zBuffer, pCsr->nBuffer, &nByte,    /* Output vars */\n        &pCsr->aChar[iStart], iEnd-iStart,       /* Input vars */\n        &status                                  /* Output success/failure */\n    );\n  } while( nByte>pCsr->nBuffer );\n\n  *ppToken = pCsr->zBuffer;\n  *pnBytes = nByte;\n  *piStartOffset = pCsr->aOffset[iStart];\n  *piEndOffset = pCsr->aOffset[iEnd];\n  *piPosition = pCsr->iToken++;\n\n  return SQLITE_OK;\n}\n\n/*\n** The set of routines that implement the simple tokenizer\n*/\nstatic const sqlite3_tokenizer_module icuTokenizerModule = {\n  0,                           /* iVersion    */\n  icuCreate,                   /* xCreate     */\n  icuDestroy,                  /* xCreate     */\n  icuOpen,                     /* xOpen       */\n  icuClose,                    /* xClose      */\n  icuNext,                     /* xNext       */\n  0,                           /* xLanguageid */\n};\n\n/*\n** Set *ppModule to point at the implementation of the ICU tokenizer.\n*/\nSQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(\n  sqlite3_tokenizer_module const**ppModule\n){\n  *ppModule = &icuTokenizerModule;\n}\n\n#endif /* defined(SQLITE_ENABLE_ICU) */\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */\n\n/************** End of fts3_icu.c ********************************************/\n/************** Begin file sqlite3rbu.c **************************************/\n/*\n** 2014 August 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n**\n** OVERVIEW\n**\n**  The RBU extension requires that the RBU update be packaged as an\n**  SQLite database. The tables it expects to find are described in\n**  sqlite3rbu.h.  Essentially, for each table xyz in the target database\n**  that the user wishes to write to, a corresponding data_xyz table is\n**  created in the RBU database and populated with one row for each row to\n**  update, insert or delete from the target table.\n**\n**  The update proceeds in three stages:\n**\n**  1) The database is updated. The modified database pages are written\n**     to a *-oal file. A *-oal file is just like a *-wal file, except\n**     that it is named \"<database>-oal\" instead of \"<database>-wal\".\n**     Because regular SQLite clients do not look for file named\n**     \"<database>-oal\", they go on using the original database in\n**     rollback mode while the *-oal file is being generated.\n**\n**     During this stage RBU does not update the database by writing\n**     directly to the target tables. Instead it creates \"imposter\"\n**     tables using the SQLITE_TESTCTRL_IMPOSTER interface that it uses\n**     to update each b-tree individually. All updates required by each\n**     b-tree are completed before moving on to the next, and all\n**     updates are done in sorted key order.\n**\n**  2) The \"<database>-oal\" file is moved to the equivalent \"<database>-wal\"\n**     location using a call to rename(2). Before doing this the RBU\n**     module takes an EXCLUSIVE lock on the database file, ensuring\n**     that there are no other active readers.\n**\n**     Once the EXCLUSIVE lock is released, any other database readers\n**     detect the new *-wal file and read the database in wal mode. At\n**     this point they see the new version of the database - including\n**     the updates made as part of the RBU update.\n**\n**  3) The new *-wal file is checkpointed. This proceeds in the same way\n**     as a regular database checkpoint, except that a single frame is\n**     checkpointed each time sqlite3rbu_step() is called. If the RBU\n**     handle is closed before the entire *-wal file is checkpointed,\n**     the checkpoint progress is saved in the RBU database and the\n**     checkpoint can be resumed by another RBU client at some point in\n**     the future.\n**\n** POTENTIAL PROBLEMS\n**\n**  The rename() call might not be portable. And RBU is not currently\n**  syncing the directory after renaming the file.\n**\n**  When state is saved, any commit to the *-oal file and the commit to\n**  the RBU update database are not atomic. So if the power fails at the\n**  wrong moment they might get out of sync. As the main database will be\n**  committed before the RBU update database this will likely either just\n**  pass unnoticed, or result in SQLITE_CONSTRAINT errors (due to UNIQUE\n**  constraint violations).\n**\n**  If some client does modify the target database mid RBU update, or some\n**  other error occurs, the RBU extension will keep throwing errors. It's\n**  not really clear how to get out of this state. The system could just\n**  by delete the RBU update database and *-oal file and have the device\n**  download the update again and start over.\n**\n**  At present, for an UPDATE, both the new.* and old.* records are\n**  collected in the rbu_xyz table. And for both UPDATEs and DELETEs all\n**  fields are collected.  This means we're probably writing a lot more\n**  data to disk when saving the state of an ongoing update to the RBU\n**  update database than is strictly necessary.\n**\n*/\n\n/* #include <assert.h> */\n/* #include <string.h> */\n/* #include <stdio.h> */\n\n/* #include \"sqlite3.h\" */\n\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)\n/************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/\n/************** Begin file sqlite3rbu.h **************************************/\n/*\n** 2014 August 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file contains the public interface for the RBU extension.\n*/\n\n/*\n** SUMMARY\n**\n** Writing a transaction containing a large number of operations on\n** b-tree indexes that are collectively larger than the available cache\n** memory can be very inefficient.\n**\n** The problem is that in order to update a b-tree, the leaf page (at least)\n** containing the entry being inserted or deleted must be modified. If the\n** working set of leaves is larger than the available cache memory, then a\n** single leaf that is modified more than once as part of the transaction\n** may be loaded from or written to the persistent media multiple times.\n** Additionally, because the index updates are likely to be applied in\n** random order, access to pages within the database is also likely to be in\n** random order, which is itself quite inefficient.\n**\n** One way to improve the situation is to sort the operations on each index\n** by index key before applying them to the b-tree. This leads to an IO\n** pattern that resembles a single linear scan through the index b-tree,\n** and all but guarantees each modified leaf page is loaded and stored\n** exactly once. SQLite uses this trick to improve the performance of\n** CREATE INDEX commands. This extension allows it to be used to improve\n** the performance of large transactions on existing databases.\n**\n** Additionally, this extension allows the work involved in writing the\n** large transaction to be broken down into sub-transactions performed\n** sequentially by separate processes. This is useful if the system cannot\n** guarantee that a single update process will run for long enough to apply\n** the entire update, for example because the update is being applied on a\n** mobile device that is frequently rebooted. Even after the writer process\n** has committed one or more sub-transactions, other database clients continue\n** to read from the original database snapshot. In other words, partially\n** applied transactions are not visible to other clients.\n**\n** \"RBU\" stands for \"Resumable Bulk Update\". As in a large database update\n** transmitted via a wireless network to a mobile device. A transaction\n** applied using this extension is hence referred to as an \"RBU update\".\n**\n**\n** LIMITATIONS\n**\n** An \"RBU update\" transaction is subject to the following limitations:\n**\n**   * The transaction must consist of INSERT, UPDATE and DELETE operations\n**     only.\n**\n**   * INSERT statements may not use any default values.\n**\n**   * UPDATE and DELETE statements must identify their target rows by\n**     non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY\n**     KEY fields may not be updated or deleted. If the table being written\n**     has no PRIMARY KEY, affected rows must be identified by rowid.\n**\n**   * UPDATE statements may not modify PRIMARY KEY columns.\n**\n**   * No triggers will be fired.\n**\n**   * No foreign key violations are detected or reported.\n**\n**   * CHECK constraints are not enforced.\n**\n**   * No constraint handling mode except for \"OR ROLLBACK\" is supported.\n**\n**\n** PREPARATION\n**\n** An \"RBU update\" is stored as a separate SQLite database. A database\n** containing an RBU update is an \"RBU database\". For each table in the\n** target database to be updated, the RBU database should contain a table\n** named \"data_<target name>\" containing the same set of columns as the\n** target table, and one more - \"rbu_control\". The data_% table should\n** have no PRIMARY KEY or UNIQUE constraints, but each column should have\n** the same type as the corresponding column in the target database.\n** The \"rbu_control\" column should have no type at all. For example, if\n** the target database contains:\n**\n**   CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE);\n**\n** Then the RBU database should contain:\n**\n**   CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control);\n**\n** The order of the columns in the data_% table does not matter.\n**\n** Instead of a regular table, the RBU database may also contain virtual\n** tables or views named using the data_<target> naming scheme.\n**\n** Instead of the plain data_<target> naming scheme, RBU database tables\n** may also be named data<integer>_<target>, where <integer> is any sequence\n** of zero or more numeric characters (0-9). This can be significant because\n** tables within the RBU database are always processed in order sorted by\n** name. By judicious selection of the <integer> portion of the names\n** of the RBU tables the user can therefore control the order in which they\n** are processed. This can be useful, for example, to ensure that \"external\n** content\" FTS4 tables are updated before their underlying content tables.\n**\n** If the target database table is a virtual table or a table that has no\n** PRIMARY KEY declaration, the data_% table must also contain a column\n** named \"rbu_rowid\". This column is mapped to the table's implicit primary\n** key column - \"rowid\". Virtual tables for which the \"rowid\" column does\n** not function like a primary key value cannot be updated using RBU. For\n** example, if the target db contains either of the following:\n**\n**   CREATE VIRTUAL TABLE x1 USING fts3(a, b);\n**   CREATE TABLE x1(a, b)\n**\n** then the RBU database should contain:\n**\n**   CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control);\n**\n** All non-hidden columns (i.e. all columns matched by \"SELECT *\") of the\n** target table must be present in the input table. For virtual tables,\n** hidden columns are optional - they are updated by RBU if present in\n** the input table, or not otherwise. For example, to write to an fts4\n** table with a hidden languageid column such as:\n**\n**   CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid');\n**\n** Either of the following input table schemas may be used:\n**\n**   CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control);\n**   CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control);\n**\n** For each row to INSERT into the target database as part of the RBU\n** update, the corresponding data_% table should contain a single record\n** with the \"rbu_control\" column set to contain integer value 0. The\n** other columns should be set to the values that make up the new record\n** to insert.\n**\n** If the target database table has an INTEGER PRIMARY KEY, it is not\n** possible to insert a NULL value into the IPK column. Attempting to\n** do so results in an SQLITE_MISMATCH error.\n**\n** For each row to DELETE from the target database as part of the RBU\n** update, the corresponding data_% table should contain a single record\n** with the \"rbu_control\" column set to contain integer value 1. The\n** real primary key values of the row to delete should be stored in the\n** corresponding columns of the data_% table. The values stored in the\n** other columns are not used.\n**\n** For each row to UPDATE from the target database as part of the RBU\n** update, the corresponding data_% table should contain a single record\n** with the \"rbu_control\" column set to contain a value of type text.\n** The real primary key values identifying the row to update should be\n** stored in the corresponding columns of the data_% table row, as should\n** the new values of all columns being update. The text value in the\n** \"rbu_control\" column must contain the same number of characters as\n** there are columns in the target database table, and must consist entirely\n** of 'x' and '.' characters (or in some special cases 'd' - see below). For\n** each column that is being updated, the corresponding character is set to\n** 'x'. For those that remain as they are, the corresponding character of the\n** rbu_control value should be set to '.'. For example, given the tables\n** above, the update statement:\n**\n**   UPDATE t1 SET c = 'usa' WHERE a = 4;\n**\n** is represented by the data_t1 row created by:\n**\n**   INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x');\n**\n** Instead of an 'x' character, characters of the rbu_control value specified\n** for UPDATEs may also be set to 'd'. In this case, instead of updating the\n** target table with the value stored in the corresponding data_% column, the\n** user-defined SQL function \"rbu_delta()\" is invoked and the result stored in\n** the target table column. rbu_delta() is invoked with two arguments - the\n** original value currently stored in the target table column and the\n** value specified in the data_xxx table.\n**\n** For example, this row:\n**\n**   INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d');\n**\n** is similar to an UPDATE statement such as:\n**\n**   UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4;\n**\n** Finally, if an 'f' character appears in place of a 'd' or 's' in an\n** ota_control string, the contents of the data_xxx table column is assumed\n** to be a \"fossil delta\" - a patch to be applied to a blob value in the\n** format used by the fossil source-code management system. In this case\n** the existing value within the target database table must be of type BLOB.\n** It is replaced by the result of applying the specified fossil delta to\n** itself.\n**\n** If the target database table is a virtual table or a table with no PRIMARY\n** KEY, the rbu_control value should not include a character corresponding\n** to the rbu_rowid value. For example, this:\n**\n**   INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control)\n**       VALUES(NULL, 'usa', 12, '.x');\n**\n** causes a result similar to:\n**\n**   UPDATE ft1 SET b = 'usa' WHERE rowid = 12;\n**\n** The data_xxx tables themselves should have no PRIMARY KEY declarations.\n** However, RBU is more efficient if reading the rows in from each data_xxx\n** table in \"rowid\" order is roughly the same as reading them sorted by\n** the PRIMARY KEY of the corresponding target database table. In other\n** words, rows should be sorted using the destination table PRIMARY KEY\n** fields before they are inserted into the data_xxx tables.\n**\n** USAGE\n**\n** The API declared below allows an application to apply an RBU update\n** stored on disk to an existing target database. Essentially, the\n** application:\n**\n**     1) Opens an RBU handle using the sqlite3rbu_open() function.\n**\n**     2) Registers any required virtual table modules with the database\n**        handle returned by sqlite3rbu_db(). Also, if required, register\n**        the rbu_delta() implementation.\n**\n**     3) Calls the sqlite3rbu_step() function one or more times on\n**        the new handle. Each call to sqlite3rbu_step() performs a single\n**        b-tree operation, so thousands of calls may be required to apply\n**        a complete update.\n**\n**     4) Calls sqlite3rbu_close() to close the RBU update handle. If\n**        sqlite3rbu_step() has been called enough times to completely\n**        apply the update to the target database, then the RBU database\n**        is marked as fully applied. Otherwise, the state of the RBU\n**        update application is saved in the RBU database for later\n**        resumption.\n**\n** See comments below for more detail on APIs.\n**\n** If an update is only partially applied to the target database by the\n** time sqlite3rbu_close() is called, various state information is saved\n** within the RBU database. This allows subsequent processes to automatically\n** resume the RBU update from where it left off.\n**\n** To remove all RBU extension state information, returning an RBU database\n** to its original contents, it is sufficient to drop all tables that begin\n** with the prefix \"rbu_\"\n**\n** DATABASE LOCKING\n**\n** An RBU update may not be applied to a database in WAL mode. Attempting\n** to do so is an error (SQLITE_ERROR).\n**\n** While an RBU handle is open, a SHARED lock may be held on the target\n** database file. This means it is possible for other clients to read the\n** database, but not to write it.\n**\n** If an RBU update is started and then suspended before it is completed,\n** then an external client writes to the database, then attempting to resume\n** the suspended RBU update is also an error (SQLITE_BUSY).\n*/\n\n#ifndef _SQLITE3RBU_H\n#define _SQLITE3RBU_H\n\n/* #include \"sqlite3.h\"              ** Required for error code definitions ** */\n\n#if 0\nextern \"C\" {\n#endif\n\ntypedef struct sqlite3rbu sqlite3rbu;\n\n/*\n** Open an RBU handle.\n**\n** Argument zTarget is the path to the target database. Argument zRbu is\n** the path to the RBU database. Each call to this function must be matched\n** by a call to sqlite3rbu_close(). When opening the databases, RBU passes\n** the SQLITE_CONFIG_URI flag to sqlite3_open_v2(). So if either zTarget\n** or zRbu begin with \"file:\", it will be interpreted as an SQLite\n** database URI, not a regular file name.\n**\n** If the zState argument is passed a NULL value, the RBU extension stores\n** the current state of the update (how many rows have been updated, which\n** indexes are yet to be updated etc.) within the RBU database itself. This\n** can be convenient, as it means that the RBU application does not need to\n** organize removing a separate state file after the update is concluded.\n** Or, if zState is non-NULL, it must be a path to a database file in which\n** the RBU extension can store the state of the update.\n**\n** When resuming an RBU update, the zState argument must be passed the same\n** value as when the RBU update was started.\n**\n** Once the RBU update is finished, the RBU extension does not\n** automatically remove any zState database file, even if it created it.\n**\n** By default, RBU uses the default VFS to access the files on disk. To\n** use a VFS other than the default, an SQLite \"file:\" URI containing a\n** \"vfs=...\" option may be passed as the zTarget option.\n**\n** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of\n** SQLite's built-in VFSs, including the multiplexor VFS. However it does\n** not work out of the box with zipvfs. Refer to the comment describing\n** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.\n*/\nSQLITE_API sqlite3rbu *sqlite3rbu_open(\n  const char *zTarget,\n  const char *zRbu,\n  const char *zState\n);\n\n/*\n** Open an RBU handle to perform an RBU vacuum on database file zTarget.\n** An RBU vacuum is similar to SQLite's built-in VACUUM command, except\n** that it can be suspended and resumed like an RBU update.\n**\n** The second argument to this function identifies a database in which\n** to store the state of the RBU vacuum operation if it is suspended. The\n** first time sqlite3rbu_vacuum() is called, to start an RBU vacuum\n** operation, the state database should either not exist or be empty\n** (contain no tables). If an RBU vacuum is suspended by calling\n** sqlite3rbu_close() on the RBU handle before sqlite3rbu_step() has\n** returned SQLITE_DONE, the vacuum state is stored in the state database.\n** The vacuum can be resumed by calling this function to open a new RBU\n** handle specifying the same target and state databases.\n**\n** If the second argument passed to this function is NULL, then the\n** name of the state database is \"<database>-vacuum\", where <database>\n** is the name of the target database file. In this case, on UNIX, if the\n** state database is not already present in the file-system, it is created\n** with the same permissions as the target db is made.\n**\n** With an RBU vacuum, it is an SQLITE_MISUSE error if the name of the\n** state database ends with \"-vactmp\". This name is reserved for internal\n** use.\n**\n** This function does not delete the state database after an RBU vacuum\n** is completed, even if it created it. However, if the call to\n** sqlite3rbu_close() returns any value other than SQLITE_OK, the contents\n** of the state tables within the state database are zeroed. This way,\n** the next call to sqlite3rbu_vacuum() opens a handle that starts a\n** new RBU vacuum operation.\n**\n** As with sqlite3rbu_open(), Zipvfs users should refer to the comment\n** describing the sqlite3rbu_create_vfs() API function below for\n** a description of the complications associated with using RBU with\n** zipvfs databases.\n*/\nSQLITE_API sqlite3rbu *sqlite3rbu_vacuum(\n  const char *zTarget,\n  const char *zState\n);\n\n/*\n** Configure a limit for the amount of temp space that may be used by\n** the RBU handle passed as the first argument. The new limit is specified\n** in bytes by the second parameter. If it is positive, the limit is updated.\n** If the second parameter to this function is passed zero, then the limit\n** is removed entirely. If the second parameter is negative, the limit is\n** not modified (this is useful for querying the current limit).\n**\n** In all cases the returned value is the current limit in bytes (zero\n** indicates unlimited).\n**\n** If the temp space limit is exceeded during operation, an SQLITE_FULL\n** error is returned.\n*/\nSQLITE_API sqlite3_int64 sqlite3rbu_temp_size_limit(sqlite3rbu*, sqlite3_int64);\n\n/*\n** Return the current amount of temp file space, in bytes, currently used by\n** the RBU handle passed as the only argument.\n*/\nSQLITE_API sqlite3_int64 sqlite3rbu_temp_size(sqlite3rbu*);\n\n/*\n** Internally, each RBU connection uses a separate SQLite database\n** connection to access the target and rbu update databases. This\n** API allows the application direct access to these database handles.\n**\n** The first argument passed to this function must be a valid, open, RBU\n** handle. The second argument should be passed zero to access the target\n** database handle, or non-zero to access the rbu update database handle.\n** Accessing the underlying database handles may be useful in the\n** following scenarios:\n**\n**   * If any target tables are virtual tables, it may be necessary to\n**     call sqlite3_create_module() on the target database handle to\n**     register the required virtual table implementations.\n**\n**   * If the data_xxx tables in the RBU source database are virtual\n**     tables, the application may need to call sqlite3_create_module() on\n**     the rbu update db handle to any required virtual table\n**     implementations.\n**\n**   * If the application uses the \"rbu_delta()\" feature described above,\n**     it must use sqlite3_create_function() or similar to register the\n**     rbu_delta() implementation with the target database handle.\n**\n** If an error has occurred, either while opening or stepping the RBU object,\n** this function may return NULL. The error code and message may be collected\n** when sqlite3rbu_close() is called.\n**\n** Database handles returned by this function remain valid until the next\n** call to any sqlite3rbu_xxx() function other than sqlite3rbu_db().\n*/\nSQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu*, int bRbu);\n\n/*\n** Do some work towards applying the RBU update to the target db.\n**\n** Return SQLITE_DONE if the update has been completely applied, or\n** SQLITE_OK if no error occurs but there remains work to do to apply\n** the RBU update. If an error does occur, some other error code is\n** returned.\n**\n** Once a call to sqlite3rbu_step() has returned a value other than\n** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops\n** that immediately return the same value.\n*/\nSQLITE_API int sqlite3rbu_step(sqlite3rbu *pRbu);\n\n/*\n** Force RBU to save its state to disk.\n**\n** If a power failure or application crash occurs during an update, following\n** system recovery RBU may resume the update from the point at which the state\n** was last saved. In other words, from the most recent successful call to\n** sqlite3rbu_close() or this function.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n*/\nSQLITE_API int sqlite3rbu_savestate(sqlite3rbu *pRbu);\n\n/*\n** Close an RBU handle.\n**\n** If the RBU update has been completely applied, mark the RBU database\n** as fully applied. Otherwise, assuming no error has occurred, save the\n** current state of the RBU update application to the RBU database.\n**\n** If an error has already occurred as part of an sqlite3rbu_step()\n** or sqlite3rbu_open() call, or if one occurs within this function, an\n** SQLite error code is returned. Additionally, if pzErrmsg is not NULL,\n** *pzErrmsg may be set to point to a buffer containing a utf-8 formatted\n** English language error message. It is the responsibility of the caller to\n** eventually free any such buffer using sqlite3_free().\n**\n** Otherwise, if no error occurs, this function returns SQLITE_OK if the\n** update has been partially applied, or SQLITE_DONE if it has been\n** completely applied.\n*/\nSQLITE_API int sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);\n\n/*\n** Return the total number of key-value operations (inserts, deletes or\n** updates) that have been performed on the target database since the\n** current RBU update was started.\n*/\nSQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu);\n\n/*\n** Obtain permyriadage (permyriadage is to 10000 as percentage is to 100)\n** progress indications for the two stages of an RBU update. This API may\n** be useful for driving GUI progress indicators and similar.\n**\n** An RBU update is divided into two stages:\n**\n**   * Stage 1, in which changes are accumulated in an oal/wal file, and\n**   * Stage 2, in which the contents of the wal file are copied into the\n**     main database.\n**\n** The update is visible to non-RBU clients during stage 2. During stage 1\n** non-RBU reader clients may see the original database.\n**\n** If this API is called during stage 2 of the update, output variable\n** (*pnOne) is set to 10000 to indicate that stage 1 has finished and (*pnTwo)\n** to a value between 0 and 10000 to indicate the permyriadage progress of\n** stage 2. A value of 5000 indicates that stage 2 is half finished,\n** 9000 indicates that it is 90% finished, and so on.\n**\n** If this API is called during stage 1 of the update, output variable\n** (*pnTwo) is set to 0 to indicate that stage 2 has not yet started. The\n** value to which (*pnOne) is set depends on whether or not the RBU\n** database contains an \"rbu_count\" table. The rbu_count table, if it\n** exists, must contain the same columns as the following:\n**\n**   CREATE TABLE rbu_count(tbl TEXT PRIMARY KEY, cnt INTEGER) WITHOUT ROWID;\n**\n** There must be one row in the table for each source (data_xxx) table within\n** the RBU database. The 'tbl' column should contain the name of the source\n** table. The 'cnt' column should contain the number of rows within the\n** source table.\n**\n** If the rbu_count table is present and populated correctly and this\n** API is called during stage 1, the *pnOne output variable is set to the\n** permyriadage progress of the same stage. If the rbu_count table does\n** not exist, then (*pnOne) is set to -1 during stage 1. If the rbu_count\n** table exists but is not correctly populated, the value of the *pnOne\n** output variable during stage 1 is undefined.\n*/\nSQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *pRbu, int *pnOne, int*pnTwo);\n\n/*\n** Obtain an indication as to the current stage of an RBU update or vacuum.\n** This function always returns one of the SQLITE_RBU_STATE_XXX constants\n** defined in this file. Return values should be interpreted as follows:\n**\n** SQLITE_RBU_STATE_OAL:\n**   RBU is currently building a *-oal file. The next call to sqlite3rbu_step()\n**   may either add further data to the *-oal file, or compute data that will\n**   be added by a subsequent call.\n**\n** SQLITE_RBU_STATE_MOVE:\n**   RBU has finished building the *-oal file. The next call to sqlite3rbu_step()\n**   will move the *-oal file to the equivalent *-wal path. If the current\n**   operation is an RBU update, then the updated version of the database\n**   file will become visible to ordinary SQLite clients following the next\n**   call to sqlite3rbu_step().\n**\n** SQLITE_RBU_STATE_CHECKPOINT:\n**   RBU is currently performing an incremental checkpoint. The next call to\n**   sqlite3rbu_step() will copy a page of data from the *-wal file into\n**   the target database file.\n**\n** SQLITE_RBU_STATE_DONE:\n**   The RBU operation has finished. Any subsequent calls to sqlite3rbu_step()\n**   will immediately return SQLITE_DONE.\n**\n** SQLITE_RBU_STATE_ERROR:\n**   An error has occurred. Any subsequent calls to sqlite3rbu_step() will\n**   immediately return the SQLite error code associated with the error.\n*/\n#define SQLITE_RBU_STATE_OAL        1\n#define SQLITE_RBU_STATE_MOVE       2\n#define SQLITE_RBU_STATE_CHECKPOINT 3\n#define SQLITE_RBU_STATE_DONE       4\n#define SQLITE_RBU_STATE_ERROR      5\n\nSQLITE_API int sqlite3rbu_state(sqlite3rbu *pRbu);\n\n/*\n** As part of applying an RBU update or performing an RBU vacuum operation,\n** the system must at one point move the *-oal file to the equivalent *-wal\n** path. Normally, it does this by invoking POSIX function rename(2) directly.\n** Except on WINCE platforms, where it uses win32 API MoveFileW(). This\n** function may be used to register a callback that the RBU module will invoke\n** instead of one of these APIs.\n**\n** If a callback is registered with an RBU handle, it invokes it instead\n** of rename(2) when it needs to move a file within the file-system. The\n** first argument passed to the xRename() callback is a copy of the second\n** argument (pArg) passed to this function. The second is the full path\n** to the file to move and the third the full path to which it should be\n** moved. The callback function should return SQLITE_OK to indicate\n** success. If an error occurs, it should return an SQLite error code.\n** In this case the RBU operation will be abandoned and the error returned\n** to the RBU user.\n**\n** Passing a NULL pointer in place of the xRename argument to this function\n** restores the default behaviour.\n*/\nSQLITE_API void sqlite3rbu_rename_handler(\n  sqlite3rbu *pRbu,\n  void *pArg,\n  int (*xRename)(void *pArg, const char *zOld, const char *zNew)\n);\n\n\n/*\n** Create an RBU VFS named zName that accesses the underlying file-system\n** via existing VFS zParent. Or, if the zParent parameter is passed NULL,\n** then the new RBU VFS uses the default system VFS to access the file-system.\n** The new object is registered as a non-default VFS with SQLite before\n** returning.\n**\n** Part of the RBU implementation uses a custom VFS object. Usually, this\n** object is created and deleted automatically by RBU.\n**\n** The exception is for applications that also use zipvfs. In this case,\n** the custom VFS must be explicitly created by the user before the RBU\n** handle is opened. The RBU VFS should be installed so that the zipvfs\n** VFS uses the RBU VFS, which in turn uses any other VFS layers in use\n** (for example multiplexor) to access the file-system. For example,\n** to assemble an RBU enabled VFS stack that uses both zipvfs and\n** multiplexor (error checking omitted):\n**\n**     // Create a VFS named \"multiplex\" (not the default).\n**     sqlite3_multiplex_initialize(0, 0);\n**\n**     // Create an rbu VFS named \"rbu\" that uses multiplexor. If the\n**     // second argument were replaced with NULL, the \"rbu\" VFS would\n**     // access the file-system via the system default VFS, bypassing the\n**     // multiplexor.\n**     sqlite3rbu_create_vfs(\"rbu\", \"multiplex\");\n**\n**     // Create a zipvfs VFS named \"zipvfs\" that uses rbu.\n**     zipvfs_create_vfs_v3(\"zipvfs\", \"rbu\", 0, xCompressorAlgorithmDetector);\n**\n**     // Make zipvfs the default VFS.\n**     sqlite3_vfs_register(sqlite3_vfs_find(\"zipvfs\"), 1);\n**\n** Because the default VFS created above includes a RBU functionality, it\n** may be used by RBU clients. Attempting to use RBU with a zipvfs VFS stack\n** that does not include the RBU layer results in an error.\n**\n** The overhead of adding the \"rbu\" VFS to the system is negligible for\n** non-RBU users. There is no harm in an application accessing the\n** file-system via \"rbu\" all the time, even if it only uses RBU functionality\n** occasionally.\n*/\nSQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent);\n\n/*\n** Deregister and destroy an RBU vfs created by an earlier call to\n** sqlite3rbu_create_vfs().\n**\n** VFS objects are not reference counted. If a VFS object is destroyed\n** before all database handles that use it have been closed, the results\n** are undefined.\n*/\nSQLITE_API void sqlite3rbu_destroy_vfs(const char *zName);\n\n#if 0\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif /* _SQLITE3RBU_H */\n\n/************** End of sqlite3rbu.h ******************************************/\n/************** Continuing where we left off in sqlite3rbu.c *****************/\n\n#if defined(_WIN32_WCE)\n/* #include \"windows.h\" */\n#endif\n\n/* Maximum number of prepared UPDATE statements held by this module */\n#define SQLITE_RBU_UPDATE_CACHESIZE 16\n\n/* Delta checksums disabled by default.  Compile with -DRBU_ENABLE_DELTA_CKSUM\n** to enable checksum verification.\n*/\n#ifndef RBU_ENABLE_DELTA_CKSUM\n# define RBU_ENABLE_DELTA_CKSUM 0\n#endif\n\n/*\n** Swap two objects of type TYPE.\n*/\n#if !defined(SQLITE_AMALGAMATION)\n# define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}\n#endif\n\n/*\n** Name of the URI option that causes RBU to take an exclusive lock as\n** part of the incremental checkpoint operation.\n*/\n#define RBU_EXCLUSIVE_CHECKPOINT \"rbu_exclusive_checkpoint\"\n\n\n/*\n** The rbu_state table is used to save the state of a partially applied\n** update so that it can be resumed later. The table consists of integer\n** keys mapped to values as follows:\n**\n** RBU_STATE_STAGE:\n**   May be set to integer values 1, 2, 4 or 5. As follows:\n**       1: the *-rbu file is currently under construction.\n**       2: the *-rbu file has been constructed, but not yet moved\n**          to the *-wal path.\n**       4: the checkpoint is underway.\n**       5: the rbu update has been checkpointed.\n**\n** RBU_STATE_TBL:\n**   Only valid if STAGE==1. The target database name of the table\n**   currently being written.\n**\n** RBU_STATE_IDX:\n**   Only valid if STAGE==1. The target database name of the index\n**   currently being written, or NULL if the main table is currently being\n**   updated.\n**\n** RBU_STATE_ROW:\n**   Only valid if STAGE==1. Number of rows already processed for the current\n**   table/index.\n**\n** RBU_STATE_PROGRESS:\n**   Trbul number of sqlite3rbu_step() calls made so far as part of this\n**   rbu update.\n**\n** RBU_STATE_CKPT:\n**   Valid if STAGE==4. The 64-bit checksum associated with the wal-index\n**   header created by recovering the *-wal file. This is used to detect\n**   cases when another client appends frames to the *-wal file in the\n**   middle of an incremental checkpoint (an incremental checkpoint cannot\n**   be continued if this happens).\n**\n** RBU_STATE_COOKIE:\n**   Valid if STAGE==1. The current change-counter cookie value in the\n**   target db file.\n**\n** RBU_STATE_OALSZ:\n**   Valid if STAGE==1. The size in bytes of the *-oal file.\n**\n** RBU_STATE_DATATBL:\n**   Only valid if STAGE==1. The RBU database name of the table\n**   currently being read.\n*/\n#define RBU_STATE_STAGE        1\n#define RBU_STATE_TBL          2\n#define RBU_STATE_IDX          3\n#define RBU_STATE_ROW          4\n#define RBU_STATE_PROGRESS     5\n#define RBU_STATE_CKPT         6\n#define RBU_STATE_COOKIE       7\n#define RBU_STATE_OALSZ        8\n#define RBU_STATE_PHASEONESTEP 9\n#define RBU_STATE_DATATBL     10\n\n#define RBU_STAGE_OAL         1\n#define RBU_STAGE_MOVE        2\n#define RBU_STAGE_CAPTURE     3\n#define RBU_STAGE_CKPT        4\n#define RBU_STAGE_DONE        5\n\n\n#define RBU_CREATE_STATE \\\n  \"CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\"\n\ntypedef struct RbuFrame RbuFrame;\ntypedef struct RbuObjIter RbuObjIter;\ntypedef struct RbuState RbuState;\ntypedef struct RbuSpan RbuSpan;\ntypedef struct rbu_vfs rbu_vfs;\ntypedef struct rbu_file rbu_file;\ntypedef struct RbuUpdateStmt RbuUpdateStmt;\n\n#if !defined(SQLITE_AMALGAMATION)\ntypedef unsigned int u32;\ntypedef unsigned short u16;\ntypedef unsigned char u8;\ntypedef sqlite3_int64 i64;\ntypedef sqlite3_uint64 u64;\n#endif\n\n/*\n** These values must match the values defined in wal.c for the equivalent\n** locks. These are not magic numbers as they are part of the SQLite file\n** format.\n*/\n#define WAL_LOCK_WRITE  0\n#define WAL_LOCK_CKPT   1\n#define WAL_LOCK_READ0  3\n\n#define SQLITE_FCNTL_RBUCNT    5149216\n\n/*\n** A structure to store values read from the rbu_state table in memory.\n*/\nstruct RbuState {\n  int eStage;\n  char *zTbl;\n  char *zDataTbl;\n  char *zIdx;\n  i64 iWalCksum;\n  int nRow;\n  i64 nProgress;\n  u32 iCookie;\n  i64 iOalSz;\n  i64 nPhaseOneStep;\n};\n\nstruct RbuUpdateStmt {\n  char *zMask;                    /* Copy of update mask used with pUpdate */\n  sqlite3_stmt *pUpdate;          /* Last update statement (or NULL) */\n  RbuUpdateStmt *pNext;\n};\n\nstruct RbuSpan {\n  const char *zSpan;\n  int nSpan;\n};\n\n/*\n** An iterator of this type is used to iterate through all objects in\n** the target database that require updating. For each such table, the\n** iterator visits, in order:\n**\n**     * the table itself,\n**     * each index of the table (zero or more points to visit), and\n**     * a special \"cleanup table\" state.\n**\n** abIndexed:\n**   If the table has no indexes on it, abIndexed is set to NULL. Otherwise,\n**   it points to an array of flags nTblCol elements in size. The flag is\n**   set for each column that is either a part of the PK or a part of an\n**   index. Or clear otherwise.\n**\n**   If there are one or more partial indexes on the table, all fields of\n**   this array set set to 1. This is because in that case, the module has\n**   no way to tell which fields will be required to add and remove entries\n**   from the partial indexes.\n**\n*/\nstruct RbuObjIter {\n  sqlite3_stmt *pTblIter;         /* Iterate through tables */\n  sqlite3_stmt *pIdxIter;         /* Index iterator */\n  int nTblCol;                    /* Size of azTblCol[] array */\n  char **azTblCol;                /* Array of unquoted target column names */\n  char **azTblType;               /* Array of target column types */\n  int *aiSrcOrder;                /* src table col -> target table col */\n  u8 *abTblPk;                    /* Array of flags, set on target PK columns */\n  u8 *abNotNull;                  /* Array of flags, set on NOT NULL columns */\n  u8 *abIndexed;                  /* Array of flags, set on indexed & PK cols */\n  int eType;                      /* Table type - an RBU_PK_XXX value */\n\n  /* Output variables. zTbl==0 implies EOF. */\n  int bCleanup;                   /* True in \"cleanup\" state */\n  const char *zTbl;               /* Name of target db table */\n  const char *zDataTbl;           /* Name of rbu db table (or null) */\n  const char *zIdx;               /* Name of target db index (or null) */\n  int iTnum;                      /* Root page of current object */\n  int iPkTnum;                    /* If eType==EXTERNAL, root of PK index */\n  int bUnique;                    /* Current index is unique */\n  int nIndex;                     /* Number of aux. indexes on table zTbl */\n\n  /* Statements created by rbuObjIterPrepareAll() */\n  int nCol;                       /* Number of columns in current object */\n  sqlite3_stmt *pSelect;          /* Source data */\n  sqlite3_stmt *pInsert;          /* Statement for INSERT operations */\n  sqlite3_stmt *pDelete;          /* Statement for DELETE ops */\n  sqlite3_stmt *pTmpInsert;       /* Insert into rbu_tmp_$zDataTbl */\n  int nIdxCol;\n  RbuSpan *aIdxCol;\n  char *zIdxSql;\n\n  /* Last UPDATE used (for PK b-tree updates only), or NULL. */\n  RbuUpdateStmt *pRbuUpdate;\n};\n\n/*\n** Values for RbuObjIter.eType\n**\n**     0: Table does not exist (error)\n**     1: Table has an implicit rowid.\n**     2: Table has an explicit IPK column.\n**     3: Table has an external PK index.\n**     4: Table is WITHOUT ROWID.\n**     5: Table is a virtual table.\n*/\n#define RBU_PK_NOTABLE        0\n#define RBU_PK_NONE           1\n#define RBU_PK_IPK            2\n#define RBU_PK_EXTERNAL       3\n#define RBU_PK_WITHOUT_ROWID  4\n#define RBU_PK_VTAB           5\n\n\n/*\n** Within the RBU_STAGE_OAL stage, each call to sqlite3rbu_step() performs\n** one of the following operations.\n*/\n#define RBU_INSERT     1          /* Insert on a main table b-tree */\n#define RBU_DELETE     2          /* Delete a row from a main table b-tree */\n#define RBU_REPLACE    3          /* Delete and then insert a row */\n#define RBU_IDX_DELETE 4          /* Delete a row from an aux. index b-tree */\n#define RBU_IDX_INSERT 5          /* Insert on an aux. index b-tree */\n\n#define RBU_UPDATE     6          /* Update a row in a main table b-tree */\n\n/*\n** A single step of an incremental checkpoint - frame iWalFrame of the wal\n** file should be copied to page iDbPage of the database file.\n*/\nstruct RbuFrame {\n  u32 iDbPage;\n  u32 iWalFrame;\n};\n\n#ifndef UNUSED_PARAMETER\n/*\n** The following macros are used to suppress compiler warnings and to\n** make it clear to human readers when a function parameter is deliberately\n** left unused within the body of a function. This usually happens when\n** a function is called via a function pointer. For example the\n** implementation of an SQL aggregate step callback may not use the\n** parameter indicating the number of arguments passed to the aggregate,\n** if it knows that this is enforced elsewhere.\n**\n** When a function parameter is not used at all within the body of a function,\n** it is generally named \"NotUsed\" or \"NotUsed2\" to make things even clearer.\n** However, these macros may also be used to suppress warnings related to\n** parameters that may or may not be used depending on compilation options.\n** For example those parameters only used in assert() statements. In these\n** cases the parameters are named as per the usual conventions.\n*/\n#define UNUSED_PARAMETER(x) (void)(x)\n#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y)\n#endif\n\n/*\n** RBU handle.\n**\n** nPhaseOneStep:\n**   If the RBU database contains an rbu_count table, this value is set to\n**   a running estimate of the number of b-tree operations required to\n**   finish populating the *-oal file. This allows the sqlite3_bp_progress()\n**   API to calculate the permyriadage progress of populating the *-oal file\n**   using the formula:\n**\n**     permyriadage = (10000 * nProgress) / nPhaseOneStep\n**\n**   nPhaseOneStep is initialized to the sum of:\n**\n**     nRow * (nIndex + 1)\n**\n**   for all source tables in the RBU database, where nRow is the number\n**   of rows in the source table and nIndex the number of indexes on the\n**   corresponding target database table.\n**\n**   This estimate is accurate if the RBU update consists entirely of\n**   INSERT operations. However, it is inaccurate if:\n**\n**     * the RBU update contains any UPDATE operations. If the PK specified\n**       for an UPDATE operation does not exist in the target table, then\n**       no b-tree operations are required on index b-trees. Or if the\n**       specified PK does exist, then (nIndex*2) such operations are\n**       required (one delete and one insert on each index b-tree).\n**\n**     * the RBU update contains any DELETE operations for which the specified\n**       PK does not exist. In this case no operations are required on index\n**       b-trees.\n**\n**     * the RBU update contains REPLACE operations. These are similar to\n**       UPDATE operations.\n**\n**   nPhaseOneStep is updated to account for the conditions above during the\n**   first pass of each source table. The updated nPhaseOneStep value is\n**   stored in the rbu_state table if the RBU update is suspended.\n*/\nstruct sqlite3rbu {\n  int eStage;                     /* Value of RBU_STATE_STAGE field */\n  sqlite3 *dbMain;                /* target database handle */\n  sqlite3 *dbRbu;                 /* rbu database handle */\n  char *zTarget;                  /* Path to target db */\n  char *zRbu;                     /* Path to rbu db */\n  char *zState;                   /* Path to state db (or NULL if zRbu) */\n  char zStateDb[5];               /* Db name for state (\"stat\" or \"main\") */\n  int rc;                         /* Value returned by last rbu_step() call */\n  char *zErrmsg;                  /* Error message if rc!=SQLITE_OK */\n  int nStep;                      /* Rows processed for current object */\n  sqlite3_int64 nProgress;        /* Rows processed for all objects */\n  RbuObjIter objiter;             /* Iterator for skipping through tbl/idx */\n  const char *zVfsName;           /* Name of automatically created rbu vfs */\n  rbu_file *pTargetFd;            /* File handle open on target db */\n  int nPagePerSector;             /* Pages per sector for pTargetFd */\n  i64 iOalSz;\n  i64 nPhaseOneStep;\n  void *pRenameArg;\n  int (*xRename)(void*, const char*, const char*);\n\n  /* The following state variables are used as part of the incremental\n  ** checkpoint stage (eStage==RBU_STAGE_CKPT). See comments surrounding\n  ** function rbuSetupCheckpoint() for details.  */\n  u32 iMaxFrame;                  /* Largest iWalFrame value in aFrame[] */\n  u32 mLock;\n  int nFrame;                     /* Entries in aFrame[] array */\n  int nFrameAlloc;                /* Allocated size of aFrame[] array */\n  RbuFrame *aFrame;\n  int pgsz;\n  u8 *aBuf;\n  i64 iWalCksum;\n  i64 szTemp;                     /* Current size of all temp files in use */\n  i64 szTempLimit;                /* Total size limit for temp files */\n\n  /* Used in RBU vacuum mode only */\n  int nRbu;                       /* Number of RBU VFS in the stack */\n  rbu_file *pRbuFd;               /* Fd for main db of dbRbu */\n};\n\n/*\n** An rbu VFS is implemented using an instance of this structure.\n**\n** Variable pRbu is only non-NULL for automatically created RBU VFS objects.\n** It is NULL for RBU VFS objects created explicitly using\n** sqlite3rbu_create_vfs(). It is used to track the total amount of temp\n** space used by the RBU handle.\n*/\nstruct rbu_vfs {\n  sqlite3_vfs base;               /* rbu VFS shim methods */\n  sqlite3_vfs *pRealVfs;          /* Underlying VFS */\n  sqlite3_mutex *mutex;           /* Mutex to protect pMain */\n  sqlite3rbu *pRbu;               /* Owner RBU object */\n  rbu_file *pMain;                /* List of main db files */\n  rbu_file *pMainRbu;             /* List of main db files with pRbu!=0 */\n};\n\n/*\n** Each file opened by an rbu VFS is represented by an instance of\n** the following structure.\n**\n** If this is a temporary file (pRbu!=0 && flags&DELETE_ON_CLOSE), variable\n** \"sz\" is set to the current size of the database file.\n*/\nstruct rbu_file {\n  sqlite3_file base;              /* sqlite3_file methods */\n  sqlite3_file *pReal;            /* Underlying file handle */\n  rbu_vfs *pRbuVfs;               /* Pointer to the rbu_vfs object */\n  sqlite3rbu *pRbu;               /* Pointer to rbu object (rbu target only) */\n  i64 sz;                         /* Size of file in bytes (temp only) */\n\n  int openFlags;                  /* Flags this file was opened with */\n  u32 iCookie;                    /* Cookie value for main db files */\n  u8 iWriteVer;                   /* \"write-version\" value for main db files */\n  u8 bNolock;                     /* True to fail EXCLUSIVE locks */\n\n  int nShm;                       /* Number of entries in apShm[] array */\n  char **apShm;                   /* Array of mmap'd *-shm regions */\n  char *zDel;                     /* Delete this when closing file */\n\n  const char *zWal;               /* Wal filename for this main db file */\n  rbu_file *pWalFd;               /* Wal file descriptor for this main db */\n  rbu_file *pMainNext;            /* Next MAIN_DB file */\n  rbu_file *pMainRbuNext;         /* Next MAIN_DB file with pRbu!=0 */\n};\n\n/*\n** True for an RBU vacuum handle, or false otherwise.\n*/\n#define rbuIsVacuum(p) ((p)->zTarget==0)\n\n\n/*************************************************************************\n** The following three functions, found below:\n**\n**   rbuDeltaGetInt()\n**   rbuDeltaChecksum()\n**   rbuDeltaApply()\n**\n** are lifted from the fossil source code (http://fossil-scm.org). They\n** are used to implement the scalar SQL function rbu_fossil_delta().\n*/\n\n/*\n** Read bytes from *pz and convert them into a positive integer.  When\n** finished, leave *pz pointing to the first character past the end of\n** the integer.  The *pLen parameter holds the length of the string\n** in *pz and is decremented once for each character in the integer.\n*/\nstatic unsigned int rbuDeltaGetInt(const char **pz, int *pLen){\n  static const signed char zValue[] = {\n    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,\n     0,  1,  2,  3,  4,  5,  6,  7,    8,  9, -1, -1, -1, -1, -1, -1,\n    -1, 10, 11, 12, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,\n    25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, -1, -1, -1, -1, 36,\n    -1, 37, 38, 39, 40, 41, 42, 43,   44, 45, 46, 47, 48, 49, 50, 51,\n    52, 53, 54, 55, 56, 57, 58, 59,   60, 61, 62, -1, -1, -1, 63, -1,\n  };\n  unsigned int v = 0;\n  int c;\n  unsigned char *z = (unsigned char*)*pz;\n  unsigned char *zStart = z;\n  while( (c = zValue[0x7f&*(z++)])>=0 ){\n     v = (v<<6) + c;\n  }\n  z--;\n  *pLen -= (int)(z - zStart);\n  *pz = (char*)z;\n  return v;\n}\n\n#if RBU_ENABLE_DELTA_CKSUM\n/*\n** Compute a 32-bit checksum on the N-byte buffer.  Return the result.\n*/\nstatic unsigned int rbuDeltaChecksum(const char *zIn, size_t N){\n  const unsigned char *z = (const unsigned char *)zIn;\n  unsigned sum0 = 0;\n  unsigned sum1 = 0;\n  unsigned sum2 = 0;\n  unsigned sum3 = 0;\n  while(N >= 16){\n    sum0 += ((unsigned)z[0] + z[4] + z[8] + z[12]);\n    sum1 += ((unsigned)z[1] + z[5] + z[9] + z[13]);\n    sum2 += ((unsigned)z[2] + z[6] + z[10]+ z[14]);\n    sum3 += ((unsigned)z[3] + z[7] + z[11]+ z[15]);\n    z += 16;\n    N -= 16;\n  }\n  while(N >= 4){\n    sum0 += z[0];\n    sum1 += z[1];\n    sum2 += z[2];\n    sum3 += z[3];\n    z += 4;\n    N -= 4;\n  }\n  sum3 += (sum2 << 8) + (sum1 << 16) + (sum0 << 24);\n  switch(N){\n    case 3:   sum3 += (z[2] << 8);\n    case 2:   sum3 += (z[1] << 16);\n    case 1:   sum3 += (z[0] << 24);\n    default:  ;\n  }\n  return sum3;\n}\n#endif\n\n/*\n** Apply a delta.\n**\n** The output buffer should be big enough to hold the whole output\n** file and a NUL terminator at the end.  The delta_output_size()\n** routine will determine this size for you.\n**\n** The delta string should be null-terminated.  But the delta string\n** may contain embedded NUL characters (if the input and output are\n** binary files) so we also have to pass in the length of the delta in\n** the lenDelta parameter.\n**\n** This function returns the size of the output file in bytes (excluding\n** the final NUL terminator character).  Except, if the delta string is\n** malformed or intended for use with a source file other than zSrc,\n** then this routine returns -1.\n**\n** Refer to the delta_create() documentation above for a description\n** of the delta file format.\n*/\nstatic int rbuDeltaApply(\n  const char *zSrc,      /* The source or pattern file */\n  int lenSrc,            /* Length of the source file */\n  const char *zDelta,    /* Delta to apply to the pattern */\n  int lenDelta,          /* Length of the delta */\n  char *zOut             /* Write the output into this preallocated buffer */\n){\n  unsigned int limit;\n  unsigned int total = 0;\n#if RBU_ENABLE_DELTA_CKSUM\n  char *zOrigOut = zOut;\n#endif\n\n  limit = rbuDeltaGetInt(&zDelta, &lenDelta);\n  if( *zDelta!='\\n' ){\n    /* ERROR: size integer not terminated by \"\\n\" */\n    return -1;\n  }\n  zDelta++; lenDelta--;\n  while( *zDelta && lenDelta>0 ){\n    unsigned int cnt, ofst;\n    cnt = rbuDeltaGetInt(&zDelta, &lenDelta);\n    switch( zDelta[0] ){\n      case '@': {\n        zDelta++; lenDelta--;\n        ofst = rbuDeltaGetInt(&zDelta, &lenDelta);\n        if( lenDelta>0 && zDelta[0]!=',' ){\n          /* ERROR: copy command not terminated by ',' */\n          return -1;\n        }\n        zDelta++; lenDelta--;\n        total += cnt;\n        if( total>limit ){\n          /* ERROR: copy exceeds output file size */\n          return -1;\n        }\n        if( (int)(ofst+cnt) > lenSrc ){\n          /* ERROR: copy extends past end of input */\n          return -1;\n        }\n        memcpy(zOut, &zSrc[ofst], cnt);\n        zOut += cnt;\n        break;\n      }\n      case ':': {\n        zDelta++; lenDelta--;\n        total += cnt;\n        if( total>limit ){\n          /* ERROR:  insert command gives an output larger than predicted */\n          return -1;\n        }\n        if( (int)cnt>lenDelta ){\n          /* ERROR: insert count exceeds size of delta */\n          return -1;\n        }\n        memcpy(zOut, zDelta, cnt);\n        zOut += cnt;\n        zDelta += cnt;\n        lenDelta -= cnt;\n        break;\n      }\n      case ';': {\n        zDelta++; lenDelta--;\n        zOut[0] = 0;\n#if RBU_ENABLE_DELTA_CKSUM\n        if( cnt!=rbuDeltaChecksum(zOrigOut, total) ){\n          /* ERROR:  bad checksum */\n          return -1;\n        }\n#endif\n        if( total!=limit ){\n          /* ERROR: generated size does not match predicted size */\n          return -1;\n        }\n        return total;\n      }\n      default: {\n        /* ERROR: unknown delta operator */\n        return -1;\n      }\n    }\n  }\n  /* ERROR: unterminated delta */\n  return -1;\n}\n\nstatic int rbuDeltaOutputSize(const char *zDelta, int lenDelta){\n  int size;\n  size = rbuDeltaGetInt(&zDelta, &lenDelta);\n  if( *zDelta!='\\n' ){\n    /* ERROR: size integer not terminated by \"\\n\" */\n    return -1;\n  }\n  return size;\n}\n\n/*\n** End of code taken from fossil.\n*************************************************************************/\n\n/*\n** Implementation of SQL scalar function rbu_fossil_delta().\n**\n** This function applies a fossil delta patch to a blob. Exactly two\n** arguments must be passed to this function. The first is the blob to\n** patch and the second the patch to apply. If no error occurs, this\n** function returns the patched blob.\n*/\nstatic void rbuFossilDeltaFunc(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  const char *aDelta;\n  int nDelta;\n  const char *aOrig;\n  int nOrig;\n\n  int nOut;\n  int nOut2;\n  char *aOut;\n\n  assert( argc==2 );\n  UNUSED_PARAMETER(argc);\n\n  nOrig = sqlite3_value_bytes(argv[0]);\n  aOrig = (const char*)sqlite3_value_blob(argv[0]);\n  nDelta = sqlite3_value_bytes(argv[1]);\n  aDelta = (const char*)sqlite3_value_blob(argv[1]);\n\n  /* Figure out the size of the output */\n  nOut = rbuDeltaOutputSize(aDelta, nDelta);\n  if( nOut<0 ){\n    sqlite3_result_error(context, \"corrupt fossil delta\", -1);\n    return;\n  }\n\n  aOut = sqlite3_malloc(nOut+1);\n  if( aOut==0 ){\n    sqlite3_result_error_nomem(context);\n  }else{\n    nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);\n    if( nOut2!=nOut ){\n      sqlite3_free(aOut);\n      sqlite3_result_error(context, \"corrupt fossil delta\", -1);\n    }else{\n      sqlite3_result_blob(context, aOut, nOut, sqlite3_free);\n    }\n  }\n}\n\n\n/*\n** Prepare the SQL statement in buffer zSql against database handle db.\n** If successful, set *ppStmt to point to the new statement and return\n** SQLITE_OK.\n**\n** Otherwise, if an error does occur, set *ppStmt to NULL and return\n** an SQLite error code. Additionally, set output variable *pzErrmsg to\n** point to a buffer containing an error message. It is the responsibility\n** of the caller to (eventually) free this buffer using sqlite3_free().\n*/\nstatic int prepareAndCollectError(\n  sqlite3 *db,\n  sqlite3_stmt **ppStmt,\n  char **pzErrmsg,\n  const char *zSql\n){\n  int rc = sqlite3_prepare_v2(db, zSql, -1, ppStmt, 0);\n  if( rc!=SQLITE_OK ){\n    *pzErrmsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n    *ppStmt = 0;\n  }\n  return rc;\n}\n\n/*\n** Reset the SQL statement passed as the first argument. Return a copy\n** of the value returned by sqlite3_reset().\n**\n** If an error has occurred, then set *pzErrmsg to point to a buffer\n** containing an error message. It is the responsibility of the caller\n** to eventually free this buffer using sqlite3_free().\n*/\nstatic int resetAndCollectError(sqlite3_stmt *pStmt, char **pzErrmsg){\n  int rc = sqlite3_reset(pStmt);\n  if( rc!=SQLITE_OK ){\n    *pzErrmsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(sqlite3_db_handle(pStmt)));\n  }\n  return rc;\n}\n\n/*\n** Unless it is NULL, argument zSql points to a buffer allocated using\n** sqlite3_malloc containing an SQL statement. This function prepares the SQL\n** statement against database db and frees the buffer. If statement\n** compilation is successful, *ppStmt is set to point to the new statement\n** handle and SQLITE_OK is returned.\n**\n** Otherwise, if an error occurs, *ppStmt is set to NULL and an error code\n** returned. In this case, *pzErrmsg may also be set to point to an error\n** message. It is the responsibility of the caller to free this error message\n** buffer using sqlite3_free().\n**\n** If argument zSql is NULL, this function assumes that an OOM has occurred.\n** In this case SQLITE_NOMEM is returned and *ppStmt set to NULL.\n*/\nstatic int prepareFreeAndCollectError(\n  sqlite3 *db,\n  sqlite3_stmt **ppStmt,\n  char **pzErrmsg,\n  char *zSql\n){\n  int rc;\n  assert( *pzErrmsg==0 );\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n    *ppStmt = 0;\n  }else{\n    rc = prepareAndCollectError(db, ppStmt, pzErrmsg, zSql);\n    sqlite3_free(zSql);\n  }\n  return rc;\n}\n\n/*\n** Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated\n** by an earlier call to rbuObjIterCacheTableInfo().\n*/\nstatic void rbuObjIterFreeCols(RbuObjIter *pIter){\n  int i;\n  for(i=0; i<pIter->nTblCol; i++){\n    sqlite3_free(pIter->azTblCol[i]);\n    sqlite3_free(pIter->azTblType[i]);\n  }\n  sqlite3_free(pIter->azTblCol);\n  pIter->azTblCol = 0;\n  pIter->azTblType = 0;\n  pIter->aiSrcOrder = 0;\n  pIter->abTblPk = 0;\n  pIter->abNotNull = 0;\n  pIter->nTblCol = 0;\n  pIter->eType = 0;               /* Invalid value */\n}\n\n/*\n** Finalize all statements and free all allocations that are specific to\n** the current object (table/index pair).\n*/\nstatic void rbuObjIterClearStatements(RbuObjIter *pIter){\n  RbuUpdateStmt *pUp;\n\n  sqlite3_finalize(pIter->pSelect);\n  sqlite3_finalize(pIter->pInsert);\n  sqlite3_finalize(pIter->pDelete);\n  sqlite3_finalize(pIter->pTmpInsert);\n  pUp = pIter->pRbuUpdate;\n  while( pUp ){\n    RbuUpdateStmt *pTmp = pUp->pNext;\n    sqlite3_finalize(pUp->pUpdate);\n    sqlite3_free(pUp);\n    pUp = pTmp;\n  }\n  sqlite3_free(pIter->aIdxCol);\n  sqlite3_free(pIter->zIdxSql);\n\n  pIter->pSelect = 0;\n  pIter->pInsert = 0;\n  pIter->pDelete = 0;\n  pIter->pRbuUpdate = 0;\n  pIter->pTmpInsert = 0;\n  pIter->nCol = 0;\n  pIter->nIdxCol = 0;\n  pIter->aIdxCol = 0;\n  pIter->zIdxSql = 0;\n}\n\n/*\n** Clean up any resources allocated as part of the iterator object passed\n** as the only argument.\n*/\nstatic void rbuObjIterFinalize(RbuObjIter *pIter){\n  rbuObjIterClearStatements(pIter);\n  sqlite3_finalize(pIter->pTblIter);\n  sqlite3_finalize(pIter->pIdxIter);\n  rbuObjIterFreeCols(pIter);\n  memset(pIter, 0, sizeof(RbuObjIter));\n}\n\n/*\n** Advance the iterator to the next position.\n**\n** If no error occurs, SQLITE_OK is returned and the iterator is left\n** pointing to the next entry. Otherwise, an error code and message is\n** left in the RBU handle passed as the first argument. A copy of the\n** error code is returned.\n*/\nstatic int rbuObjIterNext(sqlite3rbu *p, RbuObjIter *pIter){\n  int rc = p->rc;\n  if( rc==SQLITE_OK ){\n\n    /* Free any SQLite statements used while processing the previous object */\n    rbuObjIterClearStatements(pIter);\n    if( pIter->zIdx==0 ){\n      rc = sqlite3_exec(p->dbMain,\n          \"DROP TRIGGER IF EXISTS temp.rbu_insert_tr;\"\n          \"DROP TRIGGER IF EXISTS temp.rbu_update1_tr;\"\n          \"DROP TRIGGER IF EXISTS temp.rbu_update2_tr;\"\n          \"DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\"\n          , 0, 0, &p->zErrmsg\n      );\n    }\n\n    if( rc==SQLITE_OK ){\n      if( pIter->bCleanup ){\n        rbuObjIterFreeCols(pIter);\n        pIter->bCleanup = 0;\n        rc = sqlite3_step(pIter->pTblIter);\n        if( rc!=SQLITE_ROW ){\n          rc = resetAndCollectError(pIter->pTblIter, &p->zErrmsg);\n          pIter->zTbl = 0;\n          pIter->zDataTbl = 0;\n        }else{\n          pIter->zTbl = (const char*)sqlite3_column_text(pIter->pTblIter, 0);\n          pIter->zDataTbl = (const char*)sqlite3_column_text(pIter->pTblIter,1);\n          rc = (pIter->zDataTbl && pIter->zTbl) ? SQLITE_OK : SQLITE_NOMEM;\n        }\n      }else{\n        if( pIter->zIdx==0 ){\n          sqlite3_stmt *pIdx = pIter->pIdxIter;\n          rc = sqlite3_bind_text(pIdx, 1, pIter->zTbl, -1, SQLITE_STATIC);\n        }\n        if( rc==SQLITE_OK ){\n          rc = sqlite3_step(pIter->pIdxIter);\n          if( rc!=SQLITE_ROW ){\n            rc = resetAndCollectError(pIter->pIdxIter, &p->zErrmsg);\n            pIter->bCleanup = 1;\n            pIter->zIdx = 0;\n          }else{\n            pIter->zIdx = (const char*)sqlite3_column_text(pIter->pIdxIter, 0);\n            pIter->iTnum = sqlite3_column_int(pIter->pIdxIter, 1);\n            pIter->bUnique = sqlite3_column_int(pIter->pIdxIter, 2);\n            rc = pIter->zIdx ? SQLITE_OK : SQLITE_NOMEM;\n          }\n        }\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    rbuObjIterFinalize(pIter);\n    p->rc = rc;\n  }\n  return rc;\n}\n\n\n/*\n** The implementation of the rbu_target_name() SQL function. This function\n** accepts one or two arguments. The first argument is the name of a table -\n** the name of a table in the RBU database.  The second, if it is present, is 1\n** for a view or 0 for a table.\n**\n** For a non-vacuum RBU handle, if the table name matches the pattern:\n**\n**     data[0-9]_<name>\n**\n** where <name> is any sequence of 1 or more characters, <name> is returned.\n** Otherwise, if the only argument does not match the above pattern, an SQL\n** NULL is returned.\n**\n**     \"data_t1\"     -> \"t1\"\n**     \"data0123_t2\" -> \"t2\"\n**     \"dataAB_t3\"   -> NULL\n**\n** For an rbu vacuum handle, a copy of the first argument is returned if\n** the second argument is either missing or 0 (not a view).\n*/\nstatic void rbuTargetNameFunc(\n  sqlite3_context *pCtx,\n  int argc,\n  sqlite3_value **argv\n){\n  sqlite3rbu *p = sqlite3_user_data(pCtx);\n  const char *zIn;\n  assert( argc==1 || argc==2 );\n\n  zIn = (const char*)sqlite3_value_text(argv[0]);\n  if( zIn ){\n    if( rbuIsVacuum(p) ){\n      assert( argc==2 || argc==1 );\n      if( argc==1 || 0==sqlite3_value_int(argv[1]) ){\n        sqlite3_result_text(pCtx, zIn, -1, SQLITE_STATIC);\n      }\n    }else{\n      if( strlen(zIn)>4 && memcmp(\"data\", zIn, 4)==0 ){\n        int i;\n        for(i=4; zIn[i]>='0' && zIn[i]<='9'; i++);\n        if( zIn[i]=='_' && zIn[i+1] ){\n          sqlite3_result_text(pCtx, &zIn[i+1], -1, SQLITE_STATIC);\n        }\n      }\n    }\n  }\n}\n\n/*\n** Initialize the iterator structure passed as the second argument.\n**\n** If no error occurs, SQLITE_OK is returned and the iterator is left\n** pointing to the first entry. Otherwise, an error code and message is\n** left in the RBU handle passed as the first argument. A copy of the\n** error code is returned.\n*/\nstatic int rbuObjIterFirst(sqlite3rbu *p, RbuObjIter *pIter){\n  int rc;\n  memset(pIter, 0, sizeof(RbuObjIter));\n\n  rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg,\n    sqlite3_mprintf(\n      \"SELECT rbu_target_name(name, type='view') AS target, name \"\n      \"FROM sqlite_schema \"\n      \"WHERE type IN ('table', 'view') AND target IS NOT NULL \"\n      \" %s \"\n      \"ORDER BY name\"\n  , rbuIsVacuum(p) ? \"AND rootpage!=0 AND rootpage IS NOT NULL\" : \"\"));\n\n  if( rc==SQLITE_OK ){\n    rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg,\n        \"SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' \"\n        \"  FROM main.sqlite_schema \"\n        \"  WHERE type='index' AND tbl_name = ?\"\n    );\n  }\n\n  pIter->bCleanup = 1;\n  p->rc = rc;\n  return rbuObjIterNext(p, pIter);\n}\n\n/*\n** This is a wrapper around \"sqlite3_mprintf(zFmt, ...)\". If an OOM occurs,\n** an error code is stored in the RBU handle passed as the first argument.\n**\n** If an error has already occurred (p->rc is already set to something other\n** than SQLITE_OK), then this function returns NULL without modifying the\n** stored error code. In this case it still calls sqlite3_free() on any\n** printf() parameters associated with %z conversions.\n*/\nstatic char *rbuMPrintf(sqlite3rbu *p, const char *zFmt, ...){\n  char *zSql = 0;\n  va_list ap;\n  va_start(ap, zFmt);\n  zSql = sqlite3_vmprintf(zFmt, ap);\n  if( p->rc==SQLITE_OK ){\n    if( zSql==0 ) p->rc = SQLITE_NOMEM;\n  }else{\n    sqlite3_free(zSql);\n    zSql = 0;\n  }\n  va_end(ap);\n  return zSql;\n}\n\n/*\n** Argument zFmt is a sqlite3_mprintf() style format string. The trailing\n** arguments are the usual subsitution values. This function performs\n** the printf() style substitutions and executes the result as an SQL\n** statement on the RBU handles database.\n**\n** If an error occurs, an error code and error message is stored in the\n** RBU handle. If an error has already occurred when this function is\n** called, it is a no-op.\n*/\nstatic int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){\n  va_list ap;\n  char *zSql;\n  va_start(ap, zFmt);\n  zSql = sqlite3_vmprintf(zFmt, ap);\n  if( p->rc==SQLITE_OK ){\n    if( zSql==0 ){\n      p->rc = SQLITE_NOMEM;\n    }else{\n      p->rc = sqlite3_exec(db, zSql, 0, 0, &p->zErrmsg);\n    }\n  }\n  sqlite3_free(zSql);\n  va_end(ap);\n  return p->rc;\n}\n\n/*\n** Attempt to allocate and return a pointer to a zeroed block of nByte\n** bytes.\n**\n** If an error (i.e. an OOM condition) occurs, return NULL and leave an\n** error code in the rbu handle passed as the first argument. Or, if an\n** error has already occurred when this function is called, return NULL\n** immediately without attempting the allocation or modifying the stored\n** error code.\n*/\nstatic void *rbuMalloc(sqlite3rbu *p, sqlite3_int64 nByte){\n  void *pRet = 0;\n  if( p->rc==SQLITE_OK ){\n    assert( nByte>0 );\n    pRet = sqlite3_malloc64(nByte);\n    if( pRet==0 ){\n      p->rc = SQLITE_NOMEM;\n    }else{\n      memset(pRet, 0, nByte);\n    }\n  }\n  return pRet;\n}\n\n\n/*\n** Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that\n** there is room for at least nCol elements. If an OOM occurs, store an\n** error code in the RBU handle passed as the first argument.\n*/\nstatic void rbuAllocateIterArrays(sqlite3rbu *p, RbuObjIter *pIter, int nCol){\n  sqlite3_int64 nByte = (2*sizeof(char*) + sizeof(int) + 3*sizeof(u8)) * nCol;\n  char **azNew;\n\n  azNew = (char**)rbuMalloc(p, nByte);\n  if( azNew ){\n    pIter->azTblCol = azNew;\n    pIter->azTblType = &azNew[nCol];\n    pIter->aiSrcOrder = (int*)&pIter->azTblType[nCol];\n    pIter->abTblPk = (u8*)&pIter->aiSrcOrder[nCol];\n    pIter->abNotNull = (u8*)&pIter->abTblPk[nCol];\n    pIter->abIndexed = (u8*)&pIter->abNotNull[nCol];\n  }\n}\n\n/*\n** The first argument must be a nul-terminated string. This function\n** returns a copy of the string in memory obtained from sqlite3_malloc().\n** It is the responsibility of the caller to eventually free this memory\n** using sqlite3_free().\n**\n** If an OOM condition is encountered when attempting to allocate memory,\n** output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise,\n** if the allocation succeeds, (*pRc) is left unchanged.\n*/\nstatic char *rbuStrndup(const char *zStr, int *pRc){\n  char *zRet = 0;\n\n  if( *pRc==SQLITE_OK ){\n    if( zStr ){\n      size_t nCopy = strlen(zStr) + 1;\n      zRet = (char*)sqlite3_malloc64(nCopy);\n      if( zRet ){\n        memcpy(zRet, zStr, nCopy);\n      }else{\n        *pRc = SQLITE_NOMEM;\n      }\n    }\n  }\n\n  return zRet;\n}\n\n/*\n** Finalize the statement passed as the second argument.\n**\n** If the sqlite3_finalize() call indicates that an error occurs, and the\n** rbu handle error code is not already set, set the error code and error\n** message accordingly.\n*/\nstatic void rbuFinalize(sqlite3rbu *p, sqlite3_stmt *pStmt){\n  sqlite3 *db = sqlite3_db_handle(pStmt);\n  int rc = sqlite3_finalize(pStmt);\n  if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){\n    p->rc = rc;\n    p->zErrmsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n  }\n}\n\n/* Determine the type of a table.\n**\n**   peType is of type (int*), a pointer to an output parameter of type\n**   (int). This call sets the output parameter as follows, depending\n**   on the type of the table specified by parameters dbName and zTbl.\n**\n**     RBU_PK_NOTABLE:       No such table.\n**     RBU_PK_NONE:          Table has an implicit rowid.\n**     RBU_PK_IPK:           Table has an explicit IPK column.\n**     RBU_PK_EXTERNAL:      Table has an external PK index.\n**     RBU_PK_WITHOUT_ROWID: Table is WITHOUT ROWID.\n**     RBU_PK_VTAB:          Table is a virtual table.\n**\n**   Argument *piPk is also of type (int*), and also points to an output\n**   parameter. Unless the table has an external primary key index\n**   (i.e. unless *peType is set to 3), then *piPk is set to zero. Or,\n**   if the table does have an external primary key index, then *piPk\n**   is set to the root page number of the primary key index before\n**   returning.\n**\n** ALGORITHM:\n**\n**   if( no entry exists in sqlite_schema ){\n**     return RBU_PK_NOTABLE\n**   }else if( sql for the entry starts with \"CREATE VIRTUAL\" ){\n**     return RBU_PK_VTAB\n**   }else if( \"PRAGMA index_list()\" for the table contains a \"pk\" index ){\n**     if( the index that is the pk exists in sqlite_schema ){\n**       *piPK = rootpage of that index.\n**       return RBU_PK_EXTERNAL\n**     }else{\n**       return RBU_PK_WITHOUT_ROWID\n**     }\n**   }else if( \"PRAGMA table_info()\" lists one or more \"pk\" columns ){\n**     return RBU_PK_IPK\n**   }else{\n**     return RBU_PK_NONE\n**   }\n*/\nstatic void rbuTableType(\n  sqlite3rbu *p,\n  const char *zTab,\n  int *peType,\n  int *piTnum,\n  int *piPk\n){\n  /*\n  ** 0) SELECT count(*) FROM sqlite_schema where name=%Q AND IsVirtual(%Q)\n  ** 1) PRAGMA index_list = ?\n  ** 2) SELECT count(*) FROM sqlite_schema where name=%Q\n  ** 3) PRAGMA table_info = ?\n  */\n  sqlite3_stmt *aStmt[4] = {0, 0, 0, 0};\n\n  *peType = RBU_PK_NOTABLE;\n  *piPk = 0;\n\n  assert( p->rc==SQLITE_OK );\n  p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[0], &p->zErrmsg,\n    sqlite3_mprintf(\n          \"SELECT \"\n          \" (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'),\"\n          \" rootpage\"\n          \"  FROM sqlite_schema\"\n          \" WHERE name=%Q\", zTab\n  ));\n  if( p->rc!=SQLITE_OK || sqlite3_step(aStmt[0])!=SQLITE_ROW ){\n    /* Either an error, or no such table. */\n    goto rbuTableType_end;\n  }\n  if( sqlite3_column_int(aStmt[0], 0) ){\n    *peType = RBU_PK_VTAB;                     /* virtual table */\n    goto rbuTableType_end;\n  }\n  *piTnum = sqlite3_column_int(aStmt[0], 1);\n\n  p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[1], &p->zErrmsg,\n    sqlite3_mprintf(\"PRAGMA index_list=%Q\",zTab)\n  );\n  if( p->rc ) goto rbuTableType_end;\n  while( sqlite3_step(aStmt[1])==SQLITE_ROW ){\n    const u8 *zOrig = sqlite3_column_text(aStmt[1], 3);\n    const u8 *zIdx = sqlite3_column_text(aStmt[1], 1);\n    if( zOrig && zIdx && zOrig[0]=='p' ){\n      p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[2], &p->zErrmsg,\n          sqlite3_mprintf(\n            \"SELECT rootpage FROM sqlite_schema WHERE name = %Q\", zIdx\n      ));\n      if( p->rc==SQLITE_OK ){\n        if( sqlite3_step(aStmt[2])==SQLITE_ROW ){\n          *piPk = sqlite3_column_int(aStmt[2], 0);\n          *peType = RBU_PK_EXTERNAL;\n        }else{\n          *peType = RBU_PK_WITHOUT_ROWID;\n        }\n      }\n      goto rbuTableType_end;\n    }\n  }\n\n  p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[3], &p->zErrmsg,\n    sqlite3_mprintf(\"PRAGMA table_info=%Q\",zTab)\n  );\n  if( p->rc==SQLITE_OK ){\n    while( sqlite3_step(aStmt[3])==SQLITE_ROW ){\n      if( sqlite3_column_int(aStmt[3],5)>0 ){\n        *peType = RBU_PK_IPK;                /* explicit IPK column */\n        goto rbuTableType_end;\n      }\n    }\n    *peType = RBU_PK_NONE;\n  }\n\nrbuTableType_end: {\n    unsigned int i;\n    for(i=0; i<sizeof(aStmt)/sizeof(aStmt[0]); i++){\n      rbuFinalize(p, aStmt[i]);\n    }\n  }\n}\n\n/*\n** This is a helper function for rbuObjIterCacheTableInfo(). It populates\n** the pIter->abIndexed[] array.\n*/\nstatic void rbuObjIterCacheIndexedCols(sqlite3rbu *p, RbuObjIter *pIter){\n  sqlite3_stmt *pList = 0;\n  int bIndex = 0;\n\n  if( p->rc==SQLITE_OK ){\n    memcpy(pIter->abIndexed, pIter->abTblPk, sizeof(u8)*pIter->nTblCol);\n    p->rc = prepareFreeAndCollectError(p->dbMain, &pList, &p->zErrmsg,\n        sqlite3_mprintf(\"PRAGMA main.index_list = %Q\", pIter->zTbl)\n    );\n  }\n\n  pIter->nIndex = 0;\n  while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pList) ){\n    const char *zIdx = (const char*)sqlite3_column_text(pList, 1);\n    int bPartial = sqlite3_column_int(pList, 4);\n    sqlite3_stmt *pXInfo = 0;\n    if( zIdx==0 ) break;\n    if( bPartial ){\n      memset(pIter->abIndexed, 0x01, sizeof(u8)*pIter->nTblCol);\n    }\n    p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,\n        sqlite3_mprintf(\"PRAGMA main.index_xinfo = %Q\", zIdx)\n    );\n    while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){\n      int iCid = sqlite3_column_int(pXInfo, 1);\n      if( iCid>=0 ) pIter->abIndexed[iCid] = 1;\n      if( iCid==-2 ){\n        memset(pIter->abIndexed, 0x01, sizeof(u8)*pIter->nTblCol);\n      }\n    }\n    rbuFinalize(p, pXInfo);\n    bIndex = 1;\n    pIter->nIndex++;\n  }\n\n  if( pIter->eType==RBU_PK_WITHOUT_ROWID ){\n    /* \"PRAGMA index_list\" includes the main PK b-tree */\n    pIter->nIndex--;\n  }\n\n  rbuFinalize(p, pList);\n  if( bIndex==0 ) pIter->abIndexed = 0;\n}\n\n\n/*\n** If they are not already populated, populate the pIter->azTblCol[],\n** pIter->abTblPk[], pIter->nTblCol and pIter->bRowid variables according to\n** the table (not index) that the iterator currently points to.\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise. If\n** an error does occur, an error code and error message are also left in\n** the RBU handle.\n*/\nstatic int rbuObjIterCacheTableInfo(sqlite3rbu *p, RbuObjIter *pIter){\n  if( pIter->azTblCol==0 ){\n    sqlite3_stmt *pStmt = 0;\n    int nCol = 0;\n    int i;                        /* for() loop iterator variable */\n    int bRbuRowid = 0;            /* If input table has column \"rbu_rowid\" */\n    int iOrder = 0;\n    int iTnum = 0;\n\n    /* Figure out the type of table this step will deal with. */\n    assert( pIter->eType==0 );\n    rbuTableType(p, pIter->zTbl, &pIter->eType, &iTnum, &pIter->iPkTnum);\n    if( p->rc==SQLITE_OK && pIter->eType==RBU_PK_NOTABLE ){\n      p->rc = SQLITE_ERROR;\n      p->zErrmsg = sqlite3_mprintf(\"no such table: %s\", pIter->zTbl);\n    }\n    if( p->rc ) return p->rc;\n    if( pIter->zIdx==0 ) pIter->iTnum = iTnum;\n\n    assert( pIter->eType==RBU_PK_NONE || pIter->eType==RBU_PK_IPK\n         || pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_WITHOUT_ROWID\n         || pIter->eType==RBU_PK_VTAB\n    );\n\n    /* Populate the azTblCol[] and nTblCol variables based on the columns\n    ** of the input table. Ignore any input table columns that begin with\n    ** \"rbu_\".  */\n    p->rc = prepareFreeAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,\n        sqlite3_mprintf(\"SELECT * FROM '%q'\", pIter->zDataTbl)\n    );\n    if( p->rc==SQLITE_OK ){\n      nCol = sqlite3_column_count(pStmt);\n      rbuAllocateIterArrays(p, pIter, nCol);\n    }\n    for(i=0; p->rc==SQLITE_OK && i<nCol; i++){\n      const char *zName = (const char*)sqlite3_column_name(pStmt, i);\n      if( sqlite3_strnicmp(\"rbu_\", zName, 4) ){\n        char *zCopy = rbuStrndup(zName, &p->rc);\n        pIter->aiSrcOrder[pIter->nTblCol] = pIter->nTblCol;\n        pIter->azTblCol[pIter->nTblCol++] = zCopy;\n      }\n      else if( 0==sqlite3_stricmp(\"rbu_rowid\", zName) ){\n        bRbuRowid = 1;\n      }\n    }\n    sqlite3_finalize(pStmt);\n    pStmt = 0;\n\n    if( p->rc==SQLITE_OK\n     && rbuIsVacuum(p)==0\n     && bRbuRowid!=(pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE)\n    ){\n      p->rc = SQLITE_ERROR;\n      p->zErrmsg = sqlite3_mprintf(\n          \"table %q %s rbu_rowid column\", pIter->zDataTbl,\n          (bRbuRowid ? \"may not have\" : \"requires\")\n      );\n    }\n\n    /* Check that all non-HIDDEN columns in the destination table are also\n    ** present in the input table. Populate the abTblPk[], azTblType[] and\n    ** aiTblOrder[] arrays at the same time.  */\n    if( p->rc==SQLITE_OK ){\n      p->rc = prepareFreeAndCollectError(p->dbMain, &pStmt, &p->zErrmsg,\n          sqlite3_mprintf(\"PRAGMA table_info(%Q)\", pIter->zTbl)\n      );\n    }\n    while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n      const char *zName = (const char*)sqlite3_column_text(pStmt, 1);\n      if( zName==0 ) break;  /* An OOM - finalize() below returns S_NOMEM */\n      for(i=iOrder; i<pIter->nTblCol; i++){\n        if( 0==strcmp(zName, pIter->azTblCol[i]) ) break;\n      }\n      if( i==pIter->nTblCol ){\n        p->rc = SQLITE_ERROR;\n        p->zErrmsg = sqlite3_mprintf(\"column missing from %q: %s\",\n            pIter->zDataTbl, zName\n        );\n      }else{\n        int iPk = sqlite3_column_int(pStmt, 5);\n        int bNotNull = sqlite3_column_int(pStmt, 3);\n        const char *zType = (const char*)sqlite3_column_text(pStmt, 2);\n\n        if( i!=iOrder ){\n          SWAP(int, pIter->aiSrcOrder[i], pIter->aiSrcOrder[iOrder]);\n          SWAP(char*, pIter->azTblCol[i], pIter->azTblCol[iOrder]);\n        }\n\n        pIter->azTblType[iOrder] = rbuStrndup(zType, &p->rc);\n        assert( iPk>=0 );\n        pIter->abTblPk[iOrder] = (u8)iPk;\n        pIter->abNotNull[iOrder] = (u8)bNotNull || (iPk!=0);\n        iOrder++;\n      }\n    }\n\n    rbuFinalize(p, pStmt);\n    rbuObjIterCacheIndexedCols(p, pIter);\n    assert( pIter->eType!=RBU_PK_VTAB || pIter->abIndexed==0 );\n    assert( pIter->eType!=RBU_PK_VTAB || pIter->nIndex==0 );\n  }\n\n  return p->rc;\n}\n\n/*\n** This function constructs and returns a pointer to a nul-terminated\n** string containing some SQL clause or list based on one or more of the\n** column names currently stored in the pIter->azTblCol[] array.\n*/\nstatic char *rbuObjIterGetCollist(\n  sqlite3rbu *p,                  /* RBU object */\n  RbuObjIter *pIter               /* Object iterator for column names */\n){\n  char *zList = 0;\n  const char *zSep = \"\";\n  int i;\n  for(i=0; i<pIter->nTblCol; i++){\n    const char *z = pIter->azTblCol[i];\n    zList = rbuMPrintf(p, \"%z%s\\\"%w\\\"\", zList, zSep, z);\n    zSep = \", \";\n  }\n  return zList;\n}\n\n/*\n** Return a comma separated list of the quoted PRIMARY KEY column names,\n** in order, for the current table. Before each column name, add the text\n** zPre. After each column name, add the zPost text. Use zSeparator as\n** the separator text (usually \", \").\n*/\nstatic char *rbuObjIterGetPkList(\n  sqlite3rbu *p,                  /* RBU object */\n  RbuObjIter *pIter,              /* Object iterator for column names */\n  const char *zPre,               /* Before each quoted column name */\n  const char *zSeparator,         /* Separator to use between columns */\n  const char *zPost               /* After each quoted column name */\n){\n  int iPk = 1;\n  char *zRet = 0;\n  const char *zSep = \"\";\n  while( 1 ){\n    int i;\n    for(i=0; i<pIter->nTblCol; i++){\n      if( (int)pIter->abTblPk[i]==iPk ){\n        const char *zCol = pIter->azTblCol[i];\n        zRet = rbuMPrintf(p, \"%z%s%s\\\"%w\\\"%s\", zRet, zSep, zPre, zCol, zPost);\n        zSep = zSeparator;\n        break;\n      }\n    }\n    if( i==pIter->nTblCol ) break;\n    iPk++;\n  }\n  return zRet;\n}\n\n/*\n** This function is called as part of restarting an RBU vacuum within\n** stage 1 of the process (while the *-oal file is being built) while\n** updating a table (not an index). The table may be a rowid table or\n** a WITHOUT ROWID table. It queries the target database to find the\n** largest key that has already been written to the target table and\n** constructs a WHERE clause that can be used to extract the remaining\n** rows from the source table. For a rowid table, the WHERE clause\n** is of the form:\n**\n**     \"WHERE _rowid_ > ?\"\n**\n** and for WITHOUT ROWID tables:\n**\n**     \"WHERE (key1, key2) > (?, ?)\"\n**\n** Instead of \"?\" placeholders, the actual WHERE clauses created by\n** this function contain literal SQL values.\n*/\nstatic char *rbuVacuumTableStart(\n  sqlite3rbu *p,                  /* RBU handle */\n  RbuObjIter *pIter,              /* RBU iterator object */\n  int bRowid,                     /* True for a rowid table */\n  const char *zWrite              /* Target table name prefix */\n){\n  sqlite3_stmt *pMax = 0;\n  char *zRet = 0;\n  if( bRowid ){\n    p->rc = prepareFreeAndCollectError(p->dbMain, &pMax, &p->zErrmsg,\n        sqlite3_mprintf(\n          \"SELECT max(_rowid_) FROM \\\"%s%w\\\"\", zWrite, pIter->zTbl\n        )\n    );\n    if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pMax) ){\n      sqlite3_int64 iMax = sqlite3_column_int64(pMax, 0);\n      zRet = rbuMPrintf(p, \" WHERE _rowid_ > %lld \", iMax);\n    }\n    rbuFinalize(p, pMax);\n  }else{\n    char *zOrder = rbuObjIterGetPkList(p, pIter, \"\", \", \", \" DESC\");\n    char *zSelect = rbuObjIterGetPkList(p, pIter, \"quote(\", \"||','||\", \")\");\n    char *zList = rbuObjIterGetPkList(p, pIter, \"\", \", \", \"\");\n\n    if( p->rc==SQLITE_OK ){\n      p->rc = prepareFreeAndCollectError(p->dbMain, &pMax, &p->zErrmsg,\n          sqlite3_mprintf(\n            \"SELECT %s FROM \\\"%s%w\\\" ORDER BY %s LIMIT 1\",\n                zSelect, zWrite, pIter->zTbl, zOrder\n          )\n      );\n      if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pMax) ){\n        const char *zVal = (const char*)sqlite3_column_text(pMax, 0);\n        zRet = rbuMPrintf(p, \" WHERE (%s) > (%s) \", zList, zVal);\n      }\n      rbuFinalize(p, pMax);\n    }\n\n    sqlite3_free(zOrder);\n    sqlite3_free(zSelect);\n    sqlite3_free(zList);\n  }\n  return zRet;\n}\n\n/*\n** This function is called as part of restating an RBU vacuum when the\n** current operation is writing content to an index. If possible, it\n** queries the target index b-tree for the largest key already written to\n** it, then composes and returns an expression that can be used in a WHERE\n** clause to select the remaining required rows from the source table.\n** It is only possible to return such an expression if:\n**\n**   * The index contains no DESC columns, and\n**   * The last key written to the index before the operation was\n**     suspended does not contain any NULL values.\n**\n** The expression is of the form:\n**\n**   (index-field1, index-field2, ...) > (?, ?, ...)\n**\n** except that the \"?\" placeholders are replaced with literal values.\n**\n** If the expression cannot be created, NULL is returned. In this case,\n** the caller has to use an OFFSET clause to extract only the required\n** rows from the sourct table, just as it does for an RBU update operation.\n*/\nstatic char *rbuVacuumIndexStart(\n  sqlite3rbu *p,                  /* RBU handle */\n  RbuObjIter *pIter               /* RBU iterator object */\n){\n  char *zOrder = 0;\n  char *zLhs = 0;\n  char *zSelect = 0;\n  char *zVector = 0;\n  char *zRet = 0;\n  int bFailed = 0;\n  const char *zSep = \"\";\n  int iCol = 0;\n  sqlite3_stmt *pXInfo = 0;\n\n  p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,\n      sqlite3_mprintf(\"PRAGMA main.index_xinfo = %Q\", pIter->zIdx)\n  );\n  while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){\n    int iCid = sqlite3_column_int(pXInfo, 1);\n    const char *zCollate = (const char*)sqlite3_column_text(pXInfo, 4);\n    const char *zCol;\n    if( sqlite3_column_int(pXInfo, 3) ){\n      bFailed = 1;\n      break;\n    }\n\n    if( iCid<0 ){\n      if( pIter->eType==RBU_PK_IPK ){\n        int i;\n        for(i=0; pIter->abTblPk[i]==0; i++);\n        assert( i<pIter->nTblCol );\n        zCol = pIter->azTblCol[i];\n      }else{\n        zCol = \"_rowid_\";\n      }\n    }else{\n      zCol = pIter->azTblCol[iCid];\n    }\n\n    zLhs = rbuMPrintf(p, \"%z%s \\\"%w\\\" COLLATE %Q\",\n        zLhs, zSep, zCol, zCollate\n        );\n    zOrder = rbuMPrintf(p, \"%z%s \\\"rbu_imp_%d%w\\\" COLLATE %Q DESC\",\n        zOrder, zSep, iCol, zCol, zCollate\n        );\n    zSelect = rbuMPrintf(p, \"%z%s quote(\\\"rbu_imp_%d%w\\\")\",\n        zSelect, zSep, iCol, zCol\n        );\n    zSep = \", \";\n    iCol++;\n  }\n  rbuFinalize(p, pXInfo);\n  if( bFailed ) goto index_start_out;\n\n  if( p->rc==SQLITE_OK ){\n    sqlite3_stmt *pSel = 0;\n\n    p->rc = prepareFreeAndCollectError(p->dbMain, &pSel, &p->zErrmsg,\n        sqlite3_mprintf(\"SELECT %s FROM \\\"rbu_imp_%w\\\" ORDER BY %s LIMIT 1\",\n          zSelect, pIter->zTbl, zOrder\n        )\n    );\n    if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSel) ){\n      zSep = \"\";\n      for(iCol=0; iCol<pIter->nCol; iCol++){\n        const char *zQuoted = (const char*)sqlite3_column_text(pSel, iCol);\n        if( zQuoted==0 ){\n          p->rc = SQLITE_NOMEM;\n        }else if( zQuoted[0]=='N' ){\n          bFailed = 1;\n          break;\n        }\n        zVector = rbuMPrintf(p, \"%z%s%s\", zVector, zSep, zQuoted);\n        zSep = \", \";\n      }\n\n      if( !bFailed ){\n        zRet = rbuMPrintf(p, \"(%s) > (%s)\", zLhs, zVector);\n      }\n    }\n    rbuFinalize(p, pSel);\n  }\n\n index_start_out:\n  sqlite3_free(zOrder);\n  sqlite3_free(zSelect);\n  sqlite3_free(zVector);\n  sqlite3_free(zLhs);\n  return zRet;\n}\n\n/*\n** This function is used to create a SELECT list (the list of SQL\n** expressions that follows a SELECT keyword) for a SELECT statement\n** used to read from an data_xxx or rbu_tmp_xxx table while updating the\n** index object currently indicated by the iterator object passed as the\n** second argument. A \"PRAGMA index_xinfo = <idxname>\" statement is used\n** to obtain the required information.\n**\n** If the index is of the following form:\n**\n**   CREATE INDEX i1 ON t1(c, b COLLATE nocase);\n**\n** and \"t1\" is a table with an explicit INTEGER PRIMARY KEY column\n** \"ipk\", the returned string is:\n**\n**   \"`c` COLLATE 'BINARY', `b` COLLATE 'NOCASE', `ipk` COLLATE 'BINARY'\"\n**\n** As well as the returned string, three other malloc'd strings are\n** returned via output parameters. As follows:\n**\n**   pzImposterCols: ...\n**   pzImposterPk: ...\n**   pzWhere: ...\n*/\nstatic char *rbuObjIterGetIndexCols(\n  sqlite3rbu *p,                  /* RBU object */\n  RbuObjIter *pIter,              /* Object iterator for column names */\n  char **pzImposterCols,          /* OUT: Columns for imposter table */\n  char **pzImposterPk,            /* OUT: Imposter PK clause */\n  char **pzWhere,                 /* OUT: WHERE clause */\n  int *pnBind                     /* OUT: Trbul number of columns */\n){\n  int rc = p->rc;                 /* Error code */\n  int rc2;                        /* sqlite3_finalize() return code */\n  char *zRet = 0;                 /* String to return */\n  char *zImpCols = 0;             /* String to return via *pzImposterCols */\n  char *zImpPK = 0;               /* String to return via *pzImposterPK */\n  char *zWhere = 0;               /* String to return via *pzWhere */\n  int nBind = 0;                  /* Value to return via *pnBind */\n  const char *zCom = \"\";          /* Set to \", \" later on */\n  const char *zAnd = \"\";          /* Set to \" AND \" later on */\n  sqlite3_stmt *pXInfo = 0;       /* PRAGMA index_xinfo = ? */\n\n  if( rc==SQLITE_OK ){\n    assert( p->zErrmsg==0 );\n    rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,\n        sqlite3_mprintf(\"PRAGMA main.index_xinfo = %Q\", pIter->zIdx)\n    );\n  }\n\n  while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){\n    int iCid = sqlite3_column_int(pXInfo, 1);\n    int bDesc = sqlite3_column_int(pXInfo, 3);\n    const char *zCollate = (const char*)sqlite3_column_text(pXInfo, 4);\n    const char *zCol = 0;\n    const char *zType;\n\n    if( iCid==-2 ){\n      int iSeq = sqlite3_column_int(pXInfo, 0);\n      zRet = sqlite3_mprintf(\"%z%s(%.*s) COLLATE %Q\", zRet, zCom,\n          pIter->aIdxCol[iSeq].nSpan, pIter->aIdxCol[iSeq].zSpan, zCollate\n      );\n      zType = \"\";\n    }else {\n      if( iCid<0 ){\n        /* An integer primary key. If the table has an explicit IPK, use\n        ** its name. Otherwise, use \"rbu_rowid\".  */\n        if( pIter->eType==RBU_PK_IPK ){\n          int i;\n          for(i=0; pIter->abTblPk[i]==0; i++);\n          assert( i<pIter->nTblCol );\n          zCol = pIter->azTblCol[i];\n        }else if( rbuIsVacuum(p) ){\n          zCol = \"_rowid_\";\n        }else{\n          zCol = \"rbu_rowid\";\n        }\n        zType = \"INTEGER\";\n      }else{\n        zCol = pIter->azTblCol[iCid];\n        zType = pIter->azTblType[iCid];\n      }\n      zRet = sqlite3_mprintf(\"%z%s\\\"%w\\\" COLLATE %Q\", zRet, zCom,zCol,zCollate);\n    }\n\n    if( pIter->bUnique==0 || sqlite3_column_int(pXInfo, 5) ){\n      const char *zOrder = (bDesc ? \" DESC\" : \"\");\n      zImpPK = sqlite3_mprintf(\"%z%s\\\"rbu_imp_%d%w\\\"%s\",\n          zImpPK, zCom, nBind, zCol, zOrder\n      );\n    }\n    zImpCols = sqlite3_mprintf(\"%z%s\\\"rbu_imp_%d%w\\\" %s COLLATE %Q\",\n        zImpCols, zCom, nBind, zCol, zType, zCollate\n    );\n    zWhere = sqlite3_mprintf(\n        \"%z%s\\\"rbu_imp_%d%w\\\" IS ?\", zWhere, zAnd, nBind, zCol\n    );\n    if( zRet==0 || zImpPK==0 || zImpCols==0 || zWhere==0 ) rc = SQLITE_NOMEM;\n    zCom = \", \";\n    zAnd = \" AND \";\n    nBind++;\n  }\n\n  rc2 = sqlite3_finalize(pXInfo);\n  if( rc==SQLITE_OK ) rc = rc2;\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(zRet);\n    sqlite3_free(zImpCols);\n    sqlite3_free(zImpPK);\n    sqlite3_free(zWhere);\n    zRet = 0;\n    zImpCols = 0;\n    zImpPK = 0;\n    zWhere = 0;\n    p->rc = rc;\n  }\n\n  *pzImposterCols = zImpCols;\n  *pzImposterPk = zImpPK;\n  *pzWhere = zWhere;\n  *pnBind = nBind;\n  return zRet;\n}\n\n/*\n** Assuming the current table columns are \"a\", \"b\" and \"c\", and the zObj\n** paramter is passed \"old\", return a string of the form:\n**\n**     \"old.a, old.b, old.b\"\n**\n** With the column names escaped.\n**\n** For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append\n** the text \", old._rowid_\" to the returned value.\n*/\nstatic char *rbuObjIterGetOldlist(\n  sqlite3rbu *p,\n  RbuObjIter *pIter,\n  const char *zObj\n){\n  char *zList = 0;\n  if( p->rc==SQLITE_OK && pIter->abIndexed ){\n    const char *zS = \"\";\n    int i;\n    for(i=0; i<pIter->nTblCol; i++){\n      if( pIter->abIndexed[i] ){\n        const char *zCol = pIter->azTblCol[i];\n        zList = sqlite3_mprintf(\"%z%s%s.\\\"%w\\\"\", zList, zS, zObj, zCol);\n      }else{\n        zList = sqlite3_mprintf(\"%z%sNULL\", zList, zS);\n      }\n      zS = \", \";\n      if( zList==0 ){\n        p->rc = SQLITE_NOMEM;\n        break;\n      }\n    }\n\n    /* For a table with implicit rowids, append \"old._rowid_\" to the list. */\n    if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){\n      zList = rbuMPrintf(p, \"%z, %s._rowid_\", zList, zObj);\n    }\n  }\n  return zList;\n}\n\n/*\n** Return an expression that can be used in a WHERE clause to match the\n** primary key of the current table. For example, if the table is:\n**\n**   CREATE TABLE t1(a, b, c, PRIMARY KEY(b, c));\n**\n** Return the string:\n**\n**   \"b = ?1 AND c = ?2\"\n*/\nstatic char *rbuObjIterGetWhere(\n  sqlite3rbu *p,\n  RbuObjIter *pIter\n){\n  char *zList = 0;\n  if( pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE ){\n    zList = rbuMPrintf(p, \"_rowid_ = ?%d\", pIter->nTblCol+1);\n  }else if( pIter->eType==RBU_PK_EXTERNAL ){\n    const char *zSep = \"\";\n    int i;\n    for(i=0; i<pIter->nTblCol; i++){\n      if( pIter->abTblPk[i] ){\n        zList = rbuMPrintf(p, \"%z%sc%d=?%d\", zList, zSep, i, i+1);\n        zSep = \" AND \";\n      }\n    }\n    zList = rbuMPrintf(p,\n        \"_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\", zList\n    );\n\n  }else{\n    const char *zSep = \"\";\n    int i;\n    for(i=0; i<pIter->nTblCol; i++){\n      if( pIter->abTblPk[i] ){\n        const char *zCol = pIter->azTblCol[i];\n        zList = rbuMPrintf(p, \"%z%s\\\"%w\\\"=?%d\", zList, zSep, zCol, i+1);\n        zSep = \" AND \";\n      }\n    }\n  }\n  return zList;\n}\n\n/*\n** The SELECT statement iterating through the keys for the current object\n** (p->objiter.pSelect) currently points to a valid row. However, there\n** is something wrong with the rbu_control value in the rbu_control value\n** stored in the (p->nCol+1)'th column. Set the error code and error message\n** of the RBU handle to something reflecting this.\n*/\nstatic void rbuBadControlError(sqlite3rbu *p){\n  p->rc = SQLITE_ERROR;\n  p->zErrmsg = sqlite3_mprintf(\"invalid rbu_control value\");\n}\n\n\n/*\n** Return a nul-terminated string containing the comma separated list of\n** assignments that should be included following the \"SET\" keyword of\n** an UPDATE statement used to update the table object that the iterator\n** passed as the second argument currently points to if the rbu_control\n** column of the data_xxx table entry is set to zMask.\n**\n** The memory for the returned string is obtained from sqlite3_malloc().\n** It is the responsibility of the caller to eventually free it using\n** sqlite3_free().\n**\n** If an OOM error is encountered when allocating space for the new\n** string, an error code is left in the rbu handle passed as the first\n** argument and NULL is returned. Or, if an error has already occurred\n** when this function is called, NULL is returned immediately, without\n** attempting the allocation or modifying the stored error code.\n*/\nstatic char *rbuObjIterGetSetlist(\n  sqlite3rbu *p,\n  RbuObjIter *pIter,\n  const char *zMask\n){\n  char *zList = 0;\n  if( p->rc==SQLITE_OK ){\n    int i;\n\n    if( (int)strlen(zMask)!=pIter->nTblCol ){\n      rbuBadControlError(p);\n    }else{\n      const char *zSep = \"\";\n      for(i=0; i<pIter->nTblCol; i++){\n        char c = zMask[pIter->aiSrcOrder[i]];\n        if( c=='x' ){\n          zList = rbuMPrintf(p, \"%z%s\\\"%w\\\"=?%d\",\n              zList, zSep, pIter->azTblCol[i], i+1\n          );\n          zSep = \", \";\n        }\n        else if( c=='d' ){\n          zList = rbuMPrintf(p, \"%z%s\\\"%w\\\"=rbu_delta(\\\"%w\\\", ?%d)\",\n              zList, zSep, pIter->azTblCol[i], pIter->azTblCol[i], i+1\n          );\n          zSep = \", \";\n        }\n        else if( c=='f' ){\n          zList = rbuMPrintf(p, \"%z%s\\\"%w\\\"=rbu_fossil_delta(\\\"%w\\\", ?%d)\",\n              zList, zSep, pIter->azTblCol[i], pIter->azTblCol[i], i+1\n          );\n          zSep = \", \";\n        }\n      }\n    }\n  }\n  return zList;\n}\n\n/*\n** Return a nul-terminated string consisting of nByte comma separated\n** \"?\" expressions. For example, if nByte is 3, return a pointer to\n** a buffer containing the string \"?,?,?\".\n**\n** The memory for the returned string is obtained from sqlite3_malloc().\n** It is the responsibility of the caller to eventually free it using\n** sqlite3_free().\n**\n** If an OOM error is encountered when allocating space for the new\n** string, an error code is left in the rbu handle passed as the first\n** argument and NULL is returned. Or, if an error has already occurred\n** when this function is called, NULL is returned immediately, without\n** attempting the allocation or modifying the stored error code.\n*/\nstatic char *rbuObjIterGetBindlist(sqlite3rbu *p, int nBind){\n  char *zRet = 0;\n  sqlite3_int64 nByte = 2*(sqlite3_int64)nBind + 1;\n\n  zRet = (char*)rbuMalloc(p, nByte);\n  if( zRet ){\n    int i;\n    for(i=0; i<nBind; i++){\n      zRet[i*2] = '?';\n      zRet[i*2+1] = (i+1==nBind) ? '\\0' : ',';\n    }\n  }\n  return zRet;\n}\n\n/*\n** The iterator currently points to a table (not index) of type\n** RBU_PK_WITHOUT_ROWID. This function creates the PRIMARY KEY\n** declaration for the corresponding imposter table. For example,\n** if the iterator points to a table created as:\n**\n**   CREATE TABLE t1(a, b, c, PRIMARY KEY(b, a DESC)) WITHOUT ROWID\n**\n** this function returns:\n**\n**   PRIMARY KEY(\"b\", \"a\" DESC)\n*/\nstatic char *rbuWithoutRowidPK(sqlite3rbu *p, RbuObjIter *pIter){\n  char *z = 0;\n  assert( pIter->zIdx==0 );\n  if( p->rc==SQLITE_OK ){\n    const char *zSep = \"PRIMARY KEY(\";\n    sqlite3_stmt *pXList = 0;     /* PRAGMA index_list = (pIter->zTbl) */\n    sqlite3_stmt *pXInfo = 0;     /* PRAGMA index_xinfo = <pk-index> */\n\n    p->rc = prepareFreeAndCollectError(p->dbMain, &pXList, &p->zErrmsg,\n        sqlite3_mprintf(\"PRAGMA main.index_list = %Q\", pIter->zTbl)\n    );\n    while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXList) ){\n      const char *zOrig = (const char*)sqlite3_column_text(pXList,3);\n      if( zOrig && strcmp(zOrig, \"pk\")==0 ){\n        const char *zIdx = (const char*)sqlite3_column_text(pXList,1);\n        if( zIdx ){\n          p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,\n              sqlite3_mprintf(\"PRAGMA main.index_xinfo = %Q\", zIdx)\n          );\n        }\n        break;\n      }\n    }\n    rbuFinalize(p, pXList);\n\n    while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){\n      if( sqlite3_column_int(pXInfo, 5) ){\n        /* int iCid = sqlite3_column_int(pXInfo, 0); */\n        const char *zCol = (const char*)sqlite3_column_text(pXInfo, 2);\n        const char *zDesc = sqlite3_column_int(pXInfo, 3) ? \" DESC\" : \"\";\n        z = rbuMPrintf(p, \"%z%s\\\"%w\\\"%s\", z, zSep, zCol, zDesc);\n        zSep = \", \";\n      }\n    }\n    z = rbuMPrintf(p, \"%z)\", z);\n    rbuFinalize(p, pXInfo);\n  }\n  return z;\n}\n\n/*\n** This function creates the second imposter table used when writing to\n** a table b-tree where the table has an external primary key. If the\n** iterator passed as the second argument does not currently point to\n** a table (not index) with an external primary key, this function is a\n** no-op.\n**\n** Assuming the iterator does point to a table with an external PK, this\n** function creates a WITHOUT ROWID imposter table named \"rbu_imposter2\"\n** used to access that PK index. For example, if the target table is\n** declared as follows:\n**\n**   CREATE TABLE t1(a, b TEXT, c REAL, PRIMARY KEY(b, c));\n**\n** then the imposter table schema is:\n**\n**   CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID;\n**\n*/\nstatic void rbuCreateImposterTable2(sqlite3rbu *p, RbuObjIter *pIter){\n  if( p->rc==SQLITE_OK && pIter->eType==RBU_PK_EXTERNAL ){\n    int tnum = pIter->iPkTnum;    /* Root page of PK index */\n    sqlite3_stmt *pQuery = 0;     /* SELECT name ... WHERE rootpage = $tnum */\n    const char *zIdx = 0;         /* Name of PK index */\n    sqlite3_stmt *pXInfo = 0;     /* PRAGMA main.index_xinfo = $zIdx */\n    const char *zComma = \"\";\n    char *zCols = 0;              /* Used to build up list of table cols */\n    char *zPk = 0;                /* Used to build up table PK declaration */\n\n    /* Figure out the name of the primary key index for the current table.\n    ** This is needed for the argument to \"PRAGMA index_xinfo\". Set\n    ** zIdx to point to a nul-terminated string containing this name. */\n    p->rc = prepareAndCollectError(p->dbMain, &pQuery, &p->zErrmsg,\n        \"SELECT name FROM sqlite_schema WHERE rootpage = ?\"\n    );\n    if( p->rc==SQLITE_OK ){\n      sqlite3_bind_int(pQuery, 1, tnum);\n      if( SQLITE_ROW==sqlite3_step(pQuery) ){\n        zIdx = (const char*)sqlite3_column_text(pQuery, 0);\n      }\n    }\n    if( zIdx ){\n      p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,\n          sqlite3_mprintf(\"PRAGMA main.index_xinfo = %Q\", zIdx)\n      );\n    }\n    rbuFinalize(p, pQuery);\n\n    while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){\n      int bKey = sqlite3_column_int(pXInfo, 5);\n      if( bKey ){\n        int iCid = sqlite3_column_int(pXInfo, 1);\n        int bDesc = sqlite3_column_int(pXInfo, 3);\n        const char *zCollate = (const char*)sqlite3_column_text(pXInfo, 4);\n        zCols = rbuMPrintf(p, \"%z%sc%d %s COLLATE %Q\", zCols, zComma,\n            iCid, pIter->azTblType[iCid], zCollate\n        );\n        zPk = rbuMPrintf(p, \"%z%sc%d%s\", zPk, zComma, iCid, bDesc?\" DESC\":\"\");\n        zComma = \", \";\n      }\n    }\n    zCols = rbuMPrintf(p, \"%z, id INTEGER\", zCols);\n    rbuFinalize(p, pXInfo);\n\n    sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 1, tnum);\n    rbuMPrintfExec(p, p->dbMain,\n        \"CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\",\n        zCols, zPk\n    );\n    sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 0, 0);\n  }\n}\n\n/*\n** If an error has already occurred when this function is called, it\n** immediately returns zero (without doing any work). Or, if an error\n** occurs during the execution of this function, it sets the error code\n** in the sqlite3rbu object indicated by the first argument and returns\n** zero.\n**\n** The iterator passed as the second argument is guaranteed to point to\n** a table (not an index) when this function is called. This function\n** attempts to create any imposter table required to write to the main\n** table b-tree of the table before returning. Non-zero is returned if\n** an imposter table are created, or zero otherwise.\n**\n** An imposter table is required in all cases except RBU_PK_VTAB. Only\n** virtual tables are written to directly. The imposter table has the\n** same schema as the actual target table (less any UNIQUE constraints).\n** More precisely, the \"same schema\" means the same columns, types,\n** collation sequences. For tables that do not have an external PRIMARY\n** KEY, it also means the same PRIMARY KEY declaration.\n*/\nstatic void rbuCreateImposterTable(sqlite3rbu *p, RbuObjIter *pIter){\n  if( p->rc==SQLITE_OK && pIter->eType!=RBU_PK_VTAB ){\n    int tnum = pIter->iTnum;\n    const char *zComma = \"\";\n    char *zSql = 0;\n    int iCol;\n    sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 0, 1);\n\n    for(iCol=0; p->rc==SQLITE_OK && iCol<pIter->nTblCol; iCol++){\n      const char *zPk = \"\";\n      const char *zCol = pIter->azTblCol[iCol];\n      const char *zColl = 0;\n\n      p->rc = sqlite3_table_column_metadata(\n          p->dbMain, \"main\", pIter->zTbl, zCol, 0, &zColl, 0, 0, 0\n      );\n\n      if( pIter->eType==RBU_PK_IPK && pIter->abTblPk[iCol] ){\n        /* If the target table column is an \"INTEGER PRIMARY KEY\", add\n        ** \"PRIMARY KEY\" to the imposter table column declaration. */\n        zPk = \"PRIMARY KEY \";\n      }\n      zSql = rbuMPrintf(p, \"%z%s\\\"%w\\\" %s %sCOLLATE %Q%s\",\n          zSql, zComma, zCol, pIter->azTblType[iCol], zPk, zColl,\n          (pIter->abNotNull[iCol] ? \" NOT NULL\" : \"\")\n      );\n      zComma = \", \";\n    }\n\n    if( pIter->eType==RBU_PK_WITHOUT_ROWID ){\n      char *zPk = rbuWithoutRowidPK(p, pIter);\n      if( zPk ){\n        zSql = rbuMPrintf(p, \"%z, %z\", zSql, zPk);\n      }\n    }\n\n    sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 1, tnum);\n    rbuMPrintfExec(p, p->dbMain, \"CREATE TABLE \\\"rbu_imp_%w\\\"(%z)%s\",\n        pIter->zTbl, zSql,\n        (pIter->eType==RBU_PK_WITHOUT_ROWID ? \" WITHOUT ROWID\" : \"\")\n    );\n    sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 0, 0);\n  }\n}\n\n/*\n** Prepare a statement used to insert rows into the \"rbu_tmp_xxx\" table.\n** Specifically a statement of the form:\n**\n**     INSERT INTO rbu_tmp_xxx VALUES(?, ?, ? ...);\n**\n** The number of bound variables is equal to the number of columns in\n** the target table, plus one (for the rbu_control column), plus one more\n** (for the rbu_rowid column) if the target table is an implicit IPK or\n** virtual table.\n*/\nstatic void rbuObjIterPrepareTmpInsert(\n  sqlite3rbu *p,\n  RbuObjIter *pIter,\n  const char *zCollist,\n  const char *zRbuRowid\n){\n  int bRbuRowid = (pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE);\n  char *zBind = rbuObjIterGetBindlist(p, pIter->nTblCol + 1 + bRbuRowid);\n  if( zBind ){\n    assert( pIter->pTmpInsert==0 );\n    p->rc = prepareFreeAndCollectError(\n        p->dbRbu, &pIter->pTmpInsert, &p->zErrmsg, sqlite3_mprintf(\n          \"INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\",\n          p->zStateDb, pIter->zDataTbl, zCollist, zRbuRowid, zBind\n    ));\n  }\n}\n\nstatic void rbuTmpInsertFunc(\n  sqlite3_context *pCtx,\n  int nVal,\n  sqlite3_value **apVal\n){\n  sqlite3rbu *p = sqlite3_user_data(pCtx);\n  int rc = SQLITE_OK;\n  int i;\n\n  assert( sqlite3_value_int(apVal[0])!=0\n      || p->objiter.eType==RBU_PK_EXTERNAL\n      || p->objiter.eType==RBU_PK_NONE\n  );\n  if( sqlite3_value_int(apVal[0])!=0 ){\n    p->nPhaseOneStep += p->objiter.nIndex;\n  }\n\n  for(i=0; rc==SQLITE_OK && i<nVal; i++){\n    rc = sqlite3_bind_value(p->objiter.pTmpInsert, i+1, apVal[i]);\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3_step(p->objiter.pTmpInsert);\n    rc = sqlite3_reset(p->objiter.pTmpInsert);\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx, rc);\n  }\n}\n\nstatic char *rbuObjIterGetIndexWhere(sqlite3rbu *p, RbuObjIter *pIter){\n  sqlite3_stmt *pStmt = 0;\n  int rc = p->rc;\n  char *zRet = 0;\n\n  assert( pIter->zIdxSql==0 && pIter->nIdxCol==0 && pIter->aIdxCol==0 );\n\n  if( rc==SQLITE_OK ){\n    rc = prepareAndCollectError(p->dbMain, &pStmt, &p->zErrmsg,\n        \"SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\"\n    );\n  }\n  if( rc==SQLITE_OK ){\n    int rc2;\n    rc = sqlite3_bind_text(pStmt, 1, pIter->zIdx, -1, SQLITE_STATIC);\n    if( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n      char *zSql = (char*)sqlite3_column_text(pStmt, 0);\n      if( zSql ){\n        pIter->zIdxSql = zSql = rbuStrndup(zSql, &rc);\n      }\n      if( zSql ){\n        int nParen = 0;           /* Number of open parenthesis */\n        int i;\n        int iIdxCol = 0;\n        int nIdxAlloc = 0;\n        for(i=0; zSql[i]; i++){\n          char c = zSql[i];\n\n          /* If necessary, grow the pIter->aIdxCol[] array */\n          if( iIdxCol==nIdxAlloc ){\n            RbuSpan *aIdxCol = (RbuSpan*)sqlite3_realloc(\n                pIter->aIdxCol, (nIdxAlloc+16)*sizeof(RbuSpan)\n            );\n            if( aIdxCol==0 ){\n              rc = SQLITE_NOMEM;\n              break;\n            }\n            pIter->aIdxCol = aIdxCol;\n            nIdxAlloc += 16;\n          }\n\n          if( c=='(' ){\n            if( nParen==0 ){\n              assert( iIdxCol==0 );\n              pIter->aIdxCol[0].zSpan = &zSql[i+1];\n            }\n            nParen++;\n          }\n          else if( c==')' ){\n            nParen--;\n            if( nParen==0 ){\n              int nSpan = (int)(&zSql[i] - pIter->aIdxCol[iIdxCol].zSpan);\n              pIter->aIdxCol[iIdxCol++].nSpan = nSpan;\n              i++;\n              break;\n            }\n          }else if( c==',' && nParen==1 ){\n            int nSpan = (int)(&zSql[i] - pIter->aIdxCol[iIdxCol].zSpan);\n            pIter->aIdxCol[iIdxCol++].nSpan = nSpan;\n            pIter->aIdxCol[iIdxCol].zSpan = &zSql[i+1];\n          }else if( c=='\"' || c=='\\'' || c=='`' ){\n            for(i++; 1; i++){\n              if( zSql[i]==c ){\n                if( zSql[i+1]!=c ) break;\n                i++;\n              }\n            }\n          }else if( c=='[' ){\n            for(i++; 1; i++){\n              if( zSql[i]==']' ) break;\n            }\n          }else if( c=='-' && zSql[i+1]=='-' ){\n            for(i=i+2; zSql[i] && zSql[i]!='\\n'; i++);\n            if( zSql[i]=='\\0' ) break;\n          }else if( c=='/' && zSql[i+1]=='*' ){\n            for(i=i+2; zSql[i] && (zSql[i]!='*' || zSql[i+1]!='/'); i++);\n            if( zSql[i]=='\\0' ) break;\n            i++;\n          }\n        }\n        if( zSql[i] ){\n          zRet = rbuStrndup(&zSql[i], &rc);\n        }\n        pIter->nIdxCol = iIdxCol;\n      }\n    }\n\n    rc2 = sqlite3_finalize(pStmt);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  p->rc = rc;\n  return zRet;\n}\n\n/*\n** Ensure that the SQLite statement handles required to update the\n** target database object currently indicated by the iterator passed\n** as the second argument are available.\n*/\nstatic int rbuObjIterPrepareAll(\n  sqlite3rbu *p,\n  RbuObjIter *pIter,\n  int nOffset                     /* Add \"LIMIT -1 OFFSET $nOffset\" to SELECT */\n){\n  assert( pIter->bCleanup==0 );\n  if( pIter->pSelect==0 && rbuObjIterCacheTableInfo(p, pIter)==SQLITE_OK ){\n    const int tnum = pIter->iTnum;\n    char *zCollist = 0;           /* List of indexed columns */\n    char **pz = &p->zErrmsg;\n    const char *zIdx = pIter->zIdx;\n    char *zLimit = 0;\n\n    if( nOffset ){\n      zLimit = sqlite3_mprintf(\" LIMIT -1 OFFSET %d\", nOffset);\n      if( !zLimit ) p->rc = SQLITE_NOMEM;\n    }\n\n    if( zIdx ){\n      const char *zTbl = pIter->zTbl;\n      char *zImposterCols = 0;    /* Columns for imposter table */\n      char *zImposterPK = 0;      /* Primary key declaration for imposter */\n      char *zWhere = 0;           /* WHERE clause on PK columns */\n      char *zBind = 0;\n      char *zPart = 0;\n      int nBind = 0;\n\n      assert( pIter->eType!=RBU_PK_VTAB );\n      zPart = rbuObjIterGetIndexWhere(p, pIter);\n      zCollist = rbuObjIterGetIndexCols(\n          p, pIter, &zImposterCols, &zImposterPK, &zWhere, &nBind\n      );\n      zBind = rbuObjIterGetBindlist(p, nBind);\n\n      /* Create the imposter table used to write to this index. */\n      sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 0, 1);\n      sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 1,tnum);\n      rbuMPrintfExec(p, p->dbMain,\n          \"CREATE TABLE \\\"rbu_imp_%w\\\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\",\n          zTbl, zImposterCols, zImposterPK\n      );\n      sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, \"main\", 0, 0);\n\n      /* Create the statement to insert index entries */\n      pIter->nCol = nBind;\n      if( p->rc==SQLITE_OK ){\n        p->rc = prepareFreeAndCollectError(\n            p->dbMain, &pIter->pInsert, &p->zErrmsg,\n          sqlite3_mprintf(\"INSERT INTO \\\"rbu_imp_%w\\\" VALUES(%s)\", zTbl, zBind)\n        );\n      }\n\n      /* And to delete index entries */\n      if( rbuIsVacuum(p)==0 && p->rc==SQLITE_OK ){\n        p->rc = prepareFreeAndCollectError(\n            p->dbMain, &pIter->pDelete, &p->zErrmsg,\n          sqlite3_mprintf(\"DELETE FROM \\\"rbu_imp_%w\\\" WHERE %s\", zTbl, zWhere)\n        );\n      }\n\n      /* Create the SELECT statement to read keys in sorted order */\n      if( p->rc==SQLITE_OK ){\n        char *zSql;\n        if( rbuIsVacuum(p) ){\n          char *zStart = 0;\n          if( nOffset ){\n            zStart = rbuVacuumIndexStart(p, pIter);\n            if( zStart ){\n              sqlite3_free(zLimit);\n              zLimit = 0;\n            }\n          }\n\n          zSql = sqlite3_mprintf(\n              \"SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\",\n              zCollist,\n              pIter->zDataTbl,\n              zPart,\n              (zStart ? (zPart ? \"AND\" : \"WHERE\") : \"\"), zStart,\n              zCollist, zLimit\n          );\n          sqlite3_free(zStart);\n        }else\n\n        if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){\n          zSql = sqlite3_mprintf(\n              \"SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\",\n              zCollist, p->zStateDb, pIter->zDataTbl,\n              zPart, zCollist, zLimit\n          );\n        }else{\n          zSql = sqlite3_mprintf(\n              \"SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s \"\n              \"UNION ALL \"\n              \"SELECT %s, rbu_control FROM '%q' \"\n              \"%s %s typeof(rbu_control)='integer' AND rbu_control!=1 \"\n              \"ORDER BY %s%s\",\n              zCollist, p->zStateDb, pIter->zDataTbl, zPart,\n              zCollist, pIter->zDataTbl,\n              zPart,\n              (zPart ? \"AND\" : \"WHERE\"),\n              zCollist, zLimit\n          );\n        }\n        if( p->rc==SQLITE_OK ){\n          p->rc = prepareFreeAndCollectError(p->dbRbu,&pIter->pSelect,pz,zSql);\n        }else{\n          sqlite3_free(zSql);\n        }\n      }\n\n      sqlite3_free(zImposterCols);\n      sqlite3_free(zImposterPK);\n      sqlite3_free(zWhere);\n      sqlite3_free(zBind);\n      sqlite3_free(zPart);\n    }else{\n      int bRbuRowid = (pIter->eType==RBU_PK_VTAB)\n                    ||(pIter->eType==RBU_PK_NONE)\n                    ||(pIter->eType==RBU_PK_EXTERNAL && rbuIsVacuum(p));\n      const char *zTbl = pIter->zTbl;       /* Table this step applies to */\n      const char *zWrite;                   /* Imposter table name */\n\n      char *zBindings = rbuObjIterGetBindlist(p, pIter->nTblCol + bRbuRowid);\n      char *zWhere = rbuObjIterGetWhere(p, pIter);\n      char *zOldlist = rbuObjIterGetOldlist(p, pIter, \"old\");\n      char *zNewlist = rbuObjIterGetOldlist(p, pIter, \"new\");\n\n      zCollist = rbuObjIterGetCollist(p, pIter);\n      pIter->nCol = pIter->nTblCol;\n\n      /* Create the imposter table or tables (if required). */\n      rbuCreateImposterTable(p, pIter);\n      rbuCreateImposterTable2(p, pIter);\n      zWrite = (pIter->eType==RBU_PK_VTAB ? \"\" : \"rbu_imp_\");\n\n      /* Create the INSERT statement to write to the target PK b-tree */\n      if( p->rc==SQLITE_OK ){\n        p->rc = prepareFreeAndCollectError(p->dbMain, &pIter->pInsert, pz,\n            sqlite3_mprintf(\n              \"INSERT INTO \\\"%s%w\\\"(%s%s) VALUES(%s)\",\n              zWrite, zTbl, zCollist, (bRbuRowid ? \", _rowid_\" : \"\"), zBindings\n            )\n        );\n      }\n\n      /* Create the DELETE statement to write to the target PK b-tree.\n      ** Because it only performs INSERT operations, this is not required for\n      ** an rbu vacuum handle.  */\n      if( rbuIsVacuum(p)==0 && p->rc==SQLITE_OK ){\n        p->rc = prepareFreeAndCollectError(p->dbMain, &pIter->pDelete, pz,\n            sqlite3_mprintf(\n              \"DELETE FROM \\\"%s%w\\\" WHERE %s\", zWrite, zTbl, zWhere\n            )\n        );\n      }\n\n      if( rbuIsVacuum(p)==0 && pIter->abIndexed ){\n        const char *zRbuRowid = \"\";\n        if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){\n          zRbuRowid = \", rbu_rowid\";\n        }\n\n        /* Create the rbu_tmp_xxx table and the triggers to populate it. */\n        rbuMPrintfExec(p, p->dbRbu,\n            \"CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS \"\n            \"SELECT *%s FROM '%q' WHERE 0;\"\n            , p->zStateDb, pIter->zDataTbl\n            , (pIter->eType==RBU_PK_EXTERNAL ? \", 0 AS rbu_rowid\" : \"\")\n            , pIter->zDataTbl\n        );\n\n        rbuMPrintfExec(p, p->dbMain,\n            \"CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \\\"%s%w\\\" \"\n            \"BEGIN \"\n            \"  SELECT rbu_tmp_insert(3, %s);\"\n            \"END;\"\n\n            \"CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \\\"%s%w\\\" \"\n            \"BEGIN \"\n            \"  SELECT rbu_tmp_insert(3, %s);\"\n            \"END;\"\n\n            \"CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \\\"%s%w\\\" \"\n            \"BEGIN \"\n            \"  SELECT rbu_tmp_insert(4, %s);\"\n            \"END;\",\n            zWrite, zTbl, zOldlist,\n            zWrite, zTbl, zOldlist,\n            zWrite, zTbl, zNewlist\n        );\n\n        if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){\n          rbuMPrintfExec(p, p->dbMain,\n              \"CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \\\"%s%w\\\" \"\n              \"BEGIN \"\n              \"  SELECT rbu_tmp_insert(0, %s);\"\n              \"END;\",\n              zWrite, zTbl, zNewlist\n          );\n        }\n\n        rbuObjIterPrepareTmpInsert(p, pIter, zCollist, zRbuRowid);\n      }\n\n      /* Create the SELECT statement to read keys from data_xxx */\n      if( p->rc==SQLITE_OK ){\n        const char *zRbuRowid = \"\";\n        char *zStart = 0;\n        char *zOrder = 0;\n        if( bRbuRowid ){\n          zRbuRowid = rbuIsVacuum(p) ? \",_rowid_ \" : \",rbu_rowid\";\n        }\n\n        if( rbuIsVacuum(p) ){\n          if( nOffset ){\n            zStart = rbuVacuumTableStart(p, pIter, bRbuRowid, zWrite);\n            if( zStart ){\n              sqlite3_free(zLimit);\n              zLimit = 0;\n            }\n          }\n          if( bRbuRowid ){\n            zOrder = rbuMPrintf(p, \"_rowid_\");\n          }else{\n            zOrder = rbuObjIterGetPkList(p, pIter, \"\", \", \", \"\");\n          }\n        }\n\n        if( p->rc==SQLITE_OK ){\n          p->rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pSelect, pz,\n              sqlite3_mprintf(\n                \"SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\",\n                zCollist,\n                (rbuIsVacuum(p) ? \"0 AS \" : \"\"),\n                zRbuRowid,\n                pIter->zDataTbl, (zStart ? zStart : \"\"),\n                (zOrder ? \"ORDER BY\" : \"\"), zOrder,\n                zLimit\n              )\n          );\n        }\n        sqlite3_free(zStart);\n        sqlite3_free(zOrder);\n      }\n\n      sqlite3_free(zWhere);\n      sqlite3_free(zOldlist);\n      sqlite3_free(zNewlist);\n      sqlite3_free(zBindings);\n    }\n    sqlite3_free(zCollist);\n    sqlite3_free(zLimit);\n  }\n\n  return p->rc;\n}\n\n/*\n** Set output variable *ppStmt to point to an UPDATE statement that may\n** be used to update the imposter table for the main table b-tree of the\n** table object that pIter currently points to, assuming that the\n** rbu_control column of the data_xyz table contains zMask.\n**\n** If the zMask string does not specify any columns to update, then this\n** is not an error. Output variable *ppStmt is set to NULL in this case.\n*/\nstatic int rbuGetUpdateStmt(\n  sqlite3rbu *p,                  /* RBU handle */\n  RbuObjIter *pIter,              /* Object iterator */\n  const char *zMask,              /* rbu_control value ('x.x.') */\n  sqlite3_stmt **ppStmt           /* OUT: UPDATE statement handle */\n){\n  RbuUpdateStmt **pp;\n  RbuUpdateStmt *pUp = 0;\n  int nUp = 0;\n\n  /* In case an error occurs */\n  *ppStmt = 0;\n\n  /* Search for an existing statement. If one is found, shift it to the front\n  ** of the LRU queue and return immediately. Otherwise, leave nUp pointing\n  ** to the number of statements currently in the cache and pUp to the\n  ** last object in the list.  */\n  for(pp=&pIter->pRbuUpdate; *pp; pp=&((*pp)->pNext)){\n    pUp = *pp;\n    if( strcmp(pUp->zMask, zMask)==0 ){\n      *pp = pUp->pNext;\n      pUp->pNext = pIter->pRbuUpdate;\n      pIter->pRbuUpdate = pUp;\n      *ppStmt = pUp->pUpdate;\n      return SQLITE_OK;\n    }\n    nUp++;\n  }\n  assert( pUp==0 || pUp->pNext==0 );\n\n  if( nUp>=SQLITE_RBU_UPDATE_CACHESIZE ){\n    for(pp=&pIter->pRbuUpdate; *pp!=pUp; pp=&((*pp)->pNext));\n    *pp = 0;\n    sqlite3_finalize(pUp->pUpdate);\n    pUp->pUpdate = 0;\n  }else{\n    pUp = (RbuUpdateStmt*)rbuMalloc(p, sizeof(RbuUpdateStmt)+pIter->nTblCol+1);\n  }\n\n  if( pUp ){\n    char *zWhere = rbuObjIterGetWhere(p, pIter);\n    char *zSet = rbuObjIterGetSetlist(p, pIter, zMask);\n    char *zUpdate = 0;\n\n    pUp->zMask = (char*)&pUp[1];\n    memcpy(pUp->zMask, zMask, pIter->nTblCol);\n    pUp->pNext = pIter->pRbuUpdate;\n    pIter->pRbuUpdate = pUp;\n\n    if( zSet ){\n      const char *zPrefix = \"\";\n\n      if( pIter->eType!=RBU_PK_VTAB ) zPrefix = \"rbu_imp_\";\n      zUpdate = sqlite3_mprintf(\"UPDATE \\\"%s%w\\\" SET %s WHERE %s\",\n          zPrefix, pIter->zTbl, zSet, zWhere\n      );\n      p->rc = prepareFreeAndCollectError(\n          p->dbMain, &pUp->pUpdate, &p->zErrmsg, zUpdate\n      );\n      *ppStmt = pUp->pUpdate;\n    }\n    sqlite3_free(zWhere);\n    sqlite3_free(zSet);\n  }\n\n  return p->rc;\n}\n\nstatic sqlite3 *rbuOpenDbhandle(\n  sqlite3rbu *p,\n  const char *zName,\n  int bUseVfs\n){\n  sqlite3 *db = 0;\n  if( p->rc==SQLITE_OK ){\n    const int flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_URI;\n    p->rc = sqlite3_open_v2(zName, &db, flags, bUseVfs ? p->zVfsName : 0);\n    if( p->rc ){\n      p->zErrmsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n      sqlite3_close(db);\n      db = 0;\n    }\n  }\n  return db;\n}\n\n/*\n** Free an RbuState object allocated by rbuLoadState().\n*/\nstatic void rbuFreeState(RbuState *p){\n  if( p ){\n    sqlite3_free(p->zTbl);\n    sqlite3_free(p->zDataTbl);\n    sqlite3_free(p->zIdx);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Allocate an RbuState object and load the contents of the rbu_state\n** table into it. Return a pointer to the new object. It is the\n** responsibility of the caller to eventually free the object using\n** sqlite3_free().\n**\n** If an error occurs, leave an error code and message in the rbu handle\n** and return NULL.\n*/\nstatic RbuState *rbuLoadState(sqlite3rbu *p){\n  RbuState *pRet = 0;\n  sqlite3_stmt *pStmt = 0;\n  int rc;\n  int rc2;\n\n  pRet = (RbuState*)rbuMalloc(p, sizeof(RbuState));\n  if( pRet==0 ) return 0;\n\n  rc = prepareFreeAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,\n      sqlite3_mprintf(\"SELECT k, v FROM %s.rbu_state\", p->zStateDb)\n  );\n  while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n    switch( sqlite3_column_int(pStmt, 0) ){\n      case RBU_STATE_STAGE:\n        pRet->eStage = sqlite3_column_int(pStmt, 1);\n        if( pRet->eStage!=RBU_STAGE_OAL\n         && pRet->eStage!=RBU_STAGE_MOVE\n         && pRet->eStage!=RBU_STAGE_CKPT\n        ){\n          p->rc = SQLITE_CORRUPT;\n        }\n        break;\n\n      case RBU_STATE_TBL:\n        pRet->zTbl = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);\n        break;\n\n      case RBU_STATE_IDX:\n        pRet->zIdx = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);\n        break;\n\n      case RBU_STATE_ROW:\n        pRet->nRow = sqlite3_column_int(pStmt, 1);\n        break;\n\n      case RBU_STATE_PROGRESS:\n        pRet->nProgress = sqlite3_column_int64(pStmt, 1);\n        break;\n\n      case RBU_STATE_CKPT:\n        pRet->iWalCksum = sqlite3_column_int64(pStmt, 1);\n        break;\n\n      case RBU_STATE_COOKIE:\n        pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);\n        break;\n\n      case RBU_STATE_OALSZ:\n        pRet->iOalSz = sqlite3_column_int64(pStmt, 1);\n        break;\n\n      case RBU_STATE_PHASEONESTEP:\n        pRet->nPhaseOneStep = sqlite3_column_int64(pStmt, 1);\n        break;\n\n      case RBU_STATE_DATATBL:\n        pRet->zDataTbl = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);\n        break;\n\n      default:\n        rc = SQLITE_CORRUPT;\n        break;\n    }\n  }\n  rc2 = sqlite3_finalize(pStmt);\n  if( rc==SQLITE_OK ) rc = rc2;\n\n  p->rc = rc;\n  return pRet;\n}\n\n\n/*\n** Open the database handle and attach the RBU database as \"rbu\". If an\n** error occurs, leave an error code and message in the RBU handle.\n**\n** If argument dbMain is not NULL, then it is a database handle already\n** open on the target database. Use this handle instead of opening a new\n** one.\n*/\nstatic void rbuOpenDatabase(sqlite3rbu *p, sqlite3 *dbMain, int *pbRetry){\n  assert( p->rc || (p->dbMain==0 && p->dbRbu==0) );\n  assert( p->rc || rbuIsVacuum(p) || p->zTarget!=0 );\n  assert( dbMain==0 || rbuIsVacuum(p)==0 );\n\n  /* Open the RBU database */\n  p->dbRbu = rbuOpenDbhandle(p, p->zRbu, 1);\n  p->dbMain = dbMain;\n\n  if( p->rc==SQLITE_OK && rbuIsVacuum(p) ){\n    sqlite3_file_control(p->dbRbu, \"main\", SQLITE_FCNTL_RBUCNT, (void*)p);\n    if( p->zState==0 ){\n      const char *zFile = sqlite3_db_filename(p->dbRbu, \"main\");\n      p->zState = rbuMPrintf(p, \"file:///%s-vacuum?modeof=%s\", zFile, zFile);\n    }\n  }\n\n  /* If using separate RBU and state databases, attach the state database to\n  ** the RBU db handle now.  */\n  if( p->zState ){\n    rbuMPrintfExec(p, p->dbRbu, \"ATTACH %Q AS stat\", p->zState);\n    memcpy(p->zStateDb, \"stat\", 4);\n  }else{\n    memcpy(p->zStateDb, \"main\", 4);\n  }\n\n#if 0\n  if( p->rc==SQLITE_OK && rbuIsVacuum(p) ){\n    p->rc = sqlite3_exec(p->dbRbu, \"BEGIN\", 0, 0, 0);\n  }\n#endif\n\n  /* If it has not already been created, create the rbu_state table */\n  rbuMPrintfExec(p, p->dbRbu, RBU_CREATE_STATE, p->zStateDb);\n\n#if 0\n  if( rbuIsVacuum(p) ){\n    if( p->rc==SQLITE_OK ){\n      int rc2;\n      int bOk = 0;\n      sqlite3_stmt *pCnt = 0;\n      p->rc = prepareAndCollectError(p->dbRbu, &pCnt, &p->zErrmsg,\n          \"SELECT count(*) FROM stat.sqlite_schema\"\n      );\n      if( p->rc==SQLITE_OK\n       && sqlite3_step(pCnt)==SQLITE_ROW\n       && 1==sqlite3_column_int(pCnt, 0)\n      ){\n        bOk = 1;\n      }\n      rc2 = sqlite3_finalize(pCnt);\n      if( p->rc==SQLITE_OK ) p->rc = rc2;\n\n      if( p->rc==SQLITE_OK && bOk==0 ){\n        p->rc = SQLITE_ERROR;\n        p->zErrmsg = sqlite3_mprintf(\"invalid state database\");\n      }\n\n      if( p->rc==SQLITE_OK ){\n        p->rc = sqlite3_exec(p->dbRbu, \"COMMIT\", 0, 0, 0);\n      }\n    }\n  }\n#endif\n\n  if( p->rc==SQLITE_OK && rbuIsVacuum(p) ){\n    int bOpen = 0;\n    int rc;\n    p->nRbu = 0;\n    p->pRbuFd = 0;\n    rc = sqlite3_file_control(p->dbRbu, \"main\", SQLITE_FCNTL_RBUCNT, (void*)p);\n    if( rc!=SQLITE_NOTFOUND ) p->rc = rc;\n    if( p->eStage>=RBU_STAGE_MOVE ){\n      bOpen = 1;\n    }else{\n      RbuState *pState = rbuLoadState(p);\n      if( pState ){\n        bOpen = (pState->eStage>=RBU_STAGE_MOVE);\n        rbuFreeState(pState);\n      }\n    }\n    if( bOpen ) p->dbMain = rbuOpenDbhandle(p, p->zRbu, p->nRbu<=1);\n  }\n\n  p->eStage = 0;\n  if( p->rc==SQLITE_OK && p->dbMain==0 ){\n    if( !rbuIsVacuum(p) ){\n      p->dbMain = rbuOpenDbhandle(p, p->zTarget, 1);\n    }else if( p->pRbuFd->pWalFd ){\n      if( pbRetry ){\n        p->pRbuFd->bNolock = 0;\n        sqlite3_close(p->dbRbu);\n        sqlite3_close(p->dbMain);\n        p->dbMain = 0;\n        p->dbRbu = 0;\n        *pbRetry = 1;\n        return;\n      }\n      p->rc = SQLITE_ERROR;\n      p->zErrmsg = sqlite3_mprintf(\"cannot vacuum wal mode database\");\n    }else{\n      char *zTarget;\n      char *zExtra = 0;\n      if( strlen(p->zRbu)>=5 && 0==memcmp(\"file:\", p->zRbu, 5) ){\n        zExtra = &p->zRbu[5];\n        while( *zExtra ){\n          if( *zExtra++=='?' ) break;\n        }\n        if( *zExtra=='\\0' ) zExtra = 0;\n      }\n\n      zTarget = sqlite3_mprintf(\"file:%s-vactmp?rbu_memory=1%s%s\",\n          sqlite3_db_filename(p->dbRbu, \"main\"),\n          (zExtra==0 ? \"\" : \"&\"), (zExtra==0 ? \"\" : zExtra)\n      );\n\n      if( zTarget==0 ){\n        p->rc = SQLITE_NOMEM;\n        return;\n      }\n      p->dbMain = rbuOpenDbhandle(p, zTarget, p->nRbu<=1);\n      sqlite3_free(zTarget);\n    }\n  }\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_create_function(p->dbMain,\n        \"rbu_tmp_insert\", -1, SQLITE_UTF8, (void*)p, rbuTmpInsertFunc, 0, 0\n    );\n  }\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_create_function(p->dbMain,\n        \"rbu_fossil_delta\", 2, SQLITE_UTF8, 0, rbuFossilDeltaFunc, 0, 0\n    );\n  }\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_create_function(p->dbRbu,\n        \"rbu_target_name\", -1, SQLITE_UTF8, (void*)p, rbuTargetNameFunc, 0, 0\n    );\n  }\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_file_control(p->dbMain, \"main\", SQLITE_FCNTL_RBU, (void*)p);\n  }\n  rbuMPrintfExec(p, p->dbMain, \"SELECT * FROM sqlite_schema\");\n\n  /* Mark the database file just opened as an RBU target database. If\n  ** this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use.\n  ** This is an error.  */\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_file_control(p->dbMain, \"main\", SQLITE_FCNTL_RBU, (void*)p);\n  }\n\n  if( p->rc==SQLITE_NOTFOUND ){\n    p->rc = SQLITE_ERROR;\n    p->zErrmsg = sqlite3_mprintf(\"rbu vfs not found\");\n  }\n}\n\n/*\n** This routine is a copy of the sqlite3FileSuffix3() routine from the core.\n** It is a no-op unless SQLITE_ENABLE_8_3_NAMES is defined.\n**\n** If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database\n** filename in zBaseFilename is a URI with the \"8_3_names=1\" parameter and\n** if filename in z[] has a suffix (a.k.a. \"extension\") that is longer than\n** three characters, then shorten the suffix on z[] to be the last three\n** characters of the original suffix.\n**\n** If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always\n** do the suffix shortening regardless of URI parameter.\n**\n** Examples:\n**\n**     test.db-journal    =>   test.nal\n**     test.db-wal        =>   test.wal\n**     test.db-shm        =>   test.shm\n**     test.db-mj7f3319fa =>   test.9fa\n*/\nstatic void rbuFileSuffix3(const char *zBase, char *z){\n#ifdef SQLITE_ENABLE_8_3_NAMES\n#if SQLITE_ENABLE_8_3_NAMES<2\n  if( sqlite3_uri_boolean(zBase, \"8_3_names\", 0) )\n#endif\n  {\n    int i, sz;\n    sz = (int)strlen(z)&0xffffff;\n    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}\n    if( z[i]=='.' && sz>i+4 ) memmove(&z[i+1], &z[sz-3], 4);\n  }\n#else\n  UNUSED_PARAMETER2(zBase,z);\n#endif\n}\n\n/*\n** Return the current wal-index header checksum for the target database\n** as a 64-bit integer.\n**\n** The checksum is store in the first page of xShmMap memory as an 8-byte\n** blob starting at byte offset 40.\n*/\nstatic i64 rbuShmChecksum(sqlite3rbu *p){\n  i64 iRet = 0;\n  if( p->rc==SQLITE_OK ){\n    sqlite3_file *pDb = p->pTargetFd->pReal;\n    u32 volatile *ptr;\n    p->rc = pDb->pMethods->xShmMap(pDb, 0, 32*1024, 0, (void volatile**)&ptr);\n    if( p->rc==SQLITE_OK ){\n      iRet = (i64)(((u64)ptr[10] << 32) + ptr[11]);\n    }\n  }\n  return iRet;\n}\n\n/*\n** This function is called as part of initializing or reinitializing an\n** incremental checkpoint.\n**\n** It populates the sqlite3rbu.aFrame[] array with the set of\n** (wal frame -> db page) copy operations required to checkpoint the\n** current wal file, and obtains the set of shm locks required to safely\n** perform the copy operations directly on the file-system.\n**\n** If argument pState is not NULL, then the incremental checkpoint is\n** being resumed. In this case, if the checksum of the wal-index-header\n** following recovery is not the same as the checksum saved in the RbuState\n** object, then the rbu handle is set to DONE state. This occurs if some\n** other client appends a transaction to the wal file in the middle of\n** an incremental checkpoint.\n*/\nstatic void rbuSetupCheckpoint(sqlite3rbu *p, RbuState *pState){\n\n  /* If pState is NULL, then the wal file may not have been opened and\n  ** recovered. Running a read-statement here to ensure that doing so\n  ** does not interfere with the \"capture\" process below.  */\n  if( pState==0 ){\n    p->eStage = 0;\n    if( p->rc==SQLITE_OK ){\n      p->rc = sqlite3_exec(p->dbMain, \"SELECT * FROM sqlite_schema\", 0, 0, 0);\n    }\n  }\n\n  /* Assuming no error has occurred, run a \"restart\" checkpoint with the\n  ** sqlite3rbu.eStage variable set to CAPTURE. This turns on the following\n  ** special behaviour in the rbu VFS:\n  **\n  **   * If the exclusive shm WRITER or READ0 lock cannot be obtained,\n  **     the checkpoint fails with SQLITE_BUSY (normally SQLite would\n  **     proceed with running a passive checkpoint instead of failing).\n  **\n  **   * Attempts to read from the *-wal file or write to the database file\n  **     do not perform any IO. Instead, the frame/page combinations that\n  **     would be read/written are recorded in the sqlite3rbu.aFrame[]\n  **     array.\n  **\n  **   * Calls to xShmLock(UNLOCK) to release the exclusive shm WRITER,\n  **     READ0 and CHECKPOINT locks taken as part of the checkpoint are\n  **     no-ops. These locks will not be released until the connection\n  **     is closed.\n  **\n  **   * Attempting to xSync() the database file causes an SQLITE_NOTICE\n  **     error.\n  **\n  ** As a result, unless an error (i.e. OOM or SQLITE_BUSY) occurs, the\n  ** checkpoint below fails with SQLITE_NOTICE, and leaves the aFrame[]\n  ** array populated with a set of (frame -> page) mappings. Because the\n  ** WRITER, CHECKPOINT and READ0 locks are still held, it is safe to copy\n  ** data from the wal file into the database file according to the\n  ** contents of aFrame[].\n  */\n  if( p->rc==SQLITE_OK ){\n    int rc2;\n    p->eStage = RBU_STAGE_CAPTURE;\n    rc2 = sqlite3_exec(p->dbMain, \"PRAGMA main.wal_checkpoint=restart\", 0, 0,0);\n    if( rc2!=SQLITE_NOTICE ) p->rc = rc2;\n  }\n\n  if( p->rc==SQLITE_OK && p->nFrame>0 ){\n    p->eStage = RBU_STAGE_CKPT;\n    p->nStep = (pState ? pState->nRow : 0);\n    p->aBuf = rbuMalloc(p, p->pgsz);\n    p->iWalCksum = rbuShmChecksum(p);\n  }\n\n  if( p->rc==SQLITE_OK ){\n    if( p->nFrame==0 || (pState && pState->iWalCksum!=p->iWalCksum) ){\n      p->rc = SQLITE_DONE;\n      p->eStage = RBU_STAGE_DONE;\n    }else{\n      int nSectorSize;\n      sqlite3_file *pDb = p->pTargetFd->pReal;\n      sqlite3_file *pWal = p->pTargetFd->pWalFd->pReal;\n      assert( p->nPagePerSector==0 );\n      nSectorSize = pDb->pMethods->xSectorSize(pDb);\n      if( nSectorSize>p->pgsz ){\n        p->nPagePerSector = nSectorSize / p->pgsz;\n      }else{\n        p->nPagePerSector = 1;\n      }\n\n      /* Call xSync() on the wal file. This causes SQLite to sync the\n      ** directory in which the target database and the wal file reside, in\n      ** case it has not been synced since the rename() call in\n      ** rbuMoveOalFile(). */\n      p->rc = pWal->pMethods->xSync(pWal, SQLITE_SYNC_NORMAL);\n    }\n  }\n}\n\n/*\n** Called when iAmt bytes are read from offset iOff of the wal file while\n** the rbu object is in capture mode. Record the frame number of the frame\n** being read in the aFrame[] array.\n*/\nstatic int rbuCaptureWalRead(sqlite3rbu *pRbu, i64 iOff, int iAmt){\n  const u32 mReq = (1<<WAL_LOCK_WRITE)|(1<<WAL_LOCK_CKPT)|(1<<WAL_LOCK_READ0);\n  u32 iFrame;\n\n  if( pRbu->mLock!=mReq ){\n    pRbu->rc = SQLITE_BUSY;\n    return SQLITE_NOTICE_RBU;\n  }\n\n  pRbu->pgsz = iAmt;\n  if( pRbu->nFrame==pRbu->nFrameAlloc ){\n    int nNew = (pRbu->nFrameAlloc ? pRbu->nFrameAlloc : 64) * 2;\n    RbuFrame *aNew;\n    aNew = (RbuFrame*)sqlite3_realloc64(pRbu->aFrame, nNew * sizeof(RbuFrame));\n    if( aNew==0 ) return SQLITE_NOMEM;\n    pRbu->aFrame = aNew;\n    pRbu->nFrameAlloc = nNew;\n  }\n\n  iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;\n  if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;\n  pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;\n  pRbu->aFrame[pRbu->nFrame].iDbPage = 0;\n  pRbu->nFrame++;\n  return SQLITE_OK;\n}\n\n/*\n** Called when a page of data is written to offset iOff of the database\n** file while the rbu handle is in capture mode. Record the page number\n** of the page being written in the aFrame[] array.\n*/\nstatic int rbuCaptureDbWrite(sqlite3rbu *pRbu, i64 iOff){\n  pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;\n  return SQLITE_OK;\n}\n\n/*\n** This is called as part of an incremental checkpoint operation. Copy\n** a single frame of data from the wal file into the database file, as\n** indicated by the RbuFrame object.\n*/\nstatic void rbuCheckpointFrame(sqlite3rbu *p, RbuFrame *pFrame){\n  sqlite3_file *pWal = p->pTargetFd->pWalFd->pReal;\n  sqlite3_file *pDb = p->pTargetFd->pReal;\n  i64 iOff;\n\n  assert( p->rc==SQLITE_OK );\n  iOff = (i64)(pFrame->iWalFrame-1) * (p->pgsz + 24) + 32 + 24;\n  p->rc = pWal->pMethods->xRead(pWal, p->aBuf, p->pgsz, iOff);\n  if( p->rc ) return;\n\n  iOff = (i64)(pFrame->iDbPage-1) * p->pgsz;\n  p->rc = pDb->pMethods->xWrite(pDb, p->aBuf, p->pgsz, iOff);\n}\n\n/*\n** This value is copied from the definition of ZIPVFS_CTRL_FILE_POINTER\n** in zipvfs.h.\n*/\n#define RBU_ZIPVFS_CTRL_FILE_POINTER 230439\n\n/*\n** Take an EXCLUSIVE lock on the database file. Return SQLITE_OK if\n** successful, or an SQLite error code otherwise.\n*/\nstatic int rbuLockDatabase(sqlite3 *db){\n  int rc = SQLITE_OK;\n  sqlite3_file *fd = 0;\n\n  sqlite3_file_control(db, \"main\", RBU_ZIPVFS_CTRL_FILE_POINTER, &fd);\n  if( fd ){\n    sqlite3_file_control(db, \"main\", SQLITE_FCNTL_FILE_POINTER, &fd);\n    rc = fd->pMethods->xLock(fd, SQLITE_LOCK_SHARED);\n    if( rc==SQLITE_OK ){\n      rc = fd->pMethods->xUnlock(fd, SQLITE_LOCK_NONE);\n    }\n    sqlite3_file_control(db, \"main\", RBU_ZIPVFS_CTRL_FILE_POINTER, &fd);\n  }else{\n    sqlite3_file_control(db, \"main\", SQLITE_FCNTL_FILE_POINTER, &fd);\n  }\n\n  if( rc==SQLITE_OK && fd->pMethods ){\n    rc = fd->pMethods->xLock(fd, SQLITE_LOCK_SHARED);\n    if( rc==SQLITE_OK ){\n      rc = fd->pMethods->xLock(fd, SQLITE_LOCK_EXCLUSIVE);\n    }\n  }\n  return rc;\n}\n\n/*\n** Return true if the database handle passed as the only argument\n** was opened with the rbu_exclusive_checkpoint=1 URI parameter\n** specified. Or false otherwise.\n*/\nstatic int rbuExclusiveCheckpoint(sqlite3 *db){\n  const char *zUri = sqlite3_db_filename(db, 0);\n  return sqlite3_uri_boolean(zUri, RBU_EXCLUSIVE_CHECKPOINT, 0);\n}\n\n#if defined(_WIN32_WCE)\nstatic LPWSTR rbuWinUtf8ToUnicode(const char *zFilename){\n  int nChar;\n  LPWSTR zWideFilename;\n\n  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);\n  if( nChar==0 ){\n    return 0;\n  }\n  zWideFilename = sqlite3_malloc64( nChar*sizeof(zWideFilename[0]) );\n  if( zWideFilename==0 ){\n    return 0;\n  }\n  memset(zWideFilename, 0, nChar*sizeof(zWideFilename[0]));\n  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename,\n                                nChar);\n  if( nChar==0 ){\n    sqlite3_free(zWideFilename);\n    zWideFilename = 0;\n  }\n  return zWideFilename;\n}\n#endif\n\n/*\n** The RBU handle is currently in RBU_STAGE_OAL state, with a SHARED lock\n** on the database file. This proc moves the *-oal file to the *-wal path,\n** then reopens the database file (this time in vanilla, non-oal, WAL mode).\n** If an error occurs, leave an error code and error message in the rbu\n** handle.\n*/\nstatic void rbuMoveOalFile(sqlite3rbu *p){\n  const char *zBase = sqlite3_db_filename(p->dbMain, \"main\");\n  const char *zMove = zBase;\n  char *zOal;\n  char *zWal;\n\n  if( rbuIsVacuum(p) ){\n    zMove = sqlite3_db_filename(p->dbRbu, \"main\");\n  }\n  zOal = sqlite3_mprintf(\"%s-oal\", zMove);\n  zWal = sqlite3_mprintf(\"%s-wal\", zMove);\n\n  assert( p->eStage==RBU_STAGE_MOVE );\n  assert( p->rc==SQLITE_OK && p->zErrmsg==0 );\n  if( zWal==0 || zOal==0 ){\n    p->rc = SQLITE_NOMEM;\n  }else{\n    /* Move the *-oal file to *-wal. At this point connection p->db is\n    ** holding a SHARED lock on the target database file (because it is\n    ** in WAL mode). So no other connection may be writing the db.\n    **\n    ** In order to ensure that there are no database readers, an EXCLUSIVE\n    ** lock is obtained here before the *-oal is moved to *-wal.\n    */\n    sqlite3 *dbMain = 0;\n    rbuFileSuffix3(zBase, zWal);\n    rbuFileSuffix3(zBase, zOal);\n\n    /* Re-open the databases. */\n    rbuObjIterFinalize(&p->objiter);\n    sqlite3_close(p->dbRbu);\n    sqlite3_close(p->dbMain);\n    p->dbMain = 0;\n    p->dbRbu = 0;\n\n    dbMain = rbuOpenDbhandle(p, p->zTarget, 1);\n    if( dbMain ){\n      assert( p->rc==SQLITE_OK );\n      p->rc = rbuLockDatabase(dbMain);\n    }\n\n    if( p->rc==SQLITE_OK ){\n      p->rc = p->xRename(p->pRenameArg, zOal, zWal);\n    }\n\n    if( p->rc!=SQLITE_OK\n     || rbuIsVacuum(p)\n     || rbuExclusiveCheckpoint(dbMain)==0\n    ){\n      sqlite3_close(dbMain);\n      dbMain = 0;\n    }\n\n    if( p->rc==SQLITE_OK ){\n      rbuOpenDatabase(p, dbMain, 0);\n      rbuSetupCheckpoint(p, 0);\n    }\n  }\n\n  sqlite3_free(zWal);\n  sqlite3_free(zOal);\n}\n\n/*\n** The SELECT statement iterating through the keys for the current object\n** (p->objiter.pSelect) currently points to a valid row. This function\n** determines the type of operation requested by this row and returns\n** one of the following values to indicate the result:\n**\n**     * RBU_INSERT\n**     * RBU_DELETE\n**     * RBU_IDX_DELETE\n**     * RBU_UPDATE\n**\n** If RBU_UPDATE is returned, then output variable *pzMask is set to\n** point to the text value indicating the columns to update.\n**\n** If the rbu_control field contains an invalid value, an error code and\n** message are left in the RBU handle and zero returned.\n*/\nstatic int rbuStepType(sqlite3rbu *p, const char **pzMask){\n  int iCol = p->objiter.nCol;     /* Index of rbu_control column */\n  int res = 0;                    /* Return value */\n\n  switch( sqlite3_column_type(p->objiter.pSelect, iCol) ){\n    case SQLITE_INTEGER: {\n      int iVal = sqlite3_column_int(p->objiter.pSelect, iCol);\n      switch( iVal ){\n        case 0: res = RBU_INSERT;     break;\n        case 1: res = RBU_DELETE;     break;\n        case 2: res = RBU_REPLACE;    break;\n        case 3: res = RBU_IDX_DELETE; break;\n        case 4: res = RBU_IDX_INSERT; break;\n      }\n      break;\n    }\n\n    case SQLITE_TEXT: {\n      const unsigned char *z = sqlite3_column_text(p->objiter.pSelect, iCol);\n      if( z==0 ){\n        p->rc = SQLITE_NOMEM;\n      }else{\n        *pzMask = (const char*)z;\n      }\n      res = RBU_UPDATE;\n\n      break;\n    }\n\n    default:\n      break;\n  }\n\n  if( res==0 ){\n    rbuBadControlError(p);\n  }\n  return res;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** Assert that column iCol of statement pStmt is named zName.\n*/\nstatic void assertColumnName(sqlite3_stmt *pStmt, int iCol, const char *zName){\n  const char *zCol = sqlite3_column_name(pStmt, iCol);\n  assert( 0==sqlite3_stricmp(zName, zCol) );\n}\n#else\n# define assertColumnName(x,y,z)\n#endif\n\n/*\n** Argument eType must be one of RBU_INSERT, RBU_DELETE, RBU_IDX_INSERT or\n** RBU_IDX_DELETE. This function performs the work of a single\n** sqlite3rbu_step() call for the type of operation specified by eType.\n*/\nstatic void rbuStepOneOp(sqlite3rbu *p, int eType){\n  RbuObjIter *pIter = &p->objiter;\n  sqlite3_value *pVal;\n  sqlite3_stmt *pWriter;\n  int i;\n\n  assert( p->rc==SQLITE_OK );\n  assert( eType!=RBU_DELETE || pIter->zIdx==0 );\n  assert( eType==RBU_DELETE || eType==RBU_IDX_DELETE\n       || eType==RBU_INSERT || eType==RBU_IDX_INSERT\n  );\n\n  /* If this is a delete, decrement nPhaseOneStep by nIndex. If the DELETE\n  ** statement below does actually delete a row, nPhaseOneStep will be\n  ** incremented by the same amount when SQL function rbu_tmp_insert()\n  ** is invoked by the trigger.  */\n  if( eType==RBU_DELETE ){\n    p->nPhaseOneStep -= p->objiter.nIndex;\n  }\n\n  if( eType==RBU_IDX_DELETE || eType==RBU_DELETE ){\n    pWriter = pIter->pDelete;\n  }else{\n    pWriter = pIter->pInsert;\n  }\n\n  for(i=0; i<pIter->nCol; i++){\n    /* If this is an INSERT into a table b-tree and the table has an\n    ** explicit INTEGER PRIMARY KEY, check that this is not an attempt\n    ** to write a NULL into the IPK column. That is not permitted.  */\n    if( eType==RBU_INSERT\n     && pIter->zIdx==0 && pIter->eType==RBU_PK_IPK && pIter->abTblPk[i]\n     && sqlite3_column_type(pIter->pSelect, i)==SQLITE_NULL\n    ){\n      p->rc = SQLITE_MISMATCH;\n      p->zErrmsg = sqlite3_mprintf(\"datatype mismatch\");\n      return;\n    }\n\n    if( eType==RBU_DELETE && pIter->abTblPk[i]==0 ){\n      continue;\n    }\n\n    pVal = sqlite3_column_value(pIter->pSelect, i);\n    p->rc = sqlite3_bind_value(pWriter, i+1, pVal);\n    if( p->rc ) return;\n  }\n  if( pIter->zIdx==0 ){\n    if( pIter->eType==RBU_PK_VTAB\n     || pIter->eType==RBU_PK_NONE\n     || (pIter->eType==RBU_PK_EXTERNAL && rbuIsVacuum(p))\n    ){\n      /* For a virtual table, or a table with no primary key, the\n      ** SELECT statement is:\n      **\n      **   SELECT <cols>, rbu_control, rbu_rowid FROM ....\n      **\n      ** Hence column_value(pIter->nCol+1).\n      */\n      assertColumnName(pIter->pSelect, pIter->nCol+1,\n          rbuIsVacuum(p) ? \"rowid\" : \"rbu_rowid\"\n      );\n      pVal = sqlite3_column_value(pIter->pSelect, pIter->nCol+1);\n      p->rc = sqlite3_bind_value(pWriter, pIter->nCol+1, pVal);\n    }\n  }\n  if( p->rc==SQLITE_OK ){\n    sqlite3_step(pWriter);\n    p->rc = resetAndCollectError(pWriter, &p->zErrmsg);\n  }\n}\n\n/*\n** This function does the work for an sqlite3rbu_step() call.\n**\n** The object-iterator (p->objiter) currently points to a valid object,\n** and the input cursor (p->objiter.pSelect) currently points to a valid\n** input row. Perform whatever processing is required and return.\n**\n** If no  error occurs, SQLITE_OK is returned. Otherwise, an error code\n** and message is left in the RBU handle and a copy of the error code\n** returned.\n*/\nstatic int rbuStep(sqlite3rbu *p){\n  RbuObjIter *pIter = &p->objiter;\n  const char *zMask = 0;\n  int eType = rbuStepType(p, &zMask);\n\n  if( eType ){\n    assert( eType==RBU_INSERT     || eType==RBU_DELETE\n         || eType==RBU_REPLACE    || eType==RBU_IDX_DELETE\n         || eType==RBU_IDX_INSERT || eType==RBU_UPDATE\n    );\n    assert( eType!=RBU_UPDATE || pIter->zIdx==0 );\n\n    if( pIter->zIdx==0 && (eType==RBU_IDX_DELETE || eType==RBU_IDX_INSERT) ){\n      rbuBadControlError(p);\n    }\n    else if( eType==RBU_REPLACE ){\n      if( pIter->zIdx==0 ){\n        p->nPhaseOneStep += p->objiter.nIndex;\n        rbuStepOneOp(p, RBU_DELETE);\n      }\n      if( p->rc==SQLITE_OK ) rbuStepOneOp(p, RBU_INSERT);\n    }\n    else if( eType!=RBU_UPDATE ){\n      rbuStepOneOp(p, eType);\n    }\n    else{\n      sqlite3_value *pVal;\n      sqlite3_stmt *pUpdate = 0;\n      assert( eType==RBU_UPDATE );\n      p->nPhaseOneStep -= p->objiter.nIndex;\n      rbuGetUpdateStmt(p, pIter, zMask, &pUpdate);\n      if( pUpdate ){\n        int i;\n        for(i=0; p->rc==SQLITE_OK && i<pIter->nCol; i++){\n          char c = zMask[pIter->aiSrcOrder[i]];\n          pVal = sqlite3_column_value(pIter->pSelect, i);\n          if( pIter->abTblPk[i] || c!='.' ){\n            p->rc = sqlite3_bind_value(pUpdate, i+1, pVal);\n          }\n        }\n        if( p->rc==SQLITE_OK\n         && (pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE)\n        ){\n          /* Bind the rbu_rowid value to column _rowid_ */\n          assertColumnName(pIter->pSelect, pIter->nCol+1, \"rbu_rowid\");\n          pVal = sqlite3_column_value(pIter->pSelect, pIter->nCol+1);\n          p->rc = sqlite3_bind_value(pUpdate, pIter->nCol+1, pVal);\n        }\n        if( p->rc==SQLITE_OK ){\n          sqlite3_step(pUpdate);\n          p->rc = resetAndCollectError(pUpdate, &p->zErrmsg);\n        }\n      }\n    }\n  }\n  return p->rc;\n}\n\n/*\n** Increment the schema cookie of the main database opened by p->dbMain.\n**\n** Or, if this is an RBU vacuum, set the schema cookie of the main db\n** opened by p->dbMain to one more than the schema cookie of the main\n** db opened by p->dbRbu.\n*/\nstatic void rbuIncrSchemaCookie(sqlite3rbu *p){\n  if( p->rc==SQLITE_OK ){\n    sqlite3 *dbread = (rbuIsVacuum(p) ? p->dbRbu : p->dbMain);\n    int iCookie = 1000000;\n    sqlite3_stmt *pStmt;\n\n    p->rc = prepareAndCollectError(dbread, &pStmt, &p->zErrmsg,\n        \"PRAGMA schema_version\"\n    );\n    if( p->rc==SQLITE_OK ){\n      /* Coverage: it may be that this sqlite3_step() cannot fail. There\n      ** is already a transaction open, so the prepared statement cannot\n      ** throw an SQLITE_SCHEMA exception. The only database page the\n      ** statement reads is page 1, which is guaranteed to be in the cache.\n      ** And no memory allocations are required.  */\n      if( SQLITE_ROW==sqlite3_step(pStmt) ){\n        iCookie = sqlite3_column_int(pStmt, 0);\n      }\n      rbuFinalize(p, pStmt);\n    }\n    if( p->rc==SQLITE_OK ){\n      rbuMPrintfExec(p, p->dbMain, \"PRAGMA schema_version = %d\", iCookie+1);\n    }\n  }\n}\n\n/*\n** Update the contents of the rbu_state table within the rbu database. The\n** value stored in the RBU_STATE_STAGE column is eStage. All other values\n** are determined by inspecting the rbu handle passed as the first argument.\n*/\nstatic void rbuSaveState(sqlite3rbu *p, int eStage){\n  if( p->rc==SQLITE_OK || p->rc==SQLITE_DONE ){\n    sqlite3_stmt *pInsert = 0;\n    rbu_file *pFd = (rbuIsVacuum(p) ? p->pRbuFd : p->pTargetFd);\n    int rc;\n\n    assert( p->zErrmsg==0 );\n    rc = prepareFreeAndCollectError(p->dbRbu, &pInsert, &p->zErrmsg,\n        sqlite3_mprintf(\n          \"INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES \"\n          \"(%d, %d), \"\n          \"(%d, %Q), \"\n          \"(%d, %Q), \"\n          \"(%d, %d), \"\n          \"(%d, %lld), \"\n          \"(%d, %lld), \"\n          \"(%d, %lld), \"\n          \"(%d, %lld), \"\n          \"(%d, %lld), \"\n          \"(%d, %Q)  \",\n          p->zStateDb,\n          RBU_STATE_STAGE, eStage,\n          RBU_STATE_TBL, p->objiter.zTbl,\n          RBU_STATE_IDX, p->objiter.zIdx,\n          RBU_STATE_ROW, p->nStep,\n          RBU_STATE_PROGRESS, p->nProgress,\n          RBU_STATE_CKPT, p->iWalCksum,\n          RBU_STATE_COOKIE, (i64)pFd->iCookie,\n          RBU_STATE_OALSZ, p->iOalSz,\n          RBU_STATE_PHASEONESTEP, p->nPhaseOneStep,\n          RBU_STATE_DATATBL, p->objiter.zDataTbl\n      )\n    );\n    assert( pInsert==0 || rc==SQLITE_OK );\n\n    if( rc==SQLITE_OK ){\n      sqlite3_step(pInsert);\n      rc = sqlite3_finalize(pInsert);\n    }\n    if( rc!=SQLITE_OK ) p->rc = rc;\n  }\n}\n\n\n/*\n** The second argument passed to this function is the name of a PRAGMA\n** setting - \"page_size\", \"auto_vacuum\", \"user_version\" or \"application_id\".\n** This function executes the following on sqlite3rbu.dbRbu:\n**\n**   \"PRAGMA main.$zPragma\"\n**\n** where $zPragma is the string passed as the second argument, then\n** on sqlite3rbu.dbMain:\n**\n**   \"PRAGMA main.$zPragma = $val\"\n**\n** where $val is the value returned by the first PRAGMA invocation.\n**\n** In short, it copies the value  of the specified PRAGMA setting from\n** dbRbu to dbMain.\n*/\nstatic void rbuCopyPragma(sqlite3rbu *p, const char *zPragma){\n  if( p->rc==SQLITE_OK ){\n    sqlite3_stmt *pPragma = 0;\n    p->rc = prepareFreeAndCollectError(p->dbRbu, &pPragma, &p->zErrmsg,\n        sqlite3_mprintf(\"PRAGMA main.%s\", zPragma)\n    );\n    if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pPragma) ){\n      p->rc = rbuMPrintfExec(p, p->dbMain, \"PRAGMA main.%s = %d\",\n          zPragma, sqlite3_column_int(pPragma, 0)\n      );\n    }\n    rbuFinalize(p, pPragma);\n  }\n}\n\n/*\n** The RBU handle passed as the only argument has just been opened and\n** the state database is empty. If this RBU handle was opened for an\n** RBU vacuum operation, create the schema in the target db.\n*/\nstatic void rbuCreateTargetSchema(sqlite3rbu *p){\n  sqlite3_stmt *pSql = 0;\n  sqlite3_stmt *pInsert = 0;\n\n  assert( rbuIsVacuum(p) );\n  p->rc = sqlite3_exec(p->dbMain, \"PRAGMA writable_schema=1\", 0,0, &p->zErrmsg);\n  if( p->rc==SQLITE_OK ){\n    p->rc = prepareAndCollectError(p->dbRbu, &pSql, &p->zErrmsg,\n      \"SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0\"\n      \" AND name!='sqlite_sequence' \"\n      \" ORDER BY type DESC\"\n    );\n  }\n\n  while( p->rc==SQLITE_OK && sqlite3_step(pSql)==SQLITE_ROW ){\n    const char *zSql = (const char*)sqlite3_column_text(pSql, 0);\n    p->rc = sqlite3_exec(p->dbMain, zSql, 0, 0, &p->zErrmsg);\n  }\n  rbuFinalize(p, pSql);\n  if( p->rc!=SQLITE_OK ) return;\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = prepareAndCollectError(p->dbRbu, &pSql, &p->zErrmsg,\n        \"SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\"\n    );\n  }\n\n  if( p->rc==SQLITE_OK ){\n    p->rc = prepareAndCollectError(p->dbMain, &pInsert, &p->zErrmsg,\n        \"INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\"\n    );\n  }\n\n  while( p->rc==SQLITE_OK && sqlite3_step(pSql)==SQLITE_ROW ){\n    int i;\n    for(i=0; i<5; i++){\n      sqlite3_bind_value(pInsert, i+1, sqlite3_column_value(pSql, i));\n    }\n    sqlite3_step(pInsert);\n    p->rc = sqlite3_reset(pInsert);\n  }\n  if( p->rc==SQLITE_OK ){\n    p->rc = sqlite3_exec(p->dbMain, \"PRAGMA writable_schema=0\",0,0,&p->zErrmsg);\n  }\n\n  rbuFinalize(p, pSql);\n  rbuFinalize(p, pInsert);\n}\n\n/*\n** Step the RBU object.\n*/\nSQLITE_API int sqlite3rbu_step(sqlite3rbu *p){\n  if( p ){\n    switch( p->eStage ){\n      case RBU_STAGE_OAL: {\n        RbuObjIter *pIter = &p->objiter;\n\n        /* If this is an RBU vacuum operation and the state table was empty\n        ** when this handle was opened, create the target database schema. */\n        if( rbuIsVacuum(p) && p->nProgress==0 && p->rc==SQLITE_OK ){\n          rbuCreateTargetSchema(p);\n          rbuCopyPragma(p, \"user_version\");\n          rbuCopyPragma(p, \"application_id\");\n        }\n\n        while( p->rc==SQLITE_OK && pIter->zTbl ){\n\n          if( pIter->bCleanup ){\n            /* Clean up the rbu_tmp_xxx table for the previous table. It\n            ** cannot be dropped as there are currently active SQL statements.\n            ** But the contents can be deleted.  */\n            if( rbuIsVacuum(p)==0 && pIter->abIndexed ){\n              rbuMPrintfExec(p, p->dbRbu,\n                  \"DELETE FROM %s.'rbu_tmp_%q'\", p->zStateDb, pIter->zDataTbl\n              );\n            }\n          }else{\n            rbuObjIterPrepareAll(p, pIter, 0);\n\n            /* Advance to the next row to process. */\n            if( p->rc==SQLITE_OK ){\n              int rc = sqlite3_step(pIter->pSelect);\n              if( rc==SQLITE_ROW ){\n                p->nProgress++;\n                p->nStep++;\n                return rbuStep(p);\n              }\n              p->rc = sqlite3_reset(pIter->pSelect);\n              p->nStep = 0;\n            }\n          }\n\n          rbuObjIterNext(p, pIter);\n        }\n\n        if( p->rc==SQLITE_OK ){\n          assert( pIter->zTbl==0 );\n          rbuSaveState(p, RBU_STAGE_MOVE);\n          rbuIncrSchemaCookie(p);\n          if( p->rc==SQLITE_OK ){\n            p->rc = sqlite3_exec(p->dbMain, \"COMMIT\", 0, 0, &p->zErrmsg);\n          }\n          if( p->rc==SQLITE_OK ){\n            p->rc = sqlite3_exec(p->dbRbu, \"COMMIT\", 0, 0, &p->zErrmsg);\n          }\n          p->eStage = RBU_STAGE_MOVE;\n        }\n        break;\n      }\n\n      case RBU_STAGE_MOVE: {\n        if( p->rc==SQLITE_OK ){\n          rbuMoveOalFile(p);\n          p->nProgress++;\n        }\n        break;\n      }\n\n      case RBU_STAGE_CKPT: {\n        if( p->rc==SQLITE_OK ){\n          if( p->nStep>=p->nFrame ){\n            sqlite3_file *pDb = p->pTargetFd->pReal;\n\n            /* Sync the db file */\n            p->rc = pDb->pMethods->xSync(pDb, SQLITE_SYNC_NORMAL);\n\n            /* Update nBackfill */\n            if( p->rc==SQLITE_OK ){\n              void volatile *ptr;\n              p->rc = pDb->pMethods->xShmMap(pDb, 0, 32*1024, 0, &ptr);\n              if( p->rc==SQLITE_OK ){\n                ((u32 volatile*)ptr)[24] = p->iMaxFrame;\n              }\n            }\n\n            if( p->rc==SQLITE_OK ){\n              p->eStage = RBU_STAGE_DONE;\n              p->rc = SQLITE_DONE;\n            }\n          }else{\n            /* At one point the following block copied a single frame from the\n            ** wal file to the database file. So that one call to sqlite3rbu_step()\n            ** checkpointed a single frame.\n            **\n            ** However, if the sector-size is larger than the page-size, and the\n            ** application calls sqlite3rbu_savestate() or close() immediately\n            ** after this step, then rbu_step() again, then a power failure occurs,\n            ** then the database page written here may be damaged. Work around\n            ** this by checkpointing frames until the next page in the aFrame[]\n            ** lies on a different disk sector to the current one. */\n            u32 iSector;\n            do{\n              RbuFrame *pFrame = &p->aFrame[p->nStep];\n              iSector = (pFrame->iDbPage-1) / p->nPagePerSector;\n              rbuCheckpointFrame(p, pFrame);\n              p->nStep++;\n            }while( p->nStep<p->nFrame\n                 && iSector==((p->aFrame[p->nStep].iDbPage-1) / p->nPagePerSector)\n                 && p->rc==SQLITE_OK\n            );\n          }\n          p->nProgress++;\n        }\n        break;\n      }\n\n      default:\n        break;\n    }\n    return p->rc;\n  }else{\n    return SQLITE_NOMEM;\n  }\n}\n\n/*\n** Compare strings z1 and z2, returning 0 if they are identical, or non-zero\n** otherwise. Either or both argument may be NULL. Two NULL values are\n** considered equal, and NULL is considered distinct from all other values.\n*/\nstatic int rbuStrCompare(const char *z1, const char *z2){\n  if( z1==0 && z2==0 ) return 0;\n  if( z1==0 || z2==0 ) return 1;\n  return (sqlite3_stricmp(z1, z2)!=0);\n}\n\n/*\n** This function is called as part of sqlite3rbu_open() when initializing\n** an rbu handle in OAL stage. If the rbu update has not started (i.e.\n** the rbu_state table was empty) it is a no-op. Otherwise, it arranges\n** things so that the next call to sqlite3rbu_step() continues on from\n** where the previous rbu handle left off.\n**\n** If an error occurs, an error code and error message are left in the\n** rbu handle passed as the first argument.\n*/\nstatic void rbuSetupOal(sqlite3rbu *p, RbuState *pState){\n  assert( p->rc==SQLITE_OK );\n  if( pState->zTbl ){\n    RbuObjIter *pIter = &p->objiter;\n    int rc = SQLITE_OK;\n\n    while( rc==SQLITE_OK && pIter->zTbl && (pIter->bCleanup\n       || rbuStrCompare(pIter->zIdx, pState->zIdx)\n       || (pState->zDataTbl==0 && rbuStrCompare(pIter->zTbl, pState->zTbl))\n       || (pState->zDataTbl && rbuStrCompare(pIter->zDataTbl, pState->zDataTbl))\n    )){\n      rc = rbuObjIterNext(p, pIter);\n    }\n\n    if( rc==SQLITE_OK && !pIter->zTbl ){\n      rc = SQLITE_ERROR;\n      p->zErrmsg = sqlite3_mprintf(\"rbu_state mismatch error\");\n    }\n\n    if( rc==SQLITE_OK ){\n      p->nStep = pState->nRow;\n      rc = rbuObjIterPrepareAll(p, &p->objiter, p->nStep);\n    }\n\n    p->rc = rc;\n  }\n}\n\n/*\n** If there is a \"*-oal\" file in the file-system corresponding to the\n** target database in the file-system, delete it. If an error occurs,\n** leave an error code and error message in the rbu handle.\n*/\nstatic void rbuDeleteOalFile(sqlite3rbu *p){\n  char *zOal = rbuMPrintf(p, \"%s-oal\", p->zTarget);\n  if( zOal ){\n    sqlite3_vfs *pVfs = 0;\n    sqlite3_file_control(p->dbMain, \"main\", SQLITE_FCNTL_VFS_POINTER, &pVfs);\n    assert( pVfs && p->rc==SQLITE_OK && p->zErrmsg==0 );\n    pVfs->xDelete(pVfs, zOal, 0);\n    sqlite3_free(zOal);\n  }\n}\n\n/*\n** Allocate a private rbu VFS for the rbu handle passed as the only\n** argument. This VFS will be used unless the call to sqlite3rbu_open()\n** specified a URI with a vfs=? option in place of a target database\n** file name.\n*/\nstatic void rbuCreateVfs(sqlite3rbu *p){\n  int rnd;\n  char zRnd[64];\n\n  assert( p->rc==SQLITE_OK );\n  sqlite3_randomness(sizeof(int), (void*)&rnd);\n  sqlite3_snprintf(sizeof(zRnd), zRnd, \"rbu_vfs_%d\", rnd);\n  p->rc = sqlite3rbu_create_vfs(zRnd, 0);\n  if( p->rc==SQLITE_OK ){\n    sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd);\n    assert( pVfs );\n    p->zVfsName = pVfs->zName;\n    ((rbu_vfs*)pVfs)->pRbu = p;\n  }\n}\n\n/*\n** Destroy the private VFS created for the rbu handle passed as the only\n** argument by an earlier call to rbuCreateVfs().\n*/\nstatic void rbuDeleteVfs(sqlite3rbu *p){\n  if( p->zVfsName ){\n    sqlite3rbu_destroy_vfs(p->zVfsName);\n    p->zVfsName = 0;\n  }\n}\n\n/*\n** This user-defined SQL function is invoked with a single argument - the\n** name of a table expected to appear in the target database. It returns\n** the number of auxilliary indexes on the table.\n*/\nstatic void rbuIndexCntFunc(\n  sqlite3_context *pCtx,\n  int nVal,\n  sqlite3_value **apVal\n){\n  sqlite3rbu *p = (sqlite3rbu*)sqlite3_user_data(pCtx);\n  sqlite3_stmt *pStmt = 0;\n  char *zErrmsg = 0;\n  int rc;\n  sqlite3 *db = (rbuIsVacuum(p) ? p->dbRbu : p->dbMain);\n\n  assert( nVal==1 );\n  UNUSED_PARAMETER(nVal);\n\n  rc = prepareFreeAndCollectError(db, &pStmt, &zErrmsg,\n      sqlite3_mprintf(\"SELECT count(*) FROM sqlite_schema \"\n        \"WHERE type='index' AND tbl_name = %Q\", sqlite3_value_text(apVal[0]))\n  );\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error(pCtx, zErrmsg, -1);\n  }else{\n    int nIndex = 0;\n    if( SQLITE_ROW==sqlite3_step(pStmt) ){\n      nIndex = sqlite3_column_int(pStmt, 0);\n    }\n    rc = sqlite3_finalize(pStmt);\n    if( rc==SQLITE_OK ){\n      sqlite3_result_int(pCtx, nIndex);\n    }else{\n      sqlite3_result_error(pCtx, sqlite3_errmsg(db), -1);\n    }\n  }\n\n  sqlite3_free(zErrmsg);\n}\n\n/*\n** If the RBU database contains the rbu_count table, use it to initialize\n** the sqlite3rbu.nPhaseOneStep variable. The schema of the rbu_count table\n** is assumed to contain the same columns as:\n**\n**   CREATE TABLE rbu_count(tbl TEXT PRIMARY KEY, cnt INTEGER) WITHOUT ROWID;\n**\n** There should be one row in the table for each data_xxx table in the\n** database. The 'tbl' column should contain the name of a data_xxx table,\n** and the cnt column the number of rows it contains.\n**\n** sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt\n** for all rows in the rbu_count table, where nIndex is the number of\n** indexes on the corresponding target database table.\n*/\nstatic void rbuInitPhaseOneSteps(sqlite3rbu *p){\n  if( p->rc==SQLITE_OK ){\n    sqlite3_stmt *pStmt = 0;\n    int bExists = 0;                /* True if rbu_count exists */\n\n    p->nPhaseOneStep = -1;\n\n    p->rc = sqlite3_create_function(p->dbRbu,\n        \"rbu_index_cnt\", 1, SQLITE_UTF8, (void*)p, rbuIndexCntFunc, 0, 0\n    );\n\n    /* Check for the rbu_count table. If it does not exist, or if an error\n    ** occurs, nPhaseOneStep will be left set to -1. */\n    if( p->rc==SQLITE_OK ){\n      p->rc = prepareAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,\n          \"SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\"\n      );\n    }\n    if( p->rc==SQLITE_OK ){\n      if( SQLITE_ROW==sqlite3_step(pStmt) ){\n        bExists = 1;\n      }\n      p->rc = sqlite3_finalize(pStmt);\n    }\n\n    if( p->rc==SQLITE_OK && bExists ){\n      p->rc = prepareAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,\n          \"SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))\"\n          \"FROM rbu_count\"\n      );\n      if( p->rc==SQLITE_OK ){\n        if( SQLITE_ROW==sqlite3_step(pStmt) ){\n          p->nPhaseOneStep = sqlite3_column_int64(pStmt, 0);\n        }\n        p->rc = sqlite3_finalize(pStmt);\n      }\n    }\n  }\n}\n\n\nstatic sqlite3rbu *openRbuHandle(\n  const char *zTarget,\n  const char *zRbu,\n  const char *zState\n){\n  sqlite3rbu *p;\n  size_t nTarget = zTarget ? strlen(zTarget) : 0;\n  size_t nRbu = strlen(zRbu);\n  size_t nByte = sizeof(sqlite3rbu) + nTarget+1 + nRbu+1;\n\n  p = (sqlite3rbu*)sqlite3_malloc64(nByte);\n  if( p ){\n    RbuState *pState = 0;\n\n    /* Create the custom VFS. */\n    memset(p, 0, sizeof(sqlite3rbu));\n    sqlite3rbu_rename_handler(p, 0, 0);\n    rbuCreateVfs(p);\n\n    /* Open the target, RBU and state databases */\n    if( p->rc==SQLITE_OK ){\n      char *pCsr = (char*)&p[1];\n      int bRetry = 0;\n      if( zTarget ){\n        p->zTarget = pCsr;\n        memcpy(p->zTarget, zTarget, nTarget+1);\n        pCsr += nTarget+1;\n      }\n      p->zRbu = pCsr;\n      memcpy(p->zRbu, zRbu, nRbu+1);\n      pCsr += nRbu+1;\n      if( zState ){\n        p->zState = rbuMPrintf(p, \"%s\", zState);\n      }\n\n      /* If the first attempt to open the database file fails and the bRetry\n      ** flag it set, this means that the db was not opened because it seemed\n      ** to be a wal-mode db. But, this may have happened due to an earlier\n      ** RBU vacuum operation leaving an old wal file in the directory.\n      ** If this is the case, it will have been checkpointed and deleted\n      ** when the handle was closed and a second attempt to open the\n      ** database may succeed.  */\n      rbuOpenDatabase(p, 0, &bRetry);\n      if( bRetry ){\n        rbuOpenDatabase(p, 0, 0);\n      }\n    }\n\n    if( p->rc==SQLITE_OK ){\n      pState = rbuLoadState(p);\n      assert( pState || p->rc!=SQLITE_OK );\n      if( p->rc==SQLITE_OK ){\n\n        if( pState->eStage==0 ){\n          rbuDeleteOalFile(p);\n          rbuInitPhaseOneSteps(p);\n          p->eStage = RBU_STAGE_OAL;\n        }else{\n          p->eStage = pState->eStage;\n          p->nPhaseOneStep = pState->nPhaseOneStep;\n        }\n        p->nProgress = pState->nProgress;\n        p->iOalSz = pState->iOalSz;\n      }\n    }\n    assert( p->rc!=SQLITE_OK || p->eStage!=0 );\n\n    if( p->rc==SQLITE_OK && p->pTargetFd->pWalFd ){\n      if( p->eStage==RBU_STAGE_OAL ){\n        p->rc = SQLITE_ERROR;\n        p->zErrmsg = sqlite3_mprintf(\"cannot update wal mode database\");\n      }else if( p->eStage==RBU_STAGE_MOVE ){\n        p->eStage = RBU_STAGE_CKPT;\n        p->nStep = 0;\n      }\n    }\n\n    if( p->rc==SQLITE_OK\n     && (p->eStage==RBU_STAGE_OAL || p->eStage==RBU_STAGE_MOVE)\n     && pState->eStage!=0\n    ){\n      rbu_file *pFd = (rbuIsVacuum(p) ? p->pRbuFd : p->pTargetFd);\n      if( pFd->iCookie!=pState->iCookie ){\n        /* At this point (pTargetFd->iCookie) contains the value of the\n        ** change-counter cookie (the thing that gets incremented when a\n        ** transaction is committed in rollback mode) currently stored on\n        ** page 1 of the database file. */\n        p->rc = SQLITE_BUSY;\n        p->zErrmsg = sqlite3_mprintf(\"database modified during rbu %s\",\n            (rbuIsVacuum(p) ? \"vacuum\" : \"update\")\n        );\n      }\n    }\n\n    if( p->rc==SQLITE_OK ){\n      if( p->eStage==RBU_STAGE_OAL ){\n        sqlite3 *db = p->dbMain;\n        p->rc = sqlite3_exec(p->dbRbu, \"BEGIN\", 0, 0, &p->zErrmsg);\n\n        /* Point the object iterator at the first object */\n        if( p->rc==SQLITE_OK ){\n          p->rc = rbuObjIterFirst(p, &p->objiter);\n        }\n\n        /* If the RBU database contains no data_xxx tables, declare the RBU\n        ** update finished.  */\n        if( p->rc==SQLITE_OK && p->objiter.zTbl==0 ){\n          p->rc = SQLITE_DONE;\n          p->eStage = RBU_STAGE_DONE;\n        }else{\n          if( p->rc==SQLITE_OK && pState->eStage==0 && rbuIsVacuum(p) ){\n            rbuCopyPragma(p, \"page_size\");\n            rbuCopyPragma(p, \"auto_vacuum\");\n          }\n\n          /* Open transactions both databases. The *-oal file is opened or\n          ** created at this point. */\n          if( p->rc==SQLITE_OK ){\n            p->rc = sqlite3_exec(db, \"BEGIN IMMEDIATE\", 0, 0, &p->zErrmsg);\n          }\n\n          /* Check if the main database is a zipvfs db. If it is, set the upper\n          ** level pager to use \"journal_mode=off\". This prevents it from\n          ** generating a large journal using a temp file.  */\n          if( p->rc==SQLITE_OK ){\n            int frc = sqlite3_file_control(db, \"main\", SQLITE_FCNTL_ZIPVFS, 0);\n            if( frc==SQLITE_OK ){\n              p->rc = sqlite3_exec(\n                db, \"PRAGMA journal_mode=off\",0,0,&p->zErrmsg);\n            }\n          }\n\n          if( p->rc==SQLITE_OK ){\n            rbuSetupOal(p, pState);\n          }\n        }\n      }else if( p->eStage==RBU_STAGE_MOVE ){\n        /* no-op */\n      }else if( p->eStage==RBU_STAGE_CKPT ){\n        if( !rbuIsVacuum(p) && rbuExclusiveCheckpoint(p->dbMain) ){\n          /* If the rbu_exclusive_checkpoint=1 URI parameter was specified\n          ** and an incremental checkpoint is being resumed, attempt an\n          ** exclusive lock on the db file. If this fails, so be it.  */\n          p->eStage = RBU_STAGE_DONE;\n          rbuLockDatabase(p->dbMain);\n          p->eStage = RBU_STAGE_CKPT;\n        }\n        rbuSetupCheckpoint(p, pState);\n      }else if( p->eStage==RBU_STAGE_DONE ){\n        p->rc = SQLITE_DONE;\n      }else{\n        p->rc = SQLITE_CORRUPT;\n      }\n    }\n\n    rbuFreeState(pState);\n  }\n\n  return p;\n}\n\n/*\n** Allocate and return an RBU handle with all fields zeroed except for the\n** error code, which is set to SQLITE_MISUSE.\n*/\nstatic sqlite3rbu *rbuMisuseError(void){\n  sqlite3rbu *pRet;\n  pRet = sqlite3_malloc64(sizeof(sqlite3rbu));\n  if( pRet ){\n    memset(pRet, 0, sizeof(sqlite3rbu));\n    pRet->rc = SQLITE_MISUSE;\n  }\n  return pRet;\n}\n\n/*\n** Open and return a new RBU handle.\n*/\nSQLITE_API sqlite3rbu *sqlite3rbu_open(\n  const char *zTarget,\n  const char *zRbu,\n  const char *zState\n){\n  if( zTarget==0 || zRbu==0 ){ return rbuMisuseError(); }\n  return openRbuHandle(zTarget, zRbu, zState);\n}\n\n/*\n** Open a handle to begin or resume an RBU VACUUM operation.\n*/\nSQLITE_API sqlite3rbu *sqlite3rbu_vacuum(\n  const char *zTarget,\n  const char *zState\n){\n  if( zTarget==0 ){ return rbuMisuseError(); }\n  if( zState ){\n    size_t n = strlen(zState);\n    if( n>=7 && 0==memcmp(\"-vactmp\", &zState[n-7], 7) ){\n      return rbuMisuseError();\n    }\n  }\n  /* TODO: Check that both arguments are non-NULL */\n  return openRbuHandle(0, zTarget, zState);\n}\n\n/*\n** Return the database handle used by pRbu.\n*/\nSQLITE_API sqlite3 *sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){\n  sqlite3 *db = 0;\n  if( pRbu ){\n    db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);\n  }\n  return db;\n}\n\n\n/*\n** If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT,\n** then edit any error message string so as to remove all occurrences of\n** the pattern \"rbu_imp_[0-9]*\".\n*/\nstatic void rbuEditErrmsg(sqlite3rbu *p){\n  if( p->rc==SQLITE_CONSTRAINT && p->zErrmsg ){\n    unsigned int i;\n    size_t nErrmsg = strlen(p->zErrmsg);\n    for(i=0; i<(nErrmsg-8); i++){\n      if( memcmp(&p->zErrmsg[i], \"rbu_imp_\", 8)==0 ){\n        int nDel = 8;\n        while( p->zErrmsg[i+nDel]>='0' && p->zErrmsg[i+nDel]<='9' ) nDel++;\n        memmove(&p->zErrmsg[i], &p->zErrmsg[i+nDel], nErrmsg + 1 - i - nDel);\n        nErrmsg -= nDel;\n      }\n    }\n  }\n}\n\n/*\n** Close the RBU handle.\n*/\nSQLITE_API int sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){\n  int rc;\n  if( p ){\n\n    /* Commit the transaction to the *-oal file. */\n    if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){\n      p->rc = sqlite3_exec(p->dbMain, \"COMMIT\", 0, 0, &p->zErrmsg);\n    }\n\n    /* Sync the db file if currently doing an incremental checkpoint */\n    if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_CKPT ){\n      sqlite3_file *pDb = p->pTargetFd->pReal;\n      p->rc = pDb->pMethods->xSync(pDb, SQLITE_SYNC_NORMAL);\n    }\n\n    rbuSaveState(p, p->eStage);\n\n    if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){\n      p->rc = sqlite3_exec(p->dbRbu, \"COMMIT\", 0, 0, &p->zErrmsg);\n    }\n\n    /* Close any open statement handles. */\n    rbuObjIterFinalize(&p->objiter);\n\n    /* If this is an RBU vacuum handle and the vacuum has either finished\n    ** successfully or encountered an error, delete the contents of the\n    ** state table. This causes the next call to sqlite3rbu_vacuum()\n    ** specifying the current target and state databases to start a new\n    ** vacuum from scratch.  */\n    if( rbuIsVacuum(p) && p->rc!=SQLITE_OK && p->dbRbu ){\n      int rc2 = sqlite3_exec(p->dbRbu, \"DELETE FROM stat.rbu_state\", 0, 0, 0);\n      if( p->rc==SQLITE_DONE && rc2!=SQLITE_OK ) p->rc = rc2;\n    }\n\n    /* Close the open database handle and VFS object. */\n    sqlite3_close(p->dbRbu);\n    sqlite3_close(p->dbMain);\n    assert( p->szTemp==0 );\n    rbuDeleteVfs(p);\n    sqlite3_free(p->aBuf);\n    sqlite3_free(p->aFrame);\n\n    rbuEditErrmsg(p);\n    rc = p->rc;\n    if( pzErrmsg ){\n      *pzErrmsg = p->zErrmsg;\n    }else{\n      sqlite3_free(p->zErrmsg);\n    }\n    sqlite3_free(p->zState);\n    sqlite3_free(p);\n  }else{\n    rc = SQLITE_NOMEM;\n    *pzErrmsg = 0;\n  }\n  return rc;\n}\n\n/*\n** Return the total number of key-value operations (inserts, deletes or\n** updates) that have been performed on the target database since the\n** current RBU update was started.\n*/\nSQLITE_API sqlite3_int64 sqlite3rbu_progress(sqlite3rbu *pRbu){\n  return pRbu->nProgress;\n}\n\n/*\n** Return permyriadage progress indications for the two main stages of\n** an RBU update.\n*/\nSQLITE_API void sqlite3rbu_bp_progress(sqlite3rbu *p, int *pnOne, int *pnTwo){\n  const int MAX_PROGRESS = 10000;\n  switch( p->eStage ){\n    case RBU_STAGE_OAL:\n      if( p->nPhaseOneStep>0 ){\n        *pnOne = (int)(MAX_PROGRESS * (i64)p->nProgress/(i64)p->nPhaseOneStep);\n      }else{\n        *pnOne = -1;\n      }\n      *pnTwo = 0;\n      break;\n\n    case RBU_STAGE_MOVE:\n      *pnOne = MAX_PROGRESS;\n      *pnTwo = 0;\n      break;\n\n    case RBU_STAGE_CKPT:\n      *pnOne = MAX_PROGRESS;\n      *pnTwo = (int)(MAX_PROGRESS * (i64)p->nStep / (i64)p->nFrame);\n      break;\n\n    case RBU_STAGE_DONE:\n      *pnOne = MAX_PROGRESS;\n      *pnTwo = MAX_PROGRESS;\n      break;\n\n    default:\n      assert( 0 );\n  }\n}\n\n/*\n** Return the current state of the RBU vacuum or update operation.\n*/\nSQLITE_API int sqlite3rbu_state(sqlite3rbu *p){\n  int aRes[] = {\n    0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE,\n    0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE\n  };\n\n  assert( RBU_STAGE_OAL==1 );\n  assert( RBU_STAGE_MOVE==2 );\n  assert( RBU_STAGE_CKPT==4 );\n  assert( RBU_STAGE_DONE==5 );\n  assert( aRes[RBU_STAGE_OAL]==SQLITE_RBU_STATE_OAL );\n  assert( aRes[RBU_STAGE_MOVE]==SQLITE_RBU_STATE_MOVE );\n  assert( aRes[RBU_STAGE_CKPT]==SQLITE_RBU_STATE_CHECKPOINT );\n  assert( aRes[RBU_STAGE_DONE]==SQLITE_RBU_STATE_DONE );\n\n  if( p->rc!=SQLITE_OK && p->rc!=SQLITE_DONE ){\n    return SQLITE_RBU_STATE_ERROR;\n  }else{\n    assert( p->rc!=SQLITE_DONE || p->eStage==RBU_STAGE_DONE );\n    assert( p->eStage==RBU_STAGE_OAL\n         || p->eStage==RBU_STAGE_MOVE\n         || p->eStage==RBU_STAGE_CKPT\n         || p->eStage==RBU_STAGE_DONE\n    );\n    return aRes[p->eStage];\n  }\n}\n\nSQLITE_API int sqlite3rbu_savestate(sqlite3rbu *p){\n  int rc = p->rc;\n  if( rc==SQLITE_DONE ) return SQLITE_OK;\n\n  assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );\n  if( p->eStage==RBU_STAGE_OAL ){\n    assert( rc!=SQLITE_DONE );\n    if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbMain, \"COMMIT\", 0, 0, 0);\n  }\n\n  /* Sync the db file */\n  if( rc==SQLITE_OK && p->eStage==RBU_STAGE_CKPT ){\n    sqlite3_file *pDb = p->pTargetFd->pReal;\n    rc = pDb->pMethods->xSync(pDb, SQLITE_SYNC_NORMAL);\n  }\n\n  p->rc = rc;\n  rbuSaveState(p, p->eStage);\n  rc = p->rc;\n\n  if( p->eStage==RBU_STAGE_OAL ){\n    assert( rc!=SQLITE_DONE );\n    if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbRbu, \"COMMIT\", 0, 0, 0);\n    if( rc==SQLITE_OK ){\n      const char *zBegin = rbuIsVacuum(p) ? \"BEGIN\" : \"BEGIN IMMEDIATE\";\n      rc = sqlite3_exec(p->dbRbu, zBegin, 0, 0, 0);\n    }\n    if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbMain, \"BEGIN IMMEDIATE\", 0, 0,0);\n  }\n\n  p->rc = rc;\n  return rc;\n}\n\n/*\n** Default xRename callback for RBU.\n*/\nstatic int xDefaultRename(void *pArg, const char *zOld, const char *zNew){\n  int rc = SQLITE_OK;\n  UNUSED_PARAMETER(pArg);\n#if defined(_WIN32_WCE)\n  {\n    LPWSTR zWideOld;\n    LPWSTR zWideNew;\n\n    zWideOld = rbuWinUtf8ToUnicode(zOld);\n    if( zWideOld ){\n      zWideNew = rbuWinUtf8ToUnicode(zNew);\n      if( zWideNew ){\n        if( MoveFileW(zWideOld, zWideNew) ){\n          rc = SQLITE_OK;\n        }else{\n          rc = SQLITE_IOERR;\n        }\n        sqlite3_free(zWideNew);\n      }else{\n        rc = SQLITE_IOERR_NOMEM;\n      }\n      sqlite3_free(zWideOld);\n    }else{\n      rc = SQLITE_IOERR_NOMEM;\n    }\n  }\n#else\n  rc = rename(zOld, zNew) ? SQLITE_IOERR : SQLITE_OK;\n#endif\n  return rc;\n}\n\nSQLITE_API void sqlite3rbu_rename_handler(\n  sqlite3rbu *pRbu,\n  void *pArg,\n  int (*xRename)(void *pArg, const char *zOld, const char *zNew)\n){\n  if( xRename ){\n    pRbu->xRename = xRename;\n    pRbu->pRenameArg = pArg;\n  }else{\n    pRbu->xRename = xDefaultRename;\n    pRbu->pRenameArg = 0;\n  }\n}\n\n/**************************************************************************\n** Beginning of RBU VFS shim methods. The VFS shim modifies the behaviour\n** of a standard VFS in the following ways:\n**\n** 1. Whenever the first page of a main database file is read or\n**    written, the value of the change-counter cookie is stored in\n**    rbu_file.iCookie. Similarly, the value of the \"write-version\"\n**    database header field is stored in rbu_file.iWriteVer. This ensures\n**    that the values are always trustworthy within an open transaction.\n**\n** 2. Whenever an SQLITE_OPEN_WAL file is opened, the (rbu_file.pWalFd)\n**    member variable of the associated database file descriptor is set\n**    to point to the new file. A mutex protected linked list of all main\n**    db fds opened using a particular RBU VFS is maintained at\n**    rbu_vfs.pMain to facilitate this.\n**\n** 3. Using a new file-control \"SQLITE_FCNTL_RBU\", a main db rbu_file\n**    object can be marked as the target database of an RBU update. This\n**    turns on the following extra special behaviour:\n**\n** 3a. If xAccess() is called to check if there exists a *-wal file\n**     associated with an RBU target database currently in RBU_STAGE_OAL\n**     stage (preparing the *-oal file), the following special handling\n**     applies:\n**\n**      * if the *-wal file does exist, return SQLITE_CANTOPEN. An RBU\n**        target database may not be in wal mode already.\n**\n**      * if the *-wal file does not exist, set the output parameter to\n**        non-zero (to tell SQLite that it does exist) anyway.\n**\n**     Then, when xOpen() is called to open the *-wal file associated with\n**     the RBU target in RBU_STAGE_OAL stage, instead of opening the *-wal\n**     file, the rbu vfs opens the corresponding *-oal file instead.\n**\n** 3b. The *-shm pages returned by xShmMap() for a target db file in\n**     RBU_STAGE_OAL mode are actually stored in heap memory. This is to\n**     avoid creating a *-shm file on disk. Additionally, xShmLock() calls\n**     are no-ops on target database files in RBU_STAGE_OAL mode. This is\n**     because assert() statements in some VFS implementations fail if\n**     xShmLock() is called before xShmMap().\n**\n** 3c. If an EXCLUSIVE lock is attempted on a target database file in any\n**     mode except RBU_STAGE_DONE (all work completed and checkpointed), it\n**     fails with an SQLITE_BUSY error. This is to stop RBU connections\n**     from automatically checkpointing a *-wal (or *-oal) file from within\n**     sqlite3_close().\n**\n** 3d. In RBU_STAGE_CAPTURE mode, all xRead() calls on the wal file, and\n**     all xWrite() calls on the target database file perform no IO.\n**     Instead the frame and page numbers that would be read and written\n**     are recorded. Additionally, successful attempts to obtain exclusive\n**     xShmLock() WRITER, CHECKPOINTER and READ0 locks on the target\n**     database file are recorded. xShmLock() calls to unlock the same\n**     locks are no-ops (so that once obtained, these locks are never\n**     relinquished). Finally, calls to xSync() on the target database\n**     file fail with SQLITE_NOTICE errors.\n*/\n\nstatic void rbuUnlockShm(rbu_file *p){\n  assert( p->openFlags & SQLITE_OPEN_MAIN_DB );\n  if( p->pRbu ){\n    int (*xShmLock)(sqlite3_file*,int,int,int) = p->pReal->pMethods->xShmLock;\n    int i;\n    for(i=0; i<SQLITE_SHM_NLOCK;i++){\n      if( (1<<i) & p->pRbu->mLock ){\n        xShmLock(p->pReal, i, 1, SQLITE_SHM_UNLOCK|SQLITE_SHM_EXCLUSIVE);\n      }\n    }\n    p->pRbu->mLock = 0;\n  }\n}\n\n/*\n*/\nstatic int rbuUpdateTempSize(rbu_file *pFd, sqlite3_int64 nNew){\n  sqlite3rbu *pRbu = pFd->pRbu;\n  i64 nDiff = nNew - pFd->sz;\n  pRbu->szTemp += nDiff;\n  pFd->sz = nNew;\n  assert( pRbu->szTemp>=0 );\n  if( pRbu->szTempLimit && pRbu->szTemp>pRbu->szTempLimit ) return SQLITE_FULL;\n  return SQLITE_OK;\n}\n\n/*\n** Add an item to the main-db lists, if it is not already present.\n**\n** There are two main-db lists. One for all file descriptors, and one\n** for all file descriptors with rbu_file.pDb!=0. If the argument has\n** rbu_file.pDb!=0, then it is assumed to already be present on the\n** main list and is only added to the pDb!=0 list.\n*/\nstatic void rbuMainlistAdd(rbu_file *p){\n  rbu_vfs *pRbuVfs = p->pRbuVfs;\n  rbu_file *pIter;\n  assert( (p->openFlags & SQLITE_OPEN_MAIN_DB) );\n  sqlite3_mutex_enter(pRbuVfs->mutex);\n  if( p->pRbu==0 ){\n    for(pIter=pRbuVfs->pMain; pIter; pIter=pIter->pMainNext);\n    p->pMainNext = pRbuVfs->pMain;\n    pRbuVfs->pMain = p;\n  }else{\n    for(pIter=pRbuVfs->pMainRbu; pIter && pIter!=p; pIter=pIter->pMainRbuNext){}\n    if( pIter==0 ){\n      p->pMainRbuNext = pRbuVfs->pMainRbu;\n      pRbuVfs->pMainRbu = p;\n    }\n  }\n  sqlite3_mutex_leave(pRbuVfs->mutex);\n}\n\n/*\n** Remove an item from the main-db lists.\n*/\nstatic void rbuMainlistRemove(rbu_file *p){\n  rbu_file **pp;\n  sqlite3_mutex_enter(p->pRbuVfs->mutex);\n  for(pp=&p->pRbuVfs->pMain; *pp && *pp!=p; pp=&((*pp)->pMainNext)){}\n  if( *pp ) *pp = p->pMainNext;\n  p->pMainNext = 0;\n  for(pp=&p->pRbuVfs->pMainRbu; *pp && *pp!=p; pp=&((*pp)->pMainRbuNext)){}\n  if( *pp ) *pp = p->pMainRbuNext;\n  p->pMainRbuNext = 0;\n  sqlite3_mutex_leave(p->pRbuVfs->mutex);\n}\n\n/*\n** Given that zWal points to a buffer containing a wal file name passed to\n** either the xOpen() or xAccess() VFS method, search the main-db list for\n** a file-handle opened by the same database connection on the corresponding\n** database file.\n**\n** If parameter bRbu is true, only search for file-descriptors with\n** rbu_file.pDb!=0.\n*/\nstatic rbu_file *rbuFindMaindb(rbu_vfs *pRbuVfs, const char *zWal, int bRbu){\n  rbu_file *pDb;\n  sqlite3_mutex_enter(pRbuVfs->mutex);\n  if( bRbu ){\n    for(pDb=pRbuVfs->pMainRbu; pDb && pDb->zWal!=zWal; pDb=pDb->pMainRbuNext){}\n  }else{\n    for(pDb=pRbuVfs->pMain; pDb && pDb->zWal!=zWal; pDb=pDb->pMainNext){}\n  }\n  sqlite3_mutex_leave(pRbuVfs->mutex);\n  return pDb;\n}\n\n/*\n** Close an rbu file.\n*/\nstatic int rbuVfsClose(sqlite3_file *pFile){\n  rbu_file *p = (rbu_file*)pFile;\n  int rc;\n  int i;\n\n  /* Free the contents of the apShm[] array. And the array itself. */\n  for(i=0; i<p->nShm; i++){\n    sqlite3_free(p->apShm[i]);\n  }\n  sqlite3_free(p->apShm);\n  p->apShm = 0;\n  sqlite3_free(p->zDel);\n\n  if( p->openFlags & SQLITE_OPEN_MAIN_DB ){\n    const sqlite3_io_methods *pMeth = p->pReal->pMethods;\n    rbuMainlistRemove(p);\n    rbuUnlockShm(p);\n    if( pMeth->iVersion>1 && pMeth->xShmUnmap ){\n      pMeth->xShmUnmap(p->pReal, 0);\n    }\n  }\n  else if( (p->openFlags & SQLITE_OPEN_DELETEONCLOSE) && p->pRbu ){\n    rbuUpdateTempSize(p, 0);\n  }\n  assert( p->pMainNext==0 && p->pRbuVfs->pMain!=p );\n\n  /* Close the underlying file handle */\n  rc = p->pReal->pMethods->xClose(p->pReal);\n  return rc;\n}\n\n\n/*\n** Read and return an unsigned 32-bit big-endian integer from the buffer\n** passed as the only argument.\n*/\nstatic u32 rbuGetU32(u8 *aBuf){\n  return ((u32)aBuf[0] << 24)\n       + ((u32)aBuf[1] << 16)\n       + ((u32)aBuf[2] <<  8)\n       + ((u32)aBuf[3]);\n}\n\n/*\n** Write an unsigned 32-bit value in big-endian format to the supplied\n** buffer.\n*/\nstatic void rbuPutU32(u8 *aBuf, u32 iVal){\n  aBuf[0] = (iVal >> 24) & 0xFF;\n  aBuf[1] = (iVal >> 16) & 0xFF;\n  aBuf[2] = (iVal >>  8) & 0xFF;\n  aBuf[3] = (iVal >>  0) & 0xFF;\n}\n\nstatic void rbuPutU16(u8 *aBuf, u16 iVal){\n  aBuf[0] = (iVal >>  8) & 0xFF;\n  aBuf[1] = (iVal >>  0) & 0xFF;\n}\n\n/*\n** Read data from an rbuVfs-file.\n*/\nstatic int rbuVfsRead(\n  sqlite3_file *pFile,\n  void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  rbu_file *p = (rbu_file*)pFile;\n  sqlite3rbu *pRbu = p->pRbu;\n  int rc;\n\n  if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){\n    assert( p->openFlags & SQLITE_OPEN_WAL );\n    rc = rbuCaptureWalRead(p->pRbu, iOfst, iAmt);\n  }else{\n    if( pRbu && pRbu->eStage==RBU_STAGE_OAL\n     && (p->openFlags & SQLITE_OPEN_WAL)\n     && iOfst>=pRbu->iOalSz\n    ){\n      rc = SQLITE_OK;\n      memset(zBuf, 0, iAmt);\n    }else{\n      rc = p->pReal->pMethods->xRead(p->pReal, zBuf, iAmt, iOfst);\n#if 1\n      /* If this is being called to read the first page of the target\n      ** database as part of an rbu vacuum operation, synthesize the\n      ** contents of the first page if it does not yet exist. Otherwise,\n      ** SQLite will not check for a *-wal file.  */\n      if( pRbu && rbuIsVacuum(pRbu)\n          && rc==SQLITE_IOERR_SHORT_READ && iOfst==0\n          && (p->openFlags & SQLITE_OPEN_MAIN_DB)\n          && pRbu->rc==SQLITE_OK\n      ){\n        sqlite3_file *pFd = (sqlite3_file*)pRbu->pRbuFd;\n        rc = pFd->pMethods->xRead(pFd, zBuf, iAmt, iOfst);\n        if( rc==SQLITE_OK ){\n          u8 *aBuf = (u8*)zBuf;\n          u32 iRoot = rbuGetU32(&aBuf[52]) ? 1 : 0;\n          rbuPutU32(&aBuf[52], iRoot);      /* largest root page number */\n          rbuPutU32(&aBuf[36], 0);          /* number of free pages */\n          rbuPutU32(&aBuf[32], 0);          /* first page on free list trunk */\n          rbuPutU32(&aBuf[28], 1);          /* size of db file in pages */\n          rbuPutU32(&aBuf[24], pRbu->pRbuFd->iCookie+1);  /* Change counter */\n\n          if( iAmt>100 ){\n            memset(&aBuf[100], 0, iAmt-100);\n            rbuPutU16(&aBuf[105], iAmt & 0xFFFF);\n            aBuf[100] = 0x0D;\n          }\n        }\n      }\n#endif\n    }\n    if( rc==SQLITE_OK && iOfst==0 && (p->openFlags & SQLITE_OPEN_MAIN_DB) ){\n      /* These look like magic numbers. But they are stable, as they are part\n       ** of the definition of the SQLite file format, which may not change. */\n      u8 *pBuf = (u8*)zBuf;\n      p->iCookie = rbuGetU32(&pBuf[24]);\n      p->iWriteVer = pBuf[19];\n    }\n  }\n  return rc;\n}\n\n/*\n** Write data to an rbuVfs-file.\n*/\nstatic int rbuVfsWrite(\n  sqlite3_file *pFile,\n  const void *zBuf,\n  int iAmt,\n  sqlite_int64 iOfst\n){\n  rbu_file *p = (rbu_file*)pFile;\n  sqlite3rbu *pRbu = p->pRbu;\n  int rc;\n\n  if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){\n    assert( p->openFlags & SQLITE_OPEN_MAIN_DB );\n    rc = rbuCaptureDbWrite(p->pRbu, iOfst);\n  }else{\n    if( pRbu ){\n      if( pRbu->eStage==RBU_STAGE_OAL\n       && (p->openFlags & SQLITE_OPEN_WAL)\n       && iOfst>=pRbu->iOalSz\n      ){\n        pRbu->iOalSz = iAmt + iOfst;\n      }else if( p->openFlags & SQLITE_OPEN_DELETEONCLOSE ){\n        i64 szNew = iAmt+iOfst;\n        if( szNew>p->sz ){\n          rc = rbuUpdateTempSize(p, szNew);\n          if( rc!=SQLITE_OK ) return rc;\n        }\n      }\n    }\n    rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst);\n    if( rc==SQLITE_OK && iOfst==0 && (p->openFlags & SQLITE_OPEN_MAIN_DB) ){\n      /* These look like magic numbers. But they are stable, as they are part\n      ** of the definition of the SQLite file format, which may not change. */\n      u8 *pBuf = (u8*)zBuf;\n      p->iCookie = rbuGetU32(&pBuf[24]);\n      p->iWriteVer = pBuf[19];\n    }\n  }\n  return rc;\n}\n\n/*\n** Truncate an rbuVfs-file.\n*/\nstatic int rbuVfsTruncate(sqlite3_file *pFile, sqlite_int64 size){\n  rbu_file *p = (rbu_file*)pFile;\n  if( (p->openFlags & SQLITE_OPEN_DELETEONCLOSE) && p->pRbu ){\n    int rc = rbuUpdateTempSize(p, size);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n  return p->pReal->pMethods->xTruncate(p->pReal, size);\n}\n\n/*\n** Sync an rbuVfs-file.\n*/\nstatic int rbuVfsSync(sqlite3_file *pFile, int flags){\n  rbu_file *p = (rbu_file *)pFile;\n  if( p->pRbu && p->pRbu->eStage==RBU_STAGE_CAPTURE ){\n    if( p->openFlags & SQLITE_OPEN_MAIN_DB ){\n      return SQLITE_NOTICE_RBU;\n    }\n    return SQLITE_OK;\n  }\n  return p->pReal->pMethods->xSync(p->pReal, flags);\n}\n\n/*\n** Return the current file-size of an rbuVfs-file.\n*/\nstatic int rbuVfsFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){\n  rbu_file *p = (rbu_file *)pFile;\n  int rc;\n  rc = p->pReal->pMethods->xFileSize(p->pReal, pSize);\n\n  /* If this is an RBU vacuum operation and this is the target database,\n  ** pretend that it has at least one page. Otherwise, SQLite will not\n  ** check for the existence of a *-wal file. rbuVfsRead() contains\n  ** similar logic.  */\n  if( rc==SQLITE_OK && *pSize==0\n   && p->pRbu && rbuIsVacuum(p->pRbu)\n   && (p->openFlags & SQLITE_OPEN_MAIN_DB)\n  ){\n    *pSize = 1024;\n  }\n  return rc;\n}\n\n/*\n** Lock an rbuVfs-file.\n*/\nstatic int rbuVfsLock(sqlite3_file *pFile, int eLock){\n  rbu_file *p = (rbu_file*)pFile;\n  sqlite3rbu *pRbu = p->pRbu;\n  int rc = SQLITE_OK;\n\n  assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );\n  if( eLock==SQLITE_LOCK_EXCLUSIVE\n   && (p->bNolock || (pRbu && pRbu->eStage!=RBU_STAGE_DONE))\n  ){\n    /* Do not allow EXCLUSIVE locks. Preventing SQLite from taking this\n    ** prevents it from checkpointing the database from sqlite3_close(). */\n    rc = SQLITE_BUSY;\n  }else{\n    rc = p->pReal->pMethods->xLock(p->pReal, eLock);\n  }\n\n  return rc;\n}\n\n/*\n** Unlock an rbuVfs-file.\n*/\nstatic int rbuVfsUnlock(sqlite3_file *pFile, int eLock){\n  rbu_file *p = (rbu_file *)pFile;\n  return p->pReal->pMethods->xUnlock(p->pReal, eLock);\n}\n\n/*\n** Check if another file-handle holds a RESERVED lock on an rbuVfs-file.\n*/\nstatic int rbuVfsCheckReservedLock(sqlite3_file *pFile, int *pResOut){\n  rbu_file *p = (rbu_file *)pFile;\n  return p->pReal->pMethods->xCheckReservedLock(p->pReal, pResOut);\n}\n\n/*\n** File control method. For custom operations on an rbuVfs-file.\n*/\nstatic int rbuVfsFileControl(sqlite3_file *pFile, int op, void *pArg){\n  rbu_file *p = (rbu_file *)pFile;\n  int (*xControl)(sqlite3_file*,int,void*) = p->pReal->pMethods->xFileControl;\n  int rc;\n\n  assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB)\n       || p->openFlags & (SQLITE_OPEN_TRANSIENT_DB|SQLITE_OPEN_TEMP_JOURNAL)\n  );\n  if( op==SQLITE_FCNTL_RBU ){\n    sqlite3rbu *pRbu = (sqlite3rbu*)pArg;\n\n    /* First try to find another RBU vfs lower down in the vfs stack. If\n    ** one is found, this vfs will operate in pass-through mode. The lower\n    ** level vfs will do the special RBU handling.  */\n    rc = xControl(p->pReal, op, pArg);\n\n    if( rc==SQLITE_NOTFOUND ){\n      /* Now search for a zipvfs instance lower down in the VFS stack. If\n      ** one is found, this is an error.  */\n      void *dummy = 0;\n      rc = xControl(p->pReal, SQLITE_FCNTL_ZIPVFS, &dummy);\n      if( rc==SQLITE_OK ){\n        rc = SQLITE_ERROR;\n        pRbu->zErrmsg = sqlite3_mprintf(\"rbu/zipvfs setup error\");\n      }else if( rc==SQLITE_NOTFOUND ){\n        pRbu->pTargetFd = p;\n        p->pRbu = pRbu;\n        rbuMainlistAdd(p);\n        if( p->pWalFd ) p->pWalFd->pRbu = pRbu;\n        rc = SQLITE_OK;\n      }\n    }\n    return rc;\n  }\n  else if( op==SQLITE_FCNTL_RBUCNT ){\n    sqlite3rbu *pRbu = (sqlite3rbu*)pArg;\n    pRbu->nRbu++;\n    pRbu->pRbuFd = p;\n    p->bNolock = 1;\n  }\n\n  rc = xControl(p->pReal, op, pArg);\n  if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){\n    rbu_vfs *pRbuVfs = p->pRbuVfs;\n    char *zIn = *(char**)pArg;\n    char *zOut = sqlite3_mprintf(\"rbu(%s)/%z\", pRbuVfs->base.zName, zIn);\n    *(char**)pArg = zOut;\n    if( zOut==0 ) rc = SQLITE_NOMEM;\n  }\n\n  return rc;\n}\n\n/*\n** Return the sector-size in bytes for an rbuVfs-file.\n*/\nstatic int rbuVfsSectorSize(sqlite3_file *pFile){\n  rbu_file *p = (rbu_file *)pFile;\n  return p->pReal->pMethods->xSectorSize(p->pReal);\n}\n\n/*\n** Return the device characteristic flags supported by an rbuVfs-file.\n*/\nstatic int rbuVfsDeviceCharacteristics(sqlite3_file *pFile){\n  rbu_file *p = (rbu_file *)pFile;\n  return p->pReal->pMethods->xDeviceCharacteristics(p->pReal);\n}\n\n/*\n** Take or release a shared-memory lock.\n*/\nstatic int rbuVfsShmLock(sqlite3_file *pFile, int ofst, int n, int flags){\n  rbu_file *p = (rbu_file*)pFile;\n  sqlite3rbu *pRbu = p->pRbu;\n  int rc = SQLITE_OK;\n\n#ifdef SQLITE_AMALGAMATION\n    assert( WAL_CKPT_LOCK==1 );\n#endif\n\n  assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );\n  if( pRbu && (\n       pRbu->eStage==RBU_STAGE_OAL\n    || pRbu->eStage==RBU_STAGE_MOVE\n    || pRbu->eStage==RBU_STAGE_DONE\n  )){\n    /* Prevent SQLite from taking a shm-lock on the target file when it\n    ** is supplying heap memory to the upper layer in place of *-shm\n    ** segments. */\n    if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;\n  }else{\n    int bCapture = 0;\n    if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){\n      bCapture = 1;\n    }\n    if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){\n      rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);\n      if( bCapture && rc==SQLITE_OK ){\n        pRbu->mLock |= ((1<<n) - 1) << ofst;\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Obtain a pointer to a mapping of a single 32KiB page of the *-shm file.\n*/\nstatic int rbuVfsShmMap(\n  sqlite3_file *pFile,\n  int iRegion,\n  int szRegion,\n  int isWrite,\n  void volatile **pp\n){\n  rbu_file *p = (rbu_file*)pFile;\n  int rc = SQLITE_OK;\n  int eStage = (p->pRbu ? p->pRbu->eStage : 0);\n\n  /* If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this\n  ** rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space\n  ** instead of a file on disk.  */\n  assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );\n  if( eStage==RBU_STAGE_OAL ){\n    sqlite3_int64 nByte = (iRegion+1) * sizeof(char*);\n    char **apNew = (char**)sqlite3_realloc64(p->apShm, nByte);\n\n    /* This is an RBU connection that uses its own heap memory for the\n    ** pages of the *-shm file. Since no other process can have run\n    ** recovery, the connection must request *-shm pages in order\n    ** from start to finish.  */\n    assert( iRegion==p->nShm );\n    if( apNew==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(&apNew[p->nShm], 0, sizeof(char*) * (1 + iRegion - p->nShm));\n      p->apShm = apNew;\n      p->nShm = iRegion+1;\n    }\n\n    if( rc==SQLITE_OK ){\n      char *pNew = (char*)sqlite3_malloc64(szRegion);\n      if( pNew==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memset(pNew, 0, szRegion);\n        p->apShm[iRegion] = pNew;\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      *pp = p->apShm[iRegion];\n    }else{\n      *pp = 0;\n    }\n  }else{\n    assert( p->apShm==0 );\n    rc = p->pReal->pMethods->xShmMap(p->pReal, iRegion, szRegion, isWrite, pp);\n  }\n\n  return rc;\n}\n\n/*\n** Memory barrier.\n*/\nstatic void rbuVfsShmBarrier(sqlite3_file *pFile){\n  rbu_file *p = (rbu_file *)pFile;\n  p->pReal->pMethods->xShmBarrier(p->pReal);\n}\n\n/*\n** The xShmUnmap method.\n*/\nstatic int rbuVfsShmUnmap(sqlite3_file *pFile, int delFlag){\n  rbu_file *p = (rbu_file*)pFile;\n  int rc = SQLITE_OK;\n  int eStage = (p->pRbu ? p->pRbu->eStage : 0);\n\n  assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );\n  if( eStage==RBU_STAGE_OAL || eStage==RBU_STAGE_MOVE ){\n    /* no-op */\n  }else{\n    /* Release the checkpointer and writer locks */\n    rbuUnlockShm(p);\n    rc = p->pReal->pMethods->xShmUnmap(p->pReal, delFlag);\n  }\n  return rc;\n}\n\n/*\n** Open an rbu file handle.\n*/\nstatic int rbuVfsOpen(\n  sqlite3_vfs *pVfs,\n  const char *zName,\n  sqlite3_file *pFile,\n  int flags,\n  int *pOutFlags\n){\n  static sqlite3_io_methods rbuvfs_io_methods = {\n    2,                            /* iVersion */\n    rbuVfsClose,                  /* xClose */\n    rbuVfsRead,                   /* xRead */\n    rbuVfsWrite,                  /* xWrite */\n    rbuVfsTruncate,               /* xTruncate */\n    rbuVfsSync,                   /* xSync */\n    rbuVfsFileSize,               /* xFileSize */\n    rbuVfsLock,                   /* xLock */\n    rbuVfsUnlock,                 /* xUnlock */\n    rbuVfsCheckReservedLock,      /* xCheckReservedLock */\n    rbuVfsFileControl,            /* xFileControl */\n    rbuVfsSectorSize,             /* xSectorSize */\n    rbuVfsDeviceCharacteristics,  /* xDeviceCharacteristics */\n    rbuVfsShmMap,                 /* xShmMap */\n    rbuVfsShmLock,                /* xShmLock */\n    rbuVfsShmBarrier,             /* xShmBarrier */\n    rbuVfsShmUnmap,               /* xShmUnmap */\n    0, 0                          /* xFetch, xUnfetch */\n  };\n  static sqlite3_io_methods rbuvfs_io_methods1 = {\n    1,                            /* iVersion */\n    rbuVfsClose,                  /* xClose */\n    rbuVfsRead,                   /* xRead */\n    rbuVfsWrite,                  /* xWrite */\n    rbuVfsTruncate,               /* xTruncate */\n    rbuVfsSync,                   /* xSync */\n    rbuVfsFileSize,               /* xFileSize */\n    rbuVfsLock,                   /* xLock */\n    rbuVfsUnlock,                 /* xUnlock */\n    rbuVfsCheckReservedLock,      /* xCheckReservedLock */\n    rbuVfsFileControl,            /* xFileControl */\n    rbuVfsSectorSize,             /* xSectorSize */\n    rbuVfsDeviceCharacteristics,  /* xDeviceCharacteristics */\n    0, 0, 0, 0, 0, 0\n  };\n\n\n\n  rbu_vfs *pRbuVfs = (rbu_vfs*)pVfs;\n  sqlite3_vfs *pRealVfs = pRbuVfs->pRealVfs;\n  rbu_file *pFd = (rbu_file *)pFile;\n  int rc = SQLITE_OK;\n  const char *zOpen = zName;\n  int oflags = flags;\n\n  memset(pFd, 0, sizeof(rbu_file));\n  pFd->pReal = (sqlite3_file*)&pFd[1];\n  pFd->pRbuVfs = pRbuVfs;\n  pFd->openFlags = flags;\n  if( zName ){\n    if( flags & SQLITE_OPEN_MAIN_DB ){\n      /* A main database has just been opened. The following block sets\n      ** (pFd->zWal) to point to a buffer owned by SQLite that contains\n      ** the name of the *-wal file this db connection will use. SQLite\n      ** happens to pass a pointer to this buffer when using xAccess()\n      ** or xOpen() to operate on the *-wal file.  */\n      pFd->zWal = sqlite3_filename_wal(zName);\n    }\n    else if( flags & SQLITE_OPEN_WAL ){\n      rbu_file *pDb = rbuFindMaindb(pRbuVfs, zName, 0);\n      if( pDb ){\n        if( pDb->pRbu && pDb->pRbu->eStage==RBU_STAGE_OAL ){\n          /* This call is to open a *-wal file. Intead, open the *-oal. */\n          size_t nOpen;\n          if( rbuIsVacuum(pDb->pRbu) ){\n            zOpen = sqlite3_db_filename(pDb->pRbu->dbRbu, \"main\");\n            zOpen = sqlite3_filename_wal(zOpen);\n          }\n          nOpen = strlen(zOpen);\n          ((char*)zOpen)[nOpen-3] = 'o';\n          pFd->pRbu = pDb->pRbu;\n        }\n        pDb->pWalFd = pFd;\n      }\n    }\n  }else{\n    pFd->pRbu = pRbuVfs->pRbu;\n  }\n\n  if( oflags & SQLITE_OPEN_MAIN_DB\n   && sqlite3_uri_boolean(zName, \"rbu_memory\", 0)\n  ){\n    assert( oflags & SQLITE_OPEN_MAIN_DB );\n    oflags =  SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |\n              SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;\n    zOpen = 0;\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = pRealVfs->xOpen(pRealVfs, zOpen, pFd->pReal, oflags, pOutFlags);\n  }\n  if( pFd->pReal->pMethods ){\n    const sqlite3_io_methods *pMeth = pFd->pReal->pMethods;\n    /* The xOpen() operation has succeeded. Set the sqlite3_file.pMethods\n    ** pointer and, if the file is a main database file, link it into the\n    ** mutex protected linked list of all such files.  */\n    if( pMeth->iVersion<2 || pMeth->xShmLock==0 ){\n      pFile->pMethods = &rbuvfs_io_methods1;\n    }else{\n      pFile->pMethods = &rbuvfs_io_methods;\n    }\n    if( flags & SQLITE_OPEN_MAIN_DB ){\n      rbuMainlistAdd(pFd);\n    }\n  }else{\n    sqlite3_free(pFd->zDel);\n  }\n\n  return rc;\n}\n\n/*\n** Delete the file located at zPath.\n*/\nstatic int rbuVfsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xDelete(pRealVfs, zPath, dirSync);\n}\n\n/*\n** Test for access permissions. Return true if the requested permission\n** is available, or false otherwise.\n*/\nstatic int rbuVfsAccess(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int flags,\n  int *pResOut\n){\n  rbu_vfs *pRbuVfs = (rbu_vfs*)pVfs;\n  sqlite3_vfs *pRealVfs = pRbuVfs->pRealVfs;\n  int rc;\n\n  rc = pRealVfs->xAccess(pRealVfs, zPath, flags, pResOut);\n\n  /* If this call is to check if a *-wal file associated with an RBU target\n  ** database connection exists, and the RBU update is in RBU_STAGE_OAL,\n  ** the following special handling is activated:\n  **\n  **   a) if the *-wal file does exist, return SQLITE_CANTOPEN. This\n  **      ensures that the RBU extension never tries to update a database\n  **      in wal mode, even if the first page of the database file has\n  **      been damaged.\n  **\n  **   b) if the *-wal file does not exist, claim that it does anyway,\n  **      causing SQLite to call xOpen() to open it. This call will also\n  **      be intercepted (see the rbuVfsOpen() function) and the *-oal\n  **      file opened instead.\n  */\n  if( rc==SQLITE_OK && flags==SQLITE_ACCESS_EXISTS ){\n    rbu_file *pDb = rbuFindMaindb(pRbuVfs, zPath, 1);\n    if( pDb && pDb->pRbu->eStage==RBU_STAGE_OAL ){\n      assert( pDb->pRbu );\n      if( *pResOut ){\n        rc = SQLITE_CANTOPEN;\n      }else{\n        sqlite3_int64 sz = 0;\n        rc = rbuVfsFileSize(&pDb->base, &sz);\n        *pResOut = (sz>0);\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Populate buffer zOut with the full canonical pathname corresponding\n** to the pathname in zPath. zOut is guaranteed to point to a buffer\n** of at least (DEVSYM_MAX_PATHNAME+1) bytes.\n*/\nstatic int rbuVfsFullPathname(\n  sqlite3_vfs *pVfs,\n  const char *zPath,\n  int nOut,\n  char *zOut\n){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xFullPathname(pRealVfs, zPath, nOut, zOut);\n}\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n/*\n** Open the dynamic library located at zPath and return a handle.\n*/\nstatic void *rbuVfsDlOpen(sqlite3_vfs *pVfs, const char *zPath){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xDlOpen(pRealVfs, zPath);\n}\n\n/*\n** Populate the buffer zErrMsg (size nByte bytes) with a human readable\n** utf-8 string describing the most recent error encountered associated\n** with dynamic libraries.\n*/\nstatic void rbuVfsDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  pRealVfs->xDlError(pRealVfs, nByte, zErrMsg);\n}\n\n/*\n** Return a pointer to the symbol zSymbol in the dynamic library pHandle.\n*/\nstatic void (*rbuVfsDlSym(\n  sqlite3_vfs *pVfs,\n  void *pArg,\n  const char *zSym\n))(void){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xDlSym(pRealVfs, pArg, zSym);\n}\n\n/*\n** Close the dynamic library handle pHandle.\n*/\nstatic void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  pRealVfs->xDlClose(pRealVfs, pHandle);\n}\n#endif /* SQLITE_OMIT_LOAD_EXTENSION */\n\n/*\n** Populate the buffer pointed to by zBufOut with nByte bytes of\n** random data.\n*/\nstatic int rbuVfsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xRandomness(pRealVfs, nByte, zBufOut);\n}\n\n/*\n** Sleep for nMicro microseconds. Return the number of microseconds\n** actually slept.\n*/\nstatic int rbuVfsSleep(sqlite3_vfs *pVfs, int nMicro){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xSleep(pRealVfs, nMicro);\n}\n\n/*\n** Return the current time as a Julian Day number in *pTimeOut.\n*/\nstatic int rbuVfsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){\n  sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;\n  return pRealVfs->xCurrentTime(pRealVfs, pTimeOut);\n}\n\n/*\n** No-op.\n*/\nstatic int rbuVfsGetLastError(sqlite3_vfs *pVfs, int a, char *b){\n  UNUSED_PARAMETER(pVfs);\n  UNUSED_PARAMETER(a);\n  UNUSED_PARAMETER(b);\n  return 0;\n}\n\n/*\n** Deregister and destroy an RBU vfs created by an earlier call to\n** sqlite3rbu_create_vfs().\n*/\nSQLITE_API void sqlite3rbu_destroy_vfs(const char *zName){\n  sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);\n  if( pVfs && pVfs->xOpen==rbuVfsOpen ){\n    sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);\n    sqlite3_vfs_unregister(pVfs);\n    sqlite3_free(pVfs);\n  }\n}\n\n/*\n** Create an RBU VFS named zName that accesses the underlying file-system\n** via existing VFS zParent. The new object is registered as a non-default\n** VFS with SQLite before returning.\n*/\nSQLITE_API int sqlite3rbu_create_vfs(const char *zName, const char *zParent){\n\n  /* Template for VFS */\n  static sqlite3_vfs vfs_template = {\n    1,                            /* iVersion */\n    0,                            /* szOsFile */\n    0,                            /* mxPathname */\n    0,                            /* pNext */\n    0,                            /* zName */\n    0,                            /* pAppData */\n    rbuVfsOpen,                   /* xOpen */\n    rbuVfsDelete,                 /* xDelete */\n    rbuVfsAccess,                 /* xAccess */\n    rbuVfsFullPathname,           /* xFullPathname */\n\n#ifndef SQLITE_OMIT_LOAD_EXTENSION\n    rbuVfsDlOpen,                 /* xDlOpen */\n    rbuVfsDlError,                /* xDlError */\n    rbuVfsDlSym,                  /* xDlSym */\n    rbuVfsDlClose,                /* xDlClose */\n#else\n    0, 0, 0, 0,\n#endif\n\n    rbuVfsRandomness,             /* xRandomness */\n    rbuVfsSleep,                  /* xSleep */\n    rbuVfsCurrentTime,            /* xCurrentTime */\n    rbuVfsGetLastError,           /* xGetLastError */\n    0,                            /* xCurrentTimeInt64 (version 2) */\n    0, 0, 0                       /* Unimplemented version 3 methods */\n  };\n\n  rbu_vfs *pNew = 0;              /* Newly allocated VFS */\n  int rc = SQLITE_OK;\n  size_t nName;\n  size_t nByte;\n\n  nName = strlen(zName);\n  nByte = sizeof(rbu_vfs) + nName + 1;\n  pNew = (rbu_vfs*)sqlite3_malloc64(nByte);\n  if( pNew==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    sqlite3_vfs *pParent;           /* Parent VFS */\n    memset(pNew, 0, nByte);\n    pParent = sqlite3_vfs_find(zParent);\n    if( pParent==0 ){\n      rc = SQLITE_NOTFOUND;\n    }else{\n      char *zSpace;\n      memcpy(&pNew->base, &vfs_template, sizeof(sqlite3_vfs));\n      pNew->base.mxPathname = pParent->mxPathname;\n      pNew->base.szOsFile = sizeof(rbu_file) + pParent->szOsFile;\n      pNew->pRealVfs = pParent;\n      pNew->base.zName = (const char*)(zSpace = (char*)&pNew[1]);\n      memcpy(zSpace, zName, nName);\n\n      /* Allocate the mutex and register the new VFS (not as the default) */\n      pNew->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_RECURSIVE);\n      if( pNew->mutex==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        rc = sqlite3_vfs_register(&pNew->base, 0);\n      }\n    }\n\n    if( rc!=SQLITE_OK ){\n      sqlite3_mutex_free(pNew->mutex);\n      sqlite3_free(pNew);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Configure the aggregate temp file size limit for this RBU handle.\n*/\nSQLITE_API sqlite3_int64 sqlite3rbu_temp_size_limit(sqlite3rbu *pRbu, sqlite3_int64 n){\n  if( n>=0 ){\n    pRbu->szTempLimit = n;\n  }\n  return pRbu->szTempLimit;\n}\n\nSQLITE_API sqlite3_int64 sqlite3rbu_temp_size(sqlite3rbu *pRbu){\n  return pRbu->szTemp;\n}\n\n\n/**************************************************************************/\n\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */\n\n/************** End of sqlite3rbu.c ******************************************/\n/************** Begin file dbstat.c ******************************************/\n/*\n** 2010 July 12\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains an implementation of the \"dbstat\" virtual table.\n**\n** The dbstat virtual table is used to extract low-level storage\n** information from an SQLite database in order to implement the\n** \"sqlite3_analyzer\" utility.  See the ../tool/spaceanal.tcl script\n** for an example implementation.\n**\n** Additional information is available on the \"dbstat.html\" page of the\n** official SQLite documentation.\n*/\n\n/* #include \"sqliteInt.h\"   ** Requires access to internal data structures ** */\n#if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \\\n    && !defined(SQLITE_OMIT_VIRTUALTABLE)\n\n/*\n** The pager and btree modules arrange objects in memory so that there are\n** always approximately 200 bytes of addressable memory following each page\n** buffer. This way small buffer overreads caused by corrupt database pages\n** do not cause undefined behaviour. This module pads each page buffer\n** by the following number of bytes for the same purpose.\n*/\n#define DBSTAT_PAGE_PADDING_BYTES 256\n\n/*\n** Page paths:\n**\n**   The value of the 'path' column describes the path taken from the\n**   root-node of the b-tree structure to each page. The value of the\n**   root-node path is '/'.\n**\n**   The value of the path for the left-most child page of the root of\n**   a b-tree is '/000/'. (Btrees store content ordered from left to right\n**   so the pages to the left have smaller keys than the pages to the right.)\n**   The next to left-most child of the root page is\n**   '/001', and so on, each sibling page identified by a 3-digit hex\n**   value. The children of the 451st left-most sibling have paths such\n**   as '/1c2/000/, '/1c2/001/' etc.\n**\n**   Overflow pages are specified by appending a '+' character and a\n**   six-digit hexadecimal value to the path to the cell they are linked\n**   from. For example, the three overflow pages in a chain linked from\n**   the left-most cell of the 450th child of the root page are identified\n**   by the paths:\n**\n**      '/1c2/000+000000'         // First page in overflow chain\n**      '/1c2/000+000001'         // Second page in overflow chain\n**      '/1c2/000+000002'         // Third page in overflow chain\n**\n**   If the paths are sorted using the BINARY collation sequence, then\n**   the overflow pages associated with a cell will appear earlier in the\n**   sort-order than its child page:\n**\n**      '/1c2/000/'               // Left-most child of 451st child of root\n*/\nstatic const char zDbstatSchema[] =\n  \"CREATE TABLE x(\"\n  \" name       TEXT,\"          /*  0 Name of table or index */\n  \" path       TEXT,\"          /*  1 Path to page from root (NULL for agg) */\n  \" pageno     INTEGER,\"       /*  2 Page number (page count for aggregates) */\n  \" pagetype   TEXT,\"          /*  3 'internal', 'leaf', 'overflow', or NULL */\n  \" ncell      INTEGER,\"       /*  4 Cells on page (0 for overflow) */\n  \" payload    INTEGER,\"       /*  5 Bytes of payload on this page */\n  \" unused     INTEGER,\"       /*  6 Bytes of unused space on this page */\n  \" mx_payload INTEGER,\"       /*  7 Largest payload size of all cells */\n  \" pgoffset   INTEGER,\"       /*  8 Offset of page in file (NULL for agg) */\n  \" pgsize     INTEGER,\"       /*  9 Size of the page (sum for aggregate) */\n  \" schema     TEXT HIDDEN,\"   /* 10 Database schema being analyzed */\n  \" aggregate  BOOLEAN HIDDEN\" /* 11 aggregate info for each table */\n  \")\"\n;\n\n/* Forward reference to data structured used in this module */\ntypedef struct StatTable StatTable;\ntypedef struct StatCursor StatCursor;\ntypedef struct StatPage StatPage;\ntypedef struct StatCell StatCell;\n\n/* Size information for a single cell within a btree page */\nstruct StatCell {\n  int nLocal;                     /* Bytes of local payload */\n  u32 iChildPg;                   /* Child node (or 0 if this is a leaf) */\n  int nOvfl;                      /* Entries in aOvfl[] */\n  u32 *aOvfl;                     /* Array of overflow page numbers */\n  int nLastOvfl;                  /* Bytes of payload on final overflow page */\n  int iOvfl;                      /* Iterates through aOvfl[] */\n};\n\n/* Size information for a single btree page */\nstruct StatPage {\n  u32 iPgno;                      /* Page number */\n  u8 *aPg;                        /* Page buffer from sqlite3_malloc() */\n  int iCell;                      /* Current cell */\n  char *zPath;                    /* Path to this page */\n\n  /* Variables populated by statDecodePage(): */\n  u8 flags;                       /* Copy of flags byte */\n  int nCell;                      /* Number of cells on page */\n  int nUnused;                    /* Number of unused bytes on page */\n  StatCell *aCell;                /* Array of parsed cells */\n  u32 iRightChildPg;              /* Right-child page number (or 0) */\n  int nMxPayload;                 /* Largest payload of any cell on the page */\n};\n\n/* The cursor for scanning the dbstat virtual table */\nstruct StatCursor {\n  sqlite3_vtab_cursor base;       /* base class.  MUST BE FIRST! */\n  sqlite3_stmt *pStmt;            /* Iterates through set of root pages */\n  u8 isEof;                       /* After pStmt has returned SQLITE_DONE */\n  u8 isAgg;                       /* Aggregate results for each table */\n  int iDb;                        /* Schema used for this query */\n\n  StatPage aPage[32];             /* Pages in path to current page */\n  int iPage;                      /* Current entry in aPage[] */\n\n  /* Values to return. */\n  u32 iPageno;                    /* Value of 'pageno' column */\n  char *zName;                    /* Value of 'name' column */\n  char *zPath;                    /* Value of 'path' column */\n  char *zPagetype;                /* Value of 'pagetype' column */\n  int nPage;                      /* Number of pages in current btree */\n  int nCell;                      /* Value of 'ncell' column */\n  int nMxPayload;                 /* Value of 'mx_payload' column */\n  i64 nUnused;                    /* Value of 'unused' column */\n  i64 nPayload;                   /* Value of 'payload' column */\n  i64 iOffset;                    /* Value of 'pgOffset' column */\n  i64 szPage;                     /* Value of 'pgSize' column */\n};\n\n/* An instance of the DBSTAT virtual table */\nstruct StatTable {\n  sqlite3_vtab base;              /* base class.  MUST BE FIRST! */\n  sqlite3 *db;                    /* Database connection that owns this vtab */\n  int iDb;                        /* Index of database to analyze */\n};\n\n#ifndef get2byte\n# define get2byte(x)   ((x)[0]<<8 | (x)[1])\n#endif\n\n/*\n** Connect to or create a new DBSTAT virtual table.\n*/\nstatic int statConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  StatTable *pTab = 0;\n  int rc = SQLITE_OK;\n  int iDb;\n  (void)pAux;\n\n  if( argc>=4 ){\n    Token nm;\n    sqlite3TokenInit(&nm, (char*)argv[3]);\n    iDb = sqlite3FindDb(db, &nm);\n    if( iDb<0 ){\n      *pzErr = sqlite3_mprintf(\"no such database: %s\", argv[3]);\n      return SQLITE_ERROR;\n    }\n  }else{\n    iDb = 0;\n  }\n  sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY);\n  rc = sqlite3_declare_vtab(db, zDbstatSchema);\n  if( rc==SQLITE_OK ){\n    pTab = (StatTable *)sqlite3_malloc64(sizeof(StatTable));\n    if( pTab==0 ) rc = SQLITE_NOMEM_BKPT;\n  }\n\n  assert( rc==SQLITE_OK || pTab==0 );\n  if( rc==SQLITE_OK ){\n    memset(pTab, 0, sizeof(StatTable));\n    pTab->db = db;\n    pTab->iDb = iDb;\n  }\n\n  *ppVtab = (sqlite3_vtab*)pTab;\n  return rc;\n}\n\n/*\n** Disconnect from or destroy the DBSTAT virtual table.\n*/\nstatic int statDisconnect(sqlite3_vtab *pVtab){\n  sqlite3_free(pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** Compute the best query strategy and return the result in idxNum.\n**\n**   idxNum-Bit        Meaning\n**   ----------        ----------------------------------------------\n**      0x01           There is a schema=? term in the WHERE clause\n**      0x02           There is a name=? term in the WHERE clause\n**      0x04           There is an aggregate=? term in the WHERE clause\n**      0x08           Output should be ordered by name and path\n*/\nstatic int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){\n  int i;\n  int iSchema = -1;\n  int iName = -1;\n  int iAgg = -1;\n  (void)tab;\n\n  /* Look for a valid schema=? constraint.  If found, change the idxNum to\n  ** 1 and request the value of that constraint be sent to xFilter.  And\n  ** lower the cost estimate to encourage the constrained version to be\n  ** used.\n  */\n  for(i=0; i<pIdxInfo->nConstraint; i++){\n    if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;\n    if( pIdxInfo->aConstraint[i].usable==0 ){\n      /* Force DBSTAT table should always be the right-most table in a join */\n      return SQLITE_CONSTRAINT;\n    }\n    switch( pIdxInfo->aConstraint[i].iColumn ){\n      case 0: {    /* name */\n        iName = i;\n        break;\n      }\n      case 10: {   /* schema */\n        iSchema = i;\n        break;\n      }\n      case 11: {   /* aggregate */\n        iAgg = i;\n        break;\n      }\n    }\n  }\n  i = 0;\n  if( iSchema>=0 ){\n    pIdxInfo->aConstraintUsage[iSchema].argvIndex = ++i;\n    pIdxInfo->aConstraintUsage[iSchema].omit = 1;\n    pIdxInfo->idxNum |= 0x01;\n  }\n  if( iName>=0 ){\n    pIdxInfo->aConstraintUsage[iName].argvIndex = ++i;\n    pIdxInfo->idxNum |= 0x02;\n  }\n  if( iAgg>=0 ){\n    pIdxInfo->aConstraintUsage[iAgg].argvIndex = ++i;\n    pIdxInfo->idxNum |= 0x04;\n  }\n  pIdxInfo->estimatedCost = 1.0;\n\n  /* Records are always returned in ascending order of (name, path).\n  ** If this will satisfy the client, set the orderByConsumed flag so that\n  ** SQLite does not do an external sort.\n  */\n  if( ( pIdxInfo->nOrderBy==1\n     && pIdxInfo->aOrderBy[0].iColumn==0\n     && pIdxInfo->aOrderBy[0].desc==0\n     ) ||\n      ( pIdxInfo->nOrderBy==2\n     && pIdxInfo->aOrderBy[0].iColumn==0\n     && pIdxInfo->aOrderBy[0].desc==0\n     && pIdxInfo->aOrderBy[1].iColumn==1\n     && pIdxInfo->aOrderBy[1].desc==0\n     )\n  ){\n    pIdxInfo->orderByConsumed = 1;\n    pIdxInfo->idxNum |= 0x08;\n  }\n  pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_HEX;\n\n  return SQLITE_OK;\n}\n\n/*\n** Open a new DBSTAT cursor.\n*/\nstatic int statOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){\n  StatTable *pTab = (StatTable *)pVTab;\n  StatCursor *pCsr;\n\n  pCsr = (StatCursor *)sqlite3_malloc64(sizeof(StatCursor));\n  if( pCsr==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }else{\n    memset(pCsr, 0, sizeof(StatCursor));\n    pCsr->base.pVtab = pVTab;\n    pCsr->iDb = pTab->iDb;\n  }\n\n  *ppCursor = (sqlite3_vtab_cursor *)pCsr;\n  return SQLITE_OK;\n}\n\nstatic void statClearCells(StatPage *p){\n  int i;\n  if( p->aCell ){\n    for(i=0; i<p->nCell; i++){\n      sqlite3_free(p->aCell[i].aOvfl);\n    }\n    sqlite3_free(p->aCell);\n  }\n  p->nCell = 0;\n  p->aCell = 0;\n}\n\nstatic void statClearPage(StatPage *p){\n  u8 *aPg = p->aPg;\n  statClearCells(p);\n  sqlite3_free(p->zPath);\n  memset(p, 0, sizeof(StatPage));\n  p->aPg = aPg;\n}\n\nstatic void statResetCsr(StatCursor *pCsr){\n  int i;\n  /* In some circumstances, specifically if an OOM has occurred, the call\n  ** to sqlite3_reset() may cause the pager to be reset (emptied). It is\n  ** important that statClearPage() is called to free any page refs before\n  ** this happens. dbsqlfuzz 9ed3e4e3816219d3509d711636c38542bf3f40b1. */\n  for(i=0; i<ArraySize(pCsr->aPage); i++){\n    statClearPage(&pCsr->aPage[i]);\n    sqlite3_free(pCsr->aPage[i].aPg);\n    pCsr->aPage[i].aPg = 0;\n  }\n  sqlite3_reset(pCsr->pStmt);\n  pCsr->iPage = 0;\n  sqlite3_free(pCsr->zPath);\n  pCsr->zPath = 0;\n  pCsr->isEof = 0;\n}\n\n/* Resize the space-used counters inside of the cursor */\nstatic void statResetCounts(StatCursor *pCsr){\n  pCsr->nCell = 0;\n  pCsr->nMxPayload = 0;\n  pCsr->nUnused = 0;\n  pCsr->nPayload = 0;\n  pCsr->szPage = 0;\n  pCsr->nPage = 0;\n}\n\n/*\n** Close a DBSTAT cursor.\n*/\nstatic int statClose(sqlite3_vtab_cursor *pCursor){\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  statResetCsr(pCsr);\n  sqlite3_finalize(pCsr->pStmt);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** For a single cell on a btree page, compute the number of bytes of\n** content (payload) stored on that page.  That is to say, compute the\n** number of bytes of content not found on overflow pages.\n*/\nstatic int getLocalPayload(\n  int nUsable,                    /* Usable bytes per page */\n  u8 flags,                       /* Page flags */\n  int nTotal                      /* Total record (payload) size */\n){\n  int nLocal;\n  int nMinLocal;\n  int nMaxLocal;\n\n  if( flags==0x0D ){              /* Table leaf node */\n    nMinLocal = (nUsable - 12) * 32 / 255 - 23;\n    nMaxLocal = nUsable - 35;\n  }else{                          /* Index interior and leaf nodes */\n    nMinLocal = (nUsable - 12) * 32 / 255 - 23;\n    nMaxLocal = (nUsable - 12) * 64 / 255 - 23;\n  }\n\n  nLocal = nMinLocal + (nTotal - nMinLocal) % (nUsable - 4);\n  if( nLocal>nMaxLocal ) nLocal = nMinLocal;\n  return nLocal;\n}\n\n/* Populate the StatPage object with information about the all\n** cells found on the page currently under analysis.\n*/\nstatic int statDecodePage(Btree *pBt, StatPage *p){\n  int nUnused;\n  int iOff;\n  int nHdr;\n  int isLeaf;\n  int szPage;\n\n  u8 *aData = p->aPg;\n  u8 *aHdr = &aData[p->iPgno==1 ? 100 : 0];\n\n  p->flags = aHdr[0];\n  if( p->flags==0x0A || p->flags==0x0D ){\n    isLeaf = 1;\n    nHdr = 8;\n  }else if( p->flags==0x05 || p->flags==0x02 ){\n    isLeaf = 0;\n    nHdr = 12;\n  }else{\n    goto statPageIsCorrupt;\n  }\n  if( p->iPgno==1 ) nHdr += 100;\n  p->nCell = get2byte(&aHdr[3]);\n  p->nMxPayload = 0;\n  szPage = sqlite3BtreeGetPageSize(pBt);\n\n  nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;\n  nUnused += (int)aHdr[7];\n  iOff = get2byte(&aHdr[1]);\n  while( iOff ){\n    int iNext;\n    if( iOff>=szPage ) goto statPageIsCorrupt;\n    nUnused += get2byte(&aData[iOff+2]);\n    iNext = get2byte(&aData[iOff]);\n    if( iNext<iOff+4 && iNext>0 ) goto statPageIsCorrupt;\n    iOff = iNext;\n  }\n  p->nUnused = nUnused;\n  p->iRightChildPg = isLeaf ? 0 : sqlite3Get4byte(&aHdr[8]);\n\n  if( p->nCell ){\n    int i;                        /* Used to iterate through cells */\n    int nUsable;                  /* Usable bytes per page */\n\n    sqlite3BtreeEnter(pBt);\n    nUsable = szPage - sqlite3BtreeGetReserveNoMutex(pBt);\n    sqlite3BtreeLeave(pBt);\n    p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));\n    if( p->aCell==0 ) return SQLITE_NOMEM_BKPT;\n    memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));\n\n    for(i=0; i<p->nCell; i++){\n      StatCell *pCell = &p->aCell[i];\n\n      iOff = get2byte(&aData[nHdr+i*2]);\n      if( iOff<nHdr || iOff>=szPage ) goto statPageIsCorrupt;\n      if( !isLeaf ){\n        pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);\n        iOff += 4;\n      }\n      if( p->flags==0x05 ){\n        /* A table interior node. nPayload==0. */\n      }else{\n        u32 nPayload;             /* Bytes of payload total (local+overflow) */\n        int nLocal;               /* Bytes of payload stored locally */\n        iOff += getVarint32(&aData[iOff], nPayload);\n        if( p->flags==0x0D ){\n          u64 dummy;\n          iOff += sqlite3GetVarint(&aData[iOff], &dummy);\n        }\n        if( nPayload>(u32)p->nMxPayload ) p->nMxPayload = nPayload;\n        nLocal = getLocalPayload(nUsable, p->flags, nPayload);\n        if( nLocal<0 ) goto statPageIsCorrupt;\n        pCell->nLocal = nLocal;\n        assert( nPayload>=(u32)nLocal );\n        assert( nLocal<=(nUsable-35) );\n        if( nPayload>(u32)nLocal ){\n          int j;\n          int nOvfl = ((nPayload - nLocal) + nUsable-4 - 1) / (nUsable - 4);\n          if( iOff+nLocal+4>nUsable || nPayload>0x7fffffff ){\n            goto statPageIsCorrupt;\n          }\n          pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);\n          pCell->nOvfl = nOvfl;\n          pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);\n          if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;\n          pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);\n          for(j=1; j<nOvfl; j++){\n            int rc;\n            u32 iPrev = pCell->aOvfl[j-1];\n            DbPage *pPg = 0;\n            rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPrev, &pPg, 0);\n            if( rc!=SQLITE_OK ){\n              assert( pPg==0 );\n              return rc;\n            }\n            pCell->aOvfl[j] = sqlite3Get4byte(sqlite3PagerGetData(pPg));\n            sqlite3PagerUnref(pPg);\n          }\n        }\n      }\n    }\n  }\n\n  return SQLITE_OK;\n\nstatPageIsCorrupt:\n  p->flags = 0;\n  statClearCells(p);\n  return SQLITE_OK;\n}\n\n/*\n** Populate the pCsr->iOffset and pCsr->szPage member variables. Based on\n** the current value of pCsr->iPageno.\n*/\nstatic void statSizeAndOffset(StatCursor *pCsr){\n  StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;\n  Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;\n  Pager *pPager = sqlite3BtreePager(pBt);\n  sqlite3_file *fd;\n  sqlite3_int64 x[2];\n\n  /* If connected to a ZIPVFS backend, find the page size and\n  ** offset from ZIPVFS.\n  */\n  fd = sqlite3PagerFile(pPager);\n  x[0] = pCsr->iPageno;\n  if( sqlite3OsFileControl(fd, 230440, &x)==SQLITE_OK ){\n    pCsr->iOffset = x[0];\n    pCsr->szPage += x[1];\n  }else{\n    /* Not ZIPVFS: The default page size and offset */\n    pCsr->szPage += sqlite3BtreeGetPageSize(pBt);\n    pCsr->iOffset = (i64)pCsr->szPage * (pCsr->iPageno - 1);\n  }\n}\n\n/*\n** Load a copy of the page data for page iPg into the buffer belonging\n** to page object pPg. Allocate the buffer if necessary. Return SQLITE_OK\n** if successful, or an SQLite error code otherwise.\n*/\nstatic int statGetPage(\n  Btree *pBt,                     /* Load page from this b-tree */\n  u32 iPg,                        /* Page number to load */\n  StatPage *pPg                   /* Load page into this object */\n){\n  int pgsz = sqlite3BtreeGetPageSize(pBt);\n  DbPage *pDbPage = 0;\n  int rc;\n\n  if( pPg->aPg==0 ){\n    pPg->aPg = (u8*)sqlite3_malloc(pgsz + DBSTAT_PAGE_PADDING_BYTES);\n    if( pPg->aPg==0 ){\n      return SQLITE_NOMEM_BKPT;\n    }\n    memset(&pPg->aPg[pgsz], 0, DBSTAT_PAGE_PADDING_BYTES);\n  }\n\n  rc = sqlite3PagerGet(sqlite3BtreePager(pBt), iPg, &pDbPage, 0);\n  if( rc==SQLITE_OK ){\n    const u8 *a = sqlite3PagerGetData(pDbPage);\n    memcpy(pPg->aPg, a, pgsz);\n    sqlite3PagerUnref(pDbPage);\n  }\n\n  return rc;\n}\n\n/*\n** Move a DBSTAT cursor to the next entry.  Normally, the next\n** entry will be the next page, but in aggregated mode (pCsr->isAgg!=0),\n** the next entry is the next btree.\n*/\nstatic int statNext(sqlite3_vtab_cursor *pCursor){\n  int rc;\n  int nPayload;\n  char *z;\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  StatTable *pTab = (StatTable *)pCursor->pVtab;\n  Btree *pBt = pTab->db->aDb[pCsr->iDb].pBt;\n  Pager *pPager = sqlite3BtreePager(pBt);\n\n  sqlite3_free(pCsr->zPath);\n  pCsr->zPath = 0;\n\nstatNextRestart:\n  if( pCsr->iPage<0 ){\n    /* Start measuring space on the next btree */\n    statResetCounts(pCsr);\n    rc = sqlite3_step(pCsr->pStmt);\n    if( rc==SQLITE_ROW ){\n      int nPage;\n      u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);\n      sqlite3PagerPagecount(pPager, &nPage);\n      if( nPage==0 ){\n        pCsr->isEof = 1;\n        return sqlite3_reset(pCsr->pStmt);\n      }\n      rc = statGetPage(pBt, iRoot, &pCsr->aPage[0]);\n      pCsr->aPage[0].iPgno = iRoot;\n      pCsr->aPage[0].iCell = 0;\n      if( !pCsr->isAgg ){\n        pCsr->aPage[0].zPath = z = sqlite3_mprintf(\"/\");\n        if( z==0 ) rc = SQLITE_NOMEM_BKPT;\n      }\n      pCsr->iPage = 0;\n      pCsr->nPage = 1;\n    }else{\n      pCsr->isEof = 1;\n      return sqlite3_reset(pCsr->pStmt);\n    }\n  }else{\n    /* Continue analyzing the btree previously started */\n    StatPage *p = &pCsr->aPage[pCsr->iPage];\n    if( !pCsr->isAgg ) statResetCounts(pCsr);\n    while( p->iCell<p->nCell ){\n      StatCell *pCell = &p->aCell[p->iCell];\n      while( pCell->iOvfl<pCell->nOvfl ){\n        int nUsable, iOvfl;\n        sqlite3BtreeEnter(pBt);\n        nUsable = sqlite3BtreeGetPageSize(pBt) -\n                        sqlite3BtreeGetReserveNoMutex(pBt);\n        sqlite3BtreeLeave(pBt);\n        pCsr->nPage++;\n        statSizeAndOffset(pCsr);\n        if( pCell->iOvfl<pCell->nOvfl-1 ){\n          pCsr->nPayload += nUsable - 4;\n        }else{\n          pCsr->nPayload += pCell->nLastOvfl;\n          pCsr->nUnused += nUsable - 4 - pCell->nLastOvfl;\n        }\n        iOvfl = pCell->iOvfl;\n        pCell->iOvfl++;\n        if( !pCsr->isAgg ){\n          pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);\n          pCsr->iPageno = pCell->aOvfl[iOvfl];\n          pCsr->zPagetype = \"overflow\";\n          pCsr->zPath = z = sqlite3_mprintf(\n              \"%s%.3x+%.6x\", p->zPath, p->iCell, iOvfl\n          );\n          return z==0 ? SQLITE_NOMEM_BKPT : SQLITE_OK;\n        }\n      }\n      if( p->iRightChildPg ) break;\n      p->iCell++;\n    }\n\n    if( !p->iRightChildPg || p->iCell>p->nCell ){\n      statClearPage(p);\n      pCsr->iPage--;\n      if( pCsr->isAgg && pCsr->iPage<0 ){\n        /* label-statNext-done:  When computing aggregate space usage over\n        ** an entire btree, this is the exit point from this function */\n        return SQLITE_OK;\n      }\n      goto statNextRestart; /* Tail recursion */\n    }\n    pCsr->iPage++;\n    if( pCsr->iPage>=ArraySize(pCsr->aPage) ){\n      statResetCsr(pCsr);\n      return SQLITE_CORRUPT_BKPT;\n    }\n    assert( p==&pCsr->aPage[pCsr->iPage-1] );\n\n    if( p->iCell==p->nCell ){\n      p[1].iPgno = p->iRightChildPg;\n    }else{\n      p[1].iPgno = p->aCell[p->iCell].iChildPg;\n    }\n    rc = statGetPage(pBt, p[1].iPgno, &p[1]);\n    pCsr->nPage++;\n    p[1].iCell = 0;\n    if( !pCsr->isAgg ){\n      p[1].zPath = z = sqlite3_mprintf(\"%s%.3x/\", p->zPath, p->iCell);\n      if( z==0 ) rc = SQLITE_NOMEM_BKPT;\n    }\n    p->iCell++;\n  }\n\n\n  /* Populate the StatCursor fields with the values to be returned\n  ** by the xColumn() and xRowid() methods.\n  */\n  if( rc==SQLITE_OK ){\n    int i;\n    StatPage *p = &pCsr->aPage[pCsr->iPage];\n    pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);\n    pCsr->iPageno = p->iPgno;\n\n    rc = statDecodePage(pBt, p);\n    if( rc==SQLITE_OK ){\n      statSizeAndOffset(pCsr);\n\n      switch( p->flags ){\n        case 0x05:             /* table internal */\n        case 0x02:             /* index internal */\n          pCsr->zPagetype = \"internal\";\n          break;\n        case 0x0D:             /* table leaf */\n        case 0x0A:             /* index leaf */\n          pCsr->zPagetype = \"leaf\";\n          break;\n        default:\n          pCsr->zPagetype = \"corrupted\";\n          break;\n      }\n      pCsr->nCell += p->nCell;\n      pCsr->nUnused += p->nUnused;\n      if( p->nMxPayload>pCsr->nMxPayload ) pCsr->nMxPayload = p->nMxPayload;\n      if( !pCsr->isAgg ){\n        pCsr->zPath = z = sqlite3_mprintf(\"%s\", p->zPath);\n        if( z==0 ) rc = SQLITE_NOMEM_BKPT;\n      }\n      nPayload = 0;\n      for(i=0; i<p->nCell; i++){\n        nPayload += p->aCell[i].nLocal;\n      }\n      pCsr->nPayload += nPayload;\n\n      /* If computing aggregate space usage by btree, continue with the\n      ** next page.  The loop will exit via the return at label-statNext-done\n      */\n      if( pCsr->isAgg ) goto statNextRestart;\n    }\n  }\n\n  return rc;\n}\n\nstatic int statEof(sqlite3_vtab_cursor *pCursor){\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  return pCsr->isEof;\n}\n\n/* Initialize a cursor according to the query plan idxNum using the\n** arguments in argv[0].  See statBestIndex() for a description of the\n** meaning of the bits in idxNum.\n*/\nstatic int statFilter(\n  sqlite3_vtab_cursor *pCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  StatTable *pTab = (StatTable*)(pCursor->pVtab);\n  sqlite3_str *pSql;      /* Query of btrees to analyze */\n  char *zSql;             /* String value of pSql */\n  int iArg = 0;           /* Count of argv[] parameters used so far */\n  int rc = SQLITE_OK;     /* Result of this operation */\n  const char *zName = 0;  /* Only provide analysis of this table */\n  (void)argc;\n  (void)idxStr;\n\n  statResetCsr(pCsr);\n  sqlite3_finalize(pCsr->pStmt);\n  pCsr->pStmt = 0;\n  if( idxNum & 0x01 ){\n    /* schema=? constraint is present.  Get its value */\n    const char *zDbase = (const char*)sqlite3_value_text(argv[iArg++]);\n    pCsr->iDb = sqlite3FindDbName(pTab->db, zDbase);\n    if( pCsr->iDb<0 ){\n      pCsr->iDb = 0;\n      pCsr->isEof = 1;\n      return SQLITE_OK;\n    }\n  }else{\n    pCsr->iDb = pTab->iDb;\n  }\n  if( idxNum & 0x02 ){\n    /* name=? constraint is present */\n    zName = (const char*)sqlite3_value_text(argv[iArg++]);\n  }\n  if( idxNum & 0x04 ){\n    /* aggregate=? constraint is present */\n    pCsr->isAgg = sqlite3_value_double(argv[iArg++])!=0.0;\n  }else{\n    pCsr->isAgg = 0;\n  }\n  pSql = sqlite3_str_new(pTab->db);\n  sqlite3_str_appendf(pSql,\n      \"SELECT * FROM (\"\n        \"SELECT 'sqlite_schema' AS name,1 AS rootpage,'table' AS type\"\n        \" UNION ALL \"\n        \"SELECT name,rootpage,type\"\n        \" FROM \\\"%w\\\".sqlite_schema WHERE rootpage!=0)\",\n      pTab->db->aDb[pCsr->iDb].zDbSName);\n  if( zName ){\n    sqlite3_str_appendf(pSql, \"WHERE name=%Q\", zName);\n  }\n  if( idxNum & 0x08 ){\n    sqlite3_str_appendf(pSql, \" ORDER BY name\");\n  }\n  zSql = sqlite3_str_finish(pSql);\n  if( zSql==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }else{\n    rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pStmt, 0);\n    sqlite3_free(zSql);\n  }\n\n  if( rc==SQLITE_OK ){\n    pCsr->iPage = -1;\n    rc = statNext(pCursor);\n  }\n  return rc;\n}\n\nstatic int statColumn(\n  sqlite3_vtab_cursor *pCursor,\n  sqlite3_context *ctx,\n  int i\n){\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  switch( i ){\n    case 0:            /* name */\n      sqlite3_result_text(ctx, pCsr->zName, -1, SQLITE_TRANSIENT);\n      break;\n    case 1:            /* path */\n      if( !pCsr->isAgg ){\n        sqlite3_result_text(ctx, pCsr->zPath, -1, SQLITE_TRANSIENT);\n      }\n      break;\n    case 2:            /* pageno */\n      if( pCsr->isAgg ){\n        sqlite3_result_int64(ctx, pCsr->nPage);\n      }else{\n        sqlite3_result_int64(ctx, pCsr->iPageno);\n      }\n      break;\n    case 3:            /* pagetype */\n      if( !pCsr->isAgg ){\n        sqlite3_result_text(ctx, pCsr->zPagetype, -1, SQLITE_STATIC);\n      }\n      break;\n    case 4:            /* ncell */\n      sqlite3_result_int64(ctx, pCsr->nCell);\n      break;\n    case 5:            /* payload */\n      sqlite3_result_int64(ctx, pCsr->nPayload);\n      break;\n    case 6:            /* unused */\n      sqlite3_result_int64(ctx, pCsr->nUnused);\n      break;\n    case 7:            /* mx_payload */\n      sqlite3_result_int64(ctx, pCsr->nMxPayload);\n      break;\n    case 8:            /* pgoffset */\n      if( !pCsr->isAgg ){\n        sqlite3_result_int64(ctx, pCsr->iOffset);\n      }\n      break;\n    case 9:            /* pgsize */\n      sqlite3_result_int64(ctx, pCsr->szPage);\n      break;\n    case 10: {         /* schema */\n      sqlite3 *db = sqlite3_context_db_handle(ctx);\n      int iDb = pCsr->iDb;\n      sqlite3_result_text(ctx, db->aDb[iDb].zDbSName, -1, SQLITE_STATIC);\n      break;\n    }\n    default: {         /* aggregate */\n      sqlite3_result_int(ctx, pCsr->isAgg);\n      break;\n    }\n  }\n  return SQLITE_OK;\n}\n\nstatic int statRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){\n  StatCursor *pCsr = (StatCursor *)pCursor;\n  *pRowid = pCsr->iPageno;\n  return SQLITE_OK;\n}\n\n/*\n** Invoke this routine to register the \"dbstat\" virtual table module\n*/\nSQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){\n  static sqlite3_module dbstat_module = {\n    0,                            /* iVersion */\n    statConnect,                  /* xCreate */\n    statConnect,                  /* xConnect */\n    statBestIndex,                /* xBestIndex */\n    statDisconnect,               /* xDisconnect */\n    statDisconnect,               /* xDestroy */\n    statOpen,                     /* xOpen - open a cursor */\n    statClose,                    /* xClose - close a cursor */\n    statFilter,                   /* xFilter - configure scan constraints */\n    statNext,                     /* xNext - advance a cursor */\n    statEof,                      /* xEof - check for end of scan */\n    statColumn,                   /* xColumn - read data */\n    statRowid,                    /* xRowid - read data */\n    0,                            /* xUpdate */\n    0,                            /* xBegin */\n    0,                            /* xSync */\n    0,                            /* xCommit */\n    0,                            /* xRollback */\n    0,                            /* xFindMethod */\n    0,                            /* xRename */\n    0,                            /* xSavepoint */\n    0,                            /* xRelease */\n    0,                            /* xRollbackTo */\n    0,                            /* xShadowName */\n    0                             /* xIntegrity */\n  };\n  return sqlite3_create_module(db, \"dbstat\", &dbstat_module, 0);\n}\n#elif defined(SQLITE_ENABLE_DBSTAT_VTAB)\nSQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }\n#endif /* SQLITE_ENABLE_DBSTAT_VTAB */\n\n/************** End of dbstat.c **********************************************/\n/************** Begin file dbpage.c ******************************************/\n/*\n** 2017-10-11\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This file contains an implementation of the \"sqlite_dbpage\" virtual table.\n**\n** The sqlite_dbpage virtual table is used to read or write whole raw\n** pages of the database file.  The pager interface is used so that\n** uncommitted changes and changes recorded in the WAL file are correctly\n** retrieved.\n**\n** Usage example:\n**\n**    SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;\n**\n** This is an eponymous virtual table so it does not need to be created before\n** use.  The optional argument to the sqlite_dbpage() table name is the\n** schema for the database file that is to be read.  The default schema is\n** \"main\".\n**\n** The data field of sqlite_dbpage table can be updated.  The new\n** value must be a BLOB which is the correct page size, otherwise the\n** update fails.  INSERT operations also work, and operate as if they\n** where REPLACE.  The size of the database can be extended by INSERT-ing\n** new pages on the end.\n**\n** Rows may not be deleted.  However, doing an INSERT to page number N\n** with NULL page data causes the N-th page and all subsequent pages to be\n** deleted and the database to be truncated.\n*/\n\n/* #include \"sqliteInt.h\"   ** Requires access to internal data structures ** */\n#if (defined(SQLITE_ENABLE_DBPAGE_VTAB) || defined(SQLITE_TEST)) \\\n    && !defined(SQLITE_OMIT_VIRTUALTABLE)\n\ntypedef struct DbpageTable DbpageTable;\ntypedef struct DbpageCursor DbpageCursor;\n\nstruct DbpageCursor {\n  sqlite3_vtab_cursor base;       /* Base class.  Must be first */\n  Pgno pgno;                      /* Current page number */\n  Pgno mxPgno;                    /* Last page to visit on this scan */\n  Pager *pPager;                  /* Pager being read/written */\n  DbPage *pPage1;                 /* Page 1 of the database */\n  int iDb;                        /* Index of database to analyze */\n  int szPage;                     /* Size of each page in bytes */\n};\n\nstruct DbpageTable {\n  sqlite3_vtab base;              /* Base class.  Must be first */\n  sqlite3 *db;                    /* The database */\n  int iDbTrunc;                   /* Database to truncate */\n  Pgno pgnoTrunc;                 /* Size to truncate to */\n};\n\n/* Columns */\n#define DBPAGE_COLUMN_PGNO    0\n#define DBPAGE_COLUMN_DATA    1\n#define DBPAGE_COLUMN_SCHEMA  2\n\n\n/*\n** Connect to or create a dbpagevfs virtual table.\n*/\nstatic int dbpageConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  DbpageTable *pTab = 0;\n  int rc = SQLITE_OK;\n  (void)pAux;\n  (void)argc;\n  (void)argv;\n  (void)pzErr;\n\n  sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY);\n  sqlite3_vtab_config(db, SQLITE_VTAB_USES_ALL_SCHEMAS);\n  rc = sqlite3_declare_vtab(db,\n          \"CREATE TABLE x(pgno INTEGER PRIMARY KEY, data BLOB, schema HIDDEN)\");\n  if( rc==SQLITE_OK ){\n    pTab = (DbpageTable *)sqlite3_malloc64(sizeof(DbpageTable));\n    if( pTab==0 ) rc = SQLITE_NOMEM_BKPT;\n  }\n\n  assert( rc==SQLITE_OK || pTab==0 );\n  if( rc==SQLITE_OK ){\n    memset(pTab, 0, sizeof(DbpageTable));\n    pTab->db = db;\n  }\n\n  *ppVtab = (sqlite3_vtab*)pTab;\n  return rc;\n}\n\n/*\n** Disconnect from or destroy a dbpagevfs virtual table.\n*/\nstatic int dbpageDisconnect(sqlite3_vtab *pVtab){\n  sqlite3_free(pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** idxNum:\n**\n**     0     schema=main, full table scan\n**     1     schema=main, pgno=?1\n**     2     schema=?1, full table scan\n**     3     schema=?1, pgno=?2\n*/\nstatic int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){\n  int i;\n  int iPlan = 0;\n  (void)tab;\n\n  /* If there is a schema= constraint, it must be honored.  Report a\n  ** ridiculously large estimated cost if the schema= constraint is\n  ** unavailable\n  */\n  for(i=0; i<pIdxInfo->nConstraint; i++){\n    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];\n    if( p->iColumn!=DBPAGE_COLUMN_SCHEMA ) continue;\n    if( p->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;\n    if( !p->usable ){\n      /* No solution. */\n      return SQLITE_CONSTRAINT;\n    }\n    iPlan = 2;\n    pIdxInfo->aConstraintUsage[i].argvIndex = 1;\n    pIdxInfo->aConstraintUsage[i].omit = 1;\n    break;\n  }\n\n  /* If we reach this point, it means that either there is no schema=\n  ** constraint (in which case we use the \"main\" schema) or else the\n  ** schema constraint was accepted.  Lower the estimated cost accordingly\n  */\n  pIdxInfo->estimatedCost = 1.0e6;\n\n  /* Check for constraints against pgno */\n  for(i=0; i<pIdxInfo->nConstraint; i++){\n    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[i];\n    if( p->usable && p->iColumn<=0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ ){\n      pIdxInfo->estimatedRows = 1;\n      pIdxInfo->idxFlags = SQLITE_INDEX_SCAN_UNIQUE;\n      pIdxInfo->estimatedCost = 1.0;\n      pIdxInfo->aConstraintUsage[i].argvIndex = iPlan ? 2 : 1;\n      pIdxInfo->aConstraintUsage[i].omit = 1;\n      iPlan |= 1;\n      break;\n    }\n  }\n  pIdxInfo->idxNum = iPlan;\n\n  if( pIdxInfo->nOrderBy>=1\n   && pIdxInfo->aOrderBy[0].iColumn<=0\n   && pIdxInfo->aOrderBy[0].desc==0\n  ){\n    pIdxInfo->orderByConsumed = 1;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Open a new dbpagevfs cursor.\n*/\nstatic int dbpageOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){\n  DbpageCursor *pCsr;\n\n  pCsr = (DbpageCursor *)sqlite3_malloc64(sizeof(DbpageCursor));\n  if( pCsr==0 ){\n    return SQLITE_NOMEM_BKPT;\n  }else{\n    memset(pCsr, 0, sizeof(DbpageCursor));\n    pCsr->base.pVtab = pVTab;\n    pCsr->pgno = 0;\n  }\n\n  *ppCursor = (sqlite3_vtab_cursor *)pCsr;\n  return SQLITE_OK;\n}\n\n/*\n** Close a dbpagevfs cursor.\n*/\nstatic int dbpageClose(sqlite3_vtab_cursor *pCursor){\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  if( pCsr->pPage1 ) sqlite3PagerUnrefPageOne(pCsr->pPage1);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n/*\n** Move a dbpagevfs cursor to the next entry in the file.\n*/\nstatic int dbpageNext(sqlite3_vtab_cursor *pCursor){\n  int rc = SQLITE_OK;\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  pCsr->pgno++;\n  return rc;\n}\n\nstatic int dbpageEof(sqlite3_vtab_cursor *pCursor){\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  return pCsr->pgno > pCsr->mxPgno;\n}\n\n/*\n** idxNum:\n**\n**     0     schema=main, full table scan\n**     1     schema=main, pgno=?1\n**     2     schema=?1, full table scan\n**     3     schema=?1, pgno=?2\n**\n** idxStr is not used\n*/\nstatic int dbpageFilter(\n  sqlite3_vtab_cursor *pCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  DbpageTable *pTab = (DbpageTable *)pCursor->pVtab;\n  int rc;\n  sqlite3 *db = pTab->db;\n  Btree *pBt;\n\n  UNUSED_PARAMETER(idxStr);\n  UNUSED_PARAMETER(argc);\n\n  /* Default setting is no rows of result */\n  pCsr->pgno = 1;\n  pCsr->mxPgno = 0;\n\n  if( idxNum & 2 ){\n    const char *zSchema;\n    assert( argc>=1 );\n    zSchema = (const char*)sqlite3_value_text(argv[0]);\n    pCsr->iDb = sqlite3FindDbName(db, zSchema);\n    if( pCsr->iDb<0 ) return SQLITE_OK;\n  }else{\n    pCsr->iDb = 0;\n  }\n  pBt = db->aDb[pCsr->iDb].pBt;\n  if( NEVER(pBt==0) ) return SQLITE_OK;\n  pCsr->pPager = sqlite3BtreePager(pBt);\n  pCsr->szPage = sqlite3BtreeGetPageSize(pBt);\n  pCsr->mxPgno = sqlite3BtreeLastPage(pBt);\n  if( idxNum & 1 ){\n    assert( argc>(idxNum>>1) );\n    pCsr->pgno = sqlite3_value_int(argv[idxNum>>1]);\n    if( pCsr->pgno<1 || pCsr->pgno>pCsr->mxPgno ){\n      pCsr->pgno = 1;\n      pCsr->mxPgno = 0;\n    }else{\n      pCsr->mxPgno = pCsr->pgno;\n    }\n  }else{\n    assert( pCsr->pgno==1 );\n  }\n  if( pCsr->pPage1 ) sqlite3PagerUnrefPageOne(pCsr->pPage1);\n  rc = sqlite3PagerGet(pCsr->pPager, 1, &pCsr->pPage1, 0);\n  return rc;\n}\n\nstatic int dbpageColumn(\n  sqlite3_vtab_cursor *pCursor,\n  sqlite3_context *ctx,\n  int i\n){\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  int rc = SQLITE_OK;\n  switch( i ){\n    case 0: {           /* pgno */\n      sqlite3_result_int64(ctx, (sqlite3_int64)pCsr->pgno);\n      break;\n    }\n    case 1: {           /* data */\n      DbPage *pDbPage = 0;\n      if( pCsr->pgno==(Pgno)((PENDING_BYTE/pCsr->szPage)+1) ){\n        /* The pending byte page. Assume it is zeroed out. Attempting to\n        ** request this page from the page is an SQLITE_CORRUPT error. */\n        sqlite3_result_zeroblob(ctx, pCsr->szPage);\n      }else{\n        rc = sqlite3PagerGet(pCsr->pPager, pCsr->pgno, (DbPage**)&pDbPage, 0);\n        if( rc==SQLITE_OK ){\n          sqlite3_result_blob(ctx, sqlite3PagerGetData(pDbPage), pCsr->szPage,\n              SQLITE_TRANSIENT);\n        }\n        sqlite3PagerUnref(pDbPage);\n      }\n      break;\n    }\n    default: {          /* schema */\n      sqlite3 *db = sqlite3_context_db_handle(ctx);\n      sqlite3_result_text(ctx, db->aDb[pCsr->iDb].zDbSName, -1, SQLITE_STATIC);\n      break;\n    }\n  }\n  return rc;\n}\n\nstatic int dbpageRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){\n  DbpageCursor *pCsr = (DbpageCursor *)pCursor;\n  *pRowid = pCsr->pgno;\n  return SQLITE_OK;\n}\n\n/*\n** Open write transactions. Since we do not know in advance which database\n** files will be written by the sqlite_dbpage virtual table, start a write\n** transaction on them all.\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise.\n*/\nstatic int dbpageBeginTrans(DbpageTable *pTab){\n  sqlite3 *db = pTab->db;\n  int rc = SQLITE_OK;\n  int i;\n  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){\n    Btree *pBt = db->aDb[i].pBt;\n    if( pBt ) rc = sqlite3BtreeBeginTrans(pBt, 1, 0);\n  }\n  return rc;\n}\n\nstatic int dbpageUpdate(\n  sqlite3_vtab *pVtab,\n  int argc,\n  sqlite3_value **argv,\n  sqlite_int64 *pRowid\n){\n  DbpageTable *pTab = (DbpageTable *)pVtab;\n  Pgno pgno;\n  DbPage *pDbPage = 0;\n  int rc = SQLITE_OK;\n  char *zErr = 0;\n  int iDb;\n  Btree *pBt;\n  Pager *pPager;\n  int szPage;\n  int isInsert;\n\n  (void)pRowid;\n  if( pTab->db->flags & SQLITE_Defensive ){\n    zErr = \"read-only\";\n    goto update_fail;\n  }\n  if( argc==1 ){\n    zErr = \"cannot delete\";\n    goto update_fail;\n  }\n  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){\n    pgno = (Pgno)sqlite3_value_int64(argv[2]);\n    isInsert = 1;\n  }else{\n    pgno = (Pgno)sqlite3_value_int64(argv[0]);\n    if( (Pgno)sqlite3_value_int(argv[1])!=pgno ){\n      zErr = \"cannot insert\";\n      goto update_fail;\n    }\n    isInsert = 0;\n  }\n  if( sqlite3_value_type(argv[4])==SQLITE_NULL ){\n    iDb = 0;\n  }else{\n    const char *zSchema = (const char*)sqlite3_value_text(argv[4]);\n    iDb = sqlite3FindDbName(pTab->db, zSchema);\n    if( iDb<0 ){\n      zErr = \"no such schema\";\n      goto update_fail;\n    }\n  }\n  pBt = pTab->db->aDb[iDb].pBt;\n  if( pgno<1 || NEVER(pBt==0) ){\n    zErr = \"bad page number\";\n    goto update_fail;\n  }\n  szPage = sqlite3BtreeGetPageSize(pBt);\n  if( sqlite3_value_type(argv[3])!=SQLITE_BLOB\n   || sqlite3_value_bytes(argv[3])!=szPage\n  ){\n    if( sqlite3_value_type(argv[3])==SQLITE_NULL && isInsert && pgno>1 ){\n      /* \"INSERT INTO dbpage($PGNO,NULL)\" causes page number $PGNO and\n      ** all subsequent pages to be deleted. */\n      pTab->iDbTrunc = iDb;\n      pTab->pgnoTrunc = pgno-1;\n      pgno = 1;\n    }else{\n      zErr = \"bad page value\";\n      goto update_fail;\n    }\n  }\n\n  if( dbpageBeginTrans(pTab)!=SQLITE_OK ){\n    zErr = \"failed to open transaction\";\n    goto update_fail;\n  }\n\n  pPager = sqlite3BtreePager(pBt);\n  rc = sqlite3PagerGet(pPager, pgno, (DbPage**)&pDbPage, 0);\n  if( rc==SQLITE_OK ){\n    const void *pData = sqlite3_value_blob(argv[3]);\n    if( (rc = sqlite3PagerWrite(pDbPage))==SQLITE_OK && pData ){\n      unsigned char *aPage = sqlite3PagerGetData(pDbPage);\n      memcpy(aPage, pData, szPage);\n      pTab->pgnoTrunc = 0;\n    }\n  }\n  if( rc!=SQLITE_OK ){\n    pTab->pgnoTrunc = 0;\n  }\n  sqlite3PagerUnref(pDbPage);\n  return rc;\n\nupdate_fail:\n  pTab->pgnoTrunc = 0;\n  sqlite3_free(pVtab->zErrMsg);\n  pVtab->zErrMsg = sqlite3_mprintf(\"%s\", zErr);\n  return SQLITE_ERROR;\n}\n\nstatic int dbpageBegin(sqlite3_vtab *pVtab){\n  DbpageTable *pTab = (DbpageTable *)pVtab;\n  pTab->pgnoTrunc = 0;\n  return SQLITE_OK;\n}\n\n/* Invoke sqlite3PagerTruncate() as necessary, just prior to COMMIT\n*/\nstatic int dbpageSync(sqlite3_vtab *pVtab){\n  DbpageTable *pTab = (DbpageTable *)pVtab;\n  if( pTab->pgnoTrunc>0 ){\n    Btree *pBt = pTab->db->aDb[pTab->iDbTrunc].pBt;\n    Pager *pPager = sqlite3BtreePager(pBt);\n    sqlite3BtreeEnter(pBt);\n    if( pTab->pgnoTrunc<sqlite3BtreeLastPage(pBt) ){\n      sqlite3PagerTruncateImage(pPager, pTab->pgnoTrunc);\n    }\n    sqlite3BtreeLeave(pBt);\n  }\n  pTab->pgnoTrunc = 0;\n  return SQLITE_OK;\n}\n\n/* Cancel any pending truncate.\n*/\nstatic int dbpageRollbackTo(sqlite3_vtab *pVtab, int notUsed1){\n  DbpageTable *pTab = (DbpageTable *)pVtab;\n  pTab->pgnoTrunc = 0;\n  (void)notUsed1;\n  return SQLITE_OK;\n}\n\n/*\n** Invoke this routine to register the \"dbpage\" virtual table module\n*/\nSQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3 *db){\n  static sqlite3_module dbpage_module = {\n    2,                            /* iVersion */\n    dbpageConnect,                /* xCreate */\n    dbpageConnect,                /* xConnect */\n    dbpageBestIndex,              /* xBestIndex */\n    dbpageDisconnect,             /* xDisconnect */\n    dbpageDisconnect,             /* xDestroy */\n    dbpageOpen,                   /* xOpen - open a cursor */\n    dbpageClose,                  /* xClose - close a cursor */\n    dbpageFilter,                 /* xFilter - configure scan constraints */\n    dbpageNext,                   /* xNext - advance a cursor */\n    dbpageEof,                    /* xEof - check for end of scan */\n    dbpageColumn,                 /* xColumn - read data */\n    dbpageRowid,                  /* xRowid - read data */\n    dbpageUpdate,                 /* xUpdate */\n    dbpageBegin,                  /* xBegin */\n    dbpageSync,                   /* xSync */\n    0,                            /* xCommit */\n    0,                            /* xRollback */\n    0,                            /* xFindMethod */\n    0,                            /* xRename */\n    0,                            /* xSavepoint */\n    0,                            /* xRelease */\n    dbpageRollbackTo,             /* xRollbackTo */\n    0,                            /* xShadowName */\n    0                             /* xIntegrity */\n  };\n  return sqlite3_create_module(db, \"sqlite_dbpage\", &dbpage_module, 0);\n}\n#elif defined(SQLITE_ENABLE_DBPAGE_VTAB)\nSQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3 *db){ return SQLITE_OK; }\n#endif /* SQLITE_ENABLE_DBSTAT_VTAB */\n\n/************** End of dbpage.c **********************************************/\n/************** Begin file carray.c ******************************************/\n/*\n** 2016-06-29\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file implements a table-valued-function that\n** returns the values in a C-language array.\n** Examples:\n**\n**      SELECT * FROM carray($ptr,5)\n**\n** The query above returns 5 integers contained in a C-language array\n** at the address $ptr.  $ptr is a pointer to the array of integers.\n** The pointer value must be assigned to $ptr using the\n** sqlite3_bind_pointer() interface with a pointer type of \"carray\".\n** For example:\n**\n**    static int aX[] = { 53, 9, 17, 2231, 4, 99 };\n**    int i = sqlite3_bind_parameter_index(pStmt, \"$ptr\");\n**    sqlite3_bind_pointer(pStmt, i, aX, \"carray\", 0);\n**\n** There is an optional third parameter to determine the datatype of\n** the C-language array.  Allowed values of the third parameter are\n** 'int32', 'int64', 'double', 'char*', 'struct iovec'.  Example:\n**\n**      SELECT * FROM carray($ptr,10,'char*');\n**\n** The default value of the third parameter is 'int32'.\n**\n** HOW IT WORKS\n**\n** The carray \"function\" is really a virtual table with the\n** following schema:\n**\n**     CREATE TABLE carray(\n**       value,\n**       pointer HIDDEN,\n**       count HIDDEN,\n**       ctype TEXT HIDDEN\n**     );\n**\n** If the hidden columns \"pointer\" and \"count\" are unconstrained, then\n** the virtual table has no rows.  Otherwise, the virtual table interprets\n** the integer value of \"pointer\" as a pointer to the array and \"count\"\n** as the number of elements in the array.  The virtual table steps through\n** the array, element by element.\n*/\n#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_CARRAY)\n/* #include \"sqliteInt.h\" */\n#if defined(_WIN32) || defined(__RTP__) || defined(_WRS_KERNEL)\n  struct iovec {\n    void *iov_base;\n    size_t iov_len;\n  };\n#else\n# include <sys/uio.h>\n#endif\n\n/*\n** Names of allowed datatypes\n*/\nstatic const char *azCarrayType[] = {\n  \"int32\", \"int64\", \"double\", \"char*\", \"struct iovec\"\n};\n\n/*\n** Structure used to hold the sqlite3_carray_bind() information\n*/\ntypedef struct carray_bind carray_bind;\nstruct carray_bind {\n  void *aData;                /* The data */\n  int nData;                  /* Number of elements */\n  int mFlags;                 /* Control flags */\n  void (*xDel)(void*);        /* Destructor for aData */\n};\n\n\n/* carray_cursor is a subclass of sqlite3_vtab_cursor which will\n** serve as the underlying representation of a cursor that scans\n** over rows of the result\n*/\ntypedef struct carray_cursor carray_cursor;\nstruct carray_cursor {\n  sqlite3_vtab_cursor base;  /* Base class - must be first */\n  sqlite3_int64 iRowid;      /* The rowid */\n  void *pPtr;                /* Pointer to the array of values */\n  sqlite3_int64 iCnt;        /* Number of integers in the array */\n  unsigned char eType;       /* One of the CARRAY_type values */\n};\n\n/*\n** The carrayConnect() method is invoked to create a new\n** carray_vtab that describes the carray virtual table.\n**\n** Think of this routine as the constructor for carray_vtab objects.\n**\n** All this routine needs to do is:\n**\n**    (1) Allocate the carray_vtab object and initialize all fields.\n**\n**    (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the\n**        result set of queries against carray will look like.\n*/\nstatic int carrayConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  sqlite3_vtab *pNew;\n  int rc;\n\n/* Column numbers */\n#define CARRAY_COLUMN_VALUE   0\n#define CARRAY_COLUMN_POINTER 1\n#define CARRAY_COLUMN_COUNT   2\n#define CARRAY_COLUMN_CTYPE   3\n\n  rc = sqlite3_declare_vtab(db,\n     \"CREATE TABLE x(value,pointer hidden,count hidden,ctype hidden)\");\n  if( rc==SQLITE_OK ){\n    pNew = *ppVtab = sqlite3_malloc( sizeof(*pNew) );\n    if( pNew==0 ) return SQLITE_NOMEM;\n    memset(pNew, 0, sizeof(*pNew));\n  }\n  return rc;\n}\n\n/*\n** This method is the destructor for carray_cursor objects.\n*/\nstatic int carrayDisconnect(sqlite3_vtab *pVtab){\n  sqlite3_free(pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** Constructor for a new carray_cursor object.\n*/\nstatic int carrayOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){\n  carray_cursor *pCur;\n  pCur = sqlite3_malloc( sizeof(*pCur) );\n  if( pCur==0 ) return SQLITE_NOMEM;\n  memset(pCur, 0, sizeof(*pCur));\n  *ppCursor = &pCur->base;\n  return SQLITE_OK;\n}\n\n/*\n** Destructor for a carray_cursor.\n*/\nstatic int carrayClose(sqlite3_vtab_cursor *cur){\n  sqlite3_free(cur);\n  return SQLITE_OK;\n}\n\n\n/*\n** Advance a carray_cursor to its next row of output.\n*/\nstatic int carrayNext(sqlite3_vtab_cursor *cur){\n  carray_cursor *pCur = (carray_cursor*)cur;\n  pCur->iRowid++;\n  return SQLITE_OK;\n}\n\n/*\n** Return values of columns for the row at which the carray_cursor\n** is currently pointing.\n*/\nstatic int carrayColumn(\n  sqlite3_vtab_cursor *cur,   /* The cursor */\n  sqlite3_context *ctx,       /* First argument to sqlite3_result_...() */\n  int i                       /* Which column to return */\n){\n  carray_cursor *pCur = (carray_cursor*)cur;\n  sqlite3_int64 x = 0;\n  switch( i ){\n    case CARRAY_COLUMN_POINTER:   return SQLITE_OK;\n    case CARRAY_COLUMN_COUNT:     x = pCur->iCnt;   break;\n    case CARRAY_COLUMN_CTYPE: {\n      sqlite3_result_text(ctx, azCarrayType[pCur->eType], -1, SQLITE_STATIC);\n      return SQLITE_OK;\n    }\n    default: {\n      switch( pCur->eType ){\n        case CARRAY_INT32: {\n          int *p = (int*)pCur->pPtr;\n          sqlite3_result_int(ctx, p[pCur->iRowid-1]);\n          return SQLITE_OK;\n        }\n        case CARRAY_INT64: {\n          sqlite3_int64 *p = (sqlite3_int64*)pCur->pPtr;\n          sqlite3_result_int64(ctx, p[pCur->iRowid-1]);\n          return SQLITE_OK;\n        }\n        case CARRAY_DOUBLE: {\n          double *p = (double*)pCur->pPtr;\n          sqlite3_result_double(ctx, p[pCur->iRowid-1]);\n          return SQLITE_OK;\n        }\n        case CARRAY_TEXT: {\n          const char **p = (const char**)pCur->pPtr;\n          sqlite3_result_text(ctx, p[pCur->iRowid-1], -1, SQLITE_TRANSIENT);\n          return SQLITE_OK;\n        }\n        default: {\n          const struct iovec *p = (struct iovec*)pCur->pPtr;\n          assert( pCur->eType==CARRAY_BLOB );\n          sqlite3_result_blob(ctx, p[pCur->iRowid-1].iov_base,\n                              (int)p[pCur->iRowid-1].iov_len, SQLITE_TRANSIENT);\n          return SQLITE_OK;\n        }\n      }\n    }\n  }\n  sqlite3_result_int64(ctx, x);\n  return SQLITE_OK;\n}\n\n/*\n** Return the rowid for the current row.  In this implementation, the\n** rowid is the same as the output value.\n*/\nstatic int carrayRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){\n  carray_cursor *pCur = (carray_cursor*)cur;\n  *pRowid = pCur->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if the cursor has been moved off of the last\n** row of output.\n*/\nstatic int carrayEof(sqlite3_vtab_cursor *cur){\n  carray_cursor *pCur = (carray_cursor*)cur;\n  return pCur->iRowid>pCur->iCnt;\n}\n\n/*\n** This method is called to \"rewind\" the carray_cursor object back\n** to the first row of output.\n*/\nstatic int carrayFilter(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  carray_cursor *pCur = (carray_cursor *)pVtabCursor;\n  pCur->pPtr = 0;\n  pCur->iCnt = 0;\n  switch( idxNum ){\n    case 1: {\n      carray_bind *pBind = sqlite3_value_pointer(argv[0], \"carray-bind\");\n      if( pBind==0 ) break;\n      pCur->pPtr = pBind->aData;\n      pCur->iCnt = pBind->nData;\n      pCur->eType = pBind->mFlags & 0x07;\n      break;\n    }\n    case 2:\n    case 3: {\n      pCur->pPtr = sqlite3_value_pointer(argv[0], \"carray\");\n      pCur->iCnt = pCur->pPtr ? sqlite3_value_int64(argv[1]) : 0;\n      if( idxNum<3 ){\n        pCur->eType = CARRAY_INT32;\n      }else{\n        unsigned char i;\n        const char *zType = (const char*)sqlite3_value_text(argv[2]);\n        for(i=0; i<sizeof(azCarrayType)/sizeof(azCarrayType[0]); i++){\n          if( sqlite3_stricmp(zType, azCarrayType[i])==0 ) break;\n        }\n        if( i>=sizeof(azCarrayType)/sizeof(azCarrayType[0]) ){\n          pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf(\n            \"unknown datatype: %Q\", zType);\n          return SQLITE_ERROR;\n        }else{\n          pCur->eType = i;\n        }\n      }\n      break;\n    }\n  }\n  pCur->iRowid = 1;\n  return SQLITE_OK;\n}\n\n/*\n** SQLite will invoke this method one or more times while planning a query\n** that uses the carray virtual table.  This routine needs to create\n** a query plan for each invocation and compute an estimated cost for that\n** plan.\n**\n** In this implementation idxNum is used to represent the\n** query plan.  idxStr is unused.\n**\n** idxNum is:\n**\n**    1    If only the pointer= constraint exists.  In this case, the\n**         parameter must be bound using sqlite3_carray_bind().\n**\n**    2    if the pointer= and count= constraints exist.\n**\n**    3    if the ctype= constraint also exists.\n**\n** idxNum is 0 otherwise and carray becomes an empty table.\n*/\nstatic int carrayBestIndex(\n  sqlite3_vtab *tab,\n  sqlite3_index_info *pIdxInfo\n){\n  int i;                 /* Loop over constraints */\n  int ptrIdx = -1;       /* Index of the pointer= constraint, or -1 if none */\n  int cntIdx = -1;       /* Index of the count= constraint, or -1 if none */\n  int ctypeIdx = -1;     /* Index of the ctype= constraint, or -1 if none */\n  unsigned seen = 0;     /* Bitmask of == constrainted columns */\n\n  const struct sqlite3_index_constraint *pConstraint;\n  pConstraint = pIdxInfo->aConstraint;\n  for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){\n    if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;\n    if( pConstraint->iColumn>=0 ) seen |= 1 << pConstraint->iColumn;\n    if( pConstraint->usable==0 ) continue;\n    switch( pConstraint->iColumn ){\n      case CARRAY_COLUMN_POINTER:\n        ptrIdx = i;\n        break;\n      case CARRAY_COLUMN_COUNT:\n        cntIdx = i;\n        break;\n      case CARRAY_COLUMN_CTYPE:\n        ctypeIdx = i;\n        break;\n    }\n  }\n  if( ptrIdx>=0 ){\n    pIdxInfo->aConstraintUsage[ptrIdx].argvIndex = 1;\n    pIdxInfo->aConstraintUsage[ptrIdx].omit = 1;\n    pIdxInfo->estimatedCost = (double)1;\n    pIdxInfo->estimatedRows = 100;\n    pIdxInfo->idxNum = 1;\n    if( cntIdx>=0 ){\n      pIdxInfo->aConstraintUsage[cntIdx].argvIndex = 2;\n      pIdxInfo->aConstraintUsage[cntIdx].omit = 1;\n      pIdxInfo->idxNum = 2;\n      if( ctypeIdx>=0 ){\n        pIdxInfo->aConstraintUsage[ctypeIdx].argvIndex = 3;\n        pIdxInfo->aConstraintUsage[ctypeIdx].omit = 1;\n        pIdxInfo->idxNum = 3;\n      }else if( seen & (1<<CARRAY_COLUMN_CTYPE) ){\n        /* In a three-argument carray(), we need to know the value of all\n        ** three arguments */\n        return SQLITE_CONSTRAINT;\n      }\n    }else if( seen & (1<<CARRAY_COLUMN_COUNT) ){\n      /* In a two-argument carray(), we need to know the value of both\n      ** arguments */\n      return SQLITE_CONSTRAINT;\n    }\n  }else{\n    pIdxInfo->estimatedCost = (double)2147483647;\n    pIdxInfo->estimatedRows = 2147483647;\n    pIdxInfo->idxNum = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This following structure defines all the methods for the\n** carray virtual table.\n*/\nstatic sqlite3_module carrayModule = {\n  0,                         /* iVersion */\n  0,                         /* xCreate */\n  carrayConnect,             /* xConnect */\n  carrayBestIndex,           /* xBestIndex */\n  carrayDisconnect,          /* xDisconnect */\n  0,                         /* xDestroy */\n  carrayOpen,                /* xOpen - open a cursor */\n  carrayClose,               /* xClose - close a cursor */\n  carrayFilter,              /* xFilter - configure scan constraints */\n  carrayNext,                /* xNext - advance a cursor */\n  carrayEof,                 /* xEof - check for end of scan */\n  carrayColumn,              /* xColumn - read data */\n  carrayRowid,               /* xRowid - read data */\n  0,                         /* xUpdate */\n  0,                         /* xBegin */\n  0,                         /* xSync */\n  0,                         /* xCommit */\n  0,                         /* xRollback */\n  0,                         /* xFindMethod */\n  0,                         /* xRename */\n  0,                         /* xSavepoint */\n  0,                         /* xRelease */\n  0,                         /* xRollbackTo */\n  0,                         /* xShadow */\n  0                          /* xIntegrity */\n};\n\n/*\n** Destructor for the carray_bind object\n*/\nstatic void carrayBindDel(void *pPtr){\n  carray_bind *p = (carray_bind*)pPtr;\n  if( p->xDel!=SQLITE_STATIC ){\n     p->xDel(p->aData);\n  }\n  sqlite3_free(p);\n}\n\n/*\n** Invoke this interface in order to bind to the single-argument\n** version of CARRAY().\n*/\nSQLITE_API int sqlite3_carray_bind(\n  sqlite3_stmt *pStmt,\n  int idx,\n  void *aData,\n  int nData,\n  int mFlags,\n  void (*xDestroy)(void*)\n){\n  carray_bind *pNew = 0;\n  int i;\n  int rc = SQLITE_OK;\n\n  /* Ensure that the mFlags value is acceptable. */\n  assert( CARRAY_INT32==0 && CARRAY_INT64==1 && CARRAY_DOUBLE==2 );\n  assert( CARRAY_TEXT==3 && CARRAY_BLOB==4 );\n  if( mFlags<CARRAY_INT32 || mFlags>CARRAY_BLOB ){\n    rc = SQLITE_ERROR;\n    goto carray_bind_error;\n  }\n\n  pNew = sqlite3_malloc64(sizeof(*pNew));\n  if( pNew==0 ){\n    rc = SQLITE_NOMEM;\n    goto carray_bind_error;\n  }\n\n  pNew->nData = nData;\n  pNew->mFlags = mFlags;\n  if( xDestroy==SQLITE_TRANSIENT ){\n    sqlite3_int64 sz = nData;\n    switch( mFlags ){\n      case CARRAY_INT32:   sz *= 4;                     break;\n      case CARRAY_INT64:   sz *= 8;                     break;\n      case CARRAY_DOUBLE:  sz *= 8;                     break;\n      case CARRAY_TEXT:    sz *= sizeof(char*);         break;\n      default:             sz *= sizeof(struct iovec);  break;\n    }\n    if( mFlags==CARRAY_TEXT ){\n      for(i=0; i<nData; i++){\n        const char *z = ((char**)aData)[i];\n        if( z ) sz += strlen(z) + 1;\n      }\n    }else if( mFlags==CARRAY_BLOB ){\n      for(i=0; i<nData; i++){\n        sz += ((struct iovec*)aData)[i].iov_len;\n      }\n    }\n\n    pNew->aData = sqlite3_malloc64( sz );\n    if( pNew->aData==0 ){\n      rc = SQLITE_NOMEM;\n      goto carray_bind_error;\n    }\n\n    if( mFlags==CARRAY_TEXT ){\n      char **az = (char**)pNew->aData;\n      char *z = (char*)&az[nData];\n      for(i=0; i<nData; i++){\n        const char *zData = ((char**)aData)[i];\n        sqlite3_int64 n;\n        if( zData==0 ){\n          az[i] = 0;\n          continue;\n        }\n        az[i] = z;\n        n = strlen(zData);\n        memcpy(z, zData, n+1);\n        z += n+1;\n      }\n    }else if( mFlags==CARRAY_BLOB ){\n      struct iovec *p = (struct iovec*)pNew->aData;\n      unsigned char *z = (unsigned char*)&p[nData];\n      for(i=0; i<nData; i++){\n        size_t n = ((struct iovec*)aData)[i].iov_len;\n        p[i].iov_len = n;\n        p[i].iov_base = z;\n        z += n;\n        memcpy(p[i].iov_base, ((struct iovec*)aData)[i].iov_base, n);\n      }\n    }else{\n      memcpy(pNew->aData, aData, sz);\n    }\n    pNew->xDel = sqlite3_free;\n  }else{\n    pNew->aData = aData;\n    pNew->xDel = xDestroy;\n  }\n  return sqlite3_bind_pointer(pStmt, idx, pNew, \"carray-bind\", carrayBindDel);\n\n carray_bind_error:\n  if( xDestroy!=SQLITE_STATIC && xDestroy!=SQLITE_TRANSIENT ){\n    xDestroy(aData);\n  }\n  sqlite3_free(pNew);\n  return rc;\n}\n\n/*\n** Invoke this routine to register the carray() function.\n*/\nSQLITE_PRIVATE Module *sqlite3CarrayRegister(sqlite3 *db){\n  return sqlite3VtabCreateModule(db, \"carray\", &carrayModule, 0, 0);\n}\n\n#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_CARRAY) */\n\n/************** End of carray.c **********************************************/\n/************** Begin file sqlite3session.c **********************************/\n\n#if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK)\n/* #include \"sqlite3session.h\" */\n/* #include <assert.h> */\n/* #include <string.h> */\n\n#ifndef SQLITE_AMALGAMATION\n/* # include \"sqliteInt.h\" */\n/* # include \"vdbeInt.h\" */\n#endif\n\ntypedef struct SessionTable SessionTable;\ntypedef struct SessionChange SessionChange;\ntypedef struct SessionBuffer SessionBuffer;\ntypedef struct SessionInput SessionInput;\n\n/*\n** Minimum chunk size used by streaming versions of functions.\n*/\n#ifndef SESSIONS_STRM_CHUNK_SIZE\n# ifdef SQLITE_TEST\n#   define SESSIONS_STRM_CHUNK_SIZE 64\n# else\n#   define SESSIONS_STRM_CHUNK_SIZE 1024\n# endif\n#endif\n\n#define SESSIONS_ROWID \"_rowid_\"\n\nstatic int sessions_strm_chunk_size = SESSIONS_STRM_CHUNK_SIZE;\n\ntypedef struct SessionHook SessionHook;\nstruct SessionHook {\n  void *pCtx;\n  int (*xOld)(void*,int,sqlite3_value**);\n  int (*xNew)(void*,int,sqlite3_value**);\n  int (*xCount)(void*);\n  int (*xDepth)(void*);\n};\n\n/*\n** Session handle structure.\n*/\nstruct sqlite3_session {\n  sqlite3 *db;                    /* Database handle session is attached to */\n  char *zDb;                      /* Name of database session is attached to */\n  int bEnableSize;                /* True if changeset_size() enabled */\n  int bEnable;                    /* True if currently recording */\n  int bIndirect;                  /* True if all changes are indirect */\n  int bAutoAttach;                /* True to auto-attach tables */\n  int bImplicitPK;                /* True to handle tables with implicit PK */\n  int rc;                         /* Non-zero if an error has occurred */\n  void *pFilterCtx;               /* First argument to pass to xTableFilter */\n  int (*xTableFilter)(void *pCtx, const char *zTab);\n  i64 nMalloc;                    /* Number of bytes of data allocated */\n  i64 nMaxChangesetSize;\n  sqlite3_value *pZeroBlob;       /* Value containing X'' */\n  sqlite3_session *pNext;         /* Next session object on same db. */\n  SessionTable *pTable;           /* List of attached tables */\n  SessionHook hook;               /* APIs to grab new and old data with */\n};\n\n/*\n** Instances of this structure are used to build strings or binary records.\n*/\nstruct SessionBuffer {\n  u8 *aBuf;                       /* Pointer to changeset buffer */\n  int nBuf;                       /* Size of buffer aBuf */\n  int nAlloc;                     /* Size of allocation containing aBuf */\n};\n\n/*\n** An object of this type is used internally as an abstraction for\n** input data. Input data may be supplied either as a single large buffer\n** (e.g. sqlite3changeset_start()) or using a stream function (e.g.\n**  sqlite3changeset_start_strm()).\n**\n** bNoDiscard:\n**   If true, then the only time data is discarded is as a result of explicit\n**   sessionDiscardData() calls. Not within every sessionInputBuffer() call.\n*/\nstruct SessionInput {\n  int bNoDiscard;                 /* If true, do not discard in InputBuffer() */\n  int iCurrent;                   /* Offset in aData[] of current change */\n  int iNext;                      /* Offset in aData[] of next change */\n  u8 *aData;                      /* Pointer to buffer containing changeset */\n  int nData;                      /* Number of bytes in aData */\n\n  SessionBuffer buf;              /* Current read buffer */\n  int (*xInput)(void*, void*, int*);        /* Input stream call (or NULL) */\n  void *pIn;                                /* First argument to xInput */\n  int bEof;                       /* Set to true after xInput finished */\n};\n\n/*\n** Structure for changeset iterators.\n*/\nstruct sqlite3_changeset_iter {\n  SessionInput in;                /* Input buffer or stream */\n  SessionBuffer tblhdr;           /* Buffer to hold apValue/zTab/abPK/ */\n  int bPatchset;                  /* True if this is a patchset */\n  int bInvert;                    /* True to invert changeset */\n  int bSkipEmpty;                 /* Skip noop UPDATE changes */\n  int rc;                         /* Iterator error code */\n  sqlite3_stmt *pConflict;        /* Points to conflicting row, if any */\n  char *zTab;                     /* Current table */\n  int nCol;                       /* Number of columns in zTab */\n  int op;                         /* Current operation */\n  int bIndirect;                  /* True if current change was indirect */\n  u8 *abPK;                       /* Primary key array */\n  sqlite3_value **apValue;        /* old.* and new.* values */\n};\n\n/*\n** Each session object maintains a set of the following structures, one\n** for each table the session object is monitoring. The structures are\n** stored in a linked list starting at sqlite3_session.pTable.\n**\n** The keys of the SessionTable.aChange[] hash table are all rows that have\n** been modified in any way since the session object was attached to the\n** table.\n**\n** The data associated with each hash-table entry is a structure containing\n** a subset of the initial values that the modified row contained at the\n** start of the session. Or no initial values if the row was inserted.\n**\n** pDfltStmt:\n**   This is only used by the sqlite3changegroup_xxx() APIs, not by\n**   regular sqlite3_session objects. It is a SELECT statement that\n**   selects the default value for each table column. For example,\n**   if the table is\n**\n**      CREATE TABLE xx(a DEFAULT 1, b, c DEFAULT 'abc')\n**\n**   then this variable is the compiled version of:\n**\n**      SELECT 1, NULL, 'abc'\n*/\nstruct SessionTable {\n  SessionTable *pNext;\n  char *zName;                    /* Local name of table */\n  int nCol;                       /* Number of non-hidden columns */\n  int nTotalCol;                  /* Number of columns including hidden */\n  int bStat1;                     /* True if this is sqlite_stat1 */\n  int bRowid;                     /* True if this table uses rowid for PK */\n  const char **azCol;             /* Column names */\n  const char **azDflt;            /* Default value expressions */\n  int *aiIdx;                     /* Index to pass to xNew/xOld */\n  u8 *abPK;                       /* Array of primary key flags */\n  int nEntry;                     /* Total number of entries in hash table */\n  int nChange;                    /* Size of apChange[] array */\n  SessionChange **apChange;       /* Hash table buckets */\n  sqlite3_stmt *pDfltStmt;\n};\n\n/*\n** RECORD FORMAT:\n**\n** The following record format is similar to (but not compatible with) that\n** used in SQLite database files. This format is used as part of the\n** change-set binary format, and so must be architecture independent.\n**\n** Unlike the SQLite database record format, each field is self-contained -\n** there is no separation of header and data. Each field begins with a\n** single byte describing its type, as follows:\n**\n**       0x00: Undefined value.\n**       0x01: Integer value.\n**       0x02: Real value.\n**       0x03: Text value.\n**       0x04: Blob value.\n**       0x05: SQL NULL value.\n**\n** Note that the above match the definitions of SQLITE_INTEGER, SQLITE_TEXT\n** and so on in sqlite3.h. For undefined and NULL values, the field consists\n** only of the single type byte. For other types of values, the type byte\n** is followed by:\n**\n**   Text values:\n**     A varint containing the number of bytes in the value (encoded using\n**     UTF-8). Followed by a buffer containing the UTF-8 representation\n**     of the text value. There is no nul terminator.\n**\n**   Blob values:\n**     A varint containing the number of bytes in the value, followed by\n**     a buffer containing the value itself.\n**\n**   Integer values:\n**     An 8-byte big-endian integer value.\n**\n**   Real values:\n**     An 8-byte big-endian IEEE 754-2008 real value.\n**\n** Varint values are encoded in the same way as varints in the SQLite\n** record format.\n**\n** CHANGESET FORMAT:\n**\n** A changeset is a collection of DELETE, UPDATE and INSERT operations on\n** one or more tables. Operations on a single table are grouped together,\n** but may occur in any order (i.e. deletes, updates and inserts are all\n** mixed together).\n**\n** Each group of changes begins with a table header:\n**\n**   1 byte: Constant 0x54 (capital 'T')\n**   Varint: Number of columns in the table.\n**   nCol bytes: 0x01 for PK columns, 0x00 otherwise.\n**   N bytes: Unqualified table name (encoded using UTF-8). Nul-terminated.\n**\n** Followed by one or more changes to the table.\n**\n**   1 byte: Either SQLITE_INSERT (0x12), UPDATE (0x17) or DELETE (0x09).\n**   1 byte: The \"indirect-change\" flag.\n**   old.* record: (delete and update only)\n**   new.* record: (insert and update only)\n**\n** The \"old.*\" and \"new.*\" records, if present, are N field records in the\n** format described above under \"RECORD FORMAT\", where N is the number of\n** columns in the table. The i'th field of each record is associated with\n** the i'th column of the table, counting from left to right in the order\n** in which columns were declared in the CREATE TABLE statement.\n**\n** The new.* record that is part of each INSERT change contains the values\n** that make up the new row. Similarly, the old.* record that is part of each\n** DELETE change contains the values that made up the row that was deleted\n** from the database. In the changeset format, the records that are part\n** of INSERT or DELETE changes never contain any undefined (type byte 0x00)\n** fields.\n**\n** Within the old.* record associated with an UPDATE change, all fields\n** associated with table columns that are not PRIMARY KEY columns and are\n** not modified by the UPDATE change are set to \"undefined\". Other fields\n** are set to the values that made up the row before the UPDATE that the\n** change records took place. Within the new.* record, fields associated\n** with table columns modified by the UPDATE change contain the new\n** values. Fields associated with table columns that are not modified\n** are set to \"undefined\".\n**\n** PATCHSET FORMAT:\n**\n** A patchset is also a collection of changes. It is similar to a changeset,\n** but leaves undefined those fields that are not useful if no conflict\n** resolution is required when applying the changeset.\n**\n** Each group of changes begins with a table header:\n**\n**   1 byte: Constant 0x50 (capital 'P')\n**   Varint: Number of columns in the table.\n**   nCol bytes: 0x01 for PK columns, 0x00 otherwise.\n**   N bytes: Unqualified table name (encoded using UTF-8). Nul-terminated.\n**\n** Followed by one or more changes to the table.\n**\n**   1 byte: Either SQLITE_INSERT (0x12), UPDATE (0x17) or DELETE (0x09).\n**   1 byte: The \"indirect-change\" flag.\n**   single record: (PK fields for DELETE, PK and modified fields for UPDATE,\n**                   full record for INSERT).\n**\n** As in the changeset format, each field of the single record that is part\n** of a patchset change is associated with the correspondingly positioned\n** table column, counting from left to right within the CREATE TABLE\n** statement.\n**\n** For a DELETE change, all fields within the record except those associated\n** with PRIMARY KEY columns are omitted. The PRIMARY KEY fields contain the\n** values identifying the row to delete.\n**\n** For an UPDATE change, all fields except those associated with PRIMARY KEY\n** columns and columns that are modified by the UPDATE are set to \"undefined\".\n** PRIMARY KEY fields contain the values identifying the table row to update,\n** and fields associated with modified columns contain the new column values.\n**\n** The records associated with INSERT changes are in the same format as for\n** changesets. It is not possible for a record associated with an INSERT\n** change to contain a field set to \"undefined\".\n**\n** REBASE BLOB FORMAT:\n**\n** A rebase blob may be output by sqlite3changeset_apply_v2() and its\n** streaming equivalent for use with the sqlite3_rebaser APIs to rebase\n** existing changesets. A rebase blob contains one entry for each conflict\n** resolved using either the OMIT or REPLACE strategies within the apply_v2()\n** call.\n**\n** The format used for a rebase blob is very similar to that used for\n** changesets. All entries related to a single table are grouped together.\n**\n** Each group of entries begins with a table header in changeset format:\n**\n**   1 byte: Constant 0x54 (capital 'T')\n**   Varint: Number of columns in the table.\n**   nCol bytes: 0x01 for PK columns, 0x00 otherwise.\n**   N bytes: Unqualified table name (encoded using UTF-8). Nul-terminated.\n**\n** Followed by one or more entries associated with the table.\n**\n**   1 byte: Either SQLITE_INSERT (0x12), DELETE (0x09).\n**   1 byte: Flag. 0x01 for REPLACE, 0x00 for OMIT.\n**   record: (in the record format defined above).\n**\n** In a rebase blob, the first field is set to SQLITE_INSERT if the change\n** that caused the conflict was an INSERT or UPDATE, or to SQLITE_DELETE if\n** it was a DELETE. The second field is set to 0x01 if the conflict\n** resolution strategy was REPLACE, or 0x00 if it was OMIT.\n**\n** If the change that caused the conflict was a DELETE, then the single\n** record is a copy of the old.* record from the original changeset. If it\n** was an INSERT, then the single record is a copy of the new.* record. If\n** the conflicting change was an UPDATE, then the single record is a copy\n** of the new.* record with the PK fields filled in based on the original\n** old.* record.\n*/\n\n/*\n** For each row modified during a session, there exists a single instance of\n** this structure stored in a SessionTable.aChange[] hash table.\n*/\nstruct SessionChange {\n  u8 op;                          /* One of UPDATE, DELETE, INSERT */\n  u8 bIndirect;                   /* True if this change is \"indirect\" */\n  u16 nRecordField;               /* Number of fields in aRecord[] */\n  int nMaxSize;                   /* Max size of eventual changeset record */\n  int nRecord;                    /* Number of bytes in buffer aRecord[] */\n  u8 *aRecord;                    /* Buffer containing old.* record */\n  SessionChange *pNext;           /* For hash-table collisions */\n};\n\n/*\n** Write a varint with value iVal into the buffer at aBuf. Return the\n** number of bytes written.\n*/\nstatic int sessionVarintPut(u8 *aBuf, int iVal){\n  return putVarint32(aBuf, iVal);\n}\n\n/*\n** Return the number of bytes required to store value iVal as a varint.\n*/\nstatic int sessionVarintLen(int iVal){\n  return sqlite3VarintLen(iVal);\n}\n\n/*\n** Read a varint value from aBuf[] into *piVal. Return the number of\n** bytes read.\n*/\nstatic int sessionVarintGet(const u8 *aBuf, int *piVal){\n  return getVarint32(aBuf, *piVal);\n}\n\n/* Load an unaligned and unsigned 32-bit integer */\n#define SESSION_UINT32(x) (((u32)(x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])\n\n/*\n** Read a 64-bit big-endian integer value from buffer aRec[]. Return\n** the value read.\n*/\nstatic sqlite3_int64 sessionGetI64(u8 *aRec){\n  u64 x = SESSION_UINT32(aRec);\n  u32 y = SESSION_UINT32(aRec+4);\n  x = (x<<32) + y;\n  return (sqlite3_int64)x;\n}\n\n/*\n** Write a 64-bit big-endian integer value to the buffer aBuf[].\n*/\nstatic void sessionPutI64(u8 *aBuf, sqlite3_int64 i){\n  aBuf[0] = (i>>56) & 0xFF;\n  aBuf[1] = (i>>48) & 0xFF;\n  aBuf[2] = (i>>40) & 0xFF;\n  aBuf[3] = (i>>32) & 0xFF;\n  aBuf[4] = (i>>24) & 0xFF;\n  aBuf[5] = (i>>16) & 0xFF;\n  aBuf[6] = (i>> 8) & 0xFF;\n  aBuf[7] = (i>> 0) & 0xFF;\n}\n\n/*\n** This function is used to serialize the contents of value pValue (see\n** comment titled \"RECORD FORMAT\" above).\n**\n** If it is non-NULL, the serialized form of the value is written to\n** buffer aBuf. *pnWrite is set to the number of bytes written before\n** returning. Or, if aBuf is NULL, the only thing this function does is\n** set *pnWrite.\n**\n** If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs\n** within a call to sqlite3_value_text() (may fail if the db is utf-16))\n** SQLITE_NOMEM is returned.\n*/\nstatic int sessionSerializeValue(\n  u8 *aBuf,                       /* If non-NULL, write serialized value here */\n  sqlite3_value *pValue,          /* Value to serialize */\n  sqlite3_int64 *pnWrite          /* IN/OUT: Increment by bytes written */\n){\n  int nByte;                      /* Size of serialized value in bytes */\n\n  if( pValue ){\n    int eType;                    /* Value type (SQLITE_NULL, TEXT etc.) */\n\n    eType = sqlite3_value_type(pValue);\n    if( aBuf ) aBuf[0] = eType;\n\n    switch( eType ){\n      case SQLITE_NULL:\n        nByte = 1;\n        break;\n\n      case SQLITE_INTEGER:\n      case SQLITE_FLOAT:\n        if( aBuf ){\n          /* TODO: SQLite does something special to deal with mixed-endian\n          ** floating point values (e.g. ARM7). This code probably should\n          ** too.  */\n          u64 i;\n          if( eType==SQLITE_INTEGER ){\n            i = (u64)sqlite3_value_int64(pValue);\n          }else{\n            double r;\n            assert( sizeof(double)==8 && sizeof(u64)==8 );\n            r = sqlite3_value_double(pValue);\n            memcpy(&i, &r, 8);\n          }\n          sessionPutI64(&aBuf[1], i);\n        }\n        nByte = 9;\n        break;\n\n      default: {\n        u8 *z;\n        int n;\n        int nVarint;\n\n        assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );\n        if( eType==SQLITE_TEXT ){\n          z = (u8 *)sqlite3_value_text(pValue);\n        }else{\n          z = (u8 *)sqlite3_value_blob(pValue);\n        }\n        n = sqlite3_value_bytes(pValue);\n        if( z==0 && (eType!=SQLITE_BLOB || n>0) ) return SQLITE_NOMEM;\n        nVarint = sessionVarintLen(n);\n\n        if( aBuf ){\n          sessionVarintPut(&aBuf[1], n);\n          if( n>0 ) memcpy(&aBuf[nVarint + 1], z, n);\n        }\n\n        nByte = 1 + nVarint + n;\n        break;\n      }\n    }\n  }else{\n    nByte = 1;\n    if( aBuf ) aBuf[0] = '\\0';\n  }\n\n  if( pnWrite ) *pnWrite += nByte;\n  return SQLITE_OK;\n}\n\n/*\n** Allocate and return a pointer to a buffer nByte bytes in size. If\n** pSession is not NULL, increase the sqlite3_session.nMalloc variable\n** by the number of bytes allocated.\n*/\nstatic void *sessionMalloc64(sqlite3_session *pSession, i64 nByte){\n  void *pRet = sqlite3_malloc64(nByte);\n  if( pSession ) pSession->nMalloc += sqlite3_msize(pRet);\n  return pRet;\n}\n\n/*\n** Free buffer pFree, which must have been allocated by an earlier\n** call to sessionMalloc64(). If pSession is not NULL, decrease the\n** sqlite3_session.nMalloc counter by the number of bytes freed.\n*/\nstatic void sessionFree(sqlite3_session *pSession, void *pFree){\n  if( pSession ) pSession->nMalloc -= sqlite3_msize(pFree);\n  sqlite3_free(pFree);\n}\n\n/*\n** This macro is used to calculate hash key values for data structures. In\n** order to use this macro, the entire data structure must be represented\n** as a series of unsigned integers. In order to calculate a hash-key value\n** for a data structure represented as three such integers, the macro may\n** then be used as follows:\n**\n**    int hash_key_value;\n**    hash_key_value = HASH_APPEND(0, <value 1>);\n**    hash_key_value = HASH_APPEND(hash_key_value, <value 2>);\n**    hash_key_value = HASH_APPEND(hash_key_value, <value 3>);\n**\n** In practice, the data structures this macro is used for are the primary\n** key values of modified rows.\n*/\n#define HASH_APPEND(hash, add) ((hash) << 3) ^ (hash) ^ (unsigned int)(add)\n\n/*\n** Append the hash of the 64-bit integer passed as the second argument to the\n** hash-key value passed as the first. Return the new hash-key value.\n*/\nstatic unsigned int sessionHashAppendI64(unsigned int h, i64 i){\n  h = HASH_APPEND(h, i & 0xFFFFFFFF);\n  return HASH_APPEND(h, (i>>32)&0xFFFFFFFF);\n}\n\n/*\n** Append the hash of the blob passed via the second and third arguments to\n** the hash-key value passed as the first. Return the new hash-key value.\n*/\nstatic unsigned int sessionHashAppendBlob(unsigned int h, int n, const u8 *z){\n  int i;\n  for(i=0; i<n; i++) h = HASH_APPEND(h, z[i]);\n  return h;\n}\n\n/*\n** Append the hash of the data type passed as the second argument to the\n** hash-key value passed as the first. Return the new hash-key value.\n*/\nstatic unsigned int sessionHashAppendType(unsigned int h, int eType){\n  return HASH_APPEND(h, eType);\n}\n\n/*\n** This function may only be called from within a pre-update callback.\n** It calculates a hash based on the primary key values of the old.* or\n** new.* row currently available and, assuming no error occurs, writes it to\n** *piHash before returning. If the primary key contains one or more NULL\n** values, *pbNullPK is set to true before returning.\n**\n** If an error occurs, an SQLite error code is returned and the final values\n** of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned\n** and the output variables are set as described above.\n*/\nstatic int sessionPreupdateHash(\n  sqlite3_session *pSession,      /* Session object that owns pTab */\n  i64 iRowid,\n  SessionTable *pTab,             /* Session table handle */\n  int bNew,                       /* True to hash the new.* PK */\n  int *piHash,                    /* OUT: Hash value */\n  int *pbNullPK                   /* OUT: True if there are NULL values in PK */\n){\n  unsigned int h = 0;             /* Hash value to return */\n  int i;                          /* Used to iterate through columns */\n\n  assert( pTab->nTotalCol==pSession->hook.xCount(pSession->hook.pCtx) );\n  if( pTab->bRowid ){\n    h = sessionHashAppendI64(h, iRowid);\n  }else{\n    assert( *pbNullPK==0 );\n    for(i=0; i<pTab->nCol; i++){\n      if( pTab->abPK[i] ){\n        int rc;\n        int eType;\n        sqlite3_value *pVal;\n        int iIdx = pTab->aiIdx[i];\n\n        if( bNew ){\n          rc = pSession->hook.xNew(pSession->hook.pCtx, iIdx, &pVal);\n        }else{\n          rc = pSession->hook.xOld(pSession->hook.pCtx, iIdx, &pVal);\n        }\n        if( rc!=SQLITE_OK ) return rc;\n\n        eType = sqlite3_value_type(pVal);\n        h = sessionHashAppendType(h, eType);\n        if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n          i64 iVal;\n          if( eType==SQLITE_INTEGER ){\n            iVal = sqlite3_value_int64(pVal);\n          }else{\n            double rVal = sqlite3_value_double(pVal);\n            assert( sizeof(iVal)==8 && sizeof(rVal)==8 );\n            memcpy(&iVal, &rVal, 8);\n          }\n          h = sessionHashAppendI64(h, iVal);\n        }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){\n          const u8 *z;\n          int n;\n          if( eType==SQLITE_TEXT ){\n            z = (const u8 *)sqlite3_value_text(pVal);\n          }else{\n            z = (const u8 *)sqlite3_value_blob(pVal);\n          }\n          n = sqlite3_value_bytes(pVal);\n          if( !z && (eType!=SQLITE_BLOB || n>0) ) return SQLITE_NOMEM;\n          h = sessionHashAppendBlob(h, n, z);\n        }else{\n          assert( eType==SQLITE_NULL );\n          assert( pTab->bStat1==0 || i!=1 );\n          *pbNullPK = 1;\n        }\n      }\n    }\n  }\n\n  *piHash = (h % pTab->nChange);\n  return SQLITE_OK;\n}\n\n/*\n** The buffer that the argument points to contains a serialized SQL value.\n** Return the number of bytes of space occupied by the value (including\n** the type byte).\n*/\nstatic int sessionSerialLen(const u8 *a){\n  int e;\n  int n;\n  assert( a!=0 );\n  e = *a;\n  if( e==0 || e==0xFF ) return 1;\n  if( e==SQLITE_NULL ) return 1;\n  if( e==SQLITE_INTEGER || e==SQLITE_FLOAT ) return 9;\n  return sessionVarintGet(&a[1], &n) + 1 + n;\n}\n\n/*\n** Based on the primary key values stored in change aRecord, calculate a\n** hash key. Assume the has table has nBucket buckets. The hash keys\n** calculated by this function are compatible with those calculated by\n** sessionPreupdateHash().\n**\n** The bPkOnly argument is non-zero if the record at aRecord[] is from\n** a patchset DELETE. In this case the non-PK fields are omitted entirely.\n*/\nstatic unsigned int sessionChangeHash(\n  SessionTable *pTab,             /* Table handle */\n  int bPkOnly,                    /* Record consists of PK fields only */\n  u8 *aRecord,                    /* Change record */\n  int nBucket                     /* Assume this many buckets in hash table */\n){\n  unsigned int h = 0;             /* Value to return */\n  int i;                          /* Used to iterate through columns */\n  u8 *a = aRecord;                /* Used to iterate through change record */\n\n  for(i=0; i<pTab->nCol; i++){\n    int eType = *a;\n    int isPK = pTab->abPK[i];\n    if( bPkOnly && isPK==0 ) continue;\n\n    /* It is not possible for eType to be SQLITE_NULL here. The session\n    ** module does not record changes for rows with NULL values stored in\n    ** primary key columns. */\n    assert( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT\n         || eType==SQLITE_TEXT || eType==SQLITE_BLOB\n         || eType==SQLITE_NULL || eType==0\n    );\n    assert( !isPK || (eType!=0 && eType!=SQLITE_NULL) );\n\n    if( isPK ){\n      a++;\n      h = sessionHashAppendType(h, eType);\n      if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n        h = sessionHashAppendI64(h, sessionGetI64(a));\n        a += 8;\n      }else{\n        int n;\n        a += sessionVarintGet(a, &n);\n        h = sessionHashAppendBlob(h, n, a);\n        a += n;\n      }\n    }else{\n      a += sessionSerialLen(a);\n    }\n  }\n  return (h % nBucket);\n}\n\n/*\n** Arguments aLeft and aRight are pointers to change records for table pTab.\n** This function returns true if the two records apply to the same row (i.e.\n** have the same values stored in the primary key columns), or false\n** otherwise.\n*/\nstatic int sessionChangeEqual(\n  SessionTable *pTab,             /* Table used for PK definition */\n  int bLeftPkOnly,                /* True if aLeft[] contains PK fields only */\n  u8 *aLeft,                      /* Change record */\n  int bRightPkOnly,               /* True if aRight[] contains PK fields only */\n  u8 *aRight                      /* Change record */\n){\n  u8 *a1 = aLeft;                 /* Cursor to iterate through aLeft */\n  u8 *a2 = aRight;                /* Cursor to iterate through aRight */\n  int iCol;                       /* Used to iterate through table columns */\n\n  for(iCol=0; iCol<pTab->nCol; iCol++){\n    if( pTab->abPK[iCol] ){\n      int n1 = sessionSerialLen(a1);\n      int n2 = sessionSerialLen(a2);\n\n      if( n1!=n2 || memcmp(a1, a2, n1) ){\n        return 0;\n      }\n      a1 += n1;\n      a2 += n2;\n    }else{\n      if( bLeftPkOnly==0 ) a1 += sessionSerialLen(a1);\n      if( bRightPkOnly==0 ) a2 += sessionSerialLen(a2);\n    }\n  }\n\n  return 1;\n}\n\n/*\n** Arguments aLeft and aRight both point to buffers containing change\n** records with nCol columns. This function \"merges\" the two records into\n** a single records which is written to the buffer at *paOut. *paOut is\n** then set to point to one byte after the last byte written before\n** returning.\n**\n** The merging of records is done as follows: For each column, if the\n** aRight record contains a value for the column, copy the value from\n** their. Otherwise, if aLeft contains a value, copy it. If neither\n** record contains a value for a given column, then neither does the\n** output record.\n*/\nstatic void sessionMergeRecord(\n  u8 **paOut,\n  int nCol,\n  u8 *aLeft,\n  u8 *aRight\n){\n  u8 *a1 = aLeft;                 /* Cursor used to iterate through aLeft */\n  u8 *a2 = aRight;                /* Cursor used to iterate through aRight */\n  u8 *aOut = *paOut;              /* Output cursor */\n  int iCol;                       /* Used to iterate from 0 to nCol */\n\n  for(iCol=0; iCol<nCol; iCol++){\n    int n1 = sessionSerialLen(a1);\n    int n2 = sessionSerialLen(a2);\n    if( *a2 ){\n      memcpy(aOut, a2, n2);\n      aOut += n2;\n    }else{\n      memcpy(aOut, a1, n1);\n      aOut += n1;\n    }\n    a1 += n1;\n    a2 += n2;\n  }\n\n  *paOut = aOut;\n}\n\n/*\n** This is a helper function used by sessionMergeUpdate().\n**\n** When this function is called, both *paOne and *paTwo point to a value\n** within a change record. Before it returns, both have been advanced so\n** as to point to the next value in the record.\n**\n** If, when this function is called, *paTwo points to a valid value (i.e.\n** *paTwo[0] is not 0x00 - the \"no value\" placeholder), a copy of the *paTwo\n** pointer is returned and *pnVal is set to the number of bytes in the\n** serialized value. Otherwise, a copy of *paOne is returned and *pnVal\n** set to the number of bytes in the value at *paOne. If *paOne points\n** to the \"no value\" placeholder, *pnVal is set to 1. In other words:\n**\n**   if( *paTwo is valid ) return *paTwo;\n**   return *paOne;\n**\n*/\nstatic u8 *sessionMergeValue(\n  u8 **paOne,                     /* IN/OUT: Left-hand buffer pointer */\n  u8 **paTwo,                     /* IN/OUT: Right-hand buffer pointer */\n  int *pnVal                      /* OUT: Bytes in returned value */\n){\n  u8 *a1 = *paOne;\n  u8 *a2 = *paTwo;\n  u8 *pRet = 0;\n  int n1;\n\n  assert( a1 );\n  if( a2 ){\n    int n2 = sessionSerialLen(a2);\n    if( *a2 ){\n      *pnVal = n2;\n      pRet = a2;\n    }\n    *paTwo = &a2[n2];\n  }\n\n  n1 = sessionSerialLen(a1);\n  if( pRet==0 ){\n    *pnVal = n1;\n    pRet = a1;\n  }\n  *paOne = &a1[n1];\n\n  return pRet;\n}\n\n/*\n** This function is used by changeset_concat() to merge two UPDATE changes\n** on the same row.\n*/\nstatic int sessionMergeUpdate(\n  u8 **paOut,                     /* IN/OUT: Pointer to output buffer */\n  SessionTable *pTab,             /* Table change pertains to */\n  int bPatchset,                  /* True if records are patchset records */\n  u8 *aOldRecord1,                /* old.* record for first change */\n  u8 *aOldRecord2,                /* old.* record for second change */\n  u8 *aNewRecord1,                /* new.* record for first change */\n  u8 *aNewRecord2                 /* new.* record for second change */\n){\n  u8 *aOld1 = aOldRecord1;\n  u8 *aOld2 = aOldRecord2;\n  u8 *aNew1 = aNewRecord1;\n  u8 *aNew2 = aNewRecord2;\n\n  u8 *aOut = *paOut;\n  int i;\n\n  if( bPatchset==0 ){\n    int bRequired = 0;\n\n    assert( aOldRecord1 && aNewRecord1 );\n\n    /* Write the old.* vector first. */\n    for(i=0; i<pTab->nCol; i++){\n      int nOld;\n      u8 *aOld;\n      int nNew;\n      u8 *aNew;\n\n      aOld = sessionMergeValue(&aOld1, &aOld2, &nOld);\n      aNew = sessionMergeValue(&aNew1, &aNew2, &nNew);\n      if( pTab->abPK[i] || nOld!=nNew || memcmp(aOld, aNew, nNew) ){\n        if( pTab->abPK[i]==0 ) bRequired = 1;\n        memcpy(aOut, aOld, nOld);\n        aOut += nOld;\n      }else{\n        *(aOut++) = '\\0';\n      }\n    }\n\n    if( !bRequired ) return 0;\n  }\n\n  /* Write the new.* vector */\n  aOld1 = aOldRecord1;\n  aOld2 = aOldRecord2;\n  aNew1 = aNewRecord1;\n  aNew2 = aNewRecord2;\n  for(i=0; i<pTab->nCol; i++){\n    int nOld;\n    u8 *aOld;\n    int nNew;\n    u8 *aNew;\n\n    aOld = sessionMergeValue(&aOld1, &aOld2, &nOld);\n    aNew = sessionMergeValue(&aNew1, &aNew2, &nNew);\n    if( bPatchset==0\n     && (pTab->abPK[i] || (nOld==nNew && 0==memcmp(aOld, aNew, nNew)))\n    ){\n      *(aOut++) = '\\0';\n    }else{\n      memcpy(aOut, aNew, nNew);\n      aOut += nNew;\n    }\n  }\n\n  *paOut = aOut;\n  return 1;\n}\n\n/*\n** This function is only called from within a pre-update-hook callback.\n** It determines if the current pre-update-hook change affects the same row\n** as the change stored in argument pChange. If so, it returns true. Otherwise\n** if the pre-update-hook does not affect the same row as pChange, it returns\n** false.\n*/\nstatic int sessionPreupdateEqual(\n  sqlite3_session *pSession,      /* Session object that owns SessionTable */\n  i64 iRowid,                     /* Rowid value if pTab->bRowid */\n  SessionTable *pTab,             /* Table associated with change */\n  SessionChange *pChange,         /* Change to compare to */\n  int op                          /* Current pre-update operation */\n){\n  int iCol;                       /* Used to iterate through columns */\n  u8 *a = pChange->aRecord;       /* Cursor used to scan change record */\n\n  if( pTab->bRowid ){\n    if( a[0]!=SQLITE_INTEGER ) return 0;\n    return sessionGetI64(&a[1])==iRowid;\n  }\n\n  assert( op==SQLITE_INSERT || op==SQLITE_UPDATE || op==SQLITE_DELETE );\n  for(iCol=0; iCol<pTab->nCol; iCol++){\n    if( !pTab->abPK[iCol] ){\n      a += sessionSerialLen(a);\n    }else{\n      sqlite3_value *pVal;        /* Value returned by preupdate_new/old */\n      int rc;                     /* Error code from preupdate_new/old */\n      int eType = *a++;           /* Type of value from change record */\n      int iIdx = pTab->aiIdx[iCol];\n\n      /* The following calls to preupdate_new() and preupdate_old() can not\n      ** fail. This is because they cache their return values, and by the\n      ** time control flows to here they have already been called once from\n      ** within sessionPreupdateHash(). The first two asserts below verify\n      ** this (that the method has already been called). */\n      if( op==SQLITE_INSERT ){\n        /* assert( db->pPreUpdate->pNewUnpacked || db->pPreUpdate->aNew ); */\n        rc = pSession->hook.xNew(pSession->hook.pCtx, iIdx, &pVal);\n      }else{\n        /* assert( db->pPreUpdate->pUnpacked ); */\n        rc = pSession->hook.xOld(pSession->hook.pCtx, iIdx, &pVal);\n      }\n      assert( rc==SQLITE_OK );\n      (void)rc;                   /* Suppress warning about unused variable */\n      if( sqlite3_value_type(pVal)!=eType ) return 0;\n\n      /* A SessionChange object never has a NULL value in a PK column */\n      assert( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT\n           || eType==SQLITE_BLOB    || eType==SQLITE_TEXT\n      );\n\n      if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n        i64 iVal = sessionGetI64(a);\n        a += 8;\n        if( eType==SQLITE_INTEGER ){\n          if( sqlite3_value_int64(pVal)!=iVal ) return 0;\n        }else{\n          double rVal;\n          assert( sizeof(iVal)==8 && sizeof(rVal)==8 );\n          memcpy(&rVal, &iVal, 8);\n          if( sqlite3_value_double(pVal)!=rVal ) return 0;\n        }\n      }else{\n        int n;\n        const u8 *z;\n        a += sessionVarintGet(a, &n);\n        if( sqlite3_value_bytes(pVal)!=n ) return 0;\n        if( eType==SQLITE_TEXT ){\n          z = sqlite3_value_text(pVal);\n        }else{\n          z = sqlite3_value_blob(pVal);\n        }\n        if( n>0 && memcmp(a, z, n) ) return 0;\n        a += n;\n      }\n    }\n  }\n\n  return 1;\n}\n\n/*\n** If required, grow the hash table used to store changes on table pTab\n** (part of the session pSession). If a fatal OOM error occurs, set the\n** session object to failed and return SQLITE_ERROR. Otherwise, return\n** SQLITE_OK.\n**\n** It is possible that a non-fatal OOM error occurs in this function. In\n** that case the hash-table does not grow, but SQLITE_OK is returned anyway.\n** Growing the hash table in this case is a performance optimization only,\n** it is not required for correct operation.\n*/\nstatic int sessionGrowHash(\n  sqlite3_session *pSession,      /* For memory accounting. May be NULL */\n  int bPatchset,\n  SessionTable *pTab\n){\n  if( pTab->nChange==0 || pTab->nEntry>=(pTab->nChange/2) ){\n    int i;\n    SessionChange **apNew;\n    sqlite3_int64 nNew = 2*(sqlite3_int64)(pTab->nChange ? pTab->nChange : 128);\n\n    apNew = (SessionChange**)sessionMalloc64(\n        pSession, sizeof(SessionChange*) * nNew\n    );\n    if( apNew==0 ){\n      if( pTab->nChange==0 ){\n        return SQLITE_ERROR;\n      }\n      return SQLITE_OK;\n    }\n    memset(apNew, 0, sizeof(SessionChange *) * nNew);\n\n    for(i=0; i<pTab->nChange; i++){\n      SessionChange *p;\n      SessionChange *pNext;\n      for(p=pTab->apChange[i]; p; p=pNext){\n        int bPkOnly = (p->op==SQLITE_DELETE && bPatchset);\n        int iHash = sessionChangeHash(pTab, bPkOnly, p->aRecord, nNew);\n        pNext = p->pNext;\n        p->pNext = apNew[iHash];\n        apNew[iHash] = p;\n      }\n    }\n\n    sessionFree(pSession, pTab->apChange);\n    pTab->nChange = nNew;\n    pTab->apChange = apNew;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** This function queries the database for the names of the columns of table\n** zThis, in schema zDb.\n**\n** Otherwise, if they are not NULL, variable *pnCol is set to the number\n** of columns in the database table and variable *pzTab is set to point to a\n** nul-terminated copy of the table name. *pazCol (if not NULL) is set to\n** point to an array of pointers to column names. And *pabPK (again, if not\n** NULL) is set to point to an array of booleans - true if the corresponding\n** column is part of the primary key.\n**\n** For example, if the table is declared as:\n**\n**     CREATE TABLE tbl1(w, x DEFAULT 'abc', y, z, PRIMARY KEY(w, z));\n**\n** Then the five output variables are populated as follows:\n**\n**     *pnCol  = 4\n**     *pzTab  = \"tbl1\"\n**     *pazCol = {\"w\", \"x\", \"y\", \"z\"}\n**     *pazDflt = {NULL, 'abc', NULL, NULL}\n**     *pabPK  = {1, 0, 0, 1}\n**\n** All returned buffers are part of the same single allocation, which must\n** be freed using sqlite3_free() by the caller\n*/\nstatic int sessionTableInfo(\n  sqlite3_session *pSession,      /* For memory accounting. May be NULL */\n  sqlite3 *db,                    /* Database connection */\n  const char *zDb,                /* Name of attached database (e.g. \"main\") */\n  const char *zThis,              /* Table name */\n  int *pnCol,                     /* OUT: number of columns */\n  int *pnTotalCol,                /* OUT: number of hidden columns */\n  const char **pzTab,             /* OUT: Copy of zThis */\n  const char ***pazCol,           /* OUT: Array of column names for table */\n  const char ***pazDflt,          /* OUT: Array of default value expressions */\n  int **paiIdx,                   /* OUT: Array of xNew/xOld indexes */\n  u8 **pabPK,                     /* OUT: Array of booleans - true for PK col */\n  int *pbRowid                    /* OUT: True if only PK is a rowid */\n){\n  char *zPragma;\n  sqlite3_stmt *pStmt;\n  int rc;\n  sqlite3_int64 nByte;\n  int nDbCol = 0;\n  int nThis;\n  int i;\n  u8 *pAlloc = 0;\n  char **azCol = 0;\n  char **azDflt = 0;\n  u8 *abPK = 0;\n  int *aiIdx = 0;\n  int bRowid = 0;                 /* Set to true to use rowid as PK */\n\n  assert( pazCol && pabPK );\n\n  *pazCol = 0;\n  *pabPK = 0;\n  *pnCol = 0;\n  if( pnTotalCol ) *pnTotalCol = 0;\n  if( paiIdx ) *paiIdx = 0;\n  if( pzTab ) *pzTab = 0;\n  if( pazDflt ) *pazDflt = 0;\n\n  nThis = sqlite3Strlen30(zThis);\n  if( nThis==12 && 0==sqlite3_stricmp(\"sqlite_stat1\", zThis) ){\n    rc = sqlite3_table_column_metadata(db, zDb, zThis, 0, 0, 0, 0, 0, 0);\n    if( rc==SQLITE_OK ){\n      /* For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. */\n      zPragma = sqlite3_mprintf(\n          \"SELECT 0, 'tbl',  '', 0, '', 1, 0     UNION ALL \"\n          \"SELECT 1, 'idx',  '', 0, '', 2, 0     UNION ALL \"\n          \"SELECT 2, 'stat', '', 0, '', 0, 0\"\n      );\n    }else if( rc==SQLITE_ERROR ){\n      zPragma = sqlite3_mprintf(\"\");\n    }else{\n      return rc;\n    }\n  }else{\n    zPragma = sqlite3_mprintf(\"PRAGMA '%q'.table_xinfo('%q')\", zDb, zThis);\n  }\n  if( !zPragma ){\n    return SQLITE_NOMEM;\n  }\n\n  rc = sqlite3_prepare_v2(db, zPragma, -1, &pStmt, 0);\n  sqlite3_free(zPragma);\n  if( rc!=SQLITE_OK ){\n    return rc;\n  }\n\n  nByte = nThis + 1;\n  bRowid = (pbRowid!=0);\n  while( SQLITE_ROW==sqlite3_step(pStmt) ){\n    nByte += sqlite3_column_bytes(pStmt, 1);          /* name */\n    nByte += sqlite3_column_bytes(pStmt, 4);          /* dflt_value */\n    if( sqlite3_column_int(pStmt, 6)==0 ){            /* !hidden */\n      nDbCol++;\n    }\n    if( sqlite3_column_int(pStmt, 5) ) bRowid = 0;    /* pk */\n  }\n  if( nDbCol==0 ) bRowid = 0;\n  nDbCol += bRowid;\n  nByte += strlen(SESSIONS_ROWID);\n  rc = sqlite3_reset(pStmt);\n\n  if( rc==SQLITE_OK ){\n    nByte += nDbCol * (sizeof(const char *)*2 +sizeof(int)+sizeof(u8) + 1 + 1);\n    pAlloc = sessionMalloc64(pSession, nByte);\n    if( pAlloc==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(pAlloc, 0, nByte);\n    }\n  }\n  if( rc==SQLITE_OK ){\n    azCol = (char **)pAlloc;\n    azDflt = (char**)&azCol[nDbCol];\n    aiIdx = (int*)&azDflt[nDbCol];\n    abPK = (u8 *)&aiIdx[nDbCol];\n    pAlloc = &abPK[nDbCol];\n    if( pzTab ){\n      memcpy(pAlloc, zThis, nThis+1);\n      *pzTab = (char *)pAlloc;\n      pAlloc += nThis+1;\n    }\n\n    i = 0;\n    if( bRowid ){\n      size_t nName = strlen(SESSIONS_ROWID);\n      memcpy(pAlloc, SESSIONS_ROWID, nName+1);\n      azCol[i] = (char*)pAlloc;\n      pAlloc += nName+1;\n      abPK[i] = 1;\n      aiIdx[i] = -1;\n      i++;\n    }\n    while( SQLITE_ROW==sqlite3_step(pStmt) ){\n      if( sqlite3_column_int(pStmt, 6)==0 ){            /* !hidden */\n        int nName = sqlite3_column_bytes(pStmt, 1);\n        int nDflt = sqlite3_column_bytes(pStmt, 4);\n        const unsigned char *zName = sqlite3_column_text(pStmt, 1);\n        const unsigned char *zDflt = sqlite3_column_text(pStmt, 4);\n\n        if( zName==0 ) break;\n        memcpy(pAlloc, zName, nName+1);\n        azCol[i] = (char *)pAlloc;\n        pAlloc += nName+1;\n        if( zDflt ){\n          memcpy(pAlloc, zDflt, nDflt+1);\n          azDflt[i] = (char *)pAlloc;\n          pAlloc += nDflt+1;\n        }else{\n          azDflt[i] = 0;\n        }\n        abPK[i] = sqlite3_column_int(pStmt, 5);\n        aiIdx[i] = sqlite3_column_int(pStmt, 0);\n        i++;\n      }\n      if( pnTotalCol ) (*pnTotalCol)++;\n    }\n    rc = sqlite3_reset(pStmt);\n  }\n\n  /* If successful, populate the output variables. Otherwise, zero them and\n  ** free any allocation made. An error code will be returned in this case.\n  */\n  if( rc==SQLITE_OK ){\n    *pazCol = (const char**)azCol;\n    if( pazDflt ) *pazDflt = (const char**)azDflt;\n    *pabPK = abPK;\n    *pnCol = nDbCol;\n    if( paiIdx ) *paiIdx = aiIdx;\n  }else{\n    sessionFree(pSession, azCol);\n  }\n  if( pbRowid ) *pbRowid = bRowid;\n  sqlite3_finalize(pStmt);\n  return rc;\n}\n\n/*\n** This function is called to initialize the SessionTable.nCol, azCol[]\n** abPK[] and azDflt[] members of SessionTable object pTab. If these\n** fields are already initialized, this function is a no-op.\n**\n** If an error occurs, an error code is stored in sqlite3_session.rc and\n** non-zero returned. Or, if no error occurs but the table has no primary\n** key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to\n** indicate that updates on this table should be ignored. SessionTable.abPK\n** is set to NULL in this case.\n*/\nstatic int sessionInitTable(\n  sqlite3_session *pSession,      /* Optional session handle */\n  SessionTable *pTab,             /* Table object to initialize */\n  sqlite3 *db,                    /* Database handle to read schema from */\n  const char *zDb                 /* Name of db - \"main\", \"temp\" etc. */\n){\n  int rc = SQLITE_OK;\n\n  if( pTab->nCol==0 ){\n    u8 *abPK;\n    assert( pTab->azCol==0 || pTab->abPK==0 );\n    sqlite3_free(pTab->azCol);\n    pTab->abPK = 0;\n    rc = sessionTableInfo(pSession, db, zDb,\n        pTab->zName, &pTab->nCol, &pTab->nTotalCol, 0, &pTab->azCol,\n        &pTab->azDflt, &pTab->aiIdx, &abPK,\n        ((pSession==0 || pSession->bImplicitPK) ? &pTab->bRowid : 0)\n    );\n    if( rc==SQLITE_OK ){\n      int i;\n      for(i=0; i<pTab->nCol; i++){\n        if( abPK[i] ){\n          pTab->abPK = abPK;\n          break;\n        }\n      }\n      if( 0==sqlite3_stricmp(\"sqlite_stat1\", pTab->zName) ){\n        pTab->bStat1 = 1;\n      }\n\n      if( pSession && pSession->bEnableSize ){\n        pSession->nMaxChangesetSize += (\n          1 + sessionVarintLen(pTab->nCol) + pTab->nCol + strlen(pTab->zName)+1\n        );\n      }\n    }\n  }\n\n  if( pSession ){\n    pSession->rc = rc;\n    return (rc || pTab->abPK==0);\n  }\n  return rc;\n}\n\n/*\n** Re-initialize table object pTab.\n*/\nstatic int sessionReinitTable(sqlite3_session *pSession, SessionTable *pTab){\n  int nCol = 0;\n  int nTotalCol = 0;\n  const char **azCol = 0;\n  const char **azDflt = 0;\n  int *aiIdx = 0;\n  u8 *abPK = 0;\n  int bRowid = 0;\n\n  assert( pSession->rc==SQLITE_OK );\n\n  pSession->rc = sessionTableInfo(pSession, pSession->db, pSession->zDb,\n      pTab->zName, &nCol, &nTotalCol, 0, &azCol, &azDflt, &aiIdx, &abPK,\n      (pSession->bImplicitPK ? &bRowid : 0)\n  );\n  if( pSession->rc==SQLITE_OK ){\n    if( pTab->nCol>nCol || pTab->bRowid!=bRowid ){\n      pSession->rc = SQLITE_SCHEMA;\n    }else{\n      int ii;\n      int nOldCol = pTab->nCol;\n      for(ii=0; ii<nCol; ii++){\n        if( ii<pTab->nCol ){\n          if( pTab->abPK[ii]!=abPK[ii] ){\n            pSession->rc = SQLITE_SCHEMA;\n          }\n        }else if( abPK[ii] ){\n          pSession->rc = SQLITE_SCHEMA;\n        }\n      }\n\n      if( pSession->rc==SQLITE_OK ){\n        const char **a = pTab->azCol;\n        pTab->azCol = azCol;\n        pTab->nCol = nCol;\n        pTab->nTotalCol = nTotalCol;\n        pTab->azDflt = azDflt;\n        pTab->abPK = abPK;\n        pTab->aiIdx = aiIdx;\n        azCol = a;\n      }\n      if( pSession->bEnableSize ){\n        pSession->nMaxChangesetSize += (nCol - nOldCol);\n        pSession->nMaxChangesetSize += sessionVarintLen(nCol);\n        pSession->nMaxChangesetSize -= sessionVarintLen(nOldCol);\n      }\n    }\n  }\n\n  sqlite3_free((char*)azCol);\n  return pSession->rc;\n}\n\n/*\n** Session-change object (*pp) contains an old.* record with fewer than\n** nCol fields. This function updates it with the default values for\n** the missing fields.\n*/\nstatic void sessionUpdateOneChange(\n  sqlite3_session *pSession,      /* For memory accounting */\n  int *pRc,                       /* IN/OUT: Error code */\n  SessionChange **pp,             /* IN/OUT: Change object to update */\n  int nCol,                       /* Number of columns now in table */\n  sqlite3_stmt *pDflt             /* SELECT <default-values...> */\n){\n  SessionChange *pOld = *pp;\n\n  while( pOld->nRecordField<nCol ){\n    SessionChange *pNew = 0;\n    int nByte = 0;\n    int nIncr = 0;\n    int iField = pOld->nRecordField;\n    int eType = sqlite3_column_type(pDflt, iField);\n    switch( eType ){\n      case SQLITE_NULL:\n        nIncr = 1;\n        break;\n      case SQLITE_INTEGER:\n      case SQLITE_FLOAT:\n        nIncr = 9;\n        break;\n      default: {\n        int n = sqlite3_column_bytes(pDflt, iField);\n        nIncr = 1 + sessionVarintLen(n) + n;\n        assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );\n        break;\n      }\n    }\n\n    nByte = nIncr + (sizeof(SessionChange) + pOld->nRecord);\n    pNew = sessionMalloc64(pSession, nByte);\n    if( pNew==0 ){\n      *pRc = SQLITE_NOMEM;\n      return;\n    }else{\n      memcpy(pNew, pOld, sizeof(SessionChange));\n      pNew->aRecord = (u8*)&pNew[1];\n      memcpy(pNew->aRecord, pOld->aRecord, pOld->nRecord);\n      pNew->aRecord[pNew->nRecord++] = (u8)eType;\n      switch( eType ){\n        case SQLITE_INTEGER: {\n          i64 iVal = sqlite3_column_int64(pDflt, iField);\n          sessionPutI64(&pNew->aRecord[pNew->nRecord], iVal);\n          pNew->nRecord += 8;\n          break;\n        }\n\n        case SQLITE_FLOAT: {\n          double rVal = sqlite3_column_double(pDflt, iField);\n          i64 iVal = 0;\n          memcpy(&iVal, &rVal, sizeof(rVal));\n          sessionPutI64(&pNew->aRecord[pNew->nRecord], iVal);\n          pNew->nRecord += 8;\n          break;\n        }\n\n        case SQLITE_TEXT: {\n          int n = sqlite3_column_bytes(pDflt, iField);\n          const char *z = (const char*)sqlite3_column_text(pDflt, iField);\n          pNew->nRecord += sessionVarintPut(&pNew->aRecord[pNew->nRecord], n);\n          memcpy(&pNew->aRecord[pNew->nRecord], z, n);\n          pNew->nRecord += n;\n          break;\n        }\n\n        case SQLITE_BLOB: {\n          int n = sqlite3_column_bytes(pDflt, iField);\n          const u8 *z = (const u8*)sqlite3_column_blob(pDflt, iField);\n          pNew->nRecord += sessionVarintPut(&pNew->aRecord[pNew->nRecord], n);\n          memcpy(&pNew->aRecord[pNew->nRecord], z, n);\n          pNew->nRecord += n;\n          break;\n        }\n\n        default:\n          assert( eType==SQLITE_NULL );\n          break;\n      }\n\n      sessionFree(pSession, pOld);\n      *pp = pOld = pNew;\n      pNew->nRecordField++;\n      pNew->nMaxSize += nIncr;\n      if( pSession ){\n        pSession->nMaxChangesetSize += nIncr;\n      }\n    }\n  }\n}\n\n/*\n** Ensure that there is room in the buffer to append nByte bytes of data.\n** If not, use sqlite3_realloc() to grow the buffer so that there is.\n**\n** If successful, return zero. Otherwise, if an OOM condition is encountered,\n** set *pRc to SQLITE_NOMEM and return non-zero.\n*/\nstatic int sessionBufferGrow(SessionBuffer *p, i64 nByte, int *pRc){\n#define SESSION_MAX_BUFFER_SZ (0x7FFFFF00 - 1)\n  i64 nReq = p->nBuf + nByte;\n  if( *pRc==SQLITE_OK && nReq>p->nAlloc ){\n    u8 *aNew;\n    i64 nNew = p->nAlloc ? p->nAlloc : 128;\n\n    do {\n      nNew = nNew*2;\n    }while( nNew<nReq );\n\n    /* The value of SESSION_MAX_BUFFER_SZ is copied from the implementation\n    ** of sqlite3_realloc64(). Allocations greater than this size in bytes\n    ** always fail. It is used here to ensure that this routine can always\n    ** allocate up to this limit - instead of up to the largest power of\n    ** two smaller than the limit.  */\n    if( nNew>SESSION_MAX_BUFFER_SZ ){\n      nNew = SESSION_MAX_BUFFER_SZ;\n      if( nNew<nReq ){\n        *pRc = SQLITE_NOMEM;\n        return 1;\n      }\n    }\n\n    aNew = (u8 *)sqlite3_realloc64(p->aBuf, nNew);\n    if( 0==aNew ){\n      *pRc = SQLITE_NOMEM;\n    }else{\n      p->aBuf = aNew;\n      p->nAlloc = nNew;\n    }\n  }\n  return (*pRc!=SQLITE_OK);\n}\n\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append a string to the buffer. All bytes in the string\n** up to (but not including) the nul-terminator are written to the buffer.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendStr(\n  SessionBuffer *p,\n  const char *zStr,\n  int *pRc\n){\n  int nStr = sqlite3Strlen30(zStr);\n  if( 0==sessionBufferGrow(p, nStr+1, pRc) ){\n    memcpy(&p->aBuf[p->nBuf], zStr, nStr);\n    p->nBuf += nStr;\n    p->aBuf[p->nBuf] = 0x00;\n  }\n}\n\n/*\n** Format a string using printf() style formatting and then append it to the\n** buffer using sessionAppendString().\n*/\nstatic void sessionAppendPrintf(\n  SessionBuffer *p,               /* Buffer to append to */\n  int *pRc,\n  const char *zFmt,\n  ...\n){\n  if( *pRc==SQLITE_OK ){\n    char *zApp = 0;\n    va_list ap;\n    va_start(ap, zFmt);\n    zApp = sqlite3_vmprintf(zFmt, ap);\n    if( zApp==0 ){\n      *pRc = SQLITE_NOMEM;\n    }else{\n      sessionAppendStr(p, zApp, pRc);\n    }\n    va_end(ap);\n    sqlite3_free(zApp);\n  }\n}\n\n/*\n** Prepare a statement against database handle db that SELECTs a single\n** row containing the default values for each column in table pTab. For\n** example, if pTab is declared as:\n**\n**   CREATE TABLE pTab(a PRIMARY KEY, b DEFAULT 123, c DEFAULT 'abcd');\n**\n** Then this function prepares and returns the SQL statement:\n**\n**   SELECT NULL, 123, 'abcd';\n*/\nstatic int sessionPrepareDfltStmt(\n  sqlite3 *db,                    /* Database handle */\n  SessionTable *pTab,             /* Table to prepare statement for */\n  sqlite3_stmt **ppStmt           /* OUT: Statement handle */\n){\n  SessionBuffer sql = {0,0,0};\n  int rc = SQLITE_OK;\n  const char *zSep = \" \";\n  int ii = 0;\n\n  *ppStmt = 0;\n  sessionAppendPrintf(&sql, &rc, \"SELECT\");\n  for(ii=0; ii<pTab->nCol; ii++){\n    const char *zDflt = pTab->azDflt[ii] ? pTab->azDflt[ii] : \"NULL\";\n    sessionAppendPrintf(&sql, &rc, \"%s%s\", zSep, zDflt);\n    zSep = \", \";\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_prepare_v2(db, (const char*)sql.aBuf, -1, ppStmt, 0);\n  }\n  sqlite3_free(sql.aBuf);\n\n  return rc;\n}\n\n/*\n** Table pTab has one or more existing change-records with old.* records\n** with fewer than pTab->nCol columns. This function updates all such\n** change-records with the default values for the missing columns.\n*/\nstatic int sessionUpdateChanges(sqlite3_session *pSession, SessionTable *pTab){\n  sqlite3_stmt *pStmt = 0;\n  int rc = pSession->rc;\n\n  rc = sessionPrepareDfltStmt(pSession->db, pTab, &pStmt);\n  if( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n    int ii = 0;\n    SessionChange **pp = 0;\n    for(ii=0; ii<pTab->nChange; ii++){\n      for(pp=&pTab->apChange[ii]; *pp; pp=&((*pp)->pNext)){\n        if( (*pp)->nRecordField!=pTab->nCol ){\n          sessionUpdateOneChange(pSession, &rc, pp, pTab->nCol, pStmt);\n        }\n      }\n    }\n  }\n\n  pSession->rc = rc;\n  rc = sqlite3_finalize(pStmt);\n  if( pSession->rc==SQLITE_OK ) pSession->rc = rc;\n  return pSession->rc;\n}\n\n/*\n** Versions of the four methods in object SessionHook for use with the\n** sqlite_stat1 table. The purpose of this is to substitute a zero-length\n** blob each time a NULL value is read from the \"idx\" column of the\n** sqlite_stat1 table.\n*/\ntypedef struct SessionStat1Ctx SessionStat1Ctx;\nstruct SessionStat1Ctx {\n  SessionHook hook;\n  sqlite3_session *pSession;\n};\nstatic int sessionStat1Old(void *pCtx, int iCol, sqlite3_value **ppVal){\n  SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;\n  sqlite3_value *pVal = 0;\n  int rc = p->hook.xOld(p->hook.pCtx, iCol, &pVal);\n  if( rc==SQLITE_OK && iCol==1 && sqlite3_value_type(pVal)==SQLITE_NULL ){\n    pVal = p->pSession->pZeroBlob;\n  }\n  *ppVal = pVal;\n  return rc;\n}\nstatic int sessionStat1New(void *pCtx, int iCol, sqlite3_value **ppVal){\n  SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;\n  sqlite3_value *pVal = 0;\n  int rc = p->hook.xNew(p->hook.pCtx, iCol, &pVal);\n  if( rc==SQLITE_OK && iCol==1 && sqlite3_value_type(pVal)==SQLITE_NULL ){\n    pVal = p->pSession->pZeroBlob;\n  }\n  *ppVal = pVal;\n  return rc;\n}\nstatic int sessionStat1Count(void *pCtx){\n  SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;\n  return p->hook.xCount(p->hook.pCtx);\n}\nstatic int sessionStat1Depth(void *pCtx){\n  SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;\n  return p->hook.xDepth(p->hook.pCtx);\n}\n\nstatic int sessionUpdateMaxSize(\n  int op,\n  sqlite3_session *pSession,      /* Session object pTab is attached to */\n  SessionTable *pTab,             /* Table that change applies to */\n  SessionChange *pC               /* Update pC->nMaxSize */\n){\n  i64 nNew = 2;\n  if( pC->op==SQLITE_INSERT ){\n    if( pTab->bRowid ) nNew += 9;\n    if( op!=SQLITE_DELETE ){\n      int ii;\n      for(ii=0; ii<pTab->nCol; ii++){\n        sqlite3_value *p = 0;\n        pSession->hook.xNew(pSession->hook.pCtx, pTab->aiIdx[ii], &p);\n        sessionSerializeValue(0, p, &nNew);\n      }\n    }\n  }else if( op==SQLITE_DELETE ){\n    nNew += pC->nRecord;\n    if( sqlite3_preupdate_blobwrite(pSession->db)>=0 ){\n      nNew += pC->nRecord;\n    }\n  }else{\n    int ii;\n    u8 *pCsr = pC->aRecord;\n    if( pTab->bRowid ){\n      nNew += 9 + 1;\n      pCsr += 9;\n    }\n    for(ii=pTab->bRowid; ii<pTab->nCol; ii++){\n      int bChanged = 1;\n      int nOld = 0;\n      int eType;\n      int iIdx = pTab->aiIdx[ii];\n      sqlite3_value *p = 0;\n      pSession->hook.xNew(pSession->hook.pCtx, iIdx, &p);\n      if( p==0 ){\n        return SQLITE_NOMEM;\n      }\n\n      eType = *pCsr++;\n      switch( eType ){\n        case SQLITE_NULL:\n          bChanged = sqlite3_value_type(p)!=SQLITE_NULL;\n          break;\n\n        case SQLITE_FLOAT:\n        case SQLITE_INTEGER: {\n          if( eType==sqlite3_value_type(p) ){\n            sqlite3_int64 iVal = sessionGetI64(pCsr);\n            if( eType==SQLITE_INTEGER ){\n              bChanged = (iVal!=sqlite3_value_int64(p));\n            }else{\n              double dVal;\n              memcpy(&dVal, &iVal, 8);\n              bChanged = (dVal!=sqlite3_value_double(p));\n            }\n          }\n          nOld = 8;\n          pCsr += 8;\n          break;\n        }\n\n        default: {\n          int nByte;\n          nOld = sessionVarintGet(pCsr, &nByte);\n          pCsr += nOld;\n          nOld += nByte;\n          assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );\n          if( eType==sqlite3_value_type(p)\n           && nByte==sqlite3_value_bytes(p)\n           && (nByte==0 || 0==memcmp(pCsr, sqlite3_value_blob(p), nByte))\n          ){\n            bChanged = 0;\n          }\n          pCsr += nByte;\n          break;\n        }\n      }\n\n      if( bChanged && pTab->abPK[ii] ){\n        nNew = pC->nRecord + 2;\n        break;\n      }\n\n      if( bChanged ){\n        nNew += 1 + nOld;\n        sessionSerializeValue(0, p, &nNew);\n      }else if( pTab->abPK[ii] ){\n        nNew += 2 + nOld;\n      }else{\n        nNew += 2;\n      }\n    }\n  }\n\n  if( nNew>pC->nMaxSize ){\n    int nIncr = nNew - pC->nMaxSize;\n    pC->nMaxSize = nNew;\n    pSession->nMaxChangesetSize += nIncr;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This function is only called from with a pre-update-hook reporting a\n** change on table pTab (attached to session pSession). The type of change\n** (UPDATE, INSERT, DELETE) is specified by the first argument.\n**\n** Unless one is already present or an error occurs, an entry is added\n** to the changed-rows hash table associated with table pTab.\n*/\nstatic void sessionPreupdateOneChange(\n  int op,                         /* One of SQLITE_UPDATE, INSERT, DELETE */\n  i64 iRowid,\n  sqlite3_session *pSession,      /* Session object pTab is attached to */\n  SessionTable *pTab              /* Table that change applies to */\n){\n  int iHash;\n  int bNull = 0;\n  int rc = SQLITE_OK;\n  int nExpect = 0;\n  SessionStat1Ctx stat1 = {{0,0,0,0,0},0};\n\n  if( pSession->rc ) return;\n\n  /* Load table details if required */\n  if( sessionInitTable(pSession, pTab, pSession->db, pSession->zDb) ) return;\n\n  /* Check the number of columns in this xPreUpdate call matches the\n  ** number of columns in the table.  */\n  nExpect = pSession->hook.xCount(pSession->hook.pCtx);\n  if( pTab->nTotalCol<nExpect ){\n    if( sessionReinitTable(pSession, pTab) ) return;\n    if( sessionUpdateChanges(pSession, pTab) ) return;\n  }\n  if( pTab->nTotalCol!=nExpect ){\n    pSession->rc = SQLITE_SCHEMA;\n    return;\n  }\n\n  /* Grow the hash table if required */\n  if( sessionGrowHash(pSession, 0, pTab) ){\n    pSession->rc = SQLITE_NOMEM;\n    return;\n  }\n\n  if( pTab->bStat1 ){\n    stat1.hook = pSession->hook;\n    stat1.pSession = pSession;\n    pSession->hook.pCtx = (void*)&stat1;\n    pSession->hook.xNew = sessionStat1New;\n    pSession->hook.xOld = sessionStat1Old;\n    pSession->hook.xCount = sessionStat1Count;\n    pSession->hook.xDepth = sessionStat1Depth;\n    if( pSession->pZeroBlob==0 ){\n      sqlite3_value *p = sqlite3ValueNew(0);\n      if( p==0 ){\n        rc = SQLITE_NOMEM;\n        goto error_out;\n      }\n      sqlite3ValueSetStr(p, 0, \"\", 0, SQLITE_STATIC);\n      pSession->pZeroBlob = p;\n    }\n  }\n\n  /* Calculate the hash-key for this change. If the primary key of the row\n  ** includes a NULL value, exit early. Such changes are ignored by the\n  ** session module. */\n  rc = sessionPreupdateHash(\n      pSession, iRowid, pTab, op==SQLITE_INSERT, &iHash, &bNull\n  );\n  if( rc!=SQLITE_OK ) goto error_out;\n\n  if( bNull==0 ){\n    /* Search the hash table for an existing record for this row. */\n    SessionChange *pC;\n    for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){\n      if( sessionPreupdateEqual(pSession, iRowid, pTab, pC, op) ) break;\n    }\n\n    if( pC==0 ){\n      /* Create a new change object containing all the old values (if\n      ** this is an SQLITE_UPDATE or SQLITE_DELETE), or just the PK\n      ** values (if this is an INSERT). */\n      sqlite3_int64 nByte;    /* Number of bytes to allocate */\n      int i;                  /* Used to iterate through columns */\n\n      assert( rc==SQLITE_OK );\n      pTab->nEntry++;\n\n      /* Figure out how large an allocation is required */\n      nByte = sizeof(SessionChange);\n      for(i=pTab->bRowid; i<pTab->nCol; i++){\n        int iIdx = pTab->aiIdx[i];\n        sqlite3_value *p = 0;\n        if( op!=SQLITE_INSERT ){\n          /* This may fail if the column has a non-NULL default and was added\n          ** using ALTER TABLE ADD COLUMN after this record was created. */\n          rc = pSession->hook.xOld(pSession->hook.pCtx, iIdx, &p);\n        }else if( pTab->abPK[i] ){\n          TESTONLY(int trc = ) pSession->hook.xNew(pSession->hook.pCtx,iIdx,&p);\n          assert( trc==SQLITE_OK );\n        }\n\n        if( rc==SQLITE_OK ){\n          /* This may fail if SQLite value p contains a utf-16 string that must\n          ** be converted to utf-8 and an OOM error occurs while doing so. */\n          rc = sessionSerializeValue(0, p, &nByte);\n        }\n        if( rc!=SQLITE_OK ) goto error_out;\n      }\n      if( pTab->bRowid ){\n        nByte += 9;               /* Size of rowid field - an integer */\n      }\n\n      /* Allocate the change object */\n      pC = (SessionChange*)sessionMalloc64(pSession, nByte);\n      if( !pC ){\n        rc = SQLITE_NOMEM;\n        goto error_out;\n      }else{\n        memset(pC, 0, sizeof(SessionChange));\n        pC->aRecord = (u8 *)&pC[1];\n      }\n\n      /* Populate the change object. None of the preupdate_old(),\n      ** preupdate_new() or SerializeValue() calls below may fail as all\n      ** required values and encodings have already been cached in memory.\n      ** It is not possible for an OOM to occur in this block. */\n      nByte = 0;\n      if( pTab->bRowid ){\n        pC->aRecord[0] = SQLITE_INTEGER;\n        sessionPutI64(&pC->aRecord[1], iRowid);\n        nByte = 9;\n      }\n      for(i=pTab->bRowid; i<pTab->nCol; i++){\n        sqlite3_value *p = 0;\n        int iIdx = pTab->aiIdx[i];\n        if( op!=SQLITE_INSERT ){\n          pSession->hook.xOld(pSession->hook.pCtx, iIdx, &p);\n        }else if( pTab->abPK[i] ){\n          pSession->hook.xNew(pSession->hook.pCtx, iIdx, &p);\n        }\n        sessionSerializeValue(&pC->aRecord[nByte], p, &nByte);\n      }\n\n      /* Add the change to the hash-table */\n      if( pSession->bIndirect || pSession->hook.xDepth(pSession->hook.pCtx) ){\n        pC->bIndirect = 1;\n      }\n      pC->nRecordField = pTab->nCol;\n      pC->nRecord = nByte;\n      pC->op = op;\n      pC->pNext = pTab->apChange[iHash];\n      pTab->apChange[iHash] = pC;\n\n    }else if( pC->bIndirect ){\n      /* If the existing change is considered \"indirect\", but this current\n      ** change is \"direct\", mark the change object as direct. */\n      if( pSession->hook.xDepth(pSession->hook.pCtx)==0\n       && pSession->bIndirect==0\n      ){\n        pC->bIndirect = 0;\n      }\n    }\n\n    assert( rc==SQLITE_OK );\n    if( pSession->bEnableSize ){\n      rc = sessionUpdateMaxSize(op, pSession, pTab, pC);\n    }\n  }\n\n\n  /* If an error has occurred, mark the session object as failed. */\n error_out:\n  if( pTab->bStat1 ){\n    pSession->hook = stat1.hook;\n  }\n  if( rc!=SQLITE_OK ){\n    pSession->rc = rc;\n  }\n}\n\nstatic int sessionFindTable(\n  sqlite3_session *pSession,\n  const char *zName,\n  SessionTable **ppTab\n){\n  int rc = SQLITE_OK;\n  int nName = sqlite3Strlen30(zName);\n  SessionTable *pRet;\n\n  /* Search for an existing table */\n  for(pRet=pSession->pTable; pRet; pRet=pRet->pNext){\n    if( 0==sqlite3_strnicmp(pRet->zName, zName, nName+1) ) break;\n  }\n\n  if( pRet==0 && pSession->bAutoAttach ){\n    /* If there is a table-filter configured, invoke it. If it returns 0,\n    ** do not automatically add the new table. */\n    if( pSession->xTableFilter==0\n     || pSession->xTableFilter(pSession->pFilterCtx, zName)\n    ){\n      rc = sqlite3session_attach(pSession, zName);\n      if( rc==SQLITE_OK ){\n        pRet = pSession->pTable;\n        while( ALWAYS(pRet) && pRet->pNext ){\n          pRet = pRet->pNext;\n        }\n        assert( pRet!=0 );\n        assert( 0==sqlite3_strnicmp(pRet->zName, zName, nName+1) );\n      }\n    }\n  }\n\n  assert( rc==SQLITE_OK || pRet==0 );\n  *ppTab = pRet;\n  return rc;\n}\n\n/*\n** The 'pre-update' hook registered by this module with SQLite databases.\n*/\nstatic void xPreUpdate(\n  void *pCtx,                     /* Copy of third arg to preupdate_hook() */\n  sqlite3 *db,                    /* Database handle */\n  int op,                         /* SQLITE_UPDATE, DELETE or INSERT */\n  char const *zDb,                /* Database name */\n  char const *zName,              /* Table name */\n  sqlite3_int64 iKey1,            /* Rowid of row about to be deleted/updated */\n  sqlite3_int64 iKey2             /* New rowid value (for a rowid UPDATE) */\n){\n  sqlite3_session *pSession;\n  int nDb = sqlite3Strlen30(zDb);\n\n  assert( sqlite3_mutex_held(db->mutex) );\n  (void)iKey1;\n  (void)iKey2;\n\n  for(pSession=(sqlite3_session *)pCtx; pSession; pSession=pSession->pNext){\n    SessionTable *pTab;\n\n    /* If this session is attached to a different database (\"main\", \"temp\"\n    ** etc.), or if it is not currently enabled, there is nothing to do. Skip\n    ** to the next session object attached to this database. */\n    if( pSession->bEnable==0 ) continue;\n    if( pSession->rc ) continue;\n    if( sqlite3_strnicmp(zDb, pSession->zDb, nDb+1) ) continue;\n\n    pSession->rc = sessionFindTable(pSession, zName, &pTab);\n    if( pTab ){\n      assert( pSession->rc==SQLITE_OK );\n      assert( op==SQLITE_UPDATE || iKey1==iKey2 );\n      sessionPreupdateOneChange(op, iKey1, pSession, pTab);\n      if( op==SQLITE_UPDATE ){\n        sessionPreupdateOneChange(SQLITE_INSERT, iKey2, pSession, pTab);\n      }\n    }\n  }\n}\n\n/*\n** The pre-update hook implementations.\n*/\nstatic int sessionPreupdateOld(void *pCtx, int iVal, sqlite3_value **ppVal){\n  return sqlite3_preupdate_old((sqlite3*)pCtx, iVal, ppVal);\n}\nstatic int sessionPreupdateNew(void *pCtx, int iVal, sqlite3_value **ppVal){\n  return sqlite3_preupdate_new((sqlite3*)pCtx, iVal, ppVal);\n}\nstatic int sessionPreupdateCount(void *pCtx){\n  return sqlite3_preupdate_count((sqlite3*)pCtx);\n}\nstatic int sessionPreupdateDepth(void *pCtx){\n  return sqlite3_preupdate_depth((sqlite3*)pCtx);\n}\n\n/*\n** Install the pre-update hooks on the session object passed as the only\n** argument.\n*/\nstatic void sessionPreupdateHooks(\n  sqlite3_session *pSession\n){\n  pSession->hook.pCtx = (void*)pSession->db;\n  pSession->hook.xOld = sessionPreupdateOld;\n  pSession->hook.xNew = sessionPreupdateNew;\n  pSession->hook.xCount = sessionPreupdateCount;\n  pSession->hook.xDepth = sessionPreupdateDepth;\n}\n\ntypedef struct SessionDiffCtx SessionDiffCtx;\nstruct SessionDiffCtx {\n  sqlite3_stmt *pStmt;\n  int bRowid;\n  int nOldOff;\n};\n\n/*\n** The diff hook implementations.\n*/\nstatic int sessionDiffOld(void *pCtx, int iVal, sqlite3_value **ppVal){\n  SessionDiffCtx *p = (SessionDiffCtx*)pCtx;\n  *ppVal = sqlite3_column_value(p->pStmt, iVal+p->nOldOff+p->bRowid);\n  return SQLITE_OK;\n}\nstatic int sessionDiffNew(void *pCtx, int iVal, sqlite3_value **ppVal){\n  SessionDiffCtx *p = (SessionDiffCtx*)pCtx;\n  *ppVal = sqlite3_column_value(p->pStmt, iVal+p->bRowid);\n   return SQLITE_OK;\n}\nstatic int sessionDiffCount(void *pCtx){\n  SessionDiffCtx *p = (SessionDiffCtx*)pCtx;\n  return (p->nOldOff ? p->nOldOff : sqlite3_column_count(p->pStmt)) - p->bRowid;\n}\nstatic int sessionDiffDepth(void *pCtx){\n  (void)pCtx;\n  return 0;\n}\n\n/*\n** Install the diff hooks on the session object passed as the only\n** argument.\n*/\nstatic void sessionDiffHooks(\n  sqlite3_session *pSession,\n  SessionDiffCtx *pDiffCtx\n){\n  pSession->hook.pCtx = (void*)pDiffCtx;\n  pSession->hook.xOld = sessionDiffOld;\n  pSession->hook.xNew = sessionDiffNew;\n  pSession->hook.xCount = sessionDiffCount;\n  pSession->hook.xDepth = sessionDiffDepth;\n}\n\nstatic char *sessionExprComparePK(\n  int nCol,\n  const char *zDb1, const char *zDb2,\n  const char *zTab,\n  const char **azCol, u8 *abPK\n){\n  int i;\n  const char *zSep = \"\";\n  char *zRet = 0;\n\n  for(i=0; i<nCol; i++){\n    if( abPK[i] ){\n      zRet = sqlite3_mprintf(\"%z%s\\\"%w\\\".\\\"%w\\\".\\\"%w\\\"=\\\"%w\\\".\\\"%w\\\".\\\"%w\\\"\",\n          zRet, zSep, zDb1, zTab, azCol[i], zDb2, zTab, azCol[i]\n      );\n      zSep = \" AND \";\n      if( zRet==0 ) break;\n    }\n  }\n\n  return zRet;\n}\n\nstatic char *sessionExprCompareOther(\n  int nCol,\n  const char *zDb1, const char *zDb2,\n  const char *zTab,\n  const char **azCol, u8 *abPK\n){\n  int i;\n  const char *zSep = \"\";\n  char *zRet = 0;\n  int bHave = 0;\n\n  for(i=0; i<nCol; i++){\n    if( abPK[i]==0 ){\n      bHave = 1;\n      zRet = sqlite3_mprintf(\n          \"%z%s\\\"%w\\\".\\\"%w\\\".\\\"%w\\\" IS NOT \\\"%w\\\".\\\"%w\\\".\\\"%w\\\"\",\n          zRet, zSep, zDb1, zTab, azCol[i], zDb2, zTab, azCol[i]\n      );\n      zSep = \" OR \";\n      if( zRet==0 ) break;\n    }\n  }\n\n  if( bHave==0 ){\n    assert( zRet==0 );\n    zRet = sqlite3_mprintf(\"0\");\n  }\n\n  return zRet;\n}\n\nstatic char *sessionSelectFindNew(\n  const char *zDb1,      /* Pick rows in this db only */\n  const char *zDb2,      /* But not in this one */\n  int bRowid,\n  const char *zTbl,      /* Table name */\n  const char *zExpr\n){\n  const char *zSel = (bRowid ? SESSIONS_ROWID \", *\" : \"*\");\n  char *zRet = sqlite3_mprintf(\n      \"SELECT %s FROM \\\"%w\\\".\\\"%w\\\" WHERE NOT EXISTS (\"\n      \"  SELECT 1 FROM \\\"%w\\\".\\\"%w\\\" WHERE %s\"\n      \")\",\n      zSel, zDb1, zTbl, zDb2, zTbl, zExpr\n  );\n  return zRet;\n}\n\nstatic int sessionDiffFindNew(\n  int op,\n  sqlite3_session *pSession,\n  SessionTable *pTab,\n  const char *zDb1,\n  const char *zDb2,\n  char *zExpr\n){\n  int rc = SQLITE_OK;\n  char *zStmt = sessionSelectFindNew(\n      zDb1, zDb2, pTab->bRowid, pTab->zName, zExpr\n  );\n\n  if( zStmt==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    sqlite3_stmt *pStmt;\n    rc = sqlite3_prepare(pSession->db, zStmt, -1, &pStmt, 0);\n    if( rc==SQLITE_OK ){\n      SessionDiffCtx *pDiffCtx = (SessionDiffCtx*)pSession->hook.pCtx;\n      pDiffCtx->pStmt = pStmt;\n      pDiffCtx->nOldOff = 0;\n      pDiffCtx->bRowid = pTab->bRowid;\n      while( SQLITE_ROW==sqlite3_step(pStmt) ){\n        i64 iRowid = (pTab->bRowid ? sqlite3_column_int64(pStmt, 0) : 0);\n        sessionPreupdateOneChange(op, iRowid, pSession, pTab);\n      }\n      rc = sqlite3_finalize(pStmt);\n    }\n    sqlite3_free(zStmt);\n  }\n\n  return rc;\n}\n\n/*\n** Return a comma-separated list of the fully-qualified (with both database\n** and table name) column names from table pTab. e.g.\n**\n**    \"main\".\"t1\".\"a\", \"main\".\"t1\".\"b\", \"main\".\"t1\".\"c\"\n*/\nstatic char *sessionAllCols(\n  const char *zDb,\n  SessionTable *pTab\n){\n  int ii;\n  char *zRet = 0;\n  for(ii=0; ii<pTab->nCol; ii++){\n    zRet = sqlite3_mprintf(\"%z%s\\\"%w\\\".\\\"%w\\\".\\\"%w\\\"\",\n        zRet, (zRet ? \", \" : \"\"), zDb, pTab->zName, pTab->azCol[ii]\n    );\n    if( !zRet ) break;\n  }\n  return zRet;\n}\n\nstatic int sessionDiffFindModified(\n  sqlite3_session *pSession,\n  SessionTable *pTab,\n  const char *zFrom,\n  const char *zExpr\n){\n  int rc = SQLITE_OK;\n\n  char *zExpr2 = sessionExprCompareOther(pTab->nCol,\n      pSession->zDb, zFrom, pTab->zName, pTab->azCol, pTab->abPK\n  );\n  if( zExpr2==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    char *z1 = sessionAllCols(pSession->zDb, pTab);\n    char *z2 = sessionAllCols(zFrom, pTab);\n    char *zStmt = sqlite3_mprintf(\n        \"SELECT %s,%s FROM \\\"%w\\\".\\\"%w\\\", \\\"%w\\\".\\\"%w\\\" WHERE %s AND (%z)\",\n        z1, z2, pSession->zDb, pTab->zName, zFrom, pTab->zName, zExpr, zExpr2\n    );\n    if( zStmt==0 || z1==0 || z2==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      sqlite3_stmt *pStmt;\n      rc = sqlite3_prepare(pSession->db, zStmt, -1, &pStmt, 0);\n\n      if( rc==SQLITE_OK ){\n        SessionDiffCtx *pDiffCtx = (SessionDiffCtx*)pSession->hook.pCtx;\n        pDiffCtx->pStmt = pStmt;\n        pDiffCtx->nOldOff = pTab->nCol;\n        while( SQLITE_ROW==sqlite3_step(pStmt) ){\n          i64 iRowid = (pTab->bRowid ? sqlite3_column_int64(pStmt, 0) : 0);\n          sessionPreupdateOneChange(SQLITE_UPDATE, iRowid, pSession, pTab);\n        }\n        rc = sqlite3_finalize(pStmt);\n      }\n    }\n    sqlite3_free(zStmt);\n    sqlite3_free(z1);\n    sqlite3_free(z2);\n  }\n\n  return rc;\n}\n\nSQLITE_API int sqlite3session_diff(\n  sqlite3_session *pSession,\n  const char *zFrom,\n  const char *zTbl,\n  char **pzErrMsg\n){\n  const char *zDb = pSession->zDb;\n  int rc = pSession->rc;\n  SessionDiffCtx d;\n\n  memset(&d, 0, sizeof(d));\n  sessionDiffHooks(pSession, &d);\n\n  sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));\n  if( pzErrMsg ) *pzErrMsg = 0;\n  if( rc==SQLITE_OK ){\n    char *zExpr = 0;\n    sqlite3 *db = pSession->db;\n    SessionTable *pTo;            /* Table zTbl */\n\n    /* Locate and if necessary initialize the target table object */\n    pSession->bAutoAttach++;\n    rc = sessionFindTable(pSession, zTbl, &pTo);\n    pSession->bAutoAttach--;\n    if( pTo==0 ) goto diff_out;\n    if( sessionInitTable(pSession, pTo, pSession->db, pSession->zDb) ){\n      rc = pSession->rc;\n      goto diff_out;\n    }\n\n    /* Check the table schemas match */\n    if( rc==SQLITE_OK ){\n      int bHasPk = 0;\n      int bMismatch = 0;\n      int nCol = 0;               /* Columns in zFrom.zTbl */\n      int bRowid = 0;\n      u8 *abPK = 0;\n      const char **azCol = 0;\n      char *zDbExists = 0;\n\n      /* Check that database zFrom is attached.  */\n      zDbExists = sqlite3_mprintf(\"SELECT * FROM %Q.sqlite_schema\", zFrom);\n      if( zDbExists==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        sqlite3_stmt *pDbExists = 0;\n        rc = sqlite3_prepare_v2(db, zDbExists, -1, &pDbExists, 0);\n        if( rc==SQLITE_ERROR ){\n          rc = SQLITE_OK;\n          nCol = -1;\n        }\n        sqlite3_finalize(pDbExists);\n        sqlite3_free(zDbExists);\n      }\n\n      if( rc==SQLITE_OK && nCol==0 ){\n        rc = sessionTableInfo(0, db, zFrom, zTbl,\n            &nCol, 0, 0, &azCol, 0, 0, &abPK,\n            pSession->bImplicitPK ? &bRowid : 0\n        );\n      }\n      if( rc==SQLITE_OK ){\n        if( pTo->nCol!=nCol ){\n          if( nCol<=0 ){\n            rc = SQLITE_SCHEMA;\n            if( pzErrMsg ){\n              *pzErrMsg = sqlite3_mprintf(\"no such table: %s.%s\", zFrom, zTbl);\n            }\n          }else{\n            bMismatch = 1;\n          }\n        }else{\n          int i;\n          for(i=0; i<nCol; i++){\n            if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1;\n            if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;\n            if( abPK[i] ) bHasPk = 1;\n          }\n        }\n      }\n      sqlite3_free((char*)azCol);\n      if( bMismatch ){\n        if( pzErrMsg ){\n          *pzErrMsg = sqlite3_mprintf(\"table schemas do not match\");\n        }\n        rc = SQLITE_SCHEMA;\n      }\n      if( bHasPk==0 ){\n        /* Ignore tables with no primary keys */\n        goto diff_out;\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      zExpr = sessionExprComparePK(pTo->nCol,\n          zDb, zFrom, pTo->zName, pTo->azCol, pTo->abPK\n      );\n    }\n\n    /* Find new rows */\n    if( rc==SQLITE_OK ){\n      rc = sessionDiffFindNew(SQLITE_INSERT, pSession, pTo, zDb, zFrom, zExpr);\n    }\n\n    /* Find old rows */\n    if( rc==SQLITE_OK ){\n      rc = sessionDiffFindNew(SQLITE_DELETE, pSession, pTo, zFrom, zDb, zExpr);\n    }\n\n    /* Find modified rows */\n    if( rc==SQLITE_OK ){\n      rc = sessionDiffFindModified(pSession, pTo, zFrom, zExpr);\n    }\n\n    sqlite3_free(zExpr);\n  }\n\n diff_out:\n  sessionPreupdateHooks(pSession);\n  sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));\n  return rc;\n}\n\n/*\n** Create a session object. This session object will record changes to\n** database zDb attached to connection db.\n*/\nSQLITE_API int sqlite3session_create(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of db (e.g. \"main\") */\n  sqlite3_session **ppSession     /* OUT: New session object */\n){\n  sqlite3_session *pNew;          /* Newly allocated session object */\n  sqlite3_session *pOld;          /* Session object already attached to db */\n  int nDb = sqlite3Strlen30(zDb); /* Length of zDb in bytes */\n\n  /* Zero the output value in case an error occurs. */\n  *ppSession = 0;\n\n  /* Allocate and populate the new session object. */\n  pNew = (sqlite3_session *)sqlite3_malloc64(sizeof(sqlite3_session) + nDb + 1);\n  if( !pNew ) return SQLITE_NOMEM;\n  memset(pNew, 0, sizeof(sqlite3_session));\n  pNew->db = db;\n  pNew->zDb = (char *)&pNew[1];\n  pNew->bEnable = 1;\n  memcpy(pNew->zDb, zDb, nDb+1);\n  sessionPreupdateHooks(pNew);\n\n  /* Add the new session object to the linked list of session objects\n  ** attached to database handle $db. Do this under the cover of the db\n  ** handle mutex.  */\n  sqlite3_mutex_enter(sqlite3_db_mutex(db));\n  pOld = (sqlite3_session*)sqlite3_preupdate_hook(db, xPreUpdate, (void*)pNew);\n  pNew->pNext = pOld;\n  sqlite3_mutex_leave(sqlite3_db_mutex(db));\n\n  *ppSession = pNew;\n  return SQLITE_OK;\n}\n\n/*\n** Free the list of table objects passed as the first argument. The contents\n** of the changed-rows hash tables are also deleted.\n*/\nstatic void sessionDeleteTable(sqlite3_session *pSession, SessionTable *pList){\n  SessionTable *pNext;\n  SessionTable *pTab;\n\n  for(pTab=pList; pTab; pTab=pNext){\n    int i;\n    pNext = pTab->pNext;\n    for(i=0; i<pTab->nChange; i++){\n      SessionChange *p;\n      SessionChange *pNextChange;\n      for(p=pTab->apChange[i]; p; p=pNextChange){\n        pNextChange = p->pNext;\n        sessionFree(pSession, p);\n      }\n    }\n    sqlite3_finalize(pTab->pDfltStmt);\n    sessionFree(pSession, (char*)pTab->azCol);  /* cast works around VC++ bug */\n    sessionFree(pSession, pTab->apChange);\n    sessionFree(pSession, pTab);\n  }\n}\n\n/*\n** Delete a session object previously allocated using sqlite3session_create().\n*/\nSQLITE_API void sqlite3session_delete(sqlite3_session *pSession){\n  sqlite3 *db = pSession->db;\n  sqlite3_session *pHead;\n  sqlite3_session **pp;\n\n  /* Unlink the session from the linked list of sessions attached to the\n  ** database handle. Hold the db mutex while doing so.  */\n  sqlite3_mutex_enter(sqlite3_db_mutex(db));\n  pHead = (sqlite3_session*)sqlite3_preupdate_hook(db, 0, 0);\n  for(pp=&pHead; ALWAYS((*pp)!=0); pp=&((*pp)->pNext)){\n    if( (*pp)==pSession ){\n      *pp = (*pp)->pNext;\n      if( pHead ) sqlite3_preupdate_hook(db, xPreUpdate, (void*)pHead);\n      break;\n    }\n  }\n  sqlite3_mutex_leave(sqlite3_db_mutex(db));\n  sqlite3ValueFree(pSession->pZeroBlob);\n\n  /* Delete all attached table objects. And the contents of their\n  ** associated hash-tables. */\n  sessionDeleteTable(pSession, pSession->pTable);\n\n  /* Free the session object. */\n  sqlite3_free(pSession);\n}\n\n/*\n** Set a table filter on a Session Object.\n*/\nSQLITE_API void sqlite3session_table_filter(\n  sqlite3_session *pSession,\n  int(*xFilter)(void*, const char*),\n  void *pCtx                      /* First argument passed to xFilter */\n){\n  pSession->bAutoAttach = 1;\n  pSession->pFilterCtx = pCtx;\n  pSession->xTableFilter = xFilter;\n}\n\n/*\n** Attach a table to a session. All subsequent changes made to the table\n** while the session object is enabled will be recorded.\n**\n** Only tables that have a PRIMARY KEY defined may be attached. It does\n** not matter if the PRIMARY KEY is an \"INTEGER PRIMARY KEY\" (rowid alias)\n** or not.\n*/\nSQLITE_API int sqlite3session_attach(\n  sqlite3_session *pSession,      /* Session object */\n  const char *zName               /* Table name */\n){\n  int rc = SQLITE_OK;\n  sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));\n\n  if( !zName ){\n    pSession->bAutoAttach = 1;\n  }else{\n    SessionTable *pTab;           /* New table object (if required) */\n    int nName;                    /* Number of bytes in string zName */\n\n    /* First search for an existing entry. If one is found, this call is\n    ** a no-op. Return early. */\n    nName = sqlite3Strlen30(zName);\n    for(pTab=pSession->pTable; pTab; pTab=pTab->pNext){\n      if( 0==sqlite3_strnicmp(pTab->zName, zName, nName+1) ) break;\n    }\n\n    if( !pTab ){\n      /* Allocate new SessionTable object. */\n      int nByte = sizeof(SessionTable) + nName + 1;\n      pTab = (SessionTable*)sessionMalloc64(pSession, nByte);\n      if( !pTab ){\n        rc = SQLITE_NOMEM;\n      }else{\n        /* Populate the new SessionTable object and link it into the list.\n        ** The new object must be linked onto the end of the list, not\n        ** simply added to the start of it in order to ensure that tables\n        ** appear in the correct order when a changeset or patchset is\n        ** eventually generated. */\n        SessionTable **ppTab;\n        memset(pTab, 0, sizeof(SessionTable));\n        pTab->zName = (char *)&pTab[1];\n        memcpy(pTab->zName, zName, nName+1);\n        for(ppTab=&pSession->pTable; *ppTab; ppTab=&(*ppTab)->pNext);\n        *ppTab = pTab;\n      }\n    }\n  }\n\n  sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));\n  return rc;\n}\n\n/*\n** Append the value passed as the second argument to the buffer passed\n** as the first.\n**\n** This function is a no-op if *pRc is non-zero when it is called.\n** Otherwise, if an error occurs, *pRc is set to an SQLite error code\n** before returning.\n*/\nstatic void sessionAppendValue(SessionBuffer *p, sqlite3_value *pVal, int *pRc){\n  int rc = *pRc;\n  if( rc==SQLITE_OK ){\n    sqlite3_int64 nByte = 0;\n    rc = sessionSerializeValue(0, pVal, &nByte);\n    sessionBufferGrow(p, nByte, &rc);\n    if( rc==SQLITE_OK ){\n      rc = sessionSerializeValue(&p->aBuf[p->nBuf], pVal, 0);\n      p->nBuf += nByte;\n    }else{\n      *pRc = rc;\n    }\n  }\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append a single byte to the buffer.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendByte(SessionBuffer *p, u8 v, int *pRc){\n  if( 0==sessionBufferGrow(p, 1, pRc) ){\n    p->aBuf[p->nBuf++] = v;\n  }\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append a single varint to the buffer.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendVarint(SessionBuffer *p, int v, int *pRc){\n  if( 0==sessionBufferGrow(p, 9, pRc) ){\n    p->nBuf += sessionVarintPut(&p->aBuf[p->nBuf], v);\n  }\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append a blob of data to the buffer.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendBlob(\n  SessionBuffer *p,\n  const u8 *aBlob,\n  int nBlob,\n  int *pRc\n){\n  if( nBlob>0 && 0==sessionBufferGrow(p, nBlob, pRc) ){\n    memcpy(&p->aBuf[p->nBuf], aBlob, nBlob);\n    p->nBuf += nBlob;\n  }\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append the string representation of integer iVal\n** to the buffer. No nul-terminator is written.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendInteger(\n  SessionBuffer *p,               /* Buffer to append to */\n  int iVal,                       /* Value to write the string rep. of */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  char aBuf[24];\n  sqlite3_snprintf(sizeof(aBuf)-1, aBuf, \"%d\", iVal);\n  sessionAppendStr(p, aBuf, pRc);\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwise, append the string zStr enclosed in quotes (\") and\n** with any embedded quote characters escaped to the buffer. No\n** nul-terminator byte is written.\n**\n** If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before\n** returning.\n*/\nstatic void sessionAppendIdent(\n  SessionBuffer *p,               /* Buffer to a append to */\n  const char *zStr,               /* String to quote, escape and append */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  int nStr = sqlite3Strlen30(zStr)*2 + 2 + 2;\n  if( 0==sessionBufferGrow(p, nStr, pRc) ){\n    char *zOut = (char *)&p->aBuf[p->nBuf];\n    const char *zIn = zStr;\n    *zOut++ = '\"';\n    if( zIn!=0 ){\n      while( *zIn ){\n        if( *zIn=='\"' ) *zOut++ = '\"';\n        *zOut++ = *(zIn++);\n      }\n    }\n    *zOut++ = '\"';\n    p->nBuf = (int)((u8 *)zOut - p->aBuf);\n    p->aBuf[p->nBuf] = 0x00;\n  }\n}\n\n/*\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. Otherwse, it appends the serialized version of the value stored\n** in column iCol of the row that SQL statement pStmt currently points\n** to to the buffer.\n*/\nstatic void sessionAppendCol(\n  SessionBuffer *p,               /* Buffer to append to */\n  sqlite3_stmt *pStmt,            /* Handle pointing to row containing value */\n  int iCol,                       /* Column to read value from */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  if( *pRc==SQLITE_OK ){\n    int eType = sqlite3_column_type(pStmt, iCol);\n    sessionAppendByte(p, (u8)eType, pRc);\n    if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n      sqlite3_int64 i;\n      u8 aBuf[8];\n      if( eType==SQLITE_INTEGER ){\n        i = sqlite3_column_int64(pStmt, iCol);\n      }else{\n        double r = sqlite3_column_double(pStmt, iCol);\n        memcpy(&i, &r, 8);\n      }\n      sessionPutI64(aBuf, i);\n      sessionAppendBlob(p, aBuf, 8, pRc);\n    }\n    if( eType==SQLITE_BLOB || eType==SQLITE_TEXT ){\n      u8 *z;\n      int nByte;\n      if( eType==SQLITE_BLOB ){\n        z = (u8 *)sqlite3_column_blob(pStmt, iCol);\n      }else{\n        z = (u8 *)sqlite3_column_text(pStmt, iCol);\n      }\n      nByte = sqlite3_column_bytes(pStmt, iCol);\n      if( z || (eType==SQLITE_BLOB && nByte==0) ){\n        sessionAppendVarint(p, nByte, pRc);\n        sessionAppendBlob(p, z, nByte, pRc);\n      }else{\n        *pRc = SQLITE_NOMEM;\n      }\n    }\n  }\n}\n\n/*\n**\n** This function appends an update change to the buffer (see the comments\n** under \"CHANGESET FORMAT\" at the top of the file). An update change\n** consists of:\n**\n**   1 byte:  SQLITE_UPDATE (0x17)\n**   n bytes: old.* record (see RECORD FORMAT)\n**   m bytes: new.* record (see RECORD FORMAT)\n**\n** The SessionChange object passed as the third argument contains the\n** values that were stored in the row when the session began (the old.*\n** values). The statement handle passed as the second argument points\n** at the current version of the row (the new.* values).\n**\n** If all of the old.* values are equal to their corresponding new.* value\n** (i.e. nothing has changed), then no data at all is appended to the buffer.\n**\n** Otherwise, the old.* record contains all primary key values and the\n** original values of any fields that have been modified. The new.* record\n** contains the new values of only those fields that have been modified.\n*/\nstatic int sessionAppendUpdate(\n  SessionBuffer *pBuf,            /* Buffer to append to */\n  int bPatchset,                  /* True for \"patchset\", 0 for \"changeset\" */\n  sqlite3_stmt *pStmt,            /* Statement handle pointing at new row */\n  SessionChange *p,               /* Object containing old values */\n  u8 *abPK                        /* Boolean array - true for PK columns */\n){\n  int rc = SQLITE_OK;\n  SessionBuffer buf2 = {0,0,0}; /* Buffer to accumulate new.* record in */\n  int bNoop = 1;                /* Set to zero if any values are modified */\n  int nRewind = pBuf->nBuf;     /* Set to zero if any values are modified */\n  int i;                        /* Used to iterate through columns */\n  u8 *pCsr = p->aRecord;        /* Used to iterate through old.* values */\n\n  assert( abPK!=0 );\n  sessionAppendByte(pBuf, SQLITE_UPDATE, &rc);\n  sessionAppendByte(pBuf, p->bIndirect, &rc);\n  for(i=0; i<sqlite3_column_count(pStmt); i++){\n    int bChanged = 0;\n    int nAdvance;\n    int eType = *pCsr;\n    switch( eType ){\n      case SQLITE_NULL:\n        nAdvance = 1;\n        if( sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){\n          bChanged = 1;\n        }\n        break;\n\n      case SQLITE_FLOAT:\n      case SQLITE_INTEGER: {\n        nAdvance = 9;\n        if( eType==sqlite3_column_type(pStmt, i) ){\n          sqlite3_int64 iVal = sessionGetI64(&pCsr[1]);\n          if( eType==SQLITE_INTEGER ){\n            if( iVal==sqlite3_column_int64(pStmt, i) ) break;\n          }else{\n            double dVal;\n            memcpy(&dVal, &iVal, 8);\n            if( dVal==sqlite3_column_double(pStmt, i) ) break;\n          }\n        }\n        bChanged = 1;\n        break;\n      }\n\n      default: {\n        int n;\n        int nHdr = 1 + sessionVarintGet(&pCsr[1], &n);\n        assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );\n        nAdvance = nHdr + n;\n        if( eType==sqlite3_column_type(pStmt, i)\n         && n==sqlite3_column_bytes(pStmt, i)\n         && (n==0 || 0==memcmp(&pCsr[nHdr], sqlite3_column_blob(pStmt, i), n))\n        ){\n          break;\n        }\n        bChanged = 1;\n      }\n    }\n\n    /* If at least one field has been modified, this is not a no-op. */\n    if( bChanged ) bNoop = 0;\n\n    /* Add a field to the old.* record. This is omitted if this module is\n    ** currently generating a patchset. */\n    if( bPatchset==0 ){\n      if( bChanged || abPK[i] ){\n        sessionAppendBlob(pBuf, pCsr, nAdvance, &rc);\n      }else{\n        sessionAppendByte(pBuf, 0, &rc);\n      }\n    }\n\n    /* Add a field to the new.* record. Or the only record if currently\n    ** generating a patchset.  */\n    if( bChanged || (bPatchset && abPK[i]) ){\n      sessionAppendCol(&buf2, pStmt, i, &rc);\n    }else{\n      sessionAppendByte(&buf2, 0, &rc);\n    }\n\n    pCsr += nAdvance;\n  }\n\n  if( bNoop ){\n    pBuf->nBuf = nRewind;\n  }else{\n    sessionAppendBlob(pBuf, buf2.aBuf, buf2.nBuf, &rc);\n  }\n  sqlite3_free(buf2.aBuf);\n\n  return rc;\n}\n\n/*\n** Append a DELETE change to the buffer passed as the first argument. Use\n** the changeset format if argument bPatchset is zero, or the patchset\n** format otherwise.\n*/\nstatic int sessionAppendDelete(\n  SessionBuffer *pBuf,            /* Buffer to append to */\n  int bPatchset,                  /* True for \"patchset\", 0 for \"changeset\" */\n  SessionChange *p,               /* Object containing old values */\n  int nCol,                       /* Number of columns in table */\n  u8 *abPK                        /* Boolean array - true for PK columns */\n){\n  int rc = SQLITE_OK;\n\n  sessionAppendByte(pBuf, SQLITE_DELETE, &rc);\n  sessionAppendByte(pBuf, p->bIndirect, &rc);\n\n  if( bPatchset==0 ){\n    sessionAppendBlob(pBuf, p->aRecord, p->nRecord, &rc);\n  }else{\n    int i;\n    u8 *a = p->aRecord;\n    for(i=0; i<nCol; i++){\n      u8 *pStart = a;\n      int eType = *a++;\n\n      switch( eType ){\n        case 0:\n        case SQLITE_NULL:\n          assert( abPK[i]==0 );\n          break;\n\n        case SQLITE_FLOAT:\n        case SQLITE_INTEGER:\n          a += 8;\n          break;\n\n        default: {\n          int n;\n          a += sessionVarintGet(a, &n);\n          a += n;\n          break;\n        }\n      }\n      if( abPK[i] ){\n        sessionAppendBlob(pBuf, pStart, (int)(a-pStart), &rc);\n      }\n    }\n    assert( (a - p->aRecord)==p->nRecord );\n  }\n\n  return rc;\n}\n\nstatic int sessionPrepare(\n  sqlite3 *db,\n  sqlite3_stmt **pp,\n  char **pzErrmsg,\n  const char *zSql\n){\n  int rc = sqlite3_prepare_v2(db, zSql, -1, pp, 0);\n  if( pzErrmsg && rc!=SQLITE_OK ){\n    *pzErrmsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(db));\n  }\n  return rc;\n}\n\n/*\n** Formulate and prepare a SELECT statement to retrieve a row from table\n** zTab in database zDb based on its primary key. i.e.\n**\n**   SELECT *, <noop-test> FROM zDb.zTab WHERE (pk1, pk2,...) IS (?1, ?2,...)\n**\n** where <noop-test> is:\n**\n**   1 AND (?A OR ?1 IS <column>) AND ...\n**\n** for each non-pk <column>.\n*/\nstatic int sessionSelectStmt(\n  sqlite3 *db,                    /* Database handle */\n  int bIgnoreNoop,\n  const char *zDb,                /* Database name */\n  const char *zTab,               /* Table name */\n  int bRowid,\n  int nCol,                       /* Number of columns in table */\n  const char **azCol,             /* Names of table columns */\n  u8 *abPK,                       /* PRIMARY KEY  array */\n  sqlite3_stmt **ppStmt,          /* OUT: Prepared SELECT statement */\n  char **pzErrmsg                 /* OUT: Error message */\n){\n  int rc = SQLITE_OK;\n  char *zSql = 0;\n  const char *zSep = \"\";\n  int i;\n\n  SessionBuffer cols = {0, 0, 0};\n  SessionBuffer nooptest = {0, 0, 0};\n  SessionBuffer pkfield = {0, 0, 0};\n  SessionBuffer pkvar = {0, 0, 0};\n\n  sessionAppendStr(&nooptest, \", 1\", &rc);\n\n  if( 0==sqlite3_stricmp(\"sqlite_stat1\", zTab) ){\n    sessionAppendStr(&nooptest, \" AND (?6 OR ?3 IS stat)\", &rc);\n    sessionAppendStr(&pkfield, \"tbl, idx\", &rc);\n    sessionAppendStr(&pkvar,\n        \"?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\", &rc\n    );\n    sessionAppendStr(&cols, \"tbl, ?2, stat\", &rc);\n  }else{\n  #if 0\n    if( bRowid ){\n      sessionAppendStr(&cols, SESSIONS_ROWID, &rc);\n    }\n    #endif\n    for(i=0; i<nCol; i++){\n      if( cols.nBuf ) sessionAppendStr(&cols, \", \", &rc);\n      sessionAppendIdent(&cols, azCol[i], &rc);\n      if( abPK[i] ){\n        sessionAppendStr(&pkfield, zSep, &rc);\n        sessionAppendStr(&pkvar, zSep, &rc);\n        zSep = \", \";\n        sessionAppendIdent(&pkfield, azCol[i], &rc);\n        sessionAppendPrintf(&pkvar, &rc, \"?%d\", i+1);\n      }else{\n        sessionAppendPrintf(&nooptest, &rc,\n            \" AND (?%d OR ?%d IS %w.%w)\", i+1+nCol, i+1, zTab, azCol[i]\n        );\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    zSql = sqlite3_mprintf(\n        \"SELECT %s%s FROM %Q.%Q WHERE (%s) IS (%s)\",\n        (char*)cols.aBuf, (bIgnoreNoop ? (char*)nooptest.aBuf : \"\"),\n        zDb, zTab, (char*)pkfield.aBuf, (char*)pkvar.aBuf\n    );\n    if( zSql==0 ) rc = SQLITE_NOMEM;\n  }\n\n#if 0\n  if( 0==sqlite3_stricmp(\"sqlite_stat1\", zTab) ){\n    zSql = sqlite3_mprintf(\n        \"SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND \"\n        \"idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\", zDb\n    );\n    if( zSql==0 ) rc = SQLITE_NOMEM;\n  }else{\n    const char *zSep = \"\";\n    SessionBuffer buf = {0, 0, 0};\n\n    sessionAppendStr(&buf, \"SELECT * FROM \", &rc);\n    sessionAppendIdent(&buf, zDb, &rc);\n    sessionAppendStr(&buf, \".\", &rc);\n    sessionAppendIdent(&buf, zTab, &rc);\n    sessionAppendStr(&buf, \" WHERE \", &rc);\n    for(i=0; i<nCol; i++){\n      if( abPK[i] ){\n        sessionAppendStr(&buf, zSep, &rc);\n        sessionAppendIdent(&buf, azCol[i], &rc);\n        sessionAppendStr(&buf, \" IS ?\", &rc);\n        sessionAppendInteger(&buf, i+1, &rc);\n        zSep = \" AND \";\n      }\n    }\n    zSql = (char*)buf.aBuf;\n    nSql = buf.nBuf;\n  }\n#endif\n\n  if( rc==SQLITE_OK ){\n    rc = sessionPrepare(db, ppStmt, pzErrmsg, zSql);\n  }\n  sqlite3_free(zSql);\n  sqlite3_free(nooptest.aBuf);\n  sqlite3_free(pkfield.aBuf);\n  sqlite3_free(pkvar.aBuf);\n  sqlite3_free(cols.aBuf);\n  return rc;\n}\n\n/*\n** Bind the PRIMARY KEY values from the change passed in argument pChange\n** to the SELECT statement passed as the first argument. The SELECT statement\n** is as prepared by function sessionSelectStmt().\n**\n** Return SQLITE_OK if all PK values are successfully bound, or an SQLite\n** error code (e.g. SQLITE_NOMEM) otherwise.\n*/\nstatic int sessionSelectBind(\n  sqlite3_stmt *pSelect,          /* SELECT from sessionSelectStmt() */\n  int nCol,                       /* Number of columns in table */\n  u8 *abPK,                       /* PRIMARY KEY array */\n  SessionChange *pChange          /* Change structure */\n){\n  int i;\n  int rc = SQLITE_OK;\n  u8 *a = pChange->aRecord;\n\n  for(i=0; i<nCol && rc==SQLITE_OK; i++){\n    int eType = *a++;\n\n    switch( eType ){\n      case 0:\n      case SQLITE_NULL:\n        assert( abPK[i]==0 );\n        break;\n\n      case SQLITE_INTEGER: {\n        if( abPK[i] ){\n          i64 iVal = sessionGetI64(a);\n          rc = sqlite3_bind_int64(pSelect, i+1, iVal);\n        }\n        a += 8;\n        break;\n      }\n\n      case SQLITE_FLOAT: {\n        if( abPK[i] ){\n          double rVal;\n          i64 iVal = sessionGetI64(a);\n          memcpy(&rVal, &iVal, 8);\n          rc = sqlite3_bind_double(pSelect, i+1, rVal);\n        }\n        a += 8;\n        break;\n      }\n\n      case SQLITE_TEXT: {\n        int n;\n        a += sessionVarintGet(a, &n);\n        if( abPK[i] ){\n          rc = sqlite3_bind_text(pSelect, i+1, (char *)a, n, SQLITE_TRANSIENT);\n        }\n        a += n;\n        break;\n      }\n\n      default: {\n        int n;\n        assert( eType==SQLITE_BLOB );\n        a += sessionVarintGet(a, &n);\n        if( abPK[i] ){\n          rc = sqlite3_bind_blob(pSelect, i+1, a, n, SQLITE_TRANSIENT);\n        }\n        a += n;\n        break;\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is a no-op if *pRc is set to other than SQLITE_OK when it\n** is called. Otherwise, append a serialized table header (part of the binary\n** changeset format) to buffer *pBuf. If an error occurs, set *pRc to an\n** SQLite error code before returning.\n*/\nstatic void sessionAppendTableHdr(\n  SessionBuffer *pBuf,            /* Append header to this buffer */\n  int bPatchset,                  /* Use the patchset format if true */\n  SessionTable *pTab,             /* Table object to append header for */\n  int *pRc                        /* IN/OUT: Error code */\n){\n  /* Write a table header */\n  sessionAppendByte(pBuf, (bPatchset ? 'P' : 'T'), pRc);\n  sessionAppendVarint(pBuf, pTab->nCol, pRc);\n  sessionAppendBlob(pBuf, pTab->abPK, pTab->nCol, pRc);\n  sessionAppendBlob(pBuf, (u8 *)pTab->zName, (int)strlen(pTab->zName)+1, pRc);\n}\n\n/*\n** Generate either a changeset (if argument bPatchset is zero) or a patchset\n** (if it is non-zero) based on the current contents of the session object\n** passed as the first argument.\n**\n** If no error occurs, SQLITE_OK is returned and the new changeset/patchset\n** stored in output variables *pnChangeset and *ppChangeset. Or, if an error\n** occurs, an SQLite error code is returned and both output variables set\n** to 0.\n*/\nstatic int sessionGenerateChangeset(\n  sqlite3_session *pSession,      /* Session object */\n  int bPatchset,                  /* True for patchset, false for changeset */\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut,                     /* First argument for xOutput */\n  int *pnChangeset,               /* OUT: Size of buffer at *ppChangeset */\n  void **ppChangeset              /* OUT: Buffer containing changeset */\n){\n  sqlite3 *db = pSession->db;     /* Source database handle */\n  SessionTable *pTab;             /* Used to iterate through attached tables */\n  SessionBuffer buf = {0,0,0};    /* Buffer in which to accumulate changeset */\n  int rc;                         /* Return code */\n\n  assert( xOutput==0 || (pnChangeset==0 && ppChangeset==0) );\n  assert( xOutput!=0 || (pnChangeset!=0 && ppChangeset!=0) );\n\n  /* Zero the output variables in case an error occurs. If this session\n  ** object is already in the error state (sqlite3_session.rc != SQLITE_OK),\n  ** this call will be a no-op.  */\n  if( xOutput==0 ){\n    assert( pnChangeset!=0  && ppChangeset!=0 );\n    *pnChangeset = 0;\n    *ppChangeset = 0;\n  }\n\n  if( pSession->rc ) return pSession->rc;\n  rc = sqlite3_exec(pSession->db, \"SAVEPOINT changeset\", 0, 0, 0);\n  if( rc!=SQLITE_OK ) return rc;\n\n  sqlite3_mutex_enter(sqlite3_db_mutex(db));\n\n  for(pTab=pSession->pTable; rc==SQLITE_OK && pTab; pTab=pTab->pNext){\n    if( pTab->nEntry ){\n      const char *zName = pTab->zName;\n      int i;                      /* Used to iterate through hash buckets */\n      sqlite3_stmt *pSel = 0;     /* SELECT statement to query table pTab */\n      int nRewind = buf.nBuf;     /* Initial size of write buffer */\n      int nNoop;                  /* Size of buffer after writing tbl header */\n      int nOldCol = pTab->nCol;\n\n      /* Check the table schema is still Ok. */\n      rc = sessionReinitTable(pSession, pTab);\n      if( rc==SQLITE_OK && pTab->nCol!=nOldCol ){\n        rc = sessionUpdateChanges(pSession, pTab);\n      }\n\n      /* Write a table header */\n      sessionAppendTableHdr(&buf, bPatchset, pTab, &rc);\n\n      /* Build and compile a statement to execute: */\n      if( rc==SQLITE_OK ){\n        rc = sessionSelectStmt(db, 0, pSession->zDb,\n            zName, pTab->bRowid, pTab->nCol, pTab->azCol, pTab->abPK, &pSel, 0\n        );\n      }\n\n      nNoop = buf.nBuf;\n      for(i=0; i<pTab->nChange && rc==SQLITE_OK; i++){\n        SessionChange *p;         /* Used to iterate through changes */\n\n        for(p=pTab->apChange[i]; rc==SQLITE_OK && p; p=p->pNext){\n          rc = sessionSelectBind(pSel, pTab->nCol, pTab->abPK, p);\n          if( rc!=SQLITE_OK ) continue;\n          if( sqlite3_step(pSel)==SQLITE_ROW ){\n            if( p->op==SQLITE_INSERT ){\n              int iCol;\n              sessionAppendByte(&buf, SQLITE_INSERT, &rc);\n              sessionAppendByte(&buf, p->bIndirect, &rc);\n              for(iCol=0; iCol<pTab->nCol; iCol++){\n                sessionAppendCol(&buf, pSel, iCol, &rc);\n              }\n            }else{\n              assert( pTab->abPK!=0 );\n              rc = sessionAppendUpdate(&buf, bPatchset, pSel, p, pTab->abPK);\n            }\n          }else if( p->op!=SQLITE_INSERT ){\n            rc = sessionAppendDelete(&buf, bPatchset, p, pTab->nCol,pTab->abPK);\n          }\n          if( rc==SQLITE_OK ){\n            rc = sqlite3_reset(pSel);\n          }\n\n          /* If the buffer is now larger than sessions_strm_chunk_size, pass\n          ** its contents to the xOutput() callback. */\n          if( xOutput\n           && rc==SQLITE_OK\n           && buf.nBuf>nNoop\n           && buf.nBuf>sessions_strm_chunk_size\n          ){\n            rc = xOutput(pOut, (void*)buf.aBuf, buf.nBuf);\n            nNoop = -1;\n            buf.nBuf = 0;\n          }\n\n        }\n      }\n\n      sqlite3_finalize(pSel);\n      if( buf.nBuf==nNoop ){\n        buf.nBuf = nRewind;\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    if( xOutput==0 ){\n      *pnChangeset = buf.nBuf;\n      *ppChangeset = buf.aBuf;\n      buf.aBuf = 0;\n    }else if( buf.nBuf>0 ){\n      rc = xOutput(pOut, (void*)buf.aBuf, buf.nBuf);\n    }\n  }\n\n  sqlite3_free(buf.aBuf);\n  sqlite3_exec(db, \"RELEASE changeset\", 0, 0, 0);\n  sqlite3_mutex_leave(sqlite3_db_mutex(db));\n  return rc;\n}\n\n/*\n** Obtain a changeset object containing all changes recorded by the\n** session object passed as the first argument.\n**\n** It is the responsibility of the caller to eventually free the buffer\n** using sqlite3_free().\n*/\nSQLITE_API int sqlite3session_changeset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnChangeset,               /* OUT: Size of buffer at *ppChangeset */\n  void **ppChangeset              /* OUT: Buffer containing changeset */\n){\n  int rc;\n\n  if( pnChangeset==0 || ppChangeset==0 ) return SQLITE_MISUSE;\n  rc = sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset);\n  assert( rc || pnChangeset==0\n       || pSession->bEnableSize==0 || *pnChangeset<=pSession->nMaxChangesetSize\n  );\n  return rc;\n}\n\n/*\n** Streaming version of sqlite3session_changeset().\n*/\nSQLITE_API int sqlite3session_changeset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  if( xOutput==0 ) return SQLITE_MISUSE;\n  return sessionGenerateChangeset(pSession, 0, xOutput, pOut, 0, 0);\n}\n\n/*\n** Streaming version of sqlite3session_patchset().\n*/\nSQLITE_API int sqlite3session_patchset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  if( xOutput==0 ) return SQLITE_MISUSE;\n  return sessionGenerateChangeset(pSession, 1, xOutput, pOut, 0, 0);\n}\n\n/*\n** Obtain a patchset object containing all changes recorded by the\n** session object passed as the first argument.\n**\n** It is the responsibility of the caller to eventually free the buffer\n** using sqlite3_free().\n*/\nSQLITE_API int sqlite3session_patchset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnPatchset,                /* OUT: Size of buffer at *ppChangeset */\n  void **ppPatchset               /* OUT: Buffer containing changeset */\n){\n  if( pnPatchset==0 || ppPatchset==0 ) return SQLITE_MISUSE;\n  return sessionGenerateChangeset(pSession, 1, 0, 0, pnPatchset, ppPatchset);\n}\n\n/*\n** Enable or disable the session object passed as the first argument.\n*/\nSQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable){\n  int ret;\n  sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));\n  if( bEnable>=0 ){\n    pSession->bEnable = bEnable;\n  }\n  ret = pSession->bEnable;\n  sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));\n  return ret;\n}\n\n/*\n** Enable or disable the session object passed as the first argument.\n*/\nSQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect){\n  int ret;\n  sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));\n  if( bIndirect>=0 ){\n    pSession->bIndirect = bIndirect;\n  }\n  ret = pSession->bIndirect;\n  sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));\n  return ret;\n}\n\n/*\n** Return true if there have been no changes to monitored tables recorded\n** by the session object passed as the only argument.\n*/\nSQLITE_API int sqlite3session_isempty(sqlite3_session *pSession){\n  int ret = 0;\n  SessionTable *pTab;\n\n  sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));\n  for(pTab=pSession->pTable; pTab && ret==0; pTab=pTab->pNext){\n    ret = (pTab->nEntry>0);\n  }\n  sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));\n\n  return (ret==0);\n}\n\n/*\n** Return the amount of heap memory in use.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession){\n  return pSession->nMalloc;\n}\n\n/*\n** Configure the session object passed as the first argument.\n*/\nSQLITE_API int sqlite3session_object_config(sqlite3_session *pSession, int op, void *pArg){\n  int rc = SQLITE_OK;\n  switch( op ){\n    case SQLITE_SESSION_OBJCONFIG_SIZE: {\n      int iArg = *(int*)pArg;\n      if( iArg>=0 ){\n        if( pSession->pTable ){\n          rc = SQLITE_MISUSE;\n        }else{\n          pSession->bEnableSize = (iArg!=0);\n        }\n      }\n      *(int*)pArg = pSession->bEnableSize;\n      break;\n    }\n\n    case SQLITE_SESSION_OBJCONFIG_ROWID: {\n      int iArg = *(int*)pArg;\n      if( iArg>=0 ){\n        if( pSession->pTable ){\n          rc = SQLITE_MISUSE;\n        }else{\n          pSession->bImplicitPK = (iArg!=0);\n        }\n      }\n      *(int*)pArg = pSession->bImplicitPK;\n      break;\n    }\n\n    default:\n      rc = SQLITE_MISUSE;\n  }\n\n  return rc;\n}\n\n/*\n** Return the maximum size of sqlite3session_changeset() output.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession){\n  return pSession->nMaxChangesetSize;\n}\n\n/*\n** Do the work for either sqlite3changeset_start() or start_strm().\n*/\nstatic int sessionChangesetStart(\n  sqlite3_changeset_iter **pp,    /* OUT: Changeset iterator handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int nChangeset,                 /* Size of buffer pChangeset in bytes */\n  void *pChangeset,               /* Pointer to buffer containing changeset */\n  int bInvert,                    /* True to invert changeset */\n  int bSkipEmpty                  /* True to skip empty UPDATE changes */\n){\n  sqlite3_changeset_iter *pRet;   /* Iterator to return */\n  int nByte;                      /* Number of bytes to allocate for iterator */\n\n  assert( xInput==0 || (pChangeset==0 && nChangeset==0) );\n\n  /* Zero the output variable in case an error occurs. */\n  *pp = 0;\n\n  /* Allocate and initialize the iterator structure. */\n  nByte = sizeof(sqlite3_changeset_iter);\n  pRet = (sqlite3_changeset_iter *)sqlite3_malloc(nByte);\n  if( !pRet ) return SQLITE_NOMEM;\n  memset(pRet, 0, sizeof(sqlite3_changeset_iter));\n  pRet->in.aData = (u8 *)pChangeset;\n  pRet->in.nData = nChangeset;\n  pRet->in.xInput = xInput;\n  pRet->in.pIn = pIn;\n  pRet->in.bEof = (xInput ? 0 : 1);\n  pRet->bInvert = bInvert;\n  pRet->bSkipEmpty = bSkipEmpty;\n\n  /* Populate the output variable and return success. */\n  *pp = pRet;\n  return SQLITE_OK;\n}\n\n/*\n** Create an iterator used to iterate through the contents of a changeset.\n*/\nSQLITE_API int sqlite3changeset_start(\n  sqlite3_changeset_iter **pp,    /* OUT: Changeset iterator handle */\n  int nChangeset,                 /* Size of buffer pChangeset in bytes */\n  void *pChangeset                /* Pointer to buffer containing changeset */\n){\n  return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset, 0, 0);\n}\nSQLITE_API int sqlite3changeset_start_v2(\n  sqlite3_changeset_iter **pp,    /* OUT: Changeset iterator handle */\n  int nChangeset,                 /* Size of buffer pChangeset in bytes */\n  void *pChangeset,               /* Pointer to buffer containing changeset */\n  int flags\n){\n  int bInvert = !!(flags & SQLITE_CHANGESETSTART_INVERT);\n  return sessionChangesetStart(pp, 0, 0, nChangeset, pChangeset, bInvert, 0);\n}\n\n/*\n** Streaming version of sqlite3changeset_start().\n*/\nSQLITE_API int sqlite3changeset_start_strm(\n  sqlite3_changeset_iter **pp,    /* OUT: Changeset iterator handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn\n){\n  return sessionChangesetStart(pp, xInput, pIn, 0, 0, 0, 0);\n}\nSQLITE_API int sqlite3changeset_start_v2_strm(\n  sqlite3_changeset_iter **pp,    /* OUT: Changeset iterator handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int flags\n){\n  int bInvert = !!(flags & SQLITE_CHANGESETSTART_INVERT);\n  return sessionChangesetStart(pp, xInput, pIn, 0, 0, bInvert, 0);\n}\n\n/*\n** If the SessionInput object passed as the only argument is a streaming\n** object and the buffer is full, discard some data to free up space.\n*/\nstatic void sessionDiscardData(SessionInput *pIn){\n  if( pIn->xInput && pIn->iCurrent>=sessions_strm_chunk_size ){\n    int nMove = pIn->buf.nBuf - pIn->iCurrent;\n    assert( nMove>=0 );\n    if( nMove>0 ){\n      memmove(pIn->buf.aBuf, &pIn->buf.aBuf[pIn->iCurrent], nMove);\n    }\n    pIn->buf.nBuf -= pIn->iCurrent;\n    pIn->iNext -= pIn->iCurrent;\n    pIn->iCurrent = 0;\n    pIn->nData = pIn->buf.nBuf;\n  }\n}\n\n/*\n** Ensure that there are at least nByte bytes available in the buffer. Or,\n** if there are not nByte bytes remaining in the input, that all available\n** data is in the buffer.\n**\n** Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.\n*/\nstatic int sessionInputBuffer(SessionInput *pIn, int nByte){\n  int rc = SQLITE_OK;\n  if( pIn->xInput ){\n    while( !pIn->bEof && (pIn->iNext+nByte)>=pIn->nData && rc==SQLITE_OK ){\n      int nNew = sessions_strm_chunk_size;\n\n      if( pIn->bNoDiscard==0 ) sessionDiscardData(pIn);\n      if( SQLITE_OK==sessionBufferGrow(&pIn->buf, nNew, &rc) ){\n        rc = pIn->xInput(pIn->pIn, &pIn->buf.aBuf[pIn->buf.nBuf], &nNew);\n        if( nNew==0 ){\n          pIn->bEof = 1;\n        }else{\n          pIn->buf.nBuf += nNew;\n        }\n      }\n\n      pIn->aData = pIn->buf.aBuf;\n      pIn->nData = pIn->buf.nBuf;\n    }\n  }\n  return rc;\n}\n\n/*\n** When this function is called, *ppRec points to the start of a record\n** that contains nCol values. This function advances the pointer *ppRec\n** until it points to the byte immediately following that record.\n*/\nstatic void sessionSkipRecord(\n  u8 **ppRec,                     /* IN/OUT: Record pointer */\n  int nCol                        /* Number of values in record */\n){\n  u8 *aRec = *ppRec;\n  int i;\n  for(i=0; i<nCol; i++){\n    int eType = *aRec++;\n    if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){\n      int nByte;\n      aRec += sessionVarintGet((u8*)aRec, &nByte);\n      aRec += nByte;\n    }else if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n      aRec += 8;\n    }\n  }\n\n  *ppRec = aRec;\n}\n\n/*\n** This function sets the value of the sqlite3_value object passed as the\n** first argument to a copy of the string or blob held in the aData[]\n** buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM\n** error occurs.\n*/\nstatic int sessionValueSetStr(\n  sqlite3_value *pVal,            /* Set the value of this object */\n  u8 *aData,                      /* Buffer containing string or blob data */\n  int nData,                      /* Size of buffer aData[] in bytes */\n  u8 enc                          /* String encoding (0 for blobs) */\n){\n  /* In theory this code could just pass SQLITE_TRANSIENT as the final\n  ** argument to sqlite3ValueSetStr() and have the copy created\n  ** automatically. But doing so makes it difficult to detect any OOM\n  ** error. Hence the code to create the copy externally. */\n  u8 *aCopy = sqlite3_malloc64((sqlite3_int64)nData+1);\n  if( aCopy==0 ) return SQLITE_NOMEM;\n  memcpy(aCopy, aData, nData);\n  sqlite3ValueSetStr(pVal, nData, (char*)aCopy, enc, sqlite3_free);\n  return SQLITE_OK;\n}\n\n/*\n** Deserialize a single record from a buffer in memory. See \"RECORD FORMAT\"\n** for details.\n**\n** When this function is called, *paChange points to the start of the record\n** to deserialize. Assuming no error occurs, *paChange is set to point to\n** one byte after the end of the same record before this function returns.\n** If the argument abPK is NULL, then the record contains nCol values. Or,\n** if abPK is other than NULL, then the record contains only the PK fields\n** (in other words, it is a patchset DELETE record).\n**\n** If successful, each element of the apOut[] array (allocated by the caller)\n** is set to point to an sqlite3_value object containing the value read\n** from the corresponding position in the record. If that value is not\n** included in the record (i.e. because the record is part of an UPDATE change\n** and the field was not modified), the corresponding element of apOut[] is\n** set to NULL.\n**\n** It is the responsibility of the caller to free all sqlite_value structures\n** using sqlite3_free().\n**\n** If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.\n** The apOut[] array may have been partially populated in this case.\n*/\nstatic int sessionReadRecord(\n  SessionInput *pIn,              /* Input data */\n  int nCol,                       /* Number of values in record */\n  u8 *abPK,                       /* Array of primary key flags, or NULL */\n  sqlite3_value **apOut,          /* Write values to this array */\n  int *pbEmpty\n){\n  int i;                          /* Used to iterate through columns */\n  int rc = SQLITE_OK;\n\n  assert( pbEmpty==0 || *pbEmpty==0 );\n  if( pbEmpty ) *pbEmpty = 1;\n  for(i=0; i<nCol && rc==SQLITE_OK; i++){\n    int eType = 0;                /* Type of value (SQLITE_NULL, TEXT etc.) */\n    if( abPK && abPK[i]==0 ) continue;\n    rc = sessionInputBuffer(pIn, 9);\n    if( rc==SQLITE_OK ){\n      if( pIn->iNext>=pIn->nData ){\n        rc = SQLITE_CORRUPT_BKPT;\n      }else{\n        eType = pIn->aData[pIn->iNext++];\n        assert( apOut[i]==0 );\n        if( eType ){\n          if( pbEmpty ) *pbEmpty = 0;\n          apOut[i] = sqlite3ValueNew(0);\n          if( !apOut[i] ) rc = SQLITE_NOMEM;\n        }\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      u8 *aVal = &pIn->aData[pIn->iNext];\n      if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){\n        int nByte;\n        pIn->iNext += sessionVarintGet(aVal, &nByte);\n        rc = sessionInputBuffer(pIn, nByte);\n        if( rc==SQLITE_OK ){\n          if( nByte<0 || nByte>pIn->nData-pIn->iNext ){\n            rc = SQLITE_CORRUPT_BKPT;\n          }else{\n            u8 enc = (eType==SQLITE_TEXT ? SQLITE_UTF8 : 0);\n            rc = sessionValueSetStr(apOut[i],&pIn->aData[pIn->iNext],nByte,enc);\n            pIn->iNext += nByte;\n          }\n        }\n      }\n      if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n        if( (pIn->nData-pIn->iNext)<8 ){\n          rc = SQLITE_CORRUPT_BKPT;\n        }else{\n          sqlite3_int64 v = sessionGetI64(aVal);\n          if( eType==SQLITE_INTEGER ){\n            sqlite3VdbeMemSetInt64(apOut[i], v);\n          }else{\n            double d;\n            memcpy(&d, &v, 8);\n            sqlite3VdbeMemSetDouble(apOut[i], d);\n          }\n          pIn->iNext += 8;\n        }\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** The input pointer currently points to the second byte of a table-header.\n** Specifically, to the following:\n**\n**   + number of columns in table (varint)\n**   + array of PK flags (1 byte per column),\n**   + table name (nul terminated).\n**\n** This function ensures that all of the above is present in the input\n** buffer (i.e. that it can be accessed without any calls to xInput()).\n** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.\n** The input pointer is not moved.\n*/\nstatic int sessionChangesetBufferTblhdr(SessionInput *pIn, int *pnByte){\n  int rc = SQLITE_OK;\n  int nCol = 0;\n  int nRead = 0;\n\n  rc = sessionInputBuffer(pIn, 9);\n  if( rc==SQLITE_OK ){\n    nRead += sessionVarintGet(&pIn->aData[pIn->iNext + nRead], &nCol);\n    /* The hard upper limit for the number of columns in an SQLite\n    ** database table is, according to sqliteLimit.h, 32676. So\n    ** consider any table-header that purports to have more than 65536\n    ** columns to be corrupt. This is convenient because otherwise,\n    ** if the (nCol>65536) condition below were omitted, a sufficiently\n    ** large value for nCol may cause nRead to wrap around and become\n    ** negative. Leading to a crash. */\n    if( nCol<0 || nCol>65536 ){\n      rc = SQLITE_CORRUPT_BKPT;\n    }else{\n      rc = sessionInputBuffer(pIn, nRead+nCol+100);\n      nRead += nCol;\n    }\n  }\n\n  while( rc==SQLITE_OK ){\n    while( (pIn->iNext + nRead)<pIn->nData && pIn->aData[pIn->iNext + nRead] ){\n      nRead++;\n    }\n    if( (pIn->iNext + nRead)<pIn->nData ) break;\n    rc = sessionInputBuffer(pIn, nRead + 100);\n  }\n  *pnByte = nRead+1;\n  return rc;\n}\n\n/*\n** The input pointer currently points to the first byte of the first field\n** of a record consisting of nCol columns. This function ensures the entire\n** record is buffered. It does not move the input pointer.\n**\n** If successful, SQLITE_OK is returned and *pnByte is set to the size of\n** the record in bytes. Otherwise, an SQLite error code is returned. The\n** final value of *pnByte is undefined in this case.\n*/\nstatic int sessionChangesetBufferRecord(\n  SessionInput *pIn,              /* Input data */\n  int nCol,                       /* Number of columns in record */\n  int *pnByte                     /* OUT: Size of record in bytes */\n){\n  int rc = SQLITE_OK;\n  int nByte = 0;\n  int i;\n  for(i=0; rc==SQLITE_OK && i<nCol; i++){\n    int eType;\n    rc = sessionInputBuffer(pIn, nByte + 10);\n    if( rc==SQLITE_OK ){\n      eType = pIn->aData[pIn->iNext + nByte++];\n      if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){\n        int n;\n        nByte += sessionVarintGet(&pIn->aData[pIn->iNext+nByte], &n);\n        nByte += n;\n        rc = sessionInputBuffer(pIn, nByte);\n      }else if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){\n        nByte += 8;\n      }\n    }\n  }\n  *pnByte = nByte;\n  return rc;\n}\n\n/*\n** The input pointer currently points to the second byte of a table-header.\n** Specifically, to the following:\n**\n**   + number of columns in table (varint)\n**   + array of PK flags (1 byte per column),\n**   + table name (nul terminated).\n**\n** This function decodes the table-header and populates the p->nCol,\n** p->zTab and p->abPK[] variables accordingly. The p->apValue[] array is\n** also allocated or resized according to the new value of p->nCol. The\n** input pointer is left pointing to the byte following the table header.\n**\n** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code\n** is returned and the final values of the various fields enumerated above\n** are undefined.\n*/\nstatic int sessionChangesetReadTblhdr(sqlite3_changeset_iter *p){\n  int rc;\n  int nCopy;\n  assert( p->rc==SQLITE_OK );\n\n  rc = sessionChangesetBufferTblhdr(&p->in, &nCopy);\n  if( rc==SQLITE_OK ){\n    int nByte;\n    int nVarint;\n    nVarint = sessionVarintGet(&p->in.aData[p->in.iNext], &p->nCol);\n    if( p->nCol>0 ){\n      nCopy -= nVarint;\n      p->in.iNext += nVarint;\n      nByte = p->nCol * sizeof(sqlite3_value*) * 2 + nCopy;\n      p->tblhdr.nBuf = 0;\n      sessionBufferGrow(&p->tblhdr, nByte, &rc);\n    }else{\n      rc = SQLITE_CORRUPT_BKPT;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    size_t iPK = sizeof(sqlite3_value*)*p->nCol*2;\n    memset(p->tblhdr.aBuf, 0, iPK);\n    memcpy(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy);\n    p->in.iNext += nCopy;\n  }\n\n  p->apValue = (sqlite3_value**)p->tblhdr.aBuf;\n  if( p->apValue==0 ){\n    p->abPK = 0;\n    p->zTab = 0;\n  }else{\n    p->abPK = (u8*)&p->apValue[p->nCol*2];\n    p->zTab = p->abPK ? (char*)&p->abPK[p->nCol] : 0;\n  }\n  return (p->rc = rc);\n}\n\n/*\n** Advance the changeset iterator to the next change. The differences between\n** this function and sessionChangesetNext() are that\n**\n**   * If pbEmpty is not NULL and the change is a no-op UPDATE (an UPDATE\n**     that modifies no columns), this function sets (*pbEmpty) to 1.\n**\n**   * If the iterator is configured to skip no-op UPDATEs,\n**     sessionChangesetNext() does that. This function does not.\n*/\nstatic int sessionChangesetNextOne(\n  sqlite3_changeset_iter *p,      /* Changeset iterator */\n  u8 **paRec,                     /* If non-NULL, store record pointer here */\n  int *pnRec,                     /* If non-NULL, store size of record here */\n  int *pbNew,                     /* If non-NULL, true if new table */\n  int *pbEmpty\n){\n  int i;\n  u8 op;\n\n  assert( (paRec==0 && pnRec==0) || (paRec && pnRec) );\n  assert( pbEmpty==0 || *pbEmpty==0 );\n\n  /* If the iterator is in the error-state, return immediately. */\n  if( p->rc!=SQLITE_OK ) return p->rc;\n\n  /* Free the current contents of p->apValue[], if any. */\n  if( p->apValue ){\n    for(i=0; i<p->nCol*2; i++){\n      sqlite3ValueFree(p->apValue[i]);\n    }\n    memset(p->apValue, 0, sizeof(sqlite3_value*)*p->nCol*2);\n  }\n\n  /* Make sure the buffer contains at least 10 bytes of input data, or all\n  ** remaining data if there are less than 10 bytes available. This is\n  ** sufficient either for the 'T' or 'P' byte and the varint that follows\n  ** it, or for the two single byte values otherwise. */\n  p->rc = sessionInputBuffer(&p->in, 2);\n  if( p->rc!=SQLITE_OK ) return p->rc;\n\n  p->in.iCurrent = p->in.iNext;\n  sessionDiscardData(&p->in);\n\n  /* If the iterator is already at the end of the changeset, return DONE. */\n  if( p->in.iNext>=p->in.nData ){\n    return SQLITE_DONE;\n  }\n\n  op = p->in.aData[p->in.iNext++];\n  while( op=='T' || op=='P' ){\n    if( pbNew ) *pbNew = 1;\n    p->bPatchset = (op=='P');\n    if( sessionChangesetReadTblhdr(p) ) return p->rc;\n    if( (p->rc = sessionInputBuffer(&p->in, 2)) ) return p->rc;\n    p->in.iCurrent = p->in.iNext;\n    if( p->in.iNext>=p->in.nData ) return SQLITE_DONE;\n    op = p->in.aData[p->in.iNext++];\n  }\n\n  if( p->zTab==0 || (p->bPatchset && p->bInvert) ){\n    /* The first record in the changeset is not a table header. Must be a\n    ** corrupt changeset. */\n    assert( p->in.iNext==1 || p->zTab );\n    return (p->rc = SQLITE_CORRUPT_BKPT);\n  }\n\n  p->op = op;\n  p->bIndirect = p->in.aData[p->in.iNext++];\n  if( p->op!=SQLITE_UPDATE && p->op!=SQLITE_DELETE && p->op!=SQLITE_INSERT ){\n    return (p->rc = SQLITE_CORRUPT_BKPT);\n  }\n\n  if( paRec ){\n    int nVal;                     /* Number of values to buffer */\n    if( p->bPatchset==0 && op==SQLITE_UPDATE ){\n      nVal = p->nCol * 2;\n    }else if( p->bPatchset && op==SQLITE_DELETE ){\n      nVal = 0;\n      for(i=0; i<p->nCol; i++) if( p->abPK[i] ) nVal++;\n    }else{\n      nVal = p->nCol;\n    }\n    p->rc = sessionChangesetBufferRecord(&p->in, nVal, pnRec);\n    if( p->rc!=SQLITE_OK ) return p->rc;\n    *paRec = &p->in.aData[p->in.iNext];\n    p->in.iNext += *pnRec;\n  }else{\n    sqlite3_value **apOld = (p->bInvert ? &p->apValue[p->nCol] : p->apValue);\n    sqlite3_value **apNew = (p->bInvert ? p->apValue : &p->apValue[p->nCol]);\n\n    /* If this is an UPDATE or DELETE, read the old.* record. */\n    if( p->op!=SQLITE_INSERT && (p->bPatchset==0 || p->op==SQLITE_DELETE) ){\n      u8 *abPK = p->bPatchset ? p->abPK : 0;\n      p->rc = sessionReadRecord(&p->in, p->nCol, abPK, apOld, 0);\n      if( p->rc!=SQLITE_OK ) return p->rc;\n    }\n\n    /* If this is an INSERT or UPDATE, read the new.* record. */\n    if( p->op!=SQLITE_DELETE ){\n      p->rc = sessionReadRecord(&p->in, p->nCol, 0, apNew, pbEmpty);\n      if( p->rc!=SQLITE_OK ) return p->rc;\n    }\n\n    if( (p->bPatchset || p->bInvert) && p->op==SQLITE_UPDATE ){\n      /* If this is an UPDATE that is part of a patchset, then all PK and\n      ** modified fields are present in the new.* record. The old.* record\n      ** is currently completely empty. This block shifts the PK fields from\n      ** new.* to old.*, to accommodate the code that reads these arrays.  */\n      for(i=0; i<p->nCol; i++){\n        assert( p->bPatchset==0 || p->apValue[i]==0 );\n        if( p->abPK[i] ){\n          assert( p->apValue[i]==0 );\n          p->apValue[i] = p->apValue[i+p->nCol];\n          if( p->apValue[i]==0 ) return (p->rc = SQLITE_CORRUPT_BKPT);\n          p->apValue[i+p->nCol] = 0;\n        }\n      }\n    }else if( p->bInvert ){\n      if( p->op==SQLITE_INSERT ) p->op = SQLITE_DELETE;\n      else if( p->op==SQLITE_DELETE ) p->op = SQLITE_INSERT;\n    }\n\n    /* If this is an UPDATE that is part of a changeset, then check that\n    ** there are no fields in the old.* record that are not (a) PK fields,\n    ** or (b) also present in the new.* record.\n    **\n    ** Such records are technically corrupt, but the rebaser was at one\n    ** point generating them. Under most circumstances this is benign, but\n    ** can cause spurious SQLITE_RANGE errors when applying the changeset. */\n    if( p->bPatchset==0 && p->op==SQLITE_UPDATE){\n      for(i=0; i<p->nCol; i++){\n        if( p->abPK[i]==0 && p->apValue[i+p->nCol]==0 ){\n          sqlite3ValueFree(p->apValue[i]);\n          p->apValue[i] = 0;\n        }\n      }\n    }\n  }\n\n  return SQLITE_ROW;\n}\n\n/*\n** Advance the changeset iterator to the next change.\n**\n** If both paRec and pnRec are NULL, then this function works like the public\n** API sqlite3changeset_next(). If SQLITE_ROW is returned, then the\n** sqlite3changeset_new() and old() APIs may be used to query for values.\n**\n** Otherwise, if paRec and pnRec are not NULL, then a pointer to the change\n** record is written to *paRec before returning and the number of bytes in\n** the record to *pnRec.\n**\n** Either way, this function returns SQLITE_ROW if the iterator is\n** successfully advanced to the next change in the changeset, an SQLite\n** error code if an error occurs, or SQLITE_DONE if there are no further\n** changes in the changeset.\n*/\nstatic int sessionChangesetNext(\n  sqlite3_changeset_iter *p,      /* Changeset iterator */\n  u8 **paRec,                     /* If non-NULL, store record pointer here */\n  int *pnRec,                     /* If non-NULL, store size of record here */\n  int *pbNew                      /* If non-NULL, true if new table */\n){\n  int bEmpty;\n  int rc;\n  do {\n    bEmpty = 0;\n    rc = sessionChangesetNextOne(p, paRec, pnRec, pbNew, &bEmpty);\n  }while( rc==SQLITE_ROW && p->bSkipEmpty && bEmpty);\n  return rc;\n}\n\n/*\n** Advance an iterator created by sqlite3changeset_start() to the next\n** change in the changeset. This function may return SQLITE_ROW, SQLITE_DONE\n** or SQLITE_CORRUPT.\n**\n** This function may not be called on iterators passed to a conflict handler\n** callback by changeset_apply().\n*/\nSQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *p){\n  return sessionChangesetNext(p, 0, 0, 0);\n}\n\n/*\n** The following function extracts information on the current change\n** from a changeset iterator. It may only be called after changeset_next()\n** has returned SQLITE_ROW.\n*/\nSQLITE_API int sqlite3changeset_op(\n  sqlite3_changeset_iter *pIter,  /* Iterator handle */\n  const char **pzTab,             /* OUT: Pointer to table name */\n  int *pnCol,                     /* OUT: Number of columns in table */\n  int *pOp,                       /* OUT: SQLITE_INSERT, DELETE or UPDATE */\n  int *pbIndirect                 /* OUT: True if change is indirect */\n){\n  *pOp = pIter->op;\n  *pnCol = pIter->nCol;\n  *pzTab = pIter->zTab;\n  if( pbIndirect ) *pbIndirect = pIter->bIndirect;\n  return SQLITE_OK;\n}\n\n/*\n** Return information regarding the PRIMARY KEY and number of columns in\n** the database table affected by the change that pIter currently points\n** to. This function may only be called after changeset_next() returns\n** SQLITE_ROW.\n*/\nSQLITE_API int sqlite3changeset_pk(\n  sqlite3_changeset_iter *pIter,  /* Iterator object */\n  unsigned char **pabPK,          /* OUT: Array of boolean - true for PK cols */\n  int *pnCol                      /* OUT: Number of entries in output array */\n){\n  *pabPK = pIter->abPK;\n  if( pnCol ) *pnCol = pIter->nCol;\n  return SQLITE_OK;\n}\n\n/*\n** This function may only be called while the iterator is pointing to an\n** SQLITE_UPDATE or SQLITE_DELETE change (see sqlite3changeset_op()).\n** Otherwise, SQLITE_MISUSE is returned.\n**\n** It sets *ppValue to point to an sqlite3_value structure containing the\n** iVal'th value in the old.* record. Or, if that particular value is not\n** included in the record (because the change is an UPDATE and the field\n** was not modified and is not a PK column), set *ppValue to NULL.\n**\n** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is\n** not modified. Otherwise, SQLITE_OK.\n*/\nSQLITE_API int sqlite3changeset_old(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Index of old.* value to retrieve */\n  sqlite3_value **ppValue         /* OUT: Old value (or NULL pointer) */\n){\n  if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_DELETE ){\n    return SQLITE_MISUSE;\n  }\n  if( iVal<0 || iVal>=pIter->nCol ){\n    return SQLITE_RANGE;\n  }\n  *ppValue = pIter->apValue[iVal];\n  return SQLITE_OK;\n}\n\n/*\n** This function may only be called while the iterator is pointing to an\n** SQLITE_UPDATE or SQLITE_INSERT change (see sqlite3changeset_op()).\n** Otherwise, SQLITE_MISUSE is returned.\n**\n** It sets *ppValue to point to an sqlite3_value structure containing the\n** iVal'th value in the new.* record. Or, if that particular value is not\n** included in the record (because the change is an UPDATE and the field\n** was not modified), set *ppValue to NULL.\n**\n** If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is\n** not modified. Otherwise, SQLITE_OK.\n*/\nSQLITE_API int sqlite3changeset_new(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Index of new.* value to retrieve */\n  sqlite3_value **ppValue         /* OUT: New value (or NULL pointer) */\n){\n  if( pIter->op!=SQLITE_UPDATE && pIter->op!=SQLITE_INSERT ){\n    return SQLITE_MISUSE;\n  }\n  if( iVal<0 || iVal>=pIter->nCol ){\n    return SQLITE_RANGE;\n  }\n  *ppValue = pIter->apValue[pIter->nCol+iVal];\n  return SQLITE_OK;\n}\n\n/*\n** The following two macros are used internally. They are similar to the\n** sqlite3changeset_new() and sqlite3changeset_old() functions, except that\n** they omit all error checking and return a pointer to the requested value.\n*/\n#define sessionChangesetNew(pIter, iVal) (pIter)->apValue[(pIter)->nCol+(iVal)]\n#define sessionChangesetOld(pIter, iVal) (pIter)->apValue[(iVal)]\n\n/*\n** This function may only be called with a changeset iterator that has been\n** passed to an SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT\n** conflict-handler function. Otherwise, SQLITE_MISUSE is returned.\n**\n** If successful, *ppValue is set to point to an sqlite3_value structure\n** containing the iVal'th value of the conflicting record.\n**\n** If value iVal is out-of-range or some other error occurs, an SQLite error\n** code is returned. Otherwise, SQLITE_OK.\n*/\nSQLITE_API int sqlite3changeset_conflict(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Index of conflict record value to fetch */\n  sqlite3_value **ppValue         /* OUT: Value from conflicting row */\n){\n  if( !pIter->pConflict ){\n    return SQLITE_MISUSE;\n  }\n  if( iVal<0 || iVal>=pIter->nCol ){\n    return SQLITE_RANGE;\n  }\n  *ppValue = sqlite3_column_value(pIter->pConflict, iVal);\n  return SQLITE_OK;\n}\n\n/*\n** This function may only be called with an iterator passed to an\n** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case\n** it sets the output variable to the total number of known foreign key\n** violations in the destination database and returns SQLITE_OK.\n**\n** In all other cases this function returns SQLITE_MISUSE.\n*/\nSQLITE_API int sqlite3changeset_fk_conflicts(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int *pnOut                      /* OUT: Number of FK violations */\n){\n  if( pIter->pConflict || pIter->apValue ){\n    return SQLITE_MISUSE;\n  }\n  *pnOut = pIter->nCol;\n  return SQLITE_OK;\n}\n\n\n/*\n** Finalize an iterator allocated with sqlite3changeset_start().\n**\n** This function may not be called on iterators passed to a conflict handler\n** callback by changeset_apply().\n*/\nSQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *p){\n  int rc = SQLITE_OK;\n  if( p ){\n    int i;                        /* Used to iterate through p->apValue[] */\n    rc = p->rc;\n    if( p->apValue ){\n      for(i=0; i<p->nCol*2; i++) sqlite3ValueFree(p->apValue[i]);\n    }\n    sqlite3_free(p->tblhdr.aBuf);\n    sqlite3_free(p->in.buf.aBuf);\n    sqlite3_free(p);\n  }\n  return rc;\n}\n\nstatic int sessionChangesetInvert(\n  SessionInput *pInput,           /* Input changeset */\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut,\n  int *pnInverted,                /* OUT: Number of bytes in output changeset */\n  void **ppInverted               /* OUT: Inverse of pChangeset */\n){\n  int rc = SQLITE_OK;             /* Return value */\n  SessionBuffer sOut;             /* Output buffer */\n  int nCol = 0;                   /* Number of cols in current table */\n  u8 *abPK = 0;                   /* PK array for current table */\n  sqlite3_value **apVal = 0;      /* Space for values for UPDATE inversion */\n  SessionBuffer sPK = {0, 0, 0};  /* PK array for current table */\n\n  /* Initialize the output buffer */\n  memset(&sOut, 0, sizeof(SessionBuffer));\n\n  /* Zero the output variables in case an error occurs. */\n  if( ppInverted ){\n    *ppInverted = 0;\n    *pnInverted = 0;\n  }\n\n  while( 1 ){\n    u8 eType;\n\n    /* Test for EOF. */\n    if( (rc = sessionInputBuffer(pInput, 2)) ) goto finished_invert;\n    if( pInput->iNext>=pInput->nData ) break;\n    eType = pInput->aData[pInput->iNext];\n\n    switch( eType ){\n      case 'T': {\n        /* A 'table' record consists of:\n        **\n        **   * A constant 'T' character,\n        **   * Number of columns in said table (a varint),\n        **   * An array of nCol bytes (sPK),\n        **   * A nul-terminated table name.\n        */\n        int nByte;\n        int nVar;\n        pInput->iNext++;\n        if( (rc = sessionChangesetBufferTblhdr(pInput, &nByte)) ){\n          goto finished_invert;\n        }\n        nVar = sessionVarintGet(&pInput->aData[pInput->iNext], &nCol);\n        sPK.nBuf = 0;\n        sessionAppendBlob(&sPK, &pInput->aData[pInput->iNext+nVar], nCol, &rc);\n        sessionAppendByte(&sOut, eType, &rc);\n        sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);\n        if( rc ) goto finished_invert;\n\n        pInput->iNext += nByte;\n        sqlite3_free(apVal);\n        apVal = 0;\n        abPK = sPK.aBuf;\n        break;\n      }\n\n      case SQLITE_INSERT:\n      case SQLITE_DELETE: {\n        int nByte;\n        int bIndirect = pInput->aData[pInput->iNext+1];\n        int eType2 = (eType==SQLITE_DELETE ? SQLITE_INSERT : SQLITE_DELETE);\n        pInput->iNext += 2;\n        assert( rc==SQLITE_OK );\n        rc = sessionChangesetBufferRecord(pInput, nCol, &nByte);\n        sessionAppendByte(&sOut, eType2, &rc);\n        sessionAppendByte(&sOut, bIndirect, &rc);\n        sessionAppendBlob(&sOut, &pInput->aData[pInput->iNext], nByte, &rc);\n        pInput->iNext += nByte;\n        if( rc ) goto finished_invert;\n        break;\n      }\n\n      case SQLITE_UPDATE: {\n        int iCol;\n\n        if( 0==apVal ){\n          apVal = (sqlite3_value **)sqlite3_malloc64(sizeof(apVal[0])*nCol*2);\n          if( 0==apVal ){\n            rc = SQLITE_NOMEM;\n            goto finished_invert;\n          }\n          memset(apVal, 0, sizeof(apVal[0])*nCol*2);\n        }\n\n        /* Write the header for the new UPDATE change. Same as the original. */\n        sessionAppendByte(&sOut, eType, &rc);\n        sessionAppendByte(&sOut, pInput->aData[pInput->iNext+1], &rc);\n\n        /* Read the old.* and new.* records for the update change. */\n        pInput->iNext += 2;\n        rc = sessionReadRecord(pInput, nCol, 0, &apVal[0], 0);\n        if( rc==SQLITE_OK ){\n          rc = sessionReadRecord(pInput, nCol, 0, &apVal[nCol], 0);\n        }\n\n        /* Write the new old.* record. Consists of the PK columns from the\n        ** original old.* record, and the other values from the original\n        ** new.* record. */\n        for(iCol=0; iCol<nCol; iCol++){\n          sqlite3_value *pVal = apVal[iCol + (abPK[iCol] ? 0 : nCol)];\n          sessionAppendValue(&sOut, pVal, &rc);\n        }\n\n        /* Write the new new.* record. Consists of a copy of all values\n        ** from the original old.* record, except for the PK columns, which\n        ** are set to \"undefined\". */\n        for(iCol=0; iCol<nCol; iCol++){\n          sqlite3_value *pVal = (abPK[iCol] ? 0 : apVal[iCol]);\n          sessionAppendValue(&sOut, pVal, &rc);\n        }\n\n        for(iCol=0; iCol<nCol*2; iCol++){\n          sqlite3ValueFree(apVal[iCol]);\n        }\n        memset(apVal, 0, sizeof(apVal[0])*nCol*2);\n        if( rc!=SQLITE_OK ){\n          goto finished_invert;\n        }\n\n        break;\n      }\n\n      default:\n        rc = SQLITE_CORRUPT_BKPT;\n        goto finished_invert;\n    }\n\n    assert( rc==SQLITE_OK );\n    if( xOutput && sOut.nBuf>=sessions_strm_chunk_size ){\n      rc = xOutput(pOut, sOut.aBuf, sOut.nBuf);\n      sOut.nBuf = 0;\n      if( rc!=SQLITE_OK ) goto finished_invert;\n    }\n  }\n\n  assert( rc==SQLITE_OK );\n  if( pnInverted && ALWAYS(ppInverted) ){\n    *pnInverted = sOut.nBuf;\n    *ppInverted = sOut.aBuf;\n    sOut.aBuf = 0;\n  }else if( sOut.nBuf>0 && ALWAYS(xOutput!=0) ){\n    rc = xOutput(pOut, sOut.aBuf, sOut.nBuf);\n  }\n\n finished_invert:\n  sqlite3_free(sOut.aBuf);\n  sqlite3_free(apVal);\n  sqlite3_free(sPK.aBuf);\n  return rc;\n}\n\n\n/*\n** Invert a changeset object.\n*/\nSQLITE_API int sqlite3changeset_invert(\n  int nChangeset,                 /* Number of bytes in input */\n  const void *pChangeset,         /* Input changeset */\n  int *pnInverted,                /* OUT: Number of bytes in output changeset */\n  void **ppInverted               /* OUT: Inverse of pChangeset */\n){\n  SessionInput sInput;\n\n  /* Set up the input stream */\n  memset(&sInput, 0, sizeof(SessionInput));\n  sInput.nData = nChangeset;\n  sInput.aData = (u8*)pChangeset;\n\n  return sessionChangesetInvert(&sInput, 0, 0, pnInverted, ppInverted);\n}\n\n/*\n** Streaming version of sqlite3changeset_invert().\n*/\nSQLITE_API int sqlite3changeset_invert_strm(\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  SessionInput sInput;\n  int rc;\n\n  /* Set up the input stream */\n  memset(&sInput, 0, sizeof(SessionInput));\n  sInput.xInput = xInput;\n  sInput.pIn = pIn;\n\n  rc = sessionChangesetInvert(&sInput, xOutput, pOut, 0, 0);\n  sqlite3_free(sInput.buf.aBuf);\n  return rc;\n}\n\n\ntypedef struct SessionUpdate SessionUpdate;\nstruct SessionUpdate {\n  sqlite3_stmt *pStmt;\n  u32 *aMask;\n  SessionUpdate *pNext;\n};\n\ntypedef struct SessionApplyCtx SessionApplyCtx;\nstruct SessionApplyCtx {\n  sqlite3 *db;\n  sqlite3_stmt *pDelete;          /* DELETE statement */\n  sqlite3_stmt *pInsert;          /* INSERT statement */\n  sqlite3_stmt *pSelect;          /* SELECT statement */\n  int nCol;                       /* Size of azCol[] and abPK[] arrays */\n  const char **azCol;             /* Array of column names */\n  u8 *abPK;                       /* Boolean array - true if column is in PK */\n  u32 *aUpdateMask;               /* Used by sessionUpdateFind */\n  SessionUpdate *pUp;\n  int bStat1;                     /* True if table is sqlite_stat1 */\n  int bDeferConstraints;          /* True to defer constraints */\n  int bInvertConstraints;         /* Invert when iterating constraints buffer */\n  SessionBuffer constraints;      /* Deferred constraints are stored here */\n  SessionBuffer rebase;           /* Rebase information (if any) here */\n  u8 bRebaseStarted;              /* If table header is already in rebase */\n  u8 bRebase;                     /* True to collect rebase information */\n  u8 bIgnoreNoop;                 /* True to ignore no-op conflicts */\n  int bRowid;\n  char *zErr;                     /* Error message, if any */\n};\n\n/* Number of prepared UPDATE statements to cache. */\n#define SESSION_UPDATE_CACHE_SZ 12\n\n/*\n** Find a prepared UPDATE statement suitable for the UPDATE step currently\n** being visited by the iterator. The UPDATE is of the form:\n**\n**   UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ?\n*/\nstatic int sessionUpdateFind(\n  sqlite3_changeset_iter *pIter,\n  SessionApplyCtx *p,\n  int bPatchset,\n  sqlite3_stmt **ppStmt\n){\n  int rc = SQLITE_OK;\n  SessionUpdate *pUp = 0;\n  int nCol = pIter->nCol;\n  int nU32 = (pIter->nCol+33)/32;\n  int ii;\n\n  if( p->aUpdateMask==0 ){\n    p->aUpdateMask = sqlite3_malloc(nU32*sizeof(u32));\n    if( p->aUpdateMask==0 ){\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    memset(p->aUpdateMask, 0, nU32*sizeof(u32));\n    rc = SQLITE_CORRUPT;\n    for(ii=0; ii<pIter->nCol; ii++){\n      if( sessionChangesetNew(pIter, ii) ){\n        p->aUpdateMask[ii/32] |= (1<<(ii%32));\n        rc = SQLITE_OK;\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    if( bPatchset ) p->aUpdateMask[nCol/32] |= (1<<(nCol%32));\n\n    if( p->pUp ){\n      int nUp = 0;\n      SessionUpdate **pp = &p->pUp;\n      while( 1 ){\n        nUp++;\n        if( 0==memcmp(p->aUpdateMask, (*pp)->aMask, nU32*sizeof(u32)) ){\n          pUp = *pp;\n          *pp = pUp->pNext;\n          pUp->pNext = p->pUp;\n          p->pUp = pUp;\n          break;\n        }\n\n        if( (*pp)->pNext ){\n          pp = &(*pp)->pNext;\n        }else{\n          if( nUp>=SESSION_UPDATE_CACHE_SZ ){\n            sqlite3_finalize((*pp)->pStmt);\n            sqlite3_free(*pp);\n            *pp = 0;\n          }\n          break;\n        }\n      }\n    }\n\n    if( pUp==0 ){\n      int nByte = sizeof(SessionUpdate) * nU32*sizeof(u32);\n      int bStat1 = (sqlite3_stricmp(pIter->zTab, \"sqlite_stat1\")==0);\n      pUp = (SessionUpdate*)sqlite3_malloc(nByte);\n      if( pUp==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        const char *zSep = \"\";\n        SessionBuffer buf;\n\n        memset(&buf, 0, sizeof(buf));\n        pUp->aMask = (u32*)&pUp[1];\n        memcpy(pUp->aMask, p->aUpdateMask, nU32*sizeof(u32));\n\n        sessionAppendStr(&buf, \"UPDATE main.\", &rc);\n        sessionAppendIdent(&buf, pIter->zTab, &rc);\n        sessionAppendStr(&buf, \" SET \", &rc);\n\n        /* Create the assignments part of the UPDATE */\n        for(ii=0; ii<pIter->nCol; ii++){\n          if( p->abPK[ii]==0 && sessionChangesetNew(pIter, ii) ){\n            sessionAppendStr(&buf, zSep, &rc);\n            sessionAppendIdent(&buf, p->azCol[ii], &rc);\n            sessionAppendStr(&buf, \" = ?\", &rc);\n            sessionAppendInteger(&buf, ii*2+1, &rc);\n            zSep = \", \";\n          }\n        }\n\n        /* Create the WHERE clause part of the UPDATE */\n        zSep = \"\";\n        sessionAppendStr(&buf, \" WHERE \", &rc);\n        for(ii=0; ii<pIter->nCol; ii++){\n          if( p->abPK[ii] || (bPatchset==0 && sessionChangesetOld(pIter, ii)) ){\n            sessionAppendStr(&buf, zSep, &rc);\n            if( bStat1 && ii==1 ){\n              assert( sqlite3_stricmp(p->azCol[ii], \"idx\")==0 );\n              sessionAppendStr(&buf,\n                  \"idx IS CASE \"\n                  \"WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL \"\n                  \"ELSE ?4 END \", &rc\n              );\n            }else{\n              sessionAppendIdent(&buf, p->azCol[ii], &rc);\n              sessionAppendStr(&buf, \" IS ?\", &rc);\n              sessionAppendInteger(&buf, ii*2+2, &rc);\n            }\n            zSep = \" AND \";\n          }\n        }\n\n        if( rc==SQLITE_OK ){\n          char *zSql = (char*)buf.aBuf;\n          rc = sqlite3_prepare_v2(p->db, zSql, buf.nBuf, &pUp->pStmt, 0);\n        }\n\n        if( rc!=SQLITE_OK ){\n          sqlite3_free(pUp);\n          pUp = 0;\n        }else{\n          pUp->pNext = p->pUp;\n          p->pUp = pUp;\n        }\n        sqlite3_free(buf.aBuf);\n      }\n    }\n  }\n\n  assert( (rc==SQLITE_OK)==(pUp!=0) );\n  if( pUp ){\n    *ppStmt = pUp->pStmt;\n  }else{\n    *ppStmt = 0;\n  }\n  return rc;\n}\n\n/*\n** Free all cached UPDATE statements.\n*/\nstatic void sessionUpdateFree(SessionApplyCtx *p){\n  SessionUpdate *pUp;\n  SessionUpdate *pNext;\n  for(pUp=p->pUp; pUp; pUp=pNext){\n    pNext = pUp->pNext;\n    sqlite3_finalize(pUp->pStmt);\n    sqlite3_free(pUp);\n  }\n  p->pUp = 0;\n  sqlite3_free(p->aUpdateMask);\n  p->aUpdateMask = 0;\n}\n\n/*\n** Formulate a statement to DELETE a row from database db. Assuming a table\n** structure like this:\n**\n**     CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c));\n**\n** The DELETE statement looks like this:\n**\n**     DELETE FROM x WHERE a = :1 AND c = :3 AND (:5 OR b IS :2 AND d IS :4)\n**\n** Variable :5 (nCol+1) is a boolean. It should be set to 0 if we require\n** matching b and d values, or 1 otherwise. The second case comes up if the\n** conflict handler is invoked with NOTFOUND and returns CHANGESET_REPLACE.\n**\n** If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left\n** pointing to the prepared version of the SQL statement.\n*/\nstatic int sessionDeleteRow(\n  sqlite3 *db,                    /* Database handle */\n  const char *zTab,               /* Table name */\n  SessionApplyCtx *p              /* Session changeset-apply context */\n){\n  int i;\n  const char *zSep = \"\";\n  int rc = SQLITE_OK;\n  SessionBuffer buf = {0, 0, 0};\n  int nPk = 0;\n\n  sessionAppendStr(&buf, \"DELETE FROM main.\", &rc);\n  sessionAppendIdent(&buf, zTab, &rc);\n  sessionAppendStr(&buf, \" WHERE \", &rc);\n\n  for(i=0; i<p->nCol; i++){\n    if( p->abPK[i] ){\n      nPk++;\n      sessionAppendStr(&buf, zSep, &rc);\n      sessionAppendIdent(&buf, p->azCol[i], &rc);\n      sessionAppendStr(&buf, \" = ?\", &rc);\n      sessionAppendInteger(&buf, i+1, &rc);\n      zSep = \" AND \";\n    }\n  }\n\n  if( nPk<p->nCol ){\n    sessionAppendStr(&buf, \" AND (?\", &rc);\n    sessionAppendInteger(&buf, p->nCol+1, &rc);\n    sessionAppendStr(&buf, \" OR \", &rc);\n\n    zSep = \"\";\n    for(i=0; i<p->nCol; i++){\n      if( !p->abPK[i] ){\n        sessionAppendStr(&buf, zSep, &rc);\n        sessionAppendIdent(&buf, p->azCol[i], &rc);\n        sessionAppendStr(&buf, \" IS ?\", &rc);\n        sessionAppendInteger(&buf, i+1, &rc);\n        zSep = \"AND \";\n      }\n    }\n    sessionAppendStr(&buf, \")\", &rc);\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = sessionPrepare(db, &p->pDelete, &p->zErr, (char*)buf.aBuf);\n  }\n  sqlite3_free(buf.aBuf);\n\n  return rc;\n}\n\n/*\n** Formulate and prepare an SQL statement to query table zTab by primary\n** key. Assuming the following table structure:\n**\n**     CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c));\n**\n** The SELECT statement looks like this:\n**\n**     SELECT * FROM x WHERE a = ?1 AND c = ?3\n**\n** If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left\n** pointing to the prepared version of the SQL statement.\n*/\nstatic int sessionSelectRow(\n  sqlite3 *db,                    /* Database handle */\n  const char *zTab,               /* Table name */\n  SessionApplyCtx *p              /* Session changeset-apply context */\n){\n  /* TODO */\n  return sessionSelectStmt(db, p->bIgnoreNoop,\n      \"main\", zTab, p->bRowid, p->nCol, p->azCol, p->abPK, &p->pSelect, &p->zErr\n  );\n}\n\n/*\n** Formulate and prepare an INSERT statement to add a record to table zTab.\n** For example:\n**\n**     INSERT INTO main.\"zTab\" VALUES(?1, ?2, ?3 ...);\n**\n** If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left\n** pointing to the prepared version of the SQL statement.\n*/\nstatic int sessionInsertRow(\n  sqlite3 *db,                    /* Database handle */\n  const char *zTab,               /* Table name */\n  SessionApplyCtx *p              /* Session changeset-apply context */\n){\n  int rc = SQLITE_OK;\n  int i;\n  SessionBuffer buf = {0, 0, 0};\n\n  sessionAppendStr(&buf, \"INSERT INTO main.\", &rc);\n  sessionAppendIdent(&buf, zTab, &rc);\n  sessionAppendStr(&buf, \"(\", &rc);\n  for(i=0; i<p->nCol; i++){\n    if( i!=0 ) sessionAppendStr(&buf, \", \", &rc);\n    sessionAppendIdent(&buf, p->azCol[i], &rc);\n  }\n\n  sessionAppendStr(&buf, \") VALUES(?\", &rc);\n  for(i=1; i<p->nCol; i++){\n    sessionAppendStr(&buf, \", ?\", &rc);\n  }\n  sessionAppendStr(&buf, \")\", &rc);\n\n  if( rc==SQLITE_OK ){\n    rc = sessionPrepare(db, &p->pInsert, &p->zErr, (char*)buf.aBuf);\n  }\n  sqlite3_free(buf.aBuf);\n  return rc;\n}\n\n/*\n** Prepare statements for applying changes to the sqlite_stat1 table.\n** These are similar to those created by sessionSelectRow(),\n** sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for\n** other tables.\n*/\nstatic int sessionStat1Sql(sqlite3 *db, SessionApplyCtx *p){\n  int rc = sessionSelectRow(db, \"sqlite_stat1\", p);\n  if( rc==SQLITE_OK ){\n    rc = sessionPrepare(db, &p->pInsert, 0,\n        \"INSERT INTO main.sqlite_stat1 VALUES(?1, \"\n        \"CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, \"\n        \"?3)\"\n    );\n  }\n  if( rc==SQLITE_OK ){\n    rc = sessionPrepare(db, &p->pDelete, 0,\n        \"DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS \"\n        \"CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END \"\n        \"AND (?4 OR stat IS ?3)\"\n    );\n  }\n  return rc;\n}\n\n/*\n** A wrapper around sqlite3_bind_value() that detects an extra problem.\n** See comments in the body of this function for details.\n*/\nstatic int sessionBindValue(\n  sqlite3_stmt *pStmt,            /* Statement to bind value to */\n  int i,                          /* Parameter number to bind to */\n  sqlite3_value *pVal             /* Value to bind */\n){\n  int eType = sqlite3_value_type(pVal);\n  /* COVERAGE: The (pVal->z==0) branch is never true using current versions\n  ** of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either\n  ** the (pVal->z) variable remains as it was or the type of the value is\n  ** set to SQLITE_NULL.  */\n  if( (eType==SQLITE_TEXT || eType==SQLITE_BLOB) && pVal->z==0 ){\n    /* This condition occurs when an earlier OOM in a call to\n    ** sqlite3_value_text() or sqlite3_value_blob() (perhaps from within\n    ** a conflict-handler) has zeroed the pVal->z pointer. Return NOMEM. */\n    return SQLITE_NOMEM;\n  }\n  return sqlite3_bind_value(pStmt, i, pVal);\n}\n\n/*\n** Iterator pIter must point to an SQLITE_INSERT entry. This function\n** transfers new.* values from the current iterator entry to statement\n** pStmt. The table being inserted into has nCol columns.\n**\n** New.* value $i from the iterator is bound to variable ($i+1) of\n** statement pStmt. If parameter abPK is NULL, all values from 0 to (nCol-1)\n** are transfered to the statement. Otherwise, if abPK is not NULL, it points\n** to an array nCol elements in size. In this case only those values for\n** which abPK[$i] is true are read from the iterator and bound to the\n** statement.\n**\n** An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK.\n*/\nstatic int sessionBindRow(\n  sqlite3_changeset_iter *pIter,  /* Iterator to read values from */\n  int(*xValue)(sqlite3_changeset_iter *, int, sqlite3_value **),\n  int nCol,                       /* Number of columns */\n  u8 *abPK,                       /* If not NULL, bind only if true */\n  sqlite3_stmt *pStmt             /* Bind values to this statement */\n){\n  int i;\n  int rc = SQLITE_OK;\n\n  /* Neither sqlite3changeset_old or sqlite3changeset_new can fail if the\n  ** argument iterator points to a suitable entry. Make sure that xValue\n  ** is one of these to guarantee that it is safe to ignore the return\n  ** in the code below. */\n  assert( xValue==sqlite3changeset_old || xValue==sqlite3changeset_new );\n\n  for(i=0; rc==SQLITE_OK && i<nCol; i++){\n    if( !abPK || abPK[i] ){\n      sqlite3_value *pVal = 0;\n      (void)xValue(pIter, i, &pVal);\n      if( pVal==0 ){\n        /* The value in the changeset was \"undefined\". This indicates a\n        ** corrupt changeset blob.  */\n        rc = SQLITE_CORRUPT_BKPT;\n      }else{\n        rc = sessionBindValue(pStmt, i+1, pVal);\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** SQL statement pSelect is as generated by the sessionSelectRow() function.\n** This function binds the primary key values from the change that changeset\n** iterator pIter points to to the SELECT and attempts to seek to the table\n** entry. If a row is found, the SELECT statement left pointing at the row\n** and SQLITE_ROW is returned. Otherwise, if no row is found and no error\n** has occured, the statement is reset and SQLITE_OK is returned. If an\n** error occurs, the statement is reset and an SQLite error code is returned.\n**\n** If this function returns SQLITE_ROW, the caller must eventually reset()\n** statement pSelect. If any other value is returned, the statement does\n** not require a reset().\n**\n** If the iterator currently points to an INSERT record, bind values from the\n** new.* record to the SELECT statement. Or, if it points to a DELETE or\n** UPDATE, bind values from the old.* record.\n*/\nstatic int sessionSeekToRow(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  SessionApplyCtx *p\n){\n  sqlite3_stmt *pSelect = p->pSelect;\n  int rc;                         /* Return code */\n  int nCol;                       /* Number of columns in table */\n  int op;                         /* Changset operation (SQLITE_UPDATE etc.) */\n  const char *zDummy;             /* Unused */\n\n  sqlite3_clear_bindings(pSelect);\n  sqlite3changeset_op(pIter, &zDummy, &nCol, &op, 0);\n  rc = sessionBindRow(pIter,\n      op==SQLITE_INSERT ? sqlite3changeset_new : sqlite3changeset_old,\n      nCol, p->abPK, pSelect\n  );\n\n  if( op!=SQLITE_DELETE && p->bIgnoreNoop ){\n    int ii;\n    for(ii=0; rc==SQLITE_OK && ii<nCol; ii++){\n      if( p->abPK[ii]==0 ){\n        sqlite3_value *pVal = 0;\n        sqlite3changeset_new(pIter, ii, &pVal);\n        sqlite3_bind_int(pSelect, ii+1+nCol, (pVal==0));\n        if( pVal ) rc = sessionBindValue(pSelect, ii+1, pVal);\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_step(pSelect);\n    if( rc!=SQLITE_ROW ) rc = sqlite3_reset(pSelect);\n  }\n\n  return rc;\n}\n\n/*\n** This function is called from within sqlite3changeset_apply_v2() when\n** a conflict is encountered and resolved using conflict resolution\n** mode eType (either SQLITE_CHANGESET_OMIT or SQLITE_CHANGESET_REPLACE)..\n** It adds a conflict resolution record to the buffer in\n** SessionApplyCtx.rebase, which will eventually be returned to the caller\n** of apply_v2() as the \"rebase\" buffer.\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise.\n*/\nstatic int sessionRebaseAdd(\n  SessionApplyCtx *p,             /* Apply context */\n  int eType,                      /* Conflict resolution (OMIT or REPLACE) */\n  sqlite3_changeset_iter *pIter   /* Iterator pointing at current change */\n){\n  int rc = SQLITE_OK;\n  if( p->bRebase ){\n    int i;\n    int eOp = pIter->op;\n    if( p->bRebaseStarted==0 ){\n      /* Append a table-header to the rebase buffer */\n      const char *zTab = pIter->zTab;\n      sessionAppendByte(&p->rebase, 'T', &rc);\n      sessionAppendVarint(&p->rebase, p->nCol, &rc);\n      sessionAppendBlob(&p->rebase, p->abPK, p->nCol, &rc);\n      sessionAppendBlob(&p->rebase, (u8*)zTab, (int)strlen(zTab)+1, &rc);\n      p->bRebaseStarted = 1;\n    }\n\n    assert( eType==SQLITE_CHANGESET_REPLACE||eType==SQLITE_CHANGESET_OMIT );\n    assert( eOp==SQLITE_DELETE || eOp==SQLITE_INSERT || eOp==SQLITE_UPDATE );\n\n    sessionAppendByte(&p->rebase,\n        (eOp==SQLITE_DELETE ? SQLITE_DELETE : SQLITE_INSERT), &rc\n        );\n    sessionAppendByte(&p->rebase, (eType==SQLITE_CHANGESET_REPLACE), &rc);\n    for(i=0; i<p->nCol; i++){\n      sqlite3_value *pVal = 0;\n      if( eOp==SQLITE_DELETE || (eOp==SQLITE_UPDATE && p->abPK[i]) ){\n        sqlite3changeset_old(pIter, i, &pVal);\n      }else{\n        sqlite3changeset_new(pIter, i, &pVal);\n      }\n      sessionAppendValue(&p->rebase, pVal, &rc);\n    }\n  }\n  return rc;\n}\n\n/*\n** Invoke the conflict handler for the change that the changeset iterator\n** currently points to.\n**\n** Argument eType must be either CHANGESET_DATA or CHANGESET_CONFLICT.\n** If argument pbReplace is NULL, then the type of conflict handler invoked\n** depends solely on eType, as follows:\n**\n**    eType value                 Value passed to xConflict\n**    -------------------------------------------------\n**    CHANGESET_DATA              CHANGESET_NOTFOUND\n**    CHANGESET_CONFLICT          CHANGESET_CONSTRAINT\n**\n** Or, if pbReplace is not NULL, then an attempt is made to find an existing\n** record with the same primary key as the record about to be deleted, updated\n** or inserted. If such a record can be found, it is available to the conflict\n** handler as the \"conflicting\" record. In this case the type of conflict\n** handler invoked is as follows:\n**\n**    eType value         PK Record found?   Value passed to xConflict\n**    ----------------------------------------------------------------\n**    CHANGESET_DATA      Yes                CHANGESET_DATA\n**    CHANGESET_DATA      No                 CHANGESET_NOTFOUND\n**    CHANGESET_CONFLICT  Yes                CHANGESET_CONFLICT\n**    CHANGESET_CONFLICT  No                 CHANGESET_CONSTRAINT\n**\n** If pbReplace is not NULL, and a record with a matching PK is found, and\n** the conflict handler function returns SQLITE_CHANGESET_REPLACE, *pbReplace\n** is set to non-zero before returning SQLITE_OK.\n**\n** If the conflict handler returns SQLITE_CHANGESET_ABORT, SQLITE_ABORT is\n** returned. Or, if the conflict handler returns an invalid value,\n** SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT,\n** this function returns SQLITE_OK.\n*/\nstatic int sessionConflictHandler(\n  int eType,                      /* Either CHANGESET_DATA or CONFLICT */\n  SessionApplyCtx *p,             /* changeset_apply() context */\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int(*xConflict)(void *, int, sqlite3_changeset_iter*),\n  void *pCtx,                     /* First argument for conflict handler */\n  int *pbReplace                  /* OUT: Set to true if PK row is found */\n){\n  int res = SQLITE_CHANGESET_OMIT;/* Value returned by conflict handler */\n  int rc;\n  int nCol;\n  int op;\n  const char *zDummy;\n\n  sqlite3changeset_op(pIter, &zDummy, &nCol, &op, 0);\n\n  assert( eType==SQLITE_CHANGESET_CONFLICT || eType==SQLITE_CHANGESET_DATA );\n  assert( SQLITE_CHANGESET_CONFLICT+1==SQLITE_CHANGESET_CONSTRAINT );\n  assert( SQLITE_CHANGESET_DATA+1==SQLITE_CHANGESET_NOTFOUND );\n\n  /* Bind the new.* PRIMARY KEY values to the SELECT statement. */\n  if( pbReplace ){\n    rc = sessionSeekToRow(pIter, p);\n  }else{\n    rc = SQLITE_OK;\n  }\n\n  if( rc==SQLITE_ROW ){\n    /* There exists another row with the new.* primary key. */\n    if( 0==p->bIgnoreNoop\n     || 0==sqlite3_column_int(p->pSelect, sqlite3_column_count(p->pSelect)-1)\n    ){\n      pIter->pConflict = p->pSelect;\n      res = xConflict(pCtx, eType, pIter);\n      pIter->pConflict = 0;\n    }\n    rc = sqlite3_reset(p->pSelect);\n  }else if( rc==SQLITE_OK ){\n    if( p->bDeferConstraints && eType==SQLITE_CHANGESET_CONFLICT ){\n      /* Instead of invoking the conflict handler, append the change blob\n      ** to the SessionApplyCtx.constraints buffer. */\n      u8 *aBlob = &pIter->in.aData[pIter->in.iCurrent];\n      int nBlob = pIter->in.iNext - pIter->in.iCurrent;\n      sessionAppendBlob(&p->constraints, aBlob, nBlob, &rc);\n      return SQLITE_OK;\n    }else if( p->bIgnoreNoop==0 || op!=SQLITE_DELETE\n           || eType==SQLITE_CHANGESET_CONFLICT\n    ){\n      /* No other row with the new.* primary key. */\n      res = xConflict(pCtx, eType+1, pIter);\n      if( res==SQLITE_CHANGESET_REPLACE ) rc = SQLITE_MISUSE;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    switch( res ){\n      case SQLITE_CHANGESET_REPLACE:\n        assert( pbReplace );\n        *pbReplace = 1;\n        break;\n\n      case SQLITE_CHANGESET_OMIT:\n        break;\n\n      case SQLITE_CHANGESET_ABORT:\n        rc = SQLITE_ABORT;\n        break;\n\n      default:\n        rc = SQLITE_MISUSE;\n        break;\n    }\n    if( rc==SQLITE_OK ){\n      rc = sessionRebaseAdd(p, res, pIter);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Attempt to apply the change that the iterator passed as the first argument\n** currently points to to the database. If a conflict is encountered, invoke\n** the conflict handler callback.\n**\n** If argument pbRetry is NULL, then ignore any CHANGESET_DATA conflict. If\n** one is encountered, update or delete the row with the matching primary key\n** instead. Or, if pbRetry is not NULL and a CHANGESET_DATA conflict occurs,\n** invoke the conflict handler. If it returns CHANGESET_REPLACE, set *pbRetry\n** to true before returning. In this case the caller will invoke this function\n** again, this time with pbRetry set to NULL.\n**\n** If argument pbReplace is NULL and a CHANGESET_CONFLICT conflict is\n** encountered invoke the conflict handler with CHANGESET_CONSTRAINT instead.\n** Or, if pbReplace is not NULL, invoke it with CHANGESET_CONFLICT. If such\n** an invocation returns SQLITE_CHANGESET_REPLACE, set *pbReplace to true\n** before retrying. In this case the caller attempts to remove the conflicting\n** row before invoking this function again, this time with pbReplace set\n** to NULL.\n**\n** If any conflict handler returns SQLITE_CHANGESET_ABORT, this function\n** returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is\n** returned.\n*/\nstatic int sessionApplyOneOp(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  SessionApplyCtx *p,             /* changeset_apply() context */\n  int(*xConflict)(void *, int, sqlite3_changeset_iter *),\n  void *pCtx,                     /* First argument for the conflict handler */\n  int *pbReplace,                 /* OUT: True to remove PK row and retry */\n  int *pbRetry                    /* OUT: True to retry. */\n){\n  const char *zDummy;\n  int op;\n  int nCol;\n  int rc = SQLITE_OK;\n\n  assert( p->pDelete && p->pInsert && p->pSelect );\n  assert( p->azCol && p->abPK );\n  assert( !pbReplace || *pbReplace==0 );\n\n  sqlite3changeset_op(pIter, &zDummy, &nCol, &op, 0);\n\n  if( op==SQLITE_DELETE ){\n\n    /* Bind values to the DELETE statement. If conflict handling is required,\n    ** bind values for all columns and set bound variable (nCol+1) to true.\n    ** Or, if conflict handling is not required, bind just the PK column\n    ** values and, if it exists, set (nCol+1) to false. Conflict handling\n    ** is not required if:\n    **\n    **   * this is a patchset, or\n    **   * (pbRetry==0), or\n    **   * all columns of the table are PK columns (in this case there is\n    **     no (nCol+1) variable to bind to).\n    */\n    u8 *abPK = (pIter->bPatchset ? p->abPK : 0);\n    rc = sessionBindRow(pIter, sqlite3changeset_old, nCol, abPK, p->pDelete);\n    if( rc==SQLITE_OK && sqlite3_bind_parameter_count(p->pDelete)>nCol ){\n      rc = sqlite3_bind_int(p->pDelete, nCol+1, (pbRetry==0 || abPK));\n    }\n    if( rc!=SQLITE_OK ) return rc;\n\n    sqlite3_step(p->pDelete);\n    rc = sqlite3_reset(p->pDelete);\n    if( rc==SQLITE_OK && sqlite3_changes(p->db)==0 ){\n      rc = sessionConflictHandler(\n          SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry\n      );\n    }else if( (rc&0xff)==SQLITE_CONSTRAINT ){\n      rc = sessionConflictHandler(\n          SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, 0\n      );\n    }\n\n  }else if( op==SQLITE_UPDATE ){\n    int i;\n    sqlite3_stmt *pUp = 0;\n    int bPatchset = (pbRetry==0 || pIter->bPatchset);\n\n    rc = sessionUpdateFind(pIter, p, bPatchset, &pUp);\n\n    /* Bind values to the UPDATE statement. */\n    for(i=0; rc==SQLITE_OK && i<nCol; i++){\n      sqlite3_value *pOld = sessionChangesetOld(pIter, i);\n      sqlite3_value *pNew = sessionChangesetNew(pIter, i);\n      if( p->abPK[i] || (bPatchset==0 && pOld) ){\n        rc = sessionBindValue(pUp, i*2+2, pOld);\n      }\n      if( rc==SQLITE_OK && pNew ){\n        rc = sessionBindValue(pUp, i*2+1, pNew);\n      }\n    }\n    if( rc!=SQLITE_OK ) return rc;\n\n    /* Attempt the UPDATE. In the case of a NOTFOUND or DATA conflict,\n    ** the result will be SQLITE_OK with 0 rows modified. */\n    sqlite3_step(pUp);\n    rc = sqlite3_reset(pUp);\n\n    if( rc==SQLITE_OK && sqlite3_changes(p->db)==0 ){\n      /* A NOTFOUND or DATA error. Search the table to see if it contains\n      ** a row with a matching primary key. If so, this is a DATA conflict.\n      ** Otherwise, if there is no primary key match, it is a NOTFOUND. */\n\n      rc = sessionConflictHandler(\n          SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry\n      );\n\n    }else if( (rc&0xff)==SQLITE_CONSTRAINT ){\n      /* This is always a CONSTRAINT conflict. */\n      rc = sessionConflictHandler(\n          SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, 0\n      );\n    }\n\n  }else{\n    assert( op==SQLITE_INSERT );\n    if( p->bStat1 ){\n      /* Check if there is a conflicting row. For sqlite_stat1, this needs\n      ** to be done using a SELECT, as there is no PRIMARY KEY in the\n      ** database schema to throw an exception if a duplicate is inserted.  */\n      rc = sessionSeekToRow(pIter, p);\n      if( rc==SQLITE_ROW ){\n        rc = SQLITE_CONSTRAINT;\n        sqlite3_reset(p->pSelect);\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = sessionBindRow(pIter, sqlite3changeset_new, nCol, 0, p->pInsert);\n      if( rc!=SQLITE_OK ) return rc;\n\n      sqlite3_step(p->pInsert);\n      rc = sqlite3_reset(p->pInsert);\n    }\n\n    if( (rc&0xff)==SQLITE_CONSTRAINT ){\n      rc = sessionConflictHandler(\n          SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, pbReplace\n      );\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Attempt to apply the change that the iterator passed as the first argument\n** currently points to to the database. If a conflict is encountered, invoke\n** the conflict handler callback.\n**\n** The difference between this function and sessionApplyOne() is that this\n** function handles the case where the conflict-handler is invoked and\n** returns SQLITE_CHANGESET_REPLACE - indicating that the change should be\n** retried in some manner.\n*/\nstatic int sessionApplyOneWithRetry(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator to read change from */\n  SessionApplyCtx *pApply,        /* Apply context */\n  int(*xConflict)(void*, int, sqlite3_changeset_iter*),\n  void *pCtx                      /* First argument passed to xConflict */\n){\n  int bReplace = 0;\n  int bRetry = 0;\n  int rc;\n\n  rc = sessionApplyOneOp(pIter, pApply, xConflict, pCtx, &bReplace, &bRetry);\n  if( rc==SQLITE_OK ){\n    /* If the bRetry flag is set, the change has not been applied due to an\n    ** SQLITE_CHANGESET_DATA problem (i.e. this is an UPDATE or DELETE and\n    ** a row with the correct PK is present in the db, but one or more other\n    ** fields do not contain the expected values) and the conflict handler\n    ** returned SQLITE_CHANGESET_REPLACE. In this case retry the operation,\n    ** but pass NULL as the final argument so that sessionApplyOneOp() ignores\n    ** the SQLITE_CHANGESET_DATA problem.  */\n    if( bRetry ){\n      assert( pIter->op==SQLITE_UPDATE || pIter->op==SQLITE_DELETE );\n      rc = sessionApplyOneOp(pIter, pApply, xConflict, pCtx, 0, 0);\n    }\n\n    /* If the bReplace flag is set, the change is an INSERT that has not\n    ** been performed because the database already contains a row with the\n    ** specified primary key and the conflict handler returned\n    ** SQLITE_CHANGESET_REPLACE. In this case remove the conflicting row\n    ** before reattempting the INSERT.  */\n    else if( bReplace ){\n      assert( pIter->op==SQLITE_INSERT );\n      rc = sqlite3_exec(db, \"SAVEPOINT replace_op\", 0, 0, 0);\n      if( rc==SQLITE_OK ){\n        rc = sessionBindRow(pIter,\n            sqlite3changeset_new, pApply->nCol, pApply->abPK, pApply->pDelete);\n        sqlite3_bind_int(pApply->pDelete, pApply->nCol+1, 1);\n      }\n      if( rc==SQLITE_OK ){\n        sqlite3_step(pApply->pDelete);\n        rc = sqlite3_reset(pApply->pDelete);\n      }\n      if( rc==SQLITE_OK ){\n        rc = sessionApplyOneOp(pIter, pApply, xConflict, pCtx, 0, 0);\n      }\n      if( rc==SQLITE_OK ){\n        rc = sqlite3_exec(db, \"RELEASE replace_op\", 0, 0, 0);\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Retry the changes accumulated in the pApply->constraints buffer.\n*/\nstatic int sessionRetryConstraints(\n  sqlite3 *db,\n  int bPatchset,\n  const char *zTab,\n  SessionApplyCtx *pApply,\n  int(*xConflict)(void*, int, sqlite3_changeset_iter*),\n  void *pCtx                      /* First argument passed to xConflict */\n){\n  int rc = SQLITE_OK;\n\n  while( pApply->constraints.nBuf ){\n    sqlite3_changeset_iter *pIter2 = 0;\n    SessionBuffer cons = pApply->constraints;\n    memset(&pApply->constraints, 0, sizeof(SessionBuffer));\n\n    rc = sessionChangesetStart(\n        &pIter2, 0, 0, cons.nBuf, cons.aBuf, pApply->bInvertConstraints, 1\n    );\n    if( rc==SQLITE_OK ){\n      size_t nByte = 2*pApply->nCol*sizeof(sqlite3_value*);\n      int rc2;\n      pIter2->bPatchset = bPatchset;\n      pIter2->zTab = (char*)zTab;\n      pIter2->nCol = pApply->nCol;\n      pIter2->abPK = pApply->abPK;\n      sessionBufferGrow(&pIter2->tblhdr, nByte, &rc);\n      pIter2->apValue = (sqlite3_value**)pIter2->tblhdr.aBuf;\n      if( rc==SQLITE_OK ) memset(pIter2->apValue, 0, nByte);\n\n      while( rc==SQLITE_OK && SQLITE_ROW==sqlite3changeset_next(pIter2) ){\n        rc = sessionApplyOneWithRetry(db, pIter2, pApply, xConflict, pCtx);\n      }\n\n      rc2 = sqlite3changeset_finalize(pIter2);\n      if( rc==SQLITE_OK ) rc = rc2;\n    }\n    assert( pApply->bDeferConstraints || pApply->constraints.nBuf==0 );\n\n    sqlite3_free(cons.aBuf);\n    if( rc!=SQLITE_OK ) break;\n    if( pApply->constraints.nBuf>=cons.nBuf ){\n      /* No progress was made on the last round. */\n      pApply->bDeferConstraints = 0;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Argument pIter is a changeset iterator that has been initialized, but\n** not yet passed to sqlite3changeset_next(). This function applies the\n** changeset to the main database attached to handle \"db\". The supplied\n** conflict handler callback is invoked to resolve any conflicts encountered\n** while applying the change.\n*/\nstatic int sessionChangesetApply(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  sqlite3_changeset_iter *pIter,  /* Changeset to apply */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xFilterIter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of fifth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase, /* OUT: Rebase information */\n  int flags                       /* SESSION_APPLY_XXX flags */\n){\n  int schemaMismatch = 0;\n  int rc = SQLITE_OK;             /* Return code */\n  const char *zTab = 0;           /* Name of current table */\n  int nTab = 0;                   /* Result of sqlite3Strlen30(zTab) */\n  SessionApplyCtx sApply;         /* changeset_apply() context object */\n  int bPatchset;\n  u64 savedFlag = db->flags & SQLITE_FkNoAction;\n\n  assert( xConflict!=0 );\n\n  sqlite3_mutex_enter(sqlite3_db_mutex(db));\n  if( flags & SQLITE_CHANGESETAPPLY_FKNOACTION ){\n    db->flags |= ((u64)SQLITE_FkNoAction);\n    db->aDb[0].pSchema->schema_cookie -= 32;\n  }\n\n  pIter->in.bNoDiscard = 1;\n  memset(&sApply, 0, sizeof(sApply));\n  sApply.bRebase = (ppRebase && pnRebase);\n  sApply.bInvertConstraints = !!(flags & SQLITE_CHANGESETAPPLY_INVERT);\n  sApply.bIgnoreNoop = !!(flags & SQLITE_CHANGESETAPPLY_IGNORENOOP);\n  if( (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT)==0 ){\n    rc = sqlite3_exec(db, \"SAVEPOINT changeset_apply\", 0, 0, 0);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_exec(db, \"PRAGMA defer_foreign_keys = 1\", 0, 0, 0);\n  }\n  while( rc==SQLITE_OK && SQLITE_ROW==sqlite3changeset_next(pIter) ){\n    int nCol;\n    int op;\n    const char *zNew;\n\n    sqlite3changeset_op(pIter, &zNew, &nCol, &op, 0);\n\n    if( zTab==0 || sqlite3_strnicmp(zNew, zTab, nTab+1) ){\n      u8 *abPK;\n\n      rc = sessionRetryConstraints(\n          db, pIter->bPatchset, zTab, &sApply, xConflict, pCtx\n      );\n      if( rc!=SQLITE_OK ) break;\n\n      sessionUpdateFree(&sApply);\n      sqlite3_free((char*)sApply.azCol);  /* cast works around VC++ bug */\n      sqlite3_finalize(sApply.pDelete);\n      sqlite3_finalize(sApply.pInsert);\n      sqlite3_finalize(sApply.pSelect);\n      sApply.db = db;\n      sApply.pDelete = 0;\n      sApply.pInsert = 0;\n      sApply.pSelect = 0;\n      sApply.nCol = 0;\n      sApply.azCol = 0;\n      sApply.abPK = 0;\n      sApply.bStat1 = 0;\n      sApply.bDeferConstraints = 1;\n      sApply.bRebaseStarted = 0;\n      sApply.bRowid = 0;\n      memset(&sApply.constraints, 0, sizeof(SessionBuffer));\n\n      /* If an xFilter() callback was specified, invoke it now. If the\n      ** xFilter callback returns zero, skip this table. If it returns\n      ** non-zero, proceed. */\n      schemaMismatch = (xFilter && (0==xFilter(pCtx, zNew)));\n      if( schemaMismatch ){\n        zTab = sqlite3_mprintf(\"%s\", zNew);\n        if( zTab==0 ){\n          rc = SQLITE_NOMEM;\n          break;\n        }\n        nTab = (int)strlen(zTab);\n        sApply.azCol = (const char **)zTab;\n      }else{\n        int nMinCol = 0;\n        int i;\n\n        sqlite3changeset_pk(pIter, &abPK, 0);\n        rc = sessionTableInfo(0, db, \"main\", zNew,\n            &sApply.nCol, 0, &zTab, &sApply.azCol, 0, 0,\n            &sApply.abPK, &sApply.bRowid\n        );\n        if( rc!=SQLITE_OK ) break;\n        for(i=0; i<sApply.nCol; i++){\n          if( sApply.abPK[i] ) nMinCol = i+1;\n        }\n\n        if( sApply.nCol==0 ){\n          schemaMismatch = 1;\n          sqlite3_log(SQLITE_SCHEMA,\n              \"sqlite3changeset_apply(): no such table: %s\", zTab\n          );\n        }\n        else if( sApply.nCol<nCol ){\n          schemaMismatch = 1;\n          sqlite3_log(SQLITE_SCHEMA,\n              \"sqlite3changeset_apply(): table %s has %d columns, \"\n              \"expected %d or more\",\n              zTab, sApply.nCol, nCol\n          );\n        }\n        else if( nCol<nMinCol || memcmp(sApply.abPK, abPK, nCol)!=0 ){\n          schemaMismatch = 1;\n          sqlite3_log(SQLITE_SCHEMA, \"sqlite3changeset_apply(): \"\n              \"primary key mismatch for table %s\", zTab\n          );\n        }\n        else{\n          sApply.nCol = nCol;\n          if( 0==sqlite3_stricmp(zTab, \"sqlite_stat1\") ){\n            if( (rc = sessionStat1Sql(db, &sApply) ) ){\n              break;\n            }\n            sApply.bStat1 = 1;\n          }else{\n            if( (rc = sessionSelectRow(db, zTab, &sApply))\n             || (rc = sessionDeleteRow(db, zTab, &sApply))\n             || (rc = sessionInsertRow(db, zTab, &sApply))\n            ){\n              break;\n            }\n            sApply.bStat1 = 0;\n          }\n        }\n        nTab = sqlite3Strlen30(zTab);\n      }\n    }\n\n    /* If there is a schema mismatch on the current table, proceed to the\n    ** next change. A log message has already been issued. */\n    if( schemaMismatch ) continue;\n\n    /* If this is a call to apply_v3(), invoke xFilterIter here. */\n    if( xFilterIter && 0==xFilterIter(pCtx, pIter) ) continue;\n\n    rc = sessionApplyOneWithRetry(db, pIter, &sApply, xConflict, pCtx);\n  }\n\n  bPatchset = pIter->bPatchset;\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changeset_finalize(pIter);\n  }else{\n    sqlite3changeset_finalize(pIter);\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = sessionRetryConstraints(db, bPatchset, zTab, &sApply, xConflict, pCtx);\n  }\n\n  if( rc==SQLITE_OK ){\n    int nFk, notUsed;\n    sqlite3_db_status(db, SQLITE_DBSTATUS_DEFERRED_FKS, &nFk, &notUsed, 0);\n    if( nFk!=0 ){\n      int res = SQLITE_CHANGESET_ABORT;\n      sqlite3_changeset_iter sIter;\n      memset(&sIter, 0, sizeof(sIter));\n      sIter.nCol = nFk;\n      res = xConflict(pCtx, SQLITE_CHANGESET_FOREIGN_KEY, &sIter);\n      if( res!=SQLITE_CHANGESET_OMIT ){\n        rc = SQLITE_CONSTRAINT;\n      }\n    }\n  }\n\n  {\n    int rc2 = sqlite3_exec(db, \"PRAGMA defer_foreign_keys = 0\", 0, 0, 0);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n\n  if( (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT)==0 ){\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_exec(db, \"RELEASE changeset_apply\", 0, 0, 0);\n    }\n    if( rc!=SQLITE_OK ){\n      sqlite3_exec(db, \"ROLLBACK TO changeset_apply\", 0, 0, 0);\n      sqlite3_exec(db, \"RELEASE changeset_apply\", 0, 0, 0);\n    }\n  }\n\n  assert( sApply.bRebase || sApply.rebase.nBuf==0 );\n  if( rc==SQLITE_OK && bPatchset==0 && sApply.bRebase ){\n    assert( ppRebase!=0 && pnRebase!=0 );\n    *ppRebase = (void*)sApply.rebase.aBuf;\n    *pnRebase = sApply.rebase.nBuf;\n    sApply.rebase.aBuf = 0;\n  }\n  sessionUpdateFree(&sApply);\n  sqlite3_finalize(sApply.pInsert);\n  sqlite3_finalize(sApply.pDelete);\n  sqlite3_finalize(sApply.pSelect);\n  sqlite3_free((char*)sApply.azCol);  /* cast works around VC++ bug */\n  sqlite3_free((char*)sApply.constraints.aBuf);\n  sqlite3_free((char*)sApply.rebase.aBuf);\n\n  if( (flags & SQLITE_CHANGESETAPPLY_FKNOACTION) && savedFlag==0 ){\n    assert( db->flags & SQLITE_FkNoAction );\n    db->flags &= ~((u64)SQLITE_FkNoAction);\n    db->aDb[0].pSchema->schema_cookie -= 32;\n  }\n\n  assert( rc!=SQLITE_OK || sApply.zErr==0 );\n  sqlite3_set_errmsg(db, rc, sApply.zErr);\n  sqlite3_free(sApply.zErr);\n\n  sqlite3_mutex_leave(sqlite3_db_mutex(db));\n  return rc;\n}\n\n/*\n** This function is called by all six sqlite3changeset_apply() variants:\n**\n**   +  sqlite3changeset_apply()\n**   +  sqlite3changeset_apply_v2()\n**   +  sqlite3changeset_apply_v3()\n**   +  sqlite3changeset_apply_strm()\n**   +  sqlite3changeset_apply_strm_v2()\n**   +  sqlite3changeset_apply_strm_v3()\n**\n** Arguments passed to this function are as follows:\n**\n** db:\n**   Database handle to apply changeset to main database of.\n**\n** nChangeset/pChangeset:\n**   These are both passed zero for the streaming variants. For the normal\n**   apply() functions, these are passed the size of and the buffer containing\n**   the changeset, respectively.\n**\n** xInput/pIn:\n**   These are both passed zero for the normal variants. For the streaming\n**   apply() functions, these are passed the input callback and context\n**   pointer, respectively.\n**\n** xFilter:\n**   The filter function as passed to apply() or apply_v2() (to filter by\n**   table name), if any. This is always NULL for apply_v3() calls.\n**\n** xFilterIter:\n**   The filter function as passed to apply_v3(), if any.\n**\n** xConflict:\n**   The conflict handler callback (must not be NULL).\n**\n** pCtx:\n**   The context pointer passed to the xFilter and xConflict handler callbacks.\n**\n** ppRebase, pnRebase:\n**   Zero for apply(). The rebase changeset output pointers, if any, for\n**   apply_v2() and apply_v3().\n**\n** flags:\n**   Zero for apply(). The flags parameter for apply_v2() and apply_v3().\n*/\nstatic int sessionChangesetApplyV23(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xFilterIter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p     /* Handle describing current change */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n){\n  sqlite3_changeset_iter *pIter;  /* Iterator to skip through changeset */\n  int bInverse = !!(flags & SQLITE_CHANGESETAPPLY_INVERT);\n  int rc = sessionChangesetStart(\n      &pIter, xInput, pIn, nChangeset, pChangeset, bInverse, 1\n  );\n  if( rc==SQLITE_OK ){\n    rc = sessionChangesetApply(db, pIter,\n        xFilter, xFilterIter, xConflict, pCtx, ppRebase, pnRebase, flags\n    );\n  }\n  return rc;\n}\n\n/*\n** Apply the changeset passed via pChangeset/nChangeset to the main\n** database attached to handle \"db\".\n*/\nSQLITE_API int sqlite3changeset_apply_v2(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n){\n  return sessionChangesetApplyV23(db,\n      nChangeset, pChangeset, 0, 0,\n      xFilter, 0, xConflict, pCtx,\n      ppRebase, pnRebase, flags\n  );\n}\n\n/*\n** Apply the changeset passed via pChangeset/nChangeset to the main\n** database attached to handle \"db\".\n*/\nSQLITE_API int sqlite3changeset_apply_v3(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p     /* Handle describing current change */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n){\n  return sessionChangesetApplyV23(db,\n      nChangeset, pChangeset, 0, 0,\n      0, xFilter, xConflict, pCtx,\n      ppRebase, pnRebase, flags\n  );\n}\n\n/*\n** Apply the changeset passed via pChangeset/nChangeset to the main database\n** attached to handle \"db\". Invoke the supplied conflict handler callback\n** to resolve any conflicts encountered while applying the change.\n*/\nSQLITE_API int sqlite3changeset_apply(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of fifth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n){\n  return sessionChangesetApplyV23(db,\n      nChangeset, pChangeset, 0, 0,\n      xFilter, 0, xConflict, pCtx,\n      0, 0, 0\n  );\n}\n\n/*\n** Apply the changeset passed via xInput/pIn to the main database\n** attached to handle \"db\". Invoke the supplied conflict handler callback\n** to resolve any conflicts encountered while applying the change.\n*/\nSQLITE_API int sqlite3changeset_apply_v3_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n){\n  return sessionChangesetApplyV23(db,\n      0, 0, xInput, pIn,\n      0, xFilter, xConflict, pCtx,\n      ppRebase, pnRebase, flags\n  );\n}\nSQLITE_API int sqlite3changeset_apply_v2_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n){\n  return sessionChangesetApplyV23(db,\n      0, 0, xInput, pIn,\n      xFilter, 0, xConflict, pCtx,\n      ppRebase, pnRebase, flags\n  );\n}\nSQLITE_API int sqlite3changeset_apply_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n){\n  return sessionChangesetApplyV23(db,\n      0, 0, xInput, pIn,\n      xFilter, 0, xConflict, pCtx,\n      0, 0, 0\n  );\n}\n\n/*\n** sqlite3_changegroup handle.\n*/\nstruct sqlite3_changegroup {\n  int rc;                         /* Error code */\n  int bPatch;                     /* True to accumulate patchsets */\n  SessionTable *pList;            /* List of tables in current patch */\n  SessionBuffer rec;\n\n  sqlite3 *db;                    /* Configured by changegroup_schema() */\n  char *zDb;                      /* Configured by changegroup_schema() */\n};\n\n/*\n** This function is called to merge two changes to the same row together as\n** part of an sqlite3changeset_concat() operation. A new change object is\n** allocated and a pointer to it stored in *ppNew.\n*/\nstatic int sessionChangeMerge(\n  SessionTable *pTab,             /* Table structure */\n  int bRebase,                    /* True for a rebase hash-table */\n  int bPatchset,                  /* True for patchsets */\n  SessionChange *pExist,          /* Existing change */\n  int op2,                        /* Second change operation */\n  int bIndirect,                  /* True if second change is indirect */\n  u8 *aRec,                       /* Second change record */\n  int nRec,                       /* Number of bytes in aRec */\n  SessionChange **ppNew           /* OUT: Merged change */\n){\n  SessionChange *pNew = 0;\n  int rc = SQLITE_OK;\n  assert( aRec!=0 );\n\n  if( !pExist ){\n    pNew = (SessionChange *)sqlite3_malloc64(sizeof(SessionChange) + nRec);\n    if( !pNew ){\n      return SQLITE_NOMEM;\n    }\n    memset(pNew, 0, sizeof(SessionChange));\n    pNew->op = op2;\n    pNew->bIndirect = bIndirect;\n    pNew->aRecord = (u8*)&pNew[1];\n    if( bIndirect==0 || bRebase==0 ){\n      pNew->nRecord = nRec;\n      memcpy(pNew->aRecord, aRec, nRec);\n    }else{\n      int i;\n      u8 *pIn = aRec;\n      u8 *pOut = pNew->aRecord;\n      for(i=0; i<pTab->nCol; i++){\n        int nIn = sessionSerialLen(pIn);\n        if( *pIn==0 ){\n          *pOut++ = 0;\n        }else if( pTab->abPK[i]==0 ){\n          *pOut++ = 0xFF;\n        }else{\n          memcpy(pOut, pIn, nIn);\n          pOut += nIn;\n        }\n        pIn += nIn;\n      }\n      pNew->nRecord = pOut - pNew->aRecord;\n    }\n  }else if( bRebase ){\n    if( pExist->op==SQLITE_DELETE && pExist->bIndirect ){\n      *ppNew = pExist;\n    }else{\n      sqlite3_int64 nByte = nRec + pExist->nRecord + sizeof(SessionChange);\n      pNew = (SessionChange*)sqlite3_malloc64(nByte);\n      if( pNew==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        int i;\n        u8 *a1 = pExist->aRecord;\n        u8 *a2 = aRec;\n        u8 *pOut;\n\n        memset(pNew, 0, nByte);\n        pNew->bIndirect = bIndirect || pExist->bIndirect;\n        pNew->op = op2;\n        pOut = pNew->aRecord = (u8*)&pNew[1];\n\n        for(i=0; i<pTab->nCol; i++){\n          int n1 = sessionSerialLen(a1);\n          int n2 = sessionSerialLen(a2);\n          if( *a1==0xFF || (pTab->abPK[i]==0 && bIndirect) ){\n            *pOut++ = 0xFF;\n          }else if( *a2==0 ){\n            memcpy(pOut, a1, n1);\n            pOut += n1;\n          }else{\n            memcpy(pOut, a2, n2);\n            pOut += n2;\n          }\n          a1 += n1;\n          a2 += n2;\n        }\n        pNew->nRecord = pOut - pNew->aRecord;\n      }\n      sqlite3_free(pExist);\n    }\n  }else{\n    int op1 = pExist->op;\n\n    /*\n    **   op1=INSERT, op2=INSERT      ->      Unsupported. Discard op2.\n    **   op1=INSERT, op2=UPDATE      ->      INSERT.\n    **   op1=INSERT, op2=DELETE      ->      (none)\n    **\n    **   op1=UPDATE, op2=INSERT      ->      Unsupported. Discard op2.\n    **   op1=UPDATE, op2=UPDATE      ->      UPDATE.\n    **   op1=UPDATE, op2=DELETE      ->      DELETE.\n    **\n    **   op1=DELETE, op2=INSERT      ->      UPDATE.\n    **   op1=DELETE, op2=UPDATE      ->      Unsupported. Discard op2.\n    **   op1=DELETE, op2=DELETE      ->      Unsupported. Discard op2.\n    */\n    if( (op1==SQLITE_INSERT && op2==SQLITE_INSERT)\n     || (op1==SQLITE_UPDATE && op2==SQLITE_INSERT)\n     || (op1==SQLITE_DELETE && op2==SQLITE_UPDATE)\n     || (op1==SQLITE_DELETE && op2==SQLITE_DELETE)\n    ){\n      pNew = pExist;\n    }else if( op1==SQLITE_INSERT && op2==SQLITE_DELETE ){\n      sqlite3_free(pExist);\n      assert( pNew==0 );\n    }else{\n      u8 *aExist = pExist->aRecord;\n      sqlite3_int64 nByte;\n      u8 *aCsr;\n\n      /* Allocate a new SessionChange object. Ensure that the aRecord[]\n      ** buffer of the new object is large enough to hold any record that\n      ** may be generated by combining the input records.  */\n      nByte = sizeof(SessionChange) + pExist->nRecord + nRec;\n      pNew = (SessionChange *)sqlite3_malloc64(nByte);\n      if( !pNew ){\n        sqlite3_free(pExist);\n        return SQLITE_NOMEM;\n      }\n      memset(pNew, 0, sizeof(SessionChange));\n      pNew->bIndirect = (bIndirect && pExist->bIndirect);\n      aCsr = pNew->aRecord = (u8 *)&pNew[1];\n\n      if( op1==SQLITE_INSERT ){             /* INSERT + UPDATE */\n        u8 *a1 = aRec;\n        assert( op2==SQLITE_UPDATE );\n        pNew->op = SQLITE_INSERT;\n        if( bPatchset==0 ) sessionSkipRecord(&a1, pTab->nCol);\n        sessionMergeRecord(&aCsr, pTab->nCol, aExist, a1);\n      }else if( op1==SQLITE_DELETE ){       /* DELETE + INSERT */\n        assert( op2==SQLITE_INSERT );\n        pNew->op = SQLITE_UPDATE;\n        if( bPatchset ){\n          memcpy(aCsr, aRec, nRec);\n          aCsr += nRec;\n        }else{\n          if( 0==sessionMergeUpdate(&aCsr, pTab, bPatchset, aExist, 0,aRec,0) ){\n            sqlite3_free(pNew);\n            pNew = 0;\n          }\n        }\n      }else if( op2==SQLITE_UPDATE ){       /* UPDATE + UPDATE */\n        u8 *a1 = aExist;\n        u8 *a2 = aRec;\n        assert( op1==SQLITE_UPDATE );\n        if( bPatchset==0 ){\n          sessionSkipRecord(&a1, pTab->nCol);\n          sessionSkipRecord(&a2, pTab->nCol);\n        }\n        pNew->op = SQLITE_UPDATE;\n        if( 0==sessionMergeUpdate(&aCsr, pTab, bPatchset, aRec, aExist,a1,a2) ){\n          sqlite3_free(pNew);\n          pNew = 0;\n        }\n      }else{                                /* UPDATE + DELETE */\n        assert( op1==SQLITE_UPDATE && op2==SQLITE_DELETE );\n        pNew->op = SQLITE_DELETE;\n        if( bPatchset ){\n          memcpy(aCsr, aRec, nRec);\n          aCsr += nRec;\n        }else{\n          sessionMergeRecord(&aCsr, pTab->nCol, aRec, aExist);\n        }\n      }\n\n      if( pNew ){\n        pNew->nRecord = (int)(aCsr - pNew->aRecord);\n      }\n      sqlite3_free(pExist);\n    }\n  }\n\n  *ppNew = pNew;\n  return rc;\n}\n\n/*\n** Check if a changeset entry with nCol columns and the PK array passed\n** as the final argument to this function is compatible with SessionTable\n** pTab. If so, return 1. Otherwise, if they are incompatible in some way,\n** return 0.\n*/\nstatic int sessionChangesetCheckCompat(\n  SessionTable *pTab,\n  int nCol,\n  u8 *abPK\n){\n  if( pTab->azCol && nCol<pTab->nCol ){\n    int ii;\n    for(ii=0; ii<pTab->nCol; ii++){\n      u8 bPK = (ii < nCol) ? abPK[ii] : 0;\n      if( pTab->abPK[ii]!=bPK ) return 0;\n    }\n    return 1;\n  }\n  return (pTab->nCol==nCol && 0==memcmp(abPK, pTab->abPK, nCol));\n}\n\nstatic int sessionChangesetExtendRecord(\n  sqlite3_changegroup *pGrp,\n  SessionTable *pTab,\n  int nCol,\n  int op,\n  const u8 *aRec,\n  int nRec,\n  SessionBuffer *pOut\n){\n  int rc = SQLITE_OK;\n  int ii = 0;\n\n  assert( pTab->azCol );\n  assert( nCol<pTab->nCol );\n\n  pOut->nBuf = 0;\n  if( op==SQLITE_INSERT || (op==SQLITE_DELETE && pGrp->bPatch==0) ){\n    /* Append the missing default column values to the record. */\n    sessionAppendBlob(pOut, aRec, nRec, &rc);\n    if( rc==SQLITE_OK && pTab->pDfltStmt==0 ){\n      rc = sessionPrepareDfltStmt(pGrp->db, pTab, &pTab->pDfltStmt);\n      if( rc==SQLITE_OK && SQLITE_ROW!=sqlite3_step(pTab->pDfltStmt) ){\n        rc = sqlite3_errcode(pGrp->db);\n      }\n    }\n    for(ii=nCol; rc==SQLITE_OK && ii<pTab->nCol; ii++){\n      int eType = sqlite3_column_type(pTab->pDfltStmt, ii);\n      sessionAppendByte(pOut, eType, &rc);\n      switch( eType ){\n        case SQLITE_FLOAT:\n        case SQLITE_INTEGER: {\n          i64 iVal;\n          if( eType==SQLITE_INTEGER ){\n            iVal = sqlite3_column_int64(pTab->pDfltStmt, ii);\n          }else{\n            double rVal = sqlite3_column_int64(pTab->pDfltStmt, ii);\n            memcpy(&iVal, &rVal, sizeof(i64));\n          }\n          if( SQLITE_OK==sessionBufferGrow(pOut, 8, &rc) ){\n            sessionPutI64(&pOut->aBuf[pOut->nBuf], iVal);\n            pOut->nBuf += 8;\n          }\n          break;\n        }\n\n        case SQLITE_BLOB:\n        case SQLITE_TEXT: {\n          int n = sqlite3_column_bytes(pTab->pDfltStmt, ii);\n          sessionAppendVarint(pOut, n, &rc);\n          if( eType==SQLITE_TEXT ){\n            const u8 *z = (const u8*)sqlite3_column_text(pTab->pDfltStmt, ii);\n            sessionAppendBlob(pOut, z, n, &rc);\n          }else{\n            const u8 *z = (const u8*)sqlite3_column_blob(pTab->pDfltStmt, ii);\n            sessionAppendBlob(pOut, z, n, &rc);\n          }\n          break;\n        }\n\n        default:\n          assert( eType==SQLITE_NULL );\n          break;\n      }\n    }\n  }else if( op==SQLITE_UPDATE ){\n    /* Append missing \"undefined\" entries to the old.* record. And, if this\n    ** is an UPDATE, to the new.* record as well.  */\n    int iOff = 0;\n    if( pGrp->bPatch==0 ){\n      for(ii=0; ii<nCol; ii++){\n        iOff += sessionSerialLen(&aRec[iOff]);\n      }\n      sessionAppendBlob(pOut, aRec, iOff, &rc);\n      for(ii=0; ii<(pTab->nCol-nCol); ii++){\n        sessionAppendByte(pOut, 0x00, &rc);\n      }\n    }\n\n    sessionAppendBlob(pOut, &aRec[iOff], nRec-iOff, &rc);\n    for(ii=0; ii<(pTab->nCol-nCol); ii++){\n      sessionAppendByte(pOut, 0x00, &rc);\n    }\n  }else{\n    assert( op==SQLITE_DELETE && pGrp->bPatch );\n    sessionAppendBlob(pOut, aRec, nRec, &rc);\n  }\n\n  return rc;\n}\n\n/*\n** Locate or create a SessionTable object that may be used to add the\n** change currently pointed to by iterator pIter to changegroup pGrp.\n** If successful, set output variable (*ppTab) to point to the table\n** object and return SQLITE_OK. Otherwise, if some error occurs, return\n** an SQLite error code and leave (*ppTab) set to NULL.\n*/\nstatic int sessionChangesetFindTable(\n  sqlite3_changegroup *pGrp,\n  const char *zTab,\n  sqlite3_changeset_iter *pIter,\n  SessionTable **ppTab\n){\n  int rc = SQLITE_OK;\n  SessionTable *pTab = 0;\n  int nTab = (int)strlen(zTab);\n  u8 *abPK = 0;\n  int nCol = 0;\n\n  *ppTab = 0;\n  sqlite3changeset_pk(pIter, &abPK, &nCol);\n\n  /* Search the list for an existing table */\n  for(pTab = pGrp->pList; pTab; pTab=pTab->pNext){\n    if( 0==sqlite3_strnicmp(pTab->zName, zTab, nTab+1) ) break;\n  }\n\n  /* If one was not found above, create a new table now */\n  if( !pTab ){\n    SessionTable **ppNew;\n\n    pTab = sqlite3_malloc64(sizeof(SessionTable) + nCol + nTab+1);\n    if( !pTab ){\n      return SQLITE_NOMEM;\n    }\n    memset(pTab, 0, sizeof(SessionTable));\n    pTab->nCol = nCol;\n    pTab->abPK = (u8*)&pTab[1];\n    memcpy(pTab->abPK, abPK, nCol);\n    pTab->zName = (char*)&pTab->abPK[nCol];\n    memcpy(pTab->zName, zTab, nTab+1);\n\n    if( pGrp->db ){\n      pTab->nCol = 0;\n      rc = sessionInitTable(0, pTab, pGrp->db, pGrp->zDb);\n      if( rc ){\n        assert( pTab->azCol==0 );\n        sqlite3_free(pTab);\n        return rc;\n      }\n    }\n\n    /* The new object must be linked on to the end of the list, not\n    ** simply added to the start of it. This is to ensure that the\n    ** tables within the output of sqlite3changegroup_output() are in\n    ** the right order.  */\n    for(ppNew=&pGrp->pList; *ppNew; ppNew=&(*ppNew)->pNext);\n    *ppNew = pTab;\n  }\n\n  /* Check that the table is compatible. */\n  if( !sessionChangesetCheckCompat(pTab, nCol, abPK) ){\n    rc = SQLITE_SCHEMA;\n  }\n\n  *ppTab = pTab;\n  return rc;\n}\n\n/*\n** Add the change currently indicated by iterator pIter to the hash table\n** belonging to changegroup pGrp.\n*/\nstatic int sessionOneChangeToHash(\n  sqlite3_changegroup *pGrp,\n  sqlite3_changeset_iter *pIter,\n  int bRebase\n){\n  int rc = SQLITE_OK;\n  int nCol = 0;\n  int op = 0;\n  int iHash = 0;\n  int bIndirect = 0;\n  SessionChange *pChange = 0;\n  SessionChange *pExist = 0;\n  SessionChange **pp = 0;\n  SessionTable *pTab = 0;\n  u8 *aRec = &pIter->in.aData[pIter->in.iCurrent + 2];\n  int nRec = (pIter->in.iNext - pIter->in.iCurrent) - 2;\n\n  assert( nRec>0 );\n\n  /* Ensure that only changesets, or only patchsets, but not a mixture\n  ** of both, are being combined. It is an error to try to combine a\n  ** changeset and a patchset.  */\n  if( pGrp->pList==0 ){\n    pGrp->bPatch = pIter->bPatchset;\n  }else if( pIter->bPatchset!=pGrp->bPatch ){\n    rc = SQLITE_ERROR;\n  }\n\n  if( rc==SQLITE_OK ){\n    const char *zTab = 0;\n    sqlite3changeset_op(pIter, &zTab, &nCol, &op, &bIndirect);\n    rc = sessionChangesetFindTable(pGrp, zTab, pIter, &pTab);\n  }\n\n  if( rc==SQLITE_OK && nCol<pTab->nCol ){\n    SessionBuffer *pBuf = &pGrp->rec;\n    rc = sessionChangesetExtendRecord(pGrp, pTab, nCol, op, aRec, nRec, pBuf);\n    aRec = pBuf->aBuf;\n    nRec = pBuf->nBuf;\n    assert( pGrp->db );\n  }\n\n  if( rc==SQLITE_OK && sessionGrowHash(0, pIter->bPatchset, pTab) ){\n    rc = SQLITE_NOMEM;\n  }\n\n  if( rc==SQLITE_OK ){\n    /* Search for existing entry. If found, remove it from the hash table.\n    ** Code below may link it back in.  */\n    iHash = sessionChangeHash(\n        pTab, (pIter->bPatchset && op==SQLITE_DELETE), aRec, pTab->nChange\n    );\n    for(pp=&pTab->apChange[iHash]; *pp; pp=&(*pp)->pNext){\n      int bPkOnly1 = 0;\n      int bPkOnly2 = 0;\n      if( pIter->bPatchset ){\n        bPkOnly1 = (*pp)->op==SQLITE_DELETE;\n        bPkOnly2 = op==SQLITE_DELETE;\n      }\n      if( sessionChangeEqual(pTab, bPkOnly1, (*pp)->aRecord, bPkOnly2, aRec) ){\n        pExist = *pp;\n        *pp = (*pp)->pNext;\n        pTab->nEntry--;\n        break;\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = sessionChangeMerge(pTab, bRebase,\n        pIter->bPatchset, pExist, op, bIndirect, aRec, nRec, &pChange\n    );\n  }\n  if( rc==SQLITE_OK && pChange ){\n    pChange->pNext = pTab->apChange[iHash];\n    pTab->apChange[iHash] = pChange;\n    pTab->nEntry++;\n  }\n\n  if( rc==SQLITE_OK ) rc = pIter->rc;\n  return rc;\n}\n\n/*\n** Add all changes in the changeset traversed by the iterator passed as\n** the first argument to the changegroup hash tables.\n*/\nstatic int sessionChangesetToHash(\n  sqlite3_changeset_iter *pIter,   /* Iterator to read from */\n  sqlite3_changegroup *pGrp,       /* Changegroup object to add changeset to */\n  int bRebase                      /* True if hash table is for rebasing */\n){\n  u8 *aRec;\n  int nRec;\n  int rc = SQLITE_OK;\n\n  pIter->in.bNoDiscard = 1;\n  while( SQLITE_ROW==(sessionChangesetNext(pIter, &aRec, &nRec, 0)) ){\n    rc = sessionOneChangeToHash(pGrp, pIter, bRebase);\n    if( rc!=SQLITE_OK ) break;\n  }\n\n  if( rc==SQLITE_OK ) rc = pIter->rc;\n  return rc;\n}\n\n/*\n** Serialize a changeset (or patchset) based on all changesets (or patchsets)\n** added to the changegroup object passed as the first argument.\n**\n** If xOutput is not NULL, then the changeset/patchset is returned to the\n** user via one or more calls to xOutput, as with the other streaming\n** interfaces.\n**\n** Or, if xOutput is NULL, then (*ppOut) is populated with a pointer to a\n** buffer containing the output changeset before this function returns. In\n** this case (*pnOut) is set to the size of the output buffer in bytes. It\n** is the responsibility of the caller to free the output buffer using\n** sqlite3_free() when it is no longer required.\n**\n** If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite\n** error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut)\n** are both set to 0 before returning.\n*/\nstatic int sessionChangegroupOutput(\n  sqlite3_changegroup *pGrp,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut,\n  int *pnOut,\n  void **ppOut\n){\n  int rc = SQLITE_OK;\n  SessionBuffer buf = {0, 0, 0};\n  SessionTable *pTab;\n  assert( xOutput==0 || (ppOut==0 && pnOut==0) );\n\n  /* Create the serialized output changeset based on the contents of the\n  ** hash tables attached to the SessionTable objects in list p->pList.\n  */\n  for(pTab=pGrp->pList; rc==SQLITE_OK && pTab; pTab=pTab->pNext){\n    int i;\n    if( pTab->nEntry==0 ) continue;\n\n    sessionAppendTableHdr(&buf, pGrp->bPatch, pTab, &rc);\n    for(i=0; i<pTab->nChange; i++){\n      SessionChange *p;\n      for(p=pTab->apChange[i]; p; p=p->pNext){\n        sessionAppendByte(&buf, p->op, &rc);\n        sessionAppendByte(&buf, p->bIndirect, &rc);\n        sessionAppendBlob(&buf, p->aRecord, p->nRecord, &rc);\n        if( rc==SQLITE_OK && xOutput && buf.nBuf>=sessions_strm_chunk_size ){\n          rc = xOutput(pOut, buf.aBuf, buf.nBuf);\n          buf.nBuf = 0;\n        }\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    if( xOutput ){\n      if( buf.nBuf>0 ) rc = xOutput(pOut, buf.aBuf, buf.nBuf);\n    }else if( ppOut ){\n      *ppOut = buf.aBuf;\n      if( pnOut ) *pnOut = buf.nBuf;\n      buf.aBuf = 0;\n    }\n  }\n  sqlite3_free(buf.aBuf);\n\n  return rc;\n}\n\n/*\n** Allocate a new, empty, sqlite3_changegroup.\n*/\nSQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp){\n  int rc = SQLITE_OK;             /* Return code */\n  sqlite3_changegroup *p;         /* New object */\n  p = (sqlite3_changegroup*)sqlite3_malloc(sizeof(sqlite3_changegroup));\n  if( p==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    memset(p, 0, sizeof(sqlite3_changegroup));\n  }\n  *pp = p;\n  return rc;\n}\n\n/*\n** Provide a database schema to the changegroup object.\n*/\nSQLITE_API int sqlite3changegroup_schema(\n  sqlite3_changegroup *pGrp,\n  sqlite3 *db,\n  const char *zDb\n){\n  int rc = SQLITE_OK;\n\n  if( pGrp->pList || pGrp->db ){\n    /* Cannot add a schema after one or more calls to sqlite3changegroup_add(),\n    ** or after sqlite3changegroup_schema() has already been called. */\n    rc = SQLITE_MISUSE;\n  }else{\n    pGrp->zDb = sqlite3_mprintf(\"%s\", zDb);\n    if( pGrp->zDb==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      pGrp->db = db;\n    }\n  }\n  return rc;\n}\n\n/*\n** Add the changeset currently stored in buffer pData, size nData bytes,\n** to changeset-group p.\n*/\nSQLITE_API int sqlite3changegroup_add(sqlite3_changegroup *pGrp, int nData, void *pData){\n  sqlite3_changeset_iter *pIter;  /* Iterator opened on pData/nData */\n  int rc;                         /* Return code */\n\n  rc = sqlite3changeset_start(&pIter, nData, pData);\n  if( rc==SQLITE_OK ){\n    rc = sessionChangesetToHash(pIter, pGrp, 0);\n  }\n  sqlite3changeset_finalize(pIter);\n  return rc;\n}\n\n/*\n** Add a single change to a changeset-group.\n*/\nSQLITE_API int sqlite3changegroup_add_change(\n  sqlite3_changegroup *pGrp,\n  sqlite3_changeset_iter *pIter\n){\n  int rc = SQLITE_OK;\n\n  if( pIter->in.iCurrent==pIter->in.iNext\n   || pIter->rc!=SQLITE_OK\n   || pIter->bInvert\n  ){\n    /* Iterator does not point to any valid entry or is an INVERT iterator. */\n    rc = SQLITE_ERROR;\n  }else{\n    pIter->in.bNoDiscard = 1;\n    rc = sessionOneChangeToHash(pGrp, pIter, 0);\n  }\n  return rc;\n}\n\n/*\n** Obtain a buffer containing a changeset representing the concatenation\n** of all changesets added to the group so far.\n*/\nSQLITE_API int sqlite3changegroup_output(\n    sqlite3_changegroup *pGrp,\n    int *pnData,\n    void **ppData\n){\n  return sessionChangegroupOutput(pGrp, 0, 0, pnData, ppData);\n}\n\n/*\n** Streaming versions of changegroup_add().\n*/\nSQLITE_API int sqlite3changegroup_add_strm(\n  sqlite3_changegroup *pGrp,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn\n){\n  sqlite3_changeset_iter *pIter;  /* Iterator opened on pData/nData */\n  int rc;                         /* Return code */\n\n  rc = sqlite3changeset_start_strm(&pIter, xInput, pIn);\n  if( rc==SQLITE_OK ){\n    rc = sessionChangesetToHash(pIter, pGrp, 0);\n  }\n  sqlite3changeset_finalize(pIter);\n  return rc;\n}\n\n/*\n** Streaming versions of changegroup_output().\n*/\nSQLITE_API int sqlite3changegroup_output_strm(\n  sqlite3_changegroup *pGrp,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  return sessionChangegroupOutput(pGrp, xOutput, pOut, 0, 0);\n}\n\n/*\n** Delete a changegroup object.\n*/\nSQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup *pGrp){\n  if( pGrp ){\n    sqlite3_free(pGrp->zDb);\n    sessionDeleteTable(0, pGrp->pList);\n    sqlite3_free(pGrp->rec.aBuf);\n    sqlite3_free(pGrp);\n  }\n}\n\n/*\n** Combine two changesets together.\n*/\nSQLITE_API int sqlite3changeset_concat(\n  int nLeft,                      /* Number of bytes in lhs input */\n  void *pLeft,                    /* Lhs input changeset */\n  int nRight                      /* Number of bytes in rhs input */,\n  void *pRight,                   /* Rhs input changeset */\n  int *pnOut,                     /* OUT: Number of bytes in output changeset */\n  void **ppOut                    /* OUT: changeset (left <concat> right) */\n){\n  sqlite3_changegroup *pGrp;\n  int rc;\n\n  rc = sqlite3changegroup_new(&pGrp);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_add(pGrp, nLeft, pLeft);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_add(pGrp, nRight, pRight);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_output(pGrp, pnOut, ppOut);\n  }\n  sqlite3changegroup_delete(pGrp);\n\n  return rc;\n}\n\n/*\n** Streaming version of sqlite3changeset_concat().\n*/\nSQLITE_API int sqlite3changeset_concat_strm(\n  int (*xInputA)(void *pIn, void *pData, int *pnData),\n  void *pInA,\n  int (*xInputB)(void *pIn, void *pData, int *pnData),\n  void *pInB,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  sqlite3_changegroup *pGrp;\n  int rc;\n\n  rc = sqlite3changegroup_new(&pGrp);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_add_strm(pGrp, xInputA, pInA);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_add_strm(pGrp, xInputB, pInB);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3changegroup_output_strm(pGrp, xOutput, pOut);\n  }\n  sqlite3changegroup_delete(pGrp);\n\n  return rc;\n}\n\n/*\n** Changeset rebaser handle.\n*/\nstruct sqlite3_rebaser {\n  sqlite3_changegroup grp;        /* Hash table */\n};\n\n/*\n** Buffers a1 and a2 must both contain a sessions module record nCol\n** fields in size. This function appends an nCol sessions module\n** record to buffer pBuf that is a copy of a1, except that for\n** each field that is undefined in a1[], swap in the field from a2[].\n*/\nstatic void sessionAppendRecordMerge(\n  SessionBuffer *pBuf,            /* Buffer to append to */\n  int nCol,                       /* Number of columns in each record */\n  u8 *a1, int n1,                 /* Record 1 */\n  u8 *a2, int n2,                 /* Record 2 */\n  int *pRc                        /* IN/OUT: error code */\n){\n  sessionBufferGrow(pBuf, n1+n2, pRc);\n  if( *pRc==SQLITE_OK ){\n    int i;\n    u8 *pOut = &pBuf->aBuf[pBuf->nBuf];\n    for(i=0; i<nCol; i++){\n      int nn1 = sessionSerialLen(a1);\n      int nn2 = sessionSerialLen(a2);\n      if( *a1==0 || *a1==0xFF ){\n        memcpy(pOut, a2, nn2);\n        pOut += nn2;\n      }else{\n        memcpy(pOut, a1, nn1);\n        pOut += nn1;\n      }\n      a1 += nn1;\n      a2 += nn2;\n    }\n\n    pBuf->nBuf = pOut-pBuf->aBuf;\n    assert( pBuf->nBuf<=pBuf->nAlloc );\n  }\n}\n\n/*\n** This function is called when rebasing a local UPDATE change against one\n** or more remote UPDATE changes. The aRec/nRec buffer contains the current\n** old.* and new.* records for the change. The rebase buffer (a single\n** record) is in aChange/nChange. The rebased change is appended to buffer\n** pBuf.\n**\n** Rebasing the UPDATE involves:\n**\n**   * Removing any changes to fields for which the corresponding field\n**     in the rebase buffer is set to \"replaced\" (type 0xFF). If this\n**     means the UPDATE change updates no fields, nothing is appended\n**     to the output buffer.\n**\n**   * For each field modified by the local change for which the\n**     corresponding field in the rebase buffer is not \"undefined\" (0x00)\n**     or \"replaced\" (0xFF), the old.* value is replaced by the value\n**     in the rebase buffer.\n*/\nstatic void sessionAppendPartialUpdate(\n  SessionBuffer *pBuf,            /* Append record here */\n  sqlite3_changeset_iter *pIter,  /* Iterator pointed at local change */\n  u8 *aRec, int nRec,             /* Local change */\n  u8 *aChange, int nChange,       /* Record to rebase against */\n  int *pRc                        /* IN/OUT: Return Code */\n){\n  sessionBufferGrow(pBuf, 2+nRec+nChange, pRc);\n  if( *pRc==SQLITE_OK ){\n    int bData = 0;\n    u8 *pOut = &pBuf->aBuf[pBuf->nBuf];\n    int i;\n    u8 *a1 = aRec;\n    u8 *a2 = aChange;\n\n    *pOut++ = SQLITE_UPDATE;\n    *pOut++ = pIter->bIndirect;\n    for(i=0; i<pIter->nCol; i++){\n      int n1 = sessionSerialLen(a1);\n      int n2 = sessionSerialLen(a2);\n      if( pIter->abPK[i] || a2[0]==0 ){\n        if( !pIter->abPK[i] && a1[0] ) bData = 1;\n        memcpy(pOut, a1, n1);\n        pOut += n1;\n      }else if( a2[0]!=0xFF && a1[0] ){\n        bData = 1;\n        memcpy(pOut, a2, n2);\n        pOut += n2;\n      }else{\n        *pOut++ = '\\0';\n      }\n      a1 += n1;\n      a2 += n2;\n    }\n    if( bData ){\n      a2 = aChange;\n      for(i=0; i<pIter->nCol; i++){\n        int n1 = sessionSerialLen(a1);\n        int n2 = sessionSerialLen(a2);\n        if( pIter->abPK[i] || a2[0]!=0xFF ){\n          memcpy(pOut, a1, n1);\n          pOut += n1;\n        }else{\n          *pOut++ = '\\0';\n        }\n        a1 += n1;\n        a2 += n2;\n      }\n      pBuf->nBuf = (pOut - pBuf->aBuf);\n    }\n  }\n}\n\n/*\n** pIter is configured to iterate through a changeset. This function rebases\n** that changeset according to the current configuration of the rebaser\n** object passed as the first argument. If no error occurs and argument xOutput\n** is not NULL, then the changeset is returned to the caller by invoking\n** xOutput zero or more times and SQLITE_OK returned. Or, if xOutput is NULL,\n** then (*ppOut) is set to point to a buffer containing the rebased changeset\n** before this function returns. In this case (*pnOut) is set to the size of\n** the buffer in bytes.  It is the responsibility of the caller to eventually\n** free the (*ppOut) buffer using sqlite3_free().\n**\n** If an error occurs, an SQLite error code is returned. If ppOut and\n** pnOut are not NULL, then the two output parameters are set to 0 before\n** returning.\n*/\nstatic int sessionRebase(\n  sqlite3_rebaser *p,             /* Rebaser hash table */\n  sqlite3_changeset_iter *pIter,  /* Input data */\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut,                     /* Context for xOutput callback */\n  int *pnOut,                     /* OUT: Number of bytes in output changeset */\n  void **ppOut                    /* OUT: Inverse of pChangeset */\n){\n  int rc = SQLITE_OK;\n  u8 *aRec = 0;\n  int nRec = 0;\n  int bNew = 0;\n  SessionTable *pTab = 0;\n  SessionBuffer sOut = {0,0,0};\n\n  while( SQLITE_ROW==sessionChangesetNext(pIter, &aRec, &nRec, &bNew) ){\n    SessionChange *pChange = 0;\n    int bDone = 0;\n\n    if( bNew ){\n      const char *zTab = pIter->zTab;\n      for(pTab=p->grp.pList; pTab; pTab=pTab->pNext){\n        if( 0==sqlite3_stricmp(pTab->zName, zTab) ) break;\n      }\n      bNew = 0;\n\n      /* A patchset may not be rebased */\n      if( pIter->bPatchset ){\n        rc = SQLITE_ERROR;\n      }\n\n      /* Append a table header to the output for this new table */\n      sessionAppendByte(&sOut, pIter->bPatchset ? 'P' : 'T', &rc);\n      sessionAppendVarint(&sOut, pIter->nCol, &rc);\n      sessionAppendBlob(&sOut, pIter->abPK, pIter->nCol, &rc);\n      sessionAppendBlob(&sOut,(u8*)pIter->zTab,(int)strlen(pIter->zTab)+1,&rc);\n    }\n\n    if( pTab && rc==SQLITE_OK ){\n      int iHash = sessionChangeHash(pTab, 0, aRec, pTab->nChange);\n\n      for(pChange=pTab->apChange[iHash]; pChange; pChange=pChange->pNext){\n        if( sessionChangeEqual(pTab, 0, aRec, 0, pChange->aRecord) ){\n          break;\n        }\n      }\n    }\n\n    if( pChange ){\n      assert( pChange->op==SQLITE_DELETE || pChange->op==SQLITE_INSERT );\n      switch( pIter->op ){\n        case SQLITE_INSERT:\n          if( pChange->op==SQLITE_INSERT ){\n            bDone = 1;\n            if( pChange->bIndirect==0 ){\n              sessionAppendByte(&sOut, SQLITE_UPDATE, &rc);\n              sessionAppendByte(&sOut, pIter->bIndirect, &rc);\n              sessionAppendBlob(&sOut, pChange->aRecord, pChange->nRecord, &rc);\n              sessionAppendBlob(&sOut, aRec, nRec, &rc);\n            }\n          }\n          break;\n\n        case SQLITE_UPDATE:\n          bDone = 1;\n          if( pChange->op==SQLITE_DELETE ){\n            if( pChange->bIndirect==0 ){\n              u8 *pCsr = aRec;\n              sessionSkipRecord(&pCsr, pIter->nCol);\n              sessionAppendByte(&sOut, SQLITE_INSERT, &rc);\n              sessionAppendByte(&sOut, pIter->bIndirect, &rc);\n              sessionAppendRecordMerge(&sOut, pIter->nCol,\n                  pCsr, nRec-(pCsr-aRec),\n                  pChange->aRecord, pChange->nRecord, &rc\n              );\n            }\n          }else{\n            sessionAppendPartialUpdate(&sOut, pIter,\n                aRec, nRec, pChange->aRecord, pChange->nRecord, &rc\n            );\n          }\n          break;\n\n        default:\n          assert( pIter->op==SQLITE_DELETE );\n          bDone = 1;\n          if( pChange->op==SQLITE_INSERT ){\n            sessionAppendByte(&sOut, SQLITE_DELETE, &rc);\n            sessionAppendByte(&sOut, pIter->bIndirect, &rc);\n            sessionAppendRecordMerge(&sOut, pIter->nCol,\n                pChange->aRecord, pChange->nRecord, aRec, nRec, &rc\n            );\n          }\n          break;\n      }\n    }\n\n    if( bDone==0 ){\n      sessionAppendByte(&sOut, pIter->op, &rc);\n      sessionAppendByte(&sOut, pIter->bIndirect, &rc);\n      sessionAppendBlob(&sOut, aRec, nRec, &rc);\n    }\n    if( rc==SQLITE_OK && xOutput && sOut.nBuf>sessions_strm_chunk_size ){\n      rc = xOutput(pOut, sOut.aBuf, sOut.nBuf);\n      sOut.nBuf = 0;\n    }\n    if( rc ) break;\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(sOut.aBuf);\n    memset(&sOut, 0, sizeof(sOut));\n  }\n\n  if( rc==SQLITE_OK ){\n    if( xOutput ){\n      if( sOut.nBuf>0 ){\n        rc = xOutput(pOut, sOut.aBuf, sOut.nBuf);\n      }\n    }else if( ppOut ){\n      *ppOut = (void*)sOut.aBuf;\n      *pnOut = sOut.nBuf;\n      sOut.aBuf = 0;\n    }\n  }\n  sqlite3_free(sOut.aBuf);\n  return rc;\n}\n\n/*\n** Create a new rebaser object.\n*/\nSQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew){\n  int rc = SQLITE_OK;\n  sqlite3_rebaser *pNew;\n\n  pNew = sqlite3_malloc(sizeof(sqlite3_rebaser));\n  if( pNew==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    memset(pNew, 0, sizeof(sqlite3_rebaser));\n  }\n  *ppNew = pNew;\n  return rc;\n}\n\n/*\n** Call this one or more times to configure a rebaser.\n*/\nSQLITE_API int sqlite3rebaser_configure(\n  sqlite3_rebaser *p,\n  int nRebase, const void *pRebase\n){\n  sqlite3_changeset_iter *pIter = 0;   /* Iterator opened on pData/nData */\n  int rc;                              /* Return code */\n  rc = sqlite3changeset_start(&pIter, nRebase, (void*)pRebase);\n  if( rc==SQLITE_OK ){\n    rc = sessionChangesetToHash(pIter, &p->grp, 1);\n  }\n  sqlite3changeset_finalize(pIter);\n  return rc;\n}\n\n/*\n** Rebase a changeset according to current rebaser configuration\n*/\nSQLITE_API int sqlite3rebaser_rebase(\n  sqlite3_rebaser *p,\n  int nIn, const void *pIn,\n  int *pnOut, void **ppOut\n){\n  sqlite3_changeset_iter *pIter = 0;   /* Iterator to skip through input */\n  int rc = sqlite3changeset_start(&pIter, nIn, (void*)pIn);\n\n  if( rc==SQLITE_OK ){\n    rc = sessionRebase(p, pIter, 0, 0, pnOut, ppOut);\n    sqlite3changeset_finalize(pIter);\n  }\n\n  return rc;\n}\n\n/*\n** Rebase a changeset according to current rebaser configuration\n*/\nSQLITE_API int sqlite3rebaser_rebase_strm(\n  sqlite3_rebaser *p,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n){\n  sqlite3_changeset_iter *pIter = 0;   /* Iterator to skip through input */\n  int rc = sqlite3changeset_start_strm(&pIter, xInput, pIn);\n\n  if( rc==SQLITE_OK ){\n    rc = sessionRebase(p, pIter, xOutput, pOut, 0, 0);\n    sqlite3changeset_finalize(pIter);\n  }\n\n  return rc;\n}\n\n/*\n** Destroy a rebaser object\n*/\nSQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p){\n  if( p ){\n    sessionDeleteTable(0, p->grp.pList);\n    sqlite3_free(p->grp.rec.aBuf);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Global configuration\n*/\nSQLITE_API int sqlite3session_config(int op, void *pArg){\n  int rc = SQLITE_OK;\n  switch( op ){\n    case SQLITE_SESSION_CONFIG_STRMSIZE: {\n      int *pInt = (int*)pArg;\n      if( *pInt>0 ){\n        sessions_strm_chunk_size = *pInt;\n      }\n      *pInt = sessions_strm_chunk_size;\n      break;\n    }\n    default:\n      rc = SQLITE_MISUSE;\n      break;\n  }\n  return rc;\n}\n\n#endif /* SQLITE_ENABLE_SESSION && SQLITE_ENABLE_PREUPDATE_HOOK */\n\n/************** End of sqlite3session.c **************************************/\n/************** Begin file fts5.c ********************************************/\n\n/*\n** This, the \"fts5.c\" source file, is a composite file that is itself\n** assembled from the following files:\n**\n**    fts5.h\n**    fts5Int.h\n**    fts5parse.h          <--- Generated from fts5parse.y by Lemon\n**    fts5parse.c          <--- Generated from fts5parse.y by Lemon\n**    fts5_aux.c\n**    fts5_buffer.c\n**    fts5_config.c\n**    fts5_expr.c\n**    fts5_hash.c\n**    fts5_index.c\n**    fts5_main.c\n**    fts5_storage.c\n**    fts5_tokenize.c\n**    fts5_unicode2.c\n**    fts5_varint.c\n**    fts5_vocab.c\n*/\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)\n\n#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)\n# define NDEBUG 1\n#endif\n#if defined(NDEBUG) && defined(SQLITE_DEBUG)\n# undef NDEBUG\n#endif\n\n#ifdef HAVE_STDINT_H\n/* #include <stdint.h> */\n#endif\n#ifdef HAVE_INTTYPES_H\n/* #include <inttypes.h> */\n#endif\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Interfaces to extend FTS5. Using the interfaces defined in this file,\n** FTS5 may be extended with:\n**\n**     * custom tokenizers, and\n**     * custom auxiliary functions.\n*/\n\n\n#ifndef _FTS5_H\n#define _FTS5_H\n\n/* #include \"sqlite3.h\" */\n\n#if 0\nextern \"C\" {\n#endif\n\n/*************************************************************************\n** CUSTOM AUXILIARY FUNCTIONS\n**\n** Virtual table implementations may overload SQL functions by implementing\n** the sqlite3_module.xFindFunction() method.\n*/\n\ntypedef struct Fts5ExtensionApi Fts5ExtensionApi;\ntypedef struct Fts5Context Fts5Context;\ntypedef struct Fts5PhraseIter Fts5PhraseIter;\n\ntypedef void (*fts5_extension_function)(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n);\n\nstruct Fts5PhraseIter {\n  const unsigned char *a;\n  const unsigned char *b;\n};\n\n/*\n** EXTENSION API FUNCTIONS\n**\n** xUserData(pFts):\n**   Return a copy of the pUserData pointer passed to the xCreateFunction()\n**   API when the extension function was registered.\n**\n** xColumnTotalSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the FTS5 table. Or, if iCol is\n**   non-negative but less than the number of columns in the table, return\n**   the total number of tokens in column iCol, considering all rows in\n**   the FTS5 table.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n** xColumnCount(pFts):\n**   Return the number of columns in the table.\n**\n** xColumnSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the current row. Or, if iCol is\n**   non-negative but less than the number of columns in the table, set\n**   *pnToken to the number of tokens in column iCol of the current row.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n**   This function may be quite inefficient if used with an FTS5 table\n**   created with the \"columnsize=0\" option.\n**\n** xColumnText:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the text of column iCol of\n**   the current document. If successful, (*pz) is set to point to a buffer\n**   containing the text in utf-8 encoding, (*pn) is set to the size in bytes\n**   (not characters) of the buffer and SQLITE_OK is returned. Otherwise,\n**   if an error occurs, an SQLite error code is returned and the final values\n**   of (*pz) and (*pn) are undefined.\n**\n** xPhraseCount:\n**   Returns the number of phrases in the current query expression.\n**\n** xPhraseSize:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of phrases in the current query, as returned by xPhraseCount,\n**   0 is returned. Otherwise, this function returns the number of tokens in\n**   phrase iPhrase of the query. Phrases are numbered starting from zero.\n**\n** xInstCount:\n**   Set *pnInst to the total number of occurrences of all phrases within\n**   the query within the current row. Return SQLITE_OK if successful, or\n**   an error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always returns 0.\n**\n** xInst:\n**   Query for the details of phrase match iIdx within the current row.\n**   Phrase matches are numbered starting from zero, so the iIdx argument\n**   should be greater than or equal to zero and smaller than the value\n**   output by xInstCount(). If iIdx is less than zero or greater than\n**   or equal to the value returned by xInstCount(), SQLITE_RANGE is returned.\n**\n**   Otherwise, output parameter *piPhrase is set to the phrase number, *piCol\n**   to the column in which it occurs and *piOff the token offset of the\n**   first token of the phrase. SQLITE_OK is returned if successful, or an\n**   error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xRowid:\n**   Returns the rowid of the current row.\n**\n** xTokenize:\n**   Tokenize text using the tokenizer belonging to the FTS5 table.\n**\n** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):\n**   This API function is used to query the FTS table for phrase iPhrase\n**   of the current query. Specifically, a query equivalent to:\n**\n**       ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid\n**\n**   with $p set to a phrase equivalent to the phrase iPhrase of the\n**   current query is executed. Any column filter that applies to\n**   phrase iPhrase of the current query is included in $p. For each\n**   row visited, the callback function passed as the fourth argument\n**   is invoked. The context and API objects passed to the callback\n**   function may be used to access the properties of each matched row.\n**   Invoking Api.xUserData() returns a copy of the pointer passed as\n**   the third argument to pUserData.\n**\n**   If parameter iPhrase is less than zero, or greater than or equal to\n**   the number of phrases in the query, as returned by xPhraseCount(),\n**   this function returns SQLITE_RANGE.\n**\n**   If the callback function returns any value other than SQLITE_OK, the\n**   query is abandoned and the xQueryPhrase function returns immediately.\n**   If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.\n**   Otherwise, the error code is propagated upwards.\n**\n**   If the query runs to completion without incident, SQLITE_OK is returned.\n**   Or, if some error occurs before the query completes or is aborted by\n**   the callback, an SQLite error code is returned.\n**\n**\n** xSetAuxdata(pFts5, pAux, xDelete)\n**\n**   Save the pointer passed as the second argument as the extension function's\n**   \"auxiliary data\". The pointer may then be retrieved by the current or any\n**   future invocation of the same fts5 extension function made as part of\n**   the same MATCH query using the xGetAuxdata() API.\n**\n**   Each extension function is allocated a single auxiliary data slot for\n**   each FTS query (MATCH expression). If the extension function is invoked\n**   more than once for a single FTS query, then all invocations share a\n**   single auxiliary data context.\n**\n**   If there is already an auxiliary data pointer when this function is\n**   invoked, then it is replaced by the new pointer. If an xDelete callback\n**   was specified along with the original pointer, it is invoked at this\n**   point.\n**\n**   The xDelete callback, if one is specified, is also invoked on the\n**   auxiliary data pointer after the FTS5 query has finished.\n**\n**   If an error (e.g. an OOM condition) occurs within this function,\n**   the auxiliary data is set to NULL and an error code returned. If the\n**   xDelete parameter was not NULL, it is invoked on the auxiliary data\n**   pointer before returning.\n**\n**\n** xGetAuxdata(pFts5, bClear)\n**\n**   Returns the current auxiliary data pointer for the fts5 extension\n**   function. See the xSetAuxdata() method for details.\n**\n**   If the bClear argument is non-zero, then the auxiliary data is cleared\n**   (set to NULL) before this function returns. In this case the xDelete,\n**   if any, is not invoked.\n**\n**\n** xRowCount(pFts5, pnRow)\n**\n**   This function is used to retrieve the total number of rows in the table.\n**   In other words, the same value that would be returned by:\n**\n**        SELECT count(*) FROM ftstable;\n**\n** xPhraseFirst()\n**   This function is used, along with type Fts5PhraseIter and the xPhraseNext\n**   method, to iterate through all instances of a single query phrase within\n**   the current row. This is the same information as is accessible via the\n**   xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient\n**   to use, this API may be faster under some circumstances. To iterate\n**   through instances of phrase iPhrase, use the following code:\n**\n**       Fts5PhraseIter iter;\n**       int iCol, iOff;\n**       for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);\n**           iCol>=0;\n**           pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)\n**       ){\n**         // An instance of phrase iPhrase at offset iOff of column iCol\n**       }\n**\n**   The Fts5PhraseIter structure is defined above. Applications should not\n**   modify this structure directly - it should only be used as shown above\n**   with the xPhraseFirst() and xPhraseNext() API methods (and by\n**   xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below).\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always iterates\n**   through an empty set (all calls to xPhraseFirst() set iCol to -1).\n**\n**   In all cases, matches are visited in (column ASC, offset ASC) order.\n**   i.e. all those in column 0, sorted by offset, followed by those in\n**   column 1, etc.\n**\n** xPhraseNext()\n**   See xPhraseFirst above.\n**\n** xPhraseFirstColumn()\n**   This function and xPhraseNextColumn() are similar to the xPhraseFirst()\n**   and xPhraseNext() APIs described above. The difference is that instead\n**   of iterating through all instances of a phrase in the current row, these\n**   APIs are used to iterate through the set of columns in the current row\n**   that contain one or more instances of a specified phrase. For example:\n**\n**       Fts5PhraseIter iter;\n**       int iCol;\n**       for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);\n**           iCol>=0;\n**           pApi->xPhraseNextColumn(pFts, &iter, &iCol)\n**       ){\n**         // Column iCol contains at least one instance of phrase iPhrase\n**       }\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" option. If the FTS5 table is created with either\n**   \"detail=none\" \"content=\" option (i.e. if it is a contentless table),\n**   then this API always iterates through an empty set (all calls to\n**   xPhraseFirstColumn() set iCol to -1).\n**\n**   The information accessed using this API and its companion\n**   xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext\n**   (or xInst/xInstCount). The chief advantage of this API is that it is\n**   significantly more efficient than those alternatives when used with\n**   \"detail=column\" tables.\n**\n** xPhraseNextColumn()\n**   See xPhraseFirstColumn above.\n**\n** xQueryToken(pFts5, iPhrase, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase iPhrase of the current\n**   query. Before returning, output parameter *ppToken is set to point\n**   to a buffer containing the requested token, and *pnToken to the\n**   size of this buffer in bytes.\n**\n**   If iPhrase or iToken are less than zero, or if iPhrase is greater than\n**   or equal to the number of phrases in the query as reported by\n**   xPhraseCount(), or if iToken is equal to or greater than the number of\n**   tokens in the phrase, SQLITE_RANGE is returned and *ppToken and *pnToken\n     are both zeroed.\n**\n**   The output text is not a copy of the query text that specified the\n**   token. It is the output of the tokenizer module. For tokendata=1\n**   tables, this includes any embedded 0x00 and trailing data.\n**\n** xInstToken(pFts5, iIdx, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase hit iIdx within the\n**   current row. If iIdx is less than zero or greater than or equal to the\n**   value returned by xInstCount(), SQLITE_RANGE is returned.  Otherwise,\n**   output variable (*ppToken) is set to point to a buffer containing the\n**   matching document token, and (*pnToken) to the size of that buffer in\n**   bytes.\n**\n**   The output text is not a copy of the document text that was tokenized.\n**   It is the output of the tokenizer module. For tokendata=1 tables, this\n**   includes any embedded 0x00 and trailing data.\n**\n**   This API may be slow in some cases if the token identified by parameters\n**   iIdx and iToken matched a prefix token in the query. In most cases, the\n**   first call to this API for each prefix token in the query is forced\n**   to scan the portion of the full-text index that matches the prefix\n**   token to collect the extra data required by this API. If the prefix\n**   token matches a large number of token instances in the document set,\n**   this may be a performance problem.\n**\n**   If the user knows in advance that a query may use this API for a\n**   prefix token, FTS5 may be configured to collect all required data as part\n**   of the initial querying of the full-text index, avoiding the second scan\n**   entirely. This also causes prefix queries that do not use this API to\n**   run more slowly and use more memory. FTS5 may be configured in this way\n**   either on a per-table basis using the [FTS5 insttoken | 'insttoken']\n**   option, or on a per-query basis using the\n**   [fts5_insttoken | fts5_insttoken()] user function.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xColumnLocale(pFts5, iIdx, pzLocale, pnLocale)\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the locale associated\n**   with column iCol of the current row. Usually, there is no associated\n**   locale, and output parameters (*pzLocale) and (*pnLocale) are set\n**   to NULL and 0, respectively. However, if the fts5_locale() function\n**   was used to associate a locale with the value when it was inserted\n**   into the fts5 table, then (*pzLocale) is set to point to a nul-terminated\n**   buffer containing the name of the locale in utf-8 encoding. (*pnLocale)\n**   is set to the size in bytes of the buffer, not including the\n**   nul-terminator.\n**\n**   If successful, SQLITE_OK is returned. Or, if an error occurs, an\n**   SQLite error code is returned. The final value of the output parameters\n**   is undefined in this case.\n**\n** xTokenize_v2:\n**   Tokenize text using the tokenizer belonging to the FTS5 table. This\n**   API is the same as the xTokenize() API, except that it allows a tokenizer\n**   locale to be specified.\n*/\nstruct Fts5ExtensionApi {\n  int iVersion;                   /* Currently always set to 4 */\n\n  void *(*xUserData)(Fts5Context*);\n\n  int (*xColumnCount)(Fts5Context*);\n  int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);\n  int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);\n\n  int (*xTokenize)(Fts5Context*,\n    const char *pText, int nText, /* Text to tokenize */\n    void *pCtx,                   /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n\n  int (*xPhraseCount)(Fts5Context*);\n  int (*xPhraseSize)(Fts5Context*, int iPhrase);\n\n  int (*xInstCount)(Fts5Context*, int *pnInst);\n  int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);\n\n  sqlite3_int64 (*xRowid)(Fts5Context*);\n  int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);\n\n  int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,\n    int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)\n  );\n  int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));\n  void *(*xGetAuxdata)(Fts5Context*, int bClear);\n\n  int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);\n  void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);\n\n  int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);\n  void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);\n\n  /* Below this point are iVersion>=3 only */\n  int (*xQueryToken)(Fts5Context*,\n      int iPhrase, int iToken,\n      const char **ppToken, int *pnToken\n  );\n  int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);\n\n  /* Below this point are iVersion>=4 only */\n  int (*xColumnLocale)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xTokenize_v2)(Fts5Context*,\n    const char *pText, int nText,      /* Text to tokenize */\n    const char *pLocale, int nLocale,  /* Locale to pass to tokenizer */\n    void *pCtx,                        /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n};\n\n/*\n** CUSTOM AUXILIARY FUNCTIONS\n*************************************************************************/\n\n/*************************************************************************\n** CUSTOM TOKENIZERS\n**\n** Applications may also register custom tokenizer types. A tokenizer\n** is registered by providing fts5 with a populated instance of the\n** following structure. All structure methods must be defined, setting\n** any member of the fts5_tokenizer struct to NULL leads to undefined\n** behaviour. The structure methods are expected to function as follows:\n**\n** xCreate:\n**   This function is used to allocate and initialize a tokenizer instance.\n**   A tokenizer instance is required to actually tokenize text.\n**\n**   The first argument passed to this function is a copy of the (void*)\n**   pointer provided by the application when the fts5_tokenizer_v2 object\n**   was registered with FTS5 (the third argument to xCreateTokenizer()).\n**   The second and third arguments are an array of nul-terminated strings\n**   containing the tokenizer arguments, if any, specified following the\n**   tokenizer name as part of the CREATE VIRTUAL TABLE statement used\n**   to create the FTS5 table.\n**\n**   The final argument is an output variable. If successful, (*ppOut)\n**   should be set to point to the new tokenizer handle and SQLITE_OK\n**   returned. If an error occurs, some value other than SQLITE_OK should\n**   be returned. In this case, fts5 assumes that the final value of *ppOut\n**   is undefined.\n**\n** xDelete:\n**   This function is invoked to delete a tokenizer handle previously\n**   allocated using xCreate(). Fts5 guarantees that this function will\n**   be invoked exactly once for each successful call to xCreate().\n**\n** xTokenize:\n**   This function is expected to tokenize the nText byte string indicated\n**   by argument pText. pText may or may not be nul-terminated. The first\n**   argument passed to this function is a pointer to an Fts5Tokenizer object\n**   returned by an earlier call to xCreate().\n**\n**   The third argument indicates the reason that FTS5 is requesting\n**   tokenization of the supplied text. This is always one of the following\n**   four values:\n**\n**   <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into\n**            or removed from the FTS table. The tokenizer is being invoked to\n**            determine the set of tokens to add to (or delete from) the\n**            FTS index.\n**\n**       <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed\n**            against the FTS index. The tokenizer is being called to tokenize\n**            a bareword or quoted string specified as part of the query.\n**\n**       <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as\n**            FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is\n**            followed by a \"*\" character, indicating that the last token\n**            returned by the tokenizer will be treated as a token prefix.\n**\n**       <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to\n**            satisfy an fts5_api.xTokenize() request made by an auxiliary\n**            function. Or an fts5_api.xColumnSize() request made by the same\n**            on a columnsize=0 database.\n**   </ul>\n**\n**   The sixth and seventh arguments passed to xTokenize() - pLocale and\n**   nLocale - are a pointer to a buffer containing the locale to use for\n**   tokenization (e.g. \"en_US\") and its size in bytes, respectively. The\n**   pLocale buffer is not nul-terminated. pLocale may be passed NULL (in\n**   which case nLocale is always 0) to indicate that the tokenizer should\n**   use its default locale.\n**\n**   For each token in the input string, the supplied callback xToken() must\n**   be invoked. The first argument to it should be a copy of the pointer\n**   passed as the second argument to xTokenize(). The third and fourth\n**   arguments are a pointer to a buffer containing the token text, and the\n**   size of the token in bytes. The 4th and 5th arguments are the byte offsets\n**   of the first byte of and first byte immediately following the text from\n**   which the token is derived within the input.\n**\n**   The second argument passed to the xToken() callback (\"tflags\") should\n**   normally be set to 0. The exception is if the tokenizer supports\n**   synonyms. In this case see the discussion below for details.\n**\n**   FTS5 assumes the xToken() callback is invoked for each token in the\n**   order that they occur within the input text.\n**\n**   If an xToken() callback returns any value other than SQLITE_OK, then\n**   the tokenization should be abandoned and the xTokenize() method should\n**   immediately return a copy of the xToken() return value. Or, if the\n**   input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,\n**   if an error occurs with the xTokenize() implementation itself, it\n**   may abandon the tokenization and return any error code other than\n**   SQLITE_OK or SQLITE_DONE.\n**\n**   If the tokenizer is registered using an fts5_tokenizer_v2 object,\n**   then the xTokenize() method has two additional arguments - pLocale\n**   and nLocale. These specify the locale that the tokenizer should use\n**   for the current request. If pLocale and nLocale are both 0, then the\n**   tokenizer should use its default locale. Otherwise, pLocale points to\n**   an nLocale byte buffer containing the name of the locale to use as utf-8\n**   text. pLocale is not nul-terminated.\n**\n** FTS5_TOKENIZER\n**\n** There is also an fts5_tokenizer object. This is an older, deprecated,\n** version of fts5_tokenizer_v2. It is similar except that:\n**\n**  <ul>\n**    <li> There is no \"iVersion\" field, and\n**    <li> The xTokenize() method does not take a locale argument.\n**  </ul>\n**\n** Legacy fts5_tokenizer tokenizers must be registered using the\n** legacy xCreateTokenizer() function, instead of xCreateTokenizer_v2().\n**\n** Tokenizer implementations registered using either API may be retrieved\n** using both xFindTokenizer() and xFindTokenizer_v2().\n**\n** SYNONYM SUPPORT\n**\n**   Custom tokenizers may also support synonyms. Consider a case in which a\n**   user wishes to query for a phrase such as \"first place\". Using the\n**   built-in tokenizers, the FTS5 query 'first + place' will match instances\n**   of \"first place\" within the document set, but not alternative forms\n**   such as \"1st place\". In some applications, it would be better to match\n**   all instances of \"first place\" or \"1st place\" regardless of which form\n**   the user specified in the MATCH query text.\n**\n**   There are several ways to approach this in FTS5:\n**\n**   <ol><li> By mapping all synonyms to a single token. In this case, using\n**            the above example, this means that the tokenizer returns the\n**            same token for inputs \"first\" and \"1st\". Say that token is in\n**            fact \"first\", so that when the user inserts the document \"I won\n**            1st place\" entries are added to the index for tokens \"i\", \"won\",\n**            \"first\" and \"place\". If the user then queries for '1st + place',\n**            the tokenizer substitutes \"first\" for \"1st\" and the query works\n**            as expected.\n**\n**       <li> By querying the index for all synonyms of each query term\n**            separately. In this case, when tokenizing query text, the\n**            tokenizer may provide multiple synonyms for a single term\n**            within the document. FTS5 then queries the index for each\n**            synonym individually. For example, faced with the query:\n**\n**   <codeblock>\n**     ... MATCH 'first place'</codeblock>\n**\n**            the tokenizer offers both \"1st\" and \"first\" as synonyms for the\n**            first token in the MATCH query and FTS5 effectively runs a query\n**            similar to:\n**\n**   <codeblock>\n**     ... MATCH '(first OR 1st) place'</codeblock>\n**\n**            except that, for the purposes of auxiliary functions, the query\n**            still appears to contain just two phrases - \"(first OR 1st)\"\n**            being treated as a single phrase.\n**\n**       <li> By adding multiple synonyms for a single term to the FTS index.\n**            Using this method, when tokenizing document text, the tokenizer\n**            provides multiple synonyms for each token. So that when a\n**            document such as \"I won first place\" is tokenized, entries are\n**            added to the FTS index for \"i\", \"won\", \"first\", \"1st\" and\n**            \"place\".\n**\n**            This way, even if the tokenizer does not provide synonyms\n**            when tokenizing query text (it should not - to do so would be\n**            inefficient), it doesn't matter if the user queries for\n**            'first + place' or '1st + place', as there are entries in the\n**            FTS index corresponding to both forms of the first token.\n**   </ol>\n**\n**   Whether it is parsing document or query text, any call to xToken that\n**   specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit\n**   is considered to supply a synonym for the previous token. For example,\n**   when parsing the document \"I won first place\", a tokenizer that supports\n**   synonyms would call xToken() 5 times, as follows:\n**\n**   <codeblock>\n**       xToken(pCtx, 0, \"i\",                      1,  0,  1);\n**       xToken(pCtx, 0, \"won\",                    3,  2,  5);\n**       xToken(pCtx, 0, \"first\",                  5,  6, 11);\n**       xToken(pCtx, FTS5_TOKEN_COLOCATED, \"1st\", 3,  6, 11);\n**       xToken(pCtx, 0, \"place\",                  5, 12, 17);\n**</codeblock>\n**\n**   It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time\n**   xToken() is called. Multiple synonyms may be specified for a single token\n**   by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.\n**   There is no limit to the number of synonyms that may be provided for a\n**   single token.\n**\n**   In many cases, method (1) above is the best approach. It does not add\n**   extra data to the FTS index or require FTS5 to query for multiple terms,\n**   so it is efficient in terms of disk space and query speed. However, it\n**   does not support prefix queries very well. If, as suggested above, the\n**   token \"first\" is substituted for \"1st\" by the tokenizer, then the query:\n**\n**   <codeblock>\n**     ... MATCH '1s*'</codeblock>\n**\n**   will not match documents that contain the token \"1st\" (as the tokenizer\n**   will probably not map \"1s\" to any prefix of \"first\").\n**\n**   For full prefix support, method (3) may be preferred. In this case,\n**   because the index contains entries for both \"first\" and \"1st\", prefix\n**   queries such as 'fi*' or '1s*' will match correctly. However, because\n**   extra entries are added to the FTS index, this method uses more space\n**   within the database.\n**\n**   Method (2) offers a midpoint between (1) and (3). Using this method,\n**   a query such as '1s*' will match documents that contain the literal\n**   token \"1st\", but not \"first\" (assuming the tokenizer is not able to\n**   provide synonyms for prefixes). However, a non-prefix query like '1st'\n**   will match against \"1st\" and \"first\". This method does not require\n**   extra disk space, as no extra entries are added to the FTS index.\n**   On the other hand, it may require more CPU cycles to run MATCH queries,\n**   as separate queries of the FTS index are required for each synonym.\n**\n**   When using methods (2) or (3), it is important that the tokenizer only\n**   provide synonyms when tokenizing document text (method (3)) or query\n**   text (method (2)), not both. Doing so will not cause any errors, but is\n**   inefficient.\n*/\ntypedef struct Fts5Tokenizer Fts5Tokenizer;\ntypedef struct fts5_tokenizer_v2 fts5_tokenizer_v2;\nstruct fts5_tokenizer_v2 {\n  int iVersion;             /* Currently always 2 */\n\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      const char *pLocale, int nLocale,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n/*\n** New code should use the fts5_tokenizer_v2 type to define tokenizer\n** implementations. The following type is included for legacy applications\n** that still use it.\n*/\ntypedef struct fts5_tokenizer fts5_tokenizer;\nstruct fts5_tokenizer {\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n\n/* Flags that may be passed as the third argument to xTokenize() */\n#define FTS5_TOKENIZE_QUERY     0x0001\n#define FTS5_TOKENIZE_PREFIX    0x0002\n#define FTS5_TOKENIZE_DOCUMENT  0x0004\n#define FTS5_TOKENIZE_AUX       0x0008\n\n/* Flags that may be passed by the tokenizer implementation back to FTS5\n** as the third argument to the supplied xToken callback. */\n#define FTS5_TOKEN_COLOCATED    0x0001      /* Same position as prev. token */\n\n/*\n** END OF CUSTOM TOKENIZERS\n*************************************************************************/\n\n/*************************************************************************\n** FTS5 EXTENSION REGISTRATION API\n*/\ntypedef struct fts5_api fts5_api;\nstruct fts5_api {\n  int iVersion;                   /* Currently always set to 3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer *pTokenizer\n  );\n\n  /* Create a new auxiliary function */\n  int (*xCreateFunction)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_extension_function xFunction,\n    void (*xDestroy)(void*)\n  );\n\n  /* APIs below this point are only available if iVersion>=3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer_v2 *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer_v2 **ppTokenizer\n  );\n};\n\n/*\n** END OF REGISTRATION API\n*************************************************************************/\n\n#if 0\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif /* _FTS5_H */\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n#ifndef _FTS5INT_H\n#define _FTS5INT_H\n\n/* #include \"fts5.h\" */\n/* #include \"sqlite3ext.h\" */\nSQLITE_EXTENSION_INIT1\n\n/* #include <string.h> */\n/* #include <assert.h> */\n/* #include <stddef.h> */\n\n#ifndef SQLITE_AMALGAMATION\n\ntypedef unsigned char  u8;\ntypedef unsigned int   u32;\ntypedef unsigned short u16;\ntypedef short i16;\ntypedef sqlite3_int64 i64;\ntypedef sqlite3_uint64 u64;\n\n#ifndef ArraySize\n# define ArraySize(x) ((int)(sizeof(x) / sizeof(x[0])))\n#endif\n\n#define testcase(x)\n\n#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)\n# define SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS 1\n#endif\n#if defined(SQLITE_OMIT_AUXILIARY_SAFETY_CHECKS)\n# define ALWAYS(X)      (1)\n# define NEVER(X)       (0)\n#elif !defined(NDEBUG)\n# define ALWAYS(X)      ((X)?1:(assert(0),0))\n# define NEVER(X)       ((X)?(assert(0),1):0)\n#else\n# define ALWAYS(X)      (X)\n# define NEVER(X)       (X)\n#endif\n\n#define MIN(x,y) (((x) < (y)) ? (x) : (y))\n#define MAX(x,y) (((x) > (y)) ? (x) : (y))\n\n/*\n** Constants for the largest and smallest possible 64-bit signed integers.\n*/\n# define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))\n# define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)\n\n/*\n** This macro is used in a single assert() within fts5 to check that an\n** allocation is aligned to an 8-byte boundary. But it is a complicated\n** macro to get right for multiple platforms without generating warnings.\n** So instead of reproducing the entire definition from sqliteInt.h, we\n** just do without this assert() for the rare non-amalgamation builds.\n*/\n#define EIGHT_BYTE_ALIGNMENT(x) 1\n\n/*\n** Macros needed to provide flexible arrays in a portable way\n*/\n#ifndef offsetof\n# define offsetof(ST,M) ((size_t)((char*)&((ST*)0)->M - (char*)0))\n#endif\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)\n# define FLEXARRAY\n#else\n# define FLEXARRAY 1\n#endif\n\n#endif /* SQLITE_AMALGAMATION */\n\n/*\n** Constants for the largest and smallest possible 32-bit signed integers.\n*/\n# define LARGEST_INT32  ((int)(0x7fffffff))\n# define SMALLEST_INT32 ((int)((-1) - LARGEST_INT32))\n\n/* Truncate very long tokens to this many bytes. Hard limit is\n** (65536-1-1-4-9)==65521 bytes. The limiting factor is the 16-bit offset\n** field that occurs at the start of each leaf page (see fts5_index.c). */\n#define FTS5_MAX_TOKEN_SIZE 32768\n\n/*\n** Maximum number of prefix indexes on single FTS5 table. This must be\n** less than 32. If it is set to anything large than that, an #error\n** directive in fts5_index.c will cause the build to fail.\n*/\n#define FTS5_MAX_PREFIX_INDEXES 31\n\n/*\n** Maximum segments permitted in a single index\n*/\n#define FTS5_MAX_SEGMENT 2000\n\n#define FTS5_DEFAULT_NEARDIST 10\n#define FTS5_DEFAULT_RANK     \"bm25\"\n\n/* Name of rank and rowid columns */\n#define FTS5_RANK_NAME \"rank\"\n#define FTS5_ROWID_NAME \"rowid\"\n\n#ifdef SQLITE_DEBUG\n# define FTS5_CORRUPT sqlite3Fts5Corrupt()\nstatic int sqlite3Fts5Corrupt(void);\n#else\n# define FTS5_CORRUPT SQLITE_CORRUPT_VTAB\n#endif\n\n/*\n** The assert_nc() macro is similar to the assert() macro, except that it\n** is used for assert() conditions that are true only if it can be\n** guranteed that the database is not corrupt.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_API extern int sqlite3_fts5_may_be_corrupt;\n# define assert_nc(x) assert(sqlite3_fts5_may_be_corrupt || (x))\n#else\n# define assert_nc(x) assert(x)\n#endif\n\n/*\n** A version of memcmp() that does not cause asan errors if one of the pointer\n** parameters is NULL and the number of bytes to compare is zero.\n*/\n#define fts5Memcmp(s1, s2, n) ((n)<=0 ? 0 : memcmp((s1), (s2), (n)))\n\n/* Mark a function parameter as unused, to suppress nuisance compiler\n** warnings. */\n#ifndef UNUSED_PARAM\n# define UNUSED_PARAM(X)  (void)(X)\n#endif\n\n#ifndef UNUSED_PARAM2\n# define UNUSED_PARAM2(X, Y)  (void)(X), (void)(Y)\n#endif\n\ntypedef struct Fts5Global Fts5Global;\ntypedef struct Fts5Colset Fts5Colset;\n\n/* If a NEAR() clump or phrase may only match a specific set of columns,\n** then an object of the following type is used to record the set of columns.\n** Each entry in the aiCol[] array is a column that may be matched.\n**\n** This object is used by fts5_expr.c and fts5_index.c.\n*/\nstruct Fts5Colset {\n  int nCol;\n  int aiCol[FLEXARRAY];\n};\n\n/* Size (int bytes) of a complete Fts5Colset object with N columns. */\n#define SZ_FTS5COLSET(N) (sizeof(i64)*((N+2)/2))\n\n/**************************************************************************\n** Interface to code in fts5_config.c. fts5_config.c contains contains code\n** to parse the arguments passed to the CREATE VIRTUAL TABLE statement.\n*/\n\ntypedef struct Fts5Config Fts5Config;\ntypedef struct Fts5TokenizerConfig Fts5TokenizerConfig;\n\nstruct Fts5TokenizerConfig {\n  Fts5Tokenizer *pTok;\n  fts5_tokenizer_v2 *pApi2;\n  fts5_tokenizer *pApi1;\n  const char **azArg;\n  int nArg;\n  int ePattern;                   /* FTS_PATTERN_XXX constant */\n  const char *pLocale;            /* Current locale to use */\n  int nLocale;                    /* Size of pLocale in bytes */\n};\n\n/*\n** An instance of the following structure encodes all information that can\n** be gleaned from the CREATE VIRTUAL TABLE statement.\n**\n** And all information loaded from the %_config table.\n**\n** nAutomerge:\n**   The minimum number of segments that an auto-merge operation should\n**   attempt to merge together. A value of 1 sets the object to use the\n**   compile time default. Zero disables auto-merge altogether.\n**\n** bContentlessDelete:\n**   True if the contentless_delete option was present in the CREATE\n**   VIRTUAL TABLE statement.\n**\n** zContent:\n**\n** zContentRowid:\n**   The value of the content_rowid= option, if one was specified. Or\n**   the string \"rowid\" otherwise. This text is not quoted - if it is\n**   used as part of an SQL statement it needs to be quoted appropriately.\n**\n** zContentExprlist:\n**\n** pzErrmsg:\n**   This exists in order to allow the fts5_index.c module to return a\n**   decent error message if it encounters a file-format version it does\n**   not understand.\n**\n** bColumnsize:\n**   True if the %_docsize table is created.\n**\n** bPrefixIndex:\n**   This is only used for debugging. If set to false, any prefix indexes\n**   are ignored. This value is configured using:\n**\n**       INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex);\n**\n** bLocale:\n**   Set to true if locale=1 was specified when the table was created.\n*/\nstruct Fts5Config {\n  sqlite3 *db;                    /* Database handle */\n  Fts5Global *pGlobal;            /* Global fts5 object for handle db */\n  char *zDb;                      /* Database holding FTS index (e.g. \"main\") */\n  char *zName;                    /* Name of FTS index */\n  int nCol;                       /* Number of columns */\n  char **azCol;                   /* Column names */\n  u8 *abUnindexed;                /* True for unindexed columns */\n  int nPrefix;                    /* Number of prefix indexes */\n  int *aPrefix;                   /* Sizes in bytes of nPrefix prefix indexes */\n  int eContent;                   /* An FTS5_CONTENT value */\n  int bContentlessDelete;         /* \"contentless_delete=\" option (dflt==0) */\n  int bContentlessUnindexed;      /* \"contentless_unindexed=\" option (dflt=0) */\n  char *zContent;                 /* content table */\n  char *zContentRowid;            /* \"content_rowid=\" option value */\n  int bColumnsize;                /* \"columnsize=\" option value (dflt==1) */\n  int bTokendata;                 /* \"tokendata=\" option value (dflt==0) */\n  int bLocale;                    /* \"locale=\" option value (dflt==0) */\n  int eDetail;                    /* FTS5_DETAIL_XXX value */\n  char *zContentExprlist;\n  Fts5TokenizerConfig t;\n  int bLock;                      /* True when table is preparing statement */\n\n\n  /* Values loaded from the %_config table */\n  int iVersion;                   /* fts5 file format 'version' */\n  int iCookie;                    /* Incremented when %_config is modified */\n  int pgsz;                       /* Approximate page size used in %_data */\n  int nAutomerge;                 /* 'automerge' setting */\n  int nCrisisMerge;               /* Maximum allowed segments per level */\n  int nUsermerge;                 /* 'usermerge' setting */\n  int nHashSize;                  /* Bytes of memory for in-memory hash */\n  char *zRank;                    /* Name of rank function */\n  char *zRankArgs;                /* Arguments to rank function */\n  int bSecureDelete;              /* 'secure-delete' */\n  int nDeleteMerge;               /* 'deletemerge' */\n  int bPrefixInsttoken;           /* 'prefix-insttoken' */\n\n  /* If non-NULL, points to sqlite3_vtab.base.zErrmsg. Often NULL. */\n  char **pzErrmsg;\n\n#ifdef SQLITE_DEBUG\n  int bPrefixIndex;               /* True to use prefix-indexes */\n#endif\n};\n\n/* Current expected value of %_config table 'version' field. And\n** the expected version if the 'secure-delete' option has ever been\n** set on the table.  */\n#define FTS5_CURRENT_VERSION               4\n#define FTS5_CURRENT_VERSION_SECUREDELETE  5\n\n#define FTS5_CONTENT_NORMAL    0\n#define FTS5_CONTENT_NONE      1\n#define FTS5_CONTENT_EXTERNAL  2\n#define FTS5_CONTENT_UNINDEXED 3\n\n#define FTS5_DETAIL_FULL      0\n#define FTS5_DETAIL_NONE      1\n#define FTS5_DETAIL_COLUMNS   2\n\n#define FTS5_PATTERN_NONE     0\n#define FTS5_PATTERN_LIKE     65  /* matches SQLITE_INDEX_CONSTRAINT_LIKE */\n#define FTS5_PATTERN_GLOB     66  /* matches SQLITE_INDEX_CONSTRAINT_GLOB */\n\nstatic int sqlite3Fts5ConfigParse(\n    Fts5Global*, sqlite3*, int, const char **, Fts5Config**, char**\n);\nstatic void sqlite3Fts5ConfigFree(Fts5Config*);\n\nstatic int sqlite3Fts5ConfigDeclareVtab(Fts5Config *pConfig);\n\nstatic int sqlite3Fts5Tokenize(\n  Fts5Config *pConfig,            /* FTS5 Configuration object */\n  int flags,                      /* FTS5_TOKENIZE_* flags */\n  const char *pText, int nText,   /* Text to tokenize */\n  void *pCtx,                     /* Context passed to xToken() */\n  int (*xToken)(void*, int, const char*, int, int, int)    /* Callback */\n);\n\nstatic void sqlite3Fts5Dequote(char *z);\n\n/* Load the contents of the %_config table */\nstatic int sqlite3Fts5ConfigLoad(Fts5Config*, int);\n\n/* Set the value of a single config attribute */\nstatic int sqlite3Fts5ConfigSetValue(Fts5Config*, const char*, sqlite3_value*, int*);\n\nstatic int sqlite3Fts5ConfigParseRank(const char*, char**, char**);\n\nstatic void sqlite3Fts5ConfigErrmsg(Fts5Config *pConfig, const char *zFmt, ...);\n\n/*\n** End of interface to code in fts5_config.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_buffer.c.\n*/\n\n/*\n** Buffer object for the incremental building of string data.\n*/\ntypedef struct Fts5Buffer Fts5Buffer;\nstruct Fts5Buffer {\n  u8 *p;\n  int n;\n  int nSpace;\n};\n\nstatic int sqlite3Fts5BufferSize(int*, Fts5Buffer*, u32);\nstatic void sqlite3Fts5BufferAppendVarint(int*, Fts5Buffer*, i64);\nstatic void sqlite3Fts5BufferAppendBlob(int*, Fts5Buffer*, u32, const u8*);\nstatic void sqlite3Fts5BufferAppendString(int *, Fts5Buffer*, const char*);\nstatic void sqlite3Fts5BufferFree(Fts5Buffer*);\nstatic void sqlite3Fts5BufferZero(Fts5Buffer*);\nstatic void sqlite3Fts5BufferSet(int*, Fts5Buffer*, int, const u8*);\nstatic void sqlite3Fts5BufferAppendPrintf(int *, Fts5Buffer*, char *zFmt, ...);\n\nstatic char *sqlite3Fts5Mprintf(int *pRc, const char *zFmt, ...);\n\n#define fts5BufferZero(x)             sqlite3Fts5BufferZero(x)\n#define fts5BufferAppendVarint(a,b,c) sqlite3Fts5BufferAppendVarint(a,b,(i64)c)\n#define fts5BufferFree(a)             sqlite3Fts5BufferFree(a)\n#define fts5BufferAppendBlob(a,b,c,d) sqlite3Fts5BufferAppendBlob(a,b,c,d)\n#define fts5BufferSet(a,b,c,d)        sqlite3Fts5BufferSet(a,b,c,d)\n\n#define fts5BufferGrow(pRc,pBuf,nn) ( \\\n  (u32)((pBuf)->n) + (u32)(nn) <= (u32)((pBuf)->nSpace) ? 0 : \\\n    sqlite3Fts5BufferSize((pRc),(pBuf),(nn)+(pBuf)->n) \\\n)\n\n/* Write and decode big-endian 32-bit integer values */\nstatic void sqlite3Fts5Put32(u8*, int);\nstatic int sqlite3Fts5Get32(const u8*);\n\n#define FTS5_POS2COLUMN(iPos) (int)((iPos >> 32) & 0x7FFFFFFF)\n#define FTS5_POS2OFFSET(iPos) (int)(iPos & 0x7FFFFFFF)\n\ntypedef struct Fts5PoslistReader Fts5PoslistReader;\nstruct Fts5PoslistReader {\n  /* Variables used only by sqlite3Fts5PoslistIterXXX() functions. */\n  const u8 *a;                    /* Position list to iterate through */\n  int n;                          /* Size of buffer at a[] in bytes */\n  int i;                          /* Current offset in a[] */\n\n  u8 bFlag;                       /* For client use (any custom purpose) */\n\n  /* Output variables */\n  u8 bEof;                        /* Set to true at EOF */\n  i64 iPos;                       /* (iCol<<32) + iPos */\n};\nstatic int sqlite3Fts5PoslistReaderInit(\n  const u8 *a, int n,             /* Poslist buffer to iterate through */\n  Fts5PoslistReader *pIter        /* Iterator object to initialize */\n);\nstatic int sqlite3Fts5PoslistReaderNext(Fts5PoslistReader*);\n\ntypedef struct Fts5PoslistWriter Fts5PoslistWriter;\nstruct Fts5PoslistWriter {\n  i64 iPrev;\n};\nstatic int sqlite3Fts5PoslistWriterAppend(Fts5Buffer*, Fts5PoslistWriter*, i64);\nstatic void sqlite3Fts5PoslistSafeAppend(Fts5Buffer*, i64*, i64);\n\nstatic int sqlite3Fts5PoslistNext64(\n  const u8 *a, int n,             /* Buffer containing poslist */\n  int *pi,                        /* IN/OUT: Offset within a[] */\n  i64 *piOff                      /* IN/OUT: Current offset */\n);\n\n/* Malloc utility */\nstatic void *sqlite3Fts5MallocZero(int *pRc, sqlite3_int64 nByte);\nstatic char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn);\n\n/* Character set tests (like isspace(), isalpha() etc.) */\nstatic int sqlite3Fts5IsBareword(char t);\n\n\n/* Bucket of terms object used by the integrity-check in offsets=0 mode. */\ntypedef struct Fts5Termset Fts5Termset;\nstatic int sqlite3Fts5TermsetNew(Fts5Termset**);\nstatic int sqlite3Fts5TermsetAdd(Fts5Termset*, int, const char*, int, int *pbPresent);\nstatic void sqlite3Fts5TermsetFree(Fts5Termset*);\n\n/*\n** End of interface to code in fts5_buffer.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_index.c. fts5_index.c contains contains code\n** to access the data stored in the %_data table.\n*/\n\ntypedef struct Fts5Index Fts5Index;\ntypedef struct Fts5IndexIter Fts5IndexIter;\n\nstruct Fts5IndexIter {\n  i64 iRowid;\n  const u8 *pData;\n  int nData;\n  u8 bEof;\n};\n\n#define sqlite3Fts5IterEof(x) ((x)->bEof)\n\n/*\n** Values used as part of the flags argument passed to IndexQuery().\n*/\n#define FTS5INDEX_QUERY_PREFIX      0x0001  /* Prefix query */\n#define FTS5INDEX_QUERY_DESC        0x0002  /* Docs in descending rowid order */\n#define FTS5INDEX_QUERY_TEST_NOIDX  0x0004  /* Do not use prefix index */\n#define FTS5INDEX_QUERY_SCAN        0x0008  /* Scan query (fts5vocab) */\n\n/* The following are used internally by the fts5_index.c module. They are\n** defined here only to make it easier to avoid clashes with the flags\n** above. */\n#define FTS5INDEX_QUERY_SKIPEMPTY   0x0010\n#define FTS5INDEX_QUERY_NOOUTPUT    0x0020\n#define FTS5INDEX_QUERY_SKIPHASH    0x0040\n#define FTS5INDEX_QUERY_NOTOKENDATA 0x0080\n#define FTS5INDEX_QUERY_SCANONETERM 0x0100\n\n/*\n** Create/destroy an Fts5Index object.\n*/\nstatic int sqlite3Fts5IndexOpen(Fts5Config *pConfig, int bCreate, Fts5Index**, char**);\nstatic int sqlite3Fts5IndexClose(Fts5Index *p);\n\n/*\n** Return a simple checksum value based on the arguments.\n*/\nstatic u64 sqlite3Fts5IndexEntryCksum(\n  i64 iRowid,\n  int iCol,\n  int iPos,\n  int iIdx,\n  const char *pTerm,\n  int nTerm\n);\n\n/*\n** Argument p points to a buffer containing utf-8 text that is n bytes in\n** size. Return the number of bytes in the nChar character prefix of the\n** buffer, or 0 if there are less than nChar characters in total.\n*/\nstatic int sqlite3Fts5IndexCharlenToBytelen(\n  const char *p,\n  int nByte,\n  int nChar\n);\n\n/*\n** Open a new iterator to iterate though all rowids that match the\n** specified token or token prefix.\n*/\nstatic int sqlite3Fts5IndexQuery(\n  Fts5Index *p,                   /* FTS index to query */\n  const char *pToken, int nToken, /* Token (or prefix) to query for */\n  int flags,                      /* Mask of FTS5INDEX_QUERY_X flags */\n  Fts5Colset *pColset,            /* Match these columns only */\n  Fts5IndexIter **ppIter          /* OUT: New iterator object */\n);\n\n/*\n** The various operations on open token or token prefix iterators opened\n** using sqlite3Fts5IndexQuery().\n*/\nstatic int sqlite3Fts5IterNext(Fts5IndexIter*);\nstatic int sqlite3Fts5IterNextFrom(Fts5IndexIter*, i64 iMatch);\n\n/*\n** Close an iterator opened by sqlite3Fts5IndexQuery().\n*/\nstatic void sqlite3Fts5IterClose(Fts5IndexIter*);\n\n/*\n** Close the reader blob handle, if it is open.\n*/\nstatic void sqlite3Fts5IndexCloseReader(Fts5Index*);\n\n/*\n** This interface is used by the fts5vocab module.\n*/\nstatic const char *sqlite3Fts5IterTerm(Fts5IndexIter*, int*);\nstatic int sqlite3Fts5IterNextScan(Fts5IndexIter*);\nstatic void *sqlite3Fts5StructureRef(Fts5Index*);\nstatic void sqlite3Fts5StructureRelease(void*);\nstatic int sqlite3Fts5StructureTest(Fts5Index*, void*);\n\n/*\n** Used by xInstToken():\n*/\nstatic int sqlite3Fts5IterToken(\n  Fts5IndexIter *pIndexIter,\n  const char *pToken, int nToken,\n  i64 iRowid,\n  int iCol,\n  int iOff,\n  const char **ppOut, int *pnOut\n);\n\n/*\n** Insert or remove data to or from the index. Each time a document is\n** added to or removed from the index, this function is called one or more\n** times.\n**\n** For an insert, it must be called once for each token in the new document.\n** If the operation is a delete, it must be called (at least) once for each\n** unique token in the document with an iCol value less than zero. The iPos\n** argument is ignored for a delete.\n*/\nstatic int sqlite3Fts5IndexWrite(\n  Fts5Index *p,                   /* Index to write to */\n  int iCol,                       /* Column token appears in (-ve -> delete) */\n  int iPos,                       /* Position of token within column */\n  const char *pToken, int nToken  /* Token to add or remove to or from index */\n);\n\n/*\n** Indicate that subsequent calls to sqlite3Fts5IndexWrite() pertain to\n** document iDocid.\n*/\nstatic int sqlite3Fts5IndexBeginWrite(\n  Fts5Index *p,                   /* Index to write to */\n  int bDelete,                    /* True if current operation is a delete */\n  i64 iDocid                      /* Docid to add or remove data from */\n);\n\n/*\n** Flush any data stored in the in-memory hash tables to the database.\n** Also close any open blob handles.\n*/\nstatic int sqlite3Fts5IndexSync(Fts5Index *p);\n\n/*\n** Discard any data stored in the in-memory hash tables. Do not write it\n** to the database. Additionally, assume that the contents of the %_data\n** table may have changed on disk. So any in-memory caches of %_data\n** records must be invalidated.\n*/\nstatic int sqlite3Fts5IndexRollback(Fts5Index *p);\n\n/*\n** Get or set the \"averages\" values.\n*/\nstatic int sqlite3Fts5IndexGetAverages(Fts5Index *p, i64 *pnRow, i64 *anSize);\nstatic int sqlite3Fts5IndexSetAverages(Fts5Index *p, const u8*, int);\n\n/*\n** Functions called by the storage module as part of integrity-check.\n*/\nstatic int sqlite3Fts5IndexIntegrityCheck(Fts5Index*, u64 cksum, int bUseCksum);\n\n/*\n** Called during virtual module initialization to register UDF\n** fts5_decode() with SQLite\n*/\nstatic int sqlite3Fts5IndexInit(sqlite3*);\n\nstatic int sqlite3Fts5IndexSetCookie(Fts5Index*, int);\n\n/*\n** Return the total number of entries read from the %_data table by\n** this connection since it was created.\n*/\nstatic int sqlite3Fts5IndexReads(Fts5Index *p);\n\nstatic int sqlite3Fts5IndexReinit(Fts5Index *p);\nstatic int sqlite3Fts5IndexOptimize(Fts5Index *p);\nstatic int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge);\nstatic int sqlite3Fts5IndexReset(Fts5Index *p);\n\nstatic int sqlite3Fts5IndexLoadConfig(Fts5Index *p);\n\nstatic int sqlite3Fts5IndexGetOrigin(Fts5Index *p, i64 *piOrigin);\nstatic int sqlite3Fts5IndexContentlessDelete(Fts5Index *p, i64 iOrigin, i64 iRowid);\n\nstatic void sqlite3Fts5IndexIterClearTokendata(Fts5IndexIter*);\n\n/* Used to populate hash tables for xInstToken in detail=none/column mode. */\nstatic int sqlite3Fts5IndexIterWriteTokendata(\n    Fts5IndexIter*, const char*, int, i64 iRowid, int iCol, int iOff\n);\n\n/*\n** End of interface to code in fts5_index.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_varint.c.\n*/\nstatic int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v);\nstatic int sqlite3Fts5GetVarintLen(u32 iVal);\nstatic u8 sqlite3Fts5GetVarint(const unsigned char*, u64*);\nstatic int sqlite3Fts5PutVarint(unsigned char *p, u64 v);\n\n#define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&(b))\n#define fts5GetVarint    sqlite3Fts5GetVarint\n\n#define fts5FastGetVarint32(a, iOff, nVal) {      \\\n  nVal = (a)[iOff++];                             \\\n  if( nVal & 0x80 ){                              \\\n    iOff--;                                       \\\n    iOff += fts5GetVarint32(&(a)[iOff], nVal);    \\\n  }                                               \\\n}\n\n\n/*\n** End of interface to code in fts5_varint.c.\n**************************************************************************/\n\n\n/**************************************************************************\n** Interface to code in fts5_main.c.\n*/\n\n/*\n** Virtual-table object.\n*/\ntypedef struct Fts5Table Fts5Table;\nstruct Fts5Table {\n  sqlite3_vtab base;              /* Base class used by SQLite core */\n  Fts5Config *pConfig;            /* Virtual table configuration */\n  Fts5Index *pIndex;              /* Full-text index */\n};\n\nstatic int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig);\n\nstatic Fts5Table *sqlite3Fts5TableFromCsrid(Fts5Global*, i64);\n\nstatic int sqlite3Fts5FlushToDisk(Fts5Table*);\n\nstatic void sqlite3Fts5ClearLocale(Fts5Config *pConfig);\nstatic void sqlite3Fts5SetLocale(Fts5Config *pConfig, const char *pLoc, int nLoc);\n\nstatic int sqlite3Fts5IsLocaleValue(Fts5Config *pConfig, sqlite3_value *pVal);\nstatic int sqlite3Fts5DecodeLocaleValue(sqlite3_value *pVal,\n    const char **ppText, int *pnText, const char **ppLoc, int *pnLoc\n);\n\n/*\n** End of interface to code in fts5.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_hash.c.\n*/\ntypedef struct Fts5Hash Fts5Hash;\n\n/*\n** Create a hash table, free a hash table.\n*/\nstatic int sqlite3Fts5HashNew(Fts5Config*, Fts5Hash**, int *pnSize);\nstatic void sqlite3Fts5HashFree(Fts5Hash*);\n\nstatic int sqlite3Fts5HashWrite(\n  Fts5Hash*,\n  i64 iRowid,                     /* Rowid for this entry */\n  int iCol,                       /* Column token appears in (-ve -> delete) */\n  int iPos,                       /* Position of token within column */\n  char bByte,\n  const char *pToken, int nToken  /* Token to add or remove to or from index */\n);\n\n/*\n** Empty (but do not delete) a hash table.\n*/\nstatic void sqlite3Fts5HashClear(Fts5Hash*);\n\n/*\n** Return true if the hash is empty, false otherwise.\n*/\nstatic int sqlite3Fts5HashIsEmpty(Fts5Hash*);\n\nstatic int sqlite3Fts5HashQuery(\n  Fts5Hash*,                      /* Hash table to query */\n  int nPre,\n  const char *pTerm, int nTerm,   /* Query term */\n  void **ppObj,                   /* OUT: Pointer to doclist for pTerm */\n  int *pnDoclist                  /* OUT: Size of doclist in bytes */\n);\n\nstatic int sqlite3Fts5HashScanInit(\n  Fts5Hash*,                      /* Hash table to query */\n  const char *pTerm, int nTerm    /* Query prefix */\n);\nstatic void sqlite3Fts5HashScanNext(Fts5Hash*);\nstatic int sqlite3Fts5HashScanEof(Fts5Hash*);\nstatic void sqlite3Fts5HashScanEntry(Fts5Hash *,\n  const char **pzTerm,            /* OUT: term (nul-terminated) */\n  int *pnTerm,                    /* OUT: Size of term in bytes */\n  const u8 **ppDoclist,           /* OUT: pointer to doclist */\n  int *pnDoclist                  /* OUT: size of doclist in bytes */\n);\n\n\n\n/*\n** End of interface to code in fts5_hash.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_storage.c. fts5_storage.c contains contains\n** code to access the data stored in the %_content and %_docsize tables.\n*/\n\n#define FTS5_STMT_SCAN_ASC  0     /* SELECT rowid, * FROM ... ORDER BY 1 ASC */\n#define FTS5_STMT_SCAN_DESC 1     /* SELECT rowid, * FROM ... ORDER BY 1 DESC */\n#define FTS5_STMT_LOOKUP    2     /* SELECT rowid, * FROM ... WHERE rowid=? */\n\ntypedef struct Fts5Storage Fts5Storage;\n\nstatic int sqlite3Fts5StorageOpen(Fts5Config*, Fts5Index*, int, Fts5Storage**, char**);\nstatic int sqlite3Fts5StorageClose(Fts5Storage *p);\nstatic int sqlite3Fts5StorageRename(Fts5Storage*, const char *zName);\n\nstatic int sqlite3Fts5DropAll(Fts5Config*);\nstatic int sqlite3Fts5CreateTable(Fts5Config*, const char*, const char*, int, char **);\n\nstatic int sqlite3Fts5StorageDelete(Fts5Storage *p, i64, sqlite3_value**, int);\nstatic int sqlite3Fts5StorageContentInsert(Fts5Storage *p, int, sqlite3_value**, i64*);\nstatic int sqlite3Fts5StorageIndexInsert(Fts5Storage *p, sqlite3_value**, i64);\n\nstatic int sqlite3Fts5StorageIntegrity(Fts5Storage *p, int iArg);\n\nstatic int sqlite3Fts5StorageStmt(Fts5Storage *p, int eStmt, sqlite3_stmt**, char**);\nstatic void sqlite3Fts5StorageStmtRelease(Fts5Storage *p, int eStmt, sqlite3_stmt*);\n\nstatic int sqlite3Fts5StorageDocsize(Fts5Storage *p, i64 iRowid, int *aCol);\nstatic int sqlite3Fts5StorageSize(Fts5Storage *p, int iCol, i64 *pnAvg);\nstatic int sqlite3Fts5StorageRowCount(Fts5Storage *p, i64 *pnRow);\n\nstatic int sqlite3Fts5StorageSync(Fts5Storage *p);\nstatic int sqlite3Fts5StorageRollback(Fts5Storage *p);\n\nstatic int sqlite3Fts5StorageConfigValue(\n    Fts5Storage *p, const char*, sqlite3_value*, int\n);\n\nstatic int sqlite3Fts5StorageDeleteAll(Fts5Storage *p);\nstatic int sqlite3Fts5StorageRebuild(Fts5Storage *p);\nstatic int sqlite3Fts5StorageOptimize(Fts5Storage *p);\nstatic int sqlite3Fts5StorageMerge(Fts5Storage *p, int nMerge);\nstatic int sqlite3Fts5StorageReset(Fts5Storage *p);\n\nstatic void sqlite3Fts5StorageReleaseDeleteRow(Fts5Storage*);\nstatic int sqlite3Fts5StorageFindDeleteRow(Fts5Storage *p, i64 iDel);\n\n/*\n** End of interface to code in fts5_storage.c.\n**************************************************************************/\n\n\n/**************************************************************************\n** Interface to code in fts5_expr.c.\n*/\ntypedef struct Fts5Expr Fts5Expr;\ntypedef struct Fts5ExprNode Fts5ExprNode;\ntypedef struct Fts5Parse Fts5Parse;\ntypedef struct Fts5Token Fts5Token;\ntypedef struct Fts5ExprPhrase Fts5ExprPhrase;\ntypedef struct Fts5ExprNearset Fts5ExprNearset;\n\nstruct Fts5Token {\n  const char *p;                  /* Token text (not NULL terminated) */\n  int n;                          /* Size of buffer p in bytes */\n};\n\n/* Parse a MATCH expression. */\nstatic int sqlite3Fts5ExprNew(\n  Fts5Config *pConfig,\n  int bPhraseToAnd,\n  int iCol,                       /* Column on LHS of MATCH operator */\n  const char *zExpr,\n  Fts5Expr **ppNew,\n  char **pzErr\n);\nstatic int sqlite3Fts5ExprPattern(\n  Fts5Config *pConfig,\n  int bGlob,\n  int iCol,\n  const char *zText,\n  Fts5Expr **pp\n);\n\n/*\n** for(rc = sqlite3Fts5ExprFirst(pExpr, pIdx, bDesc);\n**     rc==SQLITE_OK && 0==sqlite3Fts5ExprEof(pExpr);\n**     rc = sqlite3Fts5ExprNext(pExpr)\n** ){\n**   // The document with rowid iRowid matches the expression!\n**   i64 iRowid = sqlite3Fts5ExprRowid(pExpr);\n** }\n*/\nstatic int sqlite3Fts5ExprFirst(Fts5Expr*, Fts5Index *pIdx, i64 iMin, i64, int bDesc);\nstatic int sqlite3Fts5ExprNext(Fts5Expr*, i64 iMax);\nstatic int sqlite3Fts5ExprEof(Fts5Expr*);\nstatic i64 sqlite3Fts5ExprRowid(Fts5Expr*);\n\nstatic void sqlite3Fts5ExprFree(Fts5Expr*);\nstatic int sqlite3Fts5ExprAnd(Fts5Expr **pp1, Fts5Expr *p2);\n\n/* Called during startup to register a UDF with SQLite */\nstatic int sqlite3Fts5ExprInit(Fts5Global*, sqlite3*);\n\nstatic int sqlite3Fts5ExprPhraseCount(Fts5Expr*);\nstatic int sqlite3Fts5ExprPhraseSize(Fts5Expr*, int iPhrase);\nstatic int sqlite3Fts5ExprPoslist(Fts5Expr*, int, const u8 **);\n\ntypedef struct Fts5PoslistPopulator Fts5PoslistPopulator;\nstatic Fts5PoslistPopulator *sqlite3Fts5ExprClearPoslists(Fts5Expr*, int);\nstatic int sqlite3Fts5ExprPopulatePoslists(\n    Fts5Config*, Fts5Expr*, Fts5PoslistPopulator*, int, const char*, int\n);\nstatic void sqlite3Fts5ExprCheckPoslists(Fts5Expr*, i64);\n\nstatic int sqlite3Fts5ExprClonePhrase(Fts5Expr*, int, Fts5Expr**);\n\nstatic int sqlite3Fts5ExprPhraseCollist(Fts5Expr *, int, const u8 **, int *);\n\nstatic int sqlite3Fts5ExprQueryToken(Fts5Expr*, int, int, const char**, int*);\nstatic int sqlite3Fts5ExprInstToken(Fts5Expr*, i64, int, int, int, int, const char**, int*);\nstatic void sqlite3Fts5ExprClearTokens(Fts5Expr*);\n\n/*******************************************\n** The fts5_expr.c API above this point is used by the other hand-written\n** C code in this module. The interfaces below this point are called by\n** the parser code in fts5parse.y.  */\n\nstatic void sqlite3Fts5ParseError(Fts5Parse *pParse, const char *zFmt, ...);\n\nstatic Fts5ExprNode *sqlite3Fts5ParseNode(\n  Fts5Parse *pParse,\n  int eType,\n  Fts5ExprNode *pLeft,\n  Fts5ExprNode *pRight,\n  Fts5ExprNearset *pNear\n);\n\nstatic Fts5ExprNode *sqlite3Fts5ParseImplicitAnd(\n  Fts5Parse *pParse,\n  Fts5ExprNode *pLeft,\n  Fts5ExprNode *pRight\n);\n\nstatic Fts5ExprPhrase *sqlite3Fts5ParseTerm(\n  Fts5Parse *pParse,\n  Fts5ExprPhrase *pPhrase,\n  Fts5Token *pToken,\n  int bPrefix\n);\n\nstatic void sqlite3Fts5ParseSetCaret(Fts5ExprPhrase*);\n\nstatic Fts5ExprNearset *sqlite3Fts5ParseNearset(\n  Fts5Parse*,\n  Fts5ExprNearset*,\n  Fts5ExprPhrase*\n);\n\nstatic Fts5Colset *sqlite3Fts5ParseColset(\n  Fts5Parse*,\n  Fts5Colset*,\n  Fts5Token *\n);\n\nstatic void sqlite3Fts5ParsePhraseFree(Fts5ExprPhrase*);\nstatic void sqlite3Fts5ParseNearsetFree(Fts5ExprNearset*);\nstatic void sqlite3Fts5ParseNodeFree(Fts5ExprNode*);\n\nstatic void sqlite3Fts5ParseSetDistance(Fts5Parse*, Fts5ExprNearset*, Fts5Token*);\nstatic void sqlite3Fts5ParseSetColset(Fts5Parse*, Fts5ExprNode*, Fts5Colset*);\nstatic Fts5Colset *sqlite3Fts5ParseColsetInvert(Fts5Parse*, Fts5Colset*);\nstatic void sqlite3Fts5ParseFinished(Fts5Parse *pParse, Fts5ExprNode *p);\nstatic void sqlite3Fts5ParseNear(Fts5Parse *pParse, Fts5Token*);\n\n/*\n** End of interface to code in fts5_expr.c.\n**************************************************************************/\n\n\n\n/**************************************************************************\n** Interface to code in fts5_aux.c.\n*/\n\nstatic int sqlite3Fts5AuxInit(fts5_api*);\n/*\n** End of interface to code in fts5_aux.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_tokenizer.c.\n*/\n\nstatic int sqlite3Fts5TokenizerInit(fts5_api*);\nstatic int sqlite3Fts5TokenizerPattern(\n    int (*xCreate)(void*, const char**, int, Fts5Tokenizer**),\n    Fts5Tokenizer *pTok\n);\nstatic int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig*);\n/*\n** End of interface to code in fts5_tokenizer.c.\n**************************************************************************/\n\n/**************************************************************************\n** Interface to code in fts5_vocab.c.\n*/\n\nstatic int sqlite3Fts5VocabInit(Fts5Global*, sqlite3*);\n\n/*\n** End of interface to code in fts5_vocab.c.\n**************************************************************************/\n\n\n/**************************************************************************\n** Interface to automatically generated code in fts5_unicode2.c.\n*/\nstatic int sqlite3Fts5UnicodeIsdiacritic(int c);\nstatic int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);\n\nstatic int sqlite3Fts5UnicodeCatParse(const char*, u8*);\nstatic int sqlite3Fts5UnicodeCategory(u32 iCode);\nstatic void sqlite3Fts5UnicodeAscii(u8*, u8*);\n/*\n** End of interface to code in fts5_unicode2.c.\n**************************************************************************/\n\n#endif\n\n#define FTS5_OR                               1\n#define FTS5_AND                              2\n#define FTS5_NOT                              3\n#define FTS5_TERM                             4\n#define FTS5_COLON                            5\n#define FTS5_MINUS                            6\n#define FTS5_LCP                              7\n#define FTS5_RCP                              8\n#define FTS5_STRING                           9\n#define FTS5_LP                              10\n#define FTS5_RP                              11\n#define FTS5_CARET                           12\n#define FTS5_COMMA                           13\n#define FTS5_PLUS                            14\n#define FTS5_STAR                            15\n\n/* This file is automatically generated by Lemon from input grammar\n** source file \"fts5parse.y\".\n*/\n/*\n** 2000-05-29\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** Driver template for the LEMON parser generator.\n**\n** The \"lemon\" program processes an LALR(1) input grammar file, then uses\n** this template to construct a parser.  The \"lemon\" program inserts text\n** at each \"%%\" line.  Also, any \"P-a-r-s-e\" identifier prefix (without the\n** interstitial \"-\" characters) contained in this template is changed into\n** the value of the %name directive from the grammar.  Otherwise, the content\n** of this template is copied straight through into the generate parser\n** source file.\n**\n** The following is the concatenation of all %include directives from the\n** input grammar file:\n*/\n/************ Begin %include sections from the grammar ************************/\n\n/* #include \"fts5Int.h\" */\n/* #include \"fts5parse.h\" */\n\n/*\n** Disable all error recovery processing in the parser push-down\n** automaton.\n*/\n#define fts5YYNOERRORRECOVERY 1\n\n/*\n** Make fts5yytestcase() the same as testcase()\n*/\n#define fts5yytestcase(X) testcase(X)\n\n/*\n** Indicate that sqlite3ParserFree() will never be called with a null\n** pointer.\n*/\n#define fts5YYPARSEFREENOTNULL 1\n\n/*\n** Alternative datatype for the argument to the malloc() routine passed\n** into sqlite3ParserAlloc().  The default is size_t.\n*/\n#define fts5YYMALLOCARGTYPE  u64\n\n/**************** End of %include directives **********************************/\n/* These constants specify the various numeric values for terminal symbols.\n***************** Begin token definitions *************************************/\n#ifndef FTS5_OR\n#define FTS5_OR                              1\n#define FTS5_AND                             2\n#define FTS5_NOT                             3\n#define FTS5_TERM                            4\n#define FTS5_COLON                           5\n#define FTS5_MINUS                           6\n#define FTS5_LCP                             7\n#define FTS5_RCP                             8\n#define FTS5_STRING                          9\n#define FTS5_LP                             10\n#define FTS5_RP                             11\n#define FTS5_CARET                          12\n#define FTS5_COMMA                          13\n#define FTS5_PLUS                           14\n#define FTS5_STAR                           15\n#endif\n/**************** End token definitions ***************************************/\n\n/* The next sections is a series of control #defines.\n** various aspects of the generated parser.\n**    fts5YYCODETYPE         is the data type used to store the integer codes\n**                       that represent terminal and non-terminal symbols.\n**                       \"unsigned char\" is used if there are fewer than\n**                       256 symbols.  Larger types otherwise.\n**    fts5YYNOCODE           is a number of type fts5YYCODETYPE that is not used for\n**                       any terminal or nonterminal symbol.\n**    fts5YYFALLBACK         If defined, this indicates that one or more tokens\n**                       (also known as: \"terminal symbols\") have fall-back\n**                       values which should be used if the original symbol\n**                       would not parse.  This permits keywords to sometimes\n**                       be used as identifiers, for example.\n**    fts5YYACTIONTYPE       is the data type used for \"action codes\" - numbers\n**                       that indicate what to do in response to the next\n**                       token.\n**    sqlite3Fts5ParserFTS5TOKENTYPE     is the data type used for minor type for terminal\n**                       symbols.  Background: A \"minor type\" is a semantic\n**                       value associated with a terminal or non-terminal\n**                       symbols.  For example, for an \"ID\" terminal symbol,\n**                       the minor type might be the name of the identifier.\n**                       Each non-terminal can have a different minor type.\n**                       Terminal symbols all have the same minor type, though.\n**                       This macros defines the minor type for terminal\n**                       symbols.\n**    fts5YYMINORTYPE        is the data type used for all minor types.\n**                       This is typically a union of many types, one of\n**                       which is sqlite3Fts5ParserFTS5TOKENTYPE.  The entry in the union\n**                       for terminal symbols is called \"fts5yy0\".\n**    fts5YYSTACKDEPTH       is the maximum depth of the parser's stack.  If\n**                       zero the stack is dynamically sized using realloc()\n**    sqlite3Fts5ParserARG_SDECL     A static variable declaration for the %extra_argument\n**    sqlite3Fts5ParserARG_PDECL     A parameter declaration for the %extra_argument\n**    sqlite3Fts5ParserARG_PARAM     Code to pass %extra_argument as a subroutine parameter\n**    sqlite3Fts5ParserARG_STORE     Code to store %extra_argument into fts5yypParser\n**    sqlite3Fts5ParserARG_FETCH     Code to extract %extra_argument from fts5yypParser\n**    sqlite3Fts5ParserCTX_*         As sqlite3Fts5ParserARG_ except for %extra_context\n**    fts5YYREALLOC          Name of the realloc() function to use\n**    fts5YYFREE             Name of the free() function to use\n**    fts5YYDYNSTACK         True if stack space should be extended on heap\n**    fts5YYERRORSYMBOL      is the code number of the error symbol.  If not\n**                       defined, then do no error processing.\n**    fts5YYNSTATE           the combined number of states.\n**    fts5YYNRULE            the number of rules in the grammar\n**    fts5YYNFTS5TOKEN           Number of terminal symbols\n**    fts5YY_MAX_SHIFT       Maximum value for shift actions\n**    fts5YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions\n**    fts5YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions\n**    fts5YY_ERROR_ACTION    The fts5yy_action[] code for syntax error\n**    fts5YY_ACCEPT_ACTION   The fts5yy_action[] code for accept\n**    fts5YY_NO_ACTION       The fts5yy_action[] code for no-op\n**    fts5YY_MIN_REDUCE      Minimum value for reduce actions\n**    fts5YY_MAX_REDUCE      Maximum value for reduce actions\n**    fts5YY_MIN_DSTRCTR     Minimum symbol value that has a destructor\n**    fts5YY_MAX_DSTRCTR     Maximum symbol value that has a destructor\n*/\n#ifndef INTERFACE\n# define INTERFACE 1\n#endif\n/************* Begin control #defines *****************************************/\n#define fts5YYCODETYPE unsigned char\n#define fts5YYNOCODE 27\n#define fts5YYACTIONTYPE unsigned char\n#define sqlite3Fts5ParserFTS5TOKENTYPE Fts5Token\ntypedef union {\n  int fts5yyinit;\n  sqlite3Fts5ParserFTS5TOKENTYPE fts5yy0;\n  int fts5yy4;\n  Fts5Colset* fts5yy11;\n  Fts5ExprNode* fts5yy24;\n  Fts5ExprNearset* fts5yy46;\n  Fts5ExprPhrase* fts5yy53;\n} fts5YYMINORTYPE;\n#ifndef fts5YYSTACKDEPTH\n#define fts5YYSTACKDEPTH 100\n#endif\n#define sqlite3Fts5ParserARG_SDECL Fts5Parse *pParse;\n#define sqlite3Fts5ParserARG_PDECL ,Fts5Parse *pParse\n#define sqlite3Fts5ParserARG_PARAM ,pParse\n#define sqlite3Fts5ParserARG_FETCH Fts5Parse *pParse=fts5yypParser->pParse;\n#define sqlite3Fts5ParserARG_STORE fts5yypParser->pParse=pParse;\n#define fts5YYREALLOC realloc\n#define fts5YYFREE free\n#define fts5YYDYNSTACK 0\n#define sqlite3Fts5ParserCTX_SDECL\n#define sqlite3Fts5ParserCTX_PDECL\n#define sqlite3Fts5ParserCTX_PARAM\n#define sqlite3Fts5ParserCTX_FETCH\n#define sqlite3Fts5ParserCTX_STORE\n#define fts5YYNSTATE             35\n#define fts5YYNRULE              28\n#define fts5YYNRULE_WITH_ACTION  28\n#define fts5YYNFTS5TOKEN             16\n#define fts5YY_MAX_SHIFT         34\n#define fts5YY_MIN_SHIFTREDUCE   52\n#define fts5YY_MAX_SHIFTREDUCE   79\n#define fts5YY_ERROR_ACTION      80\n#define fts5YY_ACCEPT_ACTION     81\n#define fts5YY_NO_ACTION         82\n#define fts5YY_MIN_REDUCE        83\n#define fts5YY_MAX_REDUCE        110\n#define fts5YY_MIN_DSTRCTR       16\n#define fts5YY_MAX_DSTRCTR       24\n/************* End control #defines *******************************************/\n#define fts5YY_NLOOKAHEAD ((int)(sizeof(fts5yy_lookahead)/sizeof(fts5yy_lookahead[0])))\n\n/* Define the fts5yytestcase() macro to be a no-op if is not already defined\n** otherwise.\n**\n** Applications can choose to define fts5yytestcase() in the %include section\n** to a macro that can assist in verifying code coverage.  For production\n** code the fts5yytestcase() macro should be turned off.  But it is useful\n** for testing.\n*/\n#ifndef fts5yytestcase\n# define fts5yytestcase(X)\n#endif\n\n/* Macro to determine if stack space has the ability to grow using\n** heap memory.\n*/\n#if fts5YYSTACKDEPTH<=0 || fts5YYDYNSTACK\n# define fts5YYGROWABLESTACK 1\n#else\n# define fts5YYGROWABLESTACK 0\n#endif\n\n/* Guarantee a minimum number of initial stack slots.\n*/\n#if fts5YYSTACKDEPTH<=0\n# undef fts5YYSTACKDEPTH\n# define fts5YYSTACKDEPTH 2  /* Need a minimum stack size */\n#endif\n\n\n/* Next are the tables used to determine what action to take based on the\n** current state and lookahead token.  These tables are used to implement\n** functions that take a state number and lookahead value and return an\n** action integer.\n**\n** Suppose the action integer is N.  Then the action is determined as\n** follows\n**\n**   0 <= N <= fts5YY_MAX_SHIFT             Shift N.  That is, push the lookahead\n**                                      token onto the stack and goto state N.\n**\n**   N between fts5YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then\n**     and fts5YY_MAX_SHIFTREDUCE           reduce by rule N-fts5YY_MIN_SHIFTREDUCE.\n**\n**   N == fts5YY_ERROR_ACTION               A syntax error has occurred.\n**\n**   N == fts5YY_ACCEPT_ACTION              The parser accepts its input.\n**\n**   N == fts5YY_NO_ACTION                  No such action.  Denotes unused\n**                                      slots in the fts5yy_action[] table.\n**\n**   N between fts5YY_MIN_REDUCE            Reduce by rule N-fts5YY_MIN_REDUCE\n**     and fts5YY_MAX_REDUCE\n**\n** The action table is constructed as a single large table named fts5yy_action[].\n** Given state S and lookahead X, the action is computed as either:\n**\n**    (A)   N = fts5yy_action[ fts5yy_shift_ofst[S] + X ]\n**    (B)   N = fts5yy_default[S]\n**\n** The (A) formula is preferred.  The B formula is used instead if\n** fts5yy_lookahead[fts5yy_shift_ofst[S]+X] is not equal to X.\n**\n** The formulas above are for computing the action when the lookahead is\n** a terminal symbol.  If the lookahead is a non-terminal (as occurs after\n** a reduce action) then the fts5yy_reduce_ofst[] array is used in place of\n** the fts5yy_shift_ofst[] array.\n**\n** The following are the tables generated in this section:\n**\n**  fts5yy_action[]        A single table containing all actions.\n**  fts5yy_lookahead[]     A table containing the lookahead for each entry in\n**                     fts5yy_action.  Used to detect hash collisions.\n**  fts5yy_shift_ofst[]    For each state, the offset into fts5yy_action for\n**                     shifting terminals.\n**  fts5yy_reduce_ofst[]   For each state, the offset into fts5yy_action for\n**                     shifting non-terminals after a reduce.\n**  fts5yy_default[]       Default action for each state.\n**\n*********** Begin parsing tables **********************************************/\n#define fts5YY_ACTTAB_COUNT (105)\nstatic const fts5YYACTIONTYPE fts5yy_action[] = {\n /*     0 */    81,   20,   96,    6,   28,   99,   98,   26,   26,   18,\n /*    10 */    96,    6,   28,   17,   98,   56,   26,   19,   96,    6,\n /*    20 */    28,   14,   98,   14,   26,   31,   92,   96,    6,   28,\n /*    30 */   108,   98,   25,   26,   21,   96,    6,   28,   78,   98,\n /*    40 */    58,   26,   29,   96,    6,   28,  107,   98,   22,   26,\n /*    50 */    24,   16,   12,   11,    1,   13,   13,   24,   16,   23,\n /*    60 */    11,   33,   34,   13,   97,    8,   27,   32,   98,    7,\n /*    70 */    26,    3,    4,    5,    3,    4,    5,    3,   83,    4,\n /*    80 */     5,    3,   63,    5,    3,   62,   12,    2,   86,   13,\n /*    90 */     9,   30,   10,   10,   54,   57,   75,   78,   78,   53,\n /*   100 */    57,   15,   82,   82,   71,\n};\nstatic const fts5YYCODETYPE fts5yy_lookahead[] = {\n /*     0 */    16,   17,   18,   19,   20,   22,   22,   24,   24,   17,\n /*    10 */    18,   19,   20,    7,   22,    9,   24,   17,   18,   19,\n /*    20 */    20,    9,   22,    9,   24,   13,   17,   18,   19,   20,\n /*    30 */    26,   22,   24,   24,   17,   18,   19,   20,   15,   22,\n /*    40 */     9,   24,   17,   18,   19,   20,   26,   22,   21,   24,\n /*    50 */     6,    7,    9,    9,   10,   12,   12,    6,    7,   21,\n /*    60 */     9,   24,   25,   12,   18,    5,   20,   14,   22,    5,\n /*    70 */    24,    3,    1,    2,    3,    1,    2,    3,    0,    1,\n /*    80 */     2,    3,   11,    2,    3,   11,    9,   10,    5,   12,\n /*    90 */    23,   24,   10,   10,    8,    9,    9,   15,   15,    8,\n /*   100 */     9,    9,   27,   27,   11,   27,   27,   27,   27,   27,\n /*   110 */    27,   27,   27,   27,   27,   27,   27,   27,   27,   27,\n /*   120 */    27,\n};\n#define fts5YY_SHIFT_COUNT    (34)\n#define fts5YY_SHIFT_MIN      (0)\n#define fts5YY_SHIFT_MAX      (93)\nstatic const unsigned char fts5yy_shift_ofst[] = {\n /*     0 */    44,   44,   44,   44,   44,   44,   51,   77,   43,   12,\n /*    10 */    14,   83,   82,   14,   23,   23,   31,   31,   71,   74,\n /*    20 */    78,   81,   86,   91,    6,   53,   53,   60,   64,   68,\n /*    30 */    53,   87,   92,   53,   93,\n};\n#define fts5YY_REDUCE_COUNT (17)\n#define fts5YY_REDUCE_MIN   (-17)\n#define fts5YY_REDUCE_MAX   (67)\nstatic const signed char fts5yy_reduce_ofst[] = {\n /*     0 */   -16,   -8,    0,    9,   17,   25,   46,  -17,  -17,   37,\n /*    10 */    67,    4,    4,    8,    4,   20,   27,   38,\n};\nstatic const fts5YYACTIONTYPE fts5yy_default[] = {\n /*     0 */    80,   80,   80,   80,   80,   80,   95,   80,   80,  105,\n /*    10 */    80,  110,  110,   80,  110,  110,   80,   80,   80,   80,\n /*    20 */    80,   91,   80,   80,   80,  101,  100,   80,   80,   90,\n /*    30 */   103,   80,   80,  104,   80,\n};\n/********** End of lemon-generated parsing tables *****************************/\n\n/* The next table maps tokens (terminal symbols) into fallback tokens.\n** If a construct like the following:\n**\n**      %fallback ID X Y Z.\n**\n** appears in the grammar, then ID becomes a fallback token for X, Y,\n** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser\n** but it does not parse, the type of the token is changed to ID and\n** the parse is retried before an error is thrown.\n**\n** This feature can be used, for example, to cause some keywords in a language\n** to revert to identifiers if they keyword does not apply in the context where\n** it appears.\n*/\n#ifdef fts5YYFALLBACK\nstatic const fts5YYCODETYPE fts5yyFallback[] = {\n};\n#endif /* fts5YYFALLBACK */\n\n/* The following structure represents a single element of the\n** parser's stack.  Information stored includes:\n**\n**   +  The state number for the parser at this level of the stack.\n**\n**   +  The value of the token stored at this level of the stack.\n**      (In other words, the \"major\" token.)\n**\n**   +  The semantic value stored at this level of the stack.  This is\n**      the information used by the action routines in the grammar.\n**      It is sometimes called the \"minor\" token.\n**\n** After the \"shift\" half of a SHIFTREDUCE action, the stateno field\n** actually contains the reduce action for the second half of the\n** SHIFTREDUCE.\n*/\nstruct fts5yyStackEntry {\n  fts5YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */\n  fts5YYCODETYPE major;      /* The major token value.  This is the code\n                         ** number for the token at this stack level */\n  fts5YYMINORTYPE minor;     /* The user-supplied minor token value.  This\n                         ** is the value of the token  */\n};\ntypedef struct fts5yyStackEntry fts5yyStackEntry;\n\n/* The state of the parser is completely contained in an instance of\n** the following structure */\nstruct fts5yyParser {\n  fts5yyStackEntry *fts5yytos;          /* Pointer to top element of the stack */\n#ifdef fts5YYTRACKMAXSTACKDEPTH\n  int fts5yyhwm;                    /* High-water mark of the stack */\n#endif\n#ifndef fts5YYNOERRORRECOVERY\n  int fts5yyerrcnt;                 /* Shifts left before out of the error */\n#endif\n  sqlite3Fts5ParserARG_SDECL                /* A place to hold %extra_argument */\n  sqlite3Fts5ParserCTX_SDECL                /* A place to hold %extra_context */\n  fts5yyStackEntry *fts5yystackEnd;           /* Last entry in the stack */\n  fts5yyStackEntry *fts5yystack;              /* The parser stack */\n  fts5yyStackEntry fts5yystk0[fts5YYSTACKDEPTH];  /* Initial stack space */\n};\ntypedef struct fts5yyParser fts5yyParser;\n\n/* #include <assert.h> */\n#ifndef NDEBUG\n/* #include <stdio.h> */\nstatic FILE *fts5yyTraceFILE = 0;\nstatic char *fts5yyTracePrompt = 0;\n#endif /* NDEBUG */\n\n#ifndef NDEBUG\n/*\n** Turn parser tracing on by giving a stream to which to write the trace\n** and a prompt to preface each trace message.  Tracing is turned off\n** by making either argument NULL\n**\n** Inputs:\n** <ul>\n** <li> A FILE* to which trace output should be written.\n**      If NULL, then tracing is turned off.\n** <li> A prefix string written at the beginning of every\n**      line of trace output.  If NULL, then tracing is\n**      turned off.\n** </ul>\n**\n** Outputs:\n** None.\n*/\nstatic void sqlite3Fts5ParserTrace(FILE *TraceFILE, char *zTracePrompt){\n  fts5yyTraceFILE = TraceFILE;\n  fts5yyTracePrompt = zTracePrompt;\n  if( fts5yyTraceFILE==0 ) fts5yyTracePrompt = 0;\n  else if( fts5yyTracePrompt==0 ) fts5yyTraceFILE = 0;\n}\n#endif /* NDEBUG */\n\n#if defined(fts5YYCOVERAGE) || !defined(NDEBUG)\n/* For tracing shifts, the names of all terminals and nonterminals\n** are required.  The following table supplies these names */\nstatic const char *const fts5yyTokenName[] = {\n  /*    0 */ \"$\",\n  /*    1 */ \"OR\",\n  /*    2 */ \"AND\",\n  /*    3 */ \"NOT\",\n  /*    4 */ \"TERM\",\n  /*    5 */ \"COLON\",\n  /*    6 */ \"MINUS\",\n  /*    7 */ \"LCP\",\n  /*    8 */ \"RCP\",\n  /*    9 */ \"STRING\",\n  /*   10 */ \"LP\",\n  /*   11 */ \"RP\",\n  /*   12 */ \"CARET\",\n  /*   13 */ \"COMMA\",\n  /*   14 */ \"PLUS\",\n  /*   15 */ \"STAR\",\n  /*   16 */ \"input\",\n  /*   17 */ \"expr\",\n  /*   18 */ \"cnearset\",\n  /*   19 */ \"exprlist\",\n  /*   20 */ \"colset\",\n  /*   21 */ \"colsetlist\",\n  /*   22 */ \"nearset\",\n  /*   23 */ \"nearphrases\",\n  /*   24 */ \"phrase\",\n  /*   25 */ \"neardist_opt\",\n  /*   26 */ \"star_opt\",\n};\n#endif /* defined(fts5YYCOVERAGE) || !defined(NDEBUG) */\n\n#ifndef NDEBUG\n/* For tracing reduce actions, the names of all rules are required.\n*/\nstatic const char *const fts5yyRuleName[] = {\n /*   0 */ \"input ::= expr\",\n /*   1 */ \"colset ::= MINUS LCP colsetlist RCP\",\n /*   2 */ \"colset ::= LCP colsetlist RCP\",\n /*   3 */ \"colset ::= STRING\",\n /*   4 */ \"colset ::= MINUS STRING\",\n /*   5 */ \"colsetlist ::= colsetlist STRING\",\n /*   6 */ \"colsetlist ::= STRING\",\n /*   7 */ \"expr ::= expr AND expr\",\n /*   8 */ \"expr ::= expr OR expr\",\n /*   9 */ \"expr ::= expr NOT expr\",\n /*  10 */ \"expr ::= colset COLON LP expr RP\",\n /*  11 */ \"expr ::= LP expr RP\",\n /*  12 */ \"expr ::= exprlist\",\n /*  13 */ \"exprlist ::= cnearset\",\n /*  14 */ \"exprlist ::= exprlist cnearset\",\n /*  15 */ \"cnearset ::= nearset\",\n /*  16 */ \"cnearset ::= colset COLON nearset\",\n /*  17 */ \"nearset ::= phrase\",\n /*  18 */ \"nearset ::= CARET phrase\",\n /*  19 */ \"nearset ::= STRING LP nearphrases neardist_opt RP\",\n /*  20 */ \"nearphrases ::= phrase\",\n /*  21 */ \"nearphrases ::= nearphrases phrase\",\n /*  22 */ \"neardist_opt ::=\",\n /*  23 */ \"neardist_opt ::= COMMA STRING\",\n /*  24 */ \"phrase ::= phrase PLUS STRING star_opt\",\n /*  25 */ \"phrase ::= STRING star_opt\",\n /*  26 */ \"star_opt ::= STAR\",\n /*  27 */ \"star_opt ::=\",\n};\n#endif /* NDEBUG */\n\n\n#if fts5YYGROWABLESTACK\n/*\n** Try to increase the size of the parser stack.  Return the number\n** of errors.  Return 0 on success.\n*/\nstatic int fts5yyGrowStack(fts5yyParser *p){\n  int oldSize = 1 + (int)(p->fts5yystackEnd - p->fts5yystack);\n  int newSize;\n  int idx;\n  fts5yyStackEntry *pNew;\n\n  newSize = oldSize*2 + 100;\n  idx = (int)(p->fts5yytos - p->fts5yystack);\n  if( p->fts5yystack==p->fts5yystk0 ){\n    pNew = fts5YYREALLOC(0, newSize*sizeof(pNew[0]));\n    if( pNew==0 ) return 1;\n    memcpy(pNew, p->fts5yystack, oldSize*sizeof(pNew[0]));\n  }else{\n    pNew = fts5YYREALLOC(p->fts5yystack, newSize*sizeof(pNew[0]));\n    if( pNew==0 ) return 1;\n  }\n  p->fts5yystack = pNew;\n  p->fts5yytos = &p->fts5yystack[idx];\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    fprintf(fts5yyTraceFILE,\"%sStack grows from %d to %d entries.\\n\",\n            fts5yyTracePrompt, oldSize, newSize);\n  }\n#endif\n  p->fts5yystackEnd = &p->fts5yystack[newSize-1];\n  return 0;\n}\n#endif /* fts5YYGROWABLESTACK */\n\n#if !fts5YYGROWABLESTACK\n/* For builds that do no have a growable stack, fts5yyGrowStack always\n** returns an error.\n*/\n# define fts5yyGrowStack(X) 1\n#endif\n\n/* Datatype of the argument to the memory allocated passed as the\n** second argument to sqlite3Fts5ParserAlloc() below.  This can be changed by\n** putting an appropriate #define in the %include section of the input\n** grammar.\n*/\n#ifndef fts5YYMALLOCARGTYPE\n# define fts5YYMALLOCARGTYPE size_t\n#endif\n\n/* Initialize a new parser that has already been allocated.\n*/\nstatic void sqlite3Fts5ParserInit(void *fts5yypRawParser sqlite3Fts5ParserCTX_PDECL){\n  fts5yyParser *fts5yypParser = (fts5yyParser*)fts5yypRawParser;\n  sqlite3Fts5ParserCTX_STORE\n#ifdef fts5YYTRACKMAXSTACKDEPTH\n  fts5yypParser->fts5yyhwm = 0;\n#endif\n  fts5yypParser->fts5yystack = fts5yypParser->fts5yystk0;\n  fts5yypParser->fts5yystackEnd = &fts5yypParser->fts5yystack[fts5YYSTACKDEPTH-1];\n#ifndef fts5YYNOERRORRECOVERY\n  fts5yypParser->fts5yyerrcnt = -1;\n#endif\n  fts5yypParser->fts5yytos = fts5yypParser->fts5yystack;\n  fts5yypParser->fts5yystack[0].stateno = 0;\n  fts5yypParser->fts5yystack[0].major = 0;\n}\n\n#ifndef sqlite3Fts5Parser_ENGINEALWAYSONSTACK\n/*\n** This function allocates a new parser.\n** The only argument is a pointer to a function which works like\n** malloc.\n**\n** Inputs:\n** A pointer to the function used to allocate memory.\n**\n** Outputs:\n** A pointer to a parser.  This pointer is used in subsequent calls\n** to sqlite3Fts5Parser and sqlite3Fts5ParserFree.\n*/\nstatic void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(fts5YYMALLOCARGTYPE) sqlite3Fts5ParserCTX_PDECL){\n  fts5yyParser *fts5yypParser;\n  fts5yypParser = (fts5yyParser*)(*mallocProc)( (fts5YYMALLOCARGTYPE)sizeof(fts5yyParser) );\n  if( fts5yypParser ){\n    sqlite3Fts5ParserCTX_STORE\n    sqlite3Fts5ParserInit(fts5yypParser sqlite3Fts5ParserCTX_PARAM);\n  }\n  return (void*)fts5yypParser;\n}\n#endif /* sqlite3Fts5Parser_ENGINEALWAYSONSTACK */\n\n\n/* The following function deletes the \"minor type\" or semantic value\n** associated with a symbol.  The symbol can be either a terminal\n** or nonterminal. \"fts5yymajor\" is the symbol code, and \"fts5yypminor\" is\n** a pointer to the value to be deleted.  The code used to do the\n** deletions is derived from the %destructor and/or %token_destructor\n** directives of the input grammar.\n*/\nstatic void fts5yy_destructor(\n  fts5yyParser *fts5yypParser,    /* The parser */\n  fts5YYCODETYPE fts5yymajor,     /* Type code for object to destroy */\n  fts5YYMINORTYPE *fts5yypminor   /* The object to be destroyed */\n){\n  sqlite3Fts5ParserARG_FETCH\n  sqlite3Fts5ParserCTX_FETCH\n  switch( fts5yymajor ){\n    /* Here is inserted the actions which take place when a\n    ** terminal or non-terminal is destroyed.  This can happen\n    ** when the symbol is popped from the stack during a\n    ** reduce or during error processing or when a parser is\n    ** being destroyed before it is finished parsing.\n    **\n    ** Note: during a reduce, the only symbols destroyed are those\n    ** which appear on the RHS of the rule, but which are *not* used\n    ** inside the C code.\n    */\n/********* Begin destructor definitions ***************************************/\n    case 16: /* input */\n{\n (void)pParse;\n}\n      break;\n    case 17: /* expr */\n    case 18: /* cnearset */\n    case 19: /* exprlist */\n{\n sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy24));\n}\n      break;\n    case 20: /* colset */\n    case 21: /* colsetlist */\n{\n sqlite3_free((fts5yypminor->fts5yy11));\n}\n      break;\n    case 22: /* nearset */\n    case 23: /* nearphrases */\n{\n sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy46));\n}\n      break;\n    case 24: /* phrase */\n{\n sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy53));\n}\n      break;\n/********* End destructor definitions *****************************************/\n    default:  break;   /* If no destructor action specified: do nothing */\n  }\n}\n\n/*\n** Pop the parser's stack once.\n**\n** If there is a destructor routine associated with the token which\n** is popped from the stack, then call it.\n*/\nstatic void fts5yy_pop_parser_stack(fts5yyParser *pParser){\n  fts5yyStackEntry *fts5yytos;\n  assert( pParser->fts5yytos!=0 );\n  assert( pParser->fts5yytos > pParser->fts5yystack );\n  fts5yytos = pParser->fts5yytos--;\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    fprintf(fts5yyTraceFILE,\"%sPopping %s\\n\",\n      fts5yyTracePrompt,\n      fts5yyTokenName[fts5yytos->major]);\n  }\n#endif\n  fts5yy_destructor(pParser, fts5yytos->major, &fts5yytos->minor);\n}\n\n/*\n** Clear all secondary memory allocations from the parser\n*/\nstatic void sqlite3Fts5ParserFinalize(void *p){\n  fts5yyParser *pParser = (fts5yyParser*)p;\n\n  /* In-lined version of calling fts5yy_pop_parser_stack() for each\n  ** element left in the stack */\n  fts5yyStackEntry *fts5yytos = pParser->fts5yytos;\n  while( fts5yytos>pParser->fts5yystack ){\n#ifndef NDEBUG\n    if( fts5yyTraceFILE ){\n      fprintf(fts5yyTraceFILE,\"%sPopping %s\\n\",\n        fts5yyTracePrompt,\n        fts5yyTokenName[fts5yytos->major]);\n    }\n#endif\n    if( fts5yytos->major>=fts5YY_MIN_DSTRCTR ){\n      fts5yy_destructor(pParser, fts5yytos->major, &fts5yytos->minor);\n    }\n    fts5yytos--;\n  }\n\n#if fts5YYGROWABLESTACK\n  if( pParser->fts5yystack!=pParser->fts5yystk0 ) fts5YYFREE(pParser->fts5yystack);\n#endif\n}\n\n#ifndef sqlite3Fts5Parser_ENGINEALWAYSONSTACK\n/*\n** Deallocate and destroy a parser.  Destructors are called for\n** all stack elements before shutting the parser down.\n**\n** If the fts5YYPARSEFREENEVERNULL macro exists (for example because it\n** is defined in a %include section of the input grammar) then it is\n** assumed that the input pointer is never NULL.\n*/\nstatic void sqlite3Fts5ParserFree(\n  void *p,                    /* The parser to be deleted */\n  void (*freeProc)(void*)     /* Function used to reclaim memory */\n){\n#ifndef fts5YYPARSEFREENEVERNULL\n  if( p==0 ) return;\n#endif\n  sqlite3Fts5ParserFinalize(p);\n  (*freeProc)(p);\n}\n#endif /* sqlite3Fts5Parser_ENGINEALWAYSONSTACK */\n\n/*\n** Return the peak depth of the stack for a parser.\n*/\n#ifdef fts5YYTRACKMAXSTACKDEPTH\nstatic int sqlite3Fts5ParserStackPeak(void *p){\n  fts5yyParser *pParser = (fts5yyParser*)p;\n  return pParser->fts5yyhwm;\n}\n#endif\n\n/* This array of booleans keeps track of the parser statement\n** coverage.  The element fts5yycoverage[X][Y] is set when the parser\n** is in state X and has a lookahead token Y.  In a well-tested\n** systems, every element of this matrix should end up being set.\n*/\n#if defined(fts5YYCOVERAGE)\nstatic unsigned char fts5yycoverage[fts5YYNSTATE][fts5YYNFTS5TOKEN];\n#endif\n\n/*\n** Write into out a description of every state/lookahead combination that\n**\n**   (1)  has not been used by the parser, and\n**   (2)  is not a syntax error.\n**\n** Return the number of missed state/lookahead combinations.\n*/\n#if defined(fts5YYCOVERAGE)\nstatic int sqlite3Fts5ParserCoverage(FILE *out){\n  int stateno, iLookAhead, i;\n  int nMissed = 0;\n  for(stateno=0; stateno<fts5YYNSTATE; stateno++){\n    i = fts5yy_shift_ofst[stateno];\n    for(iLookAhead=0; iLookAhead<fts5YYNFTS5TOKEN; iLookAhead++){\n      if( fts5yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;\n      if( fts5yycoverage[stateno][iLookAhead]==0 ) nMissed++;\n      if( out ){\n        fprintf(out,\"State %d lookahead %s %s\\n\", stateno,\n                fts5yyTokenName[iLookAhead],\n                fts5yycoverage[stateno][iLookAhead] ? \"ok\" : \"missed\");\n      }\n    }\n  }\n  return nMissed;\n}\n#endif\n\n/*\n** Find the appropriate action for a parser given the terminal\n** look-ahead token iLookAhead.\n*/\nstatic fts5YYACTIONTYPE fts5yy_find_shift_action(\n  fts5YYCODETYPE iLookAhead,    /* The look-ahead token */\n  fts5YYACTIONTYPE stateno      /* Current state number */\n){\n  int i;\n\n  if( stateno>fts5YY_MAX_SHIFT ) return stateno;\n  assert( stateno <= fts5YY_SHIFT_COUNT );\n#if defined(fts5YYCOVERAGE)\n  fts5yycoverage[stateno][iLookAhead] = 1;\n#endif\n  do{\n    i = fts5yy_shift_ofst[stateno];\n    assert( i>=0 );\n    assert( i<=fts5YY_ACTTAB_COUNT );\n    assert( i+fts5YYNFTS5TOKEN<=(int)fts5YY_NLOOKAHEAD );\n    assert( iLookAhead!=fts5YYNOCODE );\n    assert( iLookAhead < fts5YYNFTS5TOKEN );\n    i += iLookAhead;\n    assert( i<(int)fts5YY_NLOOKAHEAD );\n    if( fts5yy_lookahead[i]!=iLookAhead ){\n#ifdef fts5YYFALLBACK\n      fts5YYCODETYPE iFallback;            /* Fallback token */\n      assert( iLookAhead<sizeof(fts5yyFallback)/sizeof(fts5yyFallback[0]) );\n      iFallback = fts5yyFallback[iLookAhead];\n      if( iFallback!=0 ){\n#ifndef NDEBUG\n        if( fts5yyTraceFILE ){\n          fprintf(fts5yyTraceFILE, \"%sFALLBACK %s => %s\\n\",\n             fts5yyTracePrompt, fts5yyTokenName[iLookAhead], fts5yyTokenName[iFallback]);\n        }\n#endif\n        assert( fts5yyFallback[iFallback]==0 ); /* Fallback loop must terminate */\n        iLookAhead = iFallback;\n        continue;\n      }\n#endif\n#ifdef fts5YYWILDCARD\n      {\n        int j = i - iLookAhead + fts5YYWILDCARD;\n        assert( j<(int)(sizeof(fts5yy_lookahead)/sizeof(fts5yy_lookahead[0])) );\n        if( fts5yy_lookahead[j]==fts5YYWILDCARD && iLookAhead>0 ){\n#ifndef NDEBUG\n          if( fts5yyTraceFILE ){\n            fprintf(fts5yyTraceFILE, \"%sWILDCARD %s => %s\\n\",\n               fts5yyTracePrompt, fts5yyTokenName[iLookAhead],\n               fts5yyTokenName[fts5YYWILDCARD]);\n          }\n#endif /* NDEBUG */\n          return fts5yy_action[j];\n        }\n      }\n#endif /* fts5YYWILDCARD */\n      return fts5yy_default[stateno];\n    }else{\n      assert( i>=0 && i<(int)(sizeof(fts5yy_action)/sizeof(fts5yy_action[0])) );\n      return fts5yy_action[i];\n    }\n  }while(1);\n}\n\n/*\n** Find the appropriate action for a parser given the non-terminal\n** look-ahead token iLookAhead.\n*/\nstatic fts5YYACTIONTYPE fts5yy_find_reduce_action(\n  fts5YYACTIONTYPE stateno,     /* Current state number */\n  fts5YYCODETYPE iLookAhead     /* The look-ahead token */\n){\n  int i;\n#ifdef fts5YYERRORSYMBOL\n  if( stateno>fts5YY_REDUCE_COUNT ){\n    return fts5yy_default[stateno];\n  }\n#else\n  assert( stateno<=fts5YY_REDUCE_COUNT );\n#endif\n  i = fts5yy_reduce_ofst[stateno];\n  assert( iLookAhead!=fts5YYNOCODE );\n  i += iLookAhead;\n#ifdef fts5YYERRORSYMBOL\n  if( i<0 || i>=fts5YY_ACTTAB_COUNT || fts5yy_lookahead[i]!=iLookAhead ){\n    return fts5yy_default[stateno];\n  }\n#else\n  assert( i>=0 && i<fts5YY_ACTTAB_COUNT );\n  assert( fts5yy_lookahead[i]==iLookAhead );\n#endif\n  return fts5yy_action[i];\n}\n\n/*\n** The following routine is called if the stack overflows.\n*/\nstatic void fts5yyStackOverflow(fts5yyParser *fts5yypParser){\n   sqlite3Fts5ParserARG_FETCH\n   sqlite3Fts5ParserCTX_FETCH\n#ifndef NDEBUG\n   if( fts5yyTraceFILE ){\n     fprintf(fts5yyTraceFILE,\"%sStack Overflow!\\n\",fts5yyTracePrompt);\n   }\n#endif\n   while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser);\n   /* Here code is inserted which will execute if the parser\n   ** stack every overflows */\n/******** Begin %stack_overflow code ******************************************/\n\n  sqlite3Fts5ParseError(pParse, \"fts5: parser stack overflow\");\n/******** End %stack_overflow code ********************************************/\n   sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument var */\n   sqlite3Fts5ParserCTX_STORE\n}\n\n/*\n** Print tracing information for a SHIFT action\n*/\n#ifndef NDEBUG\nstatic void fts5yyTraceShift(fts5yyParser *fts5yypParser, int fts5yyNewState, const char *zTag){\n  if( fts5yyTraceFILE ){\n    if( fts5yyNewState<fts5YYNSTATE ){\n      fprintf(fts5yyTraceFILE,\"%s%s '%s', go to state %d\\n\",\n         fts5yyTracePrompt, zTag, fts5yyTokenName[fts5yypParser->fts5yytos->major],\n         fts5yyNewState);\n    }else{\n      fprintf(fts5yyTraceFILE,\"%s%s '%s', pending reduce %d\\n\",\n         fts5yyTracePrompt, zTag, fts5yyTokenName[fts5yypParser->fts5yytos->major],\n         fts5yyNewState - fts5YY_MIN_REDUCE);\n    }\n  }\n}\n#else\n# define fts5yyTraceShift(X,Y,Z)\n#endif\n\n/*\n** Perform a shift action.\n*/\nstatic void fts5yy_shift(\n  fts5yyParser *fts5yypParser,          /* The parser to be shifted */\n  fts5YYACTIONTYPE fts5yyNewState,      /* The new state to shift in */\n  fts5YYCODETYPE fts5yyMajor,           /* The major token to shift in */\n  sqlite3Fts5ParserFTS5TOKENTYPE fts5yyMinor        /* The minor token to shift in */\n){\n  fts5yyStackEntry *fts5yytos;\n  fts5yypParser->fts5yytos++;\n#ifdef fts5YYTRACKMAXSTACKDEPTH\n  if( (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack)>fts5yypParser->fts5yyhwm ){\n    fts5yypParser->fts5yyhwm++;\n    assert( fts5yypParser->fts5yyhwm == (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack) );\n  }\n#endif\n  fts5yytos = fts5yypParser->fts5yytos;\n  if( fts5yytos>fts5yypParser->fts5yystackEnd ){\n    if( fts5yyGrowStack(fts5yypParser) ){\n      fts5yypParser->fts5yytos--;\n      fts5yyStackOverflow(fts5yypParser);\n      return;\n    }\n    fts5yytos = fts5yypParser->fts5yytos;\n    assert( fts5yytos <= fts5yypParser->fts5yystackEnd );\n  }\n  if( fts5yyNewState > fts5YY_MAX_SHIFT ){\n    fts5yyNewState += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE;\n  }\n  fts5yytos->stateno = fts5yyNewState;\n  fts5yytos->major = fts5yyMajor;\n  fts5yytos->minor.fts5yy0 = fts5yyMinor;\n  fts5yyTraceShift(fts5yypParser, fts5yyNewState, \"Shift\");\n}\n\n/* For rule J, fts5yyRuleInfoLhs[J] contains the symbol on the left-hand side\n** of that rule */\nstatic const fts5YYCODETYPE fts5yyRuleInfoLhs[] = {\n    16,  /* (0) input ::= expr */\n    20,  /* (1) colset ::= MINUS LCP colsetlist RCP */\n    20,  /* (2) colset ::= LCP colsetlist RCP */\n    20,  /* (3) colset ::= STRING */\n    20,  /* (4) colset ::= MINUS STRING */\n    21,  /* (5) colsetlist ::= colsetlist STRING */\n    21,  /* (6) colsetlist ::= STRING */\n    17,  /* (7) expr ::= expr AND expr */\n    17,  /* (8) expr ::= expr OR expr */\n    17,  /* (9) expr ::= expr NOT expr */\n    17,  /* (10) expr ::= colset COLON LP expr RP */\n    17,  /* (11) expr ::= LP expr RP */\n    17,  /* (12) expr ::= exprlist */\n    19,  /* (13) exprlist ::= cnearset */\n    19,  /* (14) exprlist ::= exprlist cnearset */\n    18,  /* (15) cnearset ::= nearset */\n    18,  /* (16) cnearset ::= colset COLON nearset */\n    22,  /* (17) nearset ::= phrase */\n    22,  /* (18) nearset ::= CARET phrase */\n    22,  /* (19) nearset ::= STRING LP nearphrases neardist_opt RP */\n    23,  /* (20) nearphrases ::= phrase */\n    23,  /* (21) nearphrases ::= nearphrases phrase */\n    25,  /* (22) neardist_opt ::= */\n    25,  /* (23) neardist_opt ::= COMMA STRING */\n    24,  /* (24) phrase ::= phrase PLUS STRING star_opt */\n    24,  /* (25) phrase ::= STRING star_opt */\n    26,  /* (26) star_opt ::= STAR */\n    26,  /* (27) star_opt ::= */\n};\n\n/* For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number\n** of symbols on the right-hand side of that rule. */\nstatic const signed char fts5yyRuleInfoNRhs[] = {\n   -1,  /* (0) input ::= expr */\n   -4,  /* (1) colset ::= MINUS LCP colsetlist RCP */\n   -3,  /* (2) colset ::= LCP colsetlist RCP */\n   -1,  /* (3) colset ::= STRING */\n   -2,  /* (4) colset ::= MINUS STRING */\n   -2,  /* (5) colsetlist ::= colsetlist STRING */\n   -1,  /* (6) colsetlist ::= STRING */\n   -3,  /* (7) expr ::= expr AND expr */\n   -3,  /* (8) expr ::= expr OR expr */\n   -3,  /* (9) expr ::= expr NOT expr */\n   -5,  /* (10) expr ::= colset COLON LP expr RP */\n   -3,  /* (11) expr ::= LP expr RP */\n   -1,  /* (12) expr ::= exprlist */\n   -1,  /* (13) exprlist ::= cnearset */\n   -2,  /* (14) exprlist ::= exprlist cnearset */\n   -1,  /* (15) cnearset ::= nearset */\n   -3,  /* (16) cnearset ::= colset COLON nearset */\n   -1,  /* (17) nearset ::= phrase */\n   -2,  /* (18) nearset ::= CARET phrase */\n   -5,  /* (19) nearset ::= STRING LP nearphrases neardist_opt RP */\n   -1,  /* (20) nearphrases ::= phrase */\n   -2,  /* (21) nearphrases ::= nearphrases phrase */\n    0,  /* (22) neardist_opt ::= */\n   -2,  /* (23) neardist_opt ::= COMMA STRING */\n   -4,  /* (24) phrase ::= phrase PLUS STRING star_opt */\n   -2,  /* (25) phrase ::= STRING star_opt */\n   -1,  /* (26) star_opt ::= STAR */\n    0,  /* (27) star_opt ::= */\n};\n\nstatic void fts5yy_accept(fts5yyParser*);  /* Forward Declaration */\n\n/*\n** Perform a reduce action and the shift that must immediately\n** follow the reduce.\n**\n** The fts5yyLookahead and fts5yyLookaheadToken parameters provide reduce actions\n** access to the lookahead token (if any).  The fts5yyLookahead will be fts5YYNOCODE\n** if the lookahead token has already been consumed.  As this procedure is\n** only called from one place, optimizing compilers will in-line it, which\n** means that the extra parameters have no performance impact.\n*/\nstatic fts5YYACTIONTYPE fts5yy_reduce(\n  fts5yyParser *fts5yypParser,         /* The parser */\n  unsigned int fts5yyruleno,       /* Number of the rule by which to reduce */\n  int fts5yyLookahead,             /* Lookahead token, or fts5YYNOCODE if none */\n  sqlite3Fts5ParserFTS5TOKENTYPE fts5yyLookaheadToken  /* Value of the lookahead token */\n  sqlite3Fts5ParserCTX_PDECL                   /* %extra_context */\n){\n  int fts5yygoto;                     /* The next state */\n  fts5YYACTIONTYPE fts5yyact;             /* The next action */\n  fts5yyStackEntry *fts5yymsp;            /* The top of the parser's stack */\n  int fts5yysize;                     /* Amount to pop the stack */\n  sqlite3Fts5ParserARG_FETCH\n  (void)fts5yyLookahead;\n  (void)fts5yyLookaheadToken;\n  fts5yymsp = fts5yypParser->fts5yytos;\n\n  switch( fts5yyruleno ){\n  /* Beginning here are the reduction cases.  A typical example\n  ** follows:\n  **   case 0:\n  **  #line <lineno> <grammarfile>\n  **     { ... }           // User supplied code\n  **  #line <lineno> <thisfile>\n  **     break;\n  */\n/********** Begin reduce actions **********************************************/\n        fts5YYMINORTYPE fts5yylhsminor;\n      case 0: /* input ::= expr */\n{ sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy24); }\n        break;\n      case 1: /* colset ::= MINUS LCP colsetlist RCP */\n{\n    fts5yymsp[-3].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);\n}\n        break;\n      case 2: /* colset ::= LCP colsetlist RCP */\n{ fts5yymsp[-2].minor.fts5yy11 = fts5yymsp[-1].minor.fts5yy11; }\n        break;\n      case 3: /* colset ::= STRING */\n{\n  fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);\n}\n  fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;\n        break;\n      case 4: /* colset ::= MINUS STRING */\n{\n  fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);\n  fts5yymsp[-1].minor.fts5yy11 = sqlite3Fts5ParseColsetInvert(pParse, fts5yymsp[-1].minor.fts5yy11);\n}\n        break;\n      case 5: /* colsetlist ::= colsetlist STRING */\n{\n  fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy11, &fts5yymsp[0].minor.fts5yy0); }\n  fts5yymsp[-1].minor.fts5yy11 = fts5yylhsminor.fts5yy11;\n        break;\n      case 6: /* colsetlist ::= STRING */\n{\n  fts5yylhsminor.fts5yy11 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);\n}\n  fts5yymsp[0].minor.fts5yy11 = fts5yylhsminor.fts5yy11;\n        break;\n      case 7: /* expr ::= expr AND expr */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);\n}\n  fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 8: /* expr ::= expr OR expr */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);\n}\n  fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 9: /* expr ::= expr NOT expr */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24, 0);\n}\n  fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 10: /* expr ::= colset COLON LP expr RP */\n{\n  sqlite3Fts5ParseSetColset(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[-4].minor.fts5yy11);\n  fts5yylhsminor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;\n}\n  fts5yymsp[-4].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 11: /* expr ::= LP expr RP */\n{fts5yymsp[-2].minor.fts5yy24 = fts5yymsp[-1].minor.fts5yy24;}\n        break;\n      case 12: /* expr ::= exprlist */\n      case 13: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==13);\n{fts5yylhsminor.fts5yy24 = fts5yymsp[0].minor.fts5yy24;}\n  fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 14: /* exprlist ::= exprlist cnearset */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseImplicitAnd(pParse, fts5yymsp[-1].minor.fts5yy24, fts5yymsp[0].minor.fts5yy24);\n}\n  fts5yymsp[-1].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 15: /* cnearset ::= nearset */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);\n}\n  fts5yymsp[0].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 16: /* cnearset ::= colset COLON nearset */\n{\n  fts5yylhsminor.fts5yy24 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy46);\n  sqlite3Fts5ParseSetColset(pParse, fts5yylhsminor.fts5yy24, fts5yymsp[-2].minor.fts5yy11);\n}\n  fts5yymsp[-2].minor.fts5yy24 = fts5yylhsminor.fts5yy24;\n        break;\n      case 17: /* nearset ::= phrase */\n{ fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53); }\n  fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;\n        break;\n      case 18: /* nearset ::= CARET phrase */\n{\n  sqlite3Fts5ParseSetCaret(fts5yymsp[0].minor.fts5yy53);\n  fts5yymsp[-1].minor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);\n}\n        break;\n      case 19: /* nearset ::= STRING LP nearphrases neardist_opt RP */\n{\n  sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);\n  sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy46, &fts5yymsp[-1].minor.fts5yy0);\n  fts5yylhsminor.fts5yy46 = fts5yymsp[-2].minor.fts5yy46;\n}\n  fts5yymsp[-4].minor.fts5yy46 = fts5yylhsminor.fts5yy46;\n        break;\n      case 20: /* nearphrases ::= phrase */\n{\n  fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy53);\n}\n  fts5yymsp[0].minor.fts5yy46 = fts5yylhsminor.fts5yy46;\n        break;\n      case 21: /* nearphrases ::= nearphrases phrase */\n{\n  fts5yylhsminor.fts5yy46 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy46, fts5yymsp[0].minor.fts5yy53);\n}\n  fts5yymsp[-1].minor.fts5yy46 = fts5yylhsminor.fts5yy46;\n        break;\n      case 22: /* neardist_opt ::= */\n{ fts5yymsp[1].minor.fts5yy0.p = 0; fts5yymsp[1].minor.fts5yy0.n = 0; }\n        break;\n      case 23: /* neardist_opt ::= COMMA STRING */\n{ fts5yymsp[-1].minor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }\n        break;\n      case 24: /* phrase ::= phrase PLUS STRING star_opt */\n{\n  fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy53, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);\n}\n  fts5yymsp[-3].minor.fts5yy53 = fts5yylhsminor.fts5yy53;\n        break;\n      case 25: /* phrase ::= STRING star_opt */\n{\n  fts5yylhsminor.fts5yy53 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy4);\n}\n  fts5yymsp[-1].minor.fts5yy53 = fts5yylhsminor.fts5yy53;\n        break;\n      case 26: /* star_opt ::= STAR */\n{ fts5yymsp[0].minor.fts5yy4 = 1; }\n        break;\n      case 27: /* star_opt ::= */\n{ fts5yymsp[1].minor.fts5yy4 = 0; }\n        break;\n      default:\n        break;\n/********** End reduce actions ************************************************/\n  };\n  assert( fts5yyruleno<sizeof(fts5yyRuleInfoLhs)/sizeof(fts5yyRuleInfoLhs[0]) );\n  fts5yygoto = fts5yyRuleInfoLhs[fts5yyruleno];\n  fts5yysize = fts5yyRuleInfoNRhs[fts5yyruleno];\n  fts5yyact = fts5yy_find_reduce_action(fts5yymsp[fts5yysize].stateno,(fts5YYCODETYPE)fts5yygoto);\n\n  /* There are no SHIFTREDUCE actions on nonterminals because the table\n  ** generator has simplified them to pure REDUCE actions. */\n  assert( !(fts5yyact>fts5YY_MAX_SHIFT && fts5yyact<=fts5YY_MAX_SHIFTREDUCE) );\n\n  /* It is not possible for a REDUCE to be followed by an error */\n  assert( fts5yyact!=fts5YY_ERROR_ACTION );\n\n  fts5yymsp += fts5yysize+1;\n  fts5yypParser->fts5yytos = fts5yymsp;\n  fts5yymsp->stateno = (fts5YYACTIONTYPE)fts5yyact;\n  fts5yymsp->major = (fts5YYCODETYPE)fts5yygoto;\n  fts5yyTraceShift(fts5yypParser, fts5yyact, \"... then shift\");\n  return fts5yyact;\n}\n\n/*\n** The following code executes when the parse fails\n*/\n#ifndef fts5YYNOERRORRECOVERY\nstatic void fts5yy_parse_failed(\n  fts5yyParser *fts5yypParser           /* The parser */\n){\n  sqlite3Fts5ParserARG_FETCH\n  sqlite3Fts5ParserCTX_FETCH\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    fprintf(fts5yyTraceFILE,\"%sFail!\\n\",fts5yyTracePrompt);\n  }\n#endif\n  while( fts5yypParser->fts5yytos>fts5yypParser->fts5yystack ) fts5yy_pop_parser_stack(fts5yypParser);\n  /* Here code is inserted which will be executed whenever the\n  ** parser fails */\n/************ Begin %parse_failure code ***************************************/\n/************ End %parse_failure code *****************************************/\n  sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3Fts5ParserCTX_STORE\n}\n#endif /* fts5YYNOERRORRECOVERY */\n\n/*\n** The following code executes when a syntax error first occurs.\n*/\nstatic void fts5yy_syntax_error(\n  fts5yyParser *fts5yypParser,           /* The parser */\n  int fts5yymajor,                   /* The major type of the error token */\n  sqlite3Fts5ParserFTS5TOKENTYPE fts5yyminor         /* The minor type of the error token */\n){\n  sqlite3Fts5ParserARG_FETCH\n  sqlite3Fts5ParserCTX_FETCH\n#define FTS5TOKEN fts5yyminor\n/************ Begin %syntax_error code ****************************************/\n\n  UNUSED_PARAM(fts5yymajor); /* Silence a compiler warning */\n  sqlite3Fts5ParseError(\n    pParse, \"fts5: syntax error near \\\"%.*s\\\"\",FTS5TOKEN.n,FTS5TOKEN.p\n  );\n/************ End %syntax_error code ******************************************/\n  sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3Fts5ParserCTX_STORE\n}\n\n/*\n** The following is executed when the parser accepts\n*/\nstatic void fts5yy_accept(\n  fts5yyParser *fts5yypParser           /* The parser */\n){\n  sqlite3Fts5ParserARG_FETCH\n  sqlite3Fts5ParserCTX_FETCH\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    fprintf(fts5yyTraceFILE,\"%sAccept!\\n\",fts5yyTracePrompt);\n  }\n#endif\n#ifndef fts5YYNOERRORRECOVERY\n  fts5yypParser->fts5yyerrcnt = -1;\n#endif\n  assert( fts5yypParser->fts5yytos==fts5yypParser->fts5yystack );\n  /* Here code is inserted which will be executed whenever the\n  ** parser accepts */\n/*********** Begin %parse_accept code *****************************************/\n/*********** End %parse_accept code *******************************************/\n  sqlite3Fts5ParserARG_STORE /* Suppress warning about unused %extra_argument variable */\n  sqlite3Fts5ParserCTX_STORE\n}\n\n/* The main parser program.\n** The first argument is a pointer to a structure obtained from\n** \"sqlite3Fts5ParserAlloc\" which describes the current state of the parser.\n** The second argument is the major token number.  The third is\n** the minor token.  The fourth optional argument is whatever the\n** user wants (and specified in the grammar) and is available for\n** use by the action routines.\n**\n** Inputs:\n** <ul>\n** <li> A pointer to the parser (an opaque structure.)\n** <li> The major token number.\n** <li> The minor token number.\n** <li> An option argument of a grammar-specified type.\n** </ul>\n**\n** Outputs:\n** None.\n*/\nstatic void sqlite3Fts5Parser(\n  void *fts5yyp,                   /* The parser */\n  int fts5yymajor,                 /* The major token code number */\n  sqlite3Fts5ParserFTS5TOKENTYPE fts5yyminor       /* The value for the token */\n  sqlite3Fts5ParserARG_PDECL               /* Optional %extra_argument parameter */\n){\n  fts5YYMINORTYPE fts5yyminorunion;\n  fts5YYACTIONTYPE fts5yyact;   /* The parser action. */\n#if !defined(fts5YYERRORSYMBOL) && !defined(fts5YYNOERRORRECOVERY)\n  int fts5yyendofinput;     /* True if we are at the end of input */\n#endif\n#ifdef fts5YYERRORSYMBOL\n  int fts5yyerrorhit = 0;   /* True if fts5yymajor has invoked an error */\n#endif\n  fts5yyParser *fts5yypParser = (fts5yyParser*)fts5yyp;  /* The parser */\n  sqlite3Fts5ParserCTX_FETCH\n  sqlite3Fts5ParserARG_STORE\n\n  assert( fts5yypParser->fts5yytos!=0 );\n#if !defined(fts5YYERRORSYMBOL) && !defined(fts5YYNOERRORRECOVERY)\n  fts5yyendofinput = (fts5yymajor==0);\n#endif\n\n  fts5yyact = fts5yypParser->fts5yytos->stateno;\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    if( fts5yyact < fts5YY_MIN_REDUCE ){\n      fprintf(fts5yyTraceFILE,\"%sInput '%s' in state %d\\n\",\n              fts5yyTracePrompt,fts5yyTokenName[fts5yymajor],fts5yyact);\n    }else{\n      fprintf(fts5yyTraceFILE,\"%sInput '%s' with pending reduce %d\\n\",\n              fts5yyTracePrompt,fts5yyTokenName[fts5yymajor],fts5yyact-fts5YY_MIN_REDUCE);\n    }\n  }\n#endif\n\n  while(1){ /* Exit by \"break\" */\n    assert( fts5yypParser->fts5yytos>=fts5yypParser->fts5yystack );\n    assert( fts5yyact==fts5yypParser->fts5yytos->stateno );\n    fts5yyact = fts5yy_find_shift_action((fts5YYCODETYPE)fts5yymajor,fts5yyact);\n    if( fts5yyact >= fts5YY_MIN_REDUCE ){\n      unsigned int fts5yyruleno = fts5yyact - fts5YY_MIN_REDUCE; /* Reduce by this rule */\n#ifndef NDEBUG\n      assert( fts5yyruleno<(int)(sizeof(fts5yyRuleName)/sizeof(fts5yyRuleName[0])) );\n      if( fts5yyTraceFILE ){\n        int fts5yysize = fts5yyRuleInfoNRhs[fts5yyruleno];\n        if( fts5yysize ){\n          fprintf(fts5yyTraceFILE, \"%sReduce %d [%s]%s, pop back to state %d.\\n\",\n            fts5yyTracePrompt,\n            fts5yyruleno, fts5yyRuleName[fts5yyruleno],\n            fts5yyruleno<fts5YYNRULE_WITH_ACTION ? \"\" : \" without external action\",\n            fts5yypParser->fts5yytos[fts5yysize].stateno);\n        }else{\n          fprintf(fts5yyTraceFILE, \"%sReduce %d [%s]%s.\\n\",\n            fts5yyTracePrompt, fts5yyruleno, fts5yyRuleName[fts5yyruleno],\n            fts5yyruleno<fts5YYNRULE_WITH_ACTION ? \"\" : \" without external action\");\n        }\n      }\n#endif /* NDEBUG */\n\n      /* Check that the stack is large enough to grow by a single entry\n      ** if the RHS of the rule is empty.  This ensures that there is room\n      ** enough on the stack to push the LHS value */\n      if( fts5yyRuleInfoNRhs[fts5yyruleno]==0 ){\n#ifdef fts5YYTRACKMAXSTACKDEPTH\n        if( (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack)>fts5yypParser->fts5yyhwm ){\n          fts5yypParser->fts5yyhwm++;\n          assert( fts5yypParser->fts5yyhwm ==\n                  (int)(fts5yypParser->fts5yytos - fts5yypParser->fts5yystack));\n        }\n#endif\n        if( fts5yypParser->fts5yytos>=fts5yypParser->fts5yystackEnd ){\n          if( fts5yyGrowStack(fts5yypParser) ){\n            fts5yyStackOverflow(fts5yypParser);\n            break;\n          }\n        }\n      }\n      fts5yyact = fts5yy_reduce(fts5yypParser,fts5yyruleno,fts5yymajor,fts5yyminor sqlite3Fts5ParserCTX_PARAM);\n    }else if( fts5yyact <= fts5YY_MAX_SHIFTREDUCE ){\n      fts5yy_shift(fts5yypParser,fts5yyact,(fts5YYCODETYPE)fts5yymajor,fts5yyminor);\n#ifndef fts5YYNOERRORRECOVERY\n      fts5yypParser->fts5yyerrcnt--;\n#endif\n      break;\n    }else if( fts5yyact==fts5YY_ACCEPT_ACTION ){\n      fts5yypParser->fts5yytos--;\n      fts5yy_accept(fts5yypParser);\n      return;\n    }else{\n      assert( fts5yyact == fts5YY_ERROR_ACTION );\n      fts5yyminorunion.fts5yy0 = fts5yyminor;\n#ifdef fts5YYERRORSYMBOL\n      int fts5yymx;\n#endif\n#ifndef NDEBUG\n      if( fts5yyTraceFILE ){\n        fprintf(fts5yyTraceFILE,\"%sSyntax Error!\\n\",fts5yyTracePrompt);\n      }\n#endif\n#ifdef fts5YYERRORSYMBOL\n      /* A syntax error has occurred.\n      ** The response to an error depends upon whether or not the\n      ** grammar defines an error token \"ERROR\".\n      **\n      ** This is what we do if the grammar does define ERROR:\n      **\n      **  * Call the %syntax_error function.\n      **\n      **  * Begin popping the stack until we enter a state where\n      **    it is legal to shift the error symbol, then shift\n      **    the error symbol.\n      **\n      **  * Set the error count to three.\n      **\n      **  * Begin accepting and shifting new tokens.  No new error\n      **    processing will occur until three tokens have been\n      **    shifted successfully.\n      **\n      */\n      if( fts5yypParser->fts5yyerrcnt<0 ){\n        fts5yy_syntax_error(fts5yypParser,fts5yymajor,fts5yyminor);\n      }\n      fts5yymx = fts5yypParser->fts5yytos->major;\n      if( fts5yymx==fts5YYERRORSYMBOL || fts5yyerrorhit ){\n#ifndef NDEBUG\n        if( fts5yyTraceFILE ){\n          fprintf(fts5yyTraceFILE,\"%sDiscard input token %s\\n\",\n             fts5yyTracePrompt,fts5yyTokenName[fts5yymajor]);\n        }\n#endif\n        fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);\n        fts5yymajor = fts5YYNOCODE;\n      }else{\n        while( fts5yypParser->fts5yytos > fts5yypParser->fts5yystack ){\n          fts5yyact = fts5yy_find_reduce_action(fts5yypParser->fts5yytos->stateno,\n                                        fts5YYERRORSYMBOL);\n          if( fts5yyact<=fts5YY_MAX_SHIFTREDUCE ) break;\n          fts5yy_pop_parser_stack(fts5yypParser);\n        }\n        if( fts5yypParser->fts5yytos <= fts5yypParser->fts5yystack || fts5yymajor==0 ){\n          fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);\n          fts5yy_parse_failed(fts5yypParser);\n#ifndef fts5YYNOERRORRECOVERY\n          fts5yypParser->fts5yyerrcnt = -1;\n#endif\n          fts5yymajor = fts5YYNOCODE;\n        }else if( fts5yymx!=fts5YYERRORSYMBOL ){\n          fts5yy_shift(fts5yypParser,fts5yyact,fts5YYERRORSYMBOL,fts5yyminor);\n        }\n      }\n      fts5yypParser->fts5yyerrcnt = 3;\n      fts5yyerrorhit = 1;\n      if( fts5yymajor==fts5YYNOCODE ) break;\n      fts5yyact = fts5yypParser->fts5yytos->stateno;\n#elif defined(fts5YYNOERRORRECOVERY)\n      /* If the fts5YYNOERRORRECOVERY macro is defined, then do not attempt to\n      ** do any kind of error recovery.  Instead, simply invoke the syntax\n      ** error routine and continue going as if nothing had happened.\n      **\n      ** Applications can set this macro (for example inside %include) if\n      ** they intend to abandon the parse upon the first syntax error seen.\n      */\n      fts5yy_syntax_error(fts5yypParser,fts5yymajor, fts5yyminor);\n      fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);\n      break;\n#else  /* fts5YYERRORSYMBOL is not defined */\n      /* This is what we do if the grammar does not define ERROR:\n      **\n      **  * Report an error message, and throw away the input token.\n      **\n      **  * If the input token is $, then fail the parse.\n      **\n      ** As before, subsequent error messages are suppressed until\n      ** three input tokens have been successfully shifted.\n      */\n      if( fts5yypParser->fts5yyerrcnt<=0 ){\n        fts5yy_syntax_error(fts5yypParser,fts5yymajor, fts5yyminor);\n      }\n      fts5yypParser->fts5yyerrcnt = 3;\n      fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);\n      if( fts5yyendofinput ){\n        fts5yy_parse_failed(fts5yypParser);\n#ifndef fts5YYNOERRORRECOVERY\n        fts5yypParser->fts5yyerrcnt = -1;\n#endif\n      }\n      break;\n#endif\n    }\n  }\n#ifndef NDEBUG\n  if( fts5yyTraceFILE ){\n    fts5yyStackEntry *i;\n    char cDiv = '[';\n    fprintf(fts5yyTraceFILE,\"%sReturn. Stack=\",fts5yyTracePrompt);\n    for(i=&fts5yypParser->fts5yystack[1]; i<=fts5yypParser->fts5yytos; i++){\n      fprintf(fts5yyTraceFILE,\"%c%s\", cDiv, fts5yyTokenName[i->major]);\n      cDiv = ' ';\n    }\n    fprintf(fts5yyTraceFILE,\"]\\n\");\n  }\n#endif\n  return;\n}\n\n/*\n** Return the fallback token corresponding to canonical token iToken, or\n** 0 if iToken has no fallback.\n*/\nstatic int sqlite3Fts5ParserFallback(int iToken){\n#ifdef fts5YYFALLBACK\n  assert( iToken<(int)(sizeof(fts5yyFallback)/sizeof(fts5yyFallback[0])) );\n  return fts5yyFallback[iToken];\n#else\n  (void)iToken;\n  return 0;\n#endif\n}\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n\n/* #include \"fts5Int.h\" */\n#include <math.h>                 /* amalgamator: keep */\n\n/*\n** Object used to iterate through all \"coalesced phrase instances\" in\n** a single column of the current row. If the phrase instances in the\n** column being considered do not overlap, this object simply iterates\n** through them. Or, if they do overlap (share one or more tokens in\n** common), each set of overlapping instances is treated as a single\n** match. See documentation for the highlight() auxiliary function for\n** details.\n**\n** Usage is:\n**\n**   for(rc = fts5CInstIterNext(pApi, pFts, iCol, &iter);\n**      (rc==SQLITE_OK && 0==fts5CInstIterEof(&iter);\n**      rc = fts5CInstIterNext(&iter)\n**   ){\n**     printf(\"instance starts at %d, ends at %d\\n\", iter.iStart, iter.iEnd);\n**   }\n**\n*/\ntypedef struct CInstIter CInstIter;\nstruct CInstIter {\n  const Fts5ExtensionApi *pApi;   /* API offered by current FTS version */\n  Fts5Context *pFts;              /* First arg to pass to pApi functions */\n  int iCol;                       /* Column to search */\n  int iInst;                      /* Next phrase instance index */\n  int nInst;                      /* Total number of phrase instances */\n\n  /* Output variables */\n  int iStart;                     /* First token in coalesced phrase instance */\n  int iEnd;                       /* Last token in coalesced phrase instance */\n};\n\n/*\n** Advance the iterator to the next coalesced phrase instance. Return\n** an SQLite error code if an error occurs, or SQLITE_OK otherwise.\n*/\nstatic int fts5CInstIterNext(CInstIter *pIter){\n  int rc = SQLITE_OK;\n  pIter->iStart = -1;\n  pIter->iEnd = -1;\n\n  while( rc==SQLITE_OK && pIter->iInst<pIter->nInst ){\n    int ip; int ic; int io;\n    rc = pIter->pApi->xInst(pIter->pFts, pIter->iInst, &ip, &ic, &io);\n    if( rc==SQLITE_OK ){\n      if( ic==pIter->iCol ){\n        int iEnd = io - 1 + pIter->pApi->xPhraseSize(pIter->pFts, ip);\n        if( pIter->iStart<0 ){\n          pIter->iStart = io;\n          pIter->iEnd = iEnd;\n        }else if( io<=pIter->iEnd ){\n          if( iEnd>pIter->iEnd ) pIter->iEnd = iEnd;\n        }else{\n          break;\n        }\n      }\n      pIter->iInst++;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Initialize the iterator object indicated by the final parameter to\n** iterate through coalesced phrase instances in column iCol.\n*/\nstatic int fts5CInstIterInit(\n  const Fts5ExtensionApi *pApi,\n  Fts5Context *pFts,\n  int iCol,\n  CInstIter *pIter\n){\n  int rc;\n\n  memset(pIter, 0, sizeof(CInstIter));\n  pIter->pApi = pApi;\n  pIter->pFts = pFts;\n  pIter->iCol = iCol;\n  rc = pApi->xInstCount(pFts, &pIter->nInst);\n\n  if( rc==SQLITE_OK ){\n    rc = fts5CInstIterNext(pIter);\n  }\n\n  return rc;\n}\n\n\n\n/*************************************************************************\n** Start of highlight() implementation.\n*/\ntypedef struct HighlightContext HighlightContext;\nstruct HighlightContext {\n  /* Constant parameters to fts5HighlightCb() */\n  int iRangeStart;                /* First token to include */\n  int iRangeEnd;                  /* If non-zero, last token to include */\n  const char *zOpen;              /* Opening highlight */\n  const char *zClose;             /* Closing highlight */\n  const char *zIn;                /* Input text */\n  int nIn;                        /* Size of input text in bytes */\n\n  /* Variables modified by fts5HighlightCb() */\n  CInstIter iter;                 /* Coalesced Instance Iterator */\n  int iPos;                       /* Current token offset in zIn[] */\n  int iOff;                       /* Have copied up to this offset in zIn[] */\n  int bOpen;                      /* True if highlight is open */\n  char *zOut;                     /* Output value */\n};\n\n/*\n** Append text to the HighlightContext output string - p->zOut. Argument\n** z points to a buffer containing n bytes of text to append. If n is\n** negative, everything up until the first '\\0' is appended to the output.\n**\n** If *pRc is set to any value other than SQLITE_OK when this function is\n** called, it is a no-op. If an error (i.e. an OOM condition) is encountered,\n** *pRc is set to an error code before returning.\n*/\nstatic void fts5HighlightAppend(\n  int *pRc,\n  HighlightContext *p,\n  const char *z, int n\n){\n  if( *pRc==SQLITE_OK && z ){\n    if( n<0 ) n = (int)strlen(z);\n    p->zOut = sqlite3_mprintf(\"%z%.*s\", p->zOut, n, z);\n    if( p->zOut==0 ) *pRc = SQLITE_NOMEM;\n  }\n}\n\n/*\n** Tokenizer callback used by implementation of highlight() function.\n*/\nstatic int fts5HighlightCb(\n  void *pContext,                 /* Pointer to HighlightContext object */\n  int tflags,                     /* Mask of FTS5_TOKEN_* flags */\n  const char *pToken,             /* Buffer containing token */\n  int nToken,                     /* Size of token in bytes */\n  int iStartOff,                  /* Start byte offset of token */\n  int iEndOff                     /* End byte offset of token */\n){\n  HighlightContext *p = (HighlightContext*)pContext;\n  int rc = SQLITE_OK;\n  int iPos;\n\n  UNUSED_PARAM2(pToken, nToken);\n\n  if( tflags & FTS5_TOKEN_COLOCATED ) return SQLITE_OK;\n  iPos = p->iPos++;\n\n  if( p->iRangeEnd>=0 ){\n    if( iPos<p->iRangeStart || iPos>p->iRangeEnd ) return SQLITE_OK;\n    if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff;\n  }\n\n  /* If the parenthesis is open, and this token is not part of the current\n  ** phrase, and the starting byte offset of this token is past the point\n  ** that has currently been copied into the output buffer, close the\n  ** parenthesis. */\n  if( p->bOpen\n   && (iPos<=p->iter.iStart || p->iter.iStart<0)\n   && iStartOff>p->iOff\n  ){\n    fts5HighlightAppend(&rc, p, p->zClose, -1);\n    p->bOpen = 0;\n  }\n\n  /* If this is the start of a new phrase, and the highlight is not open:\n  **\n  **   * copy text from the input up to the start of the phrase, and\n  **   * open the highlight.\n  */\n  if( iPos==p->iter.iStart && p->bOpen==0 ){\n    fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iStartOff - p->iOff);\n    fts5HighlightAppend(&rc, p, p->zOpen, -1);\n    p->iOff = iStartOff;\n    p->bOpen = 1;\n  }\n\n  if( iPos==p->iter.iEnd ){\n    if( p->bOpen==0 ){\n      assert( p->iRangeEnd>=0 );\n      fts5HighlightAppend(&rc, p, p->zOpen, -1);\n      p->bOpen = 1;\n    }\n    fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);\n    p->iOff = iEndOff;\n\n    if( rc==SQLITE_OK ){\n      rc = fts5CInstIterNext(&p->iter);\n    }\n  }\n\n  if( iPos==p->iRangeEnd ){\n    if( p->bOpen ){\n      if( p->iter.iStart>=0 && iPos>=p->iter.iStart ){\n        fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);\n        p->iOff = iEndOff;\n      }\n      fts5HighlightAppend(&rc, p, p->zClose, -1);\n      p->bOpen = 0;\n    }\n    fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);\n    p->iOff = iEndOff;\n  }\n\n  return rc;\n}\n\n\n/*\n** Implementation of highlight() function.\n*/\nstatic void fts5HighlightFunction(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n){\n  HighlightContext ctx;\n  int rc;\n  int iCol;\n\n  if( nVal!=3 ){\n    const char *zErr = \"wrong number of arguments to function highlight()\";\n    sqlite3_result_error(pCtx, zErr, -1);\n    return;\n  }\n\n  iCol = sqlite3_value_int(apVal[0]);\n  memset(&ctx, 0, sizeof(HighlightContext));\n  ctx.zOpen = (const char*)sqlite3_value_text(apVal[1]);\n  ctx.zClose = (const char*)sqlite3_value_text(apVal[2]);\n  ctx.iRangeEnd = -1;\n  rc = pApi->xColumnText(pFts, iCol, &ctx.zIn, &ctx.nIn);\n  if( rc==SQLITE_RANGE ){\n    sqlite3_result_text(pCtx, \"\", -1, SQLITE_STATIC);\n    rc = SQLITE_OK;\n  }else if( ctx.zIn ){\n    const char *pLoc = 0;         /* Locale of column iCol */\n    int nLoc = 0;                 /* Size of pLoc in bytes */\n    if( rc==SQLITE_OK ){\n      rc = fts5CInstIterInit(pApi, pFts, iCol, &ctx.iter);\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = pApi->xColumnLocale(pFts, iCol, &pLoc, &nLoc);\n    }\n    if( rc==SQLITE_OK ){\n      rc = pApi->xTokenize_v2(\n          pFts, ctx.zIn, ctx.nIn, pLoc, nLoc, (void*)&ctx, fts5HighlightCb\n      );\n    }\n    if( ctx.bOpen ){\n      fts5HighlightAppend(&rc, &ctx, ctx.zClose, -1);\n    }\n    fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);\n\n    if( rc==SQLITE_OK ){\n      sqlite3_result_text(pCtx, (const char*)ctx.zOut, -1, SQLITE_TRANSIENT);\n    }\n    sqlite3_free(ctx.zOut);\n  }\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx, rc);\n  }\n}\n/*\n** End of highlight() implementation.\n**************************************************************************/\n\n/*\n** Context object passed to the fts5SentenceFinderCb() function.\n*/\ntypedef struct Fts5SFinder Fts5SFinder;\nstruct Fts5SFinder {\n  int iPos;                       /* Current token position */\n  int nFirstAlloc;                /* Allocated size of aFirst[] */\n  int nFirst;                     /* Number of entries in aFirst[] */\n  int *aFirst;                    /* Array of first token in each sentence */\n  const char *zDoc;               /* Document being tokenized */\n};\n\n/*\n** Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if\n** necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an\n** error occurs.\n*/\nstatic int fts5SentenceFinderAdd(Fts5SFinder *p, int iAdd){\n  if( p->nFirstAlloc==p->nFirst ){\n    int nNew = p->nFirstAlloc ? p->nFirstAlloc*2 : 64;\n    int *aNew;\n\n    aNew = (int*)sqlite3_realloc64(p->aFirst, nNew*sizeof(int));\n    if( aNew==0 ) return SQLITE_NOMEM;\n    p->aFirst = aNew;\n    p->nFirstAlloc = nNew;\n  }\n  p->aFirst[p->nFirst++] = iAdd;\n  return SQLITE_OK;\n}\n\n/*\n** This function is an xTokenize() callback used by the auxiliary snippet()\n** function. Its job is to identify tokens that are the first in a sentence.\n** For each such token, an entry is added to the SFinder.aFirst[] array.\n*/\nstatic int fts5SentenceFinderCb(\n  void *pContext,                 /* Pointer to HighlightContext object */\n  int tflags,                     /* Mask of FTS5_TOKEN_* flags */\n  const char *pToken,             /* Buffer containing token */\n  int nToken,                     /* Size of token in bytes */\n  int iStartOff,                  /* Start offset of token */\n  int iEndOff                     /* End offset of token */\n){\n  int rc = SQLITE_OK;\n\n  UNUSED_PARAM2(pToken, nToken);\n  UNUSED_PARAM(iEndOff);\n\n  if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){\n    Fts5SFinder *p = (Fts5SFinder*)pContext;\n    if( p->iPos>0 ){\n      int i;\n      char c = 0;\n      for(i=iStartOff-1; i>=0; i--){\n        c = p->zDoc[i];\n        if( c!=' ' && c!='\\t' && c!='\\n' && c!='\\r' ) break;\n      }\n      if( i!=iStartOff-1 && (c=='.' || c==':') ){\n        rc = fts5SentenceFinderAdd(p, p->iPos);\n      }\n    }else{\n      rc = fts5SentenceFinderAdd(p, 0);\n    }\n    p->iPos++;\n  }\n  return rc;\n}\n\nstatic int fts5SnippetScore(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  int nDocsize,                   /* Size of column in tokens */\n  unsigned char *aSeen,           /* Array with one element per query phrase */\n  int iCol,                       /* Column to score */\n  int iPos,                       /* Starting offset to score */\n  int nToken,                     /* Max tokens per snippet */\n  int *pnScore,                   /* OUT: Score */\n  int *piPos                      /* OUT: Adjusted offset */\n){\n  int rc;\n  int i;\n  int ip = 0;\n  int ic = 0;\n  int iOff = 0;\n  int iFirst = -1;\n  int nInst;\n  int nScore = 0;\n  int iLast = 0;\n  sqlite3_int64 iEnd = (sqlite3_int64)iPos + nToken;\n\n  rc = pApi->xInstCount(pFts, &nInst);\n  for(i=0; i<nInst && rc==SQLITE_OK; i++){\n    rc = pApi->xInst(pFts, i, &ip, &ic, &iOff);\n    if( rc==SQLITE_OK && ic==iCol && iOff>=iPos && iOff<iEnd ){\n      nScore += (aSeen[ip] ? 1 : 1000);\n      aSeen[ip] = 1;\n      if( iFirst<0 ) iFirst = iOff;\n      iLast = iOff + pApi->xPhraseSize(pFts, ip);\n    }\n  }\n\n  *pnScore = nScore;\n  if( piPos ){\n    sqlite3_int64 iAdj = iFirst - (nToken - (iLast-iFirst)) / 2;\n    if( (iAdj+nToken)>nDocsize ) iAdj = nDocsize - nToken;\n    if( iAdj<0 ) iAdj = 0;\n    *piPos = (int)iAdj;\n  }\n\n  return rc;\n}\n\n/*\n** Return the value in pVal interpreted as utf-8 text. Except, if pVal\n** contains a NULL value, return a pointer to a static string zero\n** bytes in length instead of a NULL pointer.\n*/\nstatic const char *fts5ValueToText(sqlite3_value *pVal){\n  const char *zRet = (const char*)sqlite3_value_text(pVal);\n  return zRet ? zRet : \"\";\n}\n\n/*\n** Implementation of snippet() function.\n*/\nstatic void fts5SnippetFunction(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n){\n  HighlightContext ctx;\n  int rc = SQLITE_OK;             /* Return code */\n  int iCol;                       /* 1st argument to snippet() */\n  const char *zEllips;            /* 4th argument to snippet() */\n  int nToken;                     /* 5th argument to snippet() */\n  int nInst = 0;                  /* Number of instance matches this row */\n  int i;                          /* Used to iterate through instances */\n  int nPhrase;                    /* Number of phrases in query */\n  unsigned char *aSeen;           /* Array of \"seen instance\" flags */\n  int iBestCol;                   /* Column containing best snippet */\n  int iBestStart = 0;             /* First token of best snippet */\n  int nBestScore = 0;             /* Score of best snippet */\n  int nColSize = 0;               /* Total size of iBestCol in tokens */\n  Fts5SFinder sFinder;            /* Used to find the beginnings of sentences */\n  int nCol;\n\n  if( nVal!=5 ){\n    const char *zErr = \"wrong number of arguments to function snippet()\";\n    sqlite3_result_error(pCtx, zErr, -1);\n    return;\n  }\n\n  nCol = pApi->xColumnCount(pFts);\n  memset(&ctx, 0, sizeof(HighlightContext));\n  iCol = sqlite3_value_int(apVal[0]);\n  ctx.zOpen = fts5ValueToText(apVal[1]);\n  ctx.zClose = fts5ValueToText(apVal[2]);\n  ctx.iRangeEnd = -1;\n  zEllips = fts5ValueToText(apVal[3]);\n  nToken = sqlite3_value_int(apVal[4]);\n\n  iBestCol = (iCol>=0 ? iCol : 0);\n  nPhrase = pApi->xPhraseCount(pFts);\n  aSeen = sqlite3_malloc(nPhrase);\n  if( aSeen==0 ){\n    rc = SQLITE_NOMEM;\n  }\n  if( rc==SQLITE_OK ){\n    rc = pApi->xInstCount(pFts, &nInst);\n  }\n\n  memset(&sFinder, 0, sizeof(Fts5SFinder));\n  for(i=0; i<nCol; i++){\n    if( iCol<0 || iCol==i ){\n      const char *pLoc = 0;       /* Locale of column iCol */\n      int nLoc = 0;               /* Size of pLoc in bytes */\n      int nDoc;\n      int nDocsize;\n      int ii;\n      sFinder.iPos = 0;\n      sFinder.nFirst = 0;\n      rc = pApi->xColumnText(pFts, i, &sFinder.zDoc, &nDoc);\n      if( rc!=SQLITE_OK ) break;\n      rc = pApi->xColumnLocale(pFts, i, &pLoc, &nLoc);\n      if( rc!=SQLITE_OK ) break;\n      rc = pApi->xTokenize_v2(pFts,\n          sFinder.zDoc, nDoc, pLoc, nLoc, (void*)&sFinder, fts5SentenceFinderCb\n      );\n      if( rc!=SQLITE_OK ) break;\n      rc = pApi->xColumnSize(pFts, i, &nDocsize);\n      if( rc!=SQLITE_OK ) break;\n\n      for(ii=0; rc==SQLITE_OK && ii<nInst; ii++){\n        int ip, ic, io;\n        int iAdj;\n        int nScore;\n        int jj;\n\n        rc = pApi->xInst(pFts, ii, &ip, &ic, &io);\n        if( ic!=i ) continue;\n        if( io>nDocsize ) rc = FTS5_CORRUPT;\n        if( rc!=SQLITE_OK ) continue;\n        memset(aSeen, 0, nPhrase);\n        rc = fts5SnippetScore(pApi, pFts, nDocsize, aSeen, i,\n            io, nToken, &nScore, &iAdj\n        );\n        if( rc==SQLITE_OK && nScore>nBestScore ){\n          nBestScore = nScore;\n          iBestCol = i;\n          iBestStart = iAdj;\n          nColSize = nDocsize;\n        }\n\n        if( rc==SQLITE_OK && sFinder.nFirst && nDocsize>nToken ){\n          for(jj=0; jj<(sFinder.nFirst-1); jj++){\n            if( sFinder.aFirst[jj+1]>io ) break;\n          }\n\n          if( sFinder.aFirst[jj]<io ){\n            memset(aSeen, 0, nPhrase);\n            rc = fts5SnippetScore(pApi, pFts, nDocsize, aSeen, i,\n              sFinder.aFirst[jj], nToken, &nScore, 0\n            );\n\n            nScore += (sFinder.aFirst[jj]==0 ? 120 : 100);\n            if( rc==SQLITE_OK && nScore>nBestScore ){\n              nBestScore = nScore;\n              iBestCol = i;\n              iBestStart = sFinder.aFirst[jj];\n              nColSize = nDocsize;\n            }\n          }\n        }\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = pApi->xColumnText(pFts, iBestCol, &ctx.zIn, &ctx.nIn);\n  }\n  if( rc==SQLITE_OK && nColSize==0 ){\n    rc = pApi->xColumnSize(pFts, iBestCol, &nColSize);\n  }\n  if( ctx.zIn ){\n    const char *pLoc = 0;         /* Locale of column iBestCol */\n    int nLoc = 0;                 /* Bytes in pLoc */\n\n    if( rc==SQLITE_OK ){\n      rc = fts5CInstIterInit(pApi, pFts, iBestCol, &ctx.iter);\n    }\n\n    ctx.iRangeStart = iBestStart;\n    ctx.iRangeEnd = iBestStart + nToken - 1;\n\n    if( iBestStart>0 ){\n      fts5HighlightAppend(&rc, &ctx, zEllips, -1);\n    }\n\n    /* Advance iterator ctx.iter so that it points to the first coalesced\n    ** phrase instance at or following position iBestStart. */\n    while( ctx.iter.iStart>=0 && ctx.iter.iStart<iBestStart && rc==SQLITE_OK ){\n      rc = fts5CInstIterNext(&ctx.iter);\n    }\n\n    if( rc==SQLITE_OK ){\n      rc = pApi->xColumnLocale(pFts, iBestCol, &pLoc, &nLoc);\n    }\n    if( rc==SQLITE_OK ){\n      rc = pApi->xTokenize_v2(\n          pFts, ctx.zIn, ctx.nIn, pLoc, nLoc, (void*)&ctx,fts5HighlightCb\n      );\n    }\n    if( ctx.bOpen ){\n      fts5HighlightAppend(&rc, &ctx, ctx.zClose, -1);\n    }\n    if( ctx.iRangeEnd>=(nColSize-1) ){\n      fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);\n    }else{\n      fts5HighlightAppend(&rc, &ctx, zEllips, -1);\n    }\n  }\n  if( rc==SQLITE_OK ){\n    sqlite3_result_text(pCtx, (const char*)ctx.zOut, -1, SQLITE_TRANSIENT);\n  }else{\n    sqlite3_result_error_code(pCtx, rc);\n  }\n  sqlite3_free(ctx.zOut);\n  sqlite3_free(aSeen);\n  sqlite3_free(sFinder.aFirst);\n}\n\n/************************************************************************/\n\n/*\n** The first time the bm25() function is called for a query, an instance\n** of the following structure is allocated and populated.\n*/\ntypedef struct Fts5Bm25Data Fts5Bm25Data;\nstruct Fts5Bm25Data {\n  int nPhrase;                    /* Number of phrases in query */\n  double avgdl;                   /* Average number of tokens in each row */\n  double *aIDF;                   /* IDF for each phrase */\n  double *aFreq;                  /* Array used to calculate phrase freq. */\n};\n\n/*\n** Callback used by fts5Bm25GetData() to count the number of rows in the\n** table matched by each individual phrase within the query.\n*/\nstatic int fts5CountCb(\n  const Fts5ExtensionApi *pApi,\n  Fts5Context *pFts,\n  void *pUserData                 /* Pointer to sqlite3_int64 variable */\n){\n  sqlite3_int64 *pn = (sqlite3_int64*)pUserData;\n  UNUSED_PARAM2(pApi, pFts);\n  (*pn)++;\n  return SQLITE_OK;\n}\n\n/*\n** Set *ppData to point to the Fts5Bm25Data object for the current query.\n** If the object has not already been allocated, allocate and populate it\n** now.\n*/\nstatic int fts5Bm25GetData(\n  const Fts5ExtensionApi *pApi,\n  Fts5Context *pFts,\n  Fts5Bm25Data **ppData           /* OUT: bm25-data object for this query */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5Bm25Data *p;                /* Object to return */\n\n  p = (Fts5Bm25Data*)pApi->xGetAuxdata(pFts, 0);\n  if( p==0 ){\n    int nPhrase;                  /* Number of phrases in query */\n    sqlite3_int64 nRow = 0;       /* Number of rows in table */\n    sqlite3_int64 nToken = 0;     /* Number of tokens in table */\n    sqlite3_int64 nByte;          /* Bytes of space to allocate */\n    int i;\n\n    /* Allocate the Fts5Bm25Data object */\n    nPhrase = pApi->xPhraseCount(pFts);\n    nByte = sizeof(Fts5Bm25Data) + nPhrase*2*sizeof(double);\n    p = (Fts5Bm25Data*)sqlite3_malloc64(nByte);\n    if( p==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(p, 0, (size_t)nByte);\n      p->nPhrase = nPhrase;\n      p->aIDF = (double*)&p[1];\n      p->aFreq = &p->aIDF[nPhrase];\n    }\n\n    /* Calculate the average document length for this FTS5 table */\n    if( rc==SQLITE_OK ) rc = pApi->xRowCount(pFts, &nRow);\n    assert( rc!=SQLITE_OK || nRow>0 );\n    if( rc==SQLITE_OK ) rc = pApi->xColumnTotalSize(pFts, -1, &nToken);\n    if( rc==SQLITE_OK ) p->avgdl = (double)nToken  / (double)nRow;\n\n    /* Calculate an IDF for each phrase in the query */\n    for(i=0; rc==SQLITE_OK && i<nPhrase; i++){\n      sqlite3_int64 nHit = 0;\n      rc = pApi->xQueryPhrase(pFts, i, (void*)&nHit, fts5CountCb);\n      if( rc==SQLITE_OK ){\n        /* Calculate the IDF (Inverse Document Frequency) for phrase i.\n        ** This is done using the standard BM25 formula as found on wikipedia:\n        **\n        **   IDF = log( (N - nHit + 0.5) / (nHit + 0.5) )\n        **\n        ** where \"N\" is the total number of documents in the set and nHit\n        ** is the number that contain at least one instance of the phrase\n        ** under consideration.\n        **\n        ** The problem with this is that if (N < 2*nHit), the IDF is\n        ** negative. Which is undesirable. So the minimum allowable IDF is\n        ** (1e-6) - roughly the same as a term that appears in just over\n        ** half of set of 5,000,000 documents.  */\n        double idf = log( (nRow - nHit + 0.5) / (nHit + 0.5) );\n        if( idf<=0.0 ) idf = 1e-6;\n        p->aIDF[i] = idf;\n      }\n    }\n\n    if( rc!=SQLITE_OK ){\n      sqlite3_free(p);\n    }else{\n      rc = pApi->xSetAuxdata(pFts, p, sqlite3_free);\n    }\n    if( rc!=SQLITE_OK ) p = 0;\n  }\n  *ppData = p;\n  return rc;\n}\n\n/*\n** Implementation of bm25() function.\n*/\nstatic void fts5Bm25Function(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n){\n  const double k1 = 1.2;          /* Constant \"k1\" from BM25 formula */\n  const double b = 0.75;          /* Constant \"b\" from BM25 formula */\n  int rc;                         /* Error code */\n  double score = 0.0;             /* SQL function return value */\n  Fts5Bm25Data *pData;            /* Values allocated/calculated once only */\n  int i;                          /* Iterator variable */\n  int nInst = 0;                  /* Value returned by xInstCount() */\n  double D = 0.0;                 /* Total number of tokens in row */\n  double *aFreq = 0;              /* Array of phrase freq. for current row */\n\n  /* Calculate the phrase frequency (symbol \"f(qi,D)\" in the documentation)\n  ** for each phrase in the query for the current row. */\n  rc = fts5Bm25GetData(pApi, pFts, &pData);\n  if( rc==SQLITE_OK ){\n    aFreq = pData->aFreq;\n    memset(aFreq, 0, sizeof(double) * pData->nPhrase);\n    rc = pApi->xInstCount(pFts, &nInst);\n  }\n  for(i=0; rc==SQLITE_OK && i<nInst; i++){\n    int ip; int ic; int io;\n    rc = pApi->xInst(pFts, i, &ip, &ic, &io);\n    if( rc==SQLITE_OK ){\n      double w = (nVal > ic) ? sqlite3_value_double(apVal[ic]) : 1.0;\n      aFreq[ip] += w;\n    }\n  }\n\n  /* Figure out the total size of the current row in tokens. */\n  if( rc==SQLITE_OK ){\n    int nTok;\n    rc = pApi->xColumnSize(pFts, -1, &nTok);\n    D = (double)nTok;\n  }\n\n  /* Determine and return the BM25 score for the current row. Or, if an\n  ** error has occurred, throw an exception. */\n  if( rc==SQLITE_OK ){\n    for(i=0; i<pData->nPhrase; i++){\n      score += pData->aIDF[i] * (\n          ( aFreq[i] * (k1 + 1.0) ) /\n          ( aFreq[i] + k1 * (1 - b + b * D / pData->avgdl) )\n      );\n    }\n    sqlite3_result_double(pCtx, -1.0 * score);\n  }else{\n    sqlite3_result_error_code(pCtx, rc);\n  }\n}\n\n/*\n** Implementation of fts5_get_locale() function.\n*/\nstatic void fts5GetLocaleFunction(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n){\n  int iCol = 0;\n  int eType = 0;\n  int rc = SQLITE_OK;\n  const char *zLocale = 0;\n  int nLocale = 0;\n\n  /* xColumnLocale() must be available */\n  assert( pApi->iVersion>=4 );\n\n  if( nVal!=1 ){\n    const char *z = \"wrong number of arguments to function fts5_get_locale()\";\n    sqlite3_result_error(pCtx, z, -1);\n    return;\n  }\n\n  eType = sqlite3_value_numeric_type(apVal[0]);\n  if( eType!=SQLITE_INTEGER ){\n    const char *z = \"non-integer argument passed to function fts5_get_locale()\";\n    sqlite3_result_error(pCtx, z, -1);\n    return;\n  }\n\n  iCol = sqlite3_value_int(apVal[0]);\n  if( iCol<0 || iCol>=pApi->xColumnCount(pFts) ){\n    sqlite3_result_error_code(pCtx, SQLITE_RANGE);\n    return;\n  }\n\n  rc = pApi->xColumnLocale(pFts, iCol, &zLocale, &nLocale);\n  if( rc!=SQLITE_OK ){\n    sqlite3_result_error_code(pCtx, rc);\n    return;\n  }\n\n  sqlite3_result_text(pCtx, zLocale, nLocale, SQLITE_TRANSIENT);\n}\n\nstatic int sqlite3Fts5AuxInit(fts5_api *pApi){\n  struct Builtin {\n    const char *zFunc;            /* Function name (nul-terminated) */\n    void *pUserData;              /* User-data pointer */\n    fts5_extension_function xFunc;/* Callback function */\n    void (*xDestroy)(void*);      /* Destructor function */\n  } aBuiltin [] = {\n    { \"snippet\",         0, fts5SnippetFunction,   0 },\n    { \"highlight\",       0, fts5HighlightFunction, 0 },\n    { \"bm25\",            0, fts5Bm25Function,      0 },\n    { \"fts5_get_locale\", 0, fts5GetLocaleFunction, 0 },\n  };\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* To iterate through builtin functions */\n\n  for(i=0; rc==SQLITE_OK && i<ArraySize(aBuiltin); i++){\n    rc = pApi->xCreateFunction(pApi,\n        aBuiltin[i].zFunc,\n        aBuiltin[i].pUserData,\n        aBuiltin[i].xFunc,\n        aBuiltin[i].xDestroy\n    );\n  }\n\n  return rc;\n}\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n\n\n/* #include \"fts5Int.h\" */\n\nstatic int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){\n  if( (u32)pBuf->nSpace<nByte ){\n    u64 nNew = pBuf->nSpace ? pBuf->nSpace : 64;\n    u8 *pNew;\n    while( nNew<nByte ){\n      nNew = nNew * 2;\n    }\n    pNew = sqlite3_realloc64(pBuf->p, nNew);\n    if( pNew==0 ){\n      *pRc = SQLITE_NOMEM;\n      return 1;\n    }else{\n      pBuf->nSpace = (int)nNew;\n      pBuf->p = pNew;\n    }\n  }\n  return 0;\n}\n\n\n/*\n** Encode value iVal as an SQLite varint and append it to the buffer object\n** pBuf. If an OOM error occurs, set the error code in p.\n*/\nstatic void sqlite3Fts5BufferAppendVarint(int *pRc, Fts5Buffer *pBuf, i64 iVal){\n  if( fts5BufferGrow(pRc, pBuf, 9) ) return;\n  pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iVal);\n}\n\nstatic void sqlite3Fts5Put32(u8 *aBuf, int iVal){\n  aBuf[0] = (iVal>>24) & 0x00FF;\n  aBuf[1] = (iVal>>16) & 0x00FF;\n  aBuf[2] = (iVal>> 8) & 0x00FF;\n  aBuf[3] = (iVal>> 0) & 0x00FF;\n}\n\nstatic int sqlite3Fts5Get32(const u8 *aBuf){\n  return (int)((((u32)aBuf[0])<<24) + (aBuf[1]<<16) + (aBuf[2]<<8) + aBuf[3]);\n}\n\n/*\n** Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set\n** the error code in p. If an error has already occurred when this function\n** is called, it is a no-op.\n*/\nstatic void sqlite3Fts5BufferAppendBlob(\n  int *pRc,\n  Fts5Buffer *pBuf,\n  u32 nData,\n  const u8 *pData\n){\n  if( nData ){\n    if( fts5BufferGrow(pRc, pBuf, nData) ) return;\n    assert( pBuf->p!=0 );\n    memcpy(&pBuf->p[pBuf->n], pData, nData);\n    pBuf->n += nData;\n  }\n}\n\n/*\n** Append the nul-terminated string zStr to the buffer pBuf. This function\n** ensures that the byte following the buffer data is set to 0x00, even\n** though this byte is not included in the pBuf->n count.\n*/\nstatic void sqlite3Fts5BufferAppendString(\n  int *pRc,\n  Fts5Buffer *pBuf,\n  const char *zStr\n){\n  int nStr = (int)strlen(zStr);\n  sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr);\n  pBuf->n--;\n}\n\n/*\n** Argument zFmt is a printf() style format string. This function performs\n** the printf() style processing, then appends the results to buffer pBuf.\n**\n** Like sqlite3Fts5BufferAppendString(), this function ensures that the byte\n** following the buffer data is set to 0x00, even though this byte is not\n** included in the pBuf->n count.\n*/\nstatic void sqlite3Fts5BufferAppendPrintf(\n  int *pRc,\n  Fts5Buffer *pBuf,\n  char *zFmt, ...\n){\n  if( *pRc==SQLITE_OK ){\n    char *zTmp;\n    va_list ap;\n    va_start(ap, zFmt);\n    zTmp = sqlite3_vmprintf(zFmt, ap);\n    va_end(ap);\n\n    if( zTmp==0 ){\n      *pRc = SQLITE_NOMEM;\n    }else{\n      sqlite3Fts5BufferAppendString(pRc, pBuf, zTmp);\n      sqlite3_free(zTmp);\n    }\n  }\n}\n\nstatic char *sqlite3Fts5Mprintf(int *pRc, const char *zFmt, ...){\n  char *zRet = 0;\n  if( *pRc==SQLITE_OK ){\n    va_list ap;\n    va_start(ap, zFmt);\n    zRet = sqlite3_vmprintf(zFmt, ap);\n    va_end(ap);\n    if( zRet==0 ){\n      *pRc = SQLITE_NOMEM;\n    }\n  }\n  return zRet;\n}\n\n\n/*\n** Free any buffer allocated by pBuf. Zero the structure before returning.\n*/\nstatic void sqlite3Fts5BufferFree(Fts5Buffer *pBuf){\n  sqlite3_free(pBuf->p);\n  memset(pBuf, 0, sizeof(Fts5Buffer));\n}\n\n/*\n** Zero the contents of the buffer object. But do not free the associated\n** memory allocation.\n*/\nstatic void sqlite3Fts5BufferZero(Fts5Buffer *pBuf){\n  pBuf->n = 0;\n}\n\n/*\n** Set the buffer to contain nData/pData. If an OOM error occurs, leave an\n** the error code in p. If an error has already occurred when this function\n** is called, it is a no-op.\n*/\nstatic void sqlite3Fts5BufferSet(\n  int *pRc,\n  Fts5Buffer *pBuf,\n  int nData,\n  const u8 *pData\n){\n  pBuf->n = 0;\n  sqlite3Fts5BufferAppendBlob(pRc, pBuf, nData, pData);\n}\n\nstatic int sqlite3Fts5PoslistNext64(\n  const u8 *a, int n,             /* Buffer containing poslist */\n  int *pi,                        /* IN/OUT: Offset within a[] */\n  i64 *piOff                      /* IN/OUT: Current offset */\n){\n  int i = *pi;\n  assert( a!=0 || i==0 );\n  if( i>=n ){\n    /* EOF */\n    *piOff = -1;\n    return 1;\n  }else{\n    i64 iOff = *piOff;\n    u32 iVal;\n    assert( a!=0 );\n    fts5FastGetVarint32(a, i, iVal);\n    if( iVal<=1 ){\n      if( iVal==0 ){\n        *pi = i;\n        return 0;\n      }\n      fts5FastGetVarint32(a, i, iVal);\n      iOff = ((i64)iVal) << 32;\n      assert( iOff>=0 );\n      fts5FastGetVarint32(a, i, iVal);\n      if( iVal<2 ){\n        /* This is a corrupt record. So stop parsing it here. */\n        *piOff = -1;\n        return 1;\n      }\n      *piOff = iOff + ((iVal-2) & 0x7FFFFFFF);\n    }else{\n      *piOff = (iOff & (i64)0x7FFFFFFF<<32)+((iOff + (iVal-2)) & 0x7FFFFFFF);\n    }\n    *pi = i;\n    assert_nc( *piOff>=iOff );\n    return 0;\n  }\n}\n\n\n/*\n** Advance the iterator object passed as the only argument. Return true\n** if the iterator reaches EOF, or false otherwise.\n*/\nstatic int sqlite3Fts5PoslistReaderNext(Fts5PoslistReader *pIter){\n  if( sqlite3Fts5PoslistNext64(pIter->a, pIter->n, &pIter->i, &pIter->iPos) ){\n    pIter->bEof = 1;\n  }\n  return pIter->bEof;\n}\n\nstatic int sqlite3Fts5PoslistReaderInit(\n  const u8 *a, int n,             /* Poslist buffer to iterate through */\n  Fts5PoslistReader *pIter        /* Iterator object to initialize */\n){\n  memset(pIter, 0, sizeof(*pIter));\n  pIter->a = a;\n  pIter->n = n;\n  sqlite3Fts5PoslistReaderNext(pIter);\n  return pIter->bEof;\n}\n\n/*\n** Append position iPos to the position list being accumulated in buffer\n** pBuf, which must be already be large enough to hold the new data.\n** The previous position written to this list is *piPrev. *piPrev is set\n** to iPos before returning.\n*/\nstatic void sqlite3Fts5PoslistSafeAppend(\n  Fts5Buffer *pBuf,\n  i64 *piPrev,\n  i64 iPos\n){\n  if( iPos>=*piPrev ){\n    static const i64 colmask = ((i64)(0x7FFFFFFF)) << 32;\n    if( (iPos & colmask) != (*piPrev & colmask) ){\n      pBuf->p[pBuf->n++] = 1;\n      pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos>>32));\n      *piPrev = (iPos & colmask);\n    }\n    pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos-*piPrev)+2);\n    *piPrev = iPos;\n  }\n}\n\nstatic int sqlite3Fts5PoslistWriterAppend(\n  Fts5Buffer *pBuf,\n  Fts5PoslistWriter *pWriter,\n  i64 iPos\n){\n  int rc = 0;   /* Initialized only to suppress erroneous warning from Clang */\n  if( fts5BufferGrow(&rc, pBuf, 5+5+5) ) return rc;\n  sqlite3Fts5PoslistSafeAppend(pBuf, &pWriter->iPrev, iPos);\n  return SQLITE_OK;\n}\n\nstatic void *sqlite3Fts5MallocZero(int *pRc, sqlite3_int64 nByte){\n  void *pRet = 0;\n  if( *pRc==SQLITE_OK ){\n    pRet = sqlite3_malloc64(nByte);\n    if( pRet==0 ){\n      if( nByte>0 ) *pRc = SQLITE_NOMEM;\n    }else{\n      memset(pRet, 0, (size_t)nByte);\n    }\n  }\n  return pRet;\n}\n\n/*\n** Return a nul-terminated copy of the string indicated by pIn. If nIn\n** is non-negative, then it is the length of the string in bytes. Otherwise,\n** the length of the string is determined using strlen().\n**\n** It is the responsibility of the caller to eventually free the returned\n** buffer using sqlite3_free(). If an OOM error occurs, NULL is returned.\n*/\nstatic char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){\n  char *zRet = 0;\n  if( *pRc==SQLITE_OK ){\n    if( nIn<0 ){\n      nIn = (int)strlen(pIn);\n    }\n    zRet = (char*)sqlite3_malloc(nIn+1);\n    if( zRet ){\n      memcpy(zRet, pIn, nIn);\n      zRet[nIn] = '\\0';\n    }else{\n      *pRc = SQLITE_NOMEM;\n    }\n  }\n  return zRet;\n}\n\n\n/*\n** Return true if character 't' may be part of an FTS5 bareword, or false\n** otherwise. Characters that may be part of barewords:\n**\n**   * All non-ASCII characters,\n**   * The 52 upper and lower case ASCII characters, and\n**   * The 10 integer ASCII characters.\n**   * The underscore character \"_\" (0x5F).\n**   * The unicode \"substitute\" character (0x1A).\n*/\nstatic int sqlite3Fts5IsBareword(char t){\n  u8 aBareword[128] = {\n    0, 0, 0, 0, 0, 0, 0, 0,    0, 0, 0, 0, 0, 0, 0, 0,   /* 0x00 .. 0x0F */\n    0, 0, 0, 0, 0, 0, 0, 0,    0, 0, 1, 0, 0, 0, 0, 0,   /* 0x10 .. 0x1F */\n    0, 0, 0, 0, 0, 0, 0, 0,    0, 0, 0, 0, 0, 0, 0, 0,   /* 0x20 .. 0x2F */\n    1, 1, 1, 1, 1, 1, 1, 1,    1, 1, 0, 0, 0, 0, 0, 0,   /* 0x30 .. 0x3F */\n    0, 1, 1, 1, 1, 1, 1, 1,    1, 1, 1, 1, 1, 1, 1, 1,   /* 0x40 .. 0x4F */\n    1, 1, 1, 1, 1, 1, 1, 1,    1, 1, 1, 0, 0, 0, 0, 1,   /* 0x50 .. 0x5F */\n    0, 1, 1, 1, 1, 1, 1, 1,    1, 1, 1, 1, 1, 1, 1, 1,   /* 0x60 .. 0x6F */\n    1, 1, 1, 1, 1, 1, 1, 1,    1, 1, 1, 0, 0, 0, 0, 0    /* 0x70 .. 0x7F */\n  };\n\n  return (t & 0x80) || aBareword[(int)t];\n}\n\n\n/*************************************************************************\n*/\ntypedef struct Fts5TermsetEntry Fts5TermsetEntry;\nstruct Fts5TermsetEntry {\n  char *pTerm;\n  int nTerm;\n  int iIdx;                       /* Index (main or aPrefix[] entry) */\n  Fts5TermsetEntry *pNext;\n};\n\nstruct Fts5Termset {\n  Fts5TermsetEntry *apHash[512];\n};\n\nstatic int sqlite3Fts5TermsetNew(Fts5Termset **pp){\n  int rc = SQLITE_OK;\n  *pp = sqlite3Fts5MallocZero(&rc, sizeof(Fts5Termset));\n  return rc;\n}\n\nstatic int sqlite3Fts5TermsetAdd(\n  Fts5Termset *p,\n  int iIdx,\n  const char *pTerm, int nTerm,\n  int *pbPresent\n){\n  int rc = SQLITE_OK;\n  *pbPresent = 0;\n  if( p ){\n    int i;\n    u32 hash = 13;\n    Fts5TermsetEntry *pEntry;\n\n    /* Calculate a hash value for this term. This is the same hash checksum\n    ** used by the fts5_hash.c module. This is not important for correct\n    ** operation of the module, but is necessary to ensure that some tests\n    ** designed to produce hash table collisions really do work.  */\n    for(i=nTerm-1; i>=0; i--){\n      hash = (hash << 3) ^ hash ^ pTerm[i];\n    }\n    hash = (hash << 3) ^ hash ^ iIdx;\n    hash = hash % ArraySize(p->apHash);\n\n    for(pEntry=p->apHash[hash]; pEntry; pEntry=pEntry->pNext){\n      if( pEntry->iIdx==iIdx\n          && pEntry->nTerm==nTerm\n          && memcmp(pEntry->pTerm, pTerm, nTerm)==0\n      ){\n        *pbPresent = 1;\n        break;\n      }\n    }\n\n    if( pEntry==0 ){\n      pEntry = sqlite3Fts5MallocZero(&rc, sizeof(Fts5TermsetEntry) + nTerm);\n      if( pEntry ){\n        pEntry->pTerm = (char*)&pEntry[1];\n        pEntry->nTerm = nTerm;\n        pEntry->iIdx = iIdx;\n        memcpy(pEntry->pTerm, pTerm, nTerm);\n        pEntry->pNext = p->apHash[hash];\n        p->apHash[hash] = pEntry;\n      }\n    }\n  }\n\n  return rc;\n}\n\nstatic void sqlite3Fts5TermsetFree(Fts5Termset *p){\n  if( p ){\n    u32 i;\n    for(i=0; i<ArraySize(p->apHash); i++){\n      Fts5TermsetEntry *pEntry = p->apHash[i];\n      while( pEntry ){\n        Fts5TermsetEntry *pDel = pEntry;\n        pEntry = pEntry->pNext;\n        sqlite3_free(pDel);\n      }\n    }\n    sqlite3_free(p);\n  }\n}\n\n/*\n** 2014 Jun 09\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This is an SQLite module implementing full-text search.\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n#define FTS5_DEFAULT_PAGE_SIZE   4050\n#define FTS5_DEFAULT_AUTOMERGE      4\n#define FTS5_DEFAULT_USERMERGE      4\n#define FTS5_DEFAULT_CRISISMERGE   16\n#define FTS5_DEFAULT_HASHSIZE    (1024*1024)\n\n#define FTS5_DEFAULT_DELETE_AUTOMERGE 10      /* default 10% */\n\n/* Maximum allowed page size */\n#define FTS5_MAX_PAGE_SIZE (64*1024)\n\nstatic int fts5_iswhitespace(char x){\n  return (x==' ');\n}\n\nstatic int fts5_isopenquote(char x){\n  return (x=='\"' || x=='\\'' || x=='[' || x=='`');\n}\n\n/*\n** Argument pIn points to a character that is part of a nul-terminated\n** string. Return a pointer to the first character following *pIn in\n** the string that is not a white-space character.\n*/\nstatic const char *fts5ConfigSkipWhitespace(const char *pIn){\n  const char *p = pIn;\n  if( p ){\n    while( fts5_iswhitespace(*p) ){ p++; }\n  }\n  return p;\n}\n\n/*\n** Argument pIn points to a character that is part of a nul-terminated\n** string. Return a pointer to the first character following *pIn in\n** the string that is not a \"bareword\" character.\n*/\nstatic const char *fts5ConfigSkipBareword(const char *pIn){\n  const char *p = pIn;\n  while ( sqlite3Fts5IsBareword(*p) ) p++;\n  if( p==pIn ) p = 0;\n  return p;\n}\n\nstatic int fts5_isdigit(char a){\n  return (a>='0' && a<='9');\n}\n\n\n\nstatic const char *fts5ConfigSkipLiteral(const char *pIn){\n  const char *p = pIn;\n  switch( *p ){\n    case 'n': case 'N':\n      if( sqlite3_strnicmp(\"null\", p, 4)==0 ){\n        p = &p[4];\n      }else{\n        p = 0;\n      }\n      break;\n\n    case 'x': case 'X':\n      p++;\n      if( *p=='\\'' ){\n        p++;\n        while( (*p>='a' && *p<='f')\n            || (*p>='A' && *p<='F')\n            || (*p>='0' && *p<='9')\n            ){\n          p++;\n        }\n        if( *p=='\\'' && 0==((p-pIn)%2) ){\n          p++;\n        }else{\n          p = 0;\n        }\n      }else{\n        p = 0;\n      }\n      break;\n\n    case '\\'':\n      p++;\n      while( p ){\n        if( *p=='\\'' ){\n          p++;\n          if( *p!='\\'' ) break;\n        }\n        p++;\n        if( *p==0 ) p = 0;\n      }\n      break;\n\n    default:\n      /* maybe a number */\n      if( *p=='+' || *p=='-' ) p++;\n      while( fts5_isdigit(*p) ) p++;\n\n      /* At this point, if the literal was an integer, the parse is\n      ** finished. Or, if it is a floating point value, it may continue\n      ** with either a decimal point or an 'E' character. */\n      if( *p=='.' && fts5_isdigit(p[1]) ){\n        p += 2;\n        while( fts5_isdigit(*p) ) p++;\n      }\n      if( p==pIn ) p = 0;\n\n      break;\n  }\n\n  return p;\n}\n\n/*\n** The first character of the string pointed to by argument z is guaranteed\n** to be an open-quote character (see function fts5_isopenquote()).\n**\n** This function searches for the corresponding close-quote character within\n** the string and, if found, dequotes the string in place and adds a new\n** nul-terminator byte.\n**\n** If the close-quote is found, the value returned is the byte offset of\n** the character immediately following it. Or, if the close-quote is not\n** found, -1 is returned. If -1 is returned, the buffer is left in an\n** undefined state.\n*/\nstatic int fts5Dequote(char *z){\n  char q;\n  int iIn = 1;\n  int iOut = 0;\n  q = z[0];\n\n  /* Set stack variable q to the close-quote character */\n  assert( q=='[' || q=='\\'' || q=='\"' || q=='`' );\n  if( q=='[' ) q = ']';\n\n  while( z[iIn] ){\n    if( z[iIn]==q ){\n      if( z[iIn+1]!=q ){\n        /* Character iIn was the close quote. */\n        iIn++;\n        break;\n      }else{\n        /* Character iIn and iIn+1 form an escaped quote character. Skip\n        ** the input cursor past both and copy a single quote character\n        ** to the output buffer. */\n        iIn += 2;\n        z[iOut++] = q;\n      }\n    }else{\n      z[iOut++] = z[iIn++];\n    }\n  }\n\n  z[iOut] = '\\0';\n  return iIn;\n}\n\n/*\n** Convert an SQL-style quoted string into a normal string by removing\n** the quote characters.  The conversion is done in-place.  If the\n** input does not begin with a quote character, then this routine\n** is a no-op.\n**\n** Examples:\n**\n**     \"abc\"   becomes   abc\n**     'xyz'   becomes   xyz\n**     [pqr]   becomes   pqr\n**     `mno`   becomes   mno\n*/\nstatic void sqlite3Fts5Dequote(char *z){\n  char quote;                     /* Quote character (if any ) */\n\n  assert( 0==fts5_iswhitespace(z[0]) );\n  quote = z[0];\n  if( quote=='[' || quote=='\\'' || quote=='\"' || quote=='`' ){\n    fts5Dequote(z);\n  }\n}\n\n\nstruct Fts5Enum {\n  const char *zName;\n  int eVal;\n};\ntypedef struct Fts5Enum Fts5Enum;\n\nstatic int fts5ConfigSetEnum(\n  const Fts5Enum *aEnum,\n  const char *zEnum,\n  int *peVal\n){\n  int nEnum = (int)strlen(zEnum);\n  int i;\n  int iVal = -1;\n\n  for(i=0; aEnum[i].zName; i++){\n    if( sqlite3_strnicmp(aEnum[i].zName, zEnum, nEnum)==0 ){\n      if( iVal>=0 ) return SQLITE_ERROR;\n      iVal = aEnum[i].eVal;\n    }\n  }\n\n  *peVal = iVal;\n  return iVal<0 ? SQLITE_ERROR : SQLITE_OK;\n}\n\n/*\n** Parse a \"special\" CREATE VIRTUAL TABLE directive and update\n** configuration object pConfig as appropriate.\n**\n** If successful, object pConfig is updated and SQLITE_OK returned. If\n** an error occurs, an SQLite error code is returned and an error message\n** may be left in *pzErr. It is the responsibility of the caller to\n** eventually free any such error message using sqlite3_free().\n*/\nstatic int fts5ConfigParseSpecial(\n  Fts5Config *pConfig,            /* Configuration object to update */\n  const char *zCmd,               /* Special command to parse */\n  const char *zArg,               /* Argument to parse */\n  char **pzErr                    /* OUT: Error message */\n){\n  int rc = SQLITE_OK;\n  int nCmd = (int)strlen(zCmd);\n\n  if( sqlite3_strnicmp(\"prefix\", zCmd, nCmd)==0 ){\n    const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;\n    const char *p;\n    int bFirst = 1;\n    if( pConfig->aPrefix==0 ){\n      pConfig->aPrefix = sqlite3Fts5MallocZero(&rc, nByte);\n      if( rc ) return rc;\n    }\n\n    p = zArg;\n    while( 1 ){\n      int nPre = 0;\n\n      while( p[0]==' ' ) p++;\n      if( bFirst==0 && p[0]==',' ){\n        p++;\n        while( p[0]==' ' ) p++;\n      }else if( p[0]=='\\0' ){\n        break;\n      }\n      if( p[0]<'0' || p[0]>'9' ){\n        *pzErr = sqlite3_mprintf(\"malformed prefix=... directive\");\n        rc = SQLITE_ERROR;\n        break;\n      }\n\n      if( pConfig->nPrefix==FTS5_MAX_PREFIX_INDEXES ){\n        *pzErr = sqlite3_mprintf(\n            \"too many prefix indexes (max %d)\", FTS5_MAX_PREFIX_INDEXES\n        );\n        rc = SQLITE_ERROR;\n        break;\n      }\n\n      while( p[0]>='0' && p[0]<='9' && nPre<1000 ){\n        nPre = nPre*10 + (p[0] - '0');\n        p++;\n      }\n\n      if( nPre<=0 || nPre>=1000 ){\n        *pzErr = sqlite3_mprintf(\"prefix length out of range (max 999)\");\n        rc = SQLITE_ERROR;\n        break;\n      }\n\n      pConfig->aPrefix[pConfig->nPrefix] = nPre;\n      pConfig->nPrefix++;\n      bFirst = 0;\n    }\n    assert( pConfig->nPrefix<=FTS5_MAX_PREFIX_INDEXES );\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"tokenize\", zCmd, nCmd)==0 ){\n    const char *p = (const char*)zArg;\n    sqlite3_int64 nArg = strlen(zArg) + 1;\n    char **azArg = sqlite3Fts5MallocZero(&rc, (sizeof(char*) + 2) * nArg);\n\n    if( azArg ){\n      char *pSpace = (char*)&azArg[nArg];\n      if( pConfig->t.azArg ){\n        *pzErr = sqlite3_mprintf(\"multiple tokenize=... directives\");\n        rc = SQLITE_ERROR;\n      }else{\n        for(nArg=0; p && *p; nArg++){\n          const char *p2 = fts5ConfigSkipWhitespace(p);\n          if( *p2=='\\'' ){\n            p = fts5ConfigSkipLiteral(p2);\n          }else{\n            p = fts5ConfigSkipBareword(p2);\n          }\n          if( p ){\n            memcpy(pSpace, p2, p-p2);\n            azArg[nArg] = pSpace;\n            sqlite3Fts5Dequote(pSpace);\n            pSpace += (p - p2) + 1;\n            p = fts5ConfigSkipWhitespace(p);\n          }\n        }\n        if( p==0 ){\n          *pzErr = sqlite3_mprintf(\"parse error in tokenize directive\");\n          rc = SQLITE_ERROR;\n        }else{\n          pConfig->t.azArg = (const char**)azArg;\n          pConfig->t.nArg = nArg;\n          azArg = 0;\n        }\n      }\n    }\n    sqlite3_free(azArg);\n\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"content\", zCmd, nCmd)==0 ){\n    if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){\n      *pzErr = sqlite3_mprintf(\"multiple content=... directives\");\n      rc = SQLITE_ERROR;\n    }else{\n      if( zArg[0] ){\n        pConfig->eContent = FTS5_CONTENT_EXTERNAL;\n        pConfig->zContent = sqlite3Fts5Mprintf(&rc, \"%Q.%Q\", pConfig->zDb,zArg);\n      }else{\n        pConfig->eContent = FTS5_CONTENT_NONE;\n      }\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"contentless_delete\", zCmd, nCmd)==0 ){\n    if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\\0' ){\n      *pzErr = sqlite3_mprintf(\"malformed contentless_delete=... directive\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->bContentlessDelete = (zArg[0]=='1');\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"contentless_unindexed\", zCmd, nCmd)==0 ){\n    if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\\0' ){\n      *pzErr = sqlite3_mprintf(\"malformed contentless_delete=... directive\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->bContentlessUnindexed = (zArg[0]=='1');\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"content_rowid\", zCmd, nCmd)==0 ){\n    if( pConfig->zContentRowid ){\n      *pzErr = sqlite3_mprintf(\"multiple content_rowid=... directives\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->zContentRowid = sqlite3Fts5Strndup(&rc, zArg, -1);\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"columnsize\", zCmd, nCmd)==0 ){\n    if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\\0' ){\n      *pzErr = sqlite3_mprintf(\"malformed columnsize=... directive\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->bColumnsize = (zArg[0]=='1');\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"locale\", zCmd, nCmd)==0 ){\n    if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\\0' ){\n      *pzErr = sqlite3_mprintf(\"malformed locale=... directive\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->bLocale = (zArg[0]=='1');\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"detail\", zCmd, nCmd)==0 ){\n    const Fts5Enum aDetail[] = {\n      { \"none\", FTS5_DETAIL_NONE },\n      { \"full\", FTS5_DETAIL_FULL },\n      { \"columns\", FTS5_DETAIL_COLUMNS },\n      { 0, 0 }\n    };\n\n    if( (rc = fts5ConfigSetEnum(aDetail, zArg, &pConfig->eDetail)) ){\n      *pzErr = sqlite3_mprintf(\"malformed detail=... directive\");\n    }\n    return rc;\n  }\n\n  if( sqlite3_strnicmp(\"tokendata\", zCmd, nCmd)==0 ){\n    if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\\0' ){\n      *pzErr = sqlite3_mprintf(\"malformed tokendata=... directive\");\n      rc = SQLITE_ERROR;\n    }else{\n      pConfig->bTokendata = (zArg[0]=='1');\n    }\n    return rc;\n  }\n\n  *pzErr = sqlite3_mprintf(\"unrecognized option: \\\"%.*s\\\"\", nCmd, zCmd);\n  return SQLITE_ERROR;\n}\n\n/*\n** Gobble up the first bareword or quoted word from the input buffer zIn.\n** Return a pointer to the character immediately following the last in\n** the gobbled word if successful, or a NULL pointer otherwise (failed\n** to find close-quote character).\n**\n** Before returning, set pzOut to point to a new buffer containing a\n** nul-terminated, dequoted copy of the gobbled word. If the word was\n** quoted, *pbQuoted is also set to 1 before returning.\n**\n** If *pRc is other than SQLITE_OK when this function is called, it is\n** a no-op (NULL is returned). Otherwise, if an OOM occurs within this\n** function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not*\n** set if a parse error (failed to find close quote) occurs.\n*/\nstatic const char *fts5ConfigGobbleWord(\n  int *pRc,                       /* IN/OUT: Error code */\n  const char *zIn,                /* Buffer to gobble string/bareword from */\n  char **pzOut,                   /* OUT: malloc'd buffer containing str/bw */\n  int *pbQuoted                   /* OUT: Set to true if dequoting required */\n){\n  const char *zRet = 0;\n\n  sqlite3_int64 nIn = strlen(zIn);\n  char *zOut = sqlite3_malloc64(nIn+1);\n\n  assert( *pRc==SQLITE_OK );\n  *pbQuoted = 0;\n  *pzOut = 0;\n\n  if( zOut==0 ){\n    *pRc = SQLITE_NOMEM;\n  }else{\n    memcpy(zOut, zIn, (size_t)(nIn+1));\n    if( fts5_isopenquote(zOut[0]) ){\n      int ii = fts5Dequote(zOut);\n      zRet = &zIn[ii];\n      *pbQuoted = 1;\n    }else{\n      zRet = fts5ConfigSkipBareword(zIn);\n      if( zRet ){\n        zOut[zRet-zIn] = '\\0';\n      }\n    }\n  }\n\n  if( zRet==0 ){\n    sqlite3_free(zOut);\n  }else{\n    *pzOut = zOut;\n  }\n\n  return zRet;\n}\n\nstatic int fts5ConfigParseColumn(\n  Fts5Config *p,\n  char *zCol,\n  char *zArg,\n  char **pzErr,\n  int *pbUnindexed\n){\n  int rc = SQLITE_OK;\n  if( 0==sqlite3_stricmp(zCol, FTS5_RANK_NAME)\n   || 0==sqlite3_stricmp(zCol, FTS5_ROWID_NAME)\n  ){\n    *pzErr = sqlite3_mprintf(\"reserved fts5 column name: %s\", zCol);\n    rc = SQLITE_ERROR;\n  }else if( zArg ){\n    if( 0==sqlite3_stricmp(zArg, \"unindexed\") ){\n      p->abUnindexed[p->nCol] = 1;\n      *pbUnindexed = 1;\n    }else{\n      *pzErr = sqlite3_mprintf(\"unrecognized column option: %s\", zArg);\n      rc = SQLITE_ERROR;\n    }\n  }\n\n  p->azCol[p->nCol++] = zCol;\n  return rc;\n}\n\n/*\n** Populate the Fts5Config.zContentExprlist string.\n*/\nstatic int fts5ConfigMakeExprlist(Fts5Config *p){\n  int i;\n  int rc = SQLITE_OK;\n  Fts5Buffer buf = {0, 0, 0};\n\n  sqlite3Fts5BufferAppendPrintf(&rc, &buf, \"T.%Q\", p->zContentRowid);\n  if( p->eContent!=FTS5_CONTENT_NONE ){\n    assert( p->eContent==FTS5_CONTENT_EXTERNAL\n         || p->eContent==FTS5_CONTENT_NORMAL\n         || p->eContent==FTS5_CONTENT_UNINDEXED\n    );\n    for(i=0; i<p->nCol; i++){\n      if( p->eContent==FTS5_CONTENT_EXTERNAL ){\n        sqlite3Fts5BufferAppendPrintf(&rc, &buf, \", T.%Q\", p->azCol[i]);\n      }else if( p->eContent==FTS5_CONTENT_NORMAL || p->abUnindexed[i] ){\n        sqlite3Fts5BufferAppendPrintf(&rc, &buf, \", T.c%d\", i);\n      }else{\n        sqlite3Fts5BufferAppendPrintf(&rc, &buf, \", NULL\");\n      }\n    }\n  }\n  if( p->eContent==FTS5_CONTENT_NORMAL && p->bLocale ){\n    for(i=0; i<p->nCol; i++){\n      if( p->abUnindexed[i]==0 ){\n        sqlite3Fts5BufferAppendPrintf(&rc, &buf, \", T.l%d\", i);\n      }else{\n        sqlite3Fts5BufferAppendPrintf(&rc, &buf, \", NULL\");\n      }\n    }\n  }\n\n  assert( p->zContentExprlist==0 );\n  p->zContentExprlist = (char*)buf.p;\n  return rc;\n}\n\n/*\n** Arguments nArg/azArg contain the string arguments passed to the xCreate\n** or xConnect method of the virtual table. This function attempts to\n** allocate an instance of Fts5Config containing the results of parsing\n** those arguments.\n**\n** If successful, SQLITE_OK is returned and *ppOut is set to point to the\n** new Fts5Config object. If an error occurs, an SQLite error code is\n** returned, *ppOut is set to NULL and an error message may be left in\n** *pzErr. It is the responsibility of the caller to eventually free any\n** such error message using sqlite3_free().\n*/\nstatic int sqlite3Fts5ConfigParse(\n  Fts5Global *pGlobal,\n  sqlite3 *db,\n  int nArg,                       /* Number of arguments */\n  const char **azArg,             /* Array of nArg CREATE VIRTUAL TABLE args */\n  Fts5Config **ppOut,             /* OUT: Results of parse */\n  char **pzErr                    /* OUT: Error message */\n){\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5Config *pRet;               /* New object to return */\n  int i;\n  sqlite3_int64 nByte;\n  int bUnindexed = 0;             /* True if there are one or more UNINDEXED */\n\n  *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config));\n  if( pRet==0 ) return SQLITE_NOMEM;\n  memset(pRet, 0, sizeof(Fts5Config));\n  pRet->pGlobal = pGlobal;\n  pRet->db = db;\n  pRet->iCookie = -1;\n\n  nByte = nArg * (sizeof(char*) + sizeof(u8));\n  pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte);\n  pRet->abUnindexed = pRet->azCol ? (u8*)&pRet->azCol[nArg] : 0;\n  pRet->zDb = sqlite3Fts5Strndup(&rc, azArg[1], -1);\n  pRet->zName = sqlite3Fts5Strndup(&rc, azArg[2], -1);\n  pRet->bColumnsize = 1;\n  pRet->eDetail = FTS5_DETAIL_FULL;\n#ifdef SQLITE_DEBUG\n  pRet->bPrefixIndex = 1;\n#endif\n  if( rc==SQLITE_OK && sqlite3_stricmp(pRet->zName, FTS5_RANK_NAME)==0 ){\n    *pzErr = sqlite3_mprintf(\"reserved fts5 table name: %s\", pRet->zName);\n    rc = SQLITE_ERROR;\n  }\n\n  assert( (pRet->abUnindexed && pRet->azCol) || rc!=SQLITE_OK );\n  for(i=3; rc==SQLITE_OK && i<nArg; i++){\n    const char *zOrig = azArg[i];\n    const char *z;\n    char *zOne = 0;\n    char *zTwo = 0;\n    int bOption = 0;\n    int bMustBeCol = 0;\n\n    z = fts5ConfigGobbleWord(&rc, zOrig, &zOne, &bMustBeCol);\n    z = fts5ConfigSkipWhitespace(z);\n    if( z && *z=='=' ){\n      bOption = 1;\n      assert( zOne!=0 );\n      z++;\n      if( bMustBeCol ) z = 0;\n    }\n    z = fts5ConfigSkipWhitespace(z);\n    if( z && z[0] ){\n      int bDummy;\n      z = fts5ConfigGobbleWord(&rc, z, &zTwo, &bDummy);\n      if( z && z[0] ) z = 0;\n    }\n\n    if( rc==SQLITE_OK ){\n      if( z==0 ){\n        *pzErr = sqlite3_mprintf(\"parse error in \\\"%s\\\"\", zOrig);\n        rc = SQLITE_ERROR;\n      }else{\n        if( bOption ){\n          rc = fts5ConfigParseSpecial(pRet,\n            ALWAYS(zOne)?zOne:\"\",\n            zTwo?zTwo:\"\",\n            pzErr\n          );\n        }else{\n          rc = fts5ConfigParseColumn(pRet, zOne, zTwo, pzErr, &bUnindexed);\n          zOne = 0;\n        }\n      }\n    }\n\n    sqlite3_free(zOne);\n    sqlite3_free(zTwo);\n  }\n\n  /* We only allow contentless_delete=1 if the table is indeed contentless. */\n  if( rc==SQLITE_OK\n   && pRet->bContentlessDelete\n   && pRet->eContent!=FTS5_CONTENT_NONE\n  ){\n    *pzErr = sqlite3_mprintf(\n        \"contentless_delete=1 requires a contentless table\"\n    );\n    rc = SQLITE_ERROR;\n  }\n\n  /* We only allow contentless_delete=1 if columnsize=0 is not present.\n  **\n  ** This restriction may be removed at some point.\n  */\n  if( rc==SQLITE_OK && pRet->bContentlessDelete && pRet->bColumnsize==0 ){\n    *pzErr = sqlite3_mprintf(\n        \"contentless_delete=1 is incompatible with columnsize=0\"\n    );\n    rc = SQLITE_ERROR;\n  }\n\n  /* We only allow contentless_unindexed=1 if the table is actually a\n  ** contentless one.\n  */\n  if( rc==SQLITE_OK\n   && pRet->bContentlessUnindexed\n   && pRet->eContent!=FTS5_CONTENT_NONE\n  ){\n    *pzErr = sqlite3_mprintf(\n        \"contentless_unindexed=1 requires a contentless table\"\n    );\n    rc = SQLITE_ERROR;\n  }\n\n  /* If no zContent option was specified, fill in the default values. */\n  if( rc==SQLITE_OK && pRet->zContent==0 ){\n    const char *zTail = 0;\n    assert( pRet->eContent==FTS5_CONTENT_NORMAL\n         || pRet->eContent==FTS5_CONTENT_NONE\n    );\n    if( pRet->eContent==FTS5_CONTENT_NORMAL ){\n      zTail = \"content\";\n    }else if( bUnindexed && pRet->bContentlessUnindexed ){\n      pRet->eContent = FTS5_CONTENT_UNINDEXED;\n      zTail = \"content\";\n    }else if( pRet->bColumnsize ){\n      zTail = \"docsize\";\n    }\n\n    if( zTail ){\n      pRet->zContent = sqlite3Fts5Mprintf(\n          &rc, \"%Q.'%q_%s'\", pRet->zDb, pRet->zName, zTail\n      );\n    }\n  }\n\n  if( rc==SQLITE_OK && pRet->zContentRowid==0 ){\n    pRet->zContentRowid = sqlite3Fts5Strndup(&rc, \"rowid\", -1);\n  }\n\n  /* Formulate the zContentExprlist text */\n  if( rc==SQLITE_OK ){\n    rc = fts5ConfigMakeExprlist(pRet);\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3Fts5ConfigFree(pRet);\n    *ppOut = 0;\n  }\n  return rc;\n}\n\n/*\n** Free the configuration object passed as the only argument.\n*/\nstatic void sqlite3Fts5ConfigFree(Fts5Config *pConfig){\n  if( pConfig ){\n    int i;\n    if( pConfig->t.pTok ){\n      if( pConfig->t.pApi1 ){\n        pConfig->t.pApi1->xDelete(pConfig->t.pTok);\n      }else{\n        pConfig->t.pApi2->xDelete(pConfig->t.pTok);\n      }\n    }\n    sqlite3_free((char*)pConfig->t.azArg);\n    sqlite3_free(pConfig->zDb);\n    sqlite3_free(pConfig->zName);\n    for(i=0; i<pConfig->nCol; i++){\n      sqlite3_free(pConfig->azCol[i]);\n    }\n    sqlite3_free(pConfig->azCol);\n    sqlite3_free(pConfig->aPrefix);\n    sqlite3_free(pConfig->zRank);\n    sqlite3_free(pConfig->zRankArgs);\n    sqlite3_free(pConfig->zContent);\n    sqlite3_free(pConfig->zContentRowid);\n    sqlite3_free(pConfig->zContentExprlist);\n    sqlite3_free(pConfig);\n  }\n}\n\n/*\n** Call sqlite3_declare_vtab() based on the contents of the configuration\n** object passed as the only argument. Return SQLITE_OK if successful, or\n** an SQLite error code if an error occurs.\n*/\nstatic int sqlite3Fts5ConfigDeclareVtab(Fts5Config *pConfig){\n  int i;\n  int rc = SQLITE_OK;\n  char *zSql;\n\n  zSql = sqlite3Fts5Mprintf(&rc, \"CREATE TABLE x(\");\n  for(i=0; zSql && i<pConfig->nCol; i++){\n    const char *zSep = (i==0?\"\":\", \");\n    zSql = sqlite3Fts5Mprintf(&rc, \"%z%s%Q\", zSql, zSep, pConfig->azCol[i]);\n  }\n  zSql = sqlite3Fts5Mprintf(&rc, \"%z, %Q HIDDEN, %s HIDDEN)\",\n      zSql, pConfig->zName, FTS5_RANK_NAME\n  );\n\n  assert( zSql || rc==SQLITE_NOMEM );\n  if( zSql ){\n    rc = sqlite3_declare_vtab(pConfig->db, zSql);\n    sqlite3_free(zSql);\n  }\n\n  return rc;\n}\n\n/*\n** Tokenize the text passed via the second and third arguments.\n**\n** The callback is invoked once for each token in the input text. The\n** arguments passed to it are, in order:\n**\n**     void *pCtx          // Copy of 4th argument to sqlite3Fts5Tokenize()\n**     const char *pToken  // Pointer to buffer containing token\n**     int nToken          // Size of token in bytes\n**     int iStart          // Byte offset of start of token within input text\n**     int iEnd            // Byte offset of end of token within input text\n**     int iPos            // Position of token in input (first token is 0)\n**\n** If the callback returns a non-zero value the tokenization is abandoned\n** and no further callbacks are issued.\n**\n** This function returns SQLITE_OK if successful or an SQLite error code\n** if an error occurs. If the tokenization was abandoned early because\n** the callback returned SQLITE_DONE, this is not an error and this function\n** still returns SQLITE_OK. Or, if the tokenization was abandoned early\n** because the callback returned another non-zero value, it is assumed\n** to be an SQLite error code and returned to the caller.\n*/\nstatic int sqlite3Fts5Tokenize(\n  Fts5Config *pConfig,            /* FTS5 Configuration object */\n  int flags,                      /* FTS5_TOKENIZE_* flags */\n  const char *pText, int nText,   /* Text to tokenize */\n  void *pCtx,                     /* Context passed to xToken() */\n  int (*xToken)(void*, int, const char*, int, int, int)    /* Callback */\n){\n  int rc = SQLITE_OK;\n  if( pText ){\n    if( pConfig->t.pTok==0 ){\n      rc = sqlite3Fts5LoadTokenizer(pConfig);\n    }\n    if( rc==SQLITE_OK ){\n      if( pConfig->t.pApi1 ){\n        rc = pConfig->t.pApi1->xTokenize(\n            pConfig->t.pTok, pCtx, flags, pText, nText, xToken\n        );\n      }else{\n        rc = pConfig->t.pApi2->xTokenize(pConfig->t.pTok, pCtx, flags,\n            pText, nText, pConfig->t.pLocale, pConfig->t.nLocale, xToken\n        );\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** Argument pIn points to the first character in what is expected to be\n** a comma-separated list of SQL literals followed by a ')' character.\n** If it actually is this, return a pointer to the ')'. Otherwise, return\n** NULL to indicate a parse error.\n*/\nstatic const char *fts5ConfigSkipArgs(const char *pIn){\n  const char *p = pIn;\n\n  while( 1 ){\n    p = fts5ConfigSkipWhitespace(p);\n    p = fts5ConfigSkipLiteral(p);\n    p = fts5ConfigSkipWhitespace(p);\n    if( p==0 || *p==')' ) break;\n    if( *p!=',' ){\n      p = 0;\n      break;\n    }\n    p++;\n  }\n\n  return p;\n}\n\n/*\n** Parameter zIn contains a rank() function specification. The format of\n** this is:\n**\n**   + Bareword (function name)\n**   + Open parenthesis - \"(\"\n**   + Zero or more SQL literals in a comma separated list\n**   + Close parenthesis - \")\"\n*/\nstatic int sqlite3Fts5ConfigParseRank(\n  const char *zIn,                /* Input string */\n  char **pzRank,                  /* OUT: Rank function name */\n  char **pzRankArgs               /* OUT: Rank function arguments */\n){\n  const char *p = zIn;\n  const char *pRank;\n  char *zRank = 0;\n  char *zRankArgs = 0;\n  int rc = SQLITE_OK;\n\n  *pzRank = 0;\n  *pzRankArgs = 0;\n\n  if( p==0 ){\n    rc = SQLITE_ERROR;\n  }else{\n    p = fts5ConfigSkipWhitespace(p);\n    pRank = p;\n    p = fts5ConfigSkipBareword(p);\n\n    if( p ){\n      zRank = sqlite3Fts5MallocZero(&rc, 1 + p - pRank);\n      if( zRank ) memcpy(zRank, pRank, p-pRank);\n    }else{\n      rc = SQLITE_ERROR;\n    }\n\n    if( rc==SQLITE_OK ){\n      p = fts5ConfigSkipWhitespace(p);\n      if( *p!='(' ) rc = SQLITE_ERROR;\n      p++;\n    }\n    if( rc==SQLITE_OK ){\n      const char *pArgs;\n      p = fts5ConfigSkipWhitespace(p);\n      pArgs = p;\n      if( *p!=')' ){\n        p = fts5ConfigSkipArgs(p);\n        if( p==0 ){\n          rc = SQLITE_ERROR;\n        }else{\n          zRankArgs = sqlite3Fts5MallocZero(&rc, 1 + p - pArgs);\n          if( zRankArgs ) memcpy(zRankArgs, pArgs, p-pArgs);\n        }\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_free(zRank);\n    assert( zRankArgs==0 );\n  }else{\n    *pzRank = zRank;\n    *pzRankArgs = zRankArgs;\n  }\n  return rc;\n}\n\nstatic int sqlite3Fts5ConfigSetValue(\n  Fts5Config *pConfig,\n  const char *zKey,\n  sqlite3_value *pVal,\n  int *pbBadkey\n){\n  int rc = SQLITE_OK;\n\n  if( 0==sqlite3_stricmp(zKey, \"pgsz\") ){\n    int pgsz = 0;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      pgsz = sqlite3_value_int(pVal);\n    }\n    if( pgsz<32 || pgsz>FTS5_MAX_PAGE_SIZE ){\n      *pbBadkey = 1;\n    }else{\n      pConfig->pgsz = pgsz;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"hashsize\") ){\n    int nHashSize = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      nHashSize = sqlite3_value_int(pVal);\n    }\n    if( nHashSize<=0 ){\n      *pbBadkey = 1;\n    }else{\n      pConfig->nHashSize = nHashSize;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"automerge\") ){\n    int nAutomerge = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      nAutomerge = sqlite3_value_int(pVal);\n    }\n    if( nAutomerge<0 || nAutomerge>64 ){\n      *pbBadkey = 1;\n    }else{\n      if( nAutomerge==1 ) nAutomerge = FTS5_DEFAULT_AUTOMERGE;\n      pConfig->nAutomerge = nAutomerge;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"usermerge\") ){\n    int nUsermerge = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      nUsermerge = sqlite3_value_int(pVal);\n    }\n    if( nUsermerge<2 || nUsermerge>16 ){\n      *pbBadkey = 1;\n    }else{\n      pConfig->nUsermerge = nUsermerge;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"crisismerge\") ){\n    int nCrisisMerge = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      nCrisisMerge = sqlite3_value_int(pVal);\n    }\n    if( nCrisisMerge<0 ){\n      *pbBadkey = 1;\n    }else{\n      if( nCrisisMerge<=1 ) nCrisisMerge = FTS5_DEFAULT_CRISISMERGE;\n      if( nCrisisMerge>=FTS5_MAX_SEGMENT ) nCrisisMerge = FTS5_MAX_SEGMENT-1;\n      pConfig->nCrisisMerge = nCrisisMerge;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"deletemerge\") ){\n    int nVal = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      nVal = sqlite3_value_int(pVal);\n    }else{\n      *pbBadkey = 1;\n    }\n    if( nVal<0 ) nVal = FTS5_DEFAULT_DELETE_AUTOMERGE;\n    if( nVal>100 ) nVal = 0;\n    pConfig->nDeleteMerge = nVal;\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"rank\") ){\n    const char *zIn = (const char*)sqlite3_value_text(pVal);\n    char *zRank;\n    char *zRankArgs;\n    rc = sqlite3Fts5ConfigParseRank(zIn, &zRank, &zRankArgs);\n    if( rc==SQLITE_OK ){\n      sqlite3_free(pConfig->zRank);\n      sqlite3_free(pConfig->zRankArgs);\n      pConfig->zRank = zRank;\n      pConfig->zRankArgs = zRankArgs;\n    }else if( rc==SQLITE_ERROR ){\n      rc = SQLITE_OK;\n      *pbBadkey = 1;\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"secure-delete\") ){\n    int bVal = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      bVal = sqlite3_value_int(pVal);\n    }\n    if( bVal<0 ){\n      *pbBadkey = 1;\n    }else{\n      pConfig->bSecureDelete = (bVal ? 1 : 0);\n    }\n  }\n\n  else if( 0==sqlite3_stricmp(zKey, \"insttoken\") ){\n    int bVal = -1;\n    if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){\n      bVal = sqlite3_value_int(pVal);\n    }\n    if( bVal<0 ){\n      *pbBadkey = 1;\n    }else{\n      pConfig->bPrefixInsttoken = (bVal ? 1 : 0);\n    }\n\n  }else{\n    *pbBadkey = 1;\n  }\n  return rc;\n}\n\n/*\n** Load the contents of the %_config table into memory.\n*/\nstatic int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){\n  const char *zSelect = \"SELECT k, v FROM %Q.'%q_config'\";\n  char *zSql;\n  sqlite3_stmt *p = 0;\n  int rc = SQLITE_OK;\n  int iVersion = 0;\n\n  /* Set default values */\n  pConfig->pgsz = FTS5_DEFAULT_PAGE_SIZE;\n  pConfig->nAutomerge = FTS5_DEFAULT_AUTOMERGE;\n  pConfig->nUsermerge = FTS5_DEFAULT_USERMERGE;\n  pConfig->nCrisisMerge = FTS5_DEFAULT_CRISISMERGE;\n  pConfig->nHashSize = FTS5_DEFAULT_HASHSIZE;\n  pConfig->nDeleteMerge = FTS5_DEFAULT_DELETE_AUTOMERGE;\n\n  zSql = sqlite3Fts5Mprintf(&rc, zSelect, pConfig->zDb, pConfig->zName);\n  if( zSql ){\n    rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &p, 0);\n    sqlite3_free(zSql);\n  }\n\n  assert( rc==SQLITE_OK || p==0 );\n  if( rc==SQLITE_OK ){\n    while( SQLITE_ROW==sqlite3_step(p) ){\n      const char *zK = (const char*)sqlite3_column_text(p, 0);\n      sqlite3_value *pVal = sqlite3_column_value(p, 1);\n      if( 0==sqlite3_stricmp(zK, \"version\") ){\n        iVersion = sqlite3_value_int(pVal);\n      }else{\n        int bDummy = 0;\n        sqlite3Fts5ConfigSetValue(pConfig, zK, pVal, &bDummy);\n      }\n    }\n    rc = sqlite3_finalize(p);\n  }\n\n  if( rc==SQLITE_OK\n   && iVersion!=FTS5_CURRENT_VERSION\n   && iVersion!=FTS5_CURRENT_VERSION_SECUREDELETE\n  ){\n    rc = SQLITE_ERROR;\n    sqlite3Fts5ConfigErrmsg(pConfig, \"invalid fts5 file format \"\n        \"(found %d, expected %d or %d) - run 'rebuild'\",\n        iVersion, FTS5_CURRENT_VERSION, FTS5_CURRENT_VERSION_SECUREDELETE\n    );\n  }else{\n    pConfig->iVersion = iVersion;\n  }\n\n  if( rc==SQLITE_OK ){\n    pConfig->iCookie = iCookie;\n  }\n  return rc;\n}\n\n/*\n** Set (*pConfig->pzErrmsg) to point to an sqlite3_malloc()ed buffer\n** containing the error message created using printf() style formatting\n** string zFmt and its trailing arguments.\n*/\nstatic void sqlite3Fts5ConfigErrmsg(Fts5Config *pConfig, const char *zFmt, ...){\n  va_list ap;                     /* ... printf arguments */\n  char *zMsg = 0;\n\n  va_start(ap, zFmt);\n  zMsg = sqlite3_vmprintf(zFmt, ap);\n  if( pConfig->pzErrmsg ){\n    assert( *pConfig->pzErrmsg==0 );\n    *pConfig->pzErrmsg = zMsg;\n  }else{\n    sqlite3_free(zMsg);\n  }\n\n  va_end(ap);\n}\n\n\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n\n\n\n/* #include \"fts5Int.h\" */\n/* #include \"fts5parse.h\" */\n\n#ifndef SQLITE_FTS5_MAX_EXPR_DEPTH\n# define SQLITE_FTS5_MAX_EXPR_DEPTH 256\n#endif\n\n/*\n** All token types in the generated fts5parse.h file are greater than 0.\n*/\n#define FTS5_EOF 0\n\n#define FTS5_LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))\n\ntypedef struct Fts5ExprTerm Fts5ExprTerm;\n\n/*\n** Functions generated by lemon from fts5parse.y.\n*/\nstatic void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64));\nstatic void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*));\nstatic void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*);\n#ifndef NDEBUG\n/* #include <stdio.h> */\nstatic void sqlite3Fts5ParserTrace(FILE*, char*);\n#endif\nstatic int sqlite3Fts5ParserFallback(int);\n\n\nstruct Fts5Expr {\n  Fts5Index *pIndex;\n  Fts5Config *pConfig;\n  Fts5ExprNode *pRoot;\n  int bDesc;                      /* Iterate in descending rowid order */\n  int nPhrase;                    /* Number of phrases in expression */\n  Fts5ExprPhrase **apExprPhrase;  /* Pointers to phrase objects */\n};\n\n/*\n** eType:\n**   Expression node type. Usually one of:\n**\n**       FTS5_AND                 (nChild, apChild valid)\n**       FTS5_OR                  (nChild, apChild valid)\n**       FTS5_NOT                 (nChild, apChild valid)\n**       FTS5_STRING              (pNear valid)\n**       FTS5_TERM                (pNear valid)\n**\n**   An expression node with eType==0 may also exist. It always matches zero\n**   rows. This is created when a phrase containing no tokens is parsed.\n**   e.g. \"\".\n**\n** iHeight:\n**   Distance from this node to furthest leaf. This is always 0 for nodes\n**   of type FTS5_STRING and FTS5_TERM. For all other nodes it is one\n**   greater than the largest child value.\n*/\nstruct Fts5ExprNode {\n  int eType;                      /* Node type */\n  int bEof;                       /* True at EOF */\n  int bNomatch;                   /* True if entry is not a match */\n  int iHeight;                    /* Distance to tree leaf nodes */\n\n  /* Next method for this node. */\n  int (*xNext)(Fts5Expr*, Fts5ExprNode*, int, i64);\n\n  i64 iRowid;                     /* Current rowid */\n  Fts5ExprNearset *pNear;         /* For FTS5_STRING - cluster of phrases */\n\n  /* Child nodes. For a NOT node, this array always contains 2 entries. For\n  ** AND or OR nodes, it contains 2 or more entries.  */\n  int nChild;                     /* Number of child nodes */\n  Fts5ExprNode *apChild[FLEXARRAY]; /* Array of child nodes */\n};\n\n/* Size (in bytes) of an Fts5ExprNode object that holds up to N children */\n#define SZ_FTS5EXPRNODE(N) \\\n  (offsetof(Fts5ExprNode,apChild) + (N)*sizeof(Fts5ExprNode*))\n\n#define Fts5NodeIsString(p) ((p)->eType==FTS5_TERM || (p)->eType==FTS5_STRING)\n\n/*\n** Invoke the xNext method of an Fts5ExprNode object. This macro should be\n** used as if it has the same signature as the xNext() methods themselves.\n*/\n#define fts5ExprNodeNext(a,b,c,d) (b)->xNext((a), (b), (c), (d))\n\n/*\n** An instance of the following structure represents a single search term\n** or term prefix.\n*/\nstruct Fts5ExprTerm {\n  u8 bPrefix;                     /* True for a prefix term */\n  u8 bFirst;                      /* True if token must be first in column */\n  char *pTerm;                    /* Term data */\n  int nQueryTerm;                 /* Effective size of term in bytes */\n  int nFullTerm;                  /* Size of term in bytes incl. tokendata */\n  Fts5IndexIter *pIter;           /* Iterator for this term */\n  Fts5ExprTerm *pSynonym;         /* Pointer to first in list of synonyms */\n};\n\n/*\n** A phrase. One or more terms that must appear in a contiguous sequence\n** within a document for it to match.\n*/\nstruct Fts5ExprPhrase {\n  Fts5ExprNode *pNode;            /* FTS5_STRING node this phrase is part of */\n  Fts5Buffer poslist;             /* Current position list */\n  int nTerm;                      /* Number of entries in aTerm[] */\n  Fts5ExprTerm aTerm[FLEXARRAY];  /* Terms that make up this phrase */\n};\n\n/* Size (in bytes) of an Fts5ExprPhrase object that holds up to N terms */\n#define SZ_FTS5EXPRPHRASE(N) \\\n    (offsetof(Fts5ExprPhrase,aTerm) + (N)*sizeof(Fts5ExprTerm))\n\n/*\n** One or more phrases that must appear within a certain token distance of\n** each other within each matching document.\n*/\nstruct Fts5ExprNearset {\n  int nNear;                      /* NEAR parameter */\n  Fts5Colset *pColset;            /* Columns to search (NULL -> all columns) */\n  int nPhrase;                    /* Number of entries in aPhrase[] array */\n  Fts5ExprPhrase *apPhrase[FLEXARRAY]; /* Array of phrase pointers */\n};\n\n/* Size (in bytes) of an Fts5ExprNearset object covering up to N phrases */\n#define SZ_FTS5EXPRNEARSET(N) \\\n  (offsetof(Fts5ExprNearset,apPhrase)+(N)*sizeof(Fts5ExprPhrase*))\n\n/*\n** Parse context.\n*/\nstruct Fts5Parse {\n  Fts5Config *pConfig;\n  char *zErr;\n  int rc;\n  int nPhrase;                    /* Size of apPhrase array */\n  Fts5ExprPhrase **apPhrase;      /* Array of all phrases */\n  Fts5ExprNode *pExpr;            /* Result of a successful parse */\n  int bPhraseToAnd;               /* Convert \"a+b\" to \"a AND b\" */\n};\n\n/*\n** Check that the Fts5ExprNode.iHeight variables are set correctly in\n** the expression tree passed as the only argument.\n*/\n#ifndef NDEBUG\nstatic void assert_expr_depth_ok(int rc, Fts5ExprNode *p){\n  if( rc==SQLITE_OK ){\n    if( p->eType==FTS5_TERM || p->eType==FTS5_STRING || p->eType==0 ){\n      assert( p->iHeight==0 );\n    }else{\n      int ii;\n      int iMaxChild = 0;\n      for(ii=0; ii<p->nChild; ii++){\n        Fts5ExprNode *pChild = p->apChild[ii];\n        iMaxChild = MAX(iMaxChild, pChild->iHeight);\n        assert_expr_depth_ok(SQLITE_OK, pChild);\n      }\n      assert( p->iHeight==iMaxChild+1 );\n    }\n  }\n}\n#else\n# define assert_expr_depth_ok(rc, p)\n#endif\n\nstatic void sqlite3Fts5ParseError(Fts5Parse *pParse, const char *zFmt, ...){\n  va_list ap;\n  va_start(ap, zFmt);\n  if( pParse->rc==SQLITE_OK ){\n    assert( pParse->zErr==0 );\n    pParse->zErr = sqlite3_vmprintf(zFmt, ap);\n    pParse->rc = SQLITE_ERROR;\n  }\n  va_end(ap);\n}\n\nstatic int fts5ExprIsspace(char t){\n  return t==' ' || t=='\\t' || t=='\\n' || t=='\\r';\n}\n\n/*\n** Read the first token from the nul-terminated string at *pz.\n*/\nstatic int fts5ExprGetToken(\n  Fts5Parse *pParse,\n  const char **pz,                /* IN/OUT: Pointer into buffer */\n  Fts5Token *pToken\n){\n  const char *z = *pz;\n  int tok;\n\n  /* Skip past any whitespace */\n  while( fts5ExprIsspace(*z) ) z++;\n\n  pToken->p = z;\n  pToken->n = 1;\n  switch( *z ){\n    case '(':  tok = FTS5_LP;    break;\n    case ')':  tok = FTS5_RP;    break;\n    case '{':  tok = FTS5_LCP;   break;\n    case '}':  tok = FTS5_RCP;   break;\n    case ':':  tok = FTS5_COLON; break;\n    case ',':  tok = FTS5_COMMA; break;\n    case '+':  tok = FTS5_PLUS;  break;\n    case '*':  tok = FTS5_STAR;  break;\n    case '-':  tok = FTS5_MINUS; break;\n    case '^':  tok = FTS5_CARET; break;\n    case '\\0': tok = FTS5_EOF;   break;\n\n    case '\"': {\n      const char *z2;\n      tok = FTS5_STRING;\n\n      for(z2=&z[1]; 1; z2++){\n        if( z2[0]=='\"' ){\n          z2++;\n          if( z2[0]!='\"' ) break;\n        }\n        if( z2[0]=='\\0' ){\n          sqlite3Fts5ParseError(pParse, \"unterminated string\");\n          return FTS5_EOF;\n        }\n      }\n      pToken->n = (z2 - z);\n      break;\n    }\n\n    default: {\n      const char *z2;\n      if( sqlite3Fts5IsBareword(z[0])==0 ){\n        sqlite3Fts5ParseError(pParse, \"fts5: syntax error near \\\"%.1s\\\"\", z);\n        return FTS5_EOF;\n      }\n      tok = FTS5_STRING;\n      for(z2=&z[1]; sqlite3Fts5IsBareword(*z2); z2++);\n      pToken->n = (z2 - z);\n      if( pToken->n==2 && memcmp(pToken->p, \"OR\", 2)==0 )  tok = FTS5_OR;\n      if( pToken->n==3 && memcmp(pToken->p, \"NOT\", 3)==0 ) tok = FTS5_NOT;\n      if( pToken->n==3 && memcmp(pToken->p, \"AND\", 3)==0 ) tok = FTS5_AND;\n      break;\n    }\n  }\n\n  *pz = &pToken->p[pToken->n];\n  return tok;\n}\n\nstatic void *fts5ParseAlloc(u64 t){ return sqlite3_malloc64((sqlite3_int64)t);}\nstatic void fts5ParseFree(void *p){ sqlite3_free(p); }\n\nstatic int sqlite3Fts5ExprNew(\n  Fts5Config *pConfig,            /* FTS5 Configuration */\n  int bPhraseToAnd,\n  int iCol,\n  const char *zExpr,              /* Expression text */\n  Fts5Expr **ppNew,\n  char **pzErr\n){\n  Fts5Parse sParse;\n  Fts5Token token;\n  const char *z = zExpr;\n  int t;                          /* Next token type */\n  void *pEngine;\n  Fts5Expr *pNew;\n\n  *ppNew = 0;\n  *pzErr = 0;\n  memset(&sParse, 0, sizeof(sParse));\n  sParse.bPhraseToAnd = bPhraseToAnd;\n  pEngine = sqlite3Fts5ParserAlloc(fts5ParseAlloc);\n  if( pEngine==0 ){ return SQLITE_NOMEM; }\n  sParse.pConfig = pConfig;\n\n  do {\n    t = fts5ExprGetToken(&sParse, &z, &token);\n    sqlite3Fts5Parser(pEngine, t, token, &sParse);\n  }while( sParse.rc==SQLITE_OK && t!=FTS5_EOF );\n  sqlite3Fts5ParserFree(pEngine, fts5ParseFree);\n\n  assert( sParse.pExpr || sParse.rc!=SQLITE_OK );\n  assert_expr_depth_ok(sParse.rc, sParse.pExpr);\n\n  /* If the LHS of the MATCH expression was a user column, apply the\n  ** implicit column-filter.  */\n  if( sParse.rc==SQLITE_OK && iCol<pConfig->nCol ){\n    int n = SZ_FTS5COLSET(1);\n    Fts5Colset *pColset = (Fts5Colset*)sqlite3Fts5MallocZero(&sParse.rc, n);\n    if( pColset ){\n      pColset->nCol = 1;\n      pColset->aiCol[0] = iCol;\n      sqlite3Fts5ParseSetColset(&sParse, sParse.pExpr, pColset);\n    }\n  }\n\n  assert( sParse.rc!=SQLITE_OK || sParse.zErr==0 );\n  if( sParse.rc==SQLITE_OK ){\n    *ppNew = pNew = sqlite3_malloc(sizeof(Fts5Expr));\n    if( pNew==0 ){\n      sParse.rc = SQLITE_NOMEM;\n      sqlite3Fts5ParseNodeFree(sParse.pExpr);\n    }else{\n      pNew->pRoot = sParse.pExpr;\n      pNew->pIndex = 0;\n      pNew->pConfig = pConfig;\n      pNew->apExprPhrase = sParse.apPhrase;\n      pNew->nPhrase = sParse.nPhrase;\n      pNew->bDesc = 0;\n      sParse.apPhrase = 0;\n    }\n  }else{\n    sqlite3Fts5ParseNodeFree(sParse.pExpr);\n  }\n\n  sqlite3_free(sParse.apPhrase);\n  if( 0==*pzErr ){\n    *pzErr = sParse.zErr;\n  }else{\n    sqlite3_free(sParse.zErr);\n  }\n  return sParse.rc;\n}\n\n/*\n** Assuming that buffer z is at least nByte bytes in size and contains a\n** valid utf-8 string, return the number of characters in the string.\n*/\nstatic int fts5ExprCountChar(const char *z, int nByte){\n  int nRet = 0;\n  int ii;\n  for(ii=0; ii<nByte; ii++){\n    if( (z[ii] & 0xC0)!=0x80 ) nRet++;\n  }\n  return nRet;\n}\n\n/*\n** This function is only called when using the special 'trigram' tokenizer.\n** Argument zText contains the text of a LIKE or GLOB pattern matched\n** against column iCol. This function creates and compiles an FTS5 MATCH\n** expression that will match a superset of the rows matched by the LIKE or\n** GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error\n** code.\n*/\nstatic int sqlite3Fts5ExprPattern(\n  Fts5Config *pConfig, int bGlob, int iCol, const char *zText, Fts5Expr **pp\n){\n  i64 nText = strlen(zText);\n  char *zExpr = (char*)sqlite3_malloc64(nText*4 + 1);\n  int rc = SQLITE_OK;\n\n  if( zExpr==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    char aSpec[3];\n    int iOut = 0;\n    int i = 0;\n    int iFirst = 0;\n\n    if( bGlob==0 ){\n      aSpec[0] = '_';\n      aSpec[1] = '%';\n      aSpec[2] = 0;\n    }else{\n      aSpec[0] = '*';\n      aSpec[1] = '?';\n      aSpec[2] = '[';\n    }\n\n    while( i<=nText ){\n      if( i==nText\n       || zText[i]==aSpec[0] || zText[i]==aSpec[1] || zText[i]==aSpec[2]\n      ){\n\n        if( fts5ExprCountChar(&zText[iFirst], i-iFirst)>=3 ){\n          int jj;\n          zExpr[iOut++] = '\"';\n          for(jj=iFirst; jj<i; jj++){\n            zExpr[iOut++] = zText[jj];\n            if( zText[jj]=='\"' ) zExpr[iOut++] = '\"';\n          }\n          zExpr[iOut++] = '\"';\n          zExpr[iOut++] = ' ';\n        }\n        if( zText[i]==aSpec[2] ){\n          i += 2;\n          if( zText[i-1]=='^' ) i++;\n          while( i<nText && zText[i]!=']' ) i++;\n        }\n        iFirst = i+1;\n      }\n      i++;\n    }\n    if( iOut>0 ){\n      int bAnd = 0;\n      if( pConfig->eDetail!=FTS5_DETAIL_FULL ){\n        bAnd = 1;\n        if( pConfig->eDetail==FTS5_DETAIL_NONE ){\n          iCol = pConfig->nCol;\n        }\n      }\n      zExpr[iOut] = '\\0';\n      rc = sqlite3Fts5ExprNew(pConfig, bAnd, iCol, zExpr, pp,pConfig->pzErrmsg);\n    }else{\n      *pp = 0;\n    }\n    sqlite3_free(zExpr);\n  }\n\n  return rc;\n}\n\n/*\n** Free the expression node object passed as the only argument.\n*/\nstatic void sqlite3Fts5ParseNodeFree(Fts5ExprNode *p){\n  if( p ){\n    int i;\n    for(i=0; i<p->nChild; i++){\n      sqlite3Fts5ParseNodeFree(p->apChild[i]);\n    }\n    sqlite3Fts5ParseNearsetFree(p->pNear);\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Free the expression object passed as the only argument.\n*/\nstatic void sqlite3Fts5ExprFree(Fts5Expr *p){\n  if( p ){\n    sqlite3Fts5ParseNodeFree(p->pRoot);\n    sqlite3_free(p->apExprPhrase);\n    sqlite3_free(p);\n  }\n}\n\nstatic int sqlite3Fts5ExprAnd(Fts5Expr **pp1, Fts5Expr *p2){\n  Fts5Parse sParse;\n  memset(&sParse, 0, sizeof(sParse));\n\n  if( *pp1 && p2 ){\n    Fts5Expr *p1 = *pp1;\n    int nPhrase = p1->nPhrase + p2->nPhrase;\n\n    p1->pRoot = sqlite3Fts5ParseNode(&sParse, FTS5_AND, p1->pRoot, p2->pRoot,0);\n    p2->pRoot = 0;\n\n    if( sParse.rc==SQLITE_OK ){\n      Fts5ExprPhrase **ap = (Fts5ExprPhrase**)sqlite3_realloc(\n          p1->apExprPhrase, nPhrase * sizeof(Fts5ExprPhrase*)\n      );\n      if( ap==0 ){\n        sParse.rc = SQLITE_NOMEM;\n      }else{\n        int i;\n        memmove(&ap[p2->nPhrase], ap, p1->nPhrase*sizeof(Fts5ExprPhrase*));\n        for(i=0; i<p2->nPhrase; i++){\n          ap[i] = p2->apExprPhrase[i];\n        }\n        p1->nPhrase = nPhrase;\n        p1->apExprPhrase = ap;\n      }\n    }\n    sqlite3_free(p2->apExprPhrase);\n    sqlite3_free(p2);\n  }else if( p2 ){\n    *pp1 = p2;\n  }\n\n  return sParse.rc;\n}\n\n/*\n** Argument pTerm must be a synonym iterator. Return the current rowid\n** that it points to.\n*/\nstatic i64 fts5ExprSynonymRowid(Fts5ExprTerm *pTerm, int bDesc, int *pbEof){\n  i64 iRet = 0;\n  int bRetValid = 0;\n  Fts5ExprTerm *p;\n\n  assert( pTerm );\n  assert( pTerm->pSynonym );\n  assert( bDesc==0 || bDesc==1 );\n  for(p=pTerm; p; p=p->pSynonym){\n    if( 0==sqlite3Fts5IterEof(p->pIter) ){\n      i64 iRowid = p->pIter->iRowid;\n      if( bRetValid==0 || (bDesc!=(iRowid<iRet)) ){\n        iRet = iRowid;\n        bRetValid = 1;\n      }\n    }\n  }\n\n  if( pbEof && bRetValid==0 ) *pbEof = 1;\n  return iRet;\n}\n\n/*\n** Argument pTerm must be a synonym iterator.\n*/\nstatic int fts5ExprSynonymList(\n  Fts5ExprTerm *pTerm,\n  i64 iRowid,\n  Fts5Buffer *pBuf,               /* Use this buffer for space if required */\n  u8 **pa, int *pn\n){\n  Fts5PoslistReader aStatic[4];\n  Fts5PoslistReader *aIter = aStatic;\n  int nIter = 0;\n  int nAlloc = 4;\n  int rc = SQLITE_OK;\n  Fts5ExprTerm *p;\n\n  assert( pTerm->pSynonym );\n  for(p=pTerm; p; p=p->pSynonym){\n    Fts5IndexIter *pIter = p->pIter;\n    if( sqlite3Fts5IterEof(pIter)==0 && pIter->iRowid==iRowid ){\n      if( pIter->nData==0 ) continue;\n      if( nIter==nAlloc ){\n        sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * nAlloc * 2;\n        Fts5PoslistReader *aNew = (Fts5PoslistReader*)sqlite3_malloc64(nByte);\n        if( aNew==0 ){\n          rc = SQLITE_NOMEM;\n          goto synonym_poslist_out;\n        }\n        memcpy(aNew, aIter, sizeof(Fts5PoslistReader) * nIter);\n        nAlloc = nAlloc*2;\n        if( aIter!=aStatic ) sqlite3_free(aIter);\n        aIter = aNew;\n      }\n      sqlite3Fts5PoslistReaderInit(pIter->pData, pIter->nData, &aIter[nIter]);\n      assert( aIter[nIter].bEof==0 );\n      nIter++;\n    }\n  }\n\n  if( nIter==1 ){\n    *pa = (u8*)aIter[0].a;\n    *pn = aIter[0].n;\n  }else{\n    Fts5PoslistWriter writer = {0};\n    i64 iPrev = -1;\n    fts5BufferZero(pBuf);\n    while( 1 ){\n      int i;\n      i64 iMin = FTS5_LARGEST_INT64;\n      for(i=0; i<nIter; i++){\n        if( aIter[i].bEof==0 ){\n          if( aIter[i].iPos==iPrev ){\n            if( sqlite3Fts5PoslistReaderNext(&aIter[i]) ) continue;\n          }\n          if( aIter[i].iPos<iMin ){\n            iMin = aIter[i].iPos;\n          }\n        }\n      }\n      if( iMin==FTS5_LARGEST_INT64 || rc!=SQLITE_OK ) break;\n      rc = sqlite3Fts5PoslistWriterAppend(pBuf, &writer, iMin);\n      iPrev = iMin;\n    }\n    if( rc==SQLITE_OK ){\n      *pa = pBuf->p;\n      *pn = pBuf->n;\n    }\n  }\n\n synonym_poslist_out:\n  if( aIter!=aStatic ) sqlite3_free(aIter);\n  return rc;\n}\n\n\n/*\n** All individual term iterators in pPhrase are guaranteed to be valid and\n** pointing to the same rowid when this function is called. This function\n** checks if the current rowid really is a match, and if so populates\n** the pPhrase->poslist buffer accordingly. Output parameter *pbMatch\n** is set to true if this is really a match, or false otherwise.\n**\n** SQLITE_OK is returned if an error occurs, or an SQLite error code\n** otherwise. It is not considered an error code if the current rowid is\n** not a match.\n*/\nstatic int fts5ExprPhraseIsMatch(\n  Fts5ExprNode *pNode,            /* Node pPhrase belongs to */\n  Fts5ExprPhrase *pPhrase,        /* Phrase object to initialize */\n  int *pbMatch                    /* OUT: Set to true if really a match */\n){\n  Fts5PoslistWriter writer = {0};\n  Fts5PoslistReader aStatic[4];\n  Fts5PoslistReader *aIter = aStatic;\n  int i;\n  int rc = SQLITE_OK;\n  int bFirst = pPhrase->aTerm[0].bFirst;\n\n  fts5BufferZero(&pPhrase->poslist);\n\n  /* If the aStatic[] array is not large enough, allocate a large array\n  ** using sqlite3_malloc(). This approach could be improved upon. */\n  if( pPhrase->nTerm>ArraySize(aStatic) ){\n    sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm;\n    aIter = (Fts5PoslistReader*)sqlite3_malloc64(nByte);\n    if( !aIter ) return SQLITE_NOMEM;\n  }\n  memset(aIter, 0, sizeof(Fts5PoslistReader) * pPhrase->nTerm);\n\n  /* Initialize a term iterator for each term in the phrase */\n  for(i=0; i<pPhrase->nTerm; i++){\n    Fts5ExprTerm *pTerm = &pPhrase->aTerm[i];\n    int n = 0;\n    int bFlag = 0;\n    u8 *a = 0;\n    if( pTerm->pSynonym ){\n      Fts5Buffer buf = {0, 0, 0};\n      rc = fts5ExprSynonymList(pTerm, pNode->iRowid, &buf, &a, &n);\n      if( rc ){\n        sqlite3_free(a);\n        goto ismatch_out;\n      }\n      if( a==buf.p ) bFlag = 1;\n    }else{\n      a = (u8*)pTerm->pIter->pData;\n      n = pTerm->pIter->nData;\n    }\n    sqlite3Fts5PoslistReaderInit(a, n, &aIter[i]);\n    aIter[i].bFlag = (u8)bFlag;\n    if( aIter[i].bEof ) goto ismatch_out;\n  }\n\n  while( 1 ){\n    int bMatch;\n    i64 iPos = aIter[0].iPos;\n    do {\n      bMatch = 1;\n      for(i=0; i<pPhrase->nTerm; i++){\n        Fts5PoslistReader *pPos = &aIter[i];\n        i64 iAdj = iPos + i;\n        if( pPos->iPos!=iAdj ){\n          bMatch = 0;\n          while( pPos->iPos<iAdj ){\n            if( sqlite3Fts5PoslistReaderNext(pPos) ) goto ismatch_out;\n          }\n          if( pPos->iPos>iAdj ) iPos = pPos->iPos-i;\n        }\n      }\n    }while( bMatch==0 );\n\n    /* Append position iPos to the output */\n    if( bFirst==0 || FTS5_POS2OFFSET(iPos)==0 ){\n      rc = sqlite3Fts5PoslistWriterAppend(&pPhrase->poslist, &writer, iPos);\n      if( rc!=SQLITE_OK ) goto ismatch_out;\n    }\n\n    for(i=0; i<pPhrase->nTerm; i++){\n      if( sqlite3Fts5PoslistReaderNext(&aIter[i]) ) goto ismatch_out;\n    }\n  }\n\n ismatch_out:\n  *pbMatch = (pPhrase->poslist.n>0);\n  for(i=0; i<pPhrase->nTerm; i++){\n    if( aIter[i].bFlag ) sqlite3_free((u8*)aIter[i].a);\n  }\n  if( aIter!=aStatic ) sqlite3_free(aIter);\n  return rc;\n}\n\ntypedef struct Fts5LookaheadReader Fts5LookaheadReader;\nstruct Fts5LookaheadReader {\n  const u8 *a;                    /* Buffer containing position list */\n  int n;                          /* Size of buffer a[] in bytes */\n  int i;                          /* Current offset in position list */\n  i64 iPos;                       /* Current position */\n  i64 iLookahead;                 /* Next position */\n};\n\n#define FTS5_LOOKAHEAD_EOF (((i64)1) << 62)\n\nstatic int fts5LookaheadReaderNext(Fts5LookaheadReader *p){\n  p->iPos = p->iLookahead;\n  if( sqlite3Fts5PoslistNext64(p->a, p->n, &p->i, &p->iLookahead) ){\n    p->iLookahead = FTS5_LOOKAHEAD_EOF;\n  }\n  return (p->iPos==FTS5_LOOKAHEAD_EOF);\n}\n\nstatic int fts5LookaheadReaderInit(\n  const u8 *a, int n,             /* Buffer to read position list from */\n  Fts5LookaheadReader *p          /* Iterator object to initialize */\n){\n  memset(p, 0, sizeof(Fts5LookaheadReader));\n  p->a = a;\n  p->n = n;\n  fts5LookaheadReaderNext(p);\n  return fts5LookaheadReaderNext(p);\n}\n\ntypedef struct Fts5NearTrimmer Fts5NearTrimmer;\nstruct Fts5NearTrimmer {\n  Fts5LookaheadReader reader;     /* Input iterator */\n  Fts5PoslistWriter writer;       /* Writer context */\n  Fts5Buffer *pOut;               /* Output poslist */\n};\n\n/*\n** The near-set object passed as the first argument contains more than\n** one phrase. All phrases currently point to the same row. The\n** Fts5ExprPhrase.poslist buffers are populated accordingly. This function\n** tests if the current row contains instances of each phrase sufficiently\n** close together to meet the NEAR constraint. Non-zero is returned if it\n** does, or zero otherwise.\n**\n** If in/out parameter (*pRc) is set to other than SQLITE_OK when this\n** function is called, it is a no-op. Or, if an error (e.g. SQLITE_NOMEM)\n** occurs within this function (*pRc) is set accordingly before returning.\n** The return value is undefined in both these cases.\n**\n** If no error occurs and non-zero (a match) is returned, the position-list\n** of each phrase object is edited to contain only those entries that\n** meet the constraint before returning.\n*/\nstatic int fts5ExprNearIsMatch(int *pRc, Fts5ExprNearset *pNear){\n  Fts5NearTrimmer aStatic[4];\n  Fts5NearTrimmer *a = aStatic;\n  Fts5ExprPhrase **apPhrase = pNear->apPhrase;\n\n  int i;\n  int rc = *pRc;\n  int bMatch;\n\n  assert( pNear->nPhrase>1 );\n\n  /* If the aStatic[] array is not large enough, allocate a large array\n  ** using sqlite3_malloc(). This approach could be improved upon. */\n  if( pNear->nPhrase>ArraySize(aStatic) ){\n    sqlite3_int64 nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase;\n    a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte);\n  }else{\n    memset(aStatic, 0, sizeof(aStatic));\n  }\n  if( rc!=SQLITE_OK ){\n    *pRc = rc;\n    return 0;\n  }\n\n  /* Initialize a lookahead iterator for each phrase. After passing the\n  ** buffer and buffer size to the lookaside-reader init function, zero\n  ** the phrase poslist buffer. The new poslist for the phrase (containing\n  ** the same entries as the original with some entries removed on account\n  ** of the NEAR constraint) is written over the original even as it is\n  ** being read. This is safe as the entries for the new poslist are a\n  ** subset of the old, so it is not possible for data yet to be read to\n  ** be overwritten.  */\n  for(i=0; i<pNear->nPhrase; i++){\n    Fts5Buffer *pPoslist = &apPhrase[i]->poslist;\n    fts5LookaheadReaderInit(pPoslist->p, pPoslist->n, &a[i].reader);\n    pPoslist->n = 0;\n    a[i].pOut = pPoslist;\n  }\n\n  while( 1 ){\n    int iAdv;\n    i64 iMin;\n    i64 iMax;\n\n    /* This block advances the phrase iterators until they point to a set of\n    ** entries that together comprise a match.  */\n    iMax = a[0].reader.iPos;\n    do {\n      bMatch = 1;\n      for(i=0; i<pNear->nPhrase; i++){\n        Fts5LookaheadReader *pPos = &a[i].reader;\n        iMin = iMax - pNear->apPhrase[i]->nTerm - pNear->nNear;\n        if( pPos->iPos<iMin || pPos->iPos>iMax ){\n          bMatch = 0;\n          while( pPos->iPos<iMin ){\n            if( fts5LookaheadReaderNext(pPos) ) goto ismatch_out;\n          }\n          if( pPos->iPos>iMax ) iMax = pPos->iPos;\n        }\n      }\n    }while( bMatch==0 );\n\n    /* Add an entry to each output position list */\n    for(i=0; i<pNear->nPhrase; i++){\n      i64 iPos = a[i].reader.iPos;\n      Fts5PoslistWriter *pWriter = &a[i].writer;\n      if( a[i].pOut->n==0 || iPos!=pWriter->iPrev ){\n        sqlite3Fts5PoslistWriterAppend(a[i].pOut, pWriter, iPos);\n      }\n    }\n\n    iAdv = 0;\n    iMin = a[0].reader.iLookahead;\n    for(i=0; i<pNear->nPhrase; i++){\n      if( a[i].reader.iLookahead < iMin ){\n        iMin = a[i].reader.iLookahead;\n        iAdv = i;\n      }\n    }\n    if( fts5LookaheadReaderNext(&a[iAdv].reader) ) goto ismatch_out;\n  }\n\n  ismatch_out: {\n    int bRet = a[0].pOut->n>0;\n    *pRc = rc;\n    if( a!=aStatic ) sqlite3_free(a);\n    return bRet;\n  }\n}\n\n/*\n** Advance iterator pIter until it points to a value equal to or laster\n** than the initial value of *piLast. If this means the iterator points\n** to a value laster than *piLast, update *piLast to the new lastest value.\n**\n** If the iterator reaches EOF, set *pbEof to true before returning. If\n** an error occurs, set *pRc to an error code. If either *pbEof or *pRc\n** are set, return a non-zero value. Otherwise, return zero.\n*/\nstatic int fts5ExprAdvanceto(\n  Fts5IndexIter *pIter,           /* Iterator to advance */\n  int bDesc,                      /* True if iterator is \"rowid DESC\" */\n  i64 *piLast,                    /* IN/OUT: Lastest rowid seen so far */\n  int *pRc,                       /* OUT: Error code */\n  int *pbEof                      /* OUT: Set to true if EOF */\n){\n  i64 iLast = *piLast;\n  i64 iRowid;\n\n  iRowid = pIter->iRowid;\n  if( (bDesc==0 && iLast>iRowid) || (bDesc && iLast<iRowid) ){\n    int rc = sqlite3Fts5IterNextFrom(pIter, iLast);\n    if( rc || sqlite3Fts5IterEof(pIter) ){\n      *pRc = rc;\n      *pbEof = 1;\n      return 1;\n    }\n    iRowid = pIter->iRowid;\n    assert( (bDesc==0 && iRowid>=iLast) || (bDesc==1 && iRowid<=iLast) );\n  }\n  *piLast = iRowid;\n\n  return 0;\n}\n\nstatic int fts5ExprSynonymAdvanceto(\n  Fts5ExprTerm *pTerm,            /* Term iterator to advance */\n  int bDesc,                      /* True if iterator is \"rowid DESC\" */\n  i64 *piLast,                    /* IN/OUT: Lastest rowid seen so far */\n  int *pRc                        /* OUT: Error code */\n){\n  int rc = SQLITE_OK;\n  i64 iLast = *piLast;\n  Fts5ExprTerm *p;\n  int bEof = 0;\n\n  for(p=pTerm; rc==SQLITE_OK && p; p=p->pSynonym){\n    if( sqlite3Fts5IterEof(p->pIter)==0 ){\n      i64 iRowid = p->pIter->iRowid;\n      if( (bDesc==0 && iLast>iRowid) || (bDesc && iLast<iRowid) ){\n        rc = sqlite3Fts5IterNextFrom(p->pIter, iLast);\n      }\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    *pRc = rc;\n    bEof = 1;\n  }else{\n    *piLast = fts5ExprSynonymRowid(pTerm, bDesc, &bEof);\n  }\n  return bEof;\n}\n\n\nstatic int fts5ExprNearTest(\n  int *pRc,\n  Fts5Expr *pExpr,                /* Expression that pNear is a part of */\n  Fts5ExprNode *pNode             /* The \"NEAR\" node (FTS5_STRING) */\n){\n  Fts5ExprNearset *pNear = pNode->pNear;\n  int rc = *pRc;\n\n  if( pExpr->pConfig->eDetail!=FTS5_DETAIL_FULL ){\n    Fts5ExprTerm *pTerm;\n    Fts5ExprPhrase *pPhrase = pNear->apPhrase[0];\n    pPhrase->poslist.n = 0;\n    for(pTerm=&pPhrase->aTerm[0]; pTerm; pTerm=pTerm->pSynonym){\n      Fts5IndexIter *pIter = pTerm->pIter;\n      if( sqlite3Fts5IterEof(pIter)==0 ){\n        if( pIter->iRowid==pNode->iRowid && pIter->nData>0 ){\n          pPhrase->poslist.n = 1;\n        }\n      }\n    }\n    return pPhrase->poslist.n;\n  }else{\n    int i;\n\n    /* Check that each phrase in the nearset matches the current row.\n    ** Populate the pPhrase->poslist buffers at the same time. If any\n    ** phrase is not a match, break out of the loop early.  */\n    for(i=0; rc==SQLITE_OK && i<pNear->nPhrase; i++){\n      Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n      if( pPhrase->nTerm>1 || pPhrase->aTerm[0].pSynonym\n       || pNear->pColset || pPhrase->aTerm[0].bFirst\n      ){\n        int bMatch = 0;\n        rc = fts5ExprPhraseIsMatch(pNode, pPhrase, &bMatch);\n        if( bMatch==0 ) break;\n      }else{\n        Fts5IndexIter *pIter = pPhrase->aTerm[0].pIter;\n        fts5BufferSet(&rc, &pPhrase->poslist, pIter->nData, pIter->pData);\n      }\n    }\n\n    *pRc = rc;\n    if( i==pNear->nPhrase && (i==1 || fts5ExprNearIsMatch(pRc, pNear)) ){\n      return 1;\n    }\n    return 0;\n  }\n}\n\n\n/*\n** Initialize all term iterators in the pNear object. If any term is found\n** to match no documents at all, return immediately without initializing any\n** further iterators.\n**\n** If an error occurs, return an SQLite error code. Otherwise, return\n** SQLITE_OK. It is not considered an error if some term matches zero\n** documents.\n*/\nstatic int fts5ExprNearInitAll(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *pNode\n){\n  Fts5ExprNearset *pNear = pNode->pNear;\n  int i;\n\n  assert( pNode->bNomatch==0 );\n  for(i=0; i<pNear->nPhrase; i++){\n    Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n    if( pPhrase->nTerm==0 ){\n      pNode->bEof = 1;\n      return SQLITE_OK;\n    }else{\n      int j;\n      for(j=0; j<pPhrase->nTerm; j++){\n        Fts5ExprTerm *pTerm = &pPhrase->aTerm[j];\n        Fts5ExprTerm *p;\n        int bHit = 0;\n\n        for(p=pTerm; p; p=p->pSynonym){\n          int rc;\n          if( p->pIter ){\n            sqlite3Fts5IterClose(p->pIter);\n            p->pIter = 0;\n          }\n          rc = sqlite3Fts5IndexQuery(\n              pExpr->pIndex, p->pTerm, p->nQueryTerm,\n              (pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) |\n              (pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0),\n              pNear->pColset,\n              &p->pIter\n          );\n          assert( (rc==SQLITE_OK)==(p->pIter!=0) );\n          if( rc!=SQLITE_OK ) return rc;\n          if( 0==sqlite3Fts5IterEof(p->pIter) ){\n            bHit = 1;\n          }\n        }\n\n        if( bHit==0 ){\n          pNode->bEof = 1;\n          return SQLITE_OK;\n        }\n      }\n    }\n  }\n\n  pNode->bEof = 0;\n  return SQLITE_OK;\n}\n\n/*\n** If pExpr is an ASC iterator, this function returns a value with the\n** same sign as:\n**\n**   (iLhs - iRhs)\n**\n** Otherwise, if this is a DESC iterator, the opposite is returned:\n**\n**   (iRhs - iLhs)\n*/\nstatic int fts5RowidCmp(\n  Fts5Expr *pExpr,\n  i64 iLhs,\n  i64 iRhs\n){\n  assert( pExpr->bDesc==0 || pExpr->bDesc==1 );\n  if( pExpr->bDesc==0 ){\n    if( iLhs<iRhs ) return -1;\n    return (iLhs > iRhs);\n  }else{\n    if( iLhs>iRhs ) return -1;\n    return (iLhs < iRhs);\n  }\n}\n\nstatic void fts5ExprSetEof(Fts5ExprNode *pNode){\n  int i;\n  pNode->bEof = 1;\n  pNode->bNomatch = 0;\n  for(i=0; i<pNode->nChild; i++){\n    fts5ExprSetEof(pNode->apChild[i]);\n  }\n}\n\nstatic void fts5ExprNodeZeroPoslist(Fts5ExprNode *pNode){\n  if( pNode->eType==FTS5_STRING || pNode->eType==FTS5_TERM ){\n    Fts5ExprNearset *pNear = pNode->pNear;\n    int i;\n    for(i=0; i<pNear->nPhrase; i++){\n      Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n      pPhrase->poslist.n = 0;\n    }\n  }else{\n    int i;\n    for(i=0; i<pNode->nChild; i++){\n      fts5ExprNodeZeroPoslist(pNode->apChild[i]);\n    }\n  }\n}\n\n\n\n/*\n** Compare the values currently indicated by the two nodes as follows:\n**\n**    res = (*p1) - (*p2)\n**\n** Nodes that point to values that come later in the iteration order are\n** considered to be larger. Nodes at EOF are the largest of all.\n**\n** This means that if the iteration order is ASC, then numerically larger\n** rowids are considered larger. Or if it is the default DESC, numerically\n** smaller rowids are larger.\n*/\nstatic int fts5NodeCompare(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *p1,\n  Fts5ExprNode *p2\n){\n  if( p2->bEof ) return -1;\n  if( p1->bEof ) return +1;\n  return fts5RowidCmp(pExpr, p1->iRowid, p2->iRowid);\n}\n\n/*\n** All individual term iterators in pNear are guaranteed to be valid when\n** this function is called. This function checks if all term iterators\n** point to the same rowid, and if not, advances them until they do.\n** If an EOF is reached before this happens, *pbEof is set to true before\n** returning.\n**\n** SQLITE_OK is returned if an error occurs, or an SQLite error code\n** otherwise. It is not considered an error code if an iterator reaches\n** EOF.\n*/\nstatic int fts5ExprNodeTest_STRING(\n  Fts5Expr *pExpr,                /* Expression pPhrase belongs to */\n  Fts5ExprNode *pNode\n){\n  Fts5ExprNearset *pNear = pNode->pNear;\n  Fts5ExprPhrase *pLeft = pNear->apPhrase[0];\n  int rc = SQLITE_OK;\n  i64 iLast;                      /* Lastest rowid any iterator points to */\n  int i, j;                       /* Phrase and token index, respectively */\n  int bMatch;                     /* True if all terms are at the same rowid */\n  const int bDesc = pExpr->bDesc;\n\n  /* Check that this node should not be FTS5_TERM */\n  assert( pNear->nPhrase>1\n       || pNear->apPhrase[0]->nTerm>1\n       || pNear->apPhrase[0]->aTerm[0].pSynonym\n       || pNear->apPhrase[0]->aTerm[0].bFirst\n  );\n\n  /* Initialize iLast, the \"lastest\" rowid any iterator points to. If the\n  ** iterator skips through rowids in the default ascending order, this means\n  ** the maximum rowid. Or, if the iterator is \"ORDER BY rowid DESC\", then it\n  ** means the minimum rowid.  */\n  if( pLeft->aTerm[0].pSynonym ){\n    iLast = fts5ExprSynonymRowid(&pLeft->aTerm[0], bDesc, 0);\n  }else{\n    iLast = pLeft->aTerm[0].pIter->iRowid;\n  }\n\n  do {\n    bMatch = 1;\n    for(i=0; i<pNear->nPhrase; i++){\n      Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n      for(j=0; j<pPhrase->nTerm; j++){\n        Fts5ExprTerm *pTerm = &pPhrase->aTerm[j];\n        if( pTerm->pSynonym ){\n          i64 iRowid = fts5ExprSynonymRowid(pTerm, bDesc, 0);\n          if( iRowid==iLast ) continue;\n          bMatch = 0;\n          if( fts5ExprSynonymAdvanceto(pTerm, bDesc, &iLast, &rc) ){\n            pNode->bNomatch = 0;\n            pNode->bEof = 1;\n            return rc;\n          }\n        }else{\n          Fts5IndexIter *pIter = pPhrase->aTerm[j].pIter;\n          if( pIter->iRowid==iLast ) continue;\n          bMatch = 0;\n          if( fts5ExprAdvanceto(pIter, bDesc, &iLast, &rc, &pNode->bEof) ){\n            return rc;\n          }\n        }\n      }\n    }\n  }while( bMatch==0 );\n\n  pNode->iRowid = iLast;\n  pNode->bNomatch = ((0==fts5ExprNearTest(&rc, pExpr, pNode)) && rc==SQLITE_OK);\n  assert( pNode->bEof==0 || pNode->bNomatch==0 );\n\n  return rc;\n}\n\n/*\n** Advance the first term iterator in the first phrase of pNear. Set output\n** variable *pbEof to true if it reaches EOF or if an error occurs.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs.\n*/\nstatic int fts5ExprNodeNext_STRING(\n  Fts5Expr *pExpr,                /* Expression pPhrase belongs to */\n  Fts5ExprNode *pNode,            /* FTS5_STRING or FTS5_TERM node */\n  int bFromValid,\n  i64 iFrom\n){\n  Fts5ExprTerm *pTerm = &pNode->pNear->apPhrase[0]->aTerm[0];\n  int rc = SQLITE_OK;\n\n  pNode->bNomatch = 0;\n  if( pTerm->pSynonym ){\n    int bEof = 1;\n    Fts5ExprTerm *p;\n\n    /* Find the firstest rowid any synonym points to. */\n    i64 iRowid = fts5ExprSynonymRowid(pTerm, pExpr->bDesc, 0);\n\n    /* Advance each iterator that currently points to iRowid. Or, if iFrom\n    ** is valid - each iterator that points to a rowid before iFrom.  */\n    for(p=pTerm; p; p=p->pSynonym){\n      if( sqlite3Fts5IterEof(p->pIter)==0 ){\n        i64 ii = p->pIter->iRowid;\n        if( ii==iRowid\n         || (bFromValid && ii!=iFrom && (ii>iFrom)==pExpr->bDesc)\n        ){\n          if( bFromValid ){\n            rc = sqlite3Fts5IterNextFrom(p->pIter, iFrom);\n          }else{\n            rc = sqlite3Fts5IterNext(p->pIter);\n          }\n          if( rc!=SQLITE_OK ) break;\n          if( sqlite3Fts5IterEof(p->pIter)==0 ){\n            bEof = 0;\n          }\n        }else{\n          bEof = 0;\n        }\n      }\n    }\n\n    /* Set the EOF flag if either all synonym iterators are at EOF or an\n    ** error has occurred.  */\n    pNode->bEof = (rc || bEof);\n  }else{\n    Fts5IndexIter *pIter = pTerm->pIter;\n\n    assert( Fts5NodeIsString(pNode) );\n    if( bFromValid ){\n      rc = sqlite3Fts5IterNextFrom(pIter, iFrom);\n    }else{\n      rc = sqlite3Fts5IterNext(pIter);\n    }\n\n    pNode->bEof = (rc || sqlite3Fts5IterEof(pIter));\n  }\n\n  if( pNode->bEof==0 ){\n    assert( rc==SQLITE_OK );\n    rc = fts5ExprNodeTest_STRING(pExpr, pNode);\n  }\n\n  return rc;\n}\n\n\nstatic int fts5ExprNodeTest_TERM(\n  Fts5Expr *pExpr,                /* Expression that pNear is a part of */\n  Fts5ExprNode *pNode             /* The \"NEAR\" node (FTS5_TERM) */\n){\n  /* As this \"NEAR\" object is actually a single phrase that consists\n  ** of a single term only, grab pointers into the poslist managed by the\n  ** fts5_index.c iterator object. This is much faster than synthesizing\n  ** a new poslist the way we have to for more complicated phrase or NEAR\n  ** expressions.  */\n  Fts5ExprPhrase *pPhrase = pNode->pNear->apPhrase[0];\n  Fts5IndexIter *pIter = pPhrase->aTerm[0].pIter;\n\n  assert( pNode->eType==FTS5_TERM );\n  assert( pNode->pNear->nPhrase==1 && pPhrase->nTerm==1 );\n  assert( pPhrase->aTerm[0].pSynonym==0 );\n\n  pPhrase->poslist.n = pIter->nData;\n  if( pExpr->pConfig->eDetail==FTS5_DETAIL_FULL ){\n    pPhrase->poslist.p = (u8*)pIter->pData;\n  }\n  pNode->iRowid = pIter->iRowid;\n  pNode->bNomatch = (pPhrase->poslist.n==0);\n  return SQLITE_OK;\n}\n\n/*\n** xNext() method for a node of type FTS5_TERM.\n*/\nstatic int fts5ExprNodeNext_TERM(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *pNode,\n  int bFromValid,\n  i64 iFrom\n){\n  int rc;\n  Fts5IndexIter *pIter = pNode->pNear->apPhrase[0]->aTerm[0].pIter;\n\n  assert( pNode->bEof==0 );\n  if( bFromValid ){\n    rc = sqlite3Fts5IterNextFrom(pIter, iFrom);\n  }else{\n    rc = sqlite3Fts5IterNext(pIter);\n  }\n  if( rc==SQLITE_OK && sqlite3Fts5IterEof(pIter)==0 ){\n    rc = fts5ExprNodeTest_TERM(pExpr, pNode);\n  }else{\n    pNode->bEof = 1;\n    pNode->bNomatch = 0;\n  }\n  return rc;\n}\n\nstatic void fts5ExprNodeTest_OR(\n  Fts5Expr *pExpr,                /* Expression of which pNode is a part */\n  Fts5ExprNode *pNode             /* Expression node to test */\n){\n  Fts5ExprNode *pNext = pNode->apChild[0];\n  int i;\n\n  for(i=1; i<pNode->nChild; i++){\n    Fts5ExprNode *pChild = pNode->apChild[i];\n    int cmp = fts5NodeCompare(pExpr, pNext, pChild);\n    if( cmp>0 || (cmp==0 && pChild->bNomatch==0) ){\n      pNext = pChild;\n    }\n  }\n  pNode->iRowid = pNext->iRowid;\n  pNode->bEof = pNext->bEof;\n  pNode->bNomatch = pNext->bNomatch;\n}\n\nstatic int fts5ExprNodeNext_OR(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *pNode,\n  int bFromValid,\n  i64 iFrom\n){\n  int i;\n  i64 iLast = pNode->iRowid;\n\n  for(i=0; i<pNode->nChild; i++){\n    Fts5ExprNode *p1 = pNode->apChild[i];\n    assert( p1->bEof || fts5RowidCmp(pExpr, p1->iRowid, iLast)>=0 );\n    if( p1->bEof==0 ){\n      if( (p1->iRowid==iLast)\n       || (bFromValid && fts5RowidCmp(pExpr, p1->iRowid, iFrom)<0)\n      ){\n        int rc = fts5ExprNodeNext(pExpr, p1, bFromValid, iFrom);\n        if( rc!=SQLITE_OK ){\n          pNode->bNomatch = 0;\n          return rc;\n        }\n      }\n    }\n  }\n\n  fts5ExprNodeTest_OR(pExpr, pNode);\n  return SQLITE_OK;\n}\n\n/*\n** Argument pNode is an FTS5_AND node.\n*/\nstatic int fts5ExprNodeTest_AND(\n  Fts5Expr *pExpr,                /* Expression pPhrase belongs to */\n  Fts5ExprNode *pAnd              /* FTS5_AND node to advance */\n){\n  int iChild;\n  i64 iLast = pAnd->iRowid;\n  int rc = SQLITE_OK;\n  int bMatch;\n\n  assert( pAnd->bEof==0 );\n  do {\n    pAnd->bNomatch = 0;\n    bMatch = 1;\n    for(iChild=0; iChild<pAnd->nChild; iChild++){\n      Fts5ExprNode *pChild = pAnd->apChild[iChild];\n      int cmp = fts5RowidCmp(pExpr, iLast, pChild->iRowid);\n      if( cmp>0 ){\n        /* Advance pChild until it points to iLast or laster */\n        rc = fts5ExprNodeNext(pExpr, pChild, 1, iLast);\n        if( rc!=SQLITE_OK ){\n          pAnd->bNomatch = 0;\n          return rc;\n        }\n      }\n\n      /* If the child node is now at EOF, so is the parent AND node. Otherwise,\n      ** the child node is guaranteed to have advanced at least as far as\n      ** rowid iLast. So if it is not at exactly iLast, pChild->iRowid is the\n      ** new lastest rowid seen so far.  */\n      assert( pChild->bEof || fts5RowidCmp(pExpr, iLast, pChild->iRowid)<=0 );\n      if( pChild->bEof ){\n        fts5ExprSetEof(pAnd);\n        bMatch = 1;\n        break;\n      }else if( iLast!=pChild->iRowid ){\n        bMatch = 0;\n        iLast = pChild->iRowid;\n      }\n\n      if( pChild->bNomatch ){\n        pAnd->bNomatch = 1;\n      }\n    }\n  }while( bMatch==0 );\n\n  if( pAnd->bNomatch && pAnd!=pExpr->pRoot ){\n    fts5ExprNodeZeroPoslist(pAnd);\n  }\n  pAnd->iRowid = iLast;\n  return SQLITE_OK;\n}\n\nstatic int fts5ExprNodeNext_AND(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *pNode,\n  int bFromValid,\n  i64 iFrom\n){\n  int rc = fts5ExprNodeNext(pExpr, pNode->apChild[0], bFromValid, iFrom);\n  if( rc==SQLITE_OK ){\n    rc = fts5ExprNodeTest_AND(pExpr, pNode);\n  }else{\n    pNode->bNomatch = 0;\n  }\n  return rc;\n}\n\nstatic int fts5ExprNodeTest_NOT(\n  Fts5Expr *pExpr,                /* Expression pPhrase belongs to */\n  Fts5ExprNode *pNode             /* FTS5_NOT node to advance */\n){\n  int rc = SQLITE_OK;\n  Fts5ExprNode *p1 = pNode->apChild[0];\n  Fts5ExprNode *p2 = pNode->apChild[1];\n  assert( pNode->nChild==2 );\n\n  while( rc==SQLITE_OK && p1->bEof==0 ){\n    int cmp = fts5NodeCompare(pExpr, p1, p2);\n    if( cmp>0 ){\n      rc = fts5ExprNodeNext(pExpr, p2, 1, p1->iRowid);\n      cmp = fts5NodeCompare(pExpr, p1, p2);\n    }\n    assert( rc!=SQLITE_OK || cmp<=0 );\n    if( cmp || p2->bNomatch ) break;\n    rc = fts5ExprNodeNext(pExpr, p1, 0, 0);\n  }\n  pNode->bEof = p1->bEof;\n  pNode->bNomatch = p1->bNomatch;\n  pNode->iRowid = p1->iRowid;\n  if( p1->bEof ){\n    fts5ExprNodeZeroPoslist(p2);\n  }\n  return rc;\n}\n\nstatic int fts5ExprNodeNext_NOT(\n  Fts5Expr *pExpr,\n  Fts5ExprNode *pNode,\n  int bFromValid,\n  i64 iFrom\n){\n  int rc = fts5ExprNodeNext(pExpr, pNode->apChild[0], bFromValid, iFrom);\n  if( rc==SQLITE_OK ){\n    rc = fts5ExprNodeTest_NOT(pExpr, pNode);\n  }\n  if( rc!=SQLITE_OK ){\n    pNode->bNomatch = 0;\n  }\n  return rc;\n}\n\n/*\n** If pNode currently points to a match, this function returns SQLITE_OK\n** without modifying it. Otherwise, pNode is advanced until it does point\n** to a match or EOF is reached.\n*/\nstatic int fts5ExprNodeTest(\n  Fts5Expr *pExpr,                /* Expression of which pNode is a part */\n  Fts5ExprNode *pNode             /* Expression node to test */\n){\n  int rc = SQLITE_OK;\n  if( pNode->bEof==0 ){\n    switch( pNode->eType ){\n\n      case FTS5_STRING: {\n        rc = fts5ExprNodeTest_STRING(pExpr, pNode);\n        break;\n      }\n\n      case FTS5_TERM: {\n        rc = fts5ExprNodeTest_TERM(pExpr, pNode);\n        break;\n      }\n\n      case FTS5_AND: {\n        rc = fts5ExprNodeTest_AND(pExpr, pNode);\n        break;\n      }\n\n      case FTS5_OR: {\n        fts5ExprNodeTest_OR(pExpr, pNode);\n        break;\n      }\n\n      default: assert( pNode->eType==FTS5_NOT ); {\n        rc = fts5ExprNodeTest_NOT(pExpr, pNode);\n        break;\n      }\n    }\n  }\n  return rc;\n}\n\n\n/*\n** Set node pNode, which is part of expression pExpr, to point to the first\n** match. If there are no matches, set the Node.bEof flag to indicate EOF.\n**\n** Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.\n** It is not an error if there are no matches.\n*/\nstatic int fts5ExprNodeFirst(Fts5Expr *pExpr, Fts5ExprNode *pNode){\n  int rc = SQLITE_OK;\n  pNode->bEof = 0;\n  pNode->bNomatch = 0;\n\n  if( Fts5NodeIsString(pNode) ){\n    /* Initialize all term iterators in the NEAR object. */\n    rc = fts5ExprNearInitAll(pExpr, pNode);\n  }else if( pNode->xNext==0 ){\n    pNode->bEof = 1;\n  }else{\n    int i;\n    int nEof = 0;\n    for(i=0; i<pNode->nChild && rc==SQLITE_OK; i++){\n      Fts5ExprNode *pChild = pNode->apChild[i];\n      rc = fts5ExprNodeFirst(pExpr, pNode->apChild[i]);\n      assert( pChild->bEof==0 || pChild->bEof==1 );\n      nEof += pChild->bEof;\n    }\n    pNode->iRowid = pNode->apChild[0]->iRowid;\n\n    switch( pNode->eType ){\n      case FTS5_AND:\n        if( nEof>0 ) fts5ExprSetEof(pNode);\n        break;\n\n      case FTS5_OR:\n        if( pNode->nChild==nEof ) fts5ExprSetEof(pNode);\n        break;\n\n      default:\n        assert( pNode->eType==FTS5_NOT );\n        pNode->bEof = pNode->apChild[0]->bEof;\n        break;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = fts5ExprNodeTest(pExpr, pNode);\n  }\n  return rc;\n}\n\n\n/*\n** Begin iterating through the set of documents in index pIdx matched by\n** the MATCH expression passed as the first argument. If the \"bDesc\"\n** parameter is passed a non-zero value, iteration is in descending rowid\n** order. Or, if it is zero, in ascending order.\n**\n** If iterating in ascending rowid order (bDesc==0), the first document\n** visited is that with the smallest rowid that is larger than or equal\n** to parameter iFirst. Or, if iterating in ascending order (bDesc==1),\n** then the first document visited must have a rowid smaller than or\n** equal to iFirst.\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise. It\n** is not considered an error if the query does not match any documents.\n*/\nstatic int sqlite3Fts5ExprFirst(\n  Fts5Expr *p,\n  Fts5Index *pIdx,\n  i64 iFirst,\n  i64 iLast,\n  int bDesc\n){\n  Fts5ExprNode *pRoot = p->pRoot;\n  int rc;                         /* Return code */\n\n  p->pIndex = pIdx;\n  p->bDesc = bDesc;\n  rc = fts5ExprNodeFirst(p, pRoot);\n\n  /* If not at EOF but the current rowid occurs earlier than iFirst in\n  ** the iteration order, move to document iFirst or later. */\n  if( rc==SQLITE_OK\n   && 0==pRoot->bEof\n   && fts5RowidCmp(p, pRoot->iRowid, iFirst)<0\n  ){\n    rc = fts5ExprNodeNext(p, pRoot, 1, iFirst);\n  }\n\n  /* If the iterator is not at a real match, skip forward until it is. */\n  while( pRoot->bNomatch && rc==SQLITE_OK ){\n    assert( pRoot->bEof==0 );\n    rc = fts5ExprNodeNext(p, pRoot, 0, 0);\n  }\n  if( fts5RowidCmp(p, pRoot->iRowid, iLast)>0 ){\n    pRoot->bEof = 1;\n  }\n  return rc;\n}\n\n/*\n** Move to the next document\n**\n** Return SQLITE_OK if successful, or an SQLite error code otherwise. It\n** is not considered an error if the query does not match any documents.\n*/\nstatic int sqlite3Fts5ExprNext(Fts5Expr *p, i64 iLast){\n  int rc;\n  Fts5ExprNode *pRoot = p->pRoot;\n  assert( pRoot->bEof==0 && pRoot->bNomatch==0 );\n  do {\n    rc = fts5ExprNodeNext(p, pRoot, 0, 0);\n    assert( pRoot->bNomatch==0 || (rc==SQLITE_OK && pRoot->bEof==0) );\n  }while( pRoot->bNomatch );\n  if( fts5RowidCmp(p, pRoot->iRowid, iLast)>0 ){\n    pRoot->bEof = 1;\n  }\n  return rc;\n}\n\nstatic int sqlite3Fts5ExprEof(Fts5Expr *p){\n  return p->pRoot->bEof;\n}\n\nstatic i64 sqlite3Fts5ExprRowid(Fts5Expr *p){\n  return p->pRoot->iRowid;\n}\n\nstatic int fts5ParseStringFromToken(Fts5Token *pToken, char **pz){\n  int rc = SQLITE_OK;\n  *pz = sqlite3Fts5Strndup(&rc, pToken->p, pToken->n);\n  return rc;\n}\n\n/*\n** Free the phrase object passed as the only argument.\n*/\nstatic void fts5ExprPhraseFree(Fts5ExprPhrase *pPhrase){\n  if( pPhrase ){\n    int i;\n    for(i=0; i<pPhrase->nTerm; i++){\n      Fts5ExprTerm *pSyn;\n      Fts5ExprTerm *pNext;\n      Fts5ExprTerm *pTerm = &pPhrase->aTerm[i];\n      sqlite3_free(pTerm->pTerm);\n      sqlite3Fts5IterClose(pTerm->pIter);\n      for(pSyn=pTerm->pSynonym; pSyn; pSyn=pNext){\n        pNext = pSyn->pSynonym;\n        sqlite3Fts5IterClose(pSyn->pIter);\n        fts5BufferFree((Fts5Buffer*)&pSyn[1]);\n        sqlite3_free(pSyn);\n      }\n    }\n    if( pPhrase->poslist.nSpace>0 ) fts5BufferFree(&pPhrase->poslist);\n    sqlite3_free(pPhrase);\n  }\n}\n\n/*\n** Set the \"bFirst\" flag on the first token of the phrase passed as the\n** only argument.\n*/\nstatic void sqlite3Fts5ParseSetCaret(Fts5ExprPhrase *pPhrase){\n  if( pPhrase && pPhrase->nTerm ){\n    pPhrase->aTerm[0].bFirst = 1;\n  }\n}\n\n/*\n** If argument pNear is NULL, then a new Fts5ExprNearset object is allocated\n** and populated with pPhrase. Or, if pNear is not NULL, phrase pPhrase is\n** appended to it and the results returned.\n**\n** If an OOM error occurs, both the pNear and pPhrase objects are freed and\n** NULL returned.\n*/\nstatic Fts5ExprNearset *sqlite3Fts5ParseNearset(\n  Fts5Parse *pParse,              /* Parse context */\n  Fts5ExprNearset *pNear,         /* Existing nearset, or NULL */\n  Fts5ExprPhrase *pPhrase         /* Recently parsed phrase */\n){\n  const int SZALLOC = 8;\n  Fts5ExprNearset *pRet = 0;\n\n  if( pParse->rc==SQLITE_OK ){\n    if( pNear==0 ){\n      sqlite3_int64 nByte;\n      nByte = SZ_FTS5EXPRNEARSET(SZALLOC+1);\n      pRet = sqlite3_malloc64(nByte);\n      if( pRet==0 ){\n        pParse->rc = SQLITE_NOMEM;\n      }else{\n        memset(pRet, 0, (size_t)nByte);\n      }\n    }else if( (pNear->nPhrase % SZALLOC)==0 ){\n      int nNew = pNear->nPhrase + SZALLOC;\n      sqlite3_int64 nByte;\n\n      nByte = SZ_FTS5EXPRNEARSET(nNew+1);\n      pRet = (Fts5ExprNearset*)sqlite3_realloc64(pNear, nByte);\n      if( pRet==0 ){\n        pParse->rc = SQLITE_NOMEM;\n      }\n    }else{\n      pRet = pNear;\n    }\n  }\n\n  if( pRet==0 ){\n    assert( pParse->rc!=SQLITE_OK );\n    sqlite3Fts5ParseNearsetFree(pNear);\n    sqlite3Fts5ParsePhraseFree(pPhrase);\n  }else{\n    if( pRet->nPhrase>0 ){\n      Fts5ExprPhrase *pLast = pRet->apPhrase[pRet->nPhrase-1];\n      assert( pParse!=0 );\n      assert( pParse->apPhrase!=0 );\n      assert( pParse->nPhrase>=2 );\n      assert( pLast==pParse->apPhrase[pParse->nPhrase-2] );\n      if( pPhrase->nTerm==0 ){\n        fts5ExprPhraseFree(pPhrase);\n        pRet->nPhrase--;\n        pParse->nPhrase--;\n        pPhrase = pLast;\n      }else if( pLast->nTerm==0 ){\n        fts5ExprPhraseFree(pLast);\n        pParse->apPhrase[pParse->nPhrase-2] = pPhrase;\n        pParse->nPhrase--;\n        pRet->nPhrase--;\n      }\n    }\n    pRet->apPhrase[pRet->nPhrase++] = pPhrase;\n  }\n  return pRet;\n}\n\ntypedef struct TokenCtx TokenCtx;\nstruct TokenCtx {\n  Fts5ExprPhrase *pPhrase;\n  Fts5Config *pConfig;\n  int rc;\n};\n\n/*\n** Callback for tokenizing terms used by ParseTerm().\n*/\nstatic int fts5ParseTokenize(\n  void *pContext,                 /* Pointer to Fts5InsertCtx object */\n  int tflags,                     /* Mask of FTS5_TOKEN_* flags */\n  const char *pToken,             /* Buffer containing token */\n  int nToken,                     /* Size of token in bytes */\n  int iUnused1,                   /* Start offset of token */\n  int iUnused2                    /* End offset of token */\n){\n  int rc = SQLITE_OK;\n  const int SZALLOC = 8;\n  TokenCtx *pCtx = (TokenCtx*)pContext;\n  Fts5ExprPhrase *pPhrase = pCtx->pPhrase;\n\n  UNUSED_PARAM2(iUnused1, iUnused2);\n\n  /* If an error has already occurred, this is a no-op */\n  if( pCtx->rc!=SQLITE_OK ) return pCtx->rc;\n  if( nToken>FTS5_MAX_TOKEN_SIZE ) nToken = FTS5_MAX_TOKEN_SIZE;\n\n  if( pPhrase && pPhrase->nTerm>0 && (tflags & FTS5_TOKEN_COLOCATED) ){\n    Fts5ExprTerm *pSyn;\n    sqlite3_int64 nByte = sizeof(Fts5ExprTerm) + sizeof(Fts5Buffer) + nToken+1;\n    pSyn = (Fts5ExprTerm*)sqlite3_malloc64(nByte);\n    if( pSyn==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(pSyn, 0, (size_t)nByte);\n      pSyn->pTerm = ((char*)pSyn) + sizeof(Fts5ExprTerm) + sizeof(Fts5Buffer);\n      pSyn->nFullTerm = pSyn->nQueryTerm = nToken;\n      if( pCtx->pConfig->bTokendata ){\n        pSyn->nQueryTerm = (int)strlen(pSyn->pTerm);\n      }\n      memcpy(pSyn->pTerm, pToken, nToken);\n      pSyn->pSynonym = pPhrase->aTerm[pPhrase->nTerm-1].pSynonym;\n      pPhrase->aTerm[pPhrase->nTerm-1].pSynonym = pSyn;\n    }\n  }else{\n    Fts5ExprTerm *pTerm;\n    if( pPhrase==0 || (pPhrase->nTerm % SZALLOC)==0 ){\n      Fts5ExprPhrase *pNew;\n      int nNew = SZALLOC + (pPhrase ? pPhrase->nTerm : 0);\n\n      pNew = (Fts5ExprPhrase*)sqlite3_realloc64(pPhrase,\n          SZ_FTS5EXPRPHRASE(nNew+1)\n      );\n      if( pNew==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        if( pPhrase==0 ) memset(pNew, 0, SZ_FTS5EXPRPHRASE(1));\n        pCtx->pPhrase = pPhrase = pNew;\n        pNew->nTerm = nNew - SZALLOC;\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      pTerm = &pPhrase->aTerm[pPhrase->nTerm++];\n      memset(pTerm, 0, sizeof(Fts5ExprTerm));\n      pTerm->pTerm = sqlite3Fts5Strndup(&rc, pToken, nToken);\n      pTerm->nFullTerm = pTerm->nQueryTerm = nToken;\n      if( pCtx->pConfig->bTokendata && rc==SQLITE_OK ){\n        pTerm->nQueryTerm = (int)strlen(pTerm->pTerm);\n      }\n    }\n  }\n\n  pCtx->rc = rc;\n  return rc;\n}\n\n\n/*\n** Free the phrase object passed as the only argument.\n*/\nstatic void sqlite3Fts5ParsePhraseFree(Fts5ExprPhrase *pPhrase){\n  fts5ExprPhraseFree(pPhrase);\n}\n\n/*\n** Free the phrase object passed as the second argument.\n*/\nstatic void sqlite3Fts5ParseNearsetFree(Fts5ExprNearset *pNear){\n  if( pNear ){\n    int i;\n    for(i=0; i<pNear->nPhrase; i++){\n      fts5ExprPhraseFree(pNear->apPhrase[i]);\n    }\n    sqlite3_free(pNear->pColset);\n    sqlite3_free(pNear);\n  }\n}\n\nstatic void sqlite3Fts5ParseFinished(Fts5Parse *pParse, Fts5ExprNode *p){\n  assert( pParse->pExpr==0 );\n  pParse->pExpr = p;\n}\n\nstatic int parseGrowPhraseArray(Fts5Parse *pParse){\n  if( (pParse->nPhrase % 8)==0 ){\n    sqlite3_int64 nByte = sizeof(Fts5ExprPhrase*) * (pParse->nPhrase + 8);\n    Fts5ExprPhrase **apNew;\n    apNew = (Fts5ExprPhrase**)sqlite3_realloc64(pParse->apPhrase, nByte);\n    if( apNew==0 ){\n      pParse->rc = SQLITE_NOMEM;\n      return SQLITE_NOMEM;\n    }\n    pParse->apPhrase = apNew;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** This function is called by the parser to process a string token. The\n** string may or may not be quoted. In any case it is tokenized and a\n** phrase object consisting of all tokens returned.\n*/\nstatic Fts5ExprPhrase *sqlite3Fts5ParseTerm(\n  Fts5Parse *pParse,              /* Parse context */\n  Fts5ExprPhrase *pAppend,        /* Phrase to append to */\n  Fts5Token *pToken,              /* String to tokenize */\n  int bPrefix                     /* True if there is a trailing \"*\" */\n){\n  Fts5Config *pConfig = pParse->pConfig;\n  TokenCtx sCtx;                  /* Context object passed to callback */\n  int rc;                         /* Tokenize return code */\n  char *z = 0;\n\n  memset(&sCtx, 0, sizeof(TokenCtx));\n  sCtx.pPhrase = pAppend;\n  sCtx.pConfig = pConfig;\n\n  rc = fts5ParseStringFromToken(pToken, &z);\n  if( rc==SQLITE_OK ){\n    int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_PREFIX : 0);\n    int n;\n    sqlite3Fts5Dequote(z);\n    n = (int)strlen(z);\n    rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize);\n  }\n  sqlite3_free(z);\n  if( rc || (rc = sCtx.rc) ){\n    pParse->rc = rc;\n    fts5ExprPhraseFree(sCtx.pPhrase);\n    sCtx.pPhrase = 0;\n  }else{\n\n    if( pAppend==0 ){\n      if( parseGrowPhraseArray(pParse) ){\n        fts5ExprPhraseFree(sCtx.pPhrase);\n        return 0;\n      }\n      pParse->nPhrase++;\n    }\n\n    if( sCtx.pPhrase==0 ){\n      /* This happens when parsing a token or quoted phrase that contains\n      ** no token characters at all. (e.g ... MATCH '\"\"'). */\n      sCtx.pPhrase = sqlite3Fts5MallocZero(&pParse->rc, SZ_FTS5EXPRPHRASE(1));\n    }else if( sCtx.pPhrase->nTerm ){\n      sCtx.pPhrase->aTerm[sCtx.pPhrase->nTerm-1].bPrefix = (u8)bPrefix;\n    }\n    assert( pParse->apPhrase!=0 );\n    pParse->apPhrase[pParse->nPhrase-1] = sCtx.pPhrase;\n  }\n\n  return sCtx.pPhrase;\n}\n\n/*\n** Create a new FTS5 expression by cloning phrase iPhrase of the\n** expression passed as the second argument.\n*/\nstatic int sqlite3Fts5ExprClonePhrase(\n  Fts5Expr *pExpr,\n  int iPhrase,\n  Fts5Expr **ppNew\n){\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5ExprPhrase *pOrig = 0;      /* The phrase extracted from pExpr */\n  Fts5Expr *pNew = 0;             /* Expression to return via *ppNew */\n  TokenCtx sCtx = {0,0,0};        /* Context object for fts5ParseTokenize */\n  if( !pExpr || iPhrase<0 || iPhrase>=pExpr->nPhrase ){\n    rc = SQLITE_RANGE;\n  }else{\n    pOrig = pExpr->apExprPhrase[iPhrase];\n    pNew = (Fts5Expr*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Expr));\n  }\n  if( rc==SQLITE_OK ){\n    pNew->apExprPhrase = (Fts5ExprPhrase**)sqlite3Fts5MallocZero(&rc,\n        sizeof(Fts5ExprPhrase*));\n  }\n  if( rc==SQLITE_OK ){\n    pNew->pRoot = (Fts5ExprNode*)sqlite3Fts5MallocZero(&rc, SZ_FTS5EXPRNODE(1));\n  }\n  if( rc==SQLITE_OK ){\n    pNew->pRoot->pNear = (Fts5ExprNearset*)sqlite3Fts5MallocZero(&rc,\n                                                    SZ_FTS5EXPRNEARSET(2));\n  }\n  if( rc==SQLITE_OK && ALWAYS(pOrig!=0) ){\n    Fts5Colset *pColsetOrig = pOrig->pNode->pNear->pColset;\n    if( pColsetOrig ){\n      sqlite3_int64 nByte;\n      Fts5Colset *pColset;\n      nByte = SZ_FTS5COLSET(pColsetOrig->nCol);\n      pColset = (Fts5Colset*)sqlite3Fts5MallocZero(&rc, nByte);\n      if( pColset ){\n        memcpy(pColset, pColsetOrig, (size_t)nByte);\n      }\n      pNew->pRoot->pNear->pColset = pColset;\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    if( pOrig->nTerm ){\n      int i;                          /* Used to iterate through phrase terms */\n      sCtx.pConfig = pExpr->pConfig;\n      for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){\n        int tflags = 0;\n        Fts5ExprTerm *p;\n        for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){\n          rc = fts5ParseTokenize((void*)&sCtx,tflags,p->pTerm,p->nFullTerm,0,0);\n          tflags = FTS5_TOKEN_COLOCATED;\n        }\n        if( rc==SQLITE_OK ){\n          sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix;\n          sCtx.pPhrase->aTerm[i].bFirst = pOrig->aTerm[i].bFirst;\n        }\n      }\n    }else{\n      /* This happens when parsing a token or quoted phrase that contains\n      ** no token characters at all. (e.g ... MATCH '\"\"'). */\n      sCtx.pPhrase = sqlite3Fts5MallocZero(&rc, SZ_FTS5EXPRPHRASE(1));\n    }\n  }\n\n  if( rc==SQLITE_OK && ALWAYS(sCtx.pPhrase) ){\n    /* All the allocations succeeded. Put the expression object together. */\n    pNew->pIndex = pExpr->pIndex;\n    pNew->pConfig = pExpr->pConfig;\n    pNew->nPhrase = 1;\n    pNew->apExprPhrase[0] = sCtx.pPhrase;\n    pNew->pRoot->pNear->apPhrase[0] = sCtx.pPhrase;\n    pNew->pRoot->pNear->nPhrase = 1;\n    sCtx.pPhrase->pNode = pNew->pRoot;\n\n    if( pOrig->nTerm==1\n     && pOrig->aTerm[0].pSynonym==0\n     && pOrig->aTerm[0].bFirst==0\n    ){\n      pNew->pRoot->eType = FTS5_TERM;\n      pNew->pRoot->xNext = fts5ExprNodeNext_TERM;\n    }else{\n      pNew->pRoot->eType = FTS5_STRING;\n      pNew->pRoot->xNext = fts5ExprNodeNext_STRING;\n    }\n  }else{\n    sqlite3Fts5ExprFree(pNew);\n    fts5ExprPhraseFree(sCtx.pPhrase);\n    pNew = 0;\n  }\n\n  *ppNew = pNew;\n  return rc;\n}\n\n\n/*\n** Token pTok has appeared in a MATCH expression where the NEAR operator\n** is expected. If token pTok does not contain \"NEAR\", store an error\n** in the pParse object.\n*/\nstatic void sqlite3Fts5ParseNear(Fts5Parse *pParse, Fts5Token *pTok){\n  if( pTok->n!=4 || memcmp(\"NEAR\", pTok->p, 4) ){\n    sqlite3Fts5ParseError(\n        pParse, \"fts5: syntax error near \\\"%.*s\\\"\", pTok->n, pTok->p\n    );\n  }\n}\n\nstatic void sqlite3Fts5ParseSetDistance(\n  Fts5Parse *pParse,\n  Fts5ExprNearset *pNear,\n  Fts5Token *p\n){\n  if( pNear ){\n    int nNear = 0;\n    int i;\n    if( p->n ){\n      for(i=0; i<p->n; i++){\n        char c = (char)p->p[i];\n        if( c<'0' || c>'9' ){\n          sqlite3Fts5ParseError(\n              pParse, \"expected integer, got \\\"%.*s\\\"\", p->n, p->p\n              );\n          return;\n        }\n        if( nNear<214748363 ) nNear = nNear * 10 + (p->p[i] - '0');\n        /*  ^^^^^^^^^^^^^^^---  Prevent integer overflow */\n      }\n    }else{\n      nNear = FTS5_DEFAULT_NEARDIST;\n    }\n    pNear->nNear = nNear;\n  }\n}\n\n/*\n** The second argument passed to this function may be NULL, or it may be\n** an existing Fts5Colset object. This function returns a pointer to\n** a new colset object containing the contents of (p) with new value column\n** number iCol appended.\n**\n** If an OOM error occurs, store an error code in pParse and return NULL.\n** The old colset object (if any) is not freed in this case.\n*/\nstatic Fts5Colset *fts5ParseColset(\n  Fts5Parse *pParse,              /* Store SQLITE_NOMEM here if required */\n  Fts5Colset *p,                  /* Existing colset object */\n  int iCol                        /* New column to add to colset object */\n){\n  int nCol = p ? p->nCol : 0;     /* Num. columns already in colset object */\n  Fts5Colset *pNew;               /* New colset object to return */\n\n  assert( pParse->rc==SQLITE_OK );\n  assert( iCol>=0 && iCol<pParse->pConfig->nCol );\n\n  pNew = sqlite3_realloc64(p, SZ_FTS5COLSET(nCol+1));\n  if( pNew==0 ){\n    pParse->rc = SQLITE_NOMEM;\n  }else{\n    int *aiCol = pNew->aiCol;\n    int i, j;\n    for(i=0; i<nCol; i++){\n      if( aiCol[i]==iCol ) return pNew;\n      if( aiCol[i]>iCol ) break;\n    }\n    for(j=nCol; j>i; j--){\n      aiCol[j] = aiCol[j-1];\n    }\n    aiCol[i] = iCol;\n    pNew->nCol = nCol+1;\n\n#ifndef NDEBUG\n    /* Check that the array is in order and contains no duplicate entries. */\n    for(i=1; i<pNew->nCol; i++) assert( pNew->aiCol[i]>pNew->aiCol[i-1] );\n#endif\n  }\n\n  return pNew;\n}\n\n/*\n** Allocate and return an Fts5Colset object specifying the inverse of\n** the colset passed as the second argument. Free the colset passed\n** as the second argument before returning.\n*/\nstatic Fts5Colset *sqlite3Fts5ParseColsetInvert(Fts5Parse *pParse, Fts5Colset *p){\n  Fts5Colset *pRet;\n  int nCol = pParse->pConfig->nCol;\n\n  pRet = (Fts5Colset*)sqlite3Fts5MallocZero(&pParse->rc,\n      SZ_FTS5COLSET(nCol+1)\n  );\n  if( pRet ){\n    int i;\n    int iOld = 0;\n    for(i=0; i<nCol; i++){\n      if( iOld>=p->nCol || p->aiCol[iOld]!=i ){\n        pRet->aiCol[pRet->nCol++] = i;\n      }else{\n        iOld++;\n      }\n    }\n  }\n\n  sqlite3_free(p);\n  return pRet;\n}\n\nstatic Fts5Colset *sqlite3Fts5ParseColset(\n  Fts5Parse *pParse,              /* Store SQLITE_NOMEM here if required */\n  Fts5Colset *pColset,            /* Existing colset object */\n  Fts5Token *p\n){\n  Fts5Colset *pRet = 0;\n  int iCol;\n  char *z;                        /* Dequoted copy of token p */\n\n  z = sqlite3Fts5Strndup(&pParse->rc, p->p, p->n);\n  if( pParse->rc==SQLITE_OK ){\n    Fts5Config *pConfig = pParse->pConfig;\n    sqlite3Fts5Dequote(z);\n    for(iCol=0; iCol<pConfig->nCol; iCol++){\n      if( 0==sqlite3_stricmp(pConfig->azCol[iCol], z) ) break;\n    }\n    if( iCol==pConfig->nCol ){\n      sqlite3Fts5ParseError(pParse, \"no such column: %s\", z);\n    }else{\n      pRet = fts5ParseColset(pParse, pColset, iCol);\n    }\n    sqlite3_free(z);\n  }\n\n  if( pRet==0 ){\n    assert( pParse->rc!=SQLITE_OK );\n    sqlite3_free(pColset);\n  }\n\n  return pRet;\n}\n\n/*\n** If argument pOrig is NULL, or if (*pRc) is set to anything other than\n** SQLITE_OK when this function is called, NULL is returned.\n**\n** Otherwise, a copy of (*pOrig) is made into memory obtained from\n** sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation\n** fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned.\n*/\nstatic Fts5Colset *fts5CloneColset(int *pRc, Fts5Colset *pOrig){\n  Fts5Colset *pRet;\n  if( pOrig ){\n    sqlite3_int64 nByte = SZ_FTS5COLSET(pOrig->nCol);\n    pRet = (Fts5Colset*)sqlite3Fts5MallocZero(pRc, nByte);\n    if( pRet ){\n      memcpy(pRet, pOrig, (size_t)nByte);\n    }\n  }else{\n    pRet = 0;\n  }\n  return pRet;\n}\n\n/*\n** Remove from colset pColset any columns that are not also in colset pMerge.\n*/\nstatic void fts5MergeColset(Fts5Colset *pColset, Fts5Colset *pMerge){\n  int iIn = 0;          /* Next input in pColset */\n  int iMerge = 0;       /* Next input in pMerge */\n  int iOut = 0;         /* Next output slot in pColset */\n\n  while( iIn<pColset->nCol && iMerge<pMerge->nCol ){\n    int iDiff = pColset->aiCol[iIn] - pMerge->aiCol[iMerge];\n    if( iDiff==0 ){\n      pColset->aiCol[iOut++] = pMerge->aiCol[iMerge];\n      iMerge++;\n      iIn++;\n    }else if( iDiff>0 ){\n      iMerge++;\n    }else{\n      iIn++;\n    }\n  }\n  pColset->nCol = iOut;\n}\n\n/*\n** Recursively apply colset pColset to expression node pNode and all of\n** its decendents. If (*ppFree) is not NULL, it contains a spare copy\n** of pColset. This function may use the spare copy and set (*ppFree) to\n** zero, or it may create copies of pColset using fts5CloneColset().\n*/\nstatic void fts5ParseSetColset(\n  Fts5Parse *pParse,\n  Fts5ExprNode *pNode,\n  Fts5Colset *pColset,\n  Fts5Colset **ppFree\n){\n  if( pParse->rc==SQLITE_OK ){\n    assert( pNode->eType==FTS5_TERM || pNode->eType==FTS5_STRING\n         || pNode->eType==FTS5_AND  || pNode->eType==FTS5_OR\n         || pNode->eType==FTS5_NOT  || pNode->eType==FTS5_EOF\n    );\n    if( pNode->eType==FTS5_STRING || pNode->eType==FTS5_TERM ){\n      Fts5ExprNearset *pNear = pNode->pNear;\n      if( pNear->pColset ){\n        fts5MergeColset(pNear->pColset, pColset);\n        if( pNear->pColset->nCol==0 ){\n          pNode->eType = FTS5_EOF;\n          pNode->xNext = 0;\n        }\n      }else if( *ppFree ){\n        pNear->pColset = pColset;\n        *ppFree = 0;\n      }else{\n        pNear->pColset = fts5CloneColset(&pParse->rc, pColset);\n      }\n    }else{\n      int i;\n      assert( pNode->eType!=FTS5_EOF || pNode->nChild==0 );\n      for(i=0; i<pNode->nChild; i++){\n        fts5ParseSetColset(pParse, pNode->apChild[i], pColset, ppFree);\n      }\n    }\n  }\n}\n\n/*\n** Apply colset pColset to expression node pExpr and all of its descendents.\n*/\nstatic void sqlite3Fts5ParseSetColset(\n  Fts5Parse *pParse,\n  Fts5ExprNode *pExpr,\n  Fts5Colset *pColset\n){\n  Fts5Colset *pFree = pColset;\n  if( pParse->pConfig->eDetail==FTS5_DETAIL_NONE ){\n    sqlite3Fts5ParseError(pParse,\n        \"fts5: column queries are not supported (detail=none)\"\n    );\n  }else{\n    fts5ParseSetColset(pParse, pExpr, pColset, &pFree);\n  }\n  sqlite3_free(pFree);\n}\n\nstatic void fts5ExprAssignXNext(Fts5ExprNode *pNode){\n  switch( pNode->eType ){\n    case FTS5_STRING: {\n      Fts5ExprNearset *pNear = pNode->pNear;\n      if( pNear->nPhrase==1 && pNear->apPhrase[0]->nTerm==1\n       && pNear->apPhrase[0]->aTerm[0].pSynonym==0\n       && pNear->apPhrase[0]->aTerm[0].bFirst==0\n      ){\n        pNode->eType = FTS5_TERM;\n        pNode->xNext = fts5ExprNodeNext_TERM;\n      }else{\n        pNode->xNext = fts5ExprNodeNext_STRING;\n      }\n      break;\n    };\n\n    case FTS5_OR: {\n      pNode->xNext = fts5ExprNodeNext_OR;\n      break;\n    };\n\n    case FTS5_AND: {\n      pNode->xNext = fts5ExprNodeNext_AND;\n      break;\n    };\n\n    default: assert( pNode->eType==FTS5_NOT ); {\n      pNode->xNext = fts5ExprNodeNext_NOT;\n      break;\n    };\n  }\n}\n\n/*\n** Add pSub as a child of p.\n*/\nstatic void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){\n  int ii = p->nChild;\n  if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){\n    int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;\n    memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);\n    p->nChild += pSub->nChild;\n    sqlite3_free(pSub);\n  }else{\n    p->apChild[p->nChild++] = pSub;\n  }\n  for( ; ii<p->nChild; ii++){\n    p->iHeight = MAX(p->iHeight, p->apChild[ii]->iHeight + 1);\n  }\n}\n\n/*\n** This function is used when parsing LIKE or GLOB patterns against\n** trigram indexes that specify either detail=column or detail=none.\n** It converts a phrase:\n**\n**     abc + def + ghi\n**\n** into an AND tree:\n**\n**     abc AND def AND ghi\n*/\nstatic Fts5ExprNode *fts5ParsePhraseToAnd(\n  Fts5Parse *pParse,\n  Fts5ExprNearset *pNear\n){\n  int nTerm = pNear->apPhrase[0]->nTerm;\n  int ii;\n  int nByte;\n  Fts5ExprNode *pRet;\n\n  assert( pNear->nPhrase==1 );\n  assert( pParse->bPhraseToAnd );\n\n  nByte = SZ_FTS5EXPRNODE(nTerm+1);\n  pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);\n  if( pRet ){\n    pRet->eType = FTS5_AND;\n    pRet->nChild = nTerm;\n    pRet->iHeight = 1;\n    fts5ExprAssignXNext(pRet);\n    pParse->nPhrase--;\n    for(ii=0; ii<nTerm; ii++){\n      Fts5ExprPhrase *pPhrase = (Fts5ExprPhrase*)sqlite3Fts5MallocZero(\n          &pParse->rc, SZ_FTS5EXPRPHRASE(1)\n      );\n      if( pPhrase ){\n        if( parseGrowPhraseArray(pParse) ){\n          fts5ExprPhraseFree(pPhrase);\n        }else{\n          Fts5ExprTerm *p = &pNear->apPhrase[0]->aTerm[ii];\n          Fts5ExprTerm *pTo = &pPhrase->aTerm[0];\n          pParse->apPhrase[pParse->nPhrase++] = pPhrase;\n          pPhrase->nTerm = 1;\n          pTo->pTerm = sqlite3Fts5Strndup(&pParse->rc, p->pTerm, p->nFullTerm);\n          pTo->nQueryTerm = p->nQueryTerm;\n          pTo->nFullTerm = p->nFullTerm;\n          pRet->apChild[ii] = sqlite3Fts5ParseNode(pParse, FTS5_STRING,\n              0, 0, sqlite3Fts5ParseNearset(pParse, 0, pPhrase)\n          );\n        }\n      }\n    }\n\n    if( pParse->rc ){\n      sqlite3Fts5ParseNodeFree(pRet);\n      pRet = 0;\n    }else{\n      sqlite3Fts5ParseNearsetFree(pNear);\n    }\n  }\n\n  return pRet;\n}\n\n/*\n** Allocate and return a new expression object. If anything goes wrong (i.e.\n** OOM error), leave an error code in pParse and return NULL.\n*/\nstatic Fts5ExprNode *sqlite3Fts5ParseNode(\n  Fts5Parse *pParse,              /* Parse context */\n  int eType,                      /* FTS5_STRING, AND, OR or NOT */\n  Fts5ExprNode *pLeft,            /* Left hand child expression */\n  Fts5ExprNode *pRight,           /* Right hand child expression */\n  Fts5ExprNearset *pNear          /* For STRING expressions, the near cluster */\n){\n  Fts5ExprNode *pRet = 0;\n\n  if( pParse->rc==SQLITE_OK ){\n    int nChild = 0;               /* Number of children of returned node */\n    sqlite3_int64 nByte;          /* Bytes of space to allocate for this node */\n\n    assert( (eType!=FTS5_STRING && !pNear)\n         || (eType==FTS5_STRING && !pLeft && !pRight)\n    );\n    if( eType==FTS5_STRING && pNear==0 ) return 0;\n    if( eType!=FTS5_STRING && pLeft==0 ) return pRight;\n    if( eType!=FTS5_STRING && pRight==0 ) return pLeft;\n\n    if( eType==FTS5_STRING\n     && pParse->bPhraseToAnd\n     && pNear->apPhrase[0]->nTerm>1\n    ){\n      pRet = fts5ParsePhraseToAnd(pParse, pNear);\n    }else{\n      if( eType==FTS5_NOT ){\n        nChild = 2;\n      }else if( eType==FTS5_AND || eType==FTS5_OR ){\n        nChild = 2;\n        if( pLeft->eType==eType ) nChild += pLeft->nChild-1;\n        if( pRight->eType==eType ) nChild += pRight->nChild-1;\n      }\n\n      nByte = SZ_FTS5EXPRNODE(nChild);\n      pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);\n\n      if( pRet ){\n        pRet->eType = eType;\n        pRet->pNear = pNear;\n        fts5ExprAssignXNext(pRet);\n        if( eType==FTS5_STRING ){\n          int iPhrase;\n          for(iPhrase=0; iPhrase<pNear->nPhrase; iPhrase++){\n            pNear->apPhrase[iPhrase]->pNode = pRet;\n            if( pNear->apPhrase[iPhrase]->nTerm==0 ){\n              pRet->xNext = 0;\n              pRet->eType = FTS5_EOF;\n            }\n          }\n\n          if( pParse->pConfig->eDetail!=FTS5_DETAIL_FULL ){\n            Fts5ExprPhrase *pPhrase = pNear->apPhrase[0];\n            if( pNear->nPhrase!=1\n                || pPhrase->nTerm>1\n                || (pPhrase->nTerm>0 && pPhrase->aTerm[0].bFirst)\n              ){\n              sqlite3Fts5ParseError(pParse,\n                  \"fts5: %s queries are not supported (detail!=full)\",\n                  pNear->nPhrase==1 ? \"phrase\": \"NEAR\"\n              );\n              sqlite3Fts5ParseNodeFree(pRet);\n              pRet = 0;\n              pNear = 0;\n              assert( pLeft==0 && pRight==0 );\n            }\n          }\n        }else{\n          assert( pNear==0 );\n          fts5ExprAddChildren(pRet, pLeft);\n          fts5ExprAddChildren(pRet, pRight);\n          pLeft = pRight = 0;\n          if( pRet->iHeight>SQLITE_FTS5_MAX_EXPR_DEPTH ){\n            sqlite3Fts5ParseError(pParse,\n                \"fts5 expression tree is too large (maximum depth %d)\",\n                SQLITE_FTS5_MAX_EXPR_DEPTH\n            );\n            sqlite3Fts5ParseNodeFree(pRet);\n            pRet = 0;\n          }\n        }\n      }\n    }\n  }\n\n  if( pRet==0 ){\n    assert( pParse->rc!=SQLITE_OK );\n    sqlite3Fts5ParseNodeFree(pLeft);\n    sqlite3Fts5ParseNodeFree(pRight);\n    sqlite3Fts5ParseNearsetFree(pNear);\n  }\n  return pRet;\n}\n\nstatic Fts5ExprNode *sqlite3Fts5ParseImplicitAnd(\n  Fts5Parse *pParse,              /* Parse context */\n  Fts5ExprNode *pLeft,            /* Left hand child expression */\n  Fts5ExprNode *pRight            /* Right hand child expression */\n){\n  Fts5ExprNode *pRet = 0;\n  Fts5ExprNode *pPrev;\n\n  if( pParse->rc ){\n    sqlite3Fts5ParseNodeFree(pLeft);\n    sqlite3Fts5ParseNodeFree(pRight);\n  }else{\n\n    assert( pLeft->eType==FTS5_STRING\n        || pLeft->eType==FTS5_TERM\n        || pLeft->eType==FTS5_EOF\n        || pLeft->eType==FTS5_AND\n    );\n    assert( pRight->eType==FTS5_STRING\n        || pRight->eType==FTS5_TERM\n        || pRight->eType==FTS5_EOF\n        || (pRight->eType==FTS5_AND && pParse->bPhraseToAnd)\n    );\n\n    if( pLeft->eType==FTS5_AND ){\n      pPrev = pLeft->apChild[pLeft->nChild-1];\n    }else{\n      pPrev = pLeft;\n    }\n    assert( pPrev->eType==FTS5_STRING\n        || pPrev->eType==FTS5_TERM\n        || pPrev->eType==FTS5_EOF\n        );\n\n    if( pRight->eType==FTS5_EOF ){\n      assert( pParse->apPhrase!=0 );\n      assert( pParse->nPhrase>0 );\n      assert( pParse->apPhrase[pParse->nPhrase-1]==pRight->pNear->apPhrase[0] );\n      sqlite3Fts5ParseNodeFree(pRight);\n      pRet = pLeft;\n      pParse->nPhrase--;\n    }\n    else if( pPrev->eType==FTS5_EOF ){\n      Fts5ExprPhrase **ap;\n\n      if( pPrev==pLeft ){\n        pRet = pRight;\n      }else{\n        pLeft->apChild[pLeft->nChild-1] = pRight;\n        pRet = pLeft;\n      }\n\n      ap = &pParse->apPhrase[pParse->nPhrase-1-pRight->pNear->nPhrase];\n      assert( ap[0]==pPrev->pNear->apPhrase[0] );\n      memmove(ap, &ap[1], sizeof(Fts5ExprPhrase*)*pRight->pNear->nPhrase);\n      pParse->nPhrase--;\n\n      sqlite3Fts5ParseNodeFree(pPrev);\n    }\n    else{\n      pRet = sqlite3Fts5ParseNode(pParse, FTS5_AND, pLeft, pRight, 0);\n    }\n  }\n\n  return pRet;\n}\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\nstatic char *fts5ExprTermPrint(Fts5ExprTerm *pTerm){\n  sqlite3_int64 nByte = 0;\n  Fts5ExprTerm *p;\n  char *zQuoted;\n\n  /* Determine the maximum amount of space required. */\n  for(p=pTerm; p; p=p->pSynonym){\n    nByte += pTerm->nQueryTerm * 2 + 3 + 2;\n  }\n  zQuoted = sqlite3_malloc64(nByte);\n\n  if( zQuoted ){\n    int i = 0;\n    for(p=pTerm; p; p=p->pSynonym){\n      char *zIn = p->pTerm;\n      char *zEnd = &zIn[p->nQueryTerm];\n      zQuoted[i++] = '\"';\n      while( zIn<zEnd ){\n        if( *zIn=='\"' ) zQuoted[i++] = '\"';\n        zQuoted[i++] = *zIn++;\n      }\n      zQuoted[i++] = '\"';\n      if( p->pSynonym ) zQuoted[i++] = '|';\n    }\n    if( pTerm->bPrefix ){\n      zQuoted[i++] = ' ';\n      zQuoted[i++] = '*';\n    }\n    zQuoted[i++] = '\\0';\n  }\n  return zQuoted;\n}\n\nstatic char *fts5PrintfAppend(char *zApp, const char *zFmt, ...){\n  char *zNew;\n  va_list ap;\n  va_start(ap, zFmt);\n  zNew = sqlite3_vmprintf(zFmt, ap);\n  va_end(ap);\n  if( zApp && zNew ){\n    char *zNew2 = sqlite3_mprintf(\"%s%s\", zApp, zNew);\n    sqlite3_free(zNew);\n    zNew = zNew2;\n  }\n  sqlite3_free(zApp);\n  return zNew;\n}\n\n/*\n** Compose a tcl-readable representation of expression pExpr. Return a\n** pointer to a buffer containing that representation. It is the\n** responsibility of the caller to at some point free the buffer using\n** sqlite3_free().\n*/\nstatic char *fts5ExprPrintTcl(\n  Fts5Config *pConfig,\n  const char *zNearsetCmd,\n  Fts5ExprNode *pExpr\n){\n  char *zRet = 0;\n  if( pExpr->eType==FTS5_STRING || pExpr->eType==FTS5_TERM ){\n    Fts5ExprNearset *pNear = pExpr->pNear;\n    int i;\n    int iTerm;\n\n    zRet = fts5PrintfAppend(zRet, \"%s \", zNearsetCmd);\n    if( zRet==0 ) return 0;\n    if( pNear->pColset ){\n      int *aiCol = pNear->pColset->aiCol;\n      int nCol = pNear->pColset->nCol;\n      if( nCol==1 ){\n        zRet = fts5PrintfAppend(zRet, \"-col %d \", aiCol[0]);\n      }else{\n        zRet = fts5PrintfAppend(zRet, \"-col {%d\", aiCol[0]);\n        for(i=1; i<pNear->pColset->nCol; i++){\n          zRet = fts5PrintfAppend(zRet, \" %d\", aiCol[i]);\n        }\n        zRet = fts5PrintfAppend(zRet, \"} \");\n      }\n      if( zRet==0 ) return 0;\n    }\n\n    if( pNear->nPhrase>1 ){\n      zRet = fts5PrintfAppend(zRet, \"-near %d \", pNear->nNear);\n      if( zRet==0 ) return 0;\n    }\n\n    zRet = fts5PrintfAppend(zRet, \"--\");\n    if( zRet==0 ) return 0;\n\n    for(i=0; i<pNear->nPhrase; i++){\n      Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n\n      zRet = fts5PrintfAppend(zRet, \" {\");\n      for(iTerm=0; zRet && iTerm<pPhrase->nTerm; iTerm++){\n        Fts5ExprTerm *p = &pPhrase->aTerm[iTerm];\n        zRet = fts5PrintfAppend(zRet, \"%s%.*s\", iTerm==0?\"\":\" \",\n            p->nQueryTerm, p->pTerm\n        );\n        if( pPhrase->aTerm[iTerm].bPrefix ){\n          zRet = fts5PrintfAppend(zRet, \"*\");\n        }\n      }\n\n      if( zRet ) zRet = fts5PrintfAppend(zRet, \"}\");\n      if( zRet==0 ) return 0;\n    }\n\n  }else if( pExpr->eType==0 ){\n    zRet = sqlite3_mprintf(\"{}\");\n  }else{\n    char const *zOp = 0;\n    int i;\n    switch( pExpr->eType ){\n      case FTS5_AND: zOp = \"AND\"; break;\n      case FTS5_NOT: zOp = \"NOT\"; break;\n      default:\n        assert( pExpr->eType==FTS5_OR );\n        zOp = \"OR\";\n        break;\n    }\n\n    zRet = sqlite3_mprintf(\"%s\", zOp);\n    for(i=0; zRet && i<pExpr->nChild; i++){\n      char *z = fts5ExprPrintTcl(pConfig, zNearsetCmd, pExpr->apChild[i]);\n      if( !z ){\n        sqlite3_free(zRet);\n        zRet = 0;\n      }else{\n        zRet = fts5PrintfAppend(zRet, \" [%z]\", z);\n      }\n    }\n  }\n\n  return zRet;\n}\n\nstatic char *fts5ExprPrint(Fts5Config *pConfig, Fts5ExprNode *pExpr){\n  char *zRet = 0;\n  if( pExpr->eType==0 ){\n    return sqlite3_mprintf(\"\\\"\\\"\");\n  }else\n  if( pExpr->eType==FTS5_STRING || pExpr->eType==FTS5_TERM ){\n    Fts5ExprNearset *pNear = pExpr->pNear;\n    int i;\n    int iTerm;\n\n    if( pNear->pColset ){\n      int ii;\n      Fts5Colset *pColset = pNear->pColset;\n      if( pColset->nCol>1 ) zRet = fts5PrintfAppend(zRet, \"{\");\n      for(ii=0; ii<pColset->nCol; ii++){\n        zRet = fts5PrintfAppend(zRet, \"%s%s\",\n            pConfig->azCol[pColset->aiCol[ii]], ii==pColset->nCol-1 ? \"\" : \" \"\n        );\n      }\n      if( zRet ){\n        zRet = fts5PrintfAppend(zRet, \"%s : \", pColset->nCol>1 ? \"}\" : \"\");\n      }\n      if( zRet==0 ) return 0;\n    }\n\n    if( pNear->nPhrase>1 ){\n      zRet = fts5PrintfAppend(zRet, \"NEAR(\");\n      if( zRet==0 ) return 0;\n    }\n\n    for(i=0; i<pNear->nPhrase; i++){\n      Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];\n      if( i!=0 ){\n        zRet = fts5PrintfAppend(zRet, \" \");\n        if( zRet==0 ) return 0;\n      }\n      for(iTerm=0; iTerm<pPhrase->nTerm; iTerm++){\n        char *zTerm = fts5ExprTermPrint(&pPhrase->aTerm[iTerm]);\n        if( zTerm ){\n          zRet = fts5PrintfAppend(zRet, \"%s%s\", iTerm==0?\"\":\" + \", zTerm);\n          sqlite3_free(zTerm);\n        }\n        if( zTerm==0 || zRet==0 ){\n          sqlite3_free(zRet);\n          return 0;\n        }\n      }\n    }\n\n    if( pNear->nPhrase>1 ){\n      zRet = fts5PrintfAppend(zRet, \", %d)\", pNear->nNear);\n      if( zRet==0 ) return 0;\n    }\n\n  }else{\n    char const *zOp = 0;\n    int i;\n\n    switch( pExpr->eType ){\n      case FTS5_AND: zOp = \" AND \"; break;\n      case FTS5_NOT: zOp = \" NOT \"; break;\n      default:\n        assert( pExpr->eType==FTS5_OR );\n        zOp = \" OR \";\n        break;\n    }\n\n    for(i=0; i<pExpr->nChild; i++){\n      char *z = fts5ExprPrint(pConfig, pExpr->apChild[i]);\n      if( z==0 ){\n        sqlite3_free(zRet);\n        zRet = 0;\n      }else{\n        int e = pExpr->apChild[i]->eType;\n        int b = (e!=FTS5_STRING && e!=FTS5_TERM && e!=FTS5_EOF);\n        zRet = fts5PrintfAppend(zRet, \"%s%s%z%s\",\n            (i==0 ? \"\" : zOp),\n            (b?\"(\":\"\"), z, (b?\")\":\"\")\n        );\n      }\n      if( zRet==0 ) break;\n    }\n  }\n\n  return zRet;\n}\n\n/*\n** The implementation of user-defined scalar functions fts5_expr() (bTcl==0)\n** and fts5_expr_tcl() (bTcl!=0).\n*/\nstatic void fts5ExprFunction(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apVal,          /* Function arguments */\n  int bTcl\n){\n  Fts5Global *pGlobal = (Fts5Global*)sqlite3_user_data(pCtx);\n  sqlite3 *db = sqlite3_context_db_handle(pCtx);\n  const char *zExpr = 0;\n  char *zErr = 0;\n  Fts5Expr *pExpr = 0;\n  int rc;\n  int i;\n\n  const char **azConfig;          /* Array of arguments for Fts5Config */\n  const char *zNearsetCmd = \"nearset\";\n  int nConfig;                    /* Size of azConfig[] */\n  Fts5Config *pConfig = 0;\n  int iArg = 1;\n\n  if( nArg<1 ){\n    zErr = sqlite3_mprintf(\"wrong number of arguments to function %s\",\n        bTcl ? \"fts5_expr_tcl\" : \"fts5_expr\"\n    );\n    sqlite3_result_error(pCtx, zErr, -1);\n    sqlite3_free(zErr);\n    return;\n  }\n\n  if( bTcl && nArg>1 ){\n    zNearsetCmd = (const char*)sqlite3_value_text(apVal[1]);\n    iArg = 2;\n  }\n\n  nConfig = 3 + (nArg-iArg);\n  azConfig = (const char**)sqlite3_malloc64(sizeof(char*) * nConfig);\n  if( azConfig==0 ){\n    sqlite3_result_error_nomem(pCtx);\n    return;\n  }\n  azConfig[0] = 0;\n  azConfig[1] = \"main\";\n  azConfig[2] = \"tbl\";\n  for(i=3; iArg<nArg; iArg++){\n    const char *z = (const char*)sqlite3_value_text(apVal[iArg]);\n    azConfig[i++] = (z ? z : \"\");\n  }\n\n  zExpr = (const char*)sqlite3_value_text(apVal[0]);\n  if( zExpr==0 ) zExpr = \"\";\n\n  rc = sqlite3Fts5ConfigParse(pGlobal, db, nConfig, azConfig, &pConfig, &zErr);\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5ExprNew(pConfig, 0, pConfig->nCol, zExpr, &pExpr, &zErr);\n  }\n  if( rc==SQLITE_OK ){\n    char *zText;\n    if( pExpr->pRoot->xNext==0 ){\n      zText = sqlite3_mprintf(\"\");\n    }else if( bTcl ){\n      zText = fts5ExprPrintTcl(pConfig, zNearsetCmd, pExpr->pRoot);\n    }else{\n      zText = fts5ExprPrint(pConfig, pExpr->pRoot);\n    }\n    if( zText==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      sqlite3_result_text(pCtx, zText, -1, SQLITE_TRANSIENT);\n      sqlite3_free(zText);\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    if( zErr ){\n      sqlite3_result_error(pCtx, zErr, -1);\n      sqlite3_free(zErr);\n    }else{\n      sqlite3_result_error_code(pCtx, rc);\n    }\n  }\n  sqlite3_free((void *)azConfig);\n  sqlite3Fts5ConfigFree(pConfig);\n  sqlite3Fts5ExprFree(pExpr);\n}\n\nstatic void fts5ExprFunctionHr(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  fts5ExprFunction(pCtx, nArg, apVal, 0);\n}\nstatic void fts5ExprFunctionTcl(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  fts5ExprFunction(pCtx, nArg, apVal, 1);\n}\n\n/*\n** The implementation of an SQLite user-defined-function that accepts a\n** single integer as an argument. If the integer is an alpha-numeric\n** unicode code point, 1 is returned. Otherwise 0.\n*/\nstatic void fts5ExprIsAlnum(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  int iCode;\n  u8 aArr[32];\n  if( nArg!=1 ){\n    sqlite3_result_error(pCtx,\n        \"wrong number of arguments to function fts5_isalnum\", -1\n    );\n    return;\n  }\n  memset(aArr, 0, sizeof(aArr));\n  sqlite3Fts5UnicodeCatParse(\"L*\", aArr);\n  sqlite3Fts5UnicodeCatParse(\"N*\", aArr);\n  sqlite3Fts5UnicodeCatParse(\"Co\", aArr);\n  iCode = sqlite3_value_int(apVal[0]);\n  sqlite3_result_int(pCtx, aArr[sqlite3Fts5UnicodeCategory((u32)iCode)]);\n}\n\nstatic void fts5ExprFold(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  if( nArg!=1 && nArg!=2 ){\n    sqlite3_result_error(pCtx,\n        \"wrong number of arguments to function fts5_fold\", -1\n    );\n  }else{\n    int iCode;\n    int bRemoveDiacritics = 0;\n    iCode = sqlite3_value_int(apVal[0]);\n    if( nArg==2 ) bRemoveDiacritics = sqlite3_value_int(apVal[1]);\n    sqlite3_result_int(pCtx, sqlite3Fts5UnicodeFold(iCode, bRemoveDiacritics));\n  }\n}\n#endif /* if SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n/*\n** This is called during initialization to register the fts5_expr() scalar\n** UDF with the SQLite handle passed as the only argument.\n*/\nstatic int sqlite3Fts5ExprInit(Fts5Global *pGlobal, sqlite3 *db){\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n  struct Fts5ExprFunc {\n    const char *z;\n    void (*x)(sqlite3_context*,int,sqlite3_value**);\n  } aFunc[] = {\n    { \"fts5_expr\",     fts5ExprFunctionHr },\n    { \"fts5_expr_tcl\", fts5ExprFunctionTcl },\n    { \"fts5_isalnum\",  fts5ExprIsAlnum },\n    { \"fts5_fold\",     fts5ExprFold },\n  };\n  int i;\n  int rc = SQLITE_OK;\n  void *pCtx = (void*)pGlobal;\n\n  for(i=0; rc==SQLITE_OK && i<ArraySize(aFunc); i++){\n    struct Fts5ExprFunc *p = &aFunc[i];\n    rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0);\n  }\n#else\n  int rc = SQLITE_OK;\n  UNUSED_PARAM2(pGlobal,db);\n#endif\n\n  /* Avoid warnings indicating that sqlite3Fts5ParserTrace() and\n  ** sqlite3Fts5ParserFallback() are unused */\n#ifndef NDEBUG\n  (void)sqlite3Fts5ParserTrace;\n#endif\n  (void)sqlite3Fts5ParserFallback;\n\n  return rc;\n}\n\n/*\n** Return the number of phrases in expression pExpr.\n*/\nstatic int sqlite3Fts5ExprPhraseCount(Fts5Expr *pExpr){\n  return (pExpr ? pExpr->nPhrase : 0);\n}\n\n/*\n** Return the number of terms in the iPhrase'th phrase in pExpr.\n*/\nstatic int sqlite3Fts5ExprPhraseSize(Fts5Expr *pExpr, int iPhrase){\n  if( iPhrase<0 || iPhrase>=pExpr->nPhrase ) return 0;\n  return pExpr->apExprPhrase[iPhrase]->nTerm;\n}\n\n/*\n** This function is used to access the current position list for phrase\n** iPhrase.\n*/\nstatic int sqlite3Fts5ExprPoslist(Fts5Expr *pExpr, int iPhrase, const u8 **pa){\n  int nRet;\n  Fts5ExprPhrase *pPhrase = pExpr->apExprPhrase[iPhrase];\n  Fts5ExprNode *pNode = pPhrase->pNode;\n  if( pNode->bEof==0 && pNode->iRowid==pExpr->pRoot->iRowid ){\n    *pa = pPhrase->poslist.p;\n    nRet = pPhrase->poslist.n;\n  }else{\n    *pa = 0;\n    nRet = 0;\n  }\n  return nRet;\n}\n\nstruct Fts5PoslistPopulator {\n  Fts5PoslistWriter writer;\n  int bOk;                        /* True if ok to populate */\n  int bMiss;\n};\n\n/*\n** Clear the position lists associated with all phrases in the expression\n** passed as the first argument. Argument bLive is true if the expression\n** might be pointing to a real entry, otherwise it has just been reset.\n**\n** At present this function is only used for detail=col and detail=none\n** fts5 tables. This implies that all phrases must be at most 1 token\n** in size, as phrase matches are not supported without detail=full.\n*/\nstatic Fts5PoslistPopulator *sqlite3Fts5ExprClearPoslists(Fts5Expr *pExpr, int bLive){\n  Fts5PoslistPopulator *pRet;\n  pRet = sqlite3_malloc64(sizeof(Fts5PoslistPopulator)*pExpr->nPhrase);\n  if( pRet ){\n    int i;\n    memset(pRet, 0, sizeof(Fts5PoslistPopulator)*pExpr->nPhrase);\n    for(i=0; i<pExpr->nPhrase; i++){\n      Fts5Buffer *pBuf = &pExpr->apExprPhrase[i]->poslist;\n      Fts5ExprNode *pNode = pExpr->apExprPhrase[i]->pNode;\n      assert( pExpr->apExprPhrase[i]->nTerm<=1 );\n      if( bLive &&\n          (pBuf->n==0 || pNode->iRowid!=pExpr->pRoot->iRowid || pNode->bEof)\n      ){\n        pRet[i].bMiss = 1;\n      }else{\n        pBuf->n = 0;\n      }\n    }\n  }\n  return pRet;\n}\n\nstruct Fts5ExprCtx {\n  Fts5Expr *pExpr;\n  Fts5PoslistPopulator *aPopulator;\n  i64 iOff;\n};\ntypedef struct Fts5ExprCtx Fts5ExprCtx;\n\n/*\n** TODO: Make this more efficient!\n*/\nstatic int fts5ExprColsetTest(Fts5Colset *pColset, int iCol){\n  int i;\n  for(i=0; i<pColset->nCol; i++){\n    if( pColset->aiCol[i]==iCol ) return 1;\n  }\n  return 0;\n}\n\n/*\n** pToken is a buffer nToken bytes in size that may or may not contain\n** an embedded 0x00 byte. If it does, return the number of bytes in\n** the buffer before the 0x00. If it does not, return nToken.\n*/\nstatic int fts5QueryTerm(const char *pToken, int nToken){\n  int ii;\n  for(ii=0; ii<nToken && pToken[ii]; ii++){}\n  return ii;\n}\n\nstatic int fts5ExprPopulatePoslistsCb(\n  void *pCtx,                /* Copy of 2nd argument to xTokenize() */\n  int tflags,                /* Mask of FTS5_TOKEN_* flags */\n  const char *pToken,        /* Pointer to buffer containing token */\n  int nToken,                /* Size of token in bytes */\n  int iUnused1,              /* Byte offset of token within input text */\n  int iUnused2               /* Byte offset of end of token within input text */\n){\n  Fts5ExprCtx *p = (Fts5ExprCtx*)pCtx;\n  Fts5Expr *pExpr = p->pExpr;\n  int i;\n  int nQuery = nToken;\n  i64 iRowid = pExpr->pRoot->iRowid;\n\n  UNUSED_PARAM2(iUnused1, iUnused2);\n\n  if( nQuery>FTS5_MAX_TOKEN_SIZE ) nQuery = FTS5_MAX_TOKEN_SIZE;\n  if( pExpr->pConfig->bTokendata ){\n    nQuery = fts5QueryTerm(pToken, nQuery);\n  }\n  if( (tflags & FTS5_TOKEN_COLOCATED)==0 ) p->iOff++;\n  for(i=0; i<pExpr->nPhrase; i++){\n    Fts5ExprTerm *pT;\n    if( p->aPopulator[i].bOk==0 ) continue;\n    for(pT=&pExpr->apExprPhrase[i]->aTerm[0]; pT; pT=pT->pSynonym){\n      if( (pT->nQueryTerm==nQuery || (pT->nQueryTerm<nQuery && pT->bPrefix))\n       && memcmp(pT->pTerm, pToken, pT->nQueryTerm)==0\n      ){\n        int rc = sqlite3Fts5PoslistWriterAppend(\n            &pExpr->apExprPhrase[i]->poslist, &p->aPopulator[i].writer, p->iOff\n        );\n        if( rc==SQLITE_OK && (pExpr->pConfig->bTokendata || pT->bPrefix) ){\n          int iCol = p->iOff>>32;\n          int iTokOff = p->iOff & 0x7FFFFFFF;\n          rc = sqlite3Fts5IndexIterWriteTokendata(\n              pT->pIter, pToken, nToken, iRowid, iCol, iTokOff\n          );\n        }\n        if( rc ) return rc;\n        break;\n      }\n    }\n  }\n  return SQLITE_OK;\n}\n\nstatic int sqlite3Fts5ExprPopulatePoslists(\n  Fts5Config *pConfig,\n  Fts5Expr *pExpr,\n  Fts5PoslistPopulator *aPopulator,\n  int iCol,\n  const char *z, int n\n){\n  int i;\n  Fts5ExprCtx sCtx;\n  sCtx.pExpr = pExpr;\n  sCtx.aPopulator = aPopulator;\n  sCtx.iOff = (((i64)iCol) << 32) - 1;\n\n  for(i=0; i<pExpr->nPhrase; i++){\n    Fts5ExprNode *pNode = pExpr->apExprPhrase[i]->pNode;\n    Fts5Colset *pColset = pNode->pNear->pColset;\n    if( (pColset && 0==fts5ExprColsetTest(pColset, iCol))\n     || aPopulator[i].bMiss\n    ){\n      aPopulator[i].bOk = 0;\n    }else{\n      aPopulator[i].bOk = 1;\n    }\n  }\n\n  return sqlite3Fts5Tokenize(pConfig,\n      FTS5_TOKENIZE_DOCUMENT, z, n, (void*)&sCtx, fts5ExprPopulatePoslistsCb\n  );\n}\n\nstatic void fts5ExprClearPoslists(Fts5ExprNode *pNode){\n  if( pNode->eType==FTS5_TERM || pNode->eType==FTS5_STRING ){\n    pNode->pNear->apPhrase[0]->poslist.n = 0;\n  }else{\n    int i;\n    for(i=0; i<pNode->nChild; i++){\n      fts5ExprClearPoslists(pNode->apChild[i]);\n    }\n  }\n}\n\nstatic int fts5ExprCheckPoslists(Fts5ExprNode *pNode, i64 iRowid){\n  pNode->iRowid = iRowid;\n  pNode->bEof = 0;\n  switch( pNode->eType ){\n    case 0:\n    case FTS5_TERM:\n    case FTS5_STRING:\n      return (pNode->pNear->apPhrase[0]->poslist.n>0);\n\n    case FTS5_AND: {\n      int i;\n      for(i=0; i<pNode->nChild; i++){\n        if( fts5ExprCheckPoslists(pNode->apChild[i], iRowid)==0 ){\n          fts5ExprClearPoslists(pNode);\n          return 0;\n        }\n      }\n      break;\n    }\n\n    case FTS5_OR: {\n      int i;\n      int bRet = 0;\n      for(i=0; i<pNode->nChild; i++){\n        if( fts5ExprCheckPoslists(pNode->apChild[i], iRowid) ){\n          bRet = 1;\n        }\n      }\n      return bRet;\n    }\n\n    default: {\n      assert( pNode->eType==FTS5_NOT );\n      if( 0==fts5ExprCheckPoslists(pNode->apChild[0], iRowid)\n          || 0!=fts5ExprCheckPoslists(pNode->apChild[1], iRowid)\n        ){\n        fts5ExprClearPoslists(pNode);\n        return 0;\n      }\n      break;\n    }\n  }\n  return 1;\n}\n\nstatic void sqlite3Fts5ExprCheckPoslists(Fts5Expr *pExpr, i64 iRowid){\n  fts5ExprCheckPoslists(pExpr->pRoot, iRowid);\n}\n\n/*\n** This function is only called for detail=columns tables.\n*/\nstatic int sqlite3Fts5ExprPhraseCollist(\n  Fts5Expr *pExpr,\n  int iPhrase,\n  const u8 **ppCollist,\n  int *pnCollist\n){\n  Fts5ExprPhrase *pPhrase = pExpr->apExprPhrase[iPhrase];\n  Fts5ExprNode *pNode = pPhrase->pNode;\n  int rc = SQLITE_OK;\n\n  assert( iPhrase>=0 && iPhrase<pExpr->nPhrase );\n  assert( pExpr->pConfig->eDetail==FTS5_DETAIL_COLUMNS );\n\n  if( pNode->bEof==0\n   && pNode->iRowid==pExpr->pRoot->iRowid\n   && pPhrase->poslist.n>0\n  ){\n    Fts5ExprTerm *pTerm = &pPhrase->aTerm[0];\n    if( pTerm->pSynonym ){\n      Fts5Buffer *pBuf = (Fts5Buffer*)&pTerm->pSynonym[1];\n      rc = fts5ExprSynonymList(\n          pTerm, pNode->iRowid, pBuf, (u8**)ppCollist, pnCollist\n      );\n    }else{\n      *ppCollist = pPhrase->aTerm[0].pIter->pData;\n      *pnCollist = pPhrase->aTerm[0].pIter->nData;\n    }\n  }else{\n    *ppCollist = 0;\n    *pnCollist = 0;\n  }\n\n  return rc;\n}\n\n/*\n** Does the work of the fts5_api.xQueryToken() API method.\n*/\nstatic int sqlite3Fts5ExprQueryToken(\n  Fts5Expr *pExpr,\n  int iPhrase,\n  int iToken,\n  const char **ppOut,\n  int *pnOut\n){\n  Fts5ExprPhrase *pPhrase = 0;\n\n  if( iPhrase<0 || iPhrase>=pExpr->nPhrase ){\n    return SQLITE_RANGE;\n  }\n  pPhrase = pExpr->apExprPhrase[iPhrase];\n  if( iToken<0 || iToken>=pPhrase->nTerm ){\n    return SQLITE_RANGE;\n  }\n\n  *ppOut = pPhrase->aTerm[iToken].pTerm;\n  *pnOut = pPhrase->aTerm[iToken].nFullTerm;\n  return SQLITE_OK;\n}\n\n/*\n** Does the work of the fts5_api.xInstToken() API method.\n*/\nstatic int sqlite3Fts5ExprInstToken(\n  Fts5Expr *pExpr,\n  i64 iRowid,\n  int iPhrase,\n  int iCol,\n  int iOff,\n  int iToken,\n  const char **ppOut,\n  int *pnOut\n){\n  Fts5ExprPhrase *pPhrase = 0;\n  Fts5ExprTerm *pTerm = 0;\n  int rc = SQLITE_OK;\n\n  if( iPhrase<0 || iPhrase>=pExpr->nPhrase ){\n    return SQLITE_RANGE;\n  }\n  pPhrase = pExpr->apExprPhrase[iPhrase];\n  if( iToken<0 || iToken>=pPhrase->nTerm ){\n    return SQLITE_RANGE;\n  }\n  pTerm = &pPhrase->aTerm[iToken];\n  if( pExpr->pConfig->bTokendata || pTerm->bPrefix ){\n    rc = sqlite3Fts5IterToken(\n        pTerm->pIter, pTerm->pTerm, pTerm->nQueryTerm,\n        iRowid, iCol, iOff+iToken, ppOut, pnOut\n    );\n  }else{\n    *ppOut = pTerm->pTerm;\n    *pnOut = pTerm->nFullTerm;\n  }\n  return rc;\n}\n\n/*\n** Clear the token mappings for all Fts5IndexIter objects managed by\n** the expression passed as the only argument.\n*/\nstatic void sqlite3Fts5ExprClearTokens(Fts5Expr *pExpr){\n  int ii;\n  for(ii=0; ii<pExpr->nPhrase; ii++){\n    Fts5ExprTerm *pT;\n    for(pT=&pExpr->apExprPhrase[ii]->aTerm[0]; pT; pT=pT->pSynonym){\n      sqlite3Fts5IndexIterClearTokendata(pT->pIter);\n    }\n  }\n}\n\n/*\n** 2014 August 11\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n\n\n\n/* #include \"fts5Int.h\" */\n\ntypedef struct Fts5HashEntry Fts5HashEntry;\n\n/*\n** This file contains the implementation of an in-memory hash table used\n** to accumulate \"term -> doclist\" content before it is flushed to a level-0\n** segment.\n*/\n\n\nstruct Fts5Hash {\n  int eDetail;                    /* Copy of Fts5Config.eDetail */\n  int *pnByte;                    /* Pointer to bytes counter */\n  int nEntry;                     /* Number of entries currently in hash */\n  int nSlot;                      /* Size of aSlot[] array */\n  Fts5HashEntry *pScan;           /* Current ordered scan item */\n  Fts5HashEntry **aSlot;          /* Array of hash slots */\n};\n\n/*\n** Each entry in the hash table is represented by an object of the\n** following type. Each object, its key, and its current data are stored\n** in a single memory allocation. The key immediately follows the object\n** in memory. The position list data immediately follows the key data\n** in memory.\n**\n** The key is Fts5HashEntry.nKey bytes in size. It consists of a single\n** byte identifying the index (either the main term index or a prefix-index),\n** followed by the term data. For example: \"0token\". There is no\n** nul-terminator - in this case nKey=6.\n**\n** The data that follows the key is in a similar, but not identical format\n** to the doclist data stored in the database. It is:\n**\n**   * Rowid, as a varint\n**   * Position list, without 0x00 terminator.\n**   * Size of previous position list and rowid, as a 4 byte\n**     big-endian integer.\n**\n** iRowidOff:\n**   Offset of last rowid written to data area. Relative to first byte of\n**   structure.\n**\n** nData:\n**   Bytes of data written since iRowidOff.\n*/\nstruct Fts5HashEntry {\n  Fts5HashEntry *pHashNext;       /* Next hash entry with same hash-key */\n  Fts5HashEntry *pScanNext;       /* Next entry in sorted order */\n\n  int nAlloc;                     /* Total size of allocation */\n  int iSzPoslist;                 /* Offset of space for 4-byte poslist size */\n  int nData;                      /* Total bytes of data (incl. structure) */\n  int nKey;                       /* Length of key in bytes */\n  u8 bDel;                        /* Set delete-flag @ iSzPoslist */\n  u8 bContent;                    /* Set content-flag (detail=none mode) */\n  i16 iCol;                       /* Column of last value written */\n  int iPos;                       /* Position of last value written */\n  i64 iRowid;                     /* Rowid of last value written */\n};\n\n/*\n** Equivalent to:\n**\n**   char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; }\n*/\n#define fts5EntryKey(p) ( ((char *)(&(p)[1])) )\n\n\n/*\n** Allocate a new hash table.\n*/\nstatic int sqlite3Fts5HashNew(Fts5Config *pConfig, Fts5Hash **ppNew, int *pnByte){\n  int rc = SQLITE_OK;\n  Fts5Hash *pNew;\n\n  *ppNew = pNew = (Fts5Hash*)sqlite3_malloc(sizeof(Fts5Hash));\n  if( pNew==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    sqlite3_int64 nByte;\n    memset(pNew, 0, sizeof(Fts5Hash));\n    pNew->pnByte = pnByte;\n    pNew->eDetail = pConfig->eDetail;\n\n    pNew->nSlot = 1024;\n    nByte = sizeof(Fts5HashEntry*) * pNew->nSlot;\n    pNew->aSlot = (Fts5HashEntry**)sqlite3_malloc64(nByte);\n    if( pNew->aSlot==0 ){\n      sqlite3_free(pNew);\n      *ppNew = 0;\n      rc = SQLITE_NOMEM;\n    }else{\n      memset(pNew->aSlot, 0, (size_t)nByte);\n    }\n  }\n  return rc;\n}\n\n/*\n** Free a hash table object.\n*/\nstatic void sqlite3Fts5HashFree(Fts5Hash *pHash){\n  if( pHash ){\n    sqlite3Fts5HashClear(pHash);\n    sqlite3_free(pHash->aSlot);\n    sqlite3_free(pHash);\n  }\n}\n\n/*\n** Empty (but do not delete) a hash table.\n*/\nstatic void sqlite3Fts5HashClear(Fts5Hash *pHash){\n  int i;\n  for(i=0; i<pHash->nSlot; i++){\n    Fts5HashEntry *pNext;\n    Fts5HashEntry *pSlot;\n    for(pSlot=pHash->aSlot[i]; pSlot; pSlot=pNext){\n      pNext = pSlot->pHashNext;\n      sqlite3_free(pSlot);\n    }\n  }\n  memset(pHash->aSlot, 0, pHash->nSlot * sizeof(Fts5HashEntry*));\n  pHash->nEntry = 0;\n}\n\nstatic unsigned int fts5HashKey(int nSlot, const u8 *p, int n){\n  int i;\n  unsigned int h = 13;\n  for(i=n-1; i>=0; i--){\n    h = (h << 3) ^ h ^ p[i];\n  }\n  return (h % nSlot);\n}\n\nstatic unsigned int fts5HashKey2(int nSlot, u8 b, const u8 *p, int n){\n  int i;\n  unsigned int h = 13;\n  for(i=n-1; i>=0; i--){\n    h = (h << 3) ^ h ^ p[i];\n  }\n  h = (h << 3) ^ h ^ b;\n  return (h % nSlot);\n}\n\n/*\n** Resize the hash table by doubling the number of slots.\n*/\nstatic int fts5HashResize(Fts5Hash *pHash){\n  int nNew = pHash->nSlot*2;\n  int i;\n  Fts5HashEntry **apNew;\n  Fts5HashEntry **apOld = pHash->aSlot;\n\n  apNew = (Fts5HashEntry**)sqlite3_malloc64(nNew*sizeof(Fts5HashEntry*));\n  if( !apNew ) return SQLITE_NOMEM;\n  memset(apNew, 0, nNew*sizeof(Fts5HashEntry*));\n\n  for(i=0; i<pHash->nSlot; i++){\n    while( apOld[i] ){\n      unsigned int iHash;\n      Fts5HashEntry *p = apOld[i];\n      apOld[i] = p->pHashNext;\n      iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p), p->nKey);\n      p->pHashNext = apNew[iHash];\n      apNew[iHash] = p;\n    }\n  }\n\n  sqlite3_free(apOld);\n  pHash->nSlot = nNew;\n  pHash->aSlot = apNew;\n  return SQLITE_OK;\n}\n\nstatic int fts5HashAddPoslistSize(\n  Fts5Hash *pHash,\n  Fts5HashEntry *p,\n  Fts5HashEntry *p2\n){\n  int nRet = 0;\n  if( p->iSzPoslist ){\n    u8 *pPtr = p2 ? (u8*)p2 : (u8*)p;\n    int nData = p->nData;\n    if( pHash->eDetail==FTS5_DETAIL_NONE ){\n      assert( nData==p->iSzPoslist );\n      if( p->bDel ){\n        pPtr[nData++] = 0x00;\n        if( p->bContent ){\n          pPtr[nData++] = 0x00;\n        }\n      }\n    }else{\n      int nSz = (nData - p->iSzPoslist - 1);       /* Size in bytes */\n      int nPos = nSz*2 + p->bDel;                     /* Value of nPos field */\n\n      assert( p->bDel==0 || p->bDel==1 );\n      if( nPos<=127 ){\n        pPtr[p->iSzPoslist] = (u8)nPos;\n      }else{\n        int nByte = sqlite3Fts5GetVarintLen((u32)nPos);\n        memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz);\n        sqlite3Fts5PutVarint(&pPtr[p->iSzPoslist], nPos);\n        nData += (nByte-1);\n      }\n    }\n\n    nRet = nData - p->nData;\n    if( p2==0 ){\n      p->iSzPoslist = 0;\n      p->bDel = 0;\n      p->bContent = 0;\n      p->nData = nData;\n    }\n  }\n  return nRet;\n}\n\n/*\n** Add an entry to the in-memory hash table. The key is the concatenation\n** of bByte and (pToken/nToken). The value is (iRowid/iCol/iPos).\n**\n**     (bByte || pToken) -> (iRowid,iCol,iPos)\n**\n** Or, if iCol is negative, then the value is a delete marker.\n*/\nstatic int sqlite3Fts5HashWrite(\n  Fts5Hash *pHash,\n  i64 iRowid,                     /* Rowid for this entry */\n  int iCol,                       /* Column token appears in (-ve -> delete) */\n  int iPos,                       /* Position of token within column */\n  char bByte,                     /* First byte of token */\n  const char *pToken, int nToken  /* Token to add or remove to or from index */\n){\n  unsigned int iHash;\n  Fts5HashEntry *p;\n  u8 *pPtr;\n  int nIncr = 0;                  /* Amount to increment (*pHash->pnByte) by */\n  int bNew;                       /* If non-delete entry should be written */\n\n  bNew = (pHash->eDetail==FTS5_DETAIL_FULL);\n\n  /* Attempt to locate an existing hash entry */\n  iHash = fts5HashKey2(pHash->nSlot, (u8)bByte, (const u8*)pToken, nToken);\n  for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){\n    char *zKey = fts5EntryKey(p);\n    if( zKey[0]==bByte\n     && p->nKey==nToken+1\n     && memcmp(&zKey[1], pToken, nToken)==0\n    ){\n      break;\n    }\n  }\n\n  /* If an existing hash entry cannot be found, create a new one. */\n  if( p==0 ){\n    /* Figure out how much space to allocate */\n    char *zKey;\n    sqlite3_int64 nByte = sizeof(Fts5HashEntry) + (nToken+1) + 1 + 64;\n    if( nByte<128 ) nByte = 128;\n\n    /* Grow the Fts5Hash.aSlot[] array if necessary. */\n    if( (pHash->nEntry*2)>=pHash->nSlot ){\n      int rc = fts5HashResize(pHash);\n      if( rc!=SQLITE_OK ) return rc;\n      iHash = fts5HashKey2(pHash->nSlot, (u8)bByte, (const u8*)pToken, nToken);\n    }\n\n    /* Allocate new Fts5HashEntry and add it to the hash table. */\n    p = (Fts5HashEntry*)sqlite3_malloc64(nByte);\n    if( !p ) return SQLITE_NOMEM;\n    memset(p, 0, sizeof(Fts5HashEntry));\n    p->nAlloc = (int)nByte;\n    zKey = fts5EntryKey(p);\n    zKey[0] = bByte;\n    memcpy(&zKey[1], pToken, nToken);\n    assert( iHash==fts5HashKey(pHash->nSlot, (u8*)zKey, nToken+1) );\n    p->nKey = nToken+1;\n    zKey[nToken+1] = '\\0';\n    p->nData = nToken+1 + sizeof(Fts5HashEntry);\n    p->pHashNext = pHash->aSlot[iHash];\n    pHash->aSlot[iHash] = p;\n    pHash->nEntry++;\n\n    /* Add the first rowid field to the hash-entry */\n    p->nData += sqlite3Fts5PutVarint(&((u8*)p)[p->nData], iRowid);\n    p->iRowid = iRowid;\n\n    p->iSzPoslist = p->nData;\n    if( pHash->eDetail!=FTS5_DETAIL_NONE ){\n      p->nData += 1;\n      p->iCol = (pHash->eDetail==FTS5_DETAIL_FULL ? 0 : -1);\n    }\n\n  }else{\n\n    /* Appending to an existing hash-entry. Check that there is enough\n    ** space to append the largest possible new entry. Worst case scenario\n    ** is:\n    **\n    **     + 9 bytes for a new rowid,\n    **     + 4 byte reserved for the \"poslist size\" varint.\n    **     + 1 byte for a \"new column\" byte,\n    **     + 3 bytes for a new column number (16-bit max) as a varint,\n    **     + 5 bytes for the new position offset (32-bit max).\n    */\n    if( (p->nAlloc - p->nData) < (9 + 4 + 1 + 3 + 5) ){\n      sqlite3_int64 nNew = p->nAlloc * 2;\n      Fts5HashEntry *pNew;\n      Fts5HashEntry **pp;\n      pNew = (Fts5HashEntry*)sqlite3_realloc64(p, nNew);\n      if( pNew==0 ) return SQLITE_NOMEM;\n      pNew->nAlloc = (int)nNew;\n      for(pp=&pHash->aSlot[iHash]; *pp!=p; pp=&(*pp)->pHashNext);\n      *pp = pNew;\n      p = pNew;\n    }\n    nIncr -= p->nData;\n  }\n  assert( (p->nAlloc - p->nData) >= (9 + 4 + 1 + 3 + 5) );\n\n  pPtr = (u8*)p;\n\n  /* If this is a new rowid, append the 4-byte size field for the previous\n  ** entry, and the new rowid for this entry.  */\n  if( iRowid!=p->iRowid ){\n    u64 iDiff = (u64)iRowid - (u64)p->iRowid;\n    fts5HashAddPoslistSize(pHash, p, 0);\n    p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iDiff);\n    p->iRowid = iRowid;\n    bNew = 1;\n    p->iSzPoslist = p->nData;\n    if( pHash->eDetail!=FTS5_DETAIL_NONE ){\n      p->nData += 1;\n      p->iCol = (pHash->eDetail==FTS5_DETAIL_FULL ? 0 : -1);\n      p->iPos = 0;\n    }\n  }\n\n  if( iCol>=0 ){\n    if( pHash->eDetail==FTS5_DETAIL_NONE ){\n      p->bContent = 1;\n    }else{\n      /* Append a new column value, if necessary */\n      assert_nc( iCol>=p->iCol );\n      if( iCol!=p->iCol ){\n        if( pHash->eDetail==FTS5_DETAIL_FULL ){\n          pPtr[p->nData++] = 0x01;\n          p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iCol);\n          p->iCol = (i16)iCol;\n          p->iPos = 0;\n        }else{\n          bNew = 1;\n          p->iCol = (i16)(iPos = iCol);\n        }\n      }\n\n      /* Append the new position offset, if necessary */\n      if( bNew ){\n        p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iPos - p->iPos + 2);\n        p->iPos = iPos;\n      }\n    }\n  }else{\n    /* This is a delete. Set the delete flag. */\n    p->bDel = 1;\n  }\n\n  nIncr += p->nData;\n  *pHash->pnByte += nIncr;\n  return SQLITE_OK;\n}\n\n\n/*\n** Arguments pLeft and pRight point to linked-lists of hash-entry objects,\n** each sorted in key order. This function merges the two lists into a\n** single list and returns a pointer to its first element.\n*/\nstatic Fts5HashEntry *fts5HashEntryMerge(\n  Fts5HashEntry *pLeft,\n  Fts5HashEntry *pRight\n){\n  Fts5HashEntry *p1 = pLeft;\n  Fts5HashEntry *p2 = pRight;\n  Fts5HashEntry *pRet = 0;\n  Fts5HashEntry **ppOut = &pRet;\n\n  while( p1 || p2 ){\n    if( p1==0 ){\n      *ppOut = p2;\n      p2 = 0;\n    }else if( p2==0 ){\n      *ppOut = p1;\n      p1 = 0;\n    }else{\n      char *zKey1 = fts5EntryKey(p1);\n      char *zKey2 = fts5EntryKey(p2);\n      int nMin = MIN(p1->nKey, p2->nKey);\n\n      int cmp = memcmp(zKey1, zKey2, nMin);\n      if( cmp==0 ){\n        cmp = p1->nKey - p2->nKey;\n      }\n      assert( cmp!=0 );\n\n      if( cmp>0 ){\n        /* p2 is smaller */\n        *ppOut = p2;\n        ppOut = &p2->pScanNext;\n        p2 = p2->pScanNext;\n      }else{\n        /* p1 is smaller */\n        *ppOut = p1;\n        ppOut = &p1->pScanNext;\n        p1 = p1->pScanNext;\n      }\n      *ppOut = 0;\n    }\n  }\n\n  return pRet;\n}\n\n/*\n** Link all tokens from hash table iHash into a list in sorted order. The\n** tokens are not removed from the hash table.\n*/\nstatic int fts5HashEntrySort(\n  Fts5Hash *pHash,\n  const char *pTerm, int nTerm,   /* Query prefix, if any */\n  Fts5HashEntry **ppSorted\n){\n  const int nMergeSlot = 32;\n  Fts5HashEntry **ap;\n  Fts5HashEntry *pList;\n  int iSlot;\n  int i;\n\n  *ppSorted = 0;\n  ap = sqlite3_malloc64(sizeof(Fts5HashEntry*) * nMergeSlot);\n  if( !ap ) return SQLITE_NOMEM;\n  memset(ap, 0, sizeof(Fts5HashEntry*) * nMergeSlot);\n\n  for(iSlot=0; iSlot<pHash->nSlot; iSlot++){\n    Fts5HashEntry *pIter;\n    for(pIter=pHash->aSlot[iSlot]; pIter; pIter=pIter->pHashNext){\n      if( pTerm==0\n       || (pIter->nKey>=nTerm && 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm))\n      ){\n        Fts5HashEntry *pEntry = pIter;\n        pEntry->pScanNext = 0;\n        for(i=0; ap[i]; i++){\n          pEntry = fts5HashEntryMerge(pEntry, ap[i]);\n          ap[i] = 0;\n        }\n        ap[i] = pEntry;\n      }\n    }\n  }\n\n  pList = 0;\n  for(i=0; i<nMergeSlot; i++){\n    pList = fts5HashEntryMerge(pList, ap[i]);\n  }\n\n  sqlite3_free(ap);\n  *ppSorted = pList;\n  return SQLITE_OK;\n}\n\n/*\n** Query the hash table for a doclist associated with term pTerm/nTerm.\n*/\nstatic int sqlite3Fts5HashQuery(\n  Fts5Hash *pHash,                /* Hash table to query */\n  int nPre,\n  const char *pTerm, int nTerm,   /* Query term */\n  void **ppOut,                   /* OUT: Pointer to new object */\n  int *pnDoclist                  /* OUT: Size of doclist in bytes */\n){\n  unsigned int iHash = fts5HashKey(pHash->nSlot, (const u8*)pTerm, nTerm);\n  char *zKey = 0;\n  Fts5HashEntry *p;\n\n  for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){\n    zKey = fts5EntryKey(p);\n    if( nTerm==p->nKey && memcmp(zKey, pTerm, nTerm)==0 ) break;\n  }\n\n  if( p ){\n    int nHashPre = sizeof(Fts5HashEntry) + nTerm;\n    int nList = p->nData - nHashPre;\n    u8 *pRet = (u8*)(*ppOut = sqlite3_malloc64(nPre + nList + 10));\n    if( pRet ){\n      Fts5HashEntry *pFaux = (Fts5HashEntry*)&pRet[nPre-nHashPre];\n      memcpy(&pRet[nPre], &((u8*)p)[nHashPre], nList);\n      nList += fts5HashAddPoslistSize(pHash, p, pFaux);\n      *pnDoclist = nList;\n    }else{\n      *pnDoclist = 0;\n      return SQLITE_NOMEM;\n    }\n  }else{\n    *ppOut = 0;\n    *pnDoclist = 0;\n  }\n\n  return SQLITE_OK;\n}\n\nstatic int sqlite3Fts5HashScanInit(\n  Fts5Hash *p,                    /* Hash table to query */\n  const char *pTerm, int nTerm    /* Query prefix */\n){\n  return fts5HashEntrySort(p, pTerm, nTerm, &p->pScan);\n}\n\n#ifdef SQLITE_DEBUG\nstatic int fts5HashCount(Fts5Hash *pHash){\n  int nEntry = 0;\n  int ii;\n  for(ii=0; ii<pHash->nSlot; ii++){\n    Fts5HashEntry *p = 0;\n    for(p=pHash->aSlot[ii]; p; p=p->pHashNext){\n      nEntry++;\n    }\n  }\n  return nEntry;\n}\n#endif\n\n/*\n** Return true if the hash table is empty, false otherwise.\n*/\nstatic int sqlite3Fts5HashIsEmpty(Fts5Hash *pHash){\n  assert( pHash->nEntry==fts5HashCount(pHash) );\n  return pHash->nEntry==0;\n}\n\nstatic void sqlite3Fts5HashScanNext(Fts5Hash *p){\n  assert( !sqlite3Fts5HashScanEof(p) );\n  p->pScan = p->pScan->pScanNext;\n}\n\nstatic int sqlite3Fts5HashScanEof(Fts5Hash *p){\n  return (p->pScan==0);\n}\n\nstatic void sqlite3Fts5HashScanEntry(\n  Fts5Hash *pHash,\n  const char **pzTerm,            /* OUT: term (nul-terminated) */\n  int *pnTerm,                    /* OUT: Size of term in bytes */\n  const u8 **ppDoclist,           /* OUT: pointer to doclist */\n  int *pnDoclist                  /* OUT: size of doclist in bytes */\n){\n  Fts5HashEntry *p;\n  if( (p = pHash->pScan) ){\n    char *zKey = fts5EntryKey(p);\n    int nTerm = p->nKey;\n    fts5HashAddPoslistSize(pHash, p, 0);\n    *pzTerm = zKey;\n    *pnTerm = nTerm;\n    *ppDoclist = (const u8*)&zKey[nTerm];\n    *pnDoclist = p->nData - (sizeof(Fts5HashEntry) + nTerm);\n  }else{\n    *pzTerm = 0;\n    *pnTerm = 0;\n    *ppDoclist = 0;\n    *pnDoclist = 0;\n  }\n}\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Low level access to the FTS index stored in the database file. The\n** routines in this file file implement all read and write access to the\n** %_data table. Other parts of the system access this functionality via\n** the interface defined in fts5Int.h.\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n/*\n** Overview:\n**\n** The %_data table contains all the FTS indexes for an FTS5 virtual table.\n** As well as the main term index, there may be up to 31 prefix indexes.\n** The format is similar to FTS3/4, except that:\n**\n**   * all segment b-tree leaf data is stored in fixed size page records\n**     (e.g. 1000 bytes). A single doclist may span multiple pages. Care is\n**     taken to ensure it is possible to iterate in either direction through\n**     the entries in a doclist, or to seek to a specific entry within a\n**     doclist, without loading it into memory.\n**\n**   * large doclists that span many pages have associated \"doclist index\"\n**     records that contain a copy of the first rowid on each page spanned by\n**     the doclist. This is used to speed up seek operations, and merges of\n**     large doclists with very small doclists.\n**\n**   * extra fields in the \"structure record\" record the state of ongoing\n**     incremental merge operations.\n**\n*/\n\n\n#define FTS5_OPT_WORK_UNIT  1000  /* Number of leaf pages per optimize step */\n#define FTS5_WORK_UNIT      64    /* Number of leaf pages in unit of work */\n\n#define FTS5_MIN_DLIDX_SIZE 4     /* Add dlidx if this many empty pages */\n\n#define FTS5_MAIN_PREFIX '0'\n\n#if FTS5_MAX_PREFIX_INDEXES > 31\n# error \"FTS5_MAX_PREFIX_INDEXES is too large\"\n#endif\n\n#define FTS5_MAX_LEVEL 64\n\n/*\n** There are two versions of the format used for the structure record:\n**\n**   1. the legacy format, that may be read by all fts5 versions, and\n**\n**   2. the V2 format, which is used by contentless_delete=1 databases.\n**\n** Both begin with a 4-byte \"configuration cookie\" value. Then, a legacy\n** format structure record contains a varint - the number of levels in\n** the structure. Whereas a V2 structure record contains the constant\n** 4 bytes [0xff 0x00 0x00 0x01]. This is unambiguous as the value of a\n** varint has to be at least 16256 to begin with \"0xFF\". And the default\n** maximum number of levels is 64.\n**\n** See below for more on structure record formats.\n*/\n#define FTS5_STRUCTURE_V2 \"\\xFF\\x00\\x00\\x01\"\n\n/*\n** Details:\n**\n** The %_data table managed by this module,\n**\n**     CREATE TABLE %_data(id INTEGER PRIMARY KEY, block BLOB);\n**\n** , contains the following 6 types of records. See the comments surrounding\n** the FTS5_*_ROWID macros below for a description of how %_data rowids are\n** assigned to each fo them.\n**\n** 1. Structure Records:\n**\n**   The set of segments that make up an index - the index structure - are\n**   recorded in a single record within the %_data table. The record consists\n**   of a single 32-bit configuration cookie value followed by a list of\n**   SQLite varints.\n**\n**   If the structure record is a V2 record, the configuration cookie is\n**   followed by the following 4 bytes: [0xFF 0x00 0x00 0x01].\n**\n**   Next, the record continues with three varints:\n**\n**     + number of levels,\n**     + total number of segments on all levels,\n**     + value of write counter.\n**\n**   Then, for each level from 0 to nMax:\n**\n**     + number of input segments in ongoing merge.\n**     + total number of segments in level.\n**     + for each segment from oldest to newest:\n**         + segment id (always > 0)\n**         + first leaf page number (often 1, always greater than 0)\n**         + final leaf page number\n**\n**      Then, for V2 structures only:\n**\n**         + lower origin counter value,\n**         + upper origin counter value,\n**         + the number of tombstone hash pages.\n**\n** 2. The Averages Record:\n**\n**   A single record within the %_data table. The data is a list of varints.\n**   The first value is the number of rows in the index. Then, for each column\n**   from left to right, the total number of tokens in the column for all\n**   rows of the table.\n**\n** 3. Segment leaves:\n**\n**   TERM/DOCLIST FORMAT:\n**\n**     Most of each segment leaf is taken up by term/doclist data. The\n**     general format of term/doclist, starting with the first term\n**     on the leaf page, is:\n**\n**         varint : size of first term\n**         blob:    first term data\n**         doclist: first doclist\n**         zero-or-more {\n**           varint:  number of bytes in common with previous term\n**           varint:  number of bytes of new term data (nNew)\n**           blob:    nNew bytes of new term data\n**           doclist: next doclist\n**         }\n**\n**     doclist format:\n**\n**         varint:  first rowid\n**         poslist: first poslist\n**         zero-or-more {\n**           varint:  rowid delta (always > 0)\n**           poslist: next poslist\n**         }\n**\n**     poslist format:\n**\n**         varint: size of poslist in bytes multiplied by 2, not including\n**                 this field. Plus 1 if this entry carries the \"delete\" flag.\n**         collist: collist for column 0\n**         zero-or-more {\n**           0x01 byte\n**           varint: column number (I)\n**           collist: collist for column I\n**         }\n**\n**     collist format:\n**\n**         varint: first offset + 2\n**         zero-or-more {\n**           varint: offset delta + 2\n**         }\n**\n**   PAGE FORMAT\n**\n**     Each leaf page begins with a 4-byte header containing 2 16-bit\n**     unsigned integer fields in big-endian format. They are:\n**\n**       * The byte offset of the first rowid on the page, if it exists\n**         and occurs before the first term (otherwise 0).\n**\n**       * The byte offset of the start of the page footer. If the page\n**         footer is 0 bytes in size, then this field is the same as the\n**         size of the leaf page in bytes.\n**\n**     The page footer consists of a single varint for each term located\n**     on the page. Each varint is the byte offset of the current term\n**     within the page, delta-compressed against the previous value. In\n**     other words, the first varint in the footer is the byte offset of\n**     the first term, the second is the byte offset of the second less that\n**     of the first, and so on.\n**\n**     The term/doclist format described above is accurate if the entire\n**     term/doclist data fits on a single leaf page. If this is not the case,\n**     the format is changed in two ways:\n**\n**       + if the first rowid on a page occurs before the first term, it\n**         is stored as a literal value:\n**\n**             varint:  first rowid\n**\n**       + the first term on each page is stored in the same way as the\n**         very first term of the segment:\n**\n**             varint : size of first term\n**             blob:    first term data\n**\n** 5. Segment doclist indexes:\n**\n**   Doclist indexes are themselves b-trees, however they usually consist of\n**   a single leaf record only. The format of each doclist index leaf page\n**   is:\n**\n**     * Flags byte. Bits are:\n**         0x01: Clear if leaf is also the root page, otherwise set.\n**\n**     * Page number of fts index leaf page. As a varint.\n**\n**     * First rowid on page indicated by previous field. As a varint.\n**\n**     * A list of varints, one for each subsequent termless page. A\n**       positive delta if the termless page contains at least one rowid,\n**       or an 0x00 byte otherwise.\n**\n**   Internal doclist index nodes are:\n**\n**     * Flags byte. Bits are:\n**         0x01: Clear for root page, otherwise set.\n**\n**     * Page number of first child page. As a varint.\n**\n**     * Copy of first rowid on page indicated by previous field. As a varint.\n**\n**     * A list of delta-encoded varints - the first rowid on each subsequent\n**       child page.\n**\n** 6. Tombstone Hash Page\n**\n**   These records are only ever present in contentless_delete=1 tables.\n**   There are zero or more of these associated with each segment. They\n**   are used to store the tombstone rowids for rows contained in the\n**   associated segments.\n**\n**   The set of nHashPg tombstone hash pages associated with a single\n**   segment together form a single hash table containing tombstone rowids.\n**   To find the page of the hash on which a key might be stored:\n**\n**       iPg = (rowid % nHashPg)\n**\n**   Then, within page iPg, which has nSlot slots:\n**\n**       iSlot = (rowid / nHashPg) % nSlot\n**\n**   Each tombstone hash page begins with an 8 byte header:\n**\n**     1-byte:  Key-size (the size in bytes of each slot). Either 4 or 8.\n**     1-byte:  rowid-0-tombstone flag. This flag is only valid on the\n**              first tombstone hash page for each segment (iPg=0). If set,\n**              the hash table contains rowid 0. If clear, it does not.\n**              Rowid 0 is handled specially.\n**     2-bytes: unused.\n**     4-bytes: Big-endian integer containing number of entries on page.\n**\n**   Following this are nSlot 4 or 8 byte slots (depending on the key-size\n**   in the first byte of the page header). The number of slots may be\n**   determined based on the size of the page record and the key-size:\n**\n**     nSlot = (nByte - 8) / key-size\n*/\n\n/*\n** Rowids for the averages and structure records in the %_data table.\n*/\n#define FTS5_AVERAGES_ROWID     1    /* Rowid used for the averages record */\n#define FTS5_STRUCTURE_ROWID   10    /* The structure record */\n\n/*\n** Macros determining the rowids used by segment leaves and dlidx leaves\n** and nodes. All nodes and leaves are stored in the %_data table with large\n** positive rowids.\n**\n** Each segment has a unique non-zero 16-bit id.\n**\n** The rowid for each segment leaf is found by passing the segment id and\n** the leaf page number to the FTS5_SEGMENT_ROWID macro. Leaves are numbered\n** sequentially starting from 1.\n*/\n#define FTS5_DATA_ID_B     16     /* Max seg id number 65535 */\n#define FTS5_DATA_DLI_B     1     /* Doclist-index flag (1 bit) */\n#define FTS5_DATA_HEIGHT_B  5     /* Max dlidx tree height of 32 */\n#define FTS5_DATA_PAGE_B   31     /* Max page number of 2147483648 */\n\n#define fts5_dri(segid, dlidx, height, pgno) (                                 \\\n ((i64)(segid)  << (FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)) +    \\\n ((i64)(dlidx)  << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B)) +                  \\\n ((i64)(height) << (FTS5_DATA_PAGE_B)) +                                       \\\n ((i64)(pgno))                                                                 \\\n)\n\n#define FTS5_SEGMENT_ROWID(segid, pgno)       fts5_dri(segid, 0, 0, pgno)\n#define FTS5_DLIDX_ROWID(segid, height, pgno) fts5_dri(segid, 1, height, pgno)\n#define FTS5_TOMBSTONE_ROWID(segid,ipg)       fts5_dri(segid+(1<<16), 0, 0, ipg)\n\n#ifdef SQLITE_DEBUG\nstatic int sqlite3Fts5Corrupt() { return SQLITE_CORRUPT_VTAB; }\n#endif\n\n\n/*\n** Each time a blob is read from the %_data table, it is padded with this\n** many zero bytes. This makes it easier to decode the various record formats\n** without overreading if the records are corrupt.\n*/\n#define FTS5_DATA_ZERO_PADDING 8\n#define FTS5_DATA_PADDING 20\n\ntypedef struct Fts5Data Fts5Data;\ntypedef struct Fts5DlidxIter Fts5DlidxIter;\ntypedef struct Fts5DlidxLvl Fts5DlidxLvl;\ntypedef struct Fts5DlidxWriter Fts5DlidxWriter;\ntypedef struct Fts5Iter Fts5Iter;\ntypedef struct Fts5PageWriter Fts5PageWriter;\ntypedef struct Fts5SegIter Fts5SegIter;\ntypedef struct Fts5DoclistIter Fts5DoclistIter;\ntypedef struct Fts5SegWriter Fts5SegWriter;\ntypedef struct Fts5Structure Fts5Structure;\ntypedef struct Fts5StructureLevel Fts5StructureLevel;\ntypedef struct Fts5StructureSegment Fts5StructureSegment;\ntypedef struct Fts5TokenDataIter Fts5TokenDataIter;\ntypedef struct Fts5TokenDataMap Fts5TokenDataMap;\ntypedef struct Fts5TombstoneArray Fts5TombstoneArray;\n\nstruct Fts5Data {\n  u8 *p;                          /* Pointer to buffer containing record */\n  int nn;                         /* Size of record in bytes */\n  int szLeaf;                     /* Size of leaf without page-index */\n};\n\n/*\n** One object per %_data table.\n**\n** nContentlessDelete:\n**   The number of contentless delete operations since the most recent\n**   call to fts5IndexFlush() or fts5IndexDiscardData(). This is tracked\n**   so that extra auto-merge work can be done by fts5IndexFlush() to\n**   account for the delete operations.\n*/\nstruct Fts5Index {\n  Fts5Config *pConfig;            /* Virtual table configuration */\n  char *zDataTbl;                 /* Name of %_data table */\n  int nWorkUnit;                  /* Leaf pages in a \"unit\" of work */\n\n  /*\n  ** Variables related to the accumulation of tokens and doclists within the\n  ** in-memory hash tables before they are flushed to disk.\n  */\n  Fts5Hash *pHash;                /* Hash table for in-memory data */\n  int nPendingData;               /* Current bytes of pending data */\n  i64 iWriteRowid;                /* Rowid for current doc being written */\n  int bDelete;                    /* Current write is a delete */\n  int nContentlessDelete;         /* Number of contentless delete ops */\n  int nPendingRow;                /* Number of INSERT in hash table */\n\n  /* Error state. */\n  int rc;                         /* Current error code */\n  int flushRc;\n\n  /* State used by the fts5DataXXX() functions. */\n  sqlite3_blob *pReader;          /* RO incr-blob open on %_data table */\n  sqlite3_stmt *pWriter;          /* \"INSERT ... %_data VALUES(?,?)\" */\n  sqlite3_stmt *pDeleter;         /* \"DELETE FROM %_data ... id>=? AND id<=?\" */\n  sqlite3_stmt *pIdxWriter;       /* \"INSERT ... %_idx VALUES(?,?,?,?)\" */\n  sqlite3_stmt *pIdxDeleter;      /* \"DELETE FROM %_idx WHERE segid=?\" */\n  sqlite3_stmt *pIdxSelect;\n  sqlite3_stmt *pIdxNextSelect;\n  int nRead;                      /* Total number of blocks read */\n\n  sqlite3_stmt *pDeleteFromIdx;\n\n  sqlite3_stmt *pDataVersion;\n  i64 iStructVersion;             /* data_version when pStruct read */\n  Fts5Structure *pStruct;         /* Current db structure (or NULL) */\n};\n\nstruct Fts5DoclistIter {\n  u8 *aEof;                       /* Pointer to 1 byte past end of doclist */\n\n  /* Output variables. aPoslist==0 at EOF */\n  i64 iRowid;\n  u8 *aPoslist;\n  int nPoslist;\n  int nSize;\n};\n\n/*\n** The contents of the \"structure\" record for each index are represented\n** using an Fts5Structure record in memory. Which uses instances of the\n** other Fts5StructureXXX types as components.\n**\n** nOriginCntr:\n**   This value is set to non-zero for structure records created for\n**   contentlessdelete=1 tables only. In that case it represents the\n**   origin value to apply to the next top-level segment created.\n*/\nstruct Fts5StructureSegment {\n  int iSegid;                     /* Segment id */\n  int pgnoFirst;                  /* First leaf page number in segment */\n  int pgnoLast;                   /* Last leaf page number in segment */\n\n  /* contentlessdelete=1 tables only: */\n  u64 iOrigin1;\n  u64 iOrigin2;\n  int nPgTombstone;               /* Number of tombstone hash table pages */\n  u64 nEntryTombstone;            /* Number of tombstone entries that \"count\" */\n  u64 nEntry;                     /* Number of rows in this segment */\n};\nstruct Fts5StructureLevel {\n  int nMerge;                     /* Number of segments in incr-merge */\n  int nSeg;                       /* Total number of segments on level */\n  Fts5StructureSegment *aSeg;     /* Array of segments. aSeg[0] is oldest. */\n};\nstruct Fts5Structure {\n  int nRef;                       /* Object reference count */\n  u64 nWriteCounter;              /* Total leaves written to level 0 */\n  u64 nOriginCntr;                /* Origin value for next top-level segment */\n  int nSegment;                   /* Total segments in this structure */\n  int nLevel;                     /* Number of levels in this index */\n  Fts5StructureLevel aLevel[FLEXARRAY]; /* Array of nLevel level objects */\n};\n\n/* Size (in bytes) of an Fts5Structure object holding up to N levels */\n#define SZ_FTS5STRUCTURE(N) \\\n         (offsetof(Fts5Structure,aLevel) + (N)*sizeof(Fts5StructureLevel))\n\n/*\n** An object of type Fts5SegWriter is used to write to segments.\n*/\nstruct Fts5PageWriter {\n  int pgno;                       /* Page number for this page */\n  int iPrevPgidx;                 /* Previous value written into pgidx */\n  Fts5Buffer buf;                 /* Buffer containing leaf data */\n  Fts5Buffer pgidx;               /* Buffer containing page-index */\n  Fts5Buffer term;                /* Buffer containing previous term on page */\n};\nstruct Fts5DlidxWriter {\n  int pgno;                       /* Page number for this page */\n  int bPrevValid;                 /* True if iPrev is valid */\n  i64 iPrev;                      /* Previous rowid value written to page */\n  Fts5Buffer buf;                 /* Buffer containing page data */\n};\nstruct Fts5SegWriter {\n  int iSegid;                     /* Segid to write to */\n  Fts5PageWriter writer;          /* PageWriter object */\n  i64 iPrevRowid;                 /* Previous rowid written to current leaf */\n  u8 bFirstRowidInDoclist;        /* True if next rowid is first in doclist */\n  u8 bFirstRowidInPage;           /* True if next rowid is first in page */\n  /* TODO1: Can use (writer.pgidx.n==0) instead of bFirstTermInPage */\n  u8 bFirstTermInPage;            /* True if next term will be first in leaf */\n  int nLeafWritten;               /* Number of leaf pages written */\n  int nEmpty;                     /* Number of contiguous term-less nodes */\n\n  int nDlidx;                     /* Allocated size of aDlidx[] array */\n  Fts5DlidxWriter *aDlidx;        /* Array of Fts5DlidxWriter objects */\n\n  /* Values to insert into the %_idx table */\n  Fts5Buffer btterm;              /* Next term to insert into %_idx table */\n  int iBtPage;                    /* Page number corresponding to btterm */\n};\n\ntypedef struct Fts5CResult Fts5CResult;\nstruct Fts5CResult {\n  u16 iFirst;                     /* aSeg[] index of firstest iterator */\n  u8 bTermEq;                     /* True if the terms are equal */\n};\n\n/*\n** Object for iterating through a single segment, visiting each term/rowid\n** pair in the segment.\n**\n** pSeg:\n**   The segment to iterate through.\n**\n** iLeafPgno:\n**   Current leaf page number within segment.\n**\n** iLeafOffset:\n**   Byte offset within the current leaf that is the first byte of the\n**   position list data (one byte passed the position-list size field).\n**\n** pLeaf:\n**   Buffer containing current leaf page data. Set to NULL at EOF.\n**\n** iTermLeafPgno, iTermLeafOffset:\n**   Leaf page number containing the last term read from the segment. And\n**   the offset immediately following the term data.\n**\n** flags:\n**   Mask of FTS5_SEGITER_XXX values. Interpreted as follows:\n**\n**   FTS5_SEGITER_ONETERM:\n**     If set, set the iterator to point to EOF after the current doclist\n**     has been exhausted. Do not proceed to the next term in the segment.\n**\n**   FTS5_SEGITER_REVERSE:\n**     This flag is only ever set if FTS5_SEGITER_ONETERM is also set. If\n**     it is set, iterate through rowid in descending order instead of the\n**     default ascending order.\n**\n** iRowidOffset/nRowidOffset/aRowidOffset:\n**     These are used if the FTS5_SEGITER_REVERSE flag is set.\n**\n**     For each rowid on the page corresponding to the current term, the\n**     corresponding aRowidOffset[] entry is set to the byte offset of the\n**     start of the \"position-list-size\" field within the page.\n**\n** iTermIdx:\n**     Index of current term on iTermLeafPgno.\n**\n** apTombstone/nTombstone:\n**     These are used for contentless_delete=1 tables only. When the cursor\n**     is first allocated, the apTombstone[] array is allocated so that it\n**     is large enough for all tombstones hash pages associated with the\n**     segment. The pages themselves are loaded lazily from the database as\n**     they are required.\n*/\nstruct Fts5SegIter {\n  Fts5StructureSegment *pSeg;     /* Segment to iterate through */\n  int flags;                      /* Mask of configuration flags */\n  int iLeafPgno;                  /* Current leaf page number */\n  Fts5Data *pLeaf;                /* Current leaf data */\n  Fts5Data *pNextLeaf;            /* Leaf page (iLeafPgno+1) */\n  i64 iLeafOffset;                /* Byte offset within current leaf */\n  Fts5TombstoneArray *pTombArray; /* Array of tombstone pages */\n\n  /* Next method */\n  void (*xNext)(Fts5Index*, Fts5SegIter*, int*);\n\n  /* The page and offset from which the current term was read. The offset\n  ** is the offset of the first rowid in the current doclist.  */\n  int iTermLeafPgno;\n  int iTermLeafOffset;\n\n  int iPgidxOff;                  /* Next offset in pgidx */\n  int iEndofDoclist;\n\n  /* The following are only used if the FTS5_SEGITER_REVERSE flag is set. */\n  int iRowidOffset;               /* Current entry in aRowidOffset[] */\n  int nRowidOffset;               /* Allocated size of aRowidOffset[] array */\n  int *aRowidOffset;              /* Array of offset to rowid fields */\n\n  Fts5DlidxIter *pDlidx;          /* If there is a doclist-index */\n\n  /* Variables populated based on current entry. */\n  Fts5Buffer term;                /* Current term */\n  i64 iRowid;                     /* Current rowid */\n  int nPos;                       /* Number of bytes in current position list */\n  u8 bDel;                        /* True if the delete flag is set */\n};\n\nstatic int fts5IndexCorruptRowid(Fts5Index *pIdx, i64 iRowid){\n  pIdx->rc = FTS5_CORRUPT;\n  sqlite3Fts5ConfigErrmsg(pIdx->pConfig,\n      \"fts5: corruption found reading blob %lld from table \\\"%s\\\"\",\n      iRowid, pIdx->pConfig->zName\n  );\n  return SQLITE_CORRUPT_VTAB;\n}\n#define FTS5_CORRUPT_ROWID(pIdx, iRowid) fts5IndexCorruptRowid(pIdx, iRowid)\n\nstatic int fts5IndexCorruptIter(Fts5Index *pIdx, Fts5SegIter *pIter){\n  pIdx->rc = FTS5_CORRUPT;\n  sqlite3Fts5ConfigErrmsg(pIdx->pConfig,\n      \"fts5: corruption on page %d, segment %d, table \\\"%s\\\"\",\n      pIter->iLeafPgno, pIter->pSeg->iSegid, pIdx->pConfig->zName\n  );\n  return SQLITE_CORRUPT_VTAB;\n}\n#define FTS5_CORRUPT_ITER(pIdx, pIter) fts5IndexCorruptIter(pIdx, pIter)\n\nstatic int fts5IndexCorruptIdx(Fts5Index *pIdx){\n  pIdx->rc = FTS5_CORRUPT;\n  sqlite3Fts5ConfigErrmsg(pIdx->pConfig,\n      \"fts5: corruption in table \\\"%s\\\"\", pIdx->pConfig->zName\n  );\n  return SQLITE_CORRUPT_VTAB;\n}\n#define FTS5_CORRUPT_IDX(pIdx) fts5IndexCorruptIdx(pIdx)\n\n\n/*\n** Array of tombstone pages. Reference counted.\n*/\nstruct Fts5TombstoneArray {\n  int nRef;                         /* Number of pointers to this object */\n  int nTombstone;\n  Fts5Data *apTombstone[FLEXARRAY]; /* Array of tombstone pages */\n};\n\n/* Size (in bytes) of an Fts5TombstoneArray holding up to N tombstones */\n#define SZ_FTS5TOMBSTONEARRAY(N) \\\n  (offsetof(Fts5TombstoneArray,apTombstone)+(N)*sizeof(Fts5Data*))\n\n/*\n** Argument is a pointer to an Fts5Data structure that contains a\n** leaf page.\n*/\n#define ASSERT_SZLEAF_OK(x) assert( \\\n    (x)->szLeaf==(x)->nn || (x)->szLeaf==fts5GetU16(&(x)->p[2]) \\\n)\n\n#define FTS5_SEGITER_ONETERM 0x01\n#define FTS5_SEGITER_REVERSE 0x02\n\n/*\n** Argument is a pointer to an Fts5Data structure that contains a leaf\n** page. This macro evaluates to true if the leaf contains no terms, or\n** false if it contains at least one term.\n*/\n#define fts5LeafIsTermless(x) ((x)->szLeaf >= (x)->nn)\n\n#define fts5LeafTermOff(x, i) (fts5GetU16(&(x)->p[(x)->szLeaf + (i)*2]))\n\n#define fts5LeafFirstRowidOff(x) (fts5GetU16((x)->p))\n\n/*\n** Object for iterating through the merged results of one or more segments,\n** visiting each term/rowid pair in the merged data.\n**\n** nSeg is always a power of two greater than or equal to the number of\n** segments that this object is merging data from. Both the aSeg[] and\n** aFirst[] arrays are sized at nSeg entries. The aSeg[] array is padded\n** with zeroed objects - these are handled as if they were iterators opened\n** on empty segments.\n**\n** The results of comparing segments aSeg[N] and aSeg[N+1], where N is an\n** even number, is stored in aFirst[(nSeg+N)/2]. The \"result\" of the\n** comparison in this context is the index of the iterator that currently\n** points to the smaller term/rowid combination. Iterators at EOF are\n** considered to be greater than all other iterators.\n**\n** aFirst[1] contains the index in aSeg[] of the iterator that points to\n** the smallest key overall. aFirst[0] is unused.\n**\n** poslist:\n**   Used by sqlite3Fts5IterPoslist() when the poslist needs to be buffered.\n**   There is no way to tell if this is populated or not.\n**\n** pColset:\n**   If not NULL, points to an object containing a set of column indices.\n**   Only matches that occur in one of these columns will be returned.\n**   The Fts5Iter does not own the Fts5Colset object, and so it is not\n**   freed when the iterator is closed - it is owned by the upper layer.\n*/\nstruct Fts5Iter {\n  Fts5IndexIter base;             /* Base class containing output vars */\n  Fts5TokenDataIter *pTokenDataIter;\n\n  Fts5Index *pIndex;              /* Index that owns this iterator */\n  Fts5Buffer poslist;             /* Buffer containing current poslist */\n  Fts5Colset *pColset;            /* Restrict matches to these columns */\n\n  /* Invoked to set output variables. */\n  void (*xSetOutputs)(Fts5Iter*, Fts5SegIter*);\n\n  int nSeg;                       /* Size of aSeg[] array */\n  int bRev;                       /* True to iterate in reverse order */\n  u8 bSkipEmpty;                  /* True to skip deleted entries */\n\n  i64 iSwitchRowid;               /* Firstest rowid of other than aFirst[1] */\n  Fts5CResult *aFirst;            /* Current merge state (see above) */\n  Fts5SegIter aSeg[FLEXARRAY];    /* Array of segment iterators */\n};\n\n/* Size (in bytes) of an Fts5Iter object holding up to N segment iterators */\n#define SZ_FTS5ITER(N)  (offsetof(Fts5Iter,aSeg)+(N)*sizeof(Fts5SegIter))\n\n/*\n** An instance of the following type is used to iterate through the contents\n** of a doclist-index record.\n**\n** pData:\n**   Record containing the doclist-index data.\n**\n** bEof:\n**   Set to true once iterator has reached EOF.\n**\n** iOff:\n**   Set to the current offset within record pData.\n*/\nstruct Fts5DlidxLvl {\n  Fts5Data *pData;              /* Data for current page of this level */\n  int iOff;                     /* Current offset into pData */\n  int bEof;                     /* At EOF already */\n  int iFirstOff;                /* Used by reverse iterators */\n\n  /* Output variables */\n  int iLeafPgno;                /* Page number of current leaf page */\n  i64 iRowid;                   /* First rowid on leaf iLeafPgno */\n};\nstruct Fts5DlidxIter {\n  int nLvl;\n  int iSegid;\n  Fts5DlidxLvl aLvl[FLEXARRAY];\n};\n\n/* Size (in bytes) of an Fts5DlidxIter object with up to N levels */\n#define SZ_FTS5DLIDXITER(N) \\\n          (offsetof(Fts5DlidxIter,aLvl)+(N)*sizeof(Fts5DlidxLvl))\n\nstatic void fts5PutU16(u8 *aOut, u16 iVal){\n  aOut[0] = (iVal>>8);\n  aOut[1] = (iVal&0xFF);\n}\n\nstatic u16 fts5GetU16(const u8 *aIn){\n  return ((u16)aIn[0] << 8) + aIn[1];\n}\n\n/*\n** The only argument points to a buffer at least 8 bytes in size. This\n** function interprets the first 8 bytes of the buffer as a 64-bit big-endian\n** unsigned integer and returns the result.\n*/\nstatic u64 fts5GetU64(u8 *a){\n  return ((u64)a[0] << 56)\n       + ((u64)a[1] << 48)\n       + ((u64)a[2] << 40)\n       + ((u64)a[3] << 32)\n       + ((u64)a[4] << 24)\n       + ((u64)a[5] << 16)\n       + ((u64)a[6] << 8)\n       + ((u64)a[7] << 0);\n}\n\n/*\n** The only argument points to a buffer at least 4 bytes in size. This\n** function interprets the first 4 bytes of the buffer as a 32-bit big-endian\n** unsigned integer and returns the result.\n*/\nstatic u32 fts5GetU32(const u8 *a){\n  return ((u32)a[0] << 24)\n       + ((u32)a[1] << 16)\n       + ((u32)a[2] << 8)\n       + ((u32)a[3] << 0);\n}\n\n/*\n** Write iVal, formated as a 64-bit big-endian unsigned integer, to the\n** buffer indicated by the first argument.\n*/\nstatic void fts5PutU64(u8 *a, u64 iVal){\n  a[0] = ((iVal >> 56) & 0xFF);\n  a[1] = ((iVal >> 48) & 0xFF);\n  a[2] = ((iVal >> 40) & 0xFF);\n  a[3] = ((iVal >> 32) & 0xFF);\n  a[4] = ((iVal >> 24) & 0xFF);\n  a[5] = ((iVal >> 16) & 0xFF);\n  a[6] = ((iVal >>  8) & 0xFF);\n  a[7] = ((iVal >>  0) & 0xFF);\n}\n\n/*\n** Write iVal, formated as a 32-bit big-endian unsigned integer, to the\n** buffer indicated by the first argument.\n*/\nstatic void fts5PutU32(u8 *a, u32 iVal){\n  a[0] = ((iVal >> 24) & 0xFF);\n  a[1] = ((iVal >> 16) & 0xFF);\n  a[2] = ((iVal >>  8) & 0xFF);\n  a[3] = ((iVal >>  0) & 0xFF);\n}\n\n/*\n** Allocate and return a buffer at least nByte bytes in size.\n**\n** If an OOM error is encountered, return NULL and set the error code in\n** the Fts5Index handle passed as the first argument.\n*/\nstatic void *fts5IdxMalloc(Fts5Index *p, sqlite3_int64 nByte){\n  return sqlite3Fts5MallocZero(&p->rc, nByte);\n}\n\n/*\n** Compare the contents of the pLeft buffer with the pRight/nRight blob.\n**\n** Return -ve if pLeft is smaller than pRight, 0 if they are equal or\n** +ve if pRight is smaller than pLeft. In other words:\n**\n**     res = *pLeft - *pRight\n*/\n#ifdef SQLITE_DEBUG\nstatic int fts5BufferCompareBlob(\n  Fts5Buffer *pLeft,              /* Left hand side of comparison */\n  const u8 *pRight, int nRight    /* Right hand side of comparison */\n){\n  int nCmp = MIN(pLeft->n, nRight);\n  int res = memcmp(pLeft->p, pRight, nCmp);\n  return (res==0 ? (pLeft->n - nRight) : res);\n}\n#endif\n\n/*\n** Compare the contents of the two buffers using memcmp(). If one buffer\n** is a prefix of the other, it is considered the lesser.\n**\n** Return -ve if pLeft is smaller than pRight, 0 if they are equal or\n** +ve if pRight is smaller than pLeft. In other words:\n**\n**     res = *pLeft - *pRight\n*/\nstatic int fts5BufferCompare(Fts5Buffer *pLeft, Fts5Buffer *pRight){\n  int nCmp, res;\n  nCmp = MIN(pLeft->n, pRight->n);\n  assert( nCmp<=0 || pLeft->p!=0 );\n  assert( nCmp<=0 || pRight->p!=0 );\n  res = fts5Memcmp(pLeft->p, pRight->p, nCmp);\n  return (res==0 ? (pLeft->n - pRight->n) : res);\n}\n\nstatic int fts5LeafFirstTermOff(Fts5Data *pLeaf){\n  int ret;\n  fts5GetVarint32(&pLeaf->p[pLeaf->szLeaf], ret);\n  return ret;\n}\n\n/*\n** Close the read-only blob handle, if it is open.\n*/\nstatic void fts5IndexCloseReader(Fts5Index *p){\n  if( p->pReader ){\n    int rc;\n    sqlite3_blob *pReader = p->pReader;\n    p->pReader = 0;\n    rc = sqlite3_blob_close(pReader);\n    if( p->rc==SQLITE_OK ) p->rc = rc;\n  }\n}\n\n/*\n** Retrieve a record from the %_data table.\n**\n** If an error occurs, NULL is returned and an error left in the\n** Fts5Index object.\n*/\nstatic Fts5Data *fts5DataRead(Fts5Index *p, i64 iRowid){\n  Fts5Data *pRet = 0;\n  if( p->rc==SQLITE_OK ){\n    int rc = SQLITE_OK;\n\n    if( p->pReader ){\n      /* This call may return SQLITE_ABORT if there has been a savepoint\n      ** rollback since it was last used. In this case a new blob handle\n      ** is required.  */\n      sqlite3_blob *pBlob = p->pReader;\n      p->pReader = 0;\n      rc = sqlite3_blob_reopen(pBlob, iRowid);\n      assert( p->pReader==0 );\n      p->pReader = pBlob;\n      if( rc!=SQLITE_OK ){\n        fts5IndexCloseReader(p);\n      }\n      if( rc==SQLITE_ABORT ) rc = SQLITE_OK;\n    }\n\n    /* If the blob handle is not open at this point, open it and seek\n    ** to the requested entry.  */\n    if( p->pReader==0 && rc==SQLITE_OK ){\n      Fts5Config *pConfig = p->pConfig;\n      rc = sqlite3_blob_open(pConfig->db,\n          pConfig->zDb, p->zDataTbl, \"block\", iRowid, 0, &p->pReader\n      );\n    }\n\n    /* If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls\n    ** above returned SQLITE_ERROR, return SQLITE_CORRUPT_VTAB instead.\n    ** All the reasons those functions might return SQLITE_ERROR - missing\n    ** table, missing row, non-blob/text in block column - indicate\n    ** backing store corruption.  */\n    if( rc==SQLITE_ERROR ) rc = FTS5_CORRUPT_ROWID(p, iRowid);\n\n    if( rc==SQLITE_OK ){\n      u8 *aOut = 0;               /* Read blob data into this buffer */\n      i64 nByte = sqlite3_blob_bytes(p->pReader);\n      i64 szData = (sizeof(Fts5Data) + 7) & ~7;\n      i64 nAlloc = szData + nByte + FTS5_DATA_PADDING;\n      pRet = (Fts5Data*)sqlite3_malloc64(nAlloc);\n      if( pRet ){\n        pRet->nn = nByte;\n        aOut = pRet->p = (u8*)pRet + szData;\n      }else{\n        rc = SQLITE_NOMEM;\n      }\n\n      if( rc==SQLITE_OK ){\n        rc = sqlite3_blob_read(p->pReader, aOut, nByte, 0);\n      }\n      if( rc!=SQLITE_OK ){\n        sqlite3_free(pRet);\n        pRet = 0;\n      }else{\n        /* TODO1: Fix this */\n        pRet->p[nByte] = 0x00;\n        pRet->p[nByte+1] = 0x00;\n        pRet->szLeaf = fts5GetU16(&pRet->p[2]);\n      }\n    }\n    p->rc = rc;\n    p->nRead++;\n  }\n\n  assert( (pRet==0)==(p->rc!=SQLITE_OK) );\n  assert( pRet==0 || EIGHT_BYTE_ALIGNMENT( pRet->p ) );\n  return pRet;\n}\n\n\n/*\n** Release a reference to data record returned by an earlier call to\n** fts5DataRead().\n*/\nstatic void fts5DataRelease(Fts5Data *pData){\n  sqlite3_free(pData);\n}\n\nstatic Fts5Data *fts5LeafRead(Fts5Index *p, i64 iRowid){\n  Fts5Data *pRet = fts5DataRead(p, iRowid);\n  if( pRet ){\n    if( pRet->nn<4 || pRet->szLeaf>pRet->nn ){\n      FTS5_CORRUPT_ROWID(p, iRowid);\n      fts5DataRelease(pRet);\n      pRet = 0;\n    }\n  }\n  return pRet;\n}\n\nstatic int fts5IndexPrepareStmt(\n  Fts5Index *p,\n  sqlite3_stmt **ppStmt,\n  char *zSql\n){\n  if( p->rc==SQLITE_OK ){\n    if( zSql ){\n      int rc = sqlite3_prepare_v3(p->pConfig->db, zSql, -1,\n          SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_NO_VTAB,\n          ppStmt, 0);\n      /* If this prepare() call fails with SQLITE_ERROR, then one of the\n      ** %_idx or %_data tables has been removed or modified. Call this\n      ** corruption.  */\n      p->rc = (rc==SQLITE_ERROR ? SQLITE_CORRUPT : rc);\n    }else{\n      p->rc = SQLITE_NOMEM;\n    }\n  }\n  sqlite3_free(zSql);\n  return p->rc;\n}\n\n\n/*\n** INSERT OR REPLACE a record into the %_data table.\n*/\nstatic void fts5DataWrite(Fts5Index *p, i64 iRowid, const u8 *pData, int nData){\n  if( p->rc!=SQLITE_OK ) return;\n\n  if( p->pWriter==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    fts5IndexPrepareStmt(p, &p->pWriter, sqlite3_mprintf(\n          \"REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\",\n          pConfig->zDb, pConfig->zName\n    ));\n    if( p->rc ) return;\n  }\n\n  sqlite3_bind_int64(p->pWriter, 1, iRowid);\n  sqlite3_bind_blob(p->pWriter, 2, pData, nData, SQLITE_STATIC);\n  sqlite3_step(p->pWriter);\n  p->rc = sqlite3_reset(p->pWriter);\n  sqlite3_bind_null(p->pWriter, 2);\n}\n\n/*\n** Execute the following SQL:\n**\n**     DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast\n*/\nstatic void fts5DataDelete(Fts5Index *p, i64 iFirst, i64 iLast){\n  if( p->rc!=SQLITE_OK ) return;\n\n  if( p->pDeleter==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    char *zSql = sqlite3_mprintf(\n        \"DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\",\n          pConfig->zDb, pConfig->zName\n    );\n    if( fts5IndexPrepareStmt(p, &p->pDeleter, zSql) ) return;\n  }\n\n  sqlite3_bind_int64(p->pDeleter, 1, iFirst);\n  sqlite3_bind_int64(p->pDeleter, 2, iLast);\n  sqlite3_step(p->pDeleter);\n  p->rc = sqlite3_reset(p->pDeleter);\n}\n\n/*\n** Remove all records associated with segment iSegid.\n*/\nstatic void fts5DataRemoveSegment(Fts5Index *p, Fts5StructureSegment *pSeg){\n  int iSegid = pSeg->iSegid;\n  i64 iFirst = FTS5_SEGMENT_ROWID(iSegid, 0);\n  i64 iLast = FTS5_SEGMENT_ROWID(iSegid+1, 0)-1;\n  fts5DataDelete(p, iFirst, iLast);\n\n  if( pSeg->nPgTombstone ){\n    i64 iTomb1 = FTS5_TOMBSTONE_ROWID(iSegid, 0);\n    i64 iTomb2 = FTS5_TOMBSTONE_ROWID(iSegid, pSeg->nPgTombstone-1);\n    fts5DataDelete(p, iTomb1, iTomb2);\n  }\n  if( p->pIdxDeleter==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    fts5IndexPrepareStmt(p, &p->pIdxDeleter, sqlite3_mprintf(\n          \"DELETE FROM '%q'.'%q_idx' WHERE segid=?\",\n          pConfig->zDb, pConfig->zName\n    ));\n  }\n  if( p->rc==SQLITE_OK ){\n    sqlite3_bind_int(p->pIdxDeleter, 1, iSegid);\n    sqlite3_step(p->pIdxDeleter);\n    p->rc = sqlite3_reset(p->pIdxDeleter);\n  }\n}\n\n/*\n** Release a reference to an Fts5Structure object returned by an earlier\n** call to fts5StructureRead() or fts5StructureDecode().\n*/\nstatic void fts5StructureRelease(Fts5Structure *pStruct){\n  if( pStruct && 0>=(--pStruct->nRef) ){\n    int i;\n    assert( pStruct->nRef==0 );\n    for(i=0; i<pStruct->nLevel; i++){\n      sqlite3_free(pStruct->aLevel[i].aSeg);\n    }\n    sqlite3_free(pStruct);\n  }\n}\n\nstatic void fts5StructureRef(Fts5Structure *pStruct){\n  pStruct->nRef++;\n}\n\nstatic void *sqlite3Fts5StructureRef(Fts5Index *p){\n  fts5StructureRef(p->pStruct);\n  return (void*)p->pStruct;\n}\nstatic void sqlite3Fts5StructureRelease(void *p){\n  if( p ){\n    fts5StructureRelease((Fts5Structure*)p);\n  }\n}\nstatic int sqlite3Fts5StructureTest(Fts5Index *p, void *pStruct){\n  if( p->pStruct!=(Fts5Structure*)pStruct ){\n    return SQLITE_ABORT;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Ensure that structure object (*pp) is writable.\n**\n** This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If\n** an error occurs, (*pRc) is set to an SQLite error code before returning.\n*/\nstatic void fts5StructureMakeWritable(int *pRc, Fts5Structure **pp){\n  Fts5Structure *p = *pp;\n  if( *pRc==SQLITE_OK && p->nRef>1 ){\n    i64 nByte = SZ_FTS5STRUCTURE(p->nLevel);\n    Fts5Structure *pNew;\n    pNew = (Fts5Structure*)sqlite3Fts5MallocZero(pRc, nByte);\n    if( pNew ){\n      int i;\n      memcpy(pNew, p, nByte);\n      for(i=0; i<p->nLevel; i++) pNew->aLevel[i].aSeg = 0;\n      for(i=0; i<p->nLevel; i++){\n        Fts5StructureLevel *pLvl = &pNew->aLevel[i];\n        nByte = sizeof(Fts5StructureSegment) * pNew->aLevel[i].nSeg;\n        pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(pRc, nByte);\n        if( pLvl->aSeg==0 ){\n          for(i=0; i<p->nLevel; i++){\n            sqlite3_free(pNew->aLevel[i].aSeg);\n          }\n          sqlite3_free(pNew);\n          return;\n        }\n        memcpy(pLvl->aSeg, p->aLevel[i].aSeg, nByte);\n      }\n      p->nRef--;\n      pNew->nRef = 1;\n    }\n    *pp = pNew;\n  }\n}\n\n/*\n** Deserialize and return the structure record currently stored in serialized\n** form within buffer pData/nData.\n**\n** The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array\n** are over-allocated by one slot. This allows the structure contents\n** to be more easily edited.\n**\n** If an error occurs, *ppOut is set to NULL and an SQLite error code\n** returned. Otherwise, *ppOut is set to point to the new object and\n** SQLITE_OK returned.\n*/\nstatic int fts5StructureDecode(\n  const u8 *pData,                /* Buffer containing serialized structure */\n  int nData,                      /* Size of buffer pData in bytes */\n  int *piCookie,                  /* Configuration cookie value */\n  Fts5Structure **ppOut           /* OUT: Deserialized object */\n){\n  int rc = SQLITE_OK;\n  int i = 0;\n  int iLvl;\n  int nLevel = 0;\n  int nSegment = 0;\n  sqlite3_int64 nByte;            /* Bytes of space to allocate at pRet */\n  Fts5Structure *pRet = 0;        /* Structure object to return */\n  int bStructureV2 = 0;           /* True for FTS5_STRUCTURE_V2 */\n  u64 nOriginCntr = 0;            /* Largest origin value seen so far */\n\n  /* Grab the cookie value */\n  if( piCookie ) *piCookie = sqlite3Fts5Get32(pData);\n  i = 4;\n\n  /* Check if this is a V2 structure record. Set bStructureV2 if it is. */\n  if( 0==memcmp(&pData[i], FTS5_STRUCTURE_V2, 4) ){\n    i += 4;\n    bStructureV2 = 1;\n  }\n\n  /* Read the total number of levels and segments from the start of the\n  ** structure record.  */\n  i += fts5GetVarint32(&pData[i], nLevel);\n  i += fts5GetVarint32(&pData[i], nSegment);\n  if( nLevel>FTS5_MAX_SEGMENT   || nLevel<0\n   || nSegment>FTS5_MAX_SEGMENT || nSegment<0\n  ){\n    return FTS5_CORRUPT;\n  }\n  nByte = SZ_FTS5STRUCTURE(nLevel);\n  pRet = (Fts5Structure*)sqlite3Fts5MallocZero(&rc, nByte);\n\n  if( pRet ){\n    pRet->nRef = 1;\n    pRet->nLevel = nLevel;\n    pRet->nSegment = nSegment;\n    i += sqlite3Fts5GetVarint(&pData[i], &pRet->nWriteCounter);\n\n    for(iLvl=0; rc==SQLITE_OK && iLvl<nLevel; iLvl++){\n      Fts5StructureLevel *pLvl = &pRet->aLevel[iLvl];\n      int nTotal = 0;\n      int iSeg;\n\n      if( i>=nData ){\n        rc = FTS5_CORRUPT;\n      }else{\n        i += fts5GetVarint32(&pData[i], pLvl->nMerge);\n        i += fts5GetVarint32(&pData[i], nTotal);\n        if( nTotal<pLvl->nMerge ) rc = FTS5_CORRUPT;\n        pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&rc,\n            nTotal * sizeof(Fts5StructureSegment)\n        );\n        nSegment -= nTotal;\n      }\n\n      if( rc==SQLITE_OK ){\n        pLvl->nSeg = nTotal;\n        for(iSeg=0; iSeg<nTotal; iSeg++){\n          Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];\n          if( i>=nData ){\n            rc = FTS5_CORRUPT;\n            break;\n          }\n          assert( pSeg!=0 );\n          i += fts5GetVarint32(&pData[i], pSeg->iSegid);\n          i += fts5GetVarint32(&pData[i], pSeg->pgnoFirst);\n          i += fts5GetVarint32(&pData[i], pSeg->pgnoLast);\n          if( bStructureV2 ){\n            i += fts5GetVarint(&pData[i], &pSeg->iOrigin1);\n            i += fts5GetVarint(&pData[i], &pSeg->iOrigin2);\n            i += fts5GetVarint32(&pData[i], pSeg->nPgTombstone);\n            i += fts5GetVarint(&pData[i], &pSeg->nEntryTombstone);\n            i += fts5GetVarint(&pData[i], &pSeg->nEntry);\n            nOriginCntr = MAX(nOriginCntr, pSeg->iOrigin2);\n          }\n          if( pSeg->pgnoLast<pSeg->pgnoFirst ){\n            rc = FTS5_CORRUPT;\n            break;\n          }\n        }\n        if( iLvl>0 && pLvl[-1].nMerge && nTotal==0 ) rc = FTS5_CORRUPT;\n        if( iLvl==nLevel-1 && pLvl->nMerge ) rc = FTS5_CORRUPT;\n      }\n    }\n    if( nSegment!=0 && rc==SQLITE_OK ) rc = FTS5_CORRUPT;\n    if( bStructureV2 ){\n      pRet->nOriginCntr = nOriginCntr+1;\n    }\n\n    if( rc!=SQLITE_OK ){\n      fts5StructureRelease(pRet);\n      pRet = 0;\n    }\n  }\n\n  *ppOut = pRet;\n  return rc;\n}\n\n/*\n** Add a level to the Fts5Structure.aLevel[] array of structure object\n** (*ppStruct).\n*/\nstatic void fts5StructureAddLevel(int *pRc, Fts5Structure **ppStruct){\n  fts5StructureMakeWritable(pRc, ppStruct);\n  assert( (ppStruct!=0 && (*ppStruct)!=0) || (*pRc)!=SQLITE_OK );\n  if( *pRc==SQLITE_OK ){\n    Fts5Structure *pStruct = *ppStruct;\n    int nLevel = pStruct->nLevel;\n    sqlite3_int64 nByte = SZ_FTS5STRUCTURE(nLevel+2);\n\n    pStruct = sqlite3_realloc64(pStruct, nByte);\n    if( pStruct ){\n      memset(&pStruct->aLevel[nLevel], 0, sizeof(Fts5StructureLevel));\n      pStruct->nLevel++;\n      *ppStruct = pStruct;\n    }else{\n      *pRc = SQLITE_NOMEM;\n    }\n  }\n}\n\n/*\n** Extend level iLvl so that there is room for at least nExtra more\n** segments.\n*/\nstatic void fts5StructureExtendLevel(\n  int *pRc,\n  Fts5Structure *pStruct,\n  int iLvl,\n  int nExtra,\n  int bInsert\n){\n  if( *pRc==SQLITE_OK ){\n    Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];\n    Fts5StructureSegment *aNew;\n    sqlite3_int64 nByte;\n\n    nByte = (pLvl->nSeg + nExtra) * sizeof(Fts5StructureSegment);\n    aNew = sqlite3_realloc64(pLvl->aSeg, nByte);\n    if( aNew ){\n      if( bInsert==0 ){\n        memset(&aNew[pLvl->nSeg], 0, sizeof(Fts5StructureSegment) * nExtra);\n      }else{\n        int nMove = pLvl->nSeg * sizeof(Fts5StructureSegment);\n        memmove(&aNew[nExtra], aNew, nMove);\n        memset(aNew, 0, sizeof(Fts5StructureSegment) * nExtra);\n      }\n      pLvl->aSeg = aNew;\n    }else{\n      *pRc = SQLITE_NOMEM;\n    }\n  }\n}\n\nstatic Fts5Structure *fts5StructureReadUncached(Fts5Index *p){\n  Fts5Structure *pRet = 0;\n  Fts5Config *pConfig = p->pConfig;\n  int iCookie;                    /* Configuration cookie */\n  Fts5Data *pData;\n\n  pData = fts5DataRead(p, FTS5_STRUCTURE_ROWID);\n  if( p->rc==SQLITE_OK ){\n    /* TODO: Do we need this if the leaf-index is appended? Probably... */\n    memset(&pData->p[pData->nn], 0, FTS5_DATA_PADDING);\n    p->rc = fts5StructureDecode(pData->p, pData->nn, &iCookie, &pRet);\n    if( p->rc==SQLITE_OK ){\n      if( (pConfig->pgsz==0 || pConfig->iCookie!=iCookie) ){\n        p->rc = sqlite3Fts5ConfigLoad(pConfig, iCookie);\n      }\n    }else if( p->rc==SQLITE_CORRUPT_VTAB ){\n      sqlite3Fts5ConfigErrmsg(p->pConfig,\n          \"fts5: corrupt structure record for table \\\"%s\\\"\", p->pConfig->zName\n      );\n    }\n    fts5DataRelease(pData);\n    if( p->rc!=SQLITE_OK ){\n      fts5StructureRelease(pRet);\n      pRet = 0;\n    }\n  }\n\n  return pRet;\n}\n\nstatic i64 fts5IndexDataVersion(Fts5Index *p){\n  i64 iVersion = 0;\n\n  if( p->rc==SQLITE_OK ){\n    if( p->pDataVersion==0 ){\n      p->rc = fts5IndexPrepareStmt(p, &p->pDataVersion,\n          sqlite3_mprintf(\"PRAGMA %Q.data_version\", p->pConfig->zDb)\n          );\n      if( p->rc ) return 0;\n    }\n\n    if( SQLITE_ROW==sqlite3_step(p->pDataVersion) ){\n      iVersion = sqlite3_column_int64(p->pDataVersion, 0);\n    }\n    p->rc = sqlite3_reset(p->pDataVersion);\n  }\n\n  return iVersion;\n}\n\n/*\n** Read, deserialize and return the structure record.\n**\n** The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array\n** are over-allocated as described for function fts5StructureDecode()\n** above.\n**\n** If an error occurs, NULL is returned and an error code left in the\n** Fts5Index handle. If an error has already occurred when this function\n** is called, it is a no-op.\n*/\nstatic Fts5Structure *fts5StructureRead(Fts5Index *p){\n\n  if( p->pStruct==0 ){\n    p->iStructVersion = fts5IndexDataVersion(p);\n    if( p->rc==SQLITE_OK ){\n      p->pStruct = fts5StructureReadUncached(p);\n    }\n  }\n\n#if 0\n  else{\n    Fts5Structure *pTest = fts5StructureReadUncached(p);\n    if( pTest ){\n      int i, j;\n      assert_nc( p->pStruct->nSegment==pTest->nSegment );\n      assert_nc( p->pStruct->nLevel==pTest->nLevel );\n      for(i=0; i<pTest->nLevel; i++){\n        assert_nc( p->pStruct->aLevel[i].nMerge==pTest->aLevel[i].nMerge );\n        assert_nc( p->pStruct->aLevel[i].nSeg==pTest->aLevel[i].nSeg );\n        for(j=0; j<pTest->aLevel[i].nSeg; j++){\n          Fts5StructureSegment *p1 = &pTest->aLevel[i].aSeg[j];\n          Fts5StructureSegment *p2 = &p->pStruct->aLevel[i].aSeg[j];\n          assert_nc( p1->iSegid==p2->iSegid );\n          assert_nc( p1->pgnoFirst==p2->pgnoFirst );\n          assert_nc( p1->pgnoLast==p2->pgnoLast );\n        }\n      }\n      fts5StructureRelease(pTest);\n    }\n  }\n#endif\n\n  if( p->rc!=SQLITE_OK ) return 0;\n  assert( p->iStructVersion!=0 );\n  assert( p->pStruct!=0 );\n  fts5StructureRef(p->pStruct);\n  return p->pStruct;\n}\n\nstatic void fts5StructureInvalidate(Fts5Index *p){\n  if( p->pStruct ){\n    fts5StructureRelease(p->pStruct);\n    p->pStruct = 0;\n  }\n}\n\n/*\n** Return the total number of segments in index structure pStruct. This\n** function is only ever used as part of assert() conditions.\n*/\n#ifdef SQLITE_DEBUG\nstatic int fts5StructureCountSegments(Fts5Structure *pStruct){\n  int nSegment = 0;               /* Total number of segments */\n  if( pStruct ){\n    int iLvl;                     /* Used to iterate through levels */\n    for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n      nSegment += pStruct->aLevel[iLvl].nSeg;\n    }\n  }\n\n  return nSegment;\n}\n#endif\n\n#define fts5BufferSafeAppendBlob(pBuf, pBlob, nBlob) {     \\\n  assert( (pBuf)->nSpace>=((pBuf)->n+nBlob) );             \\\n  memcpy(&(pBuf)->p[(pBuf)->n], pBlob, nBlob);             \\\n  (pBuf)->n += nBlob;                                      \\\n}\n\n#define fts5BufferSafeAppendVarint(pBuf, iVal) {                \\\n  (pBuf)->n += sqlite3Fts5PutVarint(&(pBuf)->p[(pBuf)->n], (iVal));  \\\n  assert( (pBuf)->nSpace>=(pBuf)->n );                          \\\n}\n\n\n/*\n** Serialize and store the \"structure\" record.\n**\n** If an error occurs, leave an error code in the Fts5Index object. If an\n** error has already occurred, this function is a no-op.\n*/\nstatic void fts5StructureWrite(Fts5Index *p, Fts5Structure *pStruct){\n  if( p->rc==SQLITE_OK ){\n    Fts5Buffer buf;               /* Buffer to serialize record into */\n    int iLvl;                     /* Used to iterate through levels */\n    int iCookie;                  /* Cookie value to store */\n    int nHdr = (pStruct->nOriginCntr>0 ? (4+4+9+9+9) : (4+9+9));\n\n    assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) );\n    memset(&buf, 0, sizeof(Fts5Buffer));\n\n    /* Append the current configuration cookie */\n    iCookie = p->pConfig->iCookie;\n    if( iCookie<0 ) iCookie = 0;\n\n    if( 0==sqlite3Fts5BufferSize(&p->rc, &buf, nHdr) ){\n      sqlite3Fts5Put32(buf.p, iCookie);\n      buf.n = 4;\n      if( pStruct->nOriginCntr>0 ){\n        fts5BufferSafeAppendBlob(&buf, FTS5_STRUCTURE_V2, 4);\n      }\n      fts5BufferSafeAppendVarint(&buf, pStruct->nLevel);\n      fts5BufferSafeAppendVarint(&buf, pStruct->nSegment);\n      fts5BufferSafeAppendVarint(&buf, (i64)pStruct->nWriteCounter);\n    }\n\n    for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n      int iSeg;                     /* Used to iterate through segments */\n      Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];\n      fts5BufferAppendVarint(&p->rc, &buf, pLvl->nMerge);\n      fts5BufferAppendVarint(&p->rc, &buf, pLvl->nSeg);\n      assert( pLvl->nMerge<=pLvl->nSeg );\n\n      for(iSeg=0; iSeg<pLvl->nSeg; iSeg++){\n        Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];\n        fts5BufferAppendVarint(&p->rc, &buf, pSeg->iSegid);\n        fts5BufferAppendVarint(&p->rc, &buf, pSeg->pgnoFirst);\n        fts5BufferAppendVarint(&p->rc, &buf, pSeg->pgnoLast);\n        if( pStruct->nOriginCntr>0 ){\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->iOrigin1);\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->iOrigin2);\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->nPgTombstone);\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->nEntryTombstone);\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->nEntry);\n        }\n      }\n    }\n\n    fts5DataWrite(p, FTS5_STRUCTURE_ROWID, buf.p, buf.n);\n    fts5BufferFree(&buf);\n  }\n}\n\n#if 0\nstatic void fts5DebugStructure(int*,Fts5Buffer*,Fts5Structure*);\nstatic void fts5PrintStructure(const char *zCaption, Fts5Structure *pStruct){\n  int rc = SQLITE_OK;\n  Fts5Buffer buf;\n  memset(&buf, 0, sizeof(buf));\n  fts5DebugStructure(&rc, &buf, pStruct);\n  fprintf(stdout, \"%s: %s\\n\", zCaption, buf.p);\n  fflush(stdout);\n  fts5BufferFree(&buf);\n}\n#else\n# define fts5PrintStructure(x,y)\n#endif\n\nstatic int fts5SegmentSize(Fts5StructureSegment *pSeg){\n  return 1 + pSeg->pgnoLast - pSeg->pgnoFirst;\n}\n\n/*\n** Return a copy of index structure pStruct. Except, promote as many\n** segments as possible to level iPromote. If an OOM occurs, NULL is\n** returned.\n*/\nstatic void fts5StructurePromoteTo(\n  Fts5Index *p,\n  int iPromote,\n  int szPromote,\n  Fts5Structure *pStruct\n){\n  int il, is;\n  Fts5StructureLevel *pOut = &pStruct->aLevel[iPromote];\n\n  if( pOut->nMerge==0 ){\n    for(il=iPromote+1; il<pStruct->nLevel; il++){\n      Fts5StructureLevel *pLvl = &pStruct->aLevel[il];\n      if( pLvl->nMerge ) return;\n      for(is=pLvl->nSeg-1; is>=0; is--){\n        int sz = fts5SegmentSize(&pLvl->aSeg[is]);\n        if( sz>szPromote ) return;\n        fts5StructureExtendLevel(&p->rc, pStruct, iPromote, 1, 1);\n        if( p->rc ) return;\n        memcpy(pOut->aSeg, &pLvl->aSeg[is], sizeof(Fts5StructureSegment));\n        pOut->nSeg++;\n        pLvl->nSeg--;\n      }\n    }\n  }\n}\n\n/*\n** A new segment has just been written to level iLvl of index structure\n** pStruct. This function determines if any segments should be promoted\n** as a result. Segments are promoted in two scenarios:\n**\n**   a) If the segment just written is smaller than one or more segments\n**      within the previous populated level, it is promoted to the previous\n**      populated level.\n**\n**   b) If the segment just written is larger than the newest segment on\n**      the next populated level, then that segment, and any other adjacent\n**      segments that are also smaller than the one just written, are\n**      promoted.\n**\n** If one or more segments are promoted, the structure object is updated\n** to reflect this.\n*/\nstatic void fts5StructurePromote(\n  Fts5Index *p,                   /* FTS5 backend object */\n  int iLvl,                       /* Index level just updated */\n  Fts5Structure *pStruct          /* Index structure */\n){\n  if( p->rc==SQLITE_OK ){\n    int iTst;\n    int iPromote = -1;\n    int szPromote = 0;            /* Promote anything this size or smaller */\n    Fts5StructureSegment *pSeg;   /* Segment just written */\n    int szSeg;                    /* Size of segment just written */\n    int nSeg = pStruct->aLevel[iLvl].nSeg;\n\n    if( nSeg==0 ) return;\n    pSeg = &pStruct->aLevel[iLvl].aSeg[pStruct->aLevel[iLvl].nSeg-1];\n    szSeg = (1 + pSeg->pgnoLast - pSeg->pgnoFirst);\n\n    /* Check for condition (a) */\n    for(iTst=iLvl-1; iTst>=0 && pStruct->aLevel[iTst].nSeg==0; iTst--);\n    if( iTst>=0 ){\n      int i;\n      int szMax = 0;\n      Fts5StructureLevel *pTst = &pStruct->aLevel[iTst];\n      assert( pTst->nMerge==0 );\n      for(i=0; i<pTst->nSeg; i++){\n        int sz = pTst->aSeg[i].pgnoLast - pTst->aSeg[i].pgnoFirst + 1;\n        if( sz>szMax ) szMax = sz;\n      }\n      if( szMax>=szSeg ){\n        /* Condition (a) is true. Promote the newest segment on level\n        ** iLvl to level iTst.  */\n        iPromote = iTst;\n        szPromote = szMax;\n      }\n    }\n\n    /* If condition (a) is not met, assume (b) is true. StructurePromoteTo()\n    ** is a no-op if it is not.  */\n    if( iPromote<0 ){\n      iPromote = iLvl;\n      szPromote = szSeg;\n    }\n    fts5StructurePromoteTo(p, iPromote, szPromote, pStruct);\n  }\n}\n\n\n/*\n** Advance the iterator passed as the only argument. If the end of the\n** doclist-index page is reached, return non-zero.\n*/\nstatic int fts5DlidxLvlNext(Fts5DlidxLvl *pLvl){\n  Fts5Data *pData = pLvl->pData;\n\n  if( pLvl->iOff==0 ){\n    assert( pLvl->bEof==0 );\n    pLvl->iOff = 1;\n    pLvl->iOff += fts5GetVarint32(&pData->p[1], pLvl->iLeafPgno);\n    pLvl->iOff += fts5GetVarint(&pData->p[pLvl->iOff], (u64*)&pLvl->iRowid);\n    pLvl->iFirstOff = pLvl->iOff;\n  }else{\n    int iOff;\n    for(iOff=pLvl->iOff; iOff<pData->nn; iOff++){\n      if( pData->p[iOff] ) break;\n    }\n\n    if( iOff<pData->nn ){\n      u64 iVal;\n      pLvl->iLeafPgno += (iOff - pLvl->iOff) + 1;\n      iOff += fts5GetVarint(&pData->p[iOff], &iVal);\n      pLvl->iRowid += iVal;\n      pLvl->iOff = iOff;\n    }else{\n      pLvl->bEof = 1;\n    }\n  }\n\n  return pLvl->bEof;\n}\n\n/*\n** Advance the iterator passed as the only argument.\n*/\nstatic int fts5DlidxIterNextR(Fts5Index *p, Fts5DlidxIter *pIter, int iLvl){\n  Fts5DlidxLvl *pLvl = &pIter->aLvl[iLvl];\n\n  assert( iLvl<pIter->nLvl );\n  if( fts5DlidxLvlNext(pLvl) ){\n    if( (iLvl+1) < pIter->nLvl ){\n      fts5DlidxIterNextR(p, pIter, iLvl+1);\n      if( pLvl[1].bEof==0 ){\n        fts5DataRelease(pLvl->pData);\n        memset(pLvl, 0, sizeof(Fts5DlidxLvl));\n        pLvl->pData = fts5DataRead(p,\n            FTS5_DLIDX_ROWID(pIter->iSegid, iLvl, pLvl[1].iLeafPgno)\n        );\n        if( pLvl->pData ) fts5DlidxLvlNext(pLvl);\n      }\n    }\n  }\n\n  return pIter->aLvl[0].bEof;\n}\nstatic int fts5DlidxIterNext(Fts5Index *p, Fts5DlidxIter *pIter){\n  return fts5DlidxIterNextR(p, pIter, 0);\n}\n\n/*\n** The iterator passed as the first argument has the following fields set\n** as follows. This function sets up the rest of the iterator so that it\n** points to the first rowid in the doclist-index.\n**\n**   pData:\n**     pointer to doclist-index record,\n**\n** When this function is called pIter->iLeafPgno is the page number the\n** doclist is associated with (the one featuring the term).\n*/\nstatic int fts5DlidxIterFirst(Fts5DlidxIter *pIter){\n  int i;\n  for(i=0; i<pIter->nLvl; i++){\n    fts5DlidxLvlNext(&pIter->aLvl[i]);\n  }\n  return pIter->aLvl[0].bEof;\n}\n\n\nstatic int fts5DlidxIterEof(Fts5Index *p, Fts5DlidxIter *pIter){\n  return p->rc!=SQLITE_OK || pIter->aLvl[0].bEof;\n}\n\nstatic void fts5DlidxIterLast(Fts5Index *p, Fts5DlidxIter *pIter){\n  int i;\n\n  /* Advance each level to the last entry on the last page */\n  for(i=pIter->nLvl-1; p->rc==SQLITE_OK && i>=0; i--){\n    Fts5DlidxLvl *pLvl = &pIter->aLvl[i];\n    while( fts5DlidxLvlNext(pLvl)==0 );\n    pLvl->bEof = 0;\n\n    if( i>0 ){\n      Fts5DlidxLvl *pChild = &pLvl[-1];\n      fts5DataRelease(pChild->pData);\n      memset(pChild, 0, sizeof(Fts5DlidxLvl));\n      pChild->pData = fts5DataRead(p,\n          FTS5_DLIDX_ROWID(pIter->iSegid, i-1, pLvl->iLeafPgno)\n      );\n    }\n  }\n}\n\n/*\n** Move the iterator passed as the only argument to the previous entry.\n*/\nstatic int fts5DlidxLvlPrev(Fts5DlidxLvl *pLvl){\n  int iOff = pLvl->iOff;\n\n  assert( pLvl->bEof==0 );\n  if( iOff<=pLvl->iFirstOff ){\n    pLvl->bEof = 1;\n  }else{\n    u8 *a = pLvl->pData->p;\n\n    pLvl->iOff = 0;\n    fts5DlidxLvlNext(pLvl);\n    while( 1 ){\n      int nZero = 0;\n      int ii = pLvl->iOff;\n      u64 delta = 0;\n\n      while( a[ii]==0 ){\n        nZero++;\n        ii++;\n      }\n      ii += sqlite3Fts5GetVarint(&a[ii], &delta);\n\n      if( ii>=iOff ) break;\n      pLvl->iLeafPgno += nZero+1;\n      pLvl->iRowid += delta;\n      pLvl->iOff = ii;\n    }\n  }\n\n  return pLvl->bEof;\n}\n\nstatic int fts5DlidxIterPrevR(Fts5Index *p, Fts5DlidxIter *pIter, int iLvl){\n  Fts5DlidxLvl *pLvl = &pIter->aLvl[iLvl];\n\n  assert( iLvl<pIter->nLvl );\n  if( fts5DlidxLvlPrev(pLvl) ){\n    if( (iLvl+1) < pIter->nLvl ){\n      fts5DlidxIterPrevR(p, pIter, iLvl+1);\n      if( pLvl[1].bEof==0 ){\n        fts5DataRelease(pLvl->pData);\n        memset(pLvl, 0, sizeof(Fts5DlidxLvl));\n        pLvl->pData = fts5DataRead(p,\n            FTS5_DLIDX_ROWID(pIter->iSegid, iLvl, pLvl[1].iLeafPgno)\n        );\n        if( pLvl->pData ){\n          while( fts5DlidxLvlNext(pLvl)==0 );\n          pLvl->bEof = 0;\n        }\n      }\n    }\n  }\n\n  return pIter->aLvl[0].bEof;\n}\nstatic int fts5DlidxIterPrev(Fts5Index *p, Fts5DlidxIter *pIter){\n  return fts5DlidxIterPrevR(p, pIter, 0);\n}\n\n/*\n** Free a doclist-index iterator object allocated by fts5DlidxIterInit().\n*/\nstatic void fts5DlidxIterFree(Fts5DlidxIter *pIter){\n  if( pIter ){\n    int i;\n    for(i=0; i<pIter->nLvl; i++){\n      fts5DataRelease(pIter->aLvl[i].pData);\n    }\n    sqlite3_free(pIter);\n  }\n}\n\nstatic Fts5DlidxIter *fts5DlidxIterInit(\n  Fts5Index *p,                   /* Fts5 Backend to iterate within */\n  int bRev,                       /* True for ORDER BY ASC */\n  int iSegid,                     /* Segment id */\n  int iLeafPg                     /* Leaf page number to load dlidx for */\n){\n  Fts5DlidxIter *pIter = 0;\n  int i;\n  int bDone = 0;\n\n  for(i=0; p->rc==SQLITE_OK && bDone==0; i++){\n    sqlite3_int64 nByte = SZ_FTS5DLIDXITER(i+1);\n    Fts5DlidxIter *pNew;\n\n    pNew = (Fts5DlidxIter*)sqlite3_realloc64(pIter, nByte);\n    if( pNew==0 ){\n      p->rc = SQLITE_NOMEM;\n    }else{\n      i64 iRowid = FTS5_DLIDX_ROWID(iSegid, i, iLeafPg);\n      Fts5DlidxLvl *pLvl = &pNew->aLvl[i];\n      pIter = pNew;\n      memset(pLvl, 0, sizeof(Fts5DlidxLvl));\n      pLvl->pData = fts5DataRead(p, iRowid);\n      if( pLvl->pData && (pLvl->pData->p[0] & 0x0001)==0 ){\n        bDone = 1;\n      }\n      pIter->nLvl = i+1;\n    }\n  }\n\n  if( p->rc==SQLITE_OK ){\n    pIter->iSegid = iSegid;\n    if( bRev==0 ){\n      fts5DlidxIterFirst(pIter);\n    }else{\n      fts5DlidxIterLast(p, pIter);\n    }\n  }\n\n  if( p->rc!=SQLITE_OK ){\n    fts5DlidxIterFree(pIter);\n    pIter = 0;\n  }\n\n  return pIter;\n}\n\nstatic i64 fts5DlidxIterRowid(Fts5DlidxIter *pIter){\n  return pIter->aLvl[0].iRowid;\n}\nstatic int fts5DlidxIterPgno(Fts5DlidxIter *pIter){\n  return pIter->aLvl[0].iLeafPgno;\n}\n\n/*\n** Load the next leaf page into the segment iterator.\n*/\nstatic void fts5SegIterNextPage(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter              /* Iterator to advance to next page */\n){\n  Fts5Data *pLeaf;\n  Fts5StructureSegment *pSeg = pIter->pSeg;\n  fts5DataRelease(pIter->pLeaf);\n  pIter->iLeafPgno++;\n  if( pIter->pNextLeaf ){\n    pIter->pLeaf = pIter->pNextLeaf;\n    pIter->pNextLeaf = 0;\n  }else if( pIter->iLeafPgno<=pSeg->pgnoLast ){\n    pIter->pLeaf = fts5LeafRead(p,\n        FTS5_SEGMENT_ROWID(pSeg->iSegid, pIter->iLeafPgno)\n    );\n  }else{\n    pIter->pLeaf = 0;\n  }\n  pLeaf = pIter->pLeaf;\n\n  if( pLeaf ){\n    pIter->iPgidxOff = pLeaf->szLeaf;\n    if( fts5LeafIsTermless(pLeaf) ){\n      pIter->iEndofDoclist = pLeaf->nn+1;\n    }else{\n      pIter->iPgidxOff += fts5GetVarint32(&pLeaf->p[pIter->iPgidxOff],\n          pIter->iEndofDoclist\n      );\n    }\n  }\n}\n\n/*\n** Argument p points to a buffer containing a varint to be interpreted as a\n** position list size field. Read the varint and return the number of bytes\n** read. Before returning, set *pnSz to the number of bytes in the position\n** list, and *pbDel to true if the delete flag is set, or false otherwise.\n*/\nstatic int fts5GetPoslistSize(const u8 *p, int *pnSz, int *pbDel){\n  int nSz;\n  int n = 0;\n  fts5FastGetVarint32(p, n, nSz);\n  assert_nc( nSz>=0 );\n  *pnSz = nSz/2;\n  *pbDel = nSz & 0x0001;\n  return n;\n}\n\n/*\n** Fts5SegIter.iLeafOffset currently points to the first byte of a\n** position-list size field. Read the value of the field and store it\n** in the following variables:\n**\n**   Fts5SegIter.nPos\n**   Fts5SegIter.bDel\n**\n** Leave Fts5SegIter.iLeafOffset pointing to the first byte of the\n** position list content (if any).\n*/\nstatic void fts5SegIterLoadNPos(Fts5Index *p, Fts5SegIter *pIter){\n  if( p->rc==SQLITE_OK ){\n    int iOff = pIter->iLeafOffset;  /* Offset to read at */\n    ASSERT_SZLEAF_OK(pIter->pLeaf);\n    if( p->pConfig->eDetail==FTS5_DETAIL_NONE ){\n      int iEod = MIN(pIter->iEndofDoclist, pIter->pLeaf->szLeaf);\n      pIter->bDel = 0;\n      pIter->nPos = 1;\n      if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){\n        pIter->bDel = 1;\n        iOff++;\n        if( iOff<iEod && pIter->pLeaf->p[iOff]==0 ){\n          pIter->nPos = 1;\n          iOff++;\n        }else{\n          pIter->nPos = 0;\n        }\n      }\n    }else{\n      int nSz;\n      fts5FastGetVarint32(pIter->pLeaf->p, iOff, nSz);\n      pIter->bDel = (nSz & 0x0001);\n      pIter->nPos = nSz>>1;\n      assert_nc( pIter->nPos>=0 );\n    }\n    pIter->iLeafOffset = iOff;\n  }\n}\n\nstatic void fts5SegIterLoadRowid(Fts5Index *p, Fts5SegIter *pIter){\n  u8 *a = pIter->pLeaf->p;        /* Buffer to read data from */\n  i64 iOff = pIter->iLeafOffset;\n\n  ASSERT_SZLEAF_OK(pIter->pLeaf);\n  while( iOff>=pIter->pLeaf->szLeaf ){\n    fts5SegIterNextPage(p, pIter);\n    if( pIter->pLeaf==0 ){\n      if( p->rc==SQLITE_OK ) FTS5_CORRUPT_ITER(p, pIter);\n      return;\n    }\n    iOff = 4;\n    a = pIter->pLeaf->p;\n  }\n  iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);\n  pIter->iLeafOffset = iOff;\n}\n\n/*\n** Fts5SegIter.iLeafOffset currently points to the first byte of the\n** \"nSuffix\" field of a term. Function parameter nKeep contains the value\n** of the \"nPrefix\" field (if there was one - it is passed 0 if this is\n** the first term in the segment).\n**\n** This function populates:\n**\n**   Fts5SegIter.term\n**   Fts5SegIter.rowid\n**\n** accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of\n** the first position list. The position list belonging to document\n** (Fts5SegIter.iRowid).\n*/\nstatic void fts5SegIterLoadTerm(Fts5Index *p, Fts5SegIter *pIter, int nKeep){\n  u8 *a = pIter->pLeaf->p;        /* Buffer to read data from */\n  i64 iOff = pIter->iLeafOffset;  /* Offset to read at */\n  int nNew;                       /* Bytes of new data */\n\n  iOff += fts5GetVarint32(&a[iOff], nNew);\n  if( iOff+nNew>pIter->pLeaf->szLeaf || nKeep>pIter->term.n || nNew==0 ){\n    FTS5_CORRUPT_ITER(p, pIter);\n    return;\n  }\n  pIter->term.n = nKeep;\n  fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);\n  assert( pIter->term.n<=pIter->term.nSpace );\n  iOff += nNew;\n  pIter->iTermLeafOffset = iOff;\n  pIter->iTermLeafPgno = pIter->iLeafPgno;\n  pIter->iLeafOffset = iOff;\n\n  if( pIter->iPgidxOff>=pIter->pLeaf->nn ){\n    pIter->iEndofDoclist = pIter->pLeaf->nn+1;\n  }else{\n    int nExtra;\n    pIter->iPgidxOff += fts5GetVarint32(&a[pIter->iPgidxOff], nExtra);\n    pIter->iEndofDoclist += nExtra;\n  }\n\n  fts5SegIterLoadRowid(p, pIter);\n}\n\nstatic void fts5SegIterNext(Fts5Index*, Fts5SegIter*, int*);\nstatic void fts5SegIterNext_Reverse(Fts5Index*, Fts5SegIter*, int*);\nstatic void fts5SegIterNext_None(Fts5Index*, Fts5SegIter*, int*);\n\nstatic void fts5SegIterSetNext(Fts5Index *p, Fts5SegIter *pIter){\n  if( pIter->flags & FTS5_SEGITER_REVERSE ){\n    pIter->xNext = fts5SegIterNext_Reverse;\n  }else if( p->pConfig->eDetail==FTS5_DETAIL_NONE ){\n    pIter->xNext = fts5SegIterNext_None;\n  }else{\n    pIter->xNext = fts5SegIterNext;\n  }\n}\n\n/*\n** Allocate a tombstone hash page array object (pIter->pTombArray) for\n** the iterator passed as the second argument. If an OOM error occurs,\n** leave an error in the Fts5Index object.\n*/\nstatic void fts5SegIterAllocTombstone(Fts5Index *p, Fts5SegIter *pIter){\n  const i64 nTomb = (i64)pIter->pSeg->nPgTombstone;\n  if( nTomb>0 ){\n    i64 nByte = SZ_FTS5TOMBSTONEARRAY(nTomb+1);\n    Fts5TombstoneArray *pNew;\n    pNew = (Fts5TombstoneArray*)sqlite3Fts5MallocZero(&p->rc, nByte);\n    if( pNew ){\n      pNew->nTombstone = nTomb;\n      pNew->nRef = 1;\n      pIter->pTombArray = pNew;\n    }\n  }\n}\n\n/*\n** Initialize the iterator object pIter to iterate through the entries in\n** segment pSeg. The iterator is left pointing to the first entry when\n** this function returns.\n**\n** If an error occurs, Fts5Index.rc is set to an appropriate error code. If\n** an error has already occurred when this function is called, it is a no-op.\n*/\nstatic void fts5SegIterInit(\n  Fts5Index *p,                   /* FTS index object */\n  Fts5StructureSegment *pSeg,     /* Description of segment */\n  Fts5SegIter *pIter              /* Object to populate */\n){\n  if( pSeg->pgnoFirst==0 ){\n    /* This happens if the segment is being used as an input to an incremental\n    ** merge and all data has already been \"trimmed\". See function\n    ** fts5TrimSegments() for details. In this case leave the iterator empty.\n    ** The caller will see the (pIter->pLeaf==0) and assume the iterator is\n    ** at EOF already. */\n    assert( pIter->pLeaf==0 );\n    return;\n  }\n\n  if( p->rc==SQLITE_OK ){\n    memset(pIter, 0, sizeof(*pIter));\n    fts5SegIterSetNext(p, pIter);\n    pIter->pSeg = pSeg;\n    pIter->iLeafPgno = pSeg->pgnoFirst-1;\n    do {\n      fts5SegIterNextPage(p, pIter);\n    }while( p->rc==SQLITE_OK && pIter->pLeaf && pIter->pLeaf->nn==4 );\n  }\n\n  if( p->rc==SQLITE_OK && pIter->pLeaf ){\n    pIter->iLeafOffset = 4;\n    assert( pIter->pLeaf!=0 );\n    assert_nc( pIter->pLeaf->nn>4 );\n    assert_nc( fts5LeafFirstTermOff(pIter->pLeaf)==4 );\n    pIter->iPgidxOff = pIter->pLeaf->szLeaf+1;\n    fts5SegIterLoadTerm(p, pIter, 0);\n    fts5SegIterLoadNPos(p, pIter);\n    fts5SegIterAllocTombstone(p, pIter);\n  }\n}\n\n/*\n** This function is only ever called on iterators created by calls to\n** Fts5IndexQuery() with the FTS5INDEX_QUERY_DESC flag set.\n**\n** The iterator is in an unusual state when this function is called: the\n** Fts5SegIter.iLeafOffset variable is set to the offset of the start of\n** the position-list size field for the first relevant rowid on the page.\n** Fts5SegIter.rowid is set, but nPos and bDel are not.\n**\n** This function advances the iterator so that it points to the last\n** relevant rowid on the page and, if necessary, initializes the\n** aRowidOffset[] and iRowidOffset variables. At this point the iterator\n** is in its regular state - Fts5SegIter.iLeafOffset points to the first\n** byte of the position list content associated with said rowid.\n*/\nstatic void fts5SegIterReverseInitPage(Fts5Index *p, Fts5SegIter *pIter){\n  int eDetail = p->pConfig->eDetail;\n  int n = pIter->pLeaf->szLeaf;\n  int i = pIter->iLeafOffset;\n  u8 *a = pIter->pLeaf->p;\n  int iRowidOffset = 0;\n\n  if( n>pIter->iEndofDoclist ){\n    n = pIter->iEndofDoclist;\n  }\n\n  ASSERT_SZLEAF_OK(pIter->pLeaf);\n  while( 1 ){\n    u64 iDelta = 0;\n\n    if( i>=n ) break;\n    if( eDetail==FTS5_DETAIL_NONE ){\n      /* todo */\n      if( i<n && a[i]==0 ){\n        i++;\n        if( i<n && a[i]==0 ) i++;\n      }\n    }else{\n      int nPos;\n      int bDummy;\n      i += fts5GetPoslistSize(&a[i], &nPos, &bDummy);\n      i += nPos;\n    }\n    if( i>=n ) break;\n    i += fts5GetVarint(&a[i], &iDelta);\n    pIter->iRowid += iDelta;\n\n    /* If necessary, grow the pIter->aRowidOffset[] array. */\n    if( iRowidOffset>=pIter->nRowidOffset ){\n      int nNew = pIter->nRowidOffset + 8;\n      int *aNew = (int*)sqlite3_realloc64(pIter->aRowidOffset,nNew*sizeof(int));\n      if( aNew==0 ){\n        p->rc = SQLITE_NOMEM;\n        break;\n      }\n      pIter->aRowidOffset = aNew;\n      pIter->nRowidOffset = nNew;\n    }\n\n    pIter->aRowidOffset[iRowidOffset++] = pIter->iLeafOffset;\n    pIter->iLeafOffset = i;\n  }\n  pIter->iRowidOffset = iRowidOffset;\n  fts5SegIterLoadNPos(p, pIter);\n}\n\n/*\n**\n*/\nstatic void fts5SegIterReverseNewPage(Fts5Index *p, Fts5SegIter *pIter){\n  assert( pIter->flags & FTS5_SEGITER_REVERSE );\n  assert( pIter->flags & FTS5_SEGITER_ONETERM );\n\n  fts5DataRelease(pIter->pLeaf);\n  pIter->pLeaf = 0;\n  while( p->rc==SQLITE_OK && pIter->iLeafPgno>pIter->iTermLeafPgno ){\n    Fts5Data *pNew;\n    pIter->iLeafPgno--;\n    pNew = fts5DataRead(p, FTS5_SEGMENT_ROWID(\n          pIter->pSeg->iSegid, pIter->iLeafPgno\n    ));\n    if( pNew ){\n      /* iTermLeafOffset may be equal to szLeaf if the term is the last\n      ** thing on the page - i.e. the first rowid is on the following page.\n      ** In this case leave pIter->pLeaf==0, this iterator is at EOF. */\n      if( pIter->iLeafPgno==pIter->iTermLeafPgno ){\n        assert( pIter->pLeaf==0 );\n        if( pIter->iTermLeafOffset<pNew->szLeaf ){\n          pIter->pLeaf = pNew;\n          pIter->iLeafOffset = pIter->iTermLeafOffset;\n        }\n      }else{\n        int iRowidOff;\n        iRowidOff = fts5LeafFirstRowidOff(pNew);\n        if( iRowidOff ){\n          if( iRowidOff>=pNew->szLeaf ){\n            FTS5_CORRUPT_ITER(p, pIter);\n          }else{\n            pIter->pLeaf = pNew;\n            pIter->iLeafOffset = iRowidOff;\n          }\n        }\n      }\n\n      if( pIter->pLeaf ){\n        u8 *a = &pIter->pLeaf->p[pIter->iLeafOffset];\n        pIter->iLeafOffset += fts5GetVarint(a, (u64*)&pIter->iRowid);\n        break;\n      }else{\n        fts5DataRelease(pNew);\n      }\n    }\n  }\n\n  if( pIter->pLeaf ){\n    pIter->iEndofDoclist = pIter->pLeaf->nn+1;\n    fts5SegIterReverseInitPage(p, pIter);\n  }\n}\n\n/*\n** Return true if the iterator passed as the second argument currently\n** points to a delete marker. A delete marker is an entry with a 0 byte\n** position-list.\n*/\nstatic int fts5MultiIterIsEmpty(Fts5Index *p, Fts5Iter *pIter){\n  Fts5SegIter *pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst];\n  return (p->rc==SQLITE_OK && pSeg->pLeaf && pSeg->nPos==0);\n}\n\n/*\n** Advance iterator pIter to the next entry.\n**\n** This version of fts5SegIterNext() is only used by reverse iterators.\n*/\nstatic void fts5SegIterNext_Reverse(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter,             /* Iterator to advance */\n  int *pbUnused                   /* Unused */\n){\n  assert( pIter->flags & FTS5_SEGITER_REVERSE );\n  assert( pIter->pNextLeaf==0 );\n  UNUSED_PARAM(pbUnused);\n\n  if( pIter->iRowidOffset>0 ){\n    u8 *a = pIter->pLeaf->p;\n    int iOff;\n    u64 iDelta;\n\n    pIter->iRowidOffset--;\n    pIter->iLeafOffset = pIter->aRowidOffset[pIter->iRowidOffset];\n    fts5SegIterLoadNPos(p, pIter);\n    iOff = pIter->iLeafOffset;\n    if( p->pConfig->eDetail!=FTS5_DETAIL_NONE ){\n      iOff += pIter->nPos;\n    }\n    fts5GetVarint(&a[iOff], &iDelta);\n    pIter->iRowid -= iDelta;\n  }else{\n    fts5SegIterReverseNewPage(p, pIter);\n  }\n}\n\n/*\n** Advance iterator pIter to the next entry.\n**\n** This version of fts5SegIterNext() is only used if detail=none and the\n** iterator is not a reverse direction iterator.\n*/\nstatic void fts5SegIterNext_None(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter,             /* Iterator to advance */\n  int *pbNewTerm                  /* OUT: Set for new term */\n){\n  int iOff;\n\n  assert( p->rc==SQLITE_OK );\n  assert( (pIter->flags & FTS5_SEGITER_REVERSE)==0 );\n  assert( p->pConfig->eDetail==FTS5_DETAIL_NONE );\n\n  ASSERT_SZLEAF_OK(pIter->pLeaf);\n  iOff = pIter->iLeafOffset;\n\n  /* Next entry is on the next page */\n  while( pIter->pSeg && iOff>=pIter->pLeaf->szLeaf ){\n    fts5SegIterNextPage(p, pIter);\n    if( p->rc || pIter->pLeaf==0 ) return;\n    pIter->iRowid = 0;\n    iOff = 4;\n  }\n\n  if( iOff<pIter->iEndofDoclist ){\n    /* Next entry is on the current page */\n    u64 iDelta;\n    iOff += sqlite3Fts5GetVarint(&pIter->pLeaf->p[iOff], (u64*)&iDelta);\n    pIter->iLeafOffset = iOff;\n    pIter->iRowid += iDelta;\n  }else if( (pIter->flags & FTS5_SEGITER_ONETERM)==0 ){\n    if( pIter->pSeg ){\n      int nKeep = 0;\n      if( iOff!=fts5LeafFirstTermOff(pIter->pLeaf) ){\n        iOff += fts5GetVarint32(&pIter->pLeaf->p[iOff], nKeep);\n      }\n      pIter->iLeafOffset = iOff;\n      fts5SegIterLoadTerm(p, pIter, nKeep);\n    }else{\n      const u8 *pList = 0;\n      const char *zTerm = 0;\n      int nTerm = 0;\n      int nList;\n      sqlite3Fts5HashScanNext(p->pHash);\n      sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &nTerm, &pList, &nList);\n      if( pList==0 ) goto next_none_eof;\n      pIter->pLeaf->p = (u8*)pList;\n      pIter->pLeaf->nn = nList;\n      pIter->pLeaf->szLeaf = nList;\n      pIter->iEndofDoclist = nList;\n      sqlite3Fts5BufferSet(&p->rc,&pIter->term, nTerm, (u8*)zTerm);\n      pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);\n    }\n\n    if( pbNewTerm ) *pbNewTerm = 1;\n  }else{\n    goto next_none_eof;\n  }\n\n  fts5SegIterLoadNPos(p, pIter);\n\n  return;\n next_none_eof:\n  fts5DataRelease(pIter->pLeaf);\n  pIter->pLeaf = 0;\n}\n\n\n/*\n** Advance iterator pIter to the next entry.\n**\n** If an error occurs, Fts5Index.rc is set to an appropriate error code. It\n** is not considered an error if the iterator reaches EOF. If an error has\n** already occurred when this function is called, it is a no-op.\n*/\nstatic void fts5SegIterNext(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter,             /* Iterator to advance */\n  int *pbNewTerm                  /* OUT: Set for new term */\n){\n  Fts5Data *pLeaf = pIter->pLeaf;\n  int iOff;\n  int bNewTerm = 0;\n  int nKeep = 0;\n  u8 *a;\n  int n;\n\n  assert( pbNewTerm==0 || *pbNewTerm==0 );\n  assert( p->pConfig->eDetail!=FTS5_DETAIL_NONE );\n\n  /* Search for the end of the position list within the current page. */\n  a = pLeaf->p;\n  n = pLeaf->szLeaf;\n\n  ASSERT_SZLEAF_OK(pLeaf);\n  iOff = pIter->iLeafOffset + pIter->nPos;\n\n  if( iOff<n ){\n    /* The next entry is on the current page. */\n    assert_nc( iOff<=pIter->iEndofDoclist );\n    if( iOff>=pIter->iEndofDoclist ){\n      bNewTerm = 1;\n      if( iOff!=fts5LeafFirstTermOff(pLeaf) ){\n        iOff += fts5GetVarint32(&a[iOff], nKeep);\n      }\n    }else{\n      u64 iDelta;\n      iOff += sqlite3Fts5GetVarint(&a[iOff], &iDelta);\n      pIter->iRowid += iDelta;\n      assert_nc( iDelta>0 );\n    }\n    pIter->iLeafOffset = iOff;\n\n  }else if( pIter->pSeg==0 ){\n    const u8 *pList = 0;\n    const char *zTerm = 0;\n    int nTerm = 0;\n    int nList = 0;\n    assert( (pIter->flags & FTS5_SEGITER_ONETERM) || pbNewTerm );\n    if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){\n      sqlite3Fts5HashScanNext(p->pHash);\n      sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &nTerm, &pList, &nList);\n    }\n    if( pList==0 ){\n      fts5DataRelease(pIter->pLeaf);\n      pIter->pLeaf = 0;\n    }else{\n      pIter->pLeaf->p = (u8*)pList;\n      pIter->pLeaf->nn = nList;\n      pIter->pLeaf->szLeaf = nList;\n      pIter->iEndofDoclist = nList+1;\n      sqlite3Fts5BufferSet(&p->rc, &pIter->term, nTerm, (u8*)zTerm);\n      pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);\n      *pbNewTerm = 1;\n    }\n  }else{\n    iOff = 0;\n    /* Next entry is not on the current page */\n    while( iOff==0 ){\n      fts5SegIterNextPage(p, pIter);\n      pLeaf = pIter->pLeaf;\n      if( pLeaf==0 ) break;\n      ASSERT_SZLEAF_OK(pLeaf);\n      if( (iOff = fts5LeafFirstRowidOff(pLeaf)) && iOff<pLeaf->szLeaf ){\n        iOff += sqlite3Fts5GetVarint(&pLeaf->p[iOff], (u64*)&pIter->iRowid);\n        pIter->iLeafOffset = iOff;\n\n        if( pLeaf->nn>pLeaf->szLeaf ){\n          pIter->iPgidxOff = pLeaf->szLeaf + fts5GetVarint32(\n              &pLeaf->p[pLeaf->szLeaf], pIter->iEndofDoclist\n          );\n        }\n      }\n      else if( pLeaf->nn>pLeaf->szLeaf ){\n        pIter->iPgidxOff = pLeaf->szLeaf + fts5GetVarint32(\n            &pLeaf->p[pLeaf->szLeaf], iOff\n        );\n        pIter->iLeafOffset = iOff;\n        pIter->iEndofDoclist = iOff;\n        bNewTerm = 1;\n      }\n      assert_nc( iOff<pLeaf->szLeaf );\n      if( iOff>pLeaf->szLeaf ){\n        FTS5_CORRUPT_ITER(p, pIter);\n        return;\n      }\n    }\n  }\n\n  /* Check if the iterator is now at EOF. If so, return early. */\n  if( pIter->pLeaf ){\n    if( bNewTerm ){\n      if( pIter->flags & FTS5_SEGITER_ONETERM ){\n        fts5DataRelease(pIter->pLeaf);\n        pIter->pLeaf = 0;\n      }else{\n        fts5SegIterLoadTerm(p, pIter, nKeep);\n        fts5SegIterLoadNPos(p, pIter);\n        if( pbNewTerm ) *pbNewTerm = 1;\n      }\n    }else{\n      /* The following could be done by calling fts5SegIterLoadNPos(). But\n      ** this block is particularly performance critical, so equivalent\n      ** code is inlined.  */\n      int nSz;\n      assert_nc( pIter->iLeafOffset<=pIter->pLeaf->nn );\n      fts5FastGetVarint32(pIter->pLeaf->p, pIter->iLeafOffset, nSz);\n      pIter->bDel = (nSz & 0x0001);\n      pIter->nPos = nSz>>1;\n      assert_nc( pIter->nPos>=0 );\n    }\n  }\n}\n\n#define SWAPVAL(T, a, b) { T tmp; tmp=a; a=b; b=tmp; }\n\n#define fts5IndexSkipVarint(a, iOff) {            \\\n  int iEnd = iOff+9;                              \\\n  while( (a[iOff++] & 0x80) && iOff<iEnd );       \\\n}\n\n/*\n** Iterator pIter currently points to the first rowid in a doclist. This\n** function sets the iterator up so that iterates in reverse order through\n** the doclist.\n*/\nstatic void fts5SegIterReverse(Fts5Index *p, Fts5SegIter *pIter){\n  Fts5DlidxIter *pDlidx = pIter->pDlidx;\n  Fts5Data *pLast = 0;\n  int pgnoLast = 0;\n\n  if( pDlidx && p->pConfig->iVersion==FTS5_CURRENT_VERSION ){\n    int iSegid = pIter->pSeg->iSegid;\n    pgnoLast = fts5DlidxIterPgno(pDlidx);\n    pLast = fts5LeafRead(p, FTS5_SEGMENT_ROWID(iSegid, pgnoLast));\n  }else{\n    Fts5Data *pLeaf = pIter->pLeaf;         /* Current leaf data */\n\n    /* Currently, Fts5SegIter.iLeafOffset points to the first byte of\n    ** position-list content for the current rowid. Back it up so that it\n    ** points to the start of the position-list size field. */\n    int iPoslist;\n    if( pIter->iTermLeafPgno==pIter->iLeafPgno ){\n      iPoslist = pIter->iTermLeafOffset;\n    }else{\n      iPoslist = 4;\n    }\n    fts5IndexSkipVarint(pLeaf->p, iPoslist);\n    pIter->iLeafOffset = iPoslist;\n\n    /* If this condition is true then the largest rowid for the current\n    ** term may not be stored on the current page. So search forward to\n    ** see where said rowid really is.  */\n    if( pIter->iEndofDoclist>=pLeaf->szLeaf ){\n      int pgno;\n      Fts5StructureSegment *pSeg = pIter->pSeg;\n\n      /* The last rowid in the doclist may not be on the current page. Search\n      ** forward to find the page containing the last rowid.  */\n      for(pgno=pIter->iLeafPgno+1; !p->rc && pgno<=pSeg->pgnoLast; pgno++){\n        i64 iAbs = FTS5_SEGMENT_ROWID(pSeg->iSegid, pgno);\n        Fts5Data *pNew = fts5LeafRead(p, iAbs);\n        if( pNew ){\n          int iRowid, bTermless;\n          iRowid = fts5LeafFirstRowidOff(pNew);\n          bTermless = fts5LeafIsTermless(pNew);\n          if( iRowid ){\n            SWAPVAL(Fts5Data*, pNew, pLast);\n            pgnoLast = pgno;\n          }\n          fts5DataRelease(pNew);\n          if( bTermless==0 ) break;\n        }\n      }\n    }\n  }\n\n  /* If pLast is NULL at this point, then the last rowid for this doclist\n  ** lies on the page currently indicated by the iterator. In this case\n  ** pIter->iLeafOffset is already set to point to the position-list size\n  ** field associated with the first relevant rowid on the page.\n  **\n  ** Or, if pLast is non-NULL, then it is the page that contains the last\n  ** rowid. In this case configure the iterator so that it points to the\n  ** first rowid on this page.\n  */\n  if( pLast ){\n    int iOff;\n    fts5DataRelease(pIter->pLeaf);\n    pIter->pLeaf = pLast;\n    pIter->iLeafPgno = pgnoLast;\n    if( p->rc==SQLITE_OK ){\n      iOff = fts5LeafFirstRowidOff(pLast);\n      if( iOff>pLast->szLeaf ){\n        FTS5_CORRUPT_ITER(p, pIter);\n        return;\n      }\n      iOff += fts5GetVarint(&pLast->p[iOff], (u64*)&pIter->iRowid);\n      pIter->iLeafOffset = iOff;\n\n      if( fts5LeafIsTermless(pLast) ){\n        pIter->iEndofDoclist = pLast->nn+1;\n      }else{\n        pIter->iEndofDoclist = fts5LeafFirstTermOff(pLast);\n      }\n    }\n  }\n\n  fts5SegIterReverseInitPage(p, pIter);\n}\n\n/*\n** Iterator pIter currently points to the first rowid of a doclist.\n** There is a doclist-index associated with the final term on the current\n** page. If the current term is the last term on the page, load the\n** doclist-index from disk and initialize an iterator at (pIter->pDlidx).\n*/\nstatic void fts5SegIterLoadDlidx(Fts5Index *p, Fts5SegIter *pIter){\n  int iSeg = pIter->pSeg->iSegid;\n  int bRev = (pIter->flags & FTS5_SEGITER_REVERSE);\n  Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */\n\n  assert( pIter->flags & FTS5_SEGITER_ONETERM );\n  assert( pIter->pDlidx==0 );\n\n  /* Check if the current doclist ends on this page. If it does, return\n  ** early without loading the doclist-index (as it belongs to a different\n  ** term. */\n  if( pIter->iTermLeafPgno==pIter->iLeafPgno\n   && pIter->iEndofDoclist<pLeaf->szLeaf\n  ){\n    return;\n  }\n\n  pIter->pDlidx = fts5DlidxIterInit(p, bRev, iSeg, pIter->iTermLeafPgno);\n}\n\n/*\n** The iterator object passed as the second argument currently contains\n** no valid values except for the Fts5SegIter.pLeaf member variable. This\n** function searches the leaf page for a term matching (pTerm/nTerm).\n**\n** If the specified term is found on the page, then the iterator is left\n** pointing to it. If argument bGe is zero and the term is not found,\n** the iterator is left pointing at EOF.\n**\n** If bGe is non-zero and the specified term is not found, then the\n** iterator is left pointing to the smallest term in the segment that\n** is larger than the specified term, even if this term is not on the\n** current page.\n*/\nstatic void fts5LeafSeek(\n  Fts5Index *p,                   /* Leave any error code here */\n  int bGe,                        /* True for a >= search */\n  Fts5SegIter *pIter,             /* Iterator to seek */\n  const u8 *pTerm, int nTerm      /* Term to search for */\n){\n  u32 iOff;\n  const u8 *a = pIter->pLeaf->p;\n  u32 n = (u32)pIter->pLeaf->nn;\n\n  u32 nMatch = 0;\n  u32 nKeep = 0;\n  u32 nNew = 0;\n  u32 iTermOff;\n  u32 iPgidx;                     /* Current offset in pgidx */\n  int bEndOfPage = 0;\n\n  assert( p->rc==SQLITE_OK );\n\n  iPgidx = (u32)pIter->pLeaf->szLeaf;\n  iPgidx += fts5GetVarint32(&a[iPgidx], iTermOff);\n  iOff = iTermOff;\n  if( iOff>n ){\n    FTS5_CORRUPT_ITER(p, pIter);\n    return;\n  }\n\n  while( 1 ){\n\n    /* Figure out how many new bytes are in this term */\n    fts5FastGetVarint32(a, iOff, nNew);\n    if( nKeep<nMatch ){\n      goto search_failed;\n    }\n\n    assert( nKeep>=nMatch );\n    if( nKeep==nMatch ){\n      u32 nCmp;\n      u32 i;\n      nCmp = (u32)MIN(nNew, nTerm-nMatch);\n      for(i=0; i<nCmp; i++){\n        if( a[iOff+i]!=pTerm[nMatch+i] ) break;\n      }\n      nMatch += i;\n\n      if( (u32)nTerm==nMatch ){\n        if( i==nNew ){\n          goto search_success;\n        }else{\n          goto search_failed;\n        }\n      }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){\n        goto search_failed;\n      }\n    }\n\n    if( iPgidx>=n ){\n      bEndOfPage = 1;\n      break;\n    }\n\n    iPgidx += fts5GetVarint32(&a[iPgidx], nKeep);\n    iTermOff += nKeep;\n    iOff = iTermOff;\n\n    if( iOff>=n ){\n      FTS5_CORRUPT_ITER(p, pIter);\n      return;\n    }\n\n    /* Read the nKeep field of the next term. */\n    fts5FastGetVarint32(a, iOff, nKeep);\n  }\n\n search_failed:\n  if( bGe==0 ){\n    fts5DataRelease(pIter->pLeaf);\n    pIter->pLeaf = 0;\n    return;\n  }else if( bEndOfPage ){\n    do {\n      fts5SegIterNextPage(p, pIter);\n      if( pIter->pLeaf==0 ) return;\n      a = pIter->pLeaf->p;\n      if( fts5LeafIsTermless(pIter->pLeaf)==0 ){\n        iPgidx = (u32)pIter->pLeaf->szLeaf;\n        iPgidx += fts5GetVarint32(&pIter->pLeaf->p[iPgidx], iOff);\n        if( iOff<4 || (i64)iOff>=pIter->pLeaf->szLeaf ){\n          FTS5_CORRUPT_ITER(p, pIter);\n          return;\n        }else{\n          nKeep = 0;\n          iTermOff = iOff;\n          n = (u32)pIter->pLeaf->nn;\n          iOff += fts5GetVarint32(&a[iOff], nNew);\n          break;\n        }\n      }\n    }while( 1 );\n  }\n\n search_success:\n  if( (i64)iOff+nNew>n || nNew<1 ){\n    FTS5_CORRUPT_ITER(p, pIter);\n    return;\n  }\n  pIter->iLeafOffset = iOff + nNew;\n  pIter->iTermLeafOffset = pIter->iLeafOffset;\n  pIter->iTermLeafPgno = pIter->iLeafPgno;\n\n  fts5BufferSet(&p->rc, &pIter->term, nKeep, pTerm);\n  fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);\n\n  if( iPgidx>=n ){\n    pIter->iEndofDoclist = pIter->pLeaf->nn+1;\n  }else{\n    int nExtra;\n    iPgidx += fts5GetVarint32(&a[iPgidx], nExtra);\n    pIter->iEndofDoclist = iTermOff + nExtra;\n  }\n  pIter->iPgidxOff = iPgidx;\n\n  fts5SegIterLoadRowid(p, pIter);\n  fts5SegIterLoadNPos(p, pIter);\n}\n\nstatic sqlite3_stmt *fts5IdxSelectStmt(Fts5Index *p){\n  if( p->pIdxSelect==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    fts5IndexPrepareStmt(p, &p->pIdxSelect, sqlite3_mprintf(\n          \"SELECT pgno FROM '%q'.'%q_idx' WHERE \"\n          \"segid=? AND term<=? ORDER BY term DESC LIMIT 1\",\n          pConfig->zDb, pConfig->zName\n    ));\n  }\n  return p->pIdxSelect;\n}\n\n/*\n** Initialize the object pIter to point to term pTerm/nTerm within segment\n** pSeg. If there is no such term in the index, the iterator is set to EOF.\n**\n** If an error occurs, Fts5Index.rc is set to an appropriate error code. If\n** an error has already occurred when this function is called, it is a no-op.\n*/\nstatic void fts5SegIterSeekInit(\n  Fts5Index *p,                   /* FTS5 backend */\n  const u8 *pTerm, int nTerm,     /* Term to seek to */\n  int flags,                      /* Mask of FTS5INDEX_XXX flags */\n  Fts5StructureSegment *pSeg,     /* Description of segment */\n  Fts5SegIter *pIter              /* Object to populate */\n){\n  int iPg = 1;\n  int bGe = (flags & FTS5INDEX_QUERY_SCAN);\n  int bDlidx = 0;                 /* True if there is a doclist-index */\n  sqlite3_stmt *pIdxSelect = 0;\n\n  assert( bGe==0 || (flags & FTS5INDEX_QUERY_DESC)==0 );\n  assert( pTerm && nTerm );\n  memset(pIter, 0, sizeof(*pIter));\n  pIter->pSeg = pSeg;\n\n  /* This block sets stack variable iPg to the leaf page number that may\n  ** contain term (pTerm/nTerm), if it is present in the segment. */\n  pIdxSelect = fts5IdxSelectStmt(p);\n  if( p->rc ) return;\n  sqlite3_bind_int(pIdxSelect, 1, pSeg->iSegid);\n  sqlite3_bind_blob(pIdxSelect, 2, pTerm, nTerm, SQLITE_STATIC);\n  if( SQLITE_ROW==sqlite3_step(pIdxSelect) ){\n    i64 val = sqlite3_column_int(pIdxSelect, 0);\n    iPg = (int)(val>>1);\n    bDlidx = (val & 0x0001);\n  }\n  p->rc = sqlite3_reset(pIdxSelect);\n  sqlite3_bind_null(pIdxSelect, 2);\n\n  if( iPg<pSeg->pgnoFirst ){\n    iPg = pSeg->pgnoFirst;\n    bDlidx = 0;\n  }\n\n  pIter->iLeafPgno = iPg - 1;\n  fts5SegIterNextPage(p, pIter);\n\n  if( pIter->pLeaf ){\n    fts5LeafSeek(p, bGe, pIter, pTerm, nTerm);\n  }\n\n  if( p->rc==SQLITE_OK && (bGe==0 || (flags & FTS5INDEX_QUERY_SCANONETERM)) ){\n    pIter->flags |= FTS5_SEGITER_ONETERM;\n    if( pIter->pLeaf ){\n      if( flags & FTS5INDEX_QUERY_DESC ){\n        pIter->flags |= FTS5_SEGITER_REVERSE;\n      }\n      if( bDlidx ){\n        fts5SegIterLoadDlidx(p, pIter);\n      }\n      if( flags & FTS5INDEX_QUERY_DESC ){\n        fts5SegIterReverse(p, pIter);\n      }\n    }\n  }\n\n  fts5SegIterSetNext(p, pIter);\n  if( 0==(flags & FTS5INDEX_QUERY_SCANONETERM) ){\n    fts5SegIterAllocTombstone(p, pIter);\n  }\n\n  /* Either:\n  **\n  **   1) an error has occurred, or\n  **   2) the iterator points to EOF, or\n  **   3) the iterator points to an entry with term (pTerm/nTerm), or\n  **   4) the FTS5INDEX_QUERY_SCAN flag was set and the iterator points\n  **      to an entry with a term greater than or equal to (pTerm/nTerm).\n  */\n  assert_nc( p->rc!=SQLITE_OK                                       /* 1 */\n   || pIter->pLeaf==0                                               /* 2 */\n   || fts5BufferCompareBlob(&pIter->term, pTerm, nTerm)==0          /* 3 */\n   || (bGe && fts5BufferCompareBlob(&pIter->term, pTerm, nTerm)>0)  /* 4 */\n  );\n}\n\n\n/*\n** SQL used by fts5SegIterNextInit() to find the page to open.\n*/\nstatic sqlite3_stmt *fts5IdxNextStmt(Fts5Index *p){\n  if( p->pIdxNextSelect==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    fts5IndexPrepareStmt(p, &p->pIdxNextSelect, sqlite3_mprintf(\n          \"SELECT pgno FROM '%q'.'%q_idx' WHERE \"\n          \"segid=? AND term>? ORDER BY term ASC LIMIT 1\",\n          pConfig->zDb, pConfig->zName\n    ));\n\n  }\n  return p->pIdxNextSelect;\n}\n\n/*\n** This is similar to fts5SegIterSeekInit(), except that it initializes\n** the segment iterator to point to the first term following the page\n** with pToken/nToken on it.\n*/\nstatic void fts5SegIterNextInit(\n  Fts5Index *p,\n  const char *pTerm, int nTerm,\n  Fts5StructureSegment *pSeg,     /* Description of segment */\n  Fts5SegIter *pIter              /* Object to populate */\n){\n  int iPg = -1;                   /* Page of segment to open */\n  int bDlidx = 0;\n  sqlite3_stmt *pSel = 0;         /* SELECT to find iPg */\n\n  pSel = fts5IdxNextStmt(p);\n  if( pSel ){\n    assert( p->rc==SQLITE_OK );\n    sqlite3_bind_int(pSel, 1, pSeg->iSegid);\n    sqlite3_bind_blob(pSel, 2, pTerm, nTerm, SQLITE_STATIC);\n\n    if( sqlite3_step(pSel)==SQLITE_ROW ){\n      i64 val = sqlite3_column_int64(pSel, 0);\n      iPg = (int)(val>>1);\n      bDlidx = (val & 0x0001);\n    }\n    p->rc = sqlite3_reset(pSel);\n    sqlite3_bind_null(pSel, 2);\n    if( p->rc ) return;\n  }\n\n  memset(pIter, 0, sizeof(*pIter));\n  pIter->pSeg = pSeg;\n  pIter->flags |= FTS5_SEGITER_ONETERM;\n  if( iPg>=0 ){\n    pIter->iLeafPgno = iPg - 1;\n    fts5SegIterNextPage(p, pIter);\n    fts5SegIterSetNext(p, pIter);\n  }\n  if( pIter->pLeaf ){\n    const u8 *a = pIter->pLeaf->p;\n    int iTermOff = 0;\n\n    pIter->iPgidxOff = pIter->pLeaf->szLeaf;\n    pIter->iPgidxOff += fts5GetVarint32(&a[pIter->iPgidxOff], iTermOff);\n    pIter->iLeafOffset = iTermOff;\n    fts5SegIterLoadTerm(p, pIter, 0);\n    fts5SegIterLoadNPos(p, pIter);\n    if( bDlidx ) fts5SegIterLoadDlidx(p, pIter);\n\n    assert( p->rc!=SQLITE_OK ||\n        fts5BufferCompareBlob(&pIter->term, (const u8*)pTerm, nTerm)>0\n    );\n  }\n}\n\n/*\n** Initialize the object pIter to point to term pTerm/nTerm within the\n** in-memory hash table. If there is no such term in the hash-table, the\n** iterator is set to EOF.\n**\n** If an error occurs, Fts5Index.rc is set to an appropriate error code. If\n** an error has already occurred when this function is called, it is a no-op.\n*/\nstatic void fts5SegIterHashInit(\n  Fts5Index *p,                   /* FTS5 backend */\n  const u8 *pTerm, int nTerm,     /* Term to seek to */\n  int flags,                      /* Mask of FTS5INDEX_XXX flags */\n  Fts5SegIter *pIter              /* Object to populate */\n){\n  int nList = 0;\n  const u8 *z = 0;\n  int n = 0;\n  Fts5Data *pLeaf = 0;\n\n  assert( p->pHash );\n  assert( p->rc==SQLITE_OK );\n\n  if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){\n    const u8 *pList = 0;\n\n    p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);\n    sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &n, &pList, &nList);\n    if( pList ){\n      pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));\n      if( pLeaf ){\n        pLeaf->p = (u8*)pList;\n      }\n    }\n\n    /* The call to sqlite3Fts5HashScanInit() causes the hash table to\n    ** fill the size field of all existing position lists. This means they\n    ** can no longer be appended to. Since the only scenario in which they\n    ** can be appended to is if the previous operation on this table was\n    ** a DELETE, by clearing the Fts5Index.bDelete flag we can avoid this\n    ** possibility altogether.  */\n    p->bDelete = 0;\n  }else{\n    p->rc = sqlite3Fts5HashQuery(p->pHash, sizeof(Fts5Data),\n        (const char*)pTerm, nTerm, (void**)&pLeaf, &nList\n    );\n    if( pLeaf ){\n      pLeaf->p = (u8*)&pLeaf[1];\n    }\n    z = pTerm;\n    n = nTerm;\n    pIter->flags |= FTS5_SEGITER_ONETERM;\n  }\n\n  if( pLeaf ){\n    sqlite3Fts5BufferSet(&p->rc, &pIter->term, n, z);\n    pLeaf->nn = pLeaf->szLeaf = nList;\n    pIter->pLeaf = pLeaf;\n    pIter->iLeafOffset = fts5GetVarint(pLeaf->p, (u64*)&pIter->iRowid);\n    pIter->iEndofDoclist = pLeaf->nn;\n\n    if( flags & FTS5INDEX_QUERY_DESC ){\n      pIter->flags |= FTS5_SEGITER_REVERSE;\n      fts5SegIterReverseInitPage(p, pIter);\n    }else{\n      fts5SegIterLoadNPos(p, pIter);\n    }\n  }\n\n  fts5SegIterSetNext(p, pIter);\n}\n\n/*\n** Array ap[] contains n elements. Release each of these elements using\n** fts5DataRelease(). Then free the array itself using sqlite3_free().\n*/\nstatic void fts5IndexFreeArray(Fts5Data **ap, int n){\n  if( ap ){\n    int ii;\n    for(ii=0; ii<n; ii++){\n      fts5DataRelease(ap[ii]);\n    }\n    sqlite3_free(ap);\n  }\n}\n\n/*\n** Decrement the ref-count of the object passed as the only argument. If it\n** reaches 0, free it and its contents.\n*/\nstatic void fts5TombstoneArrayDelete(Fts5TombstoneArray *p){\n  if( p ){\n    p->nRef--;\n    if( p->nRef<=0 ){\n      int ii;\n      for(ii=0; ii<p->nTombstone; ii++){\n        fts5DataRelease(p->apTombstone[ii]);\n      }\n      sqlite3_free(p);\n    }\n  }\n}\n\n/*\n** Zero the iterator passed as the only argument.\n*/\nstatic void fts5SegIterClear(Fts5SegIter *pIter){\n  fts5BufferFree(&pIter->term);\n  fts5DataRelease(pIter->pLeaf);\n  fts5DataRelease(pIter->pNextLeaf);\n  fts5TombstoneArrayDelete(pIter->pTombArray);\n  fts5DlidxIterFree(pIter->pDlidx);\n  sqlite3_free(pIter->aRowidOffset);\n  memset(pIter, 0, sizeof(Fts5SegIter));\n}\n\n#ifdef SQLITE_DEBUG\n\n/*\n** This function is used as part of the big assert() procedure implemented by\n** fts5AssertMultiIterSetup(). It ensures that the result currently stored\n** in *pRes is the correct result of comparing the current positions of the\n** two iterators.\n*/\nstatic void fts5AssertComparisonResult(\n  Fts5Iter *pIter,\n  Fts5SegIter *p1,\n  Fts5SegIter *p2,\n  Fts5CResult *pRes\n){\n  int i1 = p1 - pIter->aSeg;\n  int i2 = p2 - pIter->aSeg;\n\n  if( p1->pLeaf || p2->pLeaf ){\n    if( p1->pLeaf==0 ){\n      assert( pRes->iFirst==i2 );\n    }else if( p2->pLeaf==0 ){\n      assert( pRes->iFirst==i1 );\n    }else{\n      int nMin = MIN(p1->term.n, p2->term.n);\n      int res = fts5Memcmp(p1->term.p, p2->term.p, nMin);\n      if( res==0 ) res = p1->term.n - p2->term.n;\n\n      if( res==0 ){\n        assert( pRes->bTermEq==1 );\n        assert( p1->iRowid!=p2->iRowid );\n        res = ((p1->iRowid > p2->iRowid)==pIter->bRev) ? -1 : 1;\n      }else{\n        assert( pRes->bTermEq==0 );\n      }\n\n      if( res<0 ){\n        assert( pRes->iFirst==i1 );\n      }else{\n        assert( pRes->iFirst==i2 );\n      }\n    }\n  }\n}\n\n/*\n** This function is a no-op unless SQLITE_DEBUG is defined when this module\n** is compiled. In that case, this function is essentially an assert()\n** statement used to verify that the contents of the pIter->aFirst[] array\n** are correct.\n*/\nstatic void fts5AssertMultiIterSetup(Fts5Index *p, Fts5Iter *pIter){\n  if( p->rc==SQLITE_OK ){\n    Fts5SegIter *pFirst = &pIter->aSeg[ pIter->aFirst[1].iFirst ];\n    int i;\n\n    assert( (pFirst->pLeaf==0)==pIter->base.bEof );\n\n    /* Check that pIter->iSwitchRowid is set correctly. */\n    for(i=0; i<pIter->nSeg; i++){\n      Fts5SegIter *p1 = &pIter->aSeg[i];\n      assert( p1==pFirst\n           || p1->pLeaf==0\n           || fts5BufferCompare(&pFirst->term, &p1->term)\n           || p1->iRowid==pIter->iSwitchRowid\n           || (p1->iRowid<pIter->iSwitchRowid)==pIter->bRev\n      );\n    }\n\n    for(i=0; i<pIter->nSeg; i+=2){\n      Fts5SegIter *p1 = &pIter->aSeg[i];\n      Fts5SegIter *p2 = &pIter->aSeg[i+1];\n      Fts5CResult *pRes = &pIter->aFirst[(pIter->nSeg + i) / 2];\n      fts5AssertComparisonResult(pIter, p1, p2, pRes);\n    }\n\n    for(i=1; i<(pIter->nSeg / 2); i+=2){\n      Fts5SegIter *p1 = &pIter->aSeg[ pIter->aFirst[i*2].iFirst ];\n      Fts5SegIter *p2 = &pIter->aSeg[ pIter->aFirst[i*2+1].iFirst ];\n      Fts5CResult *pRes = &pIter->aFirst[i];\n      fts5AssertComparisonResult(pIter, p1, p2, pRes);\n    }\n  }\n}\n#else\n# define fts5AssertMultiIterSetup(x,y)\n#endif\n\n/*\n** Do the comparison necessary to populate pIter->aFirst[iOut].\n**\n** If the returned value is non-zero, then it is the index of an entry\n** in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing\n** to a key that is a duplicate of another, higher priority,\n** segment-iterator in the pSeg->aSeg[] array.\n*/\nstatic int fts5MultiIterDoCompare(Fts5Iter *pIter, int iOut){\n  int i1;                         /* Index of left-hand Fts5SegIter */\n  int i2;                         /* Index of right-hand Fts5SegIter */\n  int iRes;\n  Fts5SegIter *p1;                /* Left-hand Fts5SegIter */\n  Fts5SegIter *p2;                /* Right-hand Fts5SegIter */\n  Fts5CResult *pRes = &pIter->aFirst[iOut];\n\n  assert( iOut<pIter->nSeg && iOut>0 );\n  assert( pIter->bRev==0 || pIter->bRev==1 );\n\n  if( iOut>=(pIter->nSeg/2) ){\n    i1 = (iOut - pIter->nSeg/2) * 2;\n    i2 = i1 + 1;\n  }else{\n    i1 = pIter->aFirst[iOut*2].iFirst;\n    i2 = pIter->aFirst[iOut*2+1].iFirst;\n  }\n  p1 = &pIter->aSeg[i1];\n  p2 = &pIter->aSeg[i2];\n\n  pRes->bTermEq = 0;\n  if( p1->pLeaf==0 ){           /* If p1 is at EOF */\n    iRes = i2;\n  }else if( p2->pLeaf==0 ){     /* If p2 is at EOF */\n    iRes = i1;\n  }else{\n    int res = fts5BufferCompare(&p1->term, &p2->term);\n    if( res==0 ){\n      assert_nc( i2>i1 );\n      assert_nc( i2!=0 );\n      pRes->bTermEq = 1;\n      if( p1->iRowid==p2->iRowid ){\n        return i2;\n      }\n      res = ((p1->iRowid > p2->iRowid)==pIter->bRev) ? -1 : +1;\n    }\n    assert( res!=0 );\n    if( res<0 ){\n      iRes = i1;\n    }else{\n      iRes = i2;\n    }\n  }\n\n  pRes->iFirst = (u16)iRes;\n  return 0;\n}\n\n/*\n** Move the seg-iter so that it points to the first rowid on page iLeafPgno.\n** It is an error if leaf iLeafPgno does not exist. Unless the db is\n** a 'secure-delete' db, if it contains no rowids then this is also an error.\n*/\nstatic void fts5SegIterGotoPage(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter,             /* Iterator to advance */\n  int iLeafPgno\n){\n  assert( iLeafPgno>pIter->iLeafPgno );\n\n  if( iLeafPgno>pIter->pSeg->pgnoLast ){\n    FTS5_CORRUPT_IDX(p);\n  }else{\n    fts5DataRelease(pIter->pNextLeaf);\n    pIter->pNextLeaf = 0;\n    pIter->iLeafPgno = iLeafPgno-1;\n\n    while( p->rc==SQLITE_OK ){\n      int iOff;\n      fts5SegIterNextPage(p, pIter);\n      if( pIter->pLeaf==0 ) break;\n      iOff = fts5LeafFirstRowidOff(pIter->pLeaf);\n      if( iOff>0 ){\n        u8 *a = pIter->pLeaf->p;\n        int n = pIter->pLeaf->szLeaf;\n        if( iOff<4 || iOff>=n ){\n          FTS5_CORRUPT_IDX(p);\n        }else{\n          iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);\n          pIter->iLeafOffset = iOff;\n          fts5SegIterLoadNPos(p, pIter);\n        }\n        break;\n      }\n    }\n  }\n}\n\n/*\n** Advance the iterator passed as the second argument until it is at or\n** past rowid iFrom. Regardless of the value of iFrom, the iterator is\n** always advanced at least once.\n*/\nstatic void fts5SegIterNextFrom(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegIter *pIter,             /* Iterator to advance */\n  i64 iMatch                      /* Advance iterator at least this far */\n){\n  int bRev = (pIter->flags & FTS5_SEGITER_REVERSE);\n  Fts5DlidxIter *pDlidx = pIter->pDlidx;\n  int iLeafPgno = pIter->iLeafPgno;\n  int bMove = 1;\n\n  assert( pIter->flags & FTS5_SEGITER_ONETERM );\n  assert( pIter->pDlidx );\n  assert( pIter->pLeaf );\n\n  if( bRev==0 ){\n    while( !fts5DlidxIterEof(p, pDlidx) && iMatch>fts5DlidxIterRowid(pDlidx) ){\n      iLeafPgno = fts5DlidxIterPgno(pDlidx);\n      fts5DlidxIterNext(p, pDlidx);\n    }\n    assert_nc( iLeafPgno>=pIter->iLeafPgno || p->rc );\n    if( iLeafPgno>pIter->iLeafPgno ){\n      fts5SegIterGotoPage(p, pIter, iLeafPgno);\n      bMove = 0;\n    }\n  }else{\n    assert( pIter->pNextLeaf==0 );\n    assert( iMatch<pIter->iRowid );\n    while( !fts5DlidxIterEof(p, pDlidx) && iMatch<fts5DlidxIterRowid(pDlidx) ){\n      fts5DlidxIterPrev(p, pDlidx);\n    }\n    iLeafPgno = fts5DlidxIterPgno(pDlidx);\n\n    assert( fts5DlidxIterEof(p, pDlidx) || iLeafPgno<=pIter->iLeafPgno );\n\n    if( iLeafPgno<pIter->iLeafPgno ){\n      pIter->iLeafPgno = iLeafPgno+1;\n      fts5SegIterReverseNewPage(p, pIter);\n      bMove = 0;\n    }\n  }\n\n  do{\n    if( bMove && p->rc==SQLITE_OK ) pIter->xNext(p, pIter, 0);\n    if( pIter->pLeaf==0 ) break;\n    if( bRev==0 && pIter->iRowid>=iMatch ) break;\n    if( bRev!=0 && pIter->iRowid<=iMatch ) break;\n    bMove = 1;\n  }while( p->rc==SQLITE_OK );\n}\n\n/*\n** Free the iterator object passed as the second argument.\n*/\nstatic void fts5MultiIterFree(Fts5Iter *pIter){\n  if( pIter ){\n    int i;\n    for(i=0; i<pIter->nSeg; i++){\n      fts5SegIterClear(&pIter->aSeg[i]);\n    }\n    fts5BufferFree(&pIter->poslist);\n    sqlite3_free(pIter);\n  }\n}\n\nstatic void fts5MultiIterAdvanced(\n  Fts5Index *p,                   /* FTS5 backend to iterate within */\n  Fts5Iter *pIter,                /* Iterator to update aFirst[] array for */\n  int iChanged,                   /* Index of sub-iterator just advanced */\n  int iMinset                     /* Minimum entry in aFirst[] to set */\n){\n  int i;\n  for(i=(pIter->nSeg+iChanged)/2; i>=iMinset && p->rc==SQLITE_OK; i=i/2){\n    int iEq;\n    if( (iEq = fts5MultiIterDoCompare(pIter, i)) ){\n      Fts5SegIter *pSeg = &pIter->aSeg[iEq];\n      assert( p->rc==SQLITE_OK );\n      pSeg->xNext(p, pSeg, 0);\n      i = pIter->nSeg + iEq;\n    }\n  }\n}\n\n/*\n** Sub-iterator iChanged of iterator pIter has just been advanced. It still\n** points to the same term though - just a different rowid. This function\n** attempts to update the contents of the pIter->aFirst[] accordingly.\n** If it does so successfully, 0 is returned. Otherwise 1.\n**\n** If non-zero is returned, the caller should call fts5MultiIterAdvanced()\n** on the iterator instead. That function does the same as this one, except\n** that it deals with more complicated cases as well.\n*/\nstatic int fts5MultiIterAdvanceRowid(\n  Fts5Iter *pIter,                /* Iterator to update aFirst[] array for */\n  int iChanged,                   /* Index of sub-iterator just advanced */\n  Fts5SegIter **ppFirst\n){\n  Fts5SegIter *pNew = &pIter->aSeg[iChanged];\n\n  if( pNew->iRowid==pIter->iSwitchRowid\n   || (pNew->iRowid<pIter->iSwitchRowid)==pIter->bRev\n  ){\n    int i;\n    Fts5SegIter *pOther = &pIter->aSeg[iChanged ^ 0x0001];\n    pIter->iSwitchRowid = pIter->bRev ? SMALLEST_INT64 : LARGEST_INT64;\n    for(i=(pIter->nSeg+iChanged)/2; 1; i=i/2){\n      Fts5CResult *pRes = &pIter->aFirst[i];\n\n      assert( pNew->pLeaf );\n      assert( pRes->bTermEq==0 || pOther->pLeaf );\n\n      if( pRes->bTermEq ){\n        if( pNew->iRowid==pOther->iRowid ){\n          return 1;\n        }else if( (pOther->iRowid>pNew->iRowid)==pIter->bRev ){\n          pIter->iSwitchRowid = pOther->iRowid;\n          pNew = pOther;\n        }else if( (pOther->iRowid>pIter->iSwitchRowid)==pIter->bRev ){\n          pIter->iSwitchRowid = pOther->iRowid;\n        }\n      }\n      pRes->iFirst = (u16)(pNew - pIter->aSeg);\n      if( i==1 ) break;\n\n      pOther = &pIter->aSeg[ pIter->aFirst[i ^ 0x0001].iFirst ];\n    }\n  }\n\n  *ppFirst = pNew;\n  return 0;\n}\n\n/*\n** Set the pIter->bEof variable based on the state of the sub-iterators.\n*/\nstatic void fts5MultiIterSetEof(Fts5Iter *pIter){\n  Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];\n  pIter->base.bEof = pSeg->pLeaf==0;\n  pIter->iSwitchRowid = pSeg->iRowid;\n}\n\n/*\n** The argument to this macro must be an Fts5Data structure containing a\n** tombstone hash page. This macro returns the key-size of the hash-page.\n*/\n#define TOMBSTONE_KEYSIZE(pPg) (pPg->p[0]==4 ? 4 : 8)\n\n#define TOMBSTONE_NSLOT(pPg)   \\\n  ((pPg->nn > 16) ? ((pPg->nn-8) / TOMBSTONE_KEYSIZE(pPg)) : 1)\n\n/*\n** Query a single tombstone hash table for rowid iRowid. Return true if\n** it is found or false otherwise. The tombstone hash table is one of\n** nHashTable tables.\n*/\nstatic int fts5IndexTombstoneQuery(\n  Fts5Data *pHash,                /* Hash table page to query */\n  int nHashTable,                 /* Number of pages attached to segment */\n  u64 iRowid                      /* Rowid to query hash for */\n){\n  const int szKey = TOMBSTONE_KEYSIZE(pHash);\n  const int nSlot = TOMBSTONE_NSLOT(pHash);\n  int iSlot = (iRowid / nHashTable) % nSlot;\n  int nCollide = nSlot;\n\n  if( iRowid==0 ){\n    return pHash->p[1];\n  }else if( szKey==4 ){\n    u32 *aSlot = (u32*)&pHash->p[8];\n    while( aSlot[iSlot] ){\n      if( fts5GetU32((u8*)&aSlot[iSlot])==iRowid ) return 1;\n      if( nCollide--==0 ) break;\n      iSlot = (iSlot+1)%nSlot;\n    }\n  }else{\n    u64 *aSlot = (u64*)&pHash->p[8];\n    while( aSlot[iSlot] ){\n      if( fts5GetU64((u8*)&aSlot[iSlot])==iRowid ) return 1;\n      if( nCollide--==0 ) break;\n      iSlot = (iSlot+1)%nSlot;\n    }\n  }\n\n  return 0;\n}\n\n/*\n** Return true if the iterator passed as the only argument points\n** to an segment entry for which there is a tombstone. Return false\n** if there is no tombstone or if the iterator is already at EOF.\n*/\nstatic int fts5MultiIterIsDeleted(Fts5Iter *pIter){\n  int iFirst = pIter->aFirst[1].iFirst;\n  Fts5SegIter *pSeg = &pIter->aSeg[iFirst];\n  Fts5TombstoneArray *pArray = pSeg->pTombArray;\n\n  if( pSeg->pLeaf && pArray ){\n    /* Figure out which page the rowid might be present on. */\n    int iPg = ((u64)pSeg->iRowid) % pArray->nTombstone;\n    assert( iPg>=0 );\n\n    /* If tombstone hash page iPg has not yet been loaded from the\n    ** database, load it now. */\n    if( pArray->apTombstone[iPg]==0 ){\n      pArray->apTombstone[iPg] = fts5DataRead(pIter->pIndex,\n          FTS5_TOMBSTONE_ROWID(pSeg->pSeg->iSegid, iPg)\n      );\n      if( pArray->apTombstone[iPg]==0 ) return 0;\n    }\n\n    return fts5IndexTombstoneQuery(\n        pArray->apTombstone[iPg],\n        pArray->nTombstone,\n        pSeg->iRowid\n    );\n  }\n\n  return 0;\n}\n\n/*\n** Move the iterator to the next entry.\n**\n** If an error occurs, an error code is left in Fts5Index.rc. It is not\n** considered an error if the iterator reaches EOF, or if it is already at\n** EOF when this function is called.\n*/\nstatic void fts5MultiIterNext(\n  Fts5Index *p,\n  Fts5Iter *pIter,\n  int bFrom,                      /* True if argument iFrom is valid */\n  i64 iFrom                       /* Advance at least as far as this */\n){\n  int bUseFrom = bFrom;\n  assert( pIter->base.bEof==0 );\n  while( p->rc==SQLITE_OK ){\n    int iFirst = pIter->aFirst[1].iFirst;\n    int bNewTerm = 0;\n    Fts5SegIter *pSeg = &pIter->aSeg[iFirst];\n    assert( p->rc==SQLITE_OK );\n    if( bUseFrom && pSeg->pDlidx ){\n      fts5SegIterNextFrom(p, pSeg, iFrom);\n    }else{\n      pSeg->xNext(p, pSeg, &bNewTerm);\n    }\n\n    if( pSeg->pLeaf==0 || bNewTerm\n     || fts5MultiIterAdvanceRowid(pIter, iFirst, &pSeg)\n    ){\n      fts5MultiIterAdvanced(p, pIter, iFirst, 1);\n      fts5MultiIterSetEof(pIter);\n      pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst];\n      if( pSeg->pLeaf==0 ) return;\n    }\n\n    fts5AssertMultiIterSetup(p, pIter);\n    assert( pSeg==&pIter->aSeg[pIter->aFirst[1].iFirst] && pSeg->pLeaf );\n    if( (pIter->bSkipEmpty==0 || pSeg->nPos)\n      && 0==fts5MultiIterIsDeleted(pIter)\n    ){\n      pIter->xSetOutputs(pIter, pSeg);\n      return;\n    }\n    bUseFrom = 0;\n  }\n}\n\nstatic void fts5MultiIterNext2(\n  Fts5Index *p,\n  Fts5Iter *pIter,\n  int *pbNewTerm                  /* OUT: True if *might* be new term */\n){\n  assert( pIter->bSkipEmpty );\n  if( p->rc==SQLITE_OK ){\n    *pbNewTerm = 0;\n    do{\n      int iFirst = pIter->aFirst[1].iFirst;\n      Fts5SegIter *pSeg = &pIter->aSeg[iFirst];\n      int bNewTerm = 0;\n\n      assert( p->rc==SQLITE_OK );\n      pSeg->xNext(p, pSeg, &bNewTerm);\n      if( pSeg->pLeaf==0 || bNewTerm\n       || fts5MultiIterAdvanceRowid(pIter, iFirst, &pSeg)\n      ){\n        fts5MultiIterAdvanced(p, pIter, iFirst, 1);\n        fts5MultiIterSetEof(pIter);\n        *pbNewTerm = 1;\n      }\n      fts5AssertMultiIterSetup(p, pIter);\n\n    }while( (fts5MultiIterIsEmpty(p, pIter) || fts5MultiIterIsDeleted(pIter))\n         && (p->rc==SQLITE_OK)\n    );\n  }\n}\n\nstatic void fts5IterSetOutputs_Noop(Fts5Iter *pUnused1, Fts5SegIter *pUnused2){\n  UNUSED_PARAM2(pUnused1, pUnused2);\n}\n\nstatic Fts5Iter *fts5MultiIterAlloc(\n  Fts5Index *p,                   /* FTS5 backend to iterate within */\n  int nSeg\n){\n  Fts5Iter *pNew;\n  i64 nSlot;                      /* Power of two >= nSeg */\n\n  for(nSlot=2; nSlot<nSeg; nSlot=nSlot*2);\n  pNew = fts5IdxMalloc(p,\n      SZ_FTS5ITER(nSlot) +                /* pNew + pNew->aSeg[] */\n      sizeof(Fts5CResult) * nSlot         /* pNew->aFirst[] */\n  );\n  if( pNew ){\n    pNew->nSeg = nSlot;\n    pNew->aFirst = (Fts5CResult*)&pNew->aSeg[nSlot];\n    pNew->pIndex = p;\n    pNew->xSetOutputs = fts5IterSetOutputs_Noop;\n  }\n  return pNew;\n}\n\nstatic void fts5PoslistCallback(\n  Fts5Index *pUnused,\n  void *pContext,\n  const u8 *pChunk, int nChunk\n){\n  UNUSED_PARAM(pUnused);\n  assert_nc( nChunk>=0 );\n  if( nChunk>0 ){\n    fts5BufferSafeAppendBlob((Fts5Buffer*)pContext, pChunk, nChunk);\n  }\n}\n\ntypedef struct PoslistCallbackCtx PoslistCallbackCtx;\nstruct PoslistCallbackCtx {\n  Fts5Buffer *pBuf;               /* Append to this buffer */\n  Fts5Colset *pColset;            /* Restrict matches to this column */\n  int eState;                     /* See above */\n};\n\ntypedef struct PoslistOffsetsCtx PoslistOffsetsCtx;\nstruct PoslistOffsetsCtx {\n  Fts5Buffer *pBuf;               /* Append to this buffer */\n  Fts5Colset *pColset;            /* Restrict matches to this column */\n  int iRead;\n  int iWrite;\n};\n\n/*\n** TODO: Make this more efficient!\n*/\nstatic int fts5IndexColsetTest(Fts5Colset *pColset, int iCol){\n  int i;\n  for(i=0; i<pColset->nCol; i++){\n    if( pColset->aiCol[i]==iCol ) return 1;\n  }\n  return 0;\n}\n\nstatic void fts5PoslistOffsetsCallback(\n  Fts5Index *pUnused,\n  void *pContext,\n  const u8 *pChunk, int nChunk\n){\n  PoslistOffsetsCtx *pCtx = (PoslistOffsetsCtx*)pContext;\n  UNUSED_PARAM(pUnused);\n  assert_nc( nChunk>=0 );\n  if( nChunk>0 ){\n    int i = 0;\n    while( i<nChunk ){\n      int iVal;\n      i += fts5GetVarint32(&pChunk[i], iVal);\n      iVal += pCtx->iRead - 2;\n      pCtx->iRead = iVal;\n      if( fts5IndexColsetTest(pCtx->pColset, iVal) ){\n        fts5BufferSafeAppendVarint(pCtx->pBuf, iVal + 2 - pCtx->iWrite);\n        pCtx->iWrite = iVal;\n      }\n    }\n  }\n}\n\nstatic void fts5PoslistFilterCallback(\n  Fts5Index *pUnused,\n  void *pContext,\n  const u8 *pChunk, int nChunk\n){\n  PoslistCallbackCtx *pCtx = (PoslistCallbackCtx*)pContext;\n  UNUSED_PARAM(pUnused);\n  assert_nc( nChunk>=0 );\n  if( nChunk>0 ){\n    /* Search through to find the first varint with value 1. This is the\n    ** start of the next columns hits. */\n    int i = 0;\n    int iStart = 0;\n\n    if( pCtx->eState==2 ){\n      int iCol;\n      fts5FastGetVarint32(pChunk, i, iCol);\n      if( fts5IndexColsetTest(pCtx->pColset, iCol) ){\n        pCtx->eState = 1;\n        fts5BufferSafeAppendVarint(pCtx->pBuf, 1);\n      }else{\n        pCtx->eState = 0;\n      }\n    }\n\n    do {\n      while( i<nChunk && pChunk[i]!=0x01 ){\n        while( pChunk[i] & 0x80 ) i++;\n        i++;\n      }\n      if( pCtx->eState ){\n        fts5BufferSafeAppendBlob(pCtx->pBuf, &pChunk[iStart], i-iStart);\n      }\n      if( i<nChunk ){\n        int iCol;\n        iStart = i;\n        i++;\n        if( i>=nChunk ){\n          pCtx->eState = 2;\n        }else{\n          fts5FastGetVarint32(pChunk, i, iCol);\n          pCtx->eState = fts5IndexColsetTest(pCtx->pColset, iCol);\n          if( pCtx->eState ){\n            fts5BufferSafeAppendBlob(pCtx->pBuf, &pChunk[iStart], i-iStart);\n            iStart = i;\n          }\n        }\n      }\n    }while( i<nChunk );\n  }\n}\n\nstatic void fts5ChunkIterate(\n  Fts5Index *p,                   /* Index object */\n  Fts5SegIter *pSeg,              /* Poslist of this iterator */\n  void *pCtx,                     /* Context pointer for xChunk callback */\n  void (*xChunk)(Fts5Index*, void*, const u8*, int)\n){\n  int nRem = pSeg->nPos;          /* Number of bytes still to come */\n  Fts5Data *pData = 0;\n  u8 *pChunk = &pSeg->pLeaf->p[pSeg->iLeafOffset];\n  int nChunk = MIN(nRem, pSeg->pLeaf->szLeaf - pSeg->iLeafOffset);\n  int pgno = pSeg->iLeafPgno;\n  int pgnoSave = 0;\n\n  /* This function does not work with detail=none databases. */\n  assert( p->pConfig->eDetail!=FTS5_DETAIL_NONE );\n\n  if( (pSeg->flags & FTS5_SEGITER_REVERSE)==0 ){\n    pgnoSave = pgno+1;\n  }\n\n  while( 1 ){\n    xChunk(p, pCtx, pChunk, nChunk);\n    nRem -= nChunk;\n    fts5DataRelease(pData);\n    if( nRem<=0 ){\n      break;\n    }else if( pSeg->pSeg==0 ){\n      FTS5_CORRUPT_IDX(p);\n      return;\n    }else{\n      pgno++;\n      pData = fts5LeafRead(p, FTS5_SEGMENT_ROWID(pSeg->pSeg->iSegid, pgno));\n      if( pData==0 ) break;\n      pChunk = &pData->p[4];\n      nChunk = MIN(nRem, pData->szLeaf - 4);\n      if( pgno==pgnoSave ){\n        assert( pSeg->pNextLeaf==0 );\n        pSeg->pNextLeaf = pData;\n        pData = 0;\n      }\n    }\n  }\n}\n\n/*\n** Iterator pIter currently points to a valid entry (not EOF). This\n** function appends the position list data for the current entry to\n** buffer pBuf. It does not make a copy of the position-list size\n** field.\n*/\nstatic void fts5SegiterPoslist(\n  Fts5Index *p,\n  Fts5SegIter *pSeg,\n  Fts5Colset *pColset,\n  Fts5Buffer *pBuf\n){\n  assert( pBuf!=0 );\n  assert( pSeg!=0 );\n  if( 0==fts5BufferGrow(&p->rc, pBuf, pSeg->nPos+FTS5_DATA_ZERO_PADDING) ){\n    assert( pBuf->p!=0 );\n    assert( pBuf->nSpace >= pBuf->n+pSeg->nPos+FTS5_DATA_ZERO_PADDING );\n    memset(&pBuf->p[pBuf->n+pSeg->nPos], 0, FTS5_DATA_ZERO_PADDING);\n    if( pColset==0 ){\n      fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback);\n    }else{\n      if( p->pConfig->eDetail==FTS5_DETAIL_FULL ){\n        PoslistCallbackCtx sCtx;\n        sCtx.pBuf = pBuf;\n        sCtx.pColset = pColset;\n        sCtx.eState = fts5IndexColsetTest(pColset, 0);\n        assert( sCtx.eState==0 || sCtx.eState==1 );\n        fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback);\n      }else{\n        PoslistOffsetsCtx sCtx;\n        memset(&sCtx, 0, sizeof(sCtx));\n        sCtx.pBuf = pBuf;\n        sCtx.pColset = pColset;\n        fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistOffsetsCallback);\n      }\n    }\n  }\n}\n\n/*\n** Parameter pPos points to a buffer containing a position list, size nPos.\n** This function filters it according to pColset (which must be non-NULL)\n** and sets pIter->base.pData/nData to point to the new position list.\n** If memory is required for the new position list, use buffer pIter->poslist.\n** Or, if the new position list is a contiguous subset of the input, set\n** pIter->base.pData/nData to point directly to it.\n**\n** This function is a no-op if *pRc is other than SQLITE_OK when it is\n** called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM\n** before returning.\n*/\nstatic void fts5IndexExtractColset(\n  int *pRc,\n  Fts5Colset *pColset,            /* Colset to filter on */\n  const u8 *pPos, int nPos,       /* Position list */\n  Fts5Iter *pIter\n){\n  if( *pRc==SQLITE_OK ){\n    const u8 *p = pPos;\n    const u8 *aCopy = p;\n    const u8 *pEnd = &p[nPos];    /* One byte past end of position list */\n    int i = 0;\n    int iCurrent = 0;\n\n    if( pColset->nCol>1 && sqlite3Fts5BufferSize(pRc, &pIter->poslist, nPos) ){\n      return;\n    }\n\n    while( 1 ){\n      while( pColset->aiCol[i]<iCurrent ){\n        i++;\n        if( i==pColset->nCol ){\n          pIter->base.pData = pIter->poslist.p;\n          pIter->base.nData = pIter->poslist.n;\n          return;\n        }\n      }\n\n      /* Advance pointer p until it points to pEnd or an 0x01 byte that is\n      ** not part of a varint */\n      while( p<pEnd && *p!=0x01 ){\n        while( *p++ & 0x80 );\n      }\n\n      if( pColset->aiCol[i]==iCurrent ){\n        if( pColset->nCol==1 ){\n          pIter->base.pData = aCopy;\n          pIter->base.nData = p-aCopy;\n          return;\n        }\n        fts5BufferSafeAppendBlob(&pIter->poslist, aCopy, p-aCopy);\n      }\n      if( p>=pEnd ){\n        pIter->base.pData = pIter->poslist.p;\n        pIter->base.nData = pIter->poslist.n;\n        return;\n      }\n      aCopy = p++;\n      iCurrent = *p++;\n      if( iCurrent & 0x80 ){\n        p--;\n        p += fts5GetVarint32(p, iCurrent);\n      }\n    }\n  }\n\n}\n\n/*\n** xSetOutputs callback used by detail=none tables.\n*/\nstatic void fts5IterSetOutputs_None(Fts5Iter *pIter, Fts5SegIter *pSeg){\n  assert( pIter->pIndex->pConfig->eDetail==FTS5_DETAIL_NONE );\n  pIter->base.iRowid = pSeg->iRowid;\n  pIter->base.nData = pSeg->nPos;\n}\n\n/*\n** xSetOutputs callback used by detail=full and detail=col tables when no\n** column filters are specified.\n*/\nstatic void fts5IterSetOutputs_Nocolset(Fts5Iter *pIter, Fts5SegIter *pSeg){\n  pIter->base.iRowid = pSeg->iRowid;\n  pIter->base.nData = pSeg->nPos;\n\n  assert( pIter->pIndex->pConfig->eDetail!=FTS5_DETAIL_NONE );\n  assert( pIter->pColset==0 );\n\n  if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf ){\n    /* All data is stored on the current page. Populate the output\n    ** variables to point into the body of the page object. */\n    pIter->base.pData = &pSeg->pLeaf->p[pSeg->iLeafOffset];\n  }else{\n    /* The data is distributed over two or more pages. Copy it into the\n    ** Fts5Iter.poslist buffer and then set the output pointer to point\n    ** to this buffer.  */\n    fts5BufferZero(&pIter->poslist);\n    fts5SegiterPoslist(pIter->pIndex, pSeg, 0, &pIter->poslist);\n    pIter->base.pData = pIter->poslist.p;\n  }\n}\n\n/*\n** xSetOutputs callback used when the Fts5Colset object has nCol==0 (match\n** against no columns at all).\n*/\nstatic void fts5IterSetOutputs_ZeroColset(Fts5Iter *pIter, Fts5SegIter *pSeg){\n  UNUSED_PARAM(pSeg);\n  pIter->base.nData = 0;\n}\n\n/*\n** xSetOutputs callback used by detail=col when there is a column filter\n** and there are 100 or more columns. Also called as a fallback from\n** fts5IterSetOutputs_Col100 if the column-list spans more than one page.\n*/\nstatic void fts5IterSetOutputs_Col(Fts5Iter *pIter, Fts5SegIter *pSeg){\n  fts5BufferZero(&pIter->poslist);\n  fts5SegiterPoslist(pIter->pIndex, pSeg, pIter->pColset, &pIter->poslist);\n  pIter->base.iRowid = pSeg->iRowid;\n  pIter->base.pData = pIter->poslist.p;\n  pIter->base.nData = pIter->poslist.n;\n}\n\n/*\n** xSetOutputs callback used when:\n**\n**   * detail=col,\n**   * there is a column filter, and\n**   * the table contains 100 or fewer columns.\n**\n** The last point is to ensure all column numbers are stored as\n** single-byte varints.\n*/\nstatic void fts5IterSetOutputs_Col100(Fts5Iter *pIter, Fts5SegIter *pSeg){\n\n  assert( pIter->pIndex->pConfig->eDetail==FTS5_DETAIL_COLUMNS );\n  assert( pIter->pColset );\n\n  if( pSeg->iLeafOffset+pSeg->nPos>pSeg->pLeaf->szLeaf ){\n    fts5IterSetOutputs_Col(pIter, pSeg);\n  }else{\n    u8 *a = (u8*)&pSeg->pLeaf->p[pSeg->iLeafOffset];\n    u8 *pEnd = (u8*)&a[pSeg->nPos];\n    int iPrev = 0;\n    int *aiCol = pIter->pColset->aiCol;\n    int *aiColEnd = &aiCol[pIter->pColset->nCol];\n\n    u8 *aOut = pIter->poslist.p;\n    int iPrevOut = 0;\n\n    pIter->base.iRowid = pSeg->iRowid;\n\n    while( a<pEnd ){\n      iPrev += (int)a++[0] - 2;\n      while( *aiCol<iPrev ){\n        aiCol++;\n        if( aiCol==aiColEnd ) goto setoutputs_col_out;\n      }\n      if( *aiCol==iPrev ){\n        *aOut++ = (u8)((iPrev - iPrevOut) + 2);\n        iPrevOut = iPrev;\n      }\n    }\n\nsetoutputs_col_out:\n    pIter->base.pData = pIter->poslist.p;\n    pIter->base.nData = aOut - pIter->poslist.p;\n  }\n}\n\n/*\n** xSetOutputs callback used by detail=full when there is a column filter.\n*/\nstatic void fts5IterSetOutputs_Full(Fts5Iter *pIter, Fts5SegIter *pSeg){\n  Fts5Colset *pColset = pIter->pColset;\n  pIter->base.iRowid = pSeg->iRowid;\n\n  assert( pIter->pIndex->pConfig->eDetail==FTS5_DETAIL_FULL );\n  assert( pColset );\n\n  if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf ){\n    /* All data is stored on the current page. Populate the output\n    ** variables to point into the body of the page object. */\n    const u8 *a = &pSeg->pLeaf->p[pSeg->iLeafOffset];\n    int *pRc = &pIter->pIndex->rc;\n    fts5BufferZero(&pIter->poslist);\n    fts5IndexExtractColset(pRc, pColset, a, pSeg->nPos, pIter);\n  }else{\n    /* The data is distributed over two or more pages. Copy it into the\n    ** Fts5Iter.poslist buffer and then set the output pointer to point\n    ** to this buffer.  */\n    fts5BufferZero(&pIter->poslist);\n    fts5SegiterPoslist(pIter->pIndex, pSeg, pColset, &pIter->poslist);\n    pIter->base.pData = pIter->poslist.p;\n    pIter->base.nData = pIter->poslist.n;\n  }\n}\n\nstatic void fts5IterSetOutputCb(int *pRc, Fts5Iter *pIter){\n  assert( pIter!=0 || (*pRc)!=SQLITE_OK );\n  if( *pRc==SQLITE_OK ){\n    Fts5Config *pConfig = pIter->pIndex->pConfig;\n    if( pConfig->eDetail==FTS5_DETAIL_NONE ){\n      pIter->xSetOutputs = fts5IterSetOutputs_None;\n    }\n\n    else if( pIter->pColset==0 ){\n      pIter->xSetOutputs = fts5IterSetOutputs_Nocolset;\n    }\n\n    else if( pIter->pColset->nCol==0 ){\n      pIter->xSetOutputs = fts5IterSetOutputs_ZeroColset;\n    }\n\n    else if( pConfig->eDetail==FTS5_DETAIL_FULL ){\n      pIter->xSetOutputs = fts5IterSetOutputs_Full;\n    }\n\n    else{\n      assert( pConfig->eDetail==FTS5_DETAIL_COLUMNS );\n      if( pConfig->nCol<=100 ){\n        pIter->xSetOutputs = fts5IterSetOutputs_Col100;\n        sqlite3Fts5BufferSize(pRc, &pIter->poslist, pConfig->nCol);\n      }else{\n        pIter->xSetOutputs = fts5IterSetOutputs_Col;\n      }\n    }\n  }\n}\n\n/*\n** All the component segment-iterators of pIter have been set up. This\n** functions finishes setup for iterator pIter itself.\n*/\nstatic void fts5MultiIterFinishSetup(Fts5Index *p, Fts5Iter *pIter){\n  int iIter;\n  for(iIter=pIter->nSeg-1; iIter>0; iIter--){\n    int iEq;\n    if( (iEq = fts5MultiIterDoCompare(pIter, iIter)) ){\n      Fts5SegIter *pSeg = &pIter->aSeg[iEq];\n      if( p->rc==SQLITE_OK ) pSeg->xNext(p, pSeg, 0);\n      fts5MultiIterAdvanced(p, pIter, iEq, iIter);\n    }\n  }\n  fts5MultiIterSetEof(pIter);\n  fts5AssertMultiIterSetup(p, pIter);\n\n  if( (pIter->bSkipEmpty && fts5MultiIterIsEmpty(p, pIter))\n   || fts5MultiIterIsDeleted(pIter)\n  ){\n    fts5MultiIterNext(p, pIter, 0, 0);\n  }else if( pIter->base.bEof==0 ){\n    Fts5SegIter *pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst];\n    pIter->xSetOutputs(pIter, pSeg);\n  }\n}\n\n/*\n** Allocate a new Fts5Iter object.\n**\n** The new object will be used to iterate through data in structure pStruct.\n** If iLevel is -ve, then all data in all segments is merged. Or, if iLevel\n** is zero or greater, data from the first nSegment segments on level iLevel\n** is merged.\n**\n** The iterator initially points to the first term/rowid entry in the\n** iterated data.\n*/\nstatic void fts5MultiIterNew(\n  Fts5Index *p,                   /* FTS5 backend to iterate within */\n  Fts5Structure *pStruct,         /* Structure of specific index */\n  int flags,                      /* FTS5INDEX_QUERY_XXX flags */\n  Fts5Colset *pColset,            /* Colset to filter on (or NULL) */\n  const u8 *pTerm, int nTerm,     /* Term to seek to (or NULL/0) */\n  int iLevel,                     /* Level to iterate (-1 for all) */\n  int nSegment,                   /* Number of segments to merge (iLevel>=0) */\n  Fts5Iter **ppOut                /* New object */\n){\n  int nSeg = 0;                   /* Number of segment-iters in use */\n  int iIter = 0;                  /* */\n  int iSeg;                       /* Used to iterate through segments */\n  Fts5StructureLevel *pLvl;\n  Fts5Iter *pNew;\n\n  assert( (pTerm==0 && nTerm==0) || iLevel<0 );\n\n  /* Allocate space for the new multi-seg-iterator. */\n  if( p->rc==SQLITE_OK ){\n    if( iLevel<0 ){\n      assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) );\n      nSeg = pStruct->nSegment;\n      nSeg += (p->pHash && 0==(flags & FTS5INDEX_QUERY_SKIPHASH));\n    }else{\n      nSeg = MIN(pStruct->aLevel[iLevel].nSeg, nSegment);\n    }\n  }\n  *ppOut = pNew = fts5MultiIterAlloc(p, nSeg);\n  if( pNew==0 ){\n    assert( p->rc!=SQLITE_OK );\n    goto fts5MultiIterNew_post_check;\n  }\n  pNew->bRev = (0!=(flags & FTS5INDEX_QUERY_DESC));\n  pNew->bSkipEmpty = (0!=(flags & FTS5INDEX_QUERY_SKIPEMPTY));\n  pNew->pColset = pColset;\n  if( (flags & FTS5INDEX_QUERY_NOOUTPUT)==0 ){\n    fts5IterSetOutputCb(&p->rc, pNew);\n  }\n\n  /* Initialize each of the component segment iterators. */\n  if( p->rc==SQLITE_OK ){\n    if( iLevel<0 ){\n      Fts5StructureLevel *pEnd = &pStruct->aLevel[pStruct->nLevel];\n      if( p->pHash && 0==(flags & FTS5INDEX_QUERY_SKIPHASH) ){\n        /* Add a segment iterator for the current contents of the hash table. */\n        Fts5SegIter *pIter = &pNew->aSeg[iIter++];\n        fts5SegIterHashInit(p, pTerm, nTerm, flags, pIter);\n      }\n      for(pLvl=&pStruct->aLevel[0]; pLvl<pEnd; pLvl++){\n        for(iSeg=pLvl->nSeg-1; iSeg>=0; iSeg--){\n          Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];\n          Fts5SegIter *pIter = &pNew->aSeg[iIter++];\n          if( pTerm==0 ){\n            fts5SegIterInit(p, pSeg, pIter);\n          }else{\n            fts5SegIterSeekInit(p, pTerm, nTerm, flags, pSeg, pIter);\n          }\n        }\n      }\n    }else{\n      pLvl = &pStruct->aLevel[iLevel];\n      for(iSeg=nSeg-1; iSeg>=0; iSeg--){\n        fts5SegIterInit(p, &pLvl->aSeg[iSeg], &pNew->aSeg[iIter++]);\n      }\n    }\n    assert( iIter==nSeg );\n  }\n\n  /* If the above was successful, each component iterator now points\n  ** to the first entry in its segment. In this case initialize the\n  ** aFirst[] array. Or, if an error has occurred, free the iterator\n  ** object and set the output variable to NULL.  */\n  if( p->rc==SQLITE_OK ){\n    fts5MultiIterFinishSetup(p, pNew);\n  }else{\n    fts5MultiIterFree(pNew);\n    *ppOut = 0;\n  }\n\nfts5MultiIterNew_post_check:\n  assert( (*ppOut)!=0 || p->rc!=SQLITE_OK );\n  return;\n}\n\n/*\n** Create an Fts5Iter that iterates through the doclist provided\n** as the second argument.\n*/\nstatic void fts5MultiIterNew2(\n  Fts5Index *p,                   /* FTS5 backend to iterate within */\n  Fts5Data *pData,                /* Doclist to iterate through */\n  int bDesc,                      /* True for descending rowid order */\n  Fts5Iter **ppOut                /* New object */\n){\n  Fts5Iter *pNew;\n  pNew = fts5MultiIterAlloc(p, 2);\n  if( pNew ){\n    Fts5SegIter *pIter = &pNew->aSeg[1];\n    pIter->flags = FTS5_SEGITER_ONETERM;\n    if( pData->szLeaf>0 ){\n      pIter->pLeaf = pData;\n      pIter->iLeafOffset = fts5GetVarint(pData->p, (u64*)&pIter->iRowid);\n      pIter->iEndofDoclist = pData->nn;\n      pNew->aFirst[1].iFirst = 1;\n      if( bDesc ){\n        pNew->bRev = 1;\n        pIter->flags |= FTS5_SEGITER_REVERSE;\n        fts5SegIterReverseInitPage(p, pIter);\n      }else{\n        fts5SegIterLoadNPos(p, pIter);\n      }\n      pData = 0;\n    }else{\n      pNew->base.bEof = 1;\n    }\n    fts5SegIterSetNext(p, pIter);\n\n    *ppOut = pNew;\n  }\n\n  fts5DataRelease(pData);\n}\n\n/*\n** Return true if the iterator is at EOF or if an error has occurred.\n** False otherwise.\n*/\nstatic int fts5MultiIterEof(Fts5Index *p, Fts5Iter *pIter){\n  assert( pIter!=0 || p->rc!=SQLITE_OK );\n  assert( p->rc!=SQLITE_OK\n      || (pIter->aSeg[ pIter->aFirst[1].iFirst ].pLeaf==0)==pIter->base.bEof\n  );\n  return (p->rc || pIter->base.bEof);\n}\n\n/*\n** Return the rowid of the entry that the iterator currently points\n** to. If the iterator points to EOF when this function is called the\n** results are undefined.\n*/\nstatic i64 fts5MultiIterRowid(Fts5Iter *pIter){\n  assert( pIter->aSeg[ pIter->aFirst[1].iFirst ].pLeaf );\n  return pIter->aSeg[ pIter->aFirst[1].iFirst ].iRowid;\n}\n\n/*\n** Move the iterator to the next entry at or following iMatch.\n*/\nstatic void fts5MultiIterNextFrom(\n  Fts5Index *p,\n  Fts5Iter *pIter,\n  i64 iMatch\n){\n  while( 1 ){\n    i64 iRowid;\n    fts5MultiIterNext(p, pIter, 1, iMatch);\n    if( fts5MultiIterEof(p, pIter) ) break;\n    iRowid = fts5MultiIterRowid(pIter);\n    if( pIter->bRev==0 && iRowid>=iMatch ) break;\n    if( pIter->bRev!=0 && iRowid<=iMatch ) break;\n  }\n}\n\n/*\n** Return a pointer to a buffer containing the term associated with the\n** entry that the iterator currently points to.\n*/\nstatic const u8 *fts5MultiIterTerm(Fts5Iter *pIter, int *pn){\n  Fts5SegIter *p = &pIter->aSeg[ pIter->aFirst[1].iFirst ];\n  *pn = p->term.n;\n  return p->term.p;\n}\n\n/*\n** Allocate a new segment-id for the structure pStruct. The new segment\n** id must be between 1 and 65335 inclusive, and must not be used by\n** any currently existing segment. If a free segment id cannot be found,\n** SQLITE_FULL is returned.\n**\n** If an error has already occurred, this function is a no-op. 0 is\n** returned in this case.\n*/\nstatic int fts5AllocateSegid(Fts5Index *p, Fts5Structure *pStruct){\n  int iSegid = 0;\n\n  if( p->rc==SQLITE_OK ){\n    if( pStruct->nSegment>=FTS5_MAX_SEGMENT ){\n      p->rc = SQLITE_FULL;\n    }else{\n      /* FTS5_MAX_SEGMENT is currently defined as 2000. So the following\n      ** array is 63 elements, or 252 bytes, in size.  */\n      u32 aUsed[(FTS5_MAX_SEGMENT+31) / 32];\n      int iLvl, iSeg;\n      int i;\n      u32 mask;\n      memset(aUsed, 0, sizeof(aUsed));\n      for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n        for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){\n          int iId = pStruct->aLevel[iLvl].aSeg[iSeg].iSegid;\n          if( iId<=FTS5_MAX_SEGMENT && iId>0 ){\n            aUsed[(iId-1) / 32] |= (u32)1 << ((iId-1) % 32);\n          }\n        }\n      }\n\n      for(i=0; aUsed[i]==0xFFFFFFFF; i++);\n      mask = aUsed[i];\n      for(iSegid=0; mask & ((u32)1 << iSegid); iSegid++);\n      iSegid += 1 + i*32;\n\n#ifdef SQLITE_DEBUG\n      for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n        for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){\n          assert_nc( iSegid!=pStruct->aLevel[iLvl].aSeg[iSeg].iSegid );\n        }\n      }\n      assert_nc( iSegid>0 && iSegid<=FTS5_MAX_SEGMENT );\n\n      {\n        sqlite3_stmt *pIdxSelect = fts5IdxSelectStmt(p);\n        if( p->rc==SQLITE_OK ){\n          u8 aBlob[2] = {0xff, 0xff};\n          sqlite3_bind_int(pIdxSelect, 1, iSegid);\n          sqlite3_bind_blob(pIdxSelect, 2, aBlob, 2, SQLITE_STATIC);\n          assert_nc( sqlite3_step(pIdxSelect)!=SQLITE_ROW );\n          p->rc = sqlite3_reset(pIdxSelect);\n          sqlite3_bind_null(pIdxSelect, 2);\n        }\n      }\n#endif\n    }\n  }\n\n  return iSegid;\n}\n\n/*\n** Discard all data currently cached in the hash-tables.\n*/\nstatic void fts5IndexDiscardData(Fts5Index *p){\n  assert( p->pHash || p->nPendingData==0 );\n  if( p->pHash ){\n    sqlite3Fts5HashClear(p->pHash);\n    p->nPendingData = 0;\n    p->nPendingRow = 0;\n    p->flushRc = SQLITE_OK;\n  }\n  p->nContentlessDelete = 0;\n}\n\n/*\n** Return the size of the prefix, in bytes, that buffer\n** (pNew/<length-unknown>) shares with buffer (pOld/nOld).\n**\n** Buffer (pNew/<length-unknown>) is guaranteed to be greater\n** than buffer (pOld/nOld).\n*/\nstatic int fts5PrefixCompress(int nOld, const u8 *pOld, const u8 *pNew){\n  int i;\n  for(i=0; i<nOld; i++){\n    if( pOld[i]!=pNew[i] ) break;\n  }\n  return i;\n}\n\nstatic void fts5WriteDlidxClear(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  int bFlush                      /* If true, write dlidx to disk */\n){\n  int i;\n  assert( bFlush==0 || (pWriter->nDlidx>0 && pWriter->aDlidx[0].buf.n>0) );\n  for(i=0; i<pWriter->nDlidx; i++){\n    Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[i];\n    if( pDlidx->buf.n==0 ) break;\n    if( bFlush ){\n      assert( pDlidx->pgno!=0 );\n      fts5DataWrite(p,\n          FTS5_DLIDX_ROWID(pWriter->iSegid, i, pDlidx->pgno),\n          pDlidx->buf.p, pDlidx->buf.n\n      );\n    }\n    sqlite3Fts5BufferZero(&pDlidx->buf);\n    pDlidx->bPrevValid = 0;\n  }\n}\n\n/*\n** Grow the pWriter->aDlidx[] array to at least nLvl elements in size.\n** Any new array elements are zeroed before returning.\n*/\nstatic int fts5WriteDlidxGrow(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  int nLvl\n){\n  if( p->rc==SQLITE_OK && nLvl>=pWriter->nDlidx ){\n    Fts5DlidxWriter *aDlidx = (Fts5DlidxWriter*)sqlite3_realloc64(\n        pWriter->aDlidx, sizeof(Fts5DlidxWriter) * nLvl\n    );\n    if( aDlidx==0 ){\n      p->rc = SQLITE_NOMEM;\n    }else{\n      size_t nByte = sizeof(Fts5DlidxWriter) * (nLvl - pWriter->nDlidx);\n      memset(&aDlidx[pWriter->nDlidx], 0, nByte);\n      pWriter->aDlidx = aDlidx;\n      pWriter->nDlidx = nLvl;\n    }\n  }\n  return p->rc;\n}\n\n/*\n** If the current doclist-index accumulating in pWriter->aDlidx[] is large\n** enough, flush it to disk and return 1. Otherwise discard it and return\n** zero.\n*/\nstatic int fts5WriteFlushDlidx(Fts5Index *p, Fts5SegWriter *pWriter){\n  int bFlag = 0;\n\n  /* If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written\n  ** to the database, also write the doclist-index to disk.  */\n  if( pWriter->aDlidx[0].buf.n>0 && pWriter->nEmpty>=FTS5_MIN_DLIDX_SIZE ){\n    bFlag = 1;\n  }\n  fts5WriteDlidxClear(p, pWriter, bFlag);\n  pWriter->nEmpty = 0;\n  return bFlag;\n}\n\n/*\n** This function is called whenever processing of the doclist for the\n** last term on leaf page (pWriter->iBtPage) is completed.\n**\n** The doclist-index for that term is currently stored in-memory within the\n** Fts5SegWriter.aDlidx[] array. If it is large enough, this function\n** writes it out to disk. Or, if it is too small to bother with, discards\n** it.\n**\n** Fts5SegWriter.btterm currently contains the first term on page iBtPage.\n*/\nstatic void fts5WriteFlushBtree(Fts5Index *p, Fts5SegWriter *pWriter){\n  int bFlag;\n\n  assert( pWriter->iBtPage || pWriter->nEmpty==0 );\n  if( pWriter->iBtPage==0 ) return;\n  bFlag = fts5WriteFlushDlidx(p, pWriter);\n\n  if( p->rc==SQLITE_OK ){\n    const char *z = (pWriter->btterm.n>0?(const char*)pWriter->btterm.p:\"\");\n    /* The following was already done in fts5WriteInit(): */\n    /* sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid); */\n    sqlite3_bind_blob(p->pIdxWriter, 2, z, pWriter->btterm.n, SQLITE_STATIC);\n    sqlite3_bind_int64(p->pIdxWriter, 3, bFlag + ((i64)pWriter->iBtPage<<1));\n    sqlite3_step(p->pIdxWriter);\n    p->rc = sqlite3_reset(p->pIdxWriter);\n    sqlite3_bind_null(p->pIdxWriter, 2);\n  }\n  pWriter->iBtPage = 0;\n}\n\n/*\n** This is called once for each leaf page except the first that contains\n** at least one term. Argument (nTerm/pTerm) is the split-key - a term that\n** is larger than all terms written to earlier leaves, and equal to or\n** smaller than the first term on the new leaf.\n**\n** If an error occurs, an error code is left in Fts5Index.rc. If an error\n** has already occurred when this function is called, it is a no-op.\n*/\nstatic void fts5WriteBtreeTerm(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegWriter *pWriter,         /* Writer object */\n  int nTerm, const u8 *pTerm      /* First term on new page */\n){\n  fts5WriteFlushBtree(p, pWriter);\n  if( p->rc==SQLITE_OK ){\n    fts5BufferSet(&p->rc, &pWriter->btterm, nTerm, pTerm);\n    pWriter->iBtPage = pWriter->writer.pgno;\n  }\n}\n\n/*\n** This function is called when flushing a leaf page that contains no\n** terms at all to disk.\n*/\nstatic void fts5WriteBtreeNoTerm(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5SegWriter *pWriter          /* Writer object */\n){\n  /* If there were no rowids on the leaf page either and the doclist-index\n  ** has already been started, append an 0x00 byte to it.  */\n  if( pWriter->bFirstRowidInPage && pWriter->aDlidx[0].buf.n>0 ){\n    Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[0];\n    assert( pDlidx->bPrevValid );\n    sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, 0);\n  }\n\n  /* Increment the \"number of sequential leaves without a term\" counter. */\n  pWriter->nEmpty++;\n}\n\nstatic i64 fts5DlidxExtractFirstRowid(Fts5Buffer *pBuf){\n  i64 iRowid;\n  int iOff;\n\n  iOff = 1 + fts5GetVarint(&pBuf->p[1], (u64*)&iRowid);\n  fts5GetVarint(&pBuf->p[iOff], (u64*)&iRowid);\n  return iRowid;\n}\n\n/*\n** Rowid iRowid has just been appended to the current leaf page. It is the\n** first on the page. This function appends an appropriate entry to the current\n** doclist-index.\n*/\nstatic void fts5WriteDlidxAppend(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  i64 iRowid\n){\n  int i;\n  int bDone = 0;\n\n  for(i=0; p->rc==SQLITE_OK && bDone==0; i++){\n    i64 iVal;\n    Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[i];\n\n    if( pDlidx->buf.n>=p->pConfig->pgsz ){\n      /* The current doclist-index page is full. Write it to disk and push\n      ** a copy of iRowid (which will become the first rowid on the next\n      ** doclist-index leaf page) up into the next level of the b-tree\n      ** hierarchy. If the node being flushed is currently the root node,\n      ** also push its first rowid upwards. */\n      pDlidx->buf.p[0] = 0x01;    /* Not the root node */\n      fts5DataWrite(p,\n          FTS5_DLIDX_ROWID(pWriter->iSegid, i, pDlidx->pgno),\n          pDlidx->buf.p, pDlidx->buf.n\n      );\n      fts5WriteDlidxGrow(p, pWriter, i+2);\n      pDlidx = &pWriter->aDlidx[i];\n      if( p->rc==SQLITE_OK && pDlidx[1].buf.n==0 ){\n        i64 iFirst = fts5DlidxExtractFirstRowid(&pDlidx->buf);\n\n        /* This was the root node. Push its first rowid up to the new root. */\n        pDlidx[1].pgno = pDlidx->pgno;\n        sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, 0);\n        sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, pDlidx->pgno);\n        sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, iFirst);\n        pDlidx[1].bPrevValid = 1;\n        pDlidx[1].iPrev = iFirst;\n      }\n\n      sqlite3Fts5BufferZero(&pDlidx->buf);\n      pDlidx->bPrevValid = 0;\n      pDlidx->pgno++;\n    }else{\n      bDone = 1;\n    }\n\n    if( pDlidx->bPrevValid ){\n      iVal = (u64)iRowid - (u64)pDlidx->iPrev;\n    }else{\n      i64 iPgno = (i==0 ? pWriter->writer.pgno : pDlidx[-1].pgno);\n      assert( pDlidx->buf.n==0 );\n      sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, !bDone);\n      sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iPgno);\n      iVal = iRowid;\n    }\n\n    sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iVal);\n    pDlidx->bPrevValid = 1;\n    pDlidx->iPrev = iRowid;\n  }\n}\n\nstatic void fts5WriteFlushLeaf(Fts5Index *p, Fts5SegWriter *pWriter){\n  static const u8 zero[] = { 0x00, 0x00, 0x00, 0x00 };\n  Fts5PageWriter *pPage = &pWriter->writer;\n  i64 iRowid;\n\n  assert( (pPage->pgidx.n==0)==(pWriter->bFirstTermInPage) );\n\n  /* Set the szLeaf header field. */\n  assert( 0==fts5GetU16(&pPage->buf.p[2]) );\n  fts5PutU16(&pPage->buf.p[2], (u16)pPage->buf.n);\n\n  if( pWriter->bFirstTermInPage ){\n    /* No term was written to this page. */\n    assert( pPage->pgidx.n==0 );\n    fts5WriteBtreeNoTerm(p, pWriter);\n  }else{\n    /* Append the pgidx to the page buffer. Set the szLeaf header field. */\n    fts5BufferAppendBlob(&p->rc, &pPage->buf, pPage->pgidx.n, pPage->pgidx.p);\n  }\n\n  /* Write the page out to disk */\n  iRowid = FTS5_SEGMENT_ROWID(pWriter->iSegid, pPage->pgno);\n  fts5DataWrite(p, iRowid, pPage->buf.p, pPage->buf.n);\n\n  /* Initialize the next page. */\n  fts5BufferZero(&pPage->buf);\n  fts5BufferZero(&pPage->pgidx);\n  fts5BufferAppendBlob(&p->rc, &pPage->buf, 4, zero);\n  pPage->iPrevPgidx = 0;\n  pPage->pgno++;\n\n  /* Increase the leaves written counter */\n  pWriter->nLeafWritten++;\n\n  /* The new leaf holds no terms or rowids */\n  pWriter->bFirstTermInPage = 1;\n  pWriter->bFirstRowidInPage = 1;\n}\n\n/*\n** Append term pTerm/nTerm to the segment being written by the writer passed\n** as the second argument.\n**\n** If an error occurs, set the Fts5Index.rc error code. If an error has\n** already occurred, this function is a no-op.\n*/\nstatic void fts5WriteAppendTerm(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  int nTerm, const u8 *pTerm\n){\n  int nPrefix;                    /* Bytes of prefix compression for term */\n  Fts5PageWriter *pPage = &pWriter->writer;\n  Fts5Buffer *pPgidx = &pWriter->writer.pgidx;\n  int nMin = MIN(pPage->term.n, nTerm);\n\n  assert( p->rc==SQLITE_OK );\n  assert( pPage->buf.n>=4 );\n  assert( pPage->buf.n>4 || pWriter->bFirstTermInPage );\n\n  /* If the current leaf page is full, flush it to disk. */\n  if( (pPage->buf.n + pPgidx->n + nTerm + 2)>=p->pConfig->pgsz ){\n    if( pPage->buf.n>4 ){\n      fts5WriteFlushLeaf(p, pWriter);\n      if( p->rc!=SQLITE_OK ) return;\n    }\n    fts5BufferGrow(&p->rc, &pPage->buf, nTerm+FTS5_DATA_PADDING);\n  }\n\n  /* TODO1: Updating pgidx here. */\n  pPgidx->n += sqlite3Fts5PutVarint(\n      &pPgidx->p[pPgidx->n], pPage->buf.n - pPage->iPrevPgidx\n  );\n  pPage->iPrevPgidx = pPage->buf.n;\n#if 0\n  fts5PutU16(&pPgidx->p[pPgidx->n], pPage->buf.n);\n  pPgidx->n += 2;\n#endif\n\n  if( pWriter->bFirstTermInPage ){\n    nPrefix = 0;\n    if( pPage->pgno!=1 ){\n      /* This is the first term on a leaf that is not the leftmost leaf in\n      ** the segment b-tree. In this case it is necessary to add a term to\n      ** the b-tree hierarchy that is (a) larger than the largest term\n      ** already written to the segment and (b) smaller than or equal to\n      ** this term. In other words, a prefix of (pTerm/nTerm) that is one\n      ** byte longer than the longest prefix (pTerm/nTerm) shares with the\n      ** previous term.\n      **\n      ** Usually, the previous term is available in pPage->term. The exception\n      ** is if this is the first term written in an incremental-merge step.\n      ** In this case the previous term is not available, so just write a\n      ** copy of (pTerm/nTerm) into the parent node. This is slightly\n      ** inefficient, but still correct.  */\n      int n = nTerm;\n      if( pPage->term.n ){\n        n = 1 + fts5PrefixCompress(nMin, pPage->term.p, pTerm);\n      }\n      fts5WriteBtreeTerm(p, pWriter, n, pTerm);\n      if( p->rc!=SQLITE_OK ) return;\n      pPage = &pWriter->writer;\n    }\n  }else{\n    nPrefix = fts5PrefixCompress(nMin, pPage->term.p, pTerm);\n    fts5BufferAppendVarint(&p->rc, &pPage->buf, nPrefix);\n  }\n\n  /* Append the number of bytes of new data, then the term data itself\n  ** to the page. */\n  fts5BufferAppendVarint(&p->rc, &pPage->buf, nTerm - nPrefix);\n  fts5BufferAppendBlob(&p->rc, &pPage->buf, nTerm - nPrefix, &pTerm[nPrefix]);\n\n  /* Update the Fts5PageWriter.term field. */\n  fts5BufferSet(&p->rc, &pPage->term, nTerm, pTerm);\n  pWriter->bFirstTermInPage = 0;\n\n  pWriter->bFirstRowidInPage = 0;\n  pWriter->bFirstRowidInDoclist = 1;\n\n  assert( p->rc || (pWriter->nDlidx>0 && pWriter->aDlidx[0].buf.n==0) );\n  pWriter->aDlidx[0].pgno = pPage->pgno;\n}\n\n/*\n** Append a rowid and position-list size field to the writers output.\n*/\nstatic void fts5WriteAppendRowid(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  i64 iRowid\n){\n  if( p->rc==SQLITE_OK ){\n    Fts5PageWriter *pPage = &pWriter->writer;\n\n    if( (pPage->buf.n + pPage->pgidx.n)>=p->pConfig->pgsz ){\n      fts5WriteFlushLeaf(p, pWriter);\n    }\n\n    /* If this is to be the first rowid written to the page, set the\n    ** rowid-pointer in the page-header. Also append a value to the dlidx\n    ** buffer, in case a doclist-index is required.  */\n    if( pWriter->bFirstRowidInPage ){\n      fts5PutU16(pPage->buf.p, (u16)pPage->buf.n);\n      fts5WriteDlidxAppend(p, pWriter, iRowid);\n    }\n\n    /* Write the rowid. */\n    if( pWriter->bFirstRowidInDoclist || pWriter->bFirstRowidInPage ){\n      fts5BufferAppendVarint(&p->rc, &pPage->buf, iRowid);\n    }else{\n      assert_nc( p->rc || iRowid>pWriter->iPrevRowid );\n      fts5BufferAppendVarint(&p->rc, &pPage->buf,\n          (u64)iRowid - (u64)pWriter->iPrevRowid\n      );\n    }\n    pWriter->iPrevRowid = iRowid;\n    pWriter->bFirstRowidInDoclist = 0;\n    pWriter->bFirstRowidInPage = 0;\n  }\n}\n\nstatic void fts5WriteAppendPoslistData(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  const u8 *aData,\n  int nData\n){\n  Fts5PageWriter *pPage = &pWriter->writer;\n  const u8 *a = aData;\n  int n = nData;\n\n  assert( p->pConfig->pgsz>0 || p->rc!=SQLITE_OK );\n  while( p->rc==SQLITE_OK\n     && (pPage->buf.n + pPage->pgidx.n + n)>=p->pConfig->pgsz\n  ){\n    int nReq = p->pConfig->pgsz - pPage->buf.n - pPage->pgidx.n;\n    int nCopy = 0;\n    while( nCopy<nReq ){\n      i64 dummy;\n      nCopy += fts5GetVarint(&a[nCopy], (u64*)&dummy);\n    }\n    fts5BufferAppendBlob(&p->rc, &pPage->buf, nCopy, a);\n    a += nCopy;\n    n -= nCopy;\n    fts5WriteFlushLeaf(p, pWriter);\n  }\n  if( n>0 ){\n    fts5BufferAppendBlob(&p->rc, &pPage->buf, n, a);\n  }\n}\n\n/*\n** Flush any data cached by the writer object to the database. Free any\n** allocations associated with the writer.\n*/\nstatic void fts5WriteFinish(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,         /* Writer object */\n  int *pnLeaf                     /* OUT: Number of leaf pages in b-tree */\n){\n  int i;\n  Fts5PageWriter *pLeaf = &pWriter->writer;\n  if( p->rc==SQLITE_OK ){\n    assert( pLeaf->pgno>=1 );\n    if( pLeaf->buf.n>4 ){\n      fts5WriteFlushLeaf(p, pWriter);\n    }\n    *pnLeaf = pLeaf->pgno-1;\n    if( pLeaf->pgno>1 ){\n      fts5WriteFlushBtree(p, pWriter);\n    }\n  }\n  fts5BufferFree(&pLeaf->term);\n  fts5BufferFree(&pLeaf->buf);\n  fts5BufferFree(&pLeaf->pgidx);\n  fts5BufferFree(&pWriter->btterm);\n\n  for(i=0; i<pWriter->nDlidx; i++){\n    sqlite3Fts5BufferFree(&pWriter->aDlidx[i].buf);\n  }\n  sqlite3_free(pWriter->aDlidx);\n}\n\nstatic void fts5WriteInit(\n  Fts5Index *p,\n  Fts5SegWriter *pWriter,\n  int iSegid\n){\n  const int nBuffer = p->pConfig->pgsz + FTS5_DATA_PADDING;\n\n  memset(pWriter, 0, sizeof(Fts5SegWriter));\n  pWriter->iSegid = iSegid;\n\n  fts5WriteDlidxGrow(p, pWriter, 1);\n  pWriter->writer.pgno = 1;\n  pWriter->bFirstTermInPage = 1;\n  pWriter->iBtPage = 1;\n\n  assert( pWriter->writer.buf.n==0 );\n  assert( pWriter->writer.pgidx.n==0 );\n\n  /* Grow the two buffers to pgsz + padding bytes in size. */\n  sqlite3Fts5BufferSize(&p->rc, &pWriter->writer.pgidx, nBuffer);\n  sqlite3Fts5BufferSize(&p->rc, &pWriter->writer.buf, nBuffer);\n\n  if( p->pIdxWriter==0 ){\n    Fts5Config *pConfig = p->pConfig;\n    fts5IndexPrepareStmt(p, &p->pIdxWriter, sqlite3_mprintf(\n          \"INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\",\n          pConfig->zDb, pConfig->zName\n    ));\n  }\n\n  if( p->rc==SQLITE_OK ){\n    /* Initialize the 4-byte leaf-page header to 0x00. */\n    memset(pWriter->writer.buf.p, 0, 4);\n    pWriter->writer.buf.n = 4;\n\n    /* Bind the current output segment id to the index-writer. This is an\n    ** optimization over binding the same value over and over as rows are\n    ** inserted into %_idx by the current writer.  */\n    sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid);\n  }\n}\n\n/*\n** Iterator pIter was used to iterate through the input segments of on an\n** incremental merge operation. This function is called if the incremental\n** merge step has finished but the input has not been completely exhausted.\n*/\nstatic void fts5TrimSegments(Fts5Index *p, Fts5Iter *pIter){\n  int i;\n  Fts5Buffer buf;\n  memset(&buf, 0, sizeof(Fts5Buffer));\n  for(i=0; i<pIter->nSeg && p->rc==SQLITE_OK; i++){\n    Fts5SegIter *pSeg = &pIter->aSeg[i];\n    if( pSeg->pSeg==0 ){\n      /* no-op */\n    }else if( pSeg->pLeaf==0 ){\n      /* All keys from this input segment have been transfered to the output.\n      ** Set both the first and last page-numbers to 0 to indicate that the\n      ** segment is now empty. */\n      pSeg->pSeg->pgnoLast = 0;\n      pSeg->pSeg->pgnoFirst = 0;\n    }else{\n      int iOff = pSeg->iTermLeafOffset;     /* Offset on new first leaf page */\n      i64 iLeafRowid;\n      Fts5Data *pData;\n      int iId = pSeg->pSeg->iSegid;\n      u8 aHdr[4] = {0x00, 0x00, 0x00, 0x00};\n\n      iLeafRowid = FTS5_SEGMENT_ROWID(iId, pSeg->iTermLeafPgno);\n      pData = fts5LeafRead(p, iLeafRowid);\n      if( pData ){\n        if( iOff>pData->szLeaf ){\n          /* This can occur if the pages that the segments occupy overlap - if\n          ** a single page has been assigned to more than one segment. In\n          ** this case a prior iteration of this loop may have corrupted the\n          ** segment currently being trimmed.  */\n          FTS5_CORRUPT_ROWID(p, iLeafRowid);\n        }else{\n          fts5BufferZero(&buf);\n          fts5BufferGrow(&p->rc, &buf, pData->nn);\n          fts5BufferAppendBlob(&p->rc, &buf, sizeof(aHdr), aHdr);\n          fts5BufferAppendVarint(&p->rc, &buf, pSeg->term.n);\n          fts5BufferAppendBlob(&p->rc, &buf, pSeg->term.n, pSeg->term.p);\n          fts5BufferAppendBlob(&p->rc, &buf,pData->szLeaf-iOff,&pData->p[iOff]);\n          if( p->rc==SQLITE_OK ){\n            /* Set the szLeaf field */\n            fts5PutU16(&buf.p[2], (u16)buf.n);\n          }\n\n          /* Set up the new page-index array */\n          fts5BufferAppendVarint(&p->rc, &buf, 4);\n          if( pSeg->iLeafPgno==pSeg->iTermLeafPgno\n           && pSeg->iEndofDoclist<pData->szLeaf\n           && pSeg->iPgidxOff<=pData->nn\n          ){\n            int nDiff = pData->szLeaf - pSeg->iEndofDoclist;\n            fts5BufferAppendVarint(&p->rc, &buf, buf.n - 1 - nDiff - 4);\n            fts5BufferAppendBlob(&p->rc, &buf,\n                pData->nn - pSeg->iPgidxOff, &pData->p[pSeg->iPgidxOff]\n            );\n          }\n\n          pSeg->pSeg->pgnoFirst = pSeg->iTermLeafPgno;\n          fts5DataDelete(p, FTS5_SEGMENT_ROWID(iId, 1), iLeafRowid);\n          fts5DataWrite(p, iLeafRowid, buf.p, buf.n);\n        }\n        fts5DataRelease(pData);\n      }\n    }\n  }\n  fts5BufferFree(&buf);\n}\n\nstatic void fts5MergeChunkCallback(\n  Fts5Index *p,\n  void *pCtx,\n  const u8 *pChunk, int nChunk\n){\n  Fts5SegWriter *pWriter = (Fts5SegWriter*)pCtx;\n  fts5WriteAppendPoslistData(p, pWriter, pChunk, nChunk);\n}\n\n/*\n**\n*/\nstatic void fts5IndexMergeLevel(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Structure **ppStruct,       /* IN/OUT: Stucture of index */\n  int iLvl,                       /* Level to read input from */\n  int *pnRem                      /* Write up to this many output leaves */\n){\n  Fts5Structure *pStruct = *ppStruct;\n  Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];\n  Fts5StructureLevel *pLvlOut;\n  Fts5Iter *pIter = 0;       /* Iterator to read input data */\n  int nRem = pnRem ? *pnRem : 0;  /* Output leaf pages left to write */\n  int nInput;                     /* Number of input segments */\n  Fts5SegWriter writer;           /* Writer object */\n  Fts5StructureSegment *pSeg;     /* Output segment */\n  Fts5Buffer term;\n  int bOldest;                    /* True if the output segment is the oldest */\n  int eDetail = p->pConfig->eDetail;\n  const int flags = FTS5INDEX_QUERY_NOOUTPUT;\n  int bTermWritten = 0;           /* True if current term already output */\n\n  assert( iLvl<pStruct->nLevel );\n  assert( pLvl->nMerge<=pLvl->nSeg );\n\n  memset(&writer, 0, sizeof(Fts5SegWriter));\n  memset(&term, 0, sizeof(Fts5Buffer));\n  if( pLvl->nMerge ){\n    pLvlOut = &pStruct->aLevel[iLvl+1];\n    assert( pLvlOut->nSeg>0 );\n    nInput = pLvl->nMerge;\n    pSeg = &pLvlOut->aSeg[pLvlOut->nSeg-1];\n\n    fts5WriteInit(p, &writer, pSeg->iSegid);\n    writer.writer.pgno = pSeg->pgnoLast+1;\n    writer.iBtPage = 0;\n  }else{\n    int iSegid = fts5AllocateSegid(p, pStruct);\n\n    /* Extend the Fts5Structure object as required to ensure the output\n    ** segment exists. */\n    if( iLvl==pStruct->nLevel-1 ){\n      fts5StructureAddLevel(&p->rc, ppStruct);\n      pStruct = *ppStruct;\n    }\n    fts5StructureExtendLevel(&p->rc, pStruct, iLvl+1, 1, 0);\n    if( p->rc ) return;\n    pLvl = &pStruct->aLevel[iLvl];\n    pLvlOut = &pStruct->aLevel[iLvl+1];\n\n    fts5WriteInit(p, &writer, iSegid);\n\n    /* Add the new segment to the output level */\n    pSeg = &pLvlOut->aSeg[pLvlOut->nSeg];\n    pLvlOut->nSeg++;\n    pSeg->pgnoFirst = 1;\n    pSeg->iSegid = iSegid;\n    pStruct->nSegment++;\n\n    /* Read input from all segments in the input level */\n    nInput = pLvl->nSeg;\n\n    /* Set the range of origins that will go into the output segment. */\n    if( pStruct->nOriginCntr>0 ){\n      pSeg->iOrigin1 = pLvl->aSeg[0].iOrigin1;\n      pSeg->iOrigin2 = pLvl->aSeg[pLvl->nSeg-1].iOrigin2;\n    }\n  }\n  bOldest = (pLvlOut->nSeg==1 && pStruct->nLevel==iLvl+2);\n\n  assert( iLvl>=0 );\n  for(fts5MultiIterNew(p, pStruct, flags, 0, 0, 0, iLvl, nInput, &pIter);\n      fts5MultiIterEof(p, pIter)==0;\n      fts5MultiIterNext(p, pIter, 0, 0)\n  ){\n    Fts5SegIter *pSegIter = &pIter->aSeg[ pIter->aFirst[1].iFirst ];\n    int nPos;                     /* position-list size field value */\n    int nTerm;\n    const u8 *pTerm;\n\n    pTerm = fts5MultiIterTerm(pIter, &nTerm);\n    if( nTerm!=term.n || fts5Memcmp(pTerm, term.p, nTerm) ){\n      if( pnRem && writer.nLeafWritten>nRem ){\n        break;\n      }\n      fts5BufferSet(&p->rc, &term, nTerm, pTerm);\n      bTermWritten =0;\n    }\n\n    /* Check for key annihilation. */\n    if( pSegIter->nPos==0 && (bOldest || pSegIter->bDel==0) ) continue;\n\n    if( p->rc==SQLITE_OK && bTermWritten==0 ){\n      /* This is a new term. Append a term to the output segment. */\n      fts5WriteAppendTerm(p, &writer, nTerm, pTerm);\n      bTermWritten = 1;\n    }\n\n    /* Append the rowid to the output */\n    /* WRITEPOSLISTSIZE */\n    fts5WriteAppendRowid(p, &writer, fts5MultiIterRowid(pIter));\n\n    if( eDetail==FTS5_DETAIL_NONE ){\n      if( pSegIter->bDel ){\n        fts5BufferAppendVarint(&p->rc, &writer.writer.buf, 0);\n        if( pSegIter->nPos>0 ){\n          fts5BufferAppendVarint(&p->rc, &writer.writer.buf, 0);\n        }\n      }\n    }else{\n      /* Append the position-list data to the output */\n      nPos = pSegIter->nPos*2 + pSegIter->bDel;\n      fts5BufferAppendVarint(&p->rc, &writer.writer.buf, nPos);\n      fts5ChunkIterate(p, pSegIter, (void*)&writer, fts5MergeChunkCallback);\n    }\n  }\n\n  /* Flush the last leaf page to disk. Set the output segment b-tree height\n  ** and last leaf page number at the same time.  */\n  fts5WriteFinish(p, &writer, &pSeg->pgnoLast);\n\n  assert( pIter!=0 || p->rc!=SQLITE_OK );\n  if( fts5MultiIterEof(p, pIter) ){\n    int i;\n\n    /* Remove the redundant segments from the %_data table */\n    assert( pSeg->nEntry==0 );\n    for(i=0; i<nInput; i++){\n      Fts5StructureSegment *pOld = &pLvl->aSeg[i];\n      pSeg->nEntry += (pOld->nEntry - pOld->nEntryTombstone);\n      fts5DataRemoveSegment(p, pOld);\n    }\n\n    /* Remove the redundant segments from the input level */\n    if( pLvl->nSeg!=nInput ){\n      int nMove = (pLvl->nSeg - nInput) * sizeof(Fts5StructureSegment);\n      memmove(pLvl->aSeg, &pLvl->aSeg[nInput], nMove);\n    }\n    pStruct->nSegment -= nInput;\n    pLvl->nSeg -= nInput;\n    pLvl->nMerge = 0;\n    if( pSeg->pgnoLast==0 ){\n      pLvlOut->nSeg--;\n      pStruct->nSegment--;\n    }\n  }else{\n    assert( pSeg->pgnoLast>0 );\n    fts5TrimSegments(p, pIter);\n    pLvl->nMerge = nInput;\n  }\n\n  fts5MultiIterFree(pIter);\n  fts5BufferFree(&term);\n  if( pnRem ) *pnRem -= writer.nLeafWritten;\n}\n\n/*\n** If this is not a contentless_delete=1 table, or if the 'deletemerge'\n** configuration option is set to 0, then this function always returns -1.\n** Otherwise, it searches the structure object passed as the second argument\n** for a level suitable for merging due to having a large number of\n** tombstones in the tombstone hash. If one is found, its index is returned.\n** Otherwise, if there is no suitable level, -1.\n*/\nstatic int fts5IndexFindDeleteMerge(Fts5Index *p, Fts5Structure *pStruct){\n  Fts5Config *pConfig = p->pConfig;\n  int iRet = -1;\n  if( pConfig->bContentlessDelete && pConfig->nDeleteMerge>0 ){\n    int ii;\n    int nBest = 0;\n\n    for(ii=0; ii<pStruct->nLevel; ii++){\n      Fts5StructureLevel *pLvl = &pStruct->aLevel[ii];\n      i64 nEntry = 0;\n      i64 nTomb = 0;\n      int iSeg;\n      for(iSeg=0; iSeg<pLvl->nSeg; iSeg++){\n        nEntry += pLvl->aSeg[iSeg].nEntry;\n        nTomb += pLvl->aSeg[iSeg].nEntryTombstone;\n      }\n      assert_nc( nEntry>0 || pLvl->nSeg==0 );\n      if( nEntry>0 ){\n        int nPercent = (nTomb * 100) / nEntry;\n        if( nPercent>=pConfig->nDeleteMerge && nPercent>nBest ){\n          iRet = ii;\n          nBest = nPercent;\n        }\n      }\n\n      /* If pLvl is already the input level to an ongoing merge, look no\n      ** further for a merge candidate. The caller should be allowed to\n      ** continue merging from pLvl first.  */\n      if( pLvl->nMerge ) break;\n    }\n  }\n  return iRet;\n}\n\n/*\n** Do up to nPg pages of automerge work on the index.\n**\n** Return true if any changes were actually made, or false otherwise.\n*/\nstatic int fts5IndexMerge(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Structure **ppStruct,       /* IN/OUT: Current structure of index */\n  int nPg,                        /* Pages of work to do */\n  int nMin                        /* Minimum number of segments to merge */\n){\n  int nRem = nPg;\n  int bRet = 0;\n  Fts5Structure *pStruct = *ppStruct;\n  while( nRem>0 && p->rc==SQLITE_OK ){\n    int iLvl;                   /* To iterate through levels */\n    int iBestLvl = 0;           /* Level offering the most input segments */\n    int nBest = 0;              /* Number of input segments on best level */\n\n    /* Set iBestLvl to the level to read input segments from. Or to -1 if\n    ** there is no level suitable to merge segments from.  */\n    assert( pStruct->nLevel>0 );\n    for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n      Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];\n      if( pLvl->nMerge ){\n        if( pLvl->nMerge>nBest ){\n          iBestLvl = iLvl;\n          nBest = nMin;\n        }\n        break;\n      }\n      if( pLvl->nSeg>nBest ){\n        nBest = pLvl->nSeg;\n        iBestLvl = iLvl;\n      }\n    }\n    if( nBest<nMin ){\n      iBestLvl = fts5IndexFindDeleteMerge(p, pStruct);\n    }\n\n    if( iBestLvl<0 ) break;\n    bRet = 1;\n    fts5IndexMergeLevel(p, &pStruct, iBestLvl, &nRem);\n    if( p->rc==SQLITE_OK && pStruct->aLevel[iBestLvl].nMerge==0 ){\n      fts5StructurePromote(p, iBestLvl+1, pStruct);\n    }\n\n    if( nMin==1 ) nMin = 2;\n  }\n  *ppStruct = pStruct;\n  return bRet;\n}\n\n/*\n** A total of nLeaf leaf pages of data has just been flushed to a level-0\n** segment. This function updates the write-counter accordingly and, if\n** necessary, performs incremental merge work.\n**\n** If an error occurs, set the Fts5Index.rc error code. If an error has\n** already occurred, this function is a no-op.\n*/\nstatic void fts5IndexAutomerge(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Structure **ppStruct,       /* IN/OUT: Current structure of index */\n  int nLeaf                       /* Number of output leaves just written */\n){\n  if( p->rc==SQLITE_OK && p->pConfig->nAutomerge>0 && ALWAYS((*ppStruct)!=0) ){\n    Fts5Structure *pStruct = *ppStruct;\n    u64 nWrite;                   /* Initial value of write-counter */\n    int nWork;                    /* Number of work-quanta to perform */\n    int nRem;                     /* Number of leaf pages left to write */\n\n    /* Update the write-counter. While doing so, set nWork. */\n    nWrite = pStruct->nWriteCounter;\n    nWork = (int)(((nWrite + nLeaf) / p->nWorkUnit) - (nWrite / p->nWorkUnit));\n    pStruct->nWriteCounter += nLeaf;\n    nRem = (int)(p->nWorkUnit * nWork * pStruct->nLevel);\n\n    fts5IndexMerge(p, ppStruct, nRem, p->pConfig->nAutomerge);\n  }\n}\n\nstatic void fts5IndexCrisismerge(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Structure **ppStruct        /* IN/OUT: Current structure of index */\n){\n  const int nCrisis = p->pConfig->nCrisisMerge;\n  Fts5Structure *pStruct = *ppStruct;\n  if( pStruct && pStruct->nLevel>0 ){\n    int iLvl = 0;\n    while( p->rc==SQLITE_OK && pStruct->aLevel[iLvl].nSeg>=nCrisis ){\n      fts5IndexMergeLevel(p, &pStruct, iLvl, 0);\n      assert( p->rc!=SQLITE_OK || pStruct->nLevel>(iLvl+1) );\n      fts5StructurePromote(p, iLvl+1, pStruct);\n      iLvl++;\n    }\n    *ppStruct = pStruct;\n  }\n}\n\nstatic int fts5IndexReturn(Fts5Index *p){\n  int rc = p->rc;\n  p->rc = SQLITE_OK;\n  return rc;\n}\n\n/*\n** Close the read-only blob handle, if it is open.\n*/\nstatic void sqlite3Fts5IndexCloseReader(Fts5Index *p){\n  fts5IndexCloseReader(p);\n  fts5IndexReturn(p);\n}\n\ntypedef struct Fts5FlushCtx Fts5FlushCtx;\nstruct Fts5FlushCtx {\n  Fts5Index *pIdx;\n  Fts5SegWriter writer;\n};\n\n/*\n** Buffer aBuf[] contains a list of varints, all small enough to fit\n** in a 32-bit integer. Return the size of the largest prefix of this\n** list nMax bytes or less in size.\n*/\nstatic int fts5PoslistPrefix(const u8 *aBuf, int nMax){\n  int ret;\n  u32 dummy;\n  ret = fts5GetVarint32(aBuf, dummy);\n  if( ret<nMax ){\n    while( 1 ){\n      int i = fts5GetVarint32(&aBuf[ret], dummy);\n      if( (ret + i) > nMax ) break;\n      ret += i;\n    }\n  }\n  return ret;\n}\n\n/*\n** Execute the SQL statement:\n**\n**    DELETE FROM %_idx WHERE (segid, (pgno/2)) = ($iSegid, $iPgno);\n**\n** This is used when a secure-delete operation removes the last term\n** from a segment leaf page. In that case the %_idx entry is removed\n** too. This is done to ensure that if all instances of a token are\n** removed from an fts5 database in secure-delete mode, no trace of\n** the token itself remains in the database.\n*/\nstatic void fts5SecureDeleteIdxEntry(\n  Fts5Index *p,                   /* FTS5 backend object */\n  int iSegid,                     /* Id of segment to delete entry for */\n  int iPgno                       /* Page number within segment */\n){\n  if( iPgno!=1 ){\n    assert( p->pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE );\n    if( p->pDeleteFromIdx==0 ){\n      fts5IndexPrepareStmt(p, &p->pDeleteFromIdx, sqlite3_mprintf(\n          \"DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)\",\n          p->pConfig->zDb, p->pConfig->zName\n      ));\n    }\n    if( p->rc==SQLITE_OK ){\n      sqlite3_bind_int(p->pDeleteFromIdx, 1, iSegid);\n      sqlite3_bind_int(p->pDeleteFromIdx, 2, iPgno);\n      sqlite3_step(p->pDeleteFromIdx);\n      p->rc = sqlite3_reset(p->pDeleteFromIdx);\n    }\n  }\n}\n\n/*\n** This is called when a secure-delete operation removes a position-list\n** that overflows onto segment page iPgno of segment pSeg. This function\n** rewrites node iPgno, and possibly one or more of its right-hand peers,\n** to remove this portion of the position list.\n**\n** Output variable (*pbLastInDoclist) is set to true if the position-list\n** removed is followed by a new term or the end-of-segment, or false if\n** it is followed by another rowid/position list.\n*/\nstatic void fts5SecureDeleteOverflow(\n  Fts5Index *p,\n  Fts5StructureSegment *pSeg,\n  int iPgno,\n  int *pbLastInDoclist\n){\n  const int bDetailNone = (p->pConfig->eDetail==FTS5_DETAIL_NONE);\n  int pgno;\n  Fts5Data *pLeaf = 0;\n  assert( iPgno!=1 );\n\n  *pbLastInDoclist = 1;\n  for(pgno=iPgno; p->rc==SQLITE_OK && pgno<=pSeg->pgnoLast; pgno++){\n    i64 iRowid = FTS5_SEGMENT_ROWID(pSeg->iSegid, pgno);\n    int iNext = 0;\n    u8 *aPg = 0;\n\n    pLeaf = fts5DataRead(p, iRowid);\n    if( pLeaf==0 ) break;\n    aPg = pLeaf->p;\n\n    iNext = fts5GetU16(&aPg[0]);\n    if( iNext!=0 ){\n      *pbLastInDoclist = 0;\n    }\n    if( iNext==0 && pLeaf->szLeaf!=pLeaf->nn ){\n      fts5GetVarint32(&aPg[pLeaf->szLeaf], iNext);\n    }\n\n    if( iNext==0 ){\n      /* The page contains no terms or rowids. Replace it with an empty\n      ** page and move on to the right-hand peer.  */\n      const u8 aEmpty[] = {0x00, 0x00, 0x00, 0x04};\n      assert_nc( bDetailNone==0 || pLeaf->nn==4 );\n      if( bDetailNone==0 ) fts5DataWrite(p, iRowid, aEmpty, sizeof(aEmpty));\n      fts5DataRelease(pLeaf);\n      pLeaf = 0;\n    }else if( bDetailNone ){\n      break;\n    }else if( iNext>=pLeaf->szLeaf || pLeaf->nn<pLeaf->szLeaf || iNext<4 ){\n      FTS5_CORRUPT_ROWID(p, iRowid);\n      break;\n    }else{\n      int nShift = iNext - 4;\n      int nPg;\n\n      int nIdx = 0;\n      u8 *aIdx = 0;\n\n      /* Unless the current page footer is 0 bytes in size (in which case\n      ** the new page footer will be as well), allocate and populate a\n      ** buffer containing the new page footer. Set stack variables aIdx\n      ** and nIdx accordingly.  */\n      if( pLeaf->nn>pLeaf->szLeaf ){\n        int iFirst = 0;\n        int i1 = pLeaf->szLeaf;\n        int i2 = 0;\n\n        i1 += fts5GetVarint32(&aPg[i1], iFirst);\n        if( iFirst<iNext ){\n          FTS5_CORRUPT_ROWID(p, iRowid);\n          break;\n        }\n        aIdx = sqlite3Fts5MallocZero(&p->rc, (pLeaf->nn-pLeaf->szLeaf)+2);\n        if( aIdx==0 ) break;\n        i2 = sqlite3Fts5PutVarint(aIdx, iFirst-nShift);\n        if( i1<pLeaf->nn ){\n          memcpy(&aIdx[i2], &aPg[i1], pLeaf->nn-i1);\n          i2 += (pLeaf->nn-i1);\n        }\n        nIdx = i2;\n      }\n\n      /* Modify the contents of buffer aPg[]. Set nPg to the new size\n      ** in bytes. The new page is always smaller than the old.  */\n      nPg = pLeaf->szLeaf - nShift;\n      memmove(&aPg[4], &aPg[4+nShift], nPg-4);\n      fts5PutU16(&aPg[2], nPg);\n      if( fts5GetU16(&aPg[0]) ) fts5PutU16(&aPg[0], 4);\n      if( nIdx>0 ){\n        memcpy(&aPg[nPg], aIdx, nIdx);\n        nPg += nIdx;\n      }\n      sqlite3_free(aIdx);\n\n      /* Write the new page to disk and exit the loop */\n      assert( nPg>4 || fts5GetU16(aPg)==0 );\n      fts5DataWrite(p, iRowid, aPg, nPg);\n      break;\n    }\n  }\n  fts5DataRelease(pLeaf);\n}\n\n/*\n** Completely remove the entry that pSeg currently points to from\n** the database.\n*/\nstatic void fts5DoSecureDelete(\n  Fts5Index *p,\n  Fts5SegIter *pSeg\n){\n  const int bDetailNone = (p->pConfig->eDetail==FTS5_DETAIL_NONE);\n  int iSegid = pSeg->pSeg->iSegid;\n  u8 *aPg = pSeg->pLeaf->p;\n  int nPg = pSeg->pLeaf->nn;\n  int iPgIdx = pSeg->pLeaf->szLeaf;\n\n  u64 iDelta = 0;\n  int iNextOff = 0;\n  int iOff = 0;\n  int nIdx = 0;\n  u8 *aIdx = 0;\n  int bLastInDoclist = 0;\n  int iIdx = 0;\n  int iStart = 0;\n  int iDelKeyOff = 0;       /* Offset of deleted key, if any */\n\n  nIdx = nPg-iPgIdx;\n  aIdx = sqlite3Fts5MallocZero(&p->rc, ((i64)nIdx)+16);\n  if( p->rc ) return;\n  memcpy(aIdx, &aPg[iPgIdx], nIdx);\n\n  /* At this point segment iterator pSeg points to the entry\n  ** this function should remove from the b-tree segment.\n  **\n  ** In detail=full or detail=column mode, pSeg->iLeafOffset is the\n  ** offset of the first byte in the position-list for the entry to\n  ** remove. Immediately before this comes two varints that will also\n  ** need to be removed:\n  **\n  **     + the rowid or delta rowid value for the entry, and\n  **     + the size of the position list in bytes.\n  **\n  ** Or, in detail=none mode, there is a single varint prior to\n  ** pSeg->iLeafOffset - the rowid or delta rowid value.\n  **\n  ** This block sets the following variables:\n  **\n  **   iStart:\n  **     The offset of the first byte of the rowid or delta-rowid\n  **     value for the doclist entry being removed.\n  **\n  **   iDelta:\n  **     The value of the rowid or delta-rowid value for the doclist\n  **     entry being removed.\n  **\n  **   iNextOff:\n  **     The offset of the next entry following the position list\n  **     for the one being removed. If the position list for this\n  **     entry overflows onto the next leaf page, this value will be\n  **     greater than pLeaf->szLeaf.\n  */\n  {\n    int iSOP;                     /* Start-Of-Position-list */\n    if( pSeg->iLeafPgno==pSeg->iTermLeafPgno ){\n      iStart = pSeg->iTermLeafOffset;\n    }else{\n      iStart = fts5GetU16(&aPg[0]);\n    }\n\n    iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta);\n    assert_nc( iSOP<=pSeg->iLeafOffset );\n\n    if( bDetailNone ){\n      while( iSOP<pSeg->iLeafOffset ){\n        if( aPg[iSOP]==0x00 ) iSOP++;\n        if( aPg[iSOP]==0x00 ) iSOP++;\n        iStart = iSOP;\n        iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta);\n      }\n\n      iNextOff = iSOP;\n      if( iNextOff<pSeg->iEndofDoclist && aPg[iNextOff]==0x00 ) iNextOff++;\n      if( iNextOff<pSeg->iEndofDoclist && aPg[iNextOff]==0x00 ) iNextOff++;\n\n    }else{\n      int nPos = 0;\n      iSOP += fts5GetVarint32(&aPg[iSOP], nPos);\n      while( iSOP<pSeg->iLeafOffset ){\n        iStart = iSOP + (nPos/2);\n        iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta);\n        iSOP += fts5GetVarint32(&aPg[iSOP], nPos);\n      }\n      assert_nc( iSOP==pSeg->iLeafOffset );\n      iNextOff = pSeg->iLeafOffset + pSeg->nPos;\n    }\n  }\n\n  iOff = iStart;\n\n  /* If the position-list for the entry being removed flows over past\n  ** the end of this page, delete the portion of the position-list on the\n  ** next page and beyond.\n  **\n  ** Set variable bLastInDoclist to true if this entry happens\n  ** to be the last rowid in the doclist for its term.  */\n  if( iNextOff>=iPgIdx ){\n    int pgno = pSeg->iLeafPgno+1;\n    fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist);\n    iNextOff = iPgIdx;\n  }\n\n  if( pSeg->bDel==0 ){\n    if( iNextOff!=iPgIdx ){\n      /* Loop through the page-footer. If iNextOff (offset of the\n      ** entry following the one we are removing) is equal to the\n      ** offset of a key on this page, then the entry is the last\n      ** in its doclist. */\n      int iKeyOff = 0;\n      for(iIdx=0; iIdx<nIdx; /* no-op */){\n        u32 iVal = 0;\n        iIdx += fts5GetVarint32(&aIdx[iIdx], iVal);\n        iKeyOff += iVal;\n        if( iKeyOff==iNextOff ){\n          bLastInDoclist = 1;\n        }\n      }\n    }\n\n    /* If this is (a) the first rowid on a page and (b) is not followed by\n    ** another position list on the same page, set the \"first-rowid\" field\n    ** of the header to 0.  */\n    if( fts5GetU16(&aPg[0])==iStart && (bLastInDoclist || iNextOff==iPgIdx) ){\n      fts5PutU16(&aPg[0], 0);\n    }\n  }\n\n  if( pSeg->bDel ){\n    iOff += sqlite3Fts5PutVarint(&aPg[iOff], iDelta);\n    aPg[iOff++] = 0x01;\n  }else if( bLastInDoclist==0 ){\n    if( iNextOff!=iPgIdx ){\n      u64 iNextDelta = 0;\n      iNextOff += fts5GetVarint(&aPg[iNextOff], &iNextDelta);\n      iOff += sqlite3Fts5PutVarint(&aPg[iOff], iDelta + iNextDelta);\n    }\n  }else if(\n      pSeg->iLeafPgno==pSeg->iTermLeafPgno\n   && iStart==pSeg->iTermLeafOffset\n  ){\n    /* The entry being removed was the only position list in its\n    ** doclist. Therefore the term needs to be removed as well. */\n    int iKey = 0;\n    int iKeyOff = 0;\n\n    /* Set iKeyOff to the offset of the term that will be removed - the\n    ** last offset in the footer that is not greater than iStart. */\n    for(iIdx=0; iIdx<nIdx; iKey++){\n      u32 iVal = 0;\n      iIdx += fts5GetVarint32(&aIdx[iIdx], iVal);\n      if( (iKeyOff+iVal)>(u32)iStart ) break;\n      iKeyOff += iVal;\n    }\n    assert_nc( iKey>=1 );\n\n    /* Set iDelKeyOff to the value of the footer entry to remove from\n    ** the page. */\n    iDelKeyOff = iOff = iKeyOff;\n\n    if( iNextOff!=iPgIdx ){\n      /* This is the only position-list associated with the term, and there\n      ** is another term following it on this page. So the subsequent term\n      ** needs to be moved to replace the term associated with the entry\n      ** being removed. */\n      int nPrefix = 0;\n      int nSuffix = 0;\n      int nPrefix2 = 0;\n      int nSuffix2 = 0;\n\n      iDelKeyOff = iNextOff;\n      iNextOff += fts5GetVarint32(&aPg[iNextOff], nPrefix2);\n      iNextOff += fts5GetVarint32(&aPg[iNextOff], nSuffix2);\n\n      if( iKey!=1 ){\n        iKeyOff += fts5GetVarint32(&aPg[iKeyOff], nPrefix);\n      }\n      iKeyOff += fts5GetVarint32(&aPg[iKeyOff], nSuffix);\n\n      nPrefix = MIN(nPrefix, nPrefix2);\n      nSuffix = (nPrefix2 + nSuffix2) - nPrefix;\n\n      if( (iKeyOff+nSuffix)>iPgIdx || (iNextOff+nSuffix2)>iPgIdx ){\n        FTS5_CORRUPT_IDX(p);\n      }else{\n        if( iKey!=1 ){\n          iOff += sqlite3Fts5PutVarint(&aPg[iOff], nPrefix);\n        }\n        iOff += sqlite3Fts5PutVarint(&aPg[iOff], nSuffix);\n        if( nPrefix2>pSeg->term.n ){\n          FTS5_CORRUPT_IDX(p);\n        }else if( nPrefix2>nPrefix ){\n          memcpy(&aPg[iOff], &pSeg->term.p[nPrefix], nPrefix2-nPrefix);\n          iOff += (nPrefix2-nPrefix);\n        }\n        memmove(&aPg[iOff], &aPg[iNextOff], nSuffix2);\n        iOff += nSuffix2;\n        iNextOff += nSuffix2;\n      }\n    }\n  }else if( iStart==4 ){\n    int iPgno;\n\n    assert_nc( pSeg->iLeafPgno>pSeg->iTermLeafPgno );\n    /* The entry being removed may be the only position list in\n    ** its doclist. */\n    for(iPgno=pSeg->iLeafPgno-1; iPgno>pSeg->iTermLeafPgno; iPgno-- ){\n      Fts5Data *pPg = fts5DataRead(p, FTS5_SEGMENT_ROWID(iSegid, iPgno));\n      int bEmpty = (pPg && pPg->nn==4);\n      fts5DataRelease(pPg);\n      if( bEmpty==0 ) break;\n    }\n\n    if( iPgno==pSeg->iTermLeafPgno ){\n      i64 iId = FTS5_SEGMENT_ROWID(iSegid, pSeg->iTermLeafPgno);\n      Fts5Data *pTerm = fts5DataRead(p, iId);\n      if( pTerm && pTerm->szLeaf==pSeg->iTermLeafOffset ){\n        u8 *aTermIdx = &pTerm->p[pTerm->szLeaf];\n        int nTermIdx = pTerm->nn - pTerm->szLeaf;\n        int iTermIdx = 0;\n        int iTermOff = 0;\n\n        while( 1 ){\n          u32 iVal = 0;\n          int nByte = fts5GetVarint32(&aTermIdx[iTermIdx], iVal);\n          iTermOff += iVal;\n          if( (iTermIdx+nByte)>=nTermIdx ) break;\n          iTermIdx += nByte;\n        }\n        nTermIdx = iTermIdx;\n\n        memmove(&pTerm->p[iTermOff], &pTerm->p[pTerm->szLeaf], nTermIdx);\n        fts5PutU16(&pTerm->p[2], iTermOff);\n\n        fts5DataWrite(p, iId, pTerm->p, iTermOff+nTermIdx);\n        if( nTermIdx==0 ){\n          fts5SecureDeleteIdxEntry(p, iSegid, pSeg->iTermLeafPgno);\n        }\n      }\n      fts5DataRelease(pTerm);\n    }\n  }\n\n  /* Assuming no error has occurred, this block does final edits to the\n  ** leaf page before writing it back to disk. Input variables are:\n  **\n  **   nPg: Total initial size of leaf page.\n  **   iPgIdx: Initial offset of page footer.\n  **\n  **   iOff: Offset to move data to\n  **   iNextOff: Offset to move data from\n  */\n  if( p->rc==SQLITE_OK ){\n    const int nMove = nPg - iNextOff;     /* Number of bytes to move */\n    int nShift = iNextOff - iOff;         /* Distance to move them */\n\n    int iPrevKeyOut = 0;\n    int iKeyIn = 0;\n\n    memmove(&aPg[iOff], &aPg[iNextOff], nMove);\n    iPgIdx -= nShift;\n    nPg = iPgIdx;\n    fts5PutU16(&aPg[2], iPgIdx);\n\n    for(iIdx=0; iIdx<nIdx; /* no-op */){\n      u32 iVal = 0;\n      iIdx += fts5GetVarint32(&aIdx[iIdx], iVal);\n      iKeyIn += iVal;\n      if( iKeyIn!=iDelKeyOff ){\n        int iKeyOut = (iKeyIn - (iKeyIn>iOff ? nShift : 0));\n        nPg += sqlite3Fts5PutVarint(&aPg[nPg], iKeyOut - iPrevKeyOut);\n        iPrevKeyOut = iKeyOut;\n      }\n    }\n\n    if( iPgIdx==nPg && nIdx>0 && pSeg->iLeafPgno!=1 ){\n      fts5SecureDeleteIdxEntry(p, iSegid, pSeg->iLeafPgno);\n    }\n\n    assert_nc( nPg>4 || fts5GetU16(aPg)==0 );\n    fts5DataWrite(p, FTS5_SEGMENT_ROWID(iSegid,pSeg->iLeafPgno), aPg, nPg);\n  }\n  sqlite3_free(aIdx);\n}\n\n/*\n** This is called as part of flushing a delete to disk in 'secure-delete'\n** mode. It edits the segments within the database described by argument\n** pStruct to remove the entries for term zTerm, rowid iRowid.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** has occurred. Any error code is also stored in the Fts5Index handle.\n*/\nstatic int fts5FlushSecureDelete(\n  Fts5Index *p,\n  Fts5Structure *pStruct,\n  const char *zTerm,\n  int nTerm,\n  i64 iRowid\n){\n  const int f = FTS5INDEX_QUERY_SKIPHASH;\n  Fts5Iter *pIter = 0;            /* Used to find term instance */\n\n  /* If the version number has not been set to SECUREDELETE, do so now. */\n  if( p->pConfig->iVersion!=FTS5_CURRENT_VERSION_SECUREDELETE ){\n    Fts5Config *pConfig = p->pConfig;\n    sqlite3_stmt *pStmt = 0;\n    fts5IndexPrepareStmt(p, &pStmt, sqlite3_mprintf(\n          \"REPLACE INTO %Q.'%q_config' VALUES ('version', %d)\",\n          pConfig->zDb, pConfig->zName, FTS5_CURRENT_VERSION_SECUREDELETE\n    ));\n    if( p->rc==SQLITE_OK ){\n      int rc;\n      sqlite3_step(pStmt);\n      rc = sqlite3_finalize(pStmt);\n      if( p->rc==SQLITE_OK ) p->rc = rc;\n      pConfig->iCookie++;\n      pConfig->iVersion = FTS5_CURRENT_VERSION_SECUREDELETE;\n    }\n  }\n\n  fts5MultiIterNew(p, pStruct, f, 0, (const u8*)zTerm, nTerm, -1, 0, &pIter);\n  if( fts5MultiIterEof(p, pIter)==0 ){\n    i64 iThis = fts5MultiIterRowid(pIter);\n    if( iThis<iRowid ){\n      fts5MultiIterNextFrom(p, pIter, iRowid);\n    }\n\n    if( p->rc==SQLITE_OK\n     && fts5MultiIterEof(p, pIter)==0\n     && iRowid==fts5MultiIterRowid(pIter)\n    ){\n      Fts5SegIter *pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst];\n      fts5DoSecureDelete(p, pSeg);\n    }\n  }\n\n  fts5MultiIterFree(pIter);\n  return p->rc;\n}\n\n\n/*\n** Flush the contents of in-memory hash table iHash to a new level-0\n** segment on disk. Also update the corresponding structure record.\n**\n** If an error occurs, set the Fts5Index.rc error code. If an error has\n** already occurred, this function is a no-op.\n*/\nstatic void fts5FlushOneHash(Fts5Index *p){\n  Fts5Hash *pHash = p->pHash;\n  Fts5Structure *pStruct;\n  int iSegid;\n  int pgnoLast = 0;                 /* Last leaf page number in segment */\n\n  /* Obtain a reference to the index structure and allocate a new segment-id\n  ** for the new level-0 segment.  */\n  pStruct = fts5StructureRead(p);\n  fts5StructureInvalidate(p);\n\n  if( sqlite3Fts5HashIsEmpty(pHash)==0 ){\n    iSegid = fts5AllocateSegid(p, pStruct);\n    if( iSegid ){\n      const int pgsz = p->pConfig->pgsz;\n      int eDetail = p->pConfig->eDetail;\n      int bSecureDelete = p->pConfig->bSecureDelete;\n      Fts5StructureSegment *pSeg; /* New segment within pStruct */\n      Fts5Buffer *pBuf;           /* Buffer in which to assemble leaf page */\n      Fts5Buffer *pPgidx;         /* Buffer in which to assemble pgidx */\n\n      Fts5SegWriter writer;\n      fts5WriteInit(p, &writer, iSegid);\n\n      pBuf = &writer.writer.buf;\n      pPgidx = &writer.writer.pgidx;\n\n      /* fts5WriteInit() should have initialized the buffers to (most likely)\n      ** the maximum space required. */\n      assert( p->rc || pBuf->nSpace>=(pgsz + FTS5_DATA_PADDING) );\n      assert( p->rc || pPgidx->nSpace>=(pgsz + FTS5_DATA_PADDING) );\n\n      /* Begin scanning through hash table entries. This loop runs once for each\n      ** term/doclist currently stored within the hash table. */\n      if( p->rc==SQLITE_OK ){\n        p->rc = sqlite3Fts5HashScanInit(pHash, 0, 0);\n      }\n      while( p->rc==SQLITE_OK && 0==sqlite3Fts5HashScanEof(pHash) ){\n        const char *zTerm;        /* Buffer containing term */\n        int nTerm;                /* Size of zTerm in bytes */\n        const u8 *pDoclist;       /* Pointer to doclist for this term */\n        int nDoclist;             /* Size of doclist in bytes */\n\n        /* Get the term and doclist for this entry. */\n        sqlite3Fts5HashScanEntry(pHash, &zTerm, &nTerm, &pDoclist, &nDoclist);\n        if( bSecureDelete==0 ){\n          fts5WriteAppendTerm(p, &writer, nTerm, (const u8*)zTerm);\n          if( p->rc!=SQLITE_OK ) break;\n          assert( writer.bFirstRowidInPage==0 );\n        }\n\n        if( !bSecureDelete && pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){\n          /* The entire doclist will fit on the current leaf. */\n          fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist);\n        }else{\n          int bTermWritten = !bSecureDelete;\n          i64 iRowid = 0;\n          i64 iPrev = 0;\n          int iOff = 0;\n\n          /* The entire doclist will not fit on this leaf. The following\n          ** loop iterates through the poslists that make up the current\n          ** doclist.  */\n          while( p->rc==SQLITE_OK && iOff<nDoclist ){\n            u64 iDelta = 0;\n            iOff += fts5GetVarint(&pDoclist[iOff], &iDelta);\n            iRowid += iDelta;\n\n            /* If in secure delete mode, and if this entry in the poslist is\n            ** in fact a delete, then edit the existing segments directly\n            ** using fts5FlushSecureDelete().  */\n            if( bSecureDelete ){\n              if( eDetail==FTS5_DETAIL_NONE ){\n                if( iOff<nDoclist && pDoclist[iOff]==0x00\n                 && !fts5FlushSecureDelete(p, pStruct, zTerm, nTerm, iRowid)\n                ){\n                  iOff++;\n                  if( iOff<nDoclist && pDoclist[iOff]==0x00 ){\n                    iOff++;\n                    nDoclist = 0;\n                  }else{\n                    continue;\n                  }\n                }\n              }else if( (pDoclist[iOff] & 0x01)\n                && !fts5FlushSecureDelete(p, pStruct, zTerm, nTerm, iRowid)\n              ){\n                if( p->rc!=SQLITE_OK || pDoclist[iOff]==0x01 ){\n                  iOff++;\n                  continue;\n                }\n              }\n            }\n\n            if( p->rc==SQLITE_OK && bTermWritten==0 ){\n              fts5WriteAppendTerm(p, &writer, nTerm, (const u8*)zTerm);\n              bTermWritten = 1;\n              assert( p->rc!=SQLITE_OK || writer.bFirstRowidInPage==0 );\n            }\n\n            if( writer.bFirstRowidInPage ){\n              fts5PutU16(&pBuf->p[0], (u16)pBuf->n);   /* first rowid on page */\n              pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowid);\n              writer.bFirstRowidInPage = 0;\n              fts5WriteDlidxAppend(p, &writer, iRowid);\n            }else{\n              u64 iRowidDelta = (u64)iRowid - (u64)iPrev;\n              pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowidDelta);\n            }\n            if( p->rc!=SQLITE_OK ) break;\n            assert( pBuf->n<=pBuf->nSpace );\n            iPrev = iRowid;\n\n            if( eDetail==FTS5_DETAIL_NONE ){\n              if( iOff<nDoclist && pDoclist[iOff]==0 ){\n                pBuf->p[pBuf->n++] = 0;\n                iOff++;\n                if( iOff<nDoclist && pDoclist[iOff]==0 ){\n                  pBuf->p[pBuf->n++] = 0;\n                  iOff++;\n                }\n              }\n              if( (pBuf->n + pPgidx->n)>=pgsz ){\n                fts5WriteFlushLeaf(p, &writer);\n              }\n            }else{\n              int bDel = 0;\n              int nPos = 0;\n              int nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDel);\n              if( bDel && bSecureDelete ){\n                fts5BufferAppendVarint(&p->rc, pBuf, nPos*2);\n                iOff += nCopy;\n                nCopy = nPos;\n              }else{\n                nCopy += nPos;\n              }\n              if( (pBuf->n + pPgidx->n + nCopy) <= pgsz ){\n                /* The entire poslist will fit on the current leaf. So copy\n                ** it in one go. */\n                fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy);\n              }else{\n                /* The entire poslist will not fit on this leaf. So it needs\n                ** to be broken into sections. The only qualification being\n                ** that each varint must be stored contiguously.  */\n                const u8 *pPoslist = &pDoclist[iOff];\n                int iPos = 0;\n                while( p->rc==SQLITE_OK ){\n                  int nSpace = pgsz - pBuf->n - pPgidx->n;\n                  int n = 0;\n                  if( (nCopy - iPos)<=nSpace ){\n                    n = nCopy - iPos;\n                  }else{\n                    n = fts5PoslistPrefix(&pPoslist[iPos], nSpace);\n                  }\n                  assert( n>0 );\n                  fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n);\n                  iPos += n;\n                  if( (pBuf->n + pPgidx->n)>=pgsz ){\n                    fts5WriteFlushLeaf(p, &writer);\n                  }\n                  if( iPos>=nCopy ) break;\n                }\n              }\n              iOff += nCopy;\n            }\n          }\n        }\n\n        /* TODO2: Doclist terminator written here. */\n        /* pBuf->p[pBuf->n++] = '\\0'; */\n        assert( pBuf->n<=pBuf->nSpace );\n        if( p->rc==SQLITE_OK ) sqlite3Fts5HashScanNext(pHash);\n      }\n      fts5WriteFinish(p, &writer, &pgnoLast);\n\n      assert( p->rc!=SQLITE_OK || bSecureDelete || pgnoLast>0 );\n      if( pgnoLast>0 ){\n        /* Update the Fts5Structure. It is written back to the database by the\n        ** fts5StructureRelease() call below.  */\n        if( pStruct->nLevel==0 ){\n          fts5StructureAddLevel(&p->rc, &pStruct);\n        }\n        fts5StructureExtendLevel(&p->rc, pStruct, 0, 1, 0);\n        if( p->rc==SQLITE_OK ){\n          pSeg = &pStruct->aLevel[0].aSeg[ pStruct->aLevel[0].nSeg++ ];\n          pSeg->iSegid = iSegid;\n          pSeg->pgnoFirst = 1;\n          pSeg->pgnoLast = pgnoLast;\n          if( pStruct->nOriginCntr>0 ){\n            pSeg->iOrigin1 = pStruct->nOriginCntr;\n            pSeg->iOrigin2 = pStruct->nOriginCntr;\n            pSeg->nEntry = p->nPendingRow;\n            pStruct->nOriginCntr++;\n          }\n          pStruct->nSegment++;\n        }\n        fts5StructurePromote(p, 0, pStruct);\n      }\n    }\n  }\n\n  fts5IndexAutomerge(p, &pStruct, pgnoLast + p->nContentlessDelete);\n  fts5IndexCrisismerge(p, &pStruct);\n  fts5StructureWrite(p, pStruct);\n  fts5StructureRelease(pStruct);\n}\n\n/*\n** Flush any data stored in the in-memory hash tables to the database.\n*/\nstatic void fts5IndexFlush(Fts5Index *p){\n  /* Unless it is empty, flush the hash table to disk */\n  if( p->flushRc ){\n    p->rc = p->flushRc;\n    return;\n  }\n  if( p->nPendingData || p->nContentlessDelete ){\n    assert( p->pHash );\n    fts5FlushOneHash(p);\n    if( p->rc==SQLITE_OK ){\n      sqlite3Fts5HashClear(p->pHash);\n      p->nPendingData = 0;\n      p->nPendingRow = 0;\n      p->nContentlessDelete = 0;\n    }else if( p->nPendingData || p->nContentlessDelete ){\n      p->flushRc = p->rc;\n    }\n  }\n}\n\nstatic Fts5Structure *fts5IndexOptimizeStruct(\n  Fts5Index *p,\n  Fts5Structure *pStruct\n){\n  Fts5Structure *pNew = 0;\n  sqlite3_int64 nByte = SZ_FTS5STRUCTURE(1);\n  int nSeg = pStruct->nSegment;\n  int i;\n\n  /* Figure out if this structure requires optimization. A structure does\n  ** not require optimization if either:\n  **\n  **  1. it consists of fewer than two segments, or\n  **  2. all segments are on the same level, or\n  **  3. all segments except one are currently inputs to a merge operation.\n  **\n  ** In the first case, if there are no tombstone hash pages, return NULL. In\n  ** the second, increment the ref-count on *pStruct and return a copy of the\n  ** pointer to it.\n  */\n  if( nSeg==0 ) return 0;\n  for(i=0; i<pStruct->nLevel; i++){\n    int nThis = pStruct->aLevel[i].nSeg;\n    int nMerge = pStruct->aLevel[i].nMerge;\n    if( nThis>0 && (nThis==nSeg || (nThis==nSeg-1 && nMerge==nThis)) ){\n      if( nSeg==1 && nThis==1 && pStruct->aLevel[i].aSeg[0].nPgTombstone==0 ){\n        return 0;\n      }\n      fts5StructureRef(pStruct);\n      return pStruct;\n    }\n    assert( pStruct->aLevel[i].nMerge<=nThis );\n  }\n\n  nByte += (((i64)pStruct->nLevel)+1) * sizeof(Fts5StructureLevel);\n  assert( nByte==(i64)SZ_FTS5STRUCTURE(pStruct->nLevel+2) );\n  pNew = (Fts5Structure*)sqlite3Fts5MallocZero(&p->rc, nByte);\n\n  if( pNew ){\n    Fts5StructureLevel *pLvl;\n    nByte = nSeg * sizeof(Fts5StructureSegment);\n    pNew->nLevel = MIN(pStruct->nLevel+1, FTS5_MAX_LEVEL);\n    pNew->nRef = 1;\n    pNew->nWriteCounter = pStruct->nWriteCounter;\n    pNew->nOriginCntr = pStruct->nOriginCntr;\n    pLvl = &pNew->aLevel[pNew->nLevel-1];\n    pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&p->rc, nByte);\n    if( pLvl->aSeg ){\n      int iLvl, iSeg;\n      int iSegOut = 0;\n      /* Iterate through all segments, from oldest to newest. Add them to\n      ** the new Fts5Level object so that pLvl->aSeg[0] is the oldest\n      ** segment in the data structure.  */\n      for(iLvl=pStruct->nLevel-1; iLvl>=0; iLvl--){\n        for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){\n          pLvl->aSeg[iSegOut] = pStruct->aLevel[iLvl].aSeg[iSeg];\n          iSegOut++;\n        }\n      }\n      pNew->nSegment = pLvl->nSeg = nSeg;\n    }else{\n      sqlite3_free(pNew);\n      pNew = 0;\n    }\n  }\n\n  return pNew;\n}\n\nstatic int sqlite3Fts5IndexOptimize(Fts5Index *p){\n  Fts5Structure *pStruct;\n  Fts5Structure *pNew = 0;\n\n  assert( p->rc==SQLITE_OK );\n  fts5IndexFlush(p);\n  assert( p->rc!=SQLITE_OK || p->nContentlessDelete==0 );\n  pStruct = fts5StructureRead(p);\n  assert( p->rc!=SQLITE_OK || pStruct!=0 );\n  fts5StructureInvalidate(p);\n\n  if( pStruct ){\n    pNew = fts5IndexOptimizeStruct(p, pStruct);\n  }\n  fts5StructureRelease(pStruct);\n\n  assert( pNew==0 || pNew->nSegment>0 );\n  if( pNew ){\n    int iLvl;\n    for(iLvl=0; pNew->aLevel[iLvl].nSeg==0; iLvl++){}\n    while( p->rc==SQLITE_OK && pNew->aLevel[iLvl].nSeg>0 ){\n      int nRem = FTS5_OPT_WORK_UNIT;\n      fts5IndexMergeLevel(p, &pNew, iLvl, &nRem);\n    }\n\n    fts5StructureWrite(p, pNew);\n    fts5StructureRelease(pNew);\n  }\n\n  return fts5IndexReturn(p);\n}\n\n/*\n** This is called to implement the special \"VALUES('merge', $nMerge)\"\n** INSERT command.\n*/\nstatic int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge){\n  Fts5Structure *pStruct = 0;\n\n  fts5IndexFlush(p);\n  pStruct = fts5StructureRead(p);\n  if( pStruct ){\n    int nMin = p->pConfig->nUsermerge;\n    fts5StructureInvalidate(p);\n    if( nMerge<0 ){\n      Fts5Structure *pNew = fts5IndexOptimizeStruct(p, pStruct);\n      fts5StructureRelease(pStruct);\n      pStruct = pNew;\n      nMin = 1;\n      nMerge = (nMerge==SMALLEST_INT32 ? LARGEST_INT32 : (nMerge*-1));\n    }\n    if( pStruct && pStruct->nLevel ){\n      if( fts5IndexMerge(p, &pStruct, nMerge, nMin) ){\n        fts5StructureWrite(p, pStruct);\n      }\n    }\n    fts5StructureRelease(pStruct);\n  }\n  return fts5IndexReturn(p);\n}\n\nstatic void fts5AppendRowid(\n  Fts5Index *p,\n  u64 iDelta,\n  Fts5Iter *pUnused,\n  Fts5Buffer *pBuf\n){\n  UNUSED_PARAM(pUnused);\n  fts5BufferAppendVarint(&p->rc, pBuf, iDelta);\n}\n\nstatic void fts5AppendPoslist(\n  Fts5Index *p,\n  u64 iDelta,\n  Fts5Iter *pMulti,\n  Fts5Buffer *pBuf\n){\n  int nData = pMulti->base.nData;\n  int nByte = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING;\n  assert( nData>0 );\n  if( p->rc==SQLITE_OK && 0==fts5BufferGrow(&p->rc, pBuf, nByte) ){\n    fts5BufferSafeAppendVarint(pBuf, iDelta);\n    fts5BufferSafeAppendVarint(pBuf, nData*2);\n    fts5BufferSafeAppendBlob(pBuf, pMulti->base.pData, nData);\n    memset(&pBuf->p[pBuf->n], 0, FTS5_DATA_ZERO_PADDING);\n  }\n}\n\n\nstatic void fts5DoclistIterNext(Fts5DoclistIter *pIter){\n  u8 *p = pIter->aPoslist + pIter->nSize + pIter->nPoslist;\n\n  assert( pIter->aPoslist || (p==0 && pIter->aPoslist==0) );\n  if( p>=pIter->aEof ){\n    pIter->aPoslist = 0;\n  }else{\n    i64 iDelta;\n\n    p += fts5GetVarint(p, (u64*)&iDelta);\n    pIter->iRowid += iDelta;\n\n    /* Read position list size */\n    if( p[0] & 0x80 ){\n      int nPos;\n      pIter->nSize = fts5GetVarint32(p, nPos);\n      pIter->nPoslist = (nPos>>1);\n    }else{\n      pIter->nPoslist = ((int)(p[0])) >> 1;\n      pIter->nSize = 1;\n    }\n\n    pIter->aPoslist = p;\n    if( &pIter->aPoslist[pIter->nPoslist]>pIter->aEof ){\n      pIter->aPoslist = 0;\n    }\n  }\n}\n\nstatic void fts5DoclistIterInit(\n  Fts5Buffer *pBuf,\n  Fts5DoclistIter *pIter\n){\n  memset(pIter, 0, sizeof(*pIter));\n  if( pBuf->n>0 ){\n    pIter->aPoslist = pBuf->p;\n    pIter->aEof = &pBuf->p[pBuf->n];\n    fts5DoclistIterNext(pIter);\n  }\n}\n\n#if 0\n/*\n** Append a doclist to buffer pBuf.\n**\n** This function assumes that space within the buffer has already been\n** allocated.\n*/\nstatic void fts5MergeAppendDocid(\n  Fts5Buffer *pBuf,               /* Buffer to write to */\n  i64 *piLastRowid,               /* IN/OUT: Previous rowid written (if any) */\n  i64 iRowid                      /* Rowid to append */\n){\n  assert( pBuf->n!=0 || (*piLastRowid)==0 );\n  fts5BufferSafeAppendVarint(pBuf, iRowid - *piLastRowid);\n  *piLastRowid = iRowid;\n}\n#endif\n\n#define fts5MergeAppendDocid(pBuf, iLastRowid, iRowid) {                 \\\n  assert( (pBuf)->n!=0 || (iLastRowid)==0 );                             \\\n  fts5BufferSafeAppendVarint((pBuf), (u64)(iRowid) - (u64)(iLastRowid)); \\\n  (iLastRowid) = (iRowid);                                               \\\n}\n\n/*\n** Swap the contents of buffer *p1 with that of *p2.\n*/\nstatic void fts5BufferSwap(Fts5Buffer *p1, Fts5Buffer *p2){\n  Fts5Buffer tmp = *p1;\n  *p1 = *p2;\n  *p2 = tmp;\n}\n\nstatic void fts5NextRowid(Fts5Buffer *pBuf, int *piOff, i64 *piRowid){\n  int i = *piOff;\n  if( i>=pBuf->n ){\n    *piOff = -1;\n  }else{\n    u64 iVal;\n    *piOff = i + sqlite3Fts5GetVarint(&pBuf->p[i], &iVal);\n    *piRowid += iVal;\n  }\n}\n\n/*\n** This is the equivalent of fts5MergePrefixLists() for detail=none mode.\n** In this case the buffers consist of a delta-encoded list of rowids only.\n*/\nstatic void fts5MergeRowidLists(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Buffer *p1,                 /* First list to merge */\n  int nBuf,                       /* Number of entries in apBuf[] */\n  Fts5Buffer *aBuf                /* Array of other lists to merge into p1 */\n){\n  int i1 = 0;\n  int i2 = 0;\n  i64 iRowid1 = 0;\n  i64 iRowid2 = 0;\n  i64 iOut = 0;\n  Fts5Buffer *p2 = &aBuf[0];\n  Fts5Buffer out;\n\n  (void)nBuf;\n  memset(&out, 0, sizeof(out));\n  assert( nBuf==1 );\n  sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n);\n  if( p->rc ) return;\n\n  fts5NextRowid(p1, &i1, &iRowid1);\n  fts5NextRowid(p2, &i2, &iRowid2);\n  while( i1>=0 || i2>=0 ){\n    if( i1>=0 && (i2<0 || iRowid1<iRowid2) ){\n      assert( iOut==0 || iRowid1>iOut );\n      fts5BufferSafeAppendVarint(&out, iRowid1 - iOut);\n      iOut = iRowid1;\n      fts5NextRowid(p1, &i1, &iRowid1);\n    }else{\n      assert( iOut==0 || iRowid2>iOut );\n      fts5BufferSafeAppendVarint(&out, iRowid2 - iOut);\n      iOut = iRowid2;\n      if( i1>=0 && iRowid1==iRowid2 ){\n        fts5NextRowid(p1, &i1, &iRowid1);\n      }\n      fts5NextRowid(p2, &i2, &iRowid2);\n    }\n  }\n\n  fts5BufferSwap(&out, p1);\n  fts5BufferFree(&out);\n}\n\ntypedef struct PrefixMerger PrefixMerger;\nstruct PrefixMerger {\n  Fts5DoclistIter iter;           /* Doclist iterator */\n  i64 iPos;                       /* For iterating through a position list */\n  int iOff;\n  u8 *aPos;\n  PrefixMerger *pNext;            /* Next in docid/poslist order */\n};\n\nstatic void fts5PrefixMergerInsertByRowid(\n  PrefixMerger **ppHead,\n  PrefixMerger *p\n){\n  if( p->iter.aPoslist ){\n    PrefixMerger **pp = ppHead;\n    while( *pp && p->iter.iRowid>(*pp)->iter.iRowid ){\n      pp = &(*pp)->pNext;\n    }\n    p->pNext = *pp;\n    *pp = p;\n  }\n}\n\nstatic void fts5PrefixMergerInsertByPosition(\n  PrefixMerger **ppHead,\n  PrefixMerger *p\n){\n  if( p->iPos>=0 ){\n    PrefixMerger **pp = ppHead;\n    while( *pp && p->iPos>(*pp)->iPos ){\n      pp = &(*pp)->pNext;\n    }\n    p->pNext = *pp;\n    *pp = p;\n  }\n}\n\n\n/*\n** Array aBuf[] contains nBuf doclists. These are all merged in with the\n** doclist in buffer p1.\n*/\nstatic void fts5MergePrefixLists(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5Buffer *p1,                 /* First list to merge */\n  int nBuf,                       /* Number of buffers in array aBuf[] */\n  Fts5Buffer *aBuf                /* Other lists to merge in */\n){\n#define fts5PrefixMergerNextPosition(p) \\\n  sqlite3Fts5PoslistNext64((p)->aPos,(p)->iter.nPoslist,&(p)->iOff,&(p)->iPos)\n#define FTS5_MERGE_NLIST 16\n  PrefixMerger aMerger[FTS5_MERGE_NLIST];\n  PrefixMerger *pHead = 0;\n  int i;\n  int nOut = 0;\n  Fts5Buffer out = {0, 0, 0};\n  Fts5Buffer tmp = {0, 0, 0};\n  i64 iLastRowid = 0;\n\n  /* Initialize a doclist-iterator for each input buffer. Arrange them in\n  ** a linked-list starting at pHead in ascending order of rowid. Avoid\n  ** linking any iterators already at EOF into the linked list at all. */\n  assert( nBuf+1<=(int)(sizeof(aMerger)/sizeof(aMerger[0])) );\n  memset(aMerger, 0, sizeof(PrefixMerger)*(nBuf+1));\n  pHead = &aMerger[nBuf];\n  fts5DoclistIterInit(p1, &pHead->iter);\n  for(i=0; i<nBuf; i++){\n    fts5DoclistIterInit(&aBuf[i], &aMerger[i].iter);\n    fts5PrefixMergerInsertByRowid(&pHead, &aMerger[i]);\n    nOut += aBuf[i].n;\n  }\n  if( nOut==0 ) return;\n  nOut += p1->n + 9 + 10*nBuf;\n\n  /* The maximum size of the output is equal to the sum of the\n  ** input sizes + 1 varint (9 bytes). The extra varint is because if the\n  ** first rowid in one input is a large negative number, and the first in\n  ** the other a non-negative number, the delta for the non-negative\n  ** number will be larger on disk than the literal integer value\n  ** was.\n  **\n  ** Or, if the input position-lists are corrupt, then the output might\n  ** include up to (nBuf+1) extra 10-byte positions created by interpreting -1\n  ** (the value PoslistNext64() uses for EOF) as a position and appending\n  ** it to the output. This can happen at most once for each input\n  ** position-list, hence (nBuf+1) 10 byte paddings.  */\n  if( sqlite3Fts5BufferSize(&p->rc, &out, nOut) ) return;\n\n  while( pHead ){\n    fts5MergeAppendDocid(&out, iLastRowid, pHead->iter.iRowid);\n\n    if( pHead->pNext && iLastRowid==pHead->pNext->iter.iRowid ){\n      /* Merge data from two or more poslists */\n      i64 iPrev = 0;\n      int nTmp = FTS5_DATA_ZERO_PADDING;\n      int nMerge = 0;\n      PrefixMerger *pSave = pHead;\n      PrefixMerger *pThis = 0;\n      int nTail = 0;\n\n      pHead = 0;\n      while( pSave && pSave->iter.iRowid==iLastRowid ){\n        PrefixMerger *pNext = pSave->pNext;\n        pSave->iOff = 0;\n        pSave->iPos = 0;\n        pSave->aPos = &pSave->iter.aPoslist[pSave->iter.nSize];\n        fts5PrefixMergerNextPosition(pSave);\n        nTmp += pSave->iter.nPoslist + 10;\n        nMerge++;\n        fts5PrefixMergerInsertByPosition(&pHead, pSave);\n        pSave = pNext;\n      }\n\n      if( pHead==0 || pHead->pNext==0 ){\n        FTS5_CORRUPT_IDX(p);\n        break;\n      }\n\n      /* See the earlier comment in this function for an explanation of why\n      ** corrupt input position lists might cause the output to consume\n      ** at most nMerge*10 bytes of unexpected space. */\n      if( sqlite3Fts5BufferSize(&p->rc, &tmp, nTmp+nMerge*10) ){\n        break;\n      }\n      fts5BufferZero(&tmp);\n\n      pThis = pHead;\n      pHead = pThis->pNext;\n      sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, pThis->iPos);\n      fts5PrefixMergerNextPosition(pThis);\n      fts5PrefixMergerInsertByPosition(&pHead, pThis);\n\n      while( pHead->pNext ){\n        pThis = pHead;\n        if( pThis->iPos!=iPrev ){\n          sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, pThis->iPos);\n        }\n        fts5PrefixMergerNextPosition(pThis);\n        pHead = pThis->pNext;\n        fts5PrefixMergerInsertByPosition(&pHead, pThis);\n      }\n\n      if( pHead->iPos!=iPrev ){\n        sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, pHead->iPos);\n      }\n      nTail = pHead->iter.nPoslist - pHead->iOff;\n\n      /* WRITEPOSLISTSIZE */\n      assert_nc( tmp.n+nTail<=nTmp );\n      assert( tmp.n+nTail<=nTmp+nMerge*10 );\n      if( tmp.n+nTail>nTmp-FTS5_DATA_ZERO_PADDING ){\n        if( p->rc==SQLITE_OK ) FTS5_CORRUPT_IDX(p);\n        break;\n      }\n      fts5BufferSafeAppendVarint(&out, (tmp.n+nTail) * 2);\n      fts5BufferSafeAppendBlob(&out, tmp.p, tmp.n);\n      if( nTail>0 ){\n        fts5BufferSafeAppendBlob(&out, &pHead->aPos[pHead->iOff], nTail);\n      }\n\n      pHead = pSave;\n      for(i=0; i<nBuf+1; i++){\n        PrefixMerger *pX = &aMerger[i];\n        if( pX->iter.aPoslist && pX->iter.iRowid==iLastRowid ){\n          fts5DoclistIterNext(&pX->iter);\n          fts5PrefixMergerInsertByRowid(&pHead, pX);\n        }\n      }\n\n    }else{\n      /* Copy poslist from pHead to output */\n      PrefixMerger *pThis = pHead;\n      Fts5DoclistIter *pI = &pThis->iter;\n      fts5BufferSafeAppendBlob(&out, pI->aPoslist, pI->nPoslist+pI->nSize);\n      fts5DoclistIterNext(pI);\n      pHead = pThis->pNext;\n      fts5PrefixMergerInsertByRowid(&pHead, pThis);\n    }\n  }\n\n  fts5BufferFree(p1);\n  fts5BufferFree(&tmp);\n  memset(&out.p[out.n], 0, FTS5_DATA_ZERO_PADDING);\n  *p1 = out;\n}\n\n\n/*\n** Iterate through a range of entries in the FTS index, invoking the xVisit\n** callback for each of them.\n**\n** Parameter pToken points to an nToken buffer containing an FTS index term\n** (i.e. a document term with the preceding 1 byte index identifier -\n** FTS5_MAIN_PREFIX or similar). If bPrefix is true, then the call visits\n** all entries for terms that have pToken/nToken as a prefix. If bPrefix\n** is false, then only entries with pToken/nToken as the entire key are\n** visited.\n**\n** If the current table is a tokendata=1 table, then if bPrefix is true then\n** each index term is treated separately. However, if bPrefix is false, then\n** all index terms corresponding to pToken/nToken are collapsed into a single\n** term before the callback is invoked.\n**\n** The callback invoked for each entry visited is specified by paramter xVisit.\n** Each time it is invoked, it is passed a pointer to the Fts5Index object,\n** a copy of the 7th paramter to this function (pCtx) and a pointer to the\n** iterator that indicates the current entry. If the current entry is the\n** first with a new term (i.e. different from that of the previous entry,\n** including the very first term), then the final two parameters are passed\n** a pointer to the term and its size in bytes, respectively. If the current\n** entry is not the first associated with its term, these two parameters\n** are passed 0.\n**\n** If parameter pColset is not NULL, then it is used to filter entries before\n** the callback is invoked.\n*/\nstatic int fts5VisitEntries(\n  Fts5Index *p,                   /* Fts5 index object */\n  Fts5Colset *pColset,            /* Columns filter to apply, or NULL */\n  u8 *pToken,                     /* Buffer containing token */\n  int nToken,                     /* Size of buffer pToken in bytes */\n  int bPrefix,                    /* True for a prefix scan */\n  void (*xVisit)(Fts5Index*, void *pCtx, Fts5Iter *pIter, const u8*, int),\n  void *pCtx                      /* Passed as second argument to xVisit() */\n){\n  const int flags = (bPrefix ? FTS5INDEX_QUERY_SCAN : 0)\n                  | FTS5INDEX_QUERY_SKIPEMPTY\n                  | FTS5INDEX_QUERY_NOOUTPUT;\n  Fts5Iter *p1 = 0;     /* Iterator used to gather data from index */\n  int bNewTerm = 1;\n  Fts5Structure *pStruct = fts5StructureRead(p);\n\n  fts5MultiIterNew(p, pStruct, flags, pColset, pToken, nToken, -1, 0, &p1);\n  fts5IterSetOutputCb(&p->rc, p1);\n  for( /* no-op */ ;\n      fts5MultiIterEof(p, p1)==0;\n      fts5MultiIterNext2(p, p1, &bNewTerm)\n  ){\n    Fts5SegIter *pSeg = &p1->aSeg[ p1->aFirst[1].iFirst ];\n    int nNew = 0;\n    const u8 *pNew = 0;\n\n    p1->xSetOutputs(p1, pSeg);\n    if( p->rc ) break;\n\n    if( bNewTerm ){\n      nNew = pSeg->term.n;\n      pNew = pSeg->term.p;\n      if( nNew<nToken || memcmp(pToken, pNew, nToken) ) break;\n    }\n\n    xVisit(p, pCtx, p1, pNew, nNew);\n  }\n  fts5MultiIterFree(p1);\n\n  fts5StructureRelease(pStruct);\n  return p->rc;\n}\n\n\n/*\n** Usually, a tokendata=1 iterator (struct Fts5TokenDataIter) accumulates an\n** array of these for each row it visits (so all iRowid fields are the same).\n** Or, for an iterator used by an \"ORDER BY rank\" query, it accumulates an\n** array of these for the entire query (in which case iRowid fields may take\n** a variety of values).\n**\n** Each instance in the array indicates the iterator (and therefore term)\n** associated with position iPos of rowid iRowid. This is used by the\n** xInstToken() API.\n**\n** iRowid:\n**   Rowid for the current entry.\n**\n** iPos:\n**   Position of current entry within row. In the usual ((iCol<<32)+iOff)\n**   format (e.g. see macros FTS5_POS2COLUMN() and FTS5_POS2OFFSET()).\n**\n** iIter:\n**   If the Fts5TokenDataIter iterator that the entry is part of is\n**   actually an iterator (i.e. with nIter>0, not just a container for\n**   Fts5TokenDataMap structures), then this variable is an index into\n**   the apIter[] array. The corresponding term is that which the iterator\n**   at apIter[iIter] currently points to.\n**\n**   Or, if the Fts5TokenDataIter iterator is just a container object\n**   (nIter==0), then iIter is an index into the term.p[] buffer where\n**   the term is stored.\n**\n** nByte:\n**   In the case where iIter is an index into term.p[], this variable\n**   is the size of the term in bytes. If iIter is an index into apIter[],\n**   this variable is unused.\n*/\nstruct Fts5TokenDataMap {\n  i64 iRowid;                     /* Row this token is located in */\n  i64 iPos;                       /* Position of token */\n  int iIter;                      /* Iterator token was read from */\n  int nByte;                      /* Length of token in bytes (or 0) */\n};\n\n/*\n** An object used to supplement Fts5Iter for tokendata=1 iterators.\n**\n** This object serves two purposes. The first is as a container for an array\n** of Fts5TokenDataMap structures, which are used to find the token required\n** when the xInstToken() API is used. This is done by the nMapAlloc, nMap and\n** aMap[] variables.\n*/\nstruct Fts5TokenDataIter {\n  int nMapAlloc;                  /* Allocated size of aMap[] in entries */\n  int nMap;                       /* Number of valid entries in aMap[] */\n  Fts5TokenDataMap *aMap;         /* Array of (rowid+pos -> token) mappings */\n\n  /* The following are used for prefix-queries only. */\n  Fts5Buffer terms;\n\n  /* The following are used for other full-token tokendata queries only. */\n  int nIter;\n  int nIterAlloc;\n  Fts5PoslistReader *aPoslistReader;\n  int *aPoslistToIter;\n  Fts5Iter *apIter[FLEXARRAY];\n};\n\n/* Size in bytes of an Fts5TokenDataIter object holding up to N iterators */\n#define SZ_FTS5TOKENDATAITER(N) \\\n    (offsetof(Fts5TokenDataIter,apIter) + (N)*sizeof(Fts5Iter))\n\n/*\n** The two input arrays - a1[] and a2[] - are in sorted order. This function\n** merges the two arrays together and writes the result to output array\n** aOut[]. aOut[] is guaranteed to be large enough to hold the result.\n**\n** Duplicate entries are copied into the output. So the size of the output\n** array is always (n1+n2) entries.\n*/\nstatic void fts5TokendataMerge(\n  Fts5TokenDataMap *a1, int n1,   /* Input array 1 */\n  Fts5TokenDataMap *a2, int n2,   /* Input array 2 */\n  Fts5TokenDataMap *aOut          /* Output array */\n){\n  int i1 = 0;\n  int i2 = 0;\n\n  assert( n1>=0 && n2>=0 );\n  while( i1<n1 || i2<n2 ){\n    Fts5TokenDataMap *pOut = &aOut[i1+i2];\n    if( i2>=n2 || (i1<n1 && (\n        a1[i1].iRowid<a2[i2].iRowid\n     || (a1[i1].iRowid==a2[i2].iRowid && a1[i1].iPos<=a2[i2].iPos)\n    ))){\n      memcpy(pOut, &a1[i1], sizeof(Fts5TokenDataMap));\n      i1++;\n    }else{\n      memcpy(pOut, &a2[i2], sizeof(Fts5TokenDataMap));\n      i2++;\n    }\n  }\n}\n\n\n/*\n** Append a mapping to the token-map belonging to object pT.\n*/\nstatic void fts5TokendataIterAppendMap(\n  Fts5Index *p,\n  Fts5TokenDataIter *pT,\n  int iIter,\n  int nByte,\n  i64 iRowid,\n  i64 iPos\n){\n  if( p->rc==SQLITE_OK ){\n    if( pT->nMap==pT->nMapAlloc ){\n      int nNew = pT->nMapAlloc ? pT->nMapAlloc*2 : 64;\n      int nAlloc = nNew * sizeof(Fts5TokenDataMap);\n      Fts5TokenDataMap *aNew;\n\n      aNew = (Fts5TokenDataMap*)sqlite3_realloc(pT->aMap, nAlloc);\n      if( aNew==0 ){\n        p->rc = SQLITE_NOMEM;\n        return;\n      }\n\n      pT->aMap = aNew;\n      pT->nMapAlloc = nNew;\n    }\n\n    pT->aMap[pT->nMap].iRowid = iRowid;\n    pT->aMap[pT->nMap].iPos = iPos;\n    pT->aMap[pT->nMap].iIter = iIter;\n    pT->aMap[pT->nMap].nByte = nByte;\n    pT->nMap++;\n  }\n}\n\n/*\n** Sort the contents of the pT->aMap[] array.\n**\n** The sorting algorithm requires a malloc(). If this fails, an error code\n** is left in Fts5Index.rc before returning.\n*/\nstatic void fts5TokendataIterSortMap(Fts5Index *p, Fts5TokenDataIter *pT){\n  Fts5TokenDataMap *aTmp = 0;\n  int nByte = pT->nMap * sizeof(Fts5TokenDataMap);\n\n  aTmp = (Fts5TokenDataMap*)sqlite3Fts5MallocZero(&p->rc, nByte);\n  if( aTmp ){\n    Fts5TokenDataMap *a1 = pT->aMap;\n    Fts5TokenDataMap *a2 = aTmp;\n    i64 nHalf;\n\n    for(nHalf=1; nHalf<pT->nMap; nHalf=nHalf*2){\n      int i1;\n      for(i1=0; i1<pT->nMap; i1+=(nHalf*2)){\n        int n1 = MIN(nHalf, pT->nMap-i1);\n        int n2 = MIN(nHalf, pT->nMap-i1-n1);\n        fts5TokendataMerge(&a1[i1], n1, &a1[i1+n1], n2, &a2[i1]);\n      }\n      SWAPVAL(Fts5TokenDataMap*, a1, a2);\n    }\n\n    if( a1!=pT->aMap ){\n      memcpy(pT->aMap, a1, pT->nMap*sizeof(Fts5TokenDataMap));\n    }\n    sqlite3_free(aTmp);\n\n#ifdef SQLITE_DEBUG\n    {\n      int ii;\n      for(ii=1; ii<pT->nMap; ii++){\n        Fts5TokenDataMap *p1 = &pT->aMap[ii-1];\n        Fts5TokenDataMap *p2 = &pT->aMap[ii];\n        assert( p1->iRowid<p2->iRowid\n             || (p1->iRowid==p2->iRowid && p1->iPos<=p2->iPos)\n        );\n      }\n    }\n#endif\n  }\n}\n\n/*\n** Delete an Fts5TokenDataIter structure and its contents.\n*/\nstatic void fts5TokendataIterDelete(Fts5TokenDataIter *pSet){\n  if( pSet ){\n    int ii;\n    for(ii=0; ii<pSet->nIter; ii++){\n      fts5MultiIterFree(pSet->apIter[ii]);\n    }\n    fts5BufferFree(&pSet->terms);\n    sqlite3_free(pSet->aPoslistReader);\n    sqlite3_free(pSet->aMap);\n    sqlite3_free(pSet);\n  }\n}\n\n\n/*\n** fts5VisitEntries() context object used by fts5SetupPrefixIterTokendata()\n** to pass data to prefixIterSetupTokendataCb().\n*/\ntypedef struct TokendataSetupCtx TokendataSetupCtx;\nstruct TokendataSetupCtx {\n  Fts5TokenDataIter *pT;          /* Object being populated with mappings */\n  int iTermOff;                   /* Offset of current term in terms.p[] */\n  int nTermByte;                  /* Size of current term in bytes */\n};\n\n/*\n** fts5VisitEntries() callback used by fts5SetupPrefixIterTokendata(). This\n** callback adds an entry to the Fts5TokenDataIter.aMap[] array for each\n** position in the current position-list. It doesn't matter that some of\n** these may be out of order - they will be sorted later.\n*/\nstatic void prefixIterSetupTokendataCb(\n  Fts5Index *p,\n  void *pCtx,\n  Fts5Iter *p1,\n  const u8 *pNew,\n  int nNew\n){\n  TokendataSetupCtx *pSetup = (TokendataSetupCtx*)pCtx;\n  int iPosOff = 0;\n  i64 iPos = 0;\n\n  if( pNew ){\n    pSetup->nTermByte = nNew-1;\n    pSetup->iTermOff = pSetup->pT->terms.n;\n    fts5BufferAppendBlob(&p->rc, &pSetup->pT->terms, nNew-1, pNew+1);\n  }\n\n  while( 0==sqlite3Fts5PoslistNext64(\n     p1->base.pData, p1->base.nData, &iPosOff, &iPos\n  ) ){\n    fts5TokendataIterAppendMap(p,\n        pSetup->pT, pSetup->iTermOff, pSetup->nTermByte, p1->base.iRowid, iPos\n    );\n  }\n}\n\n\n/*\n** Context object passed by fts5SetupPrefixIter() to fts5VisitEntries().\n*/\ntypedef struct PrefixSetupCtx PrefixSetupCtx;\nstruct PrefixSetupCtx {\n  void (*xMerge)(Fts5Index*, Fts5Buffer*, int, Fts5Buffer*);\n  void (*xAppend)(Fts5Index*, u64, Fts5Iter*, Fts5Buffer*);\n  i64 iLastRowid;\n  int nMerge;\n  Fts5Buffer *aBuf;\n  int nBuf;\n  Fts5Buffer doclist;\n  TokendataSetupCtx *pTokendata;\n};\n\n/*\n** fts5VisitEntries() callback used by fts5SetupPrefixIter()\n*/\nstatic void prefixIterSetupCb(\n  Fts5Index *p,\n  void *pCtx,\n  Fts5Iter *p1,\n  const u8 *pNew,\n  int nNew\n){\n  PrefixSetupCtx *pSetup = (PrefixSetupCtx*)pCtx;\n  const int nMerge = pSetup->nMerge;\n\n  if( p1->base.nData>0 ){\n    if( p1->base.iRowid<=pSetup->iLastRowid && pSetup->doclist.n>0 ){\n      int i;\n      for(i=0; p->rc==SQLITE_OK && pSetup->doclist.n; i++){\n        int i1 = i*nMerge;\n        int iStore;\n        assert( i1+nMerge<=pSetup->nBuf );\n        for(iStore=i1; iStore<i1+nMerge; iStore++){\n          if( pSetup->aBuf[iStore].n==0 ){\n            fts5BufferSwap(&pSetup->doclist, &pSetup->aBuf[iStore]);\n            fts5BufferZero(&pSetup->doclist);\n            break;\n          }\n        }\n        if( iStore==i1+nMerge ){\n          pSetup->xMerge(p, &pSetup->doclist, nMerge, &pSetup->aBuf[i1]);\n          for(iStore=i1; iStore<i1+nMerge; iStore++){\n            fts5BufferZero(&pSetup->aBuf[iStore]);\n          }\n        }\n      }\n      pSetup->iLastRowid = 0;\n    }\n\n    pSetup->xAppend(\n        p, (u64)p1->base.iRowid-(u64)pSetup->iLastRowid, p1, &pSetup->doclist\n    );\n    pSetup->iLastRowid = p1->base.iRowid;\n  }\n\n  if( pSetup->pTokendata ){\n    prefixIterSetupTokendataCb(p, (void*)pSetup->pTokendata, p1, pNew, nNew);\n  }\n}\n\nstatic void fts5SetupPrefixIter(\n  Fts5Index *p,                   /* Index to read from */\n  int bDesc,                      /* True for \"ORDER BY rowid DESC\" */\n  int iIdx,                       /* Index to scan for data */\n  u8 *pToken,                     /* Buffer containing prefix to match */\n  int nToken,                     /* Size of buffer pToken in bytes */\n  Fts5Colset *pColset,            /* Restrict matches to these columns */\n  Fts5Iter **ppIter               /* OUT: New iterator */\n){\n  Fts5Structure *pStruct;\n  PrefixSetupCtx s;\n  TokendataSetupCtx s2;\n\n  memset(&s, 0, sizeof(s));\n  memset(&s2, 0, sizeof(s2));\n\n  s.nMerge = 1;\n  s.iLastRowid = 0;\n  s.nBuf = 32;\n  if( iIdx==0\n   && p->pConfig->eDetail==FTS5_DETAIL_FULL\n   && p->pConfig->bPrefixInsttoken\n  ){\n    s.pTokendata = &s2;\n    s2.pT = (Fts5TokenDataIter*)fts5IdxMalloc(p, SZ_FTS5TOKENDATAITER(1));\n  }\n\n  if( p->pConfig->eDetail==FTS5_DETAIL_NONE ){\n    s.xMerge = fts5MergeRowidLists;\n    s.xAppend = fts5AppendRowid;\n  }else{\n    s.nMerge = FTS5_MERGE_NLIST-1;\n    s.nBuf = s.nMerge*8;   /* Sufficient to merge (16^8)==(2^32) lists */\n    s.xMerge = fts5MergePrefixLists;\n    s.xAppend = fts5AppendPoslist;\n  }\n\n  s.aBuf = (Fts5Buffer*)fts5IdxMalloc(p, sizeof(Fts5Buffer)*s.nBuf);\n  pStruct = fts5StructureRead(p);\n  assert( p->rc!=SQLITE_OK || (s.aBuf && pStruct) );\n\n  if( p->rc==SQLITE_OK ){\n    void *pCtx = (void*)&s;\n    int i;\n    Fts5Data *pData;\n\n    /* If iIdx is non-zero, then it is the number of a prefix-index for\n    ** prefixes 1 character longer than the prefix being queried for. That\n    ** index contains all the doclists required, except for the one\n    ** corresponding to the prefix itself. That one is extracted from the\n    ** main term index here.  */\n    if( iIdx!=0 ){\n      pToken[0] = FTS5_MAIN_PREFIX;\n      fts5VisitEntries(p, pColset, pToken, nToken, 0, prefixIterSetupCb, pCtx);\n    }\n\n    pToken[0] = FTS5_MAIN_PREFIX + iIdx;\n    fts5VisitEntries(p, pColset, pToken, nToken, 1, prefixIterSetupCb, pCtx);\n\n    assert( (s.nBuf%s.nMerge)==0 );\n    for(i=0; i<s.nBuf; i+=s.nMerge){\n      int iFree;\n      if( p->rc==SQLITE_OK ){\n        s.xMerge(p, &s.doclist, s.nMerge, &s.aBuf[i]);\n      }\n      for(iFree=i; iFree<i+s.nMerge; iFree++){\n        fts5BufferFree(&s.aBuf[iFree]);\n      }\n    }\n\n    pData = fts5IdxMalloc(p, sizeof(*pData)\n                             + ((i64)s.doclist.n)+FTS5_DATA_ZERO_PADDING);\n    assert( pData!=0 || p->rc!=SQLITE_OK );\n    if( pData ){\n      pData->p = (u8*)&pData[1];\n      pData->nn = pData->szLeaf = s.doclist.n;\n      if( s.doclist.n ) memcpy(pData->p, s.doclist.p, s.doclist.n);\n      fts5MultiIterNew2(p, pData, bDesc, ppIter);\n    }\n\n    assert( (*ppIter)!=0 || p->rc!=SQLITE_OK );\n    if( p->rc==SQLITE_OK && s.pTokendata ){\n      fts5TokendataIterSortMap(p, s2.pT);\n      (*ppIter)->pTokenDataIter = s2.pT;\n      s2.pT = 0;\n    }\n  }\n\n  fts5TokendataIterDelete(s2.pT);\n  fts5BufferFree(&s.doclist);\n  fts5StructureRelease(pStruct);\n  sqlite3_free(s.aBuf);\n}\n\n\n/*\n** Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain\n** to the document with rowid iRowid.\n*/\nstatic int sqlite3Fts5IndexBeginWrite(Fts5Index *p, int bDelete, i64 iRowid){\n  assert( p->rc==SQLITE_OK );\n\n  /* Allocate the hash table if it has not already been allocated */\n  if( p->pHash==0 ){\n    p->rc = sqlite3Fts5HashNew(p->pConfig, &p->pHash, &p->nPendingData);\n  }\n\n  /* Flush the hash table to disk if required */\n  if( iRowid<p->iWriteRowid\n   || (iRowid==p->iWriteRowid && p->bDelete==0)\n   || (p->nPendingData > p->pConfig->nHashSize)\n  ){\n    fts5IndexFlush(p);\n  }\n\n  p->iWriteRowid = iRowid;\n  p->bDelete = bDelete;\n  if( bDelete==0 ){\n    p->nPendingRow++;\n  }\n  return fts5IndexReturn(p);\n}\n\n/*\n** Commit data to disk.\n*/\nstatic int sqlite3Fts5IndexSync(Fts5Index *p){\n  assert( p->rc==SQLITE_OK );\n  fts5IndexFlush(p);\n  fts5IndexCloseReader(p);\n  return fts5IndexReturn(p);\n}\n\n/*\n** Discard any data stored in the in-memory hash tables. Do not write it\n** to the database. Additionally, assume that the contents of the %_data\n** table may have changed on disk. So any in-memory caches of %_data\n** records must be invalidated.\n*/\nstatic int sqlite3Fts5IndexRollback(Fts5Index *p){\n  fts5IndexCloseReader(p);\n  fts5IndexDiscardData(p);\n  fts5StructureInvalidate(p);\n  return fts5IndexReturn(p);\n}\n\n/*\n** The %_data table is completely empty when this function is called. This\n** function populates it with the initial structure objects for each index,\n** and the initial version of the \"averages\" record (a zero-byte blob).\n*/\nstatic int sqlite3Fts5IndexReinit(Fts5Index *p){\n  Fts5Structure *pTmp;\n  union {\n    Fts5Structure sFts;\n    u8 tmpSpace[SZ_FTS5STRUCTURE(1)];\n  } uFts;\n  fts5StructureInvalidate(p);\n  fts5IndexDiscardData(p);\n  pTmp = &uFts.sFts;\n  memset(uFts.tmpSpace, 0, sizeof(uFts.tmpSpace));\n  if( p->pConfig->bContentlessDelete ){\n    pTmp->nOriginCntr = 1;\n  }\n  fts5DataWrite(p, FTS5_AVERAGES_ROWID, (const u8*)\"\", 0);\n  fts5StructureWrite(p, pTmp);\n  return fts5IndexReturn(p);\n}\n\n/*\n** Open a new Fts5Index handle. If the bCreate argument is true, create\n** and initialize the underlying %_data table.\n**\n** If successful, set *pp to point to the new object and return SQLITE_OK.\n** Otherwise, set *pp to NULL and return an SQLite error code.\n*/\nstatic int sqlite3Fts5IndexOpen(\n  Fts5Config *pConfig,\n  int bCreate,\n  Fts5Index **pp,\n  char **pzErr\n){\n  int rc = SQLITE_OK;\n  Fts5Index *p;                   /* New object */\n\n  *pp = p = (Fts5Index*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Index));\n  if( rc==SQLITE_OK ){\n    p->pConfig = pConfig;\n    p->nWorkUnit = FTS5_WORK_UNIT;\n    p->zDataTbl = sqlite3Fts5Mprintf(&rc, \"%s_data\", pConfig->zName);\n    if( p->zDataTbl && bCreate ){\n      rc = sqlite3Fts5CreateTable(\n          pConfig, \"data\", \"id INTEGER PRIMARY KEY, block BLOB\", 0, pzErr\n      );\n      if( rc==SQLITE_OK ){\n        rc = sqlite3Fts5CreateTable(pConfig, \"idx\",\n            \"segid, term, pgno, PRIMARY KEY(segid, term)\",\n            1, pzErr\n        );\n      }\n      if( rc==SQLITE_OK ){\n        rc = sqlite3Fts5IndexReinit(p);\n      }\n    }\n  }\n\n  assert( rc!=SQLITE_OK || p->rc==SQLITE_OK );\n  if( rc ){\n    sqlite3Fts5IndexClose(p);\n    *pp = 0;\n  }\n  return rc;\n}\n\n/*\n** Close a handle opened by an earlier call to sqlite3Fts5IndexOpen().\n*/\nstatic int sqlite3Fts5IndexClose(Fts5Index *p){\n  int rc = SQLITE_OK;\n  if( p ){\n    assert( p->pReader==0 );\n    fts5StructureInvalidate(p);\n    sqlite3_finalize(p->pWriter);\n    sqlite3_finalize(p->pDeleter);\n    sqlite3_finalize(p->pIdxWriter);\n    sqlite3_finalize(p->pIdxDeleter);\n    sqlite3_finalize(p->pIdxSelect);\n    sqlite3_finalize(p->pIdxNextSelect);\n    sqlite3_finalize(p->pDataVersion);\n    sqlite3_finalize(p->pDeleteFromIdx);\n    sqlite3Fts5HashFree(p->pHash);\n    sqlite3_free(p->zDataTbl);\n    sqlite3_free(p);\n  }\n  return rc;\n}\n\n/*\n** Argument p points to a buffer containing utf-8 text that is n bytes in\n** size. Return the number of bytes in the nChar character prefix of the\n** buffer, or 0 if there are less than nChar characters in total.\n*/\nstatic int sqlite3Fts5IndexCharlenToBytelen(\n  const char *p,\n  int nByte,\n  int nChar\n){\n  int n = 0;\n  int i;\n  for(i=0; i<nChar; i++){\n    if( n>=nByte ) return 0;      /* Input contains fewer than nChar chars */\n    if( (unsigned char)p[n++]>=0xc0 ){\n      if( n>=nByte ) return 0;\n      while( (p[n] & 0xc0)==0x80 ){\n        n++;\n        if( n>=nByte ){\n          if( i+1==nChar ) break;\n          return 0;\n        }\n      }\n    }\n  }\n  return n;\n}\n\n/*\n** pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of\n** unicode characters in the string.\n*/\nstatic int fts5IndexCharlen(const char *pIn, int nIn){\n  int nChar = 0;\n  int i = 0;\n  while( i<nIn ){\n    if( (unsigned char)pIn[i++]>=0xc0 ){\n      while( i<nIn && (pIn[i] & 0xc0)==0x80 ) i++;\n    }\n    nChar++;\n  }\n  return nChar;\n}\n\n/*\n** Insert or remove data to or from the index. Each time a document is\n** added to or removed from the index, this function is called one or more\n** times.\n**\n** For an insert, it must be called once for each token in the new document.\n** If the operation is a delete, it must be called (at least) once for each\n** unique token in the document with an iCol value less than zero. The iPos\n** argument is ignored for a delete.\n*/\nstatic int sqlite3Fts5IndexWrite(\n  Fts5Index *p,                   /* Index to write to */\n  int iCol,                       /* Column token appears in (-ve -> delete) */\n  int iPos,                       /* Position of token within column */\n  const char *pToken, int nToken  /* Token to add or remove to or from index */\n){\n  int i;                          /* Used to iterate through indexes */\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5Config *pConfig = p->pConfig;\n\n  assert( p->rc==SQLITE_OK );\n  assert( (iCol<0)==p->bDelete );\n\n  /* Add the entry to the main terms index. */\n  rc = sqlite3Fts5HashWrite(\n      p->pHash, p->iWriteRowid, iCol, iPos, FTS5_MAIN_PREFIX, pToken, nToken\n  );\n\n  for(i=0; i<pConfig->nPrefix && rc==SQLITE_OK; i++){\n    const int nChar = pConfig->aPrefix[i];\n    int nByte = sqlite3Fts5IndexCharlenToBytelen(pToken, nToken, nChar);\n    if( nByte ){\n      rc = sqlite3Fts5HashWrite(p->pHash,\n          p->iWriteRowid, iCol, iPos, (char)(FTS5_MAIN_PREFIX+i+1), pToken,\n          nByte\n      );\n    }\n  }\n\n  return rc;\n}\n\n/*\n** pToken points to a buffer of size nToken bytes containing a search\n** term, including the index number at the start, used on a tokendata=1\n** table. This function returns true if the term in buffer pBuf matches\n** token pToken/nToken.\n*/\nstatic int fts5IsTokendataPrefix(\n  Fts5Buffer *pBuf,\n  const u8 *pToken,\n  int nToken\n){\n  return (\n      pBuf->n>=nToken\n   && 0==memcmp(pBuf->p, pToken, nToken)\n   && (pBuf->n==nToken || pBuf->p[nToken]==0x00)\n  );\n}\n\n/*\n** Ensure the segment-iterator passed as the only argument points to EOF.\n*/\nstatic void fts5SegIterSetEOF(Fts5SegIter *pSeg){\n  fts5DataRelease(pSeg->pLeaf);\n  pSeg->pLeaf = 0;\n}\n\nstatic void fts5IterClose(Fts5IndexIter *pIndexIter){\n  if( pIndexIter ){\n    Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n    Fts5Index *pIndex = pIter->pIndex;\n    fts5TokendataIterDelete(pIter->pTokenDataIter);\n    fts5MultiIterFree(pIter);\n    fts5IndexCloseReader(pIndex);\n  }\n}\n\n/*\n** This function appends iterator pAppend to Fts5TokenDataIter pIn and\n** returns the result.\n*/\nstatic Fts5TokenDataIter *fts5AppendTokendataIter(\n  Fts5Index *p,                   /* Index object (for error code) */\n  Fts5TokenDataIter *pIn,         /* Current Fts5TokenDataIter struct */\n  Fts5Iter *pAppend               /* Append this iterator */\n){\n  Fts5TokenDataIter *pRet = pIn;\n\n  if( p->rc==SQLITE_OK ){\n    if( pIn==0 || pIn->nIter==pIn->nIterAlloc ){\n      int nAlloc = pIn ? pIn->nIterAlloc*2 : 16;\n      int nByte = SZ_FTS5TOKENDATAITER(nAlloc+1);\n      Fts5TokenDataIter *pNew = (Fts5TokenDataIter*)sqlite3_realloc(pIn, nByte);\n\n      if( pNew==0 ){\n        p->rc = SQLITE_NOMEM;\n      }else{\n        if( pIn==0 ) memset(pNew, 0, nByte);\n        pRet = pNew;\n        pNew->nIterAlloc = nAlloc;\n      }\n    }\n  }\n  if( p->rc ){\n    fts5IterClose((Fts5IndexIter*)pAppend);\n  }else{\n    pRet->apIter[pRet->nIter++] = pAppend;\n  }\n  assert( pRet==0 || pRet->nIter<=pRet->nIterAlloc );\n\n  return pRet;\n}\n\n/*\n** The iterator passed as the only argument must be a tokendata=1 iterator\n** (pIter->pTokenDataIter!=0). This function sets the iterator output\n** variables (pIter->base.*) according to the contents of the current\n** row.\n*/\nstatic void fts5IterSetOutputsTokendata(Fts5Iter *pIter){\n  int ii;\n  int nHit = 0;\n  i64 iRowid = SMALLEST_INT64;\n  int iMin = 0;\n\n  Fts5TokenDataIter *pT = pIter->pTokenDataIter;\n\n  pIter->base.nData = 0;\n  pIter->base.pData = 0;\n\n  for(ii=0; ii<pT->nIter; ii++){\n    Fts5Iter *p = pT->apIter[ii];\n    if( p->base.bEof==0 ){\n      if( nHit==0 || p->base.iRowid<iRowid ){\n        iRowid = p->base.iRowid;\n        nHit = 1;\n        pIter->base.pData = p->base.pData;\n        pIter->base.nData = p->base.nData;\n        iMin = ii;\n      }else if( p->base.iRowid==iRowid ){\n        nHit++;\n      }\n    }\n  }\n\n  if( nHit==0 ){\n    pIter->base.bEof = 1;\n  }else{\n    int eDetail = pIter->pIndex->pConfig->eDetail;\n    pIter->base.bEof = 0;\n    pIter->base.iRowid = iRowid;\n\n    if( nHit==1 && eDetail==FTS5_DETAIL_FULL ){\n      fts5TokendataIterAppendMap(pIter->pIndex, pT, iMin, 0, iRowid, -1);\n    }else\n    if( nHit>1 && eDetail!=FTS5_DETAIL_NONE ){\n      int nReader = 0;\n      int nByte = 0;\n      i64 iPrev = 0;\n\n      /* Allocate array of iterators if they are not already allocated. */\n      if( pT->aPoslistReader==0 ){\n        pT->aPoslistReader = (Fts5PoslistReader*)sqlite3Fts5MallocZero(\n            &pIter->pIndex->rc,\n            pT->nIter * (sizeof(Fts5PoslistReader) + sizeof(int))\n        );\n        if( pT->aPoslistReader==0 ) return;\n        pT->aPoslistToIter = (int*)&pT->aPoslistReader[pT->nIter];\n      }\n\n      /* Populate an iterator for each poslist that will be merged */\n      for(ii=0; ii<pT->nIter; ii++){\n        Fts5Iter *p = pT->apIter[ii];\n        if( iRowid==p->base.iRowid ){\n          pT->aPoslistToIter[nReader] = ii;\n          sqlite3Fts5PoslistReaderInit(\n              p->base.pData, p->base.nData, &pT->aPoslistReader[nReader++]\n          );\n          nByte += p->base.nData;\n        }\n      }\n\n      /* Ensure the output buffer is large enough */\n      if( fts5BufferGrow(&pIter->pIndex->rc, &pIter->poslist, nByte+nHit*10) ){\n        return;\n      }\n\n      /* Ensure the token-mapping is large enough */\n      if( eDetail==FTS5_DETAIL_FULL && pT->nMapAlloc<(pT->nMap + nByte) ){\n        int nNew = (pT->nMapAlloc + nByte) * 2;\n        Fts5TokenDataMap *aNew = (Fts5TokenDataMap*)sqlite3_realloc(\n            pT->aMap, nNew*sizeof(Fts5TokenDataMap)\n        );\n        if( aNew==0 ){\n          pIter->pIndex->rc = SQLITE_NOMEM;\n          return;\n        }\n        pT->aMap = aNew;\n        pT->nMapAlloc = nNew;\n      }\n\n      pIter->poslist.n = 0;\n\n      while( 1 ){\n        i64 iMinPos = LARGEST_INT64;\n\n        /* Find smallest position */\n        iMin = 0;\n        for(ii=0; ii<nReader; ii++){\n          Fts5PoslistReader *pReader = &pT->aPoslistReader[ii];\n          if( pReader->bEof==0 ){\n            if( pReader->iPos<iMinPos ){\n              iMinPos = pReader->iPos;\n              iMin = ii;\n            }\n          }\n        }\n\n        /* If all readers were at EOF, break out of the loop. */\n        if( iMinPos==LARGEST_INT64 ) break;\n\n        sqlite3Fts5PoslistSafeAppend(&pIter->poslist, &iPrev, iMinPos);\n        sqlite3Fts5PoslistReaderNext(&pT->aPoslistReader[iMin]);\n\n        if( eDetail==FTS5_DETAIL_FULL ){\n          pT->aMap[pT->nMap].iPos = iMinPos;\n          pT->aMap[pT->nMap].iIter = pT->aPoslistToIter[iMin];\n          pT->aMap[pT->nMap].iRowid = iRowid;\n          pT->nMap++;\n        }\n      }\n\n      pIter->base.pData = pIter->poslist.p;\n      pIter->base.nData = pIter->poslist.n;\n    }\n  }\n}\n\n/*\n** The iterator passed as the only argument must be a tokendata=1 iterator\n** (pIter->pTokenDataIter!=0). This function advances the iterator. If\n** argument bFrom is false, then the iterator is advanced to the next\n** entry. Or, if bFrom is true, it is advanced to the first entry with\n** a rowid of iFrom or greater.\n*/\nstatic void fts5TokendataIterNext(Fts5Iter *pIter, int bFrom, i64 iFrom){\n  int ii;\n  Fts5TokenDataIter *pT = pIter->pTokenDataIter;\n  Fts5Index *pIndex = pIter->pIndex;\n\n  for(ii=0; ii<pT->nIter; ii++){\n    Fts5Iter *p = pT->apIter[ii];\n    if( p->base.bEof==0\n     && (p->base.iRowid==pIter->base.iRowid || (bFrom && p->base.iRowid<iFrom))\n    ){\n      fts5MultiIterNext(pIndex, p, bFrom, iFrom);\n      while( bFrom && p->base.bEof==0\n          && p->base.iRowid<iFrom\n          && pIndex->rc==SQLITE_OK\n      ){\n        fts5MultiIterNext(pIndex, p, 0, 0);\n      }\n    }\n  }\n\n  if( pIndex->rc==SQLITE_OK ){\n    fts5IterSetOutputsTokendata(pIter);\n  }\n}\n\n/*\n** If the segment-iterator passed as the first argument is at EOF, then\n** set pIter->term to a copy of buffer pTerm.\n*/\nstatic void fts5TokendataSetTermIfEof(Fts5Iter *pIter, Fts5Buffer *pTerm){\n  if( pIter && pIter->aSeg[0].pLeaf==0 ){\n    fts5BufferSet(&pIter->pIndex->rc, &pIter->aSeg[0].term, pTerm->n, pTerm->p);\n  }\n}\n\n/*\n** This function sets up an iterator to use for a non-prefix query on a\n** tokendata=1 table.\n*/\nstatic Fts5Iter *fts5SetupTokendataIter(\n  Fts5Index *p,                   /* FTS index to query */\n  const u8 *pToken,               /* Buffer containing query term */\n  int nToken,                     /* Size of buffer pToken in bytes */\n  Fts5Colset *pColset             /* Colset to filter on */\n){\n  Fts5Iter *pRet = 0;\n  Fts5TokenDataIter *pSet = 0;\n  Fts5Structure *pStruct = 0;\n  const int flags = FTS5INDEX_QUERY_SCANONETERM | FTS5INDEX_QUERY_SCAN;\n\n  Fts5Buffer bSeek = {0, 0, 0};\n  Fts5Buffer *pSmall = 0;\n\n  fts5IndexFlush(p);\n  pStruct = fts5StructureRead(p);\n\n  while( p->rc==SQLITE_OK ){\n    Fts5Iter *pPrev = pSet ? pSet->apIter[pSet->nIter-1] : 0;\n    Fts5Iter *pNew = 0;\n    Fts5SegIter *pNewIter = 0;\n    Fts5SegIter *pPrevIter = 0;\n\n    int iLvl, iSeg, ii;\n\n    pNew = fts5MultiIterAlloc(p, pStruct->nSegment);\n    if( pSmall ){\n      fts5BufferSet(&p->rc, &bSeek, pSmall->n, pSmall->p);\n      fts5BufferAppendBlob(&p->rc, &bSeek, 1, (const u8*)\"\\0\");\n    }else{\n      fts5BufferSet(&p->rc, &bSeek, nToken, pToken);\n    }\n    if( p->rc ){\n      fts5IterClose((Fts5IndexIter*)pNew);\n      break;\n    }\n\n    pNewIter = &pNew->aSeg[0];\n    pPrevIter = (pPrev ? &pPrev->aSeg[0] : 0);\n    for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n      for(iSeg=pStruct->aLevel[iLvl].nSeg-1; iSeg>=0; iSeg--){\n        Fts5StructureSegment *pSeg = &pStruct->aLevel[iLvl].aSeg[iSeg];\n        int bDone = 0;\n\n        if( pPrevIter ){\n          if( fts5BufferCompare(pSmall, &pPrevIter->term) ){\n            memcpy(pNewIter, pPrevIter, sizeof(Fts5SegIter));\n            memset(pPrevIter, 0, sizeof(Fts5SegIter));\n            bDone = 1;\n          }else if( pPrevIter->iEndofDoclist>pPrevIter->pLeaf->szLeaf ){\n            fts5SegIterNextInit(p,(const char*)bSeek.p,bSeek.n-1,pSeg,pNewIter);\n            bDone = 1;\n          }\n        }\n\n        if( bDone==0 ){\n          fts5SegIterSeekInit(p, bSeek.p, bSeek.n, flags, pSeg, pNewIter);\n        }\n\n        if( pPrevIter ){\n          if( pPrevIter->pTombArray ){\n            pNewIter->pTombArray = pPrevIter->pTombArray;\n            pNewIter->pTombArray->nRef++;\n          }\n        }else{\n          fts5SegIterAllocTombstone(p, pNewIter);\n        }\n\n        pNewIter++;\n        if( pPrevIter ) pPrevIter++;\n        if( p->rc ) break;\n      }\n    }\n    fts5TokendataSetTermIfEof(pPrev, pSmall);\n\n    pNew->bSkipEmpty = 1;\n    pNew->pColset = pColset;\n    fts5IterSetOutputCb(&p->rc, pNew);\n\n    /* Loop through all segments in the new iterator. Find the smallest\n    ** term that any segment-iterator points to. Iterator pNew will be\n    ** used for this term. Also, set any iterator that points to a term that\n    ** does not match pToken/nToken to point to EOF */\n    pSmall = 0;\n    for(ii=0; ii<pNew->nSeg; ii++){\n      Fts5SegIter *pII = &pNew->aSeg[ii];\n      if( 0==fts5IsTokendataPrefix(&pII->term, pToken, nToken) ){\n        fts5SegIterSetEOF(pII);\n      }\n      if( pII->pLeaf && (!pSmall || fts5BufferCompare(pSmall, &pII->term)>0) ){\n        pSmall = &pII->term;\n      }\n    }\n\n    /* If pSmall is still NULL at this point, then the new iterator does\n    ** not point to any terms that match the query. So delete it and break\n    ** out of the loop - all required iterators have been collected.  */\n    if( pSmall==0 ){\n      fts5IterClose((Fts5IndexIter*)pNew);\n      break;\n    }\n\n    /* Append this iterator to the set and continue. */\n    pSet = fts5AppendTokendataIter(p, pSet, pNew);\n  }\n\n  if( p->rc==SQLITE_OK && pSet ){\n    int ii;\n    for(ii=0; ii<pSet->nIter; ii++){\n      Fts5Iter *pIter = pSet->apIter[ii];\n      int iSeg;\n      for(iSeg=0; iSeg<pIter->nSeg; iSeg++){\n        pIter->aSeg[iSeg].flags |= FTS5_SEGITER_ONETERM;\n      }\n      fts5MultiIterFinishSetup(p, pIter);\n    }\n  }\n\n  if( p->rc==SQLITE_OK ){\n    pRet = fts5MultiIterAlloc(p, 0);\n  }\n  if( pRet ){\n    pRet->nSeg = 0;\n    pRet->pTokenDataIter = pSet;\n    if( pSet ){\n      fts5IterSetOutputsTokendata(pRet);\n    }else{\n      pRet->base.bEof = 1;\n    }\n  }else{\n    fts5TokendataIterDelete(pSet);\n  }\n\n  fts5StructureRelease(pStruct);\n  fts5BufferFree(&bSeek);\n  return pRet;\n}\n\n/*\n** Open a new iterator to iterate though all rowid that match the\n** specified token or token prefix.\n*/\nstatic int sqlite3Fts5IndexQuery(\n  Fts5Index *p,                   /* FTS index to query */\n  const char *pToken, int nToken, /* Token (or prefix) to query for */\n  int flags,                      /* Mask of FTS5INDEX_QUERY_X flags */\n  Fts5Colset *pColset,            /* Match these columns only */\n  Fts5IndexIter **ppIter          /* OUT: New iterator object */\n){\n  Fts5Config *pConfig = p->pConfig;\n  Fts5Iter *pRet = 0;\n  Fts5Buffer buf = {0, 0, 0};\n\n  /* If the QUERY_SCAN flag is set, all other flags must be clear. */\n  assert( (flags & FTS5INDEX_QUERY_SCAN)==0 || flags==FTS5INDEX_QUERY_SCAN );\n\n  if( sqlite3Fts5BufferSize(&p->rc, &buf, nToken+1)==0 ){\n    int iIdx = 0;                 /* Index to search */\n    int iPrefixIdx = 0;           /* +1 prefix index */\n    int bTokendata = pConfig->bTokendata;\n    assert( buf.p!=0 );\n    if( nToken>0 ) memcpy(&buf.p[1], pToken, nToken);\n\n    /* The NOTOKENDATA flag is set when each token in a tokendata=1 table\n    ** should be treated individually, instead of merging all those with\n    ** a common prefix into a single entry. This is used, for example, by\n    ** queries performed as part of an integrity-check, or by the fts5vocab\n    ** module.  */\n    if( flags & (FTS5INDEX_QUERY_NOTOKENDATA|FTS5INDEX_QUERY_SCAN) ){\n      bTokendata = 0;\n    }\n\n    /* Figure out which index to search and set iIdx accordingly. If this\n    ** is a prefix query for which there is no prefix index, set iIdx to\n    ** greater than pConfig->nPrefix to indicate that the query will be\n    ** satisfied by scanning multiple terms in the main index.\n    **\n    ** If the QUERY_TEST_NOIDX flag was specified, then this must be a\n    ** prefix-query. Instead of using a prefix-index (if one exists),\n    ** evaluate the prefix query using the main FTS index. This is used\n    ** for internal sanity checking by the integrity-check in debug\n    ** mode only.  */\n#ifdef SQLITE_DEBUG\n    if( pConfig->bPrefixIndex==0 || (flags & FTS5INDEX_QUERY_TEST_NOIDX) ){\n      assert( flags & FTS5INDEX_QUERY_PREFIX );\n      iIdx = 1+pConfig->nPrefix;\n    }else\n#endif\n    if( flags & FTS5INDEX_QUERY_PREFIX ){\n      int nChar = fts5IndexCharlen(pToken, nToken);\n      for(iIdx=1; iIdx<=pConfig->nPrefix; iIdx++){\n        int nIdxChar = pConfig->aPrefix[iIdx-1];\n        if( nIdxChar==nChar ) break;\n        if( nIdxChar==nChar+1 ) iPrefixIdx = iIdx;\n      }\n    }\n\n    if( bTokendata && iIdx==0 ){\n      buf.p[0] = FTS5_MAIN_PREFIX;\n      pRet = fts5SetupTokendataIter(p, buf.p, nToken+1, pColset);\n    }else if( iIdx<=pConfig->nPrefix ){\n      /* Straight index lookup */\n      Fts5Structure *pStruct = fts5StructureRead(p);\n      buf.p[0] = (u8)(FTS5_MAIN_PREFIX + iIdx);\n      if( pStruct ){\n        fts5MultiIterNew(p, pStruct, flags | FTS5INDEX_QUERY_SKIPEMPTY,\n            pColset, buf.p, nToken+1, -1, 0, &pRet\n        );\n        fts5StructureRelease(pStruct);\n      }\n    }else{\n      /* Scan multiple terms in the main index for a prefix query. */\n      int bDesc = (flags & FTS5INDEX_QUERY_DESC)!=0;\n      fts5SetupPrefixIter(p, bDesc, iPrefixIdx, buf.p, nToken+1, pColset,&pRet);\n      if( pRet==0 ){\n        assert( p->rc!=SQLITE_OK );\n      }else{\n        assert( pRet->pColset==0 );\n        fts5IterSetOutputCb(&p->rc, pRet);\n        if( p->rc==SQLITE_OK ){\n          Fts5SegIter *pSeg = &pRet->aSeg[pRet->aFirst[1].iFirst];\n          if( pSeg->pLeaf ) pRet->xSetOutputs(pRet, pSeg);\n        }\n      }\n    }\n\n    if( p->rc ){\n      fts5IterClose((Fts5IndexIter*)pRet);\n      pRet = 0;\n      fts5IndexCloseReader(p);\n    }\n\n    *ppIter = (Fts5IndexIter*)pRet;\n    sqlite3Fts5BufferFree(&buf);\n  }\n  return fts5IndexReturn(p);\n}\n\n/*\n** Return true if the iterator passed as the only argument is at EOF.\n*/\n/*\n** Move to the next matching rowid.\n*/\nstatic int sqlite3Fts5IterNext(Fts5IndexIter *pIndexIter){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  assert( pIter->pIndex->rc==SQLITE_OK );\n  if( pIter->nSeg==0 ){\n    assert( pIter->pTokenDataIter );\n    fts5TokendataIterNext(pIter, 0, 0);\n  }else{\n    fts5MultiIterNext(pIter->pIndex, pIter, 0, 0);\n  }\n  return fts5IndexReturn(pIter->pIndex);\n}\n\n/*\n** Move to the next matching term/rowid. Used by the fts5vocab module.\n*/\nstatic int sqlite3Fts5IterNextScan(Fts5IndexIter *pIndexIter){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  Fts5Index *p = pIter->pIndex;\n\n  assert( pIter->pIndex->rc==SQLITE_OK );\n\n  fts5MultiIterNext(p, pIter, 0, 0);\n  if( p->rc==SQLITE_OK ){\n    Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];\n    if( pSeg->pLeaf && pSeg->term.p[0]!=FTS5_MAIN_PREFIX ){\n      fts5DataRelease(pSeg->pLeaf);\n      pSeg->pLeaf = 0;\n      pIter->base.bEof = 1;\n    }\n  }\n\n  return fts5IndexReturn(pIter->pIndex);\n}\n\n/*\n** Move to the next matching rowid that occurs at or after iMatch. The\n** definition of \"at or after\" depends on whether this iterator iterates\n** in ascending or descending rowid order.\n*/\nstatic int sqlite3Fts5IterNextFrom(Fts5IndexIter *pIndexIter, i64 iMatch){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  if( pIter->nSeg==0 ){\n    assert( pIter->pTokenDataIter );\n    fts5TokendataIterNext(pIter, 1, iMatch);\n  }else{\n    fts5MultiIterNextFrom(pIter->pIndex, pIter, iMatch);\n  }\n  return fts5IndexReturn(pIter->pIndex);\n}\n\n/*\n** Return the current term.\n*/\nstatic const char *sqlite3Fts5IterTerm(Fts5IndexIter *pIndexIter, int *pn){\n  int n;\n  const char *z = (const char*)fts5MultiIterTerm((Fts5Iter*)pIndexIter, &n);\n  assert_nc( z || n<=1 );\n  *pn = n-1;\n  return (z ? &z[1] : 0);\n}\n\n/*\n** pIter is a prefix query. This function populates pIter->pTokenDataIter\n** with an Fts5TokenDataIter object containing mappings for all rows\n** matched by the query.\n*/\nstatic int fts5SetupPrefixIterTokendata(\n  Fts5Iter *pIter,\n  const char *pToken,             /* Token prefix to search for */\n  int nToken                      /* Size of pToken in bytes */\n){\n  Fts5Index *p = pIter->pIndex;\n  Fts5Buffer token = {0, 0, 0};\n  TokendataSetupCtx ctx;\n\n  memset(&ctx, 0, sizeof(ctx));\n\n  fts5BufferGrow(&p->rc, &token, nToken+1);\n  assert( token.p!=0 || p->rc!=SQLITE_OK );\n  ctx.pT = (Fts5TokenDataIter*)sqlite3Fts5MallocZero(&p->rc,\n                                                   SZ_FTS5TOKENDATAITER(1));\n\n  if( p->rc==SQLITE_OK ){\n\n    /* Fill in the token prefix to search for */\n    token.p[0] = FTS5_MAIN_PREFIX;\n    memcpy(&token.p[1], pToken, nToken);\n    token.n = nToken+1;\n\n    fts5VisitEntries(\n        p, 0, token.p, token.n, 1, prefixIterSetupTokendataCb, (void*)&ctx\n    );\n\n    fts5TokendataIterSortMap(p, ctx.pT);\n  }\n\n  if( p->rc==SQLITE_OK ){\n    pIter->pTokenDataIter = ctx.pT;\n  }else{\n    fts5TokendataIterDelete(ctx.pT);\n  }\n  fts5BufferFree(&token);\n\n  return fts5IndexReturn(p);\n}\n\n/*\n** This is used by xInstToken() to access the token at offset iOff, column\n** iCol of row iRowid. The token is returned via output variables *ppOut\n** and *pnOut. The iterator passed as the first argument must be a tokendata=1\n** iterator (pIter->pTokenDataIter!=0).\n**\n** pToken/nToken:\n*/\nstatic int sqlite3Fts5IterToken(\n  Fts5IndexIter *pIndexIter,\n  const char *pToken, int nToken,\n  i64 iRowid,\n  int iCol,\n  int iOff,\n  const char **ppOut, int *pnOut\n){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  Fts5TokenDataIter *pT = pIter->pTokenDataIter;\n  i64 iPos = (((i64)iCol)<<32) + iOff;\n  Fts5TokenDataMap *aMap = 0;\n  int i1 = 0;\n  int i2 = 0;\n  int iTest = 0;\n\n  assert( pT || (pToken && pIter->nSeg>0) );\n  if( pT==0 ){\n    int rc = fts5SetupPrefixIterTokendata(pIter, pToken, nToken);\n    if( rc!=SQLITE_OK ) return rc;\n    pT = pIter->pTokenDataIter;\n  }\n\n  i2 = pT->nMap;\n  aMap = pT->aMap;\n\n  while( i2>i1 ){\n    iTest = (i1 + i2) / 2;\n\n    if( aMap[iTest].iRowid<iRowid ){\n      i1 = iTest+1;\n    }else if( aMap[iTest].iRowid>iRowid ){\n      i2 = iTest;\n    }else{\n      if( aMap[iTest].iPos<iPos ){\n        if( aMap[iTest].iPos<0 ){\n          break;\n        }\n        i1 = iTest+1;\n      }else if( aMap[iTest].iPos>iPos ){\n        i2 = iTest;\n      }else{\n        break;\n      }\n    }\n  }\n\n  if( i2>i1 ){\n    if( pIter->nSeg==0 ){\n      Fts5Iter *pMap = pT->apIter[aMap[iTest].iIter];\n      *ppOut = (const char*)pMap->aSeg[0].term.p+1;\n      *pnOut = pMap->aSeg[0].term.n-1;\n    }else{\n      Fts5TokenDataMap *p = &aMap[iTest];\n      *ppOut = (const char*)&pT->terms.p[p->iIter];\n      *pnOut = aMap[iTest].nByte;\n    }\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** Clear any existing entries from the token-map associated with the\n** iterator passed as the only argument.\n*/\nstatic void sqlite3Fts5IndexIterClearTokendata(Fts5IndexIter *pIndexIter){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  if( pIter && pIter->pTokenDataIter\n   && (pIter->nSeg==0 || pIter->pIndex->pConfig->eDetail!=FTS5_DETAIL_FULL)\n  ){\n    pIter->pTokenDataIter->nMap = 0;\n  }\n}\n\n/*\n** Set a token-mapping for the iterator passed as the first argument. This\n** is used in detail=column or detail=none mode when a token is requested\n** using the xInstToken() API. In this case the caller tokenizers the\n** current row and configures the token-mapping via multiple calls to this\n** function.\n*/\nstatic int sqlite3Fts5IndexIterWriteTokendata(\n  Fts5IndexIter *pIndexIter,\n  const char *pToken, int nToken,\n  i64 iRowid, int iCol, int iOff\n){\n  Fts5Iter *pIter = (Fts5Iter*)pIndexIter;\n  Fts5TokenDataIter *pT = pIter->pTokenDataIter;\n  Fts5Index *p = pIter->pIndex;\n  i64 iPos = (((i64)iCol)<<32) + iOff;\n\n  assert( p->pConfig->eDetail!=FTS5_DETAIL_FULL );\n  assert( pIter->pTokenDataIter || pIter->nSeg>0 );\n  if( pIter->nSeg>0 ){\n    /* This is a prefix term iterator. */\n    if( pT==0 ){\n      pT = (Fts5TokenDataIter*)sqlite3Fts5MallocZero(&p->rc,\n                                           SZ_FTS5TOKENDATAITER(1));\n      pIter->pTokenDataIter = pT;\n    }\n    if( pT ){\n      fts5TokendataIterAppendMap(p, pT, pT->terms.n, nToken, iRowid, iPos);\n      fts5BufferAppendBlob(&p->rc, &pT->terms, nToken, (const u8*)pToken);\n    }\n  }else{\n    int ii;\n    for(ii=0; ii<pT->nIter; ii++){\n      Fts5Buffer *pTerm = &pT->apIter[ii]->aSeg[0].term;\n      if( nToken==pTerm->n-1 && memcmp(pToken, pTerm->p+1, nToken)==0 ) break;\n    }\n    if( ii<pT->nIter ){\n      fts5TokendataIterAppendMap(p, pT, ii, 0, iRowid, iPos);\n    }\n  }\n  return fts5IndexReturn(p);\n}\n\n/*\n** Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().\n*/\nstatic void sqlite3Fts5IterClose(Fts5IndexIter *pIndexIter){\n  if( pIndexIter ){\n    Fts5Index *pIndex = ((Fts5Iter*)pIndexIter)->pIndex;\n    fts5IterClose(pIndexIter);\n    fts5IndexReturn(pIndex);\n  }\n}\n\n/*\n** Read and decode the \"averages\" record from the database.\n**\n** Parameter anSize must point to an array of size nCol, where nCol is\n** the number of user defined columns in the FTS table.\n*/\nstatic int sqlite3Fts5IndexGetAverages(Fts5Index *p, i64 *pnRow, i64 *anSize){\n  int nCol = p->pConfig->nCol;\n  Fts5Data *pData;\n\n  *pnRow = 0;\n  memset(anSize, 0, sizeof(i64) * nCol);\n  pData = fts5DataRead(p, FTS5_AVERAGES_ROWID);\n  if( p->rc==SQLITE_OK && pData->nn ){\n    int i = 0;\n    int iCol;\n    i += fts5GetVarint(&pData->p[i], (u64*)pnRow);\n    for(iCol=0; i<pData->nn && iCol<nCol; iCol++){\n      i += fts5GetVarint(&pData->p[i], (u64*)&anSize[iCol]);\n    }\n  }\n\n  fts5DataRelease(pData);\n  return fts5IndexReturn(p);\n}\n\n/*\n** Replace the current \"averages\" record with the contents of the buffer\n** supplied as the second argument.\n*/\nstatic int sqlite3Fts5IndexSetAverages(Fts5Index *p, const u8 *pData, int nData){\n  assert( p->rc==SQLITE_OK );\n  fts5DataWrite(p, FTS5_AVERAGES_ROWID, pData, nData);\n  return fts5IndexReturn(p);\n}\n\n/*\n** Return the total number of blocks this module has read from the %_data\n** table since it was created.\n*/\nstatic int sqlite3Fts5IndexReads(Fts5Index *p){\n  return p->nRead;\n}\n\n/*\n** Set the 32-bit cookie value stored at the start of all structure\n** records to the value passed as the second argument.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs.\n*/\nstatic int sqlite3Fts5IndexSetCookie(Fts5Index *p, int iNew){\n  int rc;                              /* Return code */\n  Fts5Config *pConfig = p->pConfig;    /* Configuration object */\n  u8 aCookie[4];                       /* Binary representation of iNew */\n  sqlite3_blob *pBlob = 0;\n\n  assert( p->rc==SQLITE_OK );\n  sqlite3Fts5Put32(aCookie, iNew);\n\n  rc = sqlite3_blob_open(pConfig->db, pConfig->zDb, p->zDataTbl,\n      \"block\", FTS5_STRUCTURE_ROWID, 1, &pBlob\n  );\n  if( rc==SQLITE_OK ){\n    sqlite3_blob_write(pBlob, aCookie, 4, 0);\n    rc = sqlite3_blob_close(pBlob);\n  }\n\n  return rc;\n}\n\nstatic int sqlite3Fts5IndexLoadConfig(Fts5Index *p){\n  Fts5Structure *pStruct;\n  pStruct = fts5StructureRead(p);\n  fts5StructureRelease(pStruct);\n  return fts5IndexReturn(p);\n}\n\n/*\n** Retrieve the origin value that will be used for the segment currently\n** being accumulated in the in-memory hash table when it is flushed to\n** disk. If successful, SQLITE_OK is returned and (*piOrigin) set to\n** the queried value. Or, if an error occurs, an error code is returned\n** and the final value of (*piOrigin) is undefined.\n*/\nstatic int sqlite3Fts5IndexGetOrigin(Fts5Index *p, i64 *piOrigin){\n  Fts5Structure *pStruct;\n  pStruct = fts5StructureRead(p);\n  if( pStruct ){\n    *piOrigin = pStruct->nOriginCntr;\n    fts5StructureRelease(pStruct);\n  }\n  return fts5IndexReturn(p);\n}\n\n/*\n** Buffer pPg contains a page of a tombstone hash table - one of nPg pages\n** associated with the same segment. This function adds rowid iRowid to\n** the hash table. The caller is required to guarantee that there is at\n** least one free slot on the page.\n**\n** If parameter bForce is false and the hash table is deemed to be full\n** (more than half of the slots are occupied), then non-zero is returned\n** and iRowid not inserted. Or, if bForce is true or if the hash table page\n** is not full, iRowid is inserted and zero returned.\n*/\nstatic int fts5IndexTombstoneAddToPage(\n  Fts5Data *pPg,\n  int bForce,\n  int nPg,\n  u64 iRowid\n){\n  const int szKey = TOMBSTONE_KEYSIZE(pPg);\n  const int nSlot = TOMBSTONE_NSLOT(pPg);\n  const int nElem = fts5GetU32(&pPg->p[4]);\n  int iSlot = (iRowid / nPg) % nSlot;\n  int nCollide = nSlot;\n\n  if( szKey==4 && iRowid>0xFFFFFFFF ) return 2;\n  if( iRowid==0 ){\n    pPg->p[1] = 0x01;\n    return 0;\n  }\n\n  if( bForce==0 && nElem>=(nSlot/2) ){\n    return 1;\n  }\n\n  fts5PutU32(&pPg->p[4], nElem+1);\n  if( szKey==4 ){\n    u32 *aSlot = (u32*)&pPg->p[8];\n    while( aSlot[iSlot] ){\n      iSlot = (iSlot + 1) % nSlot;\n      if( nCollide--==0 ) return 0;\n    }\n    fts5PutU32((u8*)&aSlot[iSlot], (u32)iRowid);\n  }else{\n    u64 *aSlot = (u64*)&pPg->p[8];\n    while( aSlot[iSlot] ){\n      iSlot = (iSlot + 1) % nSlot;\n      if( nCollide--==0 ) return 0;\n    }\n    fts5PutU64((u8*)&aSlot[iSlot], iRowid);\n  }\n\n  return 0;\n}\n\n/*\n** This function attempts to build a new hash containing all the keys\n** currently in the tombstone hash table for segment pSeg. The new\n** hash will be stored in the nOut buffers passed in array apOut[].\n** All pages of the new hash use key-size szKey (4 or 8).\n**\n** Return 0 if the hash is successfully rebuilt into the nOut pages.\n** Or non-zero if it is not (because one page became overfull). In this\n** case the caller should retry with a larger nOut parameter.\n**\n** Parameter pData1 is page iPg1 of the hash table being rebuilt.\n*/\nstatic int fts5IndexTombstoneRehash(\n  Fts5Index *p,\n  Fts5StructureSegment *pSeg,     /* Segment to rebuild hash of */\n  Fts5Data *pData1,               /* One page of current hash - or NULL */\n  int iPg1,                       /* Which page of the current hash is pData1 */\n  int szKey,                      /* 4 or 8, the keysize */\n  int nOut,                       /* Number of output pages */\n  Fts5Data **apOut                /* Array of output hash pages */\n){\n  int ii;\n  int res = 0;\n\n  /* Initialize the headers of all the output pages */\n  for(ii=0; ii<nOut; ii++){\n    apOut[ii]->p[0] = szKey;\n    fts5PutU32(&apOut[ii]->p[4], 0);\n  }\n\n  /* Loop through the current pages of the hash table. */\n  for(ii=0; res==0 && ii<pSeg->nPgTombstone; ii++){\n    Fts5Data *pData = 0;          /* Page ii of the current hash table */\n    Fts5Data *pFree = 0;          /* Free this at the end of the loop */\n\n    if( iPg1==ii ){\n      pData = pData1;\n    }else{\n      pFree = pData = fts5DataRead(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid, ii));\n    }\n\n    if( pData ){\n      int szKeyIn = TOMBSTONE_KEYSIZE(pData);\n      int nSlotIn = (pData->nn - 8) / szKeyIn;\n      int iIn;\n      for(iIn=0; iIn<nSlotIn; iIn++){\n        u64 iVal = 0;\n\n        /* Read the value from slot iIn of the input page into iVal. */\n        if( szKeyIn==4 ){\n          u32 *aSlot = (u32*)&pData->p[8];\n          if( aSlot[iIn] ) iVal = fts5GetU32((u8*)&aSlot[iIn]);\n        }else{\n          u64 *aSlot = (u64*)&pData->p[8];\n          if( aSlot[iIn] ) iVal = fts5GetU64((u8*)&aSlot[iIn]);\n        }\n\n        /* If iVal is not 0 at this point, insert it into the new hash table */\n        if( iVal ){\n          Fts5Data *pPg = apOut[(iVal % nOut)];\n          res = fts5IndexTombstoneAddToPage(pPg, 0, nOut, iVal);\n          if( res ) break;\n        }\n      }\n\n      /* If this is page 0 of the old hash, copy the rowid-0-flag from the\n      ** old hash to the new.  */\n      if( ii==0 ){\n        apOut[0]->p[1] = pData->p[1];\n      }\n    }\n    fts5DataRelease(pFree);\n  }\n\n  return res;\n}\n\n/*\n** This is called to rebuild the hash table belonging to segment pSeg.\n** If parameter pData1 is not NULL, then one page of the existing hash table\n** has already been loaded - pData1, which is page iPg1. The key-size for\n** the new hash table is szKey (4 or 8).\n**\n** If successful, the new hash table is not written to disk. Instead,\n** output parameter (*pnOut) is set to the number of pages in the new\n** hash table, and (*papOut) to point to an array of buffers containing\n** the new page data.\n**\n** If an error occurs, an error code is left in the Fts5Index object and\n** both output parameters set to 0 before returning.\n*/\nstatic void fts5IndexTombstoneRebuild(\n  Fts5Index *p,\n  Fts5StructureSegment *pSeg,     /* Segment to rebuild hash of */\n  Fts5Data *pData1,               /* One page of current hash - or NULL */\n  int iPg1,                       /* Which page of the current hash is pData1 */\n  int szKey,                      /* 4 or 8, the keysize */\n  int *pnOut,                     /* OUT: Number of output pages */\n  Fts5Data ***papOut              /* OUT: Output hash pages */\n){\n  const int MINSLOT = 32;\n  int nSlotPerPage = MAX(MINSLOT, (p->pConfig->pgsz - 8) / szKey);\n  int nSlot = 0;                  /* Number of slots in each output page */\n  int nOut = 0;\n\n  /* Figure out how many output pages (nOut) and how many slots per\n  ** page (nSlot).  There are three possibilities:\n  **\n  **   1. The hash table does not yet exist. In this case the new hash\n  **      table will consist of a single page with MINSLOT slots.\n  **\n  **   2. The hash table exists but is currently a single page. In this\n  **      case an attempt is made to grow the page to accommodate the new\n  **      entry. The page is allowed to grow up to nSlotPerPage (see above)\n  **      slots.\n  **\n  **   3. The hash table already consists of more than one page, or of\n  **      a single page already so large that it cannot be grown. In this\n  **      case the new hash consists of (nPg*2+1) pages of nSlotPerPage\n  **      slots each, where nPg is the current number of pages in the\n  **      hash table.\n  */\n  if( pSeg->nPgTombstone==0 ){\n    /* Case 1. */\n    nOut = 1;\n    nSlot = MINSLOT;\n  }else if( pSeg->nPgTombstone==1 ){\n    /* Case 2. */\n    int nElem = (int)fts5GetU32(&pData1->p[4]);\n    assert( pData1 && iPg1==0 );\n    nOut = 1;\n    nSlot = MAX(nElem*4, MINSLOT);\n    if( nSlot>nSlotPerPage ) nOut = 0;\n  }\n  if( nOut==0 ){\n    /* Case 3. */\n    nOut = (pSeg->nPgTombstone * 2 + 1);\n    nSlot = nSlotPerPage;\n  }\n\n  /* Allocate the required array and output pages */\n  while( 1 ){\n    int res = 0;\n    int ii = 0;\n    int szPage = 0;\n    Fts5Data **apOut = 0;\n\n    /* Allocate space for the new hash table */\n    assert( nSlot>=MINSLOT );\n    apOut = (Fts5Data**)sqlite3Fts5MallocZero(&p->rc, sizeof(Fts5Data*) * nOut);\n    szPage = 8 + nSlot*szKey;\n    for(ii=0; ii<nOut; ii++){\n      Fts5Data *pNew = (Fts5Data*)sqlite3Fts5MallocZero(&p->rc,\n          sizeof(Fts5Data)+szPage\n      );\n      if( pNew ){\n        pNew->nn = szPage;\n        pNew->p = (u8*)&pNew[1];\n        apOut[ii] = pNew;\n      }\n    }\n\n    /* Rebuild the hash table. */\n    if( p->rc==SQLITE_OK ){\n      res = fts5IndexTombstoneRehash(p, pSeg, pData1, iPg1, szKey, nOut, apOut);\n    }\n    if( res==0 ){\n      if( p->rc ){\n        fts5IndexFreeArray(apOut, nOut);\n        apOut = 0;\n        nOut = 0;\n      }\n      *pnOut = nOut;\n      *papOut = apOut;\n      break;\n    }\n\n    /* If control flows to here, it was not possible to rebuild the hash\n    ** table. Free all buffers and then try again with more pages. */\n    assert( p->rc==SQLITE_OK );\n    fts5IndexFreeArray(apOut, nOut);\n    nSlot = nSlotPerPage;\n    nOut = nOut*2 + 1;\n  }\n}\n\n\n/*\n** Add a tombstone for rowid iRowid to segment pSeg.\n*/\nstatic void fts5IndexTombstoneAdd(\n  Fts5Index *p,\n  Fts5StructureSegment *pSeg,\n  u64 iRowid\n){\n  Fts5Data *pPg = 0;\n  int iPg = -1;\n  int szKey = 0;\n  int nHash = 0;\n  Fts5Data **apHash = 0;\n\n  p->nContentlessDelete++;\n\n  if( pSeg->nPgTombstone>0 ){\n    iPg = iRowid % pSeg->nPgTombstone;\n    pPg = fts5DataRead(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid,iPg));\n    if( pPg==0 ){\n      assert( p->rc!=SQLITE_OK );\n      return;\n    }\n\n    if( 0==fts5IndexTombstoneAddToPage(pPg, 0, pSeg->nPgTombstone, iRowid) ){\n      fts5DataWrite(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid,iPg), pPg->p, pPg->nn);\n      fts5DataRelease(pPg);\n      return;\n    }\n  }\n\n  /* Have to rebuild the hash table. First figure out the key-size (4 or 8). */\n  szKey = pPg ? TOMBSTONE_KEYSIZE(pPg) : 4;\n  if( iRowid>0xFFFFFFFF ) szKey = 8;\n\n  /* Rebuild the hash table */\n  fts5IndexTombstoneRebuild(p, pSeg, pPg, iPg, szKey, &nHash, &apHash);\n  assert( p->rc==SQLITE_OK || (nHash==0 && apHash==0) );\n\n  /* If all has succeeded, write the new rowid into one of the new hash\n  ** table pages, then write them all out to disk. */\n  if( nHash ){\n    int ii = 0;\n    fts5IndexTombstoneAddToPage(apHash[iRowid % nHash], 1, nHash, iRowid);\n    for(ii=0; ii<nHash; ii++){\n      i64 iTombstoneRowid = FTS5_TOMBSTONE_ROWID(pSeg->iSegid, ii);\n      fts5DataWrite(p, iTombstoneRowid, apHash[ii]->p, apHash[ii]->nn);\n    }\n    pSeg->nPgTombstone = nHash;\n    fts5StructureWrite(p, p->pStruct);\n  }\n\n  fts5DataRelease(pPg);\n  fts5IndexFreeArray(apHash, nHash);\n}\n\n/*\n** Add iRowid to the tombstone list of the segment or segments that contain\n** rows from origin iOrigin. Return SQLITE_OK if successful, or an SQLite\n** error code otherwise.\n*/\nstatic int sqlite3Fts5IndexContentlessDelete(Fts5Index *p, i64 iOrigin, i64 iRowid){\n  Fts5Structure *pStruct;\n  pStruct = fts5StructureRead(p);\n  if( pStruct ){\n    int bFound = 0;               /* True after pSeg->nEntryTombstone incr. */\n    int iLvl;\n    for(iLvl=pStruct->nLevel-1; iLvl>=0; iLvl--){\n      int iSeg;\n      for(iSeg=pStruct->aLevel[iLvl].nSeg-1; iSeg>=0; iSeg--){\n        Fts5StructureSegment *pSeg = &pStruct->aLevel[iLvl].aSeg[iSeg];\n        if( pSeg->iOrigin1<=(u64)iOrigin && pSeg->iOrigin2>=(u64)iOrigin ){\n          if( bFound==0 ){\n            pSeg->nEntryTombstone++;\n            bFound = 1;\n          }\n          fts5IndexTombstoneAdd(p, pSeg, iRowid);\n        }\n      }\n    }\n    fts5StructureRelease(pStruct);\n  }\n  return fts5IndexReturn(p);\n}\n\n/*************************************************************************\n**************************************************************************\n** Below this point is the implementation of the integrity-check\n** functionality.\n*/\n\n/*\n** Return a simple checksum value based on the arguments.\n*/\nstatic u64 sqlite3Fts5IndexEntryCksum(\n  i64 iRowid,\n  int iCol,\n  int iPos,\n  int iIdx,\n  const char *pTerm,\n  int nTerm\n){\n  int i;\n  u64 ret = iRowid;\n  ret += (ret<<3) + iCol;\n  ret += (ret<<3) + iPos;\n  if( iIdx>=0 ) ret += (ret<<3) + (FTS5_MAIN_PREFIX + iIdx);\n  for(i=0; i<nTerm; i++) ret += (ret<<3) + pTerm[i];\n  return ret;\n}\n\n#ifdef SQLITE_DEBUG\n/*\n** This function is purely an internal test. It does not contribute to\n** FTS functionality, or even the integrity-check, in any way.\n**\n** Instead, it tests that the same set of pgno/rowid combinations are\n** visited regardless of whether the doclist-index identified by parameters\n** iSegid/iLeaf is iterated in forwards or reverse order.\n*/\nstatic void fts5TestDlidxReverse(\n  Fts5Index *p,\n  int iSegid,                     /* Segment id to load from */\n  int iLeaf                       /* Load doclist-index for this leaf */\n){\n  Fts5DlidxIter *pDlidx = 0;\n  u64 cksum1 = 13;\n  u64 cksum2 = 13;\n\n  for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iLeaf);\n      fts5DlidxIterEof(p, pDlidx)==0;\n      fts5DlidxIterNext(p, pDlidx)\n  ){\n    i64 iRowid = fts5DlidxIterRowid(pDlidx);\n    int pgno = fts5DlidxIterPgno(pDlidx);\n    assert( pgno>iLeaf );\n    cksum1 += iRowid + ((i64)pgno<<32);\n  }\n  fts5DlidxIterFree(pDlidx);\n  pDlidx = 0;\n\n  for(pDlidx=fts5DlidxIterInit(p, 1, iSegid, iLeaf);\n      fts5DlidxIterEof(p, pDlidx)==0;\n      fts5DlidxIterPrev(p, pDlidx)\n  ){\n    i64 iRowid = fts5DlidxIterRowid(pDlidx);\n    int pgno = fts5DlidxIterPgno(pDlidx);\n    assert( fts5DlidxIterPgno(pDlidx)>iLeaf );\n    cksum2 += iRowid + ((i64)pgno<<32);\n  }\n  fts5DlidxIterFree(pDlidx);\n  pDlidx = 0;\n\n  if( p->rc==SQLITE_OK && cksum1!=cksum2 ) p->rc = FTS5_CORRUPT;\n}\n\nstatic int fts5QueryCksum(\n  Fts5Index *p,                   /* Fts5 index object */\n  int iIdx,\n  const char *z,                  /* Index key to query for */\n  int n,                          /* Size of index key in bytes */\n  int flags,                      /* Flags for Fts5IndexQuery */\n  u64 *pCksum                     /* IN/OUT: Checksum value */\n){\n  int eDetail = p->pConfig->eDetail;\n  u64 cksum = *pCksum;\n  Fts5IndexIter *pIter = 0;\n  int rc = sqlite3Fts5IndexQuery(\n      p, z, n, (flags | FTS5INDEX_QUERY_NOTOKENDATA), 0, &pIter\n  );\n\n  while( rc==SQLITE_OK && ALWAYS(pIter!=0) && 0==sqlite3Fts5IterEof(pIter) ){\n    i64 rowid = pIter->iRowid;\n\n    if( eDetail==FTS5_DETAIL_NONE ){\n      cksum ^= sqlite3Fts5IndexEntryCksum(rowid, 0, 0, iIdx, z, n);\n    }else{\n      Fts5PoslistReader sReader;\n      for(sqlite3Fts5PoslistReaderInit(pIter->pData, pIter->nData, &sReader);\n          sReader.bEof==0;\n          sqlite3Fts5PoslistReaderNext(&sReader)\n      ){\n        int iCol = FTS5_POS2COLUMN(sReader.iPos);\n        int iOff = FTS5_POS2OFFSET(sReader.iPos);\n        cksum ^= sqlite3Fts5IndexEntryCksum(rowid, iCol, iOff, iIdx, z, n);\n      }\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts5IterNext(pIter);\n    }\n  }\n  fts5IterClose(pIter);\n\n  *pCksum = cksum;\n  return rc;\n}\n\n/*\n** Check if buffer z[], size n bytes, contains as series of valid utf-8\n** encoded codepoints. If so, return 0. Otherwise, if the buffer does not\n** contain valid utf-8, return non-zero.\n*/\nstatic int fts5TestUtf8(const char *z, int n){\n  int i = 0;\n  assert_nc( n>0 );\n  while( i<n ){\n    if( (z[i] & 0x80)==0x00 ){\n      i++;\n    }else\n    if( (z[i] & 0xE0)==0xC0 ){\n      if( i+1>=n || (z[i+1] & 0xC0)!=0x80 ) return 1;\n      i += 2;\n    }else\n    if( (z[i] & 0xF0)==0xE0 ){\n      if( i+2>=n || (z[i+1] & 0xC0)!=0x80 || (z[i+2] & 0xC0)!=0x80 ) return 1;\n      i += 3;\n    }else\n    if( (z[i] & 0xF8)==0xF0 ){\n      if( i+3>=n || (z[i+1] & 0xC0)!=0x80 || (z[i+2] & 0xC0)!=0x80 ) return 1;\n      if( (z[i+2] & 0xC0)!=0x80 ) return 1;\n      i += 3;\n    }else{\n      return 1;\n    }\n  }\n\n  return 0;\n}\n\n/*\n** This function is also purely an internal test. It does not contribute to\n** FTS functionality, or even the integrity-check, in any way.\n**\n** This function sets output variable (*pbFail) to true if the test fails. Or\n** leaves it unchanged if the test succeeds.\n*/\nstatic void fts5TestTerm(\n  Fts5Index *p,\n  Fts5Buffer *pPrev,              /* Previous term */\n  const char *z, int n,           /* Possibly new term to test */\n  u64 expected,\n  u64 *pCksum,\n  int *pbFail\n){\n  int rc = p->rc;\n  if( pPrev->n==0 ){\n    fts5BufferSet(&rc, pPrev, n, (const u8*)z);\n  }else\n  if( *pbFail==0\n   && rc==SQLITE_OK\n   && (pPrev->n!=n || memcmp(pPrev->p, z, n))\n   && (p->pHash==0 || p->pHash->nEntry==0)\n  ){\n    u64 cksum3 = *pCksum;\n    const char *zTerm = (const char*)&pPrev->p[1];  /* term sans prefix-byte */\n    int nTerm = pPrev->n-1;            /* Size of zTerm in bytes */\n    int iIdx = (pPrev->p[0] - FTS5_MAIN_PREFIX);\n    int flags = (iIdx==0 ? 0 : FTS5INDEX_QUERY_PREFIX);\n    u64 ck1 = 0;\n    u64 ck2 = 0;\n\n    /* Check that the results returned for ASC and DESC queries are\n    ** the same. If not, call this corruption.  */\n    rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, flags, &ck1);\n    if( rc==SQLITE_OK ){\n      int f = flags|FTS5INDEX_QUERY_DESC;\n      rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);\n    }\n    if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;\n\n    /* If this is a prefix query, check that the results returned if the\n    ** the index is disabled are the same. In both ASC and DESC order.\n    **\n    ** This check may only be performed if the hash table is empty. This\n    ** is because the hash table only supports a single scan query at\n    ** a time, and the multi-iter loop from which this function is called\n    ** is already performing such a scan.\n    **\n    ** Also only do this if buffer zTerm contains nTerm bytes of valid\n    ** utf-8. Otherwise, the last part of the buffer contents might contain\n    ** a non-utf-8 sequence that happens to be a prefix of a valid utf-8\n    ** character stored in the main fts index, which will cause the\n    ** test to fail.  */\n    if( p->nPendingData==0 && 0==fts5TestUtf8(zTerm, nTerm) ){\n      if( iIdx>0 && rc==SQLITE_OK ){\n        int f = flags|FTS5INDEX_QUERY_TEST_NOIDX;\n        ck2 = 0;\n        rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);\n        if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;\n      }\n      if( iIdx>0 && rc==SQLITE_OK ){\n        int f = flags|FTS5INDEX_QUERY_TEST_NOIDX|FTS5INDEX_QUERY_DESC;\n        ck2 = 0;\n        rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);\n        if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;\n      }\n    }\n\n    cksum3 ^= ck1;\n    fts5BufferSet(&rc, pPrev, n, (const u8*)z);\n\n    if( rc==SQLITE_OK && cksum3!=expected ){\n      *pbFail = 1;\n    }\n    *pCksum = cksum3;\n  }\n  p->rc = rc;\n}\n\n#else\n# define fts5TestDlidxReverse(x,y,z)\n# define fts5TestTerm(t,u,v,w,x,y,z)\n#endif\n\n/*\n** Check that:\n**\n**   1) All leaves of pSeg between iFirst and iLast (inclusive) exist and\n**      contain zero terms.\n**   2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and\n**      contain zero rowids.\n*/\nstatic void fts5IndexIntegrityCheckEmpty(\n  Fts5Index *p,\n  Fts5StructureSegment *pSeg,     /* Segment to check internal consistency */\n  int iFirst,\n  int iNoRowid,\n  int iLast\n){\n  int i;\n\n  /* Now check that the iter.nEmpty leaves following the current leaf\n  ** (a) exist and (b) contain no terms. */\n  for(i=iFirst; p->rc==SQLITE_OK && i<=iLast; i++){\n    Fts5Data *pLeaf = fts5DataRead(p, FTS5_SEGMENT_ROWID(pSeg->iSegid, i));\n    if( pLeaf ){\n      if( !fts5LeafIsTermless(pLeaf)\n       || (i>=iNoRowid && 0!=fts5LeafFirstRowidOff(pLeaf))\n      ){\n        FTS5_CORRUPT_ROWID(p, FTS5_SEGMENT_ROWID(pSeg->iSegid, i));\n      }\n    }\n    fts5DataRelease(pLeaf);\n  }\n}\n\nstatic void fts5IntegrityCheckPgidx(Fts5Index *p, i64 iRowid, Fts5Data *pLeaf){\n  i64 iTermOff = 0;\n  int ii;\n\n  Fts5Buffer buf1 = {0,0,0};\n  Fts5Buffer buf2 = {0,0,0};\n\n  ii = pLeaf->szLeaf;\n  while( ii<pLeaf->nn && p->rc==SQLITE_OK ){\n    int res;\n    i64 iOff;\n    int nIncr;\n\n    ii += fts5GetVarint32(&pLeaf->p[ii], nIncr);\n    iTermOff += nIncr;\n    iOff = iTermOff;\n\n    if( iOff>=pLeaf->szLeaf ){\n      FTS5_CORRUPT_ROWID(p, iRowid);\n    }else if( iTermOff==nIncr ){\n      int nByte;\n      iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);\n      if( (iOff+nByte)>pLeaf->szLeaf ){\n        FTS5_CORRUPT_ROWID(p, iRowid);\n      }else{\n        fts5BufferSet(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);\n      }\n    }else{\n      int nKeep, nByte;\n      iOff += fts5GetVarint32(&pLeaf->p[iOff], nKeep);\n      iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);\n      if( nKeep>buf1.n || (iOff+nByte)>pLeaf->szLeaf ){\n        FTS5_CORRUPT_ROWID(p, iRowid);\n      }else{\n        buf1.n = nKeep;\n        fts5BufferAppendBlob(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);\n      }\n\n      if( p->rc==SQLITE_OK ){\n        res = fts5BufferCompare(&buf1, &buf2);\n        if( res<=0 ) FTS5_CORRUPT_ROWID(p, iRowid);\n      }\n    }\n    fts5BufferSet(&p->rc, &buf2, buf1.n, buf1.p);\n  }\n\n  fts5BufferFree(&buf1);\n  fts5BufferFree(&buf2);\n}\n\nstatic void fts5IndexIntegrityCheckSegment(\n  Fts5Index *p,                   /* FTS5 backend object */\n  Fts5StructureSegment *pSeg      /* Segment to check internal consistency */\n){\n  Fts5Config *pConfig = p->pConfig;\n  int bSecureDelete = (pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE);\n  sqlite3_stmt *pStmt = 0;\n  int rc2;\n  int iIdxPrevLeaf = pSeg->pgnoFirst-1;\n  int iDlidxPrevLeaf = pSeg->pgnoLast;\n\n  if( pSeg->pgnoFirst==0 ) return;\n\n  fts5IndexPrepareStmt(p, &pStmt, sqlite3_mprintf(\n      \"SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d \"\n      \"ORDER BY 1, 2\",\n      pConfig->zDb, pConfig->zName, pSeg->iSegid\n  ));\n\n  /* Iterate through the b-tree hierarchy.  */\n  while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){\n    i64 iRow;                     /* Rowid for this leaf */\n    Fts5Data *pLeaf;              /* Data for this leaf */\n\n    const char *zIdxTerm = (const char*)sqlite3_column_blob(pStmt, 1);\n    int nIdxTerm = sqlite3_column_bytes(pStmt, 1);\n    int iIdxLeaf = sqlite3_column_int(pStmt, 2);\n    int bIdxDlidx = sqlite3_column_int(pStmt, 3);\n\n    /* If the leaf in question has already been trimmed from the segment,\n    ** ignore this b-tree entry. Otherwise, load it into memory. */\n    if( iIdxLeaf<pSeg->pgnoFirst ) continue;\n    iRow = FTS5_SEGMENT_ROWID(pSeg->iSegid, iIdxLeaf);\n    pLeaf = fts5LeafRead(p, iRow);\n    if( pLeaf==0 ) break;\n\n    /* Check that the leaf contains at least one term, and that it is equal\n    ** to or larger than the split-key in zIdxTerm.  Also check that if there\n    ** is also a rowid pointer within the leaf page header, it points to a\n    ** location before the term.  */\n    if( pLeaf->nn<=pLeaf->szLeaf ){\n\n      if( nIdxTerm==0\n       && pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE\n       && pLeaf->nn==pLeaf->szLeaf\n       && pLeaf->nn==4\n      ){\n        /* special case - the very first page in a segment keeps its %_idx\n        ** entry even if all the terms are removed from it by secure-delete\n        ** operations. */\n      }else{\n        FTS5_CORRUPT_ROWID(p, iRow);\n      }\n\n    }else{\n      int iOff;                   /* Offset of first term on leaf */\n      int iRowidOff;              /* Offset of first rowid on leaf */\n      int nTerm;                  /* Size of term on leaf in bytes */\n      int res;                    /* Comparison of term and split-key */\n\n      iOff = fts5LeafFirstTermOff(pLeaf);\n      iRowidOff = fts5LeafFirstRowidOff(pLeaf);\n      if( iRowidOff>=iOff || iOff>=pLeaf->szLeaf ){\n        FTS5_CORRUPT_ROWID(p, iRow);\n      }else{\n        iOff += fts5GetVarint32(&pLeaf->p[iOff], nTerm);\n        res = fts5Memcmp(&pLeaf->p[iOff], zIdxTerm, MIN(nTerm, nIdxTerm));\n        if( res==0 ) res = nTerm - nIdxTerm;\n        if( res<0 ) FTS5_CORRUPT_ROWID(p, iRow);\n      }\n\n      fts5IntegrityCheckPgidx(p, iRow, pLeaf);\n    }\n    fts5DataRelease(pLeaf);\n    if( p->rc ) break;\n\n    /* Now check that the iter.nEmpty leaves following the current leaf\n    ** (a) exist and (b) contain no terms. */\n    fts5IndexIntegrityCheckEmpty(\n        p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1\n    );\n    if( p->rc ) break;\n\n    /* If there is a doclist-index, check that it looks right. */\n    if( bIdxDlidx ){\n      Fts5DlidxIter *pDlidx = 0;  /* For iterating through doclist index */\n      int iPrevLeaf = iIdxLeaf;\n      int iSegid = pSeg->iSegid;\n      int iPg = 0;\n      i64 iKey;\n\n      for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iIdxLeaf);\n          fts5DlidxIterEof(p, pDlidx)==0;\n          fts5DlidxIterNext(p, pDlidx)\n      ){\n\n        /* Check any rowid-less pages that occur before the current leaf. */\n        for(iPg=iPrevLeaf+1; iPg<fts5DlidxIterPgno(pDlidx); iPg++){\n          iKey = FTS5_SEGMENT_ROWID(iSegid, iPg);\n          pLeaf = fts5DataRead(p, iKey);\n          if( pLeaf ){\n            if( fts5LeafFirstRowidOff(pLeaf)!=0 ) FTS5_CORRUPT_ROWID(p, iKey);\n            fts5DataRelease(pLeaf);\n          }\n        }\n        iPrevLeaf = fts5DlidxIterPgno(pDlidx);\n\n        /* Check that the leaf page indicated by the iterator really does\n        ** contain the rowid suggested by the same. */\n        iKey = FTS5_SEGMENT_ROWID(iSegid, iPrevLeaf);\n        pLeaf = fts5DataRead(p, iKey);\n        if( pLeaf ){\n          i64 iRowid;\n          int iRowidOff = fts5LeafFirstRowidOff(pLeaf);\n          ASSERT_SZLEAF_OK(pLeaf);\n          if( iRowidOff>=pLeaf->szLeaf ){\n            FTS5_CORRUPT_ROWID(p, iKey);\n          }else if( bSecureDelete==0 || iRowidOff>0 ){\n            i64 iDlRowid = fts5DlidxIterRowid(pDlidx);\n            fts5GetVarint(&pLeaf->p[iRowidOff], (u64*)&iRowid);\n            if( iRowid<iDlRowid || (bSecureDelete==0 && iRowid!=iDlRowid) ){\n              FTS5_CORRUPT_ROWID(p, iKey);\n            }\n          }\n          fts5DataRelease(pLeaf);\n        }\n      }\n\n      iDlidxPrevLeaf = iPg;\n      fts5DlidxIterFree(pDlidx);\n      fts5TestDlidxReverse(p, iSegid, iIdxLeaf);\n    }else{\n      iDlidxPrevLeaf = pSeg->pgnoLast;\n      /* TODO: Check there is no doclist index */\n    }\n\n    iIdxPrevLeaf = iIdxLeaf;\n  }\n\n  rc2 = sqlite3_finalize(pStmt);\n  if( p->rc==SQLITE_OK ) p->rc = rc2;\n\n  /* Page iter.iLeaf must now be the rightmost leaf-page in the segment */\n#if 0\n  if( p->rc==SQLITE_OK && iter.iLeaf!=pSeg->pgnoLast ){\n    p->rc = FTS5_CORRUPT;\n  }\n#endif\n}\n\n\n/*\n** Run internal checks to ensure that the FTS index (a) is internally\n** consistent and (b) contains entries for which the XOR of the checksums\n** as calculated by sqlite3Fts5IndexEntryCksum() is cksum.\n**\n** Return SQLITE_CORRUPT if any of the internal checks fail, or if the\n** checksum does not match. Return SQLITE_OK if all checks pass without\n** error, or some other SQLite error code if another error (e.g. OOM)\n** occurs.\n*/\nstatic int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum, int bUseCksum){\n  int eDetail = p->pConfig->eDetail;\n  u64 cksum2 = 0;                 /* Checksum based on contents of indexes */\n  Fts5Buffer poslist = {0,0,0};   /* Buffer used to hold a poslist */\n  Fts5Iter *pIter;                /* Used to iterate through entire index */\n  Fts5Structure *pStruct;         /* Index structure */\n  int iLvl, iSeg;\n\n#ifdef SQLITE_DEBUG\n  /* Used by extra internal tests only run if NDEBUG is not defined */\n  u64 cksum3 = 0;                 /* Checksum based on contents of indexes */\n  Fts5Buffer term = {0,0,0};      /* Buffer used to hold most recent term */\n  int bTestFail = 0;\n#endif\n  const int flags = FTS5INDEX_QUERY_NOOUTPUT;\n\n  /* Load the FTS index structure */\n  pStruct = fts5StructureRead(p);\n  if( pStruct==0 ){\n    assert( p->rc!=SQLITE_OK );\n    return fts5IndexReturn(p);\n  }\n\n  /* Check that the internal nodes of each segment match the leaves */\n  for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){\n    for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){\n      Fts5StructureSegment *pSeg = &pStruct->aLevel[iLvl].aSeg[iSeg];\n      fts5IndexIntegrityCheckSegment(p, pSeg);\n    }\n  }\n\n  /* The cksum argument passed to this function is a checksum calculated\n  ** based on all expected entries in the FTS index (including prefix index\n  ** entries). This block checks that a checksum calculated based on the\n  ** actual contents of FTS index is identical.\n  **\n  ** Two versions of the same checksum are calculated. The first (stack\n  ** variable cksum2) based on entries extracted from the full-text index\n  ** while doing a linear scan of each individual index in turn.\n  **\n  ** As each term visited by the linear scans, a separate query for the\n  ** same term is performed. cksum3 is calculated based on the entries\n  ** extracted by these queries.\n  */\n  for(fts5MultiIterNew(p, pStruct, flags, 0, 0, 0, -1, 0, &pIter);\n      fts5MultiIterEof(p, pIter)==0;\n      fts5MultiIterNext(p, pIter, 0, 0)\n  ){\n    int n;                      /* Size of term in bytes */\n    i64 iPos = 0;               /* Position read from poslist */\n    int iOff = 0;               /* Offset within poslist */\n    i64 iRowid = fts5MultiIterRowid(pIter);\n    char *z = (char*)fts5MultiIterTerm(pIter, &n);\n\n    /* If this is a new term, query for it. Update cksum3 with the results. */\n    fts5TestTerm(p, &term, z, n, cksum2, &cksum3, &bTestFail);\n    if( p->rc ) break;\n\n    if( eDetail==FTS5_DETAIL_NONE ){\n      if( 0==fts5MultiIterIsEmpty(p, pIter) ){\n        cksum2 ^= sqlite3Fts5IndexEntryCksum(iRowid, 0, 0, -1, z, n);\n      }\n    }else{\n      poslist.n = 0;\n      fts5SegiterPoslist(p, &pIter->aSeg[pIter->aFirst[1].iFirst], 0, &poslist);\n      fts5BufferAppendBlob(&p->rc, &poslist, 4, (const u8*)\"\\0\\0\\0\\0\");\n      while( 0==sqlite3Fts5PoslistNext64(poslist.p, poslist.n, &iOff, &iPos) ){\n        int iCol = FTS5_POS2COLUMN(iPos);\n        int iTokOff = FTS5_POS2OFFSET(iPos);\n        cksum2 ^= sqlite3Fts5IndexEntryCksum(iRowid, iCol, iTokOff, -1, z, n);\n      }\n    }\n  }\n  fts5TestTerm(p, &term, 0, 0, cksum2, &cksum3, &bTestFail);\n\n  fts5MultiIterFree(pIter);\n  if( p->rc==SQLITE_OK && bUseCksum && cksum!=cksum2 ){\n    p->rc = FTS5_CORRUPT;\n    sqlite3Fts5ConfigErrmsg(p->pConfig,\n        \"fts5: checksum mismatch for table \\\"%s\\\"\", p->pConfig->zName\n    );\n  }\n#ifdef SQLITE_DEBUG\n  /* In SQLITE_DEBUG builds, expensive extra checks were run as part of\n  ** the integrity-check above. If no other errors were detected, but one\n  ** of these tests failed, set the result to SQLITE_CORRUPT_VTAB here. */\n  if( p->rc==SQLITE_OK && bTestFail ){\n    p->rc = FTS5_CORRUPT;\n  }\n  fts5BufferFree(&term);\n#endif\n\n  fts5StructureRelease(pStruct);\n  fts5BufferFree(&poslist);\n  return fts5IndexReturn(p);\n}\n\n/*************************************************************************\n**************************************************************************\n** Below this point is the implementation of the fts5_decode() scalar\n** function only.\n*/\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** Decode a segment-data rowid from the %_data table. This function is\n** the opposite of macro FTS5_SEGMENT_ROWID().\n*/\nstatic void fts5DecodeRowid(\n  i64 iRowid,                     /* Rowid from %_data table */\n  int *pbTombstone,               /* OUT: Tombstone hash flag */\n  int *piSegid,                   /* OUT: Segment id */\n  int *pbDlidx,                   /* OUT: Dlidx flag */\n  int *piHeight,                  /* OUT: Height */\n  int *piPgno                     /* OUT: Page number */\n){\n  *piPgno = (int)(iRowid & (((i64)1 << FTS5_DATA_PAGE_B) - 1));\n  iRowid >>= FTS5_DATA_PAGE_B;\n\n  *piHeight = (int)(iRowid & (((i64)1 << FTS5_DATA_HEIGHT_B) - 1));\n  iRowid >>= FTS5_DATA_HEIGHT_B;\n\n  *pbDlidx = (int)(iRowid & 0x0001);\n  iRowid >>= FTS5_DATA_DLI_B;\n\n  *piSegid = (int)(iRowid & (((i64)1 << FTS5_DATA_ID_B) - 1));\n  iRowid >>= FTS5_DATA_ID_B;\n\n  *pbTombstone = (int)(iRowid & 0x0001);\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\nstatic void fts5DebugRowid(int *pRc, Fts5Buffer *pBuf, i64 iKey){\n  int iSegid, iHeight, iPgno, bDlidx, bTomb;     /* Rowid components */\n  fts5DecodeRowid(iKey, &bTomb, &iSegid, &bDlidx, &iHeight, &iPgno);\n\n  if( iSegid==0 ){\n    if( iKey==FTS5_AVERAGES_ROWID ){\n      sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"{averages} \");\n    }else{\n      sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"{structure}\");\n    }\n  }\n  else{\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"{%s%ssegid=%d h=%d pgno=%d}\",\n        bDlidx ? \"dlidx \" : \"\",\n        bTomb ? \"tombstone \" : \"\",\n        iSegid, iHeight, iPgno\n    );\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\nstatic void fts5DebugStructure(\n  int *pRc,                       /* IN/OUT: error code */\n  Fts5Buffer *pBuf,\n  Fts5Structure *p\n){\n  int iLvl, iSeg;                 /* Iterate through levels, segments */\n\n  for(iLvl=0; iLvl<p->nLevel; iLvl++){\n    Fts5StructureLevel *pLvl = &p->aLevel[iLvl];\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf,\n        \" {lvl=%d nMerge=%d nSeg=%d\", iLvl, pLvl->nMerge, pLvl->nSeg\n    );\n    for(iSeg=0; iSeg<pLvl->nSeg; iSeg++){\n      Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];\n      sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" {id=%d leaves=%d..%d\",\n          pSeg->iSegid, pSeg->pgnoFirst, pSeg->pgnoLast\n      );\n      if( pSeg->iOrigin1>0 ){\n        sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" origin=%lld..%lld\",\n            pSeg->iOrigin1, pSeg->iOrigin2\n        );\n      }\n      sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"}\");\n    }\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"}\");\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** This is part of the fts5_decode() debugging aid.\n**\n** Arguments pBlob/nBlob contain a serialized Fts5Structure object. This\n** function appends a human-readable representation of the same object\n** to the buffer passed as the second argument.\n*/\nstatic void fts5DecodeStructure(\n  int *pRc,                       /* IN/OUT: error code */\n  Fts5Buffer *pBuf,\n  const u8 *pBlob, int nBlob\n){\n  int rc;                         /* Return code */\n  Fts5Structure *p = 0;           /* Decoded structure object */\n\n  rc = fts5StructureDecode(pBlob, nBlob, 0, &p);\n  if( rc!=SQLITE_OK ){\n    *pRc = rc;\n    return;\n  }\n\n  fts5DebugStructure(pRc, pBuf, p);\n  fts5StructureRelease(p);\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** This is part of the fts5_decode() debugging aid.\n**\n** Arguments pBlob/nBlob contain an \"averages\" record. This function\n** appends a human-readable representation of record to the buffer passed\n** as the second argument.\n*/\nstatic void fts5DecodeAverages(\n  int *pRc,                       /* IN/OUT: error code */\n  Fts5Buffer *pBuf,\n  const u8 *pBlob, int nBlob\n){\n  int i = 0;\n  const char *zSpace = \"\";\n\n  while( i<nBlob ){\n    u64 iVal;\n    i += sqlite3Fts5GetVarint(&pBlob[i], &iVal);\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \"%s%d\", zSpace, (int)iVal);\n    zSpace = \" \";\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** Buffer (a/n) is assumed to contain a list of serialized varints. Read\n** each varint and append its string representation to buffer pBuf. Return\n** after either the input buffer is exhausted or a 0 value is read.\n**\n** The return value is the number of bytes read from the input buffer.\n*/\nstatic int fts5DecodePoslist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){\n  int iOff = 0;\n  while( iOff<n ){\n    int iVal;\n    iOff += fts5GetVarint32(&a[iOff], iVal);\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" %d\", iVal);\n  }\n  return iOff;\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** The start of buffer (a/n) contains the start of a doclist. The doclist\n** may or may not finish within the buffer. This function appends a text\n** representation of the part of the doclist that is present to buffer\n** pBuf.\n**\n** The return value is the number of bytes read from the input buffer.\n*/\nstatic int fts5DecodeDoclist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){\n  i64 iDocid = 0;\n  int iOff = 0;\n\n  if( n>0 ){\n    iOff = sqlite3Fts5GetVarint(a, (u64*)&iDocid);\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" id=%lld\", iDocid);\n  }\n  while( iOff<n ){\n    int nPos;\n    int bDel;\n    iOff += fts5GetPoslistSize(&a[iOff], &nPos, &bDel);\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" nPos=%d%s\", nPos, bDel?\"*\":\"\");\n    iOff += fts5DecodePoslist(pRc, pBuf, &a[iOff], MIN(n-iOff, nPos));\n    if( iOff<n ){\n      i64 iDelta;\n      iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&iDelta);\n      iDocid += iDelta;\n      sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" id=%lld\", iDocid);\n    }\n  }\n\n  return iOff;\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** This function is part of the fts5_decode() debugging function. It is\n** only ever used with detail=none tables.\n**\n** Buffer (pData/nData) contains a doclist in the format used by detail=none\n** tables. This function appends a human-readable version of that list to\n** buffer pBuf.\n**\n** If *pRc is other than SQLITE_OK when this function is called, it is a\n** no-op. If an OOM or other error occurs within this function, *pRc is\n** set to an SQLite error code before returning. The final state of buffer\n** pBuf is undefined in this case.\n*/\nstatic void fts5DecodeRowidList(\n  int *pRc,                       /* IN/OUT: Error code */\n  Fts5Buffer *pBuf,               /* Buffer to append text to */\n  const u8 *pData, int nData      /* Data to decode list-of-rowids from */\n){\n  int i = 0;\n  i64 iRowid = 0;\n\n  while( i<nData ){\n    const char *zApp = \"\";\n    u64 iVal;\n    i += sqlite3Fts5GetVarint(&pData[i], &iVal);\n    iRowid += iVal;\n\n    if( i<nData && pData[i]==0x00 ){\n      i++;\n      if( i<nData && pData[i]==0x00 ){\n        i++;\n        zApp = \"+\";\n      }else{\n        zApp = \"*\";\n      }\n    }\n\n    sqlite3Fts5BufferAppendPrintf(pRc, pBuf, \" %lld%s\", iRowid, zApp);\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\nstatic void fts5BufferAppendTerm(int *pRc, Fts5Buffer *pBuf, Fts5Buffer *pTerm){\n  int ii;\n  fts5BufferGrow(pRc, pBuf, pTerm->n*2 + 1);\n  if( *pRc==SQLITE_OK ){\n    for(ii=0; ii<pTerm->n; ii++){\n      if( pTerm->p[ii]==0x00 ){\n        pBuf->p[pBuf->n++] = '\\\\';\n        pBuf->p[pBuf->n++] = '0';\n      }else{\n        pBuf->p[pBuf->n++] = pTerm->p[ii];\n      }\n    }\n    pBuf->p[pBuf->n] = 0x00;\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** The implementation of user-defined scalar function fts5_decode().\n*/\nstatic void fts5DecodeFunction(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args (always 2) */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  i64 iRowid;                     /* Rowid for record being decoded */\n  int iSegid,iHeight,iPgno,bDlidx;/* Rowid components */\n  int bTomb;\n  const u8 *aBlob; int n;         /* Record to decode */\n  u8 *a = 0;\n  Fts5Buffer s;                   /* Build up text to return here */\n  int rc = SQLITE_OK;             /* Return code */\n  sqlite3_int64 nSpace = 0;\n  int eDetailNone = (sqlite3_user_data(pCtx)!=0);\n\n  assert( nArg==2 );\n  UNUSED_PARAM(nArg);\n  memset(&s, 0, sizeof(Fts5Buffer));\n  iRowid = sqlite3_value_int64(apVal[0]);\n\n  /* Make a copy of the second argument (a blob) in aBlob[]. The aBlob[]\n  ** copy is followed by FTS5_DATA_ZERO_PADDING 0x00 bytes, which prevents\n  ** buffer overreads even if the record is corrupt.  */\n  n = sqlite3_value_bytes(apVal[1]);\n  aBlob = sqlite3_value_blob(apVal[1]);\n  nSpace = ((i64)n) + FTS5_DATA_ZERO_PADDING;\n  a = (u8*)sqlite3Fts5MallocZero(&rc, nSpace);\n  if( a==0 ) goto decode_out;\n  if( n>0 ) memcpy(a, aBlob, n);\n\n  fts5DecodeRowid(iRowid, &bTomb, &iSegid, &bDlidx, &iHeight, &iPgno);\n\n  fts5DebugRowid(&rc, &s, iRowid);\n  if( bDlidx ){\n    Fts5Data dlidx;\n    Fts5DlidxLvl lvl;\n\n    dlidx.p = a;\n    dlidx.nn = n;\n\n    memset(&lvl, 0, sizeof(Fts5DlidxLvl));\n    lvl.pData = &dlidx;\n    lvl.iLeafPgno = iPgno;\n\n    for(fts5DlidxLvlNext(&lvl); lvl.bEof==0; fts5DlidxLvlNext(&lvl)){\n      sqlite3Fts5BufferAppendPrintf(&rc, &s,\n          \" %d(%lld)\", lvl.iLeafPgno, lvl.iRowid\n      );\n    }\n  }else if( bTomb ){\n    u32 nElem  = fts5GetU32(&a[4]);\n    int szKey = (aBlob[0]==4 || aBlob[0]==8) ? aBlob[0] : 8;\n    int nSlot = (n - 8) / szKey;\n    int ii;\n    sqlite3Fts5BufferAppendPrintf(&rc, &s, \" nElem=%d\", (int)nElem);\n    if( aBlob[1] ){\n      sqlite3Fts5BufferAppendPrintf(&rc, &s, \" 0\");\n    }\n    for(ii=0; ii<nSlot; ii++){\n      u64 iVal = 0;\n      if( szKey==4 ){\n        u32 *aSlot = (u32*)&aBlob[8];\n        if( aSlot[ii] ) iVal = fts5GetU32((u8*)&aSlot[ii]);\n      }else{\n        u64 *aSlot = (u64*)&aBlob[8];\n        if( aSlot[ii] ) iVal = fts5GetU64((u8*)&aSlot[ii]);\n      }\n      if( iVal!=0 ){\n        sqlite3Fts5BufferAppendPrintf(&rc, &s, \" %lld\", (i64)iVal);\n      }\n    }\n  }else if( iSegid==0 ){\n    if( iRowid==FTS5_AVERAGES_ROWID ){\n      fts5DecodeAverages(&rc, &s, a, n);\n    }else{\n      fts5DecodeStructure(&rc, &s, a, n);\n    }\n  }else if( eDetailNone ){\n    Fts5Buffer term;              /* Current term read from page */\n    int szLeaf;\n    int iPgidxOff = szLeaf = fts5GetU16(&a[2]);\n    int iTermOff;\n    int nKeep = 0;\n    int iOff;\n\n    memset(&term, 0, sizeof(Fts5Buffer));\n\n    /* Decode any entries that occur before the first term. */\n    if( szLeaf<n ){\n      iPgidxOff += fts5GetVarint32(&a[iPgidxOff], iTermOff);\n    }else{\n      iTermOff = szLeaf;\n    }\n    fts5DecodeRowidList(&rc, &s, &a[4], iTermOff-4);\n\n    iOff = iTermOff;\n    while( iOff<szLeaf && rc==SQLITE_OK ){\n      int nAppend;\n\n      /* Read the term data for the next term*/\n      iOff += fts5GetVarint32(&a[iOff], nAppend);\n      term.n = nKeep;\n      fts5BufferAppendBlob(&rc, &term, nAppend, &a[iOff]);\n      sqlite3Fts5BufferAppendPrintf(&rc, &s, \" term=\");\n      fts5BufferAppendTerm(&rc, &s, &term);\n      iOff += nAppend;\n\n      /* Figure out where the doclist for this term ends */\n      if( iPgidxOff<n ){\n        int nIncr;\n        iPgidxOff += fts5GetVarint32(&a[iPgidxOff], nIncr);\n        iTermOff += nIncr;\n      }else{\n        iTermOff = szLeaf;\n      }\n      if( iTermOff>szLeaf ){\n        rc = FTS5_CORRUPT;\n      }else{\n        fts5DecodeRowidList(&rc, &s, &a[iOff], iTermOff-iOff);\n      }\n      iOff = iTermOff;\n      if( iOff<szLeaf ){\n        iOff += fts5GetVarint32(&a[iOff], nKeep);\n      }\n    }\n\n    fts5BufferFree(&term);\n  }else{\n    Fts5Buffer term;              /* Current term read from page */\n    int szLeaf;                   /* Offset of pgidx in a[] */\n    int iPgidxOff;\n    int iPgidxPrev = 0;           /* Previous value read from pgidx */\n    int iTermOff = 0;\n    int iRowidOff = 0;\n    int iOff;\n    int nDoclist;\n\n    memset(&term, 0, sizeof(Fts5Buffer));\n\n    if( n<4 ){\n      sqlite3Fts5BufferSet(&rc, &s, 7, (const u8*)\"corrupt\");\n      goto decode_out;\n    }else{\n      iRowidOff = fts5GetU16(&a[0]);\n      iPgidxOff = szLeaf = fts5GetU16(&a[2]);\n      if( iPgidxOff<n ){\n        fts5GetVarint32(&a[iPgidxOff], iTermOff);\n      }else if( iPgidxOff>n ){\n        rc = FTS5_CORRUPT;\n        goto decode_out;\n      }\n    }\n\n    /* Decode the position list tail at the start of the page */\n    if( iRowidOff!=0 ){\n      iOff = iRowidOff;\n    }else if( iTermOff!=0 ){\n      iOff = iTermOff;\n    }else{\n      iOff = szLeaf;\n    }\n    if( iOff>n ){\n      rc = FTS5_CORRUPT;\n      goto decode_out;\n    }\n    fts5DecodePoslist(&rc, &s, &a[4], iOff-4);\n\n    /* Decode any more doclist data that appears on the page before the\n    ** first term. */\n    nDoclist = (iTermOff ? iTermOff : szLeaf) - iOff;\n    if( nDoclist+iOff>n ){\n      rc = FTS5_CORRUPT;\n      goto decode_out;\n    }\n    fts5DecodeDoclist(&rc, &s, &a[iOff], nDoclist);\n\n    while( iPgidxOff<n && rc==SQLITE_OK ){\n      int bFirst = (iPgidxOff==szLeaf);     /* True for first term on page */\n      int nByte;                            /* Bytes of data */\n      int iEnd;\n\n      iPgidxOff += fts5GetVarint32(&a[iPgidxOff], nByte);\n      iPgidxPrev += nByte;\n      iOff = iPgidxPrev;\n\n      if( iPgidxOff<n ){\n        fts5GetVarint32(&a[iPgidxOff], nByte);\n        iEnd = iPgidxPrev + nByte;\n      }else{\n        iEnd = szLeaf;\n      }\n      if( iEnd>szLeaf ){\n        rc = FTS5_CORRUPT;\n        break;\n      }\n\n      if( bFirst==0 ){\n        iOff += fts5GetVarint32(&a[iOff], nByte);\n        if( nByte>term.n ){\n          rc = FTS5_CORRUPT;\n          break;\n        }\n        term.n = nByte;\n      }\n      iOff += fts5GetVarint32(&a[iOff], nByte);\n      if( iOff+nByte>n ){\n        rc = FTS5_CORRUPT;\n        break;\n      }\n      fts5BufferAppendBlob(&rc, &term, nByte, &a[iOff]);\n      iOff += nByte;\n\n      sqlite3Fts5BufferAppendPrintf(&rc, &s, \" term=\");\n      fts5BufferAppendTerm(&rc, &s, &term);\n      iOff += fts5DecodeDoclist(&rc, &s, &a[iOff], iEnd-iOff);\n    }\n\n    fts5BufferFree(&term);\n  }\n\n decode_out:\n  sqlite3_free(a);\n  if( rc==SQLITE_OK ){\n    sqlite3_result_text(pCtx, (const char*)s.p, s.n, SQLITE_TRANSIENT);\n  }else{\n    sqlite3_result_error_code(pCtx, rc);\n  }\n  fts5BufferFree(&s);\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n/*\n** The implementation of user-defined scalar function fts5_rowid().\n*/\nstatic void fts5RowidFunction(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args (always 2) */\n  sqlite3_value **apVal           /* Function arguments */\n){\n  const char *zArg;\n  if( nArg==0 ){\n    sqlite3_result_error(pCtx, \"should be: fts5_rowid(subject, ....)\", -1);\n  }else{\n    zArg = (const char*)sqlite3_value_text(apVal[0]);\n    if( 0==sqlite3_stricmp(zArg, \"segment\") ){\n      i64 iRowid;\n      int segid, pgno;\n      if( nArg!=3 ){\n        sqlite3_result_error(pCtx,\n            \"should be: fts5_rowid('segment', segid, pgno))\", -1\n        );\n      }else{\n        segid = sqlite3_value_int(apVal[1]);\n        pgno = sqlite3_value_int(apVal[2]);\n        iRowid = FTS5_SEGMENT_ROWID(segid, pgno);\n        sqlite3_result_int64(pCtx, iRowid);\n      }\n    }else{\n      sqlite3_result_error(pCtx,\n        \"first arg to fts5_rowid() must be 'segment'\" , -1\n      );\n    }\n  }\n}\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n\ntypedef struct Fts5StructVtab Fts5StructVtab;\nstruct Fts5StructVtab {\n  sqlite3_vtab base;\n};\n\ntypedef struct Fts5StructVcsr Fts5StructVcsr;\nstruct Fts5StructVcsr {\n  sqlite3_vtab_cursor base;\n  Fts5Structure *pStruct;\n  int iLevel;\n  int iSeg;\n  int iRowid;\n};\n\n/*\n** Create a new fts5_structure() table-valued function.\n*/\nstatic int fts5structConnectMethod(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  Fts5StructVtab *pNew = 0;\n  int rc = SQLITE_OK;\n\n  rc = sqlite3_declare_vtab(db,\n      \"CREATE TABLE xyz(\"\n          \"level, segment, merge, segid, leaf1, leaf2, loc1, loc2, \"\n          \"npgtombstone, nentrytombstone, nentry, struct HIDDEN);\"\n  );\n  if( rc==SQLITE_OK ){\n    pNew = sqlite3Fts5MallocZero(&rc, sizeof(*pNew));\n  }\n\n  *ppVtab = (sqlite3_vtab*)pNew;\n  return rc;\n}\n\n/*\n** We must have a single struct=? constraint that will be passed through\n** into the xFilter method.  If there is no valid struct=? constraint,\n** then return an SQLITE_CONSTRAINT error.\n*/\nstatic int fts5structBestIndexMethod(\n  sqlite3_vtab *tab,\n  sqlite3_index_info *pIdxInfo\n){\n  int i;\n  int rc = SQLITE_CONSTRAINT;\n  struct sqlite3_index_constraint *p;\n  pIdxInfo->estimatedCost = (double)100;\n  pIdxInfo->estimatedRows = 100;\n  pIdxInfo->idxNum = 0;\n  for(i=0, p=pIdxInfo->aConstraint; i<pIdxInfo->nConstraint; i++, p++){\n    if( p->usable==0 ) continue;\n    if( p->op==SQLITE_INDEX_CONSTRAINT_EQ && p->iColumn==11 ){\n      rc = SQLITE_OK;\n      pIdxInfo->aConstraintUsage[i].omit = 1;\n      pIdxInfo->aConstraintUsage[i].argvIndex = 1;\n      break;\n    }\n  }\n  return rc;\n}\n\n/*\n** This method is the destructor for bytecodevtab objects.\n*/\nstatic int fts5structDisconnectMethod(sqlite3_vtab *pVtab){\n  Fts5StructVtab *p = (Fts5StructVtab*)pVtab;\n  sqlite3_free(p);\n  return SQLITE_OK;\n}\n\n/*\n** Constructor for a new bytecodevtab_cursor object.\n*/\nstatic int fts5structOpenMethod(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCsr){\n  int rc = SQLITE_OK;\n  Fts5StructVcsr *pNew = 0;\n\n  pNew = sqlite3Fts5MallocZero(&rc, sizeof(*pNew));\n  *ppCsr = (sqlite3_vtab_cursor*)pNew;\n\n  return SQLITE_OK;\n}\n\n/*\n** Destructor for a bytecodevtab_cursor.\n*/\nstatic int fts5structCloseMethod(sqlite3_vtab_cursor *cur){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur;\n  fts5StructureRelease(pCsr->pStruct);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\n\n/*\n** Advance a bytecodevtab_cursor to its next row of output.\n*/\nstatic int fts5structNextMethod(sqlite3_vtab_cursor *cur){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur;\n  Fts5Structure *p = pCsr->pStruct;\n\n  assert( pCsr->pStruct );\n  pCsr->iSeg++;\n  pCsr->iRowid++;\n  while( pCsr->iLevel<p->nLevel && pCsr->iSeg>=p->aLevel[pCsr->iLevel].nSeg ){\n    pCsr->iLevel++;\n    pCsr->iSeg = 0;\n  }\n  if( pCsr->iLevel>=p->nLevel ){\n    fts5StructureRelease(pCsr->pStruct);\n    pCsr->pStruct = 0;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if the cursor has been moved off of the last\n** row of output.\n*/\nstatic int fts5structEofMethod(sqlite3_vtab_cursor *cur){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur;\n  return pCsr->pStruct==0;\n}\n\nstatic int fts5structRowidMethod(\n  sqlite3_vtab_cursor *cur,\n  sqlite_int64 *piRowid\n){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur;\n  *piRowid = pCsr->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Return values of columns for the row at which the bytecodevtab_cursor\n** is currently pointing.\n*/\nstatic int fts5structColumnMethod(\n  sqlite3_vtab_cursor *cur,   /* The cursor */\n  sqlite3_context *ctx,       /* First argument to sqlite3_result_...() */\n  int i                       /* Which column to return */\n){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur;\n  Fts5Structure *p = pCsr->pStruct;\n  Fts5StructureSegment *pSeg = &p->aLevel[pCsr->iLevel].aSeg[pCsr->iSeg];\n\n  switch( i ){\n    case 0: /* level */\n      sqlite3_result_int(ctx, pCsr->iLevel);\n      break;\n    case 1: /* segment */\n      sqlite3_result_int(ctx, pCsr->iSeg);\n      break;\n    case 2: /* merge */\n      sqlite3_result_int(ctx, pCsr->iSeg < p->aLevel[pCsr->iLevel].nMerge);\n      break;\n    case 3: /* segid */\n      sqlite3_result_int(ctx, pSeg->iSegid);\n      break;\n    case 4: /* leaf1 */\n      sqlite3_result_int(ctx, pSeg->pgnoFirst);\n      break;\n    case 5: /* leaf2 */\n      sqlite3_result_int(ctx, pSeg->pgnoLast);\n      break;\n    case 6: /* origin1 */\n      sqlite3_result_int64(ctx, pSeg->iOrigin1);\n      break;\n    case 7: /* origin2 */\n      sqlite3_result_int64(ctx, pSeg->iOrigin2);\n      break;\n    case 8: /* npgtombstone */\n      sqlite3_result_int(ctx, pSeg->nPgTombstone);\n      break;\n    case 9: /* nentrytombstone */\n      sqlite3_result_int64(ctx, pSeg->nEntryTombstone);\n      break;\n    case 10: /* nentry */\n      sqlite3_result_int64(ctx, pSeg->nEntry);\n      break;\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Initialize a cursor.\n**\n**    idxNum==0     means show all subprograms\n**    idxNum==1     means show only the main bytecode and omit subprograms.\n*/\nstatic int fts5structFilterMethod(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  Fts5StructVcsr *pCsr = (Fts5StructVcsr *)pVtabCursor;\n  int rc = SQLITE_OK;\n\n  const u8 *aBlob = 0;\n  int nBlob = 0;\n\n  assert( argc==1 );\n  fts5StructureRelease(pCsr->pStruct);\n  pCsr->pStruct = 0;\n\n  nBlob = sqlite3_value_bytes(argv[0]);\n  aBlob = (const u8*)sqlite3_value_blob(argv[0]);\n  rc = fts5StructureDecode(aBlob, nBlob, 0, &pCsr->pStruct);\n  if( rc==SQLITE_OK ){\n    pCsr->iLevel = 0;\n    pCsr->iRowid = 0;\n    pCsr->iSeg = -1;\n    rc = fts5structNextMethod(pVtabCursor);\n  }\n\n  return rc;\n}\n\n#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */\n\n/*\n** This is called as part of registering the FTS5 module with database\n** connection db. It registers several user-defined scalar functions useful\n** with FTS5.\n**\n** If successful, SQLITE_OK is returned. If an error occurs, some other\n** SQLite error code is returned instead.\n*/\nstatic int sqlite3Fts5IndexInit(sqlite3 *db){\n#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG)\n  int rc = sqlite3_create_function(\n      db, \"fts5_decode\", 2, SQLITE_UTF8, 0, fts5DecodeFunction, 0, 0\n  );\n\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_function(\n        db, \"fts5_decode_none\", 2,\n        SQLITE_UTF8, (void*)db, fts5DecodeFunction, 0, 0\n    );\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_create_function(\n        db, \"fts5_rowid\", -1, SQLITE_UTF8, 0, fts5RowidFunction, 0, 0\n    );\n  }\n\n  if( rc==SQLITE_OK ){\n    static const sqlite3_module fts5structure_module = {\n      0,                           /* iVersion      */\n      0,                           /* xCreate       */\n      fts5structConnectMethod,     /* xConnect      */\n      fts5structBestIndexMethod,   /* xBestIndex    */\n      fts5structDisconnectMethod,  /* xDisconnect   */\n      0,                           /* xDestroy      */\n      fts5structOpenMethod,        /* xOpen         */\n      fts5structCloseMethod,       /* xClose        */\n      fts5structFilterMethod,      /* xFilter       */\n      fts5structNextMethod,        /* xNext         */\n      fts5structEofMethod,         /* xEof          */\n      fts5structColumnMethod,      /* xColumn       */\n      fts5structRowidMethod,       /* xRowid        */\n      0,                           /* xUpdate       */\n      0,                           /* xBegin        */\n      0,                           /* xSync         */\n      0,                           /* xCommit       */\n      0,                           /* xRollback     */\n      0,                           /* xFindFunction */\n      0,                           /* xRename       */\n      0,                           /* xSavepoint    */\n      0,                           /* xRelease      */\n      0,                           /* xRollbackTo   */\n      0,                           /* xShadowName   */\n      0                            /* xIntegrity    */\n    };\n    rc = sqlite3_create_module(db, \"fts5_structure\", &fts5structure_module, 0);\n  }\n  return rc;\n#else\n  return SQLITE_OK;\n  UNUSED_PARAM(db);\n#endif\n}\n\n\nstatic int sqlite3Fts5IndexReset(Fts5Index *p){\n  assert( p->pStruct==0 || p->iStructVersion!=0 );\n  if( fts5IndexDataVersion(p)!=p->iStructVersion ){\n    fts5StructureInvalidate(p);\n  }\n  return fts5IndexReturn(p);\n}\n\n/*\n** 2014 Jun 09\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This is an SQLite module implementing full-text search.\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n/*\n** This variable is set to false when running tests for which the on disk\n** structures should not be corrupt. Otherwise, true. If it is false, extra\n** assert() conditions in the fts5 code are activated - conditions that are\n** only true if it is guaranteed that the fts5 database is not corrupt.\n*/\n#ifdef SQLITE_DEBUG\nSQLITE_API int sqlite3_fts5_may_be_corrupt = 1;\n#endif\n\n\ntypedef struct Fts5Auxdata Fts5Auxdata;\ntypedef struct Fts5Auxiliary Fts5Auxiliary;\ntypedef struct Fts5Cursor Fts5Cursor;\ntypedef struct Fts5FullTable Fts5FullTable;\ntypedef struct Fts5Sorter Fts5Sorter;\ntypedef struct Fts5TokenizerModule Fts5TokenizerModule;\n\n/*\n** NOTES ON TRANSACTIONS:\n**\n** SQLite invokes the following virtual table methods as transactions are\n** opened and closed by the user:\n**\n**     xBegin():    Start of a new transaction.\n**     xSync():     Initial part of two-phase commit.\n**     xCommit():   Final part of two-phase commit.\n**     xRollback(): Rollback the transaction.\n**\n** Anything that is required as part of a commit that may fail is performed\n** in the xSync() callback. Current versions of SQLite ignore any errors\n** returned by xCommit().\n**\n** And as sub-transactions are opened/closed:\n**\n**     xSavepoint(int S):  Open savepoint S.\n**     xRelease(int S):    Commit and close savepoint S.\n**     xRollbackTo(int S): Rollback to start of savepoint S.\n**\n** During a write-transaction the fts5_index.c module may cache some data\n** in-memory. It is flushed to disk whenever xSync(), xRelease() or\n** xSavepoint() is called. And discarded whenever xRollback() or xRollbackTo()\n** is called.\n**\n** Additionally, if SQLITE_DEBUG is defined, an instance of the following\n** structure is used to record the current transaction state. This information\n** is not required, but it is used in the assert() statements executed by\n** function fts5CheckTransactionState() (see below).\n*/\nstruct Fts5TransactionState {\n  int eState;                     /* 0==closed, 1==open, 2==synced */\n  int iSavepoint;                 /* Number of open savepoints (0 -> none) */\n};\n\n/*\n** A single object of this type is allocated when the FTS5 module is\n** registered with a database handle. It is used to store pointers to\n** all registered FTS5 extensions - tokenizers and auxiliary functions.\n*/\nstruct Fts5Global {\n  fts5_api api;                   /* User visible part of object (see fts5.h) */\n  sqlite3 *db;                    /* Associated database connection */\n  i64 iNextId;                    /* Used to allocate unique cursor ids */\n  Fts5Auxiliary *pAux;            /* First in list of all aux. functions */\n  Fts5TokenizerModule *pTok;      /* First in list of all tokenizer modules */\n  Fts5TokenizerModule *pDfltTok;  /* Default tokenizer module */\n  Fts5Cursor *pCsr;               /* First in list of all open cursors */\n  u32 aLocaleHdr[4];\n};\n\n/*\n** Size of header on fts5_locale() values. And macro to access a buffer\n** containing a copy of the header from an Fts5Config pointer.\n*/\n#define FTS5_LOCALE_HDR_SIZE ((int)sizeof( ((Fts5Global*)0)->aLocaleHdr ))\n#define FTS5_LOCALE_HDR(pConfig) ((const u8*)(pConfig->pGlobal->aLocaleHdr))\n\n#define FTS5_INSTTOKEN_SUBTYPE 73\n\n/*\n** Each auxiliary function registered with the FTS5 module is represented\n** by an object of the following type. All such objects are stored as part\n** of the Fts5Global.pAux list.\n*/\nstruct Fts5Auxiliary {\n  Fts5Global *pGlobal;            /* Global context for this function */\n  char *zFunc;                    /* Function name (nul-terminated) */\n  void *pUserData;                /* User-data pointer */\n  fts5_extension_function xFunc;  /* Callback function */\n  void (*xDestroy)(void*);        /* Destructor function */\n  Fts5Auxiliary *pNext;           /* Next registered auxiliary function */\n};\n\n/*\n** Each tokenizer module registered with the FTS5 module is represented\n** by an object of the following type. All such objects are stored as part\n** of the Fts5Global.pTok list.\n**\n** bV2Native:\n**  True if the tokenizer was registered using xCreateTokenizer_v2(), false\n**  for xCreateTokenizer(). If this variable is true, then x2 is populated\n**  with the routines as supplied by the caller and x1 contains synthesized\n**  wrapper routines. In this case the user-data pointer passed to\n**  x1.xCreate should be a pointer to the Fts5TokenizerModule structure,\n**  not a copy of pUserData.\n**\n**  Of course, if bV2Native is false, then x1 contains the real routines and\n**  x2 the synthesized ones. In this case a pointer to the Fts5TokenizerModule\n**  object should be passed to x2.xCreate.\n**\n**  The synthesized wrapper routines are necessary for xFindTokenizer(_v2)\n**  calls.\n*/\nstruct Fts5TokenizerModule {\n  char *zName;                    /* Name of tokenizer */\n  void *pUserData;                /* User pointer passed to xCreate() */\n  int bV2Native;                  /* True if v2 native tokenizer */\n  fts5_tokenizer x1;              /* Tokenizer functions */\n  fts5_tokenizer_v2 x2;           /* V2 tokenizer functions */\n  void (*xDestroy)(void*);        /* Destructor function */\n  Fts5TokenizerModule *pNext;     /* Next registered tokenizer module */\n};\n\nstruct Fts5FullTable {\n  Fts5Table p;                    /* Public class members from fts5Int.h */\n  Fts5Storage *pStorage;          /* Document store */\n  Fts5Global *pGlobal;            /* Global (connection wide) data */\n  Fts5Cursor *pSortCsr;           /* Sort data from this cursor */\n  int iSavepoint;                 /* Successful xSavepoint()+1 */\n\n#ifdef SQLITE_DEBUG\n  struct Fts5TransactionState ts;\n#endif\n};\n\nstruct Fts5MatchPhrase {\n  Fts5Buffer *pPoslist;           /* Pointer to current poslist */\n  int nTerm;                      /* Size of phrase in terms */\n};\n\n/*\n** pStmt:\n**   SELECT rowid, <fts> FROM <fts> ORDER BY +rank;\n**\n** aIdx[]:\n**   There is one entry in the aIdx[] array for each phrase in the query,\n**   the value of which is the offset within aPoslist[] following the last\n**   byte of the position list for the corresponding phrase.\n*/\nstruct Fts5Sorter {\n  sqlite3_stmt *pStmt;\n  i64 iRowid;                     /* Current rowid */\n  const u8 *aPoslist;             /* Position lists for current row */\n  int nIdx;                       /* Number of entries in aIdx[] */\n  int aIdx[FLEXARRAY];            /* Offsets into aPoslist for current row */\n};\n\n/* Size (int bytes) of an Fts5Sorter object with N indexes */\n#define SZ_FTS5SORTER(N) (offsetof(Fts5Sorter,nIdx)+((N+2)/2)*sizeof(i64))\n\n/*\n** Virtual-table cursor object.\n**\n** iSpecial:\n**   If this is a 'special' query (refer to function fts5SpecialMatch()),\n**   then this variable contains the result of the query.\n**\n** iFirstRowid, iLastRowid:\n**   These variables are only used for FTS5_PLAN_MATCH cursors. Assuming the\n**   cursor iterates in ascending order of rowids, iFirstRowid is the lower\n**   limit of rowids to return, and iLastRowid the upper. In other words, the\n**   WHERE clause in the user's query might have been:\n**\n**       <tbl> MATCH <expr> AND rowid BETWEEN $iFirstRowid AND $iLastRowid\n**\n**   If the cursor iterates in descending order of rowid, iFirstRowid\n**   is the upper limit (i.e. the \"first\" rowid visited) and iLastRowid\n**   the lower.\n*/\nstruct Fts5Cursor {\n  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */\n  Fts5Cursor *pNext;              /* Next cursor in Fts5Cursor.pCsr list */\n  int *aColumnSize;               /* Values for xColumnSize() */\n  i64 iCsrId;                     /* Cursor id */\n\n  /* Zero from this point onwards on cursor reset */\n  int ePlan;                      /* FTS5_PLAN_XXX value */\n  int bDesc;                      /* True for \"ORDER BY rowid DESC\" queries */\n  i64 iFirstRowid;                /* Return no rowids earlier than this */\n  i64 iLastRowid;                 /* Return no rowids later than this */\n  sqlite3_stmt *pStmt;            /* Statement used to read %_content */\n  Fts5Expr *pExpr;                /* Expression for MATCH queries */\n  Fts5Sorter *pSorter;            /* Sorter for \"ORDER BY rank\" queries */\n  int csrflags;                   /* Mask of cursor flags (see below) */\n  i64 iSpecial;                   /* Result of special query */\n\n  /* \"rank\" function. Populated on demand from vtab.xColumn(). */\n  char *zRank;                    /* Custom rank function */\n  char *zRankArgs;                /* Custom rank function args */\n  Fts5Auxiliary *pRank;           /* Rank callback (or NULL) */\n  int nRankArg;                   /* Number of trailing arguments for rank() */\n  sqlite3_value **apRankArg;      /* Array of trailing arguments */\n  sqlite3_stmt *pRankArgStmt;     /* Origin of objects in apRankArg[] */\n\n  /* Auxiliary data storage */\n  Fts5Auxiliary *pAux;            /* Currently executing extension function */\n  Fts5Auxdata *pAuxdata;          /* First in linked list of saved aux-data */\n\n  /* Cache used by auxiliary API functions xInst() and xInstCount() */\n  Fts5PoslistReader *aInstIter;   /* One for each phrase */\n  int nInstAlloc;                 /* Size of aInst[] array (entries / 3) */\n  int nInstCount;                 /* Number of phrase instances */\n  int *aInst;                     /* 3 integers per phrase instance */\n};\n\n/*\n** Bits that make up the \"idxNum\" parameter passed indirectly by\n** xBestIndex() to xFilter().\n*/\n#define FTS5_BI_MATCH        0x0001         /* <tbl> MATCH ? */\n#define FTS5_BI_RANK         0x0002         /* rank MATCH ? */\n#define FTS5_BI_ROWID_EQ     0x0004         /* rowid == ? */\n#define FTS5_BI_ROWID_LE     0x0008         /* rowid <= ? */\n#define FTS5_BI_ROWID_GE     0x0010         /* rowid >= ? */\n\n#define FTS5_BI_ORDER_RANK   0x0020\n#define FTS5_BI_ORDER_ROWID  0x0040\n#define FTS5_BI_ORDER_DESC   0x0080\n\n/*\n** Values for Fts5Cursor.csrflags\n*/\n#define FTS5CSR_EOF               0x01\n#define FTS5CSR_REQUIRE_CONTENT   0x02\n#define FTS5CSR_REQUIRE_DOCSIZE   0x04\n#define FTS5CSR_REQUIRE_INST      0x08\n#define FTS5CSR_FREE_ZRANK        0x10\n#define FTS5CSR_REQUIRE_RESEEK    0x20\n#define FTS5CSR_REQUIRE_POSLIST   0x40\n\n#define BitFlagAllTest(x,y) (((x) & (y))==(y))\n#define BitFlagTest(x,y)    (((x) & (y))!=0)\n\n\n/*\n** Macros to Set(), Clear() and Test() cursor flags.\n*/\n#define CsrFlagSet(pCsr, flag)   ((pCsr)->csrflags |= (flag))\n#define CsrFlagClear(pCsr, flag) ((pCsr)->csrflags &= ~(flag))\n#define CsrFlagTest(pCsr, flag)  ((pCsr)->csrflags & (flag))\n\nstruct Fts5Auxdata {\n  Fts5Auxiliary *pAux;            /* Extension to which this belongs */\n  void *pPtr;                     /* Pointer value */\n  void(*xDelete)(void*);          /* Destructor */\n  Fts5Auxdata *pNext;             /* Next object in linked list */\n};\n\n#ifdef SQLITE_DEBUG\n#define FTS5_BEGIN      1\n#define FTS5_SYNC       2\n#define FTS5_COMMIT     3\n#define FTS5_ROLLBACK   4\n#define FTS5_SAVEPOINT  5\n#define FTS5_RELEASE    6\n#define FTS5_ROLLBACKTO 7\nstatic void fts5CheckTransactionState(Fts5FullTable *p, int op, int iSavepoint){\n  switch( op ){\n    case FTS5_BEGIN:\n      assert( p->ts.eState==0 );\n      p->ts.eState = 1;\n      p->ts.iSavepoint = -1;\n      break;\n\n    case FTS5_SYNC:\n      assert( p->ts.eState==1 || p->ts.eState==2 );\n      p->ts.eState = 2;\n      break;\n\n    case FTS5_COMMIT:\n      assert( p->ts.eState==2 );\n      p->ts.eState = 0;\n      break;\n\n    case FTS5_ROLLBACK:\n      assert( p->ts.eState==1 || p->ts.eState==2 || p->ts.eState==0 );\n      p->ts.eState = 0;\n      break;\n\n    case FTS5_SAVEPOINT:\n      assert( p->ts.eState>=1 );\n      assert( iSavepoint>=0 );\n      assert( iSavepoint>=p->ts.iSavepoint );\n      p->ts.iSavepoint = iSavepoint;\n      break;\n\n    case FTS5_RELEASE:\n      assert( p->ts.eState>=1 );\n      assert( iSavepoint>=0 );\n      assert( iSavepoint<=p->ts.iSavepoint );\n      p->ts.iSavepoint = iSavepoint-1;\n      break;\n\n    case FTS5_ROLLBACKTO:\n      assert( p->ts.eState>=1 );\n      assert( iSavepoint>=-1 );\n      /* The following assert() can fail if another vtab strikes an error\n      ** within an xSavepoint() call then SQLite calls xRollbackTo() - without\n      ** having called xSavepoint() on this vtab.  */\n      /* assert( iSavepoint<=p->ts.iSavepoint ); */\n      p->ts.iSavepoint = iSavepoint;\n      break;\n  }\n}\n#else\n# define fts5CheckTransactionState(x,y,z)\n#endif\n\n/*\n** Return true if pTab is a contentless table. If parameter bIncludeUnindexed\n** is true, this includes contentless tables that store UNINDEXED columns\n** only.\n*/\nstatic int fts5IsContentless(Fts5FullTable *pTab, int bIncludeUnindexed){\n  int eContent = pTab->p.pConfig->eContent;\n  return (\n    eContent==FTS5_CONTENT_NONE\n    || (bIncludeUnindexed && eContent==FTS5_CONTENT_UNINDEXED)\n  );\n}\n\n/*\n** Delete a virtual table handle allocated by fts5InitVtab().\n*/\nstatic void fts5FreeVtab(Fts5FullTable *pTab){\n  if( pTab ){\n    sqlite3Fts5IndexClose(pTab->p.pIndex);\n    sqlite3Fts5StorageClose(pTab->pStorage);\n    sqlite3Fts5ConfigFree(pTab->p.pConfig);\n    sqlite3_free(pTab);\n  }\n}\n\n/*\n** The xDisconnect() virtual table method.\n*/\nstatic int fts5DisconnectMethod(sqlite3_vtab *pVtab){\n  fts5FreeVtab((Fts5FullTable*)pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** The xDestroy() virtual table method.\n*/\nstatic int fts5DestroyMethod(sqlite3_vtab *pVtab){\n  Fts5Table *pTab = (Fts5Table*)pVtab;\n  int rc = sqlite3Fts5DropAll(pTab->pConfig);\n  if( rc==SQLITE_OK ){\n    fts5FreeVtab((Fts5FullTable*)pVtab);\n  }\n  return rc;\n}\n\n/*\n** This function is the implementation of both the xConnect and xCreate\n** methods of the FTS3 virtual table.\n**\n** The argv[] array contains the following:\n**\n**   argv[0]   -> module name  (\"fts5\")\n**   argv[1]   -> database name\n**   argv[2]   -> table name\n**   argv[...] -> \"column name\" and other module argument fields.\n*/\nstatic int fts5InitVtab(\n  int bCreate,                    /* True for xCreate, false for xConnect */\n  sqlite3 *db,                    /* The SQLite database connection */\n  void *pAux,                     /* Hash table containing tokenizers */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVTab,          /* Write the resulting vtab structure here */\n  char **pzErr                    /* Write any error message here */\n){\n  Fts5Global *pGlobal = (Fts5Global*)pAux;\n  const char **azConfig = (const char**)argv;\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5Config *pConfig = 0;        /* Results of parsing argc/argv */\n  Fts5FullTable *pTab = 0;        /* New virtual table object */\n\n  /* Allocate the new vtab object and parse the configuration */\n  pTab = (Fts5FullTable*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5FullTable));\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5ConfigParse(pGlobal, db, argc, azConfig, &pConfig, pzErr);\n    assert( (rc==SQLITE_OK && *pzErr==0) || pConfig==0 );\n  }\n  if( rc==SQLITE_OK ){\n    pConfig->pzErrmsg = pzErr;\n    pTab->p.pConfig = pConfig;\n    pTab->pGlobal = pGlobal;\n    if( bCreate || sqlite3Fts5TokenizerPreload(&pConfig->t) ){\n      rc = sqlite3Fts5LoadTokenizer(pConfig);\n    }\n  }\n\n  /* Open the index sub-system */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexOpen(pConfig, bCreate, &pTab->p.pIndex, pzErr);\n  }\n\n  /* Open the storage sub-system */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5StorageOpen(\n        pConfig, pTab->p.pIndex, bCreate, &pTab->pStorage, pzErr\n    );\n  }\n\n  /* Call sqlite3_declare_vtab() */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5ConfigDeclareVtab(pConfig);\n  }\n\n  /* Load the initial configuration */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5ConfigLoad(pTab->p.pConfig, pTab->p.pConfig->iCookie-1);\n  }\n\n  if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){\n    rc = sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, (int)1);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);\n  }\n\n  if( pConfig ) pConfig->pzErrmsg = 0;\n  if( rc!=SQLITE_OK ){\n    fts5FreeVtab(pTab);\n    pTab = 0;\n  }else if( bCreate ){\n    fts5CheckTransactionState(pTab, FTS5_BEGIN, 0);\n  }\n  *ppVTab = (sqlite3_vtab*)pTab;\n  return rc;\n}\n\n/*\n** The xConnect() and xCreate() methods for the virtual table. All the\n** work is done in function fts5InitVtab().\n*/\nstatic int fts5ConnectMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts5InitVtab(0, db, pAux, argc, argv, ppVtab, pzErr);\n}\nstatic int fts5CreateMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts5InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr);\n}\n\n/*\n** The different query plans.\n*/\n#define FTS5_PLAN_MATCH          1       /* (<tbl> MATCH ?) */\n#define FTS5_PLAN_SOURCE         2       /* A source cursor for SORTED_MATCH */\n#define FTS5_PLAN_SPECIAL        3       /* An internal query */\n#define FTS5_PLAN_SORTED_MATCH   4       /* (<tbl> MATCH ? ORDER BY rank) */\n#define FTS5_PLAN_SCAN           5       /* No usable constraint */\n#define FTS5_PLAN_ROWID          6       /* (rowid = ?) */\n\n/*\n** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this\n** extension is currently being used by a version of SQLite too old to\n** support index-info flags. In that case this function is a no-op.\n*/\nstatic void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){\n#if SQLITE_VERSION_NUMBER>=3008012\n#ifndef SQLITE_CORE\n  if( sqlite3_libversion_number()>=3008012 )\n#endif\n  {\n    pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;\n  }\n#endif\n}\n\nstatic void fts5SetEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){\n#if SQLITE_VERSION_NUMBER>=3008002\n#ifndef SQLITE_CORE\n  if( sqlite3_libversion_number()>=3008002 )\n#endif\n  {\n    pIdxInfo->estimatedRows = nRow;\n  }\n#endif\n}\n\nstatic int fts5UsePatternMatch(\n  Fts5Config *pConfig,\n  struct sqlite3_index_constraint *p\n){\n  assert( FTS5_PATTERN_GLOB==SQLITE_INDEX_CONSTRAINT_GLOB );\n  assert( FTS5_PATTERN_LIKE==SQLITE_INDEX_CONSTRAINT_LIKE );\n  if( pConfig->t.ePattern==FTS5_PATTERN_GLOB && p->op==FTS5_PATTERN_GLOB ){\n    return 1;\n  }\n  if( pConfig->t.ePattern==FTS5_PATTERN_LIKE\n   && (p->op==FTS5_PATTERN_LIKE || p->op==FTS5_PATTERN_GLOB)\n  ){\n    return 1;\n  }\n  return 0;\n}\n\n/*\n** Implementation of the xBestIndex method for FTS5 tables. Within the\n** WHERE constraint, it searches for the following:\n**\n**   1. A MATCH constraint against the table column.\n**   2. A MATCH constraint against the \"rank\" column.\n**   3. A MATCH constraint against some other column.\n**   4. An == constraint against the rowid column.\n**   5. A < or <= constraint against the rowid column.\n**   6. A > or >= constraint against the rowid column.\n**\n** Within the ORDER BY, the following are supported:\n**\n**   5. ORDER BY rank [ASC|DESC]\n**   6. ORDER BY rowid [ASC|DESC]\n**\n** Information for the xFilter call is passed via both the idxNum and\n** idxStr variables. Specifically, idxNum is a bitmask of the following\n** flags used to encode the ORDER BY clause:\n**\n**     FTS5_BI_ORDER_RANK\n**     FTS5_BI_ORDER_ROWID\n**     FTS5_BI_ORDER_DESC\n**\n** idxStr is used to encode data from the WHERE clause. For each argument\n** passed to the xFilter method, the following is appended to idxStr:\n**\n**   Match against table column:            \"m\"\n**   Match against rank column:             \"r\"\n**   Match against other column:            \"M<column-number>\"\n**   LIKE  against other column:            \"L<column-number>\"\n**   GLOB  against other column:            \"G<column-number>\"\n**   Equality constraint against the rowid: \"=\"\n**   A < or <= against the rowid:           \"<\"\n**   A > or >= against the rowid:           \">\"\n**\n** This function ensures that there is at most one \"r\" or \"=\". And that if\n** there exists an \"=\" then there is no \"<\" or \">\".\n**\n** If an unusable MATCH operator is present in the WHERE clause, then\n** SQLITE_CONSTRAINT is returned.\n**\n** Costs are assigned as follows:\n**\n**  a) If a MATCH operator is present, the cost depends on the other\n**     constraints also present. As follows:\n**\n**       * No other constraints:         cost=1000.0\n**       * One rowid range constraint:   cost=750.0\n**       * Both rowid range constraints: cost=500.0\n**       * An == rowid constraint:       cost=100.0\n**\n**  b) Otherwise, if there is no MATCH:\n**\n**       * No other constraints:         cost=1000000.0\n**       * One rowid range constraint:   cost=750000.0\n**       * Both rowid range constraints: cost=250000.0\n**       * An == rowid constraint:       cost=10.0\n**\n** Costs are not modified by the ORDER BY clause.\n*/\nstatic int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){\n  Fts5Table *pTab = (Fts5Table*)pVTab;\n  Fts5Config *pConfig = pTab->pConfig;\n  const int nCol = pConfig->nCol;\n  int idxFlags = 0;               /* Parameter passed through to xFilter() */\n  int i;\n\n  char *idxStr;\n  int iIdxStr = 0;\n  int iCons = 0;\n\n  int bSeenEq = 0;\n  int bSeenGt = 0;\n  int bSeenLt = 0;\n  int nSeenMatch = 0;\n  int bSeenRank = 0;\n\n\n  assert( SQLITE_INDEX_CONSTRAINT_EQ<SQLITE_INDEX_CONSTRAINT_MATCH );\n  assert( SQLITE_INDEX_CONSTRAINT_GT<SQLITE_INDEX_CONSTRAINT_MATCH );\n  assert( SQLITE_INDEX_CONSTRAINT_LE<SQLITE_INDEX_CONSTRAINT_MATCH );\n  assert( SQLITE_INDEX_CONSTRAINT_GE<SQLITE_INDEX_CONSTRAINT_MATCH );\n  assert( SQLITE_INDEX_CONSTRAINT_LE<SQLITE_INDEX_CONSTRAINT_MATCH );\n\n  if( pConfig->bLock ){\n    pTab->base.zErrMsg = sqlite3_mprintf(\n        \"recursively defined fts5 content table\"\n    );\n    return SQLITE_ERROR;\n  }\n\n  idxStr = (char*)sqlite3_malloc(pInfo->nConstraint * 8 + 1);\n  if( idxStr==0 ) return SQLITE_NOMEM;\n  pInfo->idxStr = idxStr;\n  pInfo->needToFreeIdxStr = 1;\n\n  for(i=0; i<pInfo->nConstraint; i++){\n    struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];\n    int iCol = p->iColumn;\n    if( p->op==SQLITE_INDEX_CONSTRAINT_MATCH\n     || (p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol>=nCol)\n    ){\n      /* A MATCH operator or equivalent */\n      if( p->usable==0 || iCol<0 ){\n        /* As there exists an unusable MATCH constraint this is an\n        ** unusable plan. Return SQLITE_CONSTRAINT. */\n        idxStr[iIdxStr] = 0;\n        return SQLITE_CONSTRAINT;\n      }else{\n        if( iCol==nCol+1 ){\n          if( bSeenRank ) continue;\n          idxStr[iIdxStr++] = 'r';\n          bSeenRank = 1;\n        }else{\n          nSeenMatch++;\n          idxStr[iIdxStr++] = 'M';\n          sqlite3_snprintf(6, &idxStr[iIdxStr], \"%d\", iCol);\n          iIdxStr += (int)strlen(&idxStr[iIdxStr]);\n          assert( idxStr[iIdxStr]=='\\0' );\n        }\n        pInfo->aConstraintUsage[i].argvIndex = ++iCons;\n        pInfo->aConstraintUsage[i].omit = 1;\n      }\n    }else if( p->usable ){\n      if( iCol>=0 && iCol<nCol && fts5UsePatternMatch(pConfig, p) ){\n        assert( p->op==FTS5_PATTERN_LIKE || p->op==FTS5_PATTERN_GLOB );\n        idxStr[iIdxStr++] = p->op==FTS5_PATTERN_LIKE ? 'L' : 'G';\n        sqlite3_snprintf(6, &idxStr[iIdxStr], \"%d\", iCol);\n        idxStr += strlen(&idxStr[iIdxStr]);\n        pInfo->aConstraintUsage[i].argvIndex = ++iCons;\n        assert( idxStr[iIdxStr]=='\\0' );\n        nSeenMatch++;\n      }else if( bSeenEq==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ && iCol<0 ){\n        idxStr[iIdxStr++] = '=';\n        bSeenEq = 1;\n        pInfo->aConstraintUsage[i].argvIndex = ++iCons;\n        pInfo->aConstraintUsage[i].omit = 1;\n      }\n    }\n  }\n\n  if( bSeenEq==0 ){\n    for(i=0; i<pInfo->nConstraint; i++){\n      struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];\n      if( p->iColumn<0 && p->usable ){\n        int op = p->op;\n        if( op==SQLITE_INDEX_CONSTRAINT_LT || op==SQLITE_INDEX_CONSTRAINT_LE ){\n          if( bSeenLt ) continue;\n          idxStr[iIdxStr++] = '<';\n          pInfo->aConstraintUsage[i].argvIndex = ++iCons;\n          bSeenLt = 1;\n        }else\n        if( op==SQLITE_INDEX_CONSTRAINT_GT || op==SQLITE_INDEX_CONSTRAINT_GE ){\n          if( bSeenGt ) continue;\n          idxStr[iIdxStr++] = '>';\n          pInfo->aConstraintUsage[i].argvIndex = ++iCons;\n          bSeenGt = 1;\n        }\n      }\n    }\n  }\n  idxStr[iIdxStr] = '\\0';\n\n  /* Set idxFlags flags for the ORDER BY clause\n  **\n  ** Note that tokendata=1 tables cannot currently handle \"ORDER BY rowid DESC\".\n  */\n  if( pInfo->nOrderBy==1 ){\n    int iSort = pInfo->aOrderBy[0].iColumn;\n    if( iSort==(pConfig->nCol+1) && nSeenMatch>0 ){\n      idxFlags |= FTS5_BI_ORDER_RANK;\n    }else if( iSort==-1 && (!pInfo->aOrderBy[0].desc || !pConfig->bTokendata) ){\n      idxFlags |= FTS5_BI_ORDER_ROWID;\n    }\n    if( BitFlagTest(idxFlags, FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) ){\n      pInfo->orderByConsumed = 1;\n      if( pInfo->aOrderBy[0].desc ){\n        idxFlags |= FTS5_BI_ORDER_DESC;\n      }\n    }\n  }\n\n  /* Calculate the estimated cost based on the flags set in idxFlags. */\n  if( bSeenEq ){\n    pInfo->estimatedCost = nSeenMatch ? 1000.0 : 25.0;\n    fts5SetUniqueFlag(pInfo);\n    fts5SetEstimatedRows(pInfo, 1);\n  }else{\n    if( bSeenLt && bSeenGt ){\n      pInfo->estimatedCost = nSeenMatch ? 5000.0 :   750000.0;\n    }else if( bSeenLt || bSeenGt ){\n      pInfo->estimatedCost = nSeenMatch ? 7500.0 :  2250000.0;\n    }else{\n      pInfo->estimatedCost = nSeenMatch ? 10000.0 : 3000000.0;\n    }\n    for(i=1; i<nSeenMatch; i++){\n      pInfo->estimatedCost *= 0.4;\n    }\n    fts5SetEstimatedRows(pInfo, (i64)(pInfo->estimatedCost / 4.0));\n  }\n\n  pInfo->idxNum = idxFlags;\n  return SQLITE_OK;\n}\n\nstatic int fts5NewTransaction(Fts5FullTable *pTab){\n  Fts5Cursor *pCsr;\n  for(pCsr=pTab->pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){\n    if( pCsr->base.pVtab==(sqlite3_vtab*)pTab ) return SQLITE_OK;\n  }\n  return sqlite3Fts5StorageReset(pTab->pStorage);\n}\n\n/*\n** Implementation of xOpen method.\n*/\nstatic int fts5OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVTab;\n  Fts5Config *pConfig = pTab->p.pConfig;\n  Fts5Cursor *pCsr = 0;           /* New cursor object */\n  sqlite3_int64 nByte;            /* Bytes of space to allocate */\n  int rc;                         /* Return code */\n\n  rc = fts5NewTransaction(pTab);\n  if( rc==SQLITE_OK ){\n    nByte = sizeof(Fts5Cursor) + pConfig->nCol * sizeof(int);\n    pCsr = (Fts5Cursor*)sqlite3_malloc64(nByte);\n    if( pCsr ){\n      Fts5Global *pGlobal = pTab->pGlobal;\n      memset(pCsr, 0, (size_t)nByte);\n      pCsr->aColumnSize = (int*)&pCsr[1];\n      pCsr->pNext = pGlobal->pCsr;\n      pGlobal->pCsr = pCsr;\n      pCsr->iCsrId = ++pGlobal->iNextId;\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n  }\n  *ppCsr = (sqlite3_vtab_cursor*)pCsr;\n  return rc;\n}\n\nstatic int fts5StmtType(Fts5Cursor *pCsr){\n  if( pCsr->ePlan==FTS5_PLAN_SCAN ){\n    return (pCsr->bDesc) ? FTS5_STMT_SCAN_DESC : FTS5_STMT_SCAN_ASC;\n  }\n  return FTS5_STMT_LOOKUP;\n}\n\n/*\n** This function is called after the cursor passed as the only argument\n** is moved to point at a different row. It clears all cached data\n** specific to the previous row stored by the cursor object.\n*/\nstatic void fts5CsrNewrow(Fts5Cursor *pCsr){\n  CsrFlagSet(pCsr,\n      FTS5CSR_REQUIRE_CONTENT\n    | FTS5CSR_REQUIRE_DOCSIZE\n    | FTS5CSR_REQUIRE_INST\n    | FTS5CSR_REQUIRE_POSLIST\n  );\n}\n\nstatic void fts5FreeCursorComponents(Fts5Cursor *pCsr){\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  Fts5Auxdata *pData;\n  Fts5Auxdata *pNext;\n\n  sqlite3_free(pCsr->aInstIter);\n  sqlite3_free(pCsr->aInst);\n  if( pCsr->pStmt ){\n    int eStmt = fts5StmtType(pCsr);\n    sqlite3Fts5StorageStmtRelease(pTab->pStorage, eStmt, pCsr->pStmt);\n  }\n  if( pCsr->pSorter ){\n    Fts5Sorter *pSorter = pCsr->pSorter;\n    sqlite3_finalize(pSorter->pStmt);\n    sqlite3_free(pSorter);\n  }\n\n  if( pCsr->ePlan!=FTS5_PLAN_SOURCE ){\n    sqlite3Fts5ExprFree(pCsr->pExpr);\n  }\n\n  for(pData=pCsr->pAuxdata; pData; pData=pNext){\n    pNext = pData->pNext;\n    if( pData->xDelete ) pData->xDelete(pData->pPtr);\n    sqlite3_free(pData);\n  }\n\n  sqlite3_finalize(pCsr->pRankArgStmt);\n  sqlite3_free(pCsr->apRankArg);\n\n  if( CsrFlagTest(pCsr, FTS5CSR_FREE_ZRANK) ){\n    sqlite3_free(pCsr->zRank);\n    sqlite3_free(pCsr->zRankArgs);\n  }\n\n  sqlite3Fts5IndexCloseReader(pTab->p.pIndex);\n  memset(&pCsr->ePlan, 0, sizeof(Fts5Cursor) - ((u8*)&pCsr->ePlan - (u8*)pCsr));\n}\n\n\n/*\n** Close the cursor.  For additional information see the documentation\n** on the xClose method of the virtual table interface.\n*/\nstatic int fts5CloseMethod(sqlite3_vtab_cursor *pCursor){\n  if( pCursor ){\n    Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);\n    Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n    Fts5Cursor **pp;\n\n    fts5FreeCursorComponents(pCsr);\n    /* Remove the cursor from the Fts5Global.pCsr list */\n    for(pp=&pTab->pGlobal->pCsr; (*pp)!=pCsr; pp=&(*pp)->pNext);\n    *pp = pCsr->pNext;\n\n    sqlite3_free(pCsr);\n  }\n  return SQLITE_OK;\n}\n\nstatic int fts5SorterNext(Fts5Cursor *pCsr){\n  Fts5Sorter *pSorter = pCsr->pSorter;\n  int rc;\n\n  rc = sqlite3_step(pSorter->pStmt);\n  if( rc==SQLITE_DONE ){\n    rc = SQLITE_OK;\n    CsrFlagSet(pCsr, FTS5CSR_EOF|FTS5CSR_REQUIRE_CONTENT);\n  }else if( rc==SQLITE_ROW ){\n    const u8 *a;\n    const u8 *aBlob;\n    int nBlob;\n    int i;\n    int iOff = 0;\n    rc = SQLITE_OK;\n\n    pSorter->iRowid = sqlite3_column_int64(pSorter->pStmt, 0);\n    nBlob = sqlite3_column_bytes(pSorter->pStmt, 1);\n    aBlob = a = sqlite3_column_blob(pSorter->pStmt, 1);\n\n    /* nBlob==0 in detail=none mode. */\n    if( nBlob>0 ){\n      for(i=0; i<(pSorter->nIdx-1); i++){\n        int iVal;\n        a += fts5GetVarint32(a, iVal);\n        iOff += iVal;\n        pSorter->aIdx[i] = iOff;\n      }\n      pSorter->aIdx[i] = &aBlob[nBlob] - a;\n      pSorter->aPoslist = a;\n    }\n\n    fts5CsrNewrow(pCsr);\n  }\n\n  return rc;\n}\n\n\n/*\n** Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors\n** open on table pTab.\n*/\nstatic void fts5TripCursors(Fts5FullTable *pTab){\n  Fts5Cursor *pCsr;\n  for(pCsr=pTab->pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){\n    if( pCsr->ePlan==FTS5_PLAN_MATCH\n     && pCsr->base.pVtab==(sqlite3_vtab*)pTab\n    ){\n      CsrFlagSet(pCsr, FTS5CSR_REQUIRE_RESEEK);\n    }\n  }\n}\n\n/*\n** If the REQUIRE_RESEEK flag is set on the cursor passed as the first\n** argument, close and reopen all Fts5IndexIter iterators that the cursor\n** is using. Then attempt to move the cursor to a rowid equal to or laster\n** (in the cursors sort order - ASC or DESC) than the current rowid.\n**\n** If the new rowid is not equal to the old, set output parameter *pbSkip\n** to 1 before returning. Otherwise, leave it unchanged.\n**\n** Return SQLITE_OK if successful or if no reseek was required, or an\n** error code if an error occurred.\n*/\nstatic int fts5CursorReseek(Fts5Cursor *pCsr, int *pbSkip){\n  int rc = SQLITE_OK;\n  assert( *pbSkip==0 );\n  if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_RESEEK) ){\n    Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n    int bDesc = pCsr->bDesc;\n    i64 iRowid = sqlite3Fts5ExprRowid(pCsr->pExpr);\n\n    rc = sqlite3Fts5ExprFirst(\n        pCsr->pExpr, pTab->p.pIndex, iRowid, pCsr->iLastRowid, bDesc\n    );\n    if( rc==SQLITE_OK &&  iRowid!=sqlite3Fts5ExprRowid(pCsr->pExpr) ){\n      *pbSkip = 1;\n    }\n\n    CsrFlagClear(pCsr, FTS5CSR_REQUIRE_RESEEK);\n    fts5CsrNewrow(pCsr);\n    if( sqlite3Fts5ExprEof(pCsr->pExpr) ){\n      CsrFlagSet(pCsr, FTS5CSR_EOF);\n      *pbSkip = 1;\n    }\n  }\n  return rc;\n}\n\n\n/*\n** Advance the cursor to the next row in the table that matches the\n** search criteria.\n**\n** Return SQLITE_OK if nothing goes wrong.  SQLITE_OK is returned\n** even if we reach end-of-file.  The fts5EofMethod() will be called\n** subsequently to determine whether or not an EOF was hit.\n*/\nstatic int fts5NextMethod(sqlite3_vtab_cursor *pCursor){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n  int rc;\n\n  assert( (pCsr->ePlan<3)==\n          (pCsr->ePlan==FTS5_PLAN_MATCH || pCsr->ePlan==FTS5_PLAN_SOURCE)\n  );\n  assert( !CsrFlagTest(pCsr, FTS5CSR_EOF) );\n\n  /* If this cursor uses FTS5_PLAN_MATCH and this is a tokendata=1 table,\n  ** clear any token mappings accumulated at the fts5_index.c level. In\n  ** other cases, specifically FTS5_PLAN_SOURCE and FTS5_PLAN_SORTED_MATCH,\n  ** we need to retain the mappings for the entire query.  */\n  if( pCsr->ePlan==FTS5_PLAN_MATCH\n   && ((Fts5Table*)pCursor->pVtab)->pConfig->bTokendata\n  ){\n    sqlite3Fts5ExprClearTokens(pCsr->pExpr);\n  }\n\n  if( pCsr->ePlan<3 ){\n    int bSkip = 0;\n    if( (rc = fts5CursorReseek(pCsr, &bSkip)) || bSkip ) return rc;\n    rc = sqlite3Fts5ExprNext(pCsr->pExpr, pCsr->iLastRowid);\n    CsrFlagSet(pCsr, sqlite3Fts5ExprEof(pCsr->pExpr));\n    fts5CsrNewrow(pCsr);\n  }else{\n    switch( pCsr->ePlan ){\n      case FTS5_PLAN_SPECIAL: {\n        CsrFlagSet(pCsr, FTS5CSR_EOF);\n        rc = SQLITE_OK;\n        break;\n      }\n\n      case FTS5_PLAN_SORTED_MATCH: {\n        rc = fts5SorterNext(pCsr);\n        break;\n      }\n\n      default: {\n        Fts5Config *pConfig = ((Fts5Table*)pCursor->pVtab)->pConfig;\n        pConfig->bLock++;\n        rc = sqlite3_step(pCsr->pStmt);\n        pConfig->bLock--;\n        if( rc!=SQLITE_ROW ){\n          CsrFlagSet(pCsr, FTS5CSR_EOF);\n          rc = sqlite3_reset(pCsr->pStmt);\n          if( rc!=SQLITE_OK ){\n            pCursor->pVtab->zErrMsg = sqlite3_mprintf(\n                \"%s\", sqlite3_errmsg(pConfig->db)\n            );\n          }\n        }else{\n          rc = SQLITE_OK;\n          CsrFlagSet(pCsr, FTS5CSR_REQUIRE_DOCSIZE);\n        }\n        break;\n      }\n    }\n  }\n\n  return rc;\n}\n\n\nstatic int fts5PrepareStatement(\n  sqlite3_stmt **ppStmt,\n  Fts5Config *pConfig,\n  const char *zFmt,\n  ...\n){\n  sqlite3_stmt *pRet = 0;\n  int rc;\n  char *zSql;\n  va_list ap;\n\n  va_start(ap, zFmt);\n  zSql = sqlite3_vmprintf(zFmt, ap);\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    rc = sqlite3_prepare_v3(pConfig->db, zSql, -1,\n                            SQLITE_PREPARE_PERSISTENT, &pRet, 0);\n    if( rc!=SQLITE_OK ){\n      sqlite3Fts5ConfigErrmsg(pConfig, \"%s\", sqlite3_errmsg(pConfig->db));\n    }\n    sqlite3_free(zSql);\n  }\n\n  va_end(ap);\n  *ppStmt = pRet;\n  return rc;\n}\n\nstatic int fts5CursorFirstSorted(\n  Fts5FullTable *pTab,\n  Fts5Cursor *pCsr,\n  int bDesc\n){\n  Fts5Config *pConfig = pTab->p.pConfig;\n  Fts5Sorter *pSorter;\n  int nPhrase;\n  sqlite3_int64 nByte;\n  int rc;\n  const char *zRank = pCsr->zRank;\n  const char *zRankArgs = pCsr->zRankArgs;\n\n  nPhrase = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);\n  nByte = SZ_FTS5SORTER(nPhrase);\n  pSorter = (Fts5Sorter*)sqlite3_malloc64(nByte);\n  if( pSorter==0 ) return SQLITE_NOMEM;\n  memset(pSorter, 0, (size_t)nByte);\n  pSorter->nIdx = nPhrase;\n\n  /* TODO: It would be better to have some system for reusing statement\n  ** handles here, rather than preparing a new one for each query. But that\n  ** is not possible as SQLite reference counts the virtual table objects.\n  ** And since the statement required here reads from this very virtual\n  ** table, saving it creates a circular reference.\n  **\n  ** If SQLite a built-in statement cache, this wouldn't be a problem. */\n  rc = fts5PrepareStatement(&pSorter->pStmt, pConfig,\n      \"SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\\\"%w\\\"%s%s) %s\",\n      pConfig->zDb, pConfig->zName, zRank, pConfig->zName,\n      (zRankArgs ? \", \" : \"\"),\n      (zRankArgs ? zRankArgs : \"\"),\n      bDesc ? \"DESC\" : \"ASC\"\n  );\n\n  pCsr->pSorter = pSorter;\n  if( rc==SQLITE_OK ){\n    assert( pTab->pSortCsr==0 );\n    pTab->pSortCsr = pCsr;\n    rc = fts5SorterNext(pCsr);\n    pTab->pSortCsr = 0;\n  }\n\n  if( rc!=SQLITE_OK ){\n    sqlite3_finalize(pSorter->pStmt);\n    sqlite3_free(pSorter);\n    pCsr->pSorter = 0;\n  }\n\n  return rc;\n}\n\nstatic int fts5CursorFirst(Fts5FullTable *pTab, Fts5Cursor *pCsr, int bDesc){\n  int rc;\n  Fts5Expr *pExpr = pCsr->pExpr;\n  rc = sqlite3Fts5ExprFirst(\n      pExpr, pTab->p.pIndex, pCsr->iFirstRowid, pCsr->iLastRowid, bDesc\n  );\n  if( sqlite3Fts5ExprEof(pExpr) ){\n    CsrFlagSet(pCsr, FTS5CSR_EOF);\n  }\n  fts5CsrNewrow(pCsr);\n  return rc;\n}\n\n/*\n** Process a \"special\" query. A special query is identified as one with a\n** MATCH expression that begins with a '*' character. The remainder of\n** the text passed to the MATCH operator are used as  the special query\n** parameters.\n*/\nstatic int fts5SpecialMatch(\n  Fts5FullTable *pTab,\n  Fts5Cursor *pCsr,\n  const char *zQuery\n){\n  int rc = SQLITE_OK;             /* Return code */\n  const char *z = zQuery;         /* Special query text */\n  int n;                          /* Number of bytes in text at z */\n\n  while( z[0]==' ' ) z++;\n  for(n=0; z[n] && z[n]!=' '; n++);\n\n  assert( pTab->p.base.zErrMsg==0 );\n  pCsr->ePlan = FTS5_PLAN_SPECIAL;\n\n  if( n==5 && 0==sqlite3_strnicmp(\"reads\", z, n) ){\n    pCsr->iSpecial = sqlite3Fts5IndexReads(pTab->p.pIndex);\n  }\n  else if( n==2 && 0==sqlite3_strnicmp(\"id\", z, n) ){\n    pCsr->iSpecial = pCsr->iCsrId;\n  }\n  else{\n    /* An unrecognized directive. Return an error message. */\n    pTab->p.base.zErrMsg = sqlite3_mprintf(\"unknown special query: %.*s\", n, z);\n    rc = SQLITE_ERROR;\n  }\n\n  return rc;\n}\n\n/*\n** Search for an auxiliary function named zName that can be used with table\n** pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary\n** structure. Otherwise, if no such function exists, return NULL.\n*/\nstatic Fts5Auxiliary *fts5FindAuxiliary(Fts5FullTable *pTab, const char *zName){\n  Fts5Auxiliary *pAux;\n\n  for(pAux=pTab->pGlobal->pAux; pAux; pAux=pAux->pNext){\n    if( sqlite3_stricmp(zName, pAux->zFunc)==0 ) return pAux;\n  }\n\n  /* No function of the specified name was found. Return 0. */\n  return 0;\n}\n\n\nstatic int fts5FindRankFunction(Fts5Cursor *pCsr){\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  Fts5Config *pConfig = pTab->p.pConfig;\n  int rc = SQLITE_OK;\n  Fts5Auxiliary *pAux = 0;\n  const char *zRank = pCsr->zRank;\n  const char *zRankArgs = pCsr->zRankArgs;\n\n  if( zRankArgs ){\n    char *zSql = sqlite3Fts5Mprintf(&rc, \"SELECT %s\", zRankArgs);\n    if( zSql ){\n      sqlite3_stmt *pStmt = 0;\n      rc = sqlite3_prepare_v3(pConfig->db, zSql, -1,\n                              SQLITE_PREPARE_PERSISTENT, &pStmt, 0);\n      sqlite3_free(zSql);\n      assert( rc==SQLITE_OK || pCsr->pRankArgStmt==0 );\n      if( rc==SQLITE_OK ){\n        if( SQLITE_ROW==sqlite3_step(pStmt) ){\n          sqlite3_int64 nByte;\n          pCsr->nRankArg = sqlite3_column_count(pStmt);\n          nByte = sizeof(sqlite3_value*)*pCsr->nRankArg;\n          pCsr->apRankArg = (sqlite3_value**)sqlite3Fts5MallocZero(&rc, nByte);\n          if( rc==SQLITE_OK ){\n            int i;\n            for(i=0; i<pCsr->nRankArg; i++){\n              pCsr->apRankArg[i] = sqlite3_column_value(pStmt, i);\n            }\n          }\n          pCsr->pRankArgStmt = pStmt;\n        }else{\n          rc = sqlite3_finalize(pStmt);\n          assert( rc!=SQLITE_OK );\n        }\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    pAux = fts5FindAuxiliary(pTab, zRank);\n    if( pAux==0 ){\n      assert( pTab->p.base.zErrMsg==0 );\n      pTab->p.base.zErrMsg = sqlite3_mprintf(\"no such function: %s\", zRank);\n      rc = SQLITE_ERROR;\n    }\n  }\n\n  pCsr->pRank = pAux;\n  return rc;\n}\n\n\nstatic int fts5CursorParseRank(\n  Fts5Config *pConfig,\n  Fts5Cursor *pCsr,\n  sqlite3_value *pRank\n){\n  int rc = SQLITE_OK;\n  if( pRank ){\n    const char *z = (const char*)sqlite3_value_text(pRank);\n    char *zRank = 0;\n    char *zRankArgs = 0;\n\n    if( z==0 ){\n      if( sqlite3_value_type(pRank)==SQLITE_NULL ) rc = SQLITE_ERROR;\n    }else{\n      rc = sqlite3Fts5ConfigParseRank(z, &zRank, &zRankArgs);\n    }\n    if( rc==SQLITE_OK ){\n      pCsr->zRank = zRank;\n      pCsr->zRankArgs = zRankArgs;\n      CsrFlagSet(pCsr, FTS5CSR_FREE_ZRANK);\n    }else if( rc==SQLITE_ERROR ){\n      pCsr->base.pVtab->zErrMsg = sqlite3_mprintf(\n          \"parse error in rank function: %s\", z\n      );\n    }\n  }else{\n    if( pConfig->zRank ){\n      pCsr->zRank = (char*)pConfig->zRank;\n      pCsr->zRankArgs = (char*)pConfig->zRankArgs;\n    }else{\n      pCsr->zRank = (char*)FTS5_DEFAULT_RANK;\n      pCsr->zRankArgs = 0;\n    }\n  }\n  return rc;\n}\n\nstatic i64 fts5GetRowidLimit(sqlite3_value *pVal, i64 iDefault){\n  if( pVal ){\n    int eType = sqlite3_value_numeric_type(pVal);\n    if( eType==SQLITE_INTEGER ){\n      return sqlite3_value_int64(pVal);\n    }\n  }\n  return iDefault;\n}\n\n/*\n** Set the error message on the virtual table passed as the first argument.\n*/\nstatic void fts5SetVtabError(Fts5FullTable *p, const char *zFormat, ...){\n  va_list ap;                     /* ... printf arguments */\n  va_start(ap, zFormat);\n  sqlite3_free(p->p.base.zErrMsg);\n  p->p.base.zErrMsg = sqlite3_vmprintf(zFormat, ap);\n  va_end(ap);\n}\n\n/*\n** Arrange for subsequent calls to sqlite3Fts5Tokenize() to use the locale\n** specified by pLocale/nLocale. The buffer indicated by pLocale must remain\n** valid until after the final call to sqlite3Fts5Tokenize() that will use\n** the locale.\n*/\nstatic void sqlite3Fts5SetLocale(\n  Fts5Config *pConfig,\n  const char *zLocale,\n  int nLocale\n){\n  Fts5TokenizerConfig *pT = &pConfig->t;\n  pT->pLocale = zLocale;\n  pT->nLocale = nLocale;\n}\n\n/*\n** Clear any locale configured by an earlier call to sqlite3Fts5SetLocale().\n*/\nstatic void sqlite3Fts5ClearLocale(Fts5Config *pConfig){\n  sqlite3Fts5SetLocale(pConfig, 0, 0);\n}\n\n/*\n** Return true if the value passed as the only argument is an\n** fts5_locale() value.\n*/\nstatic int sqlite3Fts5IsLocaleValue(Fts5Config *pConfig, sqlite3_value *pVal){\n  int ret = 0;\n  if( sqlite3_value_type(pVal)==SQLITE_BLOB ){\n    /* Call sqlite3_value_bytes() after sqlite3_value_blob() in this case.\n    ** If the blob was created using zeroblob(), then sqlite3_value_blob()\n    ** may call malloc(). If this malloc() fails, then the values returned\n    ** by both value_blob() and value_bytes() will be 0. If value_bytes() were\n    ** called first, then the NULL pointer returned by value_blob() might\n    ** be dereferenced.  */\n    const u8 *pBlob = sqlite3_value_blob(pVal);\n    int nBlob = sqlite3_value_bytes(pVal);\n    if( nBlob>FTS5_LOCALE_HDR_SIZE\n     && 0==memcmp(pBlob, FTS5_LOCALE_HDR(pConfig), FTS5_LOCALE_HDR_SIZE)\n    ){\n      ret = 1;\n    }\n  }\n  return ret;\n}\n\n/*\n** Value pVal is guaranteed to be an fts5_locale() value, according to\n** sqlite3Fts5IsLocaleValue(). This function extracts the text and locale\n** from the value and returns them separately.\n**\n** If successful, SQLITE_OK is returned and (*ppText) and (*ppLoc) set\n** to point to buffers containing the text and locale, as utf-8,\n** respectively. In this case output parameters (*pnText) and (*pnLoc) are\n** set to the sizes in bytes of these two buffers.\n**\n** Or, if an error occurs, then an SQLite error code is returned. The final\n** value of the four output parameters is undefined in this case.\n*/\nstatic int sqlite3Fts5DecodeLocaleValue(\n  sqlite3_value *pVal,\n  const char **ppText,\n  int *pnText,\n  const char **ppLoc,\n  int *pnLoc\n){\n  const char *p = sqlite3_value_blob(pVal);\n  int n = sqlite3_value_bytes(pVal);\n  int nLoc = 0;\n\n  assert( sqlite3_value_type(pVal)==SQLITE_BLOB );\n  assert( n>FTS5_LOCALE_HDR_SIZE );\n\n  for(nLoc=FTS5_LOCALE_HDR_SIZE; p[nLoc]; nLoc++){\n    if( nLoc==(n-1) ){\n      return SQLITE_MISMATCH;\n    }\n  }\n  *ppLoc = &p[FTS5_LOCALE_HDR_SIZE];\n  *pnLoc = nLoc - FTS5_LOCALE_HDR_SIZE;\n\n  *ppText = &p[nLoc+1];\n  *pnText = n - nLoc - 1;\n  return SQLITE_OK;\n}\n\n/*\n** Argument pVal is the text of a full-text search expression. It may or\n** may not have been wrapped by fts5_locale(). This function extracts\n** the text of the expression, and sets output variable (*pzText) to\n** point to a nul-terminated buffer containing the expression.\n**\n** If pVal was an fts5_locale() value, then sqlite3Fts5SetLocale() is called\n** to set the tokenizer to use the specified locale.\n**\n** If output variable (*pbFreeAndReset) is set to true, then the caller\n** is required to (a) call sqlite3Fts5ClearLocale() to reset the tokenizer\n** locale, and (b) call sqlite3_free() to free (*pzText).\n*/\nstatic int fts5ExtractExprText(\n  Fts5Config *pConfig,            /* Fts5 configuration */\n  sqlite3_value *pVal,            /* Value to extract expression text from */\n  char **pzText,                  /* OUT: nul-terminated buffer of text */\n  int *pbFreeAndReset             /* OUT: Free (*pzText) and clear locale */\n){\n  int rc = SQLITE_OK;\n\n  if( sqlite3Fts5IsLocaleValue(pConfig, pVal) ){\n    const char *pText = 0;\n    int nText = 0;\n    const char *pLoc = 0;\n    int nLoc = 0;\n    rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc);\n    *pzText = sqlite3Fts5Mprintf(&rc, \"%.*s\", nText, pText);\n    if( rc==SQLITE_OK ){\n      sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n    }\n    *pbFreeAndReset = 1;\n  }else{\n    *pzText = (char*)sqlite3_value_text(pVal);\n    *pbFreeAndReset = 0;\n  }\n\n  return rc;\n}\n\n\n/*\n** This is the xFilter interface for the virtual table.  See\n** the virtual table xFilter method documentation for additional\n** information.\n**\n** There are three possible query strategies:\n**\n**   1. Full-text search using a MATCH operator.\n**   2. A by-rowid lookup.\n**   3. A full-table scan.\n*/\nstatic int fts5FilterMethod(\n  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */\n  int idxNum,                     /* Strategy index */\n  const char *idxStr,             /* Unused */\n  int nVal,                       /* Number of elements in apVal */\n  sqlite3_value **apVal           /* Arguments for the indexing scheme */\n){\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);\n  Fts5Config *pConfig = pTab->p.pConfig;\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n  int rc = SQLITE_OK;             /* Error code */\n  int bDesc;                      /* True if ORDER BY [rank|rowid] DESC */\n  int bOrderByRank;               /* True if ORDER BY rank */\n  sqlite3_value *pRank = 0;       /* rank MATCH ? expression (or NULL) */\n  sqlite3_value *pRowidEq = 0;    /* rowid = ? expression (or NULL) */\n  sqlite3_value *pRowidLe = 0;    /* rowid <= ? expression (or NULL) */\n  sqlite3_value *pRowidGe = 0;    /* rowid >= ? expression (or NULL) */\n  int iCol;                       /* Column on LHS of MATCH operator */\n  char **pzErrmsg = pConfig->pzErrmsg;\n  int bPrefixInsttoken = pConfig->bPrefixInsttoken;\n  int i;\n  int iIdxStr = 0;\n  Fts5Expr *pExpr = 0;\n\n  assert( pConfig->bLock==0 );\n  if( pCsr->ePlan ){\n    fts5FreeCursorComponents(pCsr);\n    memset(&pCsr->ePlan, 0, sizeof(Fts5Cursor) - ((u8*)&pCsr->ePlan-(u8*)pCsr));\n  }\n\n  assert( pCsr->pStmt==0 );\n  assert( pCsr->pExpr==0 );\n  assert( pCsr->csrflags==0 );\n  assert( pCsr->pRank==0 );\n  assert( pCsr->zRank==0 );\n  assert( pCsr->zRankArgs==0 );\n  assert( pTab->pSortCsr==0 || nVal==0 );\n\n  assert( pzErrmsg==0 || pzErrmsg==&pTab->p.base.zErrMsg );\n  pConfig->pzErrmsg = &pTab->p.base.zErrMsg;\n\n  /* Decode the arguments passed through to this function. */\n  for(i=0; i<nVal; i++){\n    switch( idxStr[iIdxStr++] ){\n      case 'r':\n        pRank = apVal[i];\n        break;\n      case 'M': {\n        char *zText = 0;\n        int bFreeAndReset = 0;\n        int bInternal = 0;\n\n        rc = fts5ExtractExprText(pConfig, apVal[i], &zText, &bFreeAndReset);\n        if( rc!=SQLITE_OK ) goto filter_out;\n        if( zText==0 ) zText = \"\";\n        if( sqlite3_value_subtype(apVal[i])==FTS5_INSTTOKEN_SUBTYPE ){\n          pConfig->bPrefixInsttoken = 1;\n        }\n\n        iCol = 0;\n        do{\n          iCol = iCol*10 + (idxStr[iIdxStr]-'0');\n          iIdxStr++;\n        }while( idxStr[iIdxStr]>='0' && idxStr[iIdxStr]<='9' );\n\n        if( zText[0]=='*' ){\n          /* The user has issued a query of the form \"MATCH '*...'\". This\n          ** indicates that the MATCH expression is not a full text query,\n          ** but a request for an internal parameter.  */\n          rc = fts5SpecialMatch(pTab, pCsr, &zText[1]);\n          bInternal = 1;\n        }else{\n          char **pzErr = &pTab->p.base.zErrMsg;\n          rc = sqlite3Fts5ExprNew(pConfig, 0, iCol, zText, &pExpr, pzErr);\n          if( rc==SQLITE_OK ){\n            rc = sqlite3Fts5ExprAnd(&pCsr->pExpr, pExpr);\n            pExpr = 0;\n          }\n        }\n\n        if( bFreeAndReset ){\n          sqlite3_free(zText);\n          sqlite3Fts5ClearLocale(pConfig);\n        }\n\n        if( bInternal || rc!=SQLITE_OK ) goto filter_out;\n\n        break;\n      }\n      case 'L':\n      case 'G': {\n        int bGlob = (idxStr[iIdxStr-1]=='G');\n        const char *zText = (const char*)sqlite3_value_text(apVal[i]);\n        iCol = 0;\n        do{\n          iCol = iCol*10 + (idxStr[iIdxStr]-'0');\n          iIdxStr++;\n        }while( idxStr[iIdxStr]>='0' && idxStr[iIdxStr]<='9' );\n        if( zText ){\n          rc = sqlite3Fts5ExprPattern(pConfig, bGlob, iCol, zText, &pExpr);\n        }\n        if( rc==SQLITE_OK ){\n          rc = sqlite3Fts5ExprAnd(&pCsr->pExpr, pExpr);\n          pExpr = 0;\n        }\n        if( rc!=SQLITE_OK ) goto filter_out;\n        break;\n      }\n      case '=':\n        pRowidEq = apVal[i];\n        break;\n      case '<':\n        pRowidLe = apVal[i];\n        break;\n      default: assert( idxStr[iIdxStr-1]=='>' );\n        pRowidGe = apVal[i];\n        break;\n    }\n  }\n  bOrderByRank = ((idxNum & FTS5_BI_ORDER_RANK) ? 1 : 0);\n  pCsr->bDesc = bDesc = ((idxNum & FTS5_BI_ORDER_DESC) ? 1 : 0);\n\n  /* Set the cursor upper and lower rowid limits. Only some strategies\n  ** actually use them. This is ok, as the xBestIndex() method leaves the\n  ** sqlite3_index_constraint.omit flag clear for range constraints\n  ** on the rowid field.  */\n  if( pRowidEq ){\n    pRowidLe = pRowidGe = pRowidEq;\n  }\n  if( bDesc ){\n    pCsr->iFirstRowid = fts5GetRowidLimit(pRowidLe, LARGEST_INT64);\n    pCsr->iLastRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);\n  }else{\n    pCsr->iLastRowid = fts5GetRowidLimit(pRowidLe, LARGEST_INT64);\n    pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);\n  }\n\n  rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);\n  if( rc!=SQLITE_OK ) goto filter_out;\n\n  if( pTab->pSortCsr ){\n    /* If pSortCsr is non-NULL, then this call is being made as part of\n    ** processing for a \"... MATCH <expr> ORDER BY rank\" query (ePlan is\n    ** set to FTS5_PLAN_SORTED_MATCH). pSortCsr is the cursor that will\n    ** return results to the user for this query. The current cursor\n    ** (pCursor) is used to execute the query issued by function\n    ** fts5CursorFirstSorted() above.  */\n    assert( pRowidEq==0 && pRowidLe==0 && pRowidGe==0 && pRank==0 );\n    assert( nVal==0 && bOrderByRank==0 && bDesc==0 );\n    assert( pCsr->iLastRowid==LARGEST_INT64 );\n    assert( pCsr->iFirstRowid==SMALLEST_INT64 );\n    if( pTab->pSortCsr->bDesc ){\n      pCsr->iLastRowid = pTab->pSortCsr->iFirstRowid;\n      pCsr->iFirstRowid = pTab->pSortCsr->iLastRowid;\n    }else{\n      pCsr->iLastRowid = pTab->pSortCsr->iLastRowid;\n      pCsr->iFirstRowid = pTab->pSortCsr->iFirstRowid;\n    }\n    pCsr->ePlan = FTS5_PLAN_SOURCE;\n    pCsr->pExpr = pTab->pSortCsr->pExpr;\n    rc = fts5CursorFirst(pTab, pCsr, bDesc);\n  }else if( pCsr->pExpr ){\n    assert( rc==SQLITE_OK );\n    rc = fts5CursorParseRank(pConfig, pCsr, pRank);\n    if( rc==SQLITE_OK ){\n      if( bOrderByRank ){\n        pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;\n        rc = fts5CursorFirstSorted(pTab, pCsr, bDesc);\n      }else{\n        pCsr->ePlan = FTS5_PLAN_MATCH;\n        rc = fts5CursorFirst(pTab, pCsr, bDesc);\n      }\n    }\n  }else if( pConfig->zContent==0 ){\n    fts5SetVtabError(pTab,\"%s: table does not support scanning\",pConfig->zName);\n    rc = SQLITE_ERROR;\n  }else{\n    /* This is either a full-table scan (ePlan==FTS5_PLAN_SCAN) or a lookup\n    ** by rowid (ePlan==FTS5_PLAN_ROWID).  */\n    pCsr->ePlan = (pRowidEq ? FTS5_PLAN_ROWID : FTS5_PLAN_SCAN);\n    rc = sqlite3Fts5StorageStmt(\n        pTab->pStorage, fts5StmtType(pCsr), &pCsr->pStmt, &pTab->p.base.zErrMsg\n    );\n    if( rc==SQLITE_OK ){\n      if( pRowidEq!=0 ){\n        assert( pCsr->ePlan==FTS5_PLAN_ROWID );\n        sqlite3_bind_value(pCsr->pStmt, 1, pRowidEq);\n      }else{\n        sqlite3_bind_int64(pCsr->pStmt, 1, pCsr->iFirstRowid);\n        sqlite3_bind_int64(pCsr->pStmt, 2, pCsr->iLastRowid);\n      }\n      rc = fts5NextMethod(pCursor);\n    }\n  }\n\n filter_out:\n  sqlite3Fts5ExprFree(pExpr);\n  pConfig->pzErrmsg = pzErrmsg;\n  pConfig->bPrefixInsttoken = bPrefixInsttoken;\n  return rc;\n}\n\n/*\n** This is the xEof method of the virtual table. SQLite calls this\n** routine to find out if it has reached the end of a result set.\n*/\nstatic int fts5EofMethod(sqlite3_vtab_cursor *pCursor){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n  return (CsrFlagTest(pCsr, FTS5CSR_EOF) ? 1 : 0);\n}\n\n/*\n** Return the rowid that the cursor currently points to.\n*/\nstatic i64 fts5CursorRowid(Fts5Cursor *pCsr){\n  assert( pCsr->ePlan==FTS5_PLAN_MATCH\n       || pCsr->ePlan==FTS5_PLAN_SORTED_MATCH\n       || pCsr->ePlan==FTS5_PLAN_SOURCE\n       || pCsr->ePlan==FTS5_PLAN_SCAN\n       || pCsr->ePlan==FTS5_PLAN_ROWID\n  );\n  if( pCsr->pSorter ){\n    return pCsr->pSorter->iRowid;\n  }else if( pCsr->ePlan>=FTS5_PLAN_SCAN ){\n    return sqlite3_column_int64(pCsr->pStmt, 0);\n  }else{\n    return sqlite3Fts5ExprRowid(pCsr->pExpr);\n  }\n}\n\n/*\n** This is the xRowid method. The SQLite core calls this routine to\n** retrieve the rowid for the current row of the result set. fts5\n** exposes %_content.rowid as the rowid for the virtual table. The\n** rowid should be written to *pRowid.\n*/\nstatic int fts5RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n  int ePlan = pCsr->ePlan;\n\n  assert( CsrFlagTest(pCsr, FTS5CSR_EOF)==0 );\n  if( ePlan==FTS5_PLAN_SPECIAL ){\n    *pRowid = 0;\n  }else{\n    *pRowid = fts5CursorRowid(pCsr);\n  }\n\n  return SQLITE_OK;\n}\n\n\n/*\n** If the cursor requires seeking (bSeekRequired flag is set), seek it.\n** Return SQLITE_OK if no error occurs, or an SQLite error code otherwise.\n**\n** If argument bErrormsg is true and an error occurs, an error message may\n** be left in sqlite3_vtab.zErrMsg.\n*/\nstatic int fts5SeekCursor(Fts5Cursor *pCsr, int bErrormsg){\n  int rc = SQLITE_OK;\n\n  /* If the cursor does not yet have a statement handle, obtain one now. */\n  if( pCsr->pStmt==0 ){\n    Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n    int eStmt = fts5StmtType(pCsr);\n    rc = sqlite3Fts5StorageStmt(\n        pTab->pStorage, eStmt, &pCsr->pStmt, (bErrormsg?&pTab->p.base.zErrMsg:0)\n    );\n    assert( rc!=SQLITE_OK || pTab->p.base.zErrMsg==0 );\n    assert( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_CONTENT) );\n  }\n\n  if( rc==SQLITE_OK && CsrFlagTest(pCsr, FTS5CSR_REQUIRE_CONTENT) ){\n    Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);\n    assert( pCsr->pExpr );\n    sqlite3_reset(pCsr->pStmt);\n    sqlite3_bind_int64(pCsr->pStmt, 1, fts5CursorRowid(pCsr));\n    pTab->pConfig->bLock++;\n    rc = sqlite3_step(pCsr->pStmt);\n    pTab->pConfig->bLock--;\n    if( rc==SQLITE_ROW ){\n      rc = SQLITE_OK;\n      CsrFlagClear(pCsr, FTS5CSR_REQUIRE_CONTENT);\n    }else{\n      rc = sqlite3_reset(pCsr->pStmt);\n      if( rc==SQLITE_OK ){\n        rc = FTS5_CORRUPT;\n        fts5SetVtabError((Fts5FullTable*)pTab,\n            \"fts5: missing row %lld from content table %s\",\n            fts5CursorRowid(pCsr),\n            pTab->pConfig->zContent\n        );\n      }else if( pTab->pConfig->pzErrmsg ){\n        fts5SetVtabError((Fts5FullTable*)pTab,\n            \"%s\", sqlite3_errmsg(pTab->pConfig->db)\n        );\n      }\n    }\n  }\n  return rc;\n}\n\n/*\n** This function is called to handle an FTS INSERT command. In other words,\n** an INSERT statement of the form:\n**\n**     INSERT INTO fts(fts) VALUES($pCmd)\n**     INSERT INTO fts(fts, rank) VALUES($pCmd, $pVal)\n**\n** Argument pVal is the value assigned to column \"fts\" by the INSERT\n** statement. This function returns SQLITE_OK if successful, or an SQLite\n** error code if an error occurs.\n**\n** The commands implemented by this function are documented in the \"Special\n** INSERT Directives\" section of the documentation. It should be updated if\n** more commands are added to this function.\n*/\nstatic int fts5SpecialInsert(\n  Fts5FullTable *pTab,            /* Fts5 table object */\n  const char *zCmd,               /* Text inserted into table-name column */\n  sqlite3_value *pVal             /* Value inserted into rank column */\n){\n  Fts5Config *pConfig = pTab->p.pConfig;\n  int rc = SQLITE_OK;\n  int bError = 0;\n  int bLoadConfig = 0;\n\n  if( 0==sqlite3_stricmp(\"delete-all\", zCmd) ){\n    if( pConfig->eContent==FTS5_CONTENT_NORMAL ){\n      fts5SetVtabError(pTab,\n          \"'delete-all' may only be used with a \"\n          \"contentless or external content fts5 table\"\n      );\n      rc = SQLITE_ERROR;\n    }else{\n      rc = sqlite3Fts5StorageDeleteAll(pTab->pStorage);\n    }\n    bLoadConfig = 1;\n  }else if( 0==sqlite3_stricmp(\"rebuild\", zCmd) ){\n    if( fts5IsContentless(pTab, 1) ){\n      fts5SetVtabError(pTab,\n          \"'rebuild' may not be used with a contentless fts5 table\"\n      );\n      rc = SQLITE_ERROR;\n    }else{\n      rc = sqlite3Fts5StorageRebuild(pTab->pStorage);\n    }\n    bLoadConfig = 1;\n  }else if( 0==sqlite3_stricmp(\"optimize\", zCmd) ){\n    rc = sqlite3Fts5StorageOptimize(pTab->pStorage);\n  }else if( 0==sqlite3_stricmp(\"merge\", zCmd) ){\n    int nMerge = sqlite3_value_int(pVal);\n    rc = sqlite3Fts5StorageMerge(pTab->pStorage, nMerge);\n  }else if( 0==sqlite3_stricmp(\"integrity-check\", zCmd) ){\n    int iArg = sqlite3_value_int(pVal);\n    rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, iArg);\n#ifdef SQLITE_DEBUG\n  }else if( 0==sqlite3_stricmp(\"prefix-index\", zCmd) ){\n    pConfig->bPrefixIndex = sqlite3_value_int(pVal);\n#endif\n  }else if( 0==sqlite3_stricmp(\"flush\", zCmd) ){\n    rc = sqlite3Fts5FlushToDisk(&pTab->p);\n  }else{\n    rc = sqlite3Fts5FlushToDisk(&pTab->p);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts5ConfigSetValue(pTab->p.pConfig, zCmd, pVal, &bError);\n    }\n    if( rc==SQLITE_OK ){\n      if( bError ){\n        rc = SQLITE_ERROR;\n      }else{\n        rc = sqlite3Fts5StorageConfigValue(pTab->pStorage, zCmd, pVal, 0);\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK && bLoadConfig ){\n    pTab->p.pConfig->iCookie--;\n    rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex);\n  }\n\n  return rc;\n}\n\nstatic int fts5SpecialDelete(\n  Fts5FullTable *pTab,\n  sqlite3_value **apVal\n){\n  int rc = SQLITE_OK;\n  int eType1 = sqlite3_value_type(apVal[1]);\n  if( eType1==SQLITE_INTEGER ){\n    sqlite3_int64 iDel = sqlite3_value_int64(apVal[1]);\n    rc = sqlite3Fts5StorageDelete(pTab->pStorage, iDel, &apVal[2], 0);\n  }\n  return rc;\n}\n\nstatic void fts5StorageInsert(\n  int *pRc,\n  Fts5FullTable *pTab,\n  sqlite3_value **apVal,\n  i64 *piRowid\n){\n  int rc = *pRc;\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5StorageContentInsert(pTab->pStorage, 0, apVal, piRowid);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5StorageIndexInsert(pTab->pStorage, apVal, *piRowid);\n  }\n  *pRc = rc;\n}\n\n/*\n**\n** This function is called when the user attempts an UPDATE on a contentless\n** table. Parameter bRowidModified is true if the UPDATE statement modifies\n** the rowid value. Parameter apVal[] contains the new values for each user\n** defined column of the fts5 table. pConfig is the configuration object of the\n** table being updated (guaranteed to be contentless). The contentless_delete=1\n** and contentless_unindexed=1 options may or may not be set.\n**\n** This function returns SQLITE_OK if the UPDATE can go ahead, or an SQLite\n** error code if it cannot. In this case an error message is also loaded into\n** pConfig. Output parameter (*pbContent) is set to true if the caller should\n** update the %_content table only - not the FTS index or any other shadow\n** table. This occurs when an UPDATE modifies only UNINDEXED columns of the\n** table.\n**\n** An UPDATE may proceed if:\n**\n**   * The only columns modified are UNINDEXED columns, or\n**\n**   * The contentless_delete=1 option was specified and all of the indexed\n**     columns (not a subset) have been modified.\n*/\nstatic int fts5ContentlessUpdate(\n  Fts5Config *pConfig,\n  sqlite3_value **apVal,\n  int bRowidModified,\n  int *pbContent\n){\n  int ii;\n  int bSeenIndex = 0;             /* Have seen modified indexed column */\n  int bSeenIndexNC = 0;           /* Have seen unmodified indexed column */\n  int rc = SQLITE_OK;\n\n  for(ii=0; ii<pConfig->nCol; ii++){\n    if( pConfig->abUnindexed[ii]==0 ){\n      if( sqlite3_value_nochange(apVal[ii]) ){\n        bSeenIndexNC++;\n      }else{\n        bSeenIndex++;\n      }\n    }\n  }\n\n  if( bSeenIndex==0 && bRowidModified==0 ){\n    *pbContent = 1;\n  }else{\n    if( bSeenIndexNC || pConfig->bContentlessDelete==0 ){\n      rc = SQLITE_ERROR;\n      sqlite3Fts5ConfigErrmsg(pConfig,\n          (pConfig->bContentlessDelete ?\n          \"%s a subset of columns on fts5 contentless-delete table: %s\" :\n          \"%s contentless fts5 table: %s\")\n          , \"cannot UPDATE\", pConfig->zName\n      );\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is the implementation of the xUpdate callback used by\n** FTS3 virtual tables. It is invoked by SQLite each time a row is to be\n** inserted, updated or deleted.\n**\n** A delete specifies a single argument - the rowid of the row to remove.\n**\n** Update and insert operations pass:\n**\n**   1. The \"old\" rowid, or NULL.\n**   2. The \"new\" rowid.\n**   3. Values for each of the nCol matchable columns.\n**   4. Values for the two hidden columns (<tablename> and \"rank\").\n*/\nstatic int fts5UpdateMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  int nArg,                       /* Size of argument array */\n  sqlite3_value **apVal,          /* Array of arguments */\n  sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */\n){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  Fts5Config *pConfig = pTab->p.pConfig;\n  int eType0;                     /* value_type() of apVal[0] */\n  int rc = SQLITE_OK;             /* Return code */\n\n  /* A transaction must be open when this is called. */\n  assert( pTab->ts.eState==1 || pTab->ts.eState==2 );\n\n  assert( pVtab->zErrMsg==0 );\n  assert( nArg==1 || nArg==(2+pConfig->nCol+2) );\n  assert( sqlite3_value_type(apVal[0])==SQLITE_INTEGER\n       || sqlite3_value_type(apVal[0])==SQLITE_NULL\n  );\n  assert( pTab->p.pConfig->pzErrmsg==0 );\n  if( pConfig->pgsz==0 ){\n    rc = sqlite3Fts5ConfigLoad(pTab->p.pConfig, pTab->p.pConfig->iCookie);\n    if( rc!=SQLITE_OK ) return rc;\n  }\n\n  pTab->p.pConfig->pzErrmsg = &pTab->p.base.zErrMsg;\n\n  /* Put any active cursors into REQUIRE_SEEK state. */\n  fts5TripCursors(pTab);\n\n  eType0 = sqlite3_value_type(apVal[0]);\n  if( eType0==SQLITE_NULL\n   && sqlite3_value_type(apVal[2+pConfig->nCol])!=SQLITE_NULL\n  ){\n    /* A \"special\" INSERT op. These are handled separately. */\n    const char *z = (const char*)sqlite3_value_text(apVal[2+pConfig->nCol]);\n    if( pConfig->eContent!=FTS5_CONTENT_NORMAL\n      && 0==sqlite3_stricmp(\"delete\", z)\n    ){\n      if( pConfig->bContentlessDelete ){\n        fts5SetVtabError(pTab,\n            \"'delete' may not be used with a contentless_delete=1 table\"\n        );\n        rc = SQLITE_ERROR;\n      }else{\n        rc = fts5SpecialDelete(pTab, apVal);\n      }\n    }else{\n      rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);\n    }\n  }else{\n    /* A regular INSERT, UPDATE or DELETE statement. The trick here is that\n    ** any conflict on the rowid value must be detected before any\n    ** modifications are made to the database file. There are 4 cases:\n    **\n    **   1) DELETE\n    **   2) UPDATE (rowid not modified)\n    **   3) UPDATE (rowid modified)\n    **   4) INSERT\n    **\n    ** Cases 3 and 4 may violate the rowid constraint.\n    */\n    int eConflict = SQLITE_ABORT;\n    if( pConfig->eContent==FTS5_CONTENT_NORMAL || pConfig->bContentlessDelete ){\n      eConflict = sqlite3_vtab_on_conflict(pConfig->db);\n    }\n\n    assert( eType0==SQLITE_INTEGER || eType0==SQLITE_NULL );\n    assert( nArg!=1 || eType0==SQLITE_INTEGER );\n\n    /* DELETE */\n    if( nArg==1 ){\n      /* It is only possible to DELETE from a contentless table if the\n      ** contentless_delete=1 flag is set. */\n      if( fts5IsContentless(pTab, 1) && pConfig->bContentlessDelete==0 ){\n        fts5SetVtabError(pTab,\n            \"cannot DELETE from contentless fts5 table: %s\", pConfig->zName\n        );\n        rc = SQLITE_ERROR;\n      }else{\n        i64 iDel = sqlite3_value_int64(apVal[0]);  /* Rowid to delete */\n        rc = sqlite3Fts5StorageDelete(pTab->pStorage, iDel, 0, 0);\n      }\n    }\n\n    /* INSERT or UPDATE */\n    else{\n      int eType1 = sqlite3_value_numeric_type(apVal[1]);\n\n      /* It is an error to write an fts5_locale() value to a table without\n      ** the locale=1 option. */\n      if( pConfig->bLocale==0 ){\n        int ii;\n        for(ii=0; ii<pConfig->nCol; ii++){\n          sqlite3_value *pVal = apVal[ii+2];\n          if( sqlite3Fts5IsLocaleValue(pConfig, pVal) ){\n            fts5SetVtabError(pTab, \"fts5_locale() requires locale=1\");\n            rc = SQLITE_MISMATCH;\n            goto update_out;\n          }\n        }\n      }\n\n      if( eType0!=SQLITE_INTEGER ){\n        /* An INSERT statement. If the conflict-mode is REPLACE, first remove\n        ** the current entry (if any). */\n        if( eConflict==SQLITE_REPLACE && eType1==SQLITE_INTEGER ){\n          i64 iNew = sqlite3_value_int64(apVal[1]);  /* Rowid to delete */\n          rc = sqlite3Fts5StorageDelete(pTab->pStorage, iNew, 0, 0);\n        }\n        fts5StorageInsert(&rc, pTab, apVal, pRowid);\n      }\n\n      /* UPDATE */\n      else{\n        Fts5Storage *pStorage = pTab->pStorage;\n        i64 iOld = sqlite3_value_int64(apVal[0]);  /* Old rowid */\n        i64 iNew = sqlite3_value_int64(apVal[1]);  /* New rowid */\n        int bContent = 0;         /* Content only update */\n\n        /* If this is a contentless table (including contentless_unindexed=1\n        ** tables), check if the UPDATE may proceed.  */\n        if( fts5IsContentless(pTab, 1) ){\n          rc = fts5ContentlessUpdate(pConfig, &apVal[2], iOld!=iNew, &bContent);\n          if( rc!=SQLITE_OK ) goto update_out;\n        }\n\n        if( eType1!=SQLITE_INTEGER ){\n          rc = SQLITE_MISMATCH;\n        }else if( iOld!=iNew ){\n          assert( bContent==0 );\n          if( eConflict==SQLITE_REPLACE ){\n            rc = sqlite3Fts5StorageDelete(pStorage, iOld, 0, 1);\n            if( rc==SQLITE_OK ){\n              rc = sqlite3Fts5StorageDelete(pStorage, iNew, 0, 0);\n            }\n            fts5StorageInsert(&rc, pTab, apVal, pRowid);\n          }else{\n            rc = sqlite3Fts5StorageFindDeleteRow(pStorage, iOld);\n            if( rc==SQLITE_OK ){\n              rc = sqlite3Fts5StorageContentInsert(pStorage, 0, apVal, pRowid);\n            }\n            if( rc==SQLITE_OK ){\n              rc = sqlite3Fts5StorageDelete(pStorage, iOld, 0, 0);\n            }\n            if( rc==SQLITE_OK ){\n              rc = sqlite3Fts5StorageIndexInsert(pStorage, apVal, *pRowid);\n            }\n          }\n        }else if( bContent ){\n          /* This occurs when an UPDATE on a contentless table affects *only*\n          ** UNINDEXED columns. This is a no-op for contentless_unindexed=0\n          ** tables, or a write to the %_content table only for =1 tables.  */\n          assert( fts5IsContentless(pTab, 1) );\n          rc = sqlite3Fts5StorageFindDeleteRow(pStorage, iOld);\n          if( rc==SQLITE_OK ){\n            rc = sqlite3Fts5StorageContentInsert(pStorage, 1, apVal, pRowid);\n          }\n        }else{\n          rc = sqlite3Fts5StorageDelete(pStorage, iOld, 0, 1);\n          fts5StorageInsert(&rc, pTab, apVal, pRowid);\n        }\n        sqlite3Fts5StorageReleaseDeleteRow(pStorage);\n      }\n    }\n  }\n\n update_out:\n  pTab->p.pConfig->pzErrmsg = 0;\n  return rc;\n}\n\n/*\n** Implementation of xSync() method.\n*/\nstatic int fts5SyncMethod(sqlite3_vtab *pVtab){\n  int rc;\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  fts5CheckTransactionState(pTab, FTS5_SYNC, 0);\n  pTab->p.pConfig->pzErrmsg = &pTab->p.base.zErrMsg;\n  rc = sqlite3Fts5FlushToDisk(&pTab->p);\n  pTab->p.pConfig->pzErrmsg = 0;\n  return rc;\n}\n\n/*\n** Implementation of xBegin() method.\n*/\nstatic int fts5BeginMethod(sqlite3_vtab *pVtab){\n  int rc = fts5NewTransaction((Fts5FullTable*)pVtab);\n  if( rc==SQLITE_OK ){\n    fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_BEGIN, 0);\n  }\n  return rc;\n}\n\n/*\n** Implementation of xCommit() method. This is a no-op. The contents of\n** the pending-terms hash-table have already been flushed into the database\n** by fts5SyncMethod().\n*/\nstatic int fts5CommitMethod(sqlite3_vtab *pVtab){\n  UNUSED_PARAM(pVtab);  /* Call below is a no-op for NDEBUG builds */\n  fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_COMMIT, 0);\n  return SQLITE_OK;\n}\n\n/*\n** Implementation of xRollback(). Discard the contents of the pending-terms\n** hash-table. Any changes made to the database are reverted by SQLite.\n*/\nstatic int fts5RollbackMethod(sqlite3_vtab *pVtab){\n  int rc;\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  fts5CheckTransactionState(pTab, FTS5_ROLLBACK, 0);\n  rc = sqlite3Fts5StorageRollback(pTab->pStorage);\n  pTab->p.pConfig->pgsz = 0;\n  return rc;\n}\n\nstatic int fts5CsrPoslist(Fts5Cursor*, int, const u8**, int*);\n\nstatic void *fts5ApiUserData(Fts5Context *pCtx){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  return pCsr->pAux->pUserData;\n}\n\nstatic int fts5ApiColumnCount(Fts5Context *pCtx){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  return ((Fts5Table*)(pCsr->base.pVtab))->pConfig->nCol;\n}\n\nstatic int fts5ApiColumnTotalSize(\n  Fts5Context *pCtx,\n  int iCol,\n  sqlite3_int64 *pnToken\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  return sqlite3Fts5StorageSize(pTab->pStorage, iCol, pnToken);\n}\n\nstatic int fts5ApiRowCount(Fts5Context *pCtx, i64 *pnRow){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  return sqlite3Fts5StorageRowCount(pTab->pStorage, pnRow);\n}\n\n/*\n** Implementation of xTokenize_v2() API.\n*/\nstatic int fts5ApiTokenize_v2(\n  Fts5Context *pCtx,\n  const char *pText, int nText,\n  const char *pLoc, int nLoc,\n  void *pUserData,\n  int (*xToken)(void*, int, const char*, int, int, int)\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);\n  int rc = SQLITE_OK;\n\n  sqlite3Fts5SetLocale(pTab->pConfig, pLoc, nLoc);\n  rc = sqlite3Fts5Tokenize(pTab->pConfig,\n      FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken\n  );\n  sqlite3Fts5SetLocale(pTab->pConfig, 0, 0);\n\n  return rc;\n}\n\n/*\n** Implementation of xTokenize() API. This is just xTokenize_v2() with NULL/0\n** passed as the locale.\n*/\nstatic int fts5ApiTokenize(\n  Fts5Context *pCtx,\n  const char *pText, int nText,\n  void *pUserData,\n  int (*xToken)(void*, int, const char*, int, int, int)\n){\n  return fts5ApiTokenize_v2(pCtx, pText, nText, 0, 0, pUserData, xToken);\n}\n\nstatic int fts5ApiPhraseCount(Fts5Context *pCtx){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  return sqlite3Fts5ExprPhraseCount(pCsr->pExpr);\n}\n\nstatic int fts5ApiPhraseSize(Fts5Context *pCtx, int iPhrase){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  return sqlite3Fts5ExprPhraseSize(pCsr->pExpr, iPhrase);\n}\n\n/*\n** Argument pStmt is an SQL statement of the type used by Fts5Cursor. This\n** function extracts the text value of column iCol of the current row.\n** Additionally, if there is an associated locale, it invokes\n** sqlite3Fts5SetLocale() to configure the tokenizer. In all cases the caller\n** should invoke sqlite3Fts5ClearLocale() to clear the locale at some point\n** after this function returns.\n**\n** If successful, (*ppText) is set to point to a buffer containing the text\n** value as utf-8 and SQLITE_OK returned. (*pnText) is set to the size of that\n** buffer in bytes. It is not guaranteed to be nul-terminated. If an error\n** occurs, an SQLite error code is returned. The final values of the two\n** output parameters are undefined in this case.\n*/\nstatic int fts5TextFromStmt(\n  Fts5Config *pConfig,\n  sqlite3_stmt *pStmt,\n  int iCol,\n  const char **ppText,\n  int *pnText\n){\n  sqlite3_value *pVal = sqlite3_column_value(pStmt, iCol+1);\n  const char *pLoc = 0;\n  int nLoc = 0;\n  int rc = SQLITE_OK;\n\n  if( pConfig->bLocale\n   && pConfig->eContent==FTS5_CONTENT_EXTERNAL\n   && sqlite3Fts5IsLocaleValue(pConfig, pVal)\n  ){\n    rc = sqlite3Fts5DecodeLocaleValue(pVal, ppText, pnText, &pLoc, &nLoc);\n  }else{\n    *ppText = (const char*)sqlite3_value_text(pVal);\n    *pnText = sqlite3_value_bytes(pVal);\n    if( pConfig->bLocale && pConfig->eContent==FTS5_CONTENT_NORMAL ){\n      pLoc = (const char*)sqlite3_column_text(pStmt, iCol+1+pConfig->nCol);\n      nLoc = sqlite3_column_bytes(pStmt, iCol+1+pConfig->nCol);\n    }\n  }\n  sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n  return rc;\n}\n\nstatic int fts5ApiColumnText(\n  Fts5Context *pCtx,\n  int iCol,\n  const char **pz,\n  int *pn\n){\n  int rc = SQLITE_OK;\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);\n\n  assert( pCsr->ePlan!=FTS5_PLAN_SPECIAL );\n  if( iCol<0 || iCol>=pTab->pConfig->nCol ){\n    rc = SQLITE_RANGE;\n  }else if( fts5IsContentless((Fts5FullTable*)(pCsr->base.pVtab), 0) ){\n    *pz = 0;\n    *pn = 0;\n  }else{\n    rc = fts5SeekCursor(pCsr, 0);\n    if( rc==SQLITE_OK ){\n      rc = fts5TextFromStmt(pTab->pConfig, pCsr->pStmt, iCol, pz, pn);\n      sqlite3Fts5ClearLocale(pTab->pConfig);\n    }\n  }\n  return rc;\n}\n\n/*\n** This is called by various API functions - xInst, xPhraseFirst,\n** xPhraseFirstColumn etc. - to obtain the position list for phrase iPhrase\n** of the current row. This function works for both detail=full tables (in\n** which case the position-list was read from the fts index) or for other\n** detail= modes if the row content is available.\n*/\nstatic int fts5CsrPoslist(\n  Fts5Cursor *pCsr,               /* Fts5 cursor object */\n  int iPhrase,                    /* Phrase to find position list for */\n  const u8 **pa,                  /* OUT: Pointer to position list buffer */\n  int *pn                         /* OUT: Size of (*pa) in bytes */\n){\n  Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;\n  int rc = SQLITE_OK;\n  int bLive = (pCsr->pSorter==0);\n\n  if( iPhrase<0 || iPhrase>=sqlite3Fts5ExprPhraseCount(pCsr->pExpr) ){\n    rc = SQLITE_RANGE;\n  }else if( pConfig->eDetail!=FTS5_DETAIL_FULL\n         && fts5IsContentless((Fts5FullTable*)pCsr->base.pVtab, 1)\n  ){\n    *pa = 0;\n    *pn = 0;\n    return SQLITE_OK;\n  }else if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_POSLIST) ){\n    if( pConfig->eDetail!=FTS5_DETAIL_FULL ){\n      Fts5PoslistPopulator *aPopulator;\n      int i;\n\n      aPopulator = sqlite3Fts5ExprClearPoslists(pCsr->pExpr, bLive);\n      if( aPopulator==0 ) rc = SQLITE_NOMEM;\n      if( rc==SQLITE_OK ){\n        rc = fts5SeekCursor(pCsr, 0);\n      }\n      for(i=0; i<pConfig->nCol && rc==SQLITE_OK; i++){\n        const char *z = 0;\n        int n = 0;\n        rc = fts5TextFromStmt(pConfig, pCsr->pStmt, i, &z, &n);\n        if( rc==SQLITE_OK ){\n          rc = sqlite3Fts5ExprPopulatePoslists(\n              pConfig, pCsr->pExpr, aPopulator, i, z, n\n          );\n        }\n        sqlite3Fts5ClearLocale(pConfig);\n      }\n      sqlite3_free(aPopulator);\n\n      if( pCsr->pSorter ){\n        sqlite3Fts5ExprCheckPoslists(pCsr->pExpr, pCsr->pSorter->iRowid);\n      }\n    }\n    CsrFlagClear(pCsr, FTS5CSR_REQUIRE_POSLIST);\n  }\n\n  if( rc==SQLITE_OK ){\n    if( pCsr->pSorter && pConfig->eDetail==FTS5_DETAIL_FULL ){\n      Fts5Sorter *pSorter = pCsr->pSorter;\n      int i1 = (iPhrase==0 ? 0 : pSorter->aIdx[iPhrase-1]);\n      *pn = pSorter->aIdx[iPhrase] - i1;\n      *pa = &pSorter->aPoslist[i1];\n    }else{\n      *pn = sqlite3Fts5ExprPoslist(pCsr->pExpr, iPhrase, pa);\n    }\n  }else{\n    *pa = 0;\n    *pn = 0;\n  }\n\n  return rc;\n}\n\n/*\n** Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated\n** correctly for the current view. Return SQLITE_OK if successful, or an\n** SQLite error code otherwise.\n*/\nstatic int fts5CacheInstArray(Fts5Cursor *pCsr){\n  int rc = SQLITE_OK;\n  Fts5PoslistReader *aIter;       /* One iterator for each phrase */\n  int nIter;                      /* Number of iterators/phrases */\n  int nCol = ((Fts5Table*)pCsr->base.pVtab)->pConfig->nCol;\n\n  nIter = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);\n  if( pCsr->aInstIter==0 ){\n    sqlite3_int64 nByte = sizeof(Fts5PoslistReader) * nIter;\n    pCsr->aInstIter = (Fts5PoslistReader*)sqlite3Fts5MallocZero(&rc, nByte);\n  }\n  aIter = pCsr->aInstIter;\n\n  if( aIter ){\n    int nInst = 0;                /* Number instances seen so far */\n    int i;\n\n    /* Initialize all iterators */\n    for(i=0; i<nIter && rc==SQLITE_OK; i++){\n      const u8 *a;\n      int n;\n      rc = fts5CsrPoslist(pCsr, i, &a, &n);\n      if( rc==SQLITE_OK ){\n        sqlite3Fts5PoslistReaderInit(a, n, &aIter[i]);\n      }\n    }\n\n    if( rc==SQLITE_OK ){\n      while( 1 ){\n        int *aInst;\n        int iBest = -1;\n        for(i=0; i<nIter; i++){\n          if( (aIter[i].bEof==0)\n              && (iBest<0 || aIter[i].iPos<aIter[iBest].iPos)\n            ){\n            iBest = i;\n          }\n        }\n        if( iBest<0 ) break;\n\n        nInst++;\n        if( nInst>=pCsr->nInstAlloc ){\n          int nNewSize = pCsr->nInstAlloc ? pCsr->nInstAlloc*2 : 32;\n          aInst = (int*)sqlite3_realloc64(\n              pCsr->aInst, nNewSize*sizeof(int)*3\n              );\n          if( aInst ){\n            pCsr->aInst = aInst;\n            pCsr->nInstAlloc = nNewSize;\n          }else{\n            nInst--;\n            rc = SQLITE_NOMEM;\n            break;\n          }\n        }\n\n        aInst = &pCsr->aInst[3 * (nInst-1)];\n        aInst[0] = iBest;\n        aInst[1] = FTS5_POS2COLUMN(aIter[iBest].iPos);\n        aInst[2] = FTS5_POS2OFFSET(aIter[iBest].iPos);\n        assert( aInst[1]>=0 );\n        if( aInst[1]>=nCol ){\n          rc = FTS5_CORRUPT;\n          break;\n        }\n        sqlite3Fts5PoslistReaderNext(&aIter[iBest]);\n      }\n    }\n\n    pCsr->nInstCount = nInst;\n    CsrFlagClear(pCsr, FTS5CSR_REQUIRE_INST);\n  }\n  return rc;\n}\n\nstatic int fts5ApiInstCount(Fts5Context *pCtx, int *pnInst){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  int rc = SQLITE_OK;\n  if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST)==0\n   || SQLITE_OK==(rc = fts5CacheInstArray(pCsr)) ){\n    *pnInst = pCsr->nInstCount;\n  }\n  return rc;\n}\n\nstatic int fts5ApiInst(\n  Fts5Context *pCtx,\n  int iIdx,\n  int *piPhrase,\n  int *piCol,\n  int *piOff\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  int rc = SQLITE_OK;\n  if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST)==0\n   || SQLITE_OK==(rc = fts5CacheInstArray(pCsr))\n  ){\n    if( iIdx<0 || iIdx>=pCsr->nInstCount ){\n      rc = SQLITE_RANGE;\n    }else{\n      *piPhrase = pCsr->aInst[iIdx*3];\n      *piCol = pCsr->aInst[iIdx*3 + 1];\n      *piOff = pCsr->aInst[iIdx*3 + 2];\n    }\n  }\n  return rc;\n}\n\nstatic sqlite3_int64 fts5ApiRowid(Fts5Context *pCtx){\n  return fts5CursorRowid((Fts5Cursor*)pCtx);\n}\n\nstatic int fts5ColumnSizeCb(\n  void *pContext,                 /* Pointer to int */\n  int tflags,\n  const char *pUnused,            /* Buffer containing token */\n  int nUnused,                    /* Size of token in bytes */\n  int iUnused1,                   /* Start offset of token */\n  int iUnused2                    /* End offset of token */\n){\n  int *pCnt = (int*)pContext;\n  UNUSED_PARAM2(pUnused, nUnused);\n  UNUSED_PARAM2(iUnused1, iUnused2);\n  if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){\n    (*pCnt)++;\n  }\n  return SQLITE_OK;\n}\n\nstatic int fts5ApiColumnSize(Fts5Context *pCtx, int iCol, int *pnToken){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  Fts5Config *pConfig = pTab->p.pConfig;\n  int rc = SQLITE_OK;\n\n  if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_DOCSIZE) ){\n    if( pConfig->bColumnsize ){\n      i64 iRowid = fts5CursorRowid(pCsr);\n      rc = sqlite3Fts5StorageDocsize(pTab->pStorage, iRowid, pCsr->aColumnSize);\n    }else if( !pConfig->zContent || pConfig->eContent==FTS5_CONTENT_UNINDEXED ){\n      int i;\n      for(i=0; i<pConfig->nCol; i++){\n        if( pConfig->abUnindexed[i]==0 ){\n          pCsr->aColumnSize[i] = -1;\n        }\n      }\n    }else{\n      int i;\n      rc = fts5SeekCursor(pCsr, 0);\n      for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){\n        if( pConfig->abUnindexed[i]==0 ){\n          const char *z = 0;\n          int n = 0;\n          pCsr->aColumnSize[i] = 0;\n          rc = fts5TextFromStmt(pConfig, pCsr->pStmt, i, &z, &n);\n          if( rc==SQLITE_OK ){\n            rc = sqlite3Fts5Tokenize(pConfig, FTS5_TOKENIZE_AUX,\n                z, n, (void*)&pCsr->aColumnSize[i], fts5ColumnSizeCb\n            );\n          }\n          sqlite3Fts5ClearLocale(pConfig);\n        }\n      }\n    }\n    CsrFlagClear(pCsr, FTS5CSR_REQUIRE_DOCSIZE);\n  }\n  if( iCol<0 ){\n    int i;\n    *pnToken = 0;\n    for(i=0; i<pConfig->nCol; i++){\n      *pnToken += pCsr->aColumnSize[i];\n    }\n  }else if( iCol<pConfig->nCol ){\n    *pnToken = pCsr->aColumnSize[iCol];\n  }else{\n    *pnToken = 0;\n    rc = SQLITE_RANGE;\n  }\n  return rc;\n}\n\n/*\n** Implementation of the xSetAuxdata() method.\n*/\nstatic int fts5ApiSetAuxdata(\n  Fts5Context *pCtx,              /* Fts5 context */\n  void *pPtr,                     /* Pointer to save as auxdata */\n  void(*xDelete)(void*)           /* Destructor for pPtr (or NULL) */\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Auxdata *pData;\n\n  /* Search through the cursors list of Fts5Auxdata objects for one that\n  ** corresponds to the currently executing auxiliary function.  */\n  for(pData=pCsr->pAuxdata; pData; pData=pData->pNext){\n    if( pData->pAux==pCsr->pAux ) break;\n  }\n\n  if( pData ){\n    if( pData->xDelete ){\n      pData->xDelete(pData->pPtr);\n    }\n  }else{\n    int rc = SQLITE_OK;\n    pData = (Fts5Auxdata*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Auxdata));\n    if( pData==0 ){\n      if( xDelete ) xDelete(pPtr);\n      return rc;\n    }\n    pData->pAux = pCsr->pAux;\n    pData->pNext = pCsr->pAuxdata;\n    pCsr->pAuxdata = pData;\n  }\n\n  pData->xDelete = xDelete;\n  pData->pPtr = pPtr;\n  return SQLITE_OK;\n}\n\nstatic void *fts5ApiGetAuxdata(Fts5Context *pCtx, int bClear){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Auxdata *pData;\n  void *pRet = 0;\n\n  for(pData=pCsr->pAuxdata; pData; pData=pData->pNext){\n    if( pData->pAux==pCsr->pAux ) break;\n  }\n\n  if( pData ){\n    pRet = pData->pPtr;\n    if( bClear ){\n      pData->pPtr = 0;\n      pData->xDelete = 0;\n    }\n  }\n\n  return pRet;\n}\n\nstatic void fts5ApiPhraseNext(\n  Fts5Context *pCtx,\n  Fts5PhraseIter *pIter,\n  int *piCol, int *piOff\n){\n  if( pIter->a>=pIter->b ){\n    *piCol = -1;\n    *piOff = -1;\n  }else{\n    int iVal;\n    pIter->a += fts5GetVarint32(pIter->a, iVal);\n    if( iVal==1 ){\n      /* Avoid returning a (*piCol) value that is too large for the table,\n      ** even if the position-list is corrupt. The caller might not be\n      ** expecting it.  */\n      int nCol = ((Fts5Table*)(((Fts5Cursor*)pCtx)->base.pVtab))->pConfig->nCol;\n      pIter->a += fts5GetVarint32(pIter->a, iVal);\n      *piCol = (iVal>=nCol ? nCol-1 : iVal);\n      *piOff = 0;\n      pIter->a += fts5GetVarint32(pIter->a, iVal);\n    }\n    *piOff += (iVal-2);\n  }\n}\n\nstatic int fts5ApiPhraseFirst(\n  Fts5Context *pCtx,\n  int iPhrase,\n  Fts5PhraseIter *pIter,\n  int *piCol, int *piOff\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  int n;\n  int rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);\n  if( rc==SQLITE_OK ){\n    assert( pIter->a || n==0 );\n    pIter->b = (pIter->a ? &pIter->a[n] : 0);\n    *piCol = 0;\n    *piOff = 0;\n    fts5ApiPhraseNext(pCtx, pIter, piCol, piOff);\n  }\n  return rc;\n}\n\nstatic void fts5ApiPhraseNextColumn(\n  Fts5Context *pCtx,\n  Fts5PhraseIter *pIter,\n  int *piCol\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;\n\n  if( pConfig->eDetail==FTS5_DETAIL_COLUMNS ){\n    if( pIter->a>=pIter->b ){\n      *piCol = -1;\n    }else{\n      int iIncr;\n      pIter->a += fts5GetVarint32(&pIter->a[0], iIncr);\n      *piCol += (iIncr-2);\n    }\n  }else{\n    while( 1 ){\n      int dummy;\n      if( pIter->a>=pIter->b ){\n        *piCol = -1;\n        return;\n      }\n      if( pIter->a[0]==0x01 ) break;\n      pIter->a += fts5GetVarint32(pIter->a, dummy);\n    }\n    pIter->a += 1 + fts5GetVarint32(&pIter->a[1], *piCol);\n  }\n}\n\nstatic int fts5ApiPhraseFirstColumn(\n  Fts5Context *pCtx,\n  int iPhrase,\n  Fts5PhraseIter *pIter,\n  int *piCol\n){\n  int rc = SQLITE_OK;\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;\n\n  if( pConfig->eDetail==FTS5_DETAIL_COLUMNS ){\n    Fts5Sorter *pSorter = pCsr->pSorter;\n    int n;\n    if( pSorter ){\n      int i1 = (iPhrase==0 ? 0 : pSorter->aIdx[iPhrase-1]);\n      n = pSorter->aIdx[iPhrase] - i1;\n      pIter->a = &pSorter->aPoslist[i1];\n    }else{\n      rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, iPhrase, &pIter->a, &n);\n    }\n    if( rc==SQLITE_OK ){\n      assert( pIter->a || n==0 );\n      pIter->b = (pIter->a ? &pIter->a[n] : 0);\n      *piCol = 0;\n      fts5ApiPhraseNextColumn(pCtx, pIter, piCol);\n    }\n  }else{\n    int n;\n    rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);\n    if( rc==SQLITE_OK ){\n      assert( pIter->a || n==0 );\n      pIter->b = (pIter->a ? &pIter->a[n] : 0);\n      if( n<=0 ){\n        *piCol = -1;\n      }else if( pIter->a[0]==0x01 ){\n        pIter->a += 1 + fts5GetVarint32(&pIter->a[1], *piCol);\n      }else{\n        *piCol = 0;\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** xQueryToken() API implemenetation.\n*/\nstatic int fts5ApiQueryToken(\n  Fts5Context* pCtx,\n  int iPhrase,\n  int iToken,\n  const char **ppOut,\n  int *pnOut\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  return sqlite3Fts5ExprQueryToken(pCsr->pExpr, iPhrase, iToken, ppOut, pnOut);\n}\n\n/*\n** xInstToken() API implemenetation.\n*/\nstatic int fts5ApiInstToken(\n  Fts5Context *pCtx,\n  int iIdx,\n  int iToken,\n  const char **ppOut, int *pnOut\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  int rc = SQLITE_OK;\n  if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST)==0\n   || SQLITE_OK==(rc = fts5CacheInstArray(pCsr))\n  ){\n    if( iIdx<0 || iIdx>=pCsr->nInstCount ){\n      rc = SQLITE_RANGE;\n    }else{\n      int iPhrase = pCsr->aInst[iIdx*3];\n      int iCol = pCsr->aInst[iIdx*3 + 1];\n      int iOff = pCsr->aInst[iIdx*3 + 2];\n      i64 iRowid = fts5CursorRowid(pCsr);\n      rc = sqlite3Fts5ExprInstToken(\n          pCsr->pExpr, iRowid, iPhrase, iCol, iOff, iToken, ppOut, pnOut\n      );\n    }\n  }\n  return rc;\n}\n\n\nstatic int fts5ApiQueryPhrase(Fts5Context*, int, void*,\n    int(*)(const Fts5ExtensionApi*, Fts5Context*, void*)\n);\n\n/*\n** The xColumnLocale() API.\n*/\nstatic int fts5ApiColumnLocale(\n  Fts5Context *pCtx,\n  int iCol,\n  const char **pzLocale,\n  int *pnLocale\n){\n  int rc = SQLITE_OK;\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;\n\n  *pzLocale = 0;\n  *pnLocale = 0;\n\n  assert( pCsr->ePlan!=FTS5_PLAN_SPECIAL );\n  if( iCol<0 || iCol>=pConfig->nCol ){\n    rc = SQLITE_RANGE;\n  }else if(\n      pConfig->abUnindexed[iCol]==0\n   && 0==fts5IsContentless((Fts5FullTable*)pCsr->base.pVtab, 1)\n   && pConfig->bLocale\n  ){\n    rc = fts5SeekCursor(pCsr, 0);\n    if( rc==SQLITE_OK ){\n      const char *zDummy = 0;\n      int nDummy = 0;\n      rc = fts5TextFromStmt(pConfig, pCsr->pStmt, iCol, &zDummy, &nDummy);\n      if( rc==SQLITE_OK ){\n        *pzLocale = pConfig->t.pLocale;\n        *pnLocale = pConfig->t.nLocale;\n      }\n      sqlite3Fts5ClearLocale(pConfig);\n    }\n  }\n\n  return rc;\n}\n\nstatic const Fts5ExtensionApi sFts5Api = {\n  4,                            /* iVersion */\n  fts5ApiUserData,\n  fts5ApiColumnCount,\n  fts5ApiRowCount,\n  fts5ApiColumnTotalSize,\n  fts5ApiTokenize,\n  fts5ApiPhraseCount,\n  fts5ApiPhraseSize,\n  fts5ApiInstCount,\n  fts5ApiInst,\n  fts5ApiRowid,\n  fts5ApiColumnText,\n  fts5ApiColumnSize,\n  fts5ApiQueryPhrase,\n  fts5ApiSetAuxdata,\n  fts5ApiGetAuxdata,\n  fts5ApiPhraseFirst,\n  fts5ApiPhraseNext,\n  fts5ApiPhraseFirstColumn,\n  fts5ApiPhraseNextColumn,\n  fts5ApiQueryToken,\n  fts5ApiInstToken,\n  fts5ApiColumnLocale,\n  fts5ApiTokenize_v2\n};\n\n/*\n** Implementation of API function xQueryPhrase().\n*/\nstatic int fts5ApiQueryPhrase(\n  Fts5Context *pCtx,\n  int iPhrase,\n  void *pUserData,\n  int(*xCallback)(const Fts5ExtensionApi*, Fts5Context*, void*)\n){\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);\n  int rc;\n  Fts5Cursor *pNew = 0;\n\n  rc = fts5OpenMethod(pCsr->base.pVtab, (sqlite3_vtab_cursor**)&pNew);\n  if( rc==SQLITE_OK ){\n    pNew->ePlan = FTS5_PLAN_MATCH;\n    pNew->iFirstRowid = SMALLEST_INT64;\n    pNew->iLastRowid = LARGEST_INT64;\n    pNew->base.pVtab = (sqlite3_vtab*)pTab;\n    rc = sqlite3Fts5ExprClonePhrase(pCsr->pExpr, iPhrase, &pNew->pExpr);\n  }\n\n  if( rc==SQLITE_OK ){\n    for(rc = fts5CursorFirst(pTab, pNew, 0);\n        rc==SQLITE_OK && CsrFlagTest(pNew, FTS5CSR_EOF)==0;\n        rc = fts5NextMethod((sqlite3_vtab_cursor*)pNew)\n    ){\n      rc = xCallback(&sFts5Api, (Fts5Context*)pNew, pUserData);\n      if( rc!=SQLITE_OK ){\n        if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n        break;\n      }\n    }\n  }\n\n  fts5CloseMethod((sqlite3_vtab_cursor*)pNew);\n  return rc;\n}\n\nstatic void fts5ApiInvoke(\n  Fts5Auxiliary *pAux,\n  Fts5Cursor *pCsr,\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n  assert( pCsr->pAux==0 );\n  assert( pCsr->ePlan!=FTS5_PLAN_SPECIAL );\n  pCsr->pAux = pAux;\n  pAux->xFunc(&sFts5Api, (Fts5Context*)pCsr, context, argc, argv);\n  pCsr->pAux = 0;\n}\n\nstatic Fts5Cursor *fts5CursorFromCsrid(Fts5Global *pGlobal, i64 iCsrId){\n  Fts5Cursor *pCsr;\n  for(pCsr=pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){\n    if( pCsr->iCsrId==iCsrId ) break;\n  }\n  return pCsr;\n}\n\n/*\n** Parameter zFmt is a printf() style formatting string. This function\n** formats it using the trailing arguments and returns the result as\n** an error message to the context passed as the first argument.\n*/\nstatic void fts5ResultError(sqlite3_context *pCtx, const char *zFmt, ...){\n  char *zErr = 0;\n  va_list ap;\n  va_start(ap, zFmt);\n  zErr = sqlite3_vmprintf(zFmt, ap);\n  sqlite3_result_error(pCtx, zErr, -1);\n  sqlite3_free(zErr);\n  va_end(ap);\n}\n\nstatic void fts5ApiCallback(\n  sqlite3_context *context,\n  int argc,\n  sqlite3_value **argv\n){\n\n  Fts5Auxiliary *pAux;\n  Fts5Cursor *pCsr;\n  i64 iCsrId;\n\n  assert( argc>=1 );\n  pAux = (Fts5Auxiliary*)sqlite3_user_data(context);\n  iCsrId = sqlite3_value_int64(argv[0]);\n\n  pCsr = fts5CursorFromCsrid(pAux->pGlobal, iCsrId);\n  if( pCsr==0 || (pCsr->ePlan==0 || pCsr->ePlan==FTS5_PLAN_SPECIAL) ){\n    fts5ResultError(context, \"no such cursor: %lld\", iCsrId);\n  }else{\n    sqlite3_vtab *pTab = pCsr->base.pVtab;\n    fts5ApiInvoke(pAux, pCsr, context, argc-1, &argv[1]);\n    sqlite3_free(pTab->zErrMsg);\n    pTab->zErrMsg = 0;\n  }\n}\n\n\n/*\n** Given cursor id iId, return a pointer to the corresponding Fts5Table\n** object. Or NULL If the cursor id does not exist.\n*/\nstatic Fts5Table *sqlite3Fts5TableFromCsrid(\n  Fts5Global *pGlobal,            /* FTS5 global context for db handle */\n  i64 iCsrId                      /* Id of cursor to find */\n){\n  Fts5Cursor *pCsr;\n  pCsr = fts5CursorFromCsrid(pGlobal, iCsrId);\n  if( pCsr ){\n    return (Fts5Table*)pCsr->base.pVtab;\n  }\n  return 0;\n}\n\n/*\n** Return a \"position-list blob\" corresponding to the current position of\n** cursor pCsr via sqlite3_result_blob(). A position-list blob contains\n** the current position-list for each phrase in the query associated with\n** cursor pCsr.\n**\n** A position-list blob begins with (nPhrase-1) varints, where nPhrase is\n** the number of phrases in the query. Following the varints are the\n** concatenated position lists for each phrase, in order.\n**\n** The first varint (if it exists) contains the size of the position list\n** for phrase 0. The second (same disclaimer) contains the size of position\n** list 1. And so on. There is no size field for the final position list,\n** as it can be derived from the total size of the blob.\n*/\nstatic int fts5PoslistBlob(sqlite3_context *pCtx, Fts5Cursor *pCsr){\n  int i;\n  int rc = SQLITE_OK;\n  int nPhrase = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);\n  Fts5Buffer val;\n\n  memset(&val, 0, sizeof(Fts5Buffer));\n  switch( ((Fts5Table*)(pCsr->base.pVtab))->pConfig->eDetail ){\n    case FTS5_DETAIL_FULL:\n\n      /* Append the varints */\n      for(i=0; i<(nPhrase-1); i++){\n        const u8 *dummy;\n        int nByte = sqlite3Fts5ExprPoslist(pCsr->pExpr, i, &dummy);\n        sqlite3Fts5BufferAppendVarint(&rc, &val, nByte);\n      }\n\n      /* Append the position lists */\n      for(i=0; i<nPhrase; i++){\n        const u8 *pPoslist;\n        int nPoslist;\n        nPoslist = sqlite3Fts5ExprPoslist(pCsr->pExpr, i, &pPoslist);\n        sqlite3Fts5BufferAppendBlob(&rc, &val, nPoslist, pPoslist);\n      }\n      break;\n\n    case FTS5_DETAIL_COLUMNS:\n\n      /* Append the varints */\n      for(i=0; rc==SQLITE_OK && i<(nPhrase-1); i++){\n        const u8 *dummy;\n        int nByte;\n        rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, i, &dummy, &nByte);\n        sqlite3Fts5BufferAppendVarint(&rc, &val, nByte);\n      }\n\n      /* Append the position lists */\n      for(i=0; rc==SQLITE_OK && i<nPhrase; i++){\n        const u8 *pPoslist;\n        int nPoslist;\n        rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, i, &pPoslist, &nPoslist);\n        sqlite3Fts5BufferAppendBlob(&rc, &val, nPoslist, pPoslist);\n      }\n      break;\n\n    default:\n      break;\n  }\n\n  sqlite3_result_blob(pCtx, val.p, val.n, sqlite3_free);\n  return rc;\n}\n\n/*\n** This is the xColumn method, called by SQLite to request a value from\n** the row that the supplied cursor currently points to.\n*/\nstatic int fts5ColumnMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */\n  int iCol                        /* Index of column to read value from */\n){\n  Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);\n  Fts5Config *pConfig = pTab->p.pConfig;\n  Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;\n  int rc = SQLITE_OK;\n\n  assert( CsrFlagTest(pCsr, FTS5CSR_EOF)==0 );\n\n  if( pCsr->ePlan==FTS5_PLAN_SPECIAL ){\n    if( iCol==pConfig->nCol ){\n      sqlite3_result_int64(pCtx, pCsr->iSpecial);\n    }\n  }else\n\n  if( iCol==pConfig->nCol ){\n    /* User is requesting the value of the special column with the same name\n    ** as the table. Return the cursor integer id number. This value is only\n    ** useful in that it may be passed as the first argument to an FTS5\n    ** auxiliary function.  */\n    sqlite3_result_int64(pCtx, pCsr->iCsrId);\n  }else if( iCol==pConfig->nCol+1 ){\n    /* The value of the \"rank\" column. */\n\n    if( pCsr->ePlan==FTS5_PLAN_SOURCE ){\n      fts5PoslistBlob(pCtx, pCsr);\n    }else if(\n        pCsr->ePlan==FTS5_PLAN_MATCH\n     || pCsr->ePlan==FTS5_PLAN_SORTED_MATCH\n    ){\n      if( pCsr->pRank || SQLITE_OK==(rc = fts5FindRankFunction(pCsr)) ){\n        fts5ApiInvoke(pCsr->pRank, pCsr, pCtx, pCsr->nRankArg, pCsr->apRankArg);\n      }\n    }\n  }else{\n    if( !sqlite3_vtab_nochange(pCtx) && pConfig->eContent!=FTS5_CONTENT_NONE ){\n      pConfig->pzErrmsg = &pTab->p.base.zErrMsg;\n      rc = fts5SeekCursor(pCsr, 1);\n      if( rc==SQLITE_OK ){\n        sqlite3_value *pVal = sqlite3_column_value(pCsr->pStmt, iCol+1);\n        if( pConfig->bLocale\n         && pConfig->eContent==FTS5_CONTENT_EXTERNAL\n         && sqlite3Fts5IsLocaleValue(pConfig, pVal)\n        ){\n          const char *z = 0;\n          int n = 0;\n          rc = fts5TextFromStmt(pConfig, pCsr->pStmt, iCol, &z, &n);\n          if( rc==SQLITE_OK ){\n            sqlite3_result_text(pCtx, z, n, SQLITE_TRANSIENT);\n          }\n          sqlite3Fts5ClearLocale(pConfig);\n        }else{\n          sqlite3_result_value(pCtx, pVal);\n        }\n      }\n\n      pConfig->pzErrmsg = 0;\n    }\n  }\n\n  return rc;\n}\n\n\n/*\n** This routine implements the xFindFunction method for the FTS3\n** virtual table.\n*/\nstatic int fts5FindFunctionMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  int nUnused,                    /* Number of SQL function arguments */\n  const char *zName,              /* Name of SQL function */\n  void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */\n  void **ppArg                    /* OUT: User data for *pxFunc */\n){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  Fts5Auxiliary *pAux;\n\n  UNUSED_PARAM(nUnused);\n  pAux = fts5FindAuxiliary(pTab, zName);\n  if( pAux ){\n    *pxFunc = fts5ApiCallback;\n    *ppArg = (void*)pAux;\n    return 1;\n  }\n\n  /* No function of the specified name was found. Return 0. */\n  return 0;\n}\n\n/*\n** Implementation of FTS5 xRename method. Rename an fts5 table.\n*/\nstatic int fts5RenameMethod(\n  sqlite3_vtab *pVtab,            /* Virtual table handle */\n  const char *zName               /* New name of table */\n){\n  int rc;\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  rc = sqlite3Fts5StorageRename(pTab->pStorage, zName);\n  return rc;\n}\n\nstatic int sqlite3Fts5FlushToDisk(Fts5Table *pTab){\n  fts5TripCursors((Fts5FullTable*)pTab);\n  return sqlite3Fts5StorageSync(((Fts5FullTable*)pTab)->pStorage);\n}\n\n/*\n** The xSavepoint() method.\n**\n** Flush the contents of the pending-terms table to disk.\n*/\nstatic int fts5SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  int rc = SQLITE_OK;\n\n  fts5CheckTransactionState(pTab, FTS5_SAVEPOINT, iSavepoint);\n  rc = sqlite3Fts5FlushToDisk((Fts5Table*)pVtab);\n  if( rc==SQLITE_OK ){\n    pTab->iSavepoint = iSavepoint+1;\n  }\n  return rc;\n}\n\n/*\n** The xRelease() method.\n**\n** This is a no-op.\n*/\nstatic int fts5ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  int rc = SQLITE_OK;\n  fts5CheckTransactionState(pTab, FTS5_RELEASE, iSavepoint);\n  if( (iSavepoint+1)<pTab->iSavepoint ){\n    rc = sqlite3Fts5FlushToDisk(&pTab->p);\n    if( rc==SQLITE_OK ){\n      pTab->iSavepoint = iSavepoint;\n    }\n  }\n  return rc;\n}\n\n/*\n** The xRollbackTo() method.\n**\n** Discard the contents of the pending terms table.\n*/\nstatic int fts5RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  int rc = SQLITE_OK;\n  fts5CheckTransactionState(pTab, FTS5_ROLLBACKTO, iSavepoint);\n  fts5TripCursors(pTab);\n  if( (iSavepoint+1)<=pTab->iSavepoint ){\n    pTab->p.pConfig->pgsz = 0;\n    rc = sqlite3Fts5StorageRollback(pTab->pStorage);\n  }\n  return rc;\n}\n\n/*\n** Register a new auxiliary function with global context pGlobal.\n*/\nstatic int fts5CreateAux(\n  fts5_api *pApi,                 /* Global context (one per db handle) */\n  const char *zName,              /* Name of new function */\n  void *pUserData,                /* User data for aux. function */\n  fts5_extension_function xFunc,  /* Aux. function implementation */\n  void(*xDestroy)(void*)          /* Destructor for pUserData */\n){\n  Fts5Global *pGlobal = (Fts5Global*)pApi;\n  int rc = sqlite3_overload_function(pGlobal->db, zName, -1);\n  if( rc==SQLITE_OK ){\n    Fts5Auxiliary *pAux;\n    sqlite3_int64 nName;            /* Size of zName in bytes, including \\0 */\n    sqlite3_int64 nByte;            /* Bytes of space to allocate */\n\n    nName = strlen(zName) + 1;\n    nByte = sizeof(Fts5Auxiliary) + nName;\n    pAux = (Fts5Auxiliary*)sqlite3_malloc64(nByte);\n    if( pAux ){\n      memset(pAux, 0, (size_t)nByte);\n      pAux->zFunc = (char*)&pAux[1];\n      memcpy(pAux->zFunc, zName, nName);\n      pAux->pGlobal = pGlobal;\n      pAux->pUserData = pUserData;\n      pAux->xFunc = xFunc;\n      pAux->xDestroy = xDestroy;\n      pAux->pNext = pGlobal->pAux;\n      pGlobal->pAux = pAux;\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function is used by xCreateTokenizer_v2() and xCreateTokenizer().\n** It allocates and partially populates a new Fts5TokenizerModule object.\n** The new object is already linked into the Fts5Global context before\n** returning.\n**\n** If successful, SQLITE_OK is returned and a pointer to the new\n** Fts5TokenizerModule object returned via output parameter (*ppNew). All\n** that is required is for the caller to fill in the methods in\n** Fts5TokenizerModule.x1 and x2, and to set Fts5TokenizerModule.bV2Native\n** as appropriate.\n**\n** If an error occurs, an SQLite error code is returned and the final value\n** of (*ppNew) undefined.\n*/\nstatic int fts5NewTokenizerModule(\n  Fts5Global *pGlobal,            /* Global context (one per db handle) */\n  const char *zName,              /* Name of new function */\n  void *pUserData,                /* User data for aux. function */\n  void(*xDestroy)(void*),         /* Destructor for pUserData */\n  Fts5TokenizerModule **ppNew\n){\n  int rc = SQLITE_OK;\n  Fts5TokenizerModule *pNew;\n  sqlite3_int64 nName;          /* Size of zName and its \\0 terminator */\n  sqlite3_int64 nByte;          /* Bytes of space to allocate */\n\n  nName = strlen(zName) + 1;\n  nByte = sizeof(Fts5TokenizerModule) + nName;\n  *ppNew = pNew = (Fts5TokenizerModule*)sqlite3Fts5MallocZero(&rc, nByte);\n  if( pNew ){\n    pNew->zName = (char*)&pNew[1];\n    memcpy(pNew->zName, zName, nName);\n    pNew->pUserData = pUserData;\n    pNew->xDestroy = xDestroy;\n    pNew->pNext = pGlobal->pTok;\n    pGlobal->pTok = pNew;\n    if( pNew->pNext==0 ){\n      pGlobal->pDfltTok = pNew;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** An instance of this type is used as the Fts5Tokenizer object for\n** wrapper tokenizers - those that provide access to a v1 tokenizer via\n** the fts5_tokenizer_v2 API, and those that provide access to a v2 tokenizer\n** via the fts5_tokenizer API.\n*/\ntypedef struct Fts5VtoVTokenizer Fts5VtoVTokenizer;\nstruct Fts5VtoVTokenizer {\n  int bV2Native;                  /* True if v2 native tokenizer */\n  fts5_tokenizer x1;              /* Tokenizer functions */\n  fts5_tokenizer_v2 x2;           /* V2 tokenizer functions */\n  Fts5Tokenizer *pReal;\n};\n\n/*\n** Create a wrapper tokenizer. The context argument pCtx points to the\n** Fts5TokenizerModule object.\n*/\nstatic int fts5VtoVCreate(\n  void *pCtx,\n  const char **azArg,\n  int nArg,\n  Fts5Tokenizer **ppOut\n){\n  Fts5TokenizerModule *pMod = (Fts5TokenizerModule*)pCtx;\n  Fts5VtoVTokenizer *pNew = 0;\n  int rc = SQLITE_OK;\n\n  pNew = (Fts5VtoVTokenizer*)sqlite3Fts5MallocZero(&rc, sizeof(*pNew));\n  if( rc==SQLITE_OK ){\n    pNew->x1 = pMod->x1;\n    pNew->x2 = pMod->x2;\n    pNew->bV2Native = pMod->bV2Native;\n    if( pMod->bV2Native ){\n      rc = pMod->x2.xCreate(pMod->pUserData, azArg, nArg, &pNew->pReal);\n    }else{\n      rc = pMod->x1.xCreate(pMod->pUserData, azArg, nArg, &pNew->pReal);\n    }\n    if( rc!=SQLITE_OK ){\n      sqlite3_free(pNew);\n      pNew = 0;\n    }\n  }\n\n  *ppOut = (Fts5Tokenizer*)pNew;\n  return rc;\n}\n\n/*\n** Delete an Fts5VtoVTokenizer wrapper tokenizer.\n*/\nstatic void fts5VtoVDelete(Fts5Tokenizer *pTok){\n  Fts5VtoVTokenizer *p = (Fts5VtoVTokenizer*)pTok;\n  if( p ){\n    if( p->bV2Native ){\n      p->x2.xDelete(p->pReal);\n    }else{\n      p->x1.xDelete(p->pReal);\n    }\n    sqlite3_free(p);\n  }\n}\n\n\n/*\n** xTokenizer method for a wrapper tokenizer that offers the v1 interface\n** (no support for locales).\n*/\nstatic int fts5V1toV2Tokenize(\n  Fts5Tokenizer *pTok,\n  void *pCtx, int flags,\n  const char *pText, int nText,\n  int (*xToken)(void*, int, const char*, int, int, int)\n){\n  Fts5VtoVTokenizer *p = (Fts5VtoVTokenizer*)pTok;\n  assert( p->bV2Native );\n  return p->x2.xTokenize(p->pReal, pCtx, flags, pText, nText, 0, 0, xToken);\n}\n\n/*\n** xTokenizer method for a wrapper tokenizer that offers the v2 interface\n** (with locale support).\n*/\nstatic int fts5V2toV1Tokenize(\n  Fts5Tokenizer *pTok,\n  void *pCtx, int flags,\n  const char *pText, int nText,\n  const char *pLocale, int nLocale,\n  int (*xToken)(void*, int, const char*, int, int, int)\n){\n  Fts5VtoVTokenizer *p = (Fts5VtoVTokenizer*)pTok;\n  assert( p->bV2Native==0 );\n  UNUSED_PARAM2(pLocale,nLocale);\n  return p->x1.xTokenize(p->pReal, pCtx, flags, pText, nText, xToken);\n}\n\n/*\n** Register a new tokenizer. This is the implementation of the\n** fts5_api.xCreateTokenizer_v2() method.\n*/\nstatic int fts5CreateTokenizer_v2(\n  fts5_api *pApi,                 /* Global context (one per db handle) */\n  const char *zName,              /* Name of new function */\n  void *pUserData,                /* User data for aux. function */\n  fts5_tokenizer_v2 *pTokenizer,  /* Tokenizer implementation */\n  void(*xDestroy)(void*)          /* Destructor for pUserData */\n){\n  Fts5Global *pGlobal = (Fts5Global*)pApi;\n  int rc = SQLITE_OK;\n\n  if( pTokenizer->iVersion>2 ){\n    rc = SQLITE_ERROR;\n  }else{\n    Fts5TokenizerModule *pNew = 0;\n    rc = fts5NewTokenizerModule(pGlobal, zName, pUserData, xDestroy, &pNew);\n    if( pNew ){\n      pNew->x2 = *pTokenizer;\n      pNew->bV2Native = 1;\n      pNew->x1.xCreate = fts5VtoVCreate;\n      pNew->x1.xTokenize = fts5V1toV2Tokenize;\n      pNew->x1.xDelete = fts5VtoVDelete;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** The fts5_api.xCreateTokenizer() method.\n*/\nstatic int fts5CreateTokenizer(\n  fts5_api *pApi,                 /* Global context (one per db handle) */\n  const char *zName,              /* Name of new function */\n  void *pUserData,                /* User data for aux. function */\n  fts5_tokenizer *pTokenizer,     /* Tokenizer implementation */\n  void(*xDestroy)(void*)          /* Destructor for pUserData */\n){\n  Fts5TokenizerModule *pNew = 0;\n  int rc = SQLITE_OK;\n\n  rc = fts5NewTokenizerModule(\n      (Fts5Global*)pApi, zName, pUserData, xDestroy, &pNew\n  );\n  if( pNew ){\n    pNew->x1 = *pTokenizer;\n    pNew->x2.xCreate = fts5VtoVCreate;\n    pNew->x2.xTokenize = fts5V2toV1Tokenize;\n    pNew->x2.xDelete = fts5VtoVDelete;\n  }\n  return rc;\n}\n\n/*\n** Search the global context passed as the first argument for a tokenizer\n** module named zName. If found, return a pointer to the Fts5TokenizerModule\n** object. Otherwise, return NULL.\n*/\nstatic Fts5TokenizerModule *fts5LocateTokenizer(\n  Fts5Global *pGlobal,            /* Global (one per db handle) object */\n  const char *zName               /* Name of tokenizer module to find */\n){\n  Fts5TokenizerModule *pMod = 0;\n\n  if( zName==0 ){\n    pMod = pGlobal->pDfltTok;\n  }else{\n    for(pMod=pGlobal->pTok; pMod; pMod=pMod->pNext){\n      if( sqlite3_stricmp(zName, pMod->zName)==0 ) break;\n    }\n  }\n\n  return pMod;\n}\n\n/*\n** Find a tokenizer. This is the implementation of the\n** fts5_api.xFindTokenizer_v2() method.\n*/\nstatic int fts5FindTokenizer_v2(\n  fts5_api *pApi,                 /* Global context (one per db handle) */\n  const char *zName,              /* Name of tokenizer */\n  void **ppUserData,\n  fts5_tokenizer_v2 **ppTokenizer /* Populate this object */\n){\n  int rc = SQLITE_OK;\n  Fts5TokenizerModule *pMod;\n\n  pMod = fts5LocateTokenizer((Fts5Global*)pApi, zName);\n  if( pMod ){\n    if( pMod->bV2Native ){\n      *ppUserData = pMod->pUserData;\n    }else{\n      *ppUserData = (void*)pMod;\n    }\n    *ppTokenizer = &pMod->x2;\n  }else{\n    *ppTokenizer = 0;\n    *ppUserData = 0;\n    rc = SQLITE_ERROR;\n  }\n\n  return rc;\n}\n\n/*\n** Find a tokenizer. This is the implementation of the\n** fts5_api.xFindTokenizer() method.\n*/\nstatic int fts5FindTokenizer(\n  fts5_api *pApi,                 /* Global context (one per db handle) */\n  const char *zName,              /* Name of new function */\n  void **ppUserData,\n  fts5_tokenizer *pTokenizer      /* Populate this object */\n){\n  int rc = SQLITE_OK;\n  Fts5TokenizerModule *pMod;\n\n  pMod = fts5LocateTokenizer((Fts5Global*)pApi, zName);\n  if( pMod ){\n    if( pMod->bV2Native==0 ){\n      *ppUserData = pMod->pUserData;\n    }else{\n      *ppUserData = (void*)pMod;\n    }\n    *pTokenizer = pMod->x1;\n  }else{\n    memset(pTokenizer, 0, sizeof(*pTokenizer));\n    *ppUserData = 0;\n    rc = SQLITE_ERROR;\n  }\n\n  return rc;\n}\n\n/*\n** Attempt to instantiate the tokenizer.\n*/\nstatic int sqlite3Fts5LoadTokenizer(Fts5Config *pConfig){\n  const char **azArg = pConfig->t.azArg;\n  const int nArg = pConfig->t.nArg;\n  Fts5TokenizerModule *pMod = 0;\n  int rc = SQLITE_OK;\n\n  pMod = fts5LocateTokenizer(pConfig->pGlobal, nArg==0 ? 0 : azArg[0]);\n  if( pMod==0 ){\n    assert( nArg>0 );\n    rc = SQLITE_ERROR;\n    sqlite3Fts5ConfigErrmsg(pConfig, \"no such tokenizer: %s\", azArg[0]);\n  }else{\n    int (*xCreate)(void*, const char**, int, Fts5Tokenizer**) = 0;\n    if( pMod->bV2Native ){\n      xCreate = pMod->x2.xCreate;\n      pConfig->t.pApi2 = &pMod->x2;\n    }else{\n      pConfig->t.pApi1 = &pMod->x1;\n      xCreate = pMod->x1.xCreate;\n    }\n\n    rc = xCreate(pMod->pUserData,\n        (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->t.pTok\n    );\n\n    if( rc!=SQLITE_OK ){\n      if( rc!=SQLITE_NOMEM ){\n        sqlite3Fts5ConfigErrmsg(pConfig, \"error in tokenizer constructor\");\n      }\n    }else if( pMod->bV2Native==0 ){\n      pConfig->t.ePattern = sqlite3Fts5TokenizerPattern(\n          pMod->x1.xCreate, pConfig->t.pTok\n      );\n    }\n  }\n\n  if( rc!=SQLITE_OK ){\n    pConfig->t.pApi1 = 0;\n    pConfig->t.pApi2 = 0;\n    pConfig->t.pTok = 0;\n  }\n\n  return rc;\n}\n\n\n/*\n** xDestroy callback passed to sqlite3_create_module(). This is invoked\n** when the db handle is being closed. Free memory associated with\n** tokenizers and aux functions registered with this db handle.\n*/\nstatic void fts5ModuleDestroy(void *pCtx){\n  Fts5TokenizerModule *pTok, *pNextTok;\n  Fts5Auxiliary *pAux, *pNextAux;\n  Fts5Global *pGlobal = (Fts5Global*)pCtx;\n\n  for(pAux=pGlobal->pAux; pAux; pAux=pNextAux){\n    pNextAux = pAux->pNext;\n    if( pAux->xDestroy ) pAux->xDestroy(pAux->pUserData);\n    sqlite3_free(pAux);\n  }\n\n  for(pTok=pGlobal->pTok; pTok; pTok=pNextTok){\n    pNextTok = pTok->pNext;\n    if( pTok->xDestroy ) pTok->xDestroy(pTok->pUserData);\n    sqlite3_free(pTok);\n  }\n\n  sqlite3_free(pGlobal);\n}\n\n/*\n** Implementation of the fts5() function used by clients to obtain the\n** API pointer.\n*/\nstatic void fts5Fts5Func(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apArg           /* Function arguments */\n){\n  Fts5Global *pGlobal = (Fts5Global*)sqlite3_user_data(pCtx);\n  fts5_api **ppApi;\n  UNUSED_PARAM(nArg);\n  assert( nArg==1 );\n  ppApi = (fts5_api**)sqlite3_value_pointer(apArg[0], \"fts5_api_ptr\");\n  if( ppApi ) *ppApi = &pGlobal->api;\n}\n\n/*\n** Implementation of fts5_source_id() function.\n*/\nstatic void fts5SourceIdFunc(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apUnused        /* Function arguments */\n){\n  assert( nArg==0 );\n  UNUSED_PARAM2(nArg, apUnused);\n  sqlite3_result_text(pCtx, \"fts5: 2026-01-09 17:27:48 b270f8339eb13b504d0b2ba154ebca966b7dde08e40c3ed7d559749818cb2075\", -1, SQLITE_TRANSIENT);\n}\n\n/*\n** Implementation of fts5_locale(LOCALE, TEXT) function.\n**\n** If parameter LOCALE is NULL, or a zero-length string, then a copy of\n** TEXT is returned. Otherwise, both LOCALE and TEXT are interpreted as\n** text, and the value returned is a blob consisting of:\n**\n**     * The 4 bytes 0x00, 0xE0, 0xB2, 0xEb (FTS5_LOCALE_HEADER).\n**     * The LOCALE, as utf-8 text, followed by\n**     * 0x00, followed by\n**     * The TEXT, as utf-8 text.\n**\n** There is no final nul-terminator following the TEXT value.\n*/\nstatic void fts5LocaleFunc(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apArg           /* Function arguments */\n){\n  const char *zLocale = 0;\n  i64 nLocale = 0;\n  const char *zText = 0;\n  i64 nText = 0;\n\n  assert( nArg==2 );\n  UNUSED_PARAM(nArg);\n\n  zLocale = (const char*)sqlite3_value_text(apArg[0]);\n  nLocale = sqlite3_value_bytes(apArg[0]);\n\n  zText = (const char*)sqlite3_value_text(apArg[1]);\n  nText = sqlite3_value_bytes(apArg[1]);\n\n  if( zLocale==0 || zLocale[0]=='\\0' ){\n    sqlite3_result_text(pCtx, zText, nText, SQLITE_TRANSIENT);\n  }else{\n    Fts5Global *p = (Fts5Global*)sqlite3_user_data(pCtx);\n    u8 *pBlob = 0;\n    u8 *pCsr = 0;\n    i64 nBlob = 0;\n\n    nBlob = FTS5_LOCALE_HDR_SIZE + nLocale + 1 + nText;\n    pBlob = (u8*)sqlite3_malloc64(nBlob);\n    if( pBlob==0 ){\n      sqlite3_result_error_nomem(pCtx);\n      return;\n    }\n\n    pCsr = pBlob;\n    memcpy(pCsr, (const u8*)p->aLocaleHdr, FTS5_LOCALE_HDR_SIZE);\n    pCsr += FTS5_LOCALE_HDR_SIZE;\n    memcpy(pCsr, zLocale, nLocale);\n    pCsr += nLocale;\n    (*pCsr++) = 0x00;\n    if( zText ) memcpy(pCsr, zText, nText);\n    assert( &pCsr[nText]==&pBlob[nBlob] );\n\n    sqlite3_result_blob(pCtx, pBlob, nBlob, sqlite3_free);\n  }\n}\n\n/*\n** Implementation of fts5_insttoken() function.\n*/\nstatic void fts5InsttokenFunc(\n  sqlite3_context *pCtx,          /* Function call context */\n  int nArg,                       /* Number of args */\n  sqlite3_value **apArg           /* Function arguments */\n){\n  assert( nArg==1 );\n  (void)nArg;\n  sqlite3_result_value(pCtx, apArg[0]);\n  sqlite3_result_subtype(pCtx, FTS5_INSTTOKEN_SUBTYPE);\n}\n\n/*\n** Return true if zName is the extension on one of the shadow tables used\n** by this module.\n*/\nstatic int fts5ShadowName(const char *zName){\n  static const char *azName[] = {\n    \"config\", \"content\", \"data\", \"docsize\", \"idx\"\n  };\n  unsigned int i;\n  for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){\n    if( sqlite3_stricmp(zName, azName[i])==0 ) return 1;\n  }\n  return 0;\n}\n\n/*\n** Run an integrity check on the FTS5 data structures.  Return a string\n** if anything is found amiss.  Return a NULL pointer if everything is\n** OK.\n*/\nstatic int fts5IntegrityMethod(\n  sqlite3_vtab *pVtab,    /* the FTS5 virtual table to check */\n  const char *zSchema,    /* Name of schema in which this table lives */\n  const char *zTabname,   /* Name of the table itself */\n  int isQuick,            /* True if this is a quick-check */\n  char **pzErr            /* Write error message here */\n){\n  Fts5FullTable *pTab = (Fts5FullTable*)pVtab;\n  int rc;\n\n  assert( pzErr!=0 && *pzErr==0 );\n  UNUSED_PARAM(isQuick);\n  assert( pTab->p.pConfig->pzErrmsg==0 );\n  pTab->p.pConfig->pzErrmsg = pzErr;\n  rc = sqlite3Fts5StorageIntegrity(pTab->pStorage, 0);\n  if( *pzErr==0 && rc!=SQLITE_OK ){\n    if( (rc&0xff)==SQLITE_CORRUPT ){\n      *pzErr = sqlite3_mprintf(\"malformed inverted index for FTS5 table %s.%s\",\n          zSchema, zTabname);\n      rc = (*pzErr) ? SQLITE_OK : SQLITE_NOMEM;\n    }else{\n      *pzErr = sqlite3_mprintf(\"unable to validate the inverted index for\"\n          \" FTS5 table %s.%s: %s\",\n          zSchema, zTabname, sqlite3_errstr(rc));\n    }\n  }else if( (rc&0xff)==SQLITE_CORRUPT ){\n    rc = SQLITE_OK;\n  }\n  sqlite3Fts5IndexCloseReader(pTab->p.pIndex);\n  pTab->p.pConfig->pzErrmsg = 0;\n\n  return rc;\n}\n\nstatic int fts5Init(sqlite3 *db){\n  static const sqlite3_module fts5Mod = {\n    /* iVersion      */ 4,\n    /* xCreate       */ fts5CreateMethod,\n    /* xConnect      */ fts5ConnectMethod,\n    /* xBestIndex    */ fts5BestIndexMethod,\n    /* xDisconnect   */ fts5DisconnectMethod,\n    /* xDestroy      */ fts5DestroyMethod,\n    /* xOpen         */ fts5OpenMethod,\n    /* xClose        */ fts5CloseMethod,\n    /* xFilter       */ fts5FilterMethod,\n    /* xNext         */ fts5NextMethod,\n    /* xEof          */ fts5EofMethod,\n    /* xColumn       */ fts5ColumnMethod,\n    /* xRowid        */ fts5RowidMethod,\n    /* xUpdate       */ fts5UpdateMethod,\n    /* xBegin        */ fts5BeginMethod,\n    /* xSync         */ fts5SyncMethod,\n    /* xCommit       */ fts5CommitMethod,\n    /* xRollback     */ fts5RollbackMethod,\n    /* xFindFunction */ fts5FindFunctionMethod,\n    /* xRename       */ fts5RenameMethod,\n    /* xSavepoint    */ fts5SavepointMethod,\n    /* xRelease      */ fts5ReleaseMethod,\n    /* xRollbackTo   */ fts5RollbackToMethod,\n    /* xShadowName   */ fts5ShadowName,\n    /* xIntegrity    */ fts5IntegrityMethod\n  };\n\n  int rc;\n  Fts5Global *pGlobal = 0;\n\n  pGlobal = (Fts5Global*)sqlite3_malloc(sizeof(Fts5Global));\n  if( pGlobal==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    void *p = (void*)pGlobal;\n    memset(pGlobal, 0, sizeof(Fts5Global));\n    pGlobal->db = db;\n    pGlobal->api.iVersion = 3;\n    pGlobal->api.xCreateFunction = fts5CreateAux;\n    pGlobal->api.xCreateTokenizer = fts5CreateTokenizer;\n    pGlobal->api.xFindTokenizer = fts5FindTokenizer;\n    pGlobal->api.xCreateTokenizer_v2 = fts5CreateTokenizer_v2;\n    pGlobal->api.xFindTokenizer_v2 = fts5FindTokenizer_v2;\n\n    /* Initialize pGlobal->aLocaleHdr[] to a 128-bit pseudo-random vector.\n    ** The constants below were generated randomly.  */\n    sqlite3_randomness(sizeof(pGlobal->aLocaleHdr), pGlobal->aLocaleHdr);\n    pGlobal->aLocaleHdr[0] ^= 0xF924976D;\n    pGlobal->aLocaleHdr[1] ^= 0x16596E13;\n    pGlobal->aLocaleHdr[2] ^= 0x7C80BEAA;\n    pGlobal->aLocaleHdr[3] ^= 0x9B03A67F;\n    assert( sizeof(pGlobal->aLocaleHdr)==16 );\n\n    rc = sqlite3_create_module_v2(db, \"fts5\", &fts5Mod, p, fts5ModuleDestroy);\n    if( rc==SQLITE_OK ) rc = sqlite3Fts5IndexInit(db);\n    if( rc==SQLITE_OK ) rc = sqlite3Fts5ExprInit(pGlobal, db);\n    if( rc==SQLITE_OK ) rc = sqlite3Fts5AuxInit(&pGlobal->api);\n    if( rc==SQLITE_OK ) rc = sqlite3Fts5TokenizerInit(&pGlobal->api);\n    if( rc==SQLITE_OK ) rc = sqlite3Fts5VocabInit(pGlobal, db);\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_create_function(\n          db, \"fts5\", 1, SQLITE_UTF8, p, fts5Fts5Func, 0, 0\n      );\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_create_function(\n          db, \"fts5_source_id\", 0,\n          SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS,\n          p, fts5SourceIdFunc, 0, 0\n      );\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_create_function(\n          db, \"fts5_locale\", 2,\n          SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_RESULT_SUBTYPE|SQLITE_SUBTYPE,\n          p, fts5LocaleFunc, 0, 0\n      );\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3_create_function(\n          db, \"fts5_insttoken\", 1,\n          SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_RESULT_SUBTYPE,\n          p, fts5InsttokenFunc, 0, 0\n      );\n    }\n  }\n\n  /* If SQLITE_FTS5_ENABLE_TEST_MI is defined, assume that the file\n  ** fts5_test_mi.c is compiled and linked into the executable. And call\n  ** its entry point to enable the matchinfo() demo.  */\n#ifdef SQLITE_FTS5_ENABLE_TEST_MI\n  if( rc==SQLITE_OK ){\n    extern int sqlite3Fts5TestRegisterMatchinfoAPI(fts5_api*);\n    rc = sqlite3Fts5TestRegisterMatchinfoAPI(&pGlobal->api);\n  }\n#endif\n\n  return rc;\n}\n\n/*\n** The following functions are used to register the module with SQLite. If\n** this module is being built as part of the SQLite core (SQLITE_CORE is\n** defined), then sqlite3_open() will call sqlite3Fts5Init() directly.\n**\n** Or, if this module is being built as a loadable extension,\n** sqlite3Fts5Init() is omitted and the two standard entry points\n** sqlite3_fts_init() and sqlite3_fts5_init() defined instead.\n*/\n#ifndef SQLITE_CORE\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_fts_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  SQLITE_EXTENSION_INIT2(pApi);\n  (void)pzErrMsg;  /* Unused parameter */\n  return fts5Init(db);\n}\n\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_fts5_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  SQLITE_EXTENSION_INIT2(pApi);\n  (void)pzErrMsg;  /* Unused parameter */\n  return fts5Init(db);\n}\n#else\nSQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){\n  return fts5Init(db);\n}\n#endif\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n*/\n\n\n\n/* #include \"fts5Int.h\" */\n\n/*\n** pSavedRow:\n**   SQL statement FTS5_STMT_LOOKUP2 is a copy of FTS5_STMT_LOOKUP, it\n**   does a by-rowid lookup to retrieve a single row from the %_content\n**   table or equivalent external-content table/view.\n**\n**   However, FTS5_STMT_LOOKUP2 is only used when retrieving the original\n**   values for a row being UPDATEd. In that case, the SQL statement is\n**   not reset and pSavedRow is set to point at it. This is so that the\n**   insert operation that follows the delete may access the original\n**   row values for any new values for which sqlite3_value_nochange() returns\n**   true. i.e. if the user executes:\n**\n**        CREATE VIRTUAL TABLE ft USING fts5(a, b, c, locale=1);\n**        ...\n**        UPDATE fts SET a=?, b=? WHERE rowid=?;\n**\n**   then the value passed to the xUpdate() method of this table as the\n**   new.c value is an sqlite3_value_nochange() value. So in this case it\n**   must be read from the saved row stored in Fts5Storage.pSavedRow.\n**\n**   This is necessary - using sqlite3_value_nochange() instead of just having\n**   SQLite pass the original value back via xUpdate() - so as not to discard\n**   any locale information associated with such values.\n**\n*/\nstruct Fts5Storage {\n  Fts5Config *pConfig;\n  Fts5Index *pIndex;\n  int bTotalsValid;               /* True if nTotalRow/aTotalSize[] are valid */\n  i64 nTotalRow;                  /* Total number of rows in FTS table */\n  i64 *aTotalSize;                /* Total sizes of each column */\n  sqlite3_stmt *pSavedRow;\n  sqlite3_stmt *aStmt[12];\n};\n\n\n#if FTS5_STMT_SCAN_ASC!=0\n# error \"FTS5_STMT_SCAN_ASC mismatch\"\n#endif\n#if FTS5_STMT_SCAN_DESC!=1\n# error \"FTS5_STMT_SCAN_DESC mismatch\"\n#endif\n#if FTS5_STMT_LOOKUP!=2\n# error \"FTS5_STMT_LOOKUP mismatch\"\n#endif\n\n#define FTS5_STMT_LOOKUP2         3\n#define FTS5_STMT_INSERT_CONTENT  4\n#define FTS5_STMT_REPLACE_CONTENT 5\n#define FTS5_STMT_DELETE_CONTENT  6\n#define FTS5_STMT_REPLACE_DOCSIZE 7\n#define FTS5_STMT_DELETE_DOCSIZE  8\n#define FTS5_STMT_LOOKUP_DOCSIZE  9\n#define FTS5_STMT_REPLACE_CONFIG 10\n#define FTS5_STMT_SCAN           11\n\n/*\n** Prepare the two insert statements - Fts5Storage.pInsertContent and\n** Fts5Storage.pInsertDocsize - if they have not already been prepared.\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs.\n*/\nstatic int fts5StorageGetStmt(\n  Fts5Storage *p,                 /* Storage handle */\n  int eStmt,                      /* FTS5_STMT_XXX constant */\n  sqlite3_stmt **ppStmt,          /* OUT: Prepared statement handle */\n  char **pzErrMsg                 /* OUT: Error message (if any) */\n){\n  int rc = SQLITE_OK;\n\n  /* If there is no %_docsize table, there should be no requests for\n  ** statements to operate on it.  */\n  assert( p->pConfig->bColumnsize || (\n        eStmt!=FTS5_STMT_REPLACE_DOCSIZE\n     && eStmt!=FTS5_STMT_DELETE_DOCSIZE\n     && eStmt!=FTS5_STMT_LOOKUP_DOCSIZE\n  ));\n\n  assert( eStmt>=0 && eStmt<ArraySize(p->aStmt) );\n  if( p->aStmt[eStmt]==0 ){\n    const char *azStmt[] = {\n      \"SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\",\n      \"SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\",\n      \"SELECT %s FROM %s T WHERE T.%Q=?\",               /* LOOKUP  */\n      \"SELECT %s FROM %s T WHERE T.%Q=?\",               /* LOOKUP2  */\n\n      \"INSERT INTO %Q.'%q_content' VALUES(%s)\",         /* INSERT_CONTENT  */\n      \"REPLACE INTO %Q.'%q_content' VALUES(%s)\",        /* REPLACE_CONTENT */\n      \"DELETE FROM %Q.'%q_content' WHERE id=?\",         /* DELETE_CONTENT  */\n      \"REPLACE INTO %Q.'%q_docsize' VALUES(?,?%s)\",     /* REPLACE_DOCSIZE  */\n      \"DELETE FROM %Q.'%q_docsize' WHERE id=?\",         /* DELETE_DOCSIZE  */\n\n      \"SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?\",    /* LOOKUP_DOCSIZE  */\n\n      \"REPLACE INTO %Q.'%q_config' VALUES(?,?)\",        /* REPLACE_CONFIG */\n      \"SELECT %s FROM %s AS T\",                         /* SCAN */\n    };\n    Fts5Config *pC = p->pConfig;\n    char *zSql = 0;\n\n    assert( ArraySize(azStmt)==ArraySize(p->aStmt) );\n\n    switch( eStmt ){\n      case FTS5_STMT_SCAN:\n        zSql = sqlite3_mprintf(azStmt[eStmt],\n            pC->zContentExprlist, pC->zContent\n        );\n        break;\n\n      case FTS5_STMT_SCAN_ASC:\n      case FTS5_STMT_SCAN_DESC:\n        zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,\n            pC->zContent, pC->zContentRowid, pC->zContentRowid,\n            pC->zContentRowid\n        );\n        break;\n\n      case FTS5_STMT_LOOKUP:\n      case FTS5_STMT_LOOKUP2:\n        zSql = sqlite3_mprintf(azStmt[eStmt],\n            pC->zContentExprlist, pC->zContent, pC->zContentRowid\n        );\n        break;\n\n      case FTS5_STMT_INSERT_CONTENT:\n      case FTS5_STMT_REPLACE_CONTENT: {\n        char *zBind = 0;\n        int i;\n\n        assert( pC->eContent==FTS5_CONTENT_NORMAL\n             || pC->eContent==FTS5_CONTENT_UNINDEXED\n        );\n\n        /* Add bindings for the \"c*\" columns - those that store the actual\n        ** table content. If eContent==NORMAL, then there is one binding\n        ** for each column. Or, if eContent==UNINDEXED, then there are only\n        ** bindings for the UNINDEXED columns. */\n        for(i=0; rc==SQLITE_OK && i<(pC->nCol+1); i++){\n          if( !i || pC->eContent==FTS5_CONTENT_NORMAL || pC->abUnindexed[i-1] ){\n            zBind = sqlite3Fts5Mprintf(&rc, \"%z%s?%d\", zBind, zBind?\",\":\"\",i+1);\n          }\n        }\n\n        /* Add bindings for any \"l*\" columns. Only non-UNINDEXED columns\n        ** require these.  */\n        if( pC->bLocale && pC->eContent==FTS5_CONTENT_NORMAL ){\n          for(i=0; rc==SQLITE_OK && i<pC->nCol; i++){\n            if( pC->abUnindexed[i]==0 ){\n              zBind = sqlite3Fts5Mprintf(&rc, \"%z,?%d\", zBind, pC->nCol+i+2);\n            }\n          }\n        }\n\n        zSql = sqlite3Fts5Mprintf(&rc, azStmt[eStmt], pC->zDb, pC->zName,zBind);\n        sqlite3_free(zBind);\n        break;\n      }\n\n      case FTS5_STMT_REPLACE_DOCSIZE:\n        zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName,\n          (pC->bContentlessDelete ? \",?\" : \"\")\n        );\n        break;\n\n      case FTS5_STMT_LOOKUP_DOCSIZE:\n        zSql = sqlite3_mprintf(azStmt[eStmt],\n            (pC->bContentlessDelete ? \",origin\" : \"\"),\n            pC->zDb, pC->zName\n        );\n        break;\n\n      default:\n        zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);\n        break;\n    }\n\n    if( zSql==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      int f = SQLITE_PREPARE_PERSISTENT;\n      if( eStmt>FTS5_STMT_LOOKUP2 ) f |= SQLITE_PREPARE_NO_VTAB;\n      p->pConfig->bLock++;\n      rc = sqlite3_prepare_v3(pC->db, zSql, -1, f, &p->aStmt[eStmt], 0);\n      p->pConfig->bLock--;\n      sqlite3_free(zSql);\n      if( rc!=SQLITE_OK && pzErrMsg ){\n        *pzErrMsg = sqlite3_mprintf(\"%s\", sqlite3_errmsg(pC->db));\n      }\n      if( rc==SQLITE_ERROR && eStmt>FTS5_STMT_LOOKUP2 && eStmt<FTS5_STMT_SCAN ){\n        /* One of the internal tables - not the %_content table - is missing.\n        ** This counts as a corrupted table.  */\n       rc = SQLITE_CORRUPT;\n      }\n    }\n  }\n\n  *ppStmt = p->aStmt[eStmt];\n  sqlite3_reset(*ppStmt);\n  return rc;\n}\n\n\nstatic int fts5ExecPrintf(\n  sqlite3 *db,\n  char **pzErr,\n  const char *zFormat,\n  ...\n){\n  int rc;\n  va_list ap;                     /* ... printf arguments */\n  char *zSql;\n\n  va_start(ap, zFormat);\n  zSql = sqlite3_vmprintf(zFormat, ap);\n\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    rc = sqlite3_exec(db, zSql, 0, 0, pzErr);\n    sqlite3_free(zSql);\n  }\n\n  va_end(ap);\n  return rc;\n}\n\n/*\n** Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error\n** code otherwise.\n*/\nstatic int sqlite3Fts5DropAll(Fts5Config *pConfig){\n  int rc = fts5ExecPrintf(pConfig->db, 0,\n      \"DROP TABLE IF EXISTS %Q.'%q_data';\"\n      \"DROP TABLE IF EXISTS %Q.'%q_idx';\"\n      \"DROP TABLE IF EXISTS %Q.'%q_config';\",\n      pConfig->zDb, pConfig->zName,\n      pConfig->zDb, pConfig->zName,\n      pConfig->zDb, pConfig->zName\n  );\n  if( rc==SQLITE_OK && pConfig->bColumnsize ){\n    rc = fts5ExecPrintf(pConfig->db, 0,\n        \"DROP TABLE IF EXISTS %Q.'%q_docsize';\",\n        pConfig->zDb, pConfig->zName\n    );\n  }\n  if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){\n    rc = fts5ExecPrintf(pConfig->db, 0,\n        \"DROP TABLE IF EXISTS %Q.'%q_content';\",\n        pConfig->zDb, pConfig->zName\n    );\n  }\n  return rc;\n}\n\nstatic void fts5StorageRenameOne(\n  Fts5Config *pConfig,            /* Current FTS5 configuration */\n  int *pRc,                       /* IN/OUT: Error code */\n  const char *zTail,              /* Tail of table name e.g. \"data\", \"config\" */\n  const char *zName               /* New name of FTS5 table */\n){\n  if( *pRc==SQLITE_OK ){\n    *pRc = fts5ExecPrintf(pConfig->db, 0,\n        \"ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\",\n        pConfig->zDb, pConfig->zName, zTail, zName, zTail\n    );\n  }\n}\n\nstatic int sqlite3Fts5StorageRename(Fts5Storage *pStorage, const char *zName){\n  Fts5Config *pConfig = pStorage->pConfig;\n  int rc = sqlite3Fts5StorageSync(pStorage);\n\n  fts5StorageRenameOne(pConfig, &rc, \"data\", zName);\n  fts5StorageRenameOne(pConfig, &rc, \"idx\", zName);\n  fts5StorageRenameOne(pConfig, &rc, \"config\", zName);\n  if( pConfig->bColumnsize ){\n    fts5StorageRenameOne(pConfig, &rc, \"docsize\", zName);\n  }\n  if( pConfig->eContent==FTS5_CONTENT_NORMAL ){\n    fts5StorageRenameOne(pConfig, &rc, \"content\", zName);\n  }\n  return rc;\n}\n\n/*\n** Create the shadow table named zPost, with definition zDefn. Return\n** SQLITE_OK if successful, or an SQLite error code otherwise.\n*/\nstatic int sqlite3Fts5CreateTable(\n  Fts5Config *pConfig,            /* FTS5 configuration */\n  const char *zPost,              /* Shadow table to create (e.g. \"content\") */\n  const char *zDefn,              /* Columns etc. for shadow table */\n  int bWithout,                   /* True for without rowid */\n  char **pzErr                    /* OUT: Error message */\n){\n  int rc;\n  char *zErr = 0;\n\n  rc = fts5ExecPrintf(pConfig->db, &zErr, \"CREATE TABLE %Q.'%q_%q'(%s)%s\",\n      pConfig->zDb, pConfig->zName, zPost, zDefn,\n#ifndef SQLITE_FTS5_NO_WITHOUT_ROWID\n      bWithout?\" WITHOUT ROWID\":\n#endif\n      \"\"\n  );\n  if( zErr ){\n    *pzErr = sqlite3_mprintf(\n        \"fts5: error creating shadow table %q_%s: %s\",\n        pConfig->zName, zPost, zErr\n    );\n    sqlite3_free(zErr);\n  }\n\n  return rc;\n}\n\n/*\n** Open a new Fts5Index handle. If the bCreate argument is true, create\n** and initialize the underlying tables\n**\n** If successful, set *pp to point to the new object and return SQLITE_OK.\n** Otherwise, set *pp to NULL and return an SQLite error code.\n*/\nstatic int sqlite3Fts5StorageOpen(\n  Fts5Config *pConfig,\n  Fts5Index *pIndex,\n  int bCreate,\n  Fts5Storage **pp,\n  char **pzErr                    /* OUT: Error message */\n){\n  int rc = SQLITE_OK;\n  Fts5Storage *p;                 /* New object */\n  sqlite3_int64 nByte;            /* Bytes of space to allocate */\n\n  nByte = sizeof(Fts5Storage)               /* Fts5Storage object */\n        + pConfig->nCol * sizeof(i64);      /* Fts5Storage.aTotalSize[] */\n  *pp = p = (Fts5Storage*)sqlite3_malloc64(nByte);\n  if( !p ) return SQLITE_NOMEM;\n\n  memset(p, 0, (size_t)nByte);\n  p->aTotalSize = (i64*)&p[1];\n  p->pConfig = pConfig;\n  p->pIndex = pIndex;\n\n  if( bCreate ){\n    if( pConfig->eContent==FTS5_CONTENT_NORMAL\n     || pConfig->eContent==FTS5_CONTENT_UNINDEXED\n    ){\n      int nDefn = 32 + pConfig->nCol*10;\n      char *zDefn = sqlite3_malloc64(32 + (sqlite3_int64)pConfig->nCol * 20);\n      if( zDefn==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        int i;\n        int iOff;\n        sqlite3_snprintf(nDefn, zDefn, \"id INTEGER PRIMARY KEY\");\n        iOff = (int)strlen(zDefn);\n        for(i=0; i<pConfig->nCol; i++){\n          if( pConfig->eContent==FTS5_CONTENT_NORMAL\n           || pConfig->abUnindexed[i]\n          ){\n            sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], \", c%d\", i);\n            iOff += (int)strlen(&zDefn[iOff]);\n          }\n        }\n        if( pConfig->bLocale ){\n          for(i=0; i<pConfig->nCol; i++){\n            if( pConfig->abUnindexed[i]==0 ){\n              sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], \", l%d\", i);\n              iOff += (int)strlen(&zDefn[iOff]);\n            }\n          }\n        }\n        rc = sqlite3Fts5CreateTable(pConfig, \"content\", zDefn, 0, pzErr);\n      }\n      sqlite3_free(zDefn);\n    }\n\n    if( rc==SQLITE_OK && pConfig->bColumnsize ){\n      const char *zCols = \"id INTEGER PRIMARY KEY, sz BLOB\";\n      if( pConfig->bContentlessDelete ){\n        zCols = \"id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER\";\n      }\n      rc = sqlite3Fts5CreateTable(pConfig, \"docsize\", zCols, 0, pzErr);\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts5CreateTable(\n          pConfig, \"config\", \"k PRIMARY KEY, v\", 1, pzErr\n      );\n    }\n    if( rc==SQLITE_OK ){\n      rc = sqlite3Fts5StorageConfigValue(p, \"version\", 0, FTS5_CURRENT_VERSION);\n    }\n  }\n\n  if( rc ){\n    sqlite3Fts5StorageClose(p);\n    *pp = 0;\n  }\n  return rc;\n}\n\n/*\n** Close a handle opened by an earlier call to sqlite3Fts5StorageOpen().\n*/\nstatic int sqlite3Fts5StorageClose(Fts5Storage *p){\n  int rc = SQLITE_OK;\n  if( p ){\n    int i;\n\n    /* Finalize all SQL statements */\n    for(i=0; i<ArraySize(p->aStmt); i++){\n      sqlite3_finalize(p->aStmt[i]);\n    }\n\n    sqlite3_free(p);\n  }\n  return rc;\n}\n\ntypedef struct Fts5InsertCtx Fts5InsertCtx;\nstruct Fts5InsertCtx {\n  Fts5Storage *pStorage;\n  int iCol;\n  int szCol;                      /* Size of column value in tokens */\n};\n\n/*\n** Tokenization callback used when inserting tokens into the FTS index.\n*/\nstatic int fts5StorageInsertCallback(\n  void *pContext,                 /* Pointer to Fts5InsertCtx object */\n  int tflags,\n  const char *pToken,             /* Buffer containing token */\n  int nToken,                     /* Size of token in bytes */\n  int iUnused1,                   /* Start offset of token */\n  int iUnused2                    /* End offset of token */\n){\n  Fts5InsertCtx *pCtx = (Fts5InsertCtx*)pContext;\n  Fts5Index *pIdx = pCtx->pStorage->pIndex;\n  UNUSED_PARAM2(iUnused1, iUnused2);\n  if( nToken>FTS5_MAX_TOKEN_SIZE ) nToken = FTS5_MAX_TOKEN_SIZE;\n  if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){\n    pCtx->szCol++;\n  }\n  return sqlite3Fts5IndexWrite(pIdx, pCtx->iCol, pCtx->szCol-1, pToken, nToken);\n}\n\n/*\n** This function is used as part of an UPDATE statement that modifies the\n** rowid of a row. In that case, this function is called first to set\n** Fts5Storage.pSavedRow to point to a statement that may be used to\n** access the original values of the row being deleted - iDel.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n** It is not considered an error if row iDel does not exist. In this case\n** pSavedRow is not set and SQLITE_OK returned.\n*/\nstatic int sqlite3Fts5StorageFindDeleteRow(Fts5Storage *p, i64 iDel){\n  int rc = SQLITE_OK;\n  sqlite3_stmt *pSeek = 0;\n\n  assert( p->pSavedRow==0 );\n  rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP+1, &pSeek, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pSeek, 1, iDel);\n    if( sqlite3_step(pSeek)!=SQLITE_ROW ){\n      rc = sqlite3_reset(pSeek);\n    }else{\n      p->pSavedRow = pSeek;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** If a row with rowid iDel is present in the %_content table, add the\n** delete-markers to the FTS index necessary to delete it. Do not actually\n** remove the %_content row at this time though.\n**\n** If parameter bSaveRow is true, then Fts5Storage.pSavedRow is left\n** pointing to a statement (FTS5_STMT_LOOKUP2) that may be used to access\n** the original values of the row being deleted. This is used by UPDATE\n** statements.\n*/\nstatic int fts5StorageDeleteFromIndex(\n  Fts5Storage *p,\n  i64 iDel,\n  sqlite3_value **apVal,\n  int bSaveRow                    /* True to set pSavedRow */\n){\n  Fts5Config *pConfig = p->pConfig;\n  sqlite3_stmt *pSeek = 0;        /* SELECT to read row iDel from %_data */\n  int rc = SQLITE_OK;             /* Return code */\n  int rc2;                        /* sqlite3_reset() return code */\n  int iCol;\n  Fts5InsertCtx ctx;\n\n  assert( bSaveRow==0 || apVal==0 );\n  assert( bSaveRow==0 || bSaveRow==1 );\n  assert( FTS5_STMT_LOOKUP2==FTS5_STMT_LOOKUP+1 );\n\n  if( apVal==0 ){\n    if( p->pSavedRow && bSaveRow ){\n      pSeek = p->pSavedRow;\n      p->pSavedRow = 0;\n    }else{\n      rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP+bSaveRow, &pSeek, 0);\n      if( rc!=SQLITE_OK ) return rc;\n      sqlite3_bind_int64(pSeek, 1, iDel);\n      if( sqlite3_step(pSeek)!=SQLITE_ROW ){\n        return sqlite3_reset(pSeek);\n      }\n    }\n  }\n\n  ctx.pStorage = p;\n  ctx.iCol = -1;\n  for(iCol=1; rc==SQLITE_OK && iCol<=pConfig->nCol; iCol++){\n    if( pConfig->abUnindexed[iCol-1]==0 ){\n      sqlite3_value *pVal = 0;\n      sqlite3_value *pFree = 0;\n      const char *pText = 0;\n      int nText = 0;\n      const char *pLoc = 0;\n      int nLoc = 0;\n\n      assert( pSeek==0 || apVal==0 );\n      assert( pSeek!=0 || apVal!=0 );\n      if( pSeek ){\n        pVal = sqlite3_column_value(pSeek, iCol);\n      }else{\n        pVal = apVal[iCol-1];\n      }\n\n      if( pConfig->bLocale && sqlite3Fts5IsLocaleValue(pConfig, pVal) ){\n        rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc);\n      }else{\n        if( sqlite3_value_type(pVal)!=SQLITE_TEXT ){\n          /* Make a copy of the value to work with. This is because the call\n          ** to sqlite3_value_text() below forces the type of the value to\n          ** SQLITE_TEXT, and we may need to use it again later. */\n          pFree = pVal = sqlite3_value_dup(pVal);\n          if( pVal==0 ){\n            rc = SQLITE_NOMEM;\n          }\n        }\n        if( rc==SQLITE_OK ){\n          pText = (const char*)sqlite3_value_text(pVal);\n          nText = sqlite3_value_bytes(pVal);\n          if( pConfig->bLocale && pSeek ){\n            pLoc = (const char*)sqlite3_column_text(pSeek, iCol+pConfig->nCol);\n            nLoc = sqlite3_column_bytes(pSeek, iCol + pConfig->nCol);\n          }\n        }\n      }\n\n      if( rc==SQLITE_OK ){\n        sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n        ctx.szCol = 0;\n        rc = sqlite3Fts5Tokenize(pConfig, FTS5_TOKENIZE_DOCUMENT,\n            pText, nText, (void*)&ctx, fts5StorageInsertCallback\n        );\n        p->aTotalSize[iCol-1] -= (i64)ctx.szCol;\n        if( rc==SQLITE_OK && p->aTotalSize[iCol-1]<0 ){\n          rc = FTS5_CORRUPT;\n        }\n        sqlite3Fts5ClearLocale(pConfig);\n      }\n      sqlite3_value_free(pFree);\n    }\n  }\n  if( rc==SQLITE_OK && p->nTotalRow<1 ){\n    rc = FTS5_CORRUPT;\n  }else{\n    p->nTotalRow--;\n  }\n\n  if( rc==SQLITE_OK && bSaveRow ){\n    assert( p->pSavedRow==0 );\n    p->pSavedRow = pSeek;\n  }else{\n    rc2 = sqlite3_reset(pSeek);\n    if( rc==SQLITE_OK ) rc = rc2;\n  }\n  return rc;\n}\n\n/*\n** Reset any saved statement pSavedRow. Zero pSavedRow as well. This\n** should be called by the xUpdate() method of the fts5 table before\n** returning from any operation that may have set Fts5Storage.pSavedRow.\n*/\nstatic void sqlite3Fts5StorageReleaseDeleteRow(Fts5Storage *pStorage){\n  assert( pStorage->pSavedRow==0\n       || pStorage->pSavedRow==pStorage->aStmt[FTS5_STMT_LOOKUP2]\n  );\n  sqlite3_reset(pStorage->pSavedRow);\n  pStorage->pSavedRow = 0;\n}\n\n/*\n** This function is called to process a DELETE on a contentless_delete=1\n** table. It adds the tombstone required to delete the entry with rowid\n** iDel. If successful, SQLITE_OK is returned. Or, if an error occurs,\n** an SQLite error code.\n*/\nstatic int fts5StorageContentlessDelete(Fts5Storage *p, i64 iDel){\n  i64 iOrigin = 0;\n  sqlite3_stmt *pLookup = 0;\n  int rc = SQLITE_OK;\n\n  assert( p->pConfig->bContentlessDelete );\n  assert( p->pConfig->eContent==FTS5_CONTENT_NONE\n       || p->pConfig->eContent==FTS5_CONTENT_UNINDEXED\n  );\n\n  /* Look up the origin of the document in the %_docsize table. Store\n  ** this in stack variable iOrigin.  */\n  rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP_DOCSIZE, &pLookup, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_int64(pLookup, 1, iDel);\n    if( SQLITE_ROW==sqlite3_step(pLookup) ){\n      iOrigin = sqlite3_column_int64(pLookup, 1);\n    }\n    rc = sqlite3_reset(pLookup);\n  }\n\n  if( rc==SQLITE_OK && iOrigin!=0 ){\n    rc = sqlite3Fts5IndexContentlessDelete(p->pIndex, iOrigin, iDel);\n  }\n\n  return rc;\n}\n\n/*\n** Insert a record into the %_docsize table. Specifically, do:\n**\n**   INSERT OR REPLACE INTO %_docsize(id, sz) VALUES(iRowid, pBuf);\n**\n** If there is no %_docsize table (as happens if the columnsize=0 option\n** is specified when the FTS5 table is created), this function is a no-op.\n*/\nstatic int fts5StorageInsertDocsize(\n  Fts5Storage *p,                 /* Storage module to write to */\n  i64 iRowid,                     /* id value */\n  Fts5Buffer *pBuf                /* sz value */\n){\n  int rc = SQLITE_OK;\n  if( p->pConfig->bColumnsize ){\n    sqlite3_stmt *pReplace = 0;\n    rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_DOCSIZE, &pReplace, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pReplace, 1, iRowid);\n      if( p->pConfig->bContentlessDelete ){\n        i64 iOrigin = 0;\n        rc = sqlite3Fts5IndexGetOrigin(p->pIndex, &iOrigin);\n        sqlite3_bind_int64(pReplace, 3, iOrigin);\n      }\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_blob(pReplace, 2, pBuf->p, pBuf->n, SQLITE_STATIC);\n      sqlite3_step(pReplace);\n      rc = sqlite3_reset(pReplace);\n      sqlite3_bind_null(pReplace, 2);\n    }\n  }\n  return rc;\n}\n\n/*\n** Load the contents of the \"averages\" record from disk into the\n** p->nTotalRow and p->aTotalSize[] variables. If successful, and if\n** argument bCache is true, set the p->bTotalsValid flag to indicate\n** that the contents of aTotalSize[] and nTotalRow are valid until\n** further notice.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs.\n*/\nstatic int fts5StorageLoadTotals(Fts5Storage *p, int bCache){\n  int rc = SQLITE_OK;\n  if( p->bTotalsValid==0 ){\n    rc = sqlite3Fts5IndexGetAverages(p->pIndex, &p->nTotalRow, p->aTotalSize);\n    p->bTotalsValid = bCache;\n  }\n  return rc;\n}\n\n/*\n** Store the current contents of the p->nTotalRow and p->aTotalSize[]\n** variables in the \"averages\" record on disk.\n**\n** Return SQLITE_OK if successful, or an SQLite error code if an error\n** occurs.\n*/\nstatic int fts5StorageSaveTotals(Fts5Storage *p){\n  int nCol = p->pConfig->nCol;\n  int i;\n  Fts5Buffer buf;\n  int rc = SQLITE_OK;\n  memset(&buf, 0, sizeof(buf));\n\n  sqlite3Fts5BufferAppendVarint(&rc, &buf, p->nTotalRow);\n  for(i=0; i<nCol; i++){\n    sqlite3Fts5BufferAppendVarint(&rc, &buf, p->aTotalSize[i]);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexSetAverages(p->pIndex, buf.p, buf.n);\n  }\n  sqlite3_free(buf.p);\n\n  return rc;\n}\n\n/*\n** Remove a row from the FTS table.\n*/\nstatic int sqlite3Fts5StorageDelete(\n  Fts5Storage *p,                 /* Storage object */\n  i64 iDel,                       /* Rowid to delete from table */\n  sqlite3_value **apVal,          /* Optional - values to remove from index */\n  int bSaveRow                    /* If true, set pSavedRow for deleted row */\n){\n  Fts5Config *pConfig = p->pConfig;\n  int rc;\n  sqlite3_stmt *pDel = 0;\n\n  assert( pConfig->eContent!=FTS5_CONTENT_NORMAL || apVal==0 );\n  rc = fts5StorageLoadTotals(p, 1);\n\n  /* Delete the index records */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 1, iDel);\n  }\n\n  if( rc==SQLITE_OK ){\n    if( p->pConfig->bContentlessDelete ){\n      rc = fts5StorageContentlessDelete(p, iDel);\n      if( rc==SQLITE_OK\n       && bSaveRow\n       && p->pConfig->eContent==FTS5_CONTENT_UNINDEXED\n      ){\n        rc = sqlite3Fts5StorageFindDeleteRow(p, iDel);\n      }\n    }else{\n      rc = fts5StorageDeleteFromIndex(p, iDel, apVal, bSaveRow);\n    }\n  }\n\n  /* Delete the %_docsize record */\n  if( rc==SQLITE_OK && pConfig->bColumnsize ){\n    rc = fts5StorageGetStmt(p, FTS5_STMT_DELETE_DOCSIZE, &pDel, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pDel, 1, iDel);\n      sqlite3_step(pDel);\n      rc = sqlite3_reset(pDel);\n    }\n  }\n\n  /* Delete the %_content record */\n  if( pConfig->eContent==FTS5_CONTENT_NORMAL\n   || pConfig->eContent==FTS5_CONTENT_UNINDEXED\n  ){\n    if( rc==SQLITE_OK ){\n      rc = fts5StorageGetStmt(p, FTS5_STMT_DELETE_CONTENT, &pDel, 0);\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_int64(pDel, 1, iDel);\n      sqlite3_step(pDel);\n      rc = sqlite3_reset(pDel);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Delete all entries in the FTS5 index.\n*/\nstatic int sqlite3Fts5StorageDeleteAll(Fts5Storage *p){\n  Fts5Config *pConfig = p->pConfig;\n  int rc;\n\n  p->bTotalsValid = 0;\n\n  /* Delete the contents of the %_data and %_docsize tables. */\n  rc = fts5ExecPrintf(pConfig->db, 0,\n      \"DELETE FROM %Q.'%q_data';\"\n      \"DELETE FROM %Q.'%q_idx';\",\n      pConfig->zDb, pConfig->zName,\n      pConfig->zDb, pConfig->zName\n  );\n  if( rc==SQLITE_OK && pConfig->bColumnsize ){\n    rc = fts5ExecPrintf(pConfig->db, 0,\n        \"DELETE FROM %Q.'%q_docsize';\", pConfig->zDb, pConfig->zName\n    );\n  }\n\n  if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_UNINDEXED ){\n    rc = fts5ExecPrintf(pConfig->db, 0,\n        \"DELETE FROM %Q.'%q_content';\", pConfig->zDb, pConfig->zName\n    );\n  }\n\n  /* Reinitialize the %_data table. This call creates the initial structure\n  ** and averages records.  */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexReinit(p->pIndex);\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5StorageConfigValue(p, \"version\", 0, FTS5_CURRENT_VERSION);\n  }\n  return rc;\n}\n\nstatic int sqlite3Fts5StorageRebuild(Fts5Storage *p){\n  Fts5Buffer buf = {0,0,0};\n  Fts5Config *pConfig = p->pConfig;\n  sqlite3_stmt *pScan = 0;\n  Fts5InsertCtx ctx;\n  int rc, rc2;\n\n  memset(&ctx, 0, sizeof(Fts5InsertCtx));\n  ctx.pStorage = p;\n  rc = sqlite3Fts5StorageDeleteAll(p);\n  if( rc==SQLITE_OK ){\n    rc = fts5StorageLoadTotals(p, 1);\n  }\n\n  if( rc==SQLITE_OK ){\n    rc = fts5StorageGetStmt(p, FTS5_STMT_SCAN, &pScan, pConfig->pzErrmsg);\n  }\n\n  while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pScan) ){\n    i64 iRowid = sqlite3_column_int64(pScan, 0);\n\n    sqlite3Fts5BufferZero(&buf);\n    rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 0, iRowid);\n    for(ctx.iCol=0; rc==SQLITE_OK && ctx.iCol<pConfig->nCol; ctx.iCol++){\n      ctx.szCol = 0;\n      if( pConfig->abUnindexed[ctx.iCol]==0 ){\n        int nText = 0;            /* Size of pText in bytes */\n        const char *pText = 0;    /* Pointer to buffer containing text value */\n        int nLoc = 0;             /* Size of pLoc in bytes */\n        const char *pLoc = 0;     /* Pointer to buffer containing text value */\n\n        sqlite3_value *pVal = sqlite3_column_value(pScan, ctx.iCol+1);\n        if( pConfig->eContent==FTS5_CONTENT_EXTERNAL\n         && sqlite3Fts5IsLocaleValue(pConfig, pVal)\n        ){\n          rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc);\n        }else{\n          pText = (const char*)sqlite3_value_text(pVal);\n          nText = sqlite3_value_bytes(pVal);\n          if( pConfig->bLocale ){\n            int iCol = ctx.iCol + 1 + pConfig->nCol;\n            pLoc = (const char*)sqlite3_column_text(pScan, iCol);\n            nLoc = sqlite3_column_bytes(pScan, iCol);\n          }\n        }\n\n        if( rc==SQLITE_OK ){\n          sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n          rc = sqlite3Fts5Tokenize(pConfig,\n              FTS5_TOKENIZE_DOCUMENT,\n              pText, nText,\n              (void*)&ctx,\n              fts5StorageInsertCallback\n          );\n          sqlite3Fts5ClearLocale(pConfig);\n        }\n      }\n      sqlite3Fts5BufferAppendVarint(&rc, &buf, ctx.szCol);\n      p->aTotalSize[ctx.iCol] += (i64)ctx.szCol;\n    }\n    p->nTotalRow++;\n\n    if( rc==SQLITE_OK ){\n      rc = fts5StorageInsertDocsize(p, iRowid, &buf);\n    }\n  }\n  sqlite3_free(buf.p);\n  rc2 = sqlite3_reset(pScan);\n  if( rc==SQLITE_OK ) rc = rc2;\n\n  /* Write the averages record */\n  if( rc==SQLITE_OK ){\n    rc = fts5StorageSaveTotals(p);\n  }\n  return rc;\n}\n\nstatic int sqlite3Fts5StorageOptimize(Fts5Storage *p){\n  return sqlite3Fts5IndexOptimize(p->pIndex);\n}\n\nstatic int sqlite3Fts5StorageMerge(Fts5Storage *p, int nMerge){\n  return sqlite3Fts5IndexMerge(p->pIndex, nMerge);\n}\n\nstatic int sqlite3Fts5StorageReset(Fts5Storage *p){\n  return sqlite3Fts5IndexReset(p->pIndex);\n}\n\n/*\n** Allocate a new rowid. This is used for \"external content\" tables when\n** a NULL value is inserted into the rowid column. The new rowid is allocated\n** by inserting a dummy row into the %_docsize table. The dummy will be\n** overwritten later.\n**\n** If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In\n** this case the user is required to provide a rowid explicitly.\n*/\nstatic int fts5StorageNewRowid(Fts5Storage *p, i64 *piRowid){\n  int rc = SQLITE_MISMATCH;\n  if( p->pConfig->bColumnsize ){\n    sqlite3_stmt *pReplace = 0;\n    rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_DOCSIZE, &pReplace, 0);\n    if( rc==SQLITE_OK ){\n      sqlite3_bind_null(pReplace, 1);\n      sqlite3_bind_null(pReplace, 2);\n      sqlite3_step(pReplace);\n      rc = sqlite3_reset(pReplace);\n    }\n    if( rc==SQLITE_OK ){\n      *piRowid = sqlite3_last_insert_rowid(p->pConfig->db);\n    }\n  }\n  return rc;\n}\n\n/*\n** Insert a new row into the FTS content table.\n*/\nstatic int sqlite3Fts5StorageContentInsert(\n  Fts5Storage *p,\n  int bReplace,                   /* True to use REPLACE instead of INSERT */\n  sqlite3_value **apVal,\n  i64 *piRowid\n){\n  Fts5Config *pConfig = p->pConfig;\n  int rc = SQLITE_OK;\n\n  /* Insert the new row into the %_content table. */\n  if( pConfig->eContent!=FTS5_CONTENT_NORMAL\n   && pConfig->eContent!=FTS5_CONTENT_UNINDEXED\n  ){\n    if( sqlite3_value_type(apVal[1])==SQLITE_INTEGER ){\n      *piRowid = sqlite3_value_int64(apVal[1]);\n    }else{\n      rc = fts5StorageNewRowid(p, piRowid);\n    }\n  }else{\n    sqlite3_stmt *pInsert = 0;    /* Statement to write %_content table */\n    int i;                        /* Counter variable */\n\n    assert( FTS5_STMT_INSERT_CONTENT+1==FTS5_STMT_REPLACE_CONTENT );\n    assert( bReplace==0 || bReplace==1 );\n    rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT+bReplace, &pInsert, 0);\n    if( pInsert ) sqlite3_clear_bindings(pInsert);\n\n    /* Bind the rowid value */\n    sqlite3_bind_value(pInsert, 1, apVal[1]);\n\n    /* Loop through values for user-defined columns. i=2 is the leftmost\n    ** user-defined column. As is column 1 of pSavedRow.  */\n    for(i=2; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){\n      int bUnindexed = pConfig->abUnindexed[i-2];\n      if( pConfig->eContent==FTS5_CONTENT_NORMAL || bUnindexed ){\n        sqlite3_value *pVal = apVal[i];\n\n        if( sqlite3_value_nochange(pVal) && p->pSavedRow ){\n          /* This is an UPDATE statement, and user-defined column (i-2) was not\n          ** modified.  Retrieve the value from Fts5Storage.pSavedRow.  */\n          pVal = sqlite3_column_value(p->pSavedRow, i-1);\n          if( pConfig->bLocale && bUnindexed==0 ){\n            sqlite3_bind_value(pInsert, pConfig->nCol + i,\n                sqlite3_column_value(p->pSavedRow, pConfig->nCol + i - 1)\n            );\n          }\n        }else if( sqlite3Fts5IsLocaleValue(pConfig, pVal) ){\n          const char *pText = 0;\n          const char *pLoc = 0;\n          int nText = 0;\n          int nLoc = 0;\n          assert( pConfig->bLocale );\n\n          rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc);\n          if( rc==SQLITE_OK ){\n            sqlite3_bind_text(pInsert, i, pText, nText, SQLITE_TRANSIENT);\n            if( bUnindexed==0 ){\n              int iLoc = pConfig->nCol + i;\n              sqlite3_bind_text(pInsert, iLoc, pLoc, nLoc, SQLITE_TRANSIENT);\n            }\n          }\n\n          continue;\n        }\n\n        rc = sqlite3_bind_value(pInsert, i, pVal);\n      }\n    }\n    if( rc==SQLITE_OK ){\n      sqlite3_step(pInsert);\n      rc = sqlite3_reset(pInsert);\n    }\n    *piRowid = sqlite3_last_insert_rowid(pConfig->db);\n  }\n\n  return rc;\n}\n\n/*\n** Insert new entries into the FTS index and %_docsize table.\n*/\nstatic int sqlite3Fts5StorageIndexInsert(\n  Fts5Storage *p,\n  sqlite3_value **apVal,\n  i64 iRowid\n){\n  Fts5Config *pConfig = p->pConfig;\n  int rc = SQLITE_OK;             /* Return code */\n  Fts5InsertCtx ctx;              /* Tokenization callback context object */\n  Fts5Buffer buf;                 /* Buffer used to build up %_docsize blob */\n\n  memset(&buf, 0, sizeof(Fts5Buffer));\n  ctx.pStorage = p;\n  rc = fts5StorageLoadTotals(p, 1);\n\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 0, iRowid);\n  }\n  for(ctx.iCol=0; rc==SQLITE_OK && ctx.iCol<pConfig->nCol; ctx.iCol++){\n    ctx.szCol = 0;\n    if( pConfig->abUnindexed[ctx.iCol]==0 ){\n      int nText = 0;              /* Size of pText in bytes */\n      const char *pText = 0;      /* Pointer to buffer containing text value */\n      int nLoc = 0;               /* Size of pText in bytes */\n      const char *pLoc = 0;       /* Pointer to buffer containing text value */\n\n      sqlite3_value *pVal = apVal[ctx.iCol+2];\n      if( p->pSavedRow && sqlite3_value_nochange(pVal) ){\n        pVal = sqlite3_column_value(p->pSavedRow, ctx.iCol+1);\n        if( pConfig->eContent==FTS5_CONTENT_NORMAL && pConfig->bLocale ){\n          int iCol = ctx.iCol + 1 + pConfig->nCol;\n          pLoc = (const char*)sqlite3_column_text(p->pSavedRow, iCol);\n          nLoc = sqlite3_column_bytes(p->pSavedRow, iCol);\n        }\n      }else{\n        pVal = apVal[ctx.iCol+2];\n      }\n\n      if( pConfig->bLocale && sqlite3Fts5IsLocaleValue(pConfig, pVal) ){\n        rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc);\n      }else{\n        pText = (const char*)sqlite3_value_text(pVal);\n        nText = sqlite3_value_bytes(pVal);\n      }\n\n      if( rc==SQLITE_OK ){\n        sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n        rc = sqlite3Fts5Tokenize(pConfig,\n            FTS5_TOKENIZE_DOCUMENT, pText, nText, (void*)&ctx,\n            fts5StorageInsertCallback\n        );\n        sqlite3Fts5ClearLocale(pConfig);\n      }\n    }\n    sqlite3Fts5BufferAppendVarint(&rc, &buf, ctx.szCol);\n    p->aTotalSize[ctx.iCol] += (i64)ctx.szCol;\n  }\n  p->nTotalRow++;\n\n  /* Write the %_docsize record */\n  if( rc==SQLITE_OK ){\n    rc = fts5StorageInsertDocsize(p, iRowid, &buf);\n  }\n  sqlite3_free(buf.p);\n\n  return rc;\n}\n\nstatic int fts5StorageCount(Fts5Storage *p, const char *zSuffix, i64 *pnRow){\n  Fts5Config *pConfig = p->pConfig;\n  char *zSql;\n  int rc;\n\n  zSql = sqlite3_mprintf(\"SELECT count(*) FROM %Q.'%q_%s'\",\n      pConfig->zDb, pConfig->zName, zSuffix\n  );\n  if( zSql==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    sqlite3_stmt *pCnt = 0;\n    rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &pCnt, 0);\n    if( rc==SQLITE_OK ){\n      if( SQLITE_ROW==sqlite3_step(pCnt) ){\n        *pnRow = sqlite3_column_int64(pCnt, 0);\n      }\n      rc = sqlite3_finalize(pCnt);\n    }\n  }\n\n  sqlite3_free(zSql);\n  return rc;\n}\n\n/*\n** Context object used by sqlite3Fts5StorageIntegrity().\n*/\ntypedef struct Fts5IntegrityCtx Fts5IntegrityCtx;\nstruct Fts5IntegrityCtx {\n  i64 iRowid;\n  int iCol;\n  int szCol;\n  u64 cksum;\n  Fts5Termset *pTermset;\n  Fts5Config *pConfig;\n};\n\n\n/*\n** Tokenization callback used by integrity check.\n*/\nstatic int fts5StorageIntegrityCallback(\n  void *pContext,                 /* Pointer to Fts5IntegrityCtx object */\n  int tflags,\n  const char *pToken,             /* Buffer containing token */\n  int nToken,                     /* Size of token in bytes */\n  int iUnused1,                   /* Start offset of token */\n  int iUnused2                    /* End offset of token */\n){\n  Fts5IntegrityCtx *pCtx = (Fts5IntegrityCtx*)pContext;\n  Fts5Termset *pTermset = pCtx->pTermset;\n  int bPresent;\n  int ii;\n  int rc = SQLITE_OK;\n  int iPos;\n  int iCol;\n\n  UNUSED_PARAM2(iUnused1, iUnused2);\n  if( nToken>FTS5_MAX_TOKEN_SIZE ) nToken = FTS5_MAX_TOKEN_SIZE;\n\n  if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){\n    pCtx->szCol++;\n  }\n\n  switch( pCtx->pConfig->eDetail ){\n    case FTS5_DETAIL_FULL:\n      iPos = pCtx->szCol-1;\n      iCol = pCtx->iCol;\n      break;\n\n    case FTS5_DETAIL_COLUMNS:\n      iPos = pCtx->iCol;\n      iCol = 0;\n      break;\n\n    default:\n      assert( pCtx->pConfig->eDetail==FTS5_DETAIL_NONE );\n      iPos = 0;\n      iCol = 0;\n      break;\n  }\n\n  rc = sqlite3Fts5TermsetAdd(pTermset, 0, pToken, nToken, &bPresent);\n  if( rc==SQLITE_OK && bPresent==0 ){\n    pCtx->cksum ^= sqlite3Fts5IndexEntryCksum(\n        pCtx->iRowid, iCol, iPos, 0, pToken, nToken\n    );\n  }\n\n  for(ii=0; rc==SQLITE_OK && ii<pCtx->pConfig->nPrefix; ii++){\n    const int nChar = pCtx->pConfig->aPrefix[ii];\n    int nByte = sqlite3Fts5IndexCharlenToBytelen(pToken, nToken, nChar);\n    if( nByte ){\n      rc = sqlite3Fts5TermsetAdd(pTermset, ii+1, pToken, nByte, &bPresent);\n      if( bPresent==0 ){\n        pCtx->cksum ^= sqlite3Fts5IndexEntryCksum(\n            pCtx->iRowid, iCol, iPos, ii+1, pToken, nByte\n        );\n      }\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Check that the contents of the FTS index match that of the %_content\n** table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return\n** some other SQLite error code if an error occurs while attempting to\n** determine this.\n*/\nstatic int sqlite3Fts5StorageIntegrity(Fts5Storage *p, int iArg){\n  Fts5Config *pConfig = p->pConfig;\n  int rc = SQLITE_OK;             /* Return code */\n  int *aColSize;                  /* Array of size pConfig->nCol */\n  i64 *aTotalSize;                /* Array of size pConfig->nCol */\n  Fts5IntegrityCtx ctx;\n  sqlite3_stmt *pScan;\n  int bUseCksum;\n\n  memset(&ctx, 0, sizeof(Fts5IntegrityCtx));\n  ctx.pConfig = p->pConfig;\n  aTotalSize = (i64*)sqlite3_malloc64(pConfig->nCol*(sizeof(int)+sizeof(i64)));\n  if( !aTotalSize ) return SQLITE_NOMEM;\n  aColSize = (int*)&aTotalSize[pConfig->nCol];\n  memset(aTotalSize, 0, sizeof(i64) * pConfig->nCol);\n\n  bUseCksum = (pConfig->eContent==FTS5_CONTENT_NORMAL\n           || (pConfig->eContent==FTS5_CONTENT_EXTERNAL && iArg)\n  );\n  if( bUseCksum ){\n    /* Generate the expected index checksum based on the contents of the\n    ** %_content table. This block stores the checksum in ctx.cksum. */\n    rc = fts5StorageGetStmt(p, FTS5_STMT_SCAN, &pScan, 0);\n    if( rc==SQLITE_OK ){\n      int rc2;\n      while( SQLITE_ROW==sqlite3_step(pScan) ){\n        int i;\n        ctx.iRowid = sqlite3_column_int64(pScan, 0);\n        ctx.szCol = 0;\n        if( pConfig->bColumnsize ){\n          rc = sqlite3Fts5StorageDocsize(p, ctx.iRowid, aColSize);\n        }\n        if( rc==SQLITE_OK && pConfig->eDetail==FTS5_DETAIL_NONE ){\n          rc = sqlite3Fts5TermsetNew(&ctx.pTermset);\n        }\n        for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){\n          if( pConfig->abUnindexed[i]==0 ){\n            const char *pText = 0;\n            int nText = 0;\n            const char *pLoc = 0;\n            int nLoc = 0;\n            sqlite3_value *pVal = sqlite3_column_value(pScan, i+1);\n\n            if( pConfig->eContent==FTS5_CONTENT_EXTERNAL\n             && sqlite3Fts5IsLocaleValue(pConfig, pVal)\n            ){\n              rc = sqlite3Fts5DecodeLocaleValue(\n                  pVal, &pText, &nText, &pLoc, &nLoc\n              );\n            }else{\n              if( pConfig->eContent==FTS5_CONTENT_NORMAL && pConfig->bLocale ){\n                int iCol = i + 1 + pConfig->nCol;\n                pLoc = (const char*)sqlite3_column_text(pScan, iCol);\n                nLoc = sqlite3_column_bytes(pScan, iCol);\n              }\n              pText = (const char*)sqlite3_value_text(pVal);\n              nText = sqlite3_value_bytes(pVal);\n            }\n\n            ctx.iCol = i;\n            ctx.szCol = 0;\n\n            if( rc==SQLITE_OK && pConfig->eDetail==FTS5_DETAIL_COLUMNS ){\n              rc = sqlite3Fts5TermsetNew(&ctx.pTermset);\n            }\n\n            if( rc==SQLITE_OK ){\n              sqlite3Fts5SetLocale(pConfig, pLoc, nLoc);\n              rc = sqlite3Fts5Tokenize(pConfig,\n                  FTS5_TOKENIZE_DOCUMENT,\n                  pText, nText,\n                  (void*)&ctx,\n                  fts5StorageIntegrityCallback\n              );\n              sqlite3Fts5ClearLocale(pConfig);\n            }\n\n            /* If this is not a columnsize=0 database, check that the number\n            ** of tokens in the value matches the aColSize[] value read from\n            ** the %_docsize table.  */\n            if( rc==SQLITE_OK\n             && pConfig->bColumnsize\n             && ctx.szCol!=aColSize[i]\n            ){\n              rc = FTS5_CORRUPT;\n            }\n            aTotalSize[i] += ctx.szCol;\n            if( pConfig->eDetail==FTS5_DETAIL_COLUMNS ){\n              sqlite3Fts5TermsetFree(ctx.pTermset);\n              ctx.pTermset = 0;\n            }\n          }\n        }\n        sqlite3Fts5TermsetFree(ctx.pTermset);\n        ctx.pTermset = 0;\n\n        if( rc!=SQLITE_OK ) break;\n      }\n      rc2 = sqlite3_reset(pScan);\n      if( rc==SQLITE_OK ) rc = rc2;\n    }\n\n    /* Test that the \"totals\" (sometimes called \"averages\") record looks Ok */\n    if( rc==SQLITE_OK ){\n      int i;\n      rc = fts5StorageLoadTotals(p, 0);\n      for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){\n        if( p->aTotalSize[i]!=aTotalSize[i] ) rc = FTS5_CORRUPT;\n      }\n    }\n\n    /* Check that the %_docsize and %_content tables contain the expected\n    ** number of rows.  */\n    if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){\n      i64 nRow = 0;\n      rc = fts5StorageCount(p, \"content\", &nRow);\n      if( rc==SQLITE_OK && nRow!=p->nTotalRow ) rc = FTS5_CORRUPT;\n    }\n    if( rc==SQLITE_OK && pConfig->bColumnsize ){\n      i64 nRow = 0;\n      rc = fts5StorageCount(p, \"docsize\", &nRow);\n      if( rc==SQLITE_OK && nRow!=p->nTotalRow ) rc = FTS5_CORRUPT;\n    }\n  }\n\n  /* Pass the expected checksum down to the FTS index module. It will\n  ** verify, amongst other things, that it matches the checksum generated by\n  ** inspecting the index itself.  */\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexIntegrityCheck(p->pIndex, ctx.cksum, bUseCksum);\n  }\n\n  sqlite3_free(aTotalSize);\n  return rc;\n}\n\n/*\n** Obtain an SQLite statement handle that may be used to read data from the\n** %_content table.\n*/\nstatic int sqlite3Fts5StorageStmt(\n  Fts5Storage *p,\n  int eStmt,\n  sqlite3_stmt **pp,\n  char **pzErrMsg\n){\n  int rc;\n  assert( eStmt==FTS5_STMT_SCAN_ASC\n       || eStmt==FTS5_STMT_SCAN_DESC\n       || eStmt==FTS5_STMT_LOOKUP\n  );\n  rc = fts5StorageGetStmt(p, eStmt, pp, pzErrMsg);\n  if( rc==SQLITE_OK ){\n    assert( p->aStmt[eStmt]==*pp );\n    p->aStmt[eStmt] = 0;\n  }\n  return rc;\n}\n\n/*\n** Release an SQLite statement handle obtained via an earlier call to\n** sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function\n** must match that passed to the sqlite3Fts5StorageStmt() call.\n*/\nstatic void sqlite3Fts5StorageStmtRelease(\n  Fts5Storage *p,\n  int eStmt,\n  sqlite3_stmt *pStmt\n){\n  assert( eStmt==FTS5_STMT_SCAN_ASC\n       || eStmt==FTS5_STMT_SCAN_DESC\n       || eStmt==FTS5_STMT_LOOKUP\n  );\n  if( p->aStmt[eStmt]==0 ){\n    sqlite3_reset(pStmt);\n    p->aStmt[eStmt] = pStmt;\n  }else{\n    sqlite3_finalize(pStmt);\n  }\n}\n\nstatic int fts5StorageDecodeSizeArray(\n  int *aCol, int nCol,            /* Array to populate */\n  const u8 *aBlob, int nBlob      /* Record to read varints from */\n){\n  int i;\n  int iOff = 0;\n  for(i=0; i<nCol; i++){\n    if( iOff>=nBlob ) return 1;\n    iOff += fts5GetVarint32(&aBlob[iOff], aCol[i]);\n  }\n  return (iOff!=nBlob);\n}\n\n/*\n** Argument aCol points to an array of integers containing one entry for\n** each table column. This function reads the %_docsize record for the\n** specified rowid and populates aCol[] with the results.\n**\n** An SQLite error code is returned if an error occurs, or SQLITE_OK\n** otherwise.\n*/\nstatic int sqlite3Fts5StorageDocsize(Fts5Storage *p, i64 iRowid, int *aCol){\n  int nCol = p->pConfig->nCol;    /* Number of user columns in table */\n  sqlite3_stmt *pLookup = 0;      /* Statement to query %_docsize */\n  int rc;                         /* Return Code */\n\n  assert( p->pConfig->bColumnsize );\n  rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP_DOCSIZE, &pLookup, 0);\n  if( pLookup ){\n    int bCorrupt = 1;\n    assert( rc==SQLITE_OK );\n    sqlite3_bind_int64(pLookup, 1, iRowid);\n    if( SQLITE_ROW==sqlite3_step(pLookup) ){\n      const u8 *aBlob = sqlite3_column_blob(pLookup, 0);\n      int nBlob = sqlite3_column_bytes(pLookup, 0);\n      if( 0==fts5StorageDecodeSizeArray(aCol, nCol, aBlob, nBlob) ){\n        bCorrupt = 0;\n      }\n    }\n    rc = sqlite3_reset(pLookup);\n    if( bCorrupt && rc==SQLITE_OK ){\n      rc = FTS5_CORRUPT;\n    }\n  }else{\n    assert( rc!=SQLITE_OK );\n  }\n\n  return rc;\n}\n\nstatic int sqlite3Fts5StorageSize(Fts5Storage *p, int iCol, i64 *pnToken){\n  int rc = fts5StorageLoadTotals(p, 0);\n  if( rc==SQLITE_OK ){\n    *pnToken = 0;\n    if( iCol<0 ){\n      int i;\n      for(i=0; i<p->pConfig->nCol; i++){\n        *pnToken += p->aTotalSize[i];\n      }\n    }else if( iCol<p->pConfig->nCol ){\n      *pnToken = p->aTotalSize[iCol];\n    }else{\n      rc = SQLITE_RANGE;\n    }\n  }\n  return rc;\n}\n\nstatic int sqlite3Fts5StorageRowCount(Fts5Storage *p, i64 *pnRow){\n  int rc = fts5StorageLoadTotals(p, 0);\n  if( rc==SQLITE_OK ){\n    /* nTotalRow being zero does not necessarily indicate a corrupt\n    ** database - it might be that the FTS5 table really does contain zero\n    ** rows. However this function is only called from the xRowCount() API,\n    ** and there is no way for that API to be invoked if the table contains\n    ** no rows. Hence the FTS5_CORRUPT return.  */\n    *pnRow = p->nTotalRow;\n    if( p->nTotalRow<=0 ) rc = FTS5_CORRUPT;\n  }\n  return rc;\n}\n\n/*\n** Flush any data currently held in-memory to disk.\n*/\nstatic int sqlite3Fts5StorageSync(Fts5Storage *p){\n  int rc = SQLITE_OK;\n  i64 iLastRowid = sqlite3_last_insert_rowid(p->pConfig->db);\n  if( p->bTotalsValid ){\n    rc = fts5StorageSaveTotals(p);\n    if( rc==SQLITE_OK ){\n      p->bTotalsValid = 0;\n    }\n  }\n  if( rc==SQLITE_OK ){\n    rc = sqlite3Fts5IndexSync(p->pIndex);\n  }\n  sqlite3_set_last_insert_rowid(p->pConfig->db, iLastRowid);\n  return rc;\n}\n\nstatic int sqlite3Fts5StorageRollback(Fts5Storage *p){\n  p->bTotalsValid = 0;\n  return sqlite3Fts5IndexRollback(p->pIndex);\n}\n\nstatic int sqlite3Fts5StorageConfigValue(\n  Fts5Storage *p,\n  const char *z,\n  sqlite3_value *pVal,\n  int iVal\n){\n  sqlite3_stmt *pReplace = 0;\n  int rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_CONFIG, &pReplace, 0);\n  if( rc==SQLITE_OK ){\n    sqlite3_bind_text(pReplace, 1, z, -1, SQLITE_STATIC);\n    if( pVal ){\n      sqlite3_bind_value(pReplace, 2, pVal);\n    }else{\n      sqlite3_bind_int(pReplace, 2, iVal);\n    }\n    sqlite3_step(pReplace);\n    rc = sqlite3_reset(pReplace);\n    sqlite3_bind_null(pReplace, 1);\n  }\n  if( rc==SQLITE_OK && pVal ){\n    int iNew = p->pConfig->iCookie + 1;\n    rc = sqlite3Fts5IndexSetCookie(p->pIndex, iNew);\n    if( rc==SQLITE_OK ){\n      p->pConfig->iCookie = iNew;\n    }\n  }\n  return rc;\n}\n\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n/**************************************************************************\n** Start of ascii tokenizer implementation.\n*/\n\n/*\n** For tokenizers with no \"unicode\" modifier, the set of token characters\n** is the same as the set of ASCII range alphanumeric characters.\n*/\nstatic unsigned char aAsciiTokenChar[128] = {\n  0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   /* 0x00..0x0F */\n  0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   /* 0x10..0x1F */\n  0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   /* 0x20..0x2F */\n  1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 0, 0, 0, 0, 0, 0,   /* 0x30..0x3F */\n  0, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,   /* 0x40..0x4F */\n  1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 0, 0, 0, 0, 0,   /* 0x50..0x5F */\n  0, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,   /* 0x60..0x6F */\n  1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 0, 0, 0, 0, 0,   /* 0x70..0x7F */\n};\n\ntypedef struct AsciiTokenizer AsciiTokenizer;\nstruct AsciiTokenizer {\n  unsigned char aTokenChar[128];\n};\n\nstatic void fts5AsciiAddExceptions(\n  AsciiTokenizer *p,\n  const char *zArg,\n  int bTokenChars\n){\n  int i;\n  for(i=0; zArg[i]; i++){\n    if( (zArg[i] & 0x80)==0 ){\n      p->aTokenChar[(int)zArg[i]] = (unsigned char)bTokenChars;\n    }\n  }\n}\n\n/*\n** Delete a \"ascii\" tokenizer.\n*/\nstatic void fts5AsciiDelete(Fts5Tokenizer *p){\n  sqlite3_free(p);\n}\n\n/*\n** Create an \"ascii\" tokenizer.\n*/\nstatic int fts5AsciiCreate(\n  void *pUnused,\n  const char **azArg, int nArg,\n  Fts5Tokenizer **ppOut\n){\n  int rc = SQLITE_OK;\n  AsciiTokenizer *p = 0;\n  UNUSED_PARAM(pUnused);\n  if( nArg%2 ){\n    rc = SQLITE_ERROR;\n  }else{\n    p = sqlite3_malloc(sizeof(AsciiTokenizer));\n    if( p==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      int i;\n      memset(p, 0, sizeof(AsciiTokenizer));\n      memcpy(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar));\n      for(i=0; rc==SQLITE_OK && i<nArg; i+=2){\n        const char *zArg = azArg[i+1];\n        if( 0==sqlite3_stricmp(azArg[i], \"tokenchars\") ){\n          fts5AsciiAddExceptions(p, zArg, 1);\n        }else\n        if( 0==sqlite3_stricmp(azArg[i], \"separators\") ){\n          fts5AsciiAddExceptions(p, zArg, 0);\n        }else{\n          rc = SQLITE_ERROR;\n        }\n      }\n      if( rc!=SQLITE_OK ){\n        fts5AsciiDelete((Fts5Tokenizer*)p);\n        p = 0;\n      }\n    }\n  }\n\n  *ppOut = (Fts5Tokenizer*)p;\n  return rc;\n}\n\n\nstatic void asciiFold(char *aOut, const char *aIn, int nByte){\n  int i;\n  for(i=0; i<nByte; i++){\n    char c = aIn[i];\n    if( c>='A' && c<='Z' ) c += 32;\n    aOut[i] = c;\n  }\n}\n\n/*\n** Tokenize some text using the ascii tokenizer.\n*/\nstatic int fts5AsciiTokenize(\n  Fts5Tokenizer *pTokenizer,\n  void *pCtx,\n  int iUnused,\n  const char *pText, int nText,\n  int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)\n){\n  AsciiTokenizer *p = (AsciiTokenizer*)pTokenizer;\n  int rc = SQLITE_OK;\n  int ie;\n  int is = 0;\n\n  char aFold[64];\n  int nFold = sizeof(aFold);\n  char *pFold = aFold;\n  unsigned char *a = p->aTokenChar;\n\n  UNUSED_PARAM(iUnused);\n\n  while( is<nText && rc==SQLITE_OK ){\n    int nByte;\n\n    /* Skip any leading divider characters. */\n    while( is<nText && ((pText[is]&0x80)==0 && a[(int)pText[is]]==0) ){\n      is++;\n    }\n    if( is==nText ) break;\n\n    /* Count the token characters */\n    ie = is+1;\n    while( ie<nText && ((pText[ie]&0x80) || a[(int)pText[ie]] ) ){\n      ie++;\n    }\n\n    /* Fold to lower case */\n    nByte = ie-is;\n    if( nByte>nFold ){\n      if( pFold!=aFold ) sqlite3_free(pFold);\n      pFold = sqlite3_malloc64((sqlite3_int64)nByte*2);\n      if( pFold==0 ){\n        rc = SQLITE_NOMEM;\n        break;\n      }\n      nFold = nByte*2;\n    }\n    asciiFold(pFold, &pText[is], nByte);\n\n    /* Invoke the token callback */\n    rc = xToken(pCtx, 0, pFold, nByte, is, ie);\n    is = ie+1;\n  }\n\n  if( pFold!=aFold ) sqlite3_free(pFold);\n  if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n  return rc;\n}\n\n/**************************************************************************\n** Start of unicode61 tokenizer implementation.\n*/\n\n\n/*\n** The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied\n** from the sqlite3 source file utf.c. If this file is compiled as part\n** of the amalgamation, they are not required.\n*/\n#ifndef SQLITE_AMALGAMATION\n\nstatic const unsigned char sqlite3Utf8Trans1[] = {\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,\n};\n\n#define READ_UTF8(zIn, zTerm, c)                           \\\n  c = *(zIn++);                                            \\\n  if( c>=0xc0 ){                                           \\\n    c = sqlite3Utf8Trans1[c-0xc0];                         \\\n    while( zIn<zTerm && (*zIn & 0xc0)==0x80 ){             \\\n      c = (c<<6) + (0x3f & *(zIn++));                      \\\n    }                                                      \\\n    if( c<0x80                                             \\\n        || (c&0xFFFFF800)==0xD800                          \\\n        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \\\n  }\n\n\n#define WRITE_UTF8(zOut, c) {                          \\\n  if( c<0x00080 ){                                     \\\n    *zOut++ = (unsigned char)(c&0xFF);                 \\\n  }                                                    \\\n  else if( c<0x00800 ){                                \\\n    *zOut++ = 0xC0 + (unsigned char)((c>>6)&0x1F);     \\\n    *zOut++ = 0x80 + (unsigned char)(c & 0x3F);        \\\n  }                                                    \\\n  else if( c<0x10000 ){                                \\\n    *zOut++ = 0xE0 + (unsigned char)((c>>12)&0x0F);    \\\n    *zOut++ = 0x80 + (unsigned char)((c>>6) & 0x3F);   \\\n    *zOut++ = 0x80 + (unsigned char)(c & 0x3F);        \\\n  }else{                                               \\\n    *zOut++ = 0xF0 + (unsigned char)((c>>18) & 0x07);  \\\n    *zOut++ = 0x80 + (unsigned char)((c>>12) & 0x3F);  \\\n    *zOut++ = 0x80 + (unsigned char)((c>>6) & 0x3F);   \\\n    *zOut++ = 0x80 + (unsigned char)(c & 0x3F);        \\\n  }                                                    \\\n}\n\n#endif /* ifndef SQLITE_AMALGAMATION */\n\n#define FTS5_SKIP_UTF8(zIn) {                               \\\n  if( ((unsigned char)(*(zIn++)))>=0xc0 ){                              \\\n    while( (((unsigned char)*zIn) & 0xc0)==0x80 ){ zIn++; }             \\\n  }                                                    \\\n}\n\ntypedef struct Unicode61Tokenizer Unicode61Tokenizer;\nstruct Unicode61Tokenizer {\n  unsigned char aTokenChar[128];  /* ASCII range token characters */\n  char *aFold;                    /* Buffer to fold text into */\n  int nFold;                      /* Size of aFold[] in bytes */\n  int eRemoveDiacritic;           /* True if remove_diacritics=1 is set */\n  int nException;\n  int *aiException;\n\n  unsigned char aCategory[32];    /* True for token char categories */\n};\n\n/* Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) */\n#define FTS5_REMOVE_DIACRITICS_NONE    0\n#define FTS5_REMOVE_DIACRITICS_SIMPLE  1\n#define FTS5_REMOVE_DIACRITICS_COMPLEX 2\n\nstatic int fts5UnicodeAddExceptions(\n  Unicode61Tokenizer *p,          /* Tokenizer object */\n  const char *z,                  /* Characters to treat as exceptions */\n  int bTokenChars                 /* 1 for 'tokenchars', 0 for 'separators' */\n){\n  int rc = SQLITE_OK;\n  int n = (int)strlen(z);\n  int *aNew;\n\n  if( n>0 ){\n    aNew = (int*)sqlite3_realloc64(p->aiException,\n                                   (n+p->nException)*sizeof(int));\n    if( aNew ){\n      int nNew = p->nException;\n      const unsigned char *zCsr = (const unsigned char*)z;\n      const unsigned char *zTerm = (const unsigned char*)&z[n];\n      while( zCsr<zTerm ){\n        u32 iCode;\n        int bToken;\n        READ_UTF8(zCsr, zTerm, iCode);\n        if( iCode<128 ){\n          p->aTokenChar[iCode] = (unsigned char)bTokenChars;\n        }else{\n          bToken = p->aCategory[sqlite3Fts5UnicodeCategory(iCode)];\n          assert( (bToken==0 || bToken==1) );\n          assert( (bTokenChars==0 || bTokenChars==1) );\n          if( bToken!=bTokenChars && sqlite3Fts5UnicodeIsdiacritic(iCode)==0 ){\n            int i;\n            for(i=0; i<nNew; i++){\n              if( (u32)aNew[i]>iCode ) break;\n            }\n            memmove(&aNew[i+1], &aNew[i], (nNew-i)*sizeof(int));\n            aNew[i] = iCode;\n            nNew++;\n          }\n        }\n      }\n      p->aiException = aNew;\n      p->nException = nNew;\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Return true if the p->aiException[] array contains the value iCode.\n*/\nstatic int fts5UnicodeIsException(Unicode61Tokenizer *p, int iCode){\n  if( p->nException>0 ){\n    int *a = p->aiException;\n    int iLo = 0;\n    int iHi = p->nException-1;\n\n    while( iHi>=iLo ){\n      int iTest = (iHi + iLo) / 2;\n      if( iCode==a[iTest] ){\n        return 1;\n      }else if( iCode>a[iTest] ){\n        iLo = iTest+1;\n      }else{\n        iHi = iTest-1;\n      }\n    }\n  }\n\n  return 0;\n}\n\n/*\n** Delete a \"unicode61\" tokenizer.\n*/\nstatic void fts5UnicodeDelete(Fts5Tokenizer *pTok){\n  if( pTok ){\n    Unicode61Tokenizer *p = (Unicode61Tokenizer*)pTok;\n    sqlite3_free(p->aiException);\n    sqlite3_free(p->aFold);\n    sqlite3_free(p);\n  }\n  return;\n}\n\nstatic int unicodeSetCategories(Unicode61Tokenizer *p, const char *zCat){\n  const char *z = zCat;\n\n  while( *z ){\n    while( *z==' ' || *z=='\\t' ) z++;\n    if( *z && sqlite3Fts5UnicodeCatParse(z, p->aCategory) ){\n      return SQLITE_ERROR;\n    }\n    while( *z!=' ' && *z!='\\t' && *z!='\\0' ) z++;\n  }\n\n  sqlite3Fts5UnicodeAscii(p->aCategory, p->aTokenChar);\n  return SQLITE_OK;\n}\n\n/*\n** Create a \"unicode61\" tokenizer.\n*/\nstatic int fts5UnicodeCreate(\n  void *pUnused,\n  const char **azArg, int nArg,\n  Fts5Tokenizer **ppOut\n){\n  int rc = SQLITE_OK;             /* Return code */\n  Unicode61Tokenizer *p = 0;      /* New tokenizer object */\n\n  UNUSED_PARAM(pUnused);\n\n  if( nArg%2 ){\n    rc = SQLITE_ERROR;\n  }else{\n    p = (Unicode61Tokenizer*)sqlite3_malloc(sizeof(Unicode61Tokenizer));\n    if( p ){\n      const char *zCat = \"L* N* Co\";\n      int i;\n      memset(p, 0, sizeof(Unicode61Tokenizer));\n\n      p->eRemoveDiacritic = FTS5_REMOVE_DIACRITICS_SIMPLE;\n      p->nFold = 64;\n      p->aFold = sqlite3_malloc64(p->nFold * sizeof(char));\n      if( p->aFold==0 ){\n        rc = SQLITE_NOMEM;\n      }\n\n      /* Search for a \"categories\" argument */\n      for(i=0; rc==SQLITE_OK && i<nArg; i+=2){\n        if( 0==sqlite3_stricmp(azArg[i], \"categories\") ){\n          zCat = azArg[i+1];\n        }\n      }\n      if( rc==SQLITE_OK ){\n        rc = unicodeSetCategories(p, zCat);\n      }\n\n      for(i=0; rc==SQLITE_OK && i<nArg; i+=2){\n        const char *zArg = azArg[i+1];\n        if( 0==sqlite3_stricmp(azArg[i], \"remove_diacritics\") ){\n          if( (zArg[0]!='0' && zArg[0]!='1' && zArg[0]!='2') || zArg[1] ){\n            rc = SQLITE_ERROR;\n          }else{\n            p->eRemoveDiacritic = (zArg[0] - '0');\n            assert( p->eRemoveDiacritic==FTS5_REMOVE_DIACRITICS_NONE\n                 || p->eRemoveDiacritic==FTS5_REMOVE_DIACRITICS_SIMPLE\n                 || p->eRemoveDiacritic==FTS5_REMOVE_DIACRITICS_COMPLEX\n            );\n          }\n        }else\n        if( 0==sqlite3_stricmp(azArg[i], \"tokenchars\") ){\n          rc = fts5UnicodeAddExceptions(p, zArg, 1);\n        }else\n        if( 0==sqlite3_stricmp(azArg[i], \"separators\") ){\n          rc = fts5UnicodeAddExceptions(p, zArg, 0);\n        }else\n        if( 0==sqlite3_stricmp(azArg[i], \"categories\") ){\n          /* no-op */\n        }else{\n          rc = SQLITE_ERROR;\n        }\n      }\n    }else{\n      rc = SQLITE_NOMEM;\n    }\n    if( rc!=SQLITE_OK ){\n      fts5UnicodeDelete((Fts5Tokenizer*)p);\n      p = 0;\n    }\n    *ppOut = (Fts5Tokenizer*)p;\n  }\n  return rc;\n}\n\n/*\n** Return true if, for the purposes of tokenizing with the tokenizer\n** passed as the first argument, codepoint iCode is considered a token\n** character (not a separator).\n*/\nstatic int fts5UnicodeIsAlnum(Unicode61Tokenizer *p, int iCode){\n  return (\n    p->aCategory[sqlite3Fts5UnicodeCategory((u32)iCode)]\n    ^ fts5UnicodeIsException(p, iCode)\n  );\n}\n\nstatic int fts5UnicodeTokenize(\n  Fts5Tokenizer *pTokenizer,\n  void *pCtx,\n  int iUnused,\n  const char *pText, int nText,\n  int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)\n){\n  Unicode61Tokenizer *p = (Unicode61Tokenizer*)pTokenizer;\n  int rc = SQLITE_OK;\n  unsigned char *a = p->aTokenChar;\n\n  unsigned char *zTerm = (unsigned char*)&pText[nText];\n  unsigned char *zCsr = (unsigned char *)pText;\n\n  /* Output buffer */\n  char *aFold = p->aFold;\n  int nFold = p->nFold;\n  const char *pEnd = &aFold[nFold-6];\n\n  UNUSED_PARAM(iUnused);\n\n  /* Each iteration of this loop gobbles up a contiguous run of separators,\n  ** then the next token.  */\n  while( rc==SQLITE_OK ){\n    u32 iCode;                    /* non-ASCII codepoint read from input */\n    char *zOut = aFold;\n    int is;\n    int ie;\n\n    /* Skip any separator characters. */\n    while( 1 ){\n      if( zCsr>=zTerm ) goto tokenize_done;\n      if( *zCsr & 0x80 ) {\n        /* A character outside of the ascii range. Skip past it if it is\n        ** a separator character. Or break out of the loop if it is not. */\n        is = zCsr - (unsigned char*)pText;\n        READ_UTF8(zCsr, zTerm, iCode);\n        if( fts5UnicodeIsAlnum(p, iCode) ){\n          goto non_ascii_tokenchar;\n        }\n      }else{\n        if( a[*zCsr] ){\n          is = zCsr - (unsigned char*)pText;\n          goto ascii_tokenchar;\n        }\n        zCsr++;\n      }\n    }\n\n    /* Run through the tokenchars. Fold them into the output buffer along\n    ** the way.  */\n    while( zCsr<zTerm ){\n\n      /* Grow the output buffer so that there is sufficient space to fit the\n      ** largest possible utf-8 character.  */\n      if( zOut>pEnd ){\n        aFold = sqlite3_malloc64((sqlite3_int64)nFold*2);\n        if( aFold==0 ){\n          rc = SQLITE_NOMEM;\n          goto tokenize_done;\n        }\n        zOut = &aFold[zOut - p->aFold];\n        memcpy(aFold, p->aFold, nFold);\n        sqlite3_free(p->aFold);\n        p->aFold = aFold;\n        p->nFold = nFold = nFold*2;\n        pEnd = &aFold[nFold-6];\n      }\n\n      if( *zCsr & 0x80 ){\n        /* An non-ascii-range character. Fold it into the output buffer if\n        ** it is a token character, or break out of the loop if it is not. */\n        READ_UTF8(zCsr, zTerm, iCode);\n        if( fts5UnicodeIsAlnum(p,iCode)||sqlite3Fts5UnicodeIsdiacritic(iCode) ){\n non_ascii_tokenchar:\n          iCode = sqlite3Fts5UnicodeFold(iCode, p->eRemoveDiacritic);\n          if( iCode ) WRITE_UTF8(zOut, iCode);\n        }else{\n          break;\n        }\n      }else if( a[*zCsr]==0 ){\n        /* An ascii-range separator character. End of token. */\n        break;\n      }else{\n ascii_tokenchar:\n        if( *zCsr>='A' && *zCsr<='Z' ){\n          *zOut++ = *zCsr + 32;\n        }else{\n          *zOut++ = *zCsr;\n        }\n        zCsr++;\n      }\n      ie = zCsr - (unsigned char*)pText;\n    }\n\n    /* Invoke the token callback */\n    rc = xToken(pCtx, 0, aFold, zOut-aFold, is, ie);\n  }\n\n tokenize_done:\n  if( rc==SQLITE_DONE ) rc = SQLITE_OK;\n  return rc;\n}\n\n/**************************************************************************\n** Start of porter stemmer implementation.\n*/\n\n/* Any tokens larger than this (in bytes) are passed through without\n** stemming. */\n#define FTS5_PORTER_MAX_TOKEN 64\n\ntypedef struct PorterTokenizer PorterTokenizer;\nstruct PorterTokenizer {\n  fts5_tokenizer_v2 tokenizer_v2; /* Parent tokenizer module */\n  Fts5Tokenizer *pTokenizer;      /* Parent tokenizer instance */\n  char aBuf[FTS5_PORTER_MAX_TOKEN + 64];\n};\n\n/*\n** Delete a \"porter\" tokenizer.\n*/\nstatic void fts5PorterDelete(Fts5Tokenizer *pTok){\n  if( pTok ){\n    PorterTokenizer *p = (PorterTokenizer*)pTok;\n    if( p->pTokenizer ){\n      p->tokenizer_v2.xDelete(p->pTokenizer);\n    }\n    sqlite3_free(p);\n  }\n}\n\n/*\n** Create a \"porter\" tokenizer.\n*/\nstatic int fts5PorterCreate(\n  void *pCtx,\n  const char **azArg, int nArg,\n  Fts5Tokenizer **ppOut\n){\n  fts5_api *pApi = (fts5_api*)pCtx;\n  int rc = SQLITE_OK;\n  PorterTokenizer *pRet;\n  void *pUserdata = 0;\n  const char *zBase = \"unicode61\";\n  fts5_tokenizer_v2 *pV2 = 0;\n\n  if( nArg>0 ){\n    zBase = azArg[0];\n  }\n\n  pRet = (PorterTokenizer*)sqlite3_malloc(sizeof(PorterTokenizer));\n  if( pRet ){\n    memset(pRet, 0, sizeof(PorterTokenizer));\n    rc = pApi->xFindTokenizer_v2(pApi, zBase, &pUserdata, &pV2);\n  }else{\n    rc = SQLITE_NOMEM;\n  }\n  if( rc==SQLITE_OK ){\n    int nArg2 = (nArg>0 ? nArg-1 : 0);\n    const char **az2 = (nArg2 ? &azArg[1] : 0);\n    memcpy(&pRet->tokenizer_v2, pV2, sizeof(fts5_tokenizer_v2));\n    rc = pRet->tokenizer_v2.xCreate(pUserdata, az2, nArg2, &pRet->pTokenizer);\n  }\n\n  if( rc!=SQLITE_OK ){\n    fts5PorterDelete((Fts5Tokenizer*)pRet);\n    pRet = 0;\n  }\n  *ppOut = (Fts5Tokenizer*)pRet;\n  return rc;\n}\n\ntypedef struct PorterContext PorterContext;\nstruct PorterContext {\n  void *pCtx;\n  int (*xToken)(void*, int, const char*, int, int, int);\n  char *aBuf;\n};\n\ntypedef struct PorterRule PorterRule;\nstruct PorterRule {\n  const char *zSuffix;\n  int nSuffix;\n  int (*xCond)(char *zStem, int nStem);\n  const char *zOutput;\n  int nOutput;\n};\n\n#if 0\nstatic int fts5PorterApply(char *aBuf, int *pnBuf, PorterRule *aRule){\n  int ret = -1;\n  int nBuf = *pnBuf;\n  PorterRule *p;\n\n  for(p=aRule; p->zSuffix; p++){\n    assert( strlen(p->zSuffix)==p->nSuffix );\n    assert( strlen(p->zOutput)==p->nOutput );\n    if( nBuf<p->nSuffix ) continue;\n    if( 0==memcmp(&aBuf[nBuf - p->nSuffix], p->zSuffix, p->nSuffix) ) break;\n  }\n\n  if( p->zSuffix ){\n    int nStem = nBuf - p->nSuffix;\n    if( p->xCond==0 || p->xCond(aBuf, nStem) ){\n      memcpy(&aBuf[nStem], p->zOutput, p->nOutput);\n      *pnBuf = nStem + p->nOutput;\n      ret = p - aRule;\n    }\n  }\n\n  return ret;\n}\n#endif\n\nstatic int fts5PorterIsVowel(char c, int bYIsVowel){\n  return (\n      c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || (bYIsVowel && c=='y')\n  );\n}\n\nstatic int fts5PorterGobbleVC(char *zStem, int nStem, int bPrevCons){\n  int i;\n  int bCons = bPrevCons;\n\n  /* Scan for a vowel */\n  for(i=0; i<nStem; i++){\n    if( 0==(bCons = !fts5PorterIsVowel(zStem[i], bCons)) ) break;\n  }\n\n  /* Scan for a consonent */\n  for(i++; i<nStem; i++){\n    if( (bCons = !fts5PorterIsVowel(zStem[i], bCons)) ) return i+1;\n  }\n  return 0;\n}\n\n/* porter rule condition: (m > 0) */\nstatic int fts5Porter_MGt0(char *zStem, int nStem){\n  return !!fts5PorterGobbleVC(zStem, nStem, 0);\n}\n\n/* porter rule condition: (m > 1) */\nstatic int fts5Porter_MGt1(char *zStem, int nStem){\n  int n;\n  n = fts5PorterGobbleVC(zStem, nStem, 0);\n  if( n && fts5PorterGobbleVC(&zStem[n], nStem-n, 1) ){\n    return 1;\n  }\n  return 0;\n}\n\n/* porter rule condition: (m = 1) */\nstatic int fts5Porter_MEq1(char *zStem, int nStem){\n  int n;\n  n = fts5PorterGobbleVC(zStem, nStem, 0);\n  if( n && 0==fts5PorterGobbleVC(&zStem[n], nStem-n, 1) ){\n    return 1;\n  }\n  return 0;\n}\n\n/* porter rule condition: (*o) */\nstatic int fts5Porter_Ostar(char *zStem, int nStem){\n  if( zStem[nStem-1]=='w' || zStem[nStem-1]=='x' || zStem[nStem-1]=='y' ){\n    return 0;\n  }else{\n    int i;\n    int mask = 0;\n    int bCons = 0;\n    for(i=0; i<nStem; i++){\n      bCons = !fts5PorterIsVowel(zStem[i], bCons);\n      assert( bCons==0 || bCons==1 );\n      mask = (mask << 1) + bCons;\n    }\n    return ((mask & 0x0007)==0x0005);\n  }\n}\n\n/* porter rule condition: (m > 1 and (*S or *T)) */\nstatic int fts5Porter_MGt1_and_S_or_T(char *zStem, int nStem){\n  assert( nStem>0 );\n  return (zStem[nStem-1]=='s' || zStem[nStem-1]=='t')\n      && fts5Porter_MGt1(zStem, nStem);\n}\n\n/* porter rule condition: (*v*) */\nstatic int fts5Porter_Vowel(char *zStem, int nStem){\n  int i;\n  for(i=0; i<nStem; i++){\n    if( fts5PorterIsVowel(zStem[i], i>0) ){\n      return 1;\n    }\n  }\n  return 0;\n}\n\n\n/**************************************************************************\n***************************************************************************\n** GENERATED CODE STARTS HERE (mkportersteps.tcl)\n*/\n\nstatic int fts5PorterStep4(char *aBuf, int *pnBuf){\n  int ret = 0;\n  int nBuf = *pnBuf;\n  switch( aBuf[nBuf-2] ){\n\n    case 'a':\n      if( nBuf>2 && 0==memcmp(\"al\", &aBuf[nBuf-2], 2) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-2) ){\n          *pnBuf = nBuf - 2;\n        }\n      }\n      break;\n\n    case 'c':\n      if( nBuf>4 && 0==memcmp(\"ance\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"ence\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }\n      break;\n\n    case 'e':\n      if( nBuf>2 && 0==memcmp(\"er\", &aBuf[nBuf-2], 2) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-2) ){\n          *pnBuf = nBuf - 2;\n        }\n      }\n      break;\n\n    case 'i':\n      if( nBuf>2 && 0==memcmp(\"ic\", &aBuf[nBuf-2], 2) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-2) ){\n          *pnBuf = nBuf - 2;\n        }\n      }\n      break;\n\n    case 'l':\n      if( nBuf>4 && 0==memcmp(\"able\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"ible\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }\n      break;\n\n    case 'n':\n      if( nBuf>3 && 0==memcmp(\"ant\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"ement\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-5) ){\n          *pnBuf = nBuf - 5;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"ment\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }else if( nBuf>3 && 0==memcmp(\"ent\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 'o':\n      if( nBuf>3 && 0==memcmp(\"ion\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1_and_S_or_T(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }else if( nBuf>2 && 0==memcmp(\"ou\", &aBuf[nBuf-2], 2) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-2) ){\n          *pnBuf = nBuf - 2;\n        }\n      }\n      break;\n\n    case 's':\n      if( nBuf>3 && 0==memcmp(\"ism\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 't':\n      if( nBuf>3 && 0==memcmp(\"ate\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }else if( nBuf>3 && 0==memcmp(\"iti\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 'u':\n      if( nBuf>3 && 0==memcmp(\"ous\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 'v':\n      if( nBuf>3 && 0==memcmp(\"ive\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 'z':\n      if( nBuf>3 && 0==memcmp(\"ize\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt1(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n  }\n  return ret;\n}\n\n\nstatic int fts5PorterStep1B2(char *aBuf, int *pnBuf){\n  int ret = 0;\n  int nBuf = *pnBuf;\n  switch( aBuf[nBuf-2] ){\n\n    case 'a':\n      if( nBuf>2 && 0==memcmp(\"at\", &aBuf[nBuf-2], 2) ){\n        memcpy(&aBuf[nBuf-2], \"ate\", 3);\n        *pnBuf = nBuf - 2 + 3;\n        ret = 1;\n      }\n      break;\n\n    case 'b':\n      if( nBuf>2 && 0==memcmp(\"bl\", &aBuf[nBuf-2], 2) ){\n        memcpy(&aBuf[nBuf-2], \"ble\", 3);\n        *pnBuf = nBuf - 2 + 3;\n        ret = 1;\n      }\n      break;\n\n    case 'i':\n      if( nBuf>2 && 0==memcmp(\"iz\", &aBuf[nBuf-2], 2) ){\n        memcpy(&aBuf[nBuf-2], \"ize\", 3);\n        *pnBuf = nBuf - 2 + 3;\n        ret = 1;\n      }\n      break;\n\n  }\n  return ret;\n}\n\n\nstatic int fts5PorterStep2(char *aBuf, int *pnBuf){\n  int ret = 0;\n  int nBuf = *pnBuf;\n  switch( aBuf[nBuf-2] ){\n\n    case 'a':\n      if( nBuf>7 && 0==memcmp(\"ational\", &aBuf[nBuf-7], 7) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-7) ){\n          memcpy(&aBuf[nBuf-7], \"ate\", 3);\n          *pnBuf = nBuf - 7 + 3;\n        }\n      }else if( nBuf>6 && 0==memcmp(\"tional\", &aBuf[nBuf-6], 6) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-6) ){\n          memcpy(&aBuf[nBuf-6], \"tion\", 4);\n          *pnBuf = nBuf - 6 + 4;\n        }\n      }\n      break;\n\n    case 'c':\n      if( nBuf>4 && 0==memcmp(\"enci\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"ence\", 4);\n          *pnBuf = nBuf - 4 + 4;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"anci\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"ance\", 4);\n          *pnBuf = nBuf - 4 + 4;\n        }\n      }\n      break;\n\n    case 'e':\n      if( nBuf>4 && 0==memcmp(\"izer\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"ize\", 3);\n          *pnBuf = nBuf - 4 + 3;\n        }\n      }\n      break;\n\n    case 'g':\n      if( nBuf>4 && 0==memcmp(\"logi\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"log\", 3);\n          *pnBuf = nBuf - 4 + 3;\n        }\n      }\n      break;\n\n    case 'l':\n      if( nBuf>3 && 0==memcmp(\"bli\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-3) ){\n          memcpy(&aBuf[nBuf-3], \"ble\", 3);\n          *pnBuf = nBuf - 3 + 3;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"alli\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"al\", 2);\n          *pnBuf = nBuf - 4 + 2;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"entli\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ent\", 3);\n          *pnBuf = nBuf - 5 + 3;\n        }\n      }else if( nBuf>3 && 0==memcmp(\"eli\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-3) ){\n          memcpy(&aBuf[nBuf-3], \"e\", 1);\n          *pnBuf = nBuf - 3 + 1;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"ousli\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ous\", 3);\n          *pnBuf = nBuf - 5 + 3;\n        }\n      }\n      break;\n\n    case 'o':\n      if( nBuf>7 && 0==memcmp(\"ization\", &aBuf[nBuf-7], 7) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-7) ){\n          memcpy(&aBuf[nBuf-7], \"ize\", 3);\n          *pnBuf = nBuf - 7 + 3;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"ation\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ate\", 3);\n          *pnBuf = nBuf - 5 + 3;\n        }\n      }else if( nBuf>4 && 0==memcmp(\"ator\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"ate\", 3);\n          *pnBuf = nBuf - 4 + 3;\n        }\n      }\n      break;\n\n    case 's':\n      if( nBuf>5 && 0==memcmp(\"alism\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"al\", 2);\n          *pnBuf = nBuf - 5 + 2;\n        }\n      }else if( nBuf>7 && 0==memcmp(\"iveness\", &aBuf[nBuf-7], 7) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-7) ){\n          memcpy(&aBuf[nBuf-7], \"ive\", 3);\n          *pnBuf = nBuf - 7 + 3;\n        }\n      }else if( nBuf>7 && 0==memcmp(\"fulness\", &aBuf[nBuf-7], 7) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-7) ){\n          memcpy(&aBuf[nBuf-7], \"ful\", 3);\n          *pnBuf = nBuf - 7 + 3;\n        }\n      }else if( nBuf>7 && 0==memcmp(\"ousness\", &aBuf[nBuf-7], 7) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-7) ){\n          memcpy(&aBuf[nBuf-7], \"ous\", 3);\n          *pnBuf = nBuf - 7 + 3;\n        }\n      }\n      break;\n\n    case 't':\n      if( nBuf>5 && 0==memcmp(\"aliti\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"al\", 2);\n          *pnBuf = nBuf - 5 + 2;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"iviti\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ive\", 3);\n          *pnBuf = nBuf - 5 + 3;\n        }\n      }else if( nBuf>6 && 0==memcmp(\"biliti\", &aBuf[nBuf-6], 6) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-6) ){\n          memcpy(&aBuf[nBuf-6], \"ble\", 3);\n          *pnBuf = nBuf - 6 + 3;\n        }\n      }\n      break;\n\n  }\n  return ret;\n}\n\n\nstatic int fts5PorterStep3(char *aBuf, int *pnBuf){\n  int ret = 0;\n  int nBuf = *pnBuf;\n  switch( aBuf[nBuf-2] ){\n\n    case 'a':\n      if( nBuf>4 && 0==memcmp(\"ical\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          memcpy(&aBuf[nBuf-4], \"ic\", 2);\n          *pnBuf = nBuf - 4 + 2;\n        }\n      }\n      break;\n\n    case 's':\n      if( nBuf>4 && 0==memcmp(\"ness\", &aBuf[nBuf-4], 4) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-4) ){\n          *pnBuf = nBuf - 4;\n        }\n      }\n      break;\n\n    case 't':\n      if( nBuf>5 && 0==memcmp(\"icate\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ic\", 2);\n          *pnBuf = nBuf - 5 + 2;\n        }\n      }else if( nBuf>5 && 0==memcmp(\"iciti\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"ic\", 2);\n          *pnBuf = nBuf - 5 + 2;\n        }\n      }\n      break;\n\n    case 'u':\n      if( nBuf>3 && 0==memcmp(\"ful\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n        }\n      }\n      break;\n\n    case 'v':\n      if( nBuf>5 && 0==memcmp(\"ative\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          *pnBuf = nBuf - 5;\n        }\n      }\n      break;\n\n    case 'z':\n      if( nBuf>5 && 0==memcmp(\"alize\", &aBuf[nBuf-5], 5) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-5) ){\n          memcpy(&aBuf[nBuf-5], \"al\", 2);\n          *pnBuf = nBuf - 5 + 2;\n        }\n      }\n      break;\n\n  }\n  return ret;\n}\n\n\nstatic int fts5PorterStep1B(char *aBuf, int *pnBuf){\n  int ret = 0;\n  int nBuf = *pnBuf;\n  switch( aBuf[nBuf-2] ){\n\n    case 'e':\n      if( nBuf>3 && 0==memcmp(\"eed\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_MGt0(aBuf, nBuf-3) ){\n          memcpy(&aBuf[nBuf-3], \"ee\", 2);\n          *pnBuf = nBuf - 3 + 2;\n        }\n      }else if( nBuf>2 && 0==memcmp(\"ed\", &aBuf[nBuf-2], 2) ){\n        if( fts5Porter_Vowel(aBuf, nBuf-2) ){\n          *pnBuf = nBuf - 2;\n          ret = 1;\n        }\n      }\n      break;\n\n    case 'n':\n      if( nBuf>3 && 0==memcmp(\"ing\", &aBuf[nBuf-3], 3) ){\n        if( fts5Porter_Vowel(aBuf, nBuf-3) ){\n          *pnBuf = nBuf - 3;\n          ret = 1;\n        }\n      }\n      break;\n\n  }\n  return ret;\n}\n\n/*\n** GENERATED CODE ENDS HERE (mkportersteps.tcl)\n***************************************************************************\n**************************************************************************/\n\nstatic void fts5PorterStep1A(char *aBuf, int *pnBuf){\n  int nBuf = *pnBuf;\n  if( aBuf[nBuf-1]=='s' ){\n    if( aBuf[nBuf-2]=='e' ){\n      if( (nBuf>4 && aBuf[nBuf-4]=='s' && aBuf[nBuf-3]=='s')\n       || (nBuf>3 && aBuf[nBuf-3]=='i' )\n      ){\n        *pnBuf = nBuf-2;\n      }else{\n        *pnBuf = nBuf-1;\n      }\n    }\n    else if( aBuf[nBuf-2]!='s' ){\n      *pnBuf = nBuf-1;\n    }\n  }\n}\n\nstatic int fts5PorterCb(\n  void *pCtx,\n  int tflags,\n  const char *pToken,\n  int nToken,\n  int iStart,\n  int iEnd\n){\n  PorterContext *p = (PorterContext*)pCtx;\n\n  char *aBuf;\n  int nBuf;\n\n  if( nToken>FTS5_PORTER_MAX_TOKEN || nToken<3 ) goto pass_through;\n  aBuf = p->aBuf;\n  nBuf = nToken;\n  memcpy(aBuf, pToken, nBuf);\n\n  /* Step 1. */\n  fts5PorterStep1A(aBuf, &nBuf);\n  if( fts5PorterStep1B(aBuf, &nBuf) ){\n    if( fts5PorterStep1B2(aBuf, &nBuf)==0 ){\n      char c = aBuf[nBuf-1];\n      if( fts5PorterIsVowel(c, 0)==0\n       && c!='l' && c!='s' && c!='z' && c==aBuf[nBuf-2]\n      ){\n        nBuf--;\n      }else if( fts5Porter_MEq1(aBuf, nBuf) && fts5Porter_Ostar(aBuf, nBuf) ){\n        aBuf[nBuf++] = 'e';\n      }\n    }\n  }\n\n  /* Step 1C. */\n  if( aBuf[nBuf-1]=='y' && fts5Porter_Vowel(aBuf, nBuf-1) ){\n    aBuf[nBuf-1] = 'i';\n  }\n\n  /* Steps 2 through 4. */\n  fts5PorterStep2(aBuf, &nBuf);\n  fts5PorterStep3(aBuf, &nBuf);\n  fts5PorterStep4(aBuf, &nBuf);\n\n  /* Step 5a. */\n  assert( nBuf>0 );\n  if( aBuf[nBuf-1]=='e' ){\n    if( fts5Porter_MGt1(aBuf, nBuf-1)\n     || (fts5Porter_MEq1(aBuf, nBuf-1) && !fts5Porter_Ostar(aBuf, nBuf-1))\n    ){\n      nBuf--;\n    }\n  }\n\n  /* Step 5b. */\n  if( nBuf>1 && aBuf[nBuf-1]=='l'\n   && aBuf[nBuf-2]=='l' && fts5Porter_MGt1(aBuf, nBuf-1)\n  ){\n    nBuf--;\n  }\n\n  return p->xToken(p->pCtx, tflags, aBuf, nBuf, iStart, iEnd);\n\n pass_through:\n  return p->xToken(p->pCtx, tflags, pToken, nToken, iStart, iEnd);\n}\n\n/*\n** Tokenize using the porter tokenizer.\n*/\nstatic int fts5PorterTokenize(\n  Fts5Tokenizer *pTokenizer,\n  void *pCtx,\n  int flags,\n  const char *pText, int nText,\n  const char *pLoc, int nLoc,\n  int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)\n){\n  PorterTokenizer *p = (PorterTokenizer*)pTokenizer;\n  PorterContext sCtx;\n  sCtx.xToken = xToken;\n  sCtx.pCtx = pCtx;\n  sCtx.aBuf = p->aBuf;\n  return p->tokenizer_v2.xTokenize(\n      p->pTokenizer, (void*)&sCtx, flags, pText, nText, pLoc, nLoc, fts5PorterCb\n  );\n}\n\n/**************************************************************************\n** Start of trigram implementation.\n*/\ntypedef struct TrigramTokenizer TrigramTokenizer;\nstruct TrigramTokenizer {\n  int bFold;                      /* True to fold to lower-case */\n  int iFoldParam;                 /* Parameter to pass to Fts5UnicodeFold() */\n};\n\n/*\n** Free a trigram tokenizer.\n*/\nstatic void fts5TriDelete(Fts5Tokenizer *p){\n  sqlite3_free(p);\n}\n\n/*\n** Allocate a trigram tokenizer.\n*/\nstatic int fts5TriCreate(\n  void *pUnused,\n  const char **azArg,\n  int nArg,\n  Fts5Tokenizer **ppOut\n){\n  int rc = SQLITE_OK;\n  TrigramTokenizer *pNew = 0;\n  UNUSED_PARAM(pUnused);\n  if( nArg%2 ){\n    rc = SQLITE_ERROR;\n  }else{\n    int i;\n    pNew = (TrigramTokenizer*)sqlite3_malloc(sizeof(*pNew));\n    if( pNew==0 ){\n      rc = SQLITE_NOMEM;\n    }else{\n      pNew->bFold = 1;\n      pNew->iFoldParam = 0;\n\n      for(i=0; rc==SQLITE_OK && i<nArg; i+=2){\n        const char *zArg = azArg[i+1];\n        if( 0==sqlite3_stricmp(azArg[i], \"case_sensitive\") ){\n          if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1] ){\n            rc = SQLITE_ERROR;\n          }else{\n            pNew->bFold = (zArg[0]=='0');\n          }\n        }else if( 0==sqlite3_stricmp(azArg[i], \"remove_diacritics\") ){\n          if( (zArg[0]!='0' && zArg[0]!='1' && zArg[0]!='2') || zArg[1] ){\n            rc = SQLITE_ERROR;\n          }else{\n            pNew->iFoldParam = (zArg[0]!='0') ? 2 : 0;\n          }\n        }else{\n          rc = SQLITE_ERROR;\n        }\n      }\n\n      if( pNew->iFoldParam!=0 && pNew->bFold==0 ){\n        rc = SQLITE_ERROR;\n      }\n\n      if( rc!=SQLITE_OK ){\n        fts5TriDelete((Fts5Tokenizer*)pNew);\n        pNew = 0;\n      }\n    }\n  }\n  *ppOut = (Fts5Tokenizer*)pNew;\n  return rc;\n}\n\n/*\n** Trigram tokenizer tokenize routine.\n*/\nstatic int fts5TriTokenize(\n  Fts5Tokenizer *pTok,\n  void *pCtx,\n  int unusedFlags,\n  const char *pText, int nText,\n  int (*xToken)(void*, int, const char*, int, int, int)\n){\n  TrigramTokenizer *p = (TrigramTokenizer*)pTok;\n  int rc = SQLITE_OK;\n  char aBuf[32];\n  char *zOut = aBuf;\n  int ii;\n  const unsigned char *zIn = (const unsigned char*)pText;\n  const unsigned char *zEof = (zIn ? &zIn[nText] : 0);\n  u32 iCode = 0;\n  int aStart[3];                  /* Input offset of each character in aBuf[] */\n\n  UNUSED_PARAM(unusedFlags);\n\n  /* Populate aBuf[] with the characters for the first trigram. */\n  for(ii=0; ii<3; ii++){\n    do {\n      aStart[ii] = zIn - (const unsigned char*)pText;\n      if( zIn>=zEof ) return SQLITE_OK;\n      READ_UTF8(zIn, zEof, iCode);\n      if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);\n    }while( iCode==0 );\n    WRITE_UTF8(zOut, iCode);\n  }\n\n  /* At the start of each iteration of this loop:\n  **\n  **  aBuf:      Contains 3 characters. The 3 characters of the next trigram.\n  **  zOut:      Points to the byte following the last character in aBuf.\n  **  aStart[3]: Contains the byte offset in the input text corresponding\n  **             to the start of each of the three characters in the buffer.\n  */\n  assert( zIn<=zEof );\n  while( 1 ){\n    int iNext;                    /* Start of character following current tri */\n    const char *z1;\n\n    /* Read characters from the input up until the first non-diacritic */\n    do {\n      iNext = zIn - (const unsigned char*)pText;\n      if( zIn>=zEof ){\n        iCode = 0;\n        break;\n      }\n      READ_UTF8(zIn, zEof, iCode);\n      if( p->bFold ) iCode = sqlite3Fts5UnicodeFold(iCode, p->iFoldParam);\n    }while( iCode==0 );\n\n    /* Pass the current trigram back to fts5 */\n    rc = xToken(pCtx, 0, aBuf, zOut-aBuf, aStart[0], iNext);\n    if( iCode==0 || rc!=SQLITE_OK ) break;\n\n    /* Remove the first character from buffer aBuf[]. Append the character\n    ** with codepoint iCode.  */\n    z1 = aBuf;\n    FTS5_SKIP_UTF8(z1);\n    memmove(aBuf, z1, zOut - z1);\n    zOut -= (z1 - aBuf);\n    WRITE_UTF8(zOut, iCode);\n\n    /* Update the aStart[] array */\n    aStart[0] = aStart[1];\n    aStart[1] = aStart[2];\n    aStart[2] = iNext;\n  }\n\n  return rc;\n}\n\n/*\n** Argument xCreate is a pointer to a constructor function for a tokenizer.\n** pTok is a tokenizer previously created using the same method. This function\n** returns one of FTS5_PATTERN_NONE, FTS5_PATTERN_LIKE or FTS5_PATTERN_GLOB\n** indicating the style of pattern matching that the tokenizer can support.\n** In practice, this is:\n**\n**     \"trigram\" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB\n**     \"trigram\" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE\n**     all other tokenizers - FTS5_PATTERN_NONE\n*/\nstatic int sqlite3Fts5TokenizerPattern(\n    int (*xCreate)(void*, const char**, int, Fts5Tokenizer**),\n    Fts5Tokenizer *pTok\n){\n  if( xCreate==fts5TriCreate ){\n    TrigramTokenizer *p = (TrigramTokenizer*)pTok;\n    if( p->iFoldParam==0 ){\n      return p->bFold ? FTS5_PATTERN_LIKE : FTS5_PATTERN_GLOB;\n    }\n  }\n  return FTS5_PATTERN_NONE;\n}\n\n/*\n** Return true if the tokenizer described by p->azArg[] is the trigram\n** tokenizer. This tokenizer needs to be loaded before xBestIndex is\n** called for the first time in order to correctly handle LIKE/GLOB.\n*/\nstatic int sqlite3Fts5TokenizerPreload(Fts5TokenizerConfig *p){\n  return (p->nArg>=1 && 0==sqlite3_stricmp(p->azArg[0], \"trigram\"));\n}\n\n\n/*\n** Register all built-in tokenizers with FTS5.\n*/\nstatic int sqlite3Fts5TokenizerInit(fts5_api *pApi){\n  struct BuiltinTokenizer {\n    const char *zName;\n    fts5_tokenizer x;\n  } aBuiltin[] = {\n    { \"unicode61\", {fts5UnicodeCreate, fts5UnicodeDelete, fts5UnicodeTokenize}},\n    { \"ascii\",     {fts5AsciiCreate, fts5AsciiDelete, fts5AsciiTokenize }},\n    { \"trigram\",   {fts5TriCreate, fts5TriDelete, fts5TriTokenize}},\n  };\n\n  int rc = SQLITE_OK;             /* Return code */\n  int i;                          /* To iterate through builtin functions */\n\n  for(i=0; rc==SQLITE_OK && i<ArraySize(aBuiltin); i++){\n    rc = pApi->xCreateTokenizer(pApi,\n        aBuiltin[i].zName,\n        (void*)pApi,\n        &aBuiltin[i].x,\n        0\n    );\n  }\n  if( rc==SQLITE_OK ){\n    fts5_tokenizer_v2 sPorter = {\n      2,\n      fts5PorterCreate,\n      fts5PorterDelete,\n      fts5PorterTokenize\n    };\n    rc = pApi->xCreateTokenizer_v2(pApi,\n        \"porter\",\n        (void*)pApi,\n        &sPorter,\n        0\n    );\n  }\n  return rc;\n}\n\n/*\n** 2012-05-25\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n*/\n\n/*\n** DO NOT EDIT THIS MACHINE GENERATED FILE.\n*/\n\n\n/* #include <assert.h> */\n\n\n\n/*\n** If the argument is a codepoint corresponding to a lowercase letter\n** in the ASCII range with a diacritic added, return the codepoint\n** of the ASCII letter only. For example, if passed 235 - \"LATIN\n** SMALL LETTER E WITH DIAERESIS\" - return 65 (\"LATIN SMALL LETTER\n** E\"). The resuls of passing a codepoint that corresponds to an\n** uppercase letter are undefined.\n*/\nstatic int fts5_remove_diacritic(int c, int bComplex){\n  unsigned short aDia[] = {\n        0,  1797,  1848,  1859,  1891,  1928,  1940,  1995,\n     2024,  2040,  2060,  2110,  2168,  2206,  2264,  2286,\n     2344,  2383,  2472,  2488,  2516,  2596,  2668,  2732,\n     2782,  2842,  2894,  2954,  2984,  3000,  3028,  3336,\n     3456,  3696,  3712,  3728,  3744,  3766,  3832,  3896,\n     3912,  3928,  3944,  3968,  4008,  4040,  4056,  4106,\n     4138,  4170,  4202,  4234,  4266,  4296,  4312,  4344,\n     4408,  4424,  4442,  4472,  4488,  4504,  6148,  6198,\n     6264,  6280,  6360,  6429,  6505,  6529, 61448, 61468,\n    61512, 61534, 61592, 61610, 61642, 61672, 61688, 61704,\n    61726, 61784, 61800, 61816, 61836, 61880, 61896, 61914,\n    61948, 61998, 62062, 62122, 62154, 62184, 62200, 62218,\n    62252, 62302, 62364, 62410, 62442, 62478, 62536, 62554,\n    62584, 62604, 62640, 62648, 62656, 62664, 62730, 62766,\n    62830, 62890, 62924, 62974, 63032, 63050, 63082, 63118,\n    63182, 63242, 63274, 63310, 63368, 63390,\n  };\n#define HIBIT ((unsigned char)0x80)\n  unsigned char aChar[] = {\n    '\\0',      'a',       'c',       'e',       'i',       'n',\n    'o',       'u',       'y',       'y',       'a',       'c',\n    'd',       'e',       'e',       'g',       'h',       'i',\n    'j',       'k',       'l',       'n',       'o',       'r',\n    's',       't',       'u',       'u',       'w',       'y',\n    'z',       'o',       'u',       'a',       'i',       'o',\n    'u',       'u'|HIBIT, 'a'|HIBIT, 'g',       'k',       'o',\n    'o'|HIBIT, 'j',       'g',       'n',       'a'|HIBIT, 'a',\n    'e',       'i',       'o',       'r',       'u',       's',\n    't',       'h',       'a',       'e',       'o'|HIBIT, 'o',\n    'o'|HIBIT, 'y',       '\\0',      '\\0',      '\\0',      '\\0',\n    '\\0',      '\\0',      '\\0',      '\\0',      'a',       'b',\n    'c'|HIBIT, 'd',       'd',       'e'|HIBIT, 'e',       'e'|HIBIT,\n    'f',       'g',       'h',       'h',       'i',       'i'|HIBIT,\n    'k',       'l',       'l'|HIBIT, 'l',       'm',       'n',\n    'o'|HIBIT, 'p',       'r',       'r'|HIBIT, 'r',       's',\n    's'|HIBIT, 't',       'u',       'u'|HIBIT, 'v',       'w',\n    'w',       'x',       'y',       'z',       'h',       't',\n    'w',       'y',       'a',       'a'|HIBIT, 'a'|HIBIT, 'a'|HIBIT,\n    'e',       'e'|HIBIT, 'e'|HIBIT, 'i',       'o',       'o'|HIBIT,\n    'o'|HIBIT, 'o'|HIBIT, 'u',       'u'|HIBIT, 'u'|HIBIT, 'y',\n  };\n\n  unsigned int key = (((unsigned int)c)<<3) | 0x00000007;\n  int iRes = 0;\n  int iHi = sizeof(aDia)/sizeof(aDia[0]) - 1;\n  int iLo = 0;\n  while( iHi>=iLo ){\n    int iTest = (iHi + iLo) / 2;\n    if( key >= aDia[iTest] ){\n      iRes = iTest;\n      iLo = iTest+1;\n    }else{\n      iHi = iTest-1;\n    }\n  }\n  assert( key>=aDia[iRes] );\n  if( bComplex==0 && (aChar[iRes] & 0x80) ) return c;\n  return (c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : ((int)aChar[iRes] & 0x7F);\n}\n\n\n/*\n** Return true if the argument interpreted as a unicode codepoint\n** is a diacritical modifier character.\n*/\nstatic int sqlite3Fts5UnicodeIsdiacritic(int c){\n  unsigned int mask0 = 0x08029FDF;\n  unsigned int mask1 = 0x000361F8;\n  if( c<768 || c>817 ) return 0;\n  return (c < 768+32) ?\n      (mask0 & ((unsigned int)1 << (c-768))) :\n      (mask1 & ((unsigned int)1 << (c-768-32)));\n}\n\n\n/*\n** Interpret the argument as a unicode codepoint. If the codepoint\n** is an upper case character that has a lower case equivalent,\n** return the codepoint corresponding to the lower case version.\n** Otherwise, return a copy of the argument.\n**\n** The results are undefined if the value passed to this function\n** is less than zero.\n*/\nstatic int sqlite3Fts5UnicodeFold(int c, int eRemoveDiacritic){\n  /* Each entry in the following array defines a rule for folding a range\n  ** of codepoints to lower case. The rule applies to a range of nRange\n  ** codepoints starting at codepoint iCode.\n  **\n  ** If the least significant bit in flags is clear, then the rule applies\n  ** to all nRange codepoints (i.e. all nRange codepoints are upper case and\n  ** need to be folded). Or, if it is set, then the rule only applies to\n  ** every second codepoint in the range, starting with codepoint C.\n  **\n  ** The 7 most significant bits in flags are an index into the aiOff[]\n  ** array. If a specific codepoint C does require folding, then its lower\n  ** case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF).\n  **\n  ** The contents of this array are generated by parsing the CaseFolding.txt\n  ** file distributed as part of the \"Unicode Character Database\". See\n  ** http://www.unicode.org for details.\n  */\n  static const struct TableEntry {\n    unsigned short iCode;\n    unsigned char flags;\n    unsigned char nRange;\n  } aEntry[] = {\n    {65, 14, 26},          {181, 64, 1},          {192, 14, 23},\n    {216, 14, 7},          {256, 1, 48},          {306, 1, 6},\n    {313, 1, 16},          {330, 1, 46},          {376, 116, 1},\n    {377, 1, 6},           {383, 104, 1},         {385, 50, 1},\n    {386, 1, 4},           {390, 44, 1},          {391, 0, 1},\n    {393, 42, 2},          {395, 0, 1},           {398, 32, 1},\n    {399, 38, 1},          {400, 40, 1},          {401, 0, 1},\n    {403, 42, 1},          {404, 46, 1},          {406, 52, 1},\n    {407, 48, 1},          {408, 0, 1},           {412, 52, 1},\n    {413, 54, 1},          {415, 56, 1},          {416, 1, 6},\n    {422, 60, 1},          {423, 0, 1},           {425, 60, 1},\n    {428, 0, 1},           {430, 60, 1},          {431, 0, 1},\n    {433, 58, 2},          {435, 1, 4},           {439, 62, 1},\n    {440, 0, 1},           {444, 0, 1},           {452, 2, 1},\n    {453, 0, 1},           {455, 2, 1},           {456, 0, 1},\n    {458, 2, 1},           {459, 1, 18},          {478, 1, 18},\n    {497, 2, 1},           {498, 1, 4},           {502, 122, 1},\n    {503, 134, 1},         {504, 1, 40},          {544, 110, 1},\n    {546, 1, 18},          {570, 70, 1},          {571, 0, 1},\n    {573, 108, 1},         {574, 68, 1},          {577, 0, 1},\n    {579, 106, 1},         {580, 28, 1},          {581, 30, 1},\n    {582, 1, 10},          {837, 36, 1},          {880, 1, 4},\n    {886, 0, 1},           {902, 18, 1},          {904, 16, 3},\n    {908, 26, 1},          {910, 24, 2},          {913, 14, 17},\n    {931, 14, 9},          {962, 0, 1},           {975, 4, 1},\n    {976, 140, 1},         {977, 142, 1},         {981, 146, 1},\n    {982, 144, 1},         {984, 1, 24},          {1008, 136, 1},\n    {1009, 138, 1},        {1012, 130, 1},        {1013, 128, 1},\n    {1015, 0, 1},          {1017, 152, 1},        {1018, 0, 1},\n    {1021, 110, 3},        {1024, 34, 16},        {1040, 14, 32},\n    {1120, 1, 34},         {1162, 1, 54},         {1216, 6, 1},\n    {1217, 1, 14},         {1232, 1, 88},         {1329, 22, 38},\n    {4256, 66, 38},        {4295, 66, 1},         {4301, 66, 1},\n    {7680, 1, 150},        {7835, 132, 1},        {7838, 96, 1},\n    {7840, 1, 96},         {7944, 150, 8},        {7960, 150, 6},\n    {7976, 150, 8},        {7992, 150, 8},        {8008, 150, 6},\n    {8025, 151, 8},        {8040, 150, 8},        {8072, 150, 8},\n    {8088, 150, 8},        {8104, 150, 8},        {8120, 150, 2},\n    {8122, 126, 2},        {8124, 148, 1},        {8126, 100, 1},\n    {8136, 124, 4},        {8140, 148, 1},        {8152, 150, 2},\n    {8154, 120, 2},        {8168, 150, 2},        {8170, 118, 2},\n    {8172, 152, 1},        {8184, 112, 2},        {8186, 114, 2},\n    {8188, 148, 1},        {8486, 98, 1},         {8490, 92, 1},\n    {8491, 94, 1},         {8498, 12, 1},         {8544, 8, 16},\n    {8579, 0, 1},          {9398, 10, 26},        {11264, 22, 47},\n    {11360, 0, 1},         {11362, 88, 1},        {11363, 102, 1},\n    {11364, 90, 1},        {11367, 1, 6},         {11373, 84, 1},\n    {11374, 86, 1},        {11375, 80, 1},        {11376, 82, 1},\n    {11378, 0, 1},         {11381, 0, 1},         {11390, 78, 2},\n    {11392, 1, 100},       {11499, 1, 4},         {11506, 0, 1},\n    {42560, 1, 46},        {42624, 1, 24},        {42786, 1, 14},\n    {42802, 1, 62},        {42873, 1, 4},         {42877, 76, 1},\n    {42878, 1, 10},        {42891, 0, 1},         {42893, 74, 1},\n    {42896, 1, 4},         {42912, 1, 10},        {42922, 72, 1},\n    {65313, 14, 26},\n  };\n  static const unsigned short aiOff[] = {\n   1,     2,     8,     15,    16,    26,    28,    32,\n   37,    38,    40,    48,    63,    64,    69,    71,\n   79,    80,    116,   202,   203,   205,   206,   207,\n   209,   210,   211,   213,   214,   217,   218,   219,\n   775,   7264,  10792, 10795, 23228, 23256, 30204, 54721,\n   54753, 54754, 54756, 54787, 54793, 54809, 57153, 57274,\n   57921, 58019, 58363, 61722, 65268, 65341, 65373, 65406,\n   65408, 65410, 65415, 65424, 65436, 65439, 65450, 65462,\n   65472, 65476, 65478, 65480, 65482, 65488, 65506, 65511,\n   65514, 65521, 65527, 65528, 65529,\n  };\n\n  int ret = c;\n\n  assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );\n\n  if( c<128 ){\n    if( c>='A' && c<='Z' ) ret = c + ('a' - 'A');\n  }else if( c<65536 ){\n    const struct TableEntry *p;\n    int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;\n    int iLo = 0;\n    int iRes = -1;\n\n    assert( c>aEntry[0].iCode );\n    while( iHi>=iLo ){\n      int iTest = (iHi + iLo) / 2;\n      int cmp = (c - aEntry[iTest].iCode);\n      if( cmp>=0 ){\n        iRes = iTest;\n        iLo = iTest+1;\n      }else{\n        iHi = iTest-1;\n      }\n    }\n\n    assert( iRes>=0 && c>=aEntry[iRes].iCode );\n    p = &aEntry[iRes];\n    if( c<(p->iCode + p->nRange) && 0==(0x01 & p->flags & (p->iCode ^ c)) ){\n      ret = (c + (aiOff[p->flags>>1])) & 0x0000FFFF;\n      assert( ret>0 );\n    }\n\n    if( eRemoveDiacritic ){\n      ret = fts5_remove_diacritic(ret, eRemoveDiacritic==2);\n    }\n  }\n\n  else if( c>=66560 && c<66600 ){\n    ret = c + 40;\n  }\n\n  return ret;\n}\n\n\nstatic int sqlite3Fts5UnicodeCatParse(const char *zCat, u8 *aArray){\n  aArray[0] = 1;\n  switch( zCat[0] ){\n    case 'C':\n          switch( zCat[1] ){\n            case 'c': aArray[1] = 1; break;\n            case 'f': aArray[2] = 1; break;\n            case 'n': aArray[3] = 1; break;\n            case 's': aArray[4] = 1; break;\n            case 'o': aArray[31] = 1; break;\n            case '*':\n              aArray[1] = 1;\n              aArray[2] = 1;\n              aArray[3] = 1;\n              aArray[4] = 1;\n              aArray[31] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'L':\n          switch( zCat[1] ){\n            case 'l': aArray[5] = 1; break;\n            case 'm': aArray[6] = 1; break;\n            case 'o': aArray[7] = 1; break;\n            case 't': aArray[8] = 1; break;\n            case 'u': aArray[9] = 1; break;\n            case 'C': aArray[30] = 1; break;\n            case '*':\n              aArray[5] = 1;\n              aArray[6] = 1;\n              aArray[7] = 1;\n              aArray[8] = 1;\n              aArray[9] = 1;\n              aArray[30] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'M':\n          switch( zCat[1] ){\n            case 'c': aArray[10] = 1; break;\n            case 'e': aArray[11] = 1; break;\n            case 'n': aArray[12] = 1; break;\n            case '*':\n              aArray[10] = 1;\n              aArray[11] = 1;\n              aArray[12] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'N':\n          switch( zCat[1] ){\n            case 'd': aArray[13] = 1; break;\n            case 'l': aArray[14] = 1; break;\n            case 'o': aArray[15] = 1; break;\n            case '*':\n              aArray[13] = 1;\n              aArray[14] = 1;\n              aArray[15] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'P':\n          switch( zCat[1] ){\n            case 'c': aArray[16] = 1; break;\n            case 'd': aArray[17] = 1; break;\n            case 'e': aArray[18] = 1; break;\n            case 'f': aArray[19] = 1; break;\n            case 'i': aArray[20] = 1; break;\n            case 'o': aArray[21] = 1; break;\n            case 's': aArray[22] = 1; break;\n            case '*':\n              aArray[16] = 1;\n              aArray[17] = 1;\n              aArray[18] = 1;\n              aArray[19] = 1;\n              aArray[20] = 1;\n              aArray[21] = 1;\n              aArray[22] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'S':\n          switch( zCat[1] ){\n            case 'c': aArray[23] = 1; break;\n            case 'k': aArray[24] = 1; break;\n            case 'm': aArray[25] = 1; break;\n            case 'o': aArray[26] = 1; break;\n            case '*':\n              aArray[23] = 1;\n              aArray[24] = 1;\n              aArray[25] = 1;\n              aArray[26] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n    case 'Z':\n          switch( zCat[1] ){\n            case 'l': aArray[27] = 1; break;\n            case 'p': aArray[28] = 1; break;\n            case 's': aArray[29] = 1; break;\n            case '*':\n              aArray[27] = 1;\n              aArray[28] = 1;\n              aArray[29] = 1;\n              break;\n            default: return 1;          }\n          break;\n\n\n    default:\n      return 1;\n  }\n  return 0;\n}\n\nstatic u16 aFts5UnicodeBlock[] = {\n    0,     1471,  1753,  1760,  1760,  1760,  1760,  1760,  1760,  1760,\n    1760,  1760,  1760,  1760,  1760,  1763,  1765,\n  };\nstatic u16 aFts5UnicodeMap[] = {\n    0,     32,    33,    36,    37,    40,    41,    42,    43,    44,\n    45,    46,    48,    58,    60,    63,    65,    91,    92,    93,\n    94,    95,    96,    97,    123,   124,   125,   126,   127,   160,\n    161,   162,   166,   167,   168,   169,   170,   171,   172,   173,\n    174,   175,   176,   177,   178,   180,   181,   182,   184,   185,\n    186,   187,   188,   191,   192,   215,   216,   223,   247,   248,\n    256,   312,   313,   329,   330,   377,   383,   385,   387,   388,\n    391,   394,   396,   398,   402,   403,   405,   406,   409,   412,\n    414,   415,   417,   418,   423,   427,   428,   431,   434,   436,\n    437,   440,   442,   443,   444,   446,   448,   452,   453,   454,\n    455,   456,   457,   458,   459,   460,   461,   477,   478,   496,\n    497,   498,   499,   500,   503,   505,   506,   564,   570,   572,\n    573,   575,   577,   580,   583,   584,   592,   660,   661,   688,\n    706,   710,   722,   736,   741,   748,   749,   750,   751,   768,\n    880,   884,   885,   886,   890,   891,   894,   900,   902,   903,\n    904,   908,   910,   912,   913,   931,   940,   975,   977,   978,\n    981,   984,   1008,  1012,  1014,  1015,  1018,  1020,  1021,  1072,\n    1120,  1154,  1155,  1160,  1162,  1217,  1231,  1232,  1329,  1369,\n    1370,  1377,  1417,  1418,  1423,  1425,  1470,  1471,  1472,  1473,\n    1475,  1476,  1478,  1479,  1488,  1520,  1523,  1536,  1542,  1545,\n    1547,  1548,  1550,  1552,  1563,  1566,  1568,  1600,  1601,  1611,\n    1632,  1642,  1646,  1648,  1649,  1748,  1749,  1750,  1757,  1758,\n    1759,  1765,  1767,  1769,  1770,  1774,  1776,  1786,  1789,  1791,\n    1792,  1807,  1808,  1809,  1810,  1840,  1869,  1958,  1969,  1984,\n    1994,  2027,  2036,  2038,  2039,  2042,  2048,  2070,  2074,  2075,\n    2084,  2085,  2088,  2089,  2096,  2112,  2137,  2142,  2208,  2210,\n    2276,  2304,  2307,  2308,  2362,  2363,  2364,  2365,  2366,  2369,\n    2377,  2381,  2382,  2384,  2385,  2392,  2402,  2404,  2406,  2416,\n    2417,  2418,  2425,  2433,  2434,  2437,  2447,  2451,  2474,  2482,\n    2486,  2492,  2493,  2494,  2497,  2503,  2507,  2509,  2510,  2519,\n    2524,  2527,  2530,  2534,  2544,  2546,  2548,  2554,  2555,  2561,\n    2563,  2565,  2575,  2579,  2602,  2610,  2613,  2616,  2620,  2622,\n    2625,  2631,  2635,  2641,  2649,  2654,  2662,  2672,  2674,  2677,\n    2689,  2691,  2693,  2703,  2707,  2730,  2738,  2741,  2748,  2749,\n    2750,  2753,  2759,  2761,  2763,  2765,  2768,  2784,  2786,  2790,\n    2800,  2801,  2817,  2818,  2821,  2831,  2835,  2858,  2866,  2869,\n    2876,  2877,  2878,  2879,  2880,  2881,  2887,  2891,  2893,  2902,\n    2903,  2908,  2911,  2914,  2918,  2928,  2929,  2930,  2946,  2947,\n    2949,  2958,  2962,  2969,  2972,  2974,  2979,  2984,  2990,  3006,\n    3008,  3009,  3014,  3018,  3021,  3024,  3031,  3046,  3056,  3059,\n    3065,  3066,  3073,  3077,  3086,  3090,  3114,  3125,  3133,  3134,\n    3137,  3142,  3146,  3157,  3160,  3168,  3170,  3174,  3192,  3199,\n    3202,  3205,  3214,  3218,  3242,  3253,  3260,  3261,  3262,  3263,\n    3264,  3270,  3271,  3274,  3276,  3285,  3294,  3296,  3298,  3302,\n    3313,  3330,  3333,  3342,  3346,  3389,  3390,  3393,  3398,  3402,\n    3405,  3406,  3415,  3424,  3426,  3430,  3440,  3449,  3450,  3458,\n    3461,  3482,  3507,  3517,  3520,  3530,  3535,  3538,  3542,  3544,\n    3570,  3572,  3585,  3633,  3634,  3636,  3647,  3648,  3654,  3655,\n    3663,  3664,  3674,  3713,  3716,  3719,  3722,  3725,  3732,  3737,\n    3745,  3749,  3751,  3754,  3757,  3761,  3762,  3764,  3771,  3773,\n    3776,  3782,  3784,  3792,  3804,  3840,  3841,  3844,  3859,  3860,\n    3861,  3864,  3866,  3872,  3882,  3892,  3893,  3894,  3895,  3896,\n    3897,  3898,  3899,  3900,  3901,  3902,  3904,  3913,  3953,  3967,\n    3968,  3973,  3974,  3976,  3981,  3993,  4030,  4038,  4039,  4046,\n    4048,  4053,  4057,  4096,  4139,  4141,  4145,  4146,  4152,  4153,\n    4155,  4157,  4159,  4160,  4170,  4176,  4182,  4184,  4186,  4190,\n    4193,  4194,  4197,  4199,  4206,  4209,  4213,  4226,  4227,  4229,\n    4231,  4237,  4238,  4239,  4240,  4250,  4253,  4254,  4256,  4295,\n    4301,  4304,  4347,  4348,  4349,  4682,  4688,  4696,  4698,  4704,\n    4746,  4752,  4786,  4792,  4800,  4802,  4808,  4824,  4882,  4888,\n    4957,  4960,  4969,  4992,  5008,  5024,  5120,  5121,  5741,  5743,\n    5760,  5761,  5787,  5788,  5792,  5867,  5870,  5888,  5902,  5906,\n    5920,  5938,  5941,  5952,  5970,  5984,  5998,  6002,  6016,  6068,\n    6070,  6071,  6078,  6086,  6087,  6089,  6100,  6103,  6104,  6107,\n    6108,  6109,  6112,  6128,  6144,  6150,  6151,  6155,  6158,  6160,\n    6176,  6211,  6212,  6272,  6313,  6314,  6320,  6400,  6432,  6435,\n    6439,  6441,  6448,  6450,  6451,  6457,  6464,  6468,  6470,  6480,\n    6512,  6528,  6576,  6593,  6600,  6608,  6618,  6622,  6656,  6679,\n    6681,  6686,  6688,  6741,  6742,  6743,  6744,  6752,  6753,  6754,\n    6755,  6757,  6765,  6771,  6783,  6784,  6800,  6816,  6823,  6824,\n    6912,  6916,  6917,  6964,  6965,  6966,  6971,  6972,  6973,  6978,\n    6979,  6981,  6992,  7002,  7009,  7019,  7028,  7040,  7042,  7043,\n    7073,  7074,  7078,  7080,  7082,  7083,  7084,  7086,  7088,  7098,\n    7142,  7143,  7144,  7146,  7149,  7150,  7151,  7154,  7164,  7168,\n    7204,  7212,  7220,  7222,  7227,  7232,  7245,  7248,  7258,  7288,\n    7294,  7360,  7376,  7379,  7380,  7393,  7394,  7401,  7405,  7406,\n    7410,  7412,  7413,  7424,  7468,  7531,  7544,  7545,  7579,  7616,\n    7676,  7680,  7830,  7838,  7936,  7944,  7952,  7960,  7968,  7976,\n    7984,  7992,  8000,  8008,  8016,  8025,  8027,  8029,  8031,  8033,\n    8040,  8048,  8064,  8072,  8080,  8088,  8096,  8104,  8112,  8118,\n    8120,  8124,  8125,  8126,  8127,  8130,  8134,  8136,  8140,  8141,\n    8144,  8150,  8152,  8157,  8160,  8168,  8173,  8178,  8182,  8184,\n    8188,  8189,  8192,  8203,  8208,  8214,  8216,  8217,  8218,  8219,\n    8221,  8222,  8223,  8224,  8232,  8233,  8234,  8239,  8240,  8249,\n    8250,  8251,  8255,  8257,  8260,  8261,  8262,  8263,  8274,  8275,\n    8276,  8277,  8287,  8288,  8298,  8304,  8305,  8308,  8314,  8317,\n    8318,  8319,  8320,  8330,  8333,  8334,  8336,  8352,  8400,  8413,\n    8417,  8418,  8421,  8448,  8450,  8451,  8455,  8456,  8458,  8459,\n    8462,  8464,  8467,  8468,  8469,  8470,  8472,  8473,  8478,  8484,\n    8485,  8486,  8487,  8488,  8489,  8490,  8494,  8495,  8496,  8500,\n    8501,  8505,  8506,  8508,  8510,  8512,  8517,  8519,  8522,  8523,\n    8524,  8526,  8527,  8528,  8544,  8579,  8581,  8585,  8592,  8597,\n    8602,  8604,  8608,  8609,  8611,  8612,  8614,  8615,  8622,  8623,\n    8654,  8656,  8658,  8659,  8660,  8661,  8692,  8960,  8968,  8972,\n    8992,  8994,  9001,  9002,  9003,  9084,  9085,  9115,  9140,  9180,\n    9186,  9216,  9280,  9312,  9372,  9450,  9472,  9655,  9656,  9665,\n    9666,  9720,  9728,  9839,  9840,  9985,  10088, 10089, 10090, 10091,\n    10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101,\n    10102, 10132, 10176, 10181, 10182, 10183, 10214, 10215, 10216, 10217,\n    10218, 10219, 10220, 10221, 10222, 10223, 10224, 10240, 10496, 10627,\n    10628, 10629, 10630, 10631, 10632, 10633, 10634, 10635, 10636, 10637,\n    10638, 10639, 10640, 10641, 10642, 10643, 10644, 10645, 10646, 10647,\n    10648, 10649, 10712, 10713, 10714, 10715, 10716, 10748, 10749, 10750,\n    11008, 11056, 11077, 11079, 11088, 11264, 11312, 11360, 11363, 11365,\n    11367, 11374, 11377, 11378, 11380, 11381, 11383, 11388, 11390, 11393,\n    11394, 11492, 11493, 11499, 11503, 11506, 11513, 11517, 11518, 11520,\n    11559, 11565, 11568, 11631, 11632, 11647, 11648, 11680, 11688, 11696,\n    11704, 11712, 11720, 11728, 11736, 11744, 11776, 11778, 11779, 11780,\n    11781, 11782, 11785, 11786, 11787, 11788, 11789, 11790, 11799, 11800,\n    11802, 11803, 11804, 11805, 11806, 11808, 11809, 11810, 11811, 11812,\n    11813, 11814, 11815, 11816, 11817, 11818, 11823, 11824, 11834, 11904,\n    11931, 12032, 12272, 12288, 12289, 12292, 12293, 12294, 12295, 12296,\n    12297, 12298, 12299, 12300, 12301, 12302, 12303, 12304, 12305, 12306,\n    12308, 12309, 12310, 12311, 12312, 12313, 12314, 12315, 12316, 12317,\n    12318, 12320, 12321, 12330, 12334, 12336, 12337, 12342, 12344, 12347,\n    12348, 12349, 12350, 12353, 12441, 12443, 12445, 12447, 12448, 12449,\n    12539, 12540, 12543, 12549, 12593, 12688, 12690, 12694, 12704, 12736,\n    12784, 12800, 12832, 12842, 12872, 12880, 12881, 12896, 12928, 12938,\n    12977, 12992, 13056, 13312, 19893, 19904, 19968, 40908, 40960, 40981,\n    40982, 42128, 42192, 42232, 42238, 42240, 42508, 42509, 42512, 42528,\n    42538, 42560, 42606, 42607, 42608, 42611, 42612, 42622, 42623, 42624,\n    42655, 42656, 42726, 42736, 42738, 42752, 42775, 42784, 42786, 42800,\n    42802, 42864, 42865, 42873, 42878, 42888, 42889, 42891, 42896, 42912,\n    43000, 43002, 43003, 43010, 43011, 43014, 43015, 43019, 43020, 43043,\n    43045, 43047, 43048, 43056, 43062, 43064, 43065, 43072, 43124, 43136,\n    43138, 43188, 43204, 43214, 43216, 43232, 43250, 43256, 43259, 43264,\n    43274, 43302, 43310, 43312, 43335, 43346, 43359, 43360, 43392, 43395,\n    43396, 43443, 43444, 43446, 43450, 43452, 43453, 43457, 43471, 43472,\n    43486, 43520, 43561, 43567, 43569, 43571, 43573, 43584, 43587, 43588,\n    43596, 43597, 43600, 43612, 43616, 43632, 43633, 43639, 43642, 43643,\n    43648, 43696, 43697, 43698, 43701, 43703, 43705, 43710, 43712, 43713,\n    43714, 43739, 43741, 43742, 43744, 43755, 43756, 43758, 43760, 43762,\n    43763, 43765, 43766, 43777, 43785, 43793, 43808, 43816, 43968, 44003,\n    44005, 44006, 44008, 44009, 44011, 44012, 44013, 44016, 44032, 55203,\n    55216, 55243, 55296, 56191, 56319, 57343, 57344, 63743, 63744, 64112,\n    64256, 64275, 64285, 64286, 64287, 64297, 64298, 64312, 64318, 64320,\n    64323, 64326, 64434, 64467, 64830, 64831, 64848, 64914, 65008, 65020,\n    65021, 65024, 65040, 65047, 65048, 65049, 65056, 65072, 65073, 65075,\n    65077, 65078, 65079, 65080, 65081, 65082, 65083, 65084, 65085, 65086,\n    65087, 65088, 65089, 65090, 65091, 65092, 65093, 65095, 65096, 65097,\n    65101, 65104, 65108, 65112, 65113, 65114, 65115, 65116, 65117, 65118,\n    65119, 65122, 65123, 65124, 65128, 65129, 65130, 65136, 65142, 65279,\n    65281, 65284, 65285, 65288, 65289, 65290, 65291, 65292, 65293, 65294,\n    65296, 65306, 65308, 65311, 65313, 65339, 65340, 65341, 65342, 65343,\n    65344, 65345, 65371, 65372, 65373, 65374, 65375, 65376, 65377, 65378,\n    65379, 65380, 65382, 65392, 65393, 65438, 65440, 65474, 65482, 65490,\n    65498, 65504, 65506, 65507, 65508, 65509, 65512, 65513, 65517, 65529,\n    65532, 0,     13,    40,    60,    63,    80,    128,   256,   263,\n    311,   320,   373,   377,   394,   400,   464,   509,   640,   672,\n    768,   800,   816,   833,   834,   842,   896,   927,   928,   968,\n    976,   977,   1024,  1064,  1104,  1184,  2048,  2056,  2058,  2103,\n    2108,  2111,  2135,  2136,  2304,  2326,  2335,  2336,  2367,  2432,\n    2494,  2560,  2561,  2565,  2572,  2576,  2581,  2585,  2616,  2623,\n    2624,  2640,  2656,  2685,  2687,  2816,  2873,  2880,  2904,  2912,\n    2936,  3072,  3680,  4096,  4097,  4098,  4099,  4152,  4167,  4178,\n    4198,  4224,  4226,  4227,  4272,  4275,  4279,  4281,  4283,  4285,\n    4286,  4304,  4336,  4352,  4355,  4391,  4396,  4397,  4406,  4416,\n    4480,  4482,  4483,  4531,  4534,  4543,  4545,  4549,  4560,  5760,\n    5803,  5804,  5805,  5806,  5808,  5814,  5815,  5824,  8192,  9216,\n    9328,  12288, 26624, 28416, 28496, 28497, 28559, 28563, 45056, 53248,\n    53504, 53545, 53605, 53607, 53610, 53613, 53619, 53627, 53635, 53637,\n    53644, 53674, 53678, 53760, 53826, 53829, 54016, 54112, 54272, 54298,\n    54324, 54350, 54358, 54376, 54402, 54428, 54430, 54434, 54437, 54441,\n    54446, 54454, 54459, 54461, 54469, 54480, 54506, 54532, 54535, 54541,\n    54550, 54558, 54584, 54587, 54592, 54598, 54602, 54610, 54636, 54662,\n    54688, 54714, 54740, 54766, 54792, 54818, 54844, 54870, 54896, 54922,\n    54952, 54977, 54978, 55003, 55004, 55010, 55035, 55036, 55061, 55062,\n    55068, 55093, 55094, 55119, 55120, 55126, 55151, 55152, 55177, 55178,\n    55184, 55209, 55210, 55235, 55236, 55242, 55246, 60928, 60933, 60961,\n    60964, 60967, 60969, 60980, 60985, 60987, 60994, 60999, 61001, 61003,\n    61005, 61009, 61012, 61015, 61017, 61019, 61021, 61023, 61025, 61028,\n    61031, 61036, 61044, 61049, 61054, 61056, 61067, 61089, 61093, 61099,\n    61168, 61440, 61488, 61600, 61617, 61633, 61649, 61696, 61712, 61744,\n    61808, 61926, 61968, 62016, 62032, 62208, 62256, 62263, 62336, 62368,\n    62406, 62432, 62464, 62528, 62530, 62713, 62720, 62784, 62800, 62971,\n    63045, 63104, 63232, 0,     42710, 42752, 46900, 46912, 47133, 63488,\n    1,     32,    256,   0,     65533,\n  };\nstatic u16 aFts5UnicodeData[] = {\n    1025,  61,    117,   55,    117,   54,    50,    53,    57,    53,\n    49,    85,    333,   85,    121,   85,    841,   54,    53,    50,\n    56,    48,    56,    837,   54,    57,    50,    57,    1057,  61,\n    53,    151,   58,    53,    56,    58,    39,    52,    57,    34,\n    58,    56,    58,    57,    79,    56,    37,    85,    56,    47,\n    39,    51,    111,   53,    745,   57,    233,   773,   57,    261,\n    1822,  37,    542,   37,    1534,  222,   69,    73,    37,    126,\n    126,   73,    69,    137,   37,    73,    37,    105,   101,   73,\n    37,    73,    37,    190,   158,   37,    126,   126,   73,    37,\n    126,   94,    37,    39,    94,    69,    135,   41,    40,    37,\n    41,    40,    37,    41,    40,    37,    542,   37,    606,   37,\n    41,    40,    37,    126,   73,    37,    1886,  197,   73,    37,\n    73,    69,    126,   105,   37,    286,   2181,  39,    869,   582,\n    152,   390,   472,   166,   248,   38,    56,    38,    568,   3596,\n    158,   38,    56,    94,    38,    101,   53,    88,    41,    53,\n    105,   41,    73,    37,    553,   297,   1125,  94,    37,    105,\n    101,   798,   133,   94,    57,    126,   94,    37,    1641,  1541,\n    1118,  58,    172,   75,    1790,  478,   37,    2846,  1225,  38,\n    213,   1253,  53,    49,    55,    1452,  49,    44,    53,    76,\n    53,    76,    53,    44,    871,   103,   85,    162,   121,   85,\n    55,    85,    90,    364,   53,    85,    1031,  38,    327,   684,\n    333,   149,   71,    44,    3175,  53,    39,    236,   34,    58,\n    204,   70,    76,    58,    140,   71,    333,   103,   90,    39,\n    469,   34,    39,    44,    967,   876,   2855,  364,   39,    333,\n    1063,  300,   70,    58,    117,   38,    711,   140,   38,    300,\n    38,    108,   38,    172,   501,   807,   108,   53,    39,    359,\n    876,   108,   42,    1735,  44,    42,    44,    39,    106,   268,\n    138,   44,    74,    39,    236,   327,   76,    85,    333,   53,\n    38,    199,   231,   44,    74,    263,   71,    711,   231,   39,\n    135,   44,    39,    106,   140,   74,    74,    44,    39,    42,\n    71,    103,   76,    333,   71,    87,    207,   58,    55,    76,\n    42,    199,   71,    711,   231,   71,    71,    71,    44,    106,\n    76,    76,    108,   44,    135,   39,    333,   76,    103,   44,\n    76,    42,    295,   103,   711,   231,   71,    167,   44,    39,\n    106,   172,   76,    42,    74,    44,    39,    71,    76,    333,\n    53,    55,    44,    74,    263,   71,    711,   231,   71,    167,\n    44,    39,    42,    44,    42,    140,   74,    74,    44,    44,\n    42,    71,    103,   76,    333,   58,    39,    207,   44,    39,\n    199,   103,   135,   71,    39,    71,    71,    103,   391,   74,\n    44,    74,    106,   106,   44,    39,    42,    333,   111,   218,\n    55,    58,    106,   263,   103,   743,   327,   167,   39,    108,\n    138,   108,   140,   76,    71,    71,    76,    333,   239,   58,\n    74,    263,   103,   743,   327,   167,   44,    39,    42,    44,\n    170,   44,    74,    74,    76,    74,    39,    71,    76,    333,\n    71,    74,    263,   103,   1319,  39,    106,   140,   106,   106,\n    44,    39,    42,    71,    76,    333,   207,   58,    199,   74,\n    583,   775,   295,   39,    231,   44,    106,   108,   44,    266,\n    74,    53,    1543,  44,    71,    236,   55,    199,   38,    268,\n    53,    333,   85,    71,    39,    71,    39,    39,    135,   231,\n    103,   39,    39,    71,    135,   44,    71,    204,   76,    39,\n    167,   38,    204,   333,   135,   39,    122,   501,   58,    53,\n    122,   76,    218,   333,   335,   58,    44,    58,    44,    58,\n    44,    54,    50,    54,    50,    74,    263,   1159,  460,   42,\n    172,   53,    76,    167,   364,   1164,  282,   44,    218,   90,\n    181,   154,   85,    1383,  74,    140,   42,    204,   42,    76,\n    74,    76,    39,    333,   213,   199,   74,    76,    135,   108,\n    39,    106,   71,    234,   103,   140,   423,   44,    74,    76,\n    202,   44,    39,    42,    333,   106,   44,    90,    1225,  41,\n    41,    1383,  53,    38,    10631, 135,   231,   39,    135,   1319,\n    135,   1063,  135,   231,   39,    135,   487,   1831,  135,   2151,\n    108,   309,   655,   519,   346,   2727,  49,    19847, 85,    551,\n    61,    839,   54,    50,    2407,  117,   110,   423,   135,   108,\n    583,   108,   85,    583,   76,    423,   103,   76,    1671,  76,\n    42,    236,   266,   44,    74,    364,   117,   38,    117,   55,\n    39,    44,    333,   335,   213,   49,    149,   108,   61,    333,\n    1127,  38,    1671,  1319,  44,    39,    2247,  935,   108,   138,\n    76,    106,   74,    44,    202,   108,   58,    85,    333,   967,\n    167,   1415,  554,   231,   74,    333,   47,    1114,  743,   76,\n    106,   85,    1703,  42,    44,    42,    236,   44,    42,    44,\n    74,    268,   202,   332,   44,    333,   333,   245,   38,    213,\n    140,   42,    1511,  44,    42,    172,   42,    44,    170,   44,\n    74,    231,   333,   245,   346,   300,   314,   76,    42,    967,\n    42,    140,   74,    76,    42,    44,    74,    71,    333,   1415,\n    44,    42,    76,    106,   44,    42,    108,   74,    149,   1159,\n    266,   268,   74,    76,    181,   333,   103,   333,   967,   198,\n    85,    277,   108,   53,    428,   42,    236,   135,   44,    135,\n    74,    44,    71,    1413,  2022,  421,   38,    1093,  1190,  1260,\n    140,   4830,  261,   3166,  261,   265,   197,   201,   261,   265,\n    261,   265,   197,   201,   261,   41,    41,    41,    94,    229,\n    265,   453,   261,   264,   261,   264,   261,   264,   165,   69,\n    137,   40,    56,    37,    120,   101,   69,    137,   40,    120,\n    133,   69,    137,   120,   261,   169,   120,   101,   69,    137,\n    40,    88,    381,   162,   209,   85,    52,    51,    54,    84,\n    51,    54,    52,    277,   59,    60,    162,   61,    309,   52,\n    51,    149,   80,    117,   57,    54,    50,    373,   57,    53,\n    48,    341,   61,    162,   194,   47,    38,    207,   121,   54,\n    50,    38,    335,   121,   54,    50,    422,   855,   428,   139,\n    44,    107,   396,   90,    41,    154,   41,    90,    37,    105,\n    69,    105,   37,    58,    41,    90,    57,    169,   218,   41,\n    58,    41,    58,    41,    58,    137,   58,    37,    137,   37,\n    135,   37,    90,    69,    73,    185,   94,    101,   58,    57,\n    90,    37,    58,    527,   1134,  94,    142,   47,    185,   186,\n    89,    154,   57,    90,    57,    90,    57,    250,   57,    1018,\n    89,    90,    57,    58,    57,    1018,  8601,  282,   153,   666,\n    89,    250,   54,    50,    2618,  57,    986,   825,   1306,  217,\n    602,   1274,  378,   1935,  2522,  719,   5882,  57,    314,   57,\n    1754,  281,   3578,  57,    4634,  3322,  54,    50,    54,    50,\n    54,    50,    54,    50,    54,    50,    54,    50,    54,    50,\n    975,   1434,  185,   54,    50,    1017,  54,    50,    54,    50,\n    54,    50,    54,    50,    54,    50,    537,   8218,  4217,  54,\n    50,    54,    50,    54,    50,    54,    50,    54,    50,    54,\n    50,    54,    50,    54,    50,    54,    50,    54,    50,    54,\n    50,    2041,  54,    50,    54,    50,    1049,  54,    50,    8281,\n    1562,  697,   90,    217,   346,   1513,  1509,  126,   73,    69,\n    254,   105,   37,    94,    37,    94,    165,   70,    105,   37,\n    3166,  37,    218,   158,   108,   94,    149,   47,    85,    1221,\n    37,    37,    1799,  38,    53,    44,    743,   231,   231,   231,\n    231,   231,   231,   231,   231,   1036,  85,    52,    51,    52,\n    51,    117,   52,    51,    53,    52,    51,    309,   49,    85,\n    49,    53,    52,    51,    85,    52,    51,    54,    50,    54,\n    50,    54,    50,    54,    50,    181,   38,    341,   81,    858,\n    2874,  6874,  410,   61,    117,   58,    38,    39,    46,    54,\n    50,    54,    50,    54,    50,    54,    50,    54,    50,    90,\n    54,    50,    54,    50,    54,    50,    54,    50,    49,    54,\n    82,    58,    302,   140,   74,    49,    166,   90,    110,   38,\n    39,    53,    90,    2759,  76,    88,    70,    39,    49,    2887,\n    53,    102,   39,    1319,  3015,  90,    143,   346,   871,   1178,\n    519,   1018,  335,   986,   271,   58,    495,   1050,  335,   1274,\n    495,   2042,  8218,  39,    39,    2074,  39,    39,    679,   38,\n    36583, 1786,  1287,  198,   85,    8583,  38,    117,   519,   333,\n    71,    1502,  39,    44,    107,   53,    332,   53,    38,    798,\n    44,    2247,  334,   76,    213,   760,   294,   88,    478,   69,\n    2014,  38,    261,   190,   350,   38,    88,    158,   158,   382,\n    70,    37,    231,   44,    103,   44,    135,   44,    743,   74,\n    76,    42,    154,   207,   90,    55,    58,    1671,  149,   74,\n    1607,  522,   44,    85,    333,   588,   199,   117,   39,    333,\n    903,   268,   85,    743,   364,   74,    53,    935,   108,   42,\n    1511,  44,    74,    140,   74,    44,    138,   437,   38,    333,\n    85,    1319,  204,   74,    76,    74,    76,    103,   44,    263,\n    44,    42,    333,   149,   519,   38,    199,   122,   39,    42,\n    1543,  44,    39,    108,   71,    76,    167,   76,    39,    44,\n    39,    71,    38,    85,    359,   42,    76,    74,    85,    39,\n    70,    42,    44,    199,   199,   199,   231,   231,   1127,  74,\n    44,    74,    44,    74,    53,    42,    44,    333,   39,    39,\n    743,   1575,  36,    68,    68,    36,    63,    63,    11719, 3399,\n    229,   165,   39,    44,    327,   57,    423,   167,   39,    71,\n    71,    3463,  536,   11623, 54,    50,    2055,  1735,  391,   55,\n    58,    524,   245,   54,    50,    53,    236,   53,    81,    80,\n    54,    50,    54,    50,    54,    50,    54,    50,    54,    50,\n    54,    50,    54,    50,    54,    50,    85,    54,    50,    149,\n    112,   117,   149,   49,    54,    50,    54,    50,    54,    50,\n    117,   57,    49,    121,   53,    55,    85,    167,   4327,  34,\n    117,   55,    117,   54,    50,    53,    57,    53,    49,    85,\n    333,   85,    121,   85,    841,   54,    53,    50,    56,    48,\n    56,    837,   54,    57,    50,    57,    54,    50,    53,    54,\n    50,    85,    327,   38,    1447,  70,    999,   199,   199,   199,\n    103,   87,    57,    56,    58,    87,    58,    153,   90,    98,\n    90,    391,   839,   615,   71,    487,   455,   3943,  117,   1455,\n    314,   1710,  143,   570,   47,    410,   1466,  44,    935,   1575,\n    999,   143,   551,   46,    263,   46,    967,   53,    1159,  263,\n    53,    174,   1289,  1285,  2503,  333,   199,   39,    1415,  71,\n    39,    743,   53,    271,   711,   207,   53,    839,   53,    1799,\n    71,    39,    108,   76,    140,   135,   103,   871,   108,   44,\n    271,   309,   935,   79,    53,    1735,  245,   711,   271,   615,\n    271,   2343,  1007,  42,    44,    42,    1703,  492,   245,   655,\n    333,   76,    42,    1447,  106,   140,   74,    76,    85,    34,\n    149,   807,   333,   108,   1159,  172,   42,    268,   333,   149,\n    76,    42,    1543,  106,   300,   74,    135,   149,   333,   1383,\n    44,    42,    44,    74,    204,   42,    44,    333,   28135, 3182,\n    149,   34279, 18215, 2215,  39,    1482,  140,   422,   71,    7898,\n    1274,  1946,  74,    108,   122,   202,   258,   268,   90,    236,\n    986,   140,   1562,  2138,  108,   58,    2810,  591,   841,   837,\n    841,   229,   581,   841,   837,   41,    73,    41,    73,    137,\n    265,   133,   37,    229,   357,   841,   837,   73,    137,   265,\n    233,   837,   73,    137,   169,   41,    233,   837,   841,   837,\n    841,   837,   841,   837,   841,   837,   841,   837,   841,   901,\n    809,   57,    805,   57,    197,   809,   57,    805,   57,    197,\n    809,   57,    805,   57,    197,   809,   57,    805,   57,    197,\n    809,   57,    805,   57,    197,   94,    1613,  135,   871,   71,\n    39,    39,    327,   135,   39,    39,    39,    39,    39,    39,\n    103,   71,    39,    39,    39,    39,    39,    39,    71,    39,\n    135,   231,   135,   135,   39,    327,   551,   103,   167,   551,\n    89,    1434,  3226,  506,   474,   506,   506,   367,   1018,  1946,\n    1402,  954,   1402,  314,   90,    1082,  218,   2266,  666,   1210,\n    186,   570,   2042,  58,    5850,  154,   2010,  154,   794,   2266,\n    378,   2266,  3738,  39,    39,    39,    39,    39,    39,    17351,\n    34,    3074,  7692,  63,    63,\n  };\n\nstatic int sqlite3Fts5UnicodeCategory(u32 iCode) {\n  int iRes = -1;\n  int iHi;\n  int iLo;\n  int ret;\n  u16 iKey;\n\n  if( iCode>=(1<<20) ){\n    return 0;\n  }\n  iLo = aFts5UnicodeBlock[(iCode>>16)];\n  iHi = aFts5UnicodeBlock[1+(iCode>>16)];\n  iKey = (iCode & 0xFFFF);\n  while( iHi>iLo ){\n    int iTest = (iHi + iLo) / 2;\n    assert( iTest>=iLo && iTest<iHi );\n    if( iKey>=aFts5UnicodeMap[iTest] ){\n      iRes = iTest;\n      iLo = iTest+1;\n    }else{\n      iHi = iTest;\n    }\n  }\n\n  if( iRes<0 ) return 0;\n  if( iKey>=(aFts5UnicodeMap[iRes]+(aFts5UnicodeData[iRes]>>5)) ) return 0;\n  ret = aFts5UnicodeData[iRes] & 0x1F;\n  if( ret!=30 ) return ret;\n  return ((iKey - aFts5UnicodeMap[iRes]) & 0x01) ? 5 : 9;\n}\n\nstatic void sqlite3Fts5UnicodeAscii(u8 *aArray, u8 *aAscii){\n  int i = 0;\n  int iTbl = 0;\n  while( i<128 ){\n    int bToken = aArray[ aFts5UnicodeData[iTbl] & 0x1F ];\n    int n = (aFts5UnicodeData[iTbl] >> 5) + i;\n    for(; i<128 && i<n; i++){\n      aAscii[i] = (u8)bToken;\n    }\n    iTbl++;\n  }\n  aAscii[0] = 0;                  /* 0x00 is never a token character */\n}\n\n/*\n** 2015 May 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Routines for varint serialization and deserialization.\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n/*\n** This is a copy of the sqlite3GetVarint32() routine from the SQLite core.\n** Except, this version does handle the single byte case that the core\n** version depends on being handled before its function is called.\n*/\nstatic int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v){\n  u32 a,b;\n\n  /* The 1-byte case. Overwhelmingly the most common. */\n  a = *p;\n  /* a: p0 (unmasked) */\n  if (!(a&0x80))\n  {\n    /* Values between 0 and 127 */\n    *v = a;\n    return 1;\n  }\n\n  /* The 2-byte case */\n  p++;\n  b = *p;\n  /* b: p1 (unmasked) */\n  if (!(b&0x80))\n  {\n    /* Values between 128 and 16383 */\n    a &= 0x7f;\n    a = a<<7;\n    *v = a | b;\n    return 2;\n  }\n\n  /* The 3-byte case */\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p0<<14 | p2 (unmasked) */\n  if (!(a&0x80))\n  {\n    /* Values between 16384 and 2097151 */\n    a &= (0x7f<<14)|(0x7f);\n    b &= 0x7f;\n    b = b<<7;\n    *v = a | b;\n    return 3;\n  }\n\n  /* A 32-bit varint is used to store size information in btrees.\n  ** Objects are rarely larger than 2MiB limit of a 3-byte varint.\n  ** A 3-byte varint is sufficient, for example, to record the size\n  ** of a 1048569-byte BLOB or string.\n  **\n  ** We only unroll the first 1-, 2-, and 3- byte cases.  The very\n  ** rare larger cases can be handled by the slower 64-bit varint\n  ** routine.\n  */\n  {\n    u64 v64;\n    u8 n;\n    p -= 2;\n    n = sqlite3Fts5GetVarint(p, &v64);\n    *v = ((u32)v64) & 0x7FFFFFFF;\n    assert( n>3 && n<=9 );\n    return n;\n  }\n}\n\n\n/*\n** Bitmasks used by sqlite3GetVarint().  These precomputed constants\n** are defined here rather than simply putting the constant expressions\n** inline in order to work around bugs in the RVT compiler.\n**\n** SLOT_2_0     A mask for  (0x7f<<14) | 0x7f\n**\n** SLOT_4_2_0   A mask for  (0x7f<<28) | SLOT_2_0\n*/\n#define SLOT_2_0     0x001fc07f\n#define SLOT_4_2_0   0xf01fc07f\n\n/*\n** Read a 64-bit variable-length integer from memory starting at p[0].\n** Return the number of bytes read.  The value is stored in *v.\n*/\nstatic u8 sqlite3Fts5GetVarint(const unsigned char *p, u64 *v){\n  u32 a,b,s;\n\n  a = *p;\n  /* a: p0 (unmasked) */\n  if (!(a&0x80))\n  {\n    *v = a;\n    return 1;\n  }\n\n  p++;\n  b = *p;\n  /* b: p1 (unmasked) */\n  if (!(b&0x80))\n  {\n    a &= 0x7f;\n    a = a<<7;\n    a |= b;\n    *v = a;\n    return 2;\n  }\n\n  /* Verify that constants are precomputed correctly */\n  assert( SLOT_2_0 == ((0x7f<<14) | (0x7f)) );\n  assert( SLOT_4_2_0 == ((0xfU<<28) | (0x7f<<14) | (0x7f)) );\n\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p0<<14 | p2 (unmasked) */\n  if (!(a&0x80))\n  {\n    a &= SLOT_2_0;\n    b &= 0x7f;\n    b = b<<7;\n    a |= b;\n    *v = a;\n    return 3;\n  }\n\n  /* CSE1 from below */\n  a &= SLOT_2_0;\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p1<<14 | p3 (unmasked) */\n  if (!(b&0x80))\n  {\n    b &= SLOT_2_0;\n    /* moved CSE1 up */\n    /* a &= (0x7f<<14)|(0x7f); */\n    a = a<<7;\n    a |= b;\n    *v = a;\n    return 4;\n  }\n\n  /* a: p0<<14 | p2 (masked) */\n  /* b: p1<<14 | p3 (unmasked) */\n  /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n  /* moved CSE1 up */\n  /* a &= (0x7f<<14)|(0x7f); */\n  b &= SLOT_2_0;\n  s = a;\n  /* s: p0<<14 | p2 (masked) */\n\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p0<<28 | p2<<14 | p4 (unmasked) */\n  if (!(a&0x80))\n  {\n    /* we can skip these cause they were (effectively) done above in calc'ing s */\n    /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */\n    /* b &= (0x7f<<14)|(0x7f); */\n    b = b<<7;\n    a |= b;\n    s = s>>18;\n    *v = ((u64)s)<<32 | a;\n    return 5;\n  }\n\n  /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n  s = s<<7;\n  s |= b;\n  /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p1<<28 | p3<<14 | p5 (unmasked) */\n  if (!(b&0x80))\n  {\n    /* we can skip this cause it was (effectively) done above in calc'ing s */\n    /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */\n    a &= SLOT_2_0;\n    a = a<<7;\n    a |= b;\n    s = s>>18;\n    *v = ((u64)s)<<32 | a;\n    return 6;\n  }\n\n  p++;\n  a = a<<14;\n  a |= *p;\n  /* a: p2<<28 | p4<<14 | p6 (unmasked) */\n  if (!(a&0x80))\n  {\n    a &= SLOT_4_2_0;\n    b &= SLOT_2_0;\n    b = b<<7;\n    a |= b;\n    s = s>>11;\n    *v = ((u64)s)<<32 | a;\n    return 7;\n  }\n\n  /* CSE2 from below */\n  a &= SLOT_2_0;\n  p++;\n  b = b<<14;\n  b |= *p;\n  /* b: p3<<28 | p5<<14 | p7 (unmasked) */\n  if (!(b&0x80))\n  {\n    b &= SLOT_4_2_0;\n    /* moved CSE2 up */\n    /* a &= (0x7f<<14)|(0x7f); */\n    a = a<<7;\n    a |= b;\n    s = s>>4;\n    *v = ((u64)s)<<32 | a;\n    return 8;\n  }\n\n  p++;\n  a = a<<15;\n  a |= *p;\n  /* a: p4<<29 | p6<<15 | p8 (unmasked) */\n\n  /* moved CSE2 up */\n  /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */\n  b &= SLOT_2_0;\n  b = b<<8;\n  a |= b;\n\n  s = s<<4;\n  b = p[-4];\n  b &= 0x7f;\n  b = b>>3;\n  s |= b;\n\n  *v = ((u64)s)<<32 | a;\n\n  return 9;\n}\n\n/*\n** The variable-length integer encoding is as follows:\n**\n** KEY:\n**         A = 0xxxxxxx    7 bits of data and one flag bit\n**         B = 1xxxxxxx    7 bits of data and one flag bit\n**         C = xxxxxxxx    8 bits of data\n**\n**  7 bits - A\n** 14 bits - BA\n** 21 bits - BBA\n** 28 bits - BBBA\n** 35 bits - BBBBA\n** 42 bits - BBBBBA\n** 49 bits - BBBBBBA\n** 56 bits - BBBBBBBA\n** 64 bits - BBBBBBBBC\n*/\n\n#ifdef SQLITE_NOINLINE\n# define FTS5_NOINLINE SQLITE_NOINLINE\n#else\n# define FTS5_NOINLINE\n#endif\n\n/*\n** Write a 64-bit variable-length integer to memory starting at p[0].\n** The length of data write will be between 1 and 9 bytes.  The number\n** of bytes written is returned.\n**\n** A variable-length integer consists of the lower 7 bits of each byte\n** for all bytes that have the 8th bit set and one byte with the 8th\n** bit clear.  Except, if we get to the 9th byte, it stores the full\n** 8 bits and is the last byte.\n*/\nstatic int FTS5_NOINLINE fts5PutVarint64(unsigned char *p, u64 v){\n  int i, j, n;\n  u8 buf[10];\n  if( v & (((u64)0xff000000)<<32) ){\n    p[8] = (u8)v;\n    v >>= 8;\n    for(i=7; i>=0; i--){\n      p[i] = (u8)((v & 0x7f) | 0x80);\n      v >>= 7;\n    }\n    return 9;\n  }\n  n = 0;\n  do{\n    buf[n++] = (u8)((v & 0x7f) | 0x80);\n    v >>= 7;\n  }while( v!=0 );\n  buf[0] &= 0x7f;\n  assert( n<=9 );\n  for(i=0, j=n-1; j>=0; j--, i++){\n    p[i] = buf[j];\n  }\n  return n;\n}\n\nstatic int sqlite3Fts5PutVarint(unsigned char *p, u64 v){\n  if( v<=0x7f ){\n    p[0] = v&0x7f;\n    return 1;\n  }\n  if( v<=0x3fff ){\n    p[0] = ((v>>7)&0x7f)|0x80;\n    p[1] = v&0x7f;\n    return 2;\n  }\n  return fts5PutVarint64(p,v);\n}\n\n\nstatic int sqlite3Fts5GetVarintLen(u32 iVal){\n#if 0\n  if( iVal<(1 << 7 ) ) return 1;\n#endif\n  assert( iVal>=(1 << 7) );\n  if( iVal<(1 << 14) ) return 2;\n  if( iVal<(1 << 21) ) return 3;\n  if( iVal<(1 << 28) ) return 4;\n  return 5;\n}\n\n/*\n** 2015 May 08\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** This is an SQLite virtual table module implementing direct access to an\n** existing FTS5 index. The module may create several different types of\n** tables:\n**\n** col:\n**     CREATE TABLE vocab(term, col, doc, cnt, PRIMARY KEY(term, col));\n**\n**   One row for each term/column combination. The value of $doc is set to\n**   the number of fts5 rows that contain at least one instance of term\n**   $term within column $col. Field $cnt is set to the total number of\n**   instances of term $term in column $col (in any row of the fts5 table).\n**\n** row:\n**     CREATE TABLE vocab(term, doc, cnt, PRIMARY KEY(term));\n**\n**   One row for each term in the database. The value of $doc is set to\n**   the number of fts5 rows that contain at least one instance of term\n**   $term. Field $cnt is set to the total number of instances of term\n**   $term in the database.\n**\n** instance:\n**     CREATE TABLE vocab(term, doc, col, offset, PRIMARY KEY(<all-fields>));\n**\n**   One row for each term instance in the database.\n*/\n\n\n/* #include \"fts5Int.h\" */\n\n\ntypedef struct Fts5VocabTable Fts5VocabTable;\ntypedef struct Fts5VocabCursor Fts5VocabCursor;\n\nstruct Fts5VocabTable {\n  sqlite3_vtab base;\n  char *zFts5Tbl;                 /* Name of fts5 table */\n  char *zFts5Db;                  /* Db containing fts5 table */\n  sqlite3 *db;                    /* Database handle */\n  Fts5Global *pGlobal;            /* FTS5 global object for this database */\n  int eType;                      /* FTS5_VOCAB_COL, ROW or INSTANCE */\n  unsigned bBusy;                 /* True if busy */\n};\n\nstruct Fts5VocabCursor {\n  sqlite3_vtab_cursor base;\n  sqlite3_stmt *pStmt;            /* Statement holding lock on pIndex */\n  Fts5Table *pFts5;               /* Associated FTS5 table */\n\n  int bEof;                       /* True if this cursor is at EOF */\n  Fts5IndexIter *pIter;           /* Term/rowid iterator object */\n  void *pStruct;                  /* From sqlite3Fts5StructureRef() */\n\n  int nLeTerm;                    /* Size of zLeTerm in bytes */\n  char *zLeTerm;                  /* (term <= $zLeTerm) paramater, or NULL */\n  int colUsed;                    /* Copy of sqlite3_index_info.colUsed */\n\n  /* These are used by 'col' tables only */\n  int iCol;\n  i64 *aCnt;\n  i64 *aDoc;\n\n  /* Output values used by all tables. */\n  i64 rowid;                      /* This table's current rowid value */\n  Fts5Buffer term;                /* Current value of 'term' column */\n\n  /* Output values Used by 'instance' tables only */\n  i64 iInstPos;\n  int iInstOff;\n};\n\n#define FTS5_VOCAB_COL      0\n#define FTS5_VOCAB_ROW      1\n#define FTS5_VOCAB_INSTANCE 2\n\n#define FTS5_VOCAB_COL_SCHEMA  \"term, col, doc, cnt\"\n#define FTS5_VOCAB_ROW_SCHEMA  \"term, doc, cnt\"\n#define FTS5_VOCAB_INST_SCHEMA \"term, doc, col, offset\"\n\n/*\n** Bits for the mask used as the idxNum value by xBestIndex/xFilter.\n*/\n#define FTS5_VOCAB_TERM_EQ 0x0100\n#define FTS5_VOCAB_TERM_GE 0x0200\n#define FTS5_VOCAB_TERM_LE 0x0400\n\n#define FTS5_VOCAB_COLUSED_MASK 0xFF\n\n\n/*\n** Translate a string containing an fts5vocab table type to an\n** FTS5_VOCAB_XXX constant. If successful, set *peType to the output\n** value and return SQLITE_OK. Otherwise, set *pzErr to an error message\n** and return SQLITE_ERROR.\n*/\nstatic int fts5VocabTableType(const char *zType, char **pzErr, int *peType){\n  int rc = SQLITE_OK;\n  char *zCopy = sqlite3Fts5Strndup(&rc, zType, -1);\n  if( rc==SQLITE_OK ){\n    sqlite3Fts5Dequote(zCopy);\n    if( sqlite3_stricmp(zCopy, \"col\")==0 ){\n      *peType = FTS5_VOCAB_COL;\n    }else\n\n    if( sqlite3_stricmp(zCopy, \"row\")==0 ){\n      *peType = FTS5_VOCAB_ROW;\n    }else\n    if( sqlite3_stricmp(zCopy, \"instance\")==0 ){\n      *peType = FTS5_VOCAB_INSTANCE;\n    }else\n    {\n      *pzErr = sqlite3_mprintf(\"fts5vocab: unknown table type: %Q\", zCopy);\n      rc = SQLITE_ERROR;\n    }\n    sqlite3_free(zCopy);\n  }\n\n  return rc;\n}\n\n\n/*\n** The xDisconnect() virtual table method.\n*/\nstatic int fts5VocabDisconnectMethod(sqlite3_vtab *pVtab){\n  Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;\n  sqlite3_free(pTab);\n  return SQLITE_OK;\n}\n\n/*\n** The xDestroy() virtual table method.\n*/\nstatic int fts5VocabDestroyMethod(sqlite3_vtab *pVtab){\n  Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;\n  sqlite3_free(pTab);\n  return SQLITE_OK;\n}\n\n/*\n** This function is the implementation of both the xConnect and xCreate\n** methods of the FTS3 virtual table.\n**\n** The argv[] array contains the following:\n**\n**   argv[0]   -> module name  (\"fts5vocab\")\n**   argv[1]   -> database name\n**   argv[2]   -> table name\n**\n** then:\n**\n**   argv[3]   -> name of fts5 table\n**   argv[4]   -> type of fts5vocab table\n**\n** or, for tables in the TEMP schema only.\n**\n**   argv[3]   -> name of fts5 tables database\n**   argv[4]   -> name of fts5 table\n**   argv[5]   -> type of fts5vocab table\n*/\nstatic int fts5VocabInitVtab(\n  sqlite3 *db,                    /* The SQLite database connection */\n  void *pAux,                     /* Pointer to Fts5Global object */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVTab,          /* Write the resulting vtab structure here */\n  char **pzErr                    /* Write any error message here */\n){\n  const char *azSchema[] = {\n    \"CREATE TABlE vocab(\" FTS5_VOCAB_COL_SCHEMA  \")\",\n    \"CREATE TABlE vocab(\" FTS5_VOCAB_ROW_SCHEMA  \")\",\n    \"CREATE TABlE vocab(\" FTS5_VOCAB_INST_SCHEMA \")\"\n  };\n\n  Fts5VocabTable *pRet = 0;\n  int rc = SQLITE_OK;             /* Return code */\n  int bDb;\n\n  bDb = (argc==6 && strlen(argv[1])==4 && memcmp(\"temp\", argv[1], 4)==0);\n\n  if( argc!=5 && bDb==0 ){\n    *pzErr = sqlite3_mprintf(\"wrong number of vtable arguments\");\n    rc = SQLITE_ERROR;\n  }else{\n    i64 nByte;                      /* Bytes of space to allocate */\n    const char *zDb = bDb ? argv[3] : argv[1];\n    const char *zTab = bDb ? argv[4] : argv[3];\n    const char *zType = bDb ? argv[5] : argv[4];\n    i64 nDb = strlen(zDb)+1;\n    i64 nTab = strlen(zTab)+1;\n    int eType = 0;\n\n    rc = fts5VocabTableType(zType, pzErr, &eType);\n    if( rc==SQLITE_OK ){\n      assert( eType>=0 && eType<ArraySize(azSchema) );\n      rc = sqlite3_declare_vtab(db, azSchema[eType]);\n    }\n\n    nByte = sizeof(Fts5VocabTable) + nDb + nTab;\n    pRet = sqlite3Fts5MallocZero(&rc, nByte);\n    if( pRet ){\n      pRet->pGlobal = (Fts5Global*)pAux;\n      pRet->eType = eType;\n      pRet->db = db;\n      pRet->zFts5Tbl = (char*)&pRet[1];\n      pRet->zFts5Db = &pRet->zFts5Tbl[nTab];\n      memcpy(pRet->zFts5Tbl, zTab, nTab);\n      memcpy(pRet->zFts5Db, zDb, nDb);\n      sqlite3Fts5Dequote(pRet->zFts5Tbl);\n      sqlite3Fts5Dequote(pRet->zFts5Db);\n    }\n  }\n\n  *ppVTab = (sqlite3_vtab*)pRet;\n  return rc;\n}\n\n\n/*\n** The xConnect() and xCreate() methods for the virtual table. All the\n** work is done in function fts5VocabInitVtab().\n*/\nstatic int fts5VocabConnectMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts5VocabInitVtab(db, pAux, argc, argv, ppVtab, pzErr);\n}\nstatic int fts5VocabCreateMethod(\n  sqlite3 *db,                    /* Database connection */\n  void *pAux,                     /* Pointer to tokenizer hash table */\n  int argc,                       /* Number of elements in argv array */\n  const char * const *argv,       /* xCreate/xConnect argument array */\n  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */\n  char **pzErr                    /* OUT: sqlite3_malloc'd error message */\n){\n  return fts5VocabInitVtab(db, pAux, argc, argv, ppVtab, pzErr);\n}\n\n/*\n** Implementation of the xBestIndex method.\n**\n** Only constraints of the form:\n**\n**     term <= ?\n**     term == ?\n**     term >= ?\n**\n** are interpreted. Less-than and less-than-or-equal are treated\n** identically, as are greater-than and greater-than-or-equal.\n*/\nstatic int fts5VocabBestIndexMethod(\n  sqlite3_vtab *pUnused,\n  sqlite3_index_info *pInfo\n){\n  int i;\n  int iTermEq = -1;\n  int iTermGe = -1;\n  int iTermLe = -1;\n  int idxNum = (int)pInfo->colUsed;\n  int nArg = 0;\n\n  UNUSED_PARAM(pUnused);\n\n  assert( (pInfo->colUsed & FTS5_VOCAB_COLUSED_MASK)==pInfo->colUsed );\n\n  for(i=0; i<pInfo->nConstraint; i++){\n    struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];\n    if( p->usable==0 ) continue;\n    if( p->iColumn==0 ){          /* term column */\n      if( p->op==SQLITE_INDEX_CONSTRAINT_EQ ) iTermEq = i;\n      if( p->op==SQLITE_INDEX_CONSTRAINT_LE ) iTermLe = i;\n      if( p->op==SQLITE_INDEX_CONSTRAINT_LT ) iTermLe = i;\n      if( p->op==SQLITE_INDEX_CONSTRAINT_GE ) iTermGe = i;\n      if( p->op==SQLITE_INDEX_CONSTRAINT_GT ) iTermGe = i;\n    }\n  }\n\n  if( iTermEq>=0 ){\n    idxNum |= FTS5_VOCAB_TERM_EQ;\n    pInfo->aConstraintUsage[iTermEq].argvIndex = ++nArg;\n    pInfo->estimatedCost = 100;\n  }else{\n    pInfo->estimatedCost = 1000000;\n    if( iTermGe>=0 ){\n      idxNum |= FTS5_VOCAB_TERM_GE;\n      pInfo->aConstraintUsage[iTermGe].argvIndex = ++nArg;\n      pInfo->estimatedCost = pInfo->estimatedCost / 2;\n    }\n    if( iTermLe>=0 ){\n      idxNum |= FTS5_VOCAB_TERM_LE;\n      pInfo->aConstraintUsage[iTermLe].argvIndex = ++nArg;\n      pInfo->estimatedCost = pInfo->estimatedCost / 2;\n    }\n  }\n\n  /* This virtual table always delivers results in ascending order of\n  ** the \"term\" column (column 0). So if the user has requested this\n  ** specifically - \"ORDER BY term\" or \"ORDER BY term ASC\" - set the\n  ** sqlite3_index_info.orderByConsumed flag to tell the core the results\n  ** are already in sorted order.  */\n  if( pInfo->nOrderBy==1\n   && pInfo->aOrderBy[0].iColumn==0\n   && pInfo->aOrderBy[0].desc==0\n  ){\n    pInfo->orderByConsumed = 1;\n  }\n\n  pInfo->idxNum = idxNum;\n  return SQLITE_OK;\n}\n\n/*\n** Implementation of xOpen method.\n*/\nstatic int fts5VocabOpenMethod(\n  sqlite3_vtab *pVTab,\n  sqlite3_vtab_cursor **ppCsr\n){\n  Fts5VocabTable *pTab = (Fts5VocabTable*)pVTab;\n  Fts5Table *pFts5 = 0;\n  Fts5VocabCursor *pCsr = 0;\n  int rc = SQLITE_OK;\n  sqlite3_stmt *pStmt = 0;\n  char *zSql = 0;\n\n  if( pTab->bBusy ){\n    pVTab->zErrMsg = sqlite3_mprintf(\n       \"recursive definition for %s.%s\", pTab->zFts5Db, pTab->zFts5Tbl\n    );\n    return SQLITE_ERROR;\n  }\n  zSql = sqlite3Fts5Mprintf(&rc,\n      \"SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\",\n      pTab->zFts5Tbl, pTab->zFts5Db, pTab->zFts5Tbl, pTab->zFts5Tbl\n  );\n  if( zSql ){\n    rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pStmt, 0);\n  }\n  sqlite3_free(zSql);\n  assert( rc==SQLITE_OK || pStmt==0 );\n  if( rc==SQLITE_ERROR ) rc = SQLITE_OK;\n\n  pTab->bBusy = 1;\n  if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){\n    i64 iId = sqlite3_column_int64(pStmt, 0);\n    pFts5 = sqlite3Fts5TableFromCsrid(pTab->pGlobal, iId);\n  }\n  pTab->bBusy = 0;\n\n  if( rc==SQLITE_OK ){\n    if( pFts5==0 ){\n      rc = sqlite3_finalize(pStmt);\n      pStmt = 0;\n      if( rc==SQLITE_OK ){\n        pVTab->zErrMsg = sqlite3_mprintf(\n            \"no such fts5 table: %s.%s\", pTab->zFts5Db, pTab->zFts5Tbl\n        );\n        rc = SQLITE_ERROR;\n      }\n    }else{\n      rc = sqlite3Fts5FlushToDisk(pFts5);\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    i64 nByte = pFts5->pConfig->nCol * sizeof(i64)*2 + sizeof(Fts5VocabCursor);\n    pCsr = (Fts5VocabCursor*)sqlite3Fts5MallocZero(&rc, nByte);\n  }\n\n  if( pCsr ){\n    pCsr->pFts5 = pFts5;\n    pCsr->pStmt = pStmt;\n    pCsr->aCnt = (i64*)&pCsr[1];\n    pCsr->aDoc = &pCsr->aCnt[pFts5->pConfig->nCol];\n  }else{\n    sqlite3_finalize(pStmt);\n  }\n\n  *ppCsr = (sqlite3_vtab_cursor*)pCsr;\n  return rc;\n}\n\n/*\n** Restore cursor pCsr to the state it was in immediately after being\n** created by the xOpen() method.\n*/\nstatic void fts5VocabResetCursor(Fts5VocabCursor *pCsr){\n  int nCol = pCsr->pFts5->pConfig->nCol;\n  pCsr->rowid = 0;\n  sqlite3Fts5IterClose(pCsr->pIter);\n  sqlite3Fts5StructureRelease(pCsr->pStruct);\n  pCsr->pStruct = 0;\n  pCsr->pIter = 0;\n  sqlite3_free(pCsr->zLeTerm);\n  pCsr->nLeTerm = -1;\n  pCsr->zLeTerm = 0;\n  pCsr->bEof = 0;\n  pCsr->iCol = 0;\n  pCsr->iInstPos = 0;\n  pCsr->iInstOff = 0;\n  pCsr->colUsed = 0;\n  memset(pCsr->aCnt, 0, sizeof(i64)*nCol);\n  memset(pCsr->aDoc, 0, sizeof(i64)*nCol);\n}\n\n/*\n** Close the cursor.  For additional information see the documentation\n** on the xClose method of the virtual table interface.\n*/\nstatic int fts5VocabCloseMethod(sqlite3_vtab_cursor *pCursor){\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  fts5VocabResetCursor(pCsr);\n  sqlite3Fts5BufferFree(&pCsr->term);\n  sqlite3_finalize(pCsr->pStmt);\n  sqlite3_free(pCsr);\n  return SQLITE_OK;\n}\n\nstatic int fts5VocabInstanceNewTerm(Fts5VocabCursor *pCsr){\n  int rc = SQLITE_OK;\n\n  if( sqlite3Fts5IterEof(pCsr->pIter) ){\n    pCsr->bEof = 1;\n  }else{\n    const char *zTerm;\n    int nTerm;\n    zTerm = sqlite3Fts5IterTerm(pCsr->pIter, &nTerm);\n    if( pCsr->nLeTerm>=0 ){\n      int nCmp = MIN(nTerm, pCsr->nLeTerm);\n      int bCmp = memcmp(pCsr->zLeTerm, zTerm, nCmp);\n      if( bCmp<0 || (bCmp==0 && pCsr->nLeTerm<nTerm) ){\n        pCsr->bEof = 1;\n      }\n    }\n\n    sqlite3Fts5BufferSet(&rc, &pCsr->term, nTerm, (const u8*)zTerm);\n  }\n  return rc;\n}\n\nstatic int fts5VocabInstanceNext(Fts5VocabCursor *pCsr){\n  int eDetail = pCsr->pFts5->pConfig->eDetail;\n  int rc = SQLITE_OK;\n  Fts5IndexIter *pIter = pCsr->pIter;\n  i64 *pp = &pCsr->iInstPos;\n  int *po = &pCsr->iInstOff;\n\n  assert( sqlite3Fts5IterEof(pIter)==0 );\n  assert( pCsr->bEof==0 );\n  while( eDetail==FTS5_DETAIL_NONE\n      || sqlite3Fts5PoslistNext64(pIter->pData, pIter->nData, po, pp)\n  ){\n    pCsr->iInstPos = 0;\n    pCsr->iInstOff = 0;\n\n    rc = sqlite3Fts5IterNextScan(pCsr->pIter);\n    if( rc==SQLITE_OK ){\n      rc = fts5VocabInstanceNewTerm(pCsr);\n      if( pCsr->bEof || eDetail==FTS5_DETAIL_NONE ) break;\n    }\n    if( rc ){\n      pCsr->bEof = 1;\n      break;\n    }\n  }\n\n  return rc;\n}\n\n/*\n** Advance the cursor to the next row in the table.\n*/\nstatic int fts5VocabNextMethod(sqlite3_vtab_cursor *pCursor){\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;\n  int nCol = pCsr->pFts5->pConfig->nCol;\n  int rc;\n\n  rc = sqlite3Fts5StructureTest(pCsr->pFts5->pIndex, pCsr->pStruct);\n  if( rc!=SQLITE_OK ) return rc;\n  pCsr->rowid++;\n\n  if( pTab->eType==FTS5_VOCAB_INSTANCE ){\n    return fts5VocabInstanceNext(pCsr);\n  }\n\n  if( pTab->eType==FTS5_VOCAB_COL ){\n    for(pCsr->iCol++; pCsr->iCol<nCol; pCsr->iCol++){\n      if( pCsr->aDoc[pCsr->iCol] ) break;\n    }\n  }\n\n  if( pTab->eType!=FTS5_VOCAB_COL || pCsr->iCol>=nCol ){\n    if( sqlite3Fts5IterEof(pCsr->pIter) ){\n      pCsr->bEof = 1;\n    }else{\n      const char *zTerm;\n      int nTerm;\n\n      zTerm = sqlite3Fts5IterTerm(pCsr->pIter, &nTerm);\n      assert( nTerm>=0 );\n      if( pCsr->nLeTerm>=0 ){\n        int nCmp = MIN(nTerm, pCsr->nLeTerm);\n        int bCmp = memcmp(pCsr->zLeTerm, zTerm, nCmp);\n        if( bCmp<0 || (bCmp==0 && pCsr->nLeTerm<nTerm) ){\n          pCsr->bEof = 1;\n          return SQLITE_OK;\n        }\n      }\n\n      sqlite3Fts5BufferSet(&rc, &pCsr->term, nTerm, (const u8*)zTerm);\n      memset(pCsr->aCnt, 0, nCol * sizeof(i64));\n      memset(pCsr->aDoc, 0, nCol * sizeof(i64));\n      pCsr->iCol = 0;\n\n      assert( pTab->eType==FTS5_VOCAB_COL || pTab->eType==FTS5_VOCAB_ROW );\n      while( rc==SQLITE_OK ){\n        int eDetail = pCsr->pFts5->pConfig->eDetail;\n        const u8 *pPos; int nPos;   /* Position list */\n        i64 iPos = 0;               /* 64-bit position read from poslist */\n        int iOff = 0;               /* Current offset within position list */\n\n        pPos = pCsr->pIter->pData;\n        nPos = pCsr->pIter->nData;\n\n        switch( pTab->eType ){\n          case FTS5_VOCAB_ROW:\n            /* Do not bother counting the number of instances if the \"cnt\"\n            ** column is not being read (according to colUsed).  */\n            if( eDetail==FTS5_DETAIL_FULL && (pCsr->colUsed & 0x04) ){\n              while( iPos<nPos ){\n                u32 ii;\n                fts5FastGetVarint32(pPos, iPos, ii);\n                if( ii==1 ){\n                  /* New column in the position list */\n                  fts5FastGetVarint32(pPos, iPos, ii);\n                }else{\n                  /* An instance - increment pCsr->aCnt[] */\n                  pCsr->aCnt[0]++;\n                }\n              }\n            }\n            pCsr->aDoc[0]++;\n            break;\n\n          case FTS5_VOCAB_COL:\n            if( eDetail==FTS5_DETAIL_FULL ){\n              int iCol = -1;\n              while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){\n                int ii = FTS5_POS2COLUMN(iPos);\n                if( iCol!=ii ){\n                  if( ii>=nCol ){\n                    rc = FTS5_CORRUPT;\n                    break;\n                  }\n                  pCsr->aDoc[ii]++;\n                  iCol = ii;\n                }\n                pCsr->aCnt[ii]++;\n              }\n            }else if( eDetail==FTS5_DETAIL_COLUMNS ){\n              while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff,&iPos) ){\n                assert_nc( iPos>=0 && iPos<nCol );\n                if( iPos>=nCol ){\n                  rc = FTS5_CORRUPT;\n                  break;\n                }\n                pCsr->aDoc[iPos]++;\n              }\n            }else{\n              assert( eDetail==FTS5_DETAIL_NONE );\n              pCsr->aDoc[0]++;\n            }\n            break;\n\n          default:\n            assert( pTab->eType==FTS5_VOCAB_INSTANCE );\n            break;\n        }\n\n        if( rc==SQLITE_OK ){\n          rc = sqlite3Fts5IterNextScan(pCsr->pIter);\n        }\n        if( pTab->eType==FTS5_VOCAB_INSTANCE ) break;\n\n        if( rc==SQLITE_OK ){\n          zTerm = sqlite3Fts5IterTerm(pCsr->pIter, &nTerm);\n          if( nTerm!=pCsr->term.n\n          || (nTerm>0 && memcmp(zTerm, pCsr->term.p, nTerm))\n          ){\n            break;\n          }\n          if( sqlite3Fts5IterEof(pCsr->pIter) ) break;\n        }\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK && pCsr->bEof==0 && pTab->eType==FTS5_VOCAB_COL ){\n    for(/* noop */; pCsr->iCol<nCol && pCsr->aDoc[pCsr->iCol]==0; pCsr->iCol++);\n    if( pCsr->iCol==nCol ){\n      rc = FTS5_CORRUPT;\n    }\n  }\n  return rc;\n}\n\n/*\n** This is the xFilter implementation for the virtual table.\n*/\nstatic int fts5VocabFilterMethod(\n  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */\n  int idxNum,                     /* Strategy index */\n  const char *zUnused,            /* Unused */\n  int nUnused,                    /* Number of elements in apVal */\n  sqlite3_value **apVal           /* Arguments for the indexing scheme */\n){\n  Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  int eType = pTab->eType;\n  int rc = SQLITE_OK;\n\n  int iVal = 0;\n  int f = FTS5INDEX_QUERY_SCAN;\n  const char *zTerm = 0;\n  int nTerm = 0;\n\n  sqlite3_value *pEq = 0;\n  sqlite3_value *pGe = 0;\n  sqlite3_value *pLe = 0;\n\n  UNUSED_PARAM2(zUnused, nUnused);\n\n  fts5VocabResetCursor(pCsr);\n  if( idxNum & FTS5_VOCAB_TERM_EQ ) pEq = apVal[iVal++];\n  if( idxNum & FTS5_VOCAB_TERM_GE ) pGe = apVal[iVal++];\n  if( idxNum & FTS5_VOCAB_TERM_LE ) pLe = apVal[iVal++];\n  pCsr->colUsed = (idxNum & FTS5_VOCAB_COLUSED_MASK);\n\n  if( pEq ){\n    zTerm = (const char *)sqlite3_value_text(pEq);\n    nTerm = sqlite3_value_bytes(pEq);\n    f = FTS5INDEX_QUERY_NOTOKENDATA;\n  }else{\n    if( pGe ){\n      zTerm = (const char *)sqlite3_value_text(pGe);\n      nTerm = sqlite3_value_bytes(pGe);\n    }\n    if( pLe ){\n      const char *zCopy = (const char *)sqlite3_value_text(pLe);\n      if( zCopy==0 ) zCopy = \"\";\n      pCsr->nLeTerm = sqlite3_value_bytes(pLe);\n      pCsr->zLeTerm = sqlite3_malloc(pCsr->nLeTerm+1);\n      if( pCsr->zLeTerm==0 ){\n        rc = SQLITE_NOMEM;\n      }else{\n        memcpy(pCsr->zLeTerm, zCopy, pCsr->nLeTerm+1);\n      }\n    }\n  }\n\n  if( rc==SQLITE_OK ){\n    Fts5Index *pIndex = pCsr->pFts5->pIndex;\n    rc = sqlite3Fts5IndexQuery(pIndex, zTerm, nTerm, f, 0, &pCsr->pIter);\n    if( rc==SQLITE_OK ){\n      pCsr->pStruct = sqlite3Fts5StructureRef(pIndex);\n    }\n  }\n  if( rc==SQLITE_OK && eType==FTS5_VOCAB_INSTANCE ){\n    rc = fts5VocabInstanceNewTerm(pCsr);\n  }\n  if( rc==SQLITE_OK && !pCsr->bEof\n   && (eType!=FTS5_VOCAB_INSTANCE\n    || pCsr->pFts5->pConfig->eDetail!=FTS5_DETAIL_NONE)\n  ){\n    rc = fts5VocabNextMethod(pCursor);\n  }\n\n  return rc;\n}\n\n/*\n** This is the xEof method of the virtual table. SQLite calls this\n** routine to find out if it has reached the end of a result set.\n*/\nstatic int fts5VocabEofMethod(sqlite3_vtab_cursor *pCursor){\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  return pCsr->bEof;\n}\n\nstatic int fts5VocabColumnMethod(\n  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */\n  sqlite3_context *pCtx,          /* Context for sqlite3_result_xxx() calls */\n  int iCol                        /* Index of column to read value from */\n){\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  int eDetail = pCsr->pFts5->pConfig->eDetail;\n  int eType = ((Fts5VocabTable*)(pCursor->pVtab))->eType;\n  i64 iVal = 0;\n\n  if( iCol==0 ){\n    sqlite3_result_text(\n        pCtx, (const char*)pCsr->term.p, pCsr->term.n, SQLITE_TRANSIENT\n    );\n  }else if( eType==FTS5_VOCAB_COL ){\n    assert( iCol==1 || iCol==2 || iCol==3 );\n    if( iCol==1 ){\n      if( eDetail!=FTS5_DETAIL_NONE ){\n        const char *z = pCsr->pFts5->pConfig->azCol[pCsr->iCol];\n        sqlite3_result_text(pCtx, z, -1, SQLITE_STATIC);\n      }\n    }else if( iCol==2 ){\n      iVal = pCsr->aDoc[pCsr->iCol];\n    }else{\n      iVal = pCsr->aCnt[pCsr->iCol];\n    }\n  }else if( eType==FTS5_VOCAB_ROW ){\n    assert( iCol==1 || iCol==2 );\n    if( iCol==1 ){\n      iVal = pCsr->aDoc[0];\n    }else{\n      iVal = pCsr->aCnt[0];\n    }\n  }else{\n    assert( eType==FTS5_VOCAB_INSTANCE );\n    switch( iCol ){\n      case 1:\n        sqlite3_result_int64(pCtx, pCsr->pIter->iRowid);\n        break;\n      case 2: {\n        int ii = -1;\n        if( eDetail==FTS5_DETAIL_FULL ){\n          ii = FTS5_POS2COLUMN(pCsr->iInstPos);\n        }else if( eDetail==FTS5_DETAIL_COLUMNS ){\n          ii = (int)pCsr->iInstPos;\n        }\n        if( ii>=0 && ii<pCsr->pFts5->pConfig->nCol ){\n          const char *z = pCsr->pFts5->pConfig->azCol[ii];\n          sqlite3_result_text(pCtx, z, -1, SQLITE_STATIC);\n        }\n        break;\n      }\n      default: {\n        assert( iCol==3 );\n        if( eDetail==FTS5_DETAIL_FULL ){\n          int ii = FTS5_POS2OFFSET(pCsr->iInstPos);\n          sqlite3_result_int(pCtx, ii);\n        }\n        break;\n      }\n    }\n  }\n\n  if( iVal>0 ) sqlite3_result_int64(pCtx, iVal);\n  return SQLITE_OK;\n}\n\n/*\n** This is the xRowid method. The SQLite core calls this routine to\n** retrieve the rowid for the current row of the result set. The\n** rowid should be written to *pRowid.\n*/\nstatic int fts5VocabRowidMethod(\n  sqlite3_vtab_cursor *pCursor,\n  sqlite_int64 *pRowid\n){\n  Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;\n  *pRowid = pCsr->rowid;\n  return SQLITE_OK;\n}\n\nstatic int sqlite3Fts5VocabInit(Fts5Global *pGlobal, sqlite3 *db){\n  static const sqlite3_module fts5Vocab = {\n    /* iVersion      */ 2,\n    /* xCreate       */ fts5VocabCreateMethod,\n    /* xConnect      */ fts5VocabConnectMethod,\n    /* xBestIndex    */ fts5VocabBestIndexMethod,\n    /* xDisconnect   */ fts5VocabDisconnectMethod,\n    /* xDestroy      */ fts5VocabDestroyMethod,\n    /* xOpen         */ fts5VocabOpenMethod,\n    /* xClose        */ fts5VocabCloseMethod,\n    /* xFilter       */ fts5VocabFilterMethod,\n    /* xNext         */ fts5VocabNextMethod,\n    /* xEof          */ fts5VocabEofMethod,\n    /* xColumn       */ fts5VocabColumnMethod,\n    /* xRowid        */ fts5VocabRowidMethod,\n    /* xUpdate       */ 0,\n    /* xBegin        */ 0,\n    /* xSync         */ 0,\n    /* xCommit       */ 0,\n    /* xRollback     */ 0,\n    /* xFindFunction */ 0,\n    /* xRename       */ 0,\n    /* xSavepoint    */ 0,\n    /* xRelease      */ 0,\n    /* xRollbackTo   */ 0,\n    /* xShadowName   */ 0,\n    /* xIntegrity    */ 0\n  };\n  void *p = (void*)pGlobal;\n\n  return sqlite3_create_module_v2(db, \"fts5vocab\", &fts5Vocab, p, 0);\n}\n\n\n/* Here ends the fts5.c composite file. */\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */\n\n/************** End of fts5.c ************************************************/\n/************** Begin file stmt.c ********************************************/\n/*\n** 2017-05-31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n**\n** This file demonstrates an eponymous virtual table that returns information\n** about all prepared statements for the database connection.\n**\n** Usage example:\n**\n**     .load ./stmt\n**     .mode line\n**     .header on\n**     SELECT * FROM stmt;\n*/\n#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB)\n#if !defined(SQLITEINT_H)\n/* #include \"sqlite3ext.h\" */\n#endif\nSQLITE_EXTENSION_INIT1\n/* #include <assert.h> */\n/* #include <string.h> */\n\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n\n\n#define STMT_NUM_INTEGER_COLUMN 10\ntypedef struct StmtRow StmtRow;\nstruct StmtRow {\n  sqlite3_int64 iRowid;                /* Rowid value */\n  char *zSql;                          /* column \"sql\" */\n  int aCol[STMT_NUM_INTEGER_COLUMN+1]; /* all other column values */\n  StmtRow *pNext;                      /* Next row to return */\n};\n\n/* stmt_vtab is a subclass of sqlite3_vtab which will\n** serve as the underlying representation of a stmt virtual table\n*/\ntypedef struct stmt_vtab stmt_vtab;\nstruct stmt_vtab {\n  sqlite3_vtab base;  /* Base class - must be first */\n  sqlite3 *db;        /* Database connection for this stmt vtab */\n};\n\n/* stmt_cursor is a subclass of sqlite3_vtab_cursor which will\n** serve as the underlying representation of a cursor that scans\n** over rows of the result\n*/\ntypedef struct stmt_cursor stmt_cursor;\nstruct stmt_cursor {\n  sqlite3_vtab_cursor base;  /* Base class - must be first */\n  sqlite3 *db;               /* Database connection for this cursor */\n  StmtRow *pRow;             /* Current row */\n};\n\n/*\n** The stmtConnect() method is invoked to create a new\n** stmt_vtab that describes the stmt virtual table.\n**\n** Think of this routine as the constructor for stmt_vtab objects.\n**\n** All this routine needs to do is:\n**\n**    (1) Allocate the stmt_vtab object and initialize all fields.\n**\n**    (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the\n**        result set of queries against stmt will look like.\n*/\nstatic int stmtConnect(\n  sqlite3 *db,\n  void *pAux,\n  int argc, const char *const*argv,\n  sqlite3_vtab **ppVtab,\n  char **pzErr\n){\n  stmt_vtab *pNew;\n  int rc;\n\n/* Column numbers */\n#define STMT_COLUMN_SQL     0   /* SQL for the statement */\n#define STMT_COLUMN_NCOL    1   /* Number of result columns */\n#define STMT_COLUMN_RO      2   /* True if read-only */\n#define STMT_COLUMN_BUSY    3   /* True if currently busy */\n#define STMT_COLUMN_NSCAN   4   /* SQLITE_STMTSTATUS_FULLSCAN_STEP */\n#define STMT_COLUMN_NSORT   5   /* SQLITE_STMTSTATUS_SORT */\n#define STMT_COLUMN_NAIDX   6   /* SQLITE_STMTSTATUS_AUTOINDEX */\n#define STMT_COLUMN_NSTEP   7   /* SQLITE_STMTSTATUS_VM_STEP */\n#define STMT_COLUMN_REPREP  8   /* SQLITE_STMTSTATUS_REPREPARE */\n#define STMT_COLUMN_RUN     9   /* SQLITE_STMTSTATUS_RUN */\n#define STMT_COLUMN_MEM    10   /* SQLITE_STMTSTATUS_MEMUSED */\n\n\n  (void)pAux;\n  (void)argc;\n  (void)argv;\n  (void)pzErr;\n  rc = sqlite3_declare_vtab(db,\n     \"CREATE TABLE x(sql,ncol,ro,busy,nscan,nsort,naidx,nstep,\"\n                    \"reprep,run,mem)\");\n  if( rc==SQLITE_OK ){\n    pNew = sqlite3_malloc64( sizeof(*pNew) );\n    *ppVtab = (sqlite3_vtab*)pNew;\n    if( pNew==0 ) return SQLITE_NOMEM;\n    memset(pNew, 0, sizeof(*pNew));\n    pNew->db = db;\n  }\n  return rc;\n}\n\n/*\n** This method is the destructor for stmt_cursor objects.\n*/\nstatic int stmtDisconnect(sqlite3_vtab *pVtab){\n  sqlite3_free(pVtab);\n  return SQLITE_OK;\n}\n\n/*\n** Constructor for a new stmt_cursor object.\n*/\nstatic int stmtOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){\n  stmt_cursor *pCur;\n  pCur = sqlite3_malloc64( sizeof(*pCur) );\n  if( pCur==0 ) return SQLITE_NOMEM;\n  memset(pCur, 0, sizeof(*pCur));\n  pCur->db = ((stmt_vtab*)p)->db;\n  *ppCursor = &pCur->base;\n  return SQLITE_OK;\n}\n\nstatic void stmtCsrReset(stmt_cursor *pCur){\n  StmtRow *pRow = 0;\n  StmtRow *pNext = 0;\n  for(pRow=pCur->pRow; pRow; pRow=pNext){\n    pNext = pRow->pNext;\n    sqlite3_free(pRow);\n  }\n  pCur->pRow = 0;\n}\n\n/*\n** Destructor for a stmt_cursor.\n*/\nstatic int stmtClose(sqlite3_vtab_cursor *cur){\n  stmtCsrReset((stmt_cursor*)cur);\n  sqlite3_free(cur);\n  return SQLITE_OK;\n}\n\n\n/*\n** Advance a stmt_cursor to its next row of output.\n*/\nstatic int stmtNext(sqlite3_vtab_cursor *cur){\n  stmt_cursor *pCur = (stmt_cursor*)cur;\n  StmtRow *pNext = pCur->pRow->pNext;\n  sqlite3_free(pCur->pRow);\n  pCur->pRow = pNext;\n  return SQLITE_OK;\n}\n\n/*\n** Return values of columns for the row at which the stmt_cursor\n** is currently pointing.\n*/\nstatic int stmtColumn(\n  sqlite3_vtab_cursor *cur,   /* The cursor */\n  sqlite3_context *ctx,       /* First argument to sqlite3_result_...() */\n  int i                       /* Which column to return */\n){\n  stmt_cursor *pCur = (stmt_cursor*)cur;\n  StmtRow *pRow = pCur->pRow;\n  if( i==STMT_COLUMN_SQL ){\n    sqlite3_result_text(ctx, pRow->zSql, -1, SQLITE_TRANSIENT);\n  }else{\n    sqlite3_result_int(ctx, pRow->aCol[i]);\n  }\n  return SQLITE_OK;\n}\n\n/*\n** Return the rowid for the current row.  In this implementation, the\n** rowid is the same as the output value.\n*/\nstatic int stmtRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){\n  stmt_cursor *pCur = (stmt_cursor*)cur;\n  *pRowid = pCur->pRow->iRowid;\n  return SQLITE_OK;\n}\n\n/*\n** Return TRUE if the cursor has been moved off of the last\n** row of output.\n*/\nstatic int stmtEof(sqlite3_vtab_cursor *cur){\n  stmt_cursor *pCur = (stmt_cursor*)cur;\n  return pCur->pRow==0;\n}\n\n/*\n** This method is called to \"rewind\" the stmt_cursor object back\n** to the first row of output.  This method is always called at least\n** once prior to any call to stmtColumn() or stmtRowid() or\n** stmtEof().\n*/\nstatic int stmtFilter(\n  sqlite3_vtab_cursor *pVtabCursor,\n  int idxNum, const char *idxStr,\n  int argc, sqlite3_value **argv\n){\n  stmt_cursor *pCur = (stmt_cursor *)pVtabCursor;\n  sqlite3_stmt *p = 0;\n  sqlite3_int64 iRowid = 1;\n  StmtRow **ppRow = 0;\n\n  (void)idxNum;\n  (void)idxStr;\n  (void)argc;\n  (void)argv;\n  stmtCsrReset(pCur);\n  ppRow = &pCur->pRow;\n  for(p=sqlite3_next_stmt(pCur->db, 0); p; p=sqlite3_next_stmt(pCur->db, p)){\n    const char *zSql = sqlite3_sql(p);\n    sqlite3_int64 nSql = zSql ? strlen(zSql)+1 : 0;\n    StmtRow *pNew = (StmtRow*)sqlite3_malloc64(sizeof(StmtRow) + nSql);\n\n    if( pNew==0 ) return SQLITE_NOMEM;\n    memset(pNew, 0, sizeof(StmtRow));\n    if( zSql ){\n      pNew->zSql = (char*)&pNew[1];\n      memcpy(pNew->zSql, zSql, nSql);\n    }\n    pNew->aCol[STMT_COLUMN_NCOL] = sqlite3_column_count(p);\n    pNew->aCol[STMT_COLUMN_RO] = sqlite3_stmt_readonly(p);\n    pNew->aCol[STMT_COLUMN_BUSY] = sqlite3_stmt_busy(p);\n    pNew->aCol[STMT_COLUMN_NSCAN] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_FULLSCAN_STEP, 0\n    );\n    pNew->aCol[STMT_COLUMN_NSORT] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_SORT, 0\n    );\n    pNew->aCol[STMT_COLUMN_NAIDX] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_AUTOINDEX, 0\n    );\n    pNew->aCol[STMT_COLUMN_NSTEP] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_VM_STEP, 0\n    );\n    pNew->aCol[STMT_COLUMN_REPREP] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_REPREPARE, 0\n    );\n    pNew->aCol[STMT_COLUMN_RUN] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_RUN, 0\n    );\n    pNew->aCol[STMT_COLUMN_MEM] = sqlite3_stmt_status(\n        p, SQLITE_STMTSTATUS_MEMUSED, 0\n    );\n    pNew->iRowid = iRowid++;\n    *ppRow = pNew;\n    ppRow = &pNew->pNext;\n  }\n\n  return SQLITE_OK;\n}\n\n/*\n** SQLite will invoke this method one or more times while planning a query\n** that uses the stmt virtual table.  This routine needs to create\n** a query plan for each invocation and compute an estimated cost for that\n** plan.\n*/\nstatic int stmtBestIndex(\n  sqlite3_vtab *tab,\n  sqlite3_index_info *pIdxInfo\n){\n  (void)tab;\n  pIdxInfo->estimatedCost = (double)500;\n  pIdxInfo->estimatedRows = 500;\n  return SQLITE_OK;\n}\n\n/*\n** This following structure defines all the methods for the\n** stmt virtual table.\n*/\nstatic sqlite3_module stmtModule = {\n  0,                         /* iVersion */\n  0,                         /* xCreate */\n  stmtConnect,               /* xConnect */\n  stmtBestIndex,             /* xBestIndex */\n  stmtDisconnect,            /* xDisconnect */\n  0,                         /* xDestroy */\n  stmtOpen,                  /* xOpen - open a cursor */\n  stmtClose,                 /* xClose - close a cursor */\n  stmtFilter,                /* xFilter - configure scan constraints */\n  stmtNext,                  /* xNext - advance a cursor */\n  stmtEof,                   /* xEof - check for end of scan */\n  stmtColumn,                /* xColumn - read data */\n  stmtRowid,                 /* xRowid - read data */\n  0,                         /* xUpdate */\n  0,                         /* xBegin */\n  0,                         /* xSync */\n  0,                         /* xCommit */\n  0,                         /* xRollback */\n  0,                         /* xFindMethod */\n  0,                         /* xRename */\n  0,                         /* xSavepoint */\n  0,                         /* xRelease */\n  0,                         /* xRollbackTo */\n  0,                         /* xShadowName */\n  0                          /* xIntegrity */\n};\n\n#endif /* SQLITE_OMIT_VIRTUALTABLE */\n\nSQLITE_PRIVATE int sqlite3StmtVtabInit(sqlite3 *db){\n  int rc = SQLITE_OK;\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  rc = sqlite3_create_module(db, \"sqlite_stmt\", &stmtModule, 0);\n#endif\n  return rc;\n}\n\n#ifndef SQLITE_CORE\n#ifdef _WIN32\n__declspec(dllexport)\n#endif\nSQLITE_API int sqlite3_stmt_init(\n  sqlite3 *db,\n  char **pzErrMsg,\n  const sqlite3_api_routines *pApi\n){\n  int rc = SQLITE_OK;\n  SQLITE_EXTENSION_INIT2(pApi);\n#ifndef SQLITE_OMIT_VIRTUALTABLE\n  rc = sqlite3StmtVtabInit(db);\n#endif\n  return rc;\n}\n#endif /* SQLITE_CORE */\n#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */\n\n/************** End of stmt.c ************************************************/\n/* Return the source-id for this library */\nSQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }\n#endif /* SQLITE_AMALGAMATION */\n/************************** End of sqlite3.c ******************************/\n#else // USE_LIBSQLITE3\n // If users really want to link against the system sqlite3 we\n// need to make this file a noop.\n #endif"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h",
    "content": "#ifndef USE_LIBSQLITE3\n/*\n** 2001-09-15\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the interface that the SQLite library\n** presents to client programs.  If a C-function, structure, datatype,\n** or constant definition does not appear in this file, then it is\n** not a published API of SQLite, is subject to change without\n** notice, and should not be referenced by programs that use SQLite.\n**\n** Some of the definitions that are in this file are marked as\n** \"experimental\".  Experimental interfaces are normally new\n** features recently added to SQLite.  We do not anticipate changes\n** to experimental interfaces but reserve the right to make minor changes\n** if experience from use \"in the wild\" suggest such changes are prudent.\n**\n** The official C-language API documentation for SQLite is derived\n** from comments in this file.  This file is the authoritative source\n** on how SQLite interfaces are supposed to operate.\n**\n** The name of this file under configuration management is \"sqlite.h.in\".\n** The makefile makes some minor changes to this file (such as inserting\n** the version number) and changes its name to \"sqlite3.h\" as\n** part of the build process.\n*/\n#ifndef SQLITE3_H\n#define SQLITE3_H\n#include <stdarg.h>     /* Needed for the definition of va_list */\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*\n** Facilitate override of interface linkage and calling conventions.\n** Be aware that these macros may not be used within this particular\n** translation of the amalgamation and its associated header file.\n**\n** The SQLITE_EXTERN and SQLITE_API macros are used to instruct the\n** compiler that the target identifier should have external linkage.\n**\n** The SQLITE_CDECL macro is used to set the calling convention for\n** public functions that accept a variable number of arguments.\n**\n** The SQLITE_APICALL macro is used to set the calling convention for\n** public functions that accept a fixed number of arguments.\n**\n** The SQLITE_STDCALL macro is no longer used and is now deprecated.\n**\n** The SQLITE_CALLBACK macro is used to set the calling convention for\n** function pointers.\n**\n** The SQLITE_SYSAPI macro is used to set the calling convention for\n** functions provided by the operating system.\n**\n** Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and\n** SQLITE_SYSAPI macros are used only when building for environments\n** that require non-default calling conventions.\n*/\n#ifndef SQLITE_EXTERN\n# define SQLITE_EXTERN extern\n#endif\n#ifndef SQLITE_API\n# define SQLITE_API\n#endif\n#ifndef SQLITE_CDECL\n# define SQLITE_CDECL\n#endif\n#ifndef SQLITE_APICALL\n# define SQLITE_APICALL\n#endif\n#ifndef SQLITE_STDCALL\n# define SQLITE_STDCALL SQLITE_APICALL\n#endif\n#ifndef SQLITE_CALLBACK\n# define SQLITE_CALLBACK\n#endif\n#ifndef SQLITE_SYSAPI\n# define SQLITE_SYSAPI\n#endif\n\n/*\n** These no-op macros are used in front of interfaces to mark those\n** interfaces as either deprecated or experimental.  New applications\n** should not use deprecated interfaces - they are supported for backwards\n** compatibility only.  Application writers should be aware that\n** experimental interfaces are subject to change in point releases.\n**\n** These macros used to resolve to various kinds of compiler magic that\n** would generate warning messages when they were used.  But that\n** compiler magic ended up generating such a flurry of bug reports\n** that we have taken it all out and gone back to using simple\n** noop macros.\n*/\n#define SQLITE_DEPRECATED\n#define SQLITE_EXPERIMENTAL\n\n/*\n** Ensure these symbols were not defined by some previous header file.\n*/\n#ifdef SQLITE_VERSION\n# undef SQLITE_VERSION\n#endif\n#ifdef SQLITE_VERSION_NUMBER\n# undef SQLITE_VERSION_NUMBER\n#endif\n\n/*\n** CAPI3REF: Compile-Time Library Version Numbers\n**\n** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header\n** evaluates to a string literal that is the SQLite version in the\n** format \"X.Y.Z\" where X is the major version number (always 3 for\n** SQLite3) and Y is the minor version number and Z is the release number.)^\n** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer\n** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same\n** numbers used in [SQLITE_VERSION].)^\n** The SQLITE_VERSION_NUMBER for any given release of SQLite will also\n** be larger than the release from which it is derived.  Either Y will\n** be held constant and Z will be incremented or else Y will be incremented\n** and Z will be reset to zero.\n**\n** Since [version 3.6.18] ([dateof:3.6.18]),\n** SQLite source code has been stored in the\n** <a href=\"http://fossil-scm.org/\">Fossil configuration management\n** system</a>.  ^The SQLITE_SOURCE_ID macro evaluates to\n** a string which identifies a particular check-in of SQLite\n** within its configuration management system.  ^The SQLITE_SOURCE_ID\n** string contains the date and time of the check-in (UTC) and a SHA1\n** or SHA3-256 hash of the entire source tree.  If the source code has\n** been edited in any way since it was last checked in, then the last\n** four hexadecimal digits of the hash may be modified.\n**\n** See also: [sqlite3_libversion()],\n** [sqlite3_libversion_number()], [sqlite3_sourceid()],\n** [sqlite_version()] and [sqlite_source_id()].\n*/\n#define SQLITE_VERSION        \"3.51.2\"\n#define SQLITE_VERSION_NUMBER 3051002\n#define SQLITE_SOURCE_ID      \"2026-01-09 17:27:48 b270f8339eb13b504d0b2ba154ebca966b7dde08e40c3ed7d559749818cb2075\"\n#define SQLITE_SCM_BRANCH     \"branch-3.51\"\n#define SQLITE_SCM_TAGS       \"release version-3.51.2\"\n#define SQLITE_SCM_DATETIME   \"2026-01-09T17:27:48.405Z\"\n\n/*\n** CAPI3REF: Run-Time Library Version Numbers\n** KEYWORDS: sqlite3_version sqlite3_sourceid\n**\n** These interfaces provide the same information as the [SQLITE_VERSION],\n** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros\n** but are associated with the library instead of the header file.  ^(Cautious\n** programmers might include assert() statements in their application to\n** verify that values returned by these interfaces match the macros in\n** the header, and thus ensure that the application is\n** compiled with matching library and header files.\n**\n** <blockquote><pre>\n** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );\n** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );\n** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );\n** </pre></blockquote>)^\n**\n** ^The sqlite3_version[] string constant contains the text of the\n** [SQLITE_VERSION] macro.  ^The sqlite3_libversion() function returns a\n** pointer to the sqlite3_version[] string constant.  The sqlite3_libversion()\n** function is provided for use in DLLs since DLL users usually do not have\n** direct access to string constants within the DLL.  ^The\n** sqlite3_libversion_number() function returns an integer equal to\n** [SQLITE_VERSION_NUMBER].  ^(The sqlite3_sourceid() function returns\n** a pointer to a string constant whose value is the same as the\n** [SQLITE_SOURCE_ID] C preprocessor macro.  Except if SQLite is built\n** using an edited copy of [the amalgamation], then the last four characters\n** of the hash might be different from [SQLITE_SOURCE_ID].)^\n**\n** See also: [sqlite_version()] and [sqlite_source_id()].\n*/\nSQLITE_API SQLITE_EXTERN const char sqlite3_version[];\nSQLITE_API const char *sqlite3_libversion(void);\nSQLITE_API const char *sqlite3_sourceid(void);\nSQLITE_API int sqlite3_libversion_number(void);\n\n/*\n** CAPI3REF: Run-Time Library Compilation Options Diagnostics\n**\n** ^The sqlite3_compileoption_used() function returns 0 or 1\n** indicating whether the specified option was defined at\n** compile time.  ^The SQLITE_ prefix may be omitted from the\n** option name passed to sqlite3_compileoption_used().\n**\n** ^The sqlite3_compileoption_get() function allows iterating\n** over the list of options that were defined at compile time by\n** returning the N-th compile time option string.  ^If N is out of range,\n** sqlite3_compileoption_get() returns a NULL pointer.  ^The SQLITE_\n** prefix is omitted from any strings returned by\n** sqlite3_compileoption_get().\n**\n** ^Support for the diagnostic functions sqlite3_compileoption_used()\n** and sqlite3_compileoption_get() may be omitted by specifying the\n** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.\n**\n** See also: SQL functions [sqlite_compileoption_used()] and\n** [sqlite_compileoption_get()] and the [compile_options pragma].\n*/\n#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS\nSQLITE_API int sqlite3_compileoption_used(const char *zOptName);\nSQLITE_API const char *sqlite3_compileoption_get(int N);\n#else\n# define sqlite3_compileoption_used(X) 0\n# define sqlite3_compileoption_get(X)  ((void*)0)\n#endif\n\n/*\n** CAPI3REF: Test To See If The Library Is Threadsafe\n**\n** ^The sqlite3_threadsafe() function returns zero if and only if\n** SQLite was compiled with mutexing code omitted due to the\n** [SQLITE_THREADSAFE] compile-time option being set to 0.\n**\n** SQLite can be compiled with or without mutexes.  When\n** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes\n** are enabled and SQLite is threadsafe.  When the\n** [SQLITE_THREADSAFE] macro is 0,\n** the mutexes are omitted.  Without the mutexes, it is not safe\n** to use SQLite concurrently from more than one thread.\n**\n** Enabling mutexes incurs a measurable performance penalty.\n** So if speed is of utmost importance, it makes sense to disable\n** the mutexes.  But for maximum safety, mutexes should be enabled.\n** ^The default behavior is for mutexes to be enabled.\n**\n** This interface can be used by an application to make sure that the\n** version of SQLite that it is linking against was compiled with\n** the desired setting of the [SQLITE_THREADSAFE] macro.\n**\n** This interface only reports on the compile-time mutex setting\n** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with\n** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but\n** can be fully or partially disabled using a call to [sqlite3_config()]\n** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],\n** or [SQLITE_CONFIG_SERIALIZED].  ^(The return value of the\n** sqlite3_threadsafe() function shows only the compile-time setting of\n** thread safety, not any run-time changes to that setting made by\n** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()\n** is unchanged by calls to sqlite3_config().)^\n**\n** See the [threading mode] documentation for additional information.\n*/\nSQLITE_API int sqlite3_threadsafe(void);\n\n/*\n** CAPI3REF: Database Connection Handle\n** KEYWORDS: {database connection} {database connections}\n**\n** Each open SQLite database is represented by a pointer to an instance of\n** the opaque structure named \"sqlite3\".  It is useful to think of an sqlite3\n** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and\n** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]\n** and [sqlite3_close_v2()] are its destructors.  There are many other\n** interfaces (such as\n** [sqlite3_prepare_v2()], [sqlite3_create_function()], and\n** [sqlite3_busy_timeout()] to name but three) that are methods on an\n** sqlite3 object.\n*/\ntypedef struct sqlite3 sqlite3;\n\n/*\n** CAPI3REF: 64-Bit Integer Types\n** KEYWORDS: sqlite_int64 sqlite_uint64\n**\n** Because there is no cross-platform way to specify 64-bit integer types\n** SQLite includes typedefs for 64-bit signed and unsigned integers.\n**\n** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.\n** The sqlite_int64 and sqlite_uint64 types are supported for backwards\n** compatibility only.\n**\n** ^The sqlite3_int64 and sqlite_int64 types can store integer values\n** between -9223372036854775808 and +9223372036854775807 inclusive.  ^The\n** sqlite3_uint64 and sqlite_uint64 types can store integer values\n** between 0 and +18446744073709551615 inclusive.\n*/\n#ifdef SQLITE_INT64_TYPE\n  typedef SQLITE_INT64_TYPE sqlite_int64;\n# ifdef SQLITE_UINT64_TYPE\n    typedef SQLITE_UINT64_TYPE sqlite_uint64;\n# else\n    typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;\n# endif\n#elif defined(_MSC_VER) || defined(__BORLANDC__)\n  typedef __int64 sqlite_int64;\n  typedef unsigned __int64 sqlite_uint64;\n#else\n  typedef long long int sqlite_int64;\n  typedef unsigned long long int sqlite_uint64;\n#endif\ntypedef sqlite_int64 sqlite3_int64;\ntypedef sqlite_uint64 sqlite3_uint64;\n\n/*\n** If compiling for a processor that lacks floating point support,\n** substitute integer for floating-point.\n*/\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# define double sqlite3_int64\n#endif\n\n/*\n** CAPI3REF: Closing A Database Connection\n** DESTRUCTOR: sqlite3\n**\n** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors\n** for the [sqlite3] object.\n** ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if\n** the [sqlite3] object is successfully destroyed and all associated\n** resources are deallocated.\n**\n** Ideally, applications should [sqlite3_finalize | finalize] all\n** [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and\n** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated\n** with the [sqlite3] object prior to attempting to close the object.\n** ^If the database connection is associated with unfinalized prepared\n** statements, BLOB handlers, and/or unfinished sqlite3_backup objects then\n** sqlite3_close() will leave the database connection open and return\n** [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared\n** statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups,\n** it returns [SQLITE_OK] regardless, but instead of deallocating the database\n** connection immediately, it marks the database connection as an unusable\n** \"zombie\" and makes arrangements to automatically deallocate the database\n** connection after all prepared statements are finalized, all BLOB handles\n** are closed, and all backups have finished. The sqlite3_close_v2() interface\n** is intended for use with host languages that are garbage collected, and\n** where the order in which destructors are called is arbitrary.\n**\n** ^If an [sqlite3] object is destroyed while a transaction is open,\n** the transaction is automatically rolled back.\n**\n** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)]\n** must be either a NULL\n** pointer or an [sqlite3] object pointer obtained\n** from [sqlite3_open()], [sqlite3_open16()], or\n** [sqlite3_open_v2()], and not previously closed.\n** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer\n** argument is a harmless no-op.\n*/\nSQLITE_API int sqlite3_close(sqlite3*);\nSQLITE_API int sqlite3_close_v2(sqlite3*);\n\n/*\n** The type for a callback function.\n** This is legacy and deprecated.  It is included for historical\n** compatibility and is not documented.\n*/\ntypedef int (*sqlite3_callback)(void*,int,char**, char**);\n\n/*\n** CAPI3REF: One-Step Query Execution Interface\n** METHOD: sqlite3\n**\n** The sqlite3_exec() interface is a convenience wrapper around\n** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],\n** that allows an application to run multiple statements of SQL\n** without having to use a lot of C code.\n**\n** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,\n** semicolon-separated SQL statements passed into its 2nd argument,\n** in the context of the [database connection] passed in as its 1st\n** argument.  ^If the callback function of the 3rd argument to\n** sqlite3_exec() is not NULL, then it is invoked for each result row\n** coming out of the evaluated SQL statements.  ^The 4th argument to\n** sqlite3_exec() is relayed through to the 1st argument of each\n** callback invocation.  ^If the callback pointer to sqlite3_exec()\n** is NULL, then no callback is ever invoked and result rows are\n** ignored.\n**\n** ^If an error occurs while evaluating the SQL statements passed into\n** sqlite3_exec(), then execution of the current statement stops and\n** subsequent statements are skipped.  ^If the 5th parameter to sqlite3_exec()\n** is not NULL then any error message is written into memory obtained\n** from [sqlite3_malloc()] and passed back through the 5th parameter.\n** To avoid memory leaks, the application should invoke [sqlite3_free()]\n** on error message strings returned through the 5th parameter of\n** sqlite3_exec() after the error message string is no longer needed.\n** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors\n** occur, then sqlite3_exec() sets the pointer in its 5th parameter to\n** NULL before returning.\n**\n** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()\n** routine returns SQLITE_ABORT without invoking the callback again and\n** without running any subsequent SQL statements.\n**\n** ^The 2nd argument to the sqlite3_exec() callback function is the\n** number of columns in the result.  ^The 3rd argument to the sqlite3_exec()\n** callback is an array of pointers to strings obtained as if from\n** [sqlite3_column_text()], one for each column.  ^If an element of a\n** result row is NULL then the corresponding string pointer for the\n** sqlite3_exec() callback is a NULL pointer.  ^The 4th argument to the\n** sqlite3_exec() callback is an array of pointers to strings where each\n** entry represents the name of a corresponding result column as obtained\n** from [sqlite3_column_name()].\n**\n** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer\n** to an empty string, or a pointer that contains only whitespace and/or\n** SQL comments, then no SQL statements are evaluated and the database\n** is not changed.\n**\n** Restrictions:\n**\n** <ul>\n** <li> The application must ensure that the 1st parameter to sqlite3_exec()\n**      is a valid and open [database connection].\n** <li> The application must not close the [database connection] specified by\n**      the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.\n** <li> The application must not modify the SQL statement text passed into\n**      the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.\n** <li> The application must not dereference the arrays or string pointers\n**       passed as the 3rd and 4th callback parameters after it returns.\n** </ul>\n*/\nSQLITE_API int sqlite3_exec(\n  sqlite3*,                                  /* An open database */\n  const char *sql,                           /* SQL to be evaluated */\n  int (*callback)(void*,int,char**,char**),  /* Callback function */\n  void *,                                    /* 1st argument to callback */\n  char **errmsg                              /* Error msg written here */\n);\n\n/*\n** CAPI3REF: Result Codes\n** KEYWORDS: {result code definitions}\n**\n** Many SQLite functions return an integer result code from the set shown\n** here in order to indicate success or failure.\n**\n** New error codes may be added in future versions of SQLite.\n**\n** See also: [extended result code definitions]\n*/\n#define SQLITE_OK           0   /* Successful result */\n/* beginning-of-error-codes */\n#define SQLITE_ERROR        1   /* Generic error */\n#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */\n#define SQLITE_PERM         3   /* Access permission denied */\n#define SQLITE_ABORT        4   /* Callback routine requested an abort */\n#define SQLITE_BUSY         5   /* The database file is locked */\n#define SQLITE_LOCKED       6   /* A table in the database is locked */\n#define SQLITE_NOMEM        7   /* A malloc() failed */\n#define SQLITE_READONLY     8   /* Attempt to write a readonly database */\n#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/\n#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */\n#define SQLITE_CORRUPT     11   /* The database disk image is malformed */\n#define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */\n#define SQLITE_FULL        13   /* Insertion failed because database is full */\n#define SQLITE_CANTOPEN    14   /* Unable to open the database file */\n#define SQLITE_PROTOCOL    15   /* Database lock protocol error */\n#define SQLITE_EMPTY       16   /* Internal use only */\n#define SQLITE_SCHEMA      17   /* The database schema changed */\n#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */\n#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */\n#define SQLITE_MISMATCH    20   /* Data type mismatch */\n#define SQLITE_MISUSE      21   /* Library used incorrectly */\n#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */\n#define SQLITE_AUTH        23   /* Authorization denied */\n#define SQLITE_FORMAT      24   /* Not used */\n#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */\n#define SQLITE_NOTADB      26   /* File opened that is not a database file */\n#define SQLITE_NOTICE      27   /* Notifications from sqlite3_log() */\n#define SQLITE_WARNING     28   /* Warnings from sqlite3_log() */\n#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */\n#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */\n/* end-of-error-codes */\n\n/*\n** CAPI3REF: Extended Result Codes\n** KEYWORDS: {extended result code definitions}\n**\n** In its default configuration, SQLite API routines return one of 30 integer\n** [result codes].  However, experience has shown that many of\n** these result codes are too coarse-grained.  They do not provide as\n** much information about problems as programmers might like.  In an effort to\n** address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]\n** and later) include\n** support for additional result codes that provide more detailed information\n** about errors. These [extended result codes] are enabled or disabled\n** on a per database connection basis using the\n** [sqlite3_extended_result_codes()] API.  Or, the extended code for\n** the most recent error can be obtained using\n** [sqlite3_extended_errcode()].\n*/\n#define SQLITE_ERROR_MISSING_COLLSEQ   (SQLITE_ERROR | (1<<8))\n#define SQLITE_ERROR_RETRY             (SQLITE_ERROR | (2<<8))\n#define SQLITE_ERROR_SNAPSHOT          (SQLITE_ERROR | (3<<8))\n#define SQLITE_ERROR_RESERVESIZE       (SQLITE_ERROR | (4<<8))\n#define SQLITE_ERROR_KEY               (SQLITE_ERROR | (5<<8))\n#define SQLITE_ERROR_UNABLE            (SQLITE_ERROR | (6<<8))\n#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))\n#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))\n#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))\n#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))\n#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))\n#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))\n#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))\n#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))\n#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))\n#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))\n#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))\n#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))\n#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))\n#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))\n#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))\n#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))\n#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))\n#define SQLITE_IOERR_SHMOPEN           (SQLITE_IOERR | (18<<8))\n#define SQLITE_IOERR_SHMSIZE           (SQLITE_IOERR | (19<<8))\n#define SQLITE_IOERR_SHMLOCK           (SQLITE_IOERR | (20<<8))\n#define SQLITE_IOERR_SHMMAP            (SQLITE_IOERR | (21<<8))\n#define SQLITE_IOERR_SEEK              (SQLITE_IOERR | (22<<8))\n#define SQLITE_IOERR_DELETE_NOENT      (SQLITE_IOERR | (23<<8))\n#define SQLITE_IOERR_MMAP              (SQLITE_IOERR | (24<<8))\n#define SQLITE_IOERR_GETTEMPPATH       (SQLITE_IOERR | (25<<8))\n#define SQLITE_IOERR_CONVPATH          (SQLITE_IOERR | (26<<8))\n#define SQLITE_IOERR_VNODE             (SQLITE_IOERR | (27<<8))\n#define SQLITE_IOERR_AUTH              (SQLITE_IOERR | (28<<8))\n#define SQLITE_IOERR_BEGIN_ATOMIC      (SQLITE_IOERR | (29<<8))\n#define SQLITE_IOERR_COMMIT_ATOMIC     (SQLITE_IOERR | (30<<8))\n#define SQLITE_IOERR_ROLLBACK_ATOMIC   (SQLITE_IOERR | (31<<8))\n#define SQLITE_IOERR_DATA              (SQLITE_IOERR | (32<<8))\n#define SQLITE_IOERR_CORRUPTFS         (SQLITE_IOERR | (33<<8))\n#define SQLITE_IOERR_IN_PAGE           (SQLITE_IOERR | (34<<8))\n#define SQLITE_IOERR_BADKEY            (SQLITE_IOERR | (35<<8))\n#define SQLITE_IOERR_CODEC             (SQLITE_IOERR | (36<<8))\n#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED |  (1<<8))\n#define SQLITE_LOCKED_VTAB             (SQLITE_LOCKED |  (2<<8))\n#define SQLITE_BUSY_RECOVERY           (SQLITE_BUSY   |  (1<<8))\n#define SQLITE_BUSY_SNAPSHOT           (SQLITE_BUSY   |  (2<<8))\n#define SQLITE_BUSY_TIMEOUT            (SQLITE_BUSY   |  (3<<8))\n#define SQLITE_CANTOPEN_NOTEMPDIR      (SQLITE_CANTOPEN | (1<<8))\n#define SQLITE_CANTOPEN_ISDIR          (SQLITE_CANTOPEN | (2<<8))\n#define SQLITE_CANTOPEN_FULLPATH       (SQLITE_CANTOPEN | (3<<8))\n#define SQLITE_CANTOPEN_CONVPATH       (SQLITE_CANTOPEN | (4<<8))\n#define SQLITE_CANTOPEN_DIRTYWAL       (SQLITE_CANTOPEN | (5<<8)) /* Not Used */\n#define SQLITE_CANTOPEN_SYMLINK        (SQLITE_CANTOPEN | (6<<8))\n#define SQLITE_CORRUPT_VTAB            (SQLITE_CORRUPT | (1<<8))\n#define SQLITE_CORRUPT_SEQUENCE        (SQLITE_CORRUPT | (2<<8))\n#define SQLITE_CORRUPT_INDEX           (SQLITE_CORRUPT | (3<<8))\n#define SQLITE_READONLY_RECOVERY       (SQLITE_READONLY | (1<<8))\n#define SQLITE_READONLY_CANTLOCK       (SQLITE_READONLY | (2<<8))\n#define SQLITE_READONLY_ROLLBACK       (SQLITE_READONLY | (3<<8))\n#define SQLITE_READONLY_DBMOVED        (SQLITE_READONLY | (4<<8))\n#define SQLITE_READONLY_CANTINIT       (SQLITE_READONLY | (5<<8))\n#define SQLITE_READONLY_DIRECTORY      (SQLITE_READONLY | (6<<8))\n#define SQLITE_ABORT_ROLLBACK          (SQLITE_ABORT | (2<<8))\n#define SQLITE_CONSTRAINT_CHECK        (SQLITE_CONSTRAINT | (1<<8))\n#define SQLITE_CONSTRAINT_COMMITHOOK   (SQLITE_CONSTRAINT | (2<<8))\n#define SQLITE_CONSTRAINT_FOREIGNKEY   (SQLITE_CONSTRAINT | (3<<8))\n#define SQLITE_CONSTRAINT_FUNCTION     (SQLITE_CONSTRAINT | (4<<8))\n#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))\n#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))\n#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))\n#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))\n#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))\n#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))\n#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))\n#define SQLITE_CONSTRAINT_DATATYPE     (SQLITE_CONSTRAINT |(12<<8))\n#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))\n#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))\n#define SQLITE_NOTICE_RBU              (SQLITE_NOTICE | (3<<8))\n#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))\n#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))\n#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))\n#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8)) /* internal use only */\n\n/*\n** CAPI3REF: Flags For File Open Operations\n**\n** These bit values are intended for use in the\n** 3rd parameter to the [sqlite3_open_v2()] interface and\n** in the 4th parameter to the [sqlite3_vfs.xOpen] method.\n**\n** Only those flags marked as \"Ok for sqlite3_open_v2()\" may be\n** used as the third argument to the [sqlite3_open_v2()] interface.\n** The other flags have historically been ignored by sqlite3_open_v2(),\n** though future versions of SQLite might change so that an error is\n** raised if any of the disallowed bits are passed into sqlite3_open_v2().\n** Applications should not depend on the historical behavior.\n**\n** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into\n** [sqlite3_open_v2()] does *not* cause the underlying database file\n** to be opened using O_EXCL.  Passing SQLITE_OPEN_EXCLUSIVE into\n** [sqlite3_open_v2()] has historically been a no-op and might become an\n** error in future versions of SQLite.\n*/\n#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */\n#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */\n#define SQLITE_OPEN_AUTOPROXY        0x00000020  /* VFS only */\n#define SQLITE_OPEN_URI              0x00000040  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_MEMORY           0x00000080  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */\n#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */\n#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */\n#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */\n#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */\n#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */\n#define SQLITE_OPEN_SUPER_JOURNAL    0x00004000  /* VFS only */\n#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_WAL              0x00080000  /* VFS only */\n#define SQLITE_OPEN_NOFOLLOW         0x01000000  /* Ok for sqlite3_open_v2() */\n#define SQLITE_OPEN_EXRESCODE        0x02000000  /* Extended result codes */\n\n/* Reserved:                         0x00F00000 */\n/* Legacy compatibility: */\n#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */\n\n\n/*\n** CAPI3REF: Device Characteristics\n**\n** The xDeviceCharacteristics method of the [sqlite3_io_methods]\n** object returns an integer which is a vector of these\n** bit values expressing I/O characteristics of the mass storage\n** device that holds the file that the [sqlite3_io_methods]\n** refers to.\n**\n** The SQLITE_IOCAP_ATOMIC property means that all writes of\n** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n** mean that writes of blocks that are nnn bytes in size and\n** are aligned to an address which is an integer multiple of\n** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n** that when data is appended to a file, the data is appended\n** first then the size of the file is extended, never the other\n** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n** information is written to disk in the same order as calls\n** to xWrite().  The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that\n** after reboot following a crash or power loss, the only bytes in a\n** file that were written at the application level might have changed\n** and that adjacent bytes, even bytes within the same sector are\n** guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN\n** flag indicates that a file cannot be deleted when open.  The\n** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on\n** read-only media and cannot be changed even by processes with\n** elevated privileges.\n**\n** The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying\n** filesystem supports doing multiple write operations atomically when those\n** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and\n** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].\n**\n** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read\n** from the database file in amounts that are not a multiple of the\n** page size and that do not begin at a page boundary.  Without this\n** property, SQLite is careful to only do full-page reads and write\n** on aligned pages, with the one exception that it will do a sub-page\n** read of the first page to access the database header.\n*/\n#define SQLITE_IOCAP_ATOMIC                 0x00000001\n#define SQLITE_IOCAP_ATOMIC512              0x00000002\n#define SQLITE_IOCAP_ATOMIC1K               0x00000004\n#define SQLITE_IOCAP_ATOMIC2K               0x00000008\n#define SQLITE_IOCAP_ATOMIC4K               0x00000010\n#define SQLITE_IOCAP_ATOMIC8K               0x00000020\n#define SQLITE_IOCAP_ATOMIC16K              0x00000040\n#define SQLITE_IOCAP_ATOMIC32K              0x00000080\n#define SQLITE_IOCAP_ATOMIC64K              0x00000100\n#define SQLITE_IOCAP_SAFE_APPEND            0x00000200\n#define SQLITE_IOCAP_SEQUENTIAL             0x00000400\n#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800\n#define SQLITE_IOCAP_POWERSAFE_OVERWRITE    0x00001000\n#define SQLITE_IOCAP_IMMUTABLE              0x00002000\n#define SQLITE_IOCAP_BATCH_ATOMIC           0x00004000\n#define SQLITE_IOCAP_SUBPAGE_READ           0x00008000\n\n/*\n** CAPI3REF: File Locking Levels\n**\n** SQLite uses one of these integer values as the second\n** argument to calls it makes to the xLock() and xUnlock() methods\n** of an [sqlite3_io_methods] object.  These values are ordered from\n** least restrictive to most restrictive.\n**\n** The argument to xLock() is always SHARED or higher.  The argument to\n** xUnlock is either SHARED or NONE.\n*/\n#define SQLITE_LOCK_NONE          0       /* xUnlock() only */\n#define SQLITE_LOCK_SHARED        1       /* xLock() or xUnlock() */\n#define SQLITE_LOCK_RESERVED      2       /* xLock() only */\n#define SQLITE_LOCK_PENDING       3       /* xLock() only */\n#define SQLITE_LOCK_EXCLUSIVE     4       /* xLock() only */\n\n/*\n** CAPI3REF: Synchronization Type Flags\n**\n** When SQLite invokes the xSync() method of an\n** [sqlite3_io_methods] object it uses a combination of\n** these integer values as the second argument.\n**\n** When the SQLITE_SYNC_DATAONLY flag is used, it means that the\n** sync operation only needs to flush data to mass storage.  Inode\n** information need not be flushed. If the lower four bits of the flag\n** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.\n** If the lower four bits equal SQLITE_SYNC_FULL, that means\n** to use Mac OS X style fullsync instead of fsync().\n**\n** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags\n** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL\n** settings.  The [synchronous pragma] determines when calls to the\n** xSync VFS method occur and applies uniformly across all platforms.\n** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how\n** energetic or rigorous or forceful the sync operations are and\n** only make a difference on Mac OSX for the default SQLite code.\n** (Third-party VFS implementations might also make the distinction\n** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the\n** operating systems natively supported by SQLite, only Mac OSX\n** cares about the difference.)\n*/\n#define SQLITE_SYNC_NORMAL        0x00002\n#define SQLITE_SYNC_FULL          0x00003\n#define SQLITE_SYNC_DATAONLY      0x00010\n\n/*\n** CAPI3REF: OS Interface Open File Handle\n**\n** An [sqlite3_file] object represents an open file in the\n** [sqlite3_vfs | OS interface layer].  Individual OS interface\n** implementations will\n** want to subclass this object by appending additional fields\n** for their own use.  The pMethods entry is a pointer to an\n** [sqlite3_io_methods] object that defines methods for performing\n** I/O operations on the open file.\n*/\ntypedef struct sqlite3_file sqlite3_file;\nstruct sqlite3_file {\n  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */\n};\n\n/*\n** CAPI3REF: OS Interface File Virtual Methods Object\n**\n** Every file opened by the [sqlite3_vfs.xOpen] method populates an\n** [sqlite3_file] object (or, more commonly, a subclass of the\n** [sqlite3_file] object) with a pointer to an instance of this object.\n** This object defines the methods used to perform various operations\n** against the open file represented by the [sqlite3_file] object.\n**\n** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element\n** to a non-NULL pointer, then the sqlite3_io_methods.xClose method\n** may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed.  The\n** only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen]\n** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element\n** to NULL.\n**\n** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or\n** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().\n** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]\n** flag may be ORed in to indicate that only the data of the file\n** and not its inode needs to be synced.\n**\n** The integer values to xLock() and xUnlock() are one of\n** <ul>\n** <li> [SQLITE_LOCK_NONE],\n** <li> [SQLITE_LOCK_SHARED],\n** <li> [SQLITE_LOCK_RESERVED],\n** <li> [SQLITE_LOCK_PENDING], or\n** <li> [SQLITE_LOCK_EXCLUSIVE].\n** </ul>\n** xLock() upgrades the database file lock.  In other words, xLock() moves the\n** database file lock in the direction NONE toward EXCLUSIVE. The argument to\n** xLock() is always one of SHARED, RESERVED, PENDING, or EXCLUSIVE, never\n** SQLITE_LOCK_NONE.  If the database file lock is already at or above the\n** requested lock, then the call to xLock() is a no-op.\n** xUnlock() downgrades the database file lock to either SHARED or NONE.\n** If the lock is already at or below the requested lock state, then the call\n** to xUnlock() is a no-op.\n** The xCheckReservedLock() method checks whether any database connection,\n** either in this process or in some other process, is holding a RESERVED,\n** PENDING, or EXCLUSIVE lock on the file.  It returns, via its output\n** pointer parameter, true if such a lock exists and false otherwise.\n**\n** The xFileControl() method is a generic interface that allows custom\n** VFS implementations to directly control an open file using the\n** [sqlite3_file_control()] interface.  The second \"op\" argument is an\n** integer opcode.  The third argument is a generic pointer intended to\n** point to a structure that may contain arguments or space in which to\n** write return values.  Potential uses for xFileControl() might be\n** functions to enable blocking locks with timeouts, to change the\n** locking strategy (for example to use dot-file locks), to inquire\n** about the status of a lock, or to break stale locks.  The SQLite\n** core reserves all opcodes less than 100 for its own use.\n** A [file control opcodes | list of opcodes] less than 100 is available.\n** Applications that define a custom xFileControl method should use opcodes\n** greater than 100 to avoid conflicts.  VFS implementations should\n** return [SQLITE_NOTFOUND] for file control opcodes that they do not\n** recognize.\n**\n** The xSectorSize() method returns the sector size of the\n** device that underlies the file.  The sector size is the\n** minimum write that can be performed without disturbing\n** other bytes in the file.  The xDeviceCharacteristics()\n** method returns a bit vector describing behaviors of the\n** underlying device:\n**\n** <ul>\n** <li> [SQLITE_IOCAP_ATOMIC]\n** <li> [SQLITE_IOCAP_ATOMIC512]\n** <li> [SQLITE_IOCAP_ATOMIC1K]\n** <li> [SQLITE_IOCAP_ATOMIC2K]\n** <li> [SQLITE_IOCAP_ATOMIC4K]\n** <li> [SQLITE_IOCAP_ATOMIC8K]\n** <li> [SQLITE_IOCAP_ATOMIC16K]\n** <li> [SQLITE_IOCAP_ATOMIC32K]\n** <li> [SQLITE_IOCAP_ATOMIC64K]\n** <li> [SQLITE_IOCAP_SAFE_APPEND]\n** <li> [SQLITE_IOCAP_SEQUENTIAL]\n** <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]\n** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]\n** <li> [SQLITE_IOCAP_IMMUTABLE]\n** <li> [SQLITE_IOCAP_BATCH_ATOMIC]\n** <li> [SQLITE_IOCAP_SUBPAGE_READ]\n** </ul>\n**\n** The SQLITE_IOCAP_ATOMIC property means that all writes of\n** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n** mean that writes of blocks that are nnn bytes in size and\n** are aligned to an address which is an integer multiple of\n** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n** that when data is appended to a file, the data is appended\n** first then the size of the file is extended, never the other\n** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n** information is written to disk in the same order as calls\n** to xWrite().\n**\n** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill\n** in the unread portions of the buffer with zeros.  A VFS that\n** fails to zero-fill short reads might seem to work.  However,\n** failure to zero-fill short reads will eventually lead to\n** database corruption.\n*/\ntypedef struct sqlite3_io_methods sqlite3_io_methods;\nstruct sqlite3_io_methods {\n  int iVersion;\n  int (*xClose)(sqlite3_file*);\n  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\n  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);\n  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);\n  int (*xSync)(sqlite3_file*, int flags);\n  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);\n  int (*xLock)(sqlite3_file*, int);\n  int (*xUnlock)(sqlite3_file*, int);\n  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);\n  int (*xFileControl)(sqlite3_file*, int op, void *pArg);\n  int (*xSectorSize)(sqlite3_file*);\n  int (*xDeviceCharacteristics)(sqlite3_file*);\n  /* Methods above are valid for version 1 */\n  int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);\n  int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);\n  void (*xShmBarrier)(sqlite3_file*);\n  int (*xShmUnmap)(sqlite3_file*, int deleteFlag);\n  /* Methods above are valid for version 2 */\n  int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);\n  int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p);\n  /* Methods above are valid for version 3 */\n  /* Additional methods may be added in future releases */\n};\n\n/*\n** CAPI3REF: Standard File Control Opcodes\n** KEYWORDS: {file control opcodes} {file control opcode}\n**\n** These integer constants are opcodes for the xFileControl method\n** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]\n** interface.\n**\n** <ul>\n** <li>[[SQLITE_FCNTL_LOCKSTATE]]\n** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This\n** opcode causes the xFileControl method to write the current state of\n** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],\n** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])\n** into an integer that the pArg argument points to.\n** This capability is only available if SQLite is compiled with [SQLITE_DEBUG].\n**\n** <li>[[SQLITE_FCNTL_SIZE_HINT]]\n** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS\n** layer a hint of how large the database file will grow to be during the\n** current transaction.  This hint is not guaranteed to be accurate but it\n** is often close.  The underlying VFS might choose to preallocate database\n** file space based on this hint in order to help writes to the database\n** file run faster.\n**\n** <li>[[SQLITE_FCNTL_SIZE_LIMIT]]\n** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that\n** implements [sqlite3_deserialize()] to set an upper bound on the size\n** of the in-memory database.  The argument is a pointer to a [sqlite3_int64].\n** If the integer pointed to is negative, then it is filled in with the\n** current limit.  Otherwise the limit is set to the larger of the value\n** of the integer pointed to and the current database size.  The integer\n** pointed to is set to the new limit.\n**\n** <li>[[SQLITE_FCNTL_CHUNK_SIZE]]\n** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS\n** extends and truncates the database file in chunks of a size specified\n** by the user. The fourth argument to [sqlite3_file_control()] should\n** point to an integer (type int) containing the new chunk-size to use\n** for the nominated database. Allocating database file space in large\n** chunks (say 1MB at a time), may reduce file-system fragmentation and\n** improve performance on some systems.\n**\n** <li>[[SQLITE_FCNTL_FILE_POINTER]]\n** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer\n** to the [sqlite3_file] object associated with a particular database\n** connection.  See also [SQLITE_FCNTL_JOURNAL_POINTER].\n**\n** <li>[[SQLITE_FCNTL_JOURNAL_POINTER]]\n** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer\n** to the [sqlite3_file] object associated with the journal file (either\n** the [rollback journal] or the [write-ahead log]) for a particular database\n** connection.  See also [SQLITE_FCNTL_FILE_POINTER].\n**\n** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]\n** The SQLITE_FCNTL_SYNC_OMITTED file-control is no longer used.\n**\n** <li>[[SQLITE_FCNTL_SYNC]]\n** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and\n** sent to the VFS immediately before the xSync method is invoked on a\n** database file descriptor. Or, if the xSync method is not invoked\n** because the user has configured SQLite with\n** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place\n** of the xSync method. In most cases, the pointer argument passed with\n** this file-control is NULL. However, if the database file is being synced\n** as part of a multi-database commit, the argument points to a nul-terminated\n** string containing the transactions super-journal file name. VFSes that\n** do not need this signal should silently ignore this opcode. Applications\n** should not call [sqlite3_file_control()] with this opcode as doing so may\n** disrupt the operation of the specialized VFSes that do require it.\n**\n** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]]\n** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite\n** and sent to the VFS after a transaction has been committed immediately\n** but before the database is unlocked. VFSes that do not need this signal\n** should silently ignore this opcode. Applications should not call\n** [sqlite3_file_control()] with this opcode as doing so may disrupt the\n** operation of the specialized VFSes that do require it.\n**\n** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]\n** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic\n** retry counts and intervals for certain disk I/O operations for the\n** windows [VFS] in order to provide robustness in the presence of\n** anti-virus programs.  By default, the windows VFS will retry file read,\n** file write, and file delete operations up to 10 times, with a delay\n** of 25 milliseconds before the first retry and with the delay increasing\n** by an additional 25 milliseconds with each subsequent retry.  This\n** opcode allows these two values (10 retries and 25 milliseconds of delay)\n** to be adjusted.  The values are changed for all database connections\n** within the same process.  The argument is a pointer to an array of two\n** integers where the first integer is the new retry count and the second\n** integer is the delay.  If either integer is negative, then the setting\n** is not changed but instead the prior value of that setting is written\n** into the array entry, allowing the current retry settings to be\n** interrogated.  The zDbName parameter is ignored.\n**\n** <li>[[SQLITE_FCNTL_PERSIST_WAL]]\n** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the\n** persistent [WAL | Write Ahead Log] setting.  By default, the auxiliary\n** write ahead log ([WAL file]) and shared memory\n** files used for transaction control\n** are automatically deleted when the latest connection to the database\n** closes.  Setting persistent WAL mode causes those files to persist after\n** close.  Persisting the files is useful when other processes that do not\n** have write permission on the directory containing the database file want\n** to read the database file, as the WAL and shared memory files must exist\n** in order for the database to be readable.  The fourth parameter to\n** [sqlite3_file_control()] for this opcode should be a pointer to an integer.\n** That integer is 0 to disable persistent WAL mode or 1 to enable persistent\n** WAL mode.  If the integer is -1, then it is overwritten with the current\n** WAL persistence setting.\n**\n** <li>[[SQLITE_FCNTL_POWERSAFE_OVERWRITE]]\n** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the\n** persistent \"powersafe-overwrite\" or \"PSOW\" setting.  The PSOW setting\n** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the\n** xDeviceCharacteristics methods. The fourth parameter to\n** [sqlite3_file_control()] for this opcode should be a pointer to an integer.\n** That integer is 0 to disable zero-damage mode or 1 to enable zero-damage\n** mode.  If the integer is -1, then it is overwritten with the current\n** zero-damage mode setting.\n**\n** <li>[[SQLITE_FCNTL_OVERWRITE]]\n** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening\n** a write transaction to indicate that, unless it is rolled back for some\n** reason, the entire database file will be overwritten by the current\n** transaction. This is used by VACUUM operations.\n**\n** <li>[[SQLITE_FCNTL_VFSNAME]]\n** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of\n** all [VFSes] in the VFS stack.  The names of all VFS shims and the\n** final bottom-level VFS are written into memory obtained from\n** [sqlite3_malloc()] and the result is stored in the char* variable\n** that the fourth parameter of [sqlite3_file_control()] points to.\n** The caller is responsible for freeing the memory when done.  As with\n** all file-control actions, there is no guarantee that this will actually\n** do anything.  Callers should initialize the char* variable to a NULL\n** pointer in case this file-control is not implemented.  This file-control\n** is intended for diagnostic use only.\n**\n** <li>[[SQLITE_FCNTL_VFS_POINTER]]\n** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level\n** [VFSes] currently in use.  ^(The argument X in\n** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be\n** of type \"[sqlite3_vfs] **\".  This opcode will set *X\n** to a pointer to the top-level VFS.)^\n** ^When there are multiple VFS shims in the stack, this opcode finds the\n** upper-most shim only.\n**\n** <li>[[SQLITE_FCNTL_PRAGMA]]\n** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA]\n** file control is sent to the open [sqlite3_file] object corresponding\n** to the database file to which the pragma statement refers. ^The argument\n** to the [SQLITE_FCNTL_PRAGMA] file control is an array of\n** pointers to strings (char**) in which the second element of the array\n** is the name of the pragma and the third element is the argument to the\n** pragma or NULL if the pragma has no argument.  ^The handler for an\n** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element\n** of the char** argument point to a string obtained from [sqlite3_mprintf()]\n** or the equivalent and that string will become the result of the pragma or\n** the error message if the pragma fails. ^If the\n** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal\n** [PRAGMA] processing continues.  ^If the [SQLITE_FCNTL_PRAGMA]\n** file control returns [SQLITE_OK], then the parser assumes that the\n** VFS has handled the PRAGMA itself and the parser generates a no-op\n** prepared statement if result string is NULL, or that returns a copy\n** of the result string if the string is non-NULL.\n** ^If the [SQLITE_FCNTL_PRAGMA] file control returns\n** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means\n** that the VFS encountered an error while handling the [PRAGMA] and the\n** compilation of the PRAGMA fails with an error.  ^The [SQLITE_FCNTL_PRAGMA]\n** file control occurs at the beginning of pragma statement analysis and so\n** it is able to override built-in [PRAGMA] statements.\n**\n** <li>[[SQLITE_FCNTL_BUSYHANDLER]]\n** ^The [SQLITE_FCNTL_BUSYHANDLER]\n** file-control may be invoked by SQLite on the database file handle\n** shortly after it is opened in order to provide a custom VFS with access\n** to the connection's busy-handler callback. The argument is of type (void**)\n** - an array of two (void *) values. The first (void *) actually points\n** to a function of type (int (*)(void *)). In order to invoke the connection's\n** busy-handler, this function should be invoked with the second (void *) in\n** the array as the only argument. If it returns non-zero, then the operation\n** should be retried. If it returns zero, the custom VFS should abandon the\n** current operation.\n**\n** <li>[[SQLITE_FCNTL_TEMPFILENAME]]\n** ^Applications can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control\n** to have SQLite generate a\n** temporary filename using the same algorithm that is followed to generate\n** temporary filenames for TEMP tables and other internal uses.  The\n** argument should be a char** which will be filled with the filename\n** written into memory obtained from [sqlite3_malloc()].  The caller should\n** invoke [sqlite3_free()] on the result to avoid a memory leak.\n**\n** <li>[[SQLITE_FCNTL_MMAP_SIZE]]\n** The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the\n** maximum number of bytes that will be used for memory-mapped I/O.\n** The argument is a pointer to a value of type sqlite3_int64 that\n** is an advisory maximum number of bytes in the file to memory map.  The\n** pointer is overwritten with the old value.  The limit is not changed if\n** the value originally pointed to is negative, and so the current limit\n** can be queried by passing in a pointer to a negative number.  This\n** file-control is used internally to implement [PRAGMA mmap_size].\n**\n** <li>[[SQLITE_FCNTL_TRACE]]\n** The [SQLITE_FCNTL_TRACE] file control provides advisory information\n** to the VFS about what the higher layers of the SQLite stack are doing.\n** This file control is used by some VFS activity tracing [shims].\n** The argument is a zero-terminated string.  Higher layers in the\n** SQLite stack may generate instances of this file control if\n** the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled.\n**\n** <li>[[SQLITE_FCNTL_HAS_MOVED]]\n** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a\n** pointer to an integer and it writes a boolean into that integer depending\n** on whether or not the file has been renamed, moved, or deleted since it\n** was first opened.\n**\n** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]\n** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the\n** underlying native file handle associated with a file handle.  This file\n** control interprets its argument as a pointer to a native file handle and\n** writes the resulting value there.\n**\n** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]\n** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging.  This\n** opcode causes the xFileControl method to swap the file handle with the one\n** pointed to by the pArg argument.  This capability is used during testing\n** and only needs to be supported when SQLITE_TEST is defined.\n**\n** <li>[[SQLITE_FCNTL_NULL_IO]]\n** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor\n** or file handle for the [sqlite3_file] object such that it will no longer\n** read or write to the database file.\n**\n** <li>[[SQLITE_FCNTL_WAL_BLOCK]]\n** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might\n** be advantageous to block on the next WAL lock if the lock is not immediately\n** available.  The WAL subsystem issues this signal during rare\n** circumstances in order to fix a problem with priority inversion.\n** Applications should <em>not</em> use this file-control.\n**\n** <li>[[SQLITE_FCNTL_ZIPVFS]]\n** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other\n** VFS should return SQLITE_NOTFOUND for this opcode.\n**\n** <li>[[SQLITE_FCNTL_RBU]]\n** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by\n** the RBU extension only.  All other VFS should return SQLITE_NOTFOUND for\n** this opcode.\n**\n** <li>[[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]]\n** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then\n** the file descriptor is placed in \"batch write mode\", which\n** means all subsequent write operations will be deferred and done\n** atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].  Systems\n** that do not support batch atomic writes will return SQLITE_NOTFOUND.\n** ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to\n** the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or\n** [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make\n** no VFS interface calls on the same [sqlite3_file] file descriptor\n** except for calls to the xWrite method and the xFileControl method\n** with [SQLITE_FCNTL_SIZE_HINT].\n**\n** <li>[[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]]\n** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write\n** operations since the previous successful call to\n** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically.\n** This file control returns [SQLITE_OK] if and only if the writes were\n** all performed successfully and have been committed to persistent storage.\n** ^Regardless of whether or not it is successful, this file control takes\n** the file descriptor out of batch write mode so that all subsequent\n** write operations are independent.\n** ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without\n** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].\n**\n** <li>[[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]]\n** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write\n** operations since the previous successful call to\n** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back.\n** ^This file control takes the file descriptor out of batch write mode\n** so that all subsequent write operations are independent.\n** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without\n** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].\n**\n** <li>[[SQLITE_FCNTL_LOCK_TIMEOUT]]\n** The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode is used to configure a VFS\n** to block for up to M milliseconds before failing when attempting to\n** obtain a file lock using the xLock or xShmLock methods of the VFS.\n** The parameter is a pointer to a 32-bit signed integer that contains\n** the value that M is to be set to. Before returning, the 32-bit signed\n** integer is overwritten with the previous value of M.\n**\n** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]\n** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the\n** VFS to block when taking a SHARED lock to connect to a wal mode database.\n** This is used to implement the functionality associated with\n** SQLITE_SETLK_BLOCK_ON_CONNECT.\n**\n** <li>[[SQLITE_FCNTL_DATA_VERSION]]\n** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to\n** a database file.  The argument is a pointer to a 32-bit unsigned integer.\n** The \"data version\" for the pager is written into the pointer.  The\n** \"data version\" changes whenever any change occurs to the corresponding\n** database file, either through SQL statements on the same database\n** connection or through transactions committed by separate database\n** connections possibly in other processes. The [sqlite3_total_changes()]\n** interface can be used to find if any database on the connection has changed,\n** but that interface responds to changes on TEMP as well as MAIN and does\n** not provide a mechanism to detect changes to MAIN only.  Also, the\n** [sqlite3_total_changes()] interface responds to internal changes only and\n** omits changes made by other database connections.  The\n** [PRAGMA data_version] command provides a mechanism to detect changes to\n** a single attached database that occur due to other database connections,\n** but omits changes implemented by the database connection on which it is\n** called.  This file control is the only mechanism to detect changes that\n** happen either internally or externally and that are associated with\n** a particular attached database.\n**\n** <li>[[SQLITE_FCNTL_CKPT_START]]\n** The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint\n** in wal mode before the client starts to copy pages from the wal\n** file to the database file.\n**\n** <li>[[SQLITE_FCNTL_CKPT_DONE]]\n** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint\n** in wal mode after the client has finished copying pages from the wal\n** file to the database file, but before the *-shm file is updated to\n** record the fact that the pages have been checkpointed.\n**\n** <li>[[SQLITE_FCNTL_EXTERNAL_READER]]\n** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect\n** whether or not there is a database client in another process with a wal-mode\n** transaction open on the database or not. It is only available on unix. The\n** (void*) argument passed with this file-control should be a pointer to a\n** value of type (int). The integer value is set to 1 if the database is a wal\n** mode database and there exists at least one client in another process that\n** currently has an SQL transaction open on the database. It is set to 0 if\n** the database is not a wal-mode db, or if there is no such connection in any\n** other process. This opcode cannot be used to detect transactions opened\n** by clients within the current process, only within other processes.\n**\n** <li>[[SQLITE_FCNTL_CKSM_FILE]]\n** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the\n** [checksum VFS shim] only.\n**\n** <li>[[SQLITE_FCNTL_RESET_CACHE]]\n** If there is currently no transaction open on the database, and the\n** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control\n** purges the contents of the in-memory page cache. If there is an open\n** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.\n**\n** <li>[[SQLITE_FCNTL_FILESTAT]]\n** The [SQLITE_FCNTL_FILESTAT] opcode returns low-level diagnostic information\n** about the [sqlite3_file] objects used access the database and journal files\n** for the given schema.  The fourth parameter to [sqlite3_file_control()]\n** should be an initialized [sqlite3_str] pointer.  JSON text describing\n** various aspects of the sqlite3_file object is appended to the sqlite3_str.\n** The SQLITE_FCNTL_FILESTAT opcode is usually a no-op, unless compile-time\n** options are used to enable it.\n** </ul>\n*/\n#define SQLITE_FCNTL_LOCKSTATE               1\n#define SQLITE_FCNTL_GET_LOCKPROXYFILE       2\n#define SQLITE_FCNTL_SET_LOCKPROXYFILE       3\n#define SQLITE_FCNTL_LAST_ERRNO              4\n#define SQLITE_FCNTL_SIZE_HINT               5\n#define SQLITE_FCNTL_CHUNK_SIZE              6\n#define SQLITE_FCNTL_FILE_POINTER            7\n#define SQLITE_FCNTL_SYNC_OMITTED            8\n#define SQLITE_FCNTL_WIN32_AV_RETRY          9\n#define SQLITE_FCNTL_PERSIST_WAL            10\n#define SQLITE_FCNTL_OVERWRITE              11\n#define SQLITE_FCNTL_VFSNAME                12\n#define SQLITE_FCNTL_POWERSAFE_OVERWRITE    13\n#define SQLITE_FCNTL_PRAGMA                 14\n#define SQLITE_FCNTL_BUSYHANDLER            15\n#define SQLITE_FCNTL_TEMPFILENAME           16\n#define SQLITE_FCNTL_MMAP_SIZE              18\n#define SQLITE_FCNTL_TRACE                  19\n#define SQLITE_FCNTL_HAS_MOVED              20\n#define SQLITE_FCNTL_SYNC                   21\n#define SQLITE_FCNTL_COMMIT_PHASETWO        22\n#define SQLITE_FCNTL_WIN32_SET_HANDLE       23\n#define SQLITE_FCNTL_WAL_BLOCK              24\n#define SQLITE_FCNTL_ZIPVFS                 25\n#define SQLITE_FCNTL_RBU                    26\n#define SQLITE_FCNTL_VFS_POINTER            27\n#define SQLITE_FCNTL_JOURNAL_POINTER        28\n#define SQLITE_FCNTL_WIN32_GET_HANDLE       29\n#define SQLITE_FCNTL_PDB                    30\n#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE     31\n#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE    32\n#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE  33\n#define SQLITE_FCNTL_LOCK_TIMEOUT           34\n#define SQLITE_FCNTL_DATA_VERSION           35\n#define SQLITE_FCNTL_SIZE_LIMIT             36\n#define SQLITE_FCNTL_CKPT_DONE              37\n#define SQLITE_FCNTL_RESERVE_BYTES          38\n#define SQLITE_FCNTL_CKPT_START             39\n#define SQLITE_FCNTL_EXTERNAL_READER        40\n#define SQLITE_FCNTL_CKSM_FILE              41\n#define SQLITE_FCNTL_RESET_CACHE            42\n#define SQLITE_FCNTL_NULL_IO                43\n#define SQLITE_FCNTL_BLOCK_ON_CONNECT       44\n#define SQLITE_FCNTL_FILESTAT               45\n\n/* deprecated names */\n#define SQLITE_GET_LOCKPROXYFILE      SQLITE_FCNTL_GET_LOCKPROXYFILE\n#define SQLITE_SET_LOCKPROXYFILE      SQLITE_FCNTL_SET_LOCKPROXYFILE\n#define SQLITE_LAST_ERRNO             SQLITE_FCNTL_LAST_ERRNO\n\n\n/*\n** CAPI3REF: Mutex Handle\n**\n** The mutex module within SQLite defines [sqlite3_mutex] to be an\n** abstract type for a mutex object.  The SQLite core never looks\n** at the internal representation of an [sqlite3_mutex].  It only\n** deals with pointers to the [sqlite3_mutex] object.\n**\n** Mutexes are created using [sqlite3_mutex_alloc()].\n*/\ntypedef struct sqlite3_mutex sqlite3_mutex;\n\n/*\n** CAPI3REF: Loadable Extension Thunk\n**\n** A pointer to the opaque sqlite3_api_routines structure is passed as\n** the third parameter to entry points of [loadable extensions].  This\n** structure must be typedefed in order to work around compiler warnings\n** on some platforms.\n*/\ntypedef struct sqlite3_api_routines sqlite3_api_routines;\n\n/*\n** CAPI3REF: File Name\n**\n** Type [sqlite3_filename] is used by SQLite to pass filenames to the\n** xOpen method of a [VFS]. It may be cast to (const char*) and treated\n** as a normal, nul-terminated, UTF-8 buffer containing the filename, but\n** may also be passed to special APIs such as:\n**\n** <ul>\n** <li>  sqlite3_filename_database()\n** <li>  sqlite3_filename_journal()\n** <li>  sqlite3_filename_wal()\n** <li>  sqlite3_uri_parameter()\n** <li>  sqlite3_uri_boolean()\n** <li>  sqlite3_uri_int64()\n** <li>  sqlite3_uri_key()\n** </ul>\n*/\ntypedef const char *sqlite3_filename;\n\n/*\n** CAPI3REF: OS Interface Object\n**\n** An instance of the sqlite3_vfs object defines the interface between\n** the SQLite core and the underlying operating system.  The \"vfs\"\n** in the name of the object stands for \"virtual file system\".  See\n** the [VFS | VFS documentation] for further information.\n**\n** The VFS interface is sometimes extended by adding new methods onto\n** the end.  Each time such an extension occurs, the iVersion field\n** is incremented.  The iVersion value started out as 1 in\n** SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2\n** with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased\n** to 3 with SQLite [version 3.7.6] on [dateof:3.7.6].  Additional fields\n** may be appended to the sqlite3_vfs object and the iVersion value\n** may increase again in future versions of SQLite.\n** Note that due to an oversight, the structure\n** of the sqlite3_vfs object changed in the transition from\n** SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0]\n** and yet the iVersion field was not increased.\n**\n** The szOsFile field is the size of the subclassed [sqlite3_file]\n** structure used by this VFS.  mxPathname is the maximum length of\n** a pathname in this VFS.\n**\n** Registered sqlite3_vfs objects are kept on a linked list formed by\n** the pNext pointer.  The [sqlite3_vfs_register()]\n** and [sqlite3_vfs_unregister()] interfaces manage this list\n** in a thread-safe way.  The [sqlite3_vfs_find()] interface\n** searches the list.  Neither the application code nor the VFS\n** implementation should use the pNext pointer.\n**\n** The pNext field is the only field in the sqlite3_vfs\n** structure that SQLite will ever modify.  SQLite will only access\n** or modify this field while holding a particular static mutex.\n** The application should never modify anything within the sqlite3_vfs\n** object once the object has been registered.\n**\n** The zName field holds the name of the VFS module.  The name must\n** be unique across all VFS modules.\n**\n** [[sqlite3_vfs.xOpen]]\n** ^SQLite guarantees that the zFilename parameter to xOpen\n** is either a NULL pointer or string obtained\n** from xFullPathname() with an optional suffix added.\n** ^If a suffix is added to the zFilename parameter, it will\n** consist of a single \"-\" character followed by no more than\n** 11 alphanumeric and/or \"-\" characters.\n** ^SQLite further guarantees that\n** the string will be valid and unchanged until xClose() is\n** called. Because of the previous sentence,\n** the [sqlite3_file] can safely store a pointer to the\n** filename if it needs to remember the filename for some reason.\n** If the zFilename parameter to xOpen is a NULL pointer then xOpen\n** must invent its own temporary name for the file.  ^Whenever the\n** xFilename parameter is NULL it will also be the case that the\n** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].\n**\n** The flags argument to xOpen() includes all bits set in\n** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]\n** or [sqlite3_open16()] is used, then flags includes at least\n** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].\n** If xOpen() opens a file read-only then it sets *pOutFlags to\n** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.\n**\n** ^(SQLite will also add one of the following flags to the xOpen()\n** call, depending on the object being opened:\n**\n** <ul>\n** <li>  [SQLITE_OPEN_MAIN_DB]\n** <li>  [SQLITE_OPEN_MAIN_JOURNAL]\n** <li>  [SQLITE_OPEN_TEMP_DB]\n** <li>  [SQLITE_OPEN_TEMP_JOURNAL]\n** <li>  [SQLITE_OPEN_TRANSIENT_DB]\n** <li>  [SQLITE_OPEN_SUBJOURNAL]\n** <li>  [SQLITE_OPEN_SUPER_JOURNAL]\n** <li>  [SQLITE_OPEN_WAL]\n** </ul>)^\n**\n** The file I/O implementation can use the object type flags to\n** change the way it deals with files.  For example, an application\n** that does not care about crash recovery or rollback might make\n** the open of a journal file a no-op.  Writes to this journal would\n** also be no-ops, and any attempt to read the journal would return\n** SQLITE_IOERR.  Or the implementation might recognize that a database\n** file will be doing page-aligned sector reads and writes in a random\n** order and set up its I/O subsystem accordingly.\n**\n** SQLite might also add one of the following flags to the xOpen method:\n**\n** <ul>\n** <li> [SQLITE_OPEN_DELETEONCLOSE]\n** <li> [SQLITE_OPEN_EXCLUSIVE]\n** </ul>\n**\n** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be\n** deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]\n** will be set for TEMP databases and their journals, transient\n** databases, and subjournals.\n**\n** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction\n** with the [SQLITE_OPEN_CREATE] flag, which are both directly\n** analogous to the O_EXCL and O_CREAT flags of the POSIX open()\n** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the\n** SQLITE_OPEN_CREATE, is used to indicate that file should always\n** be created, and that it is an error if it already exists.\n** It is <i>not</i> used to indicate the file should be opened\n** for exclusive access.\n**\n** ^At least szOsFile bytes of memory are allocated by SQLite\n** to hold the [sqlite3_file] structure passed as the third\n** argument to xOpen.  The xOpen method does not have to\n** allocate the structure; it should just fill it in.  Note that\n** the xOpen method must set the sqlite3_file.pMethods to either\n** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do\n** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods\n** element will be valid after xOpen returns regardless of the success\n** or failure of the xOpen call.\n**\n** [[sqlite3_vfs.xAccess]]\n** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]\n** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to\n** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]\n** to test whether a file is at least readable.  The SQLITE_ACCESS_READ\n** flag is never actually used and is not implemented in the built-in\n** VFSes of SQLite.  The file is named by the second argument and can be a\n** directory. The xAccess method returns [SQLITE_OK] on success or some\n** non-zero error code if there is an I/O error or if the name of\n** the file given in the second argument is illegal.  If SQLITE_OK\n** is returned, then non-zero or zero is written into *pResOut to indicate\n** whether or not the file is accessible.\n**\n** ^SQLite will always allocate at least mxPathname+1 bytes for the\n** output buffer xFullPathname.  The exact size of the output buffer\n** is also passed as a parameter to both  methods. If the output buffer\n** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is\n** handled as a fatal error by SQLite, vfs implementations should endeavor\n** to prevent this by setting mxPathname to a sufficiently large value.\n**\n** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()\n** interfaces are not strictly a part of the filesystem, but they are\n** included in the VFS structure for completeness.\n** The xRandomness() function attempts to return nBytes bytes\n** of good-quality randomness into zOut.  The return value is\n** the actual number of bytes of randomness obtained.\n** The xSleep() method causes the calling thread to sleep for at\n** least the number of microseconds given.  ^The xCurrentTime()\n** method returns a Julian Day Number for the current date and time as\n** a floating point value.\n** ^The xCurrentTimeInt64() method returns, as an integer, the Julian\n** Day Number multiplied by 86400000 (the number of milliseconds in\n** a 24-hour day).\n** ^SQLite will use the xCurrentTimeInt64() method to get the current\n** date and time if that method is available (if iVersion is 2 or\n** greater and the function pointer is not NULL) and will fall back\n** to xCurrentTime() if xCurrentTimeInt64() is unavailable.\n**\n** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces\n** are not used by the SQLite core.  These optional interfaces are provided\n** by some VFSes to facilitate testing of the VFS code. By overriding\n** system calls with functions under its control, a test program can\n** simulate faults and error conditions that would otherwise be difficult\n** or impossible to induce.  The set of system calls that can be overridden\n** varies from one VFS to another, and from one version of the same VFS to the\n** next.  Applications that use these interfaces must be prepared for any\n** or all of these interfaces to be NULL or for their behavior to change\n** from one release to the next.  Applications must not attempt to access\n** any of these methods if the iVersion of the VFS is less than 3.\n*/\ntypedef struct sqlite3_vfs sqlite3_vfs;\ntypedef void (*sqlite3_syscall_ptr)(void);\nstruct sqlite3_vfs {\n  int iVersion;            /* Structure version number (currently 3) */\n  int szOsFile;            /* Size of subclassed sqlite3_file */\n  int mxPathname;          /* Maximum file pathname length */\n  sqlite3_vfs *pNext;      /* Next registered VFS */\n  const char *zName;       /* Name of this virtual file system */\n  void *pAppData;          /* Pointer to application-specific data */\n  int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*,\n               int flags, int *pOutFlags);\n  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);\n  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);\n  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);\n  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);\n  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);\n  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);\n  void (*xDlClose)(sqlite3_vfs*, void*);\n  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);\n  int (*xSleep)(sqlite3_vfs*, int microseconds);\n  int (*xCurrentTime)(sqlite3_vfs*, double*);\n  int (*xGetLastError)(sqlite3_vfs*, int, char *);\n  /*\n  ** The methods above are in version 1 of the sqlite_vfs object\n  ** definition.  Those that follow are added in version 2 or later\n  */\n  int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);\n  /*\n  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.\n  ** Those below are for version 3 and greater.\n  */\n  int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);\n  sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);\n  const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);\n  /*\n  ** The methods above are in versions 1 through 3 of the sqlite_vfs object.\n  ** New fields may be appended in future versions.  The iVersion\n  ** value will increment whenever this happens.\n  */\n};\n\n/*\n** CAPI3REF: Flags for the xAccess VFS method\n**\n** These integer constants can be used as the third parameter to\n** the xAccess method of an [sqlite3_vfs] object.  They determine\n** what kind of permissions the xAccess method is looking for.\n** With SQLITE_ACCESS_EXISTS, the xAccess method\n** simply checks whether the file exists.\n** With SQLITE_ACCESS_READWRITE, the xAccess method\n** checks whether the named directory is both readable and writable\n** (in other words, if files can be added, removed, and renamed within\n** the directory).\n** The SQLITE_ACCESS_READWRITE constant is currently used only by the\n** [temp_store_directory pragma], though this could change in a future\n** release of SQLite.\n** With SQLITE_ACCESS_READ, the xAccess method\n** checks whether the file is readable.  The SQLITE_ACCESS_READ constant is\n** currently unused, though it might be used in a future release of\n** SQLite.\n*/\n#define SQLITE_ACCESS_EXISTS    0\n#define SQLITE_ACCESS_READWRITE 1   /* Used by PRAGMA temp_store_directory */\n#define SQLITE_ACCESS_READ      2   /* Unused */\n\n/*\n** CAPI3REF: Flags for the xShmLock VFS method\n**\n** These integer constants define the various locking operations\n** allowed by the xShmLock method of [sqlite3_io_methods].  The\n** following are the only legal combinations of flags to the\n** xShmLock method:\n**\n** <ul>\n** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_SHARED\n** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE\n** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED\n** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE\n** </ul>\n**\n** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as\n** was given on the corresponding lock.\n**\n** The xShmLock method can transition between unlocked and SHARED or\n** between unlocked and EXCLUSIVE.  It cannot transition between SHARED\n** and EXCLUSIVE.\n*/\n#define SQLITE_SHM_UNLOCK       1\n#define SQLITE_SHM_LOCK         2\n#define SQLITE_SHM_SHARED       4\n#define SQLITE_SHM_EXCLUSIVE    8\n\n/*\n** CAPI3REF: Maximum xShmLock index\n**\n** The xShmLock method on [sqlite3_io_methods] may use values\n** between 0 and this upper bound as its \"offset\" argument.\n** The SQLite core will never attempt to acquire or release a\n** lock outside of this range\n*/\n#define SQLITE_SHM_NLOCK        8\n\n\n/*\n** CAPI3REF: Initialize The SQLite Library\n**\n** ^The sqlite3_initialize() routine initializes the\n** SQLite library.  ^The sqlite3_shutdown() routine\n** deallocates any resources that were allocated by sqlite3_initialize().\n** These routines are designed to aid in process initialization and\n** shutdown on embedded systems.  Workstation applications using\n** SQLite normally do not need to invoke either of these routines.\n**\n** A call to sqlite3_initialize() is an \"effective\" call if it is\n** the first time sqlite3_initialize() is invoked during the lifetime of\n** the process, or if it is the first time sqlite3_initialize() is invoked\n** following a call to sqlite3_shutdown().  ^(Only an effective call\n** of sqlite3_initialize() does any initialization.  All other calls\n** are harmless no-ops.)^\n**\n** A call to sqlite3_shutdown() is an \"effective\" call if it is the first\n** call to sqlite3_shutdown() since the last sqlite3_initialize().  ^(Only\n** an effective call to sqlite3_shutdown() does any deinitialization.\n** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^\n**\n** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()\n** is not.  The sqlite3_shutdown() interface must only be called from a\n** single thread.  All open [database connections] must be closed and all\n** other SQLite resources must be deallocated prior to invoking\n** sqlite3_shutdown().\n**\n** Among other things, ^sqlite3_initialize() will invoke\n** sqlite3_os_init().  Similarly, ^sqlite3_shutdown()\n** will invoke sqlite3_os_end().\n**\n** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.\n** ^If for some reason, sqlite3_initialize() is unable to initialize\n** the library (perhaps it is unable to allocate a needed resource such\n** as a mutex) it returns an [error code] other than [SQLITE_OK].\n**\n** ^The sqlite3_initialize() routine is called internally by many other\n** SQLite interfaces so that an application usually does not need to\n** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]\n** calls sqlite3_initialize() so the SQLite library will be automatically\n** initialized when [sqlite3_open()] is called if it has not been initialized\n** already.  ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]\n** compile-time option, then the automatic calls to sqlite3_initialize()\n** are omitted and the application must call sqlite3_initialize() directly\n** prior to using any other SQLite interface.  For maximum portability,\n** it is recommended that applications always invoke sqlite3_initialize()\n** directly prior to using any other SQLite interface.  Future releases\n** of SQLite may require this.  In other words, the behavior exhibited\n** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the\n** default behavior in some future release of SQLite.\n**\n** The sqlite3_os_init() routine does operating-system specific\n** initialization of the SQLite library.  The sqlite3_os_end()\n** routine undoes the effect of sqlite3_os_init().  Typical tasks\n** performed by these routines include allocation or deallocation\n** of static resources, initialization of global variables,\n** setting up a default [sqlite3_vfs] module, or setting up\n** a default configuration using [sqlite3_config()].\n**\n** The application should never invoke either sqlite3_os_init()\n** or sqlite3_os_end() directly.  The application should only invoke\n** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()\n** interface is called automatically by sqlite3_initialize() and\n** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate\n** implementations for sqlite3_os_init() and sqlite3_os_end()\n** are built into SQLite when it is compiled for Unix, Windows, or OS/2.\n** When [custom builds | built for other platforms]\n** (using the [SQLITE_OS_OTHER=1] compile-time\n** option) the application must supply a suitable implementation for\n** sqlite3_os_init() and sqlite3_os_end().  An application-supplied\n** implementation of sqlite3_os_init() or sqlite3_os_end()\n** must return [SQLITE_OK] on success and some other [error code] upon\n** failure.\n*/\nSQLITE_API int sqlite3_initialize(void);\nSQLITE_API int sqlite3_shutdown(void);\nSQLITE_API int sqlite3_os_init(void);\nSQLITE_API int sqlite3_os_end(void);\n\n/*\n** CAPI3REF: Configuring The SQLite Library\n**\n** The sqlite3_config() interface is used to make global configuration\n** changes to SQLite in order to tune SQLite to the specific needs of\n** the application.  The default configuration is recommended for most\n** applications and so this routine is usually not necessary.  It is\n** provided to support rare applications with unusual needs.\n**\n** <b>The sqlite3_config() interface is not threadsafe. The application\n** must ensure that no other SQLite interfaces are invoked by other\n** threads while sqlite3_config() is running.</b>\n**\n** The first argument to sqlite3_config() is an integer\n** [configuration option] that determines\n** what property of SQLite is to be configured.  Subsequent arguments\n** vary depending on the [configuration option]\n** in the first argument.\n**\n** For most configuration options, the sqlite3_config() interface\n** may only be invoked prior to library initialization using\n** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].\n** The exceptional configuration options that may be invoked at any time\n** are called \"anytime configuration options\".\n** ^If sqlite3_config() is called after [sqlite3_initialize()] and before\n** [sqlite3_shutdown()] with a first argument that is not an anytime\n** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.\n** Note, however, that ^sqlite3_config() can be called as part of the\n** implementation of an application-defined [sqlite3_os_init()].\n**\n** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].\n** ^If the option is unknown or SQLite is unable to set the option\n** then this routine returns a non-zero [error code].\n*/\nSQLITE_API int sqlite3_config(int, ...);\n\n/*\n** CAPI3REF: Configure database connections\n** METHOD: sqlite3\n**\n** The sqlite3_db_config() interface is used to make configuration\n** changes to a [database connection].  The interface is similar to\n** [sqlite3_config()] except that the changes apply to a single\n** [database connection] (specified in the first argument).\n**\n** The second argument to sqlite3_db_config(D,V,...)  is the\n** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code\n** that indicates what aspect of the [database connection] is being configured.\n** Subsequent arguments vary depending on the configuration verb.\n**\n** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if\n** the call is considered successful.\n*/\nSQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);\n\n/*\n** CAPI3REF: Memory Allocation Routines\n**\n** An instance of this object defines the interface between SQLite\n** and low-level memory allocation routines.\n**\n** This object is used in only one place in the SQLite interface.\n** A pointer to an instance of this object is the argument to\n** [sqlite3_config()] when the configuration option is\n** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].\n** By creating an instance of this object\n** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])\n** during configuration, an application can specify an alternative\n** memory allocation subsystem for SQLite to use for all of its\n** dynamic memory needs.\n**\n** Note that SQLite comes with several [built-in memory allocators]\n** that are perfectly adequate for the overwhelming majority of applications\n** and that this object is only useful to a tiny minority of applications\n** with specialized memory allocation requirements.  This object is\n** also used during testing of SQLite in order to specify an alternative\n** memory allocator that simulates memory out-of-memory conditions in\n** order to verify that SQLite recovers gracefully from such\n** conditions.\n**\n** The xMalloc, xRealloc, and xFree methods must work like the\n** malloc(), realloc() and free() functions from the standard C library.\n** ^SQLite guarantees that the second argument to\n** xRealloc is always a value returned by a prior call to xRoundup.\n**\n** xSize should return the allocated size of a memory allocation\n** previously obtained from xMalloc or xRealloc.  The allocated size\n** is always at least as big as the requested size but may be larger.\n**\n** The xRoundup method returns what would be the allocated size of\n** a memory allocation given a particular requested size.  Most memory\n** allocators round up memory allocations at least to the next multiple\n** of 8.  Some allocators round up to a larger multiple or to a power of 2.\n** Every memory allocation request coming in through [sqlite3_malloc()]\n** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,\n** that causes the corresponding memory allocation to fail.\n**\n** The xInit method initializes the memory allocator.  For example,\n** it might allocate any required mutexes or initialize internal data\n** structures.  The xShutdown method is invoked (indirectly) by\n** [sqlite3_shutdown()] and should deallocate any resources acquired\n** by xInit.  The pAppData pointer is used as the only parameter to\n** xInit and xShutdown.\n**\n** SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes\n** the xInit method, so the xInit method need not be threadsafe.  The\n** xShutdown method is only called from [sqlite3_shutdown()] so it does\n** not need to be threadsafe either.  For all other methods, SQLite\n** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the\n** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which\n** it is by default) and so the methods are automatically serialized.\n** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other\n** methods must be threadsafe or else make their own arrangements for\n** serialization.\n**\n** SQLite will never invoke xInit() more than once without an intervening\n** call to xShutdown().\n*/\ntypedef struct sqlite3_mem_methods sqlite3_mem_methods;\nstruct sqlite3_mem_methods {\n  void *(*xMalloc)(int);         /* Memory allocation function */\n  void (*xFree)(void*);          /* Free a prior allocation */\n  void *(*xRealloc)(void*,int);  /* Resize an allocation */\n  int (*xSize)(void*);           /* Return the size of an allocation */\n  int (*xRoundup)(int);          /* Round up request size to allocation size */\n  int (*xInit)(void*);           /* Initialize the memory allocator */\n  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */\n  void *pAppData;                /* Argument to xInit() and xShutdown() */\n};\n\n/*\n** CAPI3REF: Configuration Options\n** KEYWORDS: {configuration option}\n**\n** These constants are the available integer configuration options that\n** can be passed as the first argument to the [sqlite3_config()] interface.\n**\n** Most of the configuration options for sqlite3_config()\n** will only work if invoked prior to [sqlite3_initialize()] or after\n** [sqlite3_shutdown()].  The few exceptions to this rule are called\n** \"anytime configuration options\".\n** ^Calling [sqlite3_config()] with a first argument that is not an\n** anytime configuration option in between calls to [sqlite3_initialize()] and\n** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE.\n**\n** The set of anytime configuration options can change (by insertions\n** and/or deletions) from one release of SQLite to the next.\n** As of SQLite version 3.42.0, the complete set of anytime configuration\n** options is:\n** <ul>\n** <li> SQLITE_CONFIG_LOG\n** <li> SQLITE_CONFIG_PCACHE_HDRSZ\n** </ul>\n**\n** New configuration options may be added in future releases of SQLite.\n** Existing configuration options might be discontinued.  Applications\n** should check the return code from [sqlite3_config()] to make sure that\n** the call worked.  The [sqlite3_config()] interface will return a\n** non-zero [error code] if a discontinued or unsupported configuration option\n** is invoked.\n**\n** <dl>\n** [[SQLITE_CONFIG_SINGLETHREAD]] <dt>SQLITE_CONFIG_SINGLETHREAD</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Single-thread.  In other words, it disables\n** all mutexing and puts SQLite into a mode where it can only be used\n** by a single thread.   ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to change the [threading mode] from its default\n** value of Single-thread and so [sqlite3_config()] will return\n** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD\n** configuration option.</dd>\n**\n** [[SQLITE_CONFIG_MULTITHREAD]] <dt>SQLITE_CONFIG_MULTITHREAD</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Multi-thread.  In other words, it disables\n** mutexing on [database connection] and [prepared statement] objects.\n** The application is responsible for serializing access to\n** [database connections] and [prepared statements].  But other mutexes\n** are enabled so that SQLite will be safe to use in a multi-threaded\n** environment as long as no two threads attempt to use the same\n** [database connection] at the same time.  ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to set the Multi-thread [threading mode] and\n** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\n** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>\n**\n** [[SQLITE_CONFIG_SERIALIZED]] <dt>SQLITE_CONFIG_SERIALIZED</dt>\n** <dd>There are no arguments to this option.  ^This option sets the\n** [threading mode] to Serialized. In other words, this option enables\n** all mutexes including the recursive\n** mutexes on [database connection] and [prepared statement] objects.\n** In this mode (which is the default when SQLite is compiled with\n** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access\n** to [database connections] and [prepared statements] so that the\n** application is free to use the same [database connection] or the\n** same [prepared statement] in different threads at the same time.\n** ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** it is not possible to set the Serialized [threading mode] and\n** [sqlite3_config()] will return [SQLITE_ERROR] if called with the\n** SQLITE_CONFIG_SERIALIZED configuration option.</dd>\n**\n** [[SQLITE_CONFIG_MALLOC]] <dt>SQLITE_CONFIG_MALLOC</dt>\n** <dd> ^(The SQLITE_CONFIG_MALLOC option takes a single argument which is\n** a pointer to an instance of the [sqlite3_mem_methods] structure.\n** The argument specifies\n** alternative low-level memory allocation routines to be used in place of\n** the memory allocation routines built into SQLite.)^ ^SQLite makes\n** its own private copy of the content of the [sqlite3_mem_methods] structure\n** before the [sqlite3_config()] call returns.</dd>\n**\n** [[SQLITE_CONFIG_GETMALLOC]] <dt>SQLITE_CONFIG_GETMALLOC</dt>\n** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which\n** is a pointer to an instance of the [sqlite3_mem_methods] structure.\n** The [sqlite3_mem_methods]\n** structure is filled with the currently defined memory allocation routines.)^\n** This option can be used to overload the default memory allocation\n** routines with a wrapper that simulates memory allocation failure or\n** tracks memory usage, for example. </dd>\n**\n** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt>\n** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of\n** type int, interpreted as a boolean, which if true provides a hint to\n** SQLite that it should avoid large memory allocations if possible.\n** SQLite will run faster if it is free to make large memory allocations,\n** but some applications might prefer to run slower in exchange for\n** guarantees about memory fragmentation that are possible if large\n** allocations are avoided.  This hint is normally off.\n** </dd>\n**\n** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt>\n** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int,\n** interpreted as a boolean, which enables or disables the collection of\n** memory allocation statistics. ^(When memory allocation statistics are\n** disabled, the following SQLite interfaces become non-operational:\n**   <ul>\n**   <li> [sqlite3_hard_heap_limit64()]\n**   <li> [sqlite3_memory_used()]\n**   <li> [sqlite3_memory_highwater()]\n**   <li> [sqlite3_soft_heap_limit64()]\n**   <li> [sqlite3_status64()]\n**   </ul>)^\n** ^Memory allocation statistics are enabled by default unless SQLite is\n** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory\n** allocation statistics are disabled by default.\n** </dd>\n**\n** [[SQLITE_CONFIG_SCRATCH]] <dt>SQLITE_CONFIG_SCRATCH</dt>\n** <dd> The SQLITE_CONFIG_SCRATCH option is no longer used.\n** </dd>\n**\n** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt>\n** <dd> ^The SQLITE_CONFIG_PAGECACHE option specifies a memory pool\n** that SQLite can use for the database page cache with the default page\n** cache implementation.\n** This configuration option is a no-op if an application-defined page\n** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2].\n** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to\n** 8-byte aligned memory (pMem), the size of each page cache line (sz),\n** and the number of cache lines (N).\n** The sz argument should be the size of the largest database page\n** (a power of two between 512 and 65536) plus some extra bytes for each\n** page header.  ^The number of extra bytes needed by the page header\n** can be determined using [SQLITE_CONFIG_PCACHE_HDRSZ].\n** ^It is harmless, apart from the wasted memory,\n** for the sz parameter to be larger than necessary.  The pMem\n** argument must be either a NULL pointer or a pointer to an 8-byte\n** aligned block of memory of at least sz*N bytes, otherwise\n** subsequent behavior is undefined.\n** ^When pMem is not NULL, SQLite will strive to use the memory provided\n** to satisfy page cache needs, falling back to [sqlite3_malloc()] if\n** a page cache line is larger than sz bytes or if all of the pMem buffer\n** is exhausted.\n** ^If pMem is NULL and N is non-zero, then each database connection\n** does an initial bulk allocation for page cache memory\n** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or\n** of -1024*N bytes if N is negative. ^If additional\n** page cache memory is needed beyond what is provided by the initial\n** allocation, then SQLite goes to [sqlite3_malloc()] separately for each\n** additional cache line. </dd>\n**\n** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt>\n** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer\n** that SQLite will use for all of its dynamic memory allocation needs\n** beyond those provided for by [SQLITE_CONFIG_PAGECACHE].\n** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled\n** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns\n** [SQLITE_ERROR] if invoked otherwise.\n** ^There are three arguments to SQLITE_CONFIG_HEAP:\n** An 8-byte aligned pointer to the memory,\n** the number of bytes in the memory buffer, and the minimum allocation size.\n** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts\n** to using its default memory allocator (the system malloc() implementation),\n** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  ^If the\n** memory pointer is not NULL then the alternative memory\n** allocator is engaged to handle all of SQLites memory allocation needs.\n** The first pointer (the memory pointer) must be aligned to an 8-byte\n** boundary or subsequent behavior of SQLite will be undefined.\n** The minimum allocation size is capped at 2**12. Reasonable values\n** for the minimum allocation size are 2**5 through 2**8.</dd>\n**\n** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt>\n** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a\n** pointer to an instance of the [sqlite3_mutex_methods] structure.\n** The argument specifies alternative low-level mutex routines to be used\n** in place of the mutex routines built into SQLite.)^  ^SQLite makes a copy of\n** the content of the [sqlite3_mutex_methods] structure before the call to\n** [sqlite3_config()] returns. ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** the entire mutexing subsystem is omitted from the build and hence calls to\n** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will\n** return [SQLITE_ERROR].</dd>\n**\n** [[SQLITE_CONFIG_GETMUTEX]] <dt>SQLITE_CONFIG_GETMUTEX</dt>\n** <dd> ^(The SQLITE_CONFIG_GETMUTEX option takes a single argument which\n** is a pointer to an instance of the [sqlite3_mutex_methods] structure.  The\n** [sqlite3_mutex_methods]\n** structure is filled with the currently defined mutex routines.)^\n** This option can be used to overload the default mutex allocation\n** routines with a wrapper used to track mutex usage for performance\n** profiling or testing, for example.   ^If SQLite is compiled with\n** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then\n** the entire mutexing subsystem is omitted from the build and hence calls to\n** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will\n** return [SQLITE_ERROR].</dd>\n**\n** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>\n** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine\n** the default size of [lookaside memory] on each [database connection].\n** The first argument is the\n** size of each lookaside buffer slot (\"sz\") and the second is the number of\n** slots allocated to each database connection (\"cnt\").)^\n** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.\n** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can\n** be used to change the lookaside configuration on individual connections.)^\n** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the\n** default lookaside configuration at compile-time.\n** </dd>\n**\n** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>\n** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is\n** a pointer to an [sqlite3_pcache_methods2] object.  This object specifies\n** the interface to a custom page cache implementation.)^\n** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd>\n**\n** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt>\n** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which\n** is a pointer to an [sqlite3_pcache_methods2] object.  SQLite copies off\n** the current page cache implementation into that object.)^ </dd>\n**\n** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt>\n** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite\n** global [error log].\n** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a\n** function with a call signature of void(*)(void*,int,const char*),\n** and a pointer to void. ^If the function pointer is not NULL, it is\n** invoked by [sqlite3_log()] to process each logging event.  ^If the\n** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.\n** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is\n** passed through as the first parameter to the application-defined logger\n** function whenever that function is invoked.  ^The second parameter to\n** the logger function is a copy of the first parameter to the corresponding\n** [sqlite3_log()] call and is intended to be a [result code] or an\n** [extended result code].  ^The third parameter passed to the logger is\n** a log message after formatting via [sqlite3_snprintf()].\n** The SQLite logging interface is not reentrant; the logger function\n** supplied by the application must not invoke any SQLite interface.\n** In a multi-threaded application, the application-defined logger\n** function must be threadsafe. </dd>\n**\n** [[SQLITE_CONFIG_URI]] <dt>SQLITE_CONFIG_URI\n** <dd>^(The SQLITE_CONFIG_URI option takes a single argument of type int.\n** If non-zero, then URI handling is globally enabled. If the parameter is zero,\n** then URI handling is globally disabled.)^ ^If URI handling is globally\n** enabled, all filenames passed to [sqlite3_open()], [sqlite3_open_v2()],\n** [sqlite3_open16()] or\n** specified as part of [ATTACH] commands are interpreted as URIs, regardless\n** of whether or not the [SQLITE_OPEN_URI] flag is set when the database\n** connection is opened. ^If it is globally disabled, filenames are\n** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the\n** database connection is opened. ^(By default, URI handling is globally\n** disabled. The default value may be changed by compiling with the\n** [SQLITE_USE_URI] symbol defined.)^\n**\n** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN\n** <dd>^The SQLITE_CONFIG_COVERING_INDEX_SCAN option takes a single integer\n** argument which is interpreted as a boolean in order to enable or disable\n** the use of covering indices for full table scans in the query optimizer.\n** ^The default setting is determined\n** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is \"on\"\n** if that compile-time option is omitted.\n** The ability to disable the use of covering indices for full table scans\n** is because some incorrectly coded legacy applications might malfunction\n** when the optimization is enabled.  Providing the ability to\n** disable the optimization allows the older, buggy application code to work\n** without change even with newer versions of SQLite.\n**\n** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]]\n** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE\n** <dd> These options are obsolete and should not be used by new code.\n** They are retained for backwards compatibility but are now no-ops.\n** </dd>\n**\n** [[SQLITE_CONFIG_SQLLOG]]\n** <dt>SQLITE_CONFIG_SQLLOG\n** <dd>This option is only available if sqlite is compiled with the\n** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should\n** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).\n** The second should be of type (void*). The callback is invoked by the library\n** in three separate circumstances, identified by the value passed as the\n** fourth parameter. If the fourth parameter is 0, then the database connection\n** passed as the second argument has just been opened. The third argument\n** points to a buffer containing the name of the main database file. If the\n** fourth parameter is 1, then the SQL statement that the third parameter\n** points to has just been executed. Or, if the fourth parameter is 2, then\n** the connection being passed as the second parameter is being closed. The\n** third parameter is passed NULL In this case.  An example of using this\n** configuration option can be seen in the \"test_sqllog.c\" source file in\n** the canonical SQLite source tree.</dd>\n**\n** [[SQLITE_CONFIG_MMAP_SIZE]]\n** <dt>SQLITE_CONFIG_MMAP_SIZE\n** <dd>^SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values\n** that are the default mmap size limit (the default setting for\n** [PRAGMA mmap_size]) and the maximum allowed mmap size limit.\n** ^The default setting can be overridden by each database connection using\n** either the [PRAGMA mmap_size] command, or by using the\n** [SQLITE_FCNTL_MMAP_SIZE] file control.  ^(The maximum allowed mmap size\n** will be silently truncated if necessary so that it does not exceed the\n** compile-time maximum mmap size set by the\n** [SQLITE_MAX_MMAP_SIZE] compile-time option.)^\n** ^If either argument to this option is negative, then that argument is\n** changed to its compile-time default.\n**\n** [[SQLITE_CONFIG_WIN32_HEAPSIZE]]\n** <dt>SQLITE_CONFIG_WIN32_HEAPSIZE\n** <dd>^The SQLITE_CONFIG_WIN32_HEAPSIZE option is only available if SQLite is\n** compiled for Windows with the [SQLITE_WIN32_MALLOC] pre-processor macro\n** defined. ^SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value\n** that specifies the maximum size of the created heap.\n**\n** [[SQLITE_CONFIG_PCACHE_HDRSZ]]\n** <dt>SQLITE_CONFIG_PCACHE_HDRSZ\n** <dd>^The SQLITE_CONFIG_PCACHE_HDRSZ option takes a single parameter which\n** is a pointer to an integer and writes into that integer the number of extra\n** bytes per page required for each page in [SQLITE_CONFIG_PAGECACHE].\n** The amount of extra space required can change depending on the compiler,\n** target platform, and SQLite version.\n**\n** [[SQLITE_CONFIG_PMASZ]]\n** <dt>SQLITE_CONFIG_PMASZ\n** <dd>^The SQLITE_CONFIG_PMASZ option takes a single parameter which\n** is an unsigned integer and sets the \"Minimum PMA Size\" for the multithreaded\n** sorter to that integer.  The default minimum PMA Size is set by the\n** [SQLITE_SORTER_PMASZ] compile-time option.  New threads are launched\n** to help with sort operations when multithreaded sorting\n** is enabled (using the [PRAGMA threads] command) and the amount of content\n** to be sorted exceeds the page size times the minimum of the\n** [PRAGMA cache_size] setting and this value.\n**\n** [[SQLITE_CONFIG_STMTJRNL_SPILL]]\n** <dt>SQLITE_CONFIG_STMTJRNL_SPILL\n** <dd>^The SQLITE_CONFIG_STMTJRNL_SPILL option takes a single parameter which\n** becomes the [statement journal] spill-to-disk threshold.\n** [Statement journals] are held in memory until their size (in bytes)\n** exceeds this threshold, at which point they are written to disk.\n** Or if the threshold is -1, statement journals are always held\n** exclusively in memory.\n** Since many statement journals never become large, setting the spill\n** threshold to a value such as 64KiB can greatly reduce the amount of\n** I/O required to support statement rollback.\n** The default value for this setting is controlled by the\n** [SQLITE_STMTJRNL_SPILL] compile-time option.\n**\n** [[SQLITE_CONFIG_SORTERREF_SIZE]]\n** <dt>SQLITE_CONFIG_SORTERREF_SIZE\n** <dd>The SQLITE_CONFIG_SORTERREF_SIZE option accepts a single parameter\n** of type (int) - the new value of the sorter-reference size threshold.\n** Usually, when SQLite uses an external sort to order records according\n** to an ORDER BY clause, all fields required by the caller are present in the\n** sorted records. However, if SQLite determines based on the declared type\n** of a table column that its values are likely to be very large - larger\n** than the configured sorter-reference size threshold - then a reference\n** is stored in each sorted record and the required column values loaded\n** from the database as records are returned in sorted order. The default\n** value for this option is to never use this optimization. Specifying a\n** negative value for this option restores the default behavior.\n** This option is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.\n**\n** [[SQLITE_CONFIG_MEMDB_MAXSIZE]]\n** <dt>SQLITE_CONFIG_MEMDB_MAXSIZE\n** <dd>The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter\n** [sqlite3_int64] parameter which is the default maximum size for an in-memory\n** database created using [sqlite3_deserialize()].  This default maximum\n** size can be adjusted up or down for individual databases using the\n** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control].  If this\n** configuration setting is never used, then the default maximum is determined\n** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option.  If that\n** compile-time option is not set, then the default maximum is 1073741824.\n**\n** [[SQLITE_CONFIG_ROWID_IN_VIEW]]\n** <dt>SQLITE_CONFIG_ROWID_IN_VIEW\n** <dd>The SQLITE_CONFIG_ROWID_IN_VIEW option enables or disables the ability\n** for VIEWs to have a ROWID.  The capability can only be enabled if SQLite is\n** compiled with -DSQLITE_ALLOW_ROWID_IN_VIEW, in which case the capability\n** defaults to on.  This configuration option queries the current setting or\n** changes the setting to off or on.  The argument is a pointer to an integer.\n** If that integer initially holds a value of 1, then the ability for VIEWs to\n** have ROWIDs is activated.  If the integer initially holds zero, then the\n** ability is deactivated.  Any other initial value for the integer leaves the\n** setting unchanged.  After changes, if any, the integer is written with\n** a 1 or 0, if the ability for VIEWs to have ROWIDs is on or off.  If SQLite\n** is compiled without -DSQLITE_ALLOW_ROWID_IN_VIEW (which is the usual and\n** recommended case) then the integer is always filled with zero, regardless\n** if its initial value.\n** </dl>\n*/\n#define SQLITE_CONFIG_SINGLETHREAD         1  /* nil */\n#define SQLITE_CONFIG_MULTITHREAD          2  /* nil */\n#define SQLITE_CONFIG_SERIALIZED           3  /* nil */\n#define SQLITE_CONFIG_MALLOC               4  /* sqlite3_mem_methods* */\n#define SQLITE_CONFIG_GETMALLOC            5  /* sqlite3_mem_methods* */\n#define SQLITE_CONFIG_SCRATCH              6  /* No longer used */\n#define SQLITE_CONFIG_PAGECACHE            7  /* void*, int sz, int N */\n#define SQLITE_CONFIG_HEAP                 8  /* void*, int nByte, int min */\n#define SQLITE_CONFIG_MEMSTATUS            9  /* boolean */\n#define SQLITE_CONFIG_MUTEX               10  /* sqlite3_mutex_methods* */\n#define SQLITE_CONFIG_GETMUTEX            11  /* sqlite3_mutex_methods* */\n/* previously SQLITE_CONFIG_CHUNKALLOC    12 which is now unused. */\n#define SQLITE_CONFIG_LOOKASIDE           13  /* int int */\n#define SQLITE_CONFIG_PCACHE              14  /* no-op */\n#define SQLITE_CONFIG_GETPCACHE           15  /* no-op */\n#define SQLITE_CONFIG_LOG                 16  /* xFunc, void* */\n#define SQLITE_CONFIG_URI                 17  /* int */\n#define SQLITE_CONFIG_PCACHE2             18  /* sqlite3_pcache_methods2* */\n#define SQLITE_CONFIG_GETPCACHE2          19  /* sqlite3_pcache_methods2* */\n#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20  /* int */\n#define SQLITE_CONFIG_SQLLOG              21  /* xSqllog, void* */\n#define SQLITE_CONFIG_MMAP_SIZE           22  /* sqlite3_int64, sqlite3_int64 */\n#define SQLITE_CONFIG_WIN32_HEAPSIZE      23  /* int nByte */\n#define SQLITE_CONFIG_PCACHE_HDRSZ        24  /* int *psz */\n#define SQLITE_CONFIG_PMASZ               25  /* unsigned int szPma */\n#define SQLITE_CONFIG_STMTJRNL_SPILL      26  /* int nByte */\n#define SQLITE_CONFIG_SMALL_MALLOC        27  /* boolean */\n#define SQLITE_CONFIG_SORTERREF_SIZE      28  /* int nByte */\n#define SQLITE_CONFIG_MEMDB_MAXSIZE       29  /* sqlite3_int64 */\n#define SQLITE_CONFIG_ROWID_IN_VIEW       30  /* int* */\n\n/*\n** CAPI3REF: Database Connection Configuration Options\n**\n** These constants are the available integer configuration options that\n** can be passed as the second parameter to the [sqlite3_db_config()] interface.\n**\n** The [sqlite3_db_config()] interface is a var-args function.  It takes a\n** variable number of parameters, though always at least two.  The number of\n** parameters passed into sqlite3_db_config() depends on which of these\n** constants is given as the second parameter.  This documentation page\n** refers to parameters beyond the second as \"arguments\".  Thus, when this\n** page says \"the N-th argument\" it means \"the N-th parameter past the\n** configuration option\" or \"the (N+2)-th parameter to sqlite3_db_config()\".\n**\n** New configuration options may be added in future releases of SQLite.\n** Existing configuration options might be discontinued.  Applications\n** should check the return code from [sqlite3_db_config()] to make sure that\n** the call worked.  ^The [sqlite3_db_config()] interface will return a\n** non-zero [error code] if a discontinued or unsupported configuration option\n** is invoked.\n**\n** <dl>\n** [[SQLITE_DBCONFIG_LOOKASIDE]]\n** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>\n** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the\n** configuration of the [lookaside memory allocator] within a database\n** connection.\n** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>\n** in the [DBCONFIG arguments|usual format].\n** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,\n** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE\n** should have a total of five parameters.\n** <ol>\n** <li><p>The first argument (\"buf\") is a\n** pointer to a memory buffer to use for lookaside memory.\n** The first argument may be NULL in which case SQLite will allocate the\n** lookaside buffer itself using [sqlite3_malloc()].\n** <li><P>The second argument (\"sz\") is the\n** size of each lookaside buffer slot.  Lookaside is disabled if \"sz\"\n** is less than 8.  The \"sz\" argument should be a multiple of 8 less than\n** 65536.  If \"sz\" does not meet this constraint, it is reduced in size until\n** it does.\n** <li><p>The third argument (\"cnt\") is the number of slots. Lookaside is disabled\n** if \"cnt\"is less than 1.  The \"cnt\" value will be reduced, if necessary, so\n** that the product of \"sz\" and \"cnt\" does not exceed 2,147,418,112.  The \"cnt\"\n** parameter is usually chosen so that the product of \"sz\" and \"cnt\" is less\n** than 1,000,000.\n** </ol>\n** <p>If the \"buf\" argument is not NULL, then it must\n** point to a memory buffer with a size that is greater than\n** or equal to the product of \"sz\" and \"cnt\".\n** The buffer must be aligned to an 8-byte boundary.\n** The lookaside memory\n** configuration for a database connection can only be changed when that\n** connection is not currently using lookaside memory, or in other words\n** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.\n** Any attempt to change the lookaside memory configuration when lookaside\n** memory is in use leaves the configuration unchanged and returns\n** [SQLITE_BUSY].\n** If the \"buf\" argument is NULL and an attempt\n** to allocate memory based on \"sz\" and \"cnt\" fails, then\n** lookaside is silently disabled.\n** <p>\n** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the\n** default lookaside configuration at initialization.  The\n** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside\n** configuration at compile-time.  Typical values for lookaside are 1200 for\n** \"sz\" and 40 to 100 for \"cnt\".\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_FKEY]]\n** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>\n** <dd> ^This option is used to enable or disable the enforcement of\n** [foreign key constraints].  This is the same setting that is\n** enabled or disabled by the [PRAGMA foreign_keys] statement.\n** The first argument is an integer which is 0 to disable FK enforcement,\n** positive to enable FK enforcement or negative to leave FK enforcement\n** unchanged.  The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether FK enforcement is off or on\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the FK enforcement setting is not reported back. </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]]\n** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>\n** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].\n** There should be two additional arguments.\n** The first argument is an integer which is 0 to disable triggers,\n** positive to enable triggers or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether triggers are disabled or enabled\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the trigger setting is not reported back.\n**\n** <p>Originally this option disabled all triggers.  ^(However, since\n** SQLite version 3.35.0, TEMP triggers are still allowed even if\n** this option is off.  So, in other words, this option now only disables\n** triggers in the main database schema or in the schemas of [ATTACH]-ed\n** databases.)^ </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_VIEW]]\n** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>\n** <dd> ^This option is used to enable or disable [CREATE VIEW | views].\n** There must be two additional arguments.\n** The first argument is an integer which is 0 to disable views,\n** positive to enable views or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether views are disabled or enabled\n** following this call.  The second parameter may be a NULL pointer, in\n** which case the view setting is not reported back.\n**\n** <p>Originally this option disabled all views.  ^(However, since\n** SQLite version 3.35.0, TEMP views are still allowed even if\n** this option is off.  So, in other words, this option now only disables\n** views in the main database schema or in the schemas of ATTACH-ed\n** databases.)^ </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]\n** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>\n** <dd> ^This option is used to enable or disable using the\n** [fts3_tokenizer()] function - part of the [FTS3] full-text search engine\n** extension - without using bound parameters as the parameters. Doing so\n** is disabled by default. There must be two additional arguments. The first\n** argument is an integer. If it is passed 0, then using fts3_tokenizer()\n** without bound parameters is disabled. If it is passed a positive value,\n** then calling fts3_tokenizer without bound parameters is enabled. If it\n** is passed a negative value, this setting is not modified - this can be\n** used to query for the current setting. The second parameter is a pointer\n** to an integer into which is written 0 or 1 to indicate the current value\n** of this setting (after it is modified, if applicable).  The second\n** parameter may be a NULL pointer, in which case the value of the setting\n** is not reported back. Refer to [FTS3] documentation for further details.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]\n** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>\n** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]\n** interface independently of the [load_extension()] SQL function.\n** The [sqlite3_enable_load_extension()] API enables or disables both the\n** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].\n** There must be two additional arguments.\n** When the first argument to this interface is 1, then only the C-API is\n** enabled and the SQL function remains disabled.  If the first argument to\n** this interface is 0, then both the C-API and the SQL function are disabled.\n** If the first argument is -1, then no changes are made to the state of either\n** the C-API or the SQL function.\n** The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface\n** is disabled or enabled following this call.  The second parameter may\n** be a NULL pointer, in which case the new setting is not reported back.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>\n** <dd> ^This option is used to change the name of the \"main\" database\n** schema.  This option does not follow the\n** [DBCONFIG arguments|usual SQLITE_DBCONFIG argument format].\n** This option takes exactly one additional argument so that the\n** [sqlite3_db_config()] call has a total of three parameters.  The\n** extra argument must be a pointer to a constant UTF8 string which\n** will become the new schema name in place of \"main\".  ^SQLite does\n** not make a copy of the new main schema name string, so the application\n** must ensure that the argument passed into SQLITE_DBCONFIG MAINDBNAME\n** is unchanged until after the database connection closes.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]\n** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>\n** <dd> Usually, when a database in [WAL mode] is closed or detached from a\n** database handle, SQLite checks if if there are other connections to the\n** same database, and if there are no other database connection (if the\n** connection being closed is the last open connection to the database),\n** then SQLite performs a [checkpoint] before closing the connection and\n** deletes the WAL file.  The SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option can\n** be used to override that behavior. The first argument passed to this\n** operation (the third parameter to [sqlite3_db_config()]) is an integer\n** which is positive to disable checkpoints-on-close, or zero (the default)\n** to enable them, and negative to leave the setting unchanged.\n** The second argument (the fourth parameter) is a pointer to an integer\n** into which is written 0 or 1 to indicate whether checkpoints-on-close\n** have been disabled - 0 if they are not disabled, 1 if they are.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>\n** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates\n** the [query planner stability guarantee] (QPSG).  When the QPSG is active,\n** a single SQL query statement will always use the same algorithm regardless\n** of values of [bound parameters].)^ The QPSG disables some query optimizations\n** that look at the values of bound parameters, which can make some queries\n** slower.  But the QPSG has the advantage of more predictable behavior.  With\n** the QPSG active, SQLite will always use the same query plan in the field as\n** was used during testing in the lab.\n** The first argument to this setting is an integer which is 0 to disable\n** the QPSG, positive to enable QPSG, or negative to leave the setting\n** unchanged. The second parameter is a pointer to an integer into which\n** is written 0 or 1 to indicate whether the QPSG is disabled or enabled\n** following this call.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>\n** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not\n** include output for any operations performed by trigger programs. This\n** option is used to set or clear (the default) a flag that governs this\n** behavior. The first parameter passed to this operation is an integer -\n** positive to enable output for trigger programs, or zero to disable it,\n** or negative to leave the setting unchanged.\n** The second parameter is a pointer to an integer into which is written\n** 0 or 1 to indicate whether output-for-triggers has been disabled - 0 if\n** it is not disabled, 1 if it is.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_RESET_DATABASE]] <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>\n** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run\n** [VACUUM] in order to reset a database back to an empty database\n** with no schema and no content. The following process works even for\n** a badly corrupted database file:\n** <ol>\n** <li> If the database connection is newly opened, make sure it has read the\n**      database schema by preparing then discarding some query against the\n**      database, or calling sqlite3_table_column_metadata(), ignoring any\n**      errors.  This step is only necessary if the application desires to keep\n**      the database in WAL mode after the reset if it was in WAL mode before\n**      the reset.\n** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 1, 0);\n** <li> [sqlite3_exec](db, \"[VACUUM]\", 0, 0, 0);\n** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0);\n** </ol>\n** Because resetting a database is destructive and irreversible, the\n** process requires the use of this obscure API and multiple steps to\n** help ensure that it does not happen by accident. Because this\n** feature must be capable of resetting corrupt databases, and\n** shutting down virtual tables may require access to that corrupt\n** storage, the library must abandon any installed virtual tables\n** without calling their xDestroy() methods.\n**\n** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>\n** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the\n** \"defensive\" flag for a database connection.  When the defensive\n** flag is enabled, language features that allow ordinary SQL to\n** deliberately corrupt the database file are disabled.  The disabled\n** features include but are not limited to the following:\n** <ul>\n** <li> The [PRAGMA writable_schema=ON] statement.\n** <li> The [PRAGMA journal_mode=OFF] statement.\n** <li> The [PRAGMA schema_version=N] statement.\n** <li> Writes to the [sqlite_dbpage] virtual table.\n** <li> Direct writes to [shadow tables].\n** </ul>\n** </dd>\n**\n** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>\n** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the\n** \"writable_schema\" flag. This has the same effect and is logically equivalent\n** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF].\n** The first argument to this setting is an integer which is 0 to disable\n** the writable_schema, positive to enable writable_schema, or negative to\n** leave the setting unchanged. The second parameter is a pointer to an\n** integer into which is written 0 or 1 to indicate whether the writable_schema\n** is enabled or disabled following this call.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]]\n** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt>\n** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates\n** the legacy behavior of the [ALTER TABLE RENAME] command such that it\n** behaves as it did prior to [version 3.24.0] (2018-06-04).  See the\n** \"Compatibility Notice\" on the [ALTER TABLE RENAME documentation] for\n** additional information. This feature can also be turned on and off\n** using the [PRAGMA legacy_alter_table] statement.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_DQS_DML]]\n** <dt>SQLITE_DBCONFIG_DQS_DML</dt>\n** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates\n** the legacy [double-quoted string literal] misfeature for DML statements\n** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The\n** default value of this setting is determined by the [-DSQLITE_DQS]\n** compile-time option.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_DQS_DDL]]\n** <dt>SQLITE_DBCONFIG_DQS_DDL</dt>\n** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates\n** the legacy [double-quoted string literal] misfeature for DDL statements,\n** such as CREATE TABLE and CREATE INDEX. The\n** default value of this setting is determined by the [-DSQLITE_DQS]\n** compile-time option.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]]\n** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</dt>\n** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to\n** assume that database schemas are untainted by malicious content.\n** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite\n** takes additional defensive steps to protect the application from harm\n** including:\n** <ul>\n** <li> Prohibit the use of SQL functions inside triggers, views,\n** CHECK constraints, DEFAULT clauses, expression indexes,\n** partial indexes, or generated columns\n** unless those functions are tagged with [SQLITE_INNOCUOUS].\n** <li> Prohibit the use of virtual tables inside of triggers or views\n** unless those virtual tables are tagged with [SQLITE_VTAB_INNOCUOUS].\n** </ul>\n** This setting defaults to \"on\" for legacy compatibility, however\n** all applications are advised to turn it off if possible. This setting\n** can also be controlled using the [PRAGMA trusted_schema] statement.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]]\n** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt>\n** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates\n** the legacy file format flag.  When activated, this flag causes all newly\n** created database files to have a schema format version number (the 4-byte\n** integer found at offset 44 into the database header) of 1.  This in turn\n** means that the resulting database file will be readable and writable by\n** any SQLite version back to 3.0.0 ([dateof:3.0.0]).  Without this setting,\n** newly created databases are generally not understandable by SQLite versions\n** prior to 3.3.0 ([dateof:3.3.0]).  As these words are written, there\n** is now scarcely any need to generate database files that are compatible\n** all the way back to version 3.0.0, and so this setting is of little\n** practical use, but is provided so that SQLite can continue to claim the\n** ability to generate new database files that are compatible with  version\n** 3.0.0.\n** <p>Note that when the SQLITE_DBCONFIG_LEGACY_FILE_FORMAT setting is on,\n** the [VACUUM] command will fail with an obscure error when attempting to\n** process a table with generated columns and a descending index.  This is\n** not considered a bug since SQLite versions 3.3.0 and earlier do not support\n** either generated columns or descending indexes.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]\n** <dt>SQLITE_DBCONFIG_STMT_SCANSTATUS</dt>\n** <dd>The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in\n** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears\n** a flag that enables collection of the sqlite3_stmt_scanstatus_v2()\n** statistics. For statistics to be collected, the flag must be set on\n** the database handle both when the SQL statement is prepared and when it\n** is stepped. The flag is set (collection of statistics is enabled)\n** by default. <p>This option takes two arguments: an integer and a pointer to\n** an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the statement scanstatus option.  If the second argument\n** is not NULL, then the value of the statement scanstatus setting after\n** processing the first argument is written into the integer that the second\n** argument points to.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]]\n** <dt>SQLITE_DBCONFIG_REVERSE_SCANORDER</dt>\n** <dd>The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order\n** in which tables and indexes are scanned so that the scans start at the end\n** and work toward the beginning rather than starting at the beginning and\n** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the\n** same as setting [PRAGMA reverse_unordered_selects]. <p>This option takes\n** two arguments which are an integer and a pointer to an integer.  The first\n** argument is 1, 0, or -1 to enable, disable, or leave unchanged the\n** reverse scan order flag, respectively.  If the second argument is not NULL,\n** then 0 or 1 is written into the integer that the second argument points to\n** depending on if the reverse scan order flag is set after processing the\n** first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]]\n** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE option enables or disables\n** the ability of the [ATTACH DATABASE] SQL command to create a new database\n** file if the database filed named in the ATTACH command does not already\n** exist.  This ability of ATTACH to create a new database is enabled by\n** default.  Applications can disable or reenable the ability for ATTACH to\n** create new database files using this DBCONFIG option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the attach-create flag, respectively.  If the second\n** argument is not NULL, then 0 or 1 is written into the integer that the\n** second argument points to depending on if the attach-create flag is set\n** after processing the first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]]\n** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the\n** ability of the [ATTACH DATABASE] SQL command to open a database for writing.\n** This capability is enabled by default.  Applications can disable or\n** reenable this capability using the current DBCONFIG option.  If\n** this capability is disabled, the [ATTACH] command will still work,\n** but the database will be opened read-only.  If this option is disabled,\n** then the ability to create a new database using [ATTACH] is also disabled,\n** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]\n** option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the ability to ATTACH another database for writing,\n** respectively.  If the second argument is not NULL, then 0 or 1 is written\n** into the integer to which the second argument points, depending on whether\n** the ability to ATTACH a read/write database is enabled or disabled\n** after processing the first argument.\n** </dd>\n**\n** [[SQLITE_DBCONFIG_ENABLE_COMMENTS]]\n** <dt>SQLITE_DBCONFIG_ENABLE_COMMENTS</dt>\n** <dd>The SQLITE_DBCONFIG_ENABLE_COMMENTS option enables or disables the\n** ability to include comments in SQL text.  Comments are enabled by default.\n** An application can disable or reenable comments in SQL text using this\n** DBCONFIG option.<p>\n** This option takes two arguments which are an integer and a pointer\n** to an integer.  The first argument is 1, 0, or -1 to enable, disable, or\n** leave unchanged the ability to use comments in SQL text,\n** respectively.  If the second argument is not NULL, then 0 or 1 is written\n** into the integer that the second argument points to depending on if\n** comments are allowed in SQL text after processing the first argument.\n** </dd>\n**\n** </dl>\n**\n** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3>\n**\n** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the\n** overall call to [sqlite3_db_config()] has a total of four parameters.\n** The first argument (the third parameter to sqlite3_db_config()) is an integer.\n** The second argument is a pointer to an integer.  If the first argument is 1,\n** then the option becomes enabled.  If the first integer argument is 0, then the\n** option is disabled.  If the first argument is -1, then the option setting\n** is unchanged.  The second argument, the pointer to an integer, may be NULL.\n** If the second argument is not NULL, then a value of 0 or 1 is written into\n** the integer to which the second argument points, depending on whether the\n** setting is disabled or enabled after applying any changes specified by\n** the first argument.\n**\n** <p>While most SQLITE_DBCONFIG options use the argument format\n** described in the previous paragraph, the [SQLITE_DBCONFIG_MAINDBNAME]\n** and [SQLITE_DBCONFIG_LOOKASIDE] options are different.  See the\n** documentation of those exceptional options for details.\n*/\n#define SQLITE_DBCONFIG_MAINDBNAME            1000 /* const char* */\n#define SQLITE_DBCONFIG_LOOKASIDE             1001 /* void* int int */\n#define SQLITE_DBCONFIG_ENABLE_FKEY           1002 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_TRIGGER        1003 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */\n#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE      1006 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_QPSG           1007 /* int int* */\n#define SQLITE_DBCONFIG_TRIGGER_EQP           1008 /* int int* */\n#define SQLITE_DBCONFIG_RESET_DATABASE        1009 /* int int* */\n#define SQLITE_DBCONFIG_DEFENSIVE             1010 /* int int* */\n#define SQLITE_DBCONFIG_WRITABLE_SCHEMA       1011 /* int int* */\n#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE    1012 /* int int* */\n#define SQLITE_DBCONFIG_DQS_DML               1013 /* int int* */\n#define SQLITE_DBCONFIG_DQS_DDL               1014 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_VIEW           1015 /* int int* */\n#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT    1016 /* int int* */\n#define SQLITE_DBCONFIG_TRUSTED_SCHEMA        1017 /* int int* */\n#define SQLITE_DBCONFIG_STMT_SCANSTATUS       1018 /* int int* */\n#define SQLITE_DBCONFIG_REVERSE_SCANORDER     1019 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE  1020 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE   1021 /* int int* */\n#define SQLITE_DBCONFIG_ENABLE_COMMENTS       1022 /* int int* */\n#define SQLITE_DBCONFIG_MAX                   1022 /* Largest DBCONFIG */\n\n/*\n** CAPI3REF: Enable Or Disable Extended Result Codes\n** METHOD: sqlite3\n**\n** ^The sqlite3_extended_result_codes() routine enables or disables the\n** [extended result codes] feature of SQLite. ^The extended result\n** codes are disabled by default for historical compatibility.\n*/\nSQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);\n\n/*\n** CAPI3REF: Last Insert Rowid\n** METHOD: sqlite3\n**\n** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables)\n** has a unique 64-bit signed\n** integer key called the [ROWID | \"rowid\"]. ^The rowid is always available\n** as an undeclared column named ROWID, OID, or _ROWID_ as long as those\n** names are not also used by explicitly declared columns. ^If\n** the table has a column of type [INTEGER PRIMARY KEY] then that column\n** is another alias for the rowid.\n**\n** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of\n** the most recent successful [INSERT] into a rowid table or [virtual table]\n** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not\n** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred\n** on the database connection D, then sqlite3_last_insert_rowid(D) returns\n** zero.\n**\n** As well as being set automatically as rows are inserted into database\n** tables, the value returned by this function may be set explicitly by\n** [sqlite3_set_last_insert_rowid()]\n**\n** Some virtual table implementations may INSERT rows into rowid tables as\n** part of committing a transaction (e.g. to flush data accumulated in memory\n** to disk). In this case subsequent calls to this function return the rowid\n** associated with these internal INSERT operations, which leads to\n** unintuitive results. Virtual table implementations that do write to rowid\n** tables in this way can avoid this problem by restoring the original\n** rowid value using [sqlite3_set_last_insert_rowid()] before returning\n** control to the user.\n**\n** ^(If an [INSERT] occurs within a trigger then this routine will\n** return the [rowid] of the inserted row as long as the trigger is\n** running. Once the trigger program ends, the value returned\n** by this routine reverts to what it was before the trigger was fired.)^\n**\n** ^An [INSERT] that fails due to a constraint violation is not a\n** successful [INSERT] and does not change the value returned by this\n** routine.  ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,\n** and INSERT OR ABORT make no changes to the return value of this\n** routine when their insertion fails.  ^(When INSERT OR REPLACE\n** encounters a constraint violation, it does not fail.  The\n** INSERT continues to completion after deleting rows that caused\n** the constraint problem so INSERT OR REPLACE will always change\n** the return value of this interface.)^\n**\n** ^For the purposes of this routine, an [INSERT] is considered to\n** be successful even if it is subsequently rolled back.\n**\n** This function is accessible to SQL statements via the\n** [last_insert_rowid() SQL function].\n**\n** If a separate thread performs a new [INSERT] on the same\n** database connection while the [sqlite3_last_insert_rowid()]\n** function is running and thus changes the last insert [rowid],\n** then the value returned by [sqlite3_last_insert_rowid()] is\n** unpredictable and might not equal either the old or the new\n** last insert [rowid].\n*/\nSQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);\n\n/*\n** CAPI3REF: Set the Last Insert Rowid value.\n** METHOD: sqlite3\n**\n** The sqlite3_set_last_insert_rowid(D, R) method allows the application to\n** set the value returned by calling sqlite3_last_insert_rowid(D) to R\n** without inserting a row into the database.\n*/\nSQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);\n\n/*\n** CAPI3REF: Count The Number Of Rows Modified\n** METHOD: sqlite3\n**\n** ^These functions return the number of rows modified, inserted or\n** deleted by the most recently completed INSERT, UPDATE or DELETE\n** statement on the database connection specified by the only parameter.\n** The two functions are identical except for the type of the return value\n** and that if the number of rows modified by the most recent INSERT, UPDATE,\n** or DELETE is greater than the maximum value supported by type \"int\", then\n** the return value of sqlite3_changes() is undefined. ^Executing any other\n** type of SQL statement does not modify the value returned by these functions.\n** For the purposes of this interface, a CREATE TABLE AS SELECT statement\n** does not count as an INSERT, UPDATE or DELETE statement and hence the rows\n** added to the new table by the CREATE TABLE AS SELECT statement are not\n** counted.\n**\n** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are\n** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],\n** [foreign key actions] or [REPLACE] constraint resolution are not counted.\n**\n** Changes to a view that are intercepted by\n** [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value\n** returned by sqlite3_changes() immediately after an INSERT, UPDATE or\n** DELETE statement run on a view is always zero. Only changes made to real\n** tables are counted.\n**\n** Things are more complicated if the sqlite3_changes() function is\n** executed while a trigger program is running. This may happen if the\n** program uses the [changes() SQL function], or if some other callback\n** function invokes sqlite3_changes() directly. Essentially:\n**\n** <ul>\n**   <li> ^(Before entering a trigger program the value returned by\n**        sqlite3_changes() function is saved. After the trigger program\n**        has finished, the original value is restored.)^\n**\n**   <li> ^(Within a trigger program each INSERT, UPDATE and DELETE\n**        statement sets the value returned by sqlite3_changes()\n**        upon completion as normal. Of course, this value will not include\n**        any changes performed by sub-triggers, as the sqlite3_changes()\n**        value will be saved and restored after each sub-trigger has run.)^\n** </ul>\n**\n** ^This means that if the changes() SQL function (or similar) is used\n** by the first INSERT, UPDATE or DELETE statement within a trigger, it\n** returns the value as set when the calling statement began executing.\n** ^If it is used by the second or subsequent such statement within a trigger\n** program, the value returned reflects the number of rows modified by the\n** previous INSERT, UPDATE or DELETE statement within the same trigger.\n**\n** If a separate thread makes changes on the same database connection\n** while [sqlite3_changes()] is running then the value returned\n** is unpredictable and not meaningful.\n**\n** See also:\n** <ul>\n** <li> the [sqlite3_total_changes()] interface\n** <li> the [count_changes pragma]\n** <li> the [changes() SQL function]\n** <li> the [data_version pragma]\n** </ul>\n*/\nSQLITE_API int sqlite3_changes(sqlite3*);\nSQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*);\n\n/*\n** CAPI3REF: Total Number Of Rows Modified\n** METHOD: sqlite3\n**\n** ^These functions return the total number of rows inserted, modified or\n** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed\n** since the database connection was opened, including those executed as\n** part of trigger programs. The two functions are identical except for the\n** type of the return value and that if the number of rows modified by the\n** connection exceeds the maximum value supported by type \"int\", then\n** the return value of sqlite3_total_changes() is undefined. ^Executing\n** any other type of SQL statement does not affect the value returned by\n** sqlite3_total_changes().\n**\n** ^Changes made as part of [foreign key actions] are included in the\n** count, but those made as part of REPLACE constraint resolution are\n** not. ^Changes to a view that are intercepted by INSTEAD OF triggers\n** are not counted.\n**\n** The [sqlite3_total_changes(D)] interface only reports the number\n** of rows that changed due to SQL statement run against database\n** connection D.  Any changes by other database connections are ignored.\n** To detect changes against a database file from other database\n** connections use the [PRAGMA data_version] command or the\n** [SQLITE_FCNTL_DATA_VERSION] [file control].\n**\n** If a separate thread makes changes on the same database connection\n** while [sqlite3_total_changes()] is running then the value\n** returned is unpredictable and not meaningful.\n**\n** See also:\n** <ul>\n** <li> the [sqlite3_changes()] interface\n** <li> the [count_changes pragma]\n** <li> the [changes() SQL function]\n** <li> the [data_version pragma]\n** <li> the [SQLITE_FCNTL_DATA_VERSION] [file control]\n** </ul>\n*/\nSQLITE_API int sqlite3_total_changes(sqlite3*);\nSQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);\n\n/*\n** CAPI3REF: Interrupt A Long-Running Query\n** METHOD: sqlite3\n**\n** ^This function causes any pending database operation to abort and\n** return at its earliest opportunity. This routine is typically\n** called in response to a user action such as pressing \"Cancel\"\n** or Ctrl-C where the user wants a long query operation to halt\n** immediately.\n**\n** ^It is safe to call this routine from a thread different from the\n** thread that is currently running the database operation.  But it\n** is not safe to call this routine with a [database connection] that\n** is closed or might close before sqlite3_interrupt() returns.\n**\n** ^If an SQL operation is very nearly finished at the time when\n** sqlite3_interrupt() is called, then it might not have an opportunity\n** to be interrupted and might continue to completion.\n**\n** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].\n** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE\n** that is inside an explicit transaction, then the entire transaction\n** will be rolled back automatically.\n**\n** ^The sqlite3_interrupt(D) call is in effect until all currently running\n** SQL statements on [database connection] D complete.  ^Any new SQL statements\n** that are started after the sqlite3_interrupt() call and before the\n** running statement count reaches zero are interrupted as if they had been\n** running prior to the sqlite3_interrupt() call.  ^New SQL statements\n** that are started after the running statement count reaches zero are\n** not effected by the sqlite3_interrupt().\n** ^A call to sqlite3_interrupt(D) that occurs when there are no running\n** SQL statements is a no-op and has no effect on SQL statements\n** that are started after the sqlite3_interrupt() call returns.\n**\n** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether\n** or not an interrupt is currently in effect for [database connection] D.\n** It returns 1 if an interrupt is currently in effect, or 0 otherwise.\n*/\nSQLITE_API void sqlite3_interrupt(sqlite3*);\nSQLITE_API int sqlite3_is_interrupted(sqlite3*);\n\n/*\n** CAPI3REF: Determine If An SQL Statement Is Complete\n**\n** These routines are useful during command-line input to determine if the\n** currently entered text seems to form a complete SQL statement or\n** if additional input is needed before sending the text into\n** SQLite for parsing.  ^These routines return 1 if the input string\n** appears to be a complete SQL statement.  ^A statement is judged to be\n** complete if it ends with a semicolon token and is not a prefix of a\n** well-formed CREATE TRIGGER statement.  ^Semicolons that are embedded within\n** string literals or quoted identifier names or comments are not\n** independent tokens (they are part of the token in which they are\n** embedded) and thus do not count as a statement terminator.  ^Whitespace\n** and comments that follow the final semicolon are ignored.\n**\n** ^These routines return 0 if the statement is incomplete.  ^If a\n** memory allocation fails, then SQLITE_NOMEM is returned.\n**\n** ^These routines do not parse the SQL statements and thus\n** will not detect syntactically incorrect SQL.\n**\n** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior\n** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked\n** automatically by sqlite3_complete16().  If that initialization fails,\n** then the return value from sqlite3_complete16() will be non-zero\n** regardless of whether or not the input SQL is complete.)^\n**\n** The input to [sqlite3_complete()] must be a zero-terminated\n** UTF-8 string.\n**\n** The input to [sqlite3_complete16()] must be a zero-terminated\n** UTF-16 string in native byte order.\n*/\nSQLITE_API int sqlite3_complete(const char *sql);\nSQLITE_API int sqlite3_complete16(const void *sql);\n\n/*\n** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors\n** KEYWORDS: {busy-handler callback} {busy handler}\n** METHOD: sqlite3\n**\n** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X\n** that might be invoked with argument P whenever\n** an attempt is made to access a database table associated with\n** [database connection] D when another thread\n** or process has the table locked.\n** The sqlite3_busy_handler() interface is used to implement\n** [sqlite3_busy_timeout()] and [PRAGMA busy_timeout].\n**\n** ^If the busy callback is NULL, then [SQLITE_BUSY]\n** is returned immediately upon encountering the lock.  ^If the busy callback\n** is not NULL, then the callback might be invoked with two arguments.\n**\n** ^The first argument to the busy handler is a copy of the void* pointer which\n** is the third argument to sqlite3_busy_handler().  ^The second argument to\n** the busy handler callback is the number of times that the busy handler has\n** been invoked previously for the same locking event.  ^If the\n** busy callback returns 0, then no additional attempts are made to\n** access the database and [SQLITE_BUSY] is returned\n** to the application.\n** ^If the callback returns non-zero, then another attempt\n** is made to access the database and the cycle repeats.\n**\n** The presence of a busy handler does not guarantee that it will be invoked\n** when there is lock contention. ^If SQLite determines that invoking the busy\n** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]\n** to the application instead of invoking the\n** busy handler.\n** Consider a scenario where one process is holding a read lock that\n** it is trying to promote to a reserved lock and\n** a second process is holding a reserved lock that it is trying\n** to promote to an exclusive lock.  The first process cannot proceed\n** because it is blocked by the second and the second process cannot\n** proceed because it is blocked by the first.  If both processes\n** invoke the busy handlers, neither will make any progress.  Therefore,\n** SQLite returns [SQLITE_BUSY] for the first process, hoping that this\n** will induce the first process to release its read lock and allow\n** the second process to proceed.\n**\n** ^The default busy callback is NULL.\n**\n** ^(There can only be a single busy handler defined for each\n** [database connection].  Setting a new busy handler clears any\n** previously set handler.)^  ^Note that calling [sqlite3_busy_timeout()]\n** or evaluating [PRAGMA busy_timeout=N] will change the\n** busy handler and thus clear any previously set busy handler.\n**\n** The busy callback should not take any actions which modify the\n** database connection that invoked the busy handler.  In other words,\n** the busy handler is not reentrant.  Any such actions\n** result in undefined behavior.\n**\n** A busy handler must not close the database connection\n** or [prepared statement] that invoked the busy handler.\n*/\nSQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);\n\n/*\n** CAPI3REF: Set A Busy Timeout\n** METHOD: sqlite3\n**\n** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps\n** for a specified amount of time when a table is locked.  ^The handler\n** will sleep multiple times until at least \"ms\" milliseconds of sleeping\n** have accumulated.  ^After at least \"ms\" milliseconds of sleeping,\n** the handler returns 0 which causes [sqlite3_step()] to return\n** [SQLITE_BUSY].\n**\n** ^Calling this routine with an argument less than or equal to zero\n** turns off all busy handlers.\n**\n** ^(There can only be a single busy handler for a particular\n** [database connection] at any given moment.  If another busy handler\n** was defined  (using [sqlite3_busy_handler()]) prior to calling\n** this routine, that other busy handler is cleared.)^\n**\n** See also:  [PRAGMA busy_timeout]\n*/\nSQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);\n\n/*\n** CAPI3REF: Set the Setlk Timeout\n** METHOD: sqlite3\n**\n** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If\n** the VFS supports blocking locks, it sets the timeout in ms used by\n** eligible locks taken on wal mode databases by the specified database\n** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does\n** not support blocking locks, this function is a no-op.\n**\n** Passing 0 to this function disables blocking locks altogether. Passing\n** -1 to this function requests that the VFS blocks for a long time -\n** indefinitely if possible. The results of passing any other negative value\n** are undefined.\n**\n** Internally, each SQLite database handle stores two timeout values - the\n** busy-timeout (used for rollback mode databases, or if the VFS does not\n** support blocking locks) and the setlk-timeout (used for blocking locks\n** on wal-mode databases). The sqlite3_busy_timeout() method sets both\n** values, this function sets only the setlk-timeout value. Therefore,\n** to configure separate busy-timeout and setlk-timeout values for a single\n** database handle, call sqlite3_busy_timeout() followed by this function.\n**\n** Whenever the number of connections to a wal mode database falls from\n** 1 to 0, the last connection takes an exclusive lock on the database,\n** then checkpoints and deletes the wal file. While it is doing this, any\n** new connection that tries to read from the database fails with an\n** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is\n** passed to this API, the new connection blocks until the exclusive lock\n** has been released.\n*/\nSQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);\n\n/*\n** CAPI3REF: Flags for sqlite3_setlk_timeout()\n*/\n#define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01\n\n/*\n** CAPI3REF: Convenience Routines For Running Queries\n** METHOD: sqlite3\n**\n** This is a legacy interface that is preserved for backwards compatibility.\n** Use of this interface is not recommended.\n**\n** Definition: A <b>result table</b> is a memory data structure created by the\n** [sqlite3_get_table()] interface.  A result table records the\n** complete query results from one or more queries.\n**\n** The table conceptually has a number of rows and columns.  But\n** these numbers are not part of the result table itself.  These\n** numbers are obtained separately.  Let N be the number of rows\n** and M be the number of columns.\n**\n** A result table is an array of pointers to zero-terminated UTF-8 strings.\n** There are (N+1)*M elements in the array.  The first M pointers point\n** to zero-terminated strings that  contain the names of the columns.\n** The remaining entries all point to query results.  NULL values result\n** in NULL pointers.  All other values are in their UTF-8 zero-terminated\n** string representation as returned by [sqlite3_column_text()].\n**\n** A result table might consist of one or more memory allocations.\n** It is not safe to pass a result table directly to [sqlite3_free()].\n** A result table should be deallocated using [sqlite3_free_table()].\n**\n** ^(As an example of the result table format, suppose a query result\n** is as follows:\n**\n** <blockquote><pre>\n**        Name        | Age\n**        -----------------------\n**        Alice       | 43\n**        Bob         | 28\n**        Cindy       | 21\n** </pre></blockquote>\n**\n** There are two columns (M==2) and three rows (N==3).  Thus the\n** result table has 8 entries.  Suppose the result table is stored\n** in an array named azResult.  Then azResult holds this content:\n**\n** <blockquote><pre>\n**        azResult&#91;0] = \"Name\";\n**        azResult&#91;1] = \"Age\";\n**        azResult&#91;2] = \"Alice\";\n**        azResult&#91;3] = \"43\";\n**        azResult&#91;4] = \"Bob\";\n**        azResult&#91;5] = \"28\";\n**        azResult&#91;6] = \"Cindy\";\n**        azResult&#91;7] = \"21\";\n** </pre></blockquote>)^\n**\n** ^The sqlite3_get_table() function evaluates one or more\n** semicolon-separated SQL statements in the zero-terminated UTF-8\n** string of its 2nd parameter and returns a result table to the\n** pointer given in its 3rd parameter.\n**\n** After the application has finished with the result from sqlite3_get_table(),\n** it must pass the result table pointer to sqlite3_free_table() in order to\n** release the memory that was malloced.  Because of the way the\n** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling\n** function must not try to call [sqlite3_free()] directly.  Only\n** [sqlite3_free_table()] is able to release the memory properly and safely.\n**\n** The sqlite3_get_table() interface is implemented as a wrapper around\n** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access\n** to any internal data structures of SQLite.  It uses only the public\n** interface defined here.  As a consequence, errors that occur in the\n** wrapper layer outside of the internal [sqlite3_exec()] call are not\n** reflected in subsequent calls to [sqlite3_errcode()] or\n** [sqlite3_errmsg()].\n*/\nSQLITE_API int sqlite3_get_table(\n  sqlite3 *db,          /* An open database */\n  const char *zSql,     /* SQL to be evaluated */\n  char ***pazResult,    /* Results of the query */\n  int *pnRow,           /* Number of result rows written here */\n  int *pnColumn,        /* Number of result columns written here */\n  char **pzErrmsg       /* Error msg written here */\n);\nSQLITE_API void sqlite3_free_table(char **result);\n\n/*\n** CAPI3REF: Formatted String Printing Functions\n**\n** These routines are work-alikes of the \"printf()\" family of functions\n** from the standard C library.\n** These routines understand most of the common formatting options from\n** the standard library printf()\n** plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]).\n** See the [built-in printf()] documentation for details.\n**\n** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their\n** results into memory obtained from [sqlite3_malloc64()].\n** The strings returned by these two routines should be\n** released by [sqlite3_free()].  ^Both routines return a\n** NULL pointer if [sqlite3_malloc64()] is unable to allocate enough\n** memory to hold the resulting string.\n**\n** ^(The sqlite3_snprintf() routine is similar to \"snprintf()\" from\n** the standard C library.  The result is written into the\n** buffer supplied as the second parameter whose size is given by\n** the first parameter. Note that the order of the\n** first two parameters is reversed from snprintf().)^  This is an\n** historical accident that cannot be fixed without breaking\n** backwards compatibility.  ^(Note also that sqlite3_snprintf()\n** returns a pointer to its buffer instead of the number of\n** characters actually written into the buffer.)^  We admit that\n** the number of characters written would be a more useful return\n** value but we cannot change the implementation of sqlite3_snprintf()\n** now without breaking compatibility.\n**\n** ^As long as the buffer size is greater than zero, sqlite3_snprintf()\n** guarantees that the buffer is always zero-terminated.  ^The first\n** parameter \"n\" is the total size of the buffer, including space for\n** the zero terminator.  So the longest string that can be completely\n** written will be n-1 characters.\n**\n** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().\n**\n** See also:  [built-in printf()], [printf() SQL function]\n*/\nSQLITE_API char *sqlite3_mprintf(const char*,...);\nSQLITE_API char *sqlite3_vmprintf(const char*, va_list);\nSQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);\nSQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);\n\n/*\n** CAPI3REF: Memory Allocation Subsystem\n**\n** The SQLite core uses these three routines for all of its own\n** internal memory allocation needs. \"Core\" in the previous sentence\n** does not include operating-system specific [VFS] implementation.  The\n** Windows VFS uses native malloc() and free() for some operations.\n**\n** ^The sqlite3_malloc() routine returns a pointer to a block\n** of memory at least N bytes in length, where N is the parameter.\n** ^If sqlite3_malloc() is unable to obtain sufficient free\n** memory, it returns a NULL pointer.  ^If the parameter N to\n** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns\n** a NULL pointer.\n**\n** ^The sqlite3_malloc64(N) routine works just like\n** sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead\n** of a signed 32-bit integer.\n**\n** ^Calling sqlite3_free() with a pointer previously returned\n** by sqlite3_malloc() or sqlite3_realloc() releases that memory so\n** that it might be reused.  ^The sqlite3_free() routine is\n** a no-op if it is called with a NULL pointer.  Passing a NULL pointer\n** to sqlite3_free() is harmless.  After being freed, memory\n** should neither be read nor written.  Even reading previously freed\n** memory might result in a segmentation fault or other severe error.\n** Memory corruption, a segmentation fault, or other severe error\n** might result if sqlite3_free() is called with a non-NULL pointer that\n** was not obtained from sqlite3_malloc() or sqlite3_realloc().\n**\n** ^The sqlite3_realloc(X,N) interface attempts to resize a\n** prior memory allocation X to be at least N bytes.\n** ^If the X parameter to sqlite3_realloc(X,N)\n** is a NULL pointer then its behavior is identical to calling\n** sqlite3_malloc(N).\n** ^If the N parameter to sqlite3_realloc(X,N) is zero or\n** negative then the behavior is exactly the same as calling\n** sqlite3_free(X).\n** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation\n** of at least N bytes in size or NULL if insufficient memory is available.\n** ^If M is the size of the prior allocation, then min(N,M) bytes of the\n** prior allocation are copied into the beginning of the buffer returned\n** by sqlite3_realloc(X,N) and the prior allocation is freed.\n** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the\n** prior allocation is not freed.\n**\n** ^The sqlite3_realloc64(X,N) interface works the same as\n** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead\n** of a 32-bit signed integer.\n**\n** ^If X is a memory allocation previously obtained from sqlite3_malloc(),\n** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then\n** sqlite3_msize(X) returns the size of that memory allocation in bytes.\n** ^The value returned by sqlite3_msize(X) might be larger than the number\n** of bytes requested when X was allocated.  ^If X is a NULL pointer then\n** sqlite3_msize(X) returns zero.  If X points to something that is not\n** the beginning of memory allocation, or if it points to a formerly\n** valid memory allocation that has now been freed, then the behavior\n** of sqlite3_msize(X) is undefined and possibly harmful.\n**\n** ^The memory returned by sqlite3_malloc(), sqlite3_realloc(),\n** sqlite3_malloc64(), and sqlite3_realloc64()\n** is always aligned to at least an 8 byte boundary, or to a\n** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time\n** option is used.\n**\n** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]\n** must be either NULL or else pointers obtained from a prior\n** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have\n** not yet been released.\n**\n** The application must not read or write any part of\n** a block of memory after it has been released using\n** [sqlite3_free()] or [sqlite3_realloc()].\n*/\nSQLITE_API void *sqlite3_malloc(int);\nSQLITE_API void *sqlite3_malloc64(sqlite3_uint64);\nSQLITE_API void *sqlite3_realloc(void*, int);\nSQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);\nSQLITE_API void sqlite3_free(void*);\nSQLITE_API sqlite3_uint64 sqlite3_msize(void*);\n\n/*\n** CAPI3REF: Memory Allocator Statistics\n**\n** SQLite provides these two interfaces for reporting on the status\n** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]\n** routines, which form the built-in memory allocation subsystem.\n**\n** ^The [sqlite3_memory_used()] routine returns the number of bytes\n** of memory currently outstanding (malloced but not freed).\n** ^The [sqlite3_memory_highwater()] routine returns the maximum\n** value of [sqlite3_memory_used()] since the high-water mark\n** was last reset.  ^The values returned by [sqlite3_memory_used()] and\n** [sqlite3_memory_highwater()] include any overhead\n** added by SQLite in its implementation of [sqlite3_malloc()],\n** but not overhead added by any underlying system library\n** routines that [sqlite3_malloc()] may call.\n**\n** ^The memory high-water mark is reset to the current value of\n** [sqlite3_memory_used()] if and only if the parameter to\n** [sqlite3_memory_highwater()] is true.  ^The value returned\n** by [sqlite3_memory_highwater(1)] is the high-water mark\n** prior to the reset.\n*/\nSQLITE_API sqlite3_int64 sqlite3_memory_used(void);\nSQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);\n\n/*\n** CAPI3REF: Pseudo-Random Number Generator\n**\n** SQLite contains a high-quality pseudo-random number generator (PRNG) used to\n** select random [ROWID | ROWIDs] when inserting new records into a table that\n** already uses the largest possible [ROWID].  The PRNG is also used for\n** the built-in random() and randomblob() SQL functions.  This interface allows\n** applications to access the same PRNG for other purposes.\n**\n** ^A call to this routine stores N bytes of randomness into buffer P.\n** ^The P parameter can be a NULL pointer.\n**\n** ^If this routine has not been previously called or if the previous\n** call had N less than one or a NULL pointer for P, then the PRNG is\n** seeded using randomness obtained from the xRandomness method of\n** the default [sqlite3_vfs] object.\n** ^If the previous call to this routine had an N of 1 or more and a\n** non-NULL P then the pseudo-randomness is generated\n** internally and without recourse to the [sqlite3_vfs] xRandomness\n** method.\n*/\nSQLITE_API void sqlite3_randomness(int N, void *P);\n\n/*\n** CAPI3REF: Compile-Time Authorization Callbacks\n** METHOD: sqlite3\n** KEYWORDS: {authorizer callback}\n**\n** ^This routine registers an authorizer callback with a particular\n** [database connection], supplied in the first argument.\n** ^The authorizer callback is invoked as SQL statements are being compiled\n** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],\n** [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()],\n** and [sqlite3_prepare16_v3()].  ^At various\n** points during the compilation process, as logic is being created\n** to perform various actions, the authorizer callback is invoked to\n** see if those actions are allowed.  ^The authorizer callback should\n** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the\n** specific action but allow the SQL statement to continue to be\n** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be\n** rejected with an error.  ^If the authorizer callback returns\n** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]\n** then the [sqlite3_prepare_v2()] or equivalent call that triggered\n** the authorizer will fail with an error message.\n**\n** When the callback returns [SQLITE_OK], that means the operation\n** requested is ok.  ^When the callback returns [SQLITE_DENY], the\n** [sqlite3_prepare_v2()] or equivalent call that triggered the\n** authorizer will fail with an error message explaining that\n** access is denied.\n**\n** ^The first parameter to the authorizer callback is a copy of the third\n** parameter to the sqlite3_set_authorizer() interface. ^The second parameter\n** to the callback is an integer [SQLITE_COPY | action code] that specifies\n** the particular action to be authorized. ^The third through sixth parameters\n** to the callback are either NULL pointers or zero-terminated strings\n** that contain additional details about the action to be authorized.\n** Applications must always be prepared to encounter a NULL pointer in any\n** of the third through the sixth parameters of the authorization callback.\n**\n** ^If the action code is [SQLITE_READ]\n** and the callback returns [SQLITE_IGNORE] then the\n** [prepared statement] statement is constructed to substitute\n** a NULL value in place of the table column that would have\n** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]\n** return can be used to deny an untrusted user access to individual\n** columns of a table.\n** ^When a table is referenced by a [SELECT] but no column values are\n** extracted from that table (for example in a query like\n** \"SELECT count(*) FROM tab\") then the [SQLITE_READ] authorizer callback\n** is invoked once for that table with a column name that is an empty string.\n** ^If the action code is [SQLITE_DELETE] and the callback returns\n** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the\n** [truncate optimization] is disabled and all rows are deleted individually.\n**\n** An authorizer is used when [sqlite3_prepare | preparing]\n** SQL statements from an untrusted source, to ensure that the SQL statements\n** do not try to access data they are not allowed to see, or that they do not\n** try to execute malicious statements that damage the database.  For\n** example, an application may allow a user to enter arbitrary\n** SQL queries for evaluation by a database.  But the application does\n** not want the user to be able to make arbitrary changes to the\n** database.  An authorizer could then be put in place while the\n** user-entered SQL is being [sqlite3_prepare | prepared] that\n** disallows everything except [SELECT] statements.\n**\n** Applications that need to process SQL from untrusted sources\n** might also consider lowering resource limits using [sqlite3_limit()]\n** and limiting database size using the [max_page_count] [PRAGMA]\n** in addition to using an authorizer.\n**\n** ^(Only a single authorizer can be in place on a database connection\n** at a time.  Each call to sqlite3_set_authorizer overrides the\n** previous call.)^  ^Disable the authorizer by installing a NULL callback.\n** The authorizer is disabled by default.\n**\n** The authorizer callback must not do anything that will modify\n** the database connection that invoked the authorizer callback.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the\n** statement might be re-prepared during [sqlite3_step()] due to a\n** schema change.  Hence, the application should ensure that the\n** correct authorizer callback remains in place during the [sqlite3_step()].\n**\n** ^Note that the authorizer callback is invoked only during\n** [sqlite3_prepare()] or its variants.  Authorization is not\n** performed during statement evaluation in [sqlite3_step()], unless\n** as stated in the previous paragraph, sqlite3_step() invokes\n** sqlite3_prepare_v2() to reprepare a statement after a schema change.\n*/\nSQLITE_API int sqlite3_set_authorizer(\n  sqlite3*,\n  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\n  void *pUserData\n);\n\n/*\n** CAPI3REF: Authorizer Return Codes\n**\n** The [sqlite3_set_authorizer | authorizer callback function] must\n** return either [SQLITE_OK] or one of these two constants in order\n** to signal SQLite whether or not the action is permitted.  See the\n** [sqlite3_set_authorizer | authorizer documentation] for additional\n** information.\n**\n** Note that SQLITE_IGNORE is also used as a [conflict resolution mode]\n** returned from the [sqlite3_vtab_on_conflict()] interface.\n*/\n#define SQLITE_DENY   1   /* Abort the SQL statement with an error */\n#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */\n\n/*\n** CAPI3REF: Authorizer Action Codes\n**\n** The [sqlite3_set_authorizer()] interface registers a callback function\n** that is invoked to authorize certain SQL statement actions.  The\n** second parameter to the callback is an integer code that specifies\n** what action is being authorized.  These are the integer action codes that\n** the authorizer callback may be passed.\n**\n** These action code values signify what kind of operation is to be\n** authorized.  The 3rd and 4th parameters to the authorization\n** callback function will be parameters or NULL depending on which of these\n** codes is used as the second parameter.  ^(The 5th parameter to the\n** authorizer callback is the name of the database (\"main\", \"temp\",\n** etc.) if applicable.)^  ^The 6th parameter to the authorizer callback\n** is the name of the inner-most trigger or view that is responsible for\n** the access attempt or NULL if this access attempt is directly from\n** top-level SQL code.\n*/\n/******************************************* 3rd ************ 4th ***********/\n#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */\n#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */\n#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */\n#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */\n#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */\n#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */\n#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */\n#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */\n#define SQLITE_DELETE                9   /* Table Name      NULL            */\n#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */\n#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */\n#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */\n#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */\n#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */\n#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */\n#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */\n#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */\n#define SQLITE_INSERT               18   /* Table Name      NULL            */\n#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */\n#define SQLITE_READ                 20   /* Table Name      Column Name     */\n#define SQLITE_SELECT               21   /* NULL            NULL            */\n#define SQLITE_TRANSACTION          22   /* Operation       NULL            */\n#define SQLITE_UPDATE               23   /* Table Name      Column Name     */\n#define SQLITE_ATTACH               24   /* Filename        NULL            */\n#define SQLITE_DETACH               25   /* Database Name   NULL            */\n#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */\n#define SQLITE_REINDEX              27   /* Index Name      NULL            */\n#define SQLITE_ANALYZE              28   /* Table Name      NULL            */\n#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */\n#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */\n#define SQLITE_FUNCTION             31   /* NULL            Function Name   */\n#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */\n#define SQLITE_COPY                  0   /* No longer used */\n#define SQLITE_RECURSIVE            33   /* NULL            NULL            */\n\n/*\n** CAPI3REF: Deprecated Tracing And Profiling Functions\n** DEPRECATED\n**\n** These routines are deprecated. Use the [sqlite3_trace_v2()] interface\n** instead of the routines described here.\n**\n** These routines register callback functions that can be used for\n** tracing and profiling the execution of SQL statements.\n**\n** ^The callback function registered by sqlite3_trace() is invoked at\n** various times when an SQL statement is being run by [sqlite3_step()].\n** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the\n** SQL statement text as the statement first begins executing.\n** ^(Additional sqlite3_trace() callbacks might occur\n** as each triggered subprogram is entered.  The callbacks for triggers\n** contain a UTF-8 SQL comment that identifies the trigger.)^\n**\n** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit\n** the length of [bound parameter] expansion in the output of sqlite3_trace().\n**\n** ^The callback function registered by sqlite3_profile() is invoked\n** as each SQL statement finishes.  ^The profile callback contains\n** the original statement text and an estimate of wall-clock time\n** of how long that statement took to run.  ^The profile callback\n** time is in units of nanoseconds, however the current implementation\n** is only capable of millisecond resolution so the six least significant\n** digits in the time are meaningless.  Future versions of SQLite\n** might provide greater resolution on the profiler callback.  Invoking\n** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the\n** profile callback.\n*/\nSQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,\n   void(*xTrace)(void*,const char*), void*);\nSQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,\n   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);\n\n/*\n** CAPI3REF: SQL Trace Event Codes\n** KEYWORDS: SQLITE_TRACE\n**\n** These constants identify classes of events that can be monitored\n** using the [sqlite3_trace_v2()] tracing logic.  The M argument\n** to [sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of\n** the following constants.  ^The first argument to the trace callback\n** is one of the following constants.\n**\n** New tracing constants may be added in future releases.\n**\n** ^A trace callback has four arguments: xCallback(T,C,P,X).\n** ^The T argument is one of the integer type codes above.\n** ^The C argument is a copy of the context pointer passed in as the\n** fourth argument to [sqlite3_trace_v2()].\n** The P and X arguments are pointers whose meanings depend on T.\n**\n** <dl>\n** [[SQLITE_TRACE_STMT]] <dt>SQLITE_TRACE_STMT</dt>\n** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement\n** first begins running and possibly at other times during the\n** execution of the prepared statement, such as at the start of each\n** trigger subprogram. ^The P argument is a pointer to the\n** [prepared statement]. ^The X argument is a pointer to a string which\n** is the unexpanded SQL text of the prepared statement or an SQL comment\n** that indicates the invocation of a trigger.  ^The callback can compute\n** the same text that would have been returned by the legacy [sqlite3_trace()]\n** interface by using the X argument when X begins with \"--\" and invoking\n** [sqlite3_expanded_sql(P)] otherwise.\n**\n** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>\n** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same\n** information as is provided by the [sqlite3_profile()] callback.\n** ^The P argument is a pointer to the [prepared statement] and the\n** X argument points to a 64-bit integer which is approximately\n** the number of nanoseconds that the prepared statement took to run.\n** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes.\n**\n** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt>\n** <dd>^An SQLITE_TRACE_ROW callback is invoked whenever a prepared\n** statement generates a single row of result.\n** ^The P argument is a pointer to the [prepared statement] and the\n** X argument is unused.\n**\n** [[SQLITE_TRACE_CLOSE]] <dt>SQLITE_TRACE_CLOSE</dt>\n** <dd>^An SQLITE_TRACE_CLOSE callback is invoked when a database\n** connection closes.\n** ^The P argument is a pointer to the [database connection] object\n** and the X argument is unused.\n** </dl>\n*/\n#define SQLITE_TRACE_STMT       0x01\n#define SQLITE_TRACE_PROFILE    0x02\n#define SQLITE_TRACE_ROW        0x04\n#define SQLITE_TRACE_CLOSE      0x08\n\n/*\n** CAPI3REF: SQL Trace Hook\n** METHOD: sqlite3\n**\n** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback\n** function X against [database connection] D, using property mask M\n** and context pointer P.  ^If the X callback is\n** NULL or if the M mask is zero, then tracing is disabled.  The\n** M argument should be the bitwise OR-ed combination of\n** zero or more [SQLITE_TRACE] constants.\n**\n** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)\n** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or\n** sqlite3_trace_v2(D,M,X,P) for the [database connection] D.  Each\n** database connection may have at most one trace callback.\n**\n** ^The X callback is invoked whenever any of the events identified by\n** mask M occur.  ^The integer return value from the callback is currently\n** ignored, though this may change in future releases.  Callback\n** implementations should return zero to ensure future compatibility.\n**\n** ^A trace callback is invoked with four arguments: callback(T,C,P,X).\n** ^The T argument is one of the [SQLITE_TRACE]\n** constants to indicate why the callback was invoked.\n** ^The C argument is a copy of the context pointer.\n** The P and X arguments are pointers whose meanings depend on T.\n**\n** The sqlite3_trace_v2() interface is intended to replace the legacy\n** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which\n** are deprecated.\n*/\nSQLITE_API int sqlite3_trace_v2(\n  sqlite3*,\n  unsigned uMask,\n  int(*xCallback)(unsigned,void*,void*,void*),\n  void *pCtx\n);\n\n/*\n** CAPI3REF: Query Progress Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback\n** function X to be invoked periodically during long running calls to\n** [sqlite3_step()] and [sqlite3_prepare()] and similar for\n** database connection D.  An example use for this\n** interface is to keep a GUI updated during a large query.\n**\n** ^The parameter P is passed through as the only parameter to the\n** callback function X.  ^The parameter N is the approximate number of\n** [virtual machine instructions] that are evaluated between successive\n** invocations of the callback X.  ^If N is less than one then the progress\n** handler is disabled.\n**\n** ^Only a single progress handler may be defined at one time per\n** [database connection]; setting a new progress handler cancels the\n** old one.  ^Setting parameter X to NULL disables the progress handler.\n** ^The progress handler is also disabled by setting N to a value less\n** than 1.\n**\n** ^If the progress callback returns non-zero, the operation is\n** interrupted.  This feature can be used to implement a\n** \"Cancel\" button on a GUI progress dialog box.\n**\n** The progress handler callback must not do anything that will modify\n** the database connection that invoked the progress handler.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** The progress handler callback would originally only be invoked from the\n** bytecode engine.  It still might be invoked during [sqlite3_prepare()]\n** and similar because those routines might force a reparse of the schema\n** which involves running the bytecode engine.  However, beginning with\n** SQLite version 3.41.0, the progress handler callback might also be\n** invoked directly from [sqlite3_prepare()] while analyzing and generating\n** code for complex queries.\n*/\nSQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);\n\n/*\n** CAPI3REF: Opening A New Database Connection\n** CONSTRUCTOR: sqlite3\n**\n** ^These routines open an SQLite database file as specified by the\n** filename argument. ^The filename argument is interpreted as UTF-8 for\n** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte\n** order for sqlite3_open16(). ^(A [database connection] handle is usually\n** returned in *ppDb, even if an error occurs.  The only exception is that\n** if SQLite is unable to allocate memory to hold the [sqlite3] object,\n** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]\n** object.)^ ^(If the database is opened (and/or created) successfully, then\n** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.)^ ^The\n** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain\n** an English language description of the error following a failure of any\n** of the sqlite3_open() routines.\n**\n** ^The default encoding will be UTF-8 for databases created using\n** sqlite3_open() or sqlite3_open_v2().  ^The default encoding for databases\n** created using sqlite3_open16() will be UTF-16 in the native byte order.\n**\n** Whether or not an error occurs when it is opened, resources\n** associated with the [database connection] handle should be released by\n** passing it to [sqlite3_close()] when it is no longer required.\n**\n** The sqlite3_open_v2() interface works like sqlite3_open()\n** except that it accepts two additional parameters for additional control\n** over the new database connection.  ^(The flags parameter to\n** sqlite3_open_v2() must include, at a minimum, one of the following\n** three flag combinations:)^\n**\n** <dl>\n** ^(<dt>[SQLITE_OPEN_READONLY]</dt>\n** <dd>The database is opened in read-only mode.  If the database does\n** not already exist, an error is returned.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>\n** <dd>The database is opened for reading and writing if possible, or\n** reading only if the file is write protected by the operating\n** system.  In either case the database must already exist, otherwise\n** an error is returned.  For historical reasons, if opening in\n** read-write mode fails due to OS-level permissions, an attempt is\n** made to open it in read-only mode. [sqlite3_db_readonly()] can be\n** used to determine whether the database is actually\n** read-write.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>\n** <dd>The database is opened for reading and writing, and is created if\n** it does not already exist. This is the behavior that is always used for\n** sqlite3_open() and sqlite3_open16().</dd>)^\n** </dl>\n**\n** In addition to the required flags, the following optional flags are\n** also supported:\n**\n** <dl>\n** ^(<dt>[SQLITE_OPEN_URI]</dt>\n** <dd>The filename can be interpreted as a URI if this flag is set.</dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_MEMORY]</dt>\n** <dd>The database will be opened as an in-memory database.  The database\n** is named by the \"filename\" argument for the purposes of cache-sharing,\n** if shared cache mode is enabled, but the \"filename\" is otherwise ignored.\n** </dd>)^\n**\n** ^(<dt>[SQLITE_OPEN_NOMUTEX]</dt>\n** <dd>The new database connection will use the \"multi-thread\"\n** [threading mode].)^  This means that separate threads are allowed\n** to use SQLite at the same time, as long as each thread is using\n** a different [database connection].\n**\n** ^(<dt>[SQLITE_OPEN_FULLMUTEX]</dt>\n** <dd>The new database connection will use the \"serialized\"\n** [threading mode].)^  This means the multiple threads can safely\n** attempt to use the same database connection at the same time.\n** (Mutexes will block any actual concurrency, but in this mode\n** there is no harm in trying.)\n**\n** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt>\n** <dd>The database is opened with [shared cache] enabled, overriding\n** the default shared cache setting provided by\n** [sqlite3_enable_shared_cache()].)^\n** The [use of shared cache mode is discouraged] and hence shared cache\n** capabilities may be omitted from many builds of SQLite.  In such cases,\n** this option is a no-op.\n**\n** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt>\n** <dd>The database is opened with [shared cache] disabled, overriding\n** the default shared cache setting provided by\n** [sqlite3_enable_shared_cache()].)^\n**\n** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt>\n** <dd>The database connection comes up in \"extended result code mode\".\n** In other words, the database behaves as if\n** [sqlite3_extended_result_codes(db,1)] were called on the database\n** connection as soon as the connection is created. In addition to setting\n** the extended result code mode, this flag also causes [sqlite3_open_v2()]\n** to return an extended result code.</dd>\n**\n** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt>\n** <dd>The database filename is not allowed to contain a symbolic link</dd>\n** </dl>)^\n**\n** If the 3rd parameter to sqlite3_open_v2() is not one of the\n** required combinations shown above optionally combined with other\n** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits]\n** then the behavior is undefined.  Historic versions of SQLite\n** have silently ignored surplus bits in the flags parameter to\n** sqlite3_open_v2(), however that behavior might not be carried through\n** into future versions of SQLite and so applications should not rely\n** upon it.  Note in particular that the SQLITE_OPEN_EXCLUSIVE flag is a no-op\n** for sqlite3_open_v2().  The SQLITE_OPEN_EXCLUSIVE does *not* cause\n** the open to fail if the database already exists.  The SQLITE_OPEN_EXCLUSIVE\n** flag is intended for use by the [sqlite3_vfs|VFS interface] only, and not\n** by sqlite3_open_v2().\n**\n** ^The fourth parameter to sqlite3_open_v2() is the name of the\n** [sqlite3_vfs] object that defines the operating system interface that\n** the new database connection should use.  ^If the fourth parameter is\n** a NULL pointer then the default [sqlite3_vfs] object is used.\n**\n** ^If the filename is \":memory:\", then a private, temporary in-memory database\n** is created for the connection.  ^This in-memory database will vanish when\n** the database connection is closed.  Future versions of SQLite might\n** make use of additional special filenames that begin with the \":\" character.\n** It is recommended that when a database filename actually does begin with\n** a \":\" character you should prefix the filename with a pathname such as\n** \"./\" to avoid ambiguity.\n**\n** ^If the filename is an empty string, then a private, temporary\n** on-disk database will be created.  ^This private database will be\n** automatically deleted as soon as the database connection is closed.\n**\n** [[URI filenames in sqlite3_open()]] <h3>URI Filenames</h3>\n**\n** ^If [URI filename] interpretation is enabled, and the filename argument\n** begins with \"file:\", then the filename is interpreted as a URI. ^URI\n** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is\n** set in the third argument to sqlite3_open_v2(), or if it has\n** been enabled globally using the [SQLITE_CONFIG_URI] option with the\n** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option.\n** URI filename interpretation is turned off\n** by default, but future releases of SQLite might enable URI filename\n** interpretation by default.  See \"[URI filenames]\" for additional\n** information.\n**\n** URI filenames are parsed according to RFC 3986. ^If the URI contains an\n** authority, then it must be either an empty string or the string\n** \"localhost\". ^If the authority is not an empty string or \"localhost\", an\n** error is returned to the caller. ^The fragment component of a URI, if\n** present, is ignored.\n**\n** ^SQLite uses the path component of the URI as the name of the disk file\n** which contains the database. ^If the path begins with a '/' character,\n** then it is interpreted as an absolute path. ^If the path does not begin\n** with a '/' (meaning that the authority section is omitted from the URI)\n** then the path is interpreted as a relative path.\n** ^(On windows, the first component of an absolute path\n** is a drive specification (e.g. \"C:\").)^\n**\n** [[core URI query parameters]]\n** The query component of a URI may contain parameters that are interpreted\n** either by SQLite itself, or by a [VFS | custom VFS implementation].\n** SQLite and its built-in [VFSes] interpret the\n** following query parameters:\n**\n** <ul>\n**   <li> <b>vfs</b>: ^The \"vfs\" parameter may be used to specify the name of\n**     a VFS object that provides the operating system interface that should\n**     be used to access the database file on disk. ^If this option is set to\n**     an empty string the default VFS object is used. ^Specifying an unknown\n**     VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is\n**     present, then the VFS specified by the option takes precedence over\n**     the value passed as the fourth parameter to sqlite3_open_v2().\n**\n**   <li> <b>mode</b>: ^(The mode parameter may be set to either \"ro\", \"rw\",\n**     \"rwc\", or \"memory\". Attempting to set it to any other value is\n**     an error)^.\n**     ^If \"ro\" is specified, then the database is opened for read-only\n**     access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the\n**     third argument to sqlite3_open_v2(). ^If the mode option is set to\n**     \"rw\", then the database is opened for read-write (but not create)\n**     access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had\n**     been set. ^Value \"rwc\" is equivalent to setting both\n**     SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE.  ^If the mode option is\n**     set to \"memory\" then a pure [in-memory database] that never reads\n**     or writes from disk is used. ^It is an error to specify a value for\n**     the mode parameter that is less restrictive than that specified by\n**     the flags passed in the third parameter to sqlite3_open_v2().\n**\n**   <li> <b>cache</b>: ^The cache parameter may be set to either \"shared\" or\n**     \"private\". ^Setting it to \"shared\" is equivalent to setting the\n**     SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to\n**     sqlite3_open_v2(). ^Setting the cache parameter to \"private\" is\n**     equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.\n**     ^If sqlite3_open_v2() is used and the \"cache\" parameter is present in\n**     a URI filename, its value overrides any behavior requested by setting\n**     SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.\n**\n**  <li> <b>psow</b>: ^The psow parameter indicates whether or not the\n**     [powersafe overwrite] property does or does not apply to the\n**     storage media on which the database file resides.\n**\n**  <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter\n**     which if set disables file locking in rollback journal modes.  This\n**     is useful for accessing a database on a filesystem that does not\n**     support locking.  Caution:  Database corruption might result if two\n**     or more processes write to the same database and any one of those\n**     processes uses nolock=1.\n**\n**  <li> <b>immutable</b>: ^The immutable parameter is a boolean query\n**     parameter that indicates that the database file is stored on\n**     read-only media.  ^When immutable is set, SQLite assumes that the\n**     database file cannot be changed, even by a process with higher\n**     privilege, and so the database is opened read-only and all locking\n**     and change detection is disabled.  Caution: Setting the immutable\n**     property on a database file that does in fact change can result\n**     in incorrect query results and/or [SQLITE_CORRUPT] errors.\n**     See also: [SQLITE_IOCAP_IMMUTABLE].\n**\n** </ul>\n**\n** ^Specifying an unknown parameter in the query component of a URI is not an\n** error.  Future versions of SQLite might understand additional query\n** parameters.  See \"[query parameters with special meaning to SQLite]\" for\n** additional information.\n**\n** [[URI filename examples]] <h3>URI filename examples</h3>\n**\n** <table border=\"1\" align=center cellpadding=5>\n** <tr><th> URI filenames <th> Results\n** <tr><td> file:data.db <td>\n**          Open the file \"data.db\" in the current directory.\n** <tr><td> file:/home/fred/data.db<br>\n**          file:///home/fred/data.db <br>\n**          file://localhost/home/fred/data.db <br> <td>\n**          Open the database file \"/home/fred/data.db\".\n** <tr><td> file://darkstar/home/fred/data.db <td>\n**          An error. \"darkstar\" is not a recognized authority.\n** <tr><td style=\"white-space:nowrap\">\n**          file:///C:/Documents%20and%20Settings/fred/Desktop/data.db\n**     <td> Windows only: Open the file \"data.db\" on fred's desktop on drive\n**          C:. Note that the %20 escaping in this example is not strictly\n**          necessary - space characters can be used literally\n**          in URI filenames.\n** <tr><td> file:data.db?mode=ro&cache=private <td>\n**          Open file \"data.db\" in the current directory for read-only access.\n**          Regardless of whether or not shared-cache mode is enabled by\n**          default, use a private cache.\n** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td>\n**          Open file \"/home/fred/data.db\". Use the special VFS \"unix-dotfile\"\n**          that uses dot-files in place of posix advisory locking.\n** <tr><td> file:data.db?mode=readonly <td>\n**          An error. \"readonly\" is not a valid option for the \"mode\" parameter.\n**          Use \"ro\" instead:  \"file:data.db?mode=ro\".\n** </table>\n**\n** ^URI hexadecimal escape sequences (%HH) are supported within the path and\n** query components of a URI. A hexadecimal escape sequence consists of a\n** percent sign - \"%\" - followed by exactly two hexadecimal digits\n** specifying an octet value. ^Before the path or query components of a\n** URI filename are interpreted, they are encoded using UTF-8 and all\n** hexadecimal escape sequences replaced by a single byte containing the\n** corresponding octet. If this process generates an invalid UTF-8 encoding,\n** the results are undefined.\n**\n** <b>Note to Windows users:</b>  The encoding used for the filename argument\n** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever\n** codepage is currently defined.  Filenames containing international\n** characters must be converted to UTF-8 prior to passing them into\n** sqlite3_open() or sqlite3_open_v2().\n**\n** <b>Note to Windows Runtime users:</b>  The temporary directory must be set\n** prior to calling sqlite3_open() or sqlite3_open_v2().  Otherwise, various\n** features that require the use of temporary files may fail.\n**\n** See also: [sqlite3_temp_directory]\n*/\nSQLITE_API int sqlite3_open(\n  const char *filename,   /* Database filename (UTF-8) */\n  sqlite3 **ppDb          /* OUT: SQLite db handle */\n);\nSQLITE_API int sqlite3_open16(\n  const void *filename,   /* Database filename (UTF-16) */\n  sqlite3 **ppDb          /* OUT: SQLite db handle */\n);\nSQLITE_API int sqlite3_open_v2(\n  const char *filename,   /* Database filename (UTF-8) */\n  sqlite3 **ppDb,         /* OUT: SQLite db handle */\n  int flags,              /* Flags */\n  const char *zVfs        /* Name of VFS module to use */\n);\n\n/*\n** CAPI3REF: Obtain Values For URI Parameters\n**\n** These are utility routines, useful to [VFS|custom VFS implementations],\n** that check if a database file was a URI that contained a specific query\n** parameter, and if so obtains the value of that query parameter.\n**\n** The first parameter to these interfaces (hereafter referred to\n** as F) must be one of:\n** <ul>\n** <li> A database filename pointer created by the SQLite core and\n** passed into the xOpen() method of a VFS implementation, or\n** <li> A filename obtained from [sqlite3_db_filename()], or\n** <li> A new filename constructed using [sqlite3_create_filename()].\n** </ul>\n** If the F parameter is not one of the above, then the behavior is\n** undefined and probably undesirable.  Older versions of SQLite were\n** more tolerant of invalid F parameters than newer versions.\n**\n** If F is a suitable filename (as described in the previous paragraph)\n** and if P is the name of the query parameter, then\n** sqlite3_uri_parameter(F,P) returns the value of the P\n** parameter if it exists or a NULL pointer if P does not appear as a\n** query parameter on F.  If P is a query parameter of F and it\n** has no explicit value, then sqlite3_uri_parameter(F,P) returns\n** a pointer to an empty string.\n**\n** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean\n** parameter and returns true (1) or false (0) according to the value\n** of P.  The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the\n** value of query parameter P is one of \"yes\", \"true\", or \"on\" in any\n** case or if the value begins with a non-zero number.  The\n** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of\n** query parameter P is one of \"no\", \"false\", or \"off\" in any case or\n** if the value begins with a numeric zero.  If P is not a query\n** parameter on F or if the value of P does not match any of the\n** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0).\n**\n** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a\n** 64-bit signed integer and returns that integer, or D if P does not\n** exist.  If the value of P is something other than an integer, then\n** zero is returned.\n**\n** The sqlite3_uri_key(F,N) returns a pointer to the name (not\n** the value) of the N-th query parameter for filename F, or a NULL\n** pointer if N is less than zero or greater than the number of query\n** parameters minus 1.  The N value is zero-based so N should be 0 to obtain\n** the name of the first query parameter, 1 for the second parameter, and\n** so forth.\n**\n** If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and\n** sqlite3_uri_boolean(F,P,B) returns B.  If F is not a NULL pointer and\n** is not a database file pathname pointer that the SQLite core passed\n** into the xOpen VFS method, then the behavior of this routine is undefined\n** and probably undesirable.\n**\n** Beginning with SQLite [version 3.31.0] ([dateof:3.31.0]) the input F\n** parameter can also be the name of a rollback journal file or WAL file\n** in addition to the main database file.  Prior to version 3.31.0, these\n** routines would only work if F was the name of the main database file.\n** When the F parameter is the name of the rollback journal or WAL file,\n** it has access to all the same query parameters as were found on the\n** main database file.\n**\n** See the [URI filename] documentation for additional information.\n*/\nSQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z, const char *zParam);\nSQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam, int bDefault);\nSQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char*, sqlite3_int64);\nSQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N);\n\n/*\n** CAPI3REF:  Translate filenames\n**\n** These routines are available to [VFS|custom VFS implementations] for\n** translating filenames between the main database file, the journal file,\n** and the WAL file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** passed by the SQLite core into the VFS, then sqlite3_filename_database(F)\n** returns the name of the corresponding database file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** passed by the SQLite core into the VFS, or if F is a database filename\n** obtained from [sqlite3_db_filename()], then sqlite3_filename_journal(F)\n** returns the name of the corresponding rollback journal file.\n**\n** If F is the name of an sqlite database file, journal file, or WAL file\n** that was passed by the SQLite core into the VFS, or if F is a database\n** filename obtained from [sqlite3_db_filename()], then\n** sqlite3_filename_wal(F) returns the name of the corresponding\n** WAL file.\n**\n** In all of the above, if F is not the name of a database, journal or WAL\n** filename passed into the VFS from the SQLite core and F is not the\n** return value from [sqlite3_db_filename()], then the result is\n** undefined and is likely a memory access violation.\n*/\nSQLITE_API const char *sqlite3_filename_database(sqlite3_filename);\nSQLITE_API const char *sqlite3_filename_journal(sqlite3_filename);\nSQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);\n\n/*\n** CAPI3REF:  Database File Corresponding To A Journal\n**\n** ^If X is the name of a rollback or WAL-mode journal file that is\n** passed into the xOpen method of [sqlite3_vfs], then\n** sqlite3_database_file_object(X) returns a pointer to the [sqlite3_file]\n** object that represents the main database file.\n**\n** This routine is intended for use in custom [VFS] implementations\n** only.  It is not a general-purpose interface.\n** The argument sqlite3_file_object(X) must be a filename pointer that\n** has been passed into [sqlite3_vfs].xOpen method where the\n** flags parameter to xOpen contains one of the bits\n** [SQLITE_OPEN_MAIN_JOURNAL] or [SQLITE_OPEN_WAL].  Any other use\n** of this routine results in undefined and probably undesirable\n** behavior.\n*/\nSQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);\n\n/*\n** CAPI3REF: Create and Destroy VFS Filenames\n**\n** These interfaces are provided for use by [VFS shim] implementations and\n** are not useful outside of that context.\n**\n** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of\n** database filename D with corresponding journal file J and WAL file W and\n** an array P of N URI Key/Value pairs.  The result from\n** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that\n** is safe to pass to routines like:\n** <ul>\n** <li> [sqlite3_uri_parameter()],\n** <li> [sqlite3_uri_boolean()],\n** <li> [sqlite3_uri_int64()],\n** <li> [sqlite3_uri_key()],\n** <li> [sqlite3_filename_database()],\n** <li> [sqlite3_filename_journal()], or\n** <li> [sqlite3_filename_wal()].\n** </ul>\n** If a memory allocation error occurs, sqlite3_create_filename() might\n** return a NULL pointer.  The memory obtained from sqlite3_create_filename(X)\n** must be released by a corresponding call to sqlite3_free_filename(Y).\n**\n** The P parameter in sqlite3_create_filename(D,J,W,N,P) should be an array\n** of 2*N pointers to strings.  Each pair of pointers in this array corresponds\n** to a key and value for a query parameter.  The P parameter may be a NULL\n** pointer if N is zero.  None of the 2*N pointers in the P array may be\n** NULL pointers and key pointers should not be empty strings.\n** None of the D, J, or W parameters to sqlite3_create_filename(D,J,W,N,P) may\n** be NULL pointers, though they can be empty strings.\n**\n** The sqlite3_free_filename(Y) routine releases a memory allocation\n** previously obtained from sqlite3_create_filename().  Invoking\n** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.\n**\n** If the Y parameter to sqlite3_free_filename(Y) is anything other\n** than a NULL pointer or a pointer previously acquired from\n** sqlite3_create_filename(), then bad things such as heap\n** corruption or segfaults may occur. The value Y should not be\n** used again after sqlite3_free_filename(Y) has been called.  This means\n** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,\n** then the corresponding [sqlite3_module.xClose() method should also be\n** invoked prior to calling sqlite3_free_filename(Y).\n*/\nSQLITE_API sqlite3_filename sqlite3_create_filename(\n  const char *zDatabase,\n  const char *zJournal,\n  const char *zWal,\n  int nParam,\n  const char **azParam\n);\nSQLITE_API void sqlite3_free_filename(sqlite3_filename);\n\n/*\n** CAPI3REF: Error Codes And Messages\n** METHOD: sqlite3\n**\n** ^If the most recent sqlite3_* API call associated with\n** [database connection] D failed, then the sqlite3_errcode(D) interface\n** returns the numeric [result code] or [extended result code] for that\n** API call.\n** ^The sqlite3_extended_errcode()\n** interface is the same except that it always returns the\n** [extended result code] even when extended result codes are\n** disabled.\n**\n** The values returned by sqlite3_errcode() and/or\n** sqlite3_extended_errcode() might change with each API call.\n** Except, there are some interfaces that are guaranteed to never\n** change the value of the error code.  The error-code preserving\n** interfaces include the following:\n**\n** <ul>\n** <li> sqlite3_errcode()\n** <li> sqlite3_extended_errcode()\n** <li> sqlite3_errmsg()\n** <li> sqlite3_errmsg16()\n** <li> sqlite3_error_offset()\n** </ul>\n**\n** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language\n** text that describes the error, as either UTF-8 or UTF-16 respectively,\n** or NULL if no error message is available.\n** (See how SQLite handles [invalid UTF] for exceptions to this rule.)\n** ^(Memory to hold the error message string is managed internally.\n** The application does not need to worry about freeing the result.\n** However, the error string might be overwritten or deallocated by\n** subsequent calls to other SQLite interface functions.)^\n**\n** ^The sqlite3_errstr(E) interface returns the English-language text\n** that describes the [result code] E, as UTF-8, or NULL if E is not a\n** result code for which a text error message is available.\n** ^(Memory to hold the error message string is managed internally\n** and must not be freed by the application)^.\n**\n** ^If the most recent error references a specific token in the input\n** SQL, the sqlite3_error_offset() interface returns the byte offset\n** of the start of that token.  ^The byte offset returned by\n** sqlite3_error_offset() assumes that the input SQL is UTF-8.\n** ^If the most recent error does not reference a specific token in the input\n** SQL, then the sqlite3_error_offset() function returns -1.\n**\n** When the serialized [threading mode] is in use, it might be the\n** case that a second error occurs on a separate thread in between\n** the time of the first error and the call to these interfaces.\n** When that happens, the second error will be reported since these\n** interfaces always report the most recent result.  To avoid\n** this, each thread can obtain exclusive use of the [database connection] D\n** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning\n** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after\n** all calls to the interfaces listed here are completed.\n**\n** If an interface fails with SQLITE_MISUSE, that means the interface\n** was invoked incorrectly by the application.  In that case, the\n** error code and message may or may not be set.\n*/\nSQLITE_API int sqlite3_errcode(sqlite3 *db);\nSQLITE_API int sqlite3_extended_errcode(sqlite3 *db);\nSQLITE_API const char *sqlite3_errmsg(sqlite3*);\nSQLITE_API const void *sqlite3_errmsg16(sqlite3*);\nSQLITE_API const char *sqlite3_errstr(int);\nSQLITE_API int sqlite3_error_offset(sqlite3 *db);\n\n/*\n** CAPI3REF: Set Error Codes And Message\n** METHOD: sqlite3\n**\n** Set the error code of the database handle passed as the first argument\n** to errcode, and the error message to a copy of nul-terminated string\n** zErrMsg. If zErrMsg is passed NULL, then the error message is set to\n** the default message associated with the supplied error code.  Subsequent\n** calls to [sqlite3_errcode()] and [sqlite3_errmsg()] and similar will\n** return the values set by this routine in place of what was previously\n** set by SQLite itself.\n**\n** This function returns SQLITE_OK if the error code and error message are\n** successfully set, SQLITE_NOMEM if an OOM occurs, and SQLITE_MISUSE if\n** the database handle is NULL or invalid.\n**\n** The error code and message set by this routine remains in effect until\n** they are changed, either by another call to this routine or until they are\n** changed to by SQLite itself to reflect the result of some subsquent\n** API call.\n**\n** This function is intended for use by SQLite extensions or wrappers.  The\n** idea is that an extension or wrapper can use this routine to set error\n** messages and error codes and thus behave more like a core SQLite\n** feature from the point of view of an application.\n*/\nSQLITE_API int sqlite3_set_errmsg(sqlite3 *db, int errcode, const char *zErrMsg);\n\n/*\n** CAPI3REF: Prepared Statement Object\n** KEYWORDS: {prepared statement} {prepared statements}\n**\n** An instance of this object represents a single SQL statement that\n** has been compiled into binary form and is ready to be evaluated.\n**\n** Think of each SQL statement as a separate computer program.  The\n** original SQL text is source code.  A prepared statement object\n** is the compiled object code.  All SQL must be converted into a\n** prepared statement before it can be run.\n**\n** The life-cycle of a prepared statement object usually goes like this:\n**\n** <ol>\n** <li> Create the prepared statement object using [sqlite3_prepare_v2()].\n** <li> Bind values to [parameters] using the sqlite3_bind_*()\n**      interfaces.\n** <li> Run the SQL by calling [sqlite3_step()] one or more times.\n** <li> Reset the prepared statement using [sqlite3_reset()] then go back\n**      to step 2.  Do this zero or more times.\n** <li> Destroy the object using [sqlite3_finalize()].\n** </ol>\n*/\ntypedef struct sqlite3_stmt sqlite3_stmt;\n\n/*\n** CAPI3REF: Run-time Limits\n** METHOD: sqlite3\n**\n** ^(This interface allows the size of various constructs to be limited\n** on a connection by connection basis.  The first parameter is the\n** [database connection] whose limit is to be set or queried.  The\n** second parameter is one of the [limit categories] that define a\n** class of constructs to be size limited.  The third parameter is the\n** new limit for that construct.)^\n**\n** ^If the new limit is a negative number, the limit is unchanged.\n** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a\n** [limits | hard upper bound]\n** set at compile-time by a C preprocessor macro called\n** [limits | SQLITE_MAX_<i>NAME</i>].\n** (The \"_LIMIT_\" in the name is changed to \"_MAX_\".))^\n** ^Attempts to increase a limit above its hard upper bound are\n** silently truncated to the hard upper bound.\n**\n** ^Regardless of whether or not the limit was changed, the\n** [sqlite3_limit()] interface returns the prior value of the limit.\n** ^Hence, to find the current value of a limit without changing it,\n** simply invoke this interface with the third parameter set to -1.\n**\n** Run-time limits are intended for use in applications that manage\n** both their own internal database and also databases that are controlled\n** by untrusted external sources.  An example application might be a\n** web browser that has its own databases for storing history and\n** separate databases controlled by JavaScript applications downloaded\n** off the Internet.  The internal databases can be given the\n** large, default limits.  Databases managed by external sources can\n** be given much smaller limits designed to prevent a denial of service\n** attack.  Developers might also want to use the [sqlite3_set_authorizer()]\n** interface to further control untrusted SQL.  The size of the database\n** created by an untrusted script can be contained using the\n** [max_page_count] [PRAGMA].\n**\n** New run-time limit categories may be added in future releases.\n*/\nSQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);\n\n/*\n** CAPI3REF: Run-Time Limit Categories\n** KEYWORDS: {limit category} {*limit categories}\n**\n** These constants define various performance limits\n** that can be lowered at run-time using [sqlite3_limit()].\n** A concise description of these limits follows, and additional information\n** is available at [limits | Limits in SQLite].\n**\n** <dl>\n** [[SQLITE_LIMIT_LENGTH]] ^(<dt>SQLITE_LIMIT_LENGTH</dt>\n** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^\n**\n** [[SQLITE_LIMIT_SQL_LENGTH]] ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>\n** <dd>The maximum length of an SQL statement, in bytes.</dd>)^\n**\n** [[SQLITE_LIMIT_COLUMN]] ^(<dt>SQLITE_LIMIT_COLUMN</dt>\n** <dd>The maximum number of columns in a table definition or in the\n** result set of a [SELECT] or the maximum number of columns in an index\n** or in an ORDER BY or GROUP BY clause.</dd>)^\n**\n** [[SQLITE_LIMIT_EXPR_DEPTH]] ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>\n** <dd>The maximum depth of the parse tree on any expression.</dd>)^\n**\n** [[SQLITE_LIMIT_COMPOUND_SELECT]] ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>\n** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^\n**\n** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>\n** <dd>The maximum number of instructions in a virtual machine program\n** used to implement an SQL statement.  If [sqlite3_prepare_v2()] or\n** the equivalent tries to allocate space for more than this many opcodes\n** in a single prepared statement, an SQLITE_NOMEM error is returned.</dd>)^\n**\n** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>\n** <dd>The maximum number of arguments on a function.</dd>)^\n**\n** [[SQLITE_LIMIT_ATTACHED]] ^(<dt>SQLITE_LIMIT_ATTACHED</dt>\n** <dd>The maximum number of [ATTACH | attached databases].)^</dd>\n**\n** [[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]]\n** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>\n** <dd>The maximum length of the pattern argument to the [LIKE] or\n** [GLOB] operators.</dd>)^\n**\n** [[SQLITE_LIMIT_VARIABLE_NUMBER]]\n** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>\n** <dd>The maximum index number of any [parameter] in an SQL statement.)^\n**\n** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>\n** <dd>The maximum depth of recursion for triggers.</dd>)^\n**\n** [[SQLITE_LIMIT_WORKER_THREADS]] ^(<dt>SQLITE_LIMIT_WORKER_THREADS</dt>\n** <dd>The maximum number of auxiliary worker threads that a single\n** [prepared statement] may start.</dd>)^\n** </dl>\n*/\n#define SQLITE_LIMIT_LENGTH                    0\n#define SQLITE_LIMIT_SQL_LENGTH                1\n#define SQLITE_LIMIT_COLUMN                    2\n#define SQLITE_LIMIT_EXPR_DEPTH                3\n#define SQLITE_LIMIT_COMPOUND_SELECT           4\n#define SQLITE_LIMIT_VDBE_OP                   5\n#define SQLITE_LIMIT_FUNCTION_ARG              6\n#define SQLITE_LIMIT_ATTACHED                  7\n#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8\n#define SQLITE_LIMIT_VARIABLE_NUMBER           9\n#define SQLITE_LIMIT_TRIGGER_DEPTH            10\n#define SQLITE_LIMIT_WORKER_THREADS           11\n\n/*\n** CAPI3REF: Prepare Flags\n**\n** These constants define various flags that can be passed into the\n** \"prepFlags\" parameter of the [sqlite3_prepare_v3()] and\n** [sqlite3_prepare16_v3()] interfaces.\n**\n** New flags may be added in future releases of SQLite.\n**\n** <dl>\n** [[SQLITE_PREPARE_PERSISTENT]] ^(<dt>SQLITE_PREPARE_PERSISTENT</dt>\n** <dd>The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner\n** that the prepared statement will be retained for a long time and\n** probably reused many times.)^ ^Without this flag, [sqlite3_prepare_v3()]\n** and [sqlite3_prepare16_v3()] assume that the prepared statement will\n** be used just once or at most a few times and then destroyed using\n** [sqlite3_finalize()] relatively soon. The current implementation acts\n** on this hint by avoiding the use of [lookaside memory] so as not to\n** deplete the limited store of lookaside memory. Future versions of\n** SQLite may act on this hint differently.\n**\n** [[SQLITE_PREPARE_NORMALIZE]] <dt>SQLITE_PREPARE_NORMALIZE</dt>\n** <dd>The SQLITE_PREPARE_NORMALIZE flag is a no-op. This flag used\n** to be required for any prepared statement that wanted to use the\n** [sqlite3_normalized_sql()] interface.  However, the\n** [sqlite3_normalized_sql()] interface is now available to all\n** prepared statements, regardless of whether or not they use this\n** flag.\n**\n** [[SQLITE_PREPARE_NO_VTAB]] <dt>SQLITE_PREPARE_NO_VTAB</dt>\n** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler\n** to return an error (error code SQLITE_ERROR) if the statement uses\n** any virtual tables.\n**\n** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>\n** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler\n** errors from being sent to the error log defined by\n** [SQLITE_CONFIG_LOG].  This can be used, for example, to do test\n** compiles to see if some SQL syntax is well-formed, without generating\n** messages on the global error log when it is not.  If the test compile\n** fails, the sqlite3_prepare_v3() call returns the same error indications\n** with or without this flag; it just omits the call to [sqlite3_log()] that\n** logs the error.\n** </dl>\n*/\n#define SQLITE_PREPARE_PERSISTENT              0x01\n#define SQLITE_PREPARE_NORMALIZE               0x02\n#define SQLITE_PREPARE_NO_VTAB                 0x04\n#define SQLITE_PREPARE_DONT_LOG                0x10\n\n/*\n** CAPI3REF: Compiling An SQL Statement\n** KEYWORDS: {SQL statement compiler}\n** METHOD: sqlite3\n** CONSTRUCTOR: sqlite3_stmt\n**\n** To execute an SQL statement, it must first be compiled into a byte-code\n** program using one of these routines.  Or, in other words, these routines\n** are constructors for the [prepared statement] object.\n**\n** The preferred routine to use is [sqlite3_prepare_v2()].  The\n** [sqlite3_prepare()] interface is legacy and should be avoided.\n** [sqlite3_prepare_v3()] has an extra \"prepFlags\" option that is used\n** for special purposes.\n**\n** The use of the UTF-8 interfaces is preferred, as SQLite currently\n** does all parsing using UTF-8.  The UTF-16 interfaces are provided\n** as a convenience.  The UTF-16 interfaces work by converting the\n** input text into UTF-8, then invoking the corresponding UTF-8 interface.\n**\n** The first argument, \"db\", is a [database connection] obtained from a\n** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or\n** [sqlite3_open16()].  The database connection must not have been closed.\n**\n** The second argument, \"zSql\", is the statement to be compiled, encoded\n** as either UTF-8 or UTF-16.  The sqlite3_prepare(), sqlite3_prepare_v2(),\n** and sqlite3_prepare_v3()\n** interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(),\n** and sqlite3_prepare16_v3() use UTF-16.\n**\n** ^If the nByte argument is negative, then zSql is read up to the\n** first zero terminator. ^If nByte is positive, then it is the maximum\n** number of bytes read from zSql.  When nByte is positive, zSql is read\n** up to the first zero terminator or until the nByte bytes have been read,\n** whichever comes first.  ^If nByte is zero, then no prepared\n** statement is generated.\n** If the caller knows that the supplied string is nul-terminated, then\n** there is a small performance advantage to passing an nByte parameter that\n** is the number of bytes in the input string <i>including</i>\n** the nul-terminator.\n** Note that nByte measures the length of the input in bytes, not\n** characters, even for the UTF-16 interfaces.\n**\n** ^If pzTail is not NULL then *pzTail is made to point to the first byte\n** past the end of the first SQL statement in zSql.  These routines only\n** compile the first statement in zSql, so *pzTail is left pointing to\n** what remains uncompiled.\n**\n** ^*ppStmt is left pointing to a compiled [prepared statement] that can be\n** executed using [sqlite3_step()].  ^If there is an error, *ppStmt is set\n** to NULL.  ^If the input text contains no SQL (if the input is an empty\n** string or a comment) then *ppStmt is set to NULL.\n** The calling procedure is responsible for deleting the compiled\n** SQL statement using [sqlite3_finalize()] after it has finished with it.\n** ppStmt may not be NULL.\n**\n** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];\n** otherwise an [error code] is returned.\n**\n** The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(),\n** and sqlite3_prepare16_v3() interfaces are recommended for all new programs.\n** The older interfaces (sqlite3_prepare() and sqlite3_prepare16())\n** are retained for backwards compatibility, but their use is discouraged.\n** ^In the \"vX\" interfaces, the prepared statement\n** that is returned (the [sqlite3_stmt] object) contains a copy of the\n** original SQL text. This causes the [sqlite3_step()] interface to\n** behave differently in three ways:\n**\n** <ol>\n** <li>\n** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it\n** always used to do, [sqlite3_step()] will automatically recompile the SQL\n** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY]\n** retries will occur before sqlite3_step() gives up and returns an error.\n** </li>\n**\n** <li>\n** ^When an error occurs, [sqlite3_step()] will return one of the detailed\n** [error codes] or [extended error codes].  ^The legacy behavior was that\n** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code\n** and the application would have to make a second call to [sqlite3_reset()]\n** in order to find the underlying cause of the problem. With the \"v2\" prepare\n** interfaces, the underlying reason for the error is returned immediately.\n** </li>\n**\n** <li>\n** ^If the specific value bound to a [parameter | host parameter] in the\n** WHERE clause might influence the choice of query plan for a statement,\n** then the statement will be automatically recompiled, as if there had been\n** a schema change, on the first [sqlite3_step()] call following any change\n** to the [sqlite3_bind_text | bindings] of that [parameter].\n** ^The specific value of a WHERE-clause [parameter] might influence the\n** choice of query plan if the parameter is the left-hand side of a [LIKE]\n** or [GLOB] operator or if the parameter is compared to an indexed column\n** and the [SQLITE_ENABLE_STAT4] compile-time option is enabled.\n** </li>\n** </ol>\n**\n** <p>^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having\n** the extra prepFlags parameter, which is a bit array consisting of zero or\n** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags.  ^The\n** sqlite3_prepare_v2() interface works exactly the same as\n** sqlite3_prepare_v3() with a zero prepFlags parameter.\n*/\nSQLITE_API int sqlite3_prepare(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare_v2(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare_v3(\n  sqlite3 *db,            /* Database handle */\n  const char *zSql,       /* SQL statement, UTF-8 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16_v2(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\nSQLITE_API int sqlite3_prepare16_v3(\n  sqlite3 *db,            /* Database handle */\n  const void *zSql,       /* SQL statement, UTF-16 encoded */\n  int nByte,              /* Maximum length of zSql in bytes. */\n  unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */\n  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n);\n\n/*\n** CAPI3REF: Retrieving Statement SQL\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8\n** SQL text used to create [prepared statement] P if P was\n** created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()],\n** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].\n** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8\n** string containing the SQL text of prepared statement P with\n** [bound parameters] expanded.\n** ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8\n** string containing the normalized SQL text of prepared statement P.  The\n** semantics used to normalize a SQL statement are unspecified and subject\n** to change.  At a minimum, literal values will be replaced with suitable\n** placeholders.\n**\n** ^(For example, if a prepared statement is created using the SQL\n** text \"SELECT $abc,:xyz\" and if parameter $abc is bound to integer 2345\n** and parameter :xyz is unbound, then sqlite3_sql() will return\n** the original string, \"SELECT $abc,:xyz\" but sqlite3_expanded_sql()\n** will return \"SELECT 2345,NULL\".)^\n**\n** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory\n** is available to hold the result, or if the result would exceed the\n** maximum string length determined by the [SQLITE_LIMIT_LENGTH].\n**\n** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of\n** bound parameter expansions.  ^The [SQLITE_OMIT_TRACE] compile-time\n** option causes sqlite3_expanded_sql() to always return NULL.\n**\n** ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P)\n** are managed by SQLite and are automatically freed when the prepared\n** statement is finalized.\n** ^The string returned by sqlite3_expanded_sql(P), on the other hand,\n** is obtained from [sqlite3_malloc()] and must be freed by the application\n** by passing it to [sqlite3_free()].\n**\n** ^The sqlite3_normalized_sql() interface is only available if\n** the [SQLITE_ENABLE_NORMALIZE] compile-time option is defined.\n*/\nSQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);\nSQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);\n#ifdef SQLITE_ENABLE_NORMALIZE\nSQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);\n#endif\n\n/*\n** CAPI3REF: Determine If An SQL Statement Writes The Database\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if\n** and only if the [prepared statement] X makes no direct changes to\n** the content of the database file.\n**\n** Note that [application-defined SQL functions] or\n** [virtual tables] might change the database indirectly as a side effect.\n** ^(For example, if an application defines a function \"eval()\" that\n** calls [sqlite3_exec()], then the following SQL statement would\n** change the database file through side-effects:\n**\n** <blockquote><pre>\n**    SELECT eval('DELETE FROM t1') FROM t2;\n** </pre></blockquote>\n**\n** But because the [SELECT] statement does not change the database file\n** directly, sqlite3_stmt_readonly() would still return true.)^\n**\n** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK],\n** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true,\n** since the statements themselves do not actually modify the database but\n** rather they control the timing of when other statements modify the\n** database.  ^The [ATTACH] and [DETACH] statements also cause\n** sqlite3_stmt_readonly() to return true since, while those statements\n** change the configuration of a database connection, they do not make\n** changes to the content of the database files on disk.\n** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since\n** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and\n** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so\n** sqlite3_stmt_readonly() returns false for those commands.\n**\n** ^This routine returns false if there is any possibility that the\n** statement might change the database file.  ^A false return does\n** not guarantee that the statement will change the database file.\n** ^For example, an UPDATE statement might have a WHERE clause that\n** makes it a no-op, but the sqlite3_stmt_readonly() result would still\n** be false.  ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a\n** read-only no-op if the table already exists, but\n** sqlite3_stmt_readonly() still returns false for such a statement.\n**\n** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]\n** statement, then sqlite3_stmt_readonly(X) returns the same value as\n** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.\n*/\nSQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the\n** prepared statement S is an EXPLAIN statement, or 2 if the\n** statement S is an EXPLAIN QUERY PLAN.\n** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is\n** an ordinary statement or a NULL pointer.\n*/\nSQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN\n** setting for [prepared statement] S.  If E is zero, then S becomes\n** a normal prepared statement.  If E is 1, then S behaves as if\n** its SQL text began with \"[EXPLAIN]\".  If E is 2, then S behaves as if\n** its SQL text began with \"[EXPLAIN QUERY PLAN]\".\n**\n** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.\n** SQLite tries to avoid a reprepare, but a reprepare might be necessary\n** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.\n**\n** Because of the potential need to reprepare, a call to\n** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be\n** reprepared because it was created using [sqlite3_prepare()] instead of\n** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and\n** hence has no saved SQL text with which to reprepare.\n**\n** Changing the explain setting for a prepared statement does not change\n** the original SQL text for the statement.  Hence, if the SQL text originally\n** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)\n** is called to convert the statement into an ordinary statement, the EXPLAIN\n** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)\n** output, even though the statement now acts like a normal SQL statement.\n**\n** This routine returns SQLITE_OK if the explain mode is successfully\n** changed, or an error code if the explain mode could not be changed.\n** The explain mode cannot be changed while a statement is active.\n** Hence, it is good practice to call [sqlite3_reset(S)]\n** immediately prior to calling sqlite3_stmt_explain(S,E).\n*/\nSQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);\n\n/*\n** CAPI3REF: Determine If A Prepared Statement Has Been Reset\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the\n** [prepared statement] S has been stepped at least once using\n** [sqlite3_step(S)] but has neither run to completion (returned\n** [SQLITE_DONE] from [sqlite3_step(S)]) nor\n** been reset using [sqlite3_reset(S)].  ^The sqlite3_stmt_busy(S)\n** interface returns false if S is a NULL pointer.  If S is not a\n** NULL pointer and is not a pointer to a valid [prepared statement]\n** object, then the behavior is undefined and probably undesirable.\n**\n** This interface can be used in combination [sqlite3_next_stmt()]\n** to locate all prepared statements associated with a database\n** connection that are in need of being reset.  This can be used,\n** for example, in diagnostic routines to search for prepared\n** statements that are holding a transaction open.\n*/\nSQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Dynamically Typed Value Object\n** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}\n**\n** SQLite uses the sqlite3_value object to represent all values\n** that can be stored in a database table. SQLite uses dynamic typing\n** for the values it stores.  ^Values stored in sqlite3_value objects\n** can be integers, floating point values, strings, BLOBs, or NULL.\n**\n** An sqlite3_value object may be either \"protected\" or \"unprotected\".\n** Some interfaces require a protected sqlite3_value.  Other interfaces\n** will accept either a protected or an unprotected sqlite3_value.\n** Every interface that accepts sqlite3_value arguments specifies\n** whether or not it requires a protected sqlite3_value.  The\n** [sqlite3_value_dup()] interface can be used to construct a new\n** protected sqlite3_value from an unprotected sqlite3_value.\n**\n** The terms \"protected\" and \"unprotected\" refer to whether or not\n** a mutex is held.  An internal mutex is held for a protected\n** sqlite3_value object but no mutex is held for an unprotected\n** sqlite3_value object.  If SQLite is compiled to be single-threaded\n** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)\n** or if SQLite is run in one of reduced mutex modes\n** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]\n** then there is no distinction between protected and unprotected\n** sqlite3_value objects and they can be used interchangeably.  However,\n** for maximum code portability it is recommended that applications\n** still make the distinction between protected and unprotected\n** sqlite3_value objects even when not strictly required.\n**\n** ^The sqlite3_value objects that are passed as parameters into the\n** implementation of [application-defined SQL functions] are protected.\n** ^The sqlite3_value objects returned by [sqlite3_vtab_rhs_value()]\n** are protected.\n** ^The sqlite3_value object returned by\n** [sqlite3_column_value()] is unprotected.\n** Unprotected sqlite3_value objects may only be used as arguments\n** to [sqlite3_result_value()], [sqlite3_bind_value()], and\n** [sqlite3_value_dup()].\n** The [sqlite3_value_blob | sqlite3_value_type()] family of\n** interfaces require protected sqlite3_value objects.\n*/\ntypedef struct sqlite3_value sqlite3_value;\n\n/*\n** CAPI3REF: SQL Function Context Object\n**\n** The context in which an SQL function executes is stored in an\n** sqlite3_context object.  ^A pointer to an sqlite3_context object\n** is always the first parameter to [application-defined SQL functions].\n** The application-defined SQL function implementation will pass this\n** pointer through into calls to [sqlite3_result_int | sqlite3_result()],\n** [sqlite3_aggregate_context()], [sqlite3_user_data()],\n** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],\n** and/or [sqlite3_set_auxdata()].\n*/\ntypedef struct sqlite3_context sqlite3_context;\n\n/*\n** CAPI3REF: Binding Values To Prepared Statements\n** KEYWORDS: {host parameter} {host parameters} {host parameter name}\n** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}\n** METHOD: sqlite3_stmt\n**\n** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,\n** literals may be replaced by a [parameter] that matches one of the following\n** templates:\n**\n** <ul>\n** <li>  ?\n** <li>  ?NNN\n** <li>  :VVV\n** <li>  @VVV\n** <li>  $VVV\n** </ul>\n**\n** In the templates above, NNN represents an integer literal,\n** and VVV represents an alphanumeric identifier.)^  ^The values of these\n** parameters (also called \"host parameter names\" or \"SQL parameters\")\n** can be set using the sqlite3_bind_*() routines defined here.\n**\n** ^The first argument to the sqlite3_bind_*() routines is always\n** a pointer to the [sqlite3_stmt] object returned from\n** [sqlite3_prepare_v2()] or its variants.\n**\n** ^The second argument is the index of the SQL parameter to be set.\n** ^The leftmost SQL parameter has an index of 1.  ^When the same named\n** SQL parameter is used more than once, second and subsequent\n** occurrences have the same index as the first occurrence.\n** ^The index for named parameters can be looked up using the\n** [sqlite3_bind_parameter_index()] API if desired.  ^The index\n** for \"?NNN\" parameters is the value of NNN.\n** ^The NNN value must be between 1 and the [sqlite3_limit()]\n** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766).\n**\n** ^The third argument is the value to bind to the parameter.\n** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()\n** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter\n** is ignored and the end result is the same as sqlite3_bind_null().\n** ^If the third parameter to sqlite3_bind_text() is not NULL, then\n** it should be a pointer to well-formed UTF8 text.\n** ^If the third parameter to sqlite3_bind_text16() is not NULL, then\n** it should be a pointer to well-formed UTF16 text.\n** ^If the third parameter to sqlite3_bind_text64() is not NULL, then\n** it should be a pointer to a well-formed unicode string that is\n** either UTF8 if the sixth parameter is SQLITE_UTF8, or UTF16\n** otherwise.\n**\n** [[byte-order determination rules]] ^The byte-order of\n** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)\n** found in the first character, which is removed, or in the absence of a BOM\n** the byte order is the native byte order of the host\n** machine for sqlite3_bind_text16() or the byte order specified in\n** the 6th parameter for sqlite3_bind_text64().)^\n** ^If UTF16 input text contains invalid unicode\n** characters, then SQLite might change those invalid characters\n** into the unicode replacement character: U+FFFD.\n**\n** ^(In those routines that have a fourth argument, its value is the\n** number of bytes in the parameter.  To be clear: the value is the\n** number of <u>bytes</u> in the value, not the number of characters.)^\n** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16()\n** is negative, then the length of the string is\n** the number of bytes up to the first zero terminator.\n** If the fourth parameter to sqlite3_bind_blob() is negative, then\n** the behavior is undefined.\n** If a non-negative fourth parameter is provided to sqlite3_bind_text()\n** or sqlite3_bind_text16() or sqlite3_bind_text64() then\n** that parameter must be the byte offset\n** where the NUL terminator would occur assuming the string were NUL\n** terminated.  If any NUL characters occur at byte offsets less than\n** the value of the fourth parameter then the resulting string value will\n** contain embedded NULs.  The result of expressions involving strings\n** with embedded NULs is undefined.\n**\n** ^The fifth argument to the BLOB and string binding interfaces controls\n** or indicates the lifetime of the object referenced by the third parameter.\n** These three options exist:\n** ^ (1) A destructor to dispose of the BLOB or string after SQLite has finished\n** with it may be passed. ^It is called to dispose of the BLOB or string even\n** if the call to the bind API fails, except the destructor is not called if\n** the third parameter is a NULL pointer or the fourth parameter is negative.\n** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that\n** the application remains responsible for disposing of the object. ^In this\n** case, the object and the provided pointer to it must remain valid until\n** either the prepared statement is finalized or the same SQL parameter is\n** bound to something else, whichever occurs sooner.\n** ^ (3) The constant, [SQLITE_TRANSIENT], may be passed to indicate that the\n** object is to be copied prior to the return from sqlite3_bind_*(). ^The\n** object and pointer to it must remain valid until then. ^SQLite will then\n** manage the lifetime of its private copy.\n**\n** ^The sixth argument to sqlite3_bind_text64() must be one of\n** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]\n** to specify the encoding of the text in the third parameter.  If\n** the sixth argument to sqlite3_bind_text64() is not one of the\n** allowed values shown above, or if the text encoding is different\n** from the encoding specified by the sixth parameter, then the behavior\n** is undefined.\n**\n** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that\n** is filled with zeroes.  ^A zeroblob uses a fixed amount of memory\n** (just an integer to hold its size) while it is being processed.\n** Zeroblobs are intended to serve as placeholders for BLOBs whose\n** content is later written using\n** [sqlite3_blob_open | incremental BLOB I/O] routines.\n** ^A negative value for the zeroblob results in a zero-length BLOB.\n**\n** ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in\n** [prepared statement] S to have an SQL value of NULL, but to also be\n** associated with the pointer P of type T.  ^D is either a NULL pointer or\n** a pointer to a destructor function for P. ^SQLite will invoke the\n** destructor D with a single argument of P when it is finished using\n** P, even if the call to sqlite3_bind_pointer() fails.  Due to a\n** historical design quirk, results are undefined if D is\n** SQLITE_TRANSIENT. The T parameter should be a static string,\n** preferably a string literal. The sqlite3_bind_pointer() routine is\n** part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer\n** for the [prepared statement] or with a prepared statement for which\n** [sqlite3_step()] has been called more recently than [sqlite3_reset()],\n** then the call will return [SQLITE_MISUSE].  If any sqlite3_bind_()\n** routine is passed a [prepared statement] that has been finalized, the\n** result is undefined and probably harmful.\n**\n** ^Bindings are not cleared by the [sqlite3_reset()] routine.\n** ^Unbound parameters are interpreted as NULL.\n**\n** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an\n** [error code] if anything goes wrong.\n** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB\n** exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or\n** [SQLITE_MAX_LENGTH].\n** ^[SQLITE_RANGE] is returned if the parameter\n** index is out of range.  ^[SQLITE_NOMEM] is returned if malloc() fails.\n**\n** See also: [sqlite3_bind_parameter_count()],\n** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));\nSQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,\n                        void(*)(void*));\nSQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);\nSQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);\nSQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);\nSQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);\nSQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));\nSQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));\nSQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,\n                         void(*)(void*), unsigned char encoding);\nSQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);\nSQLITE_API int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*,void(*)(void*));\nSQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);\nSQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);\n\n/*\n** CAPI3REF: Number Of SQL Parameters\n** METHOD: sqlite3_stmt\n**\n** ^This routine can be used to find the number of [SQL parameters]\n** in a [prepared statement].  SQL parameters are tokens of the\n** form \"?\", \"?NNN\", \":AAA\", \"$AAA\", or \"@AAA\" that serve as\n** placeholders for values that are [sqlite3_bind_blob | bound]\n** to the parameters at a later time.\n**\n** ^(This routine actually returns the index of the largest (rightmost)\n** parameter. For all forms except ?NNN, this will correspond to the\n** number of unique parameters.  If parameters of the ?NNN form are used,\n** there may be gaps in the list.)^\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_name()], and\n** [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Name Of A Host Parameter\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_bind_parameter_name(P,N) interface returns\n** the name of the N-th [SQL parameter] in the [prepared statement] P.\n** ^(SQL parameters of the form \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n** have a name which is the string \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n** respectively.\n** In other words, the initial \":\" or \"$\" or \"@\" or \"?\"\n** is included as part of the name.)^\n** ^Parameters of the form \"?\" without a following integer have no name\n** and are referred to as \"nameless\" or \"anonymous parameters\".\n**\n** ^The first host parameter has an index of 1, not 0.\n**\n** ^If the value N is out of range or if the N-th parameter is\n** nameless, then NULL is returned.  ^The returned string is\n** always in UTF-8 encoding even if the named parameter was\n** originally specified as UTF-16 in [sqlite3_prepare16()],\n** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_count()], and\n** [sqlite3_bind_parameter_index()].\n*/\nSQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);\n\n/*\n** CAPI3REF: Index Of A Parameter With A Given Name\n** METHOD: sqlite3_stmt\n**\n** ^Return the index of an SQL parameter given its name.  ^The\n** index value returned is suitable for use as the second\n** parameter to [sqlite3_bind_blob|sqlite3_bind()].  ^A zero\n** is returned if no matching parameter is found.  ^The parameter\n** name must be given in UTF-8 even if the original statement\n** was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or\n** [sqlite3_prepare16_v3()].\n**\n** See also: [sqlite3_bind_blob|sqlite3_bind()],\n** [sqlite3_bind_parameter_count()], and\n** [sqlite3_bind_parameter_name()].\n*/\nSQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);\n\n/*\n** CAPI3REF: Reset All Bindings On A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset\n** the [sqlite3_bind_blob | bindings] on a [prepared statement].\n** ^Use this routine to reset all host parameters to NULL.\n*/\nSQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Number Of Columns In A Result Set\n** METHOD: sqlite3_stmt\n**\n** ^Return the number of columns in the result set returned by the\n** [prepared statement]. ^If this routine returns 0, that means the\n** [prepared statement] returns no data (for example an [UPDATE]).\n** ^However, just because this routine returns a positive number does not\n** mean that one or more rows of data will be returned.  ^A SELECT statement\n** will always have a positive sqlite3_column_count() but depending on the\n** WHERE clause constraints and the table content, it might return no rows.\n**\n** See also: [sqlite3_data_count()]\n*/\nSQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Column Names In A Result Set\n** METHOD: sqlite3_stmt\n**\n** ^These routines return the name assigned to a particular column\n** in the result set of a [SELECT] statement.  ^The sqlite3_column_name()\n** interface returns a pointer to a zero-terminated UTF-8 string\n** and sqlite3_column_name16() returns a pointer to a zero-terminated\n** UTF-16 string.  ^The first parameter is the [prepared statement]\n** that implements the [SELECT] statement. ^The second parameter is the\n** column number.  ^The leftmost column is number 0.\n**\n** ^The returned string pointer is valid until either the [prepared statement]\n** is destroyed by [sqlite3_finalize()] or until the statement is automatically\n** reprepared by the first call to [sqlite3_step()] for a particular run\n** or until the next call to\n** sqlite3_column_name() or sqlite3_column_name16() on the same column.\n**\n** ^If sqlite3_malloc() fails during the processing of either routine\n** (for example during a conversion from UTF-8 to UTF-16) then a\n** NULL pointer is returned.\n**\n** ^The name of a result column is the value of the \"AS\" clause for\n** that column, if there is an AS clause.  If there is no AS clause\n** then the name of the column is unspecified and may change from\n** one release of SQLite to the next.\n*/\nSQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);\nSQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);\n\n/*\n** CAPI3REF: Source Of Data In A Query Result\n** METHOD: sqlite3_stmt\n**\n** ^These routines provide a means to determine the database, table, and\n** table column that is the origin of a particular result column in a\n** [SELECT] statement.\n** ^The name of the database or table or column can be returned as\n** either a UTF-8 or UTF-16 string.  ^The _database_ routines return\n** the database name, the _table_ routines return the table name, and\n** the origin_ routines return the column name.\n** ^The returned string is valid until the [prepared statement] is destroyed\n** using [sqlite3_finalize()] or until the statement is automatically\n** reprepared by the first call to [sqlite3_step()] for a particular run\n** or until the same information is requested\n** again in a different encoding.\n**\n** ^The names returned are the original un-aliased names of the\n** database, table, and column.\n**\n** ^The first argument to these interfaces is a [prepared statement].\n** ^These functions return information about the Nth result column returned by\n** the statement, where N is the second function argument.\n** ^The left-most column is column 0 for these routines.\n**\n** ^If the Nth column returned by the statement is an expression or\n** subquery and is not a column value, then all of these functions return\n** NULL.  ^These routines might also return NULL if a memory allocation error\n** occurs.  ^Otherwise, they return the name of the attached database, table,\n** or column that query result column was extracted from.\n**\n** ^As with all other SQLite APIs, those whose names end with \"16\" return\n** UTF-16 encoded strings and the other functions return UTF-8.\n**\n** ^These APIs are only available if the library was compiled with the\n** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.\n**\n** If two or more threads call one or more\n** [sqlite3_column_database_name | column metadata interfaces]\n** for the same [prepared statement] and result column\n** at the same time then the results are undefined.\n*/\nSQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);\nSQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);\nSQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);\n\n/*\n** CAPI3REF: Declared Datatype Of A Query Result\n** METHOD: sqlite3_stmt\n**\n** ^(The first parameter is a [prepared statement].\n** If this statement is a [SELECT] statement and the Nth column of the\n** returned result set of that [SELECT] is a table column (not an\n** expression or subquery) then the declared type of the table\n** column is returned.)^  ^If the Nth column of the result set is an\n** expression or subquery, then a NULL pointer is returned.\n** ^The returned string is always UTF-8 encoded.\n**\n** ^(For example, given the database schema:\n**\n** CREATE TABLE t1(c1 VARIANT);\n**\n** and the following statement to be compiled:\n**\n** SELECT c1 + 1, c1 FROM t1;\n**\n** this routine would return the string \"VARIANT\" for the second result\n** column (i==1), and a NULL pointer for the first result column (i==0).)^\n**\n** ^SQLite uses dynamic run-time typing.  ^So just because a column\n** is declared to contain a particular type does not mean that the\n** data stored in that column is of the declared type.  SQLite is\n** strongly typed, but the typing is dynamic not static.  ^Type\n** is associated with individual values, not with the containers\n** used to hold those values.\n*/\nSQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);\nSQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);\n\n/*\n** CAPI3REF: Evaluate An SQL Statement\n** METHOD: sqlite3_stmt\n**\n** After a [prepared statement] has been prepared using any of\n** [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()],\n** or [sqlite3_prepare16_v3()] or one of the legacy\n** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function\n** must be called one or more times to evaluate the statement.\n**\n** The details of the behavior of the sqlite3_step() interface depend\n** on whether the statement was prepared using the newer \"vX\" interfaces\n** [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()],\n** [sqlite3_prepare16_v2()] or the older legacy\n** interfaces [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the\n** new \"vX\" interface is recommended for new applications but the legacy\n** interface will continue to be supported.\n**\n** ^In the legacy interface, the return value will be either [SQLITE_BUSY],\n** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].\n** ^With the \"v2\" interface, any of the other [result codes] or\n** [extended result codes] might be returned as well.\n**\n** ^[SQLITE_BUSY] means that the database engine was unable to acquire the\n** database locks it needs to do its job.  ^If the statement is a [COMMIT]\n** or occurs outside of an explicit transaction, then you can retry the\n** statement.  If the statement is not a [COMMIT] and occurs within an\n** explicit transaction then you should rollback the transaction before\n** continuing.\n**\n** ^[SQLITE_DONE] means that the statement has finished executing\n** successfully.  sqlite3_step() should not be called again on this virtual\n** machine without first calling [sqlite3_reset()] to reset the virtual\n** machine back to its initial state.\n**\n** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]\n** is returned each time a new row of data is ready for processing by the\n** caller. The values may be accessed using the [column access functions].\n** sqlite3_step() is called again to retrieve the next row of data.\n**\n** ^[SQLITE_ERROR] means that a run-time error (such as a constraint\n** violation) has occurred.  sqlite3_step() should not be called again on\n** the VM. More information may be found by calling [sqlite3_errmsg()].\n** ^With the legacy interface, a more specific error code (for example,\n** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)\n** can be obtained by calling [sqlite3_reset()] on the\n** [prepared statement].  ^In the \"v2\" interface,\n** the more specific error code is returned directly by sqlite3_step().\n**\n** [SQLITE_MISUSE] means that the this routine was called inappropriately.\n** Perhaps it was called on a [prepared statement] that has\n** already been [sqlite3_finalize | finalized] or on one that had\n** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could\n** be the case that the same database connection is being used by two or\n** more threads at the same moment in time.\n**\n** For all versions of SQLite up to and including 3.6.23.1, a call to\n** [sqlite3_reset()] was required after sqlite3_step() returned anything\n** other than [SQLITE_ROW] before any subsequent invocation of\n** sqlite3_step().  Failure to reset the prepared statement using\n** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from\n** sqlite3_step().  But after [version 3.6.23.1] ([dateof:3.6.23.1]),\n** sqlite3_step() began\n** calling [sqlite3_reset()] automatically in this circumstance rather\n** than returning [SQLITE_MISUSE].  This is not considered a compatibility\n** break because any application that ever receives an SQLITE_MISUSE error\n** is broken by definition.  The [SQLITE_OMIT_AUTORESET] compile-time option\n** can be used to restore the legacy behavior.\n**\n** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()\n** API always returns a generic error code, [SQLITE_ERROR], following any\n** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call\n** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the\n** specific [error codes] that better describes the error.\n** We admit that this is a goofy design.  The problem has been fixed\n** with the \"v2\" interface.  If you prepare all of your SQL statements\n** using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()]\n** or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead\n** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,\n** then the more specific [error codes] are returned directly\n** by sqlite3_step().  The use of the \"vX\" interfaces is recommended.\n*/\nSQLITE_API int sqlite3_step(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Number of columns in a result set\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_data_count(P) interface returns the number of columns in the\n** current row of the result set of [prepared statement] P.\n** ^If prepared statement P does not have results ready to return\n** (via calls to the [sqlite3_column_int | sqlite3_column()] family of\n** interfaces) then sqlite3_data_count(P) returns 0.\n** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.\n** ^The sqlite3_data_count(P) routine returns 0 if the previous call to\n** [sqlite3_step](P) returned [SQLITE_DONE].  ^The sqlite3_data_count(P)\n** will return non-zero if previous call to [sqlite3_step](P) returned\n** [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum]\n** where it always returns zero since each step of that multi-step\n** pragma returns 0 columns of data.\n**\n** See also: [sqlite3_column_count()]\n*/\nSQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Fundamental Datatypes\n** KEYWORDS: SQLITE_TEXT\n**\n** ^(Every value in SQLite has one of five fundamental datatypes:\n**\n** <ul>\n** <li> 64-bit signed integer\n** <li> 64-bit IEEE floating point number\n** <li> string\n** <li> BLOB\n** <li> NULL\n** </ul>)^\n**\n** These constants are codes for each of those types.\n**\n** Note that the SQLITE_TEXT constant was also used in SQLite version 2\n** for a completely different meaning.  Software that links against both\n** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not\n** SQLITE_TEXT.\n*/\n#define SQLITE_INTEGER  1\n#define SQLITE_FLOAT    2\n#define SQLITE_BLOB     4\n#define SQLITE_NULL     5\n#ifdef SQLITE_TEXT\n# undef SQLITE_TEXT\n#else\n# define SQLITE_TEXT     3\n#endif\n#define SQLITE3_TEXT     3\n\n/*\n** CAPI3REF: Result Values From A Query\n** KEYWORDS: {column access functions}\n** METHOD: sqlite3_stmt\n**\n** <b>Summary:</b>\n** <blockquote><table border=0 cellpadding=0 cellspacing=0>\n** <tr><td><b>sqlite3_column_blob</b><td>&rarr;<td>BLOB result\n** <tr><td><b>sqlite3_column_double</b><td>&rarr;<td>REAL result\n** <tr><td><b>sqlite3_column_int</b><td>&rarr;<td>32-bit INTEGER result\n** <tr><td><b>sqlite3_column_int64</b><td>&rarr;<td>64-bit INTEGER result\n** <tr><td><b>sqlite3_column_text</b><td>&rarr;<td>UTF-8 TEXT result\n** <tr><td><b>sqlite3_column_text16</b><td>&rarr;<td>UTF-16 TEXT result\n** <tr><td><b>sqlite3_column_value</b><td>&rarr;<td>The result as an\n** [sqlite3_value|unprotected sqlite3_value] object.\n** <tr><td>&nbsp;<td>&nbsp;<td>&nbsp;\n** <tr><td><b>sqlite3_column_bytes</b><td>&rarr;<td>Size of a BLOB\n** or a UTF-8 TEXT result in bytes\n** <tr><td><b>sqlite3_column_bytes16&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Size of UTF-16\n** TEXT in bytes\n** <tr><td><b>sqlite3_column_type</b><td>&rarr;<td>Default\n** datatype of the result\n** </table></blockquote>\n**\n** <b>Details:</b>\n**\n** ^These routines return information about a single column of the current\n** result row of a query.  ^In every case the first argument is a pointer\n** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]\n** that was returned from [sqlite3_prepare_v2()] or one of its variants)\n** and the second argument is the index of the column for which information\n** should be returned. ^The leftmost column of the result set has the index 0.\n** ^The number of columns in the result can be determined using\n** [sqlite3_column_count()].\n**\n** If the SQL statement does not currently point to a valid row, or if the\n** column index is out of range, the result is undefined.\n** These routines may only be called when the most recent call to\n** [sqlite3_step()] has returned [SQLITE_ROW] and neither\n** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.\n** If any of these routines are called after [sqlite3_reset()] or\n** [sqlite3_finalize()] or after [sqlite3_step()] has returned\n** something other than [SQLITE_ROW], the results are undefined.\n** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]\n** are called from a different thread while any of these routines\n** are pending, then the results are undefined.\n**\n** The first six interfaces (_blob, _double, _int, _int64, _text, and _text16)\n** each return the value of a result column in a specific data format.  If\n** the result column is not initially in the requested format (for example,\n** if the query returns an integer but the sqlite3_column_text() interface\n** is used to extract the value) then an automatic type conversion is performed.\n**\n** ^The sqlite3_column_type() routine returns the\n** [SQLITE_INTEGER | datatype code] for the initial data type\n** of the result column.  ^The returned value is one of [SQLITE_INTEGER],\n** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].\n** The return value of sqlite3_column_type() can be used to decide which\n** of the first six interface should be used to extract the column value.\n** The value returned by sqlite3_column_type() is only meaningful if no\n** automatic type conversions have occurred for the value in question.\n** After a type conversion, the result of calling sqlite3_column_type()\n** is undefined, though harmless.  Future\n** versions of SQLite may change the behavior of sqlite3_column_type()\n** following a type conversion.\n**\n** If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes()\n** or sqlite3_column_bytes16() interfaces can be used to determine the size\n** of that BLOB or string.\n**\n** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()\n** routine returns the number of bytes in that BLOB or string.\n** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts\n** the string to UTF-8 and then returns the number of bytes.\n** ^If the result is a numeric value then sqlite3_column_bytes() uses\n** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns\n** the number of bytes in that string.\n** ^If the result is NULL, then sqlite3_column_bytes() returns zero.\n**\n** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()\n** routine returns the number of bytes in that BLOB or string.\n** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts\n** the string to UTF-16 and then returns the number of bytes.\n** ^If the result is a numeric value then sqlite3_column_bytes16() uses\n** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns\n** the number of bytes in that string.\n** ^If the result is NULL, then sqlite3_column_bytes16() returns zero.\n**\n** ^The values returned by [sqlite3_column_bytes()] and\n** [sqlite3_column_bytes16()] do not include the zero terminators at the end\n** of the string.  ^For clarity: the values returned by\n** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of\n** bytes in the string, not the number of characters.\n**\n** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),\n** even empty strings, are always zero-terminated.  ^The return\n** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.\n**\n** ^Strings returned by sqlite3_column_text16() always have the endianness\n** which is native to the platform, regardless of the text encoding set\n** for the database.\n**\n** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an\n** [unprotected sqlite3_value] object.  In a multithreaded environment,\n** an unprotected sqlite3_value object may only be used safely with\n** [sqlite3_bind_value()] and [sqlite3_result_value()].\n** If the [unprotected sqlite3_value] object returned by\n** [sqlite3_column_value()] is used in any other way, including calls\n** to routines like [sqlite3_value_int()], [sqlite3_value_text()],\n** or [sqlite3_value_bytes()], the behavior is not threadsafe.\n** Hence, the sqlite3_column_value() interface\n** is normally only useful within the implementation of\n** [application-defined SQL functions] or [virtual tables], not within\n** top-level application code.\n**\n** These routines may attempt to convert the datatype of the result.\n** ^For example, if the internal representation is FLOAT and a text result\n** is requested, [sqlite3_snprintf()] is used internally to perform the\n** conversion automatically.  ^(The following table details the conversions\n** that are applied:\n**\n** <blockquote>\n** <table border=\"1\">\n** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion\n**\n** <tr><td>  NULL    <td> INTEGER   <td> Result is 0\n** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0\n** <tr><td>  NULL    <td>   TEXT    <td> Result is a NULL pointer\n** <tr><td>  NULL    <td>   BLOB    <td> Result is a NULL pointer\n** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float\n** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer\n** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT\n** <tr><td>  FLOAT   <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float\n** <tr><td>  FLOAT   <td>   BLOB    <td> [CAST] to BLOB\n** <tr><td>  TEXT    <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  TEXT    <td>  FLOAT    <td> [CAST] to REAL\n** <tr><td>  TEXT    <td>   BLOB    <td> No change\n** <tr><td>  BLOB    <td> INTEGER   <td> [CAST] to INTEGER\n** <tr><td>  BLOB    <td>  FLOAT    <td> [CAST] to REAL\n** <tr><td>  BLOB    <td>   TEXT    <td> [CAST] to TEXT, ensure zero terminator\n** </table>\n** </blockquote>)^\n**\n** Note that when type conversions occur, pointers returned by prior\n** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or\n** sqlite3_column_text16() may be invalidated.\n** Type conversions and pointer invalidations might occur\n** in the following cases:\n**\n** <ul>\n** <li> The initial content is a BLOB and sqlite3_column_text() or\n**      sqlite3_column_text16() is called.  A zero-terminator might\n**      need to be added to the string.</li>\n** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or\n**      sqlite3_column_text16() is called.  The content must be converted\n**      to UTF-16.</li>\n** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or\n**      sqlite3_column_text() is called.  The content must be converted\n**      to UTF-8.</li>\n** </ul>\n**\n** ^Conversions between UTF-16be and UTF-16le are always done in place and do\n** not invalidate a prior pointer, though of course the content of the buffer\n** that the prior pointer references will have been modified.  Other kinds\n** of conversion are done in place when it is possible, but sometimes they\n** are not possible and in those cases prior pointers are invalidated.\n**\n** The safest policy is to invoke these routines\n** in one of the following ways:\n**\n** <ul>\n**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>\n**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>\n**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>\n** </ul>\n**\n** In other words, you should call sqlite3_column_text(),\n** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result\n** into the desired format, then invoke sqlite3_column_bytes() or\n** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls\n** to sqlite3_column_text() or sqlite3_column_blob() with calls to\n** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()\n** with calls to sqlite3_column_bytes().\n**\n** ^The pointers returned are valid until a type conversion occurs as\n** described above, or until [sqlite3_step()] or [sqlite3_reset()] or\n** [sqlite3_finalize()] is called.  ^The memory space used to hold strings\n** and BLOBs is freed automatically.  Do not pass the pointers returned\n** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into\n** [sqlite3_free()].\n**\n** As long as the input parameters are correct, these routines will only\n** fail if an out-of-memory error occurs during a format conversion.\n** Only the following subset of interfaces are subject to out-of-memory\n** errors:\n**\n** <ul>\n** <li> sqlite3_column_blob()\n** <li> sqlite3_column_text()\n** <li> sqlite3_column_text16()\n** <li> sqlite3_column_bytes()\n** <li> sqlite3_column_bytes16()\n** </ul>\n**\n** If an out-of-memory error occurs, then the return value from these\n** routines is the same as if the column had contained an SQL NULL value.\n** Valid SQL NULL returns can be distinguished from out-of-memory errors\n** by invoking the [sqlite3_errcode()] immediately after the suspect\n** return value is obtained and before any\n** other SQLite interface is called on the same [database connection].\n*/\nSQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);\nSQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);\nSQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);\nSQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);\nSQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);\nSQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);\nSQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);\n\n/*\n** CAPI3REF: Destroy A Prepared Statement Object\n** DESTRUCTOR: sqlite3_stmt\n**\n** ^The sqlite3_finalize() function is called to delete a [prepared statement].\n** ^If the most recent evaluation of the statement encountered no errors\n** or if the statement has never been evaluated, then sqlite3_finalize() returns\n** SQLITE_OK.  ^If the most recent evaluation of statement S failed, then\n** sqlite3_finalize(S) returns the appropriate [error code] or\n** [extended error code].\n**\n** ^The sqlite3_finalize(S) routine can be called at any point during\n** the life cycle of [prepared statement] S:\n** before statement S is ever evaluated, after\n** one or more calls to [sqlite3_reset()], or after any call\n** to [sqlite3_step()] regardless of whether or not the statement has\n** completed execution.\n**\n** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.\n**\n** The application must finalize every [prepared statement] in order to avoid\n** resource leaks.  It is a grievous error for the application to try to use\n** a prepared statement after it has been finalized.  Any use of a prepared\n** statement after it has been finalized can result in undefined and\n** undesirable behavior such as segfaults and heap corruption.\n*/\nSQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Reset A Prepared Statement Object\n** METHOD: sqlite3_stmt\n**\n** The sqlite3_reset() function is called to reset a [prepared statement]\n** object back to its initial state, ready to be re-executed.\n** ^Any SQL statement variables that had values bound to them using\n** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.\n** Use [sqlite3_clear_bindings()] to reset the bindings.\n**\n** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S\n** back to the beginning of its program.\n**\n** ^The return code from [sqlite3_reset(S)] indicates whether or not\n** the previous evaluation of prepared statement S completed successfully.\n** ^If [sqlite3_step(S)] has never before been called on S or if\n** [sqlite3_step(S)] has not been called since the previous call\n** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return\n** [SQLITE_OK].\n**\n** ^If the most recent call to [sqlite3_step(S)] for the\n** [prepared statement] S indicated an error, then\n** [sqlite3_reset(S)] returns an appropriate [error code].\n** ^The [sqlite3_reset(S)] interface might also return an [error code]\n** if there were no prior errors but the process of resetting\n** the prepared statement caused a new error. ^For example, if an\n** [INSERT] statement with a [RETURNING] clause is only stepped one time,\n** that one call to [sqlite3_step(S)] might return SQLITE_ROW but\n** the overall statement might still fail and the [sqlite3_reset(S)] call\n** might return SQLITE_BUSY if locking constraints prevent the\n** database change from committing.  Therefore, it is important that\n** applications check the return code from [sqlite3_reset(S)] even if\n** no prior call to [sqlite3_step(S)] indicated a problem.\n**\n** ^The [sqlite3_reset(S)] interface does not change the values\n** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.\n*/\nSQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);\n\n\n/*\n** CAPI3REF: Create Or Redefine SQL Functions\n** KEYWORDS: {function creation routines}\n** METHOD: sqlite3\n**\n** ^These functions (collectively known as \"function creation routines\")\n** are used to add SQL functions or aggregates or to redefine the behavior\n** of existing SQL functions or aggregates. The only differences between\n** the three \"sqlite3_create_function*\" routines are the text encoding\n** expected for the second parameter (the name of the function being\n** created) and the presence or absence of a destructor callback for\n** the application data pointer. Function sqlite3_create_window_function()\n** is similar, but allows the user to supply the extra callback functions\n** needed by [aggregate window functions].\n**\n** ^The first parameter is the [database connection] to which the SQL\n** function is to be added.  ^If an application uses more than one database\n** connection then application-defined SQL functions must be added\n** to each database connection separately.\n**\n** ^The second parameter is the name of the SQL function to be created or\n** redefined.  ^The length of the name is limited to 255 bytes in a UTF-8\n** representation, exclusive of the zero-terminator.  ^Note that the name\n** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.\n** ^Any attempt to create a function with a longer name\n** will result in [SQLITE_MISUSE] being returned.\n**\n** ^The third parameter (nArg)\n** is the number of arguments that the SQL function or\n** aggregate takes. ^If this parameter is -1, then the SQL function or\n** aggregate may take any number of arguments between 0 and the limit\n** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third\n** parameter is less than -1 or greater than 127 then the behavior is\n** undefined.\n**\n** ^The fourth parameter, eTextRep, specifies what\n** [SQLITE_UTF8 | text encoding] this SQL function prefers for\n** its parameters.  The application should set this parameter to\n** [SQLITE_UTF16LE] if the function implementation invokes\n** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the\n** implementation invokes [sqlite3_value_text16be()] on an input, or\n** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8]\n** otherwise.  ^The same SQL function may be registered multiple times using\n** different preferred text encodings, with different implementations for\n** each encoding.\n** ^When multiple implementations of the same function are available, SQLite\n** will pick the one that involves the least amount of data conversion.\n**\n** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]\n** to signal that the function will always return the same result given\n** the same inputs within a single SQL statement.  Most SQL functions are\n** deterministic.  The built-in [random()] SQL function is an example of a\n** function that is not deterministic.  The SQLite query planner is able to\n** perform additional optimizations on deterministic functions, so use\n** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.\n**\n** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]\n** flag, which if present prevents the function from being invoked from\n** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,\n** index expressions, or the WHERE clause of partial indexes.\n**\n** For best security, the [SQLITE_DIRECTONLY] flag is recommended for\n** all application-defined SQL functions that do not need to be\n** used inside of triggers, views, CHECK constraints, or other elements of\n** the database schema.  This flag is especially recommended for SQL\n** functions that have side effects or reveal internal application state.\n** Without this flag, an attacker might be able to modify the schema of\n** a database file to include invocations of the function with parameters\n** chosen by the attacker, which the application will then execute when\n** the database file is opened and read.\n**\n** ^(The fifth parameter is an arbitrary pointer.  The implementation of the\n** function can gain access to this pointer using [sqlite3_user_data()].)^\n**\n** ^The sixth, seventh and eighth parameters passed to the three\n** \"sqlite3_create_function*\" functions, xFunc, xStep and xFinal, are\n** pointers to C-language functions that implement the SQL function or\n** aggregate. ^A scalar SQL function requires an implementation of the xFunc\n** callback only; NULL pointers must be passed as the xStep and xFinal\n** parameters. ^An aggregate SQL function requires an implementation of xStep\n** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing\n** SQL function or aggregate, pass NULL pointers for all three function\n** callbacks.\n**\n** ^The sixth, seventh, eighth and ninth parameters (xStep, xFinal, xValue\n** and xInverse) passed to sqlite3_create_window_function are pointers to\n** C-language callbacks that implement the new function. xStep and xFinal\n** must both be non-NULL. xValue and xInverse may either both be NULL, in\n** which case a regular aggregate function is created, or must both be\n** non-NULL, in which case the new function may be used as either an aggregate\n** or aggregate window function. More details regarding the implementation\n** of aggregate window functions are\n** [user-defined window functions|available here].\n**\n** ^(If the final parameter to sqlite3_create_function_v2() or\n** sqlite3_create_window_function() is not NULL, then it is the destructor for\n** the application data pointer. The destructor is invoked when the function\n** is deleted, either by being overloaded or when the database connection\n** closes.)^ ^The destructor is also invoked if the call to\n** sqlite3_create_function_v2() fails.  ^When the destructor callback is\n** invoked, it is passed a single argument which is a copy of the application\n** data pointer which was the fifth parameter to sqlite3_create_function_v2().\n**\n** ^It is permitted to register multiple implementations of the same\n** functions with the same name but with either differing numbers of\n** arguments or differing preferred text encodings.  ^SQLite will use\n** the implementation that most closely matches the way in which the\n** SQL function is used.  ^A function implementation with a non-negative\n** nArg parameter is a better match than a function implementation with\n** a negative nArg.  ^A function where the preferred text encoding\n** matches the database encoding is a better\n** match than a function where the encoding is different.\n** ^A function where the encoding difference is between UTF16le and UTF16be\n** is a closer match than a function where the encoding difference is\n** between UTF8 and UTF16.\n**\n** ^Built-in functions may be overloaded by new application-defined functions.\n**\n** ^An application-defined function is permitted to call other\n** SQLite interfaces.  However, such calls must not\n** close the database connection nor finalize or reset the prepared\n** statement in which the function is running.\n*/\nSQLITE_API int sqlite3_create_function(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n);\nSQLITE_API int sqlite3_create_function16(\n  sqlite3 *db,\n  const void *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n);\nSQLITE_API int sqlite3_create_function_v2(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*),\n  void(*xDestroy)(void*)\n);\nSQLITE_API int sqlite3_create_window_function(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  void *pApp,\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*),\n  void (*xValue)(sqlite3_context*),\n  void (*xInverse)(sqlite3_context*,int,sqlite3_value**),\n  void(*xDestroy)(void*)\n);\n\n/*\n** CAPI3REF: Text Encodings\n**\n** These constants define integer codes that represent the various\n** text encodings supported by SQLite.\n*/\n#define SQLITE_UTF8           1    /* IMP: R-37514-35566 */\n#define SQLITE_UTF16LE        2    /* IMP: R-03371-37637 */\n#define SQLITE_UTF16BE        3    /* IMP: R-51971-34154 */\n#define SQLITE_UTF16          4    /* Use native byte order */\n#define SQLITE_ANY            5    /* Deprecated */\n#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */\n\n/*\n** CAPI3REF: Function Flags\n**\n** These constants may be ORed together with the\n** [SQLITE_UTF8 | preferred text encoding] as the fourth argument\n** to [sqlite3_create_function()], [sqlite3_create_function16()], or\n** [sqlite3_create_function_v2()].\n**\n** <dl>\n** [[SQLITE_DETERMINISTIC]] <dt>SQLITE_DETERMINISTIC</dt><dd>\n** The SQLITE_DETERMINISTIC flag means that the new function always gives\n** the same output when the input parameters are the same.\n** The [abs|abs() function] is deterministic, for example, but\n** [randomblob|randomblob()] is not.  Functions must\n** be deterministic in order to be used in certain contexts such as\n** with the WHERE clause of [partial indexes] or in [generated columns].\n** SQLite might also optimize deterministic functions by factoring them\n** out of inner loops.\n** </dd>\n**\n** [[SQLITE_DIRECTONLY]] <dt>SQLITE_DIRECTONLY</dt><dd>\n** The SQLITE_DIRECTONLY flag means that the function may only be invoked\n** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in\n** schema structures such as [CHECK constraints], [DEFAULT clauses],\n** [expression indexes], [partial indexes], or [generated columns].\n** <p>\n** The SQLITE_DIRECTONLY flag is recommended for any\n** [application-defined SQL function]\n** that has side-effects or that could potentially leak sensitive information.\n** This will prevent attacks in which an application is tricked\n** into using a database file that has had its schema surreptitiously\n** modified to invoke the application-defined function in ways that are\n** harmful.\n** <p>\n** Some people say it is good practice to set SQLITE_DIRECTONLY on all\n** [application-defined SQL functions], regardless of whether or not they\n** are security sensitive, as doing so prevents those functions from being used\n** inside of the database schema, and thus ensures that the database\n** can be inspected and modified using generic tools (such as the [CLI])\n** that do not have access to the application-defined functions.\n** </dd>\n**\n** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd>\n** The SQLITE_INNOCUOUS flag means that the function is unlikely\n** to cause problems even if misused.  An innocuous function should have\n** no side effects and should not depend on any values other than its\n** input parameters. The [abs|abs() function] is an example of an\n** innocuous function.\n** The [load_extension() SQL function] is not innocuous because of its\n** side effects.\n** <p> SQLITE_INNOCUOUS is similar to SQLITE_DETERMINISTIC, but is not\n** exactly the same.  The [random|random() function] is an example of a\n** function that is innocuous but not deterministic.\n** <p>Some heightened security settings\n** ([SQLITE_DBCONFIG_TRUSTED_SCHEMA] and [PRAGMA trusted_schema=OFF])\n** disable the use of SQL functions inside views and triggers and in\n** schema structures such as [CHECK constraints], [DEFAULT clauses],\n** [expression indexes], [partial indexes], and [generated columns] unless\n** the function is tagged with SQLITE_INNOCUOUS.  Most built-in functions\n** are innocuous.  Developers are advised to avoid using the\n** SQLITE_INNOCUOUS flag for application-defined functions unless the\n** function has been carefully audited and found to be free of potentially\n** security-adverse side-effects and information-leaks.\n** </dd>\n**\n** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd>\n** The SQLITE_SUBTYPE flag indicates to SQLite that a function might call\n** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.\n** This flag instructs SQLite to omit some corner-case optimizations that\n** might disrupt the operation of the [sqlite3_value_subtype()] function,\n** causing it to return zero rather than the correct subtype().\n** All SQL functions that invoke [sqlite3_value_subtype()] should have this\n** property.  If the SQLITE_SUBTYPE property is omitted, then the return\n** value from [sqlite3_value_subtype()] might sometimes be zero even though\n** a non-zero subtype was specified by the function argument expression.\n**\n** [[SQLITE_RESULT_SUBTYPE]] <dt>SQLITE_RESULT_SUBTYPE</dt><dd>\n** The SQLITE_RESULT_SUBTYPE flag indicates to SQLite that a function might call\n** [sqlite3_result_subtype()] to cause a sub-type to be associated with its\n** result.\n** Every function that invokes [sqlite3_result_subtype()] should have this\n** property.  If it does not, then the call to [sqlite3_result_subtype()]\n** might become a no-op if the function is used as a term in an\n** [expression index].  On the other hand, SQL functions that never invoke\n** [sqlite3_result_subtype()] should avoid setting this property, as the\n** purpose of this property is to disable certain optimizations that are\n** incompatible with subtypes.\n**\n** [[SQLITE_SELFORDER1]] <dt>SQLITE_SELFORDER1</dt><dd>\n** The SQLITE_SELFORDER1 flag indicates that the function is an aggregate\n** that internally orders the values provided to the first argument.  The\n** ordered-set aggregate SQL notation with a single ORDER BY term can be\n** used to invoke this function.  If the ordered-set aggregate notation is\n** used on a function that lacks this flag, then an error is raised. Note\n** that the ordered-set aggregate syntax is only available if SQLite is\n** built using the -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES compile-time option.\n** </dd>\n** </dl>\n*/\n#define SQLITE_DETERMINISTIC    0x000000800\n#define SQLITE_DIRECTONLY       0x000080000\n#define SQLITE_SUBTYPE          0x000100000\n#define SQLITE_INNOCUOUS        0x000200000\n#define SQLITE_RESULT_SUBTYPE   0x001000000\n#define SQLITE_SELFORDER1       0x002000000\n\n/*\n** CAPI3REF: Deprecated Functions\n** DEPRECATED\n**\n** These functions are [deprecated].  In order to maintain\n** backwards compatibility with older code, these functions continue\n** to be supported.  However, new applications should avoid\n** the use of these functions.  To encourage programmers to avoid\n** these functions, we will not explain what they do.\n*/\n#ifndef SQLITE_OMIT_DEPRECATED\nSQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);\nSQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);\nSQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),\n                      void*,sqlite3_int64);\n#endif\n\n/*\n** CAPI3REF: Obtaining SQL Values\n** METHOD: sqlite3_value\n**\n** <b>Summary:</b>\n** <blockquote><table border=0 cellpadding=0 cellspacing=0>\n** <tr><td><b>sqlite3_value_blob</b><td>&rarr;<td>BLOB value\n** <tr><td><b>sqlite3_value_double</b><td>&rarr;<td>REAL value\n** <tr><td><b>sqlite3_value_int</b><td>&rarr;<td>32-bit INTEGER value\n** <tr><td><b>sqlite3_value_int64</b><td>&rarr;<td>64-bit INTEGER value\n** <tr><td><b>sqlite3_value_pointer</b><td>&rarr;<td>Pointer value\n** <tr><td><b>sqlite3_value_text</b><td>&rarr;<td>UTF-8 TEXT value\n** <tr><td><b>sqlite3_value_text16</b><td>&rarr;<td>UTF-16 TEXT value in\n** the native byteorder\n** <tr><td><b>sqlite3_value_text16be</b><td>&rarr;<td>UTF-16be TEXT value\n** <tr><td><b>sqlite3_value_text16le</b><td>&rarr;<td>UTF-16le TEXT value\n** <tr><td>&nbsp;<td>&nbsp;<td>&nbsp;\n** <tr><td><b>sqlite3_value_bytes</b><td>&rarr;<td>Size of a BLOB\n** or a UTF-8 TEXT in bytes\n** <tr><td><b>sqlite3_value_bytes16&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Size of UTF-16\n** TEXT in bytes\n** <tr><td><b>sqlite3_value_type</b><td>&rarr;<td>Default\n** datatype of the value\n** <tr><td><b>sqlite3_value_numeric_type&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>Best numeric datatype of the value\n** <tr><td><b>sqlite3_value_nochange&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>True if the column is unchanged in an UPDATE\n** against a virtual table.\n** <tr><td><b>sqlite3_value_frombind&nbsp;&nbsp;</b>\n** <td>&rarr;&nbsp;&nbsp;<td>True if value originated from a [bound parameter]\n** </table></blockquote>\n**\n** <b>Details:</b>\n**\n** These routines extract type, size, and content information from\n** [protected sqlite3_value] objects.  Protected sqlite3_value objects\n** are used to pass parameter information into the functions that\n** implement [application-defined SQL functions] and [virtual tables].\n**\n** These routines work only with [protected sqlite3_value] objects.\n** Any attempt to use these routines on an [unprotected sqlite3_value]\n** is not threadsafe.\n**\n** ^These routines work just like the corresponding [column access functions]\n** except that these routines take a single [protected sqlite3_value] object\n** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.\n**\n** ^The sqlite3_value_text16() interface extracts a UTF-16 string\n** in the native byte-order of the host machine.  ^The\n** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces\n** extract UTF-16 strings as big-endian and little-endian respectively.\n**\n** ^If [sqlite3_value] object V was initialized\n** using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)]\n** and if X and Y are strings that compare equal according to strcmp(X,Y),\n** then sqlite3_value_pointer(V,Y) will return the pointer P.  ^Otherwise,\n** sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer()\n** routine is part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** ^(The sqlite3_value_type(V) interface returns the\n** [SQLITE_INTEGER | datatype code] for the initial datatype of the\n** [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER],\n** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^\n** Other interfaces might change the datatype for an sqlite3_value object.\n** For example, if the datatype is initially SQLITE_INTEGER and\n** sqlite3_value_text(V) is called to extract a text value for that\n** integer, then subsequent calls to sqlite3_value_type(V) might return\n** SQLITE_TEXT.  Whether or not a persistent internal datatype conversion\n** occurs is undefined and may change from one release of SQLite to the next.\n**\n** ^(The sqlite3_value_numeric_type() interface attempts to apply\n** numeric affinity to the value.  This means that an attempt is\n** made to convert the value to an integer or floating point.  If\n** such a conversion is possible without loss of information (in other\n** words, if the value is a string that looks like a number)\n** then the conversion is performed.  Otherwise no conversion occurs.\n** The [SQLITE_INTEGER | datatype] after conversion is returned.)^\n**\n** ^Within the [xUpdate] method of a [virtual table], the\n** sqlite3_value_nochange(X) interface returns true if and only if\n** the column corresponding to X is unchanged by the UPDATE operation\n** that the xUpdate method call was invoked to implement and if\n** the prior [xColumn] method call that was invoked to extract\n** the value for that column returned without setting a result (probably\n** because it queried [sqlite3_vtab_nochange()] and found that the column\n** was unchanging).  ^Within an [xUpdate] method, any value for which\n** sqlite3_value_nochange(X) is true will in all other respects appear\n** to be a NULL value.  If sqlite3_value_nochange(X) is invoked anywhere other\n** than within an [xUpdate] method call for an UPDATE statement, then\n** the return value is arbitrary and meaningless.\n**\n** ^The sqlite3_value_frombind(X) interface returns non-zero if the\n** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()]\n** interfaces.  ^If X comes from an SQL literal value, or a table column,\n** or an expression, then sqlite3_value_frombind(X) returns zero.\n**\n** Please pay particular attention to the fact that the pointer returned\n** from [sqlite3_value_blob()], [sqlite3_value_text()], or\n** [sqlite3_value_text16()] can be invalidated by a subsequent call to\n** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],\n** or [sqlite3_value_text16()].\n**\n** These routines must be called from the same thread as\n** the SQL function that supplied the [sqlite3_value*] parameters.\n**\n** As long as the input parameter is correct, these routines can only\n** fail if an out-of-memory error occurs during a format conversion.\n** Only the following subset of interfaces are subject to out-of-memory\n** errors:\n**\n** <ul>\n** <li> sqlite3_value_blob()\n** <li> sqlite3_value_text()\n** <li> sqlite3_value_text16()\n** <li> sqlite3_value_text16le()\n** <li> sqlite3_value_text16be()\n** <li> sqlite3_value_bytes()\n** <li> sqlite3_value_bytes16()\n** </ul>\n**\n** If an out-of-memory error occurs, then the return value from these\n** routines is the same as if the column had contained an SQL NULL value.\n** Valid SQL NULL returns can be distinguished from out-of-memory errors\n** by invoking the [sqlite3_errcode()] immediately after the suspect\n** return value is obtained and before any\n** other SQLite interface is called on the same [database connection].\n*/\nSQLITE_API const void *sqlite3_value_blob(sqlite3_value*);\nSQLITE_API double sqlite3_value_double(sqlite3_value*);\nSQLITE_API int sqlite3_value_int(sqlite3_value*);\nSQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);\nSQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);\nSQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);\nSQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);\nSQLITE_API int sqlite3_value_bytes(sqlite3_value*);\nSQLITE_API int sqlite3_value_bytes16(sqlite3_value*);\nSQLITE_API int sqlite3_value_type(sqlite3_value*);\nSQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);\nSQLITE_API int sqlite3_value_nochange(sqlite3_value*);\nSQLITE_API int sqlite3_value_frombind(sqlite3_value*);\n\n/*\n** CAPI3REF: Report the internal text encoding state of an sqlite3_value object\n** METHOD: sqlite3_value\n**\n** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8],\n** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding\n** of the value X, assuming that X has type TEXT.)^  If sqlite3_value_type(X)\n** returns something other than SQLITE_TEXT, then the return value from\n** sqlite3_value_encoding(X) is meaningless.  ^Calls to\n** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],\n** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or\n** [sqlite3_value_bytes16(X)] might change the encoding of the value X and\n** thus change the return from subsequent calls to sqlite3_value_encoding(X).\n**\n** This routine is intended for used by applications that test and validate\n** the SQLite implementation.  This routine is inquiring about the opaque\n** internal state of an [sqlite3_value] object.  Ordinary applications should\n** not need to know what the internal state of an sqlite3_value object is and\n** hence should not need to use this interface.\n*/\nSQLITE_API int sqlite3_value_encoding(sqlite3_value*);\n\n/*\n** CAPI3REF: Finding The Subtype Of SQL Values\n** METHOD: sqlite3_value\n**\n** The sqlite3_value_subtype(V) function returns the subtype for\n** an [application-defined SQL function] argument V.  The subtype\n** information can be used to pass a limited amount of context from\n** one SQL function to another.  Use the [sqlite3_result_subtype()]\n** routine to set the subtype for the return value of an SQL function.\n**\n** Every [application-defined SQL function] that invokes this interface\n** should include the [SQLITE_SUBTYPE] property in the text\n** encoding argument when the function is [sqlite3_create_function|registered].\n** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()\n** might return zero instead of the upstream subtype in some corner cases.\n*/\nSQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);\n\n/*\n** CAPI3REF: Copy And Free SQL Values\n** METHOD: sqlite3_value\n**\n** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]\n** object V and returns a pointer to that copy.  ^The [sqlite3_value] returned\n** is a [protected sqlite3_value] object even if the input is not.\n** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a\n** memory allocation fails. ^If V is a [pointer value], then the result\n** of sqlite3_value_dup(V) is a NULL value.\n**\n** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object\n** previously obtained from [sqlite3_value_dup()].  ^If V is a NULL pointer\n** then sqlite3_value_free(V) is a harmless no-op.\n*/\nSQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);\nSQLITE_API void sqlite3_value_free(sqlite3_value*);\n\n/*\n** CAPI3REF: Obtain Aggregate Function Context\n** METHOD: sqlite3_context\n**\n** Implementations of aggregate SQL functions use this\n** routine to allocate memory for storing their state.\n**\n** ^The first time the sqlite3_aggregate_context(C,N) routine is called\n** for a particular aggregate function, SQLite allocates\n** N bytes of memory, zeroes out that memory, and returns a pointer\n** to the new memory. ^On second and subsequent calls to\n** sqlite3_aggregate_context() for the same aggregate function instance,\n** the same buffer is returned.  Sqlite3_aggregate_context() is normally\n** called once for each invocation of the xStep callback and then one\n** last time when the xFinal callback is invoked.  ^(When no rows match\n** an aggregate query, the xStep() callback of the aggregate function\n** implementation is never called and xFinal() is called exactly once.\n** In those cases, sqlite3_aggregate_context() might be called for the\n** first time from within xFinal().)^\n**\n** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer\n** when first called if N is less than or equal to zero or if a memory\n** allocation error occurs.\n**\n** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is\n** determined by the N parameter on the first successful call.  Changing the\n** value of N in any subsequent call to sqlite3_aggregate_context() within\n** the same aggregate function instance will not resize the memory\n** allocation.)^  Within the xFinal callback, it is customary to set\n** N=0 in calls to sqlite3_aggregate_context(C,N) so that no\n** pointless memory allocations occur.\n**\n** ^SQLite automatically frees the memory allocated by\n** sqlite3_aggregate_context() when the aggregate query concludes.\n**\n** The first parameter must be a copy of the\n** [sqlite3_context | SQL function context] that is the first parameter\n** to the xStep or xFinal callback routine that implements the aggregate\n** function.\n**\n** This routine must be called from the same thread in which\n** the aggregate SQL function is running.\n*/\nSQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);\n\n/*\n** CAPI3REF: User Data For Functions\n** METHOD: sqlite3_context\n**\n** ^The sqlite3_user_data() interface returns a copy of\n** the pointer that was the pUserData parameter (the 5th parameter)\n** of the [sqlite3_create_function()]\n** and [sqlite3_create_function16()] routines that originally\n** registered the application defined function.\n**\n** This routine must be called from the same thread in which\n** the application-defined function is running.\n*/\nSQLITE_API void *sqlite3_user_data(sqlite3_context*);\n\n/*\n** CAPI3REF: Database Connection For Functions\n** METHOD: sqlite3_context\n**\n** ^The sqlite3_context_db_handle() interface returns a copy of\n** the pointer to the [database connection] (the 1st parameter)\n** of the [sqlite3_create_function()]\n** and [sqlite3_create_function16()] routines that originally\n** registered the application defined function.\n*/\nSQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);\n\n/*\n** CAPI3REF: Function Auxiliary Data\n** METHOD: sqlite3_context\n**\n** These functions may be used by (non-aggregate) SQL functions to\n** associate auxiliary data with argument values. If the same argument\n** value is passed to multiple invocations of the same SQL function during\n** query execution, under some circumstances the associated auxiliary data\n** might be preserved.  An example of where this might be useful is in a\n** regular-expression matching function. The compiled version of the regular\n** expression can be stored as auxiliary data associated with the pattern string.\n** Then as long as the pattern string remains the same,\n** the compiled regular expression can be reused on multiple\n** invocations of the same function.\n**\n** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data\n** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument\n** value to the application-defined function.  ^N is zero for the left-most\n** function argument.  ^If there is no auxiliary data\n** associated with the function argument, the sqlite3_get_auxdata(C,N) interface\n** returns a NULL pointer.\n**\n** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the\n** N-th argument of the application-defined function.  ^Subsequent\n** calls to sqlite3_get_auxdata(C,N) return P from the most recent\n** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or\n** NULL if the auxiliary data has been discarded.\n** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,\n** SQLite will invoke the destructor function X with parameter P exactly\n** once, when the auxiliary data is discarded.\n** SQLite is free to discard the auxiliary data at any time, including: <ul>\n** <li> ^(when the corresponding function parameter changes)^, or\n** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the\n**      SQL statement)^, or\n** <li> ^(when sqlite3_set_auxdata() is invoked again on the same\n**       parameter)^, or\n** <li> ^(during the original sqlite3_set_auxdata() call when a memory\n**      allocation error occurs.)^\n** <li> ^(during the original sqlite3_set_auxdata() call if the function\n**      is evaluated during query planning instead of during query execution,\n**      as sometimes happens with [SQLITE_ENABLE_STAT4].)^ </ul>\n**\n** Note the last two bullets in particular.  The destructor X in\n** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the\n** sqlite3_set_auxdata() interface even returns.  Hence sqlite3_set_auxdata()\n** should be called near the end of the function implementation and the\n** function implementation should not make any use of P after\n** sqlite3_set_auxdata() has been called.  Furthermore, a call to\n** sqlite3_get_auxdata() that occurs immediately after a corresponding call\n** to sqlite3_set_auxdata() might still return NULL if an out-of-memory\n** condition occurred during the sqlite3_set_auxdata() call or if the\n** function is being evaluated during query planning rather than during\n** query execution.\n**\n** ^(In practice, auxiliary data is preserved between function calls for\n** function parameters that are compile-time constants, including literal\n** values and [parameters] and expressions composed from the same.)^\n**\n** The value of the N parameter to these interfaces should be non-negative.\n** Future enhancements may make use of negative N values to define new\n** kinds of function caching behavior.\n**\n** These routines must be called from the same thread in which\n** the SQL function is running.\n**\n** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].\n*/\nSQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);\nSQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));\n\n/*\n** CAPI3REF: Database Connection Client Data\n** METHOD: sqlite3\n**\n** These functions are used to associate one or more named pointers\n** with a [database connection].\n** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P\n** to be attached to [database connection] D using name N.  Subsequent\n** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P\n** or a NULL pointer if there were no prior calls to\n** sqlite3_set_clientdata() with the same values of D and N.\n** Names are compared using strcmp() and are thus case sensitive.\n** It returns 0 on success and SQLITE_NOMEM on allocation failure.\n**\n** If P and X are both non-NULL, then the destructor X is invoked with\n** argument P on the first of the following occurrences:\n** <ul>\n** <li> An out-of-memory error occurs during the call to\n**      sqlite3_set_clientdata() which attempts to register pointer P.\n** <li> A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made\n**      with the same D and N parameters.\n** <li> The database connection closes.  SQLite does not make any guarantees\n**      about the order in which destructors are called, only that all\n**      destructors will be called exactly once at some point during the\n**      database connection closing process.\n** </ul>\n**\n** SQLite does not do anything with client data other than invoke\n** destructors on the client data at the appropriate time.  The intended\n** use for client data is to provide a mechanism for wrapper libraries\n** to store additional information about an SQLite database connection.\n**\n** There is no limit (other than available memory) on the number of different\n** client data pointers (with different names) that can be attached to a\n** single database connection.  However, the implementation is optimized\n** for the case of having only one or two different client data names.\n** Applications and wrapper libraries are discouraged from using more than\n** one client data name each.\n**\n** There is no way to enumerate the client data pointers\n** associated with a database connection.  The N parameter can be thought\n** of as a secret key such that only code that knows the secret key is able\n** to access the associated data.\n**\n** Security Warning:  These interfaces should not be exposed in scripting\n** languages or in other circumstances where it might be possible for an\n** attacker to invoke them.  Any agent that can invoke these interfaces\n** can probably also take control of the process.\n**\n** Database connection client data is only available for SQLite\n** version 3.44.0 ([dateof:3.44.0]) and later.\n**\n** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].\n*/\nSQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);\nSQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));\n\n/*\n** CAPI3REF: Constants Defining Special Destructor Behavior\n**\n** These are special values for the destructor that is passed in as the\n** final argument to routines like [sqlite3_result_blob()].  ^If the destructor\n** argument is SQLITE_STATIC, it means that the content pointer is constant\n** and will never change.  It does not need to be destroyed.  ^The\n** SQLITE_TRANSIENT value means that the content will likely change in\n** the near future and that SQLite should make its own private copy of\n** the content before returning.\n**\n** The typedef is necessary to work around problems in certain\n** C++ compilers.\n*/\ntypedef void (*sqlite3_destructor_type)(void*);\n#define SQLITE_STATIC      ((sqlite3_destructor_type)0)\n#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)\n\n/*\n** CAPI3REF: Setting The Result Of An SQL Function\n** METHOD: sqlite3_context\n**\n** These routines are used by the xFunc or xFinal callbacks that\n** implement SQL functions and aggregates.  See\n** [sqlite3_create_function()] and [sqlite3_create_function16()]\n** for additional information.\n**\n** These functions work very much like the [parameter binding] family of\n** functions used to bind values to host parameters in prepared statements.\n** Refer to the [SQL parameter] documentation for additional information.\n**\n** ^The sqlite3_result_blob() interface sets the result from\n** an application-defined function to be the BLOB whose content is pointed\n** to by the second parameter and which is N bytes long where N is the\n** third parameter.\n**\n** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)\n** interfaces set the result of the application-defined function to be\n** a BLOB containing all zero bytes and N bytes in size.\n**\n** ^The sqlite3_result_double() interface sets the result from\n** an application-defined function to be a floating point value specified\n** by its 2nd argument.\n**\n** ^The sqlite3_result_error() and sqlite3_result_error16() functions\n** cause the implemented SQL function to throw an exception.\n** ^SQLite uses the string pointed to by the\n** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()\n** as the text of an error message.  ^SQLite interprets the error\n** message string from sqlite3_result_error() as UTF-8. ^SQLite\n** interprets the string from sqlite3_result_error16() as UTF-16 using\n** the same [byte-order determination rules] as [sqlite3_bind_text16()].\n** ^If the third parameter to sqlite3_result_error()\n** or sqlite3_result_error16() is negative then SQLite takes as the error\n** message all text up through the first zero character.\n** ^If the third parameter to sqlite3_result_error() or\n** sqlite3_result_error16() is non-negative then SQLite takes that many\n** bytes (not characters) from the 2nd parameter as the error message.\n** ^The sqlite3_result_error() and sqlite3_result_error16()\n** routines make a private copy of the error message text before\n** they return.  Hence, the calling function can deallocate or\n** modify the text after they return without harm.\n** ^The sqlite3_result_error_code() function changes the error code\n** returned by SQLite as a result of an error in a function.  ^By default,\n** the error code is SQLITE_ERROR.  ^A subsequent call to sqlite3_result_error()\n** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.\n**\n** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an\n** error indicating that a string or BLOB is too long to represent.\n**\n** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an\n** error indicating that a memory allocation failed.\n**\n** ^The sqlite3_result_int() interface sets the return value\n** of the application-defined function to be the 32-bit signed integer\n** value given in the 2nd argument.\n** ^The sqlite3_result_int64() interface sets the return value\n** of the application-defined function to be the 64-bit signed integer\n** value given in the 2nd argument.\n**\n** ^The sqlite3_result_null() interface sets the return value\n** of the application-defined function to be NULL.\n**\n** ^The sqlite3_result_text(), sqlite3_result_text16(),\n** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces\n** set the return value of the application-defined function to be\n** a text string which is represented as UTF-8, UTF-16 native byte order,\n** UTF-16 little endian, or UTF-16 big endian, respectively.\n** ^The sqlite3_result_text64() interface sets the return value of an\n** application-defined function to be a text string in an encoding\n** specified by the fifth (and last) parameter, which must be one\n** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE].\n** ^SQLite takes the text result from the application from\n** the 2nd parameter of the sqlite3_result_text* interfaces.\n** ^If the 3rd parameter to any of the sqlite3_result_text* interfaces\n** other than sqlite3_result_text64() is negative, then SQLite computes\n** the string length itself by searching the 2nd parameter for the first\n** zero character.\n** ^If the 3rd parameter to the sqlite3_result_text* interfaces\n** is non-negative, then as many bytes (not characters) of the text\n** pointed to by the 2nd parameter are taken as the application-defined\n** function result.  If the 3rd parameter is non-negative, then it\n** must be the byte offset into the string where the NUL terminator would\n** appear if the string were NUL terminated.  If any NUL characters occur\n** in the string at a byte offset that is less than the value of the 3rd\n** parameter, then the resulting string will contain embedded NULs and the\n** result of expressions operating on strings with embedded NULs is undefined.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces\n** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that\n** function as the destructor on the text or BLOB result when it has\n** finished using that result.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces or to\n** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite\n** assumes that the text or BLOB result is in constant space and does not\n** copy the content of the parameter nor call a destructor on the content\n** when it has finished using that result.\n** ^If the 4th parameter to the sqlite3_result_text* interfaces\n** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT\n** then SQLite makes a copy of the result into space obtained\n** from [sqlite3_malloc()] before it returns.\n**\n** ^For the sqlite3_result_text16(), sqlite3_result_text16le(), and\n** sqlite3_result_text16be() routines, and for sqlite3_result_text64()\n** when the encoding is not UTF8, if the input UTF16 begins with a\n** byte-order mark (BOM, U+FEFF) then the BOM is removed from the\n** string and the rest of the string is interpreted according to the\n** byte-order specified by the BOM.  ^The byte-order specified by\n** the BOM at the beginning of the text overrides the byte-order\n** specified by the interface procedure.  ^So, for example, if\n** sqlite3_result_text16le() is invoked with text that begins\n** with bytes 0xfe, 0xff (a big-endian byte-order mark) then the\n** first two bytes of input are skipped and the remaining input\n** is interpreted as UTF16BE text.\n**\n** ^For UTF16 input text to the sqlite3_result_text16(),\n** sqlite3_result_text16be(), sqlite3_result_text16le(), and\n** sqlite3_result_text64() routines, if the text contains invalid\n** UTF16 characters, the invalid characters might be converted\n** into the unicode replacement character, U+FFFD.\n**\n** ^The sqlite3_result_value() interface sets the result of\n** the application-defined function to be a copy of the\n** [unprotected sqlite3_value] object specified by the 2nd parameter.  ^The\n** sqlite3_result_value() interface makes a copy of the [sqlite3_value]\n** so that the [sqlite3_value] specified in the parameter may change or\n** be deallocated after sqlite3_result_value() returns without harm.\n** ^A [protected sqlite3_value] object may always be used where an\n** [unprotected sqlite3_value] object is required, so either\n** kind of [sqlite3_value] object can be used with this interface.\n**\n** ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an\n** SQL NULL value, just like [sqlite3_result_null(C)], except that it\n** also associates the host-language pointer P or type T with that\n** NULL value such that the pointer can be retrieved within an\n** [application-defined SQL function] using [sqlite3_value_pointer()].\n** ^If the D parameter is not NULL, then it is a pointer to a destructor\n** for the P parameter.  ^SQLite invokes D with P as its only argument\n** when SQLite is finished with P.  The T parameter should be a static\n** string and preferably a string literal. The sqlite3_result_pointer()\n** routine is part of the [pointer passing interface] added for SQLite 3.20.0.\n**\n** If these routines are called from within a different thread\n** than the one containing the application-defined function that received\n** the [sqlite3_context] pointer, the results are undefined.\n*/\nSQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,\n                           sqlite3_uint64,void(*)(void*));\nSQLITE_API void sqlite3_result_double(sqlite3_context*, double);\nSQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);\nSQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);\nSQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);\nSQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);\nSQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);\nSQLITE_API void sqlite3_result_int(sqlite3_context*, int);\nSQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);\nSQLITE_API void sqlite3_result_null(sqlite3_context*);\nSQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,\n                           void(*)(void*), unsigned char encoding);\nSQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));\nSQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));\nSQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));\nSQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);\nSQLITE_API void sqlite3_result_pointer(sqlite3_context*, void*,const char*,void(*)(void*));\nSQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);\nSQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);\n\n\n/*\n** CAPI3REF: Setting The Subtype Of An SQL Function\n** METHOD: sqlite3_context\n**\n** The sqlite3_result_subtype(C,T) function causes the subtype of\n** the result from the [application-defined SQL function] with\n** [sqlite3_context] C to be the value T.  Only the lower 8 bits\n** of the subtype T are preserved in current versions of SQLite;\n** higher order bits are discarded.\n** The number of subtype bytes preserved by SQLite might increase\n** in future releases of SQLite.\n**\n** Every [application-defined SQL function] that invokes this interface\n** should include the [SQLITE_RESULT_SUBTYPE] property in its\n** text encoding argument when the SQL function is\n** [sqlite3_create_function|registered].  If the [SQLITE_RESULT_SUBTYPE]\n** property is omitted from the function that invokes sqlite3_result_subtype(),\n** then in some cases the sqlite3_result_subtype() might fail to set\n** the result subtype.\n**\n** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any\n** SQL function that invokes the sqlite3_result_subtype() interface\n** and that does not have the SQLITE_RESULT_SUBTYPE property will raise\n** an error.  Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1\n** by default.\n*/\nSQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);\n\n/*\n** CAPI3REF: Define New Collating Sequences\n** METHOD: sqlite3\n**\n** ^These functions add, remove, or modify a [collation] associated\n** with the [database connection] specified as the first argument.\n**\n** ^The name of the collation is a UTF-8 string\n** for sqlite3_create_collation() and sqlite3_create_collation_v2()\n** and a UTF-16 string in native byte order for sqlite3_create_collation16().\n** ^Collation names that compare equal according to [sqlite3_strnicmp()] are\n** considered to be the same name.\n**\n** ^(The third argument (eTextRep) must be one of the constants:\n** <ul>\n** <li> [SQLITE_UTF8],\n** <li> [SQLITE_UTF16LE],\n** <li> [SQLITE_UTF16BE],\n** <li> [SQLITE_UTF16], or\n** <li> [SQLITE_UTF16_ALIGNED].\n** </ul>)^\n** ^The eTextRep argument determines the encoding of strings passed\n** to the collating function callback, xCompare.\n** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep\n** force strings to be UTF16 with native byte order.\n** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin\n** on an even byte address.\n**\n** ^The fourth argument, pArg, is an application data pointer that is passed\n** through as the first argument to the collating function callback.\n**\n** ^The fifth argument, xCompare, is a pointer to the collating function.\n** ^Multiple collating functions can be registered using the same name but\n** with different eTextRep parameters and SQLite will use whichever\n** function requires the least amount of data transformation.\n** ^If the xCompare argument is NULL then the collating function is\n** deleted.  ^When all collating functions having the same name are deleted,\n** that collation is no longer usable.\n**\n** ^The collating function callback is invoked with a copy of the pArg\n** application data pointer and with two strings in the encoding specified\n** by the eTextRep argument.  The two integer parameters to the collating\n** function callback are the length of the two strings, in bytes. The collating\n** function must return an integer that is negative, zero, or positive\n** if the first string is less than, equal to, or greater than the second,\n** respectively.  A collating function must always return the same answer\n** given the same inputs.  If two or more collating functions are registered\n** to the same collation name (using different eTextRep values) then all\n** must give an equivalent answer when invoked with equivalent strings.\n** The collating function must obey the following properties for all\n** strings A, B, and C:\n**\n** <ol>\n** <li> If A==B then B==A.\n** <li> If A==B and B==C then A==C.\n** <li> If A&lt;B THEN B&gt;A.\n** <li> If A&lt;B and B&lt;C then A&lt;C.\n** </ol>\n**\n** If a collating function fails any of the above constraints and that\n** collating function is registered and used, then the behavior of SQLite\n** is undefined.\n**\n** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()\n** with the addition that the xDestroy callback is invoked on pArg when\n** the collating function is deleted.\n** ^Collating functions are deleted when they are overridden by later\n** calls to the collation creation functions or when the\n** [database connection] is closed using [sqlite3_close()].\n**\n** ^The xDestroy callback is <u>not</u> called if the\n** sqlite3_create_collation_v2() function fails.  Applications that invoke\n** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should\n** check the return code and dispose of the application data pointer\n** themselves rather than expecting SQLite to deal with it for them.\n** This is different from every other SQLite interface.  The inconsistency\n** is unfortunate but cannot be changed without breaking backwards\n** compatibility.\n**\n** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].\n*/\nSQLITE_API int sqlite3_create_collation(\n  sqlite3*,\n  const char *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n);\nSQLITE_API int sqlite3_create_collation_v2(\n  sqlite3*,\n  const char *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*),\n  void(*xDestroy)(void*)\n);\nSQLITE_API int sqlite3_create_collation16(\n  sqlite3*,\n  const void *zName,\n  int eTextRep,\n  void *pArg,\n  int(*xCompare)(void*,int,const void*,int,const void*)\n);\n\n/*\n** CAPI3REF: Collation Needed Callbacks\n** METHOD: sqlite3\n**\n** ^To avoid having to register all collation sequences before a database\n** can be used, a single callback function may be registered with the\n** [database connection] to be invoked whenever an undefined collation\n** sequence is required.\n**\n** ^If the function is registered using the sqlite3_collation_needed() API,\n** then it is passed the names of undefined collation sequences as strings\n** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,\n** the names are passed as UTF-16 in machine native byte order.\n** ^A call to either function replaces the existing collation-needed callback.\n**\n** ^(When the callback is invoked, the first argument passed is a copy\n** of the second argument to sqlite3_collation_needed() or\n** sqlite3_collation_needed16().  The second argument is the database\n** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],\n** or [SQLITE_UTF16LE], indicating the most desirable form of the collation\n** sequence function required.  The fourth parameter is the name of the\n** required collation sequence.)^\n**\n** The callback function should register the desired collation using\n** [sqlite3_create_collation()], [sqlite3_create_collation16()], or\n** [sqlite3_create_collation_v2()].\n*/\nSQLITE_API int sqlite3_collation_needed(\n  sqlite3*,\n  void*,\n  void(*)(void*,sqlite3*,int eTextRep,const char*)\n);\nSQLITE_API int sqlite3_collation_needed16(\n  sqlite3*,\n  void*,\n  void(*)(void*,sqlite3*,int eTextRep,const void*)\n);\n\n#ifdef SQLITE_ENABLE_CEROD\n/*\n** Specify the activation key for a CEROD database.  Unless\n** activated, none of the CEROD routines will work.\n*/\nSQLITE_API void sqlite3_activate_cerod(\n  const char *zPassPhrase        /* Activation phrase */\n);\n#endif\n\n/*\n** CAPI3REF: Suspend Execution For A Short Time\n**\n** The sqlite3_sleep() function causes the current thread to suspend execution\n** for at least a number of milliseconds specified in its parameter.\n**\n** If the operating system does not support sleep requests with\n** millisecond time resolution, then the time will be rounded up to\n** the nearest second. The number of milliseconds of sleep actually\n** requested from the operating system is returned.\n**\n** ^SQLite implements this interface by calling the xSleep()\n** method of the default [sqlite3_vfs] object.  If the xSleep() method\n** of the default VFS is not implemented correctly, or not implemented at\n** all, then the behavior of sqlite3_sleep() may deviate from the description\n** in the previous paragraphs.\n**\n** If a negative argument is passed to sqlite3_sleep() the results vary by\n** VFS and operating system.  Some system treat a negative argument as an\n** instruction to sleep forever.  Others understand it to mean do not sleep\n** at all. ^In SQLite version 3.42.0 and later, a negative\n** argument passed into sqlite3_sleep() is changed to zero before it is relayed\n** down into the xSleep method of the VFS.\n*/\nSQLITE_API int sqlite3_sleep(int);\n\n/*\n** CAPI3REF: Name Of The Folder Holding Temporary Files\n**\n** ^(If this global variable is made to point to a string which is\n** the name of a folder (a.k.a. directory), then all temporary files\n** created by SQLite when using a built-in [sqlite3_vfs | VFS]\n** will be placed in that directory.)^  ^If this variable\n** is a NULL pointer, then SQLite performs a search for an appropriate\n** temporary file directory.\n**\n** Applications are strongly discouraged from using this global variable.\n** It is required to set a temporary folder on Windows Runtime (WinRT).\n** But for all other platforms, it is highly recommended that applications\n** neither read nor write this variable.  This global variable is a relic\n** that exists for backwards compatibility of legacy applications and should\n** be avoided in new projects.\n**\n** It is not safe to read or modify this variable in more than one\n** thread at a time.  It is not safe to read or modify this variable\n** if a [database connection] is being used at the same time in a separate\n** thread.\n** It is intended that this variable be set once\n** as part of process initialization and before any SQLite interface\n** routines have been called and that this variable remain unchanged\n** thereafter.\n**\n** ^The [temp_store_directory pragma] may modify this variable and cause\n** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,\n** the [temp_store_directory pragma] always assumes that any string\n** that this variable points to is held in memory obtained from\n** [sqlite3_malloc] and the pragma may attempt to free that memory\n** using [sqlite3_free].\n** Hence, if this variable is modified directly, either it should be\n** made NULL or made to point to memory obtained from [sqlite3_malloc]\n** or else the use of the [temp_store_directory pragma] should be avoided.\n** Except when requested by the [temp_store_directory pragma], SQLite\n** does not free the memory that sqlite3_temp_directory points to.  If\n** the application wants that memory to be freed, it must do\n** so itself, taking care to only do so after all [database connection]\n** objects have been destroyed.\n**\n** <b>Note to Windows Runtime users:</b>  The temporary directory must be set\n** prior to calling [sqlite3_open] or [sqlite3_open_v2].  Otherwise, various\n** features that require the use of temporary files may fail.  Here is an\n** example of how to do this using C++ with the Windows Runtime:\n**\n** <blockquote><pre>\n** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->\n** &nbsp;     TemporaryFolder->Path->Data();\n** char zPathBuf&#91;MAX_PATH + 1&#93;;\n** memset(zPathBuf, 0, sizeof(zPathBuf));\n** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),\n** &nbsp;     NULL, NULL);\n** sqlite3_temp_directory = sqlite3_mprintf(\"%s\", zPathBuf);\n** </pre></blockquote>\n*/\nSQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;\n\n/*\n** CAPI3REF: Name Of The Folder Holding Database Files\n**\n** ^(If this global variable is made to point to a string which is\n** the name of a folder (a.k.a. directory), then all database files\n** specified with a relative pathname and created or accessed by\n** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed\n** to be relative to that directory.)^ ^If this variable is a NULL\n** pointer, then SQLite assumes that all database files specified\n** with a relative pathname are relative to the current directory\n** for the process.  Only the windows VFS makes use of this global\n** variable; it is ignored by the unix VFS.\n**\n** Changing the value of this variable while a database connection is\n** open can result in a corrupt database.\n**\n** It is not safe to read or modify this variable in more than one\n** thread at a time.  It is not safe to read or modify this variable\n** if a [database connection] is being used at the same time in a separate\n** thread.\n** It is intended that this variable be set once\n** as part of process initialization and before any SQLite interface\n** routines have been called and that this variable remain unchanged\n** thereafter.\n**\n** ^The [data_store_directory pragma] may modify this variable and cause\n** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,\n** the [data_store_directory pragma] always assumes that any string\n** that this variable points to is held in memory obtained from\n** [sqlite3_malloc] and the pragma may attempt to free that memory\n** using [sqlite3_free].\n** Hence, if this variable is modified directly, either it should be\n** made NULL or made to point to memory obtained from [sqlite3_malloc]\n** or else the use of the [data_store_directory pragma] should be avoided.\n*/\nSQLITE_API SQLITE_EXTERN char *sqlite3_data_directory;\n\n/*\n** CAPI3REF: Win32 Specific Interface\n**\n** These interfaces are available only on Windows.  The\n** [sqlite3_win32_set_directory] interface is used to set the value associated\n** with the [sqlite3_temp_directory] or [sqlite3_data_directory] variable, to\n** zValue, depending on the value of the type parameter.  The zValue parameter\n** should be NULL to cause the previous value to be freed via [sqlite3_free];\n** a non-NULL value will be copied into memory obtained from [sqlite3_malloc]\n** prior to being used.  The [sqlite3_win32_set_directory] interface returns\n** [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported,\n** or [SQLITE_NOMEM] if memory could not be allocated.  The value of the\n** [sqlite3_data_directory] variable is intended to act as a replacement for\n** the current directory on the sub-platforms of Win32 where that concept is\n** not present, e.g. WinRT and UWP.  The [sqlite3_win32_set_directory8] and\n** [sqlite3_win32_set_directory16] interfaces behave exactly the same as the\n** sqlite3_win32_set_directory interface except the string parameter must be\n** UTF-8 or UTF-16, respectively.\n*/\nSQLITE_API int sqlite3_win32_set_directory(\n  unsigned long type, /* Identifier for directory being set or reset */\n  void *zValue        /* New value for directory being set or reset */\n);\nSQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);\nSQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);\n\n/*\n** CAPI3REF: Win32 Directory Types\n**\n** These macros are only available on Windows.  They define the allowed values\n** for the type argument to the [sqlite3_win32_set_directory] interface.\n*/\n#define SQLITE_WIN32_DATA_DIRECTORY_TYPE  1\n#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE  2\n\n/*\n** CAPI3REF: Test For Auto-Commit Mode\n** KEYWORDS: {autocommit mode}\n** METHOD: sqlite3\n**\n** ^The sqlite3_get_autocommit() interface returns non-zero or\n** zero if the given database connection is or is not in autocommit mode,\n** respectively.  ^Autocommit mode is on by default.\n** ^Autocommit mode is disabled by a [BEGIN] statement.\n** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].\n**\n** If certain kinds of errors occur on a statement within a multi-statement\n** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],\n** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the\n** transaction might be rolled back automatically.  The only way to\n** find out whether SQLite automatically rolled back the transaction after\n** an error is to use this function.\n**\n** If another thread changes the autocommit status of the database\n** connection while this routine is running, then the return value\n** is undefined.\n*/\nSQLITE_API int sqlite3_get_autocommit(sqlite3*);\n\n/*\n** CAPI3REF: Find The Database Handle Of A Prepared Statement\n** METHOD: sqlite3_stmt\n**\n** ^The sqlite3_db_handle interface returns the [database connection] handle\n** to which a [prepared statement] belongs.  ^The [database connection]\n** returned by sqlite3_db_handle is the same [database connection]\n** that was the first argument\n** to the [sqlite3_prepare_v2()] call (or its variants) that was used to\n** create the statement in the first place.\n*/\nSQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Return The Schema Name For A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name\n** for the N-th database on database connection D, or a NULL pointer if N is\n** out of range.  An N value of 0 means the main database file.  An N of 1 is\n** the \"temp\" schema.  Larger values of N correspond to various ATTACH-ed\n** databases.\n**\n** Space to hold the string that is returned by sqlite3_db_name() is managed\n** by SQLite itself.  The string might be deallocated by any operation that\n** changes the schema, including [ATTACH] or [DETACH] or calls to\n** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that\n** occur on a different thread.  Applications that need to\n** remember the string long-term should make their own copy.  Applications that\n** are accessing the same database connection simultaneously on multiple\n** threads should mutex-protect calls to this API and should make their own\n** private copy of the result prior to releasing the mutex.\n*/\nSQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);\n\n/*\n** CAPI3REF: Return The Filename For A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_filename(D,N) interface returns a pointer to the filename\n** associated with database N of connection D.\n** ^If there is no attached database N on the database\n** connection D, or if database N is a temporary or in-memory database, then\n** this function will return either a NULL pointer or an empty string.\n**\n** ^The string value returned by this routine is owned and managed by\n** the database connection.  ^The value will be valid until the database N\n** is [DETACH]-ed or until the database connection closes.\n**\n** ^The filename returned by this function is the output of the\n** xFullPathname method of the [VFS].  ^In other words, the filename\n** will be an absolute pathname, even if the filename used\n** to open the database originally was a URI or relative pathname.\n**\n** If the filename pointer returned by this routine is not NULL, then it\n** can be used as the filename input parameter to these routines:\n** <ul>\n** <li> [sqlite3_uri_parameter()]\n** <li> [sqlite3_uri_boolean()]\n** <li> [sqlite3_uri_int64()]\n** <li> [sqlite3_filename_database()]\n** <li> [sqlite3_filename_journal()]\n** <li> [sqlite3_filename_wal()]\n** </ul>\n*/\nSQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName);\n\n/*\n** CAPI3REF: Determine if a database is read-only\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N\n** of connection D is read-only, 0 if it is read/write, or -1 if N is not\n** the name of a database on connection D.\n*/\nSQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);\n\n/*\n** CAPI3REF: Determine the transaction state of a database\n** METHOD: sqlite3\n**\n** ^The sqlite3_txn_state(D,S) interface returns the current\n** [transaction state] of schema S in database connection D.  ^If S is NULL,\n** then the highest transaction state of any schema on database connection D\n** is returned.  Transaction states are (in order of lowest to highest):\n** <ol>\n** <li value=\"0\"> SQLITE_TXN_NONE\n** <li value=\"1\"> SQLITE_TXN_READ\n** <li value=\"2\"> SQLITE_TXN_WRITE\n** </ol>\n** ^If the S argument to sqlite3_txn_state(D,S) is not the name of\n** a valid schema, then -1 is returned.\n*/\nSQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);\n\n/*\n** CAPI3REF: Allowed return values from sqlite3_txn_state()\n** KEYWORDS: {transaction state}\n**\n** These constants define the current transaction state of a database file.\n** ^The [sqlite3_txn_state(D,S)] interface returns one of these\n** constants in order to describe the transaction state of schema S\n** in [database connection] D.\n**\n** <dl>\n** [[SQLITE_TXN_NONE]] <dt>SQLITE_TXN_NONE</dt>\n** <dd>The SQLITE_TXN_NONE state means that no transaction is currently\n** pending.</dd>\n**\n** [[SQLITE_TXN_READ]] <dt>SQLITE_TXN_READ</dt>\n** <dd>The SQLITE_TXN_READ state means that the database is currently\n** in a read transaction.  Content has been read from the database file\n** but nothing in the database file has changed.  The transaction state\n** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are\n** no other conflicting concurrent write transactions.  The transaction\n** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or\n** [COMMIT].</dd>\n**\n** [[SQLITE_TXN_WRITE]] <dt>SQLITE_TXN_WRITE</dt>\n** <dd>The SQLITE_TXN_WRITE state means that the database is currently\n** in a write transaction.  Content has been written to the database file\n** but has not yet committed.  The transaction state will change to\n** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>\n*/\n#define SQLITE_TXN_NONE  0\n#define SQLITE_TXN_READ  1\n#define SQLITE_TXN_WRITE 2\n\n/*\n** CAPI3REF: Find the next prepared statement\n** METHOD: sqlite3\n**\n** ^This interface returns a pointer to the next [prepared statement] after\n** pStmt associated with the [database connection] pDb.  ^If pStmt is NULL\n** then this interface returns a pointer to the first prepared statement\n** associated with the database connection pDb.  ^If no prepared statement\n** satisfies the conditions of this routine, it returns NULL.\n**\n** The [database connection] pointer D in a call to\n** [sqlite3_next_stmt(D,S)] must refer to an open database\n** connection and in particular must not be a NULL pointer.\n*/\nSQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);\n\n/*\n** CAPI3REF: Commit And Rollback Notification Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_commit_hook() interface registers a callback\n** function to be invoked whenever a transaction is [COMMIT | committed].\n** ^Any callback set by a previous call to sqlite3_commit_hook()\n** for the same database connection is overridden.\n** ^The sqlite3_rollback_hook() interface registers a callback\n** function to be invoked whenever a transaction is [ROLLBACK | rolled back].\n** ^Any callback set by a previous call to sqlite3_rollback_hook()\n** for the same database connection is overridden.\n** ^The pArg argument is passed through to the callback.\n** ^If the callback on a commit hook function returns non-zero,\n** then the commit is converted into a rollback.\n**\n** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions\n** return the P argument from the previous call of the same function\n** on the same [database connection] D, or NULL for\n** the first call for each function on D.\n**\n** The commit and rollback hook callbacks are not reentrant.\n** The callback implementation must not do anything that will modify\n** the database connection that invoked the callback.  Any actions\n** to modify the database connection must be deferred until after the\n** completion of the [sqlite3_step()] call that triggered the commit\n** or rollback hook in the first place.\n** Note that running any other SQL statements, including SELECT statements,\n** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify\n** the database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^Registering a NULL function disables the callback.\n**\n** ^When the commit hook callback routine returns zero, the [COMMIT]\n** operation is allowed to continue normally.  ^If the commit hook\n** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].\n** ^The rollback hook is invoked on a rollback that results from a commit\n** hook returning non-zero, just as it would be with any other rollback.\n**\n** ^For the purposes of this API, a transaction is said to have been\n** rolled back if an explicit \"ROLLBACK\" statement is executed, or\n** an error or constraint causes an implicit rollback to occur.\n** ^The rollback callback is not invoked if a transaction is\n** automatically rolled back because the database connection is closed.\n**\n** See also the [sqlite3_update_hook()] interface.\n*/\nSQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);\nSQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);\n\n/*\n** CAPI3REF: Autovacuum Compaction Amount Callback\n** METHOD: sqlite3\n**\n** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback\n** function C that is invoked prior to each autovacuum of the database\n** file.  ^The callback is passed a copy of the generic data pointer (P),\n** the schema-name of the attached database that is being autovacuumed,\n** the size of the database file in pages, the number of free pages,\n** and the number of bytes per page, respectively.  The callback should\n** return the number of free pages that should be removed by the\n** autovacuum.  ^If the callback returns zero, then no autovacuum happens.\n** ^If the value returned is greater than or equal to the number of\n** free pages, then a complete autovacuum happens.\n**\n** <p>^If there are multiple ATTACH-ed database files that are being\n** modified as part of a transaction commit, then the autovacuum pages\n** callback is invoked separately for each file.\n**\n** <p><b>The callback is not reentrant.</b> The callback function should\n** not attempt to invoke any other SQLite interface.  If it does, bad\n** things may happen, including segmentation faults and corrupt database\n** files.  The callback function should be a simple function that\n** does some arithmetic on its input parameters and returns a result.\n**\n** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional\n** destructor for the P parameter.  ^If X is not NULL, then X(P) is\n** invoked whenever the database connection closes or when the callback\n** is overwritten by another invocation of sqlite3_autovacuum_pages().\n**\n** <p>^There is only one autovacuum pages callback per database connection.\n** ^Each call to the sqlite3_autovacuum_pages() interface overrides all\n** previous invocations for that database connection.  ^If the callback\n** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,\n** then the autovacuum steps callback is canceled.  The return value\n** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might\n** be some other error code if something goes wrong.  The current\n** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other\n** return codes might be added in future releases.\n**\n** <p>If no autovacuum pages callback is specified (the usual case) or\n** a NULL pointer is provided for the callback,\n** then the default behavior is to vacuum all free pages.  So, in other\n** words, the default behavior is the same as if the callback function\n** were something like this:\n**\n** <blockquote><pre>\n** &nbsp;   unsigned int demonstration_autovac_pages_callback(\n** &nbsp;     void *pClientData,\n** &nbsp;     const char *zSchema,\n** &nbsp;     unsigned int nDbPage,\n** &nbsp;     unsigned int nFreePage,\n** &nbsp;     unsigned int nBytePerPage\n** &nbsp;   ){\n** &nbsp;     return nFreePage;\n** &nbsp;   }\n** </pre></blockquote>\n*/\nSQLITE_API int sqlite3_autovacuum_pages(\n  sqlite3 *db,\n  unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),\n  void*,\n  void(*)(void*)\n);\n\n\n/*\n** CAPI3REF: Data Change Notification Callbacks\n** METHOD: sqlite3\n**\n** ^The sqlite3_update_hook() interface registers a callback function\n** with the [database connection] identified by the first argument\n** to be invoked whenever a row is updated, inserted or deleted in\n** a [rowid table].\n** ^Any callback set by a previous call to this function\n** for the same database connection is overridden.\n**\n** ^The second argument is a pointer to the function to invoke when a\n** row is updated, inserted or deleted in a rowid table.\n** ^The update hook is disabled by invoking sqlite3_update_hook()\n** with a NULL pointer as the second parameter.\n** ^The first argument to the callback is a copy of the third argument\n** to sqlite3_update_hook().\n** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],\n** or [SQLITE_UPDATE], depending on the operation that caused the callback\n** to be invoked.\n** ^The third and fourth arguments to the callback contain pointers to the\n** database and table name containing the affected row.\n** ^The final callback parameter is the [rowid] of the row.\n** ^In the case of an update, this is the [rowid] after the update takes place.\n**\n** ^(The update hook is not invoked when internal system tables are\n** modified (i.e. sqlite_sequence).)^\n** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified.\n**\n** ^In the current implementation, the update hook\n** is not invoked when conflicting rows are deleted because of an\n** [ON CONFLICT | ON CONFLICT REPLACE] clause.  ^Nor is the update hook\n** invoked when rows are deleted using the [truncate optimization].\n** The exceptions defined in this paragraph might change in a future\n** release of SQLite.\n**\n** Whether the update hook is invoked before or after the\n** corresponding change is currently unspecified and may differ\n** depending on the type of change. Do not rely on the order of the\n** hook call with regards to the final result of the operation which\n** triggers the hook.\n**\n** The update hook implementation must not do anything that will modify\n** the database connection that invoked the update hook.  Any actions\n** to modify the database connection must be deferred until after the\n** completion of the [sqlite3_step()] call that triggered the update hook.\n** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n** database connections for the meaning of \"modify\" in this paragraph.\n**\n** ^The sqlite3_update_hook(D,C,P) function\n** returns the P argument from the previous call\n** on the same [database connection] D, or NULL for\n** the first call on D.\n**\n** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],\n** and [sqlite3_preupdate_hook()] interfaces.\n*/\nSQLITE_API void *sqlite3_update_hook(\n  sqlite3*,\n  void(*)(void *,int ,char const *,char const *,sqlite3_int64),\n  void*\n);\n\n/*\n** CAPI3REF: Enable Or Disable Shared Pager Cache\n**\n** ^(This routine enables or disables the sharing of the database cache\n** and schema data structures between [database connection | connections]\n** to the same database. Sharing is enabled if the argument is true\n** and disabled if the argument is false.)^\n**\n** This interface is omitted if SQLite is compiled with\n** [-DSQLITE_OMIT_SHARED_CACHE].  The [-DSQLITE_OMIT_SHARED_CACHE]\n** compile-time option is recommended because the\n** [use of shared cache mode is discouraged].\n**\n** ^Cache sharing is enabled and disabled for an entire process.\n** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]).\n** In prior versions of SQLite,\n** sharing was enabled or disabled for each thread separately.\n**\n** ^(The cache sharing mode set by this interface effects all subsequent\n** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].\n** Existing database connections continue to use the sharing mode\n** that was in effect at the time they were opened.)^\n**\n** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled\n** successfully.  An [error code] is returned otherwise.)^\n**\n** ^Shared cache is disabled by default. It is recommended that it stay\n** that way.  In other words, do not use this routine.  This interface\n** continues to be provided for historical compatibility, but its use is\n** discouraged.  Any use of shared cache is discouraged.  If shared cache\n** must be used, it is recommended that shared cache only be enabled for\n** individual database connections using the [sqlite3_open_v2()] interface\n** with the [SQLITE_OPEN_SHAREDCACHE] flag.\n**\n** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0\n** and will always return SQLITE_MISUSE. On those systems,\n** shared cache mode should be enabled per-database connection via\n** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE].\n**\n** This interface is threadsafe on processors where writing a\n** 32-bit integer is atomic.\n**\n** See Also:  [SQLite Shared-Cache Mode]\n*/\nSQLITE_API int sqlite3_enable_shared_cache(int);\n\n/*\n** CAPI3REF: Attempt To Free Heap Memory\n**\n** ^The sqlite3_release_memory() interface attempts to free N bytes\n** of heap memory by deallocating non-essential memory allocations\n** held by the database library.   Memory used to cache database\n** pages to improve performance is an example of non-essential memory.\n** ^sqlite3_release_memory() returns the number of bytes actually freed,\n** which might be more or less than the amount requested.\n** ^The sqlite3_release_memory() routine is a no-op returning zero\n** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].\n**\n** See also: [sqlite3_db_release_memory()]\n*/\nSQLITE_API int sqlite3_release_memory(int);\n\n/*\n** CAPI3REF: Free Memory Used By A Database Connection\n** METHOD: sqlite3\n**\n** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap\n** memory as possible from database connection D. Unlike the\n** [sqlite3_release_memory()] interface, this interface is in effect even\n** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is\n** omitted.\n**\n** See also: [sqlite3_release_memory()]\n*/\nSQLITE_API int sqlite3_db_release_memory(sqlite3*);\n\n/*\n** CAPI3REF: Impose A Limit On Heap Size\n**\n** These interfaces impose limits on the amount of heap memory that will be\n** used by all database connections within a single process.\n**\n** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the\n** soft limit on the amount of heap memory that may be allocated by SQLite.\n** ^SQLite strives to keep heap memory utilization below the soft heap\n** limit by reducing the number of pages held in the page cache\n** as heap memory usages approaches the limit.\n** ^The soft heap limit is \"soft\" because even though SQLite strives to stay\n** below the limit, it will exceed the limit rather than generate\n** an [SQLITE_NOMEM] error.  In other words, the soft heap limit\n** is advisory only.\n**\n** ^The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of\n** N bytes on the amount of memory that will be allocated.  ^The\n** sqlite3_hard_heap_limit64(N) interface is similar to\n** sqlite3_soft_heap_limit64(N) except that memory allocations will fail\n** when the hard heap limit is reached.\n**\n** ^The return value from both sqlite3_soft_heap_limit64() and\n** sqlite3_hard_heap_limit64() is the size of\n** the heap limit prior to the call, or negative in the case of an\n** error.  ^If the argument N is negative\n** then no change is made to the heap limit.  Hence, the current\n** size of heap limits can be determined by invoking\n** sqlite3_soft_heap_limit64(-1) or sqlite3_hard_heap_limit(-1).\n**\n** ^Setting the heap limits to zero disables the heap limiter mechanism.\n**\n** ^The soft heap limit may not be greater than the hard heap limit.\n** ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N)\n** is invoked with a value of N that is greater than the hard heap limit,\n** the soft heap limit is set to the value of the hard heap limit.\n** ^The soft heap limit is automatically enabled whenever the hard heap\n** limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and\n** the soft heap limit is outside the range of 1..N, then the soft heap\n** limit is set to N.  ^Invoking sqlite3_soft_heap_limit64(0) when the\n** hard heap limit is enabled makes the soft heap limit equal to the\n** hard heap limit.\n**\n** The memory allocation limits can also be adjusted using\n** [PRAGMA soft_heap_limit] and [PRAGMA hard_heap_limit].\n**\n** ^(The heap limits are not enforced in the current implementation\n** if one or more of following conditions are true:\n**\n** <ul>\n** <li> The limit value is set to zero.\n** <li> Memory accounting is disabled using a combination of the\n**      [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and\n**      the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.\n** <li> An alternative page cache implementation is specified using\n**      [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...).\n** <li> The page cache allocates from its own memory pool supplied\n**      by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than\n**      from the heap.\n** </ul>)^\n**\n** The circumstances under which SQLite will enforce the heap limits may\n** change in future releases of SQLite.\n*/\nSQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);\nSQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);\n\n/*\n** CAPI3REF: Deprecated Soft Heap Limit Interface\n** DEPRECATED\n**\n** This is a deprecated version of the [sqlite3_soft_heap_limit64()]\n** interface.  This routine is provided for historical compatibility\n** only.  All new applications should use the\n** [sqlite3_soft_heap_limit64()] interface rather than this one.\n*/\nSQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);\n\n\n/*\n** CAPI3REF: Extract Metadata About A Column Of A Table\n** METHOD: sqlite3\n**\n** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns\n** information about column C of table T in database D\n** on [database connection] X.)^  ^The sqlite3_table_column_metadata()\n** interface returns SQLITE_OK and fills in the non-NULL pointers in\n** the final five arguments with appropriate values if the specified\n** column exists.  ^The sqlite3_table_column_metadata() interface returns\n** SQLITE_ERROR if the specified column does not exist.\n** ^If the column-name parameter to sqlite3_table_column_metadata() is a\n** NULL pointer, then this routine simply checks for the existence of the\n** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it\n** does not.  If the table name parameter T in a call to\n** sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is\n** undefined behavior.\n**\n** ^The column is identified by the second, third and fourth parameters to\n** this function. ^(The second parameter is either the name of the database\n** (i.e. \"main\", \"temp\", or an attached database) containing the specified\n** table or NULL.)^ ^If it is NULL, then all attached databases are searched\n** for the table using the same algorithm used by the database engine to\n** resolve unqualified table references.\n**\n** ^The third and fourth parameters to this function are the table and column\n** name of the desired column, respectively.\n**\n** ^Metadata is returned by writing to the memory locations passed as the 5th\n** and subsequent parameters to this function. ^Any of these arguments may be\n** NULL, in which case the corresponding element of metadata is omitted.\n**\n** ^(<blockquote>\n** <table border=\"1\">\n** <tr><th> Parameter <th> Output<br>Type <th>  Description\n**\n** <tr><td> 5th <td> const char* <td> Data type\n** <tr><td> 6th <td> const char* <td> Name of default collation sequence\n** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint\n** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY\n** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]\n** </table>\n** </blockquote>)^\n**\n** ^The memory pointed to by the character pointers returned for the\n** declaration type and collation sequence is valid until the next\n** call to any SQLite API function.\n**\n** ^If the specified table is actually a view, an [error code] is returned.\n**\n** ^If the specified column is \"rowid\", \"oid\" or \"_rowid_\" and the table\n** is not a [WITHOUT ROWID] table and an\n** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output\n** parameters are set for the explicitly declared column. ^(If there is no\n** [INTEGER PRIMARY KEY] column, then the outputs\n** for the [rowid] are set as follows:\n**\n** <pre>\n**     data type: \"INTEGER\"\n**     collation sequence: \"BINARY\"\n**     not null: 0\n**     primary key: 1\n**     auto increment: 0\n** </pre>)^\n**\n** ^This function causes all database schemas to be read from disk and\n** parsed, if that has not already been done, and returns an error if\n** any errors are encountered while loading the schema.\n*/\nSQLITE_API int sqlite3_table_column_metadata(\n  sqlite3 *db,                /* Connection handle */\n  const char *zDbName,        /* Database name or NULL */\n  const char *zTableName,     /* Table name */\n  const char *zColumnName,    /* Column name */\n  char const **pzDataType,    /* OUTPUT: Declared data type */\n  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */\n  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */\n  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */\n  int *pAutoinc               /* OUTPUT: True if column is auto-increment */\n);\n\n/*\n** CAPI3REF: Load An Extension\n** METHOD: sqlite3\n**\n** ^This interface loads an SQLite extension library from the named file.\n**\n** ^The sqlite3_load_extension() interface attempts to load an\n** [SQLite extension] library contained in the file zFile.  If\n** the file cannot be loaded directly, attempts are made to load\n** with various operating-system specific extensions added.\n** So for example, if \"samplelib\" cannot be loaded, then names like\n** \"samplelib.so\" or \"samplelib.dylib\" or \"samplelib.dll\" might\n** be tried also.\n**\n** ^The entry point is zProc.\n** ^(zProc may be 0, in which case SQLite will try to come up with an\n** entry point name on its own.  It first tries \"sqlite3_extension_init\".\n** If that does not work, it constructs a name \"sqlite3_X_init\" where\n** X consists of the lower-case equivalent of all ASCII alphabetic\n** characters in the filename from the last \"/\" to the first following\n** \".\" and omitting any initial \"lib\".)^\n** ^The sqlite3_load_extension() interface returns\n** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.\n** ^If an error occurs and pzErrMsg is not 0, then the\n** [sqlite3_load_extension()] interface shall attempt to\n** fill *pzErrMsg with error message text stored in memory\n** obtained from [sqlite3_malloc()]. The calling function\n** should free this memory by calling [sqlite3_free()].\n**\n** ^Extension loading must be enabled using\n** [sqlite3_enable_load_extension()] or\n** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)\n** prior to calling this API,\n** otherwise an error will be returned.\n**\n** <b>Security warning:</b> It is recommended that the\n** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this\n** interface.  The use of the [sqlite3_enable_load_extension()] interface\n** should be avoided.  This will keep the SQL function [load_extension()]\n** disabled and prevent SQL injections from giving attackers\n** access to extension loading capabilities.\n**\n** See also the [load_extension() SQL function].\n*/\nSQLITE_API int sqlite3_load_extension(\n  sqlite3 *db,          /* Load the extension into this database connection */\n  const char *zFile,    /* Name of the shared library containing extension */\n  const char *zProc,    /* Entry point.  Derived from zFile if 0 */\n  char **pzErrMsg       /* Put error message here if not 0 */\n);\n\n/*\n** CAPI3REF: Enable Or Disable Extension Loading\n** METHOD: sqlite3\n**\n** ^So as not to open security holes in older applications that are\n** unprepared to deal with [extension loading], and as a means of disabling\n** [extension loading] while evaluating user-entered SQL, the following API\n** is provided to turn the [sqlite3_load_extension()] mechanism on and off.\n**\n** ^Extension loading is off by default.\n** ^Call the sqlite3_enable_load_extension() routine with onoff==1\n** to turn extension loading on and call it with onoff==0 to turn\n** it back off again.\n**\n** ^This interface enables or disables both the C-API\n** [sqlite3_load_extension()] and the SQL function [load_extension()].\n** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)\n** to enable or disable only the C-API.)^\n**\n** <b>Security warning:</b> It is recommended that extension loading\n** be enabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method\n** rather than this interface, so the [load_extension()] SQL function\n** remains disabled. This will prevent SQL injections from giving attackers\n** access to extension loading capabilities.\n*/\nSQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);\n\n/*\n** CAPI3REF: Automatically Load Statically Linked Extensions\n**\n** ^This interface causes the xEntryPoint() function to be invoked for\n** each new [database connection] that is created.  The idea here is that\n** xEntryPoint() is the entry point for a statically linked [SQLite extension]\n** that is to be automatically loaded into all new database connections.\n**\n** ^(Even though the function prototype shows that xEntryPoint() takes\n** no arguments and returns void, SQLite invokes xEntryPoint() with three\n** arguments and expects an integer result as if the signature of the\n** entry point were as follows:\n**\n** <blockquote><pre>\n** &nbsp;  int xEntryPoint(\n** &nbsp;    sqlite3 *db,\n** &nbsp;    const char **pzErrMsg,\n** &nbsp;    const struct sqlite3_api_routines *pThunk\n** &nbsp;  );\n** </pre></blockquote>)^\n**\n** If the xEntryPoint routine encounters an error, it should make *pzErrMsg\n** point to an appropriate error message (obtained from [sqlite3_mprintf()])\n** and return an appropriate [error code].  ^SQLite ensures that *pzErrMsg\n** is NULL before calling the xEntryPoint().  ^SQLite will invoke\n** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns.  ^If any\n** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],\n** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.\n**\n** ^Calling sqlite3_auto_extension(X) with an entry point X that is already\n** on the list of automatic extensions is a harmless no-op. ^No entry point\n** will be called more than once for each database connection that is opened.\n**\n** See also: [sqlite3_reset_auto_extension()]\n** and [sqlite3_cancel_auto_extension()]\n*/\nSQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));\n\n/*\n** CAPI3REF: Cancel Automatic Extension Loading\n**\n** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the\n** initialization routine X that was registered using a prior call to\n** [sqlite3_auto_extension(X)].  ^The [sqlite3_cancel_auto_extension(X)]\n** routine returns 1 if initialization routine X was successfully\n** unregistered and it returns 0 if X was not on the list of initialization\n** routines.\n*/\nSQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));\n\n/*\n** CAPI3REF: Reset Automatic Extension Loading\n**\n** ^This interface disables all automatic extensions previously\n** registered using [sqlite3_auto_extension()].\n*/\nSQLITE_API void sqlite3_reset_auto_extension(void);\n\n/*\n** Structures used by the virtual table interface\n*/\ntypedef struct sqlite3_vtab sqlite3_vtab;\ntypedef struct sqlite3_index_info sqlite3_index_info;\ntypedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;\ntypedef struct sqlite3_module sqlite3_module;\n\n/*\n** CAPI3REF: Virtual Table Object\n** KEYWORDS: sqlite3_module {virtual table module}\n**\n** This structure, sometimes called a \"virtual table module\",\n** defines the implementation of a [virtual table].\n** This structure consists mostly of methods for the module.\n**\n** ^A virtual table module is created by filling in a persistent\n** instance of this structure and passing a pointer to that instance\n** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].\n** ^The registration remains valid until it is replaced by a different\n** module or until the [database connection] closes.  The content\n** of this structure must not change while it is registered with\n** any database connection.\n*/\nstruct sqlite3_module {\n  int iVersion;\n  int (*xCreate)(sqlite3*, void *pAux,\n               int argc, const char *const*argv,\n               sqlite3_vtab **ppVTab, char**);\n  int (*xConnect)(sqlite3*, void *pAux,\n               int argc, const char *const*argv,\n               sqlite3_vtab **ppVTab, char**);\n  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);\n  int (*xDisconnect)(sqlite3_vtab *pVTab);\n  int (*xDestroy)(sqlite3_vtab *pVTab);\n  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);\n  int (*xClose)(sqlite3_vtab_cursor*);\n  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,\n                int argc, sqlite3_value **argv);\n  int (*xNext)(sqlite3_vtab_cursor*);\n  int (*xEof)(sqlite3_vtab_cursor*);\n  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);\n  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);\n  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);\n  int (*xBegin)(sqlite3_vtab *pVTab);\n  int (*xSync)(sqlite3_vtab *pVTab);\n  int (*xCommit)(sqlite3_vtab *pVTab);\n  int (*xRollback)(sqlite3_vtab *pVTab);\n  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,\n                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),\n                       void **ppArg);\n  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);\n  /* The methods above are in version 1 of the sqlite_module object. Those\n  ** below are for version 2 and greater. */\n  int (*xSavepoint)(sqlite3_vtab *pVTab, int);\n  int (*xRelease)(sqlite3_vtab *pVTab, int);\n  int (*xRollbackTo)(sqlite3_vtab *pVTab, int);\n  /* The methods above are in versions 1 and 2 of the sqlite_module object.\n  ** Those below are for version 3 and greater. */\n  int (*xShadowName)(const char*);\n  /* The methods above are in versions 1 through 3 of the sqlite_module object.\n  ** Those below are for version 4 and greater. */\n  int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,\n                    const char *zTabName, int mFlags, char **pzErr);\n};\n\n/*\n** CAPI3REF: Virtual Table Indexing Information\n** KEYWORDS: sqlite3_index_info\n**\n** The sqlite3_index_info structure and its substructures is used as part\n** of the [virtual table] interface to\n** pass information into and receive the reply from the [xBestIndex]\n** method of a [virtual table module].  The fields under **Inputs** are the\n** inputs to xBestIndex and are read-only.  xBestIndex inserts its\n** results into the **Outputs** fields.\n**\n** ^(The aConstraint[] array records WHERE clause constraints of the form:\n**\n** <blockquote>column OP expr</blockquote>\n**\n** where OP is =, &lt;, &lt;=, &gt;, or &gt;=.)^  ^(The particular operator is\n** stored in aConstraint[].op using one of the\n** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^\n** ^(The index of the column is stored in\n** aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the\n** expr on the right-hand side can be evaluated (and thus the constraint\n** is usable) and false if it cannot.)^\n**\n** ^The optimizer automatically inverts terms of the form \"expr OP column\"\n** and makes other simplifications to the WHERE clause in an attempt to\n** get as many WHERE clause terms into the form shown above as possible.\n** ^The aConstraint[] array only reports WHERE clause terms that are\n** relevant to the particular virtual table being queried.\n**\n** ^Information about the ORDER BY clause is stored in aOrderBy[].\n** ^Each term of aOrderBy records a column of the ORDER BY clause.\n**\n** The colUsed field indicates which columns of the virtual table may be\n** required by the current scan. Virtual table columns are numbered from\n** zero in the order in which they appear within the CREATE TABLE statement\n** passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),\n** the corresponding bit is set within the colUsed mask if the column may be\n** required by SQLite. If the table has at least 64 columns and any column\n** to the right of the first 63 is required, then bit 63 of colUsed is also\n** set. In other words, column iCol may be required if the expression\n** (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to\n** non-zero.\n**\n** The [xBestIndex] method must fill aConstraintUsage[] with information\n** about what parameters to pass to xFilter.  ^If argvIndex>0 then\n** the right-hand side of the corresponding aConstraint[] is evaluated\n** and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit\n** is true, then the constraint is assumed to be fully handled by the\n** virtual table and might not be checked again by the byte code.)^ ^(The\n** aConstraintUsage[].omit flag is an optimization hint. When the omit flag\n** is left in its default setting of false, the constraint will always be\n** checked separately in byte code.  If the omit flag is changed to true, then\n** the constraint may or may not be checked in byte code.  In other words,\n** when the omit flag is true there is no guarantee that the constraint will\n** not be checked again using byte code.)^\n**\n** ^The idxNum and idxStr values are recorded and passed into the\n** [xFilter] method.\n** ^[sqlite3_free()] is used to free idxStr if and only if\n** needToFreeIdxStr is true.\n**\n** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in\n** the correct order to satisfy the ORDER BY clause so that no separate\n** sorting step is required.\n**\n** ^The estimatedCost value is an estimate of the cost of a particular\n** strategy. A cost of N indicates that the cost of the strategy is similar\n** to a linear scan of an SQLite table with N rows. A cost of log(N)\n** indicates that the expense of the operation is similar to that of a\n** binary search on a unique indexed field of an SQLite table with N rows.\n**\n** ^The estimatedRows value is an estimate of the number of rows that\n** will be returned by the strategy.\n**\n** The xBestIndex method may optionally populate the idxFlags field with a\n** mask of SQLITE_INDEX_SCAN_* flags. One such flag is\n** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]\n** output to show the idxNum as hex instead of as decimal.  Another flag is\n** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will\n** return at most one row.\n**\n** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then\n** SQLite also assumes that if a call to the xUpdate() method is made as\n** part of the same statement to delete or update a virtual table row and the\n** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback\n** any database changes. In other words, if the xUpdate() returns\n** SQLITE_CONSTRAINT, the database contents must be exactly as they were\n** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not\n** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by\n** the xUpdate method are automatically rolled back by SQLite.\n**\n** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info\n** structure for SQLite [version 3.8.2] ([dateof:3.8.2]).\n** If a virtual table extension is\n** used with an SQLite version earlier than 3.8.2, the results of attempting\n** to read or write the estimatedRows field are undefined (but are likely\n** to include crashing the application). The estimatedRows field should\n** therefore only be used if [sqlite3_libversion_number()] returns a\n** value greater than or equal to 3008002. Similarly, the idxFlags field\n** was added for [version 3.9.0] ([dateof:3.9.0]).\n** It may therefore only be used if\n** sqlite3_libversion_number() returns a value greater than or equal to\n** 3009000.\n*/\nstruct sqlite3_index_info {\n  /* Inputs */\n  int nConstraint;           /* Number of entries in aConstraint */\n  struct sqlite3_index_constraint {\n     int iColumn;              /* Column constrained.  -1 for ROWID */\n     unsigned char op;         /* Constraint operator */\n     unsigned char usable;     /* True if this constraint is usable */\n     int iTermOffset;          /* Used internally - xBestIndex should ignore */\n  } *aConstraint;            /* Table of WHERE clause constraints */\n  int nOrderBy;              /* Number of terms in the ORDER BY clause */\n  struct sqlite3_index_orderby {\n     int iColumn;              /* Column number */\n     unsigned char desc;       /* True for DESC.  False for ASC. */\n  } *aOrderBy;               /* The ORDER BY clause */\n  /* Outputs */\n  struct sqlite3_index_constraint_usage {\n    int argvIndex;           /* if >0, constraint is part of argv to xFilter */\n    unsigned char omit;      /* Do not code a test for this constraint */\n  } *aConstraintUsage;\n  int idxNum;                /* Number used to identify the index */\n  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */\n  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */\n  int orderByConsumed;       /* True if output is already ordered */\n  double estimatedCost;           /* Estimated cost of using this index */\n  /* Fields below are only available in SQLite 3.8.2 and later */\n  sqlite3_int64 estimatedRows;    /* Estimated number of rows returned */\n  /* Fields below are only available in SQLite 3.9.0 and later */\n  int idxFlags;              /* Mask of SQLITE_INDEX_SCAN_* flags */\n  /* Fields below are only available in SQLite 3.10.0 and later */\n  sqlite3_uint64 colUsed;    /* Input: Mask of columns used by statement */\n};\n\n/*\n** CAPI3REF: Virtual Table Scan Flags\n**\n** Virtual table implementations are allowed to set the\n** [sqlite3_index_info].idxFlags field to some combination of\n** these bits.\n*/\n#define SQLITE_INDEX_SCAN_UNIQUE 0x00000001 /* Scan visits at most 1 row */\n#define SQLITE_INDEX_SCAN_HEX    0x00000002 /* Display idxNum as hex */\n                                            /* in EXPLAIN QUERY PLAN */\n\n/*\n** CAPI3REF: Virtual Table Constraint Operator Codes\n**\n** These macros define the allowed values for the\n** [sqlite3_index_info].aConstraint[].op field.  Each value represents\n** an operator that is part of a constraint term in the WHERE clause of\n** a query that uses a [virtual table].\n**\n** ^The left-hand operand of the operator is given by the corresponding\n** aConstraint[].iColumn field.  ^An iColumn of -1 indicates the left-hand\n** operand is the rowid.\n** The SQLITE_INDEX_CONSTRAINT_LIMIT and SQLITE_INDEX_CONSTRAINT_OFFSET\n** operators have no left-hand operand, and so for those operators the\n** corresponding aConstraint[].iColumn is meaningless and should not be\n** used.\n**\n** All operator values from SQLITE_INDEX_CONSTRAINT_FUNCTION through\n** value 255 are reserved to represent functions that are overloaded\n** by the [xFindFunction|xFindFunction method] of the virtual table\n** implementation.\n**\n** The right-hand operands for each constraint might be accessible using\n** the [sqlite3_vtab_rhs_value()] interface.  Usually the right-hand\n** operand is only available if it appears as a single constant literal\n** in the input SQL.  If the right-hand operand is another column or an\n** expression (even a constant expression) or a parameter, then the\n** sqlite3_vtab_rhs_value() probably will not be able to extract it.\n** ^The SQLITE_INDEX_CONSTRAINT_ISNULL and\n** SQLITE_INDEX_CONSTRAINT_ISNOTNULL operators have no right-hand operand\n** and hence calls to sqlite3_vtab_rhs_value() for those operators will\n** always return SQLITE_NOTFOUND.\n**\n** The collating sequence to be used for comparison can be found using\n** the [sqlite3_vtab_collation()] interface.  For most real-world virtual\n** tables, the collating sequence of constraints does not matter (for example\n** because the constraints are numeric) and so the sqlite3_vtab_collation()\n** interface is not commonly needed.\n*/\n#define SQLITE_INDEX_CONSTRAINT_EQ          2\n#define SQLITE_INDEX_CONSTRAINT_GT          4\n#define SQLITE_INDEX_CONSTRAINT_LE          8\n#define SQLITE_INDEX_CONSTRAINT_LT         16\n#define SQLITE_INDEX_CONSTRAINT_GE         32\n#define SQLITE_INDEX_CONSTRAINT_MATCH      64\n#define SQLITE_INDEX_CONSTRAINT_LIKE       65\n#define SQLITE_INDEX_CONSTRAINT_GLOB       66\n#define SQLITE_INDEX_CONSTRAINT_REGEXP     67\n#define SQLITE_INDEX_CONSTRAINT_NE         68\n#define SQLITE_INDEX_CONSTRAINT_ISNOT      69\n#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL  70\n#define SQLITE_INDEX_CONSTRAINT_ISNULL     71\n#define SQLITE_INDEX_CONSTRAINT_IS         72\n#define SQLITE_INDEX_CONSTRAINT_LIMIT      73\n#define SQLITE_INDEX_CONSTRAINT_OFFSET     74\n#define SQLITE_INDEX_CONSTRAINT_FUNCTION  150\n\n/*\n** CAPI3REF: Register A Virtual Table Implementation\n** METHOD: sqlite3\n**\n** ^These routines are used to register a new [virtual table module] name.\n** ^Module names must be registered before\n** creating a new [virtual table] using the module and before using a\n** preexisting [virtual table] for the module.\n**\n** ^The module name is registered on the [database connection] specified\n** by the first parameter.  ^The name of the module is given by the\n** second parameter.  ^The third parameter is a pointer to\n** the implementation of the [virtual table module].   ^The fourth\n** parameter is an arbitrary client data pointer that is passed through\n** into the [xCreate] and [xConnect] methods of the virtual table module\n** when a new virtual table is being created or reinitialized.\n**\n** ^The sqlite3_create_module_v2() interface has a fifth parameter which\n** is a pointer to a destructor for the pClientData.  ^SQLite will\n** invoke the destructor function (if it is not NULL) when SQLite\n** no longer needs the pClientData pointer.  ^The destructor will also\n** be invoked if the call to sqlite3_create_module_v2() fails.\n** ^The sqlite3_create_module()\n** interface is equivalent to sqlite3_create_module_v2() with a NULL\n** destructor.\n**\n** ^If the third parameter (the pointer to the sqlite3_module object) is\n** NULL then no new module is created and any existing modules with the\n** same name are dropped.\n**\n** See also: [sqlite3_drop_modules()]\n*/\nSQLITE_API int sqlite3_create_module(\n  sqlite3 *db,               /* SQLite connection to register module with */\n  const char *zName,         /* Name of the module */\n  const sqlite3_module *p,   /* Methods for the module */\n  void *pClientData          /* Client data for xCreate/xConnect */\n);\nSQLITE_API int sqlite3_create_module_v2(\n  sqlite3 *db,               /* SQLite connection to register module with */\n  const char *zName,         /* Name of the module */\n  const sqlite3_module *p,   /* Methods for the module */\n  void *pClientData,         /* Client data for xCreate/xConnect */\n  void(*xDestroy)(void*)     /* Module destructor function */\n);\n\n/*\n** CAPI3REF: Remove Unnecessary Virtual Table Implementations\n** METHOD: sqlite3\n**\n** ^The sqlite3_drop_modules(D,L) interface removes all virtual\n** table modules from database connection D except those named on list L.\n** The L parameter must be either NULL or a pointer to an array of pointers\n** to strings where the array is terminated by a single NULL pointer.\n** ^If the L parameter is NULL, then all virtual table modules are removed.\n**\n** See also: [sqlite3_create_module()]\n*/\nSQLITE_API int sqlite3_drop_modules(\n  sqlite3 *db,                /* Remove modules from this connection */\n  const char **azKeep         /* Except, do not remove the ones named here */\n);\n\n/*\n** CAPI3REF: Virtual Table Instance Object\n** KEYWORDS: sqlite3_vtab\n**\n** Every [virtual table module] implementation uses a subclass\n** of this object to describe a particular instance\n** of the [virtual table].  Each subclass will\n** be tailored to the specific needs of the module implementation.\n** The purpose of this superclass is to define certain fields that are\n** common to all module implementations.\n**\n** ^Virtual tables methods can set an error message by assigning a\n** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should\n** take care that any prior string is freed by a call to [sqlite3_free()]\n** prior to assigning a new string to zErrMsg.  ^After the error message\n** is delivered up to the client application, the string will be automatically\n** freed by sqlite3_free() and the zErrMsg field will be zeroed.\n*/\nstruct sqlite3_vtab {\n  const sqlite3_module *pModule;  /* The module for this virtual table */\n  int nRef;                       /* Number of open cursors */\n  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */\n  /* Virtual table implementations will typically add additional fields */\n};\n\n/*\n** CAPI3REF: Virtual Table Cursor Object\n** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}\n**\n** Every [virtual table module] implementation uses a subclass of the\n** following structure to describe cursors that point into the\n** [virtual table] and are used\n** to loop through the virtual table.  Cursors are created using the\n** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed\n** by the [sqlite3_module.xClose | xClose] method.  Cursors are used\n** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods\n** of the module.  Each module implementation will define\n** the content of a cursor structure to suit its own needs.\n**\n** This superclass exists in order to define fields of the cursor that\n** are common to all implementations.\n*/\nstruct sqlite3_vtab_cursor {\n  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */\n  /* Virtual table implementations will typically add additional fields */\n};\n\n/*\n** CAPI3REF: Declare The Schema Of A Virtual Table\n**\n** ^The [xCreate] and [xConnect] methods of a\n** [virtual table module] call this interface\n** to declare the format (the names and datatypes of the columns) of\n** the virtual tables they implement.\n*/\nSQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);\n\n/*\n** CAPI3REF: Overload A Function For A Virtual Table\n** METHOD: sqlite3\n**\n** ^(Virtual tables can provide alternative implementations of functions\n** using the [xFindFunction] method of the [virtual table module].\n** But global versions of those functions\n** must exist in order to be overloaded.)^\n**\n** ^(This API makes sure a global version of a function with a particular\n** name and number of parameters exists.  If no such function exists\n** before this API is called, a new function is created.)^  ^The implementation\n** of the new function always causes an exception to be thrown.  So\n** the new function is not good for anything by itself.  Its only\n** purpose is to be a placeholder function that can be overloaded\n** by a [virtual table].\n*/\nSQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);\n\n/*\n** CAPI3REF: A Handle To An Open BLOB\n** KEYWORDS: {BLOB handle} {BLOB handles}\n**\n** An instance of this object represents an open BLOB on which\n** [sqlite3_blob_open | incremental BLOB I/O] can be performed.\n** ^Objects of this type are created by [sqlite3_blob_open()]\n** and destroyed by [sqlite3_blob_close()].\n** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces\n** can be used to read or write small subsections of the BLOB.\n** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.\n*/\ntypedef struct sqlite3_blob sqlite3_blob;\n\n/*\n** CAPI3REF: Open A BLOB For Incremental I/O\n** METHOD: sqlite3\n** CONSTRUCTOR: sqlite3_blob\n**\n** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located\n** in row iRow, column zColumn, table zTable in database zDb;\n** in other words, the same BLOB that would be selected by:\n**\n** <pre>\n**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;\n** </pre>)^\n**\n** ^(Parameter zDb is not the filename that contains the database, but\n** rather the symbolic name of the database. For attached databases, this is\n** the name that appears after the AS keyword in the [ATTACH] statement.\n** For the main database file, the database name is \"main\". For TEMP\n** tables, the database name is \"temp\".)^\n**\n** ^If the flags parameter is non-zero, then the BLOB is opened for read\n** and write access. ^If the flags parameter is zero, the BLOB is opened for\n** read-only access.\n**\n** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored\n** in *ppBlob. Otherwise an [error code] is returned and, unless the error\n** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided\n** the API is not misused, it is always safe to call [sqlite3_blob_close()]\n** on *ppBlob after this function returns.\n**\n** This function fails with SQLITE_ERROR if any of the following are true:\n** <ul>\n**   <li> ^(Database zDb does not exist)^,\n**   <li> ^(Table zTable does not exist within database zDb)^,\n**   <li> ^(Table zTable is a WITHOUT ROWID table)^,\n**   <li> ^(Column zColumn does not exist)^,\n**   <li> ^(Row iRow is not present in the table)^,\n**   <li> ^(The specified column of row iRow contains a value that is not\n**         a TEXT or BLOB value)^,\n**   <li> ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE\n**         constraint and the blob is being opened for read/write access)^,\n**   <li> ^([foreign key constraints | Foreign key constraints] are enabled,\n**         column zColumn is part of a [child key] definition and the blob is\n**         being opened for read/write access)^.\n** </ul>\n**\n** ^Unless it returns SQLITE_MISUSE, this function sets the\n** [database connection] error code and message accessible via\n** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.\n**\n** A BLOB referenced by sqlite3_blob_open() may be read using the\n** [sqlite3_blob_read()] interface and modified by using\n** [sqlite3_blob_write()].  The [BLOB handle] can be moved to a\n** different row of the same table using the [sqlite3_blob_reopen()]\n** interface.  However, the column, table, or database of a [BLOB handle]\n** cannot be changed after the [BLOB handle] is opened.\n**\n** ^(If the row that a BLOB handle points to is modified by an\n** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects\n** then the BLOB handle is marked as \"expired\".\n** This is true if any column of the row is changed, even a column\n** other than the one the BLOB handle is open on.)^\n** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for\n** an expired BLOB handle fail with a return code of [SQLITE_ABORT].\n** ^(Changes written into a BLOB prior to the BLOB expiring are not\n** rolled back by the expiration of the BLOB.  Such changes will eventually\n** commit if the transaction continues to completion.)^\n**\n** ^Use the [sqlite3_blob_bytes()] interface to determine the size of\n** the opened blob.  ^The size of a blob may not be changed by this\n** interface.  Use the [UPDATE] SQL command to change the size of a\n** blob.\n**\n** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces\n** and the built-in [zeroblob] SQL function may be used to create a\n** zero-filled blob to read or write using the incremental-blob interface.\n**\n** To avoid a resource leak, every open [BLOB handle] should eventually\n** be released by a call to [sqlite3_blob_close()].\n**\n** See also: [sqlite3_blob_close()],\n** [sqlite3_blob_reopen()], [sqlite3_blob_read()],\n** [sqlite3_blob_bytes()], [sqlite3_blob_write()].\n*/\nSQLITE_API int sqlite3_blob_open(\n  sqlite3*,\n  const char *zDb,\n  const char *zTable,\n  const char *zColumn,\n  sqlite3_int64 iRow,\n  int flags,\n  sqlite3_blob **ppBlob\n);\n\n/*\n** CAPI3REF: Move a BLOB Handle to a New Row\n** METHOD: sqlite3_blob\n**\n** ^This function is used to move an existing [BLOB handle] so that it points\n** to a different row of the same database table. ^The new row is identified\n** by the rowid value passed as the second argument. Only the row can be\n** changed. ^The database, table and column on which the blob handle is open\n** remain the same. Moving an existing [BLOB handle] to a new row is\n** faster than closing the existing handle and opening a new one.\n**\n** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -\n** it must exist and there must be either a blob or text value stored in\n** the nominated column.)^ ^If the new row is not present in the table, or if\n** it does not contain a blob or text value, or if another error occurs, an\n** SQLite error code is returned and the blob handle is considered aborted.\n** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or\n** [sqlite3_blob_reopen()] on an aborted blob handle immediately return\n** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle\n** always returns zero.\n**\n** ^This function sets the database handle error code and message.\n*/\nSQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);\n\n/*\n** CAPI3REF: Close A BLOB Handle\n** DESTRUCTOR: sqlite3_blob\n**\n** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed\n** unconditionally.  Even if this routine returns an error code, the\n** handle is still closed.)^\n**\n** ^If the blob handle being closed was opened for read-write access, and if\n** the database is in auto-commit mode and there are no other open read-write\n** blob handles or active write statements, the current transaction is\n** committed. ^If an error occurs while committing the transaction, an error\n** code is returned and the transaction rolled back.\n**\n** Calling this function with an argument that is not a NULL pointer or an\n** open blob handle results in undefined behavior. ^Calling this routine\n** with a null pointer (such as would be returned by a failed call to\n** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function\n** is passed a valid open blob handle, the values returned by the\n** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.\n*/\nSQLITE_API int sqlite3_blob_close(sqlite3_blob *);\n\n/*\n** CAPI3REF: Return The Size Of An Open BLOB\n** METHOD: sqlite3_blob\n**\n** ^Returns the size in bytes of the BLOB accessible via the\n** successfully opened [BLOB handle] in its only argument.  ^The\n** incremental blob I/O routines can only read or overwrite existing\n** blob content; they cannot change the size of a blob.\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n*/\nSQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);\n\n/*\n** CAPI3REF: Read Data From A BLOB Incrementally\n** METHOD: sqlite3_blob\n**\n** ^(This function is used to read data from an open [BLOB handle] into a\n** caller-supplied buffer. N bytes of data are copied into buffer Z\n** from the open BLOB, starting at offset iOffset.)^\n**\n** ^If offset iOffset is less than N bytes from the end of the BLOB,\n** [SQLITE_ERROR] is returned and no data is read.  ^If N or iOffset is\n** less than zero, [SQLITE_ERROR] is returned and no data is read.\n** ^The size of the blob (and hence the maximum value of N+iOffset)\n** can be determined using the [sqlite3_blob_bytes()] interface.\n**\n** ^An attempt to read from an expired [BLOB handle] fails with an\n** error code of [SQLITE_ABORT].\n**\n** ^(On success, sqlite3_blob_read() returns SQLITE_OK.\n** Otherwise, an [error code] or an [extended error code] is returned.)^\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n**\n** See also: [sqlite3_blob_write()].\n*/\nSQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);\n\n/*\n** CAPI3REF: Write Data Into A BLOB Incrementally\n** METHOD: sqlite3_blob\n**\n** ^(This function is used to write data into an open [BLOB handle] from a\n** caller-supplied buffer. N bytes of data are copied from the buffer Z\n** into the open BLOB, starting at offset iOffset.)^\n**\n** ^(On success, sqlite3_blob_write() returns SQLITE_OK.\n** Otherwise, an  [error code] or an [extended error code] is returned.)^\n** ^Unless SQLITE_MISUSE is returned, this function sets the\n** [database connection] error code and message accessible via\n** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.\n**\n** ^If the [BLOB handle] passed as the first argument was not opened for\n** writing (the flags parameter to [sqlite3_blob_open()] was zero),\n** this function returns [SQLITE_READONLY].\n**\n** This function may only modify the contents of the BLOB; it is\n** not possible to increase the size of a BLOB using this API.\n** ^If offset iOffset is less than N bytes from the end of the BLOB,\n** [SQLITE_ERROR] is returned and no data is written. The size of the\n** BLOB (and hence the maximum value of N+iOffset) can be determined\n** using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less\n** than zero [SQLITE_ERROR] is returned and no data is written.\n**\n** ^An attempt to write to an expired [BLOB handle] fails with an\n** error code of [SQLITE_ABORT].  ^Writes to the BLOB that occurred\n** before the [BLOB handle] expired are not rolled back by the\n** expiration of the handle, though of course those changes might\n** have been overwritten by the statement that expired the BLOB handle\n** or by other independent statements.\n**\n** This routine only works on a [BLOB handle] which has been created\n** by a prior successful call to [sqlite3_blob_open()] and which has not\n** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n** to this routine results in undefined and probably undesirable behavior.\n**\n** See also: [sqlite3_blob_read()].\n*/\nSQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);\n\n/*\n** CAPI3REF: Virtual File System Objects\n**\n** A virtual filesystem (VFS) is an [sqlite3_vfs] object\n** that SQLite uses to interact\n** with the underlying operating system.  Most SQLite builds come with a\n** single default VFS that is appropriate for the host computer.\n** New VFSes can be registered and existing VFSes can be unregistered.\n** The following interfaces are provided.\n**\n** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.\n** ^Names are case sensitive.\n** ^Names are zero-terminated UTF-8 strings.\n** ^If there is no match, a NULL pointer is returned.\n** ^If zVfsName is NULL then the default VFS is returned.\n**\n** ^New VFSes are registered with sqlite3_vfs_register().\n** ^Each new VFS becomes the default VFS if the makeDflt flag is set.\n** ^The same VFS can be registered multiple times without injury.\n** ^To make an existing VFS into the default VFS, register it again\n** with the makeDflt flag set.  If two different VFSes with the\n** same name are registered, the behavior is undefined.  If a\n** VFS is registered with a name that is NULL or an empty string,\n** then the behavior is undefined.\n**\n** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.\n** ^(If the default VFS is unregistered, another VFS is chosen as\n** the default.  The choice for the new VFS is arbitrary.)^\n*/\nSQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);\nSQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);\nSQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);\n\n/*\n** CAPI3REF: Mutexes\n**\n** The SQLite core uses these routines for thread\n** synchronization. Though they are intended for internal\n** use by SQLite, code that links against SQLite is\n** permitted to use any of these routines.\n**\n** The SQLite source code contains multiple implementations\n** of these mutex routines.  An appropriate implementation\n** is selected automatically at compile-time.  The following\n** implementations are available in the SQLite core:\n**\n** <ul>\n** <li>   SQLITE_MUTEX_PTHREADS\n** <li>   SQLITE_MUTEX_W32\n** <li>   SQLITE_MUTEX_NOOP\n** </ul>\n**\n** The SQLITE_MUTEX_NOOP implementation is a set of routines\n** that does no real locking and is appropriate for use in\n** a single-threaded application.  The SQLITE_MUTEX_PTHREADS and\n** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix\n** and Windows.\n**\n** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor\n** macro defined (with \"-DSQLITE_MUTEX_APPDEF=1\"), then no mutex\n** implementation is included with the library. In this case the\n** application must supply a custom mutex implementation using the\n** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function\n** before calling sqlite3_initialize() or any other public sqlite3_\n** function that calls sqlite3_initialize().\n**\n** ^The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()\n** routine returns NULL if it is unable to allocate the requested\n** mutex.  The argument to sqlite3_mutex_alloc() must be one of these\n** integer constants:\n**\n** <ul>\n** <li>  SQLITE_MUTEX_FAST\n** <li>  SQLITE_MUTEX_RECURSIVE\n** <li>  SQLITE_MUTEX_STATIC_MAIN\n** <li>  SQLITE_MUTEX_STATIC_MEM\n** <li>  SQLITE_MUTEX_STATIC_OPEN\n** <li>  SQLITE_MUTEX_STATIC_PRNG\n** <li>  SQLITE_MUTEX_STATIC_LRU\n** <li>  SQLITE_MUTEX_STATIC_PMEM\n** <li>  SQLITE_MUTEX_STATIC_APP1\n** <li>  SQLITE_MUTEX_STATIC_APP2\n** <li>  SQLITE_MUTEX_STATIC_APP3\n** <li>  SQLITE_MUTEX_STATIC_VFS1\n** <li>  SQLITE_MUTEX_STATIC_VFS2\n** <li>  SQLITE_MUTEX_STATIC_VFS3\n** </ul>\n**\n** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)\n** cause sqlite3_mutex_alloc() to create\n** a new mutex.  ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\n** The mutex implementation does not need to make a distinction\n** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n** not want to.  SQLite will only request a recursive mutex in\n** cases where it really needs one.  If a faster non-recursive mutex\n** implementation is available on the host platform, the mutex subsystem\n** might return such a mutex in response to SQLITE_MUTEX_FAST.\n**\n** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other\n** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return\n** a pointer to a static preexisting mutex.  ^Nine static mutexes are\n** used by the current version of SQLite.  Future versions of SQLite\n** may add additional static mutexes.  Static mutexes are for internal\n** use by SQLite only.  Applications that use SQLite mutexes should\n** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n** SQLITE_MUTEX_RECURSIVE.\n**\n** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n** returns a different mutex on every call.  ^For the static\n** mutex types, the same mutex is returned on every call that has\n** the same type number.\n**\n** ^The sqlite3_mutex_free() routine deallocates a previously\n** allocated dynamic mutex.  Attempting to deallocate a static\n** mutex results in undefined behavior.\n**\n** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  ^If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  ^The sqlite3_mutex_try() interface returns [SQLITE_OK]\n** upon successful entry.  ^(Mutexes created using\n** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.\n** In such cases, the\n** mutex must be exited an equal number of times before another thread\n** can enter.)^  If the same thread tries to enter any mutex other\n** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined.\n**\n** ^(Some systems (for example, Windows 95) do not support the operation\n** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()\n** will always return SQLITE_BUSY. In most cases the SQLite core only uses\n** sqlite3_mutex_try() as an optimization, so this is acceptable\n** behavior. The exceptions are unix builds that set the\n** SQLITE_ENABLE_SETLK_TIMEOUT build option. In that case a working\n** sqlite3_mutex_try() is required.)^\n**\n** ^The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.   The behavior\n** is undefined if the mutex is not currently entered by the\n** calling thread or is not currently allocated.\n**\n** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(),\n** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer,\n** then any of the four routines behaves as a no-op.\n**\n** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].\n*/\nSQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);\nSQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);\nSQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);\nSQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);\nSQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);\n\n/*\n** CAPI3REF: Mutex Methods Object\n**\n** An instance of this structure defines the low-level routines\n** used to allocate and use mutexes.\n**\n** Usually, the default mutex implementations provided by SQLite are\n** sufficient, however the application has the option of substituting a custom\n** implementation for specialized deployments or systems for which SQLite\n** does not provide a suitable implementation. In this case, the application\n** creates and populates an instance of this structure to pass\n** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.\n** Additionally, an instance of this structure can be used as an\n** output variable when querying the system for the current mutex\n** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.\n**\n** ^The xMutexInit method defined by this structure is invoked as\n** part of system initialization by the sqlite3_initialize() function.\n** ^The xMutexInit routine is called by SQLite exactly once for each\n** effective call to [sqlite3_initialize()].\n**\n** ^The xMutexEnd method defined by this structure is invoked as\n** part of system shutdown by the sqlite3_shutdown() function. The\n** implementation of this method is expected to release all outstanding\n** resources obtained by the mutex methods implementation, especially\n** those obtained by the xMutexInit method.  ^The xMutexEnd()\n** interface is invoked exactly once for each call to [sqlite3_shutdown()].\n**\n** ^(The remaining seven methods defined by this structure (xMutexAlloc,\n** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and\n** xMutexNotheld) implement the following interfaces (respectively):\n**\n** <ul>\n**   <li>  [sqlite3_mutex_alloc()] </li>\n**   <li>  [sqlite3_mutex_free()] </li>\n**   <li>  [sqlite3_mutex_enter()] </li>\n**   <li>  [sqlite3_mutex_try()] </li>\n**   <li>  [sqlite3_mutex_leave()] </li>\n**   <li>  [sqlite3_mutex_held()] </li>\n**   <li>  [sqlite3_mutex_notheld()] </li>\n** </ul>)^\n**\n** The only difference is that the public sqlite3_XXX functions enumerated\n** above silently ignore any invocations that pass a NULL pointer instead\n** of a valid mutex handle. The implementations of the methods defined\n** by this structure are not required to handle this case. The results\n** of passing a NULL pointer instead of a valid mutex handle are undefined\n** (i.e. it is acceptable to provide an implementation that segfaults if\n** it is passed a NULL pointer).\n**\n** The xMutexInit() method must be threadsafe.  It must be harmless to\n** invoke xMutexInit() multiple times within the same process and without\n** intervening calls to xMutexEnd().  Second and subsequent calls to\n** xMutexInit() must be no-ops.\n**\n** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]\n** and its associates).  Similarly, xMutexAlloc() must not use SQLite memory\n** allocation for a static mutex.  ^However xMutexAlloc() may use SQLite\n** memory allocation for a fast or recursive mutex.\n**\n** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is\n** called, but only if the prior call to xMutexInit returned SQLITE_OK.\n** If xMutexInit fails in any way, it is expected to clean up after itself\n** prior to returning.\n*/\ntypedef struct sqlite3_mutex_methods sqlite3_mutex_methods;\nstruct sqlite3_mutex_methods {\n  int (*xMutexInit)(void);\n  int (*xMutexEnd)(void);\n  sqlite3_mutex *(*xMutexAlloc)(int);\n  void (*xMutexFree)(sqlite3_mutex *);\n  void (*xMutexEnter)(sqlite3_mutex *);\n  int (*xMutexTry)(sqlite3_mutex *);\n  void (*xMutexLeave)(sqlite3_mutex *);\n  int (*xMutexHeld)(sqlite3_mutex *);\n  int (*xMutexNotheld)(sqlite3_mutex *);\n};\n\n/*\n** CAPI3REF: Mutex Verification Routines\n**\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines\n** are intended for use inside assert() statements.  The SQLite core\n** never uses these routines except inside an assert() and applications\n** are advised to follow the lead of the core.  The SQLite core only\n** provides implementations for these routines when it is compiled\n** with the SQLITE_DEBUG flag.  External mutex implementations\n** are only required to provide these routines if SQLITE_DEBUG is\n** defined and if NDEBUG is not defined.\n**\n** These routines should return true if the mutex in their argument\n** is held or not held, respectively, by the calling thread.\n**\n** The implementation is not required to provide versions of these\n** routines that actually work. If the implementation does not provide working\n** versions of these routines, it should at least provide stubs that always\n** return true so that one does not get spurious assertion failures.\n**\n** If the argument to sqlite3_mutex_held() is a NULL pointer then\n** the routine should return 1.   This seems counter-intuitive since\n** clearly the mutex cannot be held if it does not exist.  But\n** the reason the mutex does not exist is because the build is not\n** using mutexes.  And we do not want the assert() containing the\n** call to sqlite3_mutex_held() to fail, so a non-zero return is\n** the appropriate thing to do.  The sqlite3_mutex_notheld()\n** interface should also return 1 when given a NULL pointer.\n*/\n#ifndef NDEBUG\nSQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);\nSQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);\n#endif\n\n/*\n** CAPI3REF: Mutex Types\n**\n** The [sqlite3_mutex_alloc()] interface takes a single argument\n** which is one of these integer constants.\n**\n** The set of static mutexes may change from one SQLite release to the\n** next.  Applications that override the built-in mutex logic must be\n** prepared to accommodate additional static mutexes.\n*/\n#define SQLITE_MUTEX_FAST             0\n#define SQLITE_MUTEX_RECURSIVE        1\n#define SQLITE_MUTEX_STATIC_MAIN      2\n#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */\n#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */\n#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */\n#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_randomness() */\n#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */\n#define SQLITE_MUTEX_STATIC_LRU2      7  /* NOT USED */\n#define SQLITE_MUTEX_STATIC_PMEM      7  /* sqlite3PageMalloc() */\n#define SQLITE_MUTEX_STATIC_APP1      8  /* For use by application */\n#define SQLITE_MUTEX_STATIC_APP2      9  /* For use by application */\n#define SQLITE_MUTEX_STATIC_APP3     10  /* For use by application */\n#define SQLITE_MUTEX_STATIC_VFS1     11  /* For use by built-in VFS */\n#define SQLITE_MUTEX_STATIC_VFS2     12  /* For use by extension VFS */\n#define SQLITE_MUTEX_STATIC_VFS3     13  /* For use by application VFS */\n\n/* Legacy compatibility: */\n#define SQLITE_MUTEX_STATIC_MASTER    2\n\n\n/*\n** CAPI3REF: Retrieve the mutex for a database connection\n** METHOD: sqlite3\n**\n** ^This interface returns a pointer to the [sqlite3_mutex] object that\n** serializes access to the [database connection] given in the argument\n** when the [threading mode] is Serialized.\n** ^If the [threading mode] is Single-thread or Multi-thread then this\n** routine returns a NULL pointer.\n*/\nSQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);\n\n/*\n** CAPI3REF: Low-Level Control Of Database Files\n** METHOD: sqlite3\n** KEYWORDS: {file control}\n**\n** ^The [sqlite3_file_control()] interface makes a direct call to the\n** xFileControl method for the [sqlite3_io_methods] object associated\n** with a particular database identified by the second argument. ^The\n** name of the database is \"main\" for the main database or \"temp\" for the\n** TEMP database, or the name that appears after the AS keyword for\n** databases that are added using the [ATTACH] SQL command.\n** ^A NULL pointer can be used in place of \"main\" to refer to the\n** main database file.\n** ^The third and fourth parameters to this routine\n** are passed directly through to the second and third parameters of\n** the xFileControl method.  ^The return value of the xFileControl\n** method becomes the return value of this routine.\n**\n** A few opcodes for [sqlite3_file_control()] are handled directly\n** by the SQLite core and never invoke the\n** sqlite3_io_methods.xFileControl method.\n** ^The [SQLITE_FCNTL_FILE_POINTER] value for the op parameter causes\n** a pointer to the underlying [sqlite3_file] object to be written into\n** the space pointed to by the 4th parameter.  The\n** [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns\n** the [sqlite3_file] object associated with the journal file instead of\n** the main database.  The [SQLITE_FCNTL_VFS_POINTER] opcode returns\n** a pointer to the underlying [sqlite3_vfs] object for the file.\n** The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter\n** from the pager.\n**\n** ^If the second parameter (zDbName) does not match the name of any\n** open database file, then SQLITE_ERROR is returned.  ^This error\n** code is not remembered and will not be recalled by [sqlite3_errcode()]\n** or [sqlite3_errmsg()].  The underlying xFileControl method might\n** also return SQLITE_ERROR.  There is no way to distinguish between\n** an incorrect zDbName and an SQLITE_ERROR return from the underlying\n** xFileControl method.\n**\n** See also: [file control opcodes]\n*/\nSQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);\n\n/*\n** CAPI3REF: Testing Interface\n**\n** ^The sqlite3_test_control() interface is used to read out internal\n** state of SQLite and to inject faults into SQLite for testing\n** purposes.  ^The first parameter is an operation code that determines\n** the number, meaning, and operation of all subsequent parameters.\n**\n** This interface is not for use by applications.  It exists solely\n** for verifying the correct operation of the SQLite library.  Depending\n** on how the SQLite library is compiled, this interface might not exist.\n**\n** The details of the operation codes, their meanings, the parameters\n** they take, and what they do are all subject to change without notice.\n** Unlike most of the SQLite API, this function is not guaranteed to\n** operate consistently from one release to the next.\n*/\nSQLITE_API int sqlite3_test_control(int op, ...);\n\n/*\n** CAPI3REF: Testing Interface Operation Codes\n**\n** These constants are the valid operation code parameters used\n** as the first argument to [sqlite3_test_control()].\n**\n** These parameters and their meanings are subject to change\n** without notice.  These values are for testing purposes only.\n** Applications should not use any of these parameters or the\n** [sqlite3_test_control()] interface.\n*/\n#define SQLITE_TESTCTRL_FIRST                    5\n#define SQLITE_TESTCTRL_PRNG_SAVE                5\n#define SQLITE_TESTCTRL_PRNG_RESTORE             6\n#define SQLITE_TESTCTRL_PRNG_RESET               7  /* NOT USED */\n#define SQLITE_TESTCTRL_FK_NO_ACTION             7\n#define SQLITE_TESTCTRL_BITVEC_TEST              8\n#define SQLITE_TESTCTRL_FAULT_INSTALL            9\n#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10\n#define SQLITE_TESTCTRL_PENDING_BYTE            11\n#define SQLITE_TESTCTRL_ASSERT                  12\n#define SQLITE_TESTCTRL_ALWAYS                  13\n#define SQLITE_TESTCTRL_RESERVE                 14  /* NOT USED */\n#define SQLITE_TESTCTRL_JSON_SELFCHECK          14\n#define SQLITE_TESTCTRL_OPTIMIZATIONS           15\n#define SQLITE_TESTCTRL_ISKEYWORD               16  /* NOT USED */\n#define SQLITE_TESTCTRL_GETOPT                  16\n#define SQLITE_TESTCTRL_SCRATCHMALLOC           17  /* NOT USED */\n#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS      17\n#define SQLITE_TESTCTRL_LOCALTIME_FAULT         18\n#define SQLITE_TESTCTRL_EXPLAIN_STMT            19  /* NOT USED */\n#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD    19\n#define SQLITE_TESTCTRL_NEVER_CORRUPT           20\n#define SQLITE_TESTCTRL_VDBE_COVERAGE           21\n#define SQLITE_TESTCTRL_BYTEORDER               22\n#define SQLITE_TESTCTRL_ISINIT                  23\n#define SQLITE_TESTCTRL_SORTER_MMAP             24\n#define SQLITE_TESTCTRL_IMPOSTER                25\n#define SQLITE_TESTCTRL_PARSER_COVERAGE         26\n#define SQLITE_TESTCTRL_RESULT_INTREAL          27\n#define SQLITE_TESTCTRL_PRNG_SEED               28\n#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS     29\n#define SQLITE_TESTCTRL_SEEK_COUNT              30\n#define SQLITE_TESTCTRL_TRACEFLAGS              31\n#define SQLITE_TESTCTRL_TUNE                    32\n#define SQLITE_TESTCTRL_LOGEST                  33\n#define SQLITE_TESTCTRL_USELONGDOUBLE           34  /* NOT USED */\n#define SQLITE_TESTCTRL_LAST                    34  /* Largest TESTCTRL */\n\n/*\n** CAPI3REF: SQL Keyword Checking\n**\n** These routines provide access to the set of SQL language keywords\n** recognized by SQLite.  Applications can use these routines to determine\n** whether or not a specific identifier needs to be escaped (for example,\n** by enclosing in double-quotes) so as not to confuse the parser.\n**\n** The sqlite3_keyword_count() interface returns the number of distinct\n** keywords understood by SQLite.\n**\n** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and\n** makes *Z point to that keyword expressed as UTF8 and writes the number\n** of bytes in the keyword into *L.  The string that *Z points to is not\n** zero-terminated.  The sqlite3_keyword_name(N,Z,L) routine returns\n** SQLITE_OK if N is within bounds and SQLITE_ERROR if not. If either Z\n** or L are NULL or invalid pointers then calls to\n** sqlite3_keyword_name(N,Z,L) result in undefined behavior.\n**\n** The sqlite3_keyword_check(Z,L) interface checks to see whether or not\n** the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero\n** if it is and zero if not.\n**\n** The parser used by SQLite is forgiving.  It is often possible to use\n** a keyword as an identifier as long as such use does not result in a\n** parsing ambiguity.  For example, the statement\n** \"CREATE TABLE BEGIN(REPLACE,PRAGMA,END);\" is accepted by SQLite, and\n** creates a new table named \"BEGIN\" with three columns named\n** \"REPLACE\", \"PRAGMA\", and \"END\".  Nevertheless, best practice is to avoid\n** using keywords as identifiers.  Common techniques used to avoid keyword\n** name collisions include:\n** <ul>\n** <li> Put all identifier names inside double-quotes.  This is the official\n**      SQL way to escape identifier names.\n** <li> Put identifier names inside &#91;...&#93;.  This is not standard SQL,\n**      but it is what SQL Server does and so lots of programmers use this\n**      technique.\n** <li> Begin every identifier with the letter \"Z\" as no SQL keywords start\n**      with \"Z\".\n** <li> Include a digit somewhere in every identifier name.\n** </ul>\n**\n** Note that the number of keywords understood by SQLite can depend on\n** compile-time options.  For example, \"VACUUM\" is not a keyword if\n** SQLite is compiled with the [-DSQLITE_OMIT_VACUUM] option.  Also,\n** new keywords may be added to future releases of SQLite.\n*/\nSQLITE_API int sqlite3_keyword_count(void);\nSQLITE_API int sqlite3_keyword_name(int,const char**,int*);\nSQLITE_API int sqlite3_keyword_check(const char*,int);\n\n/*\n** CAPI3REF: Dynamic String Object\n** KEYWORDS: {dynamic string}\n**\n** An instance of the sqlite3_str object contains a dynamically-sized\n** string under construction.\n**\n** The lifecycle of an sqlite3_str object is as follows:\n** <ol>\n** <li> ^The sqlite3_str object is created using [sqlite3_str_new()].\n** <li> ^Text is appended to the sqlite3_str object using various\n** methods, such as [sqlite3_str_appendf()].\n** <li> ^The sqlite3_str object is destroyed and the string it created\n** is returned using the [sqlite3_str_finish()] interface.\n** </ol>\n*/\ntypedef struct sqlite3_str sqlite3_str;\n\n/*\n** CAPI3REF: Create A New Dynamic String Object\n** CONSTRUCTOR: sqlite3_str\n**\n** ^The [sqlite3_str_new(D)] interface allocates and initializes\n** a new [sqlite3_str] object.  To avoid memory leaks, the object returned by\n** [sqlite3_str_new()] must be freed by a subsequent call to\n** [sqlite3_str_finish(X)].\n**\n** ^The [sqlite3_str_new(D)] interface always returns a pointer to a\n** valid [sqlite3_str] object, though in the event of an out-of-memory\n** error the returned object might be a special singleton that will\n** silently reject new text, always return SQLITE_NOMEM from\n** [sqlite3_str_errcode()], always return 0 for\n** [sqlite3_str_length()], and always return NULL from\n** [sqlite3_str_finish(X)].  It is always safe to use the value\n** returned by [sqlite3_str_new(D)] as the sqlite3_str parameter\n** to any of the other [sqlite3_str] methods.\n**\n** The D parameter to [sqlite3_str_new(D)] may be NULL.  If the\n** D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum\n** length of the string contained in the [sqlite3_str] object will be\n** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead\n** of [SQLITE_MAX_LENGTH].\n*/\nSQLITE_API sqlite3_str *sqlite3_str_new(sqlite3*);\n\n/*\n** CAPI3REF: Finalize A Dynamic String\n** DESTRUCTOR: sqlite3_str\n**\n** ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X\n** and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()]\n** that contains the constructed string.  The calling application should\n** pass the returned value to [sqlite3_free()] to avoid a memory leak.\n** ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any\n** errors were encountered during construction of the string.  ^The\n** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the\n** string in [sqlite3_str] object X is zero bytes long.\n*/\nSQLITE_API char *sqlite3_str_finish(sqlite3_str*);\n\n/*\n** CAPI3REF: Add Content To A Dynamic String\n** METHOD: sqlite3_str\n**\n** These interfaces add content to an sqlite3_str object previously obtained\n** from [sqlite3_str_new()].\n**\n** ^The [sqlite3_str_appendf(X,F,...)] and\n** [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf]\n** functionality of SQLite to append formatted text onto the end of\n** [sqlite3_str] object X.\n**\n** ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S\n** onto the end of the [sqlite3_str] object X.  N must be non-negative.\n** S must contain at least N non-zero bytes of content.  To append a\n** zero-terminated string in its entirety, use the [sqlite3_str_appendall()]\n** method instead.\n**\n** ^The [sqlite3_str_appendall(X,S)] method appends the complete content of\n** zero-terminated string S onto the end of [sqlite3_str] object X.\n**\n** ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the\n** single-byte character C onto the end of [sqlite3_str] object X.\n** ^This method can be used, for example, to add whitespace indentation.\n**\n** ^The [sqlite3_str_reset(X)] method resets the string under construction\n** inside [sqlite3_str] object X back to zero bytes in length.\n**\n** These methods do not return a result code.  ^If an error occurs, that fact\n** is recorded in the [sqlite3_str] object and can be recovered by a\n** subsequent call to [sqlite3_str_errcode(X)].\n*/\nSQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);\nSQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);\nSQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);\nSQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);\nSQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);\nSQLITE_API void sqlite3_str_reset(sqlite3_str*);\n\n/*\n** CAPI3REF: Status Of A Dynamic String\n** METHOD: sqlite3_str\n**\n** These interfaces return the current status of an [sqlite3_str] object.\n**\n** ^If any prior errors have occurred while constructing the dynamic string\n** in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return\n** an appropriate error code.  ^The [sqlite3_str_errcode(X)] method returns\n** [SQLITE_NOMEM] following any out-of-memory error, or\n** [SQLITE_TOOBIG] if the size of the dynamic string exceeds\n** [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors.\n**\n** ^The [sqlite3_str_length(X)] method returns the current length, in bytes,\n** of the dynamic string under construction in [sqlite3_str] object X.\n** ^The length returned by [sqlite3_str_length(X)] does not include the\n** zero-termination byte.\n**\n** ^The [sqlite3_str_value(X)] method returns a pointer to the current\n** content of the dynamic string under construction in X.  The value\n** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X\n** and might be freed or altered by any subsequent method on the same\n** [sqlite3_str] object.  Applications must not use the pointer returned by\n** [sqlite3_str_value(X)] after any subsequent method call on the same\n** object.  ^Applications may change the content of the string returned\n** by [sqlite3_str_value(X)] as long as they do not write into any bytes\n** outside the range of 0 to [sqlite3_str_length(X)] and do not read or\n** write any byte after any subsequent sqlite3_str method call.\n*/\nSQLITE_API int sqlite3_str_errcode(sqlite3_str*);\nSQLITE_API int sqlite3_str_length(sqlite3_str*);\nSQLITE_API char *sqlite3_str_value(sqlite3_str*);\n\n/*\n** CAPI3REF: SQLite Runtime Status\n**\n** ^These interfaces are used to retrieve runtime status information\n** about the performance of SQLite, and optionally to reset various\n** highwater marks.  ^The first argument is an integer code for\n** the specific parameter to measure.  ^(Recognized integer codes\n** are of the form [status parameters | SQLITE_STATUS_...].)^\n** ^The current value of the parameter is returned into *pCurrent.\n** ^The highest recorded value is returned in *pHighwater.  ^If the\n** resetFlag is true, then the highest record value is reset after\n** *pHighwater is written.  ^(Some parameters do not record the highest\n** value.  For those parameters\n** nothing is written into *pHighwater and the resetFlag is ignored.)^\n** ^(Other parameters record only the highwater mark and not the current\n** value.  For these latter parameters nothing is written into *pCurrent.)^\n**\n** ^The sqlite3_status() and sqlite3_status64() routines return\n** SQLITE_OK on success and a non-zero [error code] on failure.\n**\n** If either the current value or the highwater mark is too large to\n** be represented by a 32-bit integer, then the values returned by\n** sqlite3_status() are undefined.\n**\n** See also: [sqlite3_db_status()]\n*/\nSQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);\nSQLITE_API int sqlite3_status64(\n  int op,\n  sqlite3_int64 *pCurrent,\n  sqlite3_int64 *pHighwater,\n  int resetFlag\n);\n\n\n/*\n** CAPI3REF: Status Parameters\n** KEYWORDS: {status parameters}\n**\n** These integer constants designate various run-time status parameters\n** that can be returned by [sqlite3_status()].\n**\n** <dl>\n** [[SQLITE_STATUS_MEMORY_USED]] ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>\n** <dd>This parameter is the current amount of memory checked out\n** using [sqlite3_malloc()], either directly or indirectly.  The\n** figure includes calls made to [sqlite3_malloc()] by the application\n** and internal memory usage by the SQLite library.  Auxiliary page-cache\n** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in\n** this parameter.  The amount returned is the sum of the allocation\n** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^\n**\n** [[SQLITE_STATUS_MALLOC_SIZE]] ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>\n** <dd>This parameter records the largest memory allocation request\n** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their\n** internal equivalents).  Only the value returned in the\n** *pHighwater parameter to [sqlite3_status()] is of interest.\n** The value written into the *pCurrent parameter is undefined.</dd>)^\n**\n** [[SQLITE_STATUS_MALLOC_COUNT]] ^(<dt>SQLITE_STATUS_MALLOC_COUNT</dt>\n** <dd>This parameter records the number of separate memory allocations\n** currently checked out.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_USED]] ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>\n** <dd>This parameter returns the number of pages used out of the\n** [pagecache memory allocator] that was configured using\n** [SQLITE_CONFIG_PAGECACHE].  The\n** value returned is in pages, not in bytes.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_OVERFLOW]]\n** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>\n** <dd>This parameter returns the number of bytes of page cache\n** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]\n** buffer and where forced to overflow to [sqlite3_malloc()].  The\n** returned value includes allocations that overflowed because they\n** were too large (they were larger than the \"sz\" parameter to\n** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because\n** no space was left in the page cache.</dd>)^\n**\n** [[SQLITE_STATUS_PAGECACHE_SIZE]] ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>\n** <dd>This parameter records the largest memory allocation request\n** handed to the [pagecache memory allocator].  Only the value returned in the\n** *pHighwater parameter to [sqlite3_status()] is of interest.\n** The value written into the *pCurrent parameter is undefined.</dd>)^\n**\n** [[SQLITE_STATUS_SCRATCH_USED]] <dt>SQLITE_STATUS_SCRATCH_USED</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_SCRATCH_SIZE]] <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>\n** <dd>No longer used.</dd>\n**\n** [[SQLITE_STATUS_PARSER_STACK]] ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>\n** <dd>The *pHighwater parameter records the deepest parser stack.\n** The *pCurrent value is undefined.  The *pHighwater value is only\n** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^\n** </dl>\n**\n** New status parameters may be added from time to time.\n*/\n#define SQLITE_STATUS_MEMORY_USED          0\n#define SQLITE_STATUS_PAGECACHE_USED       1\n#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2\n#define SQLITE_STATUS_SCRATCH_USED         3  /* NOT USED */\n#define SQLITE_STATUS_SCRATCH_OVERFLOW     4  /* NOT USED */\n#define SQLITE_STATUS_MALLOC_SIZE          5\n#define SQLITE_STATUS_PARSER_STACK         6\n#define SQLITE_STATUS_PAGECACHE_SIZE       7\n#define SQLITE_STATUS_SCRATCH_SIZE         8  /* NOT USED */\n#define SQLITE_STATUS_MALLOC_COUNT         9\n\n/*\n** CAPI3REF: Database Connection Status\n** METHOD: sqlite3\n**\n** ^This interface is used to retrieve runtime status information\n** about a single [database connection].  ^The first argument is the\n** database connection object to be interrogated.  ^The second argument\n** is an integer constant, taken from the set of\n** [SQLITE_DBSTATUS options], that\n** determines the parameter to interrogate.  The set of\n** [SQLITE_DBSTATUS options] is likely\n** to grow in future releases of SQLite.\n**\n** ^The current value of the requested parameter is written into *pCur\n** and the highest instantaneous value is written into *pHiwtr.  ^If\n** the resetFlg is true, then the highest instantaneous value is\n** reset back down to the current value.\n**\n** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a\n** non-zero [error code] on failure.\n**\n** ^The sqlite3_db_status64(D,O,C,H,R) routine works exactly the same\n** way as sqlite3_db_status(D,O,C,H,R) routine except that the C and H\n** parameters are pointer to 64-bit integers (type: sqlite3_int64) instead\n** of pointers to 32-bit integers, which allows larger status values\n** to be returned.  If a status value exceeds 2,147,483,647 then\n** sqlite3_db_status() will truncate the value whereas sqlite3_db_status64()\n** will return the full value.\n**\n** See also: [sqlite3_status()] and [sqlite3_stmt_status()].\n*/\nSQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);\nSQLITE_API int sqlite3_db_status64(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);\n\n/*\n** CAPI3REF: Status Parameters for database connections\n** KEYWORDS: {SQLITE_DBSTATUS options}\n**\n** These constants are the available integer \"verbs\" that can be passed as\n** the second argument to the [sqlite3_db_status()] interface.\n**\n** New verbs may be added in future releases of SQLite. Existing verbs\n** might be discontinued. Applications should check the return code from\n** [sqlite3_db_status()] to make sure that the call worked.\n** The [sqlite3_db_status()] interface will return a non-zero error code\n** if a discontinued or unsupported verb is invoked.\n**\n** <dl>\n** [[SQLITE_DBSTATUS_LOOKASIDE_USED]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>\n** <dd>This parameter returns the number of lookaside memory slots currently\n** checked out.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>\n** <dd>This parameter returns the number of malloc attempts that were\n** satisfied using lookaside memory. Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]\n** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>\n** <dd>This parameter returns the number of malloc attempts that might have\n** been satisfied using lookaside memory but failed due to the amount of\n** memory requested being larger than the lookaside slot size.\n** Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]\n** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>\n** <dd>This parameter returns the number of malloc attempts that might have\n** been satisfied using lookaside memory but failed due to all lookaside\n** memory already being in use.\n** Only the high-water value is meaningful;\n** the current value is always zero.</dd>)^\n**\n** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** memory used by all pager caches associated with the database connection.)^\n** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]\n** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>\n** <dd>This parameter is similar to DBSTATUS_CACHE_USED, except that if a\n** pager cache is shared between two or more connections the bytes of heap\n** memory used by that pager cache is divided evenly between the attached\n** connections.)^  In other words, if none of the pager caches associated\n** with the database connection are shared, this request returns the same\n** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are\n** shared, the value returned by this call will be smaller than that returned\n** by DBSTATUS_CACHE_USED. ^The highwater mark associated with\n** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>\n**\n** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** memory used to store the schema for all databases associated\n** with the connection - main, temp, and any [ATTACH]-ed databases.)^\n** ^The full amount of memory used by the schemas is reported, even if the\n** schema memory is shared with other database connections due to\n** [shared cache mode] being enabled.\n** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>\n** <dd>This parameter returns the approximate number of bytes of heap\n** and lookaside memory used by all prepared statements associated with\n** the database connection.)^\n** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_HIT]] ^(<dt>SQLITE_DBSTATUS_CACHE_HIT</dt>\n** <dd>This parameter returns the number of pager cache hits that have\n** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_HIT\n** is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_MISS]] ^(<dt>SQLITE_DBSTATUS_CACHE_MISS</dt>\n** <dd>This parameter returns the number of pager cache misses that have\n** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS\n** is always 0.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_WRITE]] ^(<dt>SQLITE_DBSTATUS_CACHE_WRITE</dt>\n** <dd>This parameter returns the number of dirty cache entries that have\n** been written to disk. Specifically, the number of pages written to the\n** wal file in wal mode databases, or the number of pages written to the\n** database file in rollback mode databases. Any pages written as part of\n** transaction rollback or database recovery operations are not included.\n** If an IO or other error occurs while writing a page to disk, the effect\n** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The\n** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0.\n** <p>\n** ^(There is overlap between the quantities measured by this parameter\n** (SQLITE_DBSTATUS_CACHE_WRITE) and SQLITE_DBSTATUS_TEMPBUF_SPILL.\n** Resetting one will reduce the other.)^\n** </dd>\n**\n** [[SQLITE_DBSTATUS_CACHE_SPILL]] ^(<dt>SQLITE_DBSTATUS_CACHE_SPILL</dt>\n** <dd>This parameter returns the number of dirty cache entries that have\n** been written to disk in the middle of a transaction due to the page\n** cache overflowing. Transactions are more efficient if they are written\n** to disk all at once. When pages spill mid-transaction, that introduces\n** additional overhead. This parameter can be used to help identify\n** inefficiencies that can be resolved by increasing the cache size.\n** </dd>\n**\n** [[SQLITE_DBSTATUS_DEFERRED_FKS]] ^(<dt>SQLITE_DBSTATUS_DEFERRED_FKS</dt>\n** <dd>This parameter returns zero for the current value if and only if\n** all foreign key constraints (deferred or immediate) have been\n** resolved.)^  ^The highwater mark is always 0.\n**\n** [[SQLITE_DBSTATUS_TEMPBUF_SPILL] ^(<dt>SQLITE_DBSTATUS_TEMPBUF_SPILL</dt>\n** <dd>^(This parameter returns the number of bytes written to temporary\n** files on disk that could have been kept in memory had sufficient memory\n** been available.  This value includes writes to intermediate tables that\n** are part of complex queries, external sorts that spill to disk, and\n** writes to TEMP tables.)^\n** ^The highwater mark is always 0.\n** <p>\n** ^(There is overlap between the quantities measured by this parameter\n** (SQLITE_DBSTATUS_TEMPBUF_SPILL) and SQLITE_DBSTATUS_CACHE_WRITE.\n** Resetting one will reduce the other.)^\n** </dd>\n** </dl>\n*/\n#define SQLITE_DBSTATUS_LOOKASIDE_USED       0\n#define SQLITE_DBSTATUS_CACHE_USED           1\n#define SQLITE_DBSTATUS_SCHEMA_USED          2\n#define SQLITE_DBSTATUS_STMT_USED            3\n#define SQLITE_DBSTATUS_LOOKASIDE_HIT        4\n#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE  5\n#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL  6\n#define SQLITE_DBSTATUS_CACHE_HIT            7\n#define SQLITE_DBSTATUS_CACHE_MISS           8\n#define SQLITE_DBSTATUS_CACHE_WRITE          9\n#define SQLITE_DBSTATUS_DEFERRED_FKS        10\n#define SQLITE_DBSTATUS_CACHE_USED_SHARED   11\n#define SQLITE_DBSTATUS_CACHE_SPILL         12\n#define SQLITE_DBSTATUS_TEMPBUF_SPILL       13\n#define SQLITE_DBSTATUS_MAX                 13   /* Largest defined DBSTATUS */\n\n\n/*\n** CAPI3REF: Prepared Statement Status\n** METHOD: sqlite3_stmt\n**\n** ^(Each prepared statement maintains various\n** [SQLITE_STMTSTATUS counters] that measure the number\n** of times it has performed specific operations.)^  These counters can\n** be used to monitor the performance characteristics of the prepared\n** statements.  For example, if the number of table steps greatly exceeds\n** the number of table searches or result rows, that would tend to indicate\n** that the prepared statement is using a full table scan rather than\n** an index.\n**\n** ^(This interface is used to retrieve and reset counter values from\n** a [prepared statement].  The first argument is the prepared statement\n** object to be interrogated.  The second argument\n** is an integer code for a specific [SQLITE_STMTSTATUS counter]\n** to be interrogated.)^\n** ^The current value of the requested counter is returned.\n** ^If the resetFlg is true, then the counter is reset to zero after this\n** interface call returns.\n**\n** See also: [sqlite3_status()] and [sqlite3_db_status()].\n*/\nSQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);\n\n/*\n** CAPI3REF: Status Parameters for prepared statements\n** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters}\n**\n** These preprocessor macros define integer codes that name counter\n** values associated with the [sqlite3_stmt_status()] interface.\n** The meanings of the various counters are as follows:\n**\n** <dl>\n** [[SQLITE_STMTSTATUS_FULLSCAN_STEP]] <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>\n** <dd>^This is the number of times that SQLite has stepped forward in\n** a table as part of a full table scan.  Large numbers for this counter\n** may indicate opportunities for performance improvement through\n** careful use of indices.</dd>\n**\n** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>\n** <dd>^This is the number of sort operations that have occurred.\n** A non-zero value in this counter may indicate an opportunity to\n** improve performance through careful use of indices.</dd>\n**\n** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>\n** <dd>^This is the number of rows inserted into transient indices that\n** were created automatically in order to help joins run faster.\n** A non-zero value in this counter may indicate an opportunity to\n** improve performance by adding permanent indices that do not\n** need to be reinitialized each time the statement is run.</dd>\n**\n** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>\n** <dd>^This is the number of virtual machine operations executed\n** by the prepared statement if that number is less than or equal\n** to 2147483647.  The number of virtual machine operations can be\n** used as a proxy for the total work done by the prepared statement.\n** If the number of virtual machine operations exceeds 2147483647\n** then the value returned by this statement status code is undefined.</dd>\n**\n** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>\n** <dd>^This is the number of times that the prepare statement has been\n** automatically regenerated due to schema changes or changes to\n** [bound parameters] that might affect the query plan.</dd>\n**\n** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>\n** <dd>^This is the number of times that the prepared statement has\n** been run.  A single \"run\" for the purposes of this counter is one\n** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].\n** The counter is incremented on the first [sqlite3_step()] call of each\n** cycle.</dd>\n**\n** [[SQLITE_STMTSTATUS_FILTER_MISS]]\n** [[SQLITE_STMTSTATUS_FILTER HIT]]\n** <dt>SQLITE_STMTSTATUS_FILTER_HIT<br>\n** SQLITE_STMTSTATUS_FILTER_MISS</dt>\n** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join\n** step was bypassed because a Bloom filter returned not-found.  The\n** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of\n** times that the Bloom filter returned a find, and thus the join step\n** had to be processed as normal.</dd>\n**\n** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>\n** <dd>^This is the approximate number of bytes of heap memory\n** used to store the prepared statement.  ^This value is not actually\n** a counter, and so the resetFlg parameter to sqlite3_stmt_status()\n** is ignored when the opcode is SQLITE_STMTSTATUS_MEMUSED.\n** </dd>\n** </dl>\n*/\n#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1\n#define SQLITE_STMTSTATUS_SORT              2\n#define SQLITE_STMTSTATUS_AUTOINDEX         3\n#define SQLITE_STMTSTATUS_VM_STEP           4\n#define SQLITE_STMTSTATUS_REPREPARE         5\n#define SQLITE_STMTSTATUS_RUN               6\n#define SQLITE_STMTSTATUS_FILTER_MISS       7\n#define SQLITE_STMTSTATUS_FILTER_HIT        8\n#define SQLITE_STMTSTATUS_MEMUSED           99\n\n/*\n** CAPI3REF: Custom Page Cache Object\n**\n** The sqlite3_pcache type is opaque.  It is implemented by\n** the pluggable module.  The SQLite core has no knowledge of\n** its size or internal structure and never deals with the\n** sqlite3_pcache object except by holding and passing pointers\n** to the object.\n**\n** See [sqlite3_pcache_methods2] for additional information.\n*/\ntypedef struct sqlite3_pcache sqlite3_pcache;\n\n/*\n** CAPI3REF: Custom Page Cache Object\n**\n** The sqlite3_pcache_page object represents a single page in the\n** page cache.  The page cache will allocate instances of this\n** object.  Various methods of the page cache use pointers to instances\n** of this object as parameters or as their return value.\n**\n** See [sqlite3_pcache_methods2] for additional information.\n*/\ntypedef struct sqlite3_pcache_page sqlite3_pcache_page;\nstruct sqlite3_pcache_page {\n  void *pBuf;        /* The content of the page */\n  void *pExtra;      /* Extra information associated with the page */\n};\n\n/*\n** CAPI3REF: Application Defined Page Cache.\n** KEYWORDS: {page cache}\n**\n** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can\n** register an alternative page cache implementation by passing in an\n** instance of the sqlite3_pcache_methods2 structure.)^\n** In many applications, most of the heap memory allocated by\n** SQLite is used for the page cache.\n** By implementing a\n** custom page cache using this API, an application can better control\n** the amount of memory consumed by SQLite, the way in which\n** that memory is allocated and released, and the policies used to\n** determine exactly which parts of a database file are cached and for\n** how long.\n**\n** The alternative page cache mechanism is an\n** extreme measure that is only needed by the most demanding applications.\n** The built-in page cache is recommended for most uses.\n**\n** ^(The contents of the sqlite3_pcache_methods2 structure are copied to an\n** internal buffer by SQLite within the call to [sqlite3_config].  Hence\n** the application may discard the parameter after the call to\n** [sqlite3_config()] returns.)^\n**\n** [[the xInit() page cache method]]\n** ^(The xInit() method is called once for each effective\n** call to [sqlite3_initialize()])^\n** (usually only once during the lifetime of the process). ^(The xInit()\n** method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^\n** The intent of the xInit() method is to set up global data structures\n** required by the custom page cache implementation.\n** ^(If the xInit() method is NULL, then the\n** built-in default page cache is used instead of the application defined\n** page cache.)^\n**\n** [[the xShutdown() page cache method]]\n** ^The xShutdown() method is called by [sqlite3_shutdown()].\n** It can be used to clean up\n** any outstanding resources before process shutdown, if required.\n** ^The xShutdown() method may be NULL.\n**\n** ^SQLite automatically serializes calls to the xInit method,\n** so the xInit method need not be threadsafe.  ^The\n** xShutdown method is only called from [sqlite3_shutdown()] so it does\n** not need to be threadsafe either.  All other methods must be threadsafe\n** in multithreaded applications.\n**\n** ^SQLite will never invoke xInit() more than once without an intervening\n** call to xShutdown().\n**\n** [[the xCreate() page cache methods]]\n** ^SQLite invokes the xCreate() method to construct a new cache instance.\n** SQLite will typically create one cache instance for each open database file,\n** though this is not guaranteed. ^The\n** first parameter, szPage, is the size in bytes of the pages that must\n** be allocated by the cache.  ^szPage will always be a power of two.  ^The\n** second parameter szExtra is a number of bytes of extra storage\n** associated with each page cache entry.  ^The szExtra parameter will be\n** a number less than 250.  SQLite will use the\n** extra szExtra bytes on each page to store metadata about the underlying\n** database page on disk.  The value passed into szExtra depends\n** on the SQLite version, the target platform, and how SQLite was compiled.\n** ^The third argument to xCreate(), bPurgeable, is true if the cache being\n** created will be used to cache database pages of a file stored on disk, or\n** false if it is used for an in-memory database. The cache implementation\n** does not have to do anything special based upon the value of bPurgeable;\n** it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will\n** never invoke xUnpin() except to deliberately delete a page.\n** ^In other words, calls to xUnpin() on a cache with bPurgeable set to\n** false will always have the \"discard\" flag set to true.\n** ^Hence, a cache created with bPurgeable set to false will\n** never contain any unpinned pages.\n**\n** [[the xCachesize() page cache method]]\n** ^(The xCachesize() method may be called at any time by SQLite to set the\n** suggested maximum cache-size (number of pages stored) for the cache\n** instance passed as the first argument. This is the value configured using\n** the SQLite \"[PRAGMA cache_size]\" command.)^  As with the bPurgeable\n** parameter, the implementation is not required to do anything with this\n** value; it is advisory only.\n**\n** [[the xPagecount() page cache methods]]\n** The xPagecount() method must return the number of pages currently\n** stored in the cache, both pinned and unpinned.\n**\n** [[the xFetch() page cache methods]]\n** The xFetch() method locates a page in the cache and returns a pointer to\n** an sqlite3_pcache_page object associated with that page, or a NULL pointer.\n** The pBuf element of the returned sqlite3_pcache_page object will be a\n** pointer to a buffer of szPage bytes used to store the content of a\n** single database page.  The pExtra element of sqlite3_pcache_page will be\n** a pointer to the szExtra bytes of extra storage that SQLite has requested\n** for each entry in the page cache.\n**\n** The page to be fetched is determined by the key. ^The minimum key value\n** is 1.  After it has been retrieved using xFetch, the page is considered\n** to be \"pinned\".\n**\n** If the requested page is already in the page cache, then the page cache\n** implementation must return a pointer to the page buffer with its content\n** intact.  If the requested page is not already in the cache, then the\n** cache implementation should use the value of the createFlag\n** parameter to help it determine what action to take:\n**\n** <table border=1 width=85% align=center>\n** <tr><th> createFlag <th> Behavior when page is not already in cache\n** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.\n** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.\n**                 Otherwise return NULL.\n** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return\n**                 NULL if allocating a new page is effectively impossible.\n** </table>\n**\n** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite\n** will only use a createFlag of 2 after a prior call with a createFlag of 1\n** failed.)^  In between the xFetch() calls, SQLite may\n** attempt to unpin one or more cache pages by spilling the content of\n** pinned pages to disk and synching the operating system disk cache.\n**\n** [[the xUnpin() page cache method]]\n** ^xUnpin() is called by SQLite with a pointer to a currently pinned page\n** as its second argument.  If the third parameter, discard, is non-zero,\n** then the page must be evicted from the cache.\n** ^If the discard parameter is\n** zero, then the page may be discarded or retained at the discretion of the\n** page cache implementation. ^The page cache implementation\n** may choose to evict unpinned pages at any time.\n**\n** The cache must not perform any reference counting. A single\n** call to xUnpin() unpins the page regardless of the number of prior calls\n** to xFetch().\n**\n** [[the xRekey() page cache methods]]\n** The xRekey() method is used to change the key value associated with the\n** page passed as the second argument. If the cache\n** previously contains an entry associated with newKey, it must be\n** discarded. ^Any prior cache entry associated with newKey is guaranteed not\n** to be pinned.\n**\n** When SQLite calls the xTruncate() method, the cache must discard all\n** existing cache entries with page numbers (keys) greater than or equal\n** to the value of the iLimit parameter passed to xTruncate(). If any\n** of these pages are pinned, they become implicitly unpinned, meaning that\n** they can be safely discarded.\n**\n** [[the xDestroy() page cache method]]\n** ^The xDestroy() method is used to delete a cache allocated by xCreate().\n** All resources associated with the specified cache should be freed. ^After\n** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]\n** handle invalid, and will not use it with any other sqlite3_pcache_methods2\n** functions.\n**\n** [[the xShrink() page cache method]]\n** ^SQLite invokes the xShrink() method when it wants the page cache to\n** free up as much of heap memory as possible.  The page cache implementation\n** is not obligated to free any memory, but well-behaved implementations should\n** do their best.\n*/\ntypedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2;\nstruct sqlite3_pcache_methods2 {\n  int iVersion;\n  void *pArg;\n  int (*xInit)(void*);\n  void (*xShutdown)(void*);\n  sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable);\n  void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n  int (*xPagecount)(sqlite3_pcache*);\n  sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n  void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard);\n  void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*,\n      unsigned oldKey, unsigned newKey);\n  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n  void (*xDestroy)(sqlite3_pcache*);\n  void (*xShrink)(sqlite3_pcache*);\n};\n\n/*\n** This is the obsolete pcache_methods object that has now been replaced\n** by sqlite3_pcache_methods2.  This object is not used by SQLite.  It is\n** retained in the header file for backwards compatibility only.\n*/\ntypedef struct sqlite3_pcache_methods sqlite3_pcache_methods;\nstruct sqlite3_pcache_methods {\n  void *pArg;\n  int (*xInit)(void*);\n  void (*xShutdown)(void*);\n  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);\n  void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n  int (*xPagecount)(sqlite3_pcache*);\n  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n  void (*xUnpin)(sqlite3_pcache*, void*, int discard);\n  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);\n  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n  void (*xDestroy)(sqlite3_pcache*);\n};\n\n\n/*\n** CAPI3REF: Online Backup Object\n**\n** The sqlite3_backup object records state information about an ongoing\n** online backup operation.  ^The sqlite3_backup object is created by\n** a call to [sqlite3_backup_init()] and is destroyed by a call to\n** [sqlite3_backup_finish()].\n**\n** See Also: [Using the SQLite Online Backup API]\n*/\ntypedef struct sqlite3_backup sqlite3_backup;\n\n/*\n** CAPI3REF: Online Backup API.\n**\n** The backup API copies the content of one database into another.\n** It is useful either for creating backups of databases or\n** for copying in-memory databases to or from persistent files.\n**\n** See Also: [Using the SQLite Online Backup API]\n**\n** ^SQLite holds a write transaction open on the destination database file\n** for the duration of the backup operation.\n** ^The source database is read-locked only while it is being read;\n** it is not locked continuously for the entire backup operation.\n** ^Thus, the backup may be performed on a live source database without\n** preventing other database connections from\n** reading or writing to the source database while the backup is underway.\n**\n** ^(To perform a backup operation:\n**   <ol>\n**     <li><b>sqlite3_backup_init()</b> is called once to initialize the\n**         backup,\n**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer\n**         the data between the two databases, and finally\n**     <li><b>sqlite3_backup_finish()</b> is called to release all resources\n**         associated with the backup operation.\n**   </ol>)^\n** There should be exactly one call to sqlite3_backup_finish() for each\n** successful call to sqlite3_backup_init().\n**\n** [[sqlite3_backup_init()]] <b>sqlite3_backup_init()</b>\n**\n** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the\n** [database connection] associated with the destination database\n** and the database name, respectively.\n** ^The database name is \"main\" for the main database, \"temp\" for the\n** temporary database, or the name specified after the AS keyword in\n** an [ATTACH] statement for an attached database.\n** ^The S and M arguments passed to\n** sqlite3_backup_init(D,N,S,M) identify the [database connection]\n** and database name of the source database, respectively.\n** ^The source and destination [database connections] (parameters S and D)\n** must be different or else sqlite3_backup_init(D,N,S,M) will fail with\n** an error.\n**\n** ^A call to sqlite3_backup_init() will fail, returning NULL, if\n** there is already a read or read-write transaction open on the\n** destination database.\n**\n** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is\n** returned and an error code and error message are stored in the\n** destination [database connection] D.\n** ^The error code and message for the failed call to sqlite3_backup_init()\n** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or\n** [sqlite3_errmsg16()] functions.\n** ^A successful call to sqlite3_backup_init() returns a pointer to an\n** [sqlite3_backup] object.\n** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and\n** sqlite3_backup_finish() functions to perform the specified backup\n** operation.\n**\n** [[sqlite3_backup_step()]] <b>sqlite3_backup_step()</b>\n**\n** ^Function sqlite3_backup_step(B,N) will copy up to N pages between\n** the source and destination databases specified by [sqlite3_backup] object B.\n** ^If N is negative, all remaining source pages are copied.\n** ^If sqlite3_backup_step(B,N) successfully copies N pages and there\n** are still more pages to be copied, then the function returns [SQLITE_OK].\n** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages\n** from source to destination, then it returns [SQLITE_DONE].\n** ^If an error occurs while running sqlite3_backup_step(B,N),\n** then an [error code] is returned. ^As well as [SQLITE_OK] and\n** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],\n** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an\n** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.\n**\n** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if\n** <ol>\n** <li> the destination database was opened read-only, or\n** <li> the destination database is using write-ahead-log journaling\n** and the destination and source page sizes differ, or\n** <li> the destination database is an in-memory database and the\n** destination and source page sizes differ.\n** </ol>)^\n**\n** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then\n** the [sqlite3_busy_handler | busy-handler function]\n** is invoked (if one is specified). ^If the\n** busy-handler returns non-zero before the lock is available, then\n** [SQLITE_BUSY] is returned to the caller. ^In this case the call to\n** sqlite3_backup_step() can be retried later. ^If the source\n** [database connection]\n** is being used to write to the source database when sqlite3_backup_step()\n** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this\n** case the call to sqlite3_backup_step() can be retried later on. ^(If\n** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or\n** [SQLITE_READONLY] is returned, then\n** there is no point in retrying the call to sqlite3_backup_step(). These\n** errors are considered fatal.)^  The application must accept\n** that the backup operation has failed and pass the backup operation handle\n** to the sqlite3_backup_finish() to release associated resources.\n**\n** ^The first call to sqlite3_backup_step() obtains an exclusive lock\n** on the destination file. ^The exclusive lock is not released until either\n** sqlite3_backup_finish() is called or the backup operation is complete\n** and sqlite3_backup_step() returns [SQLITE_DONE].  ^Every call to\n** sqlite3_backup_step() obtains a [shared lock] on the source database that\n** lasts for the duration of the sqlite3_backup_step() call.\n** ^Because the source database is not locked between calls to\n** sqlite3_backup_step(), the source database may be modified mid-way\n** through the backup process.  ^If the source database is modified by an\n** external process or via a database connection other than the one being\n** used by the backup operation, then the backup will be automatically\n** restarted by the next call to sqlite3_backup_step(). ^If the source\n** database is modified by using the same database connection as is used\n** by the backup operation, then the backup database is automatically\n** updated at the same time.\n**\n** [[sqlite3_backup_finish()]] <b>sqlite3_backup_finish()</b>\n**\n** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the\n** application wishes to abandon the backup operation, the application\n** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().\n** ^The sqlite3_backup_finish() interfaces releases all\n** resources associated with the [sqlite3_backup] object.\n** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any\n** active write-transaction on the destination database is rolled back.\n** The [sqlite3_backup] object is invalid\n** and may not be used following a call to sqlite3_backup_finish().\n**\n** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no\n** sqlite3_backup_step() errors occurred, regardless of whether or not\n** sqlite3_backup_step() completed.\n** ^If an out-of-memory condition or IO error occurred during any prior\n** sqlite3_backup_step() call on the same [sqlite3_backup] object, then\n** sqlite3_backup_finish() returns the corresponding [error code].\n**\n** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()\n** is not a permanent error and does not affect the return value of\n** sqlite3_backup_finish().\n**\n** [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]]\n** <b>sqlite3_backup_remaining() and sqlite3_backup_pagecount()</b>\n**\n** ^The sqlite3_backup_remaining() routine returns the number of pages still\n** to be backed up at the conclusion of the most recent sqlite3_backup_step().\n** ^The sqlite3_backup_pagecount() routine returns the total number of pages\n** in the source database at the conclusion of the most recent\n** sqlite3_backup_step().\n** ^(The values returned by these functions are only updated by\n** sqlite3_backup_step(). If the source database is modified in a way that\n** changes the size of the source database or the number of pages remaining,\n** those changes are not reflected in the output of sqlite3_backup_pagecount()\n** and sqlite3_backup_remaining() until after the next\n** sqlite3_backup_step().)^\n**\n** <b>Concurrent Usage of Database Handles</b>\n**\n** ^The source [database connection] may be used by the application for other\n** purposes while a backup operation is underway or being initialized.\n** ^If SQLite is compiled and configured to support threadsafe database\n** connections, then the source database connection may be used concurrently\n** from within other threads.\n**\n** However, the application must guarantee that the destination\n** [database connection] is not passed to any other API (by any thread) after\n** sqlite3_backup_init() is called and before the corresponding call to\n** sqlite3_backup_finish().  SQLite does not currently check to see\n** if the application incorrectly accesses the destination [database connection]\n** and so no error code is reported, but the operations may malfunction\n** nevertheless.  Use of the destination database connection while a\n** backup is in progress might also cause a mutex deadlock.\n**\n** If running in [shared cache mode], the application must\n** guarantee that the shared cache used by the destination database\n** is not accessed while the backup is running. In practice this means\n** that the application must guarantee that the disk file being\n** backed up to is not accessed by any connection within the process,\n** not just the specific connection that was passed to sqlite3_backup_init().\n**\n** The [sqlite3_backup] object itself is partially threadsafe. Multiple\n** threads may safely make multiple concurrent calls to sqlite3_backup_step().\n** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()\n** APIs are not strictly speaking threadsafe. If they are invoked at the\n** same time as another thread is invoking sqlite3_backup_step() it is\n** possible that they return invalid values.\n**\n** <b>Alternatives To Using The Backup API</b>\n**\n** Other techniques for safely creating a consistent backup of an SQLite\n** database include:\n**\n** <ul>\n** <li> The [VACUUM INTO] command.\n** <li> The [sqlite3_rsync] utility program.\n** </ul>\n*/\nSQLITE_API sqlite3_backup *sqlite3_backup_init(\n  sqlite3 *pDest,                        /* Destination database handle */\n  const char *zDestName,                 /* Destination database name */\n  sqlite3 *pSource,                      /* Source database handle */\n  const char *zSourceName                /* Source database name */\n);\nSQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);\nSQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);\nSQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);\nSQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);\n\n/*\n** CAPI3REF: Unlock Notification\n** METHOD: sqlite3\n**\n** ^When running in shared-cache mode, a database operation may fail with\n** an [SQLITE_LOCKED] error if the required locks on the shared-cache or\n** individual tables within the shared-cache cannot be obtained. See\n** [SQLite Shared-Cache Mode] for a description of shared-cache locking.\n** ^This API may be used to register a callback that SQLite will invoke\n** when the connection currently holding the required lock relinquishes it.\n** ^This API is only available if the library was compiled with the\n** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.\n**\n** See Also: [Using the SQLite Unlock Notification Feature].\n**\n** ^Shared-cache locks are released when a database connection concludes\n** its current transaction, either by committing it or rolling it back.\n**\n** ^When a connection (known as the blocked connection) fails to obtain a\n** shared-cache lock and SQLITE_LOCKED is returned to the caller, the\n** identity of the database connection (the blocking connection) that\n** has locked the required resource is stored internally. ^After an\n** application receives an SQLITE_LOCKED error, it may call the\n** sqlite3_unlock_notify() method with the blocked connection handle as\n** the first argument to register for a callback that will be invoked\n** when the blocking connection's current transaction is concluded. ^The\n** callback is invoked from within the [sqlite3_step] or [sqlite3_close]\n** call that concludes the blocking connection's transaction.\n**\n** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,\n** there is a chance that the blocking connection will have already\n** concluded its transaction by the time sqlite3_unlock_notify() is invoked.\n** If this happens, then the specified callback is invoked immediately,\n** from within the call to sqlite3_unlock_notify().)^\n**\n** ^If the blocked connection is attempting to obtain a write-lock on a\n** shared-cache table, and more than one other connection currently holds\n** a read-lock on the same table, then SQLite arbitrarily selects one of\n** the other connections to use as the blocking connection.\n**\n** ^(There may be at most one unlock-notify callback registered by a\n** blocked connection. If sqlite3_unlock_notify() is called when the\n** blocked connection already has a registered unlock-notify callback,\n** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is\n** called with a NULL pointer as its second argument, then any existing\n** unlock-notify callback is canceled. ^The blocked connection's\n** unlock-notify callback may also be canceled by closing the blocked\n** connection using [sqlite3_close()].\n**\n** The unlock-notify callback is not reentrant. If an application invokes\n** any sqlite3_xxx API functions from within an unlock-notify callback, a\n** crash or deadlock may be the result.\n**\n** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always\n** returns SQLITE_OK.\n**\n** <b>Callback Invocation Details</b>\n**\n** When an unlock-notify callback is registered, the application provides a\n** single void* pointer that is passed to the callback when it is invoked.\n** However, the signature of the callback function allows SQLite to pass\n** it an array of void* context pointers. The first argument passed to\n** an unlock-notify callback is a pointer to an array of void* pointers,\n** and the second is the number of entries in the array.\n**\n** When a blocking connection's transaction is concluded, there may be\n** more than one blocked connection that has registered for an unlock-notify\n** callback. ^If two or more such blocked connections have specified the\n** same callback function, then instead of invoking the callback function\n** multiple times, it is invoked once with the set of void* context pointers\n** specified by the blocked connections bundled together into an array.\n** This gives the application an opportunity to prioritize any actions\n** related to the set of unblocked database connections.\n**\n** <b>Deadlock Detection</b>\n**\n** Assuming that after registering for an unlock-notify callback a\n** database waits for the callback to be issued before taking any further\n** action (a reasonable assumption), then using this API may cause the\n** application to deadlock. For example, if connection X is waiting for\n** connection Y's transaction to be concluded, and similarly connection\n** Y is waiting on connection X's transaction, then neither connection\n** will proceed and the system may remain deadlocked indefinitely.\n**\n** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock\n** detection. ^If a given call to sqlite3_unlock_notify() would put the\n** system in a deadlocked state, then SQLITE_LOCKED is returned and no\n** unlock-notify callback is registered. The system is said to be in\n** a deadlocked state if connection A has registered for an unlock-notify\n** callback on the conclusion of connection B's transaction, and connection\n** B has itself registered for an unlock-notify callback when connection\n** A's transaction is concluded. ^Indirect deadlock is also detected, so\n** the system is also considered to be deadlocked if connection B has\n** registered for an unlock-notify callback on the conclusion of connection\n** C's transaction, where connection C is waiting on connection A. ^Any\n** number of levels of indirection are allowed.\n**\n** <b>The \"DROP TABLE\" Exception</b>\n**\n** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost\n** always appropriate to call sqlite3_unlock_notify(). There is however,\n** one exception. When executing a \"DROP TABLE\" or \"DROP INDEX\" statement,\n** SQLite checks if there are any currently executing SELECT statements\n** that belong to the same connection. If there are, SQLITE_LOCKED is\n** returned. In this case there is no \"blocking connection\", so invoking\n** sqlite3_unlock_notify() results in the unlock-notify callback being\n** invoked immediately. If the application then re-attempts the \"DROP TABLE\"\n** or \"DROP INDEX\" query, an infinite loop might be the result.\n**\n** One way around this problem is to check the extended error code returned\n** by an sqlite3_step() call. ^(If there is a blocking connection, then the\n** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in\n** the special \"DROP TABLE/INDEX\" case, the extended error code is just\n** SQLITE_LOCKED.)^\n*/\nSQLITE_API int sqlite3_unlock_notify(\n  sqlite3 *pBlocked,                          /* Waiting connection */\n  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */\n  void *pNotifyArg                            /* Argument to pass to xNotify */\n);\n\n\n/*\n** CAPI3REF: String Comparison\n**\n** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications\n** and extensions to compare the contents of two buffers containing UTF-8\n** strings in a case-independent fashion, using the same definition of \"case\n** independence\" that SQLite uses internally when comparing identifiers.\n*/\nSQLITE_API int sqlite3_stricmp(const char *, const char *);\nSQLITE_API int sqlite3_strnicmp(const char *, const char *, int);\n\n/*\n** CAPI3REF: String Globbing\n*\n** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if\n** string X matches the [GLOB] pattern P.\n** ^The definition of [GLOB] pattern matching used in\n** [sqlite3_strglob(P,X)] is the same as for the \"X GLOB P\" operator in the\n** SQL dialect understood by SQLite.  ^The [sqlite3_strglob(P,X)] function\n** is case sensitive.\n**\n** Note that this routine returns zero on a match and non-zero if the strings\n** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].\n**\n** See also: [sqlite3_strlike()].\n*/\nSQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);\n\n/*\n** CAPI3REF: String LIKE Matching\n*\n** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if\n** string X matches the [LIKE] pattern P with escape character E.\n** ^The definition of [LIKE] pattern matching used in\n** [sqlite3_strlike(P,X,E)] is the same as for the \"X LIKE P ESCAPE E\"\n** operator in the SQL dialect understood by SQLite.  ^For \"X LIKE P\" without\n** the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0.\n** ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case\n** insensitive - equivalent upper and lower case ASCII characters match\n** one another.\n**\n** ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though\n** only ASCII characters are case folded.\n**\n** Note that this routine returns zero on a match and non-zero if the strings\n** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].\n**\n** See also: [sqlite3_strglob()].\n*/\nSQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);\n\n/*\n** CAPI3REF: Error Logging Interface\n**\n** ^The [sqlite3_log()] interface writes a message into the [error log]\n** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].\n** ^If logging is enabled, the zFormat string and subsequent arguments are\n** used with [sqlite3_snprintf()] to generate the final output string.\n**\n** The sqlite3_log() interface is intended for use by extensions such as\n** virtual tables, collating functions, and SQL functions.  While there is\n** nothing to prevent an application from calling sqlite3_log(), doing so\n** is considered bad form.\n**\n** The zFormat string must not be NULL.\n**\n** To avoid deadlocks and other threading problems, the sqlite3_log() routine\n** will not use dynamically allocated memory.  The log message is stored in\n** a fixed-length buffer on the stack.  If the log message is longer than\n** a few hundred characters, it will be truncated to the length of the\n** buffer.\n*/\nSQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);\n\n/*\n** CAPI3REF: Write-Ahead Log Commit Hook\n** METHOD: sqlite3\n**\n** ^The [sqlite3_wal_hook()] function is used to register a callback that\n** is invoked each time data is committed to a database in wal mode.\n**\n** ^(The callback is invoked by SQLite after the commit has taken place and\n** the associated write-lock on the database released)^, so the implementation\n** may read, write or [checkpoint] the database as required.\n**\n** ^The first parameter passed to the callback function when it is invoked\n** is a copy of the third parameter passed to sqlite3_wal_hook() when\n** registering the callback. ^The second is a copy of the database handle.\n** ^The third parameter is the name of the database that was written to -\n** either \"main\" or the name of an [ATTACH]-ed database. ^The fourth parameter\n** is the number of pages currently in the write-ahead log file,\n** including those that were just committed.\n**\n** ^The callback function should normally return [SQLITE_OK].  ^If an error\n** code is returned, that error will propagate back up through the\n** SQLite code base to cause the statement that provoked the callback\n** to report an error, though the commit will have still occurred. If the\n** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value\n** that does not correspond to any valid SQLite error code, the results\n** are undefined.\n**\n** ^A single database handle may have at most a single write-ahead log\n** callback registered at one time. ^Calling [sqlite3_wal_hook()]\n** replaces the default behavior or previously registered write-ahead\n** log callback.\n**\n** ^The return value is a copy of the third parameter from the\n** previous call, if any, or 0.\n**\n** ^The [sqlite3_wal_autocheckpoint()] interface and the\n** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and\n** will overwrite any prior [sqlite3_wal_hook()] settings.\n**\n** ^If a write-ahead log callback is set using this function then\n** [sqlite3_wal_checkpoint_v2()] or [PRAGMA wal_checkpoint]\n** should be invoked periodically to keep the write-ahead log file\n** from growing without bound.\n**\n** ^Passing a NULL pointer for the callback disables automatic\n** checkpointing entirely. To re-enable the default behavior, call\n** sqlite3_wal_autocheckpoint(db,1000) or use [PRAGMA wal_checkpoint].\n*/\nSQLITE_API void *sqlite3_wal_hook(\n  sqlite3*,\n  int(*)(void *,sqlite3*,const char*,int),\n  void*\n);\n\n/*\n** CAPI3REF: Configure an auto-checkpoint\n** METHOD: sqlite3\n**\n** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around\n** [sqlite3_wal_hook()] that causes any database on [database connection] D\n** to automatically [checkpoint]\n** after committing a transaction if there are N or\n** more frames in the [write-ahead log] file.  ^Passing zero or\n** a negative value as the N parameter disables automatic\n** checkpoints entirely.\n**\n** ^The callback registered by this function replaces any existing callback\n** registered using [sqlite3_wal_hook()].  ^Likewise, registering a callback\n** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism\n** configured by this function.\n**\n** ^The [wal_autocheckpoint pragma] can be used to invoke this interface\n** from SQL.\n**\n** ^Checkpoints initiated by this mechanism are\n** [sqlite3_wal_checkpoint_v2|PASSIVE].\n**\n** ^Every new [database connection] defaults to having the auto-checkpoint\n** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]\n** pages.\n**\n** ^The use of this interface is only necessary if the default setting\n** is found to be suboptimal for a particular application.\n*/\nSQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);\n\n/*\n** CAPI3REF: Checkpoint a database\n** METHOD: sqlite3\n**\n** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to\n** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^\n**\n** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the\n** [write-ahead log] for database X on [database connection] D to be\n** transferred into the database file and for the write-ahead log to\n** be reset.  See the [checkpointing] documentation for addition\n** information.\n**\n** This interface used to be the only way to cause a checkpoint to\n** occur.  But then the newer and more powerful [sqlite3_wal_checkpoint_v2()]\n** interface was added.  This interface is retained for backwards\n** compatibility and as a convenience for applications that need to manually\n** start a callback but which do not need the full power (and corresponding\n** complication) of [sqlite3_wal_checkpoint_v2()].\n*/\nSQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);\n\n/*\n** CAPI3REF: Checkpoint a database\n** METHOD: sqlite3\n**\n** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint\n** operation on database X of [database connection] D in mode M.  Status\n** information is written back into integers pointed to by L and C.)^\n** ^(The M parameter must be a valid [checkpoint mode]:)^\n**\n** <dl>\n** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>\n**   ^Checkpoint as many frames as possible without waiting for any database\n**   readers or writers to finish, then sync the database file if all frames\n**   in the log were checkpointed. ^The [busy-handler callback]\n**   is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode.\n**   ^On the other hand, passive mode might leave the checkpoint unfinished\n**   if there are concurrent readers or writers.\n**\n** <dt>SQLITE_CHECKPOINT_FULL<dd>\n**   ^This mode blocks (it invokes the\n**   [sqlite3_busy_handler|busy-handler callback]) until there is no\n**   database writer and all readers are reading from the most recent database\n**   snapshot. ^It then checkpoints all frames in the log file and syncs the\n**   database file. ^This mode blocks new database writers while it is pending,\n**   but new database readers are allowed to continue unimpeded.\n**\n** <dt>SQLITE_CHECKPOINT_RESTART<dd>\n**   ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition\n**   that after checkpointing the log file it blocks (calls the\n**   [busy-handler callback])\n**   until all readers are reading from the database file only. ^This ensures\n**   that the next writer will restart the log file from the beginning.\n**   ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new\n**   database writer attempts while it is pending, but does not impede readers.\n**\n** <dt>SQLITE_CHECKPOINT_TRUNCATE<dd>\n**   ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the\n**   addition that it also truncates the log file to zero bytes just prior\n**   to a successful return.\n**\n** <dt>SQLITE_CHECKPOINT_NOOP<dd>\n**   ^This mode always checkpoints zero frames. The only reason to invoke\n**   a NOOP checkpoint is to access the values returned by\n**   sqlite3_wal_checkpoint_v2() via output parameters *pnLog and *pnCkpt.\n** </dl>\n**\n** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in\n** the log file or to -1 if the checkpoint could not run because\n** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not\n** NULL,then *pnCkpt is set to the total number of checkpointed frames in the\n** log file (including any that were already checkpointed before the function\n** was called) or to -1 if the checkpoint could not run due to an error or\n** because the database is not in WAL mode. ^Note that upon successful\n** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been\n** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero.\n**\n** ^All calls obtain an exclusive \"checkpoint\" lock on the database file. ^If\n** any other process is running a checkpoint operation at the same time, the\n** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a\n** busy-handler configured, it will not be invoked in this case.\n**\n** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the\n** exclusive \"writer\" lock on the database file. ^If the writer lock cannot be\n** obtained immediately, and a busy-handler is configured, it is invoked and\n** the writer lock retried until either the busy-handler returns 0 or the lock\n** is successfully obtained. ^The busy-handler is also invoked while waiting for\n** database readers as described above. ^If the busy-handler returns 0 before\n** the writer lock is obtained or while waiting for database readers, the\n** checkpoint operation proceeds from that point in the same way as\n** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible\n** without blocking any further. ^SQLITE_BUSY is returned in this case.\n**\n** ^If parameter zDb is NULL or points to a zero length string, then the\n** specified operation is attempted on all WAL databases [attached] to\n** [database connection] db.  In this case the\n** values written to output parameters *pnLog and *pnCkpt are undefined. ^If\n** an SQLITE_BUSY error is encountered when processing one or more of the\n** attached WAL databases, the operation is still attempted on any remaining\n** attached databases and SQLITE_BUSY is returned at the end. ^If any other\n** error occurs while processing an attached database, processing is abandoned\n** and the error code is returned to the caller immediately. ^If no error\n** (SQLITE_BUSY or otherwise) is encountered while processing the attached\n** databases, SQLITE_OK is returned.\n**\n** ^If database zDb is the name of an attached database that is not in WAL\n** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If\n** zDb is not NULL (or a zero length string) and is not the name of any\n** attached database, SQLITE_ERROR is returned to the caller.\n**\n** ^Unless it returns SQLITE_MISUSE,\n** the sqlite3_wal_checkpoint_v2() interface\n** sets the error information that is queried by\n** [sqlite3_errcode()] and [sqlite3_errmsg()].\n**\n** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface\n** from SQL.\n*/\nSQLITE_API int sqlite3_wal_checkpoint_v2(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of attached database (or NULL) */\n  int eMode,                      /* SQLITE_CHECKPOINT_* value */\n  int *pnLog,                     /* OUT: Size of WAL log in frames */\n  int *pnCkpt                     /* OUT: Total number of frames checkpointed */\n);\n\n/*\n** CAPI3REF: Checkpoint Mode Values\n** KEYWORDS: {checkpoint mode}\n**\n** These constants define all valid values for the \"checkpoint mode\" passed\n** as the third parameter to the [sqlite3_wal_checkpoint_v2()] interface.\n** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the\n** meaning of each of these checkpoint modes.\n*/\n#define SQLITE_CHECKPOINT_NOOP    -1  /* Do no work at all */\n#define SQLITE_CHECKPOINT_PASSIVE  0  /* Do as much as possible w/o blocking */\n#define SQLITE_CHECKPOINT_FULL     1  /* Wait for writers, then checkpoint */\n#define SQLITE_CHECKPOINT_RESTART  2  /* Like FULL but wait for readers */\n#define SQLITE_CHECKPOINT_TRUNCATE 3  /* Like RESTART but also truncate WAL */\n\n/*\n** CAPI3REF: Virtual Table Interface Configuration\n**\n** This function may be called by either the [xConnect] or [xCreate] method\n** of a [virtual table] implementation to configure\n** various facets of the virtual table interface.\n**\n** If this interface is invoked outside the context of an xConnect or\n** xCreate virtual table method then the behavior is undefined.\n**\n** In the call sqlite3_vtab_config(D,C,...) the D parameter is the\n** [database connection] in which the virtual table is being created and\n** which is passed in as the first argument to the [xConnect] or [xCreate]\n** method that is invoking sqlite3_vtab_config().  The C parameter is one\n** of the [virtual table configuration options].  The presence and meaning\n** of parameters after C depend on which [virtual table configuration option]\n** is used.\n*/\nSQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);\n\n/*\n** CAPI3REF: Virtual Table Configuration Options\n** KEYWORDS: {virtual table configuration options}\n** KEYWORDS: {virtual table configuration option}\n**\n** These macros define the various options to the\n** [sqlite3_vtab_config()] interface that [virtual table] implementations\n** can use to customize and optimize their behavior.\n**\n** <dl>\n** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]]\n** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,\n** where X is an integer.  If X is zero, then the [virtual table] whose\n** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not\n** support constraints.  In this configuration (which is the default) if\n** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire\n** statement is rolled back as if [ON CONFLICT | OR ABORT] had been\n** specified as part of the user's SQL statement, regardless of the actual\n** ON CONFLICT mode specified.\n**\n** If X is non-zero, then the virtual table implementation guarantees\n** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before\n** any modifications to internal or persistent data structures have been made.\n** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite\n** is able to roll back a statement or database transaction, and abandon\n** or continue processing the current SQL statement as appropriate.\n** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns\n** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode\n** had been ABORT.\n**\n** Virtual table implementations that are required to handle OR REPLACE\n** must do so within the [xUpdate] method. If a call to the\n** [sqlite3_vtab_on_conflict()] function indicates that the current ON\n** CONFLICT policy is REPLACE, the virtual table implementation should\n** silently replace the appropriate rows within the xUpdate callback and\n** return SQLITE_OK. Or, if this is not possible, it may return\n** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT\n** constraint handling.\n** </dd>\n**\n** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the\n** the [xConnect] or [xCreate] methods of a [virtual table] implementation\n** prohibits that virtual table from being used from within triggers and\n** views.\n** </dd>\n**\n** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the\n** [xConnect] or [xCreate] methods of a [virtual table] implementation\n** identify that virtual table as being safe to use from within triggers\n** and views.  Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the\n** virtual table can do no serious harm even if it is controlled by a\n** malicious hacker.  Developers should avoid setting the SQLITE_VTAB_INNOCUOUS\n** flag unless absolutely necessary.\n** </dd>\n**\n** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]<dt>SQLITE_VTAB_USES_ALL_SCHEMAS</dt>\n** <dd>Calls of the form\n** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the\n** the [xConnect] or [xCreate] methods of a [virtual table] implementation\n** instruct the query planner to begin at least a read transaction on\n** all schemas (\"main\", \"temp\", and any ATTACH-ed databases) whenever the\n** virtual table is used.\n** </dd>\n** </dl>\n*/\n#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1\n#define SQLITE_VTAB_INNOCUOUS          2\n#define SQLITE_VTAB_DIRECTONLY         3\n#define SQLITE_VTAB_USES_ALL_SCHEMAS   4\n\n/*\n** CAPI3REF: Determine The Virtual Table Conflict Policy\n**\n** This function may only be called from within a call to the [xUpdate] method\n** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The\n** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],\n** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode\n** of the SQL statement that triggered the call to the [xUpdate] method of the\n** [virtual table].\n*/\nSQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);\n\n/*\n** CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE\n**\n** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]\n** method of a [virtual table], then it might return true if the\n** column is being fetched as part of an UPDATE operation during which the\n** column value will not change.  The virtual table implementation can use\n** this hint as permission to substitute a return value that is less\n** expensive to compute and that the corresponding\n** [xUpdate] method understands as a \"no-change\" value.\n**\n** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that\n** the column is not changed by the UPDATE statement, then the xColumn\n** method can optionally return without setting a result, without calling\n** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].\n** In that case, [sqlite3_value_nochange(X)] will return true for the\n** same column in the [xUpdate] method.\n**\n** The sqlite3_vtab_nochange() routine is an optimization.  Virtual table\n** implementations should continue to give a correct answer even if the\n** sqlite3_vtab_nochange() interface were to always return false.  In the\n** current implementation, the sqlite3_vtab_nochange() interface does always\n** returns false for the enhanced [UPDATE FROM] statement.\n*/\nSQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);\n\n/*\n** CAPI3REF: Determine The Collation For a Virtual Table Constraint\n** METHOD: sqlite3_index_info\n**\n** This function may only be called from within a call to the [xBestIndex]\n** method of a [virtual table].  This function returns a pointer to a string\n** that is the name of the appropriate collation sequence to use for text\n** comparisons on the constraint identified by its arguments.\n**\n** The first argument must be the pointer to the [sqlite3_index_info] object\n** that is the first parameter to the xBestIndex() method. The second argument\n** must be an index into the aConstraint[] array belonging to the\n** sqlite3_index_info structure passed to xBestIndex.\n**\n** Important:\n** The first parameter must be the same pointer that is passed into the\n** xBestMethod() method.  The first parameter may not be a pointer to a\n** different [sqlite3_index_info] object, even an exact copy.\n**\n** The return value is computed as follows:\n**\n** <ol>\n** <li><p> If the constraint comes from a WHERE clause expression that contains\n**         a [COLLATE operator], then the name of the collation specified by\n**         that COLLATE operator is returned.\n** <li><p> If there is no COLLATE operator, but the column that is the subject\n**         of the constraint specifies an alternative collating sequence via\n**         a [COLLATE clause] on the column definition within the CREATE TABLE\n**         statement that was passed into [sqlite3_declare_vtab()], then the\n**         name of that alternative collating sequence is returned.\n** <li><p> Otherwise, \"BINARY\" is returned.\n** </ol>\n*/\nSQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);\n\n/*\n** CAPI3REF: Determine if a virtual table query is DISTINCT\n** METHOD: sqlite3_index_info\n**\n** This API may only be used from within an [xBestIndex|xBestIndex method]\n** of a [virtual table] implementation. The result of calling this\n** interface from outside of xBestIndex() is undefined and probably harmful.\n**\n** ^The sqlite3_vtab_distinct() interface returns an integer between 0 and\n** 3.  The integer returned by sqlite3_vtab_distinct()\n** gives the virtual table additional information about how the query\n** planner wants the output to be ordered. As long as the virtual table\n** can meet the ordering requirements of the query planner, it may set\n** the \"orderByConsumed\" flag.\n**\n** <ol><li value=\"0\"><p>\n** ^If the sqlite3_vtab_distinct() interface returns 0, that means\n** that the query planner needs the virtual table to return all rows in the\n** sort order defined by the \"nOrderBy\" and \"aOrderBy\" fields of the\n** [sqlite3_index_info] object.  This is the default expectation.  If the\n** virtual table outputs all rows in sorted order, then it is always safe for\n** the xBestIndex method to set the \"orderByConsumed\" flag, regardless of\n** the return value from sqlite3_vtab_distinct().\n** <li value=\"1\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 1, that means\n** that the query planner does not need the rows to be returned in sorted order\n** as long as all rows with the same values in all columns identified by the\n** \"aOrderBy\" field are adjacent.)^  This mode is used when the query planner\n** is doing a GROUP BY.\n** <li value=\"2\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 2, that means\n** that the query planner does not need the rows returned in any particular\n** order, as long as rows with the same values in all columns identified\n** by \"aOrderBy\" are adjacent.)^  ^(Furthermore, when two or more rows\n** contain the same values for all columns identified by \"colUsed\", all but\n** one such row may optionally be omitted from the result.)^\n** The virtual table is not required to omit rows that are duplicates\n** over the \"colUsed\" columns, but if the virtual table can do that without\n** too much extra effort, it could potentially help the query to run faster.\n** This mode is used for a DISTINCT query.\n** <li value=\"3\"><p>\n** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the\n** virtual table must return rows in the order defined by \"aOrderBy\" as\n** if the sqlite3_vtab_distinct() interface had returned 0.  However if\n** two or more rows in the result have the same values for all columns\n** identified by \"colUsed\", then all but one such row may optionally be\n** omitted.)^  Like when the return value is 2, the virtual table\n** is not required to omit rows that are duplicates over the \"colUsed\"\n** columns, but if the virtual table can do that without\n** too much extra effort, it could potentially help the query to run faster.\n** This mode is used for queries\n** that have both DISTINCT and ORDER BY clauses.\n** </ol>\n**\n** <p>The following table summarizes the conditions under which the\n** virtual table is allowed to set the \"orderByConsumed\" flag based on\n** the value returned by sqlite3_vtab_distinct().  This table is a\n** restatement of the previous four paragraphs:\n**\n** <table border=1 cellspacing=0 cellpadding=10 width=\"90%\">\n** <tr>\n** <td valign=\"top\">sqlite3_vtab_distinct() return value\n** <td valign=\"top\">Rows are returned in aOrderBy order\n** <td valign=\"top\">Rows with the same value in all aOrderBy columns are adjacent\n** <td valign=\"top\">Duplicates over all colUsed columns may be omitted\n** <tr><td>0<td>yes<td>yes<td>no\n** <tr><td>1<td>no<td>yes<td>no\n** <tr><td>2<td>no<td>yes<td>yes\n** <tr><td>3<td>yes<td>yes<td>yes\n** </table>\n**\n** ^For the purposes of comparing virtual table output values to see if the\n** values are the same value for sorting purposes, two NULL values are considered\n** to be the same.  In other words, the comparison operator is \"IS\"\n** (or \"IS NOT DISTINCT FROM\") and not \"==\".\n**\n** If a virtual table implementation is unable to meet the requirements\n** specified above, then it must not set the \"orderByConsumed\" flag in the\n** [sqlite3_index_info] object or an incorrect answer may result.\n**\n** ^A virtual table implementation is always free to return rows in any order\n** it wants, as long as the \"orderByConsumed\" flag is not set.  ^When the\n** \"orderByConsumed\" flag is unset, the query planner will add extra\n** [bytecode] to ensure that the final results returned by the SQL query are\n** ordered correctly.  The use of the \"orderByConsumed\" flag and the\n** sqlite3_vtab_distinct() interface is merely an optimization.  ^Careful\n** use of the sqlite3_vtab_distinct() interface and the \"orderByConsumed\"\n** flag might help queries against a virtual table to run faster.  Being\n** overly aggressive and setting the \"orderByConsumed\" flag when it is not\n** valid to do so, on the other hand, might cause SQLite to return incorrect\n** results.\n*/\nSQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);\n\n/*\n** CAPI3REF: Identify and handle IN constraints in xBestIndex\n**\n** This interface may only be used from within an\n** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.\n** The result of invoking this interface from any other context is\n** undefined and probably harmful.\n**\n** ^(A constraint on a virtual table of the form\n** \"[IN operator|column IN (...)]\" is\n** communicated to the xBestIndex method as a\n** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^  If xBestIndex wants to use\n** this constraint, it must set the corresponding\n** aConstraintUsage[].argvIndex to a positive integer.  ^(Then, under\n** the usual mode of handling IN operators, SQLite generates [bytecode]\n** that invokes the [xFilter|xFilter() method] once for each value\n** on the right-hand side of the IN operator.)^  Thus the virtual table\n** only sees a single value from the right-hand side of the IN operator\n** at a time.\n**\n** In some cases, however, it would be advantageous for the virtual\n** table to see all values on the right-hand of the IN operator all at\n** once.  The sqlite3_vtab_in() interfaces facilitates this in two ways:\n**\n** <ol>\n** <li><p>\n**   ^A call to sqlite3_vtab_in(P,N,-1) will return true (non-zero)\n**   if and only if the [sqlite3_index_info|P->aConstraint][N] constraint\n**   is an [IN operator] that can be processed all at once.  ^In other words,\n**   sqlite3_vtab_in() with -1 in the third argument is a mechanism\n**   by which the virtual table can ask SQLite if all-at-once processing\n**   of the IN operator is even possible.\n**\n** <li><p>\n**   ^A call to sqlite3_vtab_in(P,N,F) with F==1 or F==0 indicates\n**   to SQLite that the virtual table does or does not want to process\n**   the IN operator all-at-once, respectively.  ^Thus when the third\n**   parameter (F) is non-negative, this interface is the mechanism by\n**   which the virtual table tells SQLite how it wants to process the\n**   IN operator.\n** </ol>\n**\n** ^The sqlite3_vtab_in(P,N,F) interface can be invoked multiple times\n** within the same xBestIndex method call.  ^For any given P,N pair,\n** the return value from sqlite3_vtab_in(P,N,F) will always be the same\n** within the same xBestIndex call.  ^If the interface returns true\n** (non-zero), that means that the constraint is an IN operator\n** that can be processed all-at-once.  ^If the constraint is not an IN\n** operator or cannot be processed all-at-once, then the interface returns\n** false.\n**\n** ^(All-at-once processing of the IN operator is selected if both of the\n** following conditions are met:\n**\n** <ol>\n** <li><p> The P->aConstraintUsage[N].argvIndex value is set to a positive\n** integer.  This is how the virtual table tells SQLite that it wants to\n** use the N-th constraint.\n**\n** <li><p> The last call to sqlite3_vtab_in(P,N,F) for which F was\n** non-negative had F>=1.\n** </ol>)^\n**\n** ^If either or both of the conditions above are false, then SQLite uses\n** the traditional one-at-a-time processing strategy for the IN constraint.\n** ^If both conditions are true, then the argvIndex-th parameter to the\n** xFilter method will be an [sqlite3_value] that appears to be NULL,\n** but which can be passed to [sqlite3_vtab_in_first()] and\n** [sqlite3_vtab_in_next()] to find all values on the right-hand side\n** of the IN constraint.\n*/\nSQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);\n\n/*\n** CAPI3REF: Find all elements on the right-hand side of an IN constraint.\n**\n** These interfaces are only useful from within the\n** [xFilter|xFilter() method] of a [virtual table] implementation.\n** The result of invoking these interfaces from any other context\n** is undefined and probably harmful.\n**\n** The X parameter in a call to sqlite3_vtab_in_first(X,P) or\n** sqlite3_vtab_in_next(X,P) should be one of the parameters to the\n** xFilter method which invokes these routines, and specifically\n** a parameter that was previously selected for all-at-once IN constraint\n** processing using the [sqlite3_vtab_in()] interface in the\n** [xBestIndex|xBestIndex method].  ^(If the X parameter is not\n** an xFilter argument that was selected for all-at-once IN constraint\n** processing, then these routines return [SQLITE_ERROR].)^\n**\n** ^(Use these routines to access all values on the right-hand side\n** of the IN constraint using code like the following:\n**\n** <blockquote><pre>\n** &nbsp;  for(rc=sqlite3_vtab_in_first(pList, &pVal);\n** &nbsp;      rc==SQLITE_OK && pVal;\n** &nbsp;      rc=sqlite3_vtab_in_next(pList, &pVal)\n** &nbsp;  ){\n** &nbsp;    // do something with pVal\n** &nbsp;  }\n** &nbsp;  if( rc!=SQLITE_DONE ){\n** &nbsp;    // an error has occurred\n** &nbsp;  }\n** </pre></blockquote>)^\n**\n** ^On success, the sqlite3_vtab_in_first(X,P) and sqlite3_vtab_in_next(X,P)\n** routines return SQLITE_OK and set *P to point to the first or next value\n** on the RHS of the IN constraint.  ^If there are no more values on the\n** right hand side of the IN constraint, then *P is set to NULL and these\n** routines return [SQLITE_DONE].  ^The return value might be\n** some other value, such as SQLITE_NOMEM, in the event of a malfunction.\n**\n** The *ppOut values returned by these routines are only valid until the\n** next call to either of these routines or until the end of the xFilter\n** method from which these routines were called.  If the virtual table\n** implementation needs to retain the *ppOut values for longer, it must make\n** copies.  The *ppOut values are [protected sqlite3_value|protected].\n*/\nSQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut);\nSQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);\n\n/*\n** CAPI3REF: Constraint values in xBestIndex()\n** METHOD: sqlite3_index_info\n**\n** This API may only be used from within the [xBestIndex|xBestIndex method]\n** of a [virtual table] implementation. The result of calling this interface\n** from outside of an xBestIndex method are undefined and probably harmful.\n**\n** ^When the sqlite3_vtab_rhs_value(P,J,V) interface is invoked from within\n** the [xBestIndex] method of a [virtual table] implementation, with P being\n** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and\n** J being a 0-based index into P->aConstraint[], then this routine\n** attempts to set *V to the value of the right-hand operand of\n** that constraint if the right-hand operand is known.  ^If the\n** right-hand operand is not known, then *V is set to a NULL pointer.\n** ^The sqlite3_vtab_rhs_value(P,J,V) interface returns SQLITE_OK if\n** and only if *V is set to a value.  ^The sqlite3_vtab_rhs_value(P,J,V)\n** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th\n** constraint is not available.  ^The sqlite3_vtab_rhs_value() interface\n** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if\n** something goes wrong.\n**\n** The sqlite3_vtab_rhs_value() interface is usually only successful if\n** the right-hand operand of a constraint is a literal value in the original\n** SQL statement.  If the right-hand operand is an expression or a reference\n** to some other column or a [host parameter], then sqlite3_vtab_rhs_value()\n** will probably return [SQLITE_NOTFOUND].\n**\n** ^(Some constraints, such as [SQLITE_INDEX_CONSTRAINT_ISNULL] and\n** [SQLITE_INDEX_CONSTRAINT_ISNOTNULL], have no right-hand operand.  For such\n** constraints, sqlite3_vtab_rhs_value() always returns SQLITE_NOTFOUND.)^\n**\n** ^The [sqlite3_value] object returned in *V is a protected sqlite3_value\n** and remains valid for the duration of the xBestIndex method call.\n** ^When xBestIndex returns, the sqlite3_value object returned by\n** sqlite3_vtab_rhs_value() is automatically deallocated.\n**\n** The \"_rhs_\" in the name of this routine is an abbreviation for\n** \"Right-Hand Side\".\n*/\nSQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **ppVal);\n\n/*\n** CAPI3REF: Conflict resolution modes\n** KEYWORDS: {conflict resolution mode}\n**\n** These constants are returned by [sqlite3_vtab_on_conflict()] to\n** inform a [virtual table] implementation of the [ON CONFLICT] mode\n** for the SQL statement being evaluated.\n**\n** Note that the [SQLITE_IGNORE] constant is also used as a potential\n** return value from the [sqlite3_set_authorizer()] callback and that\n** [SQLITE_ABORT] is also a [result code].\n*/\n#define SQLITE_ROLLBACK 1\n/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */\n#define SQLITE_FAIL     3\n/* #define SQLITE_ABORT 4  // Also an error code */\n#define SQLITE_REPLACE  5\n\n/*\n** CAPI3REF: Prepared Statement Scan Status Opcodes\n** KEYWORDS: {scanstatus options}\n**\n** The following constants can be used for the T parameter to the\n** [sqlite3_stmt_scanstatus(S,X,T,V)] interface.  Each constant designates a\n** different metric for sqlite3_stmt_scanstatus() to return.\n**\n** When the value returned to V is a string, space to hold that string is\n** managed by the prepared statement S and will be automatically freed when\n** S is finalized.\n**\n** Not all values are available for all query elements. When a value is\n** not available, the output variable is set to -1 if the value is numeric,\n** or to NULL if it is a string (SQLITE_SCANSTAT_NAME).\n**\n** <dl>\n** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt>\n** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be\n** set to the total number of times that the X-th loop has run.</dd>\n**\n** [[SQLITE_SCANSTAT_NVISIT]] <dt>SQLITE_SCANSTAT_NVISIT</dt>\n** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be set\n** to the total number of rows examined by all iterations of the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>\n** <dd>^The \"double\" variable pointed to by the V parameter will be set to the\n** query planner's estimate for the average number of rows output from each\n** iteration of the X-th loop.  If the query planner's estimate was accurate,\n** then this value will approximate the quotient NVISIT/NLOOP and the\n** product of this value for all prior loops with the same SELECTID will\n** be the NLOOP value for the current loop.</dd>\n**\n** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>\n** <dd>^The \"const char *\" variable pointed to by the V parameter will be set\n** to a zero-terminated UTF-8 string containing the name of the index or table\n** used for the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>\n** <dd>^The \"const char *\" variable pointed to by the V parameter will be set\n** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]\n** description for the X-th loop.</dd>\n**\n** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>\n** <dd>^The \"int\" variable pointed to by the V parameter will be set to the\n** id for the X-th query plan element. The id value is unique within the\n** statement. The select-id is the same value as is output in the first\n** column of an [EXPLAIN QUERY PLAN] query.</dd>\n**\n** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>\n** <dd>The \"int\" variable pointed to by the V parameter will be set to the\n** id of the parent of the current query element, if applicable, or\n** to zero if the query element has no parent. This is the same value as\n** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>\n**\n** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>\n** <dd>The sqlite3_int64 output value is set to the number of cycles,\n** according to the processor time-stamp counter, that elapsed while the\n** query element was being processed. This value is not available for\n** all query elements - if it is unavailable the output variable is\n** set to -1.</dd>\n** </dl>\n*/\n#define SQLITE_SCANSTAT_NLOOP    0\n#define SQLITE_SCANSTAT_NVISIT   1\n#define SQLITE_SCANSTAT_EST      2\n#define SQLITE_SCANSTAT_NAME     3\n#define SQLITE_SCANSTAT_EXPLAIN  4\n#define SQLITE_SCANSTAT_SELECTID 5\n#define SQLITE_SCANSTAT_PARENTID 6\n#define SQLITE_SCANSTAT_NCYCLE   7\n\n/*\n** CAPI3REF: Prepared Statement Scan Status\n** METHOD: sqlite3_stmt\n**\n** These interfaces return information about the predicted and measured\n** performance for pStmt.  Advanced applications can use this\n** interface to compare the predicted and the measured performance and\n** issue warnings and/or rerun [ANALYZE] if discrepancies are found.\n**\n** Since this interface is expected to be rarely used, it is only\n** available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS]\n** compile-time option.\n**\n** The \"iScanStatusOp\" parameter determines which status information to return.\n** The \"iScanStatusOp\" must be one of the [scanstatus options] or the behavior\n** of this interface is undefined. ^The requested measurement is written into\n** a variable pointed to by the \"pOut\" parameter.\n**\n** The \"flags\" parameter must be passed a mask of flags. At present only\n** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX\n** is specified, then status information is available for all elements\n** of a query plan that are reported by \"EXPLAIN QUERY PLAN\" output. If\n** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements\n** that correspond to query loops (the \"SCAN...\" and \"SEARCH...\" elements of\n** the EXPLAIN QUERY PLAN output) are available. Invoking API\n** sqlite3_stmt_scanstatus() is equivalent to calling\n** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.\n**\n** Parameter \"idx\" identifies the specific query element to retrieve statistics\n** for. Query elements are numbered starting from zero. A value of -1 may\n** retrieve statistics for the entire query. ^If idx is out of range\n** - less than -1 or greater than or equal to the total number of query\n** elements used to implement the statement - a non-zero value is returned and\n** the variable that pOut points to is unchanged.\n**\n** See also: [sqlite3_stmt_scanstatus_reset()]\n*/\nSQLITE_API int sqlite3_stmt_scanstatus(\n  sqlite3_stmt *pStmt,      /* Prepared statement for which info desired */\n  int idx,                  /* Index of loop to report on */\n  int iScanStatusOp,        /* Information desired.  SQLITE_SCANSTAT_* */\n  void *pOut                /* Result written here */\n);\nSQLITE_API int sqlite3_stmt_scanstatus_v2(\n  sqlite3_stmt *pStmt,      /* Prepared statement for which info desired */\n  int idx,                  /* Index of loop to report on */\n  int iScanStatusOp,        /* Information desired.  SQLITE_SCANSTAT_* */\n  int flags,                /* Mask of flags defined below */\n  void *pOut                /* Result written here */\n);\n\n/*\n** CAPI3REF: Prepared Statement Scan Status\n** KEYWORDS: {scan status flags}\n*/\n#define SQLITE_SCANSTAT_COMPLEX 0x0001\n\n/*\n** CAPI3REF: Zero Scan-Status Counters\n** METHOD: sqlite3_stmt\n**\n** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.\n**\n** This API is only available if the library is built with pre-processor\n** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.\n*/\nSQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);\n\n/*\n** CAPI3REF: Flush caches to disk mid-transaction\n** METHOD: sqlite3\n**\n** ^If a write-transaction is open on [database connection] D when the\n** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty\n** pages in the pager-cache that are not currently in use are written out\n** to disk. A dirty page may be in use if a database cursor created by an\n** active SQL statement is reading from it, or if it is page 1 of a database\n** file (page 1 is always \"in use\").  ^The [sqlite3_db_cacheflush(D)]\n** interface flushes caches for all schemas - \"main\", \"temp\", and\n** any [attached] databases.\n**\n** ^If this function needs to obtain extra database locks before dirty pages\n** can be flushed to disk, it does so. ^If those locks cannot be obtained\n** immediately and there is a busy-handler callback configured, it is invoked\n** in the usual manner. ^If the required lock still cannot be obtained, then\n** the database is skipped and an attempt made to flush any dirty pages\n** belonging to the next (if any) database. ^If any databases are skipped\n** because locks cannot be obtained, but no other error occurs, this\n** function returns SQLITE_BUSY.\n**\n** ^If any other error occurs while flushing dirty pages to disk (for\n** example an IO error or out-of-memory condition), then processing is\n** abandoned and an SQLite [error code] is returned to the caller immediately.\n**\n** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.\n**\n** ^This function does not set the database handle error code or message\n** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.\n*/\nSQLITE_API int sqlite3_db_cacheflush(sqlite3*);\n\n/*\n** CAPI3REF: The pre-update hook.\n** METHOD: sqlite3\n**\n** ^These interfaces are only available if SQLite is compiled using the\n** [SQLITE_ENABLE_PREUPDATE_HOOK] compile-time option.\n**\n** ^The [sqlite3_preupdate_hook()] interface registers a callback function\n** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation\n** on a database table.\n** ^At most one preupdate hook may be registered at a time on a single\n** [database connection]; each call to [sqlite3_preupdate_hook()] overrides\n** the previous setting.\n** ^The preupdate hook is disabled by invoking [sqlite3_preupdate_hook()]\n** with a NULL pointer as the second parameter.\n** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as\n** the first parameter to callbacks.\n**\n** ^The preupdate hook only fires for changes to real database tables; the\n** preupdate hook is not invoked for changes to [virtual tables] or to\n** system tables like sqlite_sequence or sqlite_stat1.\n**\n** ^The second parameter to the preupdate callback is a pointer to\n** the [database connection] that registered the preupdate hook.\n** ^The third parameter to the preupdate callback is one of the constants\n** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the\n** kind of update operation that is about to occur.\n** ^(The fourth parameter to the preupdate callback is the name of the\n** database within the database connection that is being modified.  This\n** will be \"main\" for the main database or \"temp\" for TEMP tables or\n** the name given after the AS keyword in the [ATTACH] statement for attached\n** databases.)^\n** ^The fifth parameter to the preupdate callback is the name of the\n** table that is being modified.\n**\n** For an UPDATE or DELETE operation on a [rowid table], the sixth\n** parameter passed to the preupdate callback is the initial [rowid] of the\n** row being modified or deleted. For an INSERT operation on a rowid table,\n** or any operation on a WITHOUT ROWID table, the value of the sixth\n** parameter is undefined. For an INSERT or UPDATE on a rowid table the\n** seventh parameter is the final rowid value of the row being inserted\n** or updated. The value of the seventh parameter passed to the callback\n** function is not defined for operations on WITHOUT ROWID tables, or for\n** DELETE operations on rowid tables.\n**\n** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from\n** the previous call on the same [database connection] D, or NULL for\n** the first call on D.\n**\n** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()],\n** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces\n** provide additional information about a preupdate event. These routines\n** may only be called from within a preupdate callback.  Invoking any of\n** these routines from outside of a preupdate callback or with a\n** [database connection] pointer that is different from the one supplied\n** to the preupdate callback results in undefined and probably undesirable\n** behavior.\n**\n** ^The [sqlite3_preupdate_count(D)] interface returns the number of columns\n** in the row that is being inserted, updated, or deleted.\n**\n** ^The [sqlite3_preupdate_old(D,N,P)] interface writes into P a pointer to\n** a [protected sqlite3_value] that contains the value of the Nth column of\n** the table row before it is updated.  The N parameter must be between 0\n** and one less than the number of columns or the behavior will be\n** undefined. This must only be used within SQLITE_UPDATE and SQLITE_DELETE\n** preupdate callbacks; if it is used by an SQLITE_INSERT callback then the\n** behavior is undefined.  The [sqlite3_value] that P points to\n** will be destroyed when the preupdate callback returns.\n**\n** ^The [sqlite3_preupdate_new(D,N,P)] interface writes into P a pointer to\n** a [protected sqlite3_value] that contains the value of the Nth column of\n** the table row after it is updated.  The N parameter must be between 0\n** and one less than the number of columns or the behavior will be\n** undefined. This must only be used within SQLITE_INSERT and SQLITE_UPDATE\n** preupdate callbacks; if it is used by an SQLITE_DELETE callback then the\n** behavior is undefined.  The [sqlite3_value] that P points to\n** will be destroyed when the preupdate callback returns.\n**\n** ^The [sqlite3_preupdate_depth(D)] interface returns 0 if the preupdate\n** callback was invoked as a result of a direct insert, update, or delete\n** operation; or 1 for inserts, updates, or deletes invoked by top-level\n** triggers; or 2 for changes resulting from triggers called by top-level\n** triggers; and so forth.\n**\n** When the [sqlite3_blob_write()] API is used to update a blob column,\n** the pre-update hook is invoked with SQLITE_DELETE, because\n** the new values are not yet available. In this case, when a\n** callback made with op==SQLITE_DELETE is actually a write using the\n** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns\n** the index of the column being written. In other cases, where the\n** pre-update hook is being invoked for some other reason, including a\n** regular DELETE, sqlite3_preupdate_blobwrite() returns -1.\n**\n** See also:  [sqlite3_update_hook()]\n*/\n#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)\nSQLITE_API void *sqlite3_preupdate_hook(\n  sqlite3 *db,\n  void(*xPreUpdate)(\n    void *pCtx,                   /* Copy of third arg to preupdate_hook() */\n    sqlite3 *db,                  /* Database handle */\n    int op,                       /* SQLITE_UPDATE, DELETE or INSERT */\n    char const *zDb,              /* Database name */\n    char const *zName,            /* Table name */\n    sqlite3_int64 iKey1,          /* Rowid of row about to be deleted/updated */\n    sqlite3_int64 iKey2           /* New rowid value (for a rowid UPDATE) */\n  ),\n  void*\n);\nSQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);\nSQLITE_API int sqlite3_preupdate_count(sqlite3 *);\nSQLITE_API int sqlite3_preupdate_depth(sqlite3 *);\nSQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);\nSQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *);\n#endif\n\n/*\n** CAPI3REF: Low-level system error code\n** METHOD: sqlite3\n**\n** ^Attempt to return the underlying operating system error code or error\n** number that caused the most recent I/O error or failure to open a file.\n** The return value is OS-dependent.  For example, on unix systems, after\n** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be\n** called to get back the underlying \"errno\" that caused the problem, such\n** as ENOSPC, EAUTH, EISDIR, and so forth.\n*/\nSQLITE_API int sqlite3_system_errno(sqlite3*);\n\n/*\n** CAPI3REF: Database Snapshot\n** KEYWORDS: {snapshot} {sqlite3_snapshot}\n**\n** An instance of the snapshot object records the state of a [WAL mode]\n** database for some specific point in history.\n**\n** In [WAL mode], multiple [database connections] that are open on the\n** same database file can each be reading a different historical version\n** of the database file.  When a [database connection] begins a read\n** transaction, that connection sees an unchanging copy of the database\n** as it existed for the point in time when the transaction first started.\n** Subsequent changes to the database from other connections are not seen\n** by the reader until a new read transaction is started.\n**\n** The sqlite3_snapshot object records state information about an historical\n** version of the database file so that it is possible to later open a new read\n** transaction that sees that historical version of the database rather than\n** the most recent version.\n*/\ntypedef struct sqlite3_snapshot {\n  unsigned char hidden[48];\n} sqlite3_snapshot;\n\n/*\n** CAPI3REF: Record A Database Snapshot\n** CONSTRUCTOR: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a\n** new [sqlite3_snapshot] object that records the current state of\n** schema S in database connection D.  ^On success, the\n** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly\n** created [sqlite3_snapshot] object into *P and returns SQLITE_OK.\n** If there is not already a read-transaction open on schema S when\n** this function is called, one is opened automatically.\n**\n** If a read-transaction is opened by this function, then it is guaranteed\n** that the returned snapshot object may not be invalidated by a database\n** writer or checkpointer until after the read-transaction is closed. This\n** is not guaranteed if a read-transaction is already open when this\n** function is called. In that case, any subsequent write or checkpoint\n** operation on the database may invalidate the returned snapshot handle,\n** even while the read-transaction remains open.\n**\n** The following must be true for this function to succeed. If any of\n** the following statements are false when sqlite3_snapshot_get() is\n** called, SQLITE_ERROR is returned. The final value of *P is undefined\n** in this case.\n**\n** <ul>\n**   <li> The database handle must not be in [autocommit mode].\n**\n**   <li> Schema S of [database connection] D must be a [WAL mode] database.\n**\n**   <li> There must not be a write transaction open on schema S of database\n**        connection D.\n**\n**   <li> One or more transactions must have been written to the current wal\n**        file since it was created on disk (by any connection). This means\n**        that a snapshot cannot be taken on a wal mode database with no wal\n**        file immediately after it is first opened. At least one transaction\n**        must be written to it first.\n** </ul>\n**\n** This function may also return SQLITE_NOMEM.  If it is called with the\n** database handle in autocommit mode but fails for some other reason,\n** whether or not a read transaction is opened on schema S is undefined.\n**\n** The [sqlite3_snapshot] object returned from a successful call to\n** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]\n** to avoid a memory leak.\n**\n** The [sqlite3_snapshot_get()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API int sqlite3_snapshot_get(\n  sqlite3 *db,\n  const char *zSchema,\n  sqlite3_snapshot **ppSnapshot\n);\n\n/*\n** CAPI3REF: Start a read transaction on an historical snapshot\n** METHOD: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read\n** transaction or upgrades an existing one for schema S of\n** [database connection] D such that the read transaction refers to\n** historical [snapshot] P, rather than the most recent change to the\n** database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK\n** on success or an appropriate [error code] if it fails.\n**\n** ^In order to succeed, the database connection must not be in\n** [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there\n** is already a read transaction open on schema S, then the database handle\n** must have no active statements (SELECT statements that have been passed\n** to sqlite3_step() but not sqlite3_reset() or sqlite3_finalize()).\n** SQLITE_ERROR is returned if either of these conditions is violated, or\n** if schema S does not exist, or if the snapshot object is invalid.\n**\n** ^A call to sqlite3_snapshot_open() will fail to open if the specified\n** snapshot has been overwritten by a [checkpoint]. In this case\n** SQLITE_ERROR_SNAPSHOT is returned.\n**\n** If there is already a read transaction open when this function is\n** invoked, then the same read transaction remains open (on the same\n** database snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT\n** is returned. If another error code - for example SQLITE_PROTOCOL or an\n** SQLITE_IOERR error code - is returned, then the final state of the\n** read transaction is undefined. If SQLITE_OK is returned, then the\n** read transaction is now open on database snapshot P.\n**\n** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the\n** database connection D does not know that the database file for\n** schema S is in [WAL mode].  A database connection might not know\n** that the database file is in [WAL mode] if there has been no prior\n** I/O on that database connection, or if the database entered [WAL mode]\n** after the most recent I/O on the database connection.)^\n** (Hint: Run \"[PRAGMA application_id]\" against a newly opened\n** database connection in order to make it ready to use snapshots.)\n**\n** The [sqlite3_snapshot_open()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API int sqlite3_snapshot_open(\n  sqlite3 *db,\n  const char *zSchema,\n  sqlite3_snapshot *pSnapshot\n);\n\n/*\n** CAPI3REF: Destroy a snapshot\n** DESTRUCTOR: sqlite3_snapshot\n**\n** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P.\n** The application must eventually free every [sqlite3_snapshot] object\n** using this routine to avoid a memory leak.\n**\n** The [sqlite3_snapshot_free()] interface is only available when the\n** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used.\n*/\nSQLITE_API void sqlite3_snapshot_free(sqlite3_snapshot*);\n\n/*\n** CAPI3REF: Compare the ages of two snapshot handles.\n** METHOD: sqlite3_snapshot\n**\n** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages\n** of two valid snapshot handles.\n**\n** If the two snapshot handles are not associated with the same database\n** file, the result of the comparison is undefined.\n**\n** Additionally, the result of the comparison is only valid if both of the\n** snapshot handles were obtained by calling sqlite3_snapshot_get() since the\n** last time the wal file was deleted. The wal file is deleted when the\n** database is changed back to rollback mode or when the number of database\n** clients drops to zero. If either snapshot handle was obtained before the\n** wal file was last deleted, the value returned by this function\n** is undefined.\n**\n** Otherwise, this API returns a negative value if P1 refers to an older\n** snapshot than P2, zero if the two handles refer to the same database\n** snapshot, and a positive value if P1 is a newer snapshot than P2.\n**\n** This interface is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SNAPSHOT] option.\n*/\nSQLITE_API int sqlite3_snapshot_cmp(\n  sqlite3_snapshot *p1,\n  sqlite3_snapshot *p2\n);\n\n/*\n** CAPI3REF: Recover snapshots from a wal file\n** METHOD: sqlite3_snapshot\n**\n** If a [WAL file] remains on disk after all database connections close\n** (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control]\n** or because the last process to have the database opened exited without\n** calling [sqlite3_close()]) and a new connection is subsequently opened\n** on that database and [WAL file], the [sqlite3_snapshot_open()] interface\n** will only be able to open the last transaction added to the WAL file\n** even though the WAL file contains other valid transactions.\n**\n** This function attempts to scan the WAL file associated with database zDb\n** of database handle db and make all valid snapshots available to\n** sqlite3_snapshot_open(). It is an error if there is already a read\n** transaction open on the database, or if the database is not a WAL mode\n** database.\n**\n** SQLITE_OK is returned if successful, or an SQLite error code otherwise.\n**\n** This interface is only available if SQLite is compiled with the\n** [SQLITE_ENABLE_SNAPSHOT] option.\n*/\nSQLITE_API int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);\n\n/*\n** CAPI3REF: Serialize a database\n**\n** The sqlite3_serialize(D,S,P,F) interface returns a pointer to\n** memory that is a serialization of the S database on\n** [database connection] D.  If S is a NULL pointer, the main database is used.\n** If P is not a NULL pointer, then the size of the database in bytes\n** is written into *P.\n**\n** For an ordinary on-disk database file, the serialization is just a\n** copy of the disk file.  For an in-memory database or a \"TEMP\" database,\n** the serialization is the same sequence of bytes which would be written\n** to disk if that database were backed up to disk.\n**\n** The usual case is that sqlite3_serialize() copies the serialization of\n** the database into memory obtained from [sqlite3_malloc64()] and returns\n** a pointer to that memory.  The caller is responsible for freeing the\n** returned value to avoid a memory leak.  However, if the F argument\n** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations\n** are made, and the sqlite3_serialize() function will return a pointer\n** to the contiguous memory representation of the database that SQLite\n** is currently using for that database, or NULL if no such contiguous\n** memory representation of the database exists.  A contiguous memory\n** representation of the database will usually only exist if there has\n** been a prior call to [sqlite3_deserialize(D,S,...)] with the same\n** values of D and S.\n** The size of the database is written into *P even if the\n** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy\n** of the database exists.\n**\n** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,\n** the returned buffer content will remain accessible and unchanged\n** until either the next write operation on the connection or when\n** the connection is closed, and applications must not modify the\n** buffer. If the bit had been clear, the returned buffer will not\n** be accessed by SQLite after the call.\n**\n** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the\n** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory\n** allocation error occurs.\n**\n** This interface is omitted if SQLite is compiled with the\n** [SQLITE_OMIT_DESERIALIZE] option.\n*/\nSQLITE_API unsigned char *sqlite3_serialize(\n  sqlite3 *db,           /* The database connection */\n  const char *zSchema,   /* Which DB to serialize. ex: \"main\", \"temp\", ... */\n  sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */\n  unsigned int mFlags    /* Zero or more SQLITE_SERIALIZE_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3_serialize\n**\n** Zero or more of the following constants can be OR-ed together for\n** the F argument to [sqlite3_serialize(D,S,P,F)].\n**\n** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return\n** a pointer to contiguous in-memory database that it is currently using,\n** without making a copy of the database.  If SQLite is not currently using\n** a contiguous in-memory database, then this option causes\n** [sqlite3_serialize()] to return a NULL pointer.  SQLite will only be\n** using a contiguous in-memory database if it has been initialized by a\n** prior call to [sqlite3_deserialize()].\n*/\n#define SQLITE_SERIALIZE_NOCOPY 0x001   /* Do no memory allocations */\n\n/*\n** CAPI3REF: Deserialize a database\n**\n** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the\n** [database connection] D to disconnect from database S and then\n** reopen S as an in-memory database based on the serialization\n** contained in P.  If S is a NULL pointer, the main database is\n** used. The serialized database P is N bytes in size.  M is the size\n** of the buffer P, which might be larger than N.  If M is larger than\n** N, and the SQLITE_DESERIALIZE_READONLY bit is not set in F, then\n** SQLite is permitted to add content to the in-memory database as\n** long as the total size does not exceed M bytes.\n**\n** If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will\n** invoke sqlite3_free() on the serialization buffer when the database\n** connection closes.  If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then\n** SQLite will try to increase the buffer size using sqlite3_realloc64()\n** if writes on the database cause it to grow larger than M bytes.\n**\n** Applications must not modify the buffer P or invalidate it before\n** the database connection D is closed.\n**\n** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the\n** database is currently in a read transaction or is involved in a backup\n** operation.\n**\n** It is not possible to deserialize into the TEMP database.  If the\n** S argument to sqlite3_deserialize(D,S,P,N,M,F) is \"temp\" then the\n** function returns SQLITE_ERROR.\n**\n** The deserialized database should not be in [WAL mode].  If the database\n** is in WAL mode, then any attempt to use the database file will result\n** in an [SQLITE_CANTOPEN] error.  The application can set the\n** [file format version numbers] (bytes 18 and 19) of the input database P\n** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the\n** database file into rollback mode and work around this limitation.\n**\n** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the\n** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then\n** [sqlite3_free()] is invoked on argument P prior to returning.\n**\n** This interface is omitted if SQLite is compiled with the\n** [SQLITE_OMIT_DESERIALIZE] option.\n*/\nSQLITE_API int sqlite3_deserialize(\n  sqlite3 *db,            /* The database connection */\n  const char *zSchema,    /* Which DB to reopen with the deserialization */\n  unsigned char *pData,   /* The serialized database content */\n  sqlite3_int64 szDb,     /* Number of bytes in the deserialization */\n  sqlite3_int64 szBuf,    /* Total size of buffer pData[] */\n  unsigned mFlags         /* Zero or more SQLITE_DESERIALIZE_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3_deserialize()\n**\n** The following are allowed values for the 6th argument (the F argument) to\n** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.\n**\n** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization\n** in the P argument is held in memory obtained from [sqlite3_malloc64()]\n** and that SQLite should take ownership of this memory and automatically\n** free it when it has finished using it.  Without this flag, the caller\n** is responsible for freeing any dynamically allocated memory.\n**\n** The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to\n** grow the size of the database using calls to [sqlite3_realloc64()].  This\n** flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.\n** Without this flag, the deserialized database cannot increase in size beyond\n** the number of bytes specified by the M parameter.\n**\n** The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database\n** should be treated as read-only.\n*/\n#define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */\n#define SQLITE_DESERIALIZE_RESIZEABLE  2 /* Resize using sqlite3_realloc64() */\n#define SQLITE_DESERIALIZE_READONLY    4 /* Database is read-only */\n\n/*\n** CAPI3REF: Bind array values to the CARRAY table-valued function\n**\n** The sqlite3_carray_bind(S,I,P,N,F,X) interface binds an array value to\n** one of the first argument of the [carray() table-valued function].  The\n** S parameter is a pointer to the [prepared statement] that uses the carray()\n** functions.  I is the parameter index to be bound.  P is a pointer to the\n** array to be bound, and N is the number of eements in the array.  The\n** F argument is one of constants [SQLITE_CARRAY_INT32], [SQLITE_CARRAY_INT64],\n** [SQLITE_CARRAY_DOUBLE], [SQLITE_CARRAY_TEXT], or [SQLITE_CARRAY_BLOB] to\n** indicate the datatype of the array being bound.  The X argument is not a\n** NULL pointer, then SQLite will invoke the function X on the P parameter\n** after it has finished using P, even if the call to\n** sqlite3_carray_bind() fails. The special-case finalizer\n** SQLITE_TRANSIENT has no effect here.\n*/\nSQLITE_API int sqlite3_carray_bind(\n  sqlite3_stmt *pStmt,        /* Statement to be bound */\n  int i,                      /* Parameter index */\n  void *aData,                /* Pointer to array data */\n  int nData,                  /* Number of data elements */\n  int mFlags,                 /* CARRAY flags */\n  void (*xDel)(void*)         /* Destructor for aData */\n);\n\n/*\n** CAPI3REF: Datatypes for the CARRAY table-valued function\n**\n** The fifth argument to the [sqlite3_carray_bind()] interface musts be\n** one of the following constants, to specify the datatype of the array\n** that is being bound into the [carray table-valued function].\n*/\n#define SQLITE_CARRAY_INT32     0    /* Data is 32-bit signed integers */\n#define SQLITE_CARRAY_INT64     1    /* Data is 64-bit signed integers */\n#define SQLITE_CARRAY_DOUBLE    2    /* Data is doubles */\n#define SQLITE_CARRAY_TEXT      3    /* Data is char* */\n#define SQLITE_CARRAY_BLOB      4    /* Data is struct iovec */\n\n/*\n** Versions of the above #defines that omit the initial SQLITE_, for\n** legacy compatibility.\n*/\n#define CARRAY_INT32     0    /* Data is 32-bit signed integers */\n#define CARRAY_INT64     1    /* Data is 64-bit signed integers */\n#define CARRAY_DOUBLE    2    /* Data is doubles */\n#define CARRAY_TEXT      3    /* Data is char* */\n#define CARRAY_BLOB      4    /* Data is struct iovec */\n\n/*\n** Undo the hack that converts floating point types to integer for\n** builds on processors without floating point support.\n*/\n#ifdef SQLITE_OMIT_FLOATING_POINT\n# undef double\n#endif\n\n#if defined(__wasi__)\n# undef SQLITE_WASI\n# define SQLITE_WASI 1\n# ifndef SQLITE_OMIT_LOAD_EXTENSION\n#  define SQLITE_OMIT_LOAD_EXTENSION\n# endif\n# ifndef SQLITE_THREADSAFE\n#  define SQLITE_THREADSAFE 0\n# endif\n#endif\n\n#ifdef __cplusplus\n}  /* End of the 'extern \"C\"' block */\n#endif\n/* #endif for SQLITE3_H will be added by mksqlite3.tcl */\n\n/******** Begin file sqlite3rtree.h *********/\n/*\n** 2010 August 30\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n*/\n\n#ifndef _SQLITE3RTREE_H_\n#define _SQLITE3RTREE_H_\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;\ntypedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;\n\n/* The double-precision datatype used by RTree depends on the\n** SQLITE_RTREE_INT_ONLY compile-time option.\n*/\n#ifdef SQLITE_RTREE_INT_ONLY\n  typedef sqlite3_int64 sqlite3_rtree_dbl;\n#else\n  typedef double sqlite3_rtree_dbl;\n#endif\n\n/*\n** Register a geometry callback named zGeom that can be used as part of an\n** R-Tree geometry query as follows:\n**\n**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)\n*/\nSQLITE_API int sqlite3_rtree_geometry_callback(\n  sqlite3 *db,\n  const char *zGeom,\n  int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),\n  void *pContext\n);\n\n\n/*\n** A pointer to a structure of the following type is passed as the first\n** argument to callbacks registered using rtree_geometry_callback().\n*/\nstruct sqlite3_rtree_geometry {\n  void *pContext;                 /* Copy of pContext passed to s_r_g_c() */\n  int nParam;                     /* Size of array aParam[] */\n  sqlite3_rtree_dbl *aParam;      /* Parameters passed to SQL geom function */\n  void *pUser;                    /* Callback implementation user data */\n  void (*xDelUser)(void *);       /* Called by SQLite to clean up pUser */\n};\n\n/*\n** Register a 2nd-generation geometry callback named zScore that can be\n** used as part of an R-Tree geometry query as follows:\n**\n**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)\n*/\nSQLITE_API int sqlite3_rtree_query_callback(\n  sqlite3 *db,\n  const char *zQueryFunc,\n  int (*xQueryFunc)(sqlite3_rtree_query_info*),\n  void *pContext,\n  void (*xDestructor)(void*)\n);\n\n\n/*\n** A pointer to a structure of the following type is passed as the\n** argument to scored geometry callback registered using\n** sqlite3_rtree_query_callback().\n**\n** Note that the first 5 fields of this structure are identical to\n** sqlite3_rtree_geometry.  This structure is a subclass of\n** sqlite3_rtree_geometry.\n*/\nstruct sqlite3_rtree_query_info {\n  void *pContext;                   /* pContext from when function registered */\n  int nParam;                       /* Number of function parameters */\n  sqlite3_rtree_dbl *aParam;        /* value of function parameters */\n  void *pUser;                      /* callback can use this, if desired */\n  void (*xDelUser)(void*);          /* function to free pUser */\n  sqlite3_rtree_dbl *aCoord;        /* Coordinates of node or entry to check */\n  unsigned int *anQueue;            /* Number of pending entries in the queue */\n  int nCoord;                       /* Number of coordinates */\n  int iLevel;                       /* Level of current node or entry */\n  int mxLevel;                      /* The largest iLevel value in the tree */\n  sqlite3_int64 iRowid;             /* Rowid for current entry */\n  sqlite3_rtree_dbl rParentScore;   /* Score of parent node */\n  int eParentWithin;                /* Visibility of parent node */\n  int eWithin;                      /* OUT: Visibility */\n  sqlite3_rtree_dbl rScore;         /* OUT: Write the score here */\n  /* The following fields are only available in 3.8.11 and later */\n  sqlite3_value **apSqlParam;       /* Original SQL values of parameters */\n};\n\n/*\n** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.\n*/\n#define NOT_WITHIN       0   /* Object completely outside of query region */\n#define PARTLY_WITHIN    1   /* Object partially overlaps query region */\n#define FULLY_WITHIN     2   /* Object fully contained within query region */\n\n\n#ifdef __cplusplus\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif  /* ifndef _SQLITE3RTREE_H_ */\n\n/******** End of sqlite3rtree.h *********/\n/******** Begin file sqlite3session.h *********/\n\n#if !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION)\n#define __SQLITESESSION_H_ 1\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*\n** CAPI3REF: Session Object Handle\n**\n** An instance of this object is a [session] that can be used to\n** record changes to a database.\n*/\ntypedef struct sqlite3_session sqlite3_session;\n\n/*\n** CAPI3REF: Changeset Iterator Handle\n**\n** An instance of this object acts as a cursor for iterating\n** over the elements of a [changeset] or [patchset].\n*/\ntypedef struct sqlite3_changeset_iter sqlite3_changeset_iter;\n\n/*\n** CAPI3REF: Create A New Session Object\n** CONSTRUCTOR: sqlite3_session\n**\n** Create a new session object attached to database handle db. If successful,\n** a pointer to the new object is written to *ppSession and SQLITE_OK is\n** returned. If an error occurs, *ppSession is set to NULL and an SQLite\n** error code (e.g. SQLITE_NOMEM) is returned.\n**\n** It is possible to create multiple session objects attached to a single\n** database handle.\n**\n** Session objects created using this function should be deleted using the\n** [sqlite3session_delete()] function before the database handle that they\n** are attached to is itself closed. If the database handle is closed before\n** the session object is deleted, then the results of calling any session\n** module function, including [sqlite3session_delete()] on the session object\n** are undefined.\n**\n** Because the session module uses the [sqlite3_preupdate_hook()] API, it\n** is not possible for an application to register a pre-update hook on a\n** database handle that has one or more session objects attached. Nor is\n** it possible to create a session object attached to a database handle for\n** which a pre-update hook is already defined. The results of attempting\n** either of these things are undefined.\n**\n** The session object will be used to create changesets for tables in\n** database zDb, where zDb is either \"main\", or \"temp\", or the name of an\n** attached database. It is not an error if database zDb is not attached\n** to the database when the session object is created.\n*/\nSQLITE_API int sqlite3session_create(\n  sqlite3 *db,                    /* Database handle */\n  const char *zDb,                /* Name of db (e.g. \"main\") */\n  sqlite3_session **ppSession     /* OUT: New session object */\n);\n\n/*\n** CAPI3REF: Delete A Session Object\n** DESTRUCTOR: sqlite3_session\n**\n** Delete a session object previously allocated using\n** [sqlite3session_create()]. Once a session object has been deleted, the\n** results of attempting to use pSession with any other session module\n** function are undefined.\n**\n** Session objects must be deleted before the database handle to which they\n** are attached is closed. Refer to the documentation for\n** [sqlite3session_create()] for details.\n*/\nSQLITE_API void sqlite3session_delete(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Configure a Session Object\n** METHOD: sqlite3_session\n**\n** This method is used to configure a session object after it has been\n** created. At present the only valid values for the second parameter are\n** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].\n**\n*/\nSQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);\n\n/*\n** CAPI3REF: Options for sqlite3session_object_config\n**\n** The following values may passed as the the 2nd parameter to\n** sqlite3session_object_config().\n**\n** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd>\n**   This option is used to set, clear or query the flag that enables\n**   the [sqlite3session_changeset_size()] API. Because it imposes some\n**   computational overhead, this API is disabled by default. Argument\n**   pArg must point to a value of type (int). If the value is initially\n**   0, then the sqlite3session_changeset_size() API is disabled. If it\n**   is greater than 0, then the same API is enabled. Or, if the initial\n**   value is less than zero, no change is made. In all cases the (int)\n**   variable is set to 1 if the sqlite3session_changeset_size() API is\n**   enabled following the current call, or 0 otherwise.\n**\n**   It is an error (SQLITE_MISUSE) to attempt to modify this setting after\n**   the first table has been attached to the session object.\n**\n** <dt>SQLITE_SESSION_OBJCONFIG_ROWID <dd>\n**   This option is used to set, clear or query the flag that enables\n**   collection of data for tables with no explicit PRIMARY KEY.\n**\n**   Normally, tables with no explicit PRIMARY KEY are simply ignored\n**   by the sessions module. However, if this flag is set, it behaves\n**   as if such tables have a column \"_rowid_ INTEGER PRIMARY KEY\" inserted\n**   as their leftmost columns.\n**\n**   It is an error (SQLITE_MISUSE) to attempt to modify this setting after\n**   the first table has been attached to the session object.\n*/\n#define SQLITE_SESSION_OBJCONFIG_SIZE  1\n#define SQLITE_SESSION_OBJCONFIG_ROWID 2\n\n/*\n** CAPI3REF: Enable Or Disable A Session Object\n** METHOD: sqlite3_session\n**\n** Enable or disable the recording of changes by a session object. When\n** enabled, a session object records changes made to the database. When\n** disabled - it does not. A newly created session object is enabled.\n** Refer to the documentation for [sqlite3session_changeset()] for further\n** details regarding how enabling and disabling a session object affects\n** the eventual changesets.\n**\n** Passing zero to this function disables the session. Passing a value\n** greater than zero enables it. Passing a value less than zero is a\n** no-op, and may be used to query the current state of the session.\n**\n** The return value indicates the final state of the session object: 0 if\n** the session is disabled, or 1 if it is enabled.\n*/\nSQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);\n\n/*\n** CAPI3REF: Set Or Clear the Indirect Change Flag\n** METHOD: sqlite3_session\n**\n** Each change recorded by a session object is marked as either direct or\n** indirect. A change is marked as indirect if either:\n**\n** <ul>\n**   <li> The session object \"indirect\" flag is set when the change is\n**        made, or\n**   <li> The change is made by an SQL trigger or foreign key action\n**        instead of directly as a result of a users SQL statement.\n** </ul>\n**\n** If a single row is affected by more than one operation within a session,\n** then the change is considered indirect if all operations meet the criteria\n** for an indirect change above, or direct otherwise.\n**\n** This function is used to set, clear or query the session object indirect\n** flag.  If the second argument passed to this function is zero, then the\n** indirect flag is cleared. If it is greater than zero, the indirect flag\n** is set. Passing a value less than zero does not modify the current value\n** of the indirect flag, and may be used to query the current state of the\n** indirect flag for the specified session object.\n**\n** The return value indicates the final state of the indirect flag: 0 if\n** it is clear, or 1 if it is set.\n*/\nSQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);\n\n/*\n** CAPI3REF: Attach A Table To A Session Object\n** METHOD: sqlite3_session\n**\n** If argument zTab is not NULL, then it is the name of a table to attach\n** to the session object passed as the first argument. All subsequent changes\n** made to the table while the session object is enabled will be recorded. See\n** documentation for [sqlite3session_changeset()] for further details.\n**\n** Or, if argument zTab is NULL, then changes are recorded for all tables\n** in the database. If additional tables are added to the database (by\n** executing \"CREATE TABLE\" statements) after this call is made, changes for\n** the new tables are also recorded.\n**\n** Changes can only be recorded for tables that have a PRIMARY KEY explicitly\n** defined as part of their CREATE TABLE statement. It does not matter if the\n** PRIMARY KEY is an \"INTEGER PRIMARY KEY\" (rowid alias) or not. The PRIMARY\n** KEY may consist of a single column, or may be a composite key.\n**\n** It is not an error if the named table does not exist in the database. Nor\n** is it an error if the named table does not have a PRIMARY KEY. However,\n** no changes will be recorded in either of these scenarios.\n**\n** Changes are not recorded for individual rows that have NULL values stored\n** in one or more of their PRIMARY KEY columns.\n**\n** SQLITE_OK is returned if the call completes without error. Or, if an error\n** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.\n**\n** <h3>Special sqlite_stat1 Handling</h3>\n**\n** As of SQLite version 3.22.0, the \"sqlite_stat1\" table is an exception to\n** some of the rules above. In SQLite, the schema of sqlite_stat1 is:\n**  <pre>\n**  &nbsp;     CREATE TABLE sqlite_stat1(tbl,idx,stat)\n**  </pre>\n**\n** Even though sqlite_stat1 does not have a PRIMARY KEY, changes are\n** recorded for it as if the PRIMARY KEY is (tbl,idx). Additionally, changes\n** are recorded for rows for which (idx IS NULL) is true. However, for such\n** rows a zero-length blob (SQL value X'') is stored in the changeset or\n** patchset instead of a NULL value. This allows such changesets to be\n** manipulated by legacy implementations of sqlite3changeset_invert(),\n** concat() and similar.\n**\n** The sqlite3changeset_apply() function automatically converts the\n** zero-length blob back to a NULL value when updating the sqlite_stat1\n** table. However, if the application calls sqlite3changeset_new(),\n** sqlite3changeset_old() or sqlite3changeset_conflict on a changeset\n** iterator directly (including on a changeset iterator passed to a\n** conflict-handler callback) then the X'' value is returned. The application\n** must translate X'' to NULL itself if required.\n**\n** Legacy (older than 3.22.0) versions of the sessions module cannot capture\n** changes made to the sqlite_stat1 table. Legacy versions of the\n** sqlite3changeset_apply() function silently ignore any modifications to the\n** sqlite_stat1 table that are part of a changeset or patchset.\n*/\nSQLITE_API int sqlite3session_attach(\n  sqlite3_session *pSession,      /* Session object */\n  const char *zTab                /* Table name */\n);\n\n/*\n** CAPI3REF: Set a table filter on a Session Object.\n** METHOD: sqlite3_session\n**\n** The second argument (xFilter) is the \"filter callback\". For changes to rows\n** in tables that are not attached to the Session object, the filter is called\n** to determine whether changes to the table's rows should be tracked or not.\n** If xFilter returns 0, changes are not tracked. Note that once a table is\n** attached, xFilter will not be called again.\n*/\nSQLITE_API void sqlite3session_table_filter(\n  sqlite3_session *pSession,      /* Session object */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of third arg to _filter_table() */\n    const char *zTab              /* Table name */\n  ),\n  void *pCtx                      /* First argument passed to xFilter */\n);\n\n/*\n** CAPI3REF: Generate A Changeset From A Session Object\n** METHOD: sqlite3_session\n**\n** Obtain a changeset containing changes to the tables attached to the\n** session object passed as the first argument. If successful,\n** set *ppChangeset to point to a buffer containing the changeset\n** and *pnChangeset to the size of the changeset in bytes before returning\n** SQLITE_OK. If an error occurs, set both *ppChangeset and *pnChangeset to\n** zero and return an SQLite error code.\n**\n** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes,\n** each representing a change to a single row of an attached table. An INSERT\n** change contains the values of each field of a new database row. A DELETE\n** contains the original values of each field of a deleted database row. An\n** UPDATE change contains the original values of each field of an updated\n** database row along with the updated values for each updated non-primary-key\n** column. It is not possible for an UPDATE change to represent a change that\n** modifies the values of primary key columns. If such a change is made, it\n** is represented in a changeset as a DELETE followed by an INSERT.\n**\n** Changes are not recorded for rows that have NULL values stored in one or\n** more of their PRIMARY KEY columns. If such a row is inserted or deleted,\n** no corresponding change is present in the changesets returned by this\n** function. If an existing row with one or more NULL values stored in\n** PRIMARY KEY columns is updated so that all PRIMARY KEY columns are non-NULL,\n** only an INSERT is appears in the changeset. Similarly, if an existing row\n** with non-NULL PRIMARY KEY values is updated so that one or more of its\n** PRIMARY KEY columns are set to NULL, the resulting changeset contains a\n** DELETE change only.\n**\n** The contents of a changeset may be traversed using an iterator created\n** using the [sqlite3changeset_start()] API. A changeset may be applied to\n** a database with a compatible schema using the [sqlite3changeset_apply()]\n** API.\n**\n** Within a changeset generated by this function, all changes related to a\n** single table are grouped together. In other words, when iterating through\n** a changeset or when applying a changeset to a database, all changes related\n** to a single table are processed before moving on to the next table. Tables\n** are sorted in the same order in which they were attached (or auto-attached)\n** to the sqlite3_session object. The order in which the changes related to\n** a single table are stored is undefined.\n**\n** Following a successful call to this function, it is the responsibility of\n** the caller to eventually free the buffer that *ppChangeset points to using\n** [sqlite3_free()].\n**\n** <h3>Changeset Generation</h3>\n**\n** Once a table has been attached to a session object, the session object\n** records the primary key values of all new rows inserted into the table.\n** It also records the original primary key and other column values of any\n** deleted or updated rows. For each unique primary key value, data is only\n** recorded once - the first time a row with said primary key is inserted,\n** updated or deleted in the lifetime of the session.\n**\n** There is one exception to the previous paragraph: when a row is inserted,\n** updated or deleted, if one or more of its primary key columns contain a\n** NULL value, no record of the change is made.\n**\n** The session object therefore accumulates two types of records - those\n** that consist of primary key values only (created when the user inserts\n** a new record) and those that consist of the primary key values and the\n** original values of other table columns (created when the users deletes\n** or updates a record).\n**\n** When this function is called, the requested changeset is created using\n** both the accumulated records and the current contents of the database\n** file. Specifically:\n**\n** <ul>\n**   <li> For each record generated by an insert, the database is queried\n**        for a row with a matching primary key. If one is found, an INSERT\n**        change is added to the changeset. If no such row is found, no change\n**        is added to the changeset.\n**\n**   <li> For each record generated by an update or delete, the database is\n**        queried for a row with a matching primary key. If such a row is\n**        found and one or more of the non-primary key fields have been\n**        modified from their original values, an UPDATE change is added to\n**        the changeset. Or, if no such row is found in the table, a DELETE\n**        change is added to the changeset. If there is a row with a matching\n**        primary key in the database, but all fields contain their original\n**        values, no change is added to the changeset.\n** </ul>\n**\n** This means, amongst other things, that if a row is inserted and then later\n** deleted while a session object is active, neither the insert nor the delete\n** will be present in the changeset. Or if a row is deleted and then later a\n** row with the same primary key values inserted while a session object is\n** active, the resulting changeset will contain an UPDATE change instead of\n** a DELETE and an INSERT.\n**\n** When a session object is disabled (see the [sqlite3session_enable()] API),\n** it does not accumulate records when rows are inserted, updated or deleted.\n** This may appear to have some counter-intuitive effects if a single row\n** is written to more than once during a session. For example, if a row\n** is inserted while a session object is enabled, then later deleted while\n** the same session object is disabled, no INSERT record will appear in the\n** changeset, even though the delete took place while the session was disabled.\n** Or, if one field of a row is updated while a session is enabled, and\n** then another field of the same row is updated while the session is disabled,\n** the resulting changeset will contain an UPDATE change that updates both\n** fields.\n*/\nSQLITE_API int sqlite3session_changeset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnChangeset,               /* OUT: Size of buffer at *ppChangeset */\n  void **ppChangeset              /* OUT: Buffer containing changeset */\n);\n\n/*\n** CAPI3REF: Return An Upper-limit For The Size Of The Changeset\n** METHOD: sqlite3_session\n**\n** By default, this function always returns 0. For it to return\n** a useful result, the sqlite3_session object must have been configured\n** to enable this API using sqlite3session_object_config() with the\n** SQLITE_SESSION_OBJCONFIG_SIZE verb.\n**\n** When enabled, this function returns an upper limit, in bytes, for the size\n** of the changeset that might be produced if sqlite3session_changeset() were\n** called. The final changeset size might be equal to or smaller than the\n** size in bytes returned by this function.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Load The Difference Between Tables Into A Session\n** METHOD: sqlite3_session\n**\n** If it is not already attached to the session object passed as the first\n** argument, this function attaches table zTbl in the same manner as the\n** [sqlite3session_attach()] function. If zTbl does not exist, or if it\n** does not have a primary key, this function is a no-op (but does not return\n** an error).\n**\n** Argument zFromDb must be the name of a database (\"main\", \"temp\" etc.)\n** attached to the same database handle as the session object that contains\n** a table compatible with the table attached to the session by this function.\n** A table is considered compatible if it:\n**\n** <ul>\n**   <li> Has the same name,\n**   <li> Has the same set of columns declared in the same order, and\n**   <li> Has the same PRIMARY KEY definition.\n** </ul>\n**\n** If the tables are not compatible, SQLITE_SCHEMA is returned. If the tables\n** are compatible but do not have any PRIMARY KEY columns, it is not an error\n** but no changes are added to the session object. As with other session\n** APIs, tables without PRIMARY KEYs are simply ignored.\n**\n** This function adds a set of changes to the session object that could be\n** used to update the table in database zFrom (call this the \"from-table\")\n** so that its content is the same as the table attached to the session\n** object (call this the \"to-table\"). Specifically:\n**\n** <ul>\n**   <li> For each row (primary key) that exists in the to-table but not in\n**     the from-table, an INSERT record is added to the session object.\n**\n**   <li> For each row (primary key) that exists in the to-table but not in\n**     the from-table, a DELETE record is added to the session object.\n**\n**   <li> For each row (primary key) that exists in both tables, but features\n**     different non-PK values in each, an UPDATE record is added to the\n**     session.\n** </ul>\n**\n** To clarify, if this function is called and then a changeset constructed\n** using [sqlite3session_changeset()], then after applying that changeset to\n** database zFrom the contents of the two compatible tables would be\n** identical.\n**\n** Unless the call to this function is a no-op as described above, it is an\n** error if database zFrom does not exist or does not contain the required\n** compatible table.\n**\n** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite\n** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg\n** may be set to point to a buffer containing an English language error\n** message. It is the responsibility of the caller to free this buffer using\n** sqlite3_free().\n*/\nSQLITE_API int sqlite3session_diff(\n  sqlite3_session *pSession,\n  const char *zFromDb,\n  const char *zTbl,\n  char **pzErrMsg\n);\n\n\n/*\n** CAPI3REF: Generate A Patchset From A Session Object\n** METHOD: sqlite3_session\n**\n** The differences between a patchset and a changeset are that:\n**\n** <ul>\n**   <li> DELETE records consist of the primary key fields only. The\n**        original values of other fields are omitted.\n**   <li> The original values of any modified fields are omitted from\n**        UPDATE records.\n** </ul>\n**\n** A patchset blob may be used with up to date versions of all\n** sqlite3changeset_xxx API functions except for sqlite3changeset_invert(),\n** which returns SQLITE_CORRUPT if it is passed a patchset. Similarly,\n** attempting to use a patchset blob with old versions of the\n** sqlite3changeset_xxx APIs also provokes an SQLITE_CORRUPT error.\n**\n** Because the non-primary key \"old.*\" fields are omitted, no\n** SQLITE_CHANGESET_DATA conflicts can be detected or reported if a patchset\n** is passed to the sqlite3changeset_apply() API. Other conflict types work\n** in the same way as for changesets.\n**\n** Changes within a patchset are ordered in the same way as for changesets\n** generated by the sqlite3session_changeset() function (i.e. all changes for\n** a single table are grouped together, tables appear in the order in which\n** they were attached to the session object).\n*/\nSQLITE_API int sqlite3session_patchset(\n  sqlite3_session *pSession,      /* Session object */\n  int *pnPatchset,                /* OUT: Size of buffer at *ppPatchset */\n  void **ppPatchset               /* OUT: Buffer containing patchset */\n);\n\n/*\n** CAPI3REF: Test if a changeset has recorded any changes.\n**\n** Return non-zero if no changes to attached tables have been recorded by\n** the session object passed as the first argument. Otherwise, if one or\n** more changes have been recorded, return zero.\n**\n** Even if this function returns zero, it is possible that calling\n** [sqlite3session_changeset()] on the session handle may still return a\n** changeset that contains no changes. This can happen when a row in\n** an attached table is modified and then later on the original values\n** are restored. However, if this function returns non-zero, then it is\n** guaranteed that a call to sqlite3session_changeset() will return a\n** changeset containing zero changes.\n*/\nSQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Query for the amount of heap memory used by a session object.\n**\n** This API returns the total amount of heap memory in bytes currently\n** used by the session object passed as the only argument.\n*/\nSQLITE_API sqlite3_int64 sqlite3session_memory_used(sqlite3_session *pSession);\n\n/*\n** CAPI3REF: Create An Iterator To Traverse A Changeset\n** CONSTRUCTOR: sqlite3_changeset_iter\n**\n** Create an iterator used to iterate through the contents of a changeset.\n** If successful, *pp is set to point to the iterator handle and SQLITE_OK\n** is returned. Otherwise, if an error occurs, *pp is set to zero and an\n** SQLite error code is returned.\n**\n** The following functions can be used to advance and query a changeset\n** iterator created by this function:\n**\n** <ul>\n**   <li> [sqlite3changeset_next()]\n**   <li> [sqlite3changeset_op()]\n**   <li> [sqlite3changeset_new()]\n**   <li> [sqlite3changeset_old()]\n** </ul>\n**\n** It is the responsibility of the caller to eventually destroy the iterator\n** by passing it to [sqlite3changeset_finalize()]. The buffer containing the\n** changeset (pChangeset) must remain valid until after the iterator is\n** destroyed.\n**\n** Assuming the changeset blob was created by one of the\n** [sqlite3session_changeset()], [sqlite3changeset_concat()] or\n** [sqlite3changeset_invert()] functions, all changes within the changeset\n** that apply to a single table are grouped together. This means that when\n** an application iterates through a changeset using an iterator created by\n** this function, all changes that relate to a single table are visited\n** consecutively. There is no chance that the iterator will visit a change\n** the applies to table X, then one for table Y, and then later on visit\n** another change for table X.\n**\n** The behavior of sqlite3changeset_start_v2() and its streaming equivalent\n** may be modified by passing a combination of\n** [SQLITE_CHANGESETSTART_INVERT | supported flags] as the 4th parameter.\n**\n** Note that the sqlite3changeset_start_v2() API is still <b>experimental</b>\n** and therefore subject to change.\n*/\nSQLITE_API int sqlite3changeset_start(\n  sqlite3_changeset_iter **pp,    /* OUT: New changeset iterator handle */\n  int nChangeset,                 /* Size of changeset blob in bytes */\n  void *pChangeset                /* Pointer to blob containing changeset */\n);\nSQLITE_API int sqlite3changeset_start_v2(\n  sqlite3_changeset_iter **pp,    /* OUT: New changeset iterator handle */\n  int nChangeset,                 /* Size of changeset blob in bytes */\n  void *pChangeset,               /* Pointer to blob containing changeset */\n  int flags                       /* SESSION_CHANGESETSTART_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3changeset_start_v2\n**\n** The following flags may passed via the 4th parameter to\n** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:\n**\n** <dt>SQLITE_CHANGESETSTART_INVERT <dd>\n**   Invert the changeset while iterating through it. This is equivalent to\n**   inverting a changeset using sqlite3changeset_invert() before applying it.\n**   It is an error to specify this flag with a patchset.\n*/\n#define SQLITE_CHANGESETSTART_INVERT        0x0002\n\n\n/*\n** CAPI3REF: Advance A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function may only be used with iterators created by the function\n** [sqlite3changeset_start()]. If it is called on an iterator passed to\n** a conflict-handler callback by [sqlite3changeset_apply()], SQLITE_MISUSE\n** is returned and the call has no effect.\n**\n** Immediately after an iterator is created by sqlite3changeset_start(), it\n** does not point to any change in the changeset. Assuming the changeset\n** is not empty, the first call to this function advances the iterator to\n** point to the first change in the changeset. Each subsequent call advances\n** the iterator to point to the next change in the changeset (if any). If\n** no error occurs and the iterator points to a valid change after a call\n** to sqlite3changeset_next() has advanced it, SQLITE_ROW is returned.\n** Otherwise, if all changes in the changeset have already been visited,\n** SQLITE_DONE is returned.\n**\n** If an error occurs, an SQLite error code is returned. Possible error\n** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or\n** SQLITE_NOMEM.\n*/\nSQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);\n\n/*\n** CAPI3REF: Obtain The Current Operation From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this\n** is not the case, this function returns [SQLITE_MISUSE].\n**\n** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three\n** outputs are set through these pointers:\n**\n** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],\n** depending on the type of change that the iterator currently points to;\n**\n** *pnCol is set to the number of columns in the table affected by the change; and\n**\n** *pzTab is set to point to a nul-terminated utf-8 encoded string containing\n** the name of the table affected by the current change. The buffer remains\n** valid until either sqlite3changeset_next() is called on the iterator\n** or until the conflict-handler function returns.\n**\n** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change\n** is an indirect change, or false (0) otherwise. See the documentation for\n** [sqlite3session_indirect()] for a description of direct and indirect\n** changes.\n**\n** If no error occurs, SQLITE_OK is returned. If an error does occur, an\n** SQLite error code is returned. The values of the output variables may not\n** be trusted in this case.\n*/\nSQLITE_API int sqlite3changeset_op(\n  sqlite3_changeset_iter *pIter,  /* Iterator object */\n  const char **pzTab,             /* OUT: Pointer to table name */\n  int *pnCol,                     /* OUT: Number of columns in table */\n  int *pOp,                       /* OUT: SQLITE_INSERT, DELETE or UPDATE */\n  int *pbIndirect                 /* OUT: True for an 'indirect' change */\n);\n\n/*\n** CAPI3REF: Obtain The Primary Key Definition Of A Table\n** METHOD: sqlite3_changeset_iter\n**\n** For each modified table, a changeset includes the following:\n**\n** <ul>\n**   <li> The number of columns in the table, and\n**   <li> Which of those columns make up the tables PRIMARY KEY.\n** </ul>\n**\n** This function is used to find which columns comprise the PRIMARY KEY of\n** the table modified by the change that iterator pIter currently points to.\n** If successful, *pabPK is set to point to an array of nCol entries, where\n** nCol is the number of columns in the table. Elements of *pabPK are set to\n** 0x01 if the corresponding column is part of the tables primary key, or\n** 0x00 if it is not.\n**\n** If argument pnCol is not NULL, then *pnCol is set to the number of columns\n** in the table.\n**\n** If this function is called when the iterator does not point to a valid\n** entry, SQLITE_MISUSE is returned and the output variables zeroed. Otherwise,\n** SQLITE_OK is returned and the output variables populated as described\n** above.\n*/\nSQLITE_API int sqlite3changeset_pk(\n  sqlite3_changeset_iter *pIter,  /* Iterator object */\n  unsigned char **pabPK,          /* OUT: Array of boolean - true for PK cols */\n  int *pnCol                      /* OUT: Number of entries in output array */\n);\n\n/*\n** CAPI3REF: Obtain old.* Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.\n** Furthermore, it may only be called if the type of change that the iterator\n** currently points to is either [SQLITE_DELETE] or [SQLITE_UPDATE]. Otherwise,\n** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the vector of\n** original row values stored as part of the UPDATE or DELETE change and\n** returns SQLITE_OK. The name of the function comes from the fact that this\n** is similar to the \"old.*\" columns available to update or delete triggers.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_old(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: Old value (or NULL pointer) */\n);\n\n/*\n** CAPI3REF: Obtain new.* Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** The pIter argument passed to this function may either be an iterator\n** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator\n** created by [sqlite3changeset_start()]. In the latter case, the most recent\n** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.\n** Furthermore, it may only be called if the type of change that the iterator\n** currently points to is either [SQLITE_UPDATE] or [SQLITE_INSERT]. Otherwise,\n** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the vector of\n** new row values stored as part of the UPDATE or INSERT change and\n** returns SQLITE_OK. If the change is an UPDATE and does not include\n** a new value for the requested column, *ppValue is set to NULL and\n** SQLITE_OK returned. The name of the function comes from the fact that\n** this is similar to the \"new.*\" columns available to update or delete\n** triggers.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_new(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: New value (or NULL pointer) */\n);\n\n/*\n** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function should only be used with iterator objects passed to a\n** conflict-handler callback by [sqlite3changeset_apply()] with either\n** [SQLITE_CHANGESET_DATA] or [SQLITE_CHANGESET_CONFLICT]. If this function\n** is called on any other iterator, [SQLITE_MISUSE] is returned and *ppValue\n** is set to NULL.\n**\n** Argument iVal must be greater than or equal to 0, and less than the number\n** of columns in the table affected by the current change. Otherwise,\n** [SQLITE_RANGE] is returned and *ppValue is set to NULL.\n**\n** If successful, this function sets *ppValue to point to a protected\n** sqlite3_value object containing the iVal'th value from the\n** \"conflicting row\" associated with the current conflict-handler callback\n** and returns SQLITE_OK.\n**\n** If some other error occurs (e.g. an OOM condition), an SQLite error code\n** is returned and *ppValue is set to NULL.\n*/\nSQLITE_API int sqlite3changeset_conflict(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int iVal,                       /* Column number */\n  sqlite3_value **ppValue         /* OUT: Value from conflicting row */\n);\n\n/*\n** CAPI3REF: Determine The Number Of Foreign Key Constraint Violations\n** METHOD: sqlite3_changeset_iter\n**\n** This function may only be called with an iterator passed to an\n** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case\n** it sets the output variable to the total number of known foreign key\n** violations in the destination database and returns SQLITE_OK.\n**\n** In all other cases this function returns SQLITE_MISUSE.\n*/\nSQLITE_API int sqlite3changeset_fk_conflicts(\n  sqlite3_changeset_iter *pIter,  /* Changeset iterator */\n  int *pnOut                      /* OUT: Number of FK violations */\n);\n\n\n/*\n** CAPI3REF: Finalize A Changeset Iterator\n** METHOD: sqlite3_changeset_iter\n**\n** This function is used to finalize an iterator allocated with\n** [sqlite3changeset_start()].\n**\n** This function should only be called on iterators created using the\n** [sqlite3changeset_start()] function. If an application calls this\n** function with an iterator passed to a conflict-handler by\n** [sqlite3changeset_apply()], [SQLITE_MISUSE] is immediately returned and the\n** call has no effect.\n**\n** If an error was encountered within a call to an sqlite3changeset_xxx()\n** function (for example an [SQLITE_CORRUPT] in [sqlite3changeset_next()] or an\n** [SQLITE_NOMEM] in [sqlite3changeset_new()]) then an error code corresponding\n** to that error is returned by this function. Otherwise, SQLITE_OK is\n** returned. This is to allow the following pattern (pseudo-code):\n**\n** <pre>\n**   sqlite3changeset_start();\n**   while( SQLITE_ROW==sqlite3changeset_next() ){\n**     // Do something with change.\n**   }\n**   rc = sqlite3changeset_finalize();\n**   if( rc!=SQLITE_OK ){\n**     // An error has occurred\n**   }\n** </pre>\n*/\nSQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);\n\n/*\n** CAPI3REF: Invert A Changeset\n**\n** This function is used to \"invert\" a changeset object. Applying an inverted\n** changeset to a database reverses the effects of applying the uninverted\n** changeset. Specifically:\n**\n** <ul>\n**   <li> Each DELETE change is changed to an INSERT, and\n**   <li> Each INSERT change is changed to a DELETE, and\n**   <li> For each UPDATE change, the old.* and new.* values are exchanged.\n** </ul>\n**\n** This function does not change the order in which changes appear within\n** the changeset. It merely reverses the sense of each individual change.\n**\n** If successful, a pointer to a buffer containing the inverted changeset\n** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and\n** SQLITE_OK is returned. If an error occurs, both *pnOut and *ppOut are\n** zeroed and an SQLite error code returned.\n**\n** It is the responsibility of the caller to eventually call sqlite3_free()\n** on the *ppOut pointer to free the buffer allocation following a successful\n** call to this function.\n**\n** WARNING/TODO: This function currently assumes that the input is a valid\n** changeset. If it is not, the results are undefined.\n*/\nSQLITE_API int sqlite3changeset_invert(\n  int nIn, const void *pIn,       /* Input changeset */\n  int *pnOut, void **ppOut        /* OUT: Inverse of input */\n);\n\n/*\n** CAPI3REF: Concatenate Two Changeset Objects\n**\n** This function is used to concatenate two changesets, A and B, into a\n** single changeset. The result is a changeset equivalent to applying\n** changeset A followed by changeset B.\n**\n** This function combines the two input changesets using an\n** sqlite3_changegroup object. Calling it produces similar results as the\n** following code fragment:\n**\n** <pre>\n**   sqlite3_changegroup *pGrp;\n**   rc = sqlite3_changegroup_new(&pGrp);\n**   if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nA, pA);\n**   if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nB, pB);\n**   if( rc==SQLITE_OK ){\n**     rc = sqlite3changegroup_output(pGrp, pnOut, ppOut);\n**   }else{\n**     *ppOut = 0;\n**     *pnOut = 0;\n**   }\n** </pre>\n**\n** Refer to the sqlite3_changegroup documentation below for details.\n*/\nSQLITE_API int sqlite3changeset_concat(\n  int nA,                         /* Number of bytes in buffer pA */\n  void *pA,                       /* Pointer to buffer containing changeset A */\n  int nB,                         /* Number of bytes in buffer pB */\n  void *pB,                       /* Pointer to buffer containing changeset B */\n  int *pnOut,                     /* OUT: Number of bytes in output changeset */\n  void **ppOut                    /* OUT: Buffer containing output changeset */\n);\n\n/*\n** CAPI3REF: Changegroup Handle\n**\n** A changegroup is an object used to combine two or more\n** [changesets] or [patchsets]\n*/\ntypedef struct sqlite3_changegroup sqlite3_changegroup;\n\n/*\n** CAPI3REF: Create A New Changegroup Object\n** CONSTRUCTOR: sqlite3_changegroup\n**\n** An sqlite3_changegroup object is used to combine two or more changesets\n** (or patchsets) into a single changeset (or patchset). A single changegroup\n** object may combine changesets or patchsets, but not both. The output is\n** always in the same format as the input.\n**\n** If successful, this function returns SQLITE_OK and populates (*pp) with\n** a pointer to a new sqlite3_changegroup object before returning. The caller\n** should eventually free the returned object using a call to\n** sqlite3changegroup_delete(). If an error occurs, an SQLite error code\n** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL.\n**\n** The usual usage pattern for an sqlite3_changegroup object is as follows:\n**\n** <ul>\n**   <li> It is created using a call to sqlite3changegroup_new().\n**\n**   <li> Zero or more changesets (or patchsets) are added to the object\n**        by calling sqlite3changegroup_add().\n**\n**   <li> The result of combining all input changesets together is obtained\n**        by the application via a call to sqlite3changegroup_output().\n**\n**   <li> The object is deleted using a call to sqlite3changegroup_delete().\n** </ul>\n**\n** Any number of calls to add() and output() may be made between the calls to\n** new() and delete(), and in any order.\n**\n** As well as the regular sqlite3changegroup_add() and\n** sqlite3changegroup_output() functions, also available are the streaming\n** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm().\n*/\nSQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);\n\n/*\n** CAPI3REF: Add a Schema to a Changegroup\n** METHOD: sqlite3_changegroup_schema\n**\n** This method may be used to optionally enforce the rule that the changesets\n** added to the changegroup handle must match the schema of database zDb\n** (\"main\", \"temp\", or the name of an attached database). If\n** sqlite3changegroup_add() is called to add a changeset that is not compatible\n** with the configured schema, SQLITE_SCHEMA is returned and the changegroup\n** object is left in an undefined state.\n**\n** A changeset schema is considered compatible with the database schema in\n** the same way as for sqlite3changeset_apply(). Specifically, for each\n** table in the changeset, there exists a database table with:\n**\n** <ul>\n**   <li> The name identified by the changeset, and\n**   <li> at least as many columns as recorded in the changeset, and\n**   <li> the primary key columns in the same position as recorded in\n**        the changeset.\n** </ul>\n**\n** The output of the changegroup object always has the same schema as the\n** database nominated using this function. In cases where changesets passed\n** to sqlite3changegroup_add() have fewer columns than the corresponding table\n** in the database schema, these are filled in using the default column\n** values from the database schema. This makes it possible to combined\n** changesets that have different numbers of columns for a single table\n** within a changegroup, provided that they are otherwise compatible.\n*/\nSQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);\n\n/*\n** CAPI3REF: Add A Changeset To A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** Add all changes within the changeset (or patchset) in buffer pData (size\n** nData bytes) to the changegroup.\n**\n** If the buffer contains a patchset, then all prior calls to this function\n** on the same changegroup object must also have specified patchsets. Or, if\n** the buffer contains a changeset, so must have the earlier calls to this\n** function. Otherwise, SQLITE_ERROR is returned and no changes are added\n** to the changegroup.\n**\n** Rows within the changeset and changegroup are identified by the values in\n** their PRIMARY KEY columns. A change in the changeset is considered to\n** apply to the same row as a change already present in the changegroup if\n** the two rows have the same primary key.\n**\n** Changes to rows that do not already appear in the changegroup are\n** simply copied into it. Or, if both the new changeset and the changegroup\n** contain changes that apply to a single row, the final contents of the\n** changegroup depends on the type of each change, as follows:\n**\n** <table border=1 style=\"margin-left:8ex;margin-right:8ex\">\n**   <tr><th style=\"white-space:pre\">Existing Change  </th>\n**       <th style=\"white-space:pre\">New Change       </th>\n**       <th>Output Change\n**   <tr><td>INSERT <td>INSERT <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>INSERT <td>UPDATE <td>\n**       The INSERT change remains in the changegroup. The values in the\n**       INSERT change are modified as if the row was inserted by the\n**       existing change and then updated according to the new change.\n**   <tr><td>INSERT <td>DELETE <td>\n**       The existing INSERT is removed from the changegroup. The DELETE is\n**       not added.\n**   <tr><td>UPDATE <td>INSERT <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>UPDATE <td>UPDATE <td>\n**       The existing UPDATE remains within the changegroup. It is amended\n**       so that the accompanying values are as if the row was updated once\n**       by the existing change and then again by the new change.\n**   <tr><td>UPDATE <td>DELETE <td>\n**       The existing UPDATE is replaced by the new DELETE within the\n**       changegroup.\n**   <tr><td>DELETE <td>INSERT <td>\n**       If one or more of the column values in the row inserted by the\n**       new change differ from those in the row deleted by the existing\n**       change, the existing DELETE is replaced by an UPDATE within the\n**       changegroup. Otherwise, if the inserted row is exactly the same\n**       as the deleted row, the existing DELETE is simply discarded.\n**   <tr><td>DELETE <td>UPDATE <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n**   <tr><td>DELETE <td>DELETE <td>\n**       The new change is ignored. This case does not occur if the new\n**       changeset was recorded immediately after the changesets already\n**       added to the changegroup.\n** </table>\n**\n** If the new changeset contains changes to a table that is already present\n** in the changegroup, then the number of columns and the position of the\n** primary key columns for the table must be consistent. If this is not the\n** case, this function fails with SQLITE_SCHEMA. Except, if the changegroup\n** object has been configured with a database schema using the\n** sqlite3changegroup_schema() API, then it is possible to combine changesets\n** with different numbers of columns for a single table, provided that\n** they are otherwise compatible.\n**\n** If the input changeset appears to be corrupt and the corruption is\n** detected, SQLITE_CORRUPT is returned. Or, if an out-of-memory condition\n** occurs during processing, this function returns SQLITE_NOMEM.\n**\n** In all cases, if an error occurs the state of the final contents of the\n** changegroup is undefined. If no error occurs, SQLITE_OK is returned.\n*/\nSQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);\n\n/*\n** CAPI3REF: Add A Single Change To A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** This function adds the single change currently indicated by the iterator\n** passed as the second argument to the changegroup object. The rules for\n** adding the change are just as described for [sqlite3changegroup_add()].\n**\n** If the change is successfully added to the changegroup, SQLITE_OK is\n** returned. Otherwise, an SQLite error code is returned.\n**\n** The iterator must point to a valid entry when this function is called.\n** If it does not, SQLITE_ERROR is returned and no change is added to the\n** changegroup. Additionally, the iterator must not have been opened with\n** the SQLITE_CHANGESETAPPLY_INVERT flag. In this case SQLITE_ERROR is also\n** returned.\n*/\nSQLITE_API int sqlite3changegroup_add_change(\n  sqlite3_changegroup*,\n  sqlite3_changeset_iter*\n);\n\n\n\n/*\n** CAPI3REF: Obtain A Composite Changeset From A Changegroup\n** METHOD: sqlite3_changegroup\n**\n** Obtain a buffer containing a changeset (or patchset) representing the\n** current contents of the changegroup. If the inputs to the changegroup\n** were themselves changesets, the output is a changeset. Or, if the\n** inputs were patchsets, the output is also a patchset.\n**\n** As with the output of the sqlite3session_changeset() and\n** sqlite3session_patchset() functions, all changes related to a single\n** table are grouped together in the output of this function. Tables appear\n** in the same order as for the very first changeset added to the changegroup.\n** If the second or subsequent changesets added to the changegroup contain\n** changes for tables that do not appear in the first changeset, they are\n** appended onto the end of the output changeset, again in the order in\n** which they are first encountered.\n**\n** If an error occurs, an SQLite error code is returned and the output\n** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK\n** is returned and the output variables are set to the size of and a\n** pointer to the output buffer, respectively. In this case it is the\n** responsibility of the caller to eventually free the buffer using a\n** call to sqlite3_free().\n*/\nSQLITE_API int sqlite3changegroup_output(\n  sqlite3_changegroup*,\n  int *pnData,                    /* OUT: Size of output buffer in bytes */\n  void **ppData                   /* OUT: Pointer to output buffer */\n);\n\n/*\n** CAPI3REF: Delete A Changegroup Object\n** DESTRUCTOR: sqlite3_changegroup\n*/\nSQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);\n\n/*\n** CAPI3REF: Apply A Changeset To A Database\n**\n** Apply a changeset or patchset to a database. These functions attempt to\n** update the \"main\" database attached to handle db with the changes found in\n** the changeset passed via the second and third arguments.\n**\n** All changes made by these functions are enclosed in a savepoint transaction.\n** If any other error (aside from a constraint failure when attempting to\n** write to the target database) occurs, then the savepoint transaction is\n** rolled back, restoring the target database to its original state, and an\n** SQLite error code returned. Additionally, starting with version 3.51.0,\n** an error code and error message that may be accessed using the\n** [sqlite3_errcode()] and [sqlite3_errmsg()] APIs are left in the database\n** handle.\n**\n** The fourth argument (xFilter) passed to these functions is the \"filter\n** callback\". This may be passed NULL, in which case all changes in the\n** changeset are applied to the database. For sqlite3changeset_apply() and\n** sqlite3_changeset_apply_v2(), if it is not NULL, then it is invoked once\n** for each table affected by at least one change in the changeset. In this\n** case the table name is passed as the second argument, and a copy of\n** the context pointer passed as the sixth argument to apply() or apply_v2()\n** as the first. If the \"filter callback\" returns zero, then no attempt is\n** made to apply any changes to the table. Otherwise, if the return value is\n** non-zero, all changes related to the table are attempted.\n**\n** For sqlite3_changeset_apply_v3(), the xFilter callback is invoked once\n** per change. The second argument in this case is an sqlite3_changeset_iter\n** that may be queried using the usual APIs for the details of the current\n** change. If the \"filter callback\" returns zero in this case, then no attempt\n** is made to apply the current change. If it returns non-zero, the change\n** is applied.\n**\n** For each table that is not excluded by the filter callback, this function\n** tests that the target database contains a compatible table. A table is\n** considered compatible if all of the following are true:\n**\n** <ul>\n**   <li> The table has the same name as the name recorded in the\n**        changeset, and\n**   <li> The table has at least as many columns as recorded in the\n**        changeset, and\n**   <li> The table has primary key columns in the same position as\n**        recorded in the changeset.\n** </ul>\n**\n** If there is no compatible table, it is not an error, but none of the\n** changes associated with the table are applied. A warning message is issued\n** via the sqlite3_log() mechanism with the error code SQLITE_SCHEMA. At most\n** one such warning is issued for each table in the changeset.\n**\n** For each change for which there is a compatible table, an attempt is made\n** to modify the table contents according to each UPDATE, INSERT or DELETE\n** change that is not excluded by a filter callback. If a change cannot be\n** applied cleanly, the conflict handler function passed as the fifth argument\n** to sqlite3changeset_apply() may be invoked. A description of exactly when\n** the conflict handler is invoked for each type of change is below.\n**\n** Unlike the xFilter argument, xConflict may not be passed NULL. The results\n** of passing anything other than a valid function pointer as the xConflict\n** argument are undefined.\n**\n** Each time the conflict handler function is invoked, it must return one\n** of [SQLITE_CHANGESET_OMIT], [SQLITE_CHANGESET_ABORT] or\n** [SQLITE_CHANGESET_REPLACE]. SQLITE_CHANGESET_REPLACE may only be returned\n** if the second argument passed to the conflict handler is either\n** SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If the conflict-handler\n** returns an illegal value, any changes already made are rolled back and\n** the call to sqlite3changeset_apply() returns SQLITE_MISUSE. Different\n** actions are taken by sqlite3changeset_apply() depending on the value\n** returned by each invocation of the conflict-handler function. Refer to\n** the documentation for the three\n** [SQLITE_CHANGESET_OMIT|available return values] for details.\n**\n** <dl>\n** <dt>DELETE Changes<dd>\n**   For each DELETE change, the function checks if the target database\n**   contains a row with the same primary key value (or values) as the\n**   original row values stored in the changeset. If it does, and the values\n**   stored in all non-primary key columns also match the values stored in\n**   the changeset the row is deleted from the target database.\n**\n**   If a row with matching primary key values is found, but one or more of\n**   the non-primary key fields contains a value different from the original\n**   row value stored in the changeset, the conflict-handler function is\n**   invoked with [SQLITE_CHANGESET_DATA] as the second argument. If the\n**   database table has more columns than are recorded in the changeset,\n**   only the values of those non-primary key fields are compared against\n**   the current database contents - any trailing database table columns\n**   are ignored.\n**\n**   If no row with matching primary key values is found in the database,\n**   the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]\n**   passed as the second argument.\n**\n**   If the DELETE operation is attempted, but SQLite returns SQLITE_CONSTRAINT\n**   (which can only happen if a foreign key constraint is violated), the\n**   conflict-handler function is invoked with [SQLITE_CHANGESET_CONSTRAINT]\n**   passed as the second argument. This includes the case where the DELETE\n**   operation is attempted because an earlier call to the conflict handler\n**   function returned [SQLITE_CHANGESET_REPLACE].\n**\n** <dt>INSERT Changes<dd>\n**   For each INSERT change, an attempt is made to insert the new row into\n**   the database. If the changeset row contains fewer fields than the\n**   database table, the trailing fields are populated with their default\n**   values.\n**\n**   If the attempt to insert the row fails because the database already\n**   contains a row with the same primary key values, the conflict handler\n**   function is invoked with the second argument set to\n**   [SQLITE_CHANGESET_CONFLICT].\n**\n**   If the attempt to insert the row fails because of some other constraint\n**   violation (e.g. NOT NULL or UNIQUE), the conflict handler function is\n**   invoked with the second argument set to [SQLITE_CHANGESET_CONSTRAINT].\n**   This includes the case where the INSERT operation is re-attempted because\n**   an earlier call to the conflict handler function returned\n**   [SQLITE_CHANGESET_REPLACE].\n**\n** <dt>UPDATE Changes<dd>\n**   For each UPDATE change, the function checks if the target database\n**   contains a row with the same primary key value (or values) as the\n**   original row values stored in the changeset. If it does, and the values\n**   stored in all modified non-primary key columns also match the values\n**   stored in the changeset the row is updated within the target database.\n**\n**   If a row with matching primary key values is found, but one or more of\n**   the modified non-primary key fields contains a value different from an\n**   original row value stored in the changeset, the conflict-handler function\n**   is invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since\n**   UPDATE changes only contain values for non-primary key fields that are\n**   to be modified, only those fields need to match the original values to\n**   avoid the SQLITE_CHANGESET_DATA conflict-handler callback.\n**\n**   If no row with matching primary key values is found in the database,\n**   the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]\n**   passed as the second argument.\n**\n**   If the UPDATE operation is attempted, but SQLite returns\n**   SQLITE_CONSTRAINT, the conflict-handler function is invoked with\n**   [SQLITE_CHANGESET_CONSTRAINT] passed as the second argument.\n**   This includes the case where the UPDATE operation is attempted after\n**   an earlier call to the conflict handler function returned\n**   [SQLITE_CHANGESET_REPLACE].\n** </dl>\n**\n** It is safe to execute SQL statements, including those that write to the\n** table that the callback related to, from within the xConflict callback.\n** This can be used to further customize the application's conflict\n** resolution strategy.\n**\n** If the output parameters (ppRebase) and (pnRebase) are non-NULL and\n** the input is a changeset (not a patchset), then sqlite3changeset_apply_v2()\n** may set (*ppRebase) to point to a \"rebase\" that may be used with the\n** sqlite3_rebaser APIs buffer before returning. In this case (*pnRebase)\n** is set to the size of the buffer in bytes. It is the responsibility of the\n** caller to eventually free any such buffer using sqlite3_free(). The buffer\n** is only allocated and populated if one or more conflicts were encountered\n** while applying the patchset. See comments surrounding the sqlite3_rebaser\n** APIs for further details.\n**\n** The behavior of sqlite3changeset_apply_v2() and its streaming equivalent\n** may be modified by passing a combination of\n** [SQLITE_CHANGESETAPPLY_NOSAVEPOINT | supported flags] as the 9th parameter.\n**\n** Note that the sqlite3changeset_apply_v2() API is still <b>experimental</b>\n** and therefore subject to change.\n*/\nSQLITE_API int sqlite3changeset_apply(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n);\nSQLITE_API int sqlite3changeset_apply_v2(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase, /* OUT: Rebase data */\n  int flags                       /* SESSION_CHANGESETAPPLY_* flags */\n);\nSQLITE_API int sqlite3changeset_apply_v3(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int nChangeset,                 /* Size of changeset in bytes */\n  void *pChangeset,               /* Changeset blob */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p     /* Handle describing change */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase, /* OUT: Rebase data */\n  int flags                       /* SESSION_CHANGESETAPPLY_* flags */\n);\n\n/*\n** CAPI3REF: Flags for sqlite3changeset_apply_v2\n**\n** The following flags may passed via the 9th parameter to\n** [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]:\n**\n** <dl>\n** <dt>SQLITE_CHANGESETAPPLY_NOSAVEPOINT <dd>\n**   Usually, the sessions module encloses all operations performed by\n**   a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The\n**   SAVEPOINT is committed if the changeset or patchset is successfully\n**   applied, or rolled back if an error occurs. Specifying this flag\n**   causes the sessions module to omit this savepoint. In this case, if the\n**   caller has an open transaction or savepoint when apply_v2() is called,\n**   it may revert the partially applied changeset by rolling it back.\n**\n** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>\n**   Invert the changeset before applying it. This is equivalent to inverting\n**   a changeset using sqlite3changeset_invert() before applying it. It is\n**   an error to specify this flag with a patchset.\n**\n** <dt>SQLITE_CHANGESETAPPLY_IGNORENOOP <dd>\n**   Do not invoke the conflict handler callback for any changes that\n**   would not actually modify the database even if they were applied.\n**   Specifically, this means that the conflict handler is not invoked\n**   for:\n**    <ul>\n**    <li>a delete change if the row being deleted cannot be found,\n**    <li>an update change if the modified fields are already set to\n**        their new values in the conflicting row, or\n**    <li>an insert change if all fields of the conflicting row match\n**        the row being inserted.\n**    </ul>\n**\n** <dt>SQLITE_CHANGESETAPPLY_FKNOACTION <dd>\n**   If this flag it set, then all foreign key constraints in the target\n**   database behave as if they were declared with \"ON UPDATE NO ACTION ON\n**   DELETE NO ACTION\", even if they are actually CASCADE, RESTRICT, SET NULL\n**   or SET DEFAULT.\n*/\n#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT   0x0001\n#define SQLITE_CHANGESETAPPLY_INVERT        0x0002\n#define SQLITE_CHANGESETAPPLY_IGNORENOOP    0x0004\n#define SQLITE_CHANGESETAPPLY_FKNOACTION    0x0008\n\n/*\n** CAPI3REF: Constants Passed To The Conflict Handler\n**\n** Values that may be passed as the second argument to a conflict-handler.\n**\n** <dl>\n** <dt>SQLITE_CHANGESET_DATA<dd>\n**   The conflict handler is invoked with CHANGESET_DATA as the second argument\n**   when processing a DELETE or UPDATE change if a row with the required\n**   PRIMARY KEY fields is present in the database, but one or more other\n**   (non primary-key) fields modified by the update do not contain the\n**   expected \"before\" values.\n**\n**   The conflicting row, in this case, is the database row with the matching\n**   primary key.\n**\n** <dt>SQLITE_CHANGESET_NOTFOUND<dd>\n**   The conflict handler is invoked with CHANGESET_NOTFOUND as the second\n**   argument when processing a DELETE or UPDATE change if a row with the\n**   required PRIMARY KEY fields is not present in the database.\n**\n**   There is no conflicting row in this case. The results of invoking the\n**   sqlite3changeset_conflict() API are undefined.\n**\n** <dt>SQLITE_CHANGESET_CONFLICT<dd>\n**   CHANGESET_CONFLICT is passed as the second argument to the conflict\n**   handler while processing an INSERT change if the operation would result\n**   in duplicate primary key values.\n**\n**   The conflicting row in this case is the database row with the matching\n**   primary key.\n**\n** <dt>SQLITE_CHANGESET_FOREIGN_KEY<dd>\n**   If foreign key handling is enabled, and applying a changeset leaves the\n**   database in a state containing foreign key violations, the conflict\n**   handler is invoked with CHANGESET_FOREIGN_KEY as the second argument\n**   exactly once before the changeset is committed. If the conflict handler\n**   returns CHANGESET_OMIT, the changes, including those that caused the\n**   foreign key constraint violation, are committed. Or, if it returns\n**   CHANGESET_ABORT, the changeset is rolled back.\n**\n**   No current or conflicting row information is provided. The only function\n**   it is possible to call on the supplied sqlite3_changeset_iter handle\n**   is sqlite3changeset_fk_conflicts().\n**\n** <dt>SQLITE_CHANGESET_CONSTRAINT<dd>\n**   If any other constraint violation occurs while applying a change (i.e.\n**   a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is\n**   invoked with CHANGESET_CONSTRAINT as the second argument.\n**\n**   There is no conflicting row in this case. The results of invoking the\n**   sqlite3changeset_conflict() API are undefined.\n**\n** </dl>\n*/\n#define SQLITE_CHANGESET_DATA        1\n#define SQLITE_CHANGESET_NOTFOUND    2\n#define SQLITE_CHANGESET_CONFLICT    3\n#define SQLITE_CHANGESET_CONSTRAINT  4\n#define SQLITE_CHANGESET_FOREIGN_KEY 5\n\n/*\n** CAPI3REF: Constants Returned By The Conflict Handler\n**\n** A conflict handler callback must return one of the following three values.\n**\n** <dl>\n** <dt>SQLITE_CHANGESET_OMIT<dd>\n**   If a conflict handler returns this value no special action is taken. The\n**   change that caused the conflict is not applied. The session module\n**   continues to the next change in the changeset.\n**\n** <dt>SQLITE_CHANGESET_REPLACE<dd>\n**   This value may only be returned if the second argument to the conflict\n**   handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this\n**   is not the case, any changes applied so far are rolled back and the\n**   call to sqlite3changeset_apply() returns SQLITE_MISUSE.\n**\n**   If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict\n**   handler, then the conflicting row is either updated or deleted, depending\n**   on the type of change.\n**\n**   If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict\n**   handler, then the conflicting row is removed from the database and a\n**   second attempt to apply the change is made. If this second attempt fails,\n**   the original row is restored to the database before continuing.\n**\n** <dt>SQLITE_CHANGESET_ABORT<dd>\n**   If this value is returned, any changes applied so far are rolled back\n**   and the call to sqlite3changeset_apply() returns SQLITE_ABORT.\n** </dl>\n*/\n#define SQLITE_CHANGESET_OMIT       0\n#define SQLITE_CHANGESET_REPLACE    1\n#define SQLITE_CHANGESET_ABORT      2\n\n/*\n** CAPI3REF: Rebasing changesets\n** EXPERIMENTAL\n**\n** Suppose there is a site hosting a database in state S0. And that\n** modifications are made that move that database to state S1 and a\n** changeset recorded (the \"local\" changeset). Then, a changeset based\n** on S0 is received from another site (the \"remote\" changeset) and\n** applied to the database. The database is then in state\n** (S1+\"remote\"), where the exact state depends on any conflict\n** resolution decisions (OMIT or REPLACE) made while applying \"remote\".\n** Rebasing a changeset is to update it to take those conflict\n** resolution decisions into account, so that the same conflicts\n** do not have to be resolved elsewhere in the network.\n**\n** For example, if both the local and remote changesets contain an\n** INSERT of the same key on \"CREATE TABLE t1(a PRIMARY KEY, b)\":\n**\n**   local:  INSERT INTO t1 VALUES(1, 'v1');\n**   remote: INSERT INTO t1 VALUES(1, 'v2');\n**\n** and the conflict resolution is REPLACE, then the INSERT change is\n** removed from the local changeset (it was overridden). Or, if the\n** conflict resolution was \"OMIT\", then the local changeset is modified\n** to instead contain:\n**\n**           UPDATE t1 SET b = 'v2' WHERE a=1;\n**\n** Changes within the local changeset are rebased as follows:\n**\n** <dl>\n** <dt>Local INSERT<dd>\n**   This may only conflict with a remote INSERT. If the conflict\n**   resolution was OMIT, then add an UPDATE change to the rebased\n**   changeset. Or, if the conflict resolution was REPLACE, add\n**   nothing to the rebased changeset.\n**\n** <dt>Local DELETE<dd>\n**   This may conflict with a remote UPDATE or DELETE. In both cases the\n**   only possible resolution is OMIT. If the remote operation was a\n**   DELETE, then add no change to the rebased changeset. If the remote\n**   operation was an UPDATE, then the old.* fields of change are updated\n**   to reflect the new.* values in the UPDATE.\n**\n** <dt>Local UPDATE<dd>\n**   This may conflict with a remote UPDATE or DELETE. If it conflicts\n**   with a DELETE, and the conflict resolution was OMIT, then the update\n**   is changed into an INSERT. Any undefined values in the new.* record\n**   from the update change are filled in using the old.* values from\n**   the conflicting DELETE. Or, if the conflict resolution was REPLACE,\n**   the UPDATE change is simply omitted from the rebased changeset.\n**\n**   If conflict is with a remote UPDATE and the resolution is OMIT, then\n**   the old.* values are rebased using the new.* values in the remote\n**   change. Or, if the resolution is REPLACE, then the change is copied\n**   into the rebased changeset with updates to columns also updated by\n**   the conflicting remote UPDATE removed. If this means no columns would\n**   be updated, the change is omitted.\n** </dl>\n**\n** A local change may be rebased against multiple remote changes\n** simultaneously. If a single key is modified by multiple remote\n** changesets, they are combined as follows before the local changeset\n** is rebased:\n**\n** <ul>\n**    <li> If there has been one or more REPLACE resolutions on a\n**         key, it is rebased according to a REPLACE.\n**\n**    <li> If there have been no REPLACE resolutions on a key, then\n**         the local changeset is rebased according to the most recent\n**         of the OMIT resolutions.\n** </ul>\n**\n** Note that conflict resolutions from multiple remote changesets are\n** combined on a per-field basis, not per-row. This means that in the\n** case of multiple remote UPDATE operations, some fields of a single\n** local change may be rebased for REPLACE while others are rebased for\n** OMIT.\n**\n** In order to rebase a local changeset, the remote changeset must first\n** be applied to the local database using sqlite3changeset_apply_v2() and\n** the buffer of rebase information captured. Then:\n**\n** <ol>\n**   <li> An sqlite3_rebaser object is created by calling\n**        sqlite3rebaser_create().\n**   <li> The new object is configured with the rebase buffer obtained from\n**        sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure().\n**        If the local changeset is to be rebased against multiple remote\n**        changesets, then sqlite3rebaser_configure() should be called\n**        multiple times, in the same order that the multiple\n**        sqlite3changeset_apply_v2() calls were made.\n**   <li> Each local changeset is rebased by calling sqlite3rebaser_rebase().\n**   <li> The sqlite3_rebaser object is deleted by calling\n**        sqlite3rebaser_delete().\n** </ol>\n*/\ntypedef struct sqlite3_rebaser sqlite3_rebaser;\n\n/*\n** CAPI3REF: Create a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Allocate a new changeset rebaser object. If successful, set (*ppNew) to\n** point to the new object and return SQLITE_OK. Otherwise, if an error\n** occurs, return an SQLite error code (e.g. SQLITE_NOMEM) and set (*ppNew)\n** to NULL.\n*/\nSQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);\n\n/*\n** CAPI3REF: Configure a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Configure the changeset rebaser object to rebase changesets according\n** to the conflict resolutions described by buffer pRebase (size nRebase\n** bytes), which must have been obtained from a previous call to\n** sqlite3changeset_apply_v2().\n*/\nSQLITE_API int sqlite3rebaser_configure(\n  sqlite3_rebaser*,\n  int nRebase, const void *pRebase\n);\n\n/*\n** CAPI3REF: Rebase a changeset\n** EXPERIMENTAL\n**\n** Argument pIn must point to a buffer containing a changeset nIn bytes\n** in size. This function allocates and populates a buffer with a copy\n** of the changeset rebased according to the configuration of the\n** rebaser object passed as the first argument. If successful, (*ppOut)\n** is set to point to the new buffer containing the rebased changeset and\n** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the\n** responsibility of the caller to eventually free the new buffer using\n** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)\n** are set to zero and an SQLite error code returned.\n*/\nSQLITE_API int sqlite3rebaser_rebase(\n  sqlite3_rebaser*,\n  int nIn, const void *pIn,\n  int *pnOut, void **ppOut\n);\n\n/*\n** CAPI3REF: Delete a changeset rebaser object.\n** EXPERIMENTAL\n**\n** Delete the changeset rebaser object and all associated resources. There\n** should be one call to this function for each successful invocation\n** of sqlite3rebaser_create().\n*/\nSQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);\n\n/*\n** CAPI3REF: Streaming Versions of API functions.\n**\n** The six streaming API xxx_strm() functions serve similar purposes to the\n** corresponding non-streaming API functions:\n**\n** <table border=1 style=\"margin-left:8ex;margin-right:8ex\">\n**   <tr><th>Streaming function<th>Non-streaming equivalent</th>\n**   <tr><td>sqlite3changeset_apply_strm<td>[sqlite3changeset_apply]\n**   <tr><td>sqlite3changeset_apply_strm_v2<td>[sqlite3changeset_apply_v2]\n**   <tr><td>sqlite3changeset_concat_strm<td>[sqlite3changeset_concat]\n**   <tr><td>sqlite3changeset_invert_strm<td>[sqlite3changeset_invert]\n**   <tr><td>sqlite3changeset_start_strm<td>[sqlite3changeset_start]\n**   <tr><td>sqlite3session_changeset_strm<td>[sqlite3session_changeset]\n**   <tr><td>sqlite3session_patchset_strm<td>[sqlite3session_patchset]\n** </table>\n**\n** Non-streaming functions that accept changesets (or patchsets) as input\n** require that the entire changeset be stored in a single buffer in memory.\n** Similarly, those that return a changeset or patchset do so by returning\n** a pointer to a single large buffer allocated using sqlite3_malloc().\n** Normally this is convenient. However, if an application running in a\n** low-memory environment is required to handle very large changesets, the\n** large contiguous memory allocations required can become onerous.\n**\n** In order to avoid this problem, instead of a single large buffer, input\n** is passed to a streaming API functions by way of a callback function that\n** the sessions module invokes to incrementally request input data as it is\n** required. In all cases, a pair of API function parameters such as\n**\n**  <pre>\n**  &nbsp;     int nChangeset,\n**  &nbsp;     void *pChangeset,\n**  </pre>\n**\n** Is replaced by:\n**\n**  <pre>\n**  &nbsp;     int (*xInput)(void *pIn, void *pData, int *pnData),\n**  &nbsp;     void *pIn,\n**  </pre>\n**\n** Each time the xInput callback is invoked by the sessions module, the first\n** argument passed is a copy of the supplied pIn context pointer. The second\n** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no\n** error occurs the xInput method should copy up to (*pnData) bytes of data\n** into the buffer and set (*pnData) to the actual number of bytes copied\n** before returning SQLITE_OK. If the input is completely exhausted, (*pnData)\n** should be set to zero to indicate this. Or, if an error occurs, an SQLite\n** error code should be returned. In all cases, if an xInput callback returns\n** an error, all processing is abandoned and the streaming API function\n** returns a copy of the error code to the caller.\n**\n** In the case of sqlite3changeset_start_strm(), the xInput callback may be\n** invoked by the sessions module at any point during the lifetime of the\n** iterator. If such an xInput callback returns an error, the iterator enters\n** an error state, whereby all subsequent calls to iterator functions\n** immediately fail with the same error code as returned by xInput.\n**\n** Similarly, streaming API functions that return changesets (or patchsets)\n** return them in chunks by way of a callback function instead of via a\n** pointer to a single large buffer. In this case, a pair of parameters such\n** as:\n**\n**  <pre>\n**  &nbsp;     int *pnChangeset,\n**  &nbsp;     void **ppChangeset,\n**  </pre>\n**\n** Is replaced by:\n**\n**  <pre>\n**  &nbsp;     int (*xOutput)(void *pOut, const void *pData, int nData),\n**  &nbsp;     void *pOut\n**  </pre>\n**\n** The xOutput callback is invoked zero or more times to return data to\n** the application. The first parameter passed to each call is a copy of the\n** pOut pointer supplied by the application. The second parameter, pData,\n** points to a buffer nData bytes in size containing the chunk of output\n** data being returned. If the xOutput callback successfully processes the\n** supplied data, it should return SQLITE_OK to indicate success. Otherwise,\n** it should return some other SQLite error code. In this case processing\n** is immediately abandoned and the streaming API function returns a copy\n** of the xOutput error code to the application.\n**\n** The sessions module never invokes an xOutput callback with the third\n** parameter set to a value less than or equal to zero. Other than this,\n** no guarantees are made as to the size of the chunks of data returned.\n*/\nSQLITE_API int sqlite3changeset_apply_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx                      /* First argument passed to xConflict */\n);\nSQLITE_API int sqlite3changeset_apply_v2_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    const char *zTab              /* Table name */\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n);\nSQLITE_API int sqlite3changeset_apply_v3_strm(\n  sqlite3 *db,                    /* Apply change to \"main\" db of this handle */\n  int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */\n  void *pIn,                                          /* First arg for xInput */\n  int(*xFilter)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    sqlite3_changeset_iter *p\n  ),\n  int(*xConflict)(\n    void *pCtx,                   /* Copy of sixth arg to _apply() */\n    int eConflict,                /* DATA, MISSING, CONFLICT, CONSTRAINT */\n    sqlite3_changeset_iter *p     /* Handle describing change and conflict */\n  ),\n  void *pCtx,                     /* First argument passed to xConflict */\n  void **ppRebase, int *pnRebase,\n  int flags\n);\nSQLITE_API int sqlite3changeset_concat_strm(\n  int (*xInputA)(void *pIn, void *pData, int *pnData),\n  void *pInA,\n  int (*xInputB)(void *pIn, void *pData, int *pnData),\n  void *pInB,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changeset_invert_strm(\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changeset_start_strm(\n  sqlite3_changeset_iter **pp,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn\n);\nSQLITE_API int sqlite3changeset_start_v2_strm(\n  sqlite3_changeset_iter **pp,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int flags\n);\nSQLITE_API int sqlite3session_changeset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3session_patchset_strm(\n  sqlite3_session *pSession,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\nSQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*,\n    int (*xInput)(void *pIn, void *pData, int *pnData),\n    void *pIn\n);\nSQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,\n    int (*xOutput)(void *pOut, const void *pData, int nData),\n    void *pOut\n);\nSQLITE_API int sqlite3rebaser_rebase_strm(\n  sqlite3_rebaser *pRebaser,\n  int (*xInput)(void *pIn, void *pData, int *pnData),\n  void *pIn,\n  int (*xOutput)(void *pOut, const void *pData, int nData),\n  void *pOut\n);\n\n/*\n** CAPI3REF: Configure global parameters\n**\n** The sqlite3session_config() interface is used to make global configuration\n** changes to the sessions module in order to tune it to the specific needs\n** of the application.\n**\n** The sqlite3session_config() interface is not threadsafe. If it is invoked\n** while any other thread is inside any other sessions method then the\n** results are undefined. Furthermore, if it is invoked after any sessions\n** related objects have been created, the results are also undefined.\n**\n** The first argument to the sqlite3session_config() function must be one\n** of the SQLITE_SESSION_CONFIG_XXX constants defined below. The\n** interpretation of the (void*) value passed as the second parameter and\n** the effect of calling this function depends on the value of the first\n** parameter.\n**\n** <dl>\n** <dt>SQLITE_SESSION_CONFIG_STRMSIZE<dd>\n**    By default, the sessions module streaming interfaces attempt to input\n**    and output data in approximately 1 KiB chunks. This operand may be used\n**    to set and query the value of this configuration setting. The pointer\n**    passed as the second argument must point to a value of type (int).\n**    If this value is greater than 0, it is used as the new streaming data\n**    chunk size for both input and output. Before returning, the (int) value\n**    pointed to by pArg is set to the final value of the streaming interface\n**    chunk size.\n** </dl>\n**\n** This function returns SQLITE_OK if successful, or an SQLite error code\n** otherwise.\n*/\nSQLITE_API int sqlite3session_config(int op, void *pArg);\n\n/*\n** CAPI3REF: Values for sqlite3session_config().\n*/\n#define SQLITE_SESSION_CONFIG_STRMSIZE 1\n\n/*\n** Make sure we can call this stuff from C++.\n*/\n#ifdef __cplusplus\n}\n#endif\n\n#endif  /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */\n\n/******** End of sqlite3session.h *********/\n/******** Begin file fts5.h *********/\n/*\n** 2014 May 31\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n******************************************************************************\n**\n** Interfaces to extend FTS5. Using the interfaces defined in this file,\n** FTS5 may be extended with:\n**\n**     * custom tokenizers, and\n**     * custom auxiliary functions.\n*/\n\n\n#ifndef _FTS5_H\n#define _FTS5_H\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*************************************************************************\n** CUSTOM AUXILIARY FUNCTIONS\n**\n** Virtual table implementations may overload SQL functions by implementing\n** the sqlite3_module.xFindFunction() method.\n*/\n\ntypedef struct Fts5ExtensionApi Fts5ExtensionApi;\ntypedef struct Fts5Context Fts5Context;\ntypedef struct Fts5PhraseIter Fts5PhraseIter;\n\ntypedef void (*fts5_extension_function)(\n  const Fts5ExtensionApi *pApi,   /* API offered by current FTS version */\n  Fts5Context *pFts,              /* First arg to pass to pApi functions */\n  sqlite3_context *pCtx,          /* Context for returning result/error */\n  int nVal,                       /* Number of values in apVal[] array */\n  sqlite3_value **apVal           /* Array of trailing arguments */\n);\n\nstruct Fts5PhraseIter {\n  const unsigned char *a;\n  const unsigned char *b;\n};\n\n/*\n** EXTENSION API FUNCTIONS\n**\n** xUserData(pFts):\n**   Return a copy of the pUserData pointer passed to the xCreateFunction()\n**   API when the extension function was registered.\n**\n** xColumnTotalSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the FTS5 table. Or, if iCol is\n**   non-negative but less than the number of columns in the table, return\n**   the total number of tokens in column iCol, considering all rows in\n**   the FTS5 table.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n** xColumnCount(pFts):\n**   Return the number of columns in the table.\n**\n** xColumnSize(pFts, iCol, pnToken):\n**   If parameter iCol is less than zero, set output variable *pnToken\n**   to the total number of tokens in the current row. Or, if iCol is\n**   non-negative but less than the number of columns in the table, set\n**   *pnToken to the number of tokens in column iCol of the current row.\n**\n**   If parameter iCol is greater than or equal to the number of columns\n**   in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.\n**   an OOM condition or IO error), an appropriate SQLite error code is\n**   returned.\n**\n**   This function may be quite inefficient if used with an FTS5 table\n**   created with the \"columnsize=0\" option.\n**\n** xColumnText:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the text of column iCol of\n**   the current document. If successful, (*pz) is set to point to a buffer\n**   containing the text in utf-8 encoding, (*pn) is set to the size in bytes\n**   (not characters) of the buffer and SQLITE_OK is returned. Otherwise,\n**   if an error occurs, an SQLite error code is returned and the final values\n**   of (*pz) and (*pn) are undefined.\n**\n** xPhraseCount:\n**   Returns the number of phrases in the current query expression.\n**\n** xPhraseSize:\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of phrases in the current query, as returned by xPhraseCount,\n**   0 is returned. Otherwise, this function returns the number of tokens in\n**   phrase iPhrase of the query. Phrases are numbered starting from zero.\n**\n** xInstCount:\n**   Set *pnInst to the total number of occurrences of all phrases within\n**   the query within the current row. Return SQLITE_OK if successful, or\n**   an error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always returns 0.\n**\n** xInst:\n**   Query for the details of phrase match iIdx within the current row.\n**   Phrase matches are numbered starting from zero, so the iIdx argument\n**   should be greater than or equal to zero and smaller than the value\n**   output by xInstCount(). If iIdx is less than zero or greater than\n**   or equal to the value returned by xInstCount(), SQLITE_RANGE is returned.\n**\n**   Otherwise, output parameter *piPhrase is set to the phrase number, *piCol\n**   to the column in which it occurs and *piOff the token offset of the\n**   first token of the phrase. SQLITE_OK is returned if successful, or an\n**   error code (i.e. SQLITE_NOMEM) if an error occurs.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xRowid:\n**   Returns the rowid of the current row.\n**\n** xTokenize:\n**   Tokenize text using the tokenizer belonging to the FTS5 table.\n**\n** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):\n**   This API function is used to query the FTS table for phrase iPhrase\n**   of the current query. Specifically, a query equivalent to:\n**\n**       ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid\n**\n**   with $p set to a phrase equivalent to the phrase iPhrase of the\n**   current query is executed. Any column filter that applies to\n**   phrase iPhrase of the current query is included in $p. For each\n**   row visited, the callback function passed as the fourth argument\n**   is invoked. The context and API objects passed to the callback\n**   function may be used to access the properties of each matched row.\n**   Invoking Api.xUserData() returns a copy of the pointer passed as\n**   the third argument to pUserData.\n**\n**   If parameter iPhrase is less than zero, or greater than or equal to\n**   the number of phrases in the query, as returned by xPhraseCount(),\n**   this function returns SQLITE_RANGE.\n**\n**   If the callback function returns any value other than SQLITE_OK, the\n**   query is abandoned and the xQueryPhrase function returns immediately.\n**   If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.\n**   Otherwise, the error code is propagated upwards.\n**\n**   If the query runs to completion without incident, SQLITE_OK is returned.\n**   Or, if some error occurs before the query completes or is aborted by\n**   the callback, an SQLite error code is returned.\n**\n**\n** xSetAuxdata(pFts5, pAux, xDelete)\n**\n**   Save the pointer passed as the second argument as the extension function's\n**   \"auxiliary data\". The pointer may then be retrieved by the current or any\n**   future invocation of the same fts5 extension function made as part of\n**   the same MATCH query using the xGetAuxdata() API.\n**\n**   Each extension function is allocated a single auxiliary data slot for\n**   each FTS query (MATCH expression). If the extension function is invoked\n**   more than once for a single FTS query, then all invocations share a\n**   single auxiliary data context.\n**\n**   If there is already an auxiliary data pointer when this function is\n**   invoked, then it is replaced by the new pointer. If an xDelete callback\n**   was specified along with the original pointer, it is invoked at this\n**   point.\n**\n**   The xDelete callback, if one is specified, is also invoked on the\n**   auxiliary data pointer after the FTS5 query has finished.\n**\n**   If an error (e.g. an OOM condition) occurs within this function,\n**   the auxiliary data is set to NULL and an error code returned. If the\n**   xDelete parameter was not NULL, it is invoked on the auxiliary data\n**   pointer before returning.\n**\n**\n** xGetAuxdata(pFts5, bClear)\n**\n**   Returns the current auxiliary data pointer for the fts5 extension\n**   function. See the xSetAuxdata() method for details.\n**\n**   If the bClear argument is non-zero, then the auxiliary data is cleared\n**   (set to NULL) before this function returns. In this case the xDelete,\n**   if any, is not invoked.\n**\n**\n** xRowCount(pFts5, pnRow)\n**\n**   This function is used to retrieve the total number of rows in the table.\n**   In other words, the same value that would be returned by:\n**\n**        SELECT count(*) FROM ftstable;\n**\n** xPhraseFirst()\n**   This function is used, along with type Fts5PhraseIter and the xPhraseNext\n**   method, to iterate through all instances of a single query phrase within\n**   the current row. This is the same information as is accessible via the\n**   xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient\n**   to use, this API may be faster under some circumstances. To iterate\n**   through instances of phrase iPhrase, use the following code:\n**\n**       Fts5PhraseIter iter;\n**       int iCol, iOff;\n**       for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);\n**           iCol>=0;\n**           pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)\n**       ){\n**         // An instance of phrase iPhrase at offset iOff of column iCol\n**       }\n**\n**   The Fts5PhraseIter structure is defined above. Applications should not\n**   modify this structure directly - it should only be used as shown above\n**   with the xPhraseFirst() and xPhraseNext() API methods (and by\n**   xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below).\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option. If the FTS5 table is created\n**   with either \"detail=none\" or \"detail=column\" and \"content=\" option\n**   (i.e. if it is a contentless table), then this API always iterates\n**   through an empty set (all calls to xPhraseFirst() set iCol to -1).\n**\n**   In all cases, matches are visited in (column ASC, offset ASC) order.\n**   i.e. all those in column 0, sorted by offset, followed by those in\n**   column 1, etc.\n**\n** xPhraseNext()\n**   See xPhraseFirst above.\n**\n** xPhraseFirstColumn()\n**   This function and xPhraseNextColumn() are similar to the xPhraseFirst()\n**   and xPhraseNext() APIs described above. The difference is that instead\n**   of iterating through all instances of a phrase in the current row, these\n**   APIs are used to iterate through the set of columns in the current row\n**   that contain one or more instances of a specified phrase. For example:\n**\n**       Fts5PhraseIter iter;\n**       int iCol;\n**       for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);\n**           iCol>=0;\n**           pApi->xPhraseNextColumn(pFts, &iter, &iCol)\n**       ){\n**         // Column iCol contains at least one instance of phrase iPhrase\n**       }\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" option. If the FTS5 table is created with either\n**   \"detail=none\" \"content=\" option (i.e. if it is a contentless table),\n**   then this API always iterates through an empty set (all calls to\n**   xPhraseFirstColumn() set iCol to -1).\n**\n**   The information accessed using this API and its companion\n**   xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext\n**   (or xInst/xInstCount). The chief advantage of this API is that it is\n**   significantly more efficient than those alternatives when used with\n**   \"detail=column\" tables.\n**\n** xPhraseNextColumn()\n**   See xPhraseFirstColumn above.\n**\n** xQueryToken(pFts5, iPhrase, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase iPhrase of the current\n**   query. Before returning, output parameter *ppToken is set to point\n**   to a buffer containing the requested token, and *pnToken to the\n**   size of this buffer in bytes.\n**\n**   If iPhrase or iToken are less than zero, or if iPhrase is greater than\n**   or equal to the number of phrases in the query as reported by\n**   xPhraseCount(), or if iToken is equal to or greater than the number of\n**   tokens in the phrase, SQLITE_RANGE is returned and *ppToken and *pnToken\n     are both zeroed.\n**\n**   The output text is not a copy of the query text that specified the\n**   token. It is the output of the tokenizer module. For tokendata=1\n**   tables, this includes any embedded 0x00 and trailing data.\n**\n** xInstToken(pFts5, iIdx, iToken, ppToken, pnToken)\n**   This is used to access token iToken of phrase hit iIdx within the\n**   current row. If iIdx is less than zero or greater than or equal to the\n**   value returned by xInstCount(), SQLITE_RANGE is returned.  Otherwise,\n**   output variable (*ppToken) is set to point to a buffer containing the\n**   matching document token, and (*pnToken) to the size of that buffer in\n**   bytes.\n**\n**   The output text is not a copy of the document text that was tokenized.\n**   It is the output of the tokenizer module. For tokendata=1 tables, this\n**   includes any embedded 0x00 and trailing data.\n**\n**   This API may be slow in some cases if the token identified by parameters\n**   iIdx and iToken matched a prefix token in the query. In most cases, the\n**   first call to this API for each prefix token in the query is forced\n**   to scan the portion of the full-text index that matches the prefix\n**   token to collect the extra data required by this API. If the prefix\n**   token matches a large number of token instances in the document set,\n**   this may be a performance problem.\n**\n**   If the user knows in advance that a query may use this API for a\n**   prefix token, FTS5 may be configured to collect all required data as part\n**   of the initial querying of the full-text index, avoiding the second scan\n**   entirely. This also causes prefix queries that do not use this API to\n**   run more slowly and use more memory. FTS5 may be configured in this way\n**   either on a per-table basis using the [FTS5 insttoken | 'insttoken']\n**   option, or on a per-query basis using the\n**   [fts5_insttoken | fts5_insttoken()] user function.\n**\n**   This API can be quite slow if used with an FTS5 table created with the\n**   \"detail=none\" or \"detail=column\" option.\n**\n** xColumnLocale(pFts5, iIdx, pzLocale, pnLocale)\n**   If parameter iCol is less than zero, or greater than or equal to the\n**   number of columns in the table, SQLITE_RANGE is returned.\n**\n**   Otherwise, this function attempts to retrieve the locale associated\n**   with column iCol of the current row. Usually, there is no associated\n**   locale, and output parameters (*pzLocale) and (*pnLocale) are set\n**   to NULL and 0, respectively. However, if the fts5_locale() function\n**   was used to associate a locale with the value when it was inserted\n**   into the fts5 table, then (*pzLocale) is set to point to a nul-terminated\n**   buffer containing the name of the locale in utf-8 encoding. (*pnLocale)\n**   is set to the size in bytes of the buffer, not including the\n**   nul-terminator.\n**\n**   If successful, SQLITE_OK is returned. Or, if an error occurs, an\n**   SQLite error code is returned. The final value of the output parameters\n**   is undefined in this case.\n**\n** xTokenize_v2:\n**   Tokenize text using the tokenizer belonging to the FTS5 table. This\n**   API is the same as the xTokenize() API, except that it allows a tokenizer\n**   locale to be specified.\n*/\nstruct Fts5ExtensionApi {\n  int iVersion;                   /* Currently always set to 4 */\n\n  void *(*xUserData)(Fts5Context*);\n\n  int (*xColumnCount)(Fts5Context*);\n  int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);\n  int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);\n\n  int (*xTokenize)(Fts5Context*,\n    const char *pText, int nText, /* Text to tokenize */\n    void *pCtx,                   /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n\n  int (*xPhraseCount)(Fts5Context*);\n  int (*xPhraseSize)(Fts5Context*, int iPhrase);\n\n  int (*xInstCount)(Fts5Context*, int *pnInst);\n  int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);\n\n  sqlite3_int64 (*xRowid)(Fts5Context*);\n  int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);\n\n  int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,\n    int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)\n  );\n  int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));\n  void *(*xGetAuxdata)(Fts5Context*, int bClear);\n\n  int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);\n  void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);\n\n  int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);\n  void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);\n\n  /* Below this point are iVersion>=3 only */\n  int (*xQueryToken)(Fts5Context*,\n      int iPhrase, int iToken,\n      const char **ppToken, int *pnToken\n  );\n  int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);\n\n  /* Below this point are iVersion>=4 only */\n  int (*xColumnLocale)(Fts5Context*, int iCol, const char **pz, int *pn);\n  int (*xTokenize_v2)(Fts5Context*,\n    const char *pText, int nText,      /* Text to tokenize */\n    const char *pLocale, int nLocale,  /* Locale to pass to tokenizer */\n    void *pCtx,                        /* Context passed to xToken() */\n    int (*xToken)(void*, int, const char*, int, int, int)       /* Callback */\n  );\n};\n\n/*\n** CUSTOM AUXILIARY FUNCTIONS\n*************************************************************************/\n\n/*************************************************************************\n** CUSTOM TOKENIZERS\n**\n** Applications may also register custom tokenizer types. A tokenizer\n** is registered by providing fts5 with a populated instance of the\n** following structure. All structure methods must be defined, setting\n** any member of the fts5_tokenizer struct to NULL leads to undefined\n** behaviour. The structure methods are expected to function as follows:\n**\n** xCreate:\n**   This function is used to allocate and initialize a tokenizer instance.\n**   A tokenizer instance is required to actually tokenize text.\n**\n**   The first argument passed to this function is a copy of the (void*)\n**   pointer provided by the application when the fts5_tokenizer_v2 object\n**   was registered with FTS5 (the third argument to xCreateTokenizer()).\n**   The second and third arguments are an array of nul-terminated strings\n**   containing the tokenizer arguments, if any, specified following the\n**   tokenizer name as part of the CREATE VIRTUAL TABLE statement used\n**   to create the FTS5 table.\n**\n**   The final argument is an output variable. If successful, (*ppOut)\n**   should be set to point to the new tokenizer handle and SQLITE_OK\n**   returned. If an error occurs, some value other than SQLITE_OK should\n**   be returned. In this case, fts5 assumes that the final value of *ppOut\n**   is undefined.\n**\n** xDelete:\n**   This function is invoked to delete a tokenizer handle previously\n**   allocated using xCreate(). Fts5 guarantees that this function will\n**   be invoked exactly once for each successful call to xCreate().\n**\n** xTokenize:\n**   This function is expected to tokenize the nText byte string indicated\n**   by argument pText. pText may or may not be nul-terminated. The first\n**   argument passed to this function is a pointer to an Fts5Tokenizer object\n**   returned by an earlier call to xCreate().\n**\n**   The third argument indicates the reason that FTS5 is requesting\n**   tokenization of the supplied text. This is always one of the following\n**   four values:\n**\n**   <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into\n**            or removed from the FTS table. The tokenizer is being invoked to\n**            determine the set of tokens to add to (or delete from) the\n**            FTS index.\n**\n**       <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed\n**            against the FTS index. The tokenizer is being called to tokenize\n**            a bareword or quoted string specified as part of the query.\n**\n**       <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as\n**            FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is\n**            followed by a \"*\" character, indicating that the last token\n**            returned by the tokenizer will be treated as a token prefix.\n**\n**       <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to\n**            satisfy an fts5_api.xTokenize() request made by an auxiliary\n**            function. Or an fts5_api.xColumnSize() request made by the same\n**            on a columnsize=0 database.\n**   </ul>\n**\n**   The sixth and seventh arguments passed to xTokenize() - pLocale and\n**   nLocale - are a pointer to a buffer containing the locale to use for\n**   tokenization (e.g. \"en_US\") and its size in bytes, respectively. The\n**   pLocale buffer is not nul-terminated. pLocale may be passed NULL (in\n**   which case nLocale is always 0) to indicate that the tokenizer should\n**   use its default locale.\n**\n**   For each token in the input string, the supplied callback xToken() must\n**   be invoked. The first argument to it should be a copy of the pointer\n**   passed as the second argument to xTokenize(). The third and fourth\n**   arguments are a pointer to a buffer containing the token text, and the\n**   size of the token in bytes. The 4th and 5th arguments are the byte offsets\n**   of the first byte of and first byte immediately following the text from\n**   which the token is derived within the input.\n**\n**   The second argument passed to the xToken() callback (\"tflags\") should\n**   normally be set to 0. The exception is if the tokenizer supports\n**   synonyms. In this case see the discussion below for details.\n**\n**   FTS5 assumes the xToken() callback is invoked for each token in the\n**   order that they occur within the input text.\n**\n**   If an xToken() callback returns any value other than SQLITE_OK, then\n**   the tokenization should be abandoned and the xTokenize() method should\n**   immediately return a copy of the xToken() return value. Or, if the\n**   input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,\n**   if an error occurs with the xTokenize() implementation itself, it\n**   may abandon the tokenization and return any error code other than\n**   SQLITE_OK or SQLITE_DONE.\n**\n**   If the tokenizer is registered using an fts5_tokenizer_v2 object,\n**   then the xTokenize() method has two additional arguments - pLocale\n**   and nLocale. These specify the locale that the tokenizer should use\n**   for the current request. If pLocale and nLocale are both 0, then the\n**   tokenizer should use its default locale. Otherwise, pLocale points to\n**   an nLocale byte buffer containing the name of the locale to use as utf-8\n**   text. pLocale is not nul-terminated.\n**\n** FTS5_TOKENIZER\n**\n** There is also an fts5_tokenizer object. This is an older, deprecated,\n** version of fts5_tokenizer_v2. It is similar except that:\n**\n**  <ul>\n**    <li> There is no \"iVersion\" field, and\n**    <li> The xTokenize() method does not take a locale argument.\n**  </ul>\n**\n** Legacy fts5_tokenizer tokenizers must be registered using the\n** legacy xCreateTokenizer() function, instead of xCreateTokenizer_v2().\n**\n** Tokenizer implementations registered using either API may be retrieved\n** using both xFindTokenizer() and xFindTokenizer_v2().\n**\n** SYNONYM SUPPORT\n**\n**   Custom tokenizers may also support synonyms. Consider a case in which a\n**   user wishes to query for a phrase such as \"first place\". Using the\n**   built-in tokenizers, the FTS5 query 'first + place' will match instances\n**   of \"first place\" within the document set, but not alternative forms\n**   such as \"1st place\". In some applications, it would be better to match\n**   all instances of \"first place\" or \"1st place\" regardless of which form\n**   the user specified in the MATCH query text.\n**\n**   There are several ways to approach this in FTS5:\n**\n**   <ol><li> By mapping all synonyms to a single token. In this case, using\n**            the above example, this means that the tokenizer returns the\n**            same token for inputs \"first\" and \"1st\". Say that token is in\n**            fact \"first\", so that when the user inserts the document \"I won\n**            1st place\" entries are added to the index for tokens \"i\", \"won\",\n**            \"first\" and \"place\". If the user then queries for '1st + place',\n**            the tokenizer substitutes \"first\" for \"1st\" and the query works\n**            as expected.\n**\n**       <li> By querying the index for all synonyms of each query term\n**            separately. In this case, when tokenizing query text, the\n**            tokenizer may provide multiple synonyms for a single term\n**            within the document. FTS5 then queries the index for each\n**            synonym individually. For example, faced with the query:\n**\n**   <codeblock>\n**     ... MATCH 'first place'</codeblock>\n**\n**            the tokenizer offers both \"1st\" and \"first\" as synonyms for the\n**            first token in the MATCH query and FTS5 effectively runs a query\n**            similar to:\n**\n**   <codeblock>\n**     ... MATCH '(first OR 1st) place'</codeblock>\n**\n**            except that, for the purposes of auxiliary functions, the query\n**            still appears to contain just two phrases - \"(first OR 1st)\"\n**            being treated as a single phrase.\n**\n**       <li> By adding multiple synonyms for a single term to the FTS index.\n**            Using this method, when tokenizing document text, the tokenizer\n**            provides multiple synonyms for each token. So that when a\n**            document such as \"I won first place\" is tokenized, entries are\n**            added to the FTS index for \"i\", \"won\", \"first\", \"1st\" and\n**            \"place\".\n**\n**            This way, even if the tokenizer does not provide synonyms\n**            when tokenizing query text (it should not - to do so would be\n**            inefficient), it doesn't matter if the user queries for\n**            'first + place' or '1st + place', as there are entries in the\n**            FTS index corresponding to both forms of the first token.\n**   </ol>\n**\n**   Whether it is parsing document or query text, any call to xToken that\n**   specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit\n**   is considered to supply a synonym for the previous token. For example,\n**   when parsing the document \"I won first place\", a tokenizer that supports\n**   synonyms would call xToken() 5 times, as follows:\n**\n**   <codeblock>\n**       xToken(pCtx, 0, \"i\",                      1,  0,  1);\n**       xToken(pCtx, 0, \"won\",                    3,  2,  5);\n**       xToken(pCtx, 0, \"first\",                  5,  6, 11);\n**       xToken(pCtx, FTS5_TOKEN_COLOCATED, \"1st\", 3,  6, 11);\n**       xToken(pCtx, 0, \"place\",                  5, 12, 17);\n**</codeblock>\n**\n**   It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time\n**   xToken() is called. Multiple synonyms may be specified for a single token\n**   by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.\n**   There is no limit to the number of synonyms that may be provided for a\n**   single token.\n**\n**   In many cases, method (1) above is the best approach. It does not add\n**   extra data to the FTS index or require FTS5 to query for multiple terms,\n**   so it is efficient in terms of disk space and query speed. However, it\n**   does not support prefix queries very well. If, as suggested above, the\n**   token \"first\" is substituted for \"1st\" by the tokenizer, then the query:\n**\n**   <codeblock>\n**     ... MATCH '1s*'</codeblock>\n**\n**   will not match documents that contain the token \"1st\" (as the tokenizer\n**   will probably not map \"1s\" to any prefix of \"first\").\n**\n**   For full prefix support, method (3) may be preferred. In this case,\n**   because the index contains entries for both \"first\" and \"1st\", prefix\n**   queries such as 'fi*' or '1s*' will match correctly. However, because\n**   extra entries are added to the FTS index, this method uses more space\n**   within the database.\n**\n**   Method (2) offers a midpoint between (1) and (3). Using this method,\n**   a query such as '1s*' will match documents that contain the literal\n**   token \"1st\", but not \"first\" (assuming the tokenizer is not able to\n**   provide synonyms for prefixes). However, a non-prefix query like '1st'\n**   will match against \"1st\" and \"first\". This method does not require\n**   extra disk space, as no extra entries are added to the FTS index.\n**   On the other hand, it may require more CPU cycles to run MATCH queries,\n**   as separate queries of the FTS index are required for each synonym.\n**\n**   When using methods (2) or (3), it is important that the tokenizer only\n**   provide synonyms when tokenizing document text (method (3)) or query\n**   text (method (2)), not both. Doing so will not cause any errors, but is\n**   inefficient.\n*/\ntypedef struct Fts5Tokenizer Fts5Tokenizer;\ntypedef struct fts5_tokenizer_v2 fts5_tokenizer_v2;\nstruct fts5_tokenizer_v2 {\n  int iVersion;             /* Currently always 2 */\n\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      const char *pLocale, int nLocale,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n/*\n** New code should use the fts5_tokenizer_v2 type to define tokenizer\n** implementations. The following type is included for legacy applications\n** that still use it.\n*/\ntypedef struct fts5_tokenizer fts5_tokenizer;\nstruct fts5_tokenizer {\n  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);\n  void (*xDelete)(Fts5Tokenizer*);\n  int (*xTokenize)(Fts5Tokenizer*,\n      void *pCtx,\n      int flags,            /* Mask of FTS5_TOKENIZE_* flags */\n      const char *pText, int nText,\n      int (*xToken)(\n        void *pCtx,         /* Copy of 2nd argument to xTokenize() */\n        int tflags,         /* Mask of FTS5_TOKEN_* flags */\n        const char *pToken, /* Pointer to buffer containing token */\n        int nToken,         /* Size of token in bytes */\n        int iStart,         /* Byte offset of token within input text */\n        int iEnd            /* Byte offset of end of token within input text */\n      )\n  );\n};\n\n\n/* Flags that may be passed as the third argument to xTokenize() */\n#define FTS5_TOKENIZE_QUERY     0x0001\n#define FTS5_TOKENIZE_PREFIX    0x0002\n#define FTS5_TOKENIZE_DOCUMENT  0x0004\n#define FTS5_TOKENIZE_AUX       0x0008\n\n/* Flags that may be passed by the tokenizer implementation back to FTS5\n** as the third argument to the supplied xToken callback. */\n#define FTS5_TOKEN_COLOCATED    0x0001      /* Same position as prev. token */\n\n/*\n** END OF CUSTOM TOKENIZERS\n*************************************************************************/\n\n/*************************************************************************\n** FTS5 EXTENSION REGISTRATION API\n*/\ntypedef struct fts5_api fts5_api;\nstruct fts5_api {\n  int iVersion;                   /* Currently always set to 3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer *pTokenizer\n  );\n\n  /* Create a new auxiliary function */\n  int (*xCreateFunction)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_extension_function xFunction,\n    void (*xDestroy)(void*)\n  );\n\n  /* APIs below this point are only available if iVersion>=3 */\n\n  /* Create a new tokenizer */\n  int (*xCreateTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void *pUserData,\n    fts5_tokenizer_v2 *pTokenizer,\n    void (*xDestroy)(void*)\n  );\n\n  /* Find an existing tokenizer */\n  int (*xFindTokenizer_v2)(\n    fts5_api *pApi,\n    const char *zName,\n    void **ppUserData,\n    fts5_tokenizer_v2 **ppTokenizer\n  );\n};\n\n/*\n** END OF REGISTRATION API\n*************************************************************************/\n\n#ifdef __cplusplus\n}  /* end of the 'extern \"C\"' block */\n#endif\n\n#endif /* _FTS5_H */\n\n/******** End of fts5.h *********/\n#endif /* SQLITE3_H */\n#else // USE_LIBSQLITE3\n // If users really want to link against the system sqlite3 we\n// need to make this file a noop.\n #endif"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build cgo\n// +build cgo\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -std=gnu99\n#cgo CFLAGS: -DSQLITE_ENABLE_RTREE\n#cgo CFLAGS: -DSQLITE_THREADSAFE=1\n#cgo CFLAGS: -DHAVE_USLEEP=1\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS3\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS3_PARENTHESIS\n#cgo CFLAGS: -DSQLITE_TRACE_SIZE_LIMIT=15\n#cgo CFLAGS: -DSQLITE_OMIT_DEPRECATED\n#cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1\n#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT\n#cgo CFLAGS: -Wno-deprecated-declarations\n#cgo openbsd CFLAGS: -I/usr/local/include\n#cgo openbsd LDFLAGS: -L/usr/local/lib\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n#include <string.h>\n\n#ifdef __CYGWIN__\n# include <errno.h>\n#endif\n\n#ifndef SQLITE_OPEN_READWRITE\n# define SQLITE_OPEN_READWRITE 0\n#endif\n\n#ifndef SQLITE_OPEN_FULLMUTEX\n# define SQLITE_OPEN_FULLMUTEX 0\n#endif\n\n#ifndef SQLITE_DETERMINISTIC\n# define SQLITE_DETERMINISTIC 0\n#endif\n\n#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)\n# undef USE_PREAD\n# undef USE_PWRITE\n# define USE_PREAD64 1\n# define USE_PWRITE64 1\n#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)\n# undef USE_PREAD\n# undef USE_PWRITE\n# define USE_PREAD64 1\n# define USE_PWRITE64 1\n#endif\n\nstatic int\n_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {\n#ifdef SQLITE_OPEN_URI\n  return sqlite3_open_v2(filename, ppDb, flags | SQLITE_OPEN_URI, zVfs);\n#else\n  return sqlite3_open_v2(filename, ppDb, flags, zVfs);\n#endif\n}\n\nstatic int\n_sqlite3_bind_text(sqlite3_stmt *stmt, int n, char *p, int np) {\n  return sqlite3_bind_text(stmt, n, p, np, SQLITE_TRANSIENT);\n}\n\nstatic int\n_sqlite3_bind_blob(sqlite3_stmt *stmt, int n, void *p, int np) {\n  return sqlite3_bind_blob(stmt, n, p, np, SQLITE_TRANSIENT);\n}\n\n#include <stdio.h>\n#include <stdint.h>\n\nstatic int\n_sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes)\n{\n  int rv = sqlite3_exec(db, pcmd, 0, 0, 0);\n  *rowid = (long long) sqlite3_last_insert_rowid(db);\n  *changes = (long long) sqlite3_changes(db);\n  return rv;\n}\n\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\nextern int _sqlite3_step_blocking(sqlite3_stmt *stmt);\nextern int _sqlite3_step_row_blocking(sqlite3_stmt* stmt, long long* rowid, long long* changes);\nextern int _sqlite3_prepare_v2_blocking(sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail);\n\nstatic int\n_sqlite3_step_internal(sqlite3_stmt *stmt)\n{\n  return _sqlite3_step_blocking(stmt);\n}\n\nstatic int\n_sqlite3_step_row_internal(sqlite3_stmt* stmt, long long* rowid, long long* changes)\n{\n  return _sqlite3_step_row_blocking(stmt, rowid, changes);\n}\n\nstatic int\n_sqlite3_prepare_v2_internal(sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail)\n{\n  return _sqlite3_prepare_v2_blocking(db, zSql, nBytes, ppStmt, pzTail);\n}\n\n#else\nstatic int\n_sqlite3_step_internal(sqlite3_stmt *stmt)\n{\n  return sqlite3_step(stmt);\n}\n\nstatic int\n_sqlite3_step_row_internal(sqlite3_stmt* stmt, long long* rowid, long long* changes)\n{\n  int rv = sqlite3_step(stmt);\n  sqlite3* db = sqlite3_db_handle(stmt);\n  *rowid = (long long) sqlite3_last_insert_rowid(db);\n  *changes = (long long) sqlite3_changes(db);\n  return rv;\n}\n\nstatic int\n_sqlite3_prepare_v2_internal(sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail)\n{\n  return sqlite3_prepare_v2(db, zSql, nBytes, ppStmt, pzTail);\n}\n#endif\n\nvoid _sqlite3_result_text(sqlite3_context* ctx, const char* s) {\n  sqlite3_result_text(ctx, s, -1, &free);\n}\n\nvoid _sqlite3_result_blob(sqlite3_context* ctx, const void* b, int l) {\n  sqlite3_result_blob(ctx, b, l, SQLITE_TRANSIENT);\n}\n\n\nint _sqlite3_create_function(\n  sqlite3 *db,\n  const char *zFunctionName,\n  int nArg,\n  int eTextRep,\n  uintptr_t pApp,\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n  void (*xFinal)(sqlite3_context*)\n) {\n  return sqlite3_create_function(db, zFunctionName, nArg, eTextRep, (void*) pApp, xFunc, xStep, xFinal);\n}\n\nvoid callbackTrampoline(sqlite3_context*, int, sqlite3_value**);\nvoid stepTrampoline(sqlite3_context*, int, sqlite3_value**);\nvoid doneTrampoline(sqlite3_context*);\n\nint compareTrampoline(void*, int, char*, int, char*);\nint commitHookTrampoline(void*);\nvoid rollbackHookTrampoline(void*);\nvoid updateHookTrampoline(void*, int, char*, char*, sqlite3_int64);\n\nint authorizerTrampoline(void*, int, char*, char*, char*, char*);\n\n#ifdef SQLITE_LIMIT_WORKER_THREADS\n# define _SQLITE_HAS_LIMIT\n# define SQLITE_LIMIT_LENGTH                    0\n# define SQLITE_LIMIT_SQL_LENGTH                1\n# define SQLITE_LIMIT_COLUMN                    2\n# define SQLITE_LIMIT_EXPR_DEPTH                3\n# define SQLITE_LIMIT_COMPOUND_SELECT           4\n# define SQLITE_LIMIT_VDBE_OP                   5\n# define SQLITE_LIMIT_FUNCTION_ARG              6\n# define SQLITE_LIMIT_ATTACHED                  7\n# define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8\n# define SQLITE_LIMIT_VARIABLE_NUMBER           9\n# define SQLITE_LIMIT_TRIGGER_DEPTH            10\n# define SQLITE_LIMIT_WORKER_THREADS           11\n# else\n# define SQLITE_LIMIT_WORKER_THREADS           11\n#endif\n\nstatic int _sqlite3_limit(sqlite3* db, int limitId, int newLimit) {\n#ifndef _SQLITE_HAS_LIMIT\n  return -1;\n#else\n  return sqlite3_limit(db, limitId, newLimit);\n#endif\n}\n\n#if SQLITE_VERSION_NUMBER < 3012000\nstatic int sqlite3_system_errno(sqlite3 *db) {\n  return 0;\n}\n#endif\n*/\nimport \"C\"\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"database/sql/driver\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n\t\"unsafe\"\n)\n\n// SQLiteTimestampFormats is timestamp formats understood by both this module\n// and SQLite.  The first format in the slice will be used when saving time\n// values into the database. When parsing a string from a timestamp or datetime\n// column, the formats are tried in order.\nvar SQLiteTimestampFormats = []string{\n\t// By default, store timestamps with whatever timezone they come with.\n\t// When parsed, they will be returned with the same timezone.\n\t\"2006-01-02 15:04:05.999999999-07:00\",\n\t\"2006-01-02T15:04:05.999999999-07:00\",\n\t\"2006-01-02 15:04:05.999999999\",\n\t\"2006-01-02T15:04:05.999999999\",\n\t\"2006-01-02 15:04:05\",\n\t\"2006-01-02T15:04:05\",\n\t\"2006-01-02 15:04\",\n\t\"2006-01-02T15:04\",\n\t\"2006-01-02\",\n}\n\nconst (\n\tcolumnDate      string = \"date\"\n\tcolumnDatetime  string = \"datetime\"\n\tcolumnTimestamp string = \"timestamp\"\n)\n\n// This variable can be replaced with -ldflags like below:\n// go build -ldflags=\"-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'\"\nvar driverName = \"sqlite3\"\n\nfunc init() {\n\tif driverName != \"\" {\n\t\tsql.Register(driverName, &SQLiteDriver{})\n\t}\n}\n\n// Version returns SQLite library version information.\nfunc Version() (libVersion string, libVersionNumber int, sourceID string) {\n\tlibVersion = C.GoString(C.sqlite3_libversion())\n\tlibVersionNumber = int(C.sqlite3_libversion_number())\n\tsourceID = C.GoString(C.sqlite3_sourceid())\n\treturn libVersion, libVersionNumber, sourceID\n}\n\nconst (\n\t// used by authorizer and pre_update_hook\n\tSQLITE_DELETE = C.SQLITE_DELETE\n\tSQLITE_INSERT = C.SQLITE_INSERT\n\tSQLITE_UPDATE = C.SQLITE_UPDATE\n\n\t// used by authorzier - as return value\n\tSQLITE_OK     = C.SQLITE_OK\n\tSQLITE_IGNORE = C.SQLITE_IGNORE\n\tSQLITE_DENY   = C.SQLITE_DENY\n\n\t// different actions query tries to do - passed as argument to authorizer\n\tSQLITE_CREATE_INDEX        = C.SQLITE_CREATE_INDEX\n\tSQLITE_CREATE_TABLE        = C.SQLITE_CREATE_TABLE\n\tSQLITE_CREATE_TEMP_INDEX   = C.SQLITE_CREATE_TEMP_INDEX\n\tSQLITE_CREATE_TEMP_TABLE   = C.SQLITE_CREATE_TEMP_TABLE\n\tSQLITE_CREATE_TEMP_TRIGGER = C.SQLITE_CREATE_TEMP_TRIGGER\n\tSQLITE_CREATE_TEMP_VIEW    = C.SQLITE_CREATE_TEMP_VIEW\n\tSQLITE_CREATE_TRIGGER      = C.SQLITE_CREATE_TRIGGER\n\tSQLITE_CREATE_VIEW         = C.SQLITE_CREATE_VIEW\n\tSQLITE_CREATE_VTABLE       = C.SQLITE_CREATE_VTABLE\n\tSQLITE_DROP_INDEX          = C.SQLITE_DROP_INDEX\n\tSQLITE_DROP_TABLE          = C.SQLITE_DROP_TABLE\n\tSQLITE_DROP_TEMP_INDEX     = C.SQLITE_DROP_TEMP_INDEX\n\tSQLITE_DROP_TEMP_TABLE     = C.SQLITE_DROP_TEMP_TABLE\n\tSQLITE_DROP_TEMP_TRIGGER   = C.SQLITE_DROP_TEMP_TRIGGER\n\tSQLITE_DROP_TEMP_VIEW      = C.SQLITE_DROP_TEMP_VIEW\n\tSQLITE_DROP_TRIGGER        = C.SQLITE_DROP_TRIGGER\n\tSQLITE_DROP_VIEW           = C.SQLITE_DROP_VIEW\n\tSQLITE_DROP_VTABLE         = C.SQLITE_DROP_VTABLE\n\tSQLITE_PRAGMA              = C.SQLITE_PRAGMA\n\tSQLITE_READ                = C.SQLITE_READ\n\tSQLITE_SELECT              = C.SQLITE_SELECT\n\tSQLITE_TRANSACTION         = C.SQLITE_TRANSACTION\n\tSQLITE_ATTACH              = C.SQLITE_ATTACH\n\tSQLITE_DETACH              = C.SQLITE_DETACH\n\tSQLITE_ALTER_TABLE         = C.SQLITE_ALTER_TABLE\n\tSQLITE_REINDEX             = C.SQLITE_REINDEX\n\tSQLITE_ANALYZE             = C.SQLITE_ANALYZE\n\tSQLITE_FUNCTION            = C.SQLITE_FUNCTION\n\tSQLITE_SAVEPOINT           = C.SQLITE_SAVEPOINT\n\tSQLITE_COPY                = C.SQLITE_COPY\n\t/*SQLITE_RECURSIVE           = C.SQLITE_RECURSIVE*/\n)\n\n// Standard File Control Opcodes\n// See: https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html\nconst (\n\tSQLITE_FCNTL_LOCKSTATE             = int(1)\n\tSQLITE_FCNTL_GET_LOCKPROXYFILE     = int(2)\n\tSQLITE_FCNTL_SET_LOCKPROXYFILE     = int(3)\n\tSQLITE_FCNTL_LAST_ERRNO            = int(4)\n\tSQLITE_FCNTL_SIZE_HINT             = int(5)\n\tSQLITE_FCNTL_CHUNK_SIZE            = int(6)\n\tSQLITE_FCNTL_FILE_POINTER          = int(7)\n\tSQLITE_FCNTL_SYNC_OMITTED          = int(8)\n\tSQLITE_FCNTL_WIN32_AV_RETRY        = int(9)\n\tSQLITE_FCNTL_PERSIST_WAL           = int(10)\n\tSQLITE_FCNTL_OVERWRITE             = int(11)\n\tSQLITE_FCNTL_VFSNAME               = int(12)\n\tSQLITE_FCNTL_POWERSAFE_OVERWRITE   = int(13)\n\tSQLITE_FCNTL_PRAGMA                = int(14)\n\tSQLITE_FCNTL_BUSYHANDLER           = int(15)\n\tSQLITE_FCNTL_TEMPFILENAME          = int(16)\n\tSQLITE_FCNTL_MMAP_SIZE             = int(18)\n\tSQLITE_FCNTL_TRACE                 = int(19)\n\tSQLITE_FCNTL_HAS_MOVED             = int(20)\n\tSQLITE_FCNTL_SYNC                  = int(21)\n\tSQLITE_FCNTL_COMMIT_PHASETWO       = int(22)\n\tSQLITE_FCNTL_WIN32_SET_HANDLE      = int(23)\n\tSQLITE_FCNTL_WAL_BLOCK             = int(24)\n\tSQLITE_FCNTL_ZIPVFS                = int(25)\n\tSQLITE_FCNTL_RBU                   = int(26)\n\tSQLITE_FCNTL_VFS_POINTER           = int(27)\n\tSQLITE_FCNTL_JOURNAL_POINTER       = int(28)\n\tSQLITE_FCNTL_WIN32_GET_HANDLE      = int(29)\n\tSQLITE_FCNTL_PDB                   = int(30)\n\tSQLITE_FCNTL_BEGIN_ATOMIC_WRITE    = int(31)\n\tSQLITE_FCNTL_COMMIT_ATOMIC_WRITE   = int(32)\n\tSQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = int(33)\n\tSQLITE_FCNTL_LOCK_TIMEOUT          = int(34)\n\tSQLITE_FCNTL_DATA_VERSION          = int(35)\n\tSQLITE_FCNTL_SIZE_LIMIT            = int(36)\n\tSQLITE_FCNTL_CKPT_DONE             = int(37)\n\tSQLITE_FCNTL_RESERVE_BYTES         = int(38)\n\tSQLITE_FCNTL_CKPT_START            = int(39)\n\tSQLITE_FCNTL_EXTERNAL_READER       = int(40)\n\tSQLITE_FCNTL_CKSM_FILE             = int(41)\n)\n\n// SQLiteDriver implements driver.Driver.\ntype SQLiteDriver struct {\n\tExtensions  []string\n\tConnectHook func(*SQLiteConn) error\n}\n\n// SQLiteConn implements driver.Conn.\ntype SQLiteConn struct {\n\tmu          sync.Mutex\n\tdb          *C.sqlite3\n\tloc         *time.Location\n\ttxlock      string\n\tfuncs       []*functionInfo\n\taggregators []*aggInfo\n}\n\n// SQLiteTx implements driver.Tx.\ntype SQLiteTx struct {\n\tc *SQLiteConn\n}\n\n// SQLiteStmt implements driver.Stmt.\ntype SQLiteStmt struct {\n\tmu     sync.Mutex\n\tc      *SQLiteConn\n\ts      *C.sqlite3_stmt\n\tt      string\n\tclosed bool\n\tcls    bool // True if the statement was created by SQLiteConn.Query\n}\n\n// SQLiteResult implements sql.Result.\ntype SQLiteResult struct {\n\tid      int64\n\tchanges int64\n}\n\n// SQLiteRows implements driver.Rows.\ntype SQLiteRows struct {\n\ts        *SQLiteStmt\n\tnc       int32 // Number of columns\n\tcls      bool  // True if we need to close the parent statement in Close\n\tcols     []string\n\tdecltype []string\n\tctx      context.Context // no better alternative to pass context into Next() method\n\tclosemu  sync.Mutex\n}\n\ntype functionInfo struct {\n\tf                 reflect.Value\n\targConverters     []callbackArgConverter\n\tvariadicConverter callbackArgConverter\n\tretConverter      callbackRetConverter\n}\n\nfunc (fi *functionInfo) Call(ctx *C.sqlite3_context, argv []*C.sqlite3_value) {\n\targs, err := callbackConvertArgs(argv, fi.argConverters, fi.variadicConverter)\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n\n\tret := fi.f.Call(args)\n\n\tif len(ret) == 2 && ret[1].Interface() != nil {\n\t\tcallbackError(ctx, ret[1].Interface().(error))\n\t\treturn\n\t}\n\n\terr = fi.retConverter(ctx, ret[0])\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n}\n\ntype aggInfo struct {\n\tconstructor reflect.Value\n\n\t// Active aggregator objects for aggregations in flight. The\n\t// aggregators are indexed by a counter stored in the aggregation\n\t// user data space provided by sqlite.\n\tactive map[int64]reflect.Value\n\tnext   int64\n\n\tstepArgConverters     []callbackArgConverter\n\tstepVariadicConverter callbackArgConverter\n\n\tdoneRetConverter callbackRetConverter\n}\n\nfunc (ai *aggInfo) agg(ctx *C.sqlite3_context) (int64, reflect.Value, error) {\n\taggIdx := (*int64)(C.sqlite3_aggregate_context(ctx, C.int(8)))\n\tif *aggIdx == 0 {\n\t\t*aggIdx = ai.next\n\t\tret := ai.constructor.Call(nil)\n\t\tif len(ret) == 2 && ret[1].Interface() != nil {\n\t\t\treturn 0, reflect.Value{}, ret[1].Interface().(error)\n\t\t}\n\t\tif ret[0].IsNil() {\n\t\t\treturn 0, reflect.Value{}, errors.New(\"aggregator constructor returned nil state\")\n\t\t}\n\t\tai.next++\n\t\tai.active[*aggIdx] = ret[0]\n\t}\n\treturn *aggIdx, ai.active[*aggIdx], nil\n}\n\nfunc (ai *aggInfo) Step(ctx *C.sqlite3_context, argv []*C.sqlite3_value) {\n\t_, agg, err := ai.agg(ctx)\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n\n\targs, err := callbackConvertArgs(argv, ai.stepArgConverters, ai.stepVariadicConverter)\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n\n\tret := agg.MethodByName(\"Step\").Call(args)\n\tif len(ret) == 1 && ret[0].Interface() != nil {\n\t\tcallbackError(ctx, ret[0].Interface().(error))\n\t\treturn\n\t}\n}\n\nfunc (ai *aggInfo) Done(ctx *C.sqlite3_context) {\n\tidx, agg, err := ai.agg(ctx)\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n\tdefer func() { delete(ai.active, idx) }()\n\n\tret := agg.MethodByName(\"Done\").Call(nil)\n\tif len(ret) == 2 && ret[1].Interface() != nil {\n\t\tcallbackError(ctx, ret[1].Interface().(error))\n\t\treturn\n\t}\n\n\terr = ai.doneRetConverter(ctx, ret[0])\n\tif err != nil {\n\t\tcallbackError(ctx, err)\n\t\treturn\n\t}\n}\n\n// Commit transaction.\nfunc (tx *SQLiteTx) Commit() error {\n\t_, err := tx.c.exec(context.Background(), \"COMMIT\", nil)\n\tif err != nil {\n\t\t// sqlite3 may leave the transaction open in this scenario.\n\t\t// However, database/sql considers the transaction complete once we\n\t\t// return from Commit() - we must clean up to honour its semantics.\n\t\t// We don't know if the ROLLBACK is strictly necessary, but according\n\t\t// to sqlite's docs, there is no harm in calling ROLLBACK unnecessarily.\n\t\ttx.c.exec(context.Background(), \"ROLLBACK\", nil)\n\t}\n\treturn err\n}\n\n// Rollback transaction.\nfunc (tx *SQLiteTx) Rollback() error {\n\t_, err := tx.c.exec(context.Background(), \"ROLLBACK\", nil)\n\treturn err\n}\n\n// RegisterCollation makes a Go function available as a collation.\n//\n// cmp receives two UTF-8 strings, a and b. The result should be 0 if\n// a==b, -1 if a < b, and +1 if a > b.\n//\n// cmp must always return the same result given the same\n// inputs. Additionally, it must have the following properties for all\n// strings A, B and C: if A==B then B==A; if A==B and B==C then A==C;\n// if A<B then B>A; if A<B and B<C then A<C.\n//\n// If cmp does not obey these constraints, sqlite3's behavior is\n// undefined when the collation is used.\nfunc (c *SQLiteConn) RegisterCollation(name string, cmp func(string, string) int) error {\n\thandle := newHandle(c, cmp)\n\tcname := C.CString(name)\n\tdefer C.free(unsafe.Pointer(cname))\n\trv := C.sqlite3_create_collation(c.db, cname, C.SQLITE_UTF8, handle, (*[0]byte)(unsafe.Pointer(C.compareTrampoline)))\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\n// RegisterCommitHook sets the commit hook for a connection.\n//\n// If the callback returns non-zero the transaction will become a rollback.\n//\n// If there is an existing commit hook for this connection, it will be\n// removed. If callback is nil the existing hook (if any) will be removed\n// without creating a new one.\nfunc (c *SQLiteConn) RegisterCommitHook(callback func() int) {\n\tif callback == nil {\n\t\tC.sqlite3_commit_hook(c.db, nil, nil)\n\t} else {\n\t\tC.sqlite3_commit_hook(c.db, (*[0]byte)(C.commitHookTrampoline), newHandle(c, callback))\n\t}\n}\n\n// RegisterRollbackHook sets the rollback hook for a connection.\n//\n// If there is an existing rollback hook for this connection, it will be\n// removed. If callback is nil the existing hook (if any) will be removed\n// without creating a new one.\nfunc (c *SQLiteConn) RegisterRollbackHook(callback func()) {\n\tif callback == nil {\n\t\tC.sqlite3_rollback_hook(c.db, nil, nil)\n\t} else {\n\t\tC.sqlite3_rollback_hook(c.db, (*[0]byte)(C.rollbackHookTrampoline), newHandle(c, callback))\n\t}\n}\n\n// RegisterUpdateHook sets the update hook for a connection.\n//\n// The parameters to the callback are the operation (one of the constants\n// SQLITE_INSERT, SQLITE_DELETE, or SQLITE_UPDATE), the database name, the\n// table name, and the rowid.\n//\n// If there is an existing update hook for this connection, it will be\n// removed. If callback is nil the existing hook (if any) will be removed\n// without creating a new one.\nfunc (c *SQLiteConn) RegisterUpdateHook(callback func(int, string, string, int64)) {\n\tif callback == nil {\n\t\tC.sqlite3_update_hook(c.db, nil, nil)\n\t} else {\n\t\tC.sqlite3_update_hook(c.db, (*[0]byte)(C.updateHookTrampoline), newHandle(c, callback))\n\t}\n}\n\n// RegisterAuthorizer sets the authorizer for connection.\n//\n// The parameters to the callback are the operation (one of the constants\n// SQLITE_INSERT, SQLITE_DELETE, or SQLITE_UPDATE), and 1 to 3 arguments,\n// depending on operation. More details see:\n// https://www.sqlite.org/c3ref/c_alter_table.html\nfunc (c *SQLiteConn) RegisterAuthorizer(callback func(int, string, string, string) int) {\n\tif callback == nil {\n\t\tC.sqlite3_set_authorizer(c.db, nil, nil)\n\t} else {\n\t\tC.sqlite3_set_authorizer(c.db, (*[0]byte)(C.authorizerTrampoline), newHandle(c, callback))\n\t}\n}\n\n// RegisterFunc makes a Go function available as a SQLite function.\n//\n// The Go function can have arguments of the following types: any\n// numeric type except complex, bool, []byte, string and any.\n// any arguments are given the direct translation of the SQLite data type:\n// int64 for INTEGER, float64 for FLOAT, []byte for BLOB, string for TEXT.\n//\n// The function can additionally be variadic, as long as the type of\n// the variadic argument is one of the above.\n//\n// If pure is true. SQLite will assume that the function's return\n// value depends only on its inputs, and make more aggressive\n// optimizations in its queries.\n//\n// See _example/go_custom_funcs for a detailed example.\nfunc (c *SQLiteConn) RegisterFunc(name string, impl any, pure bool) error {\n\tvar fi functionInfo\n\tfi.f = reflect.ValueOf(impl)\n\tt := fi.f.Type()\n\tif t.Kind() != reflect.Func {\n\t\treturn errors.New(\"Non-function passed to RegisterFunc\")\n\t}\n\tif t.NumOut() != 1 && t.NumOut() != 2 {\n\t\treturn errors.New(\"SQLite functions must return 1 or 2 values\")\n\t}\n\tif t.NumOut() == 2 && !t.Out(1).Implements(reflect.TypeOf((*error)(nil)).Elem()) {\n\t\treturn errors.New(\"Second return value of SQLite function must be error\")\n\t}\n\n\tnumArgs := t.NumIn()\n\tif t.IsVariadic() {\n\t\tnumArgs--\n\t}\n\n\tfor i := 0; i < numArgs; i++ {\n\t\tconv, err := callbackArg(t.In(i))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfi.argConverters = append(fi.argConverters, conv)\n\t}\n\n\tif t.IsVariadic() {\n\t\tconv, err := callbackArg(t.In(numArgs).Elem())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfi.variadicConverter = conv\n\t\t// Pass -1 to sqlite so that it allows any number of\n\t\t// arguments. The call helper verifies that the minimum number\n\t\t// of arguments is present for variadic functions.\n\t\tnumArgs = -1\n\t}\n\n\tconv, err := callbackRet(t.Out(0))\n\tif err != nil {\n\t\treturn err\n\t}\n\tfi.retConverter = conv\n\n\t// fi must outlast the database connection, or we'll have dangling pointers.\n\tc.funcs = append(c.funcs, &fi)\n\n\tcname := C.CString(name)\n\tdefer C.free(unsafe.Pointer(cname))\n\topts := C.SQLITE_UTF8\n\tif pure {\n\t\topts |= C.SQLITE_DETERMINISTIC\n\t}\n\trv := sqlite3CreateFunction(c.db, cname, C.int(numArgs), C.int(opts), newHandle(c, &fi), C.callbackTrampoline, nil, nil)\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\nfunc sqlite3CreateFunction(db *C.sqlite3, zFunctionName *C.char, nArg C.int, eTextRep C.int, pApp unsafe.Pointer, xFunc unsafe.Pointer, xStep unsafe.Pointer, xFinal unsafe.Pointer) C.int {\n\treturn C._sqlite3_create_function(db, zFunctionName, nArg, eTextRep, C.uintptr_t(uintptr(pApp)), (*[0]byte)(xFunc), (*[0]byte)(xStep), (*[0]byte)(xFinal))\n}\n\n// RegisterAggregator makes a Go type available as a SQLite aggregation function.\n//\n// Because aggregation is incremental, it's implemented in Go with a\n// type that has 2 methods: func Step(values) accumulates one row of\n// data into the accumulator, and func Done() ret finalizes and\n// returns the aggregate value. \"values\" and \"ret\" may be any type\n// supported by RegisterFunc.\n//\n// RegisterAggregator takes as implementation a constructor function\n// that constructs an instance of the aggregator type each time an\n// aggregation begins. The constructor must return a pointer to a\n// type, or an interface that implements Step() and Done().\n//\n// The constructor function and the Step/Done methods may optionally\n// return an error in addition to their other return values.\n//\n// See _example/go_custom_funcs for a detailed example.\nfunc (c *SQLiteConn) RegisterAggregator(name string, impl any, pure bool) error {\n\tvar ai aggInfo\n\tai.constructor = reflect.ValueOf(impl)\n\tt := ai.constructor.Type()\n\tif t.Kind() != reflect.Func {\n\t\treturn errors.New(\"non-function passed to RegisterAggregator\")\n\t}\n\tif t.NumOut() != 1 && t.NumOut() != 2 {\n\t\treturn errors.New(\"SQLite aggregator constructors must return 1 or 2 values\")\n\t}\n\tif t.NumOut() == 2 && !t.Out(1).Implements(reflect.TypeOf((*error)(nil)).Elem()) {\n\t\treturn errors.New(\"Second return value of SQLite function must be error\")\n\t}\n\tif t.NumIn() != 0 {\n\t\treturn errors.New(\"SQLite aggregator constructors must not have arguments\")\n\t}\n\n\tagg := t.Out(0)\n\tswitch agg.Kind() {\n\tcase reflect.Ptr, reflect.Interface:\n\tdefault:\n\t\treturn errors.New(\"SQlite aggregator constructor must return a pointer object\")\n\t}\n\tstepFn, found := agg.MethodByName(\"Step\")\n\tif !found {\n\t\treturn errors.New(\"SQlite aggregator doesn't have a Step() function\")\n\t}\n\tstep := stepFn.Type\n\tif step.NumOut() != 0 && step.NumOut() != 1 {\n\t\treturn errors.New(\"SQlite aggregator Step() function must return 0 or 1 values\")\n\t}\n\tif step.NumOut() == 1 && !step.Out(0).Implements(reflect.TypeOf((*error)(nil)).Elem()) {\n\t\treturn errors.New(\"type of SQlite aggregator Step() return value must be error\")\n\t}\n\n\tstepNArgs := step.NumIn()\n\tstart := 0\n\tif agg.Kind() == reflect.Ptr {\n\t\t// Skip over the method receiver\n\t\tstepNArgs--\n\t\tstart++\n\t}\n\tif step.IsVariadic() {\n\t\tstepNArgs--\n\t}\n\tfor i := start; i < start+stepNArgs; i++ {\n\t\tconv, err := callbackArg(step.In(i))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tai.stepArgConverters = append(ai.stepArgConverters, conv)\n\t}\n\tif step.IsVariadic() {\n\t\tconv, err := callbackArg(step.In(start + stepNArgs).Elem())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tai.stepVariadicConverter = conv\n\t\t// Pass -1 to sqlite so that it allows any number of\n\t\t// arguments. The call helper verifies that the minimum number\n\t\t// of arguments is present for variadic functions.\n\t\tstepNArgs = -1\n\t}\n\n\tdoneFn, found := agg.MethodByName(\"Done\")\n\tif !found {\n\t\treturn errors.New(\"SQlite aggregator doesn't have a Done() function\")\n\t}\n\tdone := doneFn.Type\n\tdoneNArgs := done.NumIn()\n\tif agg.Kind() == reflect.Ptr {\n\t\t// Skip over the method receiver\n\t\tdoneNArgs--\n\t}\n\tif doneNArgs != 0 {\n\t\treturn errors.New(\"SQlite aggregator Done() function must have no arguments\")\n\t}\n\tif done.NumOut() != 1 && done.NumOut() != 2 {\n\t\treturn errors.New(\"SQLite aggregator Done() function must return 1 or 2 values\")\n\t}\n\tif done.NumOut() == 2 && !done.Out(1).Implements(reflect.TypeOf((*error)(nil)).Elem()) {\n\t\treturn errors.New(\"second return value of SQLite aggregator Done() function must be error\")\n\t}\n\n\tconv, err := callbackRet(done.Out(0))\n\tif err != nil {\n\t\treturn err\n\t}\n\tai.doneRetConverter = conv\n\tai.active = make(map[int64]reflect.Value)\n\tai.next = 1\n\n\t// ai must outlast the database connection, or we'll have dangling pointers.\n\tc.aggregators = append(c.aggregators, &ai)\n\n\tcname := C.CString(name)\n\tdefer C.free(unsafe.Pointer(cname))\n\topts := C.SQLITE_UTF8\n\tif pure {\n\t\topts |= C.SQLITE_DETERMINISTIC\n\t}\n\trv := sqlite3CreateFunction(c.db, cname, C.int(stepNArgs), C.int(opts), newHandle(c, &ai), nil, C.stepTrampoline, C.doneTrampoline)\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\n// AutoCommit return which currently auto commit or not.\nfunc (c *SQLiteConn) AutoCommit() bool {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\treturn int(C.sqlite3_get_autocommit(c.db)) != 0\n}\n\nfunc (c *SQLiteConn) lastError() error {\n\treturn lastError(c.db)\n}\n\n// Note: may be called with db == nil\nfunc lastError(db *C.sqlite3) error {\n\trv := C.sqlite3_errcode(db) // returns SQLITE_NOMEM if db == nil\n\tif rv == C.SQLITE_OK {\n\t\treturn nil\n\t}\n\textrv := C.sqlite3_extended_errcode(db)    // returns SQLITE_NOMEM if db == nil\n\terrStr := C.GoString(C.sqlite3_errmsg(db)) // returns \"out of memory\" if db == nil\n\n\t// https://www.sqlite.org/c3ref/system_errno.html\n\t// sqlite3_system_errno is only meaningful if the error code was SQLITE_CANTOPEN,\n\t// or it was SQLITE_IOERR and the extended code was not SQLITE_IOERR_NOMEM\n\tvar systemErrno syscall.Errno\n\tif rv == C.SQLITE_CANTOPEN || (rv == C.SQLITE_IOERR && extrv != C.SQLITE_IOERR_NOMEM) {\n\t\tsystemErrno = syscall.Errno(C.sqlite3_system_errno(db))\n\t}\n\n\treturn Error{\n\t\tCode:         ErrNo(rv),\n\t\tExtendedCode: ErrNoExtended(extrv),\n\t\tSystemErrno:  systemErrno,\n\t\terr:          errStr,\n\t}\n}\n\n// Exec implements Execer.\nfunc (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, error) {\n\tlist := make([]driver.NamedValue, len(args))\n\tfor i, v := range args {\n\t\tlist[i] = driver.NamedValue{\n\t\t\tOrdinal: i + 1,\n\t\t\tValue:   v,\n\t\t}\n\t}\n\treturn c.exec(context.Background(), query, list)\n}\n\nfunc (c *SQLiteConn) exec(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {\n\tstart := 0\n\tfor {\n\t\ts, err := c.prepare(ctx, query)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar res driver.Result\n\t\tif s.(*SQLiteStmt).s != nil {\n\t\t\tstmtArgs := make([]driver.NamedValue, 0, len(args))\n\t\t\tna := s.NumInput()\n\t\t\tif len(args)-start < na {\n\t\t\t\ts.Close()\n\t\t\t\treturn nil, fmt.Errorf(\"not enough args to execute query: want %d got %d\", na, len(args))\n\t\t\t}\n\t\t\t// consume the number of arguments used in the current\n\t\t\t// statement and append all named arguments not\n\t\t\t// contained therein\n\t\t\tif len(args[start:start+na]) > 0 {\n\t\t\t\tstmtArgs = append(stmtArgs, args[start:start+na]...)\n\t\t\t\tfor i := range args {\n\t\t\t\t\tif (i < start || i >= na) && args[i].Name != \"\" {\n\t\t\t\t\t\tstmtArgs = append(stmtArgs, args[i])\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor i := range stmtArgs {\n\t\t\t\t\tstmtArgs[i].Ordinal = i + 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tres, err = s.(*SQLiteStmt).exec(ctx, stmtArgs)\n\t\t\tif err != nil && err != driver.ErrSkip {\n\t\t\t\ts.Close()\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tstart += na\n\t\t}\n\t\ttail := s.(*SQLiteStmt).t\n\t\ts.Close()\n\t\tif tail == \"\" {\n\t\t\tif res == nil {\n\t\t\t\t// https://github.com/mattn/go-sqlite3/issues/963\n\t\t\t\tres = &SQLiteResult{0, 0}\n\t\t\t}\n\t\t\treturn res, nil\n\t\t}\n\t\tquery = tail\n\t}\n}\n\n// Query implements Queryer.\nfunc (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, error) {\n\tlist := make([]driver.NamedValue, len(args))\n\tfor i, v := range args {\n\t\tlist[i] = driver.NamedValue{\n\t\t\tOrdinal: i + 1,\n\t\t\tValue:   v,\n\t\t}\n\t}\n\treturn c.query(context.Background(), query, list)\n}\n\nfunc (c *SQLiteConn) query(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {\n\tstart := 0\n\tfor {\n\t\tstmtArgs := make([]driver.NamedValue, 0, len(args))\n\t\ts, err := c.prepare(ctx, query)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ts.(*SQLiteStmt).cls = true\n\t\tna := s.NumInput()\n\t\tif len(args)-start < na {\n\t\t\ts.Close()\n\t\t\treturn nil, fmt.Errorf(\"not enough args to execute query: want %d got %d\", na, len(args)-start)\n\t\t}\n\t\t// consume the number of arguments used in the current\n\t\t// statement and append all named arguments not contained\n\t\t// therein\n\t\tstmtArgs = append(stmtArgs, args[start:start+na]...)\n\t\tfor i := range args {\n\t\t\tif (i < start || i >= na) && args[i].Name != \"\" {\n\t\t\t\tstmtArgs = append(stmtArgs, args[i])\n\t\t\t}\n\t\t}\n\t\tfor i := range stmtArgs {\n\t\t\tstmtArgs[i].Ordinal = i + 1\n\t\t}\n\t\trows, err := s.(*SQLiteStmt).query(ctx, stmtArgs)\n\t\tif err != nil && err != driver.ErrSkip {\n\t\t\ts.Close()\n\t\t\treturn rows, err\n\t\t}\n\t\tstart += na\n\t\ttail := s.(*SQLiteStmt).t\n\t\tif tail == \"\" {\n\t\t\treturn rows, nil\n\t\t}\n\t\trows.Close()\n\t\ts.Close()\n\t\tquery = tail\n\t}\n}\n\n// Begin transaction.\nfunc (c *SQLiteConn) Begin() (driver.Tx, error) {\n\treturn c.begin(context.Background())\n}\n\nfunc (c *SQLiteConn) begin(ctx context.Context) (driver.Tx, error) {\n\tif _, err := c.exec(ctx, c.txlock, nil); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &SQLiteTx{c}, nil\n}\n\n// Open database and return a new connection.\n//\n// A pragma can take either zero or one argument.\n// The argument is may be either in parentheses or it may be separated from\n// the pragma name by an equal sign. The two syntaxes yield identical results.\n// In many pragmas, the argument is a boolean. The boolean can be one of:\n//\n//\t1 yes true on\n//\t0 no false off\n//\n// You can specify a DSN string using a URI as the filename.\n//\n//\ttest.db\n//\tfile:test.db?cache=shared&mode=memory\n//\t:memory:\n//\tfile::memory:\n//\n//\tmode\n//\t  Access mode of the database.\n//\t  https://www.sqlite.org/c3ref/open.html\n//\t  Values:\n//\t   - ro\n//\t   - rw\n//\t   - rwc\n//\t   - memory\n//\n//\tcache\n//\t  SQLite Shared-Cache Mode\n//\t  https://www.sqlite.org/sharedcache.html\n//\t  Values:\n//\t    - shared\n//\t    - private\n//\n//\timmutable=Boolean\n//\t  The immutable parameter is a boolean query parameter that indicates\n//\t  that the database file is stored on read-only media. When immutable is set,\n//\t  SQLite assumes that the database file cannot be changed,\n//\t  even by a process with higher privilege,\n//\t  and so the database is opened read-only and all locking and change detection is disabled.\n//\t  Caution: Setting the immutable property on a database file that\n//\t  does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors.\n//\n// go-sqlite3 adds the following query parameters to those used by SQLite:\n//\n//\t_loc=XXX\n//\t  Specify location of time format. It's possible to specify \"auto\".\n//\n//\t_mutex=XXX\n//\t  Specify mutex mode. XXX can be \"no\", \"full\".\n//\n//\t_txlock=XXX\n//\t  Specify locking behavior for transactions.  XXX can be \"immediate\",\n//\t  \"deferred\", \"exclusive\".\n//\n//\t_auto_vacuum=X | _vacuum=X\n//\t  0 | none - Auto Vacuum disabled\n//\t  1 | full - Auto Vacuum FULL\n//\t  2 | incremental - Auto Vacuum Incremental\n//\n//\t_busy_timeout=XXX\"| _timeout=XXX\n//\t  Specify value for sqlite3_busy_timeout.\n//\n//\t_case_sensitive_like=Boolean | _cslike=Boolean\n//\t  https://www.sqlite.org/pragma.html#pragma_case_sensitive_like\n//\t  Default or disabled the LIKE operation is case-insensitive.\n//\t  When enabling this options behaviour of LIKE will become case-sensitive.\n//\n//\t_defer_foreign_keys=Boolean | _defer_fk=Boolean\n//\t  Defer Foreign Keys until outermost transaction is committed.\n//\n//\t_foreign_keys=Boolean | _fk=Boolean\n//\t  Enable or disable enforcement of foreign keys.\n//\n//\t_ignore_check_constraints=Boolean\n//\t  This pragma enables or disables the enforcement of CHECK constraints.\n//\t  The default setting is off, meaning that CHECK constraints are enforced by default.\n//\n//\t_journal_mode=MODE | _journal=MODE\n//\t  Set journal mode for the databases associated with the current connection.\n//\t  https://www.sqlite.org/pragma.html#pragma_journal_mode\n//\n//\t_locking_mode=X | _locking=X\n//\t  Sets the database connection locking-mode.\n//\t  The locking-mode is either NORMAL or EXCLUSIVE.\n//\t  https://www.sqlite.org/pragma.html#pragma_locking_mode\n//\n//\t_query_only=Boolean\n//\t  The query_only pragma prevents all changes to database files when enabled.\n//\n//\t_recursive_triggers=Boolean | _rt=Boolean\n//\t  Enable or disable recursive triggers.\n//\n//\t_secure_delete=Boolean|FAST\n//\t  When secure_delete is on, SQLite overwrites deleted content with zeros.\n//\t  https://www.sqlite.org/pragma.html#pragma_secure_delete\n//\n//\t_synchronous=X | _sync=X\n//\t  Change the setting of the \"synchronous\" flag.\n//\t  https://www.sqlite.org/pragma.html#pragma_synchronous\n//\n//\t_writable_schema=Boolean\n//\t  When this pragma is on, the SQLITE_MASTER tables in which database\n//\t  can be changed using ordinary UPDATE, INSERT, and DELETE statements.\n//\t  Warning: misuse of this pragma can easily result in a corrupt database file.\nfunc (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {\n\tif C.sqlite3_threadsafe() == 0 {\n\t\treturn nil, errors.New(\"sqlite library was not compiled for thread-safe operation\")\n\t}\n\n\tvar pkey string\n\n\t// Options\n\tvar loc *time.Location\n\tauthCreate := false\n\tauthUser := \"\"\n\tauthPass := \"\"\n\tauthCrypt := \"\"\n\tauthSalt := \"\"\n\tmutex := C.int(C.SQLITE_OPEN_FULLMUTEX)\n\ttxlock := \"BEGIN\"\n\n\t// PRAGMA's\n\tautoVacuum := -1\n\tbusyTimeout := 5000\n\tcaseSensitiveLike := -1\n\tdeferForeignKeys := -1\n\tforeignKeys := -1\n\tignoreCheckConstraints := -1\n\tvar journalMode string\n\tlockingMode := \"NORMAL\"\n\tqueryOnly := -1\n\trecursiveTriggers := -1\n\tsecureDelete := \"DEFAULT\"\n\tsynchronousMode := \"NORMAL\"\n\twritableSchema := -1\n\tvfsName := \"\"\n\tvar cacheSize *int64\n\n\tpos := strings.IndexRune(dsn, '?')\n\tif pos >= 1 {\n\t\tparams, err := url.ParseQuery(dsn[pos+1:])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Authentication\n\t\tif _, ok := params[\"_auth\"]; ok {\n\t\t\tauthCreate = true\n\t\t}\n\t\tif val := params.Get(\"_auth_user\"); val != \"\" {\n\t\t\tauthUser = val\n\t\t}\n\t\tif val := params.Get(\"_auth_pass\"); val != \"\" {\n\t\t\tauthPass = val\n\t\t}\n\t\tif val := params.Get(\"_auth_crypt\"); val != \"\" {\n\t\t\tauthCrypt = val\n\t\t}\n\t\tif val := params.Get(\"_auth_salt\"); val != \"\" {\n\t\t\tauthSalt = val\n\t\t}\n\n\t\t// _loc\n\t\tif val := params.Get(\"_loc\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"auto\":\n\t\t\t\tloc = time.Local\n\t\t\tdefault:\n\t\t\t\tloc, err = time.LoadLocation(val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"Invalid _loc: %v: %v\", val, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// _mutex\n\t\tif val := params.Get(\"_mutex\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"no\":\n\t\t\t\tmutex = C.SQLITE_OPEN_NOMUTEX\n\t\t\tcase \"full\":\n\t\t\t\tmutex = C.SQLITE_OPEN_FULLMUTEX\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _mutex: %v\", val)\n\t\t\t}\n\t\t}\n\n\t\t// _txlock\n\t\tif val := params.Get(\"_txlock\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"immediate\":\n\t\t\t\ttxlock = \"BEGIN IMMEDIATE\"\n\t\t\tcase \"exclusive\":\n\t\t\t\ttxlock = \"BEGIN EXCLUSIVE\"\n\t\t\tcase \"deferred\":\n\t\t\t\ttxlock = \"BEGIN\"\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _txlock: %v\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Auto Vacuum (_vacuum)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_auto_vacuum\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_auto_vacuum\"]; ok {\n\t\t\tpkey = \"_auto_vacuum\"\n\t\t}\n\t\tif _, ok := params[\"_vacuum\"]; ok {\n\t\t\tpkey = \"_vacuum\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"none\":\n\t\t\t\tautoVacuum = 0\n\t\t\tcase \"1\", \"full\":\n\t\t\t\tautoVacuum = 1\n\t\t\tcase \"2\", \"incremental\":\n\t\t\t\tautoVacuum = 2\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _auto_vacuum: %v, expecting value of '0 NONE 1 FULL 2 INCREMENTAL'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Busy Timeout (_busy_timeout)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_busy_timeout\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_busy_timeout\"]; ok {\n\t\t\tpkey = \"_busy_timeout\"\n\t\t}\n\t\tif _, ok := params[\"_timeout\"]; ok {\n\t\t\tpkey = \"_timeout\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tiv, err := strconv.ParseInt(val, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _busy_timeout: %v: %v\", val, err)\n\t\t\t}\n\t\t\tbusyTimeout = int(iv)\n\t\t}\n\n\t\t// Case Sensitive Like (_cslike)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_case_sensitive_like\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_case_sensitive_like\"]; ok {\n\t\t\tpkey = \"_case_sensitive_like\"\n\t\t}\n\t\tif _, ok := params[\"_cslike\"]; ok {\n\t\t\tpkey = \"_cslike\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tcaseSensitiveLike = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tcaseSensitiveLike = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _case_sensitive_like: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Defer Foreign Keys (_defer_foreign_keys | _defer_fk)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_defer_foreign_keys\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_defer_foreign_keys\"]; ok {\n\t\t\tpkey = \"_defer_foreign_keys\"\n\t\t}\n\t\tif _, ok := params[\"_defer_fk\"]; ok {\n\t\t\tpkey = \"_defer_fk\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tdeferForeignKeys = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tdeferForeignKeys = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _defer_foreign_keys: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Foreign Keys (_foreign_keys | _fk)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_foreign_keys\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_foreign_keys\"]; ok {\n\t\t\tpkey = \"_foreign_keys\"\n\t\t}\n\t\tif _, ok := params[\"_fk\"]; ok {\n\t\t\tpkey = \"_fk\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tforeignKeys = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tforeignKeys = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _foreign_keys: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Ignore CHECK Constrains (_ignore_check_constraints)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_ignore_check_constraints\n\t\t//\n\t\tif val := params.Get(\"_ignore_check_constraints\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tignoreCheckConstraints = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tignoreCheckConstraints = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _ignore_check_constraints: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Journal Mode (_journal_mode | _journal)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_journal_mode\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_journal_mode\"]; ok {\n\t\t\tpkey = \"_journal_mode\"\n\t\t}\n\t\tif _, ok := params[\"_journal\"]; ok {\n\t\t\tpkey = \"_journal\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToUpper(val) {\n\t\t\tcase \"DELETE\", \"TRUNCATE\", \"PERSIST\", \"MEMORY\", \"OFF\":\n\t\t\t\tjournalMode = strings.ToUpper(val)\n\t\t\tcase \"WAL\":\n\t\t\t\tjournalMode = strings.ToUpper(val)\n\n\t\t\t\t// For WAL Mode set Synchronous Mode to 'NORMAL'\n\t\t\t\t// See https://www.sqlite.org/pragma.html#pragma_synchronous\n\t\t\t\tsynchronousMode = \"NORMAL\"\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _journal: %v, expecting value of 'DELETE TRUNCATE PERSIST MEMORY WAL OFF'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Locking Mode (_locking)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_locking_mode\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_locking_mode\"]; ok {\n\t\t\tpkey = \"_locking_mode\"\n\t\t}\n\t\tif _, ok := params[\"_locking\"]; ok {\n\t\t\tpkey = \"_locking\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToUpper(val) {\n\t\t\tcase \"NORMAL\", \"EXCLUSIVE\":\n\t\t\t\tlockingMode = strings.ToUpper(val)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _locking_mode: %v, expecting value of 'NORMAL EXCLUSIVE\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Query Only (_query_only)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_query_only\n\t\t//\n\t\tif val := params.Get(\"_query_only\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tqueryOnly = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tqueryOnly = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _query_only: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Recursive Triggers (_recursive_triggers)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_recursive_triggers\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_recursive_triggers\"]; ok {\n\t\t\tpkey = \"_recursive_triggers\"\n\t\t}\n\t\tif _, ok := params[\"_rt\"]; ok {\n\t\t\tpkey = \"_rt\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\trecursiveTriggers = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\trecursiveTriggers = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _recursive_triggers: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Secure Delete (_secure_delete)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_secure_delete\n\t\t//\n\t\tif val := params.Get(\"_secure_delete\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\tsecureDelete = \"OFF\"\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\tsecureDelete = \"ON\"\n\t\t\tcase \"fast\":\n\t\t\t\tsecureDelete = \"FAST\"\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _secure_delete: %v, expecting boolean value of '0 1 false true no yes off on fast'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Synchronous Mode (_synchronous | _sync)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_synchronous\n\t\t//\n\t\tpkey = \"\" // Reset pkey\n\t\tif _, ok := params[\"_synchronous\"]; ok {\n\t\t\tpkey = \"_synchronous\"\n\t\t}\n\t\tif _, ok := params[\"_sync\"]; ok {\n\t\t\tpkey = \"_sync\"\n\t\t}\n\t\tif val := params.Get(pkey); val != \"\" {\n\t\t\tswitch strings.ToUpper(val) {\n\t\t\tcase \"0\", \"OFF\", \"1\", \"NORMAL\", \"2\", \"FULL\", \"3\", \"EXTRA\":\n\t\t\t\tsynchronousMode = strings.ToUpper(val)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _synchronous: %v, expecting value of '0 OFF 1 NORMAL 2 FULL 3 EXTRA'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Writable Schema (_writeable_schema)\n\t\t//\n\t\t// https://www.sqlite.org/pragma.html#pragma_writeable_schema\n\t\t//\n\t\tif val := params.Get(\"_writable_schema\"); val != \"\" {\n\t\t\tswitch strings.ToLower(val) {\n\t\t\tcase \"0\", \"no\", \"false\", \"off\":\n\t\t\t\twritableSchema = 0\n\t\t\tcase \"1\", \"yes\", \"true\", \"on\":\n\t\t\t\twritableSchema = 1\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _writable_schema: %v, expecting boolean value of '0 1 false true no yes off on'\", val)\n\t\t\t}\n\t\t}\n\n\t\t// Cache size (_cache_size)\n\t\t//\n\t\t// https://sqlite.org/pragma.html#pragma_cache_size\n\t\t//\n\t\tif val := params.Get(\"_cache_size\"); val != \"\" {\n\t\t\tiv, err := strconv.ParseInt(val, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid _cache_size: %v: %v\", val, err)\n\t\t\t}\n\t\t\tcacheSize = &iv\n\t\t}\n\n\t\tif val := params.Get(\"vfs\"); val != \"\" {\n\t\t\tvfsName = val\n\t\t}\n\n\t\tif !strings.HasPrefix(dsn, \"file:\") {\n\t\t\tdsn = dsn[:pos]\n\t\t}\n\t}\n\n\tvar db *C.sqlite3\n\tname := C.CString(dsn)\n\tdefer C.free(unsafe.Pointer(name))\n\tvar vfs *C.char\n\tif vfsName != \"\" {\n\t\tvfs = C.CString(vfsName)\n\t\tdefer C.free(unsafe.Pointer(vfs))\n\t}\n\trv := C._sqlite3_open_v2(name, &db,\n\t\tmutex|C.SQLITE_OPEN_READWRITE|C.SQLITE_OPEN_CREATE,\n\t\tvfs)\n\tif rv != 0 {\n\t\t// Save off the error _before_ closing the database.\n\t\t// This is safe even if db is nil.\n\t\terr := lastError(db)\n\t\tif db != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t}\n\t\treturn nil, err\n\t}\n\tif db == nil {\n\t\treturn nil, errors.New(\"sqlite succeeded without returning a database\")\n\t}\n\n\texec := func(s string) error {\n\t\tcs := C.CString(s)\n\t\trv := C.sqlite3_exec(db, cs, nil, nil, nil)\n\t\tC.free(unsafe.Pointer(cs))\n\t\tif rv != C.SQLITE_OK {\n\t\t\treturn lastError(db)\n\t\t}\n\t\treturn nil\n\t}\n\n\t// Busy timeout\n\tif err := exec(fmt.Sprintf(\"PRAGMA busy_timeout = %d;\", busyTimeout)); err != nil {\n\t\tC.sqlite3_close_v2(db)\n\t\treturn nil, err\n\t}\n\n\t// USER AUTHENTICATION\n\t//\n\t// User Authentication is always performed even when\n\t// sqlite_userauth is not compiled in, because without user authentication\n\t// the authentication is a no-op.\n\t//\n\t// Workflow\n\t//\t- Authenticate\n\t//\t\tON::SUCCESS\t\t=> Continue\n\t//\t\tON::SQLITE_AUTH => Return error and exit Open(...)\n\t//\n\t//  - Activate User Authentication\n\t//\t\tCheck if the user wants to activate User Authentication.\n\t//\t\tIf so then first create a temporary AuthConn to the database\n\t//\t\tThis is possible because we are already successfully authenticated.\n\t//\n\t//\t- Check if `sqlite_user`` table exists\n\t//\t\tYES\t\t\t\t=> Add the provided user from DSN as Admin User and\n\t//\t\t\t\t\t\t   activate user authentication.\n\t//\t\tNO\t\t\t\t=> Continue\n\t//\n\n\t// Create connection to SQLite\n\tconn := &SQLiteConn{db: db, loc: loc, txlock: txlock}\n\n\t// Password Cipher has to be registered before authentication\n\tif len(authCrypt) > 0 {\n\t\tswitch strings.ToUpper(authCrypt) {\n\t\tcase \"SHA1\":\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSHA1, true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSHA1: %s\", err)\n\t\t\t}\n\t\tcase \"SSHA1\":\n\t\t\tif len(authSalt) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"_auth_crypt=ssha1, requires _auth_salt\")\n\t\t\t}\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSSHA1(authSalt), true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSSHA1: %s\", err)\n\t\t\t}\n\t\tcase \"SHA256\":\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSHA256, true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSHA256: %s\", err)\n\t\t\t}\n\t\tcase \"SSHA256\":\n\t\t\tif len(authSalt) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"_auth_crypt=ssha256, requires _auth_salt\")\n\t\t\t}\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSSHA256(authSalt), true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSSHA256: %s\", err)\n\t\t\t}\n\t\tcase \"SHA384\":\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSHA384, true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSHA384: %s\", err)\n\t\t\t}\n\t\tcase \"SSHA384\":\n\t\t\tif len(authSalt) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"_auth_crypt=ssha384, requires _auth_salt\")\n\t\t\t}\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSSHA384(authSalt), true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSSHA384: %s\", err)\n\t\t\t}\n\t\tcase \"SHA512\":\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSHA512, true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSHA512: %s\", err)\n\t\t\t}\n\t\tcase \"SSHA512\":\n\t\t\tif len(authSalt) == 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"_auth_crypt=ssha512, requires _auth_salt\")\n\t\t\t}\n\t\t\tif err := conn.RegisterFunc(\"sqlite_crypt\", CryptEncoderSSHA512(authSalt), true); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"CryptEncoderSSHA512: %s\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Preform Authentication\n\tif err := conn.Authenticate(authUser, authPass); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Register: authenticate\n\t// Authenticate will perform an authentication of the provided username\n\t// and password against the database.\n\t//\n\t// If a database contains the SQLITE_USER table, then the\n\t// call to Authenticate must be invoked with an\n\t// appropriate username and password prior to enable read and write\n\t//access to the database.\n\t//\n\t// Return SQLITE_OK on success or SQLITE_ERROR if the username/password\n\t// combination is incorrect or unknown.\n\t//\n\t// If the SQLITE_USER table is not present in the database file, then\n\t// this interface is a harmless no-op returnning SQLITE_OK.\n\tif err := conn.RegisterFunc(\"authenticate\", conn.authenticate, true); err != nil {\n\t\treturn nil, err\n\t}\n\t//\n\t// Register: auth_user_add\n\t// auth_user_add can be used (by an admin user only)\n\t// to create a new user. When called on a no-authentication-required\n\t// database, this routine converts the database into an authentication-\n\t// required database, automatically makes the added user an\n\t// administrator, and logs in the current connection as that user.\n\t// The AuthUserAdd only works for the \"main\" database, not\n\t// for any ATTACH-ed databases. Any call to AuthUserAdd by a\n\t// non-admin user results in an error.\n\tif err := conn.RegisterFunc(\"auth_user_add\", conn.authUserAdd, true); err != nil {\n\t\treturn nil, err\n\t}\n\t//\n\t// Register: auth_user_change\n\t// auth_user_change can be used to change a users\n\t// login credentials or admin privilege.  Any user can change their own\n\t// login credentials. Only an admin user can change another users login\n\t// credentials or admin privilege setting. No user may change their own\n\t// admin privilege setting.\n\tif err := conn.RegisterFunc(\"auth_user_change\", conn.authUserChange, true); err != nil {\n\t\treturn nil, err\n\t}\n\t//\n\t// Register: auth_user_delete\n\t// auth_user_delete can be used (by an admin user only)\n\t// to delete a user. The currently logged-in user cannot be deleted,\n\t// which guarantees that there is always an admin user and hence that\n\t// the database cannot be converted into a no-authentication-required\n\t// database.\n\tif err := conn.RegisterFunc(\"auth_user_delete\", conn.authUserDelete, true); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Register: auth_enabled\n\t// auth_enabled can be used to check if user authentication is enabled\n\tif err := conn.RegisterFunc(\"auth_enabled\", conn.authEnabled, true); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Auto Vacuum\n\t// Moved auto_vacuum command, the user preference for auto_vacuum needs to be implemented directly after\n\t// the authentication and before the sqlite_user table gets created if the user\n\t// decides to activate User Authentication because\n\t// auto_vacuum needs to be set before any tables are created\n\t// and activating user authentication creates the internal table `sqlite_user`.\n\tif autoVacuum > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA auto_vacuum = %d;\", autoVacuum)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Check if user wants to activate User Authentication\n\tif authCreate {\n\t\t// Before going any further, we need to check that the user\n\t\t// has provided an username and password within the DSN.\n\t\t// We are not allowed to continue.\n\t\tif len(authUser) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"Missing '_auth_user' while user authentication was requested with '_auth'\")\n\t\t}\n\t\tif len(authPass) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"Missing '_auth_pass' while user authentication was requested with '_auth'\")\n\t\t}\n\n\t\t// Check if User Authentication is Enabled\n\t\tauthExists := conn.AuthEnabled()\n\t\tif !authExists {\n\t\t\tif err := conn.AuthUserAdd(authUser, authPass, true); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t}\n\n\t// Case Sensitive LIKE\n\tif caseSensitiveLike > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA case_sensitive_like = %d;\", caseSensitiveLike)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Defer Foreign Keys\n\tif deferForeignKeys > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA defer_foreign_keys = %d;\", deferForeignKeys)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Foreign Keys\n\tif foreignKeys > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA foreign_keys = %d;\", foreignKeys)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Ignore CHECK Constraints\n\tif ignoreCheckConstraints > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA ignore_check_constraints = %d;\", ignoreCheckConstraints)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Journal Mode\n\tif journalMode != \"\" {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA journal_mode = %s;\", journalMode)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Locking Mode\n\t// Because the default is NORMAL and this is not changed in this package\n\t// by using the compile time SQLITE_DEFAULT_LOCKING_MODE this PRAGMA can always be executed\n\tif err := exec(fmt.Sprintf(\"PRAGMA locking_mode = %s;\", lockingMode)); err != nil {\n\t\tC.sqlite3_close_v2(db)\n\t\treturn nil, err\n\t}\n\n\t// Query Only\n\tif queryOnly > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA query_only = %d;\", queryOnly)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Recursive Triggers\n\tif recursiveTriggers > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA recursive_triggers = %d;\", recursiveTriggers)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Secure Delete\n\t//\n\t// Because this package can set the compile time flag SQLITE_SECURE_DELETE with a build tag\n\t// the default value for secureDelete var is 'DEFAULT' this way\n\t// you can compile with secure_delete 'ON' and disable it for a specific database connection.\n\tif secureDelete != \"DEFAULT\" {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA secure_delete = %s;\", secureDelete)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Synchronous Mode\n\t//\n\t// Because default is NORMAL this statement is always executed\n\tif err := exec(fmt.Sprintf(\"PRAGMA synchronous = %s;\", synchronousMode)); err != nil {\n\t\tconn.Close()\n\t\treturn nil, err\n\t}\n\n\t// Writable Schema\n\tif writableSchema > -1 {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA writable_schema = %d;\", writableSchema)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Cache Size\n\tif cacheSize != nil {\n\t\tif err := exec(fmt.Sprintf(\"PRAGMA cache_size = %d;\", *cacheSize)); err != nil {\n\t\t\tC.sqlite3_close_v2(db)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif len(d.Extensions) > 0 {\n\t\tif err := conn.loadExtensions(d.Extensions); err != nil {\n\t\t\tconn.Close()\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif d.ConnectHook != nil {\n\t\tif err := d.ConnectHook(conn); err != nil {\n\t\t\tconn.Close()\n\t\t\treturn nil, err\n\t\t}\n\t}\n\truntime.SetFinalizer(conn, (*SQLiteConn).Close)\n\treturn conn, nil\n}\n\n// Close the connection.\nfunc (c *SQLiteConn) Close() error {\n\trv := C.sqlite3_close_v2(c.db)\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\tdeleteHandles(c)\n\tc.mu.Lock()\n\tc.db = nil\n\tc.mu.Unlock()\n\truntime.SetFinalizer(c, nil)\n\treturn nil\n}\n\nfunc (c *SQLiteConn) dbConnOpen() bool {\n\tif c == nil {\n\t\treturn false\n\t}\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\treturn c.db != nil\n}\n\n// Prepare the query string. Return a new statement.\nfunc (c *SQLiteConn) Prepare(query string) (driver.Stmt, error) {\n\treturn c.prepare(context.Background(), query)\n}\n\nfunc (c *SQLiteConn) prepare(ctx context.Context, query string) (driver.Stmt, error) {\n\tpquery := C.CString(query)\n\tdefer C.free(unsafe.Pointer(pquery))\n\tvar s *C.sqlite3_stmt\n\tvar tail *C.char\n\trv := C._sqlite3_prepare_v2_internal(c.db, pquery, C.int(-1), &s, &tail)\n\tif rv != C.SQLITE_OK {\n\t\treturn nil, c.lastError()\n\t}\n\tvar t string\n\tif tail != nil && *tail != '\\000' {\n\t\tt = strings.TrimSpace(C.GoString(tail))\n\t}\n\tss := &SQLiteStmt{c: c, s: s, t: t}\n\truntime.SetFinalizer(ss, (*SQLiteStmt).Close)\n\treturn ss, nil\n}\n\n// Run-Time Limit Categories.\n// See: http://www.sqlite.org/c3ref/c_limit_attached.html\nconst (\n\tSQLITE_LIMIT_LENGTH              = C.SQLITE_LIMIT_LENGTH\n\tSQLITE_LIMIT_SQL_LENGTH          = C.SQLITE_LIMIT_SQL_LENGTH\n\tSQLITE_LIMIT_COLUMN              = C.SQLITE_LIMIT_COLUMN\n\tSQLITE_LIMIT_EXPR_DEPTH          = C.SQLITE_LIMIT_EXPR_DEPTH\n\tSQLITE_LIMIT_COMPOUND_SELECT     = C.SQLITE_LIMIT_COMPOUND_SELECT\n\tSQLITE_LIMIT_VDBE_OP             = C.SQLITE_LIMIT_VDBE_OP\n\tSQLITE_LIMIT_FUNCTION_ARG        = C.SQLITE_LIMIT_FUNCTION_ARG\n\tSQLITE_LIMIT_ATTACHED            = C.SQLITE_LIMIT_ATTACHED\n\tSQLITE_LIMIT_LIKE_PATTERN_LENGTH = C.SQLITE_LIMIT_LIKE_PATTERN_LENGTH\n\tSQLITE_LIMIT_VARIABLE_NUMBER     = C.SQLITE_LIMIT_VARIABLE_NUMBER\n\tSQLITE_LIMIT_TRIGGER_DEPTH       = C.SQLITE_LIMIT_TRIGGER_DEPTH\n\tSQLITE_LIMIT_WORKER_THREADS      = C.SQLITE_LIMIT_WORKER_THREADS\n)\n\n// GetFilename returns the absolute path to the file containing\n// the requested schema. When passed an empty string, it will\n// instead use the database's default schema: \"main\".\n// See: sqlite3_db_filename, https://www.sqlite.org/c3ref/db_filename.html\nfunc (c *SQLiteConn) GetFilename(schemaName string) string {\n\tif schemaName == \"\" {\n\t\tschemaName = \"main\"\n\t}\n\treturn C.GoString(C.sqlite3_db_filename(c.db, C.CString(schemaName)))\n}\n\n// GetLimit returns the current value of a run-time limit.\n// See: sqlite3_limit, http://www.sqlite.org/c3ref/limit.html\nfunc (c *SQLiteConn) GetLimit(id int) int {\n\treturn int(C._sqlite3_limit(c.db, C.int(id), C.int(-1)))\n}\n\n// SetLimit changes the value of a run-time limits.\n// Then this method returns the prior value of the limit.\n// See: sqlite3_limit, http://www.sqlite.org/c3ref/limit.html\nfunc (c *SQLiteConn) SetLimit(id int, newVal int) int {\n\treturn int(C._sqlite3_limit(c.db, C.int(id), C.int(newVal)))\n}\n\n// SetFileControlInt invokes the xFileControl method on a given database. The\n// dbName is the name of the database. It will default to \"main\" if left blank.\n// The op is one of the opcodes prefixed by \"SQLITE_FCNTL_\". The arg argument\n// and return code are both opcode-specific. Please see the SQLite documentation.\n//\n// This method is not thread-safe as the returned error code can be changed by\n// another call if invoked concurrently.\n//\n// Use SetFileControlInt64 instead if the argument for the opcode is documented\n// as a pointer to a sqlite3_int64.\n//\n// See: sqlite3_file_control, https://www.sqlite.org/c3ref/file_control.html\nfunc (c *SQLiteConn) SetFileControlInt(dbName string, op int, arg int) error {\n\tif dbName == \"\" {\n\t\tdbName = \"main\"\n\t}\n\n\tcDBName := C.CString(dbName)\n\tdefer C.free(unsafe.Pointer(cDBName))\n\n\tcArg := C.int(arg)\n\trv := C.sqlite3_file_control(c.db, cDBName, C.int(op), unsafe.Pointer(&cArg))\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\n// SetFileControlInt64 invokes the xFileControl method on a given database. The\n// dbName is the name of the database. It will default to \"main\" if left blank.\n// The op is one of the opcodes prefixed by \"SQLITE_FCNTL_\". The arg argument\n// and return code are both opcode-specific. Please see the SQLite documentation.\n//\n// This method is not thread-safe as the returned error code can be changed by\n// another call if invoked concurrently.\n//\n// Only use this method if the argument for the opcode is documented as a pointer\n// to a sqlite3_int64.\n//\n// See: sqlite3_file_control, https://www.sqlite.org/c3ref/file_control.html\nfunc (c *SQLiteConn) SetFileControlInt64(dbName string, op int, arg int64) error {\n\tif dbName == \"\" {\n\t\tdbName = \"main\"\n\t}\n\n\tcDBName := C.CString(dbName)\n\tdefer C.free(unsafe.Pointer(cDBName))\n\n\tcArg := C.sqlite3_int64(arg)\n\trv := C.sqlite3_file_control(c.db, cDBName, C.int(op), unsafe.Pointer(&cArg))\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\n// Close the statement.\nfunc (s *SQLiteStmt) Close() error {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\tif s.closed {\n\t\treturn nil\n\t}\n\ts.closed = true\n\tif !s.c.dbConnOpen() {\n\t\treturn errors.New(\"sqlite statement with already closed database connection\")\n\t}\n\trv := C.sqlite3_finalize(s.s)\n\ts.s = nil\n\tif rv != C.SQLITE_OK {\n\t\treturn s.c.lastError()\n\t}\n\ts.c = nil\n\truntime.SetFinalizer(s, nil)\n\treturn nil\n}\n\n// NumInput return a number of parameters.\nfunc (s *SQLiteStmt) NumInput() int {\n\treturn int(C.sqlite3_bind_parameter_count(s.s))\n}\n\nvar placeHolder = []byte{0}\n\nfunc (s *SQLiteStmt) bind(args []driver.NamedValue) error {\n\trv := C.sqlite3_reset(s.s)\n\tif rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {\n\t\treturn s.c.lastError()\n\t}\n\n\tbindIndices := make([][3]int, len(args))\n\tprefixes := []string{\":\", \"@\", \"$\"}\n\tfor i, v := range args {\n\t\tbindIndices[i][0] = args[i].Ordinal\n\t\tif v.Name != \"\" {\n\t\t\tfor j := range prefixes {\n\t\t\t\tcname := C.CString(prefixes[j] + v.Name)\n\t\t\t\tbindIndices[i][j] = int(C.sqlite3_bind_parameter_index(s.s, cname))\n\t\t\t\tC.free(unsafe.Pointer(cname))\n\t\t\t}\n\t\t\targs[i].Ordinal = bindIndices[i][0]\n\t\t}\n\t}\n\n\tfor i, arg := range args {\n\t\tfor j := range bindIndices[i] {\n\t\t\tif bindIndices[i][j] == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tn := C.int(bindIndices[i][j])\n\t\t\tswitch v := arg.Value.(type) {\n\t\t\tcase nil:\n\t\t\t\trv = C.sqlite3_bind_null(s.s, n)\n\t\t\tcase string:\n\t\t\t\tif len(v) == 0 {\n\t\t\t\t\trv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&placeHolder[0])), C.int(0))\n\t\t\t\t} else {\n\t\t\t\t\tb := []byte(v)\n\t\t\t\t\trv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b)))\n\t\t\t\t}\n\t\t\tcase int64:\n\t\t\t\trv = C.sqlite3_bind_int64(s.s, n, C.sqlite3_int64(v))\n\t\t\tcase bool:\n\t\t\t\tif v {\n\t\t\t\t\trv = C.sqlite3_bind_int(s.s, n, 1)\n\t\t\t\t} else {\n\t\t\t\t\trv = C.sqlite3_bind_int(s.s, n, 0)\n\t\t\t\t}\n\t\t\tcase float64:\n\t\t\t\trv = C.sqlite3_bind_double(s.s, n, C.double(v))\n\t\t\tcase []byte:\n\t\t\t\tif v == nil {\n\t\t\t\t\trv = C.sqlite3_bind_null(s.s, n)\n\t\t\t\t} else {\n\t\t\t\t\tln := len(v)\n\t\t\t\t\tif ln == 0 {\n\t\t\t\t\t\tv = placeHolder\n\t\t\t\t\t}\n\t\t\t\t\trv = C._sqlite3_bind_blob(s.s, n, unsafe.Pointer(&v[0]), C.int(ln))\n\t\t\t\t}\n\t\t\tcase time.Time:\n\t\t\t\tb := []byte(v.Format(SQLiteTimestampFormats[0]))\n\t\t\t\trv = C._sqlite3_bind_text(s.s, n, (*C.char)(unsafe.Pointer(&b[0])), C.int(len(b)))\n\t\t\t}\n\t\t\tif rv != C.SQLITE_OK {\n\t\t\t\treturn s.c.lastError()\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// Query the statement with arguments. Return records.\nfunc (s *SQLiteStmt) Query(args []driver.Value) (driver.Rows, error) {\n\tlist := make([]driver.NamedValue, len(args))\n\tfor i, v := range args {\n\t\tlist[i] = driver.NamedValue{\n\t\t\tOrdinal: i + 1,\n\t\t\tValue:   v,\n\t\t}\n\t}\n\treturn s.query(context.Background(), list)\n}\n\nfunc (s *SQLiteStmt) query(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {\n\tif err := s.bind(args); err != nil {\n\t\treturn nil, err\n\t}\n\n\trows := &SQLiteRows{\n\t\ts:        s,\n\t\tnc:       int32(C.sqlite3_column_count(s.s)),\n\t\tcls:      s.cls,\n\t\tcols:     nil,\n\t\tdecltype: nil,\n\t\tctx:      ctx,\n\t}\n\n\treturn rows, nil\n}\n\n// LastInsertId return last inserted ID.\nfunc (r *SQLiteResult) LastInsertId() (int64, error) {\n\treturn r.id, nil\n}\n\n// RowsAffected return how many rows affected.\nfunc (r *SQLiteResult) RowsAffected() (int64, error) {\n\treturn r.changes, nil\n}\n\n// Exec execute the statement with arguments. Return result object.\nfunc (s *SQLiteStmt) Exec(args []driver.Value) (driver.Result, error) {\n\tlist := make([]driver.NamedValue, len(args))\n\tfor i, v := range args {\n\t\tlist[i] = driver.NamedValue{\n\t\t\tOrdinal: i + 1,\n\t\t\tValue:   v,\n\t\t}\n\t}\n\treturn s.exec(context.Background(), list)\n}\n\nfunc isInterruptErr(err error) bool {\n\tsqliteErr, ok := err.(Error)\n\tif ok {\n\t\treturn sqliteErr.Code == ErrInterrupt\n\t}\n\treturn false\n}\n\n// exec executes a query that doesn't return rows. Attempts to honor context timeout.\nfunc (s *SQLiteStmt) exec(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {\n\tif ctx.Done() == nil {\n\t\treturn s.execSync(args)\n\t}\n\n\ttype result struct {\n\t\tr   driver.Result\n\t\terr error\n\t}\n\tresultCh := make(chan result)\n\tdefer close(resultCh)\n\tgo func() {\n\t\tr, err := s.execSync(args)\n\t\tresultCh <- result{r, err}\n\t}()\n\tvar rv result\n\tselect {\n\tcase rv = <-resultCh:\n\tcase <-ctx.Done():\n\t\tselect {\n\t\tcase rv = <-resultCh: // no need to interrupt, operation completed in db\n\t\tdefault:\n\t\t\t// this is still racy and can be no-op if executed between sqlite3_* calls in execSync.\n\t\t\tC.sqlite3_interrupt(s.c.db)\n\t\t\trv = <-resultCh // wait for goroutine completed\n\t\t\tif isInterruptErr(rv.err) {\n\t\t\t\treturn nil, ctx.Err()\n\t\t\t}\n\t\t}\n\t}\n\treturn rv.r, rv.err\n}\n\nfunc (s *SQLiteStmt) execSync(args []driver.NamedValue) (driver.Result, error) {\n\tif err := s.bind(args); err != nil {\n\t\tC.sqlite3_reset(s.s)\n\t\tC.sqlite3_clear_bindings(s.s)\n\t\treturn nil, err\n\t}\n\n\tvar rowid, changes C.longlong\n\trv := C._sqlite3_step_row_internal(s.s, &rowid, &changes)\n\tif rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {\n\t\terr := s.c.lastError()\n\t\tC.sqlite3_reset(s.s)\n\t\tC.sqlite3_clear_bindings(s.s)\n\t\treturn nil, err\n\t}\n\n\treturn &SQLiteResult{id: int64(rowid), changes: int64(changes)}, nil\n}\n\n// Readonly reports if this statement is considered readonly by SQLite.\n//\n// See: https://sqlite.org/c3ref/stmt_readonly.html\nfunc (s *SQLiteStmt) Readonly() bool {\n\treturn C.sqlite3_stmt_readonly(s.s) == 1\n}\n\n// Close the rows.\nfunc (rc *SQLiteRows) Close() error {\n\trc.closemu.Lock()\n\tdefer rc.closemu.Unlock()\n\ts := rc.s\n\tif s == nil {\n\t\treturn nil\n\t}\n\trc.s = nil // remove reference to SQLiteStmt\n\ts.mu.Lock()\n\tif s.closed {\n\t\ts.mu.Unlock()\n\t\treturn nil\n\t}\n\tif rc.cls {\n\t\ts.mu.Unlock()\n\t\treturn s.Close()\n\t}\n\trv := C.sqlite3_reset(s.s)\n\tif rv != C.SQLITE_OK {\n\t\ts.mu.Unlock()\n\t\treturn s.c.lastError()\n\t}\n\ts.mu.Unlock()\n\treturn nil\n}\n\n// Columns return column names.\nfunc (rc *SQLiteRows) Columns() []string {\n\trc.s.mu.Lock()\n\tdefer rc.s.mu.Unlock()\n\tif rc.s.s != nil && int(rc.nc) != len(rc.cols) {\n\t\trc.cols = make([]string, rc.nc)\n\t\tfor i := 0; i < int(rc.nc); i++ {\n\t\t\trc.cols[i] = C.GoString(C.sqlite3_column_name(rc.s.s, C.int(i)))\n\t\t}\n\t}\n\treturn rc.cols\n}\n\nfunc (rc *SQLiteRows) declTypes() []string {\n\tif rc.s.s != nil && rc.decltype == nil {\n\t\trc.decltype = make([]string, rc.nc)\n\t\tfor i := 0; i < int(rc.nc); i++ {\n\t\t\trc.decltype[i] = strings.ToLower(C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))))\n\t\t}\n\t}\n\treturn rc.decltype\n}\n\n// DeclTypes return column types.\nfunc (rc *SQLiteRows) DeclTypes() []string {\n\trc.s.mu.Lock()\n\tdefer rc.s.mu.Unlock()\n\treturn rc.declTypes()\n}\n\n// Next move cursor to next. Attempts to honor context timeout from QueryContext call.\nfunc (rc *SQLiteRows) Next(dest []driver.Value) error {\n\trc.s.mu.Lock()\n\tdefer rc.s.mu.Unlock()\n\n\tif rc.s.closed {\n\t\treturn io.EOF\n\t}\n\n\tif rc.ctx.Done() == nil {\n\t\treturn rc.nextSyncLocked(dest)\n\t}\n\tresultCh := make(chan error)\n\tdefer close(resultCh)\n\tgo func() {\n\t\tresultCh <- rc.nextSyncLocked(dest)\n\t}()\n\tselect {\n\tcase err := <-resultCh:\n\t\treturn err\n\tcase <-rc.ctx.Done():\n\t\tselect {\n\t\tcase <-resultCh: // no need to interrupt\n\t\tdefault:\n\t\t\t// this is still racy and can be no-op if executed between sqlite3_* calls in nextSyncLocked.\n\t\t\tC.sqlite3_interrupt(rc.s.c.db)\n\t\t\t<-resultCh // ensure goroutine completed\n\t\t}\n\t\treturn rc.ctx.Err()\n\t}\n}\n\n// nextSyncLocked moves cursor to next; must be called with locked mutex.\nfunc (rc *SQLiteRows) nextSyncLocked(dest []driver.Value) error {\n\trv := C._sqlite3_step_internal(rc.s.s)\n\tif rv == C.SQLITE_DONE {\n\t\treturn io.EOF\n\t}\n\tif rv != C.SQLITE_ROW {\n\t\trv = C.sqlite3_reset(rc.s.s)\n\t\tif rv != C.SQLITE_OK {\n\t\t\treturn rc.s.c.lastError()\n\t\t}\n\t\treturn nil\n\t}\n\n\trc.declTypes()\n\n\tfor i := range dest {\n\t\tswitch C.sqlite3_column_type(rc.s.s, C.int(i)) {\n\t\tcase C.SQLITE_INTEGER:\n\t\t\tval := int64(C.sqlite3_column_int64(rc.s.s, C.int(i)))\n\t\t\tswitch rc.decltype[i] {\n\t\t\tcase columnTimestamp, columnDatetime, columnDate:\n\t\t\t\tvar t time.Time\n\t\t\t\t// Assume a millisecond unix timestamp if it's 13 digits -- too\n\t\t\t\t// large to be a reasonable timestamp in seconds.\n\t\t\t\tif val > 1e12 || val < -1e12 {\n\t\t\t\t\tval *= int64(time.Millisecond) // convert ms to nsec\n\t\t\t\t\tt = time.Unix(0, val)\n\t\t\t\t} else {\n\t\t\t\t\tt = time.Unix(val, 0)\n\t\t\t\t}\n\t\t\t\tt = t.UTC()\n\t\t\t\tif rc.s.c.loc != nil {\n\t\t\t\t\tt = t.In(rc.s.c.loc)\n\t\t\t\t}\n\t\t\t\tdest[i] = t\n\t\t\tcase \"boolean\":\n\t\t\t\tdest[i] = val > 0\n\t\t\tdefault:\n\t\t\t\tdest[i] = val\n\t\t\t}\n\t\tcase C.SQLITE_FLOAT:\n\t\t\tdest[i] = float64(C.sqlite3_column_double(rc.s.s, C.int(i)))\n\t\tcase C.SQLITE_BLOB:\n\t\t\tp := C.sqlite3_column_blob(rc.s.s, C.int(i))\n\t\t\tif p == nil {\n\t\t\t\tdest[i] = []byte{}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tn := C.sqlite3_column_bytes(rc.s.s, C.int(i))\n\t\t\tdest[i] = C.GoBytes(p, n)\n\t\tcase C.SQLITE_NULL:\n\t\t\tdest[i] = nil\n\t\tcase C.SQLITE_TEXT:\n\t\t\tvar err error\n\t\t\tvar timeVal time.Time\n\n\t\t\tn := int(C.sqlite3_column_bytes(rc.s.s, C.int(i)))\n\t\t\ts := C.GoStringN((*C.char)(unsafe.Pointer(C.sqlite3_column_text(rc.s.s, C.int(i)))), C.int(n))\n\n\t\t\tswitch rc.decltype[i] {\n\t\t\tcase columnTimestamp, columnDatetime, columnDate:\n\t\t\t\tvar t time.Time\n\t\t\t\ts = strings.TrimSuffix(s, \"Z\")\n\t\t\t\tfor _, format := range SQLiteTimestampFormats {\n\t\t\t\t\tif timeVal, err = time.ParseInLocation(format, s, time.UTC); err == nil {\n\t\t\t\t\t\tt = timeVal\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\t// The column is a time value, so return the zero time on parse failure.\n\t\t\t\t\tt = time.Time{}\n\t\t\t\t}\n\t\t\t\tif rc.s.c.loc != nil {\n\t\t\t\t\tt = t.In(rc.s.c.loc)\n\t\t\t\t}\n\t\t\t\tdest[i] = t\n\t\t\tdefault:\n\t\t\t\tdest[i] = s\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_context.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\n/*\n\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n// These wrappers are necessary because SQLITE_TRANSIENT\n// is a pointer constant, and cgo doesn't translate them correctly.\n\nstatic inline void my_result_text(sqlite3_context *ctx, char *p, int np) {\n\tsqlite3_result_text(ctx, p, np, SQLITE_TRANSIENT);\n}\n\nstatic inline void my_result_blob(sqlite3_context *ctx, void *p, int np) {\n\tsqlite3_result_blob(ctx, p, np, SQLITE_TRANSIENT);\n}\n*/\nimport \"C\"\n\nimport (\n\t\"math\"\n\t\"reflect\"\n\t\"unsafe\"\n)\n\nconst i64 = unsafe.Sizeof(int(0)) > 4\n\n// SQLiteContext behave sqlite3_context\ntype SQLiteContext C.sqlite3_context\n\n// ResultBool sets the result of an SQL function.\nfunc (c *SQLiteContext) ResultBool(b bool) {\n\tif b {\n\t\tc.ResultInt(1)\n\t} else {\n\t\tc.ResultInt(0)\n\t}\n}\n\n// ResultBlob sets the result of an SQL function.\n// See: sqlite3_result_blob, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultBlob(b []byte) {\n\tif i64 && len(b) > math.MaxInt32 {\n\t\tC.sqlite3_result_error_toobig((*C.sqlite3_context)(c))\n\t\treturn\n\t}\n\tvar p *byte\n\tif len(b) > 0 {\n\t\tp = &b[0]\n\t}\n\tC.my_result_blob((*C.sqlite3_context)(c), unsafe.Pointer(p), C.int(len(b)))\n}\n\n// ResultDouble sets the result of an SQL function.\n// See: sqlite3_result_double, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultDouble(d float64) {\n\tC.sqlite3_result_double((*C.sqlite3_context)(c), C.double(d))\n}\n\n// ResultInt sets the result of an SQL function.\n// See: sqlite3_result_int, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultInt(i int) {\n\tif i64 && (i > math.MaxInt32 || i < math.MinInt32) {\n\t\tC.sqlite3_result_int64((*C.sqlite3_context)(c), C.sqlite3_int64(i))\n\t} else {\n\t\tC.sqlite3_result_int((*C.sqlite3_context)(c), C.int(i))\n\t}\n}\n\n// ResultInt64 sets the result of an SQL function.\n// See: sqlite3_result_int64, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultInt64(i int64) {\n\tC.sqlite3_result_int64((*C.sqlite3_context)(c), C.sqlite3_int64(i))\n}\n\n// ResultNull sets the result of an SQL function.\n// See: sqlite3_result_null, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultNull() {\n\tC.sqlite3_result_null((*C.sqlite3_context)(c))\n}\n\n// ResultText sets the result of an SQL function.\n// See: sqlite3_result_text, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultText(s string) {\n\th := (*reflect.StringHeader)(unsafe.Pointer(&s))\n\tcs, l := (*C.char)(unsafe.Pointer(h.Data)), C.int(h.Len)\n\tC.my_result_text((*C.sqlite3_context)(c), cs, l)\n}\n\n// ResultZeroblob sets the result of an SQL function.\n// See: sqlite3_result_zeroblob, http://sqlite.org/c3ref/result_blob.html\nfunc (c *SQLiteContext) ResultZeroblob(n int) {\n\tC.sqlite3_result_zeroblob((*C.sqlite3_context)(c), C.int(n))\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_func_crypt.go",
    "content": "// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\nimport (\n\t\"crypto/sha1\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n)\n\n// This file provides several different implementations for the\n// default embedded sqlite_crypt function.\n// This function is uses a caesar-cypher by default\n// and is used within the UserAuthentication module to encode\n// the password.\n//\n// The provided functions can be used as an overload to the sqlite_crypt\n// function through the use of the RegisterFunc on the connection.\n//\n// Because the functions can serv a purpose to an end-user\n// without using the UserAuthentication module\n// the functions are default compiled in.\n//\n// From SQLITE3 - user-auth.txt\n// The sqlite_user.pw field is encoded by a built-in SQL function\n// \"sqlite_crypt(X,Y)\".  The two arguments are both BLOBs.  The first argument\n// is the plaintext password supplied to the sqlite3_user_authenticate()\n// interface.  The second argument is the sqlite_user.pw value and is supplied\n// so that the function can extract the \"salt\" used by the password encoder.\n// The result of sqlite_crypt(X,Y) is another blob which is the value that\n// ends up being stored in sqlite_user.pw.  To verify credentials X supplied\n// by the sqlite3_user_authenticate() routine, SQLite runs:\n//\n//     sqlite_user.pw == sqlite_crypt(X, sqlite_user.pw)\n//\n// To compute an appropriate sqlite_user.pw value from a new or modified\n// password X, sqlite_crypt(X,NULL) is run.  A new random salt is selected\n// when the second argument is NULL.\n//\n// The built-in version of of sqlite_crypt() uses a simple Caesar-cypher\n// which prevents passwords from being revealed by searching the raw database\n// for ASCII text, but is otherwise trivally broken.  For better password\n// security, the database should be encrypted using the SQLite Encryption\n// Extension or similar technology.  Or, the application can use the\n// sqlite3_create_function() interface to provide an alternative\n// implementation of sqlite_crypt() that computes a stronger password hash,\n// perhaps using a cryptographic hash function like SHA1.\n\n// CryptEncoderSHA1 encodes a password with SHA1\nfunc CryptEncoderSHA1(pass []byte, hash any) []byte {\n\th := sha1.Sum(pass)\n\treturn h[:]\n}\n\n// CryptEncoderSSHA1 encodes a password with SHA1 with the\n// configured salt.\nfunc CryptEncoderSSHA1(salt string) func(pass []byte, hash any) []byte {\n\treturn func(pass []byte, hash any) []byte {\n\t\ts := []byte(salt)\n\t\tp := append(pass, s...)\n\t\th := sha1.Sum(p)\n\t\treturn h[:]\n\t}\n}\n\n// CryptEncoderSHA256 encodes a password with SHA256\nfunc CryptEncoderSHA256(pass []byte, hash any) []byte {\n\th := sha256.Sum256(pass)\n\treturn h[:]\n}\n\n// CryptEncoderSSHA256 encodes a password with SHA256\n// with the configured salt\nfunc CryptEncoderSSHA256(salt string) func(pass []byte, hash any) []byte {\n\treturn func(pass []byte, hash any) []byte {\n\t\ts := []byte(salt)\n\t\tp := append(pass, s...)\n\t\th := sha256.Sum256(p)\n\t\treturn h[:]\n\t}\n}\n\n// CryptEncoderSHA384 encodes a password with SHA384\nfunc CryptEncoderSHA384(pass []byte, hash any) []byte {\n\th := sha512.Sum384(pass)\n\treturn h[:]\n}\n\n// CryptEncoderSSHA384 encodes a password with SHA384\n// with the configured salt\nfunc CryptEncoderSSHA384(salt string) func(pass []byte, hash any) []byte {\n\treturn func(pass []byte, hash any) []byte {\n\t\ts := []byte(salt)\n\t\tp := append(pass, s...)\n\t\th := sha512.Sum384(p)\n\t\treturn h[:]\n\t}\n}\n\n// CryptEncoderSHA512 encodes a password with SHA512\nfunc CryptEncoderSHA512(pass []byte, hash any) []byte {\n\th := sha512.Sum512(pass)\n\treturn h[:]\n}\n\n// CryptEncoderSSHA512 encodes a password with SHA512\n// with the configured salt\nfunc CryptEncoderSSHA512(salt string) func(pass []byte, hash any) []byte {\n\treturn func(pass []byte, hash any) []byte {\n\t\ts := []byte(salt)\n\t\tp := append(pass, s...)\n\t\th := sha512.Sum512(p)\n\t\treturn h[:]\n\t}\n}\n\n// EOF\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build cgo && go1.8\n// +build cgo,go1.8\n\npackage sqlite3\n\nimport (\n\t\"database/sql/driver\"\n\n\t\"context\"\n)\n\n// Ping implement Pinger.\nfunc (c *SQLiteConn) Ping(ctx context.Context) error {\n\tif c.db == nil {\n\t\t// must be ErrBadConn for sql to close the database\n\t\treturn driver.ErrBadConn\n\t}\n\treturn nil\n}\n\n// QueryContext implement QueryerContext.\nfunc (c *SQLiteConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {\n\treturn c.query(ctx, query, args)\n}\n\n// ExecContext implement ExecerContext.\nfunc (c *SQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {\n\treturn c.exec(ctx, query, args)\n}\n\n// PrepareContext implement ConnPrepareContext.\nfunc (c *SQLiteConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {\n\treturn c.prepare(ctx, query)\n}\n\n// BeginTx implement ConnBeginTx.\nfunc (c *SQLiteConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {\n\treturn c.begin(ctx)\n}\n\n// QueryContext implement QueryerContext.\nfunc (s *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {\n\treturn s.query(ctx, args)\n}\n\n// ExecContext implement ExecerContext.\nfunc (s *SQLiteStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {\n\treturn s.exec(ctx, args)\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_libsqlite3.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build libsqlite3\n// +build libsqlite3\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DUSE_LIBSQLITE3\n#cgo linux LDFLAGS: -lsqlite3\n#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3\n#cgo darwin,amd64 CFLAGS:  -I/usr/local/opt/sqlite/include\n#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/sqlite/lib -lsqlite3\n#cgo darwin,arm64 CFLAGS:  -I/opt/homebrew/opt/sqlite/include\n#cgo openbsd LDFLAGS: -lsqlite3\n#cgo solaris LDFLAGS: -lsqlite3\n#cgo windows LDFLAGS: -lsqlite3\n#cgo zos LDFLAGS: -lsqlite3\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !sqlite_omit_load_extension\n// +build !sqlite_omit_load_extension\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n*/\nimport \"C\"\nimport (\n\t\"errors\"\n\t\"unsafe\"\n)\n\nfunc (c *SQLiteConn) loadExtensions(extensions []string) error {\n\trv := C.sqlite3_enable_load_extension(c.db, 1)\n\tif rv != C.SQLITE_OK {\n\t\treturn errors.New(C.GoString(C.sqlite3_errmsg(c.db)))\n\t}\n\n\tfor _, extension := range extensions {\n\t\tif err := c.loadExtension(extension, nil); err != nil {\n\t\t\tC.sqlite3_enable_load_extension(c.db, 0)\n\t\t\treturn err\n\t\t}\n\t}\n\n\trv = C.sqlite3_enable_load_extension(c.db, 0)\n\tif rv != C.SQLITE_OK {\n\t\treturn errors.New(C.GoString(C.sqlite3_errmsg(c.db)))\n\t}\n\n\treturn nil\n}\n\n// LoadExtension load the sqlite3 extension.\nfunc (c *SQLiteConn) LoadExtension(lib string, entry string) error {\n\trv := C.sqlite3_enable_load_extension(c.db, 1)\n\tif rv != C.SQLITE_OK {\n\t\treturn errors.New(C.GoString(C.sqlite3_errmsg(c.db)))\n\t}\n\n\tif err := c.loadExtension(lib, &entry); err != nil {\n\t\tC.sqlite3_enable_load_extension(c.db, 0)\n\t\treturn err\n\t}\n\n\trv = C.sqlite3_enable_load_extension(c.db, 0)\n\tif rv != C.SQLITE_OK {\n\t\treturn errors.New(C.GoString(C.sqlite3_errmsg(c.db)))\n\t}\n\n\treturn nil\n}\n\nfunc (c *SQLiteConn) loadExtension(lib string, entry *string) error {\n\tclib := C.CString(lib)\n\tdefer C.free(unsafe.Pointer(clib))\n\n\tvar centry *C.char\n\tif entry != nil {\n\t\tcentry = C.CString(*entry)\n\t\tdefer C.free(unsafe.Pointer(centry))\n\t}\n\n\tvar errMsg *C.char\n\tdefer C.sqlite3_free(unsafe.Pointer(errMsg))\n\n\trv := C.sqlite3_load_extension(c.db, clib, centry, &errMsg)\n\tif rv != C.SQLITE_OK {\n\t\treturn errors.New(C.GoString(errMsg))\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension_omit.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_omit_load_extension\n// +build sqlite_omit_load_extension\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_OMIT_LOAD_EXTENSION\n*/\nimport \"C\"\nimport (\n\t\"errors\"\n)\n\nfunc (c *SQLiteConn) loadExtensions(extensions []string) error {\n\treturn errors.New(\"Extensions have been disabled for static builds\")\n}\n\nfunc (c *SQLiteConn) LoadExtension(lib string, entry string) error {\n\treturn errors.New(\"Extensions have been disabled for static builds\")\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_allow_uri_authority.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_allow_uri_authority\n// +build sqlite_allow_uri_authority\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ALLOW_URI_AUTHORITY\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_app_armor.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !windows && sqlite_app_armor\n// +build !windows,sqlite_app_armor\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_API_ARMOR\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_column_metadata.go",
    "content": "//go:build sqlite_column_metadata\n// +build sqlite_column_metadata\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n*/\nimport \"C\"\n\n// ColumnTableName returns the table that is the origin of a particular result\n// column in a SELECT statement.\n//\n// See https://www.sqlite.org/c3ref/column_database_name.html\nfunc (s *SQLiteStmt) ColumnTableName(n int) string {\n\treturn C.GoString(C.sqlite3_column_table_name(s.s, C.int(n)))\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_foreign_keys.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_foreign_keys\n// +build sqlite_foreign_keys\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_DEFAULT_FOREIGN_KEYS=1\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_fts5.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_fts5 || fts5\n// +build sqlite_fts5 fts5\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS5\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_icu.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_icu || icu\n// +build sqlite_icu icu\n\npackage sqlite3\n\n/*\n#cgo LDFLAGS: -licuuc -licui18n\n#cgo CFLAGS: -DSQLITE_ENABLE_ICU\n#cgo darwin,amd64 CFLAGS:  -I/usr/local/opt/icu4c/include\n#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/icu4c/lib\n#cgo darwin,arm64 CFLAGS:  -I/opt/homebrew/opt/icu4c/include\n#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/icu4c/lib\n#cgo openbsd LDFLAGS: -lsqlite3\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_introspect.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_introspect\n// +build sqlite_introspect\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_INTROSPECTION_PRAGMAS\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_math_functions.go",
    "content": "// Copyright (C) 2022 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_math_functions\n// +build sqlite_math_functions\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_MATH_FUNCTIONS\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_os_trace.go",
    "content": "// Copyright (C) 2022 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_os_trace\n// +build sqlite_os_trace\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_FORCE_OS_TRACE=1\n#cgo CFLAGS: -DSQLITE_DEBUG_OS_TRACE=1\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_percentile.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_percentile\n// +build sqlite_percentile\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_PERCENTILE\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate.go",
    "content": "// Copyright (C) 2019 G.J.R. Timmer <gjr.timmer@gmail.com>.\n// Copyright (C) 2018 segment.com <friends@segment.com>\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build cgo\n// +build cgo\n\npackage sqlite3\n\n// SQLitePreUpdateData represents all of the data available during a\n// pre-update hook call.\ntype SQLitePreUpdateData struct {\n\tConn         *SQLiteConn\n\tOp           int\n\tDatabaseName string\n\tTableName    string\n\tOldRowID     int64\n\tNewRowID     int64\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate_hook.go",
    "content": "// Copyright (C) 2019 G.J.R. Timmer <gjr.timmer@gmail.com>.\n// Copyright (C) 2018 segment.com <friends@segment.com>\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_preupdate_hook\n// +build sqlite_preupdate_hook\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_PREUPDATE_HOOK\n#cgo LDFLAGS: -lm\n\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n#include <string.h>\n\nvoid preUpdateHookTrampoline(void*, sqlite3 *, int, char *, char *, sqlite3_int64, sqlite3_int64);\n*/\nimport \"C\"\nimport (\n\t\"errors\"\n\t\"unsafe\"\n)\n\n// RegisterPreUpdateHook sets the pre-update hook for a connection.\n//\n// The callback is passed a SQLitePreUpdateData struct with the data for\n// the update, as well as methods for fetching copies of impacted data.\n//\n// If there is an existing preupdate hook for this connection, it will be\n// removed. If callback is nil the existing hook (if any) will be removed\n// without creating a new one.\nfunc (c *SQLiteConn) RegisterPreUpdateHook(callback func(SQLitePreUpdateData)) {\n\tif callback == nil {\n\t\tC.sqlite3_preupdate_hook(c.db, nil, nil)\n\t} else {\n\t\tC.sqlite3_preupdate_hook(c.db, (*[0]byte)(unsafe.Pointer(C.preUpdateHookTrampoline)), unsafe.Pointer(newHandle(c, callback)))\n\t}\n}\n\n// Depth returns the source path of the write, see sqlite3_preupdate_depth()\nfunc (d *SQLitePreUpdateData) Depth() int {\n\treturn int(C.sqlite3_preupdate_depth(d.Conn.db))\n}\n\n// Count returns the number of columns in the row\nfunc (d *SQLitePreUpdateData) Count() int {\n\treturn int(C.sqlite3_preupdate_count(d.Conn.db))\n}\n\nfunc (d *SQLitePreUpdateData) row(dest []any, new bool) error {\n\tfor i := 0; i < d.Count() && i < len(dest); i++ {\n\t\tvar val *C.sqlite3_value\n\t\tvar src any\n\n\t\t// Initially I tried making this just a function pointer argument, but\n\t\t// it's absurdly complicated to pass C function pointers.\n\t\tif new {\n\t\t\tC.sqlite3_preupdate_new(d.Conn.db, C.int(i), &val)\n\t\t} else {\n\t\t\tC.sqlite3_preupdate_old(d.Conn.db, C.int(i), &val)\n\t\t}\n\n\t\tswitch C.sqlite3_value_type(val) {\n\t\tcase C.SQLITE_INTEGER:\n\t\t\tsrc = int64(C.sqlite3_value_int64(val))\n\t\tcase C.SQLITE_FLOAT:\n\t\t\tsrc = float64(C.sqlite3_value_double(val))\n\t\tcase C.SQLITE_BLOB:\n\t\t\tlen := C.sqlite3_value_bytes(val)\n\t\t\tblobptr := C.sqlite3_value_blob(val)\n\t\t\tsrc = C.GoBytes(blobptr, len)\n\t\tcase C.SQLITE_TEXT:\n\t\t\tlen := C.sqlite3_value_bytes(val)\n\t\t\tcstrptr := unsafe.Pointer(C.sqlite3_value_text(val))\n\t\t\tsrc = C.GoBytes(cstrptr, len)\n\t\tcase C.SQLITE_NULL:\n\t\t\tsrc = nil\n\t\t}\n\n\t\terr := convertAssign(&dest[i], src)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Old populates dest with the row data to be replaced. This works similar to\n// database/sql's Rows.Scan()\nfunc (d *SQLitePreUpdateData) Old(dest ...any) error {\n\tif d.Op == SQLITE_INSERT {\n\t\treturn errors.New(\"There is no old row for INSERT operations\")\n\t}\n\treturn d.row(dest, false)\n}\n\n// New populates dest with the replacement row data. This works similar to\n// database/sql's Rows.Scan()\nfunc (d *SQLitePreUpdateData) New(dest ...any) error {\n\tif d.Op == SQLITE_DELETE {\n\t\treturn errors.New(\"There is no new row for DELETE operations\")\n\t}\n\treturn d.row(dest, true)\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate_omit.go",
    "content": "// Copyright (C) 2019 G.J.R. Timmer <gjr.timmer@gmail.com>.\n// Copyright (C) 2018 segment.com <friends@segment.com>\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !sqlite_preupdate_hook && cgo\n// +build !sqlite_preupdate_hook,cgo\n\npackage sqlite3\n\n// RegisterPreUpdateHook sets the pre-update hook for a connection.\n//\n// The callback is passed a SQLitePreUpdateData struct with the data for\n// the update, as well as methods for fetching copies of impacted data.\n//\n// If there is an existing preupdate hook for this connection, it will be\n// removed. If callback is nil the existing hook (if any) will be removed\n// without creating a new one.\nfunc (c *SQLiteConn) RegisterPreUpdateHook(callback func(SQLitePreUpdateData)) {\n\t// NOOP\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_secure_delete\n// +build sqlite_secure_delete\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_SECURE_DELETE=1\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete_fast.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_secure_delete_fast\n// +build sqlite_secure_delete_fast\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_SECURE_DELETE=FAST\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_serialize.go",
    "content": "//go:build !libsqlite3 || sqlite_serialize\n// +build !libsqlite3 sqlite_serialize\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n#include <stdint.h>\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"unsafe\"\n)\n\n// Serialize returns a byte slice that is a serialization of the database.\n//\n// See https://www.sqlite.org/c3ref/serialize.html\nfunc (c *SQLiteConn) Serialize(schema string) ([]byte, error) {\n\tif schema == \"\" {\n\t\tschema = \"main\"\n\t}\n\tvar zSchema *C.char\n\tzSchema = C.CString(schema)\n\tdefer C.free(unsafe.Pointer(zSchema))\n\n\tvar sz C.sqlite3_int64\n\tptr := C.sqlite3_serialize(c.db, zSchema, &sz, 0)\n\tif ptr == nil {\n\t\treturn nil, fmt.Errorf(\"serialize failed\")\n\t}\n\tdefer C.sqlite3_free(unsafe.Pointer(ptr))\n\n\tif sz > C.sqlite3_int64(math.MaxInt) {\n\t\treturn nil, fmt.Errorf(\"serialized database is too large (%d bytes)\", sz)\n\t}\n\n\tcBuf := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(ptr)),\n\t\tLen:  int(sz),\n\t\tCap:  int(sz),\n\t}))\n\n\tres := make([]byte, int(sz))\n\tcopy(res, cBuf)\n\treturn res, nil\n}\n\n// Deserialize causes the connection to disconnect from the current database and\n// then re-open as an in-memory database based on the contents of the byte slice.\n//\n// See https://www.sqlite.org/c3ref/deserialize.html\nfunc (c *SQLiteConn) Deserialize(b []byte, schema string) error {\n\tif schema == \"\" {\n\t\tschema = \"main\"\n\t}\n\tvar zSchema *C.char\n\tzSchema = C.CString(schema)\n\tdefer C.free(unsafe.Pointer(zSchema))\n\n\ttmpBuf := (*C.uchar)(C.sqlite3_malloc64(C.sqlite3_uint64(len(b))))\n\tcBuf := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(tmpBuf)),\n\t\tLen:  len(b),\n\t\tCap:  len(b),\n\t}))\n\tcopy(cBuf, b)\n\n\trc := C.sqlite3_deserialize(c.db, zSchema, tmpBuf, C.sqlite3_int64(len(b)),\n\t\tC.sqlite3_int64(len(b)), C.SQLITE_DESERIALIZE_FREEONCLOSE)\n\tif rc != C.SQLITE_OK {\n\t\treturn fmt.Errorf(\"deserialize failed with return %v\", rc)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_serialize_omit.go",
    "content": "//go:build libsqlite3 && !sqlite_serialize\n// +build libsqlite3,!sqlite_serialize\n\npackage sqlite3\n\nimport (\n\t\"errors\"\n)\n\n/*\n#cgo CFLAGS: -DSQLITE_OMIT_DESERIALIZE\n*/\nimport \"C\"\n\nfunc (c *SQLiteConn) Serialize(schema string) ([]byte, error) {\n\treturn nil, errors.New(\"sqlite3: Serialize requires the sqlite_serialize build tag when using the libsqlite3 build tag\")\n}\n\nfunc (c *SQLiteConn) Deserialize(b []byte, schema string) error {\n\treturn errors.New(\"sqlite3: Deserialize requires the sqlite_serialize build tag when using the libsqlite3 build tag\")\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_stat4.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_stat4\n// +build sqlite_stat4\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_STAT4\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c",
    "content": "// Copyright (C) 2018 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY\n#include <stdio.h>\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n\nextern int unlock_notify_wait(sqlite3 *db);\n\nint\n_sqlite3_step_blocking(sqlite3_stmt *stmt)\n{\n  int rv;\n  sqlite3* db;\n\n  db = sqlite3_db_handle(stmt);\n  for (;;) {\n    rv = sqlite3_step(stmt);\n    if (rv != SQLITE_LOCKED) {\n      break;\n    }\n    if (sqlite3_extended_errcode(db) != SQLITE_LOCKED_SHAREDCACHE) {\n      break;\n    }\n    rv = unlock_notify_wait(db);\n    if (rv != SQLITE_OK) {\n      break;\n    }\n    sqlite3_reset(stmt);\n  }\n\n  return rv;\n}\n\nint\n_sqlite3_step_row_blocking(sqlite3_stmt* stmt, long long* rowid, long long* changes)\n{\n  int rv;\n  sqlite3* db;\n\n  db = sqlite3_db_handle(stmt);\n  for (;;) {\n    rv = sqlite3_step(stmt);\n    if (rv!=SQLITE_LOCKED) {\n      break;\n    }\n    if (sqlite3_extended_errcode(db) != SQLITE_LOCKED_SHAREDCACHE) {\n      break;\n    }\n    rv = unlock_notify_wait(db);\n    if (rv != SQLITE_OK) {\n      break;\n    }\n    sqlite3_reset(stmt);\n  }\n\n  *rowid = (long long) sqlite3_last_insert_rowid(db);\n  *changes = (long long) sqlite3_changes(db);\n  return rv;\n}\n\nint\n_sqlite3_prepare_v2_blocking(sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail)\n{\n  int rv;\n\n  for (;;) {\n    rv = sqlite3_prepare_v2(db, zSql, nBytes, ppStmt, pzTail);\n    if (rv!=SQLITE_LOCKED) {\n      break;\n    }\n    if (sqlite3_extended_errcode(db) != SQLITE_LOCKED_SHAREDCACHE) {\n      break;\n    }\n    rv = unlock_notify_wait(db);\n    if (rv != SQLITE_OK) {\n      break;\n    }\n  }\n\n  return rv;\n}\n#endif\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build cgo && sqlite_unlock_notify\n// +build cgo,sqlite_unlock_notify\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_ENABLE_UNLOCK_NOTIFY\n\n#include <stdlib.h>\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n\nextern void unlock_notify_callback(void *arg, int argc);\n*/\nimport \"C\"\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sync\"\n\t\"unsafe\"\n)\n\ntype unlock_notify_table struct {\n\tsync.Mutex\n\tseqnum uint\n\ttable  map[uint]chan struct{}\n}\n\nvar unt unlock_notify_table = unlock_notify_table{table: make(map[uint]chan struct{})}\n\nfunc (t *unlock_notify_table) add(c chan struct{}) uint {\n\tt.Lock()\n\tdefer t.Unlock()\n\th := t.seqnum\n\tt.table[h] = c\n\tt.seqnum++\n\treturn h\n}\n\nfunc (t *unlock_notify_table) remove(h uint) {\n\tt.Lock()\n\tdefer t.Unlock()\n\tdelete(t.table, h)\n}\n\nfunc (t *unlock_notify_table) get(h uint) chan struct{} {\n\tt.Lock()\n\tdefer t.Unlock()\n\tc, ok := t.table[h]\n\tif !ok {\n\t\tpanic(fmt.Sprintf(\"Non-existent key for unlcok-notify channel: %d\", h))\n\t}\n\treturn c\n}\n\n//export unlock_notify_callback\nfunc unlock_notify_callback(argv unsafe.Pointer, argc C.int) {\n\tfor i := 0; i < int(argc); i++ {\n\t\tparg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.uint)(nil))]*[1]uint)(argv))[i])\n\t\targ := *parg\n\t\th := arg[0]\n\t\tc := unt.get(h)\n\t\tc <- struct{}{}\n\t}\n}\n\n//export unlock_notify_wait\nfunc unlock_notify_wait(db *C.sqlite3) C.int {\n\t// It has to be a bufferred channel to not block in sqlite_unlock_notify\n\t// as sqlite_unlock_notify could invoke the callback before it returns.\n\tc := make(chan struct{}, 1)\n\tdefer close(c)\n\n\th := unt.add(c)\n\tdefer unt.remove(h)\n\n\tpargv := C.malloc(C.sizeof_uint)\n\tdefer C.free(pargv)\n\n\targv := (*[1]uint)(pargv)\n\targv[0] = h\n\tif rv := C.sqlite3_unlock_notify(db, (*[0]byte)(C.unlock_notify_callback), unsafe.Pointer(pargv)); rv != C.SQLITE_OK {\n\t\treturn rv\n\t}\n\n\t<-c\n\n\treturn C.SQLITE_OK\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go",
    "content": "// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_userauth\n// +build sqlite_userauth\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_USER_AUTHENTICATION\n#cgo LDFLAGS: -lm\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n*/\nimport \"C\"\nimport (\n\t\"errors\"\n)\n\nconst (\n\tSQLITE_AUTH = C.SQLITE_AUTH\n)\n\nvar (\n\tErrUnauthorized              = errors.New(\"SQLITE_AUTH: Unauthorized\")\n\tErrAdminRequired             = errors.New(\"SQLITE_AUTH: Unauthorized; Admin Privileges Required\")\n\terrUserAuthNoLongerSupported = errors.New(\"sqlite3: the sqlite_userauth tag is no longer supported as the userauth extension is no longer supported by the SQLite authors, see https://github.com/mattn/go-sqlite3/issues/1341\")\n)\n\n// Authenticate will perform an authentication of the provided username\n// and password against the database.\n//\n// If a database contains the SQLITE_USER table, then the\n// call to Authenticate must be invoked with an\n// appropriate username and password prior to enable read and write\n// access to the database.\n//\n// Return SQLITE_OK on success or SQLITE_ERROR if the username/password\n// combination is incorrect or unknown.\n//\n// If the SQLITE_USER table is not present in the database file, then\n// this interface is a harmless no-op returning SQLITE_OK.\nfunc (c *SQLiteConn) Authenticate(username, password string) error {\n\treturn errUserAuthNoLongerSupported\n}\n\n// authenticate provides the actual authentication to SQLite.\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authenticate(username, password string) int {\n\treturn 1\n}\n\n// AuthUserAdd can be used (by an admin user only)\n// to create a new user. When called on a no-authentication-required\n// database, this routine converts the database into an authentication-\n// required database, automatically makes the added user an\n// administrator, and logs in the current connection as that user.\n// The AuthUserAdd only works for the \"main\" database, not\n// for any ATTACH-ed databases. Any call to AuthUserAdd by a\n// non-admin user results in an error.\nfunc (c *SQLiteConn) AuthUserAdd(username, password string, admin bool) error {\n\treturn errUserAuthNoLongerSupported\n}\n\n// authUserAdd enables the User Authentication if not enabled.\n// Otherwise it will add a user.\n//\n// When user authentication is already enabled then this function\n// can only be called by an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserAdd(username, password string, admin int) int {\n\treturn 1\n}\n\n// AuthUserChange can be used to change a users\n// login credentials or admin privilege.  Any user can change their own\n// login credentials. Only an admin user can change another users login\n// credentials or admin privilege setting. No user may change their own\n// admin privilege setting.\nfunc (c *SQLiteConn) AuthUserChange(username, password string, admin bool) error {\n\treturn errUserAuthNoLongerSupported\n}\n\n// authUserChange allows to modify a user.\n// Users can change their own password.\n//\n// Only admins can change passwords for other users\n// and modify the admin flag.\n//\n// The admin flag of the current logged in user cannot be changed.\n// THis ensures that their is always an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserChange(username, password string, admin int) int {\n\treturn 1\n}\n\n// AuthUserDelete can be used (by an admin user only)\n// to delete a user. The currently logged-in user cannot be deleted,\n// which guarantees that there is always an admin user and hence that\n// the database cannot be converted into a no-authentication-required\n// database.\nfunc (c *SQLiteConn) AuthUserDelete(username string) error {\n\treturn errUserAuthNoLongerSupported\n}\n\n// authUserDelete can be used to delete a user.\n//\n// This function can only be executed by an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserDelete(username string) int {\n\treturn 1\n}\n\n// AuthEnabled checks if the database is protected by user authentication\nfunc (c *SQLiteConn) AuthEnabled() (exists bool) {\n\treturn false\n}\n\n// authEnabled perform the actual check for user authentication.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\t0 - Disabled\n//\t 1 - Enabled\nfunc (c *SQLiteConn) authEnabled() int {\n\treturn 0\n}\n\n// EOF\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth_omit.go",
    "content": "// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !sqlite_userauth\n// +build !sqlite_userauth\n\npackage sqlite3\n\nimport (\n\t\"C\"\n)\n\n// Authenticate will perform an authentication of the provided username\n// and password against the database.\n//\n// If a database contains the SQLITE_USER table, then the\n// call to Authenticate must be invoked with an\n// appropriate username and password prior to enable read and write\n// access to the database.\n//\n// Return SQLITE_OK on success or SQLITE_ERROR if the username/password\n// combination is incorrect or unknown.\n//\n// If the SQLITE_USER table is not present in the database file, then\n// this interface is a harmless no-op returnning SQLITE_OK.\nfunc (c *SQLiteConn) Authenticate(username, password string) error {\n\t// NOOP\n\treturn nil\n}\n\n// authenticate provides the actual authentication to SQLite.\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authenticate(username, password string) int {\n\t// NOOP\n\treturn 0\n}\n\n// AuthUserAdd can be used (by an admin user only)\n// to create a new user.  When called on a no-authentication-required\n// database, this routine converts the database into an authentication-\n// required database, automatically makes the added user an\n// administrator, and logs in the current connection as that user.\n// The AuthUserAdd only works for the \"main\" database, not\n// for any ATTACH-ed databases. Any call to AuthUserAdd by a\n// non-admin user results in an error.\nfunc (c *SQLiteConn) AuthUserAdd(username, password string, admin bool) error {\n\t// NOOP\n\treturn nil\n}\n\n// authUserAdd enables the User Authentication if not enabled.\n// Otherwise it will add a user.\n//\n// When user authentication is already enabled then this function\n// can only be called by an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserAdd(username, password string, admin int) int {\n\t// NOOP\n\treturn 0\n}\n\n// AuthUserChange can be used to change a users\n// login credentials or admin privilege.  Any user can change their own\n// login credentials.  Only an admin user can change another users login\n// credentials or admin privilege setting.  No user may change their own\n// admin privilege setting.\nfunc (c *SQLiteConn) AuthUserChange(username, password string, admin bool) error {\n\t// NOOP\n\treturn nil\n}\n\n// authUserChange allows to modify a user.\n// Users can change their own password.\n//\n// Only admins can change passwords for other users\n// and modify the admin flag.\n//\n// The admin flag of the current logged in user cannot be changed.\n// THis ensures that their is always an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserChange(username, password string, admin int) int {\n\t// NOOP\n\treturn 0\n}\n\n// AuthUserDelete can be used (by an admin user only)\n// to delete a user.  The currently logged-in user cannot be deleted,\n// which guarantees that there is always an admin user and hence that\n// the database cannot be converted into a no-authentication-required\n// database.\nfunc (c *SQLiteConn) AuthUserDelete(username string) error {\n\t// NOOP\n\treturn nil\n}\n\n// authUserDelete can be used to delete a user.\n//\n// This function can only be executed by an admin.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\tC.SQLITE_OK (0)\n//\t\tC.SQLITE_ERROR (1)\n//\t C.SQLITE_AUTH (23)\nfunc (c *SQLiteConn) authUserDelete(username string) int {\n\t// NOOP\n\treturn 0\n}\n\n// AuthEnabled checks if the database is protected by user authentication\nfunc (c *SQLiteConn) AuthEnabled() (exists bool) {\n\t// NOOP\n\treturn false\n}\n\n// authEnabled perform the actual check for user authentication.\n//\n// This is not exported for usage in Go.\n// It is however exported for usage within SQL by the user.\n//\n// Returns:\n//\n//\t\t0 - Disabled\n//\t 1 - Enabled\nfunc (c *SQLiteConn) authEnabled() int {\n\t// NOOP\n\treturn 0\n}\n\n// EOF\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_full.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_vacuum_full\n// +build sqlite_vacuum_full\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_DEFAULT_AUTOVACUUM=1\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_incr.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_vacuum_incr\n// +build sqlite_vacuum_incr\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -DSQLITE_DEFAULT_AUTOVACUUM=2\n#cgo LDFLAGS: -lm\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_vtable || vtable\n// +build sqlite_vtable vtable\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -std=gnu99\n#cgo CFLAGS: -DSQLITE_ENABLE_RTREE\n#cgo CFLAGS: -DSQLITE_THREADSAFE\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS3\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS3_PARENTHESIS\n#cgo CFLAGS: -DSQLITE_ENABLE_FTS4_UNICODE61\n#cgo CFLAGS: -DSQLITE_TRACE_SIZE_LIMIT=15\n#cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA=1\n#cgo CFLAGS: -Wno-deprecated-declarations\n\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n#include <stdint.h>\n#include <memory.h>\n\nstatic inline char *_sqlite3_mprintf(char *zFormat, char *arg) {\n  return sqlite3_mprintf(zFormat, arg);\n}\n\ntypedef struct goVTab goVTab;\n\nstruct goVTab {\n\tsqlite3_vtab base;\n\tvoid *vTab;\n};\n\nuintptr_t goMInit(void *db, void *pAux, int argc, char **argv, char **pzErr, int isCreate);\n\nstatic int cXInit(sqlite3 *db, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char **pzErr, int isCreate) {\n\tvoid *vTab = (void *)goMInit(db, pAux, argc, (char**)argv, pzErr, isCreate);\n\tif (!vTab || *pzErr) {\n\t\treturn SQLITE_ERROR;\n\t}\n\tgoVTab *pvTab = (goVTab *)sqlite3_malloc(sizeof(goVTab));\n\tif (!pvTab) {\n\t\t*pzErr = sqlite3_mprintf(\"%s\", \"Out of memory\");\n\t\treturn SQLITE_NOMEM;\n\t}\n\tmemset(pvTab, 0, sizeof(goVTab));\n\tpvTab->vTab = vTab;\n\n\t*ppVTab = (sqlite3_vtab *)pvTab;\n\t*pzErr = 0;\n\treturn SQLITE_OK;\n}\n\nstatic inline int cXCreate(sqlite3 *db, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char **pzErr) {\n\treturn cXInit(db, pAux, argc, argv, ppVTab, pzErr, 1);\n}\nstatic inline int cXConnect(sqlite3 *db, void *pAux, int argc, const char *const*argv, sqlite3_vtab **ppVTab, char **pzErr) {\n\treturn cXInit(db, pAux, argc, argv, ppVTab, pzErr, 0);\n}\n\nchar* goVBestIndex(void *pVTab, void *icp);\n\nstatic inline int cXBestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *info) {\n\tchar *pzErr = goVBestIndex(((goVTab*)pVTab)->vTab, info);\n\tif (pzErr) {\n\t\tif (pVTab->zErrMsg)\n\t\t\tsqlite3_free(pVTab->zErrMsg);\n\t\tpVTab->zErrMsg = pzErr;\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nchar* goVRelease(void *pVTab, int isDestroy);\n\nstatic int cXRelease(sqlite3_vtab *pVTab, int isDestroy) {\n\tchar *pzErr = goVRelease(((goVTab*)pVTab)->vTab, isDestroy);\n\tif (pzErr) {\n\t\tif (pVTab->zErrMsg)\n\t\t\tsqlite3_free(pVTab->zErrMsg);\n\t\tpVTab->zErrMsg = pzErr;\n\t\treturn SQLITE_ERROR;\n\t}\n\tif (pVTab->zErrMsg)\n\t\tsqlite3_free(pVTab->zErrMsg);\n\tsqlite3_free(pVTab);\n\treturn SQLITE_OK;\n}\n\nstatic inline int cXDisconnect(sqlite3_vtab *pVTab) {\n\treturn cXRelease(pVTab, 0);\n}\nstatic inline int cXDestroy(sqlite3_vtab *pVTab) {\n\treturn cXRelease(pVTab, 1);\n}\n\ntypedef struct goVTabCursor goVTabCursor;\n\nstruct goVTabCursor {\n\tsqlite3_vtab_cursor base;\n\tvoid *vTabCursor;\n};\n\nuintptr_t goVOpen(void *pVTab, char **pzErr);\n\nstatic int cXOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor) {\n\tvoid *vTabCursor = (void *)goVOpen(((goVTab*)pVTab)->vTab, &(pVTab->zErrMsg));\n\tgoVTabCursor *pCursor = (goVTabCursor *)sqlite3_malloc(sizeof(goVTabCursor));\n\tif (!pCursor) {\n\t\treturn SQLITE_NOMEM;\n\t}\n\tmemset(pCursor, 0, sizeof(goVTabCursor));\n\tpCursor->vTabCursor = vTabCursor;\n\t*ppCursor = (sqlite3_vtab_cursor *)pCursor;\n\treturn SQLITE_OK;\n}\n\nstatic int setErrMsg(sqlite3_vtab_cursor *pCursor, char *pzErr) {\n\tif (pCursor->pVtab->zErrMsg)\n\t\tsqlite3_free(pCursor->pVtab->zErrMsg);\n\tpCursor->pVtab->zErrMsg = pzErr;\n\treturn SQLITE_ERROR;\n}\n\nchar* goVClose(void *pCursor);\n\nstatic int cXClose(sqlite3_vtab_cursor *pCursor) {\n\tchar *pzErr = goVClose(((goVTabCursor*)pCursor)->vTabCursor);\n\tif (pzErr) {\n\t\treturn setErrMsg(pCursor, pzErr);\n\t}\n\tsqlite3_free(pCursor);\n\treturn SQLITE_OK;\n}\n\nchar* goVFilter(void *pCursor, int idxNum, char* idxName, int argc, sqlite3_value **argv);\n\nstatic int cXFilter(sqlite3_vtab_cursor *pCursor, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) {\n\tchar *pzErr = goVFilter(((goVTabCursor*)pCursor)->vTabCursor, idxNum, (char*)idxStr, argc, argv);\n\tif (pzErr) {\n\t\treturn setErrMsg(pCursor, pzErr);\n\t}\n\treturn SQLITE_OK;\n}\n\nchar* goVNext(void *pCursor);\n\nstatic int cXNext(sqlite3_vtab_cursor *pCursor) {\n\tchar *pzErr = goVNext(((goVTabCursor*)pCursor)->vTabCursor);\n\tif (pzErr) {\n\t\treturn setErrMsg(pCursor, pzErr);\n\t}\n\treturn SQLITE_OK;\n}\n\nint goVEof(void *pCursor);\n\nstatic inline int cXEof(sqlite3_vtab_cursor *pCursor) {\n\treturn goVEof(((goVTabCursor*)pCursor)->vTabCursor);\n}\n\nchar* goVColumn(void *pCursor, void *cp, int col);\n\nstatic int cXColumn(sqlite3_vtab_cursor *pCursor, sqlite3_context *ctx, int i) {\n\tchar *pzErr = goVColumn(((goVTabCursor*)pCursor)->vTabCursor, ctx, i);\n\tif (pzErr) {\n\t\treturn setErrMsg(pCursor, pzErr);\n\t}\n\treturn SQLITE_OK;\n}\n\nchar* goVRowid(void *pCursor, sqlite3_int64 *pRowid);\n\nstatic int cXRowid(sqlite3_vtab_cursor *pCursor, sqlite3_int64 *pRowid) {\n\tchar *pzErr = goVRowid(((goVTabCursor*)pCursor)->vTabCursor, pRowid);\n\tif (pzErr) {\n\t\treturn setErrMsg(pCursor, pzErr);\n\t}\n\treturn SQLITE_OK;\n}\n\nchar* goVUpdate(void *pVTab, int argc, sqlite3_value **argv, sqlite3_int64 *pRowid);\n\nstatic int cXUpdate(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, sqlite3_int64 *pRowid) {\n\tchar *pzErr = goVUpdate(((goVTab*)pVTab)->vTab, argc, argv, pRowid);\n\tif (pzErr) {\n\t\tif (pVTab->zErrMsg)\n\t\t\tsqlite3_free(pVTab->zErrMsg);\n\t\tpVTab->zErrMsg = pzErr;\n\t\treturn SQLITE_ERROR;\n\t}\n\treturn SQLITE_OK;\n}\n\nstatic sqlite3_module goModule = {\n\t0,                       // iVersion\n\tcXCreate,                // xCreate - create a table\n\tcXConnect,               // xConnect - connect to an existing table\n\tcXBestIndex,             // xBestIndex - Determine search strategy\n\tcXDisconnect,            // xDisconnect - Disconnect from a table\n\tcXDestroy,               // xDestroy - Drop a table\n\tcXOpen,                  // xOpen - open a cursor\n\tcXClose,                 // xClose - close a cursor\n\tcXFilter,                // xFilter - configure scan constraints\n\tcXNext,                  // xNext - advance a cursor\n\tcXEof,                   // xEof\n\tcXColumn,                // xColumn - read data\n\tcXRowid,                 // xRowid - read data\n\tcXUpdate,                // xUpdate - write data\n// Not implemented\n\t0,                       // xBegin - begin transaction\n\t0,                       // xSync - sync transaction\n\t0,                       // xCommit - commit transaction\n\t0,                       // xRollback - rollback transaction\n\t0,                       // xFindFunction - function overloading\n\t0,                       // xRename - rename the table\n\t0,                       // xSavepoint\n\t0,                       // xRelease\n\t0\t                     // xRollbackTo\n};\n\n// See https://sqlite.org/vtab.html#eponymous_only_virtual_tables\nstatic sqlite3_module goModuleEponymousOnly = {\n\t0,                       // iVersion\n\t0,                       // xCreate - create a table, which here is null\n\tcXConnect,               // xConnect - connect to an existing table\n\tcXBestIndex,             // xBestIndex - Determine search strategy\n\tcXDisconnect,            // xDisconnect - Disconnect from a table\n\tcXDestroy,               // xDestroy - Drop a table\n\tcXOpen,                  // xOpen - open a cursor\n\tcXClose,                 // xClose - close a cursor\n\tcXFilter,                // xFilter - configure scan constraints\n\tcXNext,                  // xNext - advance a cursor\n\tcXEof,                   // xEof\n\tcXColumn,                // xColumn - read data\n\tcXRowid,                 // xRowid - read data\n\tcXUpdate,                // xUpdate - write data\n// Not implemented\n\t0,                       // xBegin - begin transaction\n\t0,                       // xSync - sync transaction\n\t0,                       // xCommit - commit transaction\n\t0,                       // xRollback - rollback transaction\n\t0,                       // xFindFunction - function overloading\n\t0,                       // xRename - rename the table\n\t0,                       // xSavepoint\n\t0,                       // xRelease\n\t0\t                     // xRollbackTo\n};\n\nvoid goMDestroy(void*);\n\nstatic int _sqlite3_create_module(sqlite3 *db, const char *zName, uintptr_t pClientData) {\n  return sqlite3_create_module_v2(db, zName, &goModule, (void*) pClientData, goMDestroy);\n}\n\nstatic int _sqlite3_create_module_eponymous_only(sqlite3 *db, const char *zName, uintptr_t pClientData) {\n  return sqlite3_create_module_v2(db, zName, &goModuleEponymousOnly, (void*) pClientData, goMDestroy);\n}\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"unsafe\"\n)\n\ntype sqliteModule struct {\n\tc      *SQLiteConn\n\tname   string\n\tmodule Module\n}\n\ntype sqliteVTab struct {\n\tmodule *sqliteModule\n\tvTab   VTab\n}\n\ntype sqliteVTabCursor struct {\n\tvTab       *sqliteVTab\n\tvTabCursor VTabCursor\n}\n\n// Op is type of operations.\ntype Op uint8\n\n// Op mean identity of operations.\nconst (\n\tOpEQ         Op = 2\n\tOpGT            = 4\n\tOpLE            = 8\n\tOpLT            = 16\n\tOpGE            = 32\n\tOpMATCH         = 64\n\tOpLIKE          = 65 /* 3.10.0 and later only */\n\tOpGLOB          = 66 /* 3.10.0 and later only */\n\tOpREGEXP        = 67 /* 3.10.0 and later only */\n\tOpScanUnique    = 1  /* Scan visits at most 1 row */\n)\n\n// InfoConstraint give information of constraint.\ntype InfoConstraint struct {\n\tColumn int\n\tOp     Op\n\tUsable bool\n}\n\n// InfoOrderBy give information of order-by.\ntype InfoOrderBy struct {\n\tColumn int\n\tDesc   bool\n}\n\nfunc constraints(info *C.sqlite3_index_info) []InfoConstraint {\n\tslice := *(*[]C.struct_sqlite3_index_constraint)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(info.aConstraint)),\n\t\tLen:  int(info.nConstraint),\n\t\tCap:  int(info.nConstraint),\n\t}))\n\n\tcst := make([]InfoConstraint, 0, len(slice))\n\tfor _, c := range slice {\n\t\tvar usable bool\n\t\tif c.usable > 0 {\n\t\t\tusable = true\n\t\t}\n\t\tcst = append(cst, InfoConstraint{\n\t\t\tColumn: int(c.iColumn),\n\t\t\tOp:     Op(c.op),\n\t\t\tUsable: usable,\n\t\t})\n\t}\n\treturn cst\n}\n\nfunc orderBys(info *C.sqlite3_index_info) []InfoOrderBy {\n\tslice := *(*[]C.struct_sqlite3_index_orderby)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(info.aOrderBy)),\n\t\tLen:  int(info.nOrderBy),\n\t\tCap:  int(info.nOrderBy),\n\t}))\n\n\tob := make([]InfoOrderBy, 0, len(slice))\n\tfor _, c := range slice {\n\t\tvar desc bool\n\t\tif c.desc > 0 {\n\t\t\tdesc = true\n\t\t}\n\t\tob = append(ob, InfoOrderBy{\n\t\t\tColumn: int(c.iColumn),\n\t\t\tDesc:   desc,\n\t\t})\n\t}\n\treturn ob\n}\n\n// IndexResult is a Go struct representation of what eventually ends up in the\n// output fields for `sqlite3_index_info`\n// See: https://www.sqlite.org/c3ref/index_info.html\ntype IndexResult struct {\n\tUsed           []bool // aConstraintUsage\n\tIdxNum         int\n\tIdxStr         string\n\tAlreadyOrdered bool // orderByConsumed\n\tEstimatedCost  float64\n\tEstimatedRows  float64\n}\n\n// mPrintf is a utility wrapper around sqlite3_mprintf\nfunc mPrintf(format, arg string) *C.char {\n\tcf := C.CString(format)\n\tdefer C.free(unsafe.Pointer(cf))\n\tca := C.CString(arg)\n\tdefer C.free(unsafe.Pointer(ca))\n\treturn C._sqlite3_mprintf(cf, ca)\n}\n\n//export goMInit\nfunc goMInit(db, pClientData unsafe.Pointer, argc C.int, argv **C.char, pzErr **C.char, isCreate C.int) C.uintptr_t {\n\tm := lookupHandle(pClientData).(*sqliteModule)\n\tif m.c.db != (*C.sqlite3)(db) {\n\t\t*pzErr = mPrintf(\"%s\", \"Inconsistent db handles\")\n\t\treturn 0\n\t}\n\targs := make([]string, argc)\n\tvar A []*C.char\n\tslice := reflect.SliceHeader{Data: uintptr(unsafe.Pointer(argv)), Len: int(argc), Cap: int(argc)}\n\ta := reflect.NewAt(reflect.TypeOf(A), unsafe.Pointer(&slice)).Elem().Interface()\n\tfor i, s := range a.([]*C.char) {\n\t\targs[i] = C.GoString(s)\n\t}\n\tvar vTab VTab\n\tvar err error\n\tif isCreate == 1 {\n\t\tvTab, err = m.module.Create(m.c, args)\n\t} else {\n\t\tvTab, err = m.module.Connect(m.c, args)\n\t}\n\n\tif err != nil {\n\t\t*pzErr = mPrintf(\"%s\", err.Error())\n\t\treturn 0\n\t}\n\tvt := sqliteVTab{m, vTab}\n\t*pzErr = nil\n\treturn C.uintptr_t(uintptr(newHandle(m.c, &vt)))\n}\n\n//export goVRelease\nfunc goVRelease(pVTab unsafe.Pointer, isDestroy C.int) *C.char {\n\tvt := lookupHandle(pVTab).(*sqliteVTab)\n\tvar err error\n\tif isDestroy == 1 {\n\t\terr = vt.vTab.Destroy()\n\t} else {\n\t\terr = vt.vTab.Disconnect()\n\t}\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\treturn nil\n}\n\n//export goVOpen\nfunc goVOpen(pVTab unsafe.Pointer, pzErr **C.char) C.uintptr_t {\n\tvt := lookupHandle(pVTab).(*sqliteVTab)\n\tvTabCursor, err := vt.vTab.Open()\n\tif err != nil {\n\t\t*pzErr = mPrintf(\"%s\", err.Error())\n\t\treturn 0\n\t}\n\tvtc := sqliteVTabCursor{vt, vTabCursor}\n\t*pzErr = nil\n\treturn C.uintptr_t(uintptr(newHandle(vt.module.c, &vtc)))\n}\n\n//export goVBestIndex\nfunc goVBestIndex(pVTab unsafe.Pointer, icp unsafe.Pointer) *C.char {\n\tvt := lookupHandle(pVTab).(*sqliteVTab)\n\tinfo := (*C.sqlite3_index_info)(icp)\n\tcsts := constraints(info)\n\tres, err := vt.vTab.BestIndex(csts, orderBys(info))\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\tif len(res.Used) != len(csts) {\n\t\treturn mPrintf(\"Result.Used != expected value\", \"\")\n\t}\n\n\t// Get a pointer to constraint_usage struct so we can update in place.\n\n\tslice := *(*[]C.struct_sqlite3_index_constraint_usage)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(info.aConstraintUsage)),\n\t\tLen:  int(info.nConstraint),\n\t\tCap:  int(info.nConstraint),\n\t}))\n\tindex := 1\n\tfor i := range slice {\n\t\tif res.Used[i] {\n\t\t\tslice[i].argvIndex = C.int(index)\n\t\t\tslice[i].omit = C.uchar(1)\n\t\t\tindex++\n\t\t}\n\t}\n\n\tinfo.idxNum = C.int(res.IdxNum)\n\tinfo.idxStr = (*C.char)(C.sqlite3_malloc(C.int(len(res.IdxStr) + 1)))\n\tif info.idxStr == nil {\n\t\t// C.malloc and C.CString ordinarily do this for you. See https://golang.org/cmd/cgo/\n\t\tpanic(\"out of memory\")\n\t}\n\tinfo.needToFreeIdxStr = C.int(1)\n\n\tidxStr := *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{\n\t\tData: uintptr(unsafe.Pointer(info.idxStr)),\n\t\tLen:  len(res.IdxStr) + 1,\n\t\tCap:  len(res.IdxStr) + 1,\n\t}))\n\tcopy(idxStr, res.IdxStr)\n\tidxStr[len(idxStr)-1] = 0 // null-terminated string\n\n\tif res.AlreadyOrdered {\n\t\tinfo.orderByConsumed = C.int(1)\n\t}\n\tinfo.estimatedCost = C.double(res.EstimatedCost)\n\tinfo.estimatedRows = C.sqlite3_int64(res.EstimatedRows)\n\n\treturn nil\n}\n\n//export goVClose\nfunc goVClose(pCursor unsafe.Pointer) *C.char {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\terr := vtc.vTabCursor.Close()\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\treturn nil\n}\n\n//export goMDestroy\nfunc goMDestroy(pClientData unsafe.Pointer) {\n\tm := lookupHandle(pClientData).(*sqliteModule)\n\tm.module.DestroyModule()\n}\n\n//export goVFilter\nfunc goVFilter(pCursor unsafe.Pointer, idxNum C.int, idxName *C.char, argc C.int, argv **C.sqlite3_value) *C.char {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\targs := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]\n\tvals := make([]any, 0, argc)\n\tfor _, v := range args {\n\t\tconv, err := callbackArgGeneric(v)\n\t\tif err != nil {\n\t\t\treturn mPrintf(\"%s\", err.Error())\n\t\t}\n\t\tvals = append(vals, conv.Interface())\n\t}\n\terr := vtc.vTabCursor.Filter(int(idxNum), C.GoString(idxName), vals)\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\treturn nil\n}\n\n//export goVNext\nfunc goVNext(pCursor unsafe.Pointer) *C.char {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\terr := vtc.vTabCursor.Next()\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\treturn nil\n}\n\n//export goVEof\nfunc goVEof(pCursor unsafe.Pointer) C.int {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\terr := vtc.vTabCursor.EOF()\n\tif err {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\n//export goVColumn\nfunc goVColumn(pCursor, cp unsafe.Pointer, col C.int) *C.char {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\tc := (*SQLiteContext)(cp)\n\terr := vtc.vTabCursor.Column(c, int(col))\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\treturn nil\n}\n\n//export goVRowid\nfunc goVRowid(pCursor unsafe.Pointer, pRowid *C.sqlite3_int64) *C.char {\n\tvtc := lookupHandle(pCursor).(*sqliteVTabCursor)\n\trowid, err := vtc.vTabCursor.Rowid()\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\t*pRowid = C.sqlite3_int64(rowid)\n\treturn nil\n}\n\n//export goVUpdate\nfunc goVUpdate(pVTab unsafe.Pointer, argc C.int, argv **C.sqlite3_value, pRowid *C.sqlite3_int64) *C.char {\n\tvt := lookupHandle(pVTab).(*sqliteVTab)\n\n\tvar tname string\n\tif n, ok := vt.vTab.(interface {\n\t\tTableName() string\n\t}); ok {\n\t\ttname = n.TableName() + \" \"\n\t}\n\n\terr := fmt.Errorf(\"virtual %s table %sis read-only\", vt.module.name, tname)\n\tif v, ok := vt.vTab.(VTabUpdater); ok {\n\t\t// convert argv\n\t\targs := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]\n\t\tvals := make([]any, 0, argc)\n\t\tfor _, v := range args {\n\t\t\tconv, err := callbackArgGeneric(v)\n\t\t\tif err != nil {\n\t\t\t\treturn mPrintf(\"%s\", err.Error())\n\t\t\t}\n\n\t\t\t// work around for SQLITE_NULL\n\t\t\tx := conv.Interface()\n\t\t\tif z, ok := x.([]byte); ok && z == nil {\n\t\t\t\tx = nil\n\t\t\t}\n\n\t\t\tvals = append(vals, x)\n\t\t}\n\n\t\tswitch {\n\t\tcase argc == 1:\n\t\t\terr = v.Delete(vals[0])\n\n\t\tcase argc > 1 && vals[0] == nil:\n\t\t\tvar id int64\n\t\t\tid, err = v.Insert(vals[1], vals[2:])\n\t\t\tif err == nil {\n\t\t\t\t*pRowid = C.sqlite3_int64(id)\n\t\t\t}\n\n\t\tcase argc > 1:\n\t\t\terr = v.Update(vals[1], vals[2:])\n\t\t}\n\t}\n\n\tif err != nil {\n\t\treturn mPrintf(\"%s\", err.Error())\n\t}\n\n\treturn nil\n}\n\n// Module is a \"virtual table module\", it defines the implementation of a\n// virtual tables. See: http://sqlite.org/c3ref/module.html\ntype Module interface {\n\t// http://sqlite.org/vtab.html#xcreate\n\tCreate(c *SQLiteConn, args []string) (VTab, error)\n\t// http://sqlite.org/vtab.html#xconnect\n\tConnect(c *SQLiteConn, args []string) (VTab, error)\n\t// http://sqlite.org/c3ref/create_module.html\n\tDestroyModule()\n}\n\n// EponymousOnlyModule is a \"virtual table module\" (as above), but\n// for defining \"eponymous only\" virtual tables See: https://sqlite.org/vtab.html#eponymous_only_virtual_tables\ntype EponymousOnlyModule interface {\n\tModule\n\tEponymousOnlyModule()\n}\n\n// VTab describes a particular instance of the virtual table.\n// See: http://sqlite.org/c3ref/vtab.html\ntype VTab interface {\n\t// http://sqlite.org/vtab.html#xbestindex\n\tBestIndex([]InfoConstraint, []InfoOrderBy) (*IndexResult, error)\n\t// http://sqlite.org/vtab.html#xdisconnect\n\tDisconnect() error\n\t// http://sqlite.org/vtab.html#sqlite3_module.xDestroy\n\tDestroy() error\n\t// http://sqlite.org/vtab.html#xopen\n\tOpen() (VTabCursor, error)\n}\n\n// VTabUpdater is a type that allows a VTab to be inserted, updated, or\n// deleted.\n// See: https://sqlite.org/vtab.html#xupdate\ntype VTabUpdater interface {\n\tDelete(any) error\n\tInsert(any, []any) (int64, error)\n\tUpdate(any, []any) error\n}\n\n// VTabCursor describes cursors that point into the virtual table and are used\n// to loop through the virtual table. See: http://sqlite.org/c3ref/vtab_cursor.html\ntype VTabCursor interface {\n\t// http://sqlite.org/vtab.html#xclose\n\tClose() error\n\t// http://sqlite.org/vtab.html#xfilter\n\tFilter(idxNum int, idxStr string, vals []any) error\n\t// http://sqlite.org/vtab.html#xnext\n\tNext() error\n\t// http://sqlite.org/vtab.html#xeof\n\tEOF() bool\n\t// http://sqlite.org/vtab.html#xcolumn\n\tColumn(c *SQLiteContext, col int) error\n\t// http://sqlite.org/vtab.html#xrowid\n\tRowid() (int64, error)\n}\n\n// DeclareVTab declares the Schema of a virtual table.\n// See: http://sqlite.org/c3ref/declare_vtab.html\nfunc (c *SQLiteConn) DeclareVTab(sql string) error {\n\tzSQL := C.CString(sql)\n\tdefer C.free(unsafe.Pointer(zSQL))\n\trv := C.sqlite3_declare_vtab(c.db, zSQL)\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n\n// CreateModule registers a virtual table implementation.\n// See: http://sqlite.org/c3ref/create_module.html\nfunc (c *SQLiteConn) CreateModule(moduleName string, module Module) error {\n\tmname := C.CString(moduleName)\n\tdefer C.free(unsafe.Pointer(mname))\n\tudm := sqliteModule{c, moduleName, module}\n\tswitch module.(type) {\n\tcase EponymousOnlyModule:\n\t\trv := C._sqlite3_create_module_eponymous_only(c.db, mname, C.uintptr_t(uintptr(newHandle(c, &udm))))\n\t\tif rv != C.SQLITE_OK {\n\t\t\treturn c.lastError()\n\t\t}\n\t\treturn nil\n\tcase Module:\n\t\trv := C._sqlite3_create_module(c.db, mname, C.uintptr_t(uintptr(newHandle(c, &udm))))\n\t\tif rv != C.SQLITE_OK {\n\t\t\treturn c.lastError()\n\t\t}\n\t\treturn nil\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_other.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !windows\n// +build !windows\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -I.\n#cgo linux LDFLAGS: -ldl\n#cgo linux,ppc LDFLAGS: -lpthread\n#cgo linux,ppc64 LDFLAGS: -lpthread\n#cgo linux,ppc64le LDFLAGS: -lpthread\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_solaris.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build solaris\n// +build solaris\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -D__EXTENSIONS__=1\n#cgo LDFLAGS: -lc\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_trace.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build sqlite_trace || trace\n// +build sqlite_trace trace\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n#include <stdlib.h>\n\nint traceCallbackTrampoline(unsigned int traceEventCode, void *ctx, void *p, void *x);\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"unsafe\"\n)\n\n// Trace... constants identify the possible events causing callback invocation.\n// Values are same as the corresponding SQLite Trace Event Codes.\nconst (\n\tTraceStmt    = uint32(C.SQLITE_TRACE_STMT)\n\tTraceProfile = uint32(C.SQLITE_TRACE_PROFILE)\n\tTraceRow     = uint32(C.SQLITE_TRACE_ROW)\n\tTraceClose   = uint32(C.SQLITE_TRACE_CLOSE)\n)\n\ntype TraceInfo struct {\n\t// Pack together the shorter fields, to keep the struct smaller.\n\t// On a 64-bit machine there would be padding\n\t// between EventCode and ConnHandle; having AutoCommit here is \"free\":\n\tEventCode  uint32\n\tAutoCommit bool\n\tConnHandle uintptr\n\n\t// Usually filled, unless EventCode = TraceClose = SQLITE_TRACE_CLOSE:\n\t// identifier for a prepared statement:\n\tStmtHandle uintptr\n\n\t// Two strings filled when EventCode = TraceStmt = SQLITE_TRACE_STMT:\n\t// (1) either the unexpanded SQL text of the prepared statement, or\n\t//     an SQL comment that indicates the invocation of a trigger;\n\t// (2) expanded SQL, if requested and if (1) is not an SQL comment.\n\tStmtOrTrigger string\n\tExpandedSQL   string // only if requested (TraceConfig.WantExpandedSQL = true)\n\n\t// filled when EventCode = TraceProfile = SQLITE_TRACE_PROFILE:\n\t// estimated number of nanoseconds that the prepared statement took to run:\n\tRunTimeNanosec int64\n\n\tDBError Error\n}\n\n// TraceUserCallback gives the signature for a trace function\n// provided by the user (Go application programmer).\n// SQLite 3.14 documentation (as of September 2, 2016)\n// for SQL Trace Hook = sqlite3_trace_v2():\n// The integer return value from the callback is currently ignored,\n// though this may change in future releases. Callback implementations\n// should return zero to ensure future compatibility.\ntype TraceUserCallback func(TraceInfo) int\n\ntype TraceConfig struct {\n\tCallback        TraceUserCallback\n\tEventMask       uint32\n\tWantExpandedSQL bool\n}\n\nfunc fillDBError(dbErr *Error, db *C.sqlite3) {\n\t// See SQLiteConn.lastError(), in file 'sqlite3.go' at the time of writing (Sept 5, 2016)\n\tdbErr.Code = ErrNo(C.sqlite3_errcode(db))\n\tdbErr.ExtendedCode = ErrNoExtended(C.sqlite3_extended_errcode(db))\n\tdbErr.err = C.GoString(C.sqlite3_errmsg(db))\n}\n\nfunc fillExpandedSQL(info *TraceInfo, db *C.sqlite3, pStmt unsafe.Pointer) {\n\tif pStmt == nil {\n\t\tpanic(\"No SQLite statement pointer in P arg of trace_v2 callback\")\n\t}\n\n\texpSQLiteCStr := C.sqlite3_expanded_sql((*C.sqlite3_stmt)(pStmt))\n\tdefer C.sqlite3_free(unsafe.Pointer(expSQLiteCStr))\n\tif expSQLiteCStr == nil {\n\t\tfillDBError(&info.DBError, db)\n\t\treturn\n\t}\n\tinfo.ExpandedSQL = C.GoString(expSQLiteCStr)\n}\n\n//export traceCallbackTrampoline\nfunc traceCallbackTrampoline(\n\ttraceEventCode C.uint,\n\t// Parameter named 'C' in SQLite docs = Context given at registration:\n\tctx unsafe.Pointer,\n\t// Parameter named 'P' in SQLite docs (Primary event data?):\n\tp unsafe.Pointer,\n\t// Parameter named 'X' in SQLite docs (eXtra event data?):\n\txValue unsafe.Pointer) C.int {\n\n\teventCode := uint32(traceEventCode)\n\n\tif ctx == nil {\n\t\tpanic(fmt.Sprintf(\"No context (ev 0x%x)\", traceEventCode))\n\t}\n\n\tcontextDB := (*C.sqlite3)(ctx)\n\tconnHandle := uintptr(ctx)\n\n\tvar traceConf TraceConfig\n\tvar found bool\n\tif eventCode == TraceClose {\n\t\t// clean up traceMap: 'pop' means get and delete\n\t\ttraceConf, found = popTraceMapping(connHandle)\n\t} else {\n\t\ttraceConf, found = lookupTraceMapping(connHandle)\n\t}\n\n\tif !found {\n\t\tpanic(fmt.Sprintf(\"Mapping not found for handle 0x%x (ev 0x%x)\",\n\t\t\tconnHandle, eventCode))\n\t}\n\n\tvar info TraceInfo\n\n\tinfo.EventCode = eventCode\n\tinfo.AutoCommit = (int(C.sqlite3_get_autocommit(contextDB)) != 0)\n\tinfo.ConnHandle = connHandle\n\n\tswitch eventCode {\n\tcase TraceStmt:\n\t\tinfo.StmtHandle = uintptr(p)\n\n\t\tvar xStr string\n\t\tif xValue != nil {\n\t\t\txStr = C.GoString((*C.char)(xValue))\n\t\t}\n\t\tinfo.StmtOrTrigger = xStr\n\t\tif !strings.HasPrefix(xStr, \"--\") {\n\t\t\t// Not SQL comment, therefore the current event\n\t\t\t// is not related to a trigger.\n\t\t\t// The user might want to receive the expanded SQL;\n\t\t\t// let's check:\n\t\t\tif traceConf.WantExpandedSQL {\n\t\t\t\tfillExpandedSQL(&info, contextDB, p)\n\t\t\t}\n\t\t}\n\n\tcase TraceProfile:\n\t\tinfo.StmtHandle = uintptr(p)\n\n\t\tif xValue == nil {\n\t\t\tpanic(\"NULL pointer in X arg of trace_v2 callback for SQLITE_TRACE_PROFILE event\")\n\t\t}\n\n\t\tinfo.RunTimeNanosec = *(*int64)(xValue)\n\n\t\t// sample the error //TODO: is it safe? is it useful?\n\t\tfillDBError(&info.DBError, contextDB)\n\n\tcase TraceRow:\n\t\tinfo.StmtHandle = uintptr(p)\n\n\tcase TraceClose:\n\t\thandle := uintptr(p)\n\t\tif handle != info.ConnHandle {\n\t\t\tpanic(fmt.Sprintf(\"Different conn handle 0x%x (expected 0x%x) in SQLITE_TRACE_CLOSE event.\",\n\t\t\t\thandle, info.ConnHandle))\n\t\t}\n\n\tdefault:\n\t\t// Pass unsupported events to the user callback (if configured);\n\t\t// let the user callback decide whether to panic or ignore them.\n\t}\n\n\t// Do not execute user callback when the event was not requested by user!\n\t// Remember that the Close event is always selected when\n\t// registering this callback trampoline with SQLite --- for cleanup.\n\t// In the future there may be more events forced to \"selected\" in SQLite\n\t// for the driver's needs.\n\tif traceConf.EventMask&eventCode == 0 {\n\t\treturn 0\n\t}\n\n\tr := 0\n\tif traceConf.Callback != nil {\n\t\tr = traceConf.Callback(info)\n\t}\n\treturn C.int(r)\n}\n\ntype traceMapEntry struct {\n\tconfig TraceConfig\n}\n\nvar traceMapLock sync.Mutex\nvar traceMap = make(map[uintptr]traceMapEntry)\n\nfunc addTraceMapping(connHandle uintptr, traceConf TraceConfig) {\n\ttraceMapLock.Lock()\n\tdefer traceMapLock.Unlock()\n\n\toldEntryCopy, found := traceMap[connHandle]\n\tif found {\n\t\tpanic(fmt.Sprintf(\"Adding trace config %v: handle 0x%x already registered (%v).\",\n\t\t\ttraceConf, connHandle, oldEntryCopy.config))\n\t}\n\ttraceMap[connHandle] = traceMapEntry{config: traceConf}\n}\n\nfunc lookupTraceMapping(connHandle uintptr) (TraceConfig, bool) {\n\ttraceMapLock.Lock()\n\tdefer traceMapLock.Unlock()\n\n\tentryCopy, found := traceMap[connHandle]\n\treturn entryCopy.config, found\n}\n\n// 'pop' = get and delete from map before returning the value to the caller\nfunc popTraceMapping(connHandle uintptr) (TraceConfig, bool) {\n\ttraceMapLock.Lock()\n\tdefer traceMapLock.Unlock()\n\n\tentryCopy, found := traceMap[connHandle]\n\tif found {\n\t\tdelete(traceMap, connHandle)\n\t}\n\treturn entryCopy.config, found\n}\n\n// SetTrace installs or removes the trace callback for the given database connection.\n// It's not named 'RegisterTrace' because only one callback can be kept and called.\n// Calling SetTrace a second time on same database connection\n// overrides (cancels) any prior callback and all its settings:\n// event mask, etc.\nfunc (c *SQLiteConn) SetTrace(requested *TraceConfig) error {\n\tconnHandle := uintptr(unsafe.Pointer(c.db))\n\n\t_, _ = popTraceMapping(connHandle)\n\n\tif requested == nil {\n\t\t// The traceMap entry was deleted already by popTraceMapping():\n\t\t// can disable all events now, no need to watch for TraceClose.\n\t\terr := c.setSQLiteTrace(0)\n\t\treturn err\n\t}\n\n\treqCopy := *requested\n\n\t// Disable potentially expensive operations\n\t// if their result will not be used. We are doing this\n\t// just in case the caller provided nonsensical input.\n\tif reqCopy.EventMask&TraceStmt == 0 {\n\t\treqCopy.WantExpandedSQL = false\n\t}\n\n\taddTraceMapping(connHandle, reqCopy)\n\n\t// The callback trampoline function does cleanup on Close event,\n\t// regardless of the presence or absence of the user callback.\n\t// Therefore it needs the Close event to be selected:\n\tactualEventMask := uint(reqCopy.EventMask | TraceClose)\n\terr := c.setSQLiteTrace(actualEventMask)\n\treturn err\n}\n\nfunc (c *SQLiteConn) setSQLiteTrace(sqliteEventMask uint) error {\n\trv := C.sqlite3_trace_v2(c.db,\n\t\tC.uint(sqliteEventMask),\n\t\t(*[0]byte)(unsafe.Pointer(C.traceCallbackTrampoline)),\n\t\tunsafe.Pointer(c.db)) // Fourth arg is same as first: we are\n\t// passing the database connection handle as callback context.\n\n\tif rv != C.SQLITE_OK {\n\t\treturn c.lastError()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_type.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\npackage sqlite3\n\n/*\n#ifndef USE_LIBSQLITE3\n#include \"sqlite3-binding.h\"\n#else\n#include <sqlite3.h>\n#endif\n*/\nimport \"C\"\nimport (\n\t\"database/sql\"\n\t\"reflect\"\n\t\"strings\"\n)\n\n// ColumnTypeDatabaseTypeName implement RowsColumnTypeDatabaseTypeName.\nfunc (rc *SQLiteRows) ColumnTypeDatabaseTypeName(i int) string {\n\treturn C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i)))\n}\n\n/*\nfunc (rc *SQLiteRows) ColumnTypeLength(index int) (length int64, ok bool) {\n\treturn 0, false\n}\n\nfunc (rc *SQLiteRows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) {\n\treturn 0, 0, false\n}\n*/\n\n// ColumnTypeNullable implement RowsColumnTypeNullable.\nfunc (rc *SQLiteRows) ColumnTypeNullable(i int) (nullable, ok bool) {\n\treturn true, true\n}\n\n// ColumnTypeScanType implement RowsColumnTypeScanType.\nfunc (rc *SQLiteRows) ColumnTypeScanType(i int) reflect.Type {\n\t//ct := C.sqlite3_column_type(rc.s.s, C.int(i))  // Always returns 5\n\treturn scanType(C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))))\n}\n\nconst (\n\tSQLITE_INTEGER = iota\n\tSQLITE_TEXT\n\tSQLITE_BLOB\n\tSQLITE_REAL\n\tSQLITE_NUMERIC\n\tSQLITE_TIME\n\tSQLITE_BOOL\n\tSQLITE_NULL\n)\n\nfunc scanType(cdt string) reflect.Type {\n\tt := strings.ToUpper(cdt)\n\ti := databaseTypeConvSqlite(t)\n\tswitch i {\n\tcase SQLITE_INTEGER:\n\t\treturn reflect.TypeOf(sql.NullInt64{})\n\tcase SQLITE_TEXT:\n\t\treturn reflect.TypeOf(sql.NullString{})\n\tcase SQLITE_BLOB:\n\t\treturn reflect.TypeOf(sql.RawBytes{})\n\tcase SQLITE_REAL:\n\t\treturn reflect.TypeOf(sql.NullFloat64{})\n\tcase SQLITE_NUMERIC:\n\t\treturn reflect.TypeOf(sql.NullFloat64{})\n\tcase SQLITE_BOOL:\n\t\treturn reflect.TypeOf(sql.NullBool{})\n\tcase SQLITE_TIME:\n\t\treturn reflect.TypeOf(sql.NullTime{})\n\t}\n\treturn reflect.TypeOf(new(any))\n}\n\nfunc databaseTypeConvSqlite(t string) int {\n\tif strings.Contains(t, \"INT\") {\n\t\treturn SQLITE_INTEGER\n\t}\n\tif t == \"CLOB\" || t == \"TEXT\" ||\n\t\tstrings.Contains(t, \"CHAR\") {\n\t\treturn SQLITE_TEXT\n\t}\n\tif t == \"BLOB\" {\n\t\treturn SQLITE_BLOB\n\t}\n\tif t == \"REAL\" || t == \"FLOAT\" ||\n\t\tstrings.Contains(t, \"DOUBLE\") {\n\t\treturn SQLITE_REAL\n\t}\n\tif t == \"DATE\" || t == \"DATETIME\" ||\n\t\tt == \"TIMESTAMP\" {\n\t\treturn SQLITE_TIME\n\t}\n\tif t == \"NUMERIC\" ||\n\t\tstrings.Contains(t, \"DECIMAL\") {\n\t\treturn SQLITE_NUMERIC\n\t}\n\tif t == \"BOOLEAN\" {\n\t\treturn SQLITE_BOOL\n\t}\n\n\treturn SQLITE_NULL\n}\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_usleep_windows.go",
    "content": "// Copyright (C) 2018 G.J.R. Timmer <gjr.timmer@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build cgo\n// +build cgo\n\npackage sqlite3\n\n// usleep is a function available on *nix based systems.\n// This function is not present in Windows.\n// Windows has a sleep function but this works with seconds\n// and not with microseconds as usleep.\n//\n// This code should improve performance on windows because\n// without the presence of usleep SQLite waits 1 second.\n//\n// Source:  https://github.com/php/php-src/blob/PHP-5.0/win32/time.c\n// License: https://github.com/php/php-src/blob/PHP-5.0/LICENSE\n// Details: https://stackoverflow.com/questions/5801813/c-usleep-is-obsolete-workarounds-for-windows-mingw?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa\n\n/*\n#include <windows.h>\n\nvoid usleep(__int64 usec)\n{\n    HANDLE timer;\n    LARGE_INTEGER ft;\n\n    // Convert to 100 nanosecond interval, negative value indicates relative time\n    ft.QuadPart = -(10*usec);\n\n    timer = CreateWaitableTimer(NULL, TRUE, NULL);\n    SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0);\n    WaitForSingleObject(timer, INFINITE);\n    CloseHandle(timer);\n}\n*/\nimport \"C\"\n\n// EOF\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3_windows.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n// +build windows\n\npackage sqlite3\n\n/*\n#cgo CFLAGS: -I.\n#cgo CFLAGS: -fno-stack-check\n#cgo CFLAGS: -fno-stack-protector\n#cgo CFLAGS: -mno-stack-arg-probe\n#cgo windows,386 CFLAGS: -D_USE_32BIT_TIME_T\n*/\nimport \"C\"\n"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/sqlite3ext.h",
    "content": "#ifndef USE_LIBSQLITE3\n/*\n** 2006 June 7\n**\n** The author disclaims copyright to this source code.  In place of\n** a legal notice, here is a blessing:\n**\n**    May you do good and not evil.\n**    May you find forgiveness for yourself and forgive others.\n**    May you share freely, never taking more than you give.\n**\n*************************************************************************\n** This header file defines the SQLite interface for use by\n** shared libraries that want to be imported as extensions into\n** an SQLite instance.  Shared libraries that intend to be loaded\n** as extensions by SQLite should #include this file instead of \n** sqlite3.h.\n*/\n#ifndef SQLITE3EXT_H\n#define SQLITE3EXT_H\n#include \"sqlite3-binding.h\"\n#ifdef __clang__\n#define assert(condition) ((void)0)\n#endif\n\n\n/*\n** The following structure holds pointers to all of the SQLite API\n** routines.\n**\n** WARNING:  In order to maintain backwards compatibility, add new\n** interfaces to the end of this structure only.  If you insert new\n** interfaces in the middle of this structure, then older different\n** versions of SQLite will not be able to load each other's shared\n** libraries!\n*/\nstruct sqlite3_api_routines {\n  void * (*aggregate_context)(sqlite3_context*,int nBytes);\n  int  (*aggregate_count)(sqlite3_context*);\n  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));\n  int  (*bind_double)(sqlite3_stmt*,int,double);\n  int  (*bind_int)(sqlite3_stmt*,int,int);\n  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);\n  int  (*bind_null)(sqlite3_stmt*,int);\n  int  (*bind_parameter_count)(sqlite3_stmt*);\n  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);\n  const char * (*bind_parameter_name)(sqlite3_stmt*,int);\n  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));\n  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));\n  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);\n  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);\n  int  (*busy_timeout)(sqlite3*,int ms);\n  int  (*changes)(sqlite3*);\n  int  (*close)(sqlite3*);\n  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,\n                           int eTextRep,const char*));\n  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,\n                             int eTextRep,const void*));\n  const void * (*column_blob)(sqlite3_stmt*,int iCol);\n  int  (*column_bytes)(sqlite3_stmt*,int iCol);\n  int  (*column_bytes16)(sqlite3_stmt*,int iCol);\n  int  (*column_count)(sqlite3_stmt*pStmt);\n  const char * (*column_database_name)(sqlite3_stmt*,int);\n  const void * (*column_database_name16)(sqlite3_stmt*,int);\n  const char * (*column_decltype)(sqlite3_stmt*,int i);\n  const void * (*column_decltype16)(sqlite3_stmt*,int);\n  double  (*column_double)(sqlite3_stmt*,int iCol);\n  int  (*column_int)(sqlite3_stmt*,int iCol);\n  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);\n  const char * (*column_name)(sqlite3_stmt*,int);\n  const void * (*column_name16)(sqlite3_stmt*,int);\n  const char * (*column_origin_name)(sqlite3_stmt*,int);\n  const void * (*column_origin_name16)(sqlite3_stmt*,int);\n  const char * (*column_table_name)(sqlite3_stmt*,int);\n  const void * (*column_table_name16)(sqlite3_stmt*,int);\n  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);\n  const void * (*column_text16)(sqlite3_stmt*,int iCol);\n  int  (*column_type)(sqlite3_stmt*,int iCol);\n  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);\n  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);\n  int  (*complete)(const char*sql);\n  int  (*complete16)(const void*sql);\n  int  (*create_collation)(sqlite3*,const char*,int,void*,\n                           int(*)(void*,int,const void*,int,const void*));\n  int  (*create_collation16)(sqlite3*,const void*,int,void*,\n                             int(*)(void*,int,const void*,int,const void*));\n  int  (*create_function)(sqlite3*,const char*,int,int,void*,\n                          void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                          void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                          void (*xFinal)(sqlite3_context*));\n  int  (*create_function16)(sqlite3*,const void*,int,int,void*,\n                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*));\n  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);\n  int  (*data_count)(sqlite3_stmt*pStmt);\n  sqlite3 * (*db_handle)(sqlite3_stmt*);\n  int (*declare_vtab)(sqlite3*,const char*);\n  int  (*enable_shared_cache)(int);\n  int  (*errcode)(sqlite3*db);\n  const char * (*errmsg)(sqlite3*);\n  const void * (*errmsg16)(sqlite3*);\n  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);\n  int  (*expired)(sqlite3_stmt*);\n  int  (*finalize)(sqlite3_stmt*pStmt);\n  void  (*free)(void*);\n  void  (*free_table)(char**result);\n  int  (*get_autocommit)(sqlite3*);\n  void * (*get_auxdata)(sqlite3_context*,int);\n  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);\n  int  (*global_recover)(void);\n  void  (*interruptx)(sqlite3*);\n  sqlite_int64  (*last_insert_rowid)(sqlite3*);\n  const char * (*libversion)(void);\n  int  (*libversion_number)(void);\n  void *(*malloc)(int);\n  char * (*mprintf)(const char*,...);\n  int  (*open)(const char*,sqlite3**);\n  int  (*open16)(const void*,sqlite3**);\n  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);\n  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);\n  void *(*realloc)(void*,int);\n  int  (*reset)(sqlite3_stmt*pStmt);\n  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_double)(sqlite3_context*,double);\n  void  (*result_error)(sqlite3_context*,const char*,int);\n  void  (*result_error16)(sqlite3_context*,const void*,int);\n  void  (*result_int)(sqlite3_context*,int);\n  void  (*result_int64)(sqlite3_context*,sqlite_int64);\n  void  (*result_null)(sqlite3_context*);\n  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));\n  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));\n  void  (*result_value)(sqlite3_context*,sqlite3_value*);\n  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);\n  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,\n                         const char*,const char*),void*);\n  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));\n  char * (*xsnprintf)(int,char*,const char*,...);\n  int  (*step)(sqlite3_stmt*);\n  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,\n                                char const**,char const**,int*,int*,int*);\n  void  (*thread_cleanup)(void);\n  int  (*total_changes)(sqlite3*);\n  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);\n  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);\n  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,\n                                         sqlite_int64),void*);\n  void * (*user_data)(sqlite3_context*);\n  const void * (*value_blob)(sqlite3_value*);\n  int  (*value_bytes)(sqlite3_value*);\n  int  (*value_bytes16)(sqlite3_value*);\n  double  (*value_double)(sqlite3_value*);\n  int  (*value_int)(sqlite3_value*);\n  sqlite_int64  (*value_int64)(sqlite3_value*);\n  int  (*value_numeric_type)(sqlite3_value*);\n  const unsigned char * (*value_text)(sqlite3_value*);\n  const void * (*value_text16)(sqlite3_value*);\n  const void * (*value_text16be)(sqlite3_value*);\n  const void * (*value_text16le)(sqlite3_value*);\n  int  (*value_type)(sqlite3_value*);\n  char *(*vmprintf)(const char*,va_list);\n  /* Added ??? */\n  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);\n  /* Added by 3.3.13 */\n  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n  int (*clear_bindings)(sqlite3_stmt*);\n  /* Added by 3.4.1 */\n  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,\n                          void (*xDestroy)(void *));\n  /* Added by 3.5.0 */\n  int (*bind_zeroblob)(sqlite3_stmt*,int,int);\n  int (*blob_bytes)(sqlite3_blob*);\n  int (*blob_close)(sqlite3_blob*);\n  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,\n                   int,sqlite3_blob**);\n  int (*blob_read)(sqlite3_blob*,void*,int,int);\n  int (*blob_write)(sqlite3_blob*,const void*,int,int);\n  int (*create_collation_v2)(sqlite3*,const char*,int,void*,\n                             int(*)(void*,int,const void*,int,const void*),\n                             void(*)(void*));\n  int (*file_control)(sqlite3*,const char*,int,void*);\n  sqlite3_int64 (*memory_highwater)(int);\n  sqlite3_int64 (*memory_used)(void);\n  sqlite3_mutex *(*mutex_alloc)(int);\n  void (*mutex_enter)(sqlite3_mutex*);\n  void (*mutex_free)(sqlite3_mutex*);\n  void (*mutex_leave)(sqlite3_mutex*);\n  int (*mutex_try)(sqlite3_mutex*);\n  int (*open_v2)(const char*,sqlite3**,int,const char*);\n  int (*release_memory)(int);\n  void (*result_error_nomem)(sqlite3_context*);\n  void (*result_error_toobig)(sqlite3_context*);\n  int (*sleep)(int);\n  void (*soft_heap_limit)(int);\n  sqlite3_vfs *(*vfs_find)(const char*);\n  int (*vfs_register)(sqlite3_vfs*,int);\n  int (*vfs_unregister)(sqlite3_vfs*);\n  int (*xthreadsafe)(void);\n  void (*result_zeroblob)(sqlite3_context*,int);\n  void (*result_error_code)(sqlite3_context*,int);\n  int (*test_control)(int, ...);\n  void (*randomness)(int,void*);\n  sqlite3 *(*context_db_handle)(sqlite3_context*);\n  int (*extended_result_codes)(sqlite3*,int);\n  int (*limit)(sqlite3*,int,int);\n  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);\n  const char *(*sql)(sqlite3_stmt*);\n  int (*status)(int,int*,int*,int);\n  int (*backup_finish)(sqlite3_backup*);\n  sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);\n  int (*backup_pagecount)(sqlite3_backup*);\n  int (*backup_remaining)(sqlite3_backup*);\n  int (*backup_step)(sqlite3_backup*,int);\n  const char *(*compileoption_get)(int);\n  int (*compileoption_used)(const char*);\n  int (*create_function_v2)(sqlite3*,const char*,int,int,void*,\n                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*),\n                            void(*xDestroy)(void*));\n  int (*db_config)(sqlite3*,int,...);\n  sqlite3_mutex *(*db_mutex)(sqlite3*);\n  int (*db_status)(sqlite3*,int,int*,int*,int);\n  int (*extended_errcode)(sqlite3*);\n  void (*log)(int,const char*,...);\n  sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);\n  const char *(*sourceid)(void);\n  int (*stmt_status)(sqlite3_stmt*,int,int);\n  int (*strnicmp)(const char*,const char*,int);\n  int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);\n  int (*wal_autocheckpoint)(sqlite3*,int);\n  int (*wal_checkpoint)(sqlite3*,const char*);\n  void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);\n  int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);\n  int (*vtab_config)(sqlite3*,int op,...);\n  int (*vtab_on_conflict)(sqlite3*);\n  /* Version 3.7.16 and later */\n  int (*close_v2)(sqlite3*);\n  const char *(*db_filename)(sqlite3*,const char*);\n  int (*db_readonly)(sqlite3*,const char*);\n  int (*db_release_memory)(sqlite3*);\n  const char *(*errstr)(int);\n  int (*stmt_busy)(sqlite3_stmt*);\n  int (*stmt_readonly)(sqlite3_stmt*);\n  int (*stricmp)(const char*,const char*);\n  int (*uri_boolean)(const char*,const char*,int);\n  sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);\n  const char *(*uri_parameter)(const char*,const char*);\n  char *(*xvsnprintf)(int,char*,const char*,va_list);\n  int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);\n  /* Version 3.8.7 and later */\n  int (*auto_extension)(void(*)(void));\n  int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,\n                     void(*)(void*));\n  int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,\n                      void(*)(void*),unsigned char);\n  int (*cancel_auto_extension)(void(*)(void));\n  int (*load_extension)(sqlite3*,const char*,const char*,char**);\n  void *(*malloc64)(sqlite3_uint64);\n  sqlite3_uint64 (*msize)(void*);\n  void *(*realloc64)(void*,sqlite3_uint64);\n  void (*reset_auto_extension)(void);\n  void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,\n                        void(*)(void*));\n  void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,\n                         void(*)(void*), unsigned char);\n  int (*strglob)(const char*,const char*);\n  /* Version 3.8.11 and later */\n  sqlite3_value *(*value_dup)(const sqlite3_value*);\n  void (*value_free)(sqlite3_value*);\n  int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);\n  int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);\n  /* Version 3.9.0 and later */\n  unsigned int (*value_subtype)(sqlite3_value*);\n  void (*result_subtype)(sqlite3_context*,unsigned int);\n  /* Version 3.10.0 and later */\n  int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);\n  int (*strlike)(const char*,const char*,unsigned int);\n  int (*db_cacheflush)(sqlite3*);\n  /* Version 3.12.0 and later */\n  int (*system_errno)(sqlite3*);\n  /* Version 3.14.0 and later */\n  int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);\n  char *(*expanded_sql)(sqlite3_stmt*);\n  /* Version 3.18.0 and later */\n  void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);\n  /* Version 3.20.0 and later */\n  int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,\n                    sqlite3_stmt**,const char**);\n  int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,\n                      sqlite3_stmt**,const void**);\n  int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));\n  void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));\n  void *(*value_pointer)(sqlite3_value*,const char*);\n  int (*vtab_nochange)(sqlite3_context*);\n  int (*value_nochange)(sqlite3_value*);\n  const char *(*vtab_collation)(sqlite3_index_info*,int);\n  /* Version 3.24.0 and later */\n  int (*keyword_count)(void);\n  int (*keyword_name)(int,const char**,int*);\n  int (*keyword_check)(const char*,int);\n  sqlite3_str *(*str_new)(sqlite3*);\n  char *(*str_finish)(sqlite3_str*);\n  void (*str_appendf)(sqlite3_str*, const char *zFormat, ...);\n  void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list);\n  void (*str_append)(sqlite3_str*, const char *zIn, int N);\n  void (*str_appendall)(sqlite3_str*, const char *zIn);\n  void (*str_appendchar)(sqlite3_str*, int N, char C);\n  void (*str_reset)(sqlite3_str*);\n  int (*str_errcode)(sqlite3_str*);\n  int (*str_length)(sqlite3_str*);\n  char *(*str_value)(sqlite3_str*);\n  /* Version 3.25.0 and later */\n  int (*create_window_function)(sqlite3*,const char*,int,int,void*,\n                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n                            void (*xFinal)(sqlite3_context*),\n                            void (*xValue)(sqlite3_context*),\n                            void (*xInv)(sqlite3_context*,int,sqlite3_value**),\n                            void(*xDestroy)(void*));\n  /* Version 3.26.0 and later */\n  const char *(*normalized_sql)(sqlite3_stmt*);\n  /* Version 3.28.0 and later */\n  int (*stmt_isexplain)(sqlite3_stmt*);\n  int (*value_frombind)(sqlite3_value*);\n  /* Version 3.30.0 and later */\n  int (*drop_modules)(sqlite3*,const char**);\n  /* Version 3.31.0 and later */\n  sqlite3_int64 (*hard_heap_limit64)(sqlite3_int64);\n  const char *(*uri_key)(const char*,int);\n  const char *(*filename_database)(const char*);\n  const char *(*filename_journal)(const char*);\n  const char *(*filename_wal)(const char*);\n  /* Version 3.32.0 and later */\n  const char *(*create_filename)(const char*,const char*,const char*,\n                           int,const char**);\n  void (*free_filename)(const char*);\n  sqlite3_file *(*database_file_object)(const char*);\n  /* Version 3.34.0 and later */\n  int (*txn_state)(sqlite3*,const char*);\n  /* Version 3.36.1 and later */\n  sqlite3_int64 (*changes64)(sqlite3*);\n  sqlite3_int64 (*total_changes64)(sqlite3*);\n  /* Version 3.37.0 and later */\n  int (*autovacuum_pages)(sqlite3*,\n     unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),\n     void*, void(*)(void*));\n  /* Version 3.38.0 and later */\n  int (*error_offset)(sqlite3*);\n  int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**);\n  int (*vtab_distinct)(sqlite3_index_info*);\n  int (*vtab_in)(sqlite3_index_info*,int,int);\n  int (*vtab_in_first)(sqlite3_value*,sqlite3_value**);\n  int (*vtab_in_next)(sqlite3_value*,sqlite3_value**);\n  /* Version 3.39.0 and later */\n  int (*deserialize)(sqlite3*,const char*,unsigned char*,\n                     sqlite3_int64,sqlite3_int64,unsigned);\n  unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*,\n                              unsigned int);\n  const char *(*db_name)(sqlite3*,int);\n  /* Version 3.40.0 and later */\n  int (*value_encoding)(sqlite3_value*);\n  /* Version 3.41.0 and later */\n  int (*is_interrupted)(sqlite3*);\n  /* Version 3.43.0 and later */\n  int (*stmt_explain)(sqlite3_stmt*,int);\n  /* Version 3.44.0 and later */\n  void *(*get_clientdata)(sqlite3*,const char*);\n  int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));\n  /* Version 3.50.0 and later */\n  int (*setlk_timeout)(sqlite3*,int,int);\n  /* Version 3.51.0 and later */\n  int (*set_errmsg)(sqlite3*,int,const char*);\n  int (*db_status64)(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);\n  \n};\n\n/*\n** This is the function signature used for all extension entry points.  It\n** is also defined in the file \"loadext.c\".\n*/\ntypedef int (*sqlite3_loadext_entry)(\n  sqlite3 *db,                       /* Handle to the database. */\n  char **pzErrMsg,                   /* Used to set error string on failure. */\n  const sqlite3_api_routines *pThunk /* Extension API function pointers. */\n);\n\n/*\n** The following macros redefine the API routines so that they are\n** redirected through the global sqlite3_api structure.\n**\n** This header file is also used by the loadext.c source file\n** (part of the main SQLite library - not an extension) so that\n** it can get access to the sqlite3_api_routines structure\n** definition.  But the main library does not want to redefine\n** the API.  So the redefinition macros are only valid if the\n** SQLITE_CORE macros is undefined.\n*/\n#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n#define sqlite3_aggregate_context      sqlite3_api->aggregate_context\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_aggregate_count        sqlite3_api->aggregate_count\n#endif\n#define sqlite3_bind_blob              sqlite3_api->bind_blob\n#define sqlite3_bind_double            sqlite3_api->bind_double\n#define sqlite3_bind_int               sqlite3_api->bind_int\n#define sqlite3_bind_int64             sqlite3_api->bind_int64\n#define sqlite3_bind_null              sqlite3_api->bind_null\n#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count\n#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index\n#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name\n#define sqlite3_bind_text              sqlite3_api->bind_text\n#define sqlite3_bind_text16            sqlite3_api->bind_text16\n#define sqlite3_bind_value             sqlite3_api->bind_value\n#define sqlite3_busy_handler           sqlite3_api->busy_handler\n#define sqlite3_busy_timeout           sqlite3_api->busy_timeout\n#define sqlite3_changes                sqlite3_api->changes\n#define sqlite3_close                  sqlite3_api->close\n#define sqlite3_collation_needed       sqlite3_api->collation_needed\n#define sqlite3_collation_needed16     sqlite3_api->collation_needed16\n#define sqlite3_column_blob            sqlite3_api->column_blob\n#define sqlite3_column_bytes           sqlite3_api->column_bytes\n#define sqlite3_column_bytes16         sqlite3_api->column_bytes16\n#define sqlite3_column_count           sqlite3_api->column_count\n#define sqlite3_column_database_name   sqlite3_api->column_database_name\n#define sqlite3_column_database_name16 sqlite3_api->column_database_name16\n#define sqlite3_column_decltype        sqlite3_api->column_decltype\n#define sqlite3_column_decltype16      sqlite3_api->column_decltype16\n#define sqlite3_column_double          sqlite3_api->column_double\n#define sqlite3_column_int             sqlite3_api->column_int\n#define sqlite3_column_int64           sqlite3_api->column_int64\n#define sqlite3_column_name            sqlite3_api->column_name\n#define sqlite3_column_name16          sqlite3_api->column_name16\n#define sqlite3_column_origin_name     sqlite3_api->column_origin_name\n#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16\n#define sqlite3_column_table_name      sqlite3_api->column_table_name\n#define sqlite3_column_table_name16    sqlite3_api->column_table_name16\n#define sqlite3_column_text            sqlite3_api->column_text\n#define sqlite3_column_text16          sqlite3_api->column_text16\n#define sqlite3_column_type            sqlite3_api->column_type\n#define sqlite3_column_value           sqlite3_api->column_value\n#define sqlite3_commit_hook            sqlite3_api->commit_hook\n#define sqlite3_complete               sqlite3_api->complete\n#define sqlite3_complete16             sqlite3_api->complete16\n#define sqlite3_create_collation       sqlite3_api->create_collation\n#define sqlite3_create_collation16     sqlite3_api->create_collation16\n#define sqlite3_create_function        sqlite3_api->create_function\n#define sqlite3_create_function16      sqlite3_api->create_function16\n#define sqlite3_create_module          sqlite3_api->create_module\n#define sqlite3_create_module_v2       sqlite3_api->create_module_v2\n#define sqlite3_data_count             sqlite3_api->data_count\n#define sqlite3_db_handle              sqlite3_api->db_handle\n#define sqlite3_declare_vtab           sqlite3_api->declare_vtab\n#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache\n#define sqlite3_errcode                sqlite3_api->errcode\n#define sqlite3_errmsg                 sqlite3_api->errmsg\n#define sqlite3_errmsg16               sqlite3_api->errmsg16\n#define sqlite3_exec                   sqlite3_api->exec\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_expired                sqlite3_api->expired\n#endif\n#define sqlite3_finalize               sqlite3_api->finalize\n#define sqlite3_free                   sqlite3_api->free\n#define sqlite3_free_table             sqlite3_api->free_table\n#define sqlite3_get_autocommit         sqlite3_api->get_autocommit\n#define sqlite3_get_auxdata            sqlite3_api->get_auxdata\n#define sqlite3_get_table              sqlite3_api->get_table\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_global_recover         sqlite3_api->global_recover\n#endif\n#define sqlite3_interrupt              sqlite3_api->interruptx\n#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid\n#define sqlite3_libversion             sqlite3_api->libversion\n#define sqlite3_libversion_number      sqlite3_api->libversion_number\n#define sqlite3_malloc                 sqlite3_api->malloc\n#define sqlite3_mprintf                sqlite3_api->mprintf\n#define sqlite3_open                   sqlite3_api->open\n#define sqlite3_open16                 sqlite3_api->open16\n#define sqlite3_prepare                sqlite3_api->prepare\n#define sqlite3_prepare16              sqlite3_api->prepare16\n#define sqlite3_prepare_v2             sqlite3_api->prepare_v2\n#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2\n#define sqlite3_profile                sqlite3_api->profile\n#define sqlite3_progress_handler       sqlite3_api->progress_handler\n#define sqlite3_realloc                sqlite3_api->realloc\n#define sqlite3_reset                  sqlite3_api->reset\n#define sqlite3_result_blob            sqlite3_api->result_blob\n#define sqlite3_result_double          sqlite3_api->result_double\n#define sqlite3_result_error           sqlite3_api->result_error\n#define sqlite3_result_error16         sqlite3_api->result_error16\n#define sqlite3_result_int             sqlite3_api->result_int\n#define sqlite3_result_int64           sqlite3_api->result_int64\n#define sqlite3_result_null            sqlite3_api->result_null\n#define sqlite3_result_text            sqlite3_api->result_text\n#define sqlite3_result_text16          sqlite3_api->result_text16\n#define sqlite3_result_text16be        sqlite3_api->result_text16be\n#define sqlite3_result_text16le        sqlite3_api->result_text16le\n#define sqlite3_result_value           sqlite3_api->result_value\n#define sqlite3_rollback_hook          sqlite3_api->rollback_hook\n#define sqlite3_set_authorizer         sqlite3_api->set_authorizer\n#define sqlite3_set_auxdata            sqlite3_api->set_auxdata\n#define sqlite3_snprintf               sqlite3_api->xsnprintf\n#define sqlite3_step                   sqlite3_api->step\n#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata\n#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup\n#define sqlite3_total_changes          sqlite3_api->total_changes\n#define sqlite3_trace                  sqlite3_api->trace\n#ifndef SQLITE_OMIT_DEPRECATED\n#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings\n#endif\n#define sqlite3_update_hook            sqlite3_api->update_hook\n#define sqlite3_user_data              sqlite3_api->user_data\n#define sqlite3_value_blob             sqlite3_api->value_blob\n#define sqlite3_value_bytes            sqlite3_api->value_bytes\n#define sqlite3_value_bytes16          sqlite3_api->value_bytes16\n#define sqlite3_value_double           sqlite3_api->value_double\n#define sqlite3_value_int              sqlite3_api->value_int\n#define sqlite3_value_int64            sqlite3_api->value_int64\n#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type\n#define sqlite3_value_text             sqlite3_api->value_text\n#define sqlite3_value_text16           sqlite3_api->value_text16\n#define sqlite3_value_text16be         sqlite3_api->value_text16be\n#define sqlite3_value_text16le         sqlite3_api->value_text16le\n#define sqlite3_value_type             sqlite3_api->value_type\n#define sqlite3_vmprintf               sqlite3_api->vmprintf\n#define sqlite3_vsnprintf              sqlite3_api->xvsnprintf\n#define sqlite3_overload_function      sqlite3_api->overload_function\n#define sqlite3_prepare_v2             sqlite3_api->prepare_v2\n#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2\n#define sqlite3_clear_bindings         sqlite3_api->clear_bindings\n#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob\n#define sqlite3_blob_bytes             sqlite3_api->blob_bytes\n#define sqlite3_blob_close             sqlite3_api->blob_close\n#define sqlite3_blob_open              sqlite3_api->blob_open\n#define sqlite3_blob_read              sqlite3_api->blob_read\n#define sqlite3_blob_write             sqlite3_api->blob_write\n#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2\n#define sqlite3_file_control           sqlite3_api->file_control\n#define sqlite3_memory_highwater       sqlite3_api->memory_highwater\n#define sqlite3_memory_used            sqlite3_api->memory_used\n#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc\n#define sqlite3_mutex_enter            sqlite3_api->mutex_enter\n#define sqlite3_mutex_free             sqlite3_api->mutex_free\n#define sqlite3_mutex_leave            sqlite3_api->mutex_leave\n#define sqlite3_mutex_try              sqlite3_api->mutex_try\n#define sqlite3_open_v2                sqlite3_api->open_v2\n#define sqlite3_release_memory         sqlite3_api->release_memory\n#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem\n#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig\n#define sqlite3_sleep                  sqlite3_api->sleep\n#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit\n#define sqlite3_vfs_find               sqlite3_api->vfs_find\n#define sqlite3_vfs_register           sqlite3_api->vfs_register\n#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister\n#define sqlite3_threadsafe             sqlite3_api->xthreadsafe\n#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob\n#define sqlite3_result_error_code      sqlite3_api->result_error_code\n#define sqlite3_test_control           sqlite3_api->test_control\n#define sqlite3_randomness             sqlite3_api->randomness\n#define sqlite3_context_db_handle      sqlite3_api->context_db_handle\n#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes\n#define sqlite3_limit                  sqlite3_api->limit\n#define sqlite3_next_stmt              sqlite3_api->next_stmt\n#define sqlite3_sql                    sqlite3_api->sql\n#define sqlite3_status                 sqlite3_api->status\n#define sqlite3_backup_finish          sqlite3_api->backup_finish\n#define sqlite3_backup_init            sqlite3_api->backup_init\n#define sqlite3_backup_pagecount       sqlite3_api->backup_pagecount\n#define sqlite3_backup_remaining       sqlite3_api->backup_remaining\n#define sqlite3_backup_step            sqlite3_api->backup_step\n#define sqlite3_compileoption_get      sqlite3_api->compileoption_get\n#define sqlite3_compileoption_used     sqlite3_api->compileoption_used\n#define sqlite3_create_function_v2     sqlite3_api->create_function_v2\n#define sqlite3_db_config              sqlite3_api->db_config\n#define sqlite3_db_mutex               sqlite3_api->db_mutex\n#define sqlite3_db_status              sqlite3_api->db_status\n#define sqlite3_extended_errcode       sqlite3_api->extended_errcode\n#define sqlite3_log                    sqlite3_api->log\n#define sqlite3_soft_heap_limit64      sqlite3_api->soft_heap_limit64\n#define sqlite3_sourceid               sqlite3_api->sourceid\n#define sqlite3_stmt_status            sqlite3_api->stmt_status\n#define sqlite3_strnicmp               sqlite3_api->strnicmp\n#define sqlite3_unlock_notify          sqlite3_api->unlock_notify\n#define sqlite3_wal_autocheckpoint     sqlite3_api->wal_autocheckpoint\n#define sqlite3_wal_checkpoint         sqlite3_api->wal_checkpoint\n#define sqlite3_wal_hook               sqlite3_api->wal_hook\n#define sqlite3_blob_reopen            sqlite3_api->blob_reopen\n#define sqlite3_vtab_config            sqlite3_api->vtab_config\n#define sqlite3_vtab_on_conflict       sqlite3_api->vtab_on_conflict\n/* Version 3.7.16 and later */\n#define sqlite3_close_v2               sqlite3_api->close_v2\n#define sqlite3_db_filename            sqlite3_api->db_filename\n#define sqlite3_db_readonly            sqlite3_api->db_readonly\n#define sqlite3_db_release_memory      sqlite3_api->db_release_memory\n#define sqlite3_errstr                 sqlite3_api->errstr\n#define sqlite3_stmt_busy              sqlite3_api->stmt_busy\n#define sqlite3_stmt_readonly          sqlite3_api->stmt_readonly\n#define sqlite3_stricmp                sqlite3_api->stricmp\n#define sqlite3_uri_boolean            sqlite3_api->uri_boolean\n#define sqlite3_uri_int64              sqlite3_api->uri_int64\n#define sqlite3_uri_parameter          sqlite3_api->uri_parameter\n#define sqlite3_uri_vsnprintf          sqlite3_api->xvsnprintf\n#define sqlite3_wal_checkpoint_v2      sqlite3_api->wal_checkpoint_v2\n/* Version 3.8.7 and later */\n#define sqlite3_auto_extension         sqlite3_api->auto_extension\n#define sqlite3_bind_blob64            sqlite3_api->bind_blob64\n#define sqlite3_bind_text64            sqlite3_api->bind_text64\n#define sqlite3_cancel_auto_extension  sqlite3_api->cancel_auto_extension\n#define sqlite3_load_extension         sqlite3_api->load_extension\n#define sqlite3_malloc64               sqlite3_api->malloc64\n#define sqlite3_msize                  sqlite3_api->msize\n#define sqlite3_realloc64              sqlite3_api->realloc64\n#define sqlite3_reset_auto_extension   sqlite3_api->reset_auto_extension\n#define sqlite3_result_blob64          sqlite3_api->result_blob64\n#define sqlite3_result_text64          sqlite3_api->result_text64\n#define sqlite3_strglob                sqlite3_api->strglob\n/* Version 3.8.11 and later */\n#define sqlite3_value_dup              sqlite3_api->value_dup\n#define sqlite3_value_free             sqlite3_api->value_free\n#define sqlite3_result_zeroblob64      sqlite3_api->result_zeroblob64\n#define sqlite3_bind_zeroblob64        sqlite3_api->bind_zeroblob64\n/* Version 3.9.0 and later */\n#define sqlite3_value_subtype          sqlite3_api->value_subtype\n#define sqlite3_result_subtype         sqlite3_api->result_subtype\n/* Version 3.10.0 and later */\n#define sqlite3_status64               sqlite3_api->status64\n#define sqlite3_strlike                sqlite3_api->strlike\n#define sqlite3_db_cacheflush          sqlite3_api->db_cacheflush\n/* Version 3.12.0 and later */\n#define sqlite3_system_errno           sqlite3_api->system_errno\n/* Version 3.14.0 and later */\n#define sqlite3_trace_v2               sqlite3_api->trace_v2\n#define sqlite3_expanded_sql           sqlite3_api->expanded_sql\n/* Version 3.18.0 and later */\n#define sqlite3_set_last_insert_rowid  sqlite3_api->set_last_insert_rowid\n/* Version 3.20.0 and later */\n#define sqlite3_prepare_v3             sqlite3_api->prepare_v3\n#define sqlite3_prepare16_v3           sqlite3_api->prepare16_v3\n#define sqlite3_bind_pointer           sqlite3_api->bind_pointer\n#define sqlite3_result_pointer         sqlite3_api->result_pointer\n#define sqlite3_value_pointer          sqlite3_api->value_pointer\n/* Version 3.22.0 and later */\n#define sqlite3_vtab_nochange          sqlite3_api->vtab_nochange\n#define sqlite3_value_nochange         sqlite3_api->value_nochange\n#define sqlite3_vtab_collation         sqlite3_api->vtab_collation\n/* Version 3.24.0 and later */\n#define sqlite3_keyword_count          sqlite3_api->keyword_count\n#define sqlite3_keyword_name           sqlite3_api->keyword_name\n#define sqlite3_keyword_check          sqlite3_api->keyword_check\n#define sqlite3_str_new                sqlite3_api->str_new\n#define sqlite3_str_finish             sqlite3_api->str_finish\n#define sqlite3_str_appendf            sqlite3_api->str_appendf\n#define sqlite3_str_vappendf           sqlite3_api->str_vappendf\n#define sqlite3_str_append             sqlite3_api->str_append\n#define sqlite3_str_appendall          sqlite3_api->str_appendall\n#define sqlite3_str_appendchar         sqlite3_api->str_appendchar\n#define sqlite3_str_reset              sqlite3_api->str_reset\n#define sqlite3_str_errcode            sqlite3_api->str_errcode\n#define sqlite3_str_length             sqlite3_api->str_length\n#define sqlite3_str_value              sqlite3_api->str_value\n/* Version 3.25.0 and later */\n#define sqlite3_create_window_function sqlite3_api->create_window_function\n/* Version 3.26.0 and later */\n#define sqlite3_normalized_sql         sqlite3_api->normalized_sql\n/* Version 3.28.0 and later */\n#define sqlite3_stmt_isexplain         sqlite3_api->stmt_isexplain\n#define sqlite3_value_frombind         sqlite3_api->value_frombind\n/* Version 3.30.0 and later */\n#define sqlite3_drop_modules           sqlite3_api->drop_modules\n/* Version 3.31.0 and later */\n#define sqlite3_hard_heap_limit64      sqlite3_api->hard_heap_limit64\n#define sqlite3_uri_key                sqlite3_api->uri_key\n#define sqlite3_filename_database      sqlite3_api->filename_database\n#define sqlite3_filename_journal       sqlite3_api->filename_journal\n#define sqlite3_filename_wal           sqlite3_api->filename_wal\n/* Version 3.32.0 and later */\n#define sqlite3_create_filename        sqlite3_api->create_filename\n#define sqlite3_free_filename          sqlite3_api->free_filename\n#define sqlite3_database_file_object   sqlite3_api->database_file_object\n/* Version 3.34.0 and later */\n#define sqlite3_txn_state              sqlite3_api->txn_state\n/* Version 3.36.1 and later */\n#define sqlite3_changes64              sqlite3_api->changes64\n#define sqlite3_total_changes64        sqlite3_api->total_changes64\n/* Version 3.37.0 and later */\n#define sqlite3_autovacuum_pages       sqlite3_api->autovacuum_pages\n/* Version 3.38.0 and later */\n#define sqlite3_error_offset           sqlite3_api->error_offset\n#define sqlite3_vtab_rhs_value         sqlite3_api->vtab_rhs_value\n#define sqlite3_vtab_distinct          sqlite3_api->vtab_distinct\n#define sqlite3_vtab_in                sqlite3_api->vtab_in\n#define sqlite3_vtab_in_first          sqlite3_api->vtab_in_first\n#define sqlite3_vtab_in_next           sqlite3_api->vtab_in_next\n/* Version 3.39.0 and later */\n#ifndef SQLITE_OMIT_DESERIALIZE\n#define sqlite3_deserialize            sqlite3_api->deserialize\n#define sqlite3_serialize              sqlite3_api->serialize\n#endif\n#define sqlite3_db_name                sqlite3_api->db_name\n/* Version 3.40.0 and later */\n#define sqlite3_value_encoding         sqlite3_api->value_encoding\n/* Version 3.41.0 and later */\n#define sqlite3_is_interrupted         sqlite3_api->is_interrupted\n/* Version 3.43.0 and later */\n#define sqlite3_stmt_explain           sqlite3_api->stmt_explain\n/* Version 3.44.0 and later */\n#define sqlite3_get_clientdata         sqlite3_api->get_clientdata\n#define sqlite3_set_clientdata         sqlite3_api->set_clientdata\n/* Version 3.50.0 and later */\n#define sqlite3_setlk_timeout          sqlite3_api->setlk_timeout\n/* Version 3.51.0 and later */\n#define sqlite3_set_errmsg             sqlite3_api->set_errmsg\n#define sqlite3_db_status64            sqlite3_api->db_status64\n#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */\n\n#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)\n  /* This case when the file really is being compiled as a loadable \n  ** extension */\n# define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api=0;\n# define SQLITE_EXTENSION_INIT2(v)  sqlite3_api=v;\n# define SQLITE_EXTENSION_INIT3     \\\n    extern const sqlite3_api_routines *sqlite3_api;\n#else\n  /* This case when the file is being statically linked into the \n  ** application */\n# define SQLITE_EXTENSION_INIT1     /*no-op*/\n# define SQLITE_EXTENSION_INIT2(v)  (void)v; /* unused parameter */\n# define SQLITE_EXTENSION_INIT3     /*no-op*/\n#endif\n\n#endif /* SQLITE3EXT_H */\n#else // USE_LIBSQLITE3\n // If users really want to link against the system sqlite3 we\n// need to make this file a noop.\n #endif"
  },
  {
    "path": "vendor/github.com/mattn/go-sqlite3/static_mock.go",
    "content": "// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.\n//\n// Use of this source code is governed by an MIT-style\n// license that can be found in the LICENSE file.\n\n//go:build !cgo\n// +build !cgo\n\npackage sqlite3\n\nimport (\n\t\"database/sql\"\n\t\"database/sql/driver\"\n\t\"errors\"\n)\n\nvar errorMsg = errors.New(\"Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub\")\n\nfunc init() {\n\tsql.Register(\"sqlite3\", &SQLiteDriver{})\n}\n\ntype (\n\tSQLiteDriver struct {\n\t\tExtensions  []string\n\t\tConnectHook func(*SQLiteConn) error\n\t}\n\tSQLiteConn struct{}\n)\n\nfunc (SQLiteDriver) Open(s string) (driver.Conn, error)                        { return nil, errorMsg }\nfunc (c *SQLiteConn) RegisterAggregator(string, any, bool) error               { return errorMsg }\nfunc (c *SQLiteConn) RegisterAuthorizer(func(int, string, string, string) int) {}\nfunc (c *SQLiteConn) RegisterCollation(string, func(string, string) int) error { return errorMsg }\nfunc (c *SQLiteConn) RegisterCommitHook(func() int)                            {}\nfunc (c *SQLiteConn) RegisterFunc(string, any, bool) error                     { return errorMsg }\nfunc (c *SQLiteConn) RegisterRollbackHook(func())                              {}\nfunc (c *SQLiteConn) RegisterUpdateHook(func(int, string, string, int64))      {}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/.gitignore",
    "content": "tags\ntest_db/*/generation\ntest_db/*/*.lock\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/LICENSE",
    "content": "Copyright (c) 2013 Miek Gieben. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Miek Gieben nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/Makefile.release",
    "content": "# Makefile for releasing.\n#\n# The release is controlled from version.go. The version found there is\n# used to tag the git repo, we're not building any artifects so there is nothing\n# to upload to github.\n#\n# * Up the version in version.go\n# * Run: make -f Makefile.release release\n#   * will *commit* your change with 'Release $VERSION'\n#   * push to github\n#\n\ndefine GO\n//+build ignore\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/miekg/pkcs11\"\n)\n\nfunc main() {\n\tfmt.Println(pkcs11.Release.String())\n}\nendef\n\n$(file > version_release.go,$(GO))\nVERSION:=$(shell go run -tags release version_release.go)\nTAG=\"v$(VERSION)\"\n\nall:\n\trm -f version_release.go\n\t@echo Use the \\'release\\' target to start a release $(VERSION)\n\n.PHONY: run\nrun:\n\trm -f version_release.go\n\t@echo $(VERSION)\n\n.PHONY: release\nrelease: commit push\n\t@echo Released $(VERSION)\n\n.PHONY: commit\ncommit:\n\trm -f version_release.go\n\t@echo Committing release $(VERSION)\n\tgit commit -am\"Release $(VERSION)\"\n\tgit tag $(TAG)\n\n.PHONY: push\npush:\n\t@echo Pushing release $(VERSION) to master\n\tgit push --tags\n\tgit push\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/README.md",
    "content": "# PKCS#11\n\nThis is a Go implementation of the PKCS#11 API. It wraps the library closely, but uses Go idiom where\nit makes sense. It has been tested with SoftHSM.\n\n## SoftHSM\n\n *  Make it use a custom configuration file `export SOFTHSM_CONF=$PWD/softhsm.conf`\n\n *  Then use `softhsm` to init it\n\n    ~~~\n    softhsm --init-token --slot 0 --label test --pin 1234\n    ~~~\n\n *  Then use `libsofthsm2.so` as the pkcs11 module:\n\n    ~~~ go\n    p := pkcs11.New(\"/usr/lib/softhsm/libsofthsm2.so\")\n    ~~~\n\n## Examples\n\nA skeleton program would look somewhat like this (yes, pkcs#11 is verbose):\n\n~~~ go\np := pkcs11.New(\"/usr/lib/softhsm/libsofthsm2.so\")\nerr := p.Initialize()\nif err != nil {\n    panic(err)\n}\n\ndefer p.Destroy()\ndefer p.Finalize()\n\nslots, err := p.GetSlotList(true)\nif err != nil {\n    panic(err)\n}\n\nsession, err := p.OpenSession(slots[0], pkcs11.CKF_SERIAL_SESSION|pkcs11.CKF_RW_SESSION)\nif err != nil {\n    panic(err)\n}\ndefer p.CloseSession(session)\n\nerr = p.Login(session, pkcs11.CKU_USER, \"1234\")\nif err != nil {\n    panic(err)\n}\ndefer p.Logout(session)\n\np.DigestInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_SHA_1, nil)})\nhash, err := p.Digest(session, []byte(\"this is a string\"))\nif err != nil {\n    panic(err)\n}\n\nfor _, d := range hash {\n        fmt.Printf(\"%x\", d)\n}\nfmt.Println()\n~~~\n\nFurther examples are included in the tests.\n\nTo expose PKCS#11 keys using the [crypto.Signer interface](https://golang.org/pkg/crypto/#Signer),\nplease see [github.com/thalesignite/crypto11](https://github.com/thalesignite/crypto11).\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/error.go",
    "content": "// Copyright 2013 Miek Gieben. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage pkcs11\n\n// awk '/#define CKR_/{ print $3\":\\\"\"$2\"\\\",\" }' pkcs11t.h\n\nvar strerror = map[uint]string{\n\t0x00000000: \"CKR_OK\",\n\t0x00000001: \"CKR_CANCEL\",\n\t0x00000002: \"CKR_HOST_MEMORY\",\n\t0x00000003: \"CKR_SLOT_ID_INVALID\",\n\t0x00000005: \"CKR_GENERAL_ERROR\",\n\t0x00000006: \"CKR_FUNCTION_FAILED\",\n\t0x00000007: \"CKR_ARGUMENTS_BAD\",\n\t0x00000008: \"CKR_NO_EVENT\",\n\t0x00000009: \"CKR_NEED_TO_CREATE_THREADS\",\n\t0x0000000A: \"CKR_CANT_LOCK\",\n\t0x00000010: \"CKR_ATTRIBUTE_READ_ONLY\",\n\t0x00000011: \"CKR_ATTRIBUTE_SENSITIVE\",\n\t0x00000012: \"CKR_ATTRIBUTE_TYPE_INVALID\",\n\t0x00000013: \"CKR_ATTRIBUTE_VALUE_INVALID\",\n\t0x00000020: \"CKR_DATA_INVALID\",\n\t0x00000021: \"CKR_DATA_LEN_RANGE\",\n\t0x00000030: \"CKR_DEVICE_ERROR\",\n\t0x00000031: \"CKR_DEVICE_MEMORY\",\n\t0x00000032: \"CKR_DEVICE_REMOVED\",\n\t0x00000040: \"CKR_ENCRYPTED_DATA_INVALID\",\n\t0x00000041: \"CKR_ENCRYPTED_DATA_LEN_RANGE\",\n\t0x00000050: \"CKR_FUNCTION_CANCELED\",\n\t0x00000051: \"CKR_FUNCTION_NOT_PARALLEL\",\n\t0x00000054: \"CKR_FUNCTION_NOT_SUPPORTED\",\n\t0x00000060: \"CKR_KEY_HANDLE_INVALID\",\n\t0x00000062: \"CKR_KEY_SIZE_RANGE\",\n\t0x00000063: \"CKR_KEY_TYPE_INCONSISTENT\",\n\t0x00000064: \"CKR_KEY_NOT_NEEDED\",\n\t0x00000065: \"CKR_KEY_CHANGED\",\n\t0x00000066: \"CKR_KEY_NEEDED\",\n\t0x00000067: \"CKR_KEY_INDIGESTIBLE\",\n\t0x00000068: \"CKR_KEY_FUNCTION_NOT_PERMITTED\",\n\t0x00000069: \"CKR_KEY_NOT_WRAPPABLE\",\n\t0x0000006A: \"CKR_KEY_UNEXTRACTABLE\",\n\t0x00000070: \"CKR_MECHANISM_INVALID\",\n\t0x00000071: \"CKR_MECHANISM_PARAM_INVALID\",\n\t0x00000082: \"CKR_OBJECT_HANDLE_INVALID\",\n\t0x00000090: \"CKR_OPERATION_ACTIVE\",\n\t0x00000091: \"CKR_OPERATION_NOT_INITIALIZED\",\n\t0x000000A0: \"CKR_PIN_INCORRECT\",\n\t0x000000A1: \"CKR_PIN_INVALID\",\n\t0x000000A2: \"CKR_PIN_LEN_RANGE\",\n\t0x000000A3: \"CKR_PIN_EXPIRED\",\n\t0x000000A4: \"CKR_PIN_LOCKED\",\n\t0x000000B0: \"CKR_SESSION_CLOSED\",\n\t0x000000B1: \"CKR_SESSION_COUNT\",\n\t0x000000B3: \"CKR_SESSION_HANDLE_INVALID\",\n\t0x000000B4: \"CKR_SESSION_PARALLEL_NOT_SUPPORTED\",\n\t0x000000B5: \"CKR_SESSION_READ_ONLY\",\n\t0x000000B6: \"CKR_SESSION_EXISTS\",\n\t0x000000B7: \"CKR_SESSION_READ_ONLY_EXISTS\",\n\t0x000000B8: \"CKR_SESSION_READ_WRITE_SO_EXISTS\",\n\t0x000000C0: \"CKR_SIGNATURE_INVALID\",\n\t0x000000C1: \"CKR_SIGNATURE_LEN_RANGE\",\n\t0x000000D0: \"CKR_TEMPLATE_INCOMPLETE\",\n\t0x000000D1: \"CKR_TEMPLATE_INCONSISTENT\",\n\t0x000000E0: \"CKR_TOKEN_NOT_PRESENT\",\n\t0x000000E1: \"CKR_TOKEN_NOT_RECOGNIZED\",\n\t0x000000E2: \"CKR_TOKEN_WRITE_PROTECTED\",\n\t0x000000F0: \"CKR_UNWRAPPING_KEY_HANDLE_INVALID\",\n\t0x000000F1: \"CKR_UNWRAPPING_KEY_SIZE_RANGE\",\n\t0x000000F2: \"CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT\",\n\t0x00000100: \"CKR_USER_ALREADY_LOGGED_IN\",\n\t0x00000101: \"CKR_USER_NOT_LOGGED_IN\",\n\t0x00000102: \"CKR_USER_PIN_NOT_INITIALIZED\",\n\t0x00000103: \"CKR_USER_TYPE_INVALID\",\n\t0x00000104: \"CKR_USER_ANOTHER_ALREADY_LOGGED_IN\",\n\t0x00000105: \"CKR_USER_TOO_MANY_TYPES\",\n\t0x00000110: \"CKR_WRAPPED_KEY_INVALID\",\n\t0x00000112: \"CKR_WRAPPED_KEY_LEN_RANGE\",\n\t0x00000113: \"CKR_WRAPPING_KEY_HANDLE_INVALID\",\n\t0x00000114: \"CKR_WRAPPING_KEY_SIZE_RANGE\",\n\t0x00000115: \"CKR_WRAPPING_KEY_TYPE_INCONSISTENT\",\n\t0x00000120: \"CKR_RANDOM_SEED_NOT_SUPPORTED\",\n\t0x00000121: \"CKR_RANDOM_NO_RNG\",\n\t0x00000130: \"CKR_DOMAIN_PARAMS_INVALID\",\n\t0x00000150: \"CKR_BUFFER_TOO_SMALL\",\n\t0x00000160: \"CKR_SAVED_STATE_INVALID\",\n\t0x00000170: \"CKR_INFORMATION_SENSITIVE\",\n\t0x00000180: \"CKR_STATE_UNSAVEABLE\",\n\t0x00000190: \"CKR_CRYPTOKI_NOT_INITIALIZED\",\n\t0x00000191: \"CKR_CRYPTOKI_ALREADY_INITIALIZED\",\n\t0x000001A0: \"CKR_MUTEX_BAD\",\n\t0x000001A1: \"CKR_MUTEX_NOT_LOCKED\",\n\t0x000001B0: \"CKR_NEW_PIN_MODE\",\n\t0x000001B1: \"CKR_NEXT_OTP\",\n\t0x00000200: \"CKR_FUNCTION_REJECTED\",\n\t0x80000000: \"CKR_VENDOR_DEFINED\",\n}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/params.go",
    "content": "// Copyright 2013 Miek Gieben. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage pkcs11\n\n/*\n#include <stdlib.h>\n#include <string.h>\n#include \"pkcs11go.h\"\n\nstatic inline void putOAEPParams(CK_RSA_PKCS_OAEP_PARAMS_PTR params, CK_VOID_PTR pSourceData, CK_ULONG ulSourceDataLen)\n{\n\tparams->pSourceData = pSourceData;\n\tparams->ulSourceDataLen = ulSourceDataLen;\n}\n\nstatic inline void putECDH1SharedParams(CK_ECDH1_DERIVE_PARAMS_PTR params, CK_VOID_PTR pSharedData, CK_ULONG ulSharedDataLen)\n{\n\tparams->pSharedData = pSharedData;\n\tparams->ulSharedDataLen = ulSharedDataLen;\n}\n\nstatic inline void putECDH1PublicParams(CK_ECDH1_DERIVE_PARAMS_PTR params, CK_VOID_PTR pPublicData, CK_ULONG ulPublicDataLen)\n{\n\tparams->pPublicData = pPublicData;\n\tparams->ulPublicDataLen = ulPublicDataLen;\n}\n*/\nimport \"C\"\nimport \"unsafe\"\n\n// GCMParams represents the parameters for the AES-GCM mechanism.\ntype GCMParams struct {\n\tarena\n\tparams  *C.CK_GCM_PARAMS\n\tiv      []byte\n\taad     []byte\n\ttagSize int\n}\n\n// NewGCMParams returns a pointer to AES-GCM parameters that can be used with the CKM_AES_GCM mechanism.\n// The Free() method must be called after the operation is complete.\n//\n// Note that some HSMs, like CloudHSM, will ignore the IV you pass in and write their\n// own. As a result, to support all libraries, memory is not freed\n// automatically, so that after the EncryptInit/Encrypt operation the HSM's IV\n// can be read back out. It is up to the caller to ensure that Free() is called\n// on the GCMParams object at an appropriate time, which is after\n//\n// Encrypt/Decrypt. As an example:\n//\n//    gcmParams := pkcs11.NewGCMParams(make([]byte, 12), nil, 128)\n//    p.ctx.EncryptInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_AES_GCM, gcmParams)},\n//\t\t\taesObjHandle)\n//    ct, _ := p.ctx.Encrypt(session, pt)\n//    iv := gcmParams.IV()\n//    gcmParams.Free()\n//\nfunc NewGCMParams(iv, aad []byte, tagSize int) *GCMParams {\n\treturn &GCMParams{\n\t\tiv:      iv,\n\t\taad:     aad,\n\t\ttagSize: tagSize,\n\t}\n}\n\nfunc cGCMParams(p *GCMParams) []byte {\n\tparams := C.CK_GCM_PARAMS{\n\t\tulTagBits: C.CK_ULONG(p.tagSize),\n\t}\n\tvar arena arena\n\tif len(p.iv) > 0 {\n\t\tiv, ivLen := arena.Allocate(p.iv)\n\t\tparams.pIv = C.CK_BYTE_PTR(iv)\n\t\tparams.ulIvLen = ivLen\n\t\tparams.ulIvBits = ivLen * 8\n\t}\n\tif len(p.aad) > 0 {\n\t\taad, aadLen := arena.Allocate(p.aad)\n\t\tparams.pAAD = C.CK_BYTE_PTR(aad)\n\t\tparams.ulAADLen = aadLen\n\t}\n\tp.Free()\n\tp.arena = arena\n\tp.params = &params\n\treturn C.GoBytes(unsafe.Pointer(&params), C.int(unsafe.Sizeof(params)))\n}\n\n// IV returns a copy of the actual IV used for the operation.\n//\n// Some HSMs may ignore the user-specified IV and write their own at the end of\n// the encryption operation; this method allows you to retrieve it.\nfunc (p *GCMParams) IV() []byte {\n\tif p == nil || p.params == nil {\n\t\treturn nil\n\t}\n\tnewIv := C.GoBytes(unsafe.Pointer(p.params.pIv), C.int(p.params.ulIvLen))\n\tiv := make([]byte, len(newIv))\n\tcopy(iv, newIv)\n\treturn iv\n}\n\n// Free deallocates the memory reserved for the HSM to write back the actual IV.\n//\n// This must be called after the entire operation is complete, i.e. after\n// Encrypt or EncryptFinal. It is safe to call Free multiple times.\nfunc (p *GCMParams) Free() {\n\tif p == nil || p.arena == nil {\n\t\treturn\n\t}\n\tp.arena.Free()\n\tp.params = nil\n\tp.arena = nil\n}\n\n// NewPSSParams creates a CK_RSA_PKCS_PSS_PARAMS structure and returns it as a byte array for use with the CKM_RSA_PKCS_PSS mechanism.\nfunc NewPSSParams(hashAlg, mgf, saltLength uint) []byte {\n\tp := C.CK_RSA_PKCS_PSS_PARAMS{\n\t\thashAlg: C.CK_MECHANISM_TYPE(hashAlg),\n\t\tmgf:     C.CK_RSA_PKCS_MGF_TYPE(mgf),\n\t\tsLen:    C.CK_ULONG(saltLength),\n\t}\n\treturn C.GoBytes(unsafe.Pointer(&p), C.int(unsafe.Sizeof(p)))\n}\n\n// OAEPParams can be passed to NewMechanism to implement CKM_RSA_PKCS_OAEP.\ntype OAEPParams struct {\n\tHashAlg    uint\n\tMGF        uint\n\tSourceType uint\n\tSourceData []byte\n}\n\n// NewOAEPParams creates a CK_RSA_PKCS_OAEP_PARAMS structure suitable for use with the CKM_RSA_PKCS_OAEP mechanism.\nfunc NewOAEPParams(hashAlg, mgf, sourceType uint, sourceData []byte) *OAEPParams {\n\treturn &OAEPParams{\n\t\tHashAlg:    hashAlg,\n\t\tMGF:        mgf,\n\t\tSourceType: sourceType,\n\t\tSourceData: sourceData,\n\t}\n}\n\nfunc cOAEPParams(p *OAEPParams, arena arena) ([]byte, arena) {\n\tparams := C.CK_RSA_PKCS_OAEP_PARAMS{\n\t\thashAlg: C.CK_MECHANISM_TYPE(p.HashAlg),\n\t\tmgf:     C.CK_RSA_PKCS_MGF_TYPE(p.MGF),\n\t\tsource:  C.CK_RSA_PKCS_OAEP_SOURCE_TYPE(p.SourceType),\n\t}\n\tif len(p.SourceData) != 0 {\n\t\tbuf, len := arena.Allocate(p.SourceData)\n\t\t// field is unaligned on windows so this has to call into C\n\t\tC.putOAEPParams(&params, buf, len)\n\t}\n\treturn C.GoBytes(unsafe.Pointer(&params), C.int(unsafe.Sizeof(params))), arena\n}\n\n// ECDH1DeriveParams can be passed to NewMechanism to implement CK_ECDH1_DERIVE_PARAMS.\ntype ECDH1DeriveParams struct {\n\tKDF           uint\n\tSharedData    []byte\n\tPublicKeyData []byte\n}\n\n// NewECDH1DeriveParams creates a CK_ECDH1_DERIVE_PARAMS structure suitable for use with the CKM_ECDH1_DERIVE mechanism.\nfunc NewECDH1DeriveParams(kdf uint, sharedData []byte, publicKeyData []byte) *ECDH1DeriveParams {\n\treturn &ECDH1DeriveParams{\n\t\tKDF:           kdf,\n\t\tSharedData:    sharedData,\n\t\tPublicKeyData: publicKeyData,\n\t}\n}\n\nfunc cECDH1DeriveParams(p *ECDH1DeriveParams, arena arena) ([]byte, arena) {\n\tparams := C.CK_ECDH1_DERIVE_PARAMS{\n\t\tkdf: C.CK_EC_KDF_TYPE(p.KDF),\n\t}\n\n\t// SharedData MUST be null if key derivation function (KDF) is CKD_NULL\n\tif len(p.SharedData) != 0 {\n\t\tsharedData, sharedDataLen := arena.Allocate(p.SharedData)\n\t\tC.putECDH1SharedParams(&params, sharedData, sharedDataLen)\n\t}\n\n\tpublicKeyData, publicKeyDataLen := arena.Allocate(p.PublicKeyData)\n\tC.putECDH1PublicParams(&params, publicKeyData, publicKeyDataLen)\n\n\treturn C.GoBytes(unsafe.Pointer(&params), C.int(unsafe.Sizeof(params))), arena\n}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/pkcs11.go",
    "content": "// Copyright 2013 Miek Gieben. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run const_generate.go\n\n// Package pkcs11 is a wrapper around the PKCS#11 cryptographic library.\npackage pkcs11\n\n// It is *assumed*, that:\n//\n// * Go's uint size == PKCS11's CK_ULONG size\n// * CK_ULONG never overflows an Go int\n\n/*\n#cgo windows CFLAGS: -DPACKED_STRUCTURES\n#cgo linux LDFLAGS: -ldl\n#cgo darwin LDFLAGS: -ldl\n#cgo openbsd LDFLAGS:\n#cgo freebsd LDFLAGS: -ldl\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <unistd.h>\n\n#include \"pkcs11go.h\"\n\n#ifdef _WIN32\n#include <windows.h>\n\nstruct ctx {\n\tHMODULE handle;\n\tCK_FUNCTION_LIST_PTR sym;\n};\n\n// New initializes a ctx and fills the symbol table.\nstruct ctx *New(const char *module)\n{\n\tCK_C_GetFunctionList list;\n\tstruct ctx *c = calloc(1, sizeof(struct ctx));\n\tc->handle = LoadLibrary(module);\n\tif (c->handle == NULL) {\n\t\tfree(c);\n\t\treturn NULL;\n\t}\n\tlist = (CK_C_GetFunctionList) GetProcAddress(c->handle, \"C_GetFunctionList\");\n\tif (list == NULL) {\n\t\tfree(c);\n\t\treturn NULL;\n\t}\n\tlist(&c->sym);\n\treturn c;\n}\n\n// Destroy cleans up a ctx.\nvoid Destroy(struct ctx *c)\n{\n\tif (!c) {\n\t\treturn;\n\t}\n\tfree(c);\n}\n#else\n#include <dlfcn.h>\n\nstruct ctx {\n\tvoid *handle;\n\tCK_FUNCTION_LIST_PTR sym;\n};\n\n// New initializes a ctx and fills the symbol table.\nstruct ctx *New(const char *module)\n{\n\tCK_C_GetFunctionList list;\n\tstruct ctx *c = calloc(1, sizeof(struct ctx));\n\tc->handle = dlopen(module, RTLD_LAZY);\n\tif (c->handle == NULL) {\n\t\tfree(c);\n\t\treturn NULL;\n\t}\n\tlist = (CK_C_GetFunctionList) dlsym(c->handle, \"C_GetFunctionList\");\n\tif (list == NULL) {\n\t\tfree(c);\n\t\treturn NULL;\n\t}\n\tlist(&c->sym);\n\treturn c;\n}\n\n// Destroy cleans up a ctx.\nvoid Destroy(struct ctx *c)\n{\n\tif (!c) {\n\t\treturn;\n\t}\n\tif (c->handle == NULL) {\n\t\treturn;\n\t}\n\tif (dlclose(c->handle) < 0) {\n\t\treturn;\n\t}\n\tfree(c);\n}\n#endif\n\nCK_RV Initialize(struct ctx * c)\n{\n\tCK_C_INITIALIZE_ARGS args;\n\tmemset(&args, 0, sizeof(args));\n\targs.flags = CKF_OS_LOCKING_OK;\n\treturn c->sym->C_Initialize(&args);\n}\n\nCK_RV Finalize(struct ctx * c)\n{\n\treturn c->sym->C_Finalize(NULL);\n}\n\nCK_RV GetInfo(struct ctx * c, ckInfoPtr info)\n{\n\tCK_INFO p;\n\tCK_RV e = c->sym->C_GetInfo(&p);\n\tif (e != CKR_OK) {\n\t\treturn e;\n\t}\n\tinfo->cryptokiVersion = p.cryptokiVersion;\n\tmemcpy(info->manufacturerID, p.manufacturerID, sizeof(p.manufacturerID));\n\tinfo->flags = p.flags;\n\tmemcpy(info->libraryDescription, p.libraryDescription, sizeof(p.libraryDescription));\n\tinfo->libraryVersion = p.libraryVersion;\n\treturn e;\n}\n\nCK_RV GetSlotList(struct ctx * c, CK_BBOOL tokenPresent,\n\t\t  CK_ULONG_PTR * slotList, CK_ULONG_PTR ulCount)\n{\n\tCK_RV e = c->sym->C_GetSlotList(tokenPresent, NULL, ulCount);\n\tif (e != CKR_OK) {\n\t\treturn e;\n\t}\n\t*slotList = calloc(*ulCount, sizeof(CK_SLOT_ID));\n\te = c->sym->C_GetSlotList(tokenPresent, *slotList, ulCount);\n\treturn e;\n}\n\nCK_RV GetSlotInfo(struct ctx * c, CK_ULONG slotID, CK_SLOT_INFO_PTR info)\n{\n\tCK_RV e = c->sym->C_GetSlotInfo((CK_SLOT_ID) slotID, info);\n\treturn e;\n}\n\nCK_RV GetTokenInfo(struct ctx * c, CK_ULONG slotID, CK_TOKEN_INFO_PTR info)\n{\n\tCK_RV e = c->sym->C_GetTokenInfo((CK_SLOT_ID) slotID, info);\n\treturn e;\n}\n\nCK_RV GetMechanismList(struct ctx * c, CK_ULONG slotID,\n\t\t       CK_ULONG_PTR * mech, CK_ULONG_PTR mechlen)\n{\n\tCK_RV e =\n\t    c->sym->C_GetMechanismList((CK_SLOT_ID) slotID, NULL, mechlen);\n\t// Gemaltos PKCS11 implementation returns CKR_BUFFER_TOO_SMALL on a NULL ptr instad of CKR_OK as the spec states.\n\tif (e != CKR_OK && e != CKR_BUFFER_TOO_SMALL) {\n\t\treturn e;\n\t}\n\t*mech = calloc(*mechlen, sizeof(CK_MECHANISM_TYPE));\n\te = c->sym->C_GetMechanismList((CK_SLOT_ID) slotID,\n\t\t\t\t       (CK_MECHANISM_TYPE_PTR) * mech, mechlen);\n\treturn e;\n}\n\nCK_RV GetMechanismInfo(struct ctx * c, CK_ULONG slotID, CK_MECHANISM_TYPE mech,\n\t\t       CK_MECHANISM_INFO_PTR info)\n{\n\tCK_RV e = c->sym->C_GetMechanismInfo((CK_SLOT_ID) slotID, mech, info);\n\treturn e;\n}\n\nCK_RV InitToken(struct ctx * c, CK_ULONG slotID, char *pin, CK_ULONG pinlen,\n\t\tchar *label)\n{\n\tCK_RV e =\n\t    c->sym->C_InitToken((CK_SLOT_ID) slotID, (CK_UTF8CHAR_PTR) pin,\n\t\t\t\tpinlen, (CK_UTF8CHAR_PTR) label);\n\treturn e;\n}\n\nCK_RV InitPIN(struct ctx * c, CK_SESSION_HANDLE sh, char *pin, CK_ULONG pinlen)\n{\n\tCK_RV e = c->sym->C_InitPIN(sh, (CK_UTF8CHAR_PTR) pin, pinlen);\n\treturn e;\n}\n\nCK_RV SetPIN(struct ctx * c, CK_SESSION_HANDLE sh, char *oldpin,\n\t     CK_ULONG oldpinlen, char *newpin, CK_ULONG newpinlen)\n{\n\tCK_RV e = c->sym->C_SetPIN(sh, (CK_UTF8CHAR_PTR) oldpin, oldpinlen,\n\t\t\t\t   (CK_UTF8CHAR_PTR) newpin, newpinlen);\n\treturn e;\n}\n\nCK_RV OpenSession(struct ctx * c, CK_ULONG slotID, CK_ULONG flags,\n\t\t  CK_SESSION_HANDLE_PTR session)\n{\n\tCK_RV e =\n\t    c->sym->C_OpenSession((CK_SLOT_ID) slotID, (CK_FLAGS) flags, NULL,\n\t\t\t\t  NULL, session);\n\treturn e;\n}\n\nCK_RV CloseSession(struct ctx * c, CK_SESSION_HANDLE session)\n{\n\tCK_RV e = c->sym->C_CloseSession(session);\n\treturn e;\n}\n\nCK_RV CloseAllSessions(struct ctx * c, CK_ULONG slotID)\n{\n\tCK_RV e = c->sym->C_CloseAllSessions(slotID);\n\treturn e;\n}\n\nCK_RV GetSessionInfo(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t     CK_SESSION_INFO_PTR info)\n{\n\tCK_RV e = c->sym->C_GetSessionInfo(session, info);\n\treturn e;\n}\n\nCK_RV GetOperationState(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_BYTE_PTR * state, CK_ULONG_PTR statelen)\n{\n\tCK_RV rv = c->sym->C_GetOperationState(session, NULL, statelen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*state = calloc(*statelen, sizeof(CK_BYTE));\n\tif (*state == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_GetOperationState(session, *state, statelen);\n\treturn rv;\n}\n\nCK_RV SetOperationState(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_BYTE_PTR state, CK_ULONG statelen,\n\t\t\tCK_OBJECT_HANDLE encryptkey, CK_OBJECT_HANDLE authkey)\n{\n\treturn c->sym->C_SetOperationState(session, state, statelen, encryptkey,\n\t\t\t\t\t   authkey);\n}\n\nCK_RV Login(struct ctx *c, CK_SESSION_HANDLE session, CK_USER_TYPE userType,\n\t    char *pin, CK_ULONG pinLen)\n{\n\tif (pinLen == 0) {\n\t\tpin = NULL;\n\t}\n\tCK_RV e =\n\t    c->sym->C_Login(session, userType, (CK_UTF8CHAR_PTR) pin, pinLen);\n\treturn e;\n}\n\nCK_RV Logout(struct ctx * c, CK_SESSION_HANDLE session)\n{\n\tCK_RV e = c->sym->C_Logout(session);\n\treturn e;\n}\n\nCK_RV CreateObject(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t   CK_ATTRIBUTE_PTR temp, CK_ULONG tempCount,\n\t\t   CK_OBJECT_HANDLE_PTR obj)\n{\n\treturn c->sym->C_CreateObject(session, temp, tempCount, obj);\n}\n\nCK_RV CopyObject(struct ctx * c, CK_SESSION_HANDLE session, CK_OBJECT_HANDLE o,\n\t\t CK_ATTRIBUTE_PTR temp, CK_ULONG tempCount,\n\t\t CK_OBJECT_HANDLE_PTR obj)\n{\n\treturn c->sym->C_CopyObject(session, o, temp, tempCount, obj);\n}\n\nCK_RV DestroyObject(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t    CK_OBJECT_HANDLE object)\n{\n\tCK_RV e = c->sym->C_DestroyObject(session, object);\n\treturn e;\n}\n\nCK_RV GetObjectSize(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t    CK_OBJECT_HANDLE object, CK_ULONG_PTR size)\n{\n\tCK_RV e = c->sym->C_GetObjectSize(session, object, size);\n\treturn e;\n}\n\nCK_RV GetAttributeValue(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_OBJECT_HANDLE object, CK_ATTRIBUTE_PTR temp,\n\t\t\tCK_ULONG templen)\n{\n\t// Call for the first time, check the returned ulValue in the attributes, then\n\t// allocate enough space and try again.\n\tCK_RV e = c->sym->C_GetAttributeValue(session, object, temp, templen);\n\tif (e != CKR_OK) {\n\t\treturn e;\n\t}\n\tCK_ULONG i;\n\tfor (i = 0; i < templen; i++) {\n\t\tif ((CK_LONG) temp[i].ulValueLen == -1) {\n\t\t\t// either access denied or no such object\n\t\t\tcontinue;\n\t\t}\n\t\ttemp[i].pValue = calloc(temp[i].ulValueLen, sizeof(CK_BYTE));\n\t}\n\treturn c->sym->C_GetAttributeValue(session, object, temp, templen);\n}\n\nCK_RV SetAttributeValue(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_OBJECT_HANDLE object, CK_ATTRIBUTE_PTR temp,\n\t\t\tCK_ULONG templen)\n{\n\treturn c->sym->C_SetAttributeValue(session, object, temp, templen);\n}\n\nCK_RV FindObjectsInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t      CK_ATTRIBUTE_PTR temp, CK_ULONG tempCount)\n{\n\treturn c->sym->C_FindObjectsInit(session, temp, tempCount);\n}\n\nCK_RV FindObjects(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t  CK_OBJECT_HANDLE_PTR * obj, CK_ULONG max,\n\t\t  CK_ULONG_PTR objCount)\n{\n\t*obj = calloc(max, sizeof(CK_OBJECT_HANDLE));\n\tCK_RV e = c->sym->C_FindObjects(session, *obj, max, objCount);\n\treturn e;\n}\n\nCK_RV FindObjectsFinal(struct ctx * c, CK_SESSION_HANDLE session)\n{\n\tCK_RV e = c->sym->C_FindObjectsFinal(session);\n\treturn e;\n}\n\nCK_RV EncryptInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t  CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_EncryptInit(session, mechanism, key);\n}\n\nCK_RV Encrypt(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR message,\n\t      CK_ULONG mlen, CK_BYTE_PTR * enc, CK_ULONG_PTR enclen)\n{\n\tCK_RV rv = c->sym->C_Encrypt(session, message, mlen, NULL, enclen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*enc = calloc(*enclen, sizeof(CK_BYTE));\n\tif (*enc == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_Encrypt(session, message, mlen, *enc, enclen);\n\treturn rv;\n}\n\nCK_RV EncryptUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t    CK_BYTE_PTR plain, CK_ULONG plainlen, CK_BYTE_PTR * cipher,\n\t\t    CK_ULONG_PTR cipherlen)\n{\n\tCK_RV rv =\n\t    c->sym->C_EncryptUpdate(session, plain, plainlen, NULL, cipherlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*cipher = calloc(*cipherlen, sizeof(CK_BYTE));\n\tif (*cipher == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_EncryptUpdate(session, plain, plainlen, *cipher,\n\t\t\t\t     cipherlen);\n\treturn rv;\n}\n\nCK_RV EncryptFinal(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t   CK_BYTE_PTR * cipher, CK_ULONG_PTR cipherlen)\n{\n\tCK_RV rv = c->sym->C_EncryptFinal(session, NULL, cipherlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*cipher = calloc(*cipherlen, sizeof(CK_BYTE));\n\tif (*cipher == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_EncryptFinal(session, *cipher, cipherlen);\n\treturn rv;\n}\n\nCK_RV DecryptInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t  CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_DecryptInit(session, mechanism, key);\n}\n\nCK_RV Decrypt(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR cipher,\n\t      CK_ULONG clen, CK_BYTE_PTR * plain, CK_ULONG_PTR plainlen)\n{\n\tCK_RV e = c->sym->C_Decrypt(session, cipher, clen, NULL, plainlen);\n\tif (e != CKR_OK) {\n\t\treturn e;\n\t}\n\t*plain = calloc(*plainlen, sizeof(CK_BYTE));\n\tif (*plain == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\te = c->sym->C_Decrypt(session, cipher, clen, *plain, plainlen);\n\treturn e;\n}\n\nCK_RV DecryptUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t    CK_BYTE_PTR cipher, CK_ULONG cipherlen, CK_BYTE_PTR * part,\n\t\t    CK_ULONG_PTR partlen)\n{\n\tCK_RV rv =\n\t    c->sym->C_DecryptUpdate(session, cipher, cipherlen, NULL, partlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*part = calloc(*partlen, sizeof(CK_BYTE));\n\tif (*part == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DecryptUpdate(session, cipher, cipherlen, *part,\n\t\t\t\t     partlen);\n\treturn rv;\n}\n\nCK_RV DecryptFinal(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t   CK_BYTE_PTR * plain, CK_ULONG_PTR plainlen)\n{\n\tCK_RV rv = c->sym->C_DecryptFinal(session, NULL, plainlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*plain = calloc(*plainlen, sizeof(CK_BYTE));\n\tif (*plain == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DecryptFinal(session, *plain, plainlen);\n\treturn rv;\n}\n\nCK_RV DigestInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t CK_MECHANISM_PTR mechanism)\n{\n\treturn c->sym->C_DigestInit(session, mechanism);\n}\n\nCK_RV Digest(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR message,\n\t     CK_ULONG mlen, CK_BYTE_PTR * hash, CK_ULONG_PTR hashlen)\n{\n\tCK_RV rv = c->sym->C_Digest(session, message, mlen, NULL, hashlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*hash = calloc(*hashlen, sizeof(CK_BYTE));\n\tif (*hash == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_Digest(session, message, mlen, *hash, hashlen);\n\treturn rv;\n}\n\nCK_RV DigestUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t   CK_BYTE_PTR message, CK_ULONG mlen)\n{\n\tCK_RV rv = c->sym->C_DigestUpdate(session, message, mlen);\n\treturn rv;\n}\n\nCK_RV DigestKey(struct ctx * c, CK_SESSION_HANDLE session, CK_OBJECT_HANDLE key)\n{\n\tCK_RV rv = c->sym->C_DigestKey(session, key);\n\treturn rv;\n}\n\nCK_RV DigestFinal(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR * hash,\n\t\t  CK_ULONG_PTR hashlen)\n{\n\tCK_RV rv = c->sym->C_DigestFinal(session, NULL, hashlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*hash = calloc(*hashlen, sizeof(CK_BYTE));\n\tif (*hash == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DigestFinal(session, *hash, hashlen);\n\treturn rv;\n}\n\nCK_RV SignInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t       CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_SignInit(session, mechanism, key);\n}\n\nCK_RV Sign(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR message,\n\t   CK_ULONG mlen, CK_BYTE_PTR * sig, CK_ULONG_PTR siglen)\n{\n\tCK_RV rv = c->sym->C_Sign(session, message, mlen, NULL, siglen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*sig = calloc(*siglen, sizeof(CK_BYTE));\n\tif (*sig == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_Sign(session, message, mlen, *sig, siglen);\n\treturn rv;\n}\n\nCK_RV SignUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t CK_BYTE_PTR message, CK_ULONG mlen)\n{\n\tCK_RV rv = c->sym->C_SignUpdate(session, message, mlen);\n\treturn rv;\n}\n\nCK_RV SignFinal(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR * sig,\n\t\tCK_ULONG_PTR siglen)\n{\n\tCK_RV rv = c->sym->C_SignFinal(session, NULL, siglen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*sig = calloc(*siglen, sizeof(CK_BYTE));\n\tif (*sig == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_SignFinal(session, *sig, siglen);\n\treturn rv;\n}\n\nCK_RV SignRecoverInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t      CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_SignRecoverInit(session, mechanism, key);\n}\n\nCK_RV SignRecover(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR data,\n\t\t  CK_ULONG datalen, CK_BYTE_PTR * sig, CK_ULONG_PTR siglen)\n{\n\tCK_RV rv = c->sym->C_SignRecover(session, data, datalen, NULL, siglen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*sig = calloc(*siglen, sizeof(CK_BYTE));\n\tif (*sig == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_SignRecover(session, data, datalen, *sig, siglen);\n\treturn rv;\n}\n\nCK_RV VerifyInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_VerifyInit(session, mechanism, key);\n}\n\nCK_RV Verify(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR message,\n\t     CK_ULONG mesglen, CK_BYTE_PTR sig, CK_ULONG siglen)\n{\n\tCK_RV rv = c->sym->C_Verify(session, message, mesglen, sig, siglen);\n\treturn rv;\n}\n\nCK_RV VerifyUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t   CK_BYTE_PTR part, CK_ULONG partlen)\n{\n\tCK_RV rv = c->sym->C_VerifyUpdate(session, part, partlen);\n\treturn rv;\n}\n\nCK_RV VerifyFinal(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR sig,\n\t\t  CK_ULONG siglen)\n{\n\tCK_RV rv = c->sym->C_VerifyFinal(session, sig, siglen);\n\treturn rv;\n}\n\nCK_RV VerifyRecoverInit(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key)\n{\n\treturn c->sym->C_VerifyRecoverInit(session, mechanism, key);\n}\n\nCK_RV VerifyRecover(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR sig,\n\t\t    CK_ULONG siglen, CK_BYTE_PTR * data, CK_ULONG_PTR datalen)\n{\n\tCK_RV rv = c->sym->C_VerifyRecover(session, sig, siglen, NULL, datalen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*data = calloc(*datalen, sizeof(CK_BYTE));\n\tif (*data == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_VerifyRecover(session, sig, siglen, *data, datalen);\n\treturn rv;\n}\n\nCK_RV DigestEncryptUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\t  CK_BYTE_PTR part, CK_ULONG partlen, CK_BYTE_PTR * enc,\n\t\t\t  CK_ULONG_PTR enclen)\n{\n\tCK_RV rv =\n\t    c->sym->C_DigestEncryptUpdate(session, part, partlen, NULL, enclen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*enc = calloc(*enclen, sizeof(CK_BYTE));\n\tif (*enc == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DigestEncryptUpdate(session, part, partlen, *enc,\n\t\t\t\t\t   enclen);\n\treturn rv;\n}\n\nCK_RV DecryptDigestUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\t  CK_BYTE_PTR cipher, CK_ULONG cipherlen,\n\t\t\t  CK_BYTE_PTR * part, CK_ULONG_PTR partlen)\n{\n\tCK_RV rv =\n\t    c->sym->C_DecryptDigestUpdate(session, cipher, cipherlen, NULL,\n\t\t\t\t\t  partlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*part = calloc(*partlen, sizeof(CK_BYTE));\n\tif (*part == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DecryptDigestUpdate(session, cipher, cipherlen, *part,\n\t\t\t\t\t   partlen);\n\treturn rv;\n}\n\nCK_RV SignEncryptUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\tCK_BYTE_PTR part, CK_ULONG partlen, CK_BYTE_PTR * enc,\n\t\t\tCK_ULONG_PTR enclen)\n{\n\tCK_RV rv =\n\t    c->sym->C_SignEncryptUpdate(session, part, partlen, NULL, enclen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*enc = calloc(*enclen, sizeof(CK_BYTE));\n\tif (*enc == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_SignEncryptUpdate(session, part, partlen, *enc, enclen);\n\treturn rv;\n}\n\nCK_RV DecryptVerifyUpdate(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t\t  CK_BYTE_PTR cipher, CK_ULONG cipherlen,\n\t\t\t  CK_BYTE_PTR * part, CK_ULONG_PTR partlen)\n{\n\tCK_RV rv =\n\t    c->sym->C_DecryptVerifyUpdate(session, cipher, cipherlen, NULL,\n\t\t\t\t\t  partlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*part = calloc(*partlen, sizeof(CK_BYTE));\n\tif (*part == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_DecryptVerifyUpdate(session, cipher, cipherlen, *part,\n\t\t\t\t\t   partlen);\n\treturn rv;\n}\n\nCK_RV GenerateKey(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t  CK_MECHANISM_PTR mechanism, CK_ATTRIBUTE_PTR temp,\n\t\t  CK_ULONG tempCount, CK_OBJECT_HANDLE_PTR key)\n{\n\treturn c->sym->C_GenerateKey(session, mechanism, temp, tempCount, key);\n}\n\nCK_RV GenerateKeyPair(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t      CK_MECHANISM_PTR mechanism, CK_ATTRIBUTE_PTR pub,\n\t\t      CK_ULONG pubCount, CK_ATTRIBUTE_PTR priv,\n\t\t      CK_ULONG privCount, CK_OBJECT_HANDLE_PTR pubkey,\n\t\t      CK_OBJECT_HANDLE_PTR privkey)\n{\n\treturn c->sym->C_GenerateKeyPair(session, mechanism, pub, pubCount,\n\t\tpriv, privCount, pubkey, privkey);\n}\n\nCK_RV WrapKey(struct ctx * c, CK_SESSION_HANDLE session,\n\t      CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE wrappingkey,\n\t      CK_OBJECT_HANDLE key, CK_BYTE_PTR * wrapped,\n\t      CK_ULONG_PTR wrappedlen)\n{\n\tCK_RV rv = c->sym->C_WrapKey(session, mechanism, wrappingkey, key, NULL,\n\t\t\t\t     wrappedlen);\n\tif (rv != CKR_OK) {\n\t\treturn rv;\n\t}\n\t*wrapped = calloc(*wrappedlen, sizeof(CK_BYTE));\n\tif (*wrapped == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\trv = c->sym->C_WrapKey(session, mechanism, wrappingkey, key, *wrapped,\n\t\t\t       wrappedlen);\n\treturn rv;\n}\n\nCK_RV DeriveKey(struct ctx * c, CK_SESSION_HANDLE session,\n\t\tCK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE basekey,\n\t\tCK_ATTRIBUTE_PTR a, CK_ULONG alen, CK_OBJECT_HANDLE_PTR key)\n{\n\treturn c->sym->C_DeriveKey(session, mechanism, basekey, a, alen, key);\n}\n\nCK_RV UnwrapKey(struct ctx * c, CK_SESSION_HANDLE session,\n\t\tCK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE unwrappingkey,\n\t\tCK_BYTE_PTR wrappedkey, CK_ULONG wrappedkeylen,\n\t\tCK_ATTRIBUTE_PTR a, CK_ULONG alen, CK_OBJECT_HANDLE_PTR key)\n{\n\treturn c->sym->C_UnwrapKey(session, mechanism, unwrappingkey, wrappedkey,\n\t\t\t\t      wrappedkeylen, a, alen, key);\n}\n\nCK_RV SeedRandom(struct ctx * c, CK_SESSION_HANDLE session, CK_BYTE_PTR seed,\n\t\t CK_ULONG seedlen)\n{\n\tCK_RV e = c->sym->C_SeedRandom(session, seed, seedlen);\n\treturn e;\n}\n\nCK_RV GenerateRandom(struct ctx * c, CK_SESSION_HANDLE session,\n\t\t     CK_BYTE_PTR * rand, CK_ULONG length)\n{\n\t*rand = calloc(length, sizeof(CK_BYTE));\n\tif (*rand == NULL) {\n\t\treturn CKR_HOST_MEMORY;\n\t}\n\tCK_RV e = c->sym->C_GenerateRandom(session, *rand, length);\n\treturn e;\n}\n\nCK_RV WaitForSlotEvent(struct ctx * c, CK_FLAGS flags, CK_ULONG_PTR slot)\n{\n\tCK_RV e =\n\t    c->sym->C_WaitForSlotEvent(flags, (CK_SLOT_ID_PTR) slot, NULL);\n\treturn e;\n}\n\nstatic inline CK_VOID_PTR getAttributePval(CK_ATTRIBUTE_PTR a)\n{\n\treturn a->pValue;\n}\n\n*/\nimport \"C\"\nimport (\n\t\"strings\"\n\t\"unsafe\"\n)\n\n// Ctx contains the current pkcs11 context.\ntype Ctx struct {\n\tctx *C.struct_ctx\n}\n\n// New creates a new context and initializes the module/library for use.\nfunc New(module string) *Ctx {\n\tc := new(Ctx)\n\tmod := C.CString(module)\n\tdefer C.free(unsafe.Pointer(mod))\n\tc.ctx = C.New(mod)\n\tif c.ctx == nil {\n\t\treturn nil\n\t}\n\treturn c\n}\n\n// Destroy unloads the module/library and frees any remaining memory.\nfunc (c *Ctx) Destroy() {\n\tif c == nil || c.ctx == nil {\n\t\treturn\n\t}\n\tC.Destroy(c.ctx)\n\tc.ctx = nil\n}\n\n// Initialize initializes the Cryptoki library.\nfunc (c *Ctx) Initialize() error {\n\te := C.Initialize(c.ctx)\n\treturn toError(e)\n}\n\n// Finalize indicates that an application is done with the Cryptoki library.\nfunc (c *Ctx) Finalize() error {\n\tif c.ctx == nil {\n\t\treturn toError(CKR_CRYPTOKI_NOT_INITIALIZED)\n\t}\n\te := C.Finalize(c.ctx)\n\treturn toError(e)\n}\n\n// GetInfo returns general information about Cryptoki.\nfunc (c *Ctx) GetInfo() (Info, error) {\n\tvar p C.ckInfo\n\te := C.GetInfo(c.ctx, &p)\n\ti := Info{\n\t\tCryptokiVersion:    toVersion(p.cryptokiVersion),\n\t\tManufacturerID:     strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&p.manufacturerID[0]), 32)), \" \"),\n\t\tFlags:              uint(p.flags),\n\t\tLibraryDescription: strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&p.libraryDescription[0]), 32)), \" \"),\n\t\tLibraryVersion:     toVersion(p.libraryVersion),\n\t}\n\treturn i, toError(e)\n}\n\n// GetSlotList obtains a list of slots in the system.\nfunc (c *Ctx) GetSlotList(tokenPresent bool) ([]uint, error) {\n\tvar (\n\t\tslotList C.CK_ULONG_PTR\n\t\tulCount  C.CK_ULONG\n\t)\n\te := C.GetSlotList(c.ctx, cBBool(tokenPresent), &slotList, &ulCount)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\tl := toList(slotList, ulCount)\n\treturn l, nil\n}\n\n// GetSlotInfo obtains information about a particular slot in the system.\nfunc (c *Ctx) GetSlotInfo(slotID uint) (SlotInfo, error) {\n\tvar csi C.CK_SLOT_INFO\n\te := C.GetSlotInfo(c.ctx, C.CK_ULONG(slotID), &csi)\n\ts := SlotInfo{\n\t\tSlotDescription: strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&csi.slotDescription[0]), 64)), \" \"),\n\t\tManufacturerID:  strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&csi.manufacturerID[0]), 32)), \" \"),\n\t\tFlags:           uint(csi.flags),\n\t\tHardwareVersion: toVersion(csi.hardwareVersion),\n\t\tFirmwareVersion: toVersion(csi.firmwareVersion),\n\t}\n\treturn s, toError(e)\n}\n\n// GetTokenInfo obtains information about a particular token\n// in the system.\nfunc (c *Ctx) GetTokenInfo(slotID uint) (TokenInfo, error) {\n\tvar cti C.CK_TOKEN_INFO\n\te := C.GetTokenInfo(c.ctx, C.CK_ULONG(slotID), &cti)\n\ts := TokenInfo{\n\t\tLabel:              strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&cti.label[0]), 32)), \" \"),\n\t\tManufacturerID:     strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&cti.manufacturerID[0]), 32)), \" \"),\n\t\tModel:              strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&cti.model[0]), 16)), \" \"),\n\t\tSerialNumber:       strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&cti.serialNumber[0]), 16)), \" \"),\n\t\tFlags:              uint(cti.flags),\n\t\tMaxSessionCount:    uint(cti.ulMaxSessionCount),\n\t\tSessionCount:       uint(cti.ulSessionCount),\n\t\tMaxRwSessionCount:  uint(cti.ulMaxRwSessionCount),\n\t\tRwSessionCount:     uint(cti.ulRwSessionCount),\n\t\tMaxPinLen:          uint(cti.ulMaxPinLen),\n\t\tMinPinLen:          uint(cti.ulMinPinLen),\n\t\tTotalPublicMemory:  uint(cti.ulTotalPublicMemory),\n\t\tFreePublicMemory:   uint(cti.ulFreePublicMemory),\n\t\tTotalPrivateMemory: uint(cti.ulTotalPrivateMemory),\n\t\tFreePrivateMemory:  uint(cti.ulFreePrivateMemory),\n\t\tHardwareVersion:    toVersion(cti.hardwareVersion),\n\t\tFirmwareVersion:    toVersion(cti.firmwareVersion),\n\t\tUTCTime:            strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&cti.utcTime[0]), 16)), \" \"),\n\t}\n\treturn s, toError(e)\n}\n\n// GetMechanismList obtains a list of mechanism types supported by a token.\nfunc (c *Ctx) GetMechanismList(slotID uint) ([]*Mechanism, error) {\n\tvar (\n\t\tmech    C.CK_ULONG_PTR // in pkcs#11 we're all CK_ULONGs \\o/\n\t\tmechlen C.CK_ULONG\n\t)\n\te := C.GetMechanismList(c.ctx, C.CK_ULONG(slotID), &mech, &mechlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\t// Although the function returns only type, cast them back into real\n\t// attributes as this is used in other functions.\n\tm := make([]*Mechanism, int(mechlen))\n\tfor i, typ := range toList(mech, mechlen) {\n\t\tm[i] = NewMechanism(typ, nil)\n\t}\n\treturn m, nil\n}\n\n// GetMechanismInfo obtains information about a particular\n// mechanism possibly supported by a token.\nfunc (c *Ctx) GetMechanismInfo(slotID uint, m []*Mechanism) (MechanismInfo, error) {\n\tvar cm C.CK_MECHANISM_INFO\n\te := C.GetMechanismInfo(c.ctx, C.CK_ULONG(slotID), C.CK_MECHANISM_TYPE(m[0].Mechanism),\n\t\tC.CK_MECHANISM_INFO_PTR(&cm))\n\tmi := MechanismInfo{\n\t\tMinKeySize: uint(cm.ulMinKeySize),\n\t\tMaxKeySize: uint(cm.ulMaxKeySize),\n\t\tFlags:      uint(cm.flags),\n\t}\n\treturn mi, toError(e)\n}\n\n// InitToken initializes a token. The label must be 32 characters\n// long, it is blank padded if it is not. If it is longer it is capped\n// to 32 characters.\nfunc (c *Ctx) InitToken(slotID uint, pin string, label string) error {\n\tp := C.CString(pin)\n\tdefer C.free(unsafe.Pointer(p))\n\tll := len(label)\n\tfor ll < 32 {\n\t\tlabel += \" \"\n\t\tll++\n\t}\n\tl := C.CString(label[:32])\n\tdefer C.free(unsafe.Pointer(l))\n\te := C.InitToken(c.ctx, C.CK_ULONG(slotID), p, C.CK_ULONG(len(pin)), l)\n\treturn toError(e)\n}\n\n// InitPIN initializes the normal user's PIN.\nfunc (c *Ctx) InitPIN(sh SessionHandle, pin string) error {\n\tp := C.CString(pin)\n\tdefer C.free(unsafe.Pointer(p))\n\te := C.InitPIN(c.ctx, C.CK_SESSION_HANDLE(sh), p, C.CK_ULONG(len(pin)))\n\treturn toError(e)\n}\n\n// SetPIN modifies the PIN of the user who is logged in.\nfunc (c *Ctx) SetPIN(sh SessionHandle, oldpin string, newpin string) error {\n\told := C.CString(oldpin)\n\tdefer C.free(unsafe.Pointer(old))\n\tnew := C.CString(newpin)\n\tdefer C.free(unsafe.Pointer(new))\n\te := C.SetPIN(c.ctx, C.CK_SESSION_HANDLE(sh), old, C.CK_ULONG(len(oldpin)), new, C.CK_ULONG(len(newpin)))\n\treturn toError(e)\n}\n\n// OpenSession opens a session between an application and a token.\nfunc (c *Ctx) OpenSession(slotID uint, flags uint) (SessionHandle, error) {\n\tvar s C.CK_SESSION_HANDLE\n\te := C.OpenSession(c.ctx, C.CK_ULONG(slotID), C.CK_ULONG(flags), C.CK_SESSION_HANDLE_PTR(&s))\n\treturn SessionHandle(s), toError(e)\n}\n\n// CloseSession closes a session between an application and a token.\nfunc (c *Ctx) CloseSession(sh SessionHandle) error {\n\tif c.ctx == nil {\n\t\treturn toError(CKR_CRYPTOKI_NOT_INITIALIZED)\n\t}\n\te := C.CloseSession(c.ctx, C.CK_SESSION_HANDLE(sh))\n\treturn toError(e)\n}\n\n// CloseAllSessions closes all sessions with a token.\nfunc (c *Ctx) CloseAllSessions(slotID uint) error {\n\tif c.ctx == nil {\n\t\treturn toError(CKR_CRYPTOKI_NOT_INITIALIZED)\n\t}\n\te := C.CloseAllSessions(c.ctx, C.CK_ULONG(slotID))\n\treturn toError(e)\n}\n\n// GetSessionInfo obtains information about the session.\nfunc (c *Ctx) GetSessionInfo(sh SessionHandle) (SessionInfo, error) {\n\tvar csi C.CK_SESSION_INFO\n\te := C.GetSessionInfo(c.ctx, C.CK_SESSION_HANDLE(sh), &csi)\n\ts := SessionInfo{SlotID: uint(csi.slotID),\n\t\tState:       uint(csi.state),\n\t\tFlags:       uint(csi.flags),\n\t\tDeviceError: uint(csi.ulDeviceError),\n\t}\n\treturn s, toError(e)\n}\n\n// GetOperationState obtains the state of the cryptographic operation in a session.\nfunc (c *Ctx) GetOperationState(sh SessionHandle) ([]byte, error) {\n\tvar (\n\t\tstate    C.CK_BYTE_PTR\n\t\tstatelen C.CK_ULONG\n\t)\n\te := C.GetOperationState(c.ctx, C.CK_SESSION_HANDLE(sh), &state, &statelen)\n\tdefer C.free(unsafe.Pointer(state))\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\tb := C.GoBytes(unsafe.Pointer(state), C.int(statelen))\n\treturn b, nil\n}\n\n// SetOperationState restores the state of the cryptographic operation in a session.\nfunc (c *Ctx) SetOperationState(sh SessionHandle, state []byte, encryptKey, authKey ObjectHandle) error {\n\te := C.SetOperationState(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_BYTE_PTR(unsafe.Pointer(&state[0])),\n\t\tC.CK_ULONG(len(state)), C.CK_OBJECT_HANDLE(encryptKey), C.CK_OBJECT_HANDLE(authKey))\n\treturn toError(e)\n}\n\n// Login logs a user into a token.\nfunc (c *Ctx) Login(sh SessionHandle, userType uint, pin string) error {\n\tp := C.CString(pin)\n\tdefer C.free(unsafe.Pointer(p))\n\te := C.Login(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_USER_TYPE(userType), p, C.CK_ULONG(len(pin)))\n\treturn toError(e)\n}\n\n// Logout logs a user out from a token.\nfunc (c *Ctx) Logout(sh SessionHandle) error {\n\tif c.ctx == nil {\n\t\treturn toError(CKR_CRYPTOKI_NOT_INITIALIZED)\n\t}\n\te := C.Logout(c.ctx, C.CK_SESSION_HANDLE(sh))\n\treturn toError(e)\n}\n\n// CreateObject creates a new object.\nfunc (c *Ctx) CreateObject(sh SessionHandle, temp []*Attribute) (ObjectHandle, error) {\n\tvar obj C.CK_OBJECT_HANDLE\n\tarena, t, tcount := cAttributeList(temp)\n\tdefer arena.Free()\n\te := C.CreateObject(c.ctx, C.CK_SESSION_HANDLE(sh), t, tcount, C.CK_OBJECT_HANDLE_PTR(&obj))\n\te1 := toError(e)\n\tif e1 == nil {\n\t\treturn ObjectHandle(obj), nil\n\t}\n\treturn 0, e1\n}\n\n// CopyObject copies an object, creating a new object for the copy.\nfunc (c *Ctx) CopyObject(sh SessionHandle, o ObjectHandle, temp []*Attribute) (ObjectHandle, error) {\n\tvar obj C.CK_OBJECT_HANDLE\n\tarena, t, tcount := cAttributeList(temp)\n\tdefer arena.Free()\n\n\te := C.CopyObject(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(o), t, tcount, C.CK_OBJECT_HANDLE_PTR(&obj))\n\te1 := toError(e)\n\tif e1 == nil {\n\t\treturn ObjectHandle(obj), nil\n\t}\n\treturn 0, e1\n}\n\n// DestroyObject destroys an object.\nfunc (c *Ctx) DestroyObject(sh SessionHandle, oh ObjectHandle) error {\n\te := C.DestroyObject(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(oh))\n\treturn toError(e)\n}\n\n// GetObjectSize gets the size of an object in bytes.\nfunc (c *Ctx) GetObjectSize(sh SessionHandle, oh ObjectHandle) (uint, error) {\n\tvar size C.CK_ULONG\n\te := C.GetObjectSize(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(oh), &size)\n\treturn uint(size), toError(e)\n}\n\n// GetAttributeValue obtains the value of one or more object attributes.\nfunc (c *Ctx) GetAttributeValue(sh SessionHandle, o ObjectHandle, a []*Attribute) ([]*Attribute, error) {\n\t// copy the attribute list and make all the values nil, so that\n\t// the C function can (allocate) fill them in\n\tpa := make([]C.CK_ATTRIBUTE, len(a))\n\tfor i := 0; i < len(a); i++ {\n\t\tpa[i]._type = C.CK_ATTRIBUTE_TYPE(a[i].Type)\n\t}\n\te := C.GetAttributeValue(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(o), &pa[0], C.CK_ULONG(len(a)))\n\tif err := toError(e); err != nil {\n\t\treturn nil, err\n\t}\n\ta1 := make([]*Attribute, len(a))\n\tfor i, c := range pa {\n\t\tx := new(Attribute)\n\t\tx.Type = uint(c._type)\n\t\tif int(c.ulValueLen) != -1 {\n\t\t\tbuf := unsafe.Pointer(C.getAttributePval(&c))\n\t\t\tx.Value = C.GoBytes(buf, C.int(c.ulValueLen))\n\t\t\tC.free(buf)\n\t\t}\n\t\ta1[i] = x\n\t}\n\treturn a1, nil\n}\n\n// SetAttributeValue modifies the value of one or more object attributes\nfunc (c *Ctx) SetAttributeValue(sh SessionHandle, o ObjectHandle, a []*Attribute) error {\n\tarena, pa, palen := cAttributeList(a)\n\tdefer arena.Free()\n\te := C.SetAttributeValue(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(o), pa, palen)\n\treturn toError(e)\n}\n\n// FindObjectsInit initializes a search for token and session\n// objects that match a template.\nfunc (c *Ctx) FindObjectsInit(sh SessionHandle, temp []*Attribute) error {\n\tarena, t, tcount := cAttributeList(temp)\n\tdefer arena.Free()\n\te := C.FindObjectsInit(c.ctx, C.CK_SESSION_HANDLE(sh), t, tcount)\n\treturn toError(e)\n}\n\n// FindObjects continues a search for token and session\n// objects that match a template, obtaining additional object\n// handles. Calling the function repeatedly may yield additional results until\n// an empty slice is returned.\n//\n// The returned boolean value is deprecated and should be ignored.\nfunc (c *Ctx) FindObjects(sh SessionHandle, max int) ([]ObjectHandle, bool, error) {\n\tvar (\n\t\tobjectList C.CK_OBJECT_HANDLE_PTR\n\t\tulCount    C.CK_ULONG\n\t)\n\te := C.FindObjects(c.ctx, C.CK_SESSION_HANDLE(sh), &objectList, C.CK_ULONG(max), &ulCount)\n\tif toError(e) != nil {\n\t\treturn nil, false, toError(e)\n\t}\n\tl := toList(C.CK_ULONG_PTR(unsafe.Pointer(objectList)), ulCount)\n\t// Make again a new list of the correct type.\n\t// This is copying data, but this is not an often used function.\n\to := make([]ObjectHandle, len(l))\n\tfor i, v := range l {\n\t\to[i] = ObjectHandle(v)\n\t}\n\treturn o, ulCount > C.CK_ULONG(max), nil\n}\n\n// FindObjectsFinal finishes a search for token and session objects.\nfunc (c *Ctx) FindObjectsFinal(sh SessionHandle) error {\n\te := C.FindObjectsFinal(c.ctx, C.CK_SESSION_HANDLE(sh))\n\treturn toError(e)\n}\n\n// EncryptInit initializes an encryption operation.\nfunc (c *Ctx) EncryptInit(sh SessionHandle, m []*Mechanism, o ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.EncryptInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(o))\n\treturn toError(e)\n}\n\n// Encrypt encrypts single-part data.\nfunc (c *Ctx) Encrypt(sh SessionHandle, message []byte) ([]byte, error) {\n\tvar (\n\t\tenc    C.CK_BYTE_PTR\n\t\tenclen C.CK_ULONG\n\t)\n\te := C.Encrypt(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(message), C.CK_ULONG(len(message)), &enc, &enclen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\ts := C.GoBytes(unsafe.Pointer(enc), C.int(enclen))\n\tC.free(unsafe.Pointer(enc))\n\treturn s, nil\n}\n\n// EncryptUpdate continues a multiple-part encryption operation.\nfunc (c *Ctx) EncryptUpdate(sh SessionHandle, plain []byte) ([]byte, error) {\n\tvar (\n\t\tpart    C.CK_BYTE_PTR\n\t\tpartlen C.CK_ULONG\n\t)\n\te := C.EncryptUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(plain), C.CK_ULONG(len(plain)), &part, &partlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(part), C.int(partlen))\n\tC.free(unsafe.Pointer(part))\n\treturn h, nil\n}\n\n// EncryptFinal finishes a multiple-part encryption operation.\nfunc (c *Ctx) EncryptFinal(sh SessionHandle) ([]byte, error) {\n\tvar (\n\t\tenc    C.CK_BYTE_PTR\n\t\tenclen C.CK_ULONG\n\t)\n\te := C.EncryptFinal(c.ctx, C.CK_SESSION_HANDLE(sh), &enc, &enclen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(enc), C.int(enclen))\n\tC.free(unsafe.Pointer(enc))\n\treturn h, nil\n}\n\n// DecryptInit initializes a decryption operation.\nfunc (c *Ctx) DecryptInit(sh SessionHandle, m []*Mechanism, o ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.DecryptInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(o))\n\treturn toError(e)\n}\n\n// Decrypt decrypts encrypted data in a single part.\nfunc (c *Ctx) Decrypt(sh SessionHandle, cipher []byte) ([]byte, error) {\n\tvar (\n\t\tplain    C.CK_BYTE_PTR\n\t\tplainlen C.CK_ULONG\n\t)\n\te := C.Decrypt(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(cipher), C.CK_ULONG(len(cipher)), &plain, &plainlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\ts := C.GoBytes(unsafe.Pointer(plain), C.int(plainlen))\n\tC.free(unsafe.Pointer(plain))\n\treturn s, nil\n}\n\n// DecryptUpdate continues a multiple-part decryption operation.\nfunc (c *Ctx) DecryptUpdate(sh SessionHandle, cipher []byte) ([]byte, error) {\n\tvar (\n\t\tpart    C.CK_BYTE_PTR\n\t\tpartlen C.CK_ULONG\n\t)\n\te := C.DecryptUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(cipher), C.CK_ULONG(len(cipher)), &part, &partlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(part), C.int(partlen))\n\tC.free(unsafe.Pointer(part))\n\treturn h, nil\n}\n\n// DecryptFinal finishes a multiple-part decryption operation.\nfunc (c *Ctx) DecryptFinal(sh SessionHandle) ([]byte, error) {\n\tvar (\n\t\tplain    C.CK_BYTE_PTR\n\t\tplainlen C.CK_ULONG\n\t)\n\te := C.DecryptFinal(c.ctx, C.CK_SESSION_HANDLE(sh), &plain, &plainlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(plain), C.int(plainlen))\n\tC.free(unsafe.Pointer(plain))\n\treturn h, nil\n}\n\n// DigestInit initializes a message-digesting operation.\nfunc (c *Ctx) DigestInit(sh SessionHandle, m []*Mechanism) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.DigestInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech)\n\treturn toError(e)\n}\n\n// Digest digests message in a single part.\nfunc (c *Ctx) Digest(sh SessionHandle, message []byte) ([]byte, error) {\n\tvar (\n\t\thash    C.CK_BYTE_PTR\n\t\thashlen C.CK_ULONG\n\t)\n\te := C.Digest(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(message), C.CK_ULONG(len(message)), &hash, &hashlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(hash), C.int(hashlen))\n\tC.free(unsafe.Pointer(hash))\n\treturn h, nil\n}\n\n// DigestUpdate continues a multiple-part message-digesting operation.\nfunc (c *Ctx) DigestUpdate(sh SessionHandle, message []byte) error {\n\te := C.DigestUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(message), C.CK_ULONG(len(message)))\n\tif toError(e) != nil {\n\t\treturn toError(e)\n\t}\n\treturn nil\n}\n\n// DigestKey continues a multi-part message-digesting\n// operation, by digesting the value of a secret key as part of\n// the data already digested.\nfunc (c *Ctx) DigestKey(sh SessionHandle, key ObjectHandle) error {\n\te := C.DigestKey(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_OBJECT_HANDLE(key))\n\tif toError(e) != nil {\n\t\treturn toError(e)\n\t}\n\treturn nil\n}\n\n// DigestFinal finishes a multiple-part message-digesting operation.\nfunc (c *Ctx) DigestFinal(sh SessionHandle) ([]byte, error) {\n\tvar (\n\t\thash    C.CK_BYTE_PTR\n\t\thashlen C.CK_ULONG\n\t)\n\te := C.DigestFinal(c.ctx, C.CK_SESSION_HANDLE(sh), &hash, &hashlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(hash), C.int(hashlen))\n\tC.free(unsafe.Pointer(hash))\n\treturn h, nil\n}\n\n// SignInit initializes a signature (private key encryption)\n// operation, where the signature is (will be) an appendix to\n// the data, and plaintext cannot be recovered from the signature.\nfunc (c *Ctx) SignInit(sh SessionHandle, m []*Mechanism, o ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.SignInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(o))\n\treturn toError(e)\n}\n\n// Sign signs (encrypts with private key) data in a single part, where the signature\n// is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.\nfunc (c *Ctx) Sign(sh SessionHandle, message []byte) ([]byte, error) {\n\tvar (\n\t\tsig    C.CK_BYTE_PTR\n\t\tsiglen C.CK_ULONG\n\t)\n\te := C.Sign(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(message), C.CK_ULONG(len(message)), &sig, &siglen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\ts := C.GoBytes(unsafe.Pointer(sig), C.int(siglen))\n\tC.free(unsafe.Pointer(sig))\n\treturn s, nil\n}\n\n// SignUpdate continues a multiple-part signature operation,\n// where the signature is (will be) an appendix to the data,\n// and plaintext cannot be recovered from the signature.\nfunc (c *Ctx) SignUpdate(sh SessionHandle, message []byte) error {\n\te := C.SignUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(message), C.CK_ULONG(len(message)))\n\treturn toError(e)\n}\n\n// SignFinal finishes a multiple-part signature operation returning the signature.\nfunc (c *Ctx) SignFinal(sh SessionHandle) ([]byte, error) {\n\tvar (\n\t\tsig    C.CK_BYTE_PTR\n\t\tsiglen C.CK_ULONG\n\t)\n\te := C.SignFinal(c.ctx, C.CK_SESSION_HANDLE(sh), &sig, &siglen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(sig), C.int(siglen))\n\tC.free(unsafe.Pointer(sig))\n\treturn h, nil\n}\n\n// SignRecoverInit initializes a signature operation, where the data can be recovered from the signature.\nfunc (c *Ctx) SignRecoverInit(sh SessionHandle, m []*Mechanism, key ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.SignRecoverInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(key))\n\treturn toError(e)\n}\n\n// SignRecover signs data in a single operation, where the data can be recovered from the signature.\nfunc (c *Ctx) SignRecover(sh SessionHandle, data []byte) ([]byte, error) {\n\tvar (\n\t\tsig    C.CK_BYTE_PTR\n\t\tsiglen C.CK_ULONG\n\t)\n\te := C.SignRecover(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(data), C.CK_ULONG(len(data)), &sig, &siglen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(sig), C.int(siglen))\n\tC.free(unsafe.Pointer(sig))\n\treturn h, nil\n}\n\n// VerifyInit initializes a verification operation, where the\n// signature is an appendix to the data, and plaintext cannot\n// be recovered from the signature (e.g. DSA).\nfunc (c *Ctx) VerifyInit(sh SessionHandle, m []*Mechanism, key ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.VerifyInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(key))\n\treturn toError(e)\n}\n\n// Verify verifies a signature in a single-part operation,\n// where the signature is an appendix to the data, and plaintext\n// cannot be recovered from the signature.\nfunc (c *Ctx) Verify(sh SessionHandle, data []byte, signature []byte) error {\n\te := C.Verify(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(data), C.CK_ULONG(len(data)), cMessage(signature), C.CK_ULONG(len(signature)))\n\treturn toError(e)\n}\n\n// VerifyUpdate continues a multiple-part verification\n// operation, where the signature is an appendix to the data,\n// and plaintext cannot be recovered from the signature.\nfunc (c *Ctx) VerifyUpdate(sh SessionHandle, part []byte) error {\n\te := C.VerifyUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(part), C.CK_ULONG(len(part)))\n\treturn toError(e)\n}\n\n// VerifyFinal finishes a multiple-part verification\n// operation, checking the signature.\nfunc (c *Ctx) VerifyFinal(sh SessionHandle, signature []byte) error {\n\te := C.VerifyFinal(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(signature), C.CK_ULONG(len(signature)))\n\treturn toError(e)\n}\n\n// VerifyRecoverInit initializes a signature verification\n// operation, where the data is recovered from the signature.\nfunc (c *Ctx) VerifyRecoverInit(sh SessionHandle, m []*Mechanism, key ObjectHandle) error {\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.VerifyRecoverInit(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(key))\n\treturn toError(e)\n}\n\n// VerifyRecover verifies a signature in a single-part\n// operation, where the data is recovered from the signature.\nfunc (c *Ctx) VerifyRecover(sh SessionHandle, signature []byte) ([]byte, error) {\n\tvar (\n\t\tdata    C.CK_BYTE_PTR\n\t\tdatalen C.CK_ULONG\n\t)\n\te := C.DecryptVerifyUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(signature), C.CK_ULONG(len(signature)), &data, &datalen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(data), C.int(datalen))\n\tC.free(unsafe.Pointer(data))\n\treturn h, nil\n}\n\n// DigestEncryptUpdate continues a multiple-part digesting and encryption operation.\nfunc (c *Ctx) DigestEncryptUpdate(sh SessionHandle, part []byte) ([]byte, error) {\n\tvar (\n\t\tenc    C.CK_BYTE_PTR\n\t\tenclen C.CK_ULONG\n\t)\n\te := C.DigestEncryptUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(part), C.CK_ULONG(len(part)), &enc, &enclen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(enc), C.int(enclen))\n\tC.free(unsafe.Pointer(enc))\n\treturn h, nil\n}\n\n// DecryptDigestUpdate continues a multiple-part decryption and digesting operation.\nfunc (c *Ctx) DecryptDigestUpdate(sh SessionHandle, cipher []byte) ([]byte, error) {\n\tvar (\n\t\tpart    C.CK_BYTE_PTR\n\t\tpartlen C.CK_ULONG\n\t)\n\te := C.DecryptDigestUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(cipher), C.CK_ULONG(len(cipher)), &part, &partlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(part), C.int(partlen))\n\tC.free(unsafe.Pointer(part))\n\treturn h, nil\n}\n\n// SignEncryptUpdate continues a multiple-part signing and encryption operation.\nfunc (c *Ctx) SignEncryptUpdate(sh SessionHandle, part []byte) ([]byte, error) {\n\tvar (\n\t\tenc    C.CK_BYTE_PTR\n\t\tenclen C.CK_ULONG\n\t)\n\te := C.SignEncryptUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(part), C.CK_ULONG(len(part)), &enc, &enclen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(enc), C.int(enclen))\n\tC.free(unsafe.Pointer(enc))\n\treturn h, nil\n}\n\n// DecryptVerifyUpdate continues a multiple-part decryption and verify operation.\nfunc (c *Ctx) DecryptVerifyUpdate(sh SessionHandle, cipher []byte) ([]byte, error) {\n\tvar (\n\t\tpart    C.CK_BYTE_PTR\n\t\tpartlen C.CK_ULONG\n\t)\n\te := C.DecryptVerifyUpdate(c.ctx, C.CK_SESSION_HANDLE(sh), cMessage(cipher), C.CK_ULONG(len(cipher)), &part, &partlen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(part), C.int(partlen))\n\tC.free(unsafe.Pointer(part))\n\treturn h, nil\n}\n\n// GenerateKey generates a secret key, creating a new key object.\nfunc (c *Ctx) GenerateKey(sh SessionHandle, m []*Mechanism, temp []*Attribute) (ObjectHandle, error) {\n\tvar key C.CK_OBJECT_HANDLE\n\tattrarena, t, tcount := cAttributeList(temp)\n\tdefer attrarena.Free()\n\tmecharena, mech := cMechanism(m)\n\tdefer mecharena.Free()\n\te := C.GenerateKey(c.ctx, C.CK_SESSION_HANDLE(sh), mech, t, tcount, C.CK_OBJECT_HANDLE_PTR(&key))\n\te1 := toError(e)\n\tif e1 == nil {\n\t\treturn ObjectHandle(key), nil\n\t}\n\treturn 0, e1\n}\n\n// GenerateKeyPair generates a public-key/private-key pair creating new key objects.\nfunc (c *Ctx) GenerateKeyPair(sh SessionHandle, m []*Mechanism, public, private []*Attribute) (ObjectHandle, ObjectHandle, error) {\n\tvar (\n\t\tpubkey  C.CK_OBJECT_HANDLE\n\t\tprivkey C.CK_OBJECT_HANDLE\n\t)\n\tpubarena, pub, pubcount := cAttributeList(public)\n\tdefer pubarena.Free()\n\tprivarena, priv, privcount := cAttributeList(private)\n\tdefer privarena.Free()\n\tmecharena, mech := cMechanism(m)\n\tdefer mecharena.Free()\n\te := C.GenerateKeyPair(c.ctx, C.CK_SESSION_HANDLE(sh), mech, pub, pubcount, priv, privcount, C.CK_OBJECT_HANDLE_PTR(&pubkey), C.CK_OBJECT_HANDLE_PTR(&privkey))\n\te1 := toError(e)\n\tif e1 == nil {\n\t\treturn ObjectHandle(pubkey), ObjectHandle(privkey), nil\n\t}\n\treturn 0, 0, e1\n}\n\n// WrapKey wraps (i.e., encrypts) a key.\nfunc (c *Ctx) WrapKey(sh SessionHandle, m []*Mechanism, wrappingkey, key ObjectHandle) ([]byte, error) {\n\tvar (\n\t\twrappedkey    C.CK_BYTE_PTR\n\t\twrappedkeylen C.CK_ULONG\n\t)\n\tarena, mech := cMechanism(m)\n\tdefer arena.Free()\n\te := C.WrapKey(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(wrappingkey), C.CK_OBJECT_HANDLE(key), &wrappedkey, &wrappedkeylen)\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(wrappedkey), C.int(wrappedkeylen))\n\tC.free(unsafe.Pointer(wrappedkey))\n\treturn h, nil\n}\n\n// UnwrapKey unwraps (decrypts) a wrapped key, creating a new key object.\nfunc (c *Ctx) UnwrapKey(sh SessionHandle, m []*Mechanism, unwrappingkey ObjectHandle, wrappedkey []byte, a []*Attribute) (ObjectHandle, error) {\n\tvar key C.CK_OBJECT_HANDLE\n\tattrarena, ac, aclen := cAttributeList(a)\n\tdefer attrarena.Free()\n\tmecharena, mech := cMechanism(m)\n\tdefer mecharena.Free()\n\te := C.UnwrapKey(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(unwrappingkey), C.CK_BYTE_PTR(unsafe.Pointer(&wrappedkey[0])), C.CK_ULONG(len(wrappedkey)), ac, aclen, &key)\n\treturn ObjectHandle(key), toError(e)\n}\n\n// DeriveKey derives a key from a base key, creating a new key object.\nfunc (c *Ctx) DeriveKey(sh SessionHandle, m []*Mechanism, basekey ObjectHandle, a []*Attribute) (ObjectHandle, error) {\n\tvar key C.CK_OBJECT_HANDLE\n\tattrarena, ac, aclen := cAttributeList(a)\n\tdefer attrarena.Free()\n\tmecharena, mech := cMechanism(m)\n\tdefer mecharena.Free()\n\te := C.DeriveKey(c.ctx, C.CK_SESSION_HANDLE(sh), mech, C.CK_OBJECT_HANDLE(basekey), ac, aclen, &key)\n\treturn ObjectHandle(key), toError(e)\n}\n\n// SeedRandom mixes additional seed material into the token's\n// random number generator.\nfunc (c *Ctx) SeedRandom(sh SessionHandle, seed []byte) error {\n\te := C.SeedRandom(c.ctx, C.CK_SESSION_HANDLE(sh), C.CK_BYTE_PTR(unsafe.Pointer(&seed[0])), C.CK_ULONG(len(seed)))\n\treturn toError(e)\n}\n\n// GenerateRandom generates random data.\nfunc (c *Ctx) GenerateRandom(sh SessionHandle, length int) ([]byte, error) {\n\tvar rand C.CK_BYTE_PTR\n\te := C.GenerateRandom(c.ctx, C.CK_SESSION_HANDLE(sh), &rand, C.CK_ULONG(length))\n\tif toError(e) != nil {\n\t\treturn nil, toError(e)\n\t}\n\th := C.GoBytes(unsafe.Pointer(rand), C.int(length))\n\tC.free(unsafe.Pointer(rand))\n\treturn h, nil\n}\n\n// WaitForSlotEvent returns a channel which returns a slot event\n// (token insertion, removal, etc.) when it occurs.\nfunc (c *Ctx) WaitForSlotEvent(flags uint) chan SlotEvent {\n\tsl := make(chan SlotEvent, 1) // hold one element\n\tgo c.waitForSlotEventHelper(flags, sl)\n\treturn sl\n}\n\nfunc (c *Ctx) waitForSlotEventHelper(f uint, sl chan SlotEvent) {\n\tvar slotID C.CK_ULONG\n\tC.WaitForSlotEvent(c.ctx, C.CK_FLAGS(f), &slotID)\n\tsl <- SlotEvent{uint(slotID)}\n\tclose(sl) // TODO(miek): Sending and then closing ...?\n}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/pkcs11.h",
    "content": "/* Copyright (c) OASIS Open 2016. All Rights Reserved./\n * /Distributed under the terms of the OASIS IPR Policy,\n * [http://www.oasis-open.org/policies-guidelines/ipr], AS-IS, WITHOUT ANY\n * IMPLIED OR EXPRESS WARRANTY; there is no warranty of MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE or NONINFRINGEMENT of the rights of others.\n */\n        \n/* Latest version of the specification:\n * http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.40.html\n */\n\n#ifndef _PKCS11_H_\n#define _PKCS11_H_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Before including this file (pkcs11.h) (or pkcs11t.h by\n * itself), 5 platform-specific macros must be defined.  These\n * macros are described below, and typical definitions for them\n * are also given.  Be advised that these definitions can depend\n * on both the platform and the compiler used (and possibly also\n * on whether a Cryptoki library is linked statically or\n * dynamically).\n *\n * In addition to defining these 5 macros, the packing convention\n * for Cryptoki structures should be set.  The Cryptoki\n * convention on packing is that structures should be 1-byte\n * aligned.\n *\n * If you're using Microsoft Developer Studio 5.0 to produce\n * Win32 stuff, this might be done by using the following\n * preprocessor directive before including pkcs11.h or pkcs11t.h:\n *\n * #pragma pack(push, cryptoki, 1)\n *\n * and using the following preprocessor directive after including\n * pkcs11.h or pkcs11t.h:\n *\n * #pragma pack(pop, cryptoki)\n *\n * If you're using an earlier version of Microsoft Developer\n * Studio to produce Win16 stuff, this might be done by using\n * the following preprocessor directive before including\n * pkcs11.h or pkcs11t.h:\n *\n * #pragma pack(1)\n *\n * In a UNIX environment, you're on your own for this.  You might\n * not need to do (or be able to do!) anything.\n *\n *\n * Now for the macros:\n *\n *\n * 1. CK_PTR: The indirection string for making a pointer to an\n * object.  It can be used like this:\n *\n * typedef CK_BYTE CK_PTR CK_BYTE_PTR;\n *\n * If you're using Microsoft Developer Studio 5.0 to produce\n * Win32 stuff, it might be defined by:\n *\n * #define CK_PTR *\n *\n * If you're using an earlier version of Microsoft Developer\n * Studio to produce Win16 stuff, it might be defined by:\n *\n * #define CK_PTR far *\n *\n * In a typical UNIX environment, it might be defined by:\n *\n * #define CK_PTR *\n *\n *\n * 2. CK_DECLARE_FUNCTION(returnType, name): A macro which makes\n * an importable Cryptoki library function declaration out of a\n * return type and a function name.  It should be used in the\n * following fashion:\n *\n * extern CK_DECLARE_FUNCTION(CK_RV, C_Initialize)(\n *   CK_VOID_PTR pReserved\n * );\n *\n * If you're using Microsoft Developer Studio 5.0 to declare a\n * function in a Win32 Cryptoki .dll, it might be defined by:\n *\n * #define CK_DECLARE_FUNCTION(returnType, name) \\\n *   returnType __declspec(dllimport) name\n *\n * If you're using an earlier version of Microsoft Developer\n * Studio to declare a function in a Win16 Cryptoki .dll, it\n * might be defined by:\n *\n * #define CK_DECLARE_FUNCTION(returnType, name) \\\n *   returnType __export _far _pascal name\n *\n * In a UNIX environment, it might be defined by:\n *\n * #define CK_DECLARE_FUNCTION(returnType, name) \\\n *   returnType name\n *\n *\n * 3. CK_DECLARE_FUNCTION_POINTER(returnType, name): A macro\n * which makes a Cryptoki API function pointer declaration or\n * function pointer type declaration out of a return type and a\n * function name.  It should be used in the following fashion:\n *\n * // Define funcPtr to be a pointer to a Cryptoki API function\n * // taking arguments args and returning CK_RV.\n * CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtr)(args);\n *\n * or\n *\n * // Define funcPtrType to be the type of a pointer to a\n * // Cryptoki API function taking arguments args and returning\n * // CK_RV, and then define funcPtr to be a variable of type\n * // funcPtrType.\n * typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtrType)(args);\n * funcPtrType funcPtr;\n *\n * If you're using Microsoft Developer Studio 5.0 to access\n * functions in a Win32 Cryptoki .dll, in might be defined by:\n *\n * #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \\\n *   returnType __declspec(dllimport) (* name)\n *\n * If you're using an earlier version of Microsoft Developer\n * Studio to access functions in a Win16 Cryptoki .dll, it might\n * be defined by:\n *\n * #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \\\n *   returnType __export _far _pascal (* name)\n *\n * In a UNIX environment, it might be defined by:\n *\n * #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \\\n *   returnType (* name)\n *\n *\n * 4. CK_CALLBACK_FUNCTION(returnType, name): A macro which makes\n * a function pointer type for an application callback out of\n * a return type for the callback and a name for the callback.\n * It should be used in the following fashion:\n *\n * CK_CALLBACK_FUNCTION(CK_RV, myCallback)(args);\n *\n * to declare a function pointer, myCallback, to a callback\n * which takes arguments args and returns a CK_RV.  It can also\n * be used like this:\n *\n * typedef CK_CALLBACK_FUNCTION(CK_RV, myCallbackType)(args);\n * myCallbackType myCallback;\n *\n * If you're using Microsoft Developer Studio 5.0 to do Win32\n * Cryptoki development, it might be defined by:\n *\n * #define CK_CALLBACK_FUNCTION(returnType, name) \\\n *   returnType (* name)\n *\n * If you're using an earlier version of Microsoft Developer\n * Studio to do Win16 development, it might be defined by:\n *\n * #define CK_CALLBACK_FUNCTION(returnType, name) \\\n *   returnType _far _pascal (* name)\n *\n * In a UNIX environment, it might be defined by:\n *\n * #define CK_CALLBACK_FUNCTION(returnType, name) \\\n *   returnType (* name)\n *\n *\n * 5. NULL_PTR: This macro is the value of a NULL pointer.\n *\n * In any ANSI/ISO C environment (and in many others as well),\n * this should best be defined by\n *\n * #ifndef NULL_PTR\n * #define NULL_PTR 0\n * #endif\n */\n\n\n/* All the various Cryptoki types and #define'd values are in the\n * file pkcs11t.h.\n */\n#include \"pkcs11t.h\"\n\n#define __PASTE(x,y)      x##y\n\n\n/* ==============================================================\n * Define the \"extern\" form of all the entry points.\n * ==============================================================\n */\n\n#define CK_NEED_ARG_LIST  1\n#define CK_PKCS11_FUNCTION_INFO(name) \\\n  extern CK_DECLARE_FUNCTION(CK_RV, name)\n\n/* pkcs11f.h has all the information about the Cryptoki\n * function prototypes.\n */\n#include \"pkcs11f.h\"\n\n#undef CK_NEED_ARG_LIST\n#undef CK_PKCS11_FUNCTION_INFO\n\n\n/* ==============================================================\n * Define the typedef form of all the entry points.  That is, for\n * each Cryptoki function C_XXX, define a type CK_C_XXX which is\n * a pointer to that kind of function.\n * ==============================================================\n */\n\n#define CK_NEED_ARG_LIST  1\n#define CK_PKCS11_FUNCTION_INFO(name) \\\n  typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, __PASTE(CK_,name))\n\n/* pkcs11f.h has all the information about the Cryptoki\n * function prototypes.\n */\n#include \"pkcs11f.h\"\n\n#undef CK_NEED_ARG_LIST\n#undef CK_PKCS11_FUNCTION_INFO\n\n\n/* ==============================================================\n * Define structed vector of entry points.  A CK_FUNCTION_LIST\n * contains a CK_VERSION indicating a library's Cryptoki version\n * and then a whole slew of function pointers to the routines in\n * the library.  This type was declared, but not defined, in\n * pkcs11t.h.\n * ==============================================================\n */\n\n#define CK_PKCS11_FUNCTION_INFO(name) \\\n  __PASTE(CK_,name) name;\n\nstruct CK_FUNCTION_LIST {\n\n  CK_VERSION    version;  /* Cryptoki version */\n\n/* Pile all the function pointers into the CK_FUNCTION_LIST. */\n/* pkcs11f.h has all the information about the Cryptoki\n * function prototypes.\n */\n#include \"pkcs11f.h\"\n\n};\n\n#undef CK_PKCS11_FUNCTION_INFO\n\n\n#undef __PASTE\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _PKCS11_H_ */\n\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/pkcs11f.h",
    "content": "/* Copyright (c) OASIS Open 2016. All Rights Reserved./\n * /Distributed under the terms of the OASIS IPR Policy,\n * [http://www.oasis-open.org/policies-guidelines/ipr], AS-IS, WITHOUT ANY\n * IMPLIED OR EXPRESS WARRANTY; there is no warranty of MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE or NONINFRINGEMENT of the rights of others.\n */\n        \n/* Latest version of the specification:\n * http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.40.html\n */\n\n/* This header file contains pretty much everything about all the\n * Cryptoki function prototypes.  Because this information is\n * used for more than just declaring function prototypes, the\n * order of the functions appearing herein is important, and\n * should not be altered.\n */\n\n/* General-purpose */\n\n/* C_Initialize initializes the Cryptoki library. */\nCK_PKCS11_FUNCTION_INFO(C_Initialize)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_VOID_PTR   pInitArgs  /* if this is not NULL_PTR, it gets\n                            * cast to CK_C_INITIALIZE_ARGS_PTR\n                            * and dereferenced\n                            */\n);\n#endif\n\n\n/* C_Finalize indicates that an application is done with the\n * Cryptoki library.\n */\nCK_PKCS11_FUNCTION_INFO(C_Finalize)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_VOID_PTR   pReserved  /* reserved.  Should be NULL_PTR */\n);\n#endif\n\n\n/* C_GetInfo returns general information about Cryptoki. */\nCK_PKCS11_FUNCTION_INFO(C_GetInfo)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_INFO_PTR   pInfo  /* location that receives information */\n);\n#endif\n\n\n/* C_GetFunctionList returns the function list. */\nCK_PKCS11_FUNCTION_INFO(C_GetFunctionList)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_FUNCTION_LIST_PTR_PTR ppFunctionList  /* receives pointer to\n                                            * function list\n                                            */\n);\n#endif\n\n\n\n/* Slot and token management */\n\n/* C_GetSlotList obtains a list of slots in the system. */\nCK_PKCS11_FUNCTION_INFO(C_GetSlotList)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_BBOOL       tokenPresent,  /* only slots with tokens */\n  CK_SLOT_ID_PTR pSlotList,     /* receives array of slot IDs */\n  CK_ULONG_PTR   pulCount       /* receives number of slots */\n);\n#endif\n\n\n/* C_GetSlotInfo obtains information about a particular slot in\n * the system.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetSlotInfo)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID       slotID,  /* the ID of the slot */\n  CK_SLOT_INFO_PTR pInfo    /* receives the slot information */\n);\n#endif\n\n\n/* C_GetTokenInfo obtains information about a particular token\n * in the system.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetTokenInfo)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID        slotID,  /* ID of the token's slot */\n  CK_TOKEN_INFO_PTR pInfo    /* receives the token information */\n);\n#endif\n\n\n/* C_GetMechanismList obtains a list of mechanism types\n * supported by a token.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetMechanismList)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID            slotID,          /* ID of token's slot */\n  CK_MECHANISM_TYPE_PTR pMechanismList,  /* gets mech. array */\n  CK_ULONG_PTR          pulCount         /* gets # of mechs. */\n);\n#endif\n\n\n/* C_GetMechanismInfo obtains information about a particular\n * mechanism possibly supported by a token.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetMechanismInfo)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID            slotID,  /* ID of the token's slot */\n  CK_MECHANISM_TYPE     type,    /* type of mechanism */\n  CK_MECHANISM_INFO_PTR pInfo    /* receives mechanism info */\n);\n#endif\n\n\n/* C_InitToken initializes a token. */\nCK_PKCS11_FUNCTION_INFO(C_InitToken)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID      slotID,    /* ID of the token's slot */\n  CK_UTF8CHAR_PTR pPin,      /* the SO's initial PIN */\n  CK_ULONG        ulPinLen,  /* length in bytes of the PIN */\n  CK_UTF8CHAR_PTR pLabel     /* 32-byte token label (blank padded) */\n);\n#endif\n\n\n/* C_InitPIN initializes the normal user's PIN. */\nCK_PKCS11_FUNCTION_INFO(C_InitPIN)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_UTF8CHAR_PTR   pPin,      /* the normal user's PIN */\n  CK_ULONG          ulPinLen   /* length in bytes of the PIN */\n);\n#endif\n\n\n/* C_SetPIN modifies the PIN of the user who is logged in. */\nCK_PKCS11_FUNCTION_INFO(C_SetPIN)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_UTF8CHAR_PTR   pOldPin,   /* the old PIN */\n  CK_ULONG          ulOldLen,  /* length of the old PIN */\n  CK_UTF8CHAR_PTR   pNewPin,   /* the new PIN */\n  CK_ULONG          ulNewLen   /* length of the new PIN */\n);\n#endif\n\n\n\n/* Session management */\n\n/* C_OpenSession opens a session between an application and a\n * token.\n */\nCK_PKCS11_FUNCTION_INFO(C_OpenSession)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID            slotID,        /* the slot's ID */\n  CK_FLAGS              flags,         /* from CK_SESSION_INFO */\n  CK_VOID_PTR           pApplication,  /* passed to callback */\n  CK_NOTIFY             Notify,        /* callback function */\n  CK_SESSION_HANDLE_PTR phSession      /* gets session handle */\n);\n#endif\n\n\n/* C_CloseSession closes a session between an application and a\n * token.\n */\nCK_PKCS11_FUNCTION_INFO(C_CloseSession)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession  /* the session's handle */\n);\n#endif\n\n\n/* C_CloseAllSessions closes all sessions with a token. */\nCK_PKCS11_FUNCTION_INFO(C_CloseAllSessions)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SLOT_ID     slotID  /* the token's slot */\n);\n#endif\n\n\n/* C_GetSessionInfo obtains information about the session. */\nCK_PKCS11_FUNCTION_INFO(C_GetSessionInfo)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE   hSession,  /* the session's handle */\n  CK_SESSION_INFO_PTR pInfo      /* receives session info */\n);\n#endif\n\n\n/* C_GetOperationState obtains the state of the cryptographic operation\n * in a session.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetOperationState)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,             /* session's handle */\n  CK_BYTE_PTR       pOperationState,      /* gets state */\n  CK_ULONG_PTR      pulOperationStateLen  /* gets state length */\n);\n#endif\n\n\n/* C_SetOperationState restores the state of the cryptographic\n * operation in a session.\n */\nCK_PKCS11_FUNCTION_INFO(C_SetOperationState)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR      pOperationState,      /* holds state */\n  CK_ULONG         ulOperationStateLen,  /* holds state length */\n  CK_OBJECT_HANDLE hEncryptionKey,       /* en/decryption key */\n  CK_OBJECT_HANDLE hAuthenticationKey    /* sign/verify key */\n);\n#endif\n\n\n/* C_Login logs a user into a token. */\nCK_PKCS11_FUNCTION_INFO(C_Login)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_USER_TYPE      userType,  /* the user type */\n  CK_UTF8CHAR_PTR   pPin,      /* the user's PIN */\n  CK_ULONG          ulPinLen   /* the length of the PIN */\n);\n#endif\n\n\n/* C_Logout logs a user out from a token. */\nCK_PKCS11_FUNCTION_INFO(C_Logout)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession  /* the session's handle */\n);\n#endif\n\n\n\n/* Object management */\n\n/* C_CreateObject creates a new object. */\nCK_PKCS11_FUNCTION_INFO(C_CreateObject)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_ATTRIBUTE_PTR  pTemplate,   /* the object's template */\n  CK_ULONG          ulCount,     /* attributes in template */\n  CK_OBJECT_HANDLE_PTR phObject  /* gets new object's handle. */\n);\n#endif\n\n\n/* C_CopyObject copies an object, creating a new object for the\n * copy.\n */\nCK_PKCS11_FUNCTION_INFO(C_CopyObject)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE    hSession,    /* the session's handle */\n  CK_OBJECT_HANDLE     hObject,     /* the object's handle */\n  CK_ATTRIBUTE_PTR     pTemplate,   /* template for new object */\n  CK_ULONG             ulCount,     /* attributes in template */\n  CK_OBJECT_HANDLE_PTR phNewObject  /* receives handle of copy */\n);\n#endif\n\n\n/* C_DestroyObject destroys an object. */\nCK_PKCS11_FUNCTION_INFO(C_DestroyObject)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_OBJECT_HANDLE  hObject    /* the object's handle */\n);\n#endif\n\n\n/* C_GetObjectSize gets the size of an object in bytes. */\nCK_PKCS11_FUNCTION_INFO(C_GetObjectSize)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_OBJECT_HANDLE  hObject,   /* the object's handle */\n  CK_ULONG_PTR      pulSize    /* receives size of object */\n);\n#endif\n\n\n/* C_GetAttributeValue obtains the value of one or more object\n * attributes.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetAttributeValue)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,   /* the session's handle */\n  CK_OBJECT_HANDLE  hObject,    /* the object's handle */\n  CK_ATTRIBUTE_PTR  pTemplate,  /* specifies attrs; gets vals */\n  CK_ULONG          ulCount     /* attributes in template */\n);\n#endif\n\n\n/* C_SetAttributeValue modifies the value of one or more object\n * attributes.\n */\nCK_PKCS11_FUNCTION_INFO(C_SetAttributeValue)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,   /* the session's handle */\n  CK_OBJECT_HANDLE  hObject,    /* the object's handle */\n  CK_ATTRIBUTE_PTR  pTemplate,  /* specifies attrs and values */\n  CK_ULONG          ulCount     /* attributes in template */\n);\n#endif\n\n\n/* C_FindObjectsInit initializes a search for token and session\n * objects that match a template.\n */\nCK_PKCS11_FUNCTION_INFO(C_FindObjectsInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,   /* the session's handle */\n  CK_ATTRIBUTE_PTR  pTemplate,  /* attribute values to match */\n  CK_ULONG          ulCount     /* attrs in search template */\n);\n#endif\n\n\n/* C_FindObjects continues a search for token and session\n * objects that match a template, obtaining additional object\n * handles.\n */\nCK_PKCS11_FUNCTION_INFO(C_FindObjects)\n#ifdef CK_NEED_ARG_LIST\n(\n CK_SESSION_HANDLE    hSession,          /* session's handle */\n CK_OBJECT_HANDLE_PTR phObject,          /* gets obj. handles */\n CK_ULONG             ulMaxObjectCount,  /* max handles to get */\n CK_ULONG_PTR         pulObjectCount     /* actual # returned */\n);\n#endif\n\n\n/* C_FindObjectsFinal finishes a search for token and session\n * objects.\n */\nCK_PKCS11_FUNCTION_INFO(C_FindObjectsFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession  /* the session's handle */\n);\n#endif\n\n\n\n/* Encryption and decryption */\n\n/* C_EncryptInit initializes an encryption operation. */\nCK_PKCS11_FUNCTION_INFO(C_EncryptInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,  /* the encryption mechanism */\n  CK_OBJECT_HANDLE  hKey         /* handle of encryption key */\n);\n#endif\n\n\n/* C_Encrypt encrypts single-part data. */\nCK_PKCS11_FUNCTION_INFO(C_Encrypt)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pData,               /* the plaintext data */\n  CK_ULONG          ulDataLen,           /* bytes of plaintext */\n  CK_BYTE_PTR       pEncryptedData,      /* gets ciphertext */\n  CK_ULONG_PTR      pulEncryptedDataLen  /* gets c-text size */\n);\n#endif\n\n\n/* C_EncryptUpdate continues a multiple-part encryption\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_EncryptUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,           /* session's handle */\n  CK_BYTE_PTR       pPart,              /* the plaintext data */\n  CK_ULONG          ulPartLen,          /* plaintext data len */\n  CK_BYTE_PTR       pEncryptedPart,     /* gets ciphertext */\n  CK_ULONG_PTR      pulEncryptedPartLen /* gets c-text size */\n);\n#endif\n\n\n/* C_EncryptFinal finishes a multiple-part encryption\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_EncryptFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,                /* session handle */\n  CK_BYTE_PTR       pLastEncryptedPart,      /* last c-text */\n  CK_ULONG_PTR      pulLastEncryptedPartLen  /* gets last size */\n);\n#endif\n\n\n/* C_DecryptInit initializes a decryption operation. */\nCK_PKCS11_FUNCTION_INFO(C_DecryptInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,  /* the decryption mechanism */\n  CK_OBJECT_HANDLE  hKey         /* handle of decryption key */\n);\n#endif\n\n\n/* C_Decrypt decrypts encrypted data in a single part. */\nCK_PKCS11_FUNCTION_INFO(C_Decrypt)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,           /* session's handle */\n  CK_BYTE_PTR       pEncryptedData,     /* ciphertext */\n  CK_ULONG          ulEncryptedDataLen, /* ciphertext length */\n  CK_BYTE_PTR       pData,              /* gets plaintext */\n  CK_ULONG_PTR      pulDataLen          /* gets p-text size */\n);\n#endif\n\n\n/* C_DecryptUpdate continues a multiple-part decryption\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DecryptUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pEncryptedPart,      /* encrypted data */\n  CK_ULONG          ulEncryptedPartLen,  /* input length */\n  CK_BYTE_PTR       pPart,               /* gets plaintext */\n  CK_ULONG_PTR      pulPartLen           /* p-text size */\n);\n#endif\n\n\n/* C_DecryptFinal finishes a multiple-part decryption\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DecryptFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,       /* the session's handle */\n  CK_BYTE_PTR       pLastPart,      /* gets plaintext */\n  CK_ULONG_PTR      pulLastPartLen  /* p-text size */\n);\n#endif\n\n\n\n/* Message digesting */\n\n/* C_DigestInit initializes a message-digesting operation. */\nCK_PKCS11_FUNCTION_INFO(C_DigestInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,   /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism  /* the digesting mechanism */\n);\n#endif\n\n\n/* C_Digest digests data in a single part. */\nCK_PKCS11_FUNCTION_INFO(C_Digest)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,     /* the session's handle */\n  CK_BYTE_PTR       pData,        /* data to be digested */\n  CK_ULONG          ulDataLen,    /* bytes of data to digest */\n  CK_BYTE_PTR       pDigest,      /* gets the message digest */\n  CK_ULONG_PTR      pulDigestLen  /* gets digest length */\n);\n#endif\n\n\n/* C_DigestUpdate continues a multiple-part message-digesting\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DigestUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_BYTE_PTR       pPart,     /* data to be digested */\n  CK_ULONG          ulPartLen  /* bytes of data to be digested */\n);\n#endif\n\n\n/* C_DigestKey continues a multi-part message-digesting\n * operation, by digesting the value of a secret key as part of\n * the data already digested.\n */\nCK_PKCS11_FUNCTION_INFO(C_DigestKey)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_OBJECT_HANDLE  hKey       /* secret key to digest */\n);\n#endif\n\n\n/* C_DigestFinal finishes a multiple-part message-digesting\n * operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DigestFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,     /* the session's handle */\n  CK_BYTE_PTR       pDigest,      /* gets the message digest */\n  CK_ULONG_PTR      pulDigestLen  /* gets byte count of digest */\n);\n#endif\n\n\n\n/* Signing and MACing */\n\n/* C_SignInit initializes a signature (private key encryption)\n * operation, where the signature is (will be) an appendix to\n * the data, and plaintext cannot be recovered from the\n * signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,  /* the signature mechanism */\n  CK_OBJECT_HANDLE  hKey         /* handle of signature key */\n);\n#endif\n\n\n/* C_Sign signs (encrypts with private key) data in a single\n * part, where the signature is (will be) an appendix to the\n * data, and plaintext cannot be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_Sign)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,        /* the session's handle */\n  CK_BYTE_PTR       pData,           /* the data to sign */\n  CK_ULONG          ulDataLen,       /* count of bytes to sign */\n  CK_BYTE_PTR       pSignature,      /* gets the signature */\n  CK_ULONG_PTR      pulSignatureLen  /* gets signature length */\n);\n#endif\n\n\n/* C_SignUpdate continues a multiple-part signature operation,\n * where the signature is (will be) an appendix to the data,\n * and plaintext cannot be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_BYTE_PTR       pPart,     /* the data to sign */\n  CK_ULONG          ulPartLen  /* count of bytes to sign */\n);\n#endif\n\n\n/* C_SignFinal finishes a multiple-part signature operation,\n * returning the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,        /* the session's handle */\n  CK_BYTE_PTR       pSignature,      /* gets the signature */\n  CK_ULONG_PTR      pulSignatureLen  /* gets signature length */\n);\n#endif\n\n\n/* C_SignRecoverInit initializes a signature operation, where\n * the data can be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignRecoverInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,   /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism, /* the signature mechanism */\n  CK_OBJECT_HANDLE  hKey        /* handle of the signature key */\n);\n#endif\n\n\n/* C_SignRecover signs data in a single operation, where the\n * data can be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignRecover)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,        /* the session's handle */\n  CK_BYTE_PTR       pData,           /* the data to sign */\n  CK_ULONG          ulDataLen,       /* count of bytes to sign */\n  CK_BYTE_PTR       pSignature,      /* gets the signature */\n  CK_ULONG_PTR      pulSignatureLen  /* gets signature length */\n);\n#endif\n\n\n\n/* Verifying signatures and MACs */\n\n/* C_VerifyInit initializes a verification operation, where the\n * signature is an appendix to the data, and plaintext cannot\n * cannot be recovered from the signature (e.g. DSA).\n */\nCK_PKCS11_FUNCTION_INFO(C_VerifyInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,  /* the verification mechanism */\n  CK_OBJECT_HANDLE  hKey         /* verification key */\n);\n#endif\n\n\n/* C_Verify verifies a signature in a single-part operation,\n * where the signature is an appendix to the data, and plaintext\n * cannot be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_Verify)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,       /* the session's handle */\n  CK_BYTE_PTR       pData,          /* signed data */\n  CK_ULONG          ulDataLen,      /* length of signed data */\n  CK_BYTE_PTR       pSignature,     /* signature */\n  CK_ULONG          ulSignatureLen  /* signature length*/\n);\n#endif\n\n\n/* C_VerifyUpdate continues a multiple-part verification\n * operation, where the signature is an appendix to the data,\n * and plaintext cannot be recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_VerifyUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_BYTE_PTR       pPart,     /* signed data */\n  CK_ULONG          ulPartLen  /* length of signed data */\n);\n#endif\n\n\n/* C_VerifyFinal finishes a multiple-part verification\n * operation, checking the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_VerifyFinal)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,       /* the session's handle */\n  CK_BYTE_PTR       pSignature,     /* signature to verify */\n  CK_ULONG          ulSignatureLen  /* signature length */\n);\n#endif\n\n\n/* C_VerifyRecoverInit initializes a signature verification\n * operation, where the data is recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_VerifyRecoverInit)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,  /* the verification mechanism */\n  CK_OBJECT_HANDLE  hKey         /* verification key */\n);\n#endif\n\n\n/* C_VerifyRecover verifies a signature in a single-part\n * operation, where the data is recovered from the signature.\n */\nCK_PKCS11_FUNCTION_INFO(C_VerifyRecover)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,        /* the session's handle */\n  CK_BYTE_PTR       pSignature,      /* signature to verify */\n  CK_ULONG          ulSignatureLen,  /* signature length */\n  CK_BYTE_PTR       pData,           /* gets signed data */\n  CK_ULONG_PTR      pulDataLen       /* gets signed data len */\n);\n#endif\n\n\n\n/* Dual-function cryptographic operations */\n\n/* C_DigestEncryptUpdate continues a multiple-part digesting\n * and encryption operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DigestEncryptUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pPart,               /* the plaintext data */\n  CK_ULONG          ulPartLen,           /* plaintext length */\n  CK_BYTE_PTR       pEncryptedPart,      /* gets ciphertext */\n  CK_ULONG_PTR      pulEncryptedPartLen  /* gets c-text length */\n);\n#endif\n\n\n/* C_DecryptDigestUpdate continues a multiple-part decryption and\n * digesting operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DecryptDigestUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pEncryptedPart,      /* ciphertext */\n  CK_ULONG          ulEncryptedPartLen,  /* ciphertext length */\n  CK_BYTE_PTR       pPart,               /* gets plaintext */\n  CK_ULONG_PTR      pulPartLen           /* gets plaintext len */\n);\n#endif\n\n\n/* C_SignEncryptUpdate continues a multiple-part signing and\n * encryption operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_SignEncryptUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pPart,               /* the plaintext data */\n  CK_ULONG          ulPartLen,           /* plaintext length */\n  CK_BYTE_PTR       pEncryptedPart,      /* gets ciphertext */\n  CK_ULONG_PTR      pulEncryptedPartLen  /* gets c-text length */\n);\n#endif\n\n\n/* C_DecryptVerifyUpdate continues a multiple-part decryption and\n * verify operation.\n */\nCK_PKCS11_FUNCTION_INFO(C_DecryptVerifyUpdate)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,            /* session's handle */\n  CK_BYTE_PTR       pEncryptedPart,      /* ciphertext */\n  CK_ULONG          ulEncryptedPartLen,  /* ciphertext length */\n  CK_BYTE_PTR       pPart,               /* gets plaintext */\n  CK_ULONG_PTR      pulPartLen           /* gets p-text length */\n);\n#endif\n\n\n\n/* Key management */\n\n/* C_GenerateKey generates a secret key, creating a new key\n * object.\n */\nCK_PKCS11_FUNCTION_INFO(C_GenerateKey)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE    hSession,    /* the session's handle */\n  CK_MECHANISM_PTR     pMechanism,  /* key generation mech. */\n  CK_ATTRIBUTE_PTR     pTemplate,   /* template for new key */\n  CK_ULONG             ulCount,     /* # of attrs in template */\n  CK_OBJECT_HANDLE_PTR phKey        /* gets handle of new key */\n);\n#endif\n\n\n/* C_GenerateKeyPair generates a public-key/private-key pair,\n * creating new key objects.\n */\nCK_PKCS11_FUNCTION_INFO(C_GenerateKeyPair)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE    hSession,                    /* session handle */\n  CK_MECHANISM_PTR     pMechanism,                  /* key-gen mech. */\n  CK_ATTRIBUTE_PTR     pPublicKeyTemplate,          /* template for pub. key */\n  CK_ULONG             ulPublicKeyAttributeCount,   /* # pub. attrs. */\n  CK_ATTRIBUTE_PTR     pPrivateKeyTemplate,         /* template for priv. key */\n  CK_ULONG             ulPrivateKeyAttributeCount,  /* # priv.  attrs. */\n  CK_OBJECT_HANDLE_PTR phPublicKey,                 /* gets pub. key handle */\n  CK_OBJECT_HANDLE_PTR phPrivateKey                 /* gets priv. key handle */\n);\n#endif\n\n\n/* C_WrapKey wraps (i.e., encrypts) a key. */\nCK_PKCS11_FUNCTION_INFO(C_WrapKey)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,        /* the session's handle */\n  CK_MECHANISM_PTR  pMechanism,      /* the wrapping mechanism */\n  CK_OBJECT_HANDLE  hWrappingKey,    /* wrapping key */\n  CK_OBJECT_HANDLE  hKey,            /* key to be wrapped */\n  CK_BYTE_PTR       pWrappedKey,     /* gets wrapped key */\n  CK_ULONG_PTR      pulWrappedKeyLen /* gets wrapped key size */\n);\n#endif\n\n\n/* C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new\n * key object.\n */\nCK_PKCS11_FUNCTION_INFO(C_UnwrapKey)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE    hSession,          /* session's handle */\n  CK_MECHANISM_PTR     pMechanism,        /* unwrapping mech. */\n  CK_OBJECT_HANDLE     hUnwrappingKey,    /* unwrapping key */\n  CK_BYTE_PTR          pWrappedKey,       /* the wrapped key */\n  CK_ULONG             ulWrappedKeyLen,   /* wrapped key len */\n  CK_ATTRIBUTE_PTR     pTemplate,         /* new key template */\n  CK_ULONG             ulAttributeCount,  /* template length */\n  CK_OBJECT_HANDLE_PTR phKey              /* gets new handle */\n);\n#endif\n\n\n/* C_DeriveKey derives a key from a base key, creating a new key\n * object.\n */\nCK_PKCS11_FUNCTION_INFO(C_DeriveKey)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE    hSession,          /* session's handle */\n  CK_MECHANISM_PTR     pMechanism,        /* key deriv. mech. */\n  CK_OBJECT_HANDLE     hBaseKey,          /* base key */\n  CK_ATTRIBUTE_PTR     pTemplate,         /* new key template */\n  CK_ULONG             ulAttributeCount,  /* template length */\n  CK_OBJECT_HANDLE_PTR phKey              /* gets new handle */\n);\n#endif\n\n\n\n/* Random number generation */\n\n/* C_SeedRandom mixes additional seed material into the token's\n * random number generator.\n */\nCK_PKCS11_FUNCTION_INFO(C_SeedRandom)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,  /* the session's handle */\n  CK_BYTE_PTR       pSeed,     /* the seed material */\n  CK_ULONG          ulSeedLen  /* length of seed material */\n);\n#endif\n\n\n/* C_GenerateRandom generates random data. */\nCK_PKCS11_FUNCTION_INFO(C_GenerateRandom)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession,    /* the session's handle */\n  CK_BYTE_PTR       RandomData,  /* receives the random data */\n  CK_ULONG          ulRandomLen  /* # of bytes to generate */\n);\n#endif\n\n\n\n/* Parallel function management */\n\n/* C_GetFunctionStatus is a legacy function; it obtains an\n * updated status of a function running in parallel with an\n * application.\n */\nCK_PKCS11_FUNCTION_INFO(C_GetFunctionStatus)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession  /* the session's handle */\n);\n#endif\n\n\n/* C_CancelFunction is a legacy function; it cancels a function\n * running in parallel.\n */\nCK_PKCS11_FUNCTION_INFO(C_CancelFunction)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_SESSION_HANDLE hSession  /* the session's handle */\n);\n#endif\n\n\n/* C_WaitForSlotEvent waits for a slot event (token insertion,\n * removal, etc.) to occur.\n */\nCK_PKCS11_FUNCTION_INFO(C_WaitForSlotEvent)\n#ifdef CK_NEED_ARG_LIST\n(\n  CK_FLAGS flags,        /* blocking/nonblocking flag */\n  CK_SLOT_ID_PTR pSlot,  /* location that receives the slot ID */\n  CK_VOID_PTR pRserved   /* reserved.  Should be NULL_PTR */\n);\n#endif\n\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/pkcs11go.h",
    "content": "//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n//\n\n#define CK_PTR *\n#ifndef NULL_PTR\n#define NULL_PTR 0\n#endif\n#define CK_DEFINE_FUNCTION(returnType, name) returnType name\n#define CK_DECLARE_FUNCTION(returnType, name) returnType name\n#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)\n#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)\n\n#include <unistd.h>\n#ifdef PACKED_STRUCTURES\n# pragma pack(push, 1)\n# include \"pkcs11.h\"\n# pragma pack(pop)\n#else\n# include \"pkcs11.h\"\n#endif\n\n// Copy of CK_INFO but with default alignment (not packed). Go hides unaligned\n// struct fields so copying to an aligned struct is necessary to read CK_INFO\n// from Go on Windows where packing is required.\ntypedef struct ckInfo {\n\tCK_VERSION cryptokiVersion;\n\tCK_UTF8CHAR manufacturerID[32];\n\tCK_FLAGS flags;\n\tCK_UTF8CHAR libraryDescription[32];\n\tCK_VERSION libraryVersion;\n} ckInfo, *ckInfoPtr;\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/pkcs11t.h",
    "content": "/* Copyright (c) OASIS Open 2016. All Rights Reserved./\n * /Distributed under the terms of the OASIS IPR Policy,\n * [http://www.oasis-open.org/policies-guidelines/ipr], AS-IS, WITHOUT ANY\n * IMPLIED OR EXPRESS WARRANTY; there is no warranty of MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE or NONINFRINGEMENT of the rights of others.\n */\n        \n/* Latest version of the specification:\n * http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.40.html\n */\n\n/* See top of pkcs11.h for information about the macros that\n * must be defined and the structure-packing conventions that\n * must be set before including this file.\n */\n\n#ifndef _PKCS11T_H_\n#define _PKCS11T_H_ 1\n\n#define CRYPTOKI_VERSION_MAJOR          2\n#define CRYPTOKI_VERSION_MINOR          40\n#define CRYPTOKI_VERSION_AMENDMENT      0\n\n#define CK_TRUE         1\n#define CK_FALSE        0\n\n#ifndef CK_DISABLE_TRUE_FALSE\n#ifndef FALSE\n#define FALSE CK_FALSE\n#endif\n#ifndef TRUE\n#define TRUE CK_TRUE\n#endif\n#endif\n\n/* an unsigned 8-bit value */\ntypedef unsigned char     CK_BYTE;\n\n/* an unsigned 8-bit character */\ntypedef CK_BYTE           CK_CHAR;\n\n/* an 8-bit UTF-8 character */\ntypedef CK_BYTE           CK_UTF8CHAR;\n\n/* a BYTE-sized Boolean flag */\ntypedef CK_BYTE           CK_BBOOL;\n\n/* an unsigned value, at least 32 bits long */\ntypedef unsigned long int CK_ULONG;\n\n/* a signed value, the same size as a CK_ULONG */\ntypedef long int          CK_LONG;\n\n/* at least 32 bits; each bit is a Boolean flag */\ntypedef CK_ULONG          CK_FLAGS;\n\n\n/* some special values for certain CK_ULONG variables */\n#define CK_UNAVAILABLE_INFORMATION      (~0UL)\n#define CK_EFFECTIVELY_INFINITE         0UL\n\n\ntypedef CK_BYTE     CK_PTR   CK_BYTE_PTR;\ntypedef CK_CHAR     CK_PTR   CK_CHAR_PTR;\ntypedef CK_UTF8CHAR CK_PTR   CK_UTF8CHAR_PTR;\ntypedef CK_ULONG    CK_PTR   CK_ULONG_PTR;\ntypedef void        CK_PTR   CK_VOID_PTR;\n\n/* Pointer to a CK_VOID_PTR-- i.e., pointer to pointer to void */\ntypedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR;\n\n\n/* The following value is always invalid if used as a session\n * handle or object handle\n */\n#define CK_INVALID_HANDLE       0UL\n\n\ntypedef struct CK_VERSION {\n  CK_BYTE       major;  /* integer portion of version number */\n  CK_BYTE       minor;  /* 1/100ths portion of version number */\n} CK_VERSION;\n\ntypedef CK_VERSION CK_PTR CK_VERSION_PTR;\n\n\ntypedef struct CK_INFO {\n  CK_VERSION    cryptokiVersion;     /* Cryptoki interface ver */\n  CK_UTF8CHAR   manufacturerID[32];  /* blank padded */\n  CK_FLAGS      flags;               /* must be zero */\n  CK_UTF8CHAR   libraryDescription[32];  /* blank padded */\n  CK_VERSION    libraryVersion;          /* version of library */\n} CK_INFO;\n\ntypedef CK_INFO CK_PTR    CK_INFO_PTR;\n\n\n/* CK_NOTIFICATION enumerates the types of notifications that\n * Cryptoki provides to an application\n */\ntypedef CK_ULONG CK_NOTIFICATION;\n#define CKN_SURRENDER           0UL\n#define CKN_OTP_CHANGED         1UL\n\ntypedef CK_ULONG          CK_SLOT_ID;\n\ntypedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR;\n\n\n/* CK_SLOT_INFO provides information about a slot */\ntypedef struct CK_SLOT_INFO {\n  CK_UTF8CHAR   slotDescription[64];  /* blank padded */\n  CK_UTF8CHAR   manufacturerID[32];   /* blank padded */\n  CK_FLAGS      flags;\n\n  CK_VERSION    hardwareVersion;  /* version of hardware */\n  CK_VERSION    firmwareVersion;  /* version of firmware */\n} CK_SLOT_INFO;\n\n/* flags: bit flags that provide capabilities of the slot\n *      Bit Flag              Mask        Meaning\n */\n#define CKF_TOKEN_PRESENT     0x00000001UL  /* a token is there */\n#define CKF_REMOVABLE_DEVICE  0x00000002UL  /* removable devices*/\n#define CKF_HW_SLOT           0x00000004UL  /* hardware slot */\n\ntypedef CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR;\n\n\n/* CK_TOKEN_INFO provides information about a token */\ntypedef struct CK_TOKEN_INFO {\n  CK_UTF8CHAR   label[32];           /* blank padded */\n  CK_UTF8CHAR   manufacturerID[32];  /* blank padded */\n  CK_UTF8CHAR   model[16];           /* blank padded */\n  CK_CHAR       serialNumber[16];    /* blank padded */\n  CK_FLAGS      flags;               /* see below */\n\n  CK_ULONG      ulMaxSessionCount;     /* max open sessions */\n  CK_ULONG      ulSessionCount;        /* sess. now open */\n  CK_ULONG      ulMaxRwSessionCount;   /* max R/W sessions */\n  CK_ULONG      ulRwSessionCount;      /* R/W sess. now open */\n  CK_ULONG      ulMaxPinLen;           /* in bytes */\n  CK_ULONG      ulMinPinLen;           /* in bytes */\n  CK_ULONG      ulTotalPublicMemory;   /* in bytes */\n  CK_ULONG      ulFreePublicMemory;    /* in bytes */\n  CK_ULONG      ulTotalPrivateMemory;  /* in bytes */\n  CK_ULONG      ulFreePrivateMemory;   /* in bytes */\n  CK_VERSION    hardwareVersion;       /* version of hardware */\n  CK_VERSION    firmwareVersion;       /* version of firmware */\n  CK_CHAR       utcTime[16];           /* time */\n} CK_TOKEN_INFO;\n\n/* The flags parameter is defined as follows:\n *      Bit Flag                    Mask        Meaning\n */\n#define CKF_RNG                     0x00000001UL  /* has random # generator */\n#define CKF_WRITE_PROTECTED         0x00000002UL  /* token is write-protected */\n#define CKF_LOGIN_REQUIRED          0x00000004UL  /* user must login */\n#define CKF_USER_PIN_INITIALIZED    0x00000008UL  /* normal user's PIN is set */\n\n/* CKF_RESTORE_KEY_NOT_NEEDED.  If it is set,\n * that means that *every* time the state of cryptographic\n * operations of a session is successfully saved, all keys\n * needed to continue those operations are stored in the state\n */\n#define CKF_RESTORE_KEY_NOT_NEEDED  0x00000020UL\n\n/* CKF_CLOCK_ON_TOKEN.  If it is set, that means\n * that the token has some sort of clock.  The time on that\n * clock is returned in the token info structure\n */\n#define CKF_CLOCK_ON_TOKEN          0x00000040UL\n\n/* CKF_PROTECTED_AUTHENTICATION_PATH.  If it is\n * set, that means that there is some way for the user to login\n * without sending a PIN through the Cryptoki library itself\n */\n#define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100UL\n\n/* CKF_DUAL_CRYPTO_OPERATIONS.  If it is true,\n * that means that a single session with the token can perform\n * dual simultaneous cryptographic operations (digest and\n * encrypt; decrypt and digest; sign and encrypt; and decrypt\n * and sign)\n */\n#define CKF_DUAL_CRYPTO_OPERATIONS  0x00000200UL\n\n/* CKF_TOKEN_INITIALIZED. If it is true, the\n * token has been initialized using C_InitializeToken or an\n * equivalent mechanism outside the scope of PKCS #11.\n * Calling C_InitializeToken when this flag is set will cause\n * the token to be reinitialized.\n */\n#define CKF_TOKEN_INITIALIZED       0x00000400UL\n\n/* CKF_SECONDARY_AUTHENTICATION. If it is\n * true, the token supports secondary authentication for\n * private key objects.\n */\n#define CKF_SECONDARY_AUTHENTICATION  0x00000800UL\n\n/* CKF_USER_PIN_COUNT_LOW. If it is true, an\n * incorrect user login PIN has been entered at least once\n * since the last successful authentication.\n */\n#define CKF_USER_PIN_COUNT_LOW       0x00010000UL\n\n/* CKF_USER_PIN_FINAL_TRY. If it is true,\n * supplying an incorrect user PIN will it to become locked.\n */\n#define CKF_USER_PIN_FINAL_TRY       0x00020000UL\n\n/* CKF_USER_PIN_LOCKED. If it is true, the\n * user PIN has been locked. User login to the token is not\n * possible.\n */\n#define CKF_USER_PIN_LOCKED          0x00040000UL\n\n/* CKF_USER_PIN_TO_BE_CHANGED. If it is true,\n * the user PIN value is the default value set by token\n * initialization or manufacturing, or the PIN has been\n * expired by the card.\n */\n#define CKF_USER_PIN_TO_BE_CHANGED   0x00080000UL\n\n/* CKF_SO_PIN_COUNT_LOW. If it is true, an\n * incorrect SO login PIN has been entered at least once since\n * the last successful authentication.\n */\n#define CKF_SO_PIN_COUNT_LOW         0x00100000UL\n\n/* CKF_SO_PIN_FINAL_TRY. If it is true,\n * supplying an incorrect SO PIN will it to become locked.\n */\n#define CKF_SO_PIN_FINAL_TRY         0x00200000UL\n\n/* CKF_SO_PIN_LOCKED. If it is true, the SO\n * PIN has been locked. SO login to the token is not possible.\n */\n#define CKF_SO_PIN_LOCKED            0x00400000UL\n\n/* CKF_SO_PIN_TO_BE_CHANGED. If it is true,\n * the SO PIN value is the default value set by token\n * initialization or manufacturing, or the PIN has been\n * expired by the card.\n */\n#define CKF_SO_PIN_TO_BE_CHANGED     0x00800000UL\n\n#define CKF_ERROR_STATE              0x01000000UL\n\ntypedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR;\n\n\n/* CK_SESSION_HANDLE is a Cryptoki-assigned value that\n * identifies a session\n */\ntypedef CK_ULONG          CK_SESSION_HANDLE;\n\ntypedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR;\n\n\n/* CK_USER_TYPE enumerates the types of Cryptoki users */\ntypedef CK_ULONG          CK_USER_TYPE;\n/* Security Officer */\n#define CKU_SO                  0UL\n/* Normal user */\n#define CKU_USER                1UL\n/* Context specific */\n#define CKU_CONTEXT_SPECIFIC    2UL\n\n/* CK_STATE enumerates the session states */\ntypedef CK_ULONG          CK_STATE;\n#define CKS_RO_PUBLIC_SESSION   0UL\n#define CKS_RO_USER_FUNCTIONS   1UL\n#define CKS_RW_PUBLIC_SESSION   2UL\n#define CKS_RW_USER_FUNCTIONS   3UL\n#define CKS_RW_SO_FUNCTIONS     4UL\n\n/* CK_SESSION_INFO provides information about a session */\ntypedef struct CK_SESSION_INFO {\n  CK_SLOT_ID    slotID;\n  CK_STATE      state;\n  CK_FLAGS      flags;          /* see below */\n  CK_ULONG      ulDeviceError;  /* device-dependent error code */\n} CK_SESSION_INFO;\n\n/* The flags are defined in the following table:\n *      Bit Flag                Mask        Meaning\n */\n#define CKF_RW_SESSION          0x00000002UL /* session is r/w */\n#define CKF_SERIAL_SESSION      0x00000004UL /* no parallel    */\n\ntypedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR;\n\n\n/* CK_OBJECT_HANDLE is a token-specific identifier for an\n * object\n */\ntypedef CK_ULONG          CK_OBJECT_HANDLE;\n\ntypedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR;\n\n\n/* CK_OBJECT_CLASS is a value that identifies the classes (or\n * types) of objects that Cryptoki recognizes.  It is defined\n * as follows:\n */\ntypedef CK_ULONG          CK_OBJECT_CLASS;\n\n/* The following classes of objects are defined: */\n#define CKO_DATA              0x00000000UL\n#define CKO_CERTIFICATE       0x00000001UL\n#define CKO_PUBLIC_KEY        0x00000002UL\n#define CKO_PRIVATE_KEY       0x00000003UL\n#define CKO_SECRET_KEY        0x00000004UL\n#define CKO_HW_FEATURE        0x00000005UL\n#define CKO_DOMAIN_PARAMETERS 0x00000006UL\n#define CKO_MECHANISM         0x00000007UL\n#define CKO_OTP_KEY           0x00000008UL\n\n#define CKO_VENDOR_DEFINED    0x80000000UL\n\ntypedef CK_OBJECT_CLASS CK_PTR CK_OBJECT_CLASS_PTR;\n\n/* CK_HW_FEATURE_TYPE is a value that identifies the hardware feature type\n * of an object with CK_OBJECT_CLASS equal to CKO_HW_FEATURE.\n */\ntypedef CK_ULONG          CK_HW_FEATURE_TYPE;\n\n/* The following hardware feature types are defined */\n#define CKH_MONOTONIC_COUNTER  0x00000001UL\n#define CKH_CLOCK              0x00000002UL\n#define CKH_USER_INTERFACE     0x00000003UL\n#define CKH_VENDOR_DEFINED     0x80000000UL\n\n/* CK_KEY_TYPE is a value that identifies a key type */\ntypedef CK_ULONG          CK_KEY_TYPE;\n\n/* the following key types are defined: */\n#define CKK_RSA                 0x00000000UL\n#define CKK_DSA                 0x00000001UL\n#define CKK_DH                  0x00000002UL\n#define CKK_ECDSA               0x00000003UL /* Deprecated */\n#define CKK_EC                  0x00000003UL\n#define CKK_X9_42_DH            0x00000004UL\n#define CKK_KEA                 0x00000005UL\n#define CKK_GENERIC_SECRET      0x00000010UL\n#define CKK_RC2                 0x00000011UL\n#define CKK_RC4                 0x00000012UL\n#define CKK_DES                 0x00000013UL\n#define CKK_DES2                0x00000014UL\n#define CKK_DES3                0x00000015UL\n#define CKK_CAST                0x00000016UL\n#define CKK_CAST3               0x00000017UL\n#define CKK_CAST5               0x00000018UL /* Deprecated */\n#define CKK_CAST128             0x00000018UL\n#define CKK_RC5                 0x00000019UL\n#define CKK_IDEA                0x0000001AUL\n#define CKK_SKIPJACK            0x0000001BUL\n#define CKK_BATON               0x0000001CUL\n#define CKK_JUNIPER             0x0000001DUL\n#define CKK_CDMF                0x0000001EUL\n#define CKK_AES                 0x0000001FUL\n#define CKK_BLOWFISH            0x00000020UL\n#define CKK_TWOFISH             0x00000021UL\n#define CKK_SECURID             0x00000022UL\n#define CKK_HOTP                0x00000023UL\n#define CKK_ACTI                0x00000024UL\n#define CKK_CAMELLIA            0x00000025UL\n#define CKK_ARIA                0x00000026UL\n\n#define CKK_MD5_HMAC            0x00000027UL\n#define CKK_SHA_1_HMAC          0x00000028UL\n#define CKK_RIPEMD128_HMAC      0x00000029UL\n#define CKK_RIPEMD160_HMAC      0x0000002AUL\n#define CKK_SHA256_HMAC         0x0000002BUL\n#define CKK_SHA384_HMAC         0x0000002CUL\n#define CKK_SHA512_HMAC         0x0000002DUL\n#define CKK_SHA224_HMAC         0x0000002EUL\n\n#define CKK_SEED                0x0000002FUL\n#define CKK_GOSTR3410           0x00000030UL\n#define CKK_GOSTR3411           0x00000031UL\n#define CKK_GOST28147           0x00000032UL\n\n#define CKK_SHA3_224_HMAC       0x00000033UL\n#define CKK_SHA3_256_HMAC       0x00000034UL\n#define CKK_SHA3_384_HMAC       0x00000035UL\n#define CKK_SHA3_512_HMAC       0x00000036UL\n\n\n\n#define CKK_VENDOR_DEFINED      0x80000000UL\n\n\n/* CK_CERTIFICATE_TYPE is a value that identifies a certificate\n * type\n */\ntypedef CK_ULONG          CK_CERTIFICATE_TYPE;\n\n#define CK_CERTIFICATE_CATEGORY_UNSPECIFIED     0UL\n#define CK_CERTIFICATE_CATEGORY_TOKEN_USER      1UL\n#define CK_CERTIFICATE_CATEGORY_AUTHORITY       2UL\n#define CK_CERTIFICATE_CATEGORY_OTHER_ENTITY    3UL\n\n#define CK_SECURITY_DOMAIN_UNSPECIFIED     0UL\n#define CK_SECURITY_DOMAIN_MANUFACTURER    1UL\n#define CK_SECURITY_DOMAIN_OPERATOR        2UL\n#define CK_SECURITY_DOMAIN_THIRD_PARTY     3UL\n\n\n/* The following certificate types are defined: */\n#define CKC_X_509               0x00000000UL\n#define CKC_X_509_ATTR_CERT     0x00000001UL\n#define CKC_WTLS                0x00000002UL\n#define CKC_VENDOR_DEFINED      0x80000000UL\n\n\n/* CK_ATTRIBUTE_TYPE is a value that identifies an attribute\n * type\n */\ntypedef CK_ULONG          CK_ATTRIBUTE_TYPE;\n\n/* The CKF_ARRAY_ATTRIBUTE flag identifies an attribute which\n * consists of an array of values.\n */\n#define CKF_ARRAY_ATTRIBUTE     0x40000000UL\n\n/* The following OTP-related defines relate to the CKA_OTP_FORMAT attribute */\n#define CK_OTP_FORMAT_DECIMAL           0UL\n#define CK_OTP_FORMAT_HEXADECIMAL       1UL\n#define CK_OTP_FORMAT_ALPHANUMERIC      2UL\n#define CK_OTP_FORMAT_BINARY            3UL\n\n/* The following OTP-related defines relate to the CKA_OTP_..._REQUIREMENT\n * attributes\n */\n#define CK_OTP_PARAM_IGNORED            0UL\n#define CK_OTP_PARAM_OPTIONAL           1UL\n#define CK_OTP_PARAM_MANDATORY          2UL\n\n/* The following attribute types are defined: */\n#define CKA_CLASS              0x00000000UL\n#define CKA_TOKEN              0x00000001UL\n#define CKA_PRIVATE            0x00000002UL\n#define CKA_LABEL              0x00000003UL\n#define CKA_APPLICATION        0x00000010UL\n#define CKA_VALUE              0x00000011UL\n#define CKA_OBJECT_ID          0x00000012UL\n#define CKA_CERTIFICATE_TYPE   0x00000080UL\n#define CKA_ISSUER             0x00000081UL\n#define CKA_SERIAL_NUMBER      0x00000082UL\n#define CKA_AC_ISSUER          0x00000083UL\n#define CKA_OWNER              0x00000084UL\n#define CKA_ATTR_TYPES         0x00000085UL\n#define CKA_TRUSTED            0x00000086UL\n#define CKA_CERTIFICATE_CATEGORY        0x00000087UL\n#define CKA_JAVA_MIDP_SECURITY_DOMAIN   0x00000088UL\n#define CKA_URL                         0x00000089UL\n#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY  0x0000008AUL\n#define CKA_HASH_OF_ISSUER_PUBLIC_KEY   0x0000008BUL\n#define CKA_NAME_HASH_ALGORITHM         0x0000008CUL\n#define CKA_CHECK_VALUE                 0x00000090UL\n\n#define CKA_KEY_TYPE           0x00000100UL\n#define CKA_SUBJECT            0x00000101UL\n#define CKA_ID                 0x00000102UL\n#define CKA_SENSITIVE          0x00000103UL\n#define CKA_ENCRYPT            0x00000104UL\n#define CKA_DECRYPT            0x00000105UL\n#define CKA_WRAP               0x00000106UL\n#define CKA_UNWRAP             0x00000107UL\n#define CKA_SIGN               0x00000108UL\n#define CKA_SIGN_RECOVER       0x00000109UL\n#define CKA_VERIFY             0x0000010AUL\n#define CKA_VERIFY_RECOVER     0x0000010BUL\n#define CKA_DERIVE             0x0000010CUL\n#define CKA_START_DATE         0x00000110UL\n#define CKA_END_DATE           0x00000111UL\n#define CKA_MODULUS            0x00000120UL\n#define CKA_MODULUS_BITS       0x00000121UL\n#define CKA_PUBLIC_EXPONENT    0x00000122UL\n#define CKA_PRIVATE_EXPONENT   0x00000123UL\n#define CKA_PRIME_1            0x00000124UL\n#define CKA_PRIME_2            0x00000125UL\n#define CKA_EXPONENT_1         0x00000126UL\n#define CKA_EXPONENT_2         0x00000127UL\n#define CKA_COEFFICIENT        0x00000128UL\n#define CKA_PUBLIC_KEY_INFO    0x00000129UL\n#define CKA_PRIME              0x00000130UL\n#define CKA_SUBPRIME           0x00000131UL\n#define CKA_BASE               0x00000132UL\n\n#define CKA_PRIME_BITS         0x00000133UL\n#define CKA_SUBPRIME_BITS      0x00000134UL\n#define CKA_SUB_PRIME_BITS     CKA_SUBPRIME_BITS\n\n#define CKA_VALUE_BITS         0x00000160UL\n#define CKA_VALUE_LEN          0x00000161UL\n#define CKA_EXTRACTABLE        0x00000162UL\n#define CKA_LOCAL              0x00000163UL\n#define CKA_NEVER_EXTRACTABLE  0x00000164UL\n#define CKA_ALWAYS_SENSITIVE   0x00000165UL\n#define CKA_KEY_GEN_MECHANISM  0x00000166UL\n\n#define CKA_MODIFIABLE         0x00000170UL\n#define CKA_COPYABLE           0x00000171UL\n\n#define CKA_DESTROYABLE        0x00000172UL\n\n#define CKA_ECDSA_PARAMS       0x00000180UL /* Deprecated */\n#define CKA_EC_PARAMS          0x00000180UL\n\n#define CKA_EC_POINT           0x00000181UL\n\n#define CKA_SECONDARY_AUTH     0x00000200UL /* Deprecated */\n#define CKA_AUTH_PIN_FLAGS     0x00000201UL /* Deprecated */\n\n#define CKA_ALWAYS_AUTHENTICATE  0x00000202UL\n\n#define CKA_WRAP_WITH_TRUSTED    0x00000210UL\n#define CKA_WRAP_TEMPLATE        (CKF_ARRAY_ATTRIBUTE|0x00000211UL)\n#define CKA_UNWRAP_TEMPLATE      (CKF_ARRAY_ATTRIBUTE|0x00000212UL)\n#define CKA_DERIVE_TEMPLATE      (CKF_ARRAY_ATTRIBUTE|0x00000213UL)\n\n#define CKA_OTP_FORMAT                0x00000220UL\n#define CKA_OTP_LENGTH                0x00000221UL\n#define CKA_OTP_TIME_INTERVAL         0x00000222UL\n#define CKA_OTP_USER_FRIENDLY_MODE    0x00000223UL\n#define CKA_OTP_CHALLENGE_REQUIREMENT 0x00000224UL\n#define CKA_OTP_TIME_REQUIREMENT      0x00000225UL\n#define CKA_OTP_COUNTER_REQUIREMENT   0x00000226UL\n#define CKA_OTP_PIN_REQUIREMENT       0x00000227UL\n#define CKA_OTP_COUNTER               0x0000022EUL\n#define CKA_OTP_TIME                  0x0000022FUL\n#define CKA_OTP_USER_IDENTIFIER       0x0000022AUL\n#define CKA_OTP_SERVICE_IDENTIFIER    0x0000022BUL\n#define CKA_OTP_SERVICE_LOGO          0x0000022CUL\n#define CKA_OTP_SERVICE_LOGO_TYPE     0x0000022DUL\n\n#define CKA_GOSTR3410_PARAMS            0x00000250UL\n#define CKA_GOSTR3411_PARAMS            0x00000251UL\n#define CKA_GOST28147_PARAMS            0x00000252UL\n\n#define CKA_HW_FEATURE_TYPE             0x00000300UL\n#define CKA_RESET_ON_INIT               0x00000301UL\n#define CKA_HAS_RESET                   0x00000302UL\n\n#define CKA_PIXEL_X                     0x00000400UL\n#define CKA_PIXEL_Y                     0x00000401UL\n#define CKA_RESOLUTION                  0x00000402UL\n#define CKA_CHAR_ROWS                   0x00000403UL\n#define CKA_CHAR_COLUMNS                0x00000404UL\n#define CKA_COLOR                       0x00000405UL\n#define CKA_BITS_PER_PIXEL              0x00000406UL\n#define CKA_CHAR_SETS                   0x00000480UL\n#define CKA_ENCODING_METHODS            0x00000481UL\n#define CKA_MIME_TYPES                  0x00000482UL\n#define CKA_MECHANISM_TYPE              0x00000500UL\n#define CKA_REQUIRED_CMS_ATTRIBUTES     0x00000501UL\n#define CKA_DEFAULT_CMS_ATTRIBUTES      0x00000502UL\n#define CKA_SUPPORTED_CMS_ATTRIBUTES    0x00000503UL\n#define CKA_ALLOWED_MECHANISMS          (CKF_ARRAY_ATTRIBUTE|0x00000600UL)\n\n#define CKA_VENDOR_DEFINED              0x80000000UL\n\n/* CK_ATTRIBUTE is a structure that includes the type, length\n * and value of an attribute\n */\ntypedef struct CK_ATTRIBUTE {\n  CK_ATTRIBUTE_TYPE type;\n  CK_VOID_PTR       pValue;\n  CK_ULONG          ulValueLen;  /* in bytes */\n} CK_ATTRIBUTE;\n\ntypedef CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR;\n\n/* CK_DATE is a structure that defines a date */\ntypedef struct CK_DATE{\n  CK_CHAR       year[4];   /* the year (\"1900\" - \"9999\") */\n  CK_CHAR       month[2];  /* the month (\"01\" - \"12\") */\n  CK_CHAR       day[2];    /* the day   (\"01\" - \"31\") */\n} CK_DATE;\n\n\n/* CK_MECHANISM_TYPE is a value that identifies a mechanism\n * type\n */\ntypedef CK_ULONG          CK_MECHANISM_TYPE;\n\n/* the following mechanism types are defined: */\n#define CKM_RSA_PKCS_KEY_PAIR_GEN      0x00000000UL\n#define CKM_RSA_PKCS                   0x00000001UL\n#define CKM_RSA_9796                   0x00000002UL\n#define CKM_RSA_X_509                  0x00000003UL\n\n#define CKM_MD2_RSA_PKCS               0x00000004UL\n#define CKM_MD5_RSA_PKCS               0x00000005UL\n#define CKM_SHA1_RSA_PKCS              0x00000006UL\n\n#define CKM_RIPEMD128_RSA_PKCS         0x00000007UL\n#define CKM_RIPEMD160_RSA_PKCS         0x00000008UL\n#define CKM_RSA_PKCS_OAEP              0x00000009UL\n\n#define CKM_RSA_X9_31_KEY_PAIR_GEN     0x0000000AUL\n#define CKM_RSA_X9_31                  0x0000000BUL\n#define CKM_SHA1_RSA_X9_31             0x0000000CUL\n#define CKM_RSA_PKCS_PSS               0x0000000DUL\n#define CKM_SHA1_RSA_PKCS_PSS          0x0000000EUL\n\n#define CKM_DSA_KEY_PAIR_GEN           0x00000010UL\n#define CKM_DSA                        0x00000011UL\n#define CKM_DSA_SHA1                   0x00000012UL\n#define CKM_DSA_SHA224                 0x00000013UL\n#define CKM_DSA_SHA256                 0x00000014UL\n#define CKM_DSA_SHA384                 0x00000015UL\n#define CKM_DSA_SHA512                 0x00000016UL\n#define CKM_DSA_SHA3_224               0x00000018UL\n#define CKM_DSA_SHA3_256               0x00000019UL\n#define CKM_DSA_SHA3_384               0x0000001AUL\n#define CKM_DSA_SHA3_512               0x0000001BUL\n\n#define CKM_DH_PKCS_KEY_PAIR_GEN       0x00000020UL\n#define CKM_DH_PKCS_DERIVE             0x00000021UL\n\n#define CKM_X9_42_DH_KEY_PAIR_GEN      0x00000030UL\n#define CKM_X9_42_DH_DERIVE            0x00000031UL\n#define CKM_X9_42_DH_HYBRID_DERIVE     0x00000032UL\n#define CKM_X9_42_MQV_DERIVE           0x00000033UL\n\n#define CKM_SHA256_RSA_PKCS            0x00000040UL\n#define CKM_SHA384_RSA_PKCS            0x00000041UL\n#define CKM_SHA512_RSA_PKCS            0x00000042UL\n#define CKM_SHA256_RSA_PKCS_PSS        0x00000043UL\n#define CKM_SHA384_RSA_PKCS_PSS        0x00000044UL\n#define CKM_SHA512_RSA_PKCS_PSS        0x00000045UL\n\n#define CKM_SHA224_RSA_PKCS            0x00000046UL\n#define CKM_SHA224_RSA_PKCS_PSS        0x00000047UL\n\n#define CKM_SHA512_224                 0x00000048UL\n#define CKM_SHA512_224_HMAC            0x00000049UL\n#define CKM_SHA512_224_HMAC_GENERAL    0x0000004AUL\n#define CKM_SHA512_224_KEY_DERIVATION  0x0000004BUL\n#define CKM_SHA512_256                 0x0000004CUL\n#define CKM_SHA512_256_HMAC            0x0000004DUL\n#define CKM_SHA512_256_HMAC_GENERAL    0x0000004EUL\n#define CKM_SHA512_256_KEY_DERIVATION  0x0000004FUL\n\n#define CKM_SHA512_T                   0x00000050UL\n#define CKM_SHA512_T_HMAC              0x00000051UL\n#define CKM_SHA512_T_HMAC_GENERAL      0x00000052UL\n#define CKM_SHA512_T_KEY_DERIVATION    0x00000053UL\n\n#define CKM_SHA3_256_RSA_PKCS          0x00000060UL\n#define CKM_SHA3_384_RSA_PKCS          0x00000061UL\n#define CKM_SHA3_512_RSA_PKCS          0x00000062UL\n#define CKM_SHA3_256_RSA_PKCS_PSS      0x00000063UL\n#define CKM_SHA3_384_RSA_PKCS_PSS      0x00000064UL\n#define CKM_SHA3_512_RSA_PKCS_PSS      0x00000065UL\n#define CKM_SHA3_224_RSA_PKCS          0x00000066UL\n#define CKM_SHA3_224_RSA_PKCS_PSS      0x00000067UL\n\n#define CKM_RC2_KEY_GEN                0x00000100UL\n#define CKM_RC2_ECB                    0x00000101UL\n#define CKM_RC2_CBC                    0x00000102UL\n#define CKM_RC2_MAC                    0x00000103UL\n\n#define CKM_RC2_MAC_GENERAL            0x00000104UL\n#define CKM_RC2_CBC_PAD                0x00000105UL\n\n#define CKM_RC4_KEY_GEN                0x00000110UL\n#define CKM_RC4                        0x00000111UL\n#define CKM_DES_KEY_GEN                0x00000120UL\n#define CKM_DES_ECB                    0x00000121UL\n#define CKM_DES_CBC                    0x00000122UL\n#define CKM_DES_MAC                    0x00000123UL\n\n#define CKM_DES_MAC_GENERAL            0x00000124UL\n#define CKM_DES_CBC_PAD                0x00000125UL\n\n#define CKM_DES2_KEY_GEN               0x00000130UL\n#define CKM_DES3_KEY_GEN               0x00000131UL\n#define CKM_DES3_ECB                   0x00000132UL\n#define CKM_DES3_CBC                   0x00000133UL\n#define CKM_DES3_MAC                   0x00000134UL\n\n#define CKM_DES3_MAC_GENERAL           0x00000135UL\n#define CKM_DES3_CBC_PAD               0x00000136UL\n#define CKM_DES3_CMAC_GENERAL          0x00000137UL\n#define CKM_DES3_CMAC                  0x00000138UL\n#define CKM_CDMF_KEY_GEN               0x00000140UL\n#define CKM_CDMF_ECB                   0x00000141UL\n#define CKM_CDMF_CBC                   0x00000142UL\n#define CKM_CDMF_MAC                   0x00000143UL\n#define CKM_CDMF_MAC_GENERAL           0x00000144UL\n#define CKM_CDMF_CBC_PAD               0x00000145UL\n\n#define CKM_DES_OFB64                  0x00000150UL\n#define CKM_DES_OFB8                   0x00000151UL\n#define CKM_DES_CFB64                  0x00000152UL\n#define CKM_DES_CFB8                   0x00000153UL\n\n#define CKM_MD2                        0x00000200UL\n\n#define CKM_MD2_HMAC                   0x00000201UL\n#define CKM_MD2_HMAC_GENERAL           0x00000202UL\n\n#define CKM_MD5                        0x00000210UL\n\n#define CKM_MD5_HMAC                   0x00000211UL\n#define CKM_MD5_HMAC_GENERAL           0x00000212UL\n\n#define CKM_SHA_1                      0x00000220UL\n\n#define CKM_SHA_1_HMAC                 0x00000221UL\n#define CKM_SHA_1_HMAC_GENERAL         0x00000222UL\n\n#define CKM_RIPEMD128                  0x00000230UL\n#define CKM_RIPEMD128_HMAC             0x00000231UL\n#define CKM_RIPEMD128_HMAC_GENERAL     0x00000232UL\n#define CKM_RIPEMD160                  0x00000240UL\n#define CKM_RIPEMD160_HMAC             0x00000241UL\n#define CKM_RIPEMD160_HMAC_GENERAL     0x00000242UL\n\n#define CKM_SHA256                     0x00000250UL\n#define CKM_SHA256_HMAC                0x00000251UL\n#define CKM_SHA256_HMAC_GENERAL        0x00000252UL\n#define CKM_SHA224                     0x00000255UL\n#define CKM_SHA224_HMAC                0x00000256UL\n#define CKM_SHA224_HMAC_GENERAL        0x00000257UL\n#define CKM_SHA384                     0x00000260UL\n#define CKM_SHA384_HMAC                0x00000261UL\n#define CKM_SHA384_HMAC_GENERAL        0x00000262UL\n#define CKM_SHA512                     0x00000270UL\n#define CKM_SHA512_HMAC                0x00000271UL\n#define CKM_SHA512_HMAC_GENERAL        0x00000272UL\n#define CKM_SECURID_KEY_GEN            0x00000280UL\n#define CKM_SECURID                    0x00000282UL\n#define CKM_HOTP_KEY_GEN               0x00000290UL\n#define CKM_HOTP                       0x00000291UL\n#define CKM_ACTI                       0x000002A0UL\n#define CKM_ACTI_KEY_GEN               0x000002A1UL\n\n#define CKM_SHA3_256                   0x000002B0UL\n#define CKM_SHA3_256_HMAC              0x000002B1UL\n#define CKM_SHA3_256_HMAC_GENERAL      0x000002B2UL\n#define CKM_SHA3_256_KEY_GEN           0x000002B3UL\n#define CKM_SHA3_224                   0x000002B5UL\n#define CKM_SHA3_224_HMAC              0x000002B6UL\n#define CKM_SHA3_224_HMAC_GENERAL      0x000002B7UL\n#define CKM_SHA3_224_KEY_GEN           0x000002B8UL\n#define CKM_SHA3_384                   0x000002C0UL\n#define CKM_SHA3_384_HMAC              0x000002C1UL\n#define CKM_SHA3_384_HMAC_GENERAL      0x000002C2UL\n#define CKM_SHA3_384_KEY_GEN           0x000002C3UL\n#define CKM_SHA3_512                   0x000002D0UL\n#define CKM_SHA3_512_HMAC              0x000002D1UL\n#define CKM_SHA3_512_HMAC_GENERAL      0x000002D2UL\n#define CKM_SHA3_512_KEY_GEN           0x000002D3UL\n\n#define CKM_CAST_KEY_GEN               0x00000300UL\n#define CKM_CAST_ECB                   0x00000301UL\n#define CKM_CAST_CBC                   0x00000302UL\n#define CKM_CAST_MAC                   0x00000303UL\n#define CKM_CAST_MAC_GENERAL           0x00000304UL\n#define CKM_CAST_CBC_PAD               0x00000305UL\n#define CKM_CAST3_KEY_GEN              0x00000310UL\n#define CKM_CAST3_ECB                  0x00000311UL\n#define CKM_CAST3_CBC                  0x00000312UL\n#define CKM_CAST3_MAC                  0x00000313UL\n#define CKM_CAST3_MAC_GENERAL          0x00000314UL\n#define CKM_CAST3_CBC_PAD              0x00000315UL\n/* Note that CAST128 and CAST5 are the same algorithm */\n#define CKM_CAST5_KEY_GEN              0x00000320UL\n#define CKM_CAST128_KEY_GEN            0x00000320UL\n#define CKM_CAST5_ECB                  0x00000321UL\n#define CKM_CAST128_ECB                0x00000321UL\n#define CKM_CAST5_CBC                  0x00000322UL /* Deprecated */\n#define CKM_CAST128_CBC                0x00000322UL\n#define CKM_CAST5_MAC                  0x00000323UL /* Deprecated */\n#define CKM_CAST128_MAC                0x00000323UL\n#define CKM_CAST5_MAC_GENERAL          0x00000324UL /* Deprecated */\n#define CKM_CAST128_MAC_GENERAL        0x00000324UL\n#define CKM_CAST5_CBC_PAD              0x00000325UL /* Deprecated */\n#define CKM_CAST128_CBC_PAD            0x00000325UL\n#define CKM_RC5_KEY_GEN                0x00000330UL\n#define CKM_RC5_ECB                    0x00000331UL\n#define CKM_RC5_CBC                    0x00000332UL\n#define CKM_RC5_MAC                    0x00000333UL\n#define CKM_RC5_MAC_GENERAL            0x00000334UL\n#define CKM_RC5_CBC_PAD                0x00000335UL\n#define CKM_IDEA_KEY_GEN               0x00000340UL\n#define CKM_IDEA_ECB                   0x00000341UL\n#define CKM_IDEA_CBC                   0x00000342UL\n#define CKM_IDEA_MAC                   0x00000343UL\n#define CKM_IDEA_MAC_GENERAL           0x00000344UL\n#define CKM_IDEA_CBC_PAD               0x00000345UL\n#define CKM_GENERIC_SECRET_KEY_GEN     0x00000350UL\n#define CKM_CONCATENATE_BASE_AND_KEY   0x00000360UL\n#define CKM_CONCATENATE_BASE_AND_DATA  0x00000362UL\n#define CKM_CONCATENATE_DATA_AND_BASE  0x00000363UL\n#define CKM_XOR_BASE_AND_DATA          0x00000364UL\n#define CKM_EXTRACT_KEY_FROM_KEY       0x00000365UL\n#define CKM_SSL3_PRE_MASTER_KEY_GEN    0x00000370UL\n#define CKM_SSL3_MASTER_KEY_DERIVE     0x00000371UL\n#define CKM_SSL3_KEY_AND_MAC_DERIVE    0x00000372UL\n\n#define CKM_SSL3_MASTER_KEY_DERIVE_DH  0x00000373UL\n#define CKM_TLS_PRE_MASTER_KEY_GEN     0x00000374UL\n#define CKM_TLS_MASTER_KEY_DERIVE      0x00000375UL\n#define CKM_TLS_KEY_AND_MAC_DERIVE     0x00000376UL\n#define CKM_TLS_MASTER_KEY_DERIVE_DH   0x00000377UL\n\n#define CKM_TLS_PRF                    0x00000378UL\n\n#define CKM_SSL3_MD5_MAC               0x00000380UL\n#define CKM_SSL3_SHA1_MAC              0x00000381UL\n#define CKM_MD5_KEY_DERIVATION         0x00000390UL\n#define CKM_MD2_KEY_DERIVATION         0x00000391UL\n#define CKM_SHA1_KEY_DERIVATION        0x00000392UL\n\n#define CKM_SHA256_KEY_DERIVATION      0x00000393UL\n#define CKM_SHA384_KEY_DERIVATION      0x00000394UL\n#define CKM_SHA512_KEY_DERIVATION      0x00000395UL\n#define CKM_SHA224_KEY_DERIVATION      0x00000396UL\n#define CKM_SHA3_256_KEY_DERIVE        0x00000397UL\n#define CKM_SHA3_224_KEY_DERIVE        0x00000398UL\n#define CKM_SHA3_384_KEY_DERIVE        0x00000399UL\n#define CKM_SHA3_512_KEY_DERIVE        0x0000039AUL\n#define CKM_SHAKE_128_KEY_DERIVE       0x0000039BUL\n#define CKM_SHAKE_256_KEY_DERIVE       0x0000039CUL\n\n#define CKM_PBE_MD2_DES_CBC            0x000003A0UL\n#define CKM_PBE_MD5_DES_CBC            0x000003A1UL\n#define CKM_PBE_MD5_CAST_CBC           0x000003A2UL\n#define CKM_PBE_MD5_CAST3_CBC          0x000003A3UL\n#define CKM_PBE_MD5_CAST5_CBC          0x000003A4UL /* Deprecated */\n#define CKM_PBE_MD5_CAST128_CBC        0x000003A4UL\n#define CKM_PBE_SHA1_CAST5_CBC         0x000003A5UL /* Deprecated */\n#define CKM_PBE_SHA1_CAST128_CBC       0x000003A5UL\n#define CKM_PBE_SHA1_RC4_128           0x000003A6UL\n#define CKM_PBE_SHA1_RC4_40            0x000003A7UL\n#define CKM_PBE_SHA1_DES3_EDE_CBC      0x000003A8UL\n#define CKM_PBE_SHA1_DES2_EDE_CBC      0x000003A9UL\n#define CKM_PBE_SHA1_RC2_128_CBC       0x000003AAUL\n#define CKM_PBE_SHA1_RC2_40_CBC        0x000003ABUL\n\n#define CKM_PKCS5_PBKD2                0x000003B0UL\n\n#define CKM_PBA_SHA1_WITH_SHA1_HMAC    0x000003C0UL\n\n#define CKM_WTLS_PRE_MASTER_KEY_GEN         0x000003D0UL\n#define CKM_WTLS_MASTER_KEY_DERIVE          0x000003D1UL\n#define CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC   0x000003D2UL\n#define CKM_WTLS_PRF                        0x000003D3UL\n#define CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE  0x000003D4UL\n#define CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE  0x000003D5UL\n\n#define CKM_TLS10_MAC_SERVER                0x000003D6UL\n#define CKM_TLS10_MAC_CLIENT                0x000003D7UL\n#define CKM_TLS12_MAC                       0x000003D8UL\n#define CKM_TLS12_KDF                       0x000003D9UL\n#define CKM_TLS12_MASTER_KEY_DERIVE         0x000003E0UL\n#define CKM_TLS12_KEY_AND_MAC_DERIVE        0x000003E1UL\n#define CKM_TLS12_MASTER_KEY_DERIVE_DH      0x000003E2UL\n#define CKM_TLS12_KEY_SAFE_DERIVE           0x000003E3UL\n#define CKM_TLS_MAC                         0x000003E4UL\n#define CKM_TLS_KDF                         0x000003E5UL\n\n#define CKM_KEY_WRAP_LYNKS             0x00000400UL\n#define CKM_KEY_WRAP_SET_OAEP          0x00000401UL\n\n#define CKM_CMS_SIG                    0x00000500UL\n#define CKM_KIP_DERIVE                 0x00000510UL\n#define CKM_KIP_WRAP                   0x00000511UL\n#define CKM_KIP_MAC                    0x00000512UL\n\n#define CKM_CAMELLIA_KEY_GEN           0x00000550UL\n#define CKM_CAMELLIA_ECB               0x00000551UL\n#define CKM_CAMELLIA_CBC               0x00000552UL\n#define CKM_CAMELLIA_MAC               0x00000553UL\n#define CKM_CAMELLIA_MAC_GENERAL       0x00000554UL\n#define CKM_CAMELLIA_CBC_PAD           0x00000555UL\n#define CKM_CAMELLIA_ECB_ENCRYPT_DATA  0x00000556UL\n#define CKM_CAMELLIA_CBC_ENCRYPT_DATA  0x00000557UL\n#define CKM_CAMELLIA_CTR               0x00000558UL\n\n#define CKM_ARIA_KEY_GEN               0x00000560UL\n#define CKM_ARIA_ECB                   0x00000561UL\n#define CKM_ARIA_CBC                   0x00000562UL\n#define CKM_ARIA_MAC                   0x00000563UL\n#define CKM_ARIA_MAC_GENERAL           0x00000564UL\n#define CKM_ARIA_CBC_PAD               0x00000565UL\n#define CKM_ARIA_ECB_ENCRYPT_DATA      0x00000566UL\n#define CKM_ARIA_CBC_ENCRYPT_DATA      0x00000567UL\n\n#define CKM_SEED_KEY_GEN               0x00000650UL\n#define CKM_SEED_ECB                   0x00000651UL\n#define CKM_SEED_CBC                   0x00000652UL\n#define CKM_SEED_MAC                   0x00000653UL\n#define CKM_SEED_MAC_GENERAL           0x00000654UL\n#define CKM_SEED_CBC_PAD               0x00000655UL\n#define CKM_SEED_ECB_ENCRYPT_DATA      0x00000656UL\n#define CKM_SEED_CBC_ENCRYPT_DATA      0x00000657UL\n\n#define CKM_SKIPJACK_KEY_GEN           0x00001000UL\n#define CKM_SKIPJACK_ECB64             0x00001001UL\n#define CKM_SKIPJACK_CBC64             0x00001002UL\n#define CKM_SKIPJACK_OFB64             0x00001003UL\n#define CKM_SKIPJACK_CFB64             0x00001004UL\n#define CKM_SKIPJACK_CFB32             0x00001005UL\n#define CKM_SKIPJACK_CFB16             0x00001006UL\n#define CKM_SKIPJACK_CFB8              0x00001007UL\n#define CKM_SKIPJACK_WRAP              0x00001008UL\n#define CKM_SKIPJACK_PRIVATE_WRAP      0x00001009UL\n#define CKM_SKIPJACK_RELAYX            0x0000100aUL\n#define CKM_KEA_KEY_PAIR_GEN           0x00001010UL\n#define CKM_KEA_KEY_DERIVE             0x00001011UL\n#define CKM_KEA_DERIVE                 0x00001012UL\n#define CKM_FORTEZZA_TIMESTAMP         0x00001020UL\n#define CKM_BATON_KEY_GEN              0x00001030UL\n#define CKM_BATON_ECB128               0x00001031UL\n#define CKM_BATON_ECB96                0x00001032UL\n#define CKM_BATON_CBC128               0x00001033UL\n#define CKM_BATON_COUNTER              0x00001034UL\n#define CKM_BATON_SHUFFLE              0x00001035UL\n#define CKM_BATON_WRAP                 0x00001036UL\n\n#define CKM_ECDSA_KEY_PAIR_GEN         0x00001040UL /* Deprecated */\n#define CKM_EC_KEY_PAIR_GEN            0x00001040UL\n\n#define CKM_ECDSA                      0x00001041UL\n#define CKM_ECDSA_SHA1                 0x00001042UL\n#define CKM_ECDSA_SHA224               0x00001043UL\n#define CKM_ECDSA_SHA256               0x00001044UL\n#define CKM_ECDSA_SHA384               0x00001045UL\n#define CKM_ECDSA_SHA512               0x00001046UL\n\n#define CKM_ECDH1_DERIVE               0x00001050UL\n#define CKM_ECDH1_COFACTOR_DERIVE      0x00001051UL\n#define CKM_ECMQV_DERIVE               0x00001052UL\n\n#define CKM_ECDH_AES_KEY_WRAP          0x00001053UL\n#define CKM_RSA_AES_KEY_WRAP           0x00001054UL\n\n#define CKM_JUNIPER_KEY_GEN            0x00001060UL\n#define CKM_JUNIPER_ECB128             0x00001061UL\n#define CKM_JUNIPER_CBC128             0x00001062UL\n#define CKM_JUNIPER_COUNTER            0x00001063UL\n#define CKM_JUNIPER_SHUFFLE            0x00001064UL\n#define CKM_JUNIPER_WRAP               0x00001065UL\n#define CKM_FASTHASH                   0x00001070UL\n\n#define CKM_AES_KEY_GEN                0x00001080UL\n#define CKM_AES_ECB                    0x00001081UL\n#define CKM_AES_CBC                    0x00001082UL\n#define CKM_AES_MAC                    0x00001083UL\n#define CKM_AES_MAC_GENERAL            0x00001084UL\n#define CKM_AES_CBC_PAD                0x00001085UL\n#define CKM_AES_CTR                    0x00001086UL\n#define CKM_AES_GCM                    0x00001087UL\n#define CKM_AES_CCM                    0x00001088UL\n#define CKM_AES_CTS                    0x00001089UL\n#define CKM_AES_CMAC                   0x0000108AUL\n#define CKM_AES_CMAC_GENERAL           0x0000108BUL\n\n#define CKM_AES_XCBC_MAC               0x0000108CUL\n#define CKM_AES_XCBC_MAC_96            0x0000108DUL\n#define CKM_AES_GMAC                   0x0000108EUL\n\n#define CKM_BLOWFISH_KEY_GEN           0x00001090UL\n#define CKM_BLOWFISH_CBC               0x00001091UL\n#define CKM_TWOFISH_KEY_GEN            0x00001092UL\n#define CKM_TWOFISH_CBC                0x00001093UL\n#define CKM_BLOWFISH_CBC_PAD           0x00001094UL\n#define CKM_TWOFISH_CBC_PAD            0x00001095UL\n\n#define CKM_DES_ECB_ENCRYPT_DATA       0x00001100UL\n#define CKM_DES_CBC_ENCRYPT_DATA       0x00001101UL\n#define CKM_DES3_ECB_ENCRYPT_DATA      0x00001102UL\n#define CKM_DES3_CBC_ENCRYPT_DATA      0x00001103UL\n#define CKM_AES_ECB_ENCRYPT_DATA       0x00001104UL\n#define CKM_AES_CBC_ENCRYPT_DATA       0x00001105UL\n\n#define CKM_GOSTR3410_KEY_PAIR_GEN     0x00001200UL\n#define CKM_GOSTR3410                  0x00001201UL\n#define CKM_GOSTR3410_WITH_GOSTR3411   0x00001202UL\n#define CKM_GOSTR3410_KEY_WRAP         0x00001203UL\n#define CKM_GOSTR3410_DERIVE           0x00001204UL\n#define CKM_GOSTR3411                  0x00001210UL\n#define CKM_GOSTR3411_HMAC             0x00001211UL\n#define CKM_GOST28147_KEY_GEN          0x00001220UL\n#define CKM_GOST28147_ECB              0x00001221UL\n#define CKM_GOST28147                  0x00001222UL\n#define CKM_GOST28147_MAC              0x00001223UL\n#define CKM_GOST28147_KEY_WRAP         0x00001224UL\n\n#define CKM_DSA_PARAMETER_GEN          0x00002000UL\n#define CKM_DH_PKCS_PARAMETER_GEN      0x00002001UL\n#define CKM_X9_42_DH_PARAMETER_GEN     0x00002002UL\n#define CKM_DSA_PROBABLISTIC_PARAMETER_GEN    0x00002003UL\n#define CKM_DSA_SHAWE_TAYLOR_PARAMETER_GEN    0x00002004UL\n\n#define CKM_AES_OFB                    0x00002104UL\n#define CKM_AES_CFB64                  0x00002105UL\n#define CKM_AES_CFB8                   0x00002106UL\n#define CKM_AES_CFB128                 0x00002107UL\n\n#define CKM_AES_CFB1                   0x00002108UL\n#define CKM_AES_KEY_WRAP               0x00002109UL     /* WAS: 0x00001090 */\n#define CKM_AES_KEY_WRAP_PAD           0x0000210AUL     /* WAS: 0x00001091 */\n\n#define CKM_RSA_PKCS_TPM_1_1           0x00004001UL\n#define CKM_RSA_PKCS_OAEP_TPM_1_1      0x00004002UL\n\n#define CKM_VENDOR_DEFINED             0x80000000UL\n\ntypedef CK_MECHANISM_TYPE CK_PTR CK_MECHANISM_TYPE_PTR;\n\n\n/* CK_MECHANISM is a structure that specifies a particular\n * mechanism\n */\ntypedef struct CK_MECHANISM {\n  CK_MECHANISM_TYPE mechanism;\n  CK_VOID_PTR       pParameter;\n  CK_ULONG          ulParameterLen;  /* in bytes */\n} CK_MECHANISM;\n\ntypedef CK_MECHANISM CK_PTR CK_MECHANISM_PTR;\n\n\n/* CK_MECHANISM_INFO provides information about a particular\n * mechanism\n */\ntypedef struct CK_MECHANISM_INFO {\n    CK_ULONG    ulMinKeySize;\n    CK_ULONG    ulMaxKeySize;\n    CK_FLAGS    flags;\n} CK_MECHANISM_INFO;\n\n/* The flags are defined as follows:\n *      Bit Flag               Mask          Meaning */\n#define CKF_HW                 0x00000001UL  /* performed by HW */\n\n/* Specify whether or not a mechanism can be used for a particular task */\n#define CKF_ENCRYPT            0x00000100UL\n#define CKF_DECRYPT            0x00000200UL\n#define CKF_DIGEST             0x00000400UL\n#define CKF_SIGN               0x00000800UL\n#define CKF_SIGN_RECOVER       0x00001000UL\n#define CKF_VERIFY             0x00002000UL\n#define CKF_VERIFY_RECOVER     0x00004000UL\n#define CKF_GENERATE           0x00008000UL\n#define CKF_GENERATE_KEY_PAIR  0x00010000UL\n#define CKF_WRAP               0x00020000UL\n#define CKF_UNWRAP             0x00040000UL\n#define CKF_DERIVE             0x00080000UL\n\n/* Describe a token's EC capabilities not available in mechanism\n * information.\n */\n#define CKF_EC_F_P             0x00100000UL\n#define CKF_EC_F_2M            0x00200000UL\n#define CKF_EC_ECPARAMETERS    0x00400000UL\n#define CKF_EC_NAMEDCURVE      0x00800000UL\n#define CKF_EC_UNCOMPRESS      0x01000000UL\n#define CKF_EC_COMPRESS        0x02000000UL\n\n#define CKF_EXTENSION          0x80000000UL\n\ntypedef CK_MECHANISM_INFO CK_PTR CK_MECHANISM_INFO_PTR;\n\n/* CK_RV is a value that identifies the return value of a\n * Cryptoki function\n */\ntypedef CK_ULONG          CK_RV;\n\n#define CKR_OK                                0x00000000UL\n#define CKR_CANCEL                            0x00000001UL\n#define CKR_HOST_MEMORY                       0x00000002UL\n#define CKR_SLOT_ID_INVALID                   0x00000003UL\n\n#define CKR_GENERAL_ERROR                     0x00000005UL\n#define CKR_FUNCTION_FAILED                   0x00000006UL\n\n#define CKR_ARGUMENTS_BAD                     0x00000007UL\n#define CKR_NO_EVENT                          0x00000008UL\n#define CKR_NEED_TO_CREATE_THREADS            0x00000009UL\n#define CKR_CANT_LOCK                         0x0000000AUL\n\n#define CKR_ATTRIBUTE_READ_ONLY               0x00000010UL\n#define CKR_ATTRIBUTE_SENSITIVE               0x00000011UL\n#define CKR_ATTRIBUTE_TYPE_INVALID            0x00000012UL\n#define CKR_ATTRIBUTE_VALUE_INVALID           0x00000013UL\n\n#define CKR_ACTION_PROHIBITED                 0x0000001BUL\n\n#define CKR_DATA_INVALID                      0x00000020UL\n#define CKR_DATA_LEN_RANGE                    0x00000021UL\n#define CKR_DEVICE_ERROR                      0x00000030UL\n#define CKR_DEVICE_MEMORY                     0x00000031UL\n#define CKR_DEVICE_REMOVED                    0x00000032UL\n#define CKR_ENCRYPTED_DATA_INVALID            0x00000040UL\n#define CKR_ENCRYPTED_DATA_LEN_RANGE          0x00000041UL\n#define CKR_FUNCTION_CANCELED                 0x00000050UL\n#define CKR_FUNCTION_NOT_PARALLEL             0x00000051UL\n\n#define CKR_FUNCTION_NOT_SUPPORTED            0x00000054UL\n\n#define CKR_KEY_HANDLE_INVALID                0x00000060UL\n\n#define CKR_KEY_SIZE_RANGE                    0x00000062UL\n#define CKR_KEY_TYPE_INCONSISTENT             0x00000063UL\n\n#define CKR_KEY_NOT_NEEDED                    0x00000064UL\n#define CKR_KEY_CHANGED                       0x00000065UL\n#define CKR_KEY_NEEDED                        0x00000066UL\n#define CKR_KEY_INDIGESTIBLE                  0x00000067UL\n#define CKR_KEY_FUNCTION_NOT_PERMITTED        0x00000068UL\n#define CKR_KEY_NOT_WRAPPABLE                 0x00000069UL\n#define CKR_KEY_UNEXTRACTABLE                 0x0000006AUL\n\n#define CKR_MECHANISM_INVALID                 0x00000070UL\n#define CKR_MECHANISM_PARAM_INVALID           0x00000071UL\n\n#define CKR_OBJECT_HANDLE_INVALID             0x00000082UL\n#define CKR_OPERATION_ACTIVE                  0x00000090UL\n#define CKR_OPERATION_NOT_INITIALIZED         0x00000091UL\n#define CKR_PIN_INCORRECT                     0x000000A0UL\n#define CKR_PIN_INVALID                       0x000000A1UL\n#define CKR_PIN_LEN_RANGE                     0x000000A2UL\n\n#define CKR_PIN_EXPIRED                       0x000000A3UL\n#define CKR_PIN_LOCKED                        0x000000A4UL\n\n#define CKR_SESSION_CLOSED                    0x000000B0UL\n#define CKR_SESSION_COUNT                     0x000000B1UL\n#define CKR_SESSION_HANDLE_INVALID            0x000000B3UL\n#define CKR_SESSION_PARALLEL_NOT_SUPPORTED    0x000000B4UL\n#define CKR_SESSION_READ_ONLY                 0x000000B5UL\n#define CKR_SESSION_EXISTS                    0x000000B6UL\n\n#define CKR_SESSION_READ_ONLY_EXISTS          0x000000B7UL\n#define CKR_SESSION_READ_WRITE_SO_EXISTS      0x000000B8UL\n\n#define CKR_SIGNATURE_INVALID                 0x000000C0UL\n#define CKR_SIGNATURE_LEN_RANGE               0x000000C1UL\n#define CKR_TEMPLATE_INCOMPLETE               0x000000D0UL\n#define CKR_TEMPLATE_INCONSISTENT             0x000000D1UL\n#define CKR_TOKEN_NOT_PRESENT                 0x000000E0UL\n#define CKR_TOKEN_NOT_RECOGNIZED              0x000000E1UL\n#define CKR_TOKEN_WRITE_PROTECTED             0x000000E2UL\n#define CKR_UNWRAPPING_KEY_HANDLE_INVALID     0x000000F0UL\n#define CKR_UNWRAPPING_KEY_SIZE_RANGE         0x000000F1UL\n#define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT  0x000000F2UL\n#define CKR_USER_ALREADY_LOGGED_IN            0x00000100UL\n#define CKR_USER_NOT_LOGGED_IN                0x00000101UL\n#define CKR_USER_PIN_NOT_INITIALIZED          0x00000102UL\n#define CKR_USER_TYPE_INVALID                 0x00000103UL\n\n#define CKR_USER_ANOTHER_ALREADY_LOGGED_IN    0x00000104UL\n#define CKR_USER_TOO_MANY_TYPES               0x00000105UL\n\n#define CKR_WRAPPED_KEY_INVALID               0x00000110UL\n#define CKR_WRAPPED_KEY_LEN_RANGE             0x00000112UL\n#define CKR_WRAPPING_KEY_HANDLE_INVALID       0x00000113UL\n#define CKR_WRAPPING_KEY_SIZE_RANGE           0x00000114UL\n#define CKR_WRAPPING_KEY_TYPE_INCONSISTENT    0x00000115UL\n#define CKR_RANDOM_SEED_NOT_SUPPORTED         0x00000120UL\n\n#define CKR_RANDOM_NO_RNG                     0x00000121UL\n\n#define CKR_DOMAIN_PARAMS_INVALID             0x00000130UL\n\n#define CKR_CURVE_NOT_SUPPORTED               0x00000140UL\n\n#define CKR_BUFFER_TOO_SMALL                  0x00000150UL\n#define CKR_SAVED_STATE_INVALID               0x00000160UL\n#define CKR_INFORMATION_SENSITIVE             0x00000170UL\n#define CKR_STATE_UNSAVEABLE                  0x00000180UL\n\n#define CKR_CRYPTOKI_NOT_INITIALIZED          0x00000190UL\n#define CKR_CRYPTOKI_ALREADY_INITIALIZED      0x00000191UL\n#define CKR_MUTEX_BAD                         0x000001A0UL\n#define CKR_MUTEX_NOT_LOCKED                  0x000001A1UL\n\n#define CKR_NEW_PIN_MODE                      0x000001B0UL\n#define CKR_NEXT_OTP                          0x000001B1UL\n\n#define CKR_EXCEEDED_MAX_ITERATIONS           0x000001B5UL\n#define CKR_FIPS_SELF_TEST_FAILED             0x000001B6UL\n#define CKR_LIBRARY_LOAD_FAILED               0x000001B7UL\n#define CKR_PIN_TOO_WEAK                      0x000001B8UL\n#define CKR_PUBLIC_KEY_INVALID                0x000001B9UL\n\n#define CKR_FUNCTION_REJECTED                 0x00000200UL\n\n#define CKR_VENDOR_DEFINED                    0x80000000UL\n\n\n/* CK_NOTIFY is an application callback that processes events */\ntypedef CK_CALLBACK_FUNCTION(CK_RV, CK_NOTIFY)(\n  CK_SESSION_HANDLE hSession,     /* the session's handle */\n  CK_NOTIFICATION   event,\n  CK_VOID_PTR       pApplication  /* passed to C_OpenSession */\n);\n\n\n/* CK_FUNCTION_LIST is a structure holding a Cryptoki spec\n * version and pointers of appropriate types to all the\n * Cryptoki functions\n */\ntypedef struct CK_FUNCTION_LIST CK_FUNCTION_LIST;\n\ntypedef CK_FUNCTION_LIST CK_PTR CK_FUNCTION_LIST_PTR;\n\ntypedef CK_FUNCTION_LIST_PTR CK_PTR CK_FUNCTION_LIST_PTR_PTR;\n\n\n/* CK_CREATEMUTEX is an application callback for creating a\n * mutex object\n */\ntypedef CK_CALLBACK_FUNCTION(CK_RV, CK_CREATEMUTEX)(\n  CK_VOID_PTR_PTR ppMutex  /* location to receive ptr to mutex */\n);\n\n\n/* CK_DESTROYMUTEX is an application callback for destroying a\n * mutex object\n */\ntypedef CK_CALLBACK_FUNCTION(CK_RV, CK_DESTROYMUTEX)(\n  CK_VOID_PTR pMutex  /* pointer to mutex */\n);\n\n\n/* CK_LOCKMUTEX is an application callback for locking a mutex */\ntypedef CK_CALLBACK_FUNCTION(CK_RV, CK_LOCKMUTEX)(\n  CK_VOID_PTR pMutex  /* pointer to mutex */\n);\n\n\n/* CK_UNLOCKMUTEX is an application callback for unlocking a\n * mutex\n */\ntypedef CK_CALLBACK_FUNCTION(CK_RV, CK_UNLOCKMUTEX)(\n  CK_VOID_PTR pMutex  /* pointer to mutex */\n);\n\n\n/* CK_C_INITIALIZE_ARGS provides the optional arguments to\n * C_Initialize\n */\ntypedef struct CK_C_INITIALIZE_ARGS {\n  CK_CREATEMUTEX CreateMutex;\n  CK_DESTROYMUTEX DestroyMutex;\n  CK_LOCKMUTEX LockMutex;\n  CK_UNLOCKMUTEX UnlockMutex;\n  CK_FLAGS flags;\n  CK_VOID_PTR pReserved;\n} CK_C_INITIALIZE_ARGS;\n\n/* flags: bit flags that provide capabilities of the slot\n *      Bit Flag                           Mask       Meaning\n */\n#define CKF_LIBRARY_CANT_CREATE_OS_THREADS 0x00000001UL\n#define CKF_OS_LOCKING_OK                  0x00000002UL\n\ntypedef CK_C_INITIALIZE_ARGS CK_PTR CK_C_INITIALIZE_ARGS_PTR;\n\n\n/* additional flags for parameters to functions */\n\n/* CKF_DONT_BLOCK is for the function C_WaitForSlotEvent */\n#define CKF_DONT_BLOCK     1\n\n/* CK_RSA_PKCS_MGF_TYPE  is used to indicate the Message\n * Generation Function (MGF) applied to a message block when\n * formatting a message block for the PKCS #1 OAEP encryption\n * scheme.\n */\ntypedef CK_ULONG CK_RSA_PKCS_MGF_TYPE;\n\ntypedef CK_RSA_PKCS_MGF_TYPE CK_PTR CK_RSA_PKCS_MGF_TYPE_PTR;\n\n/* The following MGFs are defined */\n#define CKG_MGF1_SHA1         0x00000001UL\n#define CKG_MGF1_SHA256       0x00000002UL\n#define CKG_MGF1_SHA384       0x00000003UL\n#define CKG_MGF1_SHA512       0x00000004UL\n#define CKG_MGF1_SHA224       0x00000005UL\n\n/* CK_RSA_PKCS_OAEP_SOURCE_TYPE  is used to indicate the source\n * of the encoding parameter when formatting a message block\n * for the PKCS #1 OAEP encryption scheme.\n */\ntypedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE;\n\ntypedef CK_RSA_PKCS_OAEP_SOURCE_TYPE CK_PTR CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR;\n\n/* The following encoding parameter sources are defined */\n#define CKZ_DATA_SPECIFIED    0x00000001UL\n\n/* CK_RSA_PKCS_OAEP_PARAMS provides the parameters to the\n * CKM_RSA_PKCS_OAEP mechanism.\n */\ntypedef struct CK_RSA_PKCS_OAEP_PARAMS {\n        CK_MECHANISM_TYPE hashAlg;\n        CK_RSA_PKCS_MGF_TYPE mgf;\n        CK_RSA_PKCS_OAEP_SOURCE_TYPE source;\n        CK_VOID_PTR pSourceData;\n        CK_ULONG ulSourceDataLen;\n} CK_RSA_PKCS_OAEP_PARAMS;\n\ntypedef CK_RSA_PKCS_OAEP_PARAMS CK_PTR CK_RSA_PKCS_OAEP_PARAMS_PTR;\n\n/* CK_RSA_PKCS_PSS_PARAMS provides the parameters to the\n * CKM_RSA_PKCS_PSS mechanism(s).\n */\ntypedef struct CK_RSA_PKCS_PSS_PARAMS {\n        CK_MECHANISM_TYPE    hashAlg;\n        CK_RSA_PKCS_MGF_TYPE mgf;\n        CK_ULONG             sLen;\n} CK_RSA_PKCS_PSS_PARAMS;\n\ntypedef CK_RSA_PKCS_PSS_PARAMS CK_PTR CK_RSA_PKCS_PSS_PARAMS_PTR;\n\ntypedef CK_ULONG CK_EC_KDF_TYPE;\n\n/* The following EC Key Derivation Functions are defined */\n#define CKD_NULL                 0x00000001UL\n#define CKD_SHA1_KDF             0x00000002UL\n\n/* The following X9.42 DH key derivation functions are defined */\n#define CKD_SHA1_KDF_ASN1        0x00000003UL\n#define CKD_SHA1_KDF_CONCATENATE 0x00000004UL\n#define CKD_SHA224_KDF           0x00000005UL\n#define CKD_SHA256_KDF           0x00000006UL\n#define CKD_SHA384_KDF           0x00000007UL\n#define CKD_SHA512_KDF           0x00000008UL\n#define CKD_CPDIVERSIFY_KDF      0x00000009UL\n#define CKD_SHA3_224_KDF         0x0000000AUL\n#define CKD_SHA3_256_KDF         0x0000000BUL\n#define CKD_SHA3_384_KDF         0x0000000CUL\n#define CKD_SHA3_512_KDF         0x0000000DUL\n\n/* CK_ECDH1_DERIVE_PARAMS provides the parameters to the\n * CKM_ECDH1_DERIVE and CKM_ECDH1_COFACTOR_DERIVE mechanisms,\n * where each party contributes one key pair.\n */\ntypedef struct CK_ECDH1_DERIVE_PARAMS {\n  CK_EC_KDF_TYPE kdf;\n  CK_ULONG ulSharedDataLen;\n  CK_BYTE_PTR pSharedData;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n} CK_ECDH1_DERIVE_PARAMS;\n\ntypedef CK_ECDH1_DERIVE_PARAMS CK_PTR CK_ECDH1_DERIVE_PARAMS_PTR;\n\n/*\n * CK_ECDH2_DERIVE_PARAMS provides the parameters to the\n * CKM_ECMQV_DERIVE mechanism, where each party contributes two key pairs.\n */\ntypedef struct CK_ECDH2_DERIVE_PARAMS {\n  CK_EC_KDF_TYPE kdf;\n  CK_ULONG ulSharedDataLen;\n  CK_BYTE_PTR pSharedData;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n  CK_ULONG ulPrivateDataLen;\n  CK_OBJECT_HANDLE hPrivateData;\n  CK_ULONG ulPublicDataLen2;\n  CK_BYTE_PTR pPublicData2;\n} CK_ECDH2_DERIVE_PARAMS;\n\ntypedef CK_ECDH2_DERIVE_PARAMS CK_PTR CK_ECDH2_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_ECMQV_DERIVE_PARAMS {\n  CK_EC_KDF_TYPE kdf;\n  CK_ULONG ulSharedDataLen;\n  CK_BYTE_PTR pSharedData;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n  CK_ULONG ulPrivateDataLen;\n  CK_OBJECT_HANDLE hPrivateData;\n  CK_ULONG ulPublicDataLen2;\n  CK_BYTE_PTR pPublicData2;\n  CK_OBJECT_HANDLE publicKey;\n} CK_ECMQV_DERIVE_PARAMS;\n\ntypedef CK_ECMQV_DERIVE_PARAMS CK_PTR CK_ECMQV_DERIVE_PARAMS_PTR;\n\n/* Typedefs and defines for the CKM_X9_42_DH_KEY_PAIR_GEN and the\n * CKM_X9_42_DH_PARAMETER_GEN mechanisms\n */\ntypedef CK_ULONG CK_X9_42_DH_KDF_TYPE;\ntypedef CK_X9_42_DH_KDF_TYPE CK_PTR CK_X9_42_DH_KDF_TYPE_PTR;\n\n/* CK_X9_42_DH1_DERIVE_PARAMS provides the parameters to the\n * CKM_X9_42_DH_DERIVE key derivation mechanism, where each party\n * contributes one key pair\n */\ntypedef struct CK_X9_42_DH1_DERIVE_PARAMS {\n  CK_X9_42_DH_KDF_TYPE kdf;\n  CK_ULONG ulOtherInfoLen;\n  CK_BYTE_PTR pOtherInfo;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n} CK_X9_42_DH1_DERIVE_PARAMS;\n\ntypedef struct CK_X9_42_DH1_DERIVE_PARAMS CK_PTR CK_X9_42_DH1_DERIVE_PARAMS_PTR;\n\n/* CK_X9_42_DH2_DERIVE_PARAMS provides the parameters to the\n * CKM_X9_42_DH_HYBRID_DERIVE and CKM_X9_42_MQV_DERIVE key derivation\n * mechanisms, where each party contributes two key pairs\n */\ntypedef struct CK_X9_42_DH2_DERIVE_PARAMS {\n  CK_X9_42_DH_KDF_TYPE kdf;\n  CK_ULONG ulOtherInfoLen;\n  CK_BYTE_PTR pOtherInfo;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n  CK_ULONG ulPrivateDataLen;\n  CK_OBJECT_HANDLE hPrivateData;\n  CK_ULONG ulPublicDataLen2;\n  CK_BYTE_PTR pPublicData2;\n} CK_X9_42_DH2_DERIVE_PARAMS;\n\ntypedef CK_X9_42_DH2_DERIVE_PARAMS CK_PTR CK_X9_42_DH2_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_X9_42_MQV_DERIVE_PARAMS {\n  CK_X9_42_DH_KDF_TYPE kdf;\n  CK_ULONG ulOtherInfoLen;\n  CK_BYTE_PTR pOtherInfo;\n  CK_ULONG ulPublicDataLen;\n  CK_BYTE_PTR pPublicData;\n  CK_ULONG ulPrivateDataLen;\n  CK_OBJECT_HANDLE hPrivateData;\n  CK_ULONG ulPublicDataLen2;\n  CK_BYTE_PTR pPublicData2;\n  CK_OBJECT_HANDLE publicKey;\n} CK_X9_42_MQV_DERIVE_PARAMS;\n\ntypedef CK_X9_42_MQV_DERIVE_PARAMS CK_PTR CK_X9_42_MQV_DERIVE_PARAMS_PTR;\n\n/* CK_KEA_DERIVE_PARAMS provides the parameters to the\n * CKM_KEA_DERIVE mechanism\n */\ntypedef struct CK_KEA_DERIVE_PARAMS {\n  CK_BBOOL      isSender;\n  CK_ULONG      ulRandomLen;\n  CK_BYTE_PTR   pRandomA;\n  CK_BYTE_PTR   pRandomB;\n  CK_ULONG      ulPublicDataLen;\n  CK_BYTE_PTR   pPublicData;\n} CK_KEA_DERIVE_PARAMS;\n\ntypedef CK_KEA_DERIVE_PARAMS CK_PTR CK_KEA_DERIVE_PARAMS_PTR;\n\n\n/* CK_RC2_PARAMS provides the parameters to the CKM_RC2_ECB and\n * CKM_RC2_MAC mechanisms.  An instance of CK_RC2_PARAMS just\n * holds the effective keysize\n */\ntypedef CK_ULONG          CK_RC2_PARAMS;\n\ntypedef CK_RC2_PARAMS CK_PTR CK_RC2_PARAMS_PTR;\n\n\n/* CK_RC2_CBC_PARAMS provides the parameters to the CKM_RC2_CBC\n * mechanism\n */\ntypedef struct CK_RC2_CBC_PARAMS {\n  CK_ULONG      ulEffectiveBits;  /* effective bits (1-1024) */\n  CK_BYTE       iv[8];            /* IV for CBC mode */\n} CK_RC2_CBC_PARAMS;\n\ntypedef CK_RC2_CBC_PARAMS CK_PTR CK_RC2_CBC_PARAMS_PTR;\n\n\n/* CK_RC2_MAC_GENERAL_PARAMS provides the parameters for the\n * CKM_RC2_MAC_GENERAL mechanism\n */\ntypedef struct CK_RC2_MAC_GENERAL_PARAMS {\n  CK_ULONG      ulEffectiveBits;  /* effective bits (1-1024) */\n  CK_ULONG      ulMacLength;      /* Length of MAC in bytes */\n} CK_RC2_MAC_GENERAL_PARAMS;\n\ntypedef CK_RC2_MAC_GENERAL_PARAMS CK_PTR \\\n  CK_RC2_MAC_GENERAL_PARAMS_PTR;\n\n\n/* CK_RC5_PARAMS provides the parameters to the CKM_RC5_ECB and\n * CKM_RC5_MAC mechanisms\n */\ntypedef struct CK_RC5_PARAMS {\n  CK_ULONG      ulWordsize;  /* wordsize in bits */\n  CK_ULONG      ulRounds;    /* number of rounds */\n} CK_RC5_PARAMS;\n\ntypedef CK_RC5_PARAMS CK_PTR CK_RC5_PARAMS_PTR;\n\n\n/* CK_RC5_CBC_PARAMS provides the parameters to the CKM_RC5_CBC\n * mechanism\n */\ntypedef struct CK_RC5_CBC_PARAMS {\n  CK_ULONG      ulWordsize;  /* wordsize in bits */\n  CK_ULONG      ulRounds;    /* number of rounds */\n  CK_BYTE_PTR   pIv;         /* pointer to IV */\n  CK_ULONG      ulIvLen;     /* length of IV in bytes */\n} CK_RC5_CBC_PARAMS;\n\ntypedef CK_RC5_CBC_PARAMS CK_PTR CK_RC5_CBC_PARAMS_PTR;\n\n\n/* CK_RC5_MAC_GENERAL_PARAMS provides the parameters for the\n * CKM_RC5_MAC_GENERAL mechanism\n */\ntypedef struct CK_RC5_MAC_GENERAL_PARAMS {\n  CK_ULONG      ulWordsize;   /* wordsize in bits */\n  CK_ULONG      ulRounds;     /* number of rounds */\n  CK_ULONG      ulMacLength;  /* Length of MAC in bytes */\n} CK_RC5_MAC_GENERAL_PARAMS;\n\ntypedef CK_RC5_MAC_GENERAL_PARAMS CK_PTR \\\n  CK_RC5_MAC_GENERAL_PARAMS_PTR;\n\n/* CK_MAC_GENERAL_PARAMS provides the parameters to most block\n * ciphers' MAC_GENERAL mechanisms.  Its value is the length of\n * the MAC\n */\ntypedef CK_ULONG          CK_MAC_GENERAL_PARAMS;\n\ntypedef CK_MAC_GENERAL_PARAMS CK_PTR CK_MAC_GENERAL_PARAMS_PTR;\n\ntypedef struct CK_DES_CBC_ENCRYPT_DATA_PARAMS {\n  CK_BYTE      iv[8];\n  CK_BYTE_PTR  pData;\n  CK_ULONG     length;\n} CK_DES_CBC_ENCRYPT_DATA_PARAMS;\n\ntypedef CK_DES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR;\n\ntypedef struct CK_AES_CBC_ENCRYPT_DATA_PARAMS {\n  CK_BYTE      iv[16];\n  CK_BYTE_PTR  pData;\n  CK_ULONG     length;\n} CK_AES_CBC_ENCRYPT_DATA_PARAMS;\n\ntypedef CK_AES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR;\n\n/* CK_SKIPJACK_PRIVATE_WRAP_PARAMS provides the parameters to the\n * CKM_SKIPJACK_PRIVATE_WRAP mechanism\n */\ntypedef struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS {\n  CK_ULONG      ulPasswordLen;\n  CK_BYTE_PTR   pPassword;\n  CK_ULONG      ulPublicDataLen;\n  CK_BYTE_PTR   pPublicData;\n  CK_ULONG      ulPAndGLen;\n  CK_ULONG      ulQLen;\n  CK_ULONG      ulRandomLen;\n  CK_BYTE_PTR   pRandomA;\n  CK_BYTE_PTR   pPrimeP;\n  CK_BYTE_PTR   pBaseG;\n  CK_BYTE_PTR   pSubprimeQ;\n} CK_SKIPJACK_PRIVATE_WRAP_PARAMS;\n\ntypedef CK_SKIPJACK_PRIVATE_WRAP_PARAMS CK_PTR \\\n  CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR;\n\n\n/* CK_SKIPJACK_RELAYX_PARAMS provides the parameters to the\n * CKM_SKIPJACK_RELAYX mechanism\n */\ntypedef struct CK_SKIPJACK_RELAYX_PARAMS {\n  CK_ULONG      ulOldWrappedXLen;\n  CK_BYTE_PTR   pOldWrappedX;\n  CK_ULONG      ulOldPasswordLen;\n  CK_BYTE_PTR   pOldPassword;\n  CK_ULONG      ulOldPublicDataLen;\n  CK_BYTE_PTR   pOldPublicData;\n  CK_ULONG      ulOldRandomLen;\n  CK_BYTE_PTR   pOldRandomA;\n  CK_ULONG      ulNewPasswordLen;\n  CK_BYTE_PTR   pNewPassword;\n  CK_ULONG      ulNewPublicDataLen;\n  CK_BYTE_PTR   pNewPublicData;\n  CK_ULONG      ulNewRandomLen;\n  CK_BYTE_PTR   pNewRandomA;\n} CK_SKIPJACK_RELAYX_PARAMS;\n\ntypedef CK_SKIPJACK_RELAYX_PARAMS CK_PTR \\\n  CK_SKIPJACK_RELAYX_PARAMS_PTR;\n\n\ntypedef struct CK_PBE_PARAMS {\n  CK_BYTE_PTR      pInitVector;\n  CK_UTF8CHAR_PTR  pPassword;\n  CK_ULONG         ulPasswordLen;\n  CK_BYTE_PTR      pSalt;\n  CK_ULONG         ulSaltLen;\n  CK_ULONG         ulIteration;\n} CK_PBE_PARAMS;\n\ntypedef CK_PBE_PARAMS CK_PTR CK_PBE_PARAMS_PTR;\n\n\n/* CK_KEY_WRAP_SET_OAEP_PARAMS provides the parameters to the\n * CKM_KEY_WRAP_SET_OAEP mechanism\n */\ntypedef struct CK_KEY_WRAP_SET_OAEP_PARAMS {\n  CK_BYTE       bBC;     /* block contents byte */\n  CK_BYTE_PTR   pX;      /* extra data */\n  CK_ULONG      ulXLen;  /* length of extra data in bytes */\n} CK_KEY_WRAP_SET_OAEP_PARAMS;\n\ntypedef CK_KEY_WRAP_SET_OAEP_PARAMS CK_PTR CK_KEY_WRAP_SET_OAEP_PARAMS_PTR;\n\ntypedef struct CK_SSL3_RANDOM_DATA {\n  CK_BYTE_PTR  pClientRandom;\n  CK_ULONG     ulClientRandomLen;\n  CK_BYTE_PTR  pServerRandom;\n  CK_ULONG     ulServerRandomLen;\n} CK_SSL3_RANDOM_DATA;\n\n\ntypedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS {\n  CK_SSL3_RANDOM_DATA RandomInfo;\n  CK_VERSION_PTR pVersion;\n} CK_SSL3_MASTER_KEY_DERIVE_PARAMS;\n\ntypedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS CK_PTR \\\n  CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_SSL3_KEY_MAT_OUT {\n  CK_OBJECT_HANDLE hClientMacSecret;\n  CK_OBJECT_HANDLE hServerMacSecret;\n  CK_OBJECT_HANDLE hClientKey;\n  CK_OBJECT_HANDLE hServerKey;\n  CK_BYTE_PTR      pIVClient;\n  CK_BYTE_PTR      pIVServer;\n} CK_SSL3_KEY_MAT_OUT;\n\ntypedef CK_SSL3_KEY_MAT_OUT CK_PTR CK_SSL3_KEY_MAT_OUT_PTR;\n\n\ntypedef struct CK_SSL3_KEY_MAT_PARAMS {\n  CK_ULONG                ulMacSizeInBits;\n  CK_ULONG                ulKeySizeInBits;\n  CK_ULONG                ulIVSizeInBits;\n  CK_BBOOL                bIsExport;\n  CK_SSL3_RANDOM_DATA     RandomInfo;\n  CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial;\n} CK_SSL3_KEY_MAT_PARAMS;\n\ntypedef CK_SSL3_KEY_MAT_PARAMS CK_PTR CK_SSL3_KEY_MAT_PARAMS_PTR;\n\ntypedef struct CK_TLS_PRF_PARAMS {\n  CK_BYTE_PTR  pSeed;\n  CK_ULONG     ulSeedLen;\n  CK_BYTE_PTR  pLabel;\n  CK_ULONG     ulLabelLen;\n  CK_BYTE_PTR  pOutput;\n  CK_ULONG_PTR pulOutputLen;\n} CK_TLS_PRF_PARAMS;\n\ntypedef CK_TLS_PRF_PARAMS CK_PTR CK_TLS_PRF_PARAMS_PTR;\n\ntypedef struct CK_WTLS_RANDOM_DATA {\n  CK_BYTE_PTR pClientRandom;\n  CK_ULONG    ulClientRandomLen;\n  CK_BYTE_PTR pServerRandom;\n  CK_ULONG    ulServerRandomLen;\n} CK_WTLS_RANDOM_DATA;\n\ntypedef CK_WTLS_RANDOM_DATA CK_PTR CK_WTLS_RANDOM_DATA_PTR;\n\ntypedef struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS {\n  CK_MECHANISM_TYPE   DigestMechanism;\n  CK_WTLS_RANDOM_DATA RandomInfo;\n  CK_BYTE_PTR         pVersion;\n} CK_WTLS_MASTER_KEY_DERIVE_PARAMS;\n\ntypedef CK_WTLS_MASTER_KEY_DERIVE_PARAMS CK_PTR \\\n  CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_WTLS_PRF_PARAMS {\n  CK_MECHANISM_TYPE DigestMechanism;\n  CK_BYTE_PTR       pSeed;\n  CK_ULONG          ulSeedLen;\n  CK_BYTE_PTR       pLabel;\n  CK_ULONG          ulLabelLen;\n  CK_BYTE_PTR       pOutput;\n  CK_ULONG_PTR      pulOutputLen;\n} CK_WTLS_PRF_PARAMS;\n\ntypedef CK_WTLS_PRF_PARAMS CK_PTR CK_WTLS_PRF_PARAMS_PTR;\n\ntypedef struct CK_WTLS_KEY_MAT_OUT {\n  CK_OBJECT_HANDLE hMacSecret;\n  CK_OBJECT_HANDLE hKey;\n  CK_BYTE_PTR      pIV;\n} CK_WTLS_KEY_MAT_OUT;\n\ntypedef CK_WTLS_KEY_MAT_OUT CK_PTR CK_WTLS_KEY_MAT_OUT_PTR;\n\ntypedef struct CK_WTLS_KEY_MAT_PARAMS {\n  CK_MECHANISM_TYPE       DigestMechanism;\n  CK_ULONG                ulMacSizeInBits;\n  CK_ULONG                ulKeySizeInBits;\n  CK_ULONG                ulIVSizeInBits;\n  CK_ULONG                ulSequenceNumber;\n  CK_BBOOL                bIsExport;\n  CK_WTLS_RANDOM_DATA     RandomInfo;\n  CK_WTLS_KEY_MAT_OUT_PTR pReturnedKeyMaterial;\n} CK_WTLS_KEY_MAT_PARAMS;\n\ntypedef CK_WTLS_KEY_MAT_PARAMS CK_PTR CK_WTLS_KEY_MAT_PARAMS_PTR;\n\ntypedef struct CK_CMS_SIG_PARAMS {\n  CK_OBJECT_HANDLE      certificateHandle;\n  CK_MECHANISM_PTR      pSigningMechanism;\n  CK_MECHANISM_PTR      pDigestMechanism;\n  CK_UTF8CHAR_PTR       pContentType;\n  CK_BYTE_PTR           pRequestedAttributes;\n  CK_ULONG              ulRequestedAttributesLen;\n  CK_BYTE_PTR           pRequiredAttributes;\n  CK_ULONG              ulRequiredAttributesLen;\n} CK_CMS_SIG_PARAMS;\n\ntypedef CK_CMS_SIG_PARAMS CK_PTR CK_CMS_SIG_PARAMS_PTR;\n\ntypedef struct CK_KEY_DERIVATION_STRING_DATA {\n  CK_BYTE_PTR pData;\n  CK_ULONG    ulLen;\n} CK_KEY_DERIVATION_STRING_DATA;\n\ntypedef CK_KEY_DERIVATION_STRING_DATA CK_PTR \\\n  CK_KEY_DERIVATION_STRING_DATA_PTR;\n\n\n/* The CK_EXTRACT_PARAMS is used for the\n * CKM_EXTRACT_KEY_FROM_KEY mechanism.  It specifies which bit\n * of the base key should be used as the first bit of the\n * derived key\n */\ntypedef CK_ULONG CK_EXTRACT_PARAMS;\n\ntypedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR;\n\n/* CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE is used to\n * indicate the Pseudo-Random Function (PRF) used to generate\n * key bits using PKCS #5 PBKDF2.\n */\ntypedef CK_ULONG CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE;\n\ntypedef CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE CK_PTR \\\n                        CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR;\n\n#define CKP_PKCS5_PBKD2_HMAC_SHA1          0x00000001UL\n#define CKP_PKCS5_PBKD2_HMAC_GOSTR3411     0x00000002UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA224        0x00000003UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA256        0x00000004UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA384        0x00000005UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA512        0x00000006UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA512_224    0x00000007UL\n#define CKP_PKCS5_PBKD2_HMAC_SHA512_256    0x00000008UL\n\n/* CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE is used to indicate the\n * source of the salt value when deriving a key using PKCS #5\n * PBKDF2.\n */\ntypedef CK_ULONG CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE;\n\ntypedef CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE CK_PTR \\\n                        CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR;\n\n/* The following salt value sources are defined in PKCS #5 v2.0. */\n#define CKZ_SALT_SPECIFIED        0x00000001UL\n\n/* CK_PKCS5_PBKD2_PARAMS is a structure that provides the\n * parameters to the CKM_PKCS5_PBKD2 mechanism.\n */\ntypedef struct CK_PKCS5_PBKD2_PARAMS {\n        CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE           saltSource;\n        CK_VOID_PTR                                pSaltSourceData;\n        CK_ULONG                                   ulSaltSourceDataLen;\n        CK_ULONG                                   iterations;\n        CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE prf;\n        CK_VOID_PTR                                pPrfData;\n        CK_ULONG                                   ulPrfDataLen;\n        CK_UTF8CHAR_PTR                            pPassword;\n        CK_ULONG_PTR                               ulPasswordLen;\n} CK_PKCS5_PBKD2_PARAMS;\n\ntypedef CK_PKCS5_PBKD2_PARAMS CK_PTR CK_PKCS5_PBKD2_PARAMS_PTR;\n\n/* CK_PKCS5_PBKD2_PARAMS2 is a corrected version of the CK_PKCS5_PBKD2_PARAMS\n * structure that provides the parameters to the CKM_PKCS5_PBKD2 mechanism\n * noting that the ulPasswordLen field is a CK_ULONG and not a CK_ULONG_PTR.\n */\ntypedef struct CK_PKCS5_PBKD2_PARAMS2 {\n        CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE saltSource;\n        CK_VOID_PTR pSaltSourceData;\n        CK_ULONG ulSaltSourceDataLen;\n        CK_ULONG iterations;\n        CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE prf;\n        CK_VOID_PTR pPrfData;\n        CK_ULONG ulPrfDataLen;\n        CK_UTF8CHAR_PTR pPassword;\n        CK_ULONG ulPasswordLen;\n} CK_PKCS5_PBKD2_PARAMS2;\n\ntypedef CK_PKCS5_PBKD2_PARAMS2 CK_PTR CK_PKCS5_PBKD2_PARAMS2_PTR;\n\ntypedef CK_ULONG CK_OTP_PARAM_TYPE;\ntypedef CK_OTP_PARAM_TYPE CK_PARAM_TYPE; /* backward compatibility */\n\ntypedef struct CK_OTP_PARAM {\n    CK_OTP_PARAM_TYPE type;\n    CK_VOID_PTR pValue;\n    CK_ULONG ulValueLen;\n} CK_OTP_PARAM;\n\ntypedef CK_OTP_PARAM CK_PTR CK_OTP_PARAM_PTR;\n\ntypedef struct CK_OTP_PARAMS {\n    CK_OTP_PARAM_PTR pParams;\n    CK_ULONG ulCount;\n} CK_OTP_PARAMS;\n\ntypedef CK_OTP_PARAMS CK_PTR CK_OTP_PARAMS_PTR;\n\ntypedef struct CK_OTP_SIGNATURE_INFO {\n    CK_OTP_PARAM_PTR pParams;\n    CK_ULONG ulCount;\n} CK_OTP_SIGNATURE_INFO;\n\ntypedef CK_OTP_SIGNATURE_INFO CK_PTR CK_OTP_SIGNATURE_INFO_PTR;\n\n#define CK_OTP_VALUE          0UL\n#define CK_OTP_PIN            1UL\n#define CK_OTP_CHALLENGE      2UL\n#define CK_OTP_TIME           3UL\n#define CK_OTP_COUNTER        4UL\n#define CK_OTP_FLAGS          5UL\n#define CK_OTP_OUTPUT_LENGTH  6UL\n#define CK_OTP_OUTPUT_FORMAT  7UL\n\n#define CKF_NEXT_OTP          0x00000001UL\n#define CKF_EXCLUDE_TIME      0x00000002UL\n#define CKF_EXCLUDE_COUNTER   0x00000004UL\n#define CKF_EXCLUDE_CHALLENGE 0x00000008UL\n#define CKF_EXCLUDE_PIN       0x00000010UL\n#define CKF_USER_FRIENDLY_OTP 0x00000020UL\n\ntypedef struct CK_KIP_PARAMS {\n    CK_MECHANISM_PTR  pMechanism;\n    CK_OBJECT_HANDLE  hKey;\n    CK_BYTE_PTR       pSeed;\n    CK_ULONG          ulSeedLen;\n} CK_KIP_PARAMS;\n\ntypedef CK_KIP_PARAMS CK_PTR CK_KIP_PARAMS_PTR;\n\ntypedef struct CK_AES_CTR_PARAMS {\n    CK_ULONG ulCounterBits;\n    CK_BYTE cb[16];\n} CK_AES_CTR_PARAMS;\n\ntypedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR;\n\ntypedef struct CK_GCM_PARAMS {\n    CK_BYTE_PTR       pIv;\n    CK_ULONG          ulIvLen;\n    CK_ULONG          ulIvBits;\n    CK_BYTE_PTR       pAAD;\n    CK_ULONG          ulAADLen;\n    CK_ULONG          ulTagBits;\n} CK_GCM_PARAMS;\n\ntypedef CK_GCM_PARAMS CK_PTR CK_GCM_PARAMS_PTR;\n\ntypedef struct CK_CCM_PARAMS {\n    CK_ULONG          ulDataLen;\n    CK_BYTE_PTR       pNonce;\n    CK_ULONG          ulNonceLen;\n    CK_BYTE_PTR       pAAD;\n    CK_ULONG          ulAADLen;\n    CK_ULONG          ulMACLen;\n} CK_CCM_PARAMS;\n\ntypedef CK_CCM_PARAMS CK_PTR CK_CCM_PARAMS_PTR;\n\n/* Deprecated. Use CK_GCM_PARAMS */\ntypedef struct CK_AES_GCM_PARAMS {\n  CK_BYTE_PTR pIv;\n  CK_ULONG ulIvLen;\n  CK_ULONG ulIvBits;\n  CK_BYTE_PTR pAAD;\n  CK_ULONG ulAADLen;\n  CK_ULONG ulTagBits;\n} CK_AES_GCM_PARAMS;\n\ntypedef CK_AES_GCM_PARAMS CK_PTR CK_AES_GCM_PARAMS_PTR;\n\n/* Deprecated. Use CK_CCM_PARAMS */\ntypedef struct CK_AES_CCM_PARAMS {\n    CK_ULONG          ulDataLen;\n    CK_BYTE_PTR       pNonce;\n    CK_ULONG          ulNonceLen;\n    CK_BYTE_PTR       pAAD;\n    CK_ULONG          ulAADLen;\n    CK_ULONG          ulMACLen;\n} CK_AES_CCM_PARAMS;\n\ntypedef CK_AES_CCM_PARAMS CK_PTR CK_AES_CCM_PARAMS_PTR;\n\ntypedef struct CK_CAMELLIA_CTR_PARAMS {\n    CK_ULONG          ulCounterBits;\n    CK_BYTE           cb[16];\n} CK_CAMELLIA_CTR_PARAMS;\n\ntypedef CK_CAMELLIA_CTR_PARAMS CK_PTR CK_CAMELLIA_CTR_PARAMS_PTR;\n\ntypedef struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS {\n    CK_BYTE           iv[16];\n    CK_BYTE_PTR       pData;\n    CK_ULONG          length;\n} CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS;\n\ntypedef CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR \\\n                                CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR;\n\ntypedef struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS {\n    CK_BYTE           iv[16];\n    CK_BYTE_PTR       pData;\n    CK_ULONG          length;\n} CK_ARIA_CBC_ENCRYPT_DATA_PARAMS;\n\ntypedef CK_ARIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR \\\n                                CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR;\n\ntypedef struct CK_DSA_PARAMETER_GEN_PARAM {\n    CK_MECHANISM_TYPE  hash;\n    CK_BYTE_PTR        pSeed;\n    CK_ULONG           ulSeedLen;\n    CK_ULONG           ulIndex;\n} CK_DSA_PARAMETER_GEN_PARAM;\n\ntypedef CK_DSA_PARAMETER_GEN_PARAM CK_PTR CK_DSA_PARAMETER_GEN_PARAM_PTR;\n\ntypedef struct CK_ECDH_AES_KEY_WRAP_PARAMS {\n    CK_ULONG           ulAESKeyBits;\n    CK_EC_KDF_TYPE     kdf;\n    CK_ULONG           ulSharedDataLen;\n    CK_BYTE_PTR        pSharedData;\n} CK_ECDH_AES_KEY_WRAP_PARAMS;\n\ntypedef CK_ECDH_AES_KEY_WRAP_PARAMS CK_PTR CK_ECDH_AES_KEY_WRAP_PARAMS_PTR;\n\ntypedef CK_ULONG CK_JAVA_MIDP_SECURITY_DOMAIN;\n\ntypedef CK_ULONG CK_CERTIFICATE_CATEGORY;\n\ntypedef struct CK_RSA_AES_KEY_WRAP_PARAMS {\n    CK_ULONG                      ulAESKeyBits;\n    CK_RSA_PKCS_OAEP_PARAMS_PTR   pOAEPParams;\n} CK_RSA_AES_KEY_WRAP_PARAMS;\n\ntypedef CK_RSA_AES_KEY_WRAP_PARAMS CK_PTR CK_RSA_AES_KEY_WRAP_PARAMS_PTR;\n\ntypedef struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS {\n    CK_SSL3_RANDOM_DATA       RandomInfo;\n    CK_VERSION_PTR            pVersion;\n    CK_MECHANISM_TYPE         prfHashMechanism;\n} CK_TLS12_MASTER_KEY_DERIVE_PARAMS;\n\ntypedef CK_TLS12_MASTER_KEY_DERIVE_PARAMS CK_PTR \\\n                                CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_TLS12_KEY_MAT_PARAMS {\n    CK_ULONG                  ulMacSizeInBits;\n    CK_ULONG                  ulKeySizeInBits;\n    CK_ULONG                  ulIVSizeInBits;\n    CK_BBOOL                  bIsExport;\n    CK_SSL3_RANDOM_DATA       RandomInfo;\n    CK_SSL3_KEY_MAT_OUT_PTR   pReturnedKeyMaterial;\n    CK_MECHANISM_TYPE         prfHashMechanism;\n} CK_TLS12_KEY_MAT_PARAMS;\n\ntypedef CK_TLS12_KEY_MAT_PARAMS CK_PTR CK_TLS12_KEY_MAT_PARAMS_PTR;\n\ntypedef struct CK_TLS_KDF_PARAMS {\n    CK_MECHANISM_TYPE         prfMechanism;\n    CK_BYTE_PTR               pLabel;\n    CK_ULONG                  ulLabelLength;\n    CK_SSL3_RANDOM_DATA       RandomInfo;\n    CK_BYTE_PTR               pContextData;\n    CK_ULONG                  ulContextDataLength;\n} CK_TLS_KDF_PARAMS;\n\ntypedef CK_TLS_KDF_PARAMS CK_PTR CK_TLS_KDF_PARAMS_PTR;\n\ntypedef struct CK_TLS_MAC_PARAMS {\n    CK_MECHANISM_TYPE         prfHashMechanism;\n    CK_ULONG                  ulMacLength;\n    CK_ULONG                  ulServerOrClient;\n} CK_TLS_MAC_PARAMS;\n\ntypedef CK_TLS_MAC_PARAMS CK_PTR CK_TLS_MAC_PARAMS_PTR;\n\ntypedef struct CK_GOSTR3410_DERIVE_PARAMS {\n    CK_EC_KDF_TYPE            kdf;\n    CK_BYTE_PTR               pPublicData;\n    CK_ULONG                  ulPublicDataLen;\n    CK_BYTE_PTR               pUKM;\n    CK_ULONG                  ulUKMLen;\n} CK_GOSTR3410_DERIVE_PARAMS;\n\ntypedef CK_GOSTR3410_DERIVE_PARAMS CK_PTR CK_GOSTR3410_DERIVE_PARAMS_PTR;\n\ntypedef struct CK_GOSTR3410_KEY_WRAP_PARAMS {\n    CK_BYTE_PTR               pWrapOID;\n    CK_ULONG                  ulWrapOIDLen;\n    CK_BYTE_PTR               pUKM;\n    CK_ULONG                  ulUKMLen;\n    CK_OBJECT_HANDLE          hKey;\n} CK_GOSTR3410_KEY_WRAP_PARAMS;\n\ntypedef CK_GOSTR3410_KEY_WRAP_PARAMS CK_PTR CK_GOSTR3410_KEY_WRAP_PARAMS_PTR;\n\ntypedef struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS {\n    CK_BYTE                   iv[16];\n    CK_BYTE_PTR               pData;\n    CK_ULONG                  length;\n} CK_SEED_CBC_ENCRYPT_DATA_PARAMS;\n\ntypedef CK_SEED_CBC_ENCRYPT_DATA_PARAMS CK_PTR \\\n                                        CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR;\n\n#endif /* _PKCS11T_H_ */\n\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/release.go",
    "content": "//go:build release\n// +build release\n\npackage pkcs11\n\nimport \"fmt\"\n\n// Release is current version of the pkcs11 library.\nvar Release = R{1, 1, 1}\n\n// R holds the version of this library.\ntype R struct {\n\tMajor, Minor, Patch int\n}\n\nfunc (r R) String() string {\n\treturn fmt.Sprintf(\"%d.%d.%d\", r.Major, r.Minor, r.Patch)\n}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/softhsm.conf",
    "content": "0:hsm.db\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/softhsm2.conf",
    "content": "log.level = INFO\nobjectstore.backend = file\ndirectories.tokendir = test_data\nslots.removable = false\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/types.go",
    "content": "// Copyright 2013 Miek Gieben. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage pkcs11\n\n/*\n#include <stdlib.h>\n#include <string.h>\n#include \"pkcs11go.h\"\n\nCK_ULONG Index(CK_ULONG_PTR array, CK_ULONG i)\n{\n\treturn array[i];\n}\n\nstatic inline void putAttributePval(CK_ATTRIBUTE_PTR a, CK_VOID_PTR pValue)\n{\n\ta->pValue = pValue;\n}\n\nstatic inline void putMechanismParam(CK_MECHANISM_PTR m, CK_VOID_PTR pParameter)\n{\n\tm->pParameter = pParameter;\n}\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\t\"unsafe\"\n)\n\ntype arena []unsafe.Pointer\n\nfunc (a *arena) Allocate(obj []byte) (C.CK_VOID_PTR, C.CK_ULONG) {\n\tcobj := C.calloc(C.size_t(len(obj)), 1)\n\t*a = append(*a, cobj)\n\tC.memmove(cobj, unsafe.Pointer(&obj[0]), C.size_t(len(obj)))\n\treturn C.CK_VOID_PTR(cobj), C.CK_ULONG(len(obj))\n}\n\nfunc (a arena) Free() {\n\tfor _, p := range a {\n\t\tC.free(p)\n\t}\n}\n\n// toList converts from a C style array to a []uint.\nfunc toList(clist C.CK_ULONG_PTR, size C.CK_ULONG) []uint {\n\tl := make([]uint, int(size))\n\tfor i := 0; i < len(l); i++ {\n\t\tl[i] = uint(C.Index(clist, C.CK_ULONG(i)))\n\t}\n\tdefer C.free(unsafe.Pointer(clist))\n\treturn l\n}\n\n// cBBool converts a bool to a CK_BBOOL.\nfunc cBBool(x bool) C.CK_BBOOL {\n\tif x {\n\t\treturn C.CK_BBOOL(C.CK_TRUE)\n\t}\n\treturn C.CK_BBOOL(C.CK_FALSE)\n}\n\nfunc uintToBytes(x uint64) []byte {\n\tul := C.CK_ULONG(x)\n\treturn C.GoBytes(unsafe.Pointer(&ul), C.int(unsafe.Sizeof(ul)))\n}\n\n// Error represents an PKCS#11 error.\ntype Error uint\n\nfunc (e Error) Error() string {\n\treturn fmt.Sprintf(\"pkcs11: 0x%X: %s\", uint(e), strerror[uint(e)])\n}\n\nfunc toError(e C.CK_RV) error {\n\tif e == C.CKR_OK {\n\t\treturn nil\n\t}\n\treturn Error(e)\n}\n\n// SessionHandle is a Cryptoki-assigned value that identifies a session.\ntype SessionHandle uint\n\n// ObjectHandle is a token-specific identifier for an object.\ntype ObjectHandle uint\n\n// Version represents any version information from the library.\ntype Version struct {\n\tMajor byte\n\tMinor byte\n}\n\nfunc toVersion(version C.CK_VERSION) Version {\n\treturn Version{byte(version.major), byte(version.minor)}\n}\n\n// SlotEvent holds the SlotID which for which an slot event (token insertion,\n// removal, etc.) occurred.\ntype SlotEvent struct {\n\tSlotID uint\n}\n\n// Info provides information about the library and hardware used.\ntype Info struct {\n\tCryptokiVersion    Version\n\tManufacturerID     string\n\tFlags              uint\n\tLibraryDescription string\n\tLibraryVersion     Version\n}\n\n// SlotInfo provides information about a slot.\ntype SlotInfo struct {\n\tSlotDescription string // 64 bytes.\n\tManufacturerID  string // 32 bytes.\n\tFlags           uint\n\tHardwareVersion Version\n\tFirmwareVersion Version\n}\n\n// TokenInfo provides information about a token.\ntype TokenInfo struct {\n\tLabel              string\n\tManufacturerID     string\n\tModel              string\n\tSerialNumber       string\n\tFlags              uint\n\tMaxSessionCount    uint\n\tSessionCount       uint\n\tMaxRwSessionCount  uint\n\tRwSessionCount     uint\n\tMaxPinLen          uint\n\tMinPinLen          uint\n\tTotalPublicMemory  uint\n\tFreePublicMemory   uint\n\tTotalPrivateMemory uint\n\tFreePrivateMemory  uint\n\tHardwareVersion    Version\n\tFirmwareVersion    Version\n\tUTCTime            string\n}\n\n// SessionInfo provides information about a session.\ntype SessionInfo struct {\n\tSlotID      uint\n\tState       uint\n\tFlags       uint\n\tDeviceError uint\n}\n\n// Attribute holds an attribute type/value combination.\ntype Attribute struct {\n\tType  uint\n\tValue []byte\n}\n\n// NewAttribute allocates a Attribute and returns a pointer to it.\n// Note that this is merely a convenience function, as values returned\n// from the HSM are not converted back to Go values, those are just raw\n// byte slices.\nfunc NewAttribute(typ uint, x interface{}) *Attribute {\n\t// This function nicely transforms *to* an attribute, but there is\n\t// no corresponding function that transform back *from* an attribute,\n\t// which in PKCS#11 is just an byte array.\n\ta := new(Attribute)\n\ta.Type = typ\n\tif x == nil {\n\t\treturn a\n\t}\n\tswitch v := x.(type) {\n\tcase bool:\n\t\tif v {\n\t\t\ta.Value = []byte{1}\n\t\t} else {\n\t\t\ta.Value = []byte{0}\n\t\t}\n\tcase int:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase int16:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase int32:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase int64:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase uint:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase uint16:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase uint32:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase uint64:\n\t\ta.Value = uintToBytes(uint64(v))\n\tcase string:\n\t\ta.Value = []byte(v)\n\tcase []byte:\n\t\ta.Value = v\n\tcase time.Time: // for CKA_DATE\n\t\ta.Value = cDate(v)\n\tdefault:\n\t\tpanic(\"pkcs11: unhandled attribute type\")\n\t}\n\treturn a\n}\n\n// cAttribute returns the start address and the length of an attribute list.\nfunc cAttributeList(a []*Attribute) (arena, C.CK_ATTRIBUTE_PTR, C.CK_ULONG) {\n\tvar arena arena\n\tif len(a) == 0 {\n\t\treturn nil, nil, 0\n\t}\n\tpa := make([]C.CK_ATTRIBUTE, len(a))\n\tfor i, attr := range a {\n\t\tpa[i]._type = C.CK_ATTRIBUTE_TYPE(attr.Type)\n\t\tif len(attr.Value) != 0 {\n\t\t\tbuf, len := arena.Allocate(attr.Value)\n\t\t\t// field is unaligned on windows so this has to call into C\n\t\t\tC.putAttributePval(&pa[i], buf)\n\t\t\tpa[i].ulValueLen = len\n\t\t}\n\t}\n\treturn arena, &pa[0], C.CK_ULONG(len(a))\n}\n\nfunc cDate(t time.Time) []byte {\n\tb := make([]byte, 8)\n\tyear, month, day := t.Date()\n\ty := fmt.Sprintf(\"%4d\", year)\n\tm := fmt.Sprintf(\"%02d\", month)\n\td1 := fmt.Sprintf(\"%02d\", day)\n\tb[0], b[1], b[2], b[3] = y[0], y[1], y[2], y[3]\n\tb[4], b[5] = m[0], m[1]\n\tb[6], b[7] = d1[0], d1[1]\n\treturn b\n}\n\n// Mechanism holds an mechanism type/value combination.\ntype Mechanism struct {\n\tMechanism uint\n\tParameter []byte\n\tgenerator interface{}\n}\n\n// NewMechanism returns a pointer to an initialized Mechanism.\nfunc NewMechanism(mech uint, x interface{}) *Mechanism {\n\tm := new(Mechanism)\n\tm.Mechanism = mech\n\tif x == nil {\n\t\treturn m\n\t}\n\n\tswitch p := x.(type) {\n\tcase *GCMParams, *OAEPParams, *ECDH1DeriveParams:\n\t\t// contains pointers; defer serialization until cMechanism\n\t\tm.generator = p\n\tcase []byte:\n\t\tm.Parameter = p\n\tdefault:\n\t\tpanic(\"parameter must be one of type: []byte, *GCMParams, *OAEPParams, *ECDH1DeriveParams\")\n\t}\n\n\treturn m\n}\n\nfunc cMechanism(mechList []*Mechanism) (arena, *C.CK_MECHANISM) {\n\tif len(mechList) != 1 {\n\t\tpanic(\"expected exactly one mechanism\")\n\t}\n\tmech := mechList[0]\n\tcmech := &C.CK_MECHANISM{mechanism: C.CK_MECHANISM_TYPE(mech.Mechanism)}\n\t// params that contain pointers are allocated here\n\tparam := mech.Parameter\n\tvar arena arena\n\tswitch p := mech.generator.(type) {\n\tcase *GCMParams:\n\t\t// uses its own arena because it has to outlive this function call (yuck)\n\t\tparam = cGCMParams(p)\n\tcase *OAEPParams:\n\t\tparam, arena = cOAEPParams(p, arena)\n\tcase *ECDH1DeriveParams:\n\t\tparam, arena = cECDH1DeriveParams(p, arena)\n\t}\n\tif len(param) != 0 {\n\t\tbuf, len := arena.Allocate(param)\n\t\t// field is unaligned on windows so this has to call into C\n\t\tC.putMechanismParam(cmech, buf)\n\t\tcmech.ulParameterLen = len\n\t}\n\treturn arena, cmech\n}\n\n// MechanismInfo provides information about a particular mechanism.\ntype MechanismInfo struct {\n\tMinKeySize uint\n\tMaxKeySize uint\n\tFlags      uint\n}\n\n// stubData is a persistent nonempty byte array used by cMessage.\nvar stubData = []byte{0}\n\n// cMessage returns the pointer/length pair corresponding to data.\nfunc cMessage(data []byte) (dataPtr C.CK_BYTE_PTR) {\n\tl := len(data)\n\tif l == 0 {\n\t\t// &data[0] is forbidden in this case, so use a nontrivial array instead.\n\t\tdata = stubData\n\t}\n\treturn C.CK_BYTE_PTR(unsafe.Pointer(&data[0]))\n}\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/vendor.go",
    "content": "package pkcs11\n\n// Vendor specific range for Ncipher network HSM.\nconst (\n\tNFCK_VENDOR_NCIPHER = 0xde436972\n\tCKA_NCIPHER         = NFCK_VENDOR_NCIPHER\n\tCKM_NCIPHER         = NFCK_VENDOR_NCIPHER\n\tCKK_NCIPHER         = NFCK_VENDOR_NCIPHER\n)\n\n// Vendor specific mechanisms for HMAC on Ncipher HSMs where Ncipher does not allow use of generic_secret keys.\nconst (\n\tCKM_NC_SHA_1_HMAC_KEY_GEN  = CKM_NCIPHER + 0x3  /* no params */\n\tCKM_NC_MD5_HMAC_KEY_GEN    = CKM_NCIPHER + 0x6  /* no params */\n\tCKM_NC_SHA224_HMAC_KEY_GEN = CKM_NCIPHER + 0x24 /* no params */\n\tCKM_NC_SHA256_HMAC_KEY_GEN = CKM_NCIPHER + 0x25 /* no params */\n\tCKM_NC_SHA384_HMAC_KEY_GEN = CKM_NCIPHER + 0x26 /* no params */\n\tCKM_NC_SHA512_HMAC_KEY_GEN = CKM_NCIPHER + 0x27 /* no params */\n)\n\n// Vendor specific range for Mozilla NSS.\nconst (\n\tNSSCK_VENDOR_NSS   = 0x4E534350\n\tCKO_NSS            = CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKK_NSS            = CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKC_NSS            = CKC_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKA_NSS            = CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKA_TRUST          = CKA_NSS + 0x2000\n\tCKM_NSS            = CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKR_NSS            = CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n\tCKT_VENDOR_DEFINED = 0x80000000\n\tCKT_NSS            = CKT_VENDOR_DEFINED | NSSCK_VENDOR_NSS\n)\n\n// Vendor specific values for Mozilla NSS.\nconst (\n\tCKO_NSS_CRL                               = CKO_NSS + 1\n\tCKO_NSS_SMIME                             = CKO_NSS + 2\n\tCKO_NSS_TRUST                             = CKO_NSS + 3\n\tCKO_NSS_BUILTIN_ROOT_LIST                 = CKO_NSS + 4\n\tCKO_NSS_NEWSLOT                           = CKO_NSS + 5\n\tCKO_NSS_DELSLOT                           = CKO_NSS + 6\n\tCKK_NSS_PKCS8                             = CKK_NSS + 1\n\tCKK_NSS_JPAKE_ROUND1                      = CKK_NSS + 2\n\tCKK_NSS_JPAKE_ROUND2                      = CKK_NSS + 3\n\tCKK_NSS_CHACHA20                          = CKK_NSS + 4\n\tCKA_NSS_URL                               = CKA_NSS + 1\n\tCKA_NSS_EMAIL                             = CKA_NSS + 2\n\tCKA_NSS_SMIME_INFO                        = CKA_NSS + 3\n\tCKA_NSS_SMIME_TIMESTAMP                   = CKA_NSS + 4\n\tCKA_NSS_PKCS8_SALT                        = CKA_NSS + 5\n\tCKA_NSS_PASSWORD_CHECK                    = CKA_NSS + 6\n\tCKA_NSS_EXPIRES                           = CKA_NSS + 7\n\tCKA_NSS_KRL                               = CKA_NSS + 8\n\tCKA_NSS_PQG_COUNTER                       = CKA_NSS + 20\n\tCKA_NSS_PQG_SEED                          = CKA_NSS + 21\n\tCKA_NSS_PQG_H                             = CKA_NSS + 22\n\tCKA_NSS_PQG_SEED_BITS                     = CKA_NSS + 23\n\tCKA_NSS_MODULE_SPEC                       = CKA_NSS + 24\n\tCKA_NSS_OVERRIDE_EXTENSIONS               = CKA_NSS + 25\n\tCKA_NSS_JPAKE_SIGNERID                    = CKA_NSS + 26\n\tCKA_NSS_JPAKE_PEERID                      = CKA_NSS + 27\n\tCKA_NSS_JPAKE_GX1                         = CKA_NSS + 28\n\tCKA_NSS_JPAKE_GX2                         = CKA_NSS + 29\n\tCKA_NSS_JPAKE_GX3                         = CKA_NSS + 30\n\tCKA_NSS_JPAKE_GX4                         = CKA_NSS + 31\n\tCKA_NSS_JPAKE_X2                          = CKA_NSS + 32\n\tCKA_NSS_JPAKE_X2S                         = CKA_NSS + 33\n\tCKA_NSS_MOZILLA_CA_POLICY                 = CKA_NSS + 34\n\tCKA_TRUST_DIGITAL_SIGNATURE               = CKA_TRUST + 1\n\tCKA_TRUST_NON_REPUDIATION                 = CKA_TRUST + 2\n\tCKA_TRUST_KEY_ENCIPHERMENT                = CKA_TRUST + 3\n\tCKA_TRUST_DATA_ENCIPHERMENT               = CKA_TRUST + 4\n\tCKA_TRUST_KEY_AGREEMENT                   = CKA_TRUST + 5\n\tCKA_TRUST_KEY_CERT_SIGN                   = CKA_TRUST + 6\n\tCKA_TRUST_CRL_SIGN                        = CKA_TRUST + 7\n\tCKA_TRUST_SERVER_AUTH                     = CKA_TRUST + 8\n\tCKA_TRUST_CLIENT_AUTH                     = CKA_TRUST + 9\n\tCKA_TRUST_CODE_SIGNING                    = CKA_TRUST + 10\n\tCKA_TRUST_EMAIL_PROTECTION                = CKA_TRUST + 11\n\tCKA_TRUST_IPSEC_END_SYSTEM                = CKA_TRUST + 12\n\tCKA_TRUST_IPSEC_TUNNEL                    = CKA_TRUST + 13\n\tCKA_TRUST_IPSEC_USER                      = CKA_TRUST + 14\n\tCKA_TRUST_TIME_STAMPING                   = CKA_TRUST + 15\n\tCKA_TRUST_STEP_UP_APPROVED                = CKA_TRUST + 16\n\tCKA_CERT_SHA1_HASH                        = CKA_TRUST + 100\n\tCKA_CERT_MD5_HASH                         = CKA_TRUST + 101\n\tCKM_NSS_AES_KEY_WRAP                      = CKM_NSS + 1\n\tCKM_NSS_AES_KEY_WRAP_PAD                  = CKM_NSS + 2\n\tCKM_NSS_HKDF_SHA1                         = CKM_NSS + 3\n\tCKM_NSS_HKDF_SHA256                       = CKM_NSS + 4\n\tCKM_NSS_HKDF_SHA384                       = CKM_NSS + 5\n\tCKM_NSS_HKDF_SHA512                       = CKM_NSS + 6\n\tCKM_NSS_JPAKE_ROUND1_SHA1                 = CKM_NSS + 7\n\tCKM_NSS_JPAKE_ROUND1_SHA256               = CKM_NSS + 8\n\tCKM_NSS_JPAKE_ROUND1_SHA384               = CKM_NSS + 9\n\tCKM_NSS_JPAKE_ROUND1_SHA512               = CKM_NSS + 10\n\tCKM_NSS_JPAKE_ROUND2_SHA1                 = CKM_NSS + 11\n\tCKM_NSS_JPAKE_ROUND2_SHA256               = CKM_NSS + 12\n\tCKM_NSS_JPAKE_ROUND2_SHA384               = CKM_NSS + 13\n\tCKM_NSS_JPAKE_ROUND2_SHA512               = CKM_NSS + 14\n\tCKM_NSS_JPAKE_FINAL_SHA1                  = CKM_NSS + 15\n\tCKM_NSS_JPAKE_FINAL_SHA256                = CKM_NSS + 16\n\tCKM_NSS_JPAKE_FINAL_SHA384                = CKM_NSS + 17\n\tCKM_NSS_JPAKE_FINAL_SHA512                = CKM_NSS + 18\n\tCKM_NSS_HMAC_CONSTANT_TIME                = CKM_NSS + 19\n\tCKM_NSS_SSL3_MAC_CONSTANT_TIME            = CKM_NSS + 20\n\tCKM_NSS_TLS_PRF_GENERAL_SHA256            = CKM_NSS + 21\n\tCKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256      = CKM_NSS + 22\n\tCKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256     = CKM_NSS + 23\n\tCKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256   = CKM_NSS + 24\n\tCKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE    = CKM_NSS + 25\n\tCKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH = CKM_NSS + 26\n\tCKM_NSS_CHACHA20_KEY_GEN                  = CKM_NSS + 27\n\tCKM_NSS_CHACHA20_POLY1305                 = CKM_NSS + 28\n\tCKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN    = CKM_NSS + 29\n\tCKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN    = CKM_NSS + 30\n\tCKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN    = CKM_NSS + 31\n\tCKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN    = CKM_NSS + 32\n\tCKR_NSS_CERTDB_FAILED                     = CKR_NSS + 1\n\tCKR_NSS_KEYDB_FAILED                      = CKR_NSS + 2\n\tCKT_NSS_TRUSTED                           = CKT_NSS + 1\n\tCKT_NSS_TRUSTED_DELEGATOR                 = CKT_NSS + 2\n\tCKT_NSS_MUST_VERIFY_TRUST                 = CKT_NSS + 3\n\tCKT_NSS_NOT_TRUSTED                       = CKT_NSS + 10\n\tCKT_NSS_TRUST_UNKNOWN                     = CKT_NSS + 5\n)\n"
  },
  {
    "path": "vendor/github.com/miekg/pkcs11/zconst.go",
    "content": "// Copyright 2013 Miek Gieben. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by \"go run const_generate.go\"; DO NOT EDIT.\n\npackage pkcs11\n\nconst (\n\tCK_TRUE                              = 1\n\tCK_FALSE                             = 0\n\tCK_UNAVAILABLE_INFORMATION           = ^uint(0)\n\tCK_EFFECTIVELY_INFINITE              = 0\n\tCK_INVALID_HANDLE                    = 0\n\tCKN_SURRENDER                        = 0\n\tCKN_OTP_CHANGED                      = 1\n\tCKF_TOKEN_PRESENT                    = 0x00000001\n\tCKF_REMOVABLE_DEVICE                 = 0x00000002\n\tCKF_HW_SLOT                          = 0x00000004\n\tCKF_RNG                              = 0x00000001\n\tCKF_WRITE_PROTECTED                  = 0x00000002\n\tCKF_LOGIN_REQUIRED                   = 0x00000004\n\tCKF_USER_PIN_INITIALIZED             = 0x00000008\n\tCKF_RESTORE_KEY_NOT_NEEDED           = 0x00000020\n\tCKF_CLOCK_ON_TOKEN                   = 0x00000040\n\tCKF_PROTECTED_AUTHENTICATION_PATH    = 0x00000100\n\tCKF_DUAL_CRYPTO_OPERATIONS           = 0x00000200\n\tCKF_TOKEN_INITIALIZED                = 0x00000400\n\tCKF_SECONDARY_AUTHENTICATION         = 0x00000800\n\tCKF_USER_PIN_COUNT_LOW               = 0x00010000\n\tCKF_USER_PIN_FINAL_TRY               = 0x00020000\n\tCKF_USER_PIN_LOCKED                  = 0x00040000\n\tCKF_USER_PIN_TO_BE_CHANGED           = 0x00080000\n\tCKF_SO_PIN_COUNT_LOW                 = 0x00100000\n\tCKF_SO_PIN_FINAL_TRY                 = 0x00200000\n\tCKF_SO_PIN_LOCKED                    = 0x00400000\n\tCKF_SO_PIN_TO_BE_CHANGED             = 0x00800000\n\tCKF_ERROR_STATE                      = 0x01000000\n\tCKU_SO                               = 0\n\tCKU_USER                             = 1\n\tCKU_CONTEXT_SPECIFIC                 = 2\n\tCKS_RO_PUBLIC_SESSION                = 0\n\tCKS_RO_USER_FUNCTIONS                = 1\n\tCKS_RW_PUBLIC_SESSION                = 2\n\tCKS_RW_USER_FUNCTIONS                = 3\n\tCKS_RW_SO_FUNCTIONS                  = 4\n\tCKF_RW_SESSION                       = 0x00000002\n\tCKF_SERIAL_SESSION                   = 0x00000004\n\tCKO_DATA                             = 0x00000000\n\tCKO_CERTIFICATE                      = 0x00000001\n\tCKO_PUBLIC_KEY                       = 0x00000002\n\tCKO_PRIVATE_KEY                      = 0x00000003\n\tCKO_SECRET_KEY                       = 0x00000004\n\tCKO_HW_FEATURE                       = 0x00000005\n\tCKO_DOMAIN_PARAMETERS                = 0x00000006\n\tCKO_MECHANISM                        = 0x00000007\n\tCKO_OTP_KEY                          = 0x00000008\n\tCKO_VENDOR_DEFINED                   = 0x80000000\n\tCKH_MONOTONIC_COUNTER                = 0x00000001\n\tCKH_CLOCK                            = 0x00000002\n\tCKH_USER_INTERFACE                   = 0x00000003\n\tCKH_VENDOR_DEFINED                   = 0x80000000\n\tCKK_RSA                              = 0x00000000\n\tCKK_DSA                              = 0x00000001\n\tCKK_DH                               = 0x00000002\n\tCKK_ECDSA                            = 0x00000003 // Deprecated\n\tCKK_EC                               = 0x00000003\n\tCKK_X9_42_DH                         = 0x00000004\n\tCKK_KEA                              = 0x00000005\n\tCKK_GENERIC_SECRET                   = 0x00000010\n\tCKK_RC2                              = 0x00000011\n\tCKK_RC4                              = 0x00000012\n\tCKK_DES                              = 0x00000013\n\tCKK_DES2                             = 0x00000014\n\tCKK_DES3                             = 0x00000015\n\tCKK_CAST                             = 0x00000016\n\tCKK_CAST3                            = 0x00000017\n\tCKK_CAST5                            = 0x00000018 // Deprecated\n\tCKK_CAST128                          = 0x00000018\n\tCKK_RC5                              = 0x00000019\n\tCKK_IDEA                             = 0x0000001A\n\tCKK_SKIPJACK                         = 0x0000001B\n\tCKK_BATON                            = 0x0000001C\n\tCKK_JUNIPER                          = 0x0000001D\n\tCKK_CDMF                             = 0x0000001E\n\tCKK_AES                              = 0x0000001F\n\tCKK_BLOWFISH                         = 0x00000020\n\tCKK_TWOFISH                          = 0x00000021\n\tCKK_SECURID                          = 0x00000022\n\tCKK_HOTP                             = 0x00000023\n\tCKK_ACTI                             = 0x00000024\n\tCKK_CAMELLIA                         = 0x00000025\n\tCKK_ARIA                             = 0x00000026\n\tCKK_MD5_HMAC                         = 0x00000027\n\tCKK_SHA_1_HMAC                       = 0x00000028\n\tCKK_RIPEMD128_HMAC                   = 0x00000029\n\tCKK_RIPEMD160_HMAC                   = 0x0000002A\n\tCKK_SHA256_HMAC                      = 0x0000002B\n\tCKK_SHA384_HMAC                      = 0x0000002C\n\tCKK_SHA512_HMAC                      = 0x0000002D\n\tCKK_SHA224_HMAC                      = 0x0000002E\n\tCKK_SEED                             = 0x0000002F\n\tCKK_GOSTR3410                        = 0x00000030\n\tCKK_GOSTR3411                        = 0x00000031\n\tCKK_GOST28147                        = 0x00000032\n\tCKK_SHA3_224_HMAC                    = 0x00000033\n\tCKK_SHA3_256_HMAC                    = 0x00000034\n\tCKK_SHA3_384_HMAC                    = 0x00000035\n\tCKK_SHA3_512_HMAC                    = 0x00000036\n\tCKK_VENDOR_DEFINED                   = 0x80000000\n\tCK_CERTIFICATE_CATEGORY_UNSPECIFIED  = 0\n\tCK_CERTIFICATE_CATEGORY_TOKEN_USER   = 1\n\tCK_CERTIFICATE_CATEGORY_AUTHORITY    = 2\n\tCK_CERTIFICATE_CATEGORY_OTHER_ENTITY = 3\n\tCK_SECURITY_DOMAIN_UNSPECIFIED       = 0\n\tCK_SECURITY_DOMAIN_MANUFACTURER      = 1\n\tCK_SECURITY_DOMAIN_OPERATOR          = 2\n\tCK_SECURITY_DOMAIN_THIRD_PARTY       = 3\n\tCKC_X_509                            = 0x00000000\n\tCKC_X_509_ATTR_CERT                  = 0x00000001\n\tCKC_WTLS                             = 0x00000002\n\tCKC_VENDOR_DEFINED                   = 0x80000000\n\tCKF_ARRAY_ATTRIBUTE                  = 0x40000000\n\tCK_OTP_FORMAT_DECIMAL                = 0\n\tCK_OTP_FORMAT_HEXADECIMAL            = 1\n\tCK_OTP_FORMAT_ALPHANUMERIC           = 2\n\tCK_OTP_FORMAT_BINARY                 = 3\n\tCK_OTP_PARAM_IGNORED                 = 0\n\tCK_OTP_PARAM_OPTIONAL                = 1\n\tCK_OTP_PARAM_MANDATORY               = 2\n\tCKA_CLASS                            = 0x00000000\n\tCKA_TOKEN                            = 0x00000001\n\tCKA_PRIVATE                          = 0x00000002\n\tCKA_LABEL                            = 0x00000003\n\tCKA_APPLICATION                      = 0x00000010\n\tCKA_VALUE                            = 0x00000011\n\tCKA_OBJECT_ID                        = 0x00000012\n\tCKA_CERTIFICATE_TYPE                 = 0x00000080\n\tCKA_ISSUER                           = 0x00000081\n\tCKA_SERIAL_NUMBER                    = 0x00000082\n\tCKA_AC_ISSUER                        = 0x00000083\n\tCKA_OWNER                            = 0x00000084\n\tCKA_ATTR_TYPES                       = 0x00000085\n\tCKA_TRUSTED                          = 0x00000086\n\tCKA_CERTIFICATE_CATEGORY             = 0x00000087\n\tCKA_JAVA_MIDP_SECURITY_DOMAIN        = 0x00000088\n\tCKA_URL                              = 0x00000089\n\tCKA_HASH_OF_SUBJECT_PUBLIC_KEY       = 0x0000008A\n\tCKA_HASH_OF_ISSUER_PUBLIC_KEY        = 0x0000008B\n\tCKA_NAME_HASH_ALGORITHM              = 0x0000008C\n\tCKA_CHECK_VALUE                      = 0x00000090\n\tCKA_KEY_TYPE                         = 0x00000100\n\tCKA_SUBJECT                          = 0x00000101\n\tCKA_ID                               = 0x00000102\n\tCKA_SENSITIVE                        = 0x00000103\n\tCKA_ENCRYPT                          = 0x00000104\n\tCKA_DECRYPT                          = 0x00000105\n\tCKA_WRAP                             = 0x00000106\n\tCKA_UNWRAP                           = 0x00000107\n\tCKA_SIGN                             = 0x00000108\n\tCKA_SIGN_RECOVER                     = 0x00000109\n\tCKA_VERIFY                           = 0x0000010A\n\tCKA_VERIFY_RECOVER                   = 0x0000010B\n\tCKA_DERIVE                           = 0x0000010C\n\tCKA_START_DATE                       = 0x00000110\n\tCKA_END_DATE                         = 0x00000111\n\tCKA_MODULUS                          = 0x00000120\n\tCKA_MODULUS_BITS                     = 0x00000121\n\tCKA_PUBLIC_EXPONENT                  = 0x00000122\n\tCKA_PRIVATE_EXPONENT                 = 0x00000123\n\tCKA_PRIME_1                          = 0x00000124\n\tCKA_PRIME_2                          = 0x00000125\n\tCKA_EXPONENT_1                       = 0x00000126\n\tCKA_EXPONENT_2                       = 0x00000127\n\tCKA_COEFFICIENT                      = 0x00000128\n\tCKA_PUBLIC_KEY_INFO                  = 0x00000129\n\tCKA_PRIME                            = 0x00000130\n\tCKA_SUBPRIME                         = 0x00000131\n\tCKA_BASE                             = 0x00000132\n\tCKA_PRIME_BITS                       = 0x00000133\n\tCKA_SUBPRIME_BITS                    = 0x00000134\n\tCKA_SUB_PRIME_BITS                   = CKA_SUBPRIME_BITS\n\tCKA_VALUE_BITS                       = 0x00000160\n\tCKA_VALUE_LEN                        = 0x00000161\n\tCKA_EXTRACTABLE                      = 0x00000162\n\tCKA_LOCAL                            = 0x00000163\n\tCKA_NEVER_EXTRACTABLE                = 0x00000164\n\tCKA_ALWAYS_SENSITIVE                 = 0x00000165\n\tCKA_KEY_GEN_MECHANISM                = 0x00000166\n\tCKA_MODIFIABLE                       = 0x00000170\n\tCKA_COPYABLE                         = 0x00000171\n\tCKA_DESTROYABLE                      = 0x00000172\n\tCKA_ECDSA_PARAMS                     = 0x00000180 // Deprecated\n\tCKA_EC_PARAMS                        = 0x00000180\n\tCKA_EC_POINT                         = 0x00000181\n\tCKA_SECONDARY_AUTH                   = 0x00000200 // Deprecated\n\tCKA_AUTH_PIN_FLAGS                   = 0x00000201 // Deprecated\n\tCKA_ALWAYS_AUTHENTICATE              = 0x00000202\n\tCKA_WRAP_WITH_TRUSTED                = 0x00000210\n\tCKA_WRAP_TEMPLATE                    = (CKF_ARRAY_ATTRIBUTE | 0x00000211)\n\tCKA_UNWRAP_TEMPLATE                  = (CKF_ARRAY_ATTRIBUTE | 0x00000212)\n\tCKA_DERIVE_TEMPLATE                  = (CKF_ARRAY_ATTRIBUTE | 0x00000213)\n\tCKA_OTP_FORMAT                       = 0x00000220\n\tCKA_OTP_LENGTH                       = 0x00000221\n\tCKA_OTP_TIME_INTERVAL                = 0x00000222\n\tCKA_OTP_USER_FRIENDLY_MODE           = 0x00000223\n\tCKA_OTP_CHALLENGE_REQUIREMENT        = 0x00000224\n\tCKA_OTP_TIME_REQUIREMENT             = 0x00000225\n\tCKA_OTP_COUNTER_REQUIREMENT          = 0x00000226\n\tCKA_OTP_PIN_REQUIREMENT              = 0x00000227\n\tCKA_OTP_COUNTER                      = 0x0000022E\n\tCKA_OTP_TIME                         = 0x0000022F\n\tCKA_OTP_USER_IDENTIFIER              = 0x0000022A\n\tCKA_OTP_SERVICE_IDENTIFIER           = 0x0000022B\n\tCKA_OTP_SERVICE_LOGO                 = 0x0000022C\n\tCKA_OTP_SERVICE_LOGO_TYPE            = 0x0000022D\n\tCKA_GOSTR3410_PARAMS                 = 0x00000250\n\tCKA_GOSTR3411_PARAMS                 = 0x00000251\n\tCKA_GOST28147_PARAMS                 = 0x00000252\n\tCKA_HW_FEATURE_TYPE                  = 0x00000300\n\tCKA_RESET_ON_INIT                    = 0x00000301\n\tCKA_HAS_RESET                        = 0x00000302\n\tCKA_PIXEL_X                          = 0x00000400\n\tCKA_PIXEL_Y                          = 0x00000401\n\tCKA_RESOLUTION                       = 0x00000402\n\tCKA_CHAR_ROWS                        = 0x00000403\n\tCKA_CHAR_COLUMNS                     = 0x00000404\n\tCKA_COLOR                            = 0x00000405\n\tCKA_BITS_PER_PIXEL                   = 0x00000406\n\tCKA_CHAR_SETS                        = 0x00000480\n\tCKA_ENCODING_METHODS                 = 0x00000481\n\tCKA_MIME_TYPES                       = 0x00000482\n\tCKA_MECHANISM_TYPE                   = 0x00000500\n\tCKA_REQUIRED_CMS_ATTRIBUTES          = 0x00000501\n\tCKA_DEFAULT_CMS_ATTRIBUTES           = 0x00000502\n\tCKA_SUPPORTED_CMS_ATTRIBUTES         = 0x00000503\n\tCKA_ALLOWED_MECHANISMS               = (CKF_ARRAY_ATTRIBUTE | 0x00000600)\n\tCKA_VENDOR_DEFINED                   = 0x80000000\n\tCKM_RSA_PKCS_KEY_PAIR_GEN            = 0x00000000\n\tCKM_RSA_PKCS                         = 0x00000001\n\tCKM_RSA_9796                         = 0x00000002\n\tCKM_RSA_X_509                        = 0x00000003\n\tCKM_MD2_RSA_PKCS                     = 0x00000004\n\tCKM_MD5_RSA_PKCS                     = 0x00000005\n\tCKM_SHA1_RSA_PKCS                    = 0x00000006\n\tCKM_RIPEMD128_RSA_PKCS               = 0x00000007\n\tCKM_RIPEMD160_RSA_PKCS               = 0x00000008\n\tCKM_RSA_PKCS_OAEP                    = 0x00000009\n\tCKM_RSA_X9_31_KEY_PAIR_GEN           = 0x0000000A\n\tCKM_RSA_X9_31                        = 0x0000000B\n\tCKM_SHA1_RSA_X9_31                   = 0x0000000C\n\tCKM_RSA_PKCS_PSS                     = 0x0000000D\n\tCKM_SHA1_RSA_PKCS_PSS                = 0x0000000E\n\tCKM_DSA_KEY_PAIR_GEN                 = 0x00000010\n\tCKM_DSA                              = 0x00000011\n\tCKM_DSA_SHA1                         = 0x00000012\n\tCKM_DSA_SHA224                       = 0x00000013\n\tCKM_DSA_SHA256                       = 0x00000014\n\tCKM_DSA_SHA384                       = 0x00000015\n\tCKM_DSA_SHA512                       = 0x00000016\n\tCKM_DSA_SHA3_224                     = 0x00000018\n\tCKM_DSA_SHA3_256                     = 0x00000019\n\tCKM_DSA_SHA3_384                     = 0x0000001A\n\tCKM_DSA_SHA3_512                     = 0x0000001B\n\tCKM_DH_PKCS_KEY_PAIR_GEN             = 0x00000020\n\tCKM_DH_PKCS_DERIVE                   = 0x00000021\n\tCKM_X9_42_DH_KEY_PAIR_GEN            = 0x00000030\n\tCKM_X9_42_DH_DERIVE                  = 0x00000031\n\tCKM_X9_42_DH_HYBRID_DERIVE           = 0x00000032\n\tCKM_X9_42_MQV_DERIVE                 = 0x00000033\n\tCKM_SHA256_RSA_PKCS                  = 0x00000040\n\tCKM_SHA384_RSA_PKCS                  = 0x00000041\n\tCKM_SHA512_RSA_PKCS                  = 0x00000042\n\tCKM_SHA256_RSA_PKCS_PSS              = 0x00000043\n\tCKM_SHA384_RSA_PKCS_PSS              = 0x00000044\n\tCKM_SHA512_RSA_PKCS_PSS              = 0x00000045\n\tCKM_SHA224_RSA_PKCS                  = 0x00000046\n\tCKM_SHA224_RSA_PKCS_PSS              = 0x00000047\n\tCKM_SHA512_224                       = 0x00000048\n\tCKM_SHA512_224_HMAC                  = 0x00000049\n\tCKM_SHA512_224_HMAC_GENERAL          = 0x0000004A\n\tCKM_SHA512_224_KEY_DERIVATION        = 0x0000004B\n\tCKM_SHA512_256                       = 0x0000004C\n\tCKM_SHA512_256_HMAC                  = 0x0000004D\n\tCKM_SHA512_256_HMAC_GENERAL          = 0x0000004E\n\tCKM_SHA512_256_KEY_DERIVATION        = 0x0000004F\n\tCKM_SHA512_T                         = 0x00000050\n\tCKM_SHA512_T_HMAC                    = 0x00000051\n\tCKM_SHA512_T_HMAC_GENERAL            = 0x00000052\n\tCKM_SHA512_T_KEY_DERIVATION          = 0x00000053\n\tCKM_SHA3_256_RSA_PKCS                = 0x00000060\n\tCKM_SHA3_384_RSA_PKCS                = 0x00000061\n\tCKM_SHA3_512_RSA_PKCS                = 0x00000062\n\tCKM_SHA3_256_RSA_PKCS_PSS            = 0x00000063\n\tCKM_SHA3_384_RSA_PKCS_PSS            = 0x00000064\n\tCKM_SHA3_512_RSA_PKCS_PSS            = 0x00000065\n\tCKM_SHA3_224_RSA_PKCS                = 0x00000066\n\tCKM_SHA3_224_RSA_PKCS_PSS            = 0x00000067\n\tCKM_RC2_KEY_GEN                      = 0x00000100\n\tCKM_RC2_ECB                          = 0x00000101\n\tCKM_RC2_CBC                          = 0x00000102\n\tCKM_RC2_MAC                          = 0x00000103\n\tCKM_RC2_MAC_GENERAL                  = 0x00000104\n\tCKM_RC2_CBC_PAD                      = 0x00000105\n\tCKM_RC4_KEY_GEN                      = 0x00000110\n\tCKM_RC4                              = 0x00000111\n\tCKM_DES_KEY_GEN                      = 0x00000120\n\tCKM_DES_ECB                          = 0x00000121\n\tCKM_DES_CBC                          = 0x00000122\n\tCKM_DES_MAC                          = 0x00000123\n\tCKM_DES_MAC_GENERAL                  = 0x00000124\n\tCKM_DES_CBC_PAD                      = 0x00000125\n\tCKM_DES2_KEY_GEN                     = 0x00000130\n\tCKM_DES3_KEY_GEN                     = 0x00000131\n\tCKM_DES3_ECB                         = 0x00000132\n\tCKM_DES3_CBC                         = 0x00000133\n\tCKM_DES3_MAC                         = 0x00000134\n\tCKM_DES3_MAC_GENERAL                 = 0x00000135\n\tCKM_DES3_CBC_PAD                     = 0x00000136\n\tCKM_DES3_CMAC_GENERAL                = 0x00000137\n\tCKM_DES3_CMAC                        = 0x00000138\n\tCKM_CDMF_KEY_GEN                     = 0x00000140\n\tCKM_CDMF_ECB                         = 0x00000141\n\tCKM_CDMF_CBC                         = 0x00000142\n\tCKM_CDMF_MAC                         = 0x00000143\n\tCKM_CDMF_MAC_GENERAL                 = 0x00000144\n\tCKM_CDMF_CBC_PAD                     = 0x00000145\n\tCKM_DES_OFB64                        = 0x00000150\n\tCKM_DES_OFB8                         = 0x00000151\n\tCKM_DES_CFB64                        = 0x00000152\n\tCKM_DES_CFB8                         = 0x00000153\n\tCKM_MD2                              = 0x00000200\n\tCKM_MD2_HMAC                         = 0x00000201\n\tCKM_MD2_HMAC_GENERAL                 = 0x00000202\n\tCKM_MD5                              = 0x00000210\n\tCKM_MD5_HMAC                         = 0x00000211\n\tCKM_MD5_HMAC_GENERAL                 = 0x00000212\n\tCKM_SHA_1                            = 0x00000220\n\tCKM_SHA_1_HMAC                       = 0x00000221\n\tCKM_SHA_1_HMAC_GENERAL               = 0x00000222\n\tCKM_RIPEMD128                        = 0x00000230\n\tCKM_RIPEMD128_HMAC                   = 0x00000231\n\tCKM_RIPEMD128_HMAC_GENERAL           = 0x00000232\n\tCKM_RIPEMD160                        = 0x00000240\n\tCKM_RIPEMD160_HMAC                   = 0x00000241\n\tCKM_RIPEMD160_HMAC_GENERAL           = 0x00000242\n\tCKM_SHA256                           = 0x00000250\n\tCKM_SHA256_HMAC                      = 0x00000251\n\tCKM_SHA256_HMAC_GENERAL              = 0x00000252\n\tCKM_SHA224                           = 0x00000255\n\tCKM_SHA224_HMAC                      = 0x00000256\n\tCKM_SHA224_HMAC_GENERAL              = 0x00000257\n\tCKM_SHA384                           = 0x00000260\n\tCKM_SHA384_HMAC                      = 0x00000261\n\tCKM_SHA384_HMAC_GENERAL              = 0x00000262\n\tCKM_SHA512                           = 0x00000270\n\tCKM_SHA512_HMAC                      = 0x00000271\n\tCKM_SHA512_HMAC_GENERAL              = 0x00000272\n\tCKM_SECURID_KEY_GEN                  = 0x00000280\n\tCKM_SECURID                          = 0x00000282\n\tCKM_HOTP_KEY_GEN                     = 0x00000290\n\tCKM_HOTP                             = 0x00000291\n\tCKM_ACTI                             = 0x000002A0\n\tCKM_ACTI_KEY_GEN                     = 0x000002A1\n\tCKM_SHA3_256                         = 0x000002B0\n\tCKM_SHA3_256_HMAC                    = 0x000002B1\n\tCKM_SHA3_256_HMAC_GENERAL            = 0x000002B2\n\tCKM_SHA3_256_KEY_GEN                 = 0x000002B3\n\tCKM_SHA3_224                         = 0x000002B5\n\tCKM_SHA3_224_HMAC                    = 0x000002B6\n\tCKM_SHA3_224_HMAC_GENERAL            = 0x000002B7\n\tCKM_SHA3_224_KEY_GEN                 = 0x000002B8\n\tCKM_SHA3_384                         = 0x000002C0\n\tCKM_SHA3_384_HMAC                    = 0x000002C1\n\tCKM_SHA3_384_HMAC_GENERAL            = 0x000002C2\n\tCKM_SHA3_384_KEY_GEN                 = 0x000002C3\n\tCKM_SHA3_512                         = 0x000002D0\n\tCKM_SHA3_512_HMAC                    = 0x000002D1\n\tCKM_SHA3_512_HMAC_GENERAL            = 0x000002D2\n\tCKM_SHA3_512_KEY_GEN                 = 0x000002D3\n\tCKM_CAST_KEY_GEN                     = 0x00000300\n\tCKM_CAST_ECB                         = 0x00000301\n\tCKM_CAST_CBC                         = 0x00000302\n\tCKM_CAST_MAC                         = 0x00000303\n\tCKM_CAST_MAC_GENERAL                 = 0x00000304\n\tCKM_CAST_CBC_PAD                     = 0x00000305\n\tCKM_CAST3_KEY_GEN                    = 0x00000310\n\tCKM_CAST3_ECB                        = 0x00000311\n\tCKM_CAST3_CBC                        = 0x00000312\n\tCKM_CAST3_MAC                        = 0x00000313\n\tCKM_CAST3_MAC_GENERAL                = 0x00000314\n\tCKM_CAST3_CBC_PAD                    = 0x00000315\n\tCKM_CAST5_KEY_GEN                    = 0x00000320\n\tCKM_CAST128_KEY_GEN                  = 0x00000320\n\tCKM_CAST5_ECB                        = 0x00000321\n\tCKM_CAST128_ECB                      = 0x00000321\n\tCKM_CAST5_CBC                        = 0x00000322 // Deprecated\n\tCKM_CAST128_CBC                      = 0x00000322\n\tCKM_CAST5_MAC                        = 0x00000323 // Deprecated\n\tCKM_CAST128_MAC                      = 0x00000323\n\tCKM_CAST5_MAC_GENERAL                = 0x00000324 // Deprecated\n\tCKM_CAST128_MAC_GENERAL              = 0x00000324\n\tCKM_CAST5_CBC_PAD                    = 0x00000325 // Deprecated\n\tCKM_CAST128_CBC_PAD                  = 0x00000325\n\tCKM_RC5_KEY_GEN                      = 0x00000330\n\tCKM_RC5_ECB                          = 0x00000331\n\tCKM_RC5_CBC                          = 0x00000332\n\tCKM_RC5_MAC                          = 0x00000333\n\tCKM_RC5_MAC_GENERAL                  = 0x00000334\n\tCKM_RC5_CBC_PAD                      = 0x00000335\n\tCKM_IDEA_KEY_GEN                     = 0x00000340\n\tCKM_IDEA_ECB                         = 0x00000341\n\tCKM_IDEA_CBC                         = 0x00000342\n\tCKM_IDEA_MAC                         = 0x00000343\n\tCKM_IDEA_MAC_GENERAL                 = 0x00000344\n\tCKM_IDEA_CBC_PAD                     = 0x00000345\n\tCKM_GENERIC_SECRET_KEY_GEN           = 0x00000350\n\tCKM_CONCATENATE_BASE_AND_KEY         = 0x00000360\n\tCKM_CONCATENATE_BASE_AND_DATA        = 0x00000362\n\tCKM_CONCATENATE_DATA_AND_BASE        = 0x00000363\n\tCKM_XOR_BASE_AND_DATA                = 0x00000364\n\tCKM_EXTRACT_KEY_FROM_KEY             = 0x00000365\n\tCKM_SSL3_PRE_MASTER_KEY_GEN          = 0x00000370\n\tCKM_SSL3_MASTER_KEY_DERIVE           = 0x00000371\n\tCKM_SSL3_KEY_AND_MAC_DERIVE          = 0x00000372\n\tCKM_SSL3_MASTER_KEY_DERIVE_DH        = 0x00000373\n\tCKM_TLS_PRE_MASTER_KEY_GEN           = 0x00000374\n\tCKM_TLS_MASTER_KEY_DERIVE            = 0x00000375\n\tCKM_TLS_KEY_AND_MAC_DERIVE           = 0x00000376\n\tCKM_TLS_MASTER_KEY_DERIVE_DH         = 0x00000377\n\tCKM_TLS_PRF                          = 0x00000378\n\tCKM_SSL3_MD5_MAC                     = 0x00000380\n\tCKM_SSL3_SHA1_MAC                    = 0x00000381\n\tCKM_MD5_KEY_DERIVATION               = 0x00000390\n\tCKM_MD2_KEY_DERIVATION               = 0x00000391\n\tCKM_SHA1_KEY_DERIVATION              = 0x00000392\n\tCKM_SHA256_KEY_DERIVATION            = 0x00000393\n\tCKM_SHA384_KEY_DERIVATION            = 0x00000394\n\tCKM_SHA512_KEY_DERIVATION            = 0x00000395\n\tCKM_SHA224_KEY_DERIVATION            = 0x00000396\n\tCKM_SHA3_256_KEY_DERIVE              = 0x00000397\n\tCKM_SHA3_224_KEY_DERIVE              = 0x00000398\n\tCKM_SHA3_384_KEY_DERIVE              = 0x00000399\n\tCKM_SHA3_512_KEY_DERIVE              = 0x0000039A\n\tCKM_SHAKE_128_KEY_DERIVE             = 0x0000039B\n\tCKM_SHAKE_256_KEY_DERIVE             = 0x0000039C\n\tCKM_PBE_MD2_DES_CBC                  = 0x000003A0\n\tCKM_PBE_MD5_DES_CBC                  = 0x000003A1\n\tCKM_PBE_MD5_CAST_CBC                 = 0x000003A2\n\tCKM_PBE_MD5_CAST3_CBC                = 0x000003A3\n\tCKM_PBE_MD5_CAST5_CBC                = 0x000003A4 // Deprecated\n\tCKM_PBE_MD5_CAST128_CBC              = 0x000003A4\n\tCKM_PBE_SHA1_CAST5_CBC               = 0x000003A5 // Deprecated\n\tCKM_PBE_SHA1_CAST128_CBC             = 0x000003A5\n\tCKM_PBE_SHA1_RC4_128                 = 0x000003A6\n\tCKM_PBE_SHA1_RC4_40                  = 0x000003A7\n\tCKM_PBE_SHA1_DES3_EDE_CBC            = 0x000003A8\n\tCKM_PBE_SHA1_DES2_EDE_CBC            = 0x000003A9\n\tCKM_PBE_SHA1_RC2_128_CBC             = 0x000003AA\n\tCKM_PBE_SHA1_RC2_40_CBC              = 0x000003AB\n\tCKM_PKCS5_PBKD2                      = 0x000003B0\n\tCKM_PBA_SHA1_WITH_SHA1_HMAC          = 0x000003C0\n\tCKM_WTLS_PRE_MASTER_KEY_GEN          = 0x000003D0\n\tCKM_WTLS_MASTER_KEY_DERIVE           = 0x000003D1\n\tCKM_WTLS_MASTER_KEY_DERIVE_DH_ECC    = 0x000003D2\n\tCKM_WTLS_PRF                         = 0x000003D3\n\tCKM_WTLS_SERVER_KEY_AND_MAC_DERIVE   = 0x000003D4\n\tCKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE   = 0x000003D5\n\tCKM_TLS10_MAC_SERVER                 = 0x000003D6\n\tCKM_TLS10_MAC_CLIENT                 = 0x000003D7\n\tCKM_TLS12_MAC                        = 0x000003D8\n\tCKM_TLS12_KDF                        = 0x000003D9\n\tCKM_TLS12_MASTER_KEY_DERIVE          = 0x000003E0\n\tCKM_TLS12_KEY_AND_MAC_DERIVE         = 0x000003E1\n\tCKM_TLS12_MASTER_KEY_DERIVE_DH       = 0x000003E2\n\tCKM_TLS12_KEY_SAFE_DERIVE            = 0x000003E3\n\tCKM_TLS_MAC                          = 0x000003E4\n\tCKM_TLS_KDF                          = 0x000003E5\n\tCKM_KEY_WRAP_LYNKS                   = 0x00000400\n\tCKM_KEY_WRAP_SET_OAEP                = 0x00000401\n\tCKM_CMS_SIG                          = 0x00000500\n\tCKM_KIP_DERIVE                       = 0x00000510\n\tCKM_KIP_WRAP                         = 0x00000511\n\tCKM_KIP_MAC                          = 0x00000512\n\tCKM_CAMELLIA_KEY_GEN                 = 0x00000550\n\tCKM_CAMELLIA_ECB                     = 0x00000551\n\tCKM_CAMELLIA_CBC                     = 0x00000552\n\tCKM_CAMELLIA_MAC                     = 0x00000553\n\tCKM_CAMELLIA_MAC_GENERAL             = 0x00000554\n\tCKM_CAMELLIA_CBC_PAD                 = 0x00000555\n\tCKM_CAMELLIA_ECB_ENCRYPT_DATA        = 0x00000556\n\tCKM_CAMELLIA_CBC_ENCRYPT_DATA        = 0x00000557\n\tCKM_CAMELLIA_CTR                     = 0x00000558\n\tCKM_ARIA_KEY_GEN                     = 0x00000560\n\tCKM_ARIA_ECB                         = 0x00000561\n\tCKM_ARIA_CBC                         = 0x00000562\n\tCKM_ARIA_MAC                         = 0x00000563\n\tCKM_ARIA_MAC_GENERAL                 = 0x00000564\n\tCKM_ARIA_CBC_PAD                     = 0x00000565\n\tCKM_ARIA_ECB_ENCRYPT_DATA            = 0x00000566\n\tCKM_ARIA_CBC_ENCRYPT_DATA            = 0x00000567\n\tCKM_SEED_KEY_GEN                     = 0x00000650\n\tCKM_SEED_ECB                         = 0x00000651\n\tCKM_SEED_CBC                         = 0x00000652\n\tCKM_SEED_MAC                         = 0x00000653\n\tCKM_SEED_MAC_GENERAL                 = 0x00000654\n\tCKM_SEED_CBC_PAD                     = 0x00000655\n\tCKM_SEED_ECB_ENCRYPT_DATA            = 0x00000656\n\tCKM_SEED_CBC_ENCRYPT_DATA            = 0x00000657\n\tCKM_SKIPJACK_KEY_GEN                 = 0x00001000\n\tCKM_SKIPJACK_ECB64                   = 0x00001001\n\tCKM_SKIPJACK_CBC64                   = 0x00001002\n\tCKM_SKIPJACK_OFB64                   = 0x00001003\n\tCKM_SKIPJACK_CFB64                   = 0x00001004\n\tCKM_SKIPJACK_CFB32                   = 0x00001005\n\tCKM_SKIPJACK_CFB16                   = 0x00001006\n\tCKM_SKIPJACK_CFB8                    = 0x00001007\n\tCKM_SKIPJACK_WRAP                    = 0x00001008\n\tCKM_SKIPJACK_PRIVATE_WRAP            = 0x00001009\n\tCKM_SKIPJACK_RELAYX                  = 0x0000100a\n\tCKM_KEA_KEY_PAIR_GEN                 = 0x00001010\n\tCKM_KEA_KEY_DERIVE                   = 0x00001011\n\tCKM_KEA_DERIVE                       = 0x00001012\n\tCKM_FORTEZZA_TIMESTAMP               = 0x00001020\n\tCKM_BATON_KEY_GEN                    = 0x00001030\n\tCKM_BATON_ECB128                     = 0x00001031\n\tCKM_BATON_ECB96                      = 0x00001032\n\tCKM_BATON_CBC128                     = 0x00001033\n\tCKM_BATON_COUNTER                    = 0x00001034\n\tCKM_BATON_SHUFFLE                    = 0x00001035\n\tCKM_BATON_WRAP                       = 0x00001036\n\tCKM_ECDSA_KEY_PAIR_GEN               = 0x00001040 // Deprecated\n\tCKM_EC_KEY_PAIR_GEN                  = 0x00001040\n\tCKM_ECDSA                            = 0x00001041\n\tCKM_ECDSA_SHA1                       = 0x00001042\n\tCKM_ECDSA_SHA224                     = 0x00001043\n\tCKM_ECDSA_SHA256                     = 0x00001044\n\tCKM_ECDSA_SHA384                     = 0x00001045\n\tCKM_ECDSA_SHA512                     = 0x00001046\n\tCKM_ECDH1_DERIVE                     = 0x00001050\n\tCKM_ECDH1_COFACTOR_DERIVE            = 0x00001051\n\tCKM_ECMQV_DERIVE                     = 0x00001052\n\tCKM_ECDH_AES_KEY_WRAP                = 0x00001053\n\tCKM_RSA_AES_KEY_WRAP                 = 0x00001054\n\tCKM_JUNIPER_KEY_GEN                  = 0x00001060\n\tCKM_JUNIPER_ECB128                   = 0x00001061\n\tCKM_JUNIPER_CBC128                   = 0x00001062\n\tCKM_JUNIPER_COUNTER                  = 0x00001063\n\tCKM_JUNIPER_SHUFFLE                  = 0x00001064\n\tCKM_JUNIPER_WRAP                     = 0x00001065\n\tCKM_FASTHASH                         = 0x00001070\n\tCKM_AES_KEY_GEN                      = 0x00001080\n\tCKM_AES_ECB                          = 0x00001081\n\tCKM_AES_CBC                          = 0x00001082\n\tCKM_AES_MAC                          = 0x00001083\n\tCKM_AES_MAC_GENERAL                  = 0x00001084\n\tCKM_AES_CBC_PAD                      = 0x00001085\n\tCKM_AES_CTR                          = 0x00001086\n\tCKM_AES_GCM                          = 0x00001087\n\tCKM_AES_CCM                          = 0x00001088\n\tCKM_AES_CTS                          = 0x00001089\n\tCKM_AES_CMAC                         = 0x0000108A\n\tCKM_AES_CMAC_GENERAL                 = 0x0000108B\n\tCKM_AES_XCBC_MAC                     = 0x0000108C\n\tCKM_AES_XCBC_MAC_96                  = 0x0000108D\n\tCKM_AES_GMAC                         = 0x0000108E\n\tCKM_BLOWFISH_KEY_GEN                 = 0x00001090\n\tCKM_BLOWFISH_CBC                     = 0x00001091\n\tCKM_TWOFISH_KEY_GEN                  = 0x00001092\n\tCKM_TWOFISH_CBC                      = 0x00001093\n\tCKM_BLOWFISH_CBC_PAD                 = 0x00001094\n\tCKM_TWOFISH_CBC_PAD                  = 0x00001095\n\tCKM_DES_ECB_ENCRYPT_DATA             = 0x00001100\n\tCKM_DES_CBC_ENCRYPT_DATA             = 0x00001101\n\tCKM_DES3_ECB_ENCRYPT_DATA            = 0x00001102\n\tCKM_DES3_CBC_ENCRYPT_DATA            = 0x00001103\n\tCKM_AES_ECB_ENCRYPT_DATA             = 0x00001104\n\tCKM_AES_CBC_ENCRYPT_DATA             = 0x00001105\n\tCKM_GOSTR3410_KEY_PAIR_GEN           = 0x00001200\n\tCKM_GOSTR3410                        = 0x00001201\n\tCKM_GOSTR3410_WITH_GOSTR3411         = 0x00001202\n\tCKM_GOSTR3410_KEY_WRAP               = 0x00001203\n\tCKM_GOSTR3410_DERIVE                 = 0x00001204\n\tCKM_GOSTR3411                        = 0x00001210\n\tCKM_GOSTR3411_HMAC                   = 0x00001211\n\tCKM_GOST28147_KEY_GEN                = 0x00001220\n\tCKM_GOST28147_ECB                    = 0x00001221\n\tCKM_GOST28147                        = 0x00001222\n\tCKM_GOST28147_MAC                    = 0x00001223\n\tCKM_GOST28147_KEY_WRAP               = 0x00001224\n\tCKM_DSA_PARAMETER_GEN                = 0x00002000\n\tCKM_DH_PKCS_PARAMETER_GEN            = 0x00002001\n\tCKM_X9_42_DH_PARAMETER_GEN           = 0x00002002\n\tCKM_DSA_PROBABLISTIC_PARAMETER_GEN   = 0x00002003\n\tCKM_DSA_SHAWE_TAYLOR_PARAMETER_GEN   = 0x00002004\n\tCKM_AES_OFB                          = 0x00002104\n\tCKM_AES_CFB64                        = 0x00002105\n\tCKM_AES_CFB8                         = 0x00002106\n\tCKM_AES_CFB128                       = 0x00002107\n\tCKM_AES_CFB1                         = 0x00002108\n\tCKM_AES_KEY_WRAP                     = 0x00002109\n\tCKM_AES_KEY_WRAP_PAD                 = 0x0000210A\n\tCKM_RSA_PKCS_TPM_1_1                 = 0x00004001\n\tCKM_RSA_PKCS_OAEP_TPM_1_1            = 0x00004002\n\tCKM_VENDOR_DEFINED                   = 0x80000000\n\tCKF_HW                               = 0x00000001\n\tCKF_ENCRYPT                          = 0x00000100\n\tCKF_DECRYPT                          = 0x00000200\n\tCKF_DIGEST                           = 0x00000400\n\tCKF_SIGN                             = 0x00000800\n\tCKF_SIGN_RECOVER                     = 0x00001000\n\tCKF_VERIFY                           = 0x00002000\n\tCKF_VERIFY_RECOVER                   = 0x00004000\n\tCKF_GENERATE                         = 0x00008000\n\tCKF_GENERATE_KEY_PAIR                = 0x00010000\n\tCKF_WRAP                             = 0x00020000\n\tCKF_UNWRAP                           = 0x00040000\n\tCKF_DERIVE                           = 0x00080000\n\tCKF_EC_F_P                           = 0x00100000\n\tCKF_EC_F_2M                          = 0x00200000\n\tCKF_EC_ECPARAMETERS                  = 0x00400000\n\tCKF_EC_NAMEDCURVE                    = 0x00800000\n\tCKF_EC_UNCOMPRESS                    = 0x01000000\n\tCKF_EC_COMPRESS                      = 0x02000000\n\tCKF_EXTENSION                        = 0x80000000\n\tCKR_OK                               = 0x00000000\n\tCKR_CANCEL                           = 0x00000001\n\tCKR_HOST_MEMORY                      = 0x00000002\n\tCKR_SLOT_ID_INVALID                  = 0x00000003\n\tCKR_GENERAL_ERROR                    = 0x00000005\n\tCKR_FUNCTION_FAILED                  = 0x00000006\n\tCKR_ARGUMENTS_BAD                    = 0x00000007\n\tCKR_NO_EVENT                         = 0x00000008\n\tCKR_NEED_TO_CREATE_THREADS           = 0x00000009\n\tCKR_CANT_LOCK                        = 0x0000000A\n\tCKR_ATTRIBUTE_READ_ONLY              = 0x00000010\n\tCKR_ATTRIBUTE_SENSITIVE              = 0x00000011\n\tCKR_ATTRIBUTE_TYPE_INVALID           = 0x00000012\n\tCKR_ATTRIBUTE_VALUE_INVALID          = 0x00000013\n\tCKR_ACTION_PROHIBITED                = 0x0000001B\n\tCKR_DATA_INVALID                     = 0x00000020\n\tCKR_DATA_LEN_RANGE                   = 0x00000021\n\tCKR_DEVICE_ERROR                     = 0x00000030\n\tCKR_DEVICE_MEMORY                    = 0x00000031\n\tCKR_DEVICE_REMOVED                   = 0x00000032\n\tCKR_ENCRYPTED_DATA_INVALID           = 0x00000040\n\tCKR_ENCRYPTED_DATA_LEN_RANGE         = 0x00000041\n\tCKR_FUNCTION_CANCELED                = 0x00000050\n\tCKR_FUNCTION_NOT_PARALLEL            = 0x00000051\n\tCKR_FUNCTION_NOT_SUPPORTED           = 0x00000054\n\tCKR_KEY_HANDLE_INVALID               = 0x00000060\n\tCKR_KEY_SIZE_RANGE                   = 0x00000062\n\tCKR_KEY_TYPE_INCONSISTENT            = 0x00000063\n\tCKR_KEY_NOT_NEEDED                   = 0x00000064\n\tCKR_KEY_CHANGED                      = 0x00000065\n\tCKR_KEY_NEEDED                       = 0x00000066\n\tCKR_KEY_INDIGESTIBLE                 = 0x00000067\n\tCKR_KEY_FUNCTION_NOT_PERMITTED       = 0x00000068\n\tCKR_KEY_NOT_WRAPPABLE                = 0x00000069\n\tCKR_KEY_UNEXTRACTABLE                = 0x0000006A\n\tCKR_MECHANISM_INVALID                = 0x00000070\n\tCKR_MECHANISM_PARAM_INVALID          = 0x00000071\n\tCKR_OBJECT_HANDLE_INVALID            = 0x00000082\n\tCKR_OPERATION_ACTIVE                 = 0x00000090\n\tCKR_OPERATION_NOT_INITIALIZED        = 0x00000091\n\tCKR_PIN_INCORRECT                    = 0x000000A0\n\tCKR_PIN_INVALID                      = 0x000000A1\n\tCKR_PIN_LEN_RANGE                    = 0x000000A2\n\tCKR_PIN_EXPIRED                      = 0x000000A3\n\tCKR_PIN_LOCKED                       = 0x000000A4\n\tCKR_SESSION_CLOSED                   = 0x000000B0\n\tCKR_SESSION_COUNT                    = 0x000000B1\n\tCKR_SESSION_HANDLE_INVALID           = 0x000000B3\n\tCKR_SESSION_PARALLEL_NOT_SUPPORTED   = 0x000000B4\n\tCKR_SESSION_READ_ONLY                = 0x000000B5\n\tCKR_SESSION_EXISTS                   = 0x000000B6\n\tCKR_SESSION_READ_ONLY_EXISTS         = 0x000000B7\n\tCKR_SESSION_READ_WRITE_SO_EXISTS     = 0x000000B8\n\tCKR_SIGNATURE_INVALID                = 0x000000C0\n\tCKR_SIGNATURE_LEN_RANGE              = 0x000000C1\n\tCKR_TEMPLATE_INCOMPLETE              = 0x000000D0\n\tCKR_TEMPLATE_INCONSISTENT            = 0x000000D1\n\tCKR_TOKEN_NOT_PRESENT                = 0x000000E0\n\tCKR_TOKEN_NOT_RECOGNIZED             = 0x000000E1\n\tCKR_TOKEN_WRITE_PROTECTED            = 0x000000E2\n\tCKR_UNWRAPPING_KEY_HANDLE_INVALID    = 0x000000F0\n\tCKR_UNWRAPPING_KEY_SIZE_RANGE        = 0x000000F1\n\tCKR_UNWRAPPING_KEY_TYPE_INCONSISTENT = 0x000000F2\n\tCKR_USER_ALREADY_LOGGED_IN           = 0x00000100\n\tCKR_USER_NOT_LOGGED_IN               = 0x00000101\n\tCKR_USER_PIN_NOT_INITIALIZED         = 0x00000102\n\tCKR_USER_TYPE_INVALID                = 0x00000103\n\tCKR_USER_ANOTHER_ALREADY_LOGGED_IN   = 0x00000104\n\tCKR_USER_TOO_MANY_TYPES              = 0x00000105\n\tCKR_WRAPPED_KEY_INVALID              = 0x00000110\n\tCKR_WRAPPED_KEY_LEN_RANGE            = 0x00000112\n\tCKR_WRAPPING_KEY_HANDLE_INVALID      = 0x00000113\n\tCKR_WRAPPING_KEY_SIZE_RANGE          = 0x00000114\n\tCKR_WRAPPING_KEY_TYPE_INCONSISTENT   = 0x00000115\n\tCKR_RANDOM_SEED_NOT_SUPPORTED        = 0x00000120\n\tCKR_RANDOM_NO_RNG                    = 0x00000121\n\tCKR_DOMAIN_PARAMS_INVALID            = 0x00000130\n\tCKR_CURVE_NOT_SUPPORTED              = 0x00000140\n\tCKR_BUFFER_TOO_SMALL                 = 0x00000150\n\tCKR_SAVED_STATE_INVALID              = 0x00000160\n\tCKR_INFORMATION_SENSITIVE            = 0x00000170\n\tCKR_STATE_UNSAVEABLE                 = 0x00000180\n\tCKR_CRYPTOKI_NOT_INITIALIZED         = 0x00000190\n\tCKR_CRYPTOKI_ALREADY_INITIALIZED     = 0x00000191\n\tCKR_MUTEX_BAD                        = 0x000001A0\n\tCKR_MUTEX_NOT_LOCKED                 = 0x000001A1\n\tCKR_NEW_PIN_MODE                     = 0x000001B0\n\tCKR_NEXT_OTP                         = 0x000001B1\n\tCKR_EXCEEDED_MAX_ITERATIONS          = 0x000001B5\n\tCKR_FIPS_SELF_TEST_FAILED            = 0x000001B6\n\tCKR_LIBRARY_LOAD_FAILED              = 0x000001B7\n\tCKR_PIN_TOO_WEAK                     = 0x000001B8\n\tCKR_PUBLIC_KEY_INVALID               = 0x000001B9\n\tCKR_FUNCTION_REJECTED                = 0x00000200\n\tCKR_VENDOR_DEFINED                   = 0x80000000\n\tCKF_LIBRARY_CANT_CREATE_OS_THREADS   = 0x00000001\n\tCKF_OS_LOCKING_OK                    = 0x00000002\n\tCKF_DONT_BLOCK                       = 1\n\tCKG_MGF1_SHA1                        = 0x00000001\n\tCKG_MGF1_SHA256                      = 0x00000002\n\tCKG_MGF1_SHA384                      = 0x00000003\n\tCKG_MGF1_SHA512                      = 0x00000004\n\tCKG_MGF1_SHA224                      = 0x00000005\n\tCKZ_DATA_SPECIFIED                   = 0x00000001\n\tCKD_NULL                             = 0x00000001\n\tCKD_SHA1_KDF                         = 0x00000002\n\tCKD_SHA1_KDF_ASN1                    = 0x00000003\n\tCKD_SHA1_KDF_CONCATENATE             = 0x00000004\n\tCKD_SHA224_KDF                       = 0x00000005\n\tCKD_SHA256_KDF                       = 0x00000006\n\tCKD_SHA384_KDF                       = 0x00000007\n\tCKD_SHA512_KDF                       = 0x00000008\n\tCKD_CPDIVERSIFY_KDF                  = 0x00000009\n\tCKD_SHA3_224_KDF                     = 0x0000000A\n\tCKD_SHA3_256_KDF                     = 0x0000000B\n\tCKD_SHA3_384_KDF                     = 0x0000000C\n\tCKD_SHA3_512_KDF                     = 0x0000000D\n\tCKP_PKCS5_PBKD2_HMAC_SHA1            = 0x00000001\n\tCKP_PKCS5_PBKD2_HMAC_GOSTR3411       = 0x00000002\n\tCKP_PKCS5_PBKD2_HMAC_SHA224          = 0x00000003\n\tCKP_PKCS5_PBKD2_HMAC_SHA256          = 0x00000004\n\tCKP_PKCS5_PBKD2_HMAC_SHA384          = 0x00000005\n\tCKP_PKCS5_PBKD2_HMAC_SHA512          = 0x00000006\n\tCKP_PKCS5_PBKD2_HMAC_SHA512_224      = 0x00000007\n\tCKP_PKCS5_PBKD2_HMAC_SHA512_256      = 0x00000008\n\tCKZ_SALT_SPECIFIED                   = 0x00000001\n\tCK_OTP_VALUE                         = 0\n\tCK_OTP_PIN                           = 1\n\tCK_OTP_CHALLENGE                     = 2\n\tCK_OTP_TIME                          = 3\n\tCK_OTP_COUNTER                       = 4\n\tCK_OTP_FLAGS                         = 5\n\tCK_OTP_OUTPUT_LENGTH                 = 6\n\tCK_OTP_OUTPUT_FORMAT                 = 7\n\tCKF_NEXT_OTP                         = 0x00000001\n\tCKF_EXCLUDE_TIME                     = 0x00000002\n\tCKF_EXCLUDE_COUNTER                  = 0x00000004\n\tCKF_EXCLUDE_CHALLENGE                = 0x00000008\n\tCKF_EXCLUDE_PIN                      = 0x00000010\n\tCKF_USER_FRIENDLY_OTP                = 0x00000020\n)\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/.envrc",
    "content": "has nix && use nix\ndotenv_if_exists\nPATH_add bin\npath_add GOBIN bin\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/.gitignore",
    "content": "bin\ngo-zfs.test\n.vagrant\n\n# added by lint-install\nout/\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/.golangci.yml",
    "content": "run:\n  # The default runtime timeout is 1m, which doesn't work well on Github Actions.\n  timeout: 4m\n\n# NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten.\nlinters-settings:\n  cyclop:\n    # NOTE: This is a very high transitional threshold\n    max-complexity: 37\n    package-average: 34.0\n    skip-tests: true\n\n  gocognit:\n    # NOTE: This is a very high transitional threshold\n    min-complexity: 98\n\n  dupl:\n    threshold: 200\n\n  goconst:\n    min-len: 4\n    min-occurrences: 5\n    ignore-tests: true\n\n  gosec:\n    excludes:\n      - G107 # Potential HTTP request made with variable url\n      - G204 # Subprocess launched with function call as argument or cmd arguments\n      - G404 # Use of weak random number generator (math/rand instead of crypto/rand\n\n  errorlint:\n    # these are still common in Go: for instance, exit errors.\n    asserts: false\n\n  exhaustive:\n    default-signifies-exhaustive: true\n\n  nestif:\n    min-complexity: 8\n\n  nolintlint:\n    require-explanation: true\n    allow-unused: false\n    require-specific: true\n\n  revive:\n    ignore-generated-header: true\n    severity: warning\n    rules:\n      - name: atomic\n      - name: blank-imports\n      - name: bool-literal-in-expr\n      - name: confusing-naming\n      - name: constant-logical-expr\n      - name: context-as-argument\n      - name: context-keys-type\n      - name: deep-exit\n      - name: defer\n      - name: range-val-in-closure\n      - name: range-val-address\n      - name: dot-imports\n      - name: error-naming\n      - name: error-return\n      - name: error-strings\n      - name: errorf\n      - name: exported\n      - name: identical-branches\n      - name: if-return\n      - name: import-shadowing\n      - name: increment-decrement\n      - name: indent-error-flow\n      - name: indent-error-flow\n      - name: package-comments\n      - name: range\n      - name: receiver-naming\n      - name: redefines-builtin-id\n      - name: superfluous-else\n      - name: struct-tag\n      - name: time-naming\n      - name: unexported-naming\n      - name: unexported-return\n      - name: unnecessary-stmt\n      - name: unreachable-code\n      - name: unused-parameter\n      - name: var-declaration\n      - name: var-naming\n      - name: unconditional-recursion\n      - name: waitgroup-by-value\n\n  staticcheck:\n    go: \"1.16\"\n\n  unused:\n    go: \"1.16\"\n\noutput:\n  sort-results: true\n\nlinters:\n  disable-all: true\n  enable:\n    - asciicheck\n    - bodyclose\n    - cyclop\n    - deadcode\n    - dogsled\n    - dupl\n    - durationcheck\n    - errcheck\n    - errname\n    - errorlint\n    - exhaustive\n    - exportloopref\n    - forcetypeassert\n    - gocognit\n    - goconst\n    - gocritic\n    - godot\n    - gofmt\n    - gofumpt\n    - gosec\n    - goheader\n    - goimports\n    - goprintffuncname\n    - gosimple\n    - govet\n    - ifshort\n    - importas\n    - ineffassign\n    - makezero\n    - misspell\n    - nakedret\n    - nestif\n    - nilerr\n    - noctx\n    - nolintlint\n    - predeclared\n    # disabling for the initial iteration of the linting tool\n    # - promlinter\n    - revive\n    - rowserrcheck\n    - sqlclosecheck\n    - staticcheck\n    - structcheck\n    - stylecheck\n    - thelper\n    - tparallel\n    - typecheck\n    - unconvert\n    - unparam\n    - unused\n    - varcheck\n    - wastedassign\n    - whitespace\n\n  # Disabled linters, due to being misaligned with Go practices\n  # - exhaustivestruct\n  # - gochecknoglobals\n  # - gochecknoinits\n  # - goconst\n  # - godox\n  # - goerr113\n  # - gomnd\n  # - lll\n  # - nlreturn\n  # - testpackage\n  # - wsl\n  # Disabled linters, due to not being relevant to our code base:\n  # - maligned\n  # - prealloc \"For most programs usage of prealloc will be a premature optimization.\"\n  # Disabled linters due to bad error messages or bugs\n  # - tagliatelle\n\nissues:\n  # Excluding configuration per-path, per-linter, per-text and per-source\n  exclude-rules:\n    - path: _test\\.go\n      linters:\n        - dupl\n        - errcheck\n        - forcetypeassert\n        - gocyclo\n        - gosec\n        - noctx\n\n    - path: .*cmd.*\n      linters:\n        - noctx\n\n    - path: main\\.go\n      linters:\n        - noctx\n\n    - path: .*cmd.*\n      text: \"deep-exit\"\n\n    - path: main\\.go\n      text: \"deep-exit\"\n\n    # This check is of questionable value\n    - linters:\n        - tparallel\n      text: \"call t.Parallel on the top level as well as its subtests\"\n\n  # Don't hide lint issues just because there are many of them\n  max-same-issues: 0\n  max-issues-per-linter: 0\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/.yamllint",
    "content": "---\nextends: default\n\nrules:\n  braces:\n    max-spaces-inside: 1\n  brackets:\n    max-spaces-inside: 1\n  comments: disable\n  comments-indentation: disable\n  document-start: disable\n  line-length:\n    level: warning\n    max: 160\n    allow-non-breakable-inline-mappings: true\n  truthy: disable\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file.\nThis project adheres to [Semantic Versioning](http://semver.org/).\nThis change log follows the advice of [Keep a CHANGELOG](https://github.com/olivierlacan/keep-a-changelog).\n\n## [Unreleased]\n\n## [3.0.0] - 2022-03-30\n\n### Added\n\n- Rename, Mount and Unmount methods\n- Parse more fields into Zpool type:\n  - dedupratio\n  - fragmentation\n  - freeing\n  - leaked\n  - readonly\n- Parse more fields into Dataset type:\n  - referenced\n- Incremental Send\n- Parse numbers in exact format\n- Support for Solaris (non-blockint, best-effort status)\n- Debug logging for command invocation\n- Use GitHub Actions for CI\n- Nix shell for dev env reproducibility\n- Direnv file for ease of dev\n- Formatting/lint checks (enforced by CI)\n- Go Module\n- FreeBSD based vagrant machine\n\n### Changed\n\n- Temporarily adjust TestDiff expected strings depending on ZFS version\n- Use one `zfs list`/`zpool list` call instead of many `zfs get`/`zpool get`\n- ZFS docs links now point to OpenZFS pages\n- Ubuntu vagrant box changed to generic/ubuntu2004\n\n### Fixed\n\n- `GetProperty` returning `VALUE` instead of the actual value\n\n### Shortlog\n\n    Amit Krishnan (1):\n      Issue #39 and Issue #40 - Enable Solaris support for go-zfs Switch from zfs/zpool get to zfs/zpool list for better performance Signed-off-by: Amit Krishnan <krish.amit@gmail.com>\n\n    Anand Patil (3):\n      Added Rename\n      Small fix to rename.\n      Added mount and umount methods\n\n    Brian Akins (1):\n      Add 'referenced' to zfs properties\n\n    Brian Bickerton (3):\n      Add debug logging before and after running external zfs command\n      Don't export the default no-op logger\n      Update uuid package repo url\n\n    Dmitry Teselkin (1):\n      Issue #52 - fix parseLine for fragmentation field\n\n    Edward Betts (1):\n      correct spelling mistake\n\n    Justin Cormack (1):\n      Switch to google/uuid which is the maintained version of pborman/uuid\n\n    Manuel Mendez (40):\n      rename Umount -> Unmount to follow zfs command name\n      add missing Unmount/Mount docs\n      always allocate largest Mount slice\n      add travis config\n      travis: update to go 1.7\n      travis: get go deps first\n      test: add nok helper to verify an error occurred\n      test: add test for Dataset.GetProperty\n      ci: swap #cerana on freenode for slack\n      ci: install new deps for 0.7 relases\n      ci: bump zol versions\n      ci: bump go versions\n      ci: use better gometalinter invocations\n      ci: add ccache\n      ci: set env earlier in before_install\n      fix test nok error printing\n      test: restructure TestDiff to deal with different order of changes\n      test: better unicode path handling in TestDiff\n      travis: bump zfs and go versions\n      cache zfs artifacts\n      Add nix-shell and direnv goodness\n      prettierify all the files\n      Add go based tools\n      Add Makefile and rules.mk files\n      gofumptize the code base\n      Use tinkerbell/lint-install to setup linters\n      make golangci-lint happy\n      Update CONTRIBUTING.md with make based approach\n      Add GitHub Actions\n      Drop Travis CI\n      One sentence per line\n      Update documentation links to openzfs-docs pages\n      Format Vagrantfile using rufo\n      Add go-zfs.test to .gitignore\n      test: Avoid reptitive/duplicate error logging and quitting\n      test: Use t.Logf instead of fmt.Printf\n      test: Better cleanup and error handling in zpoolTest\n      test: Do not mark TestDatasets as a t.Helper.\n      test: Change zpoolTest to a pure helper that returns a clean up function\n      test: Move helpers to a different file\n      vagrant: Add set -euxo pipefail to provision script\n      vagrant: Update to generic/ubuntu2004\n      vagrant: Minor fixes to Vagrantfile\n      vagrant: Update to go 1.17.8\n      vagrant: Run go tests as part of provision script\n      vagrant: Indent heredoc script\n      vagrant: Add freebsd machine\n\n    Matt Layher (1):\n      Parse more fields into Zpool type\n\n    Michael Crosby (1):\n      Add incremental send\n\n    Rikard Gynnerstedt (1):\n      remove command name from joined args\n\n    Sebastiaan van Stijn (1):\n      Add go.mod and rename to github.com/mistifyio/go-zfs/v3 (v3.0.0)\n\n    mikudeko (1):\n      Fix GetProperty always returning 'VALUE'\n\n## [2.1.1] - 2015-05-29\n\n### Fixed\n\n- Ignoring first pool listed\n- Incorrect `zfs get` argument ordering\n\n### Shortlog\n\n    Alexey Guskov (1):\n      zfs command uses different order of arguments on freebsd\n\n    Brian Akins (4):\n      test that ListZpools returns expected zpool\n      test error first\n      test error first\n      fix test to check correct return value\n\n    James Cunningham (1):\n      Fix Truncating First Zpool\n\n    Pat Norton (2):\n      Added Use of Go Tools\n      Update CONTRIBUTING.md\n\n## [2.1.0] - 2014-12-08\n\n### Added\n\n- Parse hardlink modification count returned from `zfs diff`\n\n### Fixed\n\n- Continuing instead of erroring when rolling back a non-snapshot\n\n### Shortlog\n\n    Brian Akins (2):\n      need to return the error here\n      use named struct fields\n\n    Jörg Thalheim (1):\n      zfs diff handle hardlinks modification now\n\n## [2.0.0] - 2014-12-02\n\n### Added\n\n- Flags for Destroy:\n  - DESTROY_DEFAULT\n  - DESTROY_DEFER_DELETION (`zfs destroy ... -d`)\n  - DESTROY_FORCE (`zfs destroy ... -f`)\n  - DESTROY_RECURSIVE_CLONES (`zfs destroy ... -R`)\n  - DESTROY_RECURSIVE (`zfs destroy ... -r`)\n  - etc\n- Diff method (`zfs diff`)\n- LogicalUsed and Origin properties to Dataset\n- Type constants for Dataset\n- State constants for Zpool\n- Logger interface\n- Improve documentation\n\n### Shortlog\n\n    Brian Akins (8):\n      remove reflection\n      style change for switches\n      need to check for error\n      keep in scope\n      go 1.3.3\n      golint cleanup\n      Just test if logical used is greater than 0, as this appears to be implementation specific\n      add docs to satisfy golint\n\n    Jörg Thalheim (8):\n      Add deferred flag to zfs.Destroy()\n      add Logicalused property\n      Add Origin property\n      gofmt\n      Add zfs.Diff\n      Add Logger\n      add recursive destroy with clones\n      use CamelCase-style constants\n\n    Matt Layher (4):\n      Improve documentation, document common ZFS operations, provide more references\n      Add zpool state constants, for easier health checking\n      Add dataset type constants, for easier type checking\n      Fix string split in command.Run(), use strings.Fields() instead of strings.Split()\n\n## [1.0.0] - 2014-11-12\n\n### Shortlog\n\n    Brian Akins (7):\n      add godoc badge\n      Add example\n      add information about zpool to struct and parser\n      Add Quota\n      add Children call\n      add Children call\n      fix snapshot tests\n\n    Brian Bickerton (3):\n      MIST-150 Change Snapshot second paramater from properties map[string][string] to recursive bool\n      MIST-150 Add Rollback method and related tests\n      MIST-160 Add SendSnapshot streaming method and tests\n\n    Matt Layher (1):\n      Add Error struct type and tests, enabling easier error return checking\n\n[3.0.0]: https://github.com/mistifyio/go-zfs/compare/v2.1.1...v3.0.0\n[2.1.1]: https://github.com/mistifyio/go-zfs/compare/v2.1.0...v2.1.1\n[2.1.0]: https://github.com/mistifyio/go-zfs/compare/v2.0.0...v2.1.0\n[2.0.0]: https://github.com/mistifyio/go-zfs/compare/v1.0.0...v2.0.0\n[1.0.0]: https://github.com/mistifyio/go-zfs/compare/v0.0.0...v1.0.0\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/CONTRIBUTING.md",
    "content": "## How to Contribute\n\nWe always welcome contributions to help make `go-zfs` better.\nPlease take a moment to read this document if you would like to contribute.\n\n### Reporting issues\n\nWe use [Github issues](https://github.com/mistifyio/go-zfs/issues) to track bug reports, feature requests, and submitting pull requests.\n\nIf you find a bug:\n\n- Use the GitHub issue search to check whether the bug has already been reported.\n- If the issue has been fixed, try to reproduce the issue using the latest `master` branch of the repository.\n- If the issue still reproduces or has not yet been reported, try to isolate the problem before opening an issue, if possible. Also provide the steps taken to reproduce the bug.\n\n### Pull requests\n\nWe welcome bug fixes, improvements, and new features.\nBefore embarking on making significant changes, please open an issue and ask first so that you do not risk duplicating efforts or spending time working on something that may be out of scope.\nFor minor items, just open a pull request.\n\n[Fork the project](https://help.github.com/articles/fork-a-repo), clone your fork, and add the upstream to your remote:\n\n    $ git clone git@github.com:<your-username>/go-zfs.git\n    $ cd go-zfs\n    $ git remote add upstream https://github.com/mistifyio/go-zfs.git\n\nIf you need to pull new changes committed upstream:\n\n    $ git checkout master\n    $ git fetch upstream\n    $ git merge upstream/master\n\nDon' work directly on master as this makes it harder to merge later.\nCreate a feature branch for your fix or new feature:\n\n    $ git checkout -b <feature-branch-name>\n\nPlease try to commit your changes in logical chunks.\nIdeally, you should include the issue number in the commit message.\n\n    $ git commit -m \"Issue #<issue-number> - <commit-message>\"\n\nPush your feature branch to your fork.\n\n    $ git push origin <feature-branch-name>\n\n[Open a Pull Request](https://help.github.com/articles/using-pull-requests) against the upstream master branch.\nPlease give your pull request a clear title and description and note which issue(s) your pull request fixes.\n\n- All linters should be happy (can be run with `make verify`).\n- Every exported function should have [documentation](http://blog.golang.org/godoc-documenting-go-code) and corresponding [tests](http://golang.org/doc/code.html#Testing).\n\n**Important:** By submitting a patch, you agree to allow the project owners to license your work under the [Apache 2.0 License](./LICENSE).\n\n### Go Tools\n\nFor consistency and to catch minor issues for all of go code, please run `make verify`.\n\nMany editors can execute the above on save.\n\n---\n\nGuidelines based on http://azkaban.github.io/contributing.html\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/LICENSE",
    "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 (c) 2014, OmniTI Computer Consulting, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/Makefile",
    "content": "help: ## Print this help\n\t@grep --no-filename -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sed 's/:.*## /·/' | sort | column -t -W 2 -s '·' -c $(shell tput cols)\n\nall: test ## Run tests\n\n-include rules.mk\n-include lint.mk\n\ntest: ## Run tests\n\tgo test ./...\n\nverify: gofumpt prettier lint ## Verify code style, is lint free, freshness ...\n\tgit diff | (! grep .)\n\nfix: gofumpt-fix prettier-fix ## Fix code formatting errors\n\ntools: ${toolsBins} ## Build Go based build tools\n\n.PHONY: all help test tools verify\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/README.md",
    "content": "# Go Wrapper for ZFS\n\nSimple wrappers for ZFS command line tools.\n\n[![GoDoc](https://godoc.org/github.com/mistifyio/go-zfs?status.svg)](https://godoc.org/github.com/mistifyio/go-zfs)\n\n## Requirements\n\nYou need a working ZFS setup. To use on Ubuntu 14.04, setup ZFS:\n\n    sudo apt-get install python-software-properties\n    sudo apt-add-repository ppa:zfs-native/stable\n    sudo apt-get update\n    sudo apt-get install ubuntu-zfs libzfs-dev\n\nDeveloped using Go 1.3, but currently there isn't anything 1.3 specific. Don't use Ubuntu packages for Go, use http://golang.org/doc/install\n\nGenerally you need root privileges to use anything zfs related.\n\n## Status\n\nThis has been only been tested on Ubuntu 14.04\n\nIn the future, we hope to work directly with libzfs.\n\n# Hacking\n\nThe tests have decent examples for most functions.\n\n```go\n//assuming a zpool named test\n//error handling omitted\n\n\nf, err := zfs.CreateFilesystem(\"test/snapshot-test\", nil)\nok(t, err)\n\ns, err := f.Snapshot(\"test\", nil)\nok(t, err)\n\n// snapshot is named \"test/snapshot-test@test\"\n\nc, err := s.Clone(\"test/clone-test\", nil)\n\nerr := c.Destroy()\nerr := s.Destroy()\nerr := f.Destroy()\n\n```\n\n# Contributing\n\nSee the [contributing guidelines](./CONTRIBUTING.md)\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/Vagrantfile",
    "content": "GOVERSION = \"1.17.8\"\n\nVagrant.configure(\"2\") do |config|\n  config.vm.define \"ubuntu\" do |ubuntu|\n    ubuntu.vm.box = \"generic/ubuntu2004\"\n  end\n  config.vm.define \"freebsd\" do |freebsd|\n    freebsd.vm.box = \"generic/freebsd13\"\n  end\n  config.ssh.forward_agent = true\n  config.vm.synced_folder \".\", \"/home/vagrant/go/src/github.com/mistifyio/go-zfs\", create: true\n  config.vm.provision \"shell\", inline: <<-EOF\n    set -euxo pipefail\n\n    os=$(uname -s|tr '[A-Z]' '[a-z]')\n    case $os in\n    linux) apt-get update -y && apt-get install -y --no-install-recommends gcc libc-dev zfsutils-linux ;;\n    esac\n\n    cd /tmp\n    curl -fLO --retry-max-time 30 --retry 10 https://go.dev/dl/go#{GOVERSION}.$os-amd64.tar.gz\n    tar -C /usr/local -zxf go#{GOVERSION}.$os-amd64.tar.gz\n    ln -nsf /usr/local/go/bin/go /usr/local/bin/go\n    rm -rf go*.tar.gz\n\n    chown -R vagrant:vagrant /home/vagrant/go\n    cd /home/vagrant/go/src/github.com/mistifyio/go-zfs\n    go test -c\n    sudo ./go-zfs.test -test.v\n    CGO_ENABLED=0 go test -c\n    sudo ./go-zfs.test -test.v\n  EOF\nend\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/error.go",
    "content": "package zfs\n\nimport (\n\t\"fmt\"\n)\n\n// Error is an error which is returned when the `zfs` or `zpool` shell\n// commands return with a non-zero exit code.\ntype Error struct {\n\tErr    error\n\tDebug  string\n\tStderr string\n}\n\n// Error returns the string representation of an Error.\nfunc (e Error) Error() string {\n\treturn fmt.Sprintf(\"%s: %q => %s\", e.Err, e.Debug, e.Stderr)\n}\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/lint.mk",
    "content": "# BEGIN: lint-install -makefile lint.mk .\n# http://github.com/tinkerbell/lint-install\n\n.PHONY: lint\nlint: _lint\n\nLINT_ARCH := $(shell uname -m)\nLINT_OS := $(shell uname)\nLINT_OS_LOWER := $(shell echo $(LINT_OS) | tr '[:upper:]' '[:lower:]')\nLINT_ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))\n\n# shellcheck and hadolint lack arm64 native binaries: rely on x86-64 emulation\nifeq ($(LINT_OS),Darwin)\n\tifeq ($(LINT_ARCH),arm64)\n\t\tLINT_ARCH=x86_64\n\tendif\nendif\n\nLINTERS :=\nFIXERS :=\n\nSHELLCHECK_VERSION ?= v0.8.0\nSHELLCHECK_BIN := out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)\n$(SHELLCHECK_BIN):\n\tmkdir -p out/linters\n\trm -rf out/linters/shellcheck-*\n\tcurl -sSfL https://github.com/koalaman/shellcheck/releases/download/$(SHELLCHECK_VERSION)/shellcheck-$(SHELLCHECK_VERSION).$(LINT_OS_LOWER).$(LINT_ARCH).tar.xz | tar -C out/linters -xJf -\n\tmv out/linters/shellcheck-$(SHELLCHECK_VERSION)/shellcheck $@\n\trm -rf out/linters/shellcheck-$(SHELLCHECK_VERSION)/shellcheck\n\nLINTERS += shellcheck-lint\nshellcheck-lint: $(SHELLCHECK_BIN)\n\t$(SHELLCHECK_BIN) $(shell find . -name \"*.sh\")\n\nFIXERS += shellcheck-fix\nshellcheck-fix: $(SHELLCHECK_BIN)\n\t$(SHELLCHECK_BIN) $(shell find . -name \"*.sh\") -f diff | { read -t 1 line || exit 0; { echo \"$$line\" && cat; } | git apply -p2; }\n\nGOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml\nGOLANGCI_LINT_VERSION ?= v1.43.0\nGOLANGCI_LINT_BIN := out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH)\n$(GOLANGCI_LINT_BIN):\n\tmkdir -p out/linters\n\trm -rf out/linters/golangci-lint-*\n\tcurl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b out/linters $(GOLANGCI_LINT_VERSION)\n\tmv out/linters/golangci-lint $@\n\nLINTERS += golangci-lint-lint\ngolangci-lint-lint: $(GOLANGCI_LINT_BIN)\n\tfind . -name go.mod -execdir \"$(GOLANGCI_LINT_BIN)\" run -c \"$(GOLINT_CONFIG)\" \\;\n\nFIXERS += golangci-lint-fix\ngolangci-lint-fix: $(GOLANGCI_LINT_BIN)\n\tfind . -name go.mod -execdir \"$(GOLANGCI_LINT_BIN)\" run -c \"$(GOLINT_CONFIG)\" --fix \\;\n\nYAMLLINT_VERSION ?= 1.26.3\nYAMLLINT_ROOT := out/linters/yamllint-$(YAMLLINT_VERSION)\nYAMLLINT_BIN := $(YAMLLINT_ROOT)/dist/bin/yamllint\n$(YAMLLINT_BIN):\n\tmkdir -p out/linters\n\trm -rf out/linters/yamllint-*\n\tcurl -sSfL https://github.com/adrienverge/yamllint/archive/refs/tags/v$(YAMLLINT_VERSION).tar.gz | tar -C out/linters -zxf -\n\tcd $(YAMLLINT_ROOT) && pip3 install --target dist .\n\nLINTERS += yamllint-lint\nyamllint-lint: $(YAMLLINT_BIN)\n\tPYTHONPATH=$(YAMLLINT_ROOT)/dist $(YAMLLINT_ROOT)/dist/bin/yamllint .\n\n.PHONY: _lint $(LINTERS)\n_lint: $(LINTERS)\n\n.PHONY: fix $(FIXERS)\nfix: $(FIXERS)\n\n# END: lint-install -makefile lint.mk .\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/rules.mk",
    "content": "# Only use the recipes defined in these makefiles\nMAKEFLAGS += --no-builtin-rules\n.SUFFIXES:\n# Delete target files if there's an error\n# This avoids a failure to then skip building on next run if the output is created by shell redirection for example\n# Not really necessary for now, but just good to have already if it becomes necessary later.\n.DELETE_ON_ERROR:\n# Treat the whole recipe as a one shell script/invocation instead of one-per-line\n.ONESHELL:\n# Use bash instead of plain sh\nSHELL := bash\n.SHELLFLAGS := -o pipefail -euc\n\nversion := $(shell git rev-parse --short HEAD)\ntag := $(shell git tag --points-at HEAD)\nifneq (,$(tag))\nversion := $(tag)-$(version)\nendif\nLDFLAGS := -ldflags \"-X main.version=$(version)\"\nexport CGO_ENABLED := 0\n\nifeq ($(origin GOBIN), undefined)\nGOBIN := ${PWD}/bin\nexport GOBIN\nPATH := ${GOBIN}:${PATH}\nexport PATH\nendif\n\ntoolsBins := $(addprefix bin/,$(notdir $(shell grep '^\\s*_' tooling/tools.go | awk -F'\"' '{print $$2}')))\n\n# installs cli tools defined in tools.go\n$(toolsBins): tooling/go.mod tooling/go.sum tooling/tools.go\n$(toolsBins): CMD=$(shell awk -F'\"' '/$(@F)\"/ {print $$2}' tooling/tools.go)\n$(toolsBins):\n\tcd tooling && go install $(CMD)\n\n.PHONY: gofumpt\ngofumpt: bin/gofumpt\n\tgofumpt -s -d .\n\ngofumpt-fix: bin/gofumpt\n\tgofumpt -s -w .\n\n.PHONY: prettier prettier-fix\nprettier:\n\tprettier --list-different --ignore-path .gitignore .\n\nprettier-fix:\n\tprettier --write --ignore-path .gitignore .\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/shell.nix",
    "content": "let _pkgs = import <nixpkgs> { };\nin { pkgs ? import (_pkgs.fetchFromGitHub {\n  owner = \"NixOS\";\n  repo = \"nixpkgs\";\n  #branch@date: 21.11@2022-02-13\n  rev = \"560ad8a2f89586ab1a14290f128ad6a393046065\";\n  sha256 = \"0s0dv1clfpjyzy4p6ywxvzmwx9ddbr2yl77jf1wqdbr0x1206hb8\";\n}) { } }:\n\nwith pkgs;\n\nmkShell {\n  buildInputs = [\n    git\n    gnumake\n    gnused\n    go\n    nixfmt\n    nodePackages.prettier\n    python3Packages.pip\n    python3Packages.setuptools\n    rufo\n    shfmt\n    vagrant\n  ];\n}\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/utils.go",
    "content": "package zfs\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync/atomic\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n)\n\n// Runner specifies the parameters used when executing ZFS commands.\ntype Runner struct {\n\t// Timeout specifies how long to wait before sending a SIGTERM signal to the running process.\n\tTimeout time.Duration\n\n\t// Grace specifies the time waited after signaling the running process with SIGTERM before it is forcefully\n\t// killed with SIGKILL.\n\tGrace time.Duration\n}\n\nvar defaultRunner atomic.Value\n\nfunc init() {\n\tdefaultRunner.Store(&Runner{})\n}\n\nfunc Default() *Runner {\n\treturn defaultRunner.Load().(*Runner) //nolint: forcetypeassert // Impossible for it to be anything else.\n}\n\nfunc SetRunner(runner *Runner) {\n\tdefaultRunner.Store(runner)\n}\n\ntype command struct {\n\tCommand string\n\tStdin   io.Reader\n\tStdout  io.Writer\n}\n\nfunc (c *command) Run(arg ...string) ([][]string, error) {\n\tvar cmd *exec.Cmd\n\tif Default().Timeout == 0 {\n\t\tcmd = exec.Command(c.Command, arg...)\n\t} else {\n\t\tctx, cancel := context.WithTimeout(context.Background(), Default().Timeout)\n\t\tdefer cancel()\n\n\t\tcmd = exec.CommandContext(ctx, c.Command, arg...)\n\t\tcmd.Cancel = func() error {\n\t\t\treturn cmd.Process.Signal(syscall.SIGTERM)\n\t\t}\n\t\tcmd.WaitDelay = Default().Grace\n\t}\n\n\tvar stdout, stderr bytes.Buffer\n\n\tif c.Stdout == nil {\n\t\tcmd.Stdout = &stdout\n\t} else {\n\t\tcmd.Stdout = c.Stdout\n\t}\n\n\tif c.Stdin != nil {\n\t\tcmd.Stdin = c.Stdin\n\t}\n\tcmd.Stderr = &stderr\n\n\tid := uuid.New().String()\n\tjoinedArgs := cmd.Path\n\tif len(cmd.Args) > 1 {\n\t\tjoinedArgs = strings.Join(append([]string{cmd.Path}, cmd.Args[1:]...), \" \")\n\t}\n\n\tlogger.Log([]string{\"ID:\" + id, \"START\", joinedArgs})\n\tif err := cmd.Run(); err != nil {\n\t\treturn nil, &Error{\n\t\t\tErr:    err,\n\t\t\tDebug:  joinedArgs,\n\t\t\tStderr: stderr.String(),\n\t\t}\n\t}\n\tlogger.Log([]string{\"ID:\" + id, \"FINISH\"})\n\n\t// assume if you passed in something for stdout, that you know what to do with it\n\tif c.Stdout != nil {\n\t\treturn nil, nil\n\t}\n\n\tlines := strings.Split(stdout.String(), \"\\n\")\n\n\t// last line is always blank\n\tlines = lines[0 : len(lines)-1]\n\toutput := make([][]string, len(lines))\n\n\tfor i, l := range lines {\n\t\toutput[i] = strings.Split(l, \"\\t\")\n\t}\n\n\treturn output, nil\n}\n\nfunc setString(field *string, value string) {\n\tv := \"\"\n\tif value != \"-\" {\n\t\tv = value\n\t}\n\t*field = v\n}\n\nfunc setUint(field *uint64, value string) error {\n\tvar v uint64\n\tif value != \"-\" {\n\t\tvar err error\n\t\tv, err = strconv.ParseUint(value, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*field = v\n\treturn nil\n}\n\nfunc (d *Dataset) parseLine(line []string) error {\n\tvar err error\n\n\tif len(line) != len(dsPropList) {\n\t\treturn errors.New(\"output does not match what is expected on this platform\")\n\t}\n\tsetString(&d.Name, line[0])\n\tsetString(&d.Origin, line[1])\n\n\tif err = setUint(&d.Used, line[2]); err != nil {\n\t\treturn err\n\t}\n\tif err = setUint(&d.Avail, line[3]); err != nil {\n\t\treturn err\n\t}\n\n\tsetString(&d.Mountpoint, line[4])\n\tsetString(&d.Compression, line[5])\n\tsetString(&d.Type, line[6])\n\n\tif err = setUint(&d.Volsize, line[7]); err != nil {\n\t\treturn err\n\t}\n\tif err = setUint(&d.Quota, line[8]); err != nil {\n\t\treturn err\n\t}\n\tif err = setUint(&d.Referenced, line[9]); err != nil {\n\t\treturn err\n\t}\n\n\tif runtime.GOOS == \"solaris\" {\n\t\treturn nil\n\t}\n\n\tif err = setUint(&d.Written, line[10]); err != nil {\n\t\treturn err\n\t}\n\tif err = setUint(&d.Logicalused, line[11]); err != nil {\n\t\treturn err\n\t}\n\treturn setUint(&d.Usedbydataset, line[12])\n}\n\n/*\n * from zfs diff`s escape function:\n *\n * Prints a file name out a character at a time.  If the character is\n * not in the range of what we consider \"printable\" ASCII, display it\n * as an escaped 3-digit octal value.  ASCII values less than a space\n * are all control characters and we declare the upper end as the\n * DELete character.  This also is the last 7-bit ASCII character.\n * We choose to treat all 8-bit ASCII as not printable for this\n * application.\n */\nfunc unescapeFilepath(path string) (string, error) {\n\tbuf := make([]byte, 0, len(path))\n\tllen := len(path)\n\tfor i := 0; i < llen; {\n\t\tif path[i] == '\\\\' {\n\t\t\tif llen < i+4 {\n\t\t\t\treturn \"\", fmt.Errorf(\"invalid octal code: too short\")\n\t\t\t}\n\t\t\toctalCode := path[(i + 1):(i + 4)]\n\t\t\tval, err := strconv.ParseUint(octalCode, 8, 8)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"invalid octal code: %w\", err)\n\t\t\t}\n\t\t\tbuf = append(buf, byte(val))\n\t\t\ti += 4\n\t\t} else {\n\t\t\tbuf = append(buf, path[i])\n\t\t\ti++\n\t\t}\n\t}\n\treturn string(buf), nil\n}\n\nvar changeTypeMap = map[string]ChangeType{\n\t\"-\": Removed,\n\t\"+\": Created,\n\t\"M\": Modified,\n\t\"R\": Renamed,\n}\n\nvar inodeTypeMap = map[string]InodeType{\n\t\"B\": BlockDevice,\n\t\"C\": CharacterDevice,\n\t\"/\": Directory,\n\t\">\": Door,\n\t\"|\": NamedPipe,\n\t\"@\": SymbolicLink,\n\t\"P\": EventPort,\n\t\"=\": Socket,\n\t\"F\": File,\n}\n\n// matches (+1) or (-1).\nvar referenceCountRegex = regexp.MustCompile(`\\(([+-]\\d+?)\\)`)\n\nfunc parseReferenceCount(field string) (int, error) {\n\tmatches := referenceCountRegex.FindStringSubmatch(field)\n\tif matches == nil {\n\t\treturn 0, fmt.Errorf(\"regexp does not match\")\n\t}\n\treturn strconv.Atoi(matches[1])\n}\n\nfunc parseInodeChange(line []string) (*InodeChange, error) {\n\tllen := len(line) // nolint:ifshort // llen *is* actually used\n\tif llen < 1 {\n\t\treturn nil, fmt.Errorf(\"empty line passed\")\n\t}\n\n\tchangeType := changeTypeMap[line[0]]\n\tif changeType == 0 {\n\t\treturn nil, fmt.Errorf(\"unknown change type '%s'\", line[0])\n\t}\n\n\tswitch changeType {\n\tcase Renamed:\n\t\tif llen != 4 {\n\t\t\treturn nil, fmt.Errorf(\"mismatching number of fields: expect 4, got: %d\", llen)\n\t\t}\n\tcase Modified:\n\t\tif llen != 4 && llen != 3 {\n\t\t\treturn nil, fmt.Errorf(\"mismatching number of fields: expect 3..4, got: %d\", llen)\n\t\t}\n\tdefault:\n\t\tif llen != 3 {\n\t\t\treturn nil, fmt.Errorf(\"mismatching number of fields: expect 3, got: %d\", llen)\n\t\t}\n\t}\n\n\tinodeType := inodeTypeMap[line[1]]\n\tif inodeType == 0 {\n\t\treturn nil, fmt.Errorf(\"unknown inode type '%s'\", line[1])\n\t}\n\n\tpath, err := unescapeFilepath(line[2])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse filename: %w\", err)\n\t}\n\n\tvar newPath string\n\tvar referenceCount int\n\tswitch changeType {\n\tcase Renamed:\n\t\tnewPath, err = unescapeFilepath(line[3])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse filename: %w\", err)\n\t\t}\n\tcase Modified:\n\t\tif llen == 4 {\n\t\t\treferenceCount, err = parseReferenceCount(line[3])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to parse reference count: %w\", err)\n\t\t\t}\n\t\t}\n\tdefault:\n\t\tnewPath = \"\"\n\t}\n\n\treturn &InodeChange{\n\t\tChange:               changeType,\n\t\tType:                 inodeType,\n\t\tPath:                 path,\n\t\tNewPath:              newPath,\n\t\tReferenceCountChange: referenceCount,\n\t}, nil\n}\n\n// example input for parseInodeChanges\n// M       /       /testpool/bar/\n// +       F       /testpool/bar/hello.txt\n// M       /       /testpool/bar/hello.txt (+1)\n// M       /       /testpool/bar/hello-hardlink\n\nfunc parseInodeChanges(lines [][]string) ([]*InodeChange, error) {\n\tchanges := make([]*InodeChange, len(lines))\n\n\tfor i, line := range lines {\n\t\tc, err := parseInodeChange(line)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse line %d of zfs diff: %w, got: '%s'\", i, err, line)\n\t\t}\n\t\tchanges[i] = c\n\t}\n\treturn changes, nil\n}\n\nfunc listByType(t, filter string) ([]*Dataset, error) {\n\targs := []string{\"list\", \"-rHp\", \"-t\", t, \"-o\", dsPropListOptions}\n\n\tif filter != \"\" {\n\t\targs = append(args, filter)\n\t}\n\tout, err := zfsOutput(args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar datasets []*Dataset\n\n\tname := \"\"\n\tvar ds *Dataset\n\tfor _, line := range out {\n\t\tif name != line[0] {\n\t\t\tname = line[0]\n\t\t\tds = &Dataset{Name: name}\n\t\t\tdatasets = append(datasets, ds)\n\t\t}\n\t\tif err := ds.parseLine(line); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn datasets, nil\n}\n\nfunc propsSlice(properties map[string]string) []string {\n\targs := make([]string, 0, len(properties)*3)\n\tfor k, v := range properties {\n\t\targs = append(args, \"-o\")\n\t\targs = append(args, fmt.Sprintf(\"%s=%s\", k, v))\n\t}\n\treturn args\n}\n\nfunc (z *Zpool) parseLine(line []string) error {\n\tprop := line[1]\n\tval := line[2]\n\n\tvar err error\n\n\tswitch prop {\n\tcase \"name\":\n\t\tsetString(&z.Name, val)\n\tcase \"health\":\n\t\tsetString(&z.Health, val)\n\tcase \"allocated\":\n\t\terr = setUint(&z.Allocated, val)\n\tcase \"size\":\n\t\terr = setUint(&z.Size, val)\n\tcase \"free\":\n\t\terr = setUint(&z.Free, val)\n\tcase \"fragmentation\":\n\t\t// Trim trailing \"%\" before parsing uint\n\t\ti := strings.Index(val, \"%\")\n\t\tif i < 0 {\n\t\t\ti = len(val)\n\t\t}\n\t\terr = setUint(&z.Fragmentation, val[:i])\n\tcase \"readonly\":\n\t\tz.ReadOnly = val == \"on\"\n\tcase \"freeing\":\n\t\terr = setUint(&z.Freeing, val)\n\tcase \"leaked\":\n\t\terr = setUint(&z.Leaked, val)\n\tcase \"dedupratio\":\n\t\t// Trim trailing \"x\" before parsing float64\n\t\tz.DedupRatio, err = strconv.ParseFloat(val[:len(val)-1], 64)\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/utils_notsolaris.go",
    "content": "//go:build !solaris\n// +build !solaris\n\npackage zfs\n\nimport \"strings\"\n\nvar (\n\t// List of ZFS properties to retrieve from zfs list command on a non-Solaris platform.\n\tdsPropList = []string{\"name\", \"origin\", \"used\", \"available\", \"mountpoint\", \"compression\", \"type\", \"volsize\", \"quota\", \"referenced\", \"written\", \"logicalused\", \"usedbydataset\"}\n\n\tdsPropListOptions = strings.Join(dsPropList, \",\")\n\n\t// List of Zpool properties to retrieve from zpool list command on a non-Solaris platform.\n\tzpoolPropList = []string{\"name\", \"health\", \"allocated\", \"size\", \"free\", \"readonly\", \"dedupratio\", \"fragmentation\", \"freeing\", \"leaked\"}\n\n\tzpoolPropListOptions = strings.Join(zpoolPropList, \",\")\n\tzpoolArgs            = []string{\"get\", \"-Hp\", zpoolPropListOptions}\n)\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/utils_solaris.go",
    "content": "//go:build solaris\n// +build solaris\n\npackage zfs\n\nimport \"strings\"\n\nvar (\n\t// List of ZFS properties to retrieve from zfs list command on a Solaris platform\n\tdsPropList = []string{\"name\", \"origin\", \"used\", \"available\", \"mountpoint\", \"compression\", \"type\", \"volsize\", \"quota\", \"referenced\"}\n\n\tdsPropListOptions = strings.Join(dsPropList, \",\")\n\n\t// List of Zpool properties to retrieve from zpool list command on a non-Solaris platform\n\tzpoolPropList = []string{\"name\", \"health\", \"allocated\", \"size\", \"free\", \"readonly\", \"dedupratio\"}\n\n\tzpoolPropListOptions = strings.Join(zpoolPropList, \",\")\n\tzpoolArgs            = []string{\"get\", \"-Hp\", zpoolPropListOptions}\n)\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/zfs.go",
    "content": "// Package zfs provides wrappers around the ZFS command line tools.\npackage zfs\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// ZFS dataset types, which can indicate if a dataset is a filesystem, snapshot, or volume.\nconst (\n\tDatasetFilesystem = \"filesystem\"\n\tDatasetSnapshot   = \"snapshot\"\n\tDatasetVolume     = \"volume\"\n)\n\n// Dataset is a ZFS dataset.  A dataset could be a clone, filesystem, snapshot, or volume.\n// The Type struct member can be used to determine a dataset's type.\n//\n// The field definitions can be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\ntype Dataset struct {\n\tName          string\n\tOrigin        string\n\tUsed          uint64\n\tAvail         uint64\n\tMountpoint    string\n\tCompression   string\n\tType          string\n\tWritten       uint64\n\tVolsize       uint64\n\tLogicalused   uint64\n\tUsedbydataset uint64\n\tQuota         uint64\n\tReferenced    uint64\n}\n\n// InodeType is the type of inode as reported by Diff.\ntype InodeType int\n\n// Types of Inodes.\nconst (\n\t_                     = iota // 0 == unknown type\n\tBlockDevice InodeType = iota\n\tCharacterDevice\n\tDirectory\n\tDoor\n\tNamedPipe\n\tSymbolicLink\n\tEventPort\n\tSocket\n\tFile\n)\n\n// ChangeType is the type of inode change as reported by Diff.\ntype ChangeType int\n\n// Types of Changes.\nconst (\n\t_                  = iota // 0 == unknown type\n\tRemoved ChangeType = iota\n\tCreated\n\tModified\n\tRenamed\n)\n\n// DestroyFlag is the options flag passed to Destroy.\ntype DestroyFlag int\n\n// Valid destroy options.\nconst (\n\tDestroyDefault         DestroyFlag = 1 << iota\n\tDestroyRecursive                   = 1 << iota\n\tDestroyRecursiveClones             = 1 << iota\n\tDestroyDeferDeletion               = 1 << iota\n\tDestroyForceUmount                 = 1 << iota\n)\n\n// InodeChange represents a change as reported by Diff.\ntype InodeChange struct {\n\tChange               ChangeType\n\tType                 InodeType\n\tPath                 string\n\tNewPath              string\n\tReferenceCountChange int\n}\n\n// Logger can be used to log commands/actions.\ntype Logger interface {\n\tLog(cmd []string)\n}\n\ntype defaultLogger struct{}\n\nfunc (*defaultLogger) Log([]string) {\n}\n\nvar logger Logger = &defaultLogger{}\n\n// SetLogger set a log handler to log all commands including arguments before they are executed.\nfunc SetLogger(l Logger) {\n\tif l != nil {\n\t\tlogger = l\n\t}\n}\n\n// zfs is a helper function to wrap typical calls to zfs that ignores stdout.\nfunc zfs(arg ...string) error {\n\t_, err := zfsOutput(arg...)\n\treturn err\n}\n\n// zfs is a helper function to wrap typical calls to zfs.\nfunc zfsOutput(arg ...string) ([][]string, error) {\n\tc := command{Command: \"zfs\"}\n\treturn c.Run(arg...)\n}\n\n// Datasets returns a slice of ZFS datasets, regardless of type.\n// A filter argument may be passed to select a dataset with the matching name, or empty string (\"\") may be used to select all datasets.\nfunc Datasets(filter string) ([]*Dataset, error) {\n\treturn listByType(\"all\", filter)\n}\n\n// Snapshots returns a slice of ZFS snapshots.\n// A filter argument may be passed to select a snapshot with the matching name, or empty string (\"\") may be used to select all snapshots.\nfunc Snapshots(filter string) ([]*Dataset, error) {\n\treturn listByType(DatasetSnapshot, filter)\n}\n\n// Filesystems returns a slice of ZFS filesystems.\n// A filter argument may be passed to select a filesystem with the matching name, or empty string (\"\") may be used to select all filesystems.\nfunc Filesystems(filter string) ([]*Dataset, error) {\n\treturn listByType(DatasetFilesystem, filter)\n}\n\n// Volumes returns a slice of ZFS volumes.\n// A filter argument may be passed to select a volume with the matching name, or empty string (\"\") may be used to select all volumes.\nfunc Volumes(filter string) ([]*Dataset, error) {\n\treturn listByType(DatasetVolume, filter)\n}\n\n// GetDataset retrieves a single ZFS dataset by name.\n// This dataset could be any valid ZFS dataset type, such as a clone, filesystem, snapshot, or volume.\nfunc GetDataset(name string) (*Dataset, error) {\n\tout, err := zfsOutput(\"list\", \"-Hp\", \"-o\", dsPropListOptions, name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tds := &Dataset{Name: name}\n\tfor _, line := range out {\n\t\tif err := ds.parseLine(line); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn ds, nil\n}\n\n// Clone clones a ZFS snapshot and returns a clone dataset.\n// An error will be returned if the input dataset is not of snapshot type.\nfunc (d *Dataset) Clone(dest string, properties map[string]string) (*Dataset, error) {\n\tif d.Type != DatasetSnapshot {\n\t\treturn nil, errors.New(\"can only clone snapshots\")\n\t}\n\targs := make([]string, 2, 4)\n\targs[0] = \"clone\"\n\targs[1] = \"-p\"\n\tif properties != nil {\n\t\targs = append(args, propsSlice(properties)...)\n\t}\n\targs = append(args, []string{d.Name, dest}...)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(dest)\n}\n\n// Unmount unmounts currently mounted ZFS file systems.\nfunc (d *Dataset) Unmount(force bool) (*Dataset, error) {\n\tif d.Type == DatasetSnapshot {\n\t\treturn nil, errors.New(\"cannot unmount snapshots\")\n\t}\n\targs := make([]string, 1, 3)\n\targs[0] = \"umount\"\n\tif force {\n\t\targs = append(args, \"-f\")\n\t}\n\targs = append(args, d.Name)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(d.Name)\n}\n\n// Mount mounts ZFS file systems.\nfunc (d *Dataset) Mount(overlay bool, options []string) (*Dataset, error) {\n\tif d.Type == DatasetSnapshot {\n\t\treturn nil, errors.New(\"cannot mount snapshots\")\n\t}\n\targs := make([]string, 1, 5)\n\targs[0] = \"mount\"\n\tif overlay {\n\t\targs = append(args, \"-O\")\n\t}\n\tif options != nil {\n\t\targs = append(args, \"-o\")\n\t\targs = append(args, strings.Join(options, \",\"))\n\t}\n\targs = append(args, d.Name)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(d.Name)\n}\n\n// ReceiveSnapshot receives a ZFS stream from the input io.Reader.\n// A new snapshot is created with the specified name, and streams the input data into the newly-created snapshot.\nfunc ReceiveSnapshot(input io.Reader, name string) (*Dataset, error) {\n\tc := command{Command: \"zfs\", Stdin: input}\n\tif _, err := c.Run(\"receive\", name); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(name)\n}\n\n// SendSnapshot sends a ZFS stream of a snapshot to the input io.Writer.\n// An error will be returned if the input dataset is not of snapshot type.\nfunc (d *Dataset) SendSnapshot(output io.Writer) error {\n\tif d.Type != DatasetSnapshot {\n\t\treturn errors.New(\"can only send snapshots\")\n\t}\n\n\tc := command{Command: \"zfs\", Stdout: output}\n\t_, err := c.Run(\"send\", d.Name)\n\treturn err\n}\n\n// IncrementalSend sends a ZFS stream of a snapshot to the input io.Writer using the baseSnapshot as the starting point.\n// An error will be returned if the input dataset is not of snapshot type.\nfunc (d *Dataset) IncrementalSend(baseSnapshot *Dataset, output io.Writer) error {\n\tif d.Type != DatasetSnapshot || baseSnapshot.Type != DatasetSnapshot {\n\t\treturn errors.New(\"can only send snapshots\")\n\t}\n\tc := command{Command: \"zfs\", Stdout: output}\n\t_, err := c.Run(\"send\", \"-i\", baseSnapshot.Name, d.Name)\n\treturn err\n}\n\n// CreateVolume creates a new ZFS volume with the specified name, size, and properties.\n//\n// A full list of available ZFS properties may be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\nfunc CreateVolume(name string, size uint64, properties map[string]string) (*Dataset, error) {\n\targs := make([]string, 4, 5)\n\targs[0] = \"create\"\n\targs[1] = \"-p\"\n\targs[2] = \"-V\"\n\targs[3] = strconv.FormatUint(size, 10)\n\tif properties != nil {\n\t\targs = append(args, propsSlice(properties)...)\n\t}\n\targs = append(args, name)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(name)\n}\n\n// Destroy destroys a ZFS dataset.\n// If the destroy bit flag is set, any descendents of the dataset will be recursively destroyed, including snapshots.\n// If the deferred bit flag is set, the snapshot is marked for deferred deletion.\nfunc (d *Dataset) Destroy(flags DestroyFlag) error {\n\targs := make([]string, 1, 3)\n\targs[0] = \"destroy\"\n\tif flags&DestroyRecursive != 0 {\n\t\targs = append(args, \"-r\")\n\t}\n\n\tif flags&DestroyRecursiveClones != 0 {\n\t\targs = append(args, \"-R\")\n\t}\n\n\tif flags&DestroyDeferDeletion != 0 {\n\t\targs = append(args, \"-d\")\n\t}\n\n\tif flags&DestroyForceUmount != 0 {\n\t\targs = append(args, \"-f\")\n\t}\n\n\targs = append(args, d.Name)\n\terr := zfs(args...)\n\treturn err\n}\n\n// SetProperty sets a ZFS property on the receiving dataset.\n//\n// A full list of available ZFS properties may be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\nfunc (d *Dataset) SetProperty(key, val string) error {\n\tprop := strings.Join([]string{key, val}, \"=\")\n\terr := zfs(\"set\", prop, d.Name)\n\treturn err\n}\n\n// GetProperty returns the current value of a ZFS property from the receiving dataset.\n//\n// A full list of available ZFS properties may be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\nfunc (d *Dataset) GetProperty(key string) (string, error) {\n\tout, err := zfsOutput(\"get\", \"-Hp\", key, d.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn out[0][2], nil\n}\n\n// Rename renames a dataset.\nfunc (d *Dataset) Rename(name string, createParent, recursiveRenameSnapshots bool) (*Dataset, error) {\n\targs := make([]string, 3, 5)\n\targs[0] = \"rename\"\n\targs[1] = d.Name\n\targs[2] = name\n\tif createParent {\n\t\targs = append(args, \"-p\")\n\t}\n\tif recursiveRenameSnapshots {\n\t\targs = append(args, \"-r\")\n\t}\n\tif err := zfs(args...); err != nil {\n\t\treturn d, err\n\t}\n\n\treturn GetDataset(name)\n}\n\n// Snapshots returns a slice of all ZFS snapshots of a given dataset.\nfunc (d *Dataset) Snapshots() ([]*Dataset, error) {\n\treturn Snapshots(d.Name)\n}\n\n// CreateFilesystem creates a new ZFS filesystem with the specified name and properties.\n//\n// A full list of available ZFS properties may be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\nfunc CreateFilesystem(name string, properties map[string]string) (*Dataset, error) {\n\targs := make([]string, 1, 4)\n\targs[0] = \"create\"\n\n\tif properties != nil {\n\t\targs = append(args, propsSlice(properties)...)\n\t}\n\n\targs = append(args, name)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(name)\n}\n\n// Snapshot creates a new ZFS snapshot of the receiving dataset, using the specified name.\n// Optionally, the snapshot can be taken recursively, creating snapshots of all descendent filesystems in a single, atomic operation.\nfunc (d *Dataset) Snapshot(name string, recursive bool) (*Dataset, error) {\n\targs := make([]string, 1, 4)\n\targs[0] = \"snapshot\"\n\tif recursive {\n\t\targs = append(args, \"-r\")\n\t}\n\tsnapName := fmt.Sprintf(\"%s@%s\", d.Name, name)\n\targs = append(args, snapName)\n\tif err := zfs(args...); err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetDataset(snapName)\n}\n\n// Rollback rolls back the receiving ZFS dataset to a previous snapshot.\n// Optionally, intermediate snapshots can be destroyed.\n// A ZFS snapshot rollback cannot be completed without this option, if more recent snapshots exist.\n// An error will be returned if the input dataset is not of snapshot type.\nfunc (d *Dataset) Rollback(destroyMoreRecent bool) error {\n\tif d.Type != DatasetSnapshot {\n\t\treturn errors.New(\"can only rollback snapshots\")\n\t}\n\n\targs := make([]string, 1, 3)\n\targs[0] = \"rollback\"\n\tif destroyMoreRecent {\n\t\targs = append(args, \"-r\")\n\t}\n\targs = append(args, d.Name)\n\n\terr := zfs(args...)\n\treturn err\n}\n\n// Children returns a slice of children of the receiving ZFS dataset.\n// A recursion depth may be specified, or a depth of 0 allows unlimited recursion.\nfunc (d *Dataset) Children(depth uint64) ([]*Dataset, error) {\n\targs := []string{\"list\"}\n\tif depth > 0 {\n\t\targs = append(args, \"-d\")\n\t\targs = append(args, strconv.FormatUint(depth, 10))\n\t} else {\n\t\targs = append(args, \"-r\")\n\t}\n\targs = append(args, \"-t\", \"all\", \"-Hp\", \"-o\", dsPropListOptions)\n\targs = append(args, d.Name)\n\n\tout, err := zfsOutput(args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar datasets []*Dataset\n\tname := \"\"\n\tvar ds *Dataset\n\tfor _, line := range out {\n\t\tif name != line[0] {\n\t\t\tname = line[0]\n\t\t\tds = &Dataset{Name: name}\n\t\t\tdatasets = append(datasets, ds)\n\t\t}\n\t\tif err := ds.parseLine(line); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn datasets[1:], nil\n}\n\n// Diff returns changes between a snapshot and the given ZFS dataset.\n// The snapshot name must include the filesystem part as it is possible to compare clones with their origin snapshots.\nfunc (d *Dataset) Diff(snapshot string) ([]*InodeChange, error) {\n\targs := []string{\"diff\", \"-FH\", snapshot, d.Name}\n\tout, err := zfsOutput(args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tinodeChanges, err := parseInodeChanges(out)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn inodeChanges, nil\n}\n"
  },
  {
    "path": "vendor/github.com/mistifyio/go-zfs/v4/zpool.go",
    "content": "package zfs\n\n// ZFS zpool states, which can indicate if a pool is online, offline, degraded, etc.\n//\n// More information regarding zpool states can be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zpoolconcepts.7.html#Device_Failure_and_Recovery\nconst (\n\tZpoolOnline   = \"ONLINE\"\n\tZpoolDegraded = \"DEGRADED\"\n\tZpoolFaulted  = \"FAULTED\"\n\tZpoolOffline  = \"OFFLINE\"\n\tZpoolUnavail  = \"UNAVAIL\"\n\tZpoolRemoved  = \"REMOVED\"\n)\n\n// Zpool is a ZFS zpool.\n// A pool is a top-level structure in ZFS, and can contain many descendent datasets.\ntype Zpool struct {\n\tName          string\n\tHealth        string\n\tAllocated     uint64\n\tSize          uint64\n\tFree          uint64\n\tFragmentation uint64\n\tReadOnly      bool\n\tFreeing       uint64\n\tLeaked        uint64\n\tDedupRatio    float64\n}\n\n// zpool is a helper function to wrap typical calls to zpool and ignores stdout.\nfunc zpool(arg ...string) error {\n\t_, err := zpoolOutput(arg...)\n\treturn err\n}\n\n// zpool is a helper function to wrap typical calls to zpool.\nfunc zpoolOutput(arg ...string) ([][]string, error) {\n\tc := command{Command: \"zpool\"}\n\treturn c.Run(arg...)\n}\n\n// GetZpool retrieves a single ZFS zpool by name.\nfunc GetZpool(name string) (*Zpool, error) {\n\targs := zpoolArgs\n\targs = append(args, name)\n\tout, err := zpoolOutput(args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tz := &Zpool{Name: name}\n\tfor _, line := range out {\n\t\tif err := z.parseLine(line); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn z, nil\n}\n\n// Datasets returns a slice of all ZFS datasets in a zpool.\nfunc (z *Zpool) Datasets() ([]*Dataset, error) {\n\treturn Datasets(z.Name)\n}\n\n// Snapshots returns a slice of all ZFS snapshots in a zpool.\nfunc (z *Zpool) Snapshots() ([]*Dataset, error) {\n\treturn Snapshots(z.Name)\n}\n\n// CreateZpool creates a new ZFS zpool with the specified name, properties, and optional arguments.\n//\n// A full list of available ZFS properties and command-line arguments may be found in the ZFS manual:\n// https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html.\n// https://openzfs.github.io/openzfs-docs/man/8/zpool-create.8.html\nfunc CreateZpool(name string, properties map[string]string, args ...string) (*Zpool, error) {\n\tcli := make([]string, 1, 4)\n\tcli[0] = \"create\"\n\tif properties != nil {\n\t\tcli = append(cli, propsSlice(properties)...)\n\t}\n\tcli = append(cli, name)\n\tcli = append(cli, args...)\n\tif err := zpool(cli...); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Zpool{Name: name}, nil\n}\n\n// Destroy destroys a ZFS zpool by name.\nfunc (z *Zpool) Destroy() error {\n\terr := zpool(\"destroy\", z.Name)\n\treturn err\n}\n\n// ListZpools list all ZFS zpools accessible on the current system.\nfunc ListZpools() ([]*Zpool, error) {\n\targs := []string{\"list\", \"-Ho\", \"name\"}\n\tout, err := zpoolOutput(args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar pools []*Zpool\n\n\tfor _, line := range out {\n\t\tz, err := GetZpool(line[0])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpools = append(pools, z)\n\t}\n\treturn pools, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/docker-image-spec/LICENSE",
    "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": "vendor/github.com/moby/docker-image-spec/specs-go/v1/image.go",
    "content": "package v1\n\nimport (\n\t\"time\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\nconst DockerOCIImageMediaType = \"application/vnd.docker.container.image.v1+json\"\n\n// DockerOCIImage is a ocispec.Image extended with Docker specific Config.\ntype DockerOCIImage struct {\n\tocispec.Image\n\n\t// Shadow ocispec.Image.Config\n\tConfig DockerOCIImageConfig `json:\"config,omitempty\"`\n}\n\n// DockerOCIImageConfig is a ocispec.ImageConfig extended with Docker specific fields.\ntype DockerOCIImageConfig struct {\n\tocispec.ImageConfig\n\n\tDockerOCIImageConfigExt\n}\n\n// DockerOCIImageConfigExt contains Docker-specific fields in DockerImageConfig.\ntype DockerOCIImageConfigExt struct {\n\tHealthcheck *HealthcheckConfig `json:\",omitempty\"` // Healthcheck describes how to check the container is healthy\n\n\tOnBuild []string `json:\",omitempty\"` // ONBUILD metadata that were defined on the image Dockerfile\n\tShell   []string `json:\",omitempty\"` // Shell for shell-form of RUN, CMD, ENTRYPOINT\n}\n\n// HealthcheckConfig holds configuration settings for the HEALTHCHECK feature.\ntype HealthcheckConfig struct {\n\t// Test is the test to perform to check that the container is healthy.\n\t// An empty slice means to inherit the default.\n\t// The options are:\n\t// {} : inherit healthcheck\n\t// {\"NONE\"} : disable healthcheck\n\t// {\"CMD\", args...} : exec arguments directly\n\t// {\"CMD-SHELL\", command} : run command with system's default shell\n\tTest []string `json:\",omitempty\"`\n\n\t// Zero means to inherit. Durations are expressed as integer nanoseconds.\n\tInterval      time.Duration `json:\",omitempty\"` // Interval is the time to wait between checks.\n\tTimeout       time.Duration `json:\",omitempty\"` // Timeout is the time to wait before considering the check to have hung.\n\tStartPeriod   time.Duration `json:\",omitempty\"` // The start period for the container to initialize before the retries starts to count down.\n\tStartInterval time.Duration `json:\",omitempty\"` // The interval to attempt healthchecks at during the start period\n\n\t// Retries is the number of consecutive failures needed to consider a container as unhealthy.\n\t// Zero means inherit.\n\tRetries int `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/LICENSE",
    "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 [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": "vendor/github.com/moby/moby/api/types/blkiodev/blkio.go",
    "content": "package blkiodev\n\nimport \"fmt\"\n\n// WeightDevice is a structure that holds device:weight pair\ntype WeightDevice struct {\n\tPath   string\n\tWeight uint16\n}\n\nfunc (w *WeightDevice) String() string {\n\treturn fmt.Sprintf(\"%s:%d\", w.Path, w.Weight)\n}\n\n// ThrottleDevice is a structure that holds device:rate_per_second pair\ntype ThrottleDevice struct {\n\tPath string\n\tRate uint64\n}\n\nfunc (t *ThrottleDevice) String() string {\n\treturn fmt.Sprintf(\"%s:%d\", t.Path, t.Rate)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/build/build.go",
    "content": "package build\n\n// BuilderVersion sets the version of underlying builder to use\ntype BuilderVersion string\n\nconst (\n\t// BuilderV1 is the first generation builder in docker daemon\n\tBuilderV1 BuilderVersion = \"1\"\n\t// BuilderBuildKit is builder based on moby/buildkit project\n\tBuilderBuildKit BuilderVersion = \"2\"\n)\n\n// Result contains the image id of a successful build.\ntype Result struct {\n\tID string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/build/cache.go",
    "content": "package build\n\nimport (\n\t\"time\"\n)\n\n// CacheRecord contains information about a build cache record.\ntype CacheRecord struct {\n\t// ID is the unique ID of the build cache record.\n\tID string\n\t// Parents is the list of parent build cache record IDs.\n\tParents []string `json:\" Parents,omitempty\"`\n\t// Type is the cache record type.\n\tType string\n\t// Description is a description of the build-step that produced the build cache.\n\tDescription string\n\t// InUse indicates if the build cache is in use.\n\tInUse bool\n\t// Shared indicates if the build cache is shared.\n\tShared bool\n\t// Size is the amount of disk space used by the build cache (in bytes).\n\tSize int64\n\t// CreatedAt is the date and time at which the build cache was created.\n\tCreatedAt time.Time\n\t// LastUsedAt is the date and time at which the build cache was last used.\n\tLastUsedAt *time.Time\n\tUsageCount int\n}\n\n// CachePruneReport contains the response for Engine API:\n// POST \"/build/prune\"\ntype CachePruneReport struct {\n\tCachesDeleted  []string\n\tSpaceReclaimed uint64\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/build/disk_usage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage build\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DiskUsage represents system data usage for build cache resources.\n//\n// swagger:model DiskUsage\ntype DiskUsage struct {\n\n\t// Count of active build cache records.\n\t//\n\t// Example: 1\n\tActiveCount int64 `json:\"ActiveCount,omitempty\"`\n\n\t// List of build cache records.\n\t//\n\tItems []CacheRecord `json:\"Items,omitempty\"`\n\n\t// Disk space that can be reclaimed by removing inactive build cache records.\n\t//\n\t// Example: 12345678\n\tReclaimable int64 `json:\"Reclaimable,omitempty\"`\n\n\t// Count of all build cache records.\n\t//\n\t// Example: 4\n\tTotalCount int64 `json:\"TotalCount,omitempty\"`\n\n\t// Disk space in use by build cache records.\n\t//\n\t// Example: 98765432\n\tTotalSize int64 `json:\"TotalSize,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/checkpoint/create_request.go",
    "content": "package checkpoint\n\n// CreateRequest holds parameters to create a checkpoint from a container.\ntype CreateRequest struct {\n\tCheckpointID  string\n\tCheckpointDir string\n\tExit          bool\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/checkpoint/list.go",
    "content": "package checkpoint\n\n// Summary represents the details of a checkpoint when listing endpoints.\ntype Summary struct {\n\t// Name is the name of the checkpoint.\n\tName string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/common/error_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage common\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ErrorResponse Represents an error.\n// Example: {\"message\":\"Something went wrong.\"}\n//\n// swagger:model ErrorResponse\ntype ErrorResponse struct {\n\n\t// The error message.\n\t// Required: true\n\tMessage string `json:\"message\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/common/error_response_ext.go",
    "content": "package common\n\n// Error returns the error message\nfunc (e ErrorResponse) Error() string {\n\treturn e.Message\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/common/id_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage common\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// IDResponse Response to an API call that returns just an Id\n//\n// swagger:model IDResponse\ntype IDResponse struct {\n\n\t// The id of the newly created object.\n\t// Required: true\n\tID string `json:\"Id\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/change_type.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ChangeType Kind of change\n//\n// Can be one of:\n//\n// - `0`: Modified (\"C\")\n// - `1`: Added (\"A\")\n// - `2`: Deleted (\"D\")\n//\n// swagger:model ChangeType\ntype ChangeType uint8\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/change_types.go",
    "content": "package container\n\nconst (\n\t// ChangeModify represents the modify operation.\n\tChangeModify ChangeType = 0\n\t// ChangeAdd represents the add operation.\n\tChangeAdd ChangeType = 1\n\t// ChangeDelete represents the delete operation.\n\tChangeDelete ChangeType = 2\n)\n\nfunc (ct ChangeType) String() string {\n\tswitch ct {\n\tcase ChangeModify:\n\t\treturn \"C\"\n\tcase ChangeAdd:\n\t\treturn \"A\"\n\tcase ChangeDelete:\n\t\treturn \"D\"\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/commit.go",
    "content": "package container\n\nimport \"github.com/moby/moby/api/types/common\"\n\n// CommitResponse response for the commit API call, containing the ID of the\n// image that was produced.\ntype CommitResponse = common.IDResponse\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/config.go",
    "content": "package container\n\nimport (\n\t\"time\"\n\n\tdockerspec \"github.com/moby/docker-image-spec/specs-go/v1\"\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// MinimumDuration puts a minimum on user configured duration.\n// This is to prevent API error on time unit. For example, API may\n// set 3 as healthcheck interval with intention of 3 seconds, but\n// Docker interprets it as 3 nanoseconds.\nconst MinimumDuration = 1 * time.Millisecond\n\n// HealthConfig holds configuration settings for the HEALTHCHECK feature.\ntype HealthConfig = dockerspec.HealthcheckConfig\n\n// Config contains the configuration data about a container.\n// It should hold only portable information about the container.\n// Here, \"portable\" means \"independent from the host we are running on\".\n// Non-portable information *should* appear in HostConfig.\n// All fields added to this struct must be marked `omitempty` to keep getting\n// predictable hashes from the old `v1Compatibility` configuration.\ntype Config struct {\n\tHostname        string              // Hostname\n\tDomainname      string              // Domainname\n\tUser            string              // User that will run the command(s) inside the container, also support user:group\n\tAttachStdin     bool                // Attach the standard input, makes possible user interaction\n\tAttachStdout    bool                // Attach the standard output\n\tAttachStderr    bool                // Attach the standard error\n\tExposedPorts    network.PortSet     `json:\",omitempty\"` // List of exposed ports\n\tTty             bool                // Attach standard streams to a tty, including stdin if it is not closed.\n\tOpenStdin       bool                // Open stdin\n\tStdinOnce       bool                // If true, close stdin after the 1 attached client disconnects.\n\tEnv             []string            // List of environment variable to set in the container\n\tCmd             []string            // Command to run when starting the container\n\tHealthcheck     *HealthConfig       `json:\",omitempty\"` // Healthcheck describes how to check the container is healthy\n\tArgsEscaped     bool                `json:\",omitempty\"` // True if command is already escaped (meaning treat as a command line) (Windows specific).\n\tImage           string              // Name of the image as it was passed by the operator (e.g. could be symbolic)\n\tVolumes         map[string]struct{} // List of volumes (mounts) used for the container\n\tWorkingDir      string              // Current directory (PWD) in the command will be launched\n\tEntrypoint      []string            // Entrypoint to run when starting the container\n\tNetworkDisabled bool                `json:\",omitempty\"` // Is network disabled\n\tOnBuild         []string            `json:\",omitempty\"` // ONBUILD metadata that were defined on the image Dockerfile\n\tLabels          map[string]string   // List of labels set to this container\n\tStopSignal      string              `json:\",omitempty\"` // Signal to stop a container\n\tStopTimeout     *int                `json:\",omitempty\"` // Timeout (in seconds) to stop a container\n\tShell           []string            `json:\",omitempty\"` // Shell for shell-form of RUN, CMD, ENTRYPOINT\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/container.go",
    "content": "package container\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/moby/moby/api/types/mount\"\n\t\"github.com/moby/moby/api/types/storage\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// PruneReport contains the response for Engine API:\n// POST \"/containers/prune\"\ntype PruneReport struct {\n\tContainersDeleted []string\n\tSpaceReclaimed    uint64\n}\n\n// PathStat is used to encode the header from\n// GET \"/containers/{name:.*}/archive\"\n// \"Name\" is the file or directory name.\ntype PathStat struct {\n\tName       string      `json:\"name\"`\n\tSize       int64       `json:\"size\"`\n\tMode       os.FileMode `json:\"mode\"`\n\tMtime      time.Time   `json:\"mtime\"`\n\tLinkTarget string      `json:\"linkTarget\"`\n}\n\n// MountPoint represents a mount point configuration inside the container.\n// This is used for reporting the mountpoints in use by a container.\ntype MountPoint struct {\n\t// Type is the type of mount, see [mount.Type] definitions for details.\n\tType mount.Type `json:\",omitempty\"`\n\n\t// Name is the name reference to the underlying data defined by `Source`\n\t// e.g., the volume name.\n\tName string `json:\",omitempty\"`\n\n\t// Source is the source location of the mount.\n\t//\n\t// For volumes, this contains the storage location of the volume (within\n\t// `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains\n\t// the source (host) part of the bind-mount. For `tmpfs` mount points, this\n\t// field is empty.\n\tSource string\n\n\t// Destination is the path relative to the container root (`/`) where the\n\t// Source is mounted inside the container.\n\tDestination string\n\n\t// Driver is the volume driver used to create the volume (if it is a volume).\n\tDriver string `json:\",omitempty\"`\n\n\t// Mode is a comma separated list of options supplied by the user when\n\t// creating the bind/volume mount.\n\t//\n\t// The default is platform-specific (`\"z\"` on Linux, empty on Windows).\n\tMode string\n\n\t// RW indicates whether the mount is mounted writable (read-write).\n\tRW bool\n\n\t// Propagation describes how mounts are propagated from the host into the\n\t// mount point, and vice-versa. Refer to the Linux kernel documentation\n\t// for details:\n\t// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt\n\t//\n\t// This field is not used on Windows.\n\tPropagation mount.Propagation\n}\n\n// State stores container's running state\n// it's part of ContainerJSONBase and returned by \"inspect\" command\ntype State struct {\n\tStatus     ContainerState // String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\"\n\tRunning    bool\n\tPaused     bool\n\tRestarting bool\n\tOOMKilled  bool\n\tDead       bool\n\tPid        int\n\tExitCode   int\n\tError      string\n\tStartedAt  string\n\tFinishedAt string\n\tHealth     *Health `json:\",omitempty\"`\n}\n\n// Summary contains response of Engine API:\n// GET \"/containers/json\"\ntype Summary struct {\n\tID                      string `json:\"Id\"`\n\tNames                   []string\n\tImage                   string\n\tImageID                 string\n\tImageManifestDescriptor *ocispec.Descriptor `json:\"ImageManifestDescriptor,omitempty\"`\n\tCommand                 string\n\tCreated                 int64\n\tPorts                   []PortSummary\n\tSizeRw                  int64 `json:\",omitempty\"`\n\tSizeRootFs              int64 `json:\",omitempty\"`\n\tLabels                  map[string]string\n\tState                   ContainerState\n\tStatus                  string\n\tHostConfig              struct {\n\t\tNetworkMode string            `json:\",omitempty\"`\n\t\tAnnotations map[string]string `json:\",omitempty\"`\n\t}\n\tHealth          *HealthSummary `json:\",omitempty\"`\n\tNetworkSettings *NetworkSettingsSummary\n\tMounts          []MountPoint\n}\n\n// InspectResponse is the response for the GET \"/containers/{name:.*}/json\"\n// endpoint.\ntype InspectResponse struct {\n\tID              string `json:\"Id\"`\n\tCreated         string\n\tPath            string\n\tArgs            []string\n\tState           *State\n\tImage           string\n\tResolvConfPath  string\n\tHostnamePath    string\n\tHostsPath       string\n\tLogPath         string\n\tName            string\n\tRestartCount    int\n\tDriver          string\n\tPlatform        string\n\tMountLabel      string\n\tProcessLabel    string\n\tAppArmorProfile string\n\tExecIDs         []string\n\tHostConfig      *HostConfig\n\n\t// GraphDriver contains information about the container's graph driver.\n\tGraphDriver *storage.DriverData `json:\"GraphDriver,omitempty\"`\n\n\t// Storage contains information about the storage used for the container's filesystem.\n\tStorage *storage.Storage `json:\"Storage,omitempty\"`\n\n\tSizeRw          *int64 `json:\",omitempty\"`\n\tSizeRootFs      *int64 `json:\",omitempty\"`\n\tMounts          []MountPoint\n\tConfig          *Config\n\tNetworkSettings *NetworkSettings\n\t// ImageManifestDescriptor is the descriptor of a platform-specific manifest of the image used to create the container.\n\tImageManifestDescriptor *ocispec.Descriptor `json:\"ImageManifestDescriptor,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/create_request.go",
    "content": "package container\n\nimport \"github.com/moby/moby/api/types/network\"\n\n// CreateRequest is the request message sent to the server for container\n// create calls. It is a config wrapper that holds the container [Config]\n// (portable) and the corresponding [HostConfig] (non-portable) and\n// [network.NetworkingConfig].\ntype CreateRequest struct {\n\t*Config\n\tHostConfig       *HostConfig               `json:\"HostConfig,omitempty\"`\n\tNetworkingConfig *network.NetworkingConfig `json:\"NetworkingConfig,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/create_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// CreateResponse ContainerCreateResponse\n//\n// # OK response to ContainerCreate operation\n//\n// swagger:model CreateResponse\ntype CreateResponse struct {\n\n\t// The ID of the created container\n\t// Example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743\n\t// Required: true\n\tID string `json:\"Id\"`\n\n\t// Warnings encountered when creating the container\n\t// Example: []\n\t// Required: true\n\tWarnings []string `json:\"Warnings\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/disk_usage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DiskUsage represents system data usage information for container resources.\n//\n// swagger:model DiskUsage\ntype DiskUsage struct {\n\n\t// Count of active containers.\n\t//\n\t// Example: 1\n\tActiveCount int64 `json:\"ActiveCount,omitempty\"`\n\n\t// List of container summaries.\n\t//\n\tItems []Summary `json:\"Items,omitempty\"`\n\n\t// Disk space that can be reclaimed by removing inactive containers.\n\t//\n\t// Example: 12345678\n\tReclaimable int64 `json:\"Reclaimable,omitempty\"`\n\n\t// Count of all containers.\n\t//\n\t// Example: 4\n\tTotalCount int64 `json:\"TotalCount,omitempty\"`\n\n\t// Disk space in use by containers.\n\t//\n\t// Example: 98765432\n\tTotalSize int64 `json:\"TotalSize,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/errors.go",
    "content": "package container\n\ntype errInvalidParameter struct{ error }\n\nfunc (e *errInvalidParameter) InvalidParameter() {}\n\nfunc (e *errInvalidParameter) Unwrap() error {\n\treturn e.error\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/exec.go",
    "content": "package container\n\nimport \"github.com/moby/moby/api/types/common\"\n\n// ExecCreateResponse is the response for a successful exec-create request.\n// It holds the ID of the exec that was created.\n//\n// TODO(thaJeztah): make this a distinct type.\ntype ExecCreateResponse = common.IDResponse\n\n// ExecInspectResponse is the API response for the \"GET /exec/{id}/json\"\n// endpoint and holds information about and exec.\ntype ExecInspectResponse struct {\n\tID            string `json:\"ID\"`\n\tRunning       bool   `json:\"Running\"`\n\tExitCode      *int   `json:\"ExitCode\"`\n\tProcessConfig *ExecProcessConfig\n\tOpenStdin     bool   `json:\"OpenStdin\"`\n\tOpenStderr    bool   `json:\"OpenStderr\"`\n\tOpenStdout    bool   `json:\"OpenStdout\"`\n\tCanRemove     bool   `json:\"CanRemove\"`\n\tContainerID   string `json:\"ContainerID\"`\n\tDetachKeys    []byte `json:\"DetachKeys\"`\n\tPid           int    `json:\"Pid\"`\n}\n\n// ExecProcessConfig holds information about the exec process\n// running on the host.\ntype ExecProcessConfig struct {\n\tTty        bool     `json:\"tty\"`\n\tEntrypoint string   `json:\"entrypoint\"`\n\tArguments  []string `json:\"arguments\"`\n\tPrivileged *bool    `json:\"privileged,omitempty\"`\n\tUser       string   `json:\"user,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/exec_create_request.go",
    "content": "package container\n\n// ExecCreateRequest is a small subset of the Config struct that holds the configuration\n// for the exec feature of docker.\ntype ExecCreateRequest struct {\n\tUser         string   // User that will run the command\n\tPrivileged   bool     // Is the container in privileged mode\n\tTty          bool     // Attach standard streams to a tty.\n\tConsoleSize  *[2]uint `json:\",omitempty\"` // Initial console size [height, width]\n\tAttachStdin  bool     // Attach the standard input, makes possible user interaction\n\tAttachStderr bool     // Attach the standard error\n\tAttachStdout bool     // Attach the standard output\n\tDetachKeys   string   // Escape keys for detach\n\tEnv          []string // Environment variables\n\tWorkingDir   string   // Working directory\n\tCmd          []string // Execution commands and args\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/exec_start_request.go",
    "content": "package container\n\n// ExecStartRequest is a temp struct used by execStart\n// Config fields is part of ExecConfig in runconfig package\ntype ExecStartRequest struct {\n\t// ExecStart will first check if it's detached\n\tDetach bool\n\t// Check if there's a tty\n\tTty bool\n\t// Terminal size [height, width], unused if Tty == false\n\tConsoleSize *[2]uint `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/filesystem_change.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// FilesystemChange Change in the container's filesystem.\n//\n// swagger:model FilesystemChange\ntype FilesystemChange struct {\n\n\t// kind\n\t// Required: true\n\tKind ChangeType `json:\"Kind\"`\n\n\t// Path to file or directory that has changed.\n\t//\n\t// Required: true\n\tPath string `json:\"Path\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/health.go",
    "content": "package container\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n)\n\n// HealthStatus is a string representation of the container's health.\ntype HealthStatus string\n\n// Health states\nconst (\n\tNoHealthcheck HealthStatus = \"none\"      // Indicates there is no healthcheck\n\tStarting      HealthStatus = \"starting\"  // Starting indicates that the container is not yet ready\n\tHealthy       HealthStatus = \"healthy\"   // Healthy indicates that the container is running correctly\n\tUnhealthy     HealthStatus = \"unhealthy\" // Unhealthy indicates that the container has a problem\n)\n\n// Health stores information about the container's healthcheck results\ntype Health struct {\n\tStatus        HealthStatus         // Status is one of [Starting], [Healthy] or [Unhealthy].\n\tFailingStreak int                  // FailingStreak is the number of consecutive failures\n\tLog           []*HealthcheckResult // Log contains the last few results (oldest first)\n}\n\n// HealthSummary stores a summary of the container's healthcheck results.\ntype HealthSummary struct {\n\tStatus        HealthStatus // Status is one of [NoHealthcheck], [Starting], [Healthy] or [Unhealthy].\n\tFailingStreak int          // FailingStreak is the number of consecutive failures\n}\n\n// HealthcheckResult stores information about a single run of a healthcheck probe\ntype HealthcheckResult struct {\n\tStart    time.Time // Start is the time this check started\n\tEnd      time.Time // End is the time this check ended\n\tExitCode int       // ExitCode meanings: 0=healthy, 1=unhealthy, 2=reserved (considered unhealthy), else=error running probe\n\tOutput   string    // Output from last check\n}\n\nvar validHealths = []string{\n\tstring(NoHealthcheck),\n\tstring(Starting),\n\tstring(Healthy),\n\tstring(Unhealthy),\n}\n\n// ValidateHealthStatus checks if the provided string is a valid\n// container [HealthStatus].\nfunc ValidateHealthStatus(s HealthStatus) error {\n\tswitch s {\n\tcase NoHealthcheck, Starting, Healthy, Unhealthy:\n\t\treturn nil\n\tdefault:\n\t\treturn errInvalidParameter{error: fmt.Errorf(\"invalid value for health (%s): must be one of %s\", s, strings.Join(validHealths, \", \"))}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/hostconfig.go",
    "content": "package container\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/netip\"\n\t\"strings\"\n\n\t\"github.com/docker/go-units\"\n\t\"github.com/moby/moby/api/types/blkiodev\"\n\t\"github.com/moby/moby/api/types/mount\"\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// CgroupnsMode represents the cgroup namespace mode of the container\ntype CgroupnsMode string\n\n// cgroup namespace modes for containers\nconst (\n\tCgroupnsModeEmpty   CgroupnsMode = \"\"\n\tCgroupnsModePrivate CgroupnsMode = \"private\"\n\tCgroupnsModeHost    CgroupnsMode = \"host\"\n)\n\n// IsPrivate indicates whether the container uses its own private cgroup namespace\nfunc (c CgroupnsMode) IsPrivate() bool {\n\treturn c == CgroupnsModePrivate\n}\n\n// IsHost indicates whether the container shares the host's cgroup namespace\nfunc (c CgroupnsMode) IsHost() bool {\n\treturn c == CgroupnsModeHost\n}\n\n// IsEmpty indicates whether the container cgroup namespace mode is unset\nfunc (c CgroupnsMode) IsEmpty() bool {\n\treturn c == CgroupnsModeEmpty\n}\n\n// Valid indicates whether the cgroup namespace mode is valid\nfunc (c CgroupnsMode) Valid() bool {\n\treturn c.IsEmpty() || c.IsPrivate() || c.IsHost()\n}\n\n// Isolation represents the isolation technology of a container. The supported\n// values are platform specific\ntype Isolation string\n\n// Isolation modes for containers\nconst (\n\tIsolationEmpty   Isolation = \"\"        // IsolationEmpty is unspecified (same behavior as default)\n\tIsolationDefault Isolation = \"default\" // IsolationDefault is the default isolation mode on current daemon\n\tIsolationProcess Isolation = \"process\" // IsolationProcess is process isolation mode\n\tIsolationHyperV  Isolation = \"hyperv\"  // IsolationHyperV is HyperV isolation mode\n)\n\n// IsDefault indicates the default isolation technology of a container. On Linux this\n// is the native driver. On Windows, this is a Windows Server Container.\nfunc (i Isolation) IsDefault() bool {\n\t// TODO consider making isolation-mode strict (case-sensitive)\n\tv := Isolation(strings.ToLower(string(i)))\n\treturn v == IsolationDefault || v == IsolationEmpty\n}\n\n// IsHyperV indicates the use of a Hyper-V partition for isolation\nfunc (i Isolation) IsHyperV() bool {\n\t// TODO consider making isolation-mode strict (case-sensitive)\n\treturn Isolation(strings.ToLower(string(i))) == IsolationHyperV\n}\n\n// IsProcess indicates the use of process isolation\nfunc (i Isolation) IsProcess() bool {\n\t// TODO consider making isolation-mode strict (case-sensitive)\n\treturn Isolation(strings.ToLower(string(i))) == IsolationProcess\n}\n\n// IpcMode represents the container ipc stack.\ntype IpcMode string\n\n// IpcMode constants\nconst (\n\tIPCModeNone      IpcMode = \"none\"\n\tIPCModeHost      IpcMode = \"host\"\n\tIPCModeContainer IpcMode = \"container\"\n\tIPCModePrivate   IpcMode = \"private\"\n\tIPCModeShareable IpcMode = \"shareable\"\n)\n\n// IsPrivate indicates whether the container uses its own private ipc namespace which can not be shared.\nfunc (n IpcMode) IsPrivate() bool {\n\treturn n == IPCModePrivate\n}\n\n// IsHost indicates whether the container shares the host's ipc namespace.\nfunc (n IpcMode) IsHost() bool {\n\treturn n == IPCModeHost\n}\n\n// IsShareable indicates whether the container's ipc namespace can be shared with another container.\nfunc (n IpcMode) IsShareable() bool {\n\treturn n == IPCModeShareable\n}\n\n// IsContainer indicates whether the container uses another container's ipc namespace.\nfunc (n IpcMode) IsContainer() bool {\n\t_, ok := containerID(string(n))\n\treturn ok\n}\n\n// IsNone indicates whether container IpcMode is set to \"none\".\nfunc (n IpcMode) IsNone() bool {\n\treturn n == IPCModeNone\n}\n\n// IsEmpty indicates whether container IpcMode is empty\nfunc (n IpcMode) IsEmpty() bool {\n\treturn n == \"\"\n}\n\n// Valid indicates whether the ipc mode is valid.\nfunc (n IpcMode) Valid() bool {\n\t// TODO(thaJeztah): align with PidMode, and consider container-mode without a container name/ID to be invalid.\n\treturn n.IsEmpty() || n.IsNone() || n.IsPrivate() || n.IsHost() || n.IsShareable() || n.IsContainer()\n}\n\n// Container returns the name of the container ipc stack is going to be used.\nfunc (n IpcMode) Container() (idOrName string) {\n\tidOrName, _ = containerID(string(n))\n\treturn idOrName\n}\n\n// NetworkMode represents the container network stack.\ntype NetworkMode string\n\n// IsNone indicates whether container isn't using a network stack.\nfunc (n NetworkMode) IsNone() bool {\n\treturn n == network.NetworkNone\n}\n\n// IsDefault indicates whether container uses the default network stack.\nfunc (n NetworkMode) IsDefault() bool {\n\treturn n == network.NetworkDefault\n}\n\n// IsPrivate indicates whether container uses its private network stack.\nfunc (n NetworkMode) IsPrivate() bool {\n\treturn !n.IsHost() && !n.IsContainer()\n}\n\n// IsContainer indicates whether container uses a container network stack.\nfunc (n NetworkMode) IsContainer() bool {\n\t_, ok := containerID(string(n))\n\treturn ok\n}\n\n// ConnectedContainer is the id of the container which network this container is connected to.\nfunc (n NetworkMode) ConnectedContainer() (idOrName string) {\n\tidOrName, _ = containerID(string(n))\n\treturn idOrName\n}\n\n// UserDefined indicates user-created network\nfunc (n NetworkMode) UserDefined() string {\n\tif n.IsUserDefined() {\n\t\treturn string(n)\n\t}\n\treturn \"\"\n}\n\n// UsernsMode represents userns mode in the container.\ntype UsernsMode string\n\n// IsHost indicates whether the container uses the host's userns.\nfunc (n UsernsMode) IsHost() bool {\n\treturn n == \"host\"\n}\n\n// IsPrivate indicates whether the container uses the a private userns.\nfunc (n UsernsMode) IsPrivate() bool {\n\treturn !n.IsHost()\n}\n\n// Valid indicates whether the userns is valid.\nfunc (n UsernsMode) Valid() bool {\n\treturn n == \"\" || n.IsHost()\n}\n\n// CgroupSpec represents the cgroup to use for the container.\ntype CgroupSpec string\n\n// IsContainer indicates whether the container is using another container cgroup\nfunc (c CgroupSpec) IsContainer() bool {\n\t_, ok := containerID(string(c))\n\treturn ok\n}\n\n// Valid indicates whether the cgroup spec is valid.\nfunc (c CgroupSpec) Valid() bool {\n\t// TODO(thaJeztah): align with PidMode, and consider container-mode without a container name/ID to be invalid.\n\treturn c == \"\" || c.IsContainer()\n}\n\n// Container returns the ID or name of the container whose cgroup will be used.\nfunc (c CgroupSpec) Container() (idOrName string) {\n\tidOrName, _ = containerID(string(c))\n\treturn idOrName\n}\n\n// UTSMode represents the UTS namespace of the container.\ntype UTSMode string\n\n// IsPrivate indicates whether the container uses its private UTS namespace.\nfunc (n UTSMode) IsPrivate() bool {\n\treturn !n.IsHost()\n}\n\n// IsHost indicates whether the container uses the host's UTS namespace.\nfunc (n UTSMode) IsHost() bool {\n\treturn n == \"host\"\n}\n\n// Valid indicates whether the UTS namespace is valid.\nfunc (n UTSMode) Valid() bool {\n\treturn n == \"\" || n.IsHost()\n}\n\n// PidMode represents the pid namespace of the container.\ntype PidMode string\n\n// IsPrivate indicates whether the container uses its own new pid namespace.\nfunc (n PidMode) IsPrivate() bool {\n\treturn !n.IsHost() && !n.IsContainer()\n}\n\n// IsHost indicates whether the container uses the host's pid namespace.\nfunc (n PidMode) IsHost() bool {\n\treturn n == \"host\"\n}\n\n// IsContainer indicates whether the container uses a container's pid namespace.\nfunc (n PidMode) IsContainer() bool {\n\t_, ok := containerID(string(n))\n\treturn ok\n}\n\n// Valid indicates whether the pid namespace is valid.\nfunc (n PidMode) Valid() bool {\n\treturn n == \"\" || n.IsHost() || validContainer(string(n))\n}\n\n// Container returns the name of the container whose pid namespace is going to be used.\nfunc (n PidMode) Container() (idOrName string) {\n\tidOrName, _ = containerID(string(n))\n\treturn idOrName\n}\n\n// DeviceRequest represents a request for devices from a device driver.\n// Used by GPU device drivers.\ntype DeviceRequest struct {\n\tDriver       string            // Name of device driver\n\tCount        int               // Number of devices to request (-1 = All)\n\tDeviceIDs    []string          // List of device IDs as recognizable by the device driver\n\tCapabilities [][]string        // An OR list of AND lists of device capabilities (e.g. \"gpu\")\n\tOptions      map[string]string // Options to pass onto the device driver\n}\n\n// DeviceMapping represents the device mapping between the host and the container.\ntype DeviceMapping struct {\n\tPathOnHost        string\n\tPathInContainer   string\n\tCgroupPermissions string\n}\n\n// RestartPolicy represents the restart policies of the container.\ntype RestartPolicy struct {\n\tName              RestartPolicyMode\n\tMaximumRetryCount int\n}\n\ntype RestartPolicyMode string\n\nconst (\n\tRestartPolicyDisabled      RestartPolicyMode = \"no\"\n\tRestartPolicyAlways        RestartPolicyMode = \"always\"\n\tRestartPolicyOnFailure     RestartPolicyMode = \"on-failure\"\n\tRestartPolicyUnlessStopped RestartPolicyMode = \"unless-stopped\"\n)\n\n// IsNone indicates whether the container has the \"no\" restart policy.\n// This means the container will not automatically restart when exiting.\nfunc (rp *RestartPolicy) IsNone() bool {\n\treturn rp.Name == RestartPolicyDisabled || rp.Name == \"\"\n}\n\n// IsAlways indicates whether the container has the \"always\" restart policy.\n// This means the container will automatically restart regardless of the exit status.\nfunc (rp *RestartPolicy) IsAlways() bool {\n\treturn rp.Name == RestartPolicyAlways\n}\n\n// IsOnFailure indicates whether the container has the \"on-failure\" restart policy.\n// This means the container will automatically restart of exiting with a non-zero exit status.\nfunc (rp *RestartPolicy) IsOnFailure() bool {\n\treturn rp.Name == RestartPolicyOnFailure\n}\n\n// IsUnlessStopped indicates whether the container has the\n// \"unless-stopped\" restart policy. This means the container will\n// automatically restart unless user has put it to stopped state.\nfunc (rp *RestartPolicy) IsUnlessStopped() bool {\n\treturn rp.Name == RestartPolicyUnlessStopped\n}\n\n// IsSame compares two RestartPolicy to see if they are the same\nfunc (rp *RestartPolicy) IsSame(tp *RestartPolicy) bool {\n\treturn rp.Name == tp.Name && rp.MaximumRetryCount == tp.MaximumRetryCount\n}\n\n// ValidateRestartPolicy validates the given RestartPolicy.\nfunc ValidateRestartPolicy(policy RestartPolicy) error {\n\tswitch policy.Name {\n\tcase RestartPolicyAlways, RestartPolicyUnlessStopped, RestartPolicyDisabled:\n\t\tif policy.MaximumRetryCount != 0 {\n\t\t\tmsg := \"invalid restart policy: maximum retry count can only be used with 'on-failure'\"\n\t\t\tif policy.MaximumRetryCount < 0 {\n\t\t\t\tmsg += \" and cannot be negative\"\n\t\t\t}\n\t\t\treturn &errInvalidParameter{errors.New(msg)}\n\t\t}\n\t\treturn nil\n\tcase RestartPolicyOnFailure:\n\t\tif policy.MaximumRetryCount < 0 {\n\t\t\treturn &errInvalidParameter{errors.New(\"invalid restart policy: maximum retry count cannot be negative\")}\n\t\t}\n\t\treturn nil\n\tcase \"\":\n\t\t// Versions before v25.0.0 created an empty restart-policy \"name\" as\n\t\t// default. Allow an empty name with \"any\" MaximumRetryCount for\n\t\t// backward-compatibility.\n\t\treturn nil\n\tdefault:\n\t\treturn &errInvalidParameter{fmt.Errorf(\"invalid restart policy: unknown policy '%s'; use one of '%s', '%s', '%s', or '%s'\", policy.Name, RestartPolicyDisabled, RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyUnlessStopped)}\n\t}\n}\n\n// LogMode is a type to define the available modes for logging\n// These modes affect how logs are handled when log messages start piling up.\ntype LogMode string\n\n// Available logging modes\nconst (\n\tLogModeUnset    LogMode = \"\"\n\tLogModeBlocking LogMode = \"blocking\"\n\tLogModeNonBlock LogMode = \"non-blocking\"\n)\n\n// LogConfig represents the logging configuration of the container.\ntype LogConfig struct {\n\tType   string\n\tConfig map[string]string\n}\n\n// Ulimit is an alias for [units.Ulimit], which may be moving to a different\n// location or become a local type. This alias is to help transitioning.\n//\n// Users are recommended to use this alias instead of using [units.Ulimit] directly.\ntype Ulimit = units.Ulimit\n\n// Resources contains container's resources (cgroups config, ulimits...)\ntype Resources struct {\n\t// Applicable to all platforms\n\tCPUShares int64 `json:\"CpuShares\"` // CPU shares (relative weight vs. other containers)\n\tMemory    int64 // Memory limit (in bytes)\n\tNanoCPUs  int64 `json:\"NanoCpus\"` // CPU quota in units of 10<sup>-9</sup> CPUs.\n\n\t// Applicable to UNIX platforms\n\tCgroupParent         string // Parent cgroup.\n\tBlkioWeight          uint16 // Block IO weight (relative weight vs. other containers)\n\tBlkioWeightDevice    []*blkiodev.WeightDevice\n\tBlkioDeviceReadBps   []*blkiodev.ThrottleDevice\n\tBlkioDeviceWriteBps  []*blkiodev.ThrottleDevice\n\tBlkioDeviceReadIOps  []*blkiodev.ThrottleDevice\n\tBlkioDeviceWriteIOps []*blkiodev.ThrottleDevice\n\tCPUPeriod            int64           `json:\"CpuPeriod\"`          // CPU CFS (Completely Fair Scheduler) period\n\tCPUQuota             int64           `json:\"CpuQuota\"`           // CPU CFS (Completely Fair Scheduler) quota\n\tCPURealtimePeriod    int64           `json:\"CpuRealtimePeriod\"`  // CPU real-time period\n\tCPURealtimeRuntime   int64           `json:\"CpuRealtimeRuntime\"` // CPU real-time runtime\n\tCpusetCpus           string          // CpusetCpus 0-2, 0,1\n\tCpusetMems           string          // CpusetMems 0-2, 0,1\n\tDevices              []DeviceMapping // List of devices to map inside the container\n\tDeviceCgroupRules    []string        // List of rule to be added to the device cgroup\n\tDeviceRequests       []DeviceRequest // List of device requests for device drivers\n\tMemoryReservation    int64           // Memory soft limit (in bytes)\n\tMemorySwap           int64           // Total memory usage (memory + swap); set `-1` to enable unlimited swap\n\tMemorySwappiness     *int64          // Tuning container memory swappiness behaviour\n\tOomKillDisable       *bool           // Whether to disable OOM Killer or not\n\tPidsLimit            *int64          // Setting PIDs limit for a container; Set `0` or `-1` for unlimited, or `null` to not change.\n\tUlimits              []*Ulimit       // List of ulimits to be set in the container\n\n\t// Applicable to Windows\n\tCPUCount           int64  `json:\"CpuCount\"`   // CPU count\n\tCPUPercent         int64  `json:\"CpuPercent\"` // CPU percent\n\tIOMaximumIOps      uint64 // Maximum IOps for the container system drive\n\tIOMaximumBandwidth uint64 // Maximum IO in bytes per second for the container system drive\n}\n\n// UpdateConfig holds the mutable attributes of a Container.\n// Those attributes can be updated at runtime.\ntype UpdateConfig struct {\n\t// Contains container's resources (cgroups, ulimits)\n\tResources\n\tRestartPolicy RestartPolicy\n}\n\n// HostConfig the non-portable Config structure of a container.\n// Here, \"non-portable\" means \"dependent of the host we are running on\".\n// Portable information *should* appear in Config.\ntype HostConfig struct {\n\t// Applicable to all platforms\n\tBinds           []string          // List of volume bindings for this container\n\tContainerIDFile string            // File (path) where the containerId is written\n\tLogConfig       LogConfig         // Configuration of the logs for this container\n\tNetworkMode     NetworkMode       // Network mode to use for the container\n\tPortBindings    network.PortMap   // Port mapping between the exposed port (container) and the host\n\tRestartPolicy   RestartPolicy     // Restart policy to be used for the container\n\tAutoRemove      bool              // Automatically remove container when it exits\n\tVolumeDriver    string            // Name of the volume driver used to mount volumes\n\tVolumesFrom     []string          // List of volumes to take from other container\n\tConsoleSize     [2]uint           // Initial console size (height,width)\n\tAnnotations     map[string]string `json:\",omitempty\"` // Arbitrary non-identifying metadata attached to container and provided to the runtime\n\n\t// Applicable to UNIX platforms\n\tCapAdd          []string          // List of kernel capabilities to add to the container\n\tCapDrop         []string          // List of kernel capabilities to remove from the container\n\tCgroupnsMode    CgroupnsMode      // Cgroup namespace mode to use for the container\n\tDNS             []netip.Addr      `json:\"Dns\"`        // List of DNS server to lookup\n\tDNSOptions      []string          `json:\"DnsOptions\"` // List of DNSOption to look for\n\tDNSSearch       []string          `json:\"DnsSearch\"`  // List of DNSSearch to look for\n\tExtraHosts      []string          // List of extra hosts\n\tGroupAdd        []string          // List of additional groups that the container process will run as\n\tIpcMode         IpcMode           // IPC namespace to use for the container\n\tCgroup          CgroupSpec        // Cgroup to use for the container\n\tLinks           []string          // List of links (in the name:alias form)\n\tOomScoreAdj     int               // Container preference for OOM-killing\n\tPidMode         PidMode           // PID namespace to use for the container\n\tPrivileged      bool              // Is the container in privileged mode\n\tPublishAllPorts bool              // Should docker publish all exposed port for the container\n\tReadonlyRootfs  bool              // Is the container root filesystem in read-only\n\tSecurityOpt     []string          // List of string values to customize labels for MLS systems, such as SELinux.\n\tStorageOpt      map[string]string `json:\",omitempty\"` // Storage driver options per container.\n\tTmpfs           map[string]string `json:\",omitempty\"` // List of tmpfs (mounts) used for the container\n\tUTSMode         UTSMode           // UTS namespace to use for the container\n\tUsernsMode      UsernsMode        // The user namespace to use for the container\n\tShmSize         int64             // Total shm memory usage\n\tSysctls         map[string]string `json:\",omitempty\"` // List of Namespaced sysctls used for the container\n\tRuntime         string            `json:\",omitempty\"` // Runtime to use with this container\n\n\t// Applicable to Windows\n\tIsolation Isolation // Isolation technology of the container (e.g. default, hyperv)\n\n\t// Contains container's resources (cgroups, ulimits)\n\tResources\n\n\t// Mounts specs used by the container\n\tMounts []mount.Mount `json:\",omitempty\"`\n\n\t// MaskedPaths is the list of paths to be masked inside the container (this overrides the default set of paths)\n\tMaskedPaths []string\n\n\t// ReadonlyPaths is the list of paths to be set as read-only inside the container (this overrides the default set of paths)\n\tReadonlyPaths []string\n\n\t// Run a custom init inside the container, if null, use the daemon's configured settings\n\tInit *bool `json:\",omitempty\"`\n}\n\n// containerID splits \"container:<ID|name>\" values. It returns the container\n// ID or name, and whether an ID/name was found. It returns an empty string and\n// a \"false\" if the value does not have a \"container:\" prefix. Further validation\n// of the returned, including checking if the value is empty, should be handled\n// by the caller.\nfunc containerID(val string) (idOrName string, ok bool) {\n\tk, v, hasSep := strings.Cut(val, \":\")\n\tif !hasSep || k != \"container\" {\n\t\treturn \"\", false\n\t}\n\treturn v, true\n}\n\n// validContainer checks if the given value is a \"container:\" mode with\n// a non-empty name/ID.\nfunc validContainer(val string) bool {\n\tid, ok := containerID(val)\n\treturn ok && id != \"\"\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/hostconfig_unix.go",
    "content": "//go:build !windows\n\npackage container\n\nimport \"github.com/moby/moby/api/types/network\"\n\n// IsValid indicates if an isolation technology is valid\nfunc (i Isolation) IsValid() bool {\n\treturn i.IsDefault()\n}\n\n// IsBridge indicates whether container uses the bridge network stack\nfunc (n NetworkMode) IsBridge() bool {\n\treturn n == network.NetworkBridge\n}\n\n// IsHost indicates whether container uses the host network stack.\nfunc (n NetworkMode) IsHost() bool {\n\treturn n == network.NetworkHost\n}\n\n// IsUserDefined indicates user-created network\nfunc (n NetworkMode) IsUserDefined() bool {\n\treturn !n.IsDefault() && !n.IsBridge() && !n.IsHost() && !n.IsNone() && !n.IsContainer()\n}\n\n// NetworkName returns the name of the network stack.\nfunc (n NetworkMode) NetworkName() string {\n\tswitch {\n\tcase n.IsDefault():\n\t\treturn network.NetworkDefault\n\tcase n.IsBridge():\n\t\treturn network.NetworkBridge\n\tcase n.IsHost():\n\t\treturn network.NetworkHost\n\tcase n.IsNone():\n\t\treturn network.NetworkNone\n\tcase n.IsContainer():\n\t\treturn \"container\"\n\tcase n.IsUserDefined():\n\t\treturn n.UserDefined()\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/hostconfig_windows.go",
    "content": "package container\n\nimport \"github.com/moby/moby/api/types/network\"\n\n// IsValid indicates if an isolation technology is valid\nfunc (i Isolation) IsValid() bool {\n\treturn i.IsDefault() || i.IsHyperV() || i.IsProcess()\n}\n\n// IsBridge indicates whether container uses the bridge network stack\n// in windows it is given the name NAT\nfunc (n NetworkMode) IsBridge() bool {\n\treturn n == network.NetworkNat\n}\n\n// IsHost indicates whether container uses the host network stack.\n// returns false as this is not supported by windows\nfunc (n NetworkMode) IsHost() bool {\n\treturn false\n}\n\n// IsUserDefined indicates user-created network\nfunc (n NetworkMode) IsUserDefined() bool {\n\treturn !n.IsDefault() && !n.IsNone() && !n.IsBridge() && !n.IsContainer()\n}\n\n// NetworkName returns the name of the network stack.\nfunc (n NetworkMode) NetworkName() string {\n\tswitch {\n\tcase n.IsDefault():\n\t\treturn network.NetworkDefault\n\tcase n.IsBridge():\n\t\treturn network.NetworkNat\n\tcase n.IsHost():\n\t\t// Windows currently doesn't support host network-mode, so\n\t\t// this would currently never happen..\n\t\treturn network.NetworkHost\n\tcase n.IsNone():\n\t\treturn network.NetworkNone\n\tcase n.IsContainer():\n\t\treturn \"container\"\n\tcase n.IsUserDefined():\n\t\treturn n.UserDefined()\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/network_settings.go",
    "content": "package container\n\nimport (\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkSettings exposes the network settings in the api\ntype NetworkSettings struct {\n\tSandboxID  string // SandboxID uniquely represents a container's network stack\n\tSandboxKey string // SandboxKey identifies the sandbox\n\n\t// Ports is a collection of [network.PortBinding] indexed by [network.Port]\n\tPorts network.PortMap\n\n\tNetworks map[string]*network.EndpointSettings\n}\n\n// NetworkSettingsSummary provides a summary of container's networks\n// in /containers/json\ntype NetworkSettingsSummary struct {\n\tNetworks map[string]*network.EndpointSettings\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/port_summary.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/netip\"\n)\n\n// PortSummary Describes a port-mapping between the container and the host.\n//\n// Example: {\"PrivatePort\":8080,\"PublicPort\":80,\"Type\":\"tcp\"}\n//\n// swagger:model PortSummary\ntype PortSummary struct {\n\n\t// Host IP address that the container's port is mapped to\n\tIP netip.Addr `json:\"IP,omitempty\"`\n\n\t// Port on the container\n\t// Required: true\n\tPrivatePort uint16 `json:\"PrivatePort\"`\n\n\t// Port exposed on the host\n\tPublicPort uint16 `json:\"PublicPort,omitempty\"`\n\n\t// type\n\t// Required: true\n\t// Enum: [\"tcp\",\"udp\",\"sctp\"]\n\tType string `json:\"Type\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/state.go",
    "content": "package container\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// ContainerState is a string representation of the container's current state.\ntype ContainerState string\n\nconst (\n\tStateCreated    ContainerState = \"created\"    // StateCreated indicates the container is created, but not (yet) started.\n\tStateRunning    ContainerState = \"running\"    // StateRunning indicates that the container is running.\n\tStatePaused     ContainerState = \"paused\"     // StatePaused indicates that the container's current state is paused.\n\tStateRestarting ContainerState = \"restarting\" // StateRestarting indicates that the container is currently restarting.\n\tStateRemoving   ContainerState = \"removing\"   // StateRemoving indicates that the container is being removed.\n\tStateExited     ContainerState = \"exited\"     // StateExited indicates that the container exited.\n\tStateDead       ContainerState = \"dead\"       // StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts.\n)\n\nvar validStates = []string{\n\tstring(StateCreated),\n\tstring(StateRunning),\n\tstring(StatePaused),\n\tstring(StateRestarting),\n\tstring(StateRemoving),\n\tstring(StateExited),\n\tstring(StateDead),\n}\n\n// ValidateContainerState checks if the provided string is a valid\n// container [ContainerState].\nfunc ValidateContainerState(s ContainerState) error {\n\tswitch s {\n\tcase StateCreated, StateRunning, StatePaused, StateRestarting, StateRemoving, StateExited, StateDead:\n\t\treturn nil\n\tdefault:\n\t\treturn errInvalidParameter{error: fmt.Errorf(\"invalid value for state (%s): must be one of %s\", s, strings.Join(validStates, \", \"))}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/stats.go",
    "content": "package container\n\nimport \"time\"\n\n// ThrottlingData stores CPU throttling stats of one running container.\n// Not used on Windows.\ntype ThrottlingData struct {\n\t// Number of periods with throttling active\n\tPeriods uint64 `json:\"periods\"`\n\t// Number of periods when the container hits its throttling limit.\n\tThrottledPeriods uint64 `json:\"throttled_periods\"`\n\t// Aggregate time the container was throttled for in nanoseconds.\n\tThrottledTime uint64 `json:\"throttled_time\"`\n}\n\n// CPUUsage stores All CPU stats aggregated since container inception.\ntype CPUUsage struct {\n\t// Total CPU time consumed.\n\t// Units: nanoseconds (Linux)\n\t// Units: 100's of nanoseconds (Windows)\n\tTotalUsage uint64 `json:\"total_usage\"`\n\n\t// Total CPU time consumed per core (Linux). Not used on Windows.\n\t// Units: nanoseconds.\n\tPercpuUsage []uint64 `json:\"percpu_usage,omitempty\"`\n\n\t// Time spent by tasks of the cgroup in kernel mode (Linux).\n\t// Time spent by all container processes in kernel mode (Windows).\n\t// Units: nanoseconds (Linux).\n\t// Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers.\n\tUsageInKernelmode uint64 `json:\"usage_in_kernelmode\"`\n\n\t// Time spent by tasks of the cgroup in user mode (Linux).\n\t// Time spent by all container processes in user mode (Windows).\n\t// Units: nanoseconds (Linux).\n\t// Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers\n\tUsageInUsermode uint64 `json:\"usage_in_usermode\"`\n}\n\n// CPUStats aggregates and wraps all CPU related info of container\ntype CPUStats struct {\n\t// CPU Usage. Linux and Windows.\n\tCPUUsage CPUUsage `json:\"cpu_usage\"`\n\n\t// System Usage. Linux only.\n\tSystemUsage uint64 `json:\"system_cpu_usage,omitempty\"`\n\n\t// Online CPUs. Linux only.\n\tOnlineCPUs uint32 `json:\"online_cpus,omitempty\"`\n\n\t// Throttling Data. Linux only.\n\tThrottlingData ThrottlingData `json:\"throttling_data,omitempty\"`\n}\n\n// MemoryStats aggregates all memory stats since container inception on Linux.\n// Windows returns stats for commit and private working set only.\ntype MemoryStats struct {\n\t// Linux Memory Stats\n\n\t// current res_counter usage for memory\n\tUsage uint64 `json:\"usage,omitempty\"`\n\t// maximum usage ever recorded.\n\tMaxUsage uint64 `json:\"max_usage,omitempty\"`\n\t// TODO(vishh): Export these as stronger types.\n\t// all the stats exported via memory.stat.\n\tStats map[string]uint64 `json:\"stats,omitempty\"`\n\t// number of times memory usage hits limits.\n\tFailcnt uint64 `json:\"failcnt,omitempty\"`\n\tLimit   uint64 `json:\"limit,omitempty\"`\n\n\t// Windows Memory Stats\n\t// See https://technet.microsoft.com/en-us/magazine/ff382715.aspx\n\n\t// committed bytes\n\tCommit uint64 `json:\"commitbytes,omitempty\"`\n\t// peak committed bytes\n\tCommitPeak uint64 `json:\"commitpeakbytes,omitempty\"`\n\t// private working set\n\tPrivateWorkingSet uint64 `json:\"privateworkingset,omitempty\"`\n}\n\n// BlkioStatEntry is one small entity to store a piece of Blkio stats\n// Not used on Windows.\ntype BlkioStatEntry struct {\n\tMajor uint64 `json:\"major\"`\n\tMinor uint64 `json:\"minor\"`\n\tOp    string `json:\"op\"`\n\tValue uint64 `json:\"value\"`\n}\n\n// BlkioStats stores All IO service stats for data read and write.\n// This is a Linux specific structure as the differences between expressing\n// block I/O on Windows and Linux are sufficiently significant to make\n// little sense attempting to morph into a combined structure.\ntype BlkioStats struct {\n\t// number of bytes transferred to and from the block device\n\tIoServiceBytesRecursive []BlkioStatEntry `json:\"io_service_bytes_recursive\"`\n\tIoServicedRecursive     []BlkioStatEntry `json:\"io_serviced_recursive\"`\n\tIoQueuedRecursive       []BlkioStatEntry `json:\"io_queue_recursive\"`\n\tIoServiceTimeRecursive  []BlkioStatEntry `json:\"io_service_time_recursive\"`\n\tIoWaitTimeRecursive     []BlkioStatEntry `json:\"io_wait_time_recursive\"`\n\tIoMergedRecursive       []BlkioStatEntry `json:\"io_merged_recursive\"`\n\tIoTimeRecursive         []BlkioStatEntry `json:\"io_time_recursive\"`\n\tSectorsRecursive        []BlkioStatEntry `json:\"sectors_recursive\"`\n}\n\n// StorageStats is the disk I/O stats for read/write on Windows.\ntype StorageStats struct {\n\tReadCountNormalized  uint64 `json:\"read_count_normalized,omitempty\"`\n\tReadSizeBytes        uint64 `json:\"read_size_bytes,omitempty\"`\n\tWriteCountNormalized uint64 `json:\"write_count_normalized,omitempty\"`\n\tWriteSizeBytes       uint64 `json:\"write_size_bytes,omitempty\"`\n}\n\n// NetworkStats aggregates the network stats of one container\ntype NetworkStats struct {\n\t// Bytes received. Windows and Linux.\n\tRxBytes uint64 `json:\"rx_bytes\"`\n\t// Packets received. Windows and Linux.\n\tRxPackets uint64 `json:\"rx_packets\"`\n\t// Received errors. Not used on Windows. Note that we don't `omitempty` this\n\t// field as it is expected in the >=v1.21 API stats structure.\n\tRxErrors uint64 `json:\"rx_errors\"`\n\t// Incoming packets dropped. Windows and Linux.\n\tRxDropped uint64 `json:\"rx_dropped\"`\n\t// Bytes sent. Windows and Linux.\n\tTxBytes uint64 `json:\"tx_bytes\"`\n\t// Packets sent. Windows and Linux.\n\tTxPackets uint64 `json:\"tx_packets\"`\n\t// Sent errors. Not used on Windows. Note that we don't `omitempty` this\n\t// field as it is expected in the >=v1.21 API stats structure.\n\tTxErrors uint64 `json:\"tx_errors\"`\n\t// Outgoing packets dropped. Windows and Linux.\n\tTxDropped uint64 `json:\"tx_dropped\"`\n\t// Endpoint ID. Not used on Linux.\n\tEndpointID string `json:\"endpoint_id,omitempty\"`\n\t// Instance ID. Not used on Linux.\n\tInstanceID string `json:\"instance_id,omitempty\"`\n}\n\n// PidsStats contains the stats of a container's pids\ntype PidsStats struct {\n\t// Current is the number of pids in the cgroup\n\tCurrent uint64 `json:\"current,omitempty\"`\n\t// Limit is the hard limit on the number of pids in the cgroup.\n\t// A \"Limit\" of 0 means that there is no limit.\n\tLimit uint64 `json:\"limit,omitempty\"`\n}\n\n// StatsResponse aggregates all types of stats of one container.\ntype StatsResponse struct {\n\t// ID is the ID of the container for which the stats were collected.\n\tID string `json:\"id,omitempty\"`\n\n\t// Name is the name of the container for which the stats were collected.\n\tName string `json:\"name,omitempty\"`\n\n\t// OSType is the OS of the container (\"linux\" or \"windows\") to allow\n\t// platform-specific handling of stats.\n\tOSType string `json:\"os_type,omitempty\"`\n\n\t// Read is the date and time at which this sample was collected.\n\tRead time.Time `json:\"read\"`\n\n\t// CPUStats contains CPU related info of the container.\n\tCPUStats CPUStats `json:\"cpu_stats,omitempty\"`\n\n\t// MemoryStats aggregates all memory stats since container inception on Linux.\n\t// Windows returns stats for commit and private working set only.\n\tMemoryStats MemoryStats `json:\"memory_stats,omitempty\"`\n\n\t// Networks contains Nntwork statistics for the container per interface.\n\t//\n\t// This field is omitted if the container has no networking enabled.\n\tNetworks map[string]NetworkStats `json:\"networks,omitempty\"`\n\n\t// -------------------------------------------------------------------------\n\t// Linux-specific stats, not populated on Windows.\n\t// -------------------------------------------------------------------------\n\n\t// PidsStats contains Linux-specific stats of a container's process-IDs (PIDs).\n\t//\n\t// This field is Linux-specific and omitted for Windows containers.\n\tPidsStats PidsStats `json:\"pids_stats,omitempty\"`\n\n\t// BlkioStats stores all IO service stats for data read and write.\n\t//\n\t// This type is Linux-specific and holds many fields that are specific\n\t// to cgroups v1.\n\t//\n\t// On a cgroup v2 host, all fields other than \"io_service_bytes_recursive\"\n\t// are omitted or \"null\".\n\t//\n\t// This type is only populated on Linux and omitted for Windows containers.\n\tBlkioStats BlkioStats `json:\"blkio_stats,omitempty\"`\n\n\t// -------------------------------------------------------------------------\n\t// Windows-specific stats, not populated on Linux.\n\t// -------------------------------------------------------------------------\n\n\t// NumProcs is the number of processors on the system.\n\t//\n\t// This field is Windows-specific and always zero for Linux containers.\n\tNumProcs uint32 `json:\"num_procs\"`\n\n\t// StorageStats is the disk I/O stats for read/write on Windows.\n\t//\n\t// This type is Windows-specific and omitted for Linux containers.\n\tStorageStats StorageStats `json:\"storage_stats,omitempty\"`\n\n\t// -------------------------------------------------------------------------\n\t// PreRead and PreCPUStats contain the previous sample of stats for\n\t// the container, and can be used to perform delta-calculation.\n\t// -------------------------------------------------------------------------\n\n\t// PreRead is the date and time at which this first sample was collected.\n\t// This field is not propagated if the \"one-shot\" option is set. If the\n\t// \"one-shot\" option is set, this field may be omitted, empty, or set\n\t// to a default date (`0001-01-01T00:00:00Z`).\n\tPreRead time.Time `json:\"preread\"`\n\n\t// PreCPUStats contains the CPUStats of the previous sample.\n\tPreCPUStats CPUStats `json:\"precpu_stats,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/top_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// TopResponse ContainerTopResponse\n//\n// Container \"top\" response.\n//\n// swagger:model TopResponse\ntype TopResponse struct {\n\n\t// Each process running in the container, where each process\n\t// is an array of values corresponding to the titles.\n\t// Example: {\"Processes\":[[\"root\",\"13642\",\"882\",\"0\",\"17:03\",\"pts/0\",\"00:00:00\",\"/bin/bash\"],[\"root\",\"13735\",\"13642\",\"0\",\"17:06\",\"pts/0\",\"00:00:00\",\"sleep 10\"]]}\n\tProcesses [][]string `json:\"Processes\"`\n\n\t// The ps column titles\n\t// Example: {\"Titles\":[\"UID\",\"PID\",\"PPID\",\"C\",\"STIME\",\"TTY\",\"TIME\",\"CMD\"]}\n\tTitles []string `json:\"Titles\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/update_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// UpdateResponse ContainerUpdateResponse\n//\n// Response for a successful container-update.\n//\n// swagger:model UpdateResponse\ntype UpdateResponse struct {\n\n\t// Warnings encountered when updating the container.\n\t// Example: [\"Published ports are discarded when using host network mode\"]\n\tWarnings []string `json:\"Warnings\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/wait_exit_error.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// WaitExitError container waiting error, if any\n//\n// swagger:model WaitExitError\ntype WaitExitError struct {\n\n\t// Details of an error\n\tMessage string `json:\"Message,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/wait_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage container\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// WaitResponse ContainerWaitResponse\n//\n// # OK response to ContainerWait operation\n//\n// swagger:model WaitResponse\ntype WaitResponse struct {\n\n\t// error\n\tError *WaitExitError `json:\"Error,omitempty\"`\n\n\t// Exit code of the container\n\t// Required: true\n\tStatusCode int64 `json:\"StatusCode\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/container/waitcondition.go",
    "content": "package container\n\n// WaitCondition is a type used to specify a container state for which\n// to wait.\ntype WaitCondition string\n\n// Possible WaitCondition Values.\n//\n// WaitConditionNotRunning (default) is used to wait for any of the non-running\n// states: \"created\", \"exited\", \"dead\", \"removing\", or \"removed\".\n//\n// WaitConditionNextExit is used to wait for the next time the state changes\n// to a non-running state. If the state is currently \"created\" or \"exited\",\n// this would cause Wait() to block until either the container runs and exits\n// or is removed.\n//\n// WaitConditionRemoved is used to wait for the container to be removed.\nconst (\n\tWaitConditionNotRunning WaitCondition = \"not-running\"\n\tWaitConditionNextExit   WaitCondition = \"next-exit\"\n\tWaitConditionRemoved    WaitCondition = \"removed\"\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/events/events.go",
    "content": "package events\n\n// Type is used for event-types.\ntype Type string\n\n// List of known event types.\nconst (\n\tBuilderEventType   Type = \"builder\"   // BuilderEventType is the event type that the builder generates.\n\tConfigEventType    Type = \"config\"    // ConfigEventType is the event type that configs generate.\n\tContainerEventType Type = \"container\" // ContainerEventType is the event type that containers generate.\n\tDaemonEventType    Type = \"daemon\"    // DaemonEventType is the event type that daemon generate.\n\tImageEventType     Type = \"image\"     // ImageEventType is the event type that images generate.\n\tNetworkEventType   Type = \"network\"   // NetworkEventType is the event type that networks generate.\n\tNodeEventType      Type = \"node\"      // NodeEventType is the event type that nodes generate.\n\tPluginEventType    Type = \"plugin\"    // PluginEventType is the event type that plugins generate.\n\tSecretEventType    Type = \"secret\"    // SecretEventType is the event type that secrets generate.\n\tServiceEventType   Type = \"service\"   // ServiceEventType is the event type that services generate.\n\tVolumeEventType    Type = \"volume\"    // VolumeEventType is the event type that volumes generate.\n)\n\n// Action is used for event-actions.\ntype Action string\n\nconst (\n\tActionCreate       Action = \"create\"\n\tActionStart        Action = \"start\"\n\tActionRestart      Action = \"restart\"\n\tActionStop         Action = \"stop\"\n\tActionCheckpoint   Action = \"checkpoint\"\n\tActionPause        Action = \"pause\"\n\tActionUnPause      Action = \"unpause\"\n\tActionAttach       Action = \"attach\"\n\tActionDetach       Action = \"detach\"\n\tActionResize       Action = \"resize\"\n\tActionUpdate       Action = \"update\"\n\tActionRename       Action = \"rename\"\n\tActionKill         Action = \"kill\"\n\tActionDie          Action = \"die\"\n\tActionOOM          Action = \"oom\"\n\tActionDestroy      Action = \"destroy\"\n\tActionRemove       Action = \"remove\"\n\tActionCommit       Action = \"commit\"\n\tActionTop          Action = \"top\"\n\tActionCopy         Action = \"copy\"\n\tActionArchivePath  Action = \"archive-path\"\n\tActionExtractToDir Action = \"extract-to-dir\"\n\tActionExport       Action = \"export\"\n\tActionImport       Action = \"import\"\n\tActionSave         Action = \"save\"\n\tActionLoad         Action = \"load\"\n\tActionTag          Action = \"tag\"\n\tActionUnTag        Action = \"untag\"\n\tActionPush         Action = \"push\"\n\tActionPull         Action = \"pull\"\n\tActionPrune        Action = \"prune\"\n\tActionDelete       Action = \"delete\"\n\tActionEnable       Action = \"enable\"\n\tActionDisable      Action = \"disable\"\n\tActionConnect      Action = \"connect\"\n\tActionDisconnect   Action = \"disconnect\"\n\tActionReload       Action = \"reload\"\n\tActionMount        Action = \"mount\"\n\tActionUnmount      Action = \"unmount\"\n\n\t// ActionExecCreate is the prefix used for exec_create events. These\n\t// event-actions are commonly followed by a colon and space (\": \"),\n\t// and the command that's defined for the exec, for example:\n\t//\n\t//\texec_create: /bin/sh -c 'echo hello'\n\t//\n\t// This is far from ideal; it's a compromise to allow filtering and\n\t// to preserve backward-compatibility.\n\tActionExecCreate Action = \"exec_create\"\n\t// ActionExecStart is the prefix used for exec_create events. These\n\t// event-actions are commonly followed by a colon and space (\": \"),\n\t// and the command that's defined for the exec, for example:\n\t//\n\t//\texec_start: /bin/sh -c 'echo hello'\n\t//\n\t// This is far from ideal; it's a compromise to allow filtering and\n\t// to preserve backward-compatibility.\n\tActionExecStart  Action = \"exec_start\"\n\tActionExecDie    Action = \"exec_die\"\n\tActionExecDetach Action = \"exec_detach\"\n\n\t// ActionHealthStatus is the prefix to use for health_status events.\n\t//\n\t// Health-status events can either have a pre-defined status, in which\n\t// case the \"health_status\" action is followed by a colon, or can be\n\t// \"free-form\", in which case they're followed by the output of the\n\t// health-check output.\n\t//\n\t// This is far form ideal, and a compromise to allow filtering, and\n\t// to preserve backward-compatibility.\n\tActionHealthStatus          Action = \"health_status\"\n\tActionHealthStatusRunning   Action = \"health_status: running\"\n\tActionHealthStatusHealthy   Action = \"health_status: healthy\"\n\tActionHealthStatusUnhealthy Action = \"health_status: unhealthy\"\n)\n\n// Actor describes something that generates events,\n// like a container, or a network, or a volume.\n// It has a defined name and a set of attributes.\n// The container attributes are its labels, other actors\n// can generate these attributes from other properties.\ntype Actor struct {\n\tID         string\n\tAttributes map[string]string\n}\n\n// Message represents the information an event contains\ntype Message struct {\n\tType   Type\n\tAction Action\n\tActor  Actor\n\t// Engine events are local scope. Cluster events are swarm scope.\n\tScope string `json:\"scope,omitempty\"`\n\n\tTime     int64 `json:\"time,omitempty\"`\n\tTimeNano int64 `json:\"timeNano,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/build_identity.go",
    "content": "package image\n\nimport (\n\t\"time\"\n)\n\n// BuildIdentity contains build reference information if image was created via build.\ntype BuildIdentity struct {\n\t// Ref is the identifier for the build request. This reference can be used to\n\t// look up the build details in BuildKit history API.\n\tRef string `json:\"Ref,omitempty\"`\n\n\t// CreatedAt is the time when the build ran.\n\tCreatedAt time.Time `json:\"CreatedAt,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/delete_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage image\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DeleteResponse delete response\n//\n// swagger:model DeleteResponse\ntype DeleteResponse struct {\n\n\t// The image ID of an image that was deleted\n\tDeleted string `json:\"Deleted,omitempty\"`\n\n\t// The image ID of an image that was untagged\n\tUntagged string `json:\"Untagged,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/disk_usage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage image\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DiskUsage represents system data usage for image resources.\n//\n// swagger:model DiskUsage\ntype DiskUsage struct {\n\n\t// Count of active images.\n\t//\n\t// Example: 1\n\tActiveCount int64 `json:\"ActiveCount,omitempty\"`\n\n\t// List of image summaries.\n\t//\n\tItems []Summary `json:\"Items,omitempty\"`\n\n\t// Disk space that can be reclaimed by removing unused images.\n\t//\n\t// Example: 12345678\n\tReclaimable int64 `json:\"Reclaimable,omitempty\"`\n\n\t// Count of all images.\n\t//\n\t// Example: 4\n\tTotalCount int64 `json:\"TotalCount,omitempty\"`\n\n\t// Disk space in use by images.\n\t//\n\t// Example: 98765432\n\tTotalSize int64 `json:\"TotalSize,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/history_response_item.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage image\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// HistoryResponseItem HistoryResponseItem\n//\n// individual image layer information in response to ImageHistory operation\n//\n// swagger:model HistoryResponseItem\ntype HistoryResponseItem struct {\n\n\t// comment\n\t// Required: true\n\tComment string `json:\"Comment\"`\n\n\t// created\n\t// Required: true\n\tCreated int64 `json:\"Created\"`\n\n\t// created by\n\t// Required: true\n\tCreatedBy string `json:\"CreatedBy\"`\n\n\t// Id\n\t// Required: true\n\tID string `json:\"Id\"`\n\n\t// size\n\t// Required: true\n\tSize int64 `json:\"Size\"`\n\n\t// tags\n\t// Required: true\n\tTags []string `json:\"Tags\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/identity.go",
    "content": "package image\n\n// Identity holds information about the identity and origin of the image.\n// This is trusted information verified by the daemon and cannot be modified\n// by tagging an image to a different name.\ntype Identity struct {\n\t// Signature contains the properties of verified signatures for the image.\n\tSignature []SignatureIdentity `json:\"Signature,omitzero\"`\n\t// Pull contains remote location information if image was created via pull.\n\t// If image was pulled via mirror, this contains the original repository location.\n\t// After successful push this images also contains the pushed repository location.\n\tPull []PullIdentity `json:\"Pull,omitzero\"`\n\t// Build contains build reference information if image was created via build.\n\tBuild []BuildIdentity `json:\"Build,omitzero\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/image.go",
    "content": "package image\n\nimport (\n\t\"time\"\n)\n\n// Metadata contains engine-local data about the image.\ntype Metadata struct {\n\t// LastTagTime is the date and time at which the image was last tagged.\n\tLastTagTime time.Time `json:\",omitempty\"`\n}\n\n// PruneReport contains the response for Engine API:\n// POST \"/images/prune\"\ntype PruneReport struct {\n\tImagesDeleted  []DeleteResponse\n\tSpaceReclaimed uint64\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/image_inspect.go",
    "content": "package image\n\nimport (\n\tdockerspec \"github.com/moby/docker-image-spec/specs-go/v1\"\n\t\"github.com/moby/moby/api/types/storage\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// RootFS returns Image's RootFS description including the layer IDs.\ntype RootFS struct {\n\tType   string   `json:\",omitempty\"`\n\tLayers []string `json:\",omitempty\"`\n}\n\n// InspectResponse contains response of Engine API:\n// GET \"/images/{name:.*}/json\"\ntype InspectResponse struct {\n\t// ID is the content-addressable ID of an image.\n\t//\n\t// This identifier is a content-addressable digest calculated from the\n\t// image's configuration (which includes the digests of layers used by\n\t// the image).\n\t//\n\t// Note that this digest differs from the `RepoDigests` below, which\n\t// holds digests of image manifests that reference the image.\n\tID string `json:\"Id\"`\n\n\t// RepoTags is a list of image names/tags in the local image cache that\n\t// reference this image.\n\t//\n\t// Multiple image tags can refer to the same image, and this list may be\n\t// empty if no tags reference the image, in which case the image is\n\t// \"untagged\", in which case it can still be referenced by its ID.\n\tRepoTags []string\n\n\t// RepoDigests is a list of content-addressable digests of locally available\n\t// image manifests that the image is referenced from. Multiple manifests can\n\t// refer to the same image.\n\t//\n\t// These digests are usually only available if the image was either pulled\n\t// from a registry, or if the image was pushed to a registry, which is when\n\t// the manifest is generated and its digest calculated.\n\tRepoDigests []string\n\n\t// Comment is an optional message that can be set when committing or\n\t// importing the image. This field is omitted if not set.\n\tComment string `json:\",omitempty\"`\n\n\t// Created is the date and time at which the image was created, formatted in\n\t// RFC 3339 nano-seconds (time.RFC3339Nano).\n\t//\n\t// This information is only available if present in the image,\n\t// and omitted otherwise.\n\tCreated string `json:\",omitempty\"`\n\n\t// Author is the name of the author that was specified when committing the\n\t// image, or as specified through MAINTAINER (deprecated) in the Dockerfile.\n\t// This field is omitted if not set.\n\tAuthor string `json:\",omitempty\"`\n\tConfig *dockerspec.DockerOCIImageConfig\n\n\t// Architecture is the hardware CPU architecture that the image runs on.\n\tArchitecture string\n\n\t// Variant is the CPU architecture variant (presently ARM-only).\n\tVariant string `json:\",omitempty\"`\n\n\t// OS is the Operating System the image is built to run on.\n\tOs string\n\n\t// OsVersion is the version of the Operating System the image is built to\n\t// run on (especially for Windows).\n\tOsVersion string `json:\",omitempty\"`\n\n\t// Size is the total size of the image including all layers it is composed of.\n\tSize int64\n\n\t// GraphDriver holds information about the storage driver used to store the\n\t// container's and image's filesystem.\n\tGraphDriver *storage.DriverData `json:\"GraphDriver,omitempty\"`\n\n\t// RootFS contains information about the image's RootFS, including the\n\t// layer IDs.\n\tRootFS RootFS\n\n\t// Metadata of the image in the local cache.\n\t//\n\t// This information is local to the daemon, and not part of the image itself.\n\tMetadata Metadata\n\n\t// Descriptor is the OCI descriptor of the image target.\n\t// It's only set if the daemon provides a multi-platform image store.\n\t//\n\t// WARNING: This is experimental and may change at any time without any backward\n\t// compatibility.\n\tDescriptor *ocispec.Descriptor `json:\"Descriptor,omitempty\"`\n\n\t// Manifests is a list of image manifests available in this image. It\n\t// provides a more detailed view of the platform-specific image manifests or\n\t// other image-attached data like build attestations.\n\t//\n\t// Only available if the daemon provides a multi-platform image store, the client\n\t// requests manifests AND does not request a specific platform.\n\t//\n\t// WARNING: This is experimental and may change at any time without any backward\n\t// compatibility.\n\tManifests []ManifestSummary `json:\"Manifests,omitempty\"`\n\n\t// Identity holds information about the identity and origin of the image.\n\t// This is trusted information verified by the daemon and cannot be modified\n\t// by tagging an image to a different name.\n\tIdentity *Identity `json:\"Identity,omitempty\"`\n}\n\n// SignatureTimestampType is the type of timestamp used in the signature.\ntype SignatureTimestampType string\n\nconst (\n\tSignatureTimestampTlog      SignatureTimestampType = \"Tlog\"\n\tSignatureTimestampAuthority SignatureTimestampType = \"TimestampAuthority\"\n)\n\n// SignatureType is the type of signature format.\ntype SignatureType string\n\nconst (\n\tSignatureTypeBundleV03       SignatureType = \"bundle-v0.3\"\n\tSignatureTypeSimpleSigningV1 SignatureType = \"simplesigning-v1\"\n)\n\n// KnownSignerIdentity is an identifier for a special signer identity that is known to the implementation.\ntype KnownSignerIdentity string\n\nconst (\n\t// KnownSignerDHI is the known identity for Docker Hardened Images.\n\tKnownSignerDHI KnownSignerIdentity = \"DHI\"\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/manifest.go",
    "content": "package image\n\nimport (\n\t\"github.com/opencontainers/go-digest\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\ntype ManifestKind string\n\nconst (\n\tManifestKindImage       ManifestKind = \"image\"\n\tManifestKindAttestation ManifestKind = \"attestation\"\n\tManifestKindUnknown     ManifestKind = \"unknown\"\n)\n\ntype ManifestSummary struct {\n\t// ID is the content-addressable ID of an image and is the same as the\n\t// digest of the image manifest.\n\t//\n\t// Required: true\n\tID string `json:\"ID\"`\n\n\t// Descriptor is the OCI descriptor of the image.\n\t//\n\t// Required: true\n\tDescriptor ocispec.Descriptor `json:\"Descriptor\"`\n\n\t// Indicates whether all the child content (image config, layers) is\n\t// fully available locally\n\t//\n\t// Required: true\n\tAvailable bool `json:\"Available\"`\n\n\t// Size is the size information of the content related to this manifest.\n\t// Note: These sizes only take the locally available content into account.\n\t//\n\t// Required: true\n\tSize struct {\n\t\t// Content is the size (in bytes) of all the locally present\n\t\t// content in the content store (e.g. image config, layers)\n\t\t// referenced by this manifest and its children.\n\t\t// This only includes blobs in the content store.\n\t\tContent int64 `json:\"Content\"`\n\n\t\t// Total is the total size (in bytes) of all the locally present\n\t\t// data (both distributable and non-distributable) that's related to\n\t\t// this manifest and its children.\n\t\t// This equal to the sum of [Content] size AND all the sizes in the\n\t\t// [Size] struct present in the Kind-specific data struct.\n\t\t// For example, for an image kind (Kind == ManifestKindImage),\n\t\t// this would include the size of the image content and unpacked\n\t\t// image snapshots ([Size.Content] + [ImageData.Size.Unpacked]).\n\t\tTotal int64 `json:\"Total\"`\n\t} `json:\"Size\"`\n\n\t// Kind is the kind of the image manifest.\n\t//\n\t// Required: true\n\tKind ManifestKind `json:\"Kind\"`\n\n\t// Fields below are specific to the kind of the image manifest.\n\n\t// Present only if Kind == ManifestKindImage.\n\tImageData *ImageProperties `json:\"ImageData,omitempty\"`\n\n\t// Present only if Kind == ManifestKindAttestation.\n\tAttestationData *AttestationProperties `json:\"AttestationData,omitempty\"`\n}\n\ntype ImageProperties struct {\n\t// Platform is the OCI platform object describing the platform of the image.\n\t//\n\t// Required: true\n\tPlatform ocispec.Platform `json:\"Platform\"`\n\n\t// Identity holds information about the identity and origin of the image.\n\t// For image list responses, this can duplicate Build/Pull fields across\n\t// image manifests, because those parts of identity are image-level metadata.\n\tIdentity *Identity `json:\"Identity,omitempty\"`\n\n\tSize struct {\n\t\t// Unpacked is the size (in bytes) of the locally unpacked\n\t\t// (uncompressed) image content that's directly usable by the containers\n\t\t// running this image.\n\t\t// It's independent of the distributable content - e.g.\n\t\t// the image might still have an unpacked data that's still used by\n\t\t// some container even when the distributable/compressed content is\n\t\t// already gone.\n\t\t//\n\t\t// Required: true\n\t\tUnpacked int64 `json:\"Unpacked\"`\n\t}\n\n\t// Containers is an array containing the IDs of the containers that are\n\t// using this image.\n\t//\n\t// Required: true\n\tContainers []string `json:\"Containers\"`\n}\n\ntype AttestationProperties struct {\n\t// For is the digest of the image manifest that this attestation is for.\n\tFor digest.Digest `json:\"For\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/pull_identity.go",
    "content": "package image\n\n// PullIdentity contains remote location information if image was created via pull.\n// If image was pulled via mirror, this contains the original repository location.\ntype PullIdentity struct {\n\t// Repository is the remote repository location the image was pulled from.\n\tRepository string `json:\"Repository,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/signature_identity.go",
    "content": "package image\n\n// SignatureIdentity contains the properties of verified signatures for the image.\ntype SignatureIdentity struct {\n\t// Name is a textual description summarizing the type of signature.\n\tName string `json:\"Name,omitempty\"`\n\t// Timestamps contains a list of verified signed timestamps for the signature.\n\tTimestamps []SignatureTimestamp `json:\"Timestamps,omitzero\"`\n\t// KnownSigner is an identifier for a special signer identity that is known to the implementation.\n\tKnownSigner KnownSignerIdentity `json:\"KnownSigner,omitempty\"`\n\t// DockerReference is the Docker image reference associated with the signature.\n\t// This is an optional field only present in older hashedrecord signatures.\n\tDockerReference string `json:\"DockerReference,omitempty\"`\n\t// Signer contains information about the signer certificate used to sign the image.\n\tSigner *SignerIdentity `json:\"Signer,omitempty\"`\n\t// SignatureType is the type of signature format. E.g. \"bundle-v0.3\" or \"hashedrecord\".\n\tSignatureType SignatureType `json:\"SignatureType,omitempty\"`\n\n\t// Error contains error information if signature verification failed.\n\t// Other fields will be empty in this case.\n\tError string `json:\"Error,omitempty\"`\n\t// Warnings contains any warnings that occurred during signature verification.\n\t// For example, if there was no internet connectivity and cached trust roots were used.\n\t// Warning does not indicate a failed verification but may point to configuration issues.\n\tWarnings []string `json:\"Warnings,omitzero\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/signature_timestamp.go",
    "content": "package image\n\nimport (\n\t\"time\"\n)\n\n// SignatureTimestamp contains information about a verified signed timestamp for an image signature.\ntype SignatureTimestamp struct {\n\tType      SignatureTimestampType `json:\"Type\"`\n\tURI       string                 `json:\"URI\"`\n\tTimestamp time.Time              `json:\"Timestamp\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/signer_identity.go",
    "content": "package image\n\n// SignerIdentity contains information about the signer certificate used to sign the image.\n// This is [certificate.Summary] with deprecated fields removed and keys in Moby uppercase style.\n//\n// [certificate.Summary]: https://pkg.go.dev/github.com/sigstore/sigstore-go/pkg/fulcio/certificate#Summary\ntype SignerIdentity struct {\n\tCertificateIssuer      string `json:\"CertificateIssuer\"`\n\tSubjectAlternativeName string `json:\"SubjectAlternativeName\"`\n\t// The OIDC issuer. Should match `iss` claim of ID token or, in the case of\n\t// a federated login like Dex it should match the issuer URL of the\n\t// upstream issuer. The issuer is not set the extensions are invalid and\n\t// will fail to render.\n\tIssuer string `json:\"Issuer,omitempty\"` // OID 1.3.6.1.4.1.57264.1.8 and 1.3.6.1.4.1.57264.1.1 (Deprecated)\n\n\t// Reference to specific build instructions that are responsible for signing.\n\tBuildSignerURI string `json:\"BuildSignerURI,omitempty\"` // 1.3.6.1.4.1.57264.1.9\n\n\t// Immutable reference to the specific version of the build instructions that is responsible for signing.\n\tBuildSignerDigest string `json:\"BuildSignerDigest,omitempty\"` // 1.3.6.1.4.1.57264.1.10\n\n\t// Specifies whether the build took place in platform-hosted cloud infrastructure or customer/self-hosted infrastructure.\n\tRunnerEnvironment string `json:\"RunnerEnvironment,omitempty\"` // 1.3.6.1.4.1.57264.1.11\n\n\t// Source repository URL that the build was based on.\n\tSourceRepositoryURI string `json:\"SourceRepositoryURI,omitempty\"` // 1.3.6.1.4.1.57264.1.12\n\n\t// Immutable reference to a specific version of the source code that the build was based upon.\n\tSourceRepositoryDigest string `json:\"SourceRepositoryDigest,omitempty\"` // 1.3.6.1.4.1.57264.1.13\n\n\t// Source Repository Ref that the build run was based upon.\n\tSourceRepositoryRef string `json:\"SourceRepositoryRef,omitempty\"` // 1.3.6.1.4.1.57264.1.14\n\n\t// Immutable identifier for the source repository the workflow was based upon.\n\tSourceRepositoryIdentifier string `json:\"SourceRepositoryIdentifier,omitempty\"` // 1.3.6.1.4.1.57264.1.15\n\n\t// Source repository owner URL of the owner of the source repository that the build was based on.\n\tSourceRepositoryOwnerURI string `json:\"SourceRepositoryOwnerURI,omitempty\"` // 1.3.6.1.4.1.57264.1.16\n\n\t// Immutable identifier for the owner of the source repository that the workflow was based upon.\n\tSourceRepositoryOwnerIdentifier string `json:\"SourceRepositoryOwnerIdentifier,omitempty\"` // 1.3.6.1.4.1.57264.1.17\n\n\t// Build Config URL to the top-level/initiating build instructions.\n\tBuildConfigURI string `json:\"BuildConfigURI,omitempty\"` // 1.3.6.1.4.1.57264.1.18\n\n\t// Immutable reference to the specific version of the top-level/initiating build instructions.\n\tBuildConfigDigest string `json:\"BuildConfigDigest,omitempty\"` // 1.3.6.1.4.1.57264.1.19\n\n\t// Event or action that initiated the build.\n\tBuildTrigger string `json:\"BuildTrigger,omitempty\"` // 1.3.6.1.4.1.57264.1.20\n\n\t// Run Invocation URL to uniquely identify the build execution.\n\tRunInvocationURI string `json:\"RunInvocationURI,omitempty\"` // 1.3.6.1.4.1.57264.1.21\n\n\t// Source repository visibility at the time of signing the certificate.\n\tSourceRepositoryVisibilityAtSigning string `json:\"SourceRepositoryVisibilityAtSigning,omitempty\"` // 1.3.6.1.4.1.57264.1.22\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/image/summary.go",
    "content": "package image\n\nimport ocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n\ntype Summary struct {\n\t// Number of containers using this image. Includes both stopped and running\n\t// containers.\n\t//\n\t// This size is not calculated by default, and depends on which API endpoint\n\t// is used. `-1` indicates that the value has not been set / calculated.\n\t//\n\t// Required: true\n\tContainers int64 `json:\"Containers\"`\n\n\t// Date and time at which the image was created as a Unix timestamp\n\t// (number of seconds since EPOCH).\n\t//\n\t// Required: true\n\tCreated int64 `json:\"Created\"`\n\n\t// ID is the content-addressable ID of an image.\n\t//\n\t// This identifier is a content-addressable digest calculated from the\n\t// image's configuration (which includes the digests of layers used by\n\t// the image).\n\t//\n\t// Note that this digest differs from the `RepoDigests` below, which\n\t// holds digests of image manifests that reference the image.\n\t//\n\t// Required: true\n\tID string `json:\"Id\"`\n\n\t// User-defined key/value metadata.\n\t// Required: true\n\tLabels map[string]string `json:\"Labels\"`\n\n\t// ID of the parent image.\n\t//\n\t// Depending on how the image was created, this field may be empty and\n\t// is only set for images that were built/created locally. This field\n\t// is empty if the image was pulled from an image registry.\n\t//\n\t// Required: true\n\tParentID string `json:\"ParentId\"`\n\n\t// Descriptor is the OCI descriptor of the image target.\n\t// It's only set if the daemon provides a multi-platform image store.\n\t//\n\t// WARNING: This is experimental and may change at any time without any backward\n\t// compatibility.\n\tDescriptor *ocispec.Descriptor `json:\"Descriptor,omitempty\"`\n\n\t// Manifests is a list of image manifests available in this image.  It\n\t// provides a more detailed view of the platform-specific image manifests or\n\t// other image-attached data like build attestations.\n\t//\n\t// WARNING: This is experimental and may change at any time without any backward\n\t// compatibility.\n\tManifests []ManifestSummary `json:\"Manifests,omitempty\"`\n\n\t// List of content-addressable digests of locally available image manifests\n\t// that the image is referenced from. Multiple manifests can refer to the\n\t// same image.\n\t//\n\t// These digests are usually only available if the image was either pulled\n\t// from a registry, or if the image was pushed to a registry, which is when\n\t// the manifest is generated and its digest calculated.\n\t//\n\t// Required: true\n\tRepoDigests []string `json:\"RepoDigests\"`\n\n\t// List of image names/tags in the local image cache that reference this\n\t// image.\n\t//\n\t// Multiple image tags can refer to the same image, and this list may be\n\t// empty if no tags reference the image, in which case the image is\n\t// \"untagged\", in which case it can still be referenced by its ID.\n\t//\n\t// Required: true\n\tRepoTags []string `json:\"RepoTags\"`\n\n\t// Total size of image layers that are shared between this image and other\n\t// images.\n\t//\n\t// This size is not calculated by default. `-1` indicates that the value\n\t// has not been set / calculated.\n\t//\n\t// Required: true\n\tSharedSize int64 `json:\"SharedSize\"`\n\n\t// Total size of the image including all layers it is composed of.\n\t//\n\t// Required: true\n\tSize int64 `json:\"Size\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/jsonstream/json_error.go",
    "content": "package jsonstream\n\n// Error wraps a concrete Code and Message, Code is\n// an integer error code, Message is the error message.\ntype Error struct {\n\tCode    int    `json:\"code,omitempty\"`\n\tMessage string `json:\"message,omitempty\"`\n}\n\nfunc (e *Error) Error() string {\n\tif e == nil {\n\t\treturn \"<nil>\"\n\t}\n\treturn e.Message\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/jsonstream/message.go",
    "content": "package jsonstream\n\nimport \"encoding/json\"\n\n// Message defines a message struct. It describes\n// the created time, where it from, status, ID of the\n// message.\ntype Message struct {\n\tStream   string           `json:\"stream,omitempty\"`\n\tStatus   string           `json:\"status,omitempty\"`\n\tProgress *Progress        `json:\"progressDetail,omitempty\"`\n\tID       string           `json:\"id,omitempty\"`\n\tError    *Error           `json:\"errorDetail,omitempty\"`\n\tAux      *json.RawMessage `json:\"aux,omitempty\"` // Aux contains out-of-band data, such as digests for push signing and image id after building.\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/jsonstream/progress.go",
    "content": "package jsonstream\n\n// Progress describes a progress message in a JSON stream.\ntype Progress struct {\n\tCurrent    int64  `json:\"current,omitempty\"`    // Current is the current status and value of the progress made towards Total.\n\tTotal      int64  `json:\"total,omitempty\"`      // Total is the end value describing when we made 100% progress for an operation.\n\tStart      int64  `json:\"start,omitempty\"`      // Start is the initial value for the operation.\n\tHideCounts bool   `json:\"hidecounts,omitempty\"` // HideCounts. if true, hides the progress count indicator (xB/yB).\n\tUnits      string `json:\"units,omitempty\"`      // Units is the unit to print for progress. It defaults to \"bytes\" if empty.\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/mount/mount.go",
    "content": "package mount\n\nimport (\n\t\"os\"\n)\n\n// Type represents the type of a mount.\ntype Type string\n\n// Type constants\nconst (\n\t// TypeBind is the type for mounting host dir\n\tTypeBind Type = \"bind\"\n\t// TypeVolume is the type for remote storage volumes\n\tTypeVolume Type = \"volume\"\n\t// TypeTmpfs is the type for mounting tmpfs\n\tTypeTmpfs Type = \"tmpfs\"\n\t// TypeNamedPipe is the type for mounting Windows named pipes\n\tTypeNamedPipe Type = \"npipe\"\n\t// TypeCluster is the type for Swarm Cluster Volumes.\n\tTypeCluster Type = \"cluster\"\n\t// TypeImage is the type for mounting another image's filesystem\n\tTypeImage Type = \"image\"\n)\n\n// Mount represents a mount (volume).\ntype Mount struct {\n\tType Type `json:\",omitempty\"`\n\t// Source specifies the name of the mount. Depending on mount type, this\n\t// may be a volume name or a host path, or even ignored.\n\t// Source is not supported for tmpfs (must be an empty value)\n\tSource      string      `json:\",omitempty\"`\n\tTarget      string      `json:\",omitempty\"`\n\tReadOnly    bool        `json:\",omitempty\"` // attempts recursive read-only if possible\n\tConsistency Consistency `json:\",omitempty\"`\n\n\tBindOptions    *BindOptions    `json:\",omitempty\"`\n\tVolumeOptions  *VolumeOptions  `json:\",omitempty\"`\n\tImageOptions   *ImageOptions   `json:\",omitempty\"`\n\tTmpfsOptions   *TmpfsOptions   `json:\",omitempty\"`\n\tClusterOptions *ClusterOptions `json:\",omitempty\"`\n}\n\n// Propagation represents the propagation of a mount.\ntype Propagation string\n\nconst (\n\t// PropagationRPrivate RPRIVATE\n\tPropagationRPrivate Propagation = \"rprivate\"\n\t// PropagationPrivate PRIVATE\n\tPropagationPrivate Propagation = \"private\"\n\t// PropagationRShared RSHARED\n\tPropagationRShared Propagation = \"rshared\"\n\t// PropagationShared SHARED\n\tPropagationShared Propagation = \"shared\"\n\t// PropagationRSlave RSLAVE\n\tPropagationRSlave Propagation = \"rslave\"\n\t// PropagationSlave SLAVE\n\tPropagationSlave Propagation = \"slave\"\n)\n\n// Propagations is the list of all valid mount propagations\nvar Propagations = []Propagation{\n\tPropagationRPrivate,\n\tPropagationPrivate,\n\tPropagationRShared,\n\tPropagationShared,\n\tPropagationRSlave,\n\tPropagationSlave,\n}\n\n// Consistency represents the consistency requirements of a mount.\ntype Consistency string\n\nconst (\n\t// ConsistencyFull guarantees bind mount-like consistency\n\tConsistencyFull Consistency = \"consistent\"\n\t// ConsistencyCached mounts can cache read data and FS structure\n\tConsistencyCached Consistency = \"cached\"\n\t// ConsistencyDelegated mounts can cache read and written data and structure\n\tConsistencyDelegated Consistency = \"delegated\"\n\t// ConsistencyDefault provides \"consistent\" behavior unless overridden\n\tConsistencyDefault Consistency = \"default\"\n)\n\n// BindOptions defines options specific to mounts of type \"bind\".\ntype BindOptions struct {\n\tPropagation      Propagation `json:\",omitempty\"`\n\tNonRecursive     bool        `json:\",omitempty\"`\n\tCreateMountpoint bool        `json:\",omitempty\"`\n\t// ReadOnlyNonRecursive makes the mount non-recursively read-only, but still leaves the mount recursive\n\t// (unless NonRecursive is set to true in conjunction).\n\tReadOnlyNonRecursive bool `json:\",omitempty\"`\n\t// ReadOnlyForceRecursive raises an error if the mount cannot be made recursively read-only.\n\tReadOnlyForceRecursive bool `json:\",omitempty\"`\n}\n\n// VolumeOptions represents the options for a mount of type volume.\ntype VolumeOptions struct {\n\tNoCopy       bool              `json:\",omitempty\"`\n\tLabels       map[string]string `json:\",omitempty\"`\n\tSubpath      string            `json:\",omitempty\"`\n\tDriverConfig *Driver           `json:\",omitempty\"`\n}\n\ntype ImageOptions struct {\n\tSubpath string `json:\",omitempty\"`\n}\n\n// Driver represents a volume driver.\ntype Driver struct {\n\tName    string            `json:\",omitempty\"`\n\tOptions map[string]string `json:\",omitempty\"`\n}\n\n// TmpfsOptions defines options specific to mounts of type \"tmpfs\".\ntype TmpfsOptions struct {\n\t// Size sets the size of the tmpfs, in bytes.\n\t//\n\t// This will be converted to an operating system specific value\n\t// depending on the host. For example, on linux, it will be converted to\n\t// use a 'k', 'm' or 'g' syntax. BSD, though not widely supported with\n\t// docker, uses a straight byte value.\n\t//\n\t// Percentages are not supported.\n\tSizeBytes int64 `json:\",omitempty\"`\n\t// Mode of the tmpfs upon creation\n\tMode os.FileMode `json:\",omitempty\"`\n\t// Options to be passed to the tmpfs mount. An array of arrays. Flag\n\t// options should be provided as 1-length arrays. Other types should be\n\t// provided as 2-length arrays, where the first item is the key and the\n\t// second the value.\n\tOptions [][]string `json:\",omitempty\"`\n\t// TODO(stevvooe): There are several more tmpfs flags, specified in the\n\t// daemon, that are accepted. Only the most basic are added for now.\n\t//\n\t// From https://github.com/moby/sys/blob/mount/v0.1.1/mount/flags.go#L47-L56\n\t//\n\t// var validFlags = map[string]bool{\n\t// \t\"\":          true,\n\t// \t\"size\":      true, X\n\t// \t\"mode\":      true, X\n\t// \t\"uid\":       true,\n\t// \t\"gid\":       true,\n\t// \t\"nr_inodes\": true,\n\t// \t\"nr_blocks\": true,\n\t// \t\"mpol\":      true,\n\t// }\n\t//\n\t// Some of these may be straightforward to add, but others, such as\n\t// uid/gid have implications in a clustered system.\n}\n\n// ClusterOptions specifies options for a Cluster volume.\ntype ClusterOptions struct {\n\t// intentionally empty\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/config_reference.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ConfigReference The config-only network source to provide the configuration for\n// this network.\n//\n// swagger:model ConfigReference\ntype ConfigReference struct {\n\n\t// The name of the config-only network that provides the network's\n\t// configuration. The specified network must be an existing config-only\n\t// network. Only network names are allowed, not network IDs.\n\t//\n\t// Example: config_only_network_01\n\tNetwork string `json:\"Network\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/connect_request.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ConnectRequest NetworkConnectRequest represents the data to be used to connect a container to a network.\n//\n// swagger:model ConnectRequest\ntype ConnectRequest struct {\n\n\t// The ID or name of the container to connect to the network.\n\t// Example: 3613f73ba0e4\n\t// Required: true\n\tContainer string `json:\"Container\"`\n\n\t// endpoint config\n\tEndpointConfig *EndpointSettings `json:\"EndpointConfig,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/create_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// CreateResponse NetworkCreateResponse\n//\n// # OK response to NetworkCreate operation\n//\n// swagger:model CreateResponse\ntype CreateResponse struct {\n\n\t// The ID of the created network.\n\t// Example: b5c4fc71e8022147cd25de22b22173de4e3b170134117172eb595cb91b4e7e5d\n\t// Required: true\n\tID string `json:\"Id\"`\n\n\t// Warnings encountered when creating the container\n\t// Required: true\n\tWarning string `json:\"Warning\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/disconnect_request.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DisconnectRequest NetworkDisconnectRequest represents the data to be used to disconnect a container from a network.\n//\n// swagger:model DisconnectRequest\ntype DisconnectRequest struct {\n\n\t// The ID or name of the container to disconnect from the network.\n\t// Example: 3613f73ba0e4\n\t// Required: true\n\tContainer string `json:\"Container\"`\n\n\t// Force the container to disconnect from the network.\n\t// Example: false\n\tForce bool `json:\"Force\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/endpoint.go",
    "content": "package network\n\nimport (\n\t\"maps\"\n\t\"net/netip\"\n\t\"slices\"\n)\n\n// EndpointSettings stores the network endpoint details\ntype EndpointSettings struct {\n\t// Configuration data\n\tIPAMConfig *EndpointIPAMConfig\n\tLinks      []string\n\tAliases    []string // Aliases holds the list of extra, user-specified DNS names for this endpoint.\n\tDriverOpts map[string]string\n\n\t// GwPriority determines which endpoint will provide the default gateway\n\t// for the container. The endpoint with the highest priority will be used.\n\t// If multiple endpoints have the same priority, they are lexicographically\n\t// sorted based on their network name, and the one that sorts first is picked.\n\tGwPriority int\n\n\t// Operational data\n\n\tNetworkID  string\n\tEndpointID string\n\tGateway    netip.Addr\n\tIPAddress  netip.Addr\n\n\t// MacAddress may be used to specify a MAC address when the container is created.\n\t// Once the container is running, it becomes operational data (it may contain a\n\t// generated address).\n\tMacAddress          HardwareAddr\n\tIPPrefixLen         int\n\tIPv6Gateway         netip.Addr\n\tGlobalIPv6Address   netip.Addr\n\tGlobalIPv6PrefixLen int\n\t// DNSNames holds all the (non fully qualified) DNS names associated to this\n\t// endpoint. The first entry is used to generate PTR records.\n\tDNSNames []string\n}\n\n// Copy makes a deep copy of `EndpointSettings`\nfunc (es *EndpointSettings) Copy() *EndpointSettings {\n\tif es == nil {\n\t\treturn nil\n\t}\n\n\tepCopy := *es\n\tepCopy.IPAMConfig = es.IPAMConfig.Copy()\n\tepCopy.Links = slices.Clone(es.Links)\n\tepCopy.Aliases = slices.Clone(es.Aliases)\n\tepCopy.DNSNames = slices.Clone(es.DNSNames)\n\tepCopy.DriverOpts = maps.Clone(es.DriverOpts)\n\n\treturn &epCopy\n}\n\n// EndpointIPAMConfig represents IPAM configurations for the endpoint\ntype EndpointIPAMConfig struct {\n\tIPv4Address  netip.Addr   `json:\"IPv4Address,omitzero\"`\n\tIPv6Address  netip.Addr   `json:\"IPv6Address,omitzero\"`\n\tLinkLocalIPs []netip.Addr `json:\"LinkLocalIPs,omitempty\"`\n}\n\n// Copy makes a copy of the endpoint ipam config\nfunc (cfg *EndpointIPAMConfig) Copy() *EndpointIPAMConfig {\n\tif cfg == nil {\n\t\treturn nil\n\t}\n\tcfgCopy := *cfg\n\tcfgCopy.LinkLocalIPs = slices.Clone(cfg.LinkLocalIPs)\n\treturn &cfgCopy\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/endpoint_resource.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/netip\"\n)\n\n// EndpointResource contains network resources allocated and used for a container in a network.\n//\n// swagger:model EndpointResource\ntype EndpointResource struct {\n\n\t// name\n\t// Example: container_1\n\tName string `json:\"Name\"`\n\n\t// endpoint ID\n\t// Example: 628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a\n\tEndpointID string `json:\"EndpointID\"`\n\n\t// mac address\n\t// Example: 02:42:ac:13:00:02\n\tMacAddress HardwareAddr `json:\"MacAddress\"`\n\n\t// IPv4 address\n\t// Example: 172.19.0.2/16\n\tIPv4Address netip.Prefix `json:\"IPv4Address\"`\n\n\t// IPv6 address\n\tIPv6Address netip.Prefix `json:\"IPv6Address\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/hwaddr.go",
    "content": "package network\n\nimport (\n\t\"encoding\"\n\t\"fmt\"\n\t\"net\"\n)\n\n// A HardwareAddr represents a physical hardware address.\n// It implements [encoding.TextMarshaler] and [encoding.TextUnmarshaler]\n// in the absence of go.dev/issue/29678.\ntype HardwareAddr net.HardwareAddr\n\nvar (\n\t_ encoding.TextMarshaler   = (HardwareAddr)(nil)\n\t_ encoding.TextUnmarshaler = (*HardwareAddr)(nil)\n\t_ fmt.Stringer             = (HardwareAddr)(nil)\n)\n\nfunc (m *HardwareAddr) UnmarshalText(text []byte) error {\n\tif len(text) == 0 {\n\t\t*m = nil\n\t\treturn nil\n\t}\n\thw, err := net.ParseMAC(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*m = HardwareAddr(hw)\n\treturn nil\n}\n\nfunc (m HardwareAddr) MarshalText() ([]byte, error) {\n\treturn []byte(net.HardwareAddr(m).String()), nil\n}\n\nfunc (m HardwareAddr) String() string {\n\treturn net.HardwareAddr(m).String()\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/inspect.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Inspect The body of the \"get network\" http response message.\n//\n// swagger:model Inspect\ntype Inspect struct {\n\tNetwork\n\n\t// Contains endpoints attached to the network.\n\t//\n\t// Example: {\"19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c\":{\"EndpointID\":\"628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a\",\"IPv4Address\":\"172.19.0.2/16\",\"IPv6Address\":\"\",\"MacAddress\":\"02:42:ac:13:00:02\",\"Name\":\"test\"}}\n\tContainers map[string]EndpointResource `json:\"Containers\"`\n\n\t// List of services using the network. This field is only present for\n\t// swarm scope networks, and omitted for local scope networks.\n\t//\n\tServices map[string]ServiceInfo `json:\"Services,omitempty\"`\n\n\t// provides runtime information about the network such as the number of allocated IPs.\n\t//\n\tStatus *Status `json:\"Status,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/ipam.go",
    "content": "package network\n\nimport (\n\t\"net/netip\"\n)\n\n// IPAM represents IP Address Management\ntype IPAM struct {\n\tDriver  string\n\tOptions map[string]string // Per network IPAM driver options\n\tConfig  []IPAMConfig\n}\n\n// IPAMConfig represents IPAM configurations\ntype IPAMConfig struct {\n\tSubnet     netip.Prefix          `json:\"Subnet,omitzero\"`\n\tIPRange    netip.Prefix          `json:\"IPRange,omitzero\"`\n\tGateway    netip.Addr            `json:\"Gateway,omitzero\"`\n\tAuxAddress map[string]netip.Addr `json:\"AuxiliaryAddresses,omitempty\"`\n}\n\ntype SubnetStatuses = map[netip.Prefix]SubnetStatus\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/ipam_status.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// IPAMStatus IPAM status\n//\n// swagger:model IPAMStatus\ntype IPAMStatus struct {\n\n\t// subnets\n\t// Example: {\"172.16.0.0/16\":{\"DynamicIPsAvailable\":65533,\"IPsInUse\":3},\"2001:db8:abcd:0012::0/96\":{\"DynamicIPsAvailable\":4294967291,\"IPsInUse\":5}}\n\tSubnets SubnetStatuses `json:\"Subnets,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/network.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\ttimeext \"time\"\n)\n\n// Network network\n//\n// swagger:model Network\ntype Network struct {\n\n\t// Name of the network.\n\t//\n\t// Example: my_network\n\tName string `json:\"Name\"`\n\n\t// ID that uniquely identifies a network on a single machine.\n\t//\n\t// Example: 7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99\n\tID string `json:\"Id\"`\n\n\t// Date and time at which the network was created in\n\t// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n\t//\n\t// Example: 2016-10-19T04:33:30.360899459Z\n\tCreated timeext.Time `json:\"Created\"`\n\n\t// The level at which the network exists (e.g. `swarm` for cluster-wide\n\t// or `local` for machine level)\n\t//\n\t// Example: local\n\tScope string `json:\"Scope\"`\n\n\t// The name of the driver used to create the network (e.g. `bridge`,\n\t// `overlay`).\n\t//\n\t// Example: overlay\n\tDriver string `json:\"Driver\"`\n\n\t// Whether the network was created with IPv4 enabled.\n\t//\n\t// Example: true\n\tEnableIPv4 bool `json:\"EnableIPv4\"`\n\n\t// Whether the network was created with IPv6 enabled.\n\t//\n\t// Example: false\n\tEnableIPv6 bool `json:\"EnableIPv6\"`\n\n\t// The network's IP Address Management.\n\t//\n\tIPAM IPAM `json:\"IPAM\"`\n\n\t// Whether the network is created to only allow internal networking\n\t// connectivity.\n\t//\n\t// Example: false\n\tInternal bool `json:\"Internal\"`\n\n\t// Whether a global / swarm scope network is manually attachable by regular\n\t// containers from workers in swarm mode.\n\t//\n\t// Example: false\n\tAttachable bool `json:\"Attachable\"`\n\n\t// Whether the network is providing the routing-mesh for the swarm cluster.\n\t//\n\t// Example: false\n\tIngress bool `json:\"Ingress\"`\n\n\t// config from\n\tConfigFrom ConfigReference `json:\"ConfigFrom\"`\n\n\t// Whether the network is a config-only network. Config-only networks are\n\t// placeholder networks for network configurations to be used by other\n\t// networks. Config-only networks cannot be used directly to run containers\n\t// or services.\n\t//\n\tConfigOnly bool `json:\"ConfigOnly\"`\n\n\t// Network-specific options uses when creating the network.\n\t//\n\t// Example: {\"com.docker.network.bridge.default_bridge\":\"true\",\"com.docker.network.bridge.enable_icc\":\"true\",\"com.docker.network.bridge.enable_ip_masquerade\":\"true\",\"com.docker.network.bridge.host_binding_ipv4\":\"0.0.0.0\",\"com.docker.network.bridge.name\":\"docker0\",\"com.docker.network.driver.mtu\":\"1500\"}\n\tOptions map[string]string `json:\"Options\"`\n\n\t// Metadata specific to the network being created.\n\t//\n\t// Example: {\"com.example.some-label\":\"some-value\",\"com.example.some-other-label\":\"some-other-value\"}\n\tLabels map[string]string `json:\"Labels\"`\n\n\t// List of peer nodes for an overlay network. This field is only present\n\t// for overlay networks, and omitted for other network types.\n\t//\n\tPeers []PeerInfo `json:\"Peers,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/network_types.go",
    "content": "package network\n\nconst (\n\t// NetworkDefault is a platform-independent alias to choose the platform-specific default network stack.\n\tNetworkDefault = \"default\"\n\t// NetworkHost is the name of the predefined network used when the NetworkMode host is selected (only available on Linux)\n\tNetworkHost = \"host\"\n\t// NetworkNone is the name of the predefined network used when the NetworkMode none is selected (available on both Linux and Windows)\n\tNetworkNone = \"none\"\n\t// NetworkBridge is the name of the default network on Linux\n\tNetworkBridge = \"bridge\"\n\t// NetworkNat is the name of the default network on Windows\n\tNetworkNat = \"nat\"\n)\n\n// CreateRequest is the request message sent to the server for network create call.\ntype CreateRequest struct {\n\tName       string            // Name is the requested name of the network.\n\tDriver     string            // Driver is the driver-name used to create the network (e.g. `bridge`, `overlay`)\n\tScope      string            // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level).\n\tEnableIPv4 *bool             `json:\",omitempty\"` // EnableIPv4 represents whether to enable IPv4.\n\tEnableIPv6 *bool             `json:\",omitempty\"` // EnableIPv6 represents whether to enable IPv6.\n\tIPAM       *IPAM             // IPAM is the network's IP Address Management.\n\tInternal   bool              // Internal represents if the network is used internal only.\n\tAttachable bool              // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode.\n\tIngress    bool              // Ingress indicates the network is providing the routing-mesh for the swarm cluster.\n\tConfigOnly bool              // ConfigOnly creates a config-only network. Config-only networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services.\n\tConfigFrom *ConfigReference  // ConfigFrom specifies the source which will provide the configuration for this network. The specified network must be a config-only network; see [CreateOptions.ConfigOnly].\n\tOptions    map[string]string // Options specifies the network-specific options to use for when creating the network.\n\tLabels     map[string]string // Labels holds metadata specific to the network being created.\n}\n\n// NetworkingConfig represents the container's networking configuration for each of its interfaces\n// Carries the networking configs specified in the `docker run` and `docker network connect` commands\ntype NetworkingConfig struct {\n\tEndpointsConfig map[string]*EndpointSettings // Endpoint configs for each connecting network\n}\n\n// PruneReport contains the response for Engine API:\n// POST \"/networks/prune\"\ntype PruneReport struct {\n\tNetworksDeleted []string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/peer_info.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/netip\"\n)\n\n// PeerInfo represents one peer of an overlay network.\n//\n// swagger:model PeerInfo\ntype PeerInfo struct {\n\n\t// ID of the peer-node in the Swarm cluster.\n\t// Example: 6869d7c1732b\n\tName string `json:\"Name\"`\n\n\t// IP-address of the peer-node in the Swarm cluster.\n\t// Example: 10.133.77.91\n\tIP netip.Addr `json:\"IP\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/port.go",
    "content": "package network\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"iter\"\n\t\"net/netip\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unique\"\n)\n\n// IPProtocol represents a network protocol for a port.\ntype IPProtocol string\n\nconst (\n\tTCP  IPProtocol = \"tcp\"\n\tUDP  IPProtocol = \"udp\"\n\tSCTP IPProtocol = \"sctp\"\n)\n\n// Sentinel port proto value for zero Port and PortRange values.\nvar protoZero unique.Handle[IPProtocol]\n\n// Port is a type representing a single port number and protocol in the format \"<portnum>/[<proto>]\".\n//\n// The zero port value, i.e. Port{}, is invalid; use [ParsePort] to create a valid Port value.\ntype Port struct {\n\tnum   uint16\n\tproto unique.Handle[IPProtocol]\n}\n\n// ParsePort parses s as a [Port].\n//\n// It normalizes the provided protocol such that \"80/tcp\", \"80/TCP\", and \"80/tCp\" are equivalent.\n// If a port number is provided, but no protocol, the default (\"tcp\") protocol is returned.\nfunc ParsePort(s string) (Port, error) {\n\tif s == \"\" {\n\t\treturn Port{}, errors.New(\"invalid port: value is empty\")\n\t}\n\n\tport, proto, _ := strings.Cut(s, \"/\")\n\n\tportNum, err := parsePortNumber(port)\n\tif err != nil {\n\t\treturn Port{}, fmt.Errorf(\"invalid port '%s': %w\", port, err)\n\t}\n\n\tnormalizedPortProto := normalizePortProto(proto)\n\treturn Port{num: portNum, proto: normalizedPortProto}, nil\n}\n\n// MustParsePort calls [ParsePort](s) and panics on error.\n//\n// It is intended for use in tests with hard-coded strings.\nfunc MustParsePort(s string) Port {\n\tp, err := ParsePort(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn p\n}\n\n// PortFrom returns a [Port] with the given number and protocol.\n//\n// If no protocol is specified (i.e. proto == \"\"), then PortFrom returns Port{}, false.\nfunc PortFrom(num uint16, proto IPProtocol) (p Port, ok bool) {\n\tif proto == \"\" {\n\t\treturn Port{}, false\n\t}\n\tnormalized := normalizePortProto(string(proto))\n\treturn Port{num: num, proto: normalized}, true\n}\n\n// Num returns p's port number.\nfunc (p Port) Num() uint16 {\n\treturn p.num\n}\n\n// Proto returns p's network protocol.\nfunc (p Port) Proto() IPProtocol {\n\treturn p.proto.Value()\n}\n\n// IsZero reports whether p is the zero value.\nfunc (p Port) IsZero() bool {\n\treturn p.proto == protoZero\n}\n\n// IsValid reports whether p is an initialized valid port (not the zero value).\nfunc (p Port) IsValid() bool {\n\treturn p.proto != protoZero\n}\n\n// String returns a string representation of the port in the format \"<portnum>/<proto>\".\n// If the port is the zero value, it returns \"invalid port\".\nfunc (p Port) String() string {\n\tswitch p.proto {\n\tcase protoZero:\n\t\treturn \"invalid port\"\n\tdefault:\n\t\treturn string(p.AppendTo(nil))\n\t}\n}\n\n// AppendText implements [encoding.TextAppender] interface.\n// It is the same as [Port.AppendTo] but returns an error to satisfy the interface.\nfunc (p Port) AppendText(b []byte) ([]byte, error) {\n\treturn p.AppendTo(b), nil\n}\n\n// AppendTo appends a text encoding of p to b and returns the extended buffer.\nfunc (p Port) AppendTo(b []byte) []byte {\n\tif p.IsZero() {\n\t\treturn b\n\t}\n\treturn fmt.Appendf(b, \"%d/%s\", p.num, p.proto.Value())\n}\n\n// MarshalText implements [encoding.TextMarshaler] interface.\nfunc (p Port) MarshalText() ([]byte, error) {\n\treturn p.AppendText(nil)\n}\n\n// UnmarshalText implements [encoding.TextUnmarshaler] interface.\nfunc (p *Port) UnmarshalText(text []byte) error {\n\tif len(text) == 0 {\n\t\t*p = Port{}\n\t\treturn nil\n\t}\n\n\tport, err := ParsePort(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*p = port\n\treturn nil\n}\n\n// Range returns a [PortRange] representing the single port.\nfunc (p Port) Range() PortRange {\n\treturn PortRange{start: p.num, end: p.num, proto: p.proto}\n}\n\n// PortSet is a collection of structs indexed by [Port].\ntype PortSet = map[Port]struct{}\n\n// PortBinding represents a binding between a Host IP address and a Host Port.\ntype PortBinding struct {\n\t// HostIP is the host IP Address\n\tHostIP netip.Addr `json:\"HostIp\"`\n\t// HostPort is the host port number\n\tHostPort string `json:\"HostPort\"`\n}\n\n// PortMap is a collection of [PortBinding] indexed by [Port].\ntype PortMap = map[Port][]PortBinding\n\n// PortRange represents a range of port numbers and a protocol in the format \"8000-9000/tcp\".\n//\n// The zero port range value, i.e. PortRange{}, is invalid; use [ParsePortRange] to create a valid PortRange value.\ntype PortRange struct {\n\tstart uint16\n\tend   uint16\n\tproto unique.Handle[IPProtocol]\n}\n\n// ParsePortRange parses s as a [PortRange].\n//\n// It normalizes the provided protocol such that \"80-90/tcp\", \"80-90/TCP\", and \"80-90/tCp\" are equivalent.\n// If a port number range is provided, but no protocol, the default (\"tcp\") protocol is returned.\nfunc ParsePortRange(s string) (PortRange, error) {\n\tif s == \"\" {\n\t\treturn PortRange{}, errors.New(\"invalid port range: value is empty\")\n\t}\n\n\tportRange, proto, _ := strings.Cut(s, \"/\")\n\n\tstart, end, ok := strings.Cut(portRange, \"-\")\n\tstartVal, err := parsePortNumber(start)\n\tif err != nil {\n\t\treturn PortRange{}, fmt.Errorf(\"invalid start port '%s': %w\", start, err)\n\t}\n\n\tportProto := normalizePortProto(proto)\n\n\tif !ok || start == end {\n\t\treturn PortRange{start: startVal, end: startVal, proto: portProto}, nil\n\t}\n\n\tendVal, err := parsePortNumber(end)\n\tif err != nil {\n\t\treturn PortRange{}, fmt.Errorf(\"invalid end port '%s': %w\", end, err)\n\t}\n\tif endVal < startVal {\n\t\treturn PortRange{}, errors.New(\"invalid port range: \" + s)\n\t}\n\treturn PortRange{start: startVal, end: endVal, proto: portProto}, nil\n}\n\n// MustParsePortRange calls [ParsePortRange](s) and panics on error.\n// It is intended for use in tests with hard-coded strings.\nfunc MustParsePortRange(s string) PortRange {\n\tpr, err := ParsePortRange(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pr\n}\n\n// PortRangeFrom returns a [PortRange] with the given start and end port numbers and protocol.\n//\n// If end < start or no protocol is specified (i.e. proto == \"\"), then PortRangeFrom returns PortRange{}, false.\nfunc PortRangeFrom(start, end uint16, proto IPProtocol) (pr PortRange, ok bool) {\n\tif end < start || proto == \"\" {\n\t\treturn PortRange{}, false\n\t}\n\tnormalized := normalizePortProto(string(proto))\n\treturn PortRange{start: start, end: end, proto: normalized}, true\n}\n\n// Start returns pr's start port number.\nfunc (pr PortRange) Start() uint16 {\n\treturn pr.start\n}\n\n// End returns pr's end port number.\nfunc (pr PortRange) End() uint16 {\n\treturn pr.end\n}\n\n// Proto returns pr's network protocol.\nfunc (pr PortRange) Proto() IPProtocol {\n\treturn pr.proto.Value()\n}\n\n// IsZero reports whether pr is the zero value.\nfunc (pr PortRange) IsZero() bool {\n\treturn pr.proto == protoZero\n}\n\n// IsValid reports whether pr is an initialized valid port range (not the zero value).\nfunc (pr PortRange) IsValid() bool {\n\treturn pr.proto != protoZero\n}\n\n// String returns a string representation of the port range in the format \"<start>-<end>/<proto>\" or \"<portnum>/<proto>\" if start == end.\n// If the port range is the zero value, it returns \"invalid port range\".\nfunc (pr PortRange) String() string {\n\tswitch pr.proto {\n\tcase protoZero:\n\t\treturn \"invalid port range\"\n\tdefault:\n\t\treturn string(pr.AppendTo(nil))\n\t}\n}\n\n// AppendText implements [encoding.TextAppender] interface.\n// It is the same as [PortRange.AppendTo] but returns an error to satisfy the interface.\nfunc (pr PortRange) AppendText(b []byte) ([]byte, error) {\n\treturn pr.AppendTo(b), nil\n}\n\n// AppendTo appends a text encoding of pr to b and returns the extended buffer.\nfunc (pr PortRange) AppendTo(b []byte) []byte {\n\tif pr.IsZero() {\n\t\treturn b\n\t}\n\tif pr.start == pr.end {\n\t\treturn fmt.Appendf(b, \"%d/%s\", pr.start, pr.proto.Value())\n\t}\n\treturn fmt.Appendf(b, \"%d-%d/%s\", pr.start, pr.end, pr.proto.Value())\n}\n\n// MarshalText implements [encoding.TextMarshaler] interface.\nfunc (pr PortRange) MarshalText() ([]byte, error) {\n\treturn pr.AppendText(nil)\n}\n\n// UnmarshalText implements [encoding.TextUnmarshaler] interface.\nfunc (pr *PortRange) UnmarshalText(text []byte) error {\n\tif len(text) == 0 {\n\t\t*pr = PortRange{}\n\t\treturn nil\n\t}\n\n\tportRange, err := ParsePortRange(string(text))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*pr = portRange\n\treturn nil\n}\n\n// Range returns pr.\nfunc (pr PortRange) Range() PortRange {\n\treturn pr\n}\n\n// All returns an iterator over all the individual ports in the range.\n//\n// For example:\n//\n//\tfor port := range pr.All() {\n//\t    // ...\n//\t}\nfunc (pr PortRange) All() iter.Seq[Port] {\n\treturn func(yield func(Port) bool) {\n\t\tfor i := uint32(pr.Start()); i <= uint32(pr.End()); i++ {\n\t\t\tif !yield(Port{num: uint16(i), proto: pr.proto}) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// parsePortNumber parses rawPort into an int, unwrapping strconv errors\n// and returning a single \"out of range\" error for any value outside 0–65535.\nfunc parsePortNumber(rawPort string) (uint16, error) {\n\tif rawPort == \"\" {\n\t\treturn 0, errors.New(\"value is empty\")\n\t}\n\tport, err := strconv.ParseUint(rawPort, 10, 16)\n\tif err != nil {\n\t\tvar numErr *strconv.NumError\n\t\tif errors.As(err, &numErr) {\n\t\t\terr = numErr.Err\n\t\t}\n\t\treturn 0, err\n\t}\n\n\treturn uint16(port), nil\n}\n\n// normalizePortProto normalizes the protocol string such that \"tcp\", \"TCP\", and \"tCp\" are equivalent.\n// If proto is not specified, it defaults to \"tcp\".\nfunc normalizePortProto(proto string) unique.Handle[IPProtocol] {\n\tif proto == \"\" {\n\t\treturn unique.Make(TCP)\n\t}\n\n\tproto = strings.ToLower(proto)\n\n\treturn unique.Make(IPProtocol(proto))\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/service_info.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/netip\"\n)\n\n// ServiceInfo represents service parameters with the list of service's tasks\n//\n// swagger:model ServiceInfo\ntype ServiceInfo struct {\n\n\t// v IP\n\tVIP netip.Addr `json:\"VIP\"`\n\n\t// ports\n\tPorts []string `json:\"Ports\"`\n\n\t// local l b index\n\tLocalLBIndex int `json:\"LocalLBIndex\"`\n\n\t// tasks\n\tTasks []Task `json:\"Tasks\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/status.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Status provides runtime information about the network such as the number of allocated IPs.\n//\n// swagger:model Status\ntype Status struct {\n\n\t// IPAM\n\tIPAM IPAMStatus `json:\"IPAM\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/subnet_status.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// SubnetStatus subnet status\n//\n// swagger:model SubnetStatus\ntype SubnetStatus struct {\n\n\t// Number of IP addresses in the subnet that are in use or reserved and are therefore unavailable for allocation, saturating at 2<sup>64</sup> - 1.\n\t//\n\tIPsInUse uint64 `json:\"IPsInUse\"`\n\n\t// Number of IP addresses within the network's IPRange for the subnet that are available for allocation, saturating at 2<sup>64</sup> - 1.\n\t//\n\tDynamicIPsAvailable uint64 `json:\"DynamicIPsAvailable\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/summary.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Summary Network list response item\n//\n// swagger:model Summary\ntype Summary struct {\n\tNetwork\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/network/task.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage network\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\nimport (\n\t\"net/netip\"\n)\n\n// Task carries the information about one backend task\n//\n// swagger:model Task\ntype Task struct {\n\n\t// name\n\tName string `json:\"Name\"`\n\n\t// endpoint ID\n\tEndpointID string `json:\"EndpointID\"`\n\n\t// endpoint IP\n\tEndpointIP netip.Addr `json:\"EndpointIP\"`\n\n\t// info\n\tInfo map[string]string `json:\"Info\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/.gitignore",
    "content": "testdata/rapid/**\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/capability.go",
    "content": "package plugin\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype CapabilityID struct {\n\tCapability string\n\tPrefix     string\n\tVersion    string\n}\n\nvar (\n\t_ fmt.Stringer             = CapabilityID{}\n\t_ encoding.TextUnmarshaler = (*CapabilityID)(nil)\n\t_ encoding.TextMarshaler   = CapabilityID{}\n)\n\n// String implements [fmt.Stringer] for CapabilityID\nfunc (t CapabilityID) String() string {\n\treturn fmt.Sprintf(\"%s.%s/%s\", t.Prefix, t.Capability, t.Version)\n}\n\n// UnmarshalText implements [encoding.TextUnmarshaler] for CapabilityID\nfunc (t *CapabilityID) UnmarshalText(p []byte) error {\n\tfqcap, version, _ := bytes.Cut(p, []byte{'/'})\n\tidx := bytes.LastIndexByte(fqcap, '.')\n\tif idx < 0 {\n\t\tt.Prefix = \"\"\n\t\tt.Capability = string(fqcap)\n\t} else {\n\t\tt.Prefix = string(fqcap[:idx])\n\t\tt.Capability = string(fqcap[idx+1:])\n\t}\n\tt.Version = string(version)\n\treturn nil\n}\n\n// MarshalText implements [encoding.TextMarshaler] for CapabilityID\nfunc (t CapabilityID) MarshalText() ([]byte, error) {\n\t// Assert that the value can be round-tripped successfully.\n\tif strings.Contains(t.Capability, \".\") {\n\t\treturn nil, fmt.Errorf(\"capability %q cannot contain a dot\", t.Capability)\n\t}\n\tif strings.Contains(t.Prefix, \"/\") {\n\t\treturn nil, fmt.Errorf(\"prefix %q cannot contain a slash\", t.Prefix)\n\t}\n\tif strings.Contains(t.Capability, \"/\") {\n\t\treturn nil, fmt.Errorf(\"capability %q cannot contain a slash\", t.Capability)\n\t}\n\treturn []byte(t.String()), nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/device.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage plugin\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Device device\n//\n// swagger:model Device\ntype Device struct {\n\n\t// description\n\t// Required: true\n\tDescription string `json:\"Description\"`\n\n\t// name\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// path\n\t// Example: /dev/fuse\n\t// Required: true\n\tPath *string `json:\"Path\"`\n\n\t// settable\n\t// Required: true\n\tSettable []string `json:\"Settable\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/env.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage plugin\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Env env\n//\n// swagger:model Env\ntype Env struct {\n\n\t// description\n\t// Required: true\n\tDescription string `json:\"Description\"`\n\n\t// name\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// settable\n\t// Required: true\n\tSettable []string `json:\"Settable\"`\n\n\t// value\n\t// Required: true\n\tValue *string `json:\"Value\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/mount.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage plugin\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Mount mount\n//\n// swagger:model Mount\ntype Mount struct {\n\n\t// description\n\t// Example: This is a mount that's used by the plugin.\n\t// Required: true\n\tDescription string `json:\"Description\"`\n\n\t// destination\n\t// Example: /mnt/state\n\t// Required: true\n\tDestination string `json:\"Destination\"`\n\n\t// name\n\t// Example: some-mount\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// options\n\t// Example: [\"rbind\",\"rw\"]\n\t// Required: true\n\tOptions []string `json:\"Options\"`\n\n\t// settable\n\t// Required: true\n\tSettable []string `json:\"Settable\"`\n\n\t// source\n\t// Example: /var/lib/docker/plugins/\n\t// Required: true\n\tSource *string `json:\"Source\"`\n\n\t// type\n\t// Example: bind\n\t// Required: true\n\tType string `json:\"Type\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/plugin.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage plugin\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Plugin A plugin for the Engine API\n//\n// swagger:model Plugin\ntype Plugin struct {\n\n\t// config\n\t// Required: true\n\tConfig Config `json:\"Config\"`\n\n\t// True if the plugin is running. False if the plugin is not running, only installed.\n\t// Example: true\n\t// Required: true\n\tEnabled bool `json:\"Enabled\"`\n\n\t// Id\n\t// Example: 5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078\n\tID string `json:\"Id,omitempty\"`\n\n\t// name\n\t// Example: tiborvass/sample-volume-plugin\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// plugin remote reference used to push/pull the plugin\n\t// Example: localhost:5000/tiborvass/sample-volume-plugin:latest\n\tPluginReference string `json:\"PluginReference,omitempty\"`\n\n\t// settings\n\t// Required: true\n\tSettings Settings `json:\"Settings\"`\n}\n\n// Config The config of a plugin.\n//\n// swagger:model Config\ntype Config struct {\n\n\t// args\n\t// Required: true\n\tArgs Args `json:\"Args\"`\n\n\t// description\n\t// Example: A sample volume plugin for Docker\n\t// Required: true\n\tDescription string `json:\"Description\"`\n\n\t// documentation\n\t// Example: https://docs.docker.com/engine/extend/plugins/\n\t// Required: true\n\tDocumentation string `json:\"Documentation\"`\n\n\t// entrypoint\n\t// Example: [\"/usr/bin/sample-volume-plugin\",\"/data\"]\n\t// Required: true\n\tEntrypoint []string `json:\"Entrypoint\"`\n\n\t// env\n\t// Example: [{\"Description\":\"If set, prints debug messages\",\"Name\":\"DEBUG\",\"Settable\":null,\"Value\":\"0\"}]\n\t// Required: true\n\tEnv []Env `json:\"Env\"`\n\n\t// interface\n\t// Required: true\n\tInterface Interface `json:\"Interface\"`\n\n\t// ipc host\n\t// Example: false\n\t// Required: true\n\tIpcHost bool `json:\"IpcHost\"`\n\n\t// linux\n\t// Required: true\n\tLinux LinuxConfig `json:\"Linux\"`\n\n\t// mounts\n\t// Required: true\n\tMounts []Mount `json:\"Mounts\"`\n\n\t// network\n\t// Required: true\n\tNetwork NetworkConfig `json:\"Network\"`\n\n\t// pid host\n\t// Example: false\n\t// Required: true\n\tPidHost bool `json:\"PidHost\"`\n\n\t// propagated mount\n\t// Example: /mnt/volumes\n\t// Required: true\n\tPropagatedMount string `json:\"PropagatedMount\"`\n\n\t// user\n\tUser User `json:\"User,omitempty\"`\n\n\t// work dir\n\t// Example: /bin/\n\t// Required: true\n\tWorkDir string `json:\"WorkDir\"`\n\n\t// rootfs\n\tRootfs *RootFS `json:\"rootfs,omitempty\"`\n}\n\n// Args args\n//\n// swagger:model Args\ntype Args struct {\n\n\t// description\n\t// Example: command line arguments\n\t// Required: true\n\tDescription string `json:\"Description\"`\n\n\t// name\n\t// Example: args\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// settable\n\t// Required: true\n\tSettable []string `json:\"Settable\"`\n\n\t// value\n\t// Required: true\n\tValue []string `json:\"Value\"`\n}\n\n// Interface The interface between Docker and the plugin\n//\n// swagger:model Interface\ntype Interface struct {\n\n\t// Protocol to use for clients connecting to the plugin.\n\t// Example: some.protocol/v1.0\n\t// Enum: [\"\",\"moby.plugins.http/v1\"]\n\tProtocolScheme string `json:\"ProtocolScheme,omitempty\"`\n\n\t// socket\n\t// Example: plugins.sock\n\t// Required: true\n\tSocket string `json:\"Socket\"`\n\n\t// types\n\t// Example: [\"docker.volumedriver/1.0\"]\n\t// Required: true\n\tTypes []CapabilityID `json:\"Types\"`\n}\n\n// LinuxConfig linux config\n//\n// swagger:model LinuxConfig\ntype LinuxConfig struct {\n\n\t// allow all devices\n\t// Example: false\n\t// Required: true\n\tAllowAllDevices bool `json:\"AllowAllDevices\"`\n\n\t// capabilities\n\t// Example: [\"CAP_SYS_ADMIN\",\"CAP_SYSLOG\"]\n\t// Required: true\n\tCapabilities []string `json:\"Capabilities\"`\n\n\t// devices\n\t// Required: true\n\tDevices []Device `json:\"Devices\"`\n}\n\n// NetworkConfig network config\n//\n// swagger:model NetworkConfig\ntype NetworkConfig struct {\n\n\t// type\n\t// Example: host\n\t// Required: true\n\tType string `json:\"Type\"`\n}\n\n// RootFS root f s\n//\n// swagger:model RootFS\ntype RootFS struct {\n\n\t// diff ids\n\t// Example: [\"sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887\",\"sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8\"]\n\tDiffIds []string `json:\"diff_ids\"`\n\n\t// type\n\t// Example: layers\n\tType string `json:\"type,omitempty\"`\n}\n\n// User user\n//\n// swagger:model User\ntype User struct {\n\n\t// g ID\n\t// Example: 1000\n\tGID uint32 `json:\"GID,omitempty\"`\n\n\t// UID\n\t// Example: 1000\n\tUID uint32 `json:\"UID,omitempty\"`\n}\n\n// Settings user-configurable settings for the plugin.\n//\n// swagger:model Settings\ntype Settings struct {\n\n\t// args\n\t// Required: true\n\tArgs []string `json:\"Args\"`\n\n\t// devices\n\t// Required: true\n\tDevices []Device `json:\"Devices\"`\n\n\t// env\n\t// Example: [\"DEBUG=0\"]\n\t// Required: true\n\tEnv []string `json:\"Env\"`\n\n\t// mounts\n\t// Required: true\n\tMounts []Mount `json:\"Mounts\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/plugin/plugin_responses.go",
    "content": "package plugin\n\nimport (\n\t\"sort\"\n)\n\n// ListResponse contains the response for the Engine API\ntype ListResponse []Plugin\n\n// Privilege describes a permission the user has to accept\n// upon installing a plugin.\ntype Privilege struct {\n\tName        string\n\tDescription string\n\tValue       []string\n}\n\n// Privileges is a list of Privilege\ntype Privileges []Privilege\n\nfunc (s Privileges) Len() int {\n\treturn len(s)\n}\n\nfunc (s Privileges) Less(i, j int) bool {\n\treturn s[i].Name < s[j].Name\n}\n\nfunc (s Privileges) Swap(i, j int) {\n\tsort.Strings(s[i].Value)\n\tsort.Strings(s[j].Value)\n\ts[i], s[j] = s[j], s[i]\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/registry/auth_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage registry\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// AuthResponse An identity token was generated successfully.\n//\n// swagger:model AuthResponse\ntype AuthResponse struct {\n\n\t// An opaque token used to authenticate a user after a successful login\n\t// Example: 9cbaf023786cd7...\n\tIdentityToken string `json:\"IdentityToken,omitempty\"`\n\n\t// The status of the authentication\n\t// Example: Login Succeeded\n\t// Required: true\n\tStatus string `json:\"Status\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/registry/authconfig.go",
    "content": "package registry\n\nimport \"context\"\n\n// AuthHeader is the name of the header used to send encoded registry\n// authorization credentials for registry operations (push/pull).\nconst AuthHeader = \"X-Registry-Auth\"\n\n// RequestAuthConfig is a function interface that clients can supply\n// to retry operations after getting an authorization error.\n//\n// The function must return the [AuthHeader] value ([AuthConfig]), encoded\n// in base64url format ([RFC4648, section 5]), which can be decoded by\n// [DecodeAuthConfig].\n//\n// It must return an error if the privilege request fails.\n//\n// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5\ntype RequestAuthConfig func(context.Context) (string, error)\n\n// AuthConfig contains authorization information for connecting to a Registry.\ntype AuthConfig struct {\n\tUsername string `json:\"username,omitempty\"`\n\tPassword string `json:\"password,omitempty\"`\n\tAuth     string `json:\"auth,omitempty\"`\n\n\tServerAddress string `json:\"serveraddress,omitempty\"`\n\n\t// IdentityToken is used to authenticate the user and get\n\t// an access token for the registry.\n\tIdentityToken string `json:\"identitytoken,omitempty\"`\n\n\t// RegistryToken is a bearer token to be sent to a registry\n\tRegistryToken string `json:\"registrytoken,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/registry/registry.go",
    "content": "package registry\n\nimport (\n\t\"net/netip\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ServiceConfig stores daemon registry services configuration.\ntype ServiceConfig struct {\n\tInsecureRegistryCIDRs []netip.Prefix        `json:\"InsecureRegistryCIDRs\"`\n\tIndexConfigs          map[string]*IndexInfo `json:\"IndexConfigs\"`\n\tMirrors               []string\n}\n\n// IndexInfo contains information about a registry\n//\n// RepositoryInfo Examples:\n//\n//\t{\n//\t  \"Index\" : {\n//\t    \"Name\" : \"docker.io\",\n//\t    \"Mirrors\" : [\"https://registry-2.docker.io/v1/\", \"https://registry-3.docker.io/v1/\"],\n//\t    \"Secure\" : true,\n//\t    \"Official\" : true,\n//\t  },\n//\t  \"RemoteName\" : \"library/debian\",\n//\t  \"LocalName\" : \"debian\",\n//\t  \"CanonicalName\" : \"docker.io/debian\"\n//\t  \"Official\" : true,\n//\t}\n//\n//\t{\n//\t  \"Index\" : {\n//\t    \"Name\" : \"127.0.0.1:5000\",\n//\t    \"Mirrors\" : [],\n//\t    \"Secure\" : false,\n//\t    \"Official\" : false,\n//\t  },\n//\t  \"RemoteName\" : \"user/repo\",\n//\t  \"LocalName\" : \"127.0.0.1:5000/user/repo\",\n//\t  \"CanonicalName\" : \"127.0.0.1:5000/user/repo\",\n//\t  \"Official\" : false,\n//\t}\ntype IndexInfo struct {\n\t// Name is the name of the registry, such as \"docker.io\"\n\tName string\n\t// Mirrors is a list of mirrors, expressed as URIs\n\tMirrors []string\n\t// Secure is set to false if the registry is part of the list of\n\t// insecure registries. Insecure registries accept HTTP and/or accept\n\t// HTTPS with certificates from unknown CAs.\n\tSecure bool\n\t// Official indicates whether this is an official registry\n\tOfficial bool\n}\n\n// DistributionInspect describes the result obtained from contacting the\n// registry to retrieve image metadata\ntype DistributionInspect struct {\n\t// Descriptor contains information about the manifest, including\n\t// the content addressable digest\n\tDescriptor ocispec.Descriptor\n\t// Platforms contains the list of platforms supported by the image,\n\t// obtained by parsing the manifest\n\tPlatforms []ocispec.Platform\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/registry/search.go",
    "content": "package registry\n\n// SearchResult describes a search result returned from a registry\ntype SearchResult struct {\n\t// StarCount indicates the number of stars this repository has\n\tStarCount int `json:\"star_count\"`\n\t// IsOfficial is true if the result is from an official repository.\n\tIsOfficial bool `json:\"is_official\"`\n\t// Name is the name of the repository\n\tName string `json:\"name\"`\n\t// IsAutomated indicates whether the result is automated.\n\t//\n\t// Deprecated: the \"is_automated\" field is deprecated and will always be \"false\".\n\tIsAutomated bool `json:\"is_automated\"`\n\t// Description is a textual description of the repository\n\tDescription string `json:\"description\"`\n}\n\n// SearchResults lists a collection search results returned from a registry\ntype SearchResults struct {\n\t// Query contains the query string that generated the search results\n\tQuery string `json:\"query\"`\n\t// NumResults indicates the number of results the query returned\n\tNumResults int `json:\"num_results\"`\n\t// Results is a slice containing the actual results for the search\n\tResults []SearchResult `json:\"results\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/storage/driver_data.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage storage\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DriverData Information about the storage driver used to store the container's and\n// image's filesystem.\n//\n// swagger:model DriverData\ntype DriverData struct {\n\n\t// Low-level storage metadata, provided as key/value pairs.\n\t//\n\t// This information is driver-specific, and depends on the storage-driver\n\t// in use, and should be used for informational purposes only.\n\t//\n\t// Example: {\"MergedDir\":\"/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged\",\"UpperDir\":\"/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff\",\"WorkDir\":\"/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work\"}\n\t// Required: true\n\tData map[string]string `json:\"Data\"`\n\n\t// Name of the storage driver.\n\t// Example: overlay2\n\t// Required: true\n\tName string `json:\"Name\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage storage\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// RootFSStorage Information about the storage used for the container's root filesystem.\n//\n// swagger:model RootFSStorage\ntype RootFSStorage struct {\n\n\t// Information about the snapshot used for the container's root filesystem.\n\t//\n\tSnapshot *RootFSStorageSnapshot `json:\"Snapshot,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage storage\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// RootFSStorageSnapshot Information about a snapshot backend of the container's root filesystem.\n//\n// swagger:model RootFSStorageSnapshot\ntype RootFSStorageSnapshot struct {\n\n\t// Name of the snapshotter.\n\tName string `json:\"Name,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/storage/storage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage storage\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Storage Information about the storage used by the container.\n//\n// swagger:model Storage\ntype Storage struct {\n\n\t// Information about the storage used for the container's root filesystem.\n\t//\n\tRootFS *RootFSStorage `json:\"RootFS,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/common.go",
    "content": "package swarm\n\nimport (\n\t\"strconv\"\n\t\"time\"\n)\n\n// Version represents the internal object version.\ntype Version struct {\n\tIndex uint64 `json:\",omitempty\"`\n}\n\n// String implements fmt.Stringer interface.\nfunc (v Version) String() string {\n\treturn strconv.FormatUint(v.Index, 10)\n}\n\n// Meta is a base object inherited by most of the other once.\ntype Meta struct {\n\tVersion   Version   `json:\",omitempty\"`\n\tCreatedAt time.Time `json:\",omitempty\"`\n\tUpdatedAt time.Time `json:\",omitempty\"`\n}\n\n// Annotations represents how to describe an object.\ntype Annotations struct {\n\tName   string            `json:\",omitempty\"`\n\tLabels map[string]string `json:\"Labels\"`\n}\n\n// Driver represents a driver (network, logging, secrets backend).\ntype Driver struct {\n\tName    string            `json:\",omitempty\"`\n\tOptions map[string]string `json:\",omitempty\"`\n}\n\n// TLSInfo represents the TLS information about what CA certificate is trusted,\n// and who the issuer for a TLS certificate is\ntype TLSInfo struct {\n\t// TrustRoot is the trusted CA root certificate in PEM format\n\tTrustRoot string `json:\",omitempty\"`\n\n\t// CertIssuer is the raw subject bytes of the issuer\n\tCertIssuerSubject []byte `json:\",omitempty\"`\n\n\t// CertIssuerPublicKey is the raw public key bytes of the issuer\n\tCertIssuerPublicKey []byte `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/config.go",
    "content": "package swarm\n\nimport (\n\t\"os\"\n)\n\n// Config represents a config.\ntype Config struct {\n\tID string\n\tMeta\n\tSpec ConfigSpec\n}\n\n// ConfigSpec represents a config specification from a config in swarm\ntype ConfigSpec struct {\n\tAnnotations\n\n\t// Data is the data to store as a config.\n\t//\n\t// The maximum allowed size is 1000KB, as defined in [MaxConfigSize].\n\t//\n\t// [MaxConfigSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize\n\tData []byte `json:\",omitempty\"`\n\n\t// Templating controls whether and how to evaluate the config payload as\n\t// a template. If it is not set, no templating is used.\n\tTemplating *Driver `json:\",omitempty\"`\n}\n\n// ConfigReferenceFileTarget is a file target in a config reference\ntype ConfigReferenceFileTarget struct {\n\tName string\n\tUID  string\n\tGID  string\n\tMode os.FileMode\n}\n\n// ConfigReferenceRuntimeTarget is a target for a config specifying that it\n// isn't mounted into the container but instead has some other purpose.\ntype ConfigReferenceRuntimeTarget struct{}\n\n// ConfigReference is a reference to a config in swarm\ntype ConfigReference struct {\n\tFile       *ConfigReferenceFileTarget    `json:\",omitempty\"`\n\tRuntime    *ConfigReferenceRuntimeTarget `json:\",omitempty\"`\n\tConfigID   string\n\tConfigName string\n}\n\n// ConfigCreateResponse contains the information returned to a client\n// on the creation of a new config.\ntype ConfigCreateResponse struct {\n\t// ID is the id of the created config.\n\tID string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/container.go",
    "content": "package swarm\n\nimport (\n\t\"net/netip\"\n\t\"time\"\n\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/mount\"\n)\n\n// DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf)\n// Detailed documentation is available in:\n// http://man7.org/linux/man-pages/man5/resolv.conf.5.html\n// `nameserver`, `search`, `options` have been supported.\n// TODO: `domain` is not supported yet.\ntype DNSConfig struct {\n\t// Nameservers specifies the IP addresses of the name servers\n\tNameservers []netip.Addr `json:\",omitempty\"`\n\t// Search specifies the search list for host-name lookup\n\tSearch []string `json:\",omitempty\"`\n\t// Options allows certain internal resolver variables to be modified\n\tOptions []string `json:\",omitempty\"`\n}\n\n// SELinuxContext contains the SELinux labels of the container.\ntype SELinuxContext struct {\n\tDisable bool\n\n\tUser  string\n\tRole  string\n\tType  string\n\tLevel string\n}\n\n// SeccompMode is the type used for the enumeration of possible seccomp modes\n// in SeccompOpts\ntype SeccompMode string\n\nconst (\n\tSeccompModeDefault    SeccompMode = \"default\"\n\tSeccompModeUnconfined SeccompMode = \"unconfined\"\n\tSeccompModeCustom     SeccompMode = \"custom\"\n)\n\n// SeccompOpts defines the options for configuring seccomp on a swarm-managed\n// container.\ntype SeccompOpts struct {\n\t// Mode is the SeccompMode used for the container.\n\tMode SeccompMode `json:\",omitempty\"`\n\t// Profile is the custom seccomp profile as a json object to be used with\n\t// the container. Mode should be set to SeccompModeCustom when using a\n\t// custom profile in this manner.\n\tProfile []byte `json:\",omitempty\"`\n}\n\n// AppArmorMode is type used for the enumeration of possible AppArmor modes in\n// AppArmorOpts\ntype AppArmorMode string\n\nconst (\n\tAppArmorModeDefault  AppArmorMode = \"default\"\n\tAppArmorModeDisabled AppArmorMode = \"disabled\"\n)\n\n// AppArmorOpts defines the options for configuring AppArmor on a swarm-managed\n// container.  Currently, custom AppArmor profiles are not supported.\ntype AppArmorOpts struct {\n\tMode AppArmorMode `json:\",omitempty\"`\n}\n\n// CredentialSpec for managed service account (Windows only)\ntype CredentialSpec struct {\n\tConfig   string\n\tFile     string\n\tRegistry string\n}\n\n// Privileges defines the security options for the container.\ntype Privileges struct {\n\tCredentialSpec  *CredentialSpec\n\tSELinuxContext  *SELinuxContext\n\tSeccomp         *SeccompOpts  `json:\",omitempty\"`\n\tAppArmor        *AppArmorOpts `json:\",omitempty\"`\n\tNoNewPrivileges bool\n}\n\n// ContainerSpec represents the spec of a container.\ntype ContainerSpec struct {\n\tImage           string                  `json:\",omitempty\"`\n\tLabels          map[string]string       `json:\",omitempty\"`\n\tCommand         []string                `json:\",omitempty\"`\n\tArgs            []string                `json:\",omitempty\"`\n\tHostname        string                  `json:\",omitempty\"`\n\tEnv             []string                `json:\",omitempty\"`\n\tDir             string                  `json:\",omitempty\"`\n\tUser            string                  `json:\",omitempty\"`\n\tGroups          []string                `json:\",omitempty\"`\n\tPrivileges      *Privileges             `json:\",omitempty\"`\n\tInit            *bool                   `json:\",omitempty\"`\n\tStopSignal      string                  `json:\",omitempty\"`\n\tTTY             bool                    `json:\",omitempty\"`\n\tOpenStdin       bool                    `json:\",omitempty\"`\n\tReadOnly        bool                    `json:\",omitempty\"`\n\tMounts          []mount.Mount           `json:\",omitempty\"`\n\tStopGracePeriod *time.Duration          `json:\",omitempty\"`\n\tHealthcheck     *container.HealthConfig `json:\",omitempty\"`\n\t// The format of extra hosts on swarmkit is specified in:\n\t// http://man7.org/linux/man-pages/man5/hosts.5.html\n\t//    IP_address canonical_hostname [aliases...]\n\tHosts          []string            `json:\",omitempty\"`\n\tDNSConfig      *DNSConfig          `json:\",omitempty\"`\n\tSecrets        []*SecretReference  `json:\",omitempty\"`\n\tConfigs        []*ConfigReference  `json:\",omitempty\"`\n\tIsolation      container.Isolation `json:\",omitempty\"`\n\tSysctls        map[string]string   `json:\",omitempty\"`\n\tCapabilityAdd  []string            `json:\",omitempty\"`\n\tCapabilityDrop []string            `json:\",omitempty\"`\n\tUlimits        []*container.Ulimit `json:\",omitempty\"`\n\tOomScoreAdj    int64               `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/network.go",
    "content": "package swarm\n\nimport (\n\t\"cmp\"\n\t\"net/netip\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// Endpoint represents an endpoint.\ntype Endpoint struct {\n\tSpec       EndpointSpec        `json:\",omitempty\"`\n\tPorts      []PortConfig        `json:\",omitempty\"`\n\tVirtualIPs []EndpointVirtualIP `json:\",omitempty\"`\n}\n\n// EndpointSpec represents the spec of an endpoint.\ntype EndpointSpec struct {\n\tMode  ResolutionMode `json:\",omitempty\"`\n\tPorts []PortConfig   `json:\",omitempty\"`\n}\n\n// ResolutionMode represents a resolution mode.\ntype ResolutionMode string\n\nconst (\n\t// ResolutionModeVIP VIP\n\tResolutionModeVIP ResolutionMode = \"vip\"\n\t// ResolutionModeDNSRR DNSRR\n\tResolutionModeDNSRR ResolutionMode = \"dnsrr\"\n)\n\n// PortConfig represents the config of a port.\ntype PortConfig struct {\n\tName     string             `json:\",omitempty\"`\n\tProtocol network.IPProtocol `json:\",omitempty\"`\n\t// TargetPort is the port inside the container\n\tTargetPort uint32 `json:\",omitempty\"`\n\t// PublishedPort is the port on the swarm hosts\n\tPublishedPort uint32 `json:\",omitempty\"`\n\t// PublishMode is the mode in which port is published\n\tPublishMode PortConfigPublishMode `json:\",omitempty\"`\n}\n\n// Compare returns the lexical ordering of p and other, and can be used\n// with [slices.SortFunc].\n//\n// The comparison is performed in the following priority order:\n//  1. PublishedPort (host port)\n//  2. TargetPort (container port)\n//  3. Protocol\n//  4. PublishMode\nfunc (p PortConfig) Compare(other PortConfig) int {\n\tif n := cmp.Compare(p.PublishedPort, other.PublishedPort); n != 0 {\n\t\treturn n\n\t}\n\tif n := cmp.Compare(p.TargetPort, other.TargetPort); n != 0 {\n\t\treturn n\n\t}\n\tif n := cmp.Compare(p.Protocol, other.Protocol); n != 0 {\n\t\treturn n\n\t}\n\treturn cmp.Compare(p.PublishMode, other.PublishMode)\n}\n\n// PortConfigPublishMode represents the mode in which the port is to\n// be published.\ntype PortConfigPublishMode string\n\nconst (\n\t// PortConfigPublishModeIngress is used for ports published\n\t// for ingress load balancing using routing mesh.\n\tPortConfigPublishModeIngress PortConfigPublishMode = \"ingress\"\n\t// PortConfigPublishModeHost is used for ports published\n\t// for direct host level access on the host where the task is running.\n\tPortConfigPublishModeHost PortConfigPublishMode = \"host\"\n)\n\n// EndpointVirtualIP represents the virtual ip of a port.\ntype EndpointVirtualIP struct {\n\tNetworkID string `json:\",omitempty\"`\n\n\t// Addr is the virtual ip address.\n\t// This field accepts CIDR notation, for example `10.0.0.1/24`, to maintain backwards\n\t// compatibility, but only the IP address is used.\n\tAddr netip.Prefix `json:\"Addr,omitzero\"`\n}\n\n// Network represents a network.\ntype Network struct {\n\tID string\n\tMeta\n\tSpec        NetworkSpec  `json:\",omitempty\"`\n\tDriverState Driver       `json:\",omitempty\"`\n\tIPAMOptions *IPAMOptions `json:\",omitempty\"`\n}\n\n// NetworkSpec represents the spec of a network.\ntype NetworkSpec struct {\n\tAnnotations\n\tDriverConfiguration *Driver                  `json:\",omitempty\"`\n\tIPv6Enabled         bool                     `json:\",omitempty\"`\n\tInternal            bool                     `json:\",omitempty\"`\n\tAttachable          bool                     `json:\",omitempty\"`\n\tIngress             bool                     `json:\",omitempty\"`\n\tIPAMOptions         *IPAMOptions             `json:\",omitempty\"`\n\tConfigFrom          *network.ConfigReference `json:\",omitempty\"`\n\tScope               string                   `json:\",omitempty\"`\n}\n\n// NetworkAttachmentConfig represents the configuration of a network attachment.\ntype NetworkAttachmentConfig struct {\n\tTarget     string            `json:\",omitempty\"`\n\tAliases    []string          `json:\",omitempty\"`\n\tDriverOpts map[string]string `json:\",omitempty\"`\n}\n\n// NetworkAttachment represents a network attachment.\ntype NetworkAttachment struct {\n\tNetwork Network `json:\",omitempty\"`\n\n\t// Addresses contains the IP addresses associated with the endpoint in the network.\n\t// This field accepts CIDR notation, for example `10.0.0.1/24`, to maintain backwards\n\t// compatibility, but only the IP address is used.\n\tAddresses []netip.Prefix `json:\",omitempty\"`\n}\n\n// IPAMOptions represents ipam options.\ntype IPAMOptions struct {\n\tDriver  Driver       `json:\",omitempty\"`\n\tConfigs []IPAMConfig `json:\",omitempty\"`\n}\n\n// IPAMConfig represents ipam configuration.\ntype IPAMConfig struct {\n\tSubnet  netip.Prefix `json:\"Subnet,omitzero\"`\n\tRange   netip.Prefix `json:\"Range,omitzero\"`\n\tGateway netip.Addr   `json:\"Gateway,omitzero\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/node.go",
    "content": "package swarm\n\n// Node represents a node.\ntype Node struct {\n\tID string\n\tMeta\n\t// Spec defines the desired state of the node as specified by the user.\n\t// The system will honor this and will *never* modify it.\n\tSpec NodeSpec `json:\",omitempty\"`\n\t// Description encapsulates the properties of the Node as reported by the\n\t// agent.\n\tDescription NodeDescription `json:\",omitempty\"`\n\t// Status provides the current status of the node, as seen by the manager.\n\tStatus NodeStatus `json:\",omitempty\"`\n\t// ManagerStatus provides the current status of the node's manager\n\t// component, if the node is a manager.\n\tManagerStatus *ManagerStatus `json:\",omitempty\"`\n}\n\n// NodeSpec represents the spec of a node.\ntype NodeSpec struct {\n\tAnnotations\n\tRole         NodeRole         `json:\",omitempty\"`\n\tAvailability NodeAvailability `json:\",omitempty\"`\n}\n\n// NodeRole represents the role of a node.\ntype NodeRole string\n\nconst (\n\t// NodeRoleWorker WORKER\n\tNodeRoleWorker NodeRole = \"worker\"\n\t// NodeRoleManager MANAGER\n\tNodeRoleManager NodeRole = \"manager\"\n)\n\n// NodeAvailability represents the availability of a node.\ntype NodeAvailability string\n\nconst (\n\t// NodeAvailabilityActive ACTIVE\n\tNodeAvailabilityActive NodeAvailability = \"active\"\n\t// NodeAvailabilityPause PAUSE\n\tNodeAvailabilityPause NodeAvailability = \"pause\"\n\t// NodeAvailabilityDrain DRAIN\n\tNodeAvailabilityDrain NodeAvailability = \"drain\"\n)\n\n// NodeDescription represents the description of a node.\ntype NodeDescription struct {\n\tHostname  string            `json:\",omitempty\"`\n\tPlatform  Platform          `json:\",omitempty\"`\n\tResources Resources         `json:\",omitempty\"`\n\tEngine    EngineDescription `json:\",omitempty\"`\n\tTLSInfo   TLSInfo           `json:\",omitempty\"`\n\tCSIInfo   []NodeCSIInfo     `json:\",omitempty\"`\n}\n\n// Platform represents the platform (Arch/OS).\ntype Platform struct {\n\tArchitecture string `json:\",omitempty\"`\n\tOS           string `json:\",omitempty\"`\n}\n\n// EngineDescription represents the description of an engine.\ntype EngineDescription struct {\n\tEngineVersion string              `json:\",omitempty\"`\n\tLabels        map[string]string   `json:\",omitempty\"`\n\tPlugins       []PluginDescription `json:\",omitempty\"`\n}\n\n// NodeCSIInfo represents information about a CSI plugin available on the node\ntype NodeCSIInfo struct {\n\t// PluginName is the name of the CSI plugin.\n\tPluginName string `json:\",omitempty\"`\n\t// NodeID is the ID of the node as reported by the CSI plugin. This is\n\t// different from the swarm node ID.\n\tNodeID string `json:\",omitempty\"`\n\t// MaxVolumesPerNode is the maximum number of volumes that may be published\n\t// to this node\n\tMaxVolumesPerNode int64 `json:\",omitempty\"`\n\t// AccessibleTopology indicates the location of this node in the CSI\n\t// plugin's topology\n\tAccessibleTopology *Topology `json:\",omitempty\"`\n}\n\n// PluginDescription represents the description of an engine plugin.\ntype PluginDescription struct {\n\tType string `json:\",omitempty\"`\n\tName string `json:\",omitempty\"`\n}\n\n// NodeStatus represents the status of a node.\ntype NodeStatus struct {\n\tState   NodeState `json:\",omitempty\"`\n\tMessage string    `json:\",omitempty\"`\n\tAddr    string    `json:\",omitempty\"`\n}\n\n// Reachability represents the reachability of a node.\ntype Reachability string\n\nconst (\n\t// ReachabilityUnknown UNKNOWN\n\tReachabilityUnknown Reachability = \"unknown\"\n\t// ReachabilityUnreachable UNREACHABLE\n\tReachabilityUnreachable Reachability = \"unreachable\"\n\t// ReachabilityReachable REACHABLE\n\tReachabilityReachable Reachability = \"reachable\"\n)\n\n// ManagerStatus represents the status of a manager.\ntype ManagerStatus struct {\n\tLeader       bool         `json:\",omitempty\"`\n\tReachability Reachability `json:\",omitempty\"`\n\tAddr         string       `json:\",omitempty\"`\n}\n\n// NodeState represents the state of a node.\ntype NodeState string\n\nconst (\n\t// NodeStateUnknown UNKNOWN\n\tNodeStateUnknown NodeState = \"unknown\"\n\t// NodeStateDown DOWN\n\tNodeStateDown NodeState = \"down\"\n\t// NodeStateReady READY\n\tNodeStateReady NodeState = \"ready\"\n\t// NodeStateDisconnected DISCONNECTED\n\tNodeStateDisconnected NodeState = \"disconnected\"\n)\n\n// Topology defines the CSI topology of this node. This type is a duplicate of\n// [github.com/moby/moby/api/types/volume.Topology]. Because the type definition\n// is so simple and to avoid complicated structure or circular imports, we just\n// duplicate it here. See that type for full documentation\ntype Topology struct {\n\tSegments map[string]string `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/runtime.go",
    "content": "package swarm\n\n// RuntimeType is the type of runtime used for the TaskSpec\ntype RuntimeType string\n\n// RuntimeURL is the proto type url\ntype RuntimeURL string\n\nconst (\n\t// RuntimeContainer is the container based runtime\n\tRuntimeContainer RuntimeType = \"container\"\n\t// RuntimePlugin is the plugin based runtime\n\tRuntimePlugin RuntimeType = \"plugin\"\n\t// RuntimeNetworkAttachment is the network attachment runtime\n\tRuntimeNetworkAttachment RuntimeType = \"attachment\"\n\n\t// RuntimeURLContainer is the proto url for the container type\n\tRuntimeURLContainer RuntimeURL = \"types.docker.com/RuntimeContainer\"\n\t// RuntimeURLPlugin is the proto url for the plugin type\n\tRuntimeURLPlugin RuntimeURL = \"types.docker.com/RuntimePlugin\"\n)\n\n// NetworkAttachmentSpec represents the runtime spec type for network\n// attachment tasks\ntype NetworkAttachmentSpec struct {\n\tContainerID string\n}\n\n// RuntimeSpec defines the base payload which clients can specify for creating\n// a service with the plugin runtime.\ntype RuntimeSpec struct {\n\tName       string              `json:\"name,omitempty\"`\n\tRemote     string              `json:\"remote,omitempty\"`\n\tPrivileges []*RuntimePrivilege `json:\"privileges,omitempty\"`\n\tDisabled   bool                `json:\"disabled,omitempty\"`\n\tEnv        []string            `json:\"env,omitempty\"`\n}\n\n// RuntimePrivilege describes a permission the user has to accept\n// upon installing a plugin.\ntype RuntimePrivilege struct {\n\tName        string   `json:\"name,omitempty\"`\n\tDescription string   `json:\"description,omitempty\"`\n\tValue       []string `json:\"value,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/secret.go",
    "content": "package swarm\n\nimport (\n\t\"os\"\n)\n\n// Secret represents a secret.\ntype Secret struct {\n\tID string\n\tMeta\n\tSpec SecretSpec\n}\n\n// SecretSpec represents a secret specification from a secret in swarm\ntype SecretSpec struct {\n\tAnnotations\n\n\t// Data is the data to store as a secret. It must be empty if a\n\t// [Driver] is used, in which case the data is loaded from an external\n\t// secret store. The maximum allowed size is 500KB, as defined in\n\t// [MaxSecretSize].\n\t//\n\t// This field is only used to create the secret, and is not returned\n\t// by other endpoints.\n\t//\n\t// [MaxSecretSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0/api/validation#MaxSecretSize\n\tData []byte `json:\",omitempty\"`\n\n\t// Driver is the name of the secrets driver used to fetch the secret's\n\t// value from an external secret store. If not set, the default built-in\n\t// store is used.\n\tDriver *Driver `json:\",omitempty\"`\n\n\t// Templating controls whether and how to evaluate the secret payload as\n\t// a template. If it is not set, no templating is used.\n\tTemplating *Driver `json:\",omitempty\"`\n}\n\n// SecretReferenceFileTarget is a file target in a secret reference\ntype SecretReferenceFileTarget struct {\n\tName string\n\tUID  string\n\tGID  string\n\tMode os.FileMode\n}\n\n// SecretReference is a reference to a secret in swarm\ntype SecretReference struct {\n\tFile       *SecretReferenceFileTarget\n\tSecretID   string\n\tSecretName string\n}\n\n// SecretCreateResponse contains the information returned to a client\n// on the creation of a new secret.\ntype SecretCreateResponse struct {\n\t// ID is the id of the created secret.\n\tID string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/service.go",
    "content": "package swarm\n\nimport (\n\t\"time\"\n)\n\n// Service represents a service.\ntype Service struct {\n\tID string\n\tMeta\n\tSpec         ServiceSpec   `json:\",omitempty\"`\n\tPreviousSpec *ServiceSpec  `json:\",omitempty\"`\n\tEndpoint     Endpoint      `json:\",omitempty\"`\n\tUpdateStatus *UpdateStatus `json:\",omitempty\"`\n\n\t// ServiceStatus is an optional, extra field indicating the number of\n\t// desired and running tasks. It is provided primarily as a shortcut to\n\t// calculating these values client-side, which otherwise would require\n\t// listing all tasks for a service, an operation that could be\n\t// computation and network expensive.\n\tServiceStatus *ServiceStatus `json:\",omitempty\"`\n\n\t// JobStatus is the status of a Service which is in one of ReplicatedJob or\n\t// GlobalJob modes. It is absent on Replicated and Global services.\n\tJobStatus *JobStatus `json:\",omitempty\"`\n}\n\n// ServiceSpec represents the spec of a service.\ntype ServiceSpec struct {\n\tAnnotations\n\n\t// TaskTemplate defines how the service should construct new tasks when\n\t// orchestrating this service.\n\tTaskTemplate   TaskSpec      `json:\",omitempty\"`\n\tMode           ServiceMode   `json:\",omitempty\"`\n\tUpdateConfig   *UpdateConfig `json:\",omitempty\"`\n\tRollbackConfig *UpdateConfig `json:\",omitempty\"`\n\tEndpointSpec   *EndpointSpec `json:\",omitempty\"`\n}\n\n// ServiceMode represents the mode of a service.\ntype ServiceMode struct {\n\tReplicated    *ReplicatedService `json:\",omitempty\"`\n\tGlobal        *GlobalService     `json:\",omitempty\"`\n\tReplicatedJob *ReplicatedJob     `json:\",omitempty\"`\n\tGlobalJob     *GlobalJob         `json:\",omitempty\"`\n}\n\n// UpdateState is the state of a service update.\ntype UpdateState string\n\nconst (\n\t// UpdateStateUpdating is the updating state.\n\tUpdateStateUpdating UpdateState = \"updating\"\n\t// UpdateStatePaused is the paused state.\n\tUpdateStatePaused UpdateState = \"paused\"\n\t// UpdateStateCompleted is the completed state.\n\tUpdateStateCompleted UpdateState = \"completed\"\n\t// UpdateStateRollbackStarted is the state with a rollback in progress.\n\tUpdateStateRollbackStarted UpdateState = \"rollback_started\"\n\t// UpdateStateRollbackPaused is the state with a rollback in progress.\n\tUpdateStateRollbackPaused UpdateState = \"rollback_paused\"\n\t// UpdateStateRollbackCompleted is the state with a rollback in progress.\n\tUpdateStateRollbackCompleted UpdateState = \"rollback_completed\"\n)\n\n// UpdateStatus reports the status of a service update.\ntype UpdateStatus struct {\n\tState       UpdateState `json:\",omitempty\"`\n\tStartedAt   *time.Time  `json:\",omitempty\"`\n\tCompletedAt *time.Time  `json:\",omitempty\"`\n\tMessage     string      `json:\",omitempty\"`\n}\n\n// ReplicatedService is a kind of ServiceMode.\ntype ReplicatedService struct {\n\tReplicas *uint64 `json:\",omitempty\"`\n}\n\n// GlobalService is a kind of ServiceMode.\ntype GlobalService struct{}\n\n// ReplicatedJob is the a type of Service which executes a defined Tasks\n// in parallel until the specified number of Tasks have succeeded.\ntype ReplicatedJob struct {\n\t// MaxConcurrent indicates the maximum number of Tasks that should be\n\t// executing simultaneously for this job at any given time. There may be\n\t// fewer Tasks that MaxConcurrent executing simultaneously; for example, if\n\t// there are fewer than MaxConcurrent tasks needed to reach\n\t// TotalCompletions.\n\t//\n\t// If this field is empty, it will default to a max concurrency of 1.\n\tMaxConcurrent *uint64 `json:\",omitempty\"`\n\n\t// TotalCompletions is the total number of Tasks desired to run to\n\t// completion.\n\t//\n\t// If this field is empty, the value of MaxConcurrent will be used.\n\tTotalCompletions *uint64 `json:\",omitempty\"`\n}\n\n// GlobalJob is the type of a Service which executes a Task on every Node\n// matching the Service's placement constraints. These tasks run to completion\n// and then exit.\n//\n// This type is deliberately empty.\ntype GlobalJob struct{}\n\n// FailureAction is the action to perform when updating a service fails.\ntype FailureAction string\n\nconst (\n\t// UpdateFailureActionPause PAUSE\n\tUpdateFailureActionPause FailureAction = \"pause\"\n\t// UpdateFailureActionContinue CONTINUE\n\tUpdateFailureActionContinue FailureAction = \"continue\"\n\t// UpdateFailureActionRollback ROLLBACK\n\tUpdateFailureActionRollback FailureAction = \"rollback\"\n)\n\n// UpdateOrder is the order of operations when rolling out or rolling back\n// an updated tasks for a service.\ntype UpdateOrder string\n\nconst (\n\t// UpdateOrderStopFirst STOP_FIRST\n\tUpdateOrderStopFirst UpdateOrder = \"stop-first\"\n\t// UpdateOrderStartFirst START_FIRST\n\tUpdateOrderStartFirst UpdateOrder = \"start-first\"\n)\n\n// UpdateConfig represents the update configuration.\ntype UpdateConfig struct {\n\t// Maximum number of tasks to be updated in one iteration.\n\t// 0 means unlimited parallelism.\n\tParallelism uint64\n\n\t// Amount of time between updates.\n\tDelay time.Duration `json:\",omitempty\"`\n\n\t// FailureAction is the action to take when an update failures.\n\tFailureAction FailureAction `json:\",omitempty\"`\n\n\t// Monitor indicates how long to monitor a task for failure after it is\n\t// created. If the task fails by ending up in one of the states\n\t// REJECTED, COMPLETED, or FAILED, within Monitor from its creation,\n\t// this counts as a failure. If it fails after Monitor, it does not\n\t// count as a failure. If Monitor is unspecified, a default value will\n\t// be used.\n\tMonitor time.Duration `json:\",omitempty\"`\n\n\t// MaxFailureRatio is the fraction of tasks that may fail during\n\t// an update before the failure action is invoked. Any task created by\n\t// the current update which ends up in one of the states REJECTED,\n\t// COMPLETED or FAILED within Monitor from its creation counts as a\n\t// failure. The number of failures is divided by the number of tasks\n\t// being updated, and if this fraction is greater than\n\t// MaxFailureRatio, the failure action is invoked.\n\t//\n\t// If the failure action is CONTINUE, there is no effect.\n\t// If the failure action is PAUSE, no more tasks will be updated until\n\t// another update is started.\n\tMaxFailureRatio float32\n\n\t// Order indicates the order of operations when rolling out an updated\n\t// task. Either the old task is shut down before the new task is\n\t// started, or the new task is started before the old task is shut down.\n\tOrder UpdateOrder\n}\n\n// ServiceStatus represents the number of running tasks in a service and the\n// number of tasks desired to be running.\ntype ServiceStatus struct {\n\t// RunningTasks is the number of tasks for the service actually in the\n\t// Running state\n\tRunningTasks uint64\n\n\t// DesiredTasks is the number of tasks desired to be running by the\n\t// service. For replicated services, this is the replica count. For global\n\t// services, this is computed by taking the number of tasks with desired\n\t// state of not-Shutdown.\n\tDesiredTasks uint64\n\n\t// CompletedTasks is the number of tasks in the state Completed, if this\n\t// service is in ReplicatedJob or GlobalJob mode. This field must be\n\t// cross-referenced with the service type, because the default value of 0\n\t// may mean that a service is not in a job mode, or it may mean that the\n\t// job has yet to complete any tasks.\n\tCompletedTasks uint64\n}\n\n// JobStatus is the status of a job-type service.\ntype JobStatus struct {\n\t// JobIteration is a value increased each time a Job is executed,\n\t// successfully or otherwise. \"Executed\", in this case, means the job as a\n\t// whole has been started, not that an individual Task has been launched. A\n\t// job is \"Executed\" when its ServiceSpec is updated. JobIteration can be\n\t// used to disambiguate Tasks belonging to different executions of a job.\n\t//\n\t// Though JobIteration will increase with each subsequent execution, it may\n\t// not necessarily increase by 1, and so JobIteration should not be used to\n\t// keep track of the number of times a job has been executed.\n\tJobIteration Version\n\n\t// LastExecution is the time that the job was last executed, as observed by\n\t// Swarm manager.\n\tLastExecution time.Time `json:\",omitempty\"`\n}\n\n// RegistryAuthSource defines options for the \"registryAuthFrom\" query parameter\n// on service update.\ntype RegistryAuthSource string\n\n// Values for RegistryAuthFrom in ServiceUpdateOptions\nconst (\n\tRegistryAuthFromSpec         RegistryAuthSource = \"spec\"\n\tRegistryAuthFromPreviousSpec RegistryAuthSource = \"previous-spec\"\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/service_create_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage swarm\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ServiceCreateResponse contains the information returned to a client on the\n// creation of a new service.\n//\n// swagger:model ServiceCreateResponse\ntype ServiceCreateResponse struct {\n\n\t// The ID of the created service.\n\t// Example: ak7w3gjqoa3kuz8xcpnyy0pvl\n\tID string `json:\"ID,omitempty\"`\n\n\t// Optional warning message.\n\t//\n\t// FIXME(thaJeztah): this should have \"omitempty\" in the generated type.\n\t//\n\t// Example: [\"unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found\"]\n\tWarnings []string `json:\"Warnings\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/service_update_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage swarm\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ServiceUpdateResponse service update response\n// Example: {\"Warnings\":[\"unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found\"]}\n//\n// swagger:model ServiceUpdateResponse\ntype ServiceUpdateResponse struct {\n\n\t// Optional warning messages\n\tWarnings []string `json:\"Warnings\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/swarm.go",
    "content": "package swarm\n\nimport (\n\t\"net/netip\"\n\t\"time\"\n)\n\n// ClusterInfo represents info about the cluster for outputting in \"info\"\n// it contains the same information as \"Swarm\", but without the JoinTokens\ntype ClusterInfo struct {\n\tID string\n\tMeta\n\tSpec                   Spec\n\tTLSInfo                TLSInfo\n\tRootRotationInProgress bool\n\tDefaultAddrPool        []netip.Prefix\n\tSubnetSize             uint32\n\tDataPathPort           uint32\n}\n\n// Swarm represents a swarm.\ntype Swarm struct {\n\tClusterInfo\n\tJoinTokens JoinTokens\n}\n\n// JoinTokens contains the tokens workers and managers need to join the swarm.\ntype JoinTokens struct {\n\t// Worker is the join token workers may use to join the swarm.\n\tWorker string\n\t// Manager is the join token managers may use to join the swarm.\n\tManager string\n}\n\n// Spec represents the spec of a swarm.\ntype Spec struct {\n\tAnnotations\n\n\tOrchestration    OrchestrationConfig `json:\",omitempty\"`\n\tRaft             RaftConfig          `json:\",omitempty\"`\n\tDispatcher       DispatcherConfig    `json:\",omitempty\"`\n\tCAConfig         CAConfig            `json:\",omitempty\"`\n\tTaskDefaults     TaskDefaults        `json:\",omitempty\"`\n\tEncryptionConfig EncryptionConfig    `json:\",omitempty\"`\n}\n\n// OrchestrationConfig represents orchestration configuration.\ntype OrchestrationConfig struct {\n\t// TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or\n\t// node. If negative, never remove completed or failed tasks.\n\tTaskHistoryRetentionLimit *int64 `json:\",omitempty\"`\n}\n\n// TaskDefaults parameterizes cluster-level task creation with default values.\ntype TaskDefaults struct {\n\t// LogDriver selects the log driver to use for tasks created in the\n\t// orchestrator if unspecified by a service.\n\t//\n\t// Updating this value will only have an affect on new tasks. Old tasks\n\t// will continue use their previously configured log driver until\n\t// recreated.\n\tLogDriver *Driver `json:\",omitempty\"`\n}\n\n// EncryptionConfig controls at-rest encryption of data and keys.\ntype EncryptionConfig struct {\n\t// AutoLockManagers specifies whether or not managers TLS keys and raft data\n\t// should be encrypted at rest in such a way that they must be unlocked\n\t// before the manager node starts up again.\n\tAutoLockManagers bool\n}\n\n// RaftConfig represents raft configuration.\ntype RaftConfig struct {\n\t// SnapshotInterval is the number of log entries between snapshots.\n\tSnapshotInterval uint64 `json:\",omitempty\"`\n\n\t// KeepOldSnapshots is the number of snapshots to keep beyond the\n\t// current snapshot.\n\tKeepOldSnapshots *uint64 `json:\",omitempty\"`\n\n\t// LogEntriesForSlowFollowers is the number of log entries to keep\n\t// around to sync up slow followers after a snapshot is created.\n\tLogEntriesForSlowFollowers uint64 `json:\",omitempty\"`\n\n\t// ElectionTick is the number of ticks that a follower will wait for a message\n\t// from the leader before becoming a candidate and starting an election.\n\t// ElectionTick must be greater than HeartbeatTick.\n\t//\n\t// A tick currently defaults to one second, so these translate directly to\n\t// seconds currently, but this is NOT guaranteed.\n\tElectionTick int\n\n\t// HeartbeatTick is the number of ticks between heartbeats. Every\n\t// HeartbeatTick ticks, the leader will send a heartbeat to the\n\t// followers.\n\t//\n\t// A tick currently defaults to one second, so these translate directly to\n\t// seconds currently, but this is NOT guaranteed.\n\tHeartbeatTick int\n}\n\n// DispatcherConfig represents dispatcher configuration.\ntype DispatcherConfig struct {\n\t// HeartbeatPeriod defines how often agent should send heartbeats to\n\t// dispatcher.\n\tHeartbeatPeriod time.Duration `json:\",omitempty\"`\n}\n\n// CAConfig represents CA configuration.\ntype CAConfig struct {\n\t// NodeCertExpiry is the duration certificates should be issued for\n\tNodeCertExpiry time.Duration `json:\",omitempty\"`\n\n\t// ExternalCAs is a list of CAs to which a manager node will make\n\t// certificate signing requests for node certificates.\n\tExternalCAs []*ExternalCA `json:\",omitempty\"`\n\n\t// SigningCACert and SigningCAKey specify the desired signing root CA and\n\t// root CA key for the swarm.  When inspecting the cluster, the key will\n\t// be redacted.\n\tSigningCACert string `json:\",omitempty\"`\n\tSigningCAKey  string `json:\",omitempty\"`\n\n\t// If this value changes, and there is no specified signing cert and key,\n\t// then the swarm is forced to generate a new root certificate and key.\n\tForceRotate uint64 `json:\",omitempty\"`\n}\n\n// ExternalCAProtocol represents type of external CA.\ntype ExternalCAProtocol string\n\n// ExternalCAProtocolCFSSL CFSSL\nconst ExternalCAProtocolCFSSL ExternalCAProtocol = \"cfssl\"\n\n// ExternalCA defines external CA to be used by the cluster.\ntype ExternalCA struct {\n\t// Protocol is the protocol used by this external CA.\n\tProtocol ExternalCAProtocol\n\n\t// URL is the URL where the external CA can be reached.\n\tURL string\n\n\t// Options is a set of additional key/value pairs whose interpretation\n\t// depends on the specified CA type.\n\tOptions map[string]string `json:\",omitempty\"`\n\n\t// CACert specifies which root CA is used by this external CA.  This certificate must\n\t// be in PEM format.\n\tCACert string\n}\n\n// InitRequest is the request used to init a swarm.\ntype InitRequest struct {\n\tListenAddr       string\n\tAdvertiseAddr    string\n\tDataPathAddr     string\n\tDataPathPort     uint32\n\tForceNewCluster  bool\n\tSpec             Spec\n\tAutoLockManagers bool\n\tAvailability     NodeAvailability\n\tDefaultAddrPool  []netip.Prefix\n\tSubnetSize       uint32\n}\n\n// JoinRequest is the request used to join a swarm.\ntype JoinRequest struct {\n\tListenAddr    string\n\tAdvertiseAddr string\n\tDataPathAddr  string\n\tRemoteAddrs   []string\n\tJoinToken     string // accept by secret\n\tAvailability  NodeAvailability\n}\n\n// UnlockRequest is the request used to unlock a swarm.\ntype UnlockRequest struct {\n\t// UnlockKey is the unlock key in ASCII-armored format.\n\tUnlockKey string\n}\n\n// LocalNodeState represents the state of the local node.\ntype LocalNodeState string\n\nconst (\n\t// LocalNodeStateInactive INACTIVE\n\tLocalNodeStateInactive LocalNodeState = \"inactive\"\n\t// LocalNodeStatePending PENDING\n\tLocalNodeStatePending LocalNodeState = \"pending\"\n\t// LocalNodeStateActive ACTIVE\n\tLocalNodeStateActive LocalNodeState = \"active\"\n\t// LocalNodeStateError ERROR\n\tLocalNodeStateError LocalNodeState = \"error\"\n\t// LocalNodeStateLocked LOCKED\n\tLocalNodeStateLocked LocalNodeState = \"locked\"\n)\n\n// Info represents generic information about swarm.\ntype Info struct {\n\tNodeID   string\n\tNodeAddr string\n\n\tLocalNodeState   LocalNodeState\n\tControlAvailable bool\n\tError            string\n\n\tRemoteManagers []Peer\n\tNodes          int `json:\",omitempty\"`\n\tManagers       int `json:\",omitempty\"`\n\n\tCluster *ClusterInfo `json:\",omitempty\"`\n\n\tWarnings []string `json:\",omitempty\"`\n}\n\n// Peer represents a peer.\ntype Peer struct {\n\tNodeID string\n\tAddr   string\n}\n\n// UnlockKeyResponse contains the response for Engine API:\n// GET /swarm/unlockkey\ntype UnlockKeyResponse struct {\n\t// UnlockKey is the unlock key in ASCII-armored format.\n\tUnlockKey string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/swarm/task.go",
    "content": "package swarm\n\nimport (\n\t\"time\"\n)\n\n// TaskState represents the state of a task.\ntype TaskState string\n\nconst (\n\t// TaskStateNew NEW\n\tTaskStateNew TaskState = \"new\"\n\t// TaskStateAllocated ALLOCATED\n\tTaskStateAllocated TaskState = \"allocated\"\n\t// TaskStatePending PENDING\n\tTaskStatePending TaskState = \"pending\"\n\t// TaskStateAssigned ASSIGNED\n\tTaskStateAssigned TaskState = \"assigned\"\n\t// TaskStateAccepted ACCEPTED\n\tTaskStateAccepted TaskState = \"accepted\"\n\t// TaskStatePreparing PREPARING\n\tTaskStatePreparing TaskState = \"preparing\"\n\t// TaskStateReady READY\n\tTaskStateReady TaskState = \"ready\"\n\t// TaskStateStarting STARTING\n\tTaskStateStarting TaskState = \"starting\"\n\t// TaskStateRunning RUNNING\n\tTaskStateRunning TaskState = \"running\"\n\t// TaskStateComplete COMPLETE\n\tTaskStateComplete TaskState = \"complete\"\n\t// TaskStateShutdown SHUTDOWN\n\tTaskStateShutdown TaskState = \"shutdown\"\n\t// TaskStateFailed FAILED\n\tTaskStateFailed TaskState = \"failed\"\n\t// TaskStateRejected REJECTED\n\tTaskStateRejected TaskState = \"rejected\"\n\t// TaskStateRemove REMOVE\n\tTaskStateRemove TaskState = \"remove\"\n\t// TaskStateOrphaned ORPHANED\n\tTaskStateOrphaned TaskState = \"orphaned\"\n)\n\n// Task represents a task.\ntype Task struct {\n\tID string\n\tMeta\n\tAnnotations\n\n\tSpec                TaskSpec            `json:\",omitempty\"`\n\tServiceID           string              `json:\",omitempty\"`\n\tSlot                int                 `json:\",omitempty\"`\n\tNodeID              string              `json:\",omitempty\"`\n\tStatus              TaskStatus          `json:\",omitempty\"`\n\tDesiredState        TaskState           `json:\",omitempty\"`\n\tNetworksAttachments []NetworkAttachment `json:\",omitempty\"`\n\tGenericResources    []GenericResource   `json:\",omitempty\"`\n\n\t// JobIteration is the JobIteration of the Service that this Task was\n\t// spawned from, if the Service is a ReplicatedJob or GlobalJob. This is\n\t// used to determine which Tasks belong to which run of the job. This field\n\t// is absent if the Service mode is Replicated or Global.\n\tJobIteration *Version `json:\",omitempty\"`\n\n\t// Volumes is the list of VolumeAttachments for this task. It specifies\n\t// which particular volumes are to be used by this particular task, and\n\t// fulfilling what mounts in the spec.\n\tVolumes []VolumeAttachment\n}\n\n// TaskSpec represents the spec of a task.\ntype TaskSpec struct {\n\t// ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive.\n\t// PluginSpec is only used when the `Runtime` field is set to `plugin`\n\t// NetworkAttachmentSpec is used if the `Runtime` field is set to\n\t// `attachment`.\n\tContainerSpec         *ContainerSpec         `json:\",omitempty\"`\n\tPluginSpec            *RuntimeSpec           `json:\",omitempty\"`\n\tNetworkAttachmentSpec *NetworkAttachmentSpec `json:\",omitempty\"`\n\n\tResources     *ResourceRequirements     `json:\",omitempty\"`\n\tRestartPolicy *RestartPolicy            `json:\",omitempty\"`\n\tPlacement     *Placement                `json:\",omitempty\"`\n\tNetworks      []NetworkAttachmentConfig `json:\",omitempty\"`\n\n\t// LogDriver specifies the LogDriver to use for tasks created from this\n\t// spec. If not present, the one on cluster default on swarm.Spec will be\n\t// used, finally falling back to the engine default if not specified.\n\tLogDriver *Driver `json:\",omitempty\"`\n\n\t// ForceUpdate is a counter that triggers an update even if no relevant\n\t// parameters have been changed.\n\tForceUpdate uint64\n\n\tRuntime RuntimeType `json:\",omitempty\"`\n}\n\n// Resources represents resources (CPU/Memory) which can be advertised by a\n// node and requested to be reserved for a task.\ntype Resources struct {\n\tNanoCPUs         int64             `json:\",omitempty\"`\n\tMemoryBytes      int64             `json:\",omitempty\"`\n\tGenericResources []GenericResource `json:\",omitempty\"`\n}\n\n// Limit describes limits on resources which can be requested by a task.\ntype Limit struct {\n\tNanoCPUs    int64 `json:\",omitempty\"`\n\tMemoryBytes int64 `json:\",omitempty\"`\n\tPids        int64 `json:\",omitempty\"`\n}\n\n// GenericResource represents a \"user-defined\" resource which can\n// be either an integer (e.g: SSD=3) or a string (e.g: SSD=sda1)\ntype GenericResource struct {\n\tNamedResourceSpec    *NamedGenericResource    `json:\",omitempty\"`\n\tDiscreteResourceSpec *DiscreteGenericResource `json:\",omitempty\"`\n}\n\n// NamedGenericResource represents a \"user-defined\" resource which is defined\n// as a string.\n// \"Kind\" is used to describe the Kind of a resource (e.g: \"GPU\", \"FPGA\", \"SSD\", ...)\n// Value is used to identify the resource (GPU=\"UUID-1\", FPGA=\"/dev/sdb5\", ...)\ntype NamedGenericResource struct {\n\tKind  string `json:\",omitempty\"`\n\tValue string `json:\",omitempty\"`\n}\n\n// DiscreteGenericResource represents a \"user-defined\" resource which is defined\n// as an integer\n// \"Kind\" is used to describe the Kind of a resource (e.g: \"GPU\", \"FPGA\", \"SSD\", ...)\n// Value is used to count the resource (SSD=5, HDD=3, ...)\ntype DiscreteGenericResource struct {\n\tKind  string `json:\",omitempty\"`\n\tValue int64  `json:\",omitempty\"`\n}\n\n// ResourceRequirements represents resources requirements.\ntype ResourceRequirements struct {\n\tLimits       *Limit     `json:\",omitempty\"`\n\tReservations *Resources `json:\",omitempty\"`\n\n\t// Amount of swap in bytes - can only be used together with a memory limit\n\t// -1 means unlimited\n\t// a null pointer keeps the default behaviour of granting twice the memory\n\t// amount in swap\n\tSwapBytes *int64 `json:\"SwapBytes,omitzero\"`\n\n\t// Tune container memory swappiness (0 to 100) - if not specified, defaults\n\t// to the container OS's default - generally 60, or the value predefined in\n\t// the image; set to -1 to unset a previously set value\n\tMemorySwappiness *int64 `json:\"MemorySwappiness,omitzero\"`\n}\n\n// Placement represents orchestration parameters.\ntype Placement struct {\n\tConstraints []string              `json:\",omitempty\"`\n\tPreferences []PlacementPreference `json:\",omitempty\"`\n\tMaxReplicas uint64                `json:\",omitempty\"`\n\n\t// Platforms stores all the platforms that the image can run on.\n\t// This field is used in the platform filter for scheduling. If empty,\n\t// then the platform filter is off, meaning there are no scheduling restrictions.\n\tPlatforms []Platform `json:\",omitempty\"`\n}\n\n// PlacementPreference provides a way to make the scheduler aware of factors\n// such as topology.\ntype PlacementPreference struct {\n\tSpread *SpreadOver\n}\n\n// SpreadOver is a scheduling preference that instructs the scheduler to spread\n// tasks evenly over groups of nodes identified by labels.\ntype SpreadOver struct {\n\t// label descriptor, such as engine.labels.az\n\tSpreadDescriptor string\n}\n\n// RestartPolicy represents the restart policy.\ntype RestartPolicy struct {\n\tCondition   RestartPolicyCondition `json:\",omitempty\"`\n\tDelay       *time.Duration         `json:\",omitempty\"`\n\tMaxAttempts *uint64                `json:\",omitempty\"`\n\tWindow      *time.Duration         `json:\",omitempty\"`\n}\n\n// RestartPolicyCondition represents when to restart.\ntype RestartPolicyCondition string\n\nconst (\n\t// RestartPolicyConditionNone NONE\n\tRestartPolicyConditionNone RestartPolicyCondition = \"none\"\n\t// RestartPolicyConditionOnFailure ON_FAILURE\n\tRestartPolicyConditionOnFailure RestartPolicyCondition = \"on-failure\"\n\t// RestartPolicyConditionAny ANY\n\tRestartPolicyConditionAny RestartPolicyCondition = \"any\"\n)\n\n// TaskStatus represents the status of a task.\ntype TaskStatus struct {\n\tTimestamp       time.Time        `json:\",omitempty\"`\n\tState           TaskState        `json:\",omitempty\"`\n\tMessage         string           `json:\",omitempty\"`\n\tErr             string           `json:\",omitempty\"`\n\tContainerStatus *ContainerStatus `json:\",omitempty\"`\n\tPortStatus      PortStatus       `json:\",omitempty\"`\n}\n\n// ContainerStatus represents the status of a container.\ntype ContainerStatus struct {\n\tContainerID string\n\tPID         int\n\tExitCode    int\n}\n\n// PortStatus represents the port status of a task's host ports whose\n// service has published host ports\ntype PortStatus struct {\n\tPorts []PortConfig `json:\",omitempty\"`\n}\n\n// VolumeAttachment contains the associating a Volume to a Task.\ntype VolumeAttachment struct {\n\t// ID is the Swarmkit ID of the Volume. This is not the CSI VolumeId.\n\tID string `json:\",omitempty\"`\n\n\t// Source, together with Target, indicates the Mount, as specified in the\n\t// ContainerSpec, that this volume fulfills.\n\tSource string `json:\",omitempty\"`\n\n\t// Target, together with Source, indicates the Mount, as specified\n\t// in the ContainerSpec, that this volume fulfills.\n\tTarget string `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/system/disk_usage.go",
    "content": "package system\n\nimport (\n\t\"github.com/moby/moby/api/types/build\"\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/image\"\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// DiskUsageObject represents an object type used for disk usage query filtering.\ntype DiskUsageObject string\n\nconst (\n\t// ContainerObject represents a container DiskUsageObject.\n\tContainerObject DiskUsageObject = \"container\"\n\t// ImageObject represents an image DiskUsageObject.\n\tImageObject DiskUsageObject = \"image\"\n\t// VolumeObject represents a volume DiskUsageObject.\n\tVolumeObject DiskUsageObject = \"volume\"\n\t// BuildCacheObject represents a build-cache DiskUsageObject.\n\tBuildCacheObject DiskUsageObject = \"build-cache\"\n)\n\n// DiskUsage contains response of Engine API:\n// GET \"/system/df\"\ntype DiskUsage struct {\n\tImageUsage      *image.DiskUsage     `json:\"ImageUsage,omitempty\"`\n\tContainerUsage  *container.DiskUsage `json:\"ContainerUsage,omitempty\"`\n\tVolumeUsage     *volume.DiskUsage    `json:\"VolumeUsage,omitempty\"`\n\tBuildCacheUsage *build.DiskUsage     `json:\"BuildCacheUsage,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/system/info.go",
    "content": "package system\n\nimport (\n\t\"net/netip\"\n\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/registry\"\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// Info contains response of Engine API:\n// GET \"/info\"\ntype Info struct {\n\tID                 string\n\tContainers         int\n\tContainersRunning  int\n\tContainersPaused   int\n\tContainersStopped  int\n\tImages             int\n\tDriver             string\n\tDriverStatus       [][2]string\n\tSystemStatus       [][2]string `json:\",omitempty\"` // SystemStatus is only propagated by the Swarm standalone API\n\tPlugins            PluginsInfo\n\tMemoryLimit        bool\n\tSwapLimit          bool\n\tCPUCfsPeriod       bool `json:\"CpuCfsPeriod\"`\n\tCPUCfsQuota        bool `json:\"CpuCfsQuota\"`\n\tCPUShares          bool\n\tCPUSet             bool\n\tPidsLimit          bool\n\tIPv4Forwarding     bool\n\tDebug              bool\n\tNFd                int\n\tOomKillDisable     bool\n\tNGoroutines        int\n\tSystemTime         string\n\tLoggingDriver      string\n\tCgroupDriver       string\n\tCgroupVersion      string `json:\",omitempty\"`\n\tNEventsListener    int\n\tKernelVersion      string\n\tOperatingSystem    string\n\tOSVersion          string\n\tOSType             string\n\tArchitecture       string\n\tIndexServerAddress string\n\tRegistryConfig     *registry.ServiceConfig\n\tNCPU               int\n\tMemTotal           int64\n\tGenericResources   []swarm.GenericResource\n\tDockerRootDir      string\n\tHTTPProxy          string `json:\"HttpProxy\"`\n\tHTTPSProxy         string `json:\"HttpsProxy\"`\n\tNoProxy            string\n\tName               string\n\tLabels             []string\n\tExperimentalBuild  bool\n\tServerVersion      string\n\tRuntimes           map[string]RuntimeWithStatus\n\tDefaultRuntime     string\n\tSwarm              swarm.Info\n\t// LiveRestoreEnabled determines whether containers should be kept\n\t// running when the daemon is shutdown or upon daemon start if\n\t// running containers are detected\n\tLiveRestoreEnabled  bool\n\tIsolation           container.Isolation\n\tInitBinary          string\n\tContainerdCommit    Commit\n\tRuncCommit          Commit\n\tInitCommit          Commit\n\tSecurityOptions     []string\n\tProductLicense      string               `json:\",omitempty\"`\n\tDefaultAddressPools []NetworkAddressPool `json:\",omitempty\"`\n\tFirewallBackend     *FirewallInfo        `json:\"FirewallBackend,omitempty\"`\n\tCDISpecDirs         []string\n\tDiscoveredDevices   []DeviceInfo `json:\",omitempty\"`\n\tNRI                 *NRIInfo     `json:\",omitempty\"`\n\n\tContainerd *ContainerdInfo `json:\",omitempty\"`\n\n\t// Warnings contains a slice of warnings that occurred  while collecting\n\t// system information. These warnings are intended to be informational\n\t// messages for the user, and are not intended to be parsed / used for\n\t// other purposes, as they do not have a fixed format.\n\tWarnings []string\n}\n\n// ContainerdInfo holds information about the containerd instance used by the daemon.\ntype ContainerdInfo struct {\n\t// Address is the path to the containerd socket.\n\tAddress string `json:\",omitempty\"`\n\t// Namespaces is the containerd namespaces used by the daemon.\n\tNamespaces ContainerdNamespaces\n}\n\n// ContainerdNamespaces reflects the containerd namespaces used by the daemon.\n//\n// These namespaces can be configured in the daemon configuration, and are\n// considered to be used exclusively by the daemon,\n//\n// As these namespaces are considered to be exclusively accessed\n// by the daemon, it is not recommended to change these values,\n// or to change them to a value that is used by other systems,\n// such as cri-containerd.\ntype ContainerdNamespaces struct {\n\t// Containers holds the default containerd namespace used for\n\t// containers managed by the daemon.\n\t//\n\t// The default namespace for containers is \"moby\", but will be\n\t// suffixed with the `<uid>.<gid>` of the remapped `root` if\n\t// user-namespaces are enabled and the containerd image-store\n\t// is used.\n\tContainers string\n\n\t// Plugins holds the default containerd namespace used for\n\t// plugins managed by the daemon.\n\t//\n\t// The default namespace for plugins is \"moby\", but will be\n\t// suffixed with the `<uid>.<gid>` of the remapped `root` if\n\t// user-namespaces are enabled and the containerd image-store\n\t// is used.\n\tPlugins string\n}\n\n// PluginsInfo is a temp struct holding Plugins name\n// registered with docker daemon. It is used by [Info] struct\ntype PluginsInfo struct {\n\t// List of Volume plugins registered\n\tVolume []string\n\t// List of Network plugins registered\n\tNetwork []string\n\t// List of Authorization plugins registered\n\tAuthorization []string\n\t// List of Log plugins registered\n\tLog []string\n}\n\n// Commit holds the Git-commit (SHA1) that a binary was built from, as reported\n// in the version-string of external tools, such as containerd, or runC.\ntype Commit struct {\n\t// ID is the actual commit ID or version of external tool.\n\tID string\n}\n\n// NetworkAddressPool is a temp struct used by [Info] struct.\ntype NetworkAddressPool struct {\n\tBase netip.Prefix\n\tSize int\n}\n\n// FirewallInfo describes the firewall backend.\ntype FirewallInfo struct {\n\t// Driver is the name of the firewall backend driver.\n\tDriver string `json:\"Driver\"`\n\t// Info is a list of label/value pairs, containing information related to the firewall.\n\tInfo [][2]string `json:\"Info,omitempty\"`\n}\n\n// DeviceInfo represents a discoverable device from a device driver.\ntype DeviceInfo struct {\n\t// Source indicates the origin device driver.\n\tSource string `json:\"Source\"`\n\t// ID is the unique identifier for the device.\n\t// Example: CDI FQDN like \"vendor.com/gpu=0\", or other driver-specific device ID\n\tID string `json:\"ID\"`\n}\n\n// NRIInfo describes the NRI configuration.\ntype NRIInfo struct {\n\tInfo [][2]string `json:\"Info,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/system/runtime.go",
    "content": "package system\n\n// Runtime describes an OCI runtime\ntype Runtime struct {\n\t// \"Legacy\" runtime configuration for runc-compatible runtimes.\n\n\tPath string   `json:\"path,omitempty\"`\n\tArgs []string `json:\"runtimeArgs,omitempty\"`\n\n\t// Shimv2 runtime configuration. Mutually exclusive with the legacy config above.\n\n\tType    string         `json:\"runtimeType,omitempty\"`\n\tOptions map[string]any `json:\"options,omitempty\"`\n}\n\n// RuntimeWithStatus extends [Runtime] to hold [RuntimeStatus].\ntype RuntimeWithStatus struct {\n\tRuntime\n\tStatus map[string]string `json:\"status,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/system/version_response.go",
    "content": "package system\n\n// VersionResponse contains information about the Docker server host.\n// GET \"/version\"\ntype VersionResponse struct {\n\t// Platform is the platform (product name) the server is running on.\n\tPlatform PlatformInfo `json:\",omitempty\"`\n\n\t// Version is the version of the daemon.\n\tVersion string\n\n\t// APIVersion is the highest API version supported by the server.\n\tAPIVersion string `json:\"ApiVersion\"`\n\n\t// MinAPIVersion is the minimum API version the server supports.\n\tMinAPIVersion string `json:\"MinAPIVersion,omitempty\"`\n\n\t// Os is the operating system the server runs on.\n\tOs string\n\n\t// Arch is the hardware architecture the server runs on.\n\tArch string\n\n\t// Components contains version information for the components making\n\t// up the server. Information in this field is for informational\n\t// purposes, and not part of the API contract.\n\tComponents []ComponentVersion `json:\",omitempty\"`\n\n\t// The following fields are deprecated, they relate to the Engine component and are kept for backwards compatibility\n\n\tGitCommit     string `json:\",omitempty\"`\n\tGoVersion     string `json:\",omitempty\"`\n\tKernelVersion string `json:\",omitempty\"`\n\tExperimental  bool   `json:\",omitempty\"`\n\tBuildTime     string `json:\",omitempty\"`\n}\n\n// PlatformInfo holds information about the platform (product name) the\n// server is running on.\ntype PlatformInfo struct {\n\t// Name is the name of the platform (for example, \"Docker Engine - Community\",\n\t// or \"Docker Desktop 4.49.0 (208003)\")\n\tName string\n}\n\n// ComponentVersion describes the version information for a specific component.\ntype ComponentVersion struct {\n\tName    string\n\tVersion string\n\n\t// Details contains Key/value pairs of strings with additional information\n\t// about the component. These values are intended for informational purposes\n\t// only, and their content is not defined, and not part of the API\n\t// specification.\n\t//\n\t// These messages can be printed by the client as information to the user.\n\tDetails map[string]string `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/types.go",
    "content": "package types\n\n// MediaType represents an HTTP media type (MIME type) used in API\n// Content-Type and Accept headers.\n//\n// In addition to standard media types (for example, \"application/json\"),\n// this package defines vendor-specific vendor media types for streaming\n// endpoints, such as raw TTY streams and multiplexed stdout/stderr streams.\ntype MediaType = string\n\nconst (\n\t// MediaTypeRawStream is a vendor-specific media type for raw TTY streams.\n\tMediaTypeRawStream MediaType = \"application/vnd.docker.raw-stream\"\n\n\t// MediaTypeMultiplexedStream is a vendor-specific media type for streams\n\t// where stdin, stdout, and stderr are multiplexed into a single byte stream.\n\t//\n\t// Use stdcopy.StdCopy (https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy)\n\t// to demultiplex the stream.\n\tMediaTypeMultiplexedStream MediaType = \"application/vnd.docker.multiplexed-stream\"\n\n\t// MediaTypeJSON is the media type for JSON objects.\n\tMediaTypeJSON MediaType = \"application/json\"\n\n\t// MediaTypeNDJSON is the media type for newline-delimited JSON streams (https://github.com/ndjson/ndjson-spec).\n\tMediaTypeNDJSON MediaType = \"application/x-ndjson\"\n\n\t// MediaTypeJSONLines is the media type for JSON Lines streams (https://jsonlines.org/).\n\tMediaTypeJSONLines MediaType = \"application/jsonl\"\n\n\t// MediaTypeJSONSequence is the media type for JSON text sequences (RFC 7464).\n\tMediaTypeJSONSequence MediaType = \"application/json-seq\"\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/cluster_volume.go",
    "content": "package volume\n\nimport (\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ClusterVolume contains options and information specific to, and only present\n// on, Swarm CSI cluster volumes.\ntype ClusterVolume struct {\n\t// ID is the Swarm ID of the volume. Because cluster volumes are Swarm\n\t// objects, they have an ID, unlike non-cluster volumes, which only have a\n\t// Name. This ID can be used to refer to the cluster volume.\n\tID string\n\n\t// Meta is the swarm metadata about this volume.\n\tswarm.Meta\n\n\t// Spec is the cluster-specific options from which this volume is derived.\n\tSpec ClusterVolumeSpec\n\n\t// PublishStatus contains the status of the volume as it pertains to its\n\t// publishing on Nodes.\n\tPublishStatus []*PublishStatus `json:\",omitempty\"`\n\n\t// Info is information about the global status of the volume.\n\tInfo *Info `json:\",omitempty\"`\n}\n\n// ClusterVolumeSpec contains the spec used to create this volume.\ntype ClusterVolumeSpec struct {\n\t// Group defines the volume group of this volume. Volumes belonging to the\n\t// same group can be referred to by group name when creating Services.\n\t// Referring to a volume by group instructs swarm to treat volumes in that\n\t// group interchangeably for the purpose of scheduling. Volumes with an\n\t// empty string for a group technically all belong to the same, emptystring\n\t// group.\n\tGroup string `json:\",omitempty\"`\n\n\t// AccessMode defines how the volume is used by tasks.\n\tAccessMode *AccessMode `json:\",omitempty\"`\n\n\t// AccessibilityRequirements specifies where in the cluster a volume must\n\t// be accessible from.\n\t//\n\t// This field must be empty if the plugin does not support\n\t// VOLUME_ACCESSIBILITY_CONSTRAINTS capabilities. If it is present but the\n\t// plugin does not support it, volume will not be created.\n\t//\n\t// If AccessibilityRequirements is empty, but the plugin does support\n\t// VOLUME_ACCESSIBILITY_CONSTRAINTS, then Swarmkit will assume the entire\n\t// cluster is a valid target for the volume.\n\tAccessibilityRequirements *TopologyRequirement `json:\",omitempty\"`\n\n\t// CapacityRange defines the desired capacity that the volume should be\n\t// created with. If nil, the plugin will decide the capacity.\n\tCapacityRange *CapacityRange `json:\",omitempty\"`\n\n\t// Secrets defines Swarm Secrets that are passed to the CSI storage plugin\n\t// when operating on this volume.\n\tSecrets []Secret `json:\",omitempty\"`\n\n\t// Availability is the Volume's desired availability. Analogous to Node\n\t// Availability, this allows the user to take volumes offline in order to\n\t// update or delete them.\n\tAvailability Availability `json:\",omitempty\"`\n}\n\n// Availability specifies the availability of the volume.\ntype Availability string\n\nconst (\n\t// AvailabilityActive indicates that the volume is active and fully\n\t// schedulable on the cluster.\n\tAvailabilityActive Availability = \"active\"\n\n\t// AvailabilityPause indicates that no new workloads should use the\n\t// volume, but existing workloads can continue to use it.\n\tAvailabilityPause Availability = \"pause\"\n\n\t// AvailabilityDrain indicates that all workloads using this volume\n\t// should be rescheduled, and the volume unpublished from all nodes.\n\tAvailabilityDrain Availability = \"drain\"\n)\n\n// AccessMode defines the access mode of a volume.\ntype AccessMode struct {\n\t// Scope defines the set of nodes this volume can be used on at one time.\n\tScope Scope `json:\",omitempty\"`\n\n\t// Sharing defines the number and way that different tasks can use this\n\t// volume at one time.\n\tSharing SharingMode `json:\",omitempty\"`\n\n\t// MountVolume defines options for using this volume as a Mount-type\n\t// volume.\n\t//\n\t// Either BlockVolume or MountVolume, but not both, must be present.\n\tMountVolume *TypeMount `json:\",omitempty\"`\n\n\t// BlockVolume defines options for using this volume as a Block-type\n\t// volume.\n\t//\n\t// Either BlockVolume or MountVolume, but not both, must be present.\n\tBlockVolume *TypeBlock `json:\",omitempty\"`\n}\n\n// Scope defines the Scope of a Cluster Volume. This is how many nodes a\n// Volume can be accessed simultaneously on.\ntype Scope string\n\nconst (\n\t// ScopeSingleNode indicates the volume can be used on one node at a\n\t// time.\n\tScopeSingleNode Scope = \"single\"\n\n\t// ScopeMultiNode indicates the volume can be used on many nodes at\n\t// the same time.\n\tScopeMultiNode Scope = \"multi\"\n)\n\n// SharingMode defines the Sharing of a Cluster Volume. This is how Tasks using a\n// Volume at the same time can use it.\ntype SharingMode string\n\nconst (\n\t// SharingNone indicates that only one Task may use the Volume at a\n\t// time.\n\tSharingNone SharingMode = \"none\"\n\n\t// SharingReadOnly indicates that the Volume may be shared by any\n\t// number of Tasks, but they must be read-only.\n\tSharingReadOnly SharingMode = \"readonly\"\n\n\t// SharingOneWriter indicates that the Volume may be shared by any\n\t// number of Tasks, but all after the first must be read-only.\n\tSharingOneWriter SharingMode = \"onewriter\"\n\n\t// SharingAll means that the Volume may be shared by any number of\n\t// Tasks, as readers or writers.\n\tSharingAll SharingMode = \"all\"\n)\n\n// TypeBlock defines options for using a volume as a block-type volume.\n//\n// Intentionally empty.\ntype TypeBlock struct{}\n\n// TypeMount contains options for using a volume as a Mount-type\n// volume.\ntype TypeMount struct {\n\t// FsType specifies the filesystem type for the mount volume. Optional.\n\tFsType string `json:\",omitempty\"`\n\n\t// MountFlags defines flags to pass when mounting the volume. Optional.\n\tMountFlags []string `json:\",omitempty\"`\n}\n\n// TopologyRequirement expresses the user's requirements for a volume's\n// accessible topology.\ntype TopologyRequirement struct {\n\t// Requisite specifies a list of Topologies, at least one of which the\n\t// volume must be accessible from.\n\t//\n\t// Taken verbatim from the CSI Spec:\n\t//\n\t// Specifies the list of topologies the provisioned volume MUST be\n\t// accessible from.\n\t// This field is OPTIONAL. If TopologyRequirement is specified either\n\t// requisite or preferred or both MUST be specified.\n\t//\n\t// If requisite is specified, the provisioned volume MUST be\n\t// accessible from at least one of the requisite topologies.\n\t//\n\t// Given\n\t//   x = number of topologies provisioned volume is accessible from\n\t//   n = number of requisite topologies\n\t// The CO MUST ensure n >= 1. The SP MUST ensure x >= 1\n\t// If x==n, then the SP MUST make the provisioned volume available to\n\t// all topologies from the list of requisite topologies. If it is\n\t// unable to do so, the SP MUST fail the CreateVolume call.\n\t// For example, if a volume should be accessible from a single zone,\n\t// and requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"}\n\t// then the provisioned volume MUST be accessible from the \"region\"\n\t// \"R1\" and the \"zone\" \"Z2\".\n\t// Similarly, if a volume should be accessible from two zones, and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"}\n\t// then the provisioned volume MUST be accessible from the \"region\"\n\t// \"R1\" and both \"zone\" \"Z2\" and \"zone\" \"Z3\".\n\t//\n\t// If x<n, then the SP SHALL choose x unique topologies from the list\n\t// of requisite topologies. If it is unable to do so, the SP MUST fail\n\t// the CreateVolume call.\n\t// For example, if a volume should be accessible from a single zone,\n\t// and requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"}\n\t// then the SP may choose to make the provisioned volume available in\n\t// either the \"zone\" \"Z2\" or the \"zone\" \"Z3\" in the \"region\" \"R1\".\n\t// Similarly, if a volume should be accessible from two zones, and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z4\"}\n\t// then the provisioned volume MUST be accessible from any combination\n\t// of two unique topologies: e.g. \"R1/Z2\" and \"R1/Z3\", or \"R1/Z2\" and\n\t//  \"R1/Z4\", or \"R1/Z3\" and \"R1/Z4\".\n\t//\n\t// If x>n, then the SP MUST make the provisioned volume available from\n\t// all topologies from the list of requisite topologies and MAY choose\n\t// the remaining x-n unique topologies from the list of all possible\n\t// topologies. If it is unable to do so, the SP MUST fail the\n\t// CreateVolume call.\n\t// For example, if a volume should be accessible from two zones, and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"}\n\t// then the provisioned volume MUST be accessible from the \"region\"\n\t// \"R1\" and the \"zone\" \"Z2\" and the SP may select the second zone\n\t// independently, e.g. \"R1/Z4\".\n\tRequisite []Topology `json:\",omitempty\"`\n\n\t// Preferred is a list of Topologies that the volume should attempt to be\n\t// provisioned in.\n\t//\n\t// Taken from the CSI spec:\n\t//\n\t// Specifies the list of topologies the CO would prefer the volume to\n\t// be provisioned in.\n\t//\n\t// This field is OPTIONAL. If TopologyRequirement is specified either\n\t// requisite or preferred or both MUST be specified.\n\t//\n\t// An SP MUST attempt to make the provisioned volume available using\n\t// the preferred topologies in order from first to last.\n\t//\n\t// If requisite is specified, all topologies in preferred list MUST\n\t// also be present in the list of requisite topologies.\n\t//\n\t// If the SP is unable to make the provisioned volume available\n\t// from any of the preferred topologies, the SP MAY choose a topology\n\t// from the list of requisite topologies.\n\t// If the list of requisite topologies is not specified, then the SP\n\t// MAY choose from the list of all possible topologies.\n\t// If the list of requisite topologies is specified and the SP is\n\t// unable to make the provisioned volume available from any of the\n\t// requisite topologies it MUST fail the CreateVolume call.\n\t//\n\t// Example 1:\n\t// Given a volume should be accessible from a single zone, and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"}\n\t// preferred =\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"}\n\t// then the SP SHOULD first attempt to make the provisioned volume\n\t// available from \"zone\" \"Z3\" in the \"region\" \"R1\" and fall back to\n\t// \"zone\" \"Z2\" in the \"region\" \"R1\" if that is not possible.\n\t//\n\t// Example 2:\n\t// Given a volume should be accessible from a single zone, and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z4\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z5\"}\n\t// preferred =\n\t//   {\"region\": \"R1\", \"zone\": \"Z4\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"}\n\t// then the SP SHOULD first attempt to make the provisioned volume\n\t// accessible from \"zone\" \"Z4\" in the \"region\" \"R1\" and fall back to\n\t// \"zone\" \"Z2\" in the \"region\" \"R1\" if that is not possible. If that\n\t// is not possible, the SP may choose between either the \"zone\"\n\t// \"Z3\" or \"Z5\" in the \"region\" \"R1\".\n\t//\n\t// Example 3:\n\t// Given a volume should be accessible from TWO zones (because an\n\t// opaque parameter in CreateVolumeRequest, for example, specifies\n\t// the volume is accessible from two zones, aka synchronously\n\t// replicated), and\n\t// requisite =\n\t//   {\"region\": \"R1\", \"zone\": \"Z2\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z4\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z5\"}\n\t// preferred =\n\t//   {\"region\": \"R1\", \"zone\": \"Z5\"},\n\t//   {\"region\": \"R1\", \"zone\": \"Z3\"}\n\t// then the SP SHOULD first attempt to make the provisioned volume\n\t// accessible from the combination of the two \"zones\" \"Z5\" and \"Z3\" in\n\t// the \"region\" \"R1\". If that's not possible, it should fall back to\n\t// a combination of \"Z5\" and other possibilities from the list of\n\t// requisite. If that's not possible, it should fall back  to a\n\t// combination of \"Z3\" and other possibilities from the list of\n\t// requisite. If that's not possible, it should fall back  to a\n\t// combination of other possibilities from the list of requisite.\n\tPreferred []Topology `json:\",omitempty\"`\n}\n\n// Topology is a map of topological domains to topological segments.\n//\n// This description is taken verbatim from the CSI Spec:\n//\n// A topological domain is a sub-division of a cluster, like \"region\",\n// \"zone\", \"rack\", etc.\n// A topological segment is a specific instance of a topological domain,\n// like \"zone3\", \"rack3\", etc.\n// For example {\"com.company/zone\": \"Z1\", \"com.company/rack\": \"R3\"}\n// Valid keys have two segments: an OPTIONAL prefix and name, separated\n// by a slash (/), for example: \"com.company.example/zone\".\n// The key name segment is REQUIRED. The prefix is OPTIONAL.\n// The key name MUST be 63 characters or less, begin and end with an\n// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-),\n// underscores (_), dots (.), or alphanumerics in between, for example\n// \"zone\".\n// The key prefix MUST be 63 characters or less, begin and end with a\n// lower-case alphanumeric character ([a-z0-9]), contain only\n// dashes (-), dots (.), or lower-case alphanumerics in between, and\n// follow domain name notation format\n// (https://tools.ietf.org/html/rfc1035#section-2.3.1).\n// The key prefix SHOULD include the plugin's host company name and/or\n// the plugin name, to minimize the possibility of collisions with keys\n// from other plugins.\n// If a key prefix is specified, it MUST be identical across all\n// topology keys returned by the SP (across all RPCs).\n// Keys MUST be case-insensitive. Meaning the keys \"Zone\" and \"zone\"\n// MUST not both exist.\n// Each value (topological segment) MUST contain 1 or more strings.\n// Each string MUST be 63 characters or less and begin and end with an\n// alphanumeric character with '-', '_', '.', or alphanumerics in\n// between.\ntype Topology struct {\n\tSegments map[string]string `json:\",omitempty\"`\n}\n\n// CapacityRange describes the minimum and maximum capacity a volume should be\n// created with\ntype CapacityRange struct {\n\t// RequiredBytes specifies that a volume must be at least this big. The\n\t// value of 0 indicates an unspecified minimum.\n\tRequiredBytes int64\n\n\t// LimitBytes specifies that a volume must not be bigger than this. The\n\t// value of 0 indicates an unspecified maximum\n\tLimitBytes int64\n}\n\n// Secret represents a Swarm Secret value that must be passed to the CSI\n// storage plugin when operating on this Volume. It represents one key-value\n// pair of possibly many.\ntype Secret struct {\n\t// Key is the name of the key of the key-value pair passed to the plugin.\n\tKey string\n\n\t// Secret is the swarm Secret object from which to read data. This can be a\n\t// Secret name or ID. The Secret data is retrieved by Swarm and used as the\n\t// value of the key-value pair passed to the plugin.\n\tSecret string\n}\n\n// PublishState represents the state of a Volume as it pertains to its\n// use on a particular Node.\ntype PublishState string\n\nconst (\n\t// StatePending indicates that the volume should be published on\n\t// this node, but the call to ControllerPublishVolume has not been\n\t// successfully completed yet and the result recorded by swarmkit.\n\tStatePending PublishState = \"pending-publish\"\n\n\t// StatePublished means the volume is published successfully to the node.\n\tStatePublished PublishState = \"published\"\n\n\t// StatePendingNodeUnpublish indicates that the Volume should be\n\t// unpublished on the Node, and we're waiting for confirmation that it has\n\t// done so.  After the Node has confirmed that the Volume has been\n\t// unpublished, the state will move to StatePendingUnpublish.\n\tStatePendingNodeUnpublish PublishState = \"pending-node-unpublish\"\n\n\t// StatePendingUnpublish means the volume is still published to the node\n\t// by the controller, awaiting the operation to unpublish it.\n\tStatePendingUnpublish PublishState = \"pending-controller-unpublish\"\n)\n\n// PublishStatus represents the status of the volume as published to an\n// individual node\ntype PublishStatus struct {\n\t// NodeID is the ID of the swarm node this Volume is published to.\n\tNodeID string `json:\",omitempty\"`\n\n\t// State is the publish state of the volume.\n\tState PublishState `json:\",omitempty\"`\n\n\t// PublishContext is the PublishContext returned by the CSI plugin when\n\t// a volume is published.\n\tPublishContext map[string]string `json:\",omitempty\"`\n}\n\n// Info contains information about the Volume as a whole as provided by\n// the CSI storage plugin.\ntype Info struct {\n\t// CapacityBytes is the capacity of the volume in bytes. A value of 0\n\t// indicates that the capacity is unknown.\n\tCapacityBytes int64 `json:\",omitempty\"`\n\n\t// VolumeContext is the context originating from the CSI storage plugin\n\t// when the Volume is created.\n\tVolumeContext map[string]string `json:\",omitempty\"`\n\n\t// VolumeID is the ID of the Volume as seen by the CSI storage plugin. This\n\t// is distinct from the Volume's Swarm ID, which is the ID used by all of\n\t// the Docker Engine to refer to the Volume. If this field is blank, then\n\t// the Volume has not been successfully created yet.\n\tVolumeID string `json:\",omitempty\"`\n\n\t// AccessibleTopology is the topology this volume is actually accessible\n\t// from.\n\tAccessibleTopology []Topology `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/create_request.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage volume\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// CreateRequest VolumeConfig\n//\n// # Volume configuration\n//\n// swagger:model CreateRequest\ntype CreateRequest struct {\n\n\t// cluster volume spec\n\tClusterVolumeSpec *ClusterVolumeSpec `json:\"ClusterVolumeSpec,omitempty\"`\n\n\t// Name of the volume driver to use.\n\t// Example: custom\n\tDriver string `json:\"Driver,omitempty\"`\n\n\t// A mapping of driver options and values. These options are\n\t// passed directly to the driver and are driver specific.\n\t//\n\t// Example: {\"device\":\"tmpfs\",\"o\":\"size=100m,uid=1000\",\"type\":\"tmpfs\"}\n\tDriverOpts map[string]string `json:\"DriverOpts,omitempty\"`\n\n\t// User-defined key/value metadata.\n\t// Example: {\"com.example.some-label\":\"some-value\",\"com.example.some-other-label\":\"some-other-value\"}\n\tLabels map[string]string `json:\"Labels,omitempty\"`\n\n\t// The new volume's name. If not specified, Docker generates a name.\n\t//\n\t// Example: tardis\n\tName string `json:\"Name,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/disk_usage.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage volume\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// DiskUsage represents system data usage for volume resources.\n//\n// swagger:model DiskUsage\ntype DiskUsage struct {\n\n\t// Count of active volumes.\n\t//\n\t// Example: 1\n\tActiveCount int64 `json:\"ActiveCount,omitempty\"`\n\n\t// List of volumes.\n\t//\n\tItems []Volume `json:\"Items,omitempty\"`\n\n\t// Disk space that can be reclaimed by removing inactive volumes.\n\t//\n\t// Example: 12345678\n\tReclaimable int64 `json:\"Reclaimable,omitempty\"`\n\n\t// Count of all volumes.\n\t//\n\t// Example: 4\n\tTotalCount int64 `json:\"TotalCount,omitempty\"`\n\n\t// Disk space in use by volumes.\n\t//\n\t// Example: 98765432\n\tTotalSize int64 `json:\"TotalSize,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/list_response.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage volume\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// ListResponse VolumeListResponse\n//\n// # Volume list response\n//\n// swagger:model ListResponse\ntype ListResponse struct {\n\n\t// List of volumes\n\tVolumes []Volume `json:\"Volumes\"`\n\n\t// Warnings that occurred when fetching the list of volumes.\n\t//\n\t// Example: []\n\tWarnings []string `json:\"Warnings\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/prune_report.go",
    "content": "package volume\n\n// PruneReport contains the response for Engine API:\n// POST \"/volumes/prune\"\ntype PruneReport struct {\n\tVolumesDeleted []string\n\tSpaceReclaimed uint64\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/api/types/volume/volume.go",
    "content": "// Code generated by go-swagger; DO NOT EDIT.\n\npackage volume\n\n// This file was generated by the swagger tool.\n// Editing this file might prove futile when you re-run the swagger generate command\n\n// Volume volume\n//\n// swagger:model Volume\ntype Volume struct {\n\n\t// cluster volume\n\tClusterVolume *ClusterVolume `json:\"ClusterVolume,omitempty\"`\n\n\t// Date/Time the volume was created.\n\t// Example: 2016-06-07T20:31:11.853781916Z\n\tCreatedAt string `json:\"CreatedAt,omitempty\"`\n\n\t// Name of the volume driver used by the volume.\n\t// Example: custom\n\t// Required: true\n\tDriver string `json:\"Driver\"`\n\n\t// User-defined key/value metadata.\n\t// Example: {\"com.example.some-label\":\"some-value\",\"com.example.some-other-label\":\"some-other-value\"}\n\t// Required: true\n\tLabels map[string]string `json:\"Labels\"`\n\n\t// Mount path of the volume on the host.\n\t// Example: /var/lib/docker/volumes/tardis\n\t// Required: true\n\tMountpoint string `json:\"Mountpoint\"`\n\n\t// Name of the volume.\n\t// Example: tardis\n\t// Required: true\n\tName string `json:\"Name\"`\n\n\t// The driver specific options used when creating the volume.\n\t//\n\t// Example: {\"device\":\"tmpfs\",\"o\":\"size=100m,uid=1000\",\"type\":\"tmpfs\"}\n\t// Required: true\n\tOptions map[string]string `json:\"Options\"`\n\n\t// The level at which the volume exists. Either `global` for cluster-wide,\n\t// or `local` for machine level.\n\t//\n\t// Example: local\n\t// Required: true\n\t// Enum: [\"local\",\"global\"]\n\tScope string `json:\"Scope\"`\n\n\t// Low-level details about the volume, provided by the volume driver.\n\t// Details are returned as a map with key/value pairs:\n\t// `{\"key\":\"value\",\"key2\":\"value2\"}`.\n\t//\n\t// The `Status` field is optional, and is omitted if the volume driver\n\t// does not support this feature.\n\t//\n\t// Example: {\"hello\":\"world\"}\n\tStatus map[string]any `json:\"Status,omitempty\"`\n\n\t// usage data\n\tUsageData *UsageData `json:\"UsageData,omitempty\"`\n}\n\n// UsageData Usage details about the volume. This information is used by the\n// `GET /system/df` endpoint, and omitted in other endpoints.\n//\n// swagger:model UsageData\ntype UsageData struct {\n\n\t// The number of containers referencing this volume. This field\n\t// is set to `-1` if the reference-count is not available.\n\t//\n\t// Required: true\n\tRefCount int64 `json:\"RefCount\"`\n\n\t// Amount of disk space used by the volume (in bytes). This information\n\t// is only available for volumes created with the `\"local\"` volume\n\t// driver. For volumes created with other volume drivers, this field\n\t// is set to `-1` (\"not available\")\n\t//\n\t// Required: true\n\tSize int64 `json:\"Size\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/LICENSE",
    "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 [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": "vendor/github.com/moby/moby/client/README.md",
    "content": "# Go client for the Docker Engine API\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/moby/moby/client)](https://pkg.go.dev/github.com/moby/moby/client)\n![GitHub License](https://img.shields.io/github/license/moby/moby)\n[![Go Report Card](https://goreportcard.com/badge/github.com/moby/moby/client)](https://goreportcard.com/report/github.com/moby/moby/client)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/moby/moby/badge)](https://scorecard.dev/viewer/?uri=github.com/moby/moby)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10989/badge)](https://www.bestpractices.dev/projects/10989)\n\nThe `docker` command uses this package to communicate with the daemon. It can\nalso be used by your own Go applications to do anything the command-line\ninterface does; running containers, pulling or pushing images, etc.\n\nFor example, to list all containers (the equivalent of `docker ps --all`):\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/moby/moby/client\"\n)\n\nfunc main() {\n\t// Create a new client that handles common environment variables\n\t// for configuration (DOCKER_HOST, DOCKER_API_VERSION), and does\n\t// API-version negotiation to allow downgrading the API version\n\t// when connecting with an older daemon version.\n\tapiClient, err := client.New(client.FromEnv)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer apiClient.Close()\n\n\t// List all containers (both stopped and running).\n\tresult, err := apiClient.ContainerList(context.Background(), client.ContainerListOptions{\n\t\tAll: true,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Print each container's ID, status and the image it was created from.\n\tfmt.Printf(\"%s  %-22s  %s\\n\", \"ID\", \"STATUS\", \"IMAGE\")\n\tfor _, ctr := range result.Items {\n\t\tfmt.Printf(\"%s  %-22s  %s\\n\", ctr.ID, ctr.Status, ctr.Image)\n\t}\n}\n```\n\n[Full documentation is available on pkg.go.dev.](https://pkg.go.dev/github.com/moby/moby/client)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/auth.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// staticAuth creates a privilegeFn from the given registryAuth.\nfunc staticAuth(registryAuth string) registry.RequestAuthConfig {\n\treturn func(ctx context.Context) (string, error) {\n\t\treturn registryAuth, nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/build_cancel.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\ntype BuildCancelOptions struct{}\n\ntype BuildCancelResult struct{}\n\n// BuildCancel requests the daemon to cancel the ongoing build request\n// with the given id.\nfunc (cli *Client) BuildCancel(ctx context.Context, id string, _ BuildCancelOptions) (BuildCancelResult, error) {\n\tquery := url.Values{}\n\tquery.Set(\"id\", id)\n\n\tresp, err := cli.post(ctx, \"/build/cancel\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn BuildCancelResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/build_prune.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/moby/moby/api/types/build\"\n\t\"github.com/moby/moby/client/pkg/versions\"\n)\n\n// BuildCachePruneOptions hold parameters to prune the build cache.\ntype BuildCachePruneOptions struct {\n\tAll           bool\n\tReservedSpace int64\n\tMaxUsedSpace  int64\n\tMinFreeSpace  int64\n\tFilters       Filters\n}\n\n// BuildCachePruneResult holds the result from the BuildCachePrune method.\ntype BuildCachePruneResult struct {\n\tReport build.CachePruneReport\n}\n\n// BuildCachePrune requests the daemon to delete unused cache data.\nfunc (cli *Client) BuildCachePrune(ctx context.Context, opts BuildCachePruneOptions) (BuildCachePruneResult, error) {\n\tvar out BuildCachePruneResult\n\tquery := url.Values{}\n\tif opts.All {\n\t\tquery.Set(\"all\", \"1\")\n\t}\n\n\tif opts.ReservedSpace != 0 {\n\t\t// Prior to API v1.48, 'keep-storage' was used to set the reserved space for the build cache.\n\t\t// TODO(austinvazquez): remove once API v1.47 is no longer supported. See https://github.com/moby/moby/issues/50902\n\t\tif versions.LessThanOrEqualTo(cli.version, \"1.47\") {\n\t\t\tquery.Set(\"keep-storage\", strconv.Itoa(int(opts.ReservedSpace)))\n\t\t} else {\n\t\t\tquery.Set(\"reserved-space\", strconv.Itoa(int(opts.ReservedSpace)))\n\t\t}\n\t}\n\tif opts.MaxUsedSpace != 0 {\n\t\tquery.Set(\"max-used-space\", strconv.Itoa(int(opts.MaxUsedSpace)))\n\t}\n\tif opts.MinFreeSpace != 0 {\n\t\tquery.Set(\"min-free-space\", strconv.Itoa(int(opts.MinFreeSpace)))\n\t}\n\topts.Filters.updateURLValues(query)\n\n\tresp, err := cli.post(ctx, \"/build/prune\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\n\tif err != nil {\n\t\treturn BuildCachePruneResult{}, err\n\t}\n\n\treport := build.CachePruneReport{}\n\tif err := json.NewDecoder(resp.Body).Decode(&report); err != nil {\n\t\treturn BuildCachePruneResult{}, fmt.Errorf(\"error retrieving disk usage: %w\", err)\n\t}\n\n\tout.Report = report\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/checkpoint_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/checkpoint\"\n)\n\n// CheckpointCreateOptions holds parameters to create a checkpoint from a container.\ntype CheckpointCreateOptions struct {\n\tCheckpointID  string\n\tCheckpointDir string\n\tExit          bool\n}\n\n// CheckpointCreateResult holds the result from [client.CheckpointCreate].\ntype CheckpointCreateResult struct {\n\t// Add future fields here\n}\n\n// CheckpointCreate creates a checkpoint from the given container.\nfunc (cli *Client) CheckpointCreate(ctx context.Context, containerID string, options CheckpointCreateOptions) (CheckpointCreateResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn CheckpointCreateResult{}, err\n\t}\n\trequestBody := checkpoint.CreateRequest{\n\t\tCheckpointID:  options.CheckpointID,\n\t\tCheckpointDir: options.CheckpointDir,\n\t\tExit:          options.Exit,\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/checkpoints\", nil, requestBody, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn CheckpointCreateResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/checkpoint_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/checkpoint\"\n)\n\n// CheckpointListOptions holds parameters to list checkpoints for a container.\ntype CheckpointListOptions struct {\n\tCheckpointDir string\n}\n\n// CheckpointListResult holds the result from the CheckpointList method.\ntype CheckpointListResult struct {\n\tItems []checkpoint.Summary\n}\n\n// CheckpointList returns the checkpoints of the given container in the docker host.\nfunc (cli *Client) CheckpointList(ctx context.Context, container string, options CheckpointListOptions) (CheckpointListResult, error) {\n\tvar out CheckpointListResult\n\n\tquery := url.Values{}\n\tif options.CheckpointDir != \"\" {\n\t\tquery.Set(\"dir\", options.CheckpointDir)\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+container+\"/checkpoints\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\n\terr = json.NewDecoder(resp.Body).Decode(&out.Items)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/checkpoint_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// CheckpointRemoveOptions holds parameters to delete a checkpoint from a container.\ntype CheckpointRemoveOptions struct {\n\tCheckpointID  string\n\tCheckpointDir string\n}\n\n// CheckpointRemoveResult represents the result of [Client.CheckpointRemove].\ntype CheckpointRemoveResult struct {\n\t// No fields currently; placeholder for future use.\n}\n\n// CheckpointRemove deletes the checkpoint with the given name from the given container.\nfunc (cli *Client) CheckpointRemove(ctx context.Context, containerID string, options CheckpointRemoveOptions) (CheckpointRemoveResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn CheckpointRemoveResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.CheckpointDir != \"\" {\n\t\tquery.Set(\"dir\", options.CheckpointDir)\n\t}\n\n\tresp, err := cli.delete(ctx, \"/containers/\"+containerID+\"/checkpoints/\"+options.CheckpointID, query, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn CheckpointRemoveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client.go",
    "content": "/*\nPackage client is a Go client for the Docker Engine API.\n\nFor more information about the Engine API, see the documentation:\nhttps://docs.docker.com/reference/api/engine/\n\n# Usage\n\nYou use the library by constructing a client object using [New]\nand calling methods on it. The client can be configured from environment\nvariables by passing the [FromEnv] option. Other options can be configured\nmanually by passing any of the available [Opt] options.\n\nFor example, to list running containers (the equivalent of \"docker ps\"):\n\n\tpackage main\n\n\timport (\n\t\t\"context\"\n\t\t\"fmt\"\n\t\t\"log\"\n\n\t\t\"github.com/moby/moby/client\"\n\t)\n\n\tfunc main() {\n\t\t// Create a new client that handles common environment variables\n\t\t// for configuration (DOCKER_HOST, DOCKER_API_VERSION), and does\n\t\t// API-version negotiation to allow downgrading the API version\n\t\t// when connecting with an older daemon version.\n\t\tapiClient, err := client.New(client.FromEnv)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\t// List all containers (both stopped and running).\n\t\tresult, err := apiClient.ContainerList(context.Background(), client.ContainerListOptions{\n\t\t\tAll: true,\n\t\t})\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\n\t\t// Print each container's ID, status and the image it was created from.\n\t\tfmt.Printf(\"%s  %-22s  %s\\n\", \"ID\", \"STATUS\", \"IMAGE\")\n\t\tfor _, ctr := range result.Items {\n\t\t\tfmt.Printf(\"%s  %-22s  %s\\n\", ctr.ID, ctr.Status, ctr.Image)\n\t\t}\n\t}\n*/\npackage client\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"path\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/docker/go-connections/sockets\"\n\t\"github.com/moby/moby/client/pkg/versions\"\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n)\n\n// DummyHost is a hostname used for local communication.\n//\n// It acts as a valid formatted hostname for local connections (such as \"unix://\"\n// or \"npipe://\") which do not require a hostname. It should never be resolved,\n// but uses the special-purpose \".localhost\" TLD (as defined in [RFC 2606, Section 2]\n// and [RFC 6761, Section 6.3]).\n//\n// [RFC 7230, Section 5.4] defines that an empty header must be used for such\n// cases:\n//\n//\tIf the authority component is missing or undefined for the target URI,\n//\tthen a client MUST send a Host header field with an empty field-value.\n//\n// However, [Go stdlib] enforces the semantics of HTTP(S) over TCP, does not\n// allow an empty header to be used, and requires req.URL.Scheme to be either\n// \"http\" or \"https\".\n//\n// For further details, refer to:\n//\n//   - https://github.com/docker/engine-api/issues/189\n//   - https://github.com/golang/go/issues/13624\n//   - https://github.com/golang/go/issues/61076\n//   - https://github.com/moby/moby/issues/45935\n//\n// [RFC 2606, Section 2]: https://www.rfc-editor.org/rfc/rfc2606.html#section-2\n// [RFC 6761, Section 6.3]: https://www.rfc-editor.org/rfc/rfc6761#section-6.3\n// [RFC 7230, Section 5.4]: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4\n// [Go stdlib]: https://github.com/golang/go/blob/6244b1946bc2101b01955468f1be502dbadd6807/src/net/http/transport.go#L558-L569\nconst DummyHost = \"api.moby.localhost\"\n\n// MaxAPIVersion is the highest REST API version supported by the client.\n// If API-version negotiation is enabled, the client may downgrade its API version.\n// Similarly, the [WithAPIVersion] and [WithAPIVersionFromEnv] options allow\n// overriding the version and disable API-version negotiation.\n//\n// This version may be lower than the version of the api library module used.\nconst MaxAPIVersion = \"1.54\"\n\n// MinAPIVersion is the minimum API version supported by the client. API versions\n// below this version are not considered when performing API-version negotiation.\nconst MinAPIVersion = \"1.40\"\n\n// Ensure that Client always implements APIClient.\nvar _ APIClient = &Client{}\n\n// Client is the API client that performs all operations\n// against a docker server.\ntype Client struct {\n\tclientConfig\n\n\t// negotiated indicates that API version negotiation took place\n\tnegotiated atomic.Bool\n\n\t// negotiateLock is used to single-flight the version negotiation process\n\tnegotiateLock sync.Mutex\n\n\t// When the client transport is an *http.Transport (default) we need to do some extra things (like closing idle connections).\n\t// Store the original transport as the http.Client transport will be wrapped with tracing libs.\n\tbaseTransport *http.Transport\n}\n\n// ErrRedirect is the error returned by checkRedirect when the request is non-GET.\nvar ErrRedirect = errors.New(\"unexpected redirect in response\")\n\n// CheckRedirect specifies the policy for dealing with redirect responses. It\n// can be set on [http.Client.CheckRedirect] to prevent HTTP redirects for\n// non-GET requests. It returns an [ErrRedirect] for non-GET request, otherwise\n// returns a [http.ErrUseLastResponse], which is special-cased by http.Client\n// to use the last response.\n//\n// Go 1.8 changed behavior for HTTP redirects (specifically 301, 307, and 308)\n// in the client. The client (and by extension API client) can be made to send\n// a request like \"POST /containers//start\" where what would normally be in the\n// name section of the URL is empty. This triggers an HTTP 301 from the daemon.\n//\n// In go 1.8 this 301 is converted to a GET request, and ends up getting\n// a 404 from the daemon. This behavior change manifests in the client in that\n// before, the 301 was not followed and the client did not generate an error,\n// but now results in a message like \"Error response from daemon: page not found\".\nfunc CheckRedirect(_ *http.Request, via []*http.Request) error {\n\tif via[0].Method == http.MethodGet {\n\t\treturn http.ErrUseLastResponse\n\t}\n\treturn ErrRedirect\n}\n\n// NewClientWithOpts initializes a new API client.\n//\n// Deprecated: use New. This function will be removed in the next release.\nfunc NewClientWithOpts(ops ...Opt) (*Client, error) {\n\treturn New(ops...)\n}\n\n// New initializes a new API client with a default HTTPClient, and\n// default API host and version. It also initializes the custom HTTP headers to\n// add to each request.\n//\n// It takes an optional list of [Opt] functional arguments, which are applied in\n// the order they're provided, which allows modifying the defaults when creating\n// the client. For example, the following initializes a client that configures\n// itself with values from environment variables ([FromEnv]).\n//\n// By default, the client automatically negotiates the API version to use when\n// making requests. API version negotiation is performed on the first request;\n// subsequent requests do not re-negotiate. Use [WithAPIVersion] or\n// [WithAPIVersionFromEnv] to configure the client with a fixed API version\n// and disable API version negotiation.\n//\n//\tcli, err := client.New(client.FromEnv)\nfunc New(ops ...Opt) (*Client, error) {\n\thostURL, err := ParseHostURL(DefaultDockerHost)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tclient, err := defaultHTTPClient(hostURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc := &Client{\n\t\tclientConfig: clientConfig{\n\t\t\thost:    DefaultDockerHost,\n\t\t\tversion: MaxAPIVersion,\n\t\t\tclient:  client,\n\t\t\tproto:   hostURL.Scheme,\n\t\t\taddr:    hostURL.Host,\n\t\t\ttraceOpts: []otelhttp.Option{\n\t\t\t\totelhttp.WithSpanNameFormatter(func(_ string, req *http.Request) string {\n\t\t\t\t\treturn req.Method + \" \" + req.URL.Path\n\t\t\t\t}),\n\t\t\t},\n\t\t},\n\t}\n\tcfg := &c.clientConfig\n\n\tfor _, op := range ops {\n\t\tif err := op(cfg); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif cfg.envAPIVersion != \"\" {\n\t\tc.setAPIVersion(cfg.envAPIVersion)\n\t} else if cfg.manualAPIVersion != \"\" {\n\t\tc.setAPIVersion(cfg.manualAPIVersion)\n\t}\n\n\tif tr, ok := c.client.Transport.(*http.Transport); ok {\n\t\t// Store the base transport before we wrap it in tracing libs below\n\t\t// This is used, as an example, to close idle connections when the client is closed\n\t\tc.baseTransport = tr\n\t}\n\n\tif c.scheme == \"\" {\n\t\t// TODO(stevvooe): This isn't really the right way to write clients in Go.\n\t\t// `NewClient` should probably only take an `*http.Client` and work from there.\n\t\t// Unfortunately, the model of having a host-ish/url-thingy as the connection\n\t\t// string has us confusing protocol and transport layers. We continue doing\n\t\t// this to avoid breaking existing clients but this should be addressed.\n\t\tif c.tlsConfig() != nil {\n\t\t\tc.scheme = \"https\"\n\t\t} else {\n\t\t\tc.scheme = \"http\"\n\t\t}\n\t}\n\n\tc.client.Transport = otelhttp.NewTransport(c.client.Transport, c.traceOpts...)\n\n\tif len(cfg.responseHooks) > 0 {\n\t\tc.client.Transport = &responseHookTransport{\n\t\t\tbase:  c.client.Transport,\n\t\t\thooks: slices.Clone(cfg.responseHooks),\n\t\t}\n\t}\n\n\treturn c, nil\n}\n\nfunc (cli *Client) tlsConfig() *tls.Config {\n\tif cli.baseTransport == nil {\n\t\treturn nil\n\t}\n\treturn cli.baseTransport.TLSClientConfig\n}\n\nfunc defaultHTTPClient(hostURL *url.URL) (*http.Client, error) {\n\ttransport := &http.Transport{}\n\t// Necessary to prevent long-lived processes using the\n\t// client from leaking connections due to idle connections\n\t// not being released.\n\t// TODO: see if we can also address this from the server side,\n\t// or in go-connections.\n\t// see: https://github.com/moby/moby/issues/45539\n\ttransport.MaxIdleConns = 6\n\ttransport.IdleConnTimeout = 30 * time.Second\n\terr := sockets.ConfigureTransport(transport, hostURL.Scheme, hostURL.Host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &http.Client{\n\t\tTransport:     transport,\n\t\tCheckRedirect: CheckRedirect,\n\t}, nil\n}\n\n// Close the transport used by the client\nfunc (cli *Client) Close() error {\n\tif cli.baseTransport != nil {\n\t\tcli.baseTransport.CloseIdleConnections()\n\t\treturn nil\n\t}\n\treturn nil\n}\n\n// checkVersion manually triggers API version negotiation (if configured).\n// This allows for version-dependent code to use the same version as will\n// be negotiated when making the actual requests, and for which cases\n// we cannot do the negotiation lazily.\nfunc (cli *Client) checkVersion(ctx context.Context) error {\n\tif cli.negotiated.Load() {\n\t\treturn nil\n\t}\n\t_, err := cli.Ping(ctx, PingOptions{\n\t\tNegotiateAPIVersion: true,\n\t})\n\treturn err\n}\n\n// getAPIPath returns the versioned request path to call the API.\n// It appends the query parameters to the path if they are not empty.\nfunc (cli *Client) getAPIPath(ctx context.Context, p string, query url.Values) string {\n\tvar apiPath string\n\t_ = cli.checkVersion(ctx)\n\tif cli.version != \"\" {\n\t\tapiPath = path.Join(cli.basePath, \"/v\"+strings.TrimPrefix(cli.version, \"v\"), p)\n\t} else {\n\t\tapiPath = path.Join(cli.basePath, p)\n\t}\n\treturn (&url.URL{Path: apiPath, RawQuery: query.Encode()}).String()\n}\n\n// ClientVersion returns the API version used by this client.\nfunc (cli *Client) ClientVersion() string {\n\treturn cli.version\n}\n\n// negotiateAPIVersion updates the version to match the API version from\n// the ping response.\n//\n// It returns an error if version is invalid, or lower than the minimum\n// supported API version in which case the client's API version is not\n// updated, and negotiation is not marked as completed.\nfunc (cli *Client) negotiateAPIVersion(pingVersion string) error {\n\tvar err error\n\tpingVersion, err = parseAPIVersion(pingVersion)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif versions.LessThan(pingVersion, MinAPIVersion) {\n\t\treturn cerrdefs.ErrInvalidArgument.WithMessage(fmt.Sprintf(\"API version %s is not supported by this client: the minimum supported API version is %s\", pingVersion, MinAPIVersion))\n\t}\n\n\t// if the client is not initialized with a version, start with the latest supported version\n\tnegotiatedVersion := cli.version\n\tif negotiatedVersion == \"\" {\n\t\tnegotiatedVersion = MaxAPIVersion\n\t}\n\n\t// if server version is lower than the client version, downgrade\n\tif versions.LessThan(pingVersion, negotiatedVersion) {\n\t\tnegotiatedVersion = pingVersion\n\t}\n\n\t// Store the results, so that automatic API version negotiation (if enabled)\n\t// won't be performed on the next request.\n\tcli.setAPIVersion(negotiatedVersion)\n\treturn nil\n}\n\n// setAPIVersion sets the client's API version and marks API version negotiation\n// as completed, so that automatic API version negotiation (if enabled) won't\n// be performed on the next request.\nfunc (cli *Client) setAPIVersion(version string) {\n\tcli.version = version\n\tcli.negotiated.Store(true)\n}\n\n// DaemonHost returns the host address used by the client\nfunc (cli *Client) DaemonHost() string {\n\treturn cli.host\n}\n\n// ParseHostURL parses a url string, validates the string is a host url, and\n// returns the parsed URL\nfunc ParseHostURL(host string) (*url.URL, error) {\n\tproto, addr, ok := strings.Cut(host, \"://\")\n\tif !ok || addr == \"\" {\n\t\treturn nil, fmt.Errorf(\"unable to parse docker host `%s`\", host)\n\t}\n\n\tvar basePath string\n\tif proto == \"tcp\" {\n\t\tparsed, err := url.Parse(\"tcp://\" + addr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\taddr = parsed.Host\n\t\tbasePath = parsed.Path\n\t}\n\treturn &url.URL{\n\t\tScheme: proto,\n\t\tHost:   addr,\n\t\tPath:   basePath,\n\t}, nil\n}\n\nfunc (cli *Client) dialerFromTransport() func(context.Context, string, string) (net.Conn, error) {\n\tif cli.baseTransport == nil || cli.baseTransport.DialContext == nil {\n\t\treturn nil\n\t}\n\n\tif cli.baseTransport.TLSClientConfig != nil {\n\t\t// When using a tls config we don't use the configured dialer but instead a fallback dialer...\n\t\t// Note: It seems like this should use the normal dialer and wrap the returned net.Conn in a tls.Conn\n\t\t// I honestly don't know why it doesn't do that, but it doesn't and such a change is entirely unrelated to the change in this commit.\n\t\treturn nil\n\t}\n\treturn cli.baseTransport.DialContext\n}\n\n// Dialer returns a dialer for a raw stream connection, with an HTTP/1.1 header,\n// that can be used for proxying the daemon connection. It is used by\n// [\"docker dial-stdio\"].\n//\n// [\"docker dial-stdio\"]: https://github.com/docker/cli/pull/1014\nfunc (cli *Client) Dialer() func(context.Context) (net.Conn, error) {\n\treturn cli.dialer()\n}\n\nfunc (cli *Client) dialer() func(context.Context) (net.Conn, error) {\n\treturn func(ctx context.Context) (net.Conn, error) {\n\t\tif dialFn := cli.dialerFromTransport(); dialFn != nil {\n\t\t\treturn dialFn(ctx, cli.proto, cli.addr)\n\t\t}\n\t\tswitch cli.proto {\n\t\tcase \"unix\":\n\t\t\treturn net.Dial(cli.proto, cli.addr)\n\t\tcase \"npipe\":\n\t\t\tctx, cancel := context.WithTimeout(ctx, 32*time.Second)\n\t\t\tdefer cancel()\n\t\t\treturn dialPipeContext(ctx, cli.addr)\n\t\tdefault:\n\t\t\tif tlsConfig := cli.tlsConfig(); tlsConfig != nil {\n\t\t\t\treturn tls.Dial(cli.proto, cli.addr, tlsConfig)\n\t\t\t}\n\t\t\treturn net.Dial(cli.proto, cli.addr)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client_interfaces.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net\"\n)\n\n// APIClient is an interface that clients that talk with a docker server must implement.\ntype APIClient interface {\n\tstableAPIClient\n\tCheckpointAPIClient // CheckpointAPIClient is still experimental.\n}\n\ntype stableAPIClient interface {\n\tConfigAPIClient\n\tContainerAPIClient\n\tDistributionAPIClient\n\tRegistrySearchClient\n\tExecAPIClient\n\tImageBuildAPIClient\n\tImageAPIClient\n\tNetworkAPIClient\n\tPluginAPIClient\n\tSystemAPIClient\n\tVolumeAPIClient\n\tClientVersion() string\n\tDaemonHost() string\n\tServerVersion(ctx context.Context, options ServerVersionOptions) (ServerVersionResult, error)\n\tHijackDialer\n\tDialer() func(context.Context) (net.Conn, error)\n\tClose() error\n\tSwarmManagementAPIClient\n}\n\n// SwarmManagementAPIClient defines all methods for managing Swarm-specific\n// objects.\ntype SwarmManagementAPIClient interface {\n\tSwarmAPIClient\n\tNodeAPIClient\n\tServiceAPIClient\n\tTaskAPIClient\n\tSecretAPIClient\n\tConfigAPIClient\n}\n\n// HijackDialer defines methods for a hijack dialer.\ntype HijackDialer interface {\n\tDialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error)\n}\n\n// CheckpointAPIClient defines API client methods for the checkpoints.\n//\n// Experimental: checkpoint and restore is still an experimental feature,\n// and only available if the daemon is running with experimental features\n// enabled.\ntype CheckpointAPIClient interface {\n\tCheckpointCreate(ctx context.Context, container string, options CheckpointCreateOptions) (CheckpointCreateResult, error)\n\tCheckpointRemove(ctx context.Context, container string, options CheckpointRemoveOptions) (CheckpointRemoveResult, error)\n\tCheckpointList(ctx context.Context, container string, options CheckpointListOptions) (CheckpointListResult, error)\n}\n\n// ContainerAPIClient defines API client methods for the containers\ntype ContainerAPIClient interface {\n\tContainerCreate(ctx context.Context, options ContainerCreateOptions) (ContainerCreateResult, error)\n\tContainerInspect(ctx context.Context, container string, options ContainerInspectOptions) (ContainerInspectResult, error)\n\tContainerList(ctx context.Context, options ContainerListOptions) (ContainerListResult, error)\n\tContainerUpdate(ctx context.Context, container string, updateConfig ContainerUpdateOptions) (ContainerUpdateResult, error)\n\tContainerRemove(ctx context.Context, container string, options ContainerRemoveOptions) (ContainerRemoveResult, error)\n\tContainerPrune(ctx context.Context, opts ContainerPruneOptions) (ContainerPruneResult, error)\n\n\tContainerLogs(ctx context.Context, container string, options ContainerLogsOptions) (ContainerLogsResult, error)\n\n\tContainerStart(ctx context.Context, container string, options ContainerStartOptions) (ContainerStartResult, error)\n\tContainerStop(ctx context.Context, container string, options ContainerStopOptions) (ContainerStopResult, error)\n\tContainerRestart(ctx context.Context, container string, options ContainerRestartOptions) (ContainerRestartResult, error)\n\tContainerPause(ctx context.Context, container string, options ContainerPauseOptions) (ContainerPauseResult, error)\n\tContainerUnpause(ctx context.Context, container string, options ContainerUnpauseOptions) (ContainerUnpauseResult, error)\n\tContainerWait(ctx context.Context, container string, options ContainerWaitOptions) ContainerWaitResult\n\tContainerKill(ctx context.Context, container string, options ContainerKillOptions) (ContainerKillResult, error)\n\n\tContainerRename(ctx context.Context, container string, options ContainerRenameOptions) (ContainerRenameResult, error)\n\tContainerResize(ctx context.Context, container string, options ContainerResizeOptions) (ContainerResizeResult, error)\n\tContainerAttach(ctx context.Context, container string, options ContainerAttachOptions) (ContainerAttachResult, error)\n\tContainerCommit(ctx context.Context, container string, options ContainerCommitOptions) (ContainerCommitResult, error)\n\tContainerDiff(ctx context.Context, container string, options ContainerDiffOptions) (ContainerDiffResult, error)\n\tContainerExport(ctx context.Context, container string, options ContainerExportOptions) (ContainerExportResult, error)\n\n\tContainerStats(ctx context.Context, container string, options ContainerStatsOptions) (ContainerStatsResult, error)\n\tContainerTop(ctx context.Context, container string, options ContainerTopOptions) (ContainerTopResult, error)\n\n\tContainerStatPath(ctx context.Context, container string, options ContainerStatPathOptions) (ContainerStatPathResult, error)\n\tCopyFromContainer(ctx context.Context, container string, options CopyFromContainerOptions) (CopyFromContainerResult, error)\n\tCopyToContainer(ctx context.Context, container string, options CopyToContainerOptions) (CopyToContainerResult, error)\n}\n\ntype ExecAPIClient interface {\n\tExecCreate(ctx context.Context, container string, options ExecCreateOptions) (ExecCreateResult, error)\n\tExecInspect(ctx context.Context, execID string, options ExecInspectOptions) (ExecInspectResult, error)\n\tExecResize(ctx context.Context, execID string, options ExecResizeOptions) (ExecResizeResult, error)\n\n\tExecStart(ctx context.Context, execID string, options ExecStartOptions) (ExecStartResult, error)\n\tExecAttach(ctx context.Context, execID string, options ExecAttachOptions) (ExecAttachResult, error)\n}\n\n// DistributionAPIClient defines API client methods for the registry\ntype DistributionAPIClient interface {\n\tDistributionInspect(ctx context.Context, image string, options DistributionInspectOptions) (DistributionInspectResult, error)\n}\n\ntype RegistrySearchClient interface {\n\tImageSearch(ctx context.Context, term string, options ImageSearchOptions) (ImageSearchResult, error)\n}\n\n// ImageBuildAPIClient defines API client methods for building images\n// using the REST API.\ntype ImageBuildAPIClient interface {\n\tImageBuild(ctx context.Context, context io.Reader, options ImageBuildOptions) (ImageBuildResult, error)\n\tBuildCachePrune(ctx context.Context, opts BuildCachePruneOptions) (BuildCachePruneResult, error)\n\tBuildCancel(ctx context.Context, id string, opts BuildCancelOptions) (BuildCancelResult, error)\n}\n\n// ImageAPIClient defines API client methods for the images\ntype ImageAPIClient interface {\n\tImageImport(ctx context.Context, source ImageImportSource, ref string, options ImageImportOptions) (ImageImportResult, error)\n\n\tImageList(ctx context.Context, options ImageListOptions) (ImageListResult, error)\n\tImagePull(ctx context.Context, ref string, options ImagePullOptions) (ImagePullResponse, error)\n\tImagePush(ctx context.Context, ref string, options ImagePushOptions) (ImagePushResponse, error)\n\tImageRemove(ctx context.Context, image string, options ImageRemoveOptions) (ImageRemoveResult, error)\n\tImageTag(ctx context.Context, options ImageTagOptions) (ImageTagResult, error)\n\tImagePrune(ctx context.Context, opts ImagePruneOptions) (ImagePruneResult, error)\n\n\tImageInspect(ctx context.Context, image string, _ ...ImageInspectOption) (ImageInspectResult, error)\n\tImageHistory(ctx context.Context, image string, _ ...ImageHistoryOption) (ImageHistoryResult, error)\n\n\tImageLoad(ctx context.Context, input io.Reader, _ ...ImageLoadOption) (ImageLoadResult, error)\n\tImageSave(ctx context.Context, images []string, _ ...ImageSaveOption) (ImageSaveResult, error)\n}\n\n// NetworkAPIClient defines API client methods for the networks\ntype NetworkAPIClient interface {\n\tNetworkCreate(ctx context.Context, name string, options NetworkCreateOptions) (NetworkCreateResult, error)\n\tNetworkInspect(ctx context.Context, network string, options NetworkInspectOptions) (NetworkInspectResult, error)\n\tNetworkList(ctx context.Context, options NetworkListOptions) (NetworkListResult, error)\n\tNetworkRemove(ctx context.Context, network string, options NetworkRemoveOptions) (NetworkRemoveResult, error)\n\tNetworkPrune(ctx context.Context, opts NetworkPruneOptions) (NetworkPruneResult, error)\n\n\tNetworkConnect(ctx context.Context, network string, options NetworkConnectOptions) (NetworkConnectResult, error)\n\tNetworkDisconnect(ctx context.Context, network string, options NetworkDisconnectOptions) (NetworkDisconnectResult, error)\n}\n\n// NodeAPIClient defines API client methods for the nodes\ntype NodeAPIClient interface {\n\tNodeInspect(ctx context.Context, nodeID string, options NodeInspectOptions) (NodeInspectResult, error)\n\tNodeList(ctx context.Context, options NodeListOptions) (NodeListResult, error)\n\tNodeUpdate(ctx context.Context, nodeID string, options NodeUpdateOptions) (NodeUpdateResult, error)\n\tNodeRemove(ctx context.Context, nodeID string, options NodeRemoveOptions) (NodeRemoveResult, error)\n}\n\n// PluginAPIClient defines API client methods for the plugins\ntype PluginAPIClient interface {\n\tPluginCreate(ctx context.Context, createContext io.Reader, options PluginCreateOptions) (PluginCreateResult, error)\n\tPluginInstall(ctx context.Context, name string, options PluginInstallOptions) (PluginInstallResult, error)\n\tPluginInspect(ctx context.Context, name string, options PluginInspectOptions) (PluginInspectResult, error)\n\tPluginList(ctx context.Context, options PluginListOptions) (PluginListResult, error)\n\tPluginRemove(ctx context.Context, name string, options PluginRemoveOptions) (PluginRemoveResult, error)\n\n\tPluginEnable(ctx context.Context, name string, options PluginEnableOptions) (PluginEnableResult, error)\n\tPluginDisable(ctx context.Context, name string, options PluginDisableOptions) (PluginDisableResult, error)\n\tPluginUpgrade(ctx context.Context, name string, options PluginUpgradeOptions) (PluginUpgradeResult, error)\n\tPluginPush(ctx context.Context, name string, options PluginPushOptions) (PluginPushResult, error)\n\tPluginSet(ctx context.Context, name string, options PluginSetOptions) (PluginSetResult, error)\n}\n\n// ServiceAPIClient defines API client methods for the services\ntype ServiceAPIClient interface {\n\tServiceCreate(ctx context.Context, options ServiceCreateOptions) (ServiceCreateResult, error)\n\tServiceInspect(ctx context.Context, serviceID string, options ServiceInspectOptions) (ServiceInspectResult, error)\n\tServiceList(ctx context.Context, options ServiceListOptions) (ServiceListResult, error)\n\tServiceUpdate(ctx context.Context, serviceID string, options ServiceUpdateOptions) (ServiceUpdateResult, error)\n\tServiceRemove(ctx context.Context, serviceID string, options ServiceRemoveOptions) (ServiceRemoveResult, error)\n\n\tServiceLogs(ctx context.Context, serviceID string, options ServiceLogsOptions) (ServiceLogsResult, error)\n}\n\n// TaskAPIClient defines API client methods to manage swarm tasks.\ntype TaskAPIClient interface {\n\tTaskInspect(ctx context.Context, taskID string, options TaskInspectOptions) (TaskInspectResult, error)\n\tTaskList(ctx context.Context, options TaskListOptions) (TaskListResult, error)\n\n\tTaskLogs(ctx context.Context, taskID string, options TaskLogsOptions) (TaskLogsResult, error)\n}\n\n// SwarmAPIClient defines API client methods for the swarm\ntype SwarmAPIClient interface {\n\tSwarmInit(ctx context.Context, options SwarmInitOptions) (SwarmInitResult, error)\n\tSwarmJoin(ctx context.Context, options SwarmJoinOptions) (SwarmJoinResult, error)\n\tSwarmInspect(ctx context.Context, options SwarmInspectOptions) (SwarmInspectResult, error)\n\tSwarmUpdate(ctx context.Context, options SwarmUpdateOptions) (SwarmUpdateResult, error)\n\tSwarmLeave(ctx context.Context, options SwarmLeaveOptions) (SwarmLeaveResult, error)\n\n\tSwarmGetUnlockKey(ctx context.Context) (SwarmGetUnlockKeyResult, error)\n\tSwarmUnlock(ctx context.Context, options SwarmUnlockOptions) (SwarmUnlockResult, error)\n}\n\n// SystemAPIClient defines API client methods for the system\ntype SystemAPIClient interface {\n\tEvents(ctx context.Context, options EventsListOptions) EventsResult\n\tInfo(ctx context.Context, options InfoOptions) (SystemInfoResult, error)\n\tRegistryLogin(ctx context.Context, auth RegistryLoginOptions) (RegistryLoginResult, error)\n\tDiskUsage(ctx context.Context, options DiskUsageOptions) (DiskUsageResult, error)\n\tPing(ctx context.Context, options PingOptions) (PingResult, error)\n}\n\n// VolumeAPIClient defines API client methods for the volumes\ntype VolumeAPIClient interface {\n\tVolumeCreate(ctx context.Context, options VolumeCreateOptions) (VolumeCreateResult, error)\n\tVolumeInspect(ctx context.Context, volumeID string, options VolumeInspectOptions) (VolumeInspectResult, error)\n\tVolumeList(ctx context.Context, options VolumeListOptions) (VolumeListResult, error)\n\tVolumeUpdate(ctx context.Context, volumeID string, options VolumeUpdateOptions) (VolumeUpdateResult, error)\n\tVolumeRemove(ctx context.Context, volumeID string, options VolumeRemoveOptions) (VolumeRemoveResult, error)\n\tVolumePrune(ctx context.Context, options VolumePruneOptions) (VolumePruneResult, error)\n}\n\n// SecretAPIClient defines API client methods for secrets\ntype SecretAPIClient interface {\n\tSecretCreate(ctx context.Context, options SecretCreateOptions) (SecretCreateResult, error)\n\tSecretInspect(ctx context.Context, id string, options SecretInspectOptions) (SecretInspectResult, error)\n\tSecretList(ctx context.Context, options SecretListOptions) (SecretListResult, error)\n\tSecretUpdate(ctx context.Context, id string, options SecretUpdateOptions) (SecretUpdateResult, error)\n\tSecretRemove(ctx context.Context, id string, options SecretRemoveOptions) (SecretRemoveResult, error)\n}\n\n// ConfigAPIClient defines API client methods for configs\ntype ConfigAPIClient interface {\n\tConfigCreate(ctx context.Context, options ConfigCreateOptions) (ConfigCreateResult, error)\n\tConfigInspect(ctx context.Context, id string, options ConfigInspectOptions) (ConfigInspectResult, error)\n\tConfigList(ctx context.Context, options ConfigListOptions) (ConfigListResult, error)\n\tConfigUpdate(ctx context.Context, id string, options ConfigUpdateOptions) (ConfigUpdateResult, error)\n\tConfigRemove(ctx context.Context, id string, options ConfigRemoveOptions) (ConfigRemoveResult, error)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client_options.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/docker/go-connections/sockets\"\n\t\"github.com/docker/go-connections/tlsconfig\"\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\ntype clientConfig struct {\n\t// scheme sets the scheme for the client\n\tscheme string\n\t// host holds the server address to connect to\n\thost string\n\t// proto holds the client protocol i.e. unix.\n\tproto string\n\t// addr holds the client address.\n\taddr string\n\t// basePath holds the path to prepend to the requests.\n\tbasePath string\n\t// client used to send and receive http requests.\n\tclient *http.Client\n\t// version of the server to talk to.\n\tversion string\n\t// userAgent is the User-Agent header to use for HTTP requests. It takes\n\t// precedence over User-Agent headers set in customHTTPHeaders, and other\n\t// header variables. When set to an empty string, the User-Agent header\n\t// is removed, and no header is sent.\n\tuserAgent *string\n\t// custom HTTP headers configured by users.\n\tcustomHTTPHeaders map[string]string\n\n\t// manualAPIVersion contains the API version set by users. This field\n\t// will only be non-empty if a valid-formed version was set through\n\t// [WithAPIVersion].\n\t//\n\t// If both manualAPIVersion and envAPIVersion are set, manualAPIVersion\n\t// takes precedence. Either field disables API-version negotiation.\n\tmanualAPIVersion string\n\n\t// envAPIVersion contains the API version set by users. This field\n\t// will only be non-empty if a valid-formed version was set through\n\t// [WithAPIVersionFromEnv].\n\t//\n\t// If both manualAPIVersion and envAPIVersion are set, manualAPIVersion\n\t// takes precedence. Either field disables API-version negotiation.\n\tenvAPIVersion string\n\n\t// responseHooks is a list of custom response hooks to call on responses.\n\tresponseHooks []ResponseHook\n\n\t// traceOpts is a list of options to configure the tracing span.\n\ttraceOpts []otelhttp.Option\n}\n\n// ResponseHook is called for each HTTP response returned by the daemon.\n// Hooks are invoked in the order they were added.\n//\n// Hooks must not read or close resp.Body.\ntype ResponseHook func(*http.Response)\n\n// Opt is a configuration option to initialize a [Client].\ntype Opt func(*clientConfig) error\n\n// FromEnv configures the client with values from environment variables. It\n// is the equivalent of using the [WithTLSClientConfigFromEnv], [WithHostFromEnv],\n// and [WithAPIVersionFromEnv] options.\n//\n// FromEnv uses the following environment variables:\n//\n//   - DOCKER_HOST ([EnvOverrideHost]) to set the URL to the docker server.\n//   - DOCKER_API_VERSION ([EnvOverrideAPIVersion]) to set the version of the\n//     API to use, leave empty for latest.\n//   - DOCKER_CERT_PATH ([EnvOverrideCertPath]) to specify the directory from\n//     which to load the TLS certificates (\"ca.pem\", \"cert.pem\", \"key.pem').\n//   - DOCKER_TLS_VERIFY ([EnvTLSVerify]) to enable or disable TLS verification\n//     (off by default).\nfunc FromEnv(c *clientConfig) error {\n\tops := []Opt{\n\t\tWithTLSClientConfigFromEnv(),\n\t\tWithHostFromEnv(),\n\t\tWithAPIVersionFromEnv(),\n\t}\n\tfor _, op := range ops {\n\t\tif err := op(c); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// WithDialContext applies the dialer to the client transport. This can be\n// used to set the Timeout and KeepAlive settings of the client. It returns\n// an error if the client does not have a [http.Transport] configured.\nfunc WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) Opt {\n\treturn func(c *clientConfig) error {\n\t\tif transport, ok := c.client.Transport.(*http.Transport); ok {\n\t\t\ttransport.DialContext = dialContext\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"cannot apply dialer to transport: %T\", c.client.Transport)\n\t}\n}\n\n// WithHost overrides the client host with the specified one.\nfunc WithHost(host string) Opt {\n\treturn func(c *clientConfig) error {\n\t\thostURL, err := ParseHostURL(host)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.host = host\n\t\tc.proto = hostURL.Scheme\n\t\tc.addr = hostURL.Host\n\t\tc.basePath = hostURL.Path\n\t\tif transport, ok := c.client.Transport.(*http.Transport); ok {\n\t\t\treturn sockets.ConfigureTransport(transport, c.proto, c.addr)\n\t\t}\n\t\t// For test transports, we skip transport configuration but still\n\t\t// set the host fields so that the client can use them for headers\n\t\tif _, ok := c.client.Transport.(testRoundTripper); ok {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"cannot apply host to transport: %T\", c.client.Transport)\n\t}\n}\n\n// testRoundTripper allows us to inject a mock-transport for testing. We define it\n// here so we can detect the tlsconfig and return nil for only this type.\ntype testRoundTripper func(*http.Request) (*http.Response, error)\n\nfunc (tf testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {\n\treturn tf(req)\n}\n\n// WithHostFromEnv overrides the client host with the host specified in the\n// DOCKER_HOST ([EnvOverrideHost]) environment variable. If DOCKER_HOST is not set,\n// or set to an empty value, the host is not modified.\nfunc WithHostFromEnv() Opt {\n\treturn func(c *clientConfig) error {\n\t\tif host := os.Getenv(EnvOverrideHost); host != \"\" {\n\t\t\treturn WithHost(host)(c)\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithHTTPClient overrides the client's HTTP client with the specified one.\nfunc WithHTTPClient(client *http.Client) Opt {\n\treturn func(c *clientConfig) error {\n\t\tif client != nil {\n\t\t\t// Make a clone of client so modifications do not affect\n\t\t\t// the caller's client. Clone here instead of in New()\n\t\t\t// as other options (WithHost) also mutate c.client.\n\t\t\t// Cloned clients share the same CookieJar as the\n\t\t\t// original.\n\t\t\thc := *client\n\t\t\tif ht, ok := hc.Transport.(*http.Transport); ok {\n\t\t\t\thc.Transport = ht.Clone()\n\t\t\t}\n\t\t\tc.client = &hc\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithTimeout configures the time limit for requests made by the HTTP client.\nfunc WithTimeout(timeout time.Duration) Opt {\n\treturn func(c *clientConfig) error {\n\t\tc.client.Timeout = timeout\n\t\treturn nil\n\t}\n}\n\n// WithUserAgent configures the User-Agent header to use for HTTP requests.\n// It overrides any User-Agent set in headers. When set to an empty string,\n// the User-Agent header is removed, and no header is sent.\nfunc WithUserAgent(ua string) Opt {\n\treturn func(c *clientConfig) error {\n\t\tc.userAgent = &ua\n\t\treturn nil\n\t}\n}\n\n// WithHTTPHeaders appends custom HTTP headers to the client's default headers.\n// It does not allow for built-in headers (such as \"User-Agent\", if set) to\n// be overridden. Also see [WithUserAgent].\nfunc WithHTTPHeaders(headers map[string]string) Opt {\n\treturn func(c *clientConfig) error {\n\t\tc.customHTTPHeaders = headers\n\t\treturn nil\n\t}\n}\n\n// WithScheme overrides the client scheme with the specified one.\nfunc WithScheme(scheme string) Opt {\n\treturn func(c *clientConfig) error {\n\t\tc.scheme = scheme\n\t\treturn nil\n\t}\n}\n\n// WithTLSClientConfig applies a TLS config to the client transport.\nfunc WithTLSClientConfig(cacertPath, certPath, keyPath string) Opt {\n\treturn func(c *clientConfig) error {\n\t\ttransport, ok := c.client.Transport.(*http.Transport)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"cannot apply tls config to transport: %T\", c.client.Transport)\n\t\t}\n\t\tconfig, err := tlsconfig.Client(tlsconfig.Options{\n\t\t\tCAFile:             cacertPath,\n\t\t\tCertFile:           certPath,\n\t\t\tKeyFile:            keyPath,\n\t\t\tExclusiveRootPools: true,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create tls config: %w\", err)\n\t\t}\n\t\ttransport.TLSClientConfig = config\n\t\treturn nil\n\t}\n}\n\n// WithTLSClientConfigFromEnv configures the client's TLS settings with the\n// settings in the DOCKER_CERT_PATH ([EnvOverrideCertPath]) and DOCKER_TLS_VERIFY\n// ([EnvTLSVerify]) environment variables. If DOCKER_CERT_PATH is not set or empty,\n// TLS configuration is not modified.\n//\n// WithTLSClientConfigFromEnv uses the following environment variables:\n//\n//   - DOCKER_CERT_PATH ([EnvOverrideCertPath]) to specify the directory from\n//     which to load the TLS certificates (\"ca.pem\", \"cert.pem\", \"key.pem\").\n//   - DOCKER_TLS_VERIFY ([EnvTLSVerify]) to enable or disable TLS verification\n//     (off by default).\nfunc WithTLSClientConfigFromEnv() Opt {\n\treturn func(c *clientConfig) error {\n\t\tdockerCertPath := os.Getenv(EnvOverrideCertPath)\n\t\tif dockerCertPath == \"\" {\n\t\t\treturn nil\n\t\t}\n\t\ttlsc, err := tlsconfig.Client(tlsconfig.Options{\n\t\t\tCAFile:             filepath.Join(dockerCertPath, \"ca.pem\"),\n\t\t\tCertFile:           filepath.Join(dockerCertPath, \"cert.pem\"),\n\t\t\tKeyFile:            filepath.Join(dockerCertPath, \"key.pem\"),\n\t\t\tInsecureSkipVerify: os.Getenv(EnvTLSVerify) == \"\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tc.client = &http.Client{\n\t\t\tTransport:     &http.Transport{TLSClientConfig: tlsc},\n\t\t\tCheckRedirect: CheckRedirect,\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithAPIVersion overrides the client's API version with the specified one,\n// and disables API version negotiation. If an empty version is provided,\n// this option is ignored to allow version negotiation. The given version\n// should be formatted \"<major>.<minor>\" (for example, \"1.52\"). It returns\n// an error if the given value not in the correct format.\n//\n// WithAPIVersion does not validate if the client supports the given version,\n// and callers should verify if the version lower than the maximum supported\n// version as defined by [MaxAPIVersion].\n//\n// [WithAPIVersionFromEnv] takes precedence if [WithAPIVersion] and\n// [WithAPIVersionFromEnv] are both set.\nfunc WithAPIVersion(version string) Opt {\n\treturn func(c *clientConfig) error {\n\t\tversion = strings.TrimSpace(version)\n\t\tif val := strings.TrimPrefix(version, \"v\"); val != \"\" {\n\t\t\tver, err := parseAPIVersion(val)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid API version (%s): %w\", version, err)\n\t\t\t}\n\t\t\tc.manualAPIVersion = ver\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithVersion overrides the client version with the specified one.\n//\n// Deprecated: use [WithAPIVersion] instead.\nfunc WithVersion(version string) Opt {\n\treturn WithAPIVersion(version)\n}\n\n// WithAPIVersionFromEnv overrides the client version with the version specified in\n// the DOCKER_API_VERSION ([EnvOverrideAPIVersion]) environment variable.\n// If DOCKER_API_VERSION is not set, or set to an empty value, the version\n// is not modified.\n//\n// WithAPIVersion does not validate if the client supports the given version,\n// and callers should verify if the version lower than the maximum supported\n// version as defined by [MaxAPIVersion].\n//\n// [WithAPIVersionFromEnv] takes precedence if [WithAPIVersion] and\n// [WithAPIVersionFromEnv] are both set.\nfunc WithAPIVersionFromEnv() Opt {\n\treturn func(c *clientConfig) error {\n\t\tversion := strings.TrimSpace(os.Getenv(EnvOverrideAPIVersion))\n\t\tif val := strings.TrimPrefix(version, \"v\"); val != \"\" {\n\t\t\tver, err := parseAPIVersion(val)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid API version (%s): %w\", version, err)\n\t\t\t}\n\t\t\tc.envAPIVersion = ver\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// WithVersionFromEnv overrides the client version with the version specified in\n// the DOCKER_API_VERSION ([EnvOverrideAPIVersion]) environment variable.\n//\n// Deprecated: use [WithAPIVersionFromEnv] instead.\nfunc WithVersionFromEnv() Opt {\n\treturn WithAPIVersionFromEnv()\n}\n\n// WithAPIVersionNegotiation enables automatic API version negotiation for the client.\n// With this option enabled, the client automatically negotiates the API version\n// to use when making requests. API version negotiation is performed on the first\n// request; subsequent requests do not re-negotiate.\n//\n// Deprecated: API-version negotiation is now enabled by default. Use [WithAPIVersion]\n// or [WithAPIVersionFromEnv] to disable API version negotiation.\nfunc WithAPIVersionNegotiation() Opt {\n\treturn func(c *clientConfig) error {\n\t\treturn nil\n\t}\n}\n\n// WithTraceProvider sets the trace provider for the client.\n// If this is not set then the global trace provider is used.\nfunc WithTraceProvider(provider trace.TracerProvider) Opt {\n\treturn WithTraceOptions(otelhttp.WithTracerProvider(provider))\n}\n\n// WithTraceOptions sets tracing span options for the client.\nfunc WithTraceOptions(opts ...otelhttp.Option) Opt {\n\treturn func(c *clientConfig) error {\n\t\tc.traceOpts = append(c.traceOpts, opts...)\n\t\treturn nil\n\t}\n}\n\n// WithResponseHook adds a ResponseHook to the client. ResponseHooks are called\n// for each HTTP response returned by the daemon. Hooks are invoked in the order\n// they were added.\n//\n// Hooks must not read or close resp.Body.\nfunc WithResponseHook(h ResponseHook) Opt {\n\treturn func(c *clientConfig) error {\n\t\tif h == nil {\n\t\t\treturn errors.New(\"invalid response hook: hook is nil\")\n\t\t}\n\t\tc.responseHooks = append(c.responseHooks, h)\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client_responsehook.go",
    "content": "package client\n\nimport (\n\t\"net/http\"\n)\n\ntype responseHookTransport struct {\n\tbase  http.RoundTripper\n\thooks []ResponseHook\n}\n\nfunc (t *responseHookTransport) RoundTrip(req *http.Request) (*http.Response, error) {\n\tresp, err := t.base.RoundTrip(req)\n\tif err != nil {\n\t\treturn resp, err\n\t}\n\n\tfor _, h := range t.hooks {\n\t\th(resp)\n\t}\n\n\treturn resp, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client_unix.go",
    "content": "//go:build !windows\n\npackage client\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"syscall\"\n)\n\n// DefaultDockerHost defines OS-specific default host if the DOCKER_HOST\n// (EnvOverrideHost) environment variable is unset or empty.\nconst DefaultDockerHost = \"unix:///var/run/docker.sock\"\n\n// dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows.\nfunc dialPipeContext(_ context.Context, _ string) (net.Conn, error) {\n\treturn nil, syscall.EAFNOSUPPORT\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/client_windows.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net\"\n\n\t\"github.com/Microsoft/go-winio\"\n)\n\n// DefaultDockerHost defines OS-specific default host if the DOCKER_HOST\n// (EnvOverrideHost) environment variable is unset or empty.\nconst DefaultDockerHost = \"npipe:////./pipe/docker_engine\"\n\n// dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows.\nfunc dialPipeContext(ctx context.Context, addr string) (net.Conn, error) {\n\treturn winio.DialPipeContext(ctx, addr)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/config_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ConfigCreateOptions holds options for creating a config.\ntype ConfigCreateOptions struct {\n\tSpec swarm.ConfigSpec\n}\n\n// ConfigCreateResult holds the result from the ConfigCreate method.\ntype ConfigCreateResult struct {\n\tID string\n}\n\n// ConfigCreate creates a new config.\nfunc (cli *Client) ConfigCreate(ctx context.Context, options ConfigCreateOptions) (ConfigCreateResult, error) {\n\tresp, err := cli.post(ctx, \"/configs/create\", nil, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ConfigCreateResult{}, err\n\t}\n\n\tvar out swarm.ConfigCreateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&out)\n\tif err != nil {\n\t\treturn ConfigCreateResult{}, err\n\t}\n\treturn ConfigCreateResult{ID: out.ID}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/config_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ConfigInspectOptions holds options for inspecting a config.\ntype ConfigInspectOptions struct {\n\t// Add future optional parameters here\n}\n\n// ConfigInspectResult holds the result from the ConfigInspect method.\ntype ConfigInspectResult struct {\n\tConfig swarm.Config\n\tRaw    json.RawMessage\n}\n\n// ConfigInspect returns the config information with raw data\nfunc (cli *Client) ConfigInspect(ctx context.Context, id string, options ConfigInspectOptions) (ConfigInspectResult, error) {\n\tid, err := trimID(\"config\", id)\n\tif err != nil {\n\t\treturn ConfigInspectResult{}, err\n\t}\n\tresp, err := cli.get(ctx, \"/configs/\"+id, nil, nil)\n\tif err != nil {\n\t\treturn ConfigInspectResult{}, err\n\t}\n\n\tvar out ConfigInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Config)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/config_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ConfigListOptions holds parameters to list configs\ntype ConfigListOptions struct {\n\tFilters Filters\n}\n\n// ConfigListResult holds the result from the [client.ConfigList] method.\ntype ConfigListResult struct {\n\tItems []swarm.Config\n}\n\n// ConfigList returns the list of configs.\nfunc (cli *Client) ConfigList(ctx context.Context, options ConfigListOptions) (ConfigListResult, error) {\n\tquery := url.Values{}\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.get(ctx, \"/configs\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ConfigListResult{}, err\n\t}\n\n\tvar out ConfigListResult\n\terr = json.NewDecoder(resp.Body).Decode(&out.Items)\n\tif err != nil {\n\t\treturn ConfigListResult{}, err\n\t}\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/config_remove.go",
    "content": "package client\n\nimport \"context\"\n\ntype ConfigRemoveOptions struct {\n\t// Add future optional parameters here\n}\n\ntype ConfigRemoveResult struct {\n\t// Add future fields here\n}\n\n// ConfigRemove removes a config.\nfunc (cli *Client) ConfigRemove(ctx context.Context, id string, options ConfigRemoveOptions) (ConfigRemoveResult, error) {\n\tid, err := trimID(\"config\", id)\n\tif err != nil {\n\t\treturn ConfigRemoveResult{}, err\n\t}\n\tresp, err := cli.delete(ctx, \"/configs/\"+id, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ConfigRemoveResult{}, err\n\t}\n\treturn ConfigRemoveResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/config_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ConfigUpdateOptions holds options for updating a config.\ntype ConfigUpdateOptions struct {\n\tVersion swarm.Version\n\tSpec    swarm.ConfigSpec\n}\n\ntype ConfigUpdateResult struct{}\n\n// ConfigUpdate attempts to update a config\nfunc (cli *Client) ConfigUpdate(ctx context.Context, id string, options ConfigUpdateOptions) (ConfigUpdateResult, error) {\n\tid, err := trimID(\"config\", id)\n\tif err != nil {\n\t\treturn ConfigUpdateResult{}, err\n\t}\n\tquery := url.Values{}\n\tquery.Set(\"version\", options.Version.String())\n\tresp, err := cli.post(ctx, \"/configs/\"+id+\"/update\", query, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ConfigUpdateResult{}, err\n\t}\n\treturn ConfigUpdateResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_attach.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"net/url\"\n)\n\n// ContainerAttachOptions holds parameters to attach to a container.\ntype ContainerAttachOptions struct {\n\tStream     bool\n\tStdin      bool\n\tStdout     bool\n\tStderr     bool\n\tDetachKeys string\n\tLogs       bool\n}\n\n// ContainerAttachResult is the result from attaching to a container.\ntype ContainerAttachResult struct {\n\tHijackedResponse\n}\n\n// ContainerAttach attaches a connection to a container in the server.\n// It returns a [HijackedResponse] with the hijacked connection\n// and a reader to get output. It's up to the caller to close\n// the hijacked connection by calling [HijackedResponse.Close].\n//\n// The stream format on the response uses one of two formats:\n//\n//   - If the container is using a TTY, there is only a single stream (stdout)\n//     and data is copied directly from the container output stream, no extra\n//     multiplexing or headers.\n//   - If the container is *not* using a TTY, streams for stdout and stderr are\n//     multiplexed.\n//\n// The format of the multiplexed stream is defined in the [stdcopy] package,\n// and as follows:\n//\n//\t[8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}\n//\n// STREAM_TYPE can be 1 for [Stdout] and 2 for [Stderr]. Refer to [stdcopy.StdType]\n// for details. SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded\n// as big endian, this is the size of OUTPUT. You can use [stdcopy.StdCopy]\n// to demultiplex this stream.\n//\n// [stdcopy]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy\n// [stdcopy.StdCopy]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#StdCopy\n// [stdcopy.StdType]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#StdType\n// [Stdout]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#Stdout\n// [Stderr]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#Stderr\nfunc (cli *Client) ContainerAttach(ctx context.Context, containerID string, options ContainerAttachOptions) (ContainerAttachResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerAttachResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Stream {\n\t\tquery.Set(\"stream\", \"1\")\n\t}\n\tif options.Stdin {\n\t\tquery.Set(\"stdin\", \"1\")\n\t}\n\tif options.Stdout {\n\t\tquery.Set(\"stdout\", \"1\")\n\t}\n\tif options.Stderr {\n\t\tquery.Set(\"stderr\", \"1\")\n\t}\n\tif options.DetachKeys != \"\" {\n\t\tquery.Set(\"detachKeys\", options.DetachKeys)\n\t}\n\tif options.Logs {\n\t\tquery.Set(\"logs\", \"1\")\n\t}\n\n\thijacked, err := cli.postHijacked(ctx, \"/containers/\"+containerID+\"/attach\", query, nil, http.Header{\n\t\t\"Content-Type\": {\"text/plain\"},\n\t})\n\tif err != nil {\n\t\treturn ContainerAttachResult{}, err\n\t}\n\n\treturn ContainerAttachResult{HijackedResponse: hijacked}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_commit.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/url\"\n\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerCommitOptions holds parameters to commit changes into a container.\ntype ContainerCommitOptions struct {\n\tReference string\n\tComment   string\n\tAuthor    string\n\tChanges   []string\n\tNoPause   bool // NoPause disables pausing the container during commit.\n\tConfig    *container.Config\n}\n\n// ContainerCommitResult is the result from committing a container.\ntype ContainerCommitResult struct {\n\tID string\n}\n\n// ContainerCommit applies changes to a container and creates a new tagged image.\nfunc (cli *Client) ContainerCommit(ctx context.Context, containerID string, options ContainerCommitOptions) (ContainerCommitResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerCommitResult{}, err\n\t}\n\n\tvar repository, tag string\n\tif options.Reference != \"\" {\n\t\tref, err := reference.ParseNormalizedNamed(options.Reference)\n\t\tif err != nil {\n\t\t\treturn ContainerCommitResult{}, err\n\t\t}\n\n\t\tif _, ok := ref.(reference.Digested); ok {\n\t\t\treturn ContainerCommitResult{}, errors.New(\"refusing to create a tag with a digest reference\")\n\t\t}\n\t\tref = reference.TagNameOnly(ref)\n\n\t\tif tagged, ok := ref.(reference.Tagged); ok {\n\t\t\ttag = tagged.Tag()\n\t\t}\n\t\trepository = ref.Name()\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"container\", containerID)\n\tquery.Set(\"repo\", repository)\n\tquery.Set(\"tag\", tag)\n\tquery.Set(\"comment\", options.Comment)\n\tquery.Set(\"author\", options.Author)\n\tfor _, change := range options.Changes {\n\t\tquery.Add(\"changes\", change)\n\t}\n\tif options.NoPause {\n\t\tquery.Set(\"pause\", \"0\")\n\t}\n\n\tvar response container.CommitResponse\n\tresp, err := cli.post(ctx, \"/commit\", query, options.Config, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerCommitResult{}, err\n\t}\n\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn ContainerCommitResult{ID: response.ID}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_copy.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\ntype ContainerStatPathOptions struct {\n\tPath string\n}\n\ntype ContainerStatPathResult struct {\n\tStat container.PathStat\n}\n\n// ContainerStatPath returns stat information about a path inside the container filesystem.\nfunc (cli *Client) ContainerStatPath(ctx context.Context, containerID string, options ContainerStatPathOptions) (ContainerStatPathResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerStatPathResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"path\", filepath.ToSlash(options.Path)) // Normalize the paths used in the API.\n\n\tresp, err := cli.head(ctx, \"/containers/\"+containerID+\"/archive\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerStatPathResult{}, err\n\t}\n\tstat, err := getContainerPathStatFromHeader(resp.Header)\n\tif err != nil {\n\t\treturn ContainerStatPathResult{}, err\n\t}\n\treturn ContainerStatPathResult{Stat: stat}, nil\n}\n\n// CopyToContainerOptions holds information\n// about files to copy into a container\ntype CopyToContainerOptions struct {\n\tDestinationPath           string\n\tContent                   io.Reader\n\tAllowOverwriteDirWithFile bool\n\tCopyUIDGID                bool\n}\n\ntype CopyToContainerResult struct{}\n\n// CopyToContainer copies content into the container filesystem.\n// Note that `content` must be a Reader for a TAR archive\nfunc (cli *Client) CopyToContainer(ctx context.Context, containerID string, options CopyToContainerOptions) (CopyToContainerResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn CopyToContainerResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"path\", filepath.ToSlash(options.DestinationPath)) // Normalize the paths used in the API.\n\t// Do not allow for an existing directory to be overwritten by a non-directory and vice versa.\n\tif !options.AllowOverwriteDirWithFile {\n\t\tquery.Set(\"noOverwriteDirNonDir\", \"true\")\n\t}\n\n\tif options.CopyUIDGID {\n\t\tquery.Set(\"copyUIDGID\", \"true\")\n\t}\n\n\tresponse, err := cli.putRaw(ctx, \"/containers/\"+containerID+\"/archive\", query, options.Content, nil)\n\tdefer ensureReaderClosed(response)\n\tif err != nil {\n\t\treturn CopyToContainerResult{}, err\n\t}\n\n\treturn CopyToContainerResult{}, nil\n}\n\ntype CopyFromContainerOptions struct {\n\tSourcePath string\n}\n\ntype CopyFromContainerResult struct {\n\tContent io.ReadCloser\n\tStat    container.PathStat\n}\n\n// CopyFromContainer gets the content from the container and returns it as a Reader\n// for a TAR archive to manipulate it in the host. It's up to the caller to close the reader.\nfunc (cli *Client) CopyFromContainer(ctx context.Context, containerID string, options CopyFromContainerOptions) (CopyFromContainerResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn CopyFromContainerResult{}, err\n\t}\n\n\tquery := make(url.Values, 1)\n\tquery.Set(\"path\", filepath.ToSlash(options.SourcePath)) // Normalize the paths used in the API.\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/archive\", query, nil)\n\tif err != nil {\n\t\treturn CopyFromContainerResult{}, err\n\t}\n\n\t// In order to get the copy behavior right, we need to know information\n\t// about both the source and the destination. The response headers include\n\t// stat info about the source that we can use in deciding exactly how to\n\t// copy it locally. Along with the stat info about the local destination,\n\t// we have everything we need to handle the multiple possibilities there\n\t// can be when copying a file/dir from one location to another file/dir.\n\tstat, err := getContainerPathStatFromHeader(resp.Header)\n\tif err != nil {\n\t\tensureReaderClosed(resp)\n\t\treturn CopyFromContainerResult{Stat: stat}, fmt.Errorf(\"unable to get resource stat from response: %s\", err)\n\t}\n\treturn CopyFromContainerResult{Content: resp.Body, Stat: stat}, nil\n}\n\nfunc getContainerPathStatFromHeader(header http.Header) (container.PathStat, error) {\n\tvar stat container.PathStat\n\n\tencodedStat := header.Get(\"X-Docker-Container-Path-Stat\")\n\tstatDecoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(encodedStat))\n\n\terr := json.NewDecoder(statDecoder).Decode(&stat)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"unable to decode container path stat header: %s\", err)\n\t}\n\n\treturn stat, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"path\"\n\t\"sort\"\n\t\"strings\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/moby/moby/api/types/container\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ContainerCreate creates a new container based on the given configuration.\n// It can be associated with a name, but it's not mandatory.\nfunc (cli *Client) ContainerCreate(ctx context.Context, options ContainerCreateOptions) (ContainerCreateResult, error) {\n\tcfg := options.Config\n\n\tif cfg == nil {\n\t\tcfg = &container.Config{}\n\t}\n\n\tif options.Image != \"\" {\n\t\tif cfg.Image != \"\" {\n\t\t\treturn ContainerCreateResult{}, cerrdefs.ErrInvalidArgument.WithMessage(\"either Image or config.Image should be set\")\n\t\t}\n\t\tnewCfg := *cfg\n\t\tnewCfg.Image = options.Image\n\t\tcfg = &newCfg\n\t}\n\n\tif cfg.Image == \"\" {\n\t\treturn ContainerCreateResult{}, cerrdefs.ErrInvalidArgument.WithMessage(\"config.Image or Image is required\")\n\t}\n\n\tvar response container.CreateResponse\n\n\tif options.HostConfig != nil {\n\t\toptions.HostConfig.CapAdd = normalizeCapabilities(options.HostConfig.CapAdd)\n\t\toptions.HostConfig.CapDrop = normalizeCapabilities(options.HostConfig.CapDrop)\n\t}\n\n\tquery := url.Values{}\n\tif options.Platform != nil {\n\t\tif p := formatPlatform(*options.Platform); p != \"unknown\" {\n\t\t\tquery.Set(\"platform\", p)\n\t\t}\n\t}\n\n\tif options.Name != \"\" {\n\t\tquery.Set(\"name\", options.Name)\n\t}\n\n\tbody := container.CreateRequest{\n\t\tConfig:           cfg,\n\t\tHostConfig:       options.HostConfig,\n\t\tNetworkingConfig: options.NetworkingConfig,\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/create\", query, body, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerCreateResult{}, err\n\t}\n\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn ContainerCreateResult{ID: response.ID, Warnings: response.Warnings}, err\n}\n\n// formatPlatform returns a formatted string representing platform (e.g., \"linux/arm/v7\").\n//\n// It is a fork of [platforms.Format], and does not yet support \"os.version\",\n// as [platforms.FormatAll] does.\n//\n// [platforms.Format]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L309-L316\n// [platforms.FormatAll]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L318-L330\nfunc formatPlatform(platform ocispec.Platform) string {\n\tif platform.OS == \"\" {\n\t\treturn \"unknown\"\n\t}\n\treturn path.Join(platform.OS, platform.Architecture, platform.Variant)\n}\n\n// allCapabilities is a magic value for \"all capabilities\"\nconst allCapabilities = \"ALL\"\n\n// normalizeCapabilities normalizes capabilities to their canonical form,\n// removes duplicates, and sorts the results.\n//\n// It is similar to [caps.NormalizeLegacyCapabilities],\n// but performs no validation based on supported capabilities.\n//\n// [caps.NormalizeLegacyCapabilities]: https://github.com/moby/moby/blob/v28.3.2/oci/caps/utils.go#L56\nfunc normalizeCapabilities(caps []string) []string {\n\tvar normalized []string\n\n\tunique := make(map[string]struct{})\n\tfor _, c := range caps {\n\t\tc = normalizeCap(c)\n\t\tif _, ok := unique[c]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tunique[c] = struct{}{}\n\t\tnormalized = append(normalized, c)\n\t}\n\n\tsort.Strings(normalized)\n\treturn normalized\n}\n\n// normalizeCap normalizes a capability to its canonical format by upper-casing\n// and adding a \"CAP_\" prefix (if not yet present). It also accepts the \"ALL\"\n// magic-value.\nfunc normalizeCap(capability string) string {\n\tcapability = strings.ToUpper(capability)\n\tif capability == allCapabilities {\n\t\treturn capability\n\t}\n\tif !strings.HasPrefix(capability, \"CAP_\") {\n\t\tcapability = \"CAP_\" + capability\n\t}\n\treturn capability\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_create_opts.go",
    "content": "package client\n\nimport (\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/network\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ContainerCreateOptions holds parameters to create a container.\ntype ContainerCreateOptions struct {\n\tConfig           *container.Config\n\tHostConfig       *container.HostConfig\n\tNetworkingConfig *network.NetworkingConfig\n\tPlatform         *ocispec.Platform\n\tName             string\n\n\t// Image is a shortcut for Config.Image - only one of Image or Config.Image should be set.\n\tImage string\n}\n\n// ContainerCreateResult is the result from creating a container.\ntype ContainerCreateResult struct {\n\tID       string\n\tWarnings []string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_diff.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerDiff shows differences in a container filesystem since it was started.\nfunc (cli *Client) ContainerDiff(ctx context.Context, containerID string, options ContainerDiffOptions) (ContainerDiffResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerDiffResult{}, err\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/changes\", url.Values{}, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerDiffResult{}, err\n\t}\n\n\tvar changes []container.FilesystemChange\n\terr = json.NewDecoder(resp.Body).Decode(&changes)\n\tif err != nil {\n\t\treturn ContainerDiffResult{}, err\n\t}\n\treturn ContainerDiffResult{Changes: changes}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_diff_opts.go",
    "content": "package client\n\nimport \"github.com/moby/moby/api/types/container\"\n\n// ContainerDiffOptions holds parameters to show differences in a container filesystem.\ntype ContainerDiffOptions struct {\n\t// Currently no options, but this allows for future extensibility\n}\n\n// ContainerDiffResult is the result from showing differences in a container filesystem.\ntype ContainerDiffResult struct {\n\tChanges []container.FilesystemChange\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_exec.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ExecCreateOptions is a small subset of the Config struct that holds the configuration\n// for the exec feature of docker.\ntype ExecCreateOptions struct {\n\tUser         string      // User that will run the command\n\tPrivileged   bool        // Is the container in privileged mode\n\tTTY          bool        // Attach standard streams to a tty.\n\tConsoleSize  ConsoleSize // Initial terminal size [height, width], unused if TTY == false\n\tAttachStdin  bool        // Attach the standard input, makes possible user interaction\n\tAttachStderr bool        // Attach the standard error\n\tAttachStdout bool        // Attach the standard output\n\tDetachKeys   string      // Escape keys for detach\n\tEnv          []string    // Environment variables\n\tWorkingDir   string      // Working directory\n\tCmd          []string    // Execution commands and args\n}\n\n// ExecCreateResult holds the result of creating a container exec.\ntype ExecCreateResult struct {\n\tID string\n}\n\n// ExecCreate creates a new exec configuration to run an exec process.\nfunc (cli *Client) ExecCreate(ctx context.Context, containerID string, options ExecCreateOptions) (ExecCreateResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ExecCreateResult{}, err\n\t}\n\n\tconsoleSize, err := getConsoleSize(options.TTY, options.ConsoleSize)\n\tif err != nil {\n\t\treturn ExecCreateResult{}, err\n\t}\n\n\treq := container.ExecCreateRequest{\n\t\tUser:         options.User,\n\t\tPrivileged:   options.Privileged,\n\t\tTty:          options.TTY,\n\t\tConsoleSize:  consoleSize,\n\t\tAttachStdin:  options.AttachStdin,\n\t\tAttachStderr: options.AttachStderr,\n\t\tAttachStdout: options.AttachStdout,\n\t\tDetachKeys:   options.DetachKeys,\n\t\tEnv:          options.Env,\n\t\tWorkingDir:   options.WorkingDir,\n\t\tCmd:          options.Cmd,\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/exec\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ExecCreateResult{}, err\n\t}\n\n\tvar response container.ExecCreateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn ExecCreateResult{ID: response.ID}, err\n}\n\ntype ConsoleSize struct {\n\tHeight, Width uint\n}\n\n// ExecStartOptions holds options for starting a container exec.\ntype ExecStartOptions struct {\n\t// ExecStart will first check if it's detached\n\tDetach bool\n\t// Check if there's a tty\n\tTTY bool\n\t// Terminal size [height, width], unused if TTY == false\n\tConsoleSize ConsoleSize\n}\n\n// ExecStartResult holds the result of starting a container exec.\ntype ExecStartResult struct{}\n\n// ExecStart starts an exec process already created in the docker host.\nfunc (cli *Client) ExecStart(ctx context.Context, execID string, options ExecStartOptions) (ExecStartResult, error) {\n\tconsoleSize, err := getConsoleSize(options.TTY, options.ConsoleSize)\n\tif err != nil {\n\t\treturn ExecStartResult{}, err\n\t}\n\n\treq := container.ExecStartRequest{\n\t\tDetach:      options.Detach,\n\t\tTty:         options.TTY,\n\t\tConsoleSize: consoleSize,\n\t}\n\tresp, err := cli.post(ctx, \"/exec/\"+execID+\"/start\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn ExecStartResult{}, err\n}\n\n// ExecAttachOptions holds options for attaching to a container exec.\ntype ExecAttachOptions struct {\n\t// Check if there's a tty\n\tTTY bool\n\t// Terminal size [height, width], unused if TTY == false\n\tConsoleSize ConsoleSize `json:\",omitzero\"`\n}\n\n// ExecAttachResult holds the result of attaching to a container exec.\ntype ExecAttachResult struct {\n\tHijackedResponse\n}\n\n// ExecAttach attaches a connection to an exec process in the server.\n//\n// It returns a [HijackedResponse] with the hijacked connection\n// and a reader to get output. It's up to the caller to close\n// the hijacked connection by calling [HijackedResponse.Close].\n//\n// The stream format on the response uses one of two formats:\n//\n//   - If the container is using a TTY, there is only a single stream (stdout)\n//     and data is copied directly from the container output stream, no extra\n//     multiplexing or headers.\n//   - If the container is *not* using a TTY, streams for stdout and stderr are\n//     multiplexed.\n//\n// You can use [stdcopy.StdCopy] to demultiplex this stream. Refer to\n// [Client.ContainerAttach] for details about the multiplexed stream.\n//\n// [stdcopy.StdCopy]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#StdCopy\nfunc (cli *Client) ExecAttach(ctx context.Context, execID string, options ExecAttachOptions) (ExecAttachResult, error) {\n\tconsoleSize, err := getConsoleSize(options.TTY, options.ConsoleSize)\n\tif err != nil {\n\t\treturn ExecAttachResult{}, err\n\t}\n\treq := container.ExecStartRequest{\n\t\tDetach:      false,\n\t\tTty:         options.TTY,\n\t\tConsoleSize: consoleSize,\n\t}\n\tresponse, err := cli.postHijacked(ctx, \"/exec/\"+execID+\"/start\", nil, req, http.Header{\n\t\t\"Content-Type\": {\"application/json\"},\n\t})\n\treturn ExecAttachResult{HijackedResponse: response}, err\n}\n\nfunc getConsoleSize(hasTTY bool, consoleSize ConsoleSize) (*[2]uint, error) {\n\tif consoleSize.Height != 0 || consoleSize.Width != 0 {\n\t\tif !hasTTY {\n\t\t\treturn nil, cerrdefs.ErrInvalidArgument.WithMessage(\"console size is only supported when TTY is enabled\")\n\t\t}\n\t\treturn &[2]uint{consoleSize.Height, consoleSize.Width}, nil\n\t}\n\treturn nil, nil\n}\n\n// ExecInspectOptions holds options for inspecting a container exec.\ntype ExecInspectOptions struct{}\n\n// ExecInspectResult holds the result of inspecting a container exec.\n//\n// It provides a subset of the information included in [container.ExecInspectResponse].\n//\n// TODO(thaJeztah): include all fields of [container.ExecInspectResponse] ?\ntype ExecInspectResult struct {\n\tID          string\n\tContainerID string\n\tRunning     bool\n\tExitCode    int\n\tPID         int\n}\n\n// ExecInspect returns information about a specific exec process on the docker host.\nfunc (cli *Client) ExecInspect(ctx context.Context, execID string, options ExecInspectOptions) (ExecInspectResult, error) {\n\tresp, err := cli.get(ctx, \"/exec/\"+execID+\"/json\", nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ExecInspectResult{}, err\n\t}\n\n\tvar response container.ExecInspectResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\tif err != nil {\n\t\treturn ExecInspectResult{}, err\n\t}\n\n\tvar ec int\n\tif response.ExitCode != nil {\n\t\tec = *response.ExitCode\n\t}\n\n\treturn ExecInspectResult{\n\t\tID:          response.ID,\n\t\tContainerID: response.ContainerID,\n\t\tRunning:     response.Running,\n\t\tExitCode:    ec,\n\t\tPID:         response.Pid,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_export.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/url\"\n)\n\n// ContainerExportOptions specifies options for container export operations.\ntype ContainerExportOptions struct {\n\t// Currently no options are defined for ContainerExport\n}\n\n// ContainerExportResult represents the result of a container export operation.\ntype ContainerExportResult interface {\n\tio.ReadCloser\n}\n\n// ContainerExport retrieves the raw contents of a container\n// and returns them as an [io.ReadCloser]. It's up to the caller\n// to close the stream.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) ContainerExport(ctx context.Context, containerID string, options ContainerExportOptions) (ContainerExportResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/export\", url.Values{}, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &containerExportResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\ntype containerExportResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser         = (*containerExportResult)(nil)\n\t_ ContainerExportResult = (*containerExportResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerInspectOptions holds options for inspecting a container using\n// the [Client.ConfigInspect] method.\ntype ContainerInspectOptions struct {\n\t// Size controls whether the container's filesystem size should be calculated.\n\t// When set, the [container.InspectResponse.SizeRw] and [container.InspectResponse.SizeRootFs]\n\t// fields in [ContainerInspectResult.Container] are populated with the result.\n\t//\n\t// Calculating the size can be a costly operation, and should not be used\n\t// unless needed.\n\tSize bool\n}\n\n// ContainerInspectResult holds the result from the [Client.ConfigInspect] method.\ntype ContainerInspectResult struct {\n\tContainer container.InspectResponse\n\tRaw       json.RawMessage\n}\n\n// ContainerInspect returns the container information.\nfunc (cli *Client) ContainerInspect(ctx context.Context, containerID string, options ContainerInspectOptions) (ContainerInspectResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerInspectResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Size {\n\t\tquery.Set(\"size\", \"1\")\n\t}\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/json\", query, nil)\n\tif err != nil {\n\t\treturn ContainerInspectResult{}, err\n\t}\n\tvar out ContainerInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Container)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_kill.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// ContainerKillOptions holds options for [Client.ContainerKill].\ntype ContainerKillOptions struct {\n\t// Signal (optional) is the signal to send to the container to (gracefully)\n\t// stop it before forcibly terminating the container with SIGKILL after a\n\t// timeout. If no value is set, the default (SIGKILL) is used.\n\tSignal string `json:\",omitempty\"`\n}\n\n// ContainerKillResult holds the result of [Client.ContainerKill],\ntype ContainerKillResult struct {\n\t// Add future fields here.\n}\n\n// ContainerKill terminates the container process but does not remove the container from the docker host.\nfunc (cli *Client) ContainerKill(ctx context.Context, containerID string, options ContainerKillOptions) (ContainerKillResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerKillResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Signal != \"\" {\n\t\tquery.Set(\"signal\", options.Signal)\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/kill\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerKillResult{}, err\n\t}\n\treturn ContainerKillResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerListOptions holds parameters to list containers with.\ntype ContainerListOptions struct {\n\tSize    bool\n\tAll     bool\n\tLimit   int\n\tFilters Filters\n\n\t// Latest is non-functional and should not be used. Use Limit: 1 instead.\n\t//\n\t// Deprecated: the Latest option is non-functional and should not be used. Use Limit: 1 instead.\n\tLatest bool\n\n\t// Since is no longer supported. Use the \"since\" filter instead.\n\t//\n\t// Deprecated: the Since option is no longer supported since docker 1.12 (API 1.24). Use the \"since\" filter instead.\n\tSince string\n\n\t// Before is no longer supported. Use the \"since\" filter instead.\n\t//\n\t// Deprecated: the Before option is no longer supported since docker 1.12 (API 1.24). Use the \"before\" filter instead.\n\tBefore string\n}\n\ntype ContainerListResult struct {\n\tItems []container.Summary\n}\n\n// ContainerList returns the list of containers in the docker host.\nfunc (cli *Client) ContainerList(ctx context.Context, options ContainerListOptions) (ContainerListResult, error) {\n\tquery := url.Values{}\n\n\tif options.All {\n\t\tquery.Set(\"all\", \"1\")\n\t}\n\n\tif options.Limit > 0 {\n\t\tquery.Set(\"limit\", strconv.Itoa(options.Limit))\n\t}\n\n\tif options.Size {\n\t\tquery.Set(\"size\", \"1\")\n\t}\n\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.get(ctx, \"/containers/json\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerListResult{}, err\n\t}\n\n\tvar containers []container.Summary\n\terr = json.NewDecoder(resp.Body).Decode(&containers)\n\treturn ContainerListResult{Items: containers}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_logs.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/moby/moby/client/internal/timestamp\"\n)\n\n// ContainerLogsOptions holds parameters to filter logs with.\ntype ContainerLogsOptions struct {\n\tShowStdout bool\n\tShowStderr bool\n\tSince      string\n\tUntil      string\n\tTimestamps bool\n\tFollow     bool\n\tTail       string\n\tDetails    bool\n}\n\n// ContainerLogsResult is the result of a container logs operation.\ntype ContainerLogsResult interface {\n\tio.ReadCloser\n}\n\n// ContainerLogs returns the logs generated by a container in an [io.ReadCloser].\n// It's up to the caller to close the stream.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\n//\n// The stream format on the response uses one of two formats:\n//\n//   - If the container is using a TTY, there is only a single stream (stdout)\n//     and data is copied directly from the container output stream, no extra\n//     multiplexing or headers.\n//   - If the container is *not* using a TTY, streams for stdout and stderr are\n//     multiplexed.\n//\n// The format of the multiplexed stream is defined in the [stdcopy] package,\n// and as follows:\n//\n//\t[8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}\n//\n// STREAM_TYPE can be 1 for [Stdout] and 2 for [Stderr]. Refer to [stdcopy.StdType]\n// for details. SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded\n// as big endian, this is the size of OUTPUT. You can use [stdcopy.StdCopy]\n// to demultiplex this stream.\n//\n// [stdcopy]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy\n// [stdcopy.StdCopy]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#StdCopy\n// [stdcopy.StdType]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#StdType\n// [Stdout]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#Stdout\n// [Stderr]: https://pkg.go.dev/github.com/moby/moby/api/pkg/stdcopy#Stderr\nfunc (cli *Client) ContainerLogs(ctx context.Context, containerID string, options ContainerLogsOptions) (ContainerLogsResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := url.Values{}\n\tif options.ShowStdout {\n\t\tquery.Set(\"stdout\", \"1\")\n\t}\n\n\tif options.ShowStderr {\n\t\tquery.Set(\"stderr\", \"1\")\n\t}\n\n\tif options.Since != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Since, time.Now())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(`invalid value for \"since\": %w`, err)\n\t\t}\n\t\tquery.Set(\"since\", ts)\n\t}\n\n\tif options.Until != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Until, time.Now())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(`invalid value for \"until\": %w`, err)\n\t\t}\n\t\tquery.Set(\"until\", ts)\n\t}\n\n\tif options.Timestamps {\n\t\tquery.Set(\"timestamps\", \"1\")\n\t}\n\n\tif options.Details {\n\t\tquery.Set(\"details\", \"1\")\n\t}\n\n\tif options.Follow {\n\t\tquery.Set(\"follow\", \"1\")\n\t}\n\n\tswitch options.Tail {\n\tcase \"\", \"all\":\n\t\t// don't send option; default is to show all logs.\n\t\t//\n\t\t// The default on the daemon-side is to show all logs; account for\n\t\t// some special values. The CLI may set a magic \"all\" value that's\n\t\t// used as default.\n\t\t//\n\t\t// Given that the default is to show all logs, we can ignore these\n\t\t// values, and don't send \"tail\".\n\t\t//\n\t\t// see https://github.com/moby/moby/blob/0df791cb72b568eeadba2267fe9a5040d12b0487/daemon/logs.go#L75-L78\n\t\t// see https://github.com/moby/moby/blob/4d20b6fe56dfb2b06f4a5dd1f32913215a9c317b/daemon/cluster/services.go#L425-L449\n\tdefault:\n\t\tquery.Set(\"tail\", options.Tail)\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/logs\", query, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &containerLogsResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\ntype containerLogsResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser       = (*containerLogsResult)(nil)\n\t_ ContainerLogsResult = (*containerLogsResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_pause.go",
    "content": "package client\n\nimport \"context\"\n\n// ContainerPauseOptions holds options for [Client.ContainerPause].\ntype ContainerPauseOptions struct {\n\t// Add future optional parameters here.\n}\n\n// ContainerPauseResult holds the result of [Client.ContainerPause],\ntype ContainerPauseResult struct {\n\t// Add future fields here.\n}\n\n// ContainerPause pauses the main process of a given container without terminating it.\nfunc (cli *Client) ContainerPause(ctx context.Context, containerID string, options ContainerPauseOptions) (ContainerPauseResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerPauseResult{}, err\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/pause\", nil, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerPauseResult{}, err\n\t}\n\treturn ContainerPauseResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_prune.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerPruneOptions holds parameters to prune containers.\ntype ContainerPruneOptions struct {\n\tFilters Filters\n}\n\n// ContainerPruneResult holds the result from the [Client.ContainerPrune] method.\ntype ContainerPruneResult struct {\n\tReport container.PruneReport\n}\n\n// ContainerPrune requests the daemon to delete unused data\nfunc (cli *Client) ContainerPrune(ctx context.Context, opts ContainerPruneOptions) (ContainerPruneResult, error) {\n\tquery := url.Values{}\n\topts.Filters.updateURLValues(query)\n\n\tresp, err := cli.post(ctx, \"/containers/prune\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerPruneResult{}, err\n\t}\n\n\tvar report container.PruneReport\n\tif err := json.NewDecoder(resp.Body).Decode(&report); err != nil {\n\t\treturn ContainerPruneResult{}, fmt.Errorf(\"Error retrieving disk usage: %v\", err)\n\t}\n\n\treturn ContainerPruneResult{Report: report}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// ContainerRemoveOptions holds parameters to remove containers.\ntype ContainerRemoveOptions struct {\n\tRemoveVolumes bool\n\tRemoveLinks   bool\n\tForce         bool\n}\n\n// ContainerRemoveResult holds the result of [Client.ContainerRemove],\ntype ContainerRemoveResult struct {\n\t// Add future fields here.\n}\n\n// ContainerRemove kills and removes a container from the docker host.\nfunc (cli *Client) ContainerRemove(ctx context.Context, containerID string, options ContainerRemoveOptions) (ContainerRemoveResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerRemoveResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.RemoveVolumes {\n\t\tquery.Set(\"v\", \"1\")\n\t}\n\tif options.RemoveLinks {\n\t\tquery.Set(\"link\", \"1\")\n\t}\n\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\n\tresp, err := cli.delete(ctx, \"/containers/\"+containerID, query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerRemoveResult{}, err\n\t}\n\treturn ContainerRemoveResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_rename.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strings\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n)\n\n// ContainerRenameOptions represents the options for renaming a container.\ntype ContainerRenameOptions struct {\n\tNewName string\n}\n\n// ContainerRenameResult represents the result of a container rename operation.\ntype ContainerRenameResult struct {\n\t// This struct can be expanded in the future if needed\n}\n\n// ContainerRename changes the name of a given container.\nfunc (cli *Client) ContainerRename(ctx context.Context, containerID string, options ContainerRenameOptions) (ContainerRenameResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerRenameResult{}, err\n\t}\n\toptions.NewName = strings.TrimSpace(options.NewName)\n\tif options.NewName == \"\" || strings.TrimPrefix(options.NewName, \"/\") == \"\" {\n\t\t// daemons before v29.0 did not handle the canonical name (\"/\") well\n\t\t// let's be nice and validate it here before sending\n\t\treturn ContainerRenameResult{}, cerrdefs.ErrInvalidArgument.WithMessage(\"new name cannot be blank\")\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"name\", options.NewName)\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/rename\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn ContainerRenameResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_resize.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strconv\"\n)\n\n// ContainerResizeOptions holds parameters to resize a TTY.\n// It can be used to resize container TTYs and\n// exec process TTYs too.\ntype ContainerResizeOptions struct {\n\tHeight uint\n\tWidth  uint\n}\n\n// ContainerResizeResult holds the result of [Client.ContainerResize],\ntype ContainerResizeResult struct {\n\t// Add future fields here.\n}\n\n// ContainerResize changes the size of the pseudo-TTY for a container.\nfunc (cli *Client) ContainerResize(ctx context.Context, containerID string, options ContainerResizeOptions) (ContainerResizeResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerResizeResult{}, err\n\t}\n\t// FIXME(thaJeztah): the API / backend accepts uint32, but container.ResizeOptions uses uint.\n\tquery := url.Values{}\n\tquery.Set(\"h\", strconv.FormatUint(uint64(options.Height), 10))\n\tquery.Set(\"w\", strconv.FormatUint(uint64(options.Width), 10))\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/resize\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerResizeResult{}, err\n\t}\n\treturn ContainerResizeResult{}, nil\n}\n\n// ExecResizeOptions holds options for resizing a container exec TTY.\ntype ExecResizeOptions ContainerResizeOptions\n\n// ExecResizeResult holds the result of resizing a container exec TTY.\ntype ExecResizeResult struct{}\n\n// ExecResize changes the size of the tty for an exec process running inside a container.\nfunc (cli *Client) ExecResize(ctx context.Context, execID string, options ExecResizeOptions) (ExecResizeResult, error) {\n\texecID, err := trimID(\"exec\", execID)\n\tif err != nil {\n\t\treturn ExecResizeResult{}, err\n\t}\n\t// FIXME(thaJeztah): the API / backend accepts uint32, but container.ResizeOptions uses uint.\n\tquery := url.Values{}\n\tquery.Set(\"h\", strconv.FormatUint(uint64(options.Height), 10))\n\tquery.Set(\"w\", strconv.FormatUint(uint64(options.Width), 10))\n\n\tresp, err := cli.post(ctx, \"/exec/\"+execID+\"/resize\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ExecResizeResult{}, err\n\t}\n\treturn ExecResizeResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_restart.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strconv\"\n)\n\n// ContainerRestartOptions holds options for [Client.ContainerRestart].\ntype ContainerRestartOptions struct {\n\t// Signal (optional) is the signal to send to the container to (gracefully)\n\t// stop it before forcibly terminating the container with SIGKILL after the\n\t// timeout expires. If no value is set, the default (SIGTERM) is used.\n\tSignal string `json:\",omitempty\"`\n\n\t// Timeout (optional) is the timeout (in seconds) to wait for the container\n\t// to stop gracefully before forcibly terminating it with SIGKILL.\n\t//\n\t// - Use nil to use the default timeout (10 seconds).\n\t// - Use '-1' to wait indefinitely.\n\t// - Use '0' to not wait for the container to exit gracefully, and\n\t//   immediately proceeds to forcibly terminating the container.\n\t// - Other positive values are used as timeout (in seconds).\n\tTimeout *int `json:\",omitempty\"`\n}\n\n// ContainerRestartResult holds the result of [Client.ContainerRestart],\ntype ContainerRestartResult struct {\n\t// Add future fields here.\n}\n\n// ContainerRestart stops, and starts a container again.\n// It makes the daemon wait for the container to be up again for\n// a specific amount of time, given the timeout.\nfunc (cli *Client) ContainerRestart(ctx context.Context, containerID string, options ContainerRestartOptions) (ContainerRestartResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerRestartResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Timeout != nil {\n\t\tquery.Set(\"t\", strconv.Itoa(*options.Timeout))\n\t}\n\tif options.Signal != \"\" {\n\t\tquery.Set(\"signal\", options.Signal)\n\t}\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/restart\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerRestartResult{}, err\n\t}\n\treturn ContainerRestartResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_start.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// ContainerStartOptions holds options for [Client.ContainerStart].\ntype ContainerStartOptions struct {\n\tCheckpointID  string\n\tCheckpointDir string\n}\n\n// ContainerStartResult holds the result of [Client.ContainerStart],\ntype ContainerStartResult struct {\n\t// Add future fields here.\n}\n\n// ContainerStart sends a request to the docker daemon to start a container.\nfunc (cli *Client) ContainerStart(ctx context.Context, containerID string, options ContainerStartOptions) (ContainerStartResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerStartResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.CheckpointID != \"\" {\n\t\tquery.Set(\"checkpoint\", options.CheckpointID)\n\t}\n\tif options.CheckpointDir != \"\" {\n\t\tquery.Set(\"checkpoint-dir\", options.CheckpointDir)\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/start\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerStartResult{}, err\n\t}\n\treturn ContainerStartResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_stats.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/url\"\n)\n\n// ContainerStatsOptions holds parameters to retrieve container statistics\n// using the [Client.ContainerStats] method.\ntype ContainerStatsOptions struct {\n\t// Stream enables streaming [container.StatsResponse] results instead\n\t// of collecting a single sample. If enabled, the client remains attached\n\t// until the [ContainerStatsResult.Body] is closed or the context is\n\t// cancelled.\n\tStream bool\n\n\t// IncludePreviousSample asks the daemon to  collect a prior sample to populate the\n\t// [container.StatsResponse.PreRead] and [container.StatsResponse.PreCPUStats]\n\t// fields.\n\t//\n\t// It set, the daemon collects two samples at a one-second interval before\n\t// returning the result. The first sample populates the PreCPUStats (“previous\n\t// CPU”) field, allowing delta calculations for CPU usage. If false, only\n\t// a single sample is taken and returned immediately, leaving PreRead and\n\t// PreCPUStats empty.\n\t//\n\t// This option has no effect if Stream is enabled. If Stream is enabled,\n\t// [container.StatsResponse.PreCPUStats] is never populated for the first\n\t// record.\n\tIncludePreviousSample bool\n}\n\n// ContainerStatsResult holds the result from [Client.ContainerStats].\n//\n// It wraps an [io.ReadCloser] that provides one or more [container.StatsResponse]\n// objects for a container, as produced by the \"GET /containers/{id}/stats\" endpoint.\n// If streaming is disabled, the stream contains a single record.\ntype ContainerStatsResult struct {\n\tBody io.ReadCloser\n}\n\n// ContainerStats retrieves live resource usage statistics for the specified\n// container. The caller must close the [io.ReadCloser] in the returned result\n// to release associated resources.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) ContainerStats(ctx context.Context, containerID string, options ContainerStatsOptions) (ContainerStatsResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerStatsResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Stream {\n\t\tquery.Set(\"stream\", \"true\")\n\t} else {\n\t\t// Note: daemons before v29.0 return an error if both set: \"cannot have stream=true and one-shot=true\"\n\t\t//\n\t\t// TODO(thaJeztah): consider making \"stream=false\" the default for the API as well, or using Accept Header to switch.\n\t\tquery.Set(\"stream\", \"false\")\n\t\tif !options.IncludePreviousSample {\n\t\t\tquery.Set(\"one-shot\", \"true\")\n\t\t}\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/stats\", query, nil)\n\tif err != nil {\n\t\treturn ContainerStatsResult{}, err\n\t}\n\n\treturn ContainerStatsResult{\n\t\tBody: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_stop.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strconv\"\n)\n\n// ContainerStopOptions holds the options for [Client.ContainerStop].\ntype ContainerStopOptions struct {\n\t// Signal (optional) is the signal to send to the container to (gracefully)\n\t// stop it before forcibly terminating the container with SIGKILL after the\n\t// timeout expires. If no value is set, the default (SIGTERM) is used.\n\tSignal string `json:\",omitempty\"`\n\n\t// Timeout (optional) is the timeout (in seconds) to wait for the container\n\t// to stop gracefully before forcibly terminating it with SIGKILL.\n\t//\n\t// - Use nil to use the default timeout (10 seconds).\n\t// - Use '-1' to wait indefinitely.\n\t// - Use '0' to not wait for the container to exit gracefully, and\n\t//   immediately proceeds to forcibly terminating the container.\n\t// - Other positive values are used as timeout (in seconds).\n\tTimeout *int `json:\",omitempty\"`\n}\n\n// ContainerStopResult holds the result of [Client.ContainerStop],\ntype ContainerStopResult struct {\n\t// Add future fields here.\n}\n\n// ContainerStop stops a container. In case the container fails to stop\n// gracefully within a time frame specified by the timeout argument,\n// it is forcefully terminated (killed).\n//\n// If the timeout is nil, the container's StopTimeout value is used, if set,\n// otherwise the engine default. A negative timeout value can be specified,\n// meaning no timeout, i.e. no forceful termination is performed.\nfunc (cli *Client) ContainerStop(ctx context.Context, containerID string, options ContainerStopOptions) (ContainerStopResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerStopResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Timeout != nil {\n\t\tquery.Set(\"t\", strconv.Itoa(*options.Timeout))\n\t}\n\tif options.Signal != \"\" {\n\t\tquery.Set(\"signal\", options.Signal)\n\t}\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/stop\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerStopResult{}, err\n\t}\n\treturn ContainerStopResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_top.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerTopOptions defines options for container top operations.\ntype ContainerTopOptions struct {\n\tArguments []string\n}\n\n// ContainerTopResult represents the result of a ContainerTop operation.\ntype ContainerTopResult struct {\n\tProcesses [][]string\n\tTitles    []string\n}\n\n// ContainerTop shows process information from within a container.\nfunc (cli *Client) ContainerTop(ctx context.Context, containerID string, options ContainerTopOptions) (ContainerTopResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerTopResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif len(options.Arguments) > 0 {\n\t\tquery.Set(\"ps_args\", strings.Join(options.Arguments, \" \"))\n\t}\n\n\tresp, err := cli.get(ctx, \"/containers/\"+containerID+\"/top\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerTopResult{}, err\n\t}\n\n\tvar response container.TopResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn ContainerTopResult{Processes: response.Processes, Titles: response.Titles}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_unpause.go",
    "content": "package client\n\nimport \"context\"\n\n// ContainerUnpauseOptions holds options for [Client.ContainerUnpause].\ntype ContainerUnpauseOptions struct {\n\t// Add future optional parameters here.\n}\n\n// ContainerUnpauseResult holds the result of [Client.ContainerUnpause],\ntype ContainerUnpauseResult struct {\n\t// Add future fields here.\n}\n\n// ContainerUnpause resumes the process execution within a container.\nfunc (cli *Client) ContainerUnpause(ctx context.Context, containerID string, options ContainerUnpauseOptions) (ContainerUnpauseResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerUnpauseResult{}, err\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/unpause\", nil, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerUnpauseResult{}, err\n\t}\n\treturn ContainerUnpauseResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\n// ContainerUpdateOptions holds options for [Client.ContainerUpdate].\ntype ContainerUpdateOptions struct {\n\tResources     *container.Resources\n\tRestartPolicy *container.RestartPolicy\n}\n\n// ContainerUpdateResult is the result from updating a container.\ntype ContainerUpdateResult struct {\n\t// Warnings encountered when updating the container.\n\tWarnings []string\n}\n\n// ContainerUpdate updates the resources of a container.\nfunc (cli *Client) ContainerUpdate(ctx context.Context, containerID string, options ContainerUpdateOptions) (ContainerUpdateResult, error) {\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\treturn ContainerUpdateResult{}, err\n\t}\n\n\tupdateConfig := container.UpdateConfig{}\n\tif options.Resources != nil {\n\t\tupdateConfig.Resources = *options.Resources\n\t}\n\tif options.RestartPolicy != nil {\n\t\tupdateConfig.RestartPolicy = *options.RestartPolicy\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/update\", nil, updateConfig, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ContainerUpdateResult{}, err\n\t}\n\n\tvar response container.UpdateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn ContainerUpdateResult{Warnings: response.Warnings}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/container_wait.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/container\"\n)\n\nconst containerWaitErrorMsgLimit = 2 * 1024 /* Max: 2KiB */\n\n// ContainerWaitOptions holds options for [Client.ContainerWait].\ntype ContainerWaitOptions struct {\n\tCondition container.WaitCondition\n}\n\n// ContainerWaitResult defines the result from the [Client.ContainerWait] method.\ntype ContainerWaitResult struct {\n\tResult <-chan container.WaitResponse\n\tError  <-chan error\n}\n\n// ContainerWait waits until the specified container is in a certain state\n// indicated by the given condition, either;\n//\n//   - \"not-running\" ([container.WaitConditionNotRunning]) (default)\n//   - \"next-exit\" ([container.WaitConditionNextExit])\n//   - \"removed\" ([container.WaitConditionRemoved])\n//\n// ContainerWait blocks until the request has been acknowledged by the server\n// (with a response header), then returns two channels on which the caller can\n// wait for the exit status of the container or an error if there was a problem\n// either beginning the wait request or in getting the response. This allows the\n// caller to synchronize ContainerWait with other calls, such as specifying a\n// \"next-exit\" condition ([container.WaitConditionNextExit]) before issuing a\n// [Client.ContainerStart] request.\nfunc (cli *Client) ContainerWait(ctx context.Context, containerID string, options ContainerWaitOptions) ContainerWaitResult {\n\tresultC := make(chan container.WaitResponse)\n\terrC := make(chan error, 1)\n\n\tcontainerID, err := trimID(\"container\", containerID)\n\tif err != nil {\n\t\terrC <- err\n\t\treturn ContainerWaitResult{Result: resultC, Error: errC}\n\t}\n\n\tquery := url.Values{}\n\tif options.Condition != \"\" {\n\t\tquery.Set(\"condition\", string(options.Condition))\n\t}\n\n\tresp, err := cli.post(ctx, \"/containers/\"+containerID+\"/wait\", query, nil, nil)\n\tif err != nil {\n\t\tdefer ensureReaderClosed(resp)\n\t\terrC <- err\n\t\treturn ContainerWaitResult{Result: resultC, Error: errC}\n\t}\n\n\tgo func() {\n\t\tdefer ensureReaderClosed(resp)\n\n\t\tresponseText := bytes.NewBuffer(nil)\n\t\tstream := io.TeeReader(resp.Body, responseText)\n\n\t\tvar res container.WaitResponse\n\t\tif err := json.NewDecoder(stream).Decode(&res); err != nil {\n\t\t\t// NOTE(nicks): The /wait API does not work well with HTTP proxies.\n\t\t\t// At any time, the proxy could cut off the response stream.\n\t\t\t//\n\t\t\t// But because the HTTP status has already been written, the proxy's\n\t\t\t// only option is to write a plaintext error message.\n\t\t\t//\n\t\t\t// If there's a JSON parsing error, read the real error message\n\t\t\t// off the body and send it to the client.\n\t\t\tif errors.As(err, new(*json.SyntaxError)) {\n\t\t\t\t_, _ = io.ReadAll(io.LimitReader(stream, containerWaitErrorMsgLimit))\n\t\t\t\terrC <- errors.New(responseText.String())\n\t\t\t} else {\n\t\t\t\terrC <- err\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tresultC <- res\n\t}()\n\n\treturn ContainerWaitResult{Result: resultC, Error: errC}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/distribution_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// DistributionInspectResult holds the result of the DistributionInspect operation.\ntype DistributionInspectResult struct {\n\tregistry.DistributionInspect\n}\n\n// DistributionInspectOptions holds options for the DistributionInspect operation.\ntype DistributionInspectOptions struct {\n\tEncodedRegistryAuth string\n}\n\n// DistributionInspect returns the image digest with the full manifest.\nfunc (cli *Client) DistributionInspect(ctx context.Context, imageRef string, options DistributionInspectOptions) (DistributionInspectResult, error) {\n\tif imageRef == \"\" {\n\t\treturn DistributionInspectResult{}, objectNotFoundError{object: \"distribution\", id: imageRef}\n\t}\n\n\tvar headers http.Header\n\tif options.EncodedRegistryAuth != \"\" {\n\t\theaders = http.Header{\n\t\t\tregistry.AuthHeader: {options.EncodedRegistryAuth},\n\t\t}\n\t}\n\n\t// Contact the registry to retrieve digest and platform information\n\tresp, err := cli.get(ctx, \"/distribution/\"+imageRef+\"/json\", url.Values{}, headers)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn DistributionInspectResult{}, err\n\t}\n\n\tvar distributionInspect registry.DistributionInspect\n\terr = json.NewDecoder(resp.Body).Decode(&distributionInspect)\n\treturn DistributionInspectResult{DistributionInspect: distributionInspect}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/envvars.go",
    "content": "package client\n\nconst (\n\t// EnvOverrideHost is the name of the environment variable that can be used\n\t// to override the default host to connect to (DefaultDockerHost).\n\t//\n\t// This env-var is read by [FromEnv] and [WithHostFromEnv] and when set to a\n\t// non-empty value, takes precedence over the default host (which is platform\n\t// specific), or any host already set.\n\tEnvOverrideHost = \"DOCKER_HOST\"\n\n\t// EnvOverrideAPIVersion is the name of the environment variable that can\n\t// be used to override the API version to use. Value must be\n\t// formatted as MAJOR.MINOR, for example, \"1.19\".\n\t//\n\t// This env-var is read by [FromEnv] and [WithAPIVersionFromEnv] and when set to a\n\t// non-empty value, takes precedence over API version negotiation.\n\t//\n\t// This environment variable should be used for debugging purposes only, as\n\t// it can set the client to use an incompatible (or invalid) API version.\n\tEnvOverrideAPIVersion = \"DOCKER_API_VERSION\"\n\n\t// EnvOverrideCertPath is the name of the environment variable that can be\n\t// used to specify the directory from which to load the TLS certificates\n\t// (ca.pem, cert.pem, key.pem) from. These certificates are used to configure\n\t// the [Client] for a TCP connection protected by TLS client authentication.\n\t//\n\t// TLS certificate verification is enabled by default if the Client is configured\n\t// to use a TLS connection. Refer to [EnvTLSVerify] below to learn how to\n\t// disable verification for testing purposes.\n\t//\n\t// WARNING: Access to the remote API is equivalent to root access to the\n\t// host where the daemon runs. Do not expose the API without protection,\n\t// and only if needed. Make sure you are familiar with the [\"daemon attack surface\"].\n\t//\n\t// For local access to the API, it is recommended to connect with the daemon\n\t// using the default local socket connection (on Linux), or the named pipe\n\t// (on Windows).\n\t//\n\t// If you need to access the API of a remote daemon, consider using an SSH\n\t// (ssh://) connection, which is easier to set up, and requires no additional\n\t// configuration if the host is accessible using ssh.\n\t//\n\t// If you cannot use the alternatives above, and you must expose the API over\n\t// a TCP connection. Refer to [Protect the Docker daemon socket]\n\t// to learn how to configure the daemon and client to use a TCP connection\n\t// with TLS client authentication. Make sure you know the differences between\n\t// a regular TLS connection and a TLS connection protected by TLS client\n\t// authentication, and verify that the API cannot be accessed by other clients.\n\t//\n\t// [\"daemon attack surface\"]: https://docs.docker.com/go/attack-surface/\n\t// [Protect the Docker daemon socket]: https://docs.docker.com/engine/security/protect-access/\n\tEnvOverrideCertPath = \"DOCKER_CERT_PATH\"\n\n\t// EnvTLSVerify is the name of the environment variable that can be used to\n\t// enable or disable TLS certificate verification. When set to a non-empty\n\t// value, TLS certificate verification is enabled, and the client is configured\n\t// to use a TLS connection, using certificates from the default directories\n\t// (within `~/.docker`); refer to EnvOverrideCertPath above for additional\n\t// details.\n\t//\n\t// WARNING: Access to the remote API is equivalent to root access to the\n\t// host where the daemon runs. Do not expose the API without protection,\n\t// and only if needed. Make sure you are familiar with the [\"daemon attack surface\"].\n\t//\n\t// Before setting up your client and daemon to use a TCP connection with TLS\n\t// client authentication, consider using one of the alternatives mentioned\n\t// in [EnvOverrideCertPath].\n\t//\n\t// Disabling TLS certificate verification (for testing purposes)\n\t//\n\t// TLS certificate verification is enabled by default if the Client is configured\n\t// to use a TLS connection, and it is highly recommended to keep verification\n\t// enabled to prevent machine-in-the-middle attacks. Refer to [Protect the Docker daemon socket]\n\t// in the documentation and pages linked from that page to learn how to\n\t// configure the daemon and client to use a TCP connection with TLS client\n\t// authentication enabled.\n\t//\n\t// Set the \"DOCKER_TLS_VERIFY\" environment to an empty string (\"\") to\n\t// disable TLS certificate verification. Disabling verification is insecure,\n\t// so should only be done for testing purposes.\n\t//\n\t// From the[crypto/tls.Config] documentation:\n\t//\n\t// InsecureSkipVerify controls whether a client verifies the server's\n\t// certificate chain and host name. If InsecureSkipVerify is true, crypto/tls\n\t// accepts any certificate presented by the server and any host name in that\n\t// certificate. In this mode, TLS is susceptible to machine-in-the-middle\n\t// attacks unless custom verification is used. This should be used only for\n\t// testing or in combination with VerifyConnection or VerifyPeerCertificate.\n\t//\n\t// [\"daemon attack surface\"]: https://docs.docker.com/go/attack-surface/\n\t// [Protect the Docker daemon socket]: https://docs.docker.com/engine/security/protect-access/\n\tEnvTLSVerify = \"DOCKER_TLS_VERIFY\"\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/errors.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/containerd/errdefs/pkg/errhttp\"\n\t\"github.com/moby/moby/client/pkg/versions\"\n)\n\n// errConnectionFailed implements an error returned when connection failed.\ntype errConnectionFailed struct {\n\terror\n}\n\n// Error returns a string representation of an errConnectionFailed\nfunc (e errConnectionFailed) Error() string {\n\treturn e.error.Error()\n}\n\nfunc (e errConnectionFailed) Unwrap() error {\n\treturn e.error\n}\n\n// IsErrConnectionFailed returns true if the error is caused by connection failed.\nfunc IsErrConnectionFailed(err error) bool {\n\treturn errors.As(err, &errConnectionFailed{})\n}\n\n// connectionFailed returns an error with host in the error message when connection\n// to docker daemon failed.\nfunc connectionFailed(host string) error {\n\tvar err error\n\tif host == \"\" {\n\t\terr = errors.New(\"Cannot connect to the Docker daemon. Is the docker daemon running on this host?\")\n\t} else {\n\t\terr = fmt.Errorf(\"Cannot connect to the Docker daemon at %s. Is the docker daemon running?\", host)\n\t}\n\treturn errConnectionFailed{error: err}\n}\n\ntype objectNotFoundError struct {\n\tobject string\n\tid     string\n}\n\nfunc (e objectNotFoundError) NotFound() {}\n\nfunc (e objectNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"Error: No such %s: %s\", e.object, e.id)\n}\n\n// requiresVersion returns an error if the APIVersion required is less than the\n// current supported version.\n//\n// It performs API-version negotiation if the Client is configured with this\n// option, otherwise it assumes the latest API version is used.\nfunc (cli *Client) requiresVersion(ctx context.Context, apiRequired, feature string) error {\n\t// Make sure we negotiated (if the client is configured to do so),\n\t// as code below contains API-version specific handling of options.\n\t//\n\t// Normally, version-negotiation (if enabled) would not happen until\n\t// the API request is made.\n\tif err := cli.checkVersion(ctx); err != nil {\n\t\treturn err\n\t}\n\tif cli.version != \"\" && versions.LessThan(cli.version, apiRequired) {\n\t\treturn fmt.Errorf(\"%q requires API version %s, but the Docker daemon API version is %s\", feature, apiRequired, cli.version)\n\t}\n\treturn nil\n}\n\ntype httpError struct {\n\terr    error\n\terrdef error\n}\n\nfunc (e *httpError) Error() string {\n\treturn e.err.Error()\n}\n\nfunc (e *httpError) Unwrap() error {\n\treturn e.err\n}\n\nfunc (e *httpError) Is(target error) bool {\n\treturn errors.Is(e.errdef, target)\n}\n\n// httpErrorFromStatusCode creates an errdef error, based on the provided HTTP status-code\nfunc httpErrorFromStatusCode(err error, statusCode int) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\tbase := errhttp.ToNative(statusCode)\n\tif base != nil {\n\t\treturn &httpError{err: err, errdef: base}\n\t}\n\n\tswitch {\n\tcase statusCode >= http.StatusOK && statusCode < http.StatusBadRequest:\n\t\t// it's a client error\n\t\treturn err\n\tcase statusCode >= http.StatusBadRequest && statusCode < http.StatusInternalServerError:\n\t\treturn &httpError{err: err, errdef: cerrdefs.ErrInvalidArgument}\n\tcase statusCode >= http.StatusInternalServerError && statusCode < 600:\n\t\treturn &httpError{err: err, errdef: cerrdefs.ErrInternal}\n\tdefault:\n\t\treturn &httpError{err: err, errdef: cerrdefs.ErrUnknown}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/filters.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"net/url\"\n)\n\n// Filters describes a predicate for an API request.\n//\n// Each entry in the map is a filter term.\n// Each term is evaluated against the set of values.\n// A filter term is satisfied if any one of the values in the set is a match.\n// An item matches the filters when all terms are satisfied.\n//\n// Like all other map types in Go, the zero value is empty and read-only.\ntype Filters map[string]map[string]bool\n\n// Add appends values to the value-set of term.\n//\n// The receiver f is returned for chaining.\n//\n//\tf := make(Filters).Add(\"name\", \"foo\", \"bar\").Add(\"status\", \"exited\")\nfunc (f Filters) Add(term string, values ...string) Filters {\n\tif _, ok := f[term]; !ok {\n\t\tf[term] = make(map[string]bool)\n\t}\n\tfor _, v := range values {\n\t\tf[term][v] = true\n\t}\n\treturn f\n}\n\n// Clone returns a deep copy of f.\nfunc (f Filters) Clone() Filters {\n\tout := make(Filters, len(f))\n\tfor term, values := range f {\n\t\tinner := make(map[string]bool, len(values))\n\t\tfor v, ok := range values {\n\t\t\tinner[v] = ok\n\t\t}\n\t\tout[term] = inner\n\t}\n\treturn out\n}\n\n// updateURLValues sets the \"filters\" key in values to the marshalled value of\n// f, replacing any existing values. When f is empty, any existing \"filters\" key\n// is removed.\nfunc (f Filters) updateURLValues(values url.Values) {\n\tif len(f) > 0 {\n\t\tb, err := json.Marshal(f)\n\t\tif err != nil {\n\t\t\tpanic(err) // Marshaling builtin types should never fail\n\t\t}\n\t\tvalues.Set(\"filters\", string(b))\n\t} else {\n\t\tvalues.Del(\"filters\")\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/hijack.go",
    "content": "package client\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n)\n\n// postHijacked sends a POST request and hijacks the connection.\nfunc (cli *Client) postHijacked(ctx context.Context, path string, query url.Values, body any, headers map[string][]string) (HijackedResponse, error) {\n\tjsonBody, err := jsonEncode(body)\n\tif err != nil {\n\t\treturn HijackedResponse{}, err\n\t}\n\treq, err := cli.buildRequest(ctx, http.MethodPost, cli.getAPIPath(ctx, path, query), jsonBody, headers)\n\tif err != nil {\n\t\treturn HijackedResponse{}, err\n\t}\n\tconn, mediaType, err := setupHijackConn(cli.dialer(), req, \"tcp\")\n\tif err != nil {\n\t\treturn HijackedResponse{}, err\n\t}\n\n\treturn NewHijackedResponse(conn, mediaType), nil\n}\n\n// DialHijack returns a hijacked connection with negotiated protocol proto.\nfunc (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, url, http.NoBody)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq = cli.addHeaders(req, meta)\n\n\tconn, _, err := setupHijackConn(cli.Dialer(), req, proto)\n\treturn conn, err\n}\n\nfunc setupHijackConn(dialer func(context.Context) (net.Conn, error), req *http.Request, proto string) (_ net.Conn, _ string, retErr error) {\n\tctx := req.Context()\n\treq.Header.Set(\"Connection\", \"Upgrade\")\n\treq.Header.Set(\"Upgrade\", proto)\n\n\tconn, err := dialer(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: %w\", err)\n\t}\n\tdefer func() {\n\t\tif retErr != nil {\n\t\t\t_ = conn.Close()\n\t\t}\n\t}()\n\n\t// When we set up a TCP connection for hijack, there could be long periods\n\t// of inactivity (a long running command with no output) that in certain\n\t// network setups may cause ECONNTIMEOUT, leaving the client in an unknown\n\t// state. Setting TCP KeepAlive on the socket connection prohibits\n\t// ECONNTIMEOUT unless the socket connection truly is broken\n\tif tcpConn, ok := conn.(*net.TCPConn); ok {\n\t\t_ = tcpConn.SetKeepAlive(true)\n\t\t_ = tcpConn.SetKeepAlivePeriod(30 * time.Second)\n\t}\n\n\thc := &hijackedConn{conn, bufio.NewReader(conn)}\n\n\t// Server hijacks the connection, error 'connection closed' expected\n\tresp, err := otelhttp.NewTransport(hc).RoundTrip(req)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif resp.StatusCode != http.StatusSwitchingProtocols {\n\t\t_ = resp.Body.Close()\n\t\treturn nil, \"\", fmt.Errorf(\"unable to upgrade to %s, received %d\", proto, resp.StatusCode)\n\t}\n\n\tif hc.r.Buffered() > 0 {\n\t\t// If there is buffered content, wrap the connection.  We return an\n\t\t// object that implements CloseWrite if the underlying connection\n\t\t// implements it.\n\t\tif _, ok := hc.Conn.(CloseWriter); ok {\n\t\t\tconn = &hijackedConnCloseWriter{hc}\n\t\t} else {\n\t\t\tconn = hc\n\t\t}\n\t} else {\n\t\thc.r.Reset(nil)\n\t}\n\n\treturn conn, resp.Header.Get(\"Content-Type\"), nil\n}\n\n// hijackedConn wraps a net.Conn and is returned by setupHijackConn in the case\n// that a) there was already buffered data in the http layer when Hijack() was\n// called, and b) the underlying net.Conn does *not* implement CloseWrite().\n// hijackedConn does not implement CloseWrite() either.\ntype hijackedConn struct {\n\tnet.Conn\n\tr *bufio.Reader\n}\n\nfunc (c *hijackedConn) RoundTrip(req *http.Request) (*http.Response, error) {\n\tif err := req.Write(c.Conn); err != nil {\n\t\treturn nil, err\n\t}\n\treturn http.ReadResponse(c.r, req)\n}\n\nfunc (c *hijackedConn) Read(b []byte) (int, error) {\n\treturn c.r.Read(b)\n}\n\n// hijackedConnCloseWriter is a hijackedConn which additionally implements\n// CloseWrite().  It is returned by setupHijackConn in the case that a) there\n// was already buffered data in the http layer when Hijack() was called, and b)\n// the underlying net.Conn *does* implement CloseWrite().\ntype hijackedConnCloseWriter struct {\n\t*hijackedConn\n}\n\nvar _ CloseWriter = &hijackedConnCloseWriter{}\n\nfunc (c *hijackedConnCloseWriter) CloseWrite() error {\n\tconn := c.Conn.(CloseWriter)\n\treturn conn.CloseWrite()\n}\n\n// NewHijackedResponse initializes a [HijackedResponse] type.\nfunc NewHijackedResponse(conn net.Conn, mediaType string) HijackedResponse {\n\treturn HijackedResponse{Conn: conn, Reader: bufio.NewReader(conn), mediaType: mediaType}\n}\n\n// HijackedResponse holds connection information for a hijacked request.\ntype HijackedResponse struct {\n\tmediaType string\n\tConn      net.Conn\n\tReader    *bufio.Reader\n}\n\n// Close closes the hijacked connection and reader.\nfunc (h *HijackedResponse) Close() {\n\th.Conn.Close()\n}\n\n// MediaType let client know if HijackedResponse hold a raw or multiplexed stream.\n// returns false if HTTP Content-Type is not relevant, and the container must be\n// inspected.\nfunc (h *HijackedResponse) MediaType() (string, bool) {\n\tif h.mediaType == \"\" {\n\t\treturn \"\", false\n\t}\n\treturn h.mediaType, true\n}\n\n// CloseWriter is an interface that implements structs\n// that close input streams to prevent from writing.\ntype CloseWriter interface {\n\tCloseWrite() error\n}\n\n// CloseWrite closes a readWriter for writing.\nfunc (h *HijackedResponse) CloseWrite() error {\n\tif conn, ok := h.Conn.(CloseWriter); ok {\n\t\treturn conn.CloseWrite()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_build.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// ImageBuild sends a request to the daemon to build images.\n// The Body in the response implements an [io.ReadCloser] and it's up to the caller to\n// close it.\nfunc (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options ImageBuildOptions) (ImageBuildResult, error) {\n\tquery, err := cli.imageBuildOptionsToQuery(ctx, options)\n\tif err != nil {\n\t\treturn ImageBuildResult{}, err\n\t}\n\n\tbuf, err := json.Marshal(options.AuthConfigs)\n\tif err != nil {\n\t\treturn ImageBuildResult{}, err\n\t}\n\n\theaders := http.Header{}\n\theaders.Add(\"X-Registry-Config\", base64.URLEncoding.EncodeToString(buf))\n\theaders.Set(\"Content-Type\", \"application/x-tar\")\n\n\tresp, err := cli.postRaw(ctx, \"/build\", query, buildContext, headers)\n\tif err != nil {\n\t\treturn ImageBuildResult{}, err\n\t}\n\n\treturn ImageBuildResult{\n\t\tBody: resp.Body,\n\t}, nil\n}\n\nfunc (cli *Client) imageBuildOptionsToQuery(_ context.Context, options ImageBuildOptions) (url.Values, error) {\n\tquery := url.Values{}\n\tif len(options.Tags) > 0 {\n\t\tquery[\"t\"] = options.Tags\n\t}\n\tif len(options.SecurityOpt) > 0 {\n\t\tquery[\"securityopt\"] = options.SecurityOpt\n\t}\n\tif len(options.ExtraHosts) > 0 {\n\t\tquery[\"extrahosts\"] = options.ExtraHosts\n\t}\n\tif options.SuppressOutput {\n\t\tquery.Set(\"q\", \"1\")\n\t}\n\tif options.RemoteContext != \"\" {\n\t\tquery.Set(\"remote\", options.RemoteContext)\n\t}\n\tif options.NoCache {\n\t\tquery.Set(\"nocache\", \"1\")\n\t}\n\tif !options.Remove {\n\t\t// only send value when opting out because the daemon's default is\n\t\t// to remove intermediate containers after a successful build,\n\t\t//\n\t\t// TODO(thaJeztah): deprecate \"Remove\" option, and provide a \"NoRemove\" or \"Keep\" option instead.\n\t\tquery.Set(\"rm\", \"0\")\n\t}\n\n\tif options.ForceRemove {\n\t\tquery.Set(\"forcerm\", \"1\")\n\t}\n\n\tif options.PullParent {\n\t\tquery.Set(\"pull\", \"1\")\n\t}\n\n\tif options.Squash {\n\t\t// TODO(thaJeztah): squash is experimental, and deprecated when using BuildKit?\n\t\tquery.Set(\"squash\", \"1\")\n\t}\n\n\tif !container.Isolation.IsDefault(options.Isolation) {\n\t\tquery.Set(\"isolation\", string(options.Isolation))\n\t}\n\n\tif options.CPUSetCPUs != \"\" {\n\t\tquery.Set(\"cpusetcpus\", options.CPUSetCPUs)\n\t}\n\tif options.NetworkMode != \"\" && options.NetworkMode != network.NetworkDefault {\n\t\tquery.Set(\"networkmode\", options.NetworkMode)\n\t}\n\tif options.CPUSetMems != \"\" {\n\t\tquery.Set(\"cpusetmems\", options.CPUSetMems)\n\t}\n\tif options.CPUShares != 0 {\n\t\tquery.Set(\"cpushares\", strconv.FormatInt(options.CPUShares, 10))\n\t}\n\tif options.CPUQuota != 0 {\n\t\tquery.Set(\"cpuquota\", strconv.FormatInt(options.CPUQuota, 10))\n\t}\n\tif options.CPUPeriod != 0 {\n\t\tquery.Set(\"cpuperiod\", strconv.FormatInt(options.CPUPeriod, 10))\n\t}\n\tif options.Memory != 0 {\n\t\tquery.Set(\"memory\", strconv.FormatInt(options.Memory, 10))\n\t}\n\tif options.MemorySwap != 0 {\n\t\tquery.Set(\"memswap\", strconv.FormatInt(options.MemorySwap, 10))\n\t}\n\tif options.CgroupParent != \"\" {\n\t\tquery.Set(\"cgroupparent\", options.CgroupParent)\n\t}\n\tif options.ShmSize != 0 {\n\t\tquery.Set(\"shmsize\", strconv.FormatInt(options.ShmSize, 10))\n\t}\n\tif options.Dockerfile != \"\" {\n\t\tquery.Set(\"dockerfile\", options.Dockerfile)\n\t}\n\tif options.Target != \"\" {\n\t\tquery.Set(\"target\", options.Target)\n\t}\n\tif len(options.Ulimits) != 0 {\n\t\tulimitsJSON, err := json.Marshal(options.Ulimits)\n\t\tif err != nil {\n\t\t\treturn query, err\n\t\t}\n\t\tquery.Set(\"ulimits\", string(ulimitsJSON))\n\t}\n\tif len(options.BuildArgs) != 0 {\n\t\tbuildArgsJSON, err := json.Marshal(options.BuildArgs)\n\t\tif err != nil {\n\t\t\treturn query, err\n\t\t}\n\t\tquery.Set(\"buildargs\", string(buildArgsJSON))\n\t}\n\tif len(options.Labels) != 0 {\n\t\tlabelsJSON, err := json.Marshal(options.Labels)\n\t\tif err != nil {\n\t\t\treturn query, err\n\t\t}\n\t\tquery.Set(\"labels\", string(labelsJSON))\n\t}\n\tif len(options.CacheFrom) != 0 {\n\t\tcacheFromJSON, err := json.Marshal(options.CacheFrom)\n\t\tif err != nil {\n\t\t\treturn query, err\n\t\t}\n\t\tquery.Set(\"cachefrom\", string(cacheFromJSON))\n\t}\n\tif options.SessionID != \"\" {\n\t\tquery.Set(\"session\", options.SessionID)\n\t}\n\tif len(options.Platforms) > 0 {\n\t\tif len(options.Platforms) > 1 {\n\t\t\t// TODO(thaJeztah): update API spec and add equivalent check on the daemon. We need this still for older daemons, which would ignore it.\n\t\t\treturn query, cerrdefs.ErrInvalidArgument.WithMessage(\"specifying multiple platforms is not yet supported\")\n\t\t}\n\t\tquery.Set(\"platform\", formatPlatform(options.Platforms[0]))\n\t}\n\tif options.BuildID != \"\" {\n\t\tquery.Set(\"buildid\", options.BuildID)\n\t}\n\tif options.Version != \"\" {\n\t\tquery.Set(\"version\", string(options.Version))\n\t}\n\n\tif options.Outputs != nil {\n\t\toutputsJSON, err := json.Marshal(options.Outputs)\n\t\tif err != nil {\n\t\t\treturn query, err\n\t\t}\n\t\tquery.Set(\"outputs\", string(outputsJSON))\n\t}\n\treturn query, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_build_opts.go",
    "content": "package client\n\nimport (\n\t\"io\"\n\n\t\"github.com/moby/moby/api/types/build\"\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/registry\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageBuildOptions holds the information\n// necessary to build images.\ntype ImageBuildOptions struct {\n\tTags           []string\n\tSuppressOutput bool\n\tRemoteContext  string\n\tNoCache        bool\n\tRemove         bool\n\tForceRemove    bool\n\tPullParent     bool\n\tIsolation      container.Isolation\n\tCPUSetCPUs     string\n\tCPUSetMems     string\n\tCPUShares      int64\n\tCPUQuota       int64\n\tCPUPeriod      int64\n\tMemory         int64\n\tMemorySwap     int64\n\tCgroupParent   string\n\tNetworkMode    string\n\tShmSize        int64\n\tDockerfile     string\n\tUlimits        []*container.Ulimit\n\t// BuildArgs needs to be a *string instead of just a string so that\n\t// we can tell the difference between \"\" (empty string) and no value\n\t// at all (nil). See the parsing of buildArgs in\n\t// api/server/router/build/build_routes.go for even more info.\n\tBuildArgs   map[string]*string\n\tAuthConfigs map[string]registry.AuthConfig\n\tContext     io.Reader\n\tLabels      map[string]string\n\t// squash the resulting image's layers to the parent\n\t// preserves the original image and creates a new one from the parent with all\n\t// the changes applied to a single layer\n\tSquash bool\n\t// CacheFrom specifies images that are used for matching cache. Images\n\t// specified here do not need to have a valid parent chain to match cache.\n\tCacheFrom   []string\n\tSecurityOpt []string\n\tExtraHosts  []string // List of extra hosts\n\tTarget      string\n\tSessionID   string\n\t// Platforms selects the platforms to build the image for. Multiple platforms\n\t// can be provided if the daemon supports multi-platform builds.\n\tPlatforms []ocispec.Platform\n\t// Version specifies the version of the underlying builder to use\n\tVersion build.BuilderVersion\n\t// BuildID is an optional identifier that can be passed together with the\n\t// build request. The same identifier can be used to gracefully cancel the\n\t// build with the cancel request.\n\tBuildID string\n\t// Outputs defines configurations for exporting build results. Only supported\n\t// in BuildKit mode\n\tOutputs []ImageBuildOutput\n}\n\n// ImageBuildOutput defines configuration for exporting a build result\ntype ImageBuildOutput struct {\n\tType  string\n\tAttrs map[string]string\n}\n\n// ImageBuildResult holds information\n// returned by a server after building\n// an image.\ntype ImageBuildResult struct {\n\tBody io.ReadCloser\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_history.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageHistoryWithPlatform sets the platform for the image history operation.\nfunc ImageHistoryWithPlatform(platform ocispec.Platform) ImageHistoryOption {\n\treturn imageHistoryOptionFunc(func(opt *imageHistoryOpts) error {\n\t\tif opt.apiOptions.Platform != nil {\n\t\t\treturn fmt.Errorf(\"platform already set to %s\", *opt.apiOptions.Platform)\n\t\t}\n\t\topt.apiOptions.Platform = &platform\n\t\treturn nil\n\t})\n}\n\n// ImageHistory returns the changes in an image in history format.\nfunc (cli *Client) ImageHistory(ctx context.Context, imageID string, historyOpts ...ImageHistoryOption) (ImageHistoryResult, error) {\n\tquery := url.Values{}\n\n\tvar opts imageHistoryOpts\n\tfor _, o := range historyOpts {\n\t\tif err := o.Apply(&opts); err != nil {\n\t\t\treturn ImageHistoryResult{}, err\n\t\t}\n\t}\n\n\tif opts.apiOptions.Platform != nil {\n\t\tif err := cli.requiresVersion(ctx, \"1.48\", \"platform\"); err != nil {\n\t\t\treturn ImageHistoryResult{}, err\n\t\t}\n\n\t\tp, err := encodePlatform(opts.apiOptions.Platform)\n\t\tif err != nil {\n\t\t\treturn ImageHistoryResult{}, err\n\t\t}\n\t\tquery.Set(\"platform\", p)\n\t}\n\n\tresp, err := cli.get(ctx, \"/images/\"+imageID+\"/history\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ImageHistoryResult{}, err\n\t}\n\n\tvar history ImageHistoryResult\n\terr = json.NewDecoder(resp.Body).Decode(&history.Items)\n\treturn history, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_history_opts.go",
    "content": "package client\n\nimport (\n\t\"github.com/moby/moby/api/types/image\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageHistoryOption is a type representing functional options for the image history operation.\ntype ImageHistoryOption interface {\n\tApply(*imageHistoryOpts) error\n}\ntype imageHistoryOptionFunc func(opt *imageHistoryOpts) error\n\nfunc (f imageHistoryOptionFunc) Apply(o *imageHistoryOpts) error {\n\treturn f(o)\n}\n\ntype imageHistoryOpts struct {\n\tapiOptions imageHistoryOptions\n}\n\ntype imageHistoryOptions struct {\n\t// Platform from the manifest list to use for history.\n\tPlatform *ocispec.Platform\n}\n\ntype ImageHistoryResult struct {\n\tItems []image.HistoryResponseItem\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_import.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/url\"\n\n\t\"github.com/distribution/reference\"\n)\n\n// ImageImportResult holds the response body returned by the daemon for image import.\ntype ImageImportResult interface {\n\tio.ReadCloser\n}\n\n// ImageImport creates a new image based on the source options. It returns the\n// JSON content in the [ImageImportResult].\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) ImageImport(ctx context.Context, source ImageImportSource, ref string, options ImageImportOptions) (ImageImportResult, error) {\n\tif ref != \"\" {\n\t\t// Check if the given image name can be resolved\n\t\tif _, err := reference.ParseNormalizedNamed(ref); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tquery := url.Values{}\n\tif source.SourceName != \"\" {\n\t\tquery.Set(\"fromSrc\", source.SourceName)\n\t}\n\tif ref != \"\" {\n\t\tquery.Set(\"repo\", ref)\n\t}\n\tif options.Tag != \"\" {\n\t\tquery.Set(\"tag\", options.Tag)\n\t}\n\tif options.Message != \"\" {\n\t\tquery.Set(\"message\", options.Message)\n\t}\n\tif p := formatPlatform(options.Platform); p != \"unknown\" {\n\t\t// TODO(thaJeztah): would we ever support mutiple platforms here? (would require multiple rootfs tars as well?)\n\t\tquery.Set(\"platform\", p)\n\t}\n\tfor _, change := range options.Changes {\n\t\tquery.Add(\"changes\", change)\n\t}\n\n\tresp, err := cli.postRaw(ctx, \"/images/create\", query, source.Source, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &imageImportResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\n// ImageImportResult holds the response body returned by the daemon for image import.\ntype imageImportResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser     = (*imageImportResult)(nil)\n\t_ ImageImportResult = (*imageImportResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_import_opts.go",
    "content": "package client\n\nimport (\n\t\"io\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageImportSource holds source information for ImageImport\ntype ImageImportSource struct {\n\tSource     io.Reader // Source is the data to send to the server to create this image from. You must set SourceName to \"-\" to leverage this.\n\tSourceName string    // SourceName is the name of the image to pull. Set to \"-\" to leverage the Source attribute.\n}\n\n// ImageImportOptions holds information to import images from the client host.\ntype ImageImportOptions struct {\n\tTag      string           // Tag is the name to tag this image with. This attribute is deprecated.\n\tMessage  string           // Message is the message to tag the image with\n\tChanges  []string         // Changes are the raw changes to apply to this image\n\tPlatform ocispec.Platform // Platform is the target platform of the image\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_inspect.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n)\n\n// ImageInspect returns the image information.\nfunc (cli *Client) ImageInspect(ctx context.Context, imageID string, inspectOpts ...ImageInspectOption) (ImageInspectResult, error) {\n\tif imageID == \"\" {\n\t\treturn ImageInspectResult{}, objectNotFoundError{object: \"image\", id: imageID}\n\t}\n\n\tvar opts imageInspectOpts\n\tfor _, opt := range inspectOpts {\n\t\tif err := opt.Apply(&opts); err != nil {\n\t\t\treturn ImageInspectResult{}, fmt.Errorf(\"error applying image inspect option: %w\", err)\n\t\t}\n\t}\n\n\tquery := url.Values{}\n\tif opts.apiOptions.Manifests {\n\t\tif err := cli.requiresVersion(ctx, \"1.48\", \"manifests\"); err != nil {\n\t\t\treturn ImageInspectResult{}, err\n\t\t}\n\t\tquery.Set(\"manifests\", \"1\")\n\t}\n\n\tif opts.apiOptions.Platform != nil {\n\t\tif err := cli.requiresVersion(ctx, \"1.49\", \"platform\"); err != nil {\n\t\t\treturn ImageInspectResult{}, err\n\t\t}\n\t\tplatform, err := encodePlatform(opts.apiOptions.Platform)\n\t\tif err != nil {\n\t\t\treturn ImageInspectResult{}, err\n\t\t}\n\t\tquery.Set(\"platform\", platform)\n\t}\n\n\tresp, err := cli.get(ctx, \"/images/\"+imageID+\"/json\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ImageInspectResult{}, err\n\t}\n\n\tbuf := opts.raw\n\tif buf == nil {\n\t\tbuf = &bytes.Buffer{}\n\t}\n\n\tif _, err := io.Copy(buf, resp.Body); err != nil {\n\t\treturn ImageInspectResult{}, err\n\t}\n\n\tvar response ImageInspectResult\n\terr = json.Unmarshal(buf.Bytes(), &response)\n\treturn response, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_inspect_opts.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/moby/moby/api/types/image\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageInspectOption is a type representing functional options for the image inspect operation.\ntype ImageInspectOption interface {\n\tApply(*imageInspectOpts) error\n}\ntype imageInspectOptionFunc func(opt *imageInspectOpts) error\n\nfunc (f imageInspectOptionFunc) Apply(o *imageInspectOpts) error {\n\treturn f(o)\n}\n\n// ImageInspectWithRawResponse instructs the client to additionally store the\n// raw inspect response in the provided buffer.\nfunc ImageInspectWithRawResponse(raw *bytes.Buffer) ImageInspectOption {\n\treturn imageInspectOptionFunc(func(opts *imageInspectOpts) error {\n\t\topts.raw = raw\n\t\treturn nil\n\t})\n}\n\n// ImageInspectWithManifests sets manifests API option for the image inspect operation.\n// This option is only available for API version 1.48 and up.\n// With this option set, the image inspect operation response includes\n// the [image.InspectResponse.Manifests] field if the server is multi-platform\n// capable.\nfunc ImageInspectWithManifests(manifests bool) ImageInspectOption {\n\treturn imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error {\n\t\tclientOpts.apiOptions.Manifests = manifests\n\t\treturn nil\n\t})\n}\n\n// ImageInspectWithPlatform sets platform API option for the image inspect operation.\n// This option is only available for API version 1.49 and up.\n// With this option set, the image inspect operation returns information for the\n// specified platform variant of the multi-platform image.\nfunc ImageInspectWithPlatform(platform *ocispec.Platform) ImageInspectOption {\n\treturn imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error {\n\t\tclientOpts.apiOptions.Platform = platform\n\t\treturn nil\n\t})\n}\n\ntype imageInspectOpts struct {\n\traw        *bytes.Buffer\n\tapiOptions imageInspectOptions\n}\n\ntype imageInspectOptions struct {\n\t// Manifests returns the image manifests.\n\tManifests bool\n\n\t// Platform selects the specific platform of a multi-platform image to inspect.\n\t//\n\t// This option is only available for API version 1.49 and up.\n\tPlatform *ocispec.Platform\n}\n\ntype ImageInspectResult struct {\n\timage.InspectResponse\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/image\"\n\t\"github.com/moby/moby/client/pkg/versions\"\n)\n\n// ImageList returns a list of images in the docker host.\n//\n// Experimental: Set the [image.ListOptions.Manifest] option\n// to include [image.Summary.Manifests] with information about image manifests.\n// This is experimental and might change in the future without any backward\n// compatibility.\nfunc (cli *Client) ImageList(ctx context.Context, options ImageListOptions) (ImageListResult, error) {\n\tvar images []image.Summary\n\n\tquery := url.Values{}\n\n\toptions.Filters.updateURLValues(query)\n\tif options.All {\n\t\tquery.Set(\"all\", \"1\")\n\t}\n\tif options.SharedSize {\n\t\tquery.Set(\"shared-size\", \"1\")\n\t}\n\tif options.Manifests {\n\t\t// Make sure we negotiated (if the client is configured to do so),\n\t\t// as code below contains API-version specific handling of options.\n\t\t//\n\t\t// Normally, version-negotiation (if enabled) would not happen until\n\t\t// the API request is made.\n\t\tif err := cli.checkVersion(ctx); err != nil {\n\t\t\treturn ImageListResult{}, err\n\t\t}\n\n\t\tif versions.GreaterThanOrEqualTo(cli.version, \"1.47\") {\n\t\t\tquery.Set(\"manifests\", \"1\")\n\t\t}\n\t}\n\tif options.Identity {\n\t\tif err := cli.requiresVersion(ctx, \"1.54\", \"identity\"); err != nil {\n\t\t\treturn ImageListResult{}, err\n\t\t}\n\t\t// Identity data in image list is scoped to manifests.\n\t\tquery.Set(\"manifests\", \"1\")\n\t\tquery.Set(\"identity\", \"1\")\n\t}\n\n\tresp, err := cli.get(ctx, \"/images/json\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ImageListResult{}, err\n\t}\n\n\terr = json.NewDecoder(resp.Body).Decode(&images)\n\treturn ImageListResult{Items: images}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_list_opts.go",
    "content": "package client\n\nimport \"github.com/moby/moby/api/types/image\"\n\n// ImageListOptions holds parameters to list images with.\ntype ImageListOptions struct {\n\t// All controls whether all images in the graph are filtered, or just\n\t// the heads.\n\tAll bool\n\n\t// Filters is a JSON-encoded set of filter arguments.\n\tFilters Filters\n\n\t// SharedSize indicates whether the shared size of images should be computed.\n\tSharedSize bool\n\n\t// Manifests indicates whether the image manifests should be returned.\n\tManifests bool\n\n\t// Identity indicates whether image identity information should be returned.\n\tIdentity bool\n}\n\n// ImageListResult holds the result from ImageList.\ntype ImageListResult struct {\n\tItems []image.Summary\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_load.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n)\n\n// ImageLoadResult returns information to the client about a load process.\n// It implements [io.ReadCloser] and must be closed to avoid a resource leak.\ntype ImageLoadResult interface {\n\tio.ReadCloser\n}\n\n// ImageLoad loads an image in the docker host from the client host. It's up\n// to the caller to close the [ImageLoadResult] returned by this function.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) ImageLoad(ctx context.Context, input io.Reader, loadOpts ...ImageLoadOption) (ImageLoadResult, error) {\n\tvar opts imageLoadOpts\n\tfor _, opt := range loadOpts {\n\t\tif err := opt.Apply(&opts); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"quiet\", \"0\")\n\tif opts.apiOptions.Quiet {\n\t\tquery.Set(\"quiet\", \"1\")\n\t}\n\tif len(opts.apiOptions.Platforms) > 0 {\n\t\tif err := cli.requiresVersion(ctx, \"1.48\", \"platform\"); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tp, err := encodePlatforms(opts.apiOptions.Platforms...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tquery[\"platform\"] = p\n\t}\n\n\tresp, err := cli.postRaw(ctx, \"/images/load\", query, input, http.Header{\n\t\t\"Content-Type\": {\"application/x-tar\"},\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &imageLoadResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\n// imageLoadResult returns information to the client about a load process.\ntype imageLoadResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser   = (*imageLoadResult)(nil)\n\t_ ImageLoadResult = (*imageLoadResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_load_opts.go",
    "content": "package client\n\nimport (\n\t\"fmt\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageLoadOption is a type representing functional options for the image load operation.\ntype ImageLoadOption interface {\n\tApply(*imageLoadOpts) error\n}\ntype imageLoadOptionFunc func(opt *imageLoadOpts) error\n\nfunc (f imageLoadOptionFunc) Apply(o *imageLoadOpts) error {\n\treturn f(o)\n}\n\ntype imageLoadOpts struct {\n\tapiOptions imageLoadOptions\n}\n\ntype imageLoadOptions struct {\n\t// Quiet suppresses progress output\n\tQuiet bool\n\n\t// Platforms selects the platforms to load if the image is a\n\t// multi-platform image and has multiple variants.\n\tPlatforms []ocispec.Platform\n}\n\n// ImageLoadWithQuiet sets the quiet option for the image load operation.\nfunc ImageLoadWithQuiet(quiet bool) ImageLoadOption {\n\treturn imageLoadOptionFunc(func(opt *imageLoadOpts) error {\n\t\topt.apiOptions.Quiet = quiet\n\t\treturn nil\n\t})\n}\n\n// ImageLoadWithPlatforms sets the platforms to be loaded from the image.\n//\n// Platform is an optional parameter that specifies the platform to load from\n// the provided multi-platform image. Passing a platform only has an effect\n// if the input image is a multi-platform image.\nfunc ImageLoadWithPlatforms(platforms ...ocispec.Platform) ImageLoadOption {\n\treturn imageLoadOptionFunc(func(opt *imageLoadOpts) error {\n\t\tif opt.apiOptions.Platforms != nil {\n\t\t\treturn fmt.Errorf(\"platforms already set to %v\", opt.apiOptions.Platforms)\n\t\t}\n\t\topt.apiOptions.Platforms = platforms\n\t\treturn nil\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_prune.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/image\"\n)\n\n// ImagePruneOptions holds parameters to prune images.\ntype ImagePruneOptions struct {\n\tFilters Filters\n}\n\n// ImagePruneResult holds the result from the [Client.ImagePrune] method.\ntype ImagePruneResult struct {\n\tReport image.PruneReport\n}\n\n// ImagePrune requests the daemon to delete unused data\nfunc (cli *Client) ImagePrune(ctx context.Context, opts ImagePruneOptions) (ImagePruneResult, error) {\n\tquery := url.Values{}\n\topts.Filters.updateURLValues(query)\n\n\tresp, err := cli.post(ctx, \"/images/prune\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ImagePruneResult{}, err\n\t}\n\n\tvar report image.PruneReport\n\tif err := json.NewDecoder(resp.Body).Decode(&report); err != nil {\n\t\treturn ImagePruneResult{}, fmt.Errorf(\"Error retrieving disk usage: %v\", err)\n\t}\n\n\treturn ImagePruneResult{Report: report}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_pull.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"iter\"\n\t\"net/http\"\n\t\"net/url\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/jsonstream\"\n\t\"github.com/moby/moby/api/types/registry\"\n\t\"github.com/moby/moby/client/internal\"\n)\n\ntype ImagePullResponse interface {\n\tio.ReadCloser\n\tJSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error]\n\tWait(ctx context.Context) error\n}\n\n// ImagePull requests the docker host to pull an image from a remote registry.\n// It executes the privileged function if the operation is unauthorized\n// and it tries one more time.\n// Callers can:\n//   - use [ImagePullResponse.Wait] to wait for pull to complete\n//   - use [ImagePullResponse.JSONMessages] to monitor pull progress as a sequence\n//     of JSONMessages, [ImagePullResponse.Close] does not need to be called in this case.\n//   - use the [io.Reader] interface and call [ImagePullResponse.Close] after processing.\nfunc (cli *Client) ImagePull(ctx context.Context, refStr string, options ImagePullOptions) (ImagePullResponse, error) {\n\t// FIXME(vdemeester): there is currently used in a few way in docker/docker\n\t// - if not in trusted content, ref is used to pass the whole reference, and tag is empty\n\t// - if in trusted content, ref is used to pass the reference name, and tag for the digest\n\t//\n\t// ref; https://github.com/docker-archive-public/docker.engine-api/pull/162\n\n\tref, err := reference.ParseNormalizedNamed(refStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"fromImage\", ref.Name())\n\tif !options.All {\n\t\tquery.Set(\"tag\", getAPITagFromNamedRef(ref))\n\t}\n\tif len(options.Platforms) > 0 {\n\t\tif len(options.Platforms) > 1 {\n\t\t\t// TODO(thaJeztah): update API spec and add equivalent check on the daemon. We need this still for older daemons, which would ignore it.\n\t\t\treturn nil, cerrdefs.ErrInvalidArgument.WithMessage(\"specifying multiple platforms is not yet supported\")\n\t\t}\n\t\tquery.Set(\"platform\", formatPlatform(options.Platforms[0]))\n\t}\n\tresp, err := cli.tryImageCreate(ctx, query, staticAuth(options.RegistryAuth))\n\tif cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {\n\t\tresp, err = cli.tryImageCreate(ctx, query, options.PrivilegeFunc)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn internal.NewJSONMessageStream(resp.Body), nil\n}\n\n// getAPITagFromNamedRef returns a tag from the specified reference.\n// This function is necessary as long as the docker \"server\" api expects\n// digests to be sent as tags and makes a distinction between the name\n// and tag/digest part of a reference.\nfunc getAPITagFromNamedRef(ref reference.Named) string {\n\tif digested, ok := ref.(reference.Digested); ok {\n\t\treturn digested.Digest().String()\n\t}\n\tref = reference.TagNameOnly(ref)\n\tif tagged, ok := ref.(reference.Tagged); ok {\n\t\treturn tagged.Tag()\n\t}\n\treturn \"\"\n}\n\nfunc (cli *Client) tryImageCreate(ctx context.Context, query url.Values, resolveAuth registry.RequestAuthConfig) (*http.Response, error) {\n\thdr := http.Header{}\n\tif resolveAuth != nil {\n\t\tregistryAuth, err := resolveAuth(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif registryAuth != \"\" {\n\t\t\thdr.Set(registry.AuthHeader, registryAuth)\n\t\t}\n\t}\n\treturn cli.post(ctx, \"/images/create\", query, nil, hdr)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_pull_opts.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImagePullOptions holds information to pull images.\ntype ImagePullOptions struct {\n\tAll          bool\n\tRegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry\n\n\t// PrivilegeFunc is a function that clients can supply to retry operations\n\t// after getting an authorization error. This function returns the registry\n\t// authentication header value in base64 encoded format, or an error if the\n\t// privilege request fails.\n\t//\n\t// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].\n\tPrivilegeFunc func(context.Context) (string, error)\n\n\t// Platforms selects the platforms to pull. Multiple platforms can be\n\t// specified if the image ia a multi-platform image.\n\tPlatforms []ocispec.Platform\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_push.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"iter\"\n\t\"net/http\"\n\t\"net/url\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/jsonstream\"\n\t\"github.com/moby/moby/api/types/registry\"\n\t\"github.com/moby/moby/client/internal\"\n)\n\ntype ImagePushResponse interface {\n\tio.ReadCloser\n\tJSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error]\n\tWait(ctx context.Context) error\n}\n\n// ImagePush requests the docker host to push an image to a remote registry.\n// It executes the privileged function if the operation is unauthorized\n// and it tries one more time.\n// Callers can\n//   - use [ImagePushResponse.Wait] to wait for push to complete\n//   - use [ImagePushResponse.JSONMessages] to monitor pull progress as a sequence\n//     of JSONMessages, [ImagePushResponse.Close] does not need to be called in this case.\n//   - use the [io.Reader] interface and call [ImagePushResponse.Close] after processing.\nfunc (cli *Client) ImagePush(ctx context.Context, image string, options ImagePushOptions) (ImagePushResponse, error) {\n\tref, err := reference.ParseNormalizedNamed(image)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, ok := ref.(reference.Digested); ok {\n\t\treturn nil, errors.New(\"cannot push a digest reference\")\n\t}\n\n\tquery := url.Values{}\n\tif !options.All {\n\t\tref = reference.TagNameOnly(ref)\n\t\tif tagged, ok := ref.(reference.Tagged); ok {\n\t\t\tquery.Set(\"tag\", tagged.Tag())\n\t\t}\n\t}\n\n\tif options.Platform != nil {\n\t\tif err := cli.requiresVersion(ctx, \"1.46\", \"platform\"); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tp := *options.Platform\n\t\tpJson, err := json.Marshal(p)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid platform: %v\", err)\n\t\t}\n\n\t\tquery.Set(\"platform\", string(pJson))\n\t}\n\n\tresp, err := cli.tryImagePush(ctx, ref.Name(), query, staticAuth(options.RegistryAuth))\n\tif cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {\n\t\tresp, err = cli.tryImagePush(ctx, ref.Name(), query, options.PrivilegeFunc)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn internal.NewJSONMessageStream(resp.Body), nil\n}\n\nfunc (cli *Client) tryImagePush(ctx context.Context, imageID string, query url.Values, resolveAuth registry.RequestAuthConfig) (*http.Response, error) {\n\thdr := http.Header{}\n\tif resolveAuth != nil {\n\t\tregistryAuth, err := resolveAuth(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif registryAuth != \"\" {\n\t\t\thdr.Set(registry.AuthHeader, registryAuth)\n\t\t}\n\t}\n\n\t// Always send a body (which may be an empty JSON document (\"{}\")) to prevent\n\t// EOF errors on older daemons which had faulty fallback code for handling\n\t// authentication in the body when no auth-header was set, resulting in;\n\t//\n\t//\tError response from daemon: bad parameters and missing X-Registry-Auth: invalid X-Registry-Auth header: EOF\n\t//\n\t// We use [http.NoBody], which gets marshaled to an empty JSON document.\n\t//\n\t// see: https://github.com/moby/moby/commit/ea29dffaa541289591aa44fa85d2a596ce860e16\n\treturn cli.post(ctx, \"/images/\"+imageID+\"/push\", query, http.NoBody, hdr)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_push_opts.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImagePushOptions holds information to push images.\ntype ImagePushOptions struct {\n\tAll          bool\n\tRegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry\n\n\t// PrivilegeFunc is a function that clients can supply to retry operations\n\t// after getting an authorization error. This function returns the registry\n\t// authentication header value in base64 encoded format, or an error if the\n\t// privilege request fails.\n\t//\n\t// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].\n\tPrivilegeFunc func(context.Context) (string, error)\n\n\t// Platform is an optional field that selects a specific platform to push\n\t// when the image is a multi-platform image.\n\t// Using this will only push a single platform-specific manifest.\n\tPlatform *ocispec.Platform `json:\",omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/image\"\n)\n\n// ImageRemove removes an image from the docker host.\nfunc (cli *Client) ImageRemove(ctx context.Context, imageID string, options ImageRemoveOptions) (ImageRemoveResult, error) {\n\tquery := url.Values{}\n\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\tif !options.PruneChildren {\n\t\tquery.Set(\"noprune\", \"1\")\n\t}\n\n\tif len(options.Platforms) > 0 {\n\t\tp, err := encodePlatforms(options.Platforms...)\n\t\tif err != nil {\n\t\t\treturn ImageRemoveResult{}, err\n\t\t}\n\t\tquery[\"platforms\"] = p\n\t}\n\n\tresp, err := cli.delete(ctx, \"/images/\"+imageID, query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ImageRemoveResult{}, err\n\t}\n\n\tvar dels []image.DeleteResponse\n\terr = json.NewDecoder(resp.Body).Decode(&dels)\n\treturn ImageRemoveResult{Items: dels}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_remove_opts.go",
    "content": "package client\n\nimport (\n\t\"github.com/moby/moby/api/types/image\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// ImageRemoveOptions holds parameters to remove images.\ntype ImageRemoveOptions struct {\n\tPlatforms     []ocispec.Platform\n\tForce         bool\n\tPruneChildren bool\n}\n\n// ImageRemoveResult holds the delete responses returned by the daemon.\ntype ImageRemoveResult struct {\n\tItems []image.DeleteResponse\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_save.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/url\"\n)\n\ntype ImageSaveResult interface {\n\tio.ReadCloser\n}\n\n// ImageSave retrieves one or more images from the docker host as an\n// [ImageSaveResult]. Callers should close the reader, but the underlying\n// [io.ReadCloser] is automatically closed if the context is canceled,\n//\n// Platforms is an optional parameter that specifies the platforms to save\n// from the image. Passing a platform only has an effect if the input image\n// is a multi-platform image.\nfunc (cli *Client) ImageSave(ctx context.Context, imageIDs []string, saveOpts ...ImageSaveOption) (ImageSaveResult, error) {\n\tvar opts imageSaveOpts\n\tfor _, opt := range saveOpts {\n\t\tif err := opt.Apply(&opts); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tquery := url.Values{\n\t\t\"names\": imageIDs,\n\t}\n\n\tif len(opts.apiOptions.Platforms) > 0 {\n\t\tif err := cli.requiresVersion(ctx, \"1.48\", \"platform\"); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tp, err := encodePlatforms(opts.apiOptions.Platforms...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tquery[\"platform\"] = p\n\t}\n\n\tresp, err := cli.get(ctx, \"/images/get\", query, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &imageSaveResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\ntype imageSaveResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser   = (*imageSaveResult)(nil)\n\t_ ImageSaveResult = (*imageSaveResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_save_opts.go",
    "content": "package client\n\nimport (\n\t\"fmt\"\n\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\ntype ImageSaveOption interface {\n\tApply(*imageSaveOpts) error\n}\n\ntype imageSaveOptionFunc func(opt *imageSaveOpts) error\n\nfunc (f imageSaveOptionFunc) Apply(o *imageSaveOpts) error {\n\treturn f(o)\n}\n\n// ImageSaveWithPlatforms sets the platforms to be saved from the image. It\n// produces an error if platforms are already set. This option only has an\n// effect if the input image is a multi-platform image.\nfunc ImageSaveWithPlatforms(platforms ...ocispec.Platform) ImageSaveOption {\n\t// TODO(thaJeztah): verify the GoDoc; do we produce an error for a single-platform image without the given platform?\n\treturn imageSaveOptionFunc(func(opt *imageSaveOpts) error {\n\t\tif opt.apiOptions.Platforms != nil {\n\t\t\treturn fmt.Errorf(\"platforms already set to %v\", opt.apiOptions.Platforms)\n\t\t}\n\t\topt.apiOptions.Platforms = platforms\n\t\treturn nil\n\t})\n}\n\ntype imageSaveOpts struct {\n\tapiOptions imageSaveOptions\n}\n\ntype imageSaveOptions struct {\n\t// Platforms selects the platforms to save if the image is a\n\t// multi-platform image and has multiple variants.\n\tPlatforms []ocispec.Platform\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_search.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// ImageSearch makes the docker host search by a term in a remote registry.\n// The list of results is not sorted in any fashion.\nfunc (cli *Client) ImageSearch(ctx context.Context, term string, options ImageSearchOptions) (ImageSearchResult, error) {\n\tvar results []registry.SearchResult\n\tquery := url.Values{}\n\tquery.Set(\"term\", term)\n\tif options.Limit > 0 {\n\t\tquery.Set(\"limit\", strconv.Itoa(options.Limit))\n\t}\n\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.tryImageSearch(ctx, query, options.RegistryAuth)\n\tdefer ensureReaderClosed(resp)\n\tif cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {\n\t\tnewAuthHeader, privilegeErr := options.PrivilegeFunc(ctx)\n\t\tif privilegeErr != nil {\n\t\t\treturn ImageSearchResult{}, privilegeErr\n\t\t}\n\t\tresp, err = cli.tryImageSearch(ctx, query, newAuthHeader)\n\t}\n\tif err != nil {\n\t\treturn ImageSearchResult{}, err\n\t}\n\n\terr = json.NewDecoder(resp.Body).Decode(&results)\n\treturn ImageSearchResult{Items: results}, err\n}\n\nfunc (cli *Client) tryImageSearch(ctx context.Context, query url.Values, registryAuth string) (*http.Response, error) {\n\treturn cli.get(ctx, \"/images/search\", query, http.Header{\n\t\tregistry.AuthHeader: {registryAuth},\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_search_opts.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// ImageSearchResult wraps results returned by ImageSearch.\ntype ImageSearchResult struct {\n\tItems []registry.SearchResult\n}\n\n// ImageSearchOptions holds parameters to search images with.\ntype ImageSearchOptions struct {\n\tRegistryAuth string\n\n\t// PrivilegeFunc is a function that clients can supply to retry operations\n\t// after getting an authorization error. This function returns the registry\n\t// authentication header value in base64 encoded format, or an error if the\n\t// privilege request fails.\n\t//\n\t// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].\n\tPrivilegeFunc func(context.Context) (string, error)\n\tFilters       Filters\n\tLimit         int\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/image_tag.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/distribution/reference\"\n)\n\ntype ImageTagOptions struct {\n\tSource string\n\tTarget string\n}\n\ntype ImageTagResult struct{}\n\n// ImageTag tags an image in the docker host\nfunc (cli *Client) ImageTag(ctx context.Context, options ImageTagOptions) (ImageTagResult, error) {\n\tsource := options.Source\n\ttarget := options.Target\n\n\tif _, err := reference.ParseAnyReference(source); err != nil {\n\t\treturn ImageTagResult{}, fmt.Errorf(\"error parsing reference: %q is not a valid repository/tag: %w\", source, err)\n\t}\n\n\tref, err := reference.ParseNormalizedNamed(target)\n\tif err != nil {\n\t\treturn ImageTagResult{}, fmt.Errorf(\"error parsing reference: %q is not a valid repository/tag: %w\", target, err)\n\t}\n\n\tif _, ok := ref.(reference.Digested); ok {\n\t\treturn ImageTagResult{}, errors.New(\"refusing to create a tag with a digest reference\")\n\t}\n\n\tref = reference.TagNameOnly(ref)\n\n\tquery := url.Values{}\n\tquery.Set(\"repo\", ref.Name())\n\tif tagged, ok := ref.(reference.Tagged); ok {\n\t\tquery.Set(\"tag\", tagged.Tag())\n\t}\n\n\tresp, err := cli.post(ctx, \"/images/\"+source+\"/tag\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn ImageTagResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/internal/json-stream.go",
    "content": "package internal\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"slices\"\n\n\t\"github.com/moby/moby/api/types\"\n)\n\nconst rs = 0x1E\n\ntype DecoderFn func(v any) error\n\n// NewJSONStreamDecoder builds adequate DecoderFn to read json records formatted with specified content-type\nfunc NewJSONStreamDecoder(r io.Reader, contentType string) DecoderFn {\n\tswitch contentType {\n\tcase types.MediaTypeJSONSequence:\n\t\treturn json.NewDecoder(NewRSFilterReader(r)).Decode\n\tcase types.MediaTypeJSON, types.MediaTypeNDJSON, types.MediaTypeJSONLines:\n\t\tfallthrough\n\tdefault:\n\t\treturn json.NewDecoder(r).Decode\n\t}\n}\n\n// RSFilterReader wraps an io.Reader and filters out ASCII RS characters\ntype RSFilterReader struct {\n\treader io.Reader\n\tbuffer []byte\n}\n\n// NewRSFilterReader creates a new RSFilterReader that filters out RS characters\nfunc NewRSFilterReader(r io.Reader) *RSFilterReader {\n\treturn &RSFilterReader{\n\t\treader: r,\n\t\tbuffer: make([]byte, 4096), // Internal buffer for reading chunks\n\t}\n}\n\n// Read implements the io.Reader interface, filtering out RS characters\nfunc (r *RSFilterReader) Read(p []byte) (n int, err error) {\n\tif len(p) == 0 {\n\t\treturn 0, nil\n\t}\n\n\tn, err = r.reader.Read(p)\n\tfiltered := slices.DeleteFunc(p[:n], func(b byte) bool { return b == rs })\n\treturn len(filtered), err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/internal/jsonmessages.go",
    "content": "package internal\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n\t\"iter\"\n\t\"sync\"\n\n\t\"github.com/moby/moby/api/types/jsonstream\"\n)\n\nfunc NewJSONMessageStream(rc io.ReadCloser) Stream {\n\tif rc == nil {\n\t\tpanic(\"nil io.ReadCloser\")\n\t}\n\treturn Stream{\n\t\trc:    rc,\n\t\tclose: sync.OnceValue(rc.Close),\n\t}\n}\n\ntype Stream struct {\n\trc    io.ReadCloser\n\tclose func() error\n}\n\n// Read implements io.ReadCloser\nfunc (r Stream) Read(p []byte) (n int, err error) {\n\tif r.rc == nil {\n\t\treturn 0, io.EOF\n\t}\n\treturn r.rc.Read(p)\n}\n\n// Close implements io.ReadCloser\nfunc (r Stream) Close() error {\n\tif r.close == nil {\n\t\treturn nil\n\t}\n\treturn r.close()\n}\n\nvar _ io.ReadCloser = Stream{}\n\n// JSONMessages decodes the response stream as a sequence of JSONMessages.\n// if stream ends or context is cancelled, the underlying [io.Reader] is closed.\nfunc (r Stream) JSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error] {\n\tstop := context.AfterFunc(ctx, func() {\n\t\t_ = r.Close()\n\t})\n\tdec := json.NewDecoder(r)\n\treturn func(yield func(jsonstream.Message, error) bool) {\n\t\tdefer func() {\n\t\t\tstop() // unregister AfterFunc\n\t\t\tr.Close()\n\t\t}()\n\t\tfor {\n\t\t\tvar jm jsonstream.Message\n\t\t\terr := dec.Decode(&jm)\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif ctx.Err() != nil {\n\t\t\t\tyield(jm, ctx.Err())\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif !yield(jm, err) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Wait waits for operation to complete and detects errors reported as JSONMessage\nfunc (r Stream) Wait(ctx context.Context) error {\n\tfor _, err := range r.JSONMessages(ctx) {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/internal/timestamp/timestamp.go",
    "content": "package timestamp\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// These are additional predefined layouts for use in Time.Format and Time.Parse\n// with --since and --until parameters for `docker logs` and `docker events`\nconst (\n\trFC3339Local     = \"2006-01-02T15:04:05\"           // RFC3339 with local timezone\n\trFC3339NanoLocal = \"2006-01-02T15:04:05.999999999\" // RFC3339Nano with local timezone\n\tdateWithZone     = \"2006-01-02Z07:00\"              // RFC3339 with time at 00:00:00\n\tdateLocal        = \"2006-01-02\"                    // RFC3339 with local timezone and time at 00:00:00\n)\n\n// GetTimestamp tries to parse given string as golang duration,\n// then RFC3339 time and finally as a Unix timestamp. If\n// any of these were successful, it returns a Unix timestamp\n// as string otherwise returns the given value back.\n// In case of duration input, the returned timestamp is computed\n// as the given reference time minus the amount of the duration.\nfunc GetTimestamp(value string, reference time.Time) (string, error) {\n\tif d, err := time.ParseDuration(value); value != \"0\" && err == nil {\n\t\treturn strconv.FormatInt(reference.Add(-d).Unix(), 10), nil\n\t}\n\n\tvar format string\n\t// if the string has a Z or a + or three dashes use parse otherwise use parseinlocation\n\tparseInLocation := !strings.ContainsAny(value, \"zZ+\") && strings.Count(value, \"-\") != 3\n\n\tif strings.Contains(value, \".\") {\n\t\tif parseInLocation {\n\t\t\tformat = rFC3339NanoLocal\n\t\t} else {\n\t\t\tformat = time.RFC3339Nano\n\t\t}\n\t} else if strings.Contains(value, \"T\") {\n\t\t// we want the number of colons in the T portion of the timestamp\n\t\ttcolons := strings.Count(value, \":\")\n\t\t// if parseInLocation is off and we have a +/- zone offset (not Z) then\n\t\t// there will be an extra colon in the input for the tz offset subtract that\n\t\t// colon from the tcolons count\n\t\tif !parseInLocation && !strings.ContainsAny(value, \"zZ\") && tcolons > 0 {\n\t\t\ttcolons--\n\t\t}\n\t\tif parseInLocation {\n\t\t\tswitch tcolons {\n\t\t\tcase 0:\n\t\t\t\tformat = \"2006-01-02T15\"\n\t\t\tcase 1:\n\t\t\t\tformat = \"2006-01-02T15:04\"\n\t\t\tdefault:\n\t\t\t\tformat = rFC3339Local\n\t\t\t}\n\t\t} else {\n\t\t\tswitch tcolons {\n\t\t\tcase 0:\n\t\t\t\tformat = \"2006-01-02T15Z07:00\"\n\t\t\tcase 1:\n\t\t\t\tformat = \"2006-01-02T15:04Z07:00\"\n\t\t\tdefault:\n\t\t\t\tformat = time.RFC3339\n\t\t\t}\n\t\t}\n\t} else if parseInLocation {\n\t\tformat = dateLocal\n\t} else {\n\t\tformat = dateWithZone\n\t}\n\n\tvar t time.Time\n\tvar err error\n\n\tif parseInLocation {\n\t\tt, err = time.ParseInLocation(format, value, time.FixedZone(reference.Zone()))\n\t} else {\n\t\tt, err = time.Parse(format, value)\n\t}\n\n\tif err != nil {\n\t\t// if there is a `-` then it's an RFC3339 like timestamp\n\t\tif strings.Contains(value, \"-\") {\n\t\t\treturn \"\", err // was probably an RFC3339 like timestamp but the parser failed with an error\n\t\t}\n\t\tif _, _, err := parseTimestamp(value); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"failed to parse value as time or duration: %q\", value)\n\t\t}\n\t\treturn value, nil // unix timestamp in and out case (meaning: the value passed at the command line is already in the right format for passing to the server)\n\t}\n\n\treturn fmt.Sprintf(\"%d.%09d\", t.Unix(), int64(t.Nanosecond())), nil\n}\n\n// ParseTimestamps returns seconds and nanoseconds from a timestamp that has\n// the format (\"%d.%09d\", time.Unix(), int64(time.Nanosecond())).\n// If the incoming nanosecond portion is longer than 9 digits it is truncated.\n// The expectation is that the seconds and nanoseconds will be used to create a\n// time variable.  For example:\n//\n//\tseconds, nanoseconds, _ := ParseTimestamp(\"1136073600.000000001\",0)\n//\tsince := time.Unix(seconds, nanoseconds)\n//\n// returns seconds as defaultSeconds if value == \"\"\nfunc ParseTimestamps(value string, defaultSeconds int64) (seconds int64, nanoseconds int64, _ error) {\n\tif value == \"\" {\n\t\treturn defaultSeconds, 0, nil\n\t}\n\treturn parseTimestamp(value)\n}\n\nfunc parseTimestamp(value string) (seconds int64, nanoseconds int64, _ error) {\n\ts, n, ok := strings.Cut(value, \".\")\n\tsec, err := strconv.ParseInt(s, 10, 64)\n\tif err != nil {\n\t\treturn sec, 0, err\n\t}\n\tif !ok {\n\t\treturn sec, 0, nil\n\t}\n\tnsec, err := strconv.ParseInt(n, 10, 64)\n\tif err != nil {\n\t\treturn sec, nsec, err\n\t}\n\t// should already be in nanoseconds but just in case convert n to nanoseconds\n\tnsec = int64(float64(nsec) * math.Pow(float64(10), float64(9-len(n))))\n\treturn sec, nsec, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/login.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\ntype RegistryLoginOptions struct {\n\tUsername      string\n\tPassword      string\n\tServerAddress string\n\tIdentityToken string\n\tRegistryToken string\n}\n\n// RegistryLoginResult holds the result of a RegistryLogin query.\ntype RegistryLoginResult struct {\n\tAuth registry.AuthResponse\n}\n\n// RegistryLogin authenticates the docker server with a given docker registry.\n// It returns unauthorizedError when the authentication fails.\nfunc (cli *Client) RegistryLogin(ctx context.Context, options RegistryLoginOptions) (RegistryLoginResult, error) {\n\tauth := registry.AuthConfig{\n\t\tUsername:      options.Username,\n\t\tPassword:      options.Password,\n\t\tServerAddress: options.ServerAddress,\n\t\tIdentityToken: options.IdentityToken,\n\t\tRegistryToken: options.RegistryToken,\n\t}\n\n\tresp, err := cli.post(ctx, \"/auth\", url.Values{}, auth, nil)\n\tdefer ensureReaderClosed(resp)\n\n\tif err != nil {\n\t\treturn RegistryLoginResult{}, err\n\t}\n\n\tvar response registry.AuthResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn RegistryLoginResult{Auth: response}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_connect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkConnectOptions represents the data to be used to connect a container to the\n// network.\ntype NetworkConnectOptions struct {\n\tContainer      string\n\tEndpointConfig *network.EndpointSettings\n}\n\n// NetworkConnectResult represents the result of a NetworkConnect operation.\ntype NetworkConnectResult struct {\n\t// Currently empty; placeholder for future fields.\n}\n\n// NetworkConnect connects a container to an existent network in the docker host.\nfunc (cli *Client) NetworkConnect(ctx context.Context, networkID string, options NetworkConnectOptions) (NetworkConnectResult, error) {\n\tnetworkID, err := trimID(\"network\", networkID)\n\tif err != nil {\n\t\treturn NetworkConnectResult{}, err\n\t}\n\n\tcontainerID, err := trimID(\"container\", options.Container)\n\tif err != nil {\n\t\treturn NetworkConnectResult{}, err\n\t}\n\n\tnc := network.ConnectRequest{\n\t\tContainer:      containerID,\n\t\tEndpointConfig: options.EndpointConfig,\n\t}\n\tresp, err := cli.post(ctx, \"/networks/\"+networkID+\"/connect\", nil, nc, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn NetworkConnectResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkCreateOptions holds options to create a network.\ntype NetworkCreateOptions struct {\n\tDriver     string            // Driver is the driver-name used to create the network (e.g. `bridge`, `overlay`)\n\tScope      string            // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level).\n\tEnableIPv4 *bool             // EnableIPv4 represents whether to enable IPv4.\n\tEnableIPv6 *bool             // EnableIPv6 represents whether to enable IPv6.\n\tIPAM       *network.IPAM     // IPAM is the network's IP Address Management.\n\tInternal   bool              // Internal represents if the network is used internal only.\n\tAttachable bool              // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode.\n\tIngress    bool              // Ingress indicates the network is providing the routing-mesh for the swarm cluster.\n\tConfigOnly bool              // ConfigOnly creates a config-only network. Config-only networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services.\n\tConfigFrom string            // ConfigFrom specifies the source which will provide the configuration for this network. The specified network must be a config-only network; see [CreateOptions.ConfigOnly].\n\tOptions    map[string]string // Options specifies the network-specific options to use for when creating the network.\n\tLabels     map[string]string // Labels holds metadata specific to the network being created.\n}\n\n// NetworkCreateResult represents the result of a network create operation.\ntype NetworkCreateResult struct {\n\tID string\n\n\tWarning []string\n}\n\n// NetworkCreate creates a new network in the docker host.\nfunc (cli *Client) NetworkCreate(ctx context.Context, name string, options NetworkCreateOptions) (NetworkCreateResult, error) {\n\treq := network.CreateRequest{\n\t\tName:       name,\n\t\tDriver:     options.Driver,\n\t\tScope:      options.Scope,\n\t\tEnableIPv4: options.EnableIPv4,\n\t\tEnableIPv6: options.EnableIPv6,\n\t\tIPAM:       options.IPAM,\n\t\tInternal:   options.Internal,\n\t\tAttachable: options.Attachable,\n\t\tIngress:    options.Ingress,\n\t\tConfigOnly: options.ConfigOnly,\n\t\tOptions:    options.Options,\n\t\tLabels:     options.Labels,\n\t}\n\n\tif options.ConfigFrom != \"\" {\n\t\treq.ConfigFrom = &network.ConfigReference{Network: options.ConfigFrom}\n\t}\n\n\tresp, err := cli.post(ctx, \"/networks/create\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn NetworkCreateResult{}, err\n\t}\n\n\tvar response network.CreateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\n\tvar warnings []string\n\tif response.Warning != \"\" {\n\t\twarnings = []string{response.Warning}\n\t}\n\n\treturn NetworkCreateResult{ID: response.ID, Warning: warnings}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_disconnect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkDisconnectOptions represents the data to be used to disconnect a container\n// from the network.\ntype NetworkDisconnectOptions struct {\n\tContainer string\n\tForce     bool\n}\n\n// NetworkDisconnectResult represents the result of a NetworkDisconnect operation.\ntype NetworkDisconnectResult struct {\n\t// Currently empty; placeholder for future fields.\n}\n\n// NetworkDisconnect disconnects a container from an existent network in the docker host.\nfunc (cli *Client) NetworkDisconnect(ctx context.Context, networkID string, options NetworkDisconnectOptions) (NetworkDisconnectResult, error) {\n\tnetworkID, err := trimID(\"network\", networkID)\n\tif err != nil {\n\t\treturn NetworkDisconnectResult{}, err\n\t}\n\n\tcontainerID, err := trimID(\"container\", options.Container)\n\tif err != nil {\n\t\treturn NetworkDisconnectResult{}, err\n\t}\n\n\treq := network.DisconnectRequest{\n\t\tContainer: containerID,\n\t\tForce:     options.Force,\n\t}\n\tresp, err := cli.post(ctx, \"/networks/\"+networkID+\"/disconnect\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn NetworkDisconnectResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkInspectResult contains the result of a network inspection.\ntype NetworkInspectResult struct {\n\tNetwork network.Inspect\n\tRaw     json.RawMessage\n}\n\n// NetworkInspect returns the information for a specific network configured in the docker host.\nfunc (cli *Client) NetworkInspect(ctx context.Context, networkID string, options NetworkInspectOptions) (NetworkInspectResult, error) {\n\tnetworkID, err := trimID(\"network\", networkID)\n\tif err != nil {\n\t\treturn NetworkInspectResult{}, err\n\t}\n\tquery := url.Values{}\n\tif options.Verbose {\n\t\tquery.Set(\"verbose\", \"true\")\n\t}\n\tif options.Scope != \"\" {\n\t\tquery.Set(\"scope\", options.Scope)\n\t}\n\n\tresp, err := cli.get(ctx, \"/networks/\"+networkID, query, nil)\n\tif err != nil {\n\t\treturn NetworkInspectResult{}, err\n\t}\n\n\tvar out NetworkInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Network)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_inspect_opts.go",
    "content": "package client\n\n// NetworkInspectOptions holds parameters to inspect network.\ntype NetworkInspectOptions struct {\n\tScope   string\n\tVerbose bool\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkListResult holds the result from the [Client.NetworkList] method.\ntype NetworkListResult struct {\n\tItems []network.Summary\n}\n\n// NetworkList returns the list of networks configured in the docker host.\nfunc (cli *Client) NetworkList(ctx context.Context, options NetworkListOptions) (NetworkListResult, error) {\n\tquery := url.Values{}\n\toptions.Filters.updateURLValues(query)\n\tresp, err := cli.get(ctx, \"/networks\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn NetworkListResult{}, err\n\t}\n\tvar res NetworkListResult\n\terr = json.NewDecoder(resp.Body).Decode(&res.Items)\n\treturn res, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_list_opts.go",
    "content": "package client\n\n// NetworkListOptions holds parameters to filter the list of networks with.\ntype NetworkListOptions struct {\n\tFilters Filters\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_prune.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/network\"\n)\n\n// NetworkPruneOptions holds parameters to prune networks.\ntype NetworkPruneOptions struct {\n\tFilters Filters\n}\n\n// NetworkPruneResult holds the result from the [Client.NetworkPrune] method.\ntype NetworkPruneResult struct {\n\tReport network.PruneReport\n}\n\n// NetworkPrune requests the daemon to delete unused networks\nfunc (cli *Client) NetworkPrune(ctx context.Context, opts NetworkPruneOptions) (NetworkPruneResult, error) {\n\tquery := url.Values{}\n\topts.Filters.updateURLValues(query)\n\n\tresp, err := cli.post(ctx, \"/networks/prune\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn NetworkPruneResult{}, err\n\t}\n\n\tvar report network.PruneReport\n\tif err := json.NewDecoder(resp.Body).Decode(&report); err != nil {\n\t\treturn NetworkPruneResult{}, fmt.Errorf(\"Error retrieving network prune report: %v\", err)\n\t}\n\n\treturn NetworkPruneResult{Report: report}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/network_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n)\n\n// NetworkRemoveOptions specifies options for removing a network.\ntype NetworkRemoveOptions struct {\n\t// No options currently; placeholder for future use.\n}\n\n// NetworkRemoveResult represents the result of a network removal operation.\ntype NetworkRemoveResult struct {\n\t// No fields currently; placeholder for future use.\n}\n\n// NetworkRemove removes an existent network from the docker host.\nfunc (cli *Client) NetworkRemove(ctx context.Context, networkID string, options NetworkRemoveOptions) (NetworkRemoveResult, error) {\n\tnetworkID, err := trimID(\"network\", networkID)\n\tif err != nil {\n\t\treturn NetworkRemoveResult{}, err\n\t}\n\tresp, err := cli.delete(ctx, \"/networks/\"+networkID, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn NetworkRemoveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/node_inspect.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"io\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// NodeInspectOptions holds parameters to inspect nodes with.\ntype NodeInspectOptions struct{}\n\ntype NodeInspectResult struct {\n\tNode swarm.Node\n\tRaw  json.RawMessage\n}\n\n// NodeInspect returns the node information.\nfunc (cli *Client) NodeInspect(ctx context.Context, nodeID string, options NodeInspectOptions) (NodeInspectResult, error) {\n\tnodeID, err := trimID(\"node\", nodeID)\n\tif err != nil {\n\t\treturn NodeInspectResult{}, err\n\t}\n\tresp, err := cli.get(ctx, \"/nodes/\"+nodeID, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn NodeInspectResult{}, err\n\t}\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn NodeInspectResult{}, err\n\t}\n\n\tvar response swarm.Node\n\trdr := bytes.NewReader(body)\n\terr = json.NewDecoder(rdr).Decode(&response)\n\treturn NodeInspectResult{Node: response, Raw: body}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/node_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// NodeListOptions holds parameters to list nodes with.\ntype NodeListOptions struct {\n\tFilters Filters\n}\n\ntype NodeListResult struct {\n\tItems []swarm.Node\n}\n\n// NodeList returns the list of nodes.\nfunc (cli *Client) NodeList(ctx context.Context, options NodeListOptions) (NodeListResult, error) {\n\tquery := url.Values{}\n\toptions.Filters.updateURLValues(query)\n\tresp, err := cli.get(ctx, \"/nodes\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn NodeListResult{}, err\n\t}\n\n\tvar nodes []swarm.Node\n\terr = json.NewDecoder(resp.Body).Decode(&nodes)\n\treturn NodeListResult{Items: nodes}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/node_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// NodeRemoveOptions holds parameters to remove nodes with.\ntype NodeRemoveOptions struct {\n\tForce bool\n}\ntype NodeRemoveResult struct{}\n\n// NodeRemove removes a Node.\nfunc (cli *Client) NodeRemove(ctx context.Context, nodeID string, options NodeRemoveOptions) (NodeRemoveResult, error) {\n\tnodeID, err := trimID(\"node\", nodeID)\n\tif err != nil {\n\t\treturn NodeRemoveResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\n\tresp, err := cli.delete(ctx, \"/nodes/\"+nodeID, query, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn NodeRemoveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/node_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// NodeUpdateOptions holds parameters to update nodes with.\ntype NodeUpdateOptions struct {\n\tVersion swarm.Version\n\tSpec    swarm.NodeSpec\n}\n\ntype NodeUpdateResult struct{}\n\n// NodeUpdate updates a Node.\nfunc (cli *Client) NodeUpdate(ctx context.Context, nodeID string, options NodeUpdateOptions) (NodeUpdateResult, error) {\n\tnodeID, err := trimID(\"node\", nodeID)\n\tif err != nil {\n\t\treturn NodeUpdateResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"version\", options.Version.String())\n\tresp, err := cli.post(ctx, \"/nodes/\"+nodeID+\"/update\", query, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn NodeUpdateResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/ping.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"path\"\n\t\"strings\"\n\n\t\"github.com/moby/moby/api/types/build\"\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// PingOptions holds options for [client.Ping].\ntype PingOptions struct {\n\t// NegotiateAPIVersion queries the API and updates the version to match the API\n\t// version. NegotiateAPIVersion downgrades the client's API version to match the\n\t// APIVersion if the ping version is lower than the default version. If the API\n\t// version reported by the server is higher than the maximum version supported\n\t// by the client, it uses the client's maximum version.\n\t//\n\t// If a manual override is in place, either through the \"DOCKER_API_VERSION\"\n\t// ([EnvOverrideAPIVersion]) environment variable, or if the client is initialized\n\t// with a fixed version ([WithAPIVersion]), no negotiation is performed.\n\t//\n\t// If the API server's ping response does not contain an API version, or if the\n\t// client did not get a successful ping response, it assumes it is connected with\n\t// an old daemon that does not support API version negotiation, in which case it\n\t// downgrades to the lowest supported API version.\n\tNegotiateAPIVersion bool\n\n\t// ForceNegotiate forces the client to re-negotiate the API version, even if\n\t// API-version negotiation already happened or it the client is configured\n\t// with a fixed version (using [WithAPIVersion] or [WithAPIVersionFromEnv]).\n\t//\n\t// This option has no effect if NegotiateAPIVersion is not set.\n\tForceNegotiate bool\n}\n\n// PingResult holds the result of a [Client.Ping] API call.\ntype PingResult struct {\n\tAPIVersion     string\n\tOSType         string\n\tExperimental   bool\n\tBuilderVersion build.BuilderVersion\n\n\t// SwarmStatus provides information about the current swarm status of the\n\t// engine, obtained from the \"Swarm\" header in the API response.\n\t//\n\t// It can be a nil struct if the API version does not provide this header\n\t// in the ping response, or if an error occurred, in which case the client\n\t// should use other ways to get the current swarm status, such as the /swarm\n\t// endpoint.\n\tSwarmStatus *SwarmStatus\n}\n\n// SwarmStatus provides information about the current swarm status and role,\n// obtained from the \"Swarm\" header in the API response.\ntype SwarmStatus struct {\n\t// NodeState represents the state of the node.\n\tNodeState swarm.LocalNodeState\n\n\t// ControlAvailable indicates if the node is a swarm manager.\n\tControlAvailable bool\n}\n\n// Ping pings the server and returns the value of the \"Docker-Experimental\",\n// \"Builder-Version\", \"OS-Type\" & \"API-Version\" headers. It attempts to use\n// a HEAD request on the endpoint, but falls back to GET if HEAD is not supported\n// by the daemon. It ignores internal server errors returned by the API, which\n// may be returned if the daemon is in an unhealthy state, but returns errors\n// for other non-success status codes, failing to connect to the API, or failing\n// to parse the API response.\nfunc (cli *Client) Ping(ctx context.Context, options PingOptions) (PingResult, error) {\n\tif !options.NegotiateAPIVersion {\n\t\t// No API version negotiation needed; just return ping response.\n\t\treturn cli.ping(ctx)\n\t}\n\tif cli.negotiated.Load() && !options.ForceNegotiate {\n\t\t// API version was already negotiated or manually set.\n\t\treturn cli.ping(ctx)\n\t}\n\n\t// Ensure exclusive write access to version and negotiated fields\n\tcli.negotiateLock.Lock()\n\tdefer cli.negotiateLock.Unlock()\n\n\tping, err := cli.ping(ctx)\n\tif err != nil {\n\t\treturn ping, err\n\t}\n\n\tif cli.negotiated.Load() && !options.ForceNegotiate {\n\t\t// API version was already negotiated or manually set.\n\t\t//\n\t\t// We check cli.negotiated again under lock, to account for race\n\t\t// conditions with the check at the start of this function.\n\t\treturn ping, nil\n\t}\n\n\tif ping.APIVersion == \"\" {\n\t\tcli.setAPIVersion(MaxAPIVersion)\n\t\treturn ping, nil\n\t}\n\n\treturn ping, cli.negotiateAPIVersion(ping.APIVersion)\n}\n\nfunc (cli *Client) ping(ctx context.Context) (PingResult, error) {\n\t// Using cli.buildRequest() + cli.doRequest() instead of cli.sendRequest()\n\t// because ping requests are used during API version negotiation, so we want\n\t// to hit the non-versioned /_ping endpoint, not /v1.xx/_ping\n\treq, err := cli.buildRequest(ctx, http.MethodHead, path.Join(cli.basePath, \"/_ping\"), nil, nil)\n\tif err != nil {\n\t\treturn PingResult{}, err\n\t}\n\tresp, err := cli.doRequest(req)\n\tdefer ensureReaderClosed(resp)\n\tif err == nil && resp.StatusCode == http.StatusOK {\n\t\t// Fast-path; successfully connected using a HEAD request and\n\t\t// we got a \"OK\" (200) status. For non-200 status-codes, we fall\n\t\t// back to doing a GET request, as a HEAD request won't have a\n\t\t// response-body to get error details from.\n\t\treturn newPingResult(resp), nil\n\t}\n\t// close to allow reusing connection.\n\tensureReaderClosed(resp)\n\n\t// HEAD failed or returned a non-OK status; fallback to GET.\n\treq2, err := cli.buildRequest(ctx, http.MethodGet, path.Join(cli.basePath, \"/_ping\"), nil, nil)\n\tif err != nil {\n\t\treturn PingResult{}, err\n\t}\n\tresp, err = cli.doRequest(req2)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\t// Failed to connect.\n\t\treturn PingResult{}, err\n\t}\n\n\t// GET request succeeded but may have returned a non-200 status.\n\t// Return a Ping response, together with any error returned by\n\t// the API server.\n\treturn newPingResult(resp), checkResponseErr(resp)\n}\n\nfunc newPingResult(resp *http.Response) PingResult {\n\tif resp == nil {\n\t\treturn PingResult{}\n\t}\n\tvar swarmStatus *SwarmStatus\n\tif si := resp.Header.Get(\"Swarm\"); si != \"\" {\n\t\tstate, role, _ := strings.Cut(si, \"/\")\n\t\tswarmStatus = &SwarmStatus{\n\t\t\tNodeState:        swarm.LocalNodeState(state),\n\t\t\tControlAvailable: role == \"manager\",\n\t\t}\n\t}\n\n\treturn PingResult{\n\t\tAPIVersion:     resp.Header.Get(\"Api-Version\"),\n\t\tOSType:         resp.Header.Get(\"Ostype\"),\n\t\tExperimental:   resp.Header.Get(\"Docker-Experimental\") == \"true\",\n\t\tBuilderVersion: build.BuilderVersion(resp.Header.Get(\"Builder-Version\")),\n\t\tSwarmStatus:    swarmStatus,\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/pkg/versions/compare.go",
    "content": "package versions\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n)\n\n// compare compares two version strings\n// returns -1 if v1 < v2, 1 if v1 > v2, 0 otherwise.\nfunc compare(v1, v2 string) int {\n\tif v1 == v2 {\n\t\treturn 0\n\t}\n\tvar (\n\t\tcurrTab  = strings.Split(v1, \".\")\n\t\totherTab = strings.Split(v2, \".\")\n\t)\n\n\tmaxVer := len(currTab)\n\tif len(otherTab) > maxVer {\n\t\tmaxVer = len(otherTab)\n\t}\n\tfor i := 0; i < maxVer; i++ {\n\t\tvar currInt, otherInt int\n\n\t\tif len(currTab) > i {\n\t\t\tcurrInt, _ = strconv.Atoi(currTab[i])\n\t\t}\n\t\tif len(otherTab) > i {\n\t\t\totherInt, _ = strconv.Atoi(otherTab[i])\n\t\t}\n\t\tif currInt > otherInt {\n\t\t\treturn 1\n\t\t}\n\t\tif otherInt > currInt {\n\t\t\treturn -1\n\t\t}\n\t}\n\treturn 0\n}\n\n// LessThan checks if a version is less than another\nfunc LessThan(v, other string) bool {\n\treturn compare(v, other) == -1\n}\n\n// LessThanOrEqualTo checks if a version is less than or equal to another\nfunc LessThanOrEqualTo(v, other string) bool {\n\treturn compare(v, other) <= 0\n}\n\n// GreaterThan checks if a version is greater than another\nfunc GreaterThan(v, other string) bool {\n\treturn compare(v, other) == 1\n}\n\n// GreaterThanOrEqualTo checks if a version is greater than or equal to another\nfunc GreaterThanOrEqualTo(v, other string) bool {\n\treturn compare(v, other) >= 0\n}\n\n// Equal checks if a version is equal to another\nfunc Equal(v, other string) bool {\n\treturn compare(v, other) == 0\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n)\n\n// PluginCreateOptions hold all options to plugin create.\ntype PluginCreateOptions struct {\n\tRepoName string\n}\n\n// PluginCreateResult represents the result of a plugin create operation.\ntype PluginCreateResult struct {\n\t// Currently empty; can be extended in the future if needed.\n}\n\n// PluginCreate creates a plugin\nfunc (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions PluginCreateOptions) (PluginCreateResult, error) {\n\theaders := http.Header(make(map[string][]string))\n\theaders.Set(\"Content-Type\", \"application/x-tar\")\n\n\tquery := url.Values{}\n\tquery.Set(\"name\", createOptions.RepoName)\n\n\tresp, err := cli.postRaw(ctx, \"/plugins/create\", query, createContext, headers)\n\tdefer ensureReaderClosed(resp)\n\treturn PluginCreateResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_disable.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// PluginDisableOptions holds parameters to disable plugins.\ntype PluginDisableOptions struct {\n\tForce bool\n}\n\n// PluginDisableResult represents the result of a plugin disable operation.\ntype PluginDisableResult struct {\n\t// Currently empty; can be extended in the future if needed.\n}\n\n// PluginDisable disables a plugin\nfunc (cli *Client) PluginDisable(ctx context.Context, name string, options PluginDisableOptions) (PluginDisableResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginDisableResult{}, err\n\t}\n\tquery := url.Values{}\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\tresp, err := cli.post(ctx, \"/plugins/\"+name+\"/disable\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn PluginDisableResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_enable.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strconv\"\n)\n\n// PluginEnableOptions holds parameters to enable plugins.\ntype PluginEnableOptions struct {\n\tTimeout int\n}\n\n// PluginEnableResult represents the result of a plugin enable operation.\ntype PluginEnableResult struct {\n\t// Currently empty; can be extended in the future if needed.\n}\n\n// PluginEnable enables a plugin\nfunc (cli *Client) PluginEnable(ctx context.Context, name string, options PluginEnableOptions) (PluginEnableResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginEnableResult{}, err\n\t}\n\tquery := url.Values{}\n\tquery.Set(\"timeout\", strconv.Itoa(options.Timeout))\n\n\tresp, err := cli.post(ctx, \"/plugins/\"+name+\"/enable\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn PluginEnableResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/plugin\"\n)\n\n// PluginInspectOptions holds parameters to inspect a plugin.\ntype PluginInspectOptions struct {\n\t// Add future optional parameters here\n}\n\n// PluginInspectResult holds the result from the [Client.PluginInspect] method.\ntype PluginInspectResult struct {\n\tPlugin plugin.Plugin\n\tRaw    json.RawMessage\n}\n\n// PluginInspect inspects an existing plugin\nfunc (cli *Client) PluginInspect(ctx context.Context, name string, options PluginInspectOptions) (PluginInspectResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginInspectResult{}, err\n\t}\n\tresp, err := cli.get(ctx, \"/plugins/\"+name+\"/json\", nil, nil)\n\tif err != nil {\n\t\treturn PluginInspectResult{}, err\n\t}\n\n\tvar out PluginInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Plugin)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_install.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/plugin\"\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// PluginInstallOptions holds parameters to install a plugin.\ntype PluginInstallOptions struct {\n\tDisabled             bool\n\tAcceptAllPermissions bool\n\tRegistryAuth         string // RegistryAuth is the base64 encoded credentials for the registry\n\tRemoteRef            string // RemoteRef is the plugin name on the registry\n\n\t// PrivilegeFunc is a function that clients can supply to retry operations\n\t// after getting an authorization error. This function returns the registry\n\t// authentication header value in base64 encoded format, or an error if the\n\t// privilege request fails.\n\t//\n\t// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].\n\tPrivilegeFunc         func(context.Context) (string, error)\n\tAcceptPermissionsFunc func(context.Context, plugin.Privileges) (bool, error)\n\tArgs                  []string\n}\n\n// PluginInstallResult holds the result of a plugin install operation.\n// It is an io.ReadCloser from which the caller can read installation progress or result.\ntype PluginInstallResult struct {\n\tio.ReadCloser\n}\n\n// PluginInstall installs a plugin\nfunc (cli *Client) PluginInstall(ctx context.Context, name string, options PluginInstallOptions) (_ PluginInstallResult, retErr error) {\n\tquery := url.Values{}\n\tif _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil {\n\t\treturn PluginInstallResult{}, fmt.Errorf(\"invalid remote reference: %w\", err)\n\t}\n\tquery.Set(\"remote\", options.RemoteRef)\n\n\tprivileges, err := cli.checkPluginPermissions(ctx, query, &options)\n\tif err != nil {\n\t\treturn PluginInstallResult{}, err\n\t}\n\n\t// set name for plugin pull, if empty should default to remote reference\n\tquery.Set(\"name\", name)\n\n\tresp, err := cli.tryPluginPull(ctx, query, privileges, options.RegistryAuth)\n\tif err != nil {\n\t\treturn PluginInstallResult{}, err\n\t}\n\n\tname = resp.Header.Get(\"Docker-Plugin-Name\")\n\n\tpr, pw := io.Pipe()\n\tgo func() { // todo: the client should probably be designed more around the actual api\n\t\t_, err := io.Copy(pw, resp.Body)\n\t\tif err != nil {\n\t\t\t_ = pw.CloseWithError(err)\n\t\t\treturn\n\t\t}\n\t\tdefer func() {\n\t\t\tif retErr != nil {\n\t\t\t\tdelResp, _ := cli.delete(ctx, \"/plugins/\"+name, nil, nil)\n\t\t\t\tensureReaderClosed(delResp)\n\t\t\t}\n\t\t}()\n\t\tif len(options.Args) > 0 {\n\t\t\tif _, err := cli.PluginSet(ctx, name, PluginSetOptions{Args: options.Args}); err != nil {\n\t\t\t\t_ = pw.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tif options.Disabled {\n\t\t\t_ = pw.Close()\n\t\t\treturn\n\t\t}\n\n\t\t_, enableErr := cli.PluginEnable(ctx, name, PluginEnableOptions{Timeout: 0})\n\t\t_ = pw.CloseWithError(enableErr)\n\t}()\n\treturn PluginInstallResult{pr}, nil\n}\n\nfunc (cli *Client) tryPluginPrivileges(ctx context.Context, query url.Values, registryAuth string) (*http.Response, error) {\n\treturn cli.get(ctx, \"/plugins/privileges\", query, http.Header{\n\t\tregistry.AuthHeader: {registryAuth},\n\t})\n}\n\nfunc (cli *Client) tryPluginPull(ctx context.Context, query url.Values, privileges plugin.Privileges, registryAuth string) (*http.Response, error) {\n\treturn cli.post(ctx, \"/plugins/pull\", query, privileges, http.Header{\n\t\tregistry.AuthHeader: {registryAuth},\n\t})\n}\n\nfunc (cli *Client) checkPluginPermissions(ctx context.Context, query url.Values, options pluginOptions) (plugin.Privileges, error) {\n\tresp, err := cli.tryPluginPrivileges(ctx, query, options.getRegistryAuth())\n\tif cerrdefs.IsUnauthorized(err) && options.getPrivilegeFunc() != nil {\n\t\t// TODO: do inspect before to check existing name before checking privileges\n\t\tnewAuthHeader, privilegeErr := options.getPrivilegeFunc()(ctx)\n\t\tif privilegeErr != nil {\n\t\t\tensureReaderClosed(resp)\n\t\t\treturn nil, privilegeErr\n\t\t}\n\t\toptions.setRegistryAuth(newAuthHeader)\n\t\tresp, err = cli.tryPluginPrivileges(ctx, query, options.getRegistryAuth())\n\t}\n\tif err != nil {\n\t\tensureReaderClosed(resp)\n\t\treturn nil, err\n\t}\n\n\tvar privileges plugin.Privileges\n\tif err := json.NewDecoder(resp.Body).Decode(&privileges); err != nil {\n\t\tensureReaderClosed(resp)\n\t\treturn nil, err\n\t}\n\tensureReaderClosed(resp)\n\n\tif !options.getAcceptAllPermissions() && options.getAcceptPermissionsFunc() != nil && len(privileges) > 0 {\n\t\taccept, err := options.getAcceptPermissionsFunc()(ctx, privileges)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !accept {\n\t\t\treturn nil, errors.New(\"permission denied while installing plugin \" + options.getRemoteRef())\n\t\t}\n\t}\n\treturn privileges, nil\n}\n\ntype pluginOptions interface {\n\tgetRegistryAuth() string\n\tsetRegistryAuth(string)\n\tgetPrivilegeFunc() func(context.Context) (string, error)\n\tgetAcceptAllPermissions() bool\n\tgetAcceptPermissionsFunc() func(context.Context, plugin.Privileges) (bool, error)\n\tgetRemoteRef() string\n}\n\nfunc (o *PluginInstallOptions) getRegistryAuth() string {\n\treturn o.RegistryAuth\n}\n\nfunc (o *PluginInstallOptions) setRegistryAuth(auth string) {\n\to.RegistryAuth = auth\n}\n\nfunc (o *PluginInstallOptions) getPrivilegeFunc() func(context.Context) (string, error) {\n\treturn o.PrivilegeFunc\n}\n\nfunc (o *PluginInstallOptions) getAcceptAllPermissions() bool {\n\treturn o.AcceptAllPermissions\n}\n\nfunc (o *PluginInstallOptions) getAcceptPermissionsFunc() func(context.Context, plugin.Privileges) (bool, error) {\n\treturn o.AcceptPermissionsFunc\n}\n\nfunc (o *PluginInstallOptions) getRemoteRef() string {\n\treturn o.RemoteRef\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/plugin\"\n)\n\n// PluginListOptions holds parameters to list plugins.\ntype PluginListOptions struct {\n\tFilters Filters\n}\n\n// PluginListResult represents the result of a plugin list operation.\ntype PluginListResult struct {\n\tItems []plugin.Plugin\n}\n\n// PluginList returns the installed plugins\nfunc (cli *Client) PluginList(ctx context.Context, options PluginListOptions) (PluginListResult, error) {\n\tquery := url.Values{}\n\n\toptions.Filters.updateURLValues(query)\n\tresp, err := cli.get(ctx, \"/plugins\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn PluginListResult{}, err\n\t}\n\n\tvar plugins plugin.ListResponse\n\terr = json.NewDecoder(resp.Body).Decode(&plugins)\n\treturn PluginListResult{Items: plugins}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_push.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// PluginPushOptions holds parameters to push a plugin.\ntype PluginPushOptions struct {\n\tRegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry\n}\n\n// PluginPushResult is the result of a plugin push operation\ntype PluginPushResult struct {\n\tio.ReadCloser\n}\n\n// PluginPush pushes a plugin to a registry\nfunc (cli *Client) PluginPush(ctx context.Context, name string, options PluginPushOptions) (PluginPushResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginPushResult{}, err\n\t}\n\tresp, err := cli.post(ctx, \"/plugins/\"+name+\"/push\", nil, nil, http.Header{\n\t\tregistry.AuthHeader: {options.RegistryAuth},\n\t})\n\tif err != nil {\n\t\treturn PluginPushResult{}, err\n\t}\n\treturn PluginPushResult{resp.Body}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// PluginRemoveOptions holds parameters to remove plugins.\ntype PluginRemoveOptions struct {\n\tForce bool\n}\n\n// PluginRemoveResult represents the result of a plugin removal.\ntype PluginRemoveResult struct {\n\t// Currently empty; can be extended in the future if needed.\n}\n\n// PluginRemove removes a plugin\nfunc (cli *Client) PluginRemove(ctx context.Context, name string, options PluginRemoveOptions) (PluginRemoveResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginRemoveResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\n\tresp, err := cli.delete(ctx, \"/plugins/\"+name, query, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn PluginRemoveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_set.go",
    "content": "package client\n\nimport (\n\t\"context\"\n)\n\n// PluginSetOptions defines options for modifying a plugin's settings.\ntype PluginSetOptions struct {\n\tArgs []string\n}\n\n// PluginSetResult represents the result of a plugin set operation.\ntype PluginSetResult struct {\n\t// Currently empty; can be extended in the future if needed.\n}\n\n// PluginSet modifies settings for an existing plugin\nfunc (cli *Client) PluginSet(ctx context.Context, name string, options PluginSetOptions) (PluginSetResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn PluginSetResult{}, err\n\t}\n\n\tresp, err := cli.post(ctx, \"/plugins/\"+name+\"/set\", nil, options.Args, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn PluginSetResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/plugin_upgrade.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/plugin\"\n\t\"github.com/moby/moby/api/types/registry\"\n)\n\n// PluginUpgradeOptions holds parameters to upgrade a plugin.\ntype PluginUpgradeOptions struct {\n\tDisabled             bool\n\tAcceptAllPermissions bool\n\tRegistryAuth         string // RegistryAuth is the base64 encoded credentials for the registry\n\tRemoteRef            string // RemoteRef is the plugin name on the registry\n\n\t// PrivilegeFunc is a function that clients can supply to retry operations\n\t// after getting an authorization error. This function returns the registry\n\t// authentication header value in base64 encoded format, or an error if the\n\t// privilege request fails.\n\t//\n\t// For details, refer to [github.com/moby/moby/api/types/registry.RequestAuthConfig].\n\tPrivilegeFunc         func(context.Context) (string, error)\n\tAcceptPermissionsFunc func(context.Context, plugin.Privileges) (bool, error)\n\tArgs                  []string\n}\n\n// PluginUpgradeResult holds the result of a plugin upgrade operation.\ntype PluginUpgradeResult io.ReadCloser\n\n// PluginUpgrade upgrades a plugin\nfunc (cli *Client) PluginUpgrade(ctx context.Context, name string, options PluginUpgradeOptions) (PluginUpgradeResult, error) {\n\tname, err := trimID(\"plugin\", name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := url.Values{}\n\tif _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid remote reference: %w\", err)\n\t}\n\tquery.Set(\"remote\", options.RemoteRef)\n\n\tprivileges, err := cli.checkPluginPermissions(ctx, query, &options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := cli.tryPluginUpgrade(ctx, query, privileges, name, options.RegistryAuth)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn resp.Body, nil\n}\n\nfunc (cli *Client) tryPluginUpgrade(ctx context.Context, query url.Values, privileges plugin.Privileges, name, registryAuth string) (*http.Response, error) {\n\treturn cli.post(ctx, \"/plugins/\"+name+\"/upgrade\", query, privileges, http.Header{\n\t\tregistry.AuthHeader: {registryAuth},\n\t})\n}\n\nfunc (o *PluginUpgradeOptions) getRegistryAuth() string {\n\treturn o.RegistryAuth\n}\n\nfunc (o *PluginUpgradeOptions) setRegistryAuth(auth string) {\n\to.RegistryAuth = auth\n}\n\nfunc (o *PluginUpgradeOptions) getPrivilegeFunc() func(context.Context) (string, error) {\n\treturn o.PrivilegeFunc\n}\n\nfunc (o *PluginUpgradeOptions) getAcceptAllPermissions() bool {\n\treturn o.AcceptAllPermissions\n}\n\nfunc (o *PluginUpgradeOptions) getAcceptPermissionsFunc() func(context.Context, plugin.Privileges) (bool, error) {\n\treturn o.AcceptPermissionsFunc\n}\n\nfunc (o *PluginUpgradeOptions) getRemoteRef() string {\n\treturn o.RemoteRef\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/request.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.com/moby/moby/api/types/common\"\n)\n\n// head sends an http request to the docker API using the method HEAD.\nfunc (cli *Client) head(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) {\n\treturn cli.sendRequest(ctx, http.MethodHead, path, query, nil, headers)\n}\n\n// get sends an http request to the docker API using the method GET with a specific Go context.\nfunc (cli *Client) get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) {\n\treturn cli.sendRequest(ctx, http.MethodGet, path, query, nil, headers)\n}\n\n// post sends an http POST request to the API.\nfunc (cli *Client) post(ctx context.Context, path string, query url.Values, body any, headers http.Header) (*http.Response, error) {\n\tjsonBody, headers, err := prepareJSONRequest(body, headers)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn cli.sendRequest(ctx, http.MethodPost, path, query, jsonBody, headers)\n}\n\nfunc (cli *Client) postRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) {\n\treturn cli.sendRequest(ctx, http.MethodPost, path, query, body, headers)\n}\n\nfunc (cli *Client) put(ctx context.Context, path string, query url.Values, body any, headers http.Header) (*http.Response, error) {\n\tjsonBody, headers, err := prepareJSONRequest(body, headers)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn cli.putRaw(ctx, path, query, jsonBody, headers)\n}\n\n// putRaw sends an http request to the docker API using the method PUT.\nfunc (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) {\n\t// PUT requests are expected to always have a body (apparently)\n\t// so explicitly pass an empty body to sendRequest to signal that\n\t// it should set the Content-Type header if not already present.\n\tif body == nil {\n\t\tbody = http.NoBody\n\t}\n\treturn cli.sendRequest(ctx, http.MethodPut, path, query, body, headers)\n}\n\n// delete sends an http request to the docker API using the method DELETE.\nfunc (cli *Client) delete(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) {\n\treturn cli.sendRequest(ctx, http.MethodDelete, path, query, nil, headers)\n}\n\n// prepareJSONRequest encodes the given body to JSON and returns it as an [io.Reader], and sets the Content-Type\n// header. If body is nil, or a nil-interface, a \"nil\" body is returned without\n// error.\nfunc prepareJSONRequest(body any, headers http.Header) (io.Reader, http.Header, error) {\n\tjsonBody, err := jsonEncode(body)\n\tif err != nil {\n\t\treturn nil, headers, err\n\t}\n\tif jsonBody == nil || jsonBody == http.NoBody {\n\t\t// no content-type is set on empty requests.\n\t\treturn jsonBody, headers, nil\n\t}\n\n\thdr := http.Header{}\n\tif headers != nil {\n\t\thdr = headers.Clone()\n\t}\n\n\t// TODO(thaJeztah): should this return an error if a different Content-Type is already set?\n\thdr.Set(\"Content-Type\", \"application/json\")\n\treturn jsonBody, hdr, nil\n}\n\nfunc (cli *Client) buildRequest(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Request, error) {\n\treq, err := http.NewRequestWithContext(ctx, method, path, body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq = cli.addHeaders(req, headers)\n\treq.URL.Scheme = cli.scheme\n\treq.URL.Host = cli.addr\n\n\tif cli.proto == \"unix\" || cli.proto == \"npipe\" {\n\t\t// Override host header for non-tcp connections.\n\t\treq.Host = DummyHost\n\t}\n\n\treturn req, nil\n}\n\nfunc (cli *Client) sendRequest(ctx context.Context, method, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) {\n\treq, err := cli.buildRequest(ctx, method, cli.getAPIPath(ctx, path, query), body, headers)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := cli.doRequest(req)\n\tif err != nil {\n\t\t// Failed to connect or context error.\n\t\treturn resp, err\n\t}\n\n\t// Successfully made a request; return the response and handle any\n\t// API HTTP response errors.\n\treturn resp, checkResponseErr(resp)\n}\n\n// doRequest sends an HTTP request and returns an HTTP response. It is a\n// wrapper around [http.Client.Do] with extra handling to decorate errors.\n//\n// Otherwise, it behaves identical to [http.Client.Do]; an error is returned\n// when failing to make a connection, On error, any Response can be ignored.\n// A non-2xx status code doesn't cause an error.\nfunc (cli *Client) doRequest(req *http.Request) (*http.Response, error) {\n\tresp, err := cli.client.Do(req)\n\tif err == nil {\n\t\treturn resp, nil\n\t}\n\n\tif cli.scheme != \"https\" && strings.Contains(err.Error(), \"malformed HTTP response\") {\n\t\treturn nil, errConnectionFailed{fmt.Errorf(\"%w.\\n* Are you trying to connect to a TLS-enabled daemon without TLS?\", err)}\n\t}\n\n\tconst (\n\t\t// Go 1.25 /  TLS 1.3 may produce a generic \"handshake failure\"\n\t\t// whereas TLS 1.2 may produce a \"bad certificate\" TLS alert.\n\t\t// See https://github.com/golang/go/issues/56371\n\t\t//\n\t\t// > https://tip.golang.org/doc/go1.12#tls_1_3\n\t\t// >\n\t\t// > In TLS 1.3 the client is the last one to speak in the handshake, so if\n\t\t// > it causes an error to occur on the server, it will be returned on the\n\t\t// > client by the first Read, not by Handshake. For example, that will be\n\t\t// > the case if the server rejects the client certificate.\n\t\t//\n\t\t// https://github.com/golang/go/blob/go1.25.1/src/crypto/tls/alert.go#L71-L72\n\t\talertBadCertificate   = \"bad certificate\"   // go1.24 / TLS 1.2\n\t\talertHandshakeFailure = \"handshake failure\" // go1.25 / TLS 1.3\n\t)\n\n\t// TODO(thaJeztah): see if we can use errors.As for a [crypto/tls.AlertError] instead of bare string matching.\n\tif cli.scheme == \"https\" && (strings.Contains(err.Error(), alertHandshakeFailure) || strings.Contains(err.Error(), alertBadCertificate)) {\n\t\treturn nil, errConnectionFailed{fmt.Errorf(\"the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings: %w\", err)}\n\t}\n\n\t// Don't decorate context sentinel errors; users may be comparing to\n\t// them directly.\n\tif errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {\n\t\treturn nil, err\n\t}\n\n\tif errors.Is(err, os.ErrPermission) {\n\t\t// Don't include request errors (Get \"http://%2Fvar%2Frun%2Fdocker.sock/v1.51/version\"),\n\t\t// which are irrelevant if we weren't able to connect.\n\t\treturn nil, errConnectionFailed{fmt.Errorf(\"permission denied while trying to connect to the docker API at %v\", cli.host)}\n\t}\n\tif errors.Is(err, os.ErrNotExist) {\n\t\t// Unwrap the error to remove request errors (Get \"http://%2Fvar%2Frun%2Fdocker.sock/v1.51/version\"),\n\t\t// which are irrelevant if we weren't able to connect.\n\t\terr = errors.Unwrap(err)\n\t\treturn nil, errConnectionFailed{fmt.Errorf(\"failed to connect to the docker API at %v; check if the path is correct and if the daemon is running: %w\", cli.host, err)}\n\t}\n\tvar dnsErr *net.DNSError\n\tif errors.As(err, &dnsErr) {\n\t\treturn nil, errConnectionFailed{fmt.Errorf(\"failed to connect to the docker API at %v: %w\", cli.host, dnsErr)}\n\t}\n\n\tvar nErr net.Error\n\tif errors.As(err, &nErr) {\n\t\t// FIXME(thaJeztah): any net.Error should be considered a connection error (but we should include the original error)?\n\t\tif nErr.Timeout() {\n\t\t\treturn nil, connectionFailed(cli.host)\n\t\t}\n\t\tif strings.Contains(nErr.Error(), \"connection refused\") || strings.Contains(nErr.Error(), \"dial unix\") {\n\t\t\treturn nil, connectionFailed(cli.host)\n\t\t}\n\t}\n\n\t// Although there's not a strongly typed error for this in go-winio,\n\t// lots of people are using the default configuration for the docker\n\t// daemon on Windows where the daemon is listening on a named pipe\n\t// (\"//./pipe/docker_engine\"), and the client must be running elevated.\n\t//\n\t// Give users a clue rather than the not-overly useful message such as;\n\t//\n\t// \topen //./pipe/docker_engine: The system cannot find the file specified.\n\t//\n\t// Note we can't string compare \"The system cannot find the file specified\" as\n\t// this is localized; for example. in French the error would be;\n\t//\n\t//\topen //./pipe/docker_engine: Le fichier spécifié est introuvable.\n\tif strings.Contains(err.Error(), `open //./pipe/docker_engine`) {\n\t\t// Checks if client is running with elevated privileges\n\t\tif f, elevatedErr := os.Open(`\\\\.\\PHYSICALDRIVE0`); elevatedErr != nil {\n\t\t\terr = fmt.Errorf(\"in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: %w\", err)\n\t\t} else {\n\t\t\t_ = f.Close()\n\t\t\terr = fmt.Errorf(\"this error may indicate that the docker daemon is not running: %w\", err)\n\t\t}\n\t}\n\n\treturn nil, errConnectionFailed{fmt.Errorf(\"error during connect: %w\", err)}\n}\n\nfunc checkResponseErr(serverResp *http.Response) (retErr error) {\n\tif serverResp == nil {\n\t\treturn nil\n\t}\n\tif serverResp.StatusCode >= http.StatusOK && serverResp.StatusCode < http.StatusBadRequest {\n\t\treturn nil\n\t}\n\tdefer func() {\n\t\tretErr = httpErrorFromStatusCode(retErr, serverResp.StatusCode)\n\t}()\n\n\tvar body []byte\n\tvar err error\n\tvar reqURL string\n\tif serverResp.Request != nil {\n\t\treqURL = serverResp.Request.URL.String()\n\t}\n\tstatusMsg := serverResp.Status\n\tif statusMsg == \"\" {\n\t\tstatusMsg = http.StatusText(serverResp.StatusCode)\n\t}\n\tvar reqMethod string\n\tif serverResp.Request != nil {\n\t\treqMethod = serverResp.Request.Method\n\t}\n\tif serverResp.Body != nil && reqMethod != http.MethodHead {\n\t\tbodyMax := 1 * 1024 * 1024 // 1 MiB\n\t\tbodyR := &io.LimitedReader{\n\t\t\tR: serverResp.Body,\n\t\t\tN: int64(bodyMax),\n\t\t}\n\t\tbody, err = io.ReadAll(bodyR)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif bodyR.N == 0 {\n\t\t\tif reqURL != \"\" {\n\t\t\t\treturn fmt.Errorf(\"request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version\", statusMsg, bodyMax, reqURL)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"request returned %s with a message (> %d bytes); check if the server supports the requested API version\", statusMsg, bodyMax)\n\t\t}\n\t}\n\tif len(body) == 0 {\n\t\tif reqURL != \"\" {\n\t\t\treturn fmt.Errorf(\"request returned %s for API route and version %s, check if the server supports the requested API version\", statusMsg, reqURL)\n\t\t}\n\t\treturn fmt.Errorf(\"request returned %s; check if the server supports the requested API version\", statusMsg)\n\t}\n\n\tvar daemonErr error\n\tif serverResp.Header.Get(\"Content-Type\") == \"application/json\" {\n\t\tvar errorResponse common.ErrorResponse\n\t\tif err := json.Unmarshal(body, &errorResponse); err != nil {\n\t\t\treturn fmt.Errorf(\"error reading JSON: %w\", err)\n\t\t}\n\t\tif errorResponse.Message == \"\" {\n\t\t\t// Error-message is empty, which means that we successfully parsed the\n\t\t\t// JSON-response (no error produced), but it didn't contain an error\n\t\t\t// message. This could either be because the response was empty, or\n\t\t\t// the response was valid JSON, but not with the expected schema\n\t\t\t// ([common.ErrorResponse]).\n\t\t\t//\n\t\t\t// We cannot use \"strict\" JSON handling (json.NewDecoder with DisallowUnknownFields)\n\t\t\t// due to the API using an open schema (we must anticipate fields\n\t\t\t// being added to [common.ErrorResponse] in the future, and not\n\t\t\t// reject those responses.\n\t\t\t//\n\t\t\t// For these cases, we construct an error with the status-code\n\t\t\t// returned, but we could consider returning (a truncated version\n\t\t\t// of) the actual response as-is.\n\t\t\t//\n\t\t\t// TODO(thaJeztah): consider adding a log.Debug to allow clients to debug the actual response when enabling debug logging.\n\t\t\tdaemonErr = fmt.Errorf(`API returned a %d (%s) but provided no error-message`,\n\t\t\t\tserverResp.StatusCode,\n\t\t\t\thttp.StatusText(serverResp.StatusCode),\n\t\t\t)\n\t\t} else {\n\t\t\tdaemonErr = errors.New(strings.TrimSpace(errorResponse.Message))\n\t\t}\n\t} else {\n\t\t// Fall back to returning the response as-is for situations where a\n\t\t// plain text error is returned. This branch may also catch\n\t\t// situations where a proxy is involved, returning an HTML response.\n\t\tdaemonErr = errors.New(strings.TrimSpace(string(body)))\n\t}\n\treturn fmt.Errorf(\"Error response from daemon: %w\", daemonErr)\n}\n\nfunc (cli *Client) addHeaders(req *http.Request, headers http.Header) *http.Request {\n\t// Add CLI Config's HTTP Headers BEFORE we set the Docker headers\n\t// then the user can't change OUR headers\n\tfor k, v := range cli.customHTTPHeaders {\n\t\treq.Header.Set(k, v)\n\t}\n\n\tfor k, v := range headers {\n\t\treq.Header[http.CanonicalHeaderKey(k)] = v\n\t}\n\n\tif cli.userAgent != nil {\n\t\tif *cli.userAgent == \"\" {\n\t\t\treq.Header.Del(\"User-Agent\")\n\t\t} else {\n\t\t\treq.Header.Set(\"User-Agent\", *cli.userAgent)\n\t\t}\n\t}\n\treturn req\n}\n\nfunc jsonEncode(data any) (io.Reader, error) {\n\tswitch x := data.(type) {\n\tcase nil:\n\t\treturn http.NoBody, nil\n\tcase io.Reader:\n\t\t// http.NoBody or other readers\n\t\treturn x, nil\n\tcase json.RawMessage:\n\t\tif len(x) == 0 {\n\t\t\treturn http.NoBody, nil\n\t\t}\n\t\treturn bytes.NewReader(x), nil\n\t}\n\n\t// encoding/json encodes a nil pointer as the JSON document `null`,\n\t// irrespective of whether the type implements json.Marshaler or encoding.TextMarshaler.\n\t// That is almost certainly not what the caller intended as the request body.\n\tif v := reflect.ValueOf(data); v.Kind() == reflect.Ptr && v.IsNil() {\n\t\treturn http.NoBody, nil\n\t}\n\n\tb, err := json.Marshal(data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn bytes.NewReader(b), nil\n}\n\nfunc ensureReaderClosed(response *http.Response) {\n\tif response == nil || response.Body == nil {\n\t\treturn\n\t}\n\tif response.ContentLength == 0 || (response.Request != nil && response.Request.Method == http.MethodHead) {\n\t\t// No need to drain head requests or zero-length responses.\n\t\t_ = response.Body.Close()\n\t\treturn\n\t}\n\t// Drain up to 512 bytes and close the body to let the Transport reuse the connection\n\t// see https://github.com/google/go-github/pull/317/files#r57536827\n\t//\n\t// TODO(thaJeztah): see if this optimization is still needed, or already implemented in stdlib,\n\t//   and check if context-cancellation should handle this as well. If still needed, consider\n\t//   wrapping response.Body, or returning a \"closer()\" from [Client.sendRequest] and related\n\t//   methods.\n\t_, _ = io.CopyN(io.Discard, response.Body, 512)\n\t_ = response.Body.Close()\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/secret_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SecretCreateOptions holds options for creating a secret.\ntype SecretCreateOptions struct {\n\tSpec swarm.SecretSpec\n}\n\n// SecretCreateResult holds the result from the [Client.SecretCreate] method.\ntype SecretCreateResult struct {\n\tID string\n}\n\n// SecretCreate creates a new secret.\nfunc (cli *Client) SecretCreate(ctx context.Context, options SecretCreateOptions) (SecretCreateResult, error) {\n\tresp, err := cli.post(ctx, \"/secrets/create\", nil, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SecretCreateResult{}, err\n\t}\n\n\tvar out swarm.ConfigCreateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&out)\n\tif err != nil {\n\t\treturn SecretCreateResult{}, err\n\t}\n\treturn SecretCreateResult{ID: out.ID}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/secret_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SecretInspectOptions holds options for inspecting a secret.\ntype SecretInspectOptions struct {\n\t// Add future optional parameters here\n}\n\n// SecretInspectResult holds the result from the [Client.SecretInspect]. method.\ntype SecretInspectResult struct {\n\tSecret swarm.Secret\n\tRaw    json.RawMessage\n}\n\n// SecretInspect returns the secret information with raw data.\nfunc (cli *Client) SecretInspect(ctx context.Context, id string, options SecretInspectOptions) (SecretInspectResult, error) {\n\tid, err := trimID(\"secret\", id)\n\tif err != nil {\n\t\treturn SecretInspectResult{}, err\n\t}\n\tresp, err := cli.get(ctx, \"/secrets/\"+id, nil, nil)\n\tif err != nil {\n\t\treturn SecretInspectResult{}, err\n\t}\n\n\tvar out SecretInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Secret)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/secret_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SecretListOptions holds parameters to list secrets\ntype SecretListOptions struct {\n\tFilters Filters\n}\n\n// SecretListResult holds the result from the [client.SecretList] method.\ntype SecretListResult struct {\n\tItems []swarm.Secret\n}\n\n// SecretList returns the list of secrets.\nfunc (cli *Client) SecretList(ctx context.Context, options SecretListOptions) (SecretListResult, error) {\n\tquery := url.Values{}\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.get(ctx, \"/secrets\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SecretListResult{}, err\n\t}\n\n\tvar out SecretListResult\n\terr = json.NewDecoder(resp.Body).Decode(&out.Items)\n\tif err != nil {\n\t\treturn SecretListResult{}, err\n\t}\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/secret_remove.go",
    "content": "package client\n\nimport \"context\"\n\ntype SecretRemoveOptions struct {\n\t// Add future optional parameters here\n}\n\ntype SecretRemoveResult struct {\n\t// Add future fields here\n}\n\n// SecretRemove removes a secret.\nfunc (cli *Client) SecretRemove(ctx context.Context, id string, options SecretRemoveOptions) (SecretRemoveResult, error) {\n\tid, err := trimID(\"secret\", id)\n\tif err != nil {\n\t\treturn SecretRemoveResult{}, err\n\t}\n\tresp, err := cli.delete(ctx, \"/secrets/\"+id, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SecretRemoveResult{}, err\n\t}\n\treturn SecretRemoveResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/secret_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SecretUpdateOptions holds options for updating a secret.\ntype SecretUpdateOptions struct {\n\tVersion swarm.Version\n\tSpec    swarm.SecretSpec\n}\n\ntype SecretUpdateResult struct{}\n\n// SecretUpdate attempts to update a secret.\nfunc (cli *Client) SecretUpdate(ctx context.Context, id string, options SecretUpdateOptions) (SecretUpdateResult, error) {\n\tid, err := trimID(\"secret\", id)\n\tif err != nil {\n\t\treturn SecretUpdateResult{}, err\n\t}\n\tquery := url.Values{}\n\tquery.Set(\"version\", options.Version.String())\n\tresp, err := cli.post(ctx, \"/secrets/\"+id+\"/update\", query, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SecretUpdateResult{}, err\n\t}\n\treturn SecretUpdateResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/distribution/reference\"\n\t\"github.com/moby/moby/api/types/registry\"\n\t\"github.com/moby/moby/api/types/swarm\"\n\t\"github.com/opencontainers/go-digest\"\n)\n\n// ServiceCreateOptions contains the options to use when creating a service.\ntype ServiceCreateOptions struct {\n\tSpec swarm.ServiceSpec\n\n\t// EncodedRegistryAuth is the encoded registry authorization credentials to\n\t// use when updating the service.\n\t//\n\t// This field follows the format of the X-Registry-Auth header.\n\tEncodedRegistryAuth string\n\n\t// QueryRegistry indicates whether the service update requires\n\t// contacting a registry. A registry may be contacted to retrieve\n\t// the image digest and manifest, which in turn can be used to update\n\t// platform or other information about the service.\n\tQueryRegistry bool\n}\n\n// ServiceCreateResult represents the result of creating a service.\ntype ServiceCreateResult struct {\n\t// ID is the ID of the created service.\n\tID string\n\n\t// Warnings is a list of warnings that occurred during service creation.\n\tWarnings []string\n}\n\n// ServiceCreate creates a new service.\nfunc (cli *Client) ServiceCreate(ctx context.Context, options ServiceCreateOptions) (ServiceCreateResult, error) {\n\t// Make sure containerSpec is not nil when no runtime is set or the runtime is set to container\n\tif options.Spec.TaskTemplate.ContainerSpec == nil && (options.Spec.TaskTemplate.Runtime == \"\" || options.Spec.TaskTemplate.Runtime == swarm.RuntimeContainer) {\n\t\toptions.Spec.TaskTemplate.ContainerSpec = &swarm.ContainerSpec{}\n\t}\n\n\tif err := validateServiceSpec(options.Spec); err != nil {\n\t\treturn ServiceCreateResult{}, err\n\t}\n\n\t// ensure that the image is tagged\n\tvar warnings []string\n\tswitch {\n\tcase options.Spec.TaskTemplate.ContainerSpec != nil:\n\t\tif taggedImg := imageWithTagString(options.Spec.TaskTemplate.ContainerSpec.Image); taggedImg != \"\" {\n\t\t\toptions.Spec.TaskTemplate.ContainerSpec.Image = taggedImg\n\t\t}\n\t\tif options.QueryRegistry {\n\t\t\tif warning := resolveContainerSpecImage(ctx, cli, &options.Spec.TaskTemplate, options.EncodedRegistryAuth); warning != \"\" {\n\t\t\t\twarnings = append(warnings, warning)\n\t\t\t}\n\t\t}\n\tcase options.Spec.TaskTemplate.PluginSpec != nil:\n\t\tif taggedImg := imageWithTagString(options.Spec.TaskTemplate.PluginSpec.Remote); taggedImg != \"\" {\n\t\t\toptions.Spec.TaskTemplate.PluginSpec.Remote = taggedImg\n\t\t}\n\t\tif options.QueryRegistry {\n\t\t\tif warning := resolvePluginSpecRemote(ctx, cli, &options.Spec.TaskTemplate, options.EncodedRegistryAuth); warning != \"\" {\n\t\t\t\twarnings = append(warnings, warning)\n\t\t\t}\n\t\t}\n\t}\n\n\theaders := http.Header{}\n\tif options.EncodedRegistryAuth != \"\" {\n\t\theaders[registry.AuthHeader] = []string{options.EncodedRegistryAuth}\n\t}\n\tresp, err := cli.post(ctx, \"/services/create\", nil, options.Spec, headers)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ServiceCreateResult{}, err\n\t}\n\n\tvar response swarm.ServiceCreateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\twarnings = append(warnings, response.Warnings...)\n\n\treturn ServiceCreateResult{\n\t\tID:       response.ID,\n\t\tWarnings: warnings,\n\t}, err\n}\n\nfunc resolveContainerSpecImage(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string {\n\timg, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.ContainerSpec.Image, encodedAuth)\n\tif err != nil {\n\t\treturn digestWarning(taskSpec.ContainerSpec.Image)\n\t}\n\ttaskSpec.ContainerSpec.Image = img\n\tif len(imgPlatforms) > 0 {\n\t\tif taskSpec.Placement == nil {\n\t\t\ttaskSpec.Placement = &swarm.Placement{}\n\t\t}\n\t\ttaskSpec.Placement.Platforms = imgPlatforms\n\t}\n\treturn \"\"\n}\n\nfunc resolvePluginSpecRemote(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string {\n\timg, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.PluginSpec.Remote, encodedAuth)\n\tif err != nil {\n\t\treturn digestWarning(taskSpec.PluginSpec.Remote)\n\t}\n\ttaskSpec.PluginSpec.Remote = img\n\tif len(imgPlatforms) > 0 {\n\t\tif taskSpec.Placement == nil {\n\t\t\ttaskSpec.Placement = &swarm.Placement{}\n\t\t}\n\t\ttaskSpec.Placement.Platforms = imgPlatforms\n\t}\n\treturn \"\"\n}\n\nfunc imageDigestAndPlatforms(ctx context.Context, cli DistributionAPIClient, image, encodedAuth string) (string, []swarm.Platform, error) {\n\tdistributionInspect, err := cli.DistributionInspect(ctx, image, DistributionInspectOptions{\n\t\tEncodedRegistryAuth: encodedAuth,\n\t})\n\tvar platforms []swarm.Platform\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\timageWithDigest := imageWithDigestString(image, distributionInspect.Descriptor.Digest)\n\n\tif len(distributionInspect.Platforms) > 0 {\n\t\tplatforms = make([]swarm.Platform, 0, len(distributionInspect.Platforms))\n\t\tfor _, p := range distributionInspect.Platforms {\n\t\t\t// clear architecture field for arm. This is a temporary patch to address\n\t\t\t// https://github.com/docker/swarmkit/issues/2294. The issue is that while\n\t\t\t// image manifests report \"arm\" as the architecture, the node reports\n\t\t\t// something like \"armv7l\" (includes the variant), which causes arm images\n\t\t\t// to stop working with swarm mode. This patch removes the architecture\n\t\t\t// constraint for arm images to ensure tasks get scheduled.\n\t\t\tarch := p.Architecture\n\t\t\tif strings.ToLower(arch) == \"arm\" {\n\t\t\t\tarch = \"\"\n\t\t\t}\n\t\t\tplatforms = append(platforms, swarm.Platform{\n\t\t\t\tArchitecture: arch,\n\t\t\t\tOS:           p.OS,\n\t\t\t})\n\t\t}\n\t}\n\treturn imageWithDigest, platforms, err\n}\n\n// imageWithDigestString takes an image string and a digest, and updates\n// the image string if it didn't originally contain a digest. It returns\n// image unmodified in other situations.\nfunc imageWithDigestString(image string, dgst digest.Digest) string {\n\tnamedRef, err := reference.ParseNormalizedNamed(image)\n\tif err == nil {\n\t\tif _, hasDigest := namedRef.(reference.Digested); !hasDigest {\n\t\t\t// ensure that image gets a default tag if none is provided\n\t\t\timg, err := reference.WithDigest(namedRef, dgst)\n\t\t\tif err == nil {\n\t\t\t\treturn reference.FamiliarString(img)\n\t\t\t}\n\t\t}\n\t}\n\treturn image\n}\n\n// imageWithTagString takes an image string, and returns a tagged image\n// string, adding a 'latest' tag if one was not provided. It returns an\n// empty string if a canonical reference was provided\nfunc imageWithTagString(image string) string {\n\tnamedRef, err := reference.ParseNormalizedNamed(image)\n\tif err == nil {\n\t\treturn reference.FamiliarString(reference.TagNameOnly(namedRef))\n\t}\n\treturn \"\"\n}\n\n// digestWarning constructs a formatted warning string using the\n// image name that could not be pinned by digest. The formatting\n// is hardcoded, but could me made smarter in the future\nfunc digestWarning(image string) string {\n\treturn fmt.Sprintf(\"image %s could not be accessed on a registry to record\\nits digest. Each node will access %s independently,\\npossibly leading to different nodes running different\\nversions of the image.\\n\", image, image)\n}\n\nfunc validateServiceSpec(s swarm.ServiceSpec) error {\n\tif s.TaskTemplate.ContainerSpec != nil && s.TaskTemplate.PluginSpec != nil {\n\t\treturn errors.New(\"must not specify both a container spec and a plugin spec in the task template\")\n\t}\n\tif s.TaskTemplate.PluginSpec != nil && s.TaskTemplate.Runtime != swarm.RuntimePlugin {\n\t\treturn errors.New(\"mismatched runtime with plugin spec\")\n\t}\n\tif s.TaskTemplate.ContainerSpec != nil && (s.TaskTemplate.Runtime != \"\" && s.TaskTemplate.Runtime != swarm.RuntimeContainer) {\n\t\treturn errors.New(\"mismatched runtime with container spec\")\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ServiceInspectOptions holds parameters related to the service inspect operation.\ntype ServiceInspectOptions struct {\n\tInsertDefaults bool\n}\n\n// ServiceInspectResult represents the result of a service inspect operation.\ntype ServiceInspectResult struct {\n\tService swarm.Service\n\tRaw     json.RawMessage\n}\n\n// ServiceInspect retrieves detailed information about a specific service by its ID.\nfunc (cli *Client) ServiceInspect(ctx context.Context, serviceID string, options ServiceInspectOptions) (ServiceInspectResult, error) {\n\tserviceID, err := trimID(\"service\", serviceID)\n\tif err != nil {\n\t\treturn ServiceInspectResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"insertDefaults\", fmt.Sprintf(\"%v\", options.InsertDefaults))\n\tresp, err := cli.get(ctx, \"/services/\"+serviceID, query, nil)\n\tif err != nil {\n\t\treturn ServiceInspectResult{}, err\n\t}\n\n\tvar out ServiceInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Service)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ServiceListOptions holds parameters to list services with.\ntype ServiceListOptions struct {\n\tFilters Filters\n\n\t// Status indicates whether the server should include the service task\n\t// count of running and desired tasks.\n\tStatus bool\n}\n\n// ServiceListResult represents the result of a service list operation.\ntype ServiceListResult struct {\n\tItems []swarm.Service\n}\n\n// ServiceList returns the list of services.\nfunc (cli *Client) ServiceList(ctx context.Context, options ServiceListOptions) (ServiceListResult, error) {\n\tquery := url.Values{}\n\n\toptions.Filters.updateURLValues(query)\n\n\tif options.Status {\n\t\tquery.Set(\"status\", \"true\")\n\t}\n\n\tresp, err := cli.get(ctx, \"/services\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ServiceListResult{}, err\n\t}\n\n\tvar services []swarm.Service\n\terr = json.NewDecoder(resp.Body).Decode(&services)\n\treturn ServiceListResult{Items: services}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_logs.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/moby/moby/client/internal/timestamp\"\n)\n\n// ServiceLogsOptions holds parameters to filter logs with.\ntype ServiceLogsOptions struct {\n\tShowStdout bool\n\tShowStderr bool\n\tSince      string\n\tUntil      string\n\tTimestamps bool\n\tFollow     bool\n\tTail       string\n\tDetails    bool\n}\n\n// ServiceLogsResult holds the result of a service logs operation.\n// It implements [io.ReadCloser].\n// It's up to the caller to close the stream.\ntype ServiceLogsResult interface {\n\tio.ReadCloser\n}\n\n// ServiceLogs returns the logs generated by a service in a [ServiceLogsResult].\n// as an [io.ReadCloser]. Callers should close the stream.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options ServiceLogsOptions) (ServiceLogsResult, error) {\n\t// TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs)\n\t// TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348\n\n\tserviceID, err := trimID(\"service\", serviceID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := url.Values{}\n\tif options.ShowStdout {\n\t\tquery.Set(\"stdout\", \"1\")\n\t}\n\n\tif options.ShowStderr {\n\t\tquery.Set(\"stderr\", \"1\")\n\t}\n\n\tif options.Since != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Since, time.Now())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(`invalid value for \"since\": %w`, err)\n\t\t}\n\t\tquery.Set(\"since\", ts)\n\t}\n\n\tif options.Timestamps {\n\t\tquery.Set(\"timestamps\", \"1\")\n\t}\n\n\tif options.Details {\n\t\tquery.Set(\"details\", \"1\")\n\t}\n\n\tif options.Follow {\n\t\tquery.Set(\"follow\", \"1\")\n\t}\n\tswitch options.Tail {\n\tcase \"\", \"all\":\n\t\t// don't send option; default is to show all logs.\n\t\t//\n\t\t// The default on the daemon-side is to show all logs; account for\n\t\t// some special values. The CLI may set a magic \"all\" value that's\n\t\t// used as default.\n\t\t//\n\t\t// Given that the default is to show all logs, we can ignore these\n\t\t// values, and don't send \"tail\".\n\t\t//\n\t\t// see https://github.com/moby/moby/blob/0df791cb72b568eeadba2267fe9a5040d12b0487/daemon/logs.go#L75-L78\n\t\t// see https://github.com/moby/moby/blob/4d20b6fe56dfb2b06f4a5dd1f32913215a9c317b/daemon/cluster/services.go#L425-L449\n\tdefault:\n\t\tquery.Set(\"tail\", options.Tail)\n\t}\n\n\tresp, err := cli.get(ctx, \"/services/\"+serviceID+\"/logs\", query, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &serviceLogsResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\ntype serviceLogsResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser     = (*serviceLogsResult)(nil)\n\t_ ServiceLogsResult = (*serviceLogsResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_remove.go",
    "content": "package client\n\nimport \"context\"\n\n// ServiceRemoveOptions contains options for removing a service.\ntype ServiceRemoveOptions struct {\n\t// No options currently; placeholder for future use\n}\n\n// ServiceRemoveResult contains the result of removing a service.\ntype ServiceRemoveResult struct {\n\t// No fields currently; placeholder for future use\n}\n\n// ServiceRemove kills and removes a service.\nfunc (cli *Client) ServiceRemove(ctx context.Context, serviceID string, options ServiceRemoveOptions) (ServiceRemoveResult, error) {\n\tserviceID, err := trimID(\"service\", serviceID)\n\tif err != nil {\n\t\treturn ServiceRemoveResult{}, err\n\t}\n\n\tresp, err := cli.delete(ctx, \"/services/\"+serviceID, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn ServiceRemoveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/service_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/registry\"\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// ServiceUpdateOptions contains the options to be used for updating services.\ntype ServiceUpdateOptions struct {\n\tVersion swarm.Version\n\tSpec    swarm.ServiceSpec\n\n\t// EncodedRegistryAuth is the encoded registry authorization credentials to\n\t// use when updating the service.\n\t//\n\t// This field follows the format of the X-Registry-Auth header.\n\tEncodedRegistryAuth string\n\n\t// TODO(stevvooe): Consider moving the version parameter of ServiceUpdate\n\t// into this field. While it does open API users up to racy writes, most\n\t// users may not need that level of consistency in practice.\n\n\t// RegistryAuthFrom specifies where to find the registry authorization\n\t// credentials if they are not given in EncodedRegistryAuth. Valid\n\t// values are \"spec\" and \"previous-spec\".\n\tRegistryAuthFrom swarm.RegistryAuthSource\n\n\t// Rollback indicates whether a server-side rollback should be\n\t// performed. When this is set, the provided spec will be ignored.\n\t// The valid values are \"previous\" and \"none\". An empty value is the\n\t// same as \"none\".\n\tRollback string\n\n\t// QueryRegistry indicates whether the service update requires\n\t// contacting a registry. A registry may be contacted to retrieve\n\t// the image digest and manifest, which in turn can be used to update\n\t// platform or other information about the service.\n\tQueryRegistry bool\n}\n\n// ServiceUpdateResult represents the result of a service update.\ntype ServiceUpdateResult struct {\n\t// Warnings contains any warnings that occurred during the update.\n\tWarnings []string\n}\n\n// ServiceUpdate updates a Service. The version number is required to avoid\n// conflicting writes. It must be the value as set *before* the update.\n// You can find this value in the [swarm.Service.Meta] field, which can\n// be found using [Client.ServiceInspectWithRaw].\nfunc (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, options ServiceUpdateOptions) (ServiceUpdateResult, error) {\n\tserviceID, err := trimID(\"service\", serviceID)\n\tif err != nil {\n\t\treturn ServiceUpdateResult{}, err\n\t}\n\n\tif err := validateServiceSpec(options.Spec); err != nil {\n\t\treturn ServiceUpdateResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.RegistryAuthFrom != \"\" {\n\t\tquery.Set(\"registryAuthFrom\", string(options.RegistryAuthFrom))\n\t}\n\n\tif options.Rollback != \"\" {\n\t\tquery.Set(\"rollback\", options.Rollback)\n\t}\n\n\tquery.Set(\"version\", options.Version.String())\n\n\t// ensure that the image is tagged\n\tvar warnings []string\n\tswitch {\n\tcase options.Spec.TaskTemplate.ContainerSpec != nil:\n\t\tif taggedImg := imageWithTagString(options.Spec.TaskTemplate.ContainerSpec.Image); taggedImg != \"\" {\n\t\t\toptions.Spec.TaskTemplate.ContainerSpec.Image = taggedImg\n\t\t}\n\t\tif options.QueryRegistry {\n\t\t\tif warning := resolveContainerSpecImage(ctx, cli, &options.Spec.TaskTemplate, options.EncodedRegistryAuth); warning != \"\" {\n\t\t\t\twarnings = append(warnings, warning)\n\t\t\t}\n\t\t}\n\tcase options.Spec.TaskTemplate.PluginSpec != nil:\n\t\tif taggedImg := imageWithTagString(options.Spec.TaskTemplate.PluginSpec.Remote); taggedImg != \"\" {\n\t\t\toptions.Spec.TaskTemplate.PluginSpec.Remote = taggedImg\n\t\t}\n\t\tif options.QueryRegistry {\n\t\t\tif warning := resolvePluginSpecRemote(ctx, cli, &options.Spec.TaskTemplate, options.EncodedRegistryAuth); warning != \"\" {\n\t\t\t\twarnings = append(warnings, warning)\n\t\t\t}\n\t\t}\n\t}\n\n\theaders := http.Header{}\n\tif options.EncodedRegistryAuth != \"\" {\n\t\theaders.Set(registry.AuthHeader, options.EncodedRegistryAuth)\n\t}\n\tresp, err := cli.post(ctx, \"/services/\"+serviceID+\"/update\", query, options.Spec, headers)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ServiceUpdateResult{}, err\n\t}\n\n\tvar response swarm.ServiceUpdateResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\twarnings = append(warnings, response.Warnings...)\n\treturn ServiceUpdateResult{Warnings: warnings}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_get_unlock_key.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmGetUnlockKeyResult contains the swarm unlock key.\ntype SwarmGetUnlockKeyResult struct {\n\tKey string\n}\n\n// SwarmGetUnlockKey retrieves the swarm's unlock key.\nfunc (cli *Client) SwarmGetUnlockKey(ctx context.Context) (SwarmGetUnlockKeyResult, error) {\n\tresp, err := cli.get(ctx, \"/swarm/unlockkey\", nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SwarmGetUnlockKeyResult{}, err\n\t}\n\n\tvar response swarm.UnlockKeyResponse\n\terr = json.NewDecoder(resp.Body).Decode(&response)\n\treturn SwarmGetUnlockKeyResult{Key: response.UnlockKey}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_init.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/netip\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmInitOptions contains options for initializing a new swarm.\ntype SwarmInitOptions struct {\n\tListenAddr       string\n\tAdvertiseAddr    string\n\tDataPathAddr     string\n\tDataPathPort     uint32\n\tForceNewCluster  bool\n\tSpec             swarm.Spec\n\tAutoLockManagers bool\n\tAvailability     swarm.NodeAvailability\n\tDefaultAddrPool  []netip.Prefix\n\tSubnetSize       uint32\n}\n\n// SwarmInitResult contains the result of a SwarmInit operation.\ntype SwarmInitResult struct {\n\tNodeID string\n}\n\n// SwarmInit initializes the swarm.\nfunc (cli *Client) SwarmInit(ctx context.Context, options SwarmInitOptions) (SwarmInitResult, error) {\n\treq := swarm.InitRequest{\n\t\tListenAddr:       options.ListenAddr,\n\t\tAdvertiseAddr:    options.AdvertiseAddr,\n\t\tDataPathAddr:     options.DataPathAddr,\n\t\tDataPathPort:     options.DataPathPort,\n\t\tForceNewCluster:  options.ForceNewCluster,\n\t\tSpec:             options.Spec,\n\t\tAutoLockManagers: options.AutoLockManagers,\n\t\tAvailability:     options.Availability,\n\t\tDefaultAddrPool:  options.DefaultAddrPool,\n\t\tSubnetSize:       options.SubnetSize,\n\t}\n\n\tresp, err := cli.post(ctx, \"/swarm/init\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SwarmInitResult{}, err\n\t}\n\n\tvar nodeID string\n\terr = json.NewDecoder(resp.Body).Decode(&nodeID)\n\treturn SwarmInitResult{NodeID: nodeID}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmInspectOptions holds options for inspecting a swarm.\ntype SwarmInspectOptions struct {\n\t// Add future optional parameters here\n}\n\n// SwarmInspectResult represents the result of a SwarmInspect operation.\ntype SwarmInspectResult struct {\n\tSwarm swarm.Swarm\n}\n\n// SwarmInspect inspects the swarm.\nfunc (cli *Client) SwarmInspect(ctx context.Context, options SwarmInspectOptions) (SwarmInspectResult, error) {\n\tresp, err := cli.get(ctx, \"/swarm\", nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SwarmInspectResult{}, err\n\t}\n\n\tvar s swarm.Swarm\n\terr = json.NewDecoder(resp.Body).Decode(&s)\n\treturn SwarmInspectResult{Swarm: s}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_join.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmJoinOptions specifies options for joining a swarm.\ntype SwarmJoinOptions struct {\n\tListenAddr    string\n\tAdvertiseAddr string\n\tDataPathAddr  string\n\tRemoteAddrs   []string\n\tJoinToken     string // accept by secret\n\tAvailability  swarm.NodeAvailability\n}\n\n// SwarmJoinResult contains the result of joining a swarm.\ntype SwarmJoinResult struct {\n\t// No fields currently; placeholder for future use\n}\n\n// SwarmJoin joins the swarm.\nfunc (cli *Client) SwarmJoin(ctx context.Context, options SwarmJoinOptions) (SwarmJoinResult, error) {\n\treq := swarm.JoinRequest{\n\t\tListenAddr:    options.ListenAddr,\n\t\tAdvertiseAddr: options.AdvertiseAddr,\n\t\tDataPathAddr:  options.DataPathAddr,\n\t\tRemoteAddrs:   options.RemoteAddrs,\n\t\tJoinToken:     options.JoinToken,\n\t\tAvailability:  options.Availability,\n\t}\n\n\tresp, err := cli.post(ctx, \"/swarm/join\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn SwarmJoinResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_leave.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// SwarmLeaveOptions contains options for leaving a swarm.\ntype SwarmLeaveOptions struct {\n\tForce bool\n}\n\n// SwarmLeaveResult represents the result of a SwarmLeave operation.\ntype SwarmLeaveResult struct{}\n\n// SwarmLeave leaves the swarm.\nfunc (cli *Client) SwarmLeave(ctx context.Context, options SwarmLeaveOptions) (SwarmLeaveResult, error) {\n\tquery := url.Values{}\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\tresp, err := cli.post(ctx, \"/swarm/leave\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn SwarmLeaveResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_unlock.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmUnlockOptions specifies options for unlocking a swarm.\ntype SwarmUnlockOptions struct {\n\tKey string\n}\n\n// SwarmUnlockResult represents the result of unlocking a swarm.\ntype SwarmUnlockResult struct{}\n\n// SwarmUnlock unlocks locked swarm.\nfunc (cli *Client) SwarmUnlock(ctx context.Context, options SwarmUnlockOptions) (SwarmUnlockResult, error) {\n\treq := &swarm.UnlockRequest{\n\t\tUnlockKey: options.Key,\n\t}\n\tresp, err := cli.post(ctx, \"/swarm/unlock\", nil, req, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn SwarmUnlockResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/swarm_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\t\"strconv\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// SwarmUpdateOptions contains options for updating a swarm.\ntype SwarmUpdateOptions struct {\n\tVersion                swarm.Version\n\tSpec                   swarm.Spec\n\tRotateWorkerToken      bool\n\tRotateManagerToken     bool\n\tRotateManagerUnlockKey bool\n}\n\n// SwarmUpdateResult represents the result of a SwarmUpdate operation.\ntype SwarmUpdateResult struct{}\n\n// SwarmUpdate updates the swarm.\nfunc (cli *Client) SwarmUpdate(ctx context.Context, options SwarmUpdateOptions) (SwarmUpdateResult, error) {\n\tquery := url.Values{}\n\tquery.Set(\"version\", options.Version.String())\n\tquery.Set(\"rotateWorkerToken\", strconv.FormatBool(options.RotateWorkerToken))\n\tquery.Set(\"rotateManagerToken\", strconv.FormatBool(options.RotateManagerToken))\n\tquery.Set(\"rotateManagerUnlockKey\", strconv.FormatBool(options.RotateManagerUnlockKey))\n\tresp, err := cli.post(ctx, \"/swarm/update\", query, options.Spec, nil)\n\tdefer ensureReaderClosed(resp)\n\treturn SwarmUpdateResult{}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/system_disk_usage.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"slices\"\n\n\t\"github.com/moby/moby/api/types/build\"\n\t\"github.com/moby/moby/api/types/container\"\n\t\"github.com/moby/moby/api/types/image\"\n\t\"github.com/moby/moby/api/types/system\"\n\t\"github.com/moby/moby/api/types/volume\"\n\t\"github.com/moby/moby/client/pkg/versions\"\n)\n\n// DiskUsageOptions holds parameters for [Client.DiskUsage] operations.\ntype DiskUsageOptions struct {\n\t// Containers controls whether container disk usage should be computed.\n\tContainers bool\n\n\t// Images controls whether image disk usage should be computed.\n\tImages bool\n\n\t// BuildCache controls whether build cache disk usage should be computed.\n\tBuildCache bool\n\n\t// Volumes controls whether volume disk usage should be computed.\n\tVolumes bool\n\n\t// Verbose enables more detailed disk usage information.\n\tVerbose bool\n}\n\n// DiskUsageResult is the result of [Client.DiskUsage] operations.\ntype DiskUsageResult struct {\n\t// Containers holds container disk usage information.\n\tContainers ContainersDiskUsage\n\n\t// Images holds image disk usage information.\n\tImages ImagesDiskUsage\n\n\t// BuildCache holds build cache disk usage information.\n\tBuildCache BuildCacheDiskUsage\n\n\t// Volumes holds volume disk usage information.\n\tVolumes VolumesDiskUsage\n}\n\n// ContainersDiskUsage contains disk usage information for containers.\ntype ContainersDiskUsage struct {\n\t// ActiveCount is the number of active containers.\n\tActiveCount int64\n\n\t// TotalCount is the total number of containers.\n\tTotalCount int64\n\n\t// Reclaimable is the amount of disk space that can be reclaimed.\n\tReclaimable int64\n\n\t// TotalSize is the total disk space used by all containers.\n\tTotalSize int64\n\n\t// Items holds detailed information about each container.\n\tItems []container.Summary\n}\n\n// ImagesDiskUsage contains disk usage information for images.\ntype ImagesDiskUsage struct {\n\t// ActiveCount is the number of active images.\n\tActiveCount int64\n\n\t// TotalCount is the total number of images.\n\tTotalCount int64\n\n\t// Reclaimable is the amount of disk space that can be reclaimed.\n\tReclaimable int64\n\n\t// TotalSize is the total disk space used by all images.\n\tTotalSize int64\n\n\t// Items holds detailed information about each image.\n\tItems []image.Summary\n}\n\n// VolumesDiskUsage contains disk usage information for volumes.\ntype VolumesDiskUsage struct {\n\t// ActiveCount is the number of active volumes.\n\tActiveCount int64\n\n\t// TotalCount is the total number of volumes.\n\tTotalCount int64\n\n\t// Reclaimable is the amount of disk space that can be reclaimed.\n\tReclaimable int64\n\n\t// TotalSize is the total disk space used by all volumes.\n\tTotalSize int64\n\n\t// Items holds detailed information about each volume.\n\tItems []volume.Volume\n}\n\n// BuildCacheDiskUsage contains disk usage information for build cache.\ntype BuildCacheDiskUsage struct {\n\t// ActiveCount is the number of active build cache records.\n\tActiveCount int64\n\n\t// TotalCount is the total number of build cache records.\n\tTotalCount int64\n\n\t// Reclaimable is the amount of disk space that can be reclaimed.\n\tReclaimable int64\n\n\t// TotalSize is the total disk space used by all build cache records.\n\tTotalSize int64\n\n\t// Items holds detailed information about each build cache record.\n\tItems []build.CacheRecord\n}\n\n// DiskUsage requests the current data usage from the daemon.\nfunc (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (DiskUsageResult, error) {\n\tquery := url.Values{}\n\n\tfor _, t := range []struct {\n\t\tflag   bool\n\t\tsysObj system.DiskUsageObject\n\t}{\n\t\t{options.Containers, system.ContainerObject},\n\t\t{options.Images, system.ImageObject},\n\t\t{options.Volumes, system.VolumeObject},\n\t\t{options.BuildCache, system.BuildCacheObject},\n\t} {\n\t\tif t.flag {\n\t\t\tquery.Add(\"type\", string(t.sysObj))\n\t\t}\n\t}\n\n\tif options.Verbose {\n\t\tquery.Set(\"verbose\", \"1\")\n\t}\n\n\tresp, err := cli.get(ctx, \"/system/df\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn DiskUsageResult{}, err\n\t}\n\n\tif versions.LessThan(cli.version, \"1.52\") {\n\t\t// Generate result from a legacy response.\n\t\tvar du legacyDiskUsage\n\t\tif err := json.NewDecoder(resp.Body).Decode(&du); err != nil {\n\t\t\treturn DiskUsageResult{}, fmt.Errorf(\"retrieving disk usage: %v\", err)\n\t\t}\n\n\t\treturn diskUsageResultFromLegacyAPI(&du), nil\n\t}\n\n\tvar du system.DiskUsage\n\tif err := json.NewDecoder(resp.Body).Decode(&du); err != nil {\n\t\treturn DiskUsageResult{}, fmt.Errorf(\"retrieving disk usage: %v\", err)\n\t}\n\n\tvar r DiskUsageResult\n\tif idu := du.ImageUsage; idu != nil {\n\t\tr.Images = ImagesDiskUsage{\n\t\t\tActiveCount: idu.ActiveCount,\n\t\t\tReclaimable: idu.Reclaimable,\n\t\t\tTotalCount:  idu.TotalCount,\n\t\t\tTotalSize:   idu.TotalSize,\n\t\t}\n\n\t\tif options.Verbose {\n\t\t\tr.Images.Items = slices.Clone(idu.Items)\n\t\t}\n\t}\n\n\tif cdu := du.ContainerUsage; cdu != nil {\n\t\tr.Containers = ContainersDiskUsage{\n\t\t\tActiveCount: cdu.ActiveCount,\n\t\t\tReclaimable: cdu.Reclaimable,\n\t\t\tTotalCount:  cdu.TotalCount,\n\t\t\tTotalSize:   cdu.TotalSize,\n\t\t}\n\n\t\tif options.Verbose {\n\t\t\tr.Containers.Items = slices.Clone(cdu.Items)\n\t\t}\n\t}\n\n\tif bdu := du.BuildCacheUsage; bdu != nil {\n\t\tr.BuildCache = BuildCacheDiskUsage{\n\t\t\tActiveCount: bdu.ActiveCount,\n\t\t\tReclaimable: bdu.Reclaimable,\n\t\t\tTotalCount:  bdu.TotalCount,\n\t\t\tTotalSize:   bdu.TotalSize,\n\t\t}\n\n\t\tif options.Verbose {\n\t\t\tr.BuildCache.Items = slices.Clone(bdu.Items)\n\t\t}\n\t}\n\n\tif vdu := du.VolumeUsage; vdu != nil {\n\t\tr.Volumes = VolumesDiskUsage{\n\t\t\tActiveCount: vdu.ActiveCount,\n\t\t\tReclaimable: vdu.Reclaimable,\n\t\t\tTotalCount:  vdu.TotalCount,\n\t\t\tTotalSize:   vdu.TotalSize,\n\t\t}\n\n\t\tif options.Verbose {\n\t\t\tr.Volumes.Items = slices.Clone(vdu.Items)\n\t\t}\n\t}\n\n\treturn r, nil\n}\n\n// legacyDiskUsage is the response as was used by API < v1.52.\ntype legacyDiskUsage struct {\n\tLayersSize int64               `json:\"LayersSize,omitempty\"`\n\tImages     []image.Summary     `json:\"Images,omitzero\"`\n\tContainers []container.Summary `json:\"Containers,omitzero\"`\n\tVolumes    []volume.Volume     `json:\"Volumes,omitzero\"`\n\tBuildCache []build.CacheRecord `json:\"BuildCache,omitzero\"`\n}\n\nfunc diskUsageResultFromLegacyAPI(du *legacyDiskUsage) DiskUsageResult {\n\treturn DiskUsageResult{\n\t\tImages:     imageDiskUsageFromLegacyAPI(du),\n\t\tContainers: containerDiskUsageFromLegacyAPI(du),\n\t\tBuildCache: buildCacheDiskUsageFromLegacyAPI(du),\n\t\tVolumes:    volumeDiskUsageFromLegacyAPI(du),\n\t}\n}\n\nfunc imageDiskUsageFromLegacyAPI(du *legacyDiskUsage) ImagesDiskUsage {\n\tidu := ImagesDiskUsage{\n\t\tTotalSize:  du.LayersSize,\n\t\tTotalCount: int64(len(du.Images)),\n\t\tItems:      du.Images,\n\t}\n\n\tvar used int64\n\tfor _, i := range idu.Items {\n\t\tif i.Containers > 0 {\n\t\t\tidu.ActiveCount++\n\n\t\t\tif i.Size == -1 || i.SharedSize == -1 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tused += (i.Size - i.SharedSize)\n\t\t}\n\t}\n\n\tif idu.TotalCount > 0 {\n\t\tidu.Reclaimable = idu.TotalSize - used\n\t}\n\n\treturn idu\n}\n\nfunc containerDiskUsageFromLegacyAPI(du *legacyDiskUsage) ContainersDiskUsage {\n\tcdu := ContainersDiskUsage{\n\t\tTotalCount: int64(len(du.Containers)),\n\t\tItems:      du.Containers,\n\t}\n\n\tvar used int64\n\tfor _, c := range cdu.Items {\n\t\tcdu.TotalSize += c.SizeRw\n\t\tswitch c.State {\n\t\tcase container.StateRunning, container.StatePaused, container.StateRestarting:\n\t\t\tcdu.ActiveCount++\n\t\t\tused += c.SizeRw\n\t\tcase container.StateCreated, container.StateRemoving, container.StateExited, container.StateDead:\n\t\t\t// not active\n\t\t}\n\t}\n\n\tcdu.Reclaimable = cdu.TotalSize - used\n\treturn cdu\n}\n\nfunc buildCacheDiskUsageFromLegacyAPI(du *legacyDiskUsage) BuildCacheDiskUsage {\n\tbdu := BuildCacheDiskUsage{\n\t\tTotalCount: int64(len(du.BuildCache)),\n\t\tItems:      du.BuildCache,\n\t}\n\n\tvar used int64\n\tfor _, b := range du.BuildCache {\n\t\tif !b.Shared {\n\t\t\tbdu.TotalSize += b.Size\n\t\t}\n\n\t\tif b.InUse {\n\t\t\tbdu.ActiveCount++\n\t\t\tif !b.Shared {\n\t\t\t\tused += b.Size\n\t\t\t}\n\t\t}\n\t}\n\n\tbdu.Reclaimable = bdu.TotalSize - used\n\treturn bdu\n}\n\nfunc volumeDiskUsageFromLegacyAPI(du *legacyDiskUsage) VolumesDiskUsage {\n\tvdu := VolumesDiskUsage{\n\t\tTotalCount: int64(len(du.Volumes)),\n\t\tItems:      du.Volumes,\n\t}\n\n\tvar used int64\n\tfor _, v := range vdu.Items {\n\t\t// Ignore volumes with no usage data\n\t\tif v.UsageData != nil {\n\t\t\tif v.UsageData.RefCount > 0 {\n\t\t\t\tvdu.ActiveCount++\n\t\t\t\tused += v.UsageData.Size\n\t\t\t}\n\t\t\tif v.UsageData.Size > 0 {\n\t\t\t\tvdu.TotalSize += v.UsageData.Size\n\t\t\t}\n\t\t}\n\t}\n\n\tvdu.Reclaimable = vdu.TotalSize - used\n\treturn vdu\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/system_events.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/moby/moby/api/types\"\n\t\"github.com/moby/moby/api/types/events\"\n\t\"github.com/moby/moby/client/internal\"\n\t\"github.com/moby/moby/client/internal/timestamp\"\n)\n\n// EventsListOptions holds parameters to filter events with.\ntype EventsListOptions struct {\n\tSince   string\n\tUntil   string\n\tFilters Filters\n}\n\n// EventsResult holds the result of an Events query.\ntype EventsResult struct {\n\tMessages <-chan events.Message\n\tErr      <-chan error\n}\n\n// Events returns a stream of events in the daemon. It's up to the caller to close the stream\n// by cancelling the context. Once the stream has been completely read an [io.EOF] error is\n// sent over the error channel. If an error is sent, all processing is stopped. It's up\n// to the caller to reopen the stream in the event of an error by reinvoking this method.\nfunc (cli *Client) Events(ctx context.Context, options EventsListOptions) EventsResult {\n\tmessages := make(chan events.Message)\n\terrs := make(chan error, 1)\n\n\tstarted := make(chan struct{})\n\tgo func() {\n\t\tdefer close(errs)\n\n\t\tquery, err := buildEventsQueryParams(options)\n\t\tif err != nil {\n\t\t\tclose(started)\n\t\t\terrs <- err\n\t\t\treturn\n\t\t}\n\n\t\theaders := http.Header{}\n\t\theaders.Add(\"Accept\", types.MediaTypeJSONLines) // Implicit q=1.0; in case server doesn't parse correctly.\n\t\theaders.Add(\"Accept\", types.MediaTypeNDJSON+\";q=0.9\")\n\t\theaders.Add(\"Accept\", types.MediaTypeJSONSequence+\";q=0.5\")\n\t\tresp, err := cli.get(ctx, \"/events\", query, headers)\n\t\tif err != nil {\n\t\t\tclose(started)\n\t\t\terrs <- err\n\t\t\treturn\n\t\t}\n\t\tdefer resp.Body.Close()\n\n\t\tcontentType := resp.Header.Get(\"Content-Type\")\n\t\tdecoder := internal.NewJSONStreamDecoder(resp.Body, contentType)\n\n\t\tclose(started)\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\terrs <- ctx.Err()\n\t\t\t\treturn\n\t\t\tdefault:\n\t\t\t\tvar event events.Message\n\t\t\t\tif err := decoder(&event); err != nil {\n\t\t\t\t\terrs <- err\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tselect {\n\t\t\t\tcase messages <- event:\n\t\t\t\tcase <-ctx.Done():\n\t\t\t\t\terrs <- ctx.Err()\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}()\n\t<-started\n\n\treturn EventsResult{\n\t\tMessages: messages,\n\t\tErr:      errs,\n\t}\n}\n\nfunc buildEventsQueryParams(options EventsListOptions) (url.Values, error) {\n\tquery := url.Values{}\n\tref := time.Now()\n\n\tif options.Since != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Since, ref)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tquery.Set(\"since\", ts)\n\t}\n\n\tif options.Until != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Until, ref)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tquery.Set(\"until\", ts)\n\t}\n\n\toptions.Filters.updateURLValues(query)\n\n\treturn query, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/system_info.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/system\"\n)\n\ntype InfoOptions struct {\n\t// No options currently; placeholder for future use\n}\n\ntype SystemInfoResult struct {\n\tInfo system.Info\n}\n\n// Info returns information about the docker server.\nfunc (cli *Client) Info(ctx context.Context, options InfoOptions) (SystemInfoResult, error) {\n\tresp, err := cli.get(ctx, \"/info\", url.Values{}, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn SystemInfoResult{}, err\n\t}\n\n\tvar info system.Info\n\tif err := json.NewDecoder(resp.Body).Decode(&info); err != nil {\n\t\treturn SystemInfoResult{}, fmt.Errorf(\"Error reading remote info: %v\", err)\n\t}\n\n\treturn SystemInfoResult{Info: info}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/task_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// TaskInspectOptions contains options for inspecting a task.\ntype TaskInspectOptions struct {\n\t// Currently no options are defined.\n}\n\n// TaskInspectResult contains the result of a task inspection.\ntype TaskInspectResult struct {\n\tTask swarm.Task\n\tRaw  json.RawMessage\n}\n\n// TaskInspect returns the task information and its raw representation.\nfunc (cli *Client) TaskInspect(ctx context.Context, taskID string, options TaskInspectOptions) (TaskInspectResult, error) {\n\ttaskID, err := trimID(\"task\", taskID)\n\tif err != nil {\n\t\treturn TaskInspectResult{}, err\n\t}\n\n\tresp, err := cli.get(ctx, \"/tasks/\"+taskID, nil, nil)\n\tif err != nil {\n\t\treturn TaskInspectResult{}, err\n\t}\n\n\tvar out TaskInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Task)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/task_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n)\n\n// TaskListOptions holds parameters to list tasks with.\ntype TaskListOptions struct {\n\tFilters Filters\n}\n\n// TaskListResult contains the result of a task list operation.\ntype TaskListResult struct {\n\tItems []swarm.Task\n}\n\n// TaskList returns the list of tasks.\nfunc (cli *Client) TaskList(ctx context.Context, options TaskListOptions) (TaskListResult, error) {\n\tquery := url.Values{}\n\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.get(ctx, \"/tasks\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn TaskListResult{}, err\n\t}\n\n\tvar tasks []swarm.Task\n\terr = json.NewDecoder(resp.Body).Decode(&tasks)\n\treturn TaskListResult{Items: tasks}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/task_logs.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/moby/moby/client/internal/timestamp\"\n)\n\n// TaskLogsOptions holds parameters to filter logs with.\ntype TaskLogsOptions struct {\n\tShowStdout bool\n\tShowStderr bool\n\tSince      string\n\tUntil      string\n\tTimestamps bool\n\tFollow     bool\n\tTail       string\n\tDetails    bool\n}\n\n// TaskLogsResult holds the result of a task logs operation.\n// It implements [io.ReadCloser].\ntype TaskLogsResult interface {\n\tio.ReadCloser\n}\n\n// TaskLogs returns the logs generated by a service in a [TaskLogsResult].\n// as an [io.ReadCloser]. Callers should close the stream.\n//\n// The underlying [io.ReadCloser] is automatically closed if the context is canceled,\nfunc (cli *Client) TaskLogs(ctx context.Context, taskID string, options TaskLogsOptions) (TaskLogsResult, error) {\n\t// TODO(thaJeztah): this function needs documentation about the format of ths stream (similar to for container logs)\n\t// TODO(thaJeztah): migrate CLI utilities to the client where suitable; https://github.com/docker/cli/blob/v29.0.0-rc.1/cli/command/service/logs.go#L73-L348\n\n\tquery := url.Values{}\n\tif options.ShowStdout {\n\t\tquery.Set(\"stdout\", \"1\")\n\t}\n\n\tif options.ShowStderr {\n\t\tquery.Set(\"stderr\", \"1\")\n\t}\n\n\tif options.Since != \"\" {\n\t\tts, err := timestamp.GetTimestamp(options.Since, time.Now())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tquery.Set(\"since\", ts)\n\t}\n\n\tif options.Timestamps {\n\t\tquery.Set(\"timestamps\", \"1\")\n\t}\n\n\tif options.Details {\n\t\tquery.Set(\"details\", \"1\")\n\t}\n\n\tif options.Follow {\n\t\tquery.Set(\"follow\", \"1\")\n\t}\n\tquery.Set(\"tail\", options.Tail)\n\n\tresp, err := cli.get(ctx, \"/tasks/\"+taskID+\"/logs\", query, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &taskLogsResult{\n\t\tReadCloser: newCancelReadCloser(ctx, resp.Body),\n\t}, nil\n}\n\ntype taskLogsResult struct {\n\tio.ReadCloser\n}\n\nvar (\n\t_ io.ReadCloser       = (*taskLogsResult)(nil)\n\t_ ContainerLogsResult = (*taskLogsResult)(nil)\n)\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/utils.go",
    "content": "package client\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\tocispec \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\ntype emptyIDError string\n\nfunc (e emptyIDError) InvalidParameter() {}\n\nfunc (e emptyIDError) Error() string {\n\treturn \"invalid \" + string(e) + \" name or ID: value is empty\"\n}\n\n// trimID trims the given object-ID / name, returning an error if it's empty.\nfunc trimID(objType, id string) (string, error) {\n\tid = strings.TrimSpace(id)\n\tif id == \"\" {\n\t\treturn \"\", emptyIDError(objType)\n\t}\n\treturn id, nil\n}\n\n// parseAPIVersion checks v to be a well-formed (\"<major>.<minor>\")\n// API version. It returns an error if the value is empty or does not\n// have the correct format, but does not validate if the API version is\n// within the supported range ([MinAPIVersion] <= v <= [MaxAPIVersion]).\n//\n// It returns version after normalizing, or an error if validation failed.\nfunc parseAPIVersion(version string) (string, error) {\n\tif strings.TrimPrefix(strings.TrimSpace(version), \"v\") == \"\" {\n\t\treturn \"\", cerrdefs.ErrInvalidArgument.WithMessage(\"value is empty\")\n\t}\n\tmajor, minor, err := parseMajorMinor(version)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn fmt.Sprintf(\"%d.%d\", major, minor), nil\n}\n\n// parseMajorMinor is a helper for parseAPIVersion.\nfunc parseMajorMinor(v string) (major, minor int, _ error) {\n\tif strings.HasPrefix(v, \"v\") {\n\t\treturn 0, 0, cerrdefs.ErrInvalidArgument.WithMessage(\"must be formatted <major>.<minor>\")\n\t}\n\tif strings.TrimSpace(v) == \"\" {\n\t\treturn 0, 0, cerrdefs.ErrInvalidArgument.WithMessage(\"value is empty\")\n\t}\n\n\tmajVer, minVer, ok := strings.Cut(v, \".\")\n\tif !ok {\n\t\treturn 0, 0, cerrdefs.ErrInvalidArgument.WithMessage(\"must be formatted <major>.<minor>\")\n\t}\n\tmajor, err := strconv.Atoi(majVer)\n\tif err != nil {\n\t\treturn 0, 0, cerrdefs.ErrInvalidArgument.WithMessage(\"invalid major version: must be formatted <major>.<minor>\")\n\t}\n\tminor, err = strconv.Atoi(minVer)\n\tif err != nil {\n\t\treturn 0, 0, cerrdefs.ErrInvalidArgument.WithMessage(\"invalid minor version: must be formatted <major>.<minor>\")\n\t}\n\treturn major, minor, nil\n}\n\n// encodePlatforms marshals the given platform(s) to JSON format, to\n// be used for query-parameters for filtering / selecting platforms.\nfunc encodePlatforms(platform ...ocispec.Platform) ([]string, error) {\n\tif len(platform) == 0 {\n\t\treturn []string{}, nil\n\t}\n\tif len(platform) == 1 {\n\t\tp, err := encodePlatform(&platform[0])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn []string{p}, nil\n\t}\n\n\tseen := make(map[string]struct{}, len(platform))\n\tout := make([]string, 0, len(platform))\n\tfor i := range platform {\n\t\tp, err := encodePlatform(&platform[i])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif _, ok := seen[p]; !ok {\n\t\t\tout = append(out, p)\n\t\t\tseen[p] = struct{}{}\n\t\t}\n\t}\n\treturn out, nil\n}\n\n// encodePlatform marshals the given platform to JSON format, to\n// be used for query-parameters for filtering / selecting platforms. It\n// is used as a helper for encodePlatforms,\nfunc encodePlatform(platform *ocispec.Platform) (string, error) {\n\tp, err := json.Marshal(platform)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"%w: invalid platform: %v\", cerrdefs.ErrInvalidArgument, err)\n\t}\n\treturn string(p), nil\n}\n\nfunc decodeWithRaw[T any](resp *http.Response, out *T) (raw json.RawMessage, _ error) {\n\tif resp == nil || resp.Body == nil {\n\t\treturn nil, errors.New(\"empty response\")\n\t}\n\tdefer ensureReaderClosed(resp)\n\n\tvar buf bytes.Buffer\n\ttr := io.TeeReader(resp.Body, &buf)\n\terr := json.NewDecoder(tr).Decode(out)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n\n// newCancelReadCloser wraps rc so it's automatically closed when ctx is canceled.\n// Close is idempotent and returns the first error from rc.Close.\nfunc newCancelReadCloser(ctx context.Context, rc io.ReadCloser) io.ReadCloser {\n\tcrc := &cancelReadCloser{\n\t\trc:    rc,\n\t\tclose: sync.OnceValue(rc.Close),\n\t}\n\tcrc.stop = context.AfterFunc(ctx, func() { _ = crc.Close() })\n\treturn crc\n}\n\ntype cancelReadCloser struct {\n\trc    io.ReadCloser\n\tclose func() error\n\tstop  func() bool\n}\n\nfunc (c *cancelReadCloser) Read(p []byte) (int, error) { return c.rc.Read(p) }\n\nfunc (c *cancelReadCloser) Close() error {\n\tc.stop() // unregister AfterFunc\n\treturn c.close()\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/version.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/system\"\n)\n\n// ServerVersionOptions specifies options for the server version request.\ntype ServerVersionOptions struct {\n\t// Currently no options are supported.\n}\n\n// ServerVersionResult contains information about the Docker server host.\ntype ServerVersionResult struct {\n\t// Platform is the platform (product name) the server is running on.\n\tPlatform PlatformInfo\n\n\t// Version is the version of the daemon.\n\tVersion string\n\n\t// APIVersion is the highest API version supported by the server.\n\tAPIVersion string\n\n\t// MinAPIVersion is the minimum API version the server supports.\n\tMinAPIVersion string\n\n\t// Os is the operating system the server runs on.\n\tOs string\n\n\t// Arch is the hardware architecture the server runs on.\n\tArch string\n\n\t// Experimental indicates that the daemon runs with experimental\n\t// features enabled.\n\t//\n\t// Deprecated: this field will be removed in the next version.\n\tExperimental bool\n\n\t// Components contains version information for the components making\n\t// up the server. Information in this field is for informational\n\t// purposes, and not part of the API contract.\n\tComponents []system.ComponentVersion\n}\n\n// PlatformInfo holds information about the platform (product name) the\n// server is running on.\ntype PlatformInfo struct {\n\t// Name is the name of the platform (for example, \"Docker Engine - Community\",\n\t// or \"Docker Desktop 4.49.0 (208003)\")\n\tName string\n}\n\n// ServerVersion returns information of the Docker server host.\nfunc (cli *Client) ServerVersion(ctx context.Context, _ ServerVersionOptions) (ServerVersionResult, error) {\n\tresp, err := cli.get(ctx, \"/version\", nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn ServerVersionResult{}, err\n\t}\n\n\tvar v system.VersionResponse\n\terr = json.NewDecoder(resp.Body).Decode(&v)\n\tif err != nil {\n\t\treturn ServerVersionResult{}, err\n\t}\n\n\treturn ServerVersionResult{\n\t\tPlatform: PlatformInfo{\n\t\t\tName: v.Platform.Name,\n\t\t},\n\t\tVersion:       v.Version,\n\t\tAPIVersion:    v.APIVersion,\n\t\tMinAPIVersion: v.MinAPIVersion,\n\t\tOs:            v.Os,\n\t\tArch:          v.Arch,\n\t\tExperimental:  v.Experimental, //nolint:staticcheck // ignore deprecated field.\n\t\tComponents:    v.Components,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_create.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// VolumeCreateOptions specifies the options to create a volume.\ntype VolumeCreateOptions struct {\n\tName              string\n\tDriver            string\n\tDriverOpts        map[string]string\n\tLabels            map[string]string\n\tClusterVolumeSpec *volume.ClusterVolumeSpec\n}\n\n// VolumeCreateResult is the result of a volume creation.\ntype VolumeCreateResult struct {\n\tVolume volume.Volume\n}\n\n// VolumeCreate creates a volume in the docker host.\nfunc (cli *Client) VolumeCreate(ctx context.Context, options VolumeCreateOptions) (VolumeCreateResult, error) {\n\tcreateRequest := volume.CreateRequest{\n\t\tName:              options.Name,\n\t\tDriver:            options.Driver,\n\t\tDriverOpts:        options.DriverOpts,\n\t\tLabels:            options.Labels,\n\t\tClusterVolumeSpec: options.ClusterVolumeSpec,\n\t}\n\tresp, err := cli.post(ctx, \"/volumes/create\", nil, createRequest, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn VolumeCreateResult{}, err\n\t}\n\n\tvar v volume.Volume\n\terr = json.NewDecoder(resp.Body).Decode(&v)\n\treturn VolumeCreateResult{Volume: v}, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_inspect.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// VolumeInspectOptions holds options for inspecting a volume.\ntype VolumeInspectOptions struct {\n\t// Add future optional parameters here\n}\n\n// VolumeInspectResult holds the result from the [Client.VolumeInspect] method.\ntype VolumeInspectResult struct {\n\tVolume volume.Volume\n\tRaw    json.RawMessage\n}\n\n// VolumeInspect returns the information about a specific volume in the docker host.\nfunc (cli *Client) VolumeInspect(ctx context.Context, volumeID string, options VolumeInspectOptions) (VolumeInspectResult, error) {\n\tvolumeID, err := trimID(\"volume\", volumeID)\n\tif err != nil {\n\t\treturn VolumeInspectResult{}, err\n\t}\n\n\tresp, err := cli.get(ctx, \"/volumes/\"+volumeID, nil, nil)\n\tif err != nil {\n\t\treturn VolumeInspectResult{}, err\n\t}\n\n\tvar out VolumeInspectResult\n\tout.Raw, err = decodeWithRaw(resp, &out.Volume)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_list.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// VolumeListOptions holds parameters to list volumes.\ntype VolumeListOptions struct {\n\tFilters Filters\n}\n\n// VolumeListResult holds the result from the [Client.VolumeList] method.\ntype VolumeListResult struct {\n\t// List of volumes.\n\tItems []volume.Volume\n\n\t// Warnings that occurred when fetching the list of volumes.\n\tWarnings []string\n}\n\n// VolumeList returns the volumes configured in the docker host.\nfunc (cli *Client) VolumeList(ctx context.Context, options VolumeListOptions) (VolumeListResult, error) {\n\tquery := url.Values{}\n\n\toptions.Filters.updateURLValues(query)\n\tresp, err := cli.get(ctx, \"/volumes\", query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn VolumeListResult{}, err\n\t}\n\n\tvar apiResp volume.ListResponse\n\terr = json.NewDecoder(resp.Body).Decode(&apiResp)\n\tif err != nil {\n\t\treturn VolumeListResult{}, err\n\t}\n\n\treturn VolumeListResult{\n\t\tItems:    apiResp.Volumes,\n\t\tWarnings: apiResp.Warnings,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_prune.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/url\"\n\n\tcerrdefs \"github.com/containerd/errdefs\"\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// VolumePruneOptions holds parameters to prune volumes.\ntype VolumePruneOptions struct {\n\t// All controls whether named volumes should also be pruned. By\n\t// default, only anonymous volumes are pruned.\n\tAll bool\n\n\t// Filters to apply when pruning.\n\tFilters Filters\n}\n\n// VolumePruneResult holds the result from the [Client.VolumePrune] method.\ntype VolumePruneResult struct {\n\tReport volume.PruneReport\n}\n\n// VolumePrune requests the daemon to delete unused data\nfunc (cli *Client) VolumePrune(ctx context.Context, options VolumePruneOptions) (VolumePruneResult, error) {\n\tif options.All {\n\t\tif _, ok := options.Filters[\"all\"]; ok {\n\t\t\treturn VolumePruneResult{}, cerrdefs.ErrInvalidArgument.WithMessage(`conflicting options: cannot specify both \"all\" and \"all\" filter`)\n\t\t}\n\t\tif options.Filters == nil {\n\t\t\toptions.Filters = Filters{}\n\t\t}\n\t\toptions.Filters.Add(\"all\", \"true\")\n\t}\n\n\tquery := url.Values{}\n\toptions.Filters.updateURLValues(query)\n\n\tresp, err := cli.post(ctx, \"/volumes/prune\", query, nil, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn VolumePruneResult{}, err\n\t}\n\n\tvar report volume.PruneReport\n\tif err := json.NewDecoder(resp.Body).Decode(&report); err != nil {\n\t\treturn VolumePruneResult{}, fmt.Errorf(\"error retrieving volume prune report: %v\", err)\n\t}\n\n\treturn VolumePruneResult{Report: report}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_remove.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n)\n\n// VolumeRemoveOptions holds options for [Client.VolumeRemove].\ntype VolumeRemoveOptions struct {\n\t// Force the removal of the volume\n\tForce bool\n}\n\n// VolumeRemoveResult holds the result of [Client.VolumeRemove],\ntype VolumeRemoveResult struct {\n\t// Add future fields here.\n}\n\n// VolumeRemove removes a volume from the docker host.\nfunc (cli *Client) VolumeRemove(ctx context.Context, volumeID string, options VolumeRemoveOptions) (VolumeRemoveResult, error) {\n\tvolumeID, err := trimID(\"volume\", volumeID)\n\tif err != nil {\n\t\treturn VolumeRemoveResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tif options.Force {\n\t\tquery.Set(\"force\", \"1\")\n\t}\n\tresp, err := cli.delete(ctx, \"/volumes/\"+volumeID, query, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn VolumeRemoveResult{}, err\n\t}\n\treturn VolumeRemoveResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/moby/client/volume_update.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"net/url\"\n\n\t\"github.com/moby/moby/api/types/swarm\"\n\t\"github.com/moby/moby/api/types/volume\"\n)\n\n// VolumeUpdateOptions holds options for [Client.VolumeUpdate].\ntype VolumeUpdateOptions struct {\n\tVersion swarm.Version\n\t// Spec is the ClusterVolumeSpec to update the volume to.\n\tSpec *volume.ClusterVolumeSpec `json:\"Spec,omitempty\"`\n}\n\n// VolumeUpdateResult holds the result of [Client.VolumeUpdate],\ntype VolumeUpdateResult struct {\n\t// Add future fields here.\n}\n\n// VolumeUpdate updates a volume. This only works for Cluster Volumes, and\n// only some fields can be updated.\nfunc (cli *Client) VolumeUpdate(ctx context.Context, volumeID string, options VolumeUpdateOptions) (VolumeUpdateResult, error) {\n\tvolumeID, err := trimID(\"volume\", volumeID)\n\tif err != nil {\n\t\treturn VolumeUpdateResult{}, err\n\t}\n\n\tquery := url.Values{}\n\tquery.Set(\"version\", options.Version.String())\n\n\tresp, err := cli.put(ctx, \"/volumes/\"+volumeID, query, options, nil)\n\tdefer ensureReaderClosed(resp)\n\tif err != nil {\n\t\treturn VolumeUpdateResult{}, err\n\t}\n\treturn VolumeUpdateResult{}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/CHANGELOG.md",
    "content": "# Changelog\nThis file documents all notable changes made to this project since the initial fork\nfrom https://github.com/syndtr/gocapability/commit/42c35b4376354fd5.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.4.0] - 2024-11-11\n\n### Added\n* New separate API for ambient ([GetAmbient], [SetAmbient], [ResetAmbient])\n  and bound ([GetBound], [DropBound]) capabilities, modelled after libcap. (#176)\n\n### Fixed\n* [Apply] now returns an error if called for non-zero `pid`. Before this change,\n  it could silently change some capabilities of the current process, instead of\n  the one identified by the `pid`. (#168, #174)\n* Fixed tests that change capabilities to be run in a separate process. (#173)\n* Other improvements in tests. (#169, #170)\n\n### Changed\n* Use raw syscalls (which are slightly faster). (#176)\n* Most tests are now limited to testing the public API of the package. (#162)\n* Simplify parsing /proc/*pid*/status, add a test case. (#162)\n* Optimize the number of syscall to set ambient capabilities in Apply\n  by clearing them first; add a test case. (#163, #164)\n* Better documentation for [Apply], [NewFile], [NewFile2], [NewPid], [NewPid2]. (#175)\n\n### Removed\n* `.golangci.yml` and `.codespellrc` are no longer part of the package. (#158)\n\n## [0.3.0] - 2024-09-25\n\n### Added\n* Added [ListKnown] and [ListSupported] functions. (#153)\n* [LastCap] is now available on non-Linux platforms (where it returns an error). (#152)\n\n### Changed\n* [List] is now deprecated in favor of [ListKnown] and [ListSupported]. (#153)\n\n### Fixed\n* Various documentation improvements. (#151)\n* Fix \"generated code\" comment. (#153)\n\n## [0.2.0] - 2024-09-16\n\nThis is the first release after the move to a new home in\ngithub.com/moby/sys/capability.\n\n### Fixed\n * Fixed URLs in documentation to reflect the new home.\n\n## [0.1.1] - 2024-08-01\n\nThis is a maintenance release, fixing a few minor issues.\n\n### Fixed\n * Fixed future kernel compatibility, for real this time. [#11]\n * Fixed [LastCap] to be a function. [#12]\n\n## [0.1.0] - 2024-07-31\n\nThis is an initial release since the fork.\n\n### Breaking changes\n\n * The `CAP_LAST_CAP` variable is removed; users need to modify the code to\n   use [LastCap] to get the value. [#6]\n * The code now requires Go >= 1.21.\n\n### Added\n * `go.mod` and `go.sum` files. [#2]\n * New [LastCap] function. [#6]\n * Basic CI using GHA infra. [#8], [#9]\n * README and CHANGELOG. [#10]\n\n### Fixed\n * Fixed ambient capabilities error handling in [Apply]. [#3]\n * Fixed future kernel compatibility. [#1]\n * Fixed various linter warnings. [#4], [#7]\n\n### Changed\n * Go build tags changed from old-style (`+build`) to new Go 1.17+ style (`go:build`). [#2]\n\n### Removed\n * Removed support for capabilities v1 and v2. [#1]\n * Removed init function so programs that use this package start faster. [#6]\n * Removed `CAP_LAST_CAP` (use [LastCap] instead). [#6]\n\n<!-- Doc links (please keep sorted). -->\n[Apply]: https://pkg.go.dev/github.com/moby/sys/capability#Capabilities.Apply\n[DropBound]: https://pkg.go.dev/github.com/moby/sys/capability#DropBound\n[GetAmbient]: https://pkg.go.dev/github.com/moby/sys/capability#GetAmbient\n[GetBound]: https://pkg.go.dev/github.com/moby/sys/capability#GetBound\n[LastCap]: https://pkg.go.dev/github.com/moby/sys/capability#LastCap\n[ListKnown]: https://pkg.go.dev/github.com/moby/sys/capability#ListKnown\n[ListSupported]: https://pkg.go.dev/github.com/moby/sys/capability#ListSupported\n[List]: https://pkg.go.dev/github.com/moby/sys/capability#List\n[NewFile2]: https://pkg.go.dev/github.com/moby/sys/capability#NewFile2\n[NewFile]: https://pkg.go.dev/github.com/moby/sys/capability#NewFile\n[NewPid2]: https://pkg.go.dev/github.com/moby/sys/capability#NewPid2\n[NewPid]: https://pkg.go.dev/github.com/moby/sys/capability#NewPid\n[ResetAmbient]: https://pkg.go.dev/github.com/moby/sys/capability#ResetAmbient\n[SetAmbient]: https://pkg.go.dev/github.com/moby/sys/capability#SetAmbient\n\n<!-- Minor releases. -->\n[0.4.0]: https://github.com/moby/sys/releases/tag/capability%2Fv0.4.0\n[0.3.0]: https://github.com/moby/sys/releases/tag/capability%2Fv0.3.0\n[0.2.0]: https://github.com/moby/sys/releases/tag/capability%2Fv0.2.0\n[0.1.1]: https://github.com/kolyshkin/capability/compare/v0.1.0...v0.1.1\n[0.1.0]: https://github.com/kolyshkin/capability/compare/42c35b4376354fd5...v0.1.0\n\n<!-- PRs in 0.1.x releases. -->\n[#1]: https://github.com/kolyshkin/capability/pull/1\n[#2]: https://github.com/kolyshkin/capability/pull/2\n[#3]: https://github.com/kolyshkin/capability/pull/3\n[#4]: https://github.com/kolyshkin/capability/pull/4\n[#6]: https://github.com/kolyshkin/capability/pull/6\n[#7]: https://github.com/kolyshkin/capability/pull/7\n[#8]: https://github.com/kolyshkin/capability/pull/8\n[#9]: https://github.com/kolyshkin/capability/pull/9\n[#10]: https://github.com/kolyshkin/capability/pull/10\n[#11]: https://github.com/kolyshkin/capability/pull/11\n[#12]: https://github.com/kolyshkin/capability/pull/12\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/LICENSE",
    "content": "Copyright 2023 The Capability Authors.\nCopyright 2013 Suryandaru Triandana <syndtr@gmail.com>\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/README.md",
    "content": "This is a fork of (apparently no longer maintained)\nhttps://github.com/syndtr/gocapability package. It provides basic primitives to\nwork with [Linux capabilities][capabilities(7)].\n\nFor changes, see [CHANGELOG.md](./CHANGELOG.md).\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/moby/sys/capability/capability.svg)](https://pkg.go.dev/github.com/moby/sys/capability)\n\n## Alternatives\n\n * https://pkg.go.dev/kernel.org/pub/linux/libs/security/libcap/cap\n\n[capabilities(7)]: https://man7.org/linux/man-pages/man7/capabilities.7.html\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/capability.go",
    "content": "// Copyright 2023 The Capability Authors.\n// Copyright 2013 Suryandaru Triandana <syndtr@gmail.com>\n// All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package capability provides utilities for manipulating POSIX capabilities.\npackage capability\n\ntype Capabilities interface {\n\t// Get check whether a capability present in the given\n\t// capabilities set. The 'which' value should be one of EFFECTIVE,\n\t// PERMITTED, INHERITABLE, BOUNDING or AMBIENT.\n\tGet(which CapType, what Cap) bool\n\n\t// Empty check whether all capability bits of the given capabilities\n\t// set are zero. The 'which' value should be one of EFFECTIVE,\n\t// PERMITTED, INHERITABLE, BOUNDING or AMBIENT.\n\tEmpty(which CapType) bool\n\n\t// Full check whether all capability bits of the given capabilities\n\t// set are one. The 'which' value should be one of EFFECTIVE,\n\t// PERMITTED, INHERITABLE, BOUNDING or AMBIENT.\n\tFull(which CapType) bool\n\n\t// Set sets capabilities of the given capabilities sets. The\n\t// 'which' value should be one or combination (OR'ed) of EFFECTIVE,\n\t// PERMITTED, INHERITABLE, BOUNDING or AMBIENT.\n\tSet(which CapType, caps ...Cap)\n\n\t// Unset unsets capabilities of the given capabilities sets. The\n\t// 'which' value should be one or combination (OR'ed) of EFFECTIVE,\n\t// PERMITTED, INHERITABLE, BOUNDING or AMBIENT.\n\tUnset(which CapType, caps ...Cap)\n\n\t// Fill sets all bits of the given capabilities kind to one. The\n\t// 'kind' value should be one or combination (OR'ed) of CAPS,\n\t// BOUNDS or AMBS.\n\tFill(kind CapType)\n\n\t// Clear sets all bits of the given capabilities kind to zero. The\n\t// 'kind' value should be one or combination (OR'ed) of CAPS,\n\t// BOUNDS or AMBS.\n\tClear(kind CapType)\n\n\t// String return current capabilities state of the given capabilities\n\t// set as string. The 'which' value should be one of EFFECTIVE,\n\t// PERMITTED, INHERITABLE BOUNDING or AMBIENT\n\tStringCap(which CapType) string\n\n\t// String return current capabilities state as string.\n\tString() string\n\n\t// Load load actual capabilities value. This will overwrite all\n\t// outstanding changes.\n\tLoad() error\n\n\t// Apply apply the capabilities settings, so all changes made by\n\t// [Set], [Unset], [Fill], or [Clear] will take effect.\n\tApply(kind CapType) error\n}\n\n// NewPid initializes a new [Capabilities] object for given pid when\n// it is nonzero, or for the current process if pid is 0.\n//\n// Deprecated: replace with [NewPid2] followed by optional [Capabilities.Load]\n// (only if needed). For example, replace:\n//\n//\tc, err := NewPid(0)\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\n// with:\n//\n//\tc, err := NewPid2(0)\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\terr = c.Load()\n//\tif err != nil {\n//\t\treturn err\n//\t}\nfunc NewPid(pid int) (Capabilities, error) {\n\tc, err := newPid(pid)\n\tif err != nil {\n\t\treturn c, err\n\t}\n\terr = c.Load()\n\treturn c, err\n}\n\n// NewPid2 initializes a new [Capabilities] object for given pid when\n// it is nonzero, or for the current process if pid is 0. This\n// does not load the process's current capabilities; if needed,\n// call [Capabilities.Load].\nfunc NewPid2(pid int) (Capabilities, error) {\n\treturn newPid(pid)\n}\n\n// NewFile initializes a new Capabilities object for given file path.\n//\n// Deprecated: replace with [NewFile2] followed by optional [Capabilities.Load]\n// (only if needed). For example, replace:\n//\n//\tc, err := NewFile(path)\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\n// with:\n//\n//\tc, err := NewFile2(path)\n//\tif err != nil {\n//\t\treturn err\n//\t}\n//\terr = c.Load()\n//\tif err != nil {\n//\t\treturn err\n//\t}\nfunc NewFile(path string) (Capabilities, error) {\n\tc, err := newFile(path)\n\tif err != nil {\n\t\treturn c, err\n\t}\n\terr = c.Load()\n\treturn c, err\n}\n\n// NewFile2 creates a new initialized [Capabilities] object for given\n// file path. This does not load the process's current capabilities;\n// if needed, call [Capabilities.Load].\nfunc NewFile2(path string) (Capabilities, error) {\n\treturn newFile(path)\n}\n\n// LastCap returns highest valid capability of the running kernel,\n// or an error if it can not be obtained.\n//\n// See also: [ListSupported].\nfunc LastCap() (Cap, error) {\n\treturn lastCap()\n}\n\n// GetAmbient determines if a specific ambient capability is raised in the\n// calling thread.\nfunc GetAmbient(c Cap) (bool, error) {\n\treturn getAmbient(c)\n}\n\n// SetAmbient raises or lowers specified ambient capabilities for the calling\n// thread. To complete successfully, the prevailing effective capability set\n// must have a raised CAP_SETPCAP. Further, to raise a specific ambient\n// capability the inheritable and permitted sets of the calling thread must\n// already contain the specified capability.\nfunc SetAmbient(raise bool, caps ...Cap) error {\n\treturn setAmbient(raise, caps...)\n}\n\n// ResetAmbient resets all of the ambient capabilities for the calling thread\n// to their lowered value.\nfunc ResetAmbient() error {\n\treturn resetAmbient()\n}\n\n// GetBound determines if a specific bounding capability is raised in the\n// calling thread.\nfunc GetBound(c Cap) (bool, error) {\n\treturn getBound(c)\n}\n\n// DropBound lowers the specified bounding set capability.\nfunc DropBound(caps ...Cap) error {\n\treturn dropBound(caps...)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/capability_linux.go",
    "content": "// Copyright 2023 The Capability Authors.\n// Copyright 2013 Suryandaru Triandana <syndtr@gmail.com>\n// All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage capability\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n)\n\nconst (\n\tlinuxCapVer1 = 0x19980330 // No longer supported.\n\tlinuxCapVer2 = 0x20071026 // No longer supported.\n\tlinuxCapVer3 = 0x20080522\n)\n\nvar lastCap = sync.OnceValues(func() (Cap, error) {\n\tf, err := os.Open(\"/proc/sys/kernel/cap_last_cap\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tbuf := make([]byte, 11)\n\tl, err := f.Read(buf)\n\tf.Close()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tbuf = buf[:l]\n\n\tlast, err := strconv.Atoi(strings.TrimSpace(string(buf)))\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn Cap(last), nil\n})\n\nfunc capUpperMask() uint32 {\n\tlast, err := lastCap()\n\tif err != nil || last < 32 {\n\t\treturn 0\n\t}\n\treturn (uint32(1) << (uint(last) - 31)) - 1\n}\n\nfunc mkStringCap(c Capabilities, which CapType) (ret string) {\n\tlast, err := lastCap()\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tfor i, first := Cap(0), true; i <= last; i++ {\n\t\tif !c.Get(which, i) {\n\t\t\tcontinue\n\t\t}\n\t\tif first {\n\t\t\tfirst = false\n\t\t} else {\n\t\t\tret += \", \"\n\t\t}\n\t\tret += i.String()\n\t}\n\treturn\n}\n\nfunc mkString(c Capabilities, max CapType) (ret string) {\n\tret = \"{\"\n\tfor i := CapType(1); i <= max; i <<= 1 {\n\t\tret += \" \" + i.String() + \"=\\\"\"\n\t\tif c.Empty(i) {\n\t\t\tret += \"empty\"\n\t\t} else if c.Full(i) {\n\t\t\tret += \"full\"\n\t\t} else {\n\t\t\tret += c.StringCap(i)\n\t\t}\n\t\tret += \"\\\"\"\n\t}\n\tret += \" }\"\n\treturn\n}\n\nvar capVersion = sync.OnceValues(func() (uint32, error) {\n\tvar hdr capHeader\n\terr := capget(&hdr, nil)\n\treturn hdr.version, err\n})\n\nfunc newPid(pid int) (c Capabilities, retErr error) {\n\tver, err := capVersion()\n\tif err != nil {\n\t\tretErr = fmt.Errorf(\"unable to get capability version from the kernel: %w\", err)\n\t\treturn\n\t}\n\tswitch ver {\n\tcase linuxCapVer1, linuxCapVer2:\n\t\tretErr = errors.New(\"old/unsupported capability version (kernel older than 2.6.26?)\")\n\tdefault:\n\t\t// Either linuxCapVer3, or an unknown/future version (such as v4).\n\t\t// In the latter case, we fall back to v3 as the latest version known\n\t\t// to this package, as kernel should be backward-compatible to v3.\n\t\tp := new(capsV3)\n\t\tp.hdr.version = linuxCapVer3\n\t\tp.hdr.pid = int32(pid)\n\t\tc = p\n\t}\n\treturn\n}\n\nfunc ignoreEINVAL(err error) error {\n\tif errors.Is(err, syscall.EINVAL) {\n\t\terr = nil\n\t}\n\treturn err\n}\n\ntype capsV3 struct {\n\thdr     capHeader\n\tdata    [2]capData\n\tbounds  [2]uint32\n\tambient [2]uint32\n}\n\nfunc (c *capsV3) Get(which CapType, what Cap) bool {\n\tvar i uint\n\tif what > 31 {\n\t\ti = uint(what) >> 5\n\t\twhat %= 32\n\t}\n\n\tswitch which {\n\tcase EFFECTIVE:\n\t\treturn (1<<uint(what))&c.data[i].effective != 0\n\tcase PERMITTED:\n\t\treturn (1<<uint(what))&c.data[i].permitted != 0\n\tcase INHERITABLE:\n\t\treturn (1<<uint(what))&c.data[i].inheritable != 0\n\tcase BOUNDING:\n\t\treturn (1<<uint(what))&c.bounds[i] != 0\n\tcase AMBIENT:\n\t\treturn (1<<uint(what))&c.ambient[i] != 0\n\t}\n\n\treturn false\n}\n\nfunc (c *capsV3) getData(which CapType, dest []uint32) {\n\tswitch which {\n\tcase EFFECTIVE:\n\t\tdest[0] = c.data[0].effective\n\t\tdest[1] = c.data[1].effective\n\tcase PERMITTED:\n\t\tdest[0] = c.data[0].permitted\n\t\tdest[1] = c.data[1].permitted\n\tcase INHERITABLE:\n\t\tdest[0] = c.data[0].inheritable\n\t\tdest[1] = c.data[1].inheritable\n\tcase BOUNDING:\n\t\tdest[0] = c.bounds[0]\n\t\tdest[1] = c.bounds[1]\n\tcase AMBIENT:\n\t\tdest[0] = c.ambient[0]\n\t\tdest[1] = c.ambient[1]\n\t}\n}\n\nfunc (c *capsV3) Empty(which CapType) bool {\n\tvar data [2]uint32\n\tc.getData(which, data[:])\n\treturn data[0] == 0 && data[1] == 0\n}\n\nfunc (c *capsV3) Full(which CapType) bool {\n\tvar data [2]uint32\n\tc.getData(which, data[:])\n\tif (data[0] & 0xffffffff) != 0xffffffff {\n\t\treturn false\n\t}\n\tmask := capUpperMask()\n\treturn (data[1] & mask) == mask\n}\n\nfunc (c *capsV3) Set(which CapType, caps ...Cap) {\n\tfor _, what := range caps {\n\t\tvar i uint\n\t\tif what > 31 {\n\t\t\ti = uint(what) >> 5\n\t\t\twhat %= 32\n\t\t}\n\n\t\tif which&EFFECTIVE != 0 {\n\t\t\tc.data[i].effective |= 1 << uint(what)\n\t\t}\n\t\tif which&PERMITTED != 0 {\n\t\t\tc.data[i].permitted |= 1 << uint(what)\n\t\t}\n\t\tif which&INHERITABLE != 0 {\n\t\t\tc.data[i].inheritable |= 1 << uint(what)\n\t\t}\n\t\tif which&BOUNDING != 0 {\n\t\t\tc.bounds[i] |= 1 << uint(what)\n\t\t}\n\t\tif which&AMBIENT != 0 {\n\t\t\tc.ambient[i] |= 1 << uint(what)\n\t\t}\n\t}\n}\n\nfunc (c *capsV3) Unset(which CapType, caps ...Cap) {\n\tfor _, what := range caps {\n\t\tvar i uint\n\t\tif what > 31 {\n\t\t\ti = uint(what) >> 5\n\t\t\twhat %= 32\n\t\t}\n\n\t\tif which&EFFECTIVE != 0 {\n\t\t\tc.data[i].effective &= ^(1 << uint(what))\n\t\t}\n\t\tif which&PERMITTED != 0 {\n\t\t\tc.data[i].permitted &= ^(1 << uint(what))\n\t\t}\n\t\tif which&INHERITABLE != 0 {\n\t\t\tc.data[i].inheritable &= ^(1 << uint(what))\n\t\t}\n\t\tif which&BOUNDING != 0 {\n\t\t\tc.bounds[i] &= ^(1 << uint(what))\n\t\t}\n\t\tif which&AMBIENT != 0 {\n\t\t\tc.ambient[i] &= ^(1 << uint(what))\n\t\t}\n\t}\n}\n\nfunc (c *capsV3) Fill(kind CapType) {\n\tif kind&CAPS == CAPS {\n\t\tc.data[0].effective = 0xffffffff\n\t\tc.data[0].permitted = 0xffffffff\n\t\tc.data[0].inheritable = 0\n\t\tc.data[1].effective = 0xffffffff\n\t\tc.data[1].permitted = 0xffffffff\n\t\tc.data[1].inheritable = 0\n\t}\n\n\tif kind&BOUNDS == BOUNDS {\n\t\tc.bounds[0] = 0xffffffff\n\t\tc.bounds[1] = 0xffffffff\n\t}\n\tif kind&AMBS == AMBS {\n\t\tc.ambient[0] = 0xffffffff\n\t\tc.ambient[1] = 0xffffffff\n\t}\n}\n\nfunc (c *capsV3) Clear(kind CapType) {\n\tif kind&CAPS == CAPS {\n\t\tc.data[0].effective = 0\n\t\tc.data[0].permitted = 0\n\t\tc.data[0].inheritable = 0\n\t\tc.data[1].effective = 0\n\t\tc.data[1].permitted = 0\n\t\tc.data[1].inheritable = 0\n\t}\n\n\tif kind&BOUNDS == BOUNDS {\n\t\tc.bounds[0] = 0\n\t\tc.bounds[1] = 0\n\t}\n\tif kind&AMBS == AMBS {\n\t\tc.ambient[0] = 0\n\t\tc.ambient[1] = 0\n\t}\n}\n\nfunc (c *capsV3) StringCap(which CapType) (ret string) {\n\treturn mkStringCap(c, which)\n}\n\nfunc (c *capsV3) String() (ret string) {\n\treturn mkString(c, BOUNDING)\n}\n\nfunc (c *capsV3) Load() (err error) {\n\terr = capget(&c.hdr, &c.data[0])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpath := \"/proc/self/status\"\n\tif c.hdr.pid != 0 {\n\t\tpath = fmt.Sprintf(\"/proc/%d/status\", c.hdr.pid)\n\t}\n\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tb := bufio.NewReader(f)\n\tfor {\n\t\tline, e := b.ReadString('\\n')\n\t\tif e != nil {\n\t\t\tif e != io.EOF {\n\t\t\t\terr = e\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif val, ok := strings.CutPrefix(line, \"CapBnd:\\t\"); ok {\n\t\t\t_, err = fmt.Sscanf(val, \"%08x%08x\", &c.bounds[1], &c.bounds[0])\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif val, ok := strings.CutPrefix(line, \"CapAmb:\\t\"); ok {\n\t\t\t_, err = fmt.Sscanf(val, \"%08x%08x\", &c.ambient[1], &c.ambient[0])\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t}\n\tf.Close()\n\n\treturn\n}\n\nfunc (c *capsV3) Apply(kind CapType) error {\n\tif c.hdr.pid != 0 {\n\t\treturn errors.New(\"unable to modify capabilities of another process\")\n\t}\n\tlast, err := LastCap()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif kind&BOUNDS == BOUNDS {\n\t\tvar data [2]capData\n\t\terr = capget(&c.hdr, &data[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif (1<<uint(CAP_SETPCAP))&data[0].effective != 0 {\n\t\t\tfor i := Cap(0); i <= last; i++ {\n\t\t\t\tif c.Get(BOUNDING, i) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Ignore EINVAL since the capability may not be supported in this system.\n\t\t\t\terr = ignoreEINVAL(dropBound(i))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif kind&CAPS == CAPS {\n\t\terr = capset(&c.hdr, &c.data[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif kind&AMBS == AMBS {\n\t\t// Ignore EINVAL as not supported on kernels before 4.3\n\t\terr = ignoreEINVAL(resetAmbient())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor i := Cap(0); i <= last; i++ {\n\t\t\tif !c.Get(AMBIENT, i) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Ignore EINVAL as not supported on kernels before 4.3\n\t\t\terr = ignoreEINVAL(setAmbient(true, i))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc getAmbient(c Cap) (bool, error) {\n\tres, err := prctlRetInt(pr_CAP_AMBIENT, pr_CAP_AMBIENT_IS_SET, uintptr(c))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn res > 0, nil\n}\n\nfunc setAmbient(raise bool, caps ...Cap) error {\n\top := pr_CAP_AMBIENT_RAISE\n\tif !raise {\n\t\top = pr_CAP_AMBIENT_LOWER\n\t}\n\tfor _, val := range caps {\n\t\terr := prctl(pr_CAP_AMBIENT, op, uintptr(val))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc resetAmbient() error {\n\treturn prctl(pr_CAP_AMBIENT, pr_CAP_AMBIENT_CLEAR_ALL, 0)\n}\n\nfunc getBound(c Cap) (bool, error) {\n\tres, err := prctlRetInt(syscall.PR_CAPBSET_READ, uintptr(c), 0)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn res > 0, nil\n}\n\nfunc dropBound(caps ...Cap) error {\n\tfor _, val := range caps {\n\t\terr := prctl(syscall.PR_CAPBSET_DROP, uintptr(val), 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc newFile(path string) (c Capabilities, err error) {\n\tc = &capsFile{path: path}\n\treturn\n}\n\ntype capsFile struct {\n\tpath string\n\tdata vfscapData\n}\n\nfunc (c *capsFile) Get(which CapType, what Cap) bool {\n\tvar i uint\n\tif what > 31 {\n\t\tif c.data.version == 1 {\n\t\t\treturn false\n\t\t}\n\t\ti = uint(what) >> 5\n\t\twhat %= 32\n\t}\n\n\tswitch which {\n\tcase EFFECTIVE:\n\t\treturn (1<<uint(what))&c.data.effective[i] != 0\n\tcase PERMITTED:\n\t\treturn (1<<uint(what))&c.data.data[i].permitted != 0\n\tcase INHERITABLE:\n\t\treturn (1<<uint(what))&c.data.data[i].inheritable != 0\n\t}\n\n\treturn false\n}\n\nfunc (c *capsFile) getData(which CapType, dest []uint32) {\n\tswitch which {\n\tcase EFFECTIVE:\n\t\tdest[0] = c.data.effective[0]\n\t\tdest[1] = c.data.effective[1]\n\tcase PERMITTED:\n\t\tdest[0] = c.data.data[0].permitted\n\t\tdest[1] = c.data.data[1].permitted\n\tcase INHERITABLE:\n\t\tdest[0] = c.data.data[0].inheritable\n\t\tdest[1] = c.data.data[1].inheritable\n\t}\n}\n\nfunc (c *capsFile) Empty(which CapType) bool {\n\tvar data [2]uint32\n\tc.getData(which, data[:])\n\treturn data[0] == 0 && data[1] == 0\n}\n\nfunc (c *capsFile) Full(which CapType) bool {\n\tvar data [2]uint32\n\tc.getData(which, data[:])\n\tif c.data.version == 0 {\n\t\treturn (data[0] & 0x7fffffff) == 0x7fffffff\n\t}\n\tif (data[0] & 0xffffffff) != 0xffffffff {\n\t\treturn false\n\t}\n\tmask := capUpperMask()\n\treturn (data[1] & mask) == mask\n}\n\nfunc (c *capsFile) Set(which CapType, caps ...Cap) {\n\tfor _, what := range caps {\n\t\tvar i uint\n\t\tif what > 31 {\n\t\t\tif c.data.version == 1 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ti = uint(what) >> 5\n\t\t\twhat %= 32\n\t\t}\n\n\t\tif which&EFFECTIVE != 0 {\n\t\t\tc.data.effective[i] |= 1 << uint(what)\n\t\t}\n\t\tif which&PERMITTED != 0 {\n\t\t\tc.data.data[i].permitted |= 1 << uint(what)\n\t\t}\n\t\tif which&INHERITABLE != 0 {\n\t\t\tc.data.data[i].inheritable |= 1 << uint(what)\n\t\t}\n\t}\n}\n\nfunc (c *capsFile) Unset(which CapType, caps ...Cap) {\n\tfor _, what := range caps {\n\t\tvar i uint\n\t\tif what > 31 {\n\t\t\tif c.data.version == 1 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ti = uint(what) >> 5\n\t\t\twhat %= 32\n\t\t}\n\n\t\tif which&EFFECTIVE != 0 {\n\t\t\tc.data.effective[i] &= ^(1 << uint(what))\n\t\t}\n\t\tif which&PERMITTED != 0 {\n\t\t\tc.data.data[i].permitted &= ^(1 << uint(what))\n\t\t}\n\t\tif which&INHERITABLE != 0 {\n\t\t\tc.data.data[i].inheritable &= ^(1 << uint(what))\n\t\t}\n\t}\n}\n\nfunc (c *capsFile) Fill(kind CapType) {\n\tif kind&CAPS == CAPS {\n\t\tc.data.effective[0] = 0xffffffff\n\t\tc.data.data[0].permitted = 0xffffffff\n\t\tc.data.data[0].inheritable = 0\n\t\tif c.data.version == 2 {\n\t\t\tc.data.effective[1] = 0xffffffff\n\t\t\tc.data.data[1].permitted = 0xffffffff\n\t\t\tc.data.data[1].inheritable = 0\n\t\t}\n\t}\n}\n\nfunc (c *capsFile) Clear(kind CapType) {\n\tif kind&CAPS == CAPS {\n\t\tc.data.effective[0] = 0\n\t\tc.data.data[0].permitted = 0\n\t\tc.data.data[0].inheritable = 0\n\t\tif c.data.version == 2 {\n\t\t\tc.data.effective[1] = 0\n\t\t\tc.data.data[1].permitted = 0\n\t\t\tc.data.data[1].inheritable = 0\n\t\t}\n\t}\n}\n\nfunc (c *capsFile) StringCap(which CapType) (ret string) {\n\treturn mkStringCap(c, which)\n}\n\nfunc (c *capsFile) String() (ret string) {\n\treturn mkString(c, INHERITABLE)\n}\n\nfunc (c *capsFile) Load() (err error) {\n\treturn getVfsCap(c.path, &c.data)\n}\n\nfunc (c *capsFile) Apply(kind CapType) (err error) {\n\tif kind&CAPS == CAPS {\n\t\treturn setVfsCap(c.path, &c.data)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/capability_noop.go",
    "content": "// Copyright 2023 The Capability Authors.\n// Copyright 2013 Suryandaru Triandana <syndtr@gmail.com>\n// All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !linux\n\npackage capability\n\nimport \"errors\"\n\nvar errNotSup = errors.New(\"not supported\")\n\nfunc newPid(_ int) (Capabilities, error) {\n\treturn nil, errNotSup\n}\n\nfunc newFile(_ string) (Capabilities, error) {\n\treturn nil, errNotSup\n}\n\nfunc lastCap() (Cap, error) {\n\treturn -1, errNotSup\n}\n\nfunc getAmbient(_ Cap) (bool, error) {\n\treturn false, errNotSup\n}\n\nfunc setAmbient(_ bool, _ ...Cap) error {\n\treturn errNotSup\n}\n\nfunc resetAmbient() error {\n\treturn errNotSup\n}\n\nfunc getBound(_ Cap) (bool, error) {\n\treturn false, errNotSup\n}\n\nfunc dropBound(_ ...Cap) error {\n\treturn errNotSup\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/enum.go",
    "content": "// Copyright 2024 The Capability Authors.\n// Copyright 2013 Suryandaru Triandana <syndtr@gmail.com>\n// All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage capability\n\nimport \"slices\"\n\ntype CapType uint\n\nfunc (c CapType) String() string {\n\tswitch c {\n\tcase EFFECTIVE:\n\t\treturn \"effective\"\n\tcase PERMITTED:\n\t\treturn \"permitted\"\n\tcase INHERITABLE:\n\t\treturn \"inheritable\"\n\tcase BOUNDING:\n\t\treturn \"bounding\"\n\tcase CAPS:\n\t\treturn \"caps\"\n\tcase AMBIENT:\n\t\treturn \"ambient\"\n\t}\n\treturn \"unknown\"\n}\n\nconst (\n\tEFFECTIVE CapType = 1 << iota\n\tPERMITTED\n\tINHERITABLE\n\tBOUNDING\n\tAMBIENT\n\n\tCAPS   = EFFECTIVE | PERMITTED | INHERITABLE\n\tBOUNDS = BOUNDING\n\tAMBS   = AMBIENT\n)\n\n//go:generate go run enumgen/gen.go\ntype Cap int\n\n// POSIX-draft defined capabilities and Linux extensions.\n//\n// Defined in https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h\nconst (\n\t// In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this\n\t// overrides the restriction of changing file ownership and group\n\t// ownership.\n\tCAP_CHOWN = Cap(0)\n\n\t// Override all DAC access, including ACL execute access if\n\t// [_POSIX_ACL] is defined. Excluding DAC access covered by\n\t// CAP_LINUX_IMMUTABLE.\n\tCAP_DAC_OVERRIDE = Cap(1)\n\n\t// Overrides all DAC restrictions regarding read and search on files\n\t// and directories, including ACL restrictions if [_POSIX_ACL] is\n\t// defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE.\n\tCAP_DAC_READ_SEARCH = Cap(2)\n\n\t// Overrides all restrictions about allowed operations on files, where\n\t// file owner ID must be equal to the user ID, except where CAP_FSETID\n\t// is applicable. It doesn't override MAC and DAC restrictions.\n\tCAP_FOWNER = Cap(3)\n\n\t// Overrides the following restrictions that the effective user ID\n\t// shall match the file owner ID when setting the S_ISUID and S_ISGID\n\t// bits on that file; that the effective group ID (or one of the\n\t// supplementary group IDs) shall match the file owner ID when setting\n\t// the S_ISGID bit on that file; that the S_ISUID and S_ISGID bits are\n\t// cleared on successful return from chown(2) (not implemented).\n\tCAP_FSETID = Cap(4)\n\n\t// Overrides the restriction that the real or effective user ID of a\n\t// process sending a signal must match the real or effective user ID\n\t// of the process receiving the signal.\n\tCAP_KILL = Cap(5)\n\n\t// Allows setgid(2) manipulation\n\t// Allows setgroups(2)\n\t// Allows forged gids on socket credentials passing.\n\tCAP_SETGID = Cap(6)\n\n\t// Allows set*uid(2) manipulation (including fsuid).\n\t// Allows forged pids on socket credentials passing.\n\tCAP_SETUID = Cap(7)\n\n\t// Linux-specific capabilities\n\n\t// Without VFS support for capabilities:\n\t//   Transfer any capability in your permitted set to any pid,\n\t//   remove any capability in your permitted set from any pid\n\t// With VFS support for capabilities (neither of above, but)\n\t//   Add any capability from current's capability bounding set\n\t//     to the current process' inheritable set\n\t//   Allow taking bits out of capability bounding set\n\t//   Allow modification of the securebits for a process\n\tCAP_SETPCAP = Cap(8)\n\n\t// Allow modification of S_IMMUTABLE and S_APPEND file attributes\n\tCAP_LINUX_IMMUTABLE = Cap(9)\n\n\t// Allows binding to TCP/UDP sockets below 1024\n\t// Allows binding to ATM VCIs below 32\n\tCAP_NET_BIND_SERVICE = Cap(10)\n\n\t// Allow broadcasting, listen to multicast\n\tCAP_NET_BROADCAST = Cap(11)\n\n\t// Allow interface configuration\n\t// Allow administration of IP firewall, masquerading and accounting\n\t// Allow setting debug option on sockets\n\t// Allow modification of routing tables\n\t// Allow setting arbitrary process / process group ownership on\n\t// sockets\n\t// Allow binding to any address for transparent proxying (also via NET_RAW)\n\t// Allow setting TOS (type of service)\n\t// Allow setting promiscuous mode\n\t// Allow clearing driver statistics\n\t// Allow multicasting\n\t// Allow read/write of device-specific registers\n\t// Allow activation of ATM control sockets\n\tCAP_NET_ADMIN = Cap(12)\n\n\t// Allow use of RAW sockets\n\t// Allow use of PACKET sockets\n\t// Allow binding to any address for transparent proxying (also via NET_ADMIN)\n\tCAP_NET_RAW = Cap(13)\n\n\t// Allow locking of shared memory segments\n\t// Allow mlock and mlockall (which doesn't really have anything to do\n\t// with IPC)\n\tCAP_IPC_LOCK = Cap(14)\n\n\t// Override IPC ownership checks\n\tCAP_IPC_OWNER = Cap(15)\n\n\t// Insert and remove kernel modules - modify kernel without limit\n\tCAP_SYS_MODULE = Cap(16)\n\n\t// Allow ioperm/iopl access\n\t// Allow sending USB messages to any device via /proc/bus/usb\n\tCAP_SYS_RAWIO = Cap(17)\n\n\t// Allow use of chroot()\n\tCAP_SYS_CHROOT = Cap(18)\n\n\t// Allow ptrace() of any process\n\tCAP_SYS_PTRACE = Cap(19)\n\n\t// Allow configuration of process accounting\n\tCAP_SYS_PACCT = Cap(20)\n\n\t// Allow configuration of the secure attention key\n\t// Allow administration of the random device\n\t// Allow examination and configuration of disk quotas\n\t// Allow setting the domainname\n\t// Allow setting the hostname\n\t// Allow calling bdflush()\n\t// Allow mount() and umount(), setting up new smb connection\n\t// Allow some autofs root ioctls\n\t// Allow nfsservctl\n\t// Allow VM86_REQUEST_IRQ\n\t// Allow to read/write pci config on alpha\n\t// Allow irix_prctl on mips (setstacksize)\n\t// Allow flushing all cache on m68k (sys_cacheflush)\n\t// Allow removing semaphores\n\t// Used instead of CAP_CHOWN to \"chown\" IPC message queues, semaphores\n\t// and shared memory\n\t// Allow locking/unlocking of shared memory segment\n\t// Allow turning swap on/off\n\t// Allow forged pids on socket credentials passing\n\t// Allow setting readahead and flushing buffers on block devices\n\t// Allow setting geometry in floppy driver\n\t// Allow turning DMA on/off in xd driver\n\t// Allow administration of md devices (mostly the above, but some\n\t// extra ioctls)\n\t// Allow tuning the ide driver\n\t// Allow access to the nvram device\n\t// Allow administration of apm_bios, serial and bttv (TV) device\n\t// Allow manufacturer commands in isdn CAPI support driver\n\t// Allow reading non-standardized portions of pci configuration space\n\t// Allow DDI debug ioctl on sbpcd driver\n\t// Allow setting up serial ports\n\t// Allow sending raw qic-117 commands\n\t// Allow enabling/disabling tagged queuing on SCSI controllers and sending\n\t// arbitrary SCSI commands\n\t// Allow setting encryption key on loopback filesystem\n\t// Allow setting zone reclaim policy\n\t// Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility\n\tCAP_SYS_ADMIN = Cap(21)\n\n\t// Allow use of reboot()\n\tCAP_SYS_BOOT = Cap(22)\n\n\t// Allow raising priority and setting priority on other (different\n\t// UID) processes\n\t// Allow use of FIFO and round-robin (realtime) scheduling on own\n\t// processes and setting the scheduling algorithm used by another\n\t// process.\n\t// Allow setting cpu affinity on other processes\n\tCAP_SYS_NICE = Cap(23)\n\n\t// Override resource limits. Set resource limits.\n\t// Override quota limits.\n\t// Override reserved space on ext2 filesystem\n\t// Modify data journaling mode on ext3 filesystem (uses journaling\n\t// resources)\n\t// NOTE: ext2 honors fsuid when checking for resource overrides, so\n\t// you can override using fsuid too\n\t// Override size restrictions on IPC message queues\n\t// Allow more than 64hz interrupts from the real-time clock\n\t// Override max number of consoles on console allocation\n\t// Override max number of keymaps\n\t// Control memory reclaim behavior\n\tCAP_SYS_RESOURCE = Cap(24)\n\n\t// Allow manipulation of system clock\n\t// Allow irix_stime on mips\n\t// Allow setting the real-time clock\n\tCAP_SYS_TIME = Cap(25)\n\n\t// Allow configuration of tty devices\n\t// Allow vhangup() of tty\n\tCAP_SYS_TTY_CONFIG = Cap(26)\n\n\t// Allow the privileged aspects of mknod()\n\tCAP_MKNOD = Cap(27)\n\n\t// Allow taking of leases on files\n\tCAP_LEASE = Cap(28)\n\n\tCAP_AUDIT_WRITE   = Cap(29)\n\tCAP_AUDIT_CONTROL = Cap(30)\n\tCAP_SETFCAP       = Cap(31)\n\n\t// Override MAC access.\n\t// The base kernel enforces no MAC policy.\n\t// An LSM may enforce a MAC policy, and if it does and it chooses\n\t// to implement capability based overrides of that policy, this is\n\t// the capability it should use to do so.\n\tCAP_MAC_OVERRIDE = Cap(32)\n\n\t// Allow MAC configuration or state changes.\n\t// The base kernel requires no MAC configuration.\n\t// An LSM may enforce a MAC policy, and if it does and it chooses\n\t// to implement capability based checks on modifications to that\n\t// policy or the data required to maintain it, this is the\n\t// capability it should use to do so.\n\tCAP_MAC_ADMIN = Cap(33)\n\n\t// Allow configuring the kernel's syslog (printk behaviour)\n\tCAP_SYSLOG = Cap(34)\n\n\t// Allow triggering something that will wake the system\n\tCAP_WAKE_ALARM = Cap(35)\n\n\t// Allow preventing system suspends\n\tCAP_BLOCK_SUSPEND = Cap(36)\n\n\t// Allow reading the audit log via multicast netlink socket\n\tCAP_AUDIT_READ = Cap(37)\n\n\t// Allow system performance and observability privileged operations\n\t// using perf_events, i915_perf and other kernel subsystems\n\tCAP_PERFMON = Cap(38)\n\n\t// CAP_BPF allows the following BPF operations:\n\t// - Creating all types of BPF maps\n\t// - Advanced verifier features\n\t//   - Indirect variable access\n\t//   - Bounded loops\n\t//   - BPF to BPF function calls\n\t//   - Scalar precision tracking\n\t//   - Larger complexity limits\n\t//   - Dead code elimination\n\t//   - And potentially other features\n\t// - Loading BPF Type Format (BTF) data\n\t// - Retrieve xlated and JITed code of BPF programs\n\t// - Use bpf_spin_lock() helper\n\t//\n\t// CAP_PERFMON relaxes the verifier checks further:\n\t// - BPF progs can use of pointer-to-integer conversions\n\t// - speculation attack hardening measures are bypassed\n\t// - bpf_probe_read to read arbitrary kernel memory is allowed\n\t// - bpf_trace_printk to print kernel memory is allowed\n\t//\n\t// CAP_SYS_ADMIN is required to use bpf_probe_write_user.\n\t//\n\t// CAP_SYS_ADMIN is required to iterate system wide loaded\n\t// programs, maps, links, BTFs and convert their IDs to file descriptors.\n\t//\n\t// CAP_PERFMON and CAP_BPF are required to load tracing programs.\n\t// CAP_NET_ADMIN and CAP_BPF are required to load networking programs.\n\tCAP_BPF = Cap(39)\n\n\t// Allow checkpoint/restore related operations.\n\t// Introduced in kernel 5.9\n\tCAP_CHECKPOINT_RESTORE = Cap(40)\n)\n\n// List returns the list of all capabilities known to the package.\n//\n// Deprecated: use [ListKnown] or [ListSupported] instead.\nfunc List() []Cap {\n\treturn ListKnown()\n}\n\n// ListKnown returns the list of all capabilities known to the package.\nfunc ListKnown() []Cap {\n\treturn list()\n}\n\n// ListSupported returns the list of all capabilities known to the package,\n// except those that are not supported by the currently running Linux kernel.\nfunc ListSupported() ([]Cap, error) {\n\tlast, err := LastCap()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn slices.DeleteFunc(list(), func(c Cap) bool {\n\t\t// Remove caps not supported by the kernel.\n\t\treturn c > last\n\t}), nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/enum_gen.go",
    "content": "// Code generated by go generate; DO NOT EDIT.\n\npackage capability\n\nfunc (c Cap) String() string {\n\tswitch c {\n\tcase CAP_CHOWN:\n\t\treturn \"chown\"\n\tcase CAP_DAC_OVERRIDE:\n\t\treturn \"dac_override\"\n\tcase CAP_DAC_READ_SEARCH:\n\t\treturn \"dac_read_search\"\n\tcase CAP_FOWNER:\n\t\treturn \"fowner\"\n\tcase CAP_FSETID:\n\t\treturn \"fsetid\"\n\tcase CAP_KILL:\n\t\treturn \"kill\"\n\tcase CAP_SETGID:\n\t\treturn \"setgid\"\n\tcase CAP_SETUID:\n\t\treturn \"setuid\"\n\tcase CAP_SETPCAP:\n\t\treturn \"setpcap\"\n\tcase CAP_LINUX_IMMUTABLE:\n\t\treturn \"linux_immutable\"\n\tcase CAP_NET_BIND_SERVICE:\n\t\treturn \"net_bind_service\"\n\tcase CAP_NET_BROADCAST:\n\t\treturn \"net_broadcast\"\n\tcase CAP_NET_ADMIN:\n\t\treturn \"net_admin\"\n\tcase CAP_NET_RAW:\n\t\treturn \"net_raw\"\n\tcase CAP_IPC_LOCK:\n\t\treturn \"ipc_lock\"\n\tcase CAP_IPC_OWNER:\n\t\treturn \"ipc_owner\"\n\tcase CAP_SYS_MODULE:\n\t\treturn \"sys_module\"\n\tcase CAP_SYS_RAWIO:\n\t\treturn \"sys_rawio\"\n\tcase CAP_SYS_CHROOT:\n\t\treturn \"sys_chroot\"\n\tcase CAP_SYS_PTRACE:\n\t\treturn \"sys_ptrace\"\n\tcase CAP_SYS_PACCT:\n\t\treturn \"sys_pacct\"\n\tcase CAP_SYS_ADMIN:\n\t\treturn \"sys_admin\"\n\tcase CAP_SYS_BOOT:\n\t\treturn \"sys_boot\"\n\tcase CAP_SYS_NICE:\n\t\treturn \"sys_nice\"\n\tcase CAP_SYS_RESOURCE:\n\t\treturn \"sys_resource\"\n\tcase CAP_SYS_TIME:\n\t\treturn \"sys_time\"\n\tcase CAP_SYS_TTY_CONFIG:\n\t\treturn \"sys_tty_config\"\n\tcase CAP_MKNOD:\n\t\treturn \"mknod\"\n\tcase CAP_LEASE:\n\t\treturn \"lease\"\n\tcase CAP_AUDIT_WRITE:\n\t\treturn \"audit_write\"\n\tcase CAP_AUDIT_CONTROL:\n\t\treturn \"audit_control\"\n\tcase CAP_SETFCAP:\n\t\treturn \"setfcap\"\n\tcase CAP_MAC_OVERRIDE:\n\t\treturn \"mac_override\"\n\tcase CAP_MAC_ADMIN:\n\t\treturn \"mac_admin\"\n\tcase CAP_SYSLOG:\n\t\treturn \"syslog\"\n\tcase CAP_WAKE_ALARM:\n\t\treturn \"wake_alarm\"\n\tcase CAP_BLOCK_SUSPEND:\n\t\treturn \"block_suspend\"\n\tcase CAP_AUDIT_READ:\n\t\treturn \"audit_read\"\n\tcase CAP_PERFMON:\n\t\treturn \"perfmon\"\n\tcase CAP_BPF:\n\t\treturn \"bpf\"\n\tcase CAP_CHECKPOINT_RESTORE:\n\t\treturn \"checkpoint_restore\"\n\t}\n\treturn \"unknown\"\n}\n\nfunc list() []Cap {\n\treturn []Cap{\n\t\tCAP_CHOWN,\n\t\tCAP_DAC_OVERRIDE,\n\t\tCAP_DAC_READ_SEARCH,\n\t\tCAP_FOWNER,\n\t\tCAP_FSETID,\n\t\tCAP_KILL,\n\t\tCAP_SETGID,\n\t\tCAP_SETUID,\n\t\tCAP_SETPCAP,\n\t\tCAP_LINUX_IMMUTABLE,\n\t\tCAP_NET_BIND_SERVICE,\n\t\tCAP_NET_BROADCAST,\n\t\tCAP_NET_ADMIN,\n\t\tCAP_NET_RAW,\n\t\tCAP_IPC_LOCK,\n\t\tCAP_IPC_OWNER,\n\t\tCAP_SYS_MODULE,\n\t\tCAP_SYS_RAWIO,\n\t\tCAP_SYS_CHROOT,\n\t\tCAP_SYS_PTRACE,\n\t\tCAP_SYS_PACCT,\n\t\tCAP_SYS_ADMIN,\n\t\tCAP_SYS_BOOT,\n\t\tCAP_SYS_NICE,\n\t\tCAP_SYS_RESOURCE,\n\t\tCAP_SYS_TIME,\n\t\tCAP_SYS_TTY_CONFIG,\n\t\tCAP_MKNOD,\n\t\tCAP_LEASE,\n\t\tCAP_AUDIT_WRITE,\n\t\tCAP_AUDIT_CONTROL,\n\t\tCAP_SETFCAP,\n\t\tCAP_MAC_OVERRIDE,\n\t\tCAP_MAC_ADMIN,\n\t\tCAP_SYSLOG,\n\t\tCAP_WAKE_ALARM,\n\t\tCAP_BLOCK_SUSPEND,\n\t\tCAP_AUDIT_READ,\n\t\tCAP_PERFMON,\n\t\tCAP_BPF,\n\t\tCAP_CHECKPOINT_RESTORE,\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/capability/syscall_linux.go",
    "content": "// Copyright 2024 The Capability Authors.\n// Copyright 2013 Suryandaru Triandana <syndtr@gmail.com>\n// All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage capability\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\ntype capHeader struct {\n\tversion uint32\n\tpid     int32\n}\n\ntype capData struct {\n\teffective   uint32\n\tpermitted   uint32\n\tinheritable uint32\n}\n\nfunc capget(hdr *capHeader, data *capData) (err error) {\n\t_, _, e1 := syscall.RawSyscall(syscall.SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc capset(hdr *capHeader, data *capData) (err error) {\n\t_, _, e1 := syscall.RawSyscall(syscall.SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// not yet in syscall\nconst (\n\tpr_CAP_AMBIENT           = 47\n\tpr_CAP_AMBIENT_IS_SET    = uintptr(1)\n\tpr_CAP_AMBIENT_RAISE     = uintptr(2)\n\tpr_CAP_AMBIENT_LOWER     = uintptr(3)\n\tpr_CAP_AMBIENT_CLEAR_ALL = uintptr(4)\n)\n\nfunc prctl(option int, arg2, arg3 uintptr) (err error) {\n\t_, _, e1 := syscall.RawSyscall(syscall.SYS_PRCTL, uintptr(option), arg2, arg3)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc prctlRetInt(option int, arg2, arg3 uintptr) (int, error) {\n\tret, _, err := syscall.RawSyscall(syscall.SYS_PRCTL, uintptr(option), arg2, arg3)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(ret), nil\n}\n\nconst (\n\tvfsXattrName = \"security.capability\"\n\n\tvfsCapVerMask = 0xff000000\n\tvfsCapVer1    = 0x01000000\n\tvfsCapVer2    = 0x02000000\n\n\tvfsCapFlagMask      = ^vfsCapVerMask\n\tvfsCapFlageffective = 0x000001\n\n\tvfscapDataSizeV1 = 4 * (1 + 2*1)\n\tvfscapDataSizeV2 = 4 * (1 + 2*2)\n)\n\ntype vfscapData struct {\n\tmagic uint32\n\tdata  [2]struct {\n\t\tpermitted   uint32\n\t\tinheritable uint32\n\t}\n\teffective [2]uint32\n\tversion   int8\n}\n\nvar _vfsXattrName *byte\n\nfunc init() {\n\t_vfsXattrName, _ = syscall.BytePtrFromString(vfsXattrName)\n}\n\nfunc getVfsCap(path string, dest *vfscapData) (err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall.RawSyscall6(syscall.SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_vfsXattrName)), uintptr(unsafe.Pointer(dest)), vfscapDataSizeV2, 0, 0)\n\tif e1 != 0 {\n\t\tif e1 == syscall.ENODATA {\n\t\t\tdest.version = 2\n\t\t\treturn\n\t\t}\n\t\terr = e1\n\t}\n\tswitch dest.magic & vfsCapVerMask {\n\tcase vfsCapVer1:\n\t\tdest.version = 1\n\t\tif r0 != vfscapDataSizeV1 {\n\t\t\treturn syscall.EINVAL\n\t\t}\n\t\tdest.data[1].permitted = 0\n\t\tdest.data[1].inheritable = 0\n\tcase vfsCapVer2:\n\t\tdest.version = 2\n\t\tif r0 != vfscapDataSizeV2 {\n\t\t\treturn syscall.EINVAL\n\t\t}\n\tdefault:\n\t\treturn syscall.EINVAL\n\t}\n\tif dest.magic&vfsCapFlageffective != 0 {\n\t\tdest.effective[0] = dest.data[0].permitted | dest.data[0].inheritable\n\t\tdest.effective[1] = dest.data[1].permitted | dest.data[1].inheritable\n\t} else {\n\t\tdest.effective[0] = 0\n\t\tdest.effective[1] = 0\n\t}\n\treturn\n}\n\nfunc setVfsCap(path string, data *vfscapData) (err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar size uintptr\n\tif data.version == 1 {\n\t\tdata.magic = vfsCapVer1\n\t\tsize = vfscapDataSizeV1\n\t} else if data.version == 2 {\n\t\tdata.magic = vfsCapVer2\n\t\tif data.effective[0] != 0 || data.effective[1] != 0 {\n\t\t\tdata.magic |= vfsCapFlageffective\n\t\t}\n\t\tsize = vfscapDataSizeV2\n\t} else {\n\t\treturn syscall.EINVAL\n\t}\n\t_, _, e1 := syscall.RawSyscall6(syscall.SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_vfsXattrName)), uintptr(unsafe.Pointer(data)), size, 0, 0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/LICENSE",
    "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 [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": "vendor/github.com/moby/sys/mountinfo/doc.go",
    "content": "// Package mountinfo provides a set of functions to retrieve information about OS mounts.\n//\n// Currently it supports Linux. For historical reasons, there is also some support for FreeBSD and OpenBSD,\n// and a shallow implementation for Windows, but in general this is Linux-only package, so\n// the rest of the document only applies to Linux, unless explicitly specified otherwise.\n//\n// In Linux, information about mounts seen by the current process is available from\n// /proc/self/mountinfo. Note that due to mount namespaces, different processes can\n// see different mounts. A per-process mountinfo table is available from /proc/<PID>/mountinfo,\n// where <PID> is a numerical process identifier.\n//\n// In general, /proc is not a very efficient interface, and mountinfo is not an exception.\n// For example, there is no way to get information about a specific mount point (i.e. it\n// is all-or-nothing). This package tries to hide the /proc ineffectiveness by using\n// parse filters while reading mountinfo. A filter can skip some entries, or stop\n// processing the rest of the file once the needed information is found.\n//\n// For mountinfo filters that accept path as an argument, the path must be absolute,\n// having all symlinks resolved, and being cleaned (i.e. no extra slashes or dots).\n// One way to achieve all of the above is to employ filepath.Abs followed by\n// filepath.EvalSymlinks (the latter calls filepath.Clean on the result so\n// there is no need to explicitly call filepath.Clean).\n//\n// NOTE that in many cases there is no need to consult mountinfo at all. Here are some\n// of the cases where mountinfo should not be parsed:\n//\n// 1. Before performing a mount. Usually, this is not needed, but if required (say to\n// prevent over-mounts), to check whether a directory is mounted, call os.Lstat\n// on it and its parent directory, and compare their st.Sys().(*syscall.Stat_t).Dev\n// fields -- if they differ, then the directory is the mount point. NOTE this does\n// not work for bind mounts. Optionally, the filesystem type can also be checked\n// by calling unix.Statfs and checking the Type field (i.e. filesystem type).\n//\n// 2. After performing a mount. If there is no error returned, the mount succeeded;\n// checking the mount table for a new mount is redundant and expensive.\n//\n// 3. Before performing an unmount. It is more efficient to do an unmount and ignore\n// a specific error (EINVAL) which tells the directory is not mounted.\n//\n// 4. After performing an unmount. If there is no error returned, the unmount succeeded.\n//\n// 5. To find the mount point root of a specific directory. You can perform os.Stat()\n// on the directory and traverse up until the Dev field of a parent directory differs.\npackage mountinfo\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mounted_linux.go",
    "content": "package mountinfo\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// MountedFast is a method of detecting a mount point without reading\n// mountinfo from procfs. A caller can only trust the result if no error\n// and sure == true are returned. Otherwise, other methods (e.g. parsing\n// /proc/mounts) have to be used. If unsure, use Mounted instead (which\n// uses MountedFast, but falls back to parsing mountinfo if needed).\n//\n// If a non-existent path is specified, an appropriate error is returned.\n// In case the caller is not interested in this particular error, it should\n// be handled separately using e.g. errors.Is(err, fs.ErrNotExist).\n//\n// This function is only available on Linux. When available (since kernel\n// v5.6), openat2(2) syscall is used to reliably detect all mounts. Otherwise,\n// the implementation falls back to using stat(2), which can reliably detect\n// normal (but not bind) mounts.\nfunc MountedFast(path string) (mounted, sure bool, err error) {\n\t// Root is always mounted.\n\tif path == string(os.PathSeparator) {\n\t\treturn true, true, nil\n\t}\n\n\tpath, err = normalizePath(path)\n\tif err != nil {\n\t\treturn false, false, err\n\t}\n\tmounted, sure, err = mountedFast(path)\n\treturn\n}\n\n// mountedByOpenat2 is a method of detecting a mount that works for all kinds\n// of mounts (incl. bind mounts), but requires a recent (v5.6+) linux kernel.\nfunc mountedByOpenat2(path string) (bool, error) {\n\tdir, last := filepath.Split(path)\n\n\tdirfd, err := unix.Openat2(unix.AT_FDCWD, dir, &unix.OpenHow{\n\t\tFlags: unix.O_PATH | unix.O_CLOEXEC,\n\t})\n\tif err != nil {\n\t\treturn false, &os.PathError{Op: \"openat2\", Path: dir, Err: err}\n\t}\n\tfd, err := unix.Openat2(dirfd, last, &unix.OpenHow{\n\t\tFlags:   unix.O_PATH | unix.O_CLOEXEC | unix.O_NOFOLLOW,\n\t\tResolve: unix.RESOLVE_NO_XDEV,\n\t})\n\t_ = unix.Close(dirfd)\n\tswitch err {\n\tcase nil: // definitely not a mount\n\t\t_ = unix.Close(fd)\n\t\treturn false, nil\n\tcase unix.EXDEV: // definitely a mount\n\t\treturn true, nil\n\t}\n\t// not sure\n\treturn false, &os.PathError{Op: \"openat2\", Path: path, Err: err}\n}\n\n// mountedFast is similar to MountedFast, except it expects a normalized path.\nfunc mountedFast(path string) (mounted, sure bool, err error) {\n\t// Root is always mounted.\n\tif path == string(os.PathSeparator) {\n\t\treturn true, true, nil\n\t}\n\n\t// Try a fast path, using openat2() with RESOLVE_NO_XDEV.\n\tmounted, err = mountedByOpenat2(path)\n\tif err == nil {\n\t\treturn mounted, true, nil\n\t}\n\n\t// Another fast path: compare st.st_dev fields.\n\tmounted, err = mountedByStat(path)\n\t// This does not work for bind mounts, so false negative\n\t// is possible, therefore only trust if return is true.\n\tif mounted && err == nil {\n\t\treturn true, true, nil\n\t}\n\n\treturn\n}\n\nfunc mounted(path string) (bool, error) {\n\tpath, err := normalizePath(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tmounted, sure, err := mountedFast(path)\n\tif sure && err == nil {\n\t\treturn mounted, nil\n\t}\n\n\t// Fallback to parsing mountinfo.\n\treturn mountedByMountinfo(path)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mounted_unix.go",
    "content": "//go:build linux || freebsd || openbsd || darwin\n// +build linux freebsd openbsd darwin\n\npackage mountinfo\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc mountedByStat(path string) (bool, error) {\n\tvar st unix.Stat_t\n\n\tif err := unix.Lstat(path, &st); err != nil {\n\t\treturn false, &os.PathError{Op: \"stat\", Path: path, Err: err}\n\t}\n\tdev := st.Dev\n\tparent := filepath.Dir(path)\n\tif err := unix.Lstat(parent, &st); err != nil {\n\t\treturn false, &os.PathError{Op: \"stat\", Path: parent, Err: err}\n\t}\n\tif dev != st.Dev {\n\t\t// Device differs from that of parent,\n\t\t// so definitely a mount point.\n\t\treturn true, nil\n\t}\n\t// NB: this does not detect bind mounts on Linux.\n\treturn false, nil\n}\n\nfunc normalizePath(path string) (realPath string, err error) {\n\tif realPath, err = filepath.Abs(path); err != nil {\n\t\treturn \"\", err\n\t}\n\tif realPath, err = filepath.EvalSymlinks(realPath); err != nil {\n\t\treturn \"\", err\n\t}\n\tif _, err := os.Stat(realPath); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn realPath, nil\n}\n\nfunc mountedByMountinfo(path string) (bool, error) {\n\tentries, err := GetMounts(SingleEntryFilter(path))\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\treturn len(entries) > 0, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo.go",
    "content": "package mountinfo\n\nimport (\n\t\"os\"\n)\n\n// GetMounts retrieves a list of mounts for the current running process,\n// with an optional filter applied (use nil for no filter).\nfunc GetMounts(f FilterFunc) ([]*Info, error) {\n\treturn parseMountTable(f)\n}\n\n// Mounted determines if a specified path is a mount point. In case of any\n// error, false (and an error) is returned.\n//\n// If a non-existent path is specified, an appropriate error is returned.\n// In case the caller is not interested in this particular error, it should\n// be handled separately using e.g. errors.Is(err, fs.ErrNotExist).\nfunc Mounted(path string) (bool, error) {\n\t// root is always mounted\n\tif path == string(os.PathSeparator) {\n\t\treturn true, nil\n\t}\n\treturn mounted(path)\n}\n\n// Info reveals information about a particular mounted filesystem. This\n// struct is populated from the content in the /proc/<pid>/mountinfo file.\ntype Info struct {\n\t// ID is a unique identifier of the mount (may be reused after umount).\n\tID int\n\n\t// Parent is the ID of the parent mount (or of self for the root\n\t// of this mount namespace's mount tree).\n\tParent int\n\n\t// Major and Minor are the major and the minor components of the Dev\n\t// field of unix.Stat_t structure returned by unix.*Stat calls for\n\t// files on this filesystem.\n\tMajor, Minor int\n\n\t// Root is the pathname of the directory in the filesystem which forms\n\t// the root of this mount.\n\tRoot string\n\n\t// Mountpoint is the pathname of the mount point relative to the\n\t// process's root directory.\n\tMountpoint string\n\n\t// Options is a comma-separated list of mount options.\n\tOptions string\n\n\t// Optional are zero or more fields of the form \"tag[:value]\",\n\t// separated by a space.  Currently, the possible optional fields are\n\t// \"shared\", \"master\", \"propagate_from\", and \"unbindable\". For more\n\t// information, see mount_namespaces(7) Linux man page.\n\tOptional string\n\n\t// FSType is the filesystem type in the form \"type[.subtype]\".\n\tFSType string\n\n\t// Source is filesystem-specific information, or \"none\".\n\tSource string\n\n\t// VFSOptions is a comma-separated list of superblock options.\n\tVFSOptions string\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go",
    "content": "//go:build freebsd || openbsd || darwin\n// +build freebsd openbsd darwin\n\npackage mountinfo\n\nimport \"golang.org/x/sys/unix\"\n\n// parseMountTable returns information about mounted filesystems\nfunc parseMountTable(filter FilterFunc) ([]*Info, error) {\n\tcount, err := unix.Getfsstat(nil, unix.MNT_WAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tentries := make([]unix.Statfs_t, count)\n\t_, err = unix.Getfsstat(entries, unix.MNT_WAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar out []*Info\n\tfor _, entry := range entries {\n\t\tvar skip, stop bool\n\t\tmountinfo := getMountinfo(&entry)\n\n\t\tif filter != nil {\n\t\t\t// filter out entries we're not interested in\n\t\t\tskip, stop = filter(mountinfo)\n\t\t\tif skip {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tout = append(out, mountinfo)\n\t\tif stop {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn out, nil\n}\n\nfunc mounted(path string) (bool, error) {\n\tpath, err := normalizePath(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\t// Fast path: compare st.st_dev fields.\n\t// This should always work for FreeBSD and OpenBSD.\n\tmounted, err := mountedByStat(path)\n\tif err == nil {\n\t\treturn mounted, nil\n\t}\n\n\t// Fallback to parsing mountinfo\n\treturn mountedByMountinfo(path)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_filters.go",
    "content": "package mountinfo\n\nimport \"strings\"\n\n// FilterFunc is a type defining a callback function for GetMount(),\n// used to filter out mountinfo entries we're not interested in,\n// and/or stop further processing if we found what we wanted.\n//\n// It takes a pointer to the Info struct (fully populated with all available\n// fields on the GOOS platform), and returns two booleans:\n//\n// skip: true if the entry should be skipped;\n//\n// stop: true if parsing should be stopped after the entry.\ntype FilterFunc func(*Info) (skip, stop bool)\n\n// PrefixFilter discards all entries whose mount points do not start with, or\n// are equal to the path specified in prefix. The prefix path must be absolute,\n// have all symlinks resolved, and cleaned (i.e. no extra slashes or dots).\n//\n// PrefixFilter treats prefix as a path, not a partial prefix, which means that\n// given \"/foo\", \"/foo/bar\" and \"/foobar\" entries, PrefixFilter(\"/foo\") returns\n// \"/foo\" and \"/foo/bar\", and discards \"/foobar\".\nfunc PrefixFilter(prefix string) FilterFunc {\n\treturn func(m *Info) (bool, bool) {\n\t\tskip := !strings.HasPrefix(m.Mountpoint+\"/\", prefix+\"/\")\n\t\treturn skip, false\n\t}\n}\n\n// SingleEntryFilter looks for a specific entry.\nfunc SingleEntryFilter(mp string) FilterFunc {\n\treturn func(m *Info) (bool, bool) {\n\t\tif m.Mountpoint == mp {\n\t\t\treturn false, true // don't skip, stop now\n\t\t}\n\t\treturn true, false // skip, keep going\n\t}\n}\n\n// ParentsFilter returns all entries whose mount points\n// can be parents of a path specified, discarding others.\n//\n// For example, given /var/lib/docker/something, entries\n// like /var/lib/docker, /var and / are returned.\nfunc ParentsFilter(path string) FilterFunc {\n\treturn func(m *Info) (bool, bool) {\n\t\tskip := !strings.HasPrefix(path, m.Mountpoint)\n\t\treturn skip, false\n\t}\n}\n\n// FSTypeFilter returns all entries that match provided fstype(s).\nfunc FSTypeFilter(fstype ...string) FilterFunc {\n\treturn func(m *Info) (bool, bool) {\n\t\tfor _, t := range fstype {\n\t\t\tif m.FSType == t {\n\t\t\t\treturn false, false // don't skip, keep going\n\t\t\t}\n\t\t}\n\t\treturn true, false // skip, keep going\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_freebsdlike.go",
    "content": "//go:build freebsd || darwin\n// +build freebsd darwin\n\npackage mountinfo\n\nimport \"golang.org/x/sys/unix\"\n\nfunc getMountinfo(entry *unix.Statfs_t) *Info {\n\treturn &Info{\n\t\tMountpoint: unix.ByteSliceToString(entry.Mntonname[:]),\n\t\tFSType:     unix.ByteSliceToString(entry.Fstypename[:]),\n\t\tSource:     unix.ByteSliceToString(entry.Mntfromname[:]),\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go",
    "content": "package mountinfo\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// GetMountsFromReader retrieves a list of mounts from the\n// reader provided, with an optional filter applied (use nil\n// for no filter). This can be useful in tests or benchmarks\n// that provide fake mountinfo data, or when a source other\n// than /proc/thread-self/mountinfo needs to be read from.\n//\n// This function is Linux-specific.\nfunc GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) {\n\ts := bufio.NewScanner(r)\n\tout := []*Info{}\n\tfor s.Scan() {\n\t\tvar err error\n\n\t\t/*\n\t\t   See http://man7.org/linux/man-pages/man5/proc.5.html\n\n\t\t   36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue\n\t\t   (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)\n\n\t\t   (1) mount ID:  unique identifier of the mount (may be reused after umount)\n\t\t   (2) parent ID:  ID of parent (or of self for the top of the mount tree)\n\t\t   (3) major:minor:  value of st_dev for files on filesystem\n\t\t   (4) root:  root of the mount within the filesystem\n\t\t   (5) mount point:  mount point relative to the process's root\n\t\t   (6) mount options:  per mount options\n\t\t   (7) optional fields:  zero or more fields of the form \"tag[:value]\"\n\t\t   (8) separator:  marks the end of the optional fields\n\t\t   (9) filesystem type:  name of filesystem of the form \"type[.subtype]\"\n\t\t   (10) mount source:  filesystem specific information or \"none\"\n\t\t   (11) super options:  per super block options\n\n\t\t   In other words, we have:\n\t\t    * 6 mandatory fields\t(1)..(6)\n\t\t    * 0 or more optional fields\t(7)\n\t\t    * a separator field\t\t(8)\n\t\t    * 3 mandatory fields\t(9)..(11)\n\t\t*/\n\n\t\ttext := s.Text()\n\t\tfields := strings.Split(text, \" \")\n\t\tnumFields := len(fields)\n\t\tif numFields < 10 {\n\t\t\t// should be at least 10 fields\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: not enough fields (%d)\", text, numFields)\n\t\t}\n\n\t\t// separator field\n\t\tsepIdx := numFields - 4\n\t\t// In Linux <= 3.9 mounting a cifs with spaces in a share\n\t\t// name (like \"//srv/My Docs\") _may_ end up having a space\n\t\t// in the last field of mountinfo (like \"unc=//serv/My Docs\").\n\t\t// Since kernel 3.10-rc1, cifs option \"unc=\" is ignored,\n\t\t// so spaces should not appear.\n\t\t//\n\t\t// Check for a separator, and work around the spaces bug\n\t\tfor fields[sepIdx] != \"-\" {\n\t\t\tsepIdx--\n\t\t\tif sepIdx == 5 {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: missing - separator\", text)\n\t\t\t}\n\t\t}\n\n\t\tp := &Info{}\n\n\t\tp.Mountpoint, err = unescape(fields[4])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: mount point: %w\", fields[4], err)\n\t\t}\n\t\tp.FSType, err = unescape(fields[sepIdx+1])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: fstype: %w\", fields[sepIdx+1], err)\n\t\t}\n\t\tp.Source, err = unescape(fields[sepIdx+2])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: source: %w\", fields[sepIdx+2], err)\n\t\t}\n\t\tp.VFSOptions = fields[sepIdx+3]\n\n\t\t// ignore any numbers parsing errors, as there should not be any\n\t\tp.ID, _ = strconv.Atoi(fields[0])\n\t\tp.Parent, _ = strconv.Atoi(fields[1])\n\t\tmm := strings.SplitN(fields[2], \":\", 3)\n\t\tif len(mm) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: unexpected major:minor pair %s\", text, mm)\n\t\t}\n\t\tp.Major, _ = strconv.Atoi(mm[0])\n\t\tp.Minor, _ = strconv.Atoi(mm[1])\n\n\t\tp.Root, err = unescape(fields[3])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing '%s' failed: root: %w\", fields[3], err)\n\t\t}\n\n\t\tp.Options = fields[5]\n\n\t\t// zero or more optional fields\n\t\tp.Optional = strings.Join(fields[6:sepIdx], \" \")\n\n\t\t// Run the filter after parsing all fields.\n\t\tvar skip, stop bool\n\t\tif filter != nil {\n\t\t\tskip, stop = filter(p)\n\t\t\tif skip {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tout = append(out, p)\n\t\tif stop {\n\t\t\tbreak\n\t\t}\n\t}\n\tif err := s.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nvar (\n\thaveProcThreadSelf     bool\n\thaveProcThreadSelfOnce sync.Once\n)\n\nfunc parseMountTable(filter FilterFunc) (_ []*Info, err error) {\n\thaveProcThreadSelfOnce.Do(func() {\n\t\t_, err := os.Stat(\"/proc/thread-self/mountinfo\")\n\t\thaveProcThreadSelf = err == nil\n\t})\n\n\t// We need to lock ourselves to the current OS thread in order to make sure\n\t// that the thread referenced by /proc/thread-self stays alive until we\n\t// finish parsing the file.\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\n\tvar f *os.File\n\tif haveProcThreadSelf {\n\t\tf, err = os.Open(\"/proc/thread-self/mountinfo\")\n\t} else {\n\t\t// On pre-3.17 kernels (such as CentOS 7), we don't have\n\t\t// /proc/thread-self/ so we need to manually construct\n\t\t// /proc/self/task/<tid>/ as a fallback.\n\t\tf, err = os.Open(\"/proc/self/task/\" + strconv.Itoa(unix.Gettid()) + \"/mountinfo\")\n\t\tif os.IsNotExist(err) {\n\t\t\t// If /proc/self/task/... failed, it means that our active pid\n\t\t\t// namespace doesn't match the pid namespace of the /proc mount. In\n\t\t\t// this case we just have to make do with /proc/self, since there\n\t\t\t// is no other way of figuring out our tid in a parent pid\n\t\t\t// namespace on pre-3.17 kernels.\n\t\t\tf, err = os.Open(\"/proc/self/mountinfo\")\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\n\treturn GetMountsFromReader(f, filter)\n}\n\n// PidMountInfo retrieves the list of mounts from a given process' mount\n// namespace. Unless there is a need to get mounts from a mount namespace\n// different from that of a calling process, use GetMounts.\n//\n// This function is Linux-specific.\n//\n// Deprecated: this will be removed before v1; use GetMountsFromReader with\n// opened /proc/<pid>/mountinfo as an argument instead.\nfunc PidMountInfo(pid int) ([]*Info, error) {\n\tf, err := os.Open(fmt.Sprintf(\"/proc/%d/mountinfo\", pid))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\n\treturn GetMountsFromReader(f, nil)\n}\n\n// A few specific characters in mountinfo path entries (root and mountpoint)\n// are escaped using a backslash followed by a character's ascii code in octal.\n//\n//\tspace              -- as \\040\n//\ttab (aka \\t)       -- as \\011\n//\tnewline (aka \\n)   -- as \\012\n//\tbackslash (aka \\\\) -- as \\134\n//\n// This function converts path from mountinfo back, i.e. it unescapes the above sequences.\nfunc unescape(path string) (string, error) {\n\t// try to avoid copying\n\tif strings.IndexByte(path, '\\\\') == -1 {\n\t\treturn path, nil\n\t}\n\n\t// The following code is UTF-8 transparent as it only looks for some\n\t// specific characters (backslash and 0..7) with values < utf8.RuneSelf,\n\t// and everything else is passed through as is.\n\tbuf := make([]byte, len(path))\n\tbufLen := 0\n\tfor i := 0; i < len(path); i++ {\n\t\tif path[i] != '\\\\' {\n\t\t\tbuf[bufLen] = path[i]\n\t\t\tbufLen++\n\t\t\tcontinue\n\t\t}\n\t\ts := path[i:]\n\t\tif len(s) < 4 {\n\t\t\t// too short\n\t\t\treturn \"\", fmt.Errorf(\"bad escape sequence %q: too short\", s)\n\t\t}\n\t\tc := s[1]\n\t\tswitch c {\n\t\tcase '0', '1', '2', '3', '4', '5', '6', '7':\n\t\t\tv := c - '0'\n\t\t\tfor j := 2; j < 4; j++ { // one digit already; two more\n\t\t\t\tif s[j] < '0' || s[j] > '7' {\n\t\t\t\t\treturn \"\", fmt.Errorf(\"bad escape sequence %q: not a digit\", s[:3])\n\t\t\t\t}\n\t\t\t\tx := s[j] - '0'\n\t\t\t\tv = (v << 3) | x\n\t\t\t}\n\t\t\tif v > 255 {\n\t\t\t\treturn \"\", fmt.Errorf(\"bad escape sequence %q: out of range\" + s[:3])\n\t\t\t}\n\t\t\tbuf[bufLen] = v\n\t\t\tbufLen++\n\t\t\ti += 3\n\t\t\tcontinue\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"bad escape sequence %q: not a digit\" + s[:3])\n\n\t\t}\n\t}\n\n\treturn string(buf[:bufLen]), nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_openbsd.go",
    "content": "package mountinfo\n\nimport \"golang.org/x/sys/unix\"\n\nfunc getMountinfo(entry *unix.Statfs_t) *Info {\n\treturn &Info{\n\t\tMountpoint: unix.ByteSliceToString(entry.F_mntonname[:]),\n\t\tFSType:     unix.ByteSliceToString(entry.F_fstypename[:]),\n\t\tSource:     unix.ByteSliceToString(entry.F_mntfromname[:]),\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go",
    "content": "//go:build !windows && !linux && !freebsd && !openbsd && !darwin\n// +build !windows,!linux,!freebsd,!openbsd,!darwin\n\npackage mountinfo\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n)\n\nvar errNotImplemented = fmt.Errorf(\"not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n\nfunc parseMountTable(_ FilterFunc) ([]*Info, error) {\n\treturn nil, errNotImplemented\n}\n\nfunc mounted(path string) (bool, error) {\n\treturn false, errNotImplemented\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/mountinfo/mountinfo_windows.go",
    "content": "package mountinfo\n\nfunc parseMountTable(_ FilterFunc) ([]*Info, error) {\n\t// Do NOT return an error!\n\treturn nil, nil\n}\n\nfunc mounted(_ string) (bool, error) {\n\treturn false, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/LICENSE",
    "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 [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": "vendor/github.com/moby/sys/user/idtools.go",
    "content": "package user\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\n// MkdirOpt is a type for options to pass to Mkdir calls\ntype MkdirOpt func(*mkdirOptions)\n\ntype mkdirOptions struct {\n\tonlyNew bool\n}\n\n// WithOnlyNew is an option for MkdirAllAndChown that will only change ownership and permissions\n// on newly created directories.  If the directory already exists, it will not be modified\nfunc WithOnlyNew(o *mkdirOptions) {\n\to.onlyNew = true\n}\n\n// MkdirAllAndChown creates a directory (include any along the path) and then modifies\n// ownership to the requested uid/gid.  By default, if the directory already exists, this\n// function will still change ownership and permissions. If WithOnlyNew is passed as an\n// option, then only the newly created directories will have ownership and permissions changed.\nfunc MkdirAllAndChown(path string, mode os.FileMode, uid, gid int, opts ...MkdirOpt) error {\n\tvar options mkdirOptions\n\tfor _, opt := range opts {\n\t\topt(&options)\n\t}\n\n\treturn mkdirAs(path, mode, uid, gid, true, options.onlyNew)\n}\n\n// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid.\n// By default, if the directory already exists, this function still changes ownership and permissions.\n// If WithOnlyNew is passed as an option, then only the newly created directory will have ownership\n// and permissions changed.\n// Note that unlike os.Mkdir(), this function does not return IsExist error\n// in case path already exists.\nfunc MkdirAndChown(path string, mode os.FileMode, uid, gid int, opts ...MkdirOpt) error {\n\tvar options mkdirOptions\n\tfor _, opt := range opts {\n\t\topt(&options)\n\t}\n\treturn mkdirAs(path, mode, uid, gid, false, options.onlyNew)\n}\n\n// getRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.\n// If the maps are empty, then the root uid/gid will default to \"real\" 0/0\nfunc getRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {\n\tuid, err := toHost(0, uidMap)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\tgid, err := toHost(0, gidMap)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\treturn uid, gid, nil\n}\n\n// toContainer takes an id mapping, and uses it to translate a\n// host ID to the remapped ID. If no map is provided, then the translation\n// assumes a 1-to-1 mapping and returns the passed in id\nfunc toContainer(hostID int, idMap []IDMap) (int, error) {\n\tif idMap == nil {\n\t\treturn hostID, nil\n\t}\n\tfor _, m := range idMap {\n\t\tif (int64(hostID) >= m.ParentID) && (int64(hostID) <= (m.ParentID + m.Count - 1)) {\n\t\t\tcontID := int(m.ID + (int64(hostID) - m.ParentID))\n\t\t\treturn contID, nil\n\t\t}\n\t}\n\treturn -1, fmt.Errorf(\"host ID %d cannot be mapped to a container ID\", hostID)\n}\n\n// toHost takes an id mapping and a remapped ID, and translates the\n// ID to the mapped host ID. If no map is provided, then the translation\n// assumes a 1-to-1 mapping and returns the passed in id #\nfunc toHost(contID int, idMap []IDMap) (int, error) {\n\tif idMap == nil {\n\t\treturn contID, nil\n\t}\n\tfor _, m := range idMap {\n\t\tif (int64(contID) >= m.ID) && (int64(contID) <= (m.ID + m.Count - 1)) {\n\t\t\thostID := int(m.ParentID + (int64(contID) - m.ID))\n\t\t\treturn hostID, nil\n\t\t}\n\t}\n\treturn -1, fmt.Errorf(\"container ID %d cannot be mapped to a host ID\", contID)\n}\n\n// IdentityMapping contains a mappings of UIDs and GIDs.\n// The zero value represents an empty mapping.\ntype IdentityMapping struct {\n\tUIDMaps []IDMap `json:\"UIDMaps\"`\n\tGIDMaps []IDMap `json:\"GIDMaps\"`\n}\n\n// RootPair returns a uid and gid pair for the root user. The error is ignored\n// because a root user always exists, and the defaults are correct when the uid\n// and gid maps are empty.\nfunc (i IdentityMapping) RootPair() (int, int) {\n\tuid, gid, _ := getRootUIDGID(i.UIDMaps, i.GIDMaps)\n\treturn uid, gid\n}\n\n// ToHost returns the host UID and GID for the container uid, gid.\n// Remapping is only performed if the ids aren't already the remapped root ids\nfunc (i IdentityMapping) ToHost(uid, gid int) (int, int, error) {\n\tvar err error\n\truid, rgid := i.RootPair()\n\n\tif uid != ruid {\n\t\truid, err = toHost(uid, i.UIDMaps)\n\t\tif err != nil {\n\t\t\treturn ruid, rgid, err\n\t\t}\n\t}\n\n\tif gid != rgid {\n\t\trgid, err = toHost(gid, i.GIDMaps)\n\t}\n\treturn ruid, rgid, err\n}\n\n// ToContainer returns the container UID and GID for the host uid and gid\nfunc (i IdentityMapping) ToContainer(uid, gid int) (int, int, error) {\n\truid, err := toContainer(uid, i.UIDMaps)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\trgid, err := toContainer(gid, i.GIDMaps)\n\treturn ruid, rgid, err\n}\n\n// Empty returns true if there are no id mappings\nfunc (i IdentityMapping) Empty() bool {\n\treturn len(i.UIDMaps) == 0 && len(i.GIDMaps) == 0\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/idtools_unix.go",
    "content": "//go:build !windows\n\npackage user\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"syscall\"\n)\n\nfunc mkdirAs(path string, mode os.FileMode, uid, gid int, mkAll, onlyNew bool) error {\n\tpath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tstat, err := os.Stat(path)\n\tif err == nil {\n\t\tif !stat.IsDir() {\n\t\t\treturn &os.PathError{Op: \"mkdir\", Path: path, Err: syscall.ENOTDIR}\n\t\t}\n\t\tif onlyNew {\n\t\t\treturn nil\n\t\t}\n\n\t\t// short-circuit -- we were called with an existing directory and chown was requested\n\t\treturn setPermissions(path, mode, uid, gid, stat)\n\t}\n\n\t// make an array containing the original path asked for, plus (for mkAll == true)\n\t// all path components leading up to the complete path that don't exist before we MkdirAll\n\t// so that we can chown all of them properly at the end.  If onlyNew is true, we won't\n\t// chown the full directory path if it exists\n\tvar paths []string\n\tif os.IsNotExist(err) {\n\t\tpaths = append(paths, path)\n\t}\n\n\tif mkAll {\n\t\t// walk back to \"/\" looking for directories which do not exist\n\t\t// and add them to the paths array for chown after creation\n\t\tdirPath := path\n\t\tfor {\n\t\t\tdirPath = filepath.Dir(dirPath)\n\t\t\tif dirPath == \"/\" {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif _, err = os.Stat(dirPath); os.IsNotExist(err) {\n\t\t\t\tpaths = append(paths, dirPath)\n\t\t\t}\n\t\t}\n\t\tif err = os.MkdirAll(path, mode); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if err = os.Mkdir(path, mode); err != nil {\n\t\treturn err\n\t}\n\t// even if it existed, we will chown the requested path + any subpaths that\n\t// didn't exist when we called MkdirAll\n\tfor _, pathComponent := range paths {\n\t\tif err = setPermissions(pathComponent, mode, uid, gid, nil); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// setPermissions performs a chown/chmod only if the uid/gid don't match what's requested\n// Normally a Chown is a no-op if uid/gid match, but in some cases this can still cause an error, e.g. if the\n// dir is on an NFS share, so don't call chown unless we absolutely must.\n// Likewise for setting permissions.\nfunc setPermissions(p string, mode os.FileMode, uid, gid int, stat os.FileInfo) error {\n\tif stat == nil {\n\t\tvar err error\n\t\tstat, err = os.Stat(p)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif stat.Mode().Perm() != mode.Perm() {\n\t\tif err := os.Chmod(p, mode.Perm()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tssi := stat.Sys().(*syscall.Stat_t)\n\tif ssi.Uid == uint32(uid) && ssi.Gid == uint32(gid) {\n\t\treturn nil\n\t}\n\treturn os.Chown(p, uid, gid)\n}\n\n// LoadIdentityMapping takes a requested username and\n// using the data from /etc/sub{uid,gid} ranges, creates the\n// proper uid and gid remapping ranges for that user/group pair\nfunc LoadIdentityMapping(name string) (IdentityMapping, error) {\n\t// TODO: Consider adding support for calling out to \"getent\"\n\tusr, err := LookupUser(name)\n\tif err != nil {\n\t\treturn IdentityMapping{}, fmt.Errorf(\"could not get user for username %s: %w\", name, err)\n\t}\n\n\tsubuidRanges, err := lookupSubRangesFile(\"/etc/subuid\", usr)\n\tif err != nil {\n\t\treturn IdentityMapping{}, err\n\t}\n\tsubgidRanges, err := lookupSubRangesFile(\"/etc/subgid\", usr)\n\tif err != nil {\n\t\treturn IdentityMapping{}, err\n\t}\n\n\treturn IdentityMapping{\n\t\tUIDMaps: subuidRanges,\n\t\tGIDMaps: subgidRanges,\n\t}, nil\n}\n\nfunc lookupSubRangesFile(path string, usr User) ([]IDMap, error) {\n\tuidstr := strconv.Itoa(usr.Uid)\n\trangeList, err := ParseSubIDFileFilter(path, func(sid SubID) bool {\n\t\treturn sid.Name == usr.Name || sid.Name == uidstr\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(rangeList) == 0 {\n\t\treturn nil, fmt.Errorf(\"no subuid ranges found for user %q\", usr.Name)\n\t}\n\n\tidMap := []IDMap{}\n\n\tvar containerID int64\n\tfor _, idrange := range rangeList {\n\t\tidMap = append(idMap, IDMap{\n\t\t\tID:       containerID,\n\t\t\tParentID: idrange.SubID,\n\t\t\tCount:    idrange.Count,\n\t\t})\n\t\tcontainerID = containerID + idrange.Count\n\t}\n\treturn idMap, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/idtools_windows.go",
    "content": "package user\n\nimport (\n\t\"os\"\n)\n\n// This is currently a wrapper around [os.MkdirAll] since currently\n// permissions aren't set through this path, the identity isn't utilized.\n// Ownership is handled elsewhere, but in the future could be support here\n// too.\nfunc mkdirAs(path string, _ os.FileMode, _, _ int, _, _ bool) error {\n\treturn os.MkdirAll(path, 0)\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/lookup_unix.go",
    "content": "//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris\n// +build darwin dragonfly freebsd linux netbsd openbsd solaris\n\npackage user\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Unix-specific path to the passwd and group formatted files.\nconst (\n\tunixPasswdPath = \"/etc/passwd\"\n\tunixGroupPath  = \"/etc/group\"\n)\n\n// LookupUser looks up a user by their username in /etc/passwd. If the user\n// cannot be found (or there is no /etc/passwd file on the filesystem), then\n// LookupUser returns an error.\nfunc LookupUser(username string) (User, error) {\n\treturn lookupUserFunc(func(u User) bool {\n\t\treturn u.Name == username\n\t})\n}\n\n// LookupUid looks up a user by their user id in /etc/passwd. If the user cannot\n// be found (or there is no /etc/passwd file on the filesystem), then LookupId\n// returns an error.\nfunc LookupUid(uid int) (User, error) {\n\treturn lookupUserFunc(func(u User) bool {\n\t\treturn u.Uid == uid\n\t})\n}\n\nfunc lookupUserFunc(filter func(u User) bool) (User, error) {\n\t// Get operating system-specific passwd reader-closer.\n\tpasswd, err := GetPasswd()\n\tif err != nil {\n\t\treturn User{}, err\n\t}\n\tdefer passwd.Close()\n\n\t// Get the users.\n\tusers, err := ParsePasswdFilter(passwd, filter)\n\tif err != nil {\n\t\treturn User{}, err\n\t}\n\n\t// No user entries found.\n\tif len(users) == 0 {\n\t\treturn User{}, ErrNoPasswdEntries\n\t}\n\n\t// Assume the first entry is the \"correct\" one.\n\treturn users[0], nil\n}\n\n// LookupGroup looks up a group by its name in /etc/group. If the group cannot\n// be found (or there is no /etc/group file on the filesystem), then LookupGroup\n// returns an error.\nfunc LookupGroup(groupname string) (Group, error) {\n\treturn lookupGroupFunc(func(g Group) bool {\n\t\treturn g.Name == groupname\n\t})\n}\n\n// LookupGid looks up a group by its group id in /etc/group. If the group cannot\n// be found (or there is no /etc/group file on the filesystem), then LookupGid\n// returns an error.\nfunc LookupGid(gid int) (Group, error) {\n\treturn lookupGroupFunc(func(g Group) bool {\n\t\treturn g.Gid == gid\n\t})\n}\n\nfunc lookupGroupFunc(filter func(g Group) bool) (Group, error) {\n\t// Get operating system-specific group reader-closer.\n\tgroup, err := GetGroup()\n\tif err != nil {\n\t\treturn Group{}, err\n\t}\n\tdefer group.Close()\n\n\t// Get the users.\n\tgroups, err := ParseGroupFilter(group, filter)\n\tif err != nil {\n\t\treturn Group{}, err\n\t}\n\n\t// No user entries found.\n\tif len(groups) == 0 {\n\t\treturn Group{}, ErrNoGroupEntries\n\t}\n\n\t// Assume the first entry is the \"correct\" one.\n\treturn groups[0], nil\n}\n\nfunc GetPasswdPath() (string, error) {\n\treturn unixPasswdPath, nil\n}\n\nfunc GetPasswd() (io.ReadCloser, error) {\n\treturn os.Open(unixPasswdPath)\n}\n\nfunc GetGroupPath() (string, error) {\n\treturn unixGroupPath, nil\n}\n\nfunc GetGroup() (io.ReadCloser, error) {\n\treturn os.Open(unixGroupPath)\n}\n\n// CurrentUser looks up the current user by their user id in /etc/passwd. If the\n// user cannot be found (or there is no /etc/passwd file on the filesystem),\n// then CurrentUser returns an error.\nfunc CurrentUser() (User, error) {\n\treturn LookupUid(unix.Getuid())\n}\n\n// CurrentGroup looks up the current user's group by their primary group id's\n// entry in /etc/passwd. If the group cannot be found (or there is no\n// /etc/group file on the filesystem), then CurrentGroup returns an error.\nfunc CurrentGroup() (Group, error) {\n\treturn LookupGid(unix.Getgid())\n}\n\nfunc currentUserSubIDs(fileName string) ([]SubID, error) {\n\tu, err := CurrentUser()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfilter := func(entry SubID) bool {\n\t\treturn entry.Name == u.Name || entry.Name == strconv.Itoa(u.Uid)\n\t}\n\treturn ParseSubIDFileFilter(fileName, filter)\n}\n\nfunc CurrentUserSubUIDs() ([]SubID, error) {\n\treturn currentUserSubIDs(\"/etc/subuid\")\n}\n\nfunc CurrentUserSubGIDs() ([]SubID, error) {\n\treturn currentUserSubIDs(\"/etc/subgid\")\n}\n\nfunc CurrentProcessUIDMap() ([]IDMap, error) {\n\treturn ParseIDMapFile(\"/proc/self/uid_map\")\n}\n\nfunc CurrentProcessGIDMap() ([]IDMap, error) {\n\treturn ParseIDMapFile(\"/proc/self/gid_map\")\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/user.go",
    "content": "package user\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nconst (\n\tminID = 0\n\tmaxID = 1<<31 - 1 // for 32-bit systems compatibility\n)\n\nvar (\n\t// ErrNoPasswdEntries is returned if no matching entries were found in /etc/group.\n\tErrNoPasswdEntries = errors.New(\"no matching entries in passwd file\")\n\t// ErrNoGroupEntries is returned if no matching entries were found in /etc/passwd.\n\tErrNoGroupEntries = errors.New(\"no matching entries in group file\")\n\t// ErrRange is returned if a UID or GID is outside of the valid range.\n\tErrRange = fmt.Errorf(\"uids and gids must be in range %d-%d\", minID, maxID)\n)\n\ntype User struct {\n\tName  string\n\tPass  string\n\tUid   int\n\tGid   int\n\tGecos string\n\tHome  string\n\tShell string\n}\n\ntype Group struct {\n\tName string\n\tPass string\n\tGid  int\n\tList []string\n}\n\n// SubID represents an entry in /etc/sub{u,g}id\ntype SubID struct {\n\tName  string\n\tSubID int64\n\tCount int64\n}\n\n// IDMap represents an entry in /proc/PID/{u,g}id_map\ntype IDMap struct {\n\tID       int64\n\tParentID int64\n\tCount    int64\n}\n\nfunc parseLine(line []byte, v ...interface{}) {\n\tparseParts(bytes.Split(line, []byte(\":\")), v...)\n}\n\nfunc parseParts(parts [][]byte, v ...interface{}) {\n\tif len(parts) == 0 {\n\t\treturn\n\t}\n\n\tfor i, p := range parts {\n\t\t// Ignore cases where we don't have enough fields to populate the arguments.\n\t\t// Some configuration files like to misbehave.\n\t\tif len(v) <= i {\n\t\t\tbreak\n\t\t}\n\n\t\t// Use the type of the argument to figure out how to parse it, scanf() style.\n\t\t// This is legit.\n\t\tswitch e := v[i].(type) {\n\t\tcase *string:\n\t\t\t*e = string(p)\n\t\tcase *int:\n\t\t\t// \"numbers\", with conversion errors ignored because of some misbehaving configuration files.\n\t\t\t*e, _ = strconv.Atoi(string(p))\n\t\tcase *int64:\n\t\t\t*e, _ = strconv.ParseInt(string(p), 10, 64)\n\t\tcase *[]string:\n\t\t\t// Comma-separated lists.\n\t\t\tif len(p) != 0 {\n\t\t\t\t*e = strings.Split(string(p), \",\")\n\t\t\t} else {\n\t\t\t\t*e = []string{}\n\t\t\t}\n\t\tdefault:\n\t\t\t// Someone goof'd when writing code using this function. Scream so they can hear us.\n\t\t\tpanic(fmt.Sprintf(\"parseLine only accepts {*string, *int, *int64, *[]string} as arguments! %#v is not a pointer!\", e))\n\t\t}\n\t}\n}\n\nfunc ParsePasswdFile(path string) ([]User, error) {\n\tpasswd, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer passwd.Close()\n\treturn ParsePasswd(passwd)\n}\n\nfunc ParsePasswd(passwd io.Reader) ([]User, error) {\n\treturn ParsePasswdFilter(passwd, nil)\n}\n\nfunc ParsePasswdFileFilter(path string, filter func(User) bool) ([]User, error) {\n\tpasswd, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer passwd.Close()\n\treturn ParsePasswdFilter(passwd, filter)\n}\n\nfunc ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) {\n\tif r == nil {\n\t\treturn nil, errors.New(\"nil source for passwd-formatted data\")\n\t}\n\n\tvar (\n\t\ts   = bufio.NewScanner(r)\n\t\tout = []User{}\n\t)\n\n\tfor s.Scan() {\n\t\tline := bytes.TrimSpace(s.Bytes())\n\t\tif len(line) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// see: man 5 passwd\n\t\t//  name:password:UID:GID:GECOS:directory:shell\n\t\t// Name:Pass:Uid:Gid:Gecos:Home:Shell\n\t\t//  root:x:0:0:root:/root:/bin/bash\n\t\t//  adm:x:3:4:adm:/var/adm:/bin/false\n\t\tp := User{}\n\t\tparseLine(line, &p.Name, &p.Pass, &p.Uid, &p.Gid, &p.Gecos, &p.Home, &p.Shell)\n\n\t\tif filter == nil || filter(p) {\n\t\t\tout = append(out, p)\n\t\t}\n\t}\n\tif err := s.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn out, nil\n}\n\nfunc ParseGroupFile(path string) ([]Group, error) {\n\tgroup, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer group.Close()\n\treturn ParseGroup(group)\n}\n\nfunc ParseGroup(group io.Reader) ([]Group, error) {\n\treturn ParseGroupFilter(group, nil)\n}\n\nfunc ParseGroupFileFilter(path string, filter func(Group) bool) ([]Group, error) {\n\tgroup, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer group.Close()\n\treturn ParseGroupFilter(group, filter)\n}\n\nfunc ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) {\n\tif r == nil {\n\t\treturn nil, errors.New(\"nil source for group-formatted data\")\n\t}\n\trd := bufio.NewReader(r)\n\tout := []Group{}\n\n\t// Read the file line-by-line.\n\tfor {\n\t\tvar (\n\t\t\tisPrefix  bool\n\t\t\twholeLine []byte\n\t\t\terr       error\n\t\t)\n\n\t\t// Read the next line. We do so in chunks (as much as reader's\n\t\t// buffer is able to keep), check if we read enough columns\n\t\t// already on each step and store final result in wholeLine.\n\t\tfor {\n\t\t\tvar line []byte\n\t\t\tline, isPrefix, err = rd.ReadLine()\n\t\t\tif err != nil {\n\t\t\t\t// We should return no error if EOF is reached\n\t\t\t\t// without a match.\n\t\t\t\tif err == io.EOF {\n\t\t\t\t\terr = nil\n\t\t\t\t}\n\t\t\t\treturn out, err\n\t\t\t}\n\n\t\t\t// Simple common case: line is short enough to fit in a\n\t\t\t// single reader's buffer.\n\t\t\tif !isPrefix && len(wholeLine) == 0 {\n\t\t\t\twholeLine = line\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\twholeLine = append(wholeLine, line...)\n\n\t\t\t// Check if we read the whole line already.\n\t\t\tif !isPrefix {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// There's no spec for /etc/passwd or /etc/group, but we try to follow\n\t\t// the same rules as the glibc parser, which allows comments and blank\n\t\t// space at the beginning of a line.\n\t\twholeLine = bytes.TrimSpace(wholeLine)\n\t\tif len(wholeLine) == 0 || wholeLine[0] == '#' {\n\t\t\tcontinue\n\t\t}\n\n\t\t// see: man 5 group\n\t\t//  group_name:password:GID:user_list\n\t\t// Name:Pass:Gid:List\n\t\t//  root:x:0:root\n\t\t//  adm:x:4:root,adm,daemon\n\t\tp := Group{}\n\t\tparseLine(wholeLine, &p.Name, &p.Pass, &p.Gid, &p.List)\n\n\t\tif filter == nil || filter(p) {\n\t\t\tout = append(out, p)\n\t\t}\n\t}\n}\n\ntype ExecUser struct {\n\tUid   int\n\tGid   int\n\tSgids []int\n\tHome  string\n}\n\n// GetExecUserPath is a wrapper for GetExecUser. It reads data from each of the\n// given file paths and uses that data as the arguments to GetExecUser. If the\n// files cannot be opened for any reason, the error is ignored and a nil\n// io.Reader is passed instead.\nfunc GetExecUserPath(userSpec string, defaults *ExecUser, passwdPath, groupPath string) (*ExecUser, error) {\n\tvar passwd, group io.Reader\n\n\tif passwdFile, err := os.Open(passwdPath); err == nil {\n\t\tpasswd = passwdFile\n\t\tdefer passwdFile.Close()\n\t}\n\n\tif groupFile, err := os.Open(groupPath); err == nil {\n\t\tgroup = groupFile\n\t\tdefer groupFile.Close()\n\t}\n\n\treturn GetExecUser(userSpec, defaults, passwd, group)\n}\n\n// GetExecUser parses a user specification string (using the passwd and group\n// readers as sources for /etc/passwd and /etc/group data, respectively). In\n// the case of blank fields or missing data from the sources, the values in\n// defaults is used.\n//\n// GetExecUser will return an error if a user or group literal could not be\n// found in any entry in passwd and group respectively.\n//\n// Examples of valid user specifications are:\n//   - \"\"\n//   - \"user\"\n//   - \"uid\"\n//   - \"user:group\"\n//   - \"uid:gid\n//   - \"user:gid\"\n//   - \"uid:group\"\n//\n// It should be noted that if you specify a numeric user or group id, they will\n// not be evaluated as usernames (only the metadata will be filled). So attempting\n// to parse a user with user.Name = \"1337\" will produce the user with a UID of\n// 1337.\nfunc GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) (*ExecUser, error) {\n\tif defaults == nil {\n\t\tdefaults = new(ExecUser)\n\t}\n\n\t// Copy over defaults.\n\tuser := &ExecUser{\n\t\tUid:   defaults.Uid,\n\t\tGid:   defaults.Gid,\n\t\tSgids: defaults.Sgids,\n\t\tHome:  defaults.Home,\n\t}\n\n\t// Sgids slice *cannot* be nil.\n\tif user.Sgids == nil {\n\t\tuser.Sgids = []int{}\n\t}\n\n\t// Allow for userArg to have either \"user\" syntax, or optionally \"user:group\" syntax\n\tvar userArg, groupArg string\n\tparseLine([]byte(userSpec), &userArg, &groupArg)\n\n\t// Convert userArg and groupArg to be numeric, so we don't have to execute\n\t// Atoi *twice* for each iteration over lines.\n\tuidArg, uidErr := strconv.Atoi(userArg)\n\tgidArg, gidErr := strconv.Atoi(groupArg)\n\n\t// Find the matching user.\n\tusers, err := ParsePasswdFilter(passwd, func(u User) bool {\n\t\tif userArg == \"\" {\n\t\t\t// Default to current state of the user.\n\t\t\treturn u.Uid == user.Uid\n\t\t}\n\n\t\tif uidErr == nil {\n\t\t\t// If the userArg is numeric, always treat it as a UID.\n\t\t\treturn uidArg == u.Uid\n\t\t}\n\n\t\treturn u.Name == userArg\n\t})\n\n\t// If we can't find the user, we have to bail.\n\tif err != nil && passwd != nil {\n\t\tif userArg == \"\" {\n\t\t\tuserArg = strconv.Itoa(user.Uid)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"unable to find user %s: %w\", userArg, err)\n\t}\n\n\tvar matchedUserName string\n\tif len(users) > 0 {\n\t\t// First match wins, even if there's more than one matching entry.\n\t\tmatchedUserName = users[0].Name\n\t\tuser.Uid = users[0].Uid\n\t\tuser.Gid = users[0].Gid\n\t\tuser.Home = users[0].Home\n\t} else if userArg != \"\" {\n\t\t// If we can't find a user with the given username, the only other valid\n\t\t// option is if it's a numeric username with no associated entry in passwd.\n\n\t\tif uidErr != nil {\n\t\t\t// Not numeric.\n\t\t\treturn nil, fmt.Errorf(\"unable to find user %s: %w\", userArg, ErrNoPasswdEntries)\n\t\t}\n\t\tuser.Uid = uidArg\n\n\t\t// Must be inside valid uid range.\n\t\tif user.Uid < minID || user.Uid > maxID {\n\t\t\treturn nil, ErrRange\n\t\t}\n\n\t\t// Okay, so it's numeric. We can just roll with this.\n\t}\n\n\t// On to the groups. If we matched a username, we need to do this because of\n\t// the supplementary group IDs.\n\tif groupArg != \"\" || matchedUserName != \"\" {\n\t\tgroups, err := ParseGroupFilter(group, func(g Group) bool {\n\t\t\t// If the group argument isn't explicit, we'll just search for it.\n\t\t\tif groupArg == \"\" {\n\t\t\t\t// Check if user is a member of this group.\n\t\t\t\tfor _, u := range g.List {\n\t\t\t\t\tif u == matchedUserName {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif gidErr == nil {\n\t\t\t\t// If the groupArg is numeric, always treat it as a GID.\n\t\t\t\treturn gidArg == g.Gid\n\t\t\t}\n\n\t\t\treturn g.Name == groupArg\n\t\t})\n\t\tif err != nil && group != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to find groups for spec %v: %w\", matchedUserName, err)\n\t\t}\n\n\t\t// Only start modifying user.Gid if it is in explicit form.\n\t\tif groupArg != \"\" {\n\t\t\tif len(groups) > 0 {\n\t\t\t\t// First match wins, even if there's more than one matching entry.\n\t\t\t\tuser.Gid = groups[0].Gid\n\t\t\t} else {\n\t\t\t\t// If we can't find a group with the given name, the only other valid\n\t\t\t\t// option is if it's a numeric group name with no associated entry in group.\n\n\t\t\t\tif gidErr != nil {\n\t\t\t\t\t// Not numeric.\n\t\t\t\t\treturn nil, fmt.Errorf(\"unable to find group %s: %w\", groupArg, ErrNoGroupEntries)\n\t\t\t\t}\n\t\t\t\tuser.Gid = gidArg\n\n\t\t\t\t// Must be inside valid gid range.\n\t\t\t\tif user.Gid < minID || user.Gid > maxID {\n\t\t\t\t\treturn nil, ErrRange\n\t\t\t\t}\n\n\t\t\t\t// Okay, so it's numeric. We can just roll with this.\n\t\t\t}\n\t\t} else if len(groups) > 0 {\n\t\t\t// Supplementary group ids only make sense if in the implicit form.\n\t\t\tuser.Sgids = make([]int, len(groups))\n\t\t\tfor i, group := range groups {\n\t\t\t\tuser.Sgids[i] = group.Gid\n\t\t\t}\n\t\t}\n\t}\n\n\treturn user, nil\n}\n\n// GetAdditionalGroups looks up a list of groups by name or group id\n// against the given /etc/group formatted data. If a group name cannot\n// be found, an error will be returned. If a group id cannot be found,\n// or the given group data is nil, the id will be returned as-is\n// provided it is in the legal range.\nfunc GetAdditionalGroups(additionalGroups []string, group io.Reader) ([]int, error) {\n\tgroups := []Group{}\n\tif group != nil {\n\t\tvar err error\n\t\tgroups, err = ParseGroupFilter(group, func(g Group) bool {\n\t\t\tfor _, ag := range additionalGroups {\n\t\t\t\tif g.Name == ag || strconv.Itoa(g.Gid) == ag {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Unable to find additional groups %v: %w\", additionalGroups, err)\n\t\t}\n\t}\n\n\tgidMap := make(map[int]struct{})\n\tfor _, ag := range additionalGroups {\n\t\tvar found bool\n\t\tfor _, g := range groups {\n\t\t\t// if we found a matched group either by name or gid, take the\n\t\t\t// first matched as correct\n\t\t\tif g.Name == ag || strconv.Itoa(g.Gid) == ag {\n\t\t\t\tif _, ok := gidMap[g.Gid]; !ok {\n\t\t\t\t\tgidMap[g.Gid] = struct{}{}\n\t\t\t\t\tfound = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// we asked for a group but didn't find it. let's check to see\n\t\t// if we wanted a numeric group\n\t\tif !found {\n\t\t\tgid, err := strconv.ParseInt(ag, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\t// Not a numeric ID either.\n\t\t\t\treturn nil, fmt.Errorf(\"Unable to find group %s: %w\", ag, ErrNoGroupEntries)\n\t\t\t}\n\t\t\t// Ensure gid is inside gid range.\n\t\t\tif gid < minID || gid > maxID {\n\t\t\t\treturn nil, ErrRange\n\t\t\t}\n\t\t\tgidMap[int(gid)] = struct{}{}\n\t\t}\n\t}\n\tgids := []int{}\n\tfor gid := range gidMap {\n\t\tgids = append(gids, gid)\n\t}\n\treturn gids, nil\n}\n\n// GetAdditionalGroupsPath is a wrapper around GetAdditionalGroups\n// that opens the groupPath given and gives it as an argument to\n// GetAdditionalGroups.\nfunc GetAdditionalGroupsPath(additionalGroups []string, groupPath string) ([]int, error) {\n\tvar group io.Reader\n\n\tif groupFile, err := os.Open(groupPath); err == nil {\n\t\tgroup = groupFile\n\t\tdefer groupFile.Close()\n\t}\n\treturn GetAdditionalGroups(additionalGroups, group)\n}\n\nfunc ParseSubIDFile(path string) ([]SubID, error) {\n\tsubid, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer subid.Close()\n\treturn ParseSubID(subid)\n}\n\nfunc ParseSubID(subid io.Reader) ([]SubID, error) {\n\treturn ParseSubIDFilter(subid, nil)\n}\n\nfunc ParseSubIDFileFilter(path string, filter func(SubID) bool) ([]SubID, error) {\n\tsubid, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer subid.Close()\n\treturn ParseSubIDFilter(subid, filter)\n}\n\nfunc ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) {\n\tif r == nil {\n\t\treturn nil, errors.New(\"nil source for subid-formatted data\")\n\t}\n\n\tvar (\n\t\ts   = bufio.NewScanner(r)\n\t\tout = []SubID{}\n\t)\n\n\tfor s.Scan() {\n\t\tline := bytes.TrimSpace(s.Bytes())\n\t\tif len(line) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// see: man 5 subuid\n\t\tp := SubID{}\n\t\tparseLine(line, &p.Name, &p.SubID, &p.Count)\n\n\t\tif filter == nil || filter(p) {\n\t\t\tout = append(out, p)\n\t\t}\n\t}\n\tif err := s.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn out, nil\n}\n\nfunc ParseIDMapFile(path string) ([]IDMap, error) {\n\tr, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer r.Close()\n\treturn ParseIDMap(r)\n}\n\nfunc ParseIDMap(r io.Reader) ([]IDMap, error) {\n\treturn ParseIDMapFilter(r, nil)\n}\n\nfunc ParseIDMapFileFilter(path string, filter func(IDMap) bool) ([]IDMap, error) {\n\tr, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer r.Close()\n\treturn ParseIDMapFilter(r, filter)\n}\n\nfunc ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) {\n\tif r == nil {\n\t\treturn nil, errors.New(\"nil source for idmap-formatted data\")\n\t}\n\n\tvar (\n\t\ts   = bufio.NewScanner(r)\n\t\tout = []IDMap{}\n\t)\n\n\tfor s.Scan() {\n\t\tline := bytes.TrimSpace(s.Bytes())\n\t\tif len(line) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// see: man 7 user_namespaces\n\t\tp := IDMap{}\n\t\tparseParts(bytes.Fields(line), &p.ID, &p.ParentID, &p.Count)\n\n\t\tif filter == nil || filter(p) {\n\t\t\tout = append(out, p)\n\t\t}\n\t}\n\tif err := s.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/github.com/moby/sys/user/user_fuzzer.go",
    "content": "//go:build gofuzz\n// +build gofuzz\n\npackage user\n\nimport (\n\t\"io\"\n\t\"strings\"\n)\n\nfunc IsDivisbleBy(n int, divisibleby int) bool {\n\treturn (n % divisibleby) == 0\n}\n\nfunc FuzzUser(data []byte) int {\n\tif len(data) == 0 {\n\t\treturn -1\n\t}\n\tif !IsDivisbleBy(len(data), 5) {\n\t\treturn -1\n\t}\n\n\tvar divided [][]byte\n\n\tchunkSize := len(data) / 5\n\n\tfor i := 0; i < len(data); i += chunkSize {\n\t\tend := i + chunkSize\n\n\t\tdivided = append(divided, data[i:end])\n\t}\n\n\t_, _ = ParsePasswdFilter(strings.NewReader(string(divided[0])), nil)\n\n\tvar passwd, group io.Reader\n\n\tgroup = strings.NewReader(string(divided[1]))\n\t_, _ = GetAdditionalGroups([]string{string(divided[2])}, group)\n\n\tpasswd = strings.NewReader(string(divided[3]))\n\t_, _ = GetExecUser(string(divided[4]), nil, passwd, group)\n\treturn 1\n}\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/.gitignore",
    "content": "/coverage.txt\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/.travis.yml",
    "content": "language: go\n\ngo:\n  - 1.8.x\n  - 1.x\n\nbefore_install:\n  - go get -t -v ./...\n\nscript:\n  - ./test.sh\n\nafter_success:\n  - bash <(curl -s https://codecov.io/bash)\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/LICENSE",
    "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": "vendor/github.com/modern-go/concurrent/README.md",
    "content": "# concurrent\n\n[![Sourcegraph](https://sourcegraph.com/github.com/modern-go/concurrent/-/badge.svg)](https://sourcegraph.com/github.com/modern-go/concurrent?badge)\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/modern-go/concurrent)\n[![Build Status](https://travis-ci.org/modern-go/concurrent.svg?branch=master)](https://travis-ci.org/modern-go/concurrent)\n[![codecov](https://codecov.io/gh/modern-go/concurrent/branch/master/graph/badge.svg)](https://codecov.io/gh/modern-go/concurrent)\n[![rcard](https://goreportcard.com/badge/github.com/modern-go/concurrent)](https://goreportcard.com/report/github.com/modern-go/concurrent)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/modern-go/concurrent/master/LICENSE)\n\n* concurrent.Map: backport sync.Map for go below 1.9\n* concurrent.Executor: goroutine with explicit ownership and cancellable\n\n# concurrent.Map\n\nbecause sync.Map is only available in go 1.9, we can use concurrent.Map to make code portable\n\n```go\nm := concurrent.NewMap()\nm.Store(\"hello\", \"world\")\nelem, found := m.Load(\"hello\")\n// elem will be \"world\"\n// found will be true\n```\n\n# concurrent.Executor\n\n```go\nexecutor := concurrent.NewUnboundedExecutor()\nexecutor.Go(func(ctx context.Context) {\n    everyMillisecond := time.NewTicker(time.Millisecond)\n    for {\n        select {\n        case <-ctx.Done():\n            fmt.Println(\"goroutine exited\")\n            return\n        case <-everyMillisecond.C:\n            // do something\n        }\n    }\n})\ntime.Sleep(time.Second)\nexecutor.StopAndWaitForever()\nfmt.Println(\"executor stopped\")\n```\n\nattach goroutine to executor instance, so that we can\n\n* cancel it by stop the executor with Stop/StopAndWait/StopAndWaitForever\n* handle panic by callback: the default behavior will no longer crash your application"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/executor.go",
    "content": "package concurrent\n\nimport \"context\"\n\n// Executor replace go keyword to start a new goroutine\n// the goroutine should cancel itself if the context passed in has been cancelled\n// the goroutine started by the executor, is owned by the executor\n// we can cancel all executors owned by the executor just by stop the executor itself\n// however Executor interface does not Stop method, the one starting and owning executor\n// should use the concrete type of executor, instead of this interface.\ntype Executor interface {\n\t// Go starts a new goroutine controlled by the context\n\tGo(handler func(ctx context.Context))\n}\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/go_above_19.go",
    "content": "//+build go1.9\n\npackage concurrent\n\nimport \"sync\"\n\n// Map is a wrapper for sync.Map introduced in go1.9\ntype Map struct {\n\tsync.Map\n}\n\n// NewMap creates a thread safe Map\nfunc NewMap() *Map {\n\treturn &Map{}\n}\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/go_below_19.go",
    "content": "//+build !go1.9\n\npackage concurrent\n\nimport \"sync\"\n\n// Map implements a thread safe map for go version below 1.9 using mutex\ntype Map struct {\n\tlock sync.RWMutex\n\tdata map[interface{}]interface{}\n}\n\n// NewMap creates a thread safe map\nfunc NewMap() *Map {\n\treturn &Map{\n\t\tdata: make(map[interface{}]interface{}, 32),\n\t}\n}\n\n// Load is same as sync.Map Load\nfunc (m *Map) Load(key interface{}) (elem interface{}, found bool) {\n\tm.lock.RLock()\n\telem, found = m.data[key]\n\tm.lock.RUnlock()\n\treturn\n}\n\n// Load is same as sync.Map Store\nfunc (m *Map) Store(key interface{}, elem interface{}) {\n\tm.lock.Lock()\n\tm.data[key] = elem\n\tm.lock.Unlock()\n}\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/log.go",
    "content": "package concurrent\n\nimport (\n\t\"os\"\n\t\"log\"\n\t\"io/ioutil\"\n)\n\n// ErrorLogger is used to print out error, can be set to writer other than stderr\nvar ErrorLogger = log.New(os.Stderr, \"\", 0)\n\n// InfoLogger is used to print informational message, default to off\nvar InfoLogger = log.New(ioutil.Discard, \"\", 0)"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/test.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\necho \"\" > coverage.txt\n\nfor d in $(go list ./... | grep -v vendor); do\n    go test -coverprofile=profile.out -coverpkg=github.com/modern-go/concurrent $d\n    if [ -f profile.out ]; then\n        cat profile.out >> coverage.txt\n        rm profile.out\n    fi\ndone\n"
  },
  {
    "path": "vendor/github.com/modern-go/concurrent/unbounded_executor.go",
    "content": "package concurrent\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"runtime/debug\"\n\t\"sync\"\n\t\"time\"\n\t\"reflect\"\n)\n\n// HandlePanic logs goroutine panic by default\nvar HandlePanic = func(recovered interface{}, funcName string) {\n\tErrorLogger.Println(fmt.Sprintf(\"%s panic: %v\", funcName, recovered))\n\tErrorLogger.Println(string(debug.Stack()))\n}\n\n// UnboundedExecutor is a executor without limits on counts of alive goroutines\n// it tracks the goroutine started by it, and can cancel them when shutdown\ntype UnboundedExecutor struct {\n\tctx                   context.Context\n\tcancel                context.CancelFunc\n\tactiveGoroutinesMutex *sync.Mutex\n\tactiveGoroutines      map[string]int\n\tHandlePanic           func(recovered interface{}, funcName string)\n}\n\n// GlobalUnboundedExecutor has the life cycle of the program itself\n// any goroutine want to be shutdown before main exit can be started from this executor\n// GlobalUnboundedExecutor expects the main function to call stop\n// it does not magically knows the main function exits\nvar GlobalUnboundedExecutor = NewUnboundedExecutor()\n\n// NewUnboundedExecutor creates a new UnboundedExecutor,\n// UnboundedExecutor can not be created by &UnboundedExecutor{}\n// HandlePanic can be set with a callback to override global HandlePanic\nfunc NewUnboundedExecutor() *UnboundedExecutor {\n\tctx, cancel := context.WithCancel(context.TODO())\n\treturn &UnboundedExecutor{\n\t\tctx:                   ctx,\n\t\tcancel:                cancel,\n\t\tactiveGoroutinesMutex: &sync.Mutex{},\n\t\tactiveGoroutines:      map[string]int{},\n\t}\n}\n\n// Go starts a new goroutine and tracks its lifecycle.\n// Panic will be recovered and logged automatically, except for StopSignal\nfunc (executor *UnboundedExecutor) Go(handler func(ctx context.Context)) {\n\tpc := reflect.ValueOf(handler).Pointer()\n\tf := runtime.FuncForPC(pc)\n\tfuncName := f.Name()\n\tfile, line := f.FileLine(pc)\n\texecutor.activeGoroutinesMutex.Lock()\n\tdefer executor.activeGoroutinesMutex.Unlock()\n\tstartFrom := fmt.Sprintf(\"%s:%d\", file, line)\n\texecutor.activeGoroutines[startFrom] += 1\n\tgo func() {\n\t\tdefer func() {\n\t\t\trecovered := recover()\n\t\t\t// if you want to quit a goroutine without trigger HandlePanic\n\t\t\t// use runtime.Goexit() to quit\n\t\t\tif recovered != nil {\n\t\t\t\tif executor.HandlePanic == nil {\n\t\t\t\t\tHandlePanic(recovered, funcName)\n\t\t\t\t} else {\n\t\t\t\t\texecutor.HandlePanic(recovered, funcName)\n\t\t\t\t}\n\t\t\t}\n\t\t\texecutor.activeGoroutinesMutex.Lock()\n\t\t\texecutor.activeGoroutines[startFrom] -= 1\n\t\t\texecutor.activeGoroutinesMutex.Unlock()\n\t\t}()\n\t\thandler(executor.ctx)\n\t}()\n}\n\n// Stop cancel all goroutines started by this executor without wait\nfunc (executor *UnboundedExecutor) Stop() {\n\texecutor.cancel()\n}\n\n// StopAndWaitForever cancel all goroutines started by this executor and\n// wait until all goroutines exited\nfunc (executor *UnboundedExecutor) StopAndWaitForever() {\n\texecutor.StopAndWait(context.Background())\n}\n\n// StopAndWait cancel all goroutines started by this executor and wait.\n// Wait can be cancelled by the context passed in.\nfunc (executor *UnboundedExecutor) StopAndWait(ctx context.Context) {\n\texecutor.cancel()\n\tfor {\n\t\toneHundredMilliseconds := time.NewTimer(time.Millisecond * 100)\n\t\tselect {\n\t\tcase <-oneHundredMilliseconds.C:\n\t\t\tif executor.checkNoActiveGoroutines() {\n\t\t\t\treturn\n\t\t\t}\n\t\tcase <-ctx.Done():\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (executor *UnboundedExecutor) checkNoActiveGoroutines() bool {\n\texecutor.activeGoroutinesMutex.Lock()\n\tdefer executor.activeGoroutinesMutex.Unlock()\n\tfor startFrom, count := range executor.activeGoroutines {\n\t\tif count > 0 {\n\t\t\tInfoLogger.Println(\"UnboundedExecutor is still waiting goroutines to quit\",\n\t\t\t\t\"startFrom\", startFrom,\n\t\t\t\t\"count\", count)\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/.mailmap",
    "content": "Aaron Lehmann <aaronl@vitelus.com> <aaron.lehmann@docker.com>\nDerek McGowan <derek@mcg.dev> <derek@mcgstyle.net>\nStephen J Day <stephen.day@docker.com> <stevvooe@users.noreply.github.com>\nHaibing Zhou <zhouhaibing089@gmail.com>\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/.pullapprove.yml",
    "content": "version: 2\n\nrequirements:\n  signed_off_by:\n    required: true\n\nalways_pending:\n  title_regex: '^WIP'\n  explanation: 'Work in progress...'\n\ngroup_defaults:\n  required: 2\n  approve_by_comment:\n    enabled: true\n    approve_regex: '^LGTM'\n    reject_regex: '^Rejected'\n  reset_on_push:\n    enabled: true\n  author_approval:\n    ignored: true\n  conditions:\n    branches:\n      - master\n\ngroups:\n  go-digest:\n    teams:\n      - go-digest-maintainers\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/.travis.yml",
    "content": "language: go\ngo:\n  - 1.12.x\n  - 1.13.x\n  - master\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/CONTRIBUTING.md",
    "content": "# Contributing to Docker open source projects\n\nWant to hack on this project? Awesome! Here are instructions to get you started.\n\nThis project is a part of the [Docker](https://www.docker.com) project, and follows\nthe same rules and principles. If you're already familiar with the way\nDocker does things, you'll feel right at home.\n\nOtherwise, go read Docker's\n[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md),\n[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md),\n[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and\n[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md).\n\nFor an in-depth description of our contribution process, visit the\ncontributors guide: [Understand how to contribute](https://docs.docker.com/opensource/workflow/make-a-contribution/)\n\n### Sign your work\n\nThe sign-off is a simple line at the end of the explanation for the patch. Your\nsignature certifies that you wrote the patch or otherwise have the right to pass\nit on as an open-source patch. The rules are pretty simple: if you can certify\nthe below (from [developercertificate.org](http://developercertificate.org/)):\n\n```\nDeveloper Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n1 Letterman Drive\nSuite D4700\nSan Francisco, CA, 94129\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n    have the right to submit it under the open source license\n    indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n    of my knowledge, is covered under an appropriate open source\n    license and I have the right under that license to submit that\n    work with modifications, whether created in whole or in part\n    by me, under the same open source license (unless I am\n    permitted to submit under a different license), as indicated\n    in the file; or\n\n(c) The contribution was provided directly to me by some other\n    person who certified (a), (b) or (c) and I have not modified\n    it.\n\n(d) I understand and agree that this project and the contribution\n    are public and that a record of the contribution (including all\n    personal information I submit with it, including my sign-off) is\n    maintained indefinitely and may be redistributed consistent with\n    this project or the open source license(s) involved.\n```\n\nThen you just add a line to every git commit message:\n\n    Signed-off-by: Joe Smith <joe.smith@email.com>\n\nUse your real name (sorry, no pseudonyms or anonymous contributions.)\n\nIf you set your `user.name` and `user.email` git configs, you can sign your\ncommit automatically with `git commit -s`.\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright 2019, 2020 OCI Contributors\n   Copyright 2016 Docker, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/opencontainers/go-digest/LICENSE.docs",
    "content": "Attribution-ShareAlike 4.0 International\n\n=======================================================================\n\nCreative Commons Corporation (\"Creative Commons\") is not a law firm and\ndoes not provide legal services or legal advice. Distribution of\nCreative Commons public licenses does not create a lawyer-client or\nother relationship. Creative Commons makes its licenses and related\ninformation available on an \"as-is\" basis. Creative Commons gives no\nwarranties regarding its licenses, any material licensed under their\nterms and conditions, or any related information. Creative Commons\ndisclaims all liability for damages resulting from their use to the\nfullest extent possible.\n\nUsing Creative Commons Public Licenses\n\nCreative Commons public licenses provide a standard set of terms and\nconditions that creators and other rights holders may use to share\noriginal works of authorship and other material subject to copyright\nand certain other rights specified in the public license below. The\nfollowing considerations are for informational purposes only, are not\nexhaustive, and do not form part of our licenses.\n\n     Considerations for licensors: Our public licenses are\n     intended for use by those authorized to give the public\n     permission to use material in ways otherwise restricted by\n     copyright and certain other rights. Our licenses are\n     irrevocable. Licensors should read and understand the terms\n     and conditions of the license they choose before applying it.\n     Licensors should also secure all rights necessary before\n     applying our licenses so that the public can reuse the\n     material as expected. Licensors should clearly mark any\n     material not subject to the license. This includes other CC-\n     licensed material, or material used under an exception or\n     limitation to copyright. More considerations for licensors:\n\twiki.creativecommons.org/Considerations_for_licensors\n\n     Considerations for the public: By using one of our public\n     licenses, a licensor grants the public permission to use the\n     licensed material under specified terms and conditions. If\n     the licensor's permission is not necessary for any reason--for\n     example, because of any applicable exception or limitation to\n     copyright--then that use is not regulated by the license. Our\n     licenses grant only permissions under copyright and certain\n     other rights that a licensor has authority to grant. Use of\n     the licensed material may still be restricted for other\n     reasons, including because others have copyright or other\n     rights in the material. A licensor may make special requests,\n     such as asking that all changes be marked or described.\n     Although not required by our licenses, you are encouraged to\n     respect those requests where reasonable. More_considerations\n     for the public:\n\twiki.creativecommons.org/Considerations_for_licensees\n\n=======================================================================\n\nCreative Commons Attribution-ShareAlike 4.0 International Public\nLicense\n\nBy exercising the Licensed Rights (defined below), You accept and agree\nto be bound by the terms and conditions of this Creative Commons\nAttribution-ShareAlike 4.0 International Public License (\"Public\nLicense\"). To the extent this Public License may be interpreted as a\ncontract, You are granted the Licensed Rights in consideration of Your\nacceptance of these terms and conditions, and the Licensor grants You\nsuch rights in consideration of benefits the Licensor receives from\nmaking the Licensed Material available under these terms and\nconditions.\n\n\nSection 1 -- Definitions.\n\n  a. Adapted Material means material subject to Copyright and Similar\n     Rights that is derived from or based upon the Licensed Material\n     and in which the Licensed Material is translated, altered,\n     arranged, transformed, or otherwise modified in a manner requiring\n     permission under the Copyright and Similar Rights held by the\n     Licensor. For purposes of this Public License, where the Licensed\n     Material is a musical work, performance, or sound recording,\n     Adapted Material is always produced where the Licensed Material is\n     synched in timed relation with a moving image.\n\n  b. Adapter's License means the license You apply to Your Copyright\n     and Similar Rights in Your contributions to Adapted Material in\n     accordance with the terms and conditions of this Public License.\n\n  c. BY-SA Compatible License means a license listed at\n     creativecommons.org/compatiblelicenses, approved by Creative\n     Commons as essentially the equivalent of this Public License.\n\n  d. Copyright and Similar Rights means copyright and/or similar rights\n     closely related to copyright including, without limitation,\n     performance, broadcast, sound recording, and Sui Generis Database\n     Rights, without regard to how the rights are labeled or\n     categorized. For purposes of this Public License, the rights\n     specified in Section 2(b)(1)-(2) are not Copyright and Similar\n     Rights.\n\n  e. Effective Technological Measures means those measures that, in the\n     absence of proper authority, may not be circumvented under laws\n     fulfilling obligations under Article 11 of the WIPO Copyright\n     Treaty adopted on December 20, 1996, and/or similar international\n     agreements.\n\n  f. Exceptions and Limitations means fair use, fair dealing, and/or\n     any other exception or limitation to Copyright and Similar Rights\n     that applies to Your use of the Licensed Material.\n\n  g. License Elements means the license attributes listed in the name\n     of a Creative Commons Public License. The License Elements of this\n     Public License are Attribution and ShareAlike.\n\n  h. Licensed Material means the artistic or literary work, database,\n     or other material to which the Licensor applied this Public\n     License.\n\n  i. Licensed Rights means the rights granted to You subject to the\n     terms and conditions of this Public License, which are limited to\n     all Copyright and Similar Rights that apply to Your use of the\n     Licensed Material and that the Licensor has authority to license.\n\n  j. Licensor means the individual(s) or entity(ies) granting rights\n     under this Public License.\n\n  k. Share means to provide material to the public by any means or\n     process that requires permission under the Licensed Rights, such\n     as reproduction, public display, public performance, distribution,\n     dissemination, communication, or importation, and to make material\n     available to the public including in ways that members of the\n     public may access the material from a place and at a time\n     individually chosen by them.\n\n  l. Sui Generis Database Rights means rights other than copyright\n     resulting from Directive 96/9/EC of the European Parliament and of\n     the Council of 11 March 1996 on the legal protection of databases,\n     as amended and/or succeeded, as well as other essentially\n     equivalent rights anywhere in the world.\n\n  m. You means the individual or entity exercising the Licensed Rights\n     under this Public License. Your has a corresponding meaning.\n\n\nSection 2 -- Scope.\n\n  a. License grant.\n\n       1. Subject to the terms and conditions of this Public License,\n          the Licensor hereby grants You a worldwide, royalty-free,\n          non-sublicensable, non-exclusive, irrevocable license to\n          exercise the Licensed Rights in the Licensed Material to:\n\n            a. reproduce and Share the Licensed Material, in whole or\n               in part; and\n\n            b. produce, reproduce, and Share Adapted Material.\n\n       2. Exceptions and Limitations. For the avoidance of doubt, where\n          Exceptions and Limitations apply to Your use, this Public\n          License does not apply, and You do not need to comply with\n          its terms and conditions.\n\n       3. Term. The term of this Public License is specified in Section\n          6(a).\n\n       4. Media and formats; technical modifications allowed. The\n          Licensor authorizes You to exercise the Licensed Rights in\n          all media and formats whether now known or hereafter created,\n          and to make technical modifications necessary to do so. The\n          Licensor waives and/or agrees not to assert any right or\n          authority to forbid You from making technical modifications\n          necessary to exercise the Licensed Rights, including\n          technical modifications necessary to circumvent Effective\n          Technological Measures. For purposes of this Public License,\n          simply making modifications authorized by this Section 2(a)\n          (4) never produces Adapted Material.\n\n       5. Downstream recipients.\n\n            a. Offer from the Licensor -- Licensed Material. Every\n               recipient of the Licensed Material automatically\n               receives an offer from the Licensor to exercise the\n               Licensed Rights under the terms and conditions of this\n               Public License.\n\n            b. Additional offer from the Licensor -- Adapted Material.\n               Every recipient of Adapted Material from You\n               automatically receives an offer from the Licensor to\n               exercise the Licensed Rights in the Adapted Material\n               under the conditions of the Adapter's License You apply.\n\n            c. No downstream restrictions. You may not offer or impose\n               any additional or different terms or conditions on, or\n               apply any Effective Technological Measures to, the\n               Licensed Material if doing so restricts exercise of the\n               Licensed Rights by any recipient of the Licensed\n               Material.\n\n       6. No endorsement. Nothing in this Public License constitutes or\n          may be construed as permission to assert or imply that You\n          are, or that Your use of the Licensed Material is, connected\n          with, or sponsored, endorsed, or granted official status by,\n          the Licensor or others designated to receive attribution as\n          provided in Section 3(a)(1)(A)(i).\n\n  b. Other rights.\n\n       1. Moral rights, such as the right of integrity, are not\n          licensed under this Public License, nor are publicity,\n          privacy, and/or other similar personality rights; however, to\n          the extent possible, the Licensor waives and/or agrees not to\n          assert any such rights held by the Licensor to the limited\n          extent necessary to allow You to exercise the Licensed\n          Rights, but not otherwise.\n\n       2. Patent and trademark rights are not licensed under this\n          Public License.\n\n       3. To the extent possible, the Licensor waives any right to\n          collect royalties from You for the exercise of the Licensed\n          Rights, whether directly or through a collecting society\n          under any voluntary or waivable statutory or compulsory\n          licensing scheme. In all other cases the Licensor expressly\n          reserves any right to collect such royalties.\n\n\nSection 3 -- License Conditions.\n\nYour exercise of the Licensed Rights is expressly made subject to the\nfollowing conditions.\n\n  a. Attribution.\n\n       1. If You Share the Licensed Material (including in modified\n          form), You must:\n\n            a. retain the following if it is supplied by the Licensor\n               with the Licensed Material:\n\n                 i. identification of the creator(s) of the Licensed\n                    Material and any others designated to receive\n                    attribution, in any reasonable manner requested by\n                    the Licensor (including by pseudonym if\n                    designated);\n\n                ii. a copyright notice;\n\n               iii. a notice that refers to this Public License;\n\n                iv. a notice that refers to the disclaimer of\n                    warranties;\n\n                 v. a URI or hyperlink to the Licensed Material to the\n                    extent reasonably practicable;\n\n            b. indicate if You modified the Licensed Material and\n               retain an indication of any previous modifications; and\n\n            c. indicate the Licensed Material is licensed under this\n               Public License, and include the text of, or the URI or\n               hyperlink to, this Public License.\n\n       2. You may satisfy the conditions in Section 3(a)(1) in any\n          reasonable manner based on the medium, means, and context in\n          which You Share the Licensed Material. For example, it may be\n          reasonable to satisfy the conditions by providing a URI or\n          hyperlink to a resource that includes the required\n          information.\n\n       3. If requested by the Licensor, You must remove any of the\n          information required by Section 3(a)(1)(A) to the extent\n          reasonably practicable.\n\n  b. ShareAlike.\n\n     In addition to the conditions in Section 3(a), if You Share\n     Adapted Material You produce, the following conditions also apply.\n\n       1. The Adapter's License You apply must be a Creative Commons\n          license with the same License Elements, this version or\n          later, or a BY-SA Compatible License.\n\n       2. You must include the text of, or the URI or hyperlink to, the\n          Adapter's License You apply. You may satisfy this condition\n          in any reasonable manner based on the medium, means, and\n          context in which You Share Adapted Material.\n\n       3. You may not offer or impose any additional or different terms\n          or conditions on, or apply any Effective Technological\n          Measures to, Adapted Material that restrict exercise of the\n          rights granted under the Adapter's License You apply.\n\n\nSection 4 -- Sui Generis Database Rights.\n\nWhere the Licensed Rights include Sui Generis Database Rights that\napply to Your use of the Licensed Material:\n\n  a. for the avoidance of doubt, Section 2(a)(1) grants You the right\n     to extract, reuse, reproduce, and Share all or a substantial\n     portion of the contents of the database;\n\n  b. if You include all or a substantial portion of the database\n     contents in a database in which You have Sui Generis Database\n     Rights, then the database in which You have Sui Generis Database\n     Rights (but not its individual contents) is Adapted Material,\n\n     including for purposes of Section 3(b); and\n  c. You must comply with the conditions in Section 3(a) if You Share\n     all or a substantial portion of the contents of the database.\n\nFor the avoidance of doubt, this Section 4 supplements and does not\nreplace Your obligations under this Public License where the Licensed\nRights include other Copyright and Similar Rights.\n\n\nSection 5 -- Disclaimer of Warranties and Limitation of Liability.\n\n  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE\n     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS\n     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF\n     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,\n     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,\n     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR\n     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,\n     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT\n     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT\n     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.\n\n  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE\n     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,\n     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,\n     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,\n     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR\n     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN\n     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR\n     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR\n     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.\n\n  c. The disclaimer of warranties and limitation of liability provided\n     above shall be interpreted in a manner that, to the extent\n     possible, most closely approximates an absolute disclaimer and\n     waiver of all liability.\n\n\nSection 6 -- Term and Termination.\n\n  a. This Public License applies for the term of the Copyright and\n     Similar Rights licensed here. However, if You fail to comply with\n     this Public License, then Your rights under this Public License\n     terminate automatically.\n\n  b. Where Your right to use the Licensed Material has terminated under\n     Section 6(a), it reinstates:\n\n       1. automatically as of the date the violation is cured, provided\n          it is cured within 30 days of Your discovery of the\n          violation; or\n\n       2. upon express reinstatement by the Licensor.\n\n     For the avoidance of doubt, this Section 6(b) does not affect any\n     right the Licensor may have to seek remedies for Your violations\n     of this Public License.\n\n  c. For the avoidance of doubt, the Licensor may also offer the\n     Licensed Material under separate terms or conditions or stop\n     distributing the Licensed Material at any time; however, doing so\n     will not terminate this Public License.\n\n  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public\n     License.\n\n\nSection 7 -- Other Terms and Conditions.\n\n  a. The Licensor shall not be bound by any additional or different\n     terms or conditions communicated by You unless expressly agreed.\n\n  b. Any arrangements, understandings, or agreements regarding the\n     Licensed Material not stated herein are separate from and\n     independent of the terms and conditions of this Public License.\n\n\nSection 8 -- Interpretation.\n\n  a. For the avoidance of doubt, this Public License does not, and\n     shall not be interpreted to, reduce, limit, restrict, or impose\n     conditions on any use of the Licensed Material that could lawfully\n     be made without permission under this Public License.\n\n  b. To the extent possible, if any provision of this Public License is\n     deemed unenforceable, it shall be automatically reformed to the\n     minimum extent necessary to make it enforceable. If the provision\n     cannot be reformed, it shall be severed from this Public License\n     without affecting the enforceability of the remaining terms and\n     conditions.\n\n  c. No term or condition of this Public License will be waived and no\n     failure to comply consented to unless expressly agreed to by the\n     Licensor.\n\n  d. Nothing in this Public License constitutes or may be interpreted\n     as a limitation upon, or waiver of, any privileges and immunities\n     that apply to the Licensor or You, including from the legal\n     processes of any jurisdiction or authority.\n\n\n=======================================================================\n\nCreative Commons is not a party to its public licenses.\nNotwithstanding, Creative Commons may elect to apply one of its public\nlicenses to material it publishes and in those instances will be\nconsidered the \"Licensor.\" Except for the limited purpose of indicating\nthat material is shared under a Creative Commons public license or as\notherwise permitted by the Creative Commons policies published at\ncreativecommons.org/policies, Creative Commons does not authorize the\nuse of the trademark \"Creative Commons\" or any other trademark or logo\nof Creative Commons without its prior written consent including,\nwithout limitation, in connection with any unauthorized modifications\nto any of its public licenses or any other arrangements,\nunderstandings, or agreements concerning use of licensed material. For\nthe avoidance of doubt, this paragraph does not form part of the public\nlicenses.\n\nCreative Commons may be contacted at creativecommons.org.\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/MAINTAINERS",
    "content": "Derek McGowan <derek@mcgstyle.net> (@dmcgowan)\nStephen Day <stevvooe@gmail.com> (@stevvooe)\nVincent Batts <vbatts@hashbangbash.com> (@vbatts)\nAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (@AkihiroSuda)\nSebastiaan van Stijn <github@gone.nl> (@thaJeztah)\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/README.md",
    "content": "# go-digest\n\n[![GoDoc](https://godoc.org/github.com/opencontainers/go-digest?status.svg)](https://godoc.org/github.com/opencontainers/go-digest) [![Go Report Card](https://goreportcard.com/badge/github.com/opencontainers/go-digest)](https://goreportcard.com/report/github.com/opencontainers/go-digest) [![Build Status](https://travis-ci.org/opencontainers/go-digest.svg?branch=master)](https://travis-ci.org/opencontainers/go-digest)\n\nCommon digest package used across the container ecosystem.\n\nPlease see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) for more information.\n\n# What is a digest?\n\nA digest is just a [hash](https://en.wikipedia.org/wiki/Hash_function).\n\nThe most common use case for a digest is to create a content identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) systems:\n\n```go\nid := digest.FromBytes([]byte(\"my content\"))\n```\n\nIn the example above, the id can be used to uniquely identify the byte slice \"my content\".\nThis allows two disparate applications to agree on a verifiable identifier without having to trust one another.\n\nAn identifying digest can be verified, as follows:\n\n```go\nif id != digest.FromBytes([]byte(\"my content\")) {\n  return errors.New(\"the content has changed!\")\n}\n```\n\nA `Verifier` type can be used to handle cases where an `io.Reader` makes more sense:\n\n```go\nrd := getContent()\nverifier := id.Verifier()\nio.Copy(verifier, rd)\n\nif !verifier.Verified() {\n  return errors.New(\"the content has changed!\")\n}\n```\n\nUsing [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this can power a rich, safe, content distribution system.\n\n# Usage\n\nWhile the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package.\n\n1. Make sure to import the hash implementations into your application or the package will panic.\n    You should have something like the following in the main (or other entrypoint) of your application:\n   \n    ```go\n    import (\n        _ \"crypto/sha256\"\n        _ \"crypto/sha512\"\n    )\n    ```\n    This may seem inconvenient but it allows you replace the hash \n    implementations with others, such as https://github.com/stevvooe/resumable.\n \n2. Even though `digest.Digest` may be assemblable as a string, _always_ verify your input with `digest.Parse` or use `Digest.Validate` when accepting untrusted input.\n    While there are measures to avoid common problems, this will ensure you have valid digests in the rest of your application.\n\n3. While alternative encodings of hash values (digests) are possible (for example, base64), this package deals exclusively with hex-encoded digests.\n\n# Stability\n\nThe Go API, at this stage, is considered stable, unless otherwise noted.\n\nAs always, before using a package export, read the [godoc](https://godoc.org/github.com/opencontainers/go-digest).\n\n# Contributing\n\nThis package is considered fairly complete.\nIt has been in production in thousands (millions?) of deployments and is fairly battle-hardened.\nNew additions will be met with skepticism.\nIf you think there is a missing feature, please file a bug clearly describing the problem and the alternatives you tried before submitting a PR.\n\n## Code of Conduct\n\nParticipation in the OpenContainers community is governed by [OpenContainer's Code of Conduct][code-of-conduct].\n\n## Security\n\nIf you find an issue, please follow the [security][security] protocol to report it.\n\n# Copyright and license\n\nCopyright © 2019, 2020 OCI Contributors\nCopyright © 2016 Docker, Inc.\nAll rights reserved, except as follows.\nCode is released under the [Apache 2.0 license](LICENSE).\nThis `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs).\nYou may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/.\n\n[security]: https://github.com/opencontainers/org/blob/master/security\n[code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/algorithm.go",
    "content": "// Copyright 2019, 2020 OCI Contributors\n// Copyright 2017 Docker, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage digest\n\nimport (\n\t\"crypto\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"regexp\"\n)\n\n// Algorithm identifies and implementation of a digester by an identifier.\n// Note the that this defines both the hash algorithm used and the string\n// encoding.\ntype Algorithm string\n\n// supported digest types\nconst (\n\tSHA256 Algorithm = \"sha256\" // sha256 with hex encoding (lower case only)\n\tSHA384 Algorithm = \"sha384\" // sha384 with hex encoding (lower case only)\n\tSHA512 Algorithm = \"sha512\" // sha512 with hex encoding (lower case only)\n\n\t// Canonical is the primary digest algorithm used with the distribution\n\t// project. Other digests may be used but this one is the primary storage\n\t// digest.\n\tCanonical = SHA256\n)\n\nvar (\n\t// TODO(stevvooe): Follow the pattern of the standard crypto package for\n\t// registration of digests. Effectively, we are a registerable set and\n\t// common symbol access.\n\n\t// algorithms maps values to hash.Hash implementations. Other algorithms\n\t// may be available but they cannot be calculated by the digest package.\n\talgorithms = map[Algorithm]crypto.Hash{\n\t\tSHA256: crypto.SHA256,\n\t\tSHA384: crypto.SHA384,\n\t\tSHA512: crypto.SHA512,\n\t}\n\n\t// anchoredEncodedRegexps contains anchored regular expressions for hex-encoded digests.\n\t// Note that /A-F/ disallowed.\n\tanchoredEncodedRegexps = map[Algorithm]*regexp.Regexp{\n\t\tSHA256: regexp.MustCompile(`^[a-f0-9]{64}$`),\n\t\tSHA384: regexp.MustCompile(`^[a-f0-9]{96}$`),\n\t\tSHA512: regexp.MustCompile(`^[a-f0-9]{128}$`),\n\t}\n)\n\n// Available returns true if the digest type is available for use. If this\n// returns false, Digester and Hash will return nil.\nfunc (a Algorithm) Available() bool {\n\th, ok := algorithms[a]\n\tif !ok {\n\t\treturn false\n\t}\n\n\t// check availability of the hash, as well\n\treturn h.Available()\n}\n\nfunc (a Algorithm) String() string {\n\treturn string(a)\n}\n\n// Size returns number of bytes returned by the hash.\nfunc (a Algorithm) Size() int {\n\th, ok := algorithms[a]\n\tif !ok {\n\t\treturn 0\n\t}\n\treturn h.Size()\n}\n\n// Set implemented to allow use of Algorithm as a command line flag.\nfunc (a *Algorithm) Set(value string) error {\n\tif value == \"\" {\n\t\t*a = Canonical\n\t} else {\n\t\t// just do a type conversion, support is queried with Available.\n\t\t*a = Algorithm(value)\n\t}\n\n\tif !a.Available() {\n\t\treturn ErrDigestUnsupported\n\t}\n\n\treturn nil\n}\n\n// Digester returns a new digester for the specified algorithm. If the algorithm\n// does not have a digester implementation, nil will be returned. This can be\n// checked by calling Available before calling Digester.\nfunc (a Algorithm) Digester() Digester {\n\treturn &digester{\n\t\talg:  a,\n\t\thash: a.Hash(),\n\t}\n}\n\n// Hash returns a new hash as used by the algorithm. If not available, the\n// method will panic. Check Algorithm.Available() before calling.\nfunc (a Algorithm) Hash() hash.Hash {\n\tif !a.Available() {\n\t\t// Empty algorithm string is invalid\n\t\tif a == \"\" {\n\t\t\tpanic(fmt.Sprintf(\"empty digest algorithm, validate before calling Algorithm.Hash()\"))\n\t\t}\n\n\t\t// NOTE(stevvooe): A missing hash is usually a programming error that\n\t\t// must be resolved at compile time. We don't import in the digest\n\t\t// package to allow users to choose their hash implementation (such as\n\t\t// when using stevvooe/resumable or a hardware accelerated package).\n\t\t//\n\t\t// Applications that may want to resolve the hash at runtime should\n\t\t// call Algorithm.Available before call Algorithm.Hash().\n\t\tpanic(fmt.Sprintf(\"%v not available (make sure it is imported)\", a))\n\t}\n\n\treturn algorithms[a].New()\n}\n\n// Encode encodes the raw bytes of a digest, typically from a hash.Hash, into\n// the encoded portion of the digest.\nfunc (a Algorithm) Encode(d []byte) string {\n\t// TODO(stevvooe): Currently, all algorithms use a hex encoding. When we\n\t// add support for back registration, we can modify this accordingly.\n\treturn fmt.Sprintf(\"%x\", d)\n}\n\n// FromReader returns the digest of the reader using the algorithm.\nfunc (a Algorithm) FromReader(rd io.Reader) (Digest, error) {\n\tdigester := a.Digester()\n\n\tif _, err := io.Copy(digester.Hash(), rd); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn digester.Digest(), nil\n}\n\n// FromBytes digests the input and returns a Digest.\nfunc (a Algorithm) FromBytes(p []byte) Digest {\n\tdigester := a.Digester()\n\n\tif _, err := digester.Hash().Write(p); err != nil {\n\t\t// Writes to a Hash should never fail. None of the existing\n\t\t// hash implementations in the stdlib or hashes vendored\n\t\t// here can return errors from Write. Having a panic in this\n\t\t// condition instead of having FromBytes return an error value\n\t\t// avoids unnecessary error handling paths in all callers.\n\t\tpanic(\"write to hash function returned error: \" + err.Error())\n\t}\n\n\treturn digester.Digest()\n}\n\n// FromString digests the string input and returns a Digest.\nfunc (a Algorithm) FromString(s string) Digest {\n\treturn a.FromBytes([]byte(s))\n}\n\n// Validate validates the encoded portion string\nfunc (a Algorithm) Validate(encoded string) error {\n\tr, ok := anchoredEncodedRegexps[a]\n\tif !ok {\n\t\treturn ErrDigestUnsupported\n\t}\n\t// Digests much always be hex-encoded, ensuring that their hex portion will\n\t// always be size*2\n\tif a.Size()*2 != len(encoded) {\n\t\treturn ErrDigestInvalidLength\n\t}\n\tif r.MatchString(encoded) {\n\t\treturn nil\n\t}\n\treturn ErrDigestInvalidFormat\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/digest.go",
    "content": "// Copyright 2019, 2020 OCI Contributors\n// Copyright 2017 Docker, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage digest\n\nimport (\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// Digest allows simple protection of hex formatted digest strings, prefixed\n// by their algorithm. Strings of type Digest have some guarantee of being in\n// the correct format and it provides quick access to the components of a\n// digest string.\n//\n// The following is an example of the contents of Digest types:\n//\n// \tsha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc\n//\n// This allows to abstract the digest behind this type and work only in those\n// terms.\ntype Digest string\n\n// NewDigest returns a Digest from alg and a hash.Hash object.\nfunc NewDigest(alg Algorithm, h hash.Hash) Digest {\n\treturn NewDigestFromBytes(alg, h.Sum(nil))\n}\n\n// NewDigestFromBytes returns a new digest from the byte contents of p.\n// Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...)\n// functions. This is also useful for rebuilding digests from binary\n// serializations.\nfunc NewDigestFromBytes(alg Algorithm, p []byte) Digest {\n\treturn NewDigestFromEncoded(alg, alg.Encode(p))\n}\n\n// NewDigestFromHex is deprecated. Please use NewDigestFromEncoded.\nfunc NewDigestFromHex(alg, hex string) Digest {\n\treturn NewDigestFromEncoded(Algorithm(alg), hex)\n}\n\n// NewDigestFromEncoded returns a Digest from alg and the encoded digest.\nfunc NewDigestFromEncoded(alg Algorithm, encoded string) Digest {\n\treturn Digest(fmt.Sprintf(\"%s:%s\", alg, encoded))\n}\n\n// DigestRegexp matches valid digest types.\nvar DigestRegexp = regexp.MustCompile(`[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+`)\n\n// DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match.\nvar DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`)\n\nvar (\n\t// ErrDigestInvalidFormat returned when digest format invalid.\n\tErrDigestInvalidFormat = fmt.Errorf(\"invalid checksum digest format\")\n\n\t// ErrDigestInvalidLength returned when digest has invalid length.\n\tErrDigestInvalidLength = fmt.Errorf(\"invalid checksum digest length\")\n\n\t// ErrDigestUnsupported returned when the digest algorithm is unsupported.\n\tErrDigestUnsupported = fmt.Errorf(\"unsupported digest algorithm\")\n)\n\n// Parse parses s and returns the validated digest object. An error will\n// be returned if the format is invalid.\nfunc Parse(s string) (Digest, error) {\n\td := Digest(s)\n\treturn d, d.Validate()\n}\n\n// FromReader consumes the content of rd until io.EOF, returning canonical digest.\nfunc FromReader(rd io.Reader) (Digest, error) {\n\treturn Canonical.FromReader(rd)\n}\n\n// FromBytes digests the input and returns a Digest.\nfunc FromBytes(p []byte) Digest {\n\treturn Canonical.FromBytes(p)\n}\n\n// FromString digests the input and returns a Digest.\nfunc FromString(s string) Digest {\n\treturn Canonical.FromString(s)\n}\n\n// Validate checks that the contents of d is a valid digest, returning an\n// error if not.\nfunc (d Digest) Validate() error {\n\ts := string(d)\n\ti := strings.Index(s, \":\")\n\tif i <= 0 || i+1 == len(s) {\n\t\treturn ErrDigestInvalidFormat\n\t}\n\talgorithm, encoded := Algorithm(s[:i]), s[i+1:]\n\tif !algorithm.Available() {\n\t\tif !DigestRegexpAnchored.MatchString(s) {\n\t\t\treturn ErrDigestInvalidFormat\n\t\t}\n\t\treturn ErrDigestUnsupported\n\t}\n\treturn algorithm.Validate(encoded)\n}\n\n// Algorithm returns the algorithm portion of the digest. This will panic if\n// the underlying digest is not in a valid format.\nfunc (d Digest) Algorithm() Algorithm {\n\treturn Algorithm(d[:d.sepIndex()])\n}\n\n// Verifier returns a writer object that can be used to verify a stream of\n// content against the digest. If the digest is invalid, the method will panic.\nfunc (d Digest) Verifier() Verifier {\n\treturn hashVerifier{\n\t\thash:   d.Algorithm().Hash(),\n\t\tdigest: d,\n\t}\n}\n\n// Encoded returns the encoded portion of the digest. This will panic if the\n// underlying digest is not in a valid format.\nfunc (d Digest) Encoded() string {\n\treturn string(d[d.sepIndex()+1:])\n}\n\n// Hex is deprecated. Please use Digest.Encoded.\nfunc (d Digest) Hex() string {\n\treturn d.Encoded()\n}\n\nfunc (d Digest) String() string {\n\treturn string(d)\n}\n\nfunc (d Digest) sepIndex() int {\n\ti := strings.Index(string(d), \":\")\n\n\tif i < 0 {\n\t\tpanic(fmt.Sprintf(\"no ':' separator in digest %q\", d))\n\t}\n\n\treturn i\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/digester.go",
    "content": "// Copyright 2019, 2020 OCI Contributors\n// Copyright 2017 Docker, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage digest\n\nimport \"hash\"\n\n// Digester calculates the digest of written data. Writes should go directly\n// to the return value of Hash, while calling Digest will return the current\n// value of the digest.\ntype Digester interface {\n\tHash() hash.Hash // provides direct access to underlying hash instance.\n\tDigest() Digest\n}\n\n// digester provides a simple digester definition that embeds a hasher.\ntype digester struct {\n\talg  Algorithm\n\thash hash.Hash\n}\n\nfunc (d *digester) Hash() hash.Hash {\n\treturn d.hash\n}\n\nfunc (d *digester) Digest() Digest {\n\treturn NewDigest(d.alg, d.hash)\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/doc.go",
    "content": "// Copyright 2019, 2020 OCI Contributors\n// Copyright 2017 Docker, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package digest provides a generalized type to opaquely represent message\n// digests and their operations within the registry. The Digest type is\n// designed to serve as a flexible identifier in a content-addressable system.\n// More importantly, it provides tools and wrappers to work with\n// hash.Hash-based digests with little effort.\n//\n// Basics\n//\n// The format of a digest is simply a string with two parts, dubbed the\n// \"algorithm\" and the \"digest\", separated by a colon:\n//\n// \t<algorithm>:<digest>\n//\n// An example of a sha256 digest representation follows:\n//\n// \tsha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc\n//\n// The \"algorithm\" portion defines both the hashing algorithm used to calculate\n// the digest and the encoding of the resulting digest, which defaults to \"hex\"\n// if not otherwise specified. Currently, all supported algorithms have their\n// digests encoded in hex strings.\n//\n// In the example above, the string \"sha256\" is the algorithm and the hex bytes\n// are the \"digest\".\n//\n// Because the Digest type is simply a string, once a valid Digest is\n// obtained, comparisons are cheap, quick and simple to express with the\n// standard equality operator.\n//\n// Verification\n//\n// The main benefit of using the Digest type is simple verification against a\n// given digest. The Verifier interface, modeled after the stdlib hash.Hash\n// interface, provides a common write sink for digest verification. After\n// writing is complete, calling the Verifier.Verified method will indicate\n// whether or not the stream of bytes matches the target digest.\n//\n// Missing Features\n//\n// In addition to the above, we intend to add the following features to this\n// package:\n//\n// 1. A Digester type that supports write sink digest calculation.\n//\n// 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry.\n//\npackage digest\n"
  },
  {
    "path": "vendor/github.com/opencontainers/go-digest/verifiers.go",
    "content": "// Copyright 2019, 2020 OCI Contributors\n// Copyright 2017 Docker, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage digest\n\nimport (\n\t\"hash\"\n\t\"io\"\n)\n\n// Verifier presents a general verification interface to be used with message\n// digests and other byte stream verifications. Users instantiate a Verifier\n// from one of the various methods, write the data under test to it then check\n// the result with the Verified method.\ntype Verifier interface {\n\tio.Writer\n\n\t// Verified will return true if the content written to Verifier matches\n\t// the digest.\n\tVerified() bool\n}\n\ntype hashVerifier struct {\n\tdigest Digest\n\thash   hash.Hash\n}\n\nfunc (hv hashVerifier) Write(p []byte) (n int, err error) {\n\treturn hv.hash.Write(p)\n}\n\nfunc (hv hashVerifier) Verified() bool {\n\treturn hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash)\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/LICENSE",
    "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   Copyright 2016 The Linux Foundation.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/opencontainers/image-spec/schema/LICENSE",
    "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   Copyright 2016 The Linux Foundation.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/opencontainers/image-spec/schema/config-schema.json",
    "content": "{\n  \"description\": \"OpenContainer Config Specification\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"id\": \"https://opencontainers.org/schema/image/config\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"created\": {\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n    \"author\": {\n      \"type\": \"string\"\n    },\n    \"architecture\": {\n      \"type\": \"string\"\n    },\n    \"variant\": {\n      \"type\": \"string\"\n    },\n    \"os\": {\n      \"type\": \"string\"\n    },\n    \"os.version\": {\n      \"type\": \"string\"\n    },\n    \"os.features\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"config\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"User\": {\n          \"type\": \"string\"\n        },\n        \"ExposedPorts\": {\n          \"$ref\": \"defs.json#/definitions/mapStringObject\"\n        },\n        \"Env\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"Entrypoint\": {\n          \"oneOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            {\n              \"type\": \"null\"\n            }\n          ]\n        },\n        \"Cmd\": {\n          \"oneOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            {\n              \"type\": \"null\"\n            }\n          ]\n        },\n        \"Volumes\": {\n          \"oneOf\": [\n            {\n              \"$ref\": \"defs.json#/definitions/mapStringObject\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ]\n        },\n        \"WorkingDir\": {\n          \"type\": \"string\"\n        },\n        \"Labels\": {\n          \"oneOf\": [\n            {\n              \"$ref\": \"defs.json#/definitions/mapStringString\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ]\n        },\n        \"StopSignal\": {\n          \"type\": \"string\"\n        },\n        \"ArgsEscaped\": {\n          \"type\": \"boolean\"\n        }\n      }\n    },\n    \"rootfs\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"diff_ids\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"type\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"layers\"\n          ]\n        }\n      },\n      \"required\": [\n        \"diff_ids\",\n        \"type\"\n      ]\n    },\n    \"history\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"created\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"author\": {\n            \"type\": \"string\"\n          },\n          \"created_by\": {\n            \"type\": \"string\"\n          },\n          \"comment\": {\n            \"type\": \"string\"\n          },\n          \"empty_layer\": {\n            \"type\": \"boolean\"\n          }\n        }\n      }\n    }\n  },\n  \"required\": [\n    \"architecture\",\n    \"os\",\n    \"rootfs\"\n  ]\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/content-descriptor.json",
    "content": "{\n  \"description\": \"OpenContainer Content Descriptor Specification\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"id\": \"https://opencontainers.org/schema/descriptor\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"mediaType\": {\n      \"description\": \"the mediatype of the referenced object\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"size\": {\n      \"description\": \"the size in bytes of the referenced object\",\n      \"$ref\": \"defs.json#/definitions/int64\"\n    },\n    \"digest\": {\n      \"description\": \"the cryptographic checksum digest of the object, in the pattern '<algorithm>:<encoded>'\",\n      \"$ref\": \"defs-descriptor.json#/definitions/digest\"\n    },\n    \"urls\": {\n      \"description\": \"a list of urls from which this object may be downloaded\",\n      \"$ref\": \"defs-descriptor.json#/definitions/urls\"\n    },\n    \"data\": {\n      \"description\": \"an embedding of the targeted content (base64 encoded)\",\n      \"$ref\": \"defs.json#/definitions/base64\"\n    },\n    \"artifactType\": {\n      \"description\": \"the IANA media type of this artifact\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"annotations\": {\n      \"id\": \"https://opencontainers.org/schema/descriptor/annotations\",\n      \"$ref\": \"defs-descriptor.json#/definitions/annotations\"\n    }\n  },\n  \"required\": [\n    \"mediaType\",\n    \"size\",\n    \"digest\"\n  ]\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/defs-descriptor.json",
    "content": "{\n  \"description\": \"Definitions particular to OpenContainer Descriptor Specification\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"definitions\": {\n    \"mediaType\": {\n      \"id\": \"https://opencontainers.org/schema/image/descriptor/mediaType\",\n      \"type\": \"string\",\n      \"pattern\": \"^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$\"\n    },\n    \"digest\": {\n      \"description\": \"the cryptographic checksum digest of the object, in the pattern '<algorithm>:<encoded>'\",\n      \"type\": \"string\",\n      \"pattern\": \"^[a-z0-9]+(?:[+._-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$\"\n    },\n    \"urls\": {\n      \"description\": \"a list of urls from which this object may be downloaded\",\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\",\n        \"format\": \"uri\"\n      }\n    },\n    \"annotations\": {\n      \"$ref\": \"defs.json#/definitions/mapStringString\"\n    }\n  }\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/defs.json",
    "content": "{\n  \"description\": \"Definitions used throughout the OpenContainer Specification\",\n  \"definitions\": {\n    \"int8\": {\n      \"type\": \"integer\",\n      \"minimum\": -128,\n      \"maximum\": 127\n    },\n    \"int16\": {\n      \"type\": \"integer\",\n      \"minimum\": -32768,\n      \"maximum\": 32767\n    },\n    \"int32\": {\n      \"type\": \"integer\",\n      \"minimum\": -2147483648,\n      \"maximum\": 2147483647\n    },\n    \"int64\": {\n      \"type\": \"integer\",\n      \"minimum\": -9223372036854776000,\n      \"maximum\": 9223372036854776000\n    },\n    \"uint8\": {\n      \"type\": \"integer\",\n      \"minimum\": 0,\n      \"maximum\": 255\n    },\n    \"uint16\": {\n      \"type\": \"integer\",\n      \"minimum\": 0,\n      \"maximum\": 65535\n    },\n    \"uint32\": {\n      \"type\": \"integer\",\n      \"minimum\": 0,\n      \"maximum\": 4294967295\n    },\n    \"uint64\": {\n      \"type\": \"integer\",\n      \"minimum\": 0,\n      \"maximum\": 18446744073709552000\n    },\n    \"uint16Pointer\": {\n      \"oneOf\": [\n        {\n          \"$ref\": \"#/definitions/uint16\"\n        },\n        {\n          \"type\": \"null\"\n        }\n      ]\n    },\n    \"uint64Pointer\": {\n      \"oneOf\": [\n        {\n          \"$ref\": \"#/definitions/uint64\"\n        },\n        {\n          \"type\": \"null\"\n        }\n      ]\n    },\n    \"base64\": {\n      \"type\": \"string\",\n      \"media\": {\n        \"binaryEncoding\": \"base64\"\n      }\n    },\n    \"stringPointer\": {\n      \"oneOf\": [\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"type\": \"null\"\n        }\n      ]\n    },\n    \"mapStringString\": {\n      \"type\": \"object\",\n      \"patternProperties\": {\n        \".{1,}\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"mapStringObject\": {\n      \"type\": \"object\",\n      \"patternProperties\": {\n        \".{1,}\": {\n          \"type\": \"object\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/doc.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package schema defines the OCI image media types, schema definitions and validation functions.\npackage schema\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/error.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage schema\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n)\n\n// A SyntaxError is a description of a JSON syntax error\n// including line, column and offset in the JSON file.\n//\n// Deprecated: SyntaxError is no longer returned from Validator.\ntype SyntaxError struct {\n\tmsg       string\n\tLine, Col int\n\tOffset    int64\n}\n\nfunc (e *SyntaxError) Error() string { return e.msg }\n\n// WrapSyntaxError checks whether the given error is a *json.SyntaxError\n// and converts it into a *schema.SyntaxError containing line/col information using the given reader.\n// If the given error is not a *json.SyntaxError it is returned unchanged.\n//\n// Deprecated: WrapSyntaxError is no longer returned by Validator.\nfunc WrapSyntaxError(r io.Reader, err error) error {\n\tvar serr *json.SyntaxError\n\tif errors.As(err, &serr) {\n\t\tbuf := bufio.NewReader(r)\n\t\tline := 0\n\t\tcol := 0\n\t\tfor i := int64(0); i < serr.Offset; i++ {\n\t\t\tb, berr := buf.ReadByte()\n\t\t\tif berr != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif b == '\\n' {\n\t\t\t\tline++\n\t\t\t\tcol = 1\n\t\t\t} else {\n\t\t\t\tcol++\n\t\t\t}\n\t\t}\n\t\treturn &SyntaxError{serr.Error(), line, col, serr.Offset}\n\t}\n\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/image-index-schema.json",
    "content": "{\n  \"description\": \"OpenContainer Image Index Specification\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"id\": \"https://opencontainers.org/schema/image/index\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"schemaVersion\": {\n      \"description\": \"This field specifies the image index schema version as an integer\",\n      \"id\": \"https://opencontainers.org/schema/image/index/schemaVersion\",\n      \"type\": \"integer\",\n      \"minimum\": 2,\n      \"maximum\": 2\n    },\n    \"mediaType\": {\n      \"description\": \"the mediatype of the referenced object\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"artifactType\": {\n      \"description\": \"the artifact mediatype of the referenced object\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"subject\": {\n      \"$ref\": \"content-descriptor.json\"\n    },\n    \"manifests\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"id\": \"https://opencontainers.org/schema/image/manifestDescriptor\",\n        \"type\": \"object\",\n        \"required\": [\n          \"mediaType\",\n          \"size\",\n          \"digest\"\n        ],\n        \"properties\": {\n          \"mediaType\": {\n            \"description\": \"the mediatype of the referenced object\",\n            \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n          },\n          \"size\": {\n            \"description\": \"the size in bytes of the referenced object\",\n            \"$ref\": \"defs.json#/definitions/int64\"\n          },\n          \"digest\": {\n            \"description\": \"the cryptographic checksum digest of the object, in the pattern '<algorithm>:<encoded>'\",\n            \"$ref\": \"defs-descriptor.json#/definitions/digest\"\n          },\n          \"urls\": {\n            \"description\": \"a list of urls from which this object may be downloaded\",\n            \"$ref\": \"defs-descriptor.json#/definitions/urls\"\n          },\n          \"platform\": {\n            \"id\": \"https://opencontainers.org/schema/image/platform\",\n            \"type\": \"object\",\n            \"required\": [\n              \"architecture\",\n              \"os\"\n            ],\n            \"properties\": {\n              \"architecture\": {\n                \"id\": \"https://opencontainers.org/schema/image/platform/architecture\",\n                \"type\": \"string\"\n              },\n              \"os\": {\n                \"id\": \"https://opencontainers.org/schema/image/platform/os\",\n                \"type\": \"string\"\n              },\n              \"os.version\": {\n                \"id\": \"https://opencontainers.org/schema/image/platform/os.version\",\n                \"type\": \"string\"\n              },\n              \"os.features\": {\n                \"id\": \"https://opencontainers.org/schema/image/platform/os.features\",\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"variant\": {\n                \"type\": \"string\"\n              }\n            }\n          },\n          \"annotations\": {\n            \"id\": \"https://opencontainers.org/schema/image/descriptor/annotations\",\n            \"$ref\": \"defs-descriptor.json#/definitions/annotations\"\n          }\n        }\n      }\n    },\n    \"annotations\": {\n      \"id\": \"https://opencontainers.org/schema/image/index/annotations\",\n      \"$ref\": \"defs-descriptor.json#/definitions/annotations\"\n    }\n  },\n  \"required\": [\n    \"schemaVersion\",\n    \"manifests\"\n  ]\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/image-layout-schema.json",
    "content": "{\n  \"description\": \"OpenContainer Image Layout Schema\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"id\": \"https://opencontainers.org/schema/image/layout\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"imageLayoutVersion\": {\n      \"description\": \"version of the OCI Image Layout (in the oci-layout file)\",\n      \"type\": \"string\",\n      \"enum\": [\n        \"1.0.0\"\n      ]\n    }\n  },\n  \"required\": [\n    \"imageLayoutVersion\"\n  ]\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/image-manifest-schema.json",
    "content": "{\n  \"description\": \"OpenContainer Image Manifest Specification\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"id\": \"https://opencontainers.org/schema/image/manifest\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"schemaVersion\": {\n      \"description\": \"This field specifies the image manifest schema version as an integer\",\n      \"id\": \"https://opencontainers.org/schema/image/manifest/schemaVersion\",\n      \"type\": \"integer\",\n      \"minimum\": 2,\n      \"maximum\": 2\n    },\n    \"mediaType\": {\n      \"description\": \"the mediatype of the referenced object\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"artifactType\": {\n      \"description\": \"the artifact mediatype of the referenced object\",\n      \"$ref\": \"defs-descriptor.json#/definitions/mediaType\"\n    },\n    \"config\": {\n      \"$ref\": \"content-descriptor.json\"\n    },\n    \"subject\": {\n      \"$ref\": \"content-descriptor.json\"\n    },\n    \"layers\": {\n      \"type\": \"array\",\n      \"minItems\": 1,\n      \"items\": {\n        \"$ref\": \"content-descriptor.json\"\n      }\n    },\n    \"annotations\": {\n      \"id\": \"https://opencontainers.org/schema/image/manifest/annotations\",\n      \"$ref\": \"defs-descriptor.json#/definitions/annotations\"\n    }\n  },\n  \"required\": [\n    \"schemaVersion\",\n    \"config\",\n    \"layers\"\n  ]\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/schema.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage schema\n\nimport (\n\t\"embed\"\n\t\"net/http\"\n\n\tv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// Media types for the OCI image formats\nconst (\n\tValidatorMediaTypeDescriptor   Validator = v1.MediaTypeDescriptor\n\tValidatorMediaTypeLayoutHeader Validator = v1.MediaTypeLayoutHeader\n\tValidatorMediaTypeManifest     Validator = v1.MediaTypeImageManifest\n\tValidatorMediaTypeImageIndex   Validator = v1.MediaTypeImageIndex\n\tValidatorMediaTypeImageConfig  Validator = v1.MediaTypeImageConfig\n\tValidatorMediaTypeImageLayer   Validator = v1.MediaTypeImageLayer\n)\n\nvar (\n\t// specFS stores the embedded http.FileSystem having the OCI JSON schema files in root \"/\".\n\t//go:embed *.json\n\tspecFS embed.FS\n\n\t// specsOrig maps OCI schema media types to schema files.\n\tspecs = map[Validator]string{\n\t\tValidatorMediaTypeDescriptor:   \"content-descriptor.json\",\n\t\tValidatorMediaTypeLayoutHeader: \"image-layout-schema.json\",\n\t\tValidatorMediaTypeManifest:     \"image-manifest-schema.json\",\n\t\tValidatorMediaTypeImageIndex:   \"image-index-schema.json\",\n\t\tValidatorMediaTypeImageConfig:  \"config-schema.json\",\n\t}\n\n\t// specURLs lists the various URLs a given spec may be known by.\n\t// This is generated from the \"id\" value in each spec and relative ref values they contain.\n\tspecURLs = map[string][]string{\n\t\t\"config-schema.json\": {\n\t\t\t\"https://opencontainers.org/schema/image/config\",\n\t\t},\n\t\t\"content-descriptor.json\": {\n\t\t\t\"https://opencontainers.org/schema/descriptor\",\n\t\t\t\"https://opencontainers.org/schema/image/content-descriptor.json\",\n\t\t},\n\t\t\"defs-descriptor.json\": {\n\t\t\t\"https://opencontainers.org/schema/image/descriptor/mediaType\",\n\t\t\t\"https://opencontainers.org/schema/defs-descriptor.json\",\n\t\t\t\"https://opencontainers.org/schema/image/defs-descriptor.json\",\n\t\t},\n\t\t\"defs.json\": {\n\t\t\t\"https://opencontainers.org/schema/defs.json\",\n\t\t\t\"https://opencontainers.org/schema/image/defs.json\",\n\t\t\t\"https://opencontainers.org/schema/image/descriptor/defs.json\",\n\t\t},\n\t\t\"image-index-schema.json\": {\n\t\t\t\"https://opencontainers.org/schema/image/index\",\n\t\t},\n\t\t\"image-layout-schema.json\": {\n\t\t\t\"https://opencontainers.org/schema/image/layout\",\n\t\t},\n\t\t\"image-manifest-schema.json\": {\n\t\t\t\"https://opencontainers.org/schema/image/manifest\",\n\t\t},\n\t}\n)\n\n// FileSystem returns an in-memory filesystem including the schema files.\n// The schema files are located at the root directory.\nfunc FileSystem() http.FileSystem {\n\treturn http.FS(specFS)\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/schema/validator.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage schema\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"regexp\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\tv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/santhosh-tekuri/jsonschema/v6\"\n)\n\n// Validator wraps a media type string identifier and implements validation against a JSON schema.\ntype Validator string\n\n// ValidationError contains all the errors that happened during validation.\n//\n// Deprecated: this is no longer used by [Validator].\ntype ValidationError struct {\n\tErrs []error\n}\n\n// Error returns the error message.\n//\n// Deprecated: this is no longer used by [Validator].\nfunc (e ValidationError) Error() string {\n\treturn fmt.Sprintf(\"%v\", e.Errs)\n}\n\n// Validate validates the given reader against the schema of the wrapped media type.\nfunc (v Validator) Validate(src io.Reader) error {\n\t// run the media type specific validation\n\tif fn, ok := validateByMediaType[v]; ok {\n\t\tif fn == nil {\n\t\t\treturn fmt.Errorf(\"internal error: mapValidate is nil for %s\", string(v))\n\t\t}\n\t\t// buffer the src so the media type validation and the schema validation can both read it\n\t\tbuf, err := io.ReadAll(src)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to read input: %w\", err)\n\t\t}\n\t\tsrc = bytes.NewReader(buf)\n\t\terr = fn(buf)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// json schema validation\n\treturn v.validateSchema(src)\n}\n\nfunc (v Validator) validateSchema(src io.Reader) error {\n\tif _, ok := specs[v]; !ok {\n\t\treturn fmt.Errorf(\"no validator available for %s\", string(v))\n\t}\n\n\tc := jsonschema.NewCompiler()\n\n\t// load the schema files from the embedded FS\n\tdir, err := specFS.ReadDir(\".\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"spec embedded directory could not be loaded: %w\", err)\n\t}\n\tfor _, file := range dir {\n\t\tif file.IsDir() {\n\t\t\tcontinue\n\t\t}\n\t\tspecFile, err := specFS.Open(file.Name())\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not read spec file %s: %w\", file.Name(), err)\n\t\t}\n\t\tdefer specFile.Close()\n\t\tspec, err := jsonschema.UnmarshalJSON(specFile)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not decode spec file %s: %w\", file.Name(), err)\n\t\t}\n\t\terr = c.AddResource(file.Name(), spec)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to add spec file %s: %w\", file.Name(), err)\n\t\t}\n\t\tif len(specURLs[file.Name()]) == 0 {\n\t\t\t// this would be a bug in the validation code itself, add any missing entry to schema.go\n\t\t\treturn fmt.Errorf(\"spec file has no aliases: %s\", file.Name())\n\t\t}\n\t\tfor _, specURL := range specURLs[file.Name()] {\n\t\t\terr = c.AddResource(specURL, spec)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to add spec file %s as url %s: %w\", file.Name(), specURL, err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// compile based on the type of validator\n\tschema, err := c.Compile(specs[v])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to compile schema %s: %w\", string(v), err)\n\t}\n\n\t// read in the user input and validate\n\tinput, err := jsonschema.UnmarshalJSON(src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to parse json to validate: %w\", err)\n\t}\n\terr = schema.Validate(input)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"validation failed: %w\", err)\n\t}\n\treturn nil\n}\n\ntype validateFunc func([]byte) error\n\nvar validateByMediaType = map[Validator]validateFunc{\n\tValidatorMediaTypeImageConfig: validateConfig,\n\tValidatorMediaTypeDescriptor:  validateDescriptor,\n\tValidatorMediaTypeImageIndex:  validateIndex,\n\tValidatorMediaTypeManifest:    validateManifest,\n}\n\nfunc validateManifest(buf []byte) error {\n\theader := v1.Manifest{}\n\n\terr := json.Unmarshal(buf, &header)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"manifest format mismatch: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc validateDescriptor(buf []byte) error {\n\theader := v1.Descriptor{}\n\n\terr := json.Unmarshal(buf, &header)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"descriptor format mismatch: %w\", err)\n\t}\n\n\terr = header.Digest.Validate()\n\tif errors.Is(err, digest.ErrDigestUnsupported) {\n\t\t// we ignore unsupported algorithms\n\t\treturn nil\n\t}\n\treturn err\n}\n\nfunc validateIndex(buf []byte) error {\n\theader := v1.Index{}\n\n\terr := json.Unmarshal(buf, &header)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"index format mismatch: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc validateConfig(buf []byte) error {\n\theader := v1.Image{}\n\n\terr := json.Unmarshal(buf, &header)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"config format mismatch: %w\", err)\n\t}\n\n\tenvRegexp := regexp.MustCompile(`^[^=]+=.*$`)\n\tfor _, e := range header.Config.Env {\n\t\tif !envRegexp.MatchString(e) {\n\t\t\treturn fmt.Errorf(\"unexpected env: %q\", e)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nconst (\n\t// AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339).\n\tAnnotationCreated = \"org.opencontainers.image.created\"\n\n\t// AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string).\n\tAnnotationAuthors = \"org.opencontainers.image.authors\"\n\n\t// AnnotationURL is the annotation key for the URL to find more information on the image.\n\tAnnotationURL = \"org.opencontainers.image.url\"\n\n\t// AnnotationDocumentation is the annotation key for the URL to get documentation on the image.\n\tAnnotationDocumentation = \"org.opencontainers.image.documentation\"\n\n\t// AnnotationSource is the annotation key for the URL to get source code for building the image.\n\tAnnotationSource = \"org.opencontainers.image.source\"\n\n\t// AnnotationVersion is the annotation key for the version of the packaged software.\n\t// The version MAY match a label or tag in the source code repository.\n\t// The version MAY be Semantic versioning-compatible.\n\tAnnotationVersion = \"org.opencontainers.image.version\"\n\n\t// AnnotationRevision is the annotation key for the source control revision identifier for the packaged software.\n\tAnnotationRevision = \"org.opencontainers.image.revision\"\n\n\t// AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual.\n\tAnnotationVendor = \"org.opencontainers.image.vendor\"\n\n\t// AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression.\n\tAnnotationLicenses = \"org.opencontainers.image.licenses\"\n\n\t// AnnotationRefName is the annotation key for the name of the reference for a target.\n\t// SHOULD only be considered valid when on descriptors on `index.json` within image layout.\n\tAnnotationRefName = \"org.opencontainers.image.ref.name\"\n\n\t// AnnotationTitle is the annotation key for the human-readable title of the image.\n\tAnnotationTitle = \"org.opencontainers.image.title\"\n\n\t// AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image.\n\tAnnotationDescription = \"org.opencontainers.image.description\"\n\n\t// AnnotationBaseImageDigest is the annotation key for the digest of the image's base image.\n\tAnnotationBaseImageDigest = \"org.opencontainers.image.base.digest\"\n\n\t// AnnotationBaseImageName is the annotation key for the image reference of the image's base image.\n\tAnnotationBaseImageName = \"org.opencontainers.image.base.name\"\n)\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport (\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\n// ImageConfig defines the execution parameters which should be used as a base when running a container using an image.\ntype ImageConfig struct {\n\t// User defines the username or UID which the process in the container should run as.\n\tUser string `json:\"User,omitempty\"`\n\n\t// ExposedPorts a set of ports to expose from a container running this image.\n\tExposedPorts map[string]struct{} `json:\"ExposedPorts,omitempty\"`\n\n\t// Env is a list of environment variables to be used in a container.\n\tEnv []string `json:\"Env,omitempty\"`\n\n\t// Entrypoint defines a list of arguments to use as the command to execute when the container starts.\n\tEntrypoint []string `json:\"Entrypoint,omitempty\"`\n\n\t// Cmd defines the default arguments to the entrypoint of the container.\n\tCmd []string `json:\"Cmd,omitempty\"`\n\n\t// Volumes is a set of directories describing where the process is likely write data specific to a container instance.\n\tVolumes map[string]struct{} `json:\"Volumes,omitempty\"`\n\n\t// WorkingDir sets the current working directory of the entrypoint process in the container.\n\tWorkingDir string `json:\"WorkingDir,omitempty\"`\n\n\t// Labels contains arbitrary metadata for the container.\n\tLabels map[string]string `json:\"Labels,omitempty\"`\n\n\t// StopSignal contains the system call signal that will be sent to the container to exit.\n\tStopSignal string `json:\"StopSignal,omitempty\"`\n\n\t// ArgsEscaped\n\t//\n\t// Deprecated: This field is present only for legacy compatibility with\n\t// Docker and should not be used by new image builders.  It is used by Docker\n\t// for Windows images to indicate that the `Entrypoint` or `Cmd` or both,\n\t// contains only a single element array, that is a pre-escaped, and combined\n\t// into a single string `CommandLine`. If `true` the value in `Entrypoint` or\n\t// `Cmd` should be used as-is to avoid double escaping.\n\t// https://github.com/opencontainers/image-spec/pull/892\n\tArgsEscaped bool `json:\"ArgsEscaped,omitempty\"`\n}\n\n// RootFS describes a layer content addresses\ntype RootFS struct {\n\t// Type is the type of the rootfs.\n\tType string `json:\"type\"`\n\n\t// DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most.\n\tDiffIDs []digest.Digest `json:\"diff_ids\"`\n}\n\n// History describes the history of a layer.\ntype History struct {\n\t// Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6.\n\tCreated *time.Time `json:\"created,omitempty\"`\n\n\t// CreatedBy is the command which created the layer.\n\tCreatedBy string `json:\"created_by,omitempty\"`\n\n\t// Author is the author of the build point.\n\tAuthor string `json:\"author,omitempty\"`\n\n\t// Comment is a custom message set when creating the layer.\n\tComment string `json:\"comment,omitempty\"`\n\n\t// EmptyLayer is used to mark if the history item created a filesystem diff.\n\tEmptyLayer bool `json:\"empty_layer,omitempty\"`\n}\n\n// Image is the JSON structure which describes some basic information about the image.\n// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.\ntype Image struct {\n\t// Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6.\n\tCreated *time.Time `json:\"created,omitempty\"`\n\n\t// Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image.\n\tAuthor string `json:\"author,omitempty\"`\n\n\t// Platform describes the platform which the image in the manifest runs on.\n\tPlatform\n\n\t// Config defines the execution parameters which should be used as a base when running a container using the image.\n\tConfig ImageConfig `json:\"config,omitzero\"`\n\n\t// RootFS references the layer content addresses used by the image.\n\tRootFS RootFS `json:\"rootfs\"`\n\n\t// History describes the history of each layer.\n\tHistory []History `json:\"history,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go",
    "content": "// Copyright 2016-2022 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport digest \"github.com/opencontainers/go-digest\"\n\n// Descriptor describes the disposition of targeted content.\n// This structure provides `application/vnd.oci.descriptor.v1+json` mediatype\n// when marshalled to JSON.\ntype Descriptor struct {\n\t// MediaType is the media type of the object this schema refers to.\n\tMediaType string `json:\"mediaType\"`\n\n\t// Digest is the digest of the targeted content.\n\tDigest digest.Digest `json:\"digest\"`\n\n\t// Size specifies the size in bytes of the blob.\n\tSize int64 `json:\"size\"`\n\n\t// URLs specifies a list of URLs from which this object MAY be downloaded\n\tURLs []string `json:\"urls,omitempty\"`\n\n\t// Annotations contains arbitrary metadata relating to the targeted content.\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n\n\t// Data is an embedding of the targeted content. This is encoded as a base64\n\t// string when marshalled to JSON (automatically, by encoding/json). If\n\t// present, Data can be used directly to avoid fetching the targeted content.\n\tData []byte `json:\"data,omitempty\"`\n\n\t// Platform describes the platform which the image in the manifest runs on.\n\t//\n\t// This should only be used when referring to a manifest.\n\tPlatform *Platform `json:\"platform,omitempty\"`\n\n\t// ArtifactType is the IANA media type of this artifact.\n\tArtifactType string `json:\"artifactType,omitempty\"`\n}\n\n// Platform describes the platform which the image in the manifest runs on.\ntype Platform struct {\n\t// Architecture field specifies the CPU architecture, for example\n\t// `amd64` or `ppc64le`.\n\tArchitecture string `json:\"architecture\"`\n\n\t// OS specifies the operating system, for example `linux` or `windows`.\n\tOS string `json:\"os\"`\n\n\t// OSVersion is an optional field specifying the operating system\n\t// version, for example on Windows `10.0.14393.1066`.\n\tOSVersion string `json:\"os.version,omitempty\"`\n\n\t// OSFeatures is an optional field specifying an array of strings,\n\t// each listing a required OS feature (for example on Windows `win32k`).\n\tOSFeatures []string `json:\"os.features,omitempty\"`\n\n\t// Variant is an optional field specifying a variant of the CPU, for\n\t// example `v7` to specify ARMv7 when architecture is `arm`.\n\tVariant string `json:\"variant,omitempty\"`\n}\n\n// DescriptorEmptyJSON is the descriptor of a blob with content of `{}`.\nvar DescriptorEmptyJSON = Descriptor{\n\tMediaType: MediaTypeEmptyJSON,\n\tDigest:    `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`,\n\tSize:      2,\n\tData:      []byte(`{}`),\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport \"github.com/opencontainers/image-spec/specs-go\"\n\n// Index references manifests for various platforms.\n// This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON.\ntype Index struct {\n\tspecs.Versioned\n\n\t// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`\n\tMediaType string `json:\"mediaType,omitempty\"`\n\n\t// ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.\n\tArtifactType string `json:\"artifactType,omitempty\"`\n\n\t// Manifests references platform specific manifests.\n\tManifests []Descriptor `json:\"manifests\"`\n\n\t// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.\n\tSubject *Descriptor `json:\"subject,omitempty\"`\n\n\t// Annotations contains arbitrary metadata for the image index.\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nconst (\n\t// ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout\n\tImageLayoutFile = \"oci-layout\"\n\t// ImageLayoutVersion is the version of ImageLayout\n\tImageLayoutVersion = \"1.0.0\"\n\t// ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout\n\tImageIndexFile = \"index.json\"\n\t// ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout\n\tImageBlobsDir = \"blobs\"\n)\n\n// ImageLayout is the structure in the \"oci-layout\" file, found in the root\n// of an OCI Image-layout directory.\ntype ImageLayout struct {\n\tVersion string `json:\"imageLayoutVersion\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go",
    "content": "// Copyright 2016-2022 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nimport \"github.com/opencontainers/image-spec/specs-go\"\n\n// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON.\ntype Manifest struct {\n\tspecs.Versioned\n\n\t// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`\n\tMediaType string `json:\"mediaType,omitempty\"`\n\n\t// ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.\n\tArtifactType string `json:\"artifactType,omitempty\"`\n\n\t// Config references a configuration object for a container, by digest.\n\t// The referenced configuration object is a JSON blob that the runtime uses to set up the container.\n\tConfig Descriptor `json:\"config\"`\n\n\t// Layers is an indexed list of layers referenced by the manifest.\n\tLayers []Descriptor `json:\"layers\"`\n\n\t// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.\n\tSubject *Descriptor `json:\"subject,omitempty\"`\n\n\t// Annotations contains arbitrary metadata for the image manifest.\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage v1\n\nconst (\n\t// MediaTypeDescriptor specifies the media type for a content descriptor.\n\tMediaTypeDescriptor = \"application/vnd.oci.descriptor.v1+json\"\n\n\t// MediaTypeLayoutHeader specifies the media type for the oci-layout.\n\tMediaTypeLayoutHeader = \"application/vnd.oci.layout.header.v1+json\"\n\n\t// MediaTypeImageIndex specifies the media type for an image index.\n\tMediaTypeImageIndex = \"application/vnd.oci.image.index.v1+json\"\n\n\t// MediaTypeImageManifest specifies the media type for an image manifest.\n\tMediaTypeImageManifest = \"application/vnd.oci.image.manifest.v1+json\"\n\n\t// MediaTypeImageConfig specifies the media type for the image configuration.\n\tMediaTypeImageConfig = \"application/vnd.oci.image.config.v1+json\"\n\n\t// MediaTypeEmptyJSON specifies the media type for an unused blob containing the value \"{}\".\n\tMediaTypeEmptyJSON = \"application/vnd.oci.empty.v1+json\"\n)\n\nconst (\n\t// MediaTypeImageLayer is the media type used for layers referenced by the manifest.\n\tMediaTypeImageLayer = \"application/vnd.oci.image.layer.v1.tar\"\n\n\t// MediaTypeImageLayerGzip is the media type used for gzipped layers\n\t// referenced by the manifest.\n\tMediaTypeImageLayerGzip = \"application/vnd.oci.image.layer.v1.tar+gzip\"\n\n\t// MediaTypeImageLayerZstd is the media type used for zstd compressed\n\t// layers referenced by the manifest.\n\tMediaTypeImageLayerZstd = \"application/vnd.oci.image.layer.v1.tar+zstd\"\n)\n\n// Non-distributable layer media-types.\n//\n// Deprecated: Non-distributable layers are deprecated, and not recommended\n// for future use. Implementations SHOULD NOT produce new non-distributable\n// layers.\n// https://github.com/opencontainers/image-spec/pull/965\nconst (\n\t// MediaTypeImageLayerNonDistributable is the media type for layers referenced by\n\t// the manifest but with distribution restrictions.\n\t//\n\t// Deprecated: Non-distributable layers are deprecated, and not recommended\n\t// for future use. Implementations SHOULD NOT produce new non-distributable\n\t// layers.\n\t// https://github.com/opencontainers/image-spec/pull/965\n\tMediaTypeImageLayerNonDistributable = \"application/vnd.oci.image.layer.nondistributable.v1.tar\"\n\n\t// MediaTypeImageLayerNonDistributableGzip is the media type for\n\t// gzipped layers referenced by the manifest but with distribution\n\t// restrictions.\n\t//\n\t// Deprecated: Non-distributable layers are deprecated, and not recommended\n\t// for future use. Implementations SHOULD NOT produce new non-distributable\n\t// layers.\n\t// https://github.com/opencontainers/image-spec/pull/965\n\tMediaTypeImageLayerNonDistributableGzip = \"application/vnd.oci.image.layer.nondistributable.v1.tar+gzip\"\n\n\t// MediaTypeImageLayerNonDistributableZstd is the media type for zstd\n\t// compressed layers referenced by the manifest but with distribution\n\t// restrictions.\n\t//\n\t// Deprecated: Non-distributable layers are deprecated, and not recommended\n\t// for future use. Implementations SHOULD NOT produce new non-distributable\n\t// layers.\n\t// https://github.com/opencontainers/image-spec/pull/965\n\tMediaTypeImageLayerNonDistributableZstd = \"application/vnd.oci.image.layer.nondistributable.v1.tar+zstd\"\n)\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/version.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage specs\n\nimport \"fmt\"\n\nconst (\n\t// VersionMajor is for an API incompatible changes\n\tVersionMajor = 1\n\t// VersionMinor is for functionality in a backwards-compatible manner\n\tVersionMinor = 1\n\t// VersionPatch is for backwards-compatible bug fixes\n\tVersionPatch = 1\n\n\t// VersionDev indicates development branch. Releases will be empty string.\n\tVersionDev = \"+dev\"\n)\n\n// Version is the specification version that the package types support.\nvar Version = fmt.Sprintf(\"%d.%d.%d%s\", VersionMajor, VersionMinor, VersionPatch, VersionDev)\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-spec/specs-go/versioned.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage specs\n\n// Versioned provides a struct with the manifest schemaVersion and mediaType.\n// Incoming content with unknown schema version can be decoded against this\n// struct to check the version.\ntype Versioned struct {\n\t// SchemaVersion is the image manifest schema that this image follows\n\tSchemaVersion int `json:\"schemaVersion\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/LICENSE",
    "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": "vendor/github.com/opencontainers/image-tools/image/autodetect.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/pkg/errors\"\n)\n\n// supported autodetection types\nconst (\n\tTypeImageLayout = \"imageLayout\"\n\tTypeImage       = \"image\"\n\tTypeImageZip    = \"imageZip\"\n\tTypeManifest    = \"manifest\"\n\tTypeImageIndex  = \"imageIndex\"\n\tTypeConfig      = \"config\"\n)\n\n// Autodetect detects the validation type for the given path\n// or an error if the validation type could not be resolved.\nfunc Autodetect(path string) (string, error) {\n\tfi, err := os.Stat(path)\n\tif err != nil {\n\t\treturn \"\", errors.Wrapf(err, \"unable to access path\") // err from os.Stat includes path name\n\t}\n\n\tif fi.IsDir() {\n\t\treturn TypeImageLayout, nil\n\t}\n\n\tf, err := os.Open(path) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn \"\", errors.Wrap(err, \"unable to open file\") // os.Open includes the filename\n\t}\n\tdefer f.Close()\n\n\tbuf, err := ioutil.ReadAll(io.LimitReader(f, 512)) // read some initial bytes to detect content\n\tif err != nil {\n\t\treturn \"\", errors.Wrap(err, \"unable to read\")\n\t}\n\n\tmimeType := http.DetectContentType(buf)\n\n\tswitch mimeType {\n\tcase \"application/x-gzip\", \"application/x-rar-compressed\", \"application/octet-stream\":\n\t\treturn TypeImage, nil\n\tcase \"application/zip\":\n\t\treturn TypeImageZip, nil\n\t}\n\n\treturn \"\", errors.New(\"unknown file type\")\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/config.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/image-spec/schema\"\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/opencontainers/runtime-spec/specs-go\"\n\t\"github.com/pkg/errors\"\n)\n\nfunc findConfig(w walker, d *v1.Descriptor) (*v1.Image, error) {\n\tvar c v1.Image\n\tcpath := filepath.Join(\"blobs\", string(d.Digest.Algorithm()), d.Digest.Hex())\n\n\tswitch err := w.find(cpath, func(path string, r io.Reader) error {\n\t\tbuf, err := ioutil.ReadAll(r)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: error reading config\", path)\n\t\t}\n\n\t\tif err := schema.ValidatorMediaTypeImageConfig.Validate(bytes.NewReader(buf)); err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: config validation failed\", path)\n\t\t}\n\n\t\tif err := json.Unmarshal(buf, &c); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn errEOW\n\t}); err {\n\tcase nil:\n\t\treturn nil, fmt.Errorf(\"%s: config not found\", cpath)\n\tcase errEOW:\n\t\treturn &c, nil\n\tdefault:\n\t\treturn nil, err\n\t}\n}\n\nfunc runtimeSpec(c *v1.Image, rootfs string) (*specs.Spec, error) {\n\tif c.OS != \"linux\" {\n\t\treturn nil, fmt.Errorf(\"%s: unsupported OS\", c.OS)\n\t}\n\n\tvar s specs.Spec\n\ts.Version = specs.Version\n\t// we should at least apply the default spec, otherwise this is totally useless\n\ts.Root = &specs.Root{}\n\ts.Root.Path = rootfs\n\n\ts.Process = &specs.Process{}\n\ts.Process.Terminal = true\n\ts.Process.Cwd = \"/\"\n\tif c.Config.WorkingDir != \"\" {\n\t\ts.Process.Cwd = c.Config.WorkingDir\n\t}\n\ts.Process.Env = append(s.Process.Env, c.Config.Env...)\n\ts.Process.Args = append(s.Process.Args, c.Config.Entrypoint...)\n\ts.Process.Args = append(s.Process.Args, c.Config.Cmd...)\n\n\tif len(s.Process.Args) == 0 {\n\t\ts.Process.Args = append(s.Process.Args, \"sh\")\n\t}\n\n\tif uid, err := strconv.Atoi(c.Config.User); err == nil {\n\t\ts.Process.User.UID = uint32(uid)\n\t} else if ug := strings.Split(c.Config.User, \":\"); len(ug) == 2 {\n\t\tuid, err := strconv.Atoi(ug[0])\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"config.User: unsupported uid format\")\n\t\t}\n\n\t\tgid, err := strconv.Atoi(ug[1])\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"config.User: unsupported gid format\")\n\t\t}\n\n\t\ts.Process.User.UID = uint32(uid)\n\t\ts.Process.User.GID = uint32(gid)\n\t} else if c.Config.User != \"\" {\n\t\treturn nil, errors.New(\"config.User: unsupported format\")\n\t}\n\n\ts.Linux = &specs.Linux{}\n\n\tfor vol := range c.Config.Volumes {\n\t\ts.Mounts = append(\n\t\t\ts.Mounts,\n\t\t\tspecs.Mount{\n\t\t\t\tDestination: vol,\n\t\t\t\tType:        \"bind\",\n\t\t\t\tOptions:     []string{\"rbind\"},\n\t\t\t},\n\t\t)\n\t}\n\n\treturn &s, nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/descriptor.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n)\n\nconst indexPath = \"index.json\"\n\nfunc listReferences(w walker) ([]v1.Descriptor, error) {\n\tvar descs []v1.Descriptor\n\tvar index v1.Index\n\n\tif err := w.walk(func(path string, info os.FileInfo, r io.Reader) error {\n\t\tif info.IsDir() || filepath.Clean(path) != indexPath {\n\t\t\treturn nil\n\t\t}\n\n\t\tif err := json.NewDecoder(r).Decode(&index); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdescs = index.Manifests\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn descs, nil\n}\n\nfunc findDescriptor(w walker, names []string) ([]v1.Descriptor, error) {\n\tvar descs []v1.Descriptor\n\tvar index v1.Index\n\tdpath := \"index.json\"\n\n\tif err := w.find(dpath, func(path string, r io.Reader) error {\n\t\tif err := json.NewDecoder(r).Decode(&index); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tdescs = index.Manifests\n\t\tfor _, name := range names {\n\t\t\targsParts := strings.Split(name, \"=\")\n\t\t\tif len(argsParts) != 2 {\n\t\t\t\treturn fmt.Errorf(\"each ref must contain two parts\")\n\t\t\t}\n\n\t\t\tswitch argsParts[0] {\n\t\t\tcase \"name\":\n\t\t\t\tfor i := 0; i < len(descs); i++ {\n\t\t\t\t\tif descs[i].Annotations[v1.AnnotationRefName] != argsParts[1] {\n\t\t\t\t\t\tdescs = append(descs[:i], descs[i+1:]...)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase \"platform.os\":\n\t\t\t\tfor i := 0; i < len(descs); i++ {\n\t\t\t\t\tif descs[i].Platform != nil && index.Manifests[i].Platform.OS != argsParts[1] {\n\t\t\t\t\t\tdescs = append(descs[:i], descs[i+1:]...)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase \"digest\":\n\t\t\t\tfor i := 0; i < len(descs); i++ {\n\t\t\t\t\tif string(descs[i].Digest) != argsParts[1] {\n\t\t\t\t\t\tdescs = append(descs[:i], descs[i+1:]...)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"criteria %q unimplemented\", argsParts[0])\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(descs) == 0 {\n\t\treturn nil, fmt.Errorf(\"index.json: descriptor retrieved by refs %v is not match\", names)\n\t} else if len(descs) > 1 {\n\t\treturn nil, fmt.Errorf(\"index.json: descriptor retrieved by refs %v is not unique\", names)\n\t}\n\n\treturn descs, nil\n}\n\nfunc validateDescriptor(d *v1.Descriptor, w walker, mts []string) error {\n\tvar found bool\n\tfor _, mt := range mts {\n\t\tif d.MediaType == mt {\n\t\t\tfound = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !found {\n\t\treturn fmt.Errorf(\"invalid descriptor MediaType %q\", d.MediaType)\n\t}\n\n\tif err := d.Digest.Validate(); err != nil {\n\t\treturn err\n\t}\n\n\t// Copy the contents of the layer in to the verifier\n\tverifier := d.Digest.Verifier()\n\tnumBytes, err := w.get(*d, verifier)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error generating hash\")\n\t}\n\n\tif numBytes != d.Size {\n\t\treturn errors.New(\"size mismatch\")\n\t}\n\n\tif !verifier.Verified() {\n\t\treturn errors.New(\"digest mismatch\")\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/doc.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package image defines methods for validating, unpacking OCI images and creating OCI runtime bundle.\npackage image\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/image.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n)\n\n// ValidateLayout walks through the given file tree and validates the manifest\n// pointed to by the given refs or returns an error if the validation failed.\nfunc ValidateLayout(src string, refs []string, out *log.Logger) error {\n\treturn validate(newPathWalker(src), refs, out)\n}\n\n// ValidateZip walks through the given file tree and validates the manifest\n// pointed to by the given refs or returns an error if the validation failed.\nfunc ValidateZip(src string, refs []string, out *log.Logger) error {\n\treturn validate(newZipWalker(src), refs, out)\n}\n\n// ValidateFile opens the tar file given by the filename, then calls ValidateReader\nfunc ValidateFile(tarFile string, refs []string, out *log.Logger) error {\n\tf, err := os.Open(tarFile) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"unable to open file\")\n\t}\n\tdefer f.Close()\n\n\treturn Validate(f, refs, out)\n}\n\n// Validate walks through a tar stream and validates the manifest.\n// * Check that all refs point to extant blobs\n// * Checks that all referred blobs are valid\n// * Checks that mime-types are correct\n// returns error on validation failure\nfunc Validate(r io.ReadSeeker, refs []string, out *log.Logger) error {\n\treturn validate(newTarWalker(r), refs, out)\n}\n\nvar validRefMediaTypes = []string{\n\tv1.MediaTypeImageManifest,\n\tv1.MediaTypeImageIndex,\n}\n\nfunc validate(w walker, refs []string, out *log.Logger) error {\n\tvar descs []v1.Descriptor\n\tvar err error\n\n\tif err = layoutValidate(w); err != nil {\n\t\treturn err\n\t}\n\n\tif len(refs) == 0 {\n\t\tout.Print(\"No ref specified, verify all refs\")\n\t\tdescs, err = listReferences(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(descs) == 0 {\n\t\t\t// TODO(runcom): ugly, we'll need a better way and library\n\t\t\t// to express log levels.\n\t\t\t// see https://github.com/opencontainers/image-spec/issues/288\n\t\t\tout.Print(\"WARNING: no descriptors found\")\n\t\t\treturn nil\n\t\t}\n\t} else {\n\t\tdescs, err = findDescriptor(w, refs)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfor _, desc := range descs {\n\t\td := &desc\n\t\tif err = validateDescriptor(d, w, validRefMediaTypes); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif d.MediaType == validRefMediaTypes[0] {\n\t\t\tm, err := findManifest(w, d)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err := validateManifest(m, w); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif d.MediaType == validRefMediaTypes[1] {\n\t\t\tindex, err := findIndex(w, d)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err := validateIndex(index, w); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif len(index.Manifests) == 0 {\n\t\t\t\tfmt.Println(\"warning: no manifests found\")\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tfor _, manifest := range index.Manifests {\n\t\t\t\tm, err := findManifest(w, &manifest)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tif err := validateManifest(m, w); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif out != nil && len(refs) > 0 {\n\t\tout.Printf(\"reference %v: OK\", refs)\n\t}\n\n\treturn nil\n}\n\n// UnpackLayout walks through the file tree given by src and, using the layers\n// specified in the manifest pointed to by the given ref, unpacks all layers in\n// the given destination directory or returns an error if the unpacking failed.\nfunc UnpackLayout(src, dest, platform string, refs []string) error {\n\treturn unpack(newPathWalker(src), dest, platform, refs)\n}\n\n// UnpackZip opens and walks through the zip file given by src and, using the layers\n// specified in the manifest pointed to by the given ref, unpacks all layers in\n// the given destination directory or returns an error if the unpacking failed.\nfunc UnpackZip(src, dest, platform string, refs []string) error {\n\treturn unpack(newZipWalker(src), dest, platform, refs)\n}\n\n// UnpackFile opens the file pointed by tarFileName and calls Unpack on it.\nfunc UnpackFile(tarFileName, dest, platform string, refs []string) error {\n\tf, err := os.Open(tarFileName) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"unable to open file\")\n\t}\n\tdefer f.Close()\n\n\treturn Unpack(f, dest, platform, refs)\n}\n\n// Unpack walks through the tar stream and, using the layers specified in\n// the manifest pointed to by the given ref, unpacks all layers in the given\n// destination directory or returns an error if the unpacking failed.\n// The destination will be created if it does not exist.\nfunc Unpack(r io.ReadSeeker, dest, platform string, refs []string) error {\n\treturn unpack(newTarWalker(r), dest, platform, refs)\n}\n\nfunc unpack(w walker, dest, platform string, refs []string) error {\n\tif err := layoutValidate(w); err != nil {\n\t\treturn err\n\t}\n\n\tdescs, err := findDescriptor(w, refs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tref := &descs[0]\n\tif err = validateDescriptor(ref, w, validRefMediaTypes); err != nil {\n\t\treturn err\n\t}\n\n\tif ref.MediaType == validRefMediaTypes[0] {\n\t\tm, err := findManifest(w, ref)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := validateManifest(m, w); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn unpackManifest(m, w, dest)\n\t}\n\n\tif ref.MediaType == validRefMediaTypes[1] {\n\t\tindex, err := findIndex(w, ref)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err = validateIndex(index, w); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tmanifests, err := filterManifest(w, index.Manifests, platform)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor _, m := range manifests {\n\t\t\treturn unpackManifest(m, w, dest)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CreateRuntimeBundleLayout walks through the file tree given by src and\n// creates an OCI runtime bundle in the given destination dest\n// or returns an error if the unpacking failed.\nfunc CreateRuntimeBundleLayout(src, dest, root, platform string, refs []string) error {\n\treturn createRuntimeBundle(newPathWalker(src), dest, root, platform, refs)\n}\n\n// CreateRuntimeBundleZip opens and walks through the zip file given by src\n// and creates an OCI runtime bundle in the given destination dest\n// or returns an error if the unpacking failed.\nfunc CreateRuntimeBundleZip(src, dest, root, platform string, refs []string) error {\n\treturn createRuntimeBundle(newZipWalker(src), dest, root, platform, refs)\n}\n\n// CreateRuntimeBundleFile opens the file pointed by tarFile and calls\n// CreateRuntimeBundle.\nfunc CreateRuntimeBundleFile(tarFile, dest, root, platform string, refs []string) error {\n\tf, err := os.Open(tarFile) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"unable to open file\")\n\t}\n\tdefer f.Close()\n\n\treturn createRuntimeBundle(newTarWalker(f), dest, root, platform, refs)\n}\n\n// CreateRuntimeBundle walks through the given tar stream and\n// creates an OCI runtime bundle in the given destination dest\n// or returns an error if the unpacking failed.\nfunc CreateRuntimeBundle(r io.ReadSeeker, dest, root, platform string, refs []string) error {\n\treturn createRuntimeBundle(newTarWalker(r), dest, root, platform, refs)\n}\n\nfunc createRuntimeBundle(w walker, dest, rootfs, platform string, refs []string) error {\n\tif err := layoutValidate(w); err != nil {\n\t\treturn err\n\t}\n\n\tdescs, err := findDescriptor(w, refs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tref := &descs[0]\n\tif err = validateDescriptor(ref, w, validRefMediaTypes); err != nil {\n\t\treturn err\n\t}\n\n\tif ref.MediaType == validRefMediaTypes[0] {\n\t\tm, err := findManifest(w, ref)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := validateManifest(m, w); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn createBundle(w, m, dest, rootfs)\n\t}\n\n\tif ref.MediaType == validRefMediaTypes[1] {\n\t\tindex, err := findIndex(w, ref)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err = validateIndex(index, w); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tmanifests, err := filterManifest(w, index.Manifests, platform)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor _, m := range manifests {\n\t\t\treturn createBundle(w, m, dest, rootfs)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc createBundle(w walker, m *v1.Manifest, dest, rootfs string) (retErr error) {\n\tc, err := findConfig(w, &m.Config)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif _, err = os.Stat(dest); err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tif err2 := os.MkdirAll(dest, 0750); err2 != nil {\n\t\t\t\treturn err2\n\t\t\t}\n\t\t\tdefer func() {\n\t\t\t\tif retErr != nil {\n\t\t\t\t\tif err3 := os.RemoveAll(dest); err3 != nil {\n\t\t\t\t\t\tfmt.Printf(\"Failed to clean up %q: %s\\n\", dest, err3.Error())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}()\n\t\t} else {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif err = unpackManifest(m, w, filepath.Join(dest, rootfs)); err != nil {\n\t\treturn err\n\t}\n\n\tspec, err := runtimeSpec(c, rootfs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tf, err := os.Create(filepath.Join(dest, \"config.json\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\n\treturn json.NewEncoder(f).Encode(spec)\n}\n\n// filertManifest returns a filtered list of manifests\nfunc filterManifest(w walker, Manifests []v1.Descriptor, platform string) ([]*v1.Manifest, error) {\n\tvar manifests []*v1.Manifest\n\n\targsParts := strings.Split(platform, \":\")\n\tif len(argsParts) != 2 {\n\t\treturn manifests, fmt.Errorf(\"platform must have os and arch when reftype is index\")\n\t}\n\n\tif len(Manifests) == 0 {\n\t\tfmt.Println(\"warning: no manifests found\")\n\t\treturn manifests, nil\n\t}\n\n\tfor _, manifest := range Manifests {\n\t\tm, err := findManifest(w, &manifest)\n\t\tif err != nil {\n\t\t\treturn manifests, err\n\t\t}\n\n\t\tif err := validateManifest(m, w); err != nil {\n\t\t\treturn manifests, err\n\t\t}\n\t\tif strings.EqualFold(manifest.Platform.OS, argsParts[0]) && strings.EqualFold(manifest.Platform.Architecture, argsParts[1]) {\n\t\t\tmanifests = append(manifests, m)\n\t\t}\n\t}\n\n\tif len(manifests) == 0 {\n\t\treturn manifests, fmt.Errorf(\"there is no matching manifest\")\n\t}\n\n\treturn manifests, nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/index.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/opencontainers/image-spec/schema\"\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n)\n\nfunc findIndex(w walker, d *v1.Descriptor) (*v1.Index, error) {\n\tvar index v1.Index\n\tipath := filepath.Join(\"blobs\", string(d.Digest.Algorithm()), d.Digest.Hex())\n\n\tswitch err := w.walk(func(path string, info os.FileInfo, r io.Reader) error {\n\t\tif info.IsDir() || filepath.Clean(path) != ipath {\n\t\t\treturn nil\n\t\t}\n\n\t\tbuf, err := ioutil.ReadAll(r)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: error reading index\", path)\n\t\t}\n\n\t\tif err := schema.ValidatorMediaTypeImageIndex.Validate(bytes.NewReader(buf)); err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: index validation failed\", path)\n\t\t}\n\n\t\tif err := json.Unmarshal(buf, &index); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn errEOW\n\t}); err {\n\tcase errEOW:\n\t\treturn &index, nil\n\tcase nil:\n\t\treturn nil, fmt.Errorf(\"index not found\")\n\tdefault:\n\t\treturn nil, err\n\t}\n}\n\nfunc validateIndex(index *v1.Index, w walker) error {\n\tfor _, manifest := range index.Manifests {\n\t\tif err := validateDescriptor(&manifest, w, []string{v1.MediaTypeImageManifest}); err != nil {\n\t\t\treturn errors.Wrap(err, \"manifest validation failed\")\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/layout.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/image-spec/schema\"\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n)\n\nfunc layoutValidate(w walker) error {\n\tvar blobsExist, indexExist, layoutExist bool\n\n\tif err := w.walk(func(path string, info os.FileInfo, r io.Reader) error {\n\t\tif strings.EqualFold(filepath.Base(path), \"blobs\") {\n\t\t\tblobsExist = true\n\t\t\tif !info.IsDir() {\n\t\t\t\treturn fmt.Errorf(\"blobs is not a directory\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}\n\n\t\tif strings.EqualFold(filepath.Base(path), \"index.json\") {\n\t\t\tindexExist = true\n\t\t\tif info.IsDir() {\n\t\t\t\treturn fmt.Errorf(\"index.json is a directory\")\n\t\t\t}\n\n\t\t\tbuf, err := ioutil.ReadAll(r)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrap(err, \"error reading index.json\")\n\t\t\t}\n\n\t\t\tif err := schema.ValidatorMediaTypeImageIndex.Validate(bytes.NewReader(buf)); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"index.json validation failed\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}\n\n\t\tif strings.EqualFold(filepath.Base(path), \"oci-layout\") {\n\t\t\tlayoutExist = true\n\t\t\tif info.IsDir() {\n\t\t\t\treturn fmt.Errorf(\"oci-layout is a directory\")\n\t\t\t}\n\n\t\t\tvar imageLayout v1.ImageLayout\n\t\t\tbuf, err := ioutil.ReadAll(r)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrap(err, \"error reading oci-layout\")\n\t\t\t}\n\n\t\t\tif err := schema.ValidatorMediaTypeLayoutHeader.Validate(bytes.NewReader(buf)); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"oci-layout validation failed\")\n\t\t\t}\n\n\t\t\tif err := json.Unmarshal(buf, &imageLayout); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"oci-layout format mismatch\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif !blobsExist {\n\t\treturn fmt.Errorf(\"image layout must contain blobs directory\")\n\t}\n\n\tif !indexExist {\n\t\treturn fmt.Errorf(\"image layout must contain index.json file\")\n\t}\n\n\tif !layoutExist {\n\t\treturn fmt.Errorf(\"image layout must contain oci-layout file\")\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/manifest.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"archive/tar\"\n\t\"bufio\"\n\t\"bytes\"\n\t\"compress/bzip2\"\n\t\"compress/gzip\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/opencontainers/image-spec/schema\"\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nfunc findManifest(w walker, d *v1.Descriptor) (*v1.Manifest, error) {\n\tvar m v1.Manifest\n\tmpath := filepath.Join(\"blobs\", string(d.Digest.Algorithm()), d.Digest.Hex())\n\n\tswitch err := w.find(mpath, func(path string, r io.Reader) error {\n\t\tbuf, err := ioutil.ReadAll(r)\n\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: error reading manifest\", path)\n\t\t}\n\n\t\tif err := schema.ValidatorMediaTypeManifest.Validate(bytes.NewReader(buf)); err != nil {\n\t\t\treturn errors.Wrapf(err, \"%s: manifest validation failed\", path)\n\t\t}\n\n\t\tif err := json.Unmarshal(buf, &m); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn errEOW\n\t}); err {\n\tcase nil:\n\t\treturn nil, fmt.Errorf(\"%s: manifest not found\", mpath)\n\tcase errEOW:\n\t\treturn &m, nil\n\tdefault:\n\t\treturn nil, err\n\t}\n}\n\nfunc validateManifest(m *v1.Manifest, w walker) error {\n\tif err := validateDescriptor(&m.Config, w, []string{v1.MediaTypeImageConfig}); err != nil {\n\t\treturn errors.Wrap(err, \"config validation failed\")\n\t}\n\n\tvalidLayerMediaTypes := []string{\n\t\tv1.MediaTypeImageLayer,\n\t\tv1.MediaTypeImageLayerGzip,\n\t\tv1.MediaTypeImageLayerNonDistributable,\n\t\tv1.MediaTypeImageLayerNonDistributableGzip,\n\t}\n\n\tfor _, d := range m.Layers {\n\t\tif err := validateDescriptor(&d, w, validLayerMediaTypes); err != nil {\n\t\t\treturn errors.Wrap(err, \"layer validation failed\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc unpackManifest(m *v1.Manifest, w walker, dest string) (retErr error) {\n\t// error out if the dest directory is not empty\n\ts, err := ioutil.ReadDir(dest)\n\tif err != nil && !os.IsNotExist(err) { // We'll create the dir later\n\t\treturn errors.Wrap(err, \"unpack: unable to open dest\") // err contains dest\n\t}\n\tif len(s) > 0 {\n\t\treturn fmt.Errorf(\"%s is not empty\", dest)\n\t}\n\tdefer func() {\n\t\t// if we encounter error during unpacking\n\t\t// clean up the partially-unpacked destination\n\t\tif retErr != nil {\n\t\t\tif err := os.RemoveAll(dest); err != nil {\n\t\t\t\tfmt.Printf(\"Error: failed to remove partially-unpacked destination %v\", err)\n\t\t\t}\n\t\t}\n\t}()\n\tfor _, d := range m.Layers {\n\t\tlpath := filepath.Join(\"blobs\", string(d.Digest.Algorithm()), d.Digest.Hex())\n\t\tswitch err := w.find(lpath, func(path string, r io.Reader) error {\n\t\t\tif err := unpackLayer(d.MediaType, path, dest, r); err != nil {\n\t\t\t\treturn errors.Wrap(err, \"unpack: error extracting layer\")\n\t\t\t}\n\n\t\t\treturn errEOW\n\t\t}); err {\n\t\tcase nil:\n\t\t\treturn fmt.Errorf(\"%s: layer not found\", dest)\n\t\tcase errEOW:\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc getReader(path, mediaType, comp string, buf io.Reader) (io.Reader, error) {\n\tswitch comp {\n\tcase \"gzip\":\n\t\tif !strings.HasSuffix(mediaType, \"+gzip\") {\n\t\t\tlogrus.Debugf(\"%q: %s media type with non-%s file\", path, comp, comp)\n\t\t}\n\n\t\treturn gzip.NewReader(buf)\n\tcase \"bzip2\":\n\t\tif !strings.HasSuffix(mediaType, \"+bzip2\") {\n\t\t\tlogrus.Debugf(\"%q: %s media type with non-%s file\", path, comp, comp)\n\t\t}\n\n\t\treturn bzip2.NewReader(buf), nil\n\tcase \"xz\":\n\t\treturn nil, errors.New(\"xz layers are not supported\")\n\tdefault:\n\t\tif strings.Contains(mediaType, \"+\") {\n\t\t\tlogrus.Debugf(\"%q: %s media type with non-%s file\", path, comp, comp)\n\t\t}\n\n\t\treturn buf, nil\n\t}\n}\n\n// DetectCompression detects the compression algorithm of the source.\nfunc DetectCompression(r *bufio.Reader) (string, error) {\n\tsource, err := r.Peek(10)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor compression, m := range map[string][]byte{\n\t\t\"bzip2\": {0x42, 0x5A, 0x68},\n\t\t\"gzip\":  {0x1F, 0x8B, 0x08},\n\t\t// FIXME needs decompression support\n\t\t// \"xz\":    {0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00},\n\t} {\n\t\tif len(source) < len(m) {\n\t\t\tlogrus.Debug(\"Len too short\")\n\t\t\tcontinue\n\t\t}\n\t\tif bytes.Equal(m, source[:len(m)]) {\n\t\t\treturn compression, nil\n\t\t}\n\t}\n\treturn \"plain\", nil\n}\n\nfunc unpackLayer(mediaType, path, dest string, r io.Reader) error {\n\tentries := make(map[string]bool)\n\n\tbuf := bufio.NewReader(r)\n\n\tcomp, err := DetectCompression(buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treader, err := getReader(path, mediaType, comp, buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar dirs []*tar.Header\n\ttr := tar.NewReader(reader)\n\nloop:\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tswitch err {\n\t\tcase io.EOF:\n\t\t\tbreak loop\n\t\tcase nil:\n\t\t\t// success, continue below\n\t\tdefault:\n\t\t\treturn errors.Wrapf(err, \"error advancing tar stream\")\n\t\t}\n\n\t\tvar whiteout bool\n\t\twhiteout, err = unpackLayerEntry(dest, hdr, tr, &entries)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif whiteout {\n\t\t\tcontinue loop\n\t\t}\n\n\t\t// Directory mtimes must be handled at the end to avoid further\n\t\t// file creation in them to modify the directory mtime\n\t\tif hdr.Typeflag == tar.TypeDir {\n\t\t\tdirs = append(dirs, hdr)\n\t\t}\n\t}\n\tfor _, hdr := range dirs {\n\t\tpath := filepath.Join(dest, hdr.Name)\n\n\t\tfinfo := hdr.FileInfo()\n\t\t// I believe the old version was using time.Now().UTC() to overcome an\n\t\t// invalid error from chtimes.....but here we lose hdr.AccessTime like this...\n\t\tif err := os.Chtimes(path, time.Now().UTC(), finfo.ModTime()); err != nil {\n\t\t\treturn errors.Wrap(err, \"error changing time\")\n\t\t}\n\t}\n\treturn nil\n}\n\n// unpackLayerEntry unpacks a single entry from a layer.\nfunc unpackLayerEntry(dest string, header *tar.Header, reader io.Reader, entries *map[string]bool) (whiteout bool, err error) {\n\theader.Name = filepath.Clean(header.Name)\n\tif !strings.HasSuffix(header.Name, string(os.PathSeparator)) {\n\t\t// Not the root directory, ensure that the parent directory exists\n\t\tparent := filepath.Dir(header.Name)\n\t\tparentPath := filepath.Join(dest, parent)\n\t\tif _, err2 := os.Lstat(parentPath); err2 != nil && os.IsNotExist(err2) {\n\t\t\tif err3 := os.MkdirAll(parentPath, 0750); err3 != nil {\n\t\t\t\treturn false, err3\n\t\t\t}\n\t\t}\n\t}\n\tpath := filepath.Join(dest, header.Name)\n\tif (*entries)[path] {\n\t\treturn false, fmt.Errorf(\"duplicate entry for %s\", path)\n\t}\n\t(*entries)[path] = true\n\trel, err := filepath.Rel(dest, path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tinfo := header.FileInfo()\n\tif strings.HasPrefix(rel, \"..\"+string(os.PathSeparator)) {\n\t\treturn false, fmt.Errorf(\"%q is outside of %q\", header.Name, dest)\n\t}\n\n\tif strings.HasPrefix(info.Name(), \".wh.\") {\n\t\tpath = strings.Replace(path, \".wh.\", \"\", 1)\n\n\t\tif err = os.RemoveAll(path); err != nil {\n\t\t\treturn true, errors.Wrap(err, \"unable to delete whiteout path\")\n\t\t}\n\n\t\treturn true, nil\n\t}\n\n\tif header.Typeflag != tar.TypeDir {\n\t\terr = os.RemoveAll(path)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\t}\n\n\tswitch header.Typeflag {\n\tcase tar.TypeDir:\n\t\tfi, err := os.Lstat(path)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\t\tif os.IsNotExist(err) || !fi.IsDir() {\n\t\t\terr = os.RemoveAll(path)\n\t\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\terr = os.MkdirAll(path, info.Mode())\n\t\t\tif err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t}\n\n\tcase tar.TypeReg, tar.TypeRegA:\n\t\tf, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, info.Mode())\n\t\tif err != nil {\n\t\t\treturn false, errors.Wrap(err, \"unable to open file\")\n\t\t}\n\n\t\tif _, err := io.Copy(f, reader); err != nil {\n\t\t\tdefer f.Close()\n\t\t\treturn false, errors.Wrap(err, \"unable to copy\")\n\t\t}\n\t\tdefer f.Close()\n\n\tcase tar.TypeLink:\n\t\ttarget := filepath.Join(dest, header.Linkname)\n\n\t\tif !strings.HasPrefix(target, dest) {\n\t\t\treturn false, fmt.Errorf(\"invalid hardlink %q -> %q\", target, header.Linkname)\n\t\t}\n\n\t\tif err := os.Link(target, path); err != nil {\n\t\t\treturn false, err\n\t\t}\n\n\tcase tar.TypeSymlink:\n\t\ttarget := filepath.Join(filepath.Dir(path), header.Linkname)\n\n\t\tif !strings.HasPrefix(target, dest) {\n\t\t\treturn false, fmt.Errorf(\"invalid symlink %q -> %q\", path, header.Linkname)\n\t\t}\n\n\t\tif err := os.Symlink(header.Linkname, path); err != nil {\n\t\t\treturn false, err\n\t\t}\n\tcase tar.TypeXGlobalHeader:\n\t\treturn false, nil\n\t}\n\n\treturn false, nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/project.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\n// SpecURL is the URL for the image-spec repository\nvar SpecURL = \"https://github.com/opencontainers/image-spec\"\n\n// IssuesURL is the URL for the issues of image-tools\nvar IssuesURL = \"https://github.com/opencontainers/image-tools/issues\"\n"
  },
  {
    "path": "vendor/github.com/opencontainers/image-tools/image/walker.go",
    "content": "// Copyright 2016 The Linux Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage image\n\nimport (\n\t\"archive/tar\"\n\t\"archive/zip\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\n\t\"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/pkg/errors\"\n)\n\nvar (\n\terrEOW = fmt.Errorf(\"end of walk\") // error to signal stop walking\n)\n\n// walkFunc is a function type that gets called for each file or directory visited by the Walker.\ntype walkFunc func(path string, _ os.FileInfo, _ io.Reader) error\n\ntype findFunc func(path string, r io.Reader) error\n\n// walker is the interface that defines how to access a given archival format\ntype walker interface {\n\n\t// walk calls walkfunc for every entity in the archive\n\twalk(walkFunc) error\n\n\t// get will copy an arbitrary blob, defined by desc, in to dst. returns\n\t// the number of bytes copied on success.\n\tget(desc v1.Descriptor, dst io.Writer) (int64, error)\n\n\t// find calls findFunc for handling content of path\n\tfind(path string, ff findFunc) error\n}\n\n// tarWalker exposes access to image layouts in a tar file.\ntype tarWalker struct {\n\tr io.ReadSeeker\n\n\t// Synchronize use of the reader\n\tmut sync.Mutex\n}\n\n// newTarWalker returns a Walker that walks through .tar files.\nfunc newTarWalker(r io.ReadSeeker) walker {\n\treturn &tarWalker{r: r}\n}\n\nfunc (w *tarWalker) walk(f walkFunc) error {\n\tw.mut.Lock()\n\tdefer w.mut.Unlock()\n\n\tif _, err := w.r.Seek(0, io.SeekStart); err != nil {\n\t\treturn errors.Wrapf(err, \"unable to reset\")\n\t}\n\n\ttr := tar.NewReader(w.r)\n\nloop:\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tswitch err {\n\t\tcase io.EOF:\n\t\t\tbreak loop\n\t\tcase nil:\n\t\t\t// success, continue below\n\t\tdefault:\n\t\t\treturn errors.Wrapf(err, \"error advancing tar stream\")\n\t\t}\n\n\t\tinfo := hdr.FileInfo()\n\t\tif err := f(hdr.Name, info, tr); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (w *tarWalker) get(desc v1.Descriptor, dst io.Writer) (int64, error) {\n\tvar bytes int64\n\tdone := false\n\n\texpectedPath := filepath.Join(\"blobs\", string(desc.Digest.Algorithm()), desc.Digest.Hex())\n\n\tf := func(path string, info os.FileInfo, rdr io.Reader) error {\n\t\tvar err error\n\t\tif done {\n\t\t\treturn nil\n\t\t}\n\n\t\tif filepath.Clean(path) == expectedPath && !info.IsDir() {\n\t\t\tif bytes, err = io.Copy(dst, rdr); err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"get failed: failed to copy blob to destination\")\n\t\t\t}\n\t\t\tdone = true\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := w.walk(f); err != nil {\n\t\treturn 0, errors.Wrapf(err, \"get failed: unable to walk\")\n\t}\n\tif !done {\n\t\treturn 0, os.ErrNotExist\n\t}\n\n\treturn bytes, nil\n}\n\nfunc (w *tarWalker) find(path string, ff findFunc) error {\n\tdone := false\n\n\tf := func(relpath string, info os.FileInfo, rdr io.Reader) error {\n\t\tvar err error\n\t\tif done {\n\t\t\treturn nil\n\t\t}\n\n\t\tif filepath.Clean(relpath) == path && !info.IsDir() {\n\t\t\tif err = ff(relpath, rdr); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdone = true\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := w.walk(f); err != nil {\n\t\treturn errors.Wrapf(err, \"find failed: unable to walk\")\n\t}\n\tif !done {\n\t\treturn os.ErrNotExist\n\t}\n\n\treturn nil\n}\n\ntype eofReader struct{}\n\nfunc (eofReader) Read(_ []byte) (int, error) {\n\treturn 0, io.EOF\n}\n\ntype pathWalker struct {\n\troot string\n}\n\n// newPathWalker returns a Walker that walks through directories\n// starting at the given root path. It does not follow symlinks.\nfunc newPathWalker(root string) walker {\n\treturn &pathWalker{root}\n}\n\nfunc (w *pathWalker) walk(f walkFunc) error {\n\treturn filepath.Walk(w.root, func(path string, info os.FileInfo, err error) error {\n\t\t// MUST check error value, to make sure the `os.FileInfo` is available.\n\t\t// Otherwise panic risk will exist.\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error walking path\")\n\t\t}\n\n\t\trel, err := filepath.Rel(w.root, path)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error walking path\") // err from filepath.Walk includes path name\n\t\t}\n\n\t\tif info.IsDir() { // behave like a tar reader for directories\n\t\t\treturn f(rel, info, eofReader{})\n\t\t}\n\n\t\tfile, err := os.Open(path) // nolint: errcheck, gosec\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"unable to open file\") // os.Open includes the path\n\t\t}\n\t\tdefer file.Close()\n\n\t\treturn f(rel, info, file)\n\t})\n}\n\nfunc (w *pathWalker) get(desc v1.Descriptor, dst io.Writer) (int64, error) {\n\tname := filepath.Join(w.root, \"blobs\", string(desc.Digest.Algorithm()), desc.Digest.Hex())\n\n\tinfo, err := os.Stat(name)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tif info.IsDir() {\n\t\treturn 0, fmt.Errorf(\"object is dir\")\n\t}\n\n\tfp, err := os.Open(name) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(err, \"get failed\")\n\t}\n\tdefer fp.Close()\n\n\tnbytes, err := io.Copy(dst, fp)\n\tif err != nil {\n\t\treturn 0, errors.Wrapf(err, \"get failed: failed to copy blob to destination\")\n\t}\n\treturn nbytes, nil\n}\n\nfunc (w *pathWalker) find(path string, ff findFunc) error {\n\tname := filepath.Join(w.root, path)\n\n\tinfo, err := os.Stat(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif info.IsDir() {\n\t\treturn fmt.Errorf(\"object is dir\")\n\t}\n\n\tfile, err := os.Open(name) // nolint: errcheck, gosec\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"unable to open file\") // os.Open includes the path\n\t}\n\tdefer file.Close()\n\n\treturn ff(name, file)\n}\n\ntype zipWalker struct {\n\tfileName string\n}\n\n// newWalkWalker returns a Walker that walks through .zip files.\nfunc newZipWalker(fileName string) walker {\n\treturn &zipWalker{fileName}\n}\n\nfunc (w *zipWalker) walk(f walkFunc) error {\n\tr, err := zip.OpenReader(w.fileName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer r.Close()\n\n\tfor _, file := range r.File {\n\t\trc, err := file.Open()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer rc.Close()\n\t\tinfo := file.FileInfo()\n\t\tif err := f(file.Name, info, rc); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (w *zipWalker) get(desc v1.Descriptor, dst io.Writer) (int64, error) {\n\tvar bytes int64\n\tdone := false\n\n\texpectedPath := filepath.Join(\"blobs\", string(desc.Digest.Algorithm()), desc.Digest.Hex())\n\n\tf := func(path string, info os.FileInfo, rdr io.Reader) error {\n\t\tvar err error\n\t\tif done {\n\t\t\treturn nil\n\t\t}\n\n\t\tif path == expectedPath && !info.IsDir() {\n\t\t\tif bytes, err = io.Copy(dst, rdr); err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"get failed: failed to copy blob to destination\")\n\t\t\t}\n\t\t\tdone = true\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := w.walk(f); err != nil {\n\t\treturn 0, errors.Wrapf(err, \"get failed: unable to walk\")\n\t}\n\tif !done {\n\t\treturn 0, os.ErrNotExist\n\t}\n\n\treturn bytes, nil\n}\n\nfunc (w *zipWalker) find(path string, ff findFunc) error {\n\tdone := false\n\n\tf := func(relpath string, info os.FileInfo, rdr io.Reader) error {\n\t\tvar err error\n\t\tif done {\n\t\t\treturn nil\n\t\t}\n\n\t\tif filepath.Clean(relpath) == path && !info.IsDir() {\n\t\t\tif err = ff(relpath, rdr); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdone = true\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := w.walk(f); err != nil {\n\t\treturn errors.Wrapf(err, \"find failed: unable to walk\")\n\t}\n\tif !done {\n\t\treturn os.ErrNotExist\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/runtime-spec/LICENSE",
    "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   Copyright 2015 The Linux Foundation.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/github.com/opencontainers/runtime-spec/specs-go/config.go",
    "content": "package specs\n\nimport \"os\"\n\n// Spec is the base configuration for the container.\ntype Spec struct {\n\t// Version of the Open Container Initiative Runtime Specification with which the bundle complies.\n\tVersion string `json:\"ociVersion\"`\n\t// Process configures the container process.\n\tProcess *Process `json:\"process,omitempty\"`\n\t// Root configures the container's root filesystem.\n\tRoot *Root `json:\"root,omitempty\"`\n\t// Hostname configures the container's hostname.\n\tHostname string `json:\"hostname,omitempty\"`\n\t// Domainname configures the container's domainname.\n\tDomainname string `json:\"domainname,omitempty\"`\n\t// Mounts configures additional mounts (on top of Root).\n\tMounts []Mount `json:\"mounts,omitempty\"`\n\t// Hooks configures callbacks for container lifecycle events.\n\tHooks *Hooks `json:\"hooks,omitempty\" platform:\"linux,solaris,zos\"`\n\t// Annotations contains arbitrary metadata for the container.\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n\n\t// Linux is platform-specific configuration for Linux based containers.\n\tLinux *Linux `json:\"linux,omitempty\" platform:\"linux\"`\n\t// Solaris is platform-specific configuration for Solaris based containers.\n\tSolaris *Solaris `json:\"solaris,omitempty\" platform:\"solaris\"`\n\t// Windows is platform-specific configuration for Windows based containers.\n\tWindows *Windows `json:\"windows,omitempty\" platform:\"windows\"`\n\t// VM specifies configuration for virtual-machine-based containers.\n\tVM *VM `json:\"vm,omitempty\" platform:\"vm\"`\n\t// ZOS is platform-specific configuration for z/OS based containers.\n\tZOS *ZOS `json:\"zos,omitempty\" platform:\"zos\"`\n\t// FreeBSD is platform-specific configuration for FreeBSD based containers.\n\tFreeBSD *FreeBSD `json:\"freebsd,omitempty\" platform:\"freebsd\"`\n}\n\n// Scheduler represents the scheduling attributes for a process. It is based on\n// the Linux sched_setattr(2) syscall.\ntype Scheduler struct {\n\t// Policy represents the scheduling policy (e.g., SCHED_FIFO, SCHED_RR, SCHED_OTHER).\n\tPolicy LinuxSchedulerPolicy `json:\"policy\"`\n\n\t// Nice is the nice value for the process, which affects its priority.\n\tNice int32 `json:\"nice,omitempty\"`\n\n\t// Priority represents the static priority of the process.\n\tPriority int32 `json:\"priority,omitempty\"`\n\n\t// Flags is an array of scheduling flags.\n\tFlags []LinuxSchedulerFlag `json:\"flags,omitempty\"`\n\n\t// The following ones are used by the DEADLINE scheduler.\n\n\t// Runtime is the amount of time in nanoseconds during which the process\n\t// is allowed to run in a given period.\n\tRuntime uint64 `json:\"runtime,omitempty\"`\n\n\t// Deadline is the absolute deadline for the process to complete its execution.\n\tDeadline uint64 `json:\"deadline,omitempty\"`\n\n\t// Period is the length of the period in nanoseconds used for determining the process runtime.\n\tPeriod uint64 `json:\"period,omitempty\"`\n}\n\n// Process contains information to start a specific application inside the container.\ntype Process struct {\n\t// Terminal creates an interactive terminal for the container.\n\tTerminal bool `json:\"terminal,omitempty\"`\n\t// ConsoleSize specifies the size of the console.\n\tConsoleSize *Box `json:\"consoleSize,omitempty\"`\n\t// User specifies user information for the process.\n\tUser User `json:\"user\"`\n\t// Args specifies the binary and arguments for the application to execute.\n\tArgs []string `json:\"args,omitempty\"`\n\t// CommandLine specifies the full command line for the application to execute on Windows.\n\tCommandLine string `json:\"commandLine,omitempty\" platform:\"windows\"`\n\t// Env populates the process environment for the process.\n\tEnv []string `json:\"env,omitempty\"`\n\t// Cwd is the current working directory for the process and must be\n\t// relative to the container's root.\n\tCwd string `json:\"cwd\"`\n\t// Capabilities are Linux capabilities that are kept for the process.\n\tCapabilities *LinuxCapabilities `json:\"capabilities,omitempty\" platform:\"linux\"`\n\t// Rlimits specifies rlimit options to apply to the process.\n\tRlimits []POSIXRlimit `json:\"rlimits,omitempty\" platform:\"linux,solaris,zos\"`\n\t// NoNewPrivileges controls whether additional privileges could be gained by processes in the container.\n\tNoNewPrivileges bool `json:\"noNewPrivileges,omitempty\" platform:\"linux,zos\"`\n\t// ApparmorProfile specifies the apparmor profile for the container.\n\tApparmorProfile string `json:\"apparmorProfile,omitempty\" platform:\"linux\"`\n\t// Specify an oom_score_adj for the container.\n\tOOMScoreAdj *int `json:\"oomScoreAdj,omitempty\" platform:\"linux\"`\n\t// Scheduler specifies the scheduling attributes for a process\n\tScheduler *Scheduler `json:\"scheduler,omitempty\" platform:\"linux\"`\n\t// SelinuxLabel specifies the selinux context that the container process is run as.\n\tSelinuxLabel string `json:\"selinuxLabel,omitempty\" platform:\"linux\"`\n\t// IOPriority contains the I/O priority settings for the cgroup.\n\tIOPriority *LinuxIOPriority `json:\"ioPriority,omitempty\" platform:\"linux\"`\n\t// ExecCPUAffinity specifies CPU affinity for exec processes.\n\tExecCPUAffinity *CPUAffinity `json:\"execCPUAffinity,omitempty\" platform:\"linux\"`\n}\n\n// LinuxCapabilities specifies the list of allowed capabilities that are kept for a process.\n// https://man7.org/linux/man-pages/man7/capabilities.7.html\ntype LinuxCapabilities struct {\n\t// Bounding is the set of capabilities checked by the kernel.\n\tBounding []string `json:\"bounding,omitempty\" platform:\"linux\"`\n\t// Effective is the set of capabilities checked by the kernel.\n\tEffective []string `json:\"effective,omitempty\" platform:\"linux\"`\n\t// Inheritable is the capabilities preserved across execve.\n\tInheritable []string `json:\"inheritable,omitempty\" platform:\"linux\"`\n\t// Permitted is the limiting superset for effective capabilities.\n\tPermitted []string `json:\"permitted,omitempty\" platform:\"linux\"`\n\t// Ambient is the ambient set of capabilities that are kept.\n\tAmbient []string `json:\"ambient,omitempty\" platform:\"linux\"`\n}\n\n// IOPriority represents I/O priority settings for the container's processes within the process group.\ntype LinuxIOPriority struct {\n\tClass    IOPriorityClass `json:\"class\"`\n\tPriority int             `json:\"priority\"`\n}\n\n// IOPriorityClass represents an I/O scheduling class.\ntype IOPriorityClass string\n\n// Possible values for IOPriorityClass.\nconst (\n\tIOPRIO_CLASS_RT   IOPriorityClass = \"IOPRIO_CLASS_RT\"\n\tIOPRIO_CLASS_BE   IOPriorityClass = \"IOPRIO_CLASS_BE\"\n\tIOPRIO_CLASS_IDLE IOPriorityClass = \"IOPRIO_CLASS_IDLE\"\n)\n\n// CPUAffinity specifies process' CPU affinity.\ntype CPUAffinity struct {\n\tInitial string `json:\"initial,omitempty\"`\n\tFinal   string `json:\"final,omitempty\"`\n}\n\n// Box specifies dimensions of a rectangle. Used for specifying the size of a console.\ntype Box struct {\n\t// Height is the vertical dimension of a box.\n\tHeight uint `json:\"height\"`\n\t// Width is the horizontal dimension of a box.\n\tWidth uint `json:\"width\"`\n}\n\n// User specifies specific user (and group) information for the container process.\ntype User struct {\n\t// UID is the user id.\n\tUID uint32 `json:\"uid\" platform:\"linux,solaris,zos\"`\n\t// GID is the group id.\n\tGID uint32 `json:\"gid\" platform:\"linux,solaris,zos\"`\n\t// Umask is the umask for the init process.\n\tUmask *uint32 `json:\"umask,omitempty\" platform:\"linux,solaris,zos\"`\n\t// AdditionalGids are additional group ids set for the container's process.\n\tAdditionalGids []uint32 `json:\"additionalGids,omitempty\" platform:\"linux,solaris\"`\n\t// Username is the user name.\n\tUsername string `json:\"username,omitempty\" platform:\"windows\"`\n}\n\n// Root contains information about the container's root filesystem on the host.\ntype Root struct {\n\t// Path is the absolute path to the container's root filesystem.\n\tPath string `json:\"path\"`\n\t// Readonly makes the root filesystem for the container readonly before the process is executed.\n\tReadonly bool `json:\"readonly,omitempty\"`\n}\n\n// Mount specifies a mount for a container.\ntype Mount struct {\n\t// Destination is the absolute path where the mount will be placed in the container.\n\tDestination string `json:\"destination\"`\n\t// Type specifies the mount kind.\n\tType string `json:\"type,omitempty\" platform:\"linux,solaris,zos,freebsd\"`\n\t// Source specifies the source path of the mount.\n\tSource string `json:\"source,omitempty\"`\n\t// Options are fstab style mount options.\n\tOptions []string `json:\"options,omitempty\"`\n\n\t// UID/GID mappings used for changing file owners w/o calling chown, fs should support it.\n\t// Every mount point could have its own mapping.\n\tUIDMappings []LinuxIDMapping `json:\"uidMappings,omitempty\" platform:\"linux\"`\n\tGIDMappings []LinuxIDMapping `json:\"gidMappings,omitempty\" platform:\"linux\"`\n}\n\n// Hook specifies a command that is run at a particular event in the lifecycle of a container\ntype Hook struct {\n\tPath    string   `json:\"path\"`\n\tArgs    []string `json:\"args,omitempty\"`\n\tEnv     []string `json:\"env,omitempty\"`\n\tTimeout *int     `json:\"timeout,omitempty\"`\n}\n\n// Hooks specifies a command that is run in the container at a particular event in the lifecycle of a container\n// Hooks for container setup and teardown\ntype Hooks struct {\n\t// Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed.\n\t// It is called in the Runtime Namespace\n\t//\n\t// Deprecated: use [Hooks.CreateRuntime], [Hooks.CreateContainer], and\n\t// [Hooks.StartContainer] instead, which allow more granular hook control\n\t// during the create and start phase.\n\tPrestart []Hook `json:\"prestart,omitempty\"`\n\t// CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called\n\t// It is called in the Runtime Namespace\n\tCreateRuntime []Hook `json:\"createRuntime,omitempty\"`\n\t// CreateContainer is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called\n\t// It is called in the Container Namespace\n\tCreateContainer []Hook `json:\"createContainer,omitempty\"`\n\t// StartContainer is a list of hooks to be run after the start operation is called but before the container process is started\n\t// It is called in the Container Namespace\n\tStartContainer []Hook `json:\"startContainer,omitempty\"`\n\t// Poststart is a list of hooks to be run after the container process is started.\n\t// It is called in the Runtime Namespace\n\tPoststart []Hook `json:\"poststart,omitempty\"`\n\t// Poststop is a list of hooks to be run after the container process exits.\n\t// It is called in the Runtime Namespace\n\tPoststop []Hook `json:\"poststop,omitempty\"`\n}\n\n// Linux contains platform-specific configuration for Linux based containers.\ntype Linux struct {\n\t// UIDMapping specifies user mappings for supporting user namespaces.\n\tUIDMappings []LinuxIDMapping `json:\"uidMappings,omitempty\"`\n\t// GIDMapping specifies group mappings for supporting user namespaces.\n\tGIDMappings []LinuxIDMapping `json:\"gidMappings,omitempty\"`\n\t// Sysctl are a set of key value pairs that are set for the container on start\n\tSysctl map[string]string `json:\"sysctl,omitempty\"`\n\t// Resources contain cgroup information for handling resource constraints\n\t// for the container\n\tResources *LinuxResources `json:\"resources,omitempty\"`\n\t// CgroupsPath specifies the path to cgroups that are created and/or joined by the container.\n\t// The path is expected to be relative to the cgroups mountpoint.\n\t// If resources are specified, the cgroups at CgroupsPath will be updated based on resources.\n\tCgroupsPath string `json:\"cgroupsPath,omitempty\"`\n\t// Namespaces contains the namespaces that are created and/or joined by the container\n\tNamespaces []LinuxNamespace `json:\"namespaces,omitempty\"`\n\t// Devices are a list of device nodes that are created for the container\n\tDevices []LinuxDevice `json:\"devices,omitempty\"`\n\t// NetDevices are key-value pairs, keyed by network device name on the host, moved to the container's network namespace.\n\tNetDevices map[string]LinuxNetDevice `json:\"netDevices,omitempty\"`\n\t// Seccomp specifies the seccomp security settings for the container.\n\tSeccomp *LinuxSeccomp `json:\"seccomp,omitempty\"`\n\t// RootfsPropagation is the rootfs mount propagation mode for the container.\n\tRootfsPropagation string `json:\"rootfsPropagation,omitempty\"`\n\t// MaskedPaths masks over the provided paths inside the container.\n\tMaskedPaths []string `json:\"maskedPaths,omitempty\"`\n\t// ReadonlyPaths sets the provided paths as RO inside the container.\n\tReadonlyPaths []string `json:\"readonlyPaths,omitempty\"`\n\t// MountLabel specifies the selinux context for the mounts in the container.\n\tMountLabel string `json:\"mountLabel,omitempty\"`\n\t// IntelRdt contains Intel Resource Director Technology (RDT) information for\n\t// handling resource constraints and monitoring metrics (e.g., L3 cache, memory bandwidth) for the container\n\tIntelRdt *LinuxIntelRdt `json:\"intelRdt,omitempty\"`\n\t// MemoryPolicy contains NUMA memory policy for the container.\n\tMemoryPolicy *LinuxMemoryPolicy `json:\"memoryPolicy,omitempty\"`\n\t// Personality contains configuration for the Linux personality syscall\n\tPersonality *LinuxPersonality `json:\"personality,omitempty\"`\n\t// TimeOffsets specifies the offset for supporting time namespaces.\n\tTimeOffsets map[string]LinuxTimeOffset `json:\"timeOffsets,omitempty\"`\n}\n\n// LinuxNamespace is the configuration for a Linux namespace\ntype LinuxNamespace struct {\n\t// Type is the type of namespace\n\tType LinuxNamespaceType `json:\"type\"`\n\t// Path is a path to an existing namespace persisted on disk that can be joined\n\t// and is of the same type\n\tPath string `json:\"path,omitempty\"`\n}\n\n// LinuxNamespaceType is one of the Linux namespaces\ntype LinuxNamespaceType string\n\nconst (\n\t// PIDNamespace for isolating process IDs\n\tPIDNamespace LinuxNamespaceType = \"pid\"\n\t// NetworkNamespace for isolating network devices, stacks, ports, etc\n\tNetworkNamespace LinuxNamespaceType = \"network\"\n\t// MountNamespace for isolating mount points\n\tMountNamespace LinuxNamespaceType = \"mount\"\n\t// IPCNamespace for isolating System V IPC, POSIX message queues\n\tIPCNamespace LinuxNamespaceType = \"ipc\"\n\t// UTSNamespace for isolating hostname and NIS domain name\n\tUTSNamespace LinuxNamespaceType = \"uts\"\n\t// UserNamespace for isolating user and group IDs\n\tUserNamespace LinuxNamespaceType = \"user\"\n\t// CgroupNamespace for isolating cgroup hierarchies\n\tCgroupNamespace LinuxNamespaceType = \"cgroup\"\n\t// TimeNamespace for isolating the clocks\n\tTimeNamespace LinuxNamespaceType = \"time\"\n)\n\n// LinuxIDMapping specifies UID/GID mappings\ntype LinuxIDMapping struct {\n\t// ContainerID is the starting UID/GID in the container\n\tContainerID uint32 `json:\"containerID\"`\n\t// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'\n\tHostID uint32 `json:\"hostID\"`\n\t// Size is the number of IDs to be mapped\n\tSize uint32 `json:\"size\"`\n}\n\n// LinuxTimeOffset specifies the offset for Time Namespace\ntype LinuxTimeOffset struct {\n\t// Secs is the offset of clock (in secs) in the container\n\tSecs int64 `json:\"secs,omitempty\"`\n\t// Nanosecs is the additional offset for Secs (in nanosecs)\n\tNanosecs uint32 `json:\"nanosecs,omitempty\"`\n}\n\n// POSIXRlimit type and restrictions\ntype POSIXRlimit struct {\n\t// Type of the rlimit to set\n\tType string `json:\"type\"`\n\t// Hard is the hard limit for the specified type\n\tHard uint64 `json:\"hard\"`\n\t// Soft is the soft limit for the specified type\n\tSoft uint64 `json:\"soft\"`\n}\n\n// LinuxHugepageLimit structure corresponds to limiting kernel hugepages.\n// Default to reservation limits if supported. Otherwise fallback to page fault limits.\ntype LinuxHugepageLimit struct {\n\t// Pagesize is the hugepage size.\n\t// Format: \"<size><unit-prefix>B' (e.g. 64KB, 2MB, 1GB, etc.).\n\tPagesize string `json:\"pageSize\"`\n\t// Limit is the limit of \"hugepagesize\" hugetlb reservations (if supported) or usage.\n\tLimit uint64 `json:\"limit\"`\n}\n\n// LinuxInterfacePriority for network interfaces\ntype LinuxInterfacePriority struct {\n\t// Name is the name of the network interface\n\tName string `json:\"name\"`\n\t// Priority for the interface\n\tPriority uint32 `json:\"priority\"`\n}\n\n// LinuxBlockIODevice holds major:minor format supported in blkio cgroup\ntype LinuxBlockIODevice struct {\n\t// Major is the device's major number.\n\tMajor int64 `json:\"major\"`\n\t// Minor is the device's minor number.\n\tMinor int64 `json:\"minor\"`\n}\n\n// LinuxWeightDevice struct holds a `major:minor weight` pair for weightDevice\ntype LinuxWeightDevice struct {\n\tLinuxBlockIODevice\n\t// Weight is the bandwidth rate for the device.\n\tWeight *uint16 `json:\"weight,omitempty\"`\n\t// LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only\n\tLeafWeight *uint16 `json:\"leafWeight,omitempty\"`\n}\n\n// LinuxThrottleDevice struct holds a `major:minor rate_per_second` pair\ntype LinuxThrottleDevice struct {\n\tLinuxBlockIODevice\n\t// Rate is the IO rate limit per cgroup per device\n\tRate uint64 `json:\"rate\"`\n}\n\n// LinuxBlockIO for Linux cgroup 'blkio' resource management\ntype LinuxBlockIO struct {\n\t// Specifies per cgroup weight\n\tWeight *uint16 `json:\"weight,omitempty\"`\n\t// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only\n\tLeafWeight *uint16 `json:\"leafWeight,omitempty\"`\n\t// Weight per cgroup per device, can override BlkioWeight\n\tWeightDevice []LinuxWeightDevice `json:\"weightDevice,omitempty\"`\n\t// IO read rate limit per cgroup per device, bytes per second\n\tThrottleReadBpsDevice []LinuxThrottleDevice `json:\"throttleReadBpsDevice,omitempty\"`\n\t// IO write rate limit per cgroup per device, bytes per second\n\tThrottleWriteBpsDevice []LinuxThrottleDevice `json:\"throttleWriteBpsDevice,omitempty\"`\n\t// IO read rate limit per cgroup per device, IO per second\n\tThrottleReadIOPSDevice []LinuxThrottleDevice `json:\"throttleReadIOPSDevice,omitempty\"`\n\t// IO write rate limit per cgroup per device, IO per second\n\tThrottleWriteIOPSDevice []LinuxThrottleDevice `json:\"throttleWriteIOPSDevice,omitempty\"`\n}\n\n// LinuxMemory for Linux cgroup 'memory' resource management\ntype LinuxMemory struct {\n\t// Memory limit (in bytes).\n\tLimit *int64 `json:\"limit,omitempty\"`\n\t// Memory reservation or soft_limit (in bytes).\n\tReservation *int64 `json:\"reservation,omitempty\"`\n\t// Total memory limit (memory + swap).\n\tSwap *int64 `json:\"swap,omitempty\"`\n\t// Kernel memory limit (in bytes).\n\t//\n\t// Deprecated: kernel-memory limits are not supported in cgroups v2, and\n\t// were obsoleted in [kernel v5.4]. This field should no longer be used,\n\t// as it may be ignored by runtimes.\n\t//\n\t// [kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0\n\tKernel *int64 `json:\"kernel,omitempty\"`\n\t// Kernel memory limit for tcp (in bytes)\n\tKernelTCP *int64 `json:\"kernelTCP,omitempty\"`\n\t// How aggressive the kernel will swap memory pages.\n\tSwappiness *uint64 `json:\"swappiness,omitempty\"`\n\t// DisableOOMKiller disables the OOM killer for out of memory conditions\n\tDisableOOMKiller *bool `json:\"disableOOMKiller,omitempty\"`\n\t// Enables hierarchical memory accounting\n\tUseHierarchy *bool `json:\"useHierarchy,omitempty\"`\n\t// CheckBeforeUpdate enables checking if a new memory limit is lower\n\t// than the current usage during update, and if so, rejecting the new\n\t// limit.\n\tCheckBeforeUpdate *bool `json:\"checkBeforeUpdate,omitempty\"`\n}\n\n// LinuxCPU for Linux cgroup 'cpu' resource management\ntype LinuxCPU struct {\n\t// CPU shares (relative weight (ratio) vs. other cgroups with cpu shares).\n\tShares *uint64 `json:\"shares,omitempty\"`\n\t// CPU hardcap limit (in usecs). Allowed cpu time in a given period.\n\tQuota *int64 `json:\"quota,omitempty\"`\n\t// CPU hardcap burst limit (in usecs). Allowed accumulated cpu time additionally for burst in a\n\t// given period.\n\tBurst *uint64 `json:\"burst,omitempty\"`\n\t// CPU period to be used for hardcapping (in usecs).\n\tPeriod *uint64 `json:\"period,omitempty\"`\n\t// How much time realtime scheduling may use (in usecs).\n\tRealtimeRuntime *int64 `json:\"realtimeRuntime,omitempty\"`\n\t// CPU period to be used for realtime scheduling (in usecs).\n\tRealtimePeriod *uint64 `json:\"realtimePeriod,omitempty\"`\n\t// CPUs to use within the cpuset. Default is to use any CPU available.\n\tCpus string `json:\"cpus,omitempty\"`\n\t// List of memory nodes in the cpuset. Default is to use any available memory node.\n\tMems string `json:\"mems,omitempty\"`\n\t// cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.\n\tIdle *int64 `json:\"idle,omitempty\"`\n}\n\n// LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3)\ntype LinuxPids struct {\n\t// Maximum number of PIDs. Default is \"no limit\".\n\tLimit *int64 `json:\"limit,omitempty\"`\n}\n\n// LinuxNetwork identification and priority configuration\ntype LinuxNetwork struct {\n\t// Set class identifier for container's network packets\n\tClassID *uint32 `json:\"classID,omitempty\"`\n\t// Set priority of network traffic for container\n\tPriorities []LinuxInterfacePriority `json:\"priorities,omitempty\"`\n}\n\n// LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11)\ntype LinuxRdma struct {\n\t// Maximum number of HCA handles that can be opened. Default is \"no limit\".\n\tHcaHandles *uint32 `json:\"hcaHandles,omitempty\"`\n\t// Maximum number of HCA objects that can be created. Default is \"no limit\".\n\tHcaObjects *uint32 `json:\"hcaObjects,omitempty\"`\n}\n\n// LinuxResources has container runtime resource constraints\ntype LinuxResources struct {\n\t// Devices configures the device allowlist.\n\tDevices []LinuxDeviceCgroup `json:\"devices,omitempty\"`\n\t// Memory restriction configuration\n\tMemory *LinuxMemory `json:\"memory,omitempty\"`\n\t// CPU resource restriction configuration\n\tCPU *LinuxCPU `json:\"cpu,omitempty\"`\n\t// Task resource restriction configuration.\n\tPids *LinuxPids `json:\"pids,omitempty\"`\n\t// BlockIO restriction configuration\n\tBlockIO *LinuxBlockIO `json:\"blockIO,omitempty\"`\n\t// Hugetlb limits (in bytes). Default to reservation limits if supported.\n\tHugepageLimits []LinuxHugepageLimit `json:\"hugepageLimits,omitempty\"`\n\t// Network restriction configuration\n\tNetwork *LinuxNetwork `json:\"network,omitempty\"`\n\t// Rdma resource restriction configuration.\n\t// Limits are a set of key value pairs that define RDMA resource limits,\n\t// where the key is device name and value is resource limits.\n\tRdma map[string]LinuxRdma `json:\"rdma,omitempty\"`\n\t// Unified resources.\n\tUnified map[string]string `json:\"unified,omitempty\"`\n}\n\n// LinuxDevice represents the mknod information for a Linux special device file\ntype LinuxDevice struct {\n\t// Path to the device.\n\tPath string `json:\"path\"`\n\t// Device type, block, char, etc.\n\tType string `json:\"type\"`\n\t// Major is the device's major number.\n\tMajor int64 `json:\"major\"`\n\t// Minor is the device's minor number.\n\tMinor int64 `json:\"minor\"`\n\t// FileMode permission bits for the device.\n\tFileMode *os.FileMode `json:\"fileMode,omitempty\"`\n\t// UID of the device.\n\tUID *uint32 `json:\"uid,omitempty\"`\n\t// Gid of the device.\n\tGID *uint32 `json:\"gid,omitempty\"`\n}\n\n// LinuxNetDevice represents a single network device to be added to the container's network namespace\ntype LinuxNetDevice struct {\n\t// Name of the device in the container namespace\n\tName string `json:\"name,omitempty\"`\n}\n\n// LinuxDeviceCgroup represents a device rule for the devices specified to\n// the device controller\ntype LinuxDeviceCgroup struct {\n\t// Allow or deny\n\tAllow bool `json:\"allow\"`\n\t// Device type, block, char, etc.\n\tType string `json:\"type,omitempty\"`\n\t// Major is the device's major number.\n\tMajor *int64 `json:\"major,omitempty\"`\n\t// Minor is the device's minor number.\n\tMinor *int64 `json:\"minor,omitempty\"`\n\t// Cgroup access permissions format, rwm.\n\tAccess string `json:\"access,omitempty\"`\n}\n\n// LinuxPersonalityDomain refers to a personality domain.\ntype LinuxPersonalityDomain string\n\n// LinuxPersonalityFlag refers to an additional personality flag. None are currently defined.\ntype LinuxPersonalityFlag string\n\n// Define domain and flags for Personality\nconst (\n\t// PerLinux is the standard Linux personality\n\tPerLinux LinuxPersonalityDomain = \"LINUX\"\n\t// PerLinux32 sets personality to 32 bit\n\tPerLinux32 LinuxPersonalityDomain = \"LINUX32\"\n)\n\n// LinuxPersonality represents the Linux personality syscall input\ntype LinuxPersonality struct {\n\t// Domain for the personality\n\tDomain LinuxPersonalityDomain `json:\"domain\"`\n\t// Additional flags\n\tFlags []LinuxPersonalityFlag `json:\"flags,omitempty\"`\n}\n\n// Solaris contains platform-specific configuration for Solaris application containers.\ntype Solaris struct {\n\t// SMF FMRI which should go \"online\" before we start the container process.\n\tMilestone string `json:\"milestone,omitempty\"`\n\t// Maximum set of privileges any process in this container can obtain.\n\tLimitPriv string `json:\"limitpriv,omitempty\"`\n\t// The maximum amount of shared memory allowed for this container.\n\tMaxShmMemory string `json:\"maxShmMemory,omitempty\"`\n\t// Specification for automatic creation of network resources for this container.\n\tAnet []SolarisAnet `json:\"anet,omitempty\"`\n\t// Set limit on the amount of CPU time that can be used by container.\n\tCappedCPU *SolarisCappedCPU `json:\"cappedCPU,omitempty\"`\n\t// The physical and swap caps on the memory that can be used by this container.\n\tCappedMemory *SolarisCappedMemory `json:\"cappedMemory,omitempty\"`\n}\n\n// SolarisCappedCPU allows users to set limit on the amount of CPU time that can be used by container.\ntype SolarisCappedCPU struct {\n\tNcpus string `json:\"ncpus,omitempty\"`\n}\n\n// SolarisCappedMemory allows users to set the physical and swap caps on the memory that can be used by this container.\ntype SolarisCappedMemory struct {\n\tPhysical string `json:\"physical,omitempty\"`\n\tSwap     string `json:\"swap,omitempty\"`\n}\n\n// SolarisAnet provides the specification for automatic creation of network resources for this container.\ntype SolarisAnet struct {\n\t// Specify a name for the automatically created VNIC datalink.\n\tLinkname string `json:\"linkname,omitempty\"`\n\t// Specify the link over which the VNIC will be created.\n\tLowerlink string `json:\"lowerLink,omitempty\"`\n\t// The set of IP addresses that the container can use.\n\tAllowedaddr string `json:\"allowedAddress,omitempty\"`\n\t// Specifies whether allowedAddress limitation is to be applied to the VNIC.\n\tConfigallowedaddr string `json:\"configureAllowedAddress,omitempty\"`\n\t// The value of the optional default router.\n\tDefrouter string `json:\"defrouter,omitempty\"`\n\t// Enable one or more types of link protection.\n\tLinkprotection string `json:\"linkProtection,omitempty\"`\n\t// Set the VNIC's macAddress\n\tMacaddress string `json:\"macAddress,omitempty\"`\n}\n\n// Windows defines the runtime configuration for Windows based containers, including Hyper-V containers.\ntype Windows struct {\n\t// LayerFolders contains a list of absolute paths to directories containing image layers.\n\tLayerFolders []string `json:\"layerFolders\"`\n\t// Devices are the list of devices to be mapped into the container.\n\tDevices []WindowsDevice `json:\"devices,omitempty\"`\n\t// Resources contains information for handling resource constraints for the container.\n\tResources *WindowsResources `json:\"resources,omitempty\"`\n\t// CredentialSpec contains a JSON object describing a group Managed Service Account (gMSA) specification.\n\tCredentialSpec interface{} `json:\"credentialSpec,omitempty\"`\n\t// Servicing indicates if the container is being started in a mode to apply a Windows Update servicing operation.\n\tServicing bool `json:\"servicing,omitempty\"`\n\t// IgnoreFlushesDuringBoot indicates if the container is being started in a mode where disk writes are not flushed during its boot process.\n\tIgnoreFlushesDuringBoot bool `json:\"ignoreFlushesDuringBoot,omitempty\"`\n\t// HyperV contains information for running a container with Hyper-V isolation.\n\tHyperV *WindowsHyperV `json:\"hyperv,omitempty\"`\n\t// Network restriction configuration.\n\tNetwork *WindowsNetwork `json:\"network,omitempty\"`\n}\n\n// WindowsDevice represents information about a host device to be mapped into the container.\ntype WindowsDevice struct {\n\t// Device identifier: interface class GUID, etc.\n\tID string `json:\"id\"`\n\t// Device identifier type: \"class\", etc.\n\tIDType string `json:\"idType\"`\n}\n\n// WindowsResources has container runtime resource constraints for containers running on Windows.\ntype WindowsResources struct {\n\t// Memory restriction configuration.\n\tMemory *WindowsMemoryResources `json:\"memory,omitempty\"`\n\t// CPU resource restriction configuration.\n\tCPU *WindowsCPUResources `json:\"cpu,omitempty\"`\n\t// Storage restriction configuration.\n\tStorage *WindowsStorageResources `json:\"storage,omitempty\"`\n}\n\n// WindowsMemoryResources contains memory resource management settings.\ntype WindowsMemoryResources struct {\n\t// Memory limit in bytes.\n\tLimit *uint64 `json:\"limit,omitempty\"`\n}\n\n// WindowsCPUResources contains CPU resource management settings.\ntype WindowsCPUResources struct {\n\t// Count is the number of CPUs available to the container. It represents the\n\t// fraction of the configured processor `count` in a container in relation\n\t// to the processors available in the host. The fraction ultimately\n\t// determines the portion of processor cycles that the threads in a\n\t// container can use during each scheduling interval, as the number of\n\t// cycles per 10,000 cycles.\n\tCount *uint64 `json:\"count,omitempty\"`\n\t// Shares limits the share of processor time given to the container relative\n\t// to other workloads on the processor. The processor `shares` (`weight` at\n\t// the platform level) is a value between 0 and 10000.\n\tShares *uint16 `json:\"shares,omitempty\"`\n\t// Maximum determines the portion of processor cycles that the threads in a\n\t// container can use during each scheduling interval, as the number of\n\t// cycles per 10,000 cycles. Set processor `maximum` to a percentage times\n\t// 100.\n\tMaximum *uint16 `json:\"maximum,omitempty\"`\n\t// Set of CPUs to affinitize for this container.\n\tAffinity []WindowsCPUGroupAffinity `json:\"affinity,omitempty\"`\n}\n\n// Similar to _GROUP_AFFINITY struct defined in\n// https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/miniport/ns-miniport-_group_affinity\ntype WindowsCPUGroupAffinity struct {\n\t// CPU mask relative to this CPU group.\n\tMask uint64 `json:\"mask,omitempty\"`\n\t// Processor group the mask refers to, as returned by GetLogicalProcessorInformationEx.\n\tGroup uint32 `json:\"group,omitempty\"`\n}\n\n// WindowsStorageResources contains storage resource management settings.\ntype WindowsStorageResources struct {\n\t// Specifies maximum Iops for the system drive.\n\tIops *uint64 `json:\"iops,omitempty\"`\n\t// Specifies maximum bytes per second for the system drive.\n\tBps *uint64 `json:\"bps,omitempty\"`\n\t// Sandbox size specifies the minimum size of the system drive in bytes.\n\tSandboxSize *uint64 `json:\"sandboxSize,omitempty\"`\n}\n\n// WindowsNetwork contains network settings for Windows containers.\ntype WindowsNetwork struct {\n\t// List of HNS endpoints that the container should connect to.\n\tEndpointList []string `json:\"endpointList,omitempty\"`\n\t// Specifies if unqualified DNS name resolution is allowed.\n\tAllowUnqualifiedDNSQuery bool `json:\"allowUnqualifiedDNSQuery,omitempty\"`\n\t// Comma separated list of DNS suffixes to use for name resolution.\n\tDNSSearchList []string `json:\"DNSSearchList,omitempty\"`\n\t// Name (ID) of the container that we will share with the network stack.\n\tNetworkSharedContainerName string `json:\"networkSharedContainerName,omitempty\"`\n\t// name (ID) of the network namespace that will be used for the container.\n\tNetworkNamespace string `json:\"networkNamespace,omitempty\"`\n}\n\n// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.\ntype WindowsHyperV struct {\n\t// UtilityVMPath is an optional path to the image used for the Utility VM.\n\tUtilityVMPath string `json:\"utilityVMPath,omitempty\"`\n}\n\n// IOMems contains information about iomem addresses that should be passed to the VM.\ntype IOMems struct {\n\t// Guest Frame Number to map the iomem range. If GFN is not specified, the mapping will be done to the same Frame Number as was provided in FirstMFN.\n\tFirstGFN *uint64 `json:\"firstGFN,omitempty\"`\n\t// Physical page number of iomem regions.\n\tFirstMFN *uint64 `json:\"firstMFN\"`\n\t// Number of pages to be mapped.\n\tNrMFNs *uint64 `json:\"nrMFNs\"`\n}\n\n// Hardware configuration for the VM image\ntype HWConfig struct {\n\t// Path to the container device-tree file that should be passed to the VM configuration.\n\tDeviceTree string `json:\"deviceTree,omitempty\"`\n\t// Number of virtual cpus for the VM.\n\tVCPUs *uint32 `json:\"vcpus,omitempty\"`\n\t// Maximum memory in bytes allocated to the VM.\n\tMemory *uint64 `json:\"memory,omitempty\"`\n\t// Host device tree nodes to passthrough to the VM.\n\tDtDevs []string `json:\"dtdevs,omitempty\"`\n\t// Allow auto-translated domains to access specific hardware I/O memory pages.\n\tIOMems []IOMems `json:\"iomems,omitempty\"`\n\t// Allows VM to access specific physical IRQs.\n\tIrqs []uint32 `json:\"irqs,omitempty\"`\n}\n\n// VM contains information for virtual-machine-based containers.\ntype VM struct {\n\t// Hypervisor specifies hypervisor-related configuration for virtual-machine-based containers.\n\tHypervisor VMHypervisor `json:\"hypervisor,omitempty\"`\n\t// Kernel specifies kernel-related configuration for virtual-machine-based containers.\n\tKernel VMKernel `json:\"kernel\"`\n\t// Image specifies guest image related configuration for virtual-machine-based containers.\n\tImage VMImage `json:\"image,omitempty\"`\n\t// Hardware configuration that should be passed to the VM.\n\tHwConfig *HWConfig `json:\"hwconfig,omitempty\"`\n}\n\n// VMHypervisor contains information about the hypervisor to use for a virtual machine.\ntype VMHypervisor struct {\n\t// Path is the host path to the hypervisor used to manage the virtual machine.\n\tPath string `json:\"path\"`\n\t// Parameters specifies parameters to pass to the hypervisor.\n\tParameters []string `json:\"parameters,omitempty\"`\n}\n\n// VMKernel contains information about the kernel to use for a virtual machine.\ntype VMKernel struct {\n\t// Path is the host path to the kernel used to boot the virtual machine.\n\tPath string `json:\"path\"`\n\t// Parameters specifies parameters to pass to the kernel.\n\tParameters []string `json:\"parameters,omitempty\"`\n\t// InitRD is the host path to an initial ramdisk to be used by the kernel.\n\tInitRD string `json:\"initrd,omitempty\"`\n}\n\n// VMImage contains information about the virtual machine root image.\ntype VMImage struct {\n\t// Path is the host path to the root image that the VM kernel would boot into.\n\tPath string `json:\"path\"`\n\t// Format is the root image format type (e.g. \"qcow2\", \"raw\", \"vhd\", etc).\n\tFormat string `json:\"format\"`\n}\n\n// LinuxSeccomp represents syscall restrictions\ntype LinuxSeccomp struct {\n\tDefaultAction    LinuxSeccompAction `json:\"defaultAction\"`\n\tDefaultErrnoRet  *uint              `json:\"defaultErrnoRet,omitempty\"`\n\tArchitectures    []Arch             `json:\"architectures,omitempty\"`\n\tFlags            []LinuxSeccompFlag `json:\"flags,omitempty\"`\n\tListenerPath     string             `json:\"listenerPath,omitempty\"`\n\tListenerMetadata string             `json:\"listenerMetadata,omitempty\"`\n\tSyscalls         []LinuxSyscall     `json:\"syscalls,omitempty\"`\n}\n\n// Arch used for additional architectures\ntype Arch string\n\n// LinuxSeccompFlag is a flag to pass to seccomp(2).\ntype LinuxSeccompFlag string\n\nconst (\n\t// LinuxSeccompFlagLog is a seccomp flag to request all returned\n\t// actions except SECCOMP_RET_ALLOW to be logged. An administrator may\n\t// override this filter flag by preventing specific actions from being\n\t// logged via the /proc/sys/kernel/seccomp/actions_logged file. (since\n\t// Linux 4.14)\n\tLinuxSeccompFlagLog LinuxSeccompFlag = \"SECCOMP_FILTER_FLAG_LOG\"\n\n\t// LinuxSeccompFlagSpecAllow can be used to disable Speculative Store\n\t// Bypass mitigation. (since Linux 4.17)\n\tLinuxSeccompFlagSpecAllow LinuxSeccompFlag = \"SECCOMP_FILTER_FLAG_SPEC_ALLOW\"\n\n\t// LinuxSeccompFlagWaitKillableRecv can be used to switch to the wait\n\t// killable semantics. (since Linux 5.19)\n\tLinuxSeccompFlagWaitKillableRecv LinuxSeccompFlag = \"SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV\"\n)\n\n// Additional architectures permitted to be used for system calls\n// By default only the native architecture of the kernel is permitted\nconst (\n\tArchX86         Arch = \"SCMP_ARCH_X86\"\n\tArchX86_64      Arch = \"SCMP_ARCH_X86_64\"\n\tArchX32         Arch = \"SCMP_ARCH_X32\"\n\tArchARM         Arch = \"SCMP_ARCH_ARM\"\n\tArchAARCH64     Arch = \"SCMP_ARCH_AARCH64\"\n\tArchMIPS        Arch = \"SCMP_ARCH_MIPS\"\n\tArchMIPS64      Arch = \"SCMP_ARCH_MIPS64\"\n\tArchMIPS64N32   Arch = \"SCMP_ARCH_MIPS64N32\"\n\tArchMIPSEL      Arch = \"SCMP_ARCH_MIPSEL\"\n\tArchMIPSEL64    Arch = \"SCMP_ARCH_MIPSEL64\"\n\tArchMIPSEL64N32 Arch = \"SCMP_ARCH_MIPSEL64N32\"\n\tArchPPC         Arch = \"SCMP_ARCH_PPC\"\n\tArchPPC64       Arch = \"SCMP_ARCH_PPC64\"\n\tArchPPC64LE     Arch = \"SCMP_ARCH_PPC64LE\"\n\tArchS390        Arch = \"SCMP_ARCH_S390\"\n\tArchS390X       Arch = \"SCMP_ARCH_S390X\"\n\tArchPARISC      Arch = \"SCMP_ARCH_PARISC\"\n\tArchPARISC64    Arch = \"SCMP_ARCH_PARISC64\"\n\tArchRISCV64     Arch = \"SCMP_ARCH_RISCV64\"\n\tArchLOONGARCH64 Arch = \"SCMP_ARCH_LOONGARCH64\"\n\tArchM68K        Arch = \"SCMP_ARCH_M68K\"\n\tArchSH          Arch = \"SCMP_ARCH_SH\"\n\tArchSHEB        Arch = \"SCMP_ARCH_SHEB\"\n)\n\n// LinuxSeccompAction taken upon Seccomp rule match\ntype LinuxSeccompAction string\n\n// Define actions for Seccomp rules\nconst (\n\tActKill        LinuxSeccompAction = \"SCMP_ACT_KILL\"\n\tActKillProcess LinuxSeccompAction = \"SCMP_ACT_KILL_PROCESS\"\n\tActKillThread  LinuxSeccompAction = \"SCMP_ACT_KILL_THREAD\"\n\tActTrap        LinuxSeccompAction = \"SCMP_ACT_TRAP\"\n\tActErrno       LinuxSeccompAction = \"SCMP_ACT_ERRNO\"\n\tActTrace       LinuxSeccompAction = \"SCMP_ACT_TRACE\"\n\tActAllow       LinuxSeccompAction = \"SCMP_ACT_ALLOW\"\n\tActLog         LinuxSeccompAction = \"SCMP_ACT_LOG\"\n\tActNotify      LinuxSeccompAction = \"SCMP_ACT_NOTIFY\"\n)\n\n// LinuxSeccompOperator used to match syscall arguments in Seccomp\ntype LinuxSeccompOperator string\n\n// Define operators for syscall arguments in Seccomp\nconst (\n\tOpNotEqual     LinuxSeccompOperator = \"SCMP_CMP_NE\"\n\tOpLessThan     LinuxSeccompOperator = \"SCMP_CMP_LT\"\n\tOpLessEqual    LinuxSeccompOperator = \"SCMP_CMP_LE\"\n\tOpEqualTo      LinuxSeccompOperator = \"SCMP_CMP_EQ\"\n\tOpGreaterEqual LinuxSeccompOperator = \"SCMP_CMP_GE\"\n\tOpGreaterThan  LinuxSeccompOperator = \"SCMP_CMP_GT\"\n\tOpMaskedEqual  LinuxSeccompOperator = \"SCMP_CMP_MASKED_EQ\"\n)\n\n// LinuxSeccompArg used for matching specific syscall arguments in Seccomp\ntype LinuxSeccompArg struct {\n\tIndex    uint                 `json:\"index\"`\n\tValue    uint64               `json:\"value\"`\n\tValueTwo uint64               `json:\"valueTwo,omitempty\"`\n\tOp       LinuxSeccompOperator `json:\"op\"`\n}\n\n// LinuxSyscall is used to match a syscall in Seccomp\ntype LinuxSyscall struct {\n\tNames    []string           `json:\"names\"`\n\tAction   LinuxSeccompAction `json:\"action\"`\n\tErrnoRet *uint              `json:\"errnoRet,omitempty\"`\n\tArgs     []LinuxSeccompArg  `json:\"args,omitempty\"`\n}\n\n// LinuxIntelRdt has container runtime resource constraints for Intel RDT CAT and MBA\n// features and flags enabling Intel RDT CMT and MBM features.\n// Intel RDT features are available in Linux 4.14 and newer kernel versions.\ntype LinuxIntelRdt struct {\n\t// The identity for RDT Class of Service\n\tClosID string `json:\"closID,omitempty\"`\n\n\t// Schemata specifies the complete schemata to be written as is to the\n\t// schemata file in resctrl fs. Each element represents a single line in the schemata file.\n\t// NOTE: This will overwrite schemas specified in the L3CacheSchema and/or\n\t// MemBwSchema fields.\n\tSchemata []string `json:\"schemata,omitempty\"`\n\n\t// The schema for L3 cache id and capacity bitmask (CBM)\n\t// Format: \"L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;...\"\n\t// NOTE: Should not be specified if Schemata is non-empty.\n\tL3CacheSchema string `json:\"l3CacheSchema,omitempty\"`\n\n\t// The schema of memory bandwidth per L3 cache id\n\t// Format: \"MB:<cache_id0>=bandwidth0;<cache_id1>=bandwidth1;...\"\n\t// The unit of memory bandwidth is specified in \"percentages\" by\n\t// default, and in \"MBps\" if MBA Software Controller is enabled.\n\t// NOTE: Should not be specified if Schemata is non-empty.\n\tMemBwSchema string `json:\"memBwSchema,omitempty\"`\n\n\t// EnableMonitoring enables resctrl monitoring for the container. This will\n\t// create a dedicated resctrl monitoring group for the container.\n\tEnableMonitoring bool `json:\"enableMonitoring,omitempty\"`\n}\n\n// LinuxMemoryPolicy represents input for the set_mempolicy syscall.\ntype LinuxMemoryPolicy struct {\n\t// Mode for the set_mempolicy syscall.\n\tMode MemoryPolicyModeType `json:\"mode\"`\n\n\t// Nodes representing the nodemask for the set_mempolicy syscall in comma separated ranges format.\n\t// Format: \"<node0>-<node1>,<node2>,<node3>-<node4>,...\"\n\tNodes string `json:\"nodes\"`\n\n\t// Flags for the set_mempolicy syscall.\n\tFlags []MemoryPolicyFlagType `json:\"flags,omitempty\"`\n}\n\n// ZOS contains platform-specific configuration for z/OS based containers.\ntype ZOS struct {\n\t// Namespaces contains the namespaces that are created and/or joined by the container\n\tNamespaces []ZOSNamespace `json:\"namespaces,omitempty\"`\n}\n\n// ZOSNamespace is the configuration for a z/OS namespace\ntype ZOSNamespace struct {\n\t// Type is the type of namespace\n\tType ZOSNamespaceType `json:\"type\"`\n\t// Path is a path to an existing namespace persisted on disk that can be joined\n\t// and is of the same type\n\tPath string `json:\"path,omitempty\"`\n}\n\n// ZOSNamespaceType is one of the z/OS namespaces\ntype ZOSNamespaceType string\n\nconst (\n\t// PIDNamespace for isolating process IDs\n\tZOSPIDNamespace ZOSNamespaceType = \"pid\"\n\t// MountNamespace for isolating mount points\n\tZOSMountNamespace ZOSNamespaceType = \"mount\"\n\t// IPCNamespace for isolating System V IPC, POSIX message queues\n\tZOSIPCNamespace ZOSNamespaceType = \"ipc\"\n\t// UTSNamespace for isolating hostname and NIS domain name\n\tZOSUTSNamespace ZOSNamespaceType = \"uts\"\n)\n\ntype MemoryPolicyModeType string\n\nconst (\n\tMpolDefault            MemoryPolicyModeType = \"MPOL_DEFAULT\"\n\tMpolBind               MemoryPolicyModeType = \"MPOL_BIND\"\n\tMpolInterleave         MemoryPolicyModeType = \"MPOL_INTERLEAVE\"\n\tMpolWeightedInterleave MemoryPolicyModeType = \"MPOL_WEIGHTED_INTERLEAVE\"\n\tMpolPreferred          MemoryPolicyModeType = \"MPOL_PREFERRED\"\n\tMpolPreferredMany      MemoryPolicyModeType = \"MPOL_PREFERRED_MANY\"\n\tMpolLocal              MemoryPolicyModeType = \"MPOL_LOCAL\"\n)\n\ntype MemoryPolicyFlagType string\n\nconst (\n\tMpolFNumaBalancing MemoryPolicyFlagType = \"MPOL_F_NUMA_BALANCING\"\n\tMpolFRelativeNodes MemoryPolicyFlagType = \"MPOL_F_RELATIVE_NODES\"\n\tMpolFStaticNodes   MemoryPolicyFlagType = \"MPOL_F_STATIC_NODES\"\n)\n\n// LinuxSchedulerPolicy represents different scheduling policies used with the Linux Scheduler\ntype LinuxSchedulerPolicy string\n\nconst (\n\t// SchedOther is the default scheduling policy\n\tSchedOther LinuxSchedulerPolicy = \"SCHED_OTHER\"\n\t// SchedFIFO is the First-In-First-Out scheduling policy\n\tSchedFIFO LinuxSchedulerPolicy = \"SCHED_FIFO\"\n\t// SchedRR is the Round-Robin scheduling policy\n\tSchedRR LinuxSchedulerPolicy = \"SCHED_RR\"\n\t// SchedBatch is the Batch scheduling policy\n\tSchedBatch LinuxSchedulerPolicy = \"SCHED_BATCH\"\n\t// SchedISO is the Isolation scheduling policy\n\tSchedISO LinuxSchedulerPolicy = \"SCHED_ISO\"\n\t// SchedIdle is the Idle scheduling policy\n\tSchedIdle LinuxSchedulerPolicy = \"SCHED_IDLE\"\n\t// SchedDeadline is the Deadline scheduling policy\n\tSchedDeadline LinuxSchedulerPolicy = \"SCHED_DEADLINE\"\n)\n\n// LinuxSchedulerFlag represents the flags used by the Linux Scheduler.\ntype LinuxSchedulerFlag string\n\nconst (\n\t// SchedFlagResetOnFork represents the reset on fork scheduling flag\n\tSchedFlagResetOnFork LinuxSchedulerFlag = \"SCHED_FLAG_RESET_ON_FORK\"\n\t// SchedFlagReclaim represents the reclaim scheduling flag\n\tSchedFlagReclaim LinuxSchedulerFlag = \"SCHED_FLAG_RECLAIM\"\n\t// SchedFlagDLOverrun represents the deadline overrun scheduling flag\n\tSchedFlagDLOverrun LinuxSchedulerFlag = \"SCHED_FLAG_DL_OVERRUN\"\n\t// SchedFlagKeepPolicy represents the keep policy scheduling flag\n\tSchedFlagKeepPolicy LinuxSchedulerFlag = \"SCHED_FLAG_KEEP_POLICY\"\n\t// SchedFlagKeepParams represents the keep parameters scheduling flag\n\tSchedFlagKeepParams LinuxSchedulerFlag = \"SCHED_FLAG_KEEP_PARAMS\"\n\t// SchedFlagUtilClampMin represents the utilization clamp minimum scheduling flag\n\tSchedFlagUtilClampMin LinuxSchedulerFlag = \"SCHED_FLAG_UTIL_CLAMP_MIN\"\n\t// SchedFlagUtilClampMin represents the utilization clamp maximum scheduling flag\n\tSchedFlagUtilClampMax LinuxSchedulerFlag = \"SCHED_FLAG_UTIL_CLAMP_MAX\"\n)\n\n// FreeBSD contains platform-specific configuration for FreeBSD based containers.\ntype FreeBSD struct {\n\t// Devices which are accessible in the container\n\tDevices []FreeBSDDevice `json:\"devices,omitempty\"`\n\t// Jail definition for this container\n\tJail *FreeBSDJail `json:\"jail,omitempty\"`\n}\n\ntype FreeBSDDevice struct {\n\t// Path to the device, relative to /dev.\n\tPath string `json:\"path\"`\n\t// FileMode permission bits for the device.\n\tMode *os.FileMode `json:\"mode,omitempty\"`\n}\n\n// FreeBSDJail describes how to configure the container's jail\ntype FreeBSDJail struct {\n\t// Parent jail name - this can be used to share a single vnet\n\t// across several containers\n\tParent string `json:\"parent,omitempty\"`\n\t// Whether to use parent UTS names or override in the container\n\tHost FreeBSDSharing `json:\"host,omitempty\"`\n\t// IPv4 address sharing for the container\n\tIp4 FreeBSDSharing `json:\"ip4,omitempty\"`\n\t// IPv4 addresses for the container\n\tIp4Addr []string `json:\"ip4Addr,omitempty\"`\n\t// IPv6 address sharing for the container\n\tIp6 FreeBSDSharing `json:\"ip6,omitempty\"`\n\t// IPv6 addresses for the container\n\tIp6Addr []string `json:\"ip6Addr,omitempty\"`\n\t// Which network stack to use for the container\n\tVnet FreeBSDSharing `json:\"vnet,omitempty\"`\n\t// If set, Ip4Addr and Ip6Addr addresses will be added to this interface\n\tInterface string `json:\"interface,omitempty\"`\n\t// List interfaces to be moved to the container's vnet\n\tVnetInterfaces []string `json:\"vnetInterfaces,omitempty\"`\n\t// SystemV IPC message sharing for the container\n\tSysVMsg FreeBSDSharing `json:\"sysvmsg,omitempty\"`\n\t// SystemV semaphore message sharing for the container\n\tSysVSem FreeBSDSharing `json:\"sysvsem,omitempty\"`\n\t// SystemV memory sharing for the container\n\tSysVShm FreeBSDSharing `json:\"sysvshm,omitempty\"`\n\t// Mount visibility (see jail(8) for details)\n\tEnforceStatfs *int `json:\"enforceStatfs,omitempty\"`\n\t// Jail capabilities\n\tAllow *FreeBSDJailAllow `json:\"allow,omitempty\"`\n}\n\n// These values are used to control access to features in the container, either\n// disabling the feature, sharing state with the parent or creating new private\n// state in the container.\ntype FreeBSDSharing string\n\nconst (\n\tFreeBSDShareDisable FreeBSDSharing = \"disable\"\n\tFreeBSDShareNew     FreeBSDSharing = \"new\"\n\tFreeBSDShareInherit FreeBSDSharing = \"inherit\"\n)\n\n// FreeBSDJailAllow describes jail capabilities\ntype FreeBSDJailAllow struct {\n\tSetHostname   bool     `json:\"setHostname,omitempty\"`\n\tRawSockets    bool     `json:\"rawSockets,omitempty\"`\n\tChflags       bool     `json:\"chflags,omitempty\"`\n\tMount         []string `json:\"mount,omitempty\"`\n\tQuotas        bool     `json:\"quotas,omitempty\"`\n\tSocketAf      bool     `json:\"socketAf,omitempty\"`\n\tMlock         bool     `json:\"mlock,omitempty\"`\n\tReservedPorts bool     `json:\"reservedPorts,omitempty\"`\n\tSuser         bool     `json:\"suser,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/runtime-spec/specs-go/state.go",
    "content": "package specs\n\n// ContainerState represents the state of a container.\ntype ContainerState string\n\nconst (\n\t// StateCreating indicates that the container is being created\n\tStateCreating ContainerState = \"creating\"\n\n\t// StateCreated indicates that the runtime has finished the create operation\n\tStateCreated ContainerState = \"created\"\n\n\t// StateRunning indicates that the container process has executed the\n\t// user-specified program but has not exited\n\tStateRunning ContainerState = \"running\"\n\n\t// StateStopped indicates that the container process has exited\n\tStateStopped ContainerState = \"stopped\"\n)\n\n// State holds information about the runtime state of the container.\ntype State struct {\n\t// Version is the version of the specification that is supported.\n\tVersion string `json:\"ociVersion\"`\n\t// ID is the container ID\n\tID string `json:\"id\"`\n\t// Status is the runtime status of the container.\n\tStatus ContainerState `json:\"status\"`\n\t// Pid is the process ID for the container process.\n\tPid int `json:\"pid,omitempty\"`\n\t// Bundle is the path to the container's bundle directory.\n\tBundle string `json:\"bundle\"`\n\t// Annotations are key values associated with the container.\n\tAnnotations map[string]string `json:\"annotations,omitempty\"`\n}\n\nconst (\n\t// SeccompFdName is the name of the seccomp notify file descriptor.\n\tSeccompFdName string = \"seccompFd\"\n)\n\n// ContainerProcessState holds information about the state of a container process.\ntype ContainerProcessState struct {\n\t// Version is the version of the specification that is supported.\n\tVersion string `json:\"ociVersion\"`\n\t// Fds is a string array containing the names of the file descriptors passed.\n\t// The index of the name in this array corresponds to index of the file\n\t// descriptor in the `SCM_RIGHTS` array.\n\tFds []string `json:\"fds\"`\n\t// Pid is the process ID as seen by the runtime.\n\tPid int `json:\"pid\"`\n\t// Opaque metadata.\n\tMetadata string `json:\"metadata,omitempty\"`\n\t// State of the container.\n\tState State `json:\"state\"`\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/runtime-spec/specs-go/version.go",
    "content": "package specs\n\nimport \"fmt\"\n\nconst (\n\t// VersionMajor is for an API incompatible changes\n\tVersionMajor = 1\n\t// VersionMinor is for functionality in a backwards-compatible manner\n\tVersionMinor = 3\n\t// VersionPatch is for backwards-compatible bug fixes\n\tVersionPatch = 0\n\n\t// VersionDev indicates development branch. Releases will be empty string.\n\tVersionDev = \"\"\n)\n\n// Version is the specification version that the package types support.\nvar Version = fmt.Sprintf(\"%d.%d.%d%s\", VersionMajor, VersionMinor, VersionPatch, VersionDev)\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/LICENSE",
    "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": "vendor/github.com/opencontainers/selinux/go-selinux/doc.go",
    "content": "/*\nPackage selinux provides a high-level interface for interacting with selinux.\n\nUsage:\n\n\timport \"github.com/opencontainers/selinux/go-selinux\"\n\n\t// Ensure that selinux is enforcing mode.\n\tif selinux.EnforceMode() != selinux.Enforcing {\n\t\tselinux.SetEnforceMode(selinux.Enforcing)\n\t}\n*/\npackage selinux\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/label/label.go",
    "content": "package label\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/opencontainers/selinux/go-selinux\"\n)\n\n// Init initialises the labeling system\nfunc Init() {\n\t_ = selinux.GetEnabled()\n}\n\n// FormatMountLabel returns a string to be used by the mount command. Using\n// the SELinux `context` mount option. Changing labels of files on mount\n// points with this option can never be changed.\n// FormatMountLabel returns a string to be used by the mount command.\n// The format of this string will be used to alter the labeling of the mountpoint.\n// The string returned is suitable to be used as the options field of the mount command.\n// If you need to have additional mount point options, you can pass them in as\n// the first parameter.  Second parameter is the label that you wish to apply\n// to all content in the mount point.\nfunc FormatMountLabel(src, mountLabel string) string {\n\treturn FormatMountLabelByType(src, mountLabel, \"context\")\n}\n\n// FormatMountLabelByType returns a string to be used by the mount command.\n// Allow caller to specify the mount options. For example using the SELinux\n// `fscontext` mount option would allow certain container processes to change\n// labels of files created on the mount points, where as `context` option does\n// not.\n// FormatMountLabelByType returns a string to be used by the mount command.\n// The format of this string will be used to alter the labeling of the mountpoint.\n// The string returned is suitable to be used as the options field of the mount command.\n// If you need to have additional mount point options, you can pass them in as\n// the first parameter.  Second parameter is the label that you wish to apply\n// to all content in the mount point.\nfunc FormatMountLabelByType(src, mountLabel, contextType string) string {\n\tif mountLabel != \"\" {\n\t\tswitch src {\n\t\tcase \"\":\n\t\t\tsrc = fmt.Sprintf(\"%s=%q\", contextType, mountLabel)\n\t\tdefault:\n\t\t\tsrc = fmt.Sprintf(\"%s,%s=%q\", src, contextType, mountLabel)\n\t\t}\n\t}\n\treturn src\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go",
    "content": "package label\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/selinux/go-selinux\"\n)\n\n// Valid Label Options\nvar validOptions = map[string]bool{\n\t\"disable\":  true,\n\t\"type\":     true,\n\t\"filetype\": true,\n\t\"user\":     true,\n\t\"role\":     true,\n\t\"level\":    true,\n}\n\nvar ErrIncompatibleLabel = errors.New(\"bad SELinux option: z and Z can not be used together\")\n\n// InitLabels returns the process label and file labels to be used within\n// the container.  A list of options can be passed into this function to alter\n// the labels.  The labels returned will include a random MCS String, that is\n// guaranteed to be unique.\n// If the disabled flag is passed in, the process label will not be set, but the mount label will be set\n// to the container_file label with the maximum category. This label is not usable by any confined label.\nfunc InitLabels(options []string) (plabel string, mlabel string, retErr error) {\n\tif !selinux.GetEnabled() {\n\t\treturn \"\", \"\", nil\n\t}\n\tprocessLabel, mountLabel := selinux.ContainerLabels()\n\tif processLabel != \"\" {\n\t\tdefer func() {\n\t\t\tif retErr != nil {\n\t\t\t\tselinux.ReleaseLabel(mountLabel)\n\t\t\t}\n\t\t}()\n\t\tpcon, err := selinux.NewContext(processLabel)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", err\n\t\t}\n\t\tmcsLevel := pcon[\"level\"]\n\t\tmcon, err := selinux.NewContext(mountLabel)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", err\n\t\t}\n\t\tfor _, opt := range options {\n\t\t\tif opt == \"disable\" {\n\t\t\t\tselinux.ReleaseLabel(mountLabel)\n\t\t\t\treturn \"\", selinux.PrivContainerMountLabel(), nil\n\t\t\t}\n\t\t\tif i := strings.Index(opt, \":\"); i == -1 {\n\t\t\t\treturn \"\", \"\", fmt.Errorf(\"bad label option %q, valid options 'disable' or \\n'user, role, level, type, filetype' followed by ':' and a value\", opt)\n\t\t\t}\n\t\t\tcon := strings.SplitN(opt, \":\", 2)\n\t\t\tif !validOptions[con[0]] {\n\t\t\t\treturn \"\", \"\", fmt.Errorf(\"bad label option %q, valid options 'disable, user, role, level, type, filetype'\", con[0])\n\t\t\t}\n\t\t\tif con[0] == \"filetype\" {\n\t\t\t\tmcon[\"type\"] = con[1]\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpcon[con[0]] = con[1]\n\t\t\tif con[0] == \"level\" || con[0] == \"user\" {\n\t\t\t\tmcon[con[0]] = con[1]\n\t\t\t}\n\t\t}\n\t\tif pcon.Get() != processLabel {\n\t\t\tif pcon[\"level\"] != mcsLevel {\n\t\t\t\tselinux.ReleaseLabel(processLabel)\n\t\t\t}\n\t\t\tprocessLabel = pcon.Get()\n\t\t\tselinux.ReserveLabel(processLabel)\n\t\t}\n\t\tmountLabel = mcon.Get()\n\t}\n\treturn processLabel, mountLabel, nil\n}\n\n// SetFileLabel modifies the \"path\" label to the specified file label\nfunc SetFileLabel(path string, fileLabel string) error {\n\tif !selinux.GetEnabled() || fileLabel == \"\" {\n\t\treturn nil\n\t}\n\treturn selinux.SetFileLabel(path, fileLabel)\n}\n\n// SetFileCreateLabel tells the kernel the label for all files to be created\nfunc SetFileCreateLabel(fileLabel string) error {\n\tif !selinux.GetEnabled() {\n\t\treturn nil\n\t}\n\treturn selinux.SetFSCreateLabel(fileLabel)\n}\n\n// Relabel changes the label of path and all the entries beneath the path.\n// It changes the MCS label to s0 if shared is true.\n// This will allow all containers to share the content.\n//\n// The path itself is guaranteed to be relabeled last.\nfunc Relabel(path string, fileLabel string, shared bool) error {\n\tif !selinux.GetEnabled() || fileLabel == \"\" {\n\t\treturn nil\n\t}\n\n\tif shared {\n\t\tc, err := selinux.NewContext(fileLabel)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tc[\"level\"] = \"s0\"\n\t\tfileLabel = c.Get()\n\t}\n\treturn selinux.Chcon(path, fileLabel, true)\n}\n\n// Validate checks that the label does not include unexpected options\nfunc Validate(label string) error {\n\tif strings.Contains(label, \"z\") && strings.Contains(label, \"Z\") {\n\t\treturn ErrIncompatibleLabel\n\t}\n\treturn nil\n}\n\n// RelabelNeeded checks whether the user requested a relabel\nfunc RelabelNeeded(label string) bool {\n\treturn strings.Contains(label, \"z\") || strings.Contains(label, \"Z\")\n}\n\n// IsShared checks that the label includes a \"shared\" mark\nfunc IsShared(label string) bool {\n\treturn strings.Contains(label, \"z\")\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go",
    "content": "//go:build !linux\n// +build !linux\n\npackage label\n\n// InitLabels returns the process label and file labels to be used within\n// the container.  A list of options can be passed into this function to alter\n// the labels.\nfunc InitLabels([]string) (string, string, error) {\n\treturn \"\", \"\", nil\n}\n\nfunc SetFileLabel(string, string) error {\n\treturn nil\n}\n\nfunc SetFileCreateLabel(string) error {\n\treturn nil\n}\n\nfunc Relabel(string, string, bool) error {\n\treturn nil\n}\n\n// DisableSecOpt returns a security opt that can disable labeling\n// support for future container processes\nfunc DisableSecOpt() []string {\n\treturn nil\n}\n\n// Validate checks that the label does not include unexpected options\nfunc Validate(string) error {\n\treturn nil\n}\n\n// RelabelNeeded checks whether the user requested a relabel\nfunc RelabelNeeded(string) bool {\n\treturn false\n}\n\n// IsShared checks that the label includes a \"shared\" mark\nfunc IsShared(string) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/selinux.go",
    "content": "package selinux\n\nimport (\n\t\"errors\"\n)\n\nconst (\n\t// Enforcing constant indicate SELinux is in enforcing mode\n\tEnforcing = 1\n\t// Permissive constant to indicate SELinux is in permissive mode\n\tPermissive = 0\n\t// Disabled constant to indicate SELinux is disabled\n\tDisabled = -1\n\t// maxCategory is the maximum number of categories used within containers\n\tmaxCategory = 1024\n\t// DefaultCategoryRange is the upper bound on the category range\n\tDefaultCategoryRange = uint32(maxCategory)\n)\n\nvar (\n\t// ErrMCSAlreadyExists is returned when trying to allocate a duplicate MCS.\n\tErrMCSAlreadyExists = errors.New(\"MCS label already exists\")\n\t// ErrEmptyPath is returned when an empty path has been specified.\n\tErrEmptyPath = errors.New(\"empty path\")\n\n\t// ErrInvalidLabel is returned when an invalid label is specified.\n\tErrInvalidLabel = errors.New(\"invalid Label\")\n\n\t// InvalidLabel is returned when an invalid label is specified.\n\t//\n\t// Deprecated: use [ErrInvalidLabel].\n\tInvalidLabel = ErrInvalidLabel\n\n\t// ErrIncomparable is returned two levels are not comparable\n\tErrIncomparable = errors.New(\"incomparable levels\")\n\t// ErrLevelSyntax is returned when a sensitivity or category do not have correct syntax in a level\n\tErrLevelSyntax = errors.New(\"invalid level syntax\")\n\n\t// ErrContextMissing is returned if a requested context is not found in a file.\n\tErrContextMissing = errors.New(\"context does not have a match\")\n\t// ErrVerifierNil is returned when a context verifier function is nil.\n\tErrVerifierNil = errors.New(\"verifier function is nil\")\n\n\t// ErrNotTGLeader is returned by [SetKeyLabel] if the calling thread\n\t// is not the thread group leader.\n\tErrNotTGLeader = errors.New(\"calling thread is not the thread group leader\")\n\n\t// CategoryRange allows the upper bound on the category range to be adjusted\n\tCategoryRange = DefaultCategoryRange\n\n\tprivContainerMountLabel string\n)\n\n// Context is a representation of the SELinux label broken into 4 parts\ntype Context map[string]string\n\n// SetDisabled disables SELinux support for the package\nfunc SetDisabled() {\n\tsetDisabled()\n}\n\n// GetEnabled returns whether SELinux is currently enabled.\nfunc GetEnabled() bool {\n\treturn getEnabled()\n}\n\n// ClassIndex returns the int index for an object class in the loaded policy,\n// or -1 and an error\nfunc ClassIndex(class string) (int, error) {\n\treturn classIndex(class)\n}\n\n// SetFileLabel sets the SELinux label for this path, following symlinks,\n// or returns an error.\nfunc SetFileLabel(fpath string, label string) error {\n\treturn setFileLabel(fpath, label)\n}\n\n// LsetFileLabel sets the SELinux label for this path, not following symlinks,\n// or returns an error.\nfunc LsetFileLabel(fpath string, label string) error {\n\treturn lSetFileLabel(fpath, label)\n}\n\n// FileLabel returns the SELinux label for this path, following symlinks,\n// or returns an error.\nfunc FileLabel(fpath string) (string, error) {\n\treturn fileLabel(fpath)\n}\n\n// LfileLabel returns the SELinux label for this path, not following symlinks,\n// or returns an error.\nfunc LfileLabel(fpath string) (string, error) {\n\treturn lFileLabel(fpath)\n}\n\n// SetFSCreateLabel tells the kernel what label to use for all file system objects\n// created by this task.\n// Set the label to an empty string to return to the default label. Calls to SetFSCreateLabel\n// should be wrapped in runtime.LockOSThread()/runtime.UnlockOSThread() until file system\n// objects created by this task are finished to guarantee another goroutine does not migrate\n// to the current thread before execution is complete.\nfunc SetFSCreateLabel(label string) error {\n\treturn setFSCreateLabel(label)\n}\n\n// FSCreateLabel returns the default label the kernel which the kernel is using\n// for file system objects created by this task. \"\" indicates default.\nfunc FSCreateLabel() (string, error) {\n\treturn fsCreateLabel()\n}\n\n// CurrentLabel returns the SELinux label of the current process thread, or an error.\nfunc CurrentLabel() (string, error) {\n\treturn currentLabel()\n}\n\n// PidLabel returns the SELinux label of the given pid, or an error.\nfunc PidLabel(pid int) (string, error) {\n\treturn pidLabel(pid)\n}\n\n// ExecLabel returns the SELinux label that the kernel will use for any programs\n// that are executed by the current process thread, or an error.\nfunc ExecLabel() (string, error) {\n\treturn execLabel()\n}\n\n// CanonicalizeContext takes a context string and writes it to the kernel\n// the function then returns the context that the kernel will use. Use this\n// function to check if two contexts are equivalent\nfunc CanonicalizeContext(val string) (string, error) {\n\treturn canonicalizeContext(val)\n}\n\n// ComputeCreateContext requests the type transition from source to target for\n// class from the kernel.\nfunc ComputeCreateContext(source string, target string, class string) (string, error) {\n\treturn computeCreateContext(source, target, class)\n}\n\n// CalculateGlbLub computes the glb (greatest lower bound) and lub (least upper bound)\n// of a source and target range.\n// The glblub is calculated as the greater of the low sensitivities and\n// the lower of the high sensitivities and the and of each category bitset.\nfunc CalculateGlbLub(sourceRange, targetRange string) (string, error) {\n\treturn calculateGlbLub(sourceRange, targetRange)\n}\n\n// SetExecLabel sets the SELinux label that the kernel will use for any programs\n// that are executed by the current process thread, or an error. Calls to SetExecLabel\n// should  be wrapped in runtime.LockOSThread()/runtime.UnlockOSThread() until execution\n// of the program is finished to guarantee another goroutine does not migrate to the current\n// thread before execution is complete.\nfunc SetExecLabel(label string) error {\n\treturn writeConThreadSelf(\"attr/exec\", label)\n}\n\n// SetTaskLabel sets the SELinux label for the current thread, or an error.\n// This requires the dyntransition permission. Calls to SetTaskLabel should\n// be wrapped in runtime.LockOSThread()/runtime.UnlockOSThread() to guarantee\n// the current thread does not run in a new mislabeled thread.\nfunc SetTaskLabel(label string) error {\n\treturn writeConThreadSelf(\"attr/current\", label)\n}\n\n// SetSocketLabel takes a process label and tells the kernel to assign the\n// label to the next socket that gets created. Calls to SetSocketLabel\n// should be wrapped in runtime.LockOSThread()/runtime.UnlockOSThread() until\n// the socket is created to guarantee another goroutine does not migrate\n// to the current thread before execution is complete.\nfunc SetSocketLabel(label string) error {\n\treturn writeConThreadSelf(\"attr/sockcreate\", label)\n}\n\n// SocketLabel retrieves the current socket label setting\nfunc SocketLabel() (string, error) {\n\treturn readConThreadSelf(\"attr/sockcreate\")\n}\n\n// PeerLabel retrieves the label of the client on the other side of a socket\nfunc PeerLabel(fd uintptr) (string, error) {\n\treturn peerLabel(fd)\n}\n\n// SetKeyLabel takes a process label and tells the kernel to assign the\n// label to the next kernel keyring that gets created.\n//\n// Calls to SetKeyLabel should be wrapped in\n// runtime.LockOSThread()/runtime.UnlockOSThread() until the kernel keyring is\n// created to guarantee another goroutine does not migrate to the current\n// thread before execution is complete.\n//\n// Only the thread group leader can set key label.\nfunc SetKeyLabel(label string) error {\n\treturn setKeyLabel(label)\n}\n\n// KeyLabel retrieves the current kernel keyring label setting\nfunc KeyLabel() (string, error) {\n\treturn keyLabel()\n}\n\n// Get returns the Context as a string\nfunc (c Context) Get() string {\n\treturn c.get()\n}\n\n// NewContext creates a new Context struct from the specified label\nfunc NewContext(label string) (Context, error) {\n\treturn newContext(label)\n}\n\n// ClearLabels clears all reserved labels\nfunc ClearLabels() {\n\tclearLabels()\n}\n\n// ReserveLabel reserves the MLS/MCS level component of the specified label\nfunc ReserveLabel(label string) {\n\treserveLabel(label)\n}\n\n// MLSEnabled checks if MLS is enabled.\nfunc MLSEnabled() bool {\n\treturn isMLSEnabled()\n}\n\n// EnforceMode returns the current SELinux mode Enforcing, Permissive, Disabled\nfunc EnforceMode() int {\n\treturn enforceMode()\n}\n\n// SetEnforceMode sets the current SELinux mode Enforcing, Permissive.\n// Disabled is not valid, since this needs to be set at boot time.\nfunc SetEnforceMode(mode int) error {\n\treturn setEnforceMode(mode)\n}\n\n// DefaultEnforceMode returns the systems default SELinux mode Enforcing,\n// Permissive or Disabled. Note this is just the default at boot time.\n// EnforceMode tells you the systems current mode.\nfunc DefaultEnforceMode() int {\n\treturn defaultEnforceMode()\n}\n\n// ReleaseLabel un-reserves the MLS/MCS Level field of the specified label,\n// allowing it to be used by another process.\nfunc ReleaseLabel(label string) {\n\treleaseLabel(label)\n}\n\n// ROFileLabel returns the specified SELinux readonly file label\nfunc ROFileLabel() string {\n\treturn roFileLabel()\n}\n\n// KVMContainerLabels returns the default processLabel and mountLabel to be used\n// for kvm containers by the calling process.\nfunc KVMContainerLabels() (string, string) {\n\treturn kvmContainerLabels()\n}\n\n// InitContainerLabels returns the default processLabel and file labels to be\n// used for containers running an init system like systemd by the calling process.\nfunc InitContainerLabels() (string, string) {\n\treturn initContainerLabels()\n}\n\n// ContainerLabels returns an allocated processLabel and fileLabel to be used for\n// container labeling by the calling process.\nfunc ContainerLabels() (processLabel string, fileLabel string) {\n\treturn containerLabels()\n}\n\n// SecurityCheckContext validates that the SELinux label is understood by the kernel\nfunc SecurityCheckContext(val string) error {\n\treturn securityCheckContext(val)\n}\n\n// CopyLevel returns a label with the MLS/MCS level from src label replaced on\n// the dest label.\nfunc CopyLevel(src, dest string) (string, error) {\n\treturn copyLevel(src, dest)\n}\n\n// Chcon changes the fpath file object to the SELinux label.\n// If fpath is a directory and recurse is true, then Chcon walks the\n// directory tree setting the label.\n//\n// The fpath itself is guaranteed to be relabeled last.\nfunc Chcon(fpath string, label string, recurse bool) error {\n\treturn chcon(fpath, label, recurse)\n}\n\n// DupSecOpt takes an SELinux process label and returns security options that\n// can be used to set the SELinux Type and Level for future container processes.\nfunc DupSecOpt(src string) ([]string, error) {\n\treturn dupSecOpt(src)\n}\n\n// DisableSecOpt returns a security opt that can be used to disable SELinux\n// labeling support for future container processes.\nfunc DisableSecOpt() []string {\n\treturn []string{\"disable\"}\n}\n\n// GetDefaultContextWithLevel gets a single context for the specified SELinux user\n// identity that is reachable from the specified scon context. The context is based\n// on the per-user /etc/selinux/{SELINUXTYPE}/contexts/users/<username> if it exists,\n// and falls back to the global /etc/selinux/{SELINUXTYPE}/contexts/default_contexts\n// file.\nfunc GetDefaultContextWithLevel(user, level, scon string) (string, error) {\n\treturn getDefaultContextWithLevel(user, level, scon)\n}\n\n// PrivContainerMountLabel returns mount label for privileged containers\nfunc PrivContainerMountLabel() string {\n\t// Make sure label is initialized.\n\t_ = label(\"\")\n\treturn privContainerMountLabel\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go",
    "content": "package selinux\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"crypto/rand\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"math/big\"\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite/procfs\"\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/opencontainers/selinux/pkg/pwalkdir\"\n)\n\nconst (\n\tminSensLen       = 2\n\tcontextFile      = \"/usr/share/containers/selinux/contexts\"\n\tselinuxDir       = \"/etc/selinux/\"\n\tselinuxUsersDir  = \"contexts/users\"\n\tdefaultContexts  = \"contexts/default_contexts\"\n\tselinuxConfig    = selinuxDir + \"config\"\n\tselinuxfsMount   = \"/sys/fs/selinux\"\n\tselinuxTypeTag   = \"SELINUXTYPE\"\n\tselinuxTag       = \"SELINUX\"\n\txattrNameSelinux = \"security.selinux\"\n)\n\ntype selinuxState struct {\n\tmcsList       map[string]bool\n\tselinuxfs     string\n\tselinuxfsOnce sync.Once\n\tenabledSet    bool\n\tenabled       bool\n\tsync.Mutex\n}\n\ntype level struct {\n\tcats *big.Int\n\tsens int\n}\n\ntype mlsRange struct {\n\tlow  *level\n\thigh *level\n}\n\ntype defaultSECtx struct {\n\tuserRdr           io.Reader\n\tverifier          func(string) error\n\tdefaultRdr        io.Reader\n\tuser, level, scon string\n}\n\ntype levelItem byte\n\nconst (\n\tsensitivity levelItem = 's'\n\tcategory    levelItem = 'c'\n)\n\nvar (\n\treadOnlyFileLabel string\n\tstate             = selinuxState{\n\t\tmcsList: make(map[string]bool),\n\t}\n\n\t// for policyRoot()\n\tpolicyRootOnce sync.Once\n\tpolicyRootVal  string\n\n\t// for label()\n\tloadLabelsOnce sync.Once\n\tlabels         map[string]string\n)\n\nfunc policyRoot() string {\n\tpolicyRootOnce.Do(func() {\n\t\tpolicyRootVal = filepath.Join(selinuxDir, readConfig(selinuxTypeTag))\n\t})\n\n\treturn policyRootVal\n}\n\nfunc (s *selinuxState) setEnable(enabled bool) bool {\n\ts.Lock()\n\tdefer s.Unlock()\n\ts.enabledSet = true\n\ts.enabled = enabled\n\treturn s.enabled\n}\n\nfunc (s *selinuxState) getEnabled() bool {\n\ts.Lock()\n\tenabled := s.enabled\n\tenabledSet := s.enabledSet\n\ts.Unlock()\n\tif enabledSet {\n\t\treturn enabled\n\t}\n\n\tenabled = false\n\tif fs := getSelinuxMountPoint(); fs != \"\" {\n\t\tif con, _ := CurrentLabel(); con != \"kernel\" {\n\t\t\tenabled = true\n\t\t}\n\t}\n\treturn s.setEnable(enabled)\n}\n\n// setDisabled disables SELinux support for the package\nfunc setDisabled() {\n\tstate.setEnable(false)\n}\n\nfunc verifySELinuxfsMount(mnt string) bool {\n\tvar buf unix.Statfs_t\n\tfor {\n\t\terr := unix.Statfs(mnt, &buf)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif err == unix.EAGAIN || err == unix.EINTR {\n\t\t\tcontinue\n\t\t}\n\t\treturn false\n\t}\n\n\t//#nosec G115 -- there is no overflow here.\n\tif uint32(buf.Type) != uint32(unix.SELINUX_MAGIC) {\n\t\treturn false\n\t}\n\tif (buf.Flags & unix.ST_RDONLY) != 0 {\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc findSELinuxfs() string {\n\t// fast path: check the default mount first\n\tif verifySELinuxfsMount(selinuxfsMount) {\n\t\treturn selinuxfsMount\n\t}\n\n\t// check if selinuxfs is available before going the slow path\n\tfs, err := os.ReadFile(\"/proc/filesystems\")\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tif !bytes.Contains(fs, []byte(\"\\tselinuxfs\\n\")) {\n\t\treturn \"\"\n\t}\n\n\t// slow path: try to find among the mounts\n\tf, err := os.Open(\"/proc/self/mountinfo\")\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdefer f.Close()\n\n\tscanner := bufio.NewScanner(f)\n\tfor {\n\t\tmnt := findSELinuxfsMount(scanner)\n\t\tif mnt == \"\" { // error or not found\n\t\t\treturn \"\"\n\t\t}\n\t\tif verifySELinuxfsMount(mnt) {\n\t\t\treturn mnt\n\t\t}\n\t}\n}\n\n// findSELinuxfsMount returns a next selinuxfs mount point found,\n// if there is one, or an empty string in case of EOF or error.\nfunc findSELinuxfsMount(s *bufio.Scanner) string {\n\tfor s.Scan() {\n\t\ttxt := s.Bytes()\n\t\t// The first field after - is fs type.\n\t\t// Safe as spaces in mountpoints are encoded as \\040\n\t\tif !bytes.Contains(txt, []byte(\" - selinuxfs \")) {\n\t\t\tcontinue\n\t\t}\n\t\tconst mPos = 5 // mount point is 5th field\n\t\tfields := bytes.SplitN(txt, []byte(\" \"), mPos+1)\n\t\tif len(fields) < mPos+1 {\n\t\t\tcontinue\n\t\t}\n\t\treturn string(fields[mPos-1])\n\t}\n\n\treturn \"\"\n}\n\nfunc (s *selinuxState) getSELinuxfs() string {\n\ts.selinuxfsOnce.Do(func() {\n\t\ts.selinuxfs = findSELinuxfs()\n\t})\n\n\treturn s.selinuxfs\n}\n\n// getSelinuxMountPoint returns the path to the mountpoint of an selinuxfs\n// filesystem or an empty string if no mountpoint is found.  Selinuxfs is\n// a proc-like pseudo-filesystem that exposes the SELinux policy API to\n// processes.  The existence of an selinuxfs mount is used to determine\n// whether SELinux is currently enabled or not.\nfunc getSelinuxMountPoint() string {\n\treturn state.getSELinuxfs()\n}\n\n// getEnabled returns whether SELinux is currently enabled.\nfunc getEnabled() bool {\n\treturn state.getEnabled()\n}\n\nfunc readConfig(target string) string {\n\tin, err := os.Open(selinuxConfig)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdefer in.Close()\n\n\tscanner := bufio.NewScanner(in)\n\n\tfor scanner.Scan() {\n\t\tline := bytes.TrimSpace(scanner.Bytes())\n\t\tif len(line) == 0 {\n\t\t\t// Skip blank lines\n\t\t\tcontinue\n\t\t}\n\t\tif line[0] == ';' || line[0] == '#' {\n\t\t\t// Skip comments\n\t\t\tcontinue\n\t\t}\n\t\tfields := bytes.SplitN(line, []byte{'='}, 2)\n\t\tif len(fields) != 2 {\n\t\t\tcontinue\n\t\t}\n\t\tif bytes.Equal(fields[0], []byte(target)) {\n\t\t\treturn string(bytes.Trim(fields[1], `\"`))\n\t\t}\n\t}\n\treturn \"\"\n}\n\nfunc readConFd(in *os.File) (string, error) {\n\tdata, err := io.ReadAll(in)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn string(bytes.TrimSuffix(data, []byte{0})), nil\n}\n\nfunc writeConFd(out *os.File, val string) error {\n\tvar err error\n\tif val != \"\" {\n\t\t_, err = out.Write([]byte(val))\n\t} else {\n\t\t_, err = out.Write(nil)\n\t}\n\treturn err\n}\n\n// openProcThreadSelf is a small wrapper around [procfs.Handle.OpenThreadSelf]\n// and [pathrs.Reopen] to make \"one-shot opens\" slightly more ergonomic. The\n// provided mode must be os.O_* flags to indicate what mode the returned file\n// should be opened with (flags like os.O_CREAT and os.O_EXCL are not\n// supported).\n//\n// If no error occurred, the returned handle is guaranteed to be exactly\n// /proc/thread-self/<subpath> with no tricky mounts or symlinks causing you to\n// operate on an unexpected path (with some caveats on pre-openat2 or\n// pre-fsopen kernels).\nfunc openProcThreadSelf(subpath string, mode int) (*os.File, procfs.ProcThreadSelfCloser, error) {\n\tif subpath == \"\" {\n\t\treturn nil, nil, ErrEmptyPath\n\t}\n\n\tproc, err := procfs.OpenProcRoot()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer proc.Close()\n\n\thandle, closer, err := proc.OpenThreadSelf(subpath)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"open /proc/thread-self/%s handle: %w\", subpath, err)\n\t}\n\tdefer handle.Close() // we will return a re-opened handle\n\n\tfile, err := pathrs.Reopen(handle, mode)\n\tif err != nil {\n\t\tcloser()\n\t\treturn nil, nil, fmt.Errorf(\"reopen /proc/thread-self/%s handle (%#x): %w\", subpath, mode, err)\n\t}\n\treturn file, closer, nil\n}\n\n// Read the contents of /proc/thread-self/<fpath>.\nfunc readConThreadSelf(fpath string) (string, error) {\n\tin, closer, err := openProcThreadSelf(fpath, os.O_RDONLY|unix.O_CLOEXEC)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer closer()\n\tdefer in.Close()\n\n\treturn readConFd(in)\n}\n\n// Write <val> to /proc/thread-self/<fpath>.\nfunc writeConThreadSelf(fpath, val string) error {\n\tif val == \"\" {\n\t\tif !getEnabled() {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tout, closer, err := openProcThreadSelf(fpath, os.O_WRONLY|unix.O_CLOEXEC)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closer()\n\tdefer out.Close()\n\n\treturn writeConFd(out, val)\n}\n\n// openProcSelf is a small wrapper around [procfs.Handle.OpenSelf] and\n// [pathrs.Reopen] to make \"one-shot opens\" slightly more ergonomic. The\n// provided mode must be os.O_* flags to indicate what mode the returned file\n// should be opened with (flags like os.O_CREAT and os.O_EXCL are not\n// supported).\n//\n// If no error occurred, the returned handle is guaranteed to be exactly\n// /proc/self/<subpath> with no tricky mounts or symlinks causing you to\n// operate on an unexpected path (with some caveats on pre-openat2 or\n// pre-fsopen kernels).\nfunc openProcSelf(subpath string, mode int) (*os.File, error) {\n\tif subpath == \"\" {\n\t\treturn nil, ErrEmptyPath\n\t}\n\n\tproc, err := procfs.OpenProcRoot()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer proc.Close()\n\n\thandle, err := proc.OpenSelf(subpath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"open /proc/self/%s handle: %w\", subpath, err)\n\t}\n\tdefer handle.Close() // we will return a re-opened handle\n\n\tfile, err := pathrs.Reopen(handle, mode)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reopen /proc/self/%s handle (%#x): %w\", subpath, mode, err)\n\t}\n\treturn file, nil\n}\n\n// Read the contents of /proc/self/<fpath>.\nfunc readConSelf(fpath string) (string, error) {\n\tin, err := openProcSelf(fpath, os.O_RDONLY|unix.O_CLOEXEC)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer in.Close()\n\n\treturn readConFd(in)\n}\n\n// Write <val> to /proc/self/<fpath>.\nfunc writeConSelf(fpath, val string) error {\n\tif val == \"\" {\n\t\tif !getEnabled() {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tout, err := openProcSelf(fpath, os.O_WRONLY|unix.O_CLOEXEC)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer out.Close()\n\n\treturn writeConFd(out, val)\n}\n\n// openProcPid is a small wrapper around [procfs.Handle.OpenPid] and\n// [pathrs.Reopen] to make \"one-shot opens\" slightly more ergonomic. The\n// provided mode must be os.O_* flags to indicate what mode the returned file\n// should be opened with (flags like os.O_CREAT and os.O_EXCL are not\n// supported).\n//\n// If no error occurred, the returned handle is guaranteed to be exactly\n// /proc/self/<subpath> with no tricky mounts or symlinks causing you to\n// operate on an unexpected path (with some caveats on pre-openat2 or\n// pre-fsopen kernels).\nfunc openProcPid(pid int, subpath string, mode int) (*os.File, error) {\n\tif subpath == \"\" {\n\t\treturn nil, ErrEmptyPath\n\t}\n\n\tproc, err := procfs.OpenProcRoot()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer proc.Close()\n\n\thandle, err := proc.OpenPid(pid, subpath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"open /proc/%d/%s handle: %w\", pid, subpath, err)\n\t}\n\tdefer handle.Close() // we will return a re-opened handle\n\n\tfile, err := pathrs.Reopen(handle, mode)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reopen /proc/%d/%s handle (%#x): %w\", pid, subpath, mode, err)\n\t}\n\treturn file, nil\n}\n\n// classIndex returns the int index for an object class in the loaded policy,\n// or -1 and an error\nfunc classIndex(class string) (int, error) {\n\tpermpath := fmt.Sprintf(\"class/%s/index\", class)\n\tindexpath := filepath.Join(getSelinuxMountPoint(), permpath)\n\n\tindexB, err := os.ReadFile(indexpath)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tindex, err := strconv.Atoi(string(indexB))\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn index, nil\n}\n\n// lSetFileLabel sets the SELinux label for this path, not following symlinks,\n// or returns an error.\nfunc lSetFileLabel(fpath string, label string) error {\n\tif fpath == \"\" {\n\t\treturn ErrEmptyPath\n\t}\n\tfor {\n\t\terr := unix.Lsetxattr(fpath, xattrNameSelinux, []byte(label), 0)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif err != unix.EINTR {\n\t\t\treturn &os.PathError{Op: fmt.Sprintf(\"lsetxattr(label=%s)\", label), Path: fpath, Err: err}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// setFileLabel sets the SELinux label for this path, following symlinks,\n// or returns an error.\nfunc setFileLabel(fpath string, label string) error {\n\tif fpath == \"\" {\n\t\treturn ErrEmptyPath\n\t}\n\tfor {\n\t\terr := unix.Setxattr(fpath, xattrNameSelinux, []byte(label), 0)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif err != unix.EINTR {\n\t\t\treturn &os.PathError{Op: fmt.Sprintf(\"setxattr(label=%s)\", label), Path: fpath, Err: err}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// fileLabel returns the SELinux label for this path, following symlinks,\n// or returns an error.\nfunc fileLabel(fpath string) (string, error) {\n\tif fpath == \"\" {\n\t\treturn \"\", ErrEmptyPath\n\t}\n\n\tlabel, err := getxattr(fpath, xattrNameSelinux)\n\tif err != nil {\n\t\treturn \"\", &os.PathError{Op: \"getxattr\", Path: fpath, Err: err}\n\t}\n\t// Trim the NUL byte at the end of the byte buffer, if present.\n\tif len(label) > 0 && label[len(label)-1] == '\\x00' {\n\t\tlabel = label[:len(label)-1]\n\t}\n\treturn string(label), nil\n}\n\n// lFileLabel returns the SELinux label for this path, not following symlinks,\n// or returns an error.\nfunc lFileLabel(fpath string) (string, error) {\n\tif fpath == \"\" {\n\t\treturn \"\", ErrEmptyPath\n\t}\n\n\tlabel, err := lgetxattr(fpath, xattrNameSelinux)\n\tif err != nil {\n\t\treturn \"\", &os.PathError{Op: \"lgetxattr\", Path: fpath, Err: err}\n\t}\n\t// Trim the NUL byte at the end of the byte buffer, if present.\n\tif len(label) > 0 && label[len(label)-1] == '\\x00' {\n\t\tlabel = label[:len(label)-1]\n\t}\n\treturn string(label), nil\n}\n\nfunc setFSCreateLabel(label string) error {\n\treturn writeConThreadSelf(\"attr/fscreate\", label)\n}\n\n// fsCreateLabel returns the default label the kernel which the kernel is using\n// for file system objects created by this task. \"\" indicates default.\nfunc fsCreateLabel() (string, error) {\n\treturn readConThreadSelf(\"attr/fscreate\")\n}\n\n// currentLabel returns the SELinux label of the current process thread, or an error.\nfunc currentLabel() (string, error) {\n\treturn readConThreadSelf(\"attr/current\")\n}\n\n// pidLabel returns the SELinux label of the given pid, or an error.\nfunc pidLabel(pid int) (string, error) {\n\tit, err := openProcPid(pid, \"attr/current\", os.O_RDONLY|unix.O_CLOEXEC)\n\tif err != nil {\n\t\treturn \"\", nil\n\t}\n\tdefer it.Close()\n\treturn readConFd(it)\n}\n\n// ExecLabel returns the SELinux label that the kernel will use for any programs\n// that are executed by the current process thread, or an error.\nfunc execLabel() (string, error) {\n\treturn readConThreadSelf(\"exec\")\n}\n\n// canonicalizeContext takes a context string and writes it to the kernel\n// the function then returns the context that the kernel will use. Use this\n// function to check if two contexts are equivalent\nfunc canonicalizeContext(val string) (string, error) {\n\treturn readWriteCon(filepath.Join(getSelinuxMountPoint(), \"context\"), val)\n}\n\n// computeCreateContext requests the type transition from source to target for\n// class from the kernel.\nfunc computeCreateContext(source string, target string, class string) (string, error) {\n\tclassidx, err := classIndex(class)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn readWriteCon(filepath.Join(getSelinuxMountPoint(), \"create\"), fmt.Sprintf(\"%s %s %d\", source, target, classidx))\n}\n\n// catsToBitset stores categories in a bitset.\nfunc catsToBitset(cats string) (*big.Int, error) {\n\tbitset := new(big.Int)\n\n\tcatlist := strings.Split(cats, \",\")\n\tfor _, r := range catlist {\n\t\tranges := strings.SplitN(r, \".\", 2)\n\t\tif len(ranges) > 1 {\n\t\t\tcatstart, err := parseLevelItem(ranges[0], category)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcatend, err := parseLevelItem(ranges[1], category)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tfor i := catstart; i <= catend; i++ {\n\t\t\t\tbitset.SetBit(bitset, i, 1)\n\t\t\t}\n\t\t} else {\n\t\t\tcat, err := parseLevelItem(ranges[0], category)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbitset.SetBit(bitset, cat, 1)\n\t\t}\n\t}\n\n\treturn bitset, nil\n}\n\n// parseLevelItem parses and verifies that a sensitivity or category are valid\nfunc parseLevelItem(s string, sep levelItem) (int, error) {\n\tif len(s) < minSensLen || levelItem(s[0]) != sep {\n\t\treturn 0, ErrLevelSyntax\n\t}\n\tconst bitSize = 31 // Make sure the result fits into signed int32.\n\tval, err := strconv.ParseUint(s[1:], 10, bitSize)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn int(val), nil\n}\n\n// parseLevel fills a level from a string that contains\n// a sensitivity and categories\nfunc (l *level) parseLevel(levelStr string) error {\n\tlvl := strings.SplitN(levelStr, \":\", 2)\n\tsens, err := parseLevelItem(lvl[0], sensitivity)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse sensitivity: %w\", err)\n\t}\n\tl.sens = sens\n\tif len(lvl) > 1 {\n\t\tcats, err := catsToBitset(lvl[1])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to parse categories: %w\", err)\n\t\t}\n\t\tl.cats = cats\n\t}\n\n\treturn nil\n}\n\n// rangeStrToMLSRange marshals a string representation of a range.\nfunc rangeStrToMLSRange(rangeStr string) (*mlsRange, error) {\n\tr := &mlsRange{}\n\tl := strings.SplitN(rangeStr, \"-\", 2)\n\n\tswitch len(l) {\n\t// rangeStr that has a low and a high level, e.g. s4:c0.c1023-s6:c0.c1023\n\tcase 2:\n\t\tr.high = &level{}\n\t\tif err := r.high.parseLevel(l[1]); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse high level %q: %w\", l[1], err)\n\t\t}\n\t\tfallthrough\n\t// rangeStr that is single level, e.g. s6:c0,c3,c5,c30.c1023\n\tcase 1:\n\t\tr.low = &level{}\n\t\tif err := r.low.parseLevel(l[0]); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse low level %q: %w\", l[0], err)\n\t\t}\n\t}\n\n\tif r.high == nil {\n\t\tr.high = r.low\n\t}\n\n\treturn r, nil\n}\n\n// bitsetToStr takes a category bitset and returns it in the\n// canonical selinux syntax\nfunc bitsetToStr(c *big.Int) string {\n\tvar str string\n\n\tlength := 0\n\ti0 := int(c.TrailingZeroBits()) //#nosec G115 -- don't expect TralingZeroBits to return values with highest bit set.\n\tfor i := i0; i < c.BitLen(); i++ {\n\t\tif c.Bit(i) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif length == 0 {\n\t\t\tif str != \"\" {\n\t\t\t\tstr += \",\"\n\t\t\t}\n\t\t\tstr += \"c\" + strconv.Itoa(i)\n\t\t}\n\t\tif c.Bit(i+1) == 1 {\n\t\t\tlength++\n\t\t\tcontinue\n\t\t}\n\t\tif length == 1 {\n\t\t\tstr += \",c\" + strconv.Itoa(i)\n\t\t} else if length > 1 {\n\t\t\tstr += \".c\" + strconv.Itoa(i)\n\t\t}\n\t\tlength = 0\n\t}\n\n\treturn str\n}\n\nfunc (l *level) equal(l2 *level) bool {\n\tif l2 == nil || l == nil {\n\t\treturn l == l2\n\t}\n\tif l2.sens != l.sens {\n\t\treturn false\n\t}\n\tif l2.cats == nil || l.cats == nil {\n\t\treturn l2.cats == l.cats\n\t}\n\treturn l.cats.Cmp(l2.cats) == 0\n}\n\n// String returns an mlsRange as a string.\nfunc (m mlsRange) String() string {\n\tlow := \"s\" + strconv.Itoa(m.low.sens)\n\tif m.low.cats != nil && m.low.cats.BitLen() > 0 {\n\t\tlow += \":\" + bitsetToStr(m.low.cats)\n\t}\n\n\tif m.low.equal(m.high) {\n\t\treturn low\n\t}\n\n\thigh := \"s\" + strconv.Itoa(m.high.sens)\n\tif m.high.cats != nil && m.high.cats.BitLen() > 0 {\n\t\thigh += \":\" + bitsetToStr(m.high.cats)\n\t}\n\n\treturn low + \"-\" + high\n}\n\n// TODO: remove these in favor of built-in min/max\n// once we stop supporting Go < 1.21.\nfunc maxInt(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc minInt(a, b int) int {\n\tif a < b {\n\t\treturn a\n\t}\n\treturn b\n}\n\n// calculateGlbLub computes the glb (greatest lower bound) and lub (least upper bound)\n// of a source and target range.\n// The glblub is calculated as the greater of the low sensitivities and\n// the lower of the high sensitivities and the and of each category bitset.\nfunc calculateGlbLub(sourceRange, targetRange string) (string, error) {\n\ts, err := rangeStrToMLSRange(sourceRange)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tt, err := rangeStrToMLSRange(targetRange)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif s.high.sens < t.low.sens || t.high.sens < s.low.sens {\n\t\t/* these ranges have no common sensitivities */\n\t\treturn \"\", ErrIncomparable\n\t}\n\n\toutrange := &mlsRange{low: &level{}, high: &level{}}\n\n\t/* take the greatest of the low */\n\toutrange.low.sens = maxInt(s.low.sens, t.low.sens)\n\n\t/* take the least of the high */\n\toutrange.high.sens = minInt(s.high.sens, t.high.sens)\n\n\t/* find the intersecting categories */\n\tif s.low.cats != nil && t.low.cats != nil {\n\t\toutrange.low.cats = new(big.Int)\n\t\toutrange.low.cats.And(s.low.cats, t.low.cats)\n\t}\n\tif s.high.cats != nil && t.high.cats != nil {\n\t\toutrange.high.cats = new(big.Int)\n\t\toutrange.high.cats.And(s.high.cats, t.high.cats)\n\t}\n\n\treturn outrange.String(), nil\n}\n\nfunc readWriteCon(fpath string, val string) (string, error) {\n\tif fpath == \"\" {\n\t\treturn \"\", ErrEmptyPath\n\t}\n\tf, err := os.OpenFile(fpath, os.O_RDWR, 0)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer f.Close()\n\n\t_, err = f.Write([]byte(val))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn readConFd(f)\n}\n\n// peerLabel retrieves the label of the client on the other side of a socket\nfunc peerLabel(fd uintptr) (string, error) {\n\tl, err := unix.GetsockoptString(int(fd), unix.SOL_SOCKET, unix.SO_PEERSEC)\n\tif err != nil {\n\t\treturn \"\", &os.PathError{Op: \"getsockopt\", Path: \"fd \" + strconv.Itoa(int(fd)), Err: err}\n\t}\n\treturn l, nil\n}\n\n// setKeyLabel takes a process label and tells the kernel to assign the\n// label to the next kernel keyring that gets created\nfunc setKeyLabel(label string) error {\n\t// Rather than using /proc/thread-self, we want to use /proc/self to\n\t// operate on the thread-group leader.\n\terr := writeConSelf(\"attr/keycreate\", label)\n\tif errors.Is(err, os.ErrNotExist) {\n\t\treturn nil\n\t}\n\tif label == \"\" && errors.Is(err, os.ErrPermission) {\n\t\treturn nil\n\t}\n\tif errors.Is(err, unix.EACCES) && unix.Getpid() != unix.Gettid() {\n\t\treturn ErrNotTGLeader\n\t}\n\treturn err\n}\n\n// KeyLabel retrieves the current kernel keyring label setting for this\n// thread-group.\nfunc keyLabel() (string, error) {\n\t// Rather than using /proc/thread-self, we want to use /proc/self to\n\t// operate on the thread-group leader.\n\treturn readConSelf(\"attr/keycreate\")\n}\n\n// get returns the Context as a string\nfunc (c Context) get() string {\n\tif l := c[\"level\"]; l != \"\" {\n\t\treturn c[\"user\"] + \":\" + c[\"role\"] + \":\" + c[\"type\"] + \":\" + l\n\t}\n\treturn c[\"user\"] + \":\" + c[\"role\"] + \":\" + c[\"type\"]\n}\n\n// newContext creates a new Context struct from the specified label\nfunc newContext(label string) (Context, error) {\n\tc := make(Context)\n\n\tif len(label) != 0 {\n\t\tcon := strings.SplitN(label, \":\", 4)\n\t\tif len(con) < 3 {\n\t\t\treturn c, ErrInvalidLabel\n\t\t}\n\t\tc[\"user\"] = con[0]\n\t\tc[\"role\"] = con[1]\n\t\tc[\"type\"] = con[2]\n\t\tif len(con) > 3 {\n\t\t\tc[\"level\"] = con[3]\n\t\t}\n\t}\n\treturn c, nil\n}\n\n// clearLabels clears all reserved labels\nfunc clearLabels() {\n\tstate.Lock()\n\tstate.mcsList = make(map[string]bool)\n\tstate.Unlock()\n}\n\n// reserveLabel reserves the MLS/MCS level component of the specified label\nfunc reserveLabel(label string) {\n\tif len(label) != 0 {\n\t\tcon := strings.SplitN(label, \":\", 4)\n\t\tif len(con) > 3 {\n\t\t\t_ = mcsAdd(con[3])\n\t\t}\n\t}\n}\n\nfunc selinuxEnforcePath() string {\n\treturn filepath.Join(getSelinuxMountPoint(), \"enforce\")\n}\n\n// isMLSEnabled checks if MLS is enabled.\nfunc isMLSEnabled() bool {\n\tenabledB, err := os.ReadFile(filepath.Join(getSelinuxMountPoint(), \"mls\"))\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn bytes.Equal(enabledB, []byte{'1'})\n}\n\n// enforceMode returns the current SELinux mode Enforcing, Permissive, Disabled\nfunc enforceMode() int {\n\tvar enforce int\n\n\tenforceB, err := os.ReadFile(selinuxEnforcePath())\n\tif err != nil {\n\t\treturn -1\n\t}\n\tenforce, err = strconv.Atoi(string(enforceB))\n\tif err != nil {\n\t\treturn -1\n\t}\n\treturn enforce\n}\n\n// setEnforceMode sets the current SELinux mode Enforcing, Permissive.\n// Disabled is not valid, since this needs to be set at boot time.\nfunc setEnforceMode(mode int) error {\n\treturn os.WriteFile(selinuxEnforcePath(), []byte(strconv.Itoa(mode)), 0)\n}\n\n// defaultEnforceMode returns the systems default SELinux mode Enforcing,\n// Permissive or Disabled. Note this is just the default at boot time.\n// EnforceMode tells you the systems current mode.\nfunc defaultEnforceMode() int {\n\tswitch readConfig(selinuxTag) {\n\tcase \"enforcing\":\n\t\treturn Enforcing\n\tcase \"permissive\":\n\t\treturn Permissive\n\t}\n\treturn Disabled\n}\n\nfunc mcsAdd(mcs string) error {\n\tif mcs == \"\" {\n\t\treturn nil\n\t}\n\tstate.Lock()\n\tdefer state.Unlock()\n\tif state.mcsList[mcs] {\n\t\treturn ErrMCSAlreadyExists\n\t}\n\tstate.mcsList[mcs] = true\n\treturn nil\n}\n\nfunc mcsDelete(mcs string) {\n\tif mcs == \"\" {\n\t\treturn\n\t}\n\tstate.Lock()\n\tdefer state.Unlock()\n\tstate.mcsList[mcs] = false\n}\n\nfunc intToMcs(id int, catRange uint32) string {\n\tvar (\n\t\tSETSIZE = int(catRange)\n\t\tTIER    = SETSIZE\n\t\tORD     = id\n\t)\n\n\tif id < 1 || id > 523776 {\n\t\treturn \"\"\n\t}\n\n\tfor ORD > TIER {\n\t\tORD -= TIER\n\t\tTIER--\n\t}\n\tTIER = SETSIZE - TIER\n\tORD += TIER\n\treturn fmt.Sprintf(\"s0:c%d,c%d\", TIER, ORD)\n}\n\nfunc uniqMcs(catRange uint32) string {\n\tvar (\n\t\tn      uint32\n\t\tc1, c2 uint32\n\t\tmcs    string\n\t)\n\n\tfor {\n\t\t_ = binary.Read(rand.Reader, binary.LittleEndian, &n)\n\t\tc1 = n % catRange\n\t\t_ = binary.Read(rand.Reader, binary.LittleEndian, &n)\n\t\tc2 = n % catRange\n\t\tif c1 == c2 {\n\t\t\tcontinue\n\t\t} else if c1 > c2 {\n\t\t\tc1, c2 = c2, c1\n\t\t}\n\t\tmcs = fmt.Sprintf(\"s0:c%d,c%d\", c1, c2)\n\t\tif err := mcsAdd(mcs); err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\treturn mcs\n}\n\n// releaseLabel un-reserves the MLS/MCS Level field of the specified label,\n// allowing it to be used by another process.\nfunc releaseLabel(label string) {\n\tif len(label) != 0 {\n\t\tcon := strings.SplitN(label, \":\", 4)\n\t\tif len(con) > 3 {\n\t\t\tmcsDelete(con[3])\n\t\t}\n\t}\n}\n\n// roFileLabel returns the specified SELinux readonly file label\nfunc roFileLabel() string {\n\treturn readOnlyFileLabel\n}\n\nfunc openContextFile() (*os.File, error) {\n\tif f, err := os.Open(contextFile); err == nil {\n\t\treturn f, nil\n\t}\n\treturn os.Open(filepath.Join(policyRoot(), \"contexts\", \"lxc_contexts\"))\n}\n\nfunc loadLabels() {\n\tlabels = make(map[string]string)\n\tin, err := openContextFile()\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer in.Close()\n\n\tscanner := bufio.NewScanner(in)\n\n\tfor scanner.Scan() {\n\t\tline := bytes.TrimSpace(scanner.Bytes())\n\t\tif len(line) == 0 {\n\t\t\t// Skip blank lines\n\t\t\tcontinue\n\t\t}\n\t\tif line[0] == ';' || line[0] == '#' {\n\t\t\t// Skip comments\n\t\t\tcontinue\n\t\t}\n\t\tfields := bytes.SplitN(line, []byte{'='}, 2)\n\t\tif len(fields) != 2 {\n\t\t\tcontinue\n\t\t}\n\t\tkey, val := bytes.TrimSpace(fields[0]), bytes.TrimSpace(fields[1])\n\t\tlabels[string(key)] = string(bytes.Trim(val, `\"`))\n\t}\n\n\tcon, _ := NewContext(labels[\"file\"])\n\tcon[\"level\"] = fmt.Sprintf(\"s0:c%d,c%d\", maxCategory-2, maxCategory-1)\n\tprivContainerMountLabel = con.get()\n\treserveLabel(privContainerMountLabel)\n}\n\nfunc label(key string) string {\n\tloadLabelsOnce.Do(func() {\n\t\tloadLabels()\n\t})\n\treturn labels[key]\n}\n\n// kvmContainerLabels returns the default processLabel and mountLabel to be used\n// for kvm containers by the calling process.\nfunc kvmContainerLabels() (string, string) {\n\tprocessLabel := label(\"kvm_process\")\n\tif processLabel == \"\" {\n\t\tprocessLabel = label(\"process\")\n\t}\n\n\treturn addMcs(processLabel, label(\"file\"))\n}\n\n// initContainerLabels returns the default processLabel and file labels to be\n// used for containers running an init system like systemd by the calling process.\nfunc initContainerLabels() (string, string) {\n\tprocessLabel := label(\"init_process\")\n\tif processLabel == \"\" {\n\t\tprocessLabel = label(\"process\")\n\t}\n\n\treturn addMcs(processLabel, label(\"file\"))\n}\n\n// containerLabels returns an allocated processLabel and fileLabel to be used for\n// container labeling by the calling process.\nfunc containerLabels() (processLabel string, fileLabel string) {\n\tif !getEnabled() {\n\t\treturn \"\", \"\"\n\t}\n\n\tprocessLabel = label(\"process\")\n\tfileLabel = label(\"file\")\n\treadOnlyFileLabel = label(\"ro_file\")\n\n\tif processLabel == \"\" || fileLabel == \"\" {\n\t\treturn \"\", fileLabel\n\t}\n\n\tif readOnlyFileLabel == \"\" {\n\t\treadOnlyFileLabel = fileLabel\n\t}\n\n\treturn addMcs(processLabel, fileLabel)\n}\n\nfunc addMcs(processLabel, fileLabel string) (string, string) {\n\tscon, _ := NewContext(processLabel)\n\tif scon[\"level\"] != \"\" {\n\t\tmcs := uniqMcs(CategoryRange)\n\t\tscon[\"level\"] = mcs\n\t\tprocessLabel = scon.Get()\n\t\tscon, _ = NewContext(fileLabel)\n\t\tscon[\"level\"] = mcs\n\t\tfileLabel = scon.Get()\n\t}\n\treturn processLabel, fileLabel\n}\n\n// securityCheckContext validates that the SELinux label is understood by the kernel\nfunc securityCheckContext(val string) error {\n\treturn os.WriteFile(filepath.Join(getSelinuxMountPoint(), \"context\"), []byte(val), 0)\n}\n\n// copyLevel returns a label with the MLS/MCS level from src label replaced on\n// the dest label.\nfunc copyLevel(src, dest string) (string, error) {\n\tif src == \"\" {\n\t\treturn \"\", nil\n\t}\n\tif err := SecurityCheckContext(src); err != nil {\n\t\treturn \"\", err\n\t}\n\tif err := SecurityCheckContext(dest); err != nil {\n\t\treturn \"\", err\n\t}\n\tscon, err := NewContext(src)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttcon, err := NewContext(dest)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tmcsDelete(tcon[\"level\"])\n\t_ = mcsAdd(scon[\"level\"])\n\ttcon[\"level\"] = scon[\"level\"]\n\treturn tcon.Get(), nil\n}\n\n// chcon changes the fpath file object to the SELinux label.\n// If fpath is a directory and recurse is true, then chcon walks the\n// directory tree setting the label.\nfunc chcon(fpath string, label string, recurse bool) error {\n\tif fpath == \"\" {\n\t\treturn ErrEmptyPath\n\t}\n\tif label == \"\" {\n\t\treturn nil\n\t}\n\n\texcludePaths := map[string]bool{\n\t\t\"/\":           true,\n\t\t\"/bin\":        true,\n\t\t\"/boot\":       true,\n\t\t\"/dev\":        true,\n\t\t\"/etc\":        true,\n\t\t\"/etc/passwd\": true,\n\t\t\"/etc/pki\":    true,\n\t\t\"/etc/shadow\": true,\n\t\t\"/home\":       true,\n\t\t\"/lib\":        true,\n\t\t\"/lib64\":      true,\n\t\t\"/media\":      true,\n\t\t\"/opt\":        true,\n\t\t\"/proc\":       true,\n\t\t\"/root\":       true,\n\t\t\"/run\":        true,\n\t\t\"/sbin\":       true,\n\t\t\"/srv\":        true,\n\t\t\"/sys\":        true,\n\t\t\"/tmp\":        true,\n\t\t\"/usr\":        true,\n\t\t\"/var\":        true,\n\t\t\"/var/lib\":    true,\n\t\t\"/var/log\":    true,\n\t}\n\n\tif home := os.Getenv(\"HOME\"); home != \"\" {\n\t\texcludePaths[home] = true\n\t}\n\n\tif sudoUser := os.Getenv(\"SUDO_USER\"); sudoUser != \"\" {\n\t\tif usr, err := user.Lookup(sudoUser); err == nil {\n\t\t\texcludePaths[usr.HomeDir] = true\n\t\t}\n\t}\n\n\tif fpath != \"/\" {\n\t\tfpath = strings.TrimSuffix(fpath, \"/\")\n\t}\n\tif excludePaths[fpath] {\n\t\treturn fmt.Errorf(\"SELinux relabeling of %s is not allowed\", fpath)\n\t}\n\n\tif !recurse {\n\t\terr := lSetFileLabel(fpath, label)\n\t\tif err != nil {\n\t\t\t// Check if file doesn't exist, must have been removed\n\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t// Check if current label is correct on disk\n\t\t\tflabel, nerr := lFileLabel(fpath)\n\t\t\tif nerr == nil && flabel == label {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t// Check if file doesn't exist, must have been removed\n\t\t\tif errors.Is(nerr, os.ErrNotExist) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n\n\treturn rchcon(fpath, label)\n}\n\nfunc rchcon(fpath, label string) error { //revive:disable:cognitive-complexity\n\tfastMode := false\n\t// If the current label matches the new label, assume\n\t// other labels are correct.\n\tif cLabel, err := lFileLabel(fpath); err == nil && cLabel == label {\n\t\tfastMode = true\n\t}\n\treturn pwalkdir.Walk(fpath, func(p string, _ fs.DirEntry, _ error) error {\n\t\tif fastMode {\n\t\t\tif cLabel, err := lFileLabel(p); err == nil && cLabel == label {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\terr := lSetFileLabel(p, label)\n\t\t// Walk a file tree can race with removal, so ignore ENOENT.\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t})\n}\n\n// dupSecOpt takes an SELinux process label and returns security options that\n// can be used to set the SELinux Type and Level for future container processes.\nfunc dupSecOpt(src string) ([]string, error) {\n\tif src == \"\" {\n\t\treturn nil, nil\n\t}\n\tcon, err := NewContext(src)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif con[\"user\"] == \"\" ||\n\t\tcon[\"role\"] == \"\" ||\n\t\tcon[\"type\"] == \"\" {\n\t\treturn nil, nil\n\t}\n\tdup := []string{\n\t\t\"user:\" + con[\"user\"],\n\t\t\"role:\" + con[\"role\"],\n\t\t\"type:\" + con[\"type\"],\n\t}\n\n\tif con[\"level\"] != \"\" {\n\t\tdup = append(dup, \"level:\"+con[\"level\"])\n\t}\n\n\treturn dup, nil\n}\n\n// findUserInContext scans the reader for a valid SELinux context\n// match that is verified with the verifier. Invalid contexts are\n// skipped. It returns a matched context or an empty string if no\n// match is found. If a scanner error occurs, it is returned.\nfunc findUserInContext(context Context, r io.Reader, verifier func(string) error) (string, error) {\n\tfromRole := context[\"role\"]\n\tfromType := context[\"type\"]\n\tscanner := bufio.NewScanner(r)\n\n\tfor scanner.Scan() {\n\t\tfromConns := strings.Fields(scanner.Text())\n\t\tif len(fromConns) == 0 {\n\t\t\t// Skip blank lines\n\t\t\tcontinue\n\t\t}\n\n\t\tline := fromConns[0]\n\n\t\tif line[0] == ';' || line[0] == '#' {\n\t\t\t// Skip comments\n\t\t\tcontinue\n\t\t}\n\n\t\t// user context files contexts are formatted as\n\t\t// role_r:type_t:s0 where the user is missing.\n\t\tlineArr := strings.SplitN(line, \":\", 4)\n\t\t// skip context with typo, or role and type do not match\n\t\tif len(lineArr) != 3 ||\n\t\t\tlineArr[0] != fromRole ||\n\t\t\tlineArr[1] != fromType {\n\t\t\tcontinue\n\t\t}\n\n\t\tfor _, cc := range fromConns[1:] {\n\t\t\ttoConns := strings.SplitN(cc, \":\", 4)\n\t\t\tif len(toConns) != 3 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tcontext[\"role\"] = toConns[0]\n\t\t\tcontext[\"type\"] = toConns[1]\n\n\t\t\toutConn := context.get()\n\t\t\tif err := verifier(outConn); err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\treturn outConn, nil\n\t\t}\n\t}\n\tif err := scanner.Err(); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to scan for context: %w\", err)\n\t}\n\n\treturn \"\", nil\n}\n\nfunc getDefaultContextFromReaders(c *defaultSECtx) (string, error) {\n\tif c.verifier == nil {\n\t\treturn \"\", ErrVerifierNil\n\t}\n\n\tcontext, err := newContext(c.scon)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create label for %s: %w\", c.scon, err)\n\t}\n\n\t// set so the verifier validates the matched context with the provided user and level.\n\tcontext[\"user\"] = c.user\n\tcontext[\"level\"] = c.level\n\n\tconn, err := findUserInContext(context, c.userRdr, c.verifier)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif conn != \"\" {\n\t\treturn conn, nil\n\t}\n\n\tconn, err = findUserInContext(context, c.defaultRdr, c.verifier)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif conn != \"\" {\n\t\treturn conn, nil\n\t}\n\n\treturn \"\", fmt.Errorf(\"context %q not found: %w\", c.scon, ErrContextMissing)\n}\n\nfunc getDefaultContextWithLevel(user, level, scon string) (string, error) {\n\tuserPath := filepath.Join(policyRoot(), selinuxUsersDir, user)\n\tfu, err := os.Open(userPath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer fu.Close()\n\n\tdefaultPath := filepath.Join(policyRoot(), defaultContexts)\n\tfd, err := os.Open(defaultPath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer fd.Close()\n\n\tc := defaultSECtx{\n\t\tuser:       user,\n\t\tlevel:      level,\n\t\tscon:       scon,\n\t\tuserRdr:    fu,\n\t\tdefaultRdr: fd,\n\t\tverifier:   securityCheckContext,\n\t}\n\n\treturn getDefaultContextFromReaders(&c)\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go",
    "content": "//go:build !linux\n// +build !linux\n\npackage selinux\n\nfunc readConThreadSelf(string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc writeConThreadSelf(string, string) error {\n\treturn nil\n}\n\nfunc setDisabled() {}\n\nfunc getEnabled() bool {\n\treturn false\n}\n\nfunc classIndex(string) (int, error) {\n\treturn -1, nil\n}\n\nfunc setFileLabel(string, string) error {\n\treturn nil\n}\n\nfunc lSetFileLabel(string, string) error {\n\treturn nil\n}\n\nfunc fileLabel(string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc lFileLabel(string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc setFSCreateLabel(string) error {\n\treturn nil\n}\n\nfunc fsCreateLabel() (string, error) {\n\treturn \"\", nil\n}\n\nfunc currentLabel() (string, error) {\n\treturn \"\", nil\n}\n\nfunc pidLabel(int) (string, error) {\n\treturn \"\", nil\n}\n\nfunc execLabel() (string, error) {\n\treturn \"\", nil\n}\n\nfunc canonicalizeContext(string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc computeCreateContext(string, string, string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc calculateGlbLub(string, string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc peerLabel(uintptr) (string, error) {\n\treturn \"\", nil\n}\n\nfunc setKeyLabel(string) error {\n\treturn nil\n}\n\nfunc keyLabel() (string, error) {\n\treturn \"\", nil\n}\n\nfunc (c Context) get() string {\n\treturn \"\"\n}\n\nfunc newContext(string) (Context, error) {\n\treturn Context{}, nil\n}\n\nfunc clearLabels() {\n}\n\nfunc reserveLabel(string) {\n}\n\nfunc isMLSEnabled() bool {\n\treturn false\n}\n\nfunc enforceMode() int {\n\treturn Disabled\n}\n\nfunc setEnforceMode(int) error {\n\treturn nil\n}\n\nfunc defaultEnforceMode() int {\n\treturn Disabled\n}\n\nfunc releaseLabel(string) {\n}\n\nfunc roFileLabel() string {\n\treturn \"\"\n}\n\nfunc kvmContainerLabels() (string, string) {\n\treturn \"\", \"\"\n}\n\nfunc initContainerLabels() (string, string) {\n\treturn \"\", \"\"\n}\n\nfunc containerLabels() (string, string) {\n\treturn \"\", \"\"\n}\n\nfunc securityCheckContext(string) error {\n\treturn nil\n}\n\nfunc copyLevel(string, string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc chcon(string, string, bool) error {\n\treturn nil\n}\n\nfunc dupSecOpt(string) ([]string, error) {\n\treturn nil, nil\n}\n\nfunc getDefaultContextWithLevel(string, string, string) (string, error) {\n\treturn \"\", nil\n}\n\nfunc label(_ string) string {\n\treturn \"\"\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/go-selinux/xattrs_linux.go",
    "content": "package selinux\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\n// lgetxattr returns a []byte slice containing the value of\n// an extended attribute attr set for path.\nfunc lgetxattr(path, attr string) ([]byte, error) {\n\t// Start with a 128 length byte array\n\tdest := make([]byte, 128)\n\tsz, errno := doLgetxattr(path, attr, dest)\n\tfor errno == unix.ERANGE { //nolint:errorlint // unix errors are bare\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = doLgetxattr(path, attr, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, errno\n\t\t}\n\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = doLgetxattr(path, attr, dest)\n\t}\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\n\treturn dest[:sz], nil\n}\n\n// doLgetxattr is a wrapper that retries on EINTR\nfunc doLgetxattr(path, attr string, dest []byte) (int, error) {\n\tfor {\n\t\tsz, err := unix.Lgetxattr(path, attr, dest)\n\t\tif err != unix.EINTR {\n\t\t\treturn sz, err\n\t\t}\n\t}\n}\n\n// getxattr returns a []byte slice containing the value of\n// an extended attribute attr set for path.\nfunc getxattr(path, attr string) ([]byte, error) {\n\t// Start with a 128 length byte array\n\tdest := make([]byte, 128)\n\tsz, errno := dogetxattr(path, attr, dest)\n\tfor errno == unix.ERANGE { //nolint:errorlint // unix errors are bare\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = dogetxattr(path, attr, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, errno\n\t\t}\n\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = dogetxattr(path, attr, dest)\n\t}\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\n\treturn dest[:sz], nil\n}\n\n// dogetxattr is a wrapper that retries on EINTR\nfunc dogetxattr(path, attr string, dest []byte) (int, error) {\n\tfor {\n\t\tsz, err := unix.Getxattr(path, attr, dest)\n\t\tif err != unix.EINTR {\n\t\t\treturn sz, err\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/pkg/pwalkdir/README.md",
    "content": "## pwalkdir: parallel implementation of filepath.WalkDir\n\nThis is a wrapper for [filepath.WalkDir](https://pkg.go.dev/path/filepath#WalkDir)\nwhich may speed it up by calling multiple callback functions (WalkDirFunc)\nin parallel, utilizing goroutines.\n\nBy default, it utilizes 2\\*runtime.NumCPU() goroutines for callbacks.\nThis can be changed by using WalkN function which has the additional\nparameter, specifying the number of goroutines (concurrency).\n\n### pwalk vs pwalkdir\n\nThis package is very similar to\n[pwalk](https://pkg.go.dev/github.com/opencontainers/selinux/pkg/pwalkdir),\nbut utilizes `filepath.WalkDir` (added to Go 1.16), which does not call stat(2)\non every entry and is therefore faster (up to 3x, depending on usage scenario).\n\nUsers who are OK with requiring Go 1.16+ should switch to this\nimplementation.\n\n### Caveats\n\nPlease note the following limitations of this code:\n\n* Unlike filepath.WalkDir, the order of calls is non-deterministic;\n\n* Only primitive error handling is supported:\n\n  * fs.SkipDir is not supported;\n\n  * ErrNotExist errors from filepath.WalkDir are silently ignored for any path\n    except the top directory (WalkDir argument); any other error is returned to\n    the caller of WalkDir;\n\n  * once any error is returned from any walkDirFunc instance, no more calls\n    to WalkDirFunc are made, and the error is returned to the caller of WalkDir;\n\n  * if more than one WalkDirFunc instance will return an error, only one\n    of such errors will be propagated to and returned by WalkDir, others\n    will be silently discarded.\n\n### Documentation\n\nFor the official documentation, see\nhttps://pkg.go.dev/github.com/opencontainers/selinux/pkg/pwalkdir\n\n### Benchmarks\n\nFor a WalkDirFunc that consists solely of the return statement, this\nimplementation is about 15% slower than the standard library's\nfilepath.WalkDir.\n\nOtherwise (if a WalkDirFunc is actually doing something) this is usually\nfaster, except when the WalkDirN(..., 1) is used. Run `go test -bench .`\nto see how different operations can benefit from it, as well as how the\nlevel of parallelism affects the speed.\n"
  },
  {
    "path": "vendor/github.com/opencontainers/selinux/pkg/pwalkdir/pwalkdir.go",
    "content": "//go:build go1.16\n// +build go1.16\n\npackage pwalkdir\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"sync\"\n)\n\n// Walk is a wrapper for filepath.WalkDir which can call multiple walkFn\n// in parallel, allowing to handle each item concurrently. A maximum of\n// twice the runtime.NumCPU() walkFn will be called at any one time.\n// If you want to change the maximum, use WalkN instead.\n//\n// The order of calls is non-deterministic.\n//\n// Note that this implementation only supports primitive error handling:\n//\n// - no errors are ever passed to walkFn;\n//\n// - once a walkFn returns any error, all further processing stops\n// and the error is returned to the caller of Walk;\n//\n// - filepath.SkipDir is not supported;\n//\n// - if more than one walkFn instance will return an error, only one\n// of such errors will be propagated and returned by Walk, others\n// will be silently discarded.\nfunc Walk(root string, walkFn fs.WalkDirFunc) error {\n\treturn WalkN(root, walkFn, runtime.NumCPU()*2)\n}\n\n// WalkN is a wrapper for filepath.WalkDir which can call multiple walkFn\n// in parallel, allowing to handle each item concurrently. A maximum of\n// num walkFn will be called at any one time.\n//\n// Please see Walk documentation for caveats of using this function.\nfunc WalkN(root string, walkFn fs.WalkDirFunc, num int) error {\n\t// make sure limit is sensible\n\tif num < 1 {\n\t\treturn fmt.Errorf(\"walk(%q): num must be > 0\", root)\n\t}\n\n\tfiles := make(chan *walkArgs, 2*num)\n\terrCh := make(chan error, 1) // Get the first error, ignore others.\n\n\t// Start walking a tree asap.\n\tvar (\n\t\terr error\n\t\twg  sync.WaitGroup\n\n\t\trootLen   = len(root)\n\t\trootEntry *walkArgs\n\t)\n\twg.Add(1)\n\tgo func() {\n\t\terr = filepath.WalkDir(root, func(p string, entry fs.DirEntry, err error) error {\n\t\t\tif err != nil {\n\t\t\t\t// Walking a file tree can race with removal,\n\t\t\t\t// so ignore ENOENT, except for root.\n\t\t\t\t// https://github.com/opencontainers/selinux/issues/199.\n\t\t\t\tif errors.Is(err, fs.ErrNotExist) && len(p) != rootLen {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tclose(files)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif len(p) == rootLen {\n\t\t\t\t// Root entry is processed separately below.\n\t\t\t\trootEntry = &walkArgs{path: p, entry: entry}\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t// Add a file to the queue unless a callback sent an error.\n\t\t\tselect {\n\t\t\tcase e := <-errCh:\n\t\t\t\tclose(files)\n\t\t\t\treturn e\n\t\t\tdefault:\n\t\t\t\tfiles <- &walkArgs{path: p, entry: entry}\n\t\t\t\treturn nil\n\t\t\t}\n\t\t})\n\t\tif err == nil {\n\t\t\tclose(files)\n\t\t}\n\t\twg.Done()\n\t}()\n\n\twg.Add(num)\n\tfor i := 0; i < num; i++ {\n\t\tgo func() {\n\t\t\tfor file := range files {\n\t\t\t\tif e := walkFn(file.path, file.entry, nil); e != nil {\n\t\t\t\t\tselect {\n\t\t\t\t\tcase errCh <- e: // sent ok\n\t\t\t\t\tdefault: // buffer full\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twg.Done()\n\t\t}()\n\t}\n\n\twg.Wait()\n\n\tif err == nil {\n\t\terr = walkFn(rootEntry.path, rootEntry.entry, nil)\n\t}\n\n\treturn err\n}\n\n// walkArgs holds the arguments that were passed to the Walk or WalkN\n// functions.\ntype walkArgs struct {\n\tentry fs.DirEntry\n\tpath  string\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/LICENSE",
    "content": "Copyright (c) 2014, Dave Cheney <dave@cheney.net>\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are 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,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/README.md",
    "content": "\n# browser\n    import \"github.com/pkg/browser\"\n\nPackage browser provides helpers to open files, readers, and urls in a browser window.\n\nThe choice of which browser is started is entirely client dependant.\n\n\n\n\n\n## Variables\n``` go\nvar Stderr io.Writer = os.Stderr\n```\nStderr is the io.Writer to which executed commands write standard error.\n\n``` go\nvar Stdout io.Writer = os.Stdout\n```\nStdout is the io.Writer to which executed commands write standard output.\n\n\n## func OpenFile\n``` go\nfunc OpenFile(path string) error\n```\nOpenFile opens new browser window for the file path.\n\n\n## func OpenReader\n``` go\nfunc OpenReader(r io.Reader) error\n```\nOpenReader consumes the contents of r and presents the\nresults in a new browser window.\n\n\n## func OpenURL\n``` go\nfunc OpenURL(url string) error\n```\nOpenURL opens a new browser window pointing to url.\n\n\n\n\n\n\n\n\n\n- - -\nGenerated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser.go",
    "content": "// Package browser provides helpers to open files, readers, and urls in a browser window.\n//\n// The choice of which browser is started is entirely client dependant.\npackage browser\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\n// Stdout is the io.Writer to which executed commands write standard output.\nvar Stdout io.Writer = os.Stdout\n\n// Stderr is the io.Writer to which executed commands write standard error.\nvar Stderr io.Writer = os.Stderr\n\n// OpenFile opens new browser window for the file path.\nfunc OpenFile(path string) error {\n\tpath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn OpenURL(\"file://\" + path)\n}\n\n// OpenReader consumes the contents of r and presents the\n// results in a new browser window.\nfunc OpenReader(r io.Reader) error {\n\tf, err := ioutil.TempFile(\"\", \"browser.*.html\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"browser: could not create temporary file: %v\", err)\n\t}\n\tif _, err := io.Copy(f, r); err != nil {\n\t\tf.Close()\n\t\treturn fmt.Errorf(\"browser: caching temporary file failed: %v\", err)\n\t}\n\tif err := f.Close(); err != nil {\n\t\treturn fmt.Errorf(\"browser: caching temporary file failed: %v\", err)\n\t}\n\treturn OpenFile(f.Name())\n}\n\n// OpenURL opens a new browser window pointing to url.\nfunc OpenURL(url string) error {\n\treturn openBrowser(url)\n}\n\nfunc runCmd(prog string, args ...string) error {\n\tcmd := exec.Command(prog, args...)\n\tcmd.Stdout = Stdout\n\tcmd.Stderr = Stderr\n\treturn cmd.Run()\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_darwin.go",
    "content": "package browser\n\nfunc openBrowser(url string) error {\n\treturn runCmd(\"open\", url)\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_freebsd.go",
    "content": "package browser\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n)\n\nfunc openBrowser(url string) error {\n\terr := runCmd(\"xdg-open\", url)\n\tif e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {\n\t\treturn errors.New(\"xdg-open: command not found - install xdg-utils from ports(8)\")\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_linux.go",
    "content": "package browser\n\nimport (\n\t\"os/exec\"\n\t\"strings\"\n)\n\nfunc openBrowser(url string) error {\n\tproviders := []string{\"xdg-open\", \"x-www-browser\", \"www-browser\"}\n\n\t// There are multiple possible providers to open a browser on linux\n\t// One of them is xdg-open, another is x-www-browser, then there's www-browser, etc.\n\t// Look for one that exists and run it\n\tfor _, provider := range providers {\n\t\tif _, err := exec.LookPath(provider); err == nil {\n\t\t\treturn runCmd(provider, url)\n\t\t}\n\t}\n\n\treturn &exec.Error{Name: strings.Join(providers, \",\"), Err: exec.ErrNotFound}\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_netbsd.go",
    "content": "package browser\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n)\n\nfunc openBrowser(url string) error {\n\terr := runCmd(\"xdg-open\", url)\n\tif e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {\n\t\treturn errors.New(\"xdg-open: command not found - install xdg-utils from pkgsrc(7)\")\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_openbsd.go",
    "content": "package browser\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n)\n\nfunc openBrowser(url string) error {\n\terr := runCmd(\"xdg-open\", url)\n\tif e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {\n\t\treturn errors.New(\"xdg-open: command not found - install xdg-utils from ports(8)\")\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_unsupported.go",
    "content": "// +build !linux,!windows,!darwin,!openbsd,!freebsd,!netbsd\n\npackage browser\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n)\n\nfunc openBrowser(url string) error {\n\treturn fmt.Errorf(\"openBrowser: unsupported operating system: %v\", runtime.GOOS)\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/browser/browser_windows.go",
    "content": "package browser\n\nimport \"golang.org/x/sys/windows\"\n\nfunc openBrowser(url string) error {\n\treturn windows.ShellExecute(0, nil, windows.StringToUTF16Ptr(url), nil, nil, windows.SW_SHOWNORMAL)\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/.gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\n*.test\n*.prof\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/.travis.yml",
    "content": "language: go\ngo_import_path: github.com/pkg/errors\ngo:\n  - 1.11.x\n  - 1.12.x\n  - 1.13.x\n  - tip\n\nscript:\n  - make check\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/LICENSE",
    "content": "Copyright (c) 2015, Dave Cheney <dave@cheney.net>\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are 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,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/Makefile",
    "content": "PKGS := github.com/pkg/errors\nSRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS))\nGO := go\n\ncheck: test vet gofmt misspell unconvert staticcheck ineffassign unparam\n\ntest: \n\t$(GO) test $(PKGS)\n\nvet: | test\n\t$(GO) vet $(PKGS)\n\nstaticcheck:\n\t$(GO) get honnef.co/go/tools/cmd/staticcheck\n\tstaticcheck -checks all $(PKGS)\n\nmisspell:\n\t$(GO) get github.com/client9/misspell/cmd/misspell\n\tmisspell \\\n\t\t-locale GB \\\n\t\t-error \\\n\t\t*.md *.go\n\nunconvert:\n\t$(GO) get github.com/mdempsky/unconvert\n\tunconvert -v $(PKGS)\n\nineffassign:\n\t$(GO) get github.com/gordonklaus/ineffassign\n\tfind $(SRCDIRS) -name '*.go' | xargs ineffassign\n\npedantic: check errcheck\n\nunparam:\n\t$(GO) get mvdan.cc/unparam\n\tunparam ./...\n\nerrcheck:\n\t$(GO) get github.com/kisielk/errcheck\n\terrcheck $(PKGS)\n\ngofmt:  \n\t@echo Checking code is gofmted\n\t@test -z \"$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)\"\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/README.md",
    "content": "# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge)\n\nPackage errors provides simple error handling primitives.\n\n`go get github.com/pkg/errors`\n\nThe traditional error handling idiom in Go is roughly akin to\n```go\nif err != nil {\n        return err\n}\n```\nwhich applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error.\n\n## Adding context to an error\n\nThe errors.Wrap function returns a new error that adds context to the original error. For example\n```go\n_, err := ioutil.ReadAll(r)\nif err != nil {\n        return errors.Wrap(err, \"read failed\")\n}\n```\n## Retrieving the cause of an error\n\nUsing `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.\n```go\ntype causer interface {\n        Cause() error\n}\n```\n`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example:\n```go\nswitch err := errors.Cause(err).(type) {\ncase *MyError:\n        // handle specifically\ndefault:\n        // unknown error\n}\n```\n\n[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors).\n\n## Roadmap\n\nWith the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows:\n\n- 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible)\n- 1.0. Final release.\n\n## Contributing\n\nBecause of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports. \n\nBefore sending a PR, please discuss your change by raising an issue.\n\n## License\n\nBSD-2-Clause\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/appveyor.yml",
    "content": "version: build-{build}.{branch}\n\nclone_folder: C:\\gopath\\src\\github.com\\pkg\\errors\nshallow_clone: true # for startup speed\n\nenvironment:\n  GOPATH: C:\\gopath\n\nplatform:\n  - x64\n\n# http://www.appveyor.com/docs/installed-software\ninstall:\n  # some helpful output for debugging builds\n  - go version\n  - go env\n  # pre-installed MinGW at C:\\MinGW is 32bit only\n  # but MSYS2 at C:\\msys64 has mingw64\n  - set PATH=C:\\msys64\\mingw64\\bin;%PATH%\n  - gcc --version\n  - g++ --version\n\nbuild_script:\n  - go install -v ./...\n\ntest_script:\n  - set PATH=C:\\gopath\\bin;%PATH%\n  - go test -v ./...\n\n#artifacts:\n#  - path: '%GOPATH%\\bin\\*.exe'\ndeploy: off\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/errors.go",
    "content": "// Package errors provides simple error handling primitives.\n//\n// The traditional error handling idiom in Go is roughly akin to\n//\n//     if err != nil {\n//             return err\n//     }\n//\n// which when applied recursively up the call stack results in error reports\n// without context or debugging information. The errors package allows\n// programmers to add context to the failure path in their code in a way\n// that does not destroy the original value of the error.\n//\n// Adding context to an error\n//\n// The errors.Wrap function returns a new error that adds context to the\n// original error by recording a stack trace at the point Wrap is called,\n// together with the supplied message. For example\n//\n//     _, err := ioutil.ReadAll(r)\n//     if err != nil {\n//             return errors.Wrap(err, \"read failed\")\n//     }\n//\n// If additional control is required, the errors.WithStack and\n// errors.WithMessage functions destructure errors.Wrap into its component\n// operations: annotating an error with a stack trace and with a message,\n// respectively.\n//\n// Retrieving the cause of an error\n//\n// Using errors.Wrap constructs a stack of errors, adding context to the\n// preceding error. Depending on the nature of the error it may be necessary\n// to reverse the operation of errors.Wrap to retrieve the original error\n// for inspection. Any error value which implements this interface\n//\n//     type causer interface {\n//             Cause() error\n//     }\n//\n// can be inspected by errors.Cause. errors.Cause will recursively retrieve\n// the topmost error that does not implement causer, which is assumed to be\n// the original cause. For example:\n//\n//     switch err := errors.Cause(err).(type) {\n//     case *MyError:\n//             // handle specifically\n//     default:\n//             // unknown error\n//     }\n//\n// Although the causer interface is not exported by this package, it is\n// considered a part of its stable public interface.\n//\n// Formatted printing of errors\n//\n// All error values returned from this package implement fmt.Formatter and can\n// be formatted by the fmt package. The following verbs are supported:\n//\n//     %s    print the error. If the error has a Cause it will be\n//           printed recursively.\n//     %v    see %s\n//     %+v   extended format. Each Frame of the error's StackTrace will\n//           be printed in detail.\n//\n// Retrieving the stack trace of an error or wrapper\n//\n// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are\n// invoked. This information can be retrieved with the following interface:\n//\n//     type stackTracer interface {\n//             StackTrace() errors.StackTrace\n//     }\n//\n// The returned errors.StackTrace type is defined as\n//\n//     type StackTrace []Frame\n//\n// The Frame type represents a call site in the stack trace. Frame supports\n// the fmt.Formatter interface that can be used for printing information about\n// the stack trace of this error. For example:\n//\n//     if err, ok := err.(stackTracer); ok {\n//             for _, f := range err.StackTrace() {\n//                     fmt.Printf(\"%+s:%d\\n\", f, f)\n//             }\n//     }\n//\n// Although the stackTracer interface is not exported by this package, it is\n// considered a part of its stable public interface.\n//\n// See the documentation for Frame.Format for more details.\npackage errors\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// New returns an error with the supplied message.\n// New also records the stack trace at the point it was called.\nfunc New(message string) error {\n\treturn &fundamental{\n\t\tmsg:   message,\n\t\tstack: callers(),\n\t}\n}\n\n// Errorf formats according to a format specifier and returns the string\n// as a value that satisfies error.\n// Errorf also records the stack trace at the point it was called.\nfunc Errorf(format string, args ...interface{}) error {\n\treturn &fundamental{\n\t\tmsg:   fmt.Sprintf(format, args...),\n\t\tstack: callers(),\n\t}\n}\n\n// fundamental is an error that has a message and a stack, but no caller.\ntype fundamental struct {\n\tmsg string\n\t*stack\n}\n\nfunc (f *fundamental) Error() string { return f.msg }\n\nfunc (f *fundamental) Format(s fmt.State, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tif s.Flag('+') {\n\t\t\tio.WriteString(s, f.msg)\n\t\t\tf.stack.Format(s, verb)\n\t\t\treturn\n\t\t}\n\t\tfallthrough\n\tcase 's':\n\t\tio.WriteString(s, f.msg)\n\tcase 'q':\n\t\tfmt.Fprintf(s, \"%q\", f.msg)\n\t}\n}\n\n// WithStack annotates err with a stack trace at the point WithStack was called.\n// If err is nil, WithStack returns nil.\nfunc WithStack(err error) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\treturn &withStack{\n\t\terr,\n\t\tcallers(),\n\t}\n}\n\ntype withStack struct {\n\terror\n\t*stack\n}\n\nfunc (w *withStack) Cause() error { return w.error }\n\n// Unwrap provides compatibility for Go 1.13 error chains.\nfunc (w *withStack) Unwrap() error { return w.error }\n\nfunc (w *withStack) Format(s fmt.State, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tif s.Flag('+') {\n\t\t\tfmt.Fprintf(s, \"%+v\", w.Cause())\n\t\t\tw.stack.Format(s, verb)\n\t\t\treturn\n\t\t}\n\t\tfallthrough\n\tcase 's':\n\t\tio.WriteString(s, w.Error())\n\tcase 'q':\n\t\tfmt.Fprintf(s, \"%q\", w.Error())\n\t}\n}\n\n// Wrap returns an error annotating err with a stack trace\n// at the point Wrap is called, and the supplied message.\n// If err is nil, Wrap returns nil.\nfunc Wrap(err error, message string) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\terr = &withMessage{\n\t\tcause: err,\n\t\tmsg:   message,\n\t}\n\treturn &withStack{\n\t\terr,\n\t\tcallers(),\n\t}\n}\n\n// Wrapf returns an error annotating err with a stack trace\n// at the point Wrapf is called, and the format specifier.\n// If err is nil, Wrapf returns nil.\nfunc Wrapf(err error, format string, args ...interface{}) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\terr = &withMessage{\n\t\tcause: err,\n\t\tmsg:   fmt.Sprintf(format, args...),\n\t}\n\treturn &withStack{\n\t\terr,\n\t\tcallers(),\n\t}\n}\n\n// WithMessage annotates err with a new message.\n// If err is nil, WithMessage returns nil.\nfunc WithMessage(err error, message string) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\treturn &withMessage{\n\t\tcause: err,\n\t\tmsg:   message,\n\t}\n}\n\n// WithMessagef annotates err with the format specifier.\n// If err is nil, WithMessagef returns nil.\nfunc WithMessagef(err error, format string, args ...interface{}) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\treturn &withMessage{\n\t\tcause: err,\n\t\tmsg:   fmt.Sprintf(format, args...),\n\t}\n}\n\ntype withMessage struct {\n\tcause error\n\tmsg   string\n}\n\nfunc (w *withMessage) Error() string { return w.msg + \": \" + w.cause.Error() }\nfunc (w *withMessage) Cause() error  { return w.cause }\n\n// Unwrap provides compatibility for Go 1.13 error chains.\nfunc (w *withMessage) Unwrap() error { return w.cause }\n\nfunc (w *withMessage) Format(s fmt.State, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tif s.Flag('+') {\n\t\t\tfmt.Fprintf(s, \"%+v\\n\", w.Cause())\n\t\t\tio.WriteString(s, w.msg)\n\t\t\treturn\n\t\t}\n\t\tfallthrough\n\tcase 's', 'q':\n\t\tio.WriteString(s, w.Error())\n\t}\n}\n\n// Cause returns the underlying cause of the error, if possible.\n// An error value has a cause if it implements the following\n// interface:\n//\n//     type causer interface {\n//            Cause() error\n//     }\n//\n// If the error does not implement Cause, the original error will\n// be returned. If the error is nil, nil will be returned without further\n// investigation.\nfunc Cause(err error) error {\n\ttype causer interface {\n\t\tCause() error\n\t}\n\n\tfor err != nil {\n\t\tcause, ok := err.(causer)\n\t\tif !ok {\n\t\t\tbreak\n\t\t}\n\t\terr = cause.Cause()\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/go113.go",
    "content": "// +build go1.13\n\npackage errors\n\nimport (\n\tstderrors \"errors\"\n)\n\n// Is reports whether any error in err's chain matches target.\n//\n// The chain consists of err itself followed by the sequence of errors obtained by\n// repeatedly calling Unwrap.\n//\n// An error is considered to match a target if it is equal to that target or if\n// it implements a method Is(error) bool such that Is(target) returns true.\nfunc Is(err, target error) bool { return stderrors.Is(err, target) }\n\n// As finds the first error in err's chain that matches target, and if so, sets\n// target to that error value and returns true.\n//\n// The chain consists of err itself followed by the sequence of errors obtained by\n// repeatedly calling Unwrap.\n//\n// An error matches target if the error's concrete value is assignable to the value\n// pointed to by target, or if the error has a method As(interface{}) bool such that\n// As(target) returns true. In the latter case, the As method is responsible for\n// setting target.\n//\n// As will panic if target is not a non-nil pointer to either a type that implements\n// error, or to any interface type. As returns false if err is nil.\nfunc As(err error, target interface{}) bool { return stderrors.As(err, target) }\n\n// Unwrap returns the result of calling the Unwrap method on err, if err's\n// type contains an Unwrap method returning error.\n// Otherwise, Unwrap returns nil.\nfunc Unwrap(err error) error {\n\treturn stderrors.Unwrap(err)\n}\n"
  },
  {
    "path": "vendor/github.com/pkg/errors/stack.go",
    "content": "package errors\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"path\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Frame represents a program counter inside a stack frame.\n// For historical reasons if Frame is interpreted as a uintptr\n// its value represents the program counter + 1.\ntype Frame uintptr\n\n// pc returns the program counter for this frame;\n// multiple frames may have the same PC value.\nfunc (f Frame) pc() uintptr { return uintptr(f) - 1 }\n\n// file returns the full path to the file that contains the\n// function for this Frame's pc.\nfunc (f Frame) file() string {\n\tfn := runtime.FuncForPC(f.pc())\n\tif fn == nil {\n\t\treturn \"unknown\"\n\t}\n\tfile, _ := fn.FileLine(f.pc())\n\treturn file\n}\n\n// line returns the line number of source code of the\n// function for this Frame's pc.\nfunc (f Frame) line() int {\n\tfn := runtime.FuncForPC(f.pc())\n\tif fn == nil {\n\t\treturn 0\n\t}\n\t_, line := fn.FileLine(f.pc())\n\treturn line\n}\n\n// name returns the name of this function, if known.\nfunc (f Frame) name() string {\n\tfn := runtime.FuncForPC(f.pc())\n\tif fn == nil {\n\t\treturn \"unknown\"\n\t}\n\treturn fn.Name()\n}\n\n// Format formats the frame according to the fmt.Formatter interface.\n//\n//    %s    source file\n//    %d    source line\n//    %n    function name\n//    %v    equivalent to %s:%d\n//\n// Format accepts flags that alter the printing of some verbs, as follows:\n//\n//    %+s   function name and path of source file relative to the compile time\n//          GOPATH separated by \\n\\t (<funcname>\\n\\t<path>)\n//    %+v   equivalent to %+s:%d\nfunc (f Frame) Format(s fmt.State, verb rune) {\n\tswitch verb {\n\tcase 's':\n\t\tswitch {\n\t\tcase s.Flag('+'):\n\t\t\tio.WriteString(s, f.name())\n\t\t\tio.WriteString(s, \"\\n\\t\")\n\t\t\tio.WriteString(s, f.file())\n\t\tdefault:\n\t\t\tio.WriteString(s, path.Base(f.file()))\n\t\t}\n\tcase 'd':\n\t\tio.WriteString(s, strconv.Itoa(f.line()))\n\tcase 'n':\n\t\tio.WriteString(s, funcname(f.name()))\n\tcase 'v':\n\t\tf.Format(s, 's')\n\t\tio.WriteString(s, \":\")\n\t\tf.Format(s, 'd')\n\t}\n}\n\n// MarshalText formats a stacktrace Frame as a text string. The output is the\n// same as that of fmt.Sprintf(\"%+v\", f), but without newlines or tabs.\nfunc (f Frame) MarshalText() ([]byte, error) {\n\tname := f.name()\n\tif name == \"unknown\" {\n\t\treturn []byte(name), nil\n\t}\n\treturn []byte(fmt.Sprintf(\"%s %s:%d\", name, f.file(), f.line())), nil\n}\n\n// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).\ntype StackTrace []Frame\n\n// Format formats the stack of Frames according to the fmt.Formatter interface.\n//\n//    %s\tlists source files for each Frame in the stack\n//    %v\tlists the source file and line number for each Frame in the stack\n//\n// Format accepts flags that alter the printing of some verbs, as follows:\n//\n//    %+v   Prints filename, function, and line number for each Frame in the stack.\nfunc (st StackTrace) Format(s fmt.State, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tswitch {\n\t\tcase s.Flag('+'):\n\t\t\tfor _, f := range st {\n\t\t\t\tio.WriteString(s, \"\\n\")\n\t\t\t\tf.Format(s, verb)\n\t\t\t}\n\t\tcase s.Flag('#'):\n\t\t\tfmt.Fprintf(s, \"%#v\", []Frame(st))\n\t\tdefault:\n\t\t\tst.formatSlice(s, verb)\n\t\t}\n\tcase 's':\n\t\tst.formatSlice(s, verb)\n\t}\n}\n\n// formatSlice will format this StackTrace into the given buffer as a slice of\n// Frame, only valid when called with '%s' or '%v'.\nfunc (st StackTrace) formatSlice(s fmt.State, verb rune) {\n\tio.WriteString(s, \"[\")\n\tfor i, f := range st {\n\t\tif i > 0 {\n\t\t\tio.WriteString(s, \" \")\n\t\t}\n\t\tf.Format(s, verb)\n\t}\n\tio.WriteString(s, \"]\")\n}\n\n// stack represents a stack of program counters.\ntype stack []uintptr\n\nfunc (s *stack) Format(st fmt.State, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tswitch {\n\t\tcase st.Flag('+'):\n\t\t\tfor _, pc := range *s {\n\t\t\t\tf := Frame(pc)\n\t\t\t\tfmt.Fprintf(st, \"\\n%+v\", f)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (s *stack) StackTrace() StackTrace {\n\tf := make([]Frame, len(*s))\n\tfor i := 0; i < len(f); i++ {\n\t\tf[i] = Frame((*s)[i])\n\t}\n\treturn f\n}\n\nfunc callers() *stack {\n\tconst depth = 32\n\tvar pcs [depth]uintptr\n\tn := runtime.Callers(3, pcs[:])\n\tvar st stack = pcs[0:n]\n\treturn &st\n}\n\n// funcname removes the path prefix component of a function's name reported by func.Name().\nfunc funcname(name string) string {\n\ti := strings.LastIndex(name, \"/\")\n\tname = name[i+1:]\n\ti = strings.Index(name, \".\")\n\treturn name[i+1:]\n}\n"
  },
  {
    "path": "vendor/github.com/pmezard/go-difflib/LICENSE",
    "content": "Copyright (c) 2013, Patrick Mezard\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n    Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n    Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n    The names of its contributors may not be used to endorse or promote\nproducts derived from this software without specific prior written\npermission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/pmezard/go-difflib/difflib/difflib.go",
    "content": "// Package difflib is a partial port of Python difflib module.\n//\n// It provides tools to compare sequences of strings and generate textual diffs.\n//\n// The following class and functions have been ported:\n//\n// - SequenceMatcher\n//\n// - unified_diff\n//\n// - context_diff\n//\n// Getting unified diffs was the main goal of the port. Keep in mind this code\n// is mostly suitable to output text differences in a human friendly way, there\n// are no guarantees generated diffs are consumable by patch(1).\npackage difflib\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n)\n\nfunc min(a, b int) int {\n\tif a < b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc max(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc calculateRatio(matches, length int) float64 {\n\tif length > 0 {\n\t\treturn 2.0 * float64(matches) / float64(length)\n\t}\n\treturn 1.0\n}\n\ntype Match struct {\n\tA    int\n\tB    int\n\tSize int\n}\n\ntype OpCode struct {\n\tTag byte\n\tI1  int\n\tI2  int\n\tJ1  int\n\tJ2  int\n}\n\n// SequenceMatcher compares sequence of strings. The basic\n// algorithm predates, and is a little fancier than, an algorithm\n// published in the late 1980's by Ratcliff and Obershelp under the\n// hyperbolic name \"gestalt pattern matching\".  The basic idea is to find\n// the longest contiguous matching subsequence that contains no \"junk\"\n// elements (R-O doesn't address junk).  The same idea is then applied\n// recursively to the pieces of the sequences to the left and to the right\n// of the matching subsequence.  This does not yield minimal edit\n// sequences, but does tend to yield matches that \"look right\" to people.\n//\n// SequenceMatcher tries to compute a \"human-friendly diff\" between two\n// sequences.  Unlike e.g. UNIX(tm) diff, the fundamental notion is the\n// longest *contiguous* & junk-free matching subsequence.  That's what\n// catches peoples' eyes.  The Windows(tm) windiff has another interesting\n// notion, pairing up elements that appear uniquely in each sequence.\n// That, and the method here, appear to yield more intuitive difference\n// reports than does diff.  This method appears to be the least vulnerable\n// to synching up on blocks of \"junk lines\", though (like blank lines in\n// ordinary text files, or maybe \"<P>\" lines in HTML files).  That may be\n// because this is the only method of the 3 that has a *concept* of\n// \"junk\" <wink>.\n//\n// Timing:  Basic R-O is cubic time worst case and quadratic time expected\n// case.  SequenceMatcher is quadratic time for the worst case and has\n// expected-case behavior dependent in a complicated way on how many\n// elements the sequences have in common; best case time is linear.\ntype SequenceMatcher struct {\n\ta              []string\n\tb              []string\n\tb2j            map[string][]int\n\tIsJunk         func(string) bool\n\tautoJunk       bool\n\tbJunk          map[string]struct{}\n\tmatchingBlocks []Match\n\tfullBCount     map[string]int\n\tbPopular       map[string]struct{}\n\topCodes        []OpCode\n}\n\nfunc NewMatcher(a, b []string) *SequenceMatcher {\n\tm := SequenceMatcher{autoJunk: true}\n\tm.SetSeqs(a, b)\n\treturn &m\n}\n\nfunc NewMatcherWithJunk(a, b []string, autoJunk bool,\n\tisJunk func(string) bool) *SequenceMatcher {\n\n\tm := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk}\n\tm.SetSeqs(a, b)\n\treturn &m\n}\n\n// Set two sequences to be compared.\nfunc (m *SequenceMatcher) SetSeqs(a, b []string) {\n\tm.SetSeq1(a)\n\tm.SetSeq2(b)\n}\n\n// Set the first sequence to be compared. The second sequence to be compared is\n// not changed.\n//\n// SequenceMatcher computes and caches detailed information about the second\n// sequence, so if you want to compare one sequence S against many sequences,\n// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other\n// sequences.\n//\n// See also SetSeqs() and SetSeq2().\nfunc (m *SequenceMatcher) SetSeq1(a []string) {\n\tif &a == &m.a {\n\t\treturn\n\t}\n\tm.a = a\n\tm.matchingBlocks = nil\n\tm.opCodes = nil\n}\n\n// Set the second sequence to be compared. The first sequence to be compared is\n// not changed.\nfunc (m *SequenceMatcher) SetSeq2(b []string) {\n\tif &b == &m.b {\n\t\treturn\n\t}\n\tm.b = b\n\tm.matchingBlocks = nil\n\tm.opCodes = nil\n\tm.fullBCount = nil\n\tm.chainB()\n}\n\nfunc (m *SequenceMatcher) chainB() {\n\t// Populate line -> index mapping\n\tb2j := map[string][]int{}\n\tfor i, s := range m.b {\n\t\tindices := b2j[s]\n\t\tindices = append(indices, i)\n\t\tb2j[s] = indices\n\t}\n\n\t// Purge junk elements\n\tm.bJunk = map[string]struct{}{}\n\tif m.IsJunk != nil {\n\t\tjunk := m.bJunk\n\t\tfor s, _ := range b2j {\n\t\t\tif m.IsJunk(s) {\n\t\t\t\tjunk[s] = struct{}{}\n\t\t\t}\n\t\t}\n\t\tfor s, _ := range junk {\n\t\t\tdelete(b2j, s)\n\t\t}\n\t}\n\n\t// Purge remaining popular elements\n\tpopular := map[string]struct{}{}\n\tn := len(m.b)\n\tif m.autoJunk && n >= 200 {\n\t\tntest := n/100 + 1\n\t\tfor s, indices := range b2j {\n\t\t\tif len(indices) > ntest {\n\t\t\t\tpopular[s] = struct{}{}\n\t\t\t}\n\t\t}\n\t\tfor s, _ := range popular {\n\t\t\tdelete(b2j, s)\n\t\t}\n\t}\n\tm.bPopular = popular\n\tm.b2j = b2j\n}\n\nfunc (m *SequenceMatcher) isBJunk(s string) bool {\n\t_, ok := m.bJunk[s]\n\treturn ok\n}\n\n// Find longest matching block in a[alo:ahi] and b[blo:bhi].\n//\n// If IsJunk is not defined:\n//\n// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where\n//     alo <= i <= i+k <= ahi\n//     blo <= j <= j+k <= bhi\n// and for all (i',j',k') meeting those conditions,\n//     k >= k'\n//     i <= i'\n//     and if i == i', j <= j'\n//\n// In other words, of all maximal matching blocks, return one that\n// starts earliest in a, and of all those maximal matching blocks that\n// start earliest in a, return the one that starts earliest in b.\n//\n// If IsJunk is defined, first the longest matching block is\n// determined as above, but with the additional restriction that no\n// junk element appears in the block.  Then that block is extended as\n// far as possible by matching (only) junk elements on both sides.  So\n// the resulting block never matches on junk except as identical junk\n// happens to be adjacent to an \"interesting\" match.\n//\n// If no blocks match, return (alo, blo, 0).\nfunc (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match {\n\t// CAUTION:  stripping common prefix or suffix would be incorrect.\n\t// E.g.,\n\t//    ab\n\t//    acab\n\t// Longest matching block is \"ab\", but if common prefix is\n\t// stripped, it's \"a\" (tied with \"b\").  UNIX(tm) diff does so\n\t// strip, so ends up claiming that ab is changed to acab by\n\t// inserting \"ca\" in the middle.  That's minimal but unintuitive:\n\t// \"it's obvious\" that someone inserted \"ac\" at the front.\n\t// Windiff ends up at the same place as diff, but by pairing up\n\t// the unique 'b's and then matching the first two 'a's.\n\tbesti, bestj, bestsize := alo, blo, 0\n\n\t// find longest junk-free match\n\t// during an iteration of the loop, j2len[j] = length of longest\n\t// junk-free match ending with a[i-1] and b[j]\n\tj2len := map[int]int{}\n\tfor i := alo; i != ahi; i++ {\n\t\t// look at all instances of a[i] in b; note that because\n\t\t// b2j has no junk keys, the loop is skipped if a[i] is junk\n\t\tnewj2len := map[int]int{}\n\t\tfor _, j := range m.b2j[m.a[i]] {\n\t\t\t// a[i] matches b[j]\n\t\t\tif j < blo {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif j >= bhi {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tk := j2len[j-1] + 1\n\t\t\tnewj2len[j] = k\n\t\t\tif k > bestsize {\n\t\t\t\tbesti, bestj, bestsize = i-k+1, j-k+1, k\n\t\t\t}\n\t\t}\n\t\tj2len = newj2len\n\t}\n\n\t// Extend the best by non-junk elements on each end.  In particular,\n\t// \"popular\" non-junk elements aren't in b2j, which greatly speeds\n\t// the inner loop above, but also means \"the best\" match so far\n\t// doesn't contain any junk *or* popular non-junk elements.\n\tfor besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) &&\n\t\tm.a[besti-1] == m.b[bestj-1] {\n\t\tbesti, bestj, bestsize = besti-1, bestj-1, bestsize+1\n\t}\n\tfor besti+bestsize < ahi && bestj+bestsize < bhi &&\n\t\t!m.isBJunk(m.b[bestj+bestsize]) &&\n\t\tm.a[besti+bestsize] == m.b[bestj+bestsize] {\n\t\tbestsize += 1\n\t}\n\n\t// Now that we have a wholly interesting match (albeit possibly\n\t// empty!), we may as well suck up the matching junk on each\n\t// side of it too.  Can't think of a good reason not to, and it\n\t// saves post-processing the (possibly considerable) expense of\n\t// figuring out what to do with it.  In the case of an empty\n\t// interesting match, this is clearly the right thing to do,\n\t// because no other kind of match is possible in the regions.\n\tfor besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) &&\n\t\tm.a[besti-1] == m.b[bestj-1] {\n\t\tbesti, bestj, bestsize = besti-1, bestj-1, bestsize+1\n\t}\n\tfor besti+bestsize < ahi && bestj+bestsize < bhi &&\n\t\tm.isBJunk(m.b[bestj+bestsize]) &&\n\t\tm.a[besti+bestsize] == m.b[bestj+bestsize] {\n\t\tbestsize += 1\n\t}\n\n\treturn Match{A: besti, B: bestj, Size: bestsize}\n}\n\n// Return list of triples describing matching subsequences.\n//\n// Each triple is of the form (i, j, n), and means that\n// a[i:i+n] == b[j:j+n].  The triples are monotonically increasing in\n// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are\n// adjacent triples in the list, and the second is not the last triple in the\n// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe\n// adjacent equal blocks.\n//\n// The last triple is a dummy, (len(a), len(b), 0), and is the only\n// triple with n==0.\nfunc (m *SequenceMatcher) GetMatchingBlocks() []Match {\n\tif m.matchingBlocks != nil {\n\t\treturn m.matchingBlocks\n\t}\n\n\tvar matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match\n\tmatchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match {\n\t\tmatch := m.findLongestMatch(alo, ahi, blo, bhi)\n\t\ti, j, k := match.A, match.B, match.Size\n\t\tif match.Size > 0 {\n\t\t\tif alo < i && blo < j {\n\t\t\t\tmatched = matchBlocks(alo, i, blo, j, matched)\n\t\t\t}\n\t\t\tmatched = append(matched, match)\n\t\t\tif i+k < ahi && j+k < bhi {\n\t\t\t\tmatched = matchBlocks(i+k, ahi, j+k, bhi, matched)\n\t\t\t}\n\t\t}\n\t\treturn matched\n\t}\n\tmatched := matchBlocks(0, len(m.a), 0, len(m.b), nil)\n\n\t// It's possible that we have adjacent equal blocks in the\n\t// matching_blocks list now.\n\tnonAdjacent := []Match{}\n\ti1, j1, k1 := 0, 0, 0\n\tfor _, b := range matched {\n\t\t// Is this block adjacent to i1, j1, k1?\n\t\ti2, j2, k2 := b.A, b.B, b.Size\n\t\tif i1+k1 == i2 && j1+k1 == j2 {\n\t\t\t// Yes, so collapse them -- this just increases the length of\n\t\t\t// the first block by the length of the second, and the first\n\t\t\t// block so lengthened remains the block to compare against.\n\t\t\tk1 += k2\n\t\t} else {\n\t\t\t// Not adjacent.  Remember the first block (k1==0 means it's\n\t\t\t// the dummy we started with), and make the second block the\n\t\t\t// new block to compare against.\n\t\t\tif k1 > 0 {\n\t\t\t\tnonAdjacent = append(nonAdjacent, Match{i1, j1, k1})\n\t\t\t}\n\t\t\ti1, j1, k1 = i2, j2, k2\n\t\t}\n\t}\n\tif k1 > 0 {\n\t\tnonAdjacent = append(nonAdjacent, Match{i1, j1, k1})\n\t}\n\n\tnonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0})\n\tm.matchingBlocks = nonAdjacent\n\treturn m.matchingBlocks\n}\n\n// Return list of 5-tuples describing how to turn a into b.\n//\n// Each tuple is of the form (tag, i1, i2, j1, j2).  The first tuple\n// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the\n// tuple preceding it, and likewise for j1 == the previous j2.\n//\n// The tags are characters, with these meanings:\n//\n// 'r' (replace):  a[i1:i2] should be replaced by b[j1:j2]\n//\n// 'd' (delete):   a[i1:i2] should be deleted, j1==j2 in this case.\n//\n// 'i' (insert):   b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case.\n//\n// 'e' (equal):    a[i1:i2] == b[j1:j2]\nfunc (m *SequenceMatcher) GetOpCodes() []OpCode {\n\tif m.opCodes != nil {\n\t\treturn m.opCodes\n\t}\n\ti, j := 0, 0\n\tmatching := m.GetMatchingBlocks()\n\topCodes := make([]OpCode, 0, len(matching))\n\tfor _, m := range matching {\n\t\t//  invariant:  we've pumped out correct diffs to change\n\t\t//  a[:i] into b[:j], and the next matching block is\n\t\t//  a[ai:ai+size] == b[bj:bj+size]. So we need to pump\n\t\t//  out a diff to change a[i:ai] into b[j:bj], pump out\n\t\t//  the matching block, and move (i,j) beyond the match\n\t\tai, bj, size := m.A, m.B, m.Size\n\t\ttag := byte(0)\n\t\tif i < ai && j < bj {\n\t\t\ttag = 'r'\n\t\t} else if i < ai {\n\t\t\ttag = 'd'\n\t\t} else if j < bj {\n\t\t\ttag = 'i'\n\t\t}\n\t\tif tag > 0 {\n\t\t\topCodes = append(opCodes, OpCode{tag, i, ai, j, bj})\n\t\t}\n\t\ti, j = ai+size, bj+size\n\t\t// the list of matching blocks is terminated by a\n\t\t// sentinel with size 0\n\t\tif size > 0 {\n\t\t\topCodes = append(opCodes, OpCode{'e', ai, i, bj, j})\n\t\t}\n\t}\n\tm.opCodes = opCodes\n\treturn m.opCodes\n}\n\n// Isolate change clusters by eliminating ranges with no changes.\n//\n// Return a generator of groups with up to n lines of context.\n// Each group is in the same format as returned by GetOpCodes().\nfunc (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode {\n\tif n < 0 {\n\t\tn = 3\n\t}\n\tcodes := m.GetOpCodes()\n\tif len(codes) == 0 {\n\t\tcodes = []OpCode{OpCode{'e', 0, 1, 0, 1}}\n\t}\n\t// Fixup leading and trailing groups if they show no changes.\n\tif codes[0].Tag == 'e' {\n\t\tc := codes[0]\n\t\ti1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2\n\t\tcodes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2}\n\t}\n\tif codes[len(codes)-1].Tag == 'e' {\n\t\tc := codes[len(codes)-1]\n\t\ti1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2\n\t\tcodes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)}\n\t}\n\tnn := n + n\n\tgroups := [][]OpCode{}\n\tgroup := []OpCode{}\n\tfor _, c := range codes {\n\t\ti1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2\n\t\t// End the current group and start a new one whenever\n\t\t// there is a large range with no changes.\n\t\tif c.Tag == 'e' && i2-i1 > nn {\n\t\t\tgroup = append(group, OpCode{c.Tag, i1, min(i2, i1+n),\n\t\t\t\tj1, min(j2, j1+n)})\n\t\t\tgroups = append(groups, group)\n\t\t\tgroup = []OpCode{}\n\t\t\ti1, j1 = max(i1, i2-n), max(j1, j2-n)\n\t\t}\n\t\tgroup = append(group, OpCode{c.Tag, i1, i2, j1, j2})\n\t}\n\tif len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') {\n\t\tgroups = append(groups, group)\n\t}\n\treturn groups\n}\n\n// Return a measure of the sequences' similarity (float in [0,1]).\n//\n// Where T is the total number of elements in both sequences, and\n// M is the number of matches, this is 2.0*M / T.\n// Note that this is 1 if the sequences are identical, and 0 if\n// they have nothing in common.\n//\n// .Ratio() is expensive to compute if you haven't already computed\n// .GetMatchingBlocks() or .GetOpCodes(), in which case you may\n// want to try .QuickRatio() or .RealQuickRation() first to get an\n// upper bound.\nfunc (m *SequenceMatcher) Ratio() float64 {\n\tmatches := 0\n\tfor _, m := range m.GetMatchingBlocks() {\n\t\tmatches += m.Size\n\t}\n\treturn calculateRatio(matches, len(m.a)+len(m.b))\n}\n\n// Return an upper bound on ratio() relatively quickly.\n//\n// This isn't defined beyond that it is an upper bound on .Ratio(), and\n// is faster to compute.\nfunc (m *SequenceMatcher) QuickRatio() float64 {\n\t// viewing a and b as multisets, set matches to the cardinality\n\t// of their intersection; this counts the number of matches\n\t// without regard to order, so is clearly an upper bound\n\tif m.fullBCount == nil {\n\t\tm.fullBCount = map[string]int{}\n\t\tfor _, s := range m.b {\n\t\t\tm.fullBCount[s] = m.fullBCount[s] + 1\n\t\t}\n\t}\n\n\t// avail[x] is the number of times x appears in 'b' less the\n\t// number of times we've seen it in 'a' so far ... kinda\n\tavail := map[string]int{}\n\tmatches := 0\n\tfor _, s := range m.a {\n\t\tn, ok := avail[s]\n\t\tif !ok {\n\t\t\tn = m.fullBCount[s]\n\t\t}\n\t\tavail[s] = n - 1\n\t\tif n > 0 {\n\t\t\tmatches += 1\n\t\t}\n\t}\n\treturn calculateRatio(matches, len(m.a)+len(m.b))\n}\n\n// Return an upper bound on ratio() very quickly.\n//\n// This isn't defined beyond that it is an upper bound on .Ratio(), and\n// is faster to compute than either .Ratio() or .QuickRatio().\nfunc (m *SequenceMatcher) RealQuickRatio() float64 {\n\tla, lb := len(m.a), len(m.b)\n\treturn calculateRatio(min(la, lb), la+lb)\n}\n\n// Convert range to the \"ed\" format\nfunc formatRangeUnified(start, stop int) string {\n\t// Per the diff spec at http://www.unix.org/single_unix_specification/\n\tbeginning := start + 1 // lines start numbering with one\n\tlength := stop - start\n\tif length == 1 {\n\t\treturn fmt.Sprintf(\"%d\", beginning)\n\t}\n\tif length == 0 {\n\t\tbeginning -= 1 // empty ranges begin at line just before the range\n\t}\n\treturn fmt.Sprintf(\"%d,%d\", beginning, length)\n}\n\n// Unified diff parameters\ntype UnifiedDiff struct {\n\tA        []string // First sequence lines\n\tFromFile string   // First file name\n\tFromDate string   // First file time\n\tB        []string // Second sequence lines\n\tToFile   string   // Second file name\n\tToDate   string   // Second file time\n\tEol      string   // Headers end of line, defaults to LF\n\tContext  int      // Number of context lines\n}\n\n// Compare two sequences of lines; generate the delta as a unified diff.\n//\n// Unified diffs are a compact way of showing line changes and a few\n// lines of context.  The number of context lines is set by 'n' which\n// defaults to three.\n//\n// By default, the diff control lines (those with ---, +++, or @@) are\n// created with a trailing newline.  This is helpful so that inputs\n// created from file.readlines() result in diffs that are suitable for\n// file.writelines() since both the inputs and outputs have trailing\n// newlines.\n//\n// For inputs that do not have trailing newlines, set the lineterm\n// argument to \"\" so that the output will be uniformly newline free.\n//\n// The unidiff format normally has a header for filenames and modification\n// times.  Any or all of these may be specified using strings for\n// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.\n// The modification times are normally expressed in the ISO 8601 format.\nfunc WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error {\n\tbuf := bufio.NewWriter(writer)\n\tdefer buf.Flush()\n\twf := func(format string, args ...interface{}) error {\n\t\t_, err := buf.WriteString(fmt.Sprintf(format, args...))\n\t\treturn err\n\t}\n\tws := func(s string) error {\n\t\t_, err := buf.WriteString(s)\n\t\treturn err\n\t}\n\n\tif len(diff.Eol) == 0 {\n\t\tdiff.Eol = \"\\n\"\n\t}\n\n\tstarted := false\n\tm := NewMatcher(diff.A, diff.B)\n\tfor _, g := range m.GetGroupedOpCodes(diff.Context) {\n\t\tif !started {\n\t\t\tstarted = true\n\t\t\tfromDate := \"\"\n\t\t\tif len(diff.FromDate) > 0 {\n\t\t\t\tfromDate = \"\\t\" + diff.FromDate\n\t\t\t}\n\t\t\ttoDate := \"\"\n\t\t\tif len(diff.ToDate) > 0 {\n\t\t\t\ttoDate = \"\\t\" + diff.ToDate\n\t\t\t}\n\t\t\tif diff.FromFile != \"\" || diff.ToFile != \"\" {\n\t\t\t\terr := wf(\"--- %s%s%s\", diff.FromFile, fromDate, diff.Eol)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\terr = wf(\"+++ %s%s%s\", diff.ToFile, toDate, diff.Eol)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfirst, last := g[0], g[len(g)-1]\n\t\trange1 := formatRangeUnified(first.I1, last.I2)\n\t\trange2 := formatRangeUnified(first.J1, last.J2)\n\t\tif err := wf(\"@@ -%s +%s @@%s\", range1, range2, diff.Eol); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, c := range g {\n\t\t\ti1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2\n\t\t\tif c.Tag == 'e' {\n\t\t\t\tfor _, line := range diff.A[i1:i2] {\n\t\t\t\t\tif err := ws(\" \" + line); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif c.Tag == 'r' || c.Tag == 'd' {\n\t\t\t\tfor _, line := range diff.A[i1:i2] {\n\t\t\t\t\tif err := ws(\"-\" + line); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif c.Tag == 'r' || c.Tag == 'i' {\n\t\t\t\tfor _, line := range diff.B[j1:j2] {\n\t\t\t\t\tif err := ws(\"+\" + line); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// Like WriteUnifiedDiff but returns the diff a string.\nfunc GetUnifiedDiffString(diff UnifiedDiff) (string, error) {\n\tw := &bytes.Buffer{}\n\terr := WriteUnifiedDiff(w, diff)\n\treturn string(w.Bytes()), err\n}\n\n// Convert range to the \"ed\" format.\nfunc formatRangeContext(start, stop int) string {\n\t// Per the diff spec at http://www.unix.org/single_unix_specification/\n\tbeginning := start + 1 // lines start numbering with one\n\tlength := stop - start\n\tif length == 0 {\n\t\tbeginning -= 1 // empty ranges begin at line just before the range\n\t}\n\tif length <= 1 {\n\t\treturn fmt.Sprintf(\"%d\", beginning)\n\t}\n\treturn fmt.Sprintf(\"%d,%d\", beginning, beginning+length-1)\n}\n\ntype ContextDiff UnifiedDiff\n\n// Compare two sequences of lines; generate the delta as a context diff.\n//\n// Context diffs are a compact way of showing line changes and a few\n// lines of context. The number of context lines is set by diff.Context\n// which defaults to three.\n//\n// By default, the diff control lines (those with *** or ---) are\n// created with a trailing newline.\n//\n// For inputs that do not have trailing newlines, set the diff.Eol\n// argument to \"\" so that the output will be uniformly newline free.\n//\n// The context diff format normally has a header for filenames and\n// modification times.  Any or all of these may be specified using\n// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate.\n// The modification times are normally expressed in the ISO 8601 format.\n// If not specified, the strings default to blanks.\nfunc WriteContextDiff(writer io.Writer, diff ContextDiff) error {\n\tbuf := bufio.NewWriter(writer)\n\tdefer buf.Flush()\n\tvar diffErr error\n\twf := func(format string, args ...interface{}) {\n\t\t_, err := buf.WriteString(fmt.Sprintf(format, args...))\n\t\tif diffErr == nil && err != nil {\n\t\t\tdiffErr = err\n\t\t}\n\t}\n\tws := func(s string) {\n\t\t_, err := buf.WriteString(s)\n\t\tif diffErr == nil && err != nil {\n\t\t\tdiffErr = err\n\t\t}\n\t}\n\n\tif len(diff.Eol) == 0 {\n\t\tdiff.Eol = \"\\n\"\n\t}\n\n\tprefix := map[byte]string{\n\t\t'i': \"+ \",\n\t\t'd': \"- \",\n\t\t'r': \"! \",\n\t\t'e': \"  \",\n\t}\n\n\tstarted := false\n\tm := NewMatcher(diff.A, diff.B)\n\tfor _, g := range m.GetGroupedOpCodes(diff.Context) {\n\t\tif !started {\n\t\t\tstarted = true\n\t\t\tfromDate := \"\"\n\t\t\tif len(diff.FromDate) > 0 {\n\t\t\t\tfromDate = \"\\t\" + diff.FromDate\n\t\t\t}\n\t\t\ttoDate := \"\"\n\t\t\tif len(diff.ToDate) > 0 {\n\t\t\t\ttoDate = \"\\t\" + diff.ToDate\n\t\t\t}\n\t\t\tif diff.FromFile != \"\" || diff.ToFile != \"\" {\n\t\t\t\twf(\"*** %s%s%s\", diff.FromFile, fromDate, diff.Eol)\n\t\t\t\twf(\"--- %s%s%s\", diff.ToFile, toDate, diff.Eol)\n\t\t\t}\n\t\t}\n\n\t\tfirst, last := g[0], g[len(g)-1]\n\t\tws(\"***************\" + diff.Eol)\n\n\t\trange1 := formatRangeContext(first.I1, last.I2)\n\t\twf(\"*** %s ****%s\", range1, diff.Eol)\n\t\tfor _, c := range g {\n\t\t\tif c.Tag == 'r' || c.Tag == 'd' {\n\t\t\t\tfor _, cc := range g {\n\t\t\t\t\tif cc.Tag == 'i' {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tfor _, line := range diff.A[cc.I1:cc.I2] {\n\t\t\t\t\t\tws(prefix[cc.Tag] + line)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\trange2 := formatRangeContext(first.J1, last.J2)\n\t\twf(\"--- %s ----%s\", range2, diff.Eol)\n\t\tfor _, c := range g {\n\t\t\tif c.Tag == 'r' || c.Tag == 'i' {\n\t\t\t\tfor _, cc := range g {\n\t\t\t\t\tif cc.Tag == 'd' {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tfor _, line := range diff.B[cc.J1:cc.J2] {\n\t\t\t\t\t\tws(prefix[cc.Tag] + line)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn diffErr\n}\n\n// Like WriteContextDiff but returns the diff a string.\nfunc GetContextDiffString(diff ContextDiff) (string, error) {\n\tw := &bytes.Buffer{}\n\terr := WriteContextDiff(w, diff)\n\treturn string(w.Bytes()), err\n}\n\n// Split a string on \"\\n\" while preserving them. The output can be used\n// as input for UnifiedDiff and ContextDiff structures.\nfunc SplitLines(s string) []string {\n\tlines := strings.SplitAfter(s, \"\\n\")\n\tlines[len(lines)-1] += \"\\n\"\n\treturn lines\n}\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/.gitignore",
    "content": "testdata/gpghome/random_seed\ntestdata/gpghome/.gpg-v21-migrated\ntestdata/gpghome/private-keys-v1.d/\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/LICENSE",
    "content": "Copyright (c) 2015, James Fargher <proglottis@gmail.com>\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/README.md",
    "content": "# GPGME (golang)\n\nGo wrapper for the GPGME library.\n\nThis library is intended for use with desktop applications. If you are looking to add OpenPGP support to a server application I suggest you first look at [golang.org/x/crypto/openpgp](https://godoc.org/golang.org/x/crypto/openpgp).\n\n## Installation\n\n    go get -u github.com/proglottis/gpgme\n\n## Documentation\n\n* [godoc](https://godoc.org/github.com/proglottis/gpgme)\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/data.go",
    "content": "package gpgme\n\n// #include <string.h>\n// #include <gpgme.h>\n// #include <errno.h>\n// #include \"go_gpgme.h\"\nimport \"C\"\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/cgo\"\n\t\"unsafe\"\n)\n\nconst (\n\tSeekSet = C.SEEK_SET\n\tSeekCur = C.SEEK_CUR\n\tSeekEnd = C.SEEK_END\n)\n\nvar dataCallbacks = C.struct_gpgme_data_cbs{\n\tread:  C.gpgme_data_read_cb_t(C.gogpgme_readfunc),\n\twrite: C.gpgme_data_write_cb_t(C.gogpgme_writefunc),\n\tseek:  C.gpgme_data_seek_cb_t(C.gogpgme_seekfunc),\n}\n\n//export gogpgme_readfunc\nfunc gogpgme_readfunc(handle, buffer unsafe.Pointer, size C.size_t) C.ssize_t {\n\th := *(*cgo.Handle)(handle)\n\td := h.Value().(*Data)\n\tn, err := d.r.Read(unsafe.Slice((*byte)(buffer), size))\n\tif err != nil && err != io.EOF {\n\t\td.err = err\n\t\tC.gpgme_err_set_errno(C.EIO)\n\t\treturn -1\n\t}\n\treturn C.ssize_t(n)\n}\n\n//export gogpgme_writefunc\nfunc gogpgme_writefunc(handle, buffer unsafe.Pointer, size C.size_t) C.ssize_t {\n\th := *(*cgo.Handle)(handle)\n\td := h.Value().(*Data)\n\tn, err := d.w.Write(unsafe.Slice((*byte)(buffer), size))\n\tif err != nil && err != io.EOF {\n\t\td.err = err\n\t\tC.gpgme_err_set_errno(C.EIO)\n\t\treturn -1\n\t}\n\treturn C.ssize_t(n)\n}\n\n//export gogpgme_seekfunc\nfunc gogpgme_seekfunc(handle unsafe.Pointer, offset C.gpgme_off_t, whence C.int) C.gpgme_off_t {\n\th := *(*cgo.Handle)(handle)\n\td := h.Value().(*Data)\n\tn, err := d.s.Seek(int64(offset), int(whence))\n\tif err != nil {\n\t\td.err = err\n\t\tC.gpgme_err_set_errno(C.EIO)\n\t\treturn -1\n\t}\n\treturn C.gpgme_off_t(n)\n}\n\n// The Data buffer used to communicate with GPGME\ntype Data struct {\n\tdh  C.gpgme_data_t // WARNING: Call runtime.KeepAlive(d) after ANY passing of d.dh to C\n\tr   io.Reader\n\tw   io.Writer\n\ts   io.Seeker\n\tcbc cgo.Handle // WARNING: Call runtime.KeepAlive(d) after ANY use of d.cbc in C (typically via d.dh)\n\terr error\n}\n\nfunc newData() *Data {\n\td := &Data{}\n\truntime.SetFinalizer(d, (*Data).Close)\n\treturn d\n}\n\n// NewData returns a new memory based data buffer\nfunc NewData() (*Data, error) {\n\td := newData()\n\treturn d, handleError(C.gpgme_data_new(&d.dh))\n}\n\n// NewDataFile returns a new file based data buffer\nfunc NewDataFile(f *os.File) (*Data, error) {\n\td := newData()\n\td.r = f\n\treturn d, handleError(C.gpgme_data_new_from_fd(&d.dh, C.int(f.Fd())))\n}\n\n// NewDataBytes returns a new memory based data buffer that contains `b` bytes\nfunc NewDataBytes(b []byte) (*Data, error) {\n\td := newData()\n\tvar cb *C.char\n\tif len(b) != 0 {\n\t\tcb = (*C.char)(unsafe.Pointer(&b[0]))\n\t}\n\treturn d, handleError(C.gpgme_data_new_from_mem(&d.dh, cb, C.size_t(len(b)), 1))\n}\n\n// NewDataReader returns a new callback based data buffer\nfunc NewDataReader(r io.Reader) (*Data, error) {\n\td := newData()\n\td.r = r\n\tif s, ok := r.(io.Seeker); ok {\n\t\td.s = s\n\t}\n\td.cbc = cgo.NewHandle(d)\n\treturn d, handleError(C.gpgme_data_new_from_cbs(&d.dh, &dataCallbacks, unsafe.Pointer(&d.cbc)))\n}\n\n// NewDataWriter returns a new callback based data buffer\nfunc NewDataWriter(w io.Writer) (*Data, error) {\n\td := newData()\n\td.w = w\n\tif s, ok := w.(io.Seeker); ok {\n\t\td.s = s\n\t}\n\td.cbc = cgo.NewHandle(d)\n\treturn d, handleError(C.gpgme_data_new_from_cbs(&d.dh, &dataCallbacks, unsafe.Pointer(&d.cbc)))\n}\n\n// NewDataReadWriter returns a new callback based data buffer\nfunc NewDataReadWriter(rw io.ReadWriter) (*Data, error) {\n\td := newData()\n\td.r = rw\n\td.w = rw\n\tif s, ok := rw.(io.Seeker); ok {\n\t\td.s = s\n\t}\n\td.cbc = cgo.NewHandle(d)\n\treturn d, handleError(C.gpgme_data_new_from_cbs(&d.dh, &dataCallbacks, unsafe.Pointer(&d.cbc)))\n}\n\n// NewDataReadWriteSeeker returns a new callback based data buffer\nfunc NewDataReadWriteSeeker(rw io.ReadWriteSeeker) (*Data, error) {\n\td := newData()\n\td.r = rw\n\td.w = rw\n\td.s = rw\n\td.cbc = cgo.NewHandle(d)\n\treturn d, handleError(C.gpgme_data_new_from_cbs(&d.dh, &dataCallbacks, unsafe.Pointer(&d.cbc)))\n}\n\n// Close releases any resources associated with the data buffer\nfunc (d *Data) Close() error {\n\tif d.dh == nil {\n\t\treturn nil\n\t}\n\tif d.cbc > 0 {\n\t\td.cbc.Delete()\n\t}\n\tC.gpgme_data_release(d.dh)\n\truntime.KeepAlive(d)\n\td.dh = nil\n\treturn nil\n}\n\nfunc (d *Data) Write(p []byte) (int, error) {\n\ttotal := 0\n\tfor total < len(p) {\n\t\tremaining := p[total:]\n\n\t\tvar buffer *byte\n\t\tif len(remaining) > 0 {\n\t\t\tbuffer = &remaining[0]\n\t\t}\n\n\t\tn, err := C.gpgme_data_write(d.dh, unsafe.Pointer(buffer), C.size_t(len(remaining)))\n\t\truntime.KeepAlive(d)\n\t\tswitch {\n\t\tcase d.err != nil:\n\t\t\tdefer func() { d.err = nil }()\n\t\t\treturn total, d.err\n\t\tcase n < 0:\n\t\t\treturn total, err\n\t\tcase n == 0: // This should never happen, but ensure we don’t loop forever\n\t\t\t// If we got here, we know len(p) > 0, so ErrShortWrite is appropriate.\n\t\t\treturn total, io.ErrShortWrite\n\t\t}\n\n\t\ttotal += int(n)\n\t}\n\treturn total, nil\n}\n\nfunc (d *Data) Read(p []byte) (int, error) {\n\tvar buffer *byte\n\tif len(p) > 0 {\n\t\tbuffer = &p[0]\n\t}\n\n\tn, err := C.gpgme_data_read(d.dh, unsafe.Pointer(buffer), C.size_t(len(p)))\n\truntime.KeepAlive(d)\n\tswitch {\n\tcase d.err != nil:\n\t\tdefer func() { d.err = nil }()\n\n\t\treturn 0, d.err\n\tcase n < 0:\n\t\treturn 0, err\n\tcase len(p) > 0 && n == 0:\n\t\treturn 0, io.EOF\n\t}\n\treturn int(n), nil\n}\n\nfunc (d *Data) Seek(offset int64, whence int) (int64, error) {\n\tn, err := C.gogpgme_data_seek(d.dh, C.gpgme_off_t(offset), C.int(whence))\n\truntime.KeepAlive(d)\n\tswitch {\n\tcase d.err != nil:\n\t\tdefer func() { d.err = nil }()\n\n\t\treturn 0, d.err\n\tcase n < 0:\n\t\treturn 0, err\n\t}\n\treturn int64(n), nil\n}\n\n// Name returns the associated filename if any\nfunc (d *Data) Name() string {\n\tres := C.GoString(C.gpgme_data_get_file_name(d.dh))\n\truntime.KeepAlive(d)\n\treturn res\n}\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/go_gpgme.c",
    "content": "#include \"go_gpgme.h\"\n\ngpgme_off_t gogpgme_data_seek(gpgme_data_t dh, gpgme_off_t offset, int whence) {\n\treturn gpgme_data_seek(dh, offset, whence);\n}\n\ngpgme_error_t gogpgme_op_assuan_transact_ext(\n\t\tgpgme_ctx_t ctx,\n\t\tchar* cmd,\n\t\tvoid* data_h,\n\t\tvoid* inquiry_h,\n\t\tvoid* status_h,\n\t\tgpgme_error_t *operr\n\t){\n\treturn gpgme_op_assuan_transact_ext(\n\t\tctx,\n\t\tcmd,\n\t\t(gpgme_assuan_data_cb_t)    gogpgme_assuan_data_callback,    data_h,\n\t\t(gpgme_assuan_inquire_cb_t) gogpgme_assuan_inquiry_callback, inquiry_h,\n\t\t(gpgme_assuan_status_cb_t)  gogpgme_assuan_status_callback,  status_h,\n\t\toperr\n\t);\n}\n\nunsigned int key_revoked(gpgme_key_t k) {\n\treturn k->revoked;\n}\n\nunsigned int key_expired(gpgme_key_t k) {\n\treturn k->expired;\n}\n\nunsigned int key_disabled(gpgme_key_t k) {\n\treturn k->disabled;\n}\n\nunsigned int key_invalid(gpgme_key_t k) {\n\treturn k->invalid;\n}\n\nunsigned int key_can_encrypt(gpgme_key_t k) {\n\treturn k->can_encrypt;\n}\n\nunsigned int key_can_sign(gpgme_key_t k) {\n\treturn k->can_sign;\n}\n\nunsigned int key_can_certify(gpgme_key_t k) {\n\treturn k->can_certify;\n}\n\nunsigned int key_secret(gpgme_key_t k) {\n\treturn k->secret;\n}\n\nunsigned int key_can_authenticate(gpgme_key_t k) {\n\treturn k->can_authenticate;\n}\n\nunsigned int key_is_qualified(gpgme_key_t k) {\n\treturn k->is_qualified;\n}\n\nunsigned int signature_wrong_key_usage(gpgme_signature_t s) {\n    return s->wrong_key_usage;\n}\n\nunsigned int signature_pka_trust(gpgme_signature_t s) {\n    return s->pka_trust;\n}\n\nunsigned int signature_chain_model(gpgme_signature_t s) {\n    return s->chain_model;\n}\n\nunsigned int subkey_revoked(gpgme_subkey_t k) {\n\treturn k->revoked;\n}\n\nunsigned int subkey_expired(gpgme_subkey_t k) {\n\treturn k->expired;\n}\n\nunsigned int subkey_disabled(gpgme_subkey_t k) {\n\treturn k->disabled;\n}\n\nunsigned int subkey_invalid(gpgme_subkey_t k) {\n\treturn k->invalid;\n}\n\nunsigned int subkey_secret(gpgme_subkey_t k) {\n\treturn k->secret;\n}\n\nunsigned int uid_revoked(gpgme_user_id_t u) {\n\treturn u->revoked;\n}\n\nunsigned int uid_invalid(gpgme_user_id_t u) {\n\treturn u->invalid;\n}\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/go_gpgme.h",
    "content": "#ifndef GO_GPGME_H\n#define GO_GPGME_H\n\n#define _FILE_OFFSET_BITS 64\n#include <stdint.h>\n\n#include <gpgme.h>\n\nextern ssize_t gogpgme_readfunc(void *handle, void *buffer, size_t size);\nextern ssize_t gogpgme_writefunc(void *handle, void *buffer, size_t size);\nextern off_t gogpgme_seekfunc(void *handle, off_t offset, int whence);\nextern gpgme_error_t gogpgme_passfunc(void *hook, char *uid_hint, char *passphrase_info, int prev_was_bad, int fd);\nextern gpgme_off_t gogpgme_data_seek(gpgme_data_t dh, gpgme_off_t offset, int whence);\n\nextern gpgme_error_t gogpgme_op_assuan_transact_ext(gpgme_ctx_t ctx, char *cmd, void *data_h, void *inquiry_h , void *status_h, gpgme_error_t *operr);\n\nextern gpgme_error_t gogpgme_assuan_data_callback(void *opaque, void* data, size_t datalen );\nextern gpgme_error_t gogpgme_assuan_inquiry_callback(void *opaque, char* name, char* args);\nextern gpgme_error_t gogpgme_assuan_status_callback(void *opaque, char* status, char* args);\n\nextern unsigned int key_revoked(gpgme_key_t k);\nextern unsigned int key_expired(gpgme_key_t k);\nextern unsigned int key_disabled(gpgme_key_t k);\nextern unsigned int key_invalid(gpgme_key_t k);\nextern unsigned int key_can_encrypt(gpgme_key_t k);\nextern unsigned int key_can_sign(gpgme_key_t k);\nextern unsigned int key_can_certify(gpgme_key_t k);\nextern unsigned int key_secret(gpgme_key_t k);\nextern unsigned int key_can_authenticate(gpgme_key_t k);\nextern unsigned int key_is_qualified(gpgme_key_t k);\nextern unsigned int signature_wrong_key_usage(gpgme_signature_t s);\nextern unsigned int signature_pka_trust(gpgme_signature_t s);\nextern unsigned int signature_chain_model(gpgme_signature_t s);\nextern unsigned int subkey_revoked(gpgme_subkey_t k);\nextern unsigned int subkey_expired(gpgme_subkey_t k);\nextern unsigned int subkey_disabled(gpgme_subkey_t k);\nextern unsigned int subkey_invalid(gpgme_subkey_t k);\nextern unsigned int subkey_secret(gpgme_subkey_t k);\nextern unsigned int uid_revoked(gpgme_user_id_t u);\nextern unsigned int uid_invalid(gpgme_user_id_t u);\n\n#endif\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/gpgme.go",
    "content": "// Package gpgme provides a Go wrapper for the GPGME library\npackage gpgme\n\n// #cgo pkg-config: gpgme\n// #cgo CPPFLAGS: -D_FILE_OFFSET_BITS=64\n// #include <stdlib.h>\n// #include <gpgme.h>\n// #include \"go_gpgme.h\"\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/cgo\"\n\t\"time\"\n\t\"unsafe\"\n)\n\nvar Version string\n\nfunc init() {\n\tVersion = C.GoString(C.gpgme_check_version(nil))\n}\n\n// Callback is the function that is called when a passphrase is required\ntype Callback func(uidHint string, prevWasBad bool, f *os.File) error\n\n//export gogpgme_passfunc\nfunc gogpgme_passfunc(hook unsafe.Pointer, uid_hint, passphrase_info *C.char, prev_was_bad, fd C.int) C.gpgme_error_t {\n\th := *(*cgo.Handle)(hook)\n\tc := h.Value().(*Context)\n\tgo_uid_hint := C.GoString(uid_hint)\n\tf := os.NewFile(uintptr(fd), go_uid_hint)\n\tdefer f.Close()\n\terr := c.callback(go_uid_hint, prev_was_bad != 0, f)\n\tif err != nil {\n\t\treturn C.GPG_ERR_CANCELED\n\t}\n\treturn 0\n}\n\ntype Protocol int\n\nconst (\n\tProtocolOpenPGP  Protocol = C.GPGME_PROTOCOL_OpenPGP\n\tProtocolCMS      Protocol = C.GPGME_PROTOCOL_CMS\n\tProtocolGPGConf  Protocol = C.GPGME_PROTOCOL_GPGCONF\n\tProtocolAssuan   Protocol = C.GPGME_PROTOCOL_ASSUAN\n\tProtocolG13      Protocol = C.GPGME_PROTOCOL_G13\n\tProtocolUIServer Protocol = C.GPGME_PROTOCOL_UISERVER\n\tProtocolDefault  Protocol = C.GPGME_PROTOCOL_DEFAULT\n\tProtocolUnknown  Protocol = C.GPGME_PROTOCOL_UNKNOWN\n)\n\ntype PinEntryMode int\n\nconst (\n\tPinEntryDefault  PinEntryMode = C.GPGME_PINENTRY_MODE_DEFAULT\n\tPinEntryAsk      PinEntryMode = C.GPGME_PINENTRY_MODE_ASK\n\tPinEntryCancel   PinEntryMode = C.GPGME_PINENTRY_MODE_CANCEL\n\tPinEntryError    PinEntryMode = C.GPGME_PINENTRY_MODE_ERROR\n\tPinEntryLoopback PinEntryMode = C.GPGME_PINENTRY_MODE_LOOPBACK\n)\n\ntype EncryptFlag uint\n\nconst (\n\tEncryptAlwaysTrust EncryptFlag = C.GPGME_ENCRYPT_ALWAYS_TRUST\n\tEncryptNoEncryptTo EncryptFlag = C.GPGME_ENCRYPT_NO_ENCRYPT_TO\n\tEncryptPrepare     EncryptFlag = C.GPGME_ENCRYPT_PREPARE\n\tEncryptExceptSign  EncryptFlag = C.GPGME_ENCRYPT_EXPECT_SIGN\n)\n\ntype HashAlgo int\n\n// const values for HashAlgo values should be added when necessary.\n\ntype KeyListMode uint\n\nconst (\n\tKeyListModeLocal        KeyListMode = C.GPGME_KEYLIST_MODE_LOCAL\n\tKeyListModeExtern       KeyListMode = C.GPGME_KEYLIST_MODE_EXTERN\n\tKeyListModeSigs         KeyListMode = C.GPGME_KEYLIST_MODE_SIGS\n\tKeyListModeSigNotations KeyListMode = C.GPGME_KEYLIST_MODE_SIG_NOTATIONS\n\tKeyListModeEphemeral    KeyListMode = C.GPGME_KEYLIST_MODE_EPHEMERAL\n\tKeyListModeModeValidate KeyListMode = C.GPGME_KEYLIST_MODE_VALIDATE\n)\n\ntype PubkeyAlgo int\n\n// const values for PubkeyAlgo values should be added when necessary.\n\ntype SigMode int\n\nconst (\n\tSigModeNormal SigMode = C.GPGME_SIG_MODE_NORMAL\n\tSigModeDetach SigMode = C.GPGME_SIG_MODE_DETACH\n\tSigModeClear  SigMode = C.GPGME_SIG_MODE_CLEAR\n)\n\ntype SigSum int\n\nconst (\n\tSigSumValid      SigSum = C.GPGME_SIGSUM_VALID\n\tSigSumGreen      SigSum = C.GPGME_SIGSUM_GREEN\n\tSigSumRed        SigSum = C.GPGME_SIGSUM_RED\n\tSigSumKeyRevoked SigSum = C.GPGME_SIGSUM_KEY_REVOKED\n\tSigSumKeyExpired SigSum = C.GPGME_SIGSUM_KEY_EXPIRED\n\tSigSumSigExpired SigSum = C.GPGME_SIGSUM_SIG_EXPIRED\n\tSigSumKeyMissing SigSum = C.GPGME_SIGSUM_KEY_MISSING\n\tSigSumCRLMissing SigSum = C.GPGME_SIGSUM_CRL_MISSING\n\tSigSumCRLTooOld  SigSum = C.GPGME_SIGSUM_CRL_TOO_OLD\n\tSigSumBadPolicy  SigSum = C.GPGME_SIGSUM_BAD_POLICY\n\tSigSumSysError   SigSum = C.GPGME_SIGSUM_SYS_ERROR\n)\n\ntype Validity int\n\nconst (\n\tValidityUnknown   Validity = C.GPGME_VALIDITY_UNKNOWN\n\tValidityUndefined Validity = C.GPGME_VALIDITY_UNDEFINED\n\tValidityNever     Validity = C.GPGME_VALIDITY_NEVER\n\tValidityMarginal  Validity = C.GPGME_VALIDITY_MARGINAL\n\tValidityFull      Validity = C.GPGME_VALIDITY_FULL\n\tValidityUltimate  Validity = C.GPGME_VALIDITY_ULTIMATE\n)\n\ntype ErrorCode int\n\nconst (\n\tErrorNoError ErrorCode = C.GPG_ERR_NO_ERROR\n\tErrorEOF     ErrorCode = C.GPG_ERR_EOF\n)\n\n// Error is a wrapper for GPGME errors\ntype Error struct {\n\terr C.gpgme_error_t\n}\n\nfunc (e Error) Code() ErrorCode {\n\treturn ErrorCode(C.gpgme_err_code(e.err))\n}\n\nfunc (e Error) Error() string {\n\t// gpgme_error_t, aka gpg_error_t, is a single 32-bit integer, so it does not include\n\t// strings of arbitrary length\n\t// (compare https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=src/err-codes.h.in;hb=HEAD ).\n\t//\n\t// So, a medium-size hard-coded buffer is sufficient.\n\tvar buf [1024]C.char\n\t_ = C.gpgme_strerror_r(e.err, &buf[0], C.size_t(len(buf)))\n\tbuf[len(buf)-1] = 0 // If gpgme_strerror_r returns ERANGE, the buffer is not guaranteed to be null-terminated\n\n\treturn C.GoString(&buf[0])\n}\n\nfunc handleError(err C.gpgme_error_t) error {\n\te := Error{err: err}\n\tif e.Code() == ErrorNoError {\n\t\treturn nil\n\t}\n\treturn e\n}\n\nfunc cbool(b bool) C.int {\n\tif b {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\nfunc EngineCheckVersion(p Protocol) error {\n\treturn handleError(C.gpgme_engine_check_version(C.gpgme_protocol_t(p)))\n}\n\ntype EngineInfo struct {\n\tnext            *EngineInfo\n\tprotocol        Protocol\n\tfileName        string\n\thomeDir         string\n\tversion         string\n\trequiredVersion string\n}\n\nfunc copyEngineInfo(info C.gpgme_engine_info_t) *EngineInfo {\n\tres := &EngineInfo{\n\t\tnext:            nil,\n\t\tprotocol:        Protocol(info.protocol),\n\t\tfileName:        C.GoString(info.file_name),\n\t\thomeDir:         C.GoString(info.home_dir),\n\t\tversion:         C.GoString(info.version),\n\t\trequiredVersion: C.GoString(info.req_version),\n\t}\n\tif info.next != nil {\n\t\tres.next = copyEngineInfo(info.next)\n\t}\n\treturn res\n}\n\nfunc (e *EngineInfo) Next() *EngineInfo {\n\treturn e.next\n}\n\nfunc (e *EngineInfo) Protocol() Protocol {\n\treturn e.protocol\n}\n\nfunc (e *EngineInfo) FileName() string {\n\treturn e.fileName\n}\n\nfunc (e *EngineInfo) Version() string {\n\treturn e.version\n}\n\nfunc (e *EngineInfo) RequiredVersion() string {\n\treturn e.requiredVersion\n}\n\nfunc (e *EngineInfo) HomeDir() string {\n\treturn e.homeDir\n}\n\nfunc GetEngineInfo() (*EngineInfo, error) {\n\tvar cInfo C.gpgme_engine_info_t\n\terr := handleError(C.gpgme_get_engine_info(&cInfo))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn copyEngineInfo(cInfo), nil // It is up to the caller not to invalidate cInfo concurrently until this is done.\n}\n\nfunc SetEngineInfo(proto Protocol, fileName, homeDir string) error {\n\tvar cfn, chome *C.char\n\tif fileName != \"\" {\n\t\tcfn = C.CString(fileName)\n\t\tdefer C.free(unsafe.Pointer(cfn))\n\t}\n\tif homeDir != \"\" {\n\t\tchome = C.CString(homeDir)\n\t\tdefer C.free(unsafe.Pointer(chome))\n\t}\n\treturn handleError(C.gpgme_set_engine_info(C.gpgme_protocol_t(proto), cfn, chome))\n}\n\nfunc GetDirInfo(what string) string {\n\tcwhat := C.CString(what)\n\tdefer C.free(unsafe.Pointer(cwhat))\n\n\tcdir := C.gpgme_get_dirinfo(cwhat)\n\tif cdir == nil {\n\t\treturn \"\"\n\t}\n\treturn C.GoString(cdir)\n}\n\nfunc FindKeys(pattern string, secretOnly bool) ([]*Key, error) {\n\tvar keys []*Key\n\tctx, err := New()\n\tif err != nil {\n\t\treturn keys, err\n\t}\n\tdefer ctx.Release()\n\tif err := ctx.KeyListStart(pattern, secretOnly); err != nil {\n\t\treturn keys, err\n\t}\n\tdefer func() { _ = ctx.KeyListEnd() }()\n\tfor ctx.KeyListNext() {\n\t\tkeys = append(keys, ctx.Key)\n\t}\n\tif ctx.KeyError != nil {\n\t\treturn keys, ctx.KeyError\n\t}\n\treturn keys, nil\n}\n\nfunc Decrypt(r io.Reader) (*Data, error) {\n\tctx, err := New()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer ctx.Release()\n\tcipher, err := NewDataReader(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer cipher.Close()\n\tplain, err := NewData()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := ctx.Decrypt(cipher, plain); err != nil {\n\t\treturn nil, err\n\t}\n\t_, err = plain.Seek(0, SeekSet)\n\treturn plain, err\n}\n\ntype Context struct {\n\tKey      *Key\n\tKeyError error\n\n\tcallback Callback\n\tcbc      cgo.Handle // WARNING: Call runtime.KeepAlive(c) after ANY use of c.cbc in C (typically via c.ctx)\n\n\tctx C.gpgme_ctx_t // WARNING: Call runtime.KeepAlive(c) after ANY passing of c.ctx to C\n}\n\nfunc New() (*Context, error) {\n\tc := &Context{}\n\terr := C.gpgme_new(&c.ctx)\n\truntime.SetFinalizer(c, (*Context).Release)\n\treturn c, handleError(err)\n}\n\nfunc (c *Context) Release() {\n\tif c.ctx == nil {\n\t\treturn\n\t}\n\tif c.cbc > 0 {\n\t\tc.cbc.Delete()\n\t}\n\tC.gpgme_release(c.ctx)\n\truntime.KeepAlive(c)\n\tc.ctx = nil\n}\n\nfunc (c *Context) SetArmor(yes bool) {\n\tC.gpgme_set_armor(c.ctx, cbool(yes))\n\truntime.KeepAlive(c)\n}\n\nfunc (c *Context) Armor() bool {\n\tres := C.gpgme_get_armor(c.ctx) != 0\n\truntime.KeepAlive(c)\n\treturn res\n}\n\nfunc (c *Context) SetTextMode(yes bool) {\n\tC.gpgme_set_textmode(c.ctx, cbool(yes))\n\truntime.KeepAlive(c)\n}\n\nfunc (c *Context) TextMode() bool {\n\tres := C.gpgme_get_textmode(c.ctx) != 0\n\truntime.KeepAlive(c)\n\treturn res\n}\n\nfunc (c *Context) SetProtocol(p Protocol) error {\n\terr := handleError(C.gpgme_set_protocol(c.ctx, C.gpgme_protocol_t(p)))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) Protocol() Protocol {\n\tres := Protocol(C.gpgme_get_protocol(c.ctx))\n\truntime.KeepAlive(c)\n\treturn res\n}\n\nfunc (c *Context) SetKeyListMode(m KeyListMode) error {\n\terr := handleError(C.gpgme_set_keylist_mode(c.ctx, C.gpgme_keylist_mode_t(m)))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) KeyListMode() KeyListMode {\n\tres := KeyListMode(C.gpgme_get_keylist_mode(c.ctx))\n\truntime.KeepAlive(c)\n\treturn res\n}\n\nfunc (c *Context) SetPinEntryMode(m PinEntryMode) error {\n\terr := handleError(C.gpgme_set_pinentry_mode(c.ctx, C.gpgme_pinentry_mode_t(m)))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) PinEntryMode() PinEntryMode {\n\tres := PinEntryMode(C.gpgme_get_pinentry_mode(c.ctx))\n\truntime.KeepAlive(c)\n\treturn res\n}\n\nfunc (c *Context) SetCallback(callback Callback) error {\n\tc.callback = callback\n\tif c.cbc > 0 {\n\t\tc.cbc.Delete()\n\t}\n\tif callback != nil {\n\t\tc.cbc = cgo.NewHandle(c)\n\t\tC.gpgme_set_passphrase_cb(c.ctx, C.gpgme_passphrase_cb_t(C.gogpgme_passfunc), unsafe.Pointer(&c.cbc))\n\t} else {\n\t\tc.cbc = 0\n\t\tC.gpgme_set_passphrase_cb(c.ctx, nil, nil)\n\t}\n\truntime.KeepAlive(c)\n\treturn nil\n}\n\nfunc (c *Context) EngineInfo() *EngineInfo {\n\tcInfo := C.gpgme_ctx_get_engine_info(c.ctx)\n\truntime.KeepAlive(c)\n\t// NOTE: c must be live as long as we are accessing cInfo.\n\tres := copyEngineInfo(cInfo)\n\truntime.KeepAlive(c) // for accesses to cInfo\n\treturn res\n}\n\nfunc (c *Context) SetEngineInfo(proto Protocol, fileName, homeDir string) error {\n\tvar cfn, chome *C.char\n\tif fileName != \"\" {\n\t\tcfn = C.CString(fileName)\n\t\tdefer C.free(unsafe.Pointer(cfn))\n\t}\n\tif homeDir != \"\" {\n\t\tchome = C.CString(homeDir)\n\t\tdefer C.free(unsafe.Pointer(chome))\n\t}\n\terr := handleError(C.gpgme_ctx_set_engine_info(c.ctx, C.gpgme_protocol_t(proto), cfn, chome))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) KeyListStart(pattern string, secretOnly bool) error {\n\tcpattern := C.CString(pattern)\n\tdefer C.free(unsafe.Pointer(cpattern))\n\terr := handleError(C.gpgme_op_keylist_start(c.ctx, cpattern, cbool(secretOnly)))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) KeyListNext() bool {\n\tc.Key = newKey()\n\terr := handleError(C.gpgme_op_keylist_next(c.ctx, &c.Key.k))\n\truntime.KeepAlive(c) // implies runtime.KeepAlive(c.Key)\n\tif err != nil {\n\t\tif e, ok := err.(Error); ok && e.Code() == ErrorEOF {\n\t\t\tc.KeyError = nil\n\t\t} else {\n\t\t\tc.KeyError = err\n\t\t}\n\t\treturn false\n\t}\n\tc.KeyError = nil\n\treturn true\n}\n\nfunc (c *Context) KeyListEnd() error {\n\terr := handleError(C.gpgme_op_keylist_end(c.ctx))\n\truntime.KeepAlive(c)\n\treturn err\n}\n\nfunc (c *Context) GetKey(fingerprint string, secret bool) (*Key, error) {\n\tkey := newKey()\n\tcfpr := C.CString(fingerprint)\n\tdefer C.free(unsafe.Pointer(cfpr))\n\terr := handleError(C.gpgme_get_key(c.ctx, cfpr, &key.k, cbool(secret)))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(key)\n\tkeyKIsNil := key.k == nil\n\truntime.KeepAlive(key)\n\tif e, ok := err.(Error); keyKIsNil && ok && e.Code() == ErrorEOF {\n\t\treturn nil, fmt.Errorf(\"key %q not found\", fingerprint)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn key, nil\n}\n\nfunc (c *Context) Decrypt(ciphertext, plaintext *Data) error {\n\terr := handleError(C.gpgme_op_decrypt(c.ctx, ciphertext.dh, plaintext.dh))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(ciphertext)\n\truntime.KeepAlive(plaintext)\n\treturn err\n}\n\nfunc (c *Context) DecryptVerify(ciphertext, plaintext *Data) error {\n\terr := handleError(C.gpgme_op_decrypt_verify(c.ctx, ciphertext.dh, plaintext.dh))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(ciphertext)\n\truntime.KeepAlive(plaintext)\n\treturn err\n}\n\ntype Signature struct {\n\tSummary        SigSum\n\tFingerprint    string\n\tStatus         error\n\tTimestamp      time.Time\n\tExpTimestamp   time.Time\n\tWrongKeyUsage  bool\n\tPKATrust       uint\n\tChainModel     bool\n\tValidity       Validity\n\tValidityReason error\n\tPubkeyAlgo     PubkeyAlgo\n\tHashAlgo       HashAlgo\n}\n\nfunc (c *Context) Verify(sig, signedText, plain *Data) (string, []Signature, error) {\n\tvar signedTextPtr, plainPtr C.gpgme_data_t = nil, nil\n\tif signedText != nil {\n\t\tsignedTextPtr = signedText.dh\n\t}\n\tif plain != nil {\n\t\tplainPtr = plain.dh\n\t}\n\terr := handleError(C.gpgme_op_verify(c.ctx, sig.dh, signedTextPtr, plainPtr))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(sig)\n\tif signedText != nil {\n\t\truntime.KeepAlive(signedText)\n\t}\n\tif plain != nil {\n\t\truntime.KeepAlive(plain)\n\t}\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tres := C.gpgme_op_verify_result(c.ctx)\n\truntime.KeepAlive(c)\n\t// NOTE: c must be live as long as we are accessing res.\n\tsigs := []Signature{}\n\tfor s := res.signatures; s != nil; s = s.next {\n\t\tsig := Signature{\n\t\t\tSummary:     SigSum(s.summary),\n\t\t\tFingerprint: C.GoString(s.fpr),\n\t\t\tStatus:      handleError(s.status),\n\t\t\t// s.notations not implemented\n\t\t\tTimestamp:      time.Unix(int64(s.timestamp), 0),\n\t\t\tExpTimestamp:   time.Unix(int64(s.exp_timestamp), 0),\n\t\t\tWrongKeyUsage:  C.signature_wrong_key_usage(s) != 0,\n\t\t\tPKATrust:       uint(C.signature_pka_trust(s)),\n\t\t\tChainModel:     C.signature_chain_model(s) != 0,\n\t\t\tValidity:       Validity(s.validity),\n\t\t\tValidityReason: handleError(s.validity_reason),\n\t\t\tPubkeyAlgo:     PubkeyAlgo(s.pubkey_algo),\n\t\t\tHashAlgo:       HashAlgo(s.hash_algo),\n\t\t}\n\t\tsigs = append(sigs, sig)\n\t}\n\tfileName := C.GoString(res.file_name)\n\truntime.KeepAlive(c) // for all accesses to res above\n\treturn fileName, sigs, nil\n}\n\nfunc (c *Context) Encrypt(recipients []*Key, flags EncryptFlag, plaintext, ciphertext *Data) error {\n\tsize := unsafe.Sizeof(new(C.gpgme_key_t))\n\trecp := C.calloc(C.size_t(len(recipients)+1), C.size_t(size))\n\tdefer C.free(recp)\n\tfor i := range recipients {\n\t\tptr := (*C.gpgme_key_t)(unsafe.Pointer(uintptr(recp) + size*uintptr(i)))\n\t\t*ptr = recipients[i].k\n\t}\n\terr := C.gpgme_op_encrypt(c.ctx, (*C.gpgme_key_t)(recp), C.gpgme_encrypt_flags_t(flags), plaintext.dh, ciphertext.dh)\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(recipients)\n\truntime.KeepAlive(plaintext)\n\truntime.KeepAlive(ciphertext)\n\treturn handleError(err)\n}\n\nfunc (c *Context) Sign(signers []*Key, plain, sig *Data, mode SigMode) error {\n\tC.gpgme_signers_clear(c.ctx)\n\truntime.KeepAlive(c)\n\tfor _, k := range signers {\n\t\terr := handleError(C.gpgme_signers_add(c.ctx, k.k))\n\t\truntime.KeepAlive(c)\n\t\truntime.KeepAlive(k)\n\t\tif err != nil {\n\t\t\tC.gpgme_signers_clear(c.ctx)\n\t\t\truntime.KeepAlive(c)\n\t\t\treturn err\n\t\t}\n\t}\n\terr := handleError(C.gpgme_op_sign(c.ctx, plain.dh, sig.dh, C.gpgme_sig_mode_t(mode)))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(plain)\n\truntime.KeepAlive(sig)\n\treturn err\n}\n\ntype (\n\tAssuanDataCallback    func(data []byte) error\n\tAssuanInquireCallback func(name, args string) error\n\tAssuanStatusCallback  func(status, args string) error\n)\n\n// AssuanSend sends a raw Assuan command to gpg-agent\nfunc (c *Context) AssuanSend(\n\tcmd string,\n\tdata AssuanDataCallback,\n\tinquiry AssuanInquireCallback,\n\tstatus AssuanStatusCallback,\n) error {\n\tvar operr C.gpgme_error_t\n\n\tdataPtr := cgo.NewHandle(&data)\n\tinquiryPtr := cgo.NewHandle(&inquiry)\n\tstatusPtr := cgo.NewHandle(&status)\n\tcmdCStr := C.CString(cmd)\n\tdefer C.free(unsafe.Pointer(cmdCStr))\n\terr := C.gogpgme_op_assuan_transact_ext(\n\t\tc.ctx,\n\t\tcmdCStr,\n\t\tunsafe.Pointer(&dataPtr),\n\t\tunsafe.Pointer(&inquiryPtr),\n\t\tunsafe.Pointer(&statusPtr),\n\t\t&operr,\n\t)\n\truntime.KeepAlive(c)\n\n\tif handleError(operr) != nil {\n\t\treturn handleError(operr)\n\t}\n\treturn handleError(err)\n}\n\n//export gogpgme_assuan_data_callback\nfunc gogpgme_assuan_data_callback(handle unsafe.Pointer, data unsafe.Pointer, datalen C.size_t) C.gpgme_error_t {\n\th := *(*cgo.Handle)(handle)\n\tc := h.Value().(*AssuanDataCallback)\n\tif *c == nil {\n\t\treturn 0\n\t}\n\tif err := (*c)(C.GoBytes(data, C.int(datalen))); err != nil {\n\t\treturn C.gpgme_error(C.GPG_ERR_USER_1)\n\t}\n\treturn 0\n}\n\n//export gogpgme_assuan_inquiry_callback\nfunc gogpgme_assuan_inquiry_callback(handle unsafe.Pointer, cName *C.char, cArgs *C.char) C.gpgme_error_t {\n\tname := C.GoString(cName)\n\targs := C.GoString(cArgs)\n\th := *(*cgo.Handle)(handle)\n\tc := h.Value().(*AssuanInquireCallback)\n\tif *c == nil {\n\t\treturn 0\n\t}\n\tif err := (*c)(name, args); err != nil {\n\t\treturn C.gpgme_error(C.GPG_ERR_USER_1)\n\t}\n\treturn 0\n}\n\n//export gogpgme_assuan_status_callback\nfunc gogpgme_assuan_status_callback(handle unsafe.Pointer, cStatus *C.char, cArgs *C.char) C.gpgme_error_t {\n\tstatus := C.GoString(cStatus)\n\targs := C.GoString(cArgs)\n\th := *(*cgo.Handle)(handle)\n\tc := h.Value().(*AssuanStatusCallback)\n\tif *c == nil {\n\t\treturn 0\n\t}\n\tif err := (*c)(status, args); err != nil {\n\t\treturn C.gpgme_error(C.GPG_ERR_USER_1)\n\t}\n\treturn 0\n}\n\n// ExportModeFlags defines how keys are exported from Export\ntype ExportModeFlags uint\n\nconst (\n\tExportModeExtern  ExportModeFlags = C.GPGME_EXPORT_MODE_EXTERN\n\tExportModeMinimal ExportModeFlags = C.GPGME_EXPORT_MODE_MINIMAL\n)\n\nfunc (c *Context) Export(pattern string, mode ExportModeFlags, data *Data) error {\n\tpat := C.CString(pattern)\n\tdefer C.free(unsafe.Pointer(pat))\n\terr := handleError(C.gpgme_op_export(c.ctx, pat, C.gpgme_export_mode_t(mode), data.dh))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(data)\n\treturn err\n}\n\n// ImportStatusFlags describes the type of ImportStatus.Status. The C API in gpgme.h simply uses \"unsigned\".\ntype ImportStatusFlags uint\n\nconst (\n\tImportNew    ImportStatusFlags = C.GPGME_IMPORT_NEW\n\tImportUID    ImportStatusFlags = C.GPGME_IMPORT_UID\n\tImportSIG    ImportStatusFlags = C.GPGME_IMPORT_SIG\n\tImportSubKey ImportStatusFlags = C.GPGME_IMPORT_SUBKEY\n\tImportSecret ImportStatusFlags = C.GPGME_IMPORT_SECRET\n)\n\ntype ImportStatus struct {\n\tFingerprint string\n\tResult      error\n\tStatus      ImportStatusFlags\n}\n\ntype ImportResult struct {\n\tConsidered      int\n\tNoUserID        int\n\tImported        int\n\tImportedRSA     int\n\tUnchanged       int\n\tNewUserIDs      int\n\tNewSubKeys      int\n\tNewSignatures   int\n\tNewRevocations  int\n\tSecretRead      int\n\tSecretImported  int\n\tSecretUnchanged int\n\tNotImported     int\n\tImports         []ImportStatus\n}\n\nfunc (c *Context) Import(keyData *Data) (*ImportResult, error) {\n\terr := handleError(C.gpgme_op_import(c.ctx, keyData.dh))\n\truntime.KeepAlive(c)\n\truntime.KeepAlive(keyData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := C.gpgme_op_import_result(c.ctx)\n\truntime.KeepAlive(c)\n\t// NOTE: c must be live as long as we are accessing res.\n\timports := []ImportStatus{}\n\tfor s := res.imports; s != nil; s = s.next {\n\t\timports = append(imports, ImportStatus{\n\t\t\tFingerprint: C.GoString(s.fpr),\n\t\t\tResult:      handleError(s.result),\n\t\t\tStatus:      ImportStatusFlags(s.status),\n\t\t})\n\t}\n\timportResult := &ImportResult{\n\t\tConsidered:      int(res.considered),\n\t\tNoUserID:        int(res.no_user_id),\n\t\tImported:        int(res.imported),\n\t\tImportedRSA:     int(res.imported_rsa),\n\t\tUnchanged:       int(res.unchanged),\n\t\tNewUserIDs:      int(res.new_user_ids),\n\t\tNewSubKeys:      int(res.new_sub_keys),\n\t\tNewSignatures:   int(res.new_signatures),\n\t\tNewRevocations:  int(res.new_revocations),\n\t\tSecretRead:      int(res.secret_read),\n\t\tSecretImported:  int(res.secret_imported),\n\t\tSecretUnchanged: int(res.secret_unchanged),\n\t\tNotImported:     int(res.not_imported),\n\t\tImports:         imports,\n\t}\n\truntime.KeepAlive(c) // for all accesses to res above\n\treturn importResult, nil\n}\n\ntype Key struct {\n\tk C.gpgme_key_t // WARNING: Call Runtime.KeepAlive(k) after ANY passing of k.k to C\n}\n\nfunc newKey() *Key {\n\tk := &Key{}\n\truntime.SetFinalizer(k, (*Key).Release)\n\treturn k\n}\n\nfunc (k *Key) Release() {\n\tC.gpgme_key_release(k.k)\n\truntime.KeepAlive(k)\n\tk.k = nil\n}\n\nfunc (k *Key) Revoked() bool {\n\tres := C.key_revoked(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Expired() bool {\n\tres := C.key_expired(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Disabled() bool {\n\tres := C.key_disabled(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Invalid() bool {\n\tres := C.key_invalid(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) CanEncrypt() bool {\n\tres := C.key_can_encrypt(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) CanSign() bool {\n\tres := C.key_can_sign(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) CanCertify() bool {\n\tres := C.key_can_certify(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Secret() bool {\n\tres := C.key_secret(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) CanAuthenticate() bool {\n\tres := C.key_can_authenticate(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) IsQualified() bool {\n\tres := C.key_is_qualified(k.k) != 0\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Protocol() Protocol {\n\tres := Protocol(k.k.protocol)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) IssuerSerial() string {\n\tres := C.GoString(k.k.issuer_serial)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) IssuerName() string {\n\tres := C.GoString(k.k.issuer_name)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) ChainID() string {\n\tres := C.GoString(k.k.chain_id)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) OwnerTrust() Validity {\n\tres := Validity(k.k.owner_trust)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) SubKeys() *SubKey {\n\tsubKeys := k.k.subkeys\n\truntime.KeepAlive(k)\n\tif subKeys == nil {\n\t\treturn nil\n\t}\n\treturn &SubKey{k: subKeys, parent: k} // The parent: k reference ensures subKeys remains valid\n}\n\nfunc (k *Key) UserIDs() *UserID {\n\tuids := k.k.uids\n\truntime.KeepAlive(k)\n\tif uids == nil {\n\t\treturn nil\n\t}\n\treturn &UserID{u: uids, parent: k} // The parent: k reference ensures uids remains valid\n}\n\nfunc (k *Key) KeyListMode() KeyListMode {\n\tres := KeyListMode(k.k.keylist_mode)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\nfunc (k *Key) Fingerprint() string {\n\tres := C.GoString(k.k.fpr)\n\truntime.KeepAlive(k)\n\treturn res\n}\n\ntype SubKey struct {\n\tk      C.gpgme_subkey_t\n\tparent *Key // make sure the key is not released when we have a reference to a subkey\n}\n\nfunc (k *SubKey) Next() *SubKey {\n\tif k.k.next == nil {\n\t\treturn nil\n\t}\n\treturn &SubKey{k: k.k.next, parent: k.parent}\n}\n\nfunc (k *SubKey) Revoked() bool {\n\treturn C.subkey_revoked(k.k) != 0\n}\n\nfunc (k *SubKey) Expired() bool {\n\treturn C.subkey_expired(k.k) != 0\n}\n\nfunc (k *SubKey) Disabled() bool {\n\treturn C.subkey_disabled(k.k) != 0\n}\n\nfunc (k *SubKey) Invalid() bool {\n\treturn C.subkey_invalid(k.k) != 0\n}\n\nfunc (k *SubKey) Secret() bool {\n\treturn C.subkey_secret(k.k) != 0\n}\n\nfunc (k *SubKey) KeyID() string {\n\treturn C.GoString(k.k.keyid)\n}\n\nfunc (k *SubKey) Fingerprint() string {\n\treturn C.GoString(k.k.fpr)\n}\n\nfunc (k *SubKey) Created() time.Time {\n\tif k.k.timestamp <= 0 {\n\t\treturn time.Time{}\n\t}\n\treturn time.Unix(int64(k.k.timestamp), 0)\n}\n\nfunc (k *SubKey) Expires() time.Time {\n\tif k.k.expires <= 0 {\n\t\treturn time.Time{}\n\t}\n\treturn time.Unix(int64(k.k.expires), 0)\n}\n\nfunc (k *SubKey) CardNumber() string {\n\treturn C.GoString(k.k.card_number)\n}\n\ntype UserID struct {\n\tu      C.gpgme_user_id_t\n\tparent *Key // make sure the key is not released when we have a reference to a user ID\n}\n\nfunc (u *UserID) Next() *UserID {\n\tif u.u.next == nil {\n\t\treturn nil\n\t}\n\treturn &UserID{u: u.u.next, parent: u.parent}\n}\n\nfunc (u *UserID) Revoked() bool {\n\treturn C.uid_revoked(u.u) != 0\n}\n\nfunc (u *UserID) Invalid() bool {\n\treturn C.uid_invalid(u.u) != 0\n}\n\nfunc (u *UserID) Validity() Validity {\n\treturn Validity(u.u.validity)\n}\n\nfunc (u *UserID) UID() string {\n\treturn C.GoString(u.u.uid)\n}\n\nfunc (u *UserID) Name() string {\n\treturn C.GoString(u.u.name)\n}\n\nfunc (u *UserID) Comment() string {\n\treturn C.GoString(u.u.comment)\n}\n\nfunc (u *UserID) Email() string {\n\treturn C.GoString(u.u.email)\n}\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/unset_agent_info.go",
    "content": "//go:build !windows\n// +build !windows\n\npackage gpgme\n\n// #include <stdlib.h>\nimport \"C\"\nimport (\n\t\"unsafe\"\n)\n\n// This is somewhat of a horrible hack. We need to unset GPG_AGENT_INFO so that gpgme does not pass --use-agent to GPG.\n// os.Unsetenv should be enough, but that only calls the underlying C library (which gpgme uses) if cgo is involved\n// - and cgo can't be used in tests. So, provide this helper for test initialization.\nfunc unsetenvGPGAgentInfo() {\n\tv := C.CString(\"GPG_AGENT_INFO\")\n\tdefer C.free(unsafe.Pointer(v))\n\tC.unsetenv(v)\n}\n"
  },
  {
    "path": "vendor/github.com/proglottis/gpgme/unset_agent_info_windows.go",
    "content": "package gpgme\n\n// #include <stdlib.h>\nimport \"C\"\nimport (\n\t\"unsafe\"\n)\n\n// unsetenv is not available in mingw\nfunc unsetenvGPGAgentInfo() {\n\tv := C.CString(\"GPG_AGENT_INFO=\")\n\tdefer C.free(unsafe.Pointer(v))\n\tC.putenv(v)\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/.gitmodules",
    "content": "[submodule \"testdata/JSON-Schema-Test-Suite\"]\n\tpath = testdata/JSON-Schema-Test-Suite\n\turl = https://github.com/json-schema-org/JSON-Schema-Test-Suite.git\n\tbranch = main\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/.golangci.yml",
    "content": "version: \"2\"\nlinters:\n  enable:\n    - nakedret\n    - errname\n    - godot\n    - misspell\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/.pre-commit-hooks.yaml",
    "content": "- id: jsonschema-validate\n  name: Validate JSON against JSON Schema\n  description: ensure json files follow specified JSON Schema\n  entry: jv\n  language: golang\n  additional_dependencies:\n  - ./cmd/jv\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/LICENSE",
    "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."
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/README.md",
    "content": "# jsonschema v6.0.2\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GoDoc](https://godoc.org/github.com/santhosh-tekuri/jsonschema?status.svg)](https://pkg.go.dev/github.com/santhosh-tekuri/jsonschema/v6)\n[![Go Report Card](https://goreportcard.com/badge/github.com/santhosh-tekuri/jsonschema/v6)](https://goreportcard.com/report/github.com/santhosh-tekuri/jsonschema/v6)\n[![Build Status](https://github.com/santhosh-tekuri/jsonschema/actions/workflows/go.yaml/badge.svg?branch=boon)](https://github.com/santhosh-tekuri/jsonschema/actions/workflows/go.yaml)\n[![codecov](https://codecov.io/gh/santhosh-tekuri/jsonschema/branch/boon/graph/badge.svg?token=JMVj1pFT2l)](https://codecov.io/gh/santhosh-tekuri/jsonschema/tree/boon)\n\nsee [godoc](https://pkg.go.dev/github.com/santhosh-tekuri/jsonschema/v6) for examples\n\n## Library Features\n\n- [x] pass [JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) excluding optional(compare with other impls at [bowtie](https://bowtie-json-schema.github.io/bowtie/#))\n  - [x] [![draft-04](https://img.shields.io/endpoint?url=https://bowtie.report/badges/go-jsonschema/compliance/draft4.json)](https://bowtie.report/#/dialects/draft4)\n  - [x] [![draft-06](https://img.shields.io/endpoint?url=https://bowtie.report/badges/go-jsonschema/compliance/draft6.json)](https://bowtie.report/#/dialects/draft6)\n  - [x] [![draft-07](https://img.shields.io/endpoint?url=https://bowtie.report/badges/go-jsonschema/compliance/draft7.json)](https://bowtie.report/#/dialects/draft7)\n  - [x] [![draft/2019-09](https://img.shields.io/endpoint?url=https://bowtie.report/badges/go-jsonschema/compliance/draft2019-09.json)](https://bowtie.report/#/dialects/draft2019-09)\n  - [x] [![draft/2020-12](https://img.shields.io/endpoint?url=https://bowtie.report/badges/go-jsonschema/compliance/draft2020-12.json)](https://bowtie.report/#/dialects/draft2020-12)\n- [x] detect infinite loop traps\n  - [x] `$schema` cycle\n  - [x] validation cycle\n- [x] custom `$schema` url\n- [x] vocabulary based validation\n- [x] custom regex engine\n- [x] format assertions\n  - [x] flag to enable in draft >= 2019-09\n  - [x] custom format registration\n  - [x] built-in formats\n    - [x] regex, uuid\n    - [x] ipv4, ipv6\n    - [x] hostname, email\n    - [x] date, time, date-time, duration\n    - [x] json-pointer, relative-json-pointer\n    - [x] uri, uri-reference, uri-template\n    - [x] iri, iri-reference\n    - [x] period, semver\n- [x] content assertions\n  - [x] flag to enable in draft >= 7\n  - [x] contentEncoding\n    - [x] base64\n    - [x] custom\n  - [x] contentMediaType\n    - [x] application/json\n    - [x] custom\n  - [x] contentSchema\n- [x] errors\n  - [x] introspectable\n  - [x] hierarchy\n    - [x] alternative display with `#`\n  - [x] output\n    - [x] flag\n    - [x] basic\n    - [x] detailed\n- [x] custom vocabulary\n    - enable via `$vocabulary` for draft >=2019-19\n    - enable via flag for draft <= 7\n- [x] mixed dialect support\n\n## CLI v0.7.0\n\nto install: `go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest`\n\nNote that the cli is versioned independently. you can see it in git tags `cmd/jv/v0.7.0`\n\n```\nUsage: jv [OPTIONS] SCHEMA [INSTANCE...]\n\nOptions:\n  -c, --assert-content    Enable content assertions with draft >= 7\n  -f, --assert-format     Enable format assertions with draft >= 2019\n      --cacert pem-file   Use the specified pem-file to verify the peer. The file may contain multiple CA certificates\n  -d, --draft version     Draft version used when '$schema' is missing. Valid values 4, 6, 7, 2019, 2020 (default 2020)\n  -h, --help              Print help information\n  -k, --insecure          Use insecure TLS connection\n  -o, --output format     Output format. Valid values simple, alt, flag, basic, detailed (default \"simple\")\n  -q, --quiet             Do not print errors\n  -v, --version           Print build information\n```\n\n- [x] exit code `1` for validation errors, `2` for usage errors\n- [x] validate both schema and multiple instances\n- [x] support both json and yaml files\n- [x] support standard input, use `-`\n- [x] quite mode with parsable output\n- [x] http(s) url support\n  - [x] custom certs for validation, use `--cacert`\n  - [x] flag to skip certificate verification, use `--insecure`\n\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/compiler.go",
    "content": "package jsonschema\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"slices\"\n)\n\n// Compiler compiles json schema into *Schema.\ntype Compiler struct {\n\tschemas       map[urlPtr]*Schema\n\troots         *roots\n\tformats       map[string]*Format\n\tdecoders      map[string]*Decoder\n\tmediaTypes    map[string]*MediaType\n\tassertFormat  bool\n\tassertContent bool\n}\n\n// NewCompiler create Compiler Object.\nfunc NewCompiler() *Compiler {\n\treturn &Compiler{\n\t\tschemas:       map[urlPtr]*Schema{},\n\t\troots:         newRoots(),\n\t\tformats:       map[string]*Format{},\n\t\tdecoders:      map[string]*Decoder{},\n\t\tmediaTypes:    map[string]*MediaType{},\n\t\tassertFormat:  false,\n\t\tassertContent: false,\n\t}\n}\n\n// DefaultDraft overrides the draft used to\n// compile schemas without `$schema` field.\n//\n// By default, this library uses the latest\n// draft supported.\n//\n// The use of this option is HIGHLY encouraged\n// to ensure continued correct operation of your\n// schema. The current default value will not stay\n// the same overtime.\nfunc (c *Compiler) DefaultDraft(d *Draft) {\n\tc.roots.defaultDraft = d\n}\n\n// AssertFormat always enables format assertions.\n//\n// Default Behavior:\n// for draft-07: enabled.\n// for draft/2019-09: disabled unless metaschema says `format` vocabulary is required.\n// for draft/2020-12: disabled unless metaschema says `format-assertion` vocabulary is required.\nfunc (c *Compiler) AssertFormat() {\n\tc.assertFormat = true\n}\n\n// AssertContent enables content assertions.\n//\n// Content assertions include keywords:\n//   - contentEncoding\n//   - contentMediaType\n//   - contentSchema\n//\n// Default behavior is always disabled.\nfunc (c *Compiler) AssertContent() {\n\tc.assertContent = true\n}\n\n// RegisterFormat registers custom format.\n//\n// NOTE:\n//   - \"regex\" format can not be overridden\n//   - format assertions are disabled for draft >= 2019-09\n//     see [Compiler.AssertFormat]\nfunc (c *Compiler) RegisterFormat(f *Format) {\n\tif f.Name != \"regex\" {\n\t\tc.formats[f.Name] = f\n\t}\n}\n\n// RegisterContentEncoding registers custom contentEncoding.\n//\n// NOTE: content assertions are disabled by default.\n// see [Compiler.AssertContent].\nfunc (c *Compiler) RegisterContentEncoding(d *Decoder) {\n\tc.decoders[d.Name] = d\n}\n\n// RegisterContentMediaType registers custom contentMediaType.\n//\n// NOTE: content assertions are disabled by default.\n// see [Compiler.AssertContent].\nfunc (c *Compiler) RegisterContentMediaType(mt *MediaType) {\n\tc.mediaTypes[mt.Name] = mt\n}\n\n// RegisterVocabulary registers custom vocabulary.\n//\n// NOTE:\n//   - vocabularies are disabled for draft >= 2019-09\n//     see [Compiler.AssertVocabs]\nfunc (c *Compiler) RegisterVocabulary(vocab *Vocabulary) {\n\tc.roots.vocabularies[vocab.URL] = vocab\n}\n\n// AssertVocabs always enables user-defined vocabularies assertions.\n//\n// Default Behavior:\n// for draft-07: enabled.\n// for draft/2019-09: disabled unless metaschema enables a vocabulary.\n// for draft/2020-12: disabled unless metaschema enables a vocabulary.\nfunc (c *Compiler) AssertVocabs() {\n\tc.roots.assertVocabs = true\n}\n\n// AddResource adds schema resource which gets used later in reference\n// resolution.\n//\n// The argument url can be file path or url. Any fragment in url is ignored.\n// The argument doc must be valid json value.\nfunc (c *Compiler) AddResource(url string, doc any) error {\n\tuf, err := absolute(url)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif isMeta(string(uf.url)) {\n\t\treturn &ResourceExistsError{string(uf.url)}\n\t}\n\tif !c.roots.loader.add(uf.url, doc) {\n\t\treturn &ResourceExistsError{string(uf.url)}\n\t}\n\treturn nil\n}\n\n// UseLoader overrides the default [URLLoader] used\n// to load schema resources.\nfunc (c *Compiler) UseLoader(loader URLLoader) {\n\tc.roots.loader.loader = loader\n}\n\n// UseRegexpEngine changes the regexp-engine used.\n// By default it uses regexp package from go standard\n// library.\n//\n// NOTE: must be called before compiling any schemas.\nfunc (c *Compiler) UseRegexpEngine(engine RegexpEngine) {\n\tif engine == nil {\n\t\tengine = goRegexpCompile\n\t}\n\tc.roots.regexpEngine = engine\n}\n\nfunc (c *Compiler) enqueue(q *queue, up urlPtr) *Schema {\n\tif sch, ok := c.schemas[up]; ok {\n\t\t// already got compiled\n\t\treturn sch\n\t}\n\tif sch := q.get(up); sch != nil {\n\t\treturn sch\n\t}\n\tsch := newSchema(up)\n\tq.append(sch)\n\treturn sch\n}\n\n// MustCompile is like [Compile] but panics if compilation fails.\n// It simplifies safe initialization of global variables holding\n// compiled schema.\nfunc (c *Compiler) MustCompile(loc string) *Schema {\n\tsch, err := c.Compile(loc)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"jsonschema: Compile(%q): %v\", loc, err))\n\t}\n\treturn sch\n}\n\n// Compile compiles json-schema at given loc.\nfunc (c *Compiler) Compile(loc string) (*Schema, error) {\n\tuf, err := absolute(loc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tup, err := c.roots.resolveFragment(*uf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c.doCompile(up)\n}\n\nfunc (c *Compiler) doCompile(up urlPtr) (*Schema, error) {\n\tq := &queue{}\n\tcompiled := 0\n\n\tc.enqueue(q, up)\n\tfor q.len() > compiled {\n\t\tsch := q.at(compiled)\n\t\tif err := c.roots.ensureSubschema(sch.up); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tr := c.roots.roots[sch.up.url]\n\t\tv, err := sch.up.lookup(r.doc)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := c.compileValue(v, sch, r, q); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcompiled++\n\t}\n\tfor _, sch := range *q {\n\t\tc.schemas[sch.up] = sch\n\t}\n\treturn c.schemas[up], nil\n}\n\nfunc (c *Compiler) compileValue(v any, sch *Schema, r *root, q *queue) error {\n\tres := r.resource(sch.up.ptr)\n\tsch.DraftVersion = res.dialect.draft.version\n\n\tbase := urlPtr{sch.up.url, res.ptr}\n\tsch.resource = c.enqueue(q, base)\n\n\t// if resource, enqueue dynamic anchors for compilation\n\tif sch.DraftVersion >= 2020 && sch.up == sch.resource.up {\n\t\tres := r.resource(sch.up.ptr)\n\t\tfor anchor, anchorPtr := range res.anchors {\n\t\t\tif slices.Contains(res.dynamicAnchors, anchor) {\n\t\t\t\tup := urlPtr{sch.up.url, anchorPtr}\n\t\t\t\tdanchorSch := c.enqueue(q, up)\n\t\t\t\tif sch.dynamicAnchors == nil {\n\t\t\t\t\tsch.dynamicAnchors = map[string]*Schema{}\n\t\t\t\t}\n\t\t\t\tsch.dynamicAnchors[string(anchor)] = danchorSch\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch v := v.(type) {\n\tcase bool:\n\t\tsch.Bool = &v\n\tcase map[string]any:\n\t\tif err := c.compileObject(v, sch, r, q); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tsch.allPropsEvaluated = sch.AdditionalProperties != nil\n\tif sch.DraftVersion < 2020 {\n\t\tsch.allItemsEvaluated = sch.AdditionalItems != nil\n\t\tswitch items := sch.Items.(type) {\n\t\tcase *Schema:\n\t\t\tsch.allItemsEvaluated = true\n\t\tcase []*Schema:\n\t\t\tsch.numItemsEvaluated = len(items)\n\t\t}\n\t} else {\n\t\tsch.allItemsEvaluated = sch.Items2020 != nil\n\t\tsch.numItemsEvaluated = len(sch.PrefixItems)\n\t}\n\n\treturn nil\n}\n\nfunc (c *Compiler) compileObject(obj map[string]any, sch *Schema, r *root, q *queue) error {\n\tif len(obj) == 0 {\n\t\tb := true\n\t\tsch.Bool = &b\n\t\treturn nil\n\t}\n\toc := objCompiler{\n\t\tc:   c,\n\t\tobj: obj,\n\t\tup:  sch.up,\n\t\tr:   r,\n\t\tres: r.resource(sch.up.ptr),\n\t\tq:   q,\n\t}\n\treturn oc.compile(sch)\n}\n\n// queue --\n\ntype queue []*Schema\n\nfunc (q *queue) append(sch *Schema) {\n\t*q = append(*q, sch)\n}\n\nfunc (q *queue) at(i int) *Schema {\n\treturn (*q)[i]\n}\n\nfunc (q *queue) len() int {\n\treturn len(*q)\n}\n\nfunc (q *queue) get(up urlPtr) *Schema {\n\ti := slices.IndexFunc(*q, func(sch *Schema) bool { return sch.up == up })\n\tif i != -1 {\n\t\treturn (*q)[i]\n\t}\n\treturn nil\n}\n\n// regexp --\n\n// Regexp is the representation of compiled regular expression.\ntype Regexp interface {\n\tfmt.Stringer\n\n\t// MatchString reports whether the string s contains\n\t// any match of the regular expression.\n\tMatchString(string) bool\n}\n\n// RegexpEngine parses a regular expression and returns,\n// if successful, a Regexp object that can be used to\n// match against text.\ntype RegexpEngine func(string) (Regexp, error)\n\nfunc (re RegexpEngine) validate(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\t_, err := re(s)\n\treturn err\n}\n\nfunc goRegexpCompile(s string) (Regexp, error) {\n\treturn regexp.Compile(s)\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/content.go",
    "content": "package jsonschema\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n)\n\n// Decoder specifies how to decode specific contentEncoding.\ntype Decoder struct {\n\t// Name of contentEncoding.\n\tName string\n\t// Decode given string to byte array.\n\tDecode func(string) ([]byte, error)\n}\n\nvar decoders = map[string]*Decoder{\n\t\"base64\": {\n\t\tName: \"base64\",\n\t\tDecode: func(s string) ([]byte, error) {\n\t\t\treturn base64.StdEncoding.DecodeString(s)\n\t\t},\n\t},\n}\n\n// MediaType specified how to validate bytes against specific contentMediaType.\ntype MediaType struct {\n\t// Name of contentMediaType.\n\tName string\n\n\t// Validate checks whether bytes conform to this mediatype.\n\tValidate func([]byte) error\n\n\t// UnmarshalJSON unmarshals bytes into json value.\n\t// This must be nil if this mediatype is not compatible\n\t// with json.\n\tUnmarshalJSON func([]byte) (any, error)\n}\n\nvar mediaTypes = map[string]*MediaType{\n\t\"application/json\": {\n\t\tName: \"application/json\",\n\t\tValidate: func(b []byte) error {\n\t\t\tvar v any\n\t\t\treturn json.Unmarshal(b, &v)\n\t\t},\n\t\tUnmarshalJSON: func(b []byte) (any, error) {\n\t\t\treturn UnmarshalJSON(bytes.NewReader(b))\n\t\t},\n\t},\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/draft.go",
    "content": "package jsonschema\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n)\n\n// A Draft represents json-schema specification.\ntype Draft struct {\n\tversion       int\n\turl           string\n\tsch           *Schema\n\tid            string             // property name used to represent id\n\tsubschemas    []SchemaPath       // locations of subschemas\n\tvocabPrefix   string             // prefix used for vocabulary\n\tallVocabs     map[string]*Schema // names of supported vocabs with its schemas\n\tdefaultVocabs []string           // names of default vocabs\n}\n\n// String returns the specification url.\nfunc (d *Draft) String() string {\n\treturn d.url\n}\n\nvar (\n\tDraft4 = &Draft{\n\t\tversion: 4,\n\t\turl:     \"http://json-schema.org/draft-04/schema\",\n\t\tid:      \"id\",\n\t\tsubschemas: []SchemaPath{\n\t\t\t// type agonistic\n\t\t\tschemaPath(\"definitions/*\"),\n\t\t\tschemaPath(\"not\"),\n\t\t\tschemaPath(\"allOf/[]\"),\n\t\t\tschemaPath(\"anyOf/[]\"),\n\t\t\tschemaPath(\"oneOf/[]\"),\n\t\t\t// object\n\t\t\tschemaPath(\"properties/*\"),\n\t\t\tschemaPath(\"additionalProperties\"),\n\t\t\tschemaPath(\"patternProperties/*\"),\n\t\t\t// array\n\t\t\tschemaPath(\"items\"),\n\t\t\tschemaPath(\"items/[]\"),\n\t\t\tschemaPath(\"additionalItems\"),\n\t\t\tschemaPath(\"dependencies/*\"),\n\t\t},\n\t\tvocabPrefix:   \"\",\n\t\tallVocabs:     map[string]*Schema{},\n\t\tdefaultVocabs: []string{},\n\t}\n\n\tDraft6 = &Draft{\n\t\tversion: 6,\n\t\turl:     \"http://json-schema.org/draft-06/schema\",\n\t\tid:      \"$id\",\n\t\tsubschemas: joinSubschemas(Draft4.subschemas,\n\t\t\tschemaPath(\"propertyNames\"),\n\t\t\tschemaPath(\"contains\"),\n\t\t),\n\t\tvocabPrefix:   \"\",\n\t\tallVocabs:     map[string]*Schema{},\n\t\tdefaultVocabs: []string{},\n\t}\n\n\tDraft7 = &Draft{\n\t\tversion: 7,\n\t\turl:     \"http://json-schema.org/draft-07/schema\",\n\t\tid:      \"$id\",\n\t\tsubschemas: joinSubschemas(Draft6.subschemas,\n\t\t\tschemaPath(\"if\"),\n\t\t\tschemaPath(\"then\"),\n\t\t\tschemaPath(\"else\"),\n\t\t),\n\t\tvocabPrefix:   \"\",\n\t\tallVocabs:     map[string]*Schema{},\n\t\tdefaultVocabs: []string{},\n\t}\n\n\tDraft2019 = &Draft{\n\t\tversion: 2019,\n\t\turl:     \"https://json-schema.org/draft/2019-09/schema\",\n\t\tid:      \"$id\",\n\t\tsubschemas: joinSubschemas(Draft7.subschemas,\n\t\t\tschemaPath(\"$defs/*\"),\n\t\t\tschemaPath(\"dependentSchemas/*\"),\n\t\t\tschemaPath(\"unevaluatedProperties\"),\n\t\t\tschemaPath(\"unevaluatedItems\"),\n\t\t\tschemaPath(\"contentSchema\"),\n\t\t),\n\t\tvocabPrefix: \"https://json-schema.org/draft/2019-09/vocab/\",\n\t\tallVocabs: map[string]*Schema{\n\t\t\t\"core\":       nil,\n\t\t\t\"applicator\": nil,\n\t\t\t\"validation\": nil,\n\t\t\t\"meta-data\":  nil,\n\t\t\t\"format\":     nil,\n\t\t\t\"content\":    nil,\n\t\t},\n\t\tdefaultVocabs: []string{\"core\", \"applicator\", \"validation\"},\n\t}\n\n\tDraft2020 = &Draft{\n\t\tversion: 2020,\n\t\turl:     \"https://json-schema.org/draft/2020-12/schema\",\n\t\tid:      \"$id\",\n\t\tsubschemas: joinSubschemas(Draft2019.subschemas,\n\t\t\tschemaPath(\"prefixItems/[]\"),\n\t\t),\n\t\tvocabPrefix: \"https://json-schema.org/draft/2020-12/vocab/\",\n\t\tallVocabs: map[string]*Schema{\n\t\t\t\"core\":              nil,\n\t\t\t\"applicator\":        nil,\n\t\t\t\"unevaluated\":       nil,\n\t\t\t\"validation\":        nil,\n\t\t\t\"meta-data\":         nil,\n\t\t\t\"format-annotation\": nil,\n\t\t\t\"format-assertion\":  nil,\n\t\t\t\"content\":           nil,\n\t\t},\n\t\tdefaultVocabs: []string{\"core\", \"applicator\", \"unevaluated\", \"validation\"},\n\t}\n\n\tdraftLatest = Draft2020\n)\n\nfunc init() {\n\tc := NewCompiler()\n\tc.AssertFormat()\n\tfor _, d := range []*Draft{Draft4, Draft6, Draft7, Draft2019, Draft2020} {\n\t\td.sch = c.MustCompile(d.url)\n\t\tfor name := range d.allVocabs {\n\t\t\td.allVocabs[name] = c.MustCompile(strings.TrimSuffix(d.url, \"schema\") + \"meta/\" + name)\n\t\t}\n\t}\n}\n\nfunc draftFromURL(url string) *Draft {\n\tu, frag := split(url)\n\tif frag != \"\" {\n\t\treturn nil\n\t}\n\tu, ok := strings.CutPrefix(u, \"http://\")\n\tif !ok {\n\t\tu, _ = strings.CutPrefix(u, \"https://\")\n\t}\n\tswitch u {\n\tcase \"json-schema.org/schema\":\n\t\treturn draftLatest\n\tcase \"json-schema.org/draft/2020-12/schema\":\n\t\treturn Draft2020\n\tcase \"json-schema.org/draft/2019-09/schema\":\n\t\treturn Draft2019\n\tcase \"json-schema.org/draft-07/schema\":\n\t\treturn Draft7\n\tcase \"json-schema.org/draft-06/schema\":\n\t\treturn Draft6\n\tcase \"json-schema.org/draft-04/schema\":\n\t\treturn Draft4\n\tdefault:\n\t\treturn nil\n\t}\n}\n\nfunc (d *Draft) getID(obj map[string]any) string {\n\tif d.version < 2019 {\n\t\tif _, ok := obj[\"$ref\"]; ok {\n\t\t\t// All other properties in a \"$ref\" object MUST be ignored\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\tid, ok := strVal(obj, d.id)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\tid, _ = split(id) // ignore fragment\n\treturn id\n}\n\nfunc (d *Draft) getVocabs(url url, doc any, vocabularies map[string]*Vocabulary) ([]string, error) {\n\tif d.version < 2019 {\n\t\treturn nil, nil\n\t}\n\tobj, ok := doc.(map[string]any)\n\tif !ok {\n\t\treturn nil, nil\n\t}\n\tv, ok := obj[\"$vocabulary\"]\n\tif !ok {\n\t\treturn nil, nil\n\t}\n\tobj, ok = v.(map[string]any)\n\tif !ok {\n\t\treturn nil, nil\n\t}\n\n\tvar vocabs []string\n\tfor vocab, reqd := range obj {\n\t\tif reqd, ok := reqd.(bool); !ok || !reqd {\n\t\t\tcontinue\n\t\t}\n\t\tname, ok := strings.CutPrefix(vocab, d.vocabPrefix)\n\t\tif ok {\n\t\t\tif _, ok := d.allVocabs[name]; ok {\n\t\t\t\tif !slices.Contains(vocabs, name) {\n\t\t\t\t\tvocabs = append(vocabs, name)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif _, ok := vocabularies[vocab]; !ok {\n\t\t\treturn nil, &UnsupportedVocabularyError{url.String(), vocab}\n\t\t}\n\t\tif !slices.Contains(vocabs, vocab) {\n\t\t\tvocabs = append(vocabs, vocab)\n\t\t}\n\t}\n\tif !slices.Contains(vocabs, \"core\") {\n\t\tvocabs = append(vocabs, \"core\")\n\t}\n\treturn vocabs, nil\n}\n\n// --\n\ntype dialect struct {\n\tdraft  *Draft\n\tvocabs []string // nil means use draft.defaultVocabs\n}\n\nfunc (d *dialect) hasVocab(name string) bool {\n\tif name == \"core\" || d.draft.version < 2019 {\n\t\treturn true\n\t}\n\tif d.vocabs != nil {\n\t\treturn slices.Contains(d.vocabs, name)\n\t}\n\treturn slices.Contains(d.draft.defaultVocabs, name)\n}\n\nfunc (d *dialect) activeVocabs(assertVocabs bool, vocabularies map[string]*Vocabulary) []string {\n\tif len(vocabularies) == 0 {\n\t\treturn d.vocabs\n\t}\n\tif d.draft.version < 2019 {\n\t\tassertVocabs = true\n\t}\n\tif !assertVocabs {\n\t\treturn d.vocabs\n\t}\n\tvar vocabs []string\n\tif d.vocabs == nil {\n\t\tvocabs = slices.Clone(d.draft.defaultVocabs)\n\t} else {\n\t\tvocabs = slices.Clone(d.vocabs)\n\t}\n\tfor vocab := range vocabularies {\n\t\tif !slices.Contains(vocabs, vocab) {\n\t\t\tvocabs = append(vocabs, vocab)\n\t\t}\n\t}\n\treturn vocabs\n}\n\nfunc (d *dialect) getSchema(assertVocabs bool, vocabularies map[string]*Vocabulary) *Schema {\n\tvocabs := d.activeVocabs(assertVocabs, vocabularies)\n\tif vocabs == nil {\n\t\treturn d.draft.sch\n\t}\n\n\tvar allOf []*Schema\n\tfor _, vocab := range vocabs {\n\t\tsch := d.draft.allVocabs[vocab]\n\t\tif sch == nil {\n\t\t\tif v, ok := vocabularies[vocab]; ok {\n\t\t\t\tsch = v.Schema\n\t\t\t}\n\t\t}\n\t\tif sch != nil {\n\t\t\tallOf = append(allOf, sch)\n\t\t}\n\t}\n\tif !slices.Contains(vocabs, \"core\") {\n\t\tsch := d.draft.allVocabs[\"core\"]\n\t\tif sch == nil {\n\t\t\tsch = d.draft.sch\n\t\t}\n\t\tallOf = append(allOf, sch)\n\t}\n\tsch := &Schema{\n\t\tLocation:     \"urn:mem:metaschema\",\n\t\tup:           urlPtr{url(\"urn:mem:metaschema\"), \"\"},\n\t\tDraftVersion: d.draft.version,\n\t\tAllOf:        allOf,\n\t}\n\tsch.resource = sch\n\tif sch.DraftVersion >= 2020 {\n\t\tsch.DynamicAnchor = \"meta\"\n\t\tsch.dynamicAnchors = map[string]*Schema{\n\t\t\t\"meta\": sch,\n\t\t}\n\t}\n\treturn sch\n}\n\n// --\n\ntype ParseIDError struct {\n\tURL string\n}\n\nfunc (e *ParseIDError) Error() string {\n\treturn fmt.Sprintf(\"error in parsing id at %q\", e.URL)\n}\n\n// --\n\ntype ParseAnchorError struct {\n\tURL string\n}\n\nfunc (e *ParseAnchorError) Error() string {\n\treturn fmt.Sprintf(\"error in parsing anchor at %q\", e.URL)\n}\n\n// --\n\ntype DuplicateIDError struct {\n\tID   string\n\tURL  string\n\tPtr1 string\n\tPtr2 string\n}\n\nfunc (e *DuplicateIDError) Error() string {\n\treturn fmt.Sprintf(\"duplicate id %q in %q at %q and %q\", e.ID, e.URL, e.Ptr1, e.Ptr2)\n}\n\n// --\n\ntype DuplicateAnchorError struct {\n\tAnchor string\n\tURL    string\n\tPtr1   string\n\tPtr2   string\n}\n\nfunc (e *DuplicateAnchorError) Error() string {\n\treturn fmt.Sprintf(\"duplicate anchor %q in %q at %q and %q\", e.Anchor, e.URL, e.Ptr1, e.Ptr2)\n}\n\n// --\n\nfunc joinSubschemas(a1 []SchemaPath, a2 ...SchemaPath) []SchemaPath {\n\tvar a []SchemaPath\n\ta = append(a, a1...)\n\ta = append(a, a2...)\n\treturn a\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/format.go",
    "content": "package jsonschema\n\nimport (\n\t\"net/netip\"\n\tgourl \"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Format defined specific format.\ntype Format struct {\n\t// Name of format.\n\tName string\n\n\t// Validate checks if given value is of this format.\n\tValidate func(v any) error\n}\n\nvar formats = map[string]*Format{\n\t\"json-pointer\":          {\"json-pointer\", validateJSONPointer},\n\t\"relative-json-pointer\": {\"relative-json-pointer\", validateRelativeJSONPointer},\n\t\"uuid\":                  {\"uuid\", validateUUID},\n\t\"duration\":              {\"duration\", validateDuration},\n\t\"period\":                {\"period\", validatePeriod},\n\t\"ipv4\":                  {\"ipv4\", validateIPV4},\n\t\"ipv6\":                  {\"ipv6\", validateIPV6},\n\t\"hostname\":              {\"hostname\", validateHostname},\n\t\"email\":                 {\"email\", validateEmail},\n\t\"date\":                  {\"date\", validateDate},\n\t\"time\":                  {\"time\", validateTime},\n\t\"date-time\":             {\"date-time\", validateDateTime},\n\t\"uri\":                   {\"uri\", validateURI},\n\t\"iri\":                   {\"iri\", validateURI},\n\t\"uri-reference\":         {\"uri-reference\", validateURIReference},\n\t\"iri-reference\":         {\"iri-reference\", validateURIReference},\n\t\"uri-template\":          {\"uri-template\", validateURITemplate},\n\t\"semver\":                {\"semver\", validateSemver},\n}\n\n// see https://www.rfc-editor.org/rfc/rfc6901#section-3\nfunc validateJSONPointer(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tif s == \"\" {\n\t\treturn nil\n\t}\n\tif !strings.HasPrefix(s, \"/\") {\n\t\treturn LocalizableError(\"not starting with /\")\n\t}\n\tfor _, tok := range strings.Split(s, \"/\")[1:] {\n\t\tescape := false\n\t\tfor _, ch := range tok {\n\t\t\tif escape {\n\t\t\t\tescape = false\n\t\t\t\tif ch != '0' && ch != '1' {\n\t\t\t\t\treturn LocalizableError(\"~ must be followed by 0 or 1\")\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif ch == '~' {\n\t\t\t\tescape = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch {\n\t\t\tcase ch >= '\\x00' && ch <= '\\x2E':\n\t\t\tcase ch >= '\\x30' && ch <= '\\x7D':\n\t\t\tcase ch >= '\\x7F' && ch <= '\\U0010FFFF':\n\t\t\tdefault:\n\t\t\t\treturn LocalizableError(\"invalid character %q\", ch)\n\t\t\t}\n\t\t}\n\t\tif escape {\n\t\t\treturn LocalizableError(\"~ must be followed by 0 or 1\")\n\t\t}\n\t}\n\treturn nil\n}\n\n// see https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01#section-3\nfunc validateRelativeJSONPointer(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// start with non-negative-integer\n\tnumDigits := 0\n\tfor _, ch := range s {\n\t\tif ch >= '0' && ch <= '9' {\n\t\t\tnumDigits++\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\tif numDigits == 0 {\n\t\treturn LocalizableError(\"must start with non-negative integer\")\n\t}\n\tif numDigits > 1 && strings.HasPrefix(s, \"0\") {\n\t\treturn LocalizableError(\"starts with zero\")\n\t}\n\ts = s[numDigits:]\n\n\t// followed by either json-pointer or '#'\n\tif s == \"#\" {\n\t\treturn nil\n\t}\n\treturn validateJSONPointer(s)\n}\n\n// see https://datatracker.ietf.org/doc/html/rfc4122#page-4\nfunc validateUUID(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\thexGroups := []int{8, 4, 4, 4, 12}\n\tgroups := strings.Split(s, \"-\")\n\tif len(groups) != len(hexGroups) {\n\t\treturn LocalizableError(\"must have %d elements\", len(hexGroups))\n\t}\n\tfor i, group := range groups {\n\t\tif len(group) != hexGroups[i] {\n\t\t\treturn LocalizableError(\"element %d must be %d characters long\", i+1, hexGroups[i])\n\t\t}\n\t\tfor _, ch := range group {\n\t\t\tswitch {\n\t\t\tcase ch >= '0' && ch <= '9':\n\t\t\tcase ch >= 'a' && ch <= 'f':\n\t\t\tcase ch >= 'A' && ch <= 'F':\n\t\t\tdefault:\n\t\t\t\treturn LocalizableError(\"non-hex character %q\", ch)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// see https://datatracker.ietf.org/doc/html/rfc3339#appendix-A\nfunc validateDuration(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// must start with 'P'\n\ts, ok = strings.CutPrefix(s, \"P\")\n\tif !ok {\n\t\treturn LocalizableError(\"must start with P\")\n\t}\n\tif s == \"\" {\n\t\treturn LocalizableError(\"nothing after P\")\n\t}\n\n\t// dur-week\n\tif s, ok := strings.CutSuffix(s, \"W\"); ok {\n\t\tif s == \"\" {\n\t\t\treturn LocalizableError(\"no number in week\")\n\t\t}\n\t\tfor _, ch := range s {\n\t\t\tif ch < '0' || ch > '9' {\n\t\t\t\treturn LocalizableError(\"invalid week\")\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tallUnits := []string{\"YMD\", \"HMS\"}\n\tfor i, s := range strings.Split(s, \"T\") {\n\t\tif i != 0 && s == \"\" {\n\t\t\treturn LocalizableError(\"no time elements\")\n\t\t}\n\t\tif i >= len(allUnits) {\n\t\t\treturn LocalizableError(\"more than one T\")\n\t\t}\n\t\tunits := allUnits[i]\n\t\tfor s != \"\" {\n\t\t\tdigitCount := 0\n\t\t\tfor _, ch := range s {\n\t\t\t\tif ch >= '0' && ch <= '9' {\n\t\t\t\t\tdigitCount++\n\t\t\t\t} else {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif digitCount == 0 {\n\t\t\t\treturn LocalizableError(\"missing number\")\n\t\t\t}\n\t\t\ts = s[digitCount:]\n\t\t\tif s == \"\" {\n\t\t\t\treturn LocalizableError(\"missing unit\")\n\t\t\t}\n\t\t\tunit := s[0]\n\t\t\tj := strings.IndexByte(units, unit)\n\t\t\tif j == -1 {\n\t\t\t\tif strings.IndexByte(allUnits[i], unit) != -1 {\n\t\t\t\t\treturn LocalizableError(\"unit %q out of order\", unit)\n\t\t\t\t}\n\t\t\t\treturn LocalizableError(\"invalid unit %q\", unit)\n\t\t\t}\n\t\t\tunits = units[j+1:]\n\t\t\ts = s[1:]\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc validateIPV4(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tgroups := strings.Split(s, \".\")\n\tif len(groups) != 4 {\n\t\treturn LocalizableError(\"expected four decimals\")\n\t}\n\tfor _, group := range groups {\n\t\tif len(group) > 1 && group[0] == '0' {\n\t\t\treturn LocalizableError(\"leading zeros\")\n\t\t}\n\t\tn, err := strconv.Atoi(group)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif n < 0 || n > 255 {\n\t\t\treturn LocalizableError(\"decimal must be between 0 and 255\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateIPV6(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tif !strings.Contains(s, \":\") {\n\t\treturn LocalizableError(\"missing colon\")\n\t}\n\taddr, err := netip.ParseAddr(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif addr.Zone() != \"\" {\n\t\treturn LocalizableError(\"zone id is not a part of ipv6 address\")\n\t}\n\treturn nil\n}\n\n// see https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names\nfunc validateHostname(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// entire hostname (including the delimiting dots but not a trailing dot) has a maximum of 253 ASCII characters\n\ts = strings.TrimSuffix(s, \".\")\n\tif len(s) > 253 {\n\t\treturn LocalizableError(\"more than 253 characters long\")\n\t}\n\n\t// Hostnames are composed of series of labels concatenated with dots, as are all domain names\n\tfor _, label := range strings.Split(s, \".\") {\n\t\t// Each label must be from 1 to 63 characters long\n\t\tif len(label) < 1 || len(label) > 63 {\n\t\t\treturn LocalizableError(\"label must be 1 to 63 characters long\")\n\t\t}\n\n\t\t// labels must not start or end with a hyphen\n\t\tif strings.HasPrefix(label, \"-\") {\n\t\t\treturn LocalizableError(\"label starts with hyphen\")\n\t\t}\n\t\tif strings.HasSuffix(label, \"-\") {\n\t\t\treturn LocalizableError(\"label ends with hyphen\")\n\t\t}\n\n\t\t// labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner),\n\t\t// the digits '0' through '9', and the hyphen ('-')\n\t\tfor _, ch := range label {\n\t\t\tswitch {\n\t\t\tcase ch >= 'a' && ch <= 'z':\n\t\t\tcase ch >= 'A' && ch <= 'Z':\n\t\t\tcase ch >= '0' && ch <= '9':\n\t\t\tcase ch == '-':\n\t\t\tdefault:\n\t\t\t\treturn LocalizableError(\"invalid character %q\", ch)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// see https://en.wikipedia.org/wiki/Email_address\nfunc validateEmail(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\t// entire email address to be no more than 254 characters long\n\tif len(s) > 254 {\n\t\treturn LocalizableError(\"more than 255 characters long\")\n\t}\n\n\t// email address is generally recognized as having two parts joined with an at-sign\n\tat := strings.LastIndexByte(s, '@')\n\tif at == -1 {\n\t\treturn LocalizableError(\"missing @\")\n\t}\n\tlocal, domain := s[:at], s[at+1:]\n\n\t// local part may be up to 64 characters long\n\tif len(local) > 64 {\n\t\treturn LocalizableError(\"local part more than 64 characters long\")\n\t}\n\n\tif len(local) > 1 && strings.HasPrefix(local, `\"`) && strings.HasPrefix(local, `\"`) {\n\t\t// quoted\n\t\tlocal := local[1 : len(local)-1]\n\t\tif strings.IndexByte(local, '\\\\') != -1 || strings.IndexByte(local, '\"') != -1 {\n\t\t\treturn LocalizableError(\"backslash and quote are not allowed within quoted local part\")\n\t\t}\n\t} else {\n\t\t// unquoted\n\t\tif strings.HasPrefix(local, \".\") {\n\t\t\treturn LocalizableError(\"starts with dot\")\n\t\t}\n\t\tif strings.HasSuffix(local, \".\") {\n\t\t\treturn LocalizableError(\"ends with dot\")\n\t\t}\n\n\t\t// consecutive dots not allowed\n\t\tif strings.Contains(local, \"..\") {\n\t\t\treturn LocalizableError(\"consecutive dots\")\n\t\t}\n\n\t\t// check allowed chars\n\t\tfor _, ch := range local {\n\t\t\tswitch {\n\t\t\tcase ch >= 'a' && ch <= 'z':\n\t\t\tcase ch >= 'A' && ch <= 'Z':\n\t\t\tcase ch >= '0' && ch <= '9':\n\t\t\tcase strings.ContainsRune(\".!#$%&'*+-/=?^_`{|}~\", ch):\n\t\t\tdefault:\n\t\t\t\treturn LocalizableError(\"invalid character %q\", ch)\n\t\t\t}\n\t\t}\n\t}\n\n\t// domain if enclosed in brackets, must match an IP address\n\tif strings.HasPrefix(domain, \"[\") && strings.HasSuffix(domain, \"]\") {\n\t\tdomain = domain[1 : len(domain)-1]\n\t\tif rem, ok := strings.CutPrefix(domain, \"IPv6:\"); ok {\n\t\t\tif err := validateIPV6(rem); err != nil {\n\t\t\t\treturn LocalizableError(\"invalid ipv6 address: %v\", err)\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\tif err := validateIPV4(domain); err != nil {\n\t\t\treturn LocalizableError(\"invalid ipv4 address: %v\", err)\n\t\t}\n\t\treturn nil\n\t}\n\n\t// domain must match the requirements for a hostname\n\tif err := validateHostname(domain); err != nil {\n\t\treturn LocalizableError(\"invalid domain: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// see see https://datatracker.ietf.org/doc/html/rfc3339#section-5.6\nfunc validateDate(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\t_, err := time.Parse(\"2006-01-02\", s)\n\treturn err\n}\n\n// see https://datatracker.ietf.org/doc/html/rfc3339#section-5.6\n// NOTE: golang time package does not support leap seconds.\nfunc validateTime(v any) error {\n\tstr, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// min: hh:mm:ssZ\n\tif len(str) < 9 {\n\t\treturn LocalizableError(\"less than 9 characters long\")\n\t}\n\tif str[2] != ':' || str[5] != ':' {\n\t\treturn LocalizableError(\"missing colon in correct place\")\n\t}\n\n\t// parse hh:mm:ss\n\tvar hms []int\n\tfor _, tok := range strings.SplitN(str[:8], \":\", 3) {\n\t\ti, err := strconv.Atoi(tok)\n\t\tif err != nil {\n\t\t\treturn LocalizableError(\"invalid hour/min/sec\")\n\t\t}\n\t\tif i < 0 {\n\t\t\treturn LocalizableError(\"non-positive hour/min/sec\")\n\t\t}\n\t\thms = append(hms, i)\n\t}\n\tif len(hms) != 3 {\n\t\treturn LocalizableError(\"missing hour/min/sec\")\n\t}\n\th, m, s := hms[0], hms[1], hms[2]\n\tif h > 23 || m > 59 || s > 60 {\n\t\treturn LocalizableError(\"hour/min/sec out of range\")\n\t}\n\tstr = str[8:]\n\n\t// parse sec-frac if present\n\tif rem, ok := strings.CutPrefix(str, \".\"); ok {\n\t\tnumDigits := 0\n\t\tfor _, ch := range rem {\n\t\t\tif ch >= '0' && ch <= '9' {\n\t\t\t\tnumDigits++\n\t\t\t} else {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif numDigits == 0 {\n\t\t\treturn LocalizableError(\"no digits in second fraction\")\n\t\t}\n\t\tstr = rem[numDigits:]\n\t}\n\n\tif str != \"z\" && str != \"Z\" {\n\t\t// parse time-numoffset\n\t\tif len(str) != 6 {\n\t\t\treturn LocalizableError(\"offset must be 6 characters long\")\n\t\t}\n\t\tvar sign int\n\t\tswitch str[0] {\n\t\tcase '+':\n\t\t\tsign = -1\n\t\tcase '-':\n\t\t\tsign = +1\n\t\tdefault:\n\t\t\treturn LocalizableError(\"offset must begin with plus/minus\")\n\t\t}\n\t\tstr = str[1:]\n\t\tif str[2] != ':' {\n\t\t\treturn LocalizableError(\"missing colon in offset in correct place\")\n\t\t}\n\n\t\tvar zhm []int\n\t\tfor _, tok := range strings.SplitN(str, \":\", 2) {\n\t\t\ti, err := strconv.Atoi(tok)\n\t\t\tif err != nil {\n\t\t\t\treturn LocalizableError(\"invalid hour/min in offset\")\n\t\t\t}\n\t\t\tif i < 0 {\n\t\t\t\treturn LocalizableError(\"non-positive hour/min in offset\")\n\t\t\t}\n\t\t\tzhm = append(zhm, i)\n\t\t}\n\t\tzh, zm := zhm[0], zhm[1]\n\t\tif zh > 23 || zm > 59 {\n\t\t\treturn LocalizableError(\"hour/min in offset out of range\")\n\t\t}\n\n\t\t// apply timezone\n\t\thm := (h*60 + m) + sign*(zh*60+zm)\n\t\tif hm < 0 {\n\t\t\thm += 24 * 60\n\t\t}\n\t\th, m = hm/60, hm%60\n\t}\n\n\t// check leap second\n\tif s >= 60 && (h != 23 || m != 59) {\n\t\treturn LocalizableError(\"invalid leap second\")\n\t}\n\n\treturn nil\n}\n\n// see https://datatracker.ietf.org/doc/html/rfc3339#section-5.6\nfunc validateDateTime(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// min: yyyy-mm-ddThh:mm:ssZ\n\tif len(s) < 20 {\n\t\treturn LocalizableError(\"less than 20 characters long\")\n\t}\n\n\tif s[10] != 't' && s[10] != 'T' {\n\t\treturn LocalizableError(\"11th character must be t or T\")\n\t}\n\tif err := validateDate(s[:10]); err != nil {\n\t\treturn LocalizableError(\"invalid date element: %v\", err)\n\t}\n\tif err := validateTime(s[11:]); err != nil {\n\t\treturn LocalizableError(\"invalid time element: %v\", err)\n\t}\n\treturn nil\n}\n\nfunc parseURL(s string) (*gourl.URL, error) {\n\tu, err := gourl.Parse(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// gourl does not validate ipv6 host address\n\thostName := u.Hostname()\n\tif strings.Contains(hostName, \":\") {\n\t\tif !strings.Contains(u.Host, \"[\") || !strings.Contains(u.Host, \"]\") {\n\t\t\treturn nil, LocalizableError(\"ipv6 address not enclosed in brackets\")\n\t\t}\n\t\tif err := validateIPV6(hostName); err != nil {\n\t\t\treturn nil, LocalizableError(\"invalid ipv6 address: %v\", err)\n\t\t}\n\t}\n\n\treturn u, nil\n}\n\nfunc validateURI(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tu, err := parseURL(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !u.IsAbs() {\n\t\treturn LocalizableError(\"relative url\")\n\t}\n\treturn nil\n}\n\nfunc validateURIReference(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tif strings.Contains(s, `\\`) {\n\t\treturn LocalizableError(`contains \\`)\n\t}\n\t_, err := parseURL(s)\n\treturn err\n}\n\nfunc validateURITemplate(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\tu, err := parseURL(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, tok := range strings.Split(u.RawPath, \"/\") {\n\t\ttok, err = decode(tok)\n\t\tif err != nil {\n\t\t\treturn LocalizableError(\"percent decode failed: %v\", err)\n\t\t}\n\t\twant := true\n\t\tfor _, ch := range tok {\n\t\t\tvar got bool\n\t\t\tswitch ch {\n\t\t\tcase '{':\n\t\t\t\tgot = true\n\t\t\tcase '}':\n\t\t\t\tgot = false\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif got != want {\n\t\t\t\treturn LocalizableError(\"nested curly braces\")\n\t\t\t}\n\t\t\twant = !want\n\t\t}\n\t\tif !want {\n\t\t\treturn LocalizableError(\"no matching closing brace\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validatePeriod(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\tslash := strings.IndexByte(s, '/')\n\tif slash == -1 {\n\t\treturn LocalizableError(\"missing slash\")\n\t}\n\n\tstart, end := s[:slash], s[slash+1:]\n\tif strings.HasPrefix(start, \"P\") {\n\t\tif err := validateDuration(start); err != nil {\n\t\t\treturn LocalizableError(\"invalid start duration: %v\", err)\n\t\t}\n\t\tif err := validateDateTime(end); err != nil {\n\t\t\treturn LocalizableError(\"invalid end date-time: %v\", err)\n\t\t}\n\t} else {\n\t\tif err := validateDateTime(start); err != nil {\n\t\t\treturn LocalizableError(\"invalid start date-time: %v\", err)\n\t\t}\n\t\tif strings.HasPrefix(end, \"P\") {\n\t\t\tif err := validateDuration(end); err != nil {\n\t\t\t\treturn LocalizableError(\"invalid end duration: %v\", err)\n\t\t\t}\n\t\t} else if err := validateDateTime(end); err != nil {\n\t\t\treturn LocalizableError(\"invalid end date-time: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// see https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions\nfunc validateSemver(v any) error {\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\t// build --\n\tif i := strings.IndexByte(s, '+'); i != -1 {\n\t\tbuild := s[i+1:]\n\t\tif build == \"\" {\n\t\t\treturn LocalizableError(\"build is empty\")\n\t\t}\n\t\tfor _, buildID := range strings.Split(build, \".\") {\n\t\t\tif buildID == \"\" {\n\t\t\t\treturn LocalizableError(\"build identifier is empty\")\n\t\t\t}\n\t\t\tfor _, ch := range buildID {\n\t\t\t\tswitch {\n\t\t\t\tcase ch >= '0' && ch <= '9':\n\t\t\t\tcase (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '-':\n\t\t\t\tdefault:\n\t\t\t\t\treturn LocalizableError(\"invalid character %q in build identifier\", ch)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ts = s[:i]\n\t}\n\n\t// pre-release --\n\tif i := strings.IndexByte(s, '-'); i != -1 {\n\t\tpreRelease := s[i+1:]\n\t\tfor _, preReleaseID := range strings.Split(preRelease, \".\") {\n\t\t\tif preReleaseID == \"\" {\n\t\t\t\treturn LocalizableError(\"pre-release identifier is empty\")\n\t\t\t}\n\t\t\tallDigits := true\n\t\t\tfor _, ch := range preReleaseID {\n\t\t\t\tswitch {\n\t\t\t\tcase ch >= '0' && ch <= '9':\n\t\t\t\tcase (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '-':\n\t\t\t\t\tallDigits = false\n\t\t\t\tdefault:\n\t\t\t\t\treturn LocalizableError(\"invalid character %q in pre-release identifier\", ch)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif allDigits && len(preReleaseID) > 1 && preReleaseID[0] == '0' {\n\t\t\t\treturn LocalizableError(\"pre-release numeric identifier starts with zero\")\n\t\t\t}\n\t\t}\n\t\ts = s[:i]\n\t}\n\n\t// versionCore --\n\tversions := strings.Split(s, \".\")\n\tif len(versions) != 3 {\n\t\treturn LocalizableError(\"versionCore must have 3 numbers separated by dot\")\n\t}\n\tnames := []string{\"major\", \"minor\", \"patch\"}\n\tfor i, version := range versions {\n\t\tif version == \"\" {\n\t\t\treturn LocalizableError(\"%s is empty\", names[i])\n\t\t}\n\t\tif len(version) > 1 && version[0] == '0' {\n\t\t\treturn LocalizableError(\"%s starts with zero\", names[i])\n\t\t}\n\t\tfor _, ch := range version {\n\t\t\tif ch < '0' || ch > '9' {\n\t\t\t\treturn LocalizableError(\"%s contains non-digit\", names[i])\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work",
    "content": "go 1.21.1\n\nuse (\n\t.\n\t./cmd/jv\n)\n\n// replace github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 => ./\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/go.work.sum",
    "content": "github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/kind/kind.go",
    "content": "package kind\n\nimport (\n\t\"fmt\"\n\t\"math/big\"\n\t\"strings\"\n\n\t\"golang.org/x/text/message\"\n)\n\n// --\n\ntype InvalidJsonValue struct {\n\tValue any\n}\n\nfunc (*InvalidJsonValue) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (k *InvalidJsonValue) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"invalid jsonType %T\", k.Value)\n}\n\n// --\n\ntype Schema struct {\n\tLocation string\n}\n\nfunc (*Schema) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (k *Schema) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"jsonschema validation failed with %s\", quote(k.Location))\n}\n\n// --\n\ntype Group struct{}\n\nfunc (*Group) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (*Group) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"validation failed\")\n}\n\n// --\n\ntype Not struct{}\n\nfunc (*Not) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (*Not) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"'not' failed\")\n}\n\n// --\n\ntype AllOf struct{}\n\nfunc (*AllOf) KeywordPath() []string {\n\treturn []string{\"allOf\"}\n}\n\nfunc (*AllOf) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"'allOf' failed\")\n}\n\n// --\n\ntype AnyOf struct{}\n\nfunc (*AnyOf) KeywordPath() []string {\n\treturn []string{\"anyOf\"}\n}\n\nfunc (*AnyOf) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"'anyOf' failed\")\n}\n\n// --\n\ntype OneOf struct {\n\t// Subschemas gives indexes of Subschemas that have matched.\n\t// Value nil, means none of the subschemas matched.\n\tSubschemas []int\n}\n\nfunc (*OneOf) KeywordPath() []string {\n\treturn []string{\"oneOf\"}\n}\n\nfunc (k *OneOf) LocalizedString(p *message.Printer) string {\n\tif len(k.Subschemas) == 0 {\n\t\treturn p.Sprintf(\"'oneOf' failed, none matched\")\n\t}\n\treturn p.Sprintf(\"'oneOf' failed, subschemas %d, %d matched\", k.Subschemas[0], k.Subschemas[1])\n}\n\n//--\n\ntype FalseSchema struct{}\n\nfunc (*FalseSchema) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (*FalseSchema) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"false schema\")\n}\n\n// --\n\ntype RefCycle struct {\n\tURL              string\n\tKeywordLocation1 string\n\tKeywordLocation2 string\n}\n\nfunc (*RefCycle) KeywordPath() []string {\n\treturn nil\n}\n\nfunc (k *RefCycle) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"both %s and %s resolve to %q causing reference cycle\", k.KeywordLocation1, k.KeywordLocation2, k.URL)\n}\n\n// --\n\ntype Type struct {\n\tGot  string\n\tWant []string\n}\n\nfunc (*Type) KeywordPath() []string {\n\treturn []string{\"type\"}\n}\n\nfunc (k *Type) LocalizedString(p *message.Printer) string {\n\twant := strings.Join(k.Want, \" or \")\n\treturn p.Sprintf(\"got %s, want %s\", k.Got, want)\n}\n\n// --\n\ntype Enum struct {\n\tGot  any\n\tWant []any\n}\n\n// KeywordPath implements jsonschema.ErrorKind.\nfunc (*Enum) KeywordPath() []string {\n\treturn []string{\"enum\"}\n}\n\nfunc (k *Enum) LocalizedString(p *message.Printer) string {\n\tallPrimitive := true\nloop:\n\tfor _, item := range k.Want {\n\t\tswitch item.(type) {\n\t\tcase []any, map[string]any:\n\t\t\tallPrimitive = false\n\t\t\tbreak loop\n\t\t}\n\t}\n\tif allPrimitive {\n\t\tif len(k.Want) == 1 {\n\t\t\treturn p.Sprintf(\"value must be %s\", display(k.Want[0]))\n\t\t}\n\t\tvar want []string\n\t\tfor _, v := range k.Want {\n\t\t\twant = append(want, display(v))\n\t\t}\n\t\treturn p.Sprintf(\"value must be one of %s\", strings.Join(want, \", \"))\n\t}\n\treturn p.Sprintf(\"'enum' failed\")\n}\n\n// --\n\ntype Const struct {\n\tGot  any\n\tWant any\n}\n\nfunc (*Const) KeywordPath() []string {\n\treturn []string{\"const\"}\n}\n\nfunc (k *Const) LocalizedString(p *message.Printer) string {\n\tswitch want := k.Want.(type) {\n\tcase []any, map[string]any:\n\t\treturn p.Sprintf(\"'const' failed\")\n\tdefault:\n\t\treturn p.Sprintf(\"value must be %s\", display(want))\n\t}\n}\n\n// --\n\ntype Format struct {\n\tGot  any\n\tWant string\n\tErr  error\n}\n\nfunc (*Format) KeywordPath() []string {\n\treturn []string{\"format\"}\n}\n\nfunc (k *Format) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"%s is not valid %s: %v\", display(k.Got), k.Want, localizedError(k.Err, p))\n}\n\n// --\n\ntype Reference struct {\n\tKeyword string\n\tURL     string\n}\n\nfunc (k *Reference) KeywordPath() []string {\n\treturn []string{k.Keyword}\n}\n\nfunc (*Reference) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"validation failed\")\n}\n\n// --\n\ntype MinProperties struct {\n\tGot, Want int\n}\n\nfunc (*MinProperties) KeywordPath() []string {\n\treturn []string{\"minProperties\"}\n}\n\nfunc (k *MinProperties) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"minProperties: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype MaxProperties struct {\n\tGot, Want int\n}\n\nfunc (*MaxProperties) KeywordPath() []string {\n\treturn []string{\"maxProperties\"}\n}\n\nfunc (k *MaxProperties) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"maxProperties: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype MinItems struct {\n\tGot, Want int\n}\n\nfunc (*MinItems) KeywordPath() []string {\n\treturn []string{\"minItems\"}\n}\n\nfunc (k *MinItems) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"minItems: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype MaxItems struct {\n\tGot, Want int\n}\n\nfunc (*MaxItems) KeywordPath() []string {\n\treturn []string{\"maxItems\"}\n}\n\nfunc (k *MaxItems) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"maxItems: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype AdditionalItems struct {\n\tCount int\n}\n\nfunc (*AdditionalItems) KeywordPath() []string {\n\treturn []string{\"additionalItems\"}\n}\n\nfunc (k *AdditionalItems) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"last %d additionalItem(s) not allowed\", k.Count)\n}\n\n// --\n\ntype Required struct {\n\tMissing []string\n}\n\nfunc (*Required) KeywordPath() []string {\n\treturn []string{\"required\"}\n}\n\nfunc (k *Required) LocalizedString(p *message.Printer) string {\n\tif len(k.Missing) == 1 {\n\t\treturn p.Sprintf(\"missing property %s\", quote(k.Missing[0]))\n\t}\n\treturn p.Sprintf(\"missing properties %s\", joinQuoted(k.Missing, \", \"))\n}\n\n// --\n\ntype Dependency struct {\n\tProp    string   // dependency of prop that failed\n\tMissing []string // missing props\n}\n\nfunc (k *Dependency) KeywordPath() []string {\n\treturn []string{\"dependency\", k.Prop}\n}\n\nfunc (k *Dependency) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"properties %s required, if %s exists\", joinQuoted(k.Missing, \", \"), quote(k.Prop))\n}\n\n// --\n\ntype DependentRequired struct {\n\tProp    string   // dependency of prop that failed\n\tMissing []string // missing props\n}\n\nfunc (k *DependentRequired) KeywordPath() []string {\n\treturn []string{\"dependentRequired\", k.Prop}\n}\n\nfunc (k *DependentRequired) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"properties %s required, if %s exists\", joinQuoted(k.Missing, \", \"), quote(k.Prop))\n}\n\n// --\n\ntype AdditionalProperties struct {\n\tProperties []string\n}\n\nfunc (*AdditionalProperties) KeywordPath() []string {\n\treturn []string{\"additionalProperties\"}\n}\n\nfunc (k *AdditionalProperties) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"additional properties %s not allowed\", joinQuoted(k.Properties, \", \"))\n}\n\n// --\n\ntype PropertyNames struct {\n\tProperty string\n}\n\nfunc (*PropertyNames) KeywordPath() []string {\n\treturn []string{\"propertyNames\"}\n}\n\nfunc (k *PropertyNames) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"invalid propertyName %s\", quote(k.Property))\n}\n\n// --\n\ntype UniqueItems struct {\n\tDuplicates [2]int\n}\n\nfunc (*UniqueItems) KeywordPath() []string {\n\treturn []string{\"uniqueItems\"}\n}\n\nfunc (k *UniqueItems) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"items at %d and %d are equal\", k.Duplicates[0], k.Duplicates[1])\n}\n\n// --\n\ntype Contains struct{}\n\nfunc (*Contains) KeywordPath() []string {\n\treturn []string{\"contains\"}\n}\n\nfunc (*Contains) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"no items match contains schema\")\n}\n\n// --\n\ntype MinContains struct {\n\tGot  []int\n\tWant int\n}\n\nfunc (*MinContains) KeywordPath() []string {\n\treturn []string{\"minContains\"}\n}\n\nfunc (k *MinContains) LocalizedString(p *message.Printer) string {\n\tif len(k.Got) == 0 {\n\t\treturn p.Sprintf(\"min %d items required to match contains schema, but none matched\", k.Want)\n\t} else {\n\t\tgot := fmt.Sprintf(\"%v\", k.Got)\n\t\treturn p.Sprintf(\"min %d items required to match contains schema, but matched %d items at %v\", k.Want, len(k.Got), got[1:len(got)-1])\n\t}\n}\n\n// --\n\ntype MaxContains struct {\n\tGot  []int\n\tWant int\n}\n\nfunc (*MaxContains) KeywordPath() []string {\n\treturn []string{\"maxContains\"}\n}\n\nfunc (k *MaxContains) LocalizedString(p *message.Printer) string {\n\tgot := fmt.Sprintf(\"%v\", k.Got)\n\treturn p.Sprintf(\"max %d items required to match contains schema, but matched %d items at %v\", k.Want, len(k.Got), got[1:len(got)-1])\n}\n\n// --\n\ntype MinLength struct {\n\tGot, Want int\n}\n\nfunc (*MinLength) KeywordPath() []string {\n\treturn []string{\"minLength\"}\n}\n\nfunc (k *MinLength) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"minLength: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype MaxLength struct {\n\tGot, Want int\n}\n\nfunc (*MaxLength) KeywordPath() []string {\n\treturn []string{\"maxLength\"}\n}\n\nfunc (k *MaxLength) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"maxLength: got %d, want %d\", k.Got, k.Want)\n}\n\n// --\n\ntype Pattern struct {\n\tGot  string\n\tWant string\n}\n\nfunc (*Pattern) KeywordPath() []string {\n\treturn []string{\"pattern\"}\n}\n\nfunc (k *Pattern) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"%s does not match pattern %s\", quote(k.Got), quote(k.Want))\n}\n\n// --\n\ntype ContentEncoding struct {\n\tWant string\n\tErr  error\n}\n\nfunc (*ContentEncoding) KeywordPath() []string {\n\treturn []string{\"contentEncoding\"}\n}\n\nfunc (k *ContentEncoding) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"value is not %s encoded: %v\", quote(k.Want), localizedError(k.Err, p))\n}\n\n// --\n\ntype ContentMediaType struct {\n\tGot  []byte\n\tWant string\n\tErr  error\n}\n\nfunc (*ContentMediaType) KeywordPath() []string {\n\treturn []string{\"contentMediaType\"}\n}\n\nfunc (k *ContentMediaType) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"value if not of mediatype %s: %v\", quote(k.Want), k.Err)\n}\n\n// --\n\ntype ContentSchema struct{}\n\nfunc (*ContentSchema) KeywordPath() []string {\n\treturn []string{\"contentSchema\"}\n}\n\nfunc (*ContentSchema) LocalizedString(p *message.Printer) string {\n\treturn p.Sprintf(\"'contentSchema' failed\")\n}\n\n// --\n\ntype Minimum struct {\n\tGot  *big.Rat\n\tWant *big.Rat\n}\n\nfunc (*Minimum) KeywordPath() []string {\n\treturn []string{\"minimum\"}\n}\n\nfunc (k *Minimum) LocalizedString(p *message.Printer) string {\n\tgot, _ := k.Got.Float64()\n\twant, _ := k.Want.Float64()\n\treturn p.Sprintf(\"minimum: got %v, want %v\", got, want)\n}\n\n// --\n\ntype Maximum struct {\n\tGot  *big.Rat\n\tWant *big.Rat\n}\n\nfunc (*Maximum) KeywordPath() []string {\n\treturn []string{\"maximum\"}\n}\n\nfunc (k *Maximum) LocalizedString(p *message.Printer) string {\n\tgot, _ := k.Got.Float64()\n\twant, _ := k.Want.Float64()\n\treturn p.Sprintf(\"maximum: got %v, want %v\", got, want)\n}\n\n// --\n\ntype ExclusiveMinimum struct {\n\tGot  *big.Rat\n\tWant *big.Rat\n}\n\nfunc (*ExclusiveMinimum) KeywordPath() []string {\n\treturn []string{\"exclusiveMinimum\"}\n}\n\nfunc (k *ExclusiveMinimum) LocalizedString(p *message.Printer) string {\n\tgot, _ := k.Got.Float64()\n\twant, _ := k.Want.Float64()\n\treturn p.Sprintf(\"exclusiveMinimum: got %v, want %v\", got, want)\n}\n\n// --\n\ntype ExclusiveMaximum struct {\n\tGot  *big.Rat\n\tWant *big.Rat\n}\n\nfunc (*ExclusiveMaximum) KeywordPath() []string {\n\treturn []string{\"exclusiveMaximum\"}\n}\n\nfunc (k *ExclusiveMaximum) LocalizedString(p *message.Printer) string {\n\tgot, _ := k.Got.Float64()\n\twant, _ := k.Want.Float64()\n\treturn p.Sprintf(\"exclusiveMaximum: got %v, want %v\", got, want)\n}\n\n// --\n\ntype MultipleOf struct {\n\tGot  *big.Rat\n\tWant *big.Rat\n}\n\nfunc (*MultipleOf) KeywordPath() []string {\n\treturn []string{\"multipleOf\"}\n}\n\nfunc (k *MultipleOf) LocalizedString(p *message.Printer) string {\n\tgot, _ := k.Got.Float64()\n\twant, _ := k.Want.Float64()\n\treturn p.Sprintf(\"multipleOf: got %v, want %v\", got, want)\n}\n\n// --\n\nfunc quote(s string) string {\n\ts = fmt.Sprintf(\"%q\", s)\n\ts = strings.ReplaceAll(s, `\\\"`, `\"`)\n\ts = strings.ReplaceAll(s, `'`, `\\'`)\n\treturn \"'\" + s[1:len(s)-1] + \"'\"\n}\n\nfunc joinQuoted(arr []string, sep string) string {\n\tvar sb strings.Builder\n\tfor _, s := range arr {\n\t\tif sb.Len() > 0 {\n\t\t\tsb.WriteString(sep)\n\t\t}\n\t\tsb.WriteString(quote(s))\n\t}\n\treturn sb.String()\n}\n\n// to be used only for primitive.\nfunc display(v any) string {\n\tswitch v := v.(type) {\n\tcase string:\n\t\treturn quote(v)\n\tcase []any, map[string]any:\n\t\treturn \"value\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"%v\", v)\n\t}\n}\n\nfunc localizedError(err error, p *message.Printer) string {\n\tif err, ok := err.(interface{ LocalizedError(*message.Printer) string }); ok {\n\t\treturn err.LocalizedError(p)\n\t}\n\treturn err.Error()\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/loader.go",
    "content": "package jsonschema\n\nimport (\n\t\"embed\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\tgourl \"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n)\n\n// URLLoader knows how to load json from given url.\ntype URLLoader interface {\n\t// Load loads json from given absolute url.\n\tLoad(url string) (any, error)\n}\n\n// --\n\n// FileLoader loads json file url.\ntype FileLoader struct{}\n\nfunc (l FileLoader) Load(url string) (any, error) {\n\tpath, err := l.ToFile(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\treturn UnmarshalJSON(f)\n}\n\n// ToFile is helper method to convert file url to file path.\nfunc (l FileLoader) ToFile(url string) (string, error) {\n\tu, err := gourl.Parse(url)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif u.Scheme != \"file\" {\n\t\treturn \"\", fmt.Errorf(\"invalid file url: %s\", u)\n\t}\n\tpath := u.Path\n\tif runtime.GOOS == \"windows\" {\n\t\tpath = strings.TrimPrefix(path, \"/\")\n\t\tpath = filepath.FromSlash(path)\n\t}\n\treturn path, nil\n}\n\n// --\n\n// SchemeURLLoader delegates to other [URLLoaders]\n// based on url scheme.\ntype SchemeURLLoader map[string]URLLoader\n\nfunc (l SchemeURLLoader) Load(url string) (any, error) {\n\tu, err := gourl.Parse(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tll, ok := l[u.Scheme]\n\tif !ok {\n\t\treturn nil, &UnsupportedURLSchemeError{u.String()}\n\t}\n\treturn ll.Load(url)\n}\n\n// --\n\n//go:embed metaschemas\nvar metaFS embed.FS\n\nfunc openMeta(url string) (fs.File, error) {\n\tu, meta := strings.CutPrefix(url, \"http://json-schema.org/\")\n\tif !meta {\n\t\tu, meta = strings.CutPrefix(url, \"https://json-schema.org/\")\n\t}\n\tif meta {\n\t\tif u == \"schema\" {\n\t\t\treturn openMeta(draftLatest.url)\n\t\t}\n\t\tf, err := metaFS.Open(\"metaschemas/\" + u)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\treturn f, err\n\t}\n\treturn nil, nil\n\n}\n\nfunc isMeta(url string) bool {\n\tf, err := openMeta(url)\n\tif err != nil {\n\t\treturn true\n\t}\n\tif f != nil {\n\t\tf.Close()\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc loadMeta(url string) (any, error) {\n\tf, err := openMeta(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif f == nil {\n\t\treturn nil, nil\n\t}\n\tdefer f.Close()\n\treturn UnmarshalJSON(f)\n}\n\n// --\n\ntype defaultLoader struct {\n\tdocs   map[url]any // docs loaded so far\n\tloader URLLoader\n}\n\nfunc (l *defaultLoader) add(url url, doc any) bool {\n\tif _, ok := l.docs[url]; ok {\n\t\treturn false\n\t}\n\tl.docs[url] = doc\n\treturn true\n}\n\nfunc (l *defaultLoader) load(url url) (any, error) {\n\tif doc, ok := l.docs[url]; ok {\n\t\treturn doc, nil\n\t}\n\tdoc, err := loadMeta(url.String())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif doc != nil {\n\t\tl.add(url, doc)\n\t\treturn doc, nil\n\t}\n\tif l.loader == nil {\n\t\treturn nil, &LoadURLError{url.String(), errors.New(\"no URLLoader set\")}\n\t}\n\tdoc, err = l.loader.Load(url.String())\n\tif err != nil {\n\t\treturn nil, &LoadURLError{URL: url.String(), Err: err}\n\t}\n\tl.add(url, doc)\n\treturn doc, nil\n}\n\nfunc (l *defaultLoader) getDraft(up urlPtr, doc any, defaultDraft *Draft, cycle map[url]struct{}) (*Draft, error) {\n\tobj, ok := doc.(map[string]any)\n\tif !ok {\n\t\treturn defaultDraft, nil\n\t}\n\tsch, ok := strVal(obj, \"$schema\")\n\tif !ok {\n\t\treturn defaultDraft, nil\n\t}\n\tif draft := draftFromURL(sch); draft != nil {\n\t\treturn draft, nil\n\t}\n\tsch, _ = split(sch)\n\tif _, err := gourl.Parse(sch); err != nil {\n\t\treturn nil, &InvalidMetaSchemaURLError{up.String(), err}\n\t}\n\tschUrl := url(sch)\n\tif up.ptr.isEmpty() && schUrl == up.url {\n\t\treturn nil, &UnsupportedDraftError{schUrl.String()}\n\t}\n\tif _, ok := cycle[schUrl]; ok {\n\t\treturn nil, &MetaSchemaCycleError{schUrl.String()}\n\t}\n\tcycle[schUrl] = struct{}{}\n\tdoc, err := l.load(schUrl)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn l.getDraft(urlPtr{schUrl, \"\"}, doc, defaultDraft, cycle)\n}\n\nfunc (l *defaultLoader) getMetaVocabs(doc any, draft *Draft, vocabularies map[string]*Vocabulary) ([]string, error) {\n\tobj, ok := doc.(map[string]any)\n\tif !ok {\n\t\treturn nil, nil\n\t}\n\tsch, ok := strVal(obj, \"$schema\")\n\tif !ok {\n\t\treturn nil, nil\n\t}\n\tif draft := draftFromURL(sch); draft != nil {\n\t\treturn nil, nil\n\t}\n\tsch, _ = split(sch)\n\tif _, err := gourl.Parse(sch); err != nil {\n\t\treturn nil, &ParseURLError{sch, err}\n\t}\n\tschUrl := url(sch)\n\tdoc, err := l.load(schUrl)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn draft.getVocabs(schUrl, doc, vocabularies)\n}\n\n// --\n\ntype LoadURLError struct {\n\tURL string\n\tErr error\n}\n\nfunc (e *LoadURLError) Error() string {\n\treturn fmt.Sprintf(\"failing loading %q: %v\", e.URL, e.Err)\n}\n\n// --\n\ntype UnsupportedURLSchemeError struct {\n\turl string\n}\n\nfunc (e *UnsupportedURLSchemeError) Error() string {\n\treturn fmt.Sprintf(\"no URLLoader registered for %q\", e.url)\n}\n\n// --\n\ntype ResourceExistsError struct {\n\turl string\n}\n\nfunc (e *ResourceExistsError) Error() string {\n\treturn fmt.Sprintf(\"resource for %q already exists\", e.url)\n}\n\n// --\n\n// UnmarshalJSON unmarshals into [any] without losing\n// number precision using [json.Number].\nfunc UnmarshalJSON(r io.Reader) (any, error) {\n\tdecoder := json.NewDecoder(r)\n\tdecoder.UseNumber()\n\tvar doc any\n\tif err := decoder.Decode(&doc); err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := decoder.Token(); err == nil || err != io.EOF {\n\t\treturn nil, fmt.Errorf(\"invalid character after top-level value\")\n\t}\n\treturn doc, nil\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/applicator",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/applicator\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/applicator\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"additionalItems\": { \"$recursiveRef\": \"#\" },\n\t\t\"unevaluatedItems\": { \"$recursiveRef\": \"#\" },\n\t\t\"items\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$recursiveRef\": \"#\" },\n\t\t\t\t{ \"$ref\": \"#/$defs/schemaArray\" }\n\t\t\t]\n\t\t},\n\t\t\"contains\": { \"$recursiveRef\": \"#\" },\n\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\"unevaluatedProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\"properties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"patternProperties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependentSchemas\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"$recursiveRef\": \"#\"\n\t\t\t}\n\t\t},\n\t\t\"propertyNames\": { \"$recursiveRef\": \"#\" },\n\t\t\"if\": { \"$recursiveRef\": \"#\" },\n\t\t\"then\": { \"$recursiveRef\": \"#\" },\n\t\t\"else\": { \"$recursiveRef\": \"#\" },\n\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\"not\": { \"$recursiveRef\": \"#\" }\n\t},\n\t\"$defs\": {\n\t\t\"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$recursiveRef\": \"#\" }\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/content",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/content\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/content\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Content vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\"contentSchema\": { \"$recursiveRef\": \"#\" }\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/core",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/core\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/core\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Core vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"$id\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\",\n\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t},\n\t\t\"$schema\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri\"\n\t\t},\n\t\t\"$anchor\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"pattern\": \"^[A-Za-z][-A-Za-z0-9.:_]*$\"\n\t\t},\n\t\t\"$ref\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"$recursiveRef\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"$recursiveAnchor\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"$vocabulary\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"propertyNames\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"type\": \"boolean\"\n\t\t\t}\n\t\t},\n\t\t\"$comment\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"default\": {}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/format",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/format\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/format\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Format vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"format\": { \"type\": \"string\" }\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/meta-data",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/meta-data\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/meta-data\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"title\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"default\": true,\n\t\t\"deprecated\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"readOnly\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"writeOnly\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"examples\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": true\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/meta/validation",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/validation\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/validation\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Validation vocabulary meta-schema\",\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"multipleOf\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"exclusiveMinimum\": 0\n\t\t},\n\t\t\"maximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMaximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"minimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMinimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\"pattern\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"regex\"\n\t\t},\n\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\"uniqueItems\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\"minContains\": {\n\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\"default\": 1\n\t\t},\n\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\"dependentRequired\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"$ref\": \"#/$defs/stringArray\"\n\t\t\t}\n\t\t},\n\t\t\"const\": true,\n\t\t\"enum\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": true\n\t\t},\n\t\t\"type\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\t\"minItems\": 1,\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t\"$defs\": {\n\t\t\"nonNegativeInteger\": {\n\t\t\t\"type\": \"integer\",\n\t\t\t\"minimum\": 0\n\t\t},\n\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\"default\": 0\n\t\t},\n\t\t\"simpleTypes\": {\n\t\t\t\"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t]\n\t\t},\n\t\t\"stringArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\"uniqueItems\": true,\n\t\t\t\"default\": []\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2019-09/schema",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2019-09/vocab/core\": true,\n\t\t\"https://json-schema.org/draft/2019-09/vocab/applicator\": true,\n\t\t\"https://json-schema.org/draft/2019-09/vocab/validation\": true,\n\t\t\"https://json-schema.org/draft/2019-09/vocab/meta-data\": true,\n\t\t\"https://json-schema.org/draft/2019-09/vocab/format\": false,\n\t\t\"https://json-schema.org/draft/2019-09/vocab/content\": true\n\t},\n\t\"$recursiveAnchor\": true,\n\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\"allOf\": [\n\t\t{\"$ref\": \"meta/core\"},\n\t\t{\"$ref\": \"meta/applicator\"},\n\t\t{\"$ref\": \"meta/validation\"},\n\t\t{\"$ref\": \"meta/meta-data\"},\n\t\t{\"$ref\": \"meta/format\"},\n\t\t{\"$ref\": \"meta/content\"}\n\t],\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"definitions\": {\n\t\t\t\"$comment\": \"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependencies\": {\n\t\t\t\"$comment\": \"\\\"dependencies\\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\\"dependentSchemas\\\" and \\\"dependentRequired\\\"\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$recursiveRef\": \"#\" },\n\t\t\t\t\t{ \"$ref\": \"meta/validation#/$defs/stringArray\" }\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/applicator",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/applicator\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/applicator\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"prefixItems\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"contains\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"if\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"then\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"else\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$dynamicRef\": \"#meta\" }\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"schemaArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" }\n\t\t\t}\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/content",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/content\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/content\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/core",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/core\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/core\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"$ref\": \"#/$defs/uriReferenceString\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\"$ref\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$anchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$dynamicRef\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$dynamicAnchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\t\"additionalProperties\": {\n\t\t\t\t\t\"type\": \"boolean\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"$comment\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"anchorString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z_][-A-Za-z0-9._]*$\"\n\t\t\t},\n\t\t\t\"uriString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"uriReferenceString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t}\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/format-annotation",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/format-annotation\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Format vocabulary meta-schema for annotation results\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"format\": { \"type\": \"string\" }\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/format-assertion",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/format-assertion\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/format-assertion\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Format vocabulary meta-schema for assertion results\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"format\": { \"type\": \"string\" }\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/meta-data",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/meta-data\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/meta-data\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/unevaluated",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/unevaluated\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Unevaluated applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"unevaluatedItems\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"unevaluatedProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/meta/validation",
    "content": "{\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/validation\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/validation\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"type\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\t\t\"minItems\": 1,\n\t\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": {\n\t\t\t\t\"type\": \"number\"\n\t\t\t},\n\t\t\t\"exclusiveMaximum\": {\n\t\t\t\t\"type\": \"number\"\n\t\t\t},\n\t\t\t\"minimum\": {\n\t\t\t\t\"type\": \"number\"\n\t\t\t},\n\t\t\t\"exclusiveMinimum\": {\n\t\t\t\t\"type\": \"number\"\n\t\t\t},\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": {\n\t\t\t\t\t\"$ref\": \"#/$defs/stringArray\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": {\n\t\t\t\t\"enum\": [\n\t\t\t\t\t\"array\",\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\"integer\",\n\t\t\t\t\t\"null\",\n\t\t\t\t\t\"number\",\n\t\t\t\t\t\"object\",\n\t\t\t\t\t\"string\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft/2020-12/schema",
    "content": "{\n\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\"$id\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\"$vocabulary\": {\n\t\t\"https://json-schema.org/draft/2020-12/vocab/core\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/applicator\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/validation\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/meta-data\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true,\n\t\t\"https://json-schema.org/draft/2020-12/vocab/content\": true\n\t},\n\t\"$dynamicAnchor\": \"meta\",\n\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\"allOf\": [\n\t\t{\"$ref\": \"meta/core\"},\n\t\t{\"$ref\": \"meta/applicator\"},\n\t\t{\"$ref\": \"meta/unevaluated\"},\n\t\t{\"$ref\": \"meta/validation\"},\n\t\t{\"$ref\": \"meta/meta-data\"},\n\t\t{\"$ref\": \"meta/format-annotation\"},\n\t\t{\"$ref\": \"meta/content\"}\n\t],\n\t\"type\": [\"object\", \"boolean\"],\n\t\"$comment\": \"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.\",\n\t\"properties\": {\n\t\t\"definitions\": {\n\t\t\t\"$comment\": \"\\\"definitions\\\" has been replaced by \\\"$defs\\\".\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"deprecated\": true,\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependencies\": {\n\t\t\t\"$comment\": \"\\\"dependencies\\\" has been split and replaced by \\\"dependentSchemas\\\" and \\\"dependentRequired\\\" in order to serve their differing semantics.\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\t{ \"$ref\": \"meta/validation#/$defs/stringArray\" }\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"deprecated\": true,\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"$recursiveAnchor\": {\n\t\t\t\"$comment\": \"\\\"$recursiveAnchor\\\" has been replaced by \\\"$dynamicAnchor\\\".\",\n\t\t\t\"$ref\": \"meta/core#/$defs/anchorString\",\n\t\t\t\"deprecated\": true\n\t\t},\n\t\t\"$recursiveRef\": {\n\t\t\t\"$comment\": \"\\\"$recursiveRef\\\" has been replaced by \\\"$dynamicRef\\\".\",\n\t\t\t\"$ref\": \"meta/core#/$defs/uriReferenceString\",\n\t\t\t\"deprecated\": true\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft-04/schema",
    "content": "{\n\t\"$schema\": \"http://json-schema.org/draft-04/schema#\",\n\t\"description\": \"Core schema meta-schema\",\n\t\"definitions\": {\n\t\t\"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"positiveInteger\": {\n\t\t\t\"type\": \"integer\",\n\t\t\t\"minimum\": 0\n\t\t},\n\t\t\"positiveIntegerDefault0\": {\n\t\t\t\"allOf\": [ { \"$ref\": \"#/definitions/positiveInteger\" }, { \"default\": 0 } ]\n\t\t},\n\t\t\"simpleTypes\": {\n\t\t\t\"enum\": [ \"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\" ]\n\t\t},\n\t\t\"stringArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\"minItems\": 1,\n\t\t\t\"uniqueItems\": true\n\t\t}\n\t},\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"id\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uriref\"\n\t\t},\n\t\t\"$schema\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri\"\n\t\t},\n\t\t\"title\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"default\": {},\n\t\t\"multipleOf\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"minimum\": 0,\n\t\t\t\"exclusiveMinimum\": true\n\t\t},\n\t\t\"maximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMaximum\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"minimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMinimum\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"maxLength\": { \"$ref\": \"#/definitions/positiveInteger\" },\n\t\t\"minLength\": { \"$ref\": \"#/definitions/positiveIntegerDefault0\" },\n\t\t\"pattern\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"regex\"\n\t\t},\n\t\t\"additionalItems\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"type\": \"boolean\" },\n\t\t\t\t{ \"$ref\": \"#\" }\n\t\t\t],\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"items\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t{ \"$ref\": \"#/definitions/schemaArray\" }\n\t\t\t],\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"maxItems\": { \"$ref\": \"#/definitions/positiveInteger\" },\n\t\t\"minItems\": { \"$ref\": \"#/definitions/positiveIntegerDefault0\" },\n\t\t\"uniqueItems\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"maxProperties\": { \"$ref\": \"#/definitions/positiveInteger\" },\n\t\t\"minProperties\": { \"$ref\": \"#/definitions/positiveIntegerDefault0\" },\n\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\"additionalProperties\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"type\": \"boolean\" },\n\t\t\t\t{ \"$ref\": \"#\" }\n\t\t\t],\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"definitions\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"properties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"patternProperties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependencies\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t\t{ \"$ref\": \"#/definitions/stringArray\" }\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"enum\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"uniqueItems\": true\n\t\t},\n\t\t\"type\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\t\"minItems\": 1,\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"not\": { \"$ref\": \"#\" },\n\t\t\"format\": { \"type\": \"string\" },\n\t\t\"$ref\": { \"type\": \"string\" }\n\t},\n\t\"dependencies\": {\n\t\t\"exclusiveMaximum\": [ \"maximum\" ],\n\t\t\"exclusiveMinimum\": [ \"minimum\" ]\n\t},\n\t\"default\": {}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft-06/schema",
    "content": "{\n\t\"$schema\": \"http://json-schema.org/draft-06/schema#\",\n\t\"$id\": \"http://json-schema.org/draft-06/schema#\",\n\t\"title\": \"Core schema meta-schema\",\n\t\"definitions\": {\n\t\t\"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"nonNegativeInteger\": {\n\t\t\t\"type\": \"integer\",\n\t\t\t\"minimum\": 0\n\t\t},\n\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\"allOf\": [\n\t\t\t\t{ \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\t{ \"default\": 0 }\n\t\t\t]\n\t\t},\n\t\t\"simpleTypes\": {\n\t\t\t\"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t]\n\t\t},\n\t\t\"stringArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\"uniqueItems\": true,\n\t\t\t\"default\": []\n\t\t}\n\t},\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"$id\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"$schema\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri\"\n\t\t},\n\t\t\"$ref\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"title\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"default\": {},\n\t\t\"multipleOf\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"exclusiveMinimum\": 0\n\t\t},\n\t\t\"maximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMaximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"minimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMinimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"maxLength\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minLength\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"pattern\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"regex\"\n\t\t},\n\t\t\"additionalItems\": { \"$ref\": \"#\" },\n\t\t\"items\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t{ \"$ref\": \"#/definitions/schemaArray\" }\n\t\t\t],\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"maxItems\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minItems\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"uniqueItems\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"contains\": { \"$ref\": \"#\" },\n\t\t\"maxProperties\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minProperties\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\"definitions\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"properties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"patternProperties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependencies\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t\t{ \"$ref\": \"#/definitions/stringArray\" }\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"propertyNames\": { \"$ref\": \"#\" },\n\t\t\"const\": {},\n\t\t\"enum\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"uniqueItems\": true\n\t\t},\n\t\t\"type\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\t\"minItems\": 1,\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"format\": { \"type\": \"string\" },\n\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"not\": { \"$ref\": \"#\" }\n\t},\n\t\"default\": {}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/metaschemas/draft-07/schema",
    "content": "{\n\t\"$schema\": \"http://json-schema.org/draft-07/schema#\",\n\t\"$id\": \"http://json-schema.org/draft-07/schema#\",\n\t\"title\": \"Core schema meta-schema\",\n\t\"definitions\": {\n\t\t\"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"nonNegativeInteger\": {\n\t\t\t\"type\": \"integer\",\n\t\t\t\"minimum\": 0\n\t\t},\n\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\"allOf\": [\n\t\t\t\t{ \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\t{ \"default\": 0 }\n\t\t\t]\n\t\t},\n\t\t\"simpleTypes\": {\n\t\t\t\"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t]\n\t\t},\n\t\t\"stringArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\"uniqueItems\": true,\n\t\t\t\"default\": []\n\t\t}\n\t},\n\t\"type\": [\"object\", \"boolean\"],\n\t\"properties\": {\n\t\t\"$id\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"$schema\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri\"\n\t\t},\n\t\t\"$ref\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"uri-reference\"\n\t\t},\n\t\t\"$comment\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"title\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"default\": true,\n\t\t\"readOnly\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"writeOnly\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"examples\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": true\n\t\t},\n\t\t\"multipleOf\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"exclusiveMinimum\": 0\n\t\t},\n\t\t\"maximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMaximum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"minimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"exclusiveMinimum\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"maxLength\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minLength\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"pattern\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"regex\"\n\t\t},\n\t\t\"additionalItems\": { \"$ref\": \"#\" },\n\t\t\"items\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t{ \"$ref\": \"#/definitions/schemaArray\" }\n\t\t\t],\n\t\t\t\"default\": true\n\t\t},\n\t\t\"maxItems\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minItems\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"uniqueItems\": {\n\t\t\t\"type\": \"boolean\",\n\t\t\t\"default\": false\n\t\t},\n\t\t\"contains\": { \"$ref\": \"#\" },\n\t\t\"maxProperties\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\"minProperties\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\"definitions\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"properties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"patternProperties\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\"default\": {}\n\t\t},\n\t\t\"dependencies\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"additionalProperties\": {\n\t\t\t\t\"anyOf\": [\n\t\t\t\t\t{ \"$ref\": \"#\" },\n\t\t\t\t\t{ \"$ref\": \"#/definitions/stringArray\" }\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"propertyNames\": { \"$ref\": \"#\" },\n\t\t\"const\": true,\n\t\t\"enum\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": true,\n\t\t\t\"minItems\": 1,\n\t\t\t\"uniqueItems\": true\n\t\t},\n\t\t\"type\": {\n\t\t\t\"anyOf\": [\n\t\t\t\t{ \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\t\"minItems\": 1,\n\t\t\t\t\t\"uniqueItems\": true\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"format\": { \"type\": \"string\" },\n\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\"if\": { \"$ref\": \"#\" },\n\t\t\"then\": { \"$ref\": \"#\" },\n\t\t\"else\": { \"$ref\": \"#\" },\n\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\"not\": { \"$ref\": \"#\" }\n\t},\n\t\"default\": true\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/objcompiler.go",
    "content": "package jsonschema\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"strconv\"\n)\n\ntype objCompiler struct {\n\tc   *Compiler\n\tobj map[string]any\n\tup  urlPtr\n\tr   *root\n\tres *resource\n\tq   *queue\n}\n\nfunc (c *objCompiler) compile(s *Schema) error {\n\t// id --\n\tif id := c.res.dialect.draft.getID(c.obj); id != \"\" {\n\t\ts.ID = id\n\t}\n\n\t// anchor --\n\tif s.DraftVersion < 2019 {\n\t\t// anchor is specified in id\n\t\tid := c.string(c.res.dialect.draft.id)\n\t\tif id != \"\" {\n\t\t\t_, f := split(id)\n\t\t\tif f != \"\" {\n\t\t\t\tvar err error\n\t\t\t\ts.Anchor, err = decode(f)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn &ParseAnchorError{URL: s.Location}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\ts.Anchor = c.string(\"$anchor\")\n\t}\n\n\tif err := c.compileDraft4(s); err != nil {\n\t\treturn err\n\t}\n\tif s.DraftVersion >= 6 {\n\t\tif err := c.compileDraft6(s); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif s.DraftVersion >= 7 {\n\t\tif err := c.compileDraft7(s); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif s.DraftVersion >= 2019 {\n\t\tif err := c.compileDraft2019(s); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif s.DraftVersion >= 2020 {\n\t\tif err := c.compileDraft2020(s); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// vocabularies\n\tvocabs := c.res.dialect.activeVocabs(c.c.roots.assertVocabs, c.c.roots.vocabularies)\n\tfor _, vocab := range vocabs {\n\t\tv := c.c.roots.vocabularies[vocab]\n\t\tif v == nil {\n\t\t\tcontinue\n\t\t}\n\t\text, err := v.Compile(&CompilerContext{c}, c.obj)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif ext != nil {\n\t\t\ts.Extensions = append(s.Extensions, ext)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *objCompiler) compileDraft4(s *Schema) error {\n\tvar err error\n\n\tif c.hasVocab(\"core\") {\n\t\tif s.Ref, err = c.enqueueRef(\"$ref\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s.DraftVersion < 2019 && s.Ref != nil {\n\t\t\t// All other properties in a \"$ref\" object MUST be ignored\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tif c.hasVocab(\"applicator\") {\n\t\ts.AllOf = c.enqueueArr(\"allOf\")\n\t\ts.AnyOf = c.enqueueArr(\"anyOf\")\n\t\ts.OneOf = c.enqueueArr(\"oneOf\")\n\t\ts.Not = c.enqueueProp(\"not\")\n\n\t\tif s.DraftVersion < 2020 {\n\t\t\tif items, ok := c.obj[\"items\"]; ok {\n\t\t\t\tif _, ok := items.([]any); ok {\n\t\t\t\t\ts.Items = c.enqueueArr(\"items\")\n\t\t\t\t\ts.AdditionalItems = c.enqueueAdditional(\"additionalItems\")\n\t\t\t\t} else {\n\t\t\t\t\ts.Items = c.enqueueProp(\"items\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ts.Properties = c.enqueueMap(\"properties\")\n\t\tif m := c.enqueueMap(\"patternProperties\"); m != nil {\n\t\t\ts.PatternProperties = map[Regexp]*Schema{}\n\t\t\tfor pname, sch := range m {\n\t\t\t\tre, err := c.c.roots.regexpEngine(pname)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn &InvalidRegexError{c.up.format(\"patternProperties\"), pname, err}\n\t\t\t\t}\n\t\t\t\ts.PatternProperties[re] = sch\n\t\t\t}\n\t\t}\n\t\ts.AdditionalProperties = c.enqueueAdditional(\"additionalProperties\")\n\n\t\tif m := c.objVal(\"dependencies\"); m != nil {\n\t\t\ts.Dependencies = map[string]any{}\n\t\t\tfor pname, pvalue := range m {\n\t\t\t\tif arr, ok := pvalue.([]any); ok {\n\t\t\t\t\ts.Dependencies[pname] = toStrings(arr)\n\t\t\t\t} else {\n\t\t\t\t\tptr := c.up.ptr.append2(\"dependencies\", pname)\n\t\t\t\t\ts.Dependencies[pname] = c.enqueuePtr(ptr)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif c.hasVocab(\"validation\") {\n\t\tif t, ok := c.obj[\"type\"]; ok {\n\t\t\ts.Types = newTypes(t)\n\t\t}\n\t\tif arr := c.arrVal(\"enum\"); arr != nil {\n\t\t\ts.Enum = newEnum(arr)\n\t\t}\n\t\ts.MultipleOf = c.numVal(\"multipleOf\")\n\t\ts.Maximum = c.numVal(\"maximum\")\n\t\tif c.boolean(\"exclusiveMaximum\") {\n\t\t\ts.ExclusiveMaximum = s.Maximum\n\t\t\ts.Maximum = nil\n\t\t} else {\n\t\t\ts.ExclusiveMaximum = c.numVal(\"exclusiveMaximum\")\n\t\t}\n\t\ts.Minimum = c.numVal(\"minimum\")\n\t\tif c.boolean(\"exclusiveMinimum\") {\n\t\t\ts.ExclusiveMinimum = s.Minimum\n\t\t\ts.Minimum = nil\n\t\t} else {\n\t\t\ts.ExclusiveMinimum = c.numVal(\"exclusiveMinimum\")\n\t\t}\n\n\t\ts.MinLength = c.intVal(\"minLength\")\n\t\ts.MaxLength = c.intVal(\"maxLength\")\n\t\tif pat := c.strVal(\"pattern\"); pat != nil {\n\t\t\ts.Pattern, err = c.c.roots.regexpEngine(*pat)\n\t\t\tif err != nil {\n\t\t\t\treturn &InvalidRegexError{c.up.format(\"pattern\"), *pat, err}\n\t\t\t}\n\t\t}\n\n\t\ts.MinItems = c.intVal(\"minItems\")\n\t\ts.MaxItems = c.intVal(\"maxItems\")\n\t\ts.UniqueItems = c.boolean(\"uniqueItems\")\n\n\t\ts.MaxProperties = c.intVal(\"maxProperties\")\n\t\ts.MinProperties = c.intVal(\"minProperties\")\n\t\tif arr := c.arrVal(\"required\"); arr != nil {\n\t\t\ts.Required = toStrings(arr)\n\t\t}\n\t}\n\n\t// format --\n\tif c.assertFormat(s.DraftVersion) {\n\t\tif f := c.strVal(\"format\"); f != nil {\n\t\t\tif *f == \"regex\" {\n\t\t\t\ts.Format = &Format{\n\t\t\t\t\tName:     \"regex\",\n\t\t\t\t\tValidate: c.c.roots.regexpEngine.validate,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ts.Format = c.c.formats[*f]\n\t\t\t\tif s.Format == nil {\n\t\t\t\t\ts.Format = formats[*f]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// annotations --\n\ts.Title = c.string(\"title\")\n\ts.Description = c.string(\"description\")\n\tif v, ok := c.obj[\"default\"]; ok {\n\t\ts.Default = &v\n\t}\n\n\treturn nil\n}\n\nfunc (c *objCompiler) compileDraft6(s *Schema) error {\n\tif c.hasVocab(\"applicator\") {\n\t\ts.Contains = c.enqueueProp(\"contains\")\n\t\ts.PropertyNames = c.enqueueProp(\"propertyNames\")\n\t}\n\tif c.hasVocab(\"validation\") {\n\t\tif v, ok := c.obj[\"const\"]; ok {\n\t\t\ts.Const = &v\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *objCompiler) compileDraft7(s *Schema) error {\n\tif c.hasVocab(\"applicator\") {\n\t\ts.If = c.enqueueProp(\"if\")\n\t\tif s.If != nil {\n\t\t\tb := c.boolVal(\"if\")\n\t\t\tif b == nil || *b {\n\t\t\t\ts.Then = c.enqueueProp(\"then\")\n\t\t\t}\n\t\t\tif b == nil || !*b {\n\t\t\t\ts.Else = c.enqueueProp(\"else\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif c.c.assertContent {\n\t\tif ce := c.strVal(\"contentEncoding\"); ce != nil {\n\t\t\ts.ContentEncoding = c.c.decoders[*ce]\n\t\t\tif s.ContentEncoding == nil {\n\t\t\t\ts.ContentEncoding = decoders[*ce]\n\t\t\t}\n\t\t}\n\t\tif cm := c.strVal(\"contentMediaType\"); cm != nil {\n\t\t\ts.ContentMediaType = c.c.mediaTypes[*cm]\n\t\t\tif s.ContentMediaType == nil {\n\t\t\t\ts.ContentMediaType = mediaTypes[*cm]\n\t\t\t}\n\t\t}\n\t}\n\n\t// annotations --\n\ts.Comment = c.string(\"$comment\")\n\ts.ReadOnly = c.boolean(\"readOnly\")\n\ts.WriteOnly = c.boolean(\"writeOnly\")\n\tif arr, ok := c.obj[\"examples\"].([]any); ok {\n\t\ts.Examples = arr\n\t}\n\n\treturn nil\n}\n\nfunc (c *objCompiler) compileDraft2019(s *Schema) error {\n\tvar err error\n\n\tif c.hasVocab(\"core\") {\n\t\tif s.RecursiveRef, err = c.enqueueRef(\"$recursiveRef\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts.RecursiveAnchor = c.boolean(\"$recursiveAnchor\")\n\t}\n\n\tif c.hasVocab(\"validation\") {\n\t\tif s.Contains != nil {\n\t\t\ts.MinContains = c.intVal(\"minContains\")\n\t\t\ts.MaxContains = c.intVal(\"maxContains\")\n\t\t}\n\t\tif m := c.objVal(\"dependentRequired\"); m != nil {\n\t\t\ts.DependentRequired = map[string][]string{}\n\t\t\tfor pname, pvalue := range m {\n\t\t\t\tif arr, ok := pvalue.([]any); ok {\n\t\t\t\t\ts.DependentRequired[pname] = toStrings(arr)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif c.hasVocab(\"applicator\") {\n\t\ts.DependentSchemas = c.enqueueMap(\"dependentSchemas\")\n\t}\n\n\tvar unevaluated bool\n\tif s.DraftVersion == 2019 {\n\t\tunevaluated = c.hasVocab(\"applicator\")\n\t} else {\n\t\tunevaluated = c.hasVocab(\"unevaluated\")\n\t}\n\tif unevaluated {\n\t\ts.UnevaluatedItems = c.enqueueProp(\"unevaluatedItems\")\n\t\ts.UnevaluatedProperties = c.enqueueProp(\"unevaluatedProperties\")\n\t}\n\n\tif c.c.assertContent {\n\t\tif s.ContentMediaType != nil && s.ContentMediaType.UnmarshalJSON != nil {\n\t\t\ts.ContentSchema = c.enqueueProp(\"contentSchema\")\n\t\t}\n\t}\n\n\t// annotations --\n\ts.Deprecated = c.boolean(\"deprecated\")\n\n\treturn nil\n}\n\nfunc (c *objCompiler) compileDraft2020(s *Schema) error {\n\tif c.hasVocab(\"core\") {\n\t\tsch, err := c.enqueueRef(\"$dynamicRef\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif sch != nil {\n\t\t\tdref := c.strVal(\"$dynamicRef\")\n\t\t\t_, frag, err := splitFragment(*dref)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvar anch string\n\t\t\tif anchor, ok := frag.convert().(anchor); ok {\n\t\t\t\tanch = string(anchor)\n\t\t\t}\n\t\t\ts.DynamicRef = &DynamicRef{sch, anch}\n\t\t}\n\t\ts.DynamicAnchor = c.string(\"$dynamicAnchor\")\n\t}\n\n\tif c.hasVocab(\"applicator\") {\n\t\ts.PrefixItems = c.enqueueArr(\"prefixItems\")\n\t\ts.Items2020 = c.enqueueProp(\"items\")\n\t}\n\n\treturn nil\n}\n\n// enqueue helpers --\n\nfunc (c *objCompiler) enqueuePtr(ptr jsonPointer) *Schema {\n\tup := urlPtr{c.up.url, ptr}\n\treturn c.c.enqueue(c.q, up)\n}\n\nfunc (c *objCompiler) enqueueRef(pname string) (*Schema, error) {\n\tref := c.strVal(pname)\n\tif ref == nil {\n\t\treturn nil, nil\n\t}\n\tbaseURL := c.res.id\n\t// baseURL := c.r.baseURL(c.up.ptr)\n\tuf, err := baseURL.join(*ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tup, err := c.r.resolve(*uf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif up != nil {\n\t\t// local ref\n\t\treturn c.enqueuePtr(up.ptr), nil\n\t}\n\n\t// remote ref\n\tup_, err := c.c.roots.resolveFragment(*uf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c.c.enqueue(c.q, up_), nil\n}\n\nfunc (c *objCompiler) enqueueProp(pname string) *Schema {\n\tif _, ok := c.obj[pname]; !ok {\n\t\treturn nil\n\t}\n\tptr := c.up.ptr.append(pname)\n\treturn c.enqueuePtr(ptr)\n}\n\nfunc (c *objCompiler) enqueueArr(pname string) []*Schema {\n\tarr := c.arrVal(pname)\n\tif arr == nil {\n\t\treturn nil\n\t}\n\tsch := make([]*Schema, len(arr))\n\tfor i := range arr {\n\t\tptr := c.up.ptr.append2(pname, strconv.Itoa(i))\n\t\tsch[i] = c.enqueuePtr(ptr)\n\t}\n\treturn sch\n}\n\nfunc (c *objCompiler) enqueueMap(pname string) map[string]*Schema {\n\tobj := c.objVal(pname)\n\tif obj == nil {\n\t\treturn nil\n\t}\n\tsch := make(map[string]*Schema)\n\tfor k := range obj {\n\t\tptr := c.up.ptr.append2(pname, k)\n\t\tsch[k] = c.enqueuePtr(ptr)\n\t}\n\treturn sch\n}\n\nfunc (c *objCompiler) enqueueAdditional(pname string) any {\n\tif b := c.boolVal(pname); b != nil {\n\t\treturn *b\n\t}\n\tif sch := c.enqueueProp(pname); sch != nil {\n\t\treturn sch\n\t}\n\treturn nil\n}\n\n// --\n\nfunc (c *objCompiler) hasVocab(name string) bool {\n\treturn c.res.dialect.hasVocab(name)\n}\n\nfunc (c *objCompiler) assertFormat(draftVersion int) bool {\n\tif c.c.assertFormat || draftVersion < 2019 {\n\t\treturn true\n\t}\n\tif draftVersion == 2019 {\n\t\treturn c.hasVocab(\"format\")\n\t} else {\n\t\treturn c.hasVocab(\"format-assertion\")\n\t}\n}\n\n// value helpers --\n\nfunc (c *objCompiler) boolVal(pname string) *bool {\n\tv, ok := c.obj[pname]\n\tif !ok {\n\t\treturn nil\n\t}\n\tb, ok := v.(bool)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn &b\n}\n\nfunc (c *objCompiler) boolean(pname string) bool {\n\tb := c.boolVal(pname)\n\treturn b != nil && *b\n}\n\nfunc (c *objCompiler) strVal(pname string) *string {\n\tv, ok := c.obj[pname]\n\tif !ok {\n\t\treturn nil\n\t}\n\ts, ok := v.(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn &s\n}\n\nfunc (c *objCompiler) string(pname string) string {\n\tif s := c.strVal(pname); s != nil {\n\t\treturn *s\n\t}\n\treturn \"\"\n}\n\nfunc (c *objCompiler) numVal(pname string) *big.Rat {\n\tv, ok := c.obj[pname]\n\tif !ok {\n\t\treturn nil\n\t}\n\tswitch v.(type) {\n\tcase json.Number, float32, float64, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\tif n, ok := new(big.Rat).SetString(fmt.Sprint(v)); ok {\n\t\t\treturn n\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *objCompiler) intVal(pname string) *int {\n\tif n := c.numVal(pname); n != nil && n.IsInt() {\n\t\tn := int(n.Num().Int64())\n\t\treturn &n\n\t}\n\treturn nil\n}\n\nfunc (c *objCompiler) objVal(pname string) map[string]any {\n\tv, ok := c.obj[pname]\n\tif !ok {\n\t\treturn nil\n\t}\n\tobj, ok := v.(map[string]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn obj\n}\n\nfunc (c *objCompiler) arrVal(pname string) []any {\n\tv, ok := c.obj[pname]\n\tif !ok {\n\t\treturn nil\n\t}\n\tarr, ok := v.([]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn arr\n}\n\n// --\n\ntype InvalidRegexError struct {\n\tURL   string\n\tRegex string\n\tErr   error\n}\n\nfunc (e *InvalidRegexError) Error() string {\n\treturn fmt.Sprintf(\"invalid regex %q at %q: %v\", e.Regex, e.URL, e.Err)\n}\n\n// --\n\nfunc toStrings(arr []any) []string {\n\tvar strings []string\n\tfor _, item := range arr {\n\t\tif s, ok := item.(string); ok {\n\t\t\tstrings = append(strings, s)\n\t\t}\n\t}\n\treturn strings\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/output.go",
    "content": "package jsonschema\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/santhosh-tekuri/jsonschema/v6/kind\"\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/message\"\n)\n\nvar defaultPrinter = message.NewPrinter(language.English)\n\n// format ---\n\nfunc (e *ValidationError) schemaURL() string {\n\tif ref, ok := e.ErrorKind.(*kind.Reference); ok {\n\t\treturn ref.URL\n\t} else {\n\t\treturn e.SchemaURL\n\t}\n}\n\nfunc (e *ValidationError) absoluteKeywordLocation() string {\n\tvar schemaURL string\n\tvar keywordPath []string\n\tif ref, ok := e.ErrorKind.(*kind.Reference); ok {\n\t\tschemaURL = ref.URL\n\t\tkeywordPath = nil\n\t} else {\n\t\tschemaURL = e.SchemaURL\n\t\tkeywordPath = e.ErrorKind.KeywordPath()\n\t}\n\treturn fmt.Sprintf(\"%s%s\", schemaURL, encode(jsonPtr(keywordPath)))\n}\n\nfunc (e *ValidationError) skip() bool {\n\tif len(e.Causes) == 1 {\n\t\t_, ok := e.ErrorKind.(*kind.Reference)\n\t\treturn ok\n\t}\n\treturn false\n}\n\nfunc (e *ValidationError) display(sb *strings.Builder, verbose bool, indent int, absKwLoc string, p *message.Printer) {\n\tif !e.skip() {\n\t\tif indent > 0 {\n\t\t\tsb.WriteByte('\\n')\n\t\t\tfor i := 0; i < indent-1; i++ {\n\t\t\t\tsb.WriteString(\"  \")\n\t\t\t}\n\t\t\tsb.WriteString(\"- \")\n\t\t}\n\t\tindent = indent + 1\n\n\t\tprevAbsKwLoc := absKwLoc\n\t\tabsKwLoc = e.absoluteKeywordLocation()\n\n\t\tif _, ok := e.ErrorKind.(*kind.Schema); ok {\n\t\t\tsb.WriteString(e.ErrorKind.LocalizedString(p))\n\t\t} else {\n\t\t\tsb.WriteString(p.Sprintf(\"at %s\", quote(jsonPtr(e.InstanceLocation))))\n\t\t\tif verbose {\n\t\t\t\tschLoc := absKwLoc\n\t\t\t\tif prevAbsKwLoc != \"\" {\n\t\t\t\t\tpu, _ := split(prevAbsKwLoc)\n\t\t\t\t\tu, f := split(absKwLoc)\n\t\t\t\t\tif u == pu {\n\t\t\t\t\t\tschLoc = fmt.Sprintf(\"S#%s\", f)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfmt.Fprintf(sb, \" [%s]\", schLoc)\n\t\t\t}\n\t\t\tfmt.Fprintf(sb, \": %s\", e.ErrorKind.LocalizedString(p))\n\t\t}\n\t}\n\tfor _, cause := range e.Causes {\n\t\tcause.display(sb, verbose, indent, absKwLoc, p)\n\t}\n}\n\nfunc (e *ValidationError) Error() string {\n\treturn e.LocalizedError(defaultPrinter)\n}\n\nfunc (e *ValidationError) LocalizedError(p *message.Printer) string {\n\tvar sb strings.Builder\n\te.display(&sb, false, 0, \"\", p)\n\treturn sb.String()\n}\n\nfunc (e *ValidationError) GoString() string {\n\treturn e.LocalizedGoString(defaultPrinter)\n}\n\nfunc (e *ValidationError) LocalizedGoString(p *message.Printer) string {\n\tvar sb strings.Builder\n\te.display(&sb, true, 0, \"\", p)\n\treturn sb.String()\n}\n\nfunc jsonPtr(tokens []string) string {\n\tvar sb strings.Builder\n\tfor _, tok := range tokens {\n\t\tsb.WriteByte('/')\n\t\tsb.WriteString(escape(tok))\n\t}\n\treturn sb.String()\n}\n\n// --\n\n// Flag is output format with simple boolean property valid.\ntype FlagOutput struct {\n\tValid bool `json:\"valid\"`\n}\n\n// The `Flag` output format, merely the boolean result.\nfunc (e *ValidationError) FlagOutput() *FlagOutput {\n\treturn &FlagOutput{Valid: false}\n}\n\n// --\n\ntype OutputUnit struct {\n\tValid                   bool         `json:\"valid\"`\n\tKeywordLocation         string       `json:\"keywordLocation\"`\n\tAbsoluteKeywordLocation string       `json:\"AbsoluteKeywordLocation,omitempty\"`\n\tInstanceLocation        string       `json:\"instanceLocation\"`\n\tError                   *OutputError `json:\"error,omitempty\"`\n\tErrors                  []OutputUnit `json:\"errors,omitempty\"`\n}\n\ntype OutputError struct {\n\tKind ErrorKind\n\tp    *message.Printer\n}\n\nfunc (k OutputError) String() string {\n\treturn k.Kind.LocalizedString(k.p)\n}\n\nfunc (k OutputError) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(k.Kind.LocalizedString(k.p))\n}\n\n// The `Basic` structure, a flat list of output units.\nfunc (e *ValidationError) BasicOutput() *OutputUnit {\n\treturn e.LocalizedBasicOutput(defaultPrinter)\n}\n\nfunc (e *ValidationError) LocalizedBasicOutput(p *message.Printer) *OutputUnit {\n\tout := e.output(true, false, \"\", \"\", p)\n\treturn &out\n}\n\n// The `Detailed` structure, based on the schema.\nfunc (e *ValidationError) DetailedOutput() *OutputUnit {\n\treturn e.LocalizedDetailedOutput(defaultPrinter)\n}\n\nfunc (e *ValidationError) LocalizedDetailedOutput(p *message.Printer) *OutputUnit {\n\tout := e.output(false, false, \"\", \"\", p)\n\treturn &out\n}\n\nfunc (e *ValidationError) output(flatten, inRef bool, schemaURL, kwLoc string, p *message.Printer) OutputUnit {\n\tif !inRef {\n\t\tif _, ok := e.ErrorKind.(*kind.Reference); ok {\n\t\t\tinRef = true\n\t\t}\n\t}\n\tif schemaURL != \"\" {\n\t\tkwLoc += e.SchemaURL[len(schemaURL):]\n\t\tif ref, ok := e.ErrorKind.(*kind.Reference); ok {\n\t\t\tkwLoc += jsonPtr(ref.KeywordPath())\n\t\t}\n\t}\n\tschemaURL = e.schemaURL()\n\n\tkeywordLocation := kwLoc\n\tif _, ok := e.ErrorKind.(*kind.Reference); !ok {\n\t\tkeywordLocation += jsonPtr(e.ErrorKind.KeywordPath())\n\t}\n\n\tout := OutputUnit{\n\t\tValid:            false,\n\t\tInstanceLocation: jsonPtr(e.InstanceLocation),\n\t\tKeywordLocation:  keywordLocation,\n\t}\n\tif inRef {\n\t\tout.AbsoluteKeywordLocation = e.absoluteKeywordLocation()\n\t}\n\tfor _, cause := range e.Causes {\n\t\tcauseOut := cause.output(flatten, inRef, schemaURL, kwLoc, p)\n\t\tif cause.skip() {\n\t\t\tcauseOut = causeOut.Errors[0]\n\t\t}\n\t\tif flatten {\n\t\t\terrors := causeOut.Errors\n\t\t\tcauseOut.Errors = nil\n\t\t\tcauseOut.Error = &OutputError{cause.ErrorKind, p}\n\t\t\tout.Errors = append(out.Errors, causeOut)\n\t\t\tif len(errors) > 0 {\n\t\t\t\tout.Errors = append(out.Errors, errors...)\n\t\t\t}\n\t\t} else {\n\t\t\tout.Errors = append(out.Errors, causeOut)\n\t\t}\n\t}\n\tif len(out.Errors) == 0 {\n\t\tout.Error = &OutputError{e.ErrorKind, p}\n\t}\n\treturn out\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/position.go",
    "content": "package jsonschema\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Position tells possible tokens in json.\ntype Position interface {\n\tcollect(v any, ptr jsonPointer) map[jsonPointer]any\n}\n\n// --\n\ntype AllProp struct{}\n\nfunc (AllProp) collect(v any, ptr jsonPointer) map[jsonPointer]any {\n\tobj, ok := v.(map[string]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\tm := map[jsonPointer]any{}\n\tfor pname, pvalue := range obj {\n\t\tm[ptr.append(pname)] = pvalue\n\t}\n\treturn m\n}\n\n// --\n\ntype AllItem struct{}\n\nfunc (AllItem) collect(v any, ptr jsonPointer) map[jsonPointer]any {\n\tarr, ok := v.([]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\tm := map[jsonPointer]any{}\n\tfor i, item := range arr {\n\t\tm[ptr.append(strconv.Itoa(i))] = item\n\t}\n\treturn m\n}\n\n// --\n\ntype Prop string\n\nfunc (p Prop) collect(v any, ptr jsonPointer) map[jsonPointer]any {\n\tobj, ok := v.(map[string]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\tpvalue, ok := obj[string(p)]\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn map[jsonPointer]any{\n\t\tptr.append(string(p)): pvalue,\n\t}\n}\n\n// --\n\ntype Item int\n\nfunc (i Item) collect(v any, ptr jsonPointer) map[jsonPointer]any {\n\tarr, ok := v.([]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\tif i < 0 || int(i) >= len(arr) {\n\t\treturn nil\n\t}\n\treturn map[jsonPointer]any{\n\t\tptr.append(strconv.Itoa(int(i))): arr[int(i)],\n\t}\n}\n\n// --\n\n// SchemaPath tells where to look for subschema inside keyword.\ntype SchemaPath []Position\n\nfunc schemaPath(path string) SchemaPath {\n\tvar sp SchemaPath\n\tfor _, tok := range strings.Split(path, \"/\") {\n\t\tvar pos Position\n\t\tswitch tok {\n\t\tcase \"*\":\n\t\t\tpos = AllProp{}\n\t\tcase \"[]\":\n\t\t\tpos = AllItem{}\n\t\tdefault:\n\t\t\tif i, err := strconv.Atoi(tok); err == nil {\n\t\t\t\tpos = Item(i)\n\t\t\t} else {\n\t\t\t\tpos = Prop(tok)\n\t\t\t}\n\t\t}\n\t\tsp = append(sp, pos)\n\t}\n\treturn sp\n}\n\nfunc (sp SchemaPath) collect(v any, ptr jsonPointer) map[jsonPointer]any {\n\tif len(sp) == 0 {\n\t\treturn map[jsonPointer]any{\n\t\t\tptr: v,\n\t\t}\n\t}\n\tp, sp := sp[0], sp[1:]\n\tm := p.collect(v, ptr)\n\tmm := map[jsonPointer]any{}\n\tfor ptr, v := range m {\n\t\tm = sp.collect(v, ptr)\n\t\tfor k, v := range m {\n\t\t\tmm[k] = v\n\t\t}\n\t}\n\treturn mm\n}\n\nfunc (sp SchemaPath) String() string {\n\tvar sb strings.Builder\n\tfor _, pos := range sp {\n\t\tif sb.Len() != 0 {\n\t\t\tsb.WriteByte('/')\n\t\t}\n\t\tswitch pos := pos.(type) {\n\t\tcase AllProp:\n\t\t\tsb.WriteString(\"*\")\n\t\tcase AllItem:\n\t\t\tsb.WriteString(\"[]\")\n\t\tcase Prop:\n\t\t\tsb.WriteString(string(pos))\n\t\tcase Item:\n\t\t\tsb.WriteString(strconv.Itoa(int(pos)))\n\t\t}\n\t}\n\treturn sb.String()\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/root.go",
    "content": "package jsonschema\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n)\n\ntype root struct {\n\turl                 url\n\tdoc                 any\n\tresources           map[jsonPointer]*resource\n\tsubschemasProcessed map[jsonPointer]struct{}\n}\n\nfunc (r *root) rootResource() *resource {\n\treturn r.resources[\"\"]\n}\n\nfunc (r *root) resource(ptr jsonPointer) *resource {\n\tfor {\n\t\tif res, ok := r.resources[ptr]; ok {\n\t\t\treturn res\n\t\t}\n\t\tslash := strings.LastIndexByte(string(ptr), '/')\n\t\tif slash == -1 {\n\t\t\tbreak\n\t\t}\n\t\tptr = ptr[:slash]\n\t}\n\treturn r.rootResource()\n}\n\nfunc (r *root) resolveFragmentIn(frag fragment, res *resource) (urlPtr, error) {\n\tvar ptr jsonPointer\n\tswitch f := frag.convert().(type) {\n\tcase jsonPointer:\n\t\tptr = res.ptr.concat(f)\n\tcase anchor:\n\t\taptr, ok := res.anchors[f]\n\t\tif !ok {\n\t\t\treturn urlPtr{}, &AnchorNotFoundError{\n\t\t\t\tURL:       r.url.String(),\n\t\t\t\tReference: (&urlFrag{res.id, frag}).String(),\n\t\t\t}\n\t\t}\n\t\tptr = aptr\n\t}\n\treturn urlPtr{r.url, ptr}, nil\n}\n\nfunc (r *root) resolveFragment(frag fragment) (urlPtr, error) {\n\treturn r.resolveFragmentIn(frag, r.rootResource())\n}\n\n// resolves urlFrag to urlPtr from root.\n// returns nil if it is external.\nfunc (r *root) resolve(uf urlFrag) (*urlPtr, error) {\n\tvar res *resource\n\tif uf.url == r.url {\n\t\tres = r.rootResource()\n\t} else {\n\t\t// look for resource with id==uf.url\n\t\tfor _, v := range r.resources {\n\t\t\tif v.id == uf.url {\n\t\t\t\tres = v\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif res == nil {\n\t\t\treturn nil, nil // external url\n\t\t}\n\t}\n\tup, err := r.resolveFragmentIn(uf.frag, res)\n\treturn &up, err\n}\n\nfunc (r *root) collectAnchors(sch any, schPtr jsonPointer, res *resource) error {\n\tobj, ok := sch.(map[string]any)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\taddAnchor := func(anchor anchor) error {\n\t\tptr1, ok := res.anchors[anchor]\n\t\tif ok {\n\t\t\tif ptr1 == schPtr {\n\t\t\t\t// anchor with same root_ptr already exists\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn &DuplicateAnchorError{\n\t\t\t\tstring(anchor), r.url.String(), string(ptr1), string(schPtr),\n\t\t\t}\n\t\t}\n\t\tres.anchors[anchor] = schPtr\n\t\treturn nil\n\t}\n\n\tif res.dialect.draft.version < 2019 {\n\t\tif _, ok := obj[\"$ref\"]; ok {\n\t\t\t// All other properties in a \"$ref\" object MUST be ignored\n\t\t\treturn nil\n\t\t}\n\t\t// anchor is specified in id\n\t\tif id, ok := strVal(obj, res.dialect.draft.id); ok {\n\t\t\t_, frag, err := splitFragment(id)\n\t\t\tif err != nil {\n\t\t\t\tloc := urlPtr{r.url, schPtr}\n\t\t\t\treturn &ParseAnchorError{loc.String()}\n\t\t\t}\n\t\t\tif anchor, ok := frag.convert().(anchor); ok {\n\t\t\t\tif err := addAnchor(anchor); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif res.dialect.draft.version >= 2019 {\n\t\tif s, ok := strVal(obj, \"$anchor\"); ok {\n\t\t\tif err := addAnchor(anchor(s)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif res.dialect.draft.version >= 2020 {\n\t\tif s, ok := strVal(obj, \"$dynamicAnchor\"); ok {\n\t\t\tif err := addAnchor(anchor(s)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tres.dynamicAnchors = append(res.dynamicAnchors, anchor(s))\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (r *root) clone() *root {\n\tprocessed := map[jsonPointer]struct{}{}\n\tfor k := range r.subschemasProcessed {\n\t\tprocessed[k] = struct{}{}\n\t}\n\tresources := map[jsonPointer]*resource{}\n\tfor k, v := range r.resources {\n\t\tresources[k] = v.clone()\n\t}\n\treturn &root{\n\t\turl:                 r.url,\n\t\tdoc:                 r.doc,\n\t\tresources:           resources,\n\t\tsubschemasProcessed: processed,\n\t}\n}\n\n// --\n\ntype resource struct {\n\tptr            jsonPointer\n\tid             url\n\tdialect        dialect\n\tanchors        map[anchor]jsonPointer\n\tdynamicAnchors []anchor\n}\n\nfunc newResource(ptr jsonPointer, id url) *resource {\n\treturn &resource{ptr: ptr, id: id, anchors: make(map[anchor]jsonPointer)}\n}\n\nfunc (res *resource) clone() *resource {\n\tanchors := map[anchor]jsonPointer{}\n\tfor k, v := range res.anchors {\n\t\tanchors[k] = v\n\t}\n\treturn &resource{\n\t\tptr:            res.ptr,\n\t\tid:             res.id,\n\t\tdialect:        res.dialect,\n\t\tanchors:        anchors,\n\t\tdynamicAnchors: slices.Clone(res.dynamicAnchors),\n\t}\n}\n\n//--\n\ntype UnsupportedVocabularyError struct {\n\tURL        string\n\tVocabulary string\n}\n\nfunc (e *UnsupportedVocabularyError) Error() string {\n\treturn fmt.Sprintf(\"unsupported vocabulary %q in %q\", e.Vocabulary, e.URL)\n}\n\n// --\n\ntype AnchorNotFoundError struct {\n\tURL       string\n\tReference string\n}\n\nfunc (e *AnchorNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"anchor in %q not found in schema %q\", e.Reference, e.URL)\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/roots.go",
    "content": "package jsonschema\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype roots struct {\n\tdefaultDraft *Draft\n\troots        map[url]*root\n\tloader       defaultLoader\n\tregexpEngine RegexpEngine\n\tvocabularies map[string]*Vocabulary\n\tassertVocabs bool\n}\n\nfunc newRoots() *roots {\n\treturn &roots{\n\t\tdefaultDraft: draftLatest,\n\t\troots:        map[url]*root{},\n\t\tloader: defaultLoader{\n\t\t\tdocs:   map[url]any{},\n\t\t\tloader: FileLoader{},\n\t\t},\n\t\tregexpEngine: goRegexpCompile,\n\t\tvocabularies: map[string]*Vocabulary{},\n\t}\n}\n\nfunc (rr *roots) orLoad(u url) (*root, error) {\n\tif r, ok := rr.roots[u]; ok {\n\t\treturn r, nil\n\t}\n\tdoc, err := rr.loader.load(u)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn rr.addRoot(u, doc)\n}\n\nfunc (rr *roots) addRoot(u url, doc any) (*root, error) {\n\tr := &root{\n\t\turl:                 u,\n\t\tdoc:                 doc,\n\t\tresources:           map[jsonPointer]*resource{},\n\t\tsubschemasProcessed: map[jsonPointer]struct{}{},\n\t}\n\tif err := rr.collectResources(r, doc, u, \"\", dialect{rr.defaultDraft, nil}); err != nil {\n\t\treturn nil, err\n\t}\n\tif !strings.HasPrefix(u.String(), \"http://json-schema.org/\") &&\n\t\t!strings.HasPrefix(u.String(), \"https://json-schema.org/\") {\n\t\tif err := rr.validate(r, doc, \"\"); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\trr.roots[u] = r\n\treturn r, nil\n}\n\nfunc (rr *roots) resolveFragment(uf urlFrag) (urlPtr, error) {\n\tr, err := rr.orLoad(uf.url)\n\tif err != nil {\n\t\treturn urlPtr{}, err\n\t}\n\treturn r.resolveFragment(uf.frag)\n}\n\nfunc (rr *roots) collectResources(r *root, sch any, base url, schPtr jsonPointer, fallback dialect) error {\n\tif _, ok := r.subschemasProcessed[schPtr]; ok {\n\t\treturn nil\n\t}\n\tif err := rr._collectResources(r, sch, base, schPtr, fallback); err != nil {\n\t\treturn err\n\t}\n\tr.subschemasProcessed[schPtr] = struct{}{}\n\treturn nil\n}\n\nfunc (rr *roots) _collectResources(r *root, sch any, base url, schPtr jsonPointer, fallback dialect) error {\n\tobj, ok := sch.(map[string]any)\n\tif !ok {\n\t\tif schPtr.isEmpty() {\n\t\t\t// root resource\n\t\t\tres := newResource(schPtr, base)\n\t\t\tres.dialect = fallback\n\t\t\tr.resources[schPtr] = res\n\t\t}\n\t\treturn nil\n\t}\n\n\thasSchema := false\n\tif sch, ok := obj[\"$schema\"]; ok {\n\t\tif _, ok := sch.(string); ok {\n\t\t\thasSchema = true\n\t\t}\n\t}\n\n\tdraft, err := rr.loader.getDraft(urlPtr{r.url, schPtr}, sch, fallback.draft, map[url]struct{}{})\n\tif err != nil {\n\t\treturn err\n\t}\n\tid := draft.getID(obj)\n\tif id == \"\" && !schPtr.isEmpty() {\n\t\t// ignore $schema\n\t\tdraft = fallback.draft\n\t\thasSchema = false\n\t\tid = draft.getID(obj)\n\t}\n\n\tvar res *resource\n\tif id != \"\" {\n\t\tuf, err := base.join(id)\n\t\tif err != nil {\n\t\t\tloc := urlPtr{r.url, schPtr}\n\t\t\treturn &ParseIDError{loc.String()}\n\t\t}\n\t\tbase = uf.url\n\t\tres = newResource(schPtr, base)\n\t} else if schPtr.isEmpty() {\n\t\t// root resource\n\t\tres = newResource(schPtr, base)\n\t}\n\n\tif res != nil {\n\t\tfound := false\n\t\tfor _, res := range r.resources {\n\t\t\tif res.id == base {\n\t\t\t\tfound = true\n\t\t\t\tif res.ptr != schPtr {\n\t\t\t\t\treturn &DuplicateIDError{base.String(), r.url.String(), string(schPtr), string(res.ptr)}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif !found {\n\t\t\tif hasSchema {\n\t\t\t\tvocabs, err := rr.loader.getMetaVocabs(sch, draft, rr.vocabularies)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tres.dialect = dialect{draft, vocabs}\n\t\t\t} else {\n\t\t\t\tres.dialect = fallback\n\t\t\t}\n\t\t\tr.resources[schPtr] = res\n\t\t}\n\t}\n\n\tvar baseRes *resource\n\tfor _, res := range r.resources {\n\t\tif res.id == base {\n\t\t\tbaseRes = res\n\t\t\tbreak\n\t\t}\n\t}\n\tif baseRes == nil {\n\t\tpanic(\"baseres is nil\")\n\t}\n\n\t// found base resource\n\tif err := r.collectAnchors(sch, schPtr, baseRes); err != nil {\n\t\treturn err\n\t}\n\n\t// process subschemas\n\tsubschemas := map[jsonPointer]any{}\n\tfor _, sp := range draft.subschemas {\n\t\tss := sp.collect(obj, schPtr)\n\t\tfor k, v := range ss {\n\t\t\tsubschemas[k] = v\n\t\t}\n\t}\n\tfor _, vocab := range baseRes.dialect.activeVocabs(true, rr.vocabularies) {\n\t\tif v := rr.vocabularies[vocab]; v != nil {\n\t\t\tfor _, sp := range v.Subschemas {\n\t\t\t\tss := sp.collect(obj, schPtr)\n\t\t\t\tfor k, v := range ss {\n\t\t\t\t\tsubschemas[k] = v\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor ptr, v := range subschemas {\n\t\tif err := rr.collectResources(r, v, base, ptr, baseRes.dialect); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (rr *roots) ensureSubschema(up urlPtr) error {\n\tr, err := rr.orLoad(up.url)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, ok := r.subschemasProcessed[up.ptr]; ok {\n\t\treturn nil\n\t}\n\tv, err := up.lookup(r.doc)\n\tif err != nil {\n\t\treturn err\n\t}\n\trClone := r.clone()\n\tif err := rr.addSubschema(rClone, up.ptr); err != nil {\n\t\treturn err\n\t}\n\tif err := rr.validate(rClone, v, up.ptr); err != nil {\n\t\treturn err\n\t}\n\trr.roots[r.url] = rClone\n\treturn nil\n}\n\nfunc (rr *roots) addSubschema(r *root, ptr jsonPointer) error {\n\tv, err := (&urlPtr{r.url, ptr}).lookup(r.doc)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbase := r.resource(ptr)\n\tbaseURL := base.id\n\tif err := rr.collectResources(r, v, baseURL, ptr, base.dialect); err != nil {\n\t\treturn err\n\t}\n\n\t// collect anchors\n\tif _, ok := r.resources[ptr]; !ok {\n\t\tres := r.resource(ptr)\n\t\tif err := r.collectAnchors(v, ptr, res); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (rr *roots) validate(r *root, v any, ptr jsonPointer) error {\n\tdialect := r.resource(ptr).dialect\n\tmeta := dialect.getSchema(rr.assertVocabs, rr.vocabularies)\n\tif err := meta.validate(v, rr.regexpEngine, meta, r.resources, rr.assertVocabs, rr.vocabularies); err != nil {\n\t\tup := urlPtr{r.url, ptr}\n\t\treturn &SchemaValidationError{URL: up.String(), Err: err}\n\t}\n\treturn nil\n}\n\n// --\n\ntype InvalidMetaSchemaURLError struct {\n\tURL string\n\tErr error\n}\n\nfunc (e *InvalidMetaSchemaURLError) Error() string {\n\treturn fmt.Sprintf(\"invalid $schema in %q: %v\", e.URL, e.Err)\n}\n\n// --\n\ntype UnsupportedDraftError struct {\n\tURL string\n}\n\nfunc (e *UnsupportedDraftError) Error() string {\n\treturn fmt.Sprintf(\"draft %q is not supported\", e.URL)\n}\n\n// --\n\ntype MetaSchemaCycleError struct {\n\tURL string\n}\n\nfunc (e *MetaSchemaCycleError) Error() string {\n\treturn fmt.Sprintf(\"cycle in resolving $schema in %q\", e.URL)\n}\n\n// --\n\ntype MetaSchemaMismatchError struct {\n\tURL string\n}\n\nfunc (e *MetaSchemaMismatchError) Error() string {\n\treturn fmt.Sprintf(\"$schema in %q does not match with $schema in root\", e.URL)\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/schema.go",
    "content": "package jsonschema\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math/big\"\n)\n\n// Schema is the representation of a compiled\n// jsonschema.\ntype Schema struct {\n\tup                urlPtr\n\tresource          *Schema\n\tdynamicAnchors    map[string]*Schema\n\tallPropsEvaluated bool\n\tallItemsEvaluated bool\n\tnumItemsEvaluated int\n\n\tDraftVersion int\n\tLocation     string\n\n\t// type agnostic --\n\tBool            *bool // boolean schema\n\tID              string\n\tRef             *Schema\n\tAnchor          string\n\tRecursiveRef    *Schema\n\tRecursiveAnchor bool\n\tDynamicRef      *DynamicRef\n\tDynamicAnchor   string // \"\" if not specified\n\tTypes           *Types\n\tEnum            *Enum\n\tConst           *any\n\tNot             *Schema\n\tAllOf           []*Schema\n\tAnyOf           []*Schema\n\tOneOf           []*Schema\n\tIf              *Schema\n\tThen            *Schema\n\tElse            *Schema\n\tFormat          *Format\n\n\t// object --\n\tMaxProperties         *int\n\tMinProperties         *int\n\tRequired              []string\n\tPropertyNames         *Schema\n\tProperties            map[string]*Schema\n\tPatternProperties     map[Regexp]*Schema\n\tAdditionalProperties  any            // nil or bool or *Schema\n\tDependencies          map[string]any // value is []string or *Schema\n\tDependentRequired     map[string][]string\n\tDependentSchemas      map[string]*Schema\n\tUnevaluatedProperties *Schema\n\n\t// array --\n\tMinItems         *int\n\tMaxItems         *int\n\tUniqueItems      bool\n\tContains         *Schema\n\tMinContains      *int\n\tMaxContains      *int\n\tItems            any // nil or []*Schema or *Schema\n\tAdditionalItems  any // nil or bool or *Schema\n\tPrefixItems      []*Schema\n\tItems2020        *Schema\n\tUnevaluatedItems *Schema\n\n\t// string --\n\tMinLength        *int\n\tMaxLength        *int\n\tPattern          Regexp\n\tContentEncoding  *Decoder\n\tContentMediaType *MediaType\n\tContentSchema    *Schema\n\n\t// number --\n\tMaximum          *big.Rat\n\tMinimum          *big.Rat\n\tExclusiveMaximum *big.Rat\n\tExclusiveMinimum *big.Rat\n\tMultipleOf       *big.Rat\n\n\tExtensions []SchemaExt\n\n\t// annotations --\n\tTitle       string\n\tDescription string\n\tDefault     *any\n\tComment     string\n\tReadOnly    bool\n\tWriteOnly   bool\n\tExamples    []any\n\tDeprecated  bool\n}\n\n// --\n\ntype jsonType int\n\nconst (\n\tinvalidType jsonType = 0\n\tnullType    jsonType = 1 << iota\n\tbooleanType\n\tnumberType\n\tintegerType\n\tstringType\n\tarrayType\n\tobjectType\n)\n\nfunc typeOf(v any) jsonType {\n\tswitch v.(type) {\n\tcase nil:\n\t\treturn nullType\n\tcase bool:\n\t\treturn booleanType\n\tcase json.Number, float32, float64, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\treturn numberType\n\tcase string:\n\t\treturn stringType\n\tcase []any:\n\t\treturn arrayType\n\tcase map[string]any:\n\t\treturn objectType\n\tdefault:\n\t\treturn invalidType\n\t}\n}\n\nfunc typeFromString(s string) jsonType {\n\tswitch s {\n\tcase \"null\":\n\t\treturn nullType\n\tcase \"boolean\":\n\t\treturn booleanType\n\tcase \"number\":\n\t\treturn numberType\n\tcase \"integer\":\n\t\treturn integerType\n\tcase \"string\":\n\t\treturn stringType\n\tcase \"array\":\n\t\treturn arrayType\n\tcase \"object\":\n\t\treturn objectType\n\t}\n\treturn invalidType\n}\n\nfunc (jt jsonType) String() string {\n\tswitch jt {\n\tcase nullType:\n\t\treturn \"null\"\n\tcase booleanType:\n\t\treturn \"boolean\"\n\tcase numberType:\n\t\treturn \"number\"\n\tcase integerType:\n\t\treturn \"integer\"\n\tcase stringType:\n\t\treturn \"string\"\n\tcase arrayType:\n\t\treturn \"array\"\n\tcase objectType:\n\t\treturn \"object\"\n\t}\n\treturn \"\"\n}\n\n// --\n\n// Types encapsulates list of json value types.\ntype Types int\n\nfunc newTypes(v any) *Types {\n\tvar types Types\n\tswitch v := v.(type) {\n\tcase string:\n\t\ttypes.Add(v)\n\tcase []any:\n\t\tfor _, item := range v {\n\t\t\tif s, ok := item.(string); ok {\n\t\t\t\ttypes.Add(s)\n\t\t\t}\n\t\t}\n\t}\n\tif types.IsEmpty() {\n\t\treturn nil\n\t}\n\treturn &types\n}\n\nfunc (tt Types) IsEmpty() bool {\n\treturn tt == 0\n}\n\n// Add specified json type. If typ is\n// not valid json type it is ignored.\nfunc (tt *Types) Add(typ string) {\n\ttt.add(typeFromString(typ))\n}\n\nfunc (tt *Types) add(t jsonType) {\n\t*tt = Types(int(*tt) | int(t))\n}\n\nfunc (tt Types) contains(t jsonType) bool {\n\treturn int(tt)&int(t) != 0\n}\n\nfunc (tt Types) ToStrings() []string {\n\ttypes := []jsonType{\n\t\tnullType, booleanType, numberType, integerType,\n\t\tstringType, arrayType, objectType,\n\t}\n\tvar arr []string\n\tfor _, t := range types {\n\t\tif tt.contains(t) {\n\t\t\tarr = append(arr, t.String())\n\t\t}\n\t}\n\treturn arr\n}\n\nfunc (tt Types) String() string {\n\treturn fmt.Sprintf(\"%v\", tt.ToStrings())\n}\n\n// --\n\ntype Enum struct {\n\tValues []any\n\ttypes  Types\n}\n\nfunc newEnum(arr []any) *Enum {\n\tvar types Types\n\tfor _, item := range arr {\n\t\ttypes.add(typeOf(item))\n\t}\n\treturn &Enum{arr, types}\n}\n\n// --\n\ntype DynamicRef struct {\n\tRef    *Schema\n\tAnchor string // \"\" if not specified\n}\n\nfunc newSchema(up urlPtr) *Schema {\n\treturn &Schema{up: up, Location: up.String()}\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/util.go",
    "content": "package jsonschema\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"hash/maphash\"\n\t\"math/big\"\n\tgourl \"net/url\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/santhosh-tekuri/jsonschema/v6/kind\"\n\t\"golang.org/x/text/message\"\n)\n\n// --\n\ntype url (string)\n\nfunc (u url) String() string {\n\treturn string(u)\n}\n\nfunc (u url) join(ref string) (*urlFrag, error) {\n\tbase, err := gourl.Parse(string(u))\n\tif err != nil {\n\t\treturn nil, &ParseURLError{URL: u.String(), Err: err}\n\t}\n\n\tref, frag, err := splitFragment(ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trefURL, err := gourl.Parse(ref)\n\tif err != nil {\n\t\treturn nil, &ParseURLError{URL: ref, Err: err}\n\t}\n\tresolved := base.ResolveReference(refURL)\n\n\t// see https://github.com/golang/go/issues/66084 (net/url: ResolveReference ignores Opaque value)\n\tif !refURL.IsAbs() && base.Opaque != \"\" {\n\t\tresolved.Opaque = base.Opaque\n\t}\n\n\treturn &urlFrag{url: url(resolved.String()), frag: frag}, nil\n}\n\n// --\n\ntype jsonPointer string\n\nfunc escape(tok string) string {\n\ttok = strings.ReplaceAll(tok, \"~\", \"~0\")\n\ttok = strings.ReplaceAll(tok, \"/\", \"~1\")\n\treturn tok\n}\n\nfunc unescape(tok string) (string, bool) {\n\ttilde := strings.IndexByte(tok, '~')\n\tif tilde == -1 {\n\t\treturn tok, true\n\t}\n\tsb := new(strings.Builder)\n\tfor {\n\t\tsb.WriteString(tok[:tilde])\n\t\ttok = tok[tilde+1:]\n\t\tif tok == \"\" {\n\t\t\treturn \"\", false\n\t\t}\n\t\tswitch tok[0] {\n\t\tcase '0':\n\t\t\tsb.WriteByte('~')\n\t\tcase '1':\n\t\t\tsb.WriteByte('/')\n\t\tdefault:\n\t\t\treturn \"\", false\n\t\t}\n\t\ttok = tok[1:]\n\t\ttilde = strings.IndexByte(tok, '~')\n\t\tif tilde == -1 {\n\t\t\tsb.WriteString(tok)\n\t\t\tbreak\n\t\t}\n\t}\n\treturn sb.String(), true\n}\n\nfunc (ptr jsonPointer) isEmpty() bool {\n\treturn string(ptr) == \"\"\n}\n\nfunc (ptr jsonPointer) concat(next jsonPointer) jsonPointer {\n\treturn jsonPointer(fmt.Sprintf(\"%s%s\", ptr, next))\n}\n\nfunc (ptr jsonPointer) append(tok string) jsonPointer {\n\treturn jsonPointer(fmt.Sprintf(\"%s/%s\", ptr, escape(tok)))\n}\n\nfunc (ptr jsonPointer) append2(tok1, tok2 string) jsonPointer {\n\treturn jsonPointer(fmt.Sprintf(\"%s/%s/%s\", ptr, escape(tok1), escape(tok2)))\n}\n\n// --\n\ntype anchor string\n\n// --\n\ntype fragment string\n\nfunc decode(frag string) (string, error) {\n\treturn gourl.PathUnescape(frag)\n}\n\n// avoids escaping /.\nfunc encode(frag string) string {\n\tvar sb strings.Builder\n\tfor i, tok := range strings.Split(frag, \"/\") {\n\t\tif i > 0 {\n\t\t\tsb.WriteByte('/')\n\t\t}\n\t\tsb.WriteString(gourl.PathEscape(tok))\n\t}\n\treturn sb.String()\n}\n\nfunc splitFragment(str string) (string, fragment, error) {\n\tu, f := split(str)\n\tf, err := decode(f)\n\tif err != nil {\n\t\treturn \"\", fragment(\"\"), &ParseURLError{URL: str, Err: err}\n\t}\n\treturn u, fragment(f), nil\n}\n\nfunc split(str string) (string, string) {\n\thash := strings.IndexByte(str, '#')\n\tif hash == -1 {\n\t\treturn str, \"\"\n\t}\n\treturn str[:hash], str[hash+1:]\n}\n\nfunc (frag fragment) convert() any {\n\tstr := string(frag)\n\tif str == \"\" || strings.HasPrefix(str, \"/\") {\n\t\treturn jsonPointer(str)\n\t}\n\treturn anchor(str)\n}\n\n// --\n\ntype urlFrag struct {\n\turl  url\n\tfrag fragment\n}\n\nfunc startsWithWindowsDrive(s string) bool {\n\tif s != \"\" && strings.HasPrefix(s[1:], `:\\`) {\n\t\treturn (s[0] >= 'a' && s[0] <= 'z') || (s[0] >= 'A' && s[0] <= 'Z')\n\t}\n\treturn false\n}\n\nfunc absolute(input string) (*urlFrag, error) {\n\tu, frag, err := splitFragment(input)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// if windows absolute file path, convert to file url\n\t// because: net/url parses driver name as scheme\n\tif runtime.GOOS == \"windows\" && startsWithWindowsDrive(u) {\n\t\tu = \"file:///\" + filepath.ToSlash(u)\n\t}\n\n\tgourl, err := gourl.Parse(u)\n\tif err != nil {\n\t\treturn nil, &ParseURLError{URL: input, Err: err}\n\t}\n\tif gourl.IsAbs() {\n\t\treturn &urlFrag{url(u), frag}, nil\n\t}\n\n\t// avoid filesystem api in wasm\n\tif runtime.GOOS != \"js\" {\n\t\tabs, err := filepath.Abs(u)\n\t\tif err != nil {\n\t\t\treturn nil, &ParseURLError{URL: input, Err: err}\n\t\t}\n\t\tu = abs\n\t}\n\tif !strings.HasPrefix(u, \"/\") {\n\t\tu = \"/\" + u\n\t}\n\tu = \"file://\" + filepath.ToSlash(u)\n\n\t_, err = gourl.Parse(u)\n\tif err != nil {\n\t\treturn nil, &ParseURLError{URL: input, Err: err}\n\t}\n\treturn &urlFrag{url: url(u), frag: frag}, nil\n}\n\nfunc (uf *urlFrag) String() string {\n\treturn fmt.Sprintf(\"%s#%s\", uf.url, encode(string(uf.frag)))\n}\n\n// --\n\ntype urlPtr struct {\n\turl url\n\tptr jsonPointer\n}\n\nfunc (up *urlPtr) lookup(v any) (any, error) {\n\tfor _, tok := range strings.Split(string(up.ptr), \"/\")[1:] {\n\t\ttok, ok := unescape(tok)\n\t\tif !ok {\n\t\t\treturn nil, &InvalidJsonPointerError{up.String()}\n\t\t}\n\t\tswitch val := v.(type) {\n\t\tcase map[string]any:\n\t\t\tif pvalue, ok := val[tok]; ok {\n\t\t\t\tv = pvalue\n\t\t\t\tcontinue\n\t\t\t}\n\t\tcase []any:\n\t\t\tif index, err := strconv.Atoi(tok); err == nil {\n\t\t\t\tif index >= 0 && index < len(val) {\n\t\t\t\t\tv = val[index]\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil, &JSONPointerNotFoundError{up.String()}\n\t}\n\treturn v, nil\n}\n\nfunc (up *urlPtr) format(tok string) string {\n\treturn fmt.Sprintf(\"%s#%s/%s\", up.url, encode(string(up.ptr)), encode(escape(tok)))\n}\n\nfunc (up *urlPtr) String() string {\n\treturn fmt.Sprintf(\"%s#%s\", up.url, encode(string(up.ptr)))\n}\n\n// --\n\nfunc minInt(i, j int) int {\n\tif i < j {\n\t\treturn i\n\t}\n\treturn j\n}\n\nfunc strVal(obj map[string]any, prop string) (string, bool) {\n\tv, ok := obj[prop]\n\tif !ok {\n\t\treturn \"\", false\n\t}\n\ts, ok := v.(string)\n\treturn s, ok\n}\n\nfunc isInteger(num any) bool {\n\trat, ok := new(big.Rat).SetString(fmt.Sprint(num))\n\treturn ok && rat.IsInt()\n}\n\n// quote returns single-quoted string.\n// used for embedding quoted strings in json.\nfunc quote(s string) string {\n\ts = fmt.Sprintf(\"%q\", s)\n\ts = strings.ReplaceAll(s, `\\\"`, `\"`)\n\ts = strings.ReplaceAll(s, `'`, `\\'`)\n\treturn \"'\" + s[1:len(s)-1] + \"'\"\n}\n\nfunc equals(v1, v2 any) (bool, ErrorKind) {\n\tswitch v1 := v1.(type) {\n\tcase map[string]any:\n\t\tv2, ok := v2.(map[string]any)\n\t\tif !ok || len(v1) != len(v2) {\n\t\t\treturn false, nil\n\t\t}\n\t\tfor k, val1 := range v1 {\n\t\t\tval2, ok := v2[k]\n\t\t\tif !ok {\n\t\t\t\treturn false, nil\n\t\t\t}\n\t\t\tif ok, k := equals(val1, val2); !ok || k != nil {\n\t\t\t\treturn ok, k\n\t\t\t}\n\t\t}\n\t\treturn true, nil\n\tcase []any:\n\t\tv2, ok := v2.([]any)\n\t\tif !ok || len(v1) != len(v2) {\n\t\t\treturn false, nil\n\t\t}\n\t\tfor i := range v1 {\n\t\t\tif ok, k := equals(v1[i], v2[i]); !ok || k != nil {\n\t\t\t\treturn ok, k\n\t\t\t}\n\t\t}\n\t\treturn true, nil\n\tcase nil:\n\t\treturn v2 == nil, nil\n\tcase bool:\n\t\tv2, ok := v2.(bool)\n\t\treturn ok && v1 == v2, nil\n\tcase string:\n\t\tv2, ok := v2.(string)\n\t\treturn ok && v1 == v2, nil\n\tcase json.Number, float32, float64, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\tnum1, ok1 := new(big.Rat).SetString(fmt.Sprint(v1))\n\t\tnum2, ok2 := new(big.Rat).SetString(fmt.Sprint(v2))\n\t\treturn ok1 && ok2 && num1.Cmp(num2) == 0, nil\n\tdefault:\n\t\treturn false, &kind.InvalidJsonValue{Value: v1}\n\t}\n}\n\nfunc duplicates(arr []any) (int, int, ErrorKind) {\n\tif len(arr) <= 20 {\n\t\tfor i := 1; i < len(arr); i++ {\n\t\t\tfor j := 0; j < i; j++ {\n\t\t\t\tif ok, k := equals(arr[i], arr[j]); ok || k != nil {\n\t\t\t\t\treturn j, i, k\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1, -1, nil\n\t}\n\n\tm := make(map[uint64][]int)\n\th := new(maphash.Hash)\n\tfor i, item := range arr {\n\t\th.Reset()\n\t\twriteHash(item, h)\n\t\thash := h.Sum64()\n\t\tindexes, ok := m[hash]\n\t\tif ok {\n\t\t\tfor _, j := range indexes {\n\t\t\t\tif ok, k := equals(item, arr[j]); ok || k != nil {\n\t\t\t\t\treturn j, i, k\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tindexes = append(indexes, i)\n\t\tm[hash] = indexes\n\t}\n\treturn -1, -1, nil\n}\n\nfunc writeHash(v any, h *maphash.Hash) ErrorKind {\n\tswitch v := v.(type) {\n\tcase map[string]any:\n\t\t_ = h.WriteByte(0)\n\t\tprops := make([]string, 0, len(v))\n\t\tfor prop := range v {\n\t\t\tprops = append(props, prop)\n\t\t}\n\t\tslices.Sort(props)\n\t\tfor _, prop := range props {\n\t\t\twriteHash(prop, h)\n\t\t\twriteHash(v[prop], h)\n\t\t}\n\tcase []any:\n\t\t_ = h.WriteByte(1)\n\t\tfor _, item := range v {\n\t\t\twriteHash(item, h)\n\t\t}\n\tcase nil:\n\t\t_ = h.WriteByte(2)\n\tcase bool:\n\t\t_ = h.WriteByte(3)\n\t\tif v {\n\t\t\t_ = h.WriteByte(1)\n\t\t} else {\n\t\t\t_ = h.WriteByte(0)\n\t\t}\n\tcase string:\n\t\t_ = h.WriteByte(4)\n\t\t_, _ = h.WriteString(v)\n\tcase json.Number, float32, float64, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\t_ = h.WriteByte(5)\n\t\tnum, _ := new(big.Rat).SetString(fmt.Sprint(v))\n\t\t_, _ = h.Write(num.Num().Bytes())\n\t\t_, _ = h.Write(num.Denom().Bytes())\n\tdefault:\n\t\treturn &kind.InvalidJsonValue{Value: v}\n\t}\n\treturn nil\n}\n\n// --\n\ntype ParseURLError struct {\n\tURL string\n\tErr error\n}\n\nfunc (e *ParseURLError) Error() string {\n\treturn fmt.Sprintf(\"error in parsing %q: %v\", e.URL, e.Err)\n}\n\n// --\n\ntype InvalidJsonPointerError struct {\n\tURL string\n}\n\nfunc (e *InvalidJsonPointerError) Error() string {\n\treturn fmt.Sprintf(\"invalid json-pointer %q\", e.URL)\n}\n\n// --\n\ntype JSONPointerNotFoundError struct {\n\tURL string\n}\n\nfunc (e *JSONPointerNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"json-pointer in %q not found\", e.URL)\n}\n\n// --\n\ntype SchemaValidationError struct {\n\tURL string\n\tErr error\n}\n\nfunc (e *SchemaValidationError) Error() string {\n\treturn fmt.Sprintf(\"%q is not valid against metaschema: %v\", e.URL, e.Err)\n}\n\n// --\n\n// LocalizableError is an error whose message is localizable.\nfunc LocalizableError(format string, args ...any) error {\n\treturn &localizableError{format, args}\n}\n\ntype localizableError struct {\n\tmsg  string\n\targs []any\n}\n\nfunc (e *localizableError) Error() string {\n\treturn fmt.Sprintf(e.msg, e.args...)\n}\n\nfunc (e *localizableError) LocalizedError(p *message.Printer) string {\n\treturn p.Sprintf(e.msg, e.args...)\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/validator.go",
    "content": "package jsonschema\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"slices\"\n\t\"strconv\"\n\t\"unicode/utf8\"\n\n\t\"github.com/santhosh-tekuri/jsonschema/v6/kind\"\n\t\"golang.org/x/text/message\"\n)\n\nfunc (sch *Schema) Validate(v any) error {\n\treturn sch.validate(v, nil, nil, nil, false, nil)\n}\n\nfunc (sch *Schema) validate(v any, regexpEngine RegexpEngine, meta *Schema, resources map[jsonPointer]*resource, assertVocabs bool, vocabularies map[string]*Vocabulary) error {\n\tvd := validator{\n\t\tv:            v,\n\t\tvloc:         make([]string, 0, 8),\n\t\tsch:          sch,\n\t\tscp:          &scope{sch, \"\", 0, nil},\n\t\tuneval:       unevalFrom(v, sch, false),\n\t\terrors:       nil,\n\t\tboolResult:   false,\n\t\tregexpEngine: regexpEngine,\n\t\tmeta:         meta,\n\t\tresources:    resources,\n\t\tassertVocabs: assertVocabs,\n\t\tvocabularies: vocabularies,\n\t}\n\tif _, err := vd.validate(); err != nil {\n\t\tverr := err.(*ValidationError)\n\t\tvar causes []*ValidationError\n\t\tif _, ok := verr.ErrorKind.(*kind.Group); ok {\n\t\t\tcauses = verr.Causes\n\t\t} else {\n\t\t\tcauses = []*ValidationError{verr}\n\t\t}\n\t\treturn &ValidationError{\n\t\t\tSchemaURL:        sch.Location,\n\t\t\tInstanceLocation: nil,\n\t\t\tErrorKind:        &kind.Schema{Location: sch.Location},\n\t\t\tCauses:           causes,\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype validator struct {\n\tv            any\n\tvloc         []string\n\tsch          *Schema\n\tscp          *scope\n\tuneval       *uneval\n\terrors       []*ValidationError\n\tboolResult   bool // is interested to know valid or not (but not actuall error)\n\tregexpEngine RegexpEngine\n\n\t// meta validation\n\tmeta         *Schema                   // set only when validating with metaschema\n\tresources    map[jsonPointer]*resource // resources which should be validated with their dialect\n\tassertVocabs bool\n\tvocabularies map[string]*Vocabulary\n}\n\nfunc (vd *validator) validate() (*uneval, error) {\n\ts := vd.sch\n\tv := vd.v\n\n\t// boolean --\n\tif s.Bool != nil {\n\t\tif *s.Bool {\n\t\t\treturn vd.uneval, nil\n\t\t} else {\n\t\t\treturn nil, vd.error(&kind.FalseSchema{})\n\t\t}\n\t}\n\n\t// check cycle --\n\tif scp := vd.scp.checkCycle(); scp != nil {\n\t\treturn nil, vd.error(&kind.RefCycle{\n\t\t\tURL:              s.Location,\n\t\t\tKeywordLocation1: vd.scp.kwLoc(),\n\t\t\tKeywordLocation2: scp.kwLoc(),\n\t\t})\n\t}\n\n\tt := typeOf(v)\n\tif t == invalidType {\n\t\treturn nil, vd.error(&kind.InvalidJsonValue{Value: v})\n\t}\n\n\t// type --\n\tif s.Types != nil && !s.Types.IsEmpty() {\n\t\tmatched := s.Types.contains(t) || (s.Types.contains(integerType) && t == numberType && isInteger(v))\n\t\tif !matched {\n\t\t\treturn nil, vd.error(&kind.Type{Got: t.String(), Want: s.Types.ToStrings()})\n\t\t}\n\t}\n\n\t// const --\n\tif s.Const != nil {\n\t\tok, k := equals(v, *s.Const)\n\t\tif k != nil {\n\t\t\treturn nil, vd.error(k)\n\t\t} else if !ok {\n\t\t\treturn nil, vd.error(&kind.Const{Got: v, Want: *s.Const})\n\t\t}\n\t}\n\n\t// enum --\n\tif s.Enum != nil {\n\t\tmatched := s.Enum.types.contains(typeOf(v))\n\t\tif matched {\n\t\t\tmatched = false\n\t\t\tfor _, item := range s.Enum.Values {\n\t\t\t\tok, k := equals(v, item)\n\t\t\t\tif k != nil {\n\t\t\t\t\treturn nil, vd.error(k)\n\t\t\t\t} else if ok {\n\t\t\t\t\tmatched = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif !matched {\n\t\t\treturn nil, vd.error(&kind.Enum{Got: v, Want: s.Enum.Values})\n\t\t}\n\t}\n\n\t// format --\n\tif s.Format != nil {\n\t\tvar err error\n\t\tif s.Format.Name == \"regex\" && vd.regexpEngine != nil {\n\t\t\terr = vd.regexpEngine.validate(v)\n\t\t} else {\n\t\t\terr = s.Format.Validate(v)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, vd.error(&kind.Format{Got: v, Want: s.Format.Name, Err: err})\n\t\t}\n\t}\n\n\t// $ref --\n\tif s.Ref != nil {\n\t\terr := vd.validateRef(s.Ref, \"$ref\")\n\t\tif s.DraftVersion < 2019 {\n\t\t\treturn vd.uneval, err\n\t\t}\n\t\tif err != nil {\n\t\t\tvd.addErr(err)\n\t\t}\n\t}\n\n\t// type specific validations --\n\tswitch v := v.(type) {\n\tcase map[string]any:\n\t\tvd.objValidate(v)\n\tcase []any:\n\t\tvd.arrValidate(v)\n\tcase string:\n\t\tvd.strValidate(v)\n\tcase json.Number, float32, float64, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:\n\t\tvd.numValidate(v)\n\t}\n\n\tif len(vd.errors) == 0 || !vd.boolResult {\n\t\tif s.DraftVersion >= 2019 {\n\t\t\tvd.validateRefs()\n\t\t}\n\t\tvd.condValidate()\n\n\t\tfor _, ext := range s.Extensions {\n\t\t\text.Validate(&ValidatorContext{vd}, v)\n\t\t}\n\n\t\tif s.DraftVersion >= 2019 {\n\t\t\tvd.unevalValidate()\n\t\t}\n\t}\n\n\tswitch len(vd.errors) {\n\tcase 0:\n\t\treturn vd.uneval, nil\n\tcase 1:\n\t\treturn nil, vd.errors[0]\n\tdefault:\n\t\tverr := vd.error(&kind.Group{})\n\t\tverr.Causes = vd.errors\n\t\treturn nil, verr\n\t}\n}\n\nfunc (vd *validator) objValidate(obj map[string]any) {\n\ts := vd.sch\n\n\t// minProperties --\n\tif s.MinProperties != nil {\n\t\tif len(obj) < *s.MinProperties {\n\t\t\tvd.addError(&kind.MinProperties{Got: len(obj), Want: *s.MinProperties})\n\t\t}\n\t}\n\n\t// maxProperties --\n\tif s.MaxProperties != nil {\n\t\tif len(obj) > *s.MaxProperties {\n\t\t\tvd.addError(&kind.MaxProperties{Got: len(obj), Want: *s.MaxProperties})\n\t\t}\n\t}\n\n\t// required --\n\tif len(s.Required) > 0 {\n\t\tif missing := vd.findMissing(obj, s.Required); missing != nil {\n\t\t\tvd.addError(&kind.Required{Missing: missing})\n\t\t}\n\t}\n\n\tif vd.boolResult && len(vd.errors) > 0 {\n\t\treturn\n\t}\n\n\t// dependencies --\n\tfor pname, dep := range s.Dependencies {\n\t\tif _, ok := obj[pname]; ok {\n\t\t\tswitch dep := dep.(type) {\n\t\t\tcase []string:\n\t\t\t\tif missing := vd.findMissing(obj, dep); missing != nil {\n\t\t\t\t\tvd.addError(&kind.Dependency{Prop: pname, Missing: missing})\n\t\t\t\t}\n\t\t\tcase *Schema:\n\t\t\t\tvd.addErr(vd.validateSelf(dep, \"\", false))\n\t\t\t}\n\t\t}\n\t}\n\n\tvar additionalPros []string\n\tfor pname, pvalue := range obj {\n\t\tif vd.boolResult && len(vd.errors) > 0 {\n\t\t\treturn\n\t\t}\n\t\tevaluated := false\n\n\t\t// properties --\n\t\tif sch, ok := s.Properties[pname]; ok {\n\t\t\tevaluated = true\n\t\t\tvd.addErr(vd.validateVal(sch, pvalue, pname))\n\t\t}\n\n\t\t// patternProperties --\n\t\tfor regex, sch := range s.PatternProperties {\n\t\t\tif regex.MatchString(pname) {\n\t\t\t\tevaluated = true\n\t\t\t\tvd.addErr(vd.validateVal(sch, pvalue, pname))\n\t\t\t}\n\t\t}\n\n\t\tif !evaluated && s.AdditionalProperties != nil {\n\t\t\tevaluated = true\n\t\t\tswitch additional := s.AdditionalProperties.(type) {\n\t\t\tcase bool:\n\t\t\t\tif !additional {\n\t\t\t\t\tadditionalPros = append(additionalPros, pname)\n\t\t\t\t}\n\t\t\tcase *Schema:\n\t\t\t\tvd.addErr(vd.validateVal(additional, pvalue, pname))\n\t\t\t}\n\t\t}\n\n\t\tif evaluated {\n\t\t\tdelete(vd.uneval.props, pname)\n\t\t}\n\t}\n\tif len(additionalPros) > 0 {\n\t\tvd.addError(&kind.AdditionalProperties{Properties: additionalPros})\n\t}\n\n\tif s.DraftVersion == 4 {\n\t\treturn\n\t}\n\n\t// propertyNames --\n\tif s.PropertyNames != nil {\n\t\tfor pname := range obj {\n\t\t\tsch, meta, resources := s.PropertyNames, vd.meta, vd.resources\n\t\t\tres := vd.metaResource(sch)\n\t\t\tif res != nil {\n\t\t\t\tmeta = res.dialect.getSchema(vd.assertVocabs, vd.vocabularies)\n\t\t\t\tsch = meta\n\t\t\t}\n\t\t\tif err := sch.validate(pname, vd.regexpEngine, meta, resources, vd.assertVocabs, vd.vocabularies); err != nil {\n\t\t\t\tverr := err.(*ValidationError)\n\t\t\t\tverr.SchemaURL = s.PropertyNames.Location\n\t\t\t\tverr.ErrorKind = &kind.PropertyNames{Property: pname}\n\t\t\t\tvd.addErr(verr)\n\t\t\t}\n\t\t}\n\t}\n\n\tif s.DraftVersion == 6 {\n\t\treturn\n\t}\n\n\t// dependentSchemas --\n\tfor pname, sch := range s.DependentSchemas {\n\t\tif _, ok := obj[pname]; ok {\n\t\t\tvd.addErr(vd.validateSelf(sch, \"\", false))\n\t\t}\n\t}\n\n\t// dependentRequired --\n\tfor pname, reqd := range s.DependentRequired {\n\t\tif _, ok := obj[pname]; ok {\n\t\t\tif missing := vd.findMissing(obj, reqd); missing != nil {\n\t\t\t\tvd.addError(&kind.DependentRequired{Prop: pname, Missing: missing})\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (vd *validator) arrValidate(arr []any) {\n\ts := vd.sch\n\n\t// minItems --\n\tif s.MinItems != nil {\n\t\tif len(arr) < *s.MinItems {\n\t\t\tvd.addError(&kind.MinItems{Got: len(arr), Want: *s.MinItems})\n\t\t}\n\t}\n\n\t// maxItems --\n\tif s.MaxItems != nil {\n\t\tif len(arr) > *s.MaxItems {\n\t\t\tvd.addError(&kind.MaxItems{Got: len(arr), Want: *s.MaxItems})\n\t\t}\n\t}\n\n\t// uniqueItems --\n\tif s.UniqueItems && len(arr) > 1 {\n\t\ti, j, k := duplicates(arr)\n\t\tif k != nil {\n\t\t\tvd.addError(k)\n\t\t} else if i != -1 {\n\t\t\tvd.addError(&kind.UniqueItems{Duplicates: [2]int{i, j}})\n\t\t}\n\t}\n\n\tif s.DraftVersion < 2020 {\n\t\tevaluated := 0\n\n\t\t// items --\n\t\tswitch items := s.Items.(type) {\n\t\tcase *Schema:\n\t\t\tfor i, item := range arr {\n\t\t\t\tvd.addErr(vd.validateVal(items, item, strconv.Itoa(i)))\n\t\t\t}\n\t\t\tevaluated = len(arr)\n\t\tcase []*Schema:\n\t\t\tmin := minInt(len(arr), len(items))\n\t\t\tfor i, item := range arr[:min] {\n\t\t\t\tvd.addErr(vd.validateVal(items[i], item, strconv.Itoa(i)))\n\t\t\t}\n\t\t\tevaluated = min\n\t\t}\n\n\t\t// additionalItems --\n\t\tif s.AdditionalItems != nil {\n\t\t\tswitch additional := s.AdditionalItems.(type) {\n\t\t\tcase bool:\n\t\t\t\tif !additional && evaluated != len(arr) {\n\t\t\t\t\tvd.addError(&kind.AdditionalItems{Count: len(arr) - evaluated})\n\t\t\t\t}\n\t\t\tcase *Schema:\n\t\t\t\tfor i, item := range arr[evaluated:] {\n\t\t\t\t\tvd.addErr(vd.validateVal(additional, item, strconv.Itoa(i)))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tevaluated := minInt(len(s.PrefixItems), len(arr))\n\n\t\t// prefixItems --\n\t\tfor i, item := range arr[:evaluated] {\n\t\t\tvd.addErr(vd.validateVal(s.PrefixItems[i], item, strconv.Itoa(i)))\n\t\t}\n\n\t\t// items2020 --\n\t\tif s.Items2020 != nil {\n\t\t\tfor i, item := range arr[evaluated:] {\n\t\t\t\tvd.addErr(vd.validateVal(s.Items2020, item, strconv.Itoa(i)))\n\t\t\t}\n\t\t}\n\t}\n\n\t// contains --\n\tif s.Contains != nil {\n\t\tvar errors []*ValidationError\n\t\tvar matched []int\n\n\t\tfor i, item := range arr {\n\t\t\tif err := vd.validateVal(s.Contains, item, strconv.Itoa(i)); err != nil {\n\t\t\t\terrors = append(errors, err.(*ValidationError))\n\t\t\t} else {\n\t\t\t\tmatched = append(matched, i)\n\t\t\t\tif s.DraftVersion >= 2020 {\n\t\t\t\t\tdelete(vd.uneval.items, i)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// minContains --\n\t\tif s.MinContains != nil {\n\t\t\tif len(matched) < *s.MinContains {\n\t\t\t\tvd.addErrors(errors, &kind.MinContains{Got: matched, Want: *s.MinContains})\n\t\t\t}\n\t\t} else if len(matched) == 0 {\n\t\t\tvd.addErrors(errors, &kind.Contains{})\n\t\t}\n\n\t\t// maxContains --\n\t\tif s.MaxContains != nil {\n\t\t\tif len(matched) > *s.MaxContains {\n\t\t\t\tvd.addError(&kind.MaxContains{Got: matched, Want: *s.MaxContains})\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (vd *validator) strValidate(str string) {\n\ts := vd.sch\n\n\tstrLen := -1\n\tif s.MinLength != nil || s.MaxLength != nil {\n\t\tstrLen = utf8.RuneCount([]byte(str))\n\t}\n\n\t// minLength --\n\tif s.MinLength != nil {\n\t\tif strLen < *s.MinLength {\n\t\t\tvd.addError(&kind.MinLength{Got: strLen, Want: *s.MinLength})\n\t\t}\n\t}\n\n\t// maxLength --\n\tif s.MaxLength != nil {\n\t\tif strLen > *s.MaxLength {\n\t\t\tvd.addError(&kind.MaxLength{Got: strLen, Want: *s.MaxLength})\n\t\t}\n\t}\n\n\t// pattern --\n\tif s.Pattern != nil {\n\t\tif !s.Pattern.MatchString(str) {\n\t\t\tvd.addError(&kind.Pattern{Got: str, Want: s.Pattern.String()})\n\t\t}\n\t}\n\n\tif s.DraftVersion == 6 {\n\t\treturn\n\t}\n\n\tvar err error\n\n\t// contentEncoding --\n\tdecoded := []byte(str)\n\tif s.ContentEncoding != nil {\n\t\tdecoded, err = s.ContentEncoding.Decode(str)\n\t\tif err != nil {\n\t\t\tdecoded = nil\n\t\t\tvd.addError(&kind.ContentEncoding{Want: s.ContentEncoding.Name, Err: err})\n\t\t}\n\t}\n\n\tvar deserialized *any\n\tif decoded != nil && s.ContentMediaType != nil {\n\t\tif s.ContentSchema == nil {\n\t\t\terr = s.ContentMediaType.Validate(decoded)\n\t\t} else {\n\t\t\tvar value any\n\t\t\tvalue, err = s.ContentMediaType.UnmarshalJSON(decoded)\n\t\t\tif err == nil {\n\t\t\t\tdeserialized = &value\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tvd.addError(&kind.ContentMediaType{\n\t\t\t\tGot:  decoded,\n\t\t\t\tWant: s.ContentMediaType.Name,\n\t\t\t\tErr:  err,\n\t\t\t})\n\t\t}\n\t}\n\n\tif deserialized != nil && s.ContentSchema != nil {\n\t\tsch, meta, resources := s.ContentSchema, vd.meta, vd.resources\n\t\tres := vd.metaResource(sch)\n\t\tif res != nil {\n\t\t\tmeta = res.dialect.getSchema(vd.assertVocabs, vd.vocabularies)\n\t\t\tsch = meta\n\t\t}\n\t\tif err = sch.validate(*deserialized, vd.regexpEngine, meta, resources, vd.assertVocabs, vd.vocabularies); err != nil {\n\t\t\tverr := err.(*ValidationError)\n\t\t\tverr.SchemaURL = s.Location\n\t\t\tverr.ErrorKind = &kind.ContentSchema{}\n\t\t\tvd.addErr(verr)\n\t\t}\n\t}\n}\n\nfunc (vd *validator) numValidate(v any) {\n\ts := vd.sch\n\n\tvar numVal *big.Rat\n\tnum := func() *big.Rat {\n\t\tif numVal == nil {\n\t\t\tnumVal, _ = new(big.Rat).SetString(fmt.Sprintf(\"%v\", v))\n\t\t}\n\t\treturn numVal\n\t}\n\n\t// minimum --\n\tif s.Minimum != nil && num().Cmp(s.Minimum) < 0 {\n\t\tvd.addError(&kind.Minimum{Got: num(), Want: s.Minimum})\n\t}\n\n\t// maximum --\n\tif s.Maximum != nil && num().Cmp(s.Maximum) > 0 {\n\t\tvd.addError(&kind.Maximum{Got: num(), Want: s.Maximum})\n\t}\n\n\t// exclusiveMinimum\n\tif s.ExclusiveMinimum != nil && num().Cmp(s.ExclusiveMinimum) <= 0 {\n\t\tvd.addError(&kind.ExclusiveMinimum{Got: num(), Want: s.ExclusiveMinimum})\n\t}\n\n\t// exclusiveMaximum\n\tif s.ExclusiveMaximum != nil && num().Cmp(s.ExclusiveMaximum) >= 0 {\n\t\tvd.addError(&kind.ExclusiveMaximum{Got: num(), Want: s.ExclusiveMaximum})\n\t}\n\n\t// multipleOf\n\tif s.MultipleOf != nil {\n\t\tif q := new(big.Rat).Quo(num(), s.MultipleOf); !q.IsInt() {\n\t\t\tvd.addError(&kind.MultipleOf{Got: num(), Want: s.MultipleOf})\n\t\t}\n\t}\n}\n\nfunc (vd *validator) condValidate() {\n\ts := vd.sch\n\n\t// not --\n\tif s.Not != nil {\n\t\tif vd.validateSelf(s.Not, \"\", true) == nil {\n\t\t\tvd.addError(&kind.Not{})\n\t\t}\n\t}\n\n\t// allOf --\n\tif len(s.AllOf) > 0 {\n\t\tvar errors []*ValidationError\n\t\tfor _, sch := range s.AllOf {\n\t\t\tif err := vd.validateSelf(sch, \"\", false); err != nil {\n\t\t\t\terrors = append(errors, err.(*ValidationError))\n\t\t\t\tif vd.boolResult {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif len(errors) != 0 {\n\t\t\tvd.addErrors(errors, &kind.AllOf{})\n\t\t}\n\t}\n\n\t// anyOf\n\tif len(s.AnyOf) > 0 {\n\t\tvar matched bool\n\t\tvar errors []*ValidationError\n\t\tfor _, sch := range s.AnyOf {\n\t\t\tif err := vd.validateSelf(sch, \"\", false); err != nil {\n\t\t\t\terrors = append(errors, err.(*ValidationError))\n\t\t\t} else {\n\t\t\t\tmatched = true\n\t\t\t\t// for uneval, all schemas must be evaluated\n\t\t\t\tif vd.uneval.isEmpty() {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif !matched {\n\t\t\tvd.addErrors(errors, &kind.AnyOf{})\n\t\t}\n\t}\n\n\t// oneOf\n\tif len(s.OneOf) > 0 {\n\t\tvar matched = -1\n\t\tvar errors []*ValidationError\n\t\tfor i, sch := range s.OneOf {\n\t\t\tif err := vd.validateSelf(sch, \"\", matched != -1); err != nil {\n\t\t\t\tif matched == -1 {\n\t\t\t\t\terrors = append(errors, err.(*ValidationError))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif matched == -1 {\n\t\t\t\t\tmatched = i\n\t\t\t\t} else {\n\t\t\t\t\tvd.addError(&kind.OneOf{Subschemas: []int{matched, i}})\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif matched == -1 {\n\t\t\tvd.addErrors(errors, &kind.OneOf{Subschemas: nil})\n\t\t}\n\t}\n\n\t// if, then, else --\n\tif s.If != nil {\n\t\tif vd.validateSelf(s.If, \"\", true) == nil {\n\t\t\tif s.Then != nil {\n\t\t\t\tvd.addErr(vd.validateSelf(s.Then, \"\", false))\n\t\t\t}\n\t\t} else if s.Else != nil {\n\t\t\tvd.addErr(vd.validateSelf(s.Else, \"\", false))\n\t\t}\n\t}\n}\n\nfunc (vd *validator) unevalValidate() {\n\ts := vd.sch\n\n\t// unevaluatedProperties\n\tif obj, ok := vd.v.(map[string]any); ok && s.UnevaluatedProperties != nil {\n\t\tfor pname := range vd.uneval.props {\n\t\t\tif pvalue, ok := obj[pname]; ok {\n\t\t\t\tvd.addErr(vd.validateVal(s.UnevaluatedProperties, pvalue, pname))\n\t\t\t}\n\t\t}\n\t\tvd.uneval.props = nil\n\t}\n\n\t// unevaluatedItems\n\tif arr, ok := vd.v.([]any); ok && s.UnevaluatedItems != nil {\n\t\tfor i := range vd.uneval.items {\n\t\t\tvd.addErr(vd.validateVal(s.UnevaluatedItems, arr[i], strconv.Itoa(i)))\n\t\t}\n\t\tvd.uneval.items = nil\n\t}\n}\n\n// validation helpers --\n\nfunc (vd *validator) validateSelf(sch *Schema, refKw string, boolResult bool) error {\n\tscp := vd.scp.child(sch, refKw, vd.scp.vid)\n\tuneval := unevalFrom(vd.v, sch, !vd.uneval.isEmpty())\n\tsubvd := validator{\n\t\tv:            vd.v,\n\t\tvloc:         vd.vloc,\n\t\tsch:          sch,\n\t\tscp:          scp,\n\t\tuneval:       uneval,\n\t\terrors:       nil,\n\t\tboolResult:   vd.boolResult || boolResult,\n\t\tregexpEngine: vd.regexpEngine,\n\t\tmeta:         vd.meta,\n\t\tresources:    vd.resources,\n\t\tassertVocabs: vd.assertVocabs,\n\t\tvocabularies: vd.vocabularies,\n\t}\n\tsubvd.handleMeta()\n\tuneval, err := subvd.validate()\n\tif err == nil {\n\t\tvd.uneval.merge(uneval)\n\t}\n\treturn err\n}\n\nfunc (vd *validator) validateVal(sch *Schema, v any, vtok string) error {\n\tvloc := append(vd.vloc, vtok)\n\tscp := vd.scp.child(sch, \"\", vd.scp.vid+1)\n\tuneval := unevalFrom(v, sch, false)\n\tsubvd := validator{\n\t\tv:            v,\n\t\tvloc:         vloc,\n\t\tsch:          sch,\n\t\tscp:          scp,\n\t\tuneval:       uneval,\n\t\terrors:       nil,\n\t\tboolResult:   vd.boolResult,\n\t\tregexpEngine: vd.regexpEngine,\n\t\tmeta:         vd.meta,\n\t\tresources:    vd.resources,\n\t\tassertVocabs: vd.assertVocabs,\n\t\tvocabularies: vd.vocabularies,\n\t}\n\tsubvd.handleMeta()\n\t_, err := subvd.validate()\n\treturn err\n}\n\nfunc (vd *validator) validateValue(sch *Schema, v any, vpath []string) error {\n\tvloc := append(vd.vloc, vpath...)\n\tscp := vd.scp.child(sch, \"\", vd.scp.vid+1)\n\tuneval := unevalFrom(v, sch, false)\n\tsubvd := validator{\n\t\tv:            v,\n\t\tvloc:         vloc,\n\t\tsch:          sch,\n\t\tscp:          scp,\n\t\tuneval:       uneval,\n\t\terrors:       nil,\n\t\tboolResult:   vd.boolResult,\n\t\tregexpEngine: vd.regexpEngine,\n\t\tmeta:         vd.meta,\n\t\tresources:    vd.resources,\n\t\tassertVocabs: vd.assertVocabs,\n\t\tvocabularies: vd.vocabularies,\n\t}\n\tsubvd.handleMeta()\n\t_, err := subvd.validate()\n\treturn err\n}\n\nfunc (vd *validator) metaResource(sch *Schema) *resource {\n\tif sch != vd.meta {\n\t\treturn nil\n\t}\n\tptr := \"\"\n\tfor _, tok := range vd.instanceLocation() {\n\t\tptr += \"/\"\n\t\tptr += escape(tok)\n\t}\n\treturn vd.resources[jsonPointer(ptr)]\n}\n\nfunc (vd *validator) handleMeta() {\n\tres := vd.metaResource(vd.sch)\n\tif res == nil {\n\t\treturn\n\t}\n\tsch := res.dialect.getSchema(vd.assertVocabs, vd.vocabularies)\n\tvd.meta = sch\n\tvd.sch = sch\n}\n\n// reference validation --\n\nfunc (vd *validator) validateRef(sch *Schema, kw string) error {\n\terr := vd.validateSelf(sch, kw, false)\n\tif err != nil {\n\t\trefErr := vd.error(&kind.Reference{Keyword: kw, URL: sch.Location})\n\t\tverr := err.(*ValidationError)\n\t\tif _, ok := verr.ErrorKind.(*kind.Group); ok {\n\t\t\trefErr.Causes = verr.Causes\n\t\t} else {\n\t\t\trefErr.Causes = append(refErr.Causes, verr)\n\t\t}\n\t\treturn refErr\n\t}\n\treturn nil\n}\n\nfunc (vd *validator) resolveRecursiveAnchor(fallback *Schema) *Schema {\n\tsch := fallback\n\tscp := vd.scp\n\tfor scp != nil {\n\t\tif scp.sch.resource.RecursiveAnchor {\n\t\t\tsch = scp.sch\n\t\t}\n\t\tscp = scp.parent\n\t}\n\treturn sch\n}\n\nfunc (vd *validator) resolveDynamicAnchor(name string, fallback *Schema) *Schema {\n\tsch := fallback\n\tscp := vd.scp\n\tfor scp != nil {\n\t\tif dsch, ok := scp.sch.resource.dynamicAnchors[name]; ok {\n\t\t\tsch = dsch\n\t\t}\n\t\tscp = scp.parent\n\t}\n\treturn sch\n}\n\nfunc (vd *validator) validateRefs() {\n\t// $recursiveRef --\n\tif sch := vd.sch.RecursiveRef; sch != nil {\n\t\tif sch.RecursiveAnchor {\n\t\t\tsch = vd.resolveRecursiveAnchor(sch)\n\t\t}\n\t\tvd.addErr(vd.validateRef(sch, \"$recursiveRef\"))\n\t}\n\n\t// $dynamicRef --\n\tif dref := vd.sch.DynamicRef; dref != nil {\n\t\tsch := dref.Ref // initial target\n\t\tif dref.Anchor != \"\" {\n\t\t\t// $dynamicRef includes anchor\n\t\t\tif sch.DynamicAnchor == dref.Anchor {\n\t\t\t\t// initial target has matching $dynamicAnchor\n\t\t\t\tsch = vd.resolveDynamicAnchor(dref.Anchor, sch)\n\t\t\t}\n\t\t}\n\t\tvd.addErr(vd.validateRef(sch, \"$dynamicRef\"))\n\t}\n}\n\n// error helpers --\n\nfunc (vd *validator) instanceLocation() []string {\n\treturn slices.Clone(vd.vloc)\n}\n\nfunc (vd *validator) error(kind ErrorKind) *ValidationError {\n\tif vd.boolResult {\n\t\treturn &ValidationError{}\n\t}\n\treturn &ValidationError{\n\t\tSchemaURL:        vd.sch.Location,\n\t\tInstanceLocation: vd.instanceLocation(),\n\t\tErrorKind:        kind,\n\t\tCauses:           nil,\n\t}\n}\n\nfunc (vd *validator) addErr(err error) {\n\tif err != nil {\n\t\tvd.errors = append(vd.errors, err.(*ValidationError))\n\t}\n}\n\nfunc (vd *validator) addError(kind ErrorKind) {\n\tvd.errors = append(vd.errors, vd.error(kind))\n}\n\nfunc (vd *validator) addErrors(errors []*ValidationError, kind ErrorKind) {\n\terr := vd.error(kind)\n\terr.Causes = errors\n\tvd.errors = append(vd.errors, err)\n}\n\nfunc (vd *validator) findMissing(obj map[string]any, reqd []string) []string {\n\tvar missing []string\n\tfor _, pname := range reqd {\n\t\tif _, ok := obj[pname]; !ok {\n\t\t\tif vd.boolResult {\n\t\t\t\treturn []string{} // non-nil\n\t\t\t}\n\t\t\tmissing = append(missing, pname)\n\t\t}\n\t}\n\treturn missing\n}\n\n// --\n\ntype scope struct {\n\tsch *Schema\n\n\t// if empty, compute from self.sch and self.parent.sch.\n\t// not empty, only when there is a jump i.e, $ref, $XXXRef\n\trefKeyword string\n\n\t// unique id of value being validated\n\t// if two scopes validate same value, they will have\n\t// same vid\n\tvid int\n\n\tparent *scope\n}\n\nfunc (sc *scope) child(sch *Schema, refKeyword string, vid int) *scope {\n\treturn &scope{sch, refKeyword, vid, sc}\n}\n\nfunc (sc *scope) checkCycle() *scope {\n\tscp := sc.parent\n\tfor scp != nil {\n\t\tif scp.vid != sc.vid {\n\t\t\tbreak\n\t\t}\n\t\tif scp.sch == sc.sch {\n\t\t\treturn scp\n\t\t}\n\t\tscp = scp.parent\n\t}\n\treturn nil\n}\n\nfunc (sc *scope) kwLoc() string {\n\tvar loc string\n\tfor sc.parent != nil {\n\t\tif sc.refKeyword != \"\" {\n\t\t\tloc = fmt.Sprintf(\"/%s%s\", escape(sc.refKeyword), loc)\n\t\t} else {\n\t\t\tcur := sc.sch.Location\n\t\t\tparent := sc.parent.sch.Location\n\t\t\tloc = fmt.Sprintf(\"%s%s\", cur[len(parent):], loc)\n\t\t}\n\t\tsc = sc.parent\n\t}\n\treturn loc\n}\n\n// --\n\ntype uneval struct {\n\tprops map[string]struct{}\n\titems map[int]struct{}\n}\n\nfunc unevalFrom(v any, sch *Schema, callerNeeds bool) *uneval {\n\tuneval := &uneval{}\n\tswitch v := v.(type) {\n\tcase map[string]any:\n\t\tif !sch.allPropsEvaluated && (callerNeeds || sch.UnevaluatedProperties != nil) {\n\t\t\tuneval.props = map[string]struct{}{}\n\t\t\tfor k := range v {\n\t\t\t\tuneval.props[k] = struct{}{}\n\t\t\t}\n\t\t}\n\tcase []any:\n\t\tif !sch.allItemsEvaluated && (callerNeeds || sch.UnevaluatedItems != nil) && sch.numItemsEvaluated < len(v) {\n\t\t\tuneval.items = map[int]struct{}{}\n\t\t\tfor i := sch.numItemsEvaluated; i < len(v); i++ {\n\t\t\t\tuneval.items[i] = struct{}{}\n\t\t\t}\n\t\t}\n\t}\n\treturn uneval\n}\n\nfunc (ue *uneval) merge(other *uneval) {\n\tfor k := range ue.props {\n\t\tif _, ok := other.props[k]; !ok {\n\t\t\tdelete(ue.props, k)\n\t\t}\n\t}\n\tfor i := range ue.items {\n\t\tif _, ok := other.items[i]; !ok {\n\t\t\tdelete(ue.items, i)\n\t\t}\n\t}\n}\n\nfunc (ue *uneval) isEmpty() bool {\n\treturn len(ue.props) == 0 && len(ue.items) == 0\n}\n\n// --\n\ntype ValidationError struct {\n\t// absolute, dereferenced schema location.\n\tSchemaURL string\n\n\t// location of the JSON value within the instance being validated.\n\tInstanceLocation []string\n\n\t// kind of error\n\tErrorKind ErrorKind\n\n\t// holds nested errors\n\tCauses []*ValidationError\n}\n\ntype ErrorKind interface {\n\tKeywordPath() []string\n\tLocalizedString(*message.Printer) string\n}\n"
  },
  {
    "path": "vendor/github.com/santhosh-tekuri/jsonschema/v6/vocab.go",
    "content": "package jsonschema\n\n// CompilerContext provides helpers for\n// compiling a [Vocabulary].\ntype CompilerContext struct {\n\tc *objCompiler\n}\n\nfunc (ctx *CompilerContext) Enqueue(schPath []string) *Schema {\n\tptr := ctx.c.up.ptr\n\tfor _, tok := range schPath {\n\t\tptr = ptr.append(tok)\n\t}\n\treturn ctx.c.enqueuePtr(ptr)\n}\n\n// Vocabulary defines a set of keywords, their syntax and\n// their semantics.\ntype Vocabulary struct {\n\t// URL identifier for this Vocabulary.\n\tURL string\n\n\t// Schema that is used to validate the keywords that is introduced by this\n\t// vocabulary.\n\tSchema *Schema\n\n\t// Subschemas lists the possible locations of subschemas introduced by\n\t// this vocabulary.\n\tSubschemas []SchemaPath\n\n\t// Compile compiles the keywords(introduced by this vocabulary) in obj into [SchemaExt].\n\t// If obj does not contain any keywords introduced by this vocabulary, nil SchemaExt must\n\t// be returned.\n\tCompile func(ctx *CompilerContext, obj map[string]any) (SchemaExt, error)\n}\n\n// --\n\n// SchemaExt is compled form of vocabulary.\ntype SchemaExt interface {\n\t// Validate validates v against and errors if any are reported\n\t// to ctx.\n\tValidate(ctx *ValidatorContext, v any)\n}\n\n// ValidatorContext provides helpers for\n// validating with [SchemaExt].\ntype ValidatorContext struct {\n\tvd *validator\n}\n\n// ValueLocation returns location of value as jsonpath token array.\nfunc (ctx *ValidatorContext) ValueLocation() []string {\n\treturn ctx.vd.vloc\n}\n\n// Validate validates v with sch. vpath gives path of v from current context value.\nfunc (ctx *ValidatorContext) Validate(sch *Schema, v any, vpath []string) error {\n\tswitch len(vpath) {\n\tcase 0:\n\t\treturn ctx.vd.validateSelf(sch, \"\", false)\n\tcase 1:\n\t\treturn ctx.vd.validateVal(sch, v, vpath[0])\n\tdefault:\n\t\treturn ctx.vd.validateValue(sch, v, vpath)\n\t}\n}\n\n// EvaluatedProp marks given property of current object as evaluated.\nfunc (ctx *ValidatorContext) EvaluatedProp(pname string) {\n\tdelete(ctx.vd.uneval.props, pname)\n}\n\n// EvaluatedItem marks items at given index of current array as evaluated.\nfunc (ctx *ValidatorContext) EvaluatedItem(index int) {\n\tdelete(ctx.vd.uneval.items, index)\n}\n\n// AddError reports validation-error of given kind.\nfunc (ctx *ValidatorContext) AddError(k ErrorKind) {\n\tctx.vd.addError(k)\n}\n\n// AddErrors reports validation-errors of given kind.\nfunc (ctx *ValidatorContext) AddErrors(errors []*ValidationError, k ErrorKind) {\n\tctx.vd.addErrors(errors, k)\n}\n\n// AddErr reports the given err. This is typically used to report\n// the error created by subschema validation.\n//\n// NOTE that err must be of type *ValidationError.\nfunc (ctx *ValidatorContext) AddErr(err error) {\n\tctx.vd.addErr(err)\n}\n\nfunc (ctx *ValidatorContext) Equals(v1, v2 any) (bool, error) {\n\tb, k := equals(v1, v2)\n\tif k != nil {\n\t\treturn false, ctx.vd.error(k)\n\t}\n\treturn b, nil\n}\n\nfunc (ctx *ValidatorContext) Duplicates(arr []any) (int, int, error) {\n\ti, j, k := duplicates(arr)\n\tif k != nil {\n\t\treturn -1, -1, ctx.vd.error(k)\n\t}\n\treturn i, j, nil\n}\n"
  },
  {
    "path": "vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2021 NYU Secure Systems Lab\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": "vendor/github.com/secure-systems-lab/go-securesystemslib/encrypted/encrypted.go",
    "content": "// Package encrypted provides a simple, secure system for encrypting data\n// symmetrically with a passphrase.\n//\n// It uses scrypt derive a key from the passphrase and the NaCl secret box\n// cipher for authenticated encryption.\npackage encrypted\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"golang.org/x/crypto/nacl/secretbox\"\n\t\"golang.org/x/crypto/scrypt\"\n)\n\nconst saltSize = 32\n\nconst (\n\tboxKeySize   = 32\n\tboxNonceSize = 24\n)\n\n// KDFParameterStrength defines the KDF parameter strength level to be used for\n// encryption key derivation.\ntype KDFParameterStrength uint8\n\nconst (\n\t// Legacy defines legacy scrypt parameters (N:2^15, r:8, p:1)\n\tLegacy KDFParameterStrength = iota + 1\n\t// Standard defines standard scrypt parameters which is focusing 100ms of computation (N:2^16, r:8, p:1)\n\tStandard\n\t// OWASP defines OWASP recommended scrypt parameters (N:2^17, r:8, p:1)\n\tOWASP\n)\n\nvar (\n\t// legacyParams represents old scrypt derivation parameters for backward\n\t// compatibility.\n\tlegacyParams = scryptParams{\n\t\tN: 32768, // 2^15\n\t\tR: 8,\n\t\tP: 1,\n\t}\n\n\t// standardParams defines scrypt parameters based on the scrypt creator\n\t// recommendation to limit key derivation in time boxed to 100ms.\n\tstandardParams = scryptParams{\n\t\tN: 65536, // 2^16\n\t\tR: 8,\n\t\tP: 1,\n\t}\n\n\t// owaspParams defines scrypt parameters recommended by OWASP\n\towaspParams = scryptParams{\n\t\tN: 131072, // 2^17\n\t\tR: 8,\n\t\tP: 1,\n\t}\n\n\t// defaultParams defines scrypt parameters which will be used to generate a\n\t// new key.\n\tdefaultParams = standardParams\n)\n\nconst (\n\tnameScrypt    = \"scrypt\"\n\tnameSecretBox = \"nacl/secretbox\"\n)\n\ntype data struct {\n\tKDF        scryptKDF       `json:\"kdf\"`\n\tCipher     secretBoxCipher `json:\"cipher\"`\n\tCiphertext []byte          `json:\"ciphertext\"`\n}\n\ntype scryptParams struct {\n\tN int `json:\"N\"`\n\tR int `json:\"r\"`\n\tP int `json:\"p\"`\n}\n\nfunc (sp *scryptParams) Equal(in *scryptParams) bool {\n\treturn in != nil && sp.N == in.N && sp.P == in.P && sp.R == in.R\n}\n\nfunc newScryptKDF(level KDFParameterStrength) (scryptKDF, error) {\n\tsalt := make([]byte, saltSize)\n\tif err := fillRandom(salt); err != nil {\n\t\treturn scryptKDF{}, fmt.Errorf(\"unable to generate a random salt: %w\", err)\n\t}\n\n\tvar params scryptParams\n\tswitch level {\n\tcase Legacy:\n\t\tparams = legacyParams\n\tcase Standard:\n\t\tparams = standardParams\n\tcase OWASP:\n\t\tparams = owaspParams\n\tdefault:\n\t\t// Fallback to default parameters\n\t\tparams = defaultParams\n\t}\n\n\treturn scryptKDF{\n\t\tName:   nameScrypt,\n\t\tParams: params,\n\t\tSalt:   salt,\n\t}, nil\n}\n\ntype scryptKDF struct {\n\tName   string       `json:\"name\"`\n\tParams scryptParams `json:\"params\"`\n\tSalt   []byte       `json:\"salt\"`\n}\n\nfunc (s *scryptKDF) Key(passphrase []byte) ([]byte, error) {\n\treturn scrypt.Key(passphrase, s.Salt, s.Params.N, s.Params.R, s.Params.P, boxKeySize)\n}\n\n// CheckParams checks that the encoded KDF parameters are what we expect them to\n// be. If we do not do this, an attacker could cause a DoS by tampering with\n// them.\nfunc (s *scryptKDF) CheckParams() error {\n\tswitch {\n\tcase legacyParams.Equal(&s.Params):\n\tcase standardParams.Equal(&s.Params):\n\tcase owaspParams.Equal(&s.Params):\n\tdefault:\n\t\treturn errors.New(\"unsupported scrypt parameters\")\n\t}\n\n\treturn nil\n}\n\nfunc newSecretBoxCipher() (secretBoxCipher, error) {\n\tnonce := make([]byte, boxNonceSize)\n\tif err := fillRandom(nonce); err != nil {\n\t\treturn secretBoxCipher{}, err\n\t}\n\treturn secretBoxCipher{\n\t\tName:  nameSecretBox,\n\t\tNonce: nonce,\n\t}, nil\n}\n\ntype secretBoxCipher struct {\n\tName  string `json:\"name\"`\n\tNonce []byte `json:\"nonce\"`\n\n\tencrypted bool\n}\n\nfunc (s *secretBoxCipher) Encrypt(plaintext, key []byte) []byte {\n\tvar keyBytes [boxKeySize]byte\n\tvar nonceBytes [boxNonceSize]byte\n\n\tif len(key) != len(keyBytes) {\n\t\tpanic(\"incorrect key size\")\n\t}\n\tif len(s.Nonce) != len(nonceBytes) {\n\t\tpanic(\"incorrect nonce size\")\n\t}\n\n\tcopy(keyBytes[:], key)\n\tcopy(nonceBytes[:], s.Nonce)\n\n\t// ensure that we don't re-use nonces\n\tif s.encrypted {\n\t\tpanic(\"Encrypt must only be called once for each cipher instance\")\n\t}\n\ts.encrypted = true\n\n\treturn secretbox.Seal(nil, plaintext, &nonceBytes, &keyBytes)\n}\n\nfunc (s *secretBoxCipher) Decrypt(ciphertext, key []byte) ([]byte, error) {\n\tvar keyBytes [boxKeySize]byte\n\tvar nonceBytes [boxNonceSize]byte\n\n\tif len(key) != len(keyBytes) {\n\t\tpanic(\"incorrect key size\")\n\t}\n\tif len(s.Nonce) != len(nonceBytes) {\n\t\t// return an error instead of panicking since the nonce is user input\n\t\treturn nil, errors.New(\"encrypted: incorrect nonce size\")\n\t}\n\n\tcopy(keyBytes[:], key)\n\tcopy(nonceBytes[:], s.Nonce)\n\n\tres, ok := secretbox.Open(nil, ciphertext, &nonceBytes, &keyBytes)\n\tif !ok {\n\t\treturn nil, errors.New(\"encrypted: decryption failed\")\n\t}\n\treturn res, nil\n}\n\n// Encrypt takes a passphrase and plaintext, and returns a JSON object\n// containing ciphertext and the details necessary to decrypt it.\nfunc Encrypt(plaintext, passphrase []byte) ([]byte, error) {\n\treturn EncryptWithCustomKDFParameters(plaintext, passphrase, Standard)\n}\n\n// EncryptWithCustomKDFParameters takes a passphrase, the plaintext and a KDF\n// parameter level (Legacy, Standard, or OWASP), and returns a JSON object\n// containing ciphertext and the details necessary to decrypt it.\nfunc EncryptWithCustomKDFParameters(plaintext, passphrase []byte, kdfLevel KDFParameterStrength) ([]byte, error) {\n\tk, err := newScryptKDF(kdfLevel)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tkey, err := k.Key(passphrase)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tc, err := newSecretBoxCipher()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdata := &data{\n\t\tKDF:    k,\n\t\tCipher: c,\n\t}\n\tdata.Ciphertext = c.Encrypt(plaintext, key)\n\n\treturn json.Marshal(data)\n}\n\n// Marshal encrypts the JSON encoding of v using passphrase.\nfunc Marshal(v interface{}, passphrase []byte) ([]byte, error) {\n\treturn MarshalWithCustomKDFParameters(v, passphrase, Standard)\n}\n\n// MarshalWithCustomKDFParameters encrypts the JSON encoding of v using passphrase.\nfunc MarshalWithCustomKDFParameters(v interface{}, passphrase []byte, kdfLevel KDFParameterStrength) ([]byte, error) {\n\tdata, err := json.MarshalIndent(v, \"\", \"\\t\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn EncryptWithCustomKDFParameters(data, passphrase, kdfLevel)\n}\n\n// Decrypt takes a JSON-encoded ciphertext object encrypted using Encrypt and\n// tries to decrypt it using passphrase. If successful, it returns the\n// plaintext.\nfunc Decrypt(ciphertext, passphrase []byte) ([]byte, error) {\n\tdata := &data{}\n\tif err := json.Unmarshal(ciphertext, data); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif data.KDF.Name != nameScrypt {\n\t\treturn nil, fmt.Errorf(\"encrypted: unknown kdf name %q\", data.KDF.Name)\n\t}\n\tif data.Cipher.Name != nameSecretBox {\n\t\treturn nil, fmt.Errorf(\"encrypted: unknown cipher name %q\", data.Cipher.Name)\n\t}\n\tif err := data.KDF.CheckParams(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tkey, err := data.KDF.Key(passphrase)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn data.Cipher.Decrypt(data.Ciphertext, key)\n}\n\n// Unmarshal decrypts the data using passphrase and unmarshals the resulting\n// plaintext into the value pointed to by v.\nfunc Unmarshal(data []byte, v interface{}, passphrase []byte) error {\n\tdecrypted, err := Decrypt(data, passphrase)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn json.Unmarshal(decrypted, v)\n}\n\nfunc fillRandom(b []byte) error {\n\t_, err := io.ReadFull(rand.Reader, b)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/fulcio/COPYRIGHT.txt",
    "content": "\nCopyright 2021 The Sigstore Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/github.com/sigstore/fulcio/LICENSE",
    "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": "vendor/github.com/sigstore/fulcio/pkg/api/client.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage api\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"path\"\n\t\"time\"\n)\n\ntype CertificateResponse struct {\n\tCertPEM  []byte\n\tChainPEM []byte\n\tSCT      []byte\n}\n\ntype RootResponse struct {\n\tChainPEM []byte\n}\n\ntype Key struct {\n\t// +required\n\tContent   []byte `json:\"content\"`\n\tAlgorithm string `json:\"algorithm,omitempty\"`\n}\n\ntype CertificateRequest struct {\n\t// +optional\n\tPublicKey Key `json:\"publicKey\"`\n\n\t// +optional\n\tSignedEmailAddress []byte `json:\"signedEmailAddress\"`\n\n\t// +optional\n\tCertificateSigningRequest []byte `json:\"certificateSigningRequest\"`\n}\n\nconst (\n\tsigningCertPath = \"/api/v1/signingCert\"\n\trootCertPath    = \"/api/v1/rootCert\"\n)\n\n// SigstorePublicServerURL is the URL of Sigstore's public Fulcio service.\nconst SigstorePublicServerURL = \"https://fulcio.sigstore.dev\"\n\n// LegacyClient is the interface for accessing the Fulcio API.\ntype LegacyClient interface {\n\t// SigningCert sends the provided CertificateRequest to the /api/v1/signingCert\n\t// endpoint of a Fulcio API, authenticated with the provided bearer token.\n\tSigningCert(cr CertificateRequest, token string) (*CertificateResponse, error)\n\t// RootCert sends a request to get the current CA used by Fulcio.\n\tRootCert() (*RootResponse, error)\n}\n\n// ClientOption is a functional option for customizing static signatures.\ntype ClientOption func(*clientOptions)\n\n// NewClient creates a new Fulcio API client talking to the provided URL.\nfunc NewClient(url *url.URL, opts ...ClientOption) LegacyClient {\n\to := makeOptions(opts...)\n\n\treturn &client{\n\t\tbaseURL: url,\n\t\tclient: &http.Client{\n\t\t\tTransport: createRoundTripper(http.DefaultTransport, o),\n\t\t\tTimeout:   o.Timeout,\n\t\t},\n\t}\n}\n\ntype client struct {\n\tbaseURL *url.URL\n\tclient  *http.Client\n}\n\nvar _ LegacyClient = (*client)(nil)\n\n// SigningCert implements Client\nfunc (c *client) SigningCert(cr CertificateRequest, token string) (*CertificateResponse, error) {\n\t// Construct the API endpoint for this handler\n\tendpoint := *c.baseURL\n\tendpoint.Path = path.Join(endpoint.Path, signingCertPath)\n\n\tb, err := json.Marshal(cr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"marshal: %w\", err)\n\t}\n\n\treq, err := http.NewRequest(http.MethodPost, endpoint.String(), bytes.NewBuffer(b))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"request: %w\", err)\n\t}\n\t// Set the authorization header to our OIDC bearer token.\n\treq.Header.Set(\"Authorization\", \"Bearer \"+token)\n\t// Set the content-type to reflect we're sending JSON.\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := c.client.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"client: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s read: %w\", endpoint.String(), err)\n\t}\n\n\t// The API should return a 201 Created on success.  If we see anything else,\n\t// then turn the response body into an error.\n\tif resp.StatusCode != http.StatusCreated {\n\t\treturn nil, fmt.Errorf(\"%s %s returned %s: %q\", http.MethodPost, endpoint.String(), resp.Status, body)\n\t}\n\n\t// Extract the SCT from the response header.\n\tsct, err := base64.StdEncoding.DecodeString(resp.Header.Get(\"SCT\"))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decode: %w\", err)\n\t}\n\n\t// Split the cert and the chain\n\tcertBlock, chainPem := pem.Decode(body)\n\tif certBlock == nil {\n\t\treturn nil, errors.New(\"did not find a cert from Fulcio\")\n\t}\n\tcertPem := pem.EncodeToMemory(certBlock)\n\treturn &CertificateResponse{\n\t\tCertPEM:  certPem,\n\t\tChainPEM: chainPem,\n\t\tSCT:      sct,\n\t}, nil\n}\n\nfunc (c *client) RootCert() (*RootResponse, error) {\n\t// Construct the API endpoint for this handler\n\tendpoint := *c.baseURL\n\tendpoint.Path = path.Join(endpoint.Path, rootCertPath)\n\n\treq, err := http.NewRequest(http.MethodGet, endpoint.String(), nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"request: %w\", err)\n\t}\n\tresp, err := c.client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\tbody, err := io.ReadAll(resp.Body)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, errors.New(string(body))\n\t}\n\treturn &RootResponse{ChainPEM: body}, nil\n}\n\ntype clientOptions struct {\n\tUserAgent string\n\tTimeout   time.Duration\n}\n\nfunc makeOptions(opts ...ClientOption) *clientOptions {\n\to := &clientOptions{\n\t\tUserAgent: \"\",\n\t}\n\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\treturn o\n}\n\n// WithTimeout sets the request timeout for the client\nfunc WithTimeout(timeout time.Duration) ClientOption {\n\treturn func(o *clientOptions) {\n\t\to.Timeout = timeout\n\t}\n}\n\n// WithUserAgent sets the media type of the signature.\nfunc WithUserAgent(userAgent string) ClientOption {\n\treturn func(o *clientOptions) {\n\t\to.UserAgent = userAgent\n\t}\n}\n\ntype roundTripper struct {\n\thttp.RoundTripper\n\tUserAgent string\n}\n\n// RoundTrip implements `http.RoundTripper`\nfunc (rt *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {\n\treq.Header.Set(\"User-Agent\", rt.UserAgent)\n\treturn rt.RoundTripper.RoundTrip(req)\n}\n\nfunc createRoundTripper(inner http.RoundTripper, o *clientOptions) http.RoundTripper {\n\tif inner == nil {\n\t\tinner = http.DefaultTransport\n\t}\n\tif o.UserAgent == \"\" {\n\t\t// There's nothing to do...\n\t\treturn inner\n\t}\n\treturn &roundTripper{\n\t\tRoundTripper: inner,\n\t\tUserAgent:    o.UserAgent,\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/fulcio/pkg/certificate/doc.go",
    "content": "// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package certificate contains helpers for getting data from Fulcio issued\n// x509 certificates.\npackage certificate\n"
  },
  {
    "path": "vendor/github.com/sigstore/fulcio/pkg/certificate/extensions.go",
    "content": "// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage certificate\n\nimport (\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// Deprecated: Use OIDIssuerV2\n\tOIDIssuer = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 1}\n\t// Deprecated: Use OIDBuildTrigger\n\tOIDGitHubWorkflowTrigger = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 2}\n\t// Deprecated: Use OIDSourceRepositoryDigest\n\tOIDGitHubWorkflowSHA = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 3}\n\t// Deprecated: Use OIDBuildConfigURI or OIDBuildConfigDigest\n\tOIDGitHubWorkflowName = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 4}\n\t// Deprecated: Use SourceRepositoryURI\n\tOIDGitHubWorkflowRepository = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 5}\n\t// Deprecated: Use OIDSourceRepositoryRef\n\tOIDGitHubWorkflowRef = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 6}\n\n\tOIDOtherName = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 7}\n\tOIDIssuerV2  = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 8}\n\n\t// CI extensions\n\tOIDBuildSignerURI                      = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 9}\n\tOIDBuildSignerDigest                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 10}\n\tOIDRunnerEnvironment                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 11}\n\tOIDSourceRepositoryURI                 = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 12}\n\tOIDSourceRepositoryDigest              = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 13}\n\tOIDSourceRepositoryRef                 = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 14}\n\tOIDSourceRepositoryIdentifier          = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 15}\n\tOIDSourceRepositoryOwnerURI            = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 16}\n\tOIDSourceRepositoryOwnerIdentifier     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 17}\n\tOIDBuildConfigURI                      = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 18}\n\tOIDBuildConfigDigest                   = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 19}\n\tOIDBuildTrigger                        = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 20}\n\tOIDRunInvocationURI                    = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 21}\n\tOIDSourceRepositoryVisibilityAtSigning = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 22}\n\tOIDDeploymentEnvironment               = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 23}\n)\n\n// Extensions contains all custom x509 extensions defined by Fulcio\ntype Extensions struct {\n\t// NB: New extensions must be added here and documented\n\t// at docs/oidc-info.md\n\n\t// The OIDC issuer. Should match `iss` claim of ID token or, in the case of\n\t// a federated login like Dex it should match the issuer URL of the\n\t// upstream issuer. The issuer is not set the extensions are invalid and\n\t// will fail to render.\n\tIssuer string // OID 1.3.6.1.4.1.57264.1.8 and 1.3.6.1.4.1.57264.1.1 (Deprecated)\n\n\t// Deprecated\n\t// Triggering event of the Github Workflow. Matches the `event_name` claim of ID\n\t// tokens from Github Actions\n\tGithubWorkflowTrigger string `json:\"GithubWorkflowTrigger,omitempty\" yaml:\"github-workflow-trigger,omitempty\"` // OID 1.3.6.1.4.1.57264.1.2\n\n\t// Deprecated\n\t// SHA of git commit being built in Github Actions. Matches the `sha` claim of ID\n\t// tokens from Github Actions\n\tGithubWorkflowSHA string `json:\"GithubWorkflowSHA,omitempty\" yaml:\"github-workflow-sha,omitempty\"` // OID 1.3.6.1.4.1.57264.1.3\n\n\t// Deprecated\n\t// Name of Github Actions Workflow. Matches the `workflow` claim of the ID\n\t// tokens from Github Actions\n\tGithubWorkflowName string `json:\"GithubWorkflowName,omitempty\" yaml:\"github-workflow-name,omitempty\"` // OID 1.3.6.1.4.1.57264.1.4\n\n\t// Deprecated\n\t// Repository of the Github Actions Workflow. Matches the `repository` claim of the ID\n\t// tokens from Github Actions\n\tGithubWorkflowRepository string `json:\"GithubWorkflowRepository,omitempty\" yaml:\"github-workflow-repository,omitempty\"` // OID 1.3.6.1.4.1.57264.1.5\n\n\t// Deprecated\n\t// Git Ref of the Github Actions Workflow. Matches the `ref` claim of the ID tokens\n\t// from Github Actions\n\tGithubWorkflowRef string `json:\"GithubWorkflowRef,omitempty\" yaml:\"github-workflow-ref,omitempty\"` // 1.3.6.1.4.1.57264.1.6\n\n\t// Reference to specific build instructions that are responsible for signing.\n\tBuildSignerURI string `json:\"BuildSignerURI,omitempty\" yaml:\"build-signer-uri,omitempty\"` // 1.3.6.1.4.1.57264.1.9\n\n\t// Immutable reference to the specific version of the build instructions that is responsible for signing.\n\tBuildSignerDigest string `json:\"BuildSignerDigest,omitempty\" yaml:\"build-signer-digest,omitempty\"` // 1.3.6.1.4.1.57264.1.10\n\n\t// Specifies whether the build took place in platform-hosted cloud infrastructure or customer/self-hosted infrastructure.\n\tRunnerEnvironment string `json:\"RunnerEnvironment,omitempty\" yaml:\"runner-environment,omitempty\"` // 1.3.6.1.4.1.57264.1.11\n\n\t// Source repository URL that the build was based on.\n\tSourceRepositoryURI string `json:\"SourceRepositoryURI,omitempty\" yaml:\"source-repository-uri,omitempty\"` // 1.3.6.1.4.1.57264.1.12\n\n\t// Immutable reference to a specific version of the source code that the build was based upon.\n\tSourceRepositoryDigest string `json:\"SourceRepositoryDigest,omitempty\" yaml:\"source-repository-digest,omitempty\"` // 1.3.6.1.4.1.57264.1.13\n\n\t// Source Repository Ref that the build run was based upon.\n\tSourceRepositoryRef string `json:\"SourceRepositoryRef,omitempty\" yaml:\"source-repository-ref,omitempty\"` // 1.3.6.1.4.1.57264.1.14\n\n\t// Immutable identifier for the source repository the workflow was based upon.\n\tSourceRepositoryIdentifier string `json:\"SourceRepositoryIdentifier,omitempty\" yaml:\"source-repository-identifier,omitempty\"` // 1.3.6.1.4.1.57264.1.15\n\n\t// Source repository owner URL of the owner of the source repository that the build was based on.\n\tSourceRepositoryOwnerURI string `json:\"SourceRepositoryOwnerURI,omitempty\" yaml:\"source-repository-owner-uri,omitempty\"` // 1.3.6.1.4.1.57264.1.16\n\n\t// Immutable identifier for the owner of the source repository that the workflow was based upon.\n\tSourceRepositoryOwnerIdentifier string `json:\"SourceRepositoryOwnerIdentifier,omitempty\" yaml:\"source-repository-owner-identifier,omitempty\"` // 1.3.6.1.4.1.57264.1.17\n\n\t// Build Config URL to the top-level/initiating build instructions.\n\tBuildConfigURI string `json:\"BuildConfigURI,omitempty\" yaml:\"build-config-uri,omitempty\"` // 1.3.6.1.4.1.57264.1.18\n\n\t// Immutable reference to the specific version of the top-level/initiating build instructions.\n\tBuildConfigDigest string `json:\"BuildConfigDigest,omitempty\" yaml:\"build-config-digest,omitempty\"` // 1.3.6.1.4.1.57264.1.19\n\n\t// Event or action that initiated the build.\n\tBuildTrigger string `json:\"BuildTrigger,omitempty\" yaml:\"build-trigger,omitempty\"` // 1.3.6.1.4.1.57264.1.20\n\n\t// Run Invocation URL to uniquely identify the build execution.\n\tRunInvocationURI string `json:\"RunInvocationURI,omitempty\" yaml:\"run-invocation-uri,omitempty\"` // 1.3.6.1.4.1.57264.1.21\n\n\t// Source repository visibility at the time of signing the certificate.\n\tSourceRepositoryVisibilityAtSigning string `json:\"SourceRepositoryVisibilityAtSigning,omitempty\" yaml:\"source-repository-visibility-at-signing,omitempty\"` // 1.3.6.1.4.1.57264.1.22\n\n\t// Deployment target for a workflow or job\n\tDeploymentEnvironment string `json:\"DeploymentEnvironment,omitempty\" yaml:\"deployment-environment,omitempty\"` // 1.3.6.1.4.1.57264.1.23\n}\n\nfunc (e Extensions) Render() ([]pkix.Extension, error) {\n\tvar exts []pkix.Extension\n\n\t// BEGIN: Deprecated\n\tif e.Issuer != \"\" {\n\t\t// deprecated issuer extension due to incorrect encoding\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDIssuer,\n\t\t\tValue: []byte(e.Issuer),\n\t\t})\n\t} else {\n\t\treturn nil, errors.New(\"extensions must have a non-empty issuer url\")\n\t}\n\tif e.GithubWorkflowTrigger != \"\" {\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDGitHubWorkflowTrigger,\n\t\t\tValue: []byte(e.GithubWorkflowTrigger),\n\t\t})\n\t}\n\tif e.GithubWorkflowSHA != \"\" {\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDGitHubWorkflowSHA,\n\t\t\tValue: []byte(e.GithubWorkflowSHA),\n\t\t})\n\t}\n\tif e.GithubWorkflowName != \"\" {\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDGitHubWorkflowName,\n\t\t\tValue: []byte(e.GithubWorkflowName),\n\t\t})\n\t}\n\tif e.GithubWorkflowRepository != \"\" {\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDGitHubWorkflowRepository,\n\t\t\tValue: []byte(e.GithubWorkflowRepository),\n\t\t})\n\t}\n\tif e.GithubWorkflowRef != \"\" {\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDGitHubWorkflowRef,\n\t\t\tValue: []byte(e.GithubWorkflowRef),\n\t\t})\n\t}\n\t// END: Deprecated\n\n\t// duplicate issuer with correct RFC 5280 encoding\n\tif e.Issuer != \"\" {\n\t\t// construct DER encoding of issuer string\n\t\tval, err := asn1.MarshalWithParams(e.Issuer, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDIssuerV2,\n\t\t\tValue: val,\n\t\t})\n\t} else {\n\t\treturn nil, errors.New(\"extensions must have a non-empty issuer url\")\n\t}\n\n\tif e.BuildSignerURI != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.BuildSignerURI, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDBuildSignerURI,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.BuildSignerDigest != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.BuildSignerDigest, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDBuildSignerDigest,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.RunnerEnvironment != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.RunnerEnvironment, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDRunnerEnvironment,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryURI != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryURI, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryURI,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryDigest != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryDigest, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryDigest,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryRef != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryRef, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryRef,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryIdentifier != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryIdentifier, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryIdentifier,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryOwnerURI != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryOwnerURI, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryOwnerURI,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryOwnerIdentifier != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryOwnerIdentifier, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryOwnerIdentifier,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.BuildConfigURI != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.BuildConfigURI, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDBuildConfigURI,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.BuildConfigDigest != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.BuildConfigDigest, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDBuildConfigDigest,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.BuildTrigger != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.BuildTrigger, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDBuildTrigger,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.RunInvocationURI != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.RunInvocationURI, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDRunInvocationURI,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.SourceRepositoryVisibilityAtSigning != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.SourceRepositoryVisibilityAtSigning, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDSourceRepositoryVisibilityAtSigning,\n\t\t\tValue: val,\n\t\t})\n\t}\n\tif e.DeploymentEnvironment != \"\" {\n\t\tval, err := asn1.MarshalWithParams(e.DeploymentEnvironment, \"utf8\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\texts = append(exts, pkix.Extension{\n\t\t\tId:    OIDDeploymentEnvironment,\n\t\t\tValue: val,\n\t\t})\n\t}\n\n\treturn exts, nil\n}\n\nfunc ParseExtensions(ext []pkix.Extension) (Extensions, error) {\n\tout := Extensions{}\n\n\tfor _, e := range ext {\n\t\tswitch {\n\t\t// BEGIN: Deprecated\n\t\tcase e.Id.Equal(OIDIssuer):\n\t\t\tout.Issuer = string(e.Value)\n\t\tcase e.Id.Equal(OIDGitHubWorkflowTrigger):\n\t\t\tout.GithubWorkflowTrigger = string(e.Value)\n\t\tcase e.Id.Equal(OIDGitHubWorkflowSHA):\n\t\t\tout.GithubWorkflowSHA = string(e.Value)\n\t\tcase e.Id.Equal(OIDGitHubWorkflowName):\n\t\t\tout.GithubWorkflowName = string(e.Value)\n\t\tcase e.Id.Equal(OIDGitHubWorkflowRepository):\n\t\t\tout.GithubWorkflowRepository = string(e.Value)\n\t\tcase e.Id.Equal(OIDGitHubWorkflowRef):\n\t\t\tout.GithubWorkflowRef = string(e.Value)\n\t\t// END: Deprecated\n\t\tcase e.Id.Equal(OIDIssuerV2):\n\t\t\tif err := ParseDERString(e.Value, &out.Issuer); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDBuildSignerURI):\n\t\t\tif err := ParseDERString(e.Value, &out.BuildSignerURI); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDBuildSignerDigest):\n\t\t\tif err := ParseDERString(e.Value, &out.BuildSignerDigest); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDRunnerEnvironment):\n\t\t\tif err := ParseDERString(e.Value, &out.RunnerEnvironment); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryURI):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryURI); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryDigest):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryDigest); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryRef):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryRef); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryIdentifier):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryIdentifier); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryOwnerURI):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryOwnerURI); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryOwnerIdentifier):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryOwnerIdentifier); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDBuildConfigURI):\n\t\t\tif err := ParseDERString(e.Value, &out.BuildConfigURI); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDBuildConfigDigest):\n\t\t\tif err := ParseDERString(e.Value, &out.BuildConfigDigest); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDBuildTrigger):\n\t\t\tif err := ParseDERString(e.Value, &out.BuildTrigger); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDRunInvocationURI):\n\t\t\tif err := ParseDERString(e.Value, &out.RunInvocationURI); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDSourceRepositoryVisibilityAtSigning):\n\t\t\tif err := ParseDERString(e.Value, &out.SourceRepositoryVisibilityAtSigning); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\tcase e.Id.Equal(OIDDeploymentEnvironment):\n\t\t\tif err := ParseDERString(e.Value, &out.DeploymentEnvironment); err != nil {\n\t\t\t\treturn Extensions{}, err\n\t\t\t}\n\t\t}\n\t}\n\n\t// We only ever return nil, but leaving error in place so that we can add\n\t// more complex parsing of fields in a backwards compatible way if needed.\n\treturn out, nil\n}\n\n// ParseDERString decodes a DER-encoded string and puts the value in parsedVal.\n// Returns an error if the unmarshalling fails or if there are trailing bytes in the encoding.\nfunc ParseDERString(val []byte, parsedVal *string) error {\n\trest, err := asn1.Unmarshal(val, parsedVal)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unexpected error unmarshalling DER-encoded string: %v\", err)\n\t}\n\tif len(rest) != 0 {\n\t\treturn errors.New(\"unexpected trailing bytes in DER-encoded string\")\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/protobuf-specs/COPYRIGHT.txt",
    "content": "\nCopyright 2022 The Sigstore Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/github.com/sigstore/protobuf-specs/LICENSE",
    "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 [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": "vendor/github.com/sigstore/protobuf-specs/gen/pb-go/common/v1/sigstore_common.pb.go",
    "content": "// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.5\n// \tprotoc        v6.30.2\n// source: sigstore_common.proto\n\npackage v1\n\nimport (\n\t_ \"google.golang.org/genproto/googleapis/api/annotations\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Only a subset of the secure hash standard algorithms are supported.\n// See <https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf> for more\n// details.\n// UNSPECIFIED SHOULD not be used, primary reason for inclusion is to force\n// any proto JSON serialization to emit the used hash algorithm, as default\n// option is to *omit* the default value of an enum (which is the first\n// value, represented by '0'.\ntype HashAlgorithm int32\n\nconst (\n\tHashAlgorithm_HASH_ALGORITHM_UNSPECIFIED HashAlgorithm = 0\n\tHashAlgorithm_SHA2_256                   HashAlgorithm = 1\n\tHashAlgorithm_SHA2_384                   HashAlgorithm = 2\n\tHashAlgorithm_SHA2_512                   HashAlgorithm = 3\n\tHashAlgorithm_SHA3_256                   HashAlgorithm = 4\n\tHashAlgorithm_SHA3_384                   HashAlgorithm = 5\n)\n\n// Enum value maps for HashAlgorithm.\nvar (\n\tHashAlgorithm_name = map[int32]string{\n\t\t0: \"HASH_ALGORITHM_UNSPECIFIED\",\n\t\t1: \"SHA2_256\",\n\t\t2: \"SHA2_384\",\n\t\t3: \"SHA2_512\",\n\t\t4: \"SHA3_256\",\n\t\t5: \"SHA3_384\",\n\t}\n\tHashAlgorithm_value = map[string]int32{\n\t\t\"HASH_ALGORITHM_UNSPECIFIED\": 0,\n\t\t\"SHA2_256\":                   1,\n\t\t\"SHA2_384\":                   2,\n\t\t\"SHA2_512\":                   3,\n\t\t\"SHA3_256\":                   4,\n\t\t\"SHA3_384\":                   5,\n\t}\n)\n\nfunc (x HashAlgorithm) Enum() *HashAlgorithm {\n\tp := new(HashAlgorithm)\n\t*p = x\n\treturn p\n}\n\nfunc (x HashAlgorithm) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (HashAlgorithm) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_sigstore_common_proto_enumTypes[0].Descriptor()\n}\n\nfunc (HashAlgorithm) Type() protoreflect.EnumType {\n\treturn &file_sigstore_common_proto_enumTypes[0]\n}\n\nfunc (x HashAlgorithm) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use HashAlgorithm.Descriptor instead.\nfunc (HashAlgorithm) EnumDescriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{0}\n}\n\n// Details of a specific public key, capturing the the key encoding method,\n// and signature algorithm.\n//\n// PublicKeyDetails captures the public key/hash algorithm combinations\n// recommended in the Sigstore ecosystem.\n//\n// This is modelled as a linear set as we want to provide a small number of\n// opinionated options instead of allowing every possible permutation.\n//\n// Any changes to this enum MUST be reflected in the algorithm registry.\n//\n// See: <https://github.com/sigstore/architecture-docs/blob/main/algorithm-registry.md>\n//\n// To avoid the possibility of contradicting formats such as PKCS1 with\n// ED25519 the valid permutations are listed as a linear set instead of a\n// cartesian set (i.e one combined variable instead of two, one for encoding\n// and one for the signature algorithm).\ntype PublicKeyDetails int32\n\nconst (\n\tPublicKeyDetails_PUBLIC_KEY_DETAILS_UNSPECIFIED PublicKeyDetails = 0\n\t// RSA\n\t//\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKCS1_RSA_PKCS1V5 PublicKeyDetails = 1 // See RFC8017\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKCS1_RSA_PSS PublicKeyDetails = 2 // See RFC8017\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKIX_RSA_PKCS1V5 PublicKeyDetails = 3\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKIX_RSA_PSS PublicKeyDetails = 4\n\t// RSA public key in PKIX format, PKCS#1v1.5 signature\n\tPublicKeyDetails_PKIX_RSA_PKCS1V15_2048_SHA256 PublicKeyDetails = 9\n\tPublicKeyDetails_PKIX_RSA_PKCS1V15_3072_SHA256 PublicKeyDetails = 10\n\tPublicKeyDetails_PKIX_RSA_PKCS1V15_4096_SHA256 PublicKeyDetails = 11\n\t// RSA public key in PKIX format, RSASSA-PSS signature\n\tPublicKeyDetails_PKIX_RSA_PSS_2048_SHA256 PublicKeyDetails = 16 // See RFC4055\n\tPublicKeyDetails_PKIX_RSA_PSS_3072_SHA256 PublicKeyDetails = 17\n\tPublicKeyDetails_PKIX_RSA_PSS_4096_SHA256 PublicKeyDetails = 18\n\t// ECDSA\n\t//\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKIX_ECDSA_P256_HMAC_SHA_256 PublicKeyDetails = 6 // See RFC6979\n\tPublicKeyDetails_PKIX_ECDSA_P256_SHA_256      PublicKeyDetails = 5 // See NIST FIPS 186-4\n\tPublicKeyDetails_PKIX_ECDSA_P384_SHA_384      PublicKeyDetails = 12\n\tPublicKeyDetails_PKIX_ECDSA_P521_SHA_512      PublicKeyDetails = 13\n\t// Ed 25519\n\tPublicKeyDetails_PKIX_ED25519    PublicKeyDetails = 7 // See RFC8032\n\tPublicKeyDetails_PKIX_ED25519_PH PublicKeyDetails = 8\n\t// These algorithms are deprecated and should not be used, but they\n\t// were/are being used by most Sigstore clients implementations.\n\t//\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKIX_ECDSA_P384_SHA_256 PublicKeyDetails = 19\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_PKIX_ECDSA_P521_SHA_256 PublicKeyDetails = 20\n\t// LMS and LM-OTS\n\t//\n\t// These algorithms are deprecated and should not be used.\n\t// Keys and signatures MAY be used by private Sigstore\n\t// deployments, but will not be supported by the public\n\t// good instance.\n\t//\n\t// USER WARNING: LMS and LM-OTS are both stateful signature schemes.\n\t// Using them correctly requires discretion and careful consideration\n\t// to ensure that individual secret keys are not used more than once.\n\t// In addition, LM-OTS is a single-use scheme, meaning that it\n\t// MUST NOT be used for more than one signature per LM-OTS key.\n\t// If you cannot maintain these invariants, you MUST NOT use these\n\t// schemes.\n\t//\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_LMS_SHA256 PublicKeyDetails = 14\n\t// Deprecated: Marked as deprecated in sigstore_common.proto.\n\tPublicKeyDetails_LMOTS_SHA256 PublicKeyDetails = 15\n\t// ML-DSA\n\t//\n\t// These ML_DSA_65 and ML-DSA_87 algorithms are the pure variants that\n\t// take data to sign rather than the prehash variants (HashML-DSA), which\n\t// take digests.  While considered quantum-resistant, their usage\n\t// involves tradeoffs in that signatures and keys are much larger, and\n\t// this makes deployments more costly.\n\t//\n\t// USER WARNING: ML_DSA_65 and ML_DSA_87 are experimental algorithms.\n\t// In the future they MAY be used by private Sigstore deployments, but\n\t// they are not yet fully functional.  This warning will be removed when\n\t// these algorithms are widely supported by Sigstore clients and servers,\n\t// but care should still be taken for production environments.\n\tPublicKeyDetails_ML_DSA_65 PublicKeyDetails = 21 // See NIST FIPS 204\n\tPublicKeyDetails_ML_DSA_87 PublicKeyDetails = 22\n)\n\n// Enum value maps for PublicKeyDetails.\nvar (\n\tPublicKeyDetails_name = map[int32]string{\n\t\t0:  \"PUBLIC_KEY_DETAILS_UNSPECIFIED\",\n\t\t1:  \"PKCS1_RSA_PKCS1V5\",\n\t\t2:  \"PKCS1_RSA_PSS\",\n\t\t3:  \"PKIX_RSA_PKCS1V5\",\n\t\t4:  \"PKIX_RSA_PSS\",\n\t\t9:  \"PKIX_RSA_PKCS1V15_2048_SHA256\",\n\t\t10: \"PKIX_RSA_PKCS1V15_3072_SHA256\",\n\t\t11: \"PKIX_RSA_PKCS1V15_4096_SHA256\",\n\t\t16: \"PKIX_RSA_PSS_2048_SHA256\",\n\t\t17: \"PKIX_RSA_PSS_3072_SHA256\",\n\t\t18: \"PKIX_RSA_PSS_4096_SHA256\",\n\t\t6:  \"PKIX_ECDSA_P256_HMAC_SHA_256\",\n\t\t5:  \"PKIX_ECDSA_P256_SHA_256\",\n\t\t12: \"PKIX_ECDSA_P384_SHA_384\",\n\t\t13: \"PKIX_ECDSA_P521_SHA_512\",\n\t\t7:  \"PKIX_ED25519\",\n\t\t8:  \"PKIX_ED25519_PH\",\n\t\t19: \"PKIX_ECDSA_P384_SHA_256\",\n\t\t20: \"PKIX_ECDSA_P521_SHA_256\",\n\t\t14: \"LMS_SHA256\",\n\t\t15: \"LMOTS_SHA256\",\n\t\t21: \"ML_DSA_65\",\n\t\t22: \"ML_DSA_87\",\n\t}\n\tPublicKeyDetails_value = map[string]int32{\n\t\t\"PUBLIC_KEY_DETAILS_UNSPECIFIED\": 0,\n\t\t\"PKCS1_RSA_PKCS1V5\":              1,\n\t\t\"PKCS1_RSA_PSS\":                  2,\n\t\t\"PKIX_RSA_PKCS1V5\":               3,\n\t\t\"PKIX_RSA_PSS\":                   4,\n\t\t\"PKIX_RSA_PKCS1V15_2048_SHA256\":  9,\n\t\t\"PKIX_RSA_PKCS1V15_3072_SHA256\":  10,\n\t\t\"PKIX_RSA_PKCS1V15_4096_SHA256\":  11,\n\t\t\"PKIX_RSA_PSS_2048_SHA256\":       16,\n\t\t\"PKIX_RSA_PSS_3072_SHA256\":       17,\n\t\t\"PKIX_RSA_PSS_4096_SHA256\":       18,\n\t\t\"PKIX_ECDSA_P256_HMAC_SHA_256\":   6,\n\t\t\"PKIX_ECDSA_P256_SHA_256\":        5,\n\t\t\"PKIX_ECDSA_P384_SHA_384\":        12,\n\t\t\"PKIX_ECDSA_P521_SHA_512\":        13,\n\t\t\"PKIX_ED25519\":                   7,\n\t\t\"PKIX_ED25519_PH\":                8,\n\t\t\"PKIX_ECDSA_P384_SHA_256\":        19,\n\t\t\"PKIX_ECDSA_P521_SHA_256\":        20,\n\t\t\"LMS_SHA256\":                     14,\n\t\t\"LMOTS_SHA256\":                   15,\n\t\t\"ML_DSA_65\":                      21,\n\t\t\"ML_DSA_87\":                      22,\n\t}\n)\n\nfunc (x PublicKeyDetails) Enum() *PublicKeyDetails {\n\tp := new(PublicKeyDetails)\n\t*p = x\n\treturn p\n}\n\nfunc (x PublicKeyDetails) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (PublicKeyDetails) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_sigstore_common_proto_enumTypes[1].Descriptor()\n}\n\nfunc (PublicKeyDetails) Type() protoreflect.EnumType {\n\treturn &file_sigstore_common_proto_enumTypes[1]\n}\n\nfunc (x PublicKeyDetails) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use PublicKeyDetails.Descriptor instead.\nfunc (PublicKeyDetails) EnumDescriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{1}\n}\n\ntype SubjectAlternativeNameType int32\n\nconst (\n\tSubjectAlternativeNameType_SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED SubjectAlternativeNameType = 0\n\tSubjectAlternativeNameType_EMAIL                                     SubjectAlternativeNameType = 1\n\tSubjectAlternativeNameType_URI                                       SubjectAlternativeNameType = 2\n\t// OID 1.3.6.1.4.1.57264.1.7\n\t// See https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md#1361415726417--othername-san\n\t// for more details.\n\tSubjectAlternativeNameType_OTHER_NAME SubjectAlternativeNameType = 3\n)\n\n// Enum value maps for SubjectAlternativeNameType.\nvar (\n\tSubjectAlternativeNameType_name = map[int32]string{\n\t\t0: \"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\",\n\t\t1: \"EMAIL\",\n\t\t2: \"URI\",\n\t\t3: \"OTHER_NAME\",\n\t}\n\tSubjectAlternativeNameType_value = map[string]int32{\n\t\t\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\": 0,\n\t\t\"EMAIL\":      1,\n\t\t\"URI\":        2,\n\t\t\"OTHER_NAME\": 3,\n\t}\n)\n\nfunc (x SubjectAlternativeNameType) Enum() *SubjectAlternativeNameType {\n\tp := new(SubjectAlternativeNameType)\n\t*p = x\n\treturn p\n}\n\nfunc (x SubjectAlternativeNameType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (SubjectAlternativeNameType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_sigstore_common_proto_enumTypes[2].Descriptor()\n}\n\nfunc (SubjectAlternativeNameType) Type() protoreflect.EnumType {\n\treturn &file_sigstore_common_proto_enumTypes[2]\n}\n\nfunc (x SubjectAlternativeNameType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use SubjectAlternativeNameType.Descriptor instead.\nfunc (SubjectAlternativeNameType) EnumDescriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{2}\n}\n\n// HashOutput captures a digest of a 'message' (generic octet sequence)\n// and the corresponding hash algorithm used.\ntype HashOutput struct {\n\tstate     protoimpl.MessageState `protogen:\"open.v1\"`\n\tAlgorithm HashAlgorithm          `protobuf:\"varint,1,opt,name=algorithm,proto3,enum=dev.sigstore.common.v1.HashAlgorithm\" json:\"algorithm,omitempty\"`\n\t// This is the raw octets of the message digest as computed by\n\t// the hash algorithm.\n\tDigest        []byte `protobuf:\"bytes,2,opt,name=digest,proto3\" json:\"digest,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *HashOutput) Reset() {\n\t*x = HashOutput{}\n\tmi := &file_sigstore_common_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *HashOutput) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*HashOutput) ProtoMessage() {}\n\nfunc (x *HashOutput) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use HashOutput.ProtoReflect.Descriptor instead.\nfunc (*HashOutput) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *HashOutput) GetAlgorithm() HashAlgorithm {\n\tif x != nil {\n\t\treturn x.Algorithm\n\t}\n\treturn HashAlgorithm_HASH_ALGORITHM_UNSPECIFIED\n}\n\nfunc (x *HashOutput) GetDigest() []byte {\n\tif x != nil {\n\t\treturn x.Digest\n\t}\n\treturn nil\n}\n\n// MessageSignature stores the computed signature over a message.\ntype MessageSignature struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Message digest can be used to identify the artifact.\n\t// Clients MUST NOT attempt to use this digest to verify the associated\n\t// signature; it is intended solely for identification.\n\tMessageDigest *HashOutput `protobuf:\"bytes,1,opt,name=message_digest,json=messageDigest,proto3\" json:\"message_digest,omitempty\"`\n\t// The raw bytes as returned from the signature algorithm.\n\t// The signature algorithm (and so the format of the signature bytes)\n\t// are determined by the contents of the 'verification_material',\n\t// either a key-pair or a certificate. If using a certificate, the\n\t// certificate contains the required information on the signature\n\t// algorithm.\n\t// When using a key pair, the algorithm MUST be part of the public\n\t// key, which MUST be communicated out-of-band.\n\tSignature     []byte `protobuf:\"bytes,2,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *MessageSignature) Reset() {\n\t*x = MessageSignature{}\n\tmi := &file_sigstore_common_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MessageSignature) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MessageSignature) ProtoMessage() {}\n\nfunc (x *MessageSignature) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MessageSignature.ProtoReflect.Descriptor instead.\nfunc (*MessageSignature) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *MessageSignature) GetMessageDigest() *HashOutput {\n\tif x != nil {\n\t\treturn x.MessageDigest\n\t}\n\treturn nil\n}\n\nfunc (x *MessageSignature) GetSignature() []byte {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn nil\n}\n\n// LogId captures the identity of a transparency log.\ntype LogId struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The unique identity of the log, represented by its public key.\n\tKeyId         []byte `protobuf:\"bytes,1,opt,name=key_id,json=keyId,proto3\" json:\"key_id,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *LogId) Reset() {\n\t*x = LogId{}\n\tmi := &file_sigstore_common_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *LogId) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*LogId) ProtoMessage() {}\n\nfunc (x *LogId) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use LogId.ProtoReflect.Descriptor instead.\nfunc (*LogId) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *LogId) GetKeyId() []byte {\n\tif x != nil {\n\t\treturn x.KeyId\n\t}\n\treturn nil\n}\n\n// This message holds a RFC 3161 timestamp.\ntype RFC3161SignedTimestamp struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Signed timestamp is the DER encoded TimeStampResponse.\n\t// See https://www.rfc-editor.org/rfc/rfc3161.html#section-2.4.2\n\tSignedTimestamp []byte `protobuf:\"bytes,1,opt,name=signed_timestamp,json=signedTimestamp,proto3\" json:\"signed_timestamp,omitempty\"`\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *RFC3161SignedTimestamp) Reset() {\n\t*x = RFC3161SignedTimestamp{}\n\tmi := &file_sigstore_common_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *RFC3161SignedTimestamp) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RFC3161SignedTimestamp) ProtoMessage() {}\n\nfunc (x *RFC3161SignedTimestamp) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RFC3161SignedTimestamp.ProtoReflect.Descriptor instead.\nfunc (*RFC3161SignedTimestamp) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *RFC3161SignedTimestamp) GetSignedTimestamp() []byte {\n\tif x != nil {\n\t\treturn x.SignedTimestamp\n\t}\n\treturn nil\n}\n\ntype PublicKey struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// DER-encoded public key, encoding method is specified by the\n\t// key_details attribute.\n\tRawBytes []byte `protobuf:\"bytes,1,opt,name=raw_bytes,json=rawBytes,proto3,oneof\" json:\"raw_bytes,omitempty\"`\n\t// Key encoding and signature algorithm to use for this key.\n\tKeyDetails PublicKeyDetails `protobuf:\"varint,2,opt,name=key_details,json=keyDetails,proto3,enum=dev.sigstore.common.v1.PublicKeyDetails\" json:\"key_details,omitempty\"`\n\t// Optional validity period for this key, *inclusive* of the endpoints.\n\tValidFor      *TimeRange `protobuf:\"bytes,3,opt,name=valid_for,json=validFor,proto3,oneof\" json:\"valid_for,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PublicKey) Reset() {\n\t*x = PublicKey{}\n\tmi := &file_sigstore_common_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PublicKey) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PublicKey) ProtoMessage() {}\n\nfunc (x *PublicKey) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.\nfunc (*PublicKey) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *PublicKey) GetRawBytes() []byte {\n\tif x != nil {\n\t\treturn x.RawBytes\n\t}\n\treturn nil\n}\n\nfunc (x *PublicKey) GetKeyDetails() PublicKeyDetails {\n\tif x != nil {\n\t\treturn x.KeyDetails\n\t}\n\treturn PublicKeyDetails_PUBLIC_KEY_DETAILS_UNSPECIFIED\n}\n\nfunc (x *PublicKey) GetValidFor() *TimeRange {\n\tif x != nil {\n\t\treturn x.ValidFor\n\t}\n\treturn nil\n}\n\n// PublicKeyIdentifier can be used to identify an (out of band) delivered\n// key, to verify a signature.\ntype PublicKeyIdentifier struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Optional unauthenticated hint on which key to use.\n\t// The format of the hint must be agreed upon out of band by the\n\t// signer and the verifiers, and so is not subject to this\n\t// specification.\n\t// Example use-case is to specify the public key to use, from a\n\t// trusted key-ring.\n\t// Implementors are RECOMMENDED to derive the value from the public\n\t// key as described in RFC 6962.\n\t// See: <https://www.rfc-editor.org/rfc/rfc6962#section-3.2>\n\tHint          string `protobuf:\"bytes,1,opt,name=hint,proto3\" json:\"hint,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PublicKeyIdentifier) Reset() {\n\t*x = PublicKeyIdentifier{}\n\tmi := &file_sigstore_common_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PublicKeyIdentifier) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PublicKeyIdentifier) ProtoMessage() {}\n\nfunc (x *PublicKeyIdentifier) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PublicKeyIdentifier.ProtoReflect.Descriptor instead.\nfunc (*PublicKeyIdentifier) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *PublicKeyIdentifier) GetHint() string {\n\tif x != nil {\n\t\treturn x.Hint\n\t}\n\treturn \"\"\n}\n\n// An ASN.1 OBJECT IDENTIFIER\ntype ObjectIdentifier struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tId            []int32                `protobuf:\"varint,1,rep,packed,name=id,proto3\" json:\"id,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ObjectIdentifier) Reset() {\n\t*x = ObjectIdentifier{}\n\tmi := &file_sigstore_common_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ObjectIdentifier) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ObjectIdentifier) ProtoMessage() {}\n\nfunc (x *ObjectIdentifier) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ObjectIdentifier.ProtoReflect.Descriptor instead.\nfunc (*ObjectIdentifier) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ObjectIdentifier) GetId() []int32 {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn nil\n}\n\n// An OID and the corresponding (byte) value.\ntype ObjectIdentifierValuePair struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tOid           *ObjectIdentifier      `protobuf:\"bytes,1,opt,name=oid,proto3\" json:\"oid,omitempty\"`\n\tValue         []byte                 `protobuf:\"bytes,2,opt,name=value,proto3\" json:\"value,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ObjectIdentifierValuePair) Reset() {\n\t*x = ObjectIdentifierValuePair{}\n\tmi := &file_sigstore_common_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ObjectIdentifierValuePair) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ObjectIdentifierValuePair) ProtoMessage() {}\n\nfunc (x *ObjectIdentifierValuePair) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ObjectIdentifierValuePair.ProtoReflect.Descriptor instead.\nfunc (*ObjectIdentifierValuePair) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *ObjectIdentifierValuePair) GetOid() *ObjectIdentifier {\n\tif x != nil {\n\t\treturn x.Oid\n\t}\n\treturn nil\n}\n\nfunc (x *ObjectIdentifierValuePair) GetValue() []byte {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn nil\n}\n\ntype DistinguishedName struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tOrganization  string                 `protobuf:\"bytes,1,opt,name=organization,proto3\" json:\"organization,omitempty\"`\n\tCommonName    string                 `protobuf:\"bytes,2,opt,name=common_name,json=commonName,proto3\" json:\"common_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *DistinguishedName) Reset() {\n\t*x = DistinguishedName{}\n\tmi := &file_sigstore_common_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DistinguishedName) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DistinguishedName) ProtoMessage() {}\n\nfunc (x *DistinguishedName) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DistinguishedName.ProtoReflect.Descriptor instead.\nfunc (*DistinguishedName) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *DistinguishedName) GetOrganization() string {\n\tif x != nil {\n\t\treturn x.Organization\n\t}\n\treturn \"\"\n}\n\nfunc (x *DistinguishedName) GetCommonName() string {\n\tif x != nil {\n\t\treturn x.CommonName\n\t}\n\treturn \"\"\n}\n\ntype X509Certificate struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// DER-encoded X.509 certificate.\n\tRawBytes      []byte `protobuf:\"bytes,1,opt,name=raw_bytes,json=rawBytes,proto3\" json:\"raw_bytes,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *X509Certificate) Reset() {\n\t*x = X509Certificate{}\n\tmi := &file_sigstore_common_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *X509Certificate) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*X509Certificate) ProtoMessage() {}\n\nfunc (x *X509Certificate) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use X509Certificate.ProtoReflect.Descriptor instead.\nfunc (*X509Certificate) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *X509Certificate) GetRawBytes() []byte {\n\tif x != nil {\n\t\treturn x.RawBytes\n\t}\n\treturn nil\n}\n\ntype SubjectAlternativeName struct {\n\tstate protoimpl.MessageState     `protogen:\"open.v1\"`\n\tType  SubjectAlternativeNameType `protobuf:\"varint,1,opt,name=type,proto3,enum=dev.sigstore.common.v1.SubjectAlternativeNameType\" json:\"type,omitempty\"`\n\t// Types that are valid to be assigned to Identity:\n\t//\n\t//\t*SubjectAlternativeName_Regexp\n\t//\t*SubjectAlternativeName_Value\n\tIdentity      isSubjectAlternativeName_Identity `protobuf_oneof:\"identity\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SubjectAlternativeName) Reset() {\n\t*x = SubjectAlternativeName{}\n\tmi := &file_sigstore_common_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SubjectAlternativeName) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SubjectAlternativeName) ProtoMessage() {}\n\nfunc (x *SubjectAlternativeName) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SubjectAlternativeName.ProtoReflect.Descriptor instead.\nfunc (*SubjectAlternativeName) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *SubjectAlternativeName) GetType() SubjectAlternativeNameType {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn SubjectAlternativeNameType_SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\n}\n\nfunc (x *SubjectAlternativeName) GetIdentity() isSubjectAlternativeName_Identity {\n\tif x != nil {\n\t\treturn x.Identity\n\t}\n\treturn nil\n}\n\nfunc (x *SubjectAlternativeName) GetRegexp() string {\n\tif x != nil {\n\t\tif x, ok := x.Identity.(*SubjectAlternativeName_Regexp); ok {\n\t\t\treturn x.Regexp\n\t\t}\n\t}\n\treturn \"\"\n}\n\nfunc (x *SubjectAlternativeName) GetValue() string {\n\tif x != nil {\n\t\tif x, ok := x.Identity.(*SubjectAlternativeName_Value); ok {\n\t\t\treturn x.Value\n\t\t}\n\t}\n\treturn \"\"\n}\n\ntype isSubjectAlternativeName_Identity interface {\n\tisSubjectAlternativeName_Identity()\n}\n\ntype SubjectAlternativeName_Regexp struct {\n\t// A regular expression describing the expected value for\n\t// the SAN.\n\tRegexp string `protobuf:\"bytes,2,opt,name=regexp,proto3,oneof\"`\n}\n\ntype SubjectAlternativeName_Value struct {\n\t// The exact value to match against.\n\tValue string `protobuf:\"bytes,3,opt,name=value,proto3,oneof\"`\n}\n\nfunc (*SubjectAlternativeName_Regexp) isSubjectAlternativeName_Identity() {}\n\nfunc (*SubjectAlternativeName_Value) isSubjectAlternativeName_Identity() {}\n\n// A collection of X.509 certificates.\n//\n// This \"chain\" can be used in multiple contexts, such as providing a root CA\n// certificate within a TUF root of trust or multiple untrusted certificates for\n// the purpose of chain building.\ntype X509CertificateChain struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// One or more DER-encoded certificates.\n\t//\n\t// In some contexts (such as `VerificationMaterial.x509_certificate_chain`), this sequence\n\t// has an imposed order. Unless explicitly specified, there is otherwise no\n\t// guaranteed order.\n\tCertificates  []*X509Certificate `protobuf:\"bytes,1,rep,name=certificates,proto3\" json:\"certificates,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *X509CertificateChain) Reset() {\n\t*x = X509CertificateChain{}\n\tmi := &file_sigstore_common_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *X509CertificateChain) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*X509CertificateChain) ProtoMessage() {}\n\nfunc (x *X509CertificateChain) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use X509CertificateChain.ProtoReflect.Descriptor instead.\nfunc (*X509CertificateChain) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *X509CertificateChain) GetCertificates() []*X509Certificate {\n\tif x != nil {\n\t\treturn x.Certificates\n\t}\n\treturn nil\n}\n\n// The time range is closed and includes both the start and end times,\n// (i.e., [start, end]).\n// End is optional to be able to capture a period that has started but\n// has no known end.\ntype TimeRange struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tStart         *timestamppb.Timestamp `protobuf:\"bytes,1,opt,name=start,proto3\" json:\"start,omitempty\"`\n\tEnd           *timestamppb.Timestamp `protobuf:\"bytes,2,opt,name=end,proto3,oneof\" json:\"end,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *TimeRange) Reset() {\n\t*x = TimeRange{}\n\tmi := &file_sigstore_common_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *TimeRange) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*TimeRange) ProtoMessage() {}\n\nfunc (x *TimeRange) ProtoReflect() protoreflect.Message {\n\tmi := &file_sigstore_common_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use TimeRange.ProtoReflect.Descriptor instead.\nfunc (*TimeRange) Descriptor() ([]byte, []int) {\n\treturn file_sigstore_common_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *TimeRange) GetStart() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.Start\n\t}\n\treturn nil\n}\n\nfunc (x *TimeRange) GetEnd() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.End\n\t}\n\treturn nil\n}\n\nvar File_sigstore_common_proto protoreflect.FileDescriptor\n\nvar file_sigstore_common_proto_rawDesc = string([]byte{\n\t0x0a, 0x15, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n\t0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x69, 0x67,\n\t0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a,\n\t0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c,\n\t0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,\n\t0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x22, 0x69, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12,\n\t0x43, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x0e, 0x32, 0x25, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72,\n\t0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68,\n\t0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72,\n\t0x69, 0x74, 0x68, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a,\n\t0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,\n\t0x65, 0x12, 0x49, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x69, 0x67,\n\t0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x65, 0x76, 0x2e,\n\t0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,\n\t0x76, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x0d, 0x6d,\n\t0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09,\n\t0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42,\n\t0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22,\n\t0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f,\n\t0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x6b,\n\t0x65, 0x79, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x46, 0x43, 0x33, 0x31, 0x36, 0x31, 0x53,\n\t0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e,\n\t0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,\n\t0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x73,\n\t0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xd9,\n\t0x01, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x09,\n\t0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48,\n\t0x00, 0x52, 0x08, 0x72, 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x49,\n\t0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f,\n\t0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62,\n\t0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0a, 0x6b,\n\t0x65, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x76, 0x61, 0x6c,\n\t0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64,\n\t0x65, 0x76, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,\n\t0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48,\n\t0x01, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x0c,\n\t0x0a, 0x0a, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a,\n\t0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x22, 0x29, 0x0a, 0x13, 0x50, 0x75,\n\t0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,\n\t0x72, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x04, 0x68, 0x69, 0x6e, 0x74, 0x22, 0x27, 0x0a, 0x10, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49,\n\t0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18,\n\t0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6d,\n\t0x0a, 0x19, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,\n\t0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x3a, 0x0a, 0x03, 0x6f,\n\t0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73,\n\t0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,\n\t0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,\n\t0x65, 0x72, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x58, 0x0a,\n\t0x11, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61,\n\t0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,\n\t0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,\n\t0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d,\n\t0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x0f, 0x58, 0x35, 0x30, 0x39, 0x43,\n\t0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x61,\n\t0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0,\n\t0x41, 0x02, 0x52, 0x08, 0x72, 0x61, 0x77, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a,\n\t0x16, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,\n\t0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x69, 0x67, 0x73,\n\t0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53,\n\t0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76,\n\t0x65, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,\n\t0x18, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48,\n\t0x00, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c,\n\t0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,\n\t0x65, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x63, 0x0a,\n\t0x14, 0x58, 0x35, 0x30, 0x39, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,\n\t0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65,\n\t0x76, 0x2e, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n\t0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x35, 0x30, 0x39, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,\n\t0x63, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,\n\t0x65, 0x73, 0x22, 0x78, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12,\n\t0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,\n\t0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72,\n\t0x74, 0x12, 0x31, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,\n\t0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x03, 0x65, 0x6e,\n\t0x64, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x65, 0x6e, 0x64, 0x2a, 0x75, 0x0a, 0x0d,\n\t0x48, 0x61, 0x73, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1e, 0x0a,\n\t0x1a, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f,\n\t0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,\n\t0x08, 0x53, 0x48, 0x41, 0x32, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53,\n\t0x48, 0x41, 0x32, 0x5f, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x41,\n\t0x32, 0x5f, 0x35, 0x31, 0x32, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x41, 0x33, 0x5f,\n\t0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x41, 0x33, 0x5f, 0x33, 0x38,\n\t0x34, 0x10, 0x05, 0x2a, 0x8f, 0x05, 0x0a, 0x10, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,\n\t0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x55, 0x42, 0x4c,\n\t0x49, 0x43, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, 0x55,\n\t0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x11,\n\t0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x56,\n\t0x35, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x15, 0x0a, 0x0d, 0x50, 0x4b, 0x43, 0x53, 0x31,\n\t0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x18,\n\t0x0a, 0x10, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31,\n\t0x56, 0x35, 0x10, 0x03, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x14, 0x0a, 0x0c, 0x50, 0x4b, 0x49, 0x58,\n\t0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x10, 0x04, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x21,\n\t0x0a, 0x1d, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31,\n\t0x56, 0x31, 0x35, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10,\n\t0x09, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b,\n\t0x43, 0x53, 0x31, 0x56, 0x31, 0x35, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32,\n\t0x35, 0x36, 0x10, 0x0a, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53, 0x41,\n\t0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x56, 0x31, 0x35, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53,\n\t0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0b, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4b, 0x49, 0x58, 0x5f,\n\t0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41,\n\t0x32, 0x35, 0x36, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53,\n\t0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35,\n\t0x36, 0x10, 0x11, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x52, 0x53, 0x41, 0x5f,\n\t0x50, 0x53, 0x53, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10,\n\t0x12, 0x12, 0x24, 0x0a, 0x1c, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f,\n\t0x50, 0x32, 0x35, 0x36, 0x5f, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x32, 0x35,\n\t0x36, 0x10, 0x06, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4b, 0x49, 0x58, 0x5f,\n\t0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x32,\n\t0x35, 0x36, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x43, 0x44,\n\t0x53, 0x41, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x33, 0x38, 0x34, 0x10,\n\t0x0c, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f,\n\t0x50, 0x35, 0x32, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x35, 0x31, 0x32, 0x10, 0x0d, 0x12, 0x10,\n\t0x0a, 0x0c, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x07,\n\t0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39,\n\t0x5f, 0x50, 0x48, 0x10, 0x08, 0x12, 0x1f, 0x0a, 0x17, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45, 0x43,\n\t0x44, 0x53, 0x41, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x32, 0x35, 0x36,\n\t0x10, 0x13, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1f, 0x0a, 0x17, 0x50, 0x4b, 0x49, 0x58, 0x5f, 0x45,\n\t0x43, 0x44, 0x53, 0x41, 0x5f, 0x50, 0x35, 0x32, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x5f, 0x32, 0x35,\n\t0x36, 0x10, 0x14, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x12, 0x0a, 0x0a, 0x4c, 0x4d, 0x53, 0x5f, 0x53,\n\t0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0e, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x14, 0x0a, 0x0c, 0x4c,\n\t0x4d, 0x4f, 0x54, 0x53, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0f, 0x1a, 0x02, 0x08,\n\t0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x4c, 0x5f, 0x44, 0x53, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x15,\n\t0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x4c, 0x5f, 0x44, 0x53, 0x41, 0x5f, 0x38, 0x37, 0x10, 0x16, 0x22,\n\t0x04, 0x08, 0x17, 0x10, 0x32, 0x2a, 0x6f, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,\n\t0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x54,\n\t0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41,\n\t0x4c, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f,\n\t0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,\n\t0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a,\n\t0x03, 0x55, 0x52, 0x49, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f,\n\t0x4e, 0x41, 0x4d, 0x45, 0x10, 0x03, 0x42, 0x7c, 0x0a, 0x1c, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x69,\n\t0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,\n\t0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72,\n\t0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,\n\t0x6d, 0x2f, 0x73, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x62, 0x75, 0x66, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62,\n\t0x2d, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x14,\n\t0x53, 0x69, 0x67, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,\n\t0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n})\n\nvar (\n\tfile_sigstore_common_proto_rawDescOnce sync.Once\n\tfile_sigstore_common_proto_rawDescData []byte\n)\n\nfunc file_sigstore_common_proto_rawDescGZIP() []byte {\n\tfile_sigstore_common_proto_rawDescOnce.Do(func() {\n\t\tfile_sigstore_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sigstore_common_proto_rawDesc), len(file_sigstore_common_proto_rawDesc)))\n\t})\n\treturn file_sigstore_common_proto_rawDescData\n}\n\nvar file_sigstore_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)\nvar file_sigstore_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13)\nvar file_sigstore_common_proto_goTypes = []any{\n\t(HashAlgorithm)(0),                // 0: dev.sigstore.common.v1.HashAlgorithm\n\t(PublicKeyDetails)(0),             // 1: dev.sigstore.common.v1.PublicKeyDetails\n\t(SubjectAlternativeNameType)(0),   // 2: dev.sigstore.common.v1.SubjectAlternativeNameType\n\t(*HashOutput)(nil),                // 3: dev.sigstore.common.v1.HashOutput\n\t(*MessageSignature)(nil),          // 4: dev.sigstore.common.v1.MessageSignature\n\t(*LogId)(nil),                     // 5: dev.sigstore.common.v1.LogId\n\t(*RFC3161SignedTimestamp)(nil),    // 6: dev.sigstore.common.v1.RFC3161SignedTimestamp\n\t(*PublicKey)(nil),                 // 7: dev.sigstore.common.v1.PublicKey\n\t(*PublicKeyIdentifier)(nil),       // 8: dev.sigstore.common.v1.PublicKeyIdentifier\n\t(*ObjectIdentifier)(nil),          // 9: dev.sigstore.common.v1.ObjectIdentifier\n\t(*ObjectIdentifierValuePair)(nil), // 10: dev.sigstore.common.v1.ObjectIdentifierValuePair\n\t(*DistinguishedName)(nil),         // 11: dev.sigstore.common.v1.DistinguishedName\n\t(*X509Certificate)(nil),           // 12: dev.sigstore.common.v1.X509Certificate\n\t(*SubjectAlternativeName)(nil),    // 13: dev.sigstore.common.v1.SubjectAlternativeName\n\t(*X509CertificateChain)(nil),      // 14: dev.sigstore.common.v1.X509CertificateChain\n\t(*TimeRange)(nil),                 // 15: dev.sigstore.common.v1.TimeRange\n\t(*timestamppb.Timestamp)(nil),     // 16: google.protobuf.Timestamp\n}\nvar file_sigstore_common_proto_depIdxs = []int32{\n\t0,  // 0: dev.sigstore.common.v1.HashOutput.algorithm:type_name -> dev.sigstore.common.v1.HashAlgorithm\n\t3,  // 1: dev.sigstore.common.v1.MessageSignature.message_digest:type_name -> dev.sigstore.common.v1.HashOutput\n\t1,  // 2: dev.sigstore.common.v1.PublicKey.key_details:type_name -> dev.sigstore.common.v1.PublicKeyDetails\n\t15, // 3: dev.sigstore.common.v1.PublicKey.valid_for:type_name -> dev.sigstore.common.v1.TimeRange\n\t9,  // 4: dev.sigstore.common.v1.ObjectIdentifierValuePair.oid:type_name -> dev.sigstore.common.v1.ObjectIdentifier\n\t2,  // 5: dev.sigstore.common.v1.SubjectAlternativeName.type:type_name -> dev.sigstore.common.v1.SubjectAlternativeNameType\n\t12, // 6: dev.sigstore.common.v1.X509CertificateChain.certificates:type_name -> dev.sigstore.common.v1.X509Certificate\n\t16, // 7: dev.sigstore.common.v1.TimeRange.start:type_name -> google.protobuf.Timestamp\n\t16, // 8: dev.sigstore.common.v1.TimeRange.end:type_name -> google.protobuf.Timestamp\n\t9,  // [9:9] is the sub-list for method output_type\n\t9,  // [9:9] is the sub-list for method input_type\n\t9,  // [9:9] is the sub-list for extension type_name\n\t9,  // [9:9] is the sub-list for extension extendee\n\t0,  // [0:9] is the sub-list for field type_name\n}\n\nfunc init() { file_sigstore_common_proto_init() }\nfunc file_sigstore_common_proto_init() {\n\tif File_sigstore_common_proto != nil {\n\t\treturn\n\t}\n\tfile_sigstore_common_proto_msgTypes[4].OneofWrappers = []any{}\n\tfile_sigstore_common_proto_msgTypes[10].OneofWrappers = []any{\n\t\t(*SubjectAlternativeName_Regexp)(nil),\n\t\t(*SubjectAlternativeName_Value)(nil),\n\t}\n\tfile_sigstore_common_proto_msgTypes[12].OneofWrappers = []any{}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_sigstore_common_proto_rawDesc), len(file_sigstore_common_proto_rawDesc)),\n\t\t\tNumEnums:      3,\n\t\t\tNumMessages:   13,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_sigstore_common_proto_goTypes,\n\t\tDependencyIndexes: file_sigstore_common_proto_depIdxs,\n\t\tEnumInfos:         file_sigstore_common_proto_enumTypes,\n\t\tMessageInfos:      file_sigstore_common_proto_msgTypes,\n\t}.Build()\n\tFile_sigstore_common_proto = out.File\n\tfile_sigstore_common_proto_goTypes = nil\n\tfile_sigstore_common_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/COPYRIGHT.txt",
    "content": "\nCopyright 2021 The Sigstore Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/LICENSE",
    "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 [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": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package cryptoutils implements support for working with encoded certificates, public keys, and private keys\npackage cryptoutils\n\nimport (\n\t\"bytes\"\n\t\"crypto/rand\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n\t\"time\"\n)\n\nconst (\n\t// CertificatePEMType is the string \"CERTIFICATE\" to be used during PEM encoding and decoding\n\tCertificatePEMType PEMType = \"CERTIFICATE\"\n)\n\n// MarshalCertificateToPEM converts the provided X509 certificate into PEM format\nfunc MarshalCertificateToPEM(cert *x509.Certificate) ([]byte, error) {\n\tif cert == nil {\n\t\treturn nil, errors.New(\"nil certificate provided\")\n\t}\n\treturn PEMEncode(CertificatePEMType, cert.Raw), nil\n}\n\n// MarshalCertificatesToPEM converts the provided X509 certificates into PEM format\nfunc MarshalCertificatesToPEM(certs []*x509.Certificate) ([]byte, error) {\n\tbuf := bytes.Buffer{}\n\tfor _, cert := range certs {\n\t\tpemBytes, err := MarshalCertificateToPEM(cert)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t_, _ = buf.Write(pemBytes)\n\t}\n\treturn buf.Bytes(), nil\n}\n\n// UnmarshalCertificatesFromPEM extracts one or more X509 certificates from the provided\n// byte slice, which is assumed to be in PEM-encoded format.\nfunc UnmarshalCertificatesFromPEM(pemBytes []byte) ([]*x509.Certificate, error) {\n\tresult := []*x509.Certificate{}\n\tremaining := pemBytes\n\tremaining = bytes.TrimSpace(remaining)\n\n\tfor len(remaining) > 0 {\n\t\tvar certDer *pem.Block\n\t\tcertDer, remaining = pem.Decode(remaining)\n\n\t\tif certDer == nil {\n\t\t\treturn nil, errors.New(\"error during PEM decoding\")\n\t\t}\n\n\t\tcert, err := x509.ParseCertificate(certDer.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult = append(result, cert)\n\t}\n\treturn result, nil\n}\n\n// UnmarshalCertificatesFromPEMLimited extracts one or more X509 certificates from the provided\n// byte slice, which is assumed to be in PEM-encoded format. Fails after a specified\n// number of iterations. A reasonable limit is 10 iterations.\nfunc UnmarshalCertificatesFromPEMLimited(pemBytes []byte, iterations int) ([]*x509.Certificate, error) {\n\tresult := []*x509.Certificate{}\n\tremaining := pemBytes\n\tremaining = bytes.TrimSpace(remaining)\n\n\tcount := 0\n\tfor len(remaining) > 0 {\n\t\tif count == iterations {\n\t\t\treturn nil, errors.New(\"too many certificates specified in PEM block\")\n\t\t}\n\t\tvar certDer *pem.Block\n\t\tcertDer, remaining = pem.Decode(remaining)\n\n\t\tif certDer == nil {\n\t\t\treturn nil, errors.New(\"error during PEM decoding\")\n\t\t}\n\n\t\tcert, err := x509.ParseCertificate(certDer.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult = append(result, cert)\n\t\tcount++\n\t}\n\treturn result, nil\n}\n\n// LoadCertificatesFromPEM extracts one or more X509 certificates from the provided\n// io.Reader.\nfunc LoadCertificatesFromPEM(pem io.Reader) ([]*x509.Certificate, error) {\n\tfileBytes, err := io.ReadAll(pem)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn UnmarshalCertificatesFromPEM(fileBytes)\n}\n\nfunc formatTime(t time.Time) string {\n\treturn t.UTC().Format(time.RFC3339)\n}\n\n// CheckExpiration verifies that epoch is during the validity period of\n// the certificate provided.\n//\n// It returns nil if issueTime < epoch < expirationTime, and error otherwise.\nfunc CheckExpiration(cert *x509.Certificate, epoch time.Time) error {\n\tif cert == nil {\n\t\treturn errors.New(\"certificate is nil\")\n\t}\n\tif cert.NotAfter.Before(epoch) {\n\t\treturn fmt.Errorf(\"certificate expiration time %s is before %s\", formatTime(cert.NotAfter), formatTime(epoch))\n\t}\n\tif cert.NotBefore.After(epoch) {\n\t\treturn fmt.Errorf(\"certificate issued time %s is before %s\", formatTime(cert.NotBefore), formatTime(epoch))\n\t}\n\treturn nil\n}\n\n// ParseCSR parses a PKCS#10 PEM-encoded CSR.\nfunc ParseCSR(csr []byte) (*x509.CertificateRequest, error) {\n\tderBlock, _ := pem.Decode(csr)\n\tif derBlock == nil || derBlock.Bytes == nil {\n\t\treturn nil, errors.New(\"no CSR found while decoding\")\n\t}\n\tcorrectType := false\n\tacceptedHeaders := []string{\"CERTIFICATE REQUEST\", \"NEW CERTIFICATE REQUEST\"}\n\tfor _, v := range acceptedHeaders {\n\t\tif derBlock.Type == v {\n\t\t\tcorrectType = true\n\t\t}\n\t}\n\tif !correctType {\n\t\treturn nil, fmt.Errorf(\"DER type %v is not of any type %v for CSR\", derBlock.Type, acceptedHeaders)\n\t}\n\n\treturn x509.ParseCertificateRequest(derBlock.Bytes)\n}\n\n// GenerateSerialNumber creates a compliant serial number as per RFC 5280 4.1.2.2.\n// Serial numbers must be positive, and can be no longer than 20 bytes.\n// The serial number is generated with 159 bits, so that the first bit will always\n// be 0, resulting in a positive serial number.\nfunc GenerateSerialNumber() (*big.Int, error) {\n\t// Pick a random number from 0 to 2^159.\n\tserial, err := rand.Int(rand.Reader, (&big.Int{}).Exp(big.NewInt(2), big.NewInt(159), nil))\n\tif err != nil {\n\t\treturn nil, errors.New(\"error generating serial number\")\n\t}\n\treturn serial, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/doc.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package cryptoutils contains utilities related to handling cryptographic materials.\npackage cryptoutils\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/generic.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"encoding/pem\"\n)\n\n// PEMType is a specific type for string constants used during PEM encoding and decoding\ntype PEMType string\n\n// PEMEncode encodes the specified byte slice in PEM format using the provided type string\nfunc PEMEncode(typeStr PEMType, bytes []byte) []byte {\n\treturn pem.EncodeToMemory(&pem.Block{\n\t\tType:  string(typeStr),\n\t\tBytes: bytes,\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/password.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"golang.org/x/term\"\n)\n\n// PassFunc is a type of function that takes a boolean (representing whether confirmation is desired) and returns the password as read, along with an error if one occurred\ntype PassFunc func(bool) ([]byte, error)\n\n// Read is for fuzzing\nvar Read = readPasswordFn\n\n// readPasswordFn reads the password from the following sources, in order of preference:\n//\n// - COSIGN_PASSWORD environment variable\n//\n// - user input from from terminal (if present)\n//\n// - provided to stdin from pipe\nfunc readPasswordFn() func() ([]byte, error) {\n\tif pw, ok := os.LookupEnv(\"COSIGN_PASSWORD\"); ok {\n\t\treturn func() ([]byte, error) {\n\t\t\treturn []byte(pw), nil\n\t\t}\n\t}\n\tif term.IsTerminal(0) {\n\t\treturn func() ([]byte, error) {\n\t\t\treturn term.ReadPassword(0)\n\t\t}\n\t}\n\t// Handle piped in passwords.\n\treturn func() ([]byte, error) {\n\t\treturn io.ReadAll(os.Stdin)\n\t}\n}\n\n// StaticPasswordFunc returns a PassFunc which returns the provided password.\nfunc StaticPasswordFunc(pw []byte) PassFunc {\n\treturn func(bool) ([]byte, error) {\n\t\treturn pw, nil\n\t}\n}\n\n// SkipPassword is a PassFunc that does not interact with a user, but\n// simply returns nil for both the password result and error struct.\nfunc SkipPassword(_ bool) ([]byte, error) {\n\treturn nil, nil\n}\n\n// GetPasswordFromStdIn gathers the password from stdin with an\n// optional confirmation step.\nfunc GetPasswordFromStdIn(confirm bool) ([]byte, error) {\n\tread := Read()\n\tfmt.Fprint(os.Stderr, \"Enter password for private key: \")\n\tpw1, err := read()\n\tfmt.Fprintln(os.Stderr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !confirm {\n\t\treturn pw1, nil\n\t}\n\tfmt.Fprint(os.Stderr, \"Enter again: \")\n\tpw2, err := read()\n\tfmt.Fprintln(os.Stderr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif string(pw1) != string(pw2) {\n\t\treturn nil, errors.New(\"passwords do not match\")\n\t}\n\treturn pw1, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/privatekey.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/secure-systems-lab/go-securesystemslib/encrypted\"\n)\n\nconst (\n\t// PrivateKeyPEMType is the string \"PRIVATE KEY\" to be used during PEM encoding and decoding\n\tPrivateKeyPEMType PEMType = \"PRIVATE KEY\"\n\t// ECPrivateKeyPEMType is the string \"EC PRIVATE KEY\" used to parse SEC 1 EC private keys\n\tECPrivateKeyPEMType PEMType = \"EC PRIVATE KEY\"\n\t// PKCS1PrivateKeyPEMType is the string \"RSA PRIVATE KEY\" used to parse PKCS#1-encoded private keys\n\tPKCS1PrivateKeyPEMType           PEMType = \"RSA PRIVATE KEY\"\n\tencryptedCosignPrivateKeyPEMType PEMType = \"ENCRYPTED COSIGN PRIVATE KEY\"\n\t// EncryptedSigstorePrivateKeyPEMType is the string \"ENCRYPTED SIGSTORE PRIVATE KEY\" to be used during PEM encoding and decoding\n\tEncryptedSigstorePrivateKeyPEMType PEMType = \"ENCRYPTED SIGSTORE PRIVATE KEY\"\n)\n\nfunc pemEncodeKeyPair(priv crypto.PrivateKey, pub crypto.PublicKey, pf PassFunc) (privPEM, pubPEM []byte, err error) {\n\tpubPEM, err = MarshalPublicKeyToPEM(pub)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tderBytes, err := MarshalPrivateKeyToDER(priv)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif pf == nil {\n\t\treturn PEMEncode(PrivateKeyPEMType, derBytes), pubPEM, nil\n\t}\n\tpassword, err := pf(true)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif password == nil {\n\t\treturn PEMEncode(PrivateKeyPEMType, derBytes), pubPEM, nil\n\t}\n\tif derBytes, err = encrypted.Encrypt(derBytes, password); err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn PEMEncode(EncryptedSigstorePrivateKeyPEMType, derBytes), pubPEM, nil\n}\n\n// GeneratePEMEncodedECDSAKeyPair generates an ECDSA keypair, optionally password encrypted using a provided PassFunc, and PEM encoded.\nfunc GeneratePEMEncodedECDSAKeyPair(curve elliptic.Curve, pf PassFunc) (privPEM, pubPEM []byte, err error) {\n\tpriv, err := ecdsa.GenerateKey(curve, rand.Reader)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn pemEncodeKeyPair(priv, priv.Public(), pf)\n}\n\n// GeneratePEMEncodedRSAKeyPair generates an RSA keypair, optionally password encrypted using a provided PassFunc, and PEM encoded.\nfunc GeneratePEMEncodedRSAKeyPair(keyLengthBits int, pf PassFunc) (privPEM, pubPEM []byte, err error) {\n\tpriv, err := rsa.GenerateKey(rand.Reader, keyLengthBits)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn pemEncodeKeyPair(priv, priv.Public(), pf)\n}\n\n// MarshalPrivateKeyToEncryptedDER marshals the private key and encrypts the DER-encoded value using the specified password function\nfunc MarshalPrivateKeyToEncryptedDER(priv crypto.PrivateKey, pf PassFunc) ([]byte, error) {\n\tderKey, err := MarshalPrivateKeyToDER(priv)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpassword, err := pf(true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif password == nil {\n\t\treturn nil, errors.New(\"password was nil\")\n\t}\n\treturn encrypted.Encrypt(derKey, password)\n}\n\n// UnmarshalPEMToPrivateKey converts a PEM-encoded byte slice into a crypto.PrivateKey\nfunc UnmarshalPEMToPrivateKey(pemBytes []byte, pf PassFunc) (crypto.PrivateKey, error) {\n\tderBlock, _ := pem.Decode(pemBytes)\n\tif derBlock == nil {\n\t\treturn nil, errors.New(\"PEM decoding failed\")\n\t}\n\tswitch derBlock.Type {\n\tcase string(PrivateKeyPEMType):\n\t\treturn x509.ParsePKCS8PrivateKey(derBlock.Bytes)\n\tcase string(PKCS1PrivateKeyPEMType):\n\t\treturn x509.ParsePKCS1PrivateKey(derBlock.Bytes)\n\tcase string(ECPrivateKeyPEMType):\n\t\treturn x509.ParseECPrivateKey(derBlock.Bytes)\n\tcase string(EncryptedSigstorePrivateKeyPEMType), string(encryptedCosignPrivateKeyPEMType):\n\t\tderBytes := derBlock.Bytes\n\t\tif pf != nil {\n\t\t\tpassword, err := pf(false)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif password != nil {\n\t\t\t\tderBytes, err = encrypted.Decrypt(derBytes, password)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn x509.ParsePKCS8PrivateKey(derBytes)\n\t}\n\treturn nil, fmt.Errorf(\"unknown private key PEM file type: %v\", derBlock.Type)\n}\n\n// MarshalPrivateKeyToDER converts a crypto.PrivateKey into a PKCS8 ASN.1 DER byte slice\nfunc MarshalPrivateKeyToDER(priv crypto.PrivateKey) ([]byte, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"empty key\")\n\t}\n\treturn x509.MarshalPKCS8PrivateKey(priv)\n}\n\n// MarshalPrivateKeyToPEM converts a crypto.PrivateKey into a PKCS#8 PEM-encoded byte slice\nfunc MarshalPrivateKeyToPEM(priv crypto.PrivateKey) ([]byte, error) {\n\tderBytes, err := MarshalPrivateKeyToDER(priv)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn PEMEncode(PrivateKeyPEMType, derBytes), nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/publickey.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/elliptic\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\" // nolint:gosec\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"encoding/hex\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n)\n\nconst (\n\t// PublicKeyPEMType is the string \"PUBLIC KEY\" to be used during PEM encoding and decoding\n\tPublicKeyPEMType PEMType = \"PUBLIC KEY\"\n\t// PKCS1PublicKeyPEMType is the string \"RSA PUBLIC KEY\" used to parse PKCS#1-encoded public keys\n\tPKCS1PublicKeyPEMType PEMType = \"RSA PUBLIC KEY\"\n)\n\n// subjectPublicKeyInfo is used to construct a subject key ID.\n// https://tools.ietf.org/html/rfc5280#section-4.1.2.7\ntype subjectPublicKeyInfo struct {\n\tAlgorithm        pkix.AlgorithmIdentifier\n\tSubjectPublicKey asn1.BitString\n}\n\n// UnmarshalPEMToPublicKey converts a PEM-encoded byte slice into a crypto.PublicKey\nfunc UnmarshalPEMToPublicKey(pemBytes []byte) (crypto.PublicKey, error) {\n\tderBytes, _ := pem.Decode(pemBytes)\n\tif derBytes == nil {\n\t\treturn nil, errors.New(\"PEM decoding failed\")\n\t}\n\tswitch derBytes.Type {\n\tcase string(PublicKeyPEMType):\n\t\treturn x509.ParsePKIXPublicKey(derBytes.Bytes)\n\tcase string(PKCS1PublicKeyPEMType):\n\t\treturn x509.ParsePKCS1PublicKey(derBytes.Bytes)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown Public key PEM file type: %v. Are you passing the correct public key?\",\n\t\t\tderBytes.Type)\n\t}\n}\n\n// MarshalPublicKeyToDER converts a crypto.PublicKey into a PKIX, ASN.1 DER byte slice\nfunc MarshalPublicKeyToDER(pub crypto.PublicKey) ([]byte, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"empty key\")\n\t}\n\treturn x509.MarshalPKIXPublicKey(pub)\n}\n\n// MarshalPublicKeyToPEM converts a crypto.PublicKey into a PEM-encoded byte slice\nfunc MarshalPublicKeyToPEM(pub crypto.PublicKey) ([]byte, error) {\n\tderBytes, err := MarshalPublicKeyToDER(pub)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn PEMEncode(PublicKeyPEMType, derBytes), nil\n}\n\n// SKID generates a 160-bit SHA-1 hash of the value of the BIT STRING\n// subjectPublicKey (excluding the tag, length, and number of unused bits).\n// https://tools.ietf.org/html/rfc5280#section-4.2.1.2\nfunc SKID(pub crypto.PublicKey) ([]byte, error) {\n\tderPubBytes, err := x509.MarshalPKIXPublicKey(pub)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar spki subjectPublicKeyInfo\n\tif _, err := asn1.Unmarshal(derPubBytes, &spki); err != nil {\n\t\treturn nil, err\n\t}\n\tskid := sha1.Sum(spki.SubjectPublicKey.Bytes) // nolint:gosec\n\treturn skid[:], nil\n}\n\n// EqualKeys compares two public keys. Supports RSA, ECDSA and ED25519.\n// If not equal, the error message contains hex-encoded SHA1 hashes of the DER-encoded keys\nfunc EqualKeys(first, second crypto.PublicKey) error {\n\tswitch pub := first.(type) {\n\tcase *rsa.PublicKey:\n\t\tif !pub.Equal(second) {\n\t\t\treturn errors.New(genErrMsg(first, second, \"rsa\"))\n\t\t}\n\tcase *ecdsa.PublicKey:\n\t\tif !pub.Equal(second) {\n\t\t\treturn errors.New(genErrMsg(first, second, \"ecdsa\"))\n\t\t}\n\tcase ed25519.PublicKey:\n\t\tif !pub.Equal(second) {\n\t\t\treturn errors.New(genErrMsg(first, second, \"ed25519\"))\n\t\t}\n\tdefault:\n\t\treturn errors.New(\"unsupported key type\")\n\t}\n\treturn nil\n}\n\n// genErrMsg generates an error message for EqualKeys\nfunc genErrMsg(first, second crypto.PublicKey, keyType string) string {\n\tmsg := fmt.Sprintf(\"%s public keys are not equal\", keyType)\n\t// Calculate SKID to include in error message\n\tfirstSKID, err := SKID(first)\n\tif err != nil {\n\t\treturn msg\n\t}\n\tsecondSKID, err := SKID(second)\n\tif err != nil {\n\t\treturn msg\n\t}\n\treturn fmt.Sprintf(\"%s (%s, %s)\", msg, hex.EncodeToString(firstSKID), hex.EncodeToString(secondSKID))\n}\n\n// ValidatePubKey validates the parameters of an RSA, ECDSA, or ED25519 public key.\n//\n// Deprecated: Prefer goodkey.ValidatePubKey. This function has been\n// updated to verify only the size of the key for RSA or the curve\n// for ECDSA.\nfunc ValidatePubKey(pub crypto.PublicKey) error {\n\tswitch pk := pub.(type) {\n\tcase *rsa.PublicKey:\n\t\tif !slices.Contains([]int{2048, 3072, 4096}, pk.Size()*8) {\n\t\t\treturn fmt.Errorf(\"rsa key size %d is not supported supported, modulus size must be 2048, 3072, or 4096\", pk.Size()*8)\n\t\t}\n\t\treturn nil\n\tcase *ecdsa.PublicKey:\n\t\tif !slices.Contains([]elliptic.Curve{elliptic.P256(), elliptic.P384(), elliptic.P521()}, pk.Curve) {\n\t\t\treturn fmt.Errorf(\"ecdsa curve %T is not supported, must be NIST P-256, P-384 or P-521\", pk.Curve)\n\t\t}\n\t\treturn nil\n\tcase ed25519.PublicKey:\n\t\t// Nothing to validate for Ed25519\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"unsupported public key type: %T\", pub)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/safestring.go",
    "content": "//\n// Copyright 2025 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/base64\"\n)\n\n// GenerateRandomURLSafeString generates a cryptographically secure random\n// URL-safe string with the specified number of bits of entropy.\nfunc GenerateRandomURLSafeString(entropyLength uint) string {\n\tif entropyLength == 0 {\n\t\treturn \"\"\n\t}\n\t// Round up to the nearest byte to ensure minimum entropy is met\n\tentropyBytes := (entropyLength + 7) / 8\n\tb := make([]byte, entropyBytes)\n\t_, _ = rand.Read(b)\n\treturn base64.RawURLEncoding.EncodeToString(b)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/cryptoutils/sans.go",
    "content": "// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cryptoutils\n\nimport (\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// OIDOtherName is the OID for the OtherName SAN per RFC 5280\n\tOIDOtherName = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 7}\n\t// SANOID is the OID for Subject Alternative Name per RFC 5280\n\tSANOID = asn1.ObjectIdentifier{2, 5, 29, 17}\n)\n\n// OtherName describes a name related to a certificate which is not in one\n// of the standard name formats. RFC 5280, 4.2.1.6:\n//\n//\tOtherName ::= SEQUENCE {\n//\t     type-id    OBJECT IDENTIFIER,\n//\t     value      [0] EXPLICIT ANY DEFINED BY type-id }\n//\n// OtherName for Fulcio-issued certificates only supports UTF-8 strings as values.\ntype OtherName struct {\n\tID    asn1.ObjectIdentifier\n\tValue string `asn1:\"utf8,explicit,tag:0\"`\n}\n\n// MarshalOtherNameSAN creates a Subject Alternative Name extension\n// with an OtherName sequence. RFC 5280, 4.2.1.6:\n//\n// SubjectAltName ::= GeneralNames\n// GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName\n// GeneralName ::= CHOICE {\n//\n//\totherName                       [0]     OtherName,\n//\t... }\nfunc MarshalOtherNameSAN(name string, critical bool) (*pkix.Extension, error) {\n\to := OtherName{\n\t\tID:    OIDOtherName,\n\t\tValue: name,\n\t}\n\tbytes, err := asn1.MarshalWithParams(o, \"tag:0\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsans, err := asn1.Marshal([]asn1.RawValue{{FullBytes: bytes}})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &pkix.Extension{\n\t\tId:       SANOID,\n\t\tCritical: critical,\n\t\tValue:    sans,\n\t}, nil\n}\n\n// UnmarshalOtherNameSAN extracts a UTF-8 string from the OtherName\n// field in the Subject Alternative Name extension.\nfunc UnmarshalOtherNameSAN(exts []pkix.Extension) (string, error) {\n\tvar otherNames []string\n\n\tfor _, e := range exts {\n\t\tif !e.Id.Equal(SANOID) {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar seq asn1.RawValue\n\t\trest, err := asn1.Unmarshal(e.Value, &seq)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t} else if len(rest) != 0 {\n\t\t\treturn \"\", fmt.Errorf(\"trailing data after X.509 extension\")\n\t\t}\n\t\tif !seq.IsCompound || seq.Tag != asn1.TagSequence || seq.Class != asn1.ClassUniversal {\n\t\t\treturn \"\", asn1.StructuralError{Msg: \"bad SAN sequence\"}\n\t\t}\n\n\t\trest = seq.Bytes\n\t\tfor len(rest) > 0 {\n\t\t\tvar v asn1.RawValue\n\t\t\trest, err = asn1.Unmarshal(rest, &v)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\n\t\t\t// skip all GeneralName fields except OtherName\n\t\t\tif v.Tag != 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tvar other OtherName\n\t\t\tif _, err := asn1.UnmarshalWithParams(v.FullBytes, &other, \"tag:0\"); err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"could not parse requested OtherName SAN: %w\", err)\n\t\t\t}\n\t\t\tif !other.ID.Equal(OIDOtherName) {\n\t\t\t\treturn \"\", fmt.Errorf(\"unexpected OID for OtherName, expected %v, got %v\", OIDOtherName, other.ID)\n\t\t\t}\n\t\t\totherNames = append(otherNames, other.Value)\n\t\t}\n\t}\n\n\tif len(otherNames) == 0 {\n\t\treturn \"\", errors.New(\"no OtherName found\")\n\t}\n\tif len(otherNames) != 1 {\n\t\treturn \"\", errors.New(\"expected only one OtherName\")\n\t}\n\n\treturn otherNames[0], nil\n}\n\n// GetSubjectAlternateNames extracts all subject alternative names from\n// the certificate, including email addresses, DNS, IP addresses, URIs,\n// and OtherName SANs\nfunc GetSubjectAlternateNames(cert *x509.Certificate) []string {\n\tsans := []string{}\n\tif cert == nil {\n\t\treturn sans\n\t}\n\tsans = append(sans, cert.DNSNames...)\n\tsans = append(sans, cert.EmailAddresses...)\n\tfor _, ip := range cert.IPAddresses {\n\t\tsans = append(sans, ip.String())\n\t}\n\tfor _, uri := range cert.URIs {\n\t\tsans = append(sans, uri.String())\n\t}\n\t// ignore error if there's no OtherName SAN\n\totherName, _ := UnmarshalOtherNameSAN(cert.Extensions)\n\tif len(otherName) > 0 {\n\t\tsans = append(sans, otherName)\n\t}\n\treturn sans\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauth/doc.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package oauth contains types and utilities related to OAuth2.\npackage oauth\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauth/interactive.go",
    "content": "// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package oauth implements OAuth/OIDC support for device and token flows\npackage oauth\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"text/template\"\n)\n\n// GetInteractiveSuccessHTML is the page displayed upon success when using a web browser during an interactive Oauth token flow.\n// The page will close automatically if autoclose is true with the timeout specified.\nfunc GetInteractiveSuccessHTML(autoclose bool, timeout int) (string, error) {\n\tconst successTemplate = `<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Sigstore Authentication</title>\n\t\t<link id=\"favicon\" rel=\"icon\" type=\"image/svg\"/>\n\t\t<style>\n\t\t\t:root { font-family: \"Trebuchet MS\", sans-serif; height: 100%; color: #444444; overflow: hidden; }\n\t\t\tbody { display: flex; justify-content: center; height: 100%; margin: 0 10%; background: #FFEAD7; }\n\t\t\t.container { display: flex; flex-direction: column; justify-content: space-between; }\n\t\t\t.sigstore { color: #2F2E71; font-weight: bold; }\n\t\t\t.header { position: absolute; top: 30px; left: 22px; }\n\t\t\t.title { font-size: 3.5em; margin-bottom: 30px; animation: 750ms ease-in-out 0s 1 show; }\n\t\t\t.content { font-size: 1.5em; animation: 250ms hide, 750ms ease-in-out 250ms 1 show; }\n\t\t\t.anchor { position: relative; }\n\t\t\t.links { display: flex; justify-content: space-between; font-size: 1.2em; padding: 60px 0; position: absolute; bottom: 0; left: 0; right: 0; animation: 500ms hide, 750ms ease-in-out 500ms 1 show; }\n\t\t\t.link { color: #444444; text-decoration: none; user-select: none; }\n\t\t\t.link:hover { color: #6349FF; }\n\t\t\t.link:hover>.arrow { transform: scaleX(1.5) translateX(3px); }\n\t\t\t.link:hover>.sigstore { color: inherit; }\n\t\t\t.link, .arrow { transition: 200ms; }\n\t\t\t.arrow { display: inline-block; margin-left: 6px; transform: scaleX(1.5); }\n\t\t\t@keyframes hide { 0%, 100% { opacity: 0; } }\n\t\t\t@keyframes show { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; } }\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"container\">\n\t\t\t<div>\n\t\t\t\t<a class=\"header\" href=\"https://sigstore.dev\">\n\t\t\t\t\t<svg id=\"logo\" xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" width=\"28.14\" height=\"30.3\">\n\t\t\t\t\t\t<circle r=\"7\" cx=\"14\" cy=\"15\" fill=\"#FFEAD7\"></circle>\n\t\t\t\t\t\t<path fill=\"#2F2E71\" d=\"M27.8 10.9c-.3-1.2-.9-2.2-1.7-3.1-.6-.7-1.3-1.3-2-2-.7-.6-1.2-1.3-1.5-2.1-.2-.4-.4-.8-.7-1.2-.5-.7-1.3-1.2-2.1-1.6-1.3-.7-2.7-.9-4.2-.9-.8 0-1.6.1-2.4.3-1.2.2-2.3.7-3.4 1.3-.7.4-1.3.9-1.9 1.4-1 .8-2 1.6-2.8 2.6-.6.8-1.4 1.3-2.2 1.8-.8.4-1.4 1-2 1.6-.6.6-.9 1.3-.9 2.1 0 .6.1 1.2.2 1.7.2.9.6 1.7.9 2.6.2.5.3 1 .3 1.5s0 1-.1 1.5c-.1 1.1 0 2.3.2 3.4.2 1 .8 1.8 1.8 2.2.1.1.3.1.4.1.2.1.2.2.1.3l-.1.1c-.4.5-.7 1.1-.6 1.8.1 1.1 1.3 1.8 2.3 1.3.6-.2 1.2 0 1.4.4.1.1.1.2.2.3.2.5.4.9.7 1.3.4.5.9.7 1.6.6.4-.1.8-.2 1.2-.4.7-.4 1.3-.9 2-1.5.2-.2.4-.2.7-.2.4 0 .8.2 1.2.5.6.4 1.2.7 1.9.9 1.3.4 2.5.5 3.8.2 1.3-.3 2.4-.9 3.4-1.6.7-.5 1.2-1 1.6-1.7.4-.7.6-1.4.8-2.2.3-1.1.4-2.2.4-3.4.1-1 .2-1.9.5-2.8.2-.7.5-1.4.8-2.1.2-.6.4-1.2.5-1.9.1-1.1 0-2.1-.3-3.1zM14.9.8c.3-.1.7-.1 1-.1h.3c1.1 0 2.1.2 3.1.5.6.2 1.2.6 1.7 1s.7.9.9 1.4v.1c0 .1 0 .2-.1.2s-.1 0-.2-.1c-.4-.4-.7-.8-1.1-1.1-.6-.5-1.2-.9-2-1.1-1.1-.3-2.1-.5-3.2-.7h-.6c.1 0 .1 0 .2-.1-.1 0 0 0 0 0zm-4.5 12.4c.6 0 1.1.5 1.2 1.2 0 .6-.5 1.2-1.2 1.2-.6 0-1.2-.5-1.1-1.2 0-.7.5-1.2 1.1-1.2zm3.8 1.3v-3.4c0-2.3 2-3.1 3.6-2.5.3.1.6.3.9.5.2.2.2.5.1.8-.2.2-.4.3-.7.1-.2-.1-.5-.2-.7-.3-.6-.2-1.3 0-1.6.4-.1.2-.2.4-.2.7-.1.5 0 .9 0 1.4v5.9c0 1.2-.6 2.1-1.8 2.4-1 .3-1.9.2-2.7-.6-.2-.2-.3-.5-.1-.7.1-.2.4-.3.7-.2.3.1.6.3.9.4 1 .1 1.7-.3 1.7-1.4-.1-1.2-.1-2.3-.1-3.5zm-8.8 7.6h-.1c-.1-.1-.2-.1-.3-.2-.2-.2-.4-.3-.6-.5-.3-.3-.5-.6-.7-1-.4-.8-.8-1.7-1-2.7-.1-.5-.2-1-.2-1.5s-.1-1-.2-1.4c-.1-.7-.2-1.5-.2-2.2 0-.9.1-1.7.4-2.5.3-.9.7-1.7 1.4-2.4.6-.6 1.1-1.2 1.7-1.8.1-.1.3-.2.4-.2 0 .1-.1.3-.2.4-.3.4-.6.7-.9 1.1-.5.6-.9 1.2-1.2 1.8-.4.7-.7 1.4-.9 2.2-.1.4-.2.8-.2 1.2 0 .4-.1.8 0 1.3 0 .6.1 1.1.2 1.6.1.6.2 1.1.2 1.7 0 .7.2 1.4.4 2.1 0 .2.2.3.2.5.3.6.6 1.1 1.1 1.5.2.2.4.5.6.7 0 0 0 .1.1.1v.2zM8 24.6c-.4 0-.7.1-1.1.2-.4.1-.6-.1-.7-.5 0-.1-.1-.3 0-.4.1-.3.3-.3.5-.1.2.2.5.4.7.5.1.1.2.1.4.1.1 0 .2.1.4.2H8zm7.6 2.1c-.3.2-.7.3-1.1.3-.3 0-.6-.1-.9-.1h-.2c-.4.1-.7.1-1.1.2-.1 0-.3 0-.4.1H11c-.4 0-.7-.2-1-.5-.1-.1-.2-.3-.3-.5-.1-.1-.1-.2-.1-.4 0-.1.1-.1.2-.1h.1c.5.3 1.1.4 1.6.5.7.1 1.4.2 2.1.2.4 0 .7.1 1.1.1h.8c.2.1.1.1.1.2zm3.7-2.5c-.7.4-1.5.7-2.3.9-.2 0-.5.1-.7.1-.2 0-.5 0-.7.1-.4.1-.8 0-1.2 0-.3 0-.6-.1-.9 0h-.2c-.4-.1-.9-.2-1.3-.3-.5-.1-1-.3-1.4-.5-.4-.1-.8-.3-1.1-.5-.2-.1-.4-.3-.6-.4-.6-.6-1.2-1.1-1.7-1.6-.4-.5-.8-.9-1.2-1.4-.4-.6-.7-1.2-1-1.9l-.3-.9c-.1-.3-.2-.5-.2-.8v-.8c.3.8.5 1.7.9 2.5.7 1.6 1.7 3 3 4.1 1.4 1.1 2.9 1.8 4.6 2.1.9.2 1.8.2 2.7.2 1.1-.1 2.2-.3 3.2-.8.2-.1.3-.2.5-.2 0 .1 0 .1-.1.1zm.1-8.7c-.6 0-1.1-.5-1.1-1.2 0-.6.5-1.2 1.2-1.2.6 0 1.1.5 1.1 1.2s-.5 1.3-1.2 1.2zm6.2 5.7c0 .4-.1.8-.2 1.2-.1.4-.1.9-.3 1.3-.1.4-.2.7-.4 1.1-.1.3-.3.6-.6.8-.3.2-.5.4-.9.5-.4.2-.7.3-1.2.3h-.9c-.2-.1-.2-.1-.1-.3.1-.2.3-.3.5-.4.3-.2.6-.5.8-.7.7-.7 1.3-1.6 1.9-2.4.4-.4.6-1 .9-1.5.1-.1.1-.2.2-.3.3.2.3.3.3.4zm-15-16.8c1.7-.8 3.5-1.1 5.3-.9.4 0 .8.1 1.1.3l1.8.6c.6.2 1.2.5 1.7.8.7.4 1.3.9 1.9 1.5.8.8 1.5 1.6 2 2.6.3.6.5 1.2.7 1.8.2.7.4 1.5.4 2.2v.9c0 .4-.1.8-.1 1.2v-1c0-1.2-.3-2.3-.6-3.4l-.6-1.5c-.2-.6-.5-1.1-.9-1.6-.1-.1-.3-.1-.4-.2-.1 0-.1 0-.2-.1-.5-.5-1.1-1-1.7-1.5-.8-.6-1.7-1.1-2.6-1.4-.4-.2-.8-.3-1.2-.4-.9-.2-1.8-.4-2.7-.3h-.9c-.3 0-.6.1-1 .2-.6.1-1.2.3-1.7.5h-.1s-.1 0 0-.1c0 0 0-.1-.1-.2m16.2 11.1c-.1-.8 0-1.7 0-2.5-.1-.8-.2-1.6-.4-2.4.5.7.6 1.6.7 2.4 0 .8 0 1.7-.3 2.5zm.6.5c0-.3.1-.7.2-1.1.1-.4.1-.9.1-1.3v-.4c0-.8-.2-1.6-.4-2.4-.4-.9-.8-1.6-1.4-2.4-.5-.6-.9-1.2-1.4-1.8l-.2-.2c.1 0 .1 0 .1.1 1 .8 1.8 1.6 2.4 2.7.5 1 .9 2 1 3.1.3 1.3.1 2.5-.4 3.7z\"/>\n\t\t\t\t\t</svg><svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" width=\"120\" height=\"30.3\" viewBox=\"28.14 0 120 30.3\">\n\t\t\t\t\t\t<path fill=\"#2F2E71\" d=\"M57.7 18c.9 0 1.9-.1 2.9.3.9.3 1.5.9 1.7 2 .1 1-.2 1.9-1.1 2.5-1.1.8-2.3.9-3.6 1-1.4 0-2.9 0-4.3-.6-1.6-.7-1.8-2.6-.4-3.6.3-.2.2-.3.1-.5-.7-.8-.7-2.2.3-2.8.3-.2.2-.3 0-.6-1.4-1.6-.7-4.1 1.3-4.8 1.6-.6 3.2-.6 4.8-.1.2.1.3.1.5-.1.3-.3.6-.5.9-.7.5-.3 1.1-.3 1.4 0 .3.4.3.9-.2 1.3-.7.5-.8 1-.6 1.9.4 1.5-.6 2.9-2.1 3.4-1.3.5-2.7.5-4 .2-.3-.1-.5-.1-.6.2-.1.3-.1.6.2.8.2.1.5.2.8.2h2zm-.6-2.7c.3 0 .5 0 .7-.1.8-.2 1.3-.7 1.4-1.4.1-.7-.3-1.3-.9-1.6-.8-.3-1.6-.3-2.4 0-1 .4-1.2 1.7-.6 2.4.5.6 1.2.7 1.8.7zm-.2 4.6h-1.8c-.4 0-.6.2-.7.5-.3.7.1 1.2.9 1.4 1.2.2 2.5.2 3.7-.1l.6-.3c.5-.3.4-1.1-.1-1.3-.2-.1-.5-.2-.7-.2h-1.9zm58.6-3.3h-3.2c-.3 0-.3.1-.3.4.2 1.2 1.3 2.1 2.8 2.3 1.1.1 2.1-.1 2.9-.9.2-.2.4-.3.6-.4.4-.2.8-.2 1.1.1.4.3.4.7.3 1.1-.3.9-.9 1.4-1.7 1.8-2.3 1-4.5.9-6.5-.6-1-.7-1.5-1.8-1.7-3-.3-1.7-.2-3.3.8-4.7 1.3-1.8 3.1-2.4 5.2-2.1 2 .3 3.4 1.3 4 3.2.2.6.3 1.2.2 1.8-.1.8-.4 1.1-1.2 1.1-1.1-.1-2.2-.1-3.3-.1zm-.7-1.9h2.4c.4 0 .4-.1.4-.5-.3-1.1-1.2-1.9-2.5-2-1.5-.1-2.6.6-3.1 1.9-.2.5-.1.6.4.6h2.4zm-23 6.7c-3.3 0-5.5-2.2-5.6-5.5 0-3.2 2.2-5.6 5.4-5.6 3.4 0 5.7 2.2 5.8 5.5 0 3.4-2.2 5.6-5.6 5.6zm0-2.1c1.9 0 3.2-1.3 3.3-3.3.1-2-1.3-3.4-3.2-3.4-1.8 0-3.2 1.4-3.2 3.3-.1 1.9 1.2 3.4 3.1 3.4zm-22.6 2.1c-1.1 0-2.4-.3-3.5-1.4-.3-.4-.6-.8-.7-1.3 0-.4.1-.7.4-.9.3-.2.7-.2 1 0 .3.2.6.4.8.6.9.9 2 1.1 3.2.9.6-.1 1-.5 1-1 .1-.5-.2-1-.8-1.2-.7-.3-1.4-.3-2.1-.5-.8-.2-1.6-.4-2.2-.9-1.5-1.2-1.4-3.5.2-4.6 1.2-.8 2.6-.9 4-.7 1 .1 1.9.5 2.6 1.2.3.3.4.6.5.9.1.4 0 .7-.3 1-.3.3-.7.3-1 .1-.4-.2-.7-.5-1.1-.8-.8-.6-1.7-.8-2.7-.5-.6.1-.9.5-.9 1s.3.9.8 1.1c.9.3 1.9.4 2.9.7.6.2 1.1.4 1.5.8 1.5 1.4 1.1 4.1-.9 5.1-.7.3-1.5.4-2.7.4zm-30.3 0c-1.5 0-3-.3-4.1-1.5-.3-.3-.4-.6-.5-1-.1-.4-.1-.8.3-1.1.4-.2.9-.2 1.3.1.3.2.6.5.8.7.9.8 1.9.9 3 .7.6-.1.9-.5.9-1.1 0-.5-.3-1-.8-1.2l-2.7-.6c-1.1-.3-2-.8-2.4-2-.6-1.7.4-3.4 2.2-3.9 1.7-.5 3.3-.3 4.8.5.6.3 1 .8 1.2 1.4.1.4.1.9-.3 1.1-.4.3-.8.2-1.2-.1-.4-.3-.7-.7-1.2-.9-.8-.4-1.5-.5-2.4-.3-.5.1-.8.4-.8.9s.2.8.7 1c.7.3 1.4.3 2.1.5.8.2 1.5.3 2.2.8 1.2.8 1.5 2.5.9 3.8-.7 1.4-1.9 1.8-3.3 2-.3.2-.5.2-.7.2zM78 15.8v-2.6c0-.3-.1-.4-.4-.4h-1.3c-.6-.1-.9-.5-.9-1s.4-1 .9-1h1.3c.3 0 .4-.1.4-.4V8.9c0-.7.5-1.1 1.1-1.2.6 0 1.1.4 1.2 1v.6c0 .4-.2 1 .1 1.3.3.3.9.1 1.3.1h1.6c.4 0 .7.3.8.8.1.4-.1.8-.4 1.1-.3.2-.6.2-.9.2h-2.1c-.3 0-.4 0-.4.4v4.7c0 1.1.9 1.6 1.9 1.1.3-.1.5-.3.7-.5.4-.3.8-.3 1.2 0 .4.3.4.8.2 1.2-.3.7-.9 1.1-1.5 1.3-1.3.5-2.6.5-3.8-.4-.7-.6-1-1.4-1.1-2.4.1-.7.1-1.6.1-2.4zm24.7-4.1c.8-1 1.8-1.4 3-1.3.7.1 1.4.3 1.9.9.3.4.5.9.4 1.5-.1.4-.3.7-.7.9-.5.2-.9 0-1.3-.3-.7-.7-1.3-.9-2.1-.5-.5.3-.8.7-1 1.3-.2.5-.3 1.1-.3 1.6v4.5c0 .5-.2.9-.6 1.1-.4.2-.8.2-1.2-.1-.4-.3-.5-.7-.5-1.1v-8.4c0-.7.4-1.2 1-1.3.7-.1 1.1.3 1.3 1.1.1-.1.1 0 .1.1zm-54 4.2v4.3c0 .8-.6 1.3-1.4 1.2-.5-.1-.9-.5-.9-1.1v-8.7c0-.7.5-1.1 1.2-1.1s1.1.4 1.2 1.2c-.1 1.3-.1 2.8-.1 4.2zm.3-8.2c0 .8-.6 1.4-1.4 1.4-.8 0-1.5-.6-1.5-1.4 0-.8.7-1.4 1.5-1.4s1.4.6 1.4 1.4z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div class=\"title\">\n\t\t\t\t\t<span class=\"sigstore\">sigstore </span>\n\t\t\t\t\t<span>authentication successful!</span>\n\t\t\t\t</div>\n\t\t\t\t{{ if .Autoclose -}}\n\t\t\t\t<small name=\"autoclose\"></small>\n\t\t\t\t<noscript>\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t<span>You may now close this page.</span>\n\t\t\t\t\t</div>\n\t\t\t\t</noscript>\n\t\t\t\t{{- else -}}\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span>You may now close this page.</span>\n\t\t\t\t</div>\n\t\t\t\t{{- end }}\n\t\t\t</div>\n\t\t\t<div class=\"anchor\">\n\t\t\t\t<div class=\"links\">\n\t\t\t\t\t<a href=\"https://sigstore.dev/\" class=\"link login\"><span class=\"sigstore\">sigstore</span> home <span class=\"arrow\">→</span></a>\n\t\t\t\t\t<a href=\"https://docs.sigstore.dev/\" class=\"link login\"><span class=\"sigstore\">sigstore</span> documentation <span class=\"arrow\">→</span></a>\n\t\t\t\t\t<a href=\"https://blog.sigstore.dev/\" class=\"link\"><span class=\"sigstore\">sigstore</span> blog <span class=\"arrow\">→</span></a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<script>\n\t\t\tdocument.getElementById(\"favicon\").setAttribute(\"href\", \"data:image/svg+xml,\" + encodeURIComponent(document.getElementById(\"logo\").outerHTML));\n\t\t</script>\n\n\t\t{{ if .Autoclose -}}\n\t\t<script>\n\t\t\tvar timeout = {{ .Timeout }};\n\t\t\tsetTimeout(function() { this.close(); }, timeout*1000);\n\t\t\tsetInterval(function() {\n\t\t\t\ttimeout--;\n\t\t\t\tdocument.getElementsByName(\"autoclose\")[0].innerHTML = \"This page will close automatically in \" + timeout + \" seconds...\";\n\t\t\t\tif (timeout <= 0) {\n\t\t\t\t\tdocument.getElementsByName(\"autoclose\")[0].innerHTML = \"This page will close now, thank you!\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t</script>\n\t\t{{- end }}\n\t</body>\n</html>\n`\n\t// Parse the template\n\ttmpl, err := template.New(\"success\").Parse(successTemplate)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"error parsing success template: %w\", err)\n\t}\n\t// Pass autoclose and timeout to the template\n\tdata := struct {\n\t\tAutoclose bool\n\t\tTimeout   int\n\t}{\n\t\tautoclose,\n\t\ttimeout,\n\t}\n\tvar htmlPage bytes.Buffer\n\tif err := tmpl.Execute(&htmlPage, data); err != nil {\n\t\treturn \"\", fmt.Errorf(\"error executing template: %w\", err)\n\t}\n\treturn htmlPage.String(), nil\n}\n\nconst (\n\t// InteractiveSuccessHTML (deprecated) is the page displayed upon success when using a web browser during an interactive Oauth token flow.\n\tInteractiveSuccessHTML = `<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Sigstore Authentication</title>\n\t\t<link id=\"favicon\" rel=\"icon\" type=\"image/svg\"/>\n\t\t<style>\n\t\t\t:root { font-family: \"Trebuchet MS\", sans-serif; height: 100%; color: #444444; overflow: hidden; }\n\t\t\tbody { display: flex; justify-content: center; height: 100%; margin: 0 10%; background: #FFEAD7; }\n\t\t\t.container { display: flex; flex-direction: column; justify-content: space-between; }\n\t\t\t.sigstore { color: #2F2E71; font-weight: bold; }\n\t\t\t.header { position: absolute; top: 30px; left: 22px; }\n\t\t\t.title { font-size: 3.5em; margin-bottom: 30px; animation: 750ms ease-in-out 0s 1 show; }\n\t\t\t.content { font-size: 1.5em; animation: 250ms hide, 750ms ease-in-out 250ms 1 show; }\n\t\t\t.anchor { position: relative; }\n\t\t\t.links { display: flex; justify-content: space-between; font-size: 1.2em; padding: 60px 0; position: absolute; bottom: 0; left: 0; right: 0; animation: 500ms hide, 750ms ease-in-out 500ms 1 show; }\n\t\t\t.link { color: #444444; text-decoration: none; user-select: none; }\n\t\t\t.link:hover { color: #6349FF; }\n\t\t\t.link:hover>.arrow { transform: scaleX(1.5) translateX(3px); }\n\t\t\t.link:hover>.sigstore { color: inherit; }\n\t\t\t.link, .arrow { transition: 200ms; }\n\t\t\t.arrow { display: inline-block; margin-left: 6px; transform: scaleX(1.5); }\n\t\t\t@keyframes hide { 0%, 100% { opacity: 0; } }\n\t\t\t@keyframes show { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; } }\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"container\">\n\t\t\t<div>\n\t\t\t\t<a class=\"header\" href=\"https://sigstore.dev\">\n\t\t\t\t\t<svg id=\"logo\" xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" width=\"28.14\" height=\"30.3\">\n\t\t\t\t\t\t<circle r=\"7\" cx=\"14\" cy=\"15\" fill=\"#FFEAD7\"></circle>\n\t\t\t\t\t\t<path fill=\"#2F2E71\" d=\"M27.8 10.9c-.3-1.2-.9-2.2-1.7-3.1-.6-.7-1.3-1.3-2-2-.7-.6-1.2-1.3-1.5-2.1-.2-.4-.4-.8-.7-1.2-.5-.7-1.3-1.2-2.1-1.6-1.3-.7-2.7-.9-4.2-.9-.8 0-1.6.1-2.4.3-1.2.2-2.3.7-3.4 1.3-.7.4-1.3.9-1.9 1.4-1 .8-2 1.6-2.8 2.6-.6.8-1.4 1.3-2.2 1.8-.8.4-1.4 1-2 1.6-.6.6-.9 1.3-.9 2.1 0 .6.1 1.2.2 1.7.2.9.6 1.7.9 2.6.2.5.3 1 .3 1.5s0 1-.1 1.5c-.1 1.1 0 2.3.2 3.4.2 1 .8 1.8 1.8 2.2.1.1.3.1.4.1.2.1.2.2.1.3l-.1.1c-.4.5-.7 1.1-.6 1.8.1 1.1 1.3 1.8 2.3 1.3.6-.2 1.2 0 1.4.4.1.1.1.2.2.3.2.5.4.9.7 1.3.4.5.9.7 1.6.6.4-.1.8-.2 1.2-.4.7-.4 1.3-.9 2-1.5.2-.2.4-.2.7-.2.4 0 .8.2 1.2.5.6.4 1.2.7 1.9.9 1.3.4 2.5.5 3.8.2 1.3-.3 2.4-.9 3.4-1.6.7-.5 1.2-1 1.6-1.7.4-.7.6-1.4.8-2.2.3-1.1.4-2.2.4-3.4.1-1 .2-1.9.5-2.8.2-.7.5-1.4.8-2.1.2-.6.4-1.2.5-1.9.1-1.1 0-2.1-.3-3.1zM14.9.8c.3-.1.7-.1 1-.1h.3c1.1 0 2.1.2 3.1.5.6.2 1.2.6 1.7 1s.7.9.9 1.4v.1c0 .1 0 .2-.1.2s-.1 0-.2-.1c-.4-.4-.7-.8-1.1-1.1-.6-.5-1.2-.9-2-1.1-1.1-.3-2.1-.5-3.2-.7h-.6c.1 0 .1 0 .2-.1-.1 0 0 0 0 0zm-4.5 12.4c.6 0 1.1.5 1.2 1.2 0 .6-.5 1.2-1.2 1.2-.6 0-1.2-.5-1.1-1.2 0-.7.5-1.2 1.1-1.2zm3.8 1.3v-3.4c0-2.3 2-3.1 3.6-2.5.3.1.6.3.9.5.2.2.2.5.1.8-.2.2-.4.3-.7.1-.2-.1-.5-.2-.7-.3-.6-.2-1.3 0-1.6.4-.1.2-.2.4-.2.7-.1.5 0 .9 0 1.4v5.9c0 1.2-.6 2.1-1.8 2.4-1 .3-1.9.2-2.7-.6-.2-.2-.3-.5-.1-.7.1-.2.4-.3.7-.2.3.1.6.3.9.4 1 .1 1.7-.3 1.7-1.4-.1-1.2-.1-2.3-.1-3.5zm-8.8 7.6h-.1c-.1-.1-.2-.1-.3-.2-.2-.2-.4-.3-.6-.5-.3-.3-.5-.6-.7-1-.4-.8-.8-1.7-1-2.7-.1-.5-.2-1-.2-1.5s-.1-1-.2-1.4c-.1-.7-.2-1.5-.2-2.2 0-.9.1-1.7.4-2.5.3-.9.7-1.7 1.4-2.4.6-.6 1.1-1.2 1.7-1.8.1-.1.3-.2.4-.2 0 .1-.1.3-.2.4-.3.4-.6.7-.9 1.1-.5.6-.9 1.2-1.2 1.8-.4.7-.7 1.4-.9 2.2-.1.4-.2.8-.2 1.2 0 .4-.1.8 0 1.3 0 .6.1 1.1.2 1.6.1.6.2 1.1.2 1.7 0 .7.2 1.4.4 2.1 0 .2.2.3.2.5.3.6.6 1.1 1.1 1.5.2.2.4.5.6.7 0 0 0 .1.1.1v.2zM8 24.6c-.4 0-.7.1-1.1.2-.4.1-.6-.1-.7-.5 0-.1-.1-.3 0-.4.1-.3.3-.3.5-.1.2.2.5.4.7.5.1.1.2.1.4.1.1 0 .2.1.4.2H8zm7.6 2.1c-.3.2-.7.3-1.1.3-.3 0-.6-.1-.9-.1h-.2c-.4.1-.7.1-1.1.2-.1 0-.3 0-.4.1H11c-.4 0-.7-.2-1-.5-.1-.1-.2-.3-.3-.5-.1-.1-.1-.2-.1-.4 0-.1.1-.1.2-.1h.1c.5.3 1.1.4 1.6.5.7.1 1.4.2 2.1.2.4 0 .7.1 1.1.1h.8c.2.1.1.1.1.2zm3.7-2.5c-.7.4-1.5.7-2.3.9-.2 0-.5.1-.7.1-.2 0-.5 0-.7.1-.4.1-.8 0-1.2 0-.3 0-.6-.1-.9 0h-.2c-.4-.1-.9-.2-1.3-.3-.5-.1-1-.3-1.4-.5-.4-.1-.8-.3-1.1-.5-.2-.1-.4-.3-.6-.4-.6-.6-1.2-1.1-1.7-1.6-.4-.5-.8-.9-1.2-1.4-.4-.6-.7-1.2-1-1.9l-.3-.9c-.1-.3-.2-.5-.2-.8v-.8c.3.8.5 1.7.9 2.5.7 1.6 1.7 3 3 4.1 1.4 1.1 2.9 1.8 4.6 2.1.9.2 1.8.2 2.7.2 1.1-.1 2.2-.3 3.2-.8.2-.1.3-.2.5-.2 0 .1 0 .1-.1.1zm.1-8.7c-.6 0-1.1-.5-1.1-1.2 0-.6.5-1.2 1.2-1.2.6 0 1.1.5 1.1 1.2s-.5 1.3-1.2 1.2zm6.2 5.7c0 .4-.1.8-.2 1.2-.1.4-.1.9-.3 1.3-.1.4-.2.7-.4 1.1-.1.3-.3.6-.6.8-.3.2-.5.4-.9.5-.4.2-.7.3-1.2.3h-.9c-.2-.1-.2-.1-.1-.3.1-.2.3-.3.5-.4.3-.2.6-.5.8-.7.7-.7 1.3-1.6 1.9-2.4.4-.4.6-1 .9-1.5.1-.1.1-.2.2-.3.3.2.3.3.3.4zm-15-16.8c1.7-.8 3.5-1.1 5.3-.9.4 0 .8.1 1.1.3l1.8.6c.6.2 1.2.5 1.7.8.7.4 1.3.9 1.9 1.5.8.8 1.5 1.6 2 2.6.3.6.5 1.2.7 1.8.2.7.4 1.5.4 2.2v.9c0 .4-.1.8-.1 1.2v-1c0-1.2-.3-2.3-.6-3.4l-.6-1.5c-.2-.6-.5-1.1-.9-1.6-.1-.1-.3-.1-.4-.2-.1 0-.1 0-.2-.1-.5-.5-1.1-1-1.7-1.5-.8-.6-1.7-1.1-2.6-1.4-.4-.2-.8-.3-1.2-.4-.9-.2-1.8-.4-2.7-.3h-.9c-.3 0-.6.1-1 .2-.6.1-1.2.3-1.7.5h-.1s-.1 0 0-.1c0 0 0-.1-.1-.2m16.2 11.1c-.1-.8 0-1.7 0-2.5-.1-.8-.2-1.6-.4-2.4.5.7.6 1.6.7 2.4 0 .8 0 1.7-.3 2.5zm.6.5c0-.3.1-.7.2-1.1.1-.4.1-.9.1-1.3v-.4c0-.8-.2-1.6-.4-2.4-.4-.9-.8-1.6-1.4-2.4-.5-.6-.9-1.2-1.4-1.8l-.2-.2c.1 0 .1 0 .1.1 1 .8 1.8 1.6 2.4 2.7.5 1 .9 2 1 3.1.3 1.3.1 2.5-.4 3.7z\"/>\n\t\t\t\t\t</svg><svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" width=\"120\" height=\"30.3\" viewBox=\"28.14 0 120 30.3\">\n\t\t\t\t\t\t<path fill=\"#2F2E71\" d=\"M57.7 18c.9 0 1.9-.1 2.9.3.9.3 1.5.9 1.7 2 .1 1-.2 1.9-1.1 2.5-1.1.8-2.3.9-3.6 1-1.4 0-2.9 0-4.3-.6-1.6-.7-1.8-2.6-.4-3.6.3-.2.2-.3.1-.5-.7-.8-.7-2.2.3-2.8.3-.2.2-.3 0-.6-1.4-1.6-.7-4.1 1.3-4.8 1.6-.6 3.2-.6 4.8-.1.2.1.3.1.5-.1.3-.3.6-.5.9-.7.5-.3 1.1-.3 1.4 0 .3.4.3.9-.2 1.3-.7.5-.8 1-.6 1.9.4 1.5-.6 2.9-2.1 3.4-1.3.5-2.7.5-4 .2-.3-.1-.5-.1-.6.2-.1.3-.1.6.2.8.2.1.5.2.8.2h2zm-.6-2.7c.3 0 .5 0 .7-.1.8-.2 1.3-.7 1.4-1.4.1-.7-.3-1.3-.9-1.6-.8-.3-1.6-.3-2.4 0-1 .4-1.2 1.7-.6 2.4.5.6 1.2.7 1.8.7zm-.2 4.6h-1.8c-.4 0-.6.2-.7.5-.3.7.1 1.2.9 1.4 1.2.2 2.5.2 3.7-.1l.6-.3c.5-.3.4-1.1-.1-1.3-.2-.1-.5-.2-.7-.2h-1.9zm58.6-3.3h-3.2c-.3 0-.3.1-.3.4.2 1.2 1.3 2.1 2.8 2.3 1.1.1 2.1-.1 2.9-.9.2-.2.4-.3.6-.4.4-.2.8-.2 1.1.1.4.3.4.7.3 1.1-.3.9-.9 1.4-1.7 1.8-2.3 1-4.5.9-6.5-.6-1-.7-1.5-1.8-1.7-3-.3-1.7-.2-3.3.8-4.7 1.3-1.8 3.1-2.4 5.2-2.1 2 .3 3.4 1.3 4 3.2.2.6.3 1.2.2 1.8-.1.8-.4 1.1-1.2 1.1-1.1-.1-2.2-.1-3.3-.1zm-.7-1.9h2.4c.4 0 .4-.1.4-.5-.3-1.1-1.2-1.9-2.5-2-1.5-.1-2.6.6-3.1 1.9-.2.5-.1.6.4.6h2.4zm-23 6.7c-3.3 0-5.5-2.2-5.6-5.5 0-3.2 2.2-5.6 5.4-5.6 3.4 0 5.7 2.2 5.8 5.5 0 3.4-2.2 5.6-5.6 5.6zm0-2.1c1.9 0 3.2-1.3 3.3-3.3.1-2-1.3-3.4-3.2-3.4-1.8 0-3.2 1.4-3.2 3.3-.1 1.9 1.2 3.4 3.1 3.4zm-22.6 2.1c-1.1 0-2.4-.3-3.5-1.4-.3-.4-.6-.8-.7-1.3 0-.4.1-.7.4-.9.3-.2.7-.2 1 0 .3.2.6.4.8.6.9.9 2 1.1 3.2.9.6-.1 1-.5 1-1 .1-.5-.2-1-.8-1.2-.7-.3-1.4-.3-2.1-.5-.8-.2-1.6-.4-2.2-.9-1.5-1.2-1.4-3.5.2-4.6 1.2-.8 2.6-.9 4-.7 1 .1 1.9.5 2.6 1.2.3.3.4.6.5.9.1.4 0 .7-.3 1-.3.3-.7.3-1 .1-.4-.2-.7-.5-1.1-.8-.8-.6-1.7-.8-2.7-.5-.6.1-.9.5-.9 1s.3.9.8 1.1c.9.3 1.9.4 2.9.7.6.2 1.1.4 1.5.8 1.5 1.4 1.1 4.1-.9 5.1-.7.3-1.5.4-2.7.4zm-30.3 0c-1.5 0-3-.3-4.1-1.5-.3-.3-.4-.6-.5-1-.1-.4-.1-.8.3-1.1.4-.2.9-.2 1.3.1.3.2.6.5.8.7.9.8 1.9.9 3 .7.6-.1.9-.5.9-1.1 0-.5-.3-1-.8-1.2l-2.7-.6c-1.1-.3-2-.8-2.4-2-.6-1.7.4-3.4 2.2-3.9 1.7-.5 3.3-.3 4.8.5.6.3 1 .8 1.2 1.4.1.4.1.9-.3 1.1-.4.3-.8.2-1.2-.1-.4-.3-.7-.7-1.2-.9-.8-.4-1.5-.5-2.4-.3-.5.1-.8.4-.8.9s.2.8.7 1c.7.3 1.4.3 2.1.5.8.2 1.5.3 2.2.8 1.2.8 1.5 2.5.9 3.8-.7 1.4-1.9 1.8-3.3 2-.3.2-.5.2-.7.2zM78 15.8v-2.6c0-.3-.1-.4-.4-.4h-1.3c-.6-.1-.9-.5-.9-1s.4-1 .9-1h1.3c.3 0 .4-.1.4-.4V8.9c0-.7.5-1.1 1.1-1.2.6 0 1.1.4 1.2 1v.6c0 .4-.2 1 .1 1.3.3.3.9.1 1.3.1h1.6c.4 0 .7.3.8.8.1.4-.1.8-.4 1.1-.3.2-.6.2-.9.2h-2.1c-.3 0-.4 0-.4.4v4.7c0 1.1.9 1.6 1.9 1.1.3-.1.5-.3.7-.5.4-.3.8-.3 1.2 0 .4.3.4.8.2 1.2-.3.7-.9 1.1-1.5 1.3-1.3.5-2.6.5-3.8-.4-.7-.6-1-1.4-1.1-2.4.1-.7.1-1.6.1-2.4zm24.7-4.1c.8-1 1.8-1.4 3-1.3.7.1 1.4.3 1.9.9.3.4.5.9.4 1.5-.1.4-.3.7-.7.9-.5.2-.9 0-1.3-.3-.7-.7-1.3-.9-2.1-.5-.5.3-.8.7-1 1.3-.2.5-.3 1.1-.3 1.6v4.5c0 .5-.2.9-.6 1.1-.4.2-.8.2-1.2-.1-.4-.3-.5-.7-.5-1.1v-8.4c0-.7.4-1.2 1-1.3.7-.1 1.1.3 1.3 1.1.1-.1.1 0 .1.1zm-54 4.2v4.3c0 .8-.6 1.3-1.4 1.2-.5-.1-.9-.5-.9-1.1v-8.7c0-.7.5-1.1 1.2-1.1s1.1.4 1.2 1.2c-.1 1.3-.1 2.8-.1 4.2zm.3-8.2c0 .8-.6 1.4-1.4 1.4-.8 0-1.5-.6-1.5-1.4 0-.8.7-1.4 1.5-1.4s1.4.6 1.4 1.4z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div class=\"title\">\n\t\t\t\t\t<span class=\"sigstore\">sigstore </span>\n\t\t\t\t\t<span>authentication successful!</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span>You may now close this page.</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"anchor\">\n\t\t\t\t<div class=\"links\">\n\t\t\t\t\t<a href=\"https://sigstore.dev/\" class=\"link login\"><span class=\"sigstore\">sigstore</span> home <span class=\"arrow\">→</span></a>\n\t\t\t\t\t<a href=\"https://docs.sigstore.dev/\" class=\"link login\"><span class=\"sigstore\">sigstore</span> documentation <span class=\"arrow\">→</span></a>\n\t\t\t\t\t<a href=\"https://blog.sigstore.dev/\" class=\"link\"><span class=\"sigstore\">sigstore</span> blog <span class=\"arrow\">→</span></a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<script>\n\t\t\tdocument.getElementById(\"favicon\").setAttribute(\"href\", \"data:image/svg+xml,\" + encodeURIComponent(document.getElementById(\"logo\").outerHTML));\n\t\t</script>\n\t</body>\n</html>\n`\n)\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/client_credentials.go",
    "content": "//\n// Copyright 2024 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage oauthflow\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/coreos/go-oidc/v3/oidc\"\n\t\"golang.org/x/oauth2\"\n)\n\n// CodeURL fetches the client credentials token authorization endpoint URL from the provider's well-known configuration endpoint\nfunc (d *DefaultFlowClientCredentials) CodeURL() (string, error) {\n\tif d.codeURL != \"\" {\n\t\treturn d.codeURL, nil\n\t}\n\n\twellKnown := strings.TrimSuffix(d.Issuer, \"/\") + \"/.well-known/openid-configuration\"\n\t/* #nosec */\n\thttpClient := &http.Client{\n\t\tTimeout: 3 * time.Second,\n\t}\n\tresp, err := httpClient.Get(wellKnown)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to read response body: %w\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"%s: %s\", resp.Status, body)\n\t}\n\n\tproviderConfig := struct {\n\t\tIssuer        string `json:\"issuer\"`\n\t\tTokenEndpoint string `json:\"token_endpoint\"`\n\t}{}\n\tif err = json.Unmarshal(body, &providerConfig); err != nil {\n\t\treturn \"\", fmt.Errorf(\"oidc: failed to decode provider discovery object: %w\", err)\n\t}\n\n\tif d.Issuer != providerConfig.Issuer {\n\t\treturn \"\", fmt.Errorf(\"oidc: issuer did not match the issuer returned by provider, expected %q got %q\", d.Issuer, providerConfig.Issuer)\n\t}\n\n\tif providerConfig.TokenEndpoint == \"\" {\n\t\treturn \"\", fmt.Errorf(\"oidc: client credentials token authorization endpoint not returned by provider\")\n\t}\n\n\td.codeURL = providerConfig.TokenEndpoint\n\treturn d.codeURL, nil\n}\n\n// DefaultFlowClientCredentials fetches an OIDC Identity token using the Client Credentials Grant flow as specified in RFC8628\ntype DefaultFlowClientCredentials struct {\n\tIssuer  string\n\tcodeURL string\n}\n\n// NewClientCredentialsFlow creates a new DefaultFlowClientCredentials that retrieves an OIDC Identity Token using a Client Credentials Grant\nfunc NewClientCredentialsFlow(issuer string) *DefaultFlowClientCredentials {\n\treturn &DefaultFlowClientCredentials{\n\t\tIssuer: issuer,\n\t}\n}\n\nfunc (d *DefaultFlowClientCredentials) clientCredentialsFlow(_ *oidc.Provider, clientID, clientSecret, redirectURL string) (string, error) {\n\tdata := url.Values{\n\t\t\"client_id\":     []string{clientID},\n\t\t\"client_secret\": []string{clientSecret},\n\t\t\"scope\":         []string{\"openid email\"},\n\t\t\"grant_type\":    []string{\"client_credentials\"},\n\t}\n\tif redirectURL != \"\" {\n\t\t// If a redirect uri is provided then use it\n\t\tdata[\"redirect_uri\"] = []string{redirectURL}\n\t}\n\n\tcodeURL, err := d.CodeURL()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t/* #nosec */\n\tresp, err := http.PostForm(codeURL, data)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tb, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"%s: %s\", resp.Status, b)\n\t}\n\n\ttr := tokenResp{}\n\tif err := json.Unmarshal(b, &tr); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif tr.IDToken != \"\" {\n\t\tfmt.Println(\"Token received!\")\n\t\treturn tr.IDToken, nil\n\t}\n\n\treturn \"\", fmt.Errorf(\"unexpected error in client flow: %s\", tr.Error)\n}\n\n// GetIDToken gets an OIDC ID Token from the specified provider using the Client Credentials Grant flow\nfunc (d *DefaultFlowClientCredentials) GetIDToken(p *oidc.Provider, cfg oauth2.Config) (*OIDCIDToken, error) {\n\tidToken, err := d.clientCredentialsFlow(p, cfg.ClientID, cfg.ClientSecret, cfg.RedirectURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tverifier := p.Verifier(&oidc.Config{ClientID: cfg.ClientID})\n\tparsedIDToken, err := verifier.Verify(context.Background(), idToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsubj, err := SubjectFromToken(parsedIDToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &OIDCIDToken{\n\t\tRawString: idToken,\n\t\tSubject:   subj,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/device.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package oauthflow implements OAuth/OIDC support for device and token flows\npackage oauthflow\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/coreos/go-oidc/v3/oidc\"\n\t\"golang.org/x/oauth2\"\n)\n\nconst (\n\t// SigstoreDeviceURL specifies the Device Code endpoint for the public good Sigstore service\n\t/* #nosec */\n\t// Deprecated: this constant (while correct) should not be used\n\tSigstoreDeviceURL = \"https://oauth2.sigstore.dev/auth/device/code\"\n\t// SigstoreTokenURL specifies the Token endpoint for the public good Sigstore service\n\t/* #nosec */\n\t// Deprecated: this constant (while correct) should not be used\n\tSigstoreTokenURL = \"https://oauth2.sigstore.dev/auth/device/token\"\n)\n\ntype deviceResp struct {\n\tDeviceCode              string `json:\"device_code\"`\n\tUserCode                string `json:\"user_code\"`\n\tVerificationURI         string `json:\"verification_uri\"`\n\tVerificationURIComplete string `json:\"verification_uri_complete\"`\n\tInterval                int    `json:\"interval\"`\n\tExpiresIn               int    `json:\"expires_in\"`\n}\n\ntype tokenResp struct {\n\tIDToken string `json:\"id_token\"`\n\tError   string `json:\"error\"`\n}\n\n// DeviceFlowTokenGetter fetches an OIDC Identity token using the Device Code Grant flow as specified in RFC8628\ntype DeviceFlowTokenGetter struct {\n\tMessagePrinter func(string)\n\tSleeper        func(time.Duration)\n\tIssuer         string\n\tcodeURL        string\n}\n\n// NewDeviceFlowTokenGetter creates a new DeviceFlowTokenGetter that retrieves an OIDC Identity Token using a Device Code Grant\n// Deprecated: NewDeviceFlowTokenGetter is deprecated; use NewDeviceFlowTokenGetterForIssuer() instead\nfunc NewDeviceFlowTokenGetter(issuer, codeURL, _ string) *DeviceFlowTokenGetter {\n\treturn &DeviceFlowTokenGetter{\n\t\tMessagePrinter: func(s string) { fmt.Println(s) },\n\t\tSleeper:        time.Sleep,\n\t\tIssuer:         issuer,\n\t\tcodeURL:        codeURL,\n\t}\n}\n\n// NewDeviceFlowTokenGetterForIssuer creates a new DeviceFlowTokenGetter that retrieves an OIDC Identity Token using a Device Code Grant\nfunc NewDeviceFlowTokenGetterForIssuer(issuer string) *DeviceFlowTokenGetter {\n\treturn &DeviceFlowTokenGetter{\n\t\tMessagePrinter: func(s string) { fmt.Println(s) },\n\t\tSleeper:        time.Sleep,\n\t\tIssuer:         issuer,\n\t}\n}\n\nfunc (d *DeviceFlowTokenGetter) deviceFlow(p *oidc.Provider, clientID, redirectURL string) (string, error) {\n\t// require that OIDC provider support PKCE to provide sufficient security for the CLI\n\tpkce, err := NewPKCE(p)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tdata := url.Values{\n\t\t\"client_id\":             []string{clientID},\n\t\t\"scope\":                 []string{\"openid email\"},\n\t\t\"code_challenge_method\": []string{pkce.Method},\n\t\t\"code_challenge\":        []string{pkce.Challenge},\n\t}\n\tif redirectURL != \"\" {\n\t\t// If a redirect uri is provided then use it\n\t\tdata[\"redirect_uri\"] = []string{redirectURL}\n\t}\n\n\tcodeURL, err := d.CodeURL()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t/* #nosec */\n\tresp, err := http.PostForm(codeURL, data)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tb, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"%s: %s\", resp.Status, b)\n\t}\n\n\tparsed := deviceResp{}\n\tif err := json.Unmarshal(b, &parsed); err != nil {\n\t\treturn \"\", err\n\t}\n\turi := parsed.VerificationURIComplete\n\tif uri == \"\" {\n\t\turi = parsed.VerificationURI\n\t}\n\td.MessagePrinter(fmt.Sprintf(\"Enter the verification code %s in your browser at: %s\", parsed.UserCode, uri))\n\td.MessagePrinter(fmt.Sprintf(\"Code will be valid for %d seconds\", parsed.ExpiresIn))\n\n\tfor {\n\t\t// Some providers use a secret here, we don't need for sigstore oauth one so leave it off.\n\t\tdata := url.Values{\n\t\t\t\"grant_type\":    []string{\"urn:ietf:params:oauth:grant-type:device_code\"},\n\t\t\t\"client_id\":     []string{clientID},\n\t\t\t\"device_code\":   []string{parsed.DeviceCode},\n\t\t\t\"scope\":         []string{\"openid email\"},\n\t\t\t\"code_verifier\": []string{pkce.Value},\n\t\t}\n\n\t\t/* #nosec */\n\t\tresp, err := http.PostForm(p.Endpoint().TokenURL, data)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tdefer resp.Body.Close()\n\n\t\tb, err := io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\ttr := tokenResp{}\n\t\tif err := json.Unmarshal(b, &tr); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\tif tr.IDToken != \"\" {\n\t\t\td.MessagePrinter(\"Token received!\")\n\t\t\treturn tr.IDToken, nil\n\t\t}\n\t\tswitch tr.Error {\n\t\tcase \"access_denied\", \"expired_token\":\n\t\t\treturn \"\", fmt.Errorf(\"error obtaining token: %s\", tr.Error)\n\t\tcase \"authorization_pending\":\n\t\t\td.Sleeper(time.Duration(parsed.Interval) * time.Second)\n\t\tcase \"slow_down\":\n\t\t\t// Add ten seconds if we got told to slow down\n\t\t\td.Sleeper(time.Duration(parsed.Interval)*time.Second + 10*time.Second)\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"unexpected error in device flow: %s\", tr.Error)\n\t\t}\n\t}\n}\n\n// GetIDToken gets an OIDC ID Token from the specified provider using the device code grant flow\nfunc (d *DeviceFlowTokenGetter) GetIDToken(p *oidc.Provider, cfg oauth2.Config) (*OIDCIDToken, error) {\n\tidToken, err := d.deviceFlow(p, cfg.ClientID, cfg.RedirectURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tverifier := p.Verifier(&oidc.Config{ClientID: cfg.ClientID})\n\tparsedIDToken, err := verifier.Verify(context.Background(), idToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsubj, err := SubjectFromToken(parsedIDToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &OIDCIDToken{\n\t\tRawString: idToken,\n\t\tSubject:   subj,\n\t}, nil\n}\n\n// CodeURL fetches the device authorization endpoint URL from the provider's well-known configuration endpoint\nfunc (d *DeviceFlowTokenGetter) CodeURL() (string, error) {\n\tif d.codeURL != \"\" {\n\t\treturn d.codeURL, nil\n\t}\n\n\twellKnown := strings.TrimSuffix(d.Issuer, \"/\") + \"/.well-known/openid-configuration\"\n\t/* #nosec */\n\thttpClient := &http.Client{\n\t\tTimeout: 3 * time.Second,\n\t}\n\tresp, err := httpClient.Get(wellKnown)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to read response body: %w\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"%s: %s\", resp.Status, body)\n\t}\n\n\tproviderConfig := struct {\n\t\tIssuer         string `json:\"issuer\"`\n\t\tDeviceEndpoint string `json:\"device_authorization_endpoint\"`\n\t}{}\n\tif err = json.Unmarshal(body, &providerConfig); err != nil {\n\t\treturn \"\", fmt.Errorf(\"oidc: failed to decode provider discovery object: %w\", err)\n\t}\n\n\tif d.Issuer != providerConfig.Issuer {\n\t\treturn \"\", fmt.Errorf(\"oidc: issuer did not match the issuer returned by provider, expected %q got %q\", d.Issuer, providerConfig.Issuer)\n\t}\n\n\tif providerConfig.DeviceEndpoint == \"\" {\n\t\treturn \"\", fmt.Errorf(\"oidc: device authorization endpoint not returned by provider\")\n\t}\n\n\td.codeURL = providerConfig.DeviceEndpoint\n\treturn d.codeURL, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/doc.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package oauthflow contains utilities to obtain OAuth2/OIDC tokens.\npackage oauthflow\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/flow.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage oauthflow\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"log\"\n\n\t\"github.com/coreos/go-oidc/v3/oidc\"\n\t\"github.com/go-jose/go-jose/v4\"\n\tsoauth \"github.com/sigstore/sigstore/pkg/oauth\"\n\t\"golang.org/x/oauth2\"\n)\n\nconst (\n\t// PublicInstanceGithubAuthSubURL Default connector ids used by `oauth2.sigstore.dev` for Github\n\tPublicInstanceGithubAuthSubURL = \"https://github.com/login/oauth\"\n\t// PublicInstanceGoogleAuthSubURL Default connector ids used by `oauth2.sigstore.dev` for Google\n\tPublicInstanceGoogleAuthSubURL = \"https://accounts.google.com\"\n\t// PublicInstanceMicrosoftAuthSubURL Default connector ids used by `oauth2.sigstore.dev` for Microsoft\n\tPublicInstanceMicrosoftAuthSubURL = \"https://login.microsoftonline.com\"\n)\n\n// TokenGetter provides a way to get an OIDC ID Token from an OIDC IdP\ntype TokenGetter interface {\n\tGetIDToken(provider *oidc.Provider, config oauth2.Config) (*OIDCIDToken, error)\n}\n\n// OIDCIDToken represents an OIDC Identity Token\ntype OIDCIDToken struct {\n\tRawString string // RawString provides the raw token (a base64-encoded JWT) value\n\tSubject   string // Subject is the extracted subject from the raw token\n}\n\n// init\nfunc init() {\n\t// set the default HTML page for the DefaultIDTokenGetter\n\thtmlPage, err := soauth.GetInteractiveSuccessHTML(false, 10)\n\tif err != nil {\n\t\tlog.Print(\"failed to get interactive success html, defaulting to original static page\")\n\t} else {\n\t\tDefaultIDTokenGetter.HTMLPage = htmlPage\n\t}\n}\n\n// ConnectorIDOpt requests the value of prov as a the connector_id (either on URL or in form body) on the initial request;\n// this is used by Dex\nfunc ConnectorIDOpt(prov string) oauth2.AuthCodeOption {\n\treturn oauth2.SetAuthURLParam(\"connector_id\", prov)\n}\n\n// DefaultIDTokenGetter is the default implementation.\n// The HTML page and message printed to the terminal can be customized.\nvar DefaultIDTokenGetter = &InteractiveIDTokenGetter{\n\tHTMLPage: soauth.InteractiveSuccessHTML,\n}\n\n// PublicInstanceGithubIDTokenGetter is a `oauth2.sigstore.dev` flow selecting github as an Idp\n// Flow is based on `DefaultIDTokenGetter` fields\nvar PublicInstanceGithubIDTokenGetter = &InteractiveIDTokenGetter{\n\tHTMLPage:           DefaultIDTokenGetter.HTMLPage,\n\tExtraAuthURLParams: []oauth2.AuthCodeOption{ConnectorIDOpt(PublicInstanceGithubAuthSubURL)},\n}\n\n// PublicInstanceGoogleIDTokenGetter is a `oauth2.sigstore.dev` flow selecting github as an Idp\n// Flow is based on `DefaultIDTokenGetter` fields\nvar PublicInstanceGoogleIDTokenGetter = &InteractiveIDTokenGetter{\n\tHTMLPage:           DefaultIDTokenGetter.HTMLPage,\n\tExtraAuthURLParams: []oauth2.AuthCodeOption{ConnectorIDOpt(PublicInstanceGoogleAuthSubURL)},\n}\n\n// PublicInstanceMicrosoftIDTokenGetter is a `oauth2.sigstore.dev` flow selecting microsoft as an Idp\n// Flow is based on `DefaultIDTokenGetter` fields\nvar PublicInstanceMicrosoftIDTokenGetter = &InteractiveIDTokenGetter{\n\tHTMLPage:           DefaultIDTokenGetter.HTMLPage,\n\tExtraAuthURLParams: []oauth2.AuthCodeOption{ConnectorIDOpt(PublicInstanceMicrosoftAuthSubURL)},\n}\n\n// OIDConnect requests an OIDC Identity Token from the specified issuer using the specified client credentials and TokenGetter\n// NOTE: If the redirectURL is empty a listener on localhost:0 is configured with '/auth/callback' as default path.\nfunc OIDConnect(issuer, id, secret, redirectURL string, tg TokenGetter) (*OIDCIDToken, error) {\n\t// Check if it's a StaticTokenGetter since NewProvider below will make\n\t// network calls unnecessarily and they are ignored.\n\tif sg, ok := tg.(*StaticTokenGetter); ok {\n\t\treturn sg.GetIDToken(nil, oauth2.Config{})\n\t}\n\tprovider, err := oidc.NewProvider(context.Background(), issuer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconfig := oauth2.Config{\n\t\tClientID:     id,\n\t\tClientSecret: secret,\n\t\tEndpoint:     provider.Endpoint(),\n\t\tScopes:       []string{oidc.ScopeOpenID, \"email\"},\n\t\tRedirectURL:  redirectURL,\n\t}\n\n\treturn tg.GetIDToken(provider, config)\n}\n\ntype stringAsBool bool\n\nfunc (sb *stringAsBool) UnmarshalJSON(b []byte) error {\n\tswitch string(b) {\n\tcase \"true\", `\"true\"`, \"True\", `\"True\"`:\n\t\t*sb = true\n\tcase \"false\", `\"false\"`, \"False\", `\"False\"`:\n\t\t*sb = false\n\tdefault:\n\t\treturn errors.New(\"invalid value for boolean\")\n\t}\n\treturn nil\n}\n\ntype claims struct {\n\tEmail    string       `json:\"email\"`\n\tVerified stringAsBool `json:\"email_verified\"`\n\tSubject  string       `json:\"sub\"`\n}\n\n// SubjectFromToken extracts the subject claim from an OIDC Identity Token\nfunc SubjectFromToken(tok *oidc.IDToken) (string, error) {\n\tclaims := claims{}\n\tif err := tok.Claims(&claims); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn subjectFromClaims(claims)\n}\n\n// SubjectFromUnverifiedToken extracts the subject claim from the raw bytes of\n// an OIDC identity token.\nfunc SubjectFromUnverifiedToken(tok []byte) (string, error) {\n\tclaims := claims{}\n\tif err := json.Unmarshal(tok, &claims); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn subjectFromClaims(claims)\n}\n\nfunc subjectFromClaims(c claims) (string, error) {\n\tif c.Email != \"\" {\n\t\tif !c.Verified {\n\t\t\treturn \"\", errors.New(\"not verified by identity provider\")\n\t\t}\n\t\treturn c.Email, nil\n\t}\n\n\tif c.Subject == \"\" {\n\t\treturn \"\", errors.New(\"no subject found in claims\")\n\t}\n\treturn c.Subject, nil\n}\n\n// StaticTokenGetter is a token getter that works on a JWT that is already known\ntype StaticTokenGetter struct {\n\tRawToken string\n}\n\n// https://datatracker.ietf.org/doc/html/rfc7518#section-3.1\nvar allowedSignatureAlgorithms = []jose.SignatureAlgorithm{\n\tjose.ES256,\n\tjose.ES384,\n\tjose.ES512,\n\tjose.RS256,\n\tjose.RS384,\n\tjose.RS512,\n\tjose.PS256,\n\tjose.PS384,\n\tjose.PS512,\n\tjose.EdDSA,\n\tjose.HS256,\n\tjose.HS384,\n\tjose.HS512,\n}\n\n// GetIDToken extracts an OIDCIDToken from the raw token *without verification*\nfunc (stg *StaticTokenGetter) GetIDToken(_ *oidc.Provider, _ oauth2.Config) (*OIDCIDToken, error) {\n\tunsafeTok, err := jose.ParseSigned(stg.RawToken, allowedSignatureAlgorithms)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// THIS LOGIC IS GENERALLY UNSAFE BUT OK HERE\n\t// We are only parsing the id-token passed directly to a command line tool by a user, so it is trusted locally.\n\t// We need to extract the email address to attach an additional signed proof to the server.\n\t// THE SERVER WILL DO REAL VERIFICATION HERE\n\tunsafePayload := unsafeTok.UnsafePayloadWithoutVerification()\n\tclaims := claims{}\n\tif err := json.Unmarshal(unsafePayload, &claims); err != nil {\n\t\treturn nil, err\n\t}\n\n\tsubj, err := subjectFromClaims(claims)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &OIDCIDToken{\n\t\tRawString: stg.RawToken,\n\t\tSubject:   subj,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/interactive.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage oauthflow\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/coreos/go-oidc/v3/oidc\"\n\t\"github.com/pkg/browser\"\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"golang.org/x/oauth2\"\n)\n\nconst oobRedirectURI = \"urn:ietf:wg:oauth:2.0:oob\"\n\nvar browserOpener = browser.OpenURL\n\n// InteractiveIDTokenGetter is a type to get ID tokens for oauth flows\ntype InteractiveIDTokenGetter struct {\n\tHTMLPage           string\n\tExtraAuthURLParams []oauth2.AuthCodeOption\n\tInput              io.Reader\n\tOutput             io.Writer\n}\n\n// GetIDToken gets an OIDC ID Token from the specified provider using an interactive browser session\nfunc (i *InteractiveIDTokenGetter) GetIDToken(p *oidc.Provider, cfg oauth2.Config) (*OIDCIDToken, error) {\n\t// generate random fields and save them for comparison after OAuth2 dance\n\tstateToken := cryptoutils.GenerateRandomURLSafeString(128)\n\tnonce := cryptoutils.GenerateRandomURLSafeString(128)\n\n\tdoneCh := make(chan string)\n\terrCh := make(chan error)\n\t// starts listener using the redirect_uri, otherwise starts on ephemeral port\n\tredirectServer, redirectURL, err := startRedirectListener(stateToken, i.HTMLPage, cfg.RedirectURL, doneCh, errCh)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"starting redirect listener: %w\", err)\n\t}\n\tdefer func() {\n\t\tgo func() {\n\t\t\t_ = redirectServer.Shutdown(context.Background())\n\t\t}()\n\t}()\n\n\tcfg.RedirectURL = redirectURL.String()\n\n\t// require that OIDC provider support PKCE to provide sufficient security for the CLI\n\tpkce, err := NewPKCE(p)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\topts := append(pkce.AuthURLOpts(), oauth2.AccessTypeOnline, oidc.Nonce(nonce))\n\tif len(i.ExtraAuthURLParams) > 0 {\n\t\topts = append(opts, i.ExtraAuthURLParams...)\n\t}\n\tauthCodeURL := cfg.AuthCodeURL(stateToken, opts...)\n\tvar code string\n\tif err := browserOpener(authCodeURL); err != nil {\n\t\t// Swap to the out of band flow if we can't open the browser\n\t\tfmt.Fprintf(i.GetOutput(), \"error opening browser: %v\\n\", err)\n\t\tcode = i.doOobFlow(&cfg, stateToken, opts)\n\t} else {\n\t\tfmt.Fprintf(i.GetOutput(), \"Your browser will now be opened to:\\n%s\\n\", authCodeURL)\n\t\tcode, err = getCode(doneCh, errCh)\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(i.GetOutput(), \"error getting code from local server: %v\\n\", err)\n\t\t\tcode = i.doOobFlow(&cfg, stateToken, opts)\n\t\t}\n\t}\n\ttoken, err := cfg.Exchange(context.Background(), code, append(pkce.TokenURLOpts(), oidc.Nonce(nonce))...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// requesting 'openid' scope should ensure an id_token is given when exchanging the code for an access token\n\tidToken, ok := token.Extra(\"id_token\").(string)\n\tif !ok {\n\t\treturn nil, errors.New(\"id_token not present\")\n\t}\n\n\t// verify nonce, client ID, access token hash before using it\n\tverifier := p.Verifier(&oidc.Config{ClientID: cfg.ClientID})\n\tparsedIDToken, err := verifier.Verify(context.Background(), idToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif parsedIDToken.Nonce != nonce {\n\t\treturn nil, errors.New(\"nonce does not match value sent\")\n\t}\n\tif parsedIDToken.AccessTokenHash != \"\" {\n\t\tif err := parsedIDToken.VerifyAccessToken(token.AccessToken); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\temail, err := SubjectFromToken(parsedIDToken)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturnToken := OIDCIDToken{\n\t\tRawString: idToken,\n\t\tSubject:   email,\n\t}\n\treturn &returnToken, nil\n}\n\nfunc (i *InteractiveIDTokenGetter) doOobFlow(cfg *oauth2.Config, stateToken string, opts []oauth2.AuthCodeOption) string {\n\tcfg.RedirectURL = oobRedirectURI\n\n\tauthURL := cfg.AuthCodeURL(stateToken, opts...)\n\tfmt.Fprintln(i.GetOutput(), \"Go to the following link in a browser:\\n\\n\\t\", authURL)\n\tfmt.Fprintf(i.GetOutput(), \"Enter verification code: \")\n\tvar code string\n\t_, _ = fmt.Fscanf(i.GetInput(), \"%s\", &code)\n\t// New line in case read input doesn't move cursor to next line.\n\tfmt.Fprintln(i.GetOutput())\n\treturn code\n}\n\n// GetInput returns the input reader for the token getter. If one is not set,\n// it defaults to stdin.\nfunc (i *InteractiveIDTokenGetter) GetInput() io.Reader {\n\tif i.Input == nil {\n\t\treturn os.Stdin\n\t}\n\treturn i.Input\n}\n\n// GetOutput returns the output writer for the token getter. If one is not set,\n// it defaults to stderr.\nfunc (i *InteractiveIDTokenGetter) GetOutput() io.Writer {\n\tif i.Output == nil {\n\t\treturn os.Stderr\n\t}\n\treturn i.Output\n}\n\nfunc startRedirectListener(state, htmlPage, redirectURL string, doneCh chan string, errCh chan error) (*http.Server, *url.URL, error) {\n\tvar listener net.Listener\n\tvar urlListener *url.URL\n\tvar err error\n\n\tif redirectURL == \"\" {\n\t\tlistener, err = net.Listen(\"tcp\", \"localhost:0\")\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\n\t\taddr, ok := listener.Addr().(*net.TCPAddr)\n\t\tif !ok {\n\t\t\treturn nil, nil, fmt.Errorf(\"listener addr is not TCPAddr\")\n\t\t}\n\n\t\turlListener = &url.URL{\n\t\t\tScheme: \"http\",\n\t\t\tHost:   fmt.Sprintf(\"localhost:%d\", addr.Port),\n\t\t\tPath:   \"/auth/callback\",\n\t\t}\n\t} else {\n\t\turlListener, err = url.Parse(redirectURL)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\n\t\tlistener, err = net.Listen(\"tcp\", urlListener.Host)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\tm := http.NewServeMux()\n\ts := &http.Server{\n\t\tAddr:    urlListener.Host,\n\t\tHandler: m,\n\n\t\t// an arbitrary reasonable value to fix gosec lint error\n\t\tReadHeaderTimeout: 2 * time.Second,\n\t}\n\n\tm.HandleFunc(urlListener.Path, func(w http.ResponseWriter, r *http.Request) {\n\t\t// even though these are fetched from the FormValue method,\n\t\t// these are supplied as query parameters\n\t\tif r.FormValue(\"state\") != state {\n\t\t\terrCh <- errors.New(\"invalid state token\")\n\t\t\treturn\n\t\t}\n\t\tdoneCh <- r.FormValue(\"code\")\n\t\tfmt.Fprint(w, htmlPage)\n\t})\n\n\tgo func() {\n\t\tif err := s.Serve(listener); err != nil && err != http.ErrServerClosed {\n\t\t\terrCh <- err\n\t\t}\n\t}()\n\n\treturn s, urlListener, nil\n}\n\nfunc getCode(doneCh chan string, errCh chan error) (string, error) {\n\ttimeoutCh := time.NewTimer(120 * time.Second)\n\tselect {\n\tcase code := <-doneCh:\n\t\treturn code, nil\n\tcase err := <-errCh:\n\t\treturn \"\", err\n\tcase <-timeoutCh.C:\n\t\treturn \"\", errors.New(\"timeout\")\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/oauthflow/pkce.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage oauthflow\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"regexp\"\n\n\t\"github.com/coreos/go-oidc/v3/oidc\"\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"golang.org/x/oauth2\"\n)\n\nconst (\n\t// PKCES256 is the SHA256 option required by the PKCE RFC\n\tPKCES256 = \"S256\"\n)\n\n// PKCE specifies the challenge and value pair required to fulfill RFC7636\ntype PKCE struct {\n\tChallenge string\n\tMethod    string\n\tValue     string\n}\n\n// NewPKCE creates a new PKCE challenge for the specified provider per its supported methods (obtained through OIDC discovery endpoint)\nfunc NewPKCE(provider *oidc.Provider) (*PKCE, error) {\n\tvar providerClaims struct {\n\t\tCodeChallengeMethodsSupported []string `json:\"code_challenge_methods_supported\"`\n\t}\n\n\tif err := provider.Claims(&providerClaims); err != nil {\n\t\t// will only error out if the JSON was malformed, which shouldn't happen at this point\n\t\treturn nil, err\n\t}\n\n\tvar chosenMethod string\n\tfor _, method := range providerClaims.CodeChallengeMethodsSupported {\n\t\t// per RFC7636, any server that supports PKCE must support S256\n\t\tif method == PKCES256 && chosenMethod != PKCES256 {\n\t\t\tchosenMethod = PKCES256\n\t\t\tbreak\n\t\t} else if method != \"plain\" {\n\t\t\tfmt.Printf(\"Unsupported code challenge method in list: '%v'\", method)\n\t\t}\n\t}\n\tif chosenMethod == \"\" {\n\t\tif providerIsAzureBacked(provider) {\n\t\t\tchosenMethod = PKCES256\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"PKCE is not supported by OIDC provider '%v'\", provider.Endpoint().AuthURL)\n\t\t}\n\t}\n\n\t// The value must meet requirements of RFC 7636:\n\t// (minimum length of 43 characters and a maximum length of 128 characters)\n\t// 384 bits of entropy (48 bytes) to be encoded in base64 URL-safe without padding yields 64 characters.\n\tvalue := cryptoutils.GenerateRandomURLSafeString(384)\n\n\th := sha256.New()\n\t_, _ = h.Write([]byte(value))\n\tchallenge := base64.RawURLEncoding.EncodeToString(h.Sum(nil))\n\n\treturn &PKCE{\n\t\tChallenge: challenge,\n\t\tMethod:    chosenMethod,\n\t\tValue:     value,\n\t}, nil\n}\n\n// AuthURLOpts returns the set of request parameters required during the initial exchange of the OAuth2 flow\nfunc (p *PKCE) AuthURLOpts() []oauth2.AuthCodeOption {\n\treturn []oauth2.AuthCodeOption{\n\t\toauth2.SetAuthURLParam(\"code_challenge_method\", p.Method),\n\t\toauth2.SetAuthURLParam(\"code_challenge\", p.Challenge),\n\t}\n}\n\n// TokenURLOpts returns the set of request parameters required during the token request exchange flow\nfunc (p *PKCE) TokenURLOpts() []oauth2.AuthCodeOption {\n\treturn []oauth2.AuthCodeOption{\n\t\toauth2.SetAuthURLParam(\"code_verifier\", p.Value),\n\t}\n}\n\nvar azureregex = regexp.MustCompile(`^https:\\/\\/login\\.microsoftonline\\.(com|us)\\/`)\n\n// providerIsAzureBacked returns a boolean indicating whether the provider is Azure-backed;\n// Azure supports PKCE but does not advertise it in their OIDC discovery endpoint\nfunc providerIsAzureBacked(p *oidc.Provider) bool {\n\t// Per https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-national-cloud#azure-ad-authentication-endpoints\n\t// if endpoint starts with any of these strings then we should attempt PKCE anyway as their OIDC discovery doc\n\t// does not advertise supporting PKCE but they actually do\n\n\treturn p != nil && azureregex.MatchString(p.Endpoint().AuthURL)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/algorithm_registry.go",
    "content": "//\n// Copyright 2024 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/elliptic\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"fmt\"\n\n\tv1 \"github.com/sigstore/protobuf-specs/gen/pb-go/common/v1\"\n)\n\n// PublicKeyType represents the public key algorithm for a given signature algorithm.\ntype PublicKeyType uint\n\nconst (\n\t// RSA public key\n\tRSA PublicKeyType = iota\n\t// ECDSA public key\n\tECDSA\n\t// ED25519 public key\n\tED25519\n)\n\n// RSAKeySize represents the size of an RSA public key in bits.\ntype RSAKeySize int\n\n// AlgorithmDetails exposes relevant information for a given signature algorithm.\ntype AlgorithmDetails struct {\n\t// knownAlgorithm is the signature algorithm that the following details refer to.\n\tknownAlgorithm v1.PublicKeyDetails\n\n\t// keyType is the public key algorithm being used.\n\tkeyType PublicKeyType\n\n\t// hashType is the hash algorithm being used.\n\thashType crypto.Hash\n\n\t// protoHashType is the hash algorithm being used as a proto message, it must be the protobuf-specs\n\t// v1.HashAlgorithm equivalent of the hashType.\n\tprotoHashType v1.HashAlgorithm\n\n\t// extraKeyParams contains any extra parameters required to check a given public key against this entry.\n\t//\n\t// The underlying type of these parameters is dependent on the keyType.\n\t// For example, ECDSA algorithms will store an elliptic curve here whereas, RSA keys will store the key size.\n\t// Algorithms that don't require any extra parameters leave this set to nil.\n\textraKeyParams interface{}\n\n\t// flagValue is a string representation of the signature algorithm that follows the naming conventions of CLI\n\t// arguments that are used for Sigstore services.\n\tflagValue string\n}\n\n// GetSignatureAlgorithm returns the PublicKeyDetails associated with the algorithm details.\nfunc (a AlgorithmDetails) GetSignatureAlgorithm() v1.PublicKeyDetails {\n\treturn a.knownAlgorithm\n}\n\n// GetKeyType returns the PublicKeyType for the algorithm details.\nfunc (a AlgorithmDetails) GetKeyType() PublicKeyType {\n\treturn a.keyType\n}\n\n// GetHashType returns the hash algorithm that should be used with this algorithm.\nfunc (a AlgorithmDetails) GetHashType() crypto.Hash {\n\treturn a.hashType\n}\n\n// GetProtoHashType is a convenience method to get the protobuf-specs type of the hash algorithm.\nfunc (a AlgorithmDetails) GetProtoHashType() v1.HashAlgorithm {\n\treturn a.protoHashType\n}\n\n// GetRSAKeySize returns the RSA key size for the algorithm details, if the key type is RSA.\nfunc (a AlgorithmDetails) GetRSAKeySize() (RSAKeySize, error) {\n\tif a.keyType != RSA {\n\t\treturn 0, fmt.Errorf(\"unable to retrieve RSA key size for key type: %T\", a.keyType)\n\t}\n\trsaKeySize, ok := a.extraKeyParams.(RSAKeySize)\n\tif !ok {\n\t\t// This should be unreachable.\n\t\treturn 0, fmt.Errorf(\"unable to retrieve key size for RSA, malformed algorithm details?: %T\", a.keyType)\n\t}\n\treturn rsaKeySize, nil\n}\n\n// GetECDSACurve returns the elliptic curve for the algorithm details, if the key type is ECDSA.\nfunc (a AlgorithmDetails) GetECDSACurve() (*elliptic.Curve, error) {\n\tif a.keyType != ECDSA {\n\t\treturn nil, fmt.Errorf(\"unable to retrieve ECDSA curve for key type: %T\", a.keyType)\n\t}\n\tecdsaCurve, ok := a.extraKeyParams.(elliptic.Curve)\n\tif !ok {\n\t\t// This should be unreachable.\n\t\treturn nil, fmt.Errorf(\"unable to retrieve curve for ECDSA, malformed algorithm details?: %T\", a.keyType)\n\t}\n\treturn &ecdsaCurve, nil\n}\n\nfunc (a AlgorithmDetails) checkKey(pubKey crypto.PublicKey) (bool, error) {\n\tswitch a.keyType {\n\tcase RSA:\n\t\trsaKey, ok := pubKey.(*rsa.PublicKey)\n\t\tif !ok {\n\t\t\treturn false, nil\n\t\t}\n\t\tkeySize, err := a.GetRSAKeySize()\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\treturn rsaKey.Size()*8 == int(keySize), nil\n\tcase ECDSA:\n\t\tecdsaKey, ok := pubKey.(*ecdsa.PublicKey)\n\t\tif !ok {\n\t\t\treturn false, nil\n\t\t}\n\t\tcurve, err := a.GetECDSACurve()\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\treturn ecdsaKey.Curve == *curve, nil\n\tcase ED25519:\n\t\t_, ok := pubKey.(ed25519.PublicKey)\n\t\treturn ok, nil\n\t}\n\treturn false, fmt.Errorf(\"unrecognized key type: %T\", a.keyType)\n}\n\nfunc (a AlgorithmDetails) checkHash(hashType crypto.Hash) bool {\n\treturn a.hashType == hashType\n}\n\n// Note that deprecated options in PublicKeyDetails are not included in this\n// list, including PKCS1v1.5 encoded RSA. Refer to the v1.PublicKeyDetails enum\n// for more details.\nvar supportedAlgorithms = []AlgorithmDetails{\n\t{v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_2048_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(2048), \"rsa-sign-pkcs1-2048-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_3072_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(3072), \"rsa-sign-pkcs1-3072-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_4096_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(4096), \"rsa-sign-pkcs1-4096-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_RSA_PSS_2048_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(2048), \"rsa-sign-pss-2048-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_RSA_PSS_3072_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(3072), \"rsa-sign-pss-3072-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_RSA_PSS_4096_SHA256, RSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, RSAKeySize(4096), \"rsa-sign-pss-4092-sha256\"},\n\t{v1.PublicKeyDetails_PKIX_ECDSA_P256_SHA_256, ECDSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, elliptic.P256(), \"ecdsa-sha2-256-nistp256\"},\n\t{v1.PublicKeyDetails_PKIX_ECDSA_P384_SHA_384, ECDSA, crypto.SHA384, v1.HashAlgorithm_SHA2_384, elliptic.P384(), \"ecdsa-sha2-384-nistp384\"},\n\t{v1.PublicKeyDetails_PKIX_ECDSA_P384_SHA_256, ECDSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, elliptic.P384(), \"ecdsa-sha2-256-nistp384\"}, //nolint:staticcheck\n\t{v1.PublicKeyDetails_PKIX_ECDSA_P521_SHA_512, ECDSA, crypto.SHA512, v1.HashAlgorithm_SHA2_512, elliptic.P521(), \"ecdsa-sha2-512-nistp521\"},\n\t{v1.PublicKeyDetails_PKIX_ECDSA_P521_SHA_256, ECDSA, crypto.SHA256, v1.HashAlgorithm_SHA2_256, elliptic.P521(), \"ecdsa-sha2-256-nistp521\"}, //nolint:staticcheck\n\t{v1.PublicKeyDetails_PKIX_ED25519, ED25519, crypto.Hash(0), v1.HashAlgorithm_HASH_ALGORITHM_UNSPECIFIED, nil, \"ed25519\"},\n\t{v1.PublicKeyDetails_PKIX_ED25519_PH, ED25519, crypto.SHA512, v1.HashAlgorithm_SHA2_512, nil, \"ed25519-ph\"},\n}\n\n// AlgorithmRegistryConfig represents a set of permitted algorithms for a given Sigstore service or component.\n//\n// Individual services may wish to restrict what algorithms are allowed to a subset of what is covered in the algorithm\n// registry (represented by v1.PublicKeyDetails).\ntype AlgorithmRegistryConfig struct {\n\tpermittedAlgorithms []AlgorithmDetails\n}\n\n// GetAlgorithmDetails retrieves a set of details for a given v1.PublicKeyDetails flag that allows users to\n// introspect the public key algorithm, hash algorithm and more.\nfunc GetAlgorithmDetails(knownSignatureAlgorithm v1.PublicKeyDetails) (AlgorithmDetails, error) {\n\tfor _, detail := range supportedAlgorithms {\n\t\tif detail.knownAlgorithm == knownSignatureAlgorithm {\n\t\t\treturn detail, nil\n\t\t}\n\t}\n\treturn AlgorithmDetails{}, fmt.Errorf(\"could not find algorithm details for known signature algorithm: %s\", knownSignatureAlgorithm)\n}\n\n// NewAlgorithmRegistryConfig creates a new AlgorithmRegistryConfig for a set of permitted signature algorithms.\nfunc NewAlgorithmRegistryConfig(algorithmConfig []v1.PublicKeyDetails) (*AlgorithmRegistryConfig, error) {\n\tpermittedAlgorithms := make([]AlgorithmDetails, 0, len(supportedAlgorithms))\n\tfor _, algorithm := range algorithmConfig {\n\t\ta, err := GetAlgorithmDetails(algorithm)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpermittedAlgorithms = append(permittedAlgorithms, a)\n\t}\n\treturn &AlgorithmRegistryConfig{permittedAlgorithms: permittedAlgorithms}, nil\n}\n\n// IsAlgorithmPermitted checks whether a given public key/hash algorithm combination is permitted by a registry config.\nfunc (registryConfig AlgorithmRegistryConfig) IsAlgorithmPermitted(key crypto.PublicKey, hash crypto.Hash) (bool, error) {\n\tfor _, algorithm := range registryConfig.permittedAlgorithms {\n\t\tkeyMatch, err := algorithm.checkKey(key)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif keyMatch && algorithm.checkHash(hash) {\n\t\t\treturn true, nil\n\t\t}\n\t}\n\treturn false, nil\n}\n\n// FormatSignatureAlgorithmFlag formats a v1.PublicKeyDetails to a string that conforms to the naming conventions\n// of CLI arguments that are used for Sigstore services.\nfunc FormatSignatureAlgorithmFlag(algorithm v1.PublicKeyDetails) (string, error) {\n\tfor _, a := range supportedAlgorithms {\n\t\tif a.knownAlgorithm == algorithm {\n\t\t\treturn a.flagValue, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"could not find matching flag for signature algorithm: %s\", algorithm)\n}\n\n// ParseSignatureAlgorithmFlag parses a string produced by FormatSignatureAlgorithmFlag and returns the corresponding\n// v1.PublicKeyDetails value.\nfunc ParseSignatureAlgorithmFlag(flag string) (v1.PublicKeyDetails, error) {\n\tfor _, a := range supportedAlgorithms {\n\t\tif a.flagValue == flag {\n\t\t\treturn a.knownAlgorithm, nil\n\t\t}\n\t}\n\treturn v1.PublicKeyDetails_PUBLIC_KEY_DETAILS_UNSPECIFIED, fmt.Errorf(\"could not find matching signature algorithm for flag: %s\", flag)\n}\n\n// GetDefaultPublicKeyDetails returns the default public key details for a given key.\n//\n// RSA 2048 => v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_2048_SHA256\n// RSA 3072 => v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_3072_SHA256\n// RSA 4096 => v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_4096_SHA256\n// ECDSA P256 => v1.PublicKeyDetails_PKIX_ECDSA_P256_SHA_256\n// ECDSA P384 => v1.PublicKeyDetails_PKIX_ECDSA_P384_SHA_384\n// ECDSA P521 => v1.PublicKeyDetails_PKIX_ECDSA_P521_SHA_512\n// ED25519 => v1.PublicKeyDetails_PKIX_ED25519_PH\n//\n// This function accepts LoadOptions, which are used to determine the default\n// public key details when there may be ambiguities. For example, RSA keys may\n// be PSS or PKCS1v1.5 encoded, and ED25519 keys may be used with PureEd25519 or\n// with Ed25519ph. The Hash option is ignored if passed, because each of the\n// supported algorithms already has a default hash.\nfunc GetDefaultPublicKeyDetails(publicKey crypto.PublicKey, opts ...LoadOption) (v1.PublicKeyDetails, error) {\n\tvar rsaPSSOptions *rsa.PSSOptions\n\tvar useED25519ph bool\n\tfor _, o := range opts {\n\t\to.ApplyED25519ph(&useED25519ph)\n\t\to.ApplyRSAPSS(&rsaPSSOptions)\n\t}\n\n\tswitch pk := publicKey.(type) {\n\tcase *rsa.PublicKey:\n\t\tif rsaPSSOptions != nil {\n\t\t\tswitch pk.Size() * 8 {\n\t\t\tcase 2048:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PSS_2048_SHA256, nil\n\t\t\tcase 3072:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PSS_3072_SHA256, nil\n\t\t\tcase 4096:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PSS_4096_SHA256, nil\n\t\t\t}\n\t\t} else {\n\t\t\tswitch pk.Size() * 8 {\n\t\t\tcase 2048:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_2048_SHA256, nil\n\t\t\tcase 3072:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_3072_SHA256, nil\n\t\t\tcase 4096:\n\t\t\t\treturn v1.PublicKeyDetails_PKIX_RSA_PKCS1V15_4096_SHA256, nil\n\t\t\t}\n\t\t}\n\tcase *ecdsa.PublicKey:\n\t\tswitch pk.Curve {\n\t\tcase elliptic.P256():\n\t\t\treturn v1.PublicKeyDetails_PKIX_ECDSA_P256_SHA_256, nil\n\t\tcase elliptic.P384():\n\t\t\treturn v1.PublicKeyDetails_PKIX_ECDSA_P384_SHA_384, nil\n\t\tcase elliptic.P521():\n\t\t\treturn v1.PublicKeyDetails_PKIX_ECDSA_P521_SHA_512, nil\n\t\t}\n\tcase ed25519.PublicKey:\n\t\tif useED25519ph {\n\t\t\treturn v1.PublicKeyDetails_PKIX_ED25519_PH, nil\n\t\t}\n\t\treturn v1.PublicKeyDetails_PKIX_ED25519, nil\n\t}\n\treturn v1.PublicKeyDetails_PUBLIC_KEY_DETAILS_UNSPECIFIED, errors.New(\"unsupported public key type\")\n}\n\n// GetDefaultAlgorithmDetails returns the default algorithm details for a given\n// key, according to GetDefaultPublicKeyDetails.\n//\n// This function accepts LoadOptions, which are used to determine the default\n// algorithm details when there may be ambiguities. For example, RSA keys may be\n// PSS or PKCS1v1.5 encoded, and ED25519 keys may be used with PureEd25519 or\n// with Ed25519ph. The Hash option is ignored if passed, because each of the\n// supported algorithms already has a default hash.\nfunc GetDefaultAlgorithmDetails(publicKey crypto.PublicKey, opts ...LoadOption) (AlgorithmDetails, error) {\n\tknownAlgorithm, err := GetDefaultPublicKeyDetails(publicKey, opts...)\n\tif err != nil {\n\t\treturn AlgorithmDetails{}, err\n\t}\n\treturn GetAlgorithmDetails(knownAlgorithm)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/doc.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package signature contains types and utilities related to Sigstore signatures.\npackage signature\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/ecdsa.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// checked on LoadSigner, LoadVerifier and SignMessage\nvar ecdsaSupportedHashFuncs = []crypto.Hash{\n\tcrypto.SHA256,\n\tcrypto.SHA512,\n\tcrypto.SHA384,\n\tcrypto.SHA224,\n}\n\n// checked on VerifySignature. Supports SHA1 verification.\nvar ecdsaSupportedVerifyHashFuncs = []crypto.Hash{\n\tcrypto.SHA256,\n\tcrypto.SHA512,\n\tcrypto.SHA384,\n\tcrypto.SHA224,\n\tcrypto.SHA1,\n}\n\n// ECDSASigner is a signature.Signer that uses an Elliptic Curve DSA algorithm\ntype ECDSASigner struct {\n\thashFunc crypto.Hash\n\tpriv     *ecdsa.PrivateKey\n}\n\n// LoadECDSASigner calculates signatures using the specified private key and hash algorithm.\n//\n// hf must not be crypto.Hash(0).\nfunc LoadECDSASigner(priv *ecdsa.PrivateKey, hf crypto.Hash) (*ECDSASigner, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"invalid ECDSA private key specified\")\n\t}\n\n\tif !isSupportedAlg(hf, ecdsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &ECDSASigner{\n\t\tpriv:     priv,\n\t\thashFunc: hf,\n\t}, nil\n}\n\n// SignMessage signs the provided message. If the message is provided,\n// this method will compute the digest according to the hash function specified\n// when the ECDSASigner was created.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithRand()\n//\n// - WithDigest()\n//\n// - WithCryptoSignerOpts()\n//\n// All other options are ignored if specified.\nfunc (e ECDSASigner) SignMessage(message io.Reader, opts ...SignOption) ([]byte, error) {\n\tdigest, _, err := ComputeDigestForSigning(message, e.hashFunc, ecdsaSupportedHashFuncs, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trand := selectRandFromOpts(opts...)\n\n\treturn ecdsa.SignASN1(rand, e.priv, digest)\n}\n\n// Public returns the public key that can be used to verify signatures created by\n// this signer.\nfunc (e ECDSASigner) Public() crypto.PublicKey {\n\tif e.priv == nil {\n\t\treturn nil\n\t}\n\n\treturn e.priv.Public()\n}\n\n// PublicKey returns the public key that can be used to verify signatures created by\n// this signer. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ECDSASigner) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.Public(), nil\n}\n\n// Sign computes the signature for the specified digest. If a source of entropy is\n// given in rand, it will be used instead of the default value (rand.Reader from crypto/rand).\n//\n// If opts are specified, the hash function in opts.Hash should be the one used to compute\n// digest. If opts are not specified, the value provided when the signer was created will be used instead.\nfunc (e ECDSASigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {\n\tecdsaOpts := []SignOption{options.WithDigest(digest), options.WithRand(rand)}\n\tif opts != nil {\n\t\tecdsaOpts = append(ecdsaOpts, options.WithCryptoSignerOpts(opts))\n\t}\n\n\treturn e.SignMessage(nil, ecdsaOpts...)\n}\n\n// ECDSAVerifier is a signature.Verifier that uses an Elliptic Curve DSA algorithm\ntype ECDSAVerifier struct {\n\tpublicKey *ecdsa.PublicKey\n\thashFunc  crypto.Hash\n}\n\n// LoadECDSAVerifier returns a Verifier that verifies signatures using the specified\n// ECDSA public key and hash algorithm.\n//\n// hf must not be crypto.Hash(0).\nfunc LoadECDSAVerifier(pub *ecdsa.PublicKey, hashFunc crypto.Hash) (*ECDSAVerifier, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"invalid ECDSA public key specified\")\n\t}\n\n\tif !isSupportedAlg(hashFunc, ecdsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &ECDSAVerifier{\n\t\tpublicKey: pub,\n\t\thashFunc:  hashFunc,\n\t}, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ECDSAVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n\n// VerifySignature verifies the signature for the given message. Unless provided\n// in an option, the digest of the message will be computed using the hash function specified\n// when the ECDSAVerifier was created.\n//\n// This function returns nil if the verification succeeded, and an error message otherwise.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithDigest()\n//\n// All other options are ignored if specified.\nfunc (e ECDSAVerifier) VerifySignature(signature, message io.Reader, opts ...VerifyOption) error {\n\tif e.publicKey == nil {\n\t\treturn errors.New(\"no public key set for ECDSAVerifier\")\n\t}\n\n\tdigest, _, err := ComputeDigestForVerifying(message, e.hashFunc, ecdsaSupportedVerifyHashFuncs, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif signature == nil {\n\t\treturn errors.New(\"nil signature passed to VerifySignature\")\n\t}\n\n\tsigBytes, err := io.ReadAll(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading signature: %w\", err)\n\t}\n\n\t// Without this check, VerifyASN1 panics on an invalid key.\n\tif !e.publicKey.IsOnCurve(e.publicKey.X, e.publicKey.Y) {\n\t\treturn fmt.Errorf(\"invalid ECDSA public key for %s\", e.publicKey.Params().Name)\n\t}\n\n\tasnParseTest := struct {\n\t\tR, S *big.Int\n\t}{}\n\tif _, err := asn1.Unmarshal(sigBytes, &asnParseTest); err == nil {\n\t\tif !ecdsa.VerifyASN1(e.publicKey, digest, sigBytes) {\n\t\t\treturn errors.New(\"invalid signature when validating ASN.1 encoded signature\")\n\t\t}\n\t} else {\n\t\t// deal with IEEE P1363 encoding of signatures\n\t\tif len(sigBytes) == 0 || len(sigBytes) > 132 || len(sigBytes)%2 != 0 {\n\t\t\treturn errors.New(\"ecdsa: Invalid IEEE_P1363 encoded bytes\")\n\t\t}\n\t\tr := new(big.Int).SetBytes(sigBytes[:len(sigBytes)/2])\n\t\ts := new(big.Int).SetBytes(sigBytes[len(sigBytes)/2:])\n\t\tif !ecdsa.Verify(e.publicKey, digest, r, s) {\n\t\t\treturn errors.New(\"invalid signature when validating IEEE_P1363 encoded signature\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// ECDSASignerVerifier is a signature.SignerVerifier that uses an Elliptic Curve DSA algorithm\ntype ECDSASignerVerifier struct {\n\t*ECDSASigner\n\t*ECDSAVerifier\n}\n\n// LoadECDSASignerVerifier creates a combined signer and verifier. This is a convenience object\n// that simply wraps an instance of ECDSASigner and ECDSAVerifier.\nfunc LoadECDSASignerVerifier(priv *ecdsa.PrivateKey, hf crypto.Hash) (*ECDSASignerVerifier, error) {\n\tsigner, err := LoadECDSASigner(priv, hf)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing signer: %w\", err)\n\t}\n\tverifier, err := LoadECDSAVerifier(&priv.PublicKey, hf)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing verifier: %w\", err)\n\t}\n\n\treturn &ECDSASignerVerifier{\n\t\tECDSASigner:   signer,\n\t\tECDSAVerifier: verifier,\n\t}, nil\n}\n\n// NewDefaultECDSASignerVerifier creates a combined signer and verifier using ECDSA.\n//\n// This creates a new ECDSA key using the P-256 curve and uses the SHA256 hashing algorithm.\nfunc NewDefaultECDSASignerVerifier() (*ECDSASignerVerifier, *ecdsa.PrivateKey, error) {\n\treturn NewECDSASignerVerifier(elliptic.P256(), rand.Reader, crypto.SHA256)\n}\n\n// NewECDSASignerVerifier creates a combined signer and verifier using ECDSA.\n//\n// This creates a new ECDSA key using the specified elliptic curve, entropy source, and hashing function.\nfunc NewECDSASignerVerifier(curve elliptic.Curve, rand io.Reader, hashFunc crypto.Hash) (*ECDSASignerVerifier, *ecdsa.PrivateKey, error) {\n\tpriv, err := ecdsa.GenerateKey(curve, rand)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tsv, err := LoadECDSASignerVerifier(priv, hashFunc)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn sv, priv, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ECDSASignerVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/ed25519.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/ed25519\"\n\t\"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\nvar ed25519SupportedHashFuncs = []crypto.Hash{\n\tcrypto.Hash(0),\n}\n\n// ED25519Signer is a signature.Signer that uses the Ed25519 public-key signature system\ntype ED25519Signer struct {\n\tpriv ed25519.PrivateKey\n}\n\n// LoadED25519Signer calculates signatures using the specified private key.\nfunc LoadED25519Signer(priv ed25519.PrivateKey) (*ED25519Signer, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"invalid ED25519 private key specified\")\n\t}\n\n\t// check this to avoid panic and throw error gracefully\n\tif len(priv) != ed25519.PrivateKeySize {\n\t\treturn nil, errors.New(\"invalid size for ED25519 key\")\n\t}\n\n\treturn &ED25519Signer{\n\t\tpriv: priv,\n\t}, nil\n}\n\n// SignMessage signs the provided message. Passing the WithDigest option is not\n// supported as ED25519 performs a two pass hash over the message during the\n// signing process.\n//\n// All options are ignored.\nfunc (e ED25519Signer) SignMessage(message io.Reader, _ ...SignOption) ([]byte, error) {\n\tmessageBytes, _, err := ComputeDigestForSigning(message, crypto.Hash(0), ed25519SupportedHashFuncs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ed25519.Sign(e.priv, messageBytes), nil\n}\n\n// Public returns the public key that can be used to verify signatures created by\n// this signer.\nfunc (e ED25519Signer) Public() crypto.PublicKey {\n\tif e.priv == nil {\n\t\treturn nil\n\t}\n\n\treturn e.priv.Public()\n}\n\n// PublicKey returns the public key that can be used to verify signatures created by\n// this signer. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ED25519Signer) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.Public(), nil\n}\n\n// Sign computes the signature for the specified message; the first and third arguments to this\n// function are ignored as they are not used by the ED25519 algorithm.\nfunc (e ED25519Signer) Sign(_ io.Reader, message []byte, _ crypto.SignerOpts) ([]byte, error) {\n\tif message == nil {\n\t\treturn nil, errors.New(\"message must not be nil\")\n\t}\n\treturn e.SignMessage(bytes.NewReader(message))\n}\n\n// ED25519Verifier is a signature.Verifier that uses the Ed25519 public-key signature system\ntype ED25519Verifier struct {\n\tpublicKey ed25519.PublicKey\n}\n\n// LoadED25519Verifier returns a Verifier that verifies signatures using the specified ED25519 public key.\nfunc LoadED25519Verifier(pub ed25519.PublicKey) (*ED25519Verifier, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"invalid ED25519 public key specified\")\n\t}\n\n\treturn &ED25519Verifier{\n\t\tpublicKey: pub,\n\t}, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e *ED25519Verifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n\n// VerifySignature verifies the signature for the given message.\n//\n// This function returns nil if the verification succeeded, and an error message otherwise.\n//\n// All options are ignored if specified.\nfunc (e *ED25519Verifier) VerifySignature(signature, message io.Reader, _ ...VerifyOption) error {\n\tmessageBytes, _, err := ComputeDigestForVerifying(message, crypto.Hash(0), ed25519SupportedHashFuncs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif signature == nil {\n\t\treturn errors.New(\"nil signature passed to VerifySignature\")\n\t}\n\n\tsigBytes, err := io.ReadAll(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading signature: %w\", err)\n\t}\n\n\tif !ed25519.Verify(e.publicKey, messageBytes, sigBytes) {\n\t\treturn errors.New(\"failed to verify signature\")\n\t}\n\treturn nil\n}\n\n// ED25519SignerVerifier is a signature.SignerVerifier that uses the Ed25519 public-key signature system\ntype ED25519SignerVerifier struct {\n\t*ED25519Signer\n\t*ED25519Verifier\n}\n\n// LoadED25519SignerVerifier creates a combined signer and verifier. This is\n// a convenience object that simply wraps an instance of ED25519Signer and ED25519Verifier.\nfunc LoadED25519SignerVerifier(priv ed25519.PrivateKey) (*ED25519SignerVerifier, error) {\n\tsigner, err := LoadED25519Signer(priv)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing signer: %w\", err)\n\t}\n\tpub, ok := priv.Public().(ed25519.PublicKey)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"given key is not ed25519.PublicKey\")\n\t}\n\tverifier, err := LoadED25519Verifier(pub)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing verifier: %w\", err)\n\t}\n\n\treturn &ED25519SignerVerifier{\n\t\tED25519Signer:   signer,\n\t\tED25519Verifier: verifier,\n\t}, nil\n}\n\n// NewDefaultED25519SignerVerifier creates a combined signer and verifier using ED25519.\n// This creates a new ED25519 key using crypto/rand as an entropy source.\nfunc NewDefaultED25519SignerVerifier() (*ED25519SignerVerifier, ed25519.PrivateKey, error) {\n\treturn NewED25519SignerVerifier(rand.Reader)\n}\n\n// NewED25519SignerVerifier creates a combined signer and verifier using ED25519.\n// This creates a new ED25519 key using the specified entropy source.\nfunc NewED25519SignerVerifier(rand io.Reader) (*ED25519SignerVerifier, ed25519.PrivateKey, error) {\n\t_, priv, err := ed25519.GenerateKey(rand)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tsv, err := LoadED25519SignerVerifier(priv)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn sv, priv, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ED25519SignerVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/ed25519ph.go",
    "content": "//\n// Copyright 2024 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ed25519\"\n\t\"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\nvar ed25519phSupportedHashFuncs = []crypto.Hash{\n\tcrypto.SHA512,\n}\n\n// ED25519phSigner is a signature.Signer that uses the Ed25519 public-key signature system with pre-hashing\ntype ED25519phSigner struct {\n\tpriv ed25519.PrivateKey\n}\n\n// LoadED25519phSigner calculates signatures using the specified private key.\nfunc LoadED25519phSigner(priv ed25519.PrivateKey) (*ED25519phSigner, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"invalid ED25519 private key specified\")\n\t}\n\n\treturn &ED25519phSigner{\n\t\tpriv: priv,\n\t}, nil\n}\n\n// ToED25519SignerVerifier creates a ED25519SignerVerifier from a ED25519phSignerVerifier\n//\n// Clients that use ED25519phSignerVerifier should use this method to get a\n// SignerVerifier that uses the same ED25519 private key, but with the Pure\n// Ed25519 algorithm. This might be necessary to interact with Fulcio, which\n// only supports the Pure Ed25519 algorithm.\nfunc (e ED25519phSignerVerifier) ToED25519SignerVerifier() (*ED25519SignerVerifier, error) {\n\treturn LoadED25519SignerVerifier(e.priv)\n}\n\n// SignMessage signs the provided message. If the message is provided,\n// this method will compute the digest according to the hash function specified\n// when the ED25519phSigner was created.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithDigest()\n//\n// All other options are ignored if specified.\nfunc (e ED25519phSigner) SignMessage(message io.Reader, opts ...SignOption) ([]byte, error) {\n\tdigest, _, err := ComputeDigestForSigning(message, crypto.SHA512, ed25519phSupportedHashFuncs, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn e.priv.Sign(nil, digest, crypto.SHA512)\n}\n\n// Public returns the public key that can be used to verify signatures created by\n// this signer.\nfunc (e ED25519phSigner) Public() crypto.PublicKey {\n\tif e.priv == nil {\n\t\treturn nil\n\t}\n\n\treturn e.priv.Public()\n}\n\n// PublicKey returns the public key that can be used to verify signatures created by\n// this signer. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ED25519phSigner) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.Public(), nil\n}\n\n// Sign computes the signature for the specified message; the first and third arguments to this\n// function are ignored as they are not used by the ED25519ph algorithm.\nfunc (e ED25519phSigner) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) ([]byte, error) {\n\treturn e.SignMessage(nil, options.WithDigest(digest))\n}\n\n// ED25519phVerifier is a signature.Verifier that uses the Ed25519 public-key signature system\ntype ED25519phVerifier struct {\n\tpublicKey ed25519.PublicKey\n}\n\n// LoadED25519phVerifier returns a Verifier that verifies signatures using the\n// specified ED25519 public key.\nfunc LoadED25519phVerifier(pub ed25519.PublicKey) (*ED25519phVerifier, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"invalid ED25519 public key specified\")\n\t}\n\n\treturn &ED25519phVerifier{\n\t\tpublicKey: pub,\n\t}, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e *ED25519phVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n\n// VerifySignature verifies the signature for the given message. Unless provided\n// in an option, the digest of the message will be computed using the hash function specified\n// when the ED25519phVerifier was created.\n//\n// This function returns nil if the verification succeeded, and an error message otherwise.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithDigest()\n//\n// All other options are ignored if specified.\nfunc (e *ED25519phVerifier) VerifySignature(signature, message io.Reader, opts ...VerifyOption) error {\n\tif signature == nil {\n\t\treturn errors.New(\"nil signature passed to VerifySignature\")\n\t}\n\n\tdigest, _, err := ComputeDigestForVerifying(message, crypto.SHA512, ed25519phSupportedHashFuncs, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsigBytes, err := io.ReadAll(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading signature: %w\", err)\n\t}\n\n\tif err := ed25519.VerifyWithOptions(e.publicKey, digest, sigBytes, &ed25519.Options{Hash: crypto.SHA512}); err != nil {\n\t\treturn fmt.Errorf(\"failed to verify signature: %w\", err)\n\t}\n\treturn nil\n}\n\n// ED25519phSignerVerifier is a signature.SignerVerifier that uses the Ed25519 public-key signature system\ntype ED25519phSignerVerifier struct {\n\t*ED25519phSigner\n\t*ED25519phVerifier\n}\n\n// LoadED25519phSignerVerifier creates a combined signer and verifier. This is\n// a convenience object that simply wraps an instance of ED25519phSigner and ED25519phVerifier.\nfunc LoadED25519phSignerVerifier(priv ed25519.PrivateKey) (*ED25519phSignerVerifier, error) {\n\tsigner, err := LoadED25519phSigner(priv)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing signer: %w\", err)\n\t}\n\tpub, ok := priv.Public().(ed25519.PublicKey)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"given key is not ed25519.PublicKey\")\n\t}\n\tverifier, err := LoadED25519phVerifier(pub)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing verifier: %w\", err)\n\t}\n\n\treturn &ED25519phSignerVerifier{\n\t\tED25519phSigner:   signer,\n\t\tED25519phVerifier: verifier,\n\t}, nil\n}\n\n// NewDefaultED25519phSignerVerifier creates a combined signer and verifier using ED25519.\n// This creates a new ED25519 key using crypto/rand as an entropy source.\nfunc NewDefaultED25519phSignerVerifier() (*ED25519phSignerVerifier, ed25519.PrivateKey, error) {\n\treturn NewED25519phSignerVerifier(rand.Reader)\n}\n\n// NewED25519phSignerVerifier creates a combined signer and verifier using ED25519.\n// This creates a new ED25519 key using the specified entropy source.\nfunc NewED25519phSignerVerifier(rand io.Reader) (*ED25519phSignerVerifier, ed25519.PrivateKey, error) {\n\t_, priv, err := ed25519.GenerateKey(rand)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tsv, err := LoadED25519phSignerVerifier(priv)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn sv, priv, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (e ED25519phSignerVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn e.publicKey, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/message.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\tcrand \"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\nfunc isSupportedAlg(alg crypto.Hash, supportedAlgs []crypto.Hash) bool {\n\tif supportedAlgs == nil {\n\t\treturn true\n\t}\n\tfor _, supportedAlg := range supportedAlgs {\n\t\tif alg == supportedAlg {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// ComputeDigestForSigning calculates the digest value for the specified message using a hash function selected by the following process:\n//\n// - if a digest value is already specified in a SignOption and the length of the digest matches that of the selected hash function, the\n// digest value will be returned without any further computation\n// - if a hash function is given using WithCryptoSignerOpts(opts) as a SignOption, it will be used (if it is in the supported list)\n// - otherwise defaultHashFunc will be used (if it is in the supported list)\nfunc ComputeDigestForSigning(rawMessage io.Reader, defaultHashFunc crypto.Hash, supportedHashFuncs []crypto.Hash, opts ...SignOption) (digest []byte, hashedWith crypto.Hash, err error) {\n\tvar cryptoSignerOpts crypto.SignerOpts = defaultHashFunc\n\tfor _, opt := range opts {\n\t\topt.ApplyDigest(&digest)\n\t\topt.ApplyCryptoSignerOpts(&cryptoSignerOpts)\n\t}\n\thashedWith = cryptoSignerOpts.HashFunc()\n\tif !isSupportedAlg(hashedWith, supportedHashFuncs) {\n\t\treturn nil, crypto.Hash(0), fmt.Errorf(\"unsupported hash algorithm: %q not in %v\", hashedWith.String(), supportedHashFuncs)\n\t}\n\tif len(digest) > 0 {\n\t\tif hashedWith != crypto.Hash(0) && len(digest) != hashedWith.Size() {\n\t\t\terr = errors.New(\"unexpected length of digest for hash function specified\")\n\t\t}\n\t\treturn digest, hashedWith, err\n\t}\n\tdigest, err = hashMessage(rawMessage, hashedWith)\n\treturn digest, hashedWith, err\n}\n\n// ComputeDigestForVerifying calculates the digest value for the specified message using a hash function selected by the following process:\n//\n// - if a digest value is already specified in a SignOption and the length of the digest matches that of the selected hash function, the\n// digest value will be returned without any further computation\n// - if a hash function is given using WithCryptoSignerOpts(opts) as a SignOption, it will be used (if it is in the supported list)\n// - otherwise defaultHashFunc will be used (if it is in the supported list)\nfunc ComputeDigestForVerifying(rawMessage io.Reader, defaultHashFunc crypto.Hash, supportedHashFuncs []crypto.Hash, opts ...VerifyOption) (digest []byte, hashedWith crypto.Hash, err error) {\n\tvar cryptoSignerOpts crypto.SignerOpts = defaultHashFunc\n\tfor _, opt := range opts {\n\t\topt.ApplyDigest(&digest)\n\t\topt.ApplyCryptoSignerOpts(&cryptoSignerOpts)\n\t}\n\thashedWith = cryptoSignerOpts.HashFunc()\n\tif !isSupportedAlg(hashedWith, supportedHashFuncs) {\n\t\treturn nil, crypto.Hash(0), fmt.Errorf(\"unsupported hash algorithm: %q not in %v\", hashedWith.String(), supportedHashFuncs)\n\t}\n\tif len(digest) > 0 {\n\t\tif hashedWith != crypto.Hash(0) && len(digest) != hashedWith.Size() {\n\t\t\terr = errors.New(\"unexpected length of digest for hash function specified\")\n\t\t}\n\t\treturn digest, hashedWith, err\n\t}\n\tdigest, err = hashMessage(rawMessage, hashedWith)\n\treturn digest, hashedWith, err\n}\n\nfunc hashMessage(rawMessage io.Reader, hashFunc crypto.Hash) ([]byte, error) {\n\tif rawMessage == nil {\n\t\treturn nil, errors.New(\"message cannot be nil\")\n\t}\n\tif hashFunc == crypto.Hash(0) {\n\t\treturn io.ReadAll(rawMessage)\n\t}\n\thasher := hashFunc.New()\n\t// avoids reading entire message into memory\n\tif _, err := io.Copy(hasher, rawMessage); err != nil {\n\t\treturn nil, fmt.Errorf(\"hashing message: %w\", err)\n\t}\n\treturn hasher.Sum(nil), nil\n}\n\nfunc selectRandFromOpts(opts ...SignOption) io.Reader {\n\trand := crand.Reader\n\tfor _, opt := range opts {\n\t\topt.ApplyRand(&rand)\n\t}\n\treturn rand\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package options defines options for KMS clients\npackage options\n\nimport (\n\t\"context\"\n)\n\n// RequestContext implements the functional option pattern for including a context during RPC\ntype RequestContext struct {\n\tNoOpOptionImpl\n\tctx context.Context\n}\n\n// ApplyContext sets the specified context as the functional option\nfunc (r RequestContext) ApplyContext(ctx *context.Context) {\n\t*ctx = r.ctx\n}\n\n// WithContext specifies that the given context should be used in RPC to external services\nfunc WithContext(ctx context.Context) RequestContext {\n\treturn RequestContext{ctx: ctx}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/digest.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\n// RequestDigest implements the functional option pattern for specifying a digest value\ntype RequestDigest struct {\n\tNoOpOptionImpl\n\tdigest []byte\n}\n\n// ApplyDigest sets the specified digest value as the functional option\nfunc (r RequestDigest) ApplyDigest(digest *[]byte) {\n\t*digest = r.digest\n}\n\n// WithDigest specifies that the given digest can be used by underlying signature implementations\n// WARNING: When verifying a digest with ECDSA, it is trivial to craft a valid signature\n// over a random message given a public key. Do not use this unles you understand the\n// implications and do not need to protect against malleability.\nfunc WithDigest(digest []byte) RequestDigest {\n\treturn RequestDigest{digest: digest}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/doc.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package options contains functional options for the various SignerVerifiers\npackage options\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/keyversion.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\n// RequestKeyVersion implements the functional option pattern for specifying the KMS key version during signing or verification\ntype RequestKeyVersion struct {\n\tNoOpOptionImpl\n\tkeyVersion string\n}\n\n// ApplyKeyVersion sets the KMS's key version as a functional option\nfunc (r RequestKeyVersion) ApplyKeyVersion(keyVersion *string) {\n\t*keyVersion = r.keyVersion\n}\n\n// WithKeyVersion specifies that a specific KMS key version be used during signing and verification operations;\n// a value of 0 will use the latest version of the key (default)\nfunc WithKeyVersion(keyVersion string) RequestKeyVersion {\n\treturn RequestKeyVersion{keyVersion: keyVersion}\n}\n\n// RequestKeyVersionUsed implements the functional option pattern for obtaining the KMS key version used during signing\ntype RequestKeyVersionUsed struct {\n\tNoOpOptionImpl\n\tkeyVersionUsed *string\n}\n\n// ApplyKeyVersionUsed requests to store the KMS's key version that was used as a functional option\nfunc (r RequestKeyVersionUsed) ApplyKeyVersionUsed(keyVersionUsed **string) {\n\t*keyVersionUsed = r.keyVersionUsed\n}\n\n// ReturnKeyVersionUsed specifies that the specific KMS key version that was used during signing should be stored\n// in the pointer provided\nfunc ReturnKeyVersionUsed(keyVersionUsed *string) RequestKeyVersionUsed {\n\treturn RequestKeyVersionUsed{keyVersionUsed: keyVersionUsed}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/loadoptions.go",
    "content": "//\n// Copyright 2024 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\nimport (\n\t\"crypto\"\n\t\"crypto/rsa\"\n)\n\n// RequestHash implements the functional option pattern for setting a Hash\n// function when loading a signer or verifier\ntype RequestHash struct {\n\tNoOpOptionImpl\n\thashFunc crypto.Hash\n}\n\n// ApplyHash sets the hash as requested by the functional option\nfunc (r RequestHash) ApplyHash(hash *crypto.Hash) {\n\t*hash = r.hashFunc\n}\n\n// WithHash specifies that the given hash function should be used when loading a signer or verifier\nfunc WithHash(hash crypto.Hash) RequestHash {\n\treturn RequestHash{hashFunc: hash}\n}\n\n// RequestED25519ph implements the functional option pattern for specifying\n// ED25519ph (pre-hashed) should be used when loading a signer or verifier and a\n// ED25519 key is\ntype RequestED25519ph struct {\n\tNoOpOptionImpl\n\tuseED25519ph bool\n}\n\n// ApplyED25519ph sets the ED25519ph flag as requested by the functional option\nfunc (r RequestED25519ph) ApplyED25519ph(useED25519ph *bool) {\n\t*useED25519ph = r.useED25519ph\n}\n\n// WithED25519ph specifies that the ED25519ph algorithm should be used when a ED25519 key is used\nfunc WithED25519ph() RequestED25519ph {\n\treturn RequestED25519ph{useED25519ph: true}\n}\n\n// RequestPSSOptions implements the functional option pattern for specifying RSA\n// PSS should be used when loading a signer or verifier and a RSA key is\n// detected\ntype RequestPSSOptions struct {\n\tNoOpOptionImpl\n\topts *rsa.PSSOptions\n}\n\n// ApplyRSAPSS sets the RSAPSS options as requested by the functional option\nfunc (r RequestPSSOptions) ApplyRSAPSS(opts **rsa.PSSOptions) {\n\t*opts = r.opts\n}\n\n// WithRSAPSS specifies that the RSAPSS algorithm should be used when a RSA key is used\n// Note that the RSA PSSOptions contains an hash algorithm, which will override\n// the hash function specified with WithHash.\nfunc WithRSAPSS(opts *rsa.PSSOptions) RequestPSSOptions {\n\treturn RequestPSSOptions{opts: opts}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/noop.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\nimport (\n\t\"context\"\n\t\"crypto\"\n\t\"crypto/rsa\"\n\t\"io\"\n)\n\n// NoOpOptionImpl implements the RPCOption, SignOption, VerifyOption interfaces as no-ops.\ntype NoOpOptionImpl struct{}\n\n// ApplyContext is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyContext(_ *context.Context) {}\n\n// ApplyCryptoSignerOpts is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyCryptoSignerOpts(_ *crypto.SignerOpts) {}\n\n// ApplyDigest is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyDigest(_ *[]byte) {}\n\n// ApplyRand is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyRand(_ *io.Reader) {}\n\n// ApplyRemoteVerification is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyRemoteVerification(_ *bool) {}\n\n// ApplyRPCAuthOpts is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyRPCAuthOpts(_ *RPCAuth) {}\n\n// ApplyKeyVersion is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyKeyVersion(_ *string) {}\n\n// ApplyKeyVersionUsed is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyKeyVersionUsed(_ **string) {}\n\n// ApplyHash is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyHash(_ *crypto.Hash) {}\n\n// ApplyED25519ph is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyED25519ph(_ *bool) {}\n\n// ApplyRSAPSS is a no-op required to fully implement the requisite interfaces\nfunc (NoOpOptionImpl) ApplyRSAPSS(_ **rsa.PSSOptions) {}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/rand.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\nimport (\n\tcrand \"crypto/rand\"\n\t\"io\"\n)\n\n// RequestRand implements the functional option pattern for using a specific source of entropy\ntype RequestRand struct {\n\tNoOpOptionImpl\n\trand io.Reader\n}\n\n// ApplyRand sets the specified source of entropy as the functional option\nfunc (r RequestRand) ApplyRand(rand *io.Reader) {\n\t*rand = r.rand\n}\n\n// WithRand specifies that the given source of entropy should be used in signing operations\nfunc WithRand(rand io.Reader) RequestRand {\n\tr := rand\n\tif r == nil {\n\t\tr = crand.Reader\n\t}\n\treturn RequestRand{rand: r}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/remoteverification.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\n// RequestRemoteVerification implements the functional option pattern for remotely verifiying signatures when possible\ntype RequestRemoteVerification struct {\n\tNoOpOptionImpl\n\tremoteVerification bool\n}\n\n// ApplyRemoteVerification sets remote verification as a functional option\nfunc (r RequestRemoteVerification) ApplyRemoteVerification(remoteVerification *bool) {\n\t*remoteVerification = r.remoteVerification\n}\n\n// WithRemoteVerification specifies that the verification operation should be performed remotely (vs in the process of the caller)\nfunc WithRemoteVerification(remoteVerification bool) RequestRemoteVerification {\n\treturn RequestRemoteVerification{remoteVerification: remoteVerification}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/rpcauth.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\n// RPCAuthOpts includes authentication settings for RPC calls\ntype RPCAuthOpts struct {\n\tNoOpOptionImpl\n\topts RPCAuth\n}\n\n// RPCAuth provides credentials for RPC calls, empty fields are ignored\ntype RPCAuth struct {\n\tAddress string // address is the remote server address, e.g. https://vault:8200\n\tPath    string // path for the RPC, in vault this is the transit path which default to \"transit\"\n\tToken   string // token used for RPC, in vault this is the VAULT_TOKEN value\n\tOIDC    RPCAuthOIDC\n}\n\n// RPCAuthOIDC is used to perform the RPC login using OIDC instead of a fixed token\ntype RPCAuthOIDC struct {\n\tPath  string // path defaults to \"jwt\" for vault\n\tRole  string // role is required for jwt logins\n\tToken string // token is a jwt with vault\n}\n\n// ApplyRPCAuthOpts sets the RPCAuth as a function option\nfunc (r RPCAuthOpts) ApplyRPCAuthOpts(opts *RPCAuth) {\n\tif r.opts.Address != \"\" {\n\t\topts.Address = r.opts.Address\n\t}\n\tif r.opts.Path != \"\" {\n\t\topts.Path = r.opts.Path\n\t}\n\tif r.opts.Token != \"\" {\n\t\topts.Token = r.opts.Token\n\t}\n\tif r.opts.OIDC.Token != \"\" {\n\t\topts.OIDC = r.opts.OIDC\n\t}\n}\n\n// WithRPCAuthOpts specifies RPCAuth settings to be used with RPC logins\nfunc WithRPCAuthOpts(opts RPCAuth) RPCAuthOpts {\n\treturn RPCAuthOpts{opts: opts}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options/signeropts.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage options\n\nimport (\n\t\"crypto\"\n)\n\n// RequestCryptoSignerOpts implements the functional option pattern for supplying crypto.SignerOpts when signing or verifying\ntype RequestCryptoSignerOpts struct {\n\tNoOpOptionImpl\n\topts crypto.SignerOpts\n}\n\n// ApplyCryptoSignerOpts sets crypto.SignerOpts as a functional option\nfunc (r RequestCryptoSignerOpts) ApplyCryptoSignerOpts(opts *crypto.SignerOpts) {\n\t*opts = r.opts\n}\n\n// WithCryptoSignerOpts specifies that provided crypto.SignerOpts be used during signing and verification operations\nfunc WithCryptoSignerOpts(opts crypto.SignerOpts) RequestCryptoSignerOpts {\n\tvar optsToUse crypto.SignerOpts = crypto.SHA256\n\tif opts != nil {\n\t\toptsToUse = opts\n\t}\n\treturn RequestCryptoSignerOpts{opts: optsToUse}\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/options.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"context\"\n\t\"crypto\"\n\t\"crypto/rsa\"\n\t\"io\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// RPCOption specifies options to be used when performing RPC\ntype RPCOption interface {\n\tApplyContext(*context.Context)\n\tApplyRemoteVerification(*bool)\n\tApplyRPCAuthOpts(opts *options.RPCAuth)\n\tApplyKeyVersion(keyVersion *string)\n}\n\n// PublicKeyOption specifies options to be used when obtaining a public key\ntype PublicKeyOption interface {\n\tRPCOption\n}\n\n// MessageOption specifies options to be used when processing messages during signing or verification\ntype MessageOption interface {\n\tApplyDigest(*[]byte)\n\tApplyCryptoSignerOpts(*crypto.SignerOpts)\n}\n\n// SignOption specifies options to be used when signing a message\ntype SignOption interface {\n\tRPCOption\n\tMessageOption\n\tApplyRand(*io.Reader)\n\tApplyKeyVersionUsed(**string)\n}\n\n// VerifyOption specifies options to be used when verifying a signature\ntype VerifyOption interface {\n\tRPCOption\n\tMessageOption\n}\n\n// LoadOption specifies options to be used when creating a Signer/Verifier\ntype LoadOption interface {\n\tApplyHash(*crypto.Hash)\n\tApplyED25519ph(*bool)\n\tApplyRSAPSS(**rsa.PSSOptions)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/payload/doc.go",
    "content": "//\n// Copyright 2022 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package payload contains types and utilities related to the Cosign signature format.\npackage payload\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package payload defines a container image\npackage payload\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/google/go-containerregistry/pkg/name\"\n)\n\n// CosignSignatureType is the value of `critical.type` in a SimpleContainerImage payload.\nconst CosignSignatureType = \"cosign container image signature\"\n\n// SimpleContainerImage describes the structure of a basic container image signature payload, as defined at:\n// https://github.com/containers/image/blob/main/docs/containers-signature.5.md#json-data-format\ntype SimpleContainerImage struct {\n\tCritical Critical               `json:\"critical\"` // Critical data critical to correctly evaluating the validity of the signature\n\tOptional map[string]interface{} `json:\"optional\"` // Optional optional metadata about the image\n}\n\n// Critical data critical to correctly evaluating the validity of a signature\ntype Critical struct {\n\tIdentity Identity `json:\"identity\"` // Identity claimed identity of the image\n\tImage    Image    `json:\"image\"`    // Image identifies the container that the signature applies to\n\tType     string   `json:\"type\"`     // Type must be 'atomic container signature'\n}\n\n// Identity is the claimed identity of the image\ntype Identity struct {\n\tDockerReference string `json:\"docker-reference\"` // DockerReference is a reference used to refer to or download the image\n}\n\n// Image identifies the container image that the signature applies to\ntype Image struct {\n\tDockerManifestDigest string `json:\"docker-manifest-digest\"` // DockerManifestDigest the manifest digest of the signed container image\n}\n\n// Cosign describes a container image signed using Cosign\ntype Cosign struct {\n\tImage name.Digest\n\t// ClaimedIdentity is what the signer claims the image to be; usually a registry.com/…/repo:tag, but can also use a digest instead.\n\t// ALMOST ALL consumers MUST verify that ClaimedIdentity in the signature is correct given how user refers to the image;\n\t// e.g. if the user asks to access a signed image example.com/repo/mysql:3.14,\n\t// it is ALMOST ALWAYS necessary to validate that ClaimedIdentity = example.com/repo/mysql:3.14\n\t//\n\t// Considerations:\n\t// - The user might refer to an image using a digest (example.com/repo/mysql@sha256:…); in that case the registry/…/repo should still match\n\t// - If the image is multi-arch, ClaimedIdentity usually refers to the top-level multi-arch image index also on the per-arch images\n\t//   (possibly even if ClaimedIdentity contains a digest!)\n\t// - Older versions of cosign generate signatures where ClaimedIdentity only contains a registry/…/repo ; signature consumers should allow users\n\t//   to determine whether such images should be accepted (and, long-term, the default SHOULD be to reject them)\n\tClaimedIdentity string\n\tAnnotations     map[string]interface{}\n}\n\n// SimpleContainerImage returns information about a container image in the github.com/containers/image/signature format\nfunc (p Cosign) SimpleContainerImage() SimpleContainerImage {\n\tdockerReference := p.Image.Repository.Name()\n\tif p.ClaimedIdentity != \"\" {\n\t\tdockerReference = p.ClaimedIdentity\n\t}\n\treturn SimpleContainerImage{\n\t\tCritical: Critical{\n\t\t\tIdentity: Identity{\n\t\t\t\tDockerReference: dockerReference,\n\t\t\t},\n\t\t\tImage: Image{\n\t\t\t\tDockerManifestDigest: p.Image.DigestStr(),\n\t\t\t},\n\t\t\tType: CosignSignatureType,\n\t\t},\n\t\tOptional: p.Annotations,\n\t}\n}\n\n// MarshalJSON marshals the container signature into a []byte of JSON data\nfunc (p Cosign) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(p.SimpleContainerImage())\n}\n\nvar _ json.Marshaler = Cosign{}\n\n// UnmarshalJSON unmarshals []byte of JSON data into a container signature object\nfunc (p *Cosign) UnmarshalJSON(data []byte) error {\n\tif string(data) == \"null\" {\n\t\t// JSON \"null\" is a no-op by convention\n\t\treturn nil\n\t}\n\tvar simple SimpleContainerImage\n\tif err := json.Unmarshal(data, &simple); err != nil {\n\t\treturn err\n\t}\n\tif simple.Critical.Type != CosignSignatureType {\n\t\treturn fmt.Errorf(\"Cosign signature payload was of an unknown type: %q\", simple.Critical.Type)\n\t}\n\tdigestStr := simple.Critical.Identity.DockerReference + \"@\" + simple.Critical.Image.DockerManifestDigest\n\tdigest, err := name.NewDigest(digestStr)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not parse image digest string %q: %w\", digestStr, err)\n\t}\n\tp.Image = digest\n\tp.ClaimedIdentity = simple.Critical.Identity.DockerReference\n\tp.Annotations = simple.Optional\n\treturn nil\n}\n\nvar _ json.Unmarshaler = (*Cosign)(nil)\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/publickey.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n)\n\n// PublicKeyProvider returns a PublicKey associated with a digital signature\ntype PublicKeyProvider interface {\n\tPublicKey(opts ...PublicKeyOption) (crypto.PublicKey, error)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/rsapkcs1v15.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// RSAPKCS1v15Signer is a signature.Signer that uses the RSA PKCS1v15 algorithm\ntype RSAPKCS1v15Signer struct {\n\thashFunc crypto.Hash\n\tpriv     *rsa.PrivateKey\n}\n\n// LoadRSAPKCS1v15Signer calculates signatures using the specified private key and hash algorithm.\n//\n// hf must be either SHA256, SHA388, or SHA512.\nfunc LoadRSAPKCS1v15Signer(priv *rsa.PrivateKey, hf crypto.Hash) (*RSAPKCS1v15Signer, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"invalid RSA private key specified\")\n\t}\n\n\tif !isSupportedAlg(hf, rsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &RSAPKCS1v15Signer{\n\t\tpriv:     priv,\n\t\thashFunc: hf,\n\t}, nil\n}\n\n// SignMessage signs the provided message using PKCS1v15. If the message is provided,\n// this method will compute the digest according to the hash function specified\n// when the RSAPKCS1v15Signer was created.\n//\n// SignMessage recognizes the following Options listed in order of preference:\n//\n// - WithRand()\n//\n// - WithDigest()\n//\n// - WithCryptoSignerOpts()\n//\n// All other options are ignored if specified.\nfunc (r RSAPKCS1v15Signer) SignMessage(message io.Reader, opts ...SignOption) ([]byte, error) {\n\tdigest, hf, err := ComputeDigestForSigning(message, r.hashFunc, rsaSupportedHashFuncs, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trand := selectRandFromOpts(opts...)\n\n\treturn rsa.SignPKCS1v15(rand, r.priv, hf, digest)\n}\n\n// Public returns the public key that can be used to verify signatures created by\n// this signer.\nfunc (r RSAPKCS1v15Signer) Public() crypto.PublicKey {\n\tif r.priv == nil {\n\t\treturn nil\n\t}\n\n\treturn r.priv.Public()\n}\n\n// PublicKey returns the public key that can be used to verify signatures created by\n// this signer. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPKCS1v15Signer) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.Public(), nil\n}\n\n// Sign computes the signature for the specified digest using PKCS1v15.\n//\n// If a source of entropy is given in rand, it will be used instead of the default value (rand.Reader\n// from crypto/rand).\n//\n// If opts are specified, they should specify the hash function used to compute digest. If opts are\n// not specified, this function assumes the hash function provided when the signer was created was\n// used to create the value specified in digest.\nfunc (r RSAPKCS1v15Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {\n\trsaOpts := []SignOption{options.WithDigest(digest), options.WithRand(rand)}\n\tif opts != nil {\n\t\trsaOpts = append(rsaOpts, options.WithCryptoSignerOpts(opts))\n\t}\n\n\treturn r.SignMessage(nil, rsaOpts...)\n}\n\n// RSAPKCS1v15Verifier is a signature.Verifier that uses the RSA PKCS1v15 algorithm\ntype RSAPKCS1v15Verifier struct {\n\tpublicKey *rsa.PublicKey\n\thashFunc  crypto.Hash\n}\n\n// LoadRSAPKCS1v15Verifier returns a Verifier that verifies signatures using the specified\n// RSA public key and hash algorithm.\n//\n// hf must be either SHA256, SHA388, or SHA512.\nfunc LoadRSAPKCS1v15Verifier(pub *rsa.PublicKey, hashFunc crypto.Hash) (*RSAPKCS1v15Verifier, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"invalid RSA public key specified\")\n\t}\n\n\tif !isSupportedAlg(hashFunc, rsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &RSAPKCS1v15Verifier{\n\t\tpublicKey: pub,\n\t\thashFunc:  hashFunc,\n\t}, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPKCS1v15Verifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.publicKey, nil\n}\n\n// VerifySignature verifies the signature for the given message using PKCS1v15. Unless provided\n// in an option, the digest of the message will be computed using the hash function specified\n// when the RSAPKCS1v15Verifier was created.\n//\n// This function returns nil if the verification succeeded, and an error message otherwise.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithDigest()\n//\n// - WithCryptoSignerOpts()\n//\n// All other options are ignored if specified.\nfunc (r RSAPKCS1v15Verifier) VerifySignature(signature, message io.Reader, opts ...VerifyOption) error {\n\tdigest, hf, err := ComputeDigestForVerifying(message, r.hashFunc, rsaSupportedVerifyHashFuncs, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif signature == nil {\n\t\treturn errors.New(\"nil signature passed to VerifySignature\")\n\t}\n\n\tsigBytes, err := io.ReadAll(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading signature: %w\", err)\n\t}\n\n\treturn rsa.VerifyPKCS1v15(r.publicKey, hf, digest, sigBytes)\n}\n\n// RSAPKCS1v15SignerVerifier is a signature.SignerVerifier that uses the RSA PKCS1v15 algorithm\ntype RSAPKCS1v15SignerVerifier struct {\n\t*RSAPKCS1v15Signer\n\t*RSAPKCS1v15Verifier\n}\n\n// LoadRSAPKCS1v15SignerVerifier creates a combined signer and verifier. This is a convenience object\n// that simply wraps an instance of RSAPKCS1v15Signer and RSAPKCS1v15Verifier.\nfunc LoadRSAPKCS1v15SignerVerifier(priv *rsa.PrivateKey, hf crypto.Hash) (*RSAPKCS1v15SignerVerifier, error) {\n\tsigner, err := LoadRSAPKCS1v15Signer(priv, hf)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing signer: %w\", err)\n\t}\n\tverifier, err := LoadRSAPKCS1v15Verifier(&priv.PublicKey, hf)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing verifier: %w\", err)\n\t}\n\n\treturn &RSAPKCS1v15SignerVerifier{\n\t\tRSAPKCS1v15Signer:   signer,\n\t\tRSAPKCS1v15Verifier: verifier,\n\t}, nil\n}\n\n// NewDefaultRSAPKCS1v15SignerVerifier creates a combined signer and verifier using RSA PKCS1v15.\n// This creates a new RSA key of 2048 bits and uses the SHA256 hashing algorithm.\nfunc NewDefaultRSAPKCS1v15SignerVerifier() (*RSAPKCS1v15SignerVerifier, *rsa.PrivateKey, error) {\n\treturn NewRSAPKCS1v15SignerVerifier(rand.Reader, 2048, crypto.SHA256)\n}\n\n// NewRSAPKCS1v15SignerVerifier creates a combined signer and verifier using RSA PKCS1v15.\n// This creates a new RSA key of the specified length of bits, entropy source, and hash function.\nfunc NewRSAPKCS1v15SignerVerifier(rand io.Reader, bits int, hashFunc crypto.Hash) (*RSAPKCS1v15SignerVerifier, *rsa.PrivateKey, error) {\n\tpriv, err := rsa.GenerateKey(rand, bits)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tsv, err := LoadRSAPKCS1v15SignerVerifier(priv, hashFunc)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn sv, priv, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPKCS1v15SignerVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.publicKey, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/rsapss.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// checked on LoadSigner, LoadVerifier, and SignMessage\nvar rsaSupportedHashFuncs = []crypto.Hash{\n\tcrypto.SHA256,\n\tcrypto.SHA384,\n\tcrypto.SHA512,\n}\n\n// checked on VerifySignature. Supports SHA1 verification.\nvar rsaSupportedVerifyHashFuncs = []crypto.Hash{\n\tcrypto.SHA1,\n\tcrypto.SHA256,\n\tcrypto.SHA384,\n\tcrypto.SHA512,\n}\n\n// RSAPSSSigner is a signature.Signer that uses the RSA PSS algorithm\ntype RSAPSSSigner struct {\n\thashFunc crypto.Hash\n\tpriv     *rsa.PrivateKey\n\tpssOpts  *rsa.PSSOptions\n}\n\n// LoadRSAPSSSigner calculates signatures using the specified private key and hash algorithm.\n//\n// If opts are specified, then they will be stored and used as a default if not overridden\n// by the value passed to Sign().\n//\n// hf must be either SHA256, SHA388, or SHA512. opts.Hash is ignored.\nfunc LoadRSAPSSSigner(priv *rsa.PrivateKey, hf crypto.Hash, opts *rsa.PSSOptions) (*RSAPSSSigner, error) {\n\tif priv == nil {\n\t\treturn nil, errors.New(\"invalid RSA private key specified\")\n\t}\n\n\tif !isSupportedAlg(hf, rsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &RSAPSSSigner{\n\t\tpriv:     priv,\n\t\tpssOpts:  opts,\n\t\thashFunc: hf,\n\t}, nil\n}\n\n// SignMessage signs the provided message using PSS. If the message is provided,\n// this method will compute the digest according to the hash function specified\n// when the RSAPSSSigner was created.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithRand()\n//\n// - WithDigest()\n//\n// - WithCryptoSignerOpts()\n//\n// All other options are ignored if specified.\nfunc (r RSAPSSSigner) SignMessage(message io.Reader, opts ...SignOption) ([]byte, error) {\n\tdigest, hf, err := ComputeDigestForSigning(message, r.hashFunc, rsaSupportedHashFuncs, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trand := selectRandFromOpts(opts...)\n\tpssOpts := r.pssOpts\n\tif pssOpts == nil {\n\t\tpssOpts = &rsa.PSSOptions{\n\t\t\tSaltLength: rsa.PSSSaltLengthAuto,\n\t\t}\n\t}\n\tpssOpts.Hash = hf\n\n\treturn rsa.SignPSS(rand, r.priv, hf, digest, pssOpts)\n}\n\n// Public returns the public key that can be used to verify signatures created by\n// this signer.\nfunc (r RSAPSSSigner) Public() crypto.PublicKey {\n\tif r.priv == nil {\n\t\treturn nil\n\t}\n\n\treturn r.priv.Public()\n}\n\n// PublicKey returns the public key that can be used to verify signatures created by\n// this signer. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPSSSigner) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.Public(), nil\n}\n\n// Sign computes the signature for the specified digest using PSS.\n//\n// If a source of entropy is given in rand, it will be used instead of the default value (rand.Reader\n// from crypto/rand).\n//\n// If opts are specified, they must be *rsa.PSSOptions. If opts are not specified, the hash function\n// provided when the signer was created will be assumed.\nfunc (r RSAPSSSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {\n\trsaOpts := []SignOption{options.WithDigest(digest), options.WithRand(rand)}\n\tif opts != nil {\n\t\trsaOpts = append(rsaOpts, options.WithCryptoSignerOpts(opts))\n\t}\n\n\treturn r.SignMessage(nil, rsaOpts...)\n}\n\n// RSAPSSVerifier is a signature.Verifier that uses the RSA PSS algorithm\ntype RSAPSSVerifier struct {\n\tpublicKey *rsa.PublicKey\n\thashFunc  crypto.Hash\n\tpssOpts   *rsa.PSSOptions\n}\n\n// LoadRSAPSSVerifier verifies signatures using the specified public key and hash algorithm.\n//\n// hf must be either SHA256, SHA388, or SHA512. opts.Hash is ignored.\nfunc LoadRSAPSSVerifier(pub *rsa.PublicKey, hashFunc crypto.Hash, opts *rsa.PSSOptions) (*RSAPSSVerifier, error) {\n\tif pub == nil {\n\t\treturn nil, errors.New(\"invalid RSA public key specified\")\n\t}\n\n\tif !isSupportedAlg(hashFunc, rsaSupportedHashFuncs) {\n\t\treturn nil, errors.New(\"invalid hash function specified\")\n\t}\n\n\treturn &RSAPSSVerifier{\n\t\tpublicKey: pub,\n\t\thashFunc:  hashFunc,\n\t\tpssOpts:   opts,\n\t}, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPSSVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.publicKey, nil\n}\n\n// VerifySignature verifies the signature for the given message using PSS. Unless provided\n// in an option, the digest of the message will be computed using the hash function specified\n// when the RSAPSSVerifier was created.\n//\n// This function returns nil if the verification succeeded, and an error message otherwise.\n//\n// This function recognizes the following Options listed in order of preference:\n//\n// - WithDigest()\n//\n// - WithCryptoSignerOpts()\n//\n// All other options are ignored if specified.\nfunc (r RSAPSSVerifier) VerifySignature(signature, message io.Reader, opts ...VerifyOption) error {\n\tdigest, hf, err := ComputeDigestForVerifying(message, r.hashFunc, rsaSupportedVerifyHashFuncs, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif signature == nil {\n\t\treturn errors.New(\"nil signature passed to VerifySignature\")\n\t}\n\n\tsigBytes, err := io.ReadAll(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading signature: %w\", err)\n\t}\n\n\t// rsa.VerifyPSS ignores pssOpts.Hash, so we don't set it\n\tpssOpts := r.pssOpts\n\tif pssOpts == nil {\n\t\tpssOpts = &rsa.PSSOptions{\n\t\t\tSaltLength: rsa.PSSSaltLengthAuto,\n\t\t}\n\t}\n\n\treturn rsa.VerifyPSS(r.publicKey, hf, digest, sigBytes, pssOpts)\n}\n\n// RSAPSSSignerVerifier is a signature.SignerVerifier that uses the RSA PSS algorithm\ntype RSAPSSSignerVerifier struct {\n\t*RSAPSSSigner\n\t*RSAPSSVerifier\n}\n\n// LoadRSAPSSSignerVerifier creates a combined signer and verifier using RSA PSS. This is\n// a convenience object that simply wraps an instance of RSAPSSSigner and RSAPSSVerifier.\nfunc LoadRSAPSSSignerVerifier(priv *rsa.PrivateKey, hf crypto.Hash, opts *rsa.PSSOptions) (*RSAPSSSignerVerifier, error) {\n\tsigner, err := LoadRSAPSSSigner(priv, hf, opts)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing signer: %w\", err)\n\t}\n\tverifier, err := LoadRSAPSSVerifier(&priv.PublicKey, hf, opts)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing verifier: %w\", err)\n\t}\n\n\treturn &RSAPSSSignerVerifier{\n\t\tRSAPSSSigner:   signer,\n\t\tRSAPSSVerifier: verifier,\n\t}, nil\n}\n\n// NewDefaultRSAPSSSignerVerifier creates a combined signer and verifier using RSA PSS.\n// This creates a new RSA key of 2048 bits and uses the SHA256 hashing algorithm.\nfunc NewDefaultRSAPSSSignerVerifier() (*RSAPSSSignerVerifier, *rsa.PrivateKey, error) {\n\treturn NewRSAPSSSignerVerifier(rand.Reader, 2048, crypto.SHA256)\n}\n\n// NewRSAPSSSignerVerifier creates a combined signer and verifier using RSA PSS.\n// This creates a new RSA key of the specified length of bits, entropy source, and hash function.\nfunc NewRSAPSSSignerVerifier(rand io.Reader, bits int, hashFunc crypto.Hash) (*RSAPSSSignerVerifier, *rsa.PrivateKey, error) {\n\tpriv, err := rsa.GenerateKey(rand, bits)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tsv, err := LoadRSAPSSSignerVerifier(priv, hashFunc, &rsa.PSSOptions{Hash: hashFunc})\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn sv, priv, nil\n}\n\n// PublicKey returns the public key that is used to verify signatures by\n// this verifier. As this value is held in memory, all options provided in arguments\n// to this method are ignored.\nfunc (r RSAPSSSignerVerifier) PublicKey(_ ...PublicKeyOption) (crypto.PublicKey, error) {\n\treturn r.publicKey, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/signer.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t// these ensure we have the implementations loaded\n\t_ \"crypto/sha256\"\n\t_ \"crypto/sha512\"\n\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// Signer creates digital signatures over a message using a specified key pair\ntype Signer interface {\n\tPublicKeyProvider\n\tSignMessage(message io.Reader, opts ...SignOption) ([]byte, error)\n}\n\n// SignerOpts implements crypto.SignerOpts but also allows callers to specify\n// additional options that may be utilized in signing the digest provided.\ntype SignerOpts struct {\n\tHash crypto.Hash\n\tOpts []SignOption\n}\n\n// HashFunc returns the hash function for this object\nfunc (s SignerOpts) HashFunc() crypto.Hash {\n\treturn s.Hash\n}\n\n// LoadSigner returns a signature.Signer based on the algorithm of the private key\n// provided.\n//\n// If privateKey is an RSA key, a RSAPKCS1v15Signer will be returned. If a\n// RSAPSSSigner is desired instead, use the LoadRSAPSSSigner() method directly.\nfunc LoadSigner(privateKey crypto.PrivateKey, hashFunc crypto.Hash) (Signer, error) {\n\treturn LoadSignerWithOpts(privateKey, options.WithHash(hashFunc))\n}\n\n// LoadSignerWithOpts returns a signature.Signer based on the algorithm of the private key\n// provided.\nfunc LoadSignerWithOpts(privateKey crypto.PrivateKey, opts ...LoadOption) (Signer, error) {\n\tvar rsaPSSOptions *rsa.PSSOptions\n\tvar useED25519ph bool\n\thashFunc := crypto.SHA256\n\tfor _, o := range opts {\n\t\to.ApplyED25519ph(&useED25519ph)\n\t\to.ApplyHash(&hashFunc)\n\t\to.ApplyRSAPSS(&rsaPSSOptions)\n\t}\n\n\tswitch pk := privateKey.(type) {\n\tcase *rsa.PrivateKey:\n\t\tif rsaPSSOptions != nil {\n\t\t\treturn LoadRSAPSSSigner(pk, hashFunc, rsaPSSOptions)\n\t\t}\n\t\treturn LoadRSAPKCS1v15Signer(pk, hashFunc)\n\tcase *ecdsa.PrivateKey:\n\t\treturn LoadECDSASigner(pk, hashFunc)\n\tcase ed25519.PrivateKey:\n\t\tif useED25519ph {\n\t\t\treturn LoadED25519phSigner(pk)\n\t\t}\n\t\treturn LoadED25519Signer(pk)\n\t}\n\treturn nil, errors.New(\"unsupported public key type\")\n}\n\n// LoadSignerFromPEMFile returns a signature.Signer based on the algorithm of the private key\n// in the file. The Signer will use the hash function specified when computing digests.\n//\n// If key is an RSA key, a RSAPKCS1v15Signer will be returned. If a\n// RSAPSSSigner is desired instead, use the LoadRSAPSSSigner() and\n// cryptoutils.UnmarshalPEMToPrivateKey() methods directly.\nfunc LoadSignerFromPEMFile(path string, hashFunc crypto.Hash, pf cryptoutils.PassFunc) (Signer, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpriv, err := cryptoutils.UnmarshalPEMToPrivateKey(fileBytes, pf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSigner(priv, hashFunc)\n}\n\n// LoadSignerFromPEMFileWithOpts returns a signature.Signer based on the algorithm of the private key\n// in the file. The Signer will use the hash function specified in the options when computing digests.\nfunc LoadSignerFromPEMFileWithOpts(path string, pf cryptoutils.PassFunc, opts ...LoadOption) (Signer, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpriv, err := cryptoutils.UnmarshalPEMToPrivateKey(fileBytes, pf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSignerWithOpts(priv, opts...)\n}\n\n// LoadDefaultSigner returns a signature.Signer based on the private key.\n// Each private key has a corresponding PublicKeyDetails associated in the\n// Sigstore ecosystem, see Algorithm Registry for more details.\nfunc LoadDefaultSigner(privateKey crypto.PrivateKey, opts ...LoadOption) (Signer, error) {\n\tsigner, ok := privateKey.(crypto.Signer)\n\tif !ok {\n\t\treturn nil, errors.New(\"private key does not implement signature.Signer\")\n\t}\n\talgorithmDetails, err := GetDefaultAlgorithmDetails(signer.Public(), opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSignerFromAlgorithmDetails(privateKey, algorithmDetails, opts...)\n}\n\n// LoadSignerFromAlgorithmDetails returns a signature.Signer based on\n// the algorithm details and the user's choice of options.\nfunc LoadSignerFromAlgorithmDetails(privateKey crypto.PrivateKey, algorithmDetails AlgorithmDetails, opts ...LoadOption) (Signer, error) {\n\tfilteredOpts := GetOptsFromAlgorithmDetails(algorithmDetails, opts...)\n\treturn LoadSignerWithOpts(privateKey, filteredOpts...)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/signerverifier.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// SignerVerifier creates and verifies digital signatures over a message using a specified key pair\ntype SignerVerifier interface {\n\tSigner\n\tVerifier\n}\n\n// LoadSignerVerifier returns a signature.SignerVerifier based on the algorithm of the private key\n// provided.\n//\n// If privateKey is an RSA key, a RSAPKCS1v15SignerVerifier will be returned. If a\n// RSAPSSSignerVerifier is desired instead, use the LoadRSAPSSSignerVerifier() method directly.\nfunc LoadSignerVerifier(privateKey crypto.PrivateKey, hashFunc crypto.Hash) (SignerVerifier, error) {\n\treturn LoadSignerVerifierWithOpts(privateKey, options.WithHash(hashFunc))\n}\n\n// LoadSignerVerifierWithOpts returns a signature.SignerVerifier based on the\n// algorithm of the private key provided and the user's choice.\nfunc LoadSignerVerifierWithOpts(privateKey crypto.PrivateKey, opts ...LoadOption) (SignerVerifier, error) {\n\tvar rsaPSSOptions *rsa.PSSOptions\n\tvar useED25519ph bool\n\thashFunc := crypto.SHA256\n\tfor _, o := range opts {\n\t\to.ApplyED25519ph(&useED25519ph)\n\t\to.ApplyHash(&hashFunc)\n\t\to.ApplyRSAPSS(&rsaPSSOptions)\n\t}\n\n\tswitch pk := privateKey.(type) {\n\tcase *rsa.PrivateKey:\n\t\tif rsaPSSOptions != nil {\n\t\t\treturn LoadRSAPSSSignerVerifier(pk, hashFunc, rsaPSSOptions)\n\t\t}\n\t\treturn LoadRSAPKCS1v15SignerVerifier(pk, hashFunc)\n\tcase *ecdsa.PrivateKey:\n\t\treturn LoadECDSASignerVerifier(pk, hashFunc)\n\tcase ed25519.PrivateKey:\n\t\tif useED25519ph {\n\t\t\treturn LoadED25519phSignerVerifier(pk)\n\t\t}\n\t\treturn LoadED25519SignerVerifier(pk)\n\t}\n\treturn nil, errors.New(\"unsupported public key type\")\n}\n\n// LoadSignerVerifierFromPEMFile returns a signature.SignerVerifier based on the algorithm of the private key\n// in the file. The SignerVerifier will use the hash function specified when computing digests.\n//\n// If publicKey is an RSA key, a RSAPKCS1v15SignerVerifier will be returned. If a\n// RSAPSSSignerVerifier is desired instead, use the LoadRSAPSSSignerVerifier() and\n// cryptoutils.UnmarshalPEMToPrivateKey() methods directly.\nfunc LoadSignerVerifierFromPEMFile(path string, hashFunc crypto.Hash, pf cryptoutils.PassFunc) (SignerVerifier, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpriv, err := cryptoutils.UnmarshalPEMToPrivateKey(fileBytes, pf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSignerVerifier(priv, hashFunc)\n}\n\n// LoadSignerVerifierFromPEMFileWithOpts returns a signature.SignerVerifier based on the algorithm of the private key\n// in the file. The SignerVerifier will use the hash function specified in the options when computing digests.\nfunc LoadSignerVerifierFromPEMFileWithOpts(path string, pf cryptoutils.PassFunc, opts ...LoadOption) (SignerVerifier, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpriv, err := cryptoutils.UnmarshalPEMToPrivateKey(fileBytes, pf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSignerVerifierWithOpts(priv, opts...)\n}\n\n// LoadDefaultSignerVerifier returns a signature.SignerVerifier based on\n// the private key. Each private key has a corresponding PublicKeyDetails\n// associated in the Sigstore ecosystem, see Algorithm Registry for more details.\nfunc LoadDefaultSignerVerifier(privateKey crypto.PrivateKey, opts ...LoadOption) (SignerVerifier, error) {\n\tsigner, ok := privateKey.(crypto.Signer)\n\tif !ok {\n\t\treturn nil, errors.New(\"private key does not implement signature.Signer\")\n\t}\n\talgorithmDetails, err := GetDefaultAlgorithmDetails(signer.Public(), opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadSignerVerifierFromAlgorithmDetails(privateKey, algorithmDetails, opts...)\n}\n\n// LoadSignerVerifierFromAlgorithmDetails returns a signature.SignerVerifier based on\n// the algorithm details and the user's choice of options.\nfunc LoadSignerVerifierFromAlgorithmDetails(privateKey crypto.PrivateKey, algorithmDetails AlgorithmDetails, opts ...LoadOption) (SignerVerifier, error) {\n\tfilteredOpts := GetOptsFromAlgorithmDetails(algorithmDetails, opts...)\n\treturn LoadSignerVerifierWithOpts(privateKey, filteredOpts...)\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/util.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"bytes\"\n\t\"crypto/rsa\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/google/go-containerregistry/pkg/name\"\n\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n\tsigpayload \"github.com/sigstore/sigstore/pkg/signature/payload\"\n)\n\n// SignImage signs a container manifest using the specified signer object\nfunc SignImage(signer SignerVerifier, image name.Digest, optionalAnnotations map[string]interface{}) (payload, signature []byte, err error) {\n\timgPayload := sigpayload.Cosign{\n\t\tImage:       image,\n\t\tAnnotations: optionalAnnotations,\n\t}\n\tpayload, err = json.Marshal(imgPayload)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to marshal payload to JSON: %w\", err)\n\t}\n\tsignature, err = signer.SignMessage(bytes.NewReader(payload))\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to sign payload: %w\", err)\n\t}\n\treturn payload, signature, nil\n}\n\n// VerifyImageSignature verifies a signature over a container manifest\nfunc VerifyImageSignature(signer SignerVerifier, payload, signature []byte) (image name.Digest, annotations map[string]interface{}, err error) {\n\tif err := signer.VerifySignature(bytes.NewReader(signature), bytes.NewReader(payload)); err != nil {\n\t\treturn name.Digest{}, nil, fmt.Errorf(\"signature verification failed: %w\", err)\n\t}\n\tvar imgPayload sigpayload.Cosign\n\tif err := json.Unmarshal(payload, &imgPayload); err != nil {\n\t\treturn name.Digest{}, nil, fmt.Errorf(\"could not deserialize image payload: %w\", err)\n\t}\n\treturn imgPayload.Image, imgPayload.Annotations, nil\n}\n\n// GetOptsFromAlgorithmDetails returns a list of LoadOptions that are\n// appropriate for the given algorithm details. It ignores the hash type because\n// that can be retrieved from the algorithm details.\nfunc GetOptsFromAlgorithmDetails(algorithmDetails AlgorithmDetails, opts ...LoadOption) []LoadOption {\n\tres := []LoadOption{options.WithHash(algorithmDetails.hashType)}\n\tfor _, opt := range opts {\n\t\tvar useED25519ph bool\n\t\tvar rsaPSSOptions *rsa.PSSOptions\n\t\topt.ApplyED25519ph(&useED25519ph)\n\t\topt.ApplyRSAPSS(&rsaPSSOptions)\n\t\tif useED25519ph || rsaPSSOptions != nil {\n\t\t\tres = append(res, opt)\n\t\t}\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "vendor/github.com/sigstore/sigstore/pkg/signature/verifier.go",
    "content": "//\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"github.com/sigstore/sigstore/pkg/signature/options\"\n)\n\n// Verifier verifies the digital signature using a specified public key\ntype Verifier interface {\n\tPublicKeyProvider\n\tVerifySignature(signature, message io.Reader, opts ...VerifyOption) error\n}\n\n// LoadVerifier returns a signature.Verifier based on the algorithm of the public key\n// provided that will use the hash function specified when computing digests.\n//\n// If publicKey is an RSA key, a RSAPKCS1v15Verifier will be returned. If a\n// RSAPSSVerifier is desired instead, use the LoadRSAPSSVerifier() method directly.\nfunc LoadVerifier(publicKey crypto.PublicKey, hashFunc crypto.Hash) (Verifier, error) {\n\treturn LoadVerifierWithOpts(publicKey, options.WithHash(hashFunc))\n}\n\n// LoadVerifierWithOpts returns a signature.Verifier based on the algorithm of the public key\n// provided that will use the hash function specified when computing digests.\nfunc LoadVerifierWithOpts(publicKey crypto.PublicKey, opts ...LoadOption) (Verifier, error) {\n\tvar rsaPSSOptions *rsa.PSSOptions\n\tvar useED25519ph bool\n\thashFunc := crypto.SHA256\n\tfor _, o := range opts {\n\t\to.ApplyED25519ph(&useED25519ph)\n\t\to.ApplyHash(&hashFunc)\n\t\to.ApplyRSAPSS(&rsaPSSOptions)\n\t}\n\n\tswitch pk := publicKey.(type) {\n\tcase *rsa.PublicKey:\n\t\tif rsaPSSOptions != nil {\n\t\t\treturn LoadRSAPSSVerifier(pk, hashFunc, rsaPSSOptions)\n\t\t}\n\t\treturn LoadRSAPKCS1v15Verifier(pk, hashFunc)\n\tcase *ecdsa.PublicKey:\n\t\treturn LoadECDSAVerifier(pk, hashFunc)\n\tcase ed25519.PublicKey:\n\t\tif useED25519ph {\n\t\t\treturn LoadED25519phVerifier(pk)\n\t\t}\n\t\treturn LoadED25519Verifier(pk)\n\t}\n\treturn nil, errors.New(\"unsupported public key type\")\n}\n\n// LoadUnsafeVerifier returns a signature.Verifier based on the algorithm of the public key\n// provided that will use SHA1 when computing digests for RSA and ECDSA signatures.\n//\n// If publicKey is an RSA key, a RSAPKCS1v15Verifier will be returned. If a\n// RSAPSSVerifier is desired instead, use the LoadRSAPSSVerifier() method directly.\nfunc LoadUnsafeVerifier(publicKey crypto.PublicKey) (Verifier, error) {\n\tswitch pk := publicKey.(type) {\n\tcase *rsa.PublicKey:\n\t\tif pk == nil {\n\t\t\treturn nil, errors.New(\"invalid RSA public key specified\")\n\t\t}\n\t\treturn &RSAPKCS1v15Verifier{\n\t\t\tpublicKey: pk,\n\t\t\thashFunc:  crypto.SHA1,\n\t\t}, nil\n\tcase *ecdsa.PublicKey:\n\t\tif pk == nil {\n\t\t\treturn nil, errors.New(\"invalid ECDSA public key specified\")\n\t\t}\n\t\treturn &ECDSAVerifier{\n\t\t\tpublicKey: pk,\n\t\t\thashFunc:  crypto.SHA1,\n\t\t}, nil\n\tcase ed25519.PublicKey:\n\t\treturn LoadED25519Verifier(pk)\n\t}\n\treturn nil, errors.New(\"unsupported public key type\")\n}\n\n// LoadVerifierFromPEMFile returns a signature.Verifier based on the contents of a\n// file located at path. The Verifier wil use the hash function specified when computing digests.\n//\n// If the publickey is an RSA key, a RSAPKCS1v15Verifier will be returned. If a\n// RSAPSSVerifier is desired instead, use the LoadRSAPSSVerifier() and cryptoutils.UnmarshalPEMToPublicKey() methods directly.\nfunc LoadVerifierFromPEMFile(path string, hashFunc crypto.Hash) (Verifier, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpubKey, err := cryptoutils.UnmarshalPEMToPublicKey(fileBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn LoadVerifier(pubKey, hashFunc)\n}\n\n// LoadVerifierFromPEMFileWithOpts returns a signature.Verifier based on the contents of a\n// file located at path. The Verifier wil use the hash function specified in the options when computing digests.\nfunc LoadVerifierFromPEMFileWithOpts(path string, opts ...LoadOption) (Verifier, error) {\n\tfileBytes, err := os.ReadFile(filepath.Clean(path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpubKey, err := cryptoutils.UnmarshalPEMToPublicKey(fileBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn LoadVerifierWithOpts(pubKey, opts...)\n}\n\n// LoadDefaultVerifier returns a signature.Verifier based on the public key.\n// Each public key has a corresponding PublicKeyDetails associated in the\n// Sigstore ecosystem, see Algorithm Registry for more details.\nfunc LoadDefaultVerifier(publicKey crypto.PublicKey, opts ...LoadOption) (Verifier, error) {\n\talgorithmDetails, err := GetDefaultAlgorithmDetails(publicKey, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn LoadVerifierFromAlgorithmDetails(publicKey, algorithmDetails, opts...)\n}\n\n// LoadVerifierFromAlgorithmDetails returns a signature.Verifier based on\n// the algorithm details and the user's choice of options.\nfunc LoadVerifierFromAlgorithmDetails(publicKey crypto.PublicKey, algorithmDetails AlgorithmDetails, opts ...LoadOption) (Verifier, error) {\n\tfilteredOpts := GetOptsFromAlgorithmDetails(algorithmDetails, opts...)\n\treturn LoadVerifierWithOpts(publicKey, filteredOpts...)\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/.gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\n*.test\n*.prof\n\n# Development\n.envrc\ncoverage.out"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Andrew Smith\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\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/Makefile",
    "content": "all: vet staticcheck test\n\ntest:\n\tgo test -covermode=count -coverprofile=coverage.out .\n\nshowcoverage: test\n\tgo tool cover -html=coverage.out\n\nvet:\n\tgo vet .\n\nlint:\n\tgolint .\n\nstaticcheck:\n\tstaticcheck .\n\ngettools:\n\tgo get -u honnef.co/go/tools/...\n\tgo get -u golang.org/x/lint/golint\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/README.md",
    "content": "# pkcs7\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/smallstep/pkcs7.svg)](https://pkg.go.dev/github.com/smallstep/pkcs7)\n[![Build Status](https://github.com/smallstep/pkcs7/workflows/CI/badge.svg?query=branch%3Amain+event%3Apush)](https://github.com/smallstep/pkcs7/actions/workflows/ci.yml?query=branch%3Amain+event%3Apush)\n\npkcs7 implements parsing and creating signed and enveloped messages.\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"os\"\n\n    \"github.com/smallstep/pkcs7\"\n)\n\nfunc SignAndDetach(content []byte, cert *x509.Certificate, privkey *rsa.PrivateKey) (signed []byte, err error) {\n\ttoBeSigned, err := NewSignedData(content)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Cannot initialize signed data: %w\", err)\n\t}\n\tif err = toBeSigned.AddSigner(cert, privkey, SignerInfoConfig{}); err != nil {\n\t\treturn fmt.Errorf(\"Cannot add signer: %w\", err)\n\t}\n\n\t// Detach signature, omit if you want an embedded signature\n\ttoBeSigned.Detach()\n\n\tsigned, err = toBeSigned.Finish()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Cannot finish signing data: %w\", err)\n\t}\n\n\t// Verify the signature\n\tpem.Encode(os.Stdout, &pem.Block{Type: \"PKCS7\", Bytes: signed})\n\tp7, err := pkcs7.Parse(signed)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Cannot parse our signed data: %w\", err)\n\t}\n\n\t// since the signature was detached, reattach the content here\n\tp7.Content = content\n\n\tif bytes.Compare(content, p7.Content) != 0 {\n\t\treturn fmt.Errorf(\"Our content was not in the parsed data:\\n\\tExpected: %s\\n\\tActual: %s\", content, p7.Content)\n\t}\n\tif err = p7.Verify(); err != nil {\n\t\treturn fmt.Errorf(\"Cannot verify our signed data: %w\", err)\n\t}\n\n\treturn signed, nil\n}\n```\n\n\n## Credits\n\nThis is a fork of [mozilla-services/pkcs7](https://github.com/mozilla-services/pkcs7) which, itself, was a fork of [fullsailor/pkcs7](https://github.com/fullsailor/pkcs7).\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/ber.go",
    "content": "package pkcs7\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n)\n\ntype asn1Object interface {\n\tEncodeTo(writer *bytes.Buffer) error\n}\n\ntype asn1Structured struct {\n\ttagBytes []byte\n\tcontent  []asn1Object\n}\n\nfunc (s asn1Structured) EncodeTo(out *bytes.Buffer) error {\n\tinner := new(bytes.Buffer)\n\tfor _, obj := range s.content {\n\t\terr := obj.EncodeTo(inner)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tout.Write(s.tagBytes)\n\tencodeLength(out, inner.Len())\n\tout.Write(inner.Bytes())\n\treturn nil\n}\n\ntype asn1Primitive struct {\n\ttagBytes []byte\n\tlength   int\n\tcontent  []byte\n}\n\nfunc (p asn1Primitive) EncodeTo(out *bytes.Buffer) error {\n\t_, err := out.Write(p.tagBytes)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err = encodeLength(out, p.length); err != nil {\n\t\treturn err\n\t}\n\t// fmt.Printf(\"%s--> tag: % X length: %d\\n\", strings.Repeat(\"| \", encodeIndent), p.tagBytes, p.length)\n\t// fmt.Printf(\"%s--> content length: %d\\n\", strings.Repeat(\"| \", encodeIndent), len(p.content))\n\tout.Write(p.content)\n\n\treturn nil\n}\n\nfunc ber2der(ber []byte) ([]byte, error) {\n\tif len(ber) == 0 {\n\t\treturn nil, errors.New(\"ber2der: input ber is empty\")\n\t}\n\t// fmt.Printf(\"--> ber2der: Transcoding %d bytes\\n\", len(ber))\n\tout := new(bytes.Buffer)\n\n\tobj, _, err := readObject(ber, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tobj.EncodeTo(out)\n\n\t// if offset < len(ber) {\n\t//\treturn nil, fmt.Errorf(\"ber2der: Content longer than expected. Got %d, expected %d\", offset, len(ber))\n\t// }\n\n\treturn out.Bytes(), nil\n}\n\n// encodes lengths that are longer than 127 into string of bytes\nfunc marshalLongLength(out *bytes.Buffer, i int) (err error) {\n\tn := lengthLength(i)\n\n\tfor ; n > 0; n-- {\n\t\terr = out.WriteByte(byte(i >> uint((n-1)*8)))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// computes the byte length of an encoded length value\nfunc lengthLength(i int) (numBytes int) {\n\tnumBytes = 1\n\tfor i > 255 {\n\t\tnumBytes++\n\t\ti >>= 8\n\t}\n\treturn\n}\n\n// encodes the length in DER format\n// If the length fits in 7 bits, the value is encoded directly.\n//\n// Otherwise, the number of bytes to encode the length is first determined.\n// This number is likely to be 4 or less for a 32bit length. This number is\n// added to 0x80. The length is encoded in big endian encoding follow after\n//\n// Examples:\n//  length | byte 1 | bytes n\n//  0      | 0x00   | -\n//  120    | 0x78   | -\n//  200    | 0x81   | 0xC8\n//  500    | 0x82   | 0x01 0xF4\n//\nfunc encodeLength(out *bytes.Buffer, length int) (err error) {\n\tif length >= 128 {\n\t\tl := lengthLength(length)\n\t\terr = out.WriteByte(0x80 | byte(l))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\terr = marshalLongLength(out, length)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t} else {\n\t\terr = out.WriteByte(byte(length))\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\nfunc readObject(ber []byte, offset int) (asn1Object, int, error) {\n\tberLen := len(ber)\n\tif offset >= berLen {\n\t\treturn nil, 0, errors.New(\"ber2der: offset is after end of ber data\")\n\t}\n\ttagStart := offset\n\tb := ber[offset]\n\toffset++\n\tif offset >= berLen {\n\t\treturn nil, 0, errors.New(\"ber2der: cannot move offset forward, end of ber data reached\")\n\t}\n\ttag := b & 0x1F // last 5 bits\n\tif tag == 0x1F {\n\t\ttag = 0\n\t\tfor ber[offset] >= 0x80 {\n\t\t\ttag = tag*128 + ber[offset] - 0x80\n\t\t\toffset++\n\t\t\tif offset > berLen {\n\t\t\t\treturn nil, 0, errors.New(\"ber2der: cannot move offset forward, end of ber data reached\")\n\t\t\t}\n\t\t}\n\t\t// jvehent 20170227: this doesn't appear to be used anywhere...\n\t\t// tag = tag*128 + ber[offset] - 0x80\n\t\toffset++\n\t\tif offset > berLen {\n\t\t\treturn nil, 0, errors.New(\"ber2der: cannot move offset forward, end of ber data reached\")\n\t\t}\n\t}\n\ttagEnd := offset\n\n\tkind := b & 0x20\n\tif kind == 0 {\n\t\tdebugprint(\"--> Primitive\\n\")\n\t} else {\n\t\tdebugprint(\"--> Constructed\\n\")\n\t}\n\t// read length\n\tvar length int\n\tl := ber[offset]\n\toffset++\n\tif offset > berLen {\n\t\treturn nil, 0, errors.New(\"ber2der: cannot move offset forward, end of ber data reached\")\n\t}\n\tindefinite := false\n\tif l > 0x80 {\n\t\tnumberOfBytes := (int)(l & 0x7F)\n\t\tif numberOfBytes > 4 { // int is only guaranteed to be 32bit\n\t\t\treturn nil, 0, errors.New(\"ber2der: BER tag length too long\")\n\t\t}\n\t\tif numberOfBytes == 4 && (int)(ber[offset]) > 0x7F {\n\t\t\treturn nil, 0, errors.New(\"ber2der: BER tag length is negative\")\n\t\t}\n\t\tif (int)(ber[offset]) == 0x0 {\n\t\t\treturn nil, 0, errors.New(\"ber2der: BER tag length has leading zero\")\n\t\t}\n\t\tdebugprint(\"--> (compute length) indicator byte: %x\\n\", l)\n\t\tdebugprint(\"--> (compute length) length bytes: % X\\n\", ber[offset:offset+numberOfBytes])\n\t\tfor i := 0; i < numberOfBytes; i++ {\n\t\t\tlength = length*256 + (int)(ber[offset])\n\t\t\toffset++\n\t\t\tif offset > berLen {\n\t\t\t\treturn nil, 0, errors.New(\"ber2der: cannot move offset forward, end of ber data reached\")\n\t\t\t}\n\t\t}\n\t} else if l == 0x80 {\n\t\tindefinite = true\n\t} else {\n\t\tlength = (int)(l)\n\t}\n\tif length < 0 {\n\t\treturn nil, 0, errors.New(\"ber2der: invalid negative value found in BER tag length\")\n\t}\n\t// fmt.Printf(\"--> length        : %d\\n\", length)\n\tcontentEnd := offset + length\n\tif contentEnd > len(ber) {\n\t\treturn nil, 0, errors.New(\"ber2der: BER tag length is more than available data\")\n\t}\n\tdebugprint(\"--> content start : %d\\n\", offset)\n\tdebugprint(\"--> content end   : %d\\n\", contentEnd)\n\tdebugprint(\"--> content       : % X\\n\", ber[offset:contentEnd])\n\tvar obj asn1Object\n\tif indefinite && kind == 0 {\n\t\treturn nil, 0, errors.New(\"ber2der: Indefinite form tag must have constructed encoding\")\n\t}\n\tif kind == 0 {\n\t\tobj = asn1Primitive{\n\t\t\ttagBytes: ber[tagStart:tagEnd],\n\t\t\tlength:   length,\n\t\t\tcontent:  ber[offset:contentEnd],\n\t\t}\n\t} else {\n\t\tvar subObjects []asn1Object\n\t\tfor (offset < contentEnd) || indefinite {\n\t\t\tvar subObj asn1Object\n\t\t\tvar err error\n\t\t\tsubObj, offset, err = readObject(ber, offset)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, 0, err\n\t\t\t}\n\t\t\tsubObjects = append(subObjects, subObj)\n\n\t\t\tif indefinite {\n\t\t\t\tterminated, err := isIndefiniteTermination(ber, offset)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, 0, err\n\t\t\t\t}\n\n\t\t\t\tif terminated {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tobj = asn1Structured{\n\t\t\ttagBytes: ber[tagStart:tagEnd],\n\t\t\tcontent:  subObjects,\n\t\t}\n\t}\n\n\t// Apply indefinite form length with 0x0000 terminator.\n\tif indefinite {\n\t\tcontentEnd = offset + 2\n\t}\n\n\treturn obj, contentEnd, nil\n}\n\nfunc isIndefiniteTermination(ber []byte, offset int) (bool, error) {\n\tif len(ber)-offset < 2 {\n\t\treturn false, errors.New(\"ber2der: Invalid BER format\")\n\t}\n\n\treturn bytes.Index(ber[offset:], []byte{0x0, 0x0}) == 0, nil\n}\n\nfunc debugprint(format string, a ...interface{}) {\n\t// fmt.Printf(format, a)\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/decrypt.go",
    "content": "package pkcs7\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/des\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n)\n\n// ErrUnsupportedAlgorithm tells you when our quick dev assumptions have failed\nvar ErrUnsupportedAlgorithm = errors.New(\"pkcs7: cannot decrypt data: only RSA, DES, DES-EDE3, AES-256-CBC and AES-128-GCM supported\")\n\n// ErrUnsupportedAsymmetricEncryptionAlgorithm is returned when attempting to use an unknown asymmetric encryption algorithm\nvar ErrUnsupportedAsymmetricEncryptionAlgorithm = errors.New(\"pkcs7: cannot decrypt data: only RSA PKCS#1 v1.5 and RSA OAEP are supported\")\n\n// ErrUnsupportedKeyType is returned when attempting to encrypting keys using a key that's not an RSA key\nvar ErrUnsupportedKeyType = errors.New(\"pkcs7: only RSA keys are supported\")\n\n// ErrNotEncryptedContent is returned when attempting to Decrypt data that is not encrypted data\nvar ErrNotEncryptedContent = errors.New(\"pkcs7: content data is a decryptable data type\")\n\n// Decrypt decrypts encrypted content info for recipient cert and private key\nfunc (p7 *PKCS7) Decrypt(cert *x509.Certificate, pkey crypto.PrivateKey) ([]byte, error) {\n\tdata, ok := p7.raw.(envelopedData)\n\tif !ok {\n\t\treturn nil, ErrNotEncryptedContent\n\t}\n\trecipient := selectRecipientForCertificate(data.RecipientInfos, cert)\n\tif recipient.EncryptedKey == nil {\n\t\treturn nil, errors.New(\"pkcs7: no enveloped recipient for provided certificate\")\n\t}\n\tswitch pkey := pkey.(type) {\n\tcase crypto.Decrypter:\n\t\tvar opts crypto.DecrypterOpts\n\t\tswitch algorithm := recipient.KeyEncryptionAlgorithm.Algorithm; {\n\t\tcase algorithm.Equal(OIDEncryptionAlgorithmRSAESOAEP):\n\t\t\thashFunc, err := getHashFuncForKeyEncryptionAlgorithm(recipient.KeyEncryptionAlgorithm)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\topts = &rsa.OAEPOptions{Hash: hashFunc}\n\t\tcase algorithm.Equal(OIDEncryptionAlgorithmRSA):\n\t\t\topts = &rsa.PKCS1v15DecryptOptions{}\n\t\tdefault:\n\t\t\treturn nil, ErrUnsupportedAsymmetricEncryptionAlgorithm\n\t\t}\n\t\tcontentKey, err := pkey.Decrypt(rand.Reader, recipient.EncryptedKey, opts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn data.EncryptedContentInfo.decrypt(contentKey)\n\t}\n\treturn nil, ErrUnsupportedAlgorithm\n}\n\n// RFC 4055, 4.1\n// The current ASN.1 parser does not support non-integer defaults so the 'default:' tags here do nothing.\ntype rsaOAEPAlgorithmParameters struct {\n\tHashFunc    pkix.AlgorithmIdentifier `asn1:\"optional,explicit,tag:0,default:sha1Identifier\"`\n\tMaskGenFunc pkix.AlgorithmIdentifier `asn1:\"optional,explicit,tag:1,default:mgf1SHA1Identifier\"`\n\tPSourceFunc pkix.AlgorithmIdentifier `asn1:\"optional,explicit,tag:2,default:pSpecifiedEmptyIdentifier\"`\n}\n\nfunc getHashFuncForKeyEncryptionAlgorithm(keyEncryptionAlgorithm pkix.AlgorithmIdentifier) (crypto.Hash, error) {\n\tinvalidHashFunc := crypto.Hash(0)\n\tparams := &rsaOAEPAlgorithmParameters{\n\t\tHashFunc: pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA1}, // set default hash algorithm to SHA1\n\t}\n\tvar rest []byte\n\trest, err := asn1.Unmarshal(keyEncryptionAlgorithm.Parameters.FullBytes, params)\n\tif err != nil {\n\t\treturn invalidHashFunc, fmt.Errorf(\"pkcs7: failed unmarshaling key encryption algorithm parameters: %v\", err)\n\t}\n\tif len(rest) != 0 {\n\t\treturn invalidHashFunc, errors.New(\"pkcs7: trailing data after RSA OAEP parameters\")\n\t}\n\n\tswitch {\n\tcase params.HashFunc.Algorithm.Equal(OIDDigestAlgorithmSHA1):\n\t\treturn crypto.SHA1, nil\n\tcase params.HashFunc.Algorithm.Equal(OIDDigestAlgorithmSHA224):\n\t\treturn crypto.SHA224, nil\n\tcase params.HashFunc.Algorithm.Equal(OIDDigestAlgorithmSHA256):\n\t\treturn crypto.SHA256, nil\n\tcase params.HashFunc.Algorithm.Equal(OIDDigestAlgorithmSHA384):\n\t\treturn crypto.SHA384, nil\n\tcase params.HashFunc.Algorithm.Equal(OIDDigestAlgorithmSHA512):\n\t\treturn crypto.SHA512, nil\n\tdefault:\n\t\treturn invalidHashFunc, errors.New(\"pkcs7: unsupported hash function for RSA OAEP\")\n\t}\n}\n\n// DecryptUsingPSK decrypts encrypted data using caller provided\n// pre-shared secret\nfunc (p7 *PKCS7) DecryptUsingPSK(key []byte) ([]byte, error) {\n\tdata, ok := p7.raw.(encryptedData)\n\tif !ok {\n\t\treturn nil, ErrNotEncryptedContent\n\t}\n\treturn data.EncryptedContentInfo.decrypt(key)\n}\n\nfunc (eci encryptedContentInfo) decrypt(key []byte) ([]byte, error) {\n\talg := eci.ContentEncryptionAlgorithm.Algorithm\n\tif !alg.Equal(OIDEncryptionAlgorithmDESCBC) &&\n\t\t!alg.Equal(OIDEncryptionAlgorithmDESEDE3CBC) &&\n\t\t!alg.Equal(OIDEncryptionAlgorithmAES256CBC) &&\n\t\t!alg.Equal(OIDEncryptionAlgorithmAES128CBC) &&\n\t\t!alg.Equal(OIDEncryptionAlgorithmAES128GCM) &&\n\t\t!alg.Equal(OIDEncryptionAlgorithmAES256GCM) {\n\t\treturn nil, ErrUnsupportedAlgorithm\n\t}\n\n\t// EncryptedContent can either be constructed of multple OCTET STRINGs\n\t// or _be_ a tagged OCTET STRING\n\tvar cyphertext []byte\n\tif eci.EncryptedContent.IsCompound {\n\t\t// Complex case to concat all of the children OCTET STRINGs\n\t\tvar buf bytes.Buffer\n\t\tcypherbytes := eci.EncryptedContent.Bytes\n\t\tfor {\n\t\t\tvar part []byte\n\t\t\tcypherbytes, _ = asn1.Unmarshal(cypherbytes, &part)\n\t\t\tbuf.Write(part)\n\t\t\tif cypherbytes == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tcyphertext = buf.Bytes()\n\t} else {\n\t\t// Simple case, the bytes _are_ the cyphertext\n\t\tcyphertext = eci.EncryptedContent.Bytes\n\t}\n\n\tvar block cipher.Block\n\tvar err error\n\n\tswitch {\n\tcase alg.Equal(OIDEncryptionAlgorithmDESCBC):\n\t\tblock, err = des.NewCipher(key)\n\tcase alg.Equal(OIDEncryptionAlgorithmDESEDE3CBC):\n\t\tblock, err = des.NewTripleDESCipher(key)\n\tcase alg.Equal(OIDEncryptionAlgorithmAES256CBC), alg.Equal(OIDEncryptionAlgorithmAES256GCM):\n\t\tfallthrough\n\tcase alg.Equal(OIDEncryptionAlgorithmAES128GCM), alg.Equal(OIDEncryptionAlgorithmAES128CBC):\n\t\tblock, err = aes.NewCipher(key)\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif alg.Equal(OIDEncryptionAlgorithmAES128GCM) || alg.Equal(OIDEncryptionAlgorithmAES256GCM) {\n\t\tparams := aesGCMParameters{}\n\t\tparamBytes := eci.ContentEncryptionAlgorithm.Parameters.Bytes\n\n\t\t_, err := asn1.Unmarshal(paramBytes, &params)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tgcm, err := cipher.NewGCM(block)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif len(params.Nonce) != gcm.NonceSize() {\n\t\t\treturn nil, errors.New(\"pkcs7: encryption algorithm parameters are incorrect\")\n\t\t}\n\t\tif params.ICVLen != gcm.Overhead() {\n\t\t\treturn nil, errors.New(\"pkcs7: encryption algorithm parameters are incorrect\")\n\t\t}\n\n\t\tplaintext, err := gcm.Open(nil, params.Nonce, cyphertext, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn plaintext, nil\n\t}\n\n\tiv := eci.ContentEncryptionAlgorithm.Parameters.Bytes\n\tif len(iv) != block.BlockSize() {\n\t\treturn nil, errors.New(\"pkcs7: encryption algorithm parameters are malformed\")\n\t}\n\tmode := cipher.NewCBCDecrypter(block, iv)\n\tplaintext := make([]byte, len(cyphertext))\n\tmode.CryptBlocks(plaintext, cyphertext)\n\tif plaintext, err = unpad(plaintext, mode.BlockSize()); err != nil {\n\t\treturn nil, err\n\t}\n\treturn plaintext, nil\n}\n\nfunc unpad(data []byte, blocklen int) ([]byte, error) {\n\tif blocklen < 1 {\n\t\treturn nil, fmt.Errorf(\"pkcs7: invalid blocklen %d\", blocklen)\n\t}\n\tif len(data)%blocklen != 0 || len(data) == 0 {\n\t\treturn nil, fmt.Errorf(\"pkcs7: invalid data len %d\", len(data))\n\t}\n\n\t// the last byte is the length of padding\n\tpadlen := int(data[len(data)-1])\n\n\t// check padding integrity, all bytes should be the same\n\tpad := data[len(data)-padlen:]\n\tfor _, padbyte := range pad {\n\t\tif padbyte != byte(padlen) {\n\t\t\treturn nil, errors.New(\"pkcs7: invalid padding\")\n\t\t}\n\t}\n\n\treturn data[:len(data)-padlen], nil\n}\n\nfunc selectRecipientForCertificate(recipients []recipientInfo, cert *x509.Certificate) recipientInfo {\n\tfor _, recp := range recipients {\n\t\tif isCertMatchForIssuerAndSerial(cert, recp.IssuerAndSerialNumber) {\n\t\t\treturn recp\n\t\t}\n\t}\n\treturn recipientInfo{}\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/encrypt.go",
    "content": "package pkcs7\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/des\"\n\t\"crypto/rand\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n)\n\ntype envelopedData struct {\n\tVersion              int\n\tRecipientInfos       []recipientInfo `asn1:\"set\"`\n\tEncryptedContentInfo encryptedContentInfo\n}\n\ntype encryptedData struct {\n\tVersion              int\n\tEncryptedContentInfo encryptedContentInfo\n}\n\ntype recipientInfo struct {\n\tVersion                int\n\tIssuerAndSerialNumber  issuerAndSerial\n\tKeyEncryptionAlgorithm pkix.AlgorithmIdentifier\n\tEncryptedKey           []byte\n}\n\ntype encryptedContentInfo struct {\n\tContentType                asn1.ObjectIdentifier\n\tContentEncryptionAlgorithm pkix.AlgorithmIdentifier\n\tEncryptedContent           asn1.RawValue `asn1:\"tag:0,optional\"`\n}\n\nconst (\n\t// EncryptionAlgorithmDESCBC is the DES CBC encryption algorithm\n\tEncryptionAlgorithmDESCBC = iota\n\n\t// EncryptionAlgorithmAES128CBC is the AES 128 bits with CBC encryption algorithm\n\t// Avoid this algorithm unless required for interoperability; use AES GCM instead.\n\tEncryptionAlgorithmAES128CBC\n\n\t// EncryptionAlgorithmAES256CBC is the AES 256 bits with CBC encryption algorithm\n\t// Avoid this algorithm unless required for interoperability; use AES GCM instead.\n\tEncryptionAlgorithmAES256CBC\n\n\t// EncryptionAlgorithmAES128GCM is the AES 128 bits with GCM encryption algorithm\n\tEncryptionAlgorithmAES128GCM\n\n\t// EncryptionAlgorithmAES256GCM is the AES 256 bits with GCM encryption algorithm\n\tEncryptionAlgorithmAES256GCM\n)\n\n// ContentEncryptionAlgorithm determines the algorithm used to encrypt the\n// plaintext message. Change the value of this variable to change which\n// algorithm is used in the Encrypt() function.\nvar ContentEncryptionAlgorithm = EncryptionAlgorithmDESCBC\n\n// ErrUnsupportedEncryptionAlgorithm is returned when attempting to encrypt\n// content with an unsupported algorithm.\nvar ErrUnsupportedEncryptionAlgorithm = errors.New(\"pkcs7: cannot encrypt content: only DES-CBC, AES-CBC, and AES-GCM supported\")\n\n// KeyEncryptionAlgorithm determines the algorithm used to encrypt a\n// content key. Change the value of this variable to change which\n// algorithm is used in the Encrypt() function.\nvar KeyEncryptionAlgorithm = OIDEncryptionAlgorithmRSA\n\n// ErrUnsupportedKeyEncryptionAlgorithm is returned when an\n// unsupported key encryption algorithm OID is provided.\nvar ErrUnsupportedKeyEncryptionAlgorithm = errors.New(\"pkcs7: unsupported key encryption algorithm provided\")\n\n// KeyEncryptionHash determines the crypto.Hash algorithm to use\n// when encrypting a content key. Change the value of this variable\n// to change which algorithm is used in the Encrypt() function.\nvar KeyEncryptionHash = crypto.SHA256\n\n// ErrUnsupportedKeyEncryptionHash is returned when an\n// unsupported key encryption hash is provided.\nvar ErrUnsupportedKeyEncryptionHash = errors.New(\"pkcs7: unsupported key encryption hash provided\")\n\n// ErrPSKNotProvided is returned when attempting to encrypt\n// using a PSK without actually providing the PSK.\nvar ErrPSKNotProvided = errors.New(\"pkcs7: cannot encrypt content: PSK not provided\")\n\nconst nonceSize = 12\n\ntype aesGCMParameters struct {\n\tNonce  []byte `asn1:\"tag:4\"`\n\tICVLen int\n}\n\nfunc encryptAESGCM(content []byte, key []byte) ([]byte, *encryptedContentInfo, error) {\n\tvar keyLen int\n\tvar algID asn1.ObjectIdentifier\n\tswitch ContentEncryptionAlgorithm {\n\tcase EncryptionAlgorithmAES128GCM:\n\t\tkeyLen = 16\n\t\talgID = OIDEncryptionAlgorithmAES128GCM\n\tcase EncryptionAlgorithmAES256GCM:\n\t\tkeyLen = 32\n\t\talgID = OIDEncryptionAlgorithmAES256GCM\n\tdefault:\n\t\treturn nil, nil, fmt.Errorf(\"invalid ContentEncryptionAlgorithm in encryptAESGCM: %d\", ContentEncryptionAlgorithm)\n\t}\n\tif key == nil {\n\t\t// Create AES key\n\t\tkey = make([]byte, keyLen)\n\n\t\t_, err := rand.Read(key)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\t// Create nonce\n\tnonce := make([]byte, nonceSize)\n\n\t_, err := rand.Read(nonce)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// Encrypt content\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tgcm, err := cipher.NewGCM(block)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tciphertext := gcm.Seal(nil, nonce, content, nil)\n\n\t// Prepare ASN.1 Encrypted Content Info\n\tparamSeq := aesGCMParameters{\n\t\tNonce:  nonce,\n\t\tICVLen: gcm.Overhead(),\n\t}\n\n\tparamBytes, err := asn1.Marshal(paramSeq)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\teci := encryptedContentInfo{\n\t\tContentType: OIDData,\n\t\tContentEncryptionAlgorithm: pkix.AlgorithmIdentifier{\n\t\t\tAlgorithm: algID,\n\t\t\tParameters: asn1.RawValue{\n\t\t\t\tTag:   asn1.TagSequence,\n\t\t\t\tBytes: paramBytes,\n\t\t\t},\n\t\t},\n\t\tEncryptedContent: marshalEncryptedContent(ciphertext),\n\t}\n\n\treturn key, &eci, nil\n}\n\nfunc encryptDESCBC(content []byte, key []byte) ([]byte, *encryptedContentInfo, error) {\n\tif key == nil {\n\t\t// Create DES key\n\t\tkey = make([]byte, 8)\n\n\t\t_, err := rand.Read(key)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\t// Create CBC IV\n\tiv := make([]byte, des.BlockSize)\n\t_, err := rand.Read(iv)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// Encrypt padded content\n\tblock, err := des.NewCipher(key)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tmode := cipher.NewCBCEncrypter(block, iv)\n\tplaintext, err := pad(content, mode.BlockSize())\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tcyphertext := make([]byte, len(plaintext))\n\tmode.CryptBlocks(cyphertext, plaintext)\n\n\t// Prepare ASN.1 Encrypted Content Info\n\teci := encryptedContentInfo{\n\t\tContentType: OIDData,\n\t\tContentEncryptionAlgorithm: pkix.AlgorithmIdentifier{\n\t\t\tAlgorithm:  OIDEncryptionAlgorithmDESCBC,\n\t\t\tParameters: asn1.RawValue{Tag: 4, Bytes: iv},\n\t\t},\n\t\tEncryptedContent: marshalEncryptedContent(cyphertext),\n\t}\n\n\treturn key, &eci, nil\n}\n\nfunc encryptAESCBC(content []byte, key []byte) ([]byte, *encryptedContentInfo, error) {\n\tvar keyLen int\n\tvar algID asn1.ObjectIdentifier\n\tswitch ContentEncryptionAlgorithm {\n\tcase EncryptionAlgorithmAES128CBC:\n\t\tkeyLen = 16\n\t\talgID = OIDEncryptionAlgorithmAES128CBC\n\tcase EncryptionAlgorithmAES256CBC:\n\t\tkeyLen = 32\n\t\talgID = OIDEncryptionAlgorithmAES256CBC\n\tdefault:\n\t\treturn nil, nil, fmt.Errorf(\"invalid ContentEncryptionAlgorithm in encryptAESCBC: %d\", ContentEncryptionAlgorithm)\n\t}\n\n\tif key == nil {\n\t\t// Create AES key\n\t\tkey = make([]byte, keyLen)\n\n\t\t_, err := rand.Read(key)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\t// Create CBC IV\n\tiv := make([]byte, aes.BlockSize)\n\t_, err := rand.Read(iv)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// Encrypt padded content\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tmode := cipher.NewCBCEncrypter(block, iv)\n\tplaintext, err := pad(content, mode.BlockSize())\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tcyphertext := make([]byte, len(plaintext))\n\tmode.CryptBlocks(cyphertext, plaintext)\n\n\t// Prepare ASN.1 Encrypted Content Info\n\teci := encryptedContentInfo{\n\t\tContentType: OIDData,\n\t\tContentEncryptionAlgorithm: pkix.AlgorithmIdentifier{\n\t\t\tAlgorithm:  algID,\n\t\t\tParameters: asn1.RawValue{Tag: 4, Bytes: iv},\n\t\t},\n\t\tEncryptedContent: marshalEncryptedContent(cyphertext),\n\t}\n\n\treturn key, &eci, nil\n}\n\n// Encrypt creates and returns an envelope data PKCS7 structure with encrypted\n// recipient keys for each recipient public key.\n//\n// The algorithm used to perform encryption is determined by the current value\n// of the global ContentEncryptionAlgorithm package variable. By default, the\n// value is EncryptionAlgorithmDESCBC. To use a different algorithm, change the\n// value before calling Encrypt(). For example:\n//\n//\tContentEncryptionAlgorithm = EncryptionAlgorithmAES256GCM\n//\n// TODO(fullsailor): Add support for encrypting content with other algorithms\nfunc Encrypt(content []byte, recipients []*x509.Certificate) ([]byte, error) {\n\tvar eci *encryptedContentInfo\n\tvar key []byte\n\tvar err error\n\n\t// Apply chosen symmetric encryption method\n\tswitch ContentEncryptionAlgorithm {\n\tcase EncryptionAlgorithmDESCBC:\n\t\tkey, eci, err = encryptDESCBC(content, nil)\n\tcase EncryptionAlgorithmAES128CBC:\n\t\tfallthrough\n\tcase EncryptionAlgorithmAES256CBC:\n\t\tkey, eci, err = encryptAESCBC(content, nil)\n\tcase EncryptionAlgorithmAES128GCM:\n\t\tfallthrough\n\tcase EncryptionAlgorithmAES256GCM:\n\t\tkey, eci, err = encryptAESGCM(content, nil)\n\n\tdefault:\n\t\treturn nil, ErrUnsupportedEncryptionAlgorithm\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Prepare each recipient's encrypted cipher key\n\trecipientInfos := make([]recipientInfo, len(recipients))\n\tfor i, recipient := range recipients {\n\t\talgorithm := KeyEncryptionAlgorithm\n\t\thash := KeyEncryptionHash\n\t\tvar kea pkix.AlgorithmIdentifier\n\t\tswitch {\n\t\tcase algorithm.Equal(OIDEncryptionAlgorithmRSAESOAEP):\n\t\t\tparameters, err := getParametersForKeyEncryptionAlgorithm(algorithm, hash)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to get parameters for key encryption: %v\", err)\n\t\t\t}\n\t\t\tkea = pkix.AlgorithmIdentifier{\n\t\t\t\tAlgorithm:  algorithm,\n\t\t\t\tParameters: parameters,\n\t\t\t}\n\t\tcase algorithm.Equal(OIDEncryptionAlgorithmRSA):\n\t\t\tkea = pkix.AlgorithmIdentifier{\n\t\t\t\tAlgorithm: algorithm,\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, ErrUnsupportedKeyEncryptionAlgorithm\n\t\t}\n\t\tencrypted, err := encryptKey(key, recipient, algorithm, hash)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tias, err := cert2issuerAndSerial(recipient)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tinfo := recipientInfo{\n\t\t\tVersion:                0,\n\t\t\tIssuerAndSerialNumber:  ias,\n\t\t\tKeyEncryptionAlgorithm: kea,\n\t\t\tEncryptedKey:           encrypted,\n\t\t}\n\t\trecipientInfos[i] = info\n\t}\n\n\t// Prepare envelope content\n\tenvelope := envelopedData{\n\t\tEncryptedContentInfo: *eci,\n\t\tVersion:              0,\n\t\tRecipientInfos:       recipientInfos,\n\t}\n\tinnerContent, err := asn1.Marshal(envelope)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Prepare outer payload structure\n\twrapper := contentInfo{\n\t\tContentType: OIDEnvelopedData,\n\t\tContent:     asn1.RawValue{Class: 2, Tag: 0, IsCompound: true, Bytes: innerContent},\n\t}\n\n\treturn asn1.Marshal(wrapper)\n}\n\nfunc getParametersForKeyEncryptionAlgorithm(algorithm asn1.ObjectIdentifier, hash crypto.Hash) (asn1.RawValue, error) {\n\tif !algorithm.Equal(OIDEncryptionAlgorithmRSAESOAEP) {\n\t\treturn asn1.RawValue{}, nil // return empty; not used\n\t}\n\n\tparams := rsaOAEPAlgorithmParameters{}\n\tswitch hash {\n\tcase crypto.SHA1:\n\t\tparams.HashFunc = pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA1}\n\tcase crypto.SHA224:\n\t\tparams.HashFunc = pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA224}\n\tcase crypto.SHA256:\n\t\tparams.HashFunc = pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA256}\n\tcase crypto.SHA384:\n\t\tparams.HashFunc = pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA384}\n\tcase crypto.SHA512:\n\t\tparams.HashFunc = pkix.AlgorithmIdentifier{Algorithm: OIDDigestAlgorithmSHA512}\n\tdefault:\n\t\treturn asn1.RawValue{}, ErrUnsupportedAlgorithm\n\t}\n\n\tb, err := asn1.Marshal(params)\n\tif err != nil {\n\t\treturn asn1.RawValue{}, fmt.Errorf(\"failed marshaling key encryption parameters: %v\", err)\n\t}\n\n\treturn asn1.RawValue{\n\t\tFullBytes: b,\n\t}, nil\n}\n\n// EncryptUsingPSK creates and returns an encrypted data PKCS7 structure,\n// encrypted using caller provided pre-shared secret.\nfunc EncryptUsingPSK(content []byte, key []byte) ([]byte, error) {\n\tvar eci *encryptedContentInfo\n\tvar err error\n\n\tif key == nil {\n\t\treturn nil, ErrPSKNotProvided\n\t}\n\n\t// Apply chosen symmetric encryption method\n\tswitch ContentEncryptionAlgorithm {\n\tcase EncryptionAlgorithmDESCBC:\n\t\t_, eci, err = encryptDESCBC(content, key)\n\n\tcase EncryptionAlgorithmAES128GCM:\n\t\tfallthrough\n\tcase EncryptionAlgorithmAES256GCM:\n\t\t_, eci, err = encryptAESGCM(content, key)\n\n\tdefault:\n\t\treturn nil, ErrUnsupportedEncryptionAlgorithm\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Prepare encrypted-data content\n\ted := encryptedData{\n\t\tVersion:              0,\n\t\tEncryptedContentInfo: *eci,\n\t}\n\tinnerContent, err := asn1.Marshal(ed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Prepare outer payload structure\n\twrapper := contentInfo{\n\t\tContentType: OIDEncryptedData,\n\t\tContent:     asn1.RawValue{Class: 2, Tag: 0, IsCompound: true, Bytes: innerContent},\n\t}\n\n\treturn asn1.Marshal(wrapper)\n}\n\nfunc marshalEncryptedContent(content []byte) asn1.RawValue {\n\treturn asn1.RawValue{Bytes: content, Class: 2, IsCompound: false}\n}\n\nfunc encryptKey(key []byte, recipient *x509.Certificate, algorithm asn1.ObjectIdentifier, hash crypto.Hash) ([]byte, error) {\n\tpub, ok := recipient.PublicKey.(*rsa.PublicKey)\n\tif !ok {\n\t\treturn nil, ErrUnsupportedKeyType\n\t}\n\n\tswitch {\n\tcase algorithm.Equal(OIDEncryptionAlgorithmRSA):\n\t\treturn rsa.EncryptPKCS1v15(rand.Reader, pub, key)\n\tcase algorithm.Equal(OIDEncryptionAlgorithmRSAESOAEP):\n\t\treturn rsa.EncryptOAEP(hash.New(), rand.Reader, pub, key, nil)\n\tdefault:\n\t\treturn nil, ErrUnsupportedKeyEncryptionAlgorithm\n\t}\n}\n\nfunc pad(data []byte, blocklen int) ([]byte, error) {\n\tif blocklen < 1 {\n\t\treturn nil, fmt.Errorf(\"invalid blocklen %d\", blocklen)\n\t}\n\tpadlen := blocklen - (len(data) % blocklen)\n\tif padlen == 0 {\n\t\tpadlen = blocklen\n\t}\n\tpad := bytes.Repeat([]byte{byte(padlen)}, padlen)\n\treturn append(data, pad...), nil\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/debug.go",
    "content": "package legacyx509\n\nimport \"fmt\"\n\n// legacyGodebugSetting is a type mimicking Go's internal godebug package\n// settings, which are used to enable / disable certain functionalities at\n// build time.\ntype legacyGodebugSetting int\n\nfunc (s legacyGodebugSetting) Value() string {\n\treturn fmt.Sprintf(\"%d\", s)\n}\n\nfunc (s legacyGodebugSetting) IncNonDefault() {}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/doc.go",
    "content": "/*\nPackage legacyx509 is a copy of certain parts of Go's crypto/x509 package.\nIt is based on Go 1.23, and has just the parts copied over required for\nparsing X509 certificates.\n\nThe primary reason this copy exists is to keep support for parsing PKCS7\nmessages containing Simple Certificate Enrolment Protocol (SCEP) requests\nfrom Windows devices. Go 1.23 made a change marking certificates with a\ncritical authority key identifier as invalid, which is mandated by RFC 5280,\nbut apparently Windows marks those specific certificates as such, resulting\nin those SCEP requests failing from being parsed correctly.\n*/\n\npackage legacyx509\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/oid.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage legacyx509\n\nimport (\n\t\"bytes\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"math\"\n\t\"math/big\"\n\t\"math/bits\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nvar (\n\terrInvalidOID = errors.New(\"invalid oid\")\n)\n\n// An OID represents an ASN.1 OBJECT IDENTIFIER.\ntype OID struct {\n\tder []byte\n}\n\n// ParseOID parses a Object Identifier string, represented by ASCII numbers separated by dots.\nfunc ParseOID(oid string) (OID, error) {\n\tvar o OID\n\treturn o, o.unmarshalOIDText(oid)\n}\n\nfunc newOIDFromDER(der []byte) (OID, bool) {\n\tif len(der) == 0 || der[len(der)-1]&0x80 != 0 {\n\t\treturn OID{}, false\n\t}\n\n\tstart := 0\n\tfor i, v := range der {\n\t\t// ITU-T X.690, section 8.19.2:\n\t\t// The subidentifier shall be encoded in the fewest possible octets,\n\t\t// that is, the leading octet of the subidentifier shall not have the value 0x80.\n\t\tif i == start && v == 0x80 {\n\t\t\treturn OID{}, false\n\t\t}\n\t\tif v&0x80 == 0 {\n\t\t\tstart = i + 1\n\t\t}\n\t}\n\n\treturn OID{der}, true\n}\n\n// OIDFromInts creates a new OID using ints, each integer is a separate component.\nfunc OIDFromInts(oid []uint64) (OID, error) {\n\tif len(oid) < 2 || oid[0] > 2 || (oid[0] < 2 && oid[1] >= 40) {\n\t\treturn OID{}, errInvalidOID\n\t}\n\n\tlength := base128IntLength(oid[0]*40 + oid[1])\n\tfor _, v := range oid[2:] {\n\t\tlength += base128IntLength(v)\n\t}\n\n\tder := make([]byte, 0, length)\n\tder = appendBase128Int(der, oid[0]*40+oid[1])\n\tfor _, v := range oid[2:] {\n\t\tder = appendBase128Int(der, v)\n\t}\n\treturn OID{der}, nil\n}\n\nfunc base128IntLength(n uint64) int {\n\tif n == 0 {\n\t\treturn 1\n\t}\n\treturn (bits.Len64(n) + 6) / 7\n}\n\nfunc appendBase128Int(dst []byte, n uint64) []byte {\n\tfor i := base128IntLength(n) - 1; i >= 0; i-- {\n\t\to := byte(n >> uint(i*7))\n\t\to &= 0x7f\n\t\tif i != 0 {\n\t\t\to |= 0x80\n\t\t}\n\t\tdst = append(dst, o)\n\t}\n\treturn dst\n}\n\nfunc base128BigIntLength(n *big.Int) int {\n\tif n.Cmp(big.NewInt(0)) == 0 {\n\t\treturn 1\n\t}\n\treturn (n.BitLen() + 6) / 7\n}\n\nfunc appendBase128BigInt(dst []byte, n *big.Int) []byte {\n\tif n.Cmp(big.NewInt(0)) == 0 {\n\t\treturn append(dst, 0)\n\t}\n\n\tfor i := base128BigIntLength(n) - 1; i >= 0; i-- {\n\t\to := byte(big.NewInt(0).Rsh(n, uint(i)*7).Bits()[0])\n\t\to &= 0x7f\n\t\tif i != 0 {\n\t\t\to |= 0x80\n\t\t}\n\t\tdst = append(dst, o)\n\t}\n\treturn dst\n}\n\n// AppendText implements [encoding.TextAppender]\nfunc (o OID) AppendText(b []byte) ([]byte, error) {\n\treturn append(b, o.String()...), nil\n}\n\n// MarshalText implements [encoding.TextMarshaler]\nfunc (o OID) MarshalText() ([]byte, error) {\n\treturn o.AppendText(nil)\n}\n\n// UnmarshalText implements [encoding.TextUnmarshaler]\nfunc (o *OID) UnmarshalText(text []byte) error {\n\treturn o.unmarshalOIDText(string(text))\n}\n\n// cutString slices s around the first instance of sep,\n// returning the text before and after sep.\n// The found result reports whether sep appears in s.\n// If sep does not appear in s, cut returns s, \"\", false.\nfunc cutString(s, sep string) (before, after string, found bool) {\n\tif i := strings.Index(s, sep); i >= 0 {\n\t\treturn s[:i], s[i+len(sep):], true\n\t}\n\treturn s, \"\", false\n}\n\nfunc (o *OID) unmarshalOIDText(oid string) error {\n\t// (*big.Int).SetString allows +/- signs, but we don't want\n\t// to allow them in the string representation of Object Identifier, so\n\t// reject such encodings.\n\tfor _, c := range oid {\n\t\tisDigit := c >= '0' && c <= '9'\n\t\tif !isDigit && c != '.' {\n\t\t\treturn errInvalidOID\n\t\t}\n\t}\n\n\tvar (\n\t\tfirstNum  string\n\t\tsecondNum string\n\t)\n\n\tvar nextComponentExists bool\n\tfirstNum, oid, nextComponentExists = cutString(oid, \".\")\n\tif !nextComponentExists {\n\t\treturn errInvalidOID\n\t}\n\tsecondNum, oid, nextComponentExists = cutString(oid, \".\")\n\n\tvar (\n\t\tfirst  = big.NewInt(0)\n\t\tsecond = big.NewInt(0)\n\t)\n\n\tif _, ok := first.SetString(firstNum, 10); !ok {\n\t\treturn errInvalidOID\n\t}\n\tif _, ok := second.SetString(secondNum, 10); !ok {\n\t\treturn errInvalidOID\n\t}\n\n\tif first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {\n\t\treturn errInvalidOID\n\t}\n\n\tfirstComponent := first.Mul(first, big.NewInt(40))\n\tfirstComponent.Add(firstComponent, second)\n\n\tder := appendBase128BigInt(make([]byte, 0, 32), firstComponent)\n\n\tfor nextComponentExists {\n\t\tvar strNum string\n\t\tstrNum, oid, nextComponentExists = cutString(oid, \".\")\n\t\tb, ok := big.NewInt(0).SetString(strNum, 10)\n\t\tif !ok {\n\t\t\treturn errInvalidOID\n\t\t}\n\t\tder = appendBase128BigInt(der, b)\n\t}\n\n\to.der = der\n\treturn nil\n}\n\n// AppendBinary implements [encoding.BinaryAppender]\nfunc (o OID) AppendBinary(b []byte) ([]byte, error) {\n\treturn append(b, o.der...), nil\n}\n\n// MarshalBinary implements [encoding.BinaryMarshaler]\nfunc (o OID) MarshalBinary() ([]byte, error) {\n\treturn o.AppendBinary(nil)\n}\n\n// cloneBytes returns a copy of b[:len(b)].\n// The result may have additional unused capacity.\n// Clone(nil) returns nil.\nfunc cloneBytes(b []byte) []byte {\n\tif b == nil {\n\t\treturn nil\n\t}\n\treturn append([]byte{}, b...)\n}\n\n// UnmarshalBinary implements [encoding.BinaryUnmarshaler]\nfunc (o *OID) UnmarshalBinary(b []byte) error {\n\toid, ok := newOIDFromDER(cloneBytes(b))\n\tif !ok {\n\t\treturn errInvalidOID\n\t}\n\t*o = oid\n\treturn nil\n}\n\n// Equal returns true when oid and other represents the same Object Identifier.\nfunc (oid OID) Equal(other OID) bool {\n\t// There is only one possible DER encoding of\n\t// each unique Object Identifier.\n\treturn bytes.Equal(oid.der, other.der)\n}\n\nfunc parseBase128Int(bytes []byte, initOffset int) (ret, offset int, failed bool) {\n\toffset = initOffset\n\tvar ret64 int64\n\tfor shifted := 0; offset < len(bytes); shifted++ {\n\t\t// 5 * 7 bits per byte == 35 bits of data\n\t\t// Thus the representation is either non-minimal or too large for an int32\n\t\tif shifted == 5 {\n\t\t\tfailed = true\n\t\t\treturn\n\t\t}\n\t\tret64 <<= 7\n\t\tb := bytes[offset]\n\t\t// integers should be minimally encoded, so the leading octet should\n\t\t// never be 0x80\n\t\tif shifted == 0 && b == 0x80 {\n\t\t\tfailed = true\n\t\t\treturn\n\t\t}\n\t\tret64 |= int64(b & 0x7f)\n\t\toffset++\n\t\tif b&0x80 == 0 {\n\t\t\tret = int(ret64)\n\t\t\t// Ensure that the returned value fits in an int on all platforms\n\t\t\tif ret64 > math.MaxInt32 {\n\t\t\t\tfailed = true\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\tfailed = true\n\treturn\n}\n\n// EqualASN1OID returns whether an OID equals an asn1.ObjectIdentifier. If\n// asn1.ObjectIdentifier cannot represent the OID specified by oid, because\n// a component of OID requires more than 31 bits, it returns false.\nfunc (oid OID) EqualASN1OID(other asn1.ObjectIdentifier) bool {\n\tif len(other) < 2 {\n\t\treturn false\n\t}\n\tv, offset, failed := parseBase128Int(oid.der, 0)\n\tif failed {\n\t\t// This should never happen, since we've already parsed the OID,\n\t\t// but just in case.\n\t\treturn false\n\t}\n\tif v < 80 {\n\t\ta, b := v/40, v%40\n\t\tif other[0] != a || other[1] != b {\n\t\t\treturn false\n\t\t}\n\t} else {\n\t\ta, b := 2, v-80\n\t\tif other[0] != a || other[1] != b {\n\t\t\treturn false\n\t\t}\n\t}\n\n\ti := 2\n\tfor ; offset < len(oid.der); i++ {\n\t\tv, offset, failed = parseBase128Int(oid.der, offset)\n\t\tif failed {\n\t\t\t// Again, shouldn't happen, since we've already parsed\n\t\t\t// the OID, but better safe than sorry.\n\t\t\treturn false\n\t\t}\n\t\tif i >= len(other) || v != other[i] {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn i == len(other)\n}\n\n// Strings returns the string representation of the Object Identifier.\nfunc (oid OID) String() string {\n\tvar b strings.Builder\n\tb.Grow(32)\n\tconst (\n\t\tvalSize         = 64 // size in bits of val.\n\t\tbitsPerByte     = 7\n\t\tmaxValSafeShift = (1 << (valSize - bitsPerByte)) - 1\n\t)\n\tvar (\n\t\tstart    = 0\n\t\tval      = uint64(0)\n\t\tnumBuf   = make([]byte, 0, 21)\n\t\tbigVal   *big.Int\n\t\toverflow bool\n\t)\n\tfor i, v := range oid.der {\n\t\tcurVal := v & 0x7F\n\t\tvalEnd := v&0x80 == 0\n\t\tif valEnd {\n\t\t\tif start != 0 {\n\t\t\t\tb.WriteByte('.')\n\t\t\t}\n\t\t}\n\t\tif !overflow && val > maxValSafeShift {\n\t\t\tif bigVal == nil {\n\t\t\t\tbigVal = new(big.Int)\n\t\t\t}\n\t\t\tbigVal = bigVal.SetUint64(val)\n\t\t\toverflow = true\n\t\t}\n\t\tif overflow {\n\t\t\tbigVal = bigVal.Lsh(bigVal, bitsPerByte).Or(bigVal, big.NewInt(int64(curVal)))\n\t\t\tif valEnd {\n\t\t\t\tif start == 0 {\n\t\t\t\t\tb.WriteString(\"2.\")\n\t\t\t\t\tbigVal = bigVal.Sub(bigVal, big.NewInt(80))\n\t\t\t\t}\n\t\t\t\tnumBuf = bigVal.Append(numBuf, 10)\n\t\t\t\tb.Write(numBuf)\n\t\t\t\tnumBuf = numBuf[:0]\n\t\t\t\tval = 0\n\t\t\t\tstart = i + 1\n\t\t\t\toverflow = false\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tval <<= bitsPerByte\n\t\tval |= uint64(curVal)\n\t\tif valEnd {\n\t\t\tif start == 0 {\n\t\t\t\tif val < 80 {\n\t\t\t\t\tb.Write(strconv.AppendUint(numBuf, val/40, 10))\n\t\t\t\t\tb.WriteByte('.')\n\t\t\t\t\tb.Write(strconv.AppendUint(numBuf, val%40, 10))\n\t\t\t\t} else {\n\t\t\t\t\tb.WriteString(\"2.\")\n\t\t\t\t\tb.Write(strconv.AppendUint(numBuf, val-80, 10))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tb.Write(strconv.AppendUint(numBuf, val, 10))\n\t\t\t}\n\t\t\tval = 0\n\t\t\tstart = i + 1\n\t\t}\n\t}\n\treturn b.String()\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/parser.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage legacyx509\n\nimport (\n\t\"bytes\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/elliptic\"\n\t\"crypto/rsa\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"net\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/crypto/cryptobyte\"\n\tcryptobyte_asn1 \"golang.org/x/crypto/cryptobyte/asn1\"\n\n\tstdx509 \"crypto/x509\"\n)\n\n// ParseCertificates parses one or more certificates from the given ASN.1 DER\n// data. The certificates must be concatenated with no intermediate padding.\nfunc ParseCertificates(der []byte) ([]*stdx509.Certificate, error) {\n\tvar certs []*stdx509.Certificate\n\tfor len(der) > 0 {\n\t\tcert, err := parseCertificate(der)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcerts = append(certs, cert)\n\t\tder = der[len(cert.Raw):]\n\t}\n\treturn certs, nil\n}\n\n// isPrintable reports whether the given b is in the ASN.1 PrintableString set.\n// This is a simplified version of encoding/asn1.isPrintable.\nfunc isPrintable(b byte) bool {\n\treturn 'a' <= b && b <= 'z' ||\n\t\t'A' <= b && b <= 'Z' ||\n\t\t'0' <= b && b <= '9' ||\n\t\t'\\'' <= b && b <= ')' ||\n\t\t'+' <= b && b <= '/' ||\n\t\tb == ' ' ||\n\t\tb == ':' ||\n\t\tb == '=' ||\n\t\tb == '?' ||\n\t\t// This is technically not allowed in a PrintableString.\n\t\t// However, x509 certificates with wildcard strings don't\n\t\t// always use the correct string type so we permit it.\n\t\tb == '*' ||\n\t\t// This is not technically allowed either. However, not\n\t\t// only is it relatively common, but there are also a\n\t\t// handful of CA certificates that contain it. At least\n\t\t// one of which will not expire until 2027.\n\t\tb == '&'\n}\n\n// parseASN1String parses the ASN.1 string types T61String, PrintableString,\n// UTF8String, BMPString, IA5String, and NumericString. This is mostly copied\n// from the respective encoding/asn1.parse... methods, rather than just\n// increasing the API surface of that package.\nfunc parseASN1String(tag cryptobyte_asn1.Tag, value []byte) (string, error) {\n\tswitch tag {\n\tcase cryptobyte_asn1.T61String:\n\t\treturn string(value), nil\n\tcase cryptobyte_asn1.PrintableString:\n\t\tfor _, b := range value {\n\t\t\tif !isPrintable(b) {\n\t\t\t\treturn \"\", errors.New(\"invalid PrintableString\")\n\t\t\t}\n\t\t}\n\t\treturn string(value), nil\n\tcase cryptobyte_asn1.UTF8String:\n\t\tif !utf8.Valid(value) {\n\t\t\treturn \"\", errors.New(\"invalid UTF-8 string\")\n\t\t}\n\t\treturn string(value), nil\n\tcase cryptobyte_asn1.Tag(asn1.TagBMPString):\n\t\tif len(value)%2 != 0 {\n\t\t\treturn \"\", errors.New(\"invalid BMPString\")\n\t\t}\n\n\t\t// Strip terminator if present.\n\t\tif l := len(value); l >= 2 && value[l-1] == 0 && value[l-2] == 0 {\n\t\t\tvalue = value[:l-2]\n\t\t}\n\n\t\ts := make([]uint16, 0, len(value)/2)\n\t\tfor len(value) > 0 {\n\t\t\ts = append(s, uint16(value[0])<<8+uint16(value[1]))\n\t\t\tvalue = value[2:]\n\t\t}\n\n\t\treturn string(utf16.Decode(s)), nil\n\tcase cryptobyte_asn1.IA5String:\n\t\ts := string(value)\n\t\tif isIA5String(s) != nil {\n\t\t\treturn \"\", errors.New(\"invalid IA5String\")\n\t\t}\n\t\treturn s, nil\n\tcase cryptobyte_asn1.Tag(asn1.TagNumericString):\n\t\tfor _, b := range value {\n\t\t\tif !('0' <= b && b <= '9' || b == ' ') {\n\t\t\t\treturn \"\", errors.New(\"invalid NumericString\")\n\t\t\t}\n\t\t}\n\t\treturn string(value), nil\n\t}\n\treturn \"\", fmt.Errorf(\"unsupported string type: %v\", tag)\n}\n\n// parseName parses a DER encoded Name as defined in RFC 5280. We may\n// want to export this function in the future for use in crypto/tls.\nfunc parseName(raw cryptobyte.String) (*pkix.RDNSequence, error) {\n\tif !raw.ReadASN1(&raw, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: invalid RDNSequence\")\n\t}\n\n\tvar rdnSeq pkix.RDNSequence\n\tfor !raw.Empty() {\n\t\tvar rdnSet pkix.RelativeDistinguishedNameSET\n\t\tvar set cryptobyte.String\n\t\tif !raw.ReadASN1(&set, cryptobyte_asn1.SET) {\n\t\t\treturn nil, errors.New(\"x509: invalid RDNSequence\")\n\t\t}\n\t\tfor !set.Empty() {\n\t\t\tvar atav cryptobyte.String\n\t\t\tif !set.ReadASN1(&atav, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\treturn nil, errors.New(\"x509: invalid RDNSequence: invalid attribute\")\n\t\t\t}\n\t\t\tvar attr pkix.AttributeTypeAndValue\n\t\t\tif !atav.ReadASN1ObjectIdentifier(&attr.Type) {\n\t\t\t\treturn nil, errors.New(\"x509: invalid RDNSequence: invalid attribute type\")\n\t\t\t}\n\t\t\tvar rawValue cryptobyte.String\n\t\t\tvar valueTag cryptobyte_asn1.Tag\n\t\t\tif !atav.ReadAnyASN1(&rawValue, &valueTag) {\n\t\t\t\treturn nil, errors.New(\"x509: invalid RDNSequence: invalid attribute value\")\n\t\t\t}\n\t\t\tvar err error\n\t\t\tattr.Value, err = parseASN1String(valueTag, rawValue)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"x509: invalid RDNSequence: invalid attribute value: %s\", err)\n\t\t\t}\n\t\t\trdnSet = append(rdnSet, attr)\n\t\t}\n\n\t\trdnSeq = append(rdnSeq, rdnSet)\n\t}\n\n\treturn &rdnSeq, nil\n}\n\nfunc parseAI(der cryptobyte.String) (pkix.AlgorithmIdentifier, error) {\n\tai := pkix.AlgorithmIdentifier{}\n\tif !der.ReadASN1ObjectIdentifier(&ai.Algorithm) {\n\t\treturn ai, errors.New(\"x509: malformed OID\")\n\t}\n\tif der.Empty() {\n\t\treturn ai, nil\n\t}\n\tvar params cryptobyte.String\n\tvar tag cryptobyte_asn1.Tag\n\tif !der.ReadAnyASN1Element(&params, &tag) {\n\t\treturn ai, errors.New(\"x509: malformed parameters\")\n\t}\n\tai.Parameters.Tag = int(tag)\n\tai.Parameters.FullBytes = params\n\treturn ai, nil\n}\n\nfunc parseTime(der *cryptobyte.String) (time.Time, error) {\n\tvar t time.Time\n\tswitch {\n\tcase der.PeekASN1Tag(cryptobyte_asn1.UTCTime):\n\t\tif !der.ReadASN1UTCTime(&t) {\n\t\t\treturn t, errors.New(\"x509: malformed UTCTime\")\n\t\t}\n\tcase der.PeekASN1Tag(cryptobyte_asn1.GeneralizedTime):\n\t\tif !der.ReadASN1GeneralizedTime(&t) {\n\t\t\treturn t, errors.New(\"x509: malformed GeneralizedTime\")\n\t\t}\n\tdefault:\n\t\treturn t, errors.New(\"x509: unsupported time format\")\n\t}\n\treturn t, nil\n}\n\nfunc parseValidity(der cryptobyte.String) (time.Time, time.Time, error) {\n\tnotBefore, err := parseTime(&der)\n\tif err != nil {\n\t\treturn time.Time{}, time.Time{}, err\n\t}\n\tnotAfter, err := parseTime(&der)\n\tif err != nil {\n\t\treturn time.Time{}, time.Time{}, err\n\t}\n\n\treturn notBefore, notAfter, nil\n}\n\nfunc parseExtension(der cryptobyte.String) (pkix.Extension, error) {\n\tvar ext pkix.Extension\n\tif !der.ReadASN1ObjectIdentifier(&ext.Id) {\n\t\treturn ext, errors.New(\"x509: malformed extension OID field\")\n\t}\n\tif der.PeekASN1Tag(cryptobyte_asn1.BOOLEAN) {\n\t\tif !der.ReadASN1Boolean(&ext.Critical) {\n\t\t\treturn ext, errors.New(\"x509: malformed extension critical field\")\n\t\t}\n\t}\n\tvar val cryptobyte.String\n\tif !der.ReadASN1(&val, cryptobyte_asn1.OCTET_STRING) {\n\t\treturn ext, errors.New(\"x509: malformed extension value field\")\n\t}\n\text.Value = val\n\treturn ext, nil\n}\n\nfunc parsePublicKey(keyData *publicKeyInfo) (interface{}, error) {\n\toid := keyData.Algorithm.Algorithm\n\tparams := keyData.Algorithm.Parameters\n\tder := cryptobyte.String(keyData.PublicKey.RightAlign())\n\tswitch {\n\tcase oid.Equal(oidPublicKeyRSA):\n\t\t// RSA public keys must have a NULL in the parameters.\n\t\t// See RFC 3279, Section 2.3.1.\n\t\tif !bytes.Equal(params.FullBytes, asn1.NullBytes) {\n\t\t\treturn nil, errors.New(\"x509: RSA key missing NULL parameters\")\n\t\t}\n\n\t\tp := &pkcs1PublicKey{N: new(big.Int)}\n\t\tif !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {\n\t\t\treturn nil, errors.New(\"x509: invalid RSA public key\")\n\t\t}\n\t\tif !der.ReadASN1Integer(p.N) {\n\t\t\treturn nil, errors.New(\"x509: invalid RSA modulus\")\n\t\t}\n\t\tif !der.ReadASN1Integer(&p.E) {\n\t\t\treturn nil, errors.New(\"x509: invalid RSA public exponent\")\n\t\t}\n\n\t\tif p.N.Sign() <= 0 {\n\t\t\treturn nil, errors.New(\"x509: RSA modulus is not a positive number\")\n\t\t}\n\t\tif p.E <= 0 {\n\t\t\treturn nil, errors.New(\"x509: RSA public exponent is not a positive number\")\n\t\t}\n\n\t\tpub := &rsa.PublicKey{\n\t\t\tE: p.E,\n\t\t\tN: p.N,\n\t\t}\n\t\treturn pub, nil\n\tcase oid.Equal(oidPublicKeyECDSA):\n\t\tparamsDer := cryptobyte.String(params.FullBytes)\n\t\tnamedCurveOID := new(asn1.ObjectIdentifier)\n\t\tif !paramsDer.ReadASN1ObjectIdentifier(namedCurveOID) {\n\t\t\treturn nil, errors.New(\"x509: invalid ECDSA parameters\")\n\t\t}\n\t\tnamedCurve := namedCurveFromOID(*namedCurveOID)\n\t\tif namedCurve == nil {\n\t\t\treturn nil, errors.New(\"x509: unsupported elliptic curve\")\n\t\t}\n\t\tx, y := elliptic.Unmarshal(namedCurve, der)\n\t\tif x == nil {\n\t\t\treturn nil, errors.New(\"x509: failed to unmarshal elliptic curve point\")\n\t\t}\n\t\tpub := &ecdsa.PublicKey{\n\t\t\tCurve: namedCurve,\n\t\t\tX:     x,\n\t\t\tY:     y,\n\t\t}\n\t\treturn pub, nil\n\tcase oid.Equal(oidPublicKeyEd25519):\n\t\t// RFC 8410, Section 3\n\t\t// > For all of the OIDs, the parameters MUST be absent.\n\t\tif len(params.FullBytes) != 0 {\n\t\t\treturn nil, errors.New(\"x509: Ed25519 key encoded with illegal parameters\")\n\t\t}\n\t\tif len(der) != ed25519.PublicKeySize {\n\t\t\treturn nil, errors.New(\"x509: wrong Ed25519 public key size\")\n\t\t}\n\t\treturn ed25519.PublicKey(der), nil\n\t// case oid.Equal(oidPublicKeyX25519):\n\t// \t// RFC 8410, Section 3\n\t// \t// > For all of the OIDs, the parameters MUST be absent.\n\t// \tif len(params.FullBytes) != 0 {\n\t// \t\treturn nil, errors.New(\"x509: X25519 key encoded with illegal parameters\")\n\t// \t}\n\t// \treturn ecdh.X25519().NewPublicKey(der)\n\tcase oid.Equal(oidPublicKeyDSA):\n\t\ty := new(big.Int)\n\t\tif !der.ReadASN1Integer(y) {\n\t\t\treturn nil, errors.New(\"x509: invalid DSA public key\")\n\t\t}\n\t\tpub := &dsa.PublicKey{\n\t\t\tY: y,\n\t\t\tParameters: dsa.Parameters{\n\t\t\t\tP: new(big.Int),\n\t\t\t\tQ: new(big.Int),\n\t\t\t\tG: new(big.Int),\n\t\t\t},\n\t\t}\n\t\tparamsDer := cryptobyte.String(params.FullBytes)\n\t\tif !paramsDer.ReadASN1(&paramsDer, cryptobyte_asn1.SEQUENCE) ||\n\t\t\t!paramsDer.ReadASN1Integer(pub.Parameters.P) ||\n\t\t\t!paramsDer.ReadASN1Integer(pub.Parameters.Q) ||\n\t\t\t!paramsDer.ReadASN1Integer(pub.Parameters.G) {\n\t\t\treturn nil, errors.New(\"x509: invalid DSA parameters\")\n\t\t}\n\t\tif pub.Y.Sign() <= 0 || pub.Parameters.P.Sign() <= 0 ||\n\t\t\tpub.Parameters.Q.Sign() <= 0 || pub.Parameters.G.Sign() <= 0 {\n\t\t\treturn nil, errors.New(\"x509: zero or negative DSA parameter\")\n\t\t}\n\t\treturn pub, nil\n\tdefault:\n\t\treturn nil, errors.New(\"x509: unknown public key algorithm\")\n\t}\n}\n\nfunc parseKeyUsageExtension(der cryptobyte.String) (stdx509.KeyUsage, error) {\n\tvar usageBits asn1.BitString\n\tif !der.ReadASN1BitString(&usageBits) {\n\t\treturn 0, errors.New(\"x509: invalid key usage\")\n\t}\n\n\tvar usage int\n\tfor i := 0; i < 9; i++ {\n\t\tif usageBits.At(i) != 0 {\n\t\t\tusage |= 1 << uint(i)\n\t\t}\n\t}\n\treturn stdx509.KeyUsage(usage), nil\n}\n\nfunc parseBasicConstraintsExtension(der cryptobyte.String) (bool, int, error) {\n\tvar isCA bool\n\tif !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {\n\t\treturn false, 0, errors.New(\"x509: invalid basic constraints\")\n\t}\n\tif der.PeekASN1Tag(cryptobyte_asn1.BOOLEAN) {\n\t\tif !der.ReadASN1Boolean(&isCA) {\n\t\t\treturn false, 0, errors.New(\"x509: invalid basic constraints\")\n\t\t}\n\t}\n\tmaxPathLen := -1\n\tif der.PeekASN1Tag(cryptobyte_asn1.INTEGER) {\n\t\tif !der.ReadASN1Integer(&maxPathLen) {\n\t\t\treturn false, 0, errors.New(\"x509: invalid basic constraints\")\n\t\t}\n\t}\n\n\t// TODO: map out.MaxPathLen to 0 if it has the -1 default value? (Issue 19285)\n\treturn isCA, maxPathLen, nil\n}\n\nfunc forEachSAN(der cryptobyte.String, callback func(tag int, data []byte) error) error {\n\tif !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {\n\t\treturn errors.New(\"x509: invalid subject alternative names\")\n\t}\n\tfor !der.Empty() {\n\t\tvar san cryptobyte.String\n\t\tvar tag cryptobyte_asn1.Tag\n\t\tif !der.ReadAnyASN1(&san, &tag) {\n\t\t\treturn errors.New(\"x509: invalid subject alternative name\")\n\t\t}\n\t\tif err := callback(int(tag^0x80), san); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL, err error) {\n\terr = forEachSAN(der, func(tag int, data []byte) error {\n\t\tswitch tag {\n\t\tcase nameTypeEmail:\n\t\t\temail := string(data)\n\t\t\tif err := isIA5String(email); err != nil {\n\t\t\t\treturn errors.New(\"x509: SAN rfc822Name is malformed\")\n\t\t\t}\n\t\t\temailAddresses = append(emailAddresses, email)\n\t\tcase nameTypeDNS:\n\t\t\tname := string(data)\n\t\t\tif err := isIA5String(name); err != nil {\n\t\t\t\treturn errors.New(\"x509: SAN dNSName is malformed\")\n\t\t\t}\n\t\t\tdnsNames = append(dnsNames, string(name))\n\t\tcase nameTypeURI:\n\t\t\turiStr := string(data)\n\t\t\tif err := isIA5String(uriStr); err != nil {\n\t\t\t\treturn errors.New(\"x509: SAN uniformResourceIdentifier is malformed\")\n\t\t\t}\n\t\t\turi, err := url.Parse(uriStr)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"x509: cannot parse URI %q: %s\", uriStr, err)\n\t\t\t}\n\t\t\tif len(uri.Host) > 0 {\n\t\t\t\tif _, ok := domainToReverseLabels(uri.Host); !ok {\n\t\t\t\t\treturn fmt.Errorf(\"x509: cannot parse URI %q: invalid domain\", uriStr)\n\t\t\t\t}\n\t\t\t}\n\t\t\turis = append(uris, uri)\n\t\tcase nameTypeIP:\n\t\t\tswitch len(data) {\n\t\t\tcase net.IPv4len, net.IPv6len:\n\t\t\t\tipAddresses = append(ipAddresses, data)\n\t\t\tdefault:\n\t\t\t\treturn errors.New(\"x509: cannot parse IP address of length \" + strconv.Itoa(len(data)))\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t})\n\n\treturn\n}\n\nfunc parseAuthorityKeyIdentifier(e pkix.Extension) ([]byte, error) {\n\t// RFC 5280, Section 4.2.1.1\n\t// if e.Critical {\n\t// \t// Conforming CAs MUST mark this extension as non-critical\n\t// \treturn nil, errors.New(\"x509: authority key identifier incorrectly marked critical\")\n\t// }\n\tval := cryptobyte.String(e.Value)\n\tvar akid cryptobyte.String\n\tif !val.ReadASN1(&akid, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: invalid authority key identifier\")\n\t}\n\tif akid.PeekASN1Tag(cryptobyte_asn1.Tag(0).ContextSpecific()) {\n\t\tif !akid.ReadASN1(&akid, cryptobyte_asn1.Tag(0).ContextSpecific()) {\n\t\t\treturn nil, errors.New(\"x509: invalid authority key identifier\")\n\t\t}\n\t\treturn akid, nil\n\t}\n\treturn nil, nil\n}\n\nfunc parseExtKeyUsageExtension(der cryptobyte.String) ([]stdx509.ExtKeyUsage, []asn1.ObjectIdentifier, error) {\n\tvar extKeyUsages []stdx509.ExtKeyUsage\n\tvar unknownUsages []asn1.ObjectIdentifier\n\tif !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, nil, errors.New(\"x509: invalid extended key usages\")\n\t}\n\tfor !der.Empty() {\n\t\tvar eku asn1.ObjectIdentifier\n\t\tif !der.ReadASN1ObjectIdentifier(&eku) {\n\t\t\treturn nil, nil, errors.New(\"x509: invalid extended key usages\")\n\t\t}\n\t\tif extKeyUsage, ok := extKeyUsageFromOID(eku); ok {\n\t\t\textKeyUsages = append(extKeyUsages, stdx509.ExtKeyUsage(extKeyUsage))\n\t\t} else {\n\t\t\tunknownUsages = append(unknownUsages, eku)\n\t\t}\n\t}\n\treturn extKeyUsages, unknownUsages, nil\n}\n\n// func parseCertificatePoliciesExtension(der cryptobyte.String) ([]OID, error) {\n// \tvar oids []OID\n// \tif !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {\n// \t\treturn nil, errors.New(\"x509: invalid certificate policies\")\n// \t}\n// \tfor !der.Empty() {\n// \t\tvar cp cryptobyte.String\n// \t\tvar OIDBytes cryptobyte.String\n// \t\tif !der.ReadASN1(&cp, cryptobyte_asn1.SEQUENCE) || !cp.ReadASN1(&OIDBytes, cryptobyte_asn1.OBJECT_IDENTIFIER) {\n// \t\t\treturn nil, errors.New(\"x509: invalid certificate policies\")\n// \t\t}\n// \t\toid, ok := newOIDFromDER(OIDBytes)\n// \t\tif !ok {\n// \t\t\treturn nil, errors.New(\"x509: invalid certificate policies\")\n// \t\t}\n// \t\toids = append(oids, oid)\n// \t}\n// \treturn oids, nil\n// }\n\n// isValidIPMask reports whether mask consists of zero or more 1 bits, followed by zero bits.\nfunc isValidIPMask(mask []byte) bool {\n\tseenZero := false\n\n\tfor _, b := range mask {\n\t\tif seenZero {\n\t\t\tif b != 0 {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch b {\n\t\tcase 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe:\n\t\t\tseenZero = true\n\t\tcase 0xff:\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc parseNameConstraintsExtension(out *stdx509.Certificate, e pkix.Extension) (unhandled bool, err error) {\n\t// RFC 5280, 4.2.1.10\n\n\t// NameConstraints ::= SEQUENCE {\n\t//      permittedSubtrees       [0]     GeneralSubtrees OPTIONAL,\n\t//      excludedSubtrees        [1]     GeneralSubtrees OPTIONAL }\n\t//\n\t// GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree\n\t//\n\t// GeneralSubtree ::= SEQUENCE {\n\t//      base                    GeneralName,\n\t//      minimum         [0]     BaseDistance DEFAULT 0,\n\t//      maximum         [1]     BaseDistance OPTIONAL }\n\t//\n\t// BaseDistance ::= INTEGER (0..MAX)\n\n\touter := cryptobyte.String(e.Value)\n\tvar toplevel, permitted, excluded cryptobyte.String\n\tvar havePermitted, haveExcluded bool\n\tif !outer.ReadASN1(&toplevel, cryptobyte_asn1.SEQUENCE) ||\n\t\t!outer.Empty() ||\n\t\t!toplevel.ReadOptionalASN1(&permitted, &havePermitted, cryptobyte_asn1.Tag(0).ContextSpecific().Constructed()) ||\n\t\t!toplevel.ReadOptionalASN1(&excluded, &haveExcluded, cryptobyte_asn1.Tag(1).ContextSpecific().Constructed()) ||\n\t\t!toplevel.Empty() {\n\t\treturn false, errors.New(\"x509: invalid NameConstraints extension\")\n\t}\n\n\tif !havePermitted && !haveExcluded || len(permitted) == 0 && len(excluded) == 0 {\n\t\t// From RFC 5280, Section 4.2.1.10:\n\t\t//   “either the permittedSubtrees field\n\t\t//   or the excludedSubtrees MUST be\n\t\t//   present”\n\t\treturn false, errors.New(\"x509: empty name constraints extension\")\n\t}\n\n\tgetValues := func(subtrees cryptobyte.String) (dnsNames []string, ips []*net.IPNet, emails, uriDomains []string, err error) {\n\t\tfor !subtrees.Empty() {\n\t\t\tvar seq, value cryptobyte.String\n\t\t\tvar tag cryptobyte_asn1.Tag\n\t\t\tif !subtrees.ReadASN1(&seq, cryptobyte_asn1.SEQUENCE) ||\n\t\t\t\t!seq.ReadAnyASN1(&value, &tag) {\n\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: invalid NameConstraints extension\")\n\t\t\t}\n\n\t\t\tvar (\n\t\t\t\tdnsTag   = cryptobyte_asn1.Tag(2).ContextSpecific()\n\t\t\t\temailTag = cryptobyte_asn1.Tag(1).ContextSpecific()\n\t\t\t\tipTag    = cryptobyte_asn1.Tag(7).ContextSpecific()\n\t\t\t\turiTag   = cryptobyte_asn1.Tag(6).ContextSpecific()\n\t\t\t)\n\n\t\t\tswitch tag {\n\t\t\tcase dnsTag:\n\t\t\t\tdomain := string(value)\n\t\t\t\tif err := isIA5String(domain); err != nil {\n\t\t\t\t\treturn nil, nil, nil, nil, errors.New(\"x509: invalid constraint value: \" + err.Error())\n\t\t\t\t}\n\n\t\t\t\ttrimmedDomain := domain\n\t\t\t\tif len(trimmedDomain) > 0 && trimmedDomain[0] == '.' {\n\t\t\t\t\t// constraints can have a leading\n\t\t\t\t\t// period to exclude the domain\n\t\t\t\t\t// itself, but that's not valid in a\n\t\t\t\t\t// normal domain name.\n\t\t\t\t\ttrimmedDomain = trimmedDomain[1:]\n\t\t\t\t}\n\t\t\t\tif _, ok := domainToReverseLabels(trimmedDomain); !ok {\n\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: failed to parse dnsName constraint %q\", domain)\n\t\t\t\t}\n\t\t\t\tdnsNames = append(dnsNames, domain)\n\n\t\t\tcase ipTag:\n\t\t\t\tl := len(value)\n\t\t\t\tvar ip, mask []byte\n\n\t\t\t\tswitch l {\n\t\t\t\tcase 8:\n\t\t\t\t\tip = value[:4]\n\t\t\t\t\tmask = value[4:]\n\n\t\t\t\tcase 32:\n\t\t\t\t\tip = value[:16]\n\t\t\t\t\tmask = value[16:]\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: IP constraint contained value of length %d\", l)\n\t\t\t\t}\n\n\t\t\t\tif !isValidIPMask(mask) {\n\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: IP constraint contained invalid mask %x\", mask)\n\t\t\t\t}\n\n\t\t\t\tips = append(ips, &net.IPNet{IP: net.IP(ip), Mask: net.IPMask(mask)})\n\n\t\t\tcase emailTag:\n\t\t\t\tconstraint := string(value)\n\t\t\t\tif err := isIA5String(constraint); err != nil {\n\t\t\t\t\treturn nil, nil, nil, nil, errors.New(\"x509: invalid constraint value: \" + err.Error())\n\t\t\t\t}\n\n\t\t\t\t// If the constraint contains an @ then\n\t\t\t\t// it specifies an exact mailbox name.\n\t\t\t\tif strings.Contains(constraint, \"@\") {\n\t\t\t\t\tif _, ok := parseRFC2821Mailbox(constraint); !ok {\n\t\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: failed to parse rfc822Name constraint %q\", constraint)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise it's a domain name.\n\t\t\t\t\tdomain := constraint\n\t\t\t\t\tif len(domain) > 0 && domain[0] == '.' {\n\t\t\t\t\t\tdomain = domain[1:]\n\t\t\t\t\t}\n\t\t\t\t\tif _, ok := domainToReverseLabels(domain); !ok {\n\t\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: failed to parse rfc822Name constraint %q\", constraint)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\temails = append(emails, constraint)\n\n\t\t\tcase uriTag:\n\t\t\t\tdomain := string(value)\n\t\t\t\tif err := isIA5String(domain); err != nil {\n\t\t\t\t\treturn nil, nil, nil, nil, errors.New(\"x509: invalid constraint value: \" + err.Error())\n\t\t\t\t}\n\n\t\t\t\tif net.ParseIP(domain) != nil {\n\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: failed to parse URI constraint %q: cannot be IP address\", domain)\n\t\t\t\t}\n\n\t\t\t\ttrimmedDomain := domain\n\t\t\t\tif len(trimmedDomain) > 0 && trimmedDomain[0] == '.' {\n\t\t\t\t\t// constraints can have a leading\n\t\t\t\t\t// period to exclude the domain itself,\n\t\t\t\t\t// but that's not valid in a normal\n\t\t\t\t\t// domain name.\n\t\t\t\t\ttrimmedDomain = trimmedDomain[1:]\n\t\t\t\t}\n\t\t\t\tif _, ok := domainToReverseLabels(trimmedDomain); !ok {\n\t\t\t\t\treturn nil, nil, nil, nil, fmt.Errorf(\"x509: failed to parse URI constraint %q\", domain)\n\t\t\t\t}\n\t\t\t\turiDomains = append(uriDomains, domain)\n\n\t\t\tdefault:\n\t\t\t\tunhandled = true\n\t\t\t}\n\t\t}\n\n\t\treturn dnsNames, ips, emails, uriDomains, nil\n\t}\n\n\tif out.PermittedDNSDomains, out.PermittedIPRanges, out.PermittedEmailAddresses, out.PermittedURIDomains, err = getValues(permitted); err != nil {\n\t\treturn false, err\n\t}\n\tif out.ExcludedDNSDomains, out.ExcludedIPRanges, out.ExcludedEmailAddresses, out.ExcludedURIDomains, err = getValues(excluded); err != nil {\n\t\treturn false, err\n\t}\n\tout.PermittedDNSDomainsCritical = e.Critical\n\n\treturn unhandled, nil\n}\n\nfunc processExtensions(out *stdx509.Certificate) error {\n\tvar err error\n\tfor _, e := range out.Extensions {\n\t\tunhandled := false\n\n\t\tif len(e.Id) == 4 && e.Id[0] == 2 && e.Id[1] == 5 && e.Id[2] == 29 {\n\t\t\tswitch e.Id[3] {\n\t\t\tcase 15:\n\t\t\t\tout.KeyUsage, err = parseKeyUsageExtension(e.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tcase 19:\n\t\t\t\tout.IsCA, out.MaxPathLen, err = parseBasicConstraintsExtension(e.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tout.BasicConstraintsValid = true\n\t\t\t\tout.MaxPathLenZero = out.MaxPathLen == 0\n\t\t\tcase 17:\n\t\t\t\tout.DNSNames, out.EmailAddresses, out.IPAddresses, out.URIs, err = parseSANExtension(e.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tif len(out.DNSNames) == 0 && len(out.EmailAddresses) == 0 && len(out.IPAddresses) == 0 && len(out.URIs) == 0 {\n\t\t\t\t\t// If we didn't parse anything then we do the critical check, below.\n\t\t\t\t\tunhandled = true\n\t\t\t\t}\n\n\t\t\tcase 30:\n\t\t\t\tunhandled, err = parseNameConstraintsExtension(out, e)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\tcase 31:\n\t\t\t\t// RFC 5280, 4.2.1.13\n\n\t\t\t\t// CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint\n\t\t\t\t//\n\t\t\t\t// DistributionPoint ::= SEQUENCE {\n\t\t\t\t//     distributionPoint       [0]     DistributionPointName OPTIONAL,\n\t\t\t\t//     reasons                 [1]     ReasonFlags OPTIONAL,\n\t\t\t\t//     cRLIssuer               [2]     GeneralNames OPTIONAL }\n\t\t\t\t//\n\t\t\t\t// DistributionPointName ::= CHOICE {\n\t\t\t\t//     fullName                [0]     GeneralNames,\n\t\t\t\t//     nameRelativeToCRLIssuer [1]     RelativeDistinguishedName }\n\t\t\t\tval := cryptobyte.String(e.Value)\n\t\t\t\tif !val.ReadASN1(&val, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\t\treturn errors.New(\"x509: invalid CRL distribution points\")\n\t\t\t\t}\n\t\t\t\tfor !val.Empty() {\n\t\t\t\t\tvar dpDER cryptobyte.String\n\t\t\t\t\tif !val.ReadASN1(&dpDER, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\t\t\treturn errors.New(\"x509: invalid CRL distribution point\")\n\t\t\t\t\t}\n\t\t\t\t\tvar dpNameDER cryptobyte.String\n\t\t\t\t\tvar dpNamePresent bool\n\t\t\t\t\tif !dpDER.ReadOptionalASN1(&dpNameDER, &dpNamePresent, cryptobyte_asn1.Tag(0).Constructed().ContextSpecific()) {\n\t\t\t\t\t\treturn errors.New(\"x509: invalid CRL distribution point\")\n\t\t\t\t\t}\n\t\t\t\t\tif !dpNamePresent {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif !dpNameDER.ReadASN1(&dpNameDER, cryptobyte_asn1.Tag(0).Constructed().ContextSpecific()) {\n\t\t\t\t\t\treturn errors.New(\"x509: invalid CRL distribution point\")\n\t\t\t\t\t}\n\t\t\t\t\tfor !dpNameDER.Empty() {\n\t\t\t\t\t\tif !dpNameDER.PeekASN1Tag(cryptobyte_asn1.Tag(6).ContextSpecific()) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar uri cryptobyte.String\n\t\t\t\t\t\tif !dpNameDER.ReadASN1(&uri, cryptobyte_asn1.Tag(6).ContextSpecific()) {\n\t\t\t\t\t\t\treturn errors.New(\"x509: invalid CRL distribution point\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tout.CRLDistributionPoints = append(out.CRLDistributionPoints, string(uri))\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tcase 35:\n\t\t\t\tout.AuthorityKeyId, err = parseAuthorityKeyIdentifier(e)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tcase 37:\n\t\t\t\tout.ExtKeyUsage, out.UnknownExtKeyUsage, err = parseExtKeyUsageExtension(e.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tcase 14:\n\t\t\t\t// RFC 5280, 4.2.1.2\n\t\t\t\tif e.Critical {\n\t\t\t\t\t// Conforming CAs MUST mark this extension as non-critical\n\t\t\t\t\treturn errors.New(\"x509: subject key identifier incorrectly marked critical\")\n\t\t\t\t}\n\t\t\t\tval := cryptobyte.String(e.Value)\n\t\t\t\tvar skid cryptobyte.String\n\t\t\t\tif !val.ReadASN1(&skid, cryptobyte_asn1.OCTET_STRING) {\n\t\t\t\t\treturn errors.New(\"x509: invalid subject key identifier\")\n\t\t\t\t}\n\t\t\t\tout.SubjectKeyId = skid\n\t\t\t// case 32:\n\t\t\t// \tout.Policies, err = parseCertificatePoliciesExtension(e.Value)\n\t\t\t// \tif err != nil {\n\t\t\t// \t\treturn err\n\t\t\t// \t}\n\t\t\t// \tout.PolicyIdentifiers = make([]asn1.ObjectIdentifier, 0, len(out.Policies))\n\t\t\t// \tfor _, oid := range out.Policies {\n\t\t\t// \t\tif oid, ok := oid.toASN1OID(); ok {\n\t\t\t// \t\t\tout.PolicyIdentifiers = append(out.PolicyIdentifiers, oid)\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\tdefault:\n\t\t\t\t// Unknown extensions are recorded if critical.\n\t\t\t\tunhandled = true\n\t\t\t}\n\t\t} else if e.Id.Equal(oidExtensionAuthorityInfoAccess) {\n\t\t\t// RFC 5280 4.2.2.1: Authority Information Access\n\t\t\tif e.Critical {\n\t\t\t\t// Conforming CAs MUST mark this extension as non-critical\n\t\t\t\treturn errors.New(\"x509: authority info access incorrectly marked critical\")\n\t\t\t}\n\t\t\tval := cryptobyte.String(e.Value)\n\t\t\tif !val.ReadASN1(&val, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\treturn errors.New(\"x509: invalid authority info access\")\n\t\t\t}\n\t\t\tfor !val.Empty() {\n\t\t\t\tvar aiaDER cryptobyte.String\n\t\t\t\tif !val.ReadASN1(&aiaDER, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\t\treturn errors.New(\"x509: invalid authority info access\")\n\t\t\t\t}\n\t\t\t\tvar method asn1.ObjectIdentifier\n\t\t\t\tif !aiaDER.ReadASN1ObjectIdentifier(&method) {\n\t\t\t\t\treturn errors.New(\"x509: invalid authority info access\")\n\t\t\t\t}\n\t\t\t\tif !aiaDER.PeekASN1Tag(cryptobyte_asn1.Tag(6).ContextSpecific()) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif !aiaDER.ReadASN1(&aiaDER, cryptobyte_asn1.Tag(6).ContextSpecific()) {\n\t\t\t\t\treturn errors.New(\"x509: invalid authority info access\")\n\t\t\t\t}\n\t\t\t\tswitch {\n\t\t\t\tcase method.Equal(oidAuthorityInfoAccessOcsp):\n\t\t\t\t\tout.OCSPServer = append(out.OCSPServer, string(aiaDER))\n\t\t\t\tcase method.Equal(oidAuthorityInfoAccessIssuers):\n\t\t\t\t\tout.IssuingCertificateURL = append(out.IssuingCertificateURL, string(aiaDER))\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Unknown extensions are recorded if critical.\n\t\t\tunhandled = true\n\t\t}\n\n\t\tif e.Critical && unhandled {\n\t\t\tout.UnhandledCriticalExtensions = append(out.UnhandledCriticalExtensions, e.Id)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nvar x509negativeserial = legacyGodebugSetting(0) // replaces godebug.New(\"x509negativeserial\")\n\nfunc parseCertificate(der []byte) (*stdx509.Certificate, error) {\n\tcert := &stdx509.Certificate{}\n\n\tinput := cryptobyte.String(der)\n\t// we read the SEQUENCE including length and tag bytes so that\n\t// we can populate Certificate.Raw, before unwrapping the\n\t// SEQUENCE so it can be operated on\n\tif !input.ReadASN1Element(&input, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed certificate\")\n\t}\n\tcert.Raw = input\n\tif !input.ReadASN1(&input, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed certificate\")\n\t}\n\n\tvar tbs cryptobyte.String\n\t// do the same trick again as above to extract the raw\n\t// bytes for Certificate.RawTBSCertificate\n\tif !input.ReadASN1Element(&tbs, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed tbs certificate\")\n\t}\n\tcert.RawTBSCertificate = tbs\n\tif !tbs.ReadASN1(&tbs, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed tbs certificate\")\n\t}\n\n\tif !tbs.ReadOptionalASN1Integer(&cert.Version, cryptobyte_asn1.Tag(0).Constructed().ContextSpecific(), 0) {\n\t\treturn nil, errors.New(\"x509: malformed version\")\n\t}\n\tif cert.Version < 0 {\n\t\treturn nil, errors.New(\"x509: malformed version\")\n\t}\n\t// for backwards compat reasons Version is one-indexed,\n\t// rather than zero-indexed as defined in 5280\n\tcert.Version++\n\tif cert.Version > 3 {\n\t\treturn nil, errors.New(\"x509: invalid version\")\n\t}\n\n\tserial := new(big.Int)\n\tif !tbs.ReadASN1Integer(serial) {\n\t\treturn nil, errors.New(\"x509: malformed serial number\")\n\t}\n\tif serial.Sign() == -1 {\n\t\tif x509negativeserial.Value() != \"1\" {\n\t\t\treturn nil, errors.New(\"x509: negative serial number\")\n\t\t} else {\n\t\t\tx509negativeserial.IncNonDefault()\n\t\t}\n\t}\n\tcert.SerialNumber = serial\n\n\tvar sigAISeq cryptobyte.String\n\tif !tbs.ReadASN1(&sigAISeq, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed signature algorithm identifier\")\n\t}\n\t// Before parsing the inner algorithm identifier, extract\n\t// the outer algorithm identifier and make sure that they\n\t// match.\n\tvar outerSigAISeq cryptobyte.String\n\tif !input.ReadASN1(&outerSigAISeq, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed algorithm identifier\")\n\t}\n\tif !bytes.Equal(outerSigAISeq, sigAISeq) {\n\t\treturn nil, errors.New(\"x509: inner and outer signature algorithm identifiers don't match\")\n\t}\n\tsigAI, err := parseAI(sigAISeq)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcert.SignatureAlgorithm = getSignatureAlgorithmFromAI(sigAI)\n\n\tvar issuerSeq cryptobyte.String\n\tif !tbs.ReadASN1Element(&issuerSeq, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed issuer\")\n\t}\n\tcert.RawIssuer = issuerSeq\n\tissuerRDNs, err := parseName(issuerSeq)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcert.Issuer.FillFromRDNSequence(issuerRDNs)\n\n\tvar validity cryptobyte.String\n\tif !tbs.ReadASN1(&validity, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed validity\")\n\t}\n\tcert.NotBefore, cert.NotAfter, err = parseValidity(validity)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar subjectSeq cryptobyte.String\n\tif !tbs.ReadASN1Element(&subjectSeq, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed issuer\")\n\t}\n\tcert.RawSubject = subjectSeq\n\tsubjectRDNs, err := parseName(subjectSeq)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcert.Subject.FillFromRDNSequence(subjectRDNs)\n\n\tvar spki cryptobyte.String\n\tif !tbs.ReadASN1Element(&spki, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed spki\")\n\t}\n\tcert.RawSubjectPublicKeyInfo = spki\n\tif !spki.ReadASN1(&spki, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed spki\")\n\t}\n\tvar pkAISeq cryptobyte.String\n\tif !spki.ReadASN1(&pkAISeq, cryptobyte_asn1.SEQUENCE) {\n\t\treturn nil, errors.New(\"x509: malformed public key algorithm identifier\")\n\t}\n\tpkAI, err := parseAI(pkAISeq)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcert.PublicKeyAlgorithm = getPublicKeyAlgorithmFromOID(pkAI.Algorithm)\n\tvar spk asn1.BitString\n\tif !spki.ReadASN1BitString(&spk) {\n\t\treturn nil, errors.New(\"x509: malformed subjectPublicKey\")\n\t}\n\tif cert.PublicKeyAlgorithm != stdx509.UnknownPublicKeyAlgorithm {\n\t\tcert.PublicKey, err = parsePublicKey(&publicKeyInfo{\n\t\t\tAlgorithm: pkAI,\n\t\t\tPublicKey: spk,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif cert.Version > 1 {\n\t\tif !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(1).ContextSpecific()) {\n\t\t\treturn nil, errors.New(\"x509: malformed issuerUniqueID\")\n\t\t}\n\t\tif !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(2).ContextSpecific()) {\n\t\t\treturn nil, errors.New(\"x509: malformed subjectUniqueID\")\n\t\t}\n\t\tif cert.Version == 3 {\n\t\t\tvar extensions cryptobyte.String\n\t\t\tvar present bool\n\t\t\tif !tbs.ReadOptionalASN1(&extensions, &present, cryptobyte_asn1.Tag(3).Constructed().ContextSpecific()) {\n\t\t\t\treturn nil, errors.New(\"x509: malformed extensions\")\n\t\t\t}\n\t\t\tif present {\n\t\t\t\tseenExts := make(map[string]bool)\n\t\t\t\tif !extensions.ReadASN1(&extensions, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\t\treturn nil, errors.New(\"x509: malformed extensions\")\n\t\t\t\t}\n\t\t\t\tfor !extensions.Empty() {\n\t\t\t\t\tvar extension cryptobyte.String\n\t\t\t\t\tif !extensions.ReadASN1(&extension, cryptobyte_asn1.SEQUENCE) {\n\t\t\t\t\t\treturn nil, errors.New(\"x509: malformed extension\")\n\t\t\t\t\t}\n\t\t\t\t\text, err := parseExtension(extension)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\toidStr := ext.Id.String()\n\t\t\t\t\tif seenExts[oidStr] {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"x509: certificate contains duplicate extension with OID %q\", oidStr)\n\t\t\t\t\t}\n\t\t\t\t\tseenExts[oidStr] = true\n\t\t\t\t\tcert.Extensions = append(cert.Extensions, ext)\n\t\t\t\t}\n\t\t\t\terr = processExtensions(cert)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvar signature asn1.BitString\n\tif !input.ReadASN1BitString(&signature) {\n\t\treturn nil, errors.New(\"x509: malformed signature\")\n\t}\n\tcert.Signature = signature.RightAlign()\n\n\treturn cert, nil\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/pkcs1.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage legacyx509\n\nimport (\n\t\"math/big\"\n)\n\n// pkcs1PublicKey reflects the ASN.1 structure of a PKCS #1 public key.\ntype pkcs1PublicKey struct {\n\tN *big.Int\n\tE int\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/verify.go",
    "content": "package legacyx509\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n)\n\n// rfc2821Mailbox represents a “mailbox” (which is an email address to most\n// people) by breaking it into the “local” (i.e. before the '@') and “domain”\n// parts.\ntype rfc2821Mailbox struct {\n\tlocal, domain string\n}\n\n// parseRFC2821Mailbox parses an email address into local and domain parts,\n// based on the ABNF for a “Mailbox” from RFC 2821. According to RFC 5280,\n// Section 4.2.1.6 that's correct for an rfc822Name from a certificate: “The\n// format of an rfc822Name is a \"Mailbox\" as defined in RFC 2821, Section 4.1.2”.\nfunc parseRFC2821Mailbox(in string) (mailbox rfc2821Mailbox, ok bool) {\n\tif len(in) == 0 {\n\t\treturn mailbox, false\n\t}\n\n\tlocalPartBytes := make([]byte, 0, len(in)/2)\n\n\tif in[0] == '\"' {\n\t\t// Quoted-string = DQUOTE *qcontent DQUOTE\n\t\t// non-whitespace-control = %d1-8 / %d11 / %d12 / %d14-31 / %d127\n\t\t// qcontent = qtext / quoted-pair\n\t\t// qtext = non-whitespace-control /\n\t\t//         %d33 / %d35-91 / %d93-126\n\t\t// quoted-pair = (\"\\\" text) / obs-qp\n\t\t// text = %d1-9 / %d11 / %d12 / %d14-127 / obs-text\n\t\t//\n\t\t// (Names beginning with “obs-” are the obsolete syntax from RFC 2822,\n\t\t// Section 4. Since it has been 16 years, we no longer accept that.)\n\t\tin = in[1:]\n\tQuotedString:\n\t\tfor {\n\t\t\tif len(in) == 0 {\n\t\t\t\treturn mailbox, false\n\t\t\t}\n\t\t\tc := in[0]\n\t\t\tin = in[1:]\n\n\t\t\tswitch {\n\t\t\tcase c == '\"':\n\t\t\t\tbreak QuotedString\n\n\t\t\tcase c == '\\\\':\n\t\t\t\t// quoted-pair\n\t\t\t\tif len(in) == 0 {\n\t\t\t\t\treturn mailbox, false\n\t\t\t\t}\n\t\t\t\tif in[0] == 11 ||\n\t\t\t\t\tin[0] == 12 ||\n\t\t\t\t\t(1 <= in[0] && in[0] <= 9) ||\n\t\t\t\t\t(14 <= in[0] && in[0] <= 127) {\n\t\t\t\t\tlocalPartBytes = append(localPartBytes, in[0])\n\t\t\t\t\tin = in[1:]\n\t\t\t\t} else {\n\t\t\t\t\treturn mailbox, false\n\t\t\t\t}\n\n\t\t\tcase c == 11 ||\n\t\t\t\tc == 12 ||\n\t\t\t\t// Space (char 32) is not allowed based on the\n\t\t\t\t// BNF, but RFC 3696 gives an example that\n\t\t\t\t// assumes that it is. Several “verified”\n\t\t\t\t// errata continue to argue about this point.\n\t\t\t\t// We choose to accept it.\n\t\t\t\tc == 32 ||\n\t\t\t\tc == 33 ||\n\t\t\t\tc == 127 ||\n\t\t\t\t(1 <= c && c <= 8) ||\n\t\t\t\t(14 <= c && c <= 31) ||\n\t\t\t\t(35 <= c && c <= 91) ||\n\t\t\t\t(93 <= c && c <= 126):\n\t\t\t\t// qtext\n\t\t\t\tlocalPartBytes = append(localPartBytes, c)\n\n\t\t\tdefault:\n\t\t\t\treturn mailbox, false\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Atom (\".\" Atom)*\n\tNextChar:\n\t\tfor len(in) > 0 {\n\t\t\t// atext from RFC 2822, Section 3.2.4\n\t\t\tc := in[0]\n\n\t\t\tswitch {\n\t\t\tcase c == '\\\\':\n\t\t\t\t// Examples given in RFC 3696 suggest that\n\t\t\t\t// escaped characters can appear outside of a\n\t\t\t\t// quoted string. Several “verified” errata\n\t\t\t\t// continue to argue the point. We choose to\n\t\t\t\t// accept it.\n\t\t\t\tin = in[1:]\n\t\t\t\tif len(in) == 0 {\n\t\t\t\t\treturn mailbox, false\n\t\t\t\t}\n\t\t\t\tfallthrough\n\n\t\t\tcase ('0' <= c && c <= '9') ||\n\t\t\t\t('a' <= c && c <= 'z') ||\n\t\t\t\t('A' <= c && c <= 'Z') ||\n\t\t\t\tc == '!' || c == '#' || c == '$' || c == '%' ||\n\t\t\t\tc == '&' || c == '\\'' || c == '*' || c == '+' ||\n\t\t\t\tc == '-' || c == '/' || c == '=' || c == '?' ||\n\t\t\t\tc == '^' || c == '_' || c == '`' || c == '{' ||\n\t\t\t\tc == '|' || c == '}' || c == '~' || c == '.':\n\t\t\t\tlocalPartBytes = append(localPartBytes, in[0])\n\t\t\t\tin = in[1:]\n\n\t\t\tdefault:\n\t\t\t\tbreak NextChar\n\t\t\t}\n\t\t}\n\n\t\tif len(localPartBytes) == 0 {\n\t\t\treturn mailbox, false\n\t\t}\n\n\t\t// From RFC 3696, Section 3:\n\t\t// “period (\".\") may also appear, but may not be used to start\n\t\t// or end the local part, nor may two or more consecutive\n\t\t// periods appear.”\n\t\ttwoDots := []byte{'.', '.'}\n\t\tif localPartBytes[0] == '.' ||\n\t\t\tlocalPartBytes[len(localPartBytes)-1] == '.' ||\n\t\t\tbytes.Contains(localPartBytes, twoDots) {\n\t\t\treturn mailbox, false\n\t\t}\n\t}\n\n\tif len(in) == 0 || in[0] != '@' {\n\t\treturn mailbox, false\n\t}\n\tin = in[1:]\n\n\t// The RFC species a format for domains, but that's known to be\n\t// violated in practice so we accept that anything after an '@' is the\n\t// domain part.\n\tif _, ok := domainToReverseLabels(in); !ok {\n\t\treturn mailbox, false\n\t}\n\n\tmailbox.local = string(localPartBytes)\n\tmailbox.domain = in\n\treturn mailbox, true\n}\n\n// domainToReverseLabels converts a textual domain name like foo.example.com to\n// the list of labels in reverse order, e.g. [\"com\", \"example\", \"foo\"].\nfunc domainToReverseLabels(domain string) (reverseLabels []string, ok bool) {\n\tfor len(domain) > 0 {\n\t\tif i := strings.LastIndexByte(domain, '.'); i == -1 {\n\t\t\treverseLabels = append(reverseLabels, domain)\n\t\t\tdomain = \"\"\n\t\t} else {\n\t\t\treverseLabels = append(reverseLabels, domain[i+1:])\n\t\t\tdomain = domain[:i]\n\t\t\tif i == 0 { // domain == \"\"\n\t\t\t\t// domain is prefixed with an empty label, append an empty\n\t\t\t\t// string to reverseLabels to indicate this.\n\t\t\t\treverseLabels = append(reverseLabels, \"\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(reverseLabels) > 0 && len(reverseLabels[0]) == 0 {\n\t\t// An empty label at the end indicates an absolute value.\n\t\treturn nil, false\n\t}\n\n\tfor _, label := range reverseLabels {\n\t\tif len(label) == 0 {\n\t\t\t// Empty labels are otherwise invalid.\n\t\t\treturn nil, false\n\t\t}\n\n\t\tfor _, c := range label {\n\t\t\tif c < 33 || c > 126 {\n\t\t\t\t// Invalid character.\n\t\t\t\treturn nil, false\n\t\t\t}\n\t\t}\n\t}\n\n\treturn reverseLabels, true\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/internal/legacy/x509/x509.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package x509 implements a subset of the X.509 standard.\n//\n// It allows parsing and generating certificates, certificate signing\n// requests, certificate revocation lists, and encoded public and private keys.\n// It provides a certificate verifier, complete with a chain builder.\n//\n// The package targets the X.509 technical profile defined by the IETF (RFC\n// 2459/3280/5280), and as further restricted by the CA/Browser Forum Baseline\n// Requirements. There is minimal support for features outside of these\n// profiles, as the primary goal of the package is to provide compatibility\n// with the publicly trusted TLS certificate ecosystem and its policies and\n// constraints.\n//\n// On macOS and Windows, certificate verification is handled by system APIs, but\n// the package aims to apply consistent validation rules across operating\n// systems.\npackage legacyx509\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/elliptic\"\n\tstdx509 \"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"unicode\"\n\n\t// Explicitly import these for their crypto.RegisterHash init side-effects.\n\t// Keep these as blank imports, even if they're imported above.\n\t_ \"crypto/sha1\"\n\t_ \"crypto/sha256\"\n\t_ \"crypto/sha512\"\n)\n\ntype publicKeyInfo struct {\n\tRaw       asn1.RawContent\n\tAlgorithm pkix.AlgorithmIdentifier\n\tPublicKey asn1.BitString\n}\n\ntype SignatureAlgorithm int\n\nconst (\n\tUnknownSignatureAlgorithm SignatureAlgorithm = iota\n\n\tMD2WithRSA  // Unsupported.\n\tMD5WithRSA  // Only supported for signing, not verification.\n\tSHA1WithRSA // Only supported for signing, and verification of CRLs, CSRs, and OCSP responses.\n\tSHA256WithRSA\n\tSHA384WithRSA\n\tSHA512WithRSA\n\tDSAWithSHA1   // Unsupported.\n\tDSAWithSHA256 // Unsupported.\n\tECDSAWithSHA1 // Only supported for signing, and verification of CRLs, CSRs, and OCSP responses.\n\tECDSAWithSHA256\n\tECDSAWithSHA384\n\tECDSAWithSHA512\n\tSHA256WithRSAPSS\n\tSHA384WithRSAPSS\n\tSHA512WithRSAPSS\n\tPureEd25519\n)\n\nfunc (algo SignatureAlgorithm) String() string {\n\tfor _, details := range signatureAlgorithmDetails {\n\t\tif details.algo == algo {\n\t\t\treturn details.name\n\t\t}\n\t}\n\treturn strconv.Itoa(int(algo))\n}\n\ntype PublicKeyAlgorithm int\n\nconst (\n\tUnknownPublicKeyAlgorithm PublicKeyAlgorithm = iota\n\tRSA\n\tDSA // Only supported for parsing.\n\tECDSA\n\tEd25519\n)\n\nvar publicKeyAlgoName = [...]string{\n\tRSA:     \"RSA\",\n\tDSA:     \"DSA\",\n\tECDSA:   \"ECDSA\",\n\tEd25519: \"Ed25519\",\n}\n\nfunc (algo PublicKeyAlgorithm) String() string {\n\tif 0 < algo && int(algo) < len(publicKeyAlgoName) {\n\t\treturn publicKeyAlgoName[algo]\n\t}\n\treturn strconv.Itoa(int(algo))\n}\n\n// OIDs for signature algorithms\n//\n//\tpkcs-1 OBJECT IDENTIFIER ::= {\n//\t\tiso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }\n//\n// RFC 3279 2.2.1 RSA Signature Algorithms\n//\n//\tmd5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }\n//\n//\tsha-1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }\n//\n//\tdsaWithSha1 OBJECT IDENTIFIER ::= {\n//\t\tiso(1) member-body(2) us(840) x9-57(10040) x9cm(4) 3 }\n//\n// RFC 3279 2.2.3 ECDSA Signature Algorithm\n//\n//\tecdsa-with-SHA1 OBJECT IDENTIFIER ::= {\n//\t\tiso(1) member-body(2) us(840) ansi-x962(10045)\n//\t\tsignatures(4) ecdsa-with-SHA1(1)}\n//\n// RFC 4055 5 PKCS #1 Version 1.5\n//\n//\tsha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }\n//\n//\tsha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }\n//\n//\tsha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }\n//\n// RFC 5758 3.1 DSA Signature Algorithms\n//\n//\tdsaWithSha256 OBJECT IDENTIFIER ::= {\n//\t\tjoint-iso-ccitt(2) country(16) us(840) organization(1) gov(101)\n//\t\tcsor(3) algorithms(4) id-dsa-with-sha2(3) 2}\n//\n// RFC 5758 3.2 ECDSA Signature Algorithm\n//\n//\tecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)\n//\t\tus(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }\n//\n//\tecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)\n//\t\tus(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }\n//\n//\tecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)\n//\t\tus(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }\n//\n// RFC 8410 3 Curve25519 and Curve448 Algorithm Identifiers\n//\n//\tid-Ed25519   OBJECT IDENTIFIER ::= { 1 3 101 112 }\nvar (\n\toidSignatureMD5WithRSA      = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4}\n\toidSignatureSHA1WithRSA     = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5}\n\toidSignatureSHA256WithRSA   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11}\n\toidSignatureSHA384WithRSA   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12}\n\toidSignatureSHA512WithRSA   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 13}\n\toidSignatureRSAPSS          = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 10}\n\toidSignatureDSAWithSHA1     = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 3}\n\toidSignatureDSAWithSHA256   = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 3, 2}\n\toidSignatureECDSAWithSHA1   = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 1}\n\toidSignatureECDSAWithSHA256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 2}\n\toidSignatureECDSAWithSHA384 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 3}\n\toidSignatureECDSAWithSHA512 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 4}\n\toidSignatureEd25519         = asn1.ObjectIdentifier{1, 3, 101, 112}\n\n\toidSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 1}\n\toidSHA384 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 2}\n\toidSHA512 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 3}\n\n\toidMGF1 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 8}\n\n\t// oidISOSignatureSHA1WithRSA means the same as oidSignatureSHA1WithRSA\n\t// but it's specified by ISO. Microsoft's makecert.exe has been known\n\t// to produce certificates with this OID.\n\toidISOSignatureSHA1WithRSA = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 29}\n)\n\nvar signatureAlgorithmDetails = []struct {\n\talgo       SignatureAlgorithm\n\tname       string\n\toid        asn1.ObjectIdentifier\n\tparams     asn1.RawValue\n\tpubKeyAlgo PublicKeyAlgorithm\n\thash       crypto.Hash\n\tisRSAPSS   bool\n}{\n\t{MD5WithRSA, \"MD5-RSA\", oidSignatureMD5WithRSA, asn1.NullRawValue, RSA, crypto.MD5, false},\n\t{SHA1WithRSA, \"SHA1-RSA\", oidSignatureSHA1WithRSA, asn1.NullRawValue, RSA, crypto.SHA1, false},\n\t{SHA1WithRSA, \"SHA1-RSA\", oidISOSignatureSHA1WithRSA, asn1.NullRawValue, RSA, crypto.SHA1, false},\n\t{SHA256WithRSA, \"SHA256-RSA\", oidSignatureSHA256WithRSA, asn1.NullRawValue, RSA, crypto.SHA256, false},\n\t{SHA384WithRSA, \"SHA384-RSA\", oidSignatureSHA384WithRSA, asn1.NullRawValue, RSA, crypto.SHA384, false},\n\t{SHA512WithRSA, \"SHA512-RSA\", oidSignatureSHA512WithRSA, asn1.NullRawValue, RSA, crypto.SHA512, false},\n\t{SHA256WithRSAPSS, \"SHA256-RSAPSS\", oidSignatureRSAPSS, pssParametersSHA256, RSA, crypto.SHA256, true},\n\t{SHA384WithRSAPSS, \"SHA384-RSAPSS\", oidSignatureRSAPSS, pssParametersSHA384, RSA, crypto.SHA384, true},\n\t{SHA512WithRSAPSS, \"SHA512-RSAPSS\", oidSignatureRSAPSS, pssParametersSHA512, RSA, crypto.SHA512, true},\n\t{DSAWithSHA1, \"DSA-SHA1\", oidSignatureDSAWithSHA1, emptyRawValue, DSA, crypto.SHA1, false},\n\t{DSAWithSHA256, \"DSA-SHA256\", oidSignatureDSAWithSHA256, emptyRawValue, DSA, crypto.SHA256, false},\n\t{ECDSAWithSHA1, \"ECDSA-SHA1\", oidSignatureECDSAWithSHA1, emptyRawValue, ECDSA, crypto.SHA1, false},\n\t{ECDSAWithSHA256, \"ECDSA-SHA256\", oidSignatureECDSAWithSHA256, emptyRawValue, ECDSA, crypto.SHA256, false},\n\t{ECDSAWithSHA384, \"ECDSA-SHA384\", oidSignatureECDSAWithSHA384, emptyRawValue, ECDSA, crypto.SHA384, false},\n\t{ECDSAWithSHA512, \"ECDSA-SHA512\", oidSignatureECDSAWithSHA512, emptyRawValue, ECDSA, crypto.SHA512, false},\n\t{PureEd25519, \"Ed25519\", oidSignatureEd25519, emptyRawValue, Ed25519, crypto.Hash(0) /* no pre-hashing */, false},\n}\n\nvar emptyRawValue = asn1.RawValue{}\n\n// DER encoded RSA PSS parameters for the\n// SHA256, SHA384, and SHA512 hashes as defined in RFC 3447, Appendix A.2.3.\n// The parameters contain the following values:\n//   - hashAlgorithm contains the associated hash identifier with NULL parameters\n//   - maskGenAlgorithm always contains the default mgf1SHA1 identifier\n//   - saltLength contains the length of the associated hash\n//   - trailerField always contains the default trailerFieldBC value\nvar (\n\tpssParametersSHA256 = asn1.RawValue{FullBytes: []byte{48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 162, 3, 2, 1, 32}}\n\tpssParametersSHA384 = asn1.RawValue{FullBytes: []byte{48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 162, 3, 2, 1, 48}}\n\tpssParametersSHA512 = asn1.RawValue{FullBytes: []byte{48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 162, 3, 2, 1, 64}}\n)\n\n// pssParameters reflects the parameters in an AlgorithmIdentifier that\n// specifies RSA PSS. See RFC 3447, Appendix A.2.3.\ntype pssParameters struct {\n\t// The following three fields are not marked as\n\t// optional because the default values specify SHA-1,\n\t// which is no longer suitable for use in signatures.\n\tHash         pkix.AlgorithmIdentifier `asn1:\"explicit,tag:0\"`\n\tMGF          pkix.AlgorithmIdentifier `asn1:\"explicit,tag:1\"`\n\tSaltLength   int                      `asn1:\"explicit,tag:2\"`\n\tTrailerField int                      `asn1:\"optional,explicit,tag:3,default:1\"`\n}\n\nfunc getSignatureAlgorithmFromAI(ai pkix.AlgorithmIdentifier) stdx509.SignatureAlgorithm {\n\tif ai.Algorithm.Equal(oidSignatureEd25519) {\n\t\t// RFC 8410, Section 3\n\t\t// > For all of the OIDs, the parameters MUST be absent.\n\t\tif len(ai.Parameters.FullBytes) != 0 {\n\t\t\treturn stdx509.UnknownSignatureAlgorithm\n\t\t}\n\t}\n\n\tif !ai.Algorithm.Equal(oidSignatureRSAPSS) {\n\t\tfor _, details := range signatureAlgorithmDetails {\n\t\t\tif ai.Algorithm.Equal(details.oid) {\n\t\t\t\treturn stdx509.SignatureAlgorithm(details.algo)\n\t\t\t}\n\t\t}\n\t\treturn stdx509.UnknownSignatureAlgorithm\n\t}\n\n\t// RSA PSS is special because it encodes important parameters\n\t// in the Parameters.\n\n\tvar params pssParameters\n\tif _, err := asn1.Unmarshal(ai.Parameters.FullBytes, &params); err != nil {\n\t\treturn stdx509.UnknownSignatureAlgorithm\n\t}\n\n\tvar mgf1HashFunc pkix.AlgorithmIdentifier\n\tif _, err := asn1.Unmarshal(params.MGF.Parameters.FullBytes, &mgf1HashFunc); err != nil {\n\t\treturn stdx509.UnknownSignatureAlgorithm\n\t}\n\n\t// PSS is greatly overburdened with options. This code forces them into\n\t// three buckets by requiring that the MGF1 hash function always match the\n\t// message hash function (as recommended in RFC 3447, Section 8.1), that the\n\t// salt length matches the hash length, and that the trailer field has the\n\t// default value.\n\tif (len(params.Hash.Parameters.FullBytes) != 0 && !bytes.Equal(params.Hash.Parameters.FullBytes, asn1.NullBytes)) ||\n\t\t!params.MGF.Algorithm.Equal(oidMGF1) ||\n\t\t!mgf1HashFunc.Algorithm.Equal(params.Hash.Algorithm) ||\n\t\t(len(mgf1HashFunc.Parameters.FullBytes) != 0 && !bytes.Equal(mgf1HashFunc.Parameters.FullBytes, asn1.NullBytes)) ||\n\t\tparams.TrailerField != 1 {\n\t\treturn stdx509.UnknownSignatureAlgorithm\n\t}\n\n\tswitch {\n\tcase params.Hash.Algorithm.Equal(oidSHA256) && params.SaltLength == 32:\n\t\treturn stdx509.SHA256WithRSAPSS\n\tcase params.Hash.Algorithm.Equal(oidSHA384) && params.SaltLength == 48:\n\t\treturn stdx509.SHA384WithRSAPSS\n\tcase params.Hash.Algorithm.Equal(oidSHA512) && params.SaltLength == 64:\n\t\treturn stdx509.SHA512WithRSAPSS\n\t}\n\n\treturn stdx509.UnknownSignatureAlgorithm\n}\n\nvar (\n\t// RFC 3279, 2.3 Public Key Algorithms\n\t//\n\t//\tpkcs-1 OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)\n\t//\t\trsadsi(113549) pkcs(1) 1 }\n\t//\n\t// rsaEncryption OBJECT IDENTIFIER ::== { pkcs1-1 1 }\n\t//\n\t//\tid-dsa OBJECT IDENTIFIER ::== { iso(1) member-body(2) us(840)\n\t//\t\tx9-57(10040) x9cm(4) 1 }\n\toidPublicKeyRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1}\n\toidPublicKeyDSA = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 1}\n\t// RFC 5480, 2.1.1 Unrestricted Algorithm Identifier and Parameters\n\t//\n\t//\tid-ecPublicKey OBJECT IDENTIFIER ::= {\n\t//\t\tiso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }\n\toidPublicKeyECDSA = asn1.ObjectIdentifier{1, 2, 840, 10045, 2, 1}\n\t// RFC 8410, Section 3\n\t//\n\t//\tid-X25519    OBJECT IDENTIFIER ::= { 1 3 101 110 }\n\t//\tid-Ed25519   OBJECT IDENTIFIER ::= { 1 3 101 112 }\n\toidPublicKeyX25519  = asn1.ObjectIdentifier{1, 3, 101, 110}\n\toidPublicKeyEd25519 = asn1.ObjectIdentifier{1, 3, 101, 112}\n)\n\n// getPublicKeyAlgorithmFromOID returns the exposed PublicKeyAlgorithm\n// identifier for public key types supported in certificates and CSRs. Marshal\n// and Parse functions may support a different set of public key types.\nfunc getPublicKeyAlgorithmFromOID(oid asn1.ObjectIdentifier) stdx509.PublicKeyAlgorithm {\n\tswitch {\n\tcase oid.Equal(oidPublicKeyRSA):\n\t\treturn stdx509.RSA\n\tcase oid.Equal(oidPublicKeyDSA):\n\t\treturn stdx509.DSA\n\tcase oid.Equal(oidPublicKeyECDSA):\n\t\treturn stdx509.ECDSA\n\tcase oid.Equal(oidPublicKeyEd25519):\n\t\treturn stdx509.Ed25519\n\t}\n\treturn stdx509.UnknownPublicKeyAlgorithm\n}\n\n// RFC 5480, 2.1.1.1. Named Curve\n//\n//\tsecp224r1 OBJECT IDENTIFIER ::= {\n//\t  iso(1) identified-organization(3) certicom(132) curve(0) 33 }\n//\n//\tsecp256r1 OBJECT IDENTIFIER ::= {\n//\t  iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)\n//\t  prime(1) 7 }\n//\n//\tsecp384r1 OBJECT IDENTIFIER ::= {\n//\t  iso(1) identified-organization(3) certicom(132) curve(0) 34 }\n//\n//\tsecp521r1 OBJECT IDENTIFIER ::= {\n//\t  iso(1) identified-organization(3) certicom(132) curve(0) 35 }\n//\n// NB: secp256r1 is equivalent to prime256v1\nvar (\n\toidNamedCurveP224 = asn1.ObjectIdentifier{1, 3, 132, 0, 33}\n\toidNamedCurveP256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}\n\toidNamedCurveP384 = asn1.ObjectIdentifier{1, 3, 132, 0, 34}\n\toidNamedCurveP521 = asn1.ObjectIdentifier{1, 3, 132, 0, 35}\n)\n\nfunc namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve {\n\tswitch {\n\tcase oid.Equal(oidNamedCurveP224):\n\t\treturn elliptic.P224()\n\tcase oid.Equal(oidNamedCurveP256):\n\t\treturn elliptic.P256()\n\tcase oid.Equal(oidNamedCurveP384):\n\t\treturn elliptic.P384()\n\tcase oid.Equal(oidNamedCurveP521):\n\t\treturn elliptic.P521()\n\t}\n\treturn nil\n}\n\n// KeyUsage represents the set of actions that are valid for a given key. It's\n// a bitmap of the KeyUsage* constants.\ntype KeyUsage int\n\nconst (\n\tKeyUsageDigitalSignature KeyUsage = 1 << iota\n\tKeyUsageContentCommitment\n\tKeyUsageKeyEncipherment\n\tKeyUsageDataEncipherment\n\tKeyUsageKeyAgreement\n\tKeyUsageCertSign\n\tKeyUsageCRLSign\n\tKeyUsageEncipherOnly\n\tKeyUsageDecipherOnly\n)\n\n// RFC 5280, 4.2.1.12  Extended Key Usage\n//\n//\tanyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-ce-extKeyUsage 0 }\n//\n//\tid-kp OBJECT IDENTIFIER ::= { id-pkix 3 }\n//\n//\tid-kp-serverAuth             OBJECT IDENTIFIER ::= { id-kp 1 }\n//\tid-kp-clientAuth             OBJECT IDENTIFIER ::= { id-kp 2 }\n//\tid-kp-codeSigning            OBJECT IDENTIFIER ::= { id-kp 3 }\n//\tid-kp-emailProtection        OBJECT IDENTIFIER ::= { id-kp 4 }\n//\tid-kp-timeStamping           OBJECT IDENTIFIER ::= { id-kp 8 }\n//\tid-kp-OCSPSigning            OBJECT IDENTIFIER ::= { id-kp 9 }\nvar (\n\toidExtKeyUsageAny                            = asn1.ObjectIdentifier{2, 5, 29, 37, 0}\n\toidExtKeyUsageServerAuth                     = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 1}\n\toidExtKeyUsageClientAuth                     = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 2}\n\toidExtKeyUsageCodeSigning                    = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 3}\n\toidExtKeyUsageEmailProtection                = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 4}\n\toidExtKeyUsageIPSECEndSystem                 = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 5}\n\toidExtKeyUsageIPSECTunnel                    = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 6}\n\toidExtKeyUsageIPSECUser                      = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 7}\n\toidExtKeyUsageTimeStamping                   = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 8}\n\toidExtKeyUsageOCSPSigning                    = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 3, 9}\n\toidExtKeyUsageMicrosoftServerGatedCrypto     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 10, 3, 3}\n\toidExtKeyUsageNetscapeServerGatedCrypto      = asn1.ObjectIdentifier{2, 16, 840, 1, 113730, 4, 1}\n\toidExtKeyUsageMicrosoftCommercialCodeSigning = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 2, 1, 22}\n\toidExtKeyUsageMicrosoftKernelCodeSigning     = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 61, 1, 1}\n)\n\n// ExtKeyUsage represents an extended set of actions that are valid for a given key.\n// Each of the ExtKeyUsage* constants define a unique action.\ntype ExtKeyUsage int\n\nconst (\n\tExtKeyUsageAny ExtKeyUsage = iota\n\tExtKeyUsageServerAuth\n\tExtKeyUsageClientAuth\n\tExtKeyUsageCodeSigning\n\tExtKeyUsageEmailProtection\n\tExtKeyUsageIPSECEndSystem\n\tExtKeyUsageIPSECTunnel\n\tExtKeyUsageIPSECUser\n\tExtKeyUsageTimeStamping\n\tExtKeyUsageOCSPSigning\n\tExtKeyUsageMicrosoftServerGatedCrypto\n\tExtKeyUsageNetscapeServerGatedCrypto\n\tExtKeyUsageMicrosoftCommercialCodeSigning\n\tExtKeyUsageMicrosoftKernelCodeSigning\n)\n\n// extKeyUsageOIDs contains the mapping between an ExtKeyUsage and its OID.\nvar extKeyUsageOIDs = []struct {\n\textKeyUsage ExtKeyUsage\n\toid         asn1.ObjectIdentifier\n}{\n\t{ExtKeyUsageAny, oidExtKeyUsageAny},\n\t{ExtKeyUsageServerAuth, oidExtKeyUsageServerAuth},\n\t{ExtKeyUsageClientAuth, oidExtKeyUsageClientAuth},\n\t{ExtKeyUsageCodeSigning, oidExtKeyUsageCodeSigning},\n\t{ExtKeyUsageEmailProtection, oidExtKeyUsageEmailProtection},\n\t{ExtKeyUsageIPSECEndSystem, oidExtKeyUsageIPSECEndSystem},\n\t{ExtKeyUsageIPSECTunnel, oidExtKeyUsageIPSECTunnel},\n\t{ExtKeyUsageIPSECUser, oidExtKeyUsageIPSECUser},\n\t{ExtKeyUsageTimeStamping, oidExtKeyUsageTimeStamping},\n\t{ExtKeyUsageOCSPSigning, oidExtKeyUsageOCSPSigning},\n\t{ExtKeyUsageMicrosoftServerGatedCrypto, oidExtKeyUsageMicrosoftServerGatedCrypto},\n\t{ExtKeyUsageNetscapeServerGatedCrypto, oidExtKeyUsageNetscapeServerGatedCrypto},\n\t{ExtKeyUsageMicrosoftCommercialCodeSigning, oidExtKeyUsageMicrosoftCommercialCodeSigning},\n\t{ExtKeyUsageMicrosoftKernelCodeSigning, oidExtKeyUsageMicrosoftKernelCodeSigning},\n}\n\nfunc extKeyUsageFromOID(oid asn1.ObjectIdentifier) (eku ExtKeyUsage, ok bool) {\n\tfor _, pair := range extKeyUsageOIDs {\n\t\tif oid.Equal(pair.oid) {\n\t\t\treturn pair.extKeyUsage, true\n\t\t}\n\t}\n\treturn\n}\n\nconst (\n\tnameTypeEmail = 1\n\tnameTypeDNS   = 2\n\tnameTypeURI   = 6\n\tnameTypeIP    = 7\n)\n\nvar (\n\toidExtensionAuthorityInfoAccess = []int{1, 3, 6, 1, 5, 5, 7, 1, 1}\n)\n\nvar (\n\toidAuthorityInfoAccessOcsp    = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 48, 1}\n\toidAuthorityInfoAccessIssuers = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 48, 2}\n)\n\nfunc isIA5String(s string) error {\n\tfor _, r := range s {\n\t\t// Per RFC5280 \"IA5String is limited to the set of ASCII characters\"\n\t\tif r > unicode.MaxASCII {\n\t\t\treturn fmt.Errorf(\"x509: %q cannot be encoded as an IA5String\", s)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/pkcs7.go",
    "content": "// Package pkcs7 implements parsing and generation of some PKCS#7 structures.\npackage pkcs7\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sort\"\n\t\"sync\"\n\n\t_ \"crypto/sha1\" // for crypto.SHA1\n\n\tlegacyx509 \"github.com/smallstep/pkcs7/internal/legacy/x509\"\n)\n\n// PKCS7 Represents a PKCS7 structure\ntype PKCS7 struct {\n\tContent      []byte\n\tCertificates []*x509.Certificate\n\tCRLs         []pkix.CertificateList\n\tSigners      []signerInfo\n\traw          interface{}\n}\n\ntype contentInfo struct {\n\tContentType asn1.ObjectIdentifier\n\tContent     asn1.RawValue `asn1:\"explicit,optional,tag:0\"`\n}\n\n// ErrUnsupportedContentType is returned when a PKCS7 content type is not supported.\n// Currently only Data (1.2.840.113549.1.7.1), Signed Data (1.2.840.113549.1.7.2),\n// and Enveloped Data are supported (1.2.840.113549.1.7.3)\nvar ErrUnsupportedContentType = errors.New(\"pkcs7: cannot parse data: unimplemented content type\")\n\ntype unsignedData []byte\n\nvar (\n\t// Signed Data OIDs\n\tOIDData                   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 1}\n\tOIDSignedData             = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 2}\n\tOIDEnvelopedData          = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 3}\n\tOIDEncryptedData          = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 6}\n\tOIDAttributeContentType   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 3}\n\tOIDAttributeMessageDigest = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 4}\n\tOIDAttributeSigningTime   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 5}\n\n\t// Digest Algorithms\n\tOIDDigestAlgorithmSHA1   = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 26}\n\tOIDDigestAlgorithmSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 1}\n\tOIDDigestAlgorithmSHA384 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 2}\n\tOIDDigestAlgorithmSHA512 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 3}\n\tOIDDigestAlgorithmSHA224 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 4}\n\n\tOIDDigestAlgorithmDSA     = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 1}\n\tOIDDigestAlgorithmDSASHA1 = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 3}\n\n\tOIDDigestAlgorithmECDSASHA1   = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 1}\n\tOIDDigestAlgorithmECDSASHA256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 2}\n\tOIDDigestAlgorithmECDSASHA384 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 3}\n\tOIDDigestAlgorithmECDSASHA512 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 4}\n\n\t// Signature Algorithms\n\tOIDEncryptionAlgorithmRSAMD5    = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4}  // see https://www.rfc-editor.org/rfc/rfc8017#appendix-A.2.4\n\tOIDEncryptionAlgorithmRSASHA1   = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5}  // ditto\n\tOIDEncryptionAlgorithmRSASHA256 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11} // ditto\n\tOIDEncryptionAlgorithmRSASHA384 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12} // ditto\n\tOIDEncryptionAlgorithmRSASHA512 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 13} // ditto\n\tOIDEncryptionAlgorithmRSASHA224 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 14} // ditto\n\n\tOIDEncryptionAlgorithmECDSAP256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}\n\tOIDEncryptionAlgorithmECDSAP384 = asn1.ObjectIdentifier{1, 3, 132, 0, 34}\n\tOIDEncryptionAlgorithmECDSAP521 = asn1.ObjectIdentifier{1, 3, 132, 0, 35}\n\n\t// Asymmetric Encryption Algorithms\n\tOIDEncryptionAlgorithmRSA       = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1} // see https://www.rfc-editor.org/rfc/rfc8017#appendix-A.2.2\n\tOIDEncryptionAlgorithmRSAESOAEP = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 7} // see https://www.rfc-editor.org/rfc/rfc8017#appendix-A.2.1\n\n\t// Symmetric Encryption Algorithms\n\tOIDEncryptionAlgorithmDESCBC     = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 7}               // see https://www.rfc-editor.org/rfc/rfc8018.html#appendix-B.2.1\n\tOIDEncryptionAlgorithmDESEDE3CBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 3, 7}         // see https://www.rfc-editor.org/rfc/rfc8018.html#appendix-B.2.2\n\tOIDEncryptionAlgorithmAES256CBC  = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 42} // see https://www.rfc-editor.org/rfc/rfc3565.html#section-4.1\n\tOIDEncryptionAlgorithmAES128GCM  = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 6}  // see https://www.rfc-editor.org/rfc/rfc5084.html#section-3.2\n\tOIDEncryptionAlgorithmAES128CBC  = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 2}  // see https://www.rfc-editor.org/rfc/rfc8018.html#appendix-B.2.5\n\tOIDEncryptionAlgorithmAES256GCM  = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 46} // see https://www.rfc-editor.org/rfc/rfc5084.html#section-3.2\n)\n\nfunc getHashForOID(oid asn1.ObjectIdentifier) (crypto.Hash, error) {\n\tswitch {\n\tcase oid.Equal(OIDDigestAlgorithmSHA1), oid.Equal(OIDDigestAlgorithmECDSASHA1),\n\t\toid.Equal(OIDDigestAlgorithmDSA), oid.Equal(OIDDigestAlgorithmDSASHA1),\n\t\toid.Equal(OIDEncryptionAlgorithmRSA):\n\t\treturn crypto.SHA1, nil\n\tcase oid.Equal(OIDDigestAlgorithmSHA256), oid.Equal(OIDDigestAlgorithmECDSASHA256):\n\t\treturn crypto.SHA256, nil\n\tcase oid.Equal(OIDDigestAlgorithmSHA384), oid.Equal(OIDDigestAlgorithmECDSASHA384):\n\t\treturn crypto.SHA384, nil\n\tcase oid.Equal(OIDDigestAlgorithmSHA512), oid.Equal(OIDDigestAlgorithmECDSASHA512):\n\t\treturn crypto.SHA512, nil\n\t}\n\treturn crypto.Hash(0), ErrUnsupportedAlgorithm\n}\n\n// getDigestOIDForSignatureAlgorithm takes an x509.SignatureAlgorithm\n// and returns the corresponding OID digest algorithm\nfunc getDigestOIDForSignatureAlgorithm(digestAlg x509.SignatureAlgorithm) (asn1.ObjectIdentifier, error) {\n\tswitch digestAlg {\n\tcase x509.SHA1WithRSA, x509.ECDSAWithSHA1:\n\t\treturn OIDDigestAlgorithmSHA1, nil\n\tcase x509.SHA256WithRSA, x509.ECDSAWithSHA256:\n\t\treturn OIDDigestAlgorithmSHA256, nil\n\tcase x509.SHA384WithRSA, x509.ECDSAWithSHA384:\n\t\treturn OIDDigestAlgorithmSHA384, nil\n\tcase x509.SHA512WithRSA, x509.ECDSAWithSHA512:\n\t\treturn OIDDigestAlgorithmSHA512, nil\n\t}\n\treturn nil, fmt.Errorf(\"pkcs7: cannot convert hash to oid, unknown hash algorithm\")\n}\n\n// getOIDForEncryptionAlgorithm takes the public or private key type of the signer and\n// the OID of a digest algorithm to return the appropriate signerInfo.DigestEncryptionAlgorithm\nfunc getOIDForEncryptionAlgorithm(pkey interface{}, OIDDigestAlg asn1.ObjectIdentifier) (asn1.ObjectIdentifier, error) {\n\tswitch k := pkey.(type) {\n\tcase *rsa.PrivateKey, *rsa.PublicKey:\n\t\tswitch {\n\t\tdefault:\n\t\t\treturn OIDEncryptionAlgorithmRSA, nil\n\t\tcase OIDDigestAlg.Equal(OIDEncryptionAlgorithmRSA):\n\t\t\treturn OIDEncryptionAlgorithmRSA, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA1):\n\t\t\treturn OIDEncryptionAlgorithmRSASHA1, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA256):\n\t\t\treturn OIDEncryptionAlgorithmRSASHA256, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA384):\n\t\t\treturn OIDEncryptionAlgorithmRSASHA384, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA512):\n\t\t\treturn OIDEncryptionAlgorithmRSASHA512, nil\n\t\t}\n\tcase *ecdsa.PrivateKey, *ecdsa.PublicKey:\n\t\tswitch {\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA1):\n\t\t\treturn OIDDigestAlgorithmECDSASHA1, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA256):\n\t\t\treturn OIDDigestAlgorithmECDSASHA256, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA384):\n\t\t\treturn OIDDigestAlgorithmECDSASHA384, nil\n\t\tcase OIDDigestAlg.Equal(OIDDigestAlgorithmSHA512):\n\t\t\treturn OIDDigestAlgorithmECDSASHA512, nil\n\t\t}\n\tcase *dsa.PrivateKey, *dsa.PublicKey:\n\t\treturn OIDDigestAlgorithmDSA, nil\n\tcase crypto.Signer:\n\t\t// This generic case is here to cover types from other packages. It\n\t\t// was specifically added to handle the private keyRSA type in the\n\t\t// github.com/go-piv/piv-go/piv package.\n\t\treturn getOIDForEncryptionAlgorithm(k.Public(), OIDDigestAlg)\n\t}\n\treturn nil, fmt.Errorf(\"pkcs7: cannot convert encryption algorithm to oid, unknown private key type %T\", pkey)\n\n}\n\n// Parse decodes a DER encoded PKCS7 package\nfunc Parse(data []byte) (p7 *PKCS7, err error) {\n\tif len(data) == 0 {\n\t\treturn nil, errors.New(\"pkcs7: input data is empty\")\n\t}\n\tvar info contentInfo\n\tder, err := ber2der(data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trest, err := asn1.Unmarshal(der, &info)\n\tif len(rest) > 0 {\n\t\terr = asn1.SyntaxError{Msg: \"trailing data\"}\n\t\treturn\n\t}\n\tif err != nil {\n\t\treturn\n\t}\n\n\t// fmt.Printf(\"--> Content Type: %s\", info.ContentType)\n\tswitch {\n\tcase info.ContentType.Equal(OIDSignedData):\n\t\treturn parseSignedData(info.Content.Bytes)\n\tcase info.ContentType.Equal(OIDEnvelopedData):\n\t\treturn parseEnvelopedData(info.Content.Bytes)\n\tcase info.ContentType.Equal(OIDEncryptedData):\n\t\treturn parseEncryptedData(info.Content.Bytes)\n\t}\n\treturn nil, ErrUnsupportedContentType\n}\n\nfunc parseEnvelopedData(data []byte) (*PKCS7, error) {\n\tvar ed envelopedData\n\tif _, err := asn1.Unmarshal(data, &ed); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &PKCS7{\n\t\traw: ed,\n\t}, nil\n}\n\nfunc parseEncryptedData(data []byte) (*PKCS7, error) {\n\tvar ed encryptedData\n\tif _, err := asn1.Unmarshal(data, &ed); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &PKCS7{\n\t\traw: ed,\n\t}, nil\n}\n\n// SetFallbackLegacyX509CertificateParserEnabled enables parsing certificates\n// embedded in a PKCS7 message using the logic from crypto/x509 from before\n// Go 1.23. Go 1.23 introduced a breaking change in case a certificate contains\n// a critical authority key identifier, which is the correct thing to do based\n// on RFC 5280, but it breaks Windows devices performing the Simple Certificate\n// Enrolment Protocol (SCEP), as the certificates embedded in those requests\n// apparently have authority key identifier extensions marked critical.\n//\n// See https://go-review.googlesource.com/c/go/+/562341 for the change in the\n// Go source.\n//\n// When [SetFallbackLegacyX509CertificateParserEnabled] is called with true, it\n// enables parsing using the legacy crypto/x509 certificate parser. It'll first\n// try to parse the certificates using the regular Go crypto/x509 package, but\n// if it fails on the above case, it'll retry parsing the certificates using a\n// copy of the crypto/x509 package based on Go 1.23, but skips checking the\n// authority key identifier extension being critical or not.\nfunc SetFallbackLegacyX509CertificateParserEnabled(v bool) {\n\tlegacyX509CertificateParser.Lock()\n\tlegacyX509CertificateParser.enabled = v\n\tlegacyX509CertificateParser.Unlock()\n}\n\nvar legacyX509CertificateParser struct {\n\tsync.RWMutex\n\tenabled bool\n}\n\nfunc isLegacyX509ParserEnabled() bool {\n\tlegacyX509CertificateParser.RLock()\n\tdefer legacyX509CertificateParser.RUnlock()\n\treturn legacyX509CertificateParser.enabled\n}\n\nfunc (raw rawCertificates) Parse() ([]*x509.Certificate, error) {\n\tif len(raw.Raw) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tvar val asn1.RawValue\n\tif _, err := asn1.Unmarshal(raw.Raw, &val); err != nil {\n\t\treturn nil, err\n\t}\n\n\tcertificates, err := x509.ParseCertificates(val.Bytes)\n\tif err != nil && err.Error() == \"x509: authority key identifier incorrectly marked critical\" {\n\t\tif isLegacyX509ParserEnabled() {\n\t\t\tcertificates, err = legacyx509.ParseCertificates(val.Bytes)\n\t\t}\n\t}\n\n\treturn certificates, err\n}\n\nfunc isCertMatchForIssuerAndSerial(cert *x509.Certificate, ias issuerAndSerial) bool {\n\treturn cert.SerialNumber.Cmp(ias.SerialNumber) == 0 && bytes.Equal(cert.RawIssuer, ias.IssuerName.FullBytes)\n}\n\n// Attribute represents a key value pair attribute. Value must be marshalable byte\n// `encoding/asn1`\ntype Attribute struct {\n\tType  asn1.ObjectIdentifier\n\tValue interface{}\n}\n\ntype attributes struct {\n\ttypes  []asn1.ObjectIdentifier\n\tvalues []interface{}\n}\n\n// Add adds the attribute, maintaining insertion order\nfunc (attrs *attributes) Add(attrType asn1.ObjectIdentifier, value interface{}) {\n\tattrs.types = append(attrs.types, attrType)\n\tattrs.values = append(attrs.values, value)\n}\n\ntype sortableAttribute struct {\n\tSortKey   []byte\n\tAttribute attribute\n}\n\ntype attributeSet []sortableAttribute\n\nfunc (sa attributeSet) Len() int {\n\treturn len(sa)\n}\n\nfunc (sa attributeSet) Less(i, j int) bool {\n\treturn bytes.Compare(sa[i].SortKey, sa[j].SortKey) < 0\n}\n\nfunc (sa attributeSet) Swap(i, j int) {\n\tsa[i], sa[j] = sa[j], sa[i]\n}\n\nfunc (sa attributeSet) Attributes() []attribute {\n\tattrs := make([]attribute, len(sa))\n\tfor i, attr := range sa {\n\t\tattrs[i] = attr.Attribute\n\t}\n\treturn attrs\n}\n\nfunc (attrs *attributes) ForMarshalling() ([]attribute, error) {\n\tsortables := make(attributeSet, len(attrs.types))\n\tfor i := range sortables {\n\t\tattrType := attrs.types[i]\n\t\tattrValue := attrs.values[i]\n\t\tasn1Value, err := asn1.Marshal(attrValue)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tattr := attribute{\n\t\t\tType:  attrType,\n\t\t\tValue: asn1.RawValue{Tag: 17, IsCompound: true, Bytes: asn1Value}, // 17 == SET tag\n\t\t}\n\t\tencoded, err := asn1.Marshal(attr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsortables[i] = sortableAttribute{\n\t\t\tSortKey:   encoded,\n\t\t\tAttribute: attr,\n\t\t}\n\t}\n\tsort.Sort(sortables)\n\treturn sortables.Attributes(), nil\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/sign.go",
    "content": "package pkcs7\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/dsa\"\n\t\"crypto/rand\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"time\"\n)\n\n// SignedData is an opaque data structure for creating signed data payloads\ntype SignedData struct {\n\tsd                  signedData\n\tcerts               []*x509.Certificate\n\tdata, messageDigest []byte\n\tdigestOid           asn1.ObjectIdentifier\n\tencryptionOid       asn1.ObjectIdentifier\n}\n\n// NewSignedData takes data and initializes a PKCS7 SignedData struct that is\n// ready to be signed via AddSigner. The digest algorithm is set to SHA1 by default\n// and can be changed by calling SetDigestAlgorithm.\nfunc NewSignedData(data []byte) (*SignedData, error) {\n\tcontent, err := asn1.Marshal(data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tci := contentInfo{\n\t\tContentType: OIDData,\n\t\tContent:     asn1.RawValue{Class: 2, Tag: 0, Bytes: content, IsCompound: true},\n\t}\n\tsd := signedData{\n\t\tContentInfo: ci,\n\t\tVersion:     1,\n\t}\n\treturn &SignedData{sd: sd, data: data, digestOid: OIDDigestAlgorithmSHA1}, nil\n}\n\n// SignerInfoConfig are optional values to include when adding a signer\ntype SignerInfoConfig struct {\n\tExtraSignedAttributes   []Attribute\n\tExtraUnsignedAttributes []Attribute\n}\n\ntype signedData struct {\n\tVersion                    int                        `asn1:\"default:1\"`\n\tDigestAlgorithmIdentifiers []pkix.AlgorithmIdentifier `asn1:\"set\"`\n\tContentInfo                contentInfo\n\tCertificates               rawCertificates        `asn1:\"optional,tag:0\"`\n\tCRLs                       []pkix.CertificateList `asn1:\"optional,tag:1\"`\n\tSignerInfos                []signerInfo           `asn1:\"set\"`\n}\n\ntype signerInfo struct {\n\tVersion                   int `asn1:\"default:1\"`\n\tIssuerAndSerialNumber     issuerAndSerial\n\tDigestAlgorithm           pkix.AlgorithmIdentifier\n\tAuthenticatedAttributes   []attribute `asn1:\"optional,omitempty,tag:0\"`\n\tDigestEncryptionAlgorithm pkix.AlgorithmIdentifier\n\tEncryptedDigest           []byte\n\tUnauthenticatedAttributes []attribute `asn1:\"optional,omitempty,tag:1\"`\n}\n\ntype attribute struct {\n\tType  asn1.ObjectIdentifier\n\tValue asn1.RawValue `asn1:\"set\"`\n}\n\nfunc marshalAttributes(attrs []attribute) ([]byte, error) {\n\tencodedAttributes, err := asn1.Marshal(struct {\n\t\tA []attribute `asn1:\"set\"`\n\t}{A: attrs})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Remove the leading sequence octets\n\tvar raw asn1.RawValue\n\tasn1.Unmarshal(encodedAttributes, &raw)\n\treturn raw.Bytes, nil\n}\n\ntype rawCertificates struct {\n\tRaw asn1.RawContent\n}\n\ntype issuerAndSerial struct {\n\tIssuerName   asn1.RawValue\n\tSerialNumber *big.Int\n}\n\n// SetDigestAlgorithm sets the digest algorithm to be used in the signing process.\n//\n// This should be called before adding signers\nfunc (sd *SignedData) SetDigestAlgorithm(d asn1.ObjectIdentifier) {\n\tsd.digestOid = d\n}\n\n// SetEncryptionAlgorithm sets the encryption algorithm to be used in the signing process.\n//\n// This should be called before adding signers\nfunc (sd *SignedData) SetEncryptionAlgorithm(d asn1.ObjectIdentifier) {\n\tsd.encryptionOid = d\n}\n\n// AddSigner is a wrapper around AddSignerChain() that adds a signer without any parent.\nfunc (sd *SignedData) AddSigner(ee *x509.Certificate, pkey crypto.PrivateKey, config SignerInfoConfig) error {\n\tvar parents []*x509.Certificate\n\treturn sd.AddSignerChain(ee, pkey, parents, config)\n}\n\n// AddSignerChain signs attributes about the content and adds certificates\n// and signers infos to the Signed Data. The certificate and private key\n// of the end-entity signer are used to issue the signature, and any\n// parent of that end-entity that need to be added to the list of\n// certifications can be specified in the parents slice.\n//\n// The signature algorithm used to hash the data is the one of the end-entity\n// certificate.\nfunc (sd *SignedData) AddSignerChain(ee *x509.Certificate, pkey crypto.PrivateKey, parents []*x509.Certificate, config SignerInfoConfig) error {\n\t// Following RFC 2315, 9.2 SignerInfo type, the distinguished name of\n\t// the issuer of the end-entity signer is stored in the issuerAndSerialNumber\n\t// section of the SignedData.SignerInfo, alongside the serial number of\n\t// the end-entity.\n\tvar ias issuerAndSerial\n\tias.SerialNumber = ee.SerialNumber\n\tif len(parents) == 0 {\n\t\t// no parent, the issuer is the end-entity cert itself\n\t\tias.IssuerName = asn1.RawValue{FullBytes: ee.RawIssuer}\n\t} else {\n\t\terr := verifyPartialChain(ee, parents)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// the first parent is the issuer\n\t\tias.IssuerName = asn1.RawValue{FullBytes: parents[0].RawSubject}\n\t}\n\tsd.sd.DigestAlgorithmIdentifiers = append(sd.sd.DigestAlgorithmIdentifiers,\n\t\tpkix.AlgorithmIdentifier{Algorithm: sd.digestOid},\n\t)\n\thash, err := getHashForOID(sd.digestOid)\n\tif err != nil {\n\t\treturn err\n\t}\n\th := hash.New()\n\th.Write(sd.data)\n\tsd.messageDigest = h.Sum(nil)\n\tencryptionOid, err := getOIDForEncryptionAlgorithm(pkey, sd.digestOid)\n\tif err != nil {\n\t\treturn err\n\t}\n\tattrs := &attributes{}\n\tattrs.Add(OIDAttributeContentType, sd.sd.ContentInfo.ContentType)\n\tattrs.Add(OIDAttributeMessageDigest, sd.messageDigest)\n\tattrs.Add(OIDAttributeSigningTime, time.Now().UTC())\n\tfor _, attr := range config.ExtraSignedAttributes {\n\t\tattrs.Add(attr.Type, attr.Value)\n\t}\n\tfinalAttrs, err := attrs.ForMarshalling()\n\tif err != nil {\n\t\treturn err\n\t}\n\tunsignedAttrs := &attributes{}\n\tfor _, attr := range config.ExtraUnsignedAttributes {\n\t\tunsignedAttrs.Add(attr.Type, attr.Value)\n\t}\n\tfinalUnsignedAttrs, err := unsignedAttrs.ForMarshalling()\n\tif err != nil {\n\t\treturn err\n\t}\n\t// create signature of signed attributes\n\tsignature, err := signAttributes(finalAttrs, pkey, hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\tsigner := signerInfo{\n\t\tAuthenticatedAttributes:   finalAttrs,\n\t\tUnauthenticatedAttributes: finalUnsignedAttrs,\n\t\tDigestAlgorithm:           pkix.AlgorithmIdentifier{Algorithm: sd.digestOid},\n\t\tDigestEncryptionAlgorithm: pkix.AlgorithmIdentifier{Algorithm: encryptionOid},\n\t\tIssuerAndSerialNumber:     ias,\n\t\tEncryptedDigest:           signature,\n\t\tVersion:                   1,\n\t}\n\tsd.certs = append(sd.certs, ee)\n\tif len(parents) > 0 {\n\t\tsd.certs = append(sd.certs, parents...)\n\t}\n\tsd.sd.SignerInfos = append(sd.sd.SignerInfos, signer)\n\treturn nil\n}\n\n// SignWithoutAttr issues a signature on the content of the pkcs7 SignedData.\n// Unlike AddSigner/AddSignerChain, it calculates the digest on the data alone\n// and does not include any signed attributes like timestamp and so on.\n//\n// This function is needed to sign old Android APKs, something you probably\n// shouldn't do unless you're maintaining backward compatibility for old\n// applications.\nfunc (sd *SignedData) SignWithoutAttr(ee *x509.Certificate, pkey crypto.PrivateKey, config SignerInfoConfig) error {\n\tvar signature []byte\n\tsd.sd.DigestAlgorithmIdentifiers = append(sd.sd.DigestAlgorithmIdentifiers, pkix.AlgorithmIdentifier{Algorithm: sd.digestOid})\n\thash, err := getHashForOID(sd.digestOid)\n\tif err != nil {\n\t\treturn err\n\t}\n\th := hash.New()\n\th.Write(sd.data)\n\tsd.messageDigest = h.Sum(nil)\n\tswitch pkey := pkey.(type) {\n\tcase *dsa.PrivateKey:\n\t\t// dsa doesn't implement crypto.Signer so we make a special case\n\t\t// https://github.com/golang/go/issues/27889\n\t\tr, s, err := dsa.Sign(rand.Reader, pkey, sd.messageDigest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsignature, err = asn1.Marshal(dsaSignature{r, s})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tdefault:\n\t\tkey, ok := pkey.(crypto.Signer)\n\t\tif !ok {\n\t\t\treturn errors.New(\"pkcs7: private key does not implement crypto.Signer\")\n\t\t}\n\t\tsignature, err = key.Sign(rand.Reader, sd.messageDigest, hash)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tvar ias issuerAndSerial\n\tias.SerialNumber = ee.SerialNumber\n\t// no parent, the issue is the end-entity cert itself\n\tias.IssuerName = asn1.RawValue{FullBytes: ee.RawIssuer}\n\tif sd.encryptionOid == nil {\n\t\t// if the encryption algorithm wasn't set by SetEncryptionAlgorithm,\n\t\t// infer it from the digest algorithm\n\t\tsd.encryptionOid, err = getOIDForEncryptionAlgorithm(pkey, sd.digestOid)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\tsigner := signerInfo{\n\t\tDigestAlgorithm:           pkix.AlgorithmIdentifier{Algorithm: sd.digestOid},\n\t\tDigestEncryptionAlgorithm: pkix.AlgorithmIdentifier{Algorithm: sd.encryptionOid},\n\t\tIssuerAndSerialNumber:     ias,\n\t\tEncryptedDigest:           signature,\n\t\tVersion:                   1,\n\t}\n\t// create signature of signed attributes\n\tsd.certs = append(sd.certs, ee)\n\tsd.sd.SignerInfos = append(sd.sd.SignerInfos, signer)\n\treturn nil\n}\n\nfunc (si *signerInfo) SetUnauthenticatedAttributes(extraUnsignedAttrs []Attribute) error {\n\tunsignedAttrs := &attributes{}\n\tfor _, attr := range extraUnsignedAttrs {\n\t\tunsignedAttrs.Add(attr.Type, attr.Value)\n\t}\n\tfinalUnsignedAttrs, err := unsignedAttrs.ForMarshalling()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsi.UnauthenticatedAttributes = finalUnsignedAttrs\n\n\treturn nil\n}\n\n// AddCertificate adds the certificate to the payload. Useful for parent certificates\nfunc (sd *SignedData) AddCertificate(cert *x509.Certificate) {\n\tsd.certs = append(sd.certs, cert)\n}\n\n// Detach removes content from the signed data struct to make it a detached signature.\n// This must be called right before Finish()\nfunc (sd *SignedData) Detach() {\n\tsd.sd.ContentInfo = contentInfo{ContentType: OIDData}\n}\n\n// GetSignedData returns the private Signed Data\nfunc (sd *SignedData) GetSignedData() *signedData {\n\treturn &sd.sd\n}\n\n// Finish marshals the content and its signers\nfunc (sd *SignedData) Finish() ([]byte, error) {\n\tsd.sd.Certificates = marshalCertificates(sd.certs)\n\tinner, err := asn1.Marshal(sd.sd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\touter := contentInfo{\n\t\tContentType: OIDSignedData,\n\t\tContent:     asn1.RawValue{Class: 2, Tag: 0, Bytes: inner, IsCompound: true},\n\t}\n\treturn asn1.Marshal(outer)\n}\n\n// RemoveAuthenticatedAttributes removes authenticated attributes from signedData\n// similar to OpenSSL's PKCS7_NOATTR or -noattr flags\nfunc (sd *SignedData) RemoveAuthenticatedAttributes() {\n\tfor i := range sd.sd.SignerInfos {\n\t\tsd.sd.SignerInfos[i].AuthenticatedAttributes = nil\n\t}\n}\n\n// RemoveUnauthenticatedAttributes removes unauthenticated attributes from signedData\nfunc (sd *SignedData) RemoveUnauthenticatedAttributes() {\n\tfor i := range sd.sd.SignerInfos {\n\t\tsd.sd.SignerInfos[i].UnauthenticatedAttributes = nil\n\t}\n}\n\n// verifyPartialChain checks that a given cert is issued by the first parent in the list,\n// then continue down the path. It doesn't require the last parent to be a root CA,\n// or to be trusted in any truststore. It simply verifies that the chain provided, albeit\n// partial, makes sense.\nfunc verifyPartialChain(cert *x509.Certificate, parents []*x509.Certificate) error {\n\tif len(parents) == 0 {\n\t\treturn fmt.Errorf(\"pkcs7: zero parents provided to verify the signature of certificate %q\", cert.Subject.CommonName)\n\t}\n\terr := cert.CheckSignatureFrom(parents[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"pkcs7: certificate signature from parent is invalid: %v\", err)\n\t}\n\tif len(parents) == 1 {\n\t\t// there is no more parent to check, return\n\t\treturn nil\n\t}\n\treturn verifyPartialChain(parents[0], parents[1:])\n}\n\nfunc cert2issuerAndSerial(cert *x509.Certificate) (issuerAndSerial, error) {\n\tvar ias issuerAndSerial\n\t// The issuer RDNSequence has to match exactly the sequence in the certificate\n\t// We cannot use cert.Issuer.ToRDNSequence() here since it mangles the sequence\n\tias.IssuerName = asn1.RawValue{FullBytes: cert.RawIssuer}\n\tias.SerialNumber = cert.SerialNumber\n\n\treturn ias, nil\n}\n\n// signs the DER encoded form of the attributes with the private key\nfunc signAttributes(attrs []attribute, pkey crypto.PrivateKey, digestAlg crypto.Hash) ([]byte, error) {\n\tattrBytes, err := marshalAttributes(attrs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\th := digestAlg.New()\n\th.Write(attrBytes)\n\thash := h.Sum(nil)\n\n\t// dsa doesn't implement crypto.Signer so we make a special case\n\t// https://github.com/golang/go/issues/27889\n\tswitch pkey := pkey.(type) {\n\tcase *dsa.PrivateKey:\n\t\tr, s, err := dsa.Sign(rand.Reader, pkey, hash)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn asn1.Marshal(dsaSignature{r, s})\n\t}\n\n\tkey, ok := pkey.(crypto.Signer)\n\tif !ok {\n\t\treturn nil, errors.New(\"pkcs7: private key does not implement crypto.Signer\")\n\t}\n\treturn key.Sign(rand.Reader, hash, digestAlg)\n}\n\ntype dsaSignature struct {\n\tR, S *big.Int\n}\n\n// concats and wraps the certificates in the RawValue structure\nfunc marshalCertificates(certs []*x509.Certificate) rawCertificates {\n\tvar buf bytes.Buffer\n\tfor _, cert := range certs {\n\t\tbuf.Write(cert.Raw)\n\t}\n\trawCerts, _ := marshalCertificateBytes(buf.Bytes())\n\treturn rawCerts\n}\n\n// Even though, the tag & length are stripped out during marshalling the\n// RawContent, we have to encode it into the RawContent. If its missing,\n// then `asn1.Marshal()` will strip out the certificate wrapper instead.\nfunc marshalCertificateBytes(certs []byte) (rawCertificates, error) {\n\tvar val = asn1.RawValue{Bytes: certs, Class: 2, Tag: 0, IsCompound: true}\n\tb, err := asn1.Marshal(val)\n\tif err != nil {\n\t\treturn rawCertificates{}, err\n\t}\n\treturn rawCertificates{Raw: b}, nil\n}\n\n// DegenerateCertificate creates a signed data structure containing only the\n// provided certificate or certificate chain.\nfunc DegenerateCertificate(cert []byte) ([]byte, error) {\n\trawCert, err := marshalCertificateBytes(cert)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\temptyContent := contentInfo{ContentType: OIDData}\n\tsd := signedData{\n\t\tVersion:      1,\n\t\tContentInfo:  emptyContent,\n\t\tCertificates: rawCert,\n\t\tCRLs:         []pkix.CertificateList{},\n\t}\n\tcontent, err := asn1.Marshal(sd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsignedContent := contentInfo{\n\t\tContentType: OIDSignedData,\n\t\tContent:     asn1.RawValue{Class: 2, Tag: 0, Bytes: content, IsCompound: true},\n\t}\n\treturn asn1.Marshal(signedContent)\n}\n"
  },
  {
    "path": "vendor/github.com/smallstep/pkcs7/verify.go",
    "content": "package pkcs7\n\nimport (\n\t\"crypto/subtle\"\n\t\"crypto/x509\"\n\t\"crypto/x509/pkix\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n)\n\n// Verify is a wrapper around VerifyWithChain() that initializes an empty\n// trust store, effectively disabling certificate verification when validating\n// a signature.\nfunc (p7 *PKCS7) Verify() (err error) {\n\treturn p7.VerifyWithChain(nil)\n}\n\n// VerifyWithChain checks the signatures of a PKCS7 object.\n//\n// If truststore is not nil, it also verifies the chain of trust of\n// the end-entity signer cert to one of the roots in the\n// truststore. When the PKCS7 object includes the signing time\n// authenticated attr verifies the chain at that time and UTC now\n// otherwise.\nfunc (p7 *PKCS7) VerifyWithChain(truststore *x509.CertPool) (err error) {\n\tif len(p7.Signers) == 0 {\n\t\treturn errors.New(\"pkcs7: Message has no signers\")\n\t}\n\tfor _, signer := range p7.Signers {\n\t\tif err := verifySignature(p7, signer, truststore); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// VerifyWithChainAtTime checks the signatures of a PKCS7 object.\n//\n// If truststore is not nil, it also verifies the chain of trust of\n// the end-entity signer cert to a root in the truststore at\n// currentTime. It does not use the signing time authenticated\n// attribute.\nfunc (p7 *PKCS7) VerifyWithChainAtTime(truststore *x509.CertPool, currentTime time.Time) (err error) {\n\tif len(p7.Signers) == 0 {\n\t\treturn errors.New(\"pkcs7: Message has no signers\")\n\t}\n\tfor _, signer := range p7.Signers {\n\t\tif err := verifySignatureAtTime(p7, signer, truststore, currentTime); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SigningTimeNotValidError is returned when the signing time attribute\n// falls outside of the signer certificate validity.\ntype SigningTimeNotValidError struct {\n\tSigningTime time.Time\n\tNotBefore   time.Time // NotBefore of signer\n\tNotAfter    time.Time // NotAfter of signer\n}\n\nfunc (e *SigningTimeNotValidError) Error() string {\n\treturn fmt.Sprintf(\"pkcs7: signing time %q is outside of certificate validity %q to %q\",\n\t\te.SigningTime.Format(time.RFC3339),\n\t\te.NotBefore.Format(time.RFC3339),\n\t\te.NotAfter.Format(time.RFC3339))\n}\n\nfunc verifySignatureAtTime(p7 *PKCS7, signer signerInfo, truststore *x509.CertPool, currentTime time.Time) (err error) {\n\tsignedData := p7.Content\n\tee := getCertFromCertsByIssuerAndSerial(p7.Certificates, signer.IssuerAndSerialNumber)\n\tif ee == nil {\n\t\treturn errors.New(\"pkcs7: No certificate for signer\")\n\t}\n\tif len(signer.AuthenticatedAttributes) > 0 {\n\t\t// TODO(fullsailor): First check the content type match\n\t\tvar (\n\t\t\tdigest      []byte\n\t\t\tsigningTime time.Time\n\t\t)\n\t\terr := unmarshalAttribute(signer.AuthenticatedAttributes, OIDAttributeMessageDigest, &digest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thash, err := getHashForOID(signer.DigestAlgorithm.Algorithm)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th := hash.New()\n\t\th.Write(p7.Content)\n\t\tcomputed := h.Sum(nil)\n\t\tif subtle.ConstantTimeCompare(digest, computed) != 1 {\n\t\t\treturn &MessageDigestMismatchError{\n\t\t\t\tExpectedDigest: digest,\n\t\t\t\tActualDigest:   computed,\n\t\t\t}\n\t\t}\n\t\tsignedData, err = marshalAttributes(signer.AuthenticatedAttributes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = unmarshalAttribute(signer.AuthenticatedAttributes, OIDAttributeSigningTime, &signingTime)\n\t\tif err == nil {\n\t\t\t// signing time found, performing validity check\n\t\t\tif signingTime.After(ee.NotAfter) || signingTime.Before(ee.NotBefore) {\n\t\t\t\treturn &SigningTimeNotValidError{\n\t\t\t\t\tSigningTime: signingTime,\n\t\t\t\t\tNotBefore:   ee.NotBefore,\n\t\t\t\t\tNotAfter:    ee.NotAfter,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif truststore != nil {\n\t\t_, err = verifyCertChain(ee, p7.Certificates, truststore, currentTime)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tsigalg, err := getSignatureAlgorithm(signer.DigestEncryptionAlgorithm, signer.DigestAlgorithm)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn ee.CheckSignature(sigalg, signedData, signer.EncryptedDigest)\n}\n\nfunc verifySignature(p7 *PKCS7, signer signerInfo, truststore *x509.CertPool) (err error) {\n\tsignedData := p7.Content\n\tee := getCertFromCertsByIssuerAndSerial(p7.Certificates, signer.IssuerAndSerialNumber)\n\tif ee == nil {\n\t\treturn errors.New(\"pkcs7: No certificate for signer\")\n\t}\n\tsigningTime := time.Now().UTC()\n\tif len(signer.AuthenticatedAttributes) > 0 {\n\t\t// TODO(fullsailor): First check the content type match\n\t\tvar digest []byte\n\t\terr := unmarshalAttribute(signer.AuthenticatedAttributes, OIDAttributeMessageDigest, &digest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thash, err := getHashForOID(signer.DigestAlgorithm.Algorithm)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th := hash.New()\n\t\th.Write(p7.Content)\n\t\tcomputed := h.Sum(nil)\n\t\tif subtle.ConstantTimeCompare(digest, computed) != 1 {\n\t\t\treturn &MessageDigestMismatchError{\n\t\t\t\tExpectedDigest: digest,\n\t\t\t\tActualDigest:   computed,\n\t\t\t}\n\t\t}\n\t\tsignedData, err = marshalAttributes(signer.AuthenticatedAttributes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = unmarshalAttribute(signer.AuthenticatedAttributes, OIDAttributeSigningTime, &signingTime)\n\t\tif err == nil {\n\t\t\t// signing time found, performing validity check\n\t\t\tif signingTime.After(ee.NotAfter) || signingTime.Before(ee.NotBefore) {\n\t\t\t\treturn &SigningTimeNotValidError{\n\t\t\t\t\tSigningTime: signingTime,\n\t\t\t\t\tNotBefore:   ee.NotBefore,\n\t\t\t\t\tNotAfter:    ee.NotAfter,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif truststore != nil {\n\t\t_, err = verifyCertChain(ee, p7.Certificates, truststore, signingTime)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tsigalg, err := getSignatureAlgorithm(signer.DigestEncryptionAlgorithm, signer.DigestAlgorithm)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn ee.CheckSignature(sigalg, signedData, signer.EncryptedDigest)\n}\n\n// GetOnlySigner returns an x509.Certificate for the first signer of the signed\n// data payload. If there are more or less than one signer, nil is returned\nfunc (p7 *PKCS7) GetOnlySigner() *x509.Certificate {\n\tif len(p7.Signers) != 1 {\n\t\treturn nil\n\t}\n\tsigner := p7.Signers[0]\n\treturn getCertFromCertsByIssuerAndSerial(p7.Certificates, signer.IssuerAndSerialNumber)\n}\n\n// UnmarshalSignedAttribute decodes a single attribute from the signer info\nfunc (p7 *PKCS7) UnmarshalSignedAttribute(attributeType asn1.ObjectIdentifier, out interface{}) error {\n\tsd, ok := p7.raw.(signedData)\n\tif !ok {\n\t\treturn errors.New(\"pkcs7: payload is not signedData content\")\n\t}\n\tif len(sd.SignerInfos) < 1 {\n\t\treturn errors.New(\"pkcs7: payload has no signers\")\n\t}\n\tattributes := sd.SignerInfos[0].AuthenticatedAttributes\n\treturn unmarshalAttribute(attributes, attributeType, out)\n}\n\nfunc parseSignedData(data []byte) (*PKCS7, error) {\n\tvar sd signedData\n\tasn1.Unmarshal(data, &sd)\n\tcerts, err := sd.Certificates.Parse()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// fmt.Printf(\"--> Signed Data Version %d\\n\", sd.Version)\n\n\tvar compound asn1.RawValue\n\tvar content unsignedData\n\n\t// The Content.Bytes maybe empty on PKI responses.\n\tif len(sd.ContentInfo.Content.Bytes) > 0 {\n\t\tif _, err := asn1.Unmarshal(sd.ContentInfo.Content.Bytes, &compound); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// Compound octet string\n\tif compound.IsCompound {\n\t\tif compound.Tag == 4 {\n\t\t\tfor len(compound.Bytes) > 0 {\n\t\t\t\tvar cdata asn1.RawValue\n\t\t\t\tif _, err = asn1.Unmarshal(compound.Bytes, &cdata); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tcontent = append(content, cdata.Bytes...)\n\t\t\t\tcompound.Bytes = compound.Bytes[len(cdata.FullBytes):]\n\t\t\t}\n\t\t} else {\n\t\t\tcontent = compound.Bytes\n\t\t}\n\t} else {\n\t\t// assuming this is tag 04\n\t\tcontent = compound.Bytes\n\t}\n\treturn &PKCS7{\n\t\tContent:      content,\n\t\tCertificates: certs,\n\t\tCRLs:         sd.CRLs,\n\t\tSigners:      sd.SignerInfos,\n\t\traw:          sd}, nil\n}\n\n// verifyCertChain takes an end-entity certs, a list of potential intermediates and a\n// truststore, and built all potential chains between the EE and a trusted root.\n//\n// When verifying chains that may have expired, currentTime can be set to a past date\n// to allow the verification to pass. If unset, currentTime is set to the current UTC time.\nfunc verifyCertChain(ee *x509.Certificate, certs []*x509.Certificate, truststore *x509.CertPool, currentTime time.Time) (chains [][]*x509.Certificate, err error) {\n\tintermediates := x509.NewCertPool()\n\tfor _, intermediate := range certs {\n\t\tintermediates.AddCert(intermediate)\n\t}\n\tverifyOptions := x509.VerifyOptions{\n\t\tRoots:         truststore,\n\t\tIntermediates: intermediates,\n\t\tKeyUsages:     []x509.ExtKeyUsage{x509.ExtKeyUsageAny},\n\t\tCurrentTime:   currentTime,\n\t}\n\tchains, err = ee.Verify(verifyOptions)\n\tif err != nil {\n\t\treturn chains, fmt.Errorf(\"pkcs7: failed to verify certificate chain: %v\", err)\n\t}\n\treturn\n}\n\n// MessageDigestMismatchError is returned when the signer data digest does not\n// match the computed digest for the contained content\ntype MessageDigestMismatchError struct {\n\tExpectedDigest []byte\n\tActualDigest   []byte\n}\n\nfunc (err *MessageDigestMismatchError) Error() string {\n\treturn fmt.Sprintf(\"pkcs7: Message digest mismatch\\n\\tExpected: %X\\n\\tActual  : %X\", err.ExpectedDigest, err.ActualDigest)\n}\n\nfunc getSignatureAlgorithm(digestEncryption, digest pkix.AlgorithmIdentifier) (x509.SignatureAlgorithm, error) {\n\tswitch {\n\tcase digestEncryption.Algorithm.Equal(OIDDigestAlgorithmECDSASHA1):\n\t\treturn x509.ECDSAWithSHA1, nil\n\tcase digestEncryption.Algorithm.Equal(OIDDigestAlgorithmECDSASHA256):\n\t\treturn x509.ECDSAWithSHA256, nil\n\tcase digestEncryption.Algorithm.Equal(OIDDigestAlgorithmECDSASHA384):\n\t\treturn x509.ECDSAWithSHA384, nil\n\tcase digestEncryption.Algorithm.Equal(OIDDigestAlgorithmECDSASHA512):\n\t\treturn x509.ECDSAWithSHA512, nil\n\tcase digestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmRSA),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA1),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA256),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA384),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA512):\n\t\tswitch {\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA1), digest.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA1):\n\t\t\treturn x509.SHA1WithRSA, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA256), digest.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA256):\n\t\t\treturn x509.SHA256WithRSA, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA384), digest.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA384):\n\t\t\treturn x509.SHA384WithRSA, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA512), digest.Algorithm.Equal(OIDEncryptionAlgorithmRSASHA512):\n\t\t\treturn x509.SHA512WithRSA, nil\n\t\tdefault:\n\t\t\treturn -1, fmt.Errorf(\"pkcs7: unsupported digest %q for encryption algorithm %q\",\n\t\t\t\tdigest.Algorithm.String(), digestEncryption.Algorithm.String())\n\t\t}\n\tcase digestEncryption.Algorithm.Equal(OIDDigestAlgorithmDSA),\n\t\tdigestEncryption.Algorithm.Equal(OIDDigestAlgorithmDSASHA1):\n\t\tswitch {\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA1):\n\t\t\treturn x509.DSAWithSHA1, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA256):\n\t\t\treturn x509.DSAWithSHA256, nil\n\t\tdefault:\n\t\t\treturn -1, fmt.Errorf(\"pkcs7: unsupported digest %q for encryption algorithm %q\",\n\t\t\t\tdigest.Algorithm.String(), digestEncryption.Algorithm.String())\n\t\t}\n\tcase digestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmECDSAP256),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmECDSAP384),\n\t\tdigestEncryption.Algorithm.Equal(OIDEncryptionAlgorithmECDSAP521):\n\t\tswitch {\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA1):\n\t\t\treturn x509.ECDSAWithSHA1, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA256):\n\t\t\treturn x509.ECDSAWithSHA256, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA384):\n\t\t\treturn x509.ECDSAWithSHA384, nil\n\t\tcase digest.Algorithm.Equal(OIDDigestAlgorithmSHA512):\n\t\t\treturn x509.ECDSAWithSHA512, nil\n\t\tdefault:\n\t\t\treturn -1, fmt.Errorf(\"pkcs7: unsupported digest %q for encryption algorithm %q\",\n\t\t\t\tdigest.Algorithm.String(), digestEncryption.Algorithm.String())\n\t\t}\n\tdefault:\n\t\treturn -1, fmt.Errorf(\"pkcs7: unsupported algorithm %q\",\n\t\t\tdigestEncryption.Algorithm.String())\n\t}\n}\n\nfunc getCertFromCertsByIssuerAndSerial(certs []*x509.Certificate, ias issuerAndSerial) *x509.Certificate {\n\tfor _, cert := range certs {\n\t\tif isCertMatchForIssuerAndSerial(cert, ias) {\n\t\t\treturn cert\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc unmarshalAttribute(attrs []attribute, attributeType asn1.ObjectIdentifier, out interface{}) error {\n\tfor _, attr := range attrs {\n\t\tif attr.Type.Equal(attributeType) {\n\t\t\t_, err := asn1.Unmarshal(attr.Value.Bytes, out)\n\t\t\treturn err\n\t\t}\n\t}\n\treturn errors.New(\"pkcs7: attribute type not in attributes\")\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/.gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore\n# swap\n[._]*.s[a-w][a-z]\n[._]s[a-w][a-z]\n# session\nSession.vim\n# temporary\n.netrwhist\n*~\n# auto-generated tag files\ntags\n\n*.exe\ncobra.test\nbin\n\n.idea/\n*.iml\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/.golangci.yml",
    "content": "# Copyright 2013-2023 The Cobra Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nversion: \"2\"\n\nrun:\n  timeout: 5m\n\nformatters:\n  enable:\n    - gofmt\n    - goimports\n\nlinters:\n  default: none\n  enable:\n    #- bodyclose\n    #- depguard\n    #- dogsled\n    #- dupl\n    - errcheck\n    #- exhaustive\n    #- funlen\n    #- gochecknoinits\n    - goconst\n    - gocritic\n    #- gocyclo\n    #- goprintffuncname\n    - gosec\n    - govet\n    - ineffassign\n    #- lll\n    - misspell\n    #- mnd\n    #- nakedret\n    #- noctx\n    - nolintlint\n    #- rowserrcheck\n    - staticcheck\n    - unconvert\n    #- unparam\n    - unused\n    #- whitespace\n  exclusions:\n    presets:\n      - common-false-positives\n      - legacy\n      - std-error-handling\n  settings:\n    govet:\n      # Disable buildtag check to allow dual build tag syntax (both //go:build and // +build).\n      # This is necessary for Go 1.15 compatibility since //go:build was introduced in Go 1.17.\n      # This can be removed once Cobra requires Go 1.17 or higher.\n      disable:\n        - buildtag\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/.mailmap",
    "content": "Steve Francia <steve.francia@gmail.com>\nBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>\nFabiano Franz <ffranz@redhat.com>                   <contact@fabianofranz.com>\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/CONDUCT.md",
    "content": "## Cobra User Contract\n\n### Versioning\nCobra will follow a steady release cadence. Non breaking changes will be released as minor versions quarterly. Patch bug releases are at the discretion of the maintainers. Users can expect security patch fixes to be released within relatively short order of a CVE becoming known. For more information on security patch fixes see the CVE section below. Releases will follow [Semantic Versioning](https://semver.org/). Users tracking the Master branch should expect unpredictable breaking changes as the project continues to move forward. For stability, it is highly recommended to use a release.\n\n### Backward Compatibility\nWe will maintain two major releases in a moving window. The N-1 release will only receive bug fixes and security updates and will be dropped once N+1 is released.\n\n### Deprecation\nDeprecation of Go versions or dependent packages will only occur in major releases. To reduce the change of this taking users by surprise, any large deprecation will be preceded by an announcement in the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) and an Issue on Github.\n\n### CVE\nMaintainers will make every effort to release security patches in the case of a medium to high severity CVE directly impacting the library. The speed in which these patches reach a release is up to the discretion of the maintainers. A low severity CVE may be a lower priority than a high severity one.\n\n### Communication\nCobra maintainers will use GitHub issues and the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) as the primary means of communication with the community. This is to foster open communication with all users and contributors.\n\n### Breaking Changes\nBreaking changes are generally allowed in the master branch, as this is the branch used to develop the next release of Cobra.\n\nThere may be times, however, when master is closed for breaking changes. This is likely to happen as we near the release of a new version.\n\nBreaking changes are not allowed in release branches, as these represent minor versions that have already been released. These version have consumers who expect the APIs, behaviors, etc, to remain stable during the lifetime of the patch stream for the minor release.\n\nExamples of breaking changes include:\n- Removing or renaming exported constant, variable, type, or function.\n- Updating the version of critical libraries such as `spf13/pflag`, `spf13/viper` etc...\n  - Some version updates may be acceptable for picking up bug fixes, but maintainers must exercise caution when reviewing.\n\nThere may, at times, need to be exceptions where breaking changes are allowed in release branches. These are at the discretion of the project's maintainers, and must be carefully considered before merging.\n\n### CI Testing\nMaintainers will ensure the Cobra test suite utilizes the current supported versions of Golang.\n\n### Disclaimer\nChanges to this document and the contents therein are at the discretion of the maintainers.\nNone of the contents of this document are legally binding in any way to the maintainers or the users.\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/CONTRIBUTING.md",
    "content": "# Contributing to Cobra\n\nThank you so much for contributing to Cobra. We appreciate your time and help.\nHere are some guidelines to help you get started.\n\n## Code of Conduct\n\nBe kind and respectful to the members of the community. Take time to educate\nothers who are seeking help. Harassment of any kind will not be tolerated.\n\n## Questions\n\nIf you have questions regarding Cobra, feel free to ask it in the community\n[#cobra Slack channel][cobra-slack]\n\n## Filing a bug or feature\n\n1. Before filing an issue, please check the existing issues to see if a\n   similar one was already opened. If there is one already opened, feel free\n   to comment on it.\n1. If you believe you've found a bug, please provide detailed steps of\n   reproduction, the version of Cobra and anything else you believe will be\n   useful to help troubleshoot it (e.g. OS environment, environment variables,\n   etc...). Also state the current behavior vs. the expected behavior.\n1. If you'd like to see a feature or an enhancement please open an issue with\n   a clear title and description of what the feature is and why it would be\n   beneficial to the project and its users.\n\n## Submitting changes\n\n1. CLA: Upon submitting a Pull Request (PR), contributors will be prompted to\n   sign a CLA. Please sign the CLA :slightly_smiling_face:\n1. Tests: If you are submitting code, please ensure you have adequate tests\n   for the feature. Tests can be run via `go test ./...` or `make test`.\n1. Since this is golang project, ensure the new code is properly formatted to\n   ensure code consistency. Run `make all`.\n\n### Quick steps to contribute\n\n1. Fork the project.\n1. Download your fork to your PC (`git clone https://github.com/your_username/cobra && cd cobra`)\n1. Create your feature branch (`git checkout -b my-new-feature`)\n1. Make changes and run tests (`make test`)\n1. Add them to staging (`git add .`)\n1. Commit your changes (`git commit -m 'Add some feature'`)\n1. Push to the branch (`git push origin my-new-feature`)\n1. Create new pull request\n\n<!-- Links -->\n[cobra-slack]: https://gophers.slack.com/archives/CD3LP1199\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/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"
  },
  {
    "path": "vendor/github.com/spf13/cobra/MAINTAINERS",
    "content": "maintainers:\n- spf13\n- johnSchnake\n- jpmcb\n- marckhouzam\ninactive:\n- anthonyfok\n- bep\n- bogem\n- broady\n- eparis\n- jharshman\n- wfernandes\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/Makefile",
    "content": "BIN=\"./bin\"\nSRC=$(shell find . -name \"*.go\")\n\nifeq (, $(shell which golangci-lint))\n$(warning \"could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh\")\nendif\n\n.PHONY: fmt lint test install_deps clean\n\ndefault: all\n\nall: fmt test\n\nfmt:\n\t$(info ******************** checking formatting ********************)\n\t@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)\n\nlint:\n\t$(info ******************** running lint tools ********************)\n\tgolangci-lint run -v\n\ntest: install_deps\n\t$(info ******************** running tests ********************)\n\tgo test -v ./...\n\nrichtest: install_deps\n\t$(info ******************** running tests with kyoh86/richgo ********************)\n\trichgo test -v ./...\n\ninstall_deps:\n\t$(info ******************** downloading dependencies ********************)\n\tgo get -v ./...\n\nclean:\n\trm -rf $(BIN)\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/README.md",
    "content": "<div align=\"center\">\n<a href=\"https://cobra.dev\">\n<img width=\"512\" height=\"535\" alt=\"cobra-logo\" src=\"https://github.com/user-attachments/assets/c8bf9aad-b5ae-41d3-8899-d83baec10af8\" />\n</a>\n</div>\n\nCobra is a library for creating powerful modern CLI applications.\n\n<a href=\"https://cobra.dev\">Visit Cobra.dev for extensive documentation</a> \n\n\nCobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/),\n[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to\nname a few. [This list](site/content/projects_using_cobra.md) contains a more extensive list of projects using Cobra.\n\n[![](https://img.shields.io/github/actions/workflow/status/spf13/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest)\n[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra)\n[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra)\n[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199)\n<hr>\n<div align=\"center\" markdown=\"1\">\n   <sup>Supported by:</sup>\n   <br>\n   <br>\n   <a href=\"https://www.warp.dev/cobra\">\n      <img alt=\"Warp sponsorship\" width=\"400\" src=\"https://github.com/user-attachments/assets/ab8dd143-b0fd-4904-bdc5-dd7ecac94eae\">\n   </a>\n\n### [Warp, the AI terminal for devs](https://www.warp.dev/cobra)\n[Try Cobra in Warp today](https://www.warp.dev/cobra)<br>\n\n</div>\n<hr>\n\n# Overview\n\nCobra is a library providing a simple interface to create powerful modern CLI\ninterfaces similar to git & go tools.\n\nCobra provides:\n* Easy subcommand-based CLIs: `app server`, `app fetch`, etc.\n* Fully POSIX-compliant flags (including short & long versions)\n* Nested subcommands\n* Global, local and cascading flags\n* Intelligent suggestions (`app srver`... did you mean `app server`?)\n* Automatic help generation for commands and flags\n* Grouping help for subcommands\n* Automatic help flag recognition of `-h`, `--help`, etc.\n* Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell)\n* Automatically generated man pages for your application\n* Command aliases so you can change things without breaking them\n* The flexibility to define your own help, usage, etc.\n* Optional seamless integration with [viper](https://github.com/spf13/viper) for 12-factor apps\n\n# Concepts\n\nCobra is built on a structure of commands, arguments & flags.\n\n**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions.\n\nThe best applications read like sentences when used, and as a result, users\nintuitively know how to interact with them.\n\nThe pattern to follow is\n`APPNAME VERB NOUN --ADJECTIVE`\n    or\n`APPNAME COMMAND ARG --FLAG`.\n\nA few good real world examples may better illustrate this point.\n\nIn the following example, 'server' is a command, and 'port' is a flag:\n\n    hugo server --port=1313\n\nIn this command we are telling Git to clone the url bare.\n\n    git clone URL --bare\n\n## Commands\n\nCommand is the central point of the application. Each interaction that\nthe application supports will be contained in a Command. A command can\nhave children commands and optionally run an action.\n\nIn the example above, 'server' is the command.\n\n[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command)\n\n## Flags\n\nA flag is a way to modify the behavior of a command. Cobra supports\nfully POSIX-compliant flags as well as the Go [flag package](https://golang.org/pkg/flag/).\nA Cobra command can define flags that persist through to children commands\nand flags that are only available to that command.\n\nIn the example above, 'port' is the flag.\n\nFlag functionality is provided by the [pflag\nlibrary](https://github.com/spf13/pflag), a fork of the flag standard library\nwhich maintains the same interface while adding POSIX compliance.\n\n# Installing\nUsing Cobra is easy. First, use `go get` to install the latest version\nof the library.\n\n```\ngo get -u github.com/spf13/cobra@latest\n```\n\nNext, include Cobra in your application:\n\n```go\nimport \"github.com/spf13/cobra\"\n```\n\n# Usage\n`cobra-cli` is a command line program to generate cobra applications and command files.\nIt will bootstrap your application scaffolding to rapidly\ndevelop a Cobra-based application. It is the easiest way to incorporate Cobra into your application.\n\nIt can be installed by running:\n\n```\ngo install github.com/spf13/cobra-cli@latest\n```\n\nFor complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md)\n\nFor complete details on using the Cobra library, please read [The Cobra User Guide](site/content/user_guide.md).\n\n# License\n\nCobra is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt)\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/SECURITY.md",
    "content": "# Security Policy\n\n## Reporting a Vulnerability\n\nThe `cobra` maintainers take security issues seriously and\nwe appreciate your efforts to _**responsibly**_ disclose your findings.\nWe will make every effort to swiftly respond and address concerns.\n\nTo report a security vulnerability:\n\n1. **DO NOT** create a public GitHub issue for the vulnerability!\n2. **DO NOT** create a public GitHub Pull Request with a fix for the vulnerability!\n3. Send an email to `cobra-security@googlegroups.com`.\n4. Include the following details in your report:\n   - Description of the vulnerability\n   - Steps to reproduce\n   - Potential impact of the vulnerability (to your downstream project, to the Go ecosystem, etc.)\n   - Any potential mitigations you've already identified\n5. Allow up to 7 days for an initial response.\n   You should receive an acknowledgment of your report and an estimated timeline for a fix.\n6. (Optional) If you have a fix and would like to contribute your patch, please work\n   directly with the maintainers via `cobra-security@googlegroups.com` to\n   coordinate pushing the patch to GitHub, cutting a new release, and disclosing the change.\n\n## Response Process\n\nWhen a security vulnerability report is received, the `cobra` maintainers will:\n\n1. Confirm receipt of the vulnerability report within 7 days.\n2. Assess the report to determine if it constitutes a security vulnerability.\n3. If confirmed, assign the vulnerability a severity level and create a timeline for addressing it.\n4. Develop and test a fix.\n5. Patch the vulnerability and make a new GitHub release: the maintainers will coordinate disclosure with the reporter.\n6. Create a new GitHub Security Advisory to inform the broader Go ecosystem\n\n## Disclosure Policy\n\nThe `cobra` maintainers follow a coordinated disclosure process:\n\n1. Security vulnerabilities will be addressed as quickly as possible.\n2. A CVE (Common Vulnerabilities and Exposures) identifier will be requested for significant vulnerabilities\n   that are within `cobra` itself.\n3. Once a fix is ready, the maintainers will:\n   - Release a new version containing the fix.\n   - Update the security advisory with details about the vulnerability.\n   - Credit the reporter (unless they wish to remain anonymous).\n   - Credit the fixer (unless they wish to remain anonymous, this may be the same as the reporter).\n   - Announce the vulnerability through appropriate channels\n     (GitHub Security Advisory, mailing lists, GitHub Releases, etc.)\n\n## Supported Versions\n\nSecurity fixes will typically only be released for the most recent major release.\n\n## Upstream Security Issues\n\n`cobra` generally will not accept vulnerability reports that originate in upstream\ndependencies. I.e., if there is a problem in Go code that `cobra` depends on,\nit is best to engage that project's maintainers and owners.\n\nThis security policy primarily pertains only to `cobra` itself but if you believe you've\nidentified a problem that originates in an upstream dependency and is being widely\ndistributed by `cobra`, please follow the disclosure procedure above: the `cobra`\nmaintainers will work with you to determine the severity and ecosystem impact.\n\n## Security Updates and CVEs\n\nInformation about known security vulnerabilities and CVEs affecting `cobra` will\nbe published as GitHub Security Advisories at\nhttps://github.com/spf13/cobra/security/advisories.\n\nAll users are encouraged to watch the repository and upgrade promptly when\nsecurity releases are published.\n\n## `cobra` Security Best Practices for Users\n\nWhen using `cobra` in your CLIs, the `cobra` maintainers recommend the following:\n\n1. Always use the latest version of `cobra`.\n2. [Use Go modules](https://go.dev/blog/using-go-modules) for dependency management.\n3. Always use the latest possible version of Go.\n\n## Security Best Practices for Contributors\n\nWhen contributing to `cobra`:\n\n1. Be mindful of security implications when adding new features or modifying existing ones.\n2. Be aware of `cobra`'s extremely large reach: it is used in nearly every Go CLI\n   (like Kubernetes, Docker, Prometheus, etc. etc.)\n3. Write tests that explicitly cover edge cases and potential issues.\n4. If you discover a security issue while working on `cobra`, please report it\n   following the process above rather than opening a public pull request or issue that\n   addresses the vulnerability.\n5. Take personal sec-ops seriously and secure your GitHub account: use [two-factor authentication](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa),\n   [sign your commits with a GPG or SSH key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification),\n   etc.\n\n## Acknowledgments\n\nThe `cobra` maintainers would like to thank all security researchers and\ncommunity members who help keep cobra, its users, and the entire Go ecosystem secure through responsible disclosures!!\n\n---\n\n*This security policy is inspired by the [Open Web Application Security Project (OWASP)](https://owasp.org/) guidelines and security best practices.*\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/active_help.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nconst (\n\tactiveHelpMarker = \"_activeHelp_ \"\n\t// The below values should not be changed: programs will be using them explicitly\n\t// in their user documentation, and users will be using them explicitly.\n\tactiveHelpEnvVarSuffix  = \"ACTIVE_HELP\"\n\tactiveHelpGlobalEnvVar  = configEnvVarGlobalPrefix + \"_\" + activeHelpEnvVarSuffix\n\tactiveHelpGlobalDisable = \"0\"\n)\n\n// AppendActiveHelp adds the specified string to the specified array to be used as ActiveHelp.\n// Such strings will be processed by the completion script and will be shown as ActiveHelp\n// to the user.\n// The array parameter should be the array that will contain the completions.\n// This function can be called multiple times before and/or after completions are added to\n// the array.  Each time this function is called with the same array, the new\n// ActiveHelp line will be shown below the previous ones when completion is triggered.\nfunc AppendActiveHelp(compArray []Completion, activeHelpStr string) []Completion {\n\treturn append(compArray, fmt.Sprintf(\"%s%s\", activeHelpMarker, activeHelpStr))\n}\n\n// GetActiveHelpConfig returns the value of the ActiveHelp environment variable\n// <PROGRAM>_ACTIVE_HELP where <PROGRAM> is the name of the root command in upper\n// case, with all non-ASCII-alphanumeric characters replaced by `_`.\n// It will always return \"0\" if the global environment variable COBRA_ACTIVE_HELP\n// is set to \"0\".\nfunc GetActiveHelpConfig(cmd *Command) string {\n\tactiveHelpCfg := os.Getenv(activeHelpGlobalEnvVar)\n\tif activeHelpCfg != activeHelpGlobalDisable {\n\t\tactiveHelpCfg = os.Getenv(activeHelpEnvVar(cmd.Root().Name()))\n\t}\n\treturn activeHelpCfg\n}\n\n// activeHelpEnvVar returns the name of the program-specific ActiveHelp environment\n// variable.  It has the format <PROGRAM>_ACTIVE_HELP where <PROGRAM> is the name of the\n// root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`.\nfunc activeHelpEnvVar(name string) string {\n\treturn configEnvVar(name, activeHelpEnvVarSuffix)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/args.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype PositionalArgs func(cmd *Command, args []string) error\n\n// legacyArgs validation has the following behaviour:\n// - root commands with no subcommands can take arbitrary arguments\n// - root commands with subcommands will do subcommand validity checking\n// - subcommands will always accept arbitrary arguments\nfunc legacyArgs(cmd *Command, args []string) error {\n\t// no subcommand, always take args\n\tif !cmd.HasSubCommands() {\n\t\treturn nil\n\t}\n\n\t// root command with subcommands, do subcommand checking.\n\tif !cmd.HasParent() && len(args) > 0 {\n\t\treturn fmt.Errorf(\"unknown command %q for %q%s\", args[0], cmd.CommandPath(), cmd.findSuggestions(args[0]))\n\t}\n\treturn nil\n}\n\n// NoArgs returns an error if any args are included.\nfunc NoArgs(cmd *Command, args []string) error {\n\tif len(args) > 0 {\n\t\treturn fmt.Errorf(\"unknown command %q for %q\", args[0], cmd.CommandPath())\n\t}\n\treturn nil\n}\n\n// OnlyValidArgs returns an error if there are any positional args that are not in\n// the `ValidArgs` field of `Command`\nfunc OnlyValidArgs(cmd *Command, args []string) error {\n\tif len(cmd.ValidArgs) > 0 {\n\t\t// Remove any description that may be included in ValidArgs.\n\t\t// A description is following a tab character.\n\t\tvalidArgs := make([]string, 0, len(cmd.ValidArgs))\n\t\tfor _, v := range cmd.ValidArgs {\n\t\t\tvalidArgs = append(validArgs, strings.SplitN(v, \"\\t\", 2)[0])\n\t\t}\n\t\tfor _, v := range args {\n\t\t\tif !stringInSlice(v, validArgs) {\n\t\t\t\treturn fmt.Errorf(\"invalid argument %q for %q%s\", v, cmd.CommandPath(), cmd.findSuggestions(args[0]))\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// ArbitraryArgs never returns an error.\nfunc ArbitraryArgs(cmd *Command, args []string) error {\n\treturn nil\n}\n\n// MinimumNArgs returns an error if there is not at least N args.\nfunc MinimumNArgs(n int) PositionalArgs {\n\treturn func(cmd *Command, args []string) error {\n\t\tif len(args) < n {\n\t\t\treturn fmt.Errorf(\"requires at least %d arg(s), only received %d\", n, len(args))\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// MaximumNArgs returns an error if there are more than N args.\nfunc MaximumNArgs(n int) PositionalArgs {\n\treturn func(cmd *Command, args []string) error {\n\t\tif len(args) > n {\n\t\t\treturn fmt.Errorf(\"accepts at most %d arg(s), received %d\", n, len(args))\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// ExactArgs returns an error if there are not exactly n args.\nfunc ExactArgs(n int) PositionalArgs {\n\treturn func(cmd *Command, args []string) error {\n\t\tif len(args) != n {\n\t\t\treturn fmt.Errorf(\"accepts %d arg(s), received %d\", n, len(args))\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// RangeArgs returns an error if the number of args is not within the expected range.\nfunc RangeArgs(min int, max int) PositionalArgs {\n\treturn func(cmd *Command, args []string) error {\n\t\tif len(args) < min || len(args) > max {\n\t\t\treturn fmt.Errorf(\"accepts between %d and %d arg(s), received %d\", min, max, len(args))\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// MatchAll allows combining several PositionalArgs to work in concert.\nfunc MatchAll(pargs ...PositionalArgs) PositionalArgs {\n\treturn func(cmd *Command, args []string) error {\n\t\tfor _, parg := range pargs {\n\t\t\tif err := parg(cmd, args); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// ExactValidArgs returns an error if there are not exactly N positional args OR\n// there are any positional args that are not in the `ValidArgs` field of `Command`\n//\n// Deprecated: use MatchAll(ExactArgs(n), OnlyValidArgs) instead\nfunc ExactValidArgs(n int) PositionalArgs {\n\treturn MatchAll(ExactArgs(n), OnlyValidArgs)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/bash_completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/spf13/pflag\"\n)\n\n// Annotations for Bash completion.\nconst (\n\tBashCompFilenameExt     = \"cobra_annotation_bash_completion_filename_extensions\"\n\tBashCompCustom          = \"cobra_annotation_bash_completion_custom\"\n\tBashCompOneRequiredFlag = \"cobra_annotation_bash_completion_one_required_flag\"\n\tBashCompSubdirsInDir    = \"cobra_annotation_bash_completion_subdirs_in_dir\"\n)\n\nfunc writePreamble(buf io.StringWriter, name string) {\n\tWriteStringAndCheck(buf, fmt.Sprintf(\"# bash completion for %-36s -*- shell-script -*-\\n\", name))\n\tWriteStringAndCheck(buf, fmt.Sprintf(`\n__%[1]s_debug()\n{\n    if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then\n        echo \"$*\" >> \"${BASH_COMP_DEBUG_FILE}\"\n    fi\n}\n\n# Homebrew on Macs have version 1.3 of bash-completion which doesn't include\n# _init_completion. This is a very minimal version of that function.\n__%[1]s_init_completion()\n{\n    COMPREPLY=()\n    _get_comp_words_by_ref \"$@\" cur prev words cword\n}\n\n__%[1]s_index_of_word()\n{\n    local w word=$1\n    shift\n    index=0\n    for w in \"$@\"; do\n        [[ $w = \"$word\" ]] && return\n        index=$((index+1))\n    done\n    index=-1\n}\n\n__%[1]s_contains_word()\n{\n    local w word=$1; shift\n    for w in \"$@\"; do\n        [[ $w = \"$word\" ]] && return\n    done\n    return 1\n}\n\n__%[1]s_handle_go_custom_completion()\n{\n    __%[1]s_debug \"${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}\"\n\n    local shellCompDirectiveError=%[3]d\n    local shellCompDirectiveNoSpace=%[4]d\n    local shellCompDirectiveNoFileComp=%[5]d\n    local shellCompDirectiveFilterFileExt=%[6]d\n    local shellCompDirectiveFilterDirs=%[7]d\n\n    local out requestComp lastParam lastChar comp directive args\n\n    # Prepare the command to request completions for the program.\n    # Calling ${words[0]} instead of directly %[1]s allows handling aliases\n    args=(\"${words[@]:1}\")\n    # Disable ActiveHelp which is not supported for bash completion v1\n    requestComp=\"%[8]s=0 ${words[0]} %[2]s ${args[*]}\"\n\n    lastParam=${words[$((${#words[@]}-1))]}\n    lastChar=${lastParam:$((${#lastParam}-1)):1}\n    __%[1]s_debug \"${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}\"\n\n    if [ -z \"${cur}\" ] && [ \"${lastChar}\" != \"=\" ]; then\n        # If the last parameter is complete (there is a space following it)\n        # We add an extra empty parameter so we can indicate this to the go method.\n        __%[1]s_debug \"${FUNCNAME[0]}: Adding extra empty parameter\"\n        requestComp=\"${requestComp} \\\"\\\"\"\n    fi\n\n    __%[1]s_debug \"${FUNCNAME[0]}: calling ${requestComp}\"\n    # Use eval to handle any environment variables and such\n    out=$(eval \"${requestComp}\" 2>/dev/null)\n\n    # Extract the directive integer at the very end of the output following a colon (:)\n    directive=${out##*:}\n    # Remove the directive\n    out=${out%%:*}\n    if [ \"${directive}\" = \"${out}\" ]; then\n        # There is not directive specified\n        directive=0\n    fi\n    __%[1]s_debug \"${FUNCNAME[0]}: the completion directive is: ${directive}\"\n    __%[1]s_debug \"${FUNCNAME[0]}: the completions are: ${out}\"\n\n    if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then\n        # Error code.  No completion.\n        __%[1]s_debug \"${FUNCNAME[0]}: received error from custom completion go code\"\n        return\n    else\n        if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then\n            if [[ $(type -t compopt) = \"builtin\" ]]; then\n                __%[1]s_debug \"${FUNCNAME[0]}: activating no space\"\n                compopt -o nospace\n            fi\n        fi\n        if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then\n            if [[ $(type -t compopt) = \"builtin\" ]]; then\n                __%[1]s_debug \"${FUNCNAME[0]}: activating no file completion\"\n                compopt +o default\n            fi\n        fi\n    fi\n\n    if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then\n        # File extension filtering\n        local fullFilter filter filteringCmd\n        # Do not use quotes around the $out variable or else newline\n        # characters will be kept.\n        for filter in ${out}; do\n            fullFilter+=\"$filter|\"\n        done\n\n        filteringCmd=\"_filedir $fullFilter\"\n        __%[1]s_debug \"File filtering command: $filteringCmd\"\n        $filteringCmd\n    elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then\n        # File completion for directories only\n        local subdir\n        # Use printf to strip any trailing newline\n        subdir=$(printf \"%%s\" \"${out}\")\n        if [ -n \"$subdir\" ]; then\n            __%[1]s_debug \"Listing directories in $subdir\"\n            __%[1]s_handle_subdirs_in_dir_flag \"$subdir\"\n        else\n            __%[1]s_debug \"Listing directories in .\"\n            _filedir -d\n        fi\n    else\n        while IFS='' read -r comp; do\n            COMPREPLY+=(\"$comp\")\n        done < <(compgen -W \"${out}\" -- \"$cur\")\n    fi\n}\n\n__%[1]s_handle_reply()\n{\n    __%[1]s_debug \"${FUNCNAME[0]}\"\n    local comp\n    case $cur in\n        -*)\n            if [[ $(type -t compopt) = \"builtin\" ]]; then\n                compopt -o nospace\n            fi\n            local allflags\n            if [ ${#must_have_one_flag[@]} -ne 0 ]; then\n                allflags=(\"${must_have_one_flag[@]}\")\n            else\n                allflags=(\"${flags[*]} ${two_word_flags[*]}\")\n            fi\n            while IFS='' read -r comp; do\n                COMPREPLY+=(\"$comp\")\n            done < <(compgen -W \"${allflags[*]}\" -- \"$cur\")\n            if [[ $(type -t compopt) = \"builtin\" ]]; then\n                [[ \"${COMPREPLY[0]}\" == *= ]] || compopt +o nospace\n            fi\n\n            # complete after --flag=abc\n            if [[ $cur == *=* ]]; then\n                if [[ $(type -t compopt) = \"builtin\" ]]; then\n                    compopt +o nospace\n                fi\n\n                local index flag\n                flag=\"${cur%%=*}\"\n                __%[1]s_index_of_word \"${flag}\" \"${flags_with_completion[@]}\"\n                COMPREPLY=()\n                if [[ ${index} -ge 0 ]]; then\n                    PREFIX=\"\"\n                    cur=\"${cur#*=}\"\n                    ${flags_completion[${index}]}\n                    if [ -n \"${ZSH_VERSION:-}\" ]; then\n                        # zsh completion needs --flag= prefix\n                        eval \"COMPREPLY=( \\\"\\${COMPREPLY[@]/#/${flag}=}\\\" )\"\n                    fi\n                fi\n            fi\n\n            if [[ -z \"${flag_parsing_disabled}\" ]]; then\n                # If flag parsing is enabled, we have completed the flags and can return.\n                # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough\n                # to possibly call handle_go_custom_completion.\n                return 0;\n            fi\n            ;;\n    esac\n\n    # check if we are handling a flag with special work handling\n    local index\n    __%[1]s_index_of_word \"${prev}\" \"${flags_with_completion[@]}\"\n    if [[ ${index} -ge 0 ]]; then\n        ${flags_completion[${index}]}\n        return\n    fi\n\n    # we are parsing a flag and don't have a special handler, no completion\n    if [[ ${cur} != \"${words[cword]}\" ]]; then\n        return\n    fi\n\n    local completions\n    completions=(\"${commands[@]}\")\n    if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then\n        completions+=(\"${must_have_one_noun[@]}\")\n    elif [[ -n \"${has_completion_function}\" ]]; then\n        # if a go completion function is provided, defer to that function\n        __%[1]s_handle_go_custom_completion\n    fi\n    if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then\n        completions+=(\"${must_have_one_flag[@]}\")\n    fi\n    while IFS='' read -r comp; do\n        COMPREPLY+=(\"$comp\")\n    done < <(compgen -W \"${completions[*]}\" -- \"$cur\")\n\n    if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then\n        while IFS='' read -r comp; do\n            COMPREPLY+=(\"$comp\")\n        done < <(compgen -W \"${noun_aliases[*]}\" -- \"$cur\")\n    fi\n\n    if [[ ${#COMPREPLY[@]} -eq 0 ]]; then\n        if declare -F __%[1]s_custom_func >/dev/null; then\n            # try command name qualified custom func\n            __%[1]s_custom_func\n        else\n            # otherwise fall back to unqualified for compatibility\n            declare -F __custom_func >/dev/null && __custom_func\n        fi\n    fi\n\n    # available in bash-completion >= 2, not always present on macOS\n    if declare -F __ltrim_colon_completions >/dev/null; then\n        __ltrim_colon_completions \"$cur\"\n    fi\n\n    # If there is only 1 completion and it is a flag with an = it will be completed\n    # but we don't want a space after the =\n    if [[ \"${#COMPREPLY[@]}\" -eq \"1\" ]] && [[ $(type -t compopt) = \"builtin\" ]] && [[ \"${COMPREPLY[0]}\" == --*= ]]; then\n       compopt -o nospace\n    fi\n}\n\n# The arguments should be in the form \"ext1|ext2|extn\"\n__%[1]s_handle_filename_extension_flag()\n{\n    local ext=\"$1\"\n    _filedir \"@(${ext})\"\n}\n\n__%[1]s_handle_subdirs_in_dir_flag()\n{\n    local dir=\"$1\"\n    pushd \"${dir}\" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return\n}\n\n__%[1]s_handle_flag()\n{\n    __%[1]s_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n    # if a command required a flag, and we found it, unset must_have_one_flag()\n    local flagname=${words[c]}\n    local flagvalue=\"\"\n    # if the word contained an =\n    if [[ ${words[c]} == *\"=\"* ]]; then\n        flagvalue=${flagname#*=} # take in as flagvalue after the =\n        flagname=${flagname%%=*} # strip everything after the =\n        flagname=\"${flagname}=\" # but put the = back\n    fi\n    __%[1]s_debug \"${FUNCNAME[0]}: looking for ${flagname}\"\n    if __%[1]s_contains_word \"${flagname}\" \"${must_have_one_flag[@]}\"; then\n        must_have_one_flag=()\n    fi\n\n    # if you set a flag which only applies to this command, don't show subcommands\n    if __%[1]s_contains_word \"${flagname}\" \"${local_nonpersistent_flags[@]}\"; then\n      commands=()\n    fi\n\n    # keep flag value with flagname as flaghash\n    # flaghash variable is an associative array which is only supported in bash > 3.\n    if [[ -z \"${BASH_VERSION:-}\" || \"${BASH_VERSINFO[0]:-}\" -gt 3 ]]; then\n        if [ -n \"${flagvalue}\" ] ; then\n            flaghash[${flagname}]=${flagvalue}\n        elif [ -n \"${words[ $((c+1)) ]}\" ] ; then\n            flaghash[${flagname}]=${words[ $((c+1)) ]}\n        else\n            flaghash[${flagname}]=\"true\" # pad \"true\" for bool flag\n        fi\n    fi\n\n    # skip the argument to a two word flag\n    if [[ ${words[c]} != *\"=\"* ]] && __%[1]s_contains_word \"${words[c]}\" \"${two_word_flags[@]}\"; then\n        __%[1]s_debug \"${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument\"\n        c=$((c+1))\n        # if we are looking for a flags value, don't show commands\n        if [[ $c -eq $cword ]]; then\n            commands=()\n        fi\n    fi\n\n    c=$((c+1))\n\n}\n\n__%[1]s_handle_noun()\n{\n    __%[1]s_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n    if __%[1]s_contains_word \"${words[c]}\" \"${must_have_one_noun[@]}\"; then\n        must_have_one_noun=()\n    elif __%[1]s_contains_word \"${words[c]}\" \"${noun_aliases[@]}\"; then\n        must_have_one_noun=()\n    fi\n\n    nouns+=(\"${words[c]}\")\n    c=$((c+1))\n}\n\n__%[1]s_handle_command()\n{\n    __%[1]s_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n    local next_command\n    if [[ -n ${last_command} ]]; then\n        next_command=\"_${last_command}_${words[c]//:/__}\"\n    else\n        if [[ $c -eq 0 ]]; then\n            next_command=\"_%[1]s_root_command\"\n        else\n            next_command=\"_${words[c]//:/__}\"\n        fi\n    fi\n    c=$((c+1))\n    __%[1]s_debug \"${FUNCNAME[0]}: looking for ${next_command}\"\n    declare -F \"$next_command\" >/dev/null && $next_command\n}\n\n__%[1]s_handle_word()\n{\n    if [[ $c -ge $cword ]]; then\n        __%[1]s_handle_reply\n        return\n    fi\n    __%[1]s_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n    if [[ \"${words[c]}\" == -* ]]; then\n        __%[1]s_handle_flag\n    elif __%[1]s_contains_word \"${words[c]}\" \"${commands[@]}\"; then\n        __%[1]s_handle_command\n    elif [[ $c -eq 0 ]]; then\n        __%[1]s_handle_command\n    elif __%[1]s_contains_word \"${words[c]}\" \"${command_aliases[@]}\"; then\n        # aliashash variable is an associative array which is only supported in bash > 3.\n        if [[ -z \"${BASH_VERSION:-}\" || \"${BASH_VERSINFO[0]:-}\" -gt 3 ]]; then\n            words[c]=${aliashash[${words[c]}]}\n            __%[1]s_handle_command\n        else\n            __%[1]s_handle_noun\n        fi\n    else\n        __%[1]s_handle_noun\n    fi\n    __%[1]s_handle_word\n}\n\n`, name, ShellCompNoDescRequestCmd,\n\t\tShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,\n\t\tShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))\n}\n\nfunc writePostscript(buf io.StringWriter, name string) {\n\tname = strings.ReplaceAll(name, \":\", \"__\")\n\tWriteStringAndCheck(buf, fmt.Sprintf(\"__start_%s()\\n\", name))\n\tWriteStringAndCheck(buf, fmt.Sprintf(`{\n    local cur prev words cword split\n    declare -A flaghash 2>/dev/null || :\n    declare -A aliashash 2>/dev/null || :\n    if declare -F _init_completion >/dev/null 2>&1; then\n        _init_completion -s || return\n    else\n        __%[1]s_init_completion -n \"=\" || return\n    fi\n\n    local c=0\n    local flag_parsing_disabled=\n    local flags=()\n    local two_word_flags=()\n    local local_nonpersistent_flags=()\n    local flags_with_completion=()\n    local flags_completion=()\n    local commands=(\"%[1]s\")\n    local command_aliases=()\n    local must_have_one_flag=()\n    local must_have_one_noun=()\n    local has_completion_function=\"\"\n    local last_command=\"\"\n    local nouns=()\n    local noun_aliases=()\n\n    __%[1]s_handle_word\n}\n\n`, name))\n\tWriteStringAndCheck(buf, fmt.Sprintf(`if [[ $(type -t compopt) = \"builtin\" ]]; then\n    complete -o default -F __start_%s %s\nelse\n    complete -o default -o nospace -F __start_%s %s\nfi\n\n`, name, name, name, name))\n\tWriteStringAndCheck(buf, \"# ex: ts=4 sw=4 et filetype=sh\\n\")\n}\n\nfunc writeCommands(buf io.StringWriter, cmd *Command) {\n\tWriteStringAndCheck(buf, \"    commands=()\\n\")\n\tfor _, c := range cmd.Commands() {\n\t\tif !c.IsAvailableCommand() && c != cmd.helpCommand {\n\t\t\tcontinue\n\t\t}\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    commands+=(%q)\\n\", c.Name()))\n\t\twriteCmdAliases(buf, c)\n\t}\n\tWriteStringAndCheck(buf, \"\\n\")\n}\n\nfunc writeFlagHandler(buf io.StringWriter, name string, annotations map[string][]string, cmd *Command) {\n\tfor key, value := range annotations {\n\t\tswitch key {\n\t\tcase BashCompFilenameExt:\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_with_completion+=(%q)\\n\", name))\n\n\t\t\tvar ext string\n\t\t\tif len(value) > 0 {\n\t\t\t\text = fmt.Sprintf(\"__%s_handle_filename_extension_flag \", cmd.Root().Name()) + strings.Join(value, \"|\")\n\t\t\t} else {\n\t\t\t\text = \"_filedir\"\n\t\t\t}\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_completion+=(%q)\\n\", ext))\n\t\tcase BashCompCustom:\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_with_completion+=(%q)\\n\", name))\n\n\t\t\tif len(value) > 0 {\n\t\t\t\thandlers := strings.Join(value, \"; \")\n\t\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_completion+=(%q)\\n\", handlers))\n\t\t\t} else {\n\t\t\t\tWriteStringAndCheck(buf, \"    flags_completion+=(:)\\n\")\n\t\t\t}\n\t\tcase BashCompSubdirsInDir:\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_with_completion+=(%q)\\n\", name))\n\n\t\t\tvar ext string\n\t\t\tif len(value) == 1 {\n\t\t\t\text = fmt.Sprintf(\"__%s_handle_subdirs_in_dir_flag \", cmd.Root().Name()) + value[0]\n\t\t\t} else {\n\t\t\t\text = \"_filedir -d\"\n\t\t\t}\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    flags_completion+=(%q)\\n\", ext))\n\t\t}\n\t}\n}\n\nconst cbn = \"\\\")\\n\"\n\nfunc writeShortFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) {\n\tname := flag.Shorthand\n\tformat := \"    \"\n\tif len(flag.NoOptDefVal) == 0 {\n\t\tformat += \"two_word_\"\n\t}\n\tformat += \"flags+=(\\\"-%s\" + cbn\n\tWriteStringAndCheck(buf, fmt.Sprintf(format, name))\n\twriteFlagHandler(buf, \"-\"+name, flag.Annotations, cmd)\n}\n\nfunc writeFlag(buf io.StringWriter, flag *pflag.Flag, cmd *Command) {\n\tname := flag.Name\n\tformat := \"    flags+=(\\\"--%s\"\n\tif len(flag.NoOptDefVal) == 0 {\n\t\tformat += \"=\"\n\t}\n\tformat += cbn\n\tWriteStringAndCheck(buf, fmt.Sprintf(format, name))\n\tif len(flag.NoOptDefVal) == 0 {\n\t\tformat = \"    two_word_flags+=(\\\"--%s\" + cbn\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(format, name))\n\t}\n\twriteFlagHandler(buf, \"--\"+name, flag.Annotations, cmd)\n}\n\nfunc writeLocalNonPersistentFlag(buf io.StringWriter, flag *pflag.Flag) {\n\tname := flag.Name\n\tformat := \"    local_nonpersistent_flags+=(\\\"--%[1]s\" + cbn\n\tif len(flag.NoOptDefVal) == 0 {\n\t\tformat += \"    local_nonpersistent_flags+=(\\\"--%[1]s=\" + cbn\n\t}\n\tWriteStringAndCheck(buf, fmt.Sprintf(format, name))\n\tif len(flag.Shorthand) > 0 {\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    local_nonpersistent_flags+=(\\\"-%s\\\")\\n\", flag.Shorthand))\n\t}\n}\n\n// prepareCustomAnnotationsForFlags setup annotations for go completions for registered flags\nfunc prepareCustomAnnotationsForFlags(cmd *Command) {\n\tflagCompletionMutex.RLock()\n\tdefer flagCompletionMutex.RUnlock()\n\tfor flag := range flagCompletionFunctions {\n\t\t// Make sure the completion script calls the __*_go_custom_completion function for\n\t\t// every registered flag.  We need to do this here (and not when the flag was registered\n\t\t// for completion) so that we can know the root command name for the prefix\n\t\t// of __<prefix>_go_custom_completion\n\t\tif flag.Annotations == nil {\n\t\t\tflag.Annotations = map[string][]string{}\n\t\t}\n\t\tflag.Annotations[BashCompCustom] = []string{fmt.Sprintf(\"__%[1]s_handle_go_custom_completion\", cmd.Root().Name())}\n\t}\n}\n\nfunc writeFlags(buf io.StringWriter, cmd *Command) {\n\tprepareCustomAnnotationsForFlags(cmd)\n\tWriteStringAndCheck(buf, `    flags=()\n    two_word_flags=()\n    local_nonpersistent_flags=()\n    flags_with_completion=()\n    flags_completion=()\n\n`)\n\n\tif cmd.DisableFlagParsing {\n\t\tWriteStringAndCheck(buf, \"    flag_parsing_disabled=1\\n\")\n\t}\n\n\tlocalNonPersistentFlags := cmd.LocalNonPersistentFlags()\n\tcmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\tif nonCompletableFlag(flag) {\n\t\t\treturn\n\t\t}\n\t\twriteFlag(buf, flag, cmd)\n\t\tif len(flag.Shorthand) > 0 {\n\t\t\twriteShortFlag(buf, flag, cmd)\n\t\t}\n\t\t// localNonPersistentFlags are used to stop the completion of subcommands when one is set\n\t\t// if TraverseChildren is true we should allow to complete subcommands\n\t\tif localNonPersistentFlags.Lookup(flag.Name) != nil && !cmd.Root().TraverseChildren {\n\t\t\twriteLocalNonPersistentFlag(buf, flag)\n\t\t}\n\t})\n\tcmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\tif nonCompletableFlag(flag) {\n\t\t\treturn\n\t\t}\n\t\twriteFlag(buf, flag, cmd)\n\t\tif len(flag.Shorthand) > 0 {\n\t\t\twriteShortFlag(buf, flag, cmd)\n\t\t}\n\t})\n\n\tWriteStringAndCheck(buf, \"\\n\")\n}\n\nfunc writeRequiredFlag(buf io.StringWriter, cmd *Command) {\n\tWriteStringAndCheck(buf, \"    must_have_one_flag=()\\n\")\n\tflags := cmd.NonInheritedFlags()\n\tflags.VisitAll(func(flag *pflag.Flag) {\n\t\tif nonCompletableFlag(flag) {\n\t\t\treturn\n\t\t}\n\t\tif _, ok := flag.Annotations[BashCompOneRequiredFlag]; ok {\n\t\t\tformat := \"    must_have_one_flag+=(\\\"--%s\"\n\t\t\tif flag.Value.Type() != \"bool\" {\n\t\t\t\tformat += \"=\"\n\t\t\t}\n\t\t\tformat += cbn\n\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(format, flag.Name))\n\n\t\t\tif len(flag.Shorthand) > 0 {\n\t\t\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    must_have_one_flag+=(\\\"-%s\"+cbn, flag.Shorthand))\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc writeRequiredNouns(buf io.StringWriter, cmd *Command) {\n\tWriteStringAndCheck(buf, \"    must_have_one_noun=()\\n\")\n\tsort.Strings(cmd.ValidArgs)\n\tfor _, value := range cmd.ValidArgs {\n\t\t// Remove any description that may be included following a tab character.\n\t\t// Descriptions are not supported by bash completion.\n\t\tvalue = strings.SplitN(value, \"\\t\", 2)[0]\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    must_have_one_noun+=(%q)\\n\", value))\n\t}\n\tif cmd.ValidArgsFunction != nil {\n\t\tWriteStringAndCheck(buf, \"    has_completion_function=1\\n\")\n\t}\n}\n\nfunc writeCmdAliases(buf io.StringWriter, cmd *Command) {\n\tif len(cmd.Aliases) == 0 {\n\t\treturn\n\t}\n\n\tsort.Strings(cmd.Aliases)\n\n\tWriteStringAndCheck(buf, fmt.Sprint(`    if [[ -z \"${BASH_VERSION:-}\" || \"${BASH_VERSINFO[0]:-}\" -gt 3 ]]; then`, \"\\n\"))\n\tfor _, value := range cmd.Aliases {\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"        command_aliases+=(%q)\\n\", value))\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"        aliashash[%q]=%q\\n\", value, cmd.Name()))\n\t}\n\tWriteStringAndCheck(buf, `    fi`)\n\tWriteStringAndCheck(buf, \"\\n\")\n}\nfunc writeArgAliases(buf io.StringWriter, cmd *Command) {\n\tWriteStringAndCheck(buf, \"    noun_aliases=()\\n\")\n\tsort.Strings(cmd.ArgAliases)\n\tfor _, value := range cmd.ArgAliases {\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"    noun_aliases+=(%q)\\n\", value))\n\t}\n}\n\nfunc gen(buf io.StringWriter, cmd *Command) {\n\tfor _, c := range cmd.Commands() {\n\t\tif !c.IsAvailableCommand() && c != cmd.helpCommand {\n\t\t\tcontinue\n\t\t}\n\t\tgen(buf, c)\n\t}\n\tcommandName := cmd.CommandPath()\n\tcommandName = strings.ReplaceAll(commandName, \" \", \"_\")\n\tcommandName = strings.ReplaceAll(commandName, \":\", \"__\")\n\n\tif cmd.Root() == cmd {\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"_%s_root_command()\\n{\\n\", commandName))\n\t} else {\n\t\tWriteStringAndCheck(buf, fmt.Sprintf(\"_%s()\\n{\\n\", commandName))\n\t}\n\n\tWriteStringAndCheck(buf, fmt.Sprintf(\"    last_command=%q\\n\", commandName))\n\tWriteStringAndCheck(buf, \"\\n\")\n\tWriteStringAndCheck(buf, \"    command_aliases=()\\n\")\n\tWriteStringAndCheck(buf, \"\\n\")\n\n\twriteCommands(buf, cmd)\n\twriteFlags(buf, cmd)\n\twriteRequiredFlag(buf, cmd)\n\twriteRequiredNouns(buf, cmd)\n\twriteArgAliases(buf, cmd)\n\tWriteStringAndCheck(buf, \"}\\n\\n\")\n}\n\n// GenBashCompletion generates bash completion file and writes to the passed writer.\nfunc (c *Command) GenBashCompletion(w io.Writer) error {\n\tbuf := new(bytes.Buffer)\n\twritePreamble(buf, c.Name())\n\tif len(c.BashCompletionFunction) > 0 {\n\t\tbuf.WriteString(c.BashCompletionFunction + \"\\n\")\n\t}\n\tgen(buf, c)\n\twritePostscript(buf, c.Name())\n\n\t_, err := buf.WriteTo(w)\n\treturn err\n}\n\nfunc nonCompletableFlag(flag *pflag.Flag) bool {\n\treturn flag.Hidden || len(flag.Deprecated) > 0\n}\n\n// GenBashCompletionFile generates bash completion file.\nfunc (c *Command) GenBashCompletionFile(filename string) error {\n\toutFile, err := os.Create(filename)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer outFile.Close()\n\n\treturn c.GenBashCompletion(outFile)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/bash_completionsV2.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc (c *Command) genBashCompletion(w io.Writer, includeDesc bool) error {\n\tbuf := new(bytes.Buffer)\n\tgenBashComp(buf, c.Name(), includeDesc)\n\t_, err := buf.WriteTo(w)\n\treturn err\n}\n\nfunc genBashComp(buf io.StringWriter, name string, includeDesc bool) {\n\tcompCmd := ShellCompRequestCmd\n\tif !includeDesc {\n\t\tcompCmd = ShellCompNoDescRequestCmd\n\t}\n\n\tWriteStringAndCheck(buf, fmt.Sprintf(`# bash completion V2 for %-36[1]s -*- shell-script -*-\n\n__%[1]s_debug()\n{\n    if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then\n        echo \"$*\" >> \"${BASH_COMP_DEBUG_FILE}\"\n    fi\n}\n\n# Macs have bash3 for which the bash-completion package doesn't include\n# _init_completion. This is a minimal version of that function.\n__%[1]s_init_completion()\n{\n    COMPREPLY=()\n    _get_comp_words_by_ref \"$@\" cur prev words cword\n}\n\n# This function calls the %[1]s program to obtain the completion\n# results and the directive.  It fills the 'out' and 'directive' vars.\n__%[1]s_get_completion_results() {\n    local requestComp lastParam lastChar args\n\n    # Prepare the command to request completions for the program.\n    # Calling ${words[0]} instead of directly %[1]s allows handling aliases\n    args=(\"${words[@]:1}\")\n    requestComp=\"${words[0]} %[2]s ${args[*]}\"\n\n    lastParam=${words[$((${#words[@]}-1))]}\n    lastChar=${lastParam:$((${#lastParam}-1)):1}\n    __%[1]s_debug \"lastParam ${lastParam}, lastChar ${lastChar}\"\n\n    if [[ -z ${cur} && ${lastChar} != = ]]; then\n        # If the last parameter is complete (there is a space following it)\n        # We add an extra empty parameter so we can indicate this to the go method.\n        __%[1]s_debug \"Adding extra empty parameter\"\n        requestComp=\"${requestComp} ''\"\n    fi\n\n    # When completing a flag with an = (e.g., %[1]s -n=<TAB>)\n    # bash focuses on the part after the =, so we need to remove\n    # the flag part from $cur\n    if [[ ${cur} == -*=* ]]; then\n        cur=\"${cur#*=}\"\n    fi\n\n    __%[1]s_debug \"Calling ${requestComp}\"\n    # Use eval to handle any environment variables and such\n    out=$(eval \"${requestComp}\" 2>/dev/null)\n\n    # Extract the directive integer at the very end of the output following a colon (:)\n    directive=${out##*:}\n    # Remove the directive\n    out=${out%%:*}\n    if [[ ${directive} == \"${out}\" ]]; then\n        # There is not directive specified\n        directive=0\n    fi\n    __%[1]s_debug \"The completion directive is: ${directive}\"\n    __%[1]s_debug \"The completions are: ${out}\"\n}\n\n__%[1]s_process_completion_results() {\n    local shellCompDirectiveError=%[3]d\n    local shellCompDirectiveNoSpace=%[4]d\n    local shellCompDirectiveNoFileComp=%[5]d\n    local shellCompDirectiveFilterFileExt=%[6]d\n    local shellCompDirectiveFilterDirs=%[7]d\n    local shellCompDirectiveKeepOrder=%[8]d\n\n    if (((directive & shellCompDirectiveError) != 0)); then\n        # Error code.  No completion.\n        __%[1]s_debug \"Received error from custom completion go code\"\n        return\n    else\n        if (((directive & shellCompDirectiveNoSpace) != 0)); then\n            if [[ $(type -t compopt) == builtin ]]; then\n                __%[1]s_debug \"Activating no space\"\n                compopt -o nospace\n            else\n                __%[1]s_debug \"No space directive not supported in this version of bash\"\n            fi\n        fi\n        if (((directive & shellCompDirectiveKeepOrder) != 0)); then\n            if [[ $(type -t compopt) == builtin ]]; then\n                # no sort isn't supported for bash less than < 4.4\n                if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then\n                    __%[1]s_debug \"No sort directive not supported in this version of bash\"\n                else\n                    __%[1]s_debug \"Activating keep order\"\n                    compopt -o nosort\n                fi\n            else\n                __%[1]s_debug \"No sort directive not supported in this version of bash\"\n            fi\n        fi\n        if (((directive & shellCompDirectiveNoFileComp) != 0)); then\n            if [[ $(type -t compopt) == builtin ]]; then\n                __%[1]s_debug \"Activating no file completion\"\n                compopt +o default\n            else\n                __%[1]s_debug \"No file completion directive not supported in this version of bash\"\n            fi\n        fi\n    fi\n\n    # Separate activeHelp from normal completions\n    local completions=()\n    local activeHelp=()\n    __%[1]s_extract_activeHelp\n\n    if (((directive & shellCompDirectiveFilterFileExt) != 0)); then\n        # File extension filtering\n        local fullFilter=\"\" filter filteringCmd\n\n        # Do not use quotes around the $completions variable or else newline\n        # characters will be kept.\n        for filter in ${completions[*]}; do\n            fullFilter+=\"$filter|\"\n        done\n\n        filteringCmd=\"_filedir $fullFilter\"\n        __%[1]s_debug \"File filtering command: $filteringCmd\"\n        $filteringCmd\n    elif (((directive & shellCompDirectiveFilterDirs) != 0)); then\n        # File completion for directories only\n\n        local subdir\n        subdir=${completions[0]}\n        if [[ -n $subdir ]]; then\n            __%[1]s_debug \"Listing directories in $subdir\"\n            pushd \"$subdir\" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return\n        else\n            __%[1]s_debug \"Listing directories in .\"\n            _filedir -d\n        fi\n    else\n        __%[1]s_handle_completion_types\n    fi\n\n    __%[1]s_handle_special_char \"$cur\" :\n    __%[1]s_handle_special_char \"$cur\" =\n\n    # Print the activeHelp statements before we finish\n    __%[1]s_handle_activeHelp\n}\n\n__%[1]s_handle_activeHelp() {\n    # Print the activeHelp statements\n    if ((${#activeHelp[*]} != 0)); then\n        if [ -z $COMP_TYPE ]; then\n            # Bash v3 does not set the COMP_TYPE variable.\n            printf \"\\n\";\n            printf \"%%s\\n\" \"${activeHelp[@]}\"\n            printf \"\\n\"\n            __%[1]s_reprint_commandLine\n            return\n        fi\n\n        # Only print ActiveHelp on the second TAB press\n        if [ $COMP_TYPE -eq 63 ]; then\n            printf \"\\n\"\n            printf \"%%s\\n\" \"${activeHelp[@]}\"\n\n            if ((${#COMPREPLY[*]} == 0)); then\n                # When there are no completion choices from the program, file completion\n                # may kick in if the program has not disabled it; in such a case, we want\n                # to know if any files will match what the user typed, so that we know if\n                # there will be completions presented, so that we know how to handle ActiveHelp.\n                # To find out, we actually trigger the file completion ourselves;\n                # the call to _filedir will fill COMPREPLY if files match.\n                if (((directive & shellCompDirectiveNoFileComp) == 0)); then\n                    __%[1]s_debug \"Listing files\"\n                    _filedir\n                fi\n            fi\n\n            if ((${#COMPREPLY[*]} != 0)); then\n                # If there are completion choices to be shown, print a delimiter.\n                # Re-printing the command-line will automatically be done\n                # by the shell when it prints the completion choices.\n                printf -- \"--\"\n            else\n                # When there are no completion choices at all, we need\n                # to re-print the command-line since the shell will\n                # not be doing it itself.\n                __%[1]s_reprint_commandLine\n            fi\n        elif [ $COMP_TYPE -eq 37 ] || [ $COMP_TYPE -eq 42 ]; then\n            # For completion type: menu-complete/menu-complete-backward and insert-completions\n            # the completions are immediately inserted into the command-line, so we first\n            # print the activeHelp message and reprint the command-line since the shell won't.\n            printf \"\\n\"\n            printf \"%%s\\n\" \"${activeHelp[@]}\"\n\n            __%[1]s_reprint_commandLine\n        fi\n    fi\n}\n\n__%[1]s_reprint_commandLine() {\n    # The prompt format is only available from bash 4.4.\n    # We test if it is available before using it.\n    if (x=${PS1@P}) 2> /dev/null; then\n        printf \"%%s\" \"${PS1@P}${COMP_LINE[@]}\"\n    else\n        # Can't print the prompt.  Just print the\n        # text the user had typed, it is workable enough.\n        printf \"%%s\" \"${COMP_LINE[@]}\"\n    fi\n}\n\n# Separate activeHelp lines from real completions.\n# Fills the $activeHelp and $completions arrays.\n__%[1]s_extract_activeHelp() {\n    local activeHelpMarker=\"%[9]s\"\n    local endIndex=${#activeHelpMarker}\n\n    while IFS='' read -r comp; do\n        [[ -z $comp ]] && continue\n\n        if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then\n            comp=${comp:endIndex}\n            __%[1]s_debug \"ActiveHelp found: $comp\"\n            if [[ -n $comp ]]; then\n                activeHelp+=(\"$comp\")\n            fi\n        else\n            # Not an activeHelp line but a normal completion\n            completions+=(\"$comp\")\n        fi\n    done <<<\"${out}\"\n}\n\n__%[1]s_handle_completion_types() {\n    __%[1]s_debug \"__%[1]s_handle_completion_types: COMP_TYPE is $COMP_TYPE\"\n\n    case $COMP_TYPE in\n    37|42)\n        # Type: menu-complete/menu-complete-backward and insert-completions\n        # If the user requested inserting one completion at a time, or all\n        # completions at once on the command-line we must remove the descriptions.\n        # https://github.com/spf13/cobra/issues/1508\n\n        # If there are no completions, we don't need to do anything\n        (( ${#completions[@]} == 0 )) && return 0\n\n        local tab=$'\\t'\n\n        # Strip any description and escape the completion to handled special characters\n        IFS=$'\\n' read -ra completions -d '' < <(printf \"%%q\\n\" \"${completions[@]%%%%$tab*}\")\n\n        # Only consider the completions that match\n        IFS=$'\\n' read -ra COMPREPLY -d '' < <(IFS=$'\\n'; compgen -W \"${completions[*]}\" -- \"${cur}\")\n\n        # compgen looses the escaping so we need to escape all completions again since they will\n        # all be inserted on the command-line.\n        IFS=$'\\n' read -ra COMPREPLY -d '' < <(printf \"%%q\\n\" \"${COMPREPLY[@]}\")\n        ;;\n\n    *)\n        # Type: complete (normal completion)\n        __%[1]s_handle_standard_completion_case\n        ;;\n    esac\n}\n\n__%[1]s_handle_standard_completion_case() {\n    local tab=$'\\t'\n\n    # If there are no completions, we don't need to do anything\n    (( ${#completions[@]} == 0 )) && return 0\n\n    # Short circuit to optimize if we don't have descriptions\n    if [[ \"${completions[*]}\" != *$tab* ]]; then\n        # First, escape the completions to handle special characters\n        IFS=$'\\n' read -ra completions -d '' < <(printf \"%%q\\n\" \"${completions[@]}\")\n        # Only consider the completions that match what the user typed\n        IFS=$'\\n' read -ra COMPREPLY -d '' < <(IFS=$'\\n'; compgen -W \"${completions[*]}\" -- \"${cur}\")\n\n        # compgen looses the escaping so, if there is only a single completion, we need to\n        # escape it again because it will be inserted on the command-line.  If there are multiple\n        # completions, we don't want to escape them because they will be printed in a list\n        # and we don't want to show escape characters in that list.\n        if (( ${#COMPREPLY[@]} == 1 )); then\n            COMPREPLY[0]=$(printf \"%%q\" \"${COMPREPLY[0]}\")\n        fi\n        return 0\n    fi\n\n    local longest=0\n    local compline\n    # Look for the longest completion so that we can format things nicely\n    while IFS='' read -r compline; do\n        [[ -z $compline ]] && continue\n\n        # Before checking if the completion matches what the user typed,\n        # we need to strip any description and escape the completion to handle special\n        # characters because those escape characters are part of what the user typed.\n        # Don't call \"printf\" in a sub-shell because it will be much slower\n        # since we are in a loop.\n        printf -v comp \"%%q\" \"${compline%%%%$tab*}\" &>/dev/null || comp=$(printf \"%%q\" \"${compline%%%%$tab*}\")\n\n        # Only consider the completions that match\n        [[ $comp == \"$cur\"* ]] || continue\n\n        # The completions matches.  Add it to the list of full completions including\n        # its description.  We don't escape the completion because it may get printed\n        # in a list if there are more than one and we don't want show escape characters\n        # in that list.\n        COMPREPLY+=(\"$compline\")\n\n        # Strip any description before checking the length, and again, don't escape\n        # the completion because this length is only used when printing the completions\n        # in a list and we don't want show escape characters in that list.\n        comp=${compline%%%%$tab*}\n        if ((${#comp}>longest)); then\n            longest=${#comp}\n        fi\n    done < <(printf \"%%s\\n\" \"${completions[@]}\")\n\n    # If there is a single completion left, remove the description text and escape any special characters\n    if ((${#COMPREPLY[*]} == 1)); then\n        __%[1]s_debug \"COMPREPLY[0]: ${COMPREPLY[0]}\"\n        COMPREPLY[0]=$(printf \"%%q\" \"${COMPREPLY[0]%%%%$tab*}\")\n        __%[1]s_debug \"Removed description from single completion, which is now: ${COMPREPLY[0]}\"\n    else\n        # Format the descriptions\n        __%[1]s_format_comp_descriptions $longest\n    fi\n}\n\n__%[1]s_handle_special_char()\n{\n    local comp=\"$1\"\n    local char=$2\n    if [[ \"$comp\" == *${char}* && \"$COMP_WORDBREAKS\" == *${char}* ]]; then\n        local word=${comp%%\"${comp##*${char}}\"}\n        local idx=${#COMPREPLY[*]}\n        while ((--idx >= 0)); do\n            COMPREPLY[idx]=${COMPREPLY[idx]#\"$word\"}\n        done\n    fi\n}\n\n__%[1]s_format_comp_descriptions()\n{\n    local tab=$'\\t'\n    local comp desc maxdesclength\n    local longest=$1\n\n    local i ci\n    for ci in ${!COMPREPLY[*]}; do\n        comp=${COMPREPLY[ci]}\n        # Properly format the description string which follows a tab character if there is one\n        if [[ \"$comp\" == *$tab* ]]; then\n            __%[1]s_debug \"Original comp: $comp\"\n            desc=${comp#*$tab}\n            comp=${comp%%%%$tab*}\n\n            # $COLUMNS stores the current shell width.\n            # Remove an extra 4 because we add 2 spaces and 2 parentheses.\n            maxdesclength=$(( COLUMNS - longest - 4 ))\n\n            # Make sure we can fit a description of at least 8 characters\n            # if we are to align the descriptions.\n            if ((maxdesclength > 8)); then\n                # Add the proper number of spaces to align the descriptions\n                for ((i = ${#comp} ; i < longest ; i++)); do\n                    comp+=\" \"\n                done\n            else\n                # Don't pad the descriptions so we can fit more text after the completion\n                maxdesclength=$(( COLUMNS - ${#comp} - 4 ))\n            fi\n\n            # If there is enough space for any description text,\n            # truncate the descriptions that are too long for the shell width\n            if ((maxdesclength > 0)); then\n                if ((${#desc} > maxdesclength)); then\n                    desc=${desc:0:$(( maxdesclength - 1 ))}\n                    desc+=\"…\"\n                fi\n                comp+=\"  ($desc)\"\n            fi\n            COMPREPLY[ci]=$comp\n            __%[1]s_debug \"Final comp: $comp\"\n        fi\n    done\n}\n\n__start_%[1]s()\n{\n    local cur prev words cword split\n\n    COMPREPLY=()\n\n    # Call _init_completion from the bash-completion package\n    # to prepare the arguments properly\n    if declare -F _init_completion >/dev/null 2>&1; then\n        _init_completion -n =: || return\n    else\n        __%[1]s_init_completion -n =: || return\n    fi\n\n    __%[1]s_debug\n    __%[1]s_debug \"========= starting completion logic ==========\"\n    __%[1]s_debug \"cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword\"\n\n    # The user could have moved the cursor backwards on the command-line.\n    # We need to trigger completion from the $cword location, so we need\n    # to truncate the command-line ($words) up to the $cword location.\n    words=(\"${words[@]:0:$cword+1}\")\n    __%[1]s_debug \"Truncated words[*]: ${words[*]},\"\n\n    local out directive\n    __%[1]s_get_completion_results\n    __%[1]s_process_completion_results\n}\n\nif [[ $(type -t compopt) = \"builtin\" ]]; then\n    complete -o default -F __start_%[1]s %[1]s\nelse\n    complete -o default -o nospace -F __start_%[1]s %[1]s\nfi\n\n# ex: ts=4 sw=4 et filetype=sh\n`, name, compCmd,\n\t\tShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,\n\t\tShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,\n\t\tactiveHelpMarker))\n}\n\n// GenBashCompletionFileV2 generates Bash completion version 2.\nfunc (c *Command) GenBashCompletionFileV2(filename string, includeDesc bool) error {\n\toutFile, err := os.Create(filename)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer outFile.Close()\n\n\treturn c.GenBashCompletionV2(outFile, includeDesc)\n}\n\n// GenBashCompletionV2 generates Bash completion file version 2\n// and writes it to the passed writer.\nfunc (c *Command) GenBashCompletionV2(w io.Writer, includeDesc bool) error {\n\treturn c.genBashCompletion(w, includeDesc)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/cobra.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Commands similar to git, go tools and other modern CLI tools\n// inspired by go, go-Commander, gh and subcommand\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"text/template\"\n\t\"time\"\n\t\"unicode\"\n)\n\nvar templateFuncs = template.FuncMap{\n\t\"trim\":                    strings.TrimSpace,\n\t\"trimRightSpace\":          trimRightSpace,\n\t\"trimTrailingWhitespaces\": trimRightSpace,\n\t\"appendIfNotPresent\":      appendIfNotPresent,\n\t\"rpad\":                    rpad,\n\t\"gt\":                      Gt,\n\t\"eq\":                      Eq,\n}\n\nvar initializers []func()\nvar finalizers []func()\n\nconst (\n\tdefaultPrefixMatching   = false\n\tdefaultCommandSorting   = true\n\tdefaultCaseInsensitive  = false\n\tdefaultTraverseRunHooks = false\n)\n\n// EnablePrefixMatching allows setting automatic prefix matching. Automatic prefix matching can be a dangerous thing\n// to automatically enable in CLI tools.\n// Set this to true to enable it.\nvar EnablePrefixMatching = defaultPrefixMatching\n\n// EnableCommandSorting controls sorting of the slice of commands, which is turned on by default.\n// To disable sorting, set it to false.\nvar EnableCommandSorting = defaultCommandSorting\n\n// EnableCaseInsensitive allows case-insensitive commands names. (case sensitive by default)\nvar EnableCaseInsensitive = defaultCaseInsensitive\n\n// EnableTraverseRunHooks executes persistent pre-run and post-run hooks from all parents.\n// By default this is disabled, which means only the first run hook to be found is executed.\nvar EnableTraverseRunHooks = defaultTraverseRunHooks\n\n// MousetrapHelpText enables an information splash screen on Windows\n// if the CLI is started from explorer.exe.\n// To disable the mousetrap, just set this variable to blank string (\"\").\n// Works only on Microsoft Windows.\nvar MousetrapHelpText = `This is a command line tool.\n\nYou need to open cmd.exe and run it from there.\n`\n\n// MousetrapDisplayDuration controls how long the MousetrapHelpText message is displayed on Windows\n// if the CLI is started from explorer.exe. Set to 0 to wait for the return key to be pressed.\n// To disable the mousetrap, just set MousetrapHelpText to blank string (\"\").\n// Works only on Microsoft Windows.\nvar MousetrapDisplayDuration = 5 * time.Second\n\n// AddTemplateFunc adds a template function that's available to Usage and Help\n// template generation.\nfunc AddTemplateFunc(name string, tmplFunc interface{}) {\n\ttemplateFuncs[name] = tmplFunc\n}\n\n// AddTemplateFuncs adds multiple template functions that are available to Usage and\n// Help template generation.\nfunc AddTemplateFuncs(tmplFuncs template.FuncMap) {\n\tfor k, v := range tmplFuncs {\n\t\ttemplateFuncs[k] = v\n\t}\n}\n\n// OnInitialize sets the passed functions to be run when each command's\n// Execute method is called.\nfunc OnInitialize(y ...func()) {\n\tinitializers = append(initializers, y...)\n}\n\n// OnFinalize sets the passed functions to be run when each command's\n// Execute method is terminated.\nfunc OnFinalize(y ...func()) {\n\tfinalizers = append(finalizers, y...)\n}\n\n// FIXME Gt is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra.\n\n// Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans,\n// Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as\n// ints and then compared.\nfunc Gt(a interface{}, b interface{}) bool {\n\tvar left, right int64\n\tav := reflect.ValueOf(a)\n\n\tswitch av.Kind() {\n\tcase reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:\n\t\tleft = int64(av.Len())\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tleft = av.Int()\n\tcase reflect.String:\n\t\tleft, _ = strconv.ParseInt(av.String(), 10, 64)\n\t}\n\n\tbv := reflect.ValueOf(b)\n\n\tswitch bv.Kind() {\n\tcase reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:\n\t\tright = int64(bv.Len())\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tright = bv.Int()\n\tcase reflect.String:\n\t\tright, _ = strconv.ParseInt(bv.String(), 10, 64)\n\t}\n\n\treturn left > right\n}\n\n// FIXME Eq is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra.\n\n// Eq takes two types and checks whether they are equal. Supported types are int and string. Unsupported types will panic.\nfunc Eq(a interface{}, b interface{}) bool {\n\tav := reflect.ValueOf(a)\n\tbv := reflect.ValueOf(b)\n\n\tswitch av.Kind() {\n\tcase reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:\n\t\tpanic(\"Eq called on unsupported type\")\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn av.Int() == bv.Int()\n\tcase reflect.String:\n\t\treturn av.String() == bv.String()\n\t}\n\treturn false\n}\n\nfunc trimRightSpace(s string) string {\n\treturn strings.TrimRightFunc(s, unicode.IsSpace)\n}\n\n// FIXME appendIfNotPresent is unused by cobra and should be removed in a version 2. It exists only for compatibility with users of cobra.\n\n// appendIfNotPresent will append stringToAppend to the end of s, but only if it's not yet present in s.\nfunc appendIfNotPresent(s, stringToAppend string) string {\n\tif strings.Contains(s, stringToAppend) {\n\t\treturn s\n\t}\n\treturn s + \" \" + stringToAppend\n}\n\n// rpad adds padding to the right of a string.\nfunc rpad(s string, padding int) string {\n\tformattedString := fmt.Sprintf(\"%%-%ds\", padding)\n\treturn fmt.Sprintf(formattedString, s)\n}\n\nfunc tmpl(text string) *tmplFunc {\n\treturn &tmplFunc{\n\t\ttmpl: text,\n\t\tfn: func(w io.Writer, data interface{}) error {\n\t\t\tt := template.New(\"top\")\n\t\t\tt.Funcs(templateFuncs)\n\t\t\ttemplate.Must(t.Parse(text))\n\t\t\treturn t.Execute(w, data)\n\t\t},\n\t}\n}\n\n// ld compares two strings and returns the levenshtein distance between them.\nfunc ld(s, t string, ignoreCase bool) int {\n\tif ignoreCase {\n\t\ts = strings.ToLower(s)\n\t\tt = strings.ToLower(t)\n\t}\n\td := make([][]int, len(s)+1)\n\tfor i := range d {\n\t\td[i] = make([]int, len(t)+1)\n\t\td[i][0] = i\n\t}\n\tfor j := range d[0] {\n\t\td[0][j] = j\n\t}\n\tfor j := 1; j <= len(t); j++ {\n\t\tfor i := 1; i <= len(s); i++ {\n\t\t\tif s[i-1] == t[j-1] {\n\t\t\t\td[i][j] = d[i-1][j-1]\n\t\t\t} else {\n\t\t\t\tmin := d[i-1][j]\n\t\t\t\tif d[i][j-1] < min {\n\t\t\t\t\tmin = d[i][j-1]\n\t\t\t\t}\n\t\t\t\tif d[i-1][j-1] < min {\n\t\t\t\t\tmin = d[i-1][j-1]\n\t\t\t\t}\n\t\t\t\td[i][j] = min + 1\n\t\t\t}\n\t\t}\n\n\t}\n\treturn d[len(s)][len(t)]\n}\n\nfunc stringInSlice(a string, list []string) bool {\n\tfor _, b := range list {\n\t\tif b == a {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// CheckErr prints the msg with the prefix 'Error:' and exits with error code 1. If the msg is nil, it does nothing.\nfunc CheckErr(msg interface{}) {\n\tif msg != nil {\n\t\tfmt.Fprintln(os.Stderr, \"Error:\", msg)\n\t\tos.Exit(1)\n\t}\n}\n\n// WriteStringAndCheck writes a string into a buffer, and checks if the error is not nil.\nfunc WriteStringAndCheck(b io.StringWriter, s string) {\n\t_, err := b.WriteString(s)\n\tCheckErr(err)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/command.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.\n// In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code.\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sort\"\n\t\"strings\"\n\n\tflag \"github.com/spf13/pflag\"\n)\n\nconst (\n\tFlagSetByCobraAnnotation     = \"cobra_annotation_flag_set_by_cobra\"\n\tCommandDisplayNameAnnotation = \"cobra_annotation_command_display_name\"\n\n\thelpFlagName    = \"help\"\n\thelpCommandName = \"help\"\n)\n\n// FParseErrWhitelist configures Flag parse errors to be ignored\ntype FParseErrWhitelist flag.ParseErrorsAllowlist\n\n// Group Structure to manage groups for commands\ntype Group struct {\n\tID    string\n\tTitle string\n}\n\n// Command is just that, a command for your application.\n// E.g.  'go run ...' - 'run' is the command. Cobra requires\n// you to define the usage and description as part of your command\n// definition to ensure usability.\ntype Command struct {\n\t// Use is the one-line usage message.\n\t// Recommended syntax is as follows:\n\t//   [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.\n\t//   ... indicates that you can specify multiple values for the previous argument.\n\t//   |   indicates mutually exclusive information. You can use the argument to the left of the separator or the\n\t//       argument to the right of the separator. You cannot use both arguments in a single use of the command.\n\t//   { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are\n\t//       optional, they are enclosed in brackets ([ ]).\n\t// Example: add [-F file | -D dir]... [-f format] profile\n\tUse string\n\n\t// Aliases is an array of aliases that can be used instead of the first word in Use.\n\tAliases []string\n\n\t// SuggestFor is an array of command names for which this command will be suggested -\n\t// similar to aliases but only suggests.\n\tSuggestFor []string\n\n\t// Short is the short description shown in the 'help' output.\n\tShort string\n\n\t// The group id under which this subcommand is grouped in the 'help' output of its parent.\n\tGroupID string\n\n\t// Long is the long message shown in the 'help <this-command>' output.\n\tLong string\n\n\t// Example is examples of how to use the command.\n\tExample string\n\n\t// ValidArgs is list of all valid non-flag arguments that are accepted in shell completions\n\tValidArgs []Completion\n\t// ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion.\n\t// It is a dynamic version of using ValidArgs.\n\t// Only one of ValidArgs and ValidArgsFunction can be used for a command.\n\tValidArgsFunction CompletionFunc\n\n\t// Expected arguments\n\tArgs PositionalArgs\n\n\t// ArgAliases is List of aliases for ValidArgs.\n\t// These are not suggested to the user in the shell completion,\n\t// but accepted if entered manually.\n\tArgAliases []string\n\n\t// BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator.\n\t// For portability with other shells, it is recommended to instead use ValidArgsFunction\n\tBashCompletionFunction string\n\n\t// Deprecated defines, if this command is deprecated and should print this string when used.\n\tDeprecated string\n\n\t// Annotations are key/value pairs that can be used by applications to identify or\n\t// group commands or set special options.\n\tAnnotations map[string]string\n\n\t// Version defines the version for this command. If this value is non-empty and the command does not\n\t// define a \"version\" flag, a \"version\" boolean flag will be added to the command and, if specified,\n\t// will print content of the \"Version\" variable. A shorthand \"v\" flag will also be added if the\n\t// command does not define one.\n\tVersion string\n\n\t// The *Run functions are executed in the following order:\n\t//   * PersistentPreRun()\n\t//   * PreRun()\n\t//   * Run()\n\t//   * PostRun()\n\t//   * PersistentPostRun()\n\t// All functions get the same args, the arguments after the command name.\n\t// The *PreRun and *PostRun functions will only be executed if the Run function of the current\n\t// command has been declared.\n\t//\n\t// PersistentPreRun: children of this command will inherit and execute.\n\tPersistentPreRun func(cmd *Command, args []string)\n\t// PersistentPreRunE: PersistentPreRun but returns an error.\n\tPersistentPreRunE func(cmd *Command, args []string) error\n\t// PreRun: children of this command will not inherit.\n\tPreRun func(cmd *Command, args []string)\n\t// PreRunE: PreRun but returns an error.\n\tPreRunE func(cmd *Command, args []string) error\n\t// Run: Typically the actual work function. Most commands will only implement this.\n\tRun func(cmd *Command, args []string)\n\t// RunE: Run but returns an error.\n\tRunE func(cmd *Command, args []string) error\n\t// PostRun: run after the Run command.\n\tPostRun func(cmd *Command, args []string)\n\t// PostRunE: PostRun but returns an error.\n\tPostRunE func(cmd *Command, args []string) error\n\t// PersistentPostRun: children of this command will inherit and execute after PostRun.\n\tPersistentPostRun func(cmd *Command, args []string)\n\t// PersistentPostRunE: PersistentPostRun but returns an error.\n\tPersistentPostRunE func(cmd *Command, args []string) error\n\n\t// groups for subcommands\n\tcommandgroups []*Group\n\n\t// args is actual args parsed from flags.\n\targs []string\n\t// flagErrorBuf contains all error messages from pflag.\n\tflagErrorBuf *bytes.Buffer\n\t// flags is full set of flags.\n\tflags *flag.FlagSet\n\t// pflags contains persistent flags.\n\tpflags *flag.FlagSet\n\t// lflags contains local flags.\n\t// This field does not represent internal state, it's used as a cache to optimise LocalFlags function call\n\tlflags *flag.FlagSet\n\t// iflags contains inherited flags.\n\t// This field does not represent internal state, it's used as a cache to optimise InheritedFlags function call\n\tiflags *flag.FlagSet\n\t// parentsPflags is all persistent flags of cmd's parents.\n\tparentsPflags *flag.FlagSet\n\t// globNormFunc is the global normalization function\n\t// that we can use on every pflag set and children commands\n\tglobNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName\n\n\t// usageFunc is usage func defined by user.\n\tusageFunc func(*Command) error\n\t// usageTemplate is usage template defined by user.\n\tusageTemplate *tmplFunc\n\t// flagErrorFunc is func defined by user and it's called when the parsing of\n\t// flags returns an error.\n\tflagErrorFunc func(*Command, error) error\n\t// helpTemplate is help template defined by user.\n\thelpTemplate *tmplFunc\n\t// helpFunc is help func defined by user.\n\thelpFunc func(*Command, []string)\n\t// helpCommand is command with usage 'help'. If it's not defined by user,\n\t// cobra uses default help command.\n\thelpCommand *Command\n\t// helpCommandGroupID is the group id for the helpCommand\n\thelpCommandGroupID string\n\n\t// completionCommandGroupID is the group id for the completion command\n\tcompletionCommandGroupID string\n\n\t// versionTemplate is the version template defined by user.\n\tversionTemplate *tmplFunc\n\n\t// errPrefix is the error message prefix defined by user.\n\terrPrefix string\n\n\t// inReader is a reader defined by the user that replaces stdin\n\tinReader io.Reader\n\t// outWriter is a writer defined by the user that replaces stdout\n\toutWriter io.Writer\n\t// errWriter is a writer defined by the user that replaces stderr\n\terrWriter io.Writer\n\n\t// FParseErrWhitelist flag parse errors to be ignored\n\tFParseErrWhitelist FParseErrWhitelist\n\n\t// CompletionOptions is a set of options to control the handling of shell completion\n\tCompletionOptions CompletionOptions\n\n\t// commandsAreSorted defines, if command slice are sorted or not.\n\tcommandsAreSorted bool\n\t// commandCalledAs is the name or alias value used to call this command.\n\tcommandCalledAs struct {\n\t\tname   string\n\t\tcalled bool\n\t}\n\n\tctx context.Context\n\n\t// commands is the list of commands supported by this program.\n\tcommands []*Command\n\t// parent is a parent command for this command.\n\tparent *Command\n\t// Max lengths of commands' string lengths for use in padding.\n\tcommandsMaxUseLen         int\n\tcommandsMaxCommandPathLen int\n\tcommandsMaxNameLen        int\n\n\t// TraverseChildren parses flags on all parents before executing child command.\n\tTraverseChildren bool\n\n\t// Hidden defines, if this command is hidden and should NOT show up in the list of available commands.\n\tHidden bool\n\n\t// SilenceErrors is an option to quiet errors down stream.\n\tSilenceErrors bool\n\n\t// SilenceUsage is an option to silence usage when an error occurs.\n\tSilenceUsage bool\n\n\t// DisableFlagParsing disables the flag parsing.\n\t// If this is true all flags will be passed to the command as arguments.\n\tDisableFlagParsing bool\n\n\t// DisableAutoGenTag defines, if gen tag (\"Auto generated by spf13/cobra...\")\n\t// will be printed by generating docs for this command.\n\tDisableAutoGenTag bool\n\n\t// DisableFlagsInUseLine will disable the addition of [flags] to the usage\n\t// line of a command when printing help or generating docs\n\tDisableFlagsInUseLine bool\n\n\t// DisableSuggestions disables the suggestions based on Levenshtein distance\n\t// that go along with 'unknown command' messages.\n\tDisableSuggestions bool\n\n\t// SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions.\n\t// Must be > 0.\n\tSuggestionsMinimumDistance int\n}\n\n// Context returns underlying command context. If command was executed\n// with ExecuteContext or the context was set with SetContext, the\n// previously set context will be returned. Otherwise, nil is returned.\n//\n// Notice that a call to Execute and ExecuteC will replace a nil context of\n// a command with a context.Background, so a background context will be\n// returned by Context after one of these functions has been called.\nfunc (c *Command) Context() context.Context {\n\treturn c.ctx\n}\n\n// SetContext sets context for the command. This context will be overwritten by\n// Command.ExecuteContext or Command.ExecuteContextC.\nfunc (c *Command) SetContext(ctx context.Context) {\n\tc.ctx = ctx\n}\n\n// SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden\n// particularly useful when testing.\nfunc (c *Command) SetArgs(a []string) {\n\tc.args = a\n}\n\n// SetOutput sets the destination for usage and error messages.\n// If output is nil, os.Stderr is used.\n//\n// Deprecated: Use SetOut and/or SetErr instead\nfunc (c *Command) SetOutput(output io.Writer) {\n\tc.outWriter = output\n\tc.errWriter = output\n}\n\n// SetOut sets the destination for usage messages.\n// If newOut is nil, os.Stdout is used.\nfunc (c *Command) SetOut(newOut io.Writer) {\n\tc.outWriter = newOut\n}\n\n// SetErr sets the destination for error messages.\n// If newErr is nil, os.Stderr is used.\nfunc (c *Command) SetErr(newErr io.Writer) {\n\tc.errWriter = newErr\n}\n\n// SetIn sets the source for input data\n// If newIn is nil, os.Stdin is used.\nfunc (c *Command) SetIn(newIn io.Reader) {\n\tc.inReader = newIn\n}\n\n// SetUsageFunc sets usage function. Usage can be defined by application.\nfunc (c *Command) SetUsageFunc(f func(*Command) error) {\n\tc.usageFunc = f\n}\n\n// SetUsageTemplate sets usage template. Can be defined by Application.\nfunc (c *Command) SetUsageTemplate(s string) {\n\tif s == \"\" {\n\t\tc.usageTemplate = nil\n\t\treturn\n\t}\n\tc.usageTemplate = tmpl(s)\n}\n\n// SetFlagErrorFunc sets a function to generate an error when flag parsing\n// fails.\nfunc (c *Command) SetFlagErrorFunc(f func(*Command, error) error) {\n\tc.flagErrorFunc = f\n}\n\n// SetHelpFunc sets help function. Can be defined by Application.\nfunc (c *Command) SetHelpFunc(f func(*Command, []string)) {\n\tc.helpFunc = f\n}\n\n// SetHelpCommand sets help command.\nfunc (c *Command) SetHelpCommand(cmd *Command) {\n\tc.helpCommand = cmd\n}\n\n// SetHelpCommandGroupID sets the group id of the help command.\nfunc (c *Command) SetHelpCommandGroupID(groupID string) {\n\tif c.helpCommand != nil {\n\t\tc.helpCommand.GroupID = groupID\n\t}\n\t// helpCommandGroupID is used if no helpCommand is defined by the user\n\tc.helpCommandGroupID = groupID\n}\n\n// SetCompletionCommandGroupID sets the group id of the completion command.\nfunc (c *Command) SetCompletionCommandGroupID(groupID string) {\n\t// completionCommandGroupID is used if no completion command is defined by the user\n\tc.Root().completionCommandGroupID = groupID\n}\n\n// SetHelpTemplate sets help template to be used. Application can use it to set custom template.\nfunc (c *Command) SetHelpTemplate(s string) {\n\tif s == \"\" {\n\t\tc.helpTemplate = nil\n\t\treturn\n\t}\n\tc.helpTemplate = tmpl(s)\n}\n\n// SetVersionTemplate sets version template to be used. Application can use it to set custom template.\nfunc (c *Command) SetVersionTemplate(s string) {\n\tif s == \"\" {\n\t\tc.versionTemplate = nil\n\t\treturn\n\t}\n\tc.versionTemplate = tmpl(s)\n}\n\n// SetErrPrefix sets error message prefix to be used. Application can use it to set custom prefix.\nfunc (c *Command) SetErrPrefix(s string) {\n\tc.errPrefix = s\n}\n\n// SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands.\n// The user should not have a cyclic dependency on commands.\nfunc (c *Command) SetGlobalNormalizationFunc(n func(f *flag.FlagSet, name string) flag.NormalizedName) {\n\tc.Flags().SetNormalizeFunc(n)\n\tc.PersistentFlags().SetNormalizeFunc(n)\n\tc.globNormFunc = n\n\n\tfor _, command := range c.commands {\n\t\tcommand.SetGlobalNormalizationFunc(n)\n\t}\n}\n\n// OutOrStdout returns output to stdout.\nfunc (c *Command) OutOrStdout() io.Writer {\n\treturn c.getOut(os.Stdout)\n}\n\n// OutOrStderr returns output to stderr\nfunc (c *Command) OutOrStderr() io.Writer {\n\treturn c.getOut(os.Stderr)\n}\n\n// ErrOrStderr returns output to stderr\nfunc (c *Command) ErrOrStderr() io.Writer {\n\treturn c.getErr(os.Stderr)\n}\n\n// InOrStdin returns input to stdin\nfunc (c *Command) InOrStdin() io.Reader {\n\treturn c.getIn(os.Stdin)\n}\n\nfunc (c *Command) getOut(def io.Writer) io.Writer {\n\tif c.outWriter != nil {\n\t\treturn c.outWriter\n\t}\n\tif c.HasParent() {\n\t\treturn c.parent.getOut(def)\n\t}\n\treturn def\n}\n\nfunc (c *Command) getErr(def io.Writer) io.Writer {\n\tif c.errWriter != nil {\n\t\treturn c.errWriter\n\t}\n\tif c.HasParent() {\n\t\treturn c.parent.getErr(def)\n\t}\n\treturn def\n}\n\nfunc (c *Command) getIn(def io.Reader) io.Reader {\n\tif c.inReader != nil {\n\t\treturn c.inReader\n\t}\n\tif c.HasParent() {\n\t\treturn c.parent.getIn(def)\n\t}\n\treturn def\n}\n\n// UsageFunc returns either the function set by SetUsageFunc for this command\n// or a parent, or it returns a default usage function.\nfunc (c *Command) UsageFunc() (f func(*Command) error) {\n\tif c.usageFunc != nil {\n\t\treturn c.usageFunc\n\t}\n\tif c.HasParent() {\n\t\treturn c.Parent().UsageFunc()\n\t}\n\treturn func(c *Command) error {\n\t\tc.mergePersistentFlags()\n\t\tfn := c.getUsageTemplateFunc()\n\t\terr := fn(c.OutOrStderr(), c)\n\t\tif err != nil {\n\t\t\tc.PrintErrln(err)\n\t\t}\n\t\treturn err\n\t}\n}\n\n// getUsageTemplateFunc returns the usage template function for the command\n// going up the command tree if necessary.\nfunc (c *Command) getUsageTemplateFunc() func(w io.Writer, data interface{}) error {\n\tif c.usageTemplate != nil {\n\t\treturn c.usageTemplate.fn\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.getUsageTemplateFunc()\n\t}\n\treturn defaultUsageFunc\n}\n\n// Usage puts out the usage for the command.\n// Used when a user provides invalid input.\n// Can be defined by user by overriding UsageFunc.\nfunc (c *Command) Usage() error {\n\treturn c.UsageFunc()(c)\n}\n\n// HelpFunc returns either the function set by SetHelpFunc for this command\n// or a parent, or it returns a function with default help behavior.\nfunc (c *Command) HelpFunc() func(*Command, []string) {\n\tif c.helpFunc != nil {\n\t\treturn c.helpFunc\n\t}\n\tif c.HasParent() {\n\t\treturn c.Parent().HelpFunc()\n\t}\n\treturn func(c *Command, a []string) {\n\t\tc.mergePersistentFlags()\n\t\tfn := c.getHelpTemplateFunc()\n\t\t// The help should be sent to stdout\n\t\t// See https://github.com/spf13/cobra/issues/1002\n\t\terr := fn(c.OutOrStdout(), c)\n\t\tif err != nil {\n\t\t\tc.PrintErrln(err)\n\t\t}\n\t}\n}\n\n// getHelpTemplateFunc returns the help template function for the command\n// going up the command tree if necessary.\nfunc (c *Command) getHelpTemplateFunc() func(w io.Writer, data interface{}) error {\n\tif c.helpTemplate != nil {\n\t\treturn c.helpTemplate.fn\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.getHelpTemplateFunc()\n\t}\n\n\treturn defaultHelpFunc\n}\n\n// Help puts out the help for the command.\n// Used when a user calls help [command].\n// Can be defined by user by overriding HelpFunc.\nfunc (c *Command) Help() error {\n\tc.HelpFunc()(c, []string{})\n\treturn nil\n}\n\n// UsageString returns usage string.\nfunc (c *Command) UsageString() string {\n\t// Storing normal writers\n\ttmpOutput := c.outWriter\n\ttmpErr := c.errWriter\n\n\tbb := new(bytes.Buffer)\n\tc.outWriter = bb\n\tc.errWriter = bb\n\n\tCheckErr(c.Usage())\n\n\t// Setting things back to normal\n\tc.outWriter = tmpOutput\n\tc.errWriter = tmpErr\n\n\treturn bb.String()\n}\n\n// FlagErrorFunc returns either the function set by SetFlagErrorFunc for this\n// command or a parent, or it returns a function which returns the original\n// error.\nfunc (c *Command) FlagErrorFunc() (f func(*Command, error) error) {\n\tif c.flagErrorFunc != nil {\n\t\treturn c.flagErrorFunc\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.FlagErrorFunc()\n\t}\n\treturn func(c *Command, err error) error {\n\t\treturn err\n\t}\n}\n\nconst minUsagePadding = 25\n\n// UsagePadding return padding for the usage.\nfunc (c *Command) UsagePadding() int {\n\tif c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen {\n\t\treturn minUsagePadding\n\t}\n\treturn c.parent.commandsMaxUseLen\n}\n\nconst minCommandPathPadding = 11\n\n// CommandPathPadding return padding for the command path.\nfunc (c *Command) CommandPathPadding() int {\n\tif c.parent == nil || minCommandPathPadding > c.parent.commandsMaxCommandPathLen {\n\t\treturn minCommandPathPadding\n\t}\n\treturn c.parent.commandsMaxCommandPathLen\n}\n\nconst minNamePadding = 11\n\n// NamePadding returns padding for the name.\nfunc (c *Command) NamePadding() int {\n\tif c.parent == nil || minNamePadding > c.parent.commandsMaxNameLen {\n\t\treturn minNamePadding\n\t}\n\treturn c.parent.commandsMaxNameLen\n}\n\n// UsageTemplate returns usage template for the command.\n// This function is kept for backwards-compatibility reasons.\nfunc (c *Command) UsageTemplate() string {\n\tif c.usageTemplate != nil {\n\t\treturn c.usageTemplate.tmpl\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.UsageTemplate()\n\t}\n\treturn defaultUsageTemplate\n}\n\n// HelpTemplate return help template for the command.\n// This function is kept for backwards-compatibility reasons.\nfunc (c *Command) HelpTemplate() string {\n\tif c.helpTemplate != nil {\n\t\treturn c.helpTemplate.tmpl\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.HelpTemplate()\n\t}\n\treturn defaultHelpTemplate\n}\n\n// VersionTemplate return version template for the command.\n// This function is kept for backwards-compatibility reasons.\nfunc (c *Command) VersionTemplate() string {\n\tif c.versionTemplate != nil {\n\t\treturn c.versionTemplate.tmpl\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.VersionTemplate()\n\t}\n\treturn defaultVersionTemplate\n}\n\n// getVersionTemplateFunc returns the version template function for the command\n// going up the command tree if necessary.\nfunc (c *Command) getVersionTemplateFunc() func(w io.Writer, data interface{}) error {\n\tif c.versionTemplate != nil {\n\t\treturn c.versionTemplate.fn\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.getVersionTemplateFunc()\n\t}\n\treturn defaultVersionFunc\n}\n\n// ErrPrefix return error message prefix for the command\nfunc (c *Command) ErrPrefix() string {\n\tif c.errPrefix != \"\" {\n\t\treturn c.errPrefix\n\t}\n\n\tif c.HasParent() {\n\t\treturn c.parent.ErrPrefix()\n\t}\n\treturn \"Error:\"\n}\n\nfunc hasNoOptDefVal(name string, fs *flag.FlagSet) bool {\n\tflag := fs.Lookup(name)\n\tif flag == nil {\n\t\treturn false\n\t}\n\treturn flag.NoOptDefVal != \"\"\n}\n\nfunc shortHasNoOptDefVal(name string, fs *flag.FlagSet) bool {\n\tif len(name) == 0 {\n\t\treturn false\n\t}\n\n\tflag := fs.ShorthandLookup(name[:1])\n\tif flag == nil {\n\t\treturn false\n\t}\n\treturn flag.NoOptDefVal != \"\"\n}\n\nfunc stripFlags(args []string, c *Command) []string {\n\tif len(args) == 0 {\n\t\treturn args\n\t}\n\tc.mergePersistentFlags()\n\n\tcommands := []string{}\n\tflags := c.Flags()\n\nLoop:\n\tfor len(args) > 0 {\n\t\ts := args[0]\n\t\targs = args[1:]\n\t\tswitch {\n\t\tcase s == \"--\":\n\t\t\t// \"--\" terminates the flags\n\t\t\tbreak Loop\n\t\tcase strings.HasPrefix(s, \"--\") && !strings.Contains(s, \"=\") && !hasNoOptDefVal(s[2:], flags):\n\t\t\t// If '--flag arg' then\n\t\t\t// delete arg from args.\n\t\t\tfallthrough // (do the same as below)\n\t\tcase strings.HasPrefix(s, \"-\") && !strings.Contains(s, \"=\") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags):\n\t\t\t// If '-f arg' then\n\t\t\t// delete 'arg' from args or break the loop if len(args) <= 1.\n\t\t\tif len(args) <= 1 {\n\t\t\t\tbreak Loop\n\t\t\t} else {\n\t\t\t\targs = args[1:]\n\t\t\t\tcontinue\n\t\t\t}\n\t\tcase s != \"\" && !strings.HasPrefix(s, \"-\"):\n\t\t\tcommands = append(commands, s)\n\t\t}\n\t}\n\n\treturn commands\n}\n\n// argsMinusFirstX removes only the first x from args.  Otherwise, commands that look like\n// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]).\n// Special care needs to be taken not to remove a flag value.\nfunc (c *Command) argsMinusFirstX(args []string, x string) []string {\n\tif len(args) == 0 {\n\t\treturn args\n\t}\n\tc.mergePersistentFlags()\n\tflags := c.Flags()\n\nLoop:\n\tfor pos := 0; pos < len(args); pos++ {\n\t\ts := args[pos]\n\t\tswitch {\n\t\tcase s == \"--\":\n\t\t\t// -- means we have reached the end of the parseable args. Break out of the loop now.\n\t\t\tbreak Loop\n\t\tcase strings.HasPrefix(s, \"--\") && !strings.Contains(s, \"=\") && !hasNoOptDefVal(s[2:], flags):\n\t\t\tfallthrough\n\t\tcase strings.HasPrefix(s, \"-\") && !strings.Contains(s, \"=\") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags):\n\t\t\t// This is a flag without a default value, and an equal sign is not used. Increment pos in order to skip\n\t\t\t// over the next arg, because that is the value of this flag.\n\t\t\tpos++\n\t\t\tcontinue\n\t\tcase !strings.HasPrefix(s, \"-\"):\n\t\t\t// This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so,\n\t\t\t// return the args, excluding the one at this position.\n\t\t\tif s == x {\n\t\t\t\tret := make([]string, 0, len(args)-1)\n\t\t\t\tret = append(ret, args[:pos]...)\n\t\t\t\tret = append(ret, args[pos+1:]...)\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\t}\n\treturn args\n}\n\nfunc isFlagArg(arg string) bool {\n\treturn ((len(arg) >= 3 && arg[0:2] == \"--\") ||\n\t\t(len(arg) >= 2 && arg[0] == '-' && arg[1] != '-'))\n}\n\n// Find the target command given the args and command tree\n// Meant to be run on the highest node. Only searches down.\nfunc (c *Command) Find(args []string) (*Command, []string, error) {\n\tvar innerfind func(*Command, []string) (*Command, []string)\n\n\tinnerfind = func(c *Command, innerArgs []string) (*Command, []string) {\n\t\targsWOflags := stripFlags(innerArgs, c)\n\t\tif len(argsWOflags) == 0 {\n\t\t\treturn c, innerArgs\n\t\t}\n\t\tnextSubCmd := argsWOflags[0]\n\n\t\tcmd := c.findNext(nextSubCmd)\n\t\tif cmd != nil {\n\t\t\treturn innerfind(cmd, c.argsMinusFirstX(innerArgs, nextSubCmd))\n\t\t}\n\t\treturn c, innerArgs\n\t}\n\n\tcommandFound, a := innerfind(c, args)\n\tif commandFound.Args == nil {\n\t\treturn commandFound, a, legacyArgs(commandFound, stripFlags(a, commandFound))\n\t}\n\treturn commandFound, a, nil\n}\n\nfunc (c *Command) findSuggestions(arg string) string {\n\tif c.DisableSuggestions {\n\t\treturn \"\"\n\t}\n\tif c.SuggestionsMinimumDistance <= 0 {\n\t\tc.SuggestionsMinimumDistance = 2\n\t}\n\tvar sb strings.Builder\n\tif suggestions := c.SuggestionsFor(arg); len(suggestions) > 0 {\n\t\tsb.WriteString(\"\\n\\nDid you mean this?\\n\")\n\t\tfor _, s := range suggestions {\n\t\t\t_, _ = fmt.Fprintf(&sb, \"\\t%v\\n\", s)\n\t\t}\n\t}\n\treturn sb.String()\n}\n\nfunc (c *Command) findNext(next string) *Command {\n\tmatches := make([]*Command, 0)\n\tfor _, cmd := range c.commands {\n\t\tif commandNameMatches(cmd.Name(), next) || cmd.HasAlias(next) {\n\t\t\tcmd.commandCalledAs.name = next\n\t\t\treturn cmd\n\t\t}\n\t\tif EnablePrefixMatching && cmd.hasNameOrAliasPrefix(next) {\n\t\t\tmatches = append(matches, cmd)\n\t\t}\n\t}\n\n\tif len(matches) == 1 {\n\t\t// Temporarily disable gosec G602, which produces a false positive.\n\t\t// See https://github.com/securego/gosec/issues/1005.\n\t\treturn matches[0] // #nosec G602\n\t}\n\n\treturn nil\n}\n\n// Traverse the command tree to find the command, and parse args for\n// each parent.\nfunc (c *Command) Traverse(args []string) (*Command, []string, error) {\n\tflags := []string{}\n\tinFlag := false\n\n\tfor i, arg := range args {\n\t\tswitch {\n\t\t// A long flag with a space separated value\n\t\tcase strings.HasPrefix(arg, \"--\") && !strings.Contains(arg, \"=\"):\n\t\t\t// TODO: this isn't quite right, we should really check ahead for 'true' or 'false'\n\t\t\tinFlag = !hasNoOptDefVal(arg[2:], c.Flags())\n\t\t\tflags = append(flags, arg)\n\t\t\tcontinue\n\t\t// A short flag with a space separated value\n\t\tcase strings.HasPrefix(arg, \"-\") && !strings.Contains(arg, \"=\") && len(arg) == 2 && !shortHasNoOptDefVal(arg[1:], c.Flags()):\n\t\t\tinFlag = true\n\t\t\tflags = append(flags, arg)\n\t\t\tcontinue\n\t\t// The value for a flag\n\t\tcase inFlag:\n\t\t\tinFlag = false\n\t\t\tflags = append(flags, arg)\n\t\t\tcontinue\n\t\t// A flag without a value, or with an `=` separated value\n\t\tcase isFlagArg(arg):\n\t\t\tflags = append(flags, arg)\n\t\t\tcontinue\n\t\t}\n\n\t\tcmd := c.findNext(arg)\n\t\tif cmd == nil {\n\t\t\treturn c, args, nil\n\t\t}\n\n\t\tif err := c.ParseFlags(flags); err != nil {\n\t\t\treturn nil, args, err\n\t\t}\n\t\treturn cmd.Traverse(args[i+1:])\n\t}\n\treturn c, args, nil\n}\n\n// SuggestionsFor provides suggestions for the typedName.\nfunc (c *Command) SuggestionsFor(typedName string) []string {\n\tsuggestions := []string{}\n\tfor _, cmd := range c.commands {\n\t\tif cmd.IsAvailableCommand() {\n\t\t\tlevenshteinDistance := ld(typedName, cmd.Name(), true)\n\t\t\tsuggestByLevenshtein := levenshteinDistance <= c.SuggestionsMinimumDistance\n\t\t\tsuggestByPrefix := strings.HasPrefix(strings.ToLower(cmd.Name()), strings.ToLower(typedName))\n\t\t\tif suggestByLevenshtein || suggestByPrefix {\n\t\t\t\tsuggestions = append(suggestions, cmd.Name())\n\t\t\t}\n\t\t\tfor _, explicitSuggestion := range cmd.SuggestFor {\n\t\t\t\tif strings.EqualFold(typedName, explicitSuggestion) {\n\t\t\t\t\tsuggestions = append(suggestions, cmd.Name())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn suggestions\n}\n\n// VisitParents visits all parents of the command and invokes fn on each parent.\nfunc (c *Command) VisitParents(fn func(*Command)) {\n\tif c.HasParent() {\n\t\tfn(c.Parent())\n\t\tc.Parent().VisitParents(fn)\n\t}\n}\n\n// Root finds root command.\nfunc (c *Command) Root() *Command {\n\tif c.HasParent() {\n\t\treturn c.Parent().Root()\n\t}\n\treturn c\n}\n\n// ArgsLenAtDash will return the length of c.Flags().Args at the moment\n// when a -- was found during args parsing.\nfunc (c *Command) ArgsLenAtDash() int {\n\treturn c.Flags().ArgsLenAtDash()\n}\n\nfunc (c *Command) execute(a []string) (err error) {\n\tif c == nil {\n\t\treturn fmt.Errorf(\"called Execute() on a nil Command\")\n\t}\n\n\tif len(c.Deprecated) > 0 {\n\t\tc.Printf(\"Command %q is deprecated, %s\\n\", c.Name(), c.Deprecated)\n\t}\n\n\t// initialize help and version flag at the last point possible to allow for user\n\t// overriding\n\tc.InitDefaultHelpFlag()\n\tc.InitDefaultVersionFlag()\n\n\terr = c.ParseFlags(a)\n\tif err != nil {\n\t\treturn c.FlagErrorFunc()(c, err)\n\t}\n\n\t// If help is called, regardless of other flags, return we want help.\n\t// Also say we need help if the command isn't runnable.\n\thelpVal, err := c.Flags().GetBool(helpFlagName)\n\tif err != nil {\n\t\t// should be impossible to get here as we always declare a help\n\t\t// flag in InitDefaultHelpFlag()\n\t\tc.Println(\"\\\"help\\\" flag declared as non-bool. Please correct your code\")\n\t\treturn err\n\t}\n\n\tif helpVal {\n\t\treturn flag.ErrHelp\n\t}\n\n\t// for back-compat, only add version flag behavior if version is defined\n\tif c.Version != \"\" {\n\t\tversionVal, err := c.Flags().GetBool(\"version\")\n\t\tif err != nil {\n\t\t\tc.Println(\"\\\"version\\\" flag declared as non-bool. Please correct your code\")\n\t\t\treturn err\n\t\t}\n\t\tif versionVal {\n\t\t\tfn := c.getVersionTemplateFunc()\n\t\t\terr := fn(c.OutOrStdout(), c)\n\t\t\tif err != nil {\n\t\t\t\tc.Println(err)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif !c.Runnable() {\n\t\treturn flag.ErrHelp\n\t}\n\n\tc.preRun()\n\n\tdefer c.postRun()\n\n\targWoFlags := c.Flags().Args()\n\tif c.DisableFlagParsing {\n\t\targWoFlags = a\n\t}\n\n\tif err := c.ValidateArgs(argWoFlags); err != nil {\n\t\treturn err\n\t}\n\n\tparents := make([]*Command, 0, 5)\n\tfor p := c; p != nil; p = p.Parent() {\n\t\tif EnableTraverseRunHooks {\n\t\t\t// When EnableTraverseRunHooks is set:\n\t\t\t// - Execute all persistent pre-runs from the root parent till this command.\n\t\t\t// - Execute all persistent post-runs from this command till the root parent.\n\t\t\tparents = append([]*Command{p}, parents...)\n\t\t} else {\n\t\t\t// Otherwise, execute only the first found persistent hook.\n\t\t\tparents = append(parents, p)\n\t\t}\n\t}\n\tfor _, p := range parents {\n\t\tif p.PersistentPreRunE != nil {\n\t\t\tif err := p.PersistentPreRunE(c, argWoFlags); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !EnableTraverseRunHooks {\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else if p.PersistentPreRun != nil {\n\t\t\tp.PersistentPreRun(c, argWoFlags)\n\t\t\tif !EnableTraverseRunHooks {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif c.PreRunE != nil {\n\t\tif err := c.PreRunE(c, argWoFlags); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if c.PreRun != nil {\n\t\tc.PreRun(c, argWoFlags)\n\t}\n\n\tif err := c.ValidateRequiredFlags(); err != nil {\n\t\treturn err\n\t}\n\tif err := c.ValidateFlagGroups(); err != nil {\n\t\treturn err\n\t}\n\n\tif c.RunE != nil {\n\t\tif err := c.RunE(c, argWoFlags); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tc.Run(c, argWoFlags)\n\t}\n\tif c.PostRunE != nil {\n\t\tif err := c.PostRunE(c, argWoFlags); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if c.PostRun != nil {\n\t\tc.PostRun(c, argWoFlags)\n\t}\n\tfor p := c; p != nil; p = p.Parent() {\n\t\tif p.PersistentPostRunE != nil {\n\t\t\tif err := p.PersistentPostRunE(c, argWoFlags); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !EnableTraverseRunHooks {\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else if p.PersistentPostRun != nil {\n\t\t\tp.PersistentPostRun(c, argWoFlags)\n\t\t\tif !EnableTraverseRunHooks {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *Command) preRun() {\n\tfor _, x := range initializers {\n\t\tx()\n\t}\n}\n\nfunc (c *Command) postRun() {\n\tfor _, x := range finalizers {\n\t\tx()\n\t}\n}\n\n// ExecuteContext is the same as Execute(), but sets the ctx on the command.\n// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs\n// functions.\nfunc (c *Command) ExecuteContext(ctx context.Context) error {\n\tc.ctx = ctx\n\treturn c.Execute()\n}\n\n// Execute uses the args (os.Args[1:] by default)\n// and run through the command tree finding appropriate matches\n// for commands and then corresponding flags.\nfunc (c *Command) Execute() error {\n\t_, err := c.ExecuteC()\n\treturn err\n}\n\n// ExecuteContextC is the same as ExecuteC(), but sets the ctx on the command.\n// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs\n// functions.\nfunc (c *Command) ExecuteContextC(ctx context.Context) (*Command, error) {\n\tc.ctx = ctx\n\treturn c.ExecuteC()\n}\n\n// ExecuteC executes the command.\nfunc (c *Command) ExecuteC() (cmd *Command, err error) {\n\tif c.ctx == nil {\n\t\tc.ctx = context.Background()\n\t}\n\n\t// Regardless of what command execute is called on, run on Root only\n\tif c.HasParent() {\n\t\treturn c.Root().ExecuteC()\n\t}\n\n\t// windows hook\n\tif preExecHookFn != nil {\n\t\tpreExecHookFn(c)\n\t}\n\n\t// initialize help at the last point to allow for user overriding\n\tc.InitDefaultHelpCmd()\n\n\targs := c.args\n\n\t// Workaround FAIL with \"go test -v\" or \"cobra.test -test.v\", see #155\n\tif c.args == nil && filepath.Base(os.Args[0]) != \"cobra.test\" {\n\t\targs = os.Args[1:]\n\t}\n\n\t// initialize the __complete command to be used for shell completion\n\tc.initCompleteCmd(args)\n\n\t// initialize the default completion command\n\tc.InitDefaultCompletionCmd(args...)\n\n\t// Now that all commands have been created, let's make sure all groups\n\t// are properly created also\n\tc.checkCommandGroups()\n\n\tvar flags []string\n\tif c.TraverseChildren {\n\t\tcmd, flags, err = c.Traverse(args)\n\t} else {\n\t\tcmd, flags, err = c.Find(args)\n\t}\n\tif err != nil {\n\t\t// If found parse to a subcommand and then failed, talk about the subcommand\n\t\tif cmd != nil {\n\t\t\tc = cmd\n\t\t}\n\t\tif !c.SilenceErrors {\n\t\t\tc.PrintErrln(c.ErrPrefix(), err.Error())\n\t\t\tc.PrintErrf(\"Run '%v --help' for usage.\\n\", c.CommandPath())\n\t\t}\n\t\treturn c, err\n\t}\n\n\tcmd.commandCalledAs.called = true\n\tif cmd.commandCalledAs.name == \"\" {\n\t\tcmd.commandCalledAs.name = cmd.Name()\n\t}\n\n\t// We have to pass global context to children command\n\t// if context is present on the parent command.\n\tif cmd.ctx == nil {\n\t\tcmd.ctx = c.ctx\n\t}\n\n\terr = cmd.execute(flags)\n\tif err != nil {\n\t\t// Always show help if requested, even if SilenceErrors is in\n\t\t// effect\n\t\tif errors.Is(err, flag.ErrHelp) {\n\t\t\tcmd.HelpFunc()(cmd, args)\n\t\t\treturn cmd, nil\n\t\t}\n\n\t\t// If root command has SilenceErrors flagged,\n\t\t// all subcommands should respect it\n\t\tif !cmd.SilenceErrors && !c.SilenceErrors {\n\t\t\tc.PrintErrln(cmd.ErrPrefix(), err.Error())\n\t\t}\n\n\t\t// If root command has SilenceUsage flagged,\n\t\t// all subcommands should respect it\n\t\tif !cmd.SilenceUsage && !c.SilenceUsage {\n\t\t\tc.Println(cmd.UsageString())\n\t\t}\n\t}\n\treturn cmd, err\n}\n\nfunc (c *Command) ValidateArgs(args []string) error {\n\tif c.Args == nil {\n\t\treturn ArbitraryArgs(c, args)\n\t}\n\treturn c.Args(c, args)\n}\n\n// ValidateRequiredFlags validates all required flags are present and returns an error otherwise\nfunc (c *Command) ValidateRequiredFlags() error {\n\tif c.DisableFlagParsing {\n\t\treturn nil\n\t}\n\n\tflags := c.Flags()\n\tmissingFlagNames := []string{}\n\tflags.VisitAll(func(pflag *flag.Flag) {\n\t\trequiredAnnotation, found := pflag.Annotations[BashCompOneRequiredFlag]\n\t\tif !found {\n\t\t\treturn\n\t\t}\n\t\tif (requiredAnnotation[0] == \"true\") && !pflag.Changed {\n\t\t\tmissingFlagNames = append(missingFlagNames, pflag.Name)\n\t\t}\n\t})\n\n\tif len(missingFlagNames) > 0 {\n\t\treturn fmt.Errorf(`required flag(s) \"%s\" not set`, strings.Join(missingFlagNames, `\", \"`))\n\t}\n\treturn nil\n}\n\n// checkCommandGroups checks if a command has been added to a group that does not exists.\n// If so, we panic because it indicates a coding error that should be corrected.\nfunc (c *Command) checkCommandGroups() {\n\tfor _, sub := range c.commands {\n\t\t// if Group is not defined let the developer know right away\n\t\tif sub.GroupID != \"\" && !c.ContainsGroup(sub.GroupID) {\n\t\t\tpanic(fmt.Sprintf(\"group id '%s' is not defined for subcommand '%s'\", sub.GroupID, sub.CommandPath()))\n\t\t}\n\n\t\tsub.checkCommandGroups()\n\t}\n}\n\n// InitDefaultHelpFlag adds default help flag to c.\n// It is called automatically by executing the c or by calling help and usage.\n// If c already has help flag, it will do nothing.\nfunc (c *Command) InitDefaultHelpFlag() {\n\tc.mergePersistentFlags()\n\tif c.Flags().Lookup(helpFlagName) == nil {\n\t\tusage := \"help for \"\n\t\tname := c.DisplayName()\n\t\tif name == \"\" {\n\t\t\tusage += \"this command\"\n\t\t} else {\n\t\t\tusage += name\n\t\t}\n\t\tc.Flags().BoolP(helpFlagName, \"h\", false, usage)\n\t\t_ = c.Flags().SetAnnotation(helpFlagName, FlagSetByCobraAnnotation, []string{\"true\"})\n\t}\n}\n\n// InitDefaultVersionFlag adds default version flag to c.\n// It is called automatically by executing the c.\n// If c already has a version flag, it will do nothing.\n// If c.Version is empty, it will do nothing.\nfunc (c *Command) InitDefaultVersionFlag() {\n\tif c.Version == \"\" {\n\t\treturn\n\t}\n\n\tc.mergePersistentFlags()\n\tif c.Flags().Lookup(\"version\") == nil {\n\t\tusage := \"version for \"\n\t\tif c.Name() == \"\" {\n\t\t\tusage += \"this command\"\n\t\t} else {\n\t\t\tusage += c.DisplayName()\n\t\t}\n\t\tif c.Flags().ShorthandLookup(\"v\") == nil {\n\t\t\tc.Flags().BoolP(\"version\", \"v\", false, usage)\n\t\t} else {\n\t\t\tc.Flags().Bool(\"version\", false, usage)\n\t\t}\n\t\t_ = c.Flags().SetAnnotation(\"version\", FlagSetByCobraAnnotation, []string{\"true\"})\n\t}\n}\n\n// InitDefaultHelpCmd adds default help command to c.\n// It is called automatically by executing the c or by calling help and usage.\n// If c already has help command or c has no subcommands, it will do nothing.\nfunc (c *Command) InitDefaultHelpCmd() {\n\tif !c.HasSubCommands() {\n\t\treturn\n\t}\n\n\tif c.helpCommand == nil {\n\t\tc.helpCommand = &Command{\n\t\t\tUse:   \"help [command]\",\n\t\t\tShort: \"Help about any command\",\n\t\t\tLong: `Help provides help for any command in the application.\nSimply type ` + c.DisplayName() + ` help [path to command] for full details.`,\n\t\t\tValidArgsFunction: func(c *Command, args []string, toComplete string) ([]Completion, ShellCompDirective) {\n\t\t\t\tvar completions []Completion\n\t\t\t\tcmd, _, e := c.Root().Find(args)\n\t\t\t\tif e != nil {\n\t\t\t\t\treturn nil, ShellCompDirectiveNoFileComp\n\t\t\t\t}\n\t\t\t\tif cmd == nil {\n\t\t\t\t\t// Root help command.\n\t\t\t\t\tcmd = c.Root()\n\t\t\t\t}\n\t\t\t\tfor _, subCmd := range cmd.Commands() {\n\t\t\t\t\tif subCmd.IsAvailableCommand() || subCmd == cmd.helpCommand {\n\t\t\t\t\t\tif strings.HasPrefix(subCmd.Name(), toComplete) {\n\t\t\t\t\t\t\tcompletions = append(completions, CompletionWithDesc(subCmd.Name(), subCmd.Short))\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn completions, ShellCompDirectiveNoFileComp\n\t\t\t},\n\t\t\tRun: func(c *Command, args []string) {\n\t\t\t\tcmd, _, e := c.Root().Find(args)\n\t\t\t\tif cmd == nil || e != nil {\n\t\t\t\t\tc.Printf(\"Unknown help topic %#q\\n\", args)\n\t\t\t\t\tCheckErr(c.Root().Usage())\n\t\t\t\t} else {\n\t\t\t\t\t// FLow the context down to be used in help text\n\t\t\t\t\tif cmd.ctx == nil {\n\t\t\t\t\t\tcmd.ctx = c.ctx\n\t\t\t\t\t}\n\n\t\t\t\t\tcmd.InitDefaultHelpFlag()    // make possible 'help' flag to be shown\n\t\t\t\t\tcmd.InitDefaultVersionFlag() // make possible 'version' flag to be shown\n\t\t\t\t\tCheckErr(cmd.Help())\n\t\t\t\t}\n\t\t\t},\n\t\t\tGroupID: c.helpCommandGroupID,\n\t\t}\n\t}\n\tc.RemoveCommand(c.helpCommand)\n\tc.AddCommand(c.helpCommand)\n}\n\n// ResetCommands delete parent, subcommand and help command from c.\nfunc (c *Command) ResetCommands() {\n\tc.parent = nil\n\tc.commands = nil\n\tc.helpCommand = nil\n\tc.parentsPflags = nil\n}\n\n// Sorts commands by their names.\ntype commandSorterByName []*Command\n\nfunc (c commandSorterByName) Len() int           { return len(c) }\nfunc (c commandSorterByName) Swap(i, j int)      { c[i], c[j] = c[j], c[i] }\nfunc (c commandSorterByName) Less(i, j int) bool { return c[i].Name() < c[j].Name() }\n\n// Commands returns a sorted slice of child commands.\nfunc (c *Command) Commands() []*Command {\n\t// do not sort commands if it already sorted or sorting was disabled\n\tif EnableCommandSorting && !c.commandsAreSorted {\n\t\tsort.Sort(commandSorterByName(c.commands))\n\t\tc.commandsAreSorted = true\n\t}\n\treturn c.commands\n}\n\n// AddCommand adds one or more commands to this parent command.\nfunc (c *Command) AddCommand(cmds ...*Command) {\n\tfor i, x := range cmds {\n\t\tif cmds[i] == c {\n\t\t\tpanic(\"Command can't be a child of itself\")\n\t\t}\n\t\tcmds[i].parent = c\n\t\t// update max lengths\n\t\tusageLen := len(x.Use)\n\t\tif usageLen > c.commandsMaxUseLen {\n\t\t\tc.commandsMaxUseLen = usageLen\n\t\t}\n\t\tcommandPathLen := len(x.CommandPath())\n\t\tif commandPathLen > c.commandsMaxCommandPathLen {\n\t\t\tc.commandsMaxCommandPathLen = commandPathLen\n\t\t}\n\t\tnameLen := len(x.Name())\n\t\tif nameLen > c.commandsMaxNameLen {\n\t\t\tc.commandsMaxNameLen = nameLen\n\t\t}\n\t\t// If global normalization function exists, update all children\n\t\tif c.globNormFunc != nil {\n\t\t\tx.SetGlobalNormalizationFunc(c.globNormFunc)\n\t\t}\n\t\tc.commands = append(c.commands, x)\n\t\tc.commandsAreSorted = false\n\t}\n}\n\n// Groups returns a slice of child command groups.\nfunc (c *Command) Groups() []*Group {\n\treturn c.commandgroups\n}\n\n// AllChildCommandsHaveGroup returns if all subcommands are assigned to a group\nfunc (c *Command) AllChildCommandsHaveGroup() bool {\n\tfor _, sub := range c.commands {\n\t\tif (sub.IsAvailableCommand() || sub == c.helpCommand) && sub.GroupID == \"\" {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// ContainsGroup return if groupID exists in the list of command groups.\nfunc (c *Command) ContainsGroup(groupID string) bool {\n\tfor _, x := range c.commandgroups {\n\t\tif x.ID == groupID {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// AddGroup adds one or more command groups to this parent command.\nfunc (c *Command) AddGroup(groups ...*Group) {\n\tc.commandgroups = append(c.commandgroups, groups...)\n}\n\n// RemoveCommand removes one or more commands from a parent command.\nfunc (c *Command) RemoveCommand(cmds ...*Command) {\n\tcommands := []*Command{}\nmain:\n\tfor _, command := range c.commands {\n\t\tfor _, cmd := range cmds {\n\t\t\tif command == cmd {\n\t\t\t\tcommand.parent = nil\n\t\t\t\tcontinue main\n\t\t\t}\n\t\t}\n\t\tcommands = append(commands, command)\n\t}\n\tc.commands = commands\n\t// recompute all lengths\n\tc.commandsMaxUseLen = 0\n\tc.commandsMaxCommandPathLen = 0\n\tc.commandsMaxNameLen = 0\n\tfor _, command := range c.commands {\n\t\tusageLen := len(command.Use)\n\t\tif usageLen > c.commandsMaxUseLen {\n\t\t\tc.commandsMaxUseLen = usageLen\n\t\t}\n\t\tcommandPathLen := len(command.CommandPath())\n\t\tif commandPathLen > c.commandsMaxCommandPathLen {\n\t\t\tc.commandsMaxCommandPathLen = commandPathLen\n\t\t}\n\t\tnameLen := len(command.Name())\n\t\tif nameLen > c.commandsMaxNameLen {\n\t\t\tc.commandsMaxNameLen = nameLen\n\t\t}\n\t}\n}\n\n// Print is a convenience method to Print to the defined output, fallback to Stderr if not set.\nfunc (c *Command) Print(i ...interface{}) {\n\tfmt.Fprint(c.OutOrStderr(), i...)\n}\n\n// Println is a convenience method to Println to the defined output, fallback to Stderr if not set.\nfunc (c *Command) Println(i ...interface{}) {\n\tc.Print(fmt.Sprintln(i...))\n}\n\n// Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set.\nfunc (c *Command) Printf(format string, i ...interface{}) {\n\tc.Print(fmt.Sprintf(format, i...))\n}\n\n// PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set.\nfunc (c *Command) PrintErr(i ...interface{}) {\n\tfmt.Fprint(c.ErrOrStderr(), i...)\n}\n\n// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set.\nfunc (c *Command) PrintErrln(i ...interface{}) {\n\tc.PrintErr(fmt.Sprintln(i...))\n}\n\n// PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set.\nfunc (c *Command) PrintErrf(format string, i ...interface{}) {\n\tc.PrintErr(fmt.Sprintf(format, i...))\n}\n\n// CommandPath returns the full path to this command.\nfunc (c *Command) CommandPath() string {\n\tif c.HasParent() {\n\t\treturn c.Parent().CommandPath() + \" \" + c.Name()\n\t}\n\treturn c.DisplayName()\n}\n\n// DisplayName returns the name to display in help text. Returns command Name()\n// If CommandDisplayNameAnnoation is not set\nfunc (c *Command) DisplayName() string {\n\tif displayName, ok := c.Annotations[CommandDisplayNameAnnotation]; ok {\n\t\treturn displayName\n\t}\n\treturn c.Name()\n}\n\n// UseLine puts out the full usage for a given command (including parents).\nfunc (c *Command) UseLine() string {\n\tvar useline string\n\tuse := strings.Replace(c.Use, c.Name(), c.DisplayName(), 1)\n\tif c.HasParent() {\n\t\tuseline = c.parent.CommandPath() + \" \" + use\n\t} else {\n\t\tuseline = use\n\t}\n\tif c.DisableFlagsInUseLine {\n\t\treturn useline\n\t}\n\tif c.HasAvailableFlags() && !strings.Contains(useline, \"[flags]\") {\n\t\tuseline += \" [flags]\"\n\t}\n\treturn useline\n}\n\n// DebugFlags used to determine which flags have been assigned to which commands\n// and which persist.\nfunc (c *Command) DebugFlags() {\n\tc.Println(\"DebugFlags called on\", c.Name())\n\tvar debugflags func(*Command)\n\n\tdebugflags = func(x *Command) {\n\t\tif x.HasFlags() || x.HasPersistentFlags() {\n\t\t\tc.Println(x.Name())\n\t\t}\n\t\tif x.HasFlags() {\n\t\t\tx.flags.VisitAll(func(f *flag.Flag) {\n\t\t\t\tif x.HasPersistentFlags() && x.persistentFlag(f.Name) != nil {\n\t\t\t\t\tc.Println(\"  -\"+f.Shorthand+\",\", \"--\"+f.Name, \"[\"+f.DefValue+\"]\", \"\", f.Value, \"  [LP]\")\n\t\t\t\t} else {\n\t\t\t\t\tc.Println(\"  -\"+f.Shorthand+\",\", \"--\"+f.Name, \"[\"+f.DefValue+\"]\", \"\", f.Value, \"  [L]\")\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tif x.HasPersistentFlags() {\n\t\t\tx.pflags.VisitAll(func(f *flag.Flag) {\n\t\t\t\tif x.HasFlags() {\n\t\t\t\t\tif x.flags.Lookup(f.Name) == nil {\n\t\t\t\t\t\tc.Println(\"  -\"+f.Shorthand+\",\", \"--\"+f.Name, \"[\"+f.DefValue+\"]\", \"\", f.Value, \"  [P]\")\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tc.Println(\"  -\"+f.Shorthand+\",\", \"--\"+f.Name, \"[\"+f.DefValue+\"]\", \"\", f.Value, \"  [P]\")\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tc.Println(x.flagErrorBuf)\n\t\tif x.HasSubCommands() {\n\t\t\tfor _, y := range x.commands {\n\t\t\t\tdebugflags(y)\n\t\t\t}\n\t\t}\n\t}\n\n\tdebugflags(c)\n}\n\n// Name returns the command's name: the first word in the use line.\nfunc (c *Command) Name() string {\n\tname := c.Use\n\ti := strings.Index(name, \" \")\n\tif i >= 0 {\n\t\tname = name[:i]\n\t}\n\treturn name\n}\n\n// HasAlias determines if a given string is an alias of the command.\nfunc (c *Command) HasAlias(s string) bool {\n\tfor _, a := range c.Aliases {\n\t\tif commandNameMatches(a, s) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// CalledAs returns the command name or alias that was used to invoke\n// this command or an empty string if the command has not been called.\nfunc (c *Command) CalledAs() string {\n\tif c.commandCalledAs.called {\n\t\treturn c.commandCalledAs.name\n\t}\n\treturn \"\"\n}\n\n// hasNameOrAliasPrefix returns true if the Name or any of aliases start\n// with prefix\nfunc (c *Command) hasNameOrAliasPrefix(prefix string) bool {\n\tif strings.HasPrefix(c.Name(), prefix) {\n\t\tc.commandCalledAs.name = c.Name()\n\t\treturn true\n\t}\n\tfor _, alias := range c.Aliases {\n\t\tif strings.HasPrefix(alias, prefix) {\n\t\t\tc.commandCalledAs.name = alias\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// NameAndAliases returns a list of the command name and all aliases\nfunc (c *Command) NameAndAliases() string {\n\treturn strings.Join(append([]string{c.Name()}, c.Aliases...), \", \")\n}\n\n// HasExample determines if the command has example.\nfunc (c *Command) HasExample() bool {\n\treturn len(c.Example) > 0\n}\n\n// Runnable determines if the command is itself runnable.\nfunc (c *Command) Runnable() bool {\n\treturn c.Run != nil || c.RunE != nil\n}\n\n// HasSubCommands determines if the command has children commands.\nfunc (c *Command) HasSubCommands() bool {\n\treturn len(c.commands) > 0\n}\n\n// IsAvailableCommand determines if a command is available as a non-help command\n// (this includes all non deprecated/hidden commands).\nfunc (c *Command) IsAvailableCommand() bool {\n\tif len(c.Deprecated) != 0 || c.Hidden {\n\t\treturn false\n\t}\n\n\tif c.HasParent() && c.Parent().helpCommand == c {\n\t\treturn false\n\t}\n\n\tif c.Runnable() || c.HasAvailableSubCommands() {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// IsAdditionalHelpTopicCommand determines if a command is an additional\n// help topic command; additional help topic command is determined by the\n// fact that it is NOT runnable/hidden/deprecated, and has no sub commands that\n// are runnable/hidden/deprecated.\n// Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924.\nfunc (c *Command) IsAdditionalHelpTopicCommand() bool {\n\t// if a command is runnable, deprecated, or hidden it is not a 'help' command\n\tif c.Runnable() || len(c.Deprecated) != 0 || c.Hidden {\n\t\treturn false\n\t}\n\n\t// if any non-help sub commands are found, the command is not a 'help' command\n\tfor _, sub := range c.commands {\n\t\tif !sub.IsAdditionalHelpTopicCommand() {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// the command either has no sub commands, or no non-help sub commands\n\treturn true\n}\n\n// HasHelpSubCommands determines if a command has any available 'help' sub commands\n// that need to be shown in the usage/help default template under 'additional help\n// topics'.\nfunc (c *Command) HasHelpSubCommands() bool {\n\t// return true on the first found available 'help' sub command\n\tfor _, sub := range c.commands {\n\t\tif sub.IsAdditionalHelpTopicCommand() {\n\t\t\treturn true\n\t\t}\n\t}\n\n\t// the command either has no sub commands, or no available 'help' sub commands\n\treturn false\n}\n\n// HasAvailableSubCommands determines if a command has available sub commands that\n// need to be shown in the usage/help default template under 'available commands'.\nfunc (c *Command) HasAvailableSubCommands() bool {\n\t// return true on the first found available (non deprecated/help/hidden)\n\t// sub command\n\tfor _, sub := range c.commands {\n\t\tif sub.IsAvailableCommand() {\n\t\t\treturn true\n\t\t}\n\t}\n\n\t// the command either has no sub commands, or no available (non deprecated/help/hidden)\n\t// sub commands\n\treturn false\n}\n\n// HasParent determines if the command is a child command.\nfunc (c *Command) HasParent() bool {\n\treturn c.parent != nil\n}\n\n// GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist.\nfunc (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) flag.NormalizedName {\n\treturn c.globNormFunc\n}\n\n// Flags returns the complete FlagSet that applies\n// to this command (local and persistent declared here and by all parents).\nfunc (c *Command) Flags() *flag.FlagSet {\n\tif c.flags == nil {\n\t\tc.flags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\t\tif c.flagErrorBuf == nil {\n\t\t\tc.flagErrorBuf = new(bytes.Buffer)\n\t\t}\n\t\tc.flags.SetOutput(c.flagErrorBuf)\n\t}\n\n\treturn c.flags\n}\n\n// LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands.\n// This function does not modify the flags of the current command, it's purpose is to return the current state.\nfunc (c *Command) LocalNonPersistentFlags() *flag.FlagSet {\n\tpersistentFlags := c.PersistentFlags()\n\n\tout := flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\tc.LocalFlags().VisitAll(func(f *flag.Flag) {\n\t\tif persistentFlags.Lookup(f.Name) == nil {\n\t\t\tout.AddFlag(f)\n\t\t}\n\t})\n\treturn out\n}\n\n// LocalFlags returns the local FlagSet specifically set in the current command.\n// This function does not modify the flags of the current command, it's purpose is to return the current state.\nfunc (c *Command) LocalFlags() *flag.FlagSet {\n\tc.mergePersistentFlags()\n\n\tif c.lflags == nil {\n\t\tc.lflags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\t\tif c.flagErrorBuf == nil {\n\t\t\tc.flagErrorBuf = new(bytes.Buffer)\n\t\t}\n\t\tc.lflags.SetOutput(c.flagErrorBuf)\n\t}\n\tc.lflags.SortFlags = c.Flags().SortFlags\n\tif c.globNormFunc != nil {\n\t\tc.lflags.SetNormalizeFunc(c.globNormFunc)\n\t}\n\n\taddToLocal := func(f *flag.Flag) {\n\t\t// Add the flag if it is not a parent PFlag, or it shadows a parent PFlag\n\t\tif c.lflags.Lookup(f.Name) == nil && f != c.parentsPflags.Lookup(f.Name) {\n\t\t\tc.lflags.AddFlag(f)\n\t\t}\n\t}\n\tc.Flags().VisitAll(addToLocal)\n\tc.PersistentFlags().VisitAll(addToLocal)\n\treturn c.lflags\n}\n\n// InheritedFlags returns all flags which were inherited from parent commands.\n// This function does not modify the flags of the current command, it's purpose is to return the current state.\nfunc (c *Command) InheritedFlags() *flag.FlagSet {\n\tc.mergePersistentFlags()\n\n\tif c.iflags == nil {\n\t\tc.iflags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\t\tif c.flagErrorBuf == nil {\n\t\t\tc.flagErrorBuf = new(bytes.Buffer)\n\t\t}\n\t\tc.iflags.SetOutput(c.flagErrorBuf)\n\t}\n\n\tlocal := c.LocalFlags()\n\tif c.globNormFunc != nil {\n\t\tc.iflags.SetNormalizeFunc(c.globNormFunc)\n\t}\n\n\tc.parentsPflags.VisitAll(func(f *flag.Flag) {\n\t\tif c.iflags.Lookup(f.Name) == nil && local.Lookup(f.Name) == nil {\n\t\t\tc.iflags.AddFlag(f)\n\t\t}\n\t})\n\treturn c.iflags\n}\n\n// NonInheritedFlags returns all flags which were not inherited from parent commands.\n// This function does not modify the flags of the current command, it's purpose is to return the current state.\nfunc (c *Command) NonInheritedFlags() *flag.FlagSet {\n\treturn c.LocalFlags()\n}\n\n// PersistentFlags returns the persistent FlagSet specifically set in the current command.\nfunc (c *Command) PersistentFlags() *flag.FlagSet {\n\tif c.pflags == nil {\n\t\tc.pflags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\t\tif c.flagErrorBuf == nil {\n\t\t\tc.flagErrorBuf = new(bytes.Buffer)\n\t\t}\n\t\tc.pflags.SetOutput(c.flagErrorBuf)\n\t}\n\treturn c.pflags\n}\n\n// ResetFlags deletes all flags from command.\nfunc (c *Command) ResetFlags() {\n\tc.flagErrorBuf = new(bytes.Buffer)\n\tc.flagErrorBuf.Reset()\n\tc.flags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\tc.flags.SetOutput(c.flagErrorBuf)\n\tc.pflags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\tc.pflags.SetOutput(c.flagErrorBuf)\n\n\tc.lflags = nil\n\tc.iflags = nil\n\tc.parentsPflags = nil\n}\n\n// HasFlags checks if the command contains any flags (local plus persistent from the entire structure).\nfunc (c *Command) HasFlags() bool {\n\treturn c.Flags().HasFlags()\n}\n\n// HasPersistentFlags checks if the command contains persistent flags.\nfunc (c *Command) HasPersistentFlags() bool {\n\treturn c.PersistentFlags().HasFlags()\n}\n\n// HasLocalFlags checks if the command has flags specifically declared locally.\nfunc (c *Command) HasLocalFlags() bool {\n\treturn c.LocalFlags().HasFlags()\n}\n\n// HasInheritedFlags checks if the command has flags inherited from its parent command.\nfunc (c *Command) HasInheritedFlags() bool {\n\treturn c.InheritedFlags().HasFlags()\n}\n\n// HasAvailableFlags checks if the command contains any flags (local plus persistent from the entire\n// structure) which are not hidden or deprecated.\nfunc (c *Command) HasAvailableFlags() bool {\n\treturn c.Flags().HasAvailableFlags()\n}\n\n// HasAvailablePersistentFlags checks if the command contains persistent flags which are not hidden or deprecated.\nfunc (c *Command) HasAvailablePersistentFlags() bool {\n\treturn c.PersistentFlags().HasAvailableFlags()\n}\n\n// HasAvailableLocalFlags checks if the command has flags specifically declared locally which are not hidden\n// or deprecated.\nfunc (c *Command) HasAvailableLocalFlags() bool {\n\treturn c.LocalFlags().HasAvailableFlags()\n}\n\n// HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are\n// not hidden or deprecated.\nfunc (c *Command) HasAvailableInheritedFlags() bool {\n\treturn c.InheritedFlags().HasAvailableFlags()\n}\n\n// Flag climbs up the command tree looking for matching flag.\nfunc (c *Command) Flag(name string) (flag *flag.Flag) {\n\tflag = c.Flags().Lookup(name)\n\n\tif flag == nil {\n\t\tflag = c.persistentFlag(name)\n\t}\n\n\treturn\n}\n\n// Recursively find matching persistent flag.\nfunc (c *Command) persistentFlag(name string) (flag *flag.Flag) {\n\tif c.HasPersistentFlags() {\n\t\tflag = c.PersistentFlags().Lookup(name)\n\t}\n\n\tif flag == nil {\n\t\tc.updateParentsPflags()\n\t\tflag = c.parentsPflags.Lookup(name)\n\t}\n\treturn\n}\n\n// ParseFlags parses persistent flag tree and local flags.\nfunc (c *Command) ParseFlags(args []string) error {\n\tif c.DisableFlagParsing {\n\t\treturn nil\n\t}\n\n\tif c.flagErrorBuf == nil {\n\t\tc.flagErrorBuf = new(bytes.Buffer)\n\t}\n\tbeforeErrorBufLen := c.flagErrorBuf.Len()\n\tc.mergePersistentFlags()\n\n\t// do it here after merging all flags and just before parse\n\tc.Flags().ParseErrorsAllowlist = flag.ParseErrorsAllowlist(c.FParseErrWhitelist)\n\n\terr := c.Flags().Parse(args)\n\t// Print warnings if they occurred (e.g. deprecated flag messages).\n\tif c.flagErrorBuf.Len()-beforeErrorBufLen > 0 && err == nil {\n\t\tc.Print(c.flagErrorBuf.String())\n\t}\n\n\treturn err\n}\n\n// Parent returns a commands parent command.\nfunc (c *Command) Parent() *Command {\n\treturn c.parent\n}\n\n// mergePersistentFlags merges c.PersistentFlags() to c.Flags()\n// and adds missing persistent flags of all parents.\nfunc (c *Command) mergePersistentFlags() {\n\tc.updateParentsPflags()\n\tc.Flags().AddFlagSet(c.PersistentFlags())\n\tc.Flags().AddFlagSet(c.parentsPflags)\n}\n\n// updateParentsPflags updates c.parentsPflags by adding\n// new persistent flags of all parents.\n// If c.parentsPflags == nil, it makes new.\nfunc (c *Command) updateParentsPflags() {\n\tif c.parentsPflags == nil {\n\t\tc.parentsPflags = flag.NewFlagSet(c.DisplayName(), flag.ContinueOnError)\n\t\tc.parentsPflags.SetOutput(c.flagErrorBuf)\n\t\tc.parentsPflags.SortFlags = false\n\t}\n\n\tif c.globNormFunc != nil {\n\t\tc.parentsPflags.SetNormalizeFunc(c.globNormFunc)\n\t}\n\n\tc.Root().PersistentFlags().AddFlagSet(flag.CommandLine)\n\n\tc.VisitParents(func(parent *Command) {\n\t\tc.parentsPflags.AddFlagSet(parent.PersistentFlags())\n\t})\n}\n\n// commandNameMatches checks if two command names are equal\n// taking into account case sensitivity according to\n// EnableCaseInsensitive global configuration.\nfunc commandNameMatches(s string, t string) bool {\n\tif EnableCaseInsensitive {\n\t\treturn strings.EqualFold(s, t)\n\t}\n\n\treturn s == t\n}\n\n// tmplFunc holds a template and a function that will execute said template.\ntype tmplFunc struct {\n\ttmpl string\n\tfn   func(io.Writer, interface{}) error\n}\n\nconst defaultUsageTemplate = `Usage:{{if .Runnable}}\n  {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}}\n  {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}}\n\nAliases:\n  {{.NameAndAliases}}{{end}}{{if .HasExample}}\n\nExamples:\n{{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}}\n\nAvailable Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name \"help\"))}}\n  {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}}\n\n{{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name \"help\")))}}\n  {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}}\n\nAdditional Commands:{{range $cmds}}{{if (and (eq .GroupID \"\") (or .IsAvailableCommand (eq .Name \"help\")))}}\n  {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}\n\nFlags:\n{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}\n\nGlobal Flags:\n{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}}\n\nAdditional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}\n  {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}\n\nUse \"{{.CommandPath}} [command] --help\" for more information about a command.{{end}}\n`\n\n// defaultUsageFunc is equivalent to executing defaultUsageTemplate. The two should be changed in sync.\nfunc defaultUsageFunc(w io.Writer, in interface{}) error {\n\tc := in.(*Command)\n\tfmt.Fprint(w, \"Usage:\")\n\tif c.Runnable() {\n\t\tfmt.Fprintf(w, \"\\n  %s\", c.UseLine())\n\t}\n\tif c.HasAvailableSubCommands() {\n\t\tfmt.Fprintf(w, \"\\n  %s [command]\", c.CommandPath())\n\t}\n\tif len(c.Aliases) > 0 {\n\t\tfmt.Fprintf(w, \"\\n\\nAliases:\\n\")\n\t\tfmt.Fprintf(w, \"  %s\", c.NameAndAliases())\n\t}\n\tif c.HasExample() {\n\t\tfmt.Fprintf(w, \"\\n\\nExamples:\\n\")\n\t\tfmt.Fprintf(w, \"%s\", c.Example)\n\t}\n\tif c.HasAvailableSubCommands() {\n\t\tcmds := c.Commands()\n\t\tif len(c.Groups()) == 0 {\n\t\t\tfmt.Fprintf(w, \"\\n\\nAvailable Commands:\")\n\t\t\tfor _, subcmd := range cmds {\n\t\t\t\tif subcmd.IsAvailableCommand() || subcmd.Name() == helpCommandName {\n\t\t\t\t\tfmt.Fprintf(w, \"\\n  %s %s\", rpad(subcmd.Name(), subcmd.NamePadding()), subcmd.Short)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor _, group := range c.Groups() {\n\t\t\t\tfmt.Fprintf(w, \"\\n\\n%s\", group.Title)\n\t\t\t\tfor _, subcmd := range cmds {\n\t\t\t\t\tif subcmd.GroupID == group.ID && (subcmd.IsAvailableCommand() || subcmd.Name() == helpCommandName) {\n\t\t\t\t\t\tfmt.Fprintf(w, \"\\n  %s %s\", rpad(subcmd.Name(), subcmd.NamePadding()), subcmd.Short)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !c.AllChildCommandsHaveGroup() {\n\t\t\t\tfmt.Fprintf(w, \"\\n\\nAdditional Commands:\")\n\t\t\t\tfor _, subcmd := range cmds {\n\t\t\t\t\tif subcmd.GroupID == \"\" && (subcmd.IsAvailableCommand() || subcmd.Name() == helpCommandName) {\n\t\t\t\t\t\tfmt.Fprintf(w, \"\\n  %s %s\", rpad(subcmd.Name(), subcmd.NamePadding()), subcmd.Short)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif c.HasAvailableLocalFlags() {\n\t\tfmt.Fprintf(w, \"\\n\\nFlags:\\n\")\n\t\tfmt.Fprint(w, trimRightSpace(c.LocalFlags().FlagUsages()))\n\t}\n\tif c.HasAvailableInheritedFlags() {\n\t\tfmt.Fprintf(w, \"\\n\\nGlobal Flags:\\n\")\n\t\tfmt.Fprint(w, trimRightSpace(c.InheritedFlags().FlagUsages()))\n\t}\n\tif c.HasHelpSubCommands() {\n\t\tfmt.Fprintf(w, \"\\n\\nAdditional help topics:\")\n\t\tfor _, subcmd := range c.Commands() {\n\t\t\tif subcmd.IsAdditionalHelpTopicCommand() {\n\t\t\t\tfmt.Fprintf(w, \"\\n  %s %s\", rpad(subcmd.CommandPath(), subcmd.CommandPathPadding()), subcmd.Short)\n\t\t\t}\n\t\t}\n\t}\n\tif c.HasAvailableSubCommands() {\n\t\tfmt.Fprintf(w, \"\\n\\nUse \\\"%s [command] --help\\\" for more information about a command.\", c.CommandPath())\n\t}\n\tfmt.Fprintln(w)\n\treturn nil\n}\n\nconst defaultHelpTemplate = `{{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}}\n\n{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`\n\n// defaultHelpFunc is equivalent to executing defaultHelpTemplate. The two should be changed in sync.\nfunc defaultHelpFunc(w io.Writer, in interface{}) error {\n\tc := in.(*Command)\n\tusage := c.Long\n\tif usage == \"\" {\n\t\tusage = c.Short\n\t}\n\tusage = trimRightSpace(usage)\n\tif usage != \"\" {\n\t\tfmt.Fprintln(w, usage)\n\t\tfmt.Fprintln(w)\n\t}\n\tif c.Runnable() || c.HasSubCommands() {\n\t\tfmt.Fprint(w, c.UsageString())\n\t}\n\treturn nil\n}\n\nconst defaultVersionTemplate = `{{with .DisplayName}}{{printf \"%s \" .}}{{end}}{{printf \"version %s\" .Version}}\n`\n\n// defaultVersionFunc is equivalent to executing defaultVersionTemplate. The two should be changed in sync.\nfunc defaultVersionFunc(w io.Writer, in interface{}) error {\n\tc := in.(*Command)\n\t_, err := fmt.Fprintf(w, \"%s version %s\\n\", c.DisplayName(), c.Version)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/command_notwin.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !windows\n// +build !windows\n\npackage cobra\n\nvar preExecHookFn func(*Command)\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/command_win.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build windows\n// +build windows\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/inconshreveable/mousetrap\"\n)\n\nvar preExecHookFn = preExecHook\n\nfunc preExecHook(c *Command) {\n\tif MousetrapHelpText != \"\" && mousetrap.StartedByExplorer() {\n\t\tc.Print(MousetrapHelpText)\n\t\tif MousetrapDisplayDuration > 0 {\n\t\t\ttime.Sleep(MousetrapDisplayDuration)\n\t\t} else {\n\t\t\tc.Println(\"Press return to continue...\")\n\t\t\tfmt.Scanln()\n\t\t}\n\t\tos.Exit(1)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/spf13/pflag\"\n)\n\nconst (\n\t// ShellCompRequestCmd is the name of the hidden command that is used to request\n\t// completion results from the program.  It is used by the shell completion scripts.\n\tShellCompRequestCmd = \"__complete\"\n\t// ShellCompNoDescRequestCmd is the name of the hidden command that is used to request\n\t// completion results without their description.  It is used by the shell completion scripts.\n\tShellCompNoDescRequestCmd = \"__completeNoDesc\"\n)\n\n// Global map of flag completion functions. Make sure to use flagCompletionMutex before you try to read and write from it.\nvar flagCompletionFunctions = map[*pflag.Flag]CompletionFunc{}\n\n// lock for reading and writing from flagCompletionFunctions\nvar flagCompletionMutex = &sync.RWMutex{}\n\n// ShellCompDirective is a bit map representing the different behaviors the shell\n// can be instructed to have once completions have been provided.\ntype ShellCompDirective int\n\ntype flagCompError struct {\n\tsubCommand string\n\tflagName   string\n}\n\nfunc (e *flagCompError) Error() string {\n\treturn \"Subcommand '\" + e.subCommand + \"' does not support flag '\" + e.flagName + \"'\"\n}\n\nconst (\n\t// ShellCompDirectiveError indicates an error occurred and completions should be ignored.\n\tShellCompDirectiveError ShellCompDirective = 1 << iota\n\n\t// ShellCompDirectiveNoSpace indicates that the shell should not add a space\n\t// after the completion even if there is a single completion provided.\n\tShellCompDirectiveNoSpace\n\n\t// ShellCompDirectiveNoFileComp indicates that the shell should not provide\n\t// file completion even when no completion is provided.\n\tShellCompDirectiveNoFileComp\n\n\t// ShellCompDirectiveFilterFileExt indicates that the provided completions\n\t// should be used as file extension filters.\n\t// For flags, using Command.MarkFlagFilename() and Command.MarkPersistentFlagFilename()\n\t// is a shortcut to using this directive explicitly.  The BashCompFilenameExt\n\t// annotation can also be used to obtain the same behavior for flags.\n\tShellCompDirectiveFilterFileExt\n\n\t// ShellCompDirectiveFilterDirs indicates that only directory names should\n\t// be provided in file completion.  To request directory names within another\n\t// directory, the returned completions should specify the directory within\n\t// which to search.  The BashCompSubdirsInDir annotation can be used to\n\t// obtain the same behavior but only for flags.\n\tShellCompDirectiveFilterDirs\n\n\t// ShellCompDirectiveKeepOrder indicates that the shell should preserve the order\n\t// in which the completions are provided\n\tShellCompDirectiveKeepOrder\n\n\t// ===========================================================================\n\n\t// All directives using iota should be above this one.\n\t// For internal use.\n\tshellCompDirectiveMaxValue\n\n\t// ShellCompDirectiveDefault indicates to let the shell perform its default\n\t// behavior after completions have been provided.\n\t// This one must be last to avoid messing up the iota count.\n\tShellCompDirectiveDefault ShellCompDirective = 0\n)\n\nconst (\n\t// Constants for the completion command\n\tcompCmdName              = \"completion\"\n\tcompCmdNoDescFlagName    = \"no-descriptions\"\n\tcompCmdNoDescFlagDesc    = \"disable completion descriptions\"\n\tcompCmdNoDescFlagDefault = false\n)\n\n// CompletionOptions are the options to control shell completion\ntype CompletionOptions struct {\n\t// DisableDefaultCmd prevents Cobra from creating a default 'completion' command\n\tDisableDefaultCmd bool\n\t// DisableNoDescFlag prevents Cobra from creating the '--no-descriptions' flag\n\t// for shells that support completion descriptions\n\tDisableNoDescFlag bool\n\t// DisableDescriptions turns off all completion descriptions for shells\n\t// that support them\n\tDisableDescriptions bool\n\t// HiddenDefaultCmd makes the default 'completion' command hidden\n\tHiddenDefaultCmd bool\n\t// DefaultShellCompDirective sets the ShellCompDirective that is returned\n\t// if no special directive can be determined\n\tDefaultShellCompDirective *ShellCompDirective\n}\n\nfunc (receiver *CompletionOptions) SetDefaultShellCompDirective(directive ShellCompDirective) {\n\treceiver.DefaultShellCompDirective = &directive\n}\n\n// Completion is a string that can be used for completions\n//\n// two formats are supported:\n//   - the completion choice\n//   - the completion choice with a textual description (separated by a TAB).\n//\n// [CompletionWithDesc] can be used to create a completion string with a textual description.\n//\n// Note: Go type alias is used to provide a more descriptive name in the documentation, but any string can be used.\ntype Completion = string\n\n// CompletionFunc is a function that provides completion results.\ntype CompletionFunc = func(cmd *Command, args []string, toComplete string) ([]Completion, ShellCompDirective)\n\n// CompletionWithDesc returns a [Completion] with a description by using the TAB delimited format.\nfunc CompletionWithDesc(choice string, description string) Completion {\n\treturn choice + \"\\t\" + description\n}\n\n// NoFileCompletions can be used to disable file completion for commands that should\n// not trigger file completions.\n//\n// This method satisfies [CompletionFunc].\n// It can be used with [Command.RegisterFlagCompletionFunc] and for [Command.ValidArgsFunction].\nfunc NoFileCompletions(cmd *Command, args []string, toComplete string) ([]Completion, ShellCompDirective) {\n\treturn nil, ShellCompDirectiveNoFileComp\n}\n\n// FixedCompletions can be used to create a completion function which always\n// returns the same results.\n//\n// This method returns a function that satisfies [CompletionFunc]\n// It can be used with [Command.RegisterFlagCompletionFunc] and for [Command.ValidArgsFunction].\nfunc FixedCompletions(choices []Completion, directive ShellCompDirective) CompletionFunc {\n\treturn func(cmd *Command, args []string, toComplete string) ([]Completion, ShellCompDirective) {\n\t\treturn choices, directive\n\t}\n}\n\n// RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag.\n//\n// You can use pre-defined completion functions such as [FixedCompletions] or [NoFileCompletions],\n// or you can define your own.\nfunc (c *Command) RegisterFlagCompletionFunc(flagName string, f CompletionFunc) error {\n\tflag := c.Flag(flagName)\n\tif flag == nil {\n\t\treturn fmt.Errorf(\"RegisterFlagCompletionFunc: flag '%s' does not exist\", flagName)\n\t}\n\tflagCompletionMutex.Lock()\n\tdefer flagCompletionMutex.Unlock()\n\n\tif _, exists := flagCompletionFunctions[flag]; exists {\n\t\treturn fmt.Errorf(\"RegisterFlagCompletionFunc: flag '%s' already registered\", flagName)\n\t}\n\tflagCompletionFunctions[flag] = f\n\treturn nil\n}\n\n// GetFlagCompletionFunc returns the completion function for the given flag of the command, if available.\nfunc (c *Command) GetFlagCompletionFunc(flagName string) (CompletionFunc, bool) {\n\tflag := c.Flag(flagName)\n\tif flag == nil {\n\t\treturn nil, false\n\t}\n\n\tflagCompletionMutex.RLock()\n\tdefer flagCompletionMutex.RUnlock()\n\n\tcompletionFunc, exists := flagCompletionFunctions[flag]\n\treturn completionFunc, exists\n}\n\n// Returns a string listing the different directive enabled in the specified parameter\nfunc (d ShellCompDirective) string() string {\n\tvar directives []string\n\tif d&ShellCompDirectiveError != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveError\")\n\t}\n\tif d&ShellCompDirectiveNoSpace != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveNoSpace\")\n\t}\n\tif d&ShellCompDirectiveNoFileComp != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveNoFileComp\")\n\t}\n\tif d&ShellCompDirectiveFilterFileExt != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveFilterFileExt\")\n\t}\n\tif d&ShellCompDirectiveFilterDirs != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveFilterDirs\")\n\t}\n\tif d&ShellCompDirectiveKeepOrder != 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveKeepOrder\")\n\t}\n\tif len(directives) == 0 {\n\t\tdirectives = append(directives, \"ShellCompDirectiveDefault\")\n\t}\n\n\tif d >= shellCompDirectiveMaxValue {\n\t\treturn fmt.Sprintf(\"ERROR: unexpected ShellCompDirective value: %d\", d)\n\t}\n\treturn strings.Join(directives, \", \")\n}\n\n// initCompleteCmd adds a special hidden command that can be used to request custom completions.\nfunc (c *Command) initCompleteCmd(args []string) {\n\tcompleteCmd := &Command{\n\t\tUse:                   fmt.Sprintf(\"%s [command-line]\", ShellCompRequestCmd),\n\t\tAliases:               []string{ShellCompNoDescRequestCmd},\n\t\tDisableFlagsInUseLine: true,\n\t\tHidden:                true,\n\t\tDisableFlagParsing:    true,\n\t\tArgs:                  MinimumNArgs(1),\n\t\tShort:                 \"Request shell completion choices for the specified command-line\",\n\t\tLong: fmt.Sprintf(\"%[2]s is a special command that is used by the shell completion logic\\n%[1]s\",\n\t\t\t\"to request completion choices for the specified command-line.\", ShellCompRequestCmd),\n\t\tRun: func(cmd *Command, args []string) {\n\t\t\tfinalCmd, completions, directive, err := cmd.getCompletions(args)\n\t\t\tif err != nil {\n\t\t\t\tCompErrorln(err.Error())\n\t\t\t\t// Keep going for multiple reasons:\n\t\t\t\t// 1- There could be some valid completions even though there was an error\n\t\t\t\t// 2- Even without completions, we need to print the directive\n\t\t\t}\n\n\t\t\tnoDescriptions := cmd.CalledAs() == ShellCompNoDescRequestCmd\n\t\t\tif !noDescriptions {\n\t\t\t\tif doDescriptions, err := strconv.ParseBool(getEnvConfig(cmd, configEnvVarSuffixDescriptions)); err == nil {\n\t\t\t\t\tnoDescriptions = !doDescriptions\n\t\t\t\t}\n\t\t\t}\n\t\t\tnoActiveHelp := GetActiveHelpConfig(finalCmd) == activeHelpGlobalDisable\n\t\t\tout := finalCmd.OutOrStdout()\n\t\t\tfor _, comp := range completions {\n\t\t\t\tif noActiveHelp && strings.HasPrefix(comp, activeHelpMarker) {\n\t\t\t\t\t// Remove all activeHelp entries if it's disabled.\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif noDescriptions {\n\t\t\t\t\t// Remove any description that may be included following a tab character.\n\t\t\t\t\tcomp = strings.SplitN(comp, \"\\t\", 2)[0]\n\t\t\t\t}\n\n\t\t\t\t// Make sure we only write the first line to the output.\n\t\t\t\t// This is needed if a description contains a linebreak.\n\t\t\t\t// Otherwise the shell scripts will interpret the other lines as new flags\n\t\t\t\t// and could therefore provide a wrong completion.\n\t\t\t\tcomp = strings.SplitN(comp, \"\\n\", 2)[0]\n\n\t\t\t\t// Finally trim the completion.  This is especially important to get rid\n\t\t\t\t// of a trailing tab when there are no description following it.\n\t\t\t\t// For example, a sub-command without a description should not be completed\n\t\t\t\t// with a tab at the end (or else zsh will show a -- following it\n\t\t\t\t// although there is no description).\n\t\t\t\tcomp = strings.TrimSpace(comp)\n\n\t\t\t\t// Print each possible completion to the output for the completion script to consume.\n\t\t\t\tfmt.Fprintln(out, comp)\n\t\t\t}\n\n\t\t\t// As the last printout, print the completion directive for the completion script to parse.\n\t\t\t// The directive integer must be that last character following a single colon (:).\n\t\t\t// The completion script expects :<directive>\n\t\t\tfmt.Fprintf(out, \":%d\\n\", directive)\n\n\t\t\t// Print some helpful info to stderr for the user to understand.\n\t\t\t// Output from stderr must be ignored by the completion script.\n\t\t\tfmt.Fprintf(finalCmd.ErrOrStderr(), \"Completion ended with directive: %s\\n\", directive.string())\n\t\t},\n\t}\n\tc.AddCommand(completeCmd)\n\tsubCmd, _, err := c.Find(args)\n\tif err != nil || subCmd.Name() != ShellCompRequestCmd {\n\t\t// Only create this special command if it is actually being called.\n\t\t// This reduces possible side-effects of creating such a command;\n\t\t// for example, having this command would cause problems to a\n\t\t// cobra program that only consists of the root command, since this\n\t\t// command would cause the root command to suddenly have a subcommand.\n\t\tc.RemoveCommand(completeCmd)\n\t}\n}\n\n// SliceValue is a reduced version of [pflag.SliceValue]. It is used to detect\n// flags that accept multiple values and therefore can provide completion\n// multiple times.\ntype SliceValue interface {\n\t// GetSlice returns the flag value list as an array of strings.\n\tGetSlice() []string\n}\n\nfunc (c *Command) getCompletions(args []string) (*Command, []Completion, ShellCompDirective, error) {\n\t// The last argument, which is not completely typed by the user,\n\t// should not be part of the list of arguments\n\ttoComplete := args[len(args)-1]\n\ttrimmedArgs := args[:len(args)-1]\n\n\tvar finalCmd *Command\n\tvar finalArgs []string\n\tvar err error\n\t// Find the real command for which completion must be performed\n\t// check if we need to traverse here to parse local flags on parent commands\n\tif c.Root().TraverseChildren {\n\t\tfinalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs)\n\t} else {\n\t\t// For Root commands that don't specify any value for their Args fields, when we call\n\t\t// Find(), if those Root commands don't have any sub-commands, they will accept arguments.\n\t\t// However, because we have added the __complete sub-command in the current code path, the\n\t\t// call to Find() -> legacyArgs() will return an error if there are any arguments.\n\t\t// To avoid this, we first remove the __complete command to get back to having no sub-commands.\n\t\trootCmd := c.Root()\n\t\tif len(rootCmd.Commands()) == 1 {\n\t\t\trootCmd.RemoveCommand(c)\n\t\t}\n\n\t\tfinalCmd, finalArgs, err = rootCmd.Find(trimmedArgs)\n\t}\n\tif err != nil {\n\t\t// Unable to find the real command. E.g., <program> someInvalidCmd <TAB>\n\t\treturn c, []Completion{}, ShellCompDirectiveDefault, fmt.Errorf(\"unable to find a command for arguments: %v\", trimmedArgs)\n\t}\n\tfinalCmd.ctx = c.ctx\n\n\t// These flags are normally added when `execute()` is called on `finalCmd`,\n\t// however, when doing completion, we don't call `finalCmd.execute()`.\n\t// Let's add the --help and --version flag ourselves but only if the finalCmd\n\t// has not disabled flag parsing; if flag parsing is disabled, it is up to the\n\t// finalCmd itself to handle the completion of *all* flags.\n\tif !finalCmd.DisableFlagParsing {\n\t\tfinalCmd.InitDefaultHelpFlag()\n\t\tfinalCmd.InitDefaultVersionFlag()\n\t}\n\n\t// Check if we are doing flag value completion before parsing the flags.\n\t// This is important because if we are completing a flag value, we need to also\n\t// remove the flag name argument from the list of finalArgs or else the parsing\n\t// could fail due to an invalid value (incomplete) for the flag.\n\tflag, finalArgs, toComplete, flagErr := checkIfFlagCompletion(finalCmd, finalArgs, toComplete)\n\n\t// Check if interspersed is false or -- was set on a previous arg.\n\t// This works by counting the arguments. Normally -- is not counted as arg but\n\t// if -- was already set or interspersed is false and there is already one arg then\n\t// the extra added -- is counted as arg.\n\tflagCompletion := true\n\t_ = finalCmd.ParseFlags(append(finalArgs, \"--\"))\n\tnewArgCount := finalCmd.Flags().NArg()\n\n\t// Parse the flags early so we can check if required flags are set\n\tif err = finalCmd.ParseFlags(finalArgs); err != nil {\n\t\treturn finalCmd, []Completion{}, ShellCompDirectiveDefault, fmt.Errorf(\"Error while parsing flags from args %v: %s\", finalArgs, err.Error())\n\t}\n\n\trealArgCount := finalCmd.Flags().NArg()\n\tif newArgCount > realArgCount {\n\t\t// don't do flag completion (see above)\n\t\tflagCompletion = false\n\t}\n\t// Error while attempting to parse flags\n\tif flagErr != nil {\n\t\t// If error type is flagCompError and we don't want flagCompletion we should ignore the error\n\t\tif _, ok := flagErr.(*flagCompError); !ok || flagCompletion {\n\t\t\treturn finalCmd, []Completion{}, ShellCompDirectiveDefault, flagErr\n\t\t}\n\t}\n\n\t// Look for the --help or --version flags.  If they are present,\n\t// there should be no further completions.\n\tif helpOrVersionFlagPresent(finalCmd) {\n\t\treturn finalCmd, []Completion{}, ShellCompDirectiveNoFileComp, nil\n\t}\n\n\t// We only remove the flags from the arguments if DisableFlagParsing is not set.\n\t// This is important for commands which have requested to do their own flag completion.\n\tif !finalCmd.DisableFlagParsing {\n\t\tfinalArgs = finalCmd.Flags().Args()\n\t}\n\n\tif flag != nil && flagCompletion {\n\t\t// Check if we are completing a flag value subject to annotations\n\t\tif validExts, present := flag.Annotations[BashCompFilenameExt]; present {\n\t\t\tif len(validExts) != 0 {\n\t\t\t\t// File completion filtered by extensions\n\t\t\t\treturn finalCmd, validExts, ShellCompDirectiveFilterFileExt, nil\n\t\t\t}\n\n\t\t\t// The annotation requests simple file completion.  There is no reason to do\n\t\t\t// that since it is the default behavior anyway.  Let's ignore this annotation\n\t\t\t// in case the program also registered a completion function for this flag.\n\t\t\t// Even though it is a mistake on the program's side, let's be nice when we can.\n\t\t}\n\n\t\tif subDir, present := flag.Annotations[BashCompSubdirsInDir]; present {\n\t\t\tif len(subDir) == 1 {\n\t\t\t\t// Directory completion from within a directory\n\t\t\t\treturn finalCmd, subDir, ShellCompDirectiveFilterDirs, nil\n\t\t\t}\n\t\t\t// Directory completion\n\t\t\treturn finalCmd, []Completion{}, ShellCompDirectiveFilterDirs, nil\n\t\t}\n\t}\n\n\tvar completions []Completion\n\tvar directive ShellCompDirective\n\n\t// Enforce flag groups before doing flag completions\n\tfinalCmd.enforceFlagGroupsForCompletion()\n\n\t// Note that we want to perform flagname completion even if finalCmd.DisableFlagParsing==true;\n\t// doing this allows for completion of persistent flag names even for commands that disable flag parsing.\n\t//\n\t// When doing completion of a flag name, as soon as an argument starts with\n\t// a '-' we know it is a flag.  We cannot use isFlagArg() here as it requires\n\t// the flag name to be complete\n\tif flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, \"=\") && flagCompletion {\n\t\t// First check for required flags\n\t\tcompletions = completeRequireFlags(finalCmd, toComplete)\n\n\t\t// If we have not found any required flags, only then can we show regular flags\n\t\tif len(completions) == 0 {\n\t\t\tdoCompleteFlags := func(flag *pflag.Flag) {\n\t\t\t\t_, acceptsMultiple := flag.Value.(SliceValue)\n\t\t\t\tacceptsMultiple = acceptsMultiple ||\n\t\t\t\t\tstrings.Contains(flag.Value.Type(), \"Slice\") ||\n\t\t\t\t\tstrings.Contains(flag.Value.Type(), \"Array\") ||\n\t\t\t\t\tstrings.HasPrefix(flag.Value.Type(), \"stringTo\")\n\n\t\t\t\tif !flag.Changed || acceptsMultiple {\n\t\t\t\t\t// If the flag is not already present, or if it can be specified multiple times (Array, Slice, or stringTo)\n\t\t\t\t\t// we suggest it as a completion\n\t\t\t\t\tcompletions = append(completions, getFlagNameCompletions(flag, toComplete)...)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands\n\t\t\t// that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and\n\t\t\t// non-inherited flags.\n\t\t\tfinalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\t\t\tdoCompleteFlags(flag)\n\t\t\t})\n\t\t\t// Try to complete non-inherited flags even if DisableFlagParsing==true.\n\t\t\t// This allows programs to tell Cobra about flags for completion even\n\t\t\t// if the actual parsing of flags is not done by Cobra.\n\t\t\t// For instance, Helm uses this to provide flag name completion for\n\t\t\t// some of its plugins.\n\t\t\tfinalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\t\t\tdoCompleteFlags(flag)\n\t\t\t})\n\t\t}\n\n\t\tdirective = ShellCompDirectiveNoFileComp\n\t\tif len(completions) == 1 && strings.HasSuffix(completions[0], \"=\") {\n\t\t\t// If there is a single completion, the shell usually adds a space\n\t\t\t// after the completion.  We don't want that if the flag ends with an =\n\t\t\tdirective = ShellCompDirectiveNoSpace\n\t\t}\n\n\t\tif !finalCmd.DisableFlagParsing {\n\t\t\t// If DisableFlagParsing==false, we have completed the flags as known by Cobra;\n\t\t\t// we can return what we found.\n\t\t\t// If DisableFlagParsing==true, Cobra may not be aware of all flags, so we\n\t\t\t// let the logic continue to see if ValidArgsFunction needs to be called.\n\t\t\treturn finalCmd, completions, directive, nil\n\t\t}\n\t} else {\n\t\tdirective = ShellCompDirectiveDefault\n\t\t// check current and parent commands for a custom DefaultShellCompDirective\n\t\tfor cmd := finalCmd; cmd != nil; cmd = cmd.parent {\n\t\t\tif cmd.CompletionOptions.DefaultShellCompDirective != nil {\n\t\t\t\tdirective = *cmd.CompletionOptions.DefaultShellCompDirective\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif flag == nil {\n\t\t\tfoundLocalNonPersistentFlag := false\n\t\t\t// If TraverseChildren is true on the root command we don't check for\n\t\t\t// local flags because we can use a local flag on a parent command\n\t\t\tif !finalCmd.Root().TraverseChildren {\n\t\t\t\t// Check if there are any local, non-persistent flags on the command-line\n\t\t\t\tlocalNonPersistentFlags := finalCmd.LocalNonPersistentFlags()\n\t\t\t\tfinalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\t\t\t\tif localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed {\n\t\t\t\t\t\tfoundLocalNonPersistentFlag = true\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Complete subcommand names, including the help command\n\t\t\tif len(finalArgs) == 0 && !foundLocalNonPersistentFlag {\n\t\t\t\t// We only complete sub-commands if:\n\t\t\t\t// - there are no arguments on the command-line and\n\t\t\t\t// - there are no local, non-persistent flags on the command-line or TraverseChildren is true\n\t\t\t\tfor _, subCmd := range finalCmd.Commands() {\n\t\t\t\t\tif subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand {\n\t\t\t\t\t\tif strings.HasPrefix(subCmd.Name(), toComplete) {\n\t\t\t\t\t\t\tcompletions = append(completions, CompletionWithDesc(subCmd.Name(), subCmd.Short))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdirective = ShellCompDirectiveNoFileComp\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Complete required flags even without the '-' prefix\n\t\t\tcompletions = append(completions, completeRequireFlags(finalCmd, toComplete)...)\n\n\t\t\t// Always complete ValidArgs, even if we are completing a subcommand name.\n\t\t\t// This is for commands that have both subcommands and ValidArgs.\n\t\t\tif len(finalCmd.ValidArgs) > 0 {\n\t\t\t\tif len(finalArgs) == 0 {\n\t\t\t\t\t// ValidArgs are only for the first argument\n\t\t\t\t\tfor _, validArg := range finalCmd.ValidArgs {\n\t\t\t\t\t\tif strings.HasPrefix(validArg, toComplete) {\n\t\t\t\t\t\t\tcompletions = append(completions, validArg)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirective = ShellCompDirectiveNoFileComp\n\n\t\t\t\t\t// If no completions were found within commands or ValidArgs,\n\t\t\t\t\t// see if there are any ArgAliases that should be completed.\n\t\t\t\t\tif len(completions) == 0 {\n\t\t\t\t\t\tfor _, argAlias := range finalCmd.ArgAliases {\n\t\t\t\t\t\t\tif strings.HasPrefix(argAlias, toComplete) {\n\t\t\t\t\t\t\t\tcompletions = append(completions, argAlias)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there are ValidArgs specified (even if they don't match), we stop completion.\n\t\t\t\t// Only one of ValidArgs or ValidArgsFunction can be used for a single command.\n\t\t\t\treturn finalCmd, completions, directive, nil\n\t\t\t}\n\n\t\t\t// Let the logic continue so as to add any ValidArgsFunction completions,\n\t\t\t// even if we already found sub-commands.\n\t\t\t// This is for commands that have subcommands but also specify a ValidArgsFunction.\n\t\t}\n\t}\n\n\t// Find the completion function for the flag or command\n\tvar completionFn CompletionFunc\n\tif flag != nil && flagCompletion {\n\t\tflagCompletionMutex.RLock()\n\t\tcompletionFn = flagCompletionFunctions[flag]\n\t\tflagCompletionMutex.RUnlock()\n\t} else {\n\t\tcompletionFn = finalCmd.ValidArgsFunction\n\t}\n\tif completionFn != nil {\n\t\t// Go custom completion defined for this flag or command.\n\t\t// Call the registered completion function to get the completions.\n\t\tvar comps []Completion\n\t\tcomps, directive = completionFn(finalCmd, finalArgs, toComplete)\n\t\tcompletions = append(completions, comps...)\n\t}\n\n\treturn finalCmd, completions, directive, nil\n}\n\nfunc helpOrVersionFlagPresent(cmd *Command) bool {\n\tif versionFlag := cmd.Flags().Lookup(\"version\"); versionFlag != nil &&\n\t\tlen(versionFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && versionFlag.Changed {\n\t\treturn true\n\t}\n\tif helpFlag := cmd.Flags().Lookup(helpFlagName); helpFlag != nil &&\n\t\tlen(helpFlag.Annotations[FlagSetByCobraAnnotation]) > 0 && helpFlag.Changed {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc getFlagNameCompletions(flag *pflag.Flag, toComplete string) []Completion {\n\tif nonCompletableFlag(flag) {\n\t\treturn []Completion{}\n\t}\n\n\tvar completions []Completion\n\tflagName := \"--\" + flag.Name\n\tif strings.HasPrefix(flagName, toComplete) {\n\t\t// Flag without the =\n\t\tcompletions = append(completions, CompletionWithDesc(flagName, flag.Usage))\n\n\t\t// Why suggest both long forms: --flag and --flag= ?\n\t\t// This forces the user to *always* have to type either an = or a space after the flag name.\n\t\t// Let's be nice and avoid making users have to do that.\n\t\t// Since boolean flags and shortname flags don't show the = form, let's go that route and never show it.\n\t\t// The = form will still work, we just won't suggest it.\n\t\t// This also makes the list of suggested flags shorter as we avoid all the = forms.\n\t\t//\n\t\t// if len(flag.NoOptDefVal) == 0 {\n\t\t// \t// Flag requires a value, so it can be suffixed with =\n\t\t// \tflagName += \"=\"\n\t\t// \tcompletions = append(completions, CompletionWithDesc(flagName, flag.Usage))\n\t\t// }\n\t}\n\n\tflagName = \"-\" + flag.Shorthand\n\tif len(flag.Shorthand) > 0 && strings.HasPrefix(flagName, toComplete) {\n\t\tcompletions = append(completions, CompletionWithDesc(flagName, flag.Usage))\n\t}\n\n\treturn completions\n}\n\nfunc completeRequireFlags(finalCmd *Command, toComplete string) []Completion {\n\tvar completions []Completion\n\n\tdoCompleteRequiredFlags := func(flag *pflag.Flag) {\n\t\tif _, present := flag.Annotations[BashCompOneRequiredFlag]; present {\n\t\t\tif !flag.Changed {\n\t\t\t\t// If the flag is not already present, we suggest it as a completion\n\t\t\t\tcompletions = append(completions, getFlagNameCompletions(flag, toComplete)...)\n\t\t\t}\n\t\t}\n\t}\n\n\t// We cannot use finalCmd.Flags() because we may not have called ParsedFlags() for commands\n\t// that have set DisableFlagParsing; it is ParseFlags() that merges the inherited and\n\t// non-inherited flags.\n\tfinalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\tdoCompleteRequiredFlags(flag)\n\t})\n\tfinalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {\n\t\tdoCompleteRequiredFlags(flag)\n\t})\n\n\treturn completions\n}\n\nfunc checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*pflag.Flag, []string, string, error) {\n\tif finalCmd.DisableFlagParsing {\n\t\t// We only do flag completion if we are allowed to parse flags\n\t\t// This is important for commands which have requested to do their own flag completion.\n\t\treturn nil, args, lastArg, nil\n\t}\n\n\tvar flagName string\n\ttrimmedArgs := args\n\tflagWithEqual := false\n\torgLastArg := lastArg\n\n\t// When doing completion of a flag name, as soon as an argument starts with\n\t// a '-' we know it is a flag.  We cannot use isFlagArg() here as that function\n\t// requires the flag name to be complete\n\tif len(lastArg) > 0 && lastArg[0] == '-' {\n\t\tif index := strings.Index(lastArg, \"=\"); index >= 0 {\n\t\t\t// Flag with an =\n\t\t\tif strings.HasPrefix(lastArg[:index], \"--\") {\n\t\t\t\t// Flag has full name\n\t\t\t\tflagName = lastArg[2:index]\n\t\t\t} else {\n\t\t\t\t// Flag is shorthand\n\t\t\t\t// We have to get the last shorthand flag name\n\t\t\t\t// e.g. `-asd` => d to provide the correct completion\n\t\t\t\t// https://github.com/spf13/cobra/issues/1257\n\t\t\t\tflagName = lastArg[index-1 : index]\n\t\t\t}\n\t\t\tlastArg = lastArg[index+1:]\n\t\t\tflagWithEqual = true\n\t\t} else {\n\t\t\t// Normal flag completion\n\t\t\treturn nil, args, lastArg, nil\n\t\t}\n\t}\n\n\tif len(flagName) == 0 {\n\t\tif len(args) > 0 {\n\t\t\tprevArg := args[len(args)-1]\n\t\t\tif isFlagArg(prevArg) {\n\t\t\t\t// Only consider the case where the flag does not contain an =.\n\t\t\t\t// If the flag contains an = it means it has already been fully processed,\n\t\t\t\t// so we don't need to deal with it here.\n\t\t\t\tif index := strings.Index(prevArg, \"=\"); index < 0 {\n\t\t\t\t\tif strings.HasPrefix(prevArg, \"--\") {\n\t\t\t\t\t\t// Flag has full name\n\t\t\t\t\t\tflagName = prevArg[2:]\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Flag is shorthand\n\t\t\t\t\t\t// We have to get the last shorthand flag name\n\t\t\t\t\t\t// e.g. `-asd` => d to provide the correct completion\n\t\t\t\t\t\t// https://github.com/spf13/cobra/issues/1257\n\t\t\t\t\t\tflagName = prevArg[len(prevArg)-1:]\n\t\t\t\t\t}\n\t\t\t\t\t// Remove the uncompleted flag or else there could be an error created\n\t\t\t\t\t// for an invalid value for that flag\n\t\t\t\t\ttrimmedArgs = args[:len(args)-1]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(flagName) == 0 {\n\t\t// Not doing flag completion\n\t\treturn nil, trimmedArgs, lastArg, nil\n\t}\n\n\tflag := findFlag(finalCmd, flagName)\n\tif flag == nil {\n\t\t// Flag not supported by this command, the interspersed option might be set so return the original args\n\t\treturn nil, args, orgLastArg, &flagCompError{subCommand: finalCmd.Name(), flagName: flagName}\n\t}\n\n\tif !flagWithEqual {\n\t\tif len(flag.NoOptDefVal) != 0 {\n\t\t\t// We had assumed dealing with a two-word flag but the flag is a boolean flag.\n\t\t\t// In that case, there is no value following it, so we are not really doing flag completion.\n\t\t\t// Reset everything to do noun completion.\n\t\t\ttrimmedArgs = args\n\t\t\tflag = nil\n\t\t}\n\t}\n\n\treturn flag, trimmedArgs, lastArg, nil\n}\n\n// InitDefaultCompletionCmd adds a default 'completion' command to c.\n// This function will do nothing if any of the following is true:\n// 1- the feature has been explicitly disabled by the program,\n// 2- c has no subcommands (to avoid creating one),\n// 3- c already has a 'completion' command provided by the program.\nfunc (c *Command) InitDefaultCompletionCmd(args ...string) {\n\tif c.CompletionOptions.DisableDefaultCmd {\n\t\treturn\n\t}\n\n\tfor _, cmd := range c.commands {\n\t\tif cmd.Name() == compCmdName || cmd.HasAlias(compCmdName) {\n\t\t\t// A completion command is already available\n\t\t\treturn\n\t\t}\n\t}\n\n\thaveNoDescFlag := !c.CompletionOptions.DisableNoDescFlag && !c.CompletionOptions.DisableDescriptions\n\n\t// Special case to know if there are sub-commands or not.\n\thasSubCommands := false\n\tfor _, cmd := range c.commands {\n\t\tif cmd.Name() != ShellCompRequestCmd && cmd.Name() != helpCommandName {\n\t\t\t// We found a real sub-command (not 'help' or '__complete')\n\t\t\thasSubCommands = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tcompletionCmd := &Command{\n\t\tUse:   compCmdName,\n\t\tShort: \"Generate the autocompletion script for the specified shell\",\n\t\tLong: fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell.\nSee each sub-command's help for details on how to use the generated script.\n`, c.Root().Name()),\n\t\tArgs:              NoArgs,\n\t\tValidArgsFunction: NoFileCompletions,\n\t\tHidden:            c.CompletionOptions.HiddenDefaultCmd,\n\t\tGroupID:           c.completionCommandGroupID,\n\t}\n\tc.AddCommand(completionCmd)\n\n\tif !hasSubCommands {\n\t\t// If the 'completion' command will be the only sub-command,\n\t\t// we only create it if it is actually being called.\n\t\t// This avoids breaking programs that would suddenly find themselves with\n\t\t// a subcommand, which would prevent them from accepting arguments.\n\t\t// We also create the 'completion' command if the user is triggering\n\t\t// shell completion for it (prog __complete completion '')\n\t\tsubCmd, cmdArgs, err := c.Find(args)\n\t\tif err != nil || subCmd.Name() != compCmdName &&\n\t\t\t(subCmd.Name() != ShellCompRequestCmd || len(cmdArgs) <= 1 || cmdArgs[0] != compCmdName) {\n\t\t\t// The completion command is not being called or being completed so we remove it.\n\t\t\tc.RemoveCommand(completionCmd)\n\t\t\treturn\n\t\t}\n\t}\n\n\tout := c.OutOrStdout()\n\tnoDesc := c.CompletionOptions.DisableDescriptions\n\tshortDesc := \"Generate the autocompletion script for %s\"\n\tbash := &Command{\n\t\tUse:   \"bash\",\n\t\tShort: fmt.Sprintf(shortDesc, \"bash\"),\n\t\tLong: fmt.Sprintf(`Generate the autocompletion script for the bash shell.\n\nThis script depends on the 'bash-completion' package.\nIf it is not installed already, you can install it via your OS's package manager.\n\nTo load completions in your current shell session:\n\n\tsource <(%[1]s completion bash)\n\nTo load completions for every new session, execute once:\n\n#### Linux:\n\n\t%[1]s completion bash > /etc/bash_completion.d/%[1]s\n\n#### macOS:\n\n\t%[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s\n\nYou will need to start a new shell for this setup to take effect.\n`, c.Root().Name()),\n\t\tArgs:                  NoArgs,\n\t\tDisableFlagsInUseLine: true,\n\t\tValidArgsFunction:     NoFileCompletions,\n\t\tRunE: func(cmd *Command, args []string) error {\n\t\t\treturn cmd.Root().GenBashCompletionV2(out, !noDesc)\n\t\t},\n\t}\n\tif haveNoDescFlag {\n\t\tbash.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc)\n\t}\n\n\tzsh := &Command{\n\t\tUse:   \"zsh\",\n\t\tShort: fmt.Sprintf(shortDesc, \"zsh\"),\n\t\tLong: fmt.Sprintf(`Generate the autocompletion script for the zsh shell.\n\nIf shell completion is not already enabled in your environment you will need\nto enable it.  You can execute the following once:\n\n\techo \"autoload -U compinit; compinit\" >> ~/.zshrc\n\nTo load completions in your current shell session:\n\n\tsource <(%[1]s completion zsh)\n\nTo load completions for every new session, execute once:\n\n#### Linux:\n\n\t%[1]s completion zsh > \"${fpath[1]}/_%[1]s\"\n\n#### macOS:\n\n\t%[1]s completion zsh > $(brew --prefix)/share/zsh/site-functions/_%[1]s\n\nYou will need to start a new shell for this setup to take effect.\n`, c.Root().Name()),\n\t\tArgs:              NoArgs,\n\t\tValidArgsFunction: NoFileCompletions,\n\t\tRunE: func(cmd *Command, args []string) error {\n\t\t\tif noDesc {\n\t\t\t\treturn cmd.Root().GenZshCompletionNoDesc(out)\n\t\t\t}\n\t\t\treturn cmd.Root().GenZshCompletion(out)\n\t\t},\n\t}\n\tif haveNoDescFlag {\n\t\tzsh.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc)\n\t}\n\n\tfish := &Command{\n\t\tUse:   \"fish\",\n\t\tShort: fmt.Sprintf(shortDesc, \"fish\"),\n\t\tLong: fmt.Sprintf(`Generate the autocompletion script for the fish shell.\n\nTo load completions in your current shell session:\n\n\t%[1]s completion fish | source\n\nTo load completions for every new session, execute once:\n\n\t%[1]s completion fish > ~/.config/fish/completions/%[1]s.fish\n\nYou will need to start a new shell for this setup to take effect.\n`, c.Root().Name()),\n\t\tArgs:              NoArgs,\n\t\tValidArgsFunction: NoFileCompletions,\n\t\tRunE: func(cmd *Command, args []string) error {\n\t\t\treturn cmd.Root().GenFishCompletion(out, !noDesc)\n\t\t},\n\t}\n\tif haveNoDescFlag {\n\t\tfish.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc)\n\t}\n\n\tpowershell := &Command{\n\t\tUse:   \"powershell\",\n\t\tShort: fmt.Sprintf(shortDesc, \"powershell\"),\n\t\tLong: fmt.Sprintf(`Generate the autocompletion script for powershell.\n\nTo load completions in your current shell session:\n\n\t%[1]s completion powershell | Out-String | Invoke-Expression\n\nTo load completions for every new session, add the output of the above command\nto your powershell profile.\n`, c.Root().Name()),\n\t\tArgs:              NoArgs,\n\t\tValidArgsFunction: NoFileCompletions,\n\t\tRunE: func(cmd *Command, args []string) error {\n\t\t\tif noDesc {\n\t\t\t\treturn cmd.Root().GenPowerShellCompletion(out)\n\t\t\t}\n\t\t\treturn cmd.Root().GenPowerShellCompletionWithDesc(out)\n\n\t\t},\n\t}\n\tif haveNoDescFlag {\n\t\tpowershell.Flags().BoolVar(&noDesc, compCmdNoDescFlagName, compCmdNoDescFlagDefault, compCmdNoDescFlagDesc)\n\t}\n\n\tcompletionCmd.AddCommand(bash, zsh, fish, powershell)\n}\n\nfunc findFlag(cmd *Command, name string) *pflag.Flag {\n\tflagSet := cmd.Flags()\n\tif len(name) == 1 {\n\t\t// First convert the short flag into a long flag\n\t\t// as the cmd.Flag() search only accepts long flags\n\t\tif short := flagSet.ShorthandLookup(name); short != nil {\n\t\t\tname = short.Name\n\t\t} else {\n\t\t\tset := cmd.InheritedFlags()\n\t\t\tif short = set.ShorthandLookup(name); short != nil {\n\t\t\t\tname = short.Name\n\t\t\t} else {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\treturn cmd.Flag(name)\n}\n\n// CompDebug prints the specified string to the same file as where the\n// completion script prints its logs.\n// Note that completion printouts should never be on stdout as they would\n// be wrongly interpreted as actual completion choices by the completion script.\nfunc CompDebug(msg string, printToStdErr bool) {\n\tmsg = fmt.Sprintf(\"[Debug] %s\", msg)\n\n\t// Such logs are only printed when the user has set the environment\n\t// variable BASH_COMP_DEBUG_FILE to the path of some file to be used.\n\tif path := os.Getenv(\"BASH_COMP_DEBUG_FILE\"); path != \"\" {\n\t\tf, err := os.OpenFile(path,\n\t\t\tos.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)\n\t\tif err == nil {\n\t\t\tdefer f.Close()\n\t\t\tWriteStringAndCheck(f, msg)\n\t\t}\n\t}\n\n\tif printToStdErr {\n\t\t// Must print to stderr for this not to be read by the completion script.\n\t\tfmt.Fprint(os.Stderr, msg)\n\t}\n}\n\n// CompDebugln prints the specified string with a newline at the end\n// to the same file as where the completion script prints its logs.\n// Such logs are only printed when the user has set the environment\n// variable BASH_COMP_DEBUG_FILE to the path of some file to be used.\nfunc CompDebugln(msg string, printToStdErr bool) {\n\tCompDebug(fmt.Sprintf(\"%s\\n\", msg), printToStdErr)\n}\n\n// CompError prints the specified completion message to stderr.\nfunc CompError(msg string) {\n\tmsg = fmt.Sprintf(\"[Error] %s\", msg)\n\tCompDebug(msg, true)\n}\n\n// CompErrorln prints the specified completion message to stderr with a newline at the end.\nfunc CompErrorln(msg string) {\n\tCompError(fmt.Sprintf(\"%s\\n\", msg))\n}\n\n// These values should not be changed: users will be using them explicitly.\nconst (\n\tconfigEnvVarGlobalPrefix       = \"COBRA\"\n\tconfigEnvVarSuffixDescriptions = \"COMPLETION_DESCRIPTIONS\"\n)\n\nvar configEnvVarPrefixSubstRegexp = regexp.MustCompile(`[^A-Z0-9_]`)\n\n// configEnvVar returns the name of the program-specific configuration environment\n// variable.  It has the format <PROGRAM>_<SUFFIX> where <PROGRAM> is the name of the\n// root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`.\nfunc configEnvVar(name, suffix string) string {\n\t// This format should not be changed: users will be using it explicitly.\n\tv := strings.ToUpper(fmt.Sprintf(\"%s_%s\", name, suffix))\n\tv = configEnvVarPrefixSubstRegexp.ReplaceAllString(v, \"_\")\n\treturn v\n}\n\n// getEnvConfig returns the value of the configuration environment variable\n// <PROGRAM>_<SUFFIX> where <PROGRAM> is the name of the root command in upper\n// case, with all non-ASCII-alphanumeric characters replaced by `_`.\n// If the value is empty or not set, the value of the environment variable\n// COBRA_<SUFFIX> is returned instead.\nfunc getEnvConfig(cmd *Command, suffix string) string {\n\tv := os.Getenv(configEnvVar(cmd.Root().Name(), suffix))\n\tif v == \"\" {\n\t\tv = os.Getenv(configEnvVar(configEnvVarGlobalPrefix, suffix))\n\t}\n\treturn v\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/fish_completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc genFishComp(buf io.StringWriter, name string, includeDesc bool) {\n\t// Variables should not contain a '-' or ':' character\n\tnameForVar := name\n\tnameForVar = strings.ReplaceAll(nameForVar, \"-\", \"_\")\n\tnameForVar = strings.ReplaceAll(nameForVar, \":\", \"_\")\n\n\tcompCmd := ShellCompRequestCmd\n\tif !includeDesc {\n\t\tcompCmd = ShellCompNoDescRequestCmd\n\t}\n\tWriteStringAndCheck(buf, fmt.Sprintf(\"# fish completion for %-36s -*- shell-script -*-\\n\", name))\n\tWriteStringAndCheck(buf, fmt.Sprintf(`\nfunction __%[1]s_debug\n    set -l file \"$BASH_COMP_DEBUG_FILE\"\n    if test -n \"$file\"\n        echo \"$argv\" >> $file\n    end\nend\n\nfunction __%[1]s_perform_completion\n    __%[1]s_debug \"Starting __%[1]s_perform_completion\"\n\n    # Extract all args except the last one\n    set -l args (commandline -opc)\n    # Extract the last arg and escape it in case it is a space\n    set -l lastArg (string escape -- (commandline -ct))\n\n    __%[1]s_debug \"args: $args\"\n    __%[1]s_debug \"last arg: $lastArg\"\n\n    # Disable ActiveHelp which is not supported for fish shell\n    set -l requestComp \"%[10]s=0 $args[1] %[3]s $args[2..-1] $lastArg\"\n\n    __%[1]s_debug \"Calling $requestComp\"\n    set -l results (eval $requestComp 2> /dev/null)\n\n    # Some programs may output extra empty lines after the directive.\n    # Let's ignore them or else it will break completion.\n    # Ref: https://github.com/spf13/cobra/issues/1279\n    for line in $results[-1..1]\n        if test (string trim -- $line) = \"\"\n            # Found an empty line, remove it\n            set results $results[1..-2]\n        else\n            # Found non-empty line, we have our proper output\n            break\n        end\n    end\n\n    set -l comps $results[1..-2]\n    set -l directiveLine $results[-1]\n\n    # For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)\n    # completions must be prefixed with the flag\n    set -l flagPrefix (string match -r -- '-.*=' \"$lastArg\")\n\n    __%[1]s_debug \"Comps: $comps\"\n    __%[1]s_debug \"DirectiveLine: $directiveLine\"\n    __%[1]s_debug \"flagPrefix: $flagPrefix\"\n\n    for comp in $comps\n        printf \"%%s%%s\\n\" \"$flagPrefix\" \"$comp\"\n    end\n\n    printf \"%%s\\n\" \"$directiveLine\"\nend\n\n# this function limits calls to __%[1]s_perform_completion, by caching the result behind $__%[1]s_perform_completion_once_result\nfunction __%[1]s_perform_completion_once\n    __%[1]s_debug \"Starting __%[1]s_perform_completion_once\"\n\n    if test -n \"$__%[1]s_perform_completion_once_result\"\n        __%[1]s_debug \"Seems like a valid result already exists, skipping __%[1]s_perform_completion\"\n        return 0\n    end\n\n    set --global __%[1]s_perform_completion_once_result (__%[1]s_perform_completion)\n    if test -z \"$__%[1]s_perform_completion_once_result\"\n        __%[1]s_debug \"No completions, probably due to a failure\"\n        return 1\n    end\n\n    __%[1]s_debug \"Performed completions and set __%[1]s_perform_completion_once_result\"\n    return 0\nend\n\n# this function is used to clear the $__%[1]s_perform_completion_once_result variable after completions are run\nfunction __%[1]s_clear_perform_completion_once_result\n    __%[1]s_debug \"\"\n    __%[1]s_debug \"========= clearing previously set __%[1]s_perform_completion_once_result variable ==========\"\n    set --erase __%[1]s_perform_completion_once_result\n    __%[1]s_debug \"Successfully erased the variable __%[1]s_perform_completion_once_result\"\nend\n\nfunction __%[1]s_requires_order_preservation\n    __%[1]s_debug \"\"\n    __%[1]s_debug \"========= checking if order preservation is required ==========\"\n\n    __%[1]s_perform_completion_once\n    if test -z \"$__%[1]s_perform_completion_once_result\"\n        __%[1]s_debug \"Error determining if order preservation is required\"\n        return 1\n    end\n\n    set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])\n    __%[1]s_debug \"Directive is: $directive\"\n\n    set -l shellCompDirectiveKeepOrder %[9]d\n    set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) %% 2)\n    __%[1]s_debug \"Keeporder is: $keeporder\"\n\n    if test $keeporder -ne 0\n        __%[1]s_debug \"This does require order preservation\"\n        return 0\n    end\n\n    __%[1]s_debug \"This doesn't require order preservation\"\n    return 1\nend\n\n\n# This function does two things:\n# - Obtain the completions and store them in the global __%[1]s_comp_results\n# - Return false if file completion should be performed\nfunction __%[1]s_prepare_completions\n    __%[1]s_debug \"\"\n    __%[1]s_debug \"========= starting completion logic ==========\"\n\n    # Start fresh\n    set --erase __%[1]s_comp_results\n\n    __%[1]s_perform_completion_once\n    __%[1]s_debug \"Completion results: $__%[1]s_perform_completion_once_result\"\n\n    if test -z \"$__%[1]s_perform_completion_once_result\"\n        __%[1]s_debug \"No completion, probably due to a failure\"\n        # Might as well do file completion, in case it helps\n        return 1\n    end\n\n    set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])\n    set --global __%[1]s_comp_results $__%[1]s_perform_completion_once_result[1..-2]\n\n    __%[1]s_debug \"Completions are: $__%[1]s_comp_results\"\n    __%[1]s_debug \"Directive is: $directive\"\n\n    set -l shellCompDirectiveError %[4]d\n    set -l shellCompDirectiveNoSpace %[5]d\n    set -l shellCompDirectiveNoFileComp %[6]d\n    set -l shellCompDirectiveFilterFileExt %[7]d\n    set -l shellCompDirectiveFilterDirs %[8]d\n\n    if test -z \"$directive\"\n        set directive 0\n    end\n\n    set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) %% 2)\n    if test $compErr -eq 1\n        __%[1]s_debug \"Received error directive: aborting.\"\n        # Might as well do file completion, in case it helps\n        return 1\n    end\n\n    set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) %% 2)\n    set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) %% 2)\n    if test $filefilter -eq 1; or test $dirfilter -eq 1\n        __%[1]s_debug \"File extension filtering or directory filtering not supported\"\n        # Do full file completion instead\n        return 1\n    end\n\n    set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) %% 2)\n    set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) %% 2)\n\n    __%[1]s_debug \"nospace: $nospace, nofiles: $nofiles\"\n\n    # If we want to prevent a space, or if file completion is NOT disabled,\n    # we need to count the number of valid completions.\n    # To do so, we will filter on prefix as the completions we have received\n    # may not already be filtered so as to allow fish to match on different\n    # criteria than the prefix.\n    if test $nospace -ne 0; or test $nofiles -eq 0\n        set -l prefix (commandline -t | string escape --style=regex)\n        __%[1]s_debug \"prefix: $prefix\"\n\n        set -l completions (string match -r -- \"^$prefix.*\" $__%[1]s_comp_results)\n        set --global __%[1]s_comp_results $completions\n        __%[1]s_debug \"Filtered completions are: $__%[1]s_comp_results\"\n\n        # Important not to quote the variable for count to work\n        set -l numComps (count $__%[1]s_comp_results)\n        __%[1]s_debug \"numComps: $numComps\"\n\n        if test $numComps -eq 1; and test $nospace -ne 0\n            # We must first split on \\t to get rid of the descriptions to be\n            # able to check what the actual completion will be.\n            # We don't need descriptions anyway since there is only a single\n            # real completion which the shell will expand immediately.\n            set -l split (string split --max 1 \\t $__%[1]s_comp_results[1])\n\n            # Fish won't add a space if the completion ends with any\n            # of the following characters: @=/:.,\n            set -l lastChar (string sub -s -1 -- $split)\n            if not string match -r -q \"[@=/:.,]\" -- \"$lastChar\"\n                # In other cases, to support the \"nospace\" directive we trick the shell\n                # by outputting an extra, longer completion.\n                __%[1]s_debug \"Adding second completion to perform nospace directive\"\n                set --global __%[1]s_comp_results $split[1] $split[1].\n                __%[1]s_debug \"Completions are now: $__%[1]s_comp_results\"\n            end\n        end\n\n        if test $numComps -eq 0; and test $nofiles -eq 0\n            # To be consistent with bash and zsh, we only trigger file\n            # completion when there are no other completions\n            __%[1]s_debug \"Requesting file completion\"\n            return 1\n        end\n    end\n\n    return 0\nend\n\n# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves\n# so we can properly delete any completions provided by another script.\n# Only do this if the program can be found, or else fish may print some errors; besides,\n# the existing completions will only be loaded if the program can be found.\nif type -q \"%[2]s\"\n    # The space after the program name is essential to trigger completion for the program\n    # and not completion of the program name itself.\n    # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.\n    complete --do-complete \"%[2]s \" > /dev/null 2>&1\nend\n\n# Remove any pre-existing completions for the program since we will be handling all of them.\ncomplete -c %[2]s -e\n\n# this will get called after the two calls below and clear the $__%[1]s_perform_completion_once_result global\ncomplete -c %[2]s -n '__%[1]s_clear_perform_completion_once_result'\n# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results\n# which provides the program's completion choices.\n# If this doesn't require order preservation, we don't use the -k flag\ncomplete -c %[2]s -n 'not __%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'\n# otherwise we use the -k flag\ncomplete -k -c %[2]s -n '__%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'\n`, nameForVar, name, compCmd,\n\t\tShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,\n\t\tShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))\n}\n\n// GenFishCompletion generates fish completion file and writes to the passed writer.\nfunc (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error {\n\tbuf := new(bytes.Buffer)\n\tgenFishComp(buf, c.Name(), includeDesc)\n\t_, err := buf.WriteTo(w)\n\treturn err\n}\n\n// GenFishCompletionFile generates fish completion file.\nfunc (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error {\n\toutFile, err := os.Create(filename)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer outFile.Close()\n\n\treturn c.GenFishCompletion(outFile, includeDesc)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/flag_groups.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\n\tflag \"github.com/spf13/pflag\"\n)\n\nconst (\n\trequiredAsGroupAnnotation   = \"cobra_annotation_required_if_others_set\"\n\toneRequiredAnnotation       = \"cobra_annotation_one_required\"\n\tmutuallyExclusiveAnnotation = \"cobra_annotation_mutually_exclusive\"\n)\n\n// MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors\n// if the command is invoked with a subset (but not all) of the given flags.\nfunc (c *Command) MarkFlagsRequiredTogether(flagNames ...string) {\n\tc.mergePersistentFlags()\n\tfor _, v := range flagNames {\n\t\tf := c.Flags().Lookup(v)\n\t\tif f == nil {\n\t\t\tpanic(fmt.Sprintf(\"Failed to find flag %q and mark it as being required in a flag group\", v))\n\t\t}\n\t\tif err := c.Flags().SetAnnotation(v, requiredAsGroupAnnotation, append(f.Annotations[requiredAsGroupAnnotation], strings.Join(flagNames, \" \"))); err != nil {\n\t\t\t// Only errs if the flag isn't found.\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n\n// MarkFlagsOneRequired marks the given flags with annotations so that Cobra errors\n// if the command is invoked without at least one flag from the given set of flags.\nfunc (c *Command) MarkFlagsOneRequired(flagNames ...string) {\n\tc.mergePersistentFlags()\n\tfor _, v := range flagNames {\n\t\tf := c.Flags().Lookup(v)\n\t\tif f == nil {\n\t\t\tpanic(fmt.Sprintf(\"Failed to find flag %q and mark it as being in a one-required flag group\", v))\n\t\t}\n\t\tif err := c.Flags().SetAnnotation(v, oneRequiredAnnotation, append(f.Annotations[oneRequiredAnnotation], strings.Join(flagNames, \" \"))); err != nil {\n\t\t\t// Only errs if the flag isn't found.\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n\n// MarkFlagsMutuallyExclusive marks the given flags with annotations so that Cobra errors\n// if the command is invoked with more than one flag from the given set of flags.\nfunc (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) {\n\tc.mergePersistentFlags()\n\tfor _, v := range flagNames {\n\t\tf := c.Flags().Lookup(v)\n\t\tif f == nil {\n\t\t\tpanic(fmt.Sprintf(\"Failed to find flag %q and mark it as being in a mutually exclusive flag group\", v))\n\t\t}\n\t\t// Each time this is called is a single new entry; this allows it to be a member of multiple groups if needed.\n\t\tif err := c.Flags().SetAnnotation(v, mutuallyExclusiveAnnotation, append(f.Annotations[mutuallyExclusiveAnnotation], strings.Join(flagNames, \" \"))); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n\n// ValidateFlagGroups validates the mutuallyExclusive/oneRequired/requiredAsGroup logic and returns the\n// first error encountered.\nfunc (c *Command) ValidateFlagGroups() error {\n\tif c.DisableFlagParsing {\n\t\treturn nil\n\t}\n\n\tflags := c.Flags()\n\n\t// groupStatus format is the list of flags as a unique ID,\n\t// then a map of each flag name and whether it is set or not.\n\tgroupStatus := map[string]map[string]bool{}\n\toneRequiredGroupStatus := map[string]map[string]bool{}\n\tmutuallyExclusiveGroupStatus := map[string]map[string]bool{}\n\tflags.VisitAll(func(pflag *flag.Flag) {\n\t\tprocessFlagForGroupAnnotation(flags, pflag, requiredAsGroupAnnotation, groupStatus)\n\t\tprocessFlagForGroupAnnotation(flags, pflag, oneRequiredAnnotation, oneRequiredGroupStatus)\n\t\tprocessFlagForGroupAnnotation(flags, pflag, mutuallyExclusiveAnnotation, mutuallyExclusiveGroupStatus)\n\t})\n\n\tif err := validateRequiredFlagGroups(groupStatus); err != nil {\n\t\treturn err\n\t}\n\tif err := validateOneRequiredFlagGroups(oneRequiredGroupStatus); err != nil {\n\t\treturn err\n\t}\n\tif err := validateExclusiveFlagGroups(mutuallyExclusiveGroupStatus); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc hasAllFlags(fs *flag.FlagSet, flagnames ...string) bool {\n\tfor _, fname := range flagnames {\n\t\tf := fs.Lookup(fname)\n\t\tif f == nil {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc processFlagForGroupAnnotation(flags *flag.FlagSet, pflag *flag.Flag, annotation string, groupStatus map[string]map[string]bool) {\n\tgroupInfo, found := pflag.Annotations[annotation]\n\tif found {\n\t\tfor _, group := range groupInfo {\n\t\t\tif groupStatus[group] == nil {\n\t\t\t\tflagnames := strings.Split(group, \" \")\n\n\t\t\t\t// Only consider this flag group at all if all the flags are defined.\n\t\t\t\tif !hasAllFlags(flags, flagnames...) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tgroupStatus[group] = make(map[string]bool, len(flagnames))\n\t\t\t\tfor _, name := range flagnames {\n\t\t\t\t\tgroupStatus[group][name] = false\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgroupStatus[group][pflag.Name] = pflag.Changed\n\t\t}\n\t}\n}\n\nfunc validateRequiredFlagGroups(data map[string]map[string]bool) error {\n\tkeys := sortedKeys(data)\n\tfor _, flagList := range keys {\n\t\tflagnameAndStatus := data[flagList]\n\n\t\tunset := []string{}\n\t\tfor flagname, isSet := range flagnameAndStatus {\n\t\t\tif !isSet {\n\t\t\t\tunset = append(unset, flagname)\n\t\t\t}\n\t\t}\n\t\tif len(unset) == len(flagnameAndStatus) || len(unset) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Sort values, so they can be tested/scripted against consistently.\n\t\tsort.Strings(unset)\n\t\treturn fmt.Errorf(\"if any flags in the group [%v] are set they must all be set; missing %v\", flagList, unset)\n\t}\n\n\treturn nil\n}\n\nfunc validateOneRequiredFlagGroups(data map[string]map[string]bool) error {\n\tkeys := sortedKeys(data)\n\tfor _, flagList := range keys {\n\t\tflagnameAndStatus := data[flagList]\n\t\tvar set []string\n\t\tfor flagname, isSet := range flagnameAndStatus {\n\t\t\tif isSet {\n\t\t\t\tset = append(set, flagname)\n\t\t\t}\n\t\t}\n\t\tif len(set) >= 1 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Sort values, so they can be tested/scripted against consistently.\n\t\tsort.Strings(set)\n\t\treturn fmt.Errorf(\"at least one of the flags in the group [%v] is required\", flagList)\n\t}\n\treturn nil\n}\n\nfunc validateExclusiveFlagGroups(data map[string]map[string]bool) error {\n\tkeys := sortedKeys(data)\n\tfor _, flagList := range keys {\n\t\tflagnameAndStatus := data[flagList]\n\t\tvar set []string\n\t\tfor flagname, isSet := range flagnameAndStatus {\n\t\t\tif isSet {\n\t\t\t\tset = append(set, flagname)\n\t\t\t}\n\t\t}\n\t\tif len(set) == 0 || len(set) == 1 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Sort values, so they can be tested/scripted against consistently.\n\t\tsort.Strings(set)\n\t\treturn fmt.Errorf(\"if any flags in the group [%v] are set none of the others can be; %v were all set\", flagList, set)\n\t}\n\treturn nil\n}\n\nfunc sortedKeys(m map[string]map[string]bool) []string {\n\tkeys := make([]string, len(m))\n\ti := 0\n\tfor k := range m {\n\t\tkeys[i] = k\n\t\ti++\n\t}\n\tsort.Strings(keys)\n\treturn keys\n}\n\n// enforceFlagGroupsForCompletion will do the following:\n// - when a flag in a group is present, other flags in the group will be marked required\n// - when none of the flags in a one-required group are present, all flags in the group will be marked required\n// - when a flag in a mutually exclusive group is present, other flags in the group will be marked as hidden\n// This allows the standard completion logic to behave appropriately for flag groups\nfunc (c *Command) enforceFlagGroupsForCompletion() {\n\tif c.DisableFlagParsing {\n\t\treturn\n\t}\n\n\tflags := c.Flags()\n\tgroupStatus := map[string]map[string]bool{}\n\toneRequiredGroupStatus := map[string]map[string]bool{}\n\tmutuallyExclusiveGroupStatus := map[string]map[string]bool{}\n\tc.Flags().VisitAll(func(pflag *flag.Flag) {\n\t\tprocessFlagForGroupAnnotation(flags, pflag, requiredAsGroupAnnotation, groupStatus)\n\t\tprocessFlagForGroupAnnotation(flags, pflag, oneRequiredAnnotation, oneRequiredGroupStatus)\n\t\tprocessFlagForGroupAnnotation(flags, pflag, mutuallyExclusiveAnnotation, mutuallyExclusiveGroupStatus)\n\t})\n\n\t// If a flag that is part of a group is present, we make all the other flags\n\t// of that group required so that the shell completion suggests them automatically\n\tfor flagList, flagnameAndStatus := range groupStatus {\n\t\tfor _, isSet := range flagnameAndStatus {\n\t\t\tif isSet {\n\t\t\t\t// One of the flags of the group is set, mark the other ones as required\n\t\t\t\tfor _, fName := range strings.Split(flagList, \" \") {\n\t\t\t\t\t_ = c.MarkFlagRequired(fName)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// If none of the flags of a one-required group are present, we make all the flags\n\t// of that group required so that the shell completion suggests them automatically\n\tfor flagList, flagnameAndStatus := range oneRequiredGroupStatus {\n\t\tisSet := false\n\n\t\tfor _, isSet = range flagnameAndStatus {\n\t\t\tif isSet {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// None of the flags of the group are set, mark all flags in the group\n\t\t// as required\n\t\tif !isSet {\n\t\t\tfor _, fName := range strings.Split(flagList, \" \") {\n\t\t\t\t_ = c.MarkFlagRequired(fName)\n\t\t\t}\n\t\t}\n\t}\n\n\t// If a flag that is mutually exclusive to others is present, we hide the other\n\t// flags of that group so the shell completion does not suggest them\n\tfor flagList, flagnameAndStatus := range mutuallyExclusiveGroupStatus {\n\t\tfor flagName, isSet := range flagnameAndStatus {\n\t\t\tif isSet {\n\t\t\t\t// One of the flags of the mutually exclusive group is set, mark the other ones as hidden\n\t\t\t\t// Don't mark the flag that is already set as hidden because it may be an\n\t\t\t\t// array or slice flag and therefore must continue being suggested\n\t\t\t\tfor _, fName := range strings.Split(flagList, \" \") {\n\t\t\t\t\tif fName != flagName {\n\t\t\t\t\t\tflag := c.Flags().Lookup(fName)\n\t\t\t\t\t\tflag.Hidden = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/powershell_completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF 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 generated scripts require PowerShell v5.0+ (which comes Windows 10, but\n// can be downloaded separately for windows 7 or 8.1).\n\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc genPowerShellComp(buf io.StringWriter, name string, includeDesc bool) {\n\t// Variables should not contain a '-' or ':' character\n\tnameForVar := name\n\tnameForVar = strings.ReplaceAll(nameForVar, \"-\", \"_\")\n\tnameForVar = strings.ReplaceAll(nameForVar, \":\", \"_\")\n\n\tcompCmd := ShellCompRequestCmd\n\tif !includeDesc {\n\t\tcompCmd = ShellCompNoDescRequestCmd\n\t}\n\tWriteStringAndCheck(buf, fmt.Sprintf(`# powershell completion for %-36[1]s -*- shell-script -*-\n\nfunction __%[1]s_debug {\n    if ($env:BASH_COMP_DEBUG_FILE) {\n        \"$args\" | Out-File -Append -FilePath \"$env:BASH_COMP_DEBUG_FILE\"\n    }\n}\n\nfilter __%[1]s_escapeStringWithSpecialChars {\n`+\"    $_ -replace '\\\\s|#|@|\\\\$|;|,|''|\\\\{|\\\\}|\\\\(|\\\\)|\\\"|`|\\\\||<|>|&','`$&'\"+`\n}\n\n[scriptblock]${__%[2]sCompleterBlock} = {\n    param(\n            $WordToComplete,\n            $CommandAst,\n            $CursorPosition\n        )\n\n    # Get the current command line and convert into a string\n    $Command = $CommandAst.CommandElements\n    $Command = \"$Command\"\n\n    __%[1]s_debug \"\"\n    __%[1]s_debug \"========= starting completion logic ==========\"\n    __%[1]s_debug \"WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition\"\n\n    # The user could have moved the cursor backwards on the command-line.\n    # We need to trigger completion from the $CursorPosition location, so we need\n    # to truncate the command-line ($Command) up to the $CursorPosition location.\n    # Make sure the $Command is longer then the $CursorPosition before we truncate.\n    # This happens because the $Command does not include the last space.\n    if ($Command.Length -gt $CursorPosition) {\n        $Command=$Command.Substring(0,$CursorPosition)\n    }\n    __%[1]s_debug \"Truncated command: $Command\"\n\n    $ShellCompDirectiveError=%[4]d\n    $ShellCompDirectiveNoSpace=%[5]d\n    $ShellCompDirectiveNoFileComp=%[6]d\n    $ShellCompDirectiveFilterFileExt=%[7]d\n    $ShellCompDirectiveFilterDirs=%[8]d\n    $ShellCompDirectiveKeepOrder=%[9]d\n\n    # Prepare the command to request completions for the program.\n    # Split the command at the first space to separate the program and arguments.\n    $Program,$Arguments = $Command.Split(\" \",2)\n\n    $RequestComp=\"$Program %[3]s $Arguments\"\n    __%[1]s_debug \"RequestComp: $RequestComp\"\n\n    # we cannot use $WordToComplete because it\n    # has the wrong values if the cursor was moved\n    # so use the last argument\n    if ($WordToComplete -ne \"\" ) {\n        $WordToComplete = $Arguments.Split(\" \")[-1]\n    }\n    __%[1]s_debug \"New WordToComplete: $WordToComplete\"\n\n\n    # Check for flag with equal sign\n    $IsEqualFlag = ($WordToComplete -Like \"--*=*\" )\n    if ( $IsEqualFlag ) {\n        __%[1]s_debug \"Completing equal sign flag\"\n        # Remove the flag part\n        $Flag,$WordToComplete = $WordToComplete.Split(\"=\",2)\n    }\n\n    if ( $WordToComplete -eq \"\" -And ( -Not $IsEqualFlag )) {\n        # If the last parameter is complete (there is a space following it)\n        # We add an extra empty parameter so we can indicate this to the go method.\n        __%[1]s_debug \"Adding extra empty parameter\"\n        # PowerShell 7.2+ changed the way how the arguments are passed to executables,\n        # so for pre-7.2 or when Legacy argument passing is enabled we need to use\n`+\"        # `\\\"`\\\" to pass an empty argument, a \\\"\\\" or '' does not work!!!\"+`\n        if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or\n            ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled(\"PSNativeCommandArgumentPassing\")) -or\n            (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled(\"PSNativeCommandArgumentPassing\")) -and\n              $PSNativeCommandArgumentPassing -eq 'Legacy')) {\n`+\"             $RequestComp=\\\"$RequestComp\\\" + ' `\\\"`\\\"'\"+`\n        } else {\n             $RequestComp=\"$RequestComp\" + ' \"\"'\n        }\n    }\n\n    __%[1]s_debug \"Calling $RequestComp\"\n    # First disable ActiveHelp which is not supported for Powershell\n    ${env:%[10]s}=0\n\n    #call the command store the output in $out and redirect stderr and stdout to null\n    # $Out is an array contains each line per element\n    Invoke-Expression -OutVariable out \"$RequestComp\" 2>&1 | Out-Null\n\n    # get directive from last line\n    [int]$Directive = $Out[-1].TrimStart(':')\n    if ($Directive -eq \"\") {\n        # There is no directive specified\n        $Directive = 0\n    }\n    __%[1]s_debug \"The completion directive is: $Directive\"\n\n    # remove directive (last element) from out\n    $Out = $Out | Where-Object { $_ -ne $Out[-1] }\n    __%[1]s_debug \"The completions are: $Out\"\n\n    if (($Directive -band $ShellCompDirectiveError) -ne 0 ) {\n        # Error code.  No completion.\n        __%[1]s_debug \"Received error from custom completion go code\"\n        return\n    }\n\n    $Longest = 0\n    [Array]$Values = $Out | ForEach-Object {\n        #Split the output in name and description\n`+\"        $Name, $Description = $_.Split(\\\"`t\\\",2)\"+`\n        __%[1]s_debug \"Name: $Name Description: $Description\"\n\n        # Look for the longest completion so that we can format things nicely\n        if ($Longest -lt $Name.Length) {\n            $Longest = $Name.Length\n        }\n\n        # Set the description to a one space string if there is none set.\n        # This is needed because the CompletionResult does not accept an empty string as argument\n        if (-Not $Description) {\n            $Description = \" \"\n        }\n        New-Object -TypeName PSCustomObject -Property @{\n            Name = \"$Name\"\n            Description = \"$Description\"\n        }\n    }\n\n\n    $Space = \" \"\n    if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) {\n        # remove the space here\n        __%[1]s_debug \"ShellCompDirectiveNoSpace is called\"\n        $Space = \"\"\n    }\n\n    if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or\n       (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 ))  {\n        __%[1]s_debug \"ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported\"\n\n        # return here to prevent the completion of the extensions\n        return\n    }\n\n    $Values = $Values | Where-Object {\n        # filter the result\n        $_.Name -like \"$WordToComplete*\"\n\n        # Join the flag back if we have an equal sign flag\n        if ( $IsEqualFlag ) {\n            __%[1]s_debug \"Join the equal sign flag back to the completion value\"\n            $_.Name = $Flag + \"=\" + $_.Name\n        }\n    }\n\n    # we sort the values in ascending order by name if keep order isn't passed\n    if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) {\n        $Values = $Values | Sort-Object -Property Name\n    }\n\n    if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {\n        __%[1]s_debug \"ShellCompDirectiveNoFileComp is called\"\n\n        if ($Values.Length -eq 0) {\n            # Just print an empty string here so the\n            # shell does not start to complete paths.\n            # We cannot use CompletionResult here because\n            # it does not accept an empty string as argument.\n            \"\"\n            return\n        }\n    }\n\n    # Get the current mode\n    $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq \"Tab\" }).Function\n    __%[1]s_debug \"Mode: $Mode\"\n\n    $Values | ForEach-Object {\n\n        # store temporary because switch will overwrite $_\n        $comp = $_\n\n        # PowerShell supports three different completion modes\n        # - TabCompleteNext (default windows style - on each key press the next option is displayed)\n        # - Complete (works like bash)\n        # - MenuComplete (works like zsh)\n        # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode>\n\n        # CompletionResult Arguments:\n        # 1) CompletionText text to be used as the auto completion result\n        # 2) ListItemText   text to be displayed in the suggestion list\n        # 3) ResultType     type of completion result\n        # 4) ToolTip        text for the tooltip with details about the object\n\n        switch ($Mode) {\n\n            # bash like\n            \"Complete\" {\n\n                if ($Values.Length -eq 1) {\n                    __%[1]s_debug \"Only one completion left\"\n\n                    # insert space after value\n                    $CompletionText = $($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space\n                    if ($ExecutionContext.SessionState.LanguageMode -eq \"FullLanguage\"){\n                        [System.Management.Automation.CompletionResult]::new($CompletionText, \"$($comp.Name)\", 'ParameterValue', \"$($comp.Description)\")\n                    } else {\n                        $CompletionText\n                    }\n\n                } else {\n                    # Add the proper number of spaces to align the descriptions\n                    while($comp.Name.Length -lt $Longest) {\n                        $comp.Name = $comp.Name + \" \"\n                    }\n\n                    # Check for empty description and only add parentheses if needed\n                    if ($($comp.Description) -eq \" \" ) {\n                        $Description = \"\"\n                    } else {\n                        $Description = \"  ($($comp.Description))\"\n                    }\n\n                    $CompletionText = \"$($comp.Name)$Description\"\n                    if ($ExecutionContext.SessionState.LanguageMode -eq \"FullLanguage\"){\n                        [System.Management.Automation.CompletionResult]::new($CompletionText, \"$($comp.Name)$Description\", 'ParameterValue', \"$($comp.Description)\")\n                    } else {\n                        $CompletionText\n                    }\n                }\n             }\n\n            # zsh like\n            \"MenuComplete\" {\n                # insert space after value\n                # MenuComplete will automatically show the ToolTip of\n                # the highlighted value at the bottom of the suggestions.\n\n                $CompletionText = $($comp.Name | __%[1]s_escapeStringWithSpecialChars) + $Space\n                if ($ExecutionContext.SessionState.LanguageMode -eq \"FullLanguage\"){\n                    [System.Management.Automation.CompletionResult]::new($CompletionText, \"$($comp.Name)\", 'ParameterValue', \"$($comp.Description)\")\n                } else {\n                    $CompletionText\n                }\n            }\n\n            # TabCompleteNext and in case we get something unknown\n            Default {\n                # Like MenuComplete but we don't want to add a space here because\n                # the user need to press space anyway to get the completion.\n                # Description will not be shown because that's not possible with TabCompleteNext\n\n                $CompletionText = $($comp.Name | __%[1]s_escapeStringWithSpecialChars)\n                if ($ExecutionContext.SessionState.LanguageMode -eq \"FullLanguage\"){\n                    [System.Management.Automation.CompletionResult]::new($CompletionText, \"$($comp.Name)\", 'ParameterValue', \"$($comp.Description)\")\n                } else {\n                    $CompletionText\n                }\n            }\n        }\n\n    }\n}\n\nRegister-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock ${__%[2]sCompleterBlock}\n`, name, nameForVar, compCmd,\n\t\tShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,\n\t\tShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))\n}\n\nfunc (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error {\n\tbuf := new(bytes.Buffer)\n\tgenPowerShellComp(buf, c.Name(), includeDesc)\n\t_, err := buf.WriteTo(w)\n\treturn err\n}\n\nfunc (c *Command) genPowerShellCompletionFile(filename string, includeDesc bool) error {\n\toutFile, err := os.Create(filename)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer outFile.Close()\n\n\treturn c.genPowerShellCompletion(outFile, includeDesc)\n}\n\n// GenPowerShellCompletionFile generates powershell completion file without descriptions.\nfunc (c *Command) GenPowerShellCompletionFile(filename string) error {\n\treturn c.genPowerShellCompletionFile(filename, false)\n}\n\n// GenPowerShellCompletion generates powershell completion file without descriptions\n// and writes it to the passed writer.\nfunc (c *Command) GenPowerShellCompletion(w io.Writer) error {\n\treturn c.genPowerShellCompletion(w, false)\n}\n\n// GenPowerShellCompletionFileWithDesc generates powershell completion file with descriptions.\nfunc (c *Command) GenPowerShellCompletionFileWithDesc(filename string) error {\n\treturn c.genPowerShellCompletionFile(filename, true)\n}\n\n// GenPowerShellCompletionWithDesc generates powershell completion file with descriptions\n// and writes it to the passed writer.\nfunc (c *Command) GenPowerShellCompletionWithDesc(w io.Writer) error {\n\treturn c.genPowerShellCompletion(w, true)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/shell_completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"github.com/spf13/pflag\"\n)\n\n// MarkFlagRequired instructs the various shell completion implementations to\n// prioritize the named flag when performing completion,\n// and causes your command to report an error if invoked without the flag.\nfunc (c *Command) MarkFlagRequired(name string) error {\n\treturn MarkFlagRequired(c.Flags(), name)\n}\n\n// MarkPersistentFlagRequired instructs the various shell completion implementations to\n// prioritize the named persistent flag when performing completion,\n// and causes your command to report an error if invoked without the flag.\nfunc (c *Command) MarkPersistentFlagRequired(name string) error {\n\treturn MarkFlagRequired(c.PersistentFlags(), name)\n}\n\n// MarkFlagRequired instructs the various shell completion implementations to\n// prioritize the named flag when performing completion,\n// and causes your command to report an error if invoked without the flag.\nfunc MarkFlagRequired(flags *pflag.FlagSet, name string) error {\n\treturn flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{\"true\"})\n}\n\n// MarkFlagFilename instructs the various shell completion implementations to\n// limit completions for the named flag to the specified file extensions.\nfunc (c *Command) MarkFlagFilename(name string, extensions ...string) error {\n\treturn MarkFlagFilename(c.Flags(), name, extensions...)\n}\n\n// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists.\n// The bash completion script will call the bash function f for the flag.\n//\n// This will only work for bash completion.\n// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows\n// to register a Go function which will work across all shells.\nfunc (c *Command) MarkFlagCustom(name string, f string) error {\n\treturn MarkFlagCustom(c.Flags(), name, f)\n}\n\n// MarkPersistentFlagFilename instructs the various shell completion\n// implementations to limit completions for the named persistent flag to the\n// specified file extensions.\nfunc (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error {\n\treturn MarkFlagFilename(c.PersistentFlags(), name, extensions...)\n}\n\n// MarkFlagFilename instructs the various shell completion implementations to\n// limit completions for the named flag to the specified file extensions.\nfunc MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error {\n\treturn flags.SetAnnotation(name, BashCompFilenameExt, extensions)\n}\n\n// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists.\n// The bash completion script will call the bash function f for the flag.\n//\n// This will only work for bash completion.\n// It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows\n// to register a Go function which will work across all shells.\nfunc MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error {\n\treturn flags.SetAnnotation(name, BashCompCustom, []string{f})\n}\n\n// MarkFlagDirname instructs the various shell completion implementations to\n// limit completions for the named flag to directory names.\nfunc (c *Command) MarkFlagDirname(name string) error {\n\treturn MarkFlagDirname(c.Flags(), name)\n}\n\n// MarkPersistentFlagDirname instructs the various shell completion\n// implementations to limit completions for the named persistent flag to\n// directory names.\nfunc (c *Command) MarkPersistentFlagDirname(name string) error {\n\treturn MarkFlagDirname(c.PersistentFlags(), name)\n}\n\n// MarkFlagDirname instructs the various shell completion implementations to\n// limit completions for the named flag to directory names.\nfunc MarkFlagDirname(flags *pflag.FlagSet, name string) error {\n\treturn flags.SetAnnotation(name, BashCompSubdirsInDir, []string{})\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/cobra/zsh_completions.go",
    "content": "// Copyright 2013-2023 The Cobra Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage cobra\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\n// GenZshCompletionFile generates zsh completion file including descriptions.\nfunc (c *Command) GenZshCompletionFile(filename string) error {\n\treturn c.genZshCompletionFile(filename, true)\n}\n\n// GenZshCompletion generates zsh completion file including descriptions\n// and writes it to the passed writer.\nfunc (c *Command) GenZshCompletion(w io.Writer) error {\n\treturn c.genZshCompletion(w, true)\n}\n\n// GenZshCompletionFileNoDesc generates zsh completion file without descriptions.\nfunc (c *Command) GenZshCompletionFileNoDesc(filename string) error {\n\treturn c.genZshCompletionFile(filename, false)\n}\n\n// GenZshCompletionNoDesc generates zsh completion file without descriptions\n// and writes it to the passed writer.\nfunc (c *Command) GenZshCompletionNoDesc(w io.Writer) error {\n\treturn c.genZshCompletion(w, false)\n}\n\n// MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was\n// not consistent with Bash completion. It has therefore been disabled.\n// Instead, when no other completion is specified, file completion is done by\n// default for every argument. One can disable file completion on a per-argument\n// basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp.\n// To achieve file extension filtering, one can use ValidArgsFunction and\n// ShellCompDirectiveFilterFileExt.\n//\n// Deprecated\nfunc (c *Command) MarkZshCompPositionalArgumentFile(argPosition int, patterns ...string) error {\n\treturn nil\n}\n\n// MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore\n// been disabled.\n// To achieve the same behavior across all shells, one can use\n// ValidArgs (for the first argument only) or ValidArgsFunction for\n// any argument (can include the first one also).\n//\n// Deprecated\nfunc (c *Command) MarkZshCompPositionalArgumentWords(argPosition int, words ...string) error {\n\treturn nil\n}\n\nfunc (c *Command) genZshCompletionFile(filename string, includeDesc bool) error {\n\toutFile, err := os.Create(filename)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer outFile.Close()\n\n\treturn c.genZshCompletion(outFile, includeDesc)\n}\n\nfunc (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error {\n\tbuf := new(bytes.Buffer)\n\tgenZshComp(buf, c.Name(), includeDesc)\n\t_, err := buf.WriteTo(w)\n\treturn err\n}\n\nfunc genZshComp(buf io.StringWriter, name string, includeDesc bool) {\n\tcompCmd := ShellCompRequestCmd\n\tif !includeDesc {\n\t\tcompCmd = ShellCompNoDescRequestCmd\n\t}\n\tWriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s\ncompdef _%[1]s %[1]s\n\n# zsh completion for %-36[1]s -*- shell-script -*-\n\n__%[1]s_debug()\n{\n    local file=\"$BASH_COMP_DEBUG_FILE\"\n    if [[ -n ${file} ]]; then\n        echo \"$*\" >> \"${file}\"\n    fi\n}\n\n_%[1]s()\n{\n    local shellCompDirectiveError=%[3]d\n    local shellCompDirectiveNoSpace=%[4]d\n    local shellCompDirectiveNoFileComp=%[5]d\n    local shellCompDirectiveFilterFileExt=%[6]d\n    local shellCompDirectiveFilterDirs=%[7]d\n    local shellCompDirectiveKeepOrder=%[8]d\n\n    local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder\n    local -a completions\n\n    __%[1]s_debug \"\\n========= starting completion logic ==========\"\n    __%[1]s_debug \"CURRENT: ${CURRENT}, words[*]: ${words[*]}\"\n\n    # The user could have moved the cursor backwards on the command-line.\n    # We need to trigger completion from the $CURRENT location, so we need\n    # to truncate the command-line ($words) up to the $CURRENT location.\n    # (We cannot use $CURSOR as its value does not work when a command is an alias.)\n    words=(\"${=words[1,CURRENT]}\")\n    __%[1]s_debug \"Truncated words[*]: ${words[*]},\"\n\n    lastParam=${words[-1]}\n    lastChar=${lastParam[-1]}\n    __%[1]s_debug \"lastParam: ${lastParam}, lastChar: ${lastChar}\"\n\n    # For zsh, when completing a flag with an = (e.g., %[1]s -n=<TAB>)\n    # completions must be prefixed with the flag\n    setopt local_options BASH_REMATCH\n    if [[ \"${lastParam}\" =~ '-.*=' ]]; then\n        # We are dealing with a flag with an =\n        flagPrefix=\"-P ${BASH_REMATCH}\"\n    fi\n\n    # Prepare the command to obtain completions\n    requestComp=\"${words[1]} %[2]s ${words[2,-1]}\"\n    if [ \"${lastChar}\" = \"\" ]; then\n        # If the last parameter is complete (there is a space following it)\n        # We add an extra empty parameter so we can indicate this to the go completion code.\n        __%[1]s_debug \"Adding extra empty parameter\"\n        requestComp=\"${requestComp} \\\"\\\"\"\n    fi\n\n    __%[1]s_debug \"About to call: eval ${requestComp}\"\n\n    # Use eval to handle any environment variables and such\n    out=$(eval ${requestComp} 2>/dev/null)\n    __%[1]s_debug \"completion output: ${out}\"\n\n    # Extract the directive integer following a : from the last line\n    local lastLine\n    while IFS='\\n' read -r line; do\n        lastLine=${line}\n    done < <(printf \"%%s\\n\" \"${out[@]}\")\n    __%[1]s_debug \"last line: ${lastLine}\"\n\n    if [ \"${lastLine[1]}\" = : ]; then\n        directive=${lastLine[2,-1]}\n        # Remove the directive including the : and the newline\n        local suffix\n        (( suffix=${#lastLine}+2))\n        out=${out[1,-$suffix]}\n    else\n        # There is no directive specified.  Leave $out as is.\n        __%[1]s_debug \"No directive found.  Setting do default\"\n        directive=0\n    fi\n\n    __%[1]s_debug \"directive: ${directive}\"\n    __%[1]s_debug \"completions: ${out}\"\n    __%[1]s_debug \"flagPrefix: ${flagPrefix}\"\n\n    if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then\n        __%[1]s_debug \"Completion received error. Ignoring completions.\"\n        return\n    fi\n\n    local activeHelpMarker=\"%[9]s\"\n    local endIndex=${#activeHelpMarker}\n    local startIndex=$((${#activeHelpMarker}+1))\n    local hasActiveHelp=0\n    while IFS='\\n' read -r comp; do\n        # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker)\n        if [ \"${comp[1,$endIndex]}\" = \"$activeHelpMarker\" ];then\n            __%[1]s_debug \"ActiveHelp found: $comp\"\n            comp=\"${comp[$startIndex,-1]}\"\n            if [ -n \"$comp\" ]; then\n                compadd -x \"${comp}\"\n                __%[1]s_debug \"ActiveHelp will need delimiter\"\n                hasActiveHelp=1\n            fi\n\n            continue\n        fi\n\n        if [ -n \"$comp\" ]; then\n            # If requested, completions are returned with a description.\n            # The description is preceded by a TAB character.\n            # For zsh's _describe, we need to use a : instead of a TAB.\n            # We first need to escape any : as part of the completion itself.\n            comp=${comp//:/\\\\:}\n\n            local tab=\"$(printf '\\t')\"\n            comp=${comp//$tab/:}\n\n            __%[1]s_debug \"Adding completion: ${comp}\"\n            completions+=${comp}\n            lastComp=$comp\n        fi\n    done < <(printf \"%%s\\n\" \"${out[@]}\")\n\n    # Add a delimiter after the activeHelp statements, but only if:\n    # - there are completions following the activeHelp statements, or\n    # - file completion will be performed (so there will be choices after the activeHelp)\n    if [ $hasActiveHelp -eq 1 ]; then\n        if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then\n            __%[1]s_debug \"Adding activeHelp delimiter\"\n            compadd -x \"--\"\n            hasActiveHelp=0\n        fi\n    fi\n\n    if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then\n        __%[1]s_debug \"Activating nospace.\"\n        noSpace=\"-S ''\"\n    fi\n\n    if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then\n        __%[1]s_debug \"Activating keep order.\"\n        keepOrder=\"-V\"\n    fi\n\n    if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then\n        # File extension filtering\n        local filteringCmd\n        filteringCmd='_files'\n        for filter in ${completions[@]}; do\n            if [ ${filter[1]} != '*' ]; then\n                # zsh requires a glob pattern to do file filtering\n                filter=\"\\*.$filter\"\n            fi\n            filteringCmd+=\" -g $filter\"\n        done\n        filteringCmd+=\" ${flagPrefix}\"\n\n        __%[1]s_debug \"File filtering command: $filteringCmd\"\n        _arguments '*:filename:'\"$filteringCmd\"\n    elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then\n        # File completion for directories only\n        local subdir\n        subdir=\"${completions[1]}\"\n        if [ -n \"$subdir\" ]; then\n            __%[1]s_debug \"Listing directories in $subdir\"\n            pushd \"${subdir}\" >/dev/null 2>&1\n        else\n            __%[1]s_debug \"Listing directories in .\"\n        fi\n\n        local result\n        _arguments '*:dirname:_files -/'\" ${flagPrefix}\"\n        result=$?\n        if [ -n \"$subdir\" ]; then\n            popd >/dev/null 2>&1\n        fi\n        return $result\n    else\n        __%[1]s_debug \"Calling _describe\"\n        if eval _describe $keepOrder \"completions\" completions $flagPrefix $noSpace; then\n            __%[1]s_debug \"_describe found some completions\"\n\n            # Return the success of having called _describe\n            return 0\n        else\n            __%[1]s_debug \"_describe did not find completions.\"\n            __%[1]s_debug \"Checking if we should do file completion.\"\n            if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then\n                __%[1]s_debug \"deactivating file completion\"\n\n                # We must return an error code here to let zsh know that there were no\n                # completions found by _describe; this is what will trigger other\n                # matching algorithms to attempt to find completions.\n                # For example zsh can match letters in the middle of words.\n                return 1\n            else\n                # Perform file completion\n                __%[1]s_debug \"Activating file completion\"\n\n                # We must return the result of this command, so it must be the\n                # last command, or else we must store its result to return it.\n                _arguments '*:filename:_files'\" ${flagPrefix}\"\n            fi\n        fi\n    fi\n}\n\n# don't run the completion function when being source-ed or eval-ed\nif [ \"$funcstack[1]\" = \"_%[1]s\" ]; then\n    _%[1]s\nfi\n`, name, compCmd,\n\t\tShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,\n\t\tShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,\n\t\tactiveHelpMarker))\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/.editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.go]\nindent_style = tab\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/.gitignore",
    "content": ".idea/*\n\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/.golangci.yaml",
    "content": "linters:\n    disable-all: true\n    enable:\n        - nolintlint\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/.travis.yml",
    "content": "sudo: false\n\nlanguage: go\n\ngo:\n  - 1.9.x\n  - 1.10.x\n  - 1.11.x\n  - tip\n\nmatrix:\n  allow_failures:\n    - go: tip\n\ninstall:\n  - go get golang.org/x/lint/golint\n  - export PATH=$GOPATH/bin:$PATH\n  - go install ./...\n\nscript:\n  - verify/all.sh -v\n  - go test ./...\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/LICENSE",
    "content": "Copyright (c) 2012 Alex Ogier. All rights reserved.\nCopyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/README.md",
    "content": "[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag)\n[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/pflag)](https://goreportcard.com/report/github.com/spf13/pflag)\n[![GoDoc](https://godoc.org/github.com/spf13/pflag?status.svg)](https://godoc.org/github.com/spf13/pflag)\n\n## Description\n\npflag is a drop-in replacement for Go's flag package, implementing\nPOSIX/GNU-style --flags.\n\npflag is compatible with the [GNU extensions to the POSIX recommendations\nfor command-line options][1]. For a more precise description, see the\n\"Command-line flag syntax\" section below.\n\n[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html\n\npflag is available under the same style of BSD license as the Go language,\nwhich can be found in the LICENSE file.\n\n## Installation\n\npflag is available using the standard `go get` command.\n\nInstall by running:\n\n    go get github.com/spf13/pflag\n\nRun tests by running:\n\n    go test github.com/spf13/pflag\n\n## Usage\n\npflag is a drop-in replacement of Go's native flag package. If you import\npflag under the name \"flag\" then all code should continue to function\nwith no changes.\n\n``` go\nimport flag \"github.com/spf13/pflag\"\n```\n\nThere is one exception to this: if you directly instantiate the Flag struct\nthere is one more field \"Shorthand\" that you will need to set.\nMost code never instantiates this struct directly, and instead uses\nfunctions such as String(), BoolVar(), and Var(), and is therefore\nunaffected.\n\nDefine flags using flag.String(), Bool(), Int(), etc.\n\nThis declares an integer flag, -flagname, stored in the pointer ip, with type *int.\n\n``` go\nvar ip *int = flag.Int(\"flagname\", 1234, \"help message for flagname\")\n```\n\nIf you like, you can bind the flag to a variable using the Var() functions.\n\n``` go\nvar flagvar int\nfunc init() {\n    flag.IntVar(&flagvar, \"flagname\", 1234, \"help message for flagname\")\n}\n```\n\nOr you can create custom flags that satisfy the Value interface (with\npointer receivers) and couple them to flag parsing by\n\n``` go\nflag.Var(&flagVal, \"name\", \"help message for flagname\")\n```\n\nFor such flags, the default value is just the initial value of the variable.\n\nAfter all flags are defined, call\n\n``` go\nflag.Parse()\n```\n\nto parse the command line into the defined flags.\n\nFlags may then be used directly. If you're using the flags themselves,\nthey are all pointers; if you bind to variables, they're values.\n\n``` go\nfmt.Println(\"ip has value \", *ip)\nfmt.Println(\"flagvar has value \", flagvar)\n```\n\nThere are helper functions available to get the value stored in a Flag if you have a FlagSet but find\nit difficult to keep up with all of the pointers in your code.\nIf you have a pflag.FlagSet with a flag called 'flagname' of type int you\ncan use GetInt() to get the int value. But notice that 'flagname' must exist\nand it must be an int. GetString(\"flagname\") will fail.\n\n``` go\ni, err := flagset.GetInt(\"flagname\")\n```\n\nAfter parsing, the arguments after the flag are available as the\nslice flag.Args() or individually as flag.Arg(i).\nThe arguments are indexed from 0 through flag.NArg()-1.\n\nThe pflag package also defines some new functions that are not in flag,\nthat give one-letter shorthands for flags. You can use these by appending\n'P' to the name of any function that defines a flag.\n\n``` go\nvar ip = flag.IntP(\"flagname\", \"f\", 1234, \"help message\")\nvar flagvar bool\nfunc init() {\n\tflag.BoolVarP(&flagvar, \"boolname\", \"b\", true, \"help message\")\n}\nflag.VarP(&flagVal, \"varname\", \"v\", \"help message\")\n```\n\nShorthand letters can be used with single dashes on the command line.\nBoolean shorthand flags can be combined with other shorthand flags.\n\nThe default set of command-line flags is controlled by\ntop-level functions.  The FlagSet type allows one to define\nindependent sets of flags, such as to implement subcommands\nin a command-line interface. The methods of FlagSet are\nanalogous to the top-level functions for the command-line\nflag set.\n\n## Setting no option default values for flags\n\nAfter you create a flag it is possible to set the pflag.NoOptDefVal for\nthe given flag. Doing this changes the meaning of the flag slightly. If\na flag has a NoOptDefVal and the flag is set on the command line without\nan option the flag will be set to the NoOptDefVal. For example given:\n\n``` go\nvar ip = flag.IntP(\"flagname\", \"f\", 1234, \"help message\")\nflag.Lookup(\"flagname\").NoOptDefVal = \"4321\"\n```\n\nWould result in something like\n\n| Parsed Arguments | Resulting Value |\n| -------------    | -------------   |\n| --flagname=1357  | ip=1357         |\n| --flagname       | ip=4321         |\n| [nothing]        | ip=1234         |\n\n## Command line flag syntax\n\n```\n--flag    // boolean flags, or flags with no option default values\n--flag x  // only on flags without a default value\n--flag=x\n```\n\nUnlike the flag package, a single dash before an option means something\ndifferent than a double dash. Single dashes signify a series of shorthand\nletters for flags. All but the last shorthand letter must be boolean flags\nor a flag with a default value\n\n```\n// boolean or flags where the 'no option default value' is set\n-f\n-f=true\n-abc\nbut\n-b true is INVALID\n\n// non-boolean and flags without a 'no option default value'\n-n 1234\n-n=1234\n-n1234\n\n// mixed\n-abcs \"hello\"\n-absd=\"hello\"\n-abcs1234\n```\n\nFlag parsing stops after the terminator \"--\". Unlike the flag package,\nflags can be interspersed with arguments anywhere on the command line\nbefore this terminator.\n\nInteger flags accept 1234, 0664, 0x1234 and may be negative.\nBoolean flags (in their long form) accept 1, 0, t, f, true, false,\nTRUE, FALSE, True, False.\nDuration flags accept any input valid for time.ParseDuration.\n\n## Mutating or \"Normalizing\" Flag names\n\nIt is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow.\n\n**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag\n\n``` go\nfunc wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {\n\tfrom := []string{\"-\", \"_\"}\n\tto := \".\"\n\tfor _, sep := range from {\n\t\tname = strings.Replace(name, sep, to, -1)\n\t}\n\treturn pflag.NormalizedName(name)\n}\n\nmyFlagSet.SetNormalizeFunc(wordSepNormalizeFunc)\n```\n\n**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name\n\n``` go\nfunc aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {\n\tswitch name {\n\tcase \"old-flag-name\":\n\t\tname = \"new-flag-name\"\n\t\tbreak\n\t}\n\treturn pflag.NormalizedName(name)\n}\n\nmyFlagSet.SetNormalizeFunc(aliasNormalizeFunc)\n```\n\n## Deprecating a flag or its shorthand\nIt is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used.\n\n**Example #1**: You want to deprecate a flag named \"badflag\" as well as inform the users what flag they should use instead.\n```go\n// deprecate a flag by specifying its name and a usage message\nflags.MarkDeprecated(\"badflag\", \"please use --good-flag instead\")\n```\nThis hides \"badflag\" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when \"badflag\" is used.\n\n**Example #2**: You want to keep a flag name \"noshorthandflag\" but deprecate its shortname \"n\".\n```go\n// deprecate a flag shorthand by specifying its flag name and a usage message\nflags.MarkShorthandDeprecated(\"noshorthandflag\", \"please use --noshorthandflag only\")\n```\nThis hides the shortname \"n\" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand \"n\" is used.\n\nNote that usage message is essential here, and it should not be empty.\n\n## Hidden flags\nIt is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text.\n\n**Example**: You have a flag named \"secretFlag\" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available.\n```go\n// hide a flag by specifying its name\nflags.MarkHidden(\"secretFlag\")\n```\n\n## Disable sorting of flags\n`pflag` allows you to disable sorting of flags for help and usage message.\n\n**Example**:\n```go\nflags.BoolP(\"verbose\", \"v\", false, \"verbose output\")\nflags.String(\"coolflag\", \"yeaah\", \"it's really cool flag\")\nflags.Int(\"usefulflag\", 777, \"sometimes it's very useful\")\nflags.SortFlags = false\nflags.PrintDefaults()\n```\n**Output**:\n```\n  -v, --verbose           verbose output\n      --coolflag string   it's really cool flag (default \"yeaah\")\n      --usefulflag int    sometimes it's very useful (default 777)\n```\n\n\n## Supporting Go flags when using pflag\nIn order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary\nto support flags defined by third-party dependencies (e.g. `golang/glog`).\n\n**Example**: You want to add the Go flags to the `CommandLine` flagset\n```go\nimport (\n\tgoflag \"flag\"\n\tflag \"github.com/spf13/pflag\"\n)\n\nvar ip *int = flag.Int(\"flagname\", 1234, \"help message for flagname\")\n\nfunc main() {\n\tflag.CommandLine.AddGoFlagSet(goflag.CommandLine)\n\tflag.Parse()\n}\n```\n\n### Using pflag with go test\n`pflag` does not parse the shorthand versions of go test's built-in flags (i.e., those starting with `-test.`).\nFor more context, see issues [#63](https://github.com/spf13/pflag/issues/63) and [#238](https://github.com/spf13/pflag/issues/238) for more details.\n\nFor example, if you use pflag in your `TestMain` function and call `pflag.Parse()` after defining your custom flags, running a test like this:\n```bash\ngo test /your/tests -run ^YourTest -v --your-test-pflags\n```\nwill result in the `-v` flag being ignored. This happens because of the way pflag handles flag parsing, skipping over go test's built-in shorthand flags.\nTo work around this, you can use the `ParseSkippedFlags` function, which ensures that go test's flags are parsed separately using the standard flag package.\n\n**Example**: You want to parse go test flags that are otherwise ignore by `pflag.Parse()`\n```go\nimport (\n\tgoflag \"flag\"\n\tflag \"github.com/spf13/pflag\"\n)\n\nvar ip *int = flag.Int(\"flagname\", 1234, \"help message for flagname\")\n\nfunc main() {\n\tflag.CommandLine.AddGoFlagSet(goflag.CommandLine)\n    flag.ParseSkippedFlags(os.Args[1:], goflag.CommandLine)\n\tflag.Parse()\n}\n```\n\n## More info\n\nYou can see the full reference documentation of the pflag package\n[at godoc.org][3], or through go's standard documentation system by\nrunning `godoc -http=:6060` and browsing to\n[http://localhost:6060/pkg/github.com/spf13/pflag][2] after\ninstallation.\n\n[2]: http://localhost:6060/pkg/github.com/spf13/pflag\n[3]: http://godoc.org/github.com/spf13/pflag\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/bool.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// optional interface to indicate boolean flags that can be\n// supplied without \"=value\" text\ntype boolFlag interface {\n\tValue\n\tIsBoolFlag() bool\n}\n\n// -- bool Value\ntype boolValue bool\n\nfunc newBoolValue(val bool, p *bool) *boolValue {\n\t*p = val\n\treturn (*boolValue)(p)\n}\n\nfunc (b *boolValue) Set(s string) error {\n\tv, err := strconv.ParseBool(s)\n\t*b = boolValue(v)\n\treturn err\n}\n\nfunc (b *boolValue) Type() string {\n\treturn \"bool\"\n}\n\nfunc (b *boolValue) String() string { return strconv.FormatBool(bool(*b)) }\n\nfunc (b *boolValue) IsBoolFlag() bool { return true }\n\nfunc boolConv(sval string) (interface{}, error) {\n\treturn strconv.ParseBool(sval)\n}\n\n// GetBool return the bool value of a flag with the given name\nfunc (f *FlagSet) GetBool(name string) (bool, error) {\n\tval, err := f.getFlagType(name, \"bool\", boolConv)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn val.(bool), nil\n}\n\n// BoolVar defines a bool flag with specified name, default value, and usage string.\n// The argument p points to a bool variable in which to store the value of the flag.\nfunc (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) {\n\tf.BoolVarP(p, name, \"\", value, usage)\n}\n\n// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {\n\tflag := f.VarPF(newBoolValue(value, p), name, shorthand, usage)\n\tflag.NoOptDefVal = \"true\"\n}\n\n// BoolVar defines a bool flag with specified name, default value, and usage string.\n// The argument p points to a bool variable in which to store the value of the flag.\nfunc BoolVar(p *bool, name string, value bool, usage string) {\n\tBoolVarP(p, name, \"\", value, usage)\n}\n\n// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.\nfunc BoolVarP(p *bool, name, shorthand string, value bool, usage string) {\n\tflag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage)\n\tflag.NoOptDefVal = \"true\"\n}\n\n// Bool defines a bool flag with specified name, default value, and usage string.\n// The return value is the address of a bool variable that stores the value of the flag.\nfunc (f *FlagSet) Bool(name string, value bool, usage string) *bool {\n\treturn f.BoolP(name, \"\", value, usage)\n}\n\n// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool {\n\tp := new(bool)\n\tf.BoolVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Bool defines a bool flag with specified name, default value, and usage string.\n// The return value is the address of a bool variable that stores the value of the flag.\nfunc Bool(name string, value bool, usage string) *bool {\n\treturn BoolP(name, \"\", value, usage)\n}\n\n// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.\nfunc BoolP(name, shorthand string, value bool, usage string) *bool {\n\tb := CommandLine.BoolP(name, shorthand, value, usage)\n\treturn b\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/bool_func.go",
    "content": "package pflag\n\n// -- func Value\ntype boolfuncValue func(string) error\n\nfunc (f boolfuncValue) Set(s string) error { return f(s) }\n\nfunc (f boolfuncValue) Type() string { return \"boolfunc\" }\n\nfunc (f boolfuncValue) String() string { return \"\" } // same behavior as stdlib 'flag' package\n\nfunc (f boolfuncValue) IsBoolFlag() bool { return true }\n\n// BoolFunc defines a func flag with specified name, callback function and usage string.\n//\n// The callback function will be called every time \"--{name}\" (or any form that matches the flag) is parsed\n// on the command line.\nfunc (f *FlagSet) BoolFunc(name string, usage string, fn func(string) error) {\n\tf.BoolFuncP(name, \"\", usage, fn)\n}\n\n// BoolFuncP is like BoolFunc, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BoolFuncP(name, shorthand string, usage string, fn func(string) error) {\n\tvar val Value = boolfuncValue(fn)\n\tflag := f.VarPF(val, name, shorthand, usage)\n\tflag.NoOptDefVal = \"true\"\n}\n\n// BoolFunc defines a func flag with specified name, callback function and usage string.\n//\n// The callback function will be called every time \"--{name}\" (or any form that matches the flag) is parsed\n// on the command line.\nfunc BoolFunc(name string, usage string, fn func(string) error) {\n\tCommandLine.BoolFuncP(name, \"\", usage, fn)\n}\n\n// BoolFuncP is like BoolFunc, but accepts a shorthand letter that can be used after a single dash.\nfunc BoolFuncP(name, shorthand string, usage string, fn func(string) error) {\n\tCommandLine.BoolFuncP(name, shorthand, usage, fn)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/bool_slice.go",
    "content": "package pflag\n\nimport (\n\t\"io\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- boolSlice Value\ntype boolSliceValue struct {\n\tvalue   *[]bool\n\tchanged bool\n}\n\nfunc newBoolSliceValue(val []bool, p *[]bool) *boolSliceValue {\n\tbsv := new(boolSliceValue)\n\tbsv.value = p\n\t*bsv.value = val\n\treturn bsv\n}\n\n// Set converts, and assigns, the comma-separated boolean argument string representation as the []bool value of this flag.\n// If Set is called on a flag that already has a []bool assigned, the newly converted values will be appended.\nfunc (s *boolSliceValue) Set(val string) error {\n\n\t// remove all quote characters\n\trmQuote := strings.NewReplacer(`\"`, \"\", `'`, \"\", \"`\", \"\")\n\n\t// read flag arguments with CSV parser\n\tboolStrSlice, err := readAsCSV(rmQuote.Replace(val))\n\tif err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\t// parse boolean values into slice\n\tout := make([]bool, 0, len(boolStrSlice))\n\tfor _, boolStr := range boolStrSlice {\n\t\tb, err := strconv.ParseBool(strings.TrimSpace(boolStr))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tout = append(out, b)\n\t}\n\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\n\ts.changed = true\n\n\treturn nil\n}\n\n// Type returns a string that uniquely represents this flag's type.\nfunc (s *boolSliceValue) Type() string {\n\treturn \"boolSlice\"\n}\n\n// String defines a \"native\" format for this boolean slice flag value.\nfunc (s *boolSliceValue) String() string {\n\n\tboolStrSlice := make([]string, len(*s.value))\n\tfor i, b := range *s.value {\n\t\tboolStrSlice[i] = strconv.FormatBool(b)\n\t}\n\n\tout, _ := writeAsCSV(boolStrSlice)\n\n\treturn \"[\" + out + \"]\"\n}\n\nfunc (s *boolSliceValue) fromString(val string) (bool, error) {\n\treturn strconv.ParseBool(val)\n}\n\nfunc (s *boolSliceValue) toString(val bool) string {\n\treturn strconv.FormatBool(val)\n}\n\nfunc (s *boolSliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *boolSliceValue) Replace(val []string) error {\n\tout := make([]bool, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *boolSliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc boolSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []bool{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]bool, len(ss))\n\tfor i, t := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.ParseBool(t)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn out, nil\n}\n\n// GetBoolSlice returns the []bool value of a flag with the given name.\nfunc (f *FlagSet) GetBoolSlice(name string) ([]bool, error) {\n\tval, err := f.getFlagType(name, \"boolSlice\", boolSliceConv)\n\tif err != nil {\n\t\treturn []bool{}, err\n\t}\n\treturn val.([]bool), nil\n}\n\n// BoolSliceVar defines a boolSlice flag with specified name, default value, and usage string.\n// The argument p points to a []bool variable in which to store the value of the flag.\nfunc (f *FlagSet) BoolSliceVar(p *[]bool, name string, value []bool, usage string) {\n\tf.VarP(newBoolSliceValue(value, p), name, \"\", usage)\n}\n\n// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) {\n\tf.VarP(newBoolSliceValue(value, p), name, shorthand, usage)\n}\n\n// BoolSliceVar defines a []bool flag with specified name, default value, and usage string.\n// The argument p points to a []bool variable in which to store the value of the flag.\nfunc BoolSliceVar(p *[]bool, name string, value []bool, usage string) {\n\tCommandLine.VarP(newBoolSliceValue(value, p), name, \"\", usage)\n}\n\n// BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string) {\n\tCommandLine.VarP(newBoolSliceValue(value, p), name, shorthand, usage)\n}\n\n// BoolSlice defines a []bool flag with specified name, default value, and usage string.\n// The return value is the address of a []bool variable that stores the value of the flag.\nfunc (f *FlagSet) BoolSlice(name string, value []bool, usage string) *[]bool {\n\tp := []bool{}\n\tf.BoolSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool {\n\tp := []bool{}\n\tf.BoolSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// BoolSlice defines a []bool flag with specified name, default value, and usage string.\n// The return value is the address of a []bool variable that stores the value of the flag.\nfunc BoolSlice(name string, value []bool, usage string) *[]bool {\n\treturn CommandLine.BoolSliceP(name, \"\", value, usage)\n}\n\n// BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool {\n\treturn CommandLine.BoolSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/bytes.go",
    "content": "package pflag\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"strings\"\n)\n\n// BytesHex adapts []byte for use as a flag. Value of flag is HEX encoded\ntype bytesHexValue []byte\n\n// String implements pflag.Value.String.\nfunc (bytesHex bytesHexValue) String() string {\n\treturn fmt.Sprintf(\"%X\", []byte(bytesHex))\n}\n\n// Set implements pflag.Value.Set.\nfunc (bytesHex *bytesHexValue) Set(value string) error {\n\tbin, err := hex.DecodeString(strings.TrimSpace(value))\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*bytesHex = bin\n\n\treturn nil\n}\n\n// Type implements pflag.Value.Type.\nfunc (*bytesHexValue) Type() string {\n\treturn \"bytesHex\"\n}\n\nfunc newBytesHexValue(val []byte, p *[]byte) *bytesHexValue {\n\t*p = val\n\treturn (*bytesHexValue)(p)\n}\n\nfunc bytesHexConv(sval string) (interface{}, error) {\n\n\tbin, err := hex.DecodeString(sval)\n\n\tif err == nil {\n\t\treturn bin, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"invalid string being converted to Bytes: %s %s\", sval, err)\n}\n\n// GetBytesHex return the []byte value of a flag with the given name\nfunc (f *FlagSet) GetBytesHex(name string) ([]byte, error) {\n\tval, err := f.getFlagType(name, \"bytesHex\", bytesHexConv)\n\n\tif err != nil {\n\t\treturn []byte{}, err\n\t}\n\n\treturn val.([]byte), nil\n}\n\n// BytesHexVar defines an []byte flag with specified name, default value, and usage string.\n// The argument p points to an []byte variable in which to store the value of the flag.\nfunc (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string) {\n\tf.VarP(newBytesHexValue(value, p), name, \"\", usage)\n}\n\n// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) {\n\tf.VarP(newBytesHexValue(value, p), name, shorthand, usage)\n}\n\n// BytesHexVar defines an []byte flag with specified name, default value, and usage string.\n// The argument p points to an []byte variable in which to store the value of the flag.\nfunc BytesHexVar(p *[]byte, name string, value []byte, usage string) {\n\tCommandLine.VarP(newBytesHexValue(value, p), name, \"\", usage)\n}\n\n// BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash.\nfunc BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string) {\n\tCommandLine.VarP(newBytesHexValue(value, p), name, shorthand, usage)\n}\n\n// BytesHex defines an []byte flag with specified name, default value, and usage string.\n// The return value is the address of an []byte variable that stores the value of the flag.\nfunc (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte {\n\tp := new([]byte)\n\tf.BytesHexVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte {\n\tp := new([]byte)\n\tf.BytesHexVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// BytesHex defines an []byte flag with specified name, default value, and usage string.\n// The return value is the address of an []byte variable that stores the value of the flag.\nfunc BytesHex(name string, value []byte, usage string) *[]byte {\n\treturn CommandLine.BytesHexP(name, \"\", value, usage)\n}\n\n// BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash.\nfunc BytesHexP(name, shorthand string, value []byte, usage string) *[]byte {\n\treturn CommandLine.BytesHexP(name, shorthand, value, usage)\n}\n\n// BytesBase64 adapts []byte for use as a flag. Value of flag is Base64 encoded\ntype bytesBase64Value []byte\n\n// String implements pflag.Value.String.\nfunc (bytesBase64 bytesBase64Value) String() string {\n\treturn base64.StdEncoding.EncodeToString([]byte(bytesBase64))\n}\n\n// Set implements pflag.Value.Set.\nfunc (bytesBase64 *bytesBase64Value) Set(value string) error {\n\tbin, err := base64.StdEncoding.DecodeString(strings.TrimSpace(value))\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*bytesBase64 = bin\n\n\treturn nil\n}\n\n// Type implements pflag.Value.Type.\nfunc (*bytesBase64Value) Type() string {\n\treturn \"bytesBase64\"\n}\n\nfunc newBytesBase64Value(val []byte, p *[]byte) *bytesBase64Value {\n\t*p = val\n\treturn (*bytesBase64Value)(p)\n}\n\nfunc bytesBase64ValueConv(sval string) (interface{}, error) {\n\n\tbin, err := base64.StdEncoding.DecodeString(sval)\n\tif err == nil {\n\t\treturn bin, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"invalid string being converted to Bytes: %s %s\", sval, err)\n}\n\n// GetBytesBase64 return the []byte value of a flag with the given name\nfunc (f *FlagSet) GetBytesBase64(name string) ([]byte, error) {\n\tval, err := f.getFlagType(name, \"bytesBase64\", bytesBase64ValueConv)\n\n\tif err != nil {\n\t\treturn []byte{}, err\n\t}\n\n\treturn val.([]byte), nil\n}\n\n// BytesBase64Var defines an []byte flag with specified name, default value, and usage string.\n// The argument p points to an []byte variable in which to store the value of the flag.\nfunc (f *FlagSet) BytesBase64Var(p *[]byte, name string, value []byte, usage string) {\n\tf.VarP(newBytesBase64Value(value, p), name, \"\", usage)\n}\n\n// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) {\n\tf.VarP(newBytesBase64Value(value, p), name, shorthand, usage)\n}\n\n// BytesBase64Var defines an []byte flag with specified name, default value, and usage string.\n// The argument p points to an []byte variable in which to store the value of the flag.\nfunc BytesBase64Var(p *[]byte, name string, value []byte, usage string) {\n\tCommandLine.VarP(newBytesBase64Value(value, p), name, \"\", usage)\n}\n\n// BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string) {\n\tCommandLine.VarP(newBytesBase64Value(value, p), name, shorthand, usage)\n}\n\n// BytesBase64 defines an []byte flag with specified name, default value, and usage string.\n// The return value is the address of an []byte variable that stores the value of the flag.\nfunc (f *FlagSet) BytesBase64(name string, value []byte, usage string) *[]byte {\n\tp := new([]byte)\n\tf.BytesBase64VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte {\n\tp := new([]byte)\n\tf.BytesBase64VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// BytesBase64 defines an []byte flag with specified name, default value, and usage string.\n// The return value is the address of an []byte variable that stores the value of the flag.\nfunc BytesBase64(name string, value []byte, usage string) *[]byte {\n\treturn CommandLine.BytesBase64P(name, \"\", value, usage)\n}\n\n// BytesBase64P is like BytesBase64, but accepts a shorthand letter that can be used after a single dash.\nfunc BytesBase64P(name, shorthand string, value []byte, usage string) *[]byte {\n\treturn CommandLine.BytesBase64P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/count.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- count Value\ntype countValue int\n\nfunc newCountValue(val int, p *int) *countValue {\n\t*p = val\n\treturn (*countValue)(p)\n}\n\nfunc (i *countValue) Set(s string) error {\n\t// \"+1\" means that no specific value was passed, so increment\n\tif s == \"+1\" {\n\t\t*i = countValue(*i + 1)\n\t\treturn nil\n\t}\n\tv, err := strconv.ParseInt(s, 0, 0)\n\t*i = countValue(v)\n\treturn err\n}\n\nfunc (i *countValue) Type() string {\n\treturn \"count\"\n}\n\nfunc (i *countValue) String() string { return strconv.Itoa(int(*i)) }\n\nfunc countConv(sval string) (interface{}, error) {\n\ti, err := strconv.Atoi(sval)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn i, nil\n}\n\n// GetCount return the int value of a flag with the given name\nfunc (f *FlagSet) GetCount(name string) (int, error) {\n\tval, err := f.getFlagType(name, \"count\", countConv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int), nil\n}\n\n// CountVar defines a count flag with specified name, default value, and usage string.\n// The argument p points to an int variable in which to store the value of the flag.\n// A count flag will add 1 to its value every time it is found on the command line\nfunc (f *FlagSet) CountVar(p *int, name string, usage string) {\n\tf.CountVarP(p, name, \"\", usage)\n}\n\n// CountVarP is like CountVar only take a shorthand for the flag name.\nfunc (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) {\n\tflag := f.VarPF(newCountValue(0, p), name, shorthand, usage)\n\tflag.NoOptDefVal = \"+1\"\n}\n\n// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set\nfunc CountVar(p *int, name string, usage string) {\n\tCommandLine.CountVar(p, name, usage)\n}\n\n// CountVarP is like CountVar only take a shorthand for the flag name.\nfunc CountVarP(p *int, name, shorthand string, usage string) {\n\tCommandLine.CountVarP(p, name, shorthand, usage)\n}\n\n// Count defines a count flag with specified name, default value, and usage string.\n// The return value is the address of an int variable that stores the value of the flag.\n// A count flag will add 1 to its value every time it is found on the command line\nfunc (f *FlagSet) Count(name string, usage string) *int {\n\tp := new(int)\n\tf.CountVarP(p, name, \"\", usage)\n\treturn p\n}\n\n// CountP is like Count only takes a shorthand for the flag name.\nfunc (f *FlagSet) CountP(name, shorthand string, usage string) *int {\n\tp := new(int)\n\tf.CountVarP(p, name, shorthand, usage)\n\treturn p\n}\n\n// Count defines a count flag with specified name, default value, and usage string.\n// The return value is the address of an int variable that stores the value of the flag.\n// A count flag will add 1 to its value every time it is found on the command line\nfunc Count(name string, usage string) *int {\n\treturn CommandLine.CountP(name, \"\", usage)\n}\n\n// CountP is like Count only takes a shorthand for the flag name.\nfunc CountP(name, shorthand string, usage string) *int {\n\treturn CommandLine.CountP(name, shorthand, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/duration.go",
    "content": "package pflag\n\nimport (\n\t\"time\"\n)\n\n// -- time.Duration Value\ntype durationValue time.Duration\n\nfunc newDurationValue(val time.Duration, p *time.Duration) *durationValue {\n\t*p = val\n\treturn (*durationValue)(p)\n}\n\nfunc (d *durationValue) Set(s string) error {\n\tv, err := time.ParseDuration(s)\n\t*d = durationValue(v)\n\treturn err\n}\n\nfunc (d *durationValue) Type() string {\n\treturn \"duration\"\n}\n\nfunc (d *durationValue) String() string { return (*time.Duration)(d).String() }\n\nfunc durationConv(sval string) (interface{}, error) {\n\treturn time.ParseDuration(sval)\n}\n\n// GetDuration return the duration value of a flag with the given name\nfunc (f *FlagSet) GetDuration(name string) (time.Duration, error) {\n\tval, err := f.getFlagType(name, \"duration\", durationConv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(time.Duration), nil\n}\n\n// DurationVar defines a time.Duration flag with specified name, default value, and usage string.\n// The argument p points to a time.Duration variable in which to store the value of the flag.\nfunc (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {\n\tf.VarP(newDurationValue(value, p), name, \"\", usage)\n}\n\n// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {\n\tf.VarP(newDurationValue(value, p), name, shorthand, usage)\n}\n\n// DurationVar defines a time.Duration flag with specified name, default value, and usage string.\n// The argument p points to a time.Duration variable in which to store the value of the flag.\nfunc DurationVar(p *time.Duration, name string, value time.Duration, usage string) {\n\tCommandLine.VarP(newDurationValue(value, p), name, \"\", usage)\n}\n\n// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.\nfunc DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {\n\tCommandLine.VarP(newDurationValue(value, p), name, shorthand, usage)\n}\n\n// Duration defines a time.Duration flag with specified name, default value, and usage string.\n// The return value is the address of a time.Duration variable that stores the value of the flag.\nfunc (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {\n\tp := new(time.Duration)\n\tf.DurationVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {\n\tp := new(time.Duration)\n\tf.DurationVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Duration defines a time.Duration flag with specified name, default value, and usage string.\n// The return value is the address of a time.Duration variable that stores the value of the flag.\nfunc Duration(name string, value time.Duration, usage string) *time.Duration {\n\treturn CommandLine.DurationP(name, \"\", value, usage)\n}\n\n// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.\nfunc DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {\n\treturn CommandLine.DurationP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/duration_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n)\n\n// -- durationSlice Value\ntype durationSliceValue struct {\n\tvalue   *[]time.Duration\n\tchanged bool\n}\n\nfunc newDurationSliceValue(val []time.Duration, p *[]time.Duration) *durationSliceValue {\n\tdsv := new(durationSliceValue)\n\tdsv.value = p\n\t*dsv.value = val\n\treturn dsv\n}\n\nfunc (s *durationSliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]time.Duration, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = time.ParseDuration(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *durationSliceValue) Type() string {\n\treturn \"durationSlice\"\n}\n\nfunc (s *durationSliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%s\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *durationSliceValue) fromString(val string) (time.Duration, error) {\n\treturn time.ParseDuration(val)\n}\n\nfunc (s *durationSliceValue) toString(val time.Duration) string {\n\treturn fmt.Sprintf(\"%s\", val)\n}\n\nfunc (s *durationSliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *durationSliceValue) Replace(val []string) error {\n\tout := make([]time.Duration, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *durationSliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc durationSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []time.Duration{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]time.Duration, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = time.ParseDuration(d)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\treturn out, nil\n}\n\n// GetDurationSlice returns the []time.Duration value of a flag with the given name\nfunc (f *FlagSet) GetDurationSlice(name string) ([]time.Duration, error) {\n\tval, err := f.getFlagType(name, \"durationSlice\", durationSliceConv)\n\tif err != nil {\n\t\treturn []time.Duration{}, err\n\t}\n\treturn val.([]time.Duration), nil\n}\n\n// DurationSliceVar defines a durationSlice flag with specified name, default value, and usage string.\n// The argument p points to a []time.Duration variable in which to store the value of the flag.\nfunc (f *FlagSet) DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) {\n\tf.VarP(newDurationSliceValue(value, p), name, \"\", usage)\n}\n\n// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) {\n\tf.VarP(newDurationSliceValue(value, p), name, shorthand, usage)\n}\n\n// DurationSliceVar defines a duration[] flag with specified name, default value, and usage string.\n// The argument p points to a duration[] variable in which to store the value of the flag.\nfunc DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string) {\n\tCommandLine.VarP(newDurationSliceValue(value, p), name, \"\", usage)\n}\n\n// DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string) {\n\tCommandLine.VarP(newDurationSliceValue(value, p), name, shorthand, usage)\n}\n\n// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string.\n// The return value is the address of a []time.Duration variable that stores the value of the flag.\nfunc (f *FlagSet) DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration {\n\tp := []time.Duration{}\n\tf.DurationSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration {\n\tp := []time.Duration{}\n\tf.DurationSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// DurationSlice defines a []time.Duration flag with specified name, default value, and usage string.\n// The return value is the address of a []time.Duration variable that stores the value of the flag.\nfunc DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration {\n\treturn CommandLine.DurationSliceP(name, \"\", value, usage)\n}\n\n// DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration {\n\treturn CommandLine.DurationSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/errors.go",
    "content": "package pflag\n\nimport \"fmt\"\n\n// notExistErrorMessageType specifies which flavor of \"flag does not exist\"\n// is printed by NotExistError. This allows the related errors to be grouped\n// under a single NotExistError struct without making a breaking change to\n// the error message text.\ntype notExistErrorMessageType int\n\nconst (\n\tflagNotExistMessage notExistErrorMessageType = iota\n\tflagNotDefinedMessage\n\tflagNoSuchFlagMessage\n\tflagUnknownFlagMessage\n\tflagUnknownShorthandFlagMessage\n)\n\n// NotExistError is the error returned when trying to access a flag that\n// does not exist in the FlagSet.\ntype NotExistError struct {\n\tname                string\n\tspecifiedShorthands string\n\tmessageType         notExistErrorMessageType\n}\n\n// Error implements error.\nfunc (e *NotExistError) Error() string {\n\tswitch e.messageType {\n\tcase flagNotExistMessage:\n\t\treturn fmt.Sprintf(\"flag %q does not exist\", e.name)\n\n\tcase flagNotDefinedMessage:\n\t\treturn fmt.Sprintf(\"flag accessed but not defined: %s\", e.name)\n\n\tcase flagNoSuchFlagMessage:\n\t\treturn fmt.Sprintf(\"no such flag -%v\", e.name)\n\n\tcase flagUnknownFlagMessage:\n\t\treturn fmt.Sprintf(\"unknown flag: --%s\", e.name)\n\n\tcase flagUnknownShorthandFlagMessage:\n\t\tc := rune(e.name[0])\n\t\treturn fmt.Sprintf(\"unknown shorthand flag: %q in -%s\", c, e.specifiedShorthands)\n\t}\n\n\tpanic(fmt.Errorf(\"unknown flagNotExistErrorMessageType: %v\", e.messageType))\n}\n\n// GetSpecifiedName returns the name of the flag (without dashes) as it\n// appeared in the parsed arguments.\nfunc (e *NotExistError) GetSpecifiedName() string {\n\treturn e.name\n}\n\n// GetSpecifiedShortnames returns the group of shorthand arguments\n// (without dashes) that the flag appeared within. If the flag was not in a\n// shorthand group, this will return an empty string.\nfunc (e *NotExistError) GetSpecifiedShortnames() string {\n\treturn e.specifiedShorthands\n}\n\n// ValueRequiredError is the error returned when a flag needs an argument but\n// no argument was provided.\ntype ValueRequiredError struct {\n\tflag                *Flag\n\tspecifiedName       string\n\tspecifiedShorthands string\n}\n\n// Error implements error.\nfunc (e *ValueRequiredError) Error() string {\n\tif len(e.specifiedShorthands) > 0 {\n\t\tc := rune(e.specifiedName[0])\n\t\treturn fmt.Sprintf(\"flag needs an argument: %q in -%s\", c, e.specifiedShorthands)\n\t}\n\n\treturn fmt.Sprintf(\"flag needs an argument: --%s\", e.specifiedName)\n}\n\n// GetFlag returns the flag for which the error occurred.\nfunc (e *ValueRequiredError) GetFlag() *Flag {\n\treturn e.flag\n}\n\n// GetSpecifiedName returns the name of the flag (without dashes) as it\n// appeared in the parsed arguments.\nfunc (e *ValueRequiredError) GetSpecifiedName() string {\n\treturn e.specifiedName\n}\n\n// GetSpecifiedShortnames returns the group of shorthand arguments\n// (without dashes) that the flag appeared within. If the flag was not in a\n// shorthand group, this will return an empty string.\nfunc (e *ValueRequiredError) GetSpecifiedShortnames() string {\n\treturn e.specifiedShorthands\n}\n\n// InvalidValueError is the error returned when an invalid value is used\n// for a flag.\ntype InvalidValueError struct {\n\tflag  *Flag\n\tvalue string\n\tcause error\n}\n\n// Error implements error.\nfunc (e *InvalidValueError) Error() string {\n\tflag := e.flag\n\tvar flagName string\n\tif flag.Shorthand != \"\" && flag.ShorthandDeprecated == \"\" {\n\t\tflagName = fmt.Sprintf(\"-%s, --%s\", flag.Shorthand, flag.Name)\n\t} else {\n\t\tflagName = fmt.Sprintf(\"--%s\", flag.Name)\n\t}\n\treturn fmt.Sprintf(\"invalid argument %q for %q flag: %v\", e.value, flagName, e.cause)\n}\n\n// Unwrap implements errors.Unwrap.\nfunc (e *InvalidValueError) Unwrap() error {\n\treturn e.cause\n}\n\n// GetFlag returns the flag for which the error occurred.\nfunc (e *InvalidValueError) GetFlag() *Flag {\n\treturn e.flag\n}\n\n// GetValue returns the invalid value that was provided.\nfunc (e *InvalidValueError) GetValue() string {\n\treturn e.value\n}\n\n// InvalidSyntaxError is the error returned when a bad flag name is passed on\n// the command line.\ntype InvalidSyntaxError struct {\n\tspecifiedFlag string\n}\n\n// Error implements error.\nfunc (e *InvalidSyntaxError) Error() string {\n\treturn fmt.Sprintf(\"bad flag syntax: %s\", e.specifiedFlag)\n}\n\n// GetSpecifiedName returns the exact flag (with dashes) as it\n// appeared in the parsed arguments.\nfunc (e *InvalidSyntaxError) GetSpecifiedFlag() string {\n\treturn e.specifiedFlag\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/flag.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage pflag is a drop-in replacement for Go's flag package, implementing\nPOSIX/GNU-style --flags.\n\npflag is compatible with the GNU extensions to the POSIX recommendations\nfor command-line options. See\nhttp://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html\n\nUsage:\n\npflag is a drop-in replacement of Go's native flag package. If you import\npflag under the name \"flag\" then all code should continue to function\nwith no changes.\n\n\timport flag \"github.com/spf13/pflag\"\n\nThere is one exception to this: if you directly instantiate the Flag struct\nthere is one more field \"Shorthand\" that you will need to set.\nMost code never instantiates this struct directly, and instead uses\nfunctions such as String(), BoolVar(), and Var(), and is therefore\nunaffected.\n\nDefine flags using flag.String(), Bool(), Int(), etc.\n\nThis declares an integer flag, -flagname, stored in the pointer ip, with type *int.\n\n\tvar ip = flag.Int(\"flagname\", 1234, \"help message for flagname\")\n\nIf you like, you can bind the flag to a variable using the Var() functions.\n\n\tvar flagvar int\n\tfunc init() {\n\t\tflag.IntVar(&flagvar, \"flagname\", 1234, \"help message for flagname\")\n\t}\n\nOr you can create custom flags that satisfy the Value interface (with\npointer receivers) and couple them to flag parsing by\n\n\tflag.Var(&flagVal, \"name\", \"help message for flagname\")\n\nFor such flags, the default value is just the initial value of the variable.\n\nAfter all flags are defined, call\n\n\tflag.Parse()\n\nto parse the command line into the defined flags.\n\nFlags may then be used directly. If you're using the flags themselves,\nthey are all pointers; if you bind to variables, they're values.\n\n\tfmt.Println(\"ip has value \", *ip)\n\tfmt.Println(\"flagvar has value \", flagvar)\n\nAfter parsing, the arguments after the flag are available as the\nslice flag.Args() or individually as flag.Arg(i).\nThe arguments are indexed from 0 through flag.NArg()-1.\n\nThe pflag package also defines some new functions that are not in flag,\nthat give one-letter shorthands for flags. You can use these by appending\n'P' to the name of any function that defines a flag.\n\n\tvar ip = flag.IntP(\"flagname\", \"f\", 1234, \"help message\")\n\tvar flagvar bool\n\tfunc init() {\n\t\tflag.BoolVarP(&flagvar, \"boolname\", \"b\", true, \"help message\")\n\t}\n\tflag.VarP(&flagval, \"varname\", \"v\", \"help message\")\n\nShorthand letters can be used with single dashes on the command line.\nBoolean shorthand flags can be combined with other shorthand flags.\n\nCommand line flag syntax:\n\n\t--flag    // boolean flags only\n\t--flag=x\n\nUnlike the flag package, a single dash before an option means something\ndifferent than a double dash. Single dashes signify a series of shorthand\nletters for flags. All but the last shorthand letter must be boolean flags.\n\n\t// boolean flags\n\t-f\n\t-abc\n\t// non-boolean flags\n\t-n 1234\n\t-Ifile\n\t// mixed\n\t-abcs \"hello\"\n\t-abcn1234\n\nFlag parsing stops after the terminator \"--\". Unlike the flag package,\nflags can be interspersed with arguments anywhere on the command line\nbefore this terminator.\n\nInteger flags accept 1234, 0664, 0x1234 and may be negative.\nBoolean flags (in their long form) accept 1, 0, t, f, true, false,\nTRUE, FALSE, True, False.\nDuration flags accept any input valid for time.ParseDuration.\n\nThe default set of command-line flags is controlled by\ntop-level functions.  The FlagSet type allows one to define\nindependent sets of flags, such as to implement subcommands\nin a command-line interface. The methods of FlagSet are\nanalogous to the top-level functions for the command-line\nflag set.\n*/\npackage pflag\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\tgoflag \"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.\nvar ErrHelp = errors.New(\"pflag: help requested\")\n\n// ErrorHandling defines how to handle flag parsing errors.\ntype ErrorHandling int\n\nconst (\n\t// ContinueOnError will return an err from Parse() if an error is found\n\tContinueOnError ErrorHandling = iota\n\t// ExitOnError will call os.Exit(2) if an error is found when parsing\n\tExitOnError\n\t// PanicOnError will panic() if an error is found when parsing flags\n\tPanicOnError\n)\n\n// ParseErrorsAllowlist defines the parsing errors that can be ignored\ntype ParseErrorsAllowlist struct {\n\t// UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags\n\tUnknownFlags bool\n}\n\n// ParseErrorsWhitelist defines the parsing errors that can be ignored.\n//\n// Deprecated: use [ParseErrorsAllowlist] instead. This type will be removed in a future release.\ntype ParseErrorsWhitelist = ParseErrorsAllowlist\n\n// NormalizedName is a flag name that has been normalized according to rules\n// for the FlagSet (e.g. making '-' and '_' equivalent).\ntype NormalizedName string\n\n// A FlagSet represents a set of defined flags.\ntype FlagSet struct {\n\t// Usage is the function called when an error occurs while parsing flags.\n\t// The field is a function (not a method) that may be changed to point to\n\t// a custom error handler.\n\tUsage func()\n\n\t// SortFlags is used to indicate, if user wants to have sorted flags in\n\t// help/usage messages.\n\tSortFlags bool\n\n\t// ParseErrorsAllowlist is used to configure an allowlist of errors\n\tParseErrorsAllowlist ParseErrorsAllowlist\n\n\t// ParseErrorsAllowlist is used to configure an allowlist of errors.\n\t//\n\t// Deprecated: use [FlagSet.ParseErrorsAllowlist] instead. This field will be removed in a future release.\n\tParseErrorsWhitelist ParseErrorsAllowlist\n\n\tname              string\n\tparsed            bool\n\tactual            map[NormalizedName]*Flag\n\torderedActual     []*Flag\n\tsortedActual      []*Flag\n\tformal            map[NormalizedName]*Flag\n\torderedFormal     []*Flag\n\tsortedFormal      []*Flag\n\tshorthands        map[byte]*Flag\n\targs              []string // arguments after flags\n\targsLenAtDash     int      // len(args) when a '--' was located when parsing, or -1 if no --\n\terrorHandling     ErrorHandling\n\toutput            io.Writer // nil means stderr; use Output() accessor\n\tinterspersed      bool      // allow interspersed option/non-option args\n\tnormalizeNameFunc func(f *FlagSet, name string) NormalizedName\n\n\taddedGoFlagSets []*goflag.FlagSet\n}\n\n// A Flag represents the state of a flag.\ntype Flag struct {\n\tName                string              // name as it appears on command line\n\tShorthand           string              // one-letter abbreviated flag\n\tUsage               string              // help message\n\tValue               Value               // value as set\n\tDefValue            string              // default value (as text); for usage message\n\tChanged             bool                // If the user set the value (or if left to default)\n\tNoOptDefVal         string              // default value (as text); if the flag is on the command line without any options\n\tDeprecated          string              // If this flag is deprecated, this string is the new or now thing to use\n\tHidden              bool                // used by cobra.Command to allow flags to be hidden from help/usage text\n\tShorthandDeprecated string              // If the shorthand of this flag is deprecated, this string is the new or now thing to use\n\tAnnotations         map[string][]string // used by cobra.Command bash autocomple code\n}\n\n// Value is the interface to the dynamic value stored in a flag.\n// (The default value is represented as a string.)\ntype Value interface {\n\tString() string\n\tSet(string) error\n\tType() string\n}\n\n// SliceValue is a secondary interface to all flags which hold a list\n// of values.  This allows full control over the value of list flags,\n// and avoids complicated marshalling and unmarshalling to csv.\ntype SliceValue interface {\n\t// Append adds the specified value to the end of the flag value list.\n\tAppend(string) error\n\t// Replace will fully overwrite any data currently in the flag value list.\n\tReplace([]string) error\n\t// GetSlice returns the flag value list as an array of strings.\n\tGetSlice() []string\n}\n\n// sortFlags returns the flags as a slice in lexicographical sorted order.\nfunc sortFlags(flags map[NormalizedName]*Flag) []*Flag {\n\tlist := make(sort.StringSlice, len(flags))\n\ti := 0\n\tfor k := range flags {\n\t\tlist[i] = string(k)\n\t\ti++\n\t}\n\tlist.Sort()\n\tresult := make([]*Flag, len(list))\n\tfor i, name := range list {\n\t\tresult[i] = flags[NormalizedName(name)]\n\t}\n\treturn result\n}\n\n// SetNormalizeFunc allows you to add a function which can translate flag names.\n// Flags added to the FlagSet will be translated and then when anything tries to\n// look up the flag that will also be translated. So it would be possible to create\n// a flag named \"getURL\" and have it translated to \"geturl\".  A user could then pass\n// \"--getUrl\" which may also be translated to \"geturl\" and everything will work.\nfunc (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) {\n\tf.normalizeNameFunc = n\n\tf.sortedFormal = f.sortedFormal[:0]\n\tfor fname, flag := range f.formal {\n\t\tnname := f.normalizeFlagName(flag.Name)\n\t\tif fname == nname {\n\t\t\tcontinue\n\t\t}\n\t\tflag.Name = string(nname)\n\t\tdelete(f.formal, fname)\n\t\tf.formal[nname] = flag\n\t\tif _, set := f.actual[fname]; set {\n\t\t\tdelete(f.actual, fname)\n\t\t\tf.actual[nname] = flag\n\t\t}\n\t}\n}\n\n// GetNormalizeFunc returns the previously set NormalizeFunc of a function which\n// does no translation, if not set previously.\nfunc (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName {\n\tif f.normalizeNameFunc != nil {\n\t\treturn f.normalizeNameFunc\n\t}\n\treturn func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) }\n}\n\nfunc (f *FlagSet) normalizeFlagName(name string) NormalizedName {\n\tn := f.GetNormalizeFunc()\n\treturn n(f, name)\n}\n\n// Output returns the destination for usage and error messages. os.Stderr is returned if\n// output was not set or was set to nil.\nfunc (f *FlagSet) Output() io.Writer {\n\tif f.output == nil {\n\t\treturn os.Stderr\n\t}\n\treturn f.output\n}\n\n// Name returns the name of the flag set.\nfunc (f *FlagSet) Name() string {\n\treturn f.name\n}\n\n// SetOutput sets the destination for usage and error messages.\n// If output is nil, os.Stderr is used.\nfunc (f *FlagSet) SetOutput(output io.Writer) {\n\tf.output = output\n}\n\n// VisitAll visits the flags in lexicographical order or\n// in primordial order if f.SortFlags is false, calling fn for each.\n// It visits all flags, even those not set.\nfunc (f *FlagSet) VisitAll(fn func(*Flag)) {\n\tif len(f.formal) == 0 {\n\t\treturn\n\t}\n\n\tvar flags []*Flag\n\tif f.SortFlags {\n\t\tif len(f.formal) != len(f.sortedFormal) {\n\t\t\tf.sortedFormal = sortFlags(f.formal)\n\t\t}\n\t\tflags = f.sortedFormal\n\t} else {\n\t\tflags = f.orderedFormal\n\t}\n\n\tfor _, flag := range flags {\n\t\tfn(flag)\n\t}\n}\n\n// HasFlags returns a bool to indicate if the FlagSet has any flags defined.\nfunc (f *FlagSet) HasFlags() bool {\n\treturn len(f.formal) > 0\n}\n\n// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags\n// that are not hidden.\nfunc (f *FlagSet) HasAvailableFlags() bool {\n\tfor _, flag := range f.formal {\n\t\tif !flag.Hidden {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// VisitAll visits the command-line flags in lexicographical order or\n// in primordial order if f.SortFlags is false, calling fn for each.\n// It visits all flags, even those not set.\nfunc VisitAll(fn func(*Flag)) {\n\tCommandLine.VisitAll(fn)\n}\n\n// Visit visits the flags in lexicographical order or\n// in primordial order if f.SortFlags is false, calling fn for each.\n// It visits only those flags that have been set.\nfunc (f *FlagSet) Visit(fn func(*Flag)) {\n\tif len(f.actual) == 0 {\n\t\treturn\n\t}\n\n\tvar flags []*Flag\n\tif f.SortFlags {\n\t\tif len(f.actual) != len(f.sortedActual) {\n\t\t\tf.sortedActual = sortFlags(f.actual)\n\t\t}\n\t\tflags = f.sortedActual\n\t} else {\n\t\tflags = f.orderedActual\n\t}\n\n\tfor _, flag := range flags {\n\t\tfn(flag)\n\t}\n}\n\n// Visit visits the command-line flags in lexicographical order or\n// in primordial order if f.SortFlags is false, calling fn for each.\n// It visits only those flags that have been set.\nfunc Visit(fn func(*Flag)) {\n\tCommandLine.Visit(fn)\n}\n\n// Lookup returns the Flag structure of the named flag, returning nil if none exists.\nfunc (f *FlagSet) Lookup(name string) *Flag {\n\treturn f.lookup(f.normalizeFlagName(name))\n}\n\n// ShorthandLookup returns the Flag structure of the short handed flag,\n// returning nil if none exists.\n// It panics, if len(name) > 1.\nfunc (f *FlagSet) ShorthandLookup(name string) *Flag {\n\tif name == \"\" {\n\t\treturn nil\n\t}\n\tif len(name) > 1 {\n\t\tmsg := fmt.Sprintf(\"can not look up shorthand which is more than one ASCII character: %q\", name)\n\t\tfmt.Fprintf(f.Output(), msg)\n\t\tpanic(msg)\n\t}\n\tc := name[0]\n\treturn f.shorthands[c]\n}\n\n// lookup returns the Flag structure of the named flag, returning nil if none exists.\nfunc (f *FlagSet) lookup(name NormalizedName) *Flag {\n\treturn f.formal[name]\n}\n\n// func to return a given type for a given flag name\nfunc (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\terr := &NotExistError{name: name, messageType: flagNotDefinedMessage}\n\t\treturn nil, err\n\t}\n\n\tif flag.Value.Type() != ftype {\n\t\terr := fmt.Errorf(\"trying to get %s value of flag of type %s\", ftype, flag.Value.Type())\n\t\treturn nil, err\n\t}\n\n\tsval := flag.Value.String()\n\tresult, err := convFunc(sval)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result, nil\n}\n\n// ArgsLenAtDash will return the length of f.Args at the moment when a -- was\n// found during arg parsing. This allows your program to know which args were\n// before the -- and which came after.\nfunc (f *FlagSet) ArgsLenAtDash() int {\n\treturn f.argsLenAtDash\n}\n\n// MarkDeprecated indicated that a flag is deprecated in your program. It will\n// continue to function but will not show up in help or usage messages. Using\n// this flag will also print the given usageMessage.\nfunc (f *FlagSet) MarkDeprecated(name string, usageMessage string) error {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\treturn &NotExistError{name: name, messageType: flagNotExistMessage}\n\t}\n\tif usageMessage == \"\" {\n\t\treturn fmt.Errorf(\"deprecated message for flag %q must be set\", name)\n\t}\n\tflag.Deprecated = usageMessage\n\tflag.Hidden = true\n\treturn nil\n}\n\n// MarkShorthandDeprecated will mark the shorthand of a flag deprecated in your\n// program. It will continue to function but will not show up in help or usage\n// messages. Using this flag will also print the given usageMessage.\nfunc (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) error {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\treturn &NotExistError{name: name, messageType: flagNotExistMessage}\n\t}\n\tif usageMessage == \"\" {\n\t\treturn fmt.Errorf(\"deprecated message for flag %q must be set\", name)\n\t}\n\tflag.ShorthandDeprecated = usageMessage\n\treturn nil\n}\n\n// MarkHidden sets a flag to 'hidden' in your program. It will continue to\n// function but will not show up in help or usage messages.\nfunc (f *FlagSet) MarkHidden(name string) error {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\treturn &NotExistError{name: name, messageType: flagNotExistMessage}\n\t}\n\tflag.Hidden = true\n\treturn nil\n}\n\n// Lookup returns the Flag structure of the named command-line flag,\n// returning nil if none exists.\nfunc Lookup(name string) *Flag {\n\treturn CommandLine.Lookup(name)\n}\n\n// ShorthandLookup returns the Flag structure of the short handed flag,\n// returning nil if none exists.\nfunc ShorthandLookup(name string) *Flag {\n\treturn CommandLine.ShorthandLookup(name)\n}\n\n// Set sets the value of the named flag.\nfunc (f *FlagSet) Set(name, value string) error {\n\tnormalName := f.normalizeFlagName(name)\n\tflag, ok := f.formal[normalName]\n\tif !ok {\n\t\treturn &NotExistError{name: name, messageType: flagNoSuchFlagMessage}\n\t}\n\n\terr := flag.Value.Set(value)\n\tif err != nil {\n\t\treturn &InvalidValueError{\n\t\t\tflag:  flag,\n\t\t\tvalue: value,\n\t\t\tcause: err,\n\t\t}\n\t}\n\n\tif !flag.Changed {\n\t\tif f.actual == nil {\n\t\t\tf.actual = make(map[NormalizedName]*Flag)\n\t\t}\n\t\tf.actual[normalName] = flag\n\t\tf.orderedActual = append(f.orderedActual, flag)\n\n\t\tflag.Changed = true\n\t}\n\n\tif flag.Deprecated != \"\" {\n\t\tfmt.Fprintf(f.Output(), \"Flag --%s has been deprecated, %s\\n\", flag.Name, flag.Deprecated)\n\t}\n\treturn nil\n}\n\n// SetAnnotation allows one to set arbitrary annotations on a flag in the FlagSet.\n// This is sometimes used by spf13/cobra programs which want to generate additional\n// bash completion information.\nfunc (f *FlagSet) SetAnnotation(name, key string, values []string) error {\n\tnormalName := f.normalizeFlagName(name)\n\tflag, ok := f.formal[normalName]\n\tif !ok {\n\t\treturn &NotExistError{name: name, messageType: flagNoSuchFlagMessage}\n\t}\n\tif flag.Annotations == nil {\n\t\tflag.Annotations = map[string][]string{}\n\t}\n\tflag.Annotations[key] = values\n\treturn nil\n}\n\n// Changed returns true if the flag was explicitly set during Parse() and false\n// otherwise\nfunc (f *FlagSet) Changed(name string) bool {\n\tflag := f.Lookup(name)\n\t// If a flag doesn't exist, it wasn't changed....\n\tif flag == nil {\n\t\treturn false\n\t}\n\treturn flag.Changed\n}\n\n// Set sets the value of the named command-line flag.\nfunc Set(name, value string) error {\n\treturn CommandLine.Set(name, value)\n}\n\n// PrintDefaults prints, to standard error unless configured\n// otherwise, the default values of all defined flags in the set.\nfunc (f *FlagSet) PrintDefaults() {\n\tusages := f.FlagUsages()\n\tfmt.Fprint(f.Output(), usages)\n}\n\n// defaultIsZeroValue returns true if the default value for this flag represents\n// a zero value.\nfunc (f *Flag) defaultIsZeroValue() bool {\n\tswitch f.Value.(type) {\n\tcase boolFlag:\n\t\treturn f.DefValue == \"false\" || f.DefValue == \"\"\n\tcase *durationValue:\n\t\t// Beginning in Go 1.7, duration zero values are \"0s\"\n\t\treturn f.DefValue == \"0\" || f.DefValue == \"0s\"\n\tcase *intValue, *int8Value, *int32Value, *int64Value, *uintValue, *uint8Value, *uint16Value, *uint32Value, *uint64Value, *countValue, *float32Value, *float64Value:\n\t\treturn f.DefValue == \"0\"\n\tcase *stringValue:\n\t\treturn f.DefValue == \"\"\n\tcase *ipValue, *ipMaskValue, *ipNetValue:\n\t\treturn f.DefValue == \"<nil>\"\n\tcase *intSliceValue, *stringSliceValue, *stringArrayValue:\n\t\treturn f.DefValue == \"[]\"\n\tdefault:\n\t\tswitch f.DefValue {\n\t\tcase \"false\":\n\t\t\treturn true\n\t\tcase \"<nil>\":\n\t\t\treturn true\n\t\tcase \"\":\n\t\t\treturn true\n\t\tcase \"0\":\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n}\n\n// UnquoteUsage extracts a back-quoted name from the usage\n// string for a flag and returns it and the un-quoted usage.\n// Given \"a `name` to show\" it returns (\"name\", \"a name to show\").\n// If there are no back quotes, the name is an educated guess of the\n// type of the flag's value, or the empty string if the flag is boolean.\nfunc UnquoteUsage(flag *Flag) (name string, usage string) {\n\t// Look for a back-quoted name, but avoid the strings package.\n\tusage = flag.Usage\n\tfor i := 0; i < len(usage); i++ {\n\t\tif usage[i] == '`' {\n\t\t\tfor j := i + 1; j < len(usage); j++ {\n\t\t\t\tif usage[j] == '`' {\n\t\t\t\t\tname = usage[i+1 : j]\n\t\t\t\t\tusage = usage[:i] + name + usage[j+1:]\n\t\t\t\t\treturn name, usage\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak // Only one back quote; use type name.\n\t\t}\n\t}\n\n\tname = flag.Value.Type()\n\tswitch name {\n\tcase \"bool\", \"boolfunc\":\n\t\tname = \"\"\n\tcase \"func\":\n\t\tname = \"value\"\n\tcase \"float64\":\n\t\tname = \"float\"\n\tcase \"int64\":\n\t\tname = \"int\"\n\tcase \"uint64\":\n\t\tname = \"uint\"\n\tcase \"stringSlice\":\n\t\tname = \"strings\"\n\tcase \"intSlice\":\n\t\tname = \"ints\"\n\tcase \"uintSlice\":\n\t\tname = \"uints\"\n\tcase \"boolSlice\":\n\t\tname = \"bools\"\n\t}\n\n\treturn\n}\n\n// Splits the string `s` on whitespace into an initial substring up to\n// `i` runes in length and the remainder. Will go `slop` over `i` if\n// that encompasses the entire string (which allows the caller to\n// avoid short orphan words on the final line).\nfunc wrapN(i, slop int, s string) (string, string) {\n\tif i+slop > len(s) {\n\t\treturn s, \"\"\n\t}\n\n\tw := strings.LastIndexAny(s[:i], \" \\t\\n\")\n\tif w <= 0 {\n\t\treturn s, \"\"\n\t}\n\tnlPos := strings.LastIndex(s[:i], \"\\n\")\n\tif nlPos > 0 && nlPos < w {\n\t\treturn s[:nlPos], s[nlPos+1:]\n\t}\n\treturn s[:w], s[w+1:]\n}\n\n// Wraps the string `s` to a maximum width `w` with leading indent\n// `i`. The first line is not indented (this is assumed to be done by\n// caller). Pass `w` == 0 to do no wrapping\nfunc wrap(i, w int, s string) string {\n\tif w == 0 {\n\t\treturn strings.Replace(s, \"\\n\", \"\\n\"+strings.Repeat(\" \", i), -1)\n\t}\n\n\t// space between indent i and end of line width w into which\n\t// we should wrap the text.\n\twrap := w - i\n\n\tvar r, l string\n\n\t// Not enough space for sensible wrapping. Wrap as a block on\n\t// the next line instead.\n\tif wrap < 24 {\n\t\ti = 16\n\t\twrap = w - i\n\t\tr += \"\\n\" + strings.Repeat(\" \", i)\n\t}\n\t// If still not enough space then don't even try to wrap.\n\tif wrap < 24 {\n\t\treturn strings.Replace(s, \"\\n\", r, -1)\n\t}\n\n\t// Try to avoid short orphan words on the final line, by\n\t// allowing wrapN to go a bit over if that would fit in the\n\t// remainder of the line.\n\tslop := 5\n\twrap = wrap - slop\n\n\t// Handle first line, which is indented by the caller (or the\n\t// special case above)\n\tl, s = wrapN(wrap, slop, s)\n\tr = r + strings.Replace(l, \"\\n\", \"\\n\"+strings.Repeat(\" \", i), -1)\n\n\t// Now wrap the rest\n\tfor s != \"\" {\n\t\tvar t string\n\n\t\tt, s = wrapN(wrap, slop, s)\n\t\tr = r + \"\\n\" + strings.Repeat(\" \", i) + strings.Replace(t, \"\\n\", \"\\n\"+strings.Repeat(\" \", i), -1)\n\t}\n\n\treturn r\n\n}\n\n// FlagUsagesWrapped returns a string containing the usage information\n// for all flags in the FlagSet. Wrapped to `cols` columns (0 for no\n// wrapping)\nfunc (f *FlagSet) FlagUsagesWrapped(cols int) string {\n\tbuf := new(bytes.Buffer)\n\n\tlines := make([]string, 0, len(f.formal))\n\n\tmaxlen := 0\n\tf.VisitAll(func(flag *Flag) {\n\t\tif flag.Hidden {\n\t\t\treturn\n\t\t}\n\n\t\tline := \"\"\n\t\tif flag.Shorthand != \"\" && flag.ShorthandDeprecated == \"\" {\n\t\t\tline = fmt.Sprintf(\"  -%s, --%s\", flag.Shorthand, flag.Name)\n\t\t} else {\n\t\t\tline = fmt.Sprintf(\"      --%s\", flag.Name)\n\t\t}\n\n\t\tvarname, usage := UnquoteUsage(flag)\n\t\tif varname != \"\" {\n\t\t\tline += \" \" + varname\n\t\t}\n\t\tif flag.NoOptDefVal != \"\" {\n\t\t\tswitch flag.Value.Type() {\n\t\t\tcase \"string\":\n\t\t\t\tline += fmt.Sprintf(\"[=\\\"%s\\\"]\", flag.NoOptDefVal)\n\t\t\tcase \"bool\", \"boolfunc\":\n\t\t\t\tif flag.NoOptDefVal != \"true\" {\n\t\t\t\t\tline += fmt.Sprintf(\"[=%s]\", flag.NoOptDefVal)\n\t\t\t\t}\n\t\t\tcase \"count\":\n\t\t\t\tif flag.NoOptDefVal != \"+1\" {\n\t\t\t\t\tline += fmt.Sprintf(\"[=%s]\", flag.NoOptDefVal)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tline += fmt.Sprintf(\"[=%s]\", flag.NoOptDefVal)\n\t\t\t}\n\t\t}\n\n\t\t// This special character will be replaced with spacing once the\n\t\t// correct alignment is calculated\n\t\tline += \"\\x00\"\n\t\tif len(line) > maxlen {\n\t\t\tmaxlen = len(line)\n\t\t}\n\n\t\tline += usage\n\t\tif !flag.defaultIsZeroValue() {\n\t\t\tif flag.Value.Type() == \"string\" {\n\t\t\t\tline += fmt.Sprintf(\" (default %q)\", flag.DefValue)\n\t\t\t} else {\n\t\t\t\tline += fmt.Sprintf(\" (default %s)\", flag.DefValue)\n\t\t\t}\n\t\t}\n\t\tif len(flag.Deprecated) != 0 {\n\t\t\tline += fmt.Sprintf(\" (DEPRECATED: %s)\", flag.Deprecated)\n\t\t}\n\n\t\tlines = append(lines, line)\n\t})\n\n\tfor _, line := range lines {\n\t\tsidx := strings.Index(line, \"\\x00\")\n\t\tspacing := strings.Repeat(\" \", maxlen-sidx)\n\t\t// maxlen + 2 comes from + 1 for the \\x00 and + 1 for the (deliberate) off-by-one in maxlen-sidx\n\t\tfmt.Fprintln(buf, line[:sidx], spacing, wrap(maxlen+2, cols, line[sidx+1:]))\n\t}\n\n\treturn buf.String()\n}\n\n// FlagUsages returns a string containing the usage information for all flags in\n// the FlagSet\nfunc (f *FlagSet) FlagUsages() string {\n\treturn f.FlagUsagesWrapped(0)\n}\n\n// PrintDefaults prints to standard error the default values of all defined command-line flags.\nfunc PrintDefaults() {\n\tCommandLine.PrintDefaults()\n}\n\n// defaultUsage is the default function to print a usage message.\nfunc defaultUsage(f *FlagSet) {\n\tfmt.Fprintf(f.Output(), \"Usage of %s:\\n\", f.name)\n\tf.PrintDefaults()\n}\n\n// NOTE: Usage is not just defaultUsage(CommandLine)\n// because it serves (via godoc flag Usage) as the example\n// for how to write your own usage function.\n\n// Usage prints to standard error a usage message documenting all defined command-line flags.\n// The function is a variable that may be changed to point to a custom function.\n// By default it prints a simple header and calls PrintDefaults; for details about the\n// format of the output and how to control it, see the documentation for PrintDefaults.\nvar Usage = func() {\n\tfmt.Fprintf(os.Stderr, \"Usage of %s:\\n\", os.Args[0])\n\tPrintDefaults()\n}\n\n// NFlag returns the number of flags that have been set.\nfunc (f *FlagSet) NFlag() int { return len(f.actual) }\n\n// NFlag returns the number of command-line flags that have been set.\nfunc NFlag() int { return len(CommandLine.actual) }\n\n// Arg returns the i'th argument.  Arg(0) is the first remaining argument\n// after flags have been processed.\nfunc (f *FlagSet) Arg(i int) string {\n\tif i < 0 || i >= len(f.args) {\n\t\treturn \"\"\n\t}\n\treturn f.args[i]\n}\n\n// Arg returns the i'th command-line argument.  Arg(0) is the first remaining argument\n// after flags have been processed.\nfunc Arg(i int) string {\n\treturn CommandLine.Arg(i)\n}\n\n// NArg is the number of arguments remaining after flags have been processed.\nfunc (f *FlagSet) NArg() int { return len(f.args) }\n\n// NArg is the number of arguments remaining after flags have been processed.\nfunc NArg() int { return len(CommandLine.args) }\n\n// Args returns the non-flag arguments.\nfunc (f *FlagSet) Args() []string { return f.args }\n\n// Args returns the non-flag command-line arguments.\nfunc Args() []string { return CommandLine.args }\n\n// Var defines a flag with the specified name and usage string. The type and\n// value of the flag are represented by the first argument, of type Value, which\n// typically holds a user-defined implementation of Value. For instance, the\n// caller could create a flag that turns a comma-separated string into a slice\n// of strings by giving the slice the methods of Value; in particular, Set would\n// decompose the comma-separated string into the slice.\nfunc (f *FlagSet) Var(value Value, name string, usage string) {\n\tf.VarP(value, name, \"\", usage)\n}\n\n// VarPF is like VarP, but returns the flag created\nfunc (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag {\n\t// Remember the default value as a string; it won't change.\n\tflag := &Flag{\n\t\tName:      name,\n\t\tShorthand: shorthand,\n\t\tUsage:     usage,\n\t\tValue:     value,\n\t\tDefValue:  value.String(),\n\t}\n\tf.AddFlag(flag)\n\treturn flag\n}\n\n// VarP is like Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) VarP(value Value, name, shorthand, usage string) {\n\tf.VarPF(value, name, shorthand, usage)\n}\n\n// AddFlag will add the flag to the FlagSet\nfunc (f *FlagSet) AddFlag(flag *Flag) {\n\tnormalizedFlagName := f.normalizeFlagName(flag.Name)\n\n\t_, alreadyThere := f.formal[normalizedFlagName]\n\tif alreadyThere {\n\t\tmsg := fmt.Sprintf(\"%s flag redefined: %s\", f.name, flag.Name)\n\t\tfmt.Fprintln(f.Output(), msg)\n\t\tpanic(msg) // Happens only if flags are declared with identical names\n\t}\n\tif f.formal == nil {\n\t\tf.formal = make(map[NormalizedName]*Flag)\n\t}\n\n\tflag.Name = string(normalizedFlagName)\n\tf.formal[normalizedFlagName] = flag\n\tf.orderedFormal = append(f.orderedFormal, flag)\n\n\tif flag.Shorthand == \"\" {\n\t\treturn\n\t}\n\tif len(flag.Shorthand) > 1 {\n\t\tmsg := fmt.Sprintf(\"%q shorthand is more than one ASCII character\", flag.Shorthand)\n\t\tfmt.Fprintf(f.Output(), msg)\n\t\tpanic(msg)\n\t}\n\tif f.shorthands == nil {\n\t\tf.shorthands = make(map[byte]*Flag)\n\t}\n\tc := flag.Shorthand[0]\n\tused, alreadyThere := f.shorthands[c]\n\tif alreadyThere {\n\t\tmsg := fmt.Sprintf(\"unable to redefine %q shorthand in %q flagset: it's already used for %q flag\", c, f.name, used.Name)\n\t\tfmt.Fprintf(f.Output(), msg)\n\t\tpanic(msg)\n\t}\n\tf.shorthands[c] = flag\n}\n\n// AddFlagSet adds one FlagSet to another. If a flag is already present in f\n// the flag from newSet will be ignored.\nfunc (f *FlagSet) AddFlagSet(newSet *FlagSet) {\n\tif newSet == nil {\n\t\treturn\n\t}\n\tnewSet.VisitAll(func(flag *Flag) {\n\t\tif f.Lookup(flag.Name) == nil {\n\t\t\tf.AddFlag(flag)\n\t\t}\n\t})\n}\n\n// Var defines a flag with the specified name and usage string. The type and\n// value of the flag are represented by the first argument, of type Value, which\n// typically holds a user-defined implementation of Value. For instance, the\n// caller could create a flag that turns a comma-separated string into a slice\n// of strings by giving the slice the methods of Value; in particular, Set would\n// decompose the comma-separated string into the slice.\nfunc Var(value Value, name string, usage string) {\n\tCommandLine.VarP(value, name, \"\", usage)\n}\n\n// VarP is like Var, but accepts a shorthand letter that can be used after a single dash.\nfunc VarP(value Value, name, shorthand, usage string) {\n\tCommandLine.VarP(value, name, shorthand, usage)\n}\n\n// fail prints an error message and usage message to standard error and\n// returns the error.\nfunc (f *FlagSet) fail(err error) error {\n\tif f.errorHandling != ContinueOnError {\n\t\tf.usage()\n\t}\n\treturn err\n}\n\n// usage calls the Usage method for the flag set, or the usage function if\n// the flag set is CommandLine.\nfunc (f *FlagSet) usage() {\n\tif f == CommandLine {\n\t\tUsage()\n\t} else if f.Usage == nil {\n\t\tdefaultUsage(f)\n\t} else {\n\t\tf.Usage()\n\t}\n}\n\n// --unknown (args will be empty)\n// --unknown --next-flag ... (args will be --next-flag ...)\n// --unknown arg ... (args will be arg ...)\nfunc stripUnknownFlagValue(args []string) []string {\n\tif len(args) == 0 {\n\t\t//--unknown\n\t\treturn args\n\t}\n\n\tfirst := args[0]\n\tif len(first) > 0 && first[0] == '-' {\n\t\t//--unknown --next-flag ...\n\t\treturn args\n\t}\n\n\t//--unknown arg ... (args will be arg ...)\n\tif len(args) > 1 {\n\t\treturn args[1:]\n\t}\n\treturn nil\n}\n\nfunc (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []string, err error) {\n\ta = args\n\tname := s[2:]\n\tif len(name) == 0 || name[0] == '-' || name[0] == '=' {\n\t\terr = f.fail(&InvalidSyntaxError{specifiedFlag: s})\n\t\treturn\n\t}\n\n\tsplit := strings.SplitN(name, \"=\", 2)\n\tname = split[0]\n\tflag, exists := f.formal[f.normalizeFlagName(name)]\n\n\tif !exists {\n\t\tswitch {\n\t\tcase name == \"help\":\n\t\t\tf.usage()\n\t\t\treturn a, ErrHelp\n\t\tcase f.ParseErrorsWhitelist.UnknownFlags:\n\t\t\tfallthrough\n\t\tcase f.ParseErrorsAllowlist.UnknownFlags:\n\t\t\t// --unknown=unknownval arg ...\n\t\t\t// we do not want to lose arg in this case\n\t\t\tif len(split) >= 2 {\n\t\t\t\treturn a, nil\n\t\t\t}\n\n\t\t\treturn stripUnknownFlagValue(a), nil\n\t\tdefault:\n\t\t\terr = f.fail(&NotExistError{name: name, messageType: flagUnknownFlagMessage})\n\t\t\treturn\n\t\t}\n\t}\n\n\tvar value string\n\tif len(split) == 2 {\n\t\t// '--flag=arg'\n\t\tvalue = split[1]\n\t} else if flag.NoOptDefVal != \"\" {\n\t\t// '--flag' (arg was optional)\n\t\tvalue = flag.NoOptDefVal\n\t} else if len(a) > 0 {\n\t\t// '--flag arg'\n\t\tvalue = a[0]\n\t\ta = a[1:]\n\t} else {\n\t\t// '--flag' (arg was required)\n\t\terr = f.fail(&ValueRequiredError{\n\t\t\tflag:          flag,\n\t\t\tspecifiedName: name,\n\t\t})\n\t\treturn\n\t}\n\n\terr = fn(flag, value)\n\tif err != nil {\n\t\tf.fail(err)\n\t}\n\treturn\n}\n\nfunc (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parseFunc) (outShorts string, outArgs []string, err error) {\n\toutArgs = args\n\n\tif isGotestShorthandFlag(shorthands) {\n\t\treturn\n\t}\n\n\toutShorts = shorthands[1:]\n\tc := shorthands[0]\n\n\tflag, exists := f.shorthands[c]\n\tif !exists {\n\t\tswitch {\n\t\tcase c == 'h':\n\t\t\tf.usage()\n\t\t\terr = ErrHelp\n\t\t\treturn\n\t\tcase f.ParseErrorsWhitelist.UnknownFlags:\n\t\t\tfallthrough\n\t\tcase f.ParseErrorsAllowlist.UnknownFlags:\n\t\t\t// '-f=arg arg ...'\n\t\t\t// we do not want to lose arg in this case\n\t\t\tif len(shorthands) > 2 && shorthands[1] == '=' {\n\t\t\t\toutShorts = \"\"\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\toutArgs = stripUnknownFlagValue(outArgs)\n\t\t\treturn\n\t\tdefault:\n\t\t\terr = f.fail(&NotExistError{\n\t\t\t\tname:                string(c),\n\t\t\t\tspecifiedShorthands: shorthands,\n\t\t\t\tmessageType:         flagUnknownShorthandFlagMessage,\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n\n\tvar value string\n\tif len(shorthands) > 2 && shorthands[1] == '=' {\n\t\t// '-f=arg'\n\t\tvalue = shorthands[2:]\n\t\toutShorts = \"\"\n\t} else if flag.NoOptDefVal != \"\" {\n\t\t// '-f' (arg was optional)\n\t\tvalue = flag.NoOptDefVal\n\t} else if len(shorthands) > 1 {\n\t\t// '-farg'\n\t\tvalue = shorthands[1:]\n\t\toutShorts = \"\"\n\t} else if len(args) > 0 {\n\t\t// '-f arg'\n\t\tvalue = args[0]\n\t\toutArgs = args[1:]\n\t} else {\n\t\t// '-f' (arg was required)\n\t\terr = f.fail(&ValueRequiredError{\n\t\t\tflag:                flag,\n\t\t\tspecifiedName:       string(c),\n\t\t\tspecifiedShorthands: shorthands,\n\t\t})\n\t\treturn\n\t}\n\n\tif flag.ShorthandDeprecated != \"\" {\n\t\tfmt.Fprintf(f.Output(), \"Flag shorthand -%s has been deprecated, %s\\n\", flag.Shorthand, flag.ShorthandDeprecated)\n\t}\n\n\terr = fn(flag, value)\n\tif err != nil {\n\t\tf.fail(err)\n\t}\n\treturn\n}\n\nfunc (f *FlagSet) parseShortArg(s string, args []string, fn parseFunc) (a []string, err error) {\n\ta = args\n\tshorthands := s[1:]\n\n\t// \"shorthands\" can be a series of shorthand letters of flags (e.g. \"-vvv\").\n\tfor len(shorthands) > 0 {\n\t\tshorthands, a, err = f.parseSingleShortArg(shorthands, args, fn)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) {\n\tfor len(args) > 0 {\n\t\ts := args[0]\n\t\targs = args[1:]\n\t\tif len(s) == 0 || s[0] != '-' || len(s) == 1 {\n\t\t\tif !f.interspersed {\n\t\t\t\tf.args = append(f.args, s)\n\t\t\t\tf.args = append(f.args, args...)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tf.args = append(f.args, s)\n\t\t\tcontinue\n\t\t}\n\n\t\tif s[1] == '-' {\n\t\t\tif len(s) == 2 { // \"--\" terminates the flags\n\t\t\t\tf.argsLenAtDash = len(f.args)\n\t\t\t\tf.args = append(f.args, args...)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\targs, err = f.parseLongArg(s, args, fn)\n\t\t} else {\n\t\t\targs, err = f.parseShortArg(s, args, fn)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\n// Parse parses flag definitions from the argument list, which should not\n// include the command name.  Must be called after all flags in the FlagSet\n// are defined and before flags are accessed by the program.\n// The return value will be ErrHelp if -help was set but not defined.\nfunc (f *FlagSet) Parse(arguments []string) error {\n\tif f.addedGoFlagSets != nil {\n\t\tfor _, goFlagSet := range f.addedGoFlagSets {\n\t\t\tgoFlagSet.Parse(nil)\n\t\t}\n\t}\n\tf.parsed = true\n\n\tf.args = make([]string, 0, len(arguments))\n\n\tif len(arguments) == 0 {\n\t\treturn nil\n\t}\n\n\tset := func(flag *Flag, value string) error {\n\t\treturn f.Set(flag.Name, value)\n\t}\n\n\terr := f.parseArgs(arguments, set)\n\tif err != nil {\n\t\tswitch f.errorHandling {\n\t\tcase ContinueOnError:\n\t\t\treturn err\n\t\tcase ExitOnError:\n\t\t\tif err == ErrHelp {\n\t\t\t\tos.Exit(0)\n\t\t\t}\n\t\t\tfmt.Fprintln(f.Output(), err)\n\t\t\tos.Exit(2)\n\t\tcase PanicOnError:\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype parseFunc func(flag *Flag, value string) error\n\n// ParseAll parses flag definitions from the argument list, which should not\n// include the command name. The arguments for fn are flag and value. Must be\n// called after all flags in the FlagSet are defined and before flags are\n// accessed by the program. The return value will be ErrHelp if -help was set\n// but not defined.\nfunc (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string) error) error {\n\tf.parsed = true\n\tf.args = make([]string, 0, len(arguments))\n\n\terr := f.parseArgs(arguments, fn)\n\tif err != nil {\n\t\tswitch f.errorHandling {\n\t\tcase ContinueOnError:\n\t\t\treturn err\n\t\tcase ExitOnError:\n\t\t\tif err == ErrHelp {\n\t\t\t\tos.Exit(0)\n\t\t\t}\n\t\t\tfmt.Fprintln(f.Output(), err)\n\t\t\tos.Exit(2)\n\t\tcase PanicOnError:\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// Parsed reports whether f.Parse has been called.\nfunc (f *FlagSet) Parsed() bool {\n\treturn f.parsed\n}\n\n// Parse parses the command-line flags from os.Args[1:].  Must be called\n// after all flags are defined and before flags are accessed by the program.\nfunc Parse() {\n\t// Ignore errors; CommandLine is set for ExitOnError.\n\tCommandLine.Parse(os.Args[1:])\n}\n\n// ParseAll parses the command-line flags from os.Args[1:] and called fn for each.\n// The arguments for fn are flag and value. Must be called after all flags are\n// defined and before flags are accessed by the program.\nfunc ParseAll(fn func(flag *Flag, value string) error) {\n\t// Ignore errors; CommandLine is set for ExitOnError.\n\tCommandLine.ParseAll(os.Args[1:], fn)\n}\n\n// SetInterspersed sets whether to support interspersed option/non-option arguments.\nfunc SetInterspersed(interspersed bool) {\n\tCommandLine.SetInterspersed(interspersed)\n}\n\n// Parsed returns true if the command-line flags have been parsed.\nfunc Parsed() bool {\n\treturn CommandLine.Parsed()\n}\n\n// CommandLine is the default set of command-line flags, parsed from os.Args.\nvar CommandLine = NewFlagSet(os.Args[0], ExitOnError)\n\n// NewFlagSet returns a new, empty flag set with the specified name,\n// error handling property and SortFlags set to true.\nfunc NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {\n\tf := &FlagSet{\n\t\tname:          name,\n\t\terrorHandling: errorHandling,\n\t\targsLenAtDash: -1,\n\t\tinterspersed:  true,\n\t\tSortFlags:     true,\n\t}\n\treturn f\n}\n\n// SetInterspersed sets whether to support interspersed option/non-option arguments.\nfunc (f *FlagSet) SetInterspersed(interspersed bool) {\n\tf.interspersed = interspersed\n}\n\n// Init sets the name and error handling property for a flag set.\n// By default, the zero FlagSet uses an empty name and the\n// ContinueOnError error handling policy.\nfunc (f *FlagSet) Init(name string, errorHandling ErrorHandling) {\n\tf.name = name\n\tf.errorHandling = errorHandling\n\tf.argsLenAtDash = -1\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/float32.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- float32 Value\ntype float32Value float32\n\nfunc newFloat32Value(val float32, p *float32) *float32Value {\n\t*p = val\n\treturn (*float32Value)(p)\n}\n\nfunc (f *float32Value) Set(s string) error {\n\tv, err := strconv.ParseFloat(s, 32)\n\t*f = float32Value(v)\n\treturn err\n}\n\nfunc (f *float32Value) Type() string {\n\treturn \"float32\"\n}\n\nfunc (f *float32Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 32) }\n\nfunc float32Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseFloat(sval, 32)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn float32(v), nil\n}\n\n// GetFloat32 return the float32 value of a flag with the given name\nfunc (f *FlagSet) GetFloat32(name string) (float32, error) {\n\tval, err := f.getFlagType(name, \"float32\", float32Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(float32), nil\n}\n\n// Float32Var defines a float32 flag with specified name, default value, and usage string.\n// The argument p points to a float32 variable in which to store the value of the flag.\nfunc (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) {\n\tf.VarP(newFloat32Value(value, p), name, \"\", usage)\n}\n\n// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) {\n\tf.VarP(newFloat32Value(value, p), name, shorthand, usage)\n}\n\n// Float32Var defines a float32 flag with specified name, default value, and usage string.\n// The argument p points to a float32 variable in which to store the value of the flag.\nfunc Float32Var(p *float32, name string, value float32, usage string) {\n\tCommandLine.VarP(newFloat32Value(value, p), name, \"\", usage)\n}\n\n// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Float32VarP(p *float32, name, shorthand string, value float32, usage string) {\n\tCommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage)\n}\n\n// Float32 defines a float32 flag with specified name, default value, and usage string.\n// The return value is the address of a float32 variable that stores the value of the flag.\nfunc (f *FlagSet) Float32(name string, value float32, usage string) *float32 {\n\tp := new(float32)\n\tf.Float32VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 {\n\tp := new(float32)\n\tf.Float32VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Float32 defines a float32 flag with specified name, default value, and usage string.\n// The return value is the address of a float32 variable that stores the value of the flag.\nfunc Float32(name string, value float32, usage string) *float32 {\n\treturn CommandLine.Float32P(name, \"\", value, usage)\n}\n\n// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash.\nfunc Float32P(name, shorthand string, value float32, usage string) *float32 {\n\treturn CommandLine.Float32P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/float32_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- float32Slice Value\ntype float32SliceValue struct {\n\tvalue   *[]float32\n\tchanged bool\n}\n\nfunc newFloat32SliceValue(val []float32, p *[]float32) *float32SliceValue {\n\tisv := new(float32SliceValue)\n\tisv.value = p\n\t*isv.value = val\n\treturn isv\n}\n\nfunc (s *float32SliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]float32, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tvar temp64 float64\n\t\ttemp64, err = strconv.ParseFloat(d, 32)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tout[i] = float32(temp64)\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *float32SliceValue) Type() string {\n\treturn \"float32Slice\"\n}\n\nfunc (s *float32SliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%f\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *float32SliceValue) fromString(val string) (float32, error) {\n\tt64, err := strconv.ParseFloat(val, 32)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn float32(t64), nil\n}\n\nfunc (s *float32SliceValue) toString(val float32) string {\n\treturn fmt.Sprintf(\"%f\", val)\n}\n\nfunc (s *float32SliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *float32SliceValue) Replace(val []string) error {\n\tout := make([]float32, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *float32SliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc float32SliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []float32{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]float32, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tvar temp64 float64\n\t\ttemp64, err = strconv.ParseFloat(d, 32)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tout[i] = float32(temp64)\n\n\t}\n\treturn out, nil\n}\n\n// GetFloat32Slice return the []float32 value of a flag with the given name\nfunc (f *FlagSet) GetFloat32Slice(name string) ([]float32, error) {\n\tval, err := f.getFlagType(name, \"float32Slice\", float32SliceConv)\n\tif err != nil {\n\t\treturn []float32{}, err\n\t}\n\treturn val.([]float32), nil\n}\n\n// Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string.\n// The argument p points to a []float32 variable in which to store the value of the flag.\nfunc (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string) {\n\tf.VarP(newFloat32SliceValue(value, p), name, \"\", usage)\n}\n\n// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) {\n\tf.VarP(newFloat32SliceValue(value, p), name, shorthand, usage)\n}\n\n// Float32SliceVar defines a float32[] flag with specified name, default value, and usage string.\n// The argument p points to a float32[] variable in which to store the value of the flag.\nfunc Float32SliceVar(p *[]float32, name string, value []float32, usage string) {\n\tCommandLine.VarP(newFloat32SliceValue(value, p), name, \"\", usage)\n}\n\n// Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string) {\n\tCommandLine.VarP(newFloat32SliceValue(value, p), name, shorthand, usage)\n}\n\n// Float32Slice defines a []float32 flag with specified name, default value, and usage string.\n// The return value is the address of a []float32 variable that stores the value of the flag.\nfunc (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32 {\n\tp := []float32{}\n\tf.Float32SliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 {\n\tp := []float32{}\n\tf.Float32SliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// Float32Slice defines a []float32 flag with specified name, default value, and usage string.\n// The return value is the address of a []float32 variable that stores the value of the flag.\nfunc Float32Slice(name string, value []float32, usage string) *[]float32 {\n\treturn CommandLine.Float32SliceP(name, \"\", value, usage)\n}\n\n// Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32 {\n\treturn CommandLine.Float32SliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/float64.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- float64 Value\ntype float64Value float64\n\nfunc newFloat64Value(val float64, p *float64) *float64Value {\n\t*p = val\n\treturn (*float64Value)(p)\n}\n\nfunc (f *float64Value) Set(s string) error {\n\tv, err := strconv.ParseFloat(s, 64)\n\t*f = float64Value(v)\n\treturn err\n}\n\nfunc (f *float64Value) Type() string {\n\treturn \"float64\"\n}\n\nfunc (f *float64Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 64) }\n\nfunc float64Conv(sval string) (interface{}, error) {\n\treturn strconv.ParseFloat(sval, 64)\n}\n\n// GetFloat64 return the float64 value of a flag with the given name\nfunc (f *FlagSet) GetFloat64(name string) (float64, error) {\n\tval, err := f.getFlagType(name, \"float64\", float64Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(float64), nil\n}\n\n// Float64Var defines a float64 flag with specified name, default value, and usage string.\n// The argument p points to a float64 variable in which to store the value of the flag.\nfunc (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) {\n\tf.VarP(newFloat64Value(value, p), name, \"\", usage)\n}\n\n// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) {\n\tf.VarP(newFloat64Value(value, p), name, shorthand, usage)\n}\n\n// Float64Var defines a float64 flag with specified name, default value, and usage string.\n// The argument p points to a float64 variable in which to store the value of the flag.\nfunc Float64Var(p *float64, name string, value float64, usage string) {\n\tCommandLine.VarP(newFloat64Value(value, p), name, \"\", usage)\n}\n\n// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Float64VarP(p *float64, name, shorthand string, value float64, usage string) {\n\tCommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage)\n}\n\n// Float64 defines a float64 flag with specified name, default value, and usage string.\n// The return value is the address of a float64 variable that stores the value of the flag.\nfunc (f *FlagSet) Float64(name string, value float64, usage string) *float64 {\n\tp := new(float64)\n\tf.Float64VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 {\n\tp := new(float64)\n\tf.Float64VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Float64 defines a float64 flag with specified name, default value, and usage string.\n// The return value is the address of a float64 variable that stores the value of the flag.\nfunc Float64(name string, value float64, usage string) *float64 {\n\treturn CommandLine.Float64P(name, \"\", value, usage)\n}\n\n// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.\nfunc Float64P(name, shorthand string, value float64, usage string) *float64 {\n\treturn CommandLine.Float64P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/float64_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- float64Slice Value\ntype float64SliceValue struct {\n\tvalue   *[]float64\n\tchanged bool\n}\n\nfunc newFloat64SliceValue(val []float64, p *[]float64) *float64SliceValue {\n\tisv := new(float64SliceValue)\n\tisv.value = p\n\t*isv.value = val\n\treturn isv\n}\n\nfunc (s *float64SliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]float64, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.ParseFloat(d, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *float64SliceValue) Type() string {\n\treturn \"float64Slice\"\n}\n\nfunc (s *float64SliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%f\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *float64SliceValue) fromString(val string) (float64, error) {\n\treturn strconv.ParseFloat(val, 64)\n}\n\nfunc (s *float64SliceValue) toString(val float64) string {\n\treturn fmt.Sprintf(\"%f\", val)\n}\n\nfunc (s *float64SliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *float64SliceValue) Replace(val []string) error {\n\tout := make([]float64, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *float64SliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc float64SliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []float64{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]float64, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.ParseFloat(d, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\treturn out, nil\n}\n\n// GetFloat64Slice return the []float64 value of a flag with the given name\nfunc (f *FlagSet) GetFloat64Slice(name string) ([]float64, error) {\n\tval, err := f.getFlagType(name, \"float64Slice\", float64SliceConv)\n\tif err != nil {\n\t\treturn []float64{}, err\n\t}\n\treturn val.([]float64), nil\n}\n\n// Float64SliceVar defines a float64Slice flag with specified name, default value, and usage string.\n// The argument p points to a []float64 variable in which to store the value of the flag.\nfunc (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string) {\n\tf.VarP(newFloat64SliceValue(value, p), name, \"\", usage)\n}\n\n// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) {\n\tf.VarP(newFloat64SliceValue(value, p), name, shorthand, usage)\n}\n\n// Float64SliceVar defines a float64[] flag with specified name, default value, and usage string.\n// The argument p points to a float64[] variable in which to store the value of the flag.\nfunc Float64SliceVar(p *[]float64, name string, value []float64, usage string) {\n\tCommandLine.VarP(newFloat64SliceValue(value, p), name, \"\", usage)\n}\n\n// Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string) {\n\tCommandLine.VarP(newFloat64SliceValue(value, p), name, shorthand, usage)\n}\n\n// Float64Slice defines a []float64 flag with specified name, default value, and usage string.\n// The return value is the address of a []float64 variable that stores the value of the flag.\nfunc (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64 {\n\tp := []float64{}\n\tf.Float64SliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 {\n\tp := []float64{}\n\tf.Float64SliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// Float64Slice defines a []float64 flag with specified name, default value, and usage string.\n// The return value is the address of a []float64 variable that stores the value of the flag.\nfunc Float64Slice(name string, value []float64, usage string) *[]float64 {\n\treturn CommandLine.Float64SliceP(name, \"\", value, usage)\n}\n\n// Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64 {\n\treturn CommandLine.Float64SliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/func.go",
    "content": "package pflag\n\n// -- func Value\ntype funcValue func(string) error\n\nfunc (f funcValue) Set(s string) error { return f(s) }\n\nfunc (f funcValue) Type() string { return \"func\" }\n\nfunc (f funcValue) String() string { return \"\" } // same behavior as stdlib 'flag' package\n\n// Func defines a func flag with specified name, callback function and usage string.\n//\n// The callback function will be called every time \"--{name}={value}\" (or equivalent) is\n// parsed on the command line, with \"{value}\" as an argument.\nfunc (f *FlagSet) Func(name string, usage string, fn func(string) error) {\n\tf.FuncP(name, \"\", usage, fn)\n}\n\n// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) FuncP(name string, shorthand string, usage string, fn func(string) error) {\n\tvar val Value = funcValue(fn)\n\tf.VarP(val, name, shorthand, usage)\n}\n\n// Func defines a func flag with specified name, callback function and usage string.\n//\n// The callback function will be called every time \"--{name}={value}\" (or equivalent) is\n// parsed on the command line, with \"{value}\" as an argument.\nfunc Func(name string, usage string, fn func(string) error) {\n\tCommandLine.FuncP(name, \"\", usage, fn)\n}\n\n// FuncP is like Func, but accepts a shorthand letter that can be used after a single dash.\nfunc FuncP(name, shorthand string, usage string, fn func(string) error) {\n\tCommandLine.FuncP(name, shorthand, usage, fn)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/golangflag.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage pflag\n\nimport (\n\tgoflag \"flag\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n)\n\n// go test flags prefixes\nfunc isGotestFlag(flag string) bool {\n\treturn strings.HasPrefix(flag, \"-test.\")\n}\n\nfunc isGotestShorthandFlag(flag string) bool {\n\treturn strings.HasPrefix(flag, \"test.\")\n}\n\n// flagValueWrapper implements pflag.Value around a flag.Value.  The main\n// difference here is the addition of the Type method that returns a string\n// name of the type.  As this is generally unknown, we approximate that with\n// reflection.\ntype flagValueWrapper struct {\n\tinner    goflag.Value\n\tflagType string\n}\n\n// We are just copying the boolFlag interface out of goflag as that is what\n// they use to decide if a flag should get \"true\" when no arg is given.\ntype goBoolFlag interface {\n\tgoflag.Value\n\tIsBoolFlag() bool\n}\n\nfunc wrapFlagValue(v goflag.Value) Value {\n\t// If the flag.Value happens to also be a pflag.Value, just use it directly.\n\tif pv, ok := v.(Value); ok {\n\t\treturn pv\n\t}\n\n\tpv := &flagValueWrapper{\n\t\tinner: v,\n\t}\n\n\tt := reflect.TypeOf(v)\n\tif t.Kind() == reflect.Interface || t.Kind() == reflect.Ptr {\n\t\tt = t.Elem()\n\t}\n\n\tpv.flagType = strings.TrimSuffix(t.Name(), \"Value\")\n\treturn pv\n}\n\nfunc (v *flagValueWrapper) String() string {\n\treturn v.inner.String()\n}\n\nfunc (v *flagValueWrapper) Set(s string) error {\n\treturn v.inner.Set(s)\n}\n\nfunc (v *flagValueWrapper) Type() string {\n\treturn v.flagType\n}\n\n// PFlagFromGoFlag will return a *pflag.Flag given a *flag.Flag\n// If the *flag.Flag.Name was a single character (ex: `v`) it will be accessiblei\n// with both `-v` and `--v` in flags. If the golang flag was more than a single\n// character (ex: `verbose`) it will only be accessible via `--verbose`\nfunc PFlagFromGoFlag(goflag *goflag.Flag) *Flag {\n\t// Remember the default value as a string; it won't change.\n\tflag := &Flag{\n\t\tName:  goflag.Name,\n\t\tUsage: goflag.Usage,\n\t\tValue: wrapFlagValue(goflag.Value),\n\t\t// Looks like golang flags don't set DefValue correctly  :-(\n\t\t//DefValue: goflag.DefValue,\n\t\tDefValue: goflag.Value.String(),\n\t}\n\t// Ex: if the golang flag was -v, allow both -v and --v to work\n\tif len(flag.Name) == 1 {\n\t\tflag.Shorthand = flag.Name\n\t}\n\tif fv, ok := goflag.Value.(goBoolFlag); ok && fv.IsBoolFlag() {\n\t\tflag.NoOptDefVal = \"true\"\n\t}\n\treturn flag\n}\n\n// AddGoFlag will add the given *flag.Flag to the pflag.FlagSet\nfunc (f *FlagSet) AddGoFlag(goflag *goflag.Flag) {\n\tif f.Lookup(goflag.Name) != nil {\n\t\treturn\n\t}\n\tnewflag := PFlagFromGoFlag(goflag)\n\tf.AddFlag(newflag)\n}\n\n// AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet\nfunc (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) {\n\tif newSet == nil {\n\t\treturn\n\t}\n\tnewSet.VisitAll(func(goflag *goflag.Flag) {\n\t\tf.AddGoFlag(goflag)\n\t})\n\tif f.addedGoFlagSets == nil {\n\t\tf.addedGoFlagSets = make([]*goflag.FlagSet, 0)\n\t}\n\tf.addedGoFlagSets = append(f.addedGoFlagSets, newSet)\n}\n\n// CopyToGoFlagSet will add all current flags to the given Go flag set.\n// Deprecation remarks get copied into the usage description.\n// Whenever possible, a flag gets added for which Go flags shows\n// a proper type in the help message.\nfunc (f *FlagSet) CopyToGoFlagSet(newSet *goflag.FlagSet) {\n\tf.VisitAll(func(flag *Flag) {\n\t\tusage := flag.Usage\n\t\tif flag.Deprecated != \"\" {\n\t\t\tusage += \" (DEPRECATED: \" + flag.Deprecated + \")\"\n\t\t}\n\n\t\tswitch value := flag.Value.(type) {\n\t\tcase *stringValue:\n\t\t\tnewSet.StringVar((*string)(value), flag.Name, flag.DefValue, usage)\n\t\tcase *intValue:\n\t\t\tnewSet.IntVar((*int)(value), flag.Name, *(*int)(value), usage)\n\t\tcase *int64Value:\n\t\t\tnewSet.Int64Var((*int64)(value), flag.Name, *(*int64)(value), usage)\n\t\tcase *uintValue:\n\t\t\tnewSet.UintVar((*uint)(value), flag.Name, *(*uint)(value), usage)\n\t\tcase *uint64Value:\n\t\t\tnewSet.Uint64Var((*uint64)(value), flag.Name, *(*uint64)(value), usage)\n\t\tcase *durationValue:\n\t\t\tnewSet.DurationVar((*time.Duration)(value), flag.Name, *(*time.Duration)(value), usage)\n\t\tcase *float64Value:\n\t\t\tnewSet.Float64Var((*float64)(value), flag.Name, *(*float64)(value), usage)\n\t\tdefault:\n\t\t\tnewSet.Var(flag.Value, flag.Name, usage)\n\t\t}\n\t})\n}\n\n// ParseSkippedFlags explicitly Parses go test flags (i.e. the one starting with '-test.') with goflag.Parse(),\n// since by default those are skipped by pflag.Parse().\n// Typical usage example: `ParseGoTestFlags(os.Args[1:], goflag.CommandLine)`\nfunc ParseSkippedFlags(osArgs []string, goFlagSet *goflag.FlagSet) error {\n\tvar skippedFlags []string\n\tfor _, f := range osArgs {\n\t\tif isGotestFlag(f) {\n\t\t\tskippedFlags = append(skippedFlags, f)\n\t\t}\n\t}\n\treturn goFlagSet.Parse(skippedFlags)\n}\n\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- int Value\ntype intValue int\n\nfunc newIntValue(val int, p *int) *intValue {\n\t*p = val\n\treturn (*intValue)(p)\n}\n\nfunc (i *intValue) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, 64)\n\t*i = intValue(v)\n\treturn err\n}\n\nfunc (i *intValue) Type() string {\n\treturn \"int\"\n}\n\nfunc (i *intValue) String() string { return strconv.Itoa(int(*i)) }\n\nfunc intConv(sval string) (interface{}, error) {\n\treturn strconv.Atoi(sval)\n}\n\n// GetInt return the int value of a flag with the given name\nfunc (f *FlagSet) GetInt(name string) (int, error) {\n\tval, err := f.getFlagType(name, \"int\", intConv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int), nil\n}\n\n// IntVar defines an int flag with specified name, default value, and usage string.\n// The argument p points to an int variable in which to store the value of the flag.\nfunc (f *FlagSet) IntVar(p *int, name string, value int, usage string) {\n\tf.VarP(newIntValue(value, p), name, \"\", usage)\n}\n\n// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) {\n\tf.VarP(newIntValue(value, p), name, shorthand, usage)\n}\n\n// IntVar defines an int flag with specified name, default value, and usage string.\n// The argument p points to an int variable in which to store the value of the flag.\nfunc IntVar(p *int, name string, value int, usage string) {\n\tCommandLine.VarP(newIntValue(value, p), name, \"\", usage)\n}\n\n// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IntVarP(p *int, name, shorthand string, value int, usage string) {\n\tCommandLine.VarP(newIntValue(value, p), name, shorthand, usage)\n}\n\n// Int defines an int flag with specified name, default value, and usage string.\n// The return value is the address of an int variable that stores the value of the flag.\nfunc (f *FlagSet) Int(name string, value int, usage string) *int {\n\tp := new(int)\n\tf.IntVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int {\n\tp := new(int)\n\tf.IntVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Int defines an int flag with specified name, default value, and usage string.\n// The return value is the address of an int variable that stores the value of the flag.\nfunc Int(name string, value int, usage string) *int {\n\treturn CommandLine.IntP(name, \"\", value, usage)\n}\n\n// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.\nfunc IntP(name, shorthand string, value int, usage string) *int {\n\treturn CommandLine.IntP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int16.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- int16 Value\ntype int16Value int16\n\nfunc newInt16Value(val int16, p *int16) *int16Value {\n\t*p = val\n\treturn (*int16Value)(p)\n}\n\nfunc (i *int16Value) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, 16)\n\t*i = int16Value(v)\n\treturn err\n}\n\nfunc (i *int16Value) Type() string {\n\treturn \"int16\"\n}\n\nfunc (i *int16Value) String() string { return strconv.FormatInt(int64(*i), 10) }\n\nfunc int16Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseInt(sval, 0, 16)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn int16(v), nil\n}\n\n// GetInt16 returns the int16 value of a flag with the given name\nfunc (f *FlagSet) GetInt16(name string) (int16, error) {\n\tval, err := f.getFlagType(name, \"int16\", int16Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int16), nil\n}\n\n// Int16Var defines an int16 flag with specified name, default value, and usage string.\n// The argument p points to an int16 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int16Var(p *int16, name string, value int16, usage string) {\n\tf.VarP(newInt16Value(value, p), name, \"\", usage)\n}\n\n// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int16VarP(p *int16, name, shorthand string, value int16, usage string) {\n\tf.VarP(newInt16Value(value, p), name, shorthand, usage)\n}\n\n// Int16Var defines an int16 flag with specified name, default value, and usage string.\n// The argument p points to an int16 variable in which to store the value of the flag.\nfunc Int16Var(p *int16, name string, value int16, usage string) {\n\tCommandLine.VarP(newInt16Value(value, p), name, \"\", usage)\n}\n\n// Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Int16VarP(p *int16, name, shorthand string, value int16, usage string) {\n\tCommandLine.VarP(newInt16Value(value, p), name, shorthand, usage)\n}\n\n// Int16 defines an int16 flag with specified name, default value, and usage string.\n// The return value is the address of an int16 variable that stores the value of the flag.\nfunc (f *FlagSet) Int16(name string, value int16, usage string) *int16 {\n\tp := new(int16)\n\tf.Int16VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16 {\n\tp := new(int16)\n\tf.Int16VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Int16 defines an int16 flag with specified name, default value, and usage string.\n// The return value is the address of an int16 variable that stores the value of the flag.\nfunc Int16(name string, value int16, usage string) *int16 {\n\treturn CommandLine.Int16P(name, \"\", value, usage)\n}\n\n// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.\nfunc Int16P(name, shorthand string, value int16, usage string) *int16 {\n\treturn CommandLine.Int16P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int32.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- int32 Value\ntype int32Value int32\n\nfunc newInt32Value(val int32, p *int32) *int32Value {\n\t*p = val\n\treturn (*int32Value)(p)\n}\n\nfunc (i *int32Value) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, 32)\n\t*i = int32Value(v)\n\treturn err\n}\n\nfunc (i *int32Value) Type() string {\n\treturn \"int32\"\n}\n\nfunc (i *int32Value) String() string { return strconv.FormatInt(int64(*i), 10) }\n\nfunc int32Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseInt(sval, 0, 32)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn int32(v), nil\n}\n\n// GetInt32 return the int32 value of a flag with the given name\nfunc (f *FlagSet) GetInt32(name string) (int32, error) {\n\tval, err := f.getFlagType(name, \"int32\", int32Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int32), nil\n}\n\n// Int32Var defines an int32 flag with specified name, default value, and usage string.\n// The argument p points to an int32 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) {\n\tf.VarP(newInt32Value(value, p), name, \"\", usage)\n}\n\n// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) {\n\tf.VarP(newInt32Value(value, p), name, shorthand, usage)\n}\n\n// Int32Var defines an int32 flag with specified name, default value, and usage string.\n// The argument p points to an int32 variable in which to store the value of the flag.\nfunc Int32Var(p *int32, name string, value int32, usage string) {\n\tCommandLine.VarP(newInt32Value(value, p), name, \"\", usage)\n}\n\n// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Int32VarP(p *int32, name, shorthand string, value int32, usage string) {\n\tCommandLine.VarP(newInt32Value(value, p), name, shorthand, usage)\n}\n\n// Int32 defines an int32 flag with specified name, default value, and usage string.\n// The return value is the address of an int32 variable that stores the value of the flag.\nfunc (f *FlagSet) Int32(name string, value int32, usage string) *int32 {\n\tp := new(int32)\n\tf.Int32VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 {\n\tp := new(int32)\n\tf.Int32VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Int32 defines an int32 flag with specified name, default value, and usage string.\n// The return value is the address of an int32 variable that stores the value of the flag.\nfunc Int32(name string, value int32, usage string) *int32 {\n\treturn CommandLine.Int32P(name, \"\", value, usage)\n}\n\n// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash.\nfunc Int32P(name, shorthand string, value int32, usage string) *int32 {\n\treturn CommandLine.Int32P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int32_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- int32Slice Value\ntype int32SliceValue struct {\n\tvalue   *[]int32\n\tchanged bool\n}\n\nfunc newInt32SliceValue(val []int32, p *[]int32) *int32SliceValue {\n\tisv := new(int32SliceValue)\n\tisv.value = p\n\t*isv.value = val\n\treturn isv\n}\n\nfunc (s *int32SliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]int32, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tvar temp64 int64\n\t\ttemp64, err = strconv.ParseInt(d, 0, 32)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tout[i] = int32(temp64)\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *int32SliceValue) Type() string {\n\treturn \"int32Slice\"\n}\n\nfunc (s *int32SliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%d\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *int32SliceValue) fromString(val string) (int32, error) {\n\tt64, err := strconv.ParseInt(val, 0, 32)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn int32(t64), nil\n}\n\nfunc (s *int32SliceValue) toString(val int32) string {\n\treturn fmt.Sprintf(\"%d\", val)\n}\n\nfunc (s *int32SliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *int32SliceValue) Replace(val []string) error {\n\tout := make([]int32, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *int32SliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc int32SliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []int32{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]int32, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tvar temp64 int64\n\t\ttemp64, err = strconv.ParseInt(d, 0, 32)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tout[i] = int32(temp64)\n\n\t}\n\treturn out, nil\n}\n\n// GetInt32Slice return the []int32 value of a flag with the given name\nfunc (f *FlagSet) GetInt32Slice(name string) ([]int32, error) {\n\tval, err := f.getFlagType(name, \"int32Slice\", int32SliceConv)\n\tif err != nil {\n\t\treturn []int32{}, err\n\t}\n\treturn val.([]int32), nil\n}\n\n// Int32SliceVar defines a int32Slice flag with specified name, default value, and usage string.\n// The argument p points to a []int32 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string) {\n\tf.VarP(newInt32SliceValue(value, p), name, \"\", usage)\n}\n\n// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) {\n\tf.VarP(newInt32SliceValue(value, p), name, shorthand, usage)\n}\n\n// Int32SliceVar defines a int32[] flag with specified name, default value, and usage string.\n// The argument p points to a int32[] variable in which to store the value of the flag.\nfunc Int32SliceVar(p *[]int32, name string, value []int32, usage string) {\n\tCommandLine.VarP(newInt32SliceValue(value, p), name, \"\", usage)\n}\n\n// Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string) {\n\tCommandLine.VarP(newInt32SliceValue(value, p), name, shorthand, usage)\n}\n\n// Int32Slice defines a []int32 flag with specified name, default value, and usage string.\n// The return value is the address of a []int32 variable that stores the value of the flag.\nfunc (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32 {\n\tp := []int32{}\n\tf.Int32SliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 {\n\tp := []int32{}\n\tf.Int32SliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// Int32Slice defines a []int32 flag with specified name, default value, and usage string.\n// The return value is the address of a []int32 variable that stores the value of the flag.\nfunc Int32Slice(name string, value []int32, usage string) *[]int32 {\n\treturn CommandLine.Int32SliceP(name, \"\", value, usage)\n}\n\n// Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32 {\n\treturn CommandLine.Int32SliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int64.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- int64 Value\ntype int64Value int64\n\nfunc newInt64Value(val int64, p *int64) *int64Value {\n\t*p = val\n\treturn (*int64Value)(p)\n}\n\nfunc (i *int64Value) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, 64)\n\t*i = int64Value(v)\n\treturn err\n}\n\nfunc (i *int64Value) Type() string {\n\treturn \"int64\"\n}\n\nfunc (i *int64Value) String() string { return strconv.FormatInt(int64(*i), 10) }\n\nfunc int64Conv(sval string) (interface{}, error) {\n\treturn strconv.ParseInt(sval, 0, 64)\n}\n\n// GetInt64 return the int64 value of a flag with the given name\nfunc (f *FlagSet) GetInt64(name string) (int64, error) {\n\tval, err := f.getFlagType(name, \"int64\", int64Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int64), nil\n}\n\n// Int64Var defines an int64 flag with specified name, default value, and usage string.\n// The argument p points to an int64 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {\n\tf.VarP(newInt64Value(value, p), name, \"\", usage)\n}\n\n// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) {\n\tf.VarP(newInt64Value(value, p), name, shorthand, usage)\n}\n\n// Int64Var defines an int64 flag with specified name, default value, and usage string.\n// The argument p points to an int64 variable in which to store the value of the flag.\nfunc Int64Var(p *int64, name string, value int64, usage string) {\n\tCommandLine.VarP(newInt64Value(value, p), name, \"\", usage)\n}\n\n// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Int64VarP(p *int64, name, shorthand string, value int64, usage string) {\n\tCommandLine.VarP(newInt64Value(value, p), name, shorthand, usage)\n}\n\n// Int64 defines an int64 flag with specified name, default value, and usage string.\n// The return value is the address of an int64 variable that stores the value of the flag.\nfunc (f *FlagSet) Int64(name string, value int64, usage string) *int64 {\n\tp := new(int64)\n\tf.Int64VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 {\n\tp := new(int64)\n\tf.Int64VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Int64 defines an int64 flag with specified name, default value, and usage string.\n// The return value is the address of an int64 variable that stores the value of the flag.\nfunc Int64(name string, value int64, usage string) *int64 {\n\treturn CommandLine.Int64P(name, \"\", value, usage)\n}\n\n// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.\nfunc Int64P(name, shorthand string, value int64, usage string) *int64 {\n\treturn CommandLine.Int64P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int64_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- int64Slice Value\ntype int64SliceValue struct {\n\tvalue   *[]int64\n\tchanged bool\n}\n\nfunc newInt64SliceValue(val []int64, p *[]int64) *int64SliceValue {\n\tisv := new(int64SliceValue)\n\tisv.value = p\n\t*isv.value = val\n\treturn isv\n}\n\nfunc (s *int64SliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]int64, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.ParseInt(d, 0, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *int64SliceValue) Type() string {\n\treturn \"int64Slice\"\n}\n\nfunc (s *int64SliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%d\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *int64SliceValue) fromString(val string) (int64, error) {\n\treturn strconv.ParseInt(val, 0, 64)\n}\n\nfunc (s *int64SliceValue) toString(val int64) string {\n\treturn fmt.Sprintf(\"%d\", val)\n}\n\nfunc (s *int64SliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *int64SliceValue) Replace(val []string) error {\n\tout := make([]int64, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *int64SliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc int64SliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []int64{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]int64, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.ParseInt(d, 0, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\treturn out, nil\n}\n\n// GetInt64Slice return the []int64 value of a flag with the given name\nfunc (f *FlagSet) GetInt64Slice(name string) ([]int64, error) {\n\tval, err := f.getFlagType(name, \"int64Slice\", int64SliceConv)\n\tif err != nil {\n\t\treturn []int64{}, err\n\t}\n\treturn val.([]int64), nil\n}\n\n// Int64SliceVar defines a int64Slice flag with specified name, default value, and usage string.\n// The argument p points to a []int64 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string) {\n\tf.VarP(newInt64SliceValue(value, p), name, \"\", usage)\n}\n\n// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) {\n\tf.VarP(newInt64SliceValue(value, p), name, shorthand, usage)\n}\n\n// Int64SliceVar defines a int64[] flag with specified name, default value, and usage string.\n// The argument p points to a int64[] variable in which to store the value of the flag.\nfunc Int64SliceVar(p *[]int64, name string, value []int64, usage string) {\n\tCommandLine.VarP(newInt64SliceValue(value, p), name, \"\", usage)\n}\n\n// Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string) {\n\tCommandLine.VarP(newInt64SliceValue(value, p), name, shorthand, usage)\n}\n\n// Int64Slice defines a []int64 flag with specified name, default value, and usage string.\n// The return value is the address of a []int64 variable that stores the value of the flag.\nfunc (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64 {\n\tp := []int64{}\n\tf.Int64SliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 {\n\tp := []int64{}\n\tf.Int64SliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// Int64Slice defines a []int64 flag with specified name, default value, and usage string.\n// The return value is the address of a []int64 variable that stores the value of the flag.\nfunc Int64Slice(name string, value []int64, usage string) *[]int64 {\n\treturn CommandLine.Int64SliceP(name, \"\", value, usage)\n}\n\n// Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash.\nfunc Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64 {\n\treturn CommandLine.Int64SliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int8.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- int8 Value\ntype int8Value int8\n\nfunc newInt8Value(val int8, p *int8) *int8Value {\n\t*p = val\n\treturn (*int8Value)(p)\n}\n\nfunc (i *int8Value) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, 8)\n\t*i = int8Value(v)\n\treturn err\n}\n\nfunc (i *int8Value) Type() string {\n\treturn \"int8\"\n}\n\nfunc (i *int8Value) String() string { return strconv.FormatInt(int64(*i), 10) }\n\nfunc int8Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseInt(sval, 0, 8)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn int8(v), nil\n}\n\n// GetInt8 return the int8 value of a flag with the given name\nfunc (f *FlagSet) GetInt8(name string) (int8, error) {\n\tval, err := f.getFlagType(name, \"int8\", int8Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(int8), nil\n}\n\n// Int8Var defines an int8 flag with specified name, default value, and usage string.\n// The argument p points to an int8 variable in which to store the value of the flag.\nfunc (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) {\n\tf.VarP(newInt8Value(value, p), name, \"\", usage)\n}\n\n// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) {\n\tf.VarP(newInt8Value(value, p), name, shorthand, usage)\n}\n\n// Int8Var defines an int8 flag with specified name, default value, and usage string.\n// The argument p points to an int8 variable in which to store the value of the flag.\nfunc Int8Var(p *int8, name string, value int8, usage string) {\n\tCommandLine.VarP(newInt8Value(value, p), name, \"\", usage)\n}\n\n// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Int8VarP(p *int8, name, shorthand string, value int8, usage string) {\n\tCommandLine.VarP(newInt8Value(value, p), name, shorthand, usage)\n}\n\n// Int8 defines an int8 flag with specified name, default value, and usage string.\n// The return value is the address of an int8 variable that stores the value of the flag.\nfunc (f *FlagSet) Int8(name string, value int8, usage string) *int8 {\n\tp := new(int8)\n\tf.Int8VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 {\n\tp := new(int8)\n\tf.Int8VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Int8 defines an int8 flag with specified name, default value, and usage string.\n// The return value is the address of an int8 variable that stores the value of the flag.\nfunc Int8(name string, value int8, usage string) *int8 {\n\treturn CommandLine.Int8P(name, \"\", value, usage)\n}\n\n// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.\nfunc Int8P(name, shorthand string, value int8, usage string) *int8 {\n\treturn CommandLine.Int8P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/int_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- intSlice Value\ntype intSliceValue struct {\n\tvalue   *[]int\n\tchanged bool\n}\n\nfunc newIntSliceValue(val []int, p *[]int) *intSliceValue {\n\tisv := new(intSliceValue)\n\tisv.value = p\n\t*isv.value = val\n\treturn isv\n}\n\nfunc (s *intSliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]int, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.Atoi(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *intSliceValue) Type() string {\n\treturn \"intSlice\"\n}\n\nfunc (s *intSliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%d\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *intSliceValue) Append(val string) error {\n\ti, err := strconv.Atoi(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *intSliceValue) Replace(val []string) error {\n\tout := make([]int, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = strconv.Atoi(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *intSliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = strconv.Itoa(d)\n\t}\n\treturn out\n}\n\nfunc intSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []int{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]int, len(ss))\n\tfor i, d := range ss {\n\t\tvar err error\n\t\tout[i], err = strconv.Atoi(d)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\treturn out, nil\n}\n\n// GetIntSlice return the []int value of a flag with the given name\nfunc (f *FlagSet) GetIntSlice(name string) ([]int, error) {\n\tval, err := f.getFlagType(name, \"intSlice\", intSliceConv)\n\tif err != nil {\n\t\treturn []int{}, err\n\t}\n\treturn val.([]int), nil\n}\n\n// IntSliceVar defines a intSlice flag with specified name, default value, and usage string.\n// The argument p points to a []int variable in which to store the value of the flag.\nfunc (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string) {\n\tf.VarP(newIntSliceValue(value, p), name, \"\", usage)\n}\n\n// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) {\n\tf.VarP(newIntSliceValue(value, p), name, shorthand, usage)\n}\n\n// IntSliceVar defines a int[] flag with specified name, default value, and usage string.\n// The argument p points to a int[] variable in which to store the value of the flag.\nfunc IntSliceVar(p *[]int, name string, value []int, usage string) {\n\tCommandLine.VarP(newIntSliceValue(value, p), name, \"\", usage)\n}\n\n// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) {\n\tCommandLine.VarP(newIntSliceValue(value, p), name, shorthand, usage)\n}\n\n// IntSlice defines a []int flag with specified name, default value, and usage string.\n// The return value is the address of a []int variable that stores the value of the flag.\nfunc (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int {\n\tp := []int{}\n\tf.IntSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int {\n\tp := []int{}\n\tf.IntSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// IntSlice defines a []int flag with specified name, default value, and usage string.\n// The return value is the address of a []int variable that stores the value of the flag.\nfunc IntSlice(name string, value []int, usage string) *[]int {\n\treturn CommandLine.IntSliceP(name, \"\", value, usage)\n}\n\n// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc IntSliceP(name, shorthand string, value []int, usage string) *[]int {\n\treturn CommandLine.IntSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/ip.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"strings\"\n)\n\n// -- net.IP value\ntype ipValue net.IP\n\nfunc newIPValue(val net.IP, p *net.IP) *ipValue {\n\t*p = val\n\treturn (*ipValue)(p)\n}\n\nfunc (i *ipValue) String() string { return net.IP(*i).String() }\nfunc (i *ipValue) Set(s string) error {\n\tif s == \"\" {\n\t\treturn nil\n\t}\n\tip := net.ParseIP(strings.TrimSpace(s))\n\tif ip == nil {\n\t\treturn fmt.Errorf(\"failed to parse IP: %q\", s)\n\t}\n\t*i = ipValue(ip)\n\treturn nil\n}\n\nfunc (i *ipValue) Type() string {\n\treturn \"ip\"\n}\n\nfunc ipConv(sval string) (interface{}, error) {\n\tip := net.ParseIP(sval)\n\tif ip != nil {\n\t\treturn ip, nil\n\t}\n\treturn nil, fmt.Errorf(\"invalid string being converted to IP address: %s\", sval)\n}\n\n// GetIP return the net.IP value of a flag with the given name\nfunc (f *FlagSet) GetIP(name string) (net.IP, error) {\n\tval, err := f.getFlagType(name, \"ip\", ipConv)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn val.(net.IP), nil\n}\n\n// IPVar defines an net.IP flag with specified name, default value, and usage string.\n// The argument p points to an net.IP variable in which to store the value of the flag.\nfunc (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) {\n\tf.VarP(newIPValue(value, p), name, \"\", usage)\n}\n\n// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {\n\tf.VarP(newIPValue(value, p), name, shorthand, usage)\n}\n\n// IPVar defines an net.IP flag with specified name, default value, and usage string.\n// The argument p points to an net.IP variable in which to store the value of the flag.\nfunc IPVar(p *net.IP, name string, value net.IP, usage string) {\n\tCommandLine.VarP(newIPValue(value, p), name, \"\", usage)\n}\n\n// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {\n\tCommandLine.VarP(newIPValue(value, p), name, shorthand, usage)\n}\n\n// IP defines an net.IP flag with specified name, default value, and usage string.\n// The return value is the address of an net.IP variable that stores the value of the flag.\nfunc (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP {\n\tp := new(net.IP)\n\tf.IPVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// IPP is like IP, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP {\n\tp := new(net.IP)\n\tf.IPVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// IP defines an net.IP flag with specified name, default value, and usage string.\n// The return value is the address of an net.IP variable that stores the value of the flag.\nfunc IP(name string, value net.IP, usage string) *net.IP {\n\treturn CommandLine.IPP(name, \"\", value, usage)\n}\n\n// IPP is like IP, but accepts a shorthand letter that can be used after a single dash.\nfunc IPP(name, shorthand string, value net.IP, usage string) *net.IP {\n\treturn CommandLine.IPP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/ip_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"strings\"\n)\n\n// -- ipSlice Value\ntype ipSliceValue struct {\n\tvalue   *[]net.IP\n\tchanged bool\n}\n\nfunc newIPSliceValue(val []net.IP, p *[]net.IP) *ipSliceValue {\n\tipsv := new(ipSliceValue)\n\tipsv.value = p\n\t*ipsv.value = val\n\treturn ipsv\n}\n\n// Set converts, and assigns, the comma-separated IP argument string representation as the []net.IP value of this flag.\n// If Set is called on a flag that already has a []net.IP assigned, the newly converted values will be appended.\nfunc (s *ipSliceValue) Set(val string) error {\n\n\t// remove all quote characters\n\trmQuote := strings.NewReplacer(`\"`, \"\", `'`, \"\", \"`\", \"\")\n\n\t// read flag arguments with CSV parser\n\tipStrSlice, err := readAsCSV(rmQuote.Replace(val))\n\tif err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\t// parse ip values into slice\n\tout := make([]net.IP, 0, len(ipStrSlice))\n\tfor _, ipStr := range ipStrSlice {\n\t\tip := net.ParseIP(strings.TrimSpace(ipStr))\n\t\tif ip == nil {\n\t\t\treturn fmt.Errorf(\"invalid string being converted to IP address: %s\", ipStr)\n\t\t}\n\t\tout = append(out, ip)\n\t}\n\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\n\ts.changed = true\n\n\treturn nil\n}\n\n// Type returns a string that uniquely represents this flag's type.\nfunc (s *ipSliceValue) Type() string {\n\treturn \"ipSlice\"\n}\n\n// String defines a \"native\" format for this net.IP slice flag value.\nfunc (s *ipSliceValue) String() string {\n\n\tipStrSlice := make([]string, len(*s.value))\n\tfor i, ip := range *s.value {\n\t\tipStrSlice[i] = ip.String()\n\t}\n\n\tout, _ := writeAsCSV(ipStrSlice)\n\n\treturn \"[\" + out + \"]\"\n}\n\nfunc (s *ipSliceValue) fromString(val string) (net.IP, error) {\n\treturn net.ParseIP(strings.TrimSpace(val)), nil\n}\n\nfunc (s *ipSliceValue) toString(val net.IP) string {\n\treturn val.String()\n}\n\nfunc (s *ipSliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *ipSliceValue) Replace(val []string) error {\n\tout := make([]net.IP, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *ipSliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc ipSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []net.IP{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]net.IP, len(ss))\n\tfor i, sval := range ss {\n\t\tip := net.ParseIP(strings.TrimSpace(sval))\n\t\tif ip == nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid string being converted to IP address: %s\", sval)\n\t\t}\n\t\tout[i] = ip\n\t}\n\treturn out, nil\n}\n\n// GetIPSlice returns the []net.IP value of a flag with the given name\nfunc (f *FlagSet) GetIPSlice(name string) ([]net.IP, error) {\n\tval, err := f.getFlagType(name, \"ipSlice\", ipSliceConv)\n\tif err != nil {\n\t\treturn []net.IP{}, err\n\t}\n\treturn val.([]net.IP), nil\n}\n\n// IPSliceVar defines a ipSlice flag with specified name, default value, and usage string.\n// The argument p points to a []net.IP variable in which to store the value of the flag.\nfunc (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) {\n\tf.VarP(newIPSliceValue(value, p), name, \"\", usage)\n}\n\n// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) {\n\tf.VarP(newIPSliceValue(value, p), name, shorthand, usage)\n}\n\n// IPSliceVar defines a []net.IP flag with specified name, default value, and usage string.\n// The argument p points to a []net.IP variable in which to store the value of the flag.\nfunc IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string) {\n\tCommandLine.VarP(newIPSliceValue(value, p), name, \"\", usage)\n}\n\n// IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string) {\n\tCommandLine.VarP(newIPSliceValue(value, p), name, shorthand, usage)\n}\n\n// IPSlice defines a []net.IP flag with specified name, default value, and usage string.\n// The return value is the address of a []net.IP variable that stores the value of that flag.\nfunc (f *FlagSet) IPSlice(name string, value []net.IP, usage string) *[]net.IP {\n\tp := []net.IP{}\n\tf.IPSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP {\n\tp := []net.IP{}\n\tf.IPSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// IPSlice defines a []net.IP flag with specified name, default value, and usage string.\n// The return value is the address of a []net.IP variable that stores the value of the flag.\nfunc IPSlice(name string, value []net.IP, usage string) *[]net.IP {\n\treturn CommandLine.IPSliceP(name, \"\", value, usage)\n}\n\n// IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP {\n\treturn CommandLine.IPSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/ipmask.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"strconv\"\n)\n\n// -- net.IPMask value\ntype ipMaskValue net.IPMask\n\nfunc newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue {\n\t*p = val\n\treturn (*ipMaskValue)(p)\n}\n\nfunc (i *ipMaskValue) String() string { return net.IPMask(*i).String() }\nfunc (i *ipMaskValue) Set(s string) error {\n\tip := ParseIPv4Mask(s)\n\tif ip == nil {\n\t\treturn fmt.Errorf(\"failed to parse IP mask: %q\", s)\n\t}\n\t*i = ipMaskValue(ip)\n\treturn nil\n}\n\nfunc (i *ipMaskValue) Type() string {\n\treturn \"ipMask\"\n}\n\n// ParseIPv4Mask written in IP form (e.g. 255.255.255.0).\n// This function should really belong to the net package.\nfunc ParseIPv4Mask(s string) net.IPMask {\n\tmask := net.ParseIP(s)\n\tif mask == nil {\n\t\tif len(s) != 8 {\n\t\t\treturn nil\n\t\t}\n\t\t// net.IPMask.String() actually outputs things like ffffff00\n\t\t// so write a horrible parser for that as well  :-(\n\t\tm := []int{}\n\t\tfor i := 0; i < 4; i++ {\n\t\t\tb := \"0x\" + s[2*i:2*i+2]\n\t\t\td, err := strconv.ParseInt(b, 0, 0)\n\t\t\tif err != nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tm = append(m, int(d))\n\t\t}\n\t\ts := fmt.Sprintf(\"%d.%d.%d.%d\", m[0], m[1], m[2], m[3])\n\t\tmask = net.ParseIP(s)\n\t\tif mask == nil {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn net.IPv4Mask(mask[12], mask[13], mask[14], mask[15])\n}\n\nfunc parseIPv4Mask(sval string) (interface{}, error) {\n\tmask := ParseIPv4Mask(sval)\n\tif mask == nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse %s as net.IPMask\", sval)\n\t}\n\treturn mask, nil\n}\n\n// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name\nfunc (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) {\n\tval, err := f.getFlagType(name, \"ipMask\", parseIPv4Mask)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn val.(net.IPMask), nil\n}\n\n// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.\n// The argument p points to an net.IPMask variable in which to store the value of the flag.\nfunc (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {\n\tf.VarP(newIPMaskValue(value, p), name, \"\", usage)\n}\n\n// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {\n\tf.VarP(newIPMaskValue(value, p), name, shorthand, usage)\n}\n\n// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.\n// The argument p points to an net.IPMask variable in which to store the value of the flag.\nfunc IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {\n\tCommandLine.VarP(newIPMaskValue(value, p), name, \"\", usage)\n}\n\n// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {\n\tCommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage)\n}\n\n// IPMask defines an net.IPMask flag with specified name, default value, and usage string.\n// The return value is the address of an net.IPMask variable that stores the value of the flag.\nfunc (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask {\n\tp := new(net.IPMask)\n\tf.IPMaskVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {\n\tp := new(net.IPMask)\n\tf.IPMaskVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// IPMask defines an net.IPMask flag with specified name, default value, and usage string.\n// The return value is the address of an net.IPMask variable that stores the value of the flag.\nfunc IPMask(name string, value net.IPMask, usage string) *net.IPMask {\n\treturn CommandLine.IPMaskP(name, \"\", value, usage)\n}\n\n// IPMaskP is like IP, but accepts a shorthand letter that can be used after a single dash.\nfunc IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {\n\treturn CommandLine.IPMaskP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/ipnet.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"strings\"\n)\n\n// IPNet adapts net.IPNet for use as a flag.\ntype ipNetValue net.IPNet\n\nfunc (ipnet ipNetValue) String() string {\n\tn := net.IPNet(ipnet)\n\treturn n.String()\n}\n\nfunc (ipnet *ipNetValue) Set(value string) error {\n\t_, n, err := net.ParseCIDR(strings.TrimSpace(value))\n\tif err != nil {\n\t\treturn err\n\t}\n\t*ipnet = ipNetValue(*n)\n\treturn nil\n}\n\nfunc (*ipNetValue) Type() string {\n\treturn \"ipNet\"\n}\n\nfunc newIPNetValue(val net.IPNet, p *net.IPNet) *ipNetValue {\n\t*p = val\n\treturn (*ipNetValue)(p)\n}\n\nfunc ipNetConv(sval string) (interface{}, error) {\n\t_, n, err := net.ParseCIDR(strings.TrimSpace(sval))\n\tif err == nil {\n\t\treturn *n, nil\n\t}\n\treturn nil, fmt.Errorf(\"invalid string being converted to IPNet: %s\", sval)\n}\n\n// GetIPNet return the net.IPNet value of a flag with the given name\nfunc (f *FlagSet) GetIPNet(name string) (net.IPNet, error) {\n\tval, err := f.getFlagType(name, \"ipNet\", ipNetConv)\n\tif err != nil {\n\t\treturn net.IPNet{}, err\n\t}\n\treturn val.(net.IPNet), nil\n}\n\n// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string.\n// The argument p points to an net.IPNet variable in which to store the value of the flag.\nfunc (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) {\n\tf.VarP(newIPNetValue(value, p), name, \"\", usage)\n}\n\n// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) {\n\tf.VarP(newIPNetValue(value, p), name, shorthand, usage)\n}\n\n// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string.\n// The argument p points to an net.IPNet variable in which to store the value of the flag.\nfunc IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) {\n\tCommandLine.VarP(newIPNetValue(value, p), name, \"\", usage)\n}\n\n// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) {\n\tCommandLine.VarP(newIPNetValue(value, p), name, shorthand, usage)\n}\n\n// IPNet defines an net.IPNet flag with specified name, default value, and usage string.\n// The return value is the address of an net.IPNet variable that stores the value of the flag.\nfunc (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet {\n\tp := new(net.IPNet)\n\tf.IPNetVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet {\n\tp := new(net.IPNet)\n\tf.IPNetVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// IPNet defines an net.IPNet flag with specified name, default value, and usage string.\n// The return value is the address of an net.IPNet variable that stores the value of the flag.\nfunc IPNet(name string, value net.IPNet, usage string) *net.IPNet {\n\treturn CommandLine.IPNetP(name, \"\", value, usage)\n}\n\n// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.\nfunc IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet {\n\treturn CommandLine.IPNetP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/ipnet_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"strings\"\n)\n\n// -- ipNetSlice Value\ntype ipNetSliceValue struct {\n\tvalue   *[]net.IPNet\n\tchanged bool\n}\n\nfunc newIPNetSliceValue(val []net.IPNet, p *[]net.IPNet) *ipNetSliceValue {\n\tipnsv := new(ipNetSliceValue)\n\tipnsv.value = p\n\t*ipnsv.value = val\n\treturn ipnsv\n}\n\n// Set converts, and assigns, the comma-separated IPNet argument string representation as the []net.IPNet value of this flag.\n// If Set is called on a flag that already has a []net.IPNet assigned, the newly converted values will be appended.\nfunc (s *ipNetSliceValue) Set(val string) error {\n\n\t// remove all quote characters\n\trmQuote := strings.NewReplacer(`\"`, \"\", `'`, \"\", \"`\", \"\")\n\n\t// read flag arguments with CSV parser\n\tipNetStrSlice, err := readAsCSV(rmQuote.Replace(val))\n\tif err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\n\t// parse ip values into slice\n\tout := make([]net.IPNet, 0, len(ipNetStrSlice))\n\tfor _, ipNetStr := range ipNetStrSlice {\n\t\t_, n, err := net.ParseCIDR(strings.TrimSpace(ipNetStr))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid string being converted to CIDR: %s\", ipNetStr)\n\t\t}\n\t\tout = append(out, *n)\n\t}\n\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\n\ts.changed = true\n\n\treturn nil\n}\n\n// Type returns a string that uniquely represents this flag's type.\nfunc (s *ipNetSliceValue) Type() string {\n\treturn \"ipNetSlice\"\n}\n\n// String defines a \"native\" format for this net.IPNet slice flag value.\nfunc (s *ipNetSliceValue) String() string {\n\n\tipNetStrSlice := make([]string, len(*s.value))\n\tfor i, n := range *s.value {\n\t\tipNetStrSlice[i] = n.String()\n\t}\n\n\tout, _ := writeAsCSV(ipNetStrSlice)\n\treturn \"[\" + out + \"]\"\n}\n\nfunc ipNetSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []net.IPNet{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]net.IPNet, len(ss))\n\tfor i, sval := range ss {\n\t\t_, n, err := net.ParseCIDR(strings.TrimSpace(sval))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid string being converted to CIDR: %s\", sval)\n\t\t}\n\t\tout[i] = *n\n\t}\n\treturn out, nil\n}\n\n// GetIPNetSlice returns the []net.IPNet value of a flag with the given name\nfunc (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error) {\n\tval, err := f.getFlagType(name, \"ipNetSlice\", ipNetSliceConv)\n\tif err != nil {\n\t\treturn []net.IPNet{}, err\n\t}\n\treturn val.([]net.IPNet), nil\n}\n\n// IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string.\n// The argument p points to a []net.IPNet variable in which to store the value of the flag.\nfunc (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) {\n\tf.VarP(newIPNetSliceValue(value, p), name, \"\", usage)\n}\n\n// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) {\n\tf.VarP(newIPNetSliceValue(value, p), name, shorthand, usage)\n}\n\n// IPNetSliceVar defines a []net.IPNet flag with specified name, default value, and usage string.\n// The argument p points to a []net.IPNet variable in which to store the value of the flag.\nfunc IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) {\n\tCommandLine.VarP(newIPNetSliceValue(value, p), name, \"\", usage)\n}\n\n// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) {\n\tCommandLine.VarP(newIPNetSliceValue(value, p), name, shorthand, usage)\n}\n\n// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string.\n// The return value is the address of a []net.IPNet variable that stores the value of that flag.\nfunc (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet {\n\tp := []net.IPNet{}\n\tf.IPNetSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet {\n\tp := []net.IPNet{}\n\tf.IPNetSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string.\n// The return value is the address of a []net.IP variable that stores the value of the flag.\nfunc IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet {\n\treturn CommandLine.IPNetSliceP(name, \"\", value, usage)\n}\n\n// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet {\n\treturn CommandLine.IPNetSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string.go",
    "content": "package pflag\n\n// -- string Value\ntype stringValue string\n\nfunc newStringValue(val string, p *string) *stringValue {\n\t*p = val\n\treturn (*stringValue)(p)\n}\n\nfunc (s *stringValue) Set(val string) error {\n\t*s = stringValue(val)\n\treturn nil\n}\nfunc (s *stringValue) Type() string {\n\treturn \"string\"\n}\n\nfunc (s *stringValue) String() string { return string(*s) }\n\nfunc stringConv(sval string) (interface{}, error) {\n\treturn sval, nil\n}\n\n// GetString return the string value of a flag with the given name\nfunc (f *FlagSet) GetString(name string) (string, error) {\n\tval, err := f.getFlagType(name, \"string\", stringConv)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn val.(string), nil\n}\n\n// StringVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a string variable in which to store the value of the flag.\nfunc (f *FlagSet) StringVar(p *string, name string, value string, usage string) {\n\tf.VarP(newStringValue(value, p), name, \"\", usage)\n}\n\n// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) {\n\tf.VarP(newStringValue(value, p), name, shorthand, usage)\n}\n\n// StringVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a string variable in which to store the value of the flag.\nfunc StringVar(p *string, name string, value string, usage string) {\n\tCommandLine.VarP(newStringValue(value, p), name, \"\", usage)\n}\n\n// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.\nfunc StringVarP(p *string, name, shorthand string, value string, usage string) {\n\tCommandLine.VarP(newStringValue(value, p), name, shorthand, usage)\n}\n\n// String defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a string variable that stores the value of the flag.\nfunc (f *FlagSet) String(name string, value string, usage string) *string {\n\tp := new(string)\n\tf.StringVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// StringP is like String, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string {\n\tp := new(string)\n\tf.StringVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// String defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a string variable that stores the value of the flag.\nfunc String(name string, value string, usage string) *string {\n\treturn CommandLine.StringP(name, \"\", value, usage)\n}\n\n// StringP is like String, but accepts a shorthand letter that can be used after a single dash.\nfunc StringP(name, shorthand string, value string, usage string) *string {\n\treturn CommandLine.StringP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string_array.go",
    "content": "package pflag\n\n// -- stringArray Value\ntype stringArrayValue struct {\n\tvalue   *[]string\n\tchanged bool\n}\n\nfunc newStringArrayValue(val []string, p *[]string) *stringArrayValue {\n\tssv := new(stringArrayValue)\n\tssv.value = p\n\t*ssv.value = val\n\treturn ssv\n}\n\nfunc (s *stringArrayValue) Set(val string) error {\n\tif !s.changed {\n\t\t*s.value = []string{val}\n\t\ts.changed = true\n\t} else {\n\t\t*s.value = append(*s.value, val)\n\t}\n\treturn nil\n}\n\nfunc (s *stringArrayValue) Append(val string) error {\n\t*s.value = append(*s.value, val)\n\treturn nil\n}\n\nfunc (s *stringArrayValue) Replace(val []string) error {\n\tout := make([]string, len(val))\n\tfor i, d := range val {\n\t\tout[i] = d\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *stringArrayValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = d\n\t}\n\treturn out\n}\n\nfunc (s *stringArrayValue) Type() string {\n\treturn \"stringArray\"\n}\n\nfunc (s *stringArrayValue) String() string {\n\tstr, _ := writeAsCSV(*s.value)\n\treturn \"[\" + str + \"]\"\n}\n\nfunc stringArrayConv(sval string) (interface{}, error) {\n\tsval = sval[1 : len(sval)-1]\n\t// An empty string would cause a array with one (empty) string\n\tif len(sval) == 0 {\n\t\treturn []string{}, nil\n\t}\n\treturn readAsCSV(sval)\n}\n\n// GetStringArray return the []string value of a flag with the given name\nfunc (f *FlagSet) GetStringArray(name string) ([]string, error) {\n\tval, err := f.getFlagType(name, \"stringArray\", stringArrayConv)\n\tif err != nil {\n\t\treturn []string{}, err\n\t}\n\treturn val.([]string), nil\n}\n\n// StringArrayVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a []string variable in which to store the values of the multiple flags.\n// The value of each argument will not try to be separated by comma. Use a StringSlice for that.\nfunc (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) {\n\tf.VarP(newStringArrayValue(value, p), name, \"\", usage)\n}\n\n// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {\n\tf.VarP(newStringArrayValue(value, p), name, shorthand, usage)\n}\n\n// StringArrayVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a []string variable in which to store the value of the flag.\n// The value of each argument will not try to be separated by comma. Use a StringSlice for that.\nfunc StringArrayVar(p *[]string, name string, value []string, usage string) {\n\tCommandLine.VarP(newStringArrayValue(value, p), name, \"\", usage)\n}\n\n// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.\nfunc StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {\n\tCommandLine.VarP(newStringArrayValue(value, p), name, shorthand, usage)\n}\n\n// StringArray defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a []string variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma. Use a StringSlice for that.\nfunc (f *FlagSet) StringArray(name string, value []string, usage string) *[]string {\n\tp := []string{}\n\tf.StringArrayVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string {\n\tp := []string{}\n\tf.StringArrayVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// StringArray defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a []string variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma. Use a StringSlice for that.\nfunc StringArray(name string, value []string, usage string) *[]string {\n\treturn CommandLine.StringArrayP(name, \"\", value, usage)\n}\n\n// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.\nfunc StringArrayP(name, shorthand string, value []string, usage string) *[]string {\n\treturn CommandLine.StringArrayP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string_slice.go",
    "content": "package pflag\n\nimport (\n\t\"bytes\"\n\t\"encoding/csv\"\n\t\"strings\"\n)\n\n// -- stringSlice Value\ntype stringSliceValue struct {\n\tvalue   *[]string\n\tchanged bool\n}\n\nfunc newStringSliceValue(val []string, p *[]string) *stringSliceValue {\n\tssv := new(stringSliceValue)\n\tssv.value = p\n\t*ssv.value = val\n\treturn ssv\n}\n\nfunc readAsCSV(val string) ([]string, error) {\n\tif val == \"\" {\n\t\treturn []string{}, nil\n\t}\n\tstringReader := strings.NewReader(val)\n\tcsvReader := csv.NewReader(stringReader)\n\treturn csvReader.Read()\n}\n\nfunc writeAsCSV(vals []string) (string, error) {\n\tb := &bytes.Buffer{}\n\tw := csv.NewWriter(b)\n\terr := w.Write(vals)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tw.Flush()\n\treturn strings.TrimSuffix(b.String(), \"\\n\"), nil\n}\n\nfunc (s *stringSliceValue) Set(val string) error {\n\tv, err := readAsCSV(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !s.changed {\n\t\t*s.value = v\n\t} else {\n\t\t*s.value = append(*s.value, v...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *stringSliceValue) Type() string {\n\treturn \"stringSlice\"\n}\n\nfunc (s *stringSliceValue) String() string {\n\tstr, _ := writeAsCSV(*s.value)\n\treturn \"[\" + str + \"]\"\n}\n\nfunc (s *stringSliceValue) Append(val string) error {\n\t*s.value = append(*s.value, val)\n\treturn nil\n}\n\nfunc (s *stringSliceValue) Replace(val []string) error {\n\t*s.value = val\n\treturn nil\n}\n\nfunc (s *stringSliceValue) GetSlice() []string {\n\treturn *s.value\n}\n\nfunc stringSliceConv(sval string) (interface{}, error) {\n\tsval = sval[1 : len(sval)-1]\n\t// An empty string would cause a slice with one (empty) string\n\tif len(sval) == 0 {\n\t\treturn []string{}, nil\n\t}\n\treturn readAsCSV(sval)\n}\n\n// GetStringSlice return the []string value of a flag with the given name\nfunc (f *FlagSet) GetStringSlice(name string) ([]string, error) {\n\tval, err := f.getFlagType(name, \"stringSlice\", stringSliceConv)\n\tif err != nil {\n\t\treturn []string{}, err\n\t}\n\treturn val.([]string), nil\n}\n\n// StringSliceVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a []string variable in which to store the value of the flag.\n// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.\n// For example:\n//   --ss=\"v1,v2\" --ss=\"v3\"\n// will result in\n//   []string{\"v1\", \"v2\", \"v3\"}\nfunc (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) {\n\tf.VarP(newStringSliceValue(value, p), name, \"\", usage)\n}\n\n// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) {\n\tf.VarP(newStringSliceValue(value, p), name, shorthand, usage)\n}\n\n// StringSliceVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a []string variable in which to store the value of the flag.\n// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.\n// For example:\n//   --ss=\"v1,v2\" --ss=\"v3\"\n// will result in\n//   []string{\"v1\", \"v2\", \"v3\"}\nfunc StringSliceVar(p *[]string, name string, value []string, usage string) {\n\tCommandLine.VarP(newStringSliceValue(value, p), name, \"\", usage)\n}\n\n// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) {\n\tCommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage)\n}\n\n// StringSlice defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a []string variable that stores the value of the flag.\n// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.\n// For example:\n//   --ss=\"v1,v2\" --ss=\"v3\"\n// will result in\n//   []string{\"v1\", \"v2\", \"v3\"}\nfunc (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string {\n\tp := []string{}\n\tf.StringSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string {\n\tp := []string{}\n\tf.StringSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// StringSlice defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a []string variable that stores the value of the flag.\n// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.\n// For example:\n//   --ss=\"v1,v2\" --ss=\"v3\"\n// will result in\n//   []string{\"v1\", \"v2\", \"v3\"}\nfunc StringSlice(name string, value []string, usage string) *[]string {\n\treturn CommandLine.StringSliceP(name, \"\", value, usage)\n}\n\n// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc StringSliceP(name, shorthand string, value []string, usage string) *[]string {\n\treturn CommandLine.StringSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string_to_int.go",
    "content": "package pflag\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- stringToInt Value\ntype stringToIntValue struct {\n\tvalue   *map[string]int\n\tchanged bool\n}\n\nfunc newStringToIntValue(val map[string]int, p *map[string]int) *stringToIntValue {\n\tssv := new(stringToIntValue)\n\tssv.value = p\n\t*ssv.value = val\n\treturn ssv\n}\n\n// Format: a=1,b=2\nfunc (s *stringToIntValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make(map[string]int, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tvar err error\n\t\tout[kv[0]], err = strconv.Atoi(kv[1])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\tfor k, v := range out {\n\t\t\t(*s.value)[k] = v\n\t\t}\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *stringToIntValue) Type() string {\n\treturn \"stringToInt\"\n}\n\nfunc (s *stringToIntValue) String() string {\n\tvar buf bytes.Buffer\n\ti := 0\n\tfor k, v := range *s.value {\n\t\tif i > 0 {\n\t\t\tbuf.WriteRune(',')\n\t\t}\n\t\tbuf.WriteString(k)\n\t\tbuf.WriteRune('=')\n\t\tbuf.WriteString(strconv.Itoa(v))\n\t\ti++\n\t}\n\treturn \"[\" + buf.String() + \"]\"\n}\n\nfunc stringToIntConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// An empty string would cause an empty map\n\tif len(val) == 0 {\n\t\treturn map[string]int{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make(map[string]int, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tvar err error\n\t\tout[kv[0]], err = strconv.Atoi(kv[1])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn out, nil\n}\n\n// GetStringToInt return the map[string]int value of a flag with the given name\nfunc (f *FlagSet) GetStringToInt(name string) (map[string]int, error) {\n\tval, err := f.getFlagType(name, \"stringToInt\", stringToIntConv)\n\tif err != nil {\n\t\treturn map[string]int{}, err\n\t}\n\treturn val.(map[string]int), nil\n}\n\n// StringToIntVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a map[string]int variable in which to store the values of the multiple flags.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) {\n\tf.VarP(newStringToIntValue(value, p), name, \"\", usage)\n}\n\n// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) {\n\tf.VarP(newStringToIntValue(value, p), name, shorthand, usage)\n}\n\n// StringToIntVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a map[string]int variable in which to store the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToIntVar(p *map[string]int, name string, value map[string]int, usage string) {\n\tCommandLine.VarP(newStringToIntValue(value, p), name, \"\", usage)\n}\n\n// StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string) {\n\tCommandLine.VarP(newStringToIntValue(value, p), name, shorthand, usage)\n}\n\n// StringToInt defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]int variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToInt(name string, value map[string]int, usage string) *map[string]int {\n\tp := map[string]int{}\n\tf.StringToIntVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int {\n\tp := map[string]int{}\n\tf.StringToIntVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// StringToInt defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]int variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToInt(name string, value map[string]int, usage string) *map[string]int {\n\treturn CommandLine.StringToIntP(name, \"\", value, usage)\n}\n\n// StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int {\n\treturn CommandLine.StringToIntP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string_to_int64.go",
    "content": "package pflag\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- stringToInt64 Value\ntype stringToInt64Value struct {\n\tvalue   *map[string]int64\n\tchanged bool\n}\n\nfunc newStringToInt64Value(val map[string]int64, p *map[string]int64) *stringToInt64Value {\n\tssv := new(stringToInt64Value)\n\tssv.value = p\n\t*ssv.value = val\n\treturn ssv\n}\n\n// Format: a=1,b=2\nfunc (s *stringToInt64Value) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make(map[string]int64, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tvar err error\n\t\tout[kv[0]], err = strconv.ParseInt(kv[1], 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\tfor k, v := range out {\n\t\t\t(*s.value)[k] = v\n\t\t}\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *stringToInt64Value) Type() string {\n\treturn \"stringToInt64\"\n}\n\nfunc (s *stringToInt64Value) String() string {\n\tvar buf bytes.Buffer\n\ti := 0\n\tfor k, v := range *s.value {\n\t\tif i > 0 {\n\t\t\tbuf.WriteRune(',')\n\t\t}\n\t\tbuf.WriteString(k)\n\t\tbuf.WriteRune('=')\n\t\tbuf.WriteString(strconv.FormatInt(v, 10))\n\t\ti++\n\t}\n\treturn \"[\" + buf.String() + \"]\"\n}\n\nfunc stringToInt64Conv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// An empty string would cause an empty map\n\tif len(val) == 0 {\n\t\treturn map[string]int64{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make(map[string]int64, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tvar err error\n\t\tout[kv[0]], err = strconv.ParseInt(kv[1], 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn out, nil\n}\n\n// GetStringToInt64 return the map[string]int64 value of a flag with the given name\nfunc (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error) {\n\tval, err := f.getFlagType(name, \"stringToInt64\", stringToInt64Conv)\n\tif err != nil {\n\t\treturn map[string]int64{}, err\n\t}\n\treturn val.(map[string]int64), nil\n}\n\n// StringToInt64Var defines a string flag with specified name, default value, and usage string.\n// The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) {\n\tf.VarP(newStringToInt64Value(value, p), name, \"\", usage)\n}\n\n// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) {\n\tf.VarP(newStringToInt64Value(value, p), name, shorthand, usage)\n}\n\n// StringToInt64Var defines a string flag with specified name, default value, and usage string.\n// The argument p point64s to a map[string]int64 variable in which to store the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string) {\n\tCommandLine.VarP(newStringToInt64Value(value, p), name, \"\", usage)\n}\n\n// StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string) {\n\tCommandLine.VarP(newStringToInt64Value(value, p), name, shorthand, usage)\n}\n\n// StringToInt64 defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]int64 variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 {\n\tp := map[string]int64{}\n\tf.StringToInt64VarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 {\n\tp := map[string]int64{}\n\tf.StringToInt64VarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// StringToInt64 defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]int64 variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToInt64(name string, value map[string]int64, usage string) *map[string]int64 {\n\treturn CommandLine.StringToInt64P(name, \"\", value, usage)\n}\n\n// StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64 {\n\treturn CommandLine.StringToInt64P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/string_to_string.go",
    "content": "package pflag\n\nimport (\n\t\"bytes\"\n\t\"encoding/csv\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// -- stringToString Value\ntype stringToStringValue struct {\n\tvalue   *map[string]string\n\tchanged bool\n}\n\nfunc newStringToStringValue(val map[string]string, p *map[string]string) *stringToStringValue {\n\tssv := new(stringToStringValue)\n\tssv.value = p\n\t*ssv.value = val\n\treturn ssv\n}\n\n// Format: a=1,b=2\nfunc (s *stringToStringValue) Set(val string) error {\n\tvar ss []string\n\tn := strings.Count(val, \"=\")\n\tswitch n {\n\tcase 0:\n\t\treturn fmt.Errorf(\"%s must be formatted as key=value\", val)\n\tcase 1:\n\t\tss = append(ss, strings.Trim(val, `\"`))\n\tdefault:\n\t\tr := csv.NewReader(strings.NewReader(val))\n\t\tvar err error\n\t\tss, err = r.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tout := make(map[string]string, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tout[kv[0]] = kv[1]\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\tfor k, v := range out {\n\t\t\t(*s.value)[k] = v\n\t\t}\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *stringToStringValue) Type() string {\n\treturn \"stringToString\"\n}\n\nfunc (s *stringToStringValue) String() string {\n\tkeys := make([]string, 0, len(*s.value))\n\tfor k := range *s.value {\n\t\tkeys = append(keys, k)\n\t}\n\tsort.Strings(keys)\n\n\trecords := make([]string, 0, len(*s.value)>>1)\n\tfor _, k := range keys {\n\t\tv := (*s.value)[k]\n\t\trecords = append(records, k+\"=\"+v)\n\t}\n\n\tvar buf bytes.Buffer\n\tw := csv.NewWriter(&buf)\n\tif err := w.Write(records); err != nil {\n\t\tpanic(err)\n\t}\n\tw.Flush()\n\treturn \"[\" + strings.TrimSpace(buf.String()) + \"]\"\n}\n\nfunc stringToStringConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// An empty string would cause an empty map\n\tif len(val) == 0 {\n\t\treturn map[string]string{}, nil\n\t}\n\tr := csv.NewReader(strings.NewReader(val))\n\tss, err := r.Read()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tout := make(map[string]string, len(ss))\n\tfor _, pair := range ss {\n\t\tkv := strings.SplitN(pair, \"=\", 2)\n\t\tif len(kv) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"%s must be formatted as key=value\", pair)\n\t\t}\n\t\tout[kv[0]] = kv[1]\n\t}\n\treturn out, nil\n}\n\n// GetStringToString return the map[string]string value of a flag with the given name\nfunc (f *FlagSet) GetStringToString(name string) (map[string]string, error) {\n\tval, err := f.getFlagType(name, \"stringToString\", stringToStringConv)\n\tif err != nil {\n\t\treturn map[string]string{}, err\n\t}\n\treturn val.(map[string]string), nil\n}\n\n// StringToStringVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a map[string]string variable in which to store the values of the multiple flags.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) {\n\tf.VarP(newStringToStringValue(value, p), name, \"\", usage)\n}\n\n// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) {\n\tf.VarP(newStringToStringValue(value, p), name, shorthand, usage)\n}\n\n// StringToStringVar defines a string flag with specified name, default value, and usage string.\n// The argument p points to a map[string]string variable in which to store the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToStringVar(p *map[string]string, name string, value map[string]string, usage string) {\n\tCommandLine.VarP(newStringToStringValue(value, p), name, \"\", usage)\n}\n\n// StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string) {\n\tCommandLine.VarP(newStringToStringValue(value, p), name, shorthand, usage)\n}\n\n// StringToString defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]string variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string {\n\tp := map[string]string{}\n\tf.StringToStringVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string {\n\tp := map[string]string{}\n\tf.StringToStringVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// StringToString defines a string flag with specified name, default value, and usage string.\n// The return value is the address of a map[string]string variable that stores the value of the flag.\n// The value of each argument will not try to be separated by comma\nfunc StringToString(name string, value map[string]string, usage string) *map[string]string {\n\treturn CommandLine.StringToStringP(name, \"\", value, usage)\n}\n\n// StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash.\nfunc StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string {\n\treturn CommandLine.StringToStringP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/text.go",
    "content": "package pflag\n\nimport (\n\t\"encoding\"\n\t\"fmt\"\n\t\"reflect\"\n)\n\n// following is copied from go 1.23.4 flag.go\ntype textValue struct{ p encoding.TextUnmarshaler }\n\nfunc newTextValue(val encoding.TextMarshaler, p encoding.TextUnmarshaler) textValue {\n\tptrVal := reflect.ValueOf(p)\n\tif ptrVal.Kind() != reflect.Ptr {\n\t\tpanic(\"variable value type must be a pointer\")\n\t}\n\tdefVal := reflect.ValueOf(val)\n\tif defVal.Kind() == reflect.Ptr {\n\t\tdefVal = defVal.Elem()\n\t}\n\tif defVal.Type() != ptrVal.Type().Elem() {\n\t\tpanic(fmt.Sprintf(\"default type does not match variable type: %v != %v\", defVal.Type(), ptrVal.Type().Elem()))\n\t}\n\tptrVal.Elem().Set(defVal)\n\treturn textValue{p}\n}\n\nfunc (v textValue) Set(s string) error {\n\treturn v.p.UnmarshalText([]byte(s))\n}\n\nfunc (v textValue) Get() interface{} {\n\treturn v.p\n}\n\nfunc (v textValue) String() string {\n\tif m, ok := v.p.(encoding.TextMarshaler); ok {\n\t\tif b, err := m.MarshalText(); err == nil {\n\t\t\treturn string(b)\n\t\t}\n\t}\n\treturn \"\"\n}\n\n//end of copy\n\nfunc (v textValue) Type() string {\n\treturn reflect.ValueOf(v.p).Type().Name()\n}\n\n// GetText set out, which implements encoding.UnmarshalText, to the value of a flag with given name\nfunc (f *FlagSet) GetText(name string, out encoding.TextUnmarshaler) error {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\treturn fmt.Errorf(\"flag accessed but not defined: %s\", name)\n\t}\n\tif flag.Value.Type() != reflect.TypeOf(out).Name() {\n\t\treturn fmt.Errorf(\"trying to get %s value of flag of type %s\", reflect.TypeOf(out).Name(), flag.Value.Type())\n\t}\n\treturn out.UnmarshalText([]byte(flag.Value.String()))\n}\n\n// TextVar defines a flag with a specified name, default value, and usage string. The argument p must be a pointer to a variable that will hold the value of the flag, and p must implement encoding.TextUnmarshaler. If the flag is used, the flag value will be passed to p's UnmarshalText method. The type of the default value must be the same as the type of p.\nfunc (f *FlagSet) TextVar(p encoding.TextUnmarshaler, name string, value encoding.TextMarshaler, usage string) {\n\tf.VarP(newTextValue(value, p), name, \"\", usage)\n}\n\n// TextVarP is like TextVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) TextVarP(p encoding.TextUnmarshaler, name, shorthand string, value encoding.TextMarshaler, usage string) {\n\tf.VarP(newTextValue(value, p), name, shorthand, usage)\n}\n\n// TextVar defines a flag with a specified name, default value, and usage string. The argument p must be a pointer to a variable that will hold the value of the flag, and p must implement encoding.TextUnmarshaler. If the flag is used, the flag value will be passed to p's UnmarshalText method. The type of the default value must be the same as the type of p.\nfunc TextVar(p encoding.TextUnmarshaler, name string, value encoding.TextMarshaler, usage string) {\n\tCommandLine.VarP(newTextValue(value, p), name, \"\", usage)\n}\n\n// TextVarP is like TextVar, but accepts a shorthand letter that can be used after a single dash.\nfunc TextVarP(p encoding.TextUnmarshaler, name, shorthand string, value encoding.TextMarshaler, usage string) {\n\tCommandLine.VarP(newTextValue(value, p), name, shorthand, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/time.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n)\n\n// TimeValue adapts time.Time for use as a flag.\ntype timeValue struct {\n\t*time.Time\n\tformats []string\n}\n\nfunc newTimeValue(val time.Time, p *time.Time, formats []string) *timeValue {\n\t*p = val\n\treturn &timeValue{\n\t\tTime:    p,\n\t\tformats: formats,\n\t}\n}\n\n// Set time.Time value from string based on accepted formats.\nfunc (d *timeValue) Set(s string) error {\n\ts = strings.TrimSpace(s)\n\tfor _, f := range d.formats {\n\t\tv, err := time.Parse(f, s)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\t*d.Time = v\n\t\treturn nil\n\t}\n\n\tformatsString := \"\"\n\tfor i, f := range d.formats {\n\t\tif i > 0 {\n\t\t\tformatsString += \", \"\n\t\t}\n\t\tformatsString += fmt.Sprintf(\"`%s`\", f)\n\t}\n\n\treturn fmt.Errorf(\"invalid time format `%s` must be one of: %s\", s, formatsString)\n}\n\n// Type name for time.Time flags.\nfunc (d *timeValue) Type() string {\n\treturn \"time\"\n}\n\nfunc (d *timeValue) String() string {\n\tif d.Time.IsZero() {\n\t\treturn \"\"\n\t} else {\n\t\treturn d.Time.Format(time.RFC3339Nano)\n\t}\n}\n\n// GetTime return the time value of a flag with the given name\nfunc (f *FlagSet) GetTime(name string) (time.Time, error) {\n\tflag := f.Lookup(name)\n\tif flag == nil {\n\t\terr := fmt.Errorf(\"flag accessed but not defined: %s\", name)\n\t\treturn time.Time{}, err\n\t}\n\n\tif flag.Value.Type() != \"time\" {\n\t\terr := fmt.Errorf(\"trying to get %s value of flag of type %s\", \"time\", flag.Value.Type())\n\t\treturn time.Time{}, err\n\t}\n\n\tval, ok := flag.Value.(*timeValue)\n\tif !ok {\n\t\treturn time.Time{}, fmt.Errorf(\"value %s is not a time\", flag.Value)\n\t}\n\n\treturn *val.Time, nil\n}\n\n// TimeVar defines a time.Time flag with specified name, default value, and usage string.\n// The argument p points to a time.Time variable in which to store the value of the flag.\nfunc (f *FlagSet) TimeVar(p *time.Time, name string, value time.Time, formats []string, usage string) {\n\tf.TimeVarP(p, name, \"\", value, formats, usage)\n}\n\n// TimeVarP is like TimeVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) TimeVarP(p *time.Time, name, shorthand string, value time.Time, formats []string, usage string) {\n\tf.VarP(newTimeValue(value, p, formats), name, shorthand, usage)\n}\n\n// TimeVar defines a time.Time flag with specified name, default value, and usage string.\n// The argument p points to a time.Time variable in which to store the value of the flag.\nfunc TimeVar(p *time.Time, name string, value time.Time, formats []string, usage string) {\n\tCommandLine.TimeVarP(p, name, \"\", value, formats, usage)\n}\n\n// TimeVarP is like TimeVar, but accepts a shorthand letter that can be used after a single dash.\nfunc TimeVarP(p *time.Time, name, shorthand string, value time.Time, formats []string, usage string) {\n\tCommandLine.VarP(newTimeValue(value, p, formats), name, shorthand, usage)\n}\n\n// Time defines a time.Time flag with specified name, default value, and usage string.\n// The return value is the address of a time.Time variable that stores the value of the flag.\nfunc (f *FlagSet) Time(name string, value time.Time, formats []string, usage string) *time.Time {\n\treturn f.TimeP(name, \"\", value, formats, usage)\n}\n\n// TimeP is like Time, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) TimeP(name, shorthand string, value time.Time, formats []string, usage string) *time.Time {\n\tp := new(time.Time)\n\tf.TimeVarP(p, name, shorthand, value, formats, usage)\n\treturn p\n}\n\n// Time defines a time.Time flag with specified name, default value, and usage string.\n// The return value is the address of a time.Time variable that stores the value of the flag.\nfunc Time(name string, value time.Time, formats []string, usage string) *time.Time {\n\treturn CommandLine.TimeP(name, \"\", value, formats, usage)\n}\n\n// TimeP is like Time, but accepts a shorthand letter that can be used after a single dash.\nfunc TimeP(name, shorthand string, value time.Time, formats []string, usage string) *time.Time {\n\treturn CommandLine.TimeP(name, shorthand, value, formats, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- uint Value\ntype uintValue uint\n\nfunc newUintValue(val uint, p *uint) *uintValue {\n\t*p = val\n\treturn (*uintValue)(p)\n}\n\nfunc (i *uintValue) Set(s string) error {\n\tv, err := strconv.ParseUint(s, 0, 64)\n\t*i = uintValue(v)\n\treturn err\n}\n\nfunc (i *uintValue) Type() string {\n\treturn \"uint\"\n}\n\nfunc (i *uintValue) String() string { return strconv.FormatUint(uint64(*i), 10) }\n\nfunc uintConv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseUint(sval, 0, 0)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint(v), nil\n}\n\n// GetUint return the uint value of a flag with the given name\nfunc (f *FlagSet) GetUint(name string) (uint, error) {\n\tval, err := f.getFlagType(name, \"uint\", uintConv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(uint), nil\n}\n\n// UintVar defines a uint flag with specified name, default value, and usage string.\n// The argument p points to a uint variable in which to store the value of the flag.\nfunc (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) {\n\tf.VarP(newUintValue(value, p), name, \"\", usage)\n}\n\n// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) {\n\tf.VarP(newUintValue(value, p), name, shorthand, usage)\n}\n\n// UintVar defines a uint flag with specified name, default value, and usage string.\n// The argument p points to a uint  variable in which to store the value of the flag.\nfunc UintVar(p *uint, name string, value uint, usage string) {\n\tCommandLine.VarP(newUintValue(value, p), name, \"\", usage)\n}\n\n// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.\nfunc UintVarP(p *uint, name, shorthand string, value uint, usage string) {\n\tCommandLine.VarP(newUintValue(value, p), name, shorthand, usage)\n}\n\n// Uint defines a uint flag with specified name, default value, and usage string.\n// The return value is the address of a uint  variable that stores the value of the flag.\nfunc (f *FlagSet) Uint(name string, value uint, usage string) *uint {\n\tp := new(uint)\n\tf.UintVarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint {\n\tp := new(uint)\n\tf.UintVarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Uint defines a uint flag with specified name, default value, and usage string.\n// The return value is the address of a uint  variable that stores the value of the flag.\nfunc Uint(name string, value uint, usage string) *uint {\n\treturn CommandLine.UintP(name, \"\", value, usage)\n}\n\n// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.\nfunc UintP(name, shorthand string, value uint, usage string) *uint {\n\treturn CommandLine.UintP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint16.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- uint16 value\ntype uint16Value uint16\n\nfunc newUint16Value(val uint16, p *uint16) *uint16Value {\n\t*p = val\n\treturn (*uint16Value)(p)\n}\n\nfunc (i *uint16Value) Set(s string) error {\n\tv, err := strconv.ParseUint(s, 0, 16)\n\t*i = uint16Value(v)\n\treturn err\n}\n\nfunc (i *uint16Value) Type() string {\n\treturn \"uint16\"\n}\n\nfunc (i *uint16Value) String() string { return strconv.FormatUint(uint64(*i), 10) }\n\nfunc uint16Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseUint(sval, 0, 16)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint16(v), nil\n}\n\n// GetUint16 return the uint16 value of a flag with the given name\nfunc (f *FlagSet) GetUint16(name string) (uint16, error) {\n\tval, err := f.getFlagType(name, \"uint16\", uint16Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(uint16), nil\n}\n\n// Uint16Var defines a uint flag with specified name, default value, and usage string.\n// The argument p points to a uint variable in which to store the value of the flag.\nfunc (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) {\n\tf.VarP(newUint16Value(value, p), name, \"\", usage)\n}\n\n// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {\n\tf.VarP(newUint16Value(value, p), name, shorthand, usage)\n}\n\n// Uint16Var defines a uint flag with specified name, default value, and usage string.\n// The argument p points to a uint  variable in which to store the value of the flag.\nfunc Uint16Var(p *uint16, name string, value uint16, usage string) {\n\tCommandLine.VarP(newUint16Value(value, p), name, \"\", usage)\n}\n\n// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {\n\tCommandLine.VarP(newUint16Value(value, p), name, shorthand, usage)\n}\n\n// Uint16 defines a uint flag with specified name, default value, and usage string.\n// The return value is the address of a uint  variable that stores the value of the flag.\nfunc (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 {\n\tp := new(uint16)\n\tf.Uint16VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 {\n\tp := new(uint16)\n\tf.Uint16VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Uint16 defines a uint flag with specified name, default value, and usage string.\n// The return value is the address of a uint  variable that stores the value of the flag.\nfunc Uint16(name string, value uint16, usage string) *uint16 {\n\treturn CommandLine.Uint16P(name, \"\", value, usage)\n}\n\n// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint16P(name, shorthand string, value uint16, usage string) *uint16 {\n\treturn CommandLine.Uint16P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint32.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- uint32 value\ntype uint32Value uint32\n\nfunc newUint32Value(val uint32, p *uint32) *uint32Value {\n\t*p = val\n\treturn (*uint32Value)(p)\n}\n\nfunc (i *uint32Value) Set(s string) error {\n\tv, err := strconv.ParseUint(s, 0, 32)\n\t*i = uint32Value(v)\n\treturn err\n}\n\nfunc (i *uint32Value) Type() string {\n\treturn \"uint32\"\n}\n\nfunc (i *uint32Value) String() string { return strconv.FormatUint(uint64(*i), 10) }\n\nfunc uint32Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseUint(sval, 0, 32)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint32(v), nil\n}\n\n// GetUint32 return the uint32 value of a flag with the given name\nfunc (f *FlagSet) GetUint32(name string) (uint32, error) {\n\tval, err := f.getFlagType(name, \"uint32\", uint32Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(uint32), nil\n}\n\n// Uint32Var defines a uint32 flag with specified name, default value, and usage string.\n// The argument p points to a uint32 variable in which to store the value of the flag.\nfunc (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) {\n\tf.VarP(newUint32Value(value, p), name, \"\", usage)\n}\n\n// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {\n\tf.VarP(newUint32Value(value, p), name, shorthand, usage)\n}\n\n// Uint32Var defines a uint32 flag with specified name, default value, and usage string.\n// The argument p points to a uint32  variable in which to store the value of the flag.\nfunc Uint32Var(p *uint32, name string, value uint32, usage string) {\n\tCommandLine.VarP(newUint32Value(value, p), name, \"\", usage)\n}\n\n// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {\n\tCommandLine.VarP(newUint32Value(value, p), name, shorthand, usage)\n}\n\n// Uint32 defines a uint32 flag with specified name, default value, and usage string.\n// The return value is the address of a uint32  variable that stores the value of the flag.\nfunc (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 {\n\tp := new(uint32)\n\tf.Uint32VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 {\n\tp := new(uint32)\n\tf.Uint32VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Uint32 defines a uint32 flag with specified name, default value, and usage string.\n// The return value is the address of a uint32  variable that stores the value of the flag.\nfunc Uint32(name string, value uint32, usage string) *uint32 {\n\treturn CommandLine.Uint32P(name, \"\", value, usage)\n}\n\n// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint32P(name, shorthand string, value uint32, usage string) *uint32 {\n\treturn CommandLine.Uint32P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint64.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- uint64 Value\ntype uint64Value uint64\n\nfunc newUint64Value(val uint64, p *uint64) *uint64Value {\n\t*p = val\n\treturn (*uint64Value)(p)\n}\n\nfunc (i *uint64Value) Set(s string) error {\n\tv, err := strconv.ParseUint(s, 0, 64)\n\t*i = uint64Value(v)\n\treturn err\n}\n\nfunc (i *uint64Value) Type() string {\n\treturn \"uint64\"\n}\n\nfunc (i *uint64Value) String() string { return strconv.FormatUint(uint64(*i), 10) }\n\nfunc uint64Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseUint(sval, 0, 64)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint64(v), nil\n}\n\n// GetUint64 return the uint64 value of a flag with the given name\nfunc (f *FlagSet) GetUint64(name string) (uint64, error) {\n\tval, err := f.getFlagType(name, \"uint64\", uint64Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(uint64), nil\n}\n\n// Uint64Var defines a uint64 flag with specified name, default value, and usage string.\n// The argument p points to a uint64 variable in which to store the value of the flag.\nfunc (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) {\n\tf.VarP(newUint64Value(value, p), name, \"\", usage)\n}\n\n// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {\n\tf.VarP(newUint64Value(value, p), name, shorthand, usage)\n}\n\n// Uint64Var defines a uint64 flag with specified name, default value, and usage string.\n// The argument p points to a uint64 variable in which to store the value of the flag.\nfunc Uint64Var(p *uint64, name string, value uint64, usage string) {\n\tCommandLine.VarP(newUint64Value(value, p), name, \"\", usage)\n}\n\n// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {\n\tCommandLine.VarP(newUint64Value(value, p), name, shorthand, usage)\n}\n\n// Uint64 defines a uint64 flag with specified name, default value, and usage string.\n// The return value is the address of a uint64 variable that stores the value of the flag.\nfunc (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 {\n\tp := new(uint64)\n\tf.Uint64VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 {\n\tp := new(uint64)\n\tf.Uint64VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Uint64 defines a uint64 flag with specified name, default value, and usage string.\n// The return value is the address of a uint64 variable that stores the value of the flag.\nfunc Uint64(name string, value uint64, usage string) *uint64 {\n\treturn CommandLine.Uint64P(name, \"\", value, usage)\n}\n\n// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint64P(name, shorthand string, value uint64, usage string) *uint64 {\n\treturn CommandLine.Uint64P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint8.go",
    "content": "package pflag\n\nimport \"strconv\"\n\n// -- uint8 Value\ntype uint8Value uint8\n\nfunc newUint8Value(val uint8, p *uint8) *uint8Value {\n\t*p = val\n\treturn (*uint8Value)(p)\n}\n\nfunc (i *uint8Value) Set(s string) error {\n\tv, err := strconv.ParseUint(s, 0, 8)\n\t*i = uint8Value(v)\n\treturn err\n}\n\nfunc (i *uint8Value) Type() string {\n\treturn \"uint8\"\n}\n\nfunc (i *uint8Value) String() string { return strconv.FormatUint(uint64(*i), 10) }\n\nfunc uint8Conv(sval string) (interface{}, error) {\n\tv, err := strconv.ParseUint(sval, 0, 8)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint8(v), nil\n}\n\n// GetUint8 return the uint8 value of a flag with the given name\nfunc (f *FlagSet) GetUint8(name string) (uint8, error) {\n\tval, err := f.getFlagType(name, \"uint8\", uint8Conv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn val.(uint8), nil\n}\n\n// Uint8Var defines a uint8 flag with specified name, default value, and usage string.\n// The argument p points to a uint8 variable in which to store the value of the flag.\nfunc (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) {\n\tf.VarP(newUint8Value(value, p), name, \"\", usage)\n}\n\n// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {\n\tf.VarP(newUint8Value(value, p), name, shorthand, usage)\n}\n\n// Uint8Var defines a uint8 flag with specified name, default value, and usage string.\n// The argument p points to a uint8 variable in which to store the value of the flag.\nfunc Uint8Var(p *uint8, name string, value uint8, usage string) {\n\tCommandLine.VarP(newUint8Value(value, p), name, \"\", usage)\n}\n\n// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {\n\tCommandLine.VarP(newUint8Value(value, p), name, shorthand, usage)\n}\n\n// Uint8 defines a uint8 flag with specified name, default value, and usage string.\n// The return value is the address of a uint8 variable that stores the value of the flag.\nfunc (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 {\n\tp := new(uint8)\n\tf.Uint8VarP(p, name, \"\", value, usage)\n\treturn p\n}\n\n// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 {\n\tp := new(uint8)\n\tf.Uint8VarP(p, name, shorthand, value, usage)\n\treturn p\n}\n\n// Uint8 defines a uint8 flag with specified name, default value, and usage string.\n// The return value is the address of a uint8 variable that stores the value of the flag.\nfunc Uint8(name string, value uint8, usage string) *uint8 {\n\treturn CommandLine.Uint8P(name, \"\", value, usage)\n}\n\n// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.\nfunc Uint8P(name, shorthand string, value uint8, usage string) *uint8 {\n\treturn CommandLine.Uint8P(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/spf13/pflag/uint_slice.go",
    "content": "package pflag\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// -- uintSlice Value\ntype uintSliceValue struct {\n\tvalue   *[]uint\n\tchanged bool\n}\n\nfunc newUintSliceValue(val []uint, p *[]uint) *uintSliceValue {\n\tuisv := new(uintSliceValue)\n\tuisv.value = p\n\t*uisv.value = val\n\treturn uisv\n}\n\nfunc (s *uintSliceValue) Set(val string) error {\n\tss := strings.Split(val, \",\")\n\tout := make([]uint, len(ss))\n\tfor i, d := range ss {\n\t\tu, err := strconv.ParseUint(d, 10, 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tout[i] = uint(u)\n\t}\n\tif !s.changed {\n\t\t*s.value = out\n\t} else {\n\t\t*s.value = append(*s.value, out...)\n\t}\n\ts.changed = true\n\treturn nil\n}\n\nfunc (s *uintSliceValue) Type() string {\n\treturn \"uintSlice\"\n}\n\nfunc (s *uintSliceValue) String() string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = fmt.Sprintf(\"%d\", d)\n\t}\n\treturn \"[\" + strings.Join(out, \",\") + \"]\"\n}\n\nfunc (s *uintSliceValue) fromString(val string) (uint, error) {\n\tt, err := strconv.ParseUint(val, 10, 0)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn uint(t), nil\n}\n\nfunc (s *uintSliceValue) toString(val uint) string {\n\treturn fmt.Sprintf(\"%d\", val)\n}\n\nfunc (s *uintSliceValue) Append(val string) error {\n\ti, err := s.fromString(val)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*s.value = append(*s.value, i)\n\treturn nil\n}\n\nfunc (s *uintSliceValue) Replace(val []string) error {\n\tout := make([]uint, len(val))\n\tfor i, d := range val {\n\t\tvar err error\n\t\tout[i], err = s.fromString(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t*s.value = out\n\treturn nil\n}\n\nfunc (s *uintSliceValue) GetSlice() []string {\n\tout := make([]string, len(*s.value))\n\tfor i, d := range *s.value {\n\t\tout[i] = s.toString(d)\n\t}\n\treturn out\n}\n\nfunc uintSliceConv(val string) (interface{}, error) {\n\tval = strings.Trim(val, \"[]\")\n\t// Empty string would cause a slice with one (empty) entry\n\tif len(val) == 0 {\n\t\treturn []uint{}, nil\n\t}\n\tss := strings.Split(val, \",\")\n\tout := make([]uint, len(ss))\n\tfor i, d := range ss {\n\t\tu, err := strconv.ParseUint(d, 10, 0)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tout[i] = uint(u)\n\t}\n\treturn out, nil\n}\n\n// GetUintSlice returns the []uint value of a flag with the given name.\nfunc (f *FlagSet) GetUintSlice(name string) ([]uint, error) {\n\tval, err := f.getFlagType(name, \"uintSlice\", uintSliceConv)\n\tif err != nil {\n\t\treturn []uint{}, err\n\t}\n\treturn val.([]uint), nil\n}\n\n// UintSliceVar defines a uintSlice flag with specified name, default value, and usage string.\n// The argument p points to a []uint variable in which to store the value of the flag.\nfunc (f *FlagSet) UintSliceVar(p *[]uint, name string, value []uint, usage string) {\n\tf.VarP(newUintSliceValue(value, p), name, \"\", usage)\n}\n\n// UintSliceVarP is like UintSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) {\n\tf.VarP(newUintSliceValue(value, p), name, shorthand, usage)\n}\n\n// UintSliceVar defines a uint[] flag with specified name, default value, and usage string.\n// The argument p points to a uint[] variable in which to store the value of the flag.\nfunc UintSliceVar(p *[]uint, name string, value []uint, usage string) {\n\tCommandLine.VarP(newUintSliceValue(value, p), name, \"\", usage)\n}\n\n// UintSliceVarP is like the UintSliceVar, but accepts a shorthand letter that can be used after a single dash.\nfunc UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string) {\n\tCommandLine.VarP(newUintSliceValue(value, p), name, shorthand, usage)\n}\n\n// UintSlice defines a []uint flag with specified name, default value, and usage string.\n// The return value is the address of a []uint variable that stores the value of the flag.\nfunc (f *FlagSet) UintSlice(name string, value []uint, usage string) *[]uint {\n\tp := []uint{}\n\tf.UintSliceVarP(&p, name, \"\", value, usage)\n\treturn &p\n}\n\n// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc (f *FlagSet) UintSliceP(name, shorthand string, value []uint, usage string) *[]uint {\n\tp := []uint{}\n\tf.UintSliceVarP(&p, name, shorthand, value, usage)\n\treturn &p\n}\n\n// UintSlice defines a []uint flag with specified name, default value, and usage string.\n// The return value is the address of a []uint variable that stores the value of the flag.\nfunc UintSlice(name string, value []uint, usage string) *[]uint {\n\treturn CommandLine.UintSliceP(name, \"\", value, usage)\n}\n\n// UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash.\nfunc UintSliceP(name, shorthand string, value []uint, usage string) *[]uint {\n\treturn CommandLine.UintSliceP(name, shorthand, value, usage)\n}\n"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/.gitignore",
    "content": "*~\npkcs11uri\n"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/.travis.yml",
    "content": "dist: bionic\nlanguage: go\n\nos:\n- linux\n\ngo:\n  - \"1.19.x\"\n\nmatrix:\n  include:\n    - os: linux\n\naddons:\n  apt:\n    packages:\n      - softhsm2\n\ninstall:\n  - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.2\n\nscript:\n  - make\n  - make check\n  - make test\n"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/Makefile",
    "content": "#   Copyright IBM Corporation, 2020\n\n#   Licensed under the Apache License, Version 2.0 (the \"License\");\n#   you may not use this file except in compliance with the License.\n#   You may obtain a copy of the License at\n\n#       http://www.apache.org/licenses/LICENSE-2.0\n\n#   Unless required by applicable law or agreed to in writing, software\n#   distributed under the License is distributed on an \"AS IS\" BASIS,\n#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#   See the License for the specific language governing permissions and\n#   limitations under the License.\n\n.PHONY: check build test\n\nall: build\n\nFORCE:\n\ncheck:\n\tgolangci-lint run\n\nbuild:\n\tgo build ./...\n\ntest:\n\tgo test ./... -test.v\n"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/README.md",
    "content": "# go-pkcs11uri\n\nWelcome to the go-pkcs11uri library. The implementation follows [RFC 7512](https://tools.ietf.org/html/rfc7512) and this [errata](https://www.rfc-editor.org/errata/rfc7512).\n\n# Exampe usage:\n\nThe following example builds on this library [here](https://github.com/miekg/pkcs11) and are using softhsm2 on Fedora.\n\n## Example\n\nThis example program extending the one found [here](https://github.com/miekg/pkcs11/blob/master/README.md#examples):\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/miekg/pkcs11\"\n\tpkcs11uri \"github.com/stefanberger/go-pkcs11uri\"\n)\n\nfunc main() {\n\tif len(os.Args) < 2 {\n\t\tpanic(\"Missing pkcs11 URI argument\")\n\t}\n\turistr := os.Args[1]\n\n\turi, err := pkcs11uri.New()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\terr = uri.Parse(uristr)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tmodule, err := uri.GetModule()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tslot, ok := uri.GetPathAttribute(\"slot-id\", false)\n\tif !ok {\n\t\tpanic(\"No slot-id in pkcs11 URI\")\n\t}\n\tslotid, err := strconv.Atoi(slot)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tpin, err := uri.GetPIN()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tp := pkcs11.New(module)\n\terr = p.Initialize()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdefer p.Destroy()\n\tdefer p.Finalize()\n\n\tsession, err := p.OpenSession(uint(slotid), pkcs11.CKF_SERIAL_SESSION|pkcs11.CKF_RW_SESSION)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer p.CloseSession(session)\n\n\terr = p.Login(session, pkcs11.CKU_USER, pin)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer p.Logout(session)\n\n\tp.DigestInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_SHA_1, nil)})\n\thash, err := p.Digest(session, []byte(\"this is a string\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor _, d := range hash {\n\t\tfmt.Printf(\"%x\", d)\n\t}\n\tfmt.Println()\n}\n```\n\n## Exampe Usage\n\n```\n$ sudo softhsm2-util --init-token --slot 1 --label test --pin 1234 --so-pin 1234\nThe token has been initialized and is reassigned to slot 2053753261\n$ go build ./...\n$ sudo ./pkcs11-example 'pkcs11:slot-id=2053753261?module-path=/usr/lib64/pkcs11/libsofthsm2.so&pin-value=1234'\n517592df8fec3ad146a79a9af153db2a4d784ec5\n```\n\n"
  },
  {
    "path": "vendor/github.com/stefanberger/go-pkcs11uri/pkcs11uri.go",
    "content": "/*\n   (c) Copyright IBM Corporation, 2020\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\npackage pkcs11uri\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Pkcs11URI holds a pkcs11 URI object\ntype Pkcs11URI struct {\n\t// path and query attributes may have custom attributes that either\n\t// have to be in the query or in the path part, so we use two maps\n\tpathAttributes  map[string]string\n\tqueryAttributes map[string]string\n\t// directories to search for pkcs11 modules\n\tmoduleDirectories []string\n\t// file paths of allowed pkcs11 modules\n\tallowedModulePaths []string\n\t// whether any module is allowed to be loaded\n\tallowAnyModule bool\n\t// A map of environment variables needed by the pkcs11 module using this URI.\n\t// This map is not needed by this implementation but is there for convenience.\n\tenv map[string]string\n}\n\n// upper character hex digits needed for pct-encoding\nconst hex = \"0123456789ABCDEF\"\n\n// escapeAll pct-escapes all characters in the string\nfunc escapeAll(s string) string {\n\tres := make([]byte, len(s)*3)\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tres[j] = '%'\n\t\tres[j+1] = hex[c>>4]\n\t\tres[j+2] = hex[c&0xf]\n\t\tj += 3\n\t}\n\treturn string(res)\n}\n\n// escape pct-escapes the path and query part of the pkcs11 URI following the different rules of the\n// path and query part as decribed in RFC 7512 sec. 2.3\nfunc escape(s string, isPath bool) string {\n\tres := make([]byte, len(s)*3)\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\t// unreserved per RFC 3986 sec. 2.3\n\t\tif (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') {\n\t\t\tres[j] = c\n\t\t} else if isPath && c == '&' {\n\t\t\tres[j] = c\n\t\t} else if !isPath && (c == '/' || c == '?' || c == '|') {\n\t\t\tres[j] = c\n\t\t} else {\n\t\t\tswitch c {\n\t\t\tcase '-', '.', '_', '~': // unreserved per RFC 3986 sec. 2.3\n\t\t\t\tres[j] = c\n\t\t\tcase ':', '[', ']', '@', '!', '$', '\\'', '(', ')', '*', '+', ',', '=':\n\t\t\t\tres[j] = c\n\t\t\tdefault:\n\t\t\t\tres[j] = '%'\n\t\t\t\tres[j+1] = hex[c>>4]\n\t\t\t\tres[j+2] = hex[c&0xf]\n\t\t\t\tj += 2\n\t\t\t}\n\t\t}\n\t\tj++\n\t}\n\treturn string(res[:j])\n}\n\n// New creates a new Pkcs11URI object\nfunc New() *Pkcs11URI {\n\treturn &Pkcs11URI{\n\t\tpathAttributes:  make(map[string]string),\n\t\tqueryAttributes: make(map[string]string),\n\t\tenv:             make(map[string]string),\n\t}\n}\n\nfunc (uri *Pkcs11URI) setAttribute(attrMap map[string]string, name, value string) error {\n\tv, err := url.PathUnescape(value)\n\tif err != nil {\n\t\treturn err\n\t}\n\tattrMap[name] = v\n\treturn nil\n}\n\n// GetPathAttribute returns the value of a path attribute in unescaped form or\n// pct-encoded form\nfunc (uri *Pkcs11URI) GetPathAttribute(name string, pctencode bool) (string, bool) {\n\tv, ok := uri.pathAttributes[name]\n\tif ok && pctencode {\n\t\tv = escape(v, true)\n\t}\n\treturn v, ok\n}\n\n// SetPathAttribute sets the value for a path attribute; this function may return an error\n// if the given value cannot be pct-unescaped\nfunc (uri *Pkcs11URI) SetPathAttribute(name, value string) error {\n\treturn uri.setAttribute(uri.pathAttributes, name, value)\n}\n\n// SetPathAttributeUnencoded sets the value for a path attribute given as byte[].\n// The value must not have been pct-encoded already.\nfunc (uri *Pkcs11URI) SetPathAttributeUnencoded(name string, value []byte) {\n\turi.pathAttributes[name] = string(value)\n}\n\n// AddPathAttribute adds a path attribute; it returns an error if an attribute with the same\n// name already existed or if the given value cannot be pct-unescaped\nfunc (uri *Pkcs11URI) AddPathAttribute(name, value string) error {\n\tif _, ok := uri.pathAttributes[name]; ok {\n\t\treturn errors.New(\"duplicate path attribute\")\n\t}\n\treturn uri.SetPathAttribute(name, value)\n}\n\n// AddPathAttributeUnencoded adds a path attribute given as byte[] which must not already be pct-encoded;\n// it returns an error if an attribute with the same name already existed\nfunc (uri *Pkcs11URI) AddPathAttributeUnencoded(name string, value []byte) error {\n\tif _, ok := uri.pathAttributes[name]; ok {\n\t\treturn errors.New(\"duplicate path attribute\")\n\t}\n\turi.SetPathAttributeUnencoded(name, value)\n\treturn nil\n}\n\n// RemovePathAttribute removes a path attribute\nfunc (uri *Pkcs11URI) RemovePathAttribute(name string) {\n\tdelete(uri.pathAttributes, name)\n}\n\n// AddEnv adds an environment variable for the pkcs11 module\nfunc (uri *Pkcs11URI) AddEnv(name, value string) {\n\turi.env[name] = value\n}\n\n// SetEnvMap sets the environment variables for the pkcs11 module\nfunc (uri *Pkcs11URI) SetEnvMap(env map[string]string) {\n\turi.env = env\n}\n\n// GetEnvMap returns the map of environment variables\nfunc (uri *Pkcs11URI) GetEnvMap() map[string]string {\n\treturn uri.env\n}\n\n// GetQueryAttribute returns the value of a query attribute in unescaped or\n// pct-encoded form\nfunc (uri *Pkcs11URI) GetQueryAttribute(name string, pctencode bool) (string, bool) {\n\tv, ok := uri.queryAttributes[name]\n\tif ok && pctencode {\n\t\tv = escape(v, false)\n\t}\n\treturn v, ok\n}\n\n// SetQueryAttribute sets the value for a query attribute; this function may return an error\n// if the given value cannot pct-unescaped\nfunc (uri *Pkcs11URI) SetQueryAttribute(name, value string) error {\n\treturn uri.setAttribute(uri.queryAttributes, name, value)\n}\n\n// SetQueryAttributeUnencoded sets the value for a quiery attribute given as byte[].\n// The value must not have been pct-encoded already.\nfunc (uri *Pkcs11URI) SetQueryAttributeUnencoded(name string, value []byte) {\n\turi.queryAttributes[name] = string(value)\n}\n\n// AddQueryAttribute adds a query attribute; it returns an error if an attribute with the same\n// name already existed or if the given value cannot be pct-unescaped\nfunc (uri *Pkcs11URI) AddQueryAttribute(name, value string) error {\n\tif _, ok := uri.queryAttributes[name]; ok {\n\t\treturn errors.New(\"duplicate query attribute\")\n\t}\n\treturn uri.SetQueryAttribute(name, value)\n}\n\n// AddQueryAttributeUnencoded adds a query attribute given as byte[] which must not already be pct-encoded;\n// it returns an error if an attribute with the same name already existed\nfunc (uri *Pkcs11URI) AddQueryAttributeUnencoded(name string, value []byte) error {\n\tif _, ok := uri.queryAttributes[name]; ok {\n\t\treturn errors.New(\"duplicate query attribute\")\n\t}\n\turi.SetQueryAttributeUnencoded(name, value)\n\treturn nil\n}\n\n// RemoveQueryAttribute removes a path attribute\nfunc (uri *Pkcs11URI) RemoveQueryAttribute(name string) {\n\tdelete(uri.queryAttributes, name)\n}\n\n// Validate validates a Pkcs11URI object's attributes following RFC 7512 rules and proper formatting of\n// their values\nfunc (uri *Pkcs11URI) Validate() error {\n\t/* RFC 7512: 2.3 */\n\t/* slot-id should be DIGIT, but we go for number */\n\tif v, ok := uri.pathAttributes[\"slot-id\"]; ok {\n\t\tif _, err := strconv.Atoi(v); err != nil {\n\t\t\treturn fmt.Errorf(\"slot-id must be a number: %s\", v)\n\t\t}\n\t}\n\n\t/* library-version should 1*DIGIT [ \".\" 1 *DIGIT ]; allow NUMBERS for DIGIT */\n\tif v, ok := uri.pathAttributes[\"library-version\"]; ok {\n\t\tm, err := regexp.Match(\"^[0-9]+(\\\\.[0-9]+)?$\", []byte(v))\n\t\tif err != nil || !m {\n\t\t\treturn fmt.Errorf(\"Invalid format for library-version '%s'\", v)\n\t\t}\n\t}\n\n\tif v, ok := uri.pathAttributes[\"type\"]; ok {\n\t\tm, err := regexp.Match(\"^(public|private|cert|secret-key}data)?$\", []byte(v))\n\t\tif err != nil || !m {\n\t\t\treturn fmt.Errorf(\"Invalid type '%s'\", v)\n\t\t}\n\t}\n\n\t/* RFC 7512: 2.4 */\n\t_, ok1 := uri.queryAttributes[\"pin-source\"]\n\t_, ok2 := uri.queryAttributes[\"pin-value\"]\n\tif ok1 && ok2 {\n\t\treturn errors.New(\"URI must not contain pin-source and pin-value\")\n\t}\n\n\tif v, ok := uri.queryAttributes[\"module-path\"]; ok {\n\t\tif !filepath.IsAbs(v) {\n\t\t\treturn fmt.Errorf(\"path %s of module-name attribute must be absolute\", v)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// HasPIN allows the user to check whether a PIN has been provided either by the pin-value or the pin-source\n// attributes. It should be called before GetPIN(), which may still fail getting the PIN from a file for example.\nfunc (uri *Pkcs11URI) HasPIN() bool {\n\t_, ok := uri.queryAttributes[\"pin-value\"]\n\tif ok {\n\t\treturn true\n\t}\n\t_, ok = uri.queryAttributes[\"pin-source\"]\n\treturn ok\n}\n\n// GetPIN gets the PIN from either the pin-value or pin-source attribute; a user may want to call HasPIN()\n// before calling this function to determine whether a PIN has been provided at all so that an error code\n// returned by this function indicates that the PIN value could not be retrieved.\nfunc (uri *Pkcs11URI) GetPIN() (string, error) {\n\tif v, ok := uri.queryAttributes[\"pin-value\"]; ok {\n\t\treturn v, nil\n\t}\n\tif v, ok := uri.queryAttributes[\"pin-source\"]; ok {\n\t\tpinuri, err := url.ParseRequestURI(v)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"Could not parse pin-source: %s \", err)\n\t\t}\n\t\tswitch pinuri.Scheme {\n\t\tcase \"\", \"file\":\n\t\t\tif !filepath.IsAbs(pinuri.Path) {\n\t\t\t\treturn \"\", fmt.Errorf(\"PIN URI path '%s' is not absolute\", pinuri.Path)\n\t\t\t}\n\t\t\tpin, err := os.ReadFile(pinuri.Path)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"Could not open PIN file: %s\", err)\n\t\t\t}\n\t\t\treturn string(pin), nil\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"PIN URI scheme %s is not supported\", pinuri.Scheme)\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"Neither pin-source nor pin-value are available\")\n}\n\n// Parse parses a pkcs11: URI string\nfunc (uri *Pkcs11URI) Parse(uristring string) error {\n\tif !strings.HasPrefix(uristring, \"pkcs11:\") {\n\t\treturn errors.New(\"Malformed pkcs11 URI: missing pcks11: prefix\")\n\t}\n\n\tparts := strings.SplitN(uristring[7:], \"?\", 2)\n\n\turi.pathAttributes = make(map[string]string)\n\turi.queryAttributes = make(map[string]string)\n\n\tif len(parts[0]) > 0 {\n\t\t/* parse path part */\n\t\tfor _, part := range strings.Split(parts[0], \";\") {\n\t\t\tp := strings.SplitN(part, \"=\", 2)\n\t\t\tif len(p) != 2 {\n\t\t\t\treturn errors.New(\"Malformed pkcs11 URI: malformed path attribute\")\n\t\t\t}\n\t\t\tif err := uri.AddPathAttribute(p[0], p[1]); err != nil {\n\t\t\t\treturn fmt.Errorf(\"Malformed pkcs11 URI: %s\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(parts) == 2 {\n\t\t/* parse query part */\n\t\tfor _, part := range strings.Split(parts[1], \"&\") {\n\t\t\tp := strings.SplitN(part, \"=\", 2)\n\t\t\tif len(p) != 2 {\n\t\t\t\treturn errors.New(\"Malformed pkcs11 URI: malformed query attribute\")\n\t\t\t}\n\t\t\tif err := uri.AddQueryAttribute(p[0], p[1]); err != nil {\n\t\t\t\treturn fmt.Errorf(\"Malformed pkcs11 URI: %s\", err)\n\t\t\t}\n\t\t}\n\t}\n\treturn uri.Validate()\n}\n\n// formatAttribute formats attributes and escapes their values as needed\nfunc formatAttributes(attrMap map[string]string, ispath bool) string {\n\tres := \"\"\n\tfor key, value := range attrMap {\n\t\tswitch key {\n\t\tcase \"id\":\n\t\t\t/* id is always pct-encoded */\n\t\t\tvalue = escapeAll(value)\n\t\tdefault:\n\t\t\tif ispath {\n\t\t\t\tvalue = escape(value, true)\n\t\t\t} else {\n\t\t\t\tvalue = escape(value, false)\n\t\t\t}\n\t\t}\n\t\tif len(res) > 0 {\n\t\t\tif ispath {\n\t\t\t\tres += \";\"\n\t\t\t} else {\n\t\t\t\tres += \"&\"\n\t\t\t}\n\t\t}\n\t\tres += key + \"=\" + value\n\t}\n\treturn res\n}\n\n// Format formats a Pkcs11URI to it string representaion\nfunc (uri *Pkcs11URI) Format() (string, error) {\n\tif err := uri.Validate(); err != nil {\n\t\treturn \"\", err\n\t}\n\tresult := \"pkcs11:\" + formatAttributes(uri.pathAttributes, true)\n\tif len(uri.queryAttributes) > 0 {\n\t\tresult += \"?\" + formatAttributes(uri.queryAttributes, false)\n\t}\n\treturn result, nil\n}\n\n// SetModuleDirectories sets the search directories for pkcs11 modules\nfunc (uri *Pkcs11URI) SetModuleDirectories(moduleDirectories []string) {\n\turi.moduleDirectories = moduleDirectories\n}\n\n// GetModuleDirectories gets the search directories for pkcs11 modules\nfunc (uri *Pkcs11URI) GetModuleDirectories() []string {\n\treturn uri.moduleDirectories\n}\n\n// SetAllowedModulePaths sets allowed module paths to restrict access to modules.\n// Directory entries must end with a '/', all other ones are assumed to be file entries.\n// Allowed modules are filtered by string matching.\nfunc (uri *Pkcs11URI) SetAllowedModulePaths(allowedModulePaths []string) {\n\turi.allowedModulePaths = allowedModulePaths\n}\n\n// SetAllowAnyModule allows any module to be loaded; by default this is not allowed\nfunc (uri *Pkcs11URI) SetAllowAnyModule(allowAnyModule bool) {\n\turi.allowAnyModule = allowAnyModule\n}\n\nfunc (uri *Pkcs11URI) isAllowedPath(path string, allowedPaths []string) bool {\n\tif uri.allowAnyModule {\n\t\treturn true\n\t}\n\tfor _, allowedPath := range allowedPaths {\n\t\tif allowedPath == path {\n\t\t\t// exact filename match\n\t\t\treturn true\n\t\t}\n\t\tif allowedPath[len(allowedPath)-1] == '/' && strings.HasPrefix(path, allowedPath) {\n\t\t\t// allowedPath no subdirectory is allowed\n\t\t\tidx := strings.IndexRune(path[len(allowedPath):], os.PathSeparator)\n\t\t\tif idx < 0 {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\n// GetModule returns the module to use or an error in case no module could be found.\n// First the module-path is checked for whether it holds an absolute that can be read\n// by the current user. If this is the case the module is returned. Otherwise either the module-path\n// is used or the user-provided module path is used to match a module containing what is set in the\n// attribute module-name.\nfunc (uri *Pkcs11URI) GetModule() (string, error) {\n\tvar searchdirs []string\n\tv, ok := uri.queryAttributes[\"module-path\"]\n\n\tif ok {\n\t\tinfo, err := os.Stat(v)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"module-path '%s' is not accessible\", v)\n\t\t}\n\t\tif err == nil && info.Mode().IsRegular() {\n\t\t\t// it's a file\n\t\t\tif uri.isAllowedPath(v, uri.allowedModulePaths) {\n\t\t\t\treturn v, nil\n\t\t\t}\n\t\t\treturn \"\", fmt.Errorf(\"module-path '%s' is not allowed by policy\", v)\n\t\t}\n\t\tif !info.IsDir() {\n\t\t\treturn \"\", fmt.Errorf(\"module-path '%s' points to an invalid file type\", v)\n\t\t}\n\t\t// v is a directory\n\t\tsearchdirs = []string{v}\n\t} else {\n\t\tsearchdirs = uri.GetModuleDirectories()\n\t}\n\n\tmoduleName, ok := uri.queryAttributes[\"module-name\"]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"module-name attribute is not set\")\n\t}\n\tmoduleName = strings.ToLower(moduleName)\n\n\tfor _, dir := range searchdirs {\n\t\tfiles, err := os.ReadDir(dir)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, file := range files {\n\t\t\tfileLower := strings.ToLower(file.Name())\n\n\t\t\ti := strings.Index(fileLower, moduleName)\n\t\t\tif i < 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// we require that the fileLower ends with moduleName or that\n\t\t\t// a suffix follows so that softhsm will not match libsofthsm2.so but only\n\t\t\t// libsofthsm.so\n\t\t\tif len(fileLower) == i+len(moduleName) || fileLower[i+len(moduleName)] == '.' {\n\t\t\t\tf := filepath.Join(dir, file.Name())\n\t\t\t\tif uri.isAllowedPath(f, uri.allowedModulePaths) {\n\t\t\t\t\treturn f, nil\n\t\t\t\t}\n\t\t\t\treturn \"\", fmt.Errorf(\"module '%s' is not allowed by policy\", f)\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"No module could be found\")\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors.\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": "vendor/github.com/stretchr/testify/assert/assertion_compare.go",
    "content": "package assert\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"time\"\n)\n\n// Deprecated: CompareType has only ever been for internal use and has accidentally been published since v1.6.0. Do not use it.\ntype CompareType = compareResult\n\ntype compareResult int\n\nconst (\n\tcompareLess compareResult = iota - 1\n\tcompareEqual\n\tcompareGreater\n)\n\nvar (\n\tintType   = reflect.TypeOf(int(1))\n\tint8Type  = reflect.TypeOf(int8(1))\n\tint16Type = reflect.TypeOf(int16(1))\n\tint32Type = reflect.TypeOf(int32(1))\n\tint64Type = reflect.TypeOf(int64(1))\n\n\tuintType   = reflect.TypeOf(uint(1))\n\tuint8Type  = reflect.TypeOf(uint8(1))\n\tuint16Type = reflect.TypeOf(uint16(1))\n\tuint32Type = reflect.TypeOf(uint32(1))\n\tuint64Type = reflect.TypeOf(uint64(1))\n\n\tuintptrType = reflect.TypeOf(uintptr(1))\n\n\tfloat32Type = reflect.TypeOf(float32(1))\n\tfloat64Type = reflect.TypeOf(float64(1))\n\n\tstringType = reflect.TypeOf(\"\")\n\n\ttimeType  = reflect.TypeOf(time.Time{})\n\tbytesType = reflect.TypeOf([]byte{})\n)\n\nfunc compare(obj1, obj2 interface{}, kind reflect.Kind) (compareResult, bool) {\n\tobj1Value := reflect.ValueOf(obj1)\n\tobj2Value := reflect.ValueOf(obj2)\n\n\t// throughout this switch we try and avoid calling .Convert() if possible,\n\t// as this has a pretty big performance impact\n\tswitch kind {\n\tcase reflect.Int:\n\t\t{\n\t\t\tintobj1, ok := obj1.(int)\n\t\t\tif !ok {\n\t\t\t\tintobj1 = obj1Value.Convert(intType).Interface().(int)\n\t\t\t}\n\t\t\tintobj2, ok := obj2.(int)\n\t\t\tif !ok {\n\t\t\t\tintobj2 = obj2Value.Convert(intType).Interface().(int)\n\t\t\t}\n\t\t\tif intobj1 > intobj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif intobj1 == intobj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif intobj1 < intobj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Int8:\n\t\t{\n\t\t\tint8obj1, ok := obj1.(int8)\n\t\t\tif !ok {\n\t\t\t\tint8obj1 = obj1Value.Convert(int8Type).Interface().(int8)\n\t\t\t}\n\t\t\tint8obj2, ok := obj2.(int8)\n\t\t\tif !ok {\n\t\t\t\tint8obj2 = obj2Value.Convert(int8Type).Interface().(int8)\n\t\t\t}\n\t\t\tif int8obj1 > int8obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif int8obj1 == int8obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif int8obj1 < int8obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Int16:\n\t\t{\n\t\t\tint16obj1, ok := obj1.(int16)\n\t\t\tif !ok {\n\t\t\t\tint16obj1 = obj1Value.Convert(int16Type).Interface().(int16)\n\t\t\t}\n\t\t\tint16obj2, ok := obj2.(int16)\n\t\t\tif !ok {\n\t\t\t\tint16obj2 = obj2Value.Convert(int16Type).Interface().(int16)\n\t\t\t}\n\t\t\tif int16obj1 > int16obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif int16obj1 == int16obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif int16obj1 < int16obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Int32:\n\t\t{\n\t\t\tint32obj1, ok := obj1.(int32)\n\t\t\tif !ok {\n\t\t\t\tint32obj1 = obj1Value.Convert(int32Type).Interface().(int32)\n\t\t\t}\n\t\t\tint32obj2, ok := obj2.(int32)\n\t\t\tif !ok {\n\t\t\t\tint32obj2 = obj2Value.Convert(int32Type).Interface().(int32)\n\t\t\t}\n\t\t\tif int32obj1 > int32obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif int32obj1 == int32obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif int32obj1 < int32obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Int64:\n\t\t{\n\t\t\tint64obj1, ok := obj1.(int64)\n\t\t\tif !ok {\n\t\t\t\tint64obj1 = obj1Value.Convert(int64Type).Interface().(int64)\n\t\t\t}\n\t\t\tint64obj2, ok := obj2.(int64)\n\t\t\tif !ok {\n\t\t\t\tint64obj2 = obj2Value.Convert(int64Type).Interface().(int64)\n\t\t\t}\n\t\t\tif int64obj1 > int64obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif int64obj1 == int64obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif int64obj1 < int64obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Uint:\n\t\t{\n\t\t\tuintobj1, ok := obj1.(uint)\n\t\t\tif !ok {\n\t\t\t\tuintobj1 = obj1Value.Convert(uintType).Interface().(uint)\n\t\t\t}\n\t\t\tuintobj2, ok := obj2.(uint)\n\t\t\tif !ok {\n\t\t\t\tuintobj2 = obj2Value.Convert(uintType).Interface().(uint)\n\t\t\t}\n\t\t\tif uintobj1 > uintobj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uintobj1 == uintobj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uintobj1 < uintobj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Uint8:\n\t\t{\n\t\t\tuint8obj1, ok := obj1.(uint8)\n\t\t\tif !ok {\n\t\t\t\tuint8obj1 = obj1Value.Convert(uint8Type).Interface().(uint8)\n\t\t\t}\n\t\t\tuint8obj2, ok := obj2.(uint8)\n\t\t\tif !ok {\n\t\t\t\tuint8obj2 = obj2Value.Convert(uint8Type).Interface().(uint8)\n\t\t\t}\n\t\t\tif uint8obj1 > uint8obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uint8obj1 == uint8obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uint8obj1 < uint8obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Uint16:\n\t\t{\n\t\t\tuint16obj1, ok := obj1.(uint16)\n\t\t\tif !ok {\n\t\t\t\tuint16obj1 = obj1Value.Convert(uint16Type).Interface().(uint16)\n\t\t\t}\n\t\t\tuint16obj2, ok := obj2.(uint16)\n\t\t\tif !ok {\n\t\t\t\tuint16obj2 = obj2Value.Convert(uint16Type).Interface().(uint16)\n\t\t\t}\n\t\t\tif uint16obj1 > uint16obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uint16obj1 == uint16obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uint16obj1 < uint16obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Uint32:\n\t\t{\n\t\t\tuint32obj1, ok := obj1.(uint32)\n\t\t\tif !ok {\n\t\t\t\tuint32obj1 = obj1Value.Convert(uint32Type).Interface().(uint32)\n\t\t\t}\n\t\t\tuint32obj2, ok := obj2.(uint32)\n\t\t\tif !ok {\n\t\t\t\tuint32obj2 = obj2Value.Convert(uint32Type).Interface().(uint32)\n\t\t\t}\n\t\t\tif uint32obj1 > uint32obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uint32obj1 == uint32obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uint32obj1 < uint32obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Uint64:\n\t\t{\n\t\t\tuint64obj1, ok := obj1.(uint64)\n\t\t\tif !ok {\n\t\t\t\tuint64obj1 = obj1Value.Convert(uint64Type).Interface().(uint64)\n\t\t\t}\n\t\t\tuint64obj2, ok := obj2.(uint64)\n\t\t\tif !ok {\n\t\t\t\tuint64obj2 = obj2Value.Convert(uint64Type).Interface().(uint64)\n\t\t\t}\n\t\t\tif uint64obj1 > uint64obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uint64obj1 == uint64obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uint64obj1 < uint64obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Float32:\n\t\t{\n\t\t\tfloat32obj1, ok := obj1.(float32)\n\t\t\tif !ok {\n\t\t\t\tfloat32obj1 = obj1Value.Convert(float32Type).Interface().(float32)\n\t\t\t}\n\t\t\tfloat32obj2, ok := obj2.(float32)\n\t\t\tif !ok {\n\t\t\t\tfloat32obj2 = obj2Value.Convert(float32Type).Interface().(float32)\n\t\t\t}\n\t\t\tif float32obj1 > float32obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif float32obj1 == float32obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif float32obj1 < float32obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.Float64:\n\t\t{\n\t\t\tfloat64obj1, ok := obj1.(float64)\n\t\t\tif !ok {\n\t\t\t\tfloat64obj1 = obj1Value.Convert(float64Type).Interface().(float64)\n\t\t\t}\n\t\t\tfloat64obj2, ok := obj2.(float64)\n\t\t\tif !ok {\n\t\t\t\tfloat64obj2 = obj2Value.Convert(float64Type).Interface().(float64)\n\t\t\t}\n\t\t\tif float64obj1 > float64obj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif float64obj1 == float64obj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif float64obj1 < float64obj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\tcase reflect.String:\n\t\t{\n\t\t\tstringobj1, ok := obj1.(string)\n\t\t\tif !ok {\n\t\t\t\tstringobj1 = obj1Value.Convert(stringType).Interface().(string)\n\t\t\t}\n\t\t\tstringobj2, ok := obj2.(string)\n\t\t\tif !ok {\n\t\t\t\tstringobj2 = obj2Value.Convert(stringType).Interface().(string)\n\t\t\t}\n\t\t\tif stringobj1 > stringobj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif stringobj1 == stringobj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif stringobj1 < stringobj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\t// Check for known struct types we can check for compare results.\n\tcase reflect.Struct:\n\t\t{\n\t\t\t// All structs enter here. We're not interested in most types.\n\t\t\tif !obj1Value.CanConvert(timeType) {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// time.Time can be compared!\n\t\t\ttimeObj1, ok := obj1.(time.Time)\n\t\t\tif !ok {\n\t\t\t\ttimeObj1 = obj1Value.Convert(timeType).Interface().(time.Time)\n\t\t\t}\n\n\t\t\ttimeObj2, ok := obj2.(time.Time)\n\t\t\tif !ok {\n\t\t\t\ttimeObj2 = obj2Value.Convert(timeType).Interface().(time.Time)\n\t\t\t}\n\n\t\t\tif timeObj1.Before(timeObj2) {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t\tif timeObj1.Equal(timeObj2) {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\treturn compareGreater, true\n\t\t}\n\tcase reflect.Slice:\n\t\t{\n\t\t\t// We only care about the []byte type.\n\t\t\tif !obj1Value.CanConvert(bytesType) {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// []byte can be compared!\n\t\t\tbytesObj1, ok := obj1.([]byte)\n\t\t\tif !ok {\n\t\t\t\tbytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte)\n\n\t\t\t}\n\t\t\tbytesObj2, ok := obj2.([]byte)\n\t\t\tif !ok {\n\t\t\t\tbytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte)\n\t\t\t}\n\n\t\t\treturn compareResult(bytes.Compare(bytesObj1, bytesObj2)), true\n\t\t}\n\tcase reflect.Uintptr:\n\t\t{\n\t\t\tuintptrObj1, ok := obj1.(uintptr)\n\t\t\tif !ok {\n\t\t\t\tuintptrObj1 = obj1Value.Convert(uintptrType).Interface().(uintptr)\n\t\t\t}\n\t\t\tuintptrObj2, ok := obj2.(uintptr)\n\t\t\tif !ok {\n\t\t\t\tuintptrObj2 = obj2Value.Convert(uintptrType).Interface().(uintptr)\n\t\t\t}\n\t\t\tif uintptrObj1 > uintptrObj2 {\n\t\t\t\treturn compareGreater, true\n\t\t\t}\n\t\t\tif uintptrObj1 == uintptrObj2 {\n\t\t\t\treturn compareEqual, true\n\t\t\t}\n\t\t\tif uintptrObj1 < uintptrObj2 {\n\t\t\t\treturn compareLess, true\n\t\t\t}\n\t\t}\n\t}\n\n\treturn compareEqual, false\n}\n\n// Greater asserts that the first element is greater than the second\n//\n//\tassert.Greater(t, 2, 1)\n//\tassert.Greater(t, float64(2), float64(1))\n//\tassert.Greater(t, \"b\", \"a\")\nfunc Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not greater than \\\"%v\\\"\", e1, e2)\n\treturn compareTwoValues(t, e1, e2, []compareResult{compareGreater}, failMessage, msgAndArgs...)\n}\n\n// GreaterOrEqual asserts that the first element is greater than or equal to the second\n//\n//\tassert.GreaterOrEqual(t, 2, 1)\n//\tassert.GreaterOrEqual(t, 2, 2)\n//\tassert.GreaterOrEqual(t, \"b\", \"a\")\n//\tassert.GreaterOrEqual(t, \"b\", \"b\")\nfunc GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not greater than or equal to \\\"%v\\\"\", e1, e2)\n\treturn compareTwoValues(t, e1, e2, []compareResult{compareGreater, compareEqual}, failMessage, msgAndArgs...)\n}\n\n// Less asserts that the first element is less than the second\n//\n//\tassert.Less(t, 1, 2)\n//\tassert.Less(t, float64(1), float64(2))\n//\tassert.Less(t, \"a\", \"b\")\nfunc Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not less than \\\"%v\\\"\", e1, e2)\n\treturn compareTwoValues(t, e1, e2, []compareResult{compareLess}, failMessage, msgAndArgs...)\n}\n\n// LessOrEqual asserts that the first element is less than or equal to the second\n//\n//\tassert.LessOrEqual(t, 1, 2)\n//\tassert.LessOrEqual(t, 2, 2)\n//\tassert.LessOrEqual(t, \"a\", \"b\")\n//\tassert.LessOrEqual(t, \"b\", \"b\")\nfunc LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not less than or equal to \\\"%v\\\"\", e1, e2)\n\treturn compareTwoValues(t, e1, e2, []compareResult{compareLess, compareEqual}, failMessage, msgAndArgs...)\n}\n\n// Positive asserts that the specified element is positive\n//\n//\tassert.Positive(t, 1)\n//\tassert.Positive(t, 1.23)\nfunc Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tzero := reflect.Zero(reflect.TypeOf(e))\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not positive\", e)\n\treturn compareTwoValues(t, e, zero.Interface(), []compareResult{compareGreater}, failMessage, msgAndArgs...)\n}\n\n// Negative asserts that the specified element is negative\n//\n//\tassert.Negative(t, -1)\n//\tassert.Negative(t, -1.23)\nfunc Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tzero := reflect.Zero(reflect.TypeOf(e))\n\tfailMessage := fmt.Sprintf(\"\\\"%v\\\" is not negative\", e)\n\treturn compareTwoValues(t, e, zero.Interface(), []compareResult{compareLess}, failMessage, msgAndArgs...)\n}\n\nfunc compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\te1Kind := reflect.ValueOf(e1).Kind()\n\te2Kind := reflect.ValueOf(e2).Kind()\n\tif e1Kind != e2Kind {\n\t\treturn Fail(t, \"Elements should be the same type\", msgAndArgs...)\n\t}\n\n\tcompareResult, isComparable := compare(e1, e2, e1Kind)\n\tif !isComparable {\n\t\treturn Fail(t, fmt.Sprintf(`Can not compare type \"%T\"`, e1), msgAndArgs...)\n\t}\n\n\tif !containsValue(allowedComparesResults, compareResult) {\n\t\treturn Fail(t, failMessage, msgAndArgs...)\n\t}\n\n\treturn true\n}\n\nfunc containsValue(values []compareResult, value compareResult) bool {\n\tfor _, v := range values {\n\t\tif v == value {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertion_format.go",
    "content": "// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.\n\npackage assert\n\nimport (\n\thttp \"net/http\"\n\turl \"net/url\"\n\ttime \"time\"\n)\n\n// Conditionf uses a Comparison to assert a complex condition.\nfunc Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Condition(t, comp, append([]interface{}{msg}, args...)...)\n}\n\n// Containsf asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\tassert.Containsf(t, \"Hello World\", \"World\", \"error message %s\", \"formatted\")\n//\tassert.Containsf(t, [\"Hello\", \"World\"], \"World\", \"error message %s\", \"formatted\")\n//\tassert.Containsf(t, {\"Hello\": \"World\"}, \"Hello\", \"error message %s\", \"formatted\")\nfunc Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Contains(t, s, contains, append([]interface{}{msg}, args...)...)\n}\n\n// DirExistsf checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn DirExists(t, path, append([]interface{}{msg}, args...)...)\n}\n\n// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], \"error message %s\", \"formatted\")\nfunc ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...)\n}\n\n// Emptyf asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\tassert.Emptyf(t, obj, \"error message %s\", \"formatted\")\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Empty(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// Equalf asserts that two objects are equal.\n//\n//\tassert.Equalf(t, 123, 123, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Equal(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// EqualErrorf asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.EqualErrorf(t, err,  expectedErrorString, \"error message %s\", \"formatted\")\nfunc EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualError(t, theError, errString, append([]interface{}{msg}, args...)...)\n}\n\n// EqualExportedValuesf asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, \"error message %s\", \"formatted\") => true\n//\t assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, \"error message %s\", \"formatted\") => false\nfunc EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// EqualValuesf asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\tassert.EqualValuesf(t, uint32(123), int32(123), \"error message %s\", \"formatted\")\nfunc EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// Errorf asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.Errorf(t, err, \"error message %s\", \"formatted\")\nfunc Errorf(t TestingT, err error, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Error(t, err, append([]interface{}{msg}, args...)...)\n}\n\n// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorAs(t, err, target, append([]interface{}{msg}, args...)...)\n}\n\n// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.ErrorContainsf(t, err,  expectedErrorSubString, \"error message %s\", \"formatted\")\nfunc ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...)\n}\n\n// ErrorIsf asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorIs(t, err, target, append([]interface{}{msg}, args...)...)\n}\n\n// Eventuallyf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\tassert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...)\n}\n\n// EventuallyWithTf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\tassert.EventuallyWithTf(t, func(c *assert.CollectT, \"error message %s\", \"formatted\") {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EventuallyWithT(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...)\n}\n\n// Exactlyf asserts that two objects are equal in value and type.\n//\n//\tassert.Exactlyf(t, int32(123), int64(123), \"error message %s\", \"formatted\")\nfunc Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Exactly(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// Failf reports a failure through\nfunc Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(t, failureMessage, append([]interface{}{msg}, args...)...)\n}\n\n// FailNowf fails test\nfunc FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FailNow(t, failureMessage, append([]interface{}{msg}, args...)...)\n}\n\n// Falsef asserts that the specified value is false.\n//\n//\tassert.Falsef(t, myBool, \"error message %s\", \"formatted\")\nfunc Falsef(t TestingT, value bool, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn False(t, value, append([]interface{}{msg}, args...)...)\n}\n\n// FileExistsf checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FileExists(t, path, append([]interface{}{msg}, args...)...)\n}\n\n// Greaterf asserts that the first element is greater than the second\n//\n//\tassert.Greaterf(t, 2, 1, \"error message %s\", \"formatted\")\n//\tassert.Greaterf(t, float64(2), float64(1), \"error message %s\", \"formatted\")\n//\tassert.Greaterf(t, \"b\", \"a\", \"error message %s\", \"formatted\")\nfunc Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Greater(t, e1, e2, append([]interface{}{msg}, args...)...)\n}\n\n// GreaterOrEqualf asserts that the first element is greater than or equal to the second\n//\n//\tassert.GreaterOrEqualf(t, 2, 1, \"error message %s\", \"formatted\")\n//\tassert.GreaterOrEqualf(t, 2, 2, \"error message %s\", \"formatted\")\n//\tassert.GreaterOrEqualf(t, \"b\", \"a\", \"error message %s\", \"formatted\")\n//\tassert.GreaterOrEqualf(t, \"b\", \"b\", \"error message %s\", \"formatted\")\nfunc GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn GreaterOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPBodyContainsf asserts that a specified handler returns a\n// body that contains a string.\n//\n//\tassert.HTTPBodyContainsf(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPBodyNotContainsf asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\tassert.HTTPBodyNotContainsf(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPErrorf asserts that a specified handler returns an error status code.\n//\n//\tassert.HTTPErrorf(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPRedirectf asserts that a specified handler returns a redirect status code.\n//\n//\tassert.HTTPRedirectf(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPStatusCodef asserts that a specified handler returns a specified status code.\n//\n//\tassert.HTTPStatusCodef(t, myHandler, \"GET\", \"/notImplemented\", nil, 501, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...)\n}\n\n// HTTPSuccessf asserts that a specified handler returns a success status code.\n//\n//\tassert.HTTPSuccessf(t, myHandler, \"POST\", \"http://www.google.com\", nil, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...)\n}\n\n// Implementsf asserts that an object is implemented by the specified interface.\n//\n//\tassert.Implementsf(t, (*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...)\n}\n\n// InDeltaf asserts that the two numerals are within delta of each other.\n//\n//\tassert.InDeltaf(t, math.Pi, 22/7.0, 0.01, \"error message %s\", \"formatted\")\nfunc InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...)\n}\n\n// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...)\n}\n\n// InDeltaSlicef is the same as InDelta, except it compares two slices.\nfunc InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...)\n}\n\n// InEpsilonf asserts that expected and actual have a relative error less than epsilon\nfunc InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...)\n}\n\n// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.\nfunc InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...)\n}\n\n// IsDecreasingf asserts that the collection is decreasing\n//\n//\tassert.IsDecreasingf(t, []int{2, 1, 0}, \"error message %s\", \"formatted\")\n//\tassert.IsDecreasingf(t, []float{2, 1}, \"error message %s\", \"formatted\")\n//\tassert.IsDecreasingf(t, []string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsDecreasing(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// IsIncreasingf asserts that the collection is increasing\n//\n//\tassert.IsIncreasingf(t, []int{1, 2, 3}, \"error message %s\", \"formatted\")\n//\tassert.IsIncreasingf(t, []float{1, 2}, \"error message %s\", \"formatted\")\n//\tassert.IsIncreasingf(t, []string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsIncreasing(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// IsNonDecreasingf asserts that the collection is not decreasing\n//\n//\tassert.IsNonDecreasingf(t, []int{1, 1, 2}, \"error message %s\", \"formatted\")\n//\tassert.IsNonDecreasingf(t, []float{1, 2}, \"error message %s\", \"formatted\")\n//\tassert.IsNonDecreasingf(t, []string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonDecreasing(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// IsNonIncreasingf asserts that the collection is not increasing\n//\n//\tassert.IsNonIncreasingf(t, []int{2, 1, 1}, \"error message %s\", \"formatted\")\n//\tassert.IsNonIncreasingf(t, []float{2, 1}, \"error message %s\", \"formatted\")\n//\tassert.IsNonIncreasingf(t, []string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonIncreasing(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// IsNotTypef asserts that the specified objects are not of the same type.\n//\n//\tassert.IsNotTypef(t, &NotMyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNotType(t, theType, object, append([]interface{}{msg}, args...)...)\n}\n\n// IsTypef asserts that the specified objects are of the same type.\n//\n//\tassert.IsTypef(t, &MyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsType(t, expectedType, object, append([]interface{}{msg}, args...)...)\n}\n\n// JSONEqf asserts that two JSON strings are equivalent.\n//\n//\tassert.JSONEqf(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`, \"error message %s\", \"formatted\")\nfunc JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// Lenf asserts that the specified object has specific length.\n// Lenf also fails if the object has a type that len() not accept.\n//\n//\tassert.Lenf(t, mySlice, 3, \"error message %s\", \"formatted\")\nfunc Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Len(t, object, length, append([]interface{}{msg}, args...)...)\n}\n\n// Lessf asserts that the first element is less than the second\n//\n//\tassert.Lessf(t, 1, 2, \"error message %s\", \"formatted\")\n//\tassert.Lessf(t, float64(1), float64(2), \"error message %s\", \"formatted\")\n//\tassert.Lessf(t, \"a\", \"b\", \"error message %s\", \"formatted\")\nfunc Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Less(t, e1, e2, append([]interface{}{msg}, args...)...)\n}\n\n// LessOrEqualf asserts that the first element is less than or equal to the second\n//\n//\tassert.LessOrEqualf(t, 1, 2, \"error message %s\", \"formatted\")\n//\tassert.LessOrEqualf(t, 2, 2, \"error message %s\", \"formatted\")\n//\tassert.LessOrEqualf(t, \"a\", \"b\", \"error message %s\", \"formatted\")\n//\tassert.LessOrEqualf(t, \"b\", \"b\", \"error message %s\", \"formatted\")\nfunc LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...)\n}\n\n// Negativef asserts that the specified element is negative\n//\n//\tassert.Negativef(t, -1, \"error message %s\", \"formatted\")\n//\tassert.Negativef(t, -1.23, \"error message %s\", \"formatted\")\nfunc Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Negative(t, e, append([]interface{}{msg}, args...)...)\n}\n\n// Neverf asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\tassert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...)\n}\n\n// Nilf asserts that the specified object is nil.\n//\n//\tassert.Nilf(t, err, \"error message %s\", \"formatted\")\nfunc Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Nil(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// NoDirExistsf checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoDirExists(t, path, append([]interface{}{msg}, args...)...)\n}\n\n// NoErrorf asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if assert.NoErrorf(t, err, \"error message %s\", \"formatted\") {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoError(t, err, append([]interface{}{msg}, args...)...)\n}\n\n// NoFileExistsf checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoFileExists(t, path, append([]interface{}{msg}, args...)...)\n}\n\n// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\tassert.NotContainsf(t, \"Hello World\", \"Earth\", \"error message %s\", \"formatted\")\n//\tassert.NotContainsf(t, [\"Hello\", \"World\"], \"Earth\", \"error message %s\", \"formatted\")\n//\tassert.NotContainsf(t, {\"Hello\": \"World\"}, \"Earth\", \"error message %s\", \"formatted\")\nfunc NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotContains(t, s, contains, append([]interface{}{msg}, args...)...)\n}\n\n// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], \"error message %s\", \"formatted\") -> false\n//\n// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], \"error message %s\", \"formatted\") -> true\n//\n// assert.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], \"error message %s\", \"formatted\") -> true\nfunc NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...)\n}\n\n// NotEmptyf asserts that the specified object is NOT [Empty].\n//\n//\tif assert.NotEmptyf(t, obj, \"error message %s\", \"formatted\") {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEmpty(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// NotEqualf asserts that the specified values are NOT equal.\n//\n//\tassert.NotEqualf(t, obj1, obj2, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// NotEqualValuesf asserts that two objects are not equal even when converted to the same type\n//\n//\tassert.NotEqualValuesf(t, obj1, obj2, \"error message %s\", \"formatted\")\nfunc NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// NotErrorAsf asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorAs(t, err, target, append([]interface{}{msg}, args...)...)\n}\n\n// NotErrorIsf asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...)\n}\n\n// NotImplementsf asserts that an object does not implement the specified interface.\n//\n//\tassert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotImplements(t, interfaceObject, object, append([]interface{}{msg}, args...)...)\n}\n\n// NotNilf asserts that the specified object is not nil.\n//\n//\tassert.NotNilf(t, err, \"error message %s\", \"formatted\")\nfunc NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotNil(t, object, append([]interface{}{msg}, args...)...)\n}\n\n// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\tassert.NotPanicsf(t, func(){ RemainCalm() }, \"error message %s\", \"formatted\")\nfunc NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotPanics(t, f, append([]interface{}{msg}, args...)...)\n}\n\n// NotRegexpf asserts that a specified regexp does not match a string.\n//\n//\tassert.NotRegexpf(t, regexp.MustCompile(\"starts\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\tassert.NotRegexpf(t, \"^start\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...)\n}\n\n// NotSamef asserts that two pointers do not reference the same object.\n//\n//\tassert.NotSamef(t, ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSame(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\tassert.NotSubsetf(t, [1, 3, 4], [1, 2], \"error message %s\", \"formatted\")\n//\tassert.NotSubsetf(t, {\"x\": 1, \"y\": 2}, {\"z\": 3}, \"error message %s\", \"formatted\")\n//\tassert.NotSubsetf(t, [1, 3, 4], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\tassert.NotSubsetf(t, {\"x\": 1, \"y\": 2}, [\"z\"], \"error message %s\", \"formatted\")\nfunc NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSubset(t, list, subset, append([]interface{}{msg}, args...)...)\n}\n\n// NotZerof asserts that i is not the zero value for its type.\nfunc NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotZero(t, i, append([]interface{}{msg}, args...)...)\n}\n\n// Panicsf asserts that the code inside the specified PanicTestFunc panics.\n//\n//\tassert.Panicsf(t, func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Panics(t, f, append([]interface{}{msg}, args...)...)\n}\n\n// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\tassert.PanicsWithErrorf(t, \"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...)\n}\n\n// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\tassert.PanicsWithValuef(t, \"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...)\n}\n\n// Positivef asserts that the specified element is positive\n//\n//\tassert.Positivef(t, 1, \"error message %s\", \"formatted\")\n//\tassert.Positivef(t, 1.23, \"error message %s\", \"formatted\")\nfunc Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Positive(t, e, append([]interface{}{msg}, args...)...)\n}\n\n// Regexpf asserts that a specified regexp matches a string.\n//\n//\tassert.Regexpf(t, regexp.MustCompile(\"start\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\tassert.Regexpf(t, \"start...$\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Regexp(t, rx, str, append([]interface{}{msg}, args...)...)\n}\n\n// Samef asserts that two pointers reference the same object.\n//\n//\tassert.Samef(t, ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Same(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// Subsetf asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\tassert.Subsetf(t, [1, 2, 3], [1, 2], \"error message %s\", \"formatted\")\n//\tassert.Subsetf(t, {\"x\": 1, \"y\": 2}, {\"x\": 1}, \"error message %s\", \"formatted\")\n//\tassert.Subsetf(t, [1, 2, 3], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\tassert.Subsetf(t, {\"x\": 1, \"y\": 2}, [\"x\"], \"error message %s\", \"formatted\")\nfunc Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Subset(t, list, subset, append([]interface{}{msg}, args...)...)\n}\n\n// Truef asserts that the specified value is true.\n//\n//\tassert.Truef(t, myBool, \"error message %s\", \"formatted\")\nfunc Truef(t TestingT, value bool, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn True(t, value, append([]interface{}{msg}, args...)...)\n}\n\n// WithinDurationf asserts that the two times are within duration delta of each other.\n//\n//\tassert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, \"error message %s\", \"formatted\")\nfunc WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...)\n}\n\n// WithinRangef asserts that a time is within a time range (inclusive).\n//\n//\tassert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), \"error message %s\", \"formatted\")\nfunc WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...)\n}\n\n// YAMLEqf asserts that two YAML strings are equivalent.\nfunc YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...)\n}\n\n// Zerof asserts that i is the zero value for its type.\nfunc Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Zero(t, i, append([]interface{}{msg}, args...)...)\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl",
    "content": "{{.CommentFormat}}\nfunc {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool {\n\tif h, ok := t.(tHelper); ok { h.Helper() }\n\treturn {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}})\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertion_forward.go",
    "content": "// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.\n\npackage assert\n\nimport (\n\thttp \"net/http\"\n\turl \"net/url\"\n\ttime \"time\"\n)\n\n// Condition uses a Comparison to assert a complex condition.\nfunc (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Condition(a.t, comp, msgAndArgs...)\n}\n\n// Conditionf uses a Comparison to assert a complex condition.\nfunc (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Conditionf(a.t, comp, msg, args...)\n}\n\n// Contains asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\ta.Contains(\"Hello World\", \"World\")\n//\ta.Contains([\"Hello\", \"World\"], \"World\")\n//\ta.Contains({\"Hello\": \"World\"}, \"Hello\")\nfunc (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Contains(a.t, s, contains, msgAndArgs...)\n}\n\n// Containsf asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\ta.Containsf(\"Hello World\", \"World\", \"error message %s\", \"formatted\")\n//\ta.Containsf([\"Hello\", \"World\"], \"World\", \"error message %s\", \"formatted\")\n//\ta.Containsf({\"Hello\": \"World\"}, \"Hello\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Containsf(a.t, s, contains, msg, args...)\n}\n\n// DirExists checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn DirExists(a.t, path, msgAndArgs...)\n}\n\n// DirExistsf checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn DirExistsf(a.t, path, msg, args...)\n}\n\n// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])\nfunc (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ElementsMatch(a.t, listA, listB, msgAndArgs...)\n}\n\n// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], \"error message %s\", \"formatted\")\nfunc (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ElementsMatchf(a.t, listA, listB, msg, args...)\n}\n\n// Empty asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\ta.Empty(obj)\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Empty(a.t, object, msgAndArgs...)\n}\n\n// Emptyf asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\ta.Emptyf(obj, \"error message %s\", \"formatted\")\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Emptyf(a.t, object, msg, args...)\n}\n\n// Equal asserts that two objects are equal.\n//\n//\ta.Equal(123, 123)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Equal(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualError asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.EqualError(err,  expectedErrorString)\nfunc (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualError(a.t, theError, errString, msgAndArgs...)\n}\n\n// EqualErrorf asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.EqualErrorf(err,  expectedErrorString, \"error message %s\", \"formatted\")\nfunc (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualErrorf(a.t, theError, errString, msg, args...)\n}\n\n// EqualExportedValues asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t a.EqualExportedValues(S{1, 2}, S{1, 3}) => true\n//\t a.EqualExportedValues(S{1, 2}, S{2, 3}) => false\nfunc (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualExportedValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualExportedValuesf asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t a.EqualExportedValuesf(S{1, 2}, S{1, 3}, \"error message %s\", \"formatted\") => true\n//\t a.EqualExportedValuesf(S{1, 2}, S{2, 3}, \"error message %s\", \"formatted\") => false\nfunc (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualExportedValuesf(a.t, expected, actual, msg, args...)\n}\n\n// EqualValues asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\ta.EqualValues(uint32(123), int32(123))\nfunc (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualValuesf asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\ta.EqualValuesf(uint32(123), int32(123), \"error message %s\", \"formatted\")\nfunc (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EqualValuesf(a.t, expected, actual, msg, args...)\n}\n\n// Equalf asserts that two objects are equal.\n//\n//\ta.Equalf(123, 123, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Equalf(a.t, expected, actual, msg, args...)\n}\n\n// Error asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\ta.Error(err)\nfunc (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Error(a.t, err, msgAndArgs...)\n}\n\n// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorAs(a.t, err, target, msgAndArgs...)\n}\n\n// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorAsf(a.t, err, target, msg, args...)\n}\n\n// ErrorContains asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.ErrorContains(err,  expectedErrorSubString)\nfunc (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorContains(a.t, theError, contains, msgAndArgs...)\n}\n\n// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.ErrorContainsf(err,  expectedErrorSubString, \"error message %s\", \"formatted\")\nfunc (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorContainsf(a.t, theError, contains, msg, args...)\n}\n\n// ErrorIs asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorIs(a.t, err, target, msgAndArgs...)\n}\n\n// ErrorIsf asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn ErrorIsf(a.t, err, target, msg, args...)\n}\n\n// Errorf asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\ta.Errorf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Errorf(a.t, err, msg, args...)\n}\n\n// Eventually asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\ta.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond)\nfunc (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Eventually(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// EventuallyWithT asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\ta.EventuallyWithT(func(c *assert.CollectT) {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// EventuallyWithTf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\ta.EventuallyWithTf(func(c *assert.CollectT, \"error message %s\", \"formatted\") {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Eventuallyf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\ta.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Eventuallyf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Exactly asserts that two objects are equal in value and type.\n//\n//\ta.Exactly(int32(123), int64(123))\nfunc (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Exactly(a.t, expected, actual, msgAndArgs...)\n}\n\n// Exactlyf asserts that two objects are equal in value and type.\n//\n//\ta.Exactlyf(int32(123), int64(123), \"error message %s\", \"formatted\")\nfunc (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Exactlyf(a.t, expected, actual, msg, args...)\n}\n\n// Fail reports a failure through\nfunc (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(a.t, failureMessage, msgAndArgs...)\n}\n\n// FailNow fails test\nfunc (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FailNow(a.t, failureMessage, msgAndArgs...)\n}\n\n// FailNowf fails test\nfunc (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FailNowf(a.t, failureMessage, msg, args...)\n}\n\n// Failf reports a failure through\nfunc (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Failf(a.t, failureMessage, msg, args...)\n}\n\n// False asserts that the specified value is false.\n//\n//\ta.False(myBool)\nfunc (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn False(a.t, value, msgAndArgs...)\n}\n\n// Falsef asserts that the specified value is false.\n//\n//\ta.Falsef(myBool, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Falsef(a.t, value, msg, args...)\n}\n\n// FileExists checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FileExists(a.t, path, msgAndArgs...)\n}\n\n// FileExistsf checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn FileExistsf(a.t, path, msg, args...)\n}\n\n// Greater asserts that the first element is greater than the second\n//\n//\ta.Greater(2, 1)\n//\ta.Greater(float64(2), float64(1))\n//\ta.Greater(\"b\", \"a\")\nfunc (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Greater(a.t, e1, e2, msgAndArgs...)\n}\n\n// GreaterOrEqual asserts that the first element is greater than or equal to the second\n//\n//\ta.GreaterOrEqual(2, 1)\n//\ta.GreaterOrEqual(2, 2)\n//\ta.GreaterOrEqual(\"b\", \"a\")\n//\ta.GreaterOrEqual(\"b\", \"b\")\nfunc (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn GreaterOrEqual(a.t, e1, e2, msgAndArgs...)\n}\n\n// GreaterOrEqualf asserts that the first element is greater than or equal to the second\n//\n//\ta.GreaterOrEqualf(2, 1, \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(2, 2, \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(\"b\", \"a\", \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(\"b\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn GreaterOrEqualf(a.t, e1, e2, msg, args...)\n}\n\n// Greaterf asserts that the first element is greater than the second\n//\n//\ta.Greaterf(2, 1, \"error message %s\", \"formatted\")\n//\ta.Greaterf(float64(2), float64(1), \"error message %s\", \"formatted\")\n//\ta.Greaterf(\"b\", \"a\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Greaterf(a.t, e1, e2, msg, args...)\n}\n\n// HTTPBodyContains asserts that a specified handler returns a\n// body that contains a string.\n//\n//\ta.HTTPBodyContains(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...)\n}\n\n// HTTPBodyContainsf asserts that a specified handler returns a\n// body that contains a string.\n//\n//\ta.HTTPBodyContainsf(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)\n}\n\n// HTTPBodyNotContains asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\ta.HTTPBodyNotContains(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...)\n}\n\n// HTTPBodyNotContainsf asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\ta.HTTPBodyNotContainsf(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...)\n}\n\n// HTTPError asserts that a specified handler returns an error status code.\n//\n//\ta.HTTPError(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPError(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPErrorf asserts that a specified handler returns an error status code.\n//\n//\ta.HTTPErrorf(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPErrorf(a.t, handler, method, url, values, msg, args...)\n}\n\n// HTTPRedirect asserts that a specified handler returns a redirect status code.\n//\n//\ta.HTTPRedirect(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPRedirectf asserts that a specified handler returns a redirect status code.\n//\n//\ta.HTTPRedirectf(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPRedirectf(a.t, handler, method, url, values, msg, args...)\n}\n\n// HTTPStatusCode asserts that a specified handler returns a specified status code.\n//\n//\ta.HTTPStatusCode(myHandler, \"GET\", \"/notImplemented\", nil, 501)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)\n}\n\n// HTTPStatusCodef asserts that a specified handler returns a specified status code.\n//\n//\ta.HTTPStatusCodef(myHandler, \"GET\", \"/notImplemented\", nil, 501, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)\n}\n\n// HTTPSuccess asserts that a specified handler returns a success status code.\n//\n//\ta.HTTPSuccess(myHandler, \"POST\", \"http://www.google.com\", nil)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPSuccessf asserts that a specified handler returns a success status code.\n//\n//\ta.HTTPSuccessf(myHandler, \"POST\", \"http://www.google.com\", nil, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn HTTPSuccessf(a.t, handler, method, url, values, msg, args...)\n}\n\n// Implements asserts that an object is implemented by the specified interface.\n//\n//\ta.Implements((*MyInterface)(nil), new(MyObject))\nfunc (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Implements(a.t, interfaceObject, object, msgAndArgs...)\n}\n\n// Implementsf asserts that an object is implemented by the specified interface.\n//\n//\ta.Implementsf((*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Implementsf(a.t, interfaceObject, object, msg, args...)\n}\n\n// InDelta asserts that the two numerals are within delta of each other.\n//\n//\ta.InDelta(math.Pi, 22/7.0, 0.01)\nfunc (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDelta(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...)\n}\n\n// InDeltaSlice is the same as InDelta, except it compares two slices.\nfunc (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaSlicef is the same as InDelta, except it compares two slices.\nfunc (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaSlicef(a.t, expected, actual, delta, msg, args...)\n}\n\n// InDeltaf asserts that the two numerals are within delta of each other.\n//\n//\ta.InDeltaf(math.Pi, 22/7.0, 0.01, \"error message %s\", \"formatted\")\nfunc (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InDeltaf(a.t, expected, actual, delta, msg, args...)\n}\n\n// InEpsilon asserts that expected and actual have a relative error less than epsilon\nfunc (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)\n}\n\n// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.\nfunc (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...)\n}\n\n// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.\nfunc (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...)\n}\n\n// InEpsilonf asserts that expected and actual have a relative error less than epsilon\nfunc (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn InEpsilonf(a.t, expected, actual, epsilon, msg, args...)\n}\n\n// IsDecreasing asserts that the collection is decreasing\n//\n//\ta.IsDecreasing([]int{2, 1, 0})\n//\ta.IsDecreasing([]float{2, 1})\n//\ta.IsDecreasing([]string{\"b\", \"a\"})\nfunc (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsDecreasing(a.t, object, msgAndArgs...)\n}\n\n// IsDecreasingf asserts that the collection is decreasing\n//\n//\ta.IsDecreasingf([]int{2, 1, 0}, \"error message %s\", \"formatted\")\n//\ta.IsDecreasingf([]float{2, 1}, \"error message %s\", \"formatted\")\n//\ta.IsDecreasingf([]string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsDecreasingf(a.t, object, msg, args...)\n}\n\n// IsIncreasing asserts that the collection is increasing\n//\n//\ta.IsIncreasing([]int{1, 2, 3})\n//\ta.IsIncreasing([]float{1, 2})\n//\ta.IsIncreasing([]string{\"a\", \"b\"})\nfunc (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsIncreasing(a.t, object, msgAndArgs...)\n}\n\n// IsIncreasingf asserts that the collection is increasing\n//\n//\ta.IsIncreasingf([]int{1, 2, 3}, \"error message %s\", \"formatted\")\n//\ta.IsIncreasingf([]float{1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsIncreasingf([]string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsIncreasingf(a.t, object, msg, args...)\n}\n\n// IsNonDecreasing asserts that the collection is not decreasing\n//\n//\ta.IsNonDecreasing([]int{1, 1, 2})\n//\ta.IsNonDecreasing([]float{1, 2})\n//\ta.IsNonDecreasing([]string{\"a\", \"b\"})\nfunc (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonDecreasing(a.t, object, msgAndArgs...)\n}\n\n// IsNonDecreasingf asserts that the collection is not decreasing\n//\n//\ta.IsNonDecreasingf([]int{1, 1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsNonDecreasingf([]float{1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsNonDecreasingf([]string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonDecreasingf(a.t, object, msg, args...)\n}\n\n// IsNonIncreasing asserts that the collection is not increasing\n//\n//\ta.IsNonIncreasing([]int{2, 1, 1})\n//\ta.IsNonIncreasing([]float{2, 1})\n//\ta.IsNonIncreasing([]string{\"b\", \"a\"})\nfunc (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonIncreasing(a.t, object, msgAndArgs...)\n}\n\n// IsNonIncreasingf asserts that the collection is not increasing\n//\n//\ta.IsNonIncreasingf([]int{2, 1, 1}, \"error message %s\", \"formatted\")\n//\ta.IsNonIncreasingf([]float{2, 1}, \"error message %s\", \"formatted\")\n//\ta.IsNonIncreasingf([]string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNonIncreasingf(a.t, object, msg, args...)\n}\n\n// IsNotType asserts that the specified objects are not of the same type.\n//\n//\ta.IsNotType(&NotMyStruct{}, &MyStruct{})\nfunc (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNotType(a.t, theType, object, msgAndArgs...)\n}\n\n// IsNotTypef asserts that the specified objects are not of the same type.\n//\n//\ta.IsNotTypef(&NotMyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsNotTypef(a.t, theType, object, msg, args...)\n}\n\n// IsType asserts that the specified objects are of the same type.\n//\n//\ta.IsType(&MyStruct{}, &MyStruct{})\nfunc (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsType(a.t, expectedType, object, msgAndArgs...)\n}\n\n// IsTypef asserts that the specified objects are of the same type.\n//\n//\ta.IsTypef(&MyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn IsTypef(a.t, expectedType, object, msg, args...)\n}\n\n// JSONEq asserts that two JSON strings are equivalent.\n//\n//\ta.JSONEq(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\nfunc (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn JSONEq(a.t, expected, actual, msgAndArgs...)\n}\n\n// JSONEqf asserts that two JSON strings are equivalent.\n//\n//\ta.JSONEqf(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`, \"error message %s\", \"formatted\")\nfunc (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn JSONEqf(a.t, expected, actual, msg, args...)\n}\n\n// Len asserts that the specified object has specific length.\n// Len also fails if the object has a type that len() not accept.\n//\n//\ta.Len(mySlice, 3)\nfunc (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Len(a.t, object, length, msgAndArgs...)\n}\n\n// Lenf asserts that the specified object has specific length.\n// Lenf also fails if the object has a type that len() not accept.\n//\n//\ta.Lenf(mySlice, 3, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Lenf(a.t, object, length, msg, args...)\n}\n\n// Less asserts that the first element is less than the second\n//\n//\ta.Less(1, 2)\n//\ta.Less(float64(1), float64(2))\n//\ta.Less(\"a\", \"b\")\nfunc (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Less(a.t, e1, e2, msgAndArgs...)\n}\n\n// LessOrEqual asserts that the first element is less than or equal to the second\n//\n//\ta.LessOrEqual(1, 2)\n//\ta.LessOrEqual(2, 2)\n//\ta.LessOrEqual(\"a\", \"b\")\n//\ta.LessOrEqual(\"b\", \"b\")\nfunc (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn LessOrEqual(a.t, e1, e2, msgAndArgs...)\n}\n\n// LessOrEqualf asserts that the first element is less than or equal to the second\n//\n//\ta.LessOrEqualf(1, 2, \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(2, 2, \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(\"a\", \"b\", \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(\"b\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn LessOrEqualf(a.t, e1, e2, msg, args...)\n}\n\n// Lessf asserts that the first element is less than the second\n//\n//\ta.Lessf(1, 2, \"error message %s\", \"formatted\")\n//\ta.Lessf(float64(1), float64(2), \"error message %s\", \"formatted\")\n//\ta.Lessf(\"a\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Lessf(a.t, e1, e2, msg, args...)\n}\n\n// Negative asserts that the specified element is negative\n//\n//\ta.Negative(-1)\n//\ta.Negative(-1.23)\nfunc (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Negative(a.t, e, msgAndArgs...)\n}\n\n// Negativef asserts that the specified element is negative\n//\n//\ta.Negativef(-1, \"error message %s\", \"formatted\")\n//\ta.Negativef(-1.23, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Negativef(a.t, e, msg, args...)\n}\n\n// Never asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\ta.Never(func() bool { return false; }, time.Second, 10*time.Millisecond)\nfunc (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Never(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// Neverf asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\ta.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Neverf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Nil asserts that the specified object is nil.\n//\n//\ta.Nil(err)\nfunc (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Nil(a.t, object, msgAndArgs...)\n}\n\n// Nilf asserts that the specified object is nil.\n//\n//\ta.Nilf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Nilf(a.t, object, msg, args...)\n}\n\n// NoDirExists checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoDirExists(a.t, path, msgAndArgs...)\n}\n\n// NoDirExistsf checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoDirExistsf(a.t, path, msg, args...)\n}\n\n// NoError asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if a.NoError(err) {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoError(a.t, err, msgAndArgs...)\n}\n\n// NoErrorf asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if a.NoErrorf(err, \"error message %s\", \"formatted\") {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoErrorf(a.t, err, msg, args...)\n}\n\n// NoFileExists checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoFileExists(a.t, path, msgAndArgs...)\n}\n\n// NoFileExistsf checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NoFileExistsf(a.t, path, msg, args...)\n}\n\n// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\ta.NotContains(\"Hello World\", \"Earth\")\n//\ta.NotContains([\"Hello\", \"World\"], \"Earth\")\n//\ta.NotContains({\"Hello\": \"World\"}, \"Earth\")\nfunc (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotContains(a.t, s, contains, msgAndArgs...)\n}\n\n// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\ta.NotContainsf(\"Hello World\", \"Earth\", \"error message %s\", \"formatted\")\n//\ta.NotContainsf([\"Hello\", \"World\"], \"Earth\", \"error message %s\", \"formatted\")\n//\ta.NotContainsf({\"Hello\": \"World\"}, \"Earth\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotContainsf(a.t, s, contains, msg, args...)\n}\n\n// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false\n//\n// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true\n//\n// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true\nfunc (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotElementsMatch(a.t, listA, listB, msgAndArgs...)\n}\n\n// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], \"error message %s\", \"formatted\") -> false\n//\n// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], \"error message %s\", \"formatted\") -> true\n//\n// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], \"error message %s\", \"formatted\") -> true\nfunc (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotElementsMatchf(a.t, listA, listB, msg, args...)\n}\n\n// NotEmpty asserts that the specified object is NOT [Empty].\n//\n//\tif a.NotEmpty(obj) {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEmpty(a.t, object, msgAndArgs...)\n}\n\n// NotEmptyf asserts that the specified object is NOT [Empty].\n//\n//\tif a.NotEmptyf(obj, \"error message %s\", \"formatted\") {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEmptyf(a.t, object, msg, args...)\n}\n\n// NotEqual asserts that the specified values are NOT equal.\n//\n//\ta.NotEqual(obj1, obj2)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqual(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotEqualValues asserts that two objects are not equal even when converted to the same type\n//\n//\ta.NotEqualValues(obj1, obj2)\nfunc (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqualValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotEqualValuesf asserts that two objects are not equal even when converted to the same type\n//\n//\ta.NotEqualValuesf(obj1, obj2, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqualValuesf(a.t, expected, actual, msg, args...)\n}\n\n// NotEqualf asserts that the specified values are NOT equal.\n//\n//\ta.NotEqualf(obj1, obj2, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotEqualf(a.t, expected, actual, msg, args...)\n}\n\n// NotErrorAs asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorAs(a.t, err, target, msgAndArgs...)\n}\n\n// NotErrorAsf asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorAsf(a.t, err, target, msg, args...)\n}\n\n// NotErrorIs asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorIs(a.t, err, target, msgAndArgs...)\n}\n\n// NotErrorIsf asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotErrorIsf(a.t, err, target, msg, args...)\n}\n\n// NotImplements asserts that an object does not implement the specified interface.\n//\n//\ta.NotImplements((*MyInterface)(nil), new(MyObject))\nfunc (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotImplements(a.t, interfaceObject, object, msgAndArgs...)\n}\n\n// NotImplementsf asserts that an object does not implement the specified interface.\n//\n//\ta.NotImplementsf((*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotImplementsf(a.t, interfaceObject, object, msg, args...)\n}\n\n// NotNil asserts that the specified object is not nil.\n//\n//\ta.NotNil(err)\nfunc (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotNil(a.t, object, msgAndArgs...)\n}\n\n// NotNilf asserts that the specified object is not nil.\n//\n//\ta.NotNilf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotNilf(a.t, object, msg, args...)\n}\n\n// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\ta.NotPanics(func(){ RemainCalm() })\nfunc (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotPanics(a.t, f, msgAndArgs...)\n}\n\n// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\ta.NotPanicsf(func(){ RemainCalm() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotPanicsf(a.t, f, msg, args...)\n}\n\n// NotRegexp asserts that a specified regexp does not match a string.\n//\n//\ta.NotRegexp(regexp.MustCompile(\"starts\"), \"it's starting\")\n//\ta.NotRegexp(\"^start\", \"it's not starting\")\nfunc (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotRegexp(a.t, rx, str, msgAndArgs...)\n}\n\n// NotRegexpf asserts that a specified regexp does not match a string.\n//\n//\ta.NotRegexpf(regexp.MustCompile(\"starts\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\ta.NotRegexpf(\"^start\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotRegexpf(a.t, rx, str, msg, args...)\n}\n\n// NotSame asserts that two pointers do not reference the same object.\n//\n//\ta.NotSame(ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSame(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotSamef asserts that two pointers do not reference the same object.\n//\n//\ta.NotSamef(ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSamef(a.t, expected, actual, msg, args...)\n}\n\n// NotSubset asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.NotSubset([1, 3, 4], [1, 2])\n//\ta.NotSubset({\"x\": 1, \"y\": 2}, {\"z\": 3})\n//\ta.NotSubset([1, 3, 4], {1: \"one\", 2: \"two\"})\n//\ta.NotSubset({\"x\": 1, \"y\": 2}, [\"z\"])\nfunc (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSubset(a.t, list, subset, msgAndArgs...)\n}\n\n// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.NotSubsetf([1, 3, 4], [1, 2], \"error message %s\", \"formatted\")\n//\ta.NotSubsetf({\"x\": 1, \"y\": 2}, {\"z\": 3}, \"error message %s\", \"formatted\")\n//\ta.NotSubsetf([1, 3, 4], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\ta.NotSubsetf({\"x\": 1, \"y\": 2}, [\"z\"], \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotSubsetf(a.t, list, subset, msg, args...)\n}\n\n// NotZero asserts that i is not the zero value for its type.\nfunc (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotZero(a.t, i, msgAndArgs...)\n}\n\n// NotZerof asserts that i is not the zero value for its type.\nfunc (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn NotZerof(a.t, i, msg, args...)\n}\n\n// Panics asserts that the code inside the specified PanicTestFunc panics.\n//\n//\ta.Panics(func(){ GoCrazy() })\nfunc (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Panics(a.t, f, msgAndArgs...)\n}\n\n// PanicsWithError asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\ta.PanicsWithError(\"crazy error\", func(){ GoCrazy() })\nfunc (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithError(a.t, errString, f, msgAndArgs...)\n}\n\n// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\ta.PanicsWithErrorf(\"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithErrorf(a.t, errString, f, msg, args...)\n}\n\n// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\ta.PanicsWithValue(\"crazy error\", func(){ GoCrazy() })\nfunc (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithValue(a.t, expected, f, msgAndArgs...)\n}\n\n// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\ta.PanicsWithValuef(\"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn PanicsWithValuef(a.t, expected, f, msg, args...)\n}\n\n// Panicsf asserts that the code inside the specified PanicTestFunc panics.\n//\n//\ta.Panicsf(func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Panicsf(a.t, f, msg, args...)\n}\n\n// Positive asserts that the specified element is positive\n//\n//\ta.Positive(1)\n//\ta.Positive(1.23)\nfunc (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Positive(a.t, e, msgAndArgs...)\n}\n\n// Positivef asserts that the specified element is positive\n//\n//\ta.Positivef(1, \"error message %s\", \"formatted\")\n//\ta.Positivef(1.23, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Positivef(a.t, e, msg, args...)\n}\n\n// Regexp asserts that a specified regexp matches a string.\n//\n//\ta.Regexp(regexp.MustCompile(\"start\"), \"it's starting\")\n//\ta.Regexp(\"start...$\", \"it's not starting\")\nfunc (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Regexp(a.t, rx, str, msgAndArgs...)\n}\n\n// Regexpf asserts that a specified regexp matches a string.\n//\n//\ta.Regexpf(regexp.MustCompile(\"start\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\ta.Regexpf(\"start...$\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Regexpf(a.t, rx, str, msg, args...)\n}\n\n// Same asserts that two pointers reference the same object.\n//\n//\ta.Same(ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Same(a.t, expected, actual, msgAndArgs...)\n}\n\n// Samef asserts that two pointers reference the same object.\n//\n//\ta.Samef(ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Samef(a.t, expected, actual, msg, args...)\n}\n\n// Subset asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.Subset([1, 2, 3], [1, 2])\n//\ta.Subset({\"x\": 1, \"y\": 2}, {\"x\": 1})\n//\ta.Subset([1, 2, 3], {1: \"one\", 2: \"two\"})\n//\ta.Subset({\"x\": 1, \"y\": 2}, [\"x\"])\nfunc (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Subset(a.t, list, subset, msgAndArgs...)\n}\n\n// Subsetf asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.Subsetf([1, 2, 3], [1, 2], \"error message %s\", \"formatted\")\n//\ta.Subsetf({\"x\": 1, \"y\": 2}, {\"x\": 1}, \"error message %s\", \"formatted\")\n//\ta.Subsetf([1, 2, 3], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\ta.Subsetf({\"x\": 1, \"y\": 2}, [\"x\"], \"error message %s\", \"formatted\")\nfunc (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Subsetf(a.t, list, subset, msg, args...)\n}\n\n// True asserts that the specified value is true.\n//\n//\ta.True(myBool)\nfunc (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn True(a.t, value, msgAndArgs...)\n}\n\n// Truef asserts that the specified value is true.\n//\n//\ta.Truef(myBool, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Truef(a.t, value, msg, args...)\n}\n\n// WithinDuration asserts that the two times are within duration delta of each other.\n//\n//\ta.WithinDuration(time.Now(), time.Now(), 10*time.Second)\nfunc (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinDuration(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// WithinDurationf asserts that the two times are within duration delta of each other.\n//\n//\ta.WithinDurationf(time.Now(), time.Now(), 10*time.Second, \"error message %s\", \"formatted\")\nfunc (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinDurationf(a.t, expected, actual, delta, msg, args...)\n}\n\n// WithinRange asserts that a time is within a time range (inclusive).\n//\n//\ta.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))\nfunc (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinRange(a.t, actual, start, end, msgAndArgs...)\n}\n\n// WithinRangef asserts that a time is within a time range (inclusive).\n//\n//\ta.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), \"error message %s\", \"formatted\")\nfunc (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn WithinRangef(a.t, actual, start, end, msg, args...)\n}\n\n// YAMLEq asserts that two YAML strings are equivalent.\nfunc (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn YAMLEq(a.t, expected, actual, msgAndArgs...)\n}\n\n// YAMLEqf asserts that two YAML strings are equivalent.\nfunc (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn YAMLEqf(a.t, expected, actual, msg, args...)\n}\n\n// Zero asserts that i is the zero value for its type.\nfunc (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Zero(a.t, i, msgAndArgs...)\n}\n\n// Zerof asserts that i is the zero value for its type.\nfunc (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Zerof(a.t, i, msg, args...)\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl",
    "content": "{{.CommentWithoutT \"a\"}}\nfunc (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool {\n\tif h, ok := a.t.(tHelper); ok { h.Helper() }\n\treturn {{.DocInfo.Name}}(a.t, {{.ForwardedParams}})\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertion_order.go",
    "content": "package assert\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n)\n\n// isOrdered checks that collection contains orderable elements.\nfunc isOrdered(t TestingT, object interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool {\n\tobjKind := reflect.TypeOf(object).Kind()\n\tif objKind != reflect.Slice && objKind != reflect.Array {\n\t\treturn false\n\t}\n\n\tobjValue := reflect.ValueOf(object)\n\tobjLen := objValue.Len()\n\n\tif objLen <= 1 {\n\t\treturn true\n\t}\n\n\tvalue := objValue.Index(0)\n\tvalueInterface := value.Interface()\n\tfirstValueKind := value.Kind()\n\n\tfor i := 1; i < objLen; i++ {\n\t\tprevValue := value\n\t\tprevValueInterface := valueInterface\n\n\t\tvalue = objValue.Index(i)\n\t\tvalueInterface = value.Interface()\n\n\t\tcompareResult, isComparable := compare(prevValueInterface, valueInterface, firstValueKind)\n\n\t\tif !isComparable {\n\t\t\treturn Fail(t, fmt.Sprintf(`Can not compare type \"%T\" and \"%T\"`, value, prevValue), msgAndArgs...)\n\t\t}\n\n\t\tif !containsValue(allowedComparesResults, compareResult) {\n\t\t\treturn Fail(t, fmt.Sprintf(failMessage, prevValue, value), msgAndArgs...)\n\t\t}\n\t}\n\n\treturn true\n}\n\n// IsIncreasing asserts that the collection is increasing\n//\n//\tassert.IsIncreasing(t, []int{1, 2, 3})\n//\tassert.IsIncreasing(t, []float{1, 2})\n//\tassert.IsIncreasing(t, []string{\"a\", \"b\"})\nfunc IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\treturn isOrdered(t, object, []compareResult{compareLess}, \"\\\"%v\\\" is not less than \\\"%v\\\"\", msgAndArgs...)\n}\n\n// IsNonIncreasing asserts that the collection is not increasing\n//\n//\tassert.IsNonIncreasing(t, []int{2, 1, 1})\n//\tassert.IsNonIncreasing(t, []float{2, 1})\n//\tassert.IsNonIncreasing(t, []string{\"b\", \"a\"})\nfunc IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\treturn isOrdered(t, object, []compareResult{compareEqual, compareGreater}, \"\\\"%v\\\" is not greater than or equal to \\\"%v\\\"\", msgAndArgs...)\n}\n\n// IsDecreasing asserts that the collection is decreasing\n//\n//\tassert.IsDecreasing(t, []int{2, 1, 0})\n//\tassert.IsDecreasing(t, []float{2, 1})\n//\tassert.IsDecreasing(t, []string{\"b\", \"a\"})\nfunc IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\treturn isOrdered(t, object, []compareResult{compareGreater}, \"\\\"%v\\\" is not greater than \\\"%v\\\"\", msgAndArgs...)\n}\n\n// IsNonDecreasing asserts that the collection is not decreasing\n//\n//\tassert.IsNonDecreasing(t, []int{1, 1, 2})\n//\tassert.IsNonDecreasing(t, []float{1, 2})\n//\tassert.IsNonDecreasing(t, []string{\"a\", \"b\"})\nfunc IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\treturn isOrdered(t, object, []compareResult{compareLess, compareEqual}, \"\\\"%v\\\" is not less than or equal to \\\"%v\\\"\", msgAndArgs...)\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/assertions.go",
    "content": "package assert\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"runtime/debug\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n\n\t\"github.com/davecgh/go-spew/spew\"\n\t\"github.com/pmezard/go-difflib/difflib\"\n\n\t// Wrapper around gopkg.in/yaml.v3\n\t\"github.com/stretchr/testify/assert/yaml\"\n)\n\n//go:generate sh -c \"cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl\"\n\n// TestingT is an interface wrapper around *testing.T\ntype TestingT interface {\n\tErrorf(format string, args ...interface{})\n}\n\n// ComparisonAssertionFunc is a common function prototype when comparing two values.  Can be useful\n// for table driven tests.\ntype ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) bool\n\n// ValueAssertionFunc is a common function prototype when validating a single value.  Can be useful\n// for table driven tests.\ntype ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool\n\n// BoolAssertionFunc is a common function prototype when validating a bool value.  Can be useful\n// for table driven tests.\ntype BoolAssertionFunc func(TestingT, bool, ...interface{}) bool\n\n// ErrorAssertionFunc is a common function prototype when validating an error value.  Can be useful\n// for table driven tests.\ntype ErrorAssertionFunc func(TestingT, error, ...interface{}) bool\n\n// PanicAssertionFunc is a common function prototype when validating a panic value.  Can be useful\n// for table driven tests.\ntype PanicAssertionFunc = func(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool\n\n// Comparison is a custom function that returns true on success and false on failure\ntype Comparison func() (success bool)\n\n/*\n\tHelper functions\n*/\n\n// ObjectsAreEqual determines if two objects are considered equal.\n//\n// This function does no assertion of any kind.\nfunc ObjectsAreEqual(expected, actual interface{}) bool {\n\tif expected == nil || actual == nil {\n\t\treturn expected == actual\n\t}\n\n\texp, ok := expected.([]byte)\n\tif !ok {\n\t\treturn reflect.DeepEqual(expected, actual)\n\t}\n\n\tact, ok := actual.([]byte)\n\tif !ok {\n\t\treturn false\n\t}\n\tif exp == nil || act == nil {\n\t\treturn exp == nil && act == nil\n\t}\n\treturn bytes.Equal(exp, act)\n}\n\n// copyExportedFields iterates downward through nested data structures and creates a copy\n// that only contains the exported struct fields.\nfunc copyExportedFields(expected interface{}) interface{} {\n\tif isNil(expected) {\n\t\treturn expected\n\t}\n\n\texpectedType := reflect.TypeOf(expected)\n\texpectedKind := expectedType.Kind()\n\texpectedValue := reflect.ValueOf(expected)\n\n\tswitch expectedKind {\n\tcase reflect.Struct:\n\t\tresult := reflect.New(expectedType).Elem()\n\t\tfor i := 0; i < expectedType.NumField(); i++ {\n\t\t\tfield := expectedType.Field(i)\n\t\t\tisExported := field.IsExported()\n\t\t\tif isExported {\n\t\t\t\tfieldValue := expectedValue.Field(i)\n\t\t\t\tif isNil(fieldValue) || isNil(fieldValue.Interface()) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tnewValue := copyExportedFields(fieldValue.Interface())\n\t\t\t\tresult.Field(i).Set(reflect.ValueOf(newValue))\n\t\t\t}\n\t\t}\n\t\treturn result.Interface()\n\n\tcase reflect.Ptr:\n\t\tresult := reflect.New(expectedType.Elem())\n\t\tunexportedRemoved := copyExportedFields(expectedValue.Elem().Interface())\n\t\tresult.Elem().Set(reflect.ValueOf(unexportedRemoved))\n\t\treturn result.Interface()\n\n\tcase reflect.Array, reflect.Slice:\n\t\tvar result reflect.Value\n\t\tif expectedKind == reflect.Array {\n\t\t\tresult = reflect.New(reflect.ArrayOf(expectedValue.Len(), expectedType.Elem())).Elem()\n\t\t} else {\n\t\t\tresult = reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len())\n\t\t}\n\t\tfor i := 0; i < expectedValue.Len(); i++ {\n\t\t\tindex := expectedValue.Index(i)\n\t\t\tif isNil(index) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tunexportedRemoved := copyExportedFields(index.Interface())\n\t\t\tresult.Index(i).Set(reflect.ValueOf(unexportedRemoved))\n\t\t}\n\t\treturn result.Interface()\n\n\tcase reflect.Map:\n\t\tresult := reflect.MakeMap(expectedType)\n\t\tfor _, k := range expectedValue.MapKeys() {\n\t\t\tindex := expectedValue.MapIndex(k)\n\t\t\tunexportedRemoved := copyExportedFields(index.Interface())\n\t\t\tresult.SetMapIndex(k, reflect.ValueOf(unexportedRemoved))\n\t\t}\n\t\treturn result.Interface()\n\n\tdefault:\n\t\treturn expected\n\t}\n}\n\n// ObjectsExportedFieldsAreEqual determines if the exported (public) fields of two objects are\n// considered equal. This comparison of only exported fields is applied recursively to nested data\n// structures.\n//\n// This function does no assertion of any kind.\n//\n// Deprecated: Use [EqualExportedValues] instead.\nfunc ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool {\n\texpectedCleaned := copyExportedFields(expected)\n\tactualCleaned := copyExportedFields(actual)\n\treturn ObjectsAreEqualValues(expectedCleaned, actualCleaned)\n}\n\n// ObjectsAreEqualValues gets whether two objects are equal, or if their\n// values are equal.\nfunc ObjectsAreEqualValues(expected, actual interface{}) bool {\n\tif ObjectsAreEqual(expected, actual) {\n\t\treturn true\n\t}\n\n\texpectedValue := reflect.ValueOf(expected)\n\tactualValue := reflect.ValueOf(actual)\n\tif !expectedValue.IsValid() || !actualValue.IsValid() {\n\t\treturn false\n\t}\n\n\texpectedType := expectedValue.Type()\n\tactualType := actualValue.Type()\n\tif !expectedType.ConvertibleTo(actualType) {\n\t\treturn false\n\t}\n\n\tif !isNumericType(expectedType) || !isNumericType(actualType) {\n\t\t// Attempt comparison after type conversion\n\t\treturn reflect.DeepEqual(\n\t\t\texpectedValue.Convert(actualType).Interface(), actual,\n\t\t)\n\t}\n\n\t// If BOTH values are numeric, there are chances of false positives due\n\t// to overflow or underflow. So, we need to make sure to always convert\n\t// the smaller type to a larger type before comparing.\n\tif expectedType.Size() >= actualType.Size() {\n\t\treturn actualValue.Convert(expectedType).Interface() == expected\n\t}\n\n\treturn expectedValue.Convert(actualType).Interface() == actual\n}\n\n// isNumericType returns true if the type is one of:\n// int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64,\n// float32, float64, complex64, complex128\nfunc isNumericType(t reflect.Type) bool {\n\treturn t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128\n}\n\n/* CallerInfo is necessary because the assert functions use the testing object\ninternally, causing it to print the file:line of the assert method, rather than where\nthe problem actually occurred in calling code.*/\n\n// CallerInfo returns an array of strings containing the file and line number\n// of each stack frame leading from the current test to the assert call that\n// failed.\nfunc CallerInfo() []string {\n\tvar pc uintptr\n\tvar file string\n\tvar line int\n\tvar name string\n\n\tconst stackFrameBufferSize = 10\n\tpcs := make([]uintptr, stackFrameBufferSize)\n\n\tcallers := []string{}\n\toffset := 1\n\n\tfor {\n\t\tn := runtime.Callers(offset, pcs)\n\n\t\tif n == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tframes := runtime.CallersFrames(pcs[:n])\n\n\t\tfor {\n\t\t\tframe, more := frames.Next()\n\t\t\tpc = frame.PC\n\t\t\tfile = frame.File\n\t\t\tline = frame.Line\n\n\t\t\t// This is a huge edge case, but it will panic if this is the case, see #180\n\t\t\tif file == \"<autogenerated>\" {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tf := runtime.FuncForPC(pc)\n\t\t\tif f == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tname = f.Name()\n\n\t\t\t// testing.tRunner is the standard library function that calls\n\t\t\t// tests. Subtests are called directly by tRunner, without going through\n\t\t\t// the Test/Benchmark/Example function that contains the t.Run calls, so\n\t\t\t// with subtests we should break when we hit tRunner, without adding it\n\t\t\t// to the list of callers.\n\t\t\tif name == \"testing.tRunner\" {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tparts := strings.Split(file, \"/\")\n\t\t\tif len(parts) > 1 {\n\t\t\t\tfilename := parts[len(parts)-1]\n\t\t\t\tdir := parts[len(parts)-2]\n\t\t\t\tif (dir != \"assert\" && dir != \"mock\" && dir != \"require\") || filename == \"mock_test.go\" {\n\t\t\t\t\tcallers = append(callers, fmt.Sprintf(\"%s:%d\", file, line))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Drop the package\n\t\t\tdotPos := strings.LastIndexByte(name, '.')\n\t\t\tname = name[dotPos+1:]\n\t\t\tif isTest(name, \"Test\") ||\n\t\t\t\tisTest(name, \"Benchmark\") ||\n\t\t\t\tisTest(name, \"Example\") {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif !more {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Next batch\n\t\toffset += cap(pcs)\n\t}\n\n\treturn callers\n}\n\n// Stolen from the `go test` tool.\n// isTest tells whether name looks like a test (or benchmark, according to prefix).\n// It is a Test (say) if there is a character after Test that is not a lower-case letter.\n// We don't want TesticularCancer.\nfunc isTest(name, prefix string) bool {\n\tif !strings.HasPrefix(name, prefix) {\n\t\treturn false\n\t}\n\tif len(name) == len(prefix) { // \"Test\" is ok\n\t\treturn true\n\t}\n\tr, _ := utf8.DecodeRuneInString(name[len(prefix):])\n\treturn !unicode.IsLower(r)\n}\n\nfunc messageFromMsgAndArgs(msgAndArgs ...interface{}) string {\n\tif len(msgAndArgs) == 0 || msgAndArgs == nil {\n\t\treturn \"\"\n\t}\n\tif len(msgAndArgs) == 1 {\n\t\tmsg := msgAndArgs[0]\n\t\tif msgAsStr, ok := msg.(string); ok {\n\t\t\treturn msgAsStr\n\t\t}\n\t\treturn fmt.Sprintf(\"%+v\", msg)\n\t}\n\tif len(msgAndArgs) > 1 {\n\t\treturn fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)\n\t}\n\treturn \"\"\n}\n\n// Aligns the provided message so that all lines after the first line start at the same location as the first line.\n// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab).\n// The longestLabelLen parameter specifies the length of the longest label in the output (required because this is the\n// basis on which the alignment occurs).\nfunc indentMessageLines(message string, longestLabelLen int) string {\n\toutBuf := new(bytes.Buffer)\n\n\tfor i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ {\n\t\t// no need to align first line because it starts at the correct location (after the label)\n\t\tif i != 0 {\n\t\t\t// append alignLen+1 spaces to align with \"{{longestLabel}}:\" before adding tab\n\t\t\toutBuf.WriteString(\"\\n\\t\" + strings.Repeat(\" \", longestLabelLen+1) + \"\\t\")\n\t\t}\n\t\toutBuf.WriteString(scanner.Text())\n\t}\n\n\treturn outBuf.String()\n}\n\ntype failNower interface {\n\tFailNow()\n}\n\n// FailNow fails test\nfunc FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFail(t, failureMessage, msgAndArgs...)\n\n\t// We cannot extend TestingT with FailNow() and\n\t// maintain backwards compatibility, so we fallback\n\t// to panicking when FailNow is not available in\n\t// TestingT.\n\t// See issue #263\n\n\tif t, ok := t.(failNower); ok {\n\t\tt.FailNow()\n\t} else {\n\t\tpanic(\"test failed and t is missing `FailNow()`\")\n\t}\n\treturn false\n}\n\n// Fail reports a failure through\nfunc Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tcontent := []labeledContent{\n\t\t{\"Error Trace\", strings.Join(CallerInfo(), \"\\n\\t\\t\\t\")},\n\t\t{\"Error\", failureMessage},\n\t}\n\n\t// Add test name if the Go version supports it\n\tif n, ok := t.(interface {\n\t\tName() string\n\t}); ok {\n\t\tcontent = append(content, labeledContent{\"Test\", n.Name()})\n\t}\n\n\tmessage := messageFromMsgAndArgs(msgAndArgs...)\n\tif len(message) > 0 {\n\t\tcontent = append(content, labeledContent{\"Messages\", message})\n\t}\n\n\tt.Errorf(\"\\n%s\", \"\"+labeledOutput(content...))\n\n\treturn false\n}\n\ntype labeledContent struct {\n\tlabel   string\n\tcontent string\n}\n\n// labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner:\n//\n//\t\\t{{label}}:{{align_spaces}}\\t{{content}}\\n\n//\n// The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The \"\\t{{label}}:\" is for the label.\n// If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this\n// alignment is achieved, \"\\t{{content}}\\n\" is added for the output.\n//\n// If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line.\nfunc labeledOutput(content ...labeledContent) string {\n\tlongestLabel := 0\n\tfor _, v := range content {\n\t\tif len(v.label) > longestLabel {\n\t\t\tlongestLabel = len(v.label)\n\t\t}\n\t}\n\tvar output string\n\tfor _, v := range content {\n\t\toutput += \"\\t\" + v.label + \":\" + strings.Repeat(\" \", longestLabel-len(v.label)) + \"\\t\" + indentMessageLines(v.content, longestLabel) + \"\\n\"\n\t}\n\treturn output\n}\n\n// Implements asserts that an object is implemented by the specified interface.\n//\n//\tassert.Implements(t, (*MyInterface)(nil), new(MyObject))\nfunc Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinterfaceType := reflect.TypeOf(interfaceObject).Elem()\n\n\tif object == nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Cannot check if nil implements %v\", interfaceType), msgAndArgs...)\n\t}\n\tif !reflect.TypeOf(object).Implements(interfaceType) {\n\t\treturn Fail(t, fmt.Sprintf(\"%T must implement %v\", object, interfaceType), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotImplements asserts that an object does not implement the specified interface.\n//\n//\tassert.NotImplements(t, (*MyInterface)(nil), new(MyObject))\nfunc NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinterfaceType := reflect.TypeOf(interfaceObject).Elem()\n\n\tif object == nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Cannot check if nil does not implement %v\", interfaceType), msgAndArgs...)\n\t}\n\tif reflect.TypeOf(object).Implements(interfaceType) {\n\t\treturn Fail(t, fmt.Sprintf(\"%T implements %v\", object, interfaceType), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\nfunc isType(expectedType, object interface{}) bool {\n\treturn ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType))\n}\n\n// IsType asserts that the specified objects are of the same type.\n//\n//\tassert.IsType(t, &MyStruct{}, &MyStruct{})\nfunc IsType(t TestingT, expectedType, object interface{}, msgAndArgs ...interface{}) bool {\n\tif isType(expectedType, object) {\n\t\treturn true\n\t}\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(t, fmt.Sprintf(\"Object expected to be of type %T, but was %T\", expectedType, object), msgAndArgs...)\n}\n\n// IsNotType asserts that the specified objects are not of the same type.\n//\n//\tassert.IsNotType(t, &NotMyStruct{}, &MyStruct{})\nfunc IsNotType(t TestingT, theType, object interface{}, msgAndArgs ...interface{}) bool {\n\tif !isType(theType, object) {\n\t\treturn true\n\t}\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(t, fmt.Sprintf(\"Object type expected to be different than %T\", theType), msgAndArgs...)\n}\n\n// Equal asserts that two objects are equal.\n//\n//\tassert.Equal(t, 123, 123)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif err := validateEqualArgs(expected, actual); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Invalid operation: %#v == %#v (%s)\",\n\t\t\texpected, actual, err), msgAndArgs...)\n\t}\n\n\tif !ObjectsAreEqual(expected, actual) {\n\t\tdiff := diff(expected, actual)\n\t\texpected, actual = formatUnequalValues(expected, actual)\n\t\treturn Fail(t, fmt.Sprintf(\"Not equal: \\n\"+\n\t\t\t\"expected: %s\\n\"+\n\t\t\t\"actual  : %s%s\", expected, actual, diff), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// validateEqualArgs checks whether provided arguments can be safely used in the\n// Equal/NotEqual functions.\nfunc validateEqualArgs(expected, actual interface{}) error {\n\tif expected == nil && actual == nil {\n\t\treturn nil\n\t}\n\n\tif isFunction(expected) || isFunction(actual) {\n\t\treturn errors.New(\"cannot take func type as argument\")\n\t}\n\treturn nil\n}\n\n// Same asserts that two pointers reference the same object.\n//\n//\tassert.Same(t, ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tsame, ok := samePointers(expected, actual)\n\tif !ok {\n\t\treturn Fail(t, \"Both arguments must be pointers\", msgAndArgs...)\n\t}\n\n\tif !same {\n\t\t// both are pointers but not the same type & pointing to the same address\n\t\treturn Fail(t, fmt.Sprintf(\"Not same: \\n\"+\n\t\t\t\"expected: %p %#[1]v\\n\"+\n\t\t\t\"actual  : %p %#[2]v\",\n\t\t\texpected, actual), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotSame asserts that two pointers do not reference the same object.\n//\n//\tassert.NotSame(t, ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tsame, ok := samePointers(expected, actual)\n\tif !ok {\n\t\t// fails when the arguments are not pointers\n\t\treturn !(Fail(t, \"Both arguments must be pointers\", msgAndArgs...))\n\t}\n\n\tif same {\n\t\treturn Fail(t, fmt.Sprintf(\n\t\t\t\"Expected and actual point to the same object: %p %#[1]v\",\n\t\t\texpected), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// samePointers checks if two generic interface objects are pointers of the same\n// type pointing to the same object. It returns two values: same indicating if\n// they are the same type and point to the same object, and ok indicating that\n// both inputs are pointers.\nfunc samePointers(first, second interface{}) (same bool, ok bool) {\n\tfirstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second)\n\tif firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr {\n\t\treturn false, false // not both are pointers\n\t}\n\n\tfirstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second)\n\tif firstType != secondType {\n\t\treturn false, true // both are pointers, but of different types\n\t}\n\n\t// compare pointer addresses\n\treturn first == second, true\n}\n\n// formatUnequalValues takes two values of arbitrary types and returns string\n// representations appropriate to be presented to the user.\n//\n// If the values are not of like type, the returned strings will be prefixed\n// with the type name, and the value will be enclosed in parentheses similar\n// to a type conversion in the Go grammar.\nfunc formatUnequalValues(expected, actual interface{}) (e string, a string) {\n\tif reflect.TypeOf(expected) != reflect.TypeOf(actual) {\n\t\treturn fmt.Sprintf(\"%T(%s)\", expected, truncatingFormat(expected)),\n\t\t\tfmt.Sprintf(\"%T(%s)\", actual, truncatingFormat(actual))\n\t}\n\tswitch expected.(type) {\n\tcase time.Duration:\n\t\treturn fmt.Sprintf(\"%v\", expected), fmt.Sprintf(\"%v\", actual)\n\t}\n\treturn truncatingFormat(expected), truncatingFormat(actual)\n}\n\n// truncatingFormat formats the data and truncates it if it's too long.\n//\n// This helps keep formatted error messages lines from exceeding the\n// bufio.MaxScanTokenSize max line length that the go testing framework imposes.\nfunc truncatingFormat(data interface{}) string {\n\tvalue := fmt.Sprintf(\"%#v\", data)\n\tmax := bufio.MaxScanTokenSize - 100 // Give us some space the type info too if needed.\n\tif len(value) > max {\n\t\tvalue = value[0:max] + \"<... truncated>\"\n\t}\n\treturn value\n}\n\n// EqualValues asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\tassert.EqualValues(t, uint32(123), int32(123))\nfunc EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif !ObjectsAreEqualValues(expected, actual) {\n\t\tdiff := diff(expected, actual)\n\t\texpected, actual = formatUnequalValues(expected, actual)\n\t\treturn Fail(t, fmt.Sprintf(\"Not equal: \\n\"+\n\t\t\t\"expected: %s\\n\"+\n\t\t\t\"actual  : %s%s\", expected, actual, diff), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// EqualExportedValues asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true\n//\t assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false\nfunc EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\taType := reflect.TypeOf(expected)\n\tbType := reflect.TypeOf(actual)\n\n\tif aType != bType {\n\t\treturn Fail(t, fmt.Sprintf(\"Types expected to match exactly\\n\\t%v != %v\", aType, bType), msgAndArgs...)\n\t}\n\n\texpected = copyExportedFields(expected)\n\tactual = copyExportedFields(actual)\n\n\tif !ObjectsAreEqualValues(expected, actual) {\n\t\tdiff := diff(expected, actual)\n\t\texpected, actual = formatUnequalValues(expected, actual)\n\t\treturn Fail(t, fmt.Sprintf(\"Not equal (comparing only exported fields): \\n\"+\n\t\t\t\"expected: %s\\n\"+\n\t\t\t\"actual  : %s%s\", expected, actual, diff), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// Exactly asserts that two objects are equal in value and type.\n//\n//\tassert.Exactly(t, int32(123), int64(123))\nfunc Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\taType := reflect.TypeOf(expected)\n\tbType := reflect.TypeOf(actual)\n\n\tif aType != bType {\n\t\treturn Fail(t, fmt.Sprintf(\"Types expected to match exactly\\n\\t%v != %v\", aType, bType), msgAndArgs...)\n\t}\n\n\treturn Equal(t, expected, actual, msgAndArgs...)\n}\n\n// NotNil asserts that the specified object is not nil.\n//\n//\tassert.NotNil(t, err)\nfunc NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\tif !isNil(object) {\n\t\treturn true\n\t}\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(t, \"Expected value not to be nil.\", msgAndArgs...)\n}\n\n// isNil checks if a specified object is nil or not, without Failing.\nfunc isNil(object interface{}) bool {\n\tif object == nil {\n\t\treturn true\n\t}\n\n\tvalue := reflect.ValueOf(object)\n\tswitch value.Kind() {\n\tcase\n\t\treflect.Chan, reflect.Func,\n\t\treflect.Interface, reflect.Map,\n\t\treflect.Ptr, reflect.Slice, reflect.UnsafePointer:\n\n\t\treturn value.IsNil()\n\t}\n\n\treturn false\n}\n\n// Nil asserts that the specified object is nil.\n//\n//\tassert.Nil(t, err)\nfunc Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\tif isNil(object) {\n\t\treturn true\n\t}\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\treturn Fail(t, fmt.Sprintf(\"Expected nil, but got: %#v\", object), msgAndArgs...)\n}\n\n// isEmpty gets whether the specified object is considered empty or not.\nfunc isEmpty(object interface{}) bool {\n\t// get nil case out of the way\n\tif object == nil {\n\t\treturn true\n\t}\n\n\treturn isEmptyValue(reflect.ValueOf(object))\n}\n\n// isEmptyValue gets whether the specified reflect.Value is considered empty or not.\nfunc isEmptyValue(objValue reflect.Value) bool {\n\tif objValue.IsZero() {\n\t\treturn true\n\t}\n\t// Special cases of non-zero values that we consider empty\n\tswitch objValue.Kind() {\n\t// collection types are empty when they have no element\n\t// Note: array types are empty when they match their zero-initialized state.\n\tcase reflect.Chan, reflect.Map, reflect.Slice:\n\t\treturn objValue.Len() == 0\n\t// non-nil pointers are empty if the value they point to is empty\n\tcase reflect.Ptr:\n\t\treturn isEmptyValue(objValue.Elem())\n\t}\n\treturn false\n}\n\n// Empty asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\tassert.Empty(t, obj)\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\tpass := isEmpty(object)\n\tif !pass {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\tFail(t, fmt.Sprintf(\"Should be empty, but was %v\", object), msgAndArgs...)\n\t}\n\n\treturn pass\n}\n\n// NotEmpty asserts that the specified object is NOT [Empty].\n//\n//\tif assert.NotEmpty(t, obj) {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {\n\tpass := !isEmpty(object)\n\tif !pass {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\tFail(t, fmt.Sprintf(\"Should NOT be empty, but was %v\", object), msgAndArgs...)\n\t}\n\n\treturn pass\n}\n\n// getLen tries to get the length of an object.\n// It returns (0, false) if impossible.\nfunc getLen(x interface{}) (length int, ok bool) {\n\tv := reflect.ValueOf(x)\n\tdefer func() {\n\t\tok = recover() == nil\n\t}()\n\treturn v.Len(), true\n}\n\n// Len asserts that the specified object has specific length.\n// Len also fails if the object has a type that len() not accept.\n//\n//\tassert.Len(t, mySlice, 3)\nfunc Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tl, ok := getLen(object)\n\tif !ok {\n\t\treturn Fail(t, fmt.Sprintf(\"\\\"%v\\\" could not be applied builtin len()\", object), msgAndArgs...)\n\t}\n\n\tif l != length {\n\t\treturn Fail(t, fmt.Sprintf(\"\\\"%v\\\" should have %d item(s), but has %d\", object, length, l), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// True asserts that the specified value is true.\n//\n//\tassert.True(t, myBool)\nfunc True(t TestingT, value bool, msgAndArgs ...interface{}) bool {\n\tif !value {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\treturn Fail(t, \"Should be true\", msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// False asserts that the specified value is false.\n//\n//\tassert.False(t, myBool)\nfunc False(t TestingT, value bool, msgAndArgs ...interface{}) bool {\n\tif value {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\treturn Fail(t, \"Should be false\", msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotEqual asserts that the specified values are NOT equal.\n//\n//\tassert.NotEqual(t, obj1, obj2)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif err := validateEqualArgs(expected, actual); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Invalid operation: %#v != %#v (%s)\",\n\t\t\texpected, actual, err), msgAndArgs...)\n\t}\n\n\tif ObjectsAreEqual(expected, actual) {\n\t\treturn Fail(t, fmt.Sprintf(\"Should not be: %#v\\n\", actual), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotEqualValues asserts that two objects are not equal even when converted to the same type\n//\n//\tassert.NotEqualValues(t, obj1, obj2)\nfunc NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif ObjectsAreEqualValues(expected, actual) {\n\t\treturn Fail(t, fmt.Sprintf(\"Should not be: %#v\\n\", actual), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// containsElement try loop over the list check if the list includes the element.\n// return (false, false) if impossible.\n// return (true, false) if element was not found.\n// return (true, true) if element was found.\nfunc containsElement(list interface{}, element interface{}) (ok, found bool) {\n\tlistValue := reflect.ValueOf(list)\n\tlistType := reflect.TypeOf(list)\n\tif listType == nil {\n\t\treturn false, false\n\t}\n\tlistKind := listType.Kind()\n\tdefer func() {\n\t\tif e := recover(); e != nil {\n\t\t\tok = false\n\t\t\tfound = false\n\t\t}\n\t}()\n\n\tif listKind == reflect.String {\n\t\telementValue := reflect.ValueOf(element)\n\t\treturn true, strings.Contains(listValue.String(), elementValue.String())\n\t}\n\n\tif listKind == reflect.Map {\n\t\tmapKeys := listValue.MapKeys()\n\t\tfor i := 0; i < len(mapKeys); i++ {\n\t\t\tif ObjectsAreEqual(mapKeys[i].Interface(), element) {\n\t\t\t\treturn true, true\n\t\t\t}\n\t\t}\n\t\treturn true, false\n\t}\n\n\tfor i := 0; i < listValue.Len(); i++ {\n\t\tif ObjectsAreEqual(listValue.Index(i).Interface(), element) {\n\t\t\treturn true, true\n\t\t}\n\t}\n\treturn true, false\n}\n\n// Contains asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\tassert.Contains(t, \"Hello World\", \"World\")\n//\tassert.Contains(t, [\"Hello\", \"World\"], \"World\")\n//\tassert.Contains(t, {\"Hello\": \"World\"}, \"Hello\")\nfunc Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tok, found := containsElement(s, contains)\n\tif !ok {\n\t\treturn Fail(t, fmt.Sprintf(\"%#v could not be applied builtin len()\", s), msgAndArgs...)\n\t}\n\tif !found {\n\t\treturn Fail(t, fmt.Sprintf(\"%#v does not contain %#v\", s, contains), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\tassert.NotContains(t, \"Hello World\", \"Earth\")\n//\tassert.NotContains(t, [\"Hello\", \"World\"], \"Earth\")\n//\tassert.NotContains(t, {\"Hello\": \"World\"}, \"Earth\")\nfunc NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tok, found := containsElement(s, contains)\n\tif !ok {\n\t\treturn Fail(t, fmt.Sprintf(\"%#v could not be applied builtin len()\", s), msgAndArgs...)\n\t}\n\tif found {\n\t\treturn Fail(t, fmt.Sprintf(\"%#v should not contain %#v\", s, contains), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// Subset asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\tassert.Subset(t, [1, 2, 3], [1, 2])\n//\tassert.Subset(t, {\"x\": 1, \"y\": 2}, {\"x\": 1})\n//\tassert.Subset(t, [1, 2, 3], {1: \"one\", 2: \"two\"})\n//\tassert.Subset(t, {\"x\": 1, \"y\": 2}, [\"x\"])\nfunc Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif subset == nil {\n\t\treturn true // we consider nil to be equal to the nil set\n\t}\n\n\tlistKind := reflect.TypeOf(list).Kind()\n\tif listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {\n\t\treturn Fail(t, fmt.Sprintf(\"%q has an unsupported type %s\", list, listKind), msgAndArgs...)\n\t}\n\n\tsubsetKind := reflect.TypeOf(subset).Kind()\n\tif subsetKind != reflect.Array && subsetKind != reflect.Slice && subsetKind != reflect.Map {\n\t\treturn Fail(t, fmt.Sprintf(\"%q has an unsupported type %s\", subset, subsetKind), msgAndArgs...)\n\t}\n\n\tif subsetKind == reflect.Map && listKind == reflect.Map {\n\t\tsubsetMap := reflect.ValueOf(subset)\n\t\tactualMap := reflect.ValueOf(list)\n\n\t\tfor _, k := range subsetMap.MapKeys() {\n\t\t\tev := subsetMap.MapIndex(k)\n\t\t\tav := actualMap.MapIndex(k)\n\n\t\t\tif !av.IsValid() {\n\t\t\t\treturn Fail(t, fmt.Sprintf(\"%#v does not contain %#v\", list, subset), msgAndArgs...)\n\t\t\t}\n\t\t\tif !ObjectsAreEqual(ev.Interface(), av.Interface()) {\n\t\t\t\treturn Fail(t, fmt.Sprintf(\"%#v does not contain %#v\", list, subset), msgAndArgs...)\n\t\t\t}\n\t\t}\n\n\t\treturn true\n\t}\n\n\tsubsetList := reflect.ValueOf(subset)\n\tif subsetKind == reflect.Map {\n\t\tkeys := make([]interface{}, subsetList.Len())\n\t\tfor idx, key := range subsetList.MapKeys() {\n\t\t\tkeys[idx] = key.Interface()\n\t\t}\n\t\tsubsetList = reflect.ValueOf(keys)\n\t}\n\tfor i := 0; i < subsetList.Len(); i++ {\n\t\telement := subsetList.Index(i).Interface()\n\t\tok, found := containsElement(list, element)\n\t\tif !ok {\n\t\t\treturn Fail(t, fmt.Sprintf(\"%#v could not be applied builtin len()\", list), msgAndArgs...)\n\t\t}\n\t\tif !found {\n\t\t\treturn Fail(t, fmt.Sprintf(\"%#v does not contain %#v\", list, element), msgAndArgs...)\n\t\t}\n\t}\n\n\treturn true\n}\n\n// NotSubset asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\tassert.NotSubset(t, [1, 3, 4], [1, 2])\n//\tassert.NotSubset(t, {\"x\": 1, \"y\": 2}, {\"z\": 3})\n//\tassert.NotSubset(t, [1, 3, 4], {1: \"one\", 2: \"two\"})\n//\tassert.NotSubset(t, {\"x\": 1, \"y\": 2}, [\"z\"])\nfunc NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif subset == nil {\n\t\treturn Fail(t, \"nil is the empty set which is a subset of every set\", msgAndArgs...)\n\t}\n\n\tlistKind := reflect.TypeOf(list).Kind()\n\tif listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {\n\t\treturn Fail(t, fmt.Sprintf(\"%q has an unsupported type %s\", list, listKind), msgAndArgs...)\n\t}\n\n\tsubsetKind := reflect.TypeOf(subset).Kind()\n\tif subsetKind != reflect.Array && subsetKind != reflect.Slice && subsetKind != reflect.Map {\n\t\treturn Fail(t, fmt.Sprintf(\"%q has an unsupported type %s\", subset, subsetKind), msgAndArgs...)\n\t}\n\n\tif subsetKind == reflect.Map && listKind == reflect.Map {\n\t\tsubsetMap := reflect.ValueOf(subset)\n\t\tactualMap := reflect.ValueOf(list)\n\n\t\tfor _, k := range subsetMap.MapKeys() {\n\t\t\tev := subsetMap.MapIndex(k)\n\t\t\tav := actualMap.MapIndex(k)\n\n\t\t\tif !av.IsValid() {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif !ObjectsAreEqual(ev.Interface(), av.Interface()) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn Fail(t, fmt.Sprintf(\"%q is a subset of %q\", subset, list), msgAndArgs...)\n\t}\n\n\tsubsetList := reflect.ValueOf(subset)\n\tif subsetKind == reflect.Map {\n\t\tkeys := make([]interface{}, subsetList.Len())\n\t\tfor idx, key := range subsetList.MapKeys() {\n\t\t\tkeys[idx] = key.Interface()\n\t\t}\n\t\tsubsetList = reflect.ValueOf(keys)\n\t}\n\tfor i := 0; i < subsetList.Len(); i++ {\n\t\telement := subsetList.Index(i).Interface()\n\t\tok, found := containsElement(list, element)\n\t\tif !ok {\n\t\t\treturn Fail(t, fmt.Sprintf(\"%q could not be applied builtin len()\", list), msgAndArgs...)\n\t\t}\n\t\tif !found {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn Fail(t, fmt.Sprintf(\"%q is a subset of %q\", subset, list), msgAndArgs...)\n}\n\n// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])\nfunc ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif isEmpty(listA) && isEmpty(listB) {\n\t\treturn true\n\t}\n\n\tif !isList(t, listA, msgAndArgs...) || !isList(t, listB, msgAndArgs...) {\n\t\treturn false\n\t}\n\n\textraA, extraB := diffLists(listA, listB)\n\n\tif len(extraA) == 0 && len(extraB) == 0 {\n\t\treturn true\n\t}\n\n\treturn Fail(t, formatListDiff(listA, listB, extraA, extraB), msgAndArgs...)\n}\n\n// isList checks that the provided value is array or slice.\nfunc isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) {\n\tkind := reflect.TypeOf(list).Kind()\n\tif kind != reflect.Array && kind != reflect.Slice {\n\t\treturn Fail(t, fmt.Sprintf(\"%q has an unsupported type %s, expecting array or slice\", list, kind),\n\t\t\tmsgAndArgs...)\n\t}\n\treturn true\n}\n\n// diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B.\n// If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and\n// 5x in B, it will be 0x in extraA and 3x in extraB). The order of items in both lists is ignored.\nfunc diffLists(listA, listB interface{}) (extraA, extraB []interface{}) {\n\taValue := reflect.ValueOf(listA)\n\tbValue := reflect.ValueOf(listB)\n\n\taLen := aValue.Len()\n\tbLen := bValue.Len()\n\n\t// Mark indexes in bValue that we already used\n\tvisited := make([]bool, bLen)\n\tfor i := 0; i < aLen; i++ {\n\t\telement := aValue.Index(i).Interface()\n\t\tfound := false\n\t\tfor j := 0; j < bLen; j++ {\n\t\t\tif visited[j] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif ObjectsAreEqual(bValue.Index(j).Interface(), element) {\n\t\t\t\tvisited[j] = true\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !found {\n\t\t\textraA = append(extraA, element)\n\t\t}\n\t}\n\n\tfor j := 0; j < bLen; j++ {\n\t\tif visited[j] {\n\t\t\tcontinue\n\t\t}\n\t\textraB = append(extraB, bValue.Index(j).Interface())\n\t}\n\n\treturn\n}\n\nfunc formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string {\n\tvar msg bytes.Buffer\n\n\tmsg.WriteString(\"elements differ\")\n\tif len(extraA) > 0 {\n\t\tmsg.WriteString(\"\\n\\nextra elements in list A:\\n\")\n\t\tmsg.WriteString(spewConfig.Sdump(extraA))\n\t}\n\tif len(extraB) > 0 {\n\t\tmsg.WriteString(\"\\n\\nextra elements in list B:\\n\")\n\t\tmsg.WriteString(spewConfig.Sdump(extraB))\n\t}\n\tmsg.WriteString(\"\\n\\nlistA:\\n\")\n\tmsg.WriteString(spewConfig.Sdump(listA))\n\tmsg.WriteString(\"\\n\\nlistB:\\n\")\n\tmsg.WriteString(spewConfig.Sdump(listB))\n\n\treturn msg.String()\n}\n\n// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false\n//\n// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true\n//\n// assert.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true\nfunc NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif isEmpty(listA) && isEmpty(listB) {\n\t\treturn Fail(t, \"listA and listB contain the same elements\", msgAndArgs)\n\t}\n\n\tif !isList(t, listA, msgAndArgs...) {\n\t\treturn Fail(t, \"listA is not a list type\", msgAndArgs...)\n\t}\n\tif !isList(t, listB, msgAndArgs...) {\n\t\treturn Fail(t, \"listB is not a list type\", msgAndArgs...)\n\t}\n\n\textraA, extraB := diffLists(listA, listB)\n\tif len(extraA) == 0 && len(extraB) == 0 {\n\t\treturn Fail(t, \"listA and listB contain the same elements\", msgAndArgs)\n\t}\n\n\treturn true\n}\n\n// Condition uses a Comparison to assert a complex condition.\nfunc Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tresult := comp()\n\tif !result {\n\t\tFail(t, \"Condition failed!\", msgAndArgs...)\n\t}\n\treturn result\n}\n\n// PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics\n// methods, and represents a simple func that takes no arguments, and returns nothing.\ntype PanicTestFunc func()\n\n// didPanic returns true if the function passed to it panics. Otherwise, it returns false.\nfunc didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) {\n\tdidPanic = true\n\n\tdefer func() {\n\t\tmessage = recover()\n\t\tif didPanic {\n\t\t\tstack = string(debug.Stack())\n\t\t}\n\t}()\n\n\t// call the target function\n\tf()\n\tdidPanic = false\n\n\treturn\n}\n\n// Panics asserts that the code inside the specified PanicTestFunc panics.\n//\n//\tassert.Panics(t, func(){ GoCrazy() })\nfunc Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should panic\\n\\tPanic value:\\t%#v\", f, panicValue), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\tassert.PanicsWithValue(t, \"crazy error\", func(){ GoCrazy() })\nfunc PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tfuncDidPanic, panicValue, panickedStack := didPanic(f)\n\tif !funcDidPanic {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should panic\\n\\tPanic value:\\t%#v\", f, panicValue), msgAndArgs...)\n\t}\n\tif panicValue != expected {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should panic with value:\\t%#v\\n\\tPanic value:\\t%#v\\n\\tPanic stack:\\t%s\", f, expected, panicValue, panickedStack), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// PanicsWithError asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\tassert.PanicsWithError(t, \"crazy error\", func(){ GoCrazy() })\nfunc PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tfuncDidPanic, panicValue, panickedStack := didPanic(f)\n\tif !funcDidPanic {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should panic\\n\\tPanic value:\\t%#v\", f, panicValue), msgAndArgs...)\n\t}\n\tpanicErr, ok := panicValue.(error)\n\tif !ok || panicErr.Error() != errString {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should panic with error message:\\t%#v\\n\\tPanic value:\\t%#v\\n\\tPanic stack:\\t%s\", f, errString, panicValue, panickedStack), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\tassert.NotPanics(t, func(){ RemainCalm() })\nfunc NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic {\n\t\treturn Fail(t, fmt.Sprintf(\"func %#v should not panic\\n\\tPanic value:\\t%v\\n\\tPanic stack:\\t%s\", f, panicValue, panickedStack), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// WithinDuration asserts that the two times are within duration delta of each other.\n//\n//\tassert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)\nfunc WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tdt := expected.Sub(actual)\n\tif dt < -delta || dt > delta {\n\t\treturn Fail(t, fmt.Sprintf(\"Max difference between %v and %v allowed is %v, but difference was %v\", expected, actual, delta, dt), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// WithinRange asserts that a time is within a time range (inclusive).\n//\n//\tassert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))\nfunc WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif end.Before(start) {\n\t\treturn Fail(t, \"Start should be before end\", msgAndArgs...)\n\t}\n\n\tif actual.Before(start) {\n\t\treturn Fail(t, fmt.Sprintf(\"Time %v expected to be in time range %v to %v, but is before the range\", actual, start, end), msgAndArgs...)\n\t} else if actual.After(end) {\n\t\treturn Fail(t, fmt.Sprintf(\"Time %v expected to be in time range %v to %v, but is after the range\", actual, start, end), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\nfunc toFloat(x interface{}) (float64, bool) {\n\tvar xf float64\n\txok := true\n\n\tswitch xn := x.(type) {\n\tcase uint:\n\t\txf = float64(xn)\n\tcase uint8:\n\t\txf = float64(xn)\n\tcase uint16:\n\t\txf = float64(xn)\n\tcase uint32:\n\t\txf = float64(xn)\n\tcase uint64:\n\t\txf = float64(xn)\n\tcase int:\n\t\txf = float64(xn)\n\tcase int8:\n\t\txf = float64(xn)\n\tcase int16:\n\t\txf = float64(xn)\n\tcase int32:\n\t\txf = float64(xn)\n\tcase int64:\n\t\txf = float64(xn)\n\tcase float32:\n\t\txf = float64(xn)\n\tcase float64:\n\t\txf = xn\n\tcase time.Duration:\n\t\txf = float64(xn)\n\tdefault:\n\t\txok = false\n\t}\n\n\treturn xf, xok\n}\n\n// InDelta asserts that the two numerals are within delta of each other.\n//\n//\tassert.InDelta(t, math.Pi, 22/7.0, 0.01)\nfunc InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\taf, aok := toFloat(expected)\n\tbf, bok := toFloat(actual)\n\n\tif !aok || !bok {\n\t\treturn Fail(t, \"Parameters must be numerical\", msgAndArgs...)\n\t}\n\n\tif math.IsNaN(af) && math.IsNaN(bf) {\n\t\treturn true\n\t}\n\n\tif math.IsNaN(af) {\n\t\treturn Fail(t, \"Expected must not be NaN\", msgAndArgs...)\n\t}\n\n\tif math.IsNaN(bf) {\n\t\treturn Fail(t, fmt.Sprintf(\"Expected %v with delta %v, but was NaN\", expected, delta), msgAndArgs...)\n\t}\n\n\tdt := af - bf\n\tif dt < -delta || dt > delta {\n\t\treturn Fail(t, fmt.Sprintf(\"Max difference between %v and %v allowed is %v, but difference was %v\", expected, actual, delta, dt), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// InDeltaSlice is the same as InDelta, except it compares two slices.\nfunc InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif expected == nil || actual == nil ||\n\t\treflect.TypeOf(actual).Kind() != reflect.Slice ||\n\t\treflect.TypeOf(expected).Kind() != reflect.Slice {\n\t\treturn Fail(t, \"Parameters must be slice\", msgAndArgs...)\n\t}\n\n\tactualSlice := reflect.ValueOf(actual)\n\texpectedSlice := reflect.ValueOf(expected)\n\n\tfor i := 0; i < actualSlice.Len(); i++ {\n\t\tresult := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...)\n\t\tif !result {\n\t\t\treturn result\n\t\t}\n\t}\n\n\treturn true\n}\n\n// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif expected == nil || actual == nil ||\n\t\treflect.TypeOf(actual).Kind() != reflect.Map ||\n\t\treflect.TypeOf(expected).Kind() != reflect.Map {\n\t\treturn Fail(t, \"Arguments must be maps\", msgAndArgs...)\n\t}\n\n\texpectedMap := reflect.ValueOf(expected)\n\tactualMap := reflect.ValueOf(actual)\n\n\tif expectedMap.Len() != actualMap.Len() {\n\t\treturn Fail(t, \"Arguments must have the same number of keys\", msgAndArgs...)\n\t}\n\n\tfor _, k := range expectedMap.MapKeys() {\n\t\tev := expectedMap.MapIndex(k)\n\t\tav := actualMap.MapIndex(k)\n\n\t\tif !ev.IsValid() {\n\t\t\treturn Fail(t, fmt.Sprintf(\"missing key %q in expected map\", k), msgAndArgs...)\n\t\t}\n\n\t\tif !av.IsValid() {\n\t\t\treturn Fail(t, fmt.Sprintf(\"missing key %q in actual map\", k), msgAndArgs...)\n\t\t}\n\n\t\tif !InDelta(\n\t\t\tt,\n\t\t\tev.Interface(),\n\t\t\tav.Interface(),\n\t\t\tdelta,\n\t\t\tmsgAndArgs...,\n\t\t) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc calcRelativeError(expected, actual interface{}) (float64, error) {\n\taf, aok := toFloat(expected)\n\tbf, bok := toFloat(actual)\n\tif !aok || !bok {\n\t\treturn 0, fmt.Errorf(\"Parameters must be numerical\")\n\t}\n\tif math.IsNaN(af) && math.IsNaN(bf) {\n\t\treturn 0, nil\n\t}\n\tif math.IsNaN(af) {\n\t\treturn 0, errors.New(\"expected value must not be NaN\")\n\t}\n\tif af == 0 {\n\t\treturn 0, fmt.Errorf(\"expected value must have a value other than zero to calculate the relative error\")\n\t}\n\tif math.IsNaN(bf) {\n\t\treturn 0, errors.New(\"actual value must not be NaN\")\n\t}\n\n\treturn math.Abs(af-bf) / math.Abs(af), nil\n}\n\n// InEpsilon asserts that expected and actual have a relative error less than epsilon\nfunc InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif math.IsNaN(epsilon) {\n\t\treturn Fail(t, \"epsilon must not be NaN\", msgAndArgs...)\n\t}\n\tactualEpsilon, err := calcRelativeError(expected, actual)\n\tif err != nil {\n\t\treturn Fail(t, err.Error(), msgAndArgs...)\n\t}\n\tif math.IsNaN(actualEpsilon) {\n\t\treturn Fail(t, \"relative error is NaN\", msgAndArgs...)\n\t}\n\tif actualEpsilon > epsilon {\n\t\treturn Fail(t, fmt.Sprintf(\"Relative error is too high: %#v (expected)\\n\"+\n\t\t\t\"        < %#v (actual)\", epsilon, actualEpsilon), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.\nfunc InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tif expected == nil || actual == nil {\n\t\treturn Fail(t, \"Parameters must be slice\", msgAndArgs...)\n\t}\n\n\texpectedSlice := reflect.ValueOf(expected)\n\tactualSlice := reflect.ValueOf(actual)\n\n\tif expectedSlice.Type().Kind() != reflect.Slice {\n\t\treturn Fail(t, \"Expected value must be slice\", msgAndArgs...)\n\t}\n\n\texpectedLen := expectedSlice.Len()\n\tif !IsType(t, expected, actual) || !Len(t, actual, expectedLen) {\n\t\treturn false\n\t}\n\n\tfor i := 0; i < expectedLen; i++ {\n\t\tif !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, \"at index %d\", i) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\n/*\n\tErrors\n*/\n\n// NoError asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if assert.NoError(t, err) {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {\n\tif err != nil {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\treturn Fail(t, fmt.Sprintf(\"Received unexpected error:\\n%+v\", err), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// Error asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.Error(t, err)\nfunc Error(t TestingT, err error, msgAndArgs ...interface{}) bool {\n\tif err == nil {\n\t\tif h, ok := t.(tHelper); ok {\n\t\t\th.Helper()\n\t\t}\n\t\treturn Fail(t, \"An error is expected but got nil.\", msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// EqualError asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.EqualError(t, err,  expectedErrorString)\nfunc EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif !Error(t, theError, msgAndArgs...) {\n\t\treturn false\n\t}\n\texpected := errString\n\tactual := theError.Error()\n\t// don't need to use deep equals here, we know they are both strings\n\tif expected != actual {\n\t\treturn Fail(t, fmt.Sprintf(\"Error message not equal:\\n\"+\n\t\t\t\"expected: %q\\n\"+\n\t\t\t\"actual  : %q\", expected, actual), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// ErrorContains asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\tassert.ErrorContains(t, err,  expectedErrorSubString)\nfunc ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif !Error(t, theError, msgAndArgs...) {\n\t\treturn false\n\t}\n\n\tactual := theError.Error()\n\tif !strings.Contains(actual, contains) {\n\t\treturn Fail(t, fmt.Sprintf(\"Error %#v does not contain %#v\", actual, contains), msgAndArgs...)\n\t}\n\n\treturn true\n}\n\n// matchRegexp return true if a specified regexp matches a string.\nfunc matchRegexp(rx interface{}, str interface{}) bool {\n\tvar r *regexp.Regexp\n\tif rr, ok := rx.(*regexp.Regexp); ok {\n\t\tr = rr\n\t} else {\n\t\tr = regexp.MustCompile(fmt.Sprint(rx))\n\t}\n\n\tswitch v := str.(type) {\n\tcase []byte:\n\t\treturn r.Match(v)\n\tcase string:\n\t\treturn r.MatchString(v)\n\tdefault:\n\t\treturn r.MatchString(fmt.Sprint(v))\n\t}\n}\n\n// Regexp asserts that a specified regexp matches a string.\n//\n//\tassert.Regexp(t, regexp.MustCompile(\"start\"), \"it's starting\")\n//\tassert.Regexp(t, \"start...$\", \"it's not starting\")\nfunc Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tmatch := matchRegexp(rx, str)\n\n\tif !match {\n\t\tFail(t, fmt.Sprintf(\"Expect \\\"%v\\\" to match \\\"%v\\\"\", str, rx), msgAndArgs...)\n\t}\n\n\treturn match\n}\n\n// NotRegexp asserts that a specified regexp does not match a string.\n//\n//\tassert.NotRegexp(t, regexp.MustCompile(\"starts\"), \"it's starting\")\n//\tassert.NotRegexp(t, \"^start\", \"it's not starting\")\nfunc NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tmatch := matchRegexp(rx, str)\n\n\tif match {\n\t\tFail(t, fmt.Sprintf(\"Expect \\\"%v\\\" to NOT match \\\"%v\\\"\", str, rx), msgAndArgs...)\n\t}\n\n\treturn !match\n}\n\n// Zero asserts that i is the zero value for its type.\nfunc Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) {\n\t\treturn Fail(t, fmt.Sprintf(\"Should be zero, but was %v\", i), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// NotZero asserts that i is not the zero value for its type.\nfunc NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) {\n\t\treturn Fail(t, fmt.Sprintf(\"Should not be zero, but was %v\", i), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// FileExists checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinfo, err := os.Lstat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn Fail(t, fmt.Sprintf(\"unable to find file %q\", path), msgAndArgs...)\n\t\t}\n\t\treturn Fail(t, fmt.Sprintf(\"error when running os.Lstat(%q): %s\", path, err), msgAndArgs...)\n\t}\n\tif info.IsDir() {\n\t\treturn Fail(t, fmt.Sprintf(\"%q is a directory\", path), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// NoFileExists checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinfo, err := os.Lstat(path)\n\tif err != nil {\n\t\treturn true\n\t}\n\tif info.IsDir() {\n\t\treturn true\n\t}\n\treturn Fail(t, fmt.Sprintf(\"file %q exists\", path), msgAndArgs...)\n}\n\n// DirExists checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinfo, err := os.Lstat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn Fail(t, fmt.Sprintf(\"unable to find file %q\", path), msgAndArgs...)\n\t\t}\n\t\treturn Fail(t, fmt.Sprintf(\"error when running os.Lstat(%q): %s\", path, err), msgAndArgs...)\n\t}\n\tif !info.IsDir() {\n\t\treturn Fail(t, fmt.Sprintf(\"%q is a file\", path), msgAndArgs...)\n\t}\n\treturn true\n}\n\n// NoDirExists checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tinfo, err := os.Lstat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn true\n\t\t}\n\t\treturn true\n\t}\n\tif !info.IsDir() {\n\t\treturn true\n\t}\n\treturn Fail(t, fmt.Sprintf(\"directory %q exists\", path), msgAndArgs...)\n}\n\n// JSONEq asserts that two JSON strings are equivalent.\n//\n//\tassert.JSONEq(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\nfunc JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tvar expectedJSONAsInterface, actualJSONAsInterface interface{}\n\n\tif err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Expected value ('%s') is not valid json.\\nJSON parsing error: '%s'\", expected, err.Error()), msgAndArgs...)\n\t}\n\n\t// Shortcut if same bytes\n\tif actual == expected {\n\t\treturn true\n\t}\n\n\tif err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Input ('%s') needs to be valid json.\\nJSON parsing error: '%s'\", actual, err.Error()), msgAndArgs...)\n\t}\n\n\treturn Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...)\n}\n\n// YAMLEq asserts that two YAML strings are equivalent.\nfunc YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tvar expectedYAMLAsInterface, actualYAMLAsInterface interface{}\n\n\tif err := yaml.Unmarshal([]byte(expected), &expectedYAMLAsInterface); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Expected value ('%s') is not valid yaml.\\nYAML parsing error: '%s'\", expected, err.Error()), msgAndArgs...)\n\t}\n\n\t// Shortcut if same bytes\n\tif actual == expected {\n\t\treturn true\n\t}\n\n\tif err := yaml.Unmarshal([]byte(actual), &actualYAMLAsInterface); err != nil {\n\t\treturn Fail(t, fmt.Sprintf(\"Input ('%s') needs to be valid yaml.\\nYAML error: '%s'\", actual, err.Error()), msgAndArgs...)\n\t}\n\n\treturn Equal(t, expectedYAMLAsInterface, actualYAMLAsInterface, msgAndArgs...)\n}\n\nfunc typeAndKind(v interface{}) (reflect.Type, reflect.Kind) {\n\tt := reflect.TypeOf(v)\n\tk := t.Kind()\n\n\tif k == reflect.Ptr {\n\t\tt = t.Elem()\n\t\tk = t.Kind()\n\t}\n\treturn t, k\n}\n\n// diff returns a diff of both values as long as both are of the same type and\n// are a struct, map, slice, array or string. Otherwise it returns an empty string.\nfunc diff(expected interface{}, actual interface{}) string {\n\tif expected == nil || actual == nil {\n\t\treturn \"\"\n\t}\n\n\tet, ek := typeAndKind(expected)\n\tat, _ := typeAndKind(actual)\n\n\tif et != at {\n\t\treturn \"\"\n\t}\n\n\tif ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array && ek != reflect.String {\n\t\treturn \"\"\n\t}\n\n\tvar e, a string\n\n\tswitch et {\n\tcase reflect.TypeOf(\"\"):\n\t\te = reflect.ValueOf(expected).String()\n\t\ta = reflect.ValueOf(actual).String()\n\tcase reflect.TypeOf(time.Time{}):\n\t\te = spewConfigStringerEnabled.Sdump(expected)\n\t\ta = spewConfigStringerEnabled.Sdump(actual)\n\tdefault:\n\t\te = spewConfig.Sdump(expected)\n\t\ta = spewConfig.Sdump(actual)\n\t}\n\n\tdiff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{\n\t\tA:        difflib.SplitLines(e),\n\t\tB:        difflib.SplitLines(a),\n\t\tFromFile: \"Expected\",\n\t\tFromDate: \"\",\n\t\tToFile:   \"Actual\",\n\t\tToDate:   \"\",\n\t\tContext:  1,\n\t})\n\n\treturn \"\\n\\nDiff:\\n\" + diff\n}\n\nfunc isFunction(arg interface{}) bool {\n\tif arg == nil {\n\t\treturn false\n\t}\n\treturn reflect.TypeOf(arg).Kind() == reflect.Func\n}\n\nvar spewConfig = spew.ConfigState{\n\tIndent:                  \" \",\n\tDisablePointerAddresses: true,\n\tDisableCapacities:       true,\n\tSortKeys:                true,\n\tDisableMethods:          true,\n\tMaxDepth:                10,\n}\n\nvar spewConfigStringerEnabled = spew.ConfigState{\n\tIndent:                  \" \",\n\tDisablePointerAddresses: true,\n\tDisableCapacities:       true,\n\tSortKeys:                true,\n\tMaxDepth:                10,\n}\n\ntype tHelper = interface {\n\tHelper()\n}\n\n// Eventually asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\tassert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond)\nfunc Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tch := make(chan bool, 1)\n\tcheckCond := func() { ch <- condition() }\n\n\ttimer := time.NewTimer(waitFor)\n\tdefer timer.Stop()\n\n\tticker := time.NewTicker(tick)\n\tdefer ticker.Stop()\n\n\tvar tickC <-chan time.Time\n\n\t// Check the condition once first on the initial call.\n\tgo checkCond()\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\treturn Fail(t, \"Condition never satisfied\", msgAndArgs...)\n\t\tcase <-tickC:\n\t\t\ttickC = nil\n\t\t\tgo checkCond()\n\t\tcase v := <-ch:\n\t\t\tif v {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\ttickC = ticker.C\n\t\t}\n\t}\n}\n\n// CollectT implements the TestingT interface and collects all errors.\ntype CollectT struct {\n\t// A slice of errors. Non-nil slice denotes a failure.\n\t// If it's non-nil but len(c.errors) == 0, this is also a failure\n\t// obtained by direct c.FailNow() call.\n\terrors []error\n}\n\n// Helper is like [testing.T.Helper] but does nothing.\nfunc (CollectT) Helper() {}\n\n// Errorf collects the error.\nfunc (c *CollectT) Errorf(format string, args ...interface{}) {\n\tc.errors = append(c.errors, fmt.Errorf(format, args...))\n}\n\n// FailNow stops execution by calling runtime.Goexit.\nfunc (c *CollectT) FailNow() {\n\tc.fail()\n\truntime.Goexit()\n}\n\n// Deprecated: That was a method for internal usage that should not have been published. Now just panics.\nfunc (*CollectT) Reset() {\n\tpanic(\"Reset() is deprecated\")\n}\n\n// Deprecated: That was a method for internal usage that should not have been published. Now just panics.\nfunc (*CollectT) Copy(TestingT) {\n\tpanic(\"Copy() is deprecated\")\n}\n\nfunc (c *CollectT) fail() {\n\tif !c.failed() {\n\t\tc.errors = []error{} // Make it non-nil to mark a failure.\n\t}\n}\n\nfunc (c *CollectT) failed() bool {\n\treturn c.errors != nil\n}\n\n// EventuallyWithT asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\tassert.EventuallyWithT(t, func(c *assert.CollectT) {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tvar lastFinishedTickErrs []error\n\tch := make(chan *CollectT, 1)\n\n\tcheckCond := func() {\n\t\tcollect := new(CollectT)\n\t\tdefer func() {\n\t\t\tch <- collect\n\t\t}()\n\t\tcondition(collect)\n\t}\n\n\ttimer := time.NewTimer(waitFor)\n\tdefer timer.Stop()\n\n\tticker := time.NewTicker(tick)\n\tdefer ticker.Stop()\n\n\tvar tickC <-chan time.Time\n\n\t// Check the condition once first on the initial call.\n\tgo checkCond()\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\tfor _, err := range lastFinishedTickErrs {\n\t\t\t\tt.Errorf(\"%v\", err)\n\t\t\t}\n\t\t\treturn Fail(t, \"Condition never satisfied\", msgAndArgs...)\n\t\tcase <-tickC:\n\t\t\ttickC = nil\n\t\t\tgo checkCond()\n\t\tcase collect := <-ch:\n\t\t\tif !collect.failed() {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\t// Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached.\n\t\t\tlastFinishedTickErrs = collect.errors\n\t\t\ttickC = ticker.C\n\t\t}\n\t}\n}\n\n// Never asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\tassert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond)\nfunc Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\n\tch := make(chan bool, 1)\n\tcheckCond := func() { ch <- condition() }\n\n\ttimer := time.NewTimer(waitFor)\n\tdefer timer.Stop()\n\n\tticker := time.NewTicker(tick)\n\tdefer ticker.Stop()\n\n\tvar tickC <-chan time.Time\n\n\t// Check the condition once first on the initial call.\n\tgo checkCond()\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\treturn true\n\t\tcase <-tickC:\n\t\t\ttickC = nil\n\t\t\tgo checkCond()\n\t\tcase v := <-ch:\n\t\t\tif v {\n\t\t\t\treturn Fail(t, \"Condition satisfied\", msgAndArgs...)\n\t\t\t}\n\t\t\ttickC = ticker.C\n\t\t}\n\t}\n}\n\n// ErrorIs asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif errors.Is(err, target) {\n\t\treturn true\n\t}\n\n\tvar expectedText string\n\tif target != nil {\n\t\texpectedText = target.Error()\n\t\tif err == nil {\n\t\t\treturn Fail(t, fmt.Sprintf(\"Expected error with %q in chain but got nil.\", expectedText), msgAndArgs...)\n\t\t}\n\t}\n\n\tchain := buildErrorChainString(err, false)\n\n\treturn Fail(t, fmt.Sprintf(\"Target error should be in err chain:\\n\"+\n\t\t\"expected: %q\\n\"+\n\t\t\"in chain: %s\", expectedText, chain,\n\t), msgAndArgs...)\n}\n\n// NotErrorIs asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif !errors.Is(err, target) {\n\t\treturn true\n\t}\n\n\tvar expectedText string\n\tif target != nil {\n\t\texpectedText = target.Error()\n\t}\n\n\tchain := buildErrorChainString(err, false)\n\n\treturn Fail(t, fmt.Sprintf(\"Target error should not be in err chain:\\n\"+\n\t\t\"found: %q\\n\"+\n\t\t\"in chain: %s\", expectedText, chain,\n\t), msgAndArgs...)\n}\n\n// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif errors.As(err, target) {\n\t\treturn true\n\t}\n\n\texpectedType := reflect.TypeOf(target).Elem().String()\n\tif err == nil {\n\t\treturn Fail(t, fmt.Sprintf(\"An error is expected but got nil.\\n\"+\n\t\t\t\"expected: %s\", expectedType), msgAndArgs...)\n\t}\n\n\tchain := buildErrorChainString(err, true)\n\n\treturn Fail(t, fmt.Sprintf(\"Should be in error chain:\\n\"+\n\t\t\"expected: %s\\n\"+\n\t\t\"in chain: %s\", expectedType, chain,\n\t), msgAndArgs...)\n}\n\n// NotErrorAs asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif !errors.As(err, target) {\n\t\treturn true\n\t}\n\n\tchain := buildErrorChainString(err, true)\n\n\treturn Fail(t, fmt.Sprintf(\"Target error should not be in err chain:\\n\"+\n\t\t\"found: %s\\n\"+\n\t\t\"in chain: %s\", reflect.TypeOf(target).Elem().String(), chain,\n\t), msgAndArgs...)\n}\n\nfunc unwrapAll(err error) (errs []error) {\n\terrs = append(errs, err)\n\tswitch x := err.(type) {\n\tcase interface{ Unwrap() error }:\n\t\terr = x.Unwrap()\n\t\tif err == nil {\n\t\t\treturn\n\t\t}\n\t\terrs = append(errs, unwrapAll(err)...)\n\tcase interface{ Unwrap() []error }:\n\t\tfor _, err := range x.Unwrap() {\n\t\t\terrs = append(errs, unwrapAll(err)...)\n\t\t}\n\t}\n\treturn\n}\n\nfunc buildErrorChainString(err error, withType bool) string {\n\tif err == nil {\n\t\treturn \"\"\n\t}\n\n\tvar chain string\n\terrs := unwrapAll(err)\n\tfor i := range errs {\n\t\tif i != 0 {\n\t\t\tchain += \"\\n\\t\"\n\t\t}\n\t\tchain += fmt.Sprintf(\"%q\", errs[i].Error())\n\t\tif withType {\n\t\t\tchain += fmt.Sprintf(\" (%T)\", errs[i])\n\t\t}\n\t}\n\treturn chain\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/doc.go",
    "content": "// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.\n//\n// # Note\n//\n// All functions in this package return a bool value indicating whether the assertion has passed.\n//\n// # Example Usage\n//\n// The following is a complete example using assert in a standard test function:\n//\n//\timport (\n//\t  \"testing\"\n//\t  \"github.com/stretchr/testify/assert\"\n//\t)\n//\n//\tfunc TestSomething(t *testing.T) {\n//\n//\t  var a string = \"Hello\"\n//\t  var b string = \"Hello\"\n//\n//\t  assert.Equal(t, a, b, \"The two words should be the same.\")\n//\n//\t}\n//\n// if you assert many times, use the format below:\n//\n//\timport (\n//\t  \"testing\"\n//\t  \"github.com/stretchr/testify/assert\"\n//\t)\n//\n//\tfunc TestSomething(t *testing.T) {\n//\t  assert := assert.New(t)\n//\n//\t  var a string = \"Hello\"\n//\t  var b string = \"Hello\"\n//\n//\t  assert.Equal(a, b, \"The two words should be the same.\")\n//\t}\n//\n// # Assertions\n//\n// Assertions allow you to easily write test code, and are global funcs in the `assert` package.\n// All assertion functions take, as the first argument, the `*testing.T` object provided by the\n// testing framework. This allows the assertion funcs to write the failings and other details to\n// the correct place.\n//\n// Every assertion function also takes an optional string message as the final argument,\n// allowing custom error messages to be appended to the message the assertion method outputs.\npackage assert\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/errors.go",
    "content": "package assert\n\nimport (\n\t\"errors\"\n)\n\n// AnError is an error instance useful for testing.  If the code does not care\n// about error specifics, and only needs to return the error for example, this\n// error should be used to make the test code more readable.\nvar AnError = errors.New(\"assert.AnError general error for testing\")\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/forward_assertions.go",
    "content": "package assert\n\n// Assertions provides assertion methods around the\n// TestingT interface.\ntype Assertions struct {\n\tt TestingT\n}\n\n// New makes a new Assertions object for the specified TestingT.\nfunc New(t TestingT) *Assertions {\n\treturn &Assertions{\n\t\tt: t,\n\t}\n}\n\n//go:generate sh -c \"cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs\"\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/http_assertions.go",
    "content": "package assert\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"net/url\"\n\t\"strings\"\n)\n\n// httpCode is a helper that returns HTTP code of the response. It returns -1 and\n// an error if building a new request fails.\nfunc httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) {\n\tw := httptest.NewRecorder()\n\treq, err := http.NewRequest(method, url, http.NoBody)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\treq.URL.RawQuery = values.Encode()\n\thandler(w, req)\n\treturn w.Code, nil\n}\n\n// HTTPSuccess asserts that a specified handler returns a success status code.\n//\n//\tassert.HTTPSuccess(t, myHandler, \"POST\", \"http://www.google.com\", nil)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tcode, err := httpCode(handler, method, url, values)\n\tif err != nil {\n\t\tFail(t, fmt.Sprintf(\"Failed to build test request, got error: %s\", err), msgAndArgs...)\n\t}\n\n\tisSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent\n\tif !isSuccessCode {\n\t\tFail(t, fmt.Sprintf(\"Expected HTTP success status code for %q but received %d\", url+\"?\"+values.Encode(), code), msgAndArgs...)\n\t}\n\n\treturn isSuccessCode\n}\n\n// HTTPRedirect asserts that a specified handler returns a redirect status code.\n//\n//\tassert.HTTPRedirect(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tcode, err := httpCode(handler, method, url, values)\n\tif err != nil {\n\t\tFail(t, fmt.Sprintf(\"Failed to build test request, got error: %s\", err), msgAndArgs...)\n\t}\n\n\tisRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect\n\tif !isRedirectCode {\n\t\tFail(t, fmt.Sprintf(\"Expected HTTP redirect status code for %q but received %d\", url+\"?\"+values.Encode(), code), msgAndArgs...)\n\t}\n\n\treturn isRedirectCode\n}\n\n// HTTPError asserts that a specified handler returns an error status code.\n//\n//\tassert.HTTPError(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tcode, err := httpCode(handler, method, url, values)\n\tif err != nil {\n\t\tFail(t, fmt.Sprintf(\"Failed to build test request, got error: %s\", err), msgAndArgs...)\n\t}\n\n\tisErrorCode := code >= http.StatusBadRequest\n\tif !isErrorCode {\n\t\tFail(t, fmt.Sprintf(\"Expected HTTP error status code for %q but received %d\", url+\"?\"+values.Encode(), code), msgAndArgs...)\n\t}\n\n\treturn isErrorCode\n}\n\n// HTTPStatusCode asserts that a specified handler returns a specified status code.\n//\n//\tassert.HTTPStatusCode(t, myHandler, \"GET\", \"/notImplemented\", nil, 501)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tcode, err := httpCode(handler, method, url, values)\n\tif err != nil {\n\t\tFail(t, fmt.Sprintf(\"Failed to build test request, got error: %s\", err), msgAndArgs...)\n\t}\n\n\tsuccessful := code == statuscode\n\tif !successful {\n\t\tFail(t, fmt.Sprintf(\"Expected HTTP status code %d for %q but received %d\", statuscode, url+\"?\"+values.Encode(), code), msgAndArgs...)\n\t}\n\n\treturn successful\n}\n\n// HTTPBody is a helper that returns HTTP body of the response. It returns\n// empty string if building a new request fails.\nfunc HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string {\n\tw := httptest.NewRecorder()\n\tif len(values) > 0 {\n\t\turl += \"?\" + values.Encode()\n\t}\n\treq, err := http.NewRequest(method, url, http.NoBody)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\thandler(w, req)\n\treturn w.Body.String()\n}\n\n// HTTPBodyContains asserts that a specified handler returns a\n// body that contains a string.\n//\n//\tassert.HTTPBodyContains(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tbody := HTTPBody(handler, method, url, values)\n\n\tcontains := strings.Contains(body, fmt.Sprint(str))\n\tif !contains {\n\t\tFail(t, fmt.Sprintf(\"Expected response body for %q to contain %q but found %q\", url+\"?\"+values.Encode(), str, body), msgAndArgs...)\n\t}\n\n\treturn contains\n}\n\n// HTTPBodyNotContains asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\tassert.HTTPBodyNotContains(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tbody := HTTPBody(handler, method, url, values)\n\n\tcontains := strings.Contains(body, fmt.Sprint(str))\n\tif contains {\n\t\tFail(t, fmt.Sprintf(\"Expected response body for %q to NOT contain %q but found %q\", url+\"?\"+values.Encode(), str, body), msgAndArgs...)\n\t}\n\n\treturn !contains\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go",
    "content": "//go:build testify_yaml_custom && !testify_yaml_fail && !testify_yaml_default\n\n// Package yaml is an implementation of YAML functions that calls a pluggable implementation.\n//\n// This implementation is selected with the testify_yaml_custom build tag.\n//\n//\tgo test -tags testify_yaml_custom\n//\n// This implementation can be used at build time to replace the default implementation\n// to avoid linking with [gopkg.in/yaml.v3].\n//\n// In your test package:\n//\n//\t\timport assertYaml \"github.com/stretchr/testify/assert/yaml\"\n//\n//\t\tfunc init() {\n//\t\t\tassertYaml.Unmarshal = func (in []byte, out interface{}) error {\n//\t\t\t\t// ...\n//\t     \t\t\treturn nil\n//\t\t\t}\n//\t\t}\npackage yaml\n\nvar Unmarshal func(in []byte, out interface{}) error\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go",
    "content": "//go:build !testify_yaml_fail && !testify_yaml_custom\n\n// Package yaml is just an indirection to handle YAML deserialization.\n//\n// This package is just an indirection that allows the builder to override the\n// indirection with an alternative implementation of this package that uses\n// another implementation of YAML deserialization. This allows to not either not\n// use YAML deserialization at all, or to use another implementation than\n// [gopkg.in/yaml.v3] (for example for license compatibility reasons, see [PR #1120]).\n//\n// Alternative implementations are selected using build tags:\n//\n//   - testify_yaml_fail: [Unmarshal] always fails with an error\n//   - testify_yaml_custom: [Unmarshal] is a variable. Caller must initialize it\n//     before calling any of [github.com/stretchr/testify/assert.YAMLEq] or\n//     [github.com/stretchr/testify/assert.YAMLEqf].\n//\n// Usage:\n//\n//\tgo test -tags testify_yaml_fail\n//\n// You can check with \"go list\" which implementation is linked:\n//\n//\tgo list -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml\n//\tgo list -tags testify_yaml_fail -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml\n//\tgo list -tags testify_yaml_custom -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml\n//\n// [PR #1120]: https://github.com/stretchr/testify/pull/1120\npackage yaml\n\nimport goyaml \"gopkg.in/yaml.v3\"\n\n// Unmarshal is just a wrapper of [gopkg.in/yaml.v3.Unmarshal].\nfunc Unmarshal(in []byte, out interface{}) error {\n\treturn goyaml.Unmarshal(in, out)\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go",
    "content": "//go:build testify_yaml_fail && !testify_yaml_custom && !testify_yaml_default\n\n// Package yaml is an implementation of YAML functions that always fail.\n//\n// This implementation can be used at build time to replace the default implementation\n// to avoid linking with [gopkg.in/yaml.v3]:\n//\n//\tgo test -tags testify_yaml_fail\npackage yaml\n\nimport \"errors\"\n\nvar errNotImplemented = errors.New(\"YAML functions are not available (see https://pkg.go.dev/github.com/stretchr/testify/assert/yaml)\")\n\nfunc Unmarshal([]byte, interface{}) error {\n\treturn errNotImplemented\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/doc.go",
    "content": "// Package require implements the same assertions as the `assert` package but\n// stops test execution when a test fails.\n//\n// # Example Usage\n//\n// The following is a complete example using require in a standard test function:\n//\n//\timport (\n//\t  \"testing\"\n//\t  \"github.com/stretchr/testify/require\"\n//\t)\n//\n//\tfunc TestSomething(t *testing.T) {\n//\n//\t  var a string = \"Hello\"\n//\t  var b string = \"Hello\"\n//\n//\t  require.Equal(t, a, b, \"The two words should be the same.\")\n//\n//\t}\n//\n// # Assertions\n//\n// The `require` package have same global functions as in the `assert` package,\n// but instead of returning a boolean result they call `t.FailNow()`.\n// A consequence of this is that it must be called from the goroutine running\n// the test function, not from other goroutines created during the test.\n//\n// Every assertion function also takes an optional string message as the final argument,\n// allowing custom error messages to be appended to the message the assertion method outputs.\npackage require\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/forward_requirements.go",
    "content": "package require\n\n// Assertions provides assertion methods around the\n// TestingT interface.\ntype Assertions struct {\n\tt TestingT\n}\n\n// New makes a new Assertions object for the specified TestingT.\nfunc New(t TestingT) *Assertions {\n\treturn &Assertions{\n\t\tt: t,\n\t}\n}\n\n//go:generate sh -c \"cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require_forward.go.tmpl -include-format-funcs\"\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/require.go",
    "content": "// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.\n\npackage require\n\nimport (\n\tassert \"github.com/stretchr/testify/assert\"\n\thttp \"net/http\"\n\turl \"net/url\"\n\ttime \"time\"\n)\n\n// Condition uses a Comparison to assert a complex condition.\nfunc Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Condition(t, comp, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Conditionf uses a Comparison to assert a complex condition.\nfunc Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Conditionf(t, comp, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Contains asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\trequire.Contains(t, \"Hello World\", \"World\")\n//\trequire.Contains(t, [\"Hello\", \"World\"], \"World\")\n//\trequire.Contains(t, {\"Hello\": \"World\"}, \"Hello\")\nfunc Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Contains(t, s, contains, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Containsf asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\trequire.Containsf(t, \"Hello World\", \"World\", \"error message %s\", \"formatted\")\n//\trequire.Containsf(t, [\"Hello\", \"World\"], \"World\", \"error message %s\", \"formatted\")\n//\trequire.Containsf(t, {\"Hello\": \"World\"}, \"Hello\", \"error message %s\", \"formatted\")\nfunc Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Containsf(t, s, contains, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// DirExists checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc DirExists(t TestingT, path string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.DirExists(t, path, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// DirExistsf checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc DirExistsf(t TestingT, path string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.DirExistsf(t, path, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])\nfunc ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ElementsMatch(t, listA, listB, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// require.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], \"error message %s\", \"formatted\")\nfunc ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ElementsMatchf(t, listA, listB, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Empty asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\trequire.Empty(t, obj)\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Empty(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Emptyf asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\trequire.Emptyf(t, obj, \"error message %s\", \"formatted\")\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Emptyf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Equal asserts that two objects are equal.\n//\n//\trequire.Equal(t, 123, 123)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Equal(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualError asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.EqualError(t, err,  expectedErrorString)\nfunc EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualError(t, theError, errString, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualErrorf asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.EqualErrorf(t, err,  expectedErrorString, \"error message %s\", \"formatted\")\nfunc EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualErrorf(t, theError, errString, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualExportedValues asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true\n//\t require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false\nfunc EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualExportedValues(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualExportedValuesf asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t require.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, \"error message %s\", \"formatted\") => true\n//\t require.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, \"error message %s\", \"formatted\") => false\nfunc EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualExportedValuesf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualValues asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\trequire.EqualValues(t, uint32(123), int32(123))\nfunc EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualValues(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EqualValuesf asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\trequire.EqualValuesf(t, uint32(123), int32(123), \"error message %s\", \"formatted\")\nfunc EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EqualValuesf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Equalf asserts that two objects are equal.\n//\n//\trequire.Equalf(t, 123, 123, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Equalf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Error asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.Error(t, err)\nfunc Error(t TestingT, err error, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Error(t, err, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorAs(t, err, target, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorAsf(t, err, target, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorContains asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.ErrorContains(t, err,  expectedErrorSubString)\nfunc ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorContains(t, theError, contains, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.ErrorContainsf(t, err,  expectedErrorSubString, \"error message %s\", \"formatted\")\nfunc ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorContainsf(t, theError, contains, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorIs asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorIs(t, err, target, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// ErrorIsf asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.ErrorIsf(t, err, target, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Errorf asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\trequire.Errorf(t, err, \"error message %s\", \"formatted\")\nfunc Errorf(t TestingT, err error, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Errorf(t, err, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Eventually asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\trequire.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond)\nfunc Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Eventually(t, condition, waitFor, tick, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EventuallyWithT asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\trequire.EventuallyWithT(t, func(c *require.CollectT) {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\trequire.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EventuallyWithT(t, condition, waitFor, tick, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// EventuallyWithTf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\trequire.EventuallyWithTf(t, func(c *require.CollectT, \"error message %s\", \"formatted\") {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\trequire.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.EventuallyWithTf(t, condition, waitFor, tick, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Eventuallyf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\trequire.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Eventuallyf(t, condition, waitFor, tick, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Exactly asserts that two objects are equal in value and type.\n//\n//\trequire.Exactly(t, int32(123), int64(123))\nfunc Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Exactly(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Exactlyf asserts that two objects are equal in value and type.\n//\n//\trequire.Exactlyf(t, int32(123), int64(123), \"error message %s\", \"formatted\")\nfunc Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Exactlyf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Fail reports a failure through\nfunc Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Fail(t, failureMessage, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// FailNow fails test\nfunc FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.FailNow(t, failureMessage, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// FailNowf fails test\nfunc FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.FailNowf(t, failureMessage, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Failf reports a failure through\nfunc Failf(t TestingT, failureMessage string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Failf(t, failureMessage, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// False asserts that the specified value is false.\n//\n//\trequire.False(t, myBool)\nfunc False(t TestingT, value bool, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.False(t, value, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Falsef asserts that the specified value is false.\n//\n//\trequire.Falsef(t, myBool, \"error message %s\", \"formatted\")\nfunc Falsef(t TestingT, value bool, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Falsef(t, value, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// FileExists checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc FileExists(t TestingT, path string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.FileExists(t, path, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// FileExistsf checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc FileExistsf(t TestingT, path string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.FileExistsf(t, path, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Greater asserts that the first element is greater than the second\n//\n//\trequire.Greater(t, 2, 1)\n//\trequire.Greater(t, float64(2), float64(1))\n//\trequire.Greater(t, \"b\", \"a\")\nfunc Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Greater(t, e1, e2, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// GreaterOrEqual asserts that the first element is greater than or equal to the second\n//\n//\trequire.GreaterOrEqual(t, 2, 1)\n//\trequire.GreaterOrEqual(t, 2, 2)\n//\trequire.GreaterOrEqual(t, \"b\", \"a\")\n//\trequire.GreaterOrEqual(t, \"b\", \"b\")\nfunc GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.GreaterOrEqual(t, e1, e2, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// GreaterOrEqualf asserts that the first element is greater than or equal to the second\n//\n//\trequire.GreaterOrEqualf(t, 2, 1, \"error message %s\", \"formatted\")\n//\trequire.GreaterOrEqualf(t, 2, 2, \"error message %s\", \"formatted\")\n//\trequire.GreaterOrEqualf(t, \"b\", \"a\", \"error message %s\", \"formatted\")\n//\trequire.GreaterOrEqualf(t, \"b\", \"b\", \"error message %s\", \"formatted\")\nfunc GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.GreaterOrEqualf(t, e1, e2, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Greaterf asserts that the first element is greater than the second\n//\n//\trequire.Greaterf(t, 2, 1, \"error message %s\", \"formatted\")\n//\trequire.Greaterf(t, float64(2), float64(1), \"error message %s\", \"formatted\")\n//\trequire.Greaterf(t, \"b\", \"a\", \"error message %s\", \"formatted\")\nfunc Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Greaterf(t, e1, e2, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPBodyContains asserts that a specified handler returns a\n// body that contains a string.\n//\n//\trequire.HTTPBodyContains(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPBodyContainsf asserts that a specified handler returns a\n// body that contains a string.\n//\n//\trequire.HTTPBodyContainsf(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPBodyNotContains asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\trequire.HTTPBodyNotContains(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPBodyNotContainsf asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\trequire.HTTPBodyNotContainsf(t, myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPError asserts that a specified handler returns an error status code.\n//\n//\trequire.HTTPError(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPError(t, handler, method, url, values, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPErrorf asserts that a specified handler returns an error status code.\n//\n//\trequire.HTTPErrorf(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPErrorf(t, handler, method, url, values, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPRedirect asserts that a specified handler returns a redirect status code.\n//\n//\trequire.HTTPRedirect(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPRedirectf asserts that a specified handler returns a redirect status code.\n//\n//\trequire.HTTPRedirectf(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPStatusCode asserts that a specified handler returns a specified status code.\n//\n//\trequire.HTTPStatusCode(t, myHandler, \"GET\", \"/notImplemented\", nil, 501)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPStatusCode(t, handler, method, url, values, statuscode, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPStatusCodef asserts that a specified handler returns a specified status code.\n//\n//\trequire.HTTPStatusCodef(t, myHandler, \"GET\", \"/notImplemented\", nil, 501, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPStatusCodef(t, handler, method, url, values, statuscode, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPSuccess asserts that a specified handler returns a success status code.\n//\n//\trequire.HTTPSuccess(t, myHandler, \"POST\", \"http://www.google.com\", nil)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// HTTPSuccessf asserts that a specified handler returns a success status code.\n//\n//\trequire.HTTPSuccessf(t, myHandler, \"POST\", \"http://www.google.com\", nil, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Implements asserts that an object is implemented by the specified interface.\n//\n//\trequire.Implements(t, (*MyInterface)(nil), new(MyObject))\nfunc Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Implements(t, interfaceObject, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Implementsf asserts that an object is implemented by the specified interface.\n//\n//\trequire.Implementsf(t, (*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Implementsf(t, interfaceObject, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDelta asserts that the two numerals are within delta of each other.\n//\n//\trequire.InDelta(t, math.Pi, 22/7.0, 0.01)\nfunc InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDelta(t, expected, actual, delta, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDeltaMapValues(t, expected, actual, delta, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDeltaMapValuesf(t, expected, actual, delta, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDeltaSlice is the same as InDelta, except it compares two slices.\nfunc InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDeltaSlicef is the same as InDelta, except it compares two slices.\nfunc InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InDeltaf asserts that the two numerals are within delta of each other.\n//\n//\trequire.InDeltaf(t, math.Pi, 22/7.0, 0.01, \"error message %s\", \"formatted\")\nfunc InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InDeltaf(t, expected, actual, delta, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InEpsilon asserts that expected and actual have a relative error less than epsilon\nfunc InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.\nfunc InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.\nfunc InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// InEpsilonf asserts that expected and actual have a relative error less than epsilon\nfunc InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsDecreasing asserts that the collection is decreasing\n//\n//\trequire.IsDecreasing(t, []int{2, 1, 0})\n//\trequire.IsDecreasing(t, []float{2, 1})\n//\trequire.IsDecreasing(t, []string{\"b\", \"a\"})\nfunc IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsDecreasing(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsDecreasingf asserts that the collection is decreasing\n//\n//\trequire.IsDecreasingf(t, []int{2, 1, 0}, \"error message %s\", \"formatted\")\n//\trequire.IsDecreasingf(t, []float{2, 1}, \"error message %s\", \"formatted\")\n//\trequire.IsDecreasingf(t, []string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsDecreasingf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsIncreasing asserts that the collection is increasing\n//\n//\trequire.IsIncreasing(t, []int{1, 2, 3})\n//\trequire.IsIncreasing(t, []float{1, 2})\n//\trequire.IsIncreasing(t, []string{\"a\", \"b\"})\nfunc IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsIncreasing(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsIncreasingf asserts that the collection is increasing\n//\n//\trequire.IsIncreasingf(t, []int{1, 2, 3}, \"error message %s\", \"formatted\")\n//\trequire.IsIncreasingf(t, []float{1, 2}, \"error message %s\", \"formatted\")\n//\trequire.IsIncreasingf(t, []string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsIncreasingf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNonDecreasing asserts that the collection is not decreasing\n//\n//\trequire.IsNonDecreasing(t, []int{1, 1, 2})\n//\trequire.IsNonDecreasing(t, []float{1, 2})\n//\trequire.IsNonDecreasing(t, []string{\"a\", \"b\"})\nfunc IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNonDecreasing(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNonDecreasingf asserts that the collection is not decreasing\n//\n//\trequire.IsNonDecreasingf(t, []int{1, 1, 2}, \"error message %s\", \"formatted\")\n//\trequire.IsNonDecreasingf(t, []float{1, 2}, \"error message %s\", \"formatted\")\n//\trequire.IsNonDecreasingf(t, []string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNonDecreasingf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNonIncreasing asserts that the collection is not increasing\n//\n//\trequire.IsNonIncreasing(t, []int{2, 1, 1})\n//\trequire.IsNonIncreasing(t, []float{2, 1})\n//\trequire.IsNonIncreasing(t, []string{\"b\", \"a\"})\nfunc IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNonIncreasing(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNonIncreasingf asserts that the collection is not increasing\n//\n//\trequire.IsNonIncreasingf(t, []int{2, 1, 1}, \"error message %s\", \"formatted\")\n//\trequire.IsNonIncreasingf(t, []float{2, 1}, \"error message %s\", \"formatted\")\n//\trequire.IsNonIncreasingf(t, []string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNonIncreasingf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNotType asserts that the specified objects are not of the same type.\n//\n//\trequire.IsNotType(t, &NotMyStruct{}, &MyStruct{})\nfunc IsNotType(t TestingT, theType interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNotType(t, theType, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsNotTypef asserts that the specified objects are not of the same type.\n//\n//\trequire.IsNotTypef(t, &NotMyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsNotTypef(t, theType, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsType asserts that the specified objects are of the same type.\n//\n//\trequire.IsType(t, &MyStruct{}, &MyStruct{})\nfunc IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsType(t, expectedType, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// IsTypef asserts that the specified objects are of the same type.\n//\n//\trequire.IsTypef(t, &MyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.IsTypef(t, expectedType, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// JSONEq asserts that two JSON strings are equivalent.\n//\n//\trequire.JSONEq(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\nfunc JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.JSONEq(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// JSONEqf asserts that two JSON strings are equivalent.\n//\n//\trequire.JSONEqf(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`, \"error message %s\", \"formatted\")\nfunc JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.JSONEqf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Len asserts that the specified object has specific length.\n// Len also fails if the object has a type that len() not accept.\n//\n//\trequire.Len(t, mySlice, 3)\nfunc Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Len(t, object, length, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Lenf asserts that the specified object has specific length.\n// Lenf also fails if the object has a type that len() not accept.\n//\n//\trequire.Lenf(t, mySlice, 3, \"error message %s\", \"formatted\")\nfunc Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Lenf(t, object, length, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Less asserts that the first element is less than the second\n//\n//\trequire.Less(t, 1, 2)\n//\trequire.Less(t, float64(1), float64(2))\n//\trequire.Less(t, \"a\", \"b\")\nfunc Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Less(t, e1, e2, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// LessOrEqual asserts that the first element is less than or equal to the second\n//\n//\trequire.LessOrEqual(t, 1, 2)\n//\trequire.LessOrEqual(t, 2, 2)\n//\trequire.LessOrEqual(t, \"a\", \"b\")\n//\trequire.LessOrEqual(t, \"b\", \"b\")\nfunc LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.LessOrEqual(t, e1, e2, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// LessOrEqualf asserts that the first element is less than or equal to the second\n//\n//\trequire.LessOrEqualf(t, 1, 2, \"error message %s\", \"formatted\")\n//\trequire.LessOrEqualf(t, 2, 2, \"error message %s\", \"formatted\")\n//\trequire.LessOrEqualf(t, \"a\", \"b\", \"error message %s\", \"formatted\")\n//\trequire.LessOrEqualf(t, \"b\", \"b\", \"error message %s\", \"formatted\")\nfunc LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.LessOrEqualf(t, e1, e2, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Lessf asserts that the first element is less than the second\n//\n//\trequire.Lessf(t, 1, 2, \"error message %s\", \"formatted\")\n//\trequire.Lessf(t, float64(1), float64(2), \"error message %s\", \"formatted\")\n//\trequire.Lessf(t, \"a\", \"b\", \"error message %s\", \"formatted\")\nfunc Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Lessf(t, e1, e2, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Negative asserts that the specified element is negative\n//\n//\trequire.Negative(t, -1)\n//\trequire.Negative(t, -1.23)\nfunc Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Negative(t, e, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Negativef asserts that the specified element is negative\n//\n//\trequire.Negativef(t, -1, \"error message %s\", \"formatted\")\n//\trequire.Negativef(t, -1.23, \"error message %s\", \"formatted\")\nfunc Negativef(t TestingT, e interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Negativef(t, e, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Never asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\trequire.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond)\nfunc Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Never(t, condition, waitFor, tick, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Neverf asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\trequire.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Neverf(t, condition, waitFor, tick, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Nil asserts that the specified object is nil.\n//\n//\trequire.Nil(t, err)\nfunc Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Nil(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Nilf asserts that the specified object is nil.\n//\n//\trequire.Nilf(t, err, \"error message %s\", \"formatted\")\nfunc Nilf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Nilf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoDirExists checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoDirExists(t, path, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoDirExistsf checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoDirExistsf(t, path, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoError asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if require.NoError(t, err) {\n//\t\t   require.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc NoError(t TestingT, err error, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoError(t, err, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoErrorf asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if require.NoErrorf(t, err, \"error message %s\", \"formatted\") {\n//\t\t   require.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc NoErrorf(t TestingT, err error, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoErrorf(t, err, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoFileExists checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoFileExists(t, path, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NoFileExistsf checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NoFileExistsf(t, path, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\trequire.NotContains(t, \"Hello World\", \"Earth\")\n//\trequire.NotContains(t, [\"Hello\", \"World\"], \"Earth\")\n//\trequire.NotContains(t, {\"Hello\": \"World\"}, \"Earth\")\nfunc NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotContains(t, s, contains, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\trequire.NotContainsf(t, \"Hello World\", \"Earth\", \"error message %s\", \"formatted\")\n//\trequire.NotContainsf(t, [\"Hello\", \"World\"], \"Earth\", \"error message %s\", \"formatted\")\n//\trequire.NotContainsf(t, {\"Hello\": \"World\"}, \"Earth\", \"error message %s\", \"formatted\")\nfunc NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotContainsf(t, s, contains, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false\n//\n// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true\n//\n// require.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true\nfunc NotElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotElementsMatch(t, listA, listB, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], \"error message %s\", \"formatted\") -> false\n//\n// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], \"error message %s\", \"formatted\") -> true\n//\n// require.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], \"error message %s\", \"formatted\") -> true\nfunc NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotElementsMatchf(t, listA, listB, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEmpty asserts that the specified object is NOT [Empty].\n//\n//\tif require.NotEmpty(t, obj) {\n//\t  require.Equal(t, \"two\", obj[1])\n//\t}\nfunc NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEmpty(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEmptyf asserts that the specified object is NOT [Empty].\n//\n//\tif require.NotEmptyf(t, obj, \"error message %s\", \"formatted\") {\n//\t  require.Equal(t, \"two\", obj[1])\n//\t}\nfunc NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEmptyf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEqual asserts that the specified values are NOT equal.\n//\n//\trequire.NotEqual(t, obj1, obj2)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEqual(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEqualValues asserts that two objects are not equal even when converted to the same type\n//\n//\trequire.NotEqualValues(t, obj1, obj2)\nfunc NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEqualValues(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEqualValuesf asserts that two objects are not equal even when converted to the same type\n//\n//\trequire.NotEqualValuesf(t, obj1, obj2, \"error message %s\", \"formatted\")\nfunc NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEqualValuesf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotEqualf asserts that the specified values are NOT equal.\n//\n//\trequire.NotEqualf(t, obj1, obj2, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotEqualf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotErrorAs asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotErrorAs(t, err, target, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotErrorAsf asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotErrorAsf(t, err, target, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotErrorIs asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotErrorIs(t, err, target, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotErrorIsf asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotErrorIsf(t, err, target, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotImplements asserts that an object does not implement the specified interface.\n//\n//\trequire.NotImplements(t, (*MyInterface)(nil), new(MyObject))\nfunc NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotImplements(t, interfaceObject, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotImplementsf asserts that an object does not implement the specified interface.\n//\n//\trequire.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotImplementsf(t, interfaceObject, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotNil asserts that the specified object is not nil.\n//\n//\trequire.NotNil(t, err)\nfunc NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotNil(t, object, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotNilf asserts that the specified object is not nil.\n//\n//\trequire.NotNilf(t, err, \"error message %s\", \"formatted\")\nfunc NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotNilf(t, object, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\trequire.NotPanics(t, func(){ RemainCalm() })\nfunc NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotPanics(t, f, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\trequire.NotPanicsf(t, func(){ RemainCalm() }, \"error message %s\", \"formatted\")\nfunc NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotPanicsf(t, f, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotRegexp asserts that a specified regexp does not match a string.\n//\n//\trequire.NotRegexp(t, regexp.MustCompile(\"starts\"), \"it's starting\")\n//\trequire.NotRegexp(t, \"^start\", \"it's not starting\")\nfunc NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotRegexp(t, rx, str, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotRegexpf asserts that a specified regexp does not match a string.\n//\n//\trequire.NotRegexpf(t, regexp.MustCompile(\"starts\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\trequire.NotRegexpf(t, \"^start\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotRegexpf(t, rx, str, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotSame asserts that two pointers do not reference the same object.\n//\n//\trequire.NotSame(t, ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc NotSame(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotSame(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotSamef asserts that two pointers do not reference the same object.\n//\n//\trequire.NotSamef(t, ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotSamef(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotSubset asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\trequire.NotSubset(t, [1, 3, 4], [1, 2])\n//\trequire.NotSubset(t, {\"x\": 1, \"y\": 2}, {\"z\": 3})\n//\trequire.NotSubset(t, [1, 3, 4], {1: \"one\", 2: \"two\"})\n//\trequire.NotSubset(t, {\"x\": 1, \"y\": 2}, [\"z\"])\nfunc NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotSubset(t, list, subset, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\trequire.NotSubsetf(t, [1, 3, 4], [1, 2], \"error message %s\", \"formatted\")\n//\trequire.NotSubsetf(t, {\"x\": 1, \"y\": 2}, {\"z\": 3}, \"error message %s\", \"formatted\")\n//\trequire.NotSubsetf(t, [1, 3, 4], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\trequire.NotSubsetf(t, {\"x\": 1, \"y\": 2}, [\"z\"], \"error message %s\", \"formatted\")\nfunc NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotSubsetf(t, list, subset, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotZero asserts that i is not the zero value for its type.\nfunc NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotZero(t, i, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// NotZerof asserts that i is not the zero value for its type.\nfunc NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.NotZerof(t, i, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Panics asserts that the code inside the specified PanicTestFunc panics.\n//\n//\trequire.Panics(t, func(){ GoCrazy() })\nfunc Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Panics(t, f, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// PanicsWithError asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\trequire.PanicsWithError(t, \"crazy error\", func(){ GoCrazy() })\nfunc PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.PanicsWithError(t, errString, f, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\trequire.PanicsWithErrorf(t, \"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.PanicsWithErrorf(t, errString, f, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\trequire.PanicsWithValue(t, \"crazy error\", func(){ GoCrazy() })\nfunc PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.PanicsWithValue(t, expected, f, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\trequire.PanicsWithValuef(t, \"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.PanicsWithValuef(t, expected, f, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Panicsf asserts that the code inside the specified PanicTestFunc panics.\n//\n//\trequire.Panicsf(t, func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Panicsf(t, f, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Positive asserts that the specified element is positive\n//\n//\trequire.Positive(t, 1)\n//\trequire.Positive(t, 1.23)\nfunc Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Positive(t, e, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Positivef asserts that the specified element is positive\n//\n//\trequire.Positivef(t, 1, \"error message %s\", \"formatted\")\n//\trequire.Positivef(t, 1.23, \"error message %s\", \"formatted\")\nfunc Positivef(t TestingT, e interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Positivef(t, e, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Regexp asserts that a specified regexp matches a string.\n//\n//\trequire.Regexp(t, regexp.MustCompile(\"start\"), \"it's starting\")\n//\trequire.Regexp(t, \"start...$\", \"it's not starting\")\nfunc Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Regexp(t, rx, str, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Regexpf asserts that a specified regexp matches a string.\n//\n//\trequire.Regexpf(t, regexp.MustCompile(\"start\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\trequire.Regexpf(t, \"start...$\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Regexpf(t, rx, str, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Same asserts that two pointers reference the same object.\n//\n//\trequire.Same(t, ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc Same(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Same(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Samef asserts that two pointers reference the same object.\n//\n//\trequire.Samef(t, ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Samef(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Subset asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\trequire.Subset(t, [1, 2, 3], [1, 2])\n//\trequire.Subset(t, {\"x\": 1, \"y\": 2}, {\"x\": 1})\n//\trequire.Subset(t, [1, 2, 3], {1: \"one\", 2: \"two\"})\n//\trequire.Subset(t, {\"x\": 1, \"y\": 2}, [\"x\"])\nfunc Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Subset(t, list, subset, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Subsetf asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\trequire.Subsetf(t, [1, 2, 3], [1, 2], \"error message %s\", \"formatted\")\n//\trequire.Subsetf(t, {\"x\": 1, \"y\": 2}, {\"x\": 1}, \"error message %s\", \"formatted\")\n//\trequire.Subsetf(t, [1, 2, 3], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\trequire.Subsetf(t, {\"x\": 1, \"y\": 2}, [\"x\"], \"error message %s\", \"formatted\")\nfunc Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Subsetf(t, list, subset, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// True asserts that the specified value is true.\n//\n//\trequire.True(t, myBool)\nfunc True(t TestingT, value bool, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.True(t, value, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Truef asserts that the specified value is true.\n//\n//\trequire.Truef(t, myBool, \"error message %s\", \"formatted\")\nfunc Truef(t TestingT, value bool, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Truef(t, value, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// WithinDuration asserts that the two times are within duration delta of each other.\n//\n//\trequire.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)\nfunc WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// WithinDurationf asserts that the two times are within duration delta of each other.\n//\n//\trequire.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, \"error message %s\", \"formatted\")\nfunc WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.WithinDurationf(t, expected, actual, delta, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// WithinRange asserts that a time is within a time range (inclusive).\n//\n//\trequire.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))\nfunc WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.WithinRange(t, actual, start, end, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// WithinRangef asserts that a time is within a time range (inclusive).\n//\n//\trequire.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), \"error message %s\", \"formatted\")\nfunc WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.WithinRangef(t, actual, start, end, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// YAMLEq asserts that two YAML strings are equivalent.\nfunc YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.YAMLEq(t, expected, actual, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// YAMLEqf asserts that two YAML strings are equivalent.\nfunc YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.YAMLEqf(t, expected, actual, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Zero asserts that i is the zero value for its type.\nfunc Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Zero(t, i, msgAndArgs...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n\n// Zerof asserts that i is the zero value for its type.\nfunc Zerof(t TestingT, i interface{}, msg string, args ...interface{}) {\n\tif h, ok := t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tif assert.Zerof(t, i, msg, args...) {\n\t\treturn\n\t}\n\tt.FailNow()\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/require.go.tmpl",
    "content": "{{ replace .Comment \"assert.\" \"require.\"}}\nfunc {{.DocInfo.Name}}(t TestingT, {{.Params}}) {\n\tif h, ok := t.(tHelper); ok { h.Helper() }\n\tif assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return }\n\tt.FailNow()\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/require_forward.go",
    "content": "// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.\n\npackage require\n\nimport (\n\tassert \"github.com/stretchr/testify/assert\"\n\thttp \"net/http\"\n\turl \"net/url\"\n\ttime \"time\"\n)\n\n// Condition uses a Comparison to assert a complex condition.\nfunc (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tCondition(a.t, comp, msgAndArgs...)\n}\n\n// Conditionf uses a Comparison to assert a complex condition.\nfunc (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tConditionf(a.t, comp, msg, args...)\n}\n\n// Contains asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\ta.Contains(\"Hello World\", \"World\")\n//\ta.Contains([\"Hello\", \"World\"], \"World\")\n//\ta.Contains({\"Hello\": \"World\"}, \"Hello\")\nfunc (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tContains(a.t, s, contains, msgAndArgs...)\n}\n\n// Containsf asserts that the specified string, list(array, slice...) or map contains the\n// specified substring or element.\n//\n//\ta.Containsf(\"Hello World\", \"World\", \"error message %s\", \"formatted\")\n//\ta.Containsf([\"Hello\", \"World\"], \"World\", \"error message %s\", \"formatted\")\n//\ta.Containsf({\"Hello\": \"World\"}, \"Hello\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tContainsf(a.t, s, contains, msg, args...)\n}\n\n// DirExists checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tDirExists(a.t, path, msgAndArgs...)\n}\n\n// DirExistsf checks whether a directory exists in the given path. It also fails\n// if the path is a file rather a directory or there is an error checking whether it exists.\nfunc (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tDirExistsf(a.t, path, msg, args...)\n}\n\n// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])\nfunc (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tElementsMatch(a.t, listA, listB, msgAndArgs...)\n}\n\n// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should match.\n//\n// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], \"error message %s\", \"formatted\")\nfunc (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tElementsMatchf(a.t, listA, listB, msg, args...)\n}\n\n// Empty asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\ta.Empty(obj)\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEmpty(a.t, object, msgAndArgs...)\n}\n\n// Emptyf asserts that the given value is \"empty\".\n//\n// [Zero values] are \"empty\".\n//\n// Arrays are \"empty\" if every element is the zero value of the type (stricter than \"empty\").\n//\n// Slices, maps and channels with zero length are \"empty\".\n//\n// Pointer values are \"empty\" if the pointer is nil or if the pointed value is \"empty\".\n//\n//\ta.Emptyf(obj, \"error message %s\", \"formatted\")\n//\n// [Zero values]: https://go.dev/ref/spec#The_zero_value\nfunc (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEmptyf(a.t, object, msg, args...)\n}\n\n// Equal asserts that two objects are equal.\n//\n//\ta.Equal(123, 123)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqual(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualError asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.EqualError(err,  expectedErrorString)\nfunc (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualError(a.t, theError, errString, msgAndArgs...)\n}\n\n// EqualErrorf asserts that a function returned an error (i.e. not `nil`)\n// and that it is equal to the provided error.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.EqualErrorf(err,  expectedErrorString, \"error message %s\", \"formatted\")\nfunc (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualErrorf(a.t, theError, errString, msg, args...)\n}\n\n// EqualExportedValues asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t a.EqualExportedValues(S{1, 2}, S{1, 3}) => true\n//\t a.EqualExportedValues(S{1, 2}, S{2, 3}) => false\nfunc (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualExportedValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualExportedValuesf asserts that the types of two objects are equal and their public\n// fields are also equal. This is useful for comparing structs that have private fields\n// that could potentially differ.\n//\n//\t type S struct {\n//\t\tExported     \tint\n//\t\tnotExported   \tint\n//\t }\n//\t a.EqualExportedValuesf(S{1, 2}, S{1, 3}, \"error message %s\", \"formatted\") => true\n//\t a.EqualExportedValuesf(S{1, 2}, S{2, 3}, \"error message %s\", \"formatted\") => false\nfunc (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualExportedValuesf(a.t, expected, actual, msg, args...)\n}\n\n// EqualValues asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\ta.EqualValues(uint32(123), int32(123))\nfunc (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// EqualValuesf asserts that two objects are equal or convertible to the larger\n// type and equal.\n//\n//\ta.EqualValuesf(uint32(123), int32(123), \"error message %s\", \"formatted\")\nfunc (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualValuesf(a.t, expected, actual, msg, args...)\n}\n\n// Equalf asserts that two objects are equal.\n//\n//\ta.Equalf(123, 123, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses). Function equality\n// cannot be determined and will always fail.\nfunc (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEqualf(a.t, expected, actual, msg, args...)\n}\n\n// Error asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\ta.Error(err)\nfunc (a *Assertions) Error(err error, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tError(a.t, err, msgAndArgs...)\n}\n\n// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorAs(a.t, err, target, msgAndArgs...)\n}\n\n// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.\n// This is a wrapper for errors.As.\nfunc (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorAsf(a.t, err, target, msg, args...)\n}\n\n// ErrorContains asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.ErrorContains(err,  expectedErrorSubString)\nfunc (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorContains(a.t, theError, contains, msgAndArgs...)\n}\n\n// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)\n// and that the error contains the specified substring.\n//\n//\tactualObj, err := SomeFunction()\n//\ta.ErrorContainsf(err,  expectedErrorSubString, \"error message %s\", \"formatted\")\nfunc (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorContainsf(a.t, theError, contains, msg, args...)\n}\n\n// ErrorIs asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorIs(a.t, err, target, msgAndArgs...)\n}\n\n// ErrorIsf asserts that at least one of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorIsf(a.t, err, target, msg, args...)\n}\n\n// Errorf asserts that a function returned an error (i.e. not `nil`).\n//\n//\tactualObj, err := SomeFunction()\n//\ta.Errorf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Errorf(err error, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tErrorf(a.t, err, msg, args...)\n}\n\n// Eventually asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\ta.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond)\nfunc (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEventually(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// EventuallyWithT asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\ta.EventuallyWithT(func(c *assert.CollectT) {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// EventuallyWithTf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick. In contrast to Eventually,\n// it supplies a CollectT to the condition function, so that the condition\n// function can use the CollectT to call other assertions.\n// The condition is considered \"met\" if no errors are raised in a tick.\n// The supplied CollectT collects all errors from one tick (if there are any).\n// If the condition is not met before waitFor, the collected errors of\n// the last tick are copied to t.\n//\n//\texternalValue := false\n//\tgo func() {\n//\t\ttime.Sleep(8*time.Second)\n//\t\texternalValue = true\n//\t}()\n//\ta.EventuallyWithTf(func(c *assert.CollectT, \"error message %s\", \"formatted\") {\n//\t\t// add assertions as needed; any assertion failure will fail the current tick\n//\t\tassert.True(c, externalValue, \"expected 'externalValue' to be true\")\n//\t}, 10*time.Second, 1*time.Second, \"external state has not changed to 'true'; still false\")\nfunc (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEventuallyWithTf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Eventuallyf asserts that given condition will be met in waitFor time,\n// periodically checking target function each tick.\n//\n//\ta.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tEventuallyf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Exactly asserts that two objects are equal in value and type.\n//\n//\ta.Exactly(int32(123), int64(123))\nfunc (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tExactly(a.t, expected, actual, msgAndArgs...)\n}\n\n// Exactlyf asserts that two objects are equal in value and type.\n//\n//\ta.Exactlyf(int32(123), int64(123), \"error message %s\", \"formatted\")\nfunc (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tExactlyf(a.t, expected, actual, msg, args...)\n}\n\n// Fail reports a failure through\nfunc (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFail(a.t, failureMessage, msgAndArgs...)\n}\n\n// FailNow fails test\nfunc (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFailNow(a.t, failureMessage, msgAndArgs...)\n}\n\n// FailNowf fails test\nfunc (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFailNowf(a.t, failureMessage, msg, args...)\n}\n\n// Failf reports a failure through\nfunc (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFailf(a.t, failureMessage, msg, args...)\n}\n\n// False asserts that the specified value is false.\n//\n//\ta.False(myBool)\nfunc (a *Assertions) False(value bool, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFalse(a.t, value, msgAndArgs...)\n}\n\n// Falsef asserts that the specified value is false.\n//\n//\ta.Falsef(myBool, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Falsef(value bool, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFalsef(a.t, value, msg, args...)\n}\n\n// FileExists checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFileExists(a.t, path, msgAndArgs...)\n}\n\n// FileExistsf checks whether a file exists in the given path. It also fails if\n// the path points to a directory or there is an error when trying to check the file.\nfunc (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tFileExistsf(a.t, path, msg, args...)\n}\n\n// Greater asserts that the first element is greater than the second\n//\n//\ta.Greater(2, 1)\n//\ta.Greater(float64(2), float64(1))\n//\ta.Greater(\"b\", \"a\")\nfunc (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tGreater(a.t, e1, e2, msgAndArgs...)\n}\n\n// GreaterOrEqual asserts that the first element is greater than or equal to the second\n//\n//\ta.GreaterOrEqual(2, 1)\n//\ta.GreaterOrEqual(2, 2)\n//\ta.GreaterOrEqual(\"b\", \"a\")\n//\ta.GreaterOrEqual(\"b\", \"b\")\nfunc (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tGreaterOrEqual(a.t, e1, e2, msgAndArgs...)\n}\n\n// GreaterOrEqualf asserts that the first element is greater than or equal to the second\n//\n//\ta.GreaterOrEqualf(2, 1, \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(2, 2, \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(\"b\", \"a\", \"error message %s\", \"formatted\")\n//\ta.GreaterOrEqualf(\"b\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tGreaterOrEqualf(a.t, e1, e2, msg, args...)\n}\n\n// Greaterf asserts that the first element is greater than the second\n//\n//\ta.Greaterf(2, 1, \"error message %s\", \"formatted\")\n//\ta.Greaterf(float64(2), float64(1), \"error message %s\", \"formatted\")\n//\ta.Greaterf(\"b\", \"a\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tGreaterf(a.t, e1, e2, msg, args...)\n}\n\n// HTTPBodyContains asserts that a specified handler returns a\n// body that contains a string.\n//\n//\ta.HTTPBodyContains(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...)\n}\n\n// HTTPBodyContainsf asserts that a specified handler returns a\n// body that contains a string.\n//\n//\ta.HTTPBodyContainsf(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)\n}\n\n// HTTPBodyNotContains asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\ta.HTTPBodyNotContains(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...)\n}\n\n// HTTPBodyNotContainsf asserts that a specified handler returns a\n// body that does not contain a string.\n//\n//\ta.HTTPBodyNotContainsf(myHandler, \"GET\", \"www.google.com\", nil, \"I'm Feeling Lucky\", \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...)\n}\n\n// HTTPError asserts that a specified handler returns an error status code.\n//\n//\ta.HTTPError(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPError(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPErrorf asserts that a specified handler returns an error status code.\n//\n//\ta.HTTPErrorf(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPErrorf(a.t, handler, method, url, values, msg, args...)\n}\n\n// HTTPRedirect asserts that a specified handler returns a redirect status code.\n//\n//\ta.HTTPRedirect(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPRedirectf asserts that a specified handler returns a redirect status code.\n//\n//\ta.HTTPRedirectf(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPRedirectf(a.t, handler, method, url, values, msg, args...)\n}\n\n// HTTPStatusCode asserts that a specified handler returns a specified status code.\n//\n//\ta.HTTPStatusCode(myHandler, \"GET\", \"/notImplemented\", nil, 501)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)\n}\n\n// HTTPStatusCodef asserts that a specified handler returns a specified status code.\n//\n//\ta.HTTPStatusCodef(myHandler, \"GET\", \"/notImplemented\", nil, 501, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)\n}\n\n// HTTPSuccess asserts that a specified handler returns a success status code.\n//\n//\ta.HTTPSuccess(myHandler, \"POST\", \"http://www.google.com\", nil)\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)\n}\n\n// HTTPSuccessf asserts that a specified handler returns a success status code.\n//\n//\ta.HTTPSuccessf(myHandler, \"POST\", \"http://www.google.com\", nil, \"error message %s\", \"formatted\")\n//\n// Returns whether the assertion was successful (true) or not (false).\nfunc (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tHTTPSuccessf(a.t, handler, method, url, values, msg, args...)\n}\n\n// Implements asserts that an object is implemented by the specified interface.\n//\n//\ta.Implements((*MyInterface)(nil), new(MyObject))\nfunc (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tImplements(a.t, interfaceObject, object, msgAndArgs...)\n}\n\n// Implementsf asserts that an object is implemented by the specified interface.\n//\n//\ta.Implementsf((*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tImplementsf(a.t, interfaceObject, object, msg, args...)\n}\n\n// InDelta asserts that the two numerals are within delta of each other.\n//\n//\ta.InDelta(math.Pi, 22/7.0, 0.01)\nfunc (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDelta(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.\nfunc (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDeltaMapValuesf(a.t, expected, actual, delta, msg, args...)\n}\n\n// InDeltaSlice is the same as InDelta, except it compares two slices.\nfunc (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDeltaSlice(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// InDeltaSlicef is the same as InDelta, except it compares two slices.\nfunc (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDeltaSlicef(a.t, expected, actual, delta, msg, args...)\n}\n\n// InDeltaf asserts that the two numerals are within delta of each other.\n//\n//\ta.InDeltaf(math.Pi, 22/7.0, 0.01, \"error message %s\", \"formatted\")\nfunc (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInDeltaf(a.t, expected, actual, delta, msg, args...)\n}\n\n// InEpsilon asserts that expected and actual have a relative error less than epsilon\nfunc (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)\n}\n\n// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.\nfunc (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...)\n}\n\n// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.\nfunc (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...)\n}\n\n// InEpsilonf asserts that expected and actual have a relative error less than epsilon\nfunc (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tInEpsilonf(a.t, expected, actual, epsilon, msg, args...)\n}\n\n// IsDecreasing asserts that the collection is decreasing\n//\n//\ta.IsDecreasing([]int{2, 1, 0})\n//\ta.IsDecreasing([]float{2, 1})\n//\ta.IsDecreasing([]string{\"b\", \"a\"})\nfunc (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsDecreasing(a.t, object, msgAndArgs...)\n}\n\n// IsDecreasingf asserts that the collection is decreasing\n//\n//\ta.IsDecreasingf([]int{2, 1, 0}, \"error message %s\", \"formatted\")\n//\ta.IsDecreasingf([]float{2, 1}, \"error message %s\", \"formatted\")\n//\ta.IsDecreasingf([]string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsDecreasingf(a.t, object, msg, args...)\n}\n\n// IsIncreasing asserts that the collection is increasing\n//\n//\ta.IsIncreasing([]int{1, 2, 3})\n//\ta.IsIncreasing([]float{1, 2})\n//\ta.IsIncreasing([]string{\"a\", \"b\"})\nfunc (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsIncreasing(a.t, object, msgAndArgs...)\n}\n\n// IsIncreasingf asserts that the collection is increasing\n//\n//\ta.IsIncreasingf([]int{1, 2, 3}, \"error message %s\", \"formatted\")\n//\ta.IsIncreasingf([]float{1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsIncreasingf([]string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsIncreasingf(a.t, object, msg, args...)\n}\n\n// IsNonDecreasing asserts that the collection is not decreasing\n//\n//\ta.IsNonDecreasing([]int{1, 1, 2})\n//\ta.IsNonDecreasing([]float{1, 2})\n//\ta.IsNonDecreasing([]string{\"a\", \"b\"})\nfunc (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNonDecreasing(a.t, object, msgAndArgs...)\n}\n\n// IsNonDecreasingf asserts that the collection is not decreasing\n//\n//\ta.IsNonDecreasingf([]int{1, 1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsNonDecreasingf([]float{1, 2}, \"error message %s\", \"formatted\")\n//\ta.IsNonDecreasingf([]string{\"a\", \"b\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNonDecreasingf(a.t, object, msg, args...)\n}\n\n// IsNonIncreasing asserts that the collection is not increasing\n//\n//\ta.IsNonIncreasing([]int{2, 1, 1})\n//\ta.IsNonIncreasing([]float{2, 1})\n//\ta.IsNonIncreasing([]string{\"b\", \"a\"})\nfunc (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNonIncreasing(a.t, object, msgAndArgs...)\n}\n\n// IsNonIncreasingf asserts that the collection is not increasing\n//\n//\ta.IsNonIncreasingf([]int{2, 1, 1}, \"error message %s\", \"formatted\")\n//\ta.IsNonIncreasingf([]float{2, 1}, \"error message %s\", \"formatted\")\n//\ta.IsNonIncreasingf([]string{\"b\", \"a\"}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNonIncreasingf(a.t, object, msg, args...)\n}\n\n// IsNotType asserts that the specified objects are not of the same type.\n//\n//\ta.IsNotType(&NotMyStruct{}, &MyStruct{})\nfunc (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNotType(a.t, theType, object, msgAndArgs...)\n}\n\n// IsNotTypef asserts that the specified objects are not of the same type.\n//\n//\ta.IsNotTypef(&NotMyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsNotTypef(a.t, theType, object, msg, args...)\n}\n\n// IsType asserts that the specified objects are of the same type.\n//\n//\ta.IsType(&MyStruct{}, &MyStruct{})\nfunc (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsType(a.t, expectedType, object, msgAndArgs...)\n}\n\n// IsTypef asserts that the specified objects are of the same type.\n//\n//\ta.IsTypef(&MyStruct{}, &MyStruct{}, \"error message %s\", \"formatted\")\nfunc (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tIsTypef(a.t, expectedType, object, msg, args...)\n}\n\n// JSONEq asserts that two JSON strings are equivalent.\n//\n//\ta.JSONEq(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\nfunc (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tJSONEq(a.t, expected, actual, msgAndArgs...)\n}\n\n// JSONEqf asserts that two JSON strings are equivalent.\n//\n//\ta.JSONEqf(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`, \"error message %s\", \"formatted\")\nfunc (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tJSONEqf(a.t, expected, actual, msg, args...)\n}\n\n// Len asserts that the specified object has specific length.\n// Len also fails if the object has a type that len() not accept.\n//\n//\ta.Len(mySlice, 3)\nfunc (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLen(a.t, object, length, msgAndArgs...)\n}\n\n// Lenf asserts that the specified object has specific length.\n// Lenf also fails if the object has a type that len() not accept.\n//\n//\ta.Lenf(mySlice, 3, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLenf(a.t, object, length, msg, args...)\n}\n\n// Less asserts that the first element is less than the second\n//\n//\ta.Less(1, 2)\n//\ta.Less(float64(1), float64(2))\n//\ta.Less(\"a\", \"b\")\nfunc (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLess(a.t, e1, e2, msgAndArgs...)\n}\n\n// LessOrEqual asserts that the first element is less than or equal to the second\n//\n//\ta.LessOrEqual(1, 2)\n//\ta.LessOrEqual(2, 2)\n//\ta.LessOrEqual(\"a\", \"b\")\n//\ta.LessOrEqual(\"b\", \"b\")\nfunc (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLessOrEqual(a.t, e1, e2, msgAndArgs...)\n}\n\n// LessOrEqualf asserts that the first element is less than or equal to the second\n//\n//\ta.LessOrEqualf(1, 2, \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(2, 2, \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(\"a\", \"b\", \"error message %s\", \"formatted\")\n//\ta.LessOrEqualf(\"b\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLessOrEqualf(a.t, e1, e2, msg, args...)\n}\n\n// Lessf asserts that the first element is less than the second\n//\n//\ta.Lessf(1, 2, \"error message %s\", \"formatted\")\n//\ta.Lessf(float64(1), float64(2), \"error message %s\", \"formatted\")\n//\ta.Lessf(\"a\", \"b\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tLessf(a.t, e1, e2, msg, args...)\n}\n\n// Negative asserts that the specified element is negative\n//\n//\ta.Negative(-1)\n//\ta.Negative(-1.23)\nfunc (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNegative(a.t, e, msgAndArgs...)\n}\n\n// Negativef asserts that the specified element is negative\n//\n//\ta.Negativef(-1, \"error message %s\", \"formatted\")\n//\ta.Negativef(-1.23, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNegativef(a.t, e, msg, args...)\n}\n\n// Never asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\ta.Never(func() bool { return false; }, time.Second, 10*time.Millisecond)\nfunc (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNever(a.t, condition, waitFor, tick, msgAndArgs...)\n}\n\n// Neverf asserts that the given condition doesn't satisfy in waitFor time,\n// periodically checking the target function each tick.\n//\n//\ta.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNeverf(a.t, condition, waitFor, tick, msg, args...)\n}\n\n// Nil asserts that the specified object is nil.\n//\n//\ta.Nil(err)\nfunc (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNil(a.t, object, msgAndArgs...)\n}\n\n// Nilf asserts that the specified object is nil.\n//\n//\ta.Nilf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNilf(a.t, object, msg, args...)\n}\n\n// NoDirExists checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoDirExists(a.t, path, msgAndArgs...)\n}\n\n// NoDirExistsf checks whether a directory does not exist in the given path.\n// It fails if the path points to an existing _directory_ only.\nfunc (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoDirExistsf(a.t, path, msg, args...)\n}\n\n// NoError asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if a.NoError(err) {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc (a *Assertions) NoError(err error, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoError(a.t, err, msgAndArgs...)\n}\n\n// NoErrorf asserts that a function returned no error (i.e. `nil`).\n//\n//\t  actualObj, err := SomeFunction()\n//\t  if a.NoErrorf(err, \"error message %s\", \"formatted\") {\n//\t\t   assert.Equal(t, expectedObj, actualObj)\n//\t  }\nfunc (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoErrorf(a.t, err, msg, args...)\n}\n\n// NoFileExists checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoFileExists(a.t, path, msgAndArgs...)\n}\n\n// NoFileExistsf checks whether a file does not exist in a given path. It fails\n// if the path points to an existing _file_ only.\nfunc (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNoFileExistsf(a.t, path, msg, args...)\n}\n\n// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\ta.NotContains(\"Hello World\", \"Earth\")\n//\ta.NotContains([\"Hello\", \"World\"], \"Earth\")\n//\ta.NotContains({\"Hello\": \"World\"}, \"Earth\")\nfunc (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotContains(a.t, s, contains, msgAndArgs...)\n}\n\n// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the\n// specified substring or element.\n//\n//\ta.NotContainsf(\"Hello World\", \"Earth\", \"error message %s\", \"formatted\")\n//\ta.NotContainsf([\"Hello\", \"World\"], \"Earth\", \"error message %s\", \"formatted\")\n//\ta.NotContainsf({\"Hello\": \"World\"}, \"Earth\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotContainsf(a.t, s, contains, msg, args...)\n}\n\n// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false\n//\n// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true\n//\n// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true\nfunc (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotElementsMatch(a.t, listA, listB, msgAndArgs...)\n}\n\n// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified\n// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,\n// the number of appearances of each of them in both lists should not match.\n// This is an inverse of ElementsMatch.\n//\n// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], \"error message %s\", \"formatted\") -> false\n//\n// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], \"error message %s\", \"formatted\") -> true\n//\n// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], \"error message %s\", \"formatted\") -> true\nfunc (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotElementsMatchf(a.t, listA, listB, msg, args...)\n}\n\n// NotEmpty asserts that the specified object is NOT [Empty].\n//\n//\tif a.NotEmpty(obj) {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEmpty(a.t, object, msgAndArgs...)\n}\n\n// NotEmptyf asserts that the specified object is NOT [Empty].\n//\n//\tif a.NotEmptyf(obj, \"error message %s\", \"formatted\") {\n//\t  assert.Equal(t, \"two\", obj[1])\n//\t}\nfunc (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEmptyf(a.t, object, msg, args...)\n}\n\n// NotEqual asserts that the specified values are NOT equal.\n//\n//\ta.NotEqual(obj1, obj2)\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEqual(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotEqualValues asserts that two objects are not equal even when converted to the same type\n//\n//\ta.NotEqualValues(obj1, obj2)\nfunc (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEqualValues(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotEqualValuesf asserts that two objects are not equal even when converted to the same type\n//\n//\ta.NotEqualValuesf(obj1, obj2, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEqualValuesf(a.t, expected, actual, msg, args...)\n}\n\n// NotEqualf asserts that the specified values are NOT equal.\n//\n//\ta.NotEqualf(obj1, obj2, \"error message %s\", \"formatted\")\n//\n// Pointer variable equality is determined based on the equality of the\n// referenced values (as opposed to the memory addresses).\nfunc (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotEqualf(a.t, expected, actual, msg, args...)\n}\n\n// NotErrorAs asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotErrorAs(a.t, err, target, msgAndArgs...)\n}\n\n// NotErrorAsf asserts that none of the errors in err's chain matches target,\n// but if so, sets target to that error value.\nfunc (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotErrorAsf(a.t, err, target, msg, args...)\n}\n\n// NotErrorIs asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotErrorIs(a.t, err, target, msgAndArgs...)\n}\n\n// NotErrorIsf asserts that none of the errors in err's chain matches target.\n// This is a wrapper for errors.Is.\nfunc (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotErrorIsf(a.t, err, target, msg, args...)\n}\n\n// NotImplements asserts that an object does not implement the specified interface.\n//\n//\ta.NotImplements((*MyInterface)(nil), new(MyObject))\nfunc (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotImplements(a.t, interfaceObject, object, msgAndArgs...)\n}\n\n// NotImplementsf asserts that an object does not implement the specified interface.\n//\n//\ta.NotImplementsf((*MyInterface)(nil), new(MyObject), \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotImplementsf(a.t, interfaceObject, object, msg, args...)\n}\n\n// NotNil asserts that the specified object is not nil.\n//\n//\ta.NotNil(err)\nfunc (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotNil(a.t, object, msgAndArgs...)\n}\n\n// NotNilf asserts that the specified object is not nil.\n//\n//\ta.NotNilf(err, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotNilf(a.t, object, msg, args...)\n}\n\n// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\ta.NotPanics(func(){ RemainCalm() })\nfunc (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotPanics(a.t, f, msgAndArgs...)\n}\n\n// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.\n//\n//\ta.NotPanicsf(func(){ RemainCalm() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotPanicsf(a.t, f, msg, args...)\n}\n\n// NotRegexp asserts that a specified regexp does not match a string.\n//\n//\ta.NotRegexp(regexp.MustCompile(\"starts\"), \"it's starting\")\n//\ta.NotRegexp(\"^start\", \"it's not starting\")\nfunc (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotRegexp(a.t, rx, str, msgAndArgs...)\n}\n\n// NotRegexpf asserts that a specified regexp does not match a string.\n//\n//\ta.NotRegexpf(regexp.MustCompile(\"starts\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\ta.NotRegexpf(\"^start\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotRegexpf(a.t, rx, str, msg, args...)\n}\n\n// NotSame asserts that two pointers do not reference the same object.\n//\n//\ta.NotSame(ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotSame(a.t, expected, actual, msgAndArgs...)\n}\n\n// NotSamef asserts that two pointers do not reference the same object.\n//\n//\ta.NotSamef(ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotSamef(a.t, expected, actual, msg, args...)\n}\n\n// NotSubset asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.NotSubset([1, 3, 4], [1, 2])\n//\ta.NotSubset({\"x\": 1, \"y\": 2}, {\"z\": 3})\n//\ta.NotSubset([1, 3, 4], {1: \"one\", 2: \"two\"})\n//\ta.NotSubset({\"x\": 1, \"y\": 2}, [\"z\"])\nfunc (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotSubset(a.t, list, subset, msgAndArgs...)\n}\n\n// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all\n// elements given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.NotSubsetf([1, 3, 4], [1, 2], \"error message %s\", \"formatted\")\n//\ta.NotSubsetf({\"x\": 1, \"y\": 2}, {\"z\": 3}, \"error message %s\", \"formatted\")\n//\ta.NotSubsetf([1, 3, 4], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\ta.NotSubsetf({\"x\": 1, \"y\": 2}, [\"z\"], \"error message %s\", \"formatted\")\nfunc (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotSubsetf(a.t, list, subset, msg, args...)\n}\n\n// NotZero asserts that i is not the zero value for its type.\nfunc (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotZero(a.t, i, msgAndArgs...)\n}\n\n// NotZerof asserts that i is not the zero value for its type.\nfunc (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tNotZerof(a.t, i, msg, args...)\n}\n\n// Panics asserts that the code inside the specified PanicTestFunc panics.\n//\n//\ta.Panics(func(){ GoCrazy() })\nfunc (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanics(a.t, f, msgAndArgs...)\n}\n\n// PanicsWithError asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\ta.PanicsWithError(\"crazy error\", func(){ GoCrazy() })\nfunc (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanicsWithError(a.t, errString, f, msgAndArgs...)\n}\n\n// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc\n// panics, and that the recovered panic value is an error that satisfies the\n// EqualError comparison.\n//\n//\ta.PanicsWithErrorf(\"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanicsWithErrorf(a.t, errString, f, msg, args...)\n}\n\n// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\ta.PanicsWithValue(\"crazy error\", func(){ GoCrazy() })\nfunc (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanicsWithValue(a.t, expected, f, msgAndArgs...)\n}\n\n// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that\n// the recovered panic value equals the expected panic value.\n//\n//\ta.PanicsWithValuef(\"crazy error\", func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanicsWithValuef(a.t, expected, f, msg, args...)\n}\n\n// Panicsf asserts that the code inside the specified PanicTestFunc panics.\n//\n//\ta.Panicsf(func(){ GoCrazy() }, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPanicsf(a.t, f, msg, args...)\n}\n\n// Positive asserts that the specified element is positive\n//\n//\ta.Positive(1)\n//\ta.Positive(1.23)\nfunc (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPositive(a.t, e, msgAndArgs...)\n}\n\n// Positivef asserts that the specified element is positive\n//\n//\ta.Positivef(1, \"error message %s\", \"formatted\")\n//\ta.Positivef(1.23, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tPositivef(a.t, e, msg, args...)\n}\n\n// Regexp asserts that a specified regexp matches a string.\n//\n//\ta.Regexp(regexp.MustCompile(\"start\"), \"it's starting\")\n//\ta.Regexp(\"start...$\", \"it's not starting\")\nfunc (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tRegexp(a.t, rx, str, msgAndArgs...)\n}\n\n// Regexpf asserts that a specified regexp matches a string.\n//\n//\ta.Regexpf(regexp.MustCompile(\"start\"), \"it's starting\", \"error message %s\", \"formatted\")\n//\ta.Regexpf(\"start...$\", \"it's not starting\", \"error message %s\", \"formatted\")\nfunc (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tRegexpf(a.t, rx, str, msg, args...)\n}\n\n// Same asserts that two pointers reference the same object.\n//\n//\ta.Same(ptr1, ptr2)\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tSame(a.t, expected, actual, msgAndArgs...)\n}\n\n// Samef asserts that two pointers reference the same object.\n//\n//\ta.Samef(ptr1, ptr2, \"error message %s\", \"formatted\")\n//\n// Both arguments must be pointer variables. Pointer variable sameness is\n// determined based on the equality of both type and value.\nfunc (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tSamef(a.t, expected, actual, msg, args...)\n}\n\n// Subset asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.Subset([1, 2, 3], [1, 2])\n//\ta.Subset({\"x\": 1, \"y\": 2}, {\"x\": 1})\n//\ta.Subset([1, 2, 3], {1: \"one\", 2: \"two\"})\n//\ta.Subset({\"x\": 1, \"y\": 2}, [\"x\"])\nfunc (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tSubset(a.t, list, subset, msgAndArgs...)\n}\n\n// Subsetf asserts that the list (array, slice, or map) contains all elements\n// given in the subset (array, slice, or map).\n// Map elements are key-value pairs unless compared with an array or slice where\n// only the map key is evaluated.\n//\n//\ta.Subsetf([1, 2, 3], [1, 2], \"error message %s\", \"formatted\")\n//\ta.Subsetf({\"x\": 1, \"y\": 2}, {\"x\": 1}, \"error message %s\", \"formatted\")\n//\ta.Subsetf([1, 2, 3], {1: \"one\", 2: \"two\"}, \"error message %s\", \"formatted\")\n//\ta.Subsetf({\"x\": 1, \"y\": 2}, [\"x\"], \"error message %s\", \"formatted\")\nfunc (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tSubsetf(a.t, list, subset, msg, args...)\n}\n\n// True asserts that the specified value is true.\n//\n//\ta.True(myBool)\nfunc (a *Assertions) True(value bool, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tTrue(a.t, value, msgAndArgs...)\n}\n\n// Truef asserts that the specified value is true.\n//\n//\ta.Truef(myBool, \"error message %s\", \"formatted\")\nfunc (a *Assertions) Truef(value bool, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tTruef(a.t, value, msg, args...)\n}\n\n// WithinDuration asserts that the two times are within duration delta of each other.\n//\n//\ta.WithinDuration(time.Now(), time.Now(), 10*time.Second)\nfunc (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tWithinDuration(a.t, expected, actual, delta, msgAndArgs...)\n}\n\n// WithinDurationf asserts that the two times are within duration delta of each other.\n//\n//\ta.WithinDurationf(time.Now(), time.Now(), 10*time.Second, \"error message %s\", \"formatted\")\nfunc (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tWithinDurationf(a.t, expected, actual, delta, msg, args...)\n}\n\n// WithinRange asserts that a time is within a time range (inclusive).\n//\n//\ta.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))\nfunc (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tWithinRange(a.t, actual, start, end, msgAndArgs...)\n}\n\n// WithinRangef asserts that a time is within a time range (inclusive).\n//\n//\ta.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), \"error message %s\", \"formatted\")\nfunc (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tWithinRangef(a.t, actual, start, end, msg, args...)\n}\n\n// YAMLEq asserts that two YAML strings are equivalent.\nfunc (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tYAMLEq(a.t, expected, actual, msgAndArgs...)\n}\n\n// YAMLEqf asserts that two YAML strings are equivalent.\nfunc (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tYAMLEqf(a.t, expected, actual, msg, args...)\n}\n\n// Zero asserts that i is the zero value for its type.\nfunc (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tZero(a.t, i, msgAndArgs...)\n}\n\n// Zerof asserts that i is the zero value for its type.\nfunc (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) {\n\tif h, ok := a.t.(tHelper); ok {\n\t\th.Helper()\n\t}\n\tZerof(a.t, i, msg, args...)\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/require_forward.go.tmpl",
    "content": "{{.CommentWithoutT \"a\"}}\nfunc (a *Assertions) {{.DocInfo.Name}}({{.Params}}) {\n\tif h, ok := a.t.(tHelper); ok { h.Helper() }\n\t{{.DocInfo.Name}}(a.t, {{.ForwardedParams}})\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/require/requirements.go",
    "content": "package require\n\n// TestingT is an interface wrapper around *testing.T\ntype TestingT interface {\n\tErrorf(format string, args ...interface{})\n\tFailNow()\n}\n\ntype tHelper = interface {\n\tHelper()\n}\n\n// ComparisonAssertionFunc is a common function prototype when comparing two values.  Can be useful\n// for table driven tests.\ntype ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{})\n\n// ValueAssertionFunc is a common function prototype when validating a single value.  Can be useful\n// for table driven tests.\ntype ValueAssertionFunc func(TestingT, interface{}, ...interface{})\n\n// BoolAssertionFunc is a common function prototype when validating a bool value.  Can be useful\n// for table driven tests.\ntype BoolAssertionFunc func(TestingT, bool, ...interface{})\n\n// ErrorAssertionFunc is a common function prototype when validating an error value.  Can be useful\n// for table driven tests.\ntype ErrorAssertionFunc func(TestingT, error, ...interface{})\n\n//go:generate sh -c \"cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require.go.tmpl -include-format-funcs\"\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/suite/doc.go",
    "content": "// Package suite contains logic for creating testing suite structs\n// and running the methods on those structs as tests.  The most useful\n// piece of this package is that you can create setup/teardown methods\n// on your testing suites, which will run before/after the whole suite\n// or individual tests (depending on which interface(s) you\n// implement).\n//\n// The suite package does not support parallel tests. See [issue 934].\n//\n// A testing suite is usually built by first extending the built-in\n// suite functionality from suite.Suite in testify.  Alternatively,\n// you could reproduce that logic on your own if you wanted (you\n// just need to implement the TestingSuite interface from\n// suite/interfaces.go).\n//\n// After that, you can implement any of the interfaces in\n// suite/interfaces.go to add setup/teardown functionality to your\n// suite, and add any methods that start with \"Test\" to add tests.\n// Methods that do not match any suite interfaces and do not begin\n// with \"Test\" will not be run by testify, and can safely be used as\n// helper methods.\n//\n// Once you've built your testing suite, you need to run the suite\n// (using suite.Run from testify) inside any function that matches the\n// identity that \"go test\" is already looking for (i.e.\n// func(*testing.T)).\n//\n// Regular expression to select test suites specified command-line\n// argument \"-run\". Regular expression to select the methods\n// of test suites specified command-line argument \"-m\".\n// Suite object has assertion methods.\n//\n// A crude example:\n//\n//\t// Basic imports\n//\timport (\n//\t    \"testing\"\n//\t    \"github.com/stretchr/testify/assert\"\n//\t    \"github.com/stretchr/testify/suite\"\n//\t)\n//\n//\t// Define the suite, and absorb the built-in basic suite\n//\t// functionality from testify - including a T() method which\n//\t// returns the current testing context\n//\ttype ExampleTestSuite struct {\n//\t    suite.Suite\n//\t    VariableThatShouldStartAtFive int\n//\t}\n//\n//\t// Make sure that VariableThatShouldStartAtFive is set to five\n//\t// before each test\n//\tfunc (suite *ExampleTestSuite) SetupTest() {\n//\t    suite.VariableThatShouldStartAtFive = 5\n//\t}\n//\n//\t// All methods that begin with \"Test\" are run as tests within a\n//\t// suite.\n//\tfunc (suite *ExampleTestSuite) TestExample() {\n//\t    assert.Equal(suite.T(), 5, suite.VariableThatShouldStartAtFive)\n//\t    suite.Equal(5, suite.VariableThatShouldStartAtFive)\n//\t}\n//\n//\t// In order for 'go test' to run this suite, we need to create\n//\t// a normal test function and pass our suite to suite.Run\n//\tfunc TestExampleTestSuite(t *testing.T) {\n//\t    suite.Run(t, new(ExampleTestSuite))\n//\t}\n//\n// [issue 934]: https://github.com/stretchr/testify/issues/934\npackage suite\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/suite/interfaces.go",
    "content": "package suite\n\nimport \"testing\"\n\n// TestingSuite can store and return the current *testing.T context\n// generated by 'go test'.\ntype TestingSuite interface {\n\tT() *testing.T\n\tSetT(*testing.T)\n\tSetS(suite TestingSuite)\n}\n\n// SetupAllSuite has a SetupSuite method, which will run before the\n// tests in the suite are run.\ntype SetupAllSuite interface {\n\tSetupSuite()\n}\n\n// SetupTestSuite has a SetupTest method, which will run before each\n// test in the suite.\ntype SetupTestSuite interface {\n\tSetupTest()\n}\n\n// TearDownAllSuite has a TearDownSuite method, which will run after\n// all the tests in the suite have been run.\ntype TearDownAllSuite interface {\n\tTearDownSuite()\n}\n\n// TearDownTestSuite has a TearDownTest method, which will run after\n// each test in the suite.\ntype TearDownTestSuite interface {\n\tTearDownTest()\n}\n\n// BeforeTest has a function to be executed right before the test\n// starts and receives the suite and test names as input\ntype BeforeTest interface {\n\tBeforeTest(suiteName, testName string)\n}\n\n// AfterTest has a function to be executed right after the test\n// finishes and receives the suite and test names as input\ntype AfterTest interface {\n\tAfterTest(suiteName, testName string)\n}\n\n// WithStats implements HandleStats, a function that will be executed\n// when a test suite is finished. The stats contain information about\n// the execution of that suite and its tests.\ntype WithStats interface {\n\tHandleStats(suiteName string, stats *SuiteInformation)\n}\n\n// SetupSubTest has a SetupSubTest method, which will run before each\n// subtest in the suite.\ntype SetupSubTest interface {\n\tSetupSubTest()\n}\n\n// TearDownSubTest has a TearDownSubTest method, which will run after\n// each subtest in the suite have been run.\ntype TearDownSubTest interface {\n\tTearDownSubTest()\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/suite/stats.go",
    "content": "package suite\n\nimport \"time\"\n\n// SuiteInformation stats stores stats for the whole suite execution.\ntype SuiteInformation struct {\n\tStart, End time.Time\n\tTestStats  map[string]*TestInformation\n}\n\n// TestInformation stores information about the execution of each test.\ntype TestInformation struct {\n\tTestName   string\n\tStart, End time.Time\n\tPassed     bool\n}\n\nfunc newSuiteInformation() *SuiteInformation {\n\treturn &SuiteInformation{\n\t\tTestStats: make(map[string]*TestInformation),\n\t}\n}\n\nfunc (s *SuiteInformation) start(testName string) {\n\tif s == nil {\n\t\treturn\n\t}\n\ts.TestStats[testName] = &TestInformation{\n\t\tTestName: testName,\n\t\tStart:    time.Now(),\n\t}\n}\n\nfunc (s *SuiteInformation) end(testName string, passed bool) {\n\tif s == nil {\n\t\treturn\n\t}\n\ts.TestStats[testName].End = time.Now()\n\ts.TestStats[testName].Passed = passed\n}\n\nfunc (s *SuiteInformation) Passed() bool {\n\tfor _, stats := range s.TestStats {\n\t\tif !stats.Passed {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n"
  },
  {
    "path": "vendor/github.com/stretchr/testify/suite/suite.go",
    "content": "package suite\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"runtime/debug\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nvar matchMethod = flag.String(\"testify.m\", \"\", \"regular expression to select tests of the testify suite to run\")\n\n// Suite is a basic testing suite with methods for storing and\n// retrieving the current *testing.T context.\ntype Suite struct {\n\t*assert.Assertions\n\n\tmu      sync.RWMutex\n\trequire *require.Assertions\n\tt       *testing.T\n\n\t// Parent suite to have access to the implemented methods of parent struct\n\ts TestingSuite\n}\n\n// T retrieves the current *testing.T context.\nfunc (suite *Suite) T() *testing.T {\n\tsuite.mu.RLock()\n\tdefer suite.mu.RUnlock()\n\treturn suite.t\n}\n\n// SetT sets the current *testing.T context.\nfunc (suite *Suite) SetT(t *testing.T) {\n\tsuite.mu.Lock()\n\tdefer suite.mu.Unlock()\n\tsuite.t = t\n\tsuite.Assertions = assert.New(t)\n\tsuite.require = require.New(t)\n}\n\n// SetS needs to set the current test suite as parent\n// to get access to the parent methods\nfunc (suite *Suite) SetS(s TestingSuite) {\n\tsuite.s = s\n}\n\n// Require returns a require context for suite.\nfunc (suite *Suite) Require() *require.Assertions {\n\tsuite.mu.Lock()\n\tdefer suite.mu.Unlock()\n\tif suite.require == nil {\n\t\tpanic(\"'Require' must not be called before 'Run' or 'SetT'\")\n\t}\n\treturn suite.require\n}\n\n// Assert returns an assert context for suite.  Normally, you can call\n// `suite.NoError(expected, actual)`, but for situations where the embedded\n// methods are overridden (for example, you might want to override\n// assert.Assertions with require.Assertions), this method is provided so you\n// can call `suite.Assert().NoError()`.\nfunc (suite *Suite) Assert() *assert.Assertions {\n\tsuite.mu.Lock()\n\tdefer suite.mu.Unlock()\n\tif suite.Assertions == nil {\n\t\tpanic(\"'Assert' must not be called before 'Run' or 'SetT'\")\n\t}\n\treturn suite.Assertions\n}\n\nfunc recoverAndFailOnPanic(t *testing.T) {\n\tt.Helper()\n\tr := recover()\n\tfailOnPanic(t, r)\n}\n\nfunc failOnPanic(t *testing.T, r interface{}) {\n\tt.Helper()\n\tif r != nil {\n\t\tt.Errorf(\"test panicked: %v\\n%s\", r, debug.Stack())\n\t\tt.FailNow()\n\t}\n}\n\n// Run provides suite functionality around golang subtests.  It should be\n// called in place of t.Run(name, func(t *testing.T)) in test suite code.\n// The passed-in func will be executed as a subtest with a fresh instance of t.\n// Provides compatibility with go test pkg -run TestSuite/TestName/SubTestName.\nfunc (suite *Suite) Run(name string, subtest func()) bool {\n\toldT := suite.T()\n\n\treturn oldT.Run(name, func(t *testing.T) {\n\t\tsuite.SetT(t)\n\t\tdefer suite.SetT(oldT)\n\n\t\tdefer recoverAndFailOnPanic(t)\n\n\t\tif setupSubTest, ok := suite.s.(SetupSubTest); ok {\n\t\t\tsetupSubTest.SetupSubTest()\n\t\t}\n\n\t\tif tearDownSubTest, ok := suite.s.(TearDownSubTest); ok {\n\t\t\tdefer tearDownSubTest.TearDownSubTest()\n\t\t}\n\n\t\tsubtest()\n\t})\n}\n\ntype test = struct {\n\tname string\n\trun  func(t *testing.T)\n}\n\n// Run takes a testing suite and runs all of the tests attached\n// to it.\nfunc Run(t *testing.T, suite TestingSuite) {\n\tdefer recoverAndFailOnPanic(t)\n\n\tsuite.SetT(t)\n\tsuite.SetS(suite)\n\n\tvar stats *SuiteInformation\n\tif _, ok := suite.(WithStats); ok {\n\t\tstats = newSuiteInformation()\n\t}\n\n\tvar tests []test\n\tmethodFinder := reflect.TypeOf(suite)\n\tsuiteName := methodFinder.Elem().Name()\n\n\tvar matchMethodRE *regexp.Regexp\n\tif *matchMethod != \"\" {\n\t\tvar err error\n\t\tmatchMethodRE, err = regexp.Compile(*matchMethod)\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"testify: invalid regexp for -m: %s\\n\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t}\n\n\tfor i := 0; i < methodFinder.NumMethod(); i++ {\n\t\tmethod := methodFinder.Method(i)\n\n\t\tif !strings.HasPrefix(method.Name, \"Test\") {\n\t\t\tcontinue\n\t\t}\n\t\t// Apply -testify.m filter\n\t\tif matchMethodRE != nil && !matchMethodRE.MatchString(method.Name) {\n\t\t\tcontinue\n\t\t}\n\n\t\ttest := test{\n\t\t\tname: method.Name,\n\t\t\trun: func(t *testing.T) {\n\t\t\t\tparentT := suite.T()\n\t\t\t\tsuite.SetT(t)\n\t\t\t\tdefer recoverAndFailOnPanic(t)\n\t\t\t\tdefer func() {\n\t\t\t\t\tt.Helper()\n\n\t\t\t\t\tr := recover()\n\n\t\t\t\t\tstats.end(method.Name, !t.Failed() && r == nil)\n\n\t\t\t\t\tif afterTestSuite, ok := suite.(AfterTest); ok {\n\t\t\t\t\t\tafterTestSuite.AfterTest(suiteName, method.Name)\n\t\t\t\t\t}\n\n\t\t\t\t\tif tearDownTestSuite, ok := suite.(TearDownTestSuite); ok {\n\t\t\t\t\t\ttearDownTestSuite.TearDownTest()\n\t\t\t\t\t}\n\n\t\t\t\t\tsuite.SetT(parentT)\n\t\t\t\t\tfailOnPanic(t, r)\n\t\t\t\t}()\n\n\t\t\t\tif setupTestSuite, ok := suite.(SetupTestSuite); ok {\n\t\t\t\t\tsetupTestSuite.SetupTest()\n\t\t\t\t}\n\t\t\t\tif beforeTestSuite, ok := suite.(BeforeTest); ok {\n\t\t\t\t\tbeforeTestSuite.BeforeTest(methodFinder.Elem().Name(), method.Name)\n\t\t\t\t}\n\n\t\t\t\tstats.start(method.Name)\n\n\t\t\t\tmethod.Func.Call([]reflect.Value{reflect.ValueOf(suite)})\n\t\t\t},\n\t\t}\n\t\ttests = append(tests, test)\n\t}\n\n\tif len(tests) == 0 {\n\t\treturn\n\t}\n\n\tif stats != nil {\n\t\tstats.Start = time.Now()\n\t}\n\n\tif setupAllSuite, ok := suite.(SetupAllSuite); ok {\n\t\tsetupAllSuite.SetupSuite()\n\t}\n\n\tdefer func() {\n\t\tif tearDownAllSuite, ok := suite.(TearDownAllSuite); ok {\n\t\t\ttearDownAllSuite.TearDownSuite()\n\t\t}\n\n\t\tif suiteWithStats, measureStats := suite.(WithStats); measureStats {\n\t\t\tstats.End = time.Now()\n\t\t\tsuiteWithStats.HandleStats(suiteName, stats)\n\t\t}\n\t}()\n\n\trunTests(t, tests)\n}\n\nfunc runTests(t *testing.T, tests []test) {\n\tif len(tests) == 0 {\n\t\tt.Log(\"warning: no tests to run\")\n\t\treturn\n\t}\n\n\tfor _, test := range tests {\n\t\tt.Run(test.name, test.run)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/LICENSE.md",
    "content": "# LICENSE\n\nCopyright (c) 2018-2023, Sylabs Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from this\n   software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/add.go",
    "content": "// Copyright (c) 2018-2023, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// addOpts accumulates object add options.\ntype addOpts struct {\n\tt time.Time\n}\n\n// AddOpt are used to specify object add options.\ntype AddOpt func(*addOpts) error\n\n// OptAddDeterministic sets header/descriptor fields to values that support deterministic\n// modification of images.\nfunc OptAddDeterministic() AddOpt {\n\treturn func(ao *addOpts) error {\n\t\tao.t = time.Time{}\n\t\treturn nil\n\t}\n}\n\n// OptAddWithTime specifies t as the image modification time.\nfunc OptAddWithTime(t time.Time) AddOpt {\n\treturn func(ao *addOpts) error {\n\t\tao.t = t\n\t\treturn nil\n\t}\n}\n\n// AddObject adds a new data object and its descriptor into the specified SIF file.\n//\n// By default, the image modification time is set to the current time for non-deterministic images,\n// and unset otherwise. To override this, consider using OptAddDeterministic or OptAddWithTime.\nfunc (f *FileImage) AddObject(di DescriptorInput, opts ...AddOpt) error {\n\tao := addOpts{}\n\n\tif !f.isDeterministic() {\n\t\tao.t = time.Now()\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&ao); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\t// Find an unused descriptor.\n\ti := 0\n\tfor _, rd := range f.rds {\n\t\tif !rd.Used {\n\t\t\tbreak\n\t\t}\n\t\ti++\n\t}\n\n\tif err := f.writeDataObject(i, di, ao.t); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.h.ModifiedAt = ao.t.Unix()\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/arch.go",
    "content": "// Copyright (c) 2021-2022, Sylabs Inc. All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nvar (\n\thdrArchUnknown  archType = [...]byte{'0', '0', '\\x00'}\n\thdrArch386      archType = [...]byte{'0', '1', '\\x00'}\n\thdrArchAMD64    archType = [...]byte{'0', '2', '\\x00'}\n\thdrArchARM      archType = [...]byte{'0', '3', '\\x00'}\n\thdrArchARM64    archType = [...]byte{'0', '4', '\\x00'}\n\thdrArchPPC64    archType = [...]byte{'0', '5', '\\x00'}\n\thdrArchPPC64le  archType = [...]byte{'0', '6', '\\x00'}\n\thdrArchMIPS     archType = [...]byte{'0', '7', '\\x00'}\n\thdrArchMIPSle   archType = [...]byte{'0', '8', '\\x00'}\n\thdrArchMIPS64   archType = [...]byte{'0', '9', '\\x00'}\n\thdrArchMIPS64le archType = [...]byte{'1', '0', '\\x00'}\n\thdrArchS390x    archType = [...]byte{'1', '1', '\\x00'}\n\thdrArchRISCV64  archType = [...]byte{'1', '2', '\\x00'}\n)\n\ntype archType [3]byte\n\n// getSIFArch returns the archType corresponding to go runtime arch.\nfunc getSIFArch(arch string) archType {\n\tarchMap := map[string]archType{\n\t\t\"386\":      hdrArch386,\n\t\t\"amd64\":    hdrArchAMD64,\n\t\t\"arm\":      hdrArchARM,\n\t\t\"arm64\":    hdrArchARM64,\n\t\t\"ppc64\":    hdrArchPPC64,\n\t\t\"ppc64le\":  hdrArchPPC64le,\n\t\t\"mips\":     hdrArchMIPS,\n\t\t\"mipsle\":   hdrArchMIPSle,\n\t\t\"mips64\":   hdrArchMIPS64,\n\t\t\"mips64le\": hdrArchMIPS64le,\n\t\t\"s390x\":    hdrArchS390x,\n\t\t\"riscv64\":  hdrArchRISCV64,\n\t}\n\n\tt, ok := archMap[arch]\n\tif !ok {\n\t\treturn hdrArchUnknown\n\t}\n\treturn t\n}\n\n// GoArch returns the go runtime arch corresponding to t.\nfunc (t archType) GoArch() string {\n\tarchMap := map[archType]string{\n\t\thdrArch386:      \"386\",\n\t\thdrArchAMD64:    \"amd64\",\n\t\thdrArchARM:      \"arm\",\n\t\thdrArchARM64:    \"arm64\",\n\t\thdrArchPPC64:    \"ppc64\",\n\t\thdrArchPPC64le:  \"ppc64le\",\n\t\thdrArchMIPS:     \"mips\",\n\t\thdrArchMIPSle:   \"mipsle\",\n\t\thdrArchMIPS64:   \"mips64\",\n\t\thdrArchMIPS64le: \"mips64le\",\n\t\thdrArchS390x:    \"s390x\",\n\t\thdrArchRISCV64:  \"riscv64\",\n\t}\n\n\tarch, ok := archMap[t]\n\tif !ok {\n\t\tarch = \"unknown\"\n\t}\n\treturn arch\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/buffer.go",
    "content": "// Copyright (c) 2021-2022, Sylabs Inc. All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// A Buffer is a variable-sized buffer of bytes that implements the sif.ReadWriter interface. The\n// zero value for Buffer is an empty buffer ready to use.\ntype Buffer struct {\n\tbuf []byte\n\tpos int64\n}\n\n// NewBuffer creates and initializes a new Buffer using buf as its initial contents.\nfunc NewBuffer(buf []byte) *Buffer {\n\treturn &Buffer{buf: buf}\n}\n\nvar errNegativeOffset = errors.New(\"negative offset\")\n\n// ReadAt implements the io.ReaderAt interface.\nfunc (b *Buffer) ReadAt(p []byte, off int64) (int, error) {\n\tif off < 0 {\n\t\treturn 0, errNegativeOffset\n\t}\n\n\tif off >= int64(len(b.buf)) {\n\t\treturn 0, io.EOF\n\t}\n\n\tn := copy(p, b.buf[off:])\n\tif n < len(p) {\n\t\treturn n, io.EOF\n\t}\n\treturn n, nil\n}\n\nvar errNegativePosition = errors.New(\"negative position\")\n\n// Write implements the io.Writer interface.\nfunc (b *Buffer) Write(p []byte) (int, error) {\n\tif b.pos < 0 {\n\t\treturn 0, errNegativePosition\n\t}\n\n\tif have, need := int64(len(b.buf))-b.pos, int64(len(p)); have < need {\n\t\tb.buf = append(b.buf, make([]byte, need-have)...)\n\t}\n\n\tn := copy(b.buf[b.pos:], p)\n\tb.pos += int64(n)\n\treturn n, nil\n}\n\nvar errInvalidWhence = errors.New(\"invalid whence\")\n\n// Seek implements the io.Seeker interface.\nfunc (b *Buffer) Seek(offset int64, whence int) (int64, error) {\n\tvar abs int64\n\n\tswitch whence {\n\tcase io.SeekStart:\n\t\tabs = offset\n\tcase io.SeekCurrent:\n\t\tabs = b.pos + offset\n\tcase io.SeekEnd:\n\t\tabs = int64(len(b.buf)) + offset\n\tdefault:\n\t\treturn 0, errInvalidWhence\n\t}\n\n\tif abs < 0 {\n\t\treturn 0, errNegativePosition\n\t}\n\n\tb.pos = abs\n\treturn abs, nil\n}\n\nvar errTruncateRange = errors.New(\"truncation out of range\")\n\n// Truncate discards all but the first n bytes from the buffer.\nfunc (b *Buffer) Truncate(n int64) error {\n\tif n < 0 || n > int64(len(b.buf)) {\n\t\treturn errTruncateRange\n\t}\n\n\tb.buf = b.buf[:n]\n\treturn nil\n}\n\n// Bytes returns the contents of the buffer. The slice is valid for use only until the next buffer\n// modification (that is, only until the next call to a method like ReadAt, Write, or Truncate).\nfunc (b *Buffer) Bytes() []byte { return b.buf }\n\n// Len returns the number of bytes in the buffer.\nfunc (b *Buffer) Len() int64 { return int64(len(b.buf)) }\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/create.go",
    "content": "// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n)\n\nvar errAlignmentOverflow = errors.New(\"integer overflow when calculating alignment\")\n\n// nextAligned finds the next offset that satisfies alignment.\nfunc nextAligned(offset int64, alignment int) (int64, error) {\n\talign64 := int64(alignment)\n\n\tif align64 <= 0 || offset%align64 == 0 {\n\t\treturn offset, nil\n\t}\n\n\talign64 -= offset % align64\n\n\tif (math.MaxInt64 - offset) < align64 {\n\t\treturn 0, errAlignmentOverflow\n\t}\n\n\treturn offset + align64, nil\n}\n\n// writeDataObjectAt writes the data object described by di to ws, using time t, recording details\n// in d. The object is written at the first position that satisfies the alignment requirements\n// described by di following offsetUnaligned.\nfunc writeDataObjectAt(ws io.WriteSeeker, offsetUnaligned int64, di DescriptorInput, t time.Time, d *rawDescriptor) error { //nolint:lll\n\toffset, err := nextAligned(offsetUnaligned, di.opts.alignment)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif _, err := ws.Seek(offset, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\n\tn, err := io.Copy(ws, di.r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := di.fillDescriptor(t, d); err != nil {\n\t\treturn err\n\t}\n\td.Used = true\n\td.Offset = offset\n\td.Size = n\n\td.SizeWithPadding = offset - offsetUnaligned + n\n\n\treturn nil\n}\n\n// calculatedDataSize calculates the size of the data section based on the in-use descriptors.\nfunc (f *FileImage) calculatedDataSize() int64 {\n\tdataEnd := f.DataOffset()\n\n\tf.WithDescriptors(func(d Descriptor) bool {\n\t\tif objectEnd := d.Offset() + d.Size(); dataEnd < objectEnd {\n\t\t\tdataEnd = objectEnd\n\t\t}\n\t\treturn false\n\t})\n\n\treturn dataEnd - f.DataOffset()\n}\n\nvar (\n\terrInsufficientCapacity = errors.New(\"insufficient descriptor capacity to add data object(s) to image\")\n\terrPrimaryPartition     = errors.New(\"image already contains a primary partition\")\n\terrObjectIDOverflow     = errors.New(\"object ID would overflow\")\n)\n\n// writeDataObject writes the data object described by di to f, using time t, recording details in\n// the descriptor at index i.\nfunc (f *FileImage) writeDataObject(i int, di DescriptorInput, t time.Time) error {\n\tif i >= len(f.rds) {\n\t\treturn errInsufficientCapacity\n\t}\n\n\t// We derive the ID from i, so make sure the ID will not overflow.\n\tif int64(i) >= math.MaxUint32 {\n\t\treturn errObjectIDOverflow\n\t}\n\n\t// If this is a primary partition, verify there isn't another primary partition, and update the\n\t// architecture in the global header.\n\tif p, ok := di.opts.md.(partition); ok && p.Parttype == PartPrimSys {\n\t\tif ds, err := f.GetDescriptors(WithPartitionType(PartPrimSys)); err == nil && len(ds) > 0 {\n\t\t\treturn errPrimaryPartition\n\t\t}\n\n\t\tf.h.Arch = p.Arch\n\t}\n\n\td := &f.rds[i]\n\td.ID = uint32(i) + 1 //nolint:gosec // Overflow handled above.\n\n\tf.h.DataSize = f.calculatedDataSize()\n\n\tif err := writeDataObjectAt(f.rw, f.h.DataOffset+f.h.DataSize, di, t, d); err != nil {\n\t\treturn err\n\t}\n\n\t// Update minimum object ID map.\n\tif minID, ok := f.minIDs[d.GroupID]; !ok || d.ID < minID {\n\t\tf.minIDs[d.GroupID] = d.ID\n\t}\n\n\tf.h.DescriptorsFree--\n\tf.h.DataSize += d.SizeWithPadding\n\n\treturn nil\n}\n\n// writeDescriptors writes the descriptors in f to backing storage.\nfunc (f *FileImage) writeDescriptors() error {\n\tif _, err := f.rw.Seek(f.h.DescriptorsOffset, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\n\treturn binary.Write(f.rw, binary.LittleEndian, f.rds)\n}\n\n// writeHeader writes the global header in f to backing storage.\nfunc (f *FileImage) writeHeader() error {\n\tif _, err := f.rw.Seek(0, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\n\treturn binary.Write(f.rw, binary.LittleEndian, f.h)\n}\n\n// createOpts accumulates container creation options.\ntype createOpts struct {\n\tlaunchScript       [hdrLaunchLen]byte\n\tid                 uuid.UUID\n\tdescriptorsOffset  int64\n\tdescriptorCapacity int64\n\tdis                []DescriptorInput\n\tt                  time.Time\n\tcloseOnUnload      bool\n}\n\n// CreateOpt are used to specify container creation options.\ntype CreateOpt func(*createOpts) error\n\nvar errLaunchScriptLen = errors.New(\"launch script too large\")\n\n// OptCreateWithLaunchScript specifies s as the launch script.\nfunc OptCreateWithLaunchScript(s string) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tb := []byte(s)\n\n\t\tif len(b) >= len(co.launchScript) {\n\t\t\treturn errLaunchScriptLen\n\t\t}\n\n\t\tcopy(co.launchScript[:], b)\n\n\t\treturn nil\n\t}\n}\n\n// OptCreateDeterministic sets header/descriptor fields to values that support deterministic\n// creation of images.\nfunc OptCreateDeterministic() CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tco.id = uuid.Nil\n\t\tco.t = time.Time{}\n\t\treturn nil\n\t}\n}\n\n// OptCreateWithID specifies id as the unique ID.\nfunc OptCreateWithID(id string) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tid, err := uuid.Parse(id)\n\t\tco.id = id\n\t\treturn err\n\t}\n}\n\n// OptCreateWithDescriptorCapacity specifies that the created image should have the capacity for a\n// maximum of n descriptors.\nfunc OptCreateWithDescriptorCapacity(n int64) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tco.descriptorCapacity = n\n\t\treturn nil\n\t}\n}\n\n// OptCreateWithDescriptors appends dis to the list of descriptors.\nfunc OptCreateWithDescriptors(dis ...DescriptorInput) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tco.dis = append(co.dis, dis...)\n\t\treturn nil\n\t}\n}\n\n// OptCreateWithTime specifies t as the image creation time.\nfunc OptCreateWithTime(t time.Time) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tco.t = t\n\t\treturn nil\n\t}\n}\n\n// OptCreateWithCloseOnUnload specifies whether the ReadWriter should be closed by UnloadContainer.\n// By default, the ReadWriter will be closed if it implements the io.Closer interface.\nfunc OptCreateWithCloseOnUnload(b bool) CreateOpt {\n\treturn func(co *createOpts) error {\n\t\tco.closeOnUnload = b\n\t\treturn nil\n\t}\n}\n\nvar errDescriptorCapacityNotSupported = errors.New(\"descriptor capacity not supported\")\n\n// createContainer creates a new SIF container file in rw, according to opts.\nfunc createContainer(rw ReadWriter, co createOpts) (*FileImage, error) {\n\t// The supported number of descriptors is limited by the unsigned 32-bit ID field in each\n\t// rawDescriptor.\n\tif co.descriptorCapacity >= math.MaxUint32 {\n\t\treturn nil, errDescriptorCapacityNotSupported\n\t}\n\n\trds := make([]rawDescriptor, co.descriptorCapacity)\n\trdsSize := int64(binary.Size(rds))\n\n\th := header{\n\t\tLaunchScript:      co.launchScript,\n\t\tMagic:             hdrMagic,\n\t\tVersion:           CurrentVersion.bytes(),\n\t\tArch:              hdrArchUnknown,\n\t\tID:                co.id,\n\t\tCreatedAt:         co.t.Unix(),\n\t\tModifiedAt:        co.t.Unix(),\n\t\tDescriptorsFree:   co.descriptorCapacity,\n\t\tDescriptorsTotal:  co.descriptorCapacity,\n\t\tDescriptorsOffset: co.descriptorsOffset,\n\t\tDescriptorsSize:   rdsSize,\n\t\tDataOffset:        co.descriptorsOffset + rdsSize,\n\t}\n\n\tf := &FileImage{\n\t\trw:     rw,\n\t\th:      h,\n\t\trds:    rds,\n\t\tminIDs: make(map[uint32]uint32),\n\t}\n\n\tfor i, di := range co.dis {\n\t\tif err := f.writeDataObject(i, di, co.t); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn f, nil\n}\n\n// CreateContainer creates a new SIF container in rw, according to opts. One or more data objects\n// can optionally be specified using OptCreateWithDescriptors.\n//\n// On success, a FileImage is returned. The caller must call UnloadContainer to ensure resources\n// are released. By default, UnloadContainer will close rw if it implements the io.Closer\n// interface. To change this behavior, consider using OptCreateWithCloseOnUnload.\n//\n// By default, the image ID is set to a randomly generated value. To override this, consider using\n// OptCreateDeterministic or OptCreateWithID.\n//\n// By default, the image creation time is set to the current time. To override this, consider using\n// OptCreateDeterministic or OptCreateWithTime.\n//\n// By default, the image will support a maximum of 48 descriptors. To change this, consider using\n// OptCreateWithDescriptorCapacity.\n//\n// A launch script can optionally be set using OptCreateWithLaunchScript.\nfunc CreateContainer(rw ReadWriter, opts ...CreateOpt) (*FileImage, error) {\n\tid, err := uuid.NewRandom()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tco := createOpts{\n\t\tid:                 id,\n\t\tdescriptorsOffset:  4096,\n\t\tdescriptorCapacity: 48,\n\t\tt:                  time.Now(),\n\t\tcloseOnUnload:      true,\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&co); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tf, err := createContainer(rw, co)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.closeOnUnload = co.closeOnUnload\n\treturn f, nil\n}\n\n// CreateContainerAtPath creates a new SIF container file at path, according to opts. One or more\n// data objects can optionally be specified using OptCreateWithDescriptors.\n//\n// On success, a FileImage is returned. The caller must call UnloadContainer to ensure resources\n// are released.\n//\n// By default, the image ID is set to a randomly generated value. To override this, consider using\n// OptCreateDeterministic or OptCreateWithID.\n//\n// By default, the image creation time is set to the current time. To override this, consider using\n// OptCreateDeterministic or OptCreateWithTime.\n//\n// By default, the image will support a maximum of 48 descriptors. To change this, consider using\n// OptCreateWithDescriptorCapacity.\n//\n// A launch script can optionally be set using OptCreateWithLaunchScript.\nfunc CreateContainerAtPath(path string, opts ...CreateOpt) (*FileImage, error) {\n\tfp, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o755)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\tf, err := CreateContainer(fp, opts...)\n\tif err != nil {\n\t\tfp.Close()\n\t\tos.Remove(fp.Name())\n\n\t\treturn nil, err\n\t}\n\n\tf.closeOnUnload = true\n\treturn f, nil\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/delete.go",
    "content": "// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n)\n\n// zeroReader is an io.Reader that returns a stream of zero-bytes.\ntype zeroReader struct{}\n\nfunc (zeroReader) Read(b []byte) (int, error) {\n\tclear(b)\n\treturn len(b), nil\n}\n\n// zero overwrites the data object described by d with a stream of zero bytes.\nfunc (f *FileImage) zero(d *rawDescriptor) error {\n\tif _, err := f.rw.Seek(d.Offset, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\n\t_, err := io.CopyN(f.rw, zeroReader{}, d.Size)\n\treturn err\n}\n\n// deleteOpts accumulates object deletion options.\ntype deleteOpts struct {\n\tzero    bool\n\tcompact bool\n\tt       time.Time\n}\n\n// DeleteOpt are used to specify object deletion options.\ntype DeleteOpt func(*deleteOpts) error\n\n// OptDeleteZero specifies whether the deleted object should be zeroed.\nfunc OptDeleteZero(b bool) DeleteOpt {\n\treturn func(do *deleteOpts) error {\n\t\tdo.zero = b\n\t\treturn nil\n\t}\n}\n\n// OptDeleteCompact specifies whether the image should be compacted following object deletion.\nfunc OptDeleteCompact(b bool) DeleteOpt {\n\treturn func(do *deleteOpts) error {\n\t\tdo.compact = b\n\t\treturn nil\n\t}\n}\n\n// OptDeleteDeterministic sets header/descriptor fields to values that support deterministic\n// modification of images.\nfunc OptDeleteDeterministic() DeleteOpt {\n\treturn func(do *deleteOpts) error {\n\t\tdo.t = time.Time{}\n\t\treturn nil\n\t}\n}\n\n// OptDeleteWithTime specifies t as the image modification time.\nfunc OptDeleteWithTime(t time.Time) DeleteOpt {\n\treturn func(do *deleteOpts) error {\n\t\tdo.t = t\n\t\treturn nil\n\t}\n}\n\n// DeleteObject deletes the data object with id, according to opts. If no matching descriptor is\n// found, an error wrapping ErrObjectNotFound is returned.\n//\n// To zero the data region of the deleted object, use OptDeleteZero. To remove unused space at the\n// end of the FileImage following object deletion, use OptDeleteCompact.\n//\n// By default, the image modification time is set to the current time for non-deterministic images,\n// and unset otherwise. To override this, consider using OptDeleteDeterministic or\n// OptDeleteWithTime.\nfunc (f *FileImage) DeleteObject(id uint32, opts ...DeleteOpt) error {\n\treturn f.DeleteObjects(WithID(id), opts...)\n}\n\n// DeleteObjects deletes the data objects selected by fn, according to opts. If no descriptors are\n// selected by fns, an error wrapping ErrObjectNotFound is returned.\n//\n// To zero the data region of the deleted object, use OptDeleteZero. To remove unused space at the\n// end of the FileImage following object deletion, use OptDeleteCompact.\n//\n// By default, the image modification time is set to the current time for non-deterministic images,\n// and unset otherwise. To override this, consider using OptDeleteDeterministic or\n// OptDeleteWithTime.\nfunc (f *FileImage) DeleteObjects(fn DescriptorSelectorFunc, opts ...DeleteOpt) error {\n\tdo := deleteOpts{}\n\n\tif !f.isDeterministic() {\n\t\tdo.t = time.Now()\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&do); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tvar selected bool\n\n\tif err := f.withDescriptors(fn, func(d *rawDescriptor) error {\n\t\tselected = true\n\n\t\tif do.zero {\n\t\t\tif err := f.zero(d); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t\t}\n\t\t}\n\n\t\tf.h.DescriptorsFree++\n\n\t\t// If we remove the primary partition, set the global header Arch field to HdrArchUnknown\n\t\t// to indicate that the SIF file doesn't include a primary partition and no dependency\n\t\t// on any architecture exists.\n\t\tif d.isPartitionOfType(PartPrimSys) {\n\t\t\tf.h.Arch = hdrArchUnknown\n\t\t}\n\n\t\t// Reset rawDescripter with empty struct\n\t\t*d = rawDescriptor{}\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif !selected {\n\t\treturn fmt.Errorf(\"%w\", ErrObjectNotFound)\n\t}\n\n\tf.h.ModifiedAt = do.t.Unix()\n\n\tif do.compact {\n\t\tf.h.DataSize = f.calculatedDataSize()\n\n\t\tif err := f.rw.Truncate(f.h.DataOffset + f.h.DataSize); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go",
    "content": "// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/sha256\"\n\t\"encoding\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"strings\"\n\t\"time\"\n\n\tv1 \"github.com/google/go-containerregistry/pkg/v1\"\n)\n\n// rawDescriptor represents an on-disk object descriptor.\ntype rawDescriptor struct {\n\tDataType        DataType\n\tUsed            bool\n\tID              uint32\n\tGroupID         uint32\n\tLinkedID        uint32\n\tOffset          int64\n\tSize            int64\n\tSizeWithPadding int64\n\n\tCreatedAt  int64\n\tModifiedAt int64\n\tUID        int64 // Deprecated: UID exists for historical compatibility and should not be used.\n\tGID        int64 // Deprecated: GID exists for historical compatibility and should not be used.\n\tName       [descrNameLen]byte\n\tExtra      [descrMaxPrivLen]byte\n}\n\n// partition represents the SIF partition data object descriptor.\ntype partition struct {\n\tFstype   FSType\n\tParttype PartType\n\tArch     archType\n}\n\n// MarshalBinary encodes p into binary format.\nfunc (p partition) MarshalBinary() ([]byte, error) {\n\treturn binaryMarshaler{p}.MarshalBinary()\n}\n\n// signature represents the SIF signature data object descriptor.\ntype signature struct {\n\tHashtype hashType\n\tEntity   [descrEntityLen]byte\n}\n\n// cryptoMessage represents the SIF crypto message object descriptor.\ntype cryptoMessage struct {\n\tFormattype  FormatType\n\tMessagetype MessageType\n}\n\n// sbom represents the SIF SBOM data object descriptor.\ntype sbom struct {\n\tFormat SBOMFormat\n}\n\n// ociBlob represents the OCI Blob data object descriptor.\ntype ociBlob struct {\n\thasher hash.Hash // accumulates hash while writing blob.\n\tdigest v1.Hash\n}\n\n// newOCIBlobDigest returns a new ociBlob, that accumulates the digest of an OCI blob as it is\n// read. The caller should take care to ensure that the entire contents of the blob have been\n// written to the returned ociBlob prior to calling MarshalBinary.\nfunc newOCIBlobDigest() *ociBlob {\n\treturn &ociBlob{\n\t\thasher: sha256.New(),\n\t\tdigest: v1.Hash{\n\t\t\tAlgorithm: \"sha256\",\n\t\t},\n\t}\n}\n\n// MarshalBinary encodes ob into binary format.\nfunc (ob *ociBlob) MarshalBinary() ([]byte, error) {\n\tif ob.digest.Hex == \"\" {\n\t\tob.digest.Hex = hex.EncodeToString(ob.hasher.Sum(nil))\n\t}\n\n\treturn ob.digest.MarshalText()\n}\n\n// UnmarshalBinary decodes b into ob.\nfunc (ob *ociBlob) UnmarshalBinary(b []byte) error {\n\tif before, _, ok := bytes.Cut(b, []byte{0x00}); ok {\n\t\tb = before\n\t}\n\n\treturn ob.digest.UnmarshalText(b)\n}\n\n// The binaryMarshaler type is an adapter that allows a type suitable for use with the\n// encoding/binary package to be used as an encoding.BinaryMarshaler.\ntype binaryMarshaler struct{ any }\n\n// MarshalBinary encodes m into binary format.\nfunc (m binaryMarshaler) MarshalBinary() ([]byte, error) {\n\tvar b bytes.Buffer\n\terr := binary.Write(&b, binary.LittleEndian, m.any)\n\treturn b.Bytes(), err\n}\n\n// The binaryUnmarshaler type is an adapter that allows a type suitable for use with the\n// encoding/binary package to be used as an encoding.BinaryUnmarshaler.\ntype binaryUnmarshaler struct{ any }\n\n// UnmarshalBinary decodes b into u.\nfunc (u binaryUnmarshaler) UnmarshalBinary(b []byte) error {\n\treturn binary.Read(bytes.NewReader(b), binary.LittleEndian, u.any)\n}\n\nvar errNameTooLarge = errors.New(\"name value too large\")\n\n// setName encodes name into the name field of d.\nfunc (d *rawDescriptor) setName(name string) error {\n\tif len(name) > len(d.Name) {\n\t\treturn errNameTooLarge\n\t}\n\n\tfor i := copy(d.Name[:], name); i < len(d.Name); i++ {\n\t\td.Name[i] = 0\n\t}\n\n\treturn nil\n}\n\nvar errExtraTooLarge = errors.New(\"extra value too large\")\n\n// setExtra marshals metadata from md into the \"extra\" field of d.\nfunc (d *rawDescriptor) setExtra(md encoding.BinaryMarshaler) error {\n\tif md == nil {\n\t\treturn nil\n\t}\n\n\textra, err := md.MarshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(extra) > len(d.Extra) {\n\t\treturn errExtraTooLarge\n\t}\n\n\tfor i := copy(d.Extra[:], extra); i < len(d.Extra); i++ {\n\t\td.Extra[i] = 0\n\t}\n\n\treturn nil\n}\n\n// getExtra unmarshals metadata from the \"extra\" field of d into md.\nfunc (d *rawDescriptor) getExtra(md encoding.BinaryUnmarshaler) error {\n\treturn md.UnmarshalBinary(d.Extra[:])\n}\n\n// getPartitionMetadata gets metadata for a partition data object.\nfunc (d rawDescriptor) getPartitionMetadata() (FSType, PartType, string, error) {\n\tif got, want := d.DataType, DataPartition; got != want {\n\t\treturn 0, 0, \"\", &unexpectedDataTypeError{got, []DataType{want}}\n\t}\n\n\tvar p partition\n\n\tif err := d.getExtra(binaryUnmarshaler{&p}); err != nil {\n\t\treturn 0, 0, \"\", err\n\t}\n\n\treturn p.Fstype, p.Parttype, p.Arch.GoArch(), nil\n}\n\n// isPartitionOfType returns true if d is a partition data object of type pt.\nfunc (d rawDescriptor) isPartitionOfType(pt PartType) bool {\n\t_, t, _, err := d.getPartitionMetadata()\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn t == pt\n}\n\n// Descriptor represents the SIF descriptor type.\ntype Descriptor struct {\n\tr io.ReaderAt // Backing storage.\n\n\traw rawDescriptor // Raw descriptor from image.\n\n\trelativeID uint32 // ID relative to minimum ID of object group.\n}\n\n// DataType returns the type of data object.\nfunc (d Descriptor) DataType() DataType { return d.raw.DataType }\n\n// ID returns the data object ID of d.\nfunc (d Descriptor) ID() uint32 { return d.raw.ID }\n\n// GroupID returns the data object group ID of d, or zero if d is not part of a data object\n// group.\nfunc (d Descriptor) GroupID() uint32 { return d.raw.GroupID &^ descrGroupMask }\n\n// LinkedID returns the object/group ID d is linked to, or zero if d does not contain a linked\n// ID. If isGroup is true, the returned id is an object group ID. Otherwise, the returned id is a\n// data object ID.\n//\n//nolint:nonamedreturns // Named returns effective as documentation.\nfunc (d Descriptor) LinkedID() (id uint32, isGroup bool) {\n\treturn d.raw.LinkedID &^ descrGroupMask, d.raw.LinkedID&descrGroupMask == descrGroupMask\n}\n\n// Offset returns the offset of the data object.\nfunc (d Descriptor) Offset() int64 { return d.raw.Offset }\n\n// Size returns the data object size.\nfunc (d Descriptor) Size() int64 { return d.raw.Size }\n\n// CreatedAt returns the creation time of the data object.\nfunc (d Descriptor) CreatedAt() time.Time { return time.Unix(d.raw.CreatedAt, 0) }\n\n// ModifiedAt returns the modification time of the data object.\nfunc (d Descriptor) ModifiedAt() time.Time { return time.Unix(d.raw.ModifiedAt, 0) }\n\n// Name returns the name of the data object.\nfunc (d Descriptor) Name() string { return strings.TrimRight(string(d.raw.Name[:]), \"\\000\") }\n\n// GetMetadata unmarshals metadata from the \"extra\" field of d into md.\nfunc (d Descriptor) GetMetadata(md encoding.BinaryUnmarshaler) error {\n\tif err := d.raw.getExtra(md); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\treturn nil\n}\n\n// PartitionMetadata gets metadata for a partition data object.\n//\n//nolint:nonamedreturns // Named returns effective as documentation.\nfunc (d Descriptor) PartitionMetadata() (fs FSType, pt PartType, arch string, err error) {\n\tfs, pt, arch, err = d.raw.getPartitionMetadata()\n\tif err != nil {\n\t\treturn 0, 0, \"\", fmt.Errorf(\"%w\", err)\n\t}\n\treturn fs, pt, arch, err\n}\n\nvar errHashUnsupported = errors.New(\"hash algorithm unsupported\")\n\n// getHashType converts ht into a crypto.Hash.\nfunc getHashType(ht hashType) (crypto.Hash, error) {\n\tswitch ht {\n\tcase hashSHA256:\n\t\treturn crypto.SHA256, nil\n\tcase hashSHA384:\n\t\treturn crypto.SHA384, nil\n\tcase hashSHA512:\n\t\treturn crypto.SHA512, nil\n\tcase hashBLAKE2S:\n\t\treturn crypto.BLAKE2s_256, nil\n\tcase hashBLAKE2B:\n\t\treturn crypto.BLAKE2b_256, nil\n\t}\n\treturn 0, errHashUnsupported\n}\n\n// SignatureMetadata gets metadata for a signature data object.\n//\n//nolint:nonamedreturns // Named returns effective as documentation.\nfunc (d Descriptor) SignatureMetadata() (ht crypto.Hash, fp []byte, err error) {\n\tif got, want := d.raw.DataType, DataSignature; got != want {\n\t\treturn ht, fp, &unexpectedDataTypeError{got, []DataType{want}}\n\t}\n\n\tvar s signature\n\n\tif err := d.raw.getExtra(binaryUnmarshaler{&s}); err != nil {\n\t\treturn ht, fp, fmt.Errorf(\"%w\", err)\n\t}\n\n\tif ht, err = getHashType(s.Hashtype); err != nil {\n\t\treturn ht, fp, fmt.Errorf(\"%w\", err)\n\t}\n\n\tfp = make([]byte, 20)\n\n\tif bytes.Equal(s.Entity[:len(fp)], fp) {\n\t\treturn ht, nil, nil // Fingerprint not present.\n\t}\n\n\tcopy(fp, s.Entity[:])\n\n\treturn ht, fp, nil\n}\n\n// CryptoMessageMetadata gets metadata for a crypto message data object.\nfunc (d Descriptor) CryptoMessageMetadata() (FormatType, MessageType, error) {\n\tif got, want := d.raw.DataType, DataCryptoMessage; got != want {\n\t\treturn 0, 0, &unexpectedDataTypeError{got, []DataType{want}}\n\t}\n\n\tvar m cryptoMessage\n\n\tif err := d.raw.getExtra(binaryUnmarshaler{&m}); err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn m.Formattype, m.Messagetype, nil\n}\n\n// SBOMMetadata gets metadata for a SBOM data object.\nfunc (d Descriptor) SBOMMetadata() (SBOMFormat, error) {\n\tif got, want := d.raw.DataType, DataSBOM; got != want {\n\t\treturn 0, &unexpectedDataTypeError{got, []DataType{want}}\n\t}\n\n\tvar s sbom\n\n\tif err := d.raw.getExtra(binaryUnmarshaler{&s}); err != nil {\n\t\treturn 0, fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn s.Format, nil\n}\n\n// OCIBlobDigest returns the digest for a OCI blob object.\nfunc (d Descriptor) OCIBlobDigest() (v1.Hash, error) {\n\tif got := d.raw.DataType; got != DataOCIRootIndex && got != DataOCIBlob {\n\t\treturn v1.Hash{}, &unexpectedDataTypeError{got, []DataType{DataOCIRootIndex, DataOCIBlob}}\n\t}\n\n\tvar o ociBlob\n\n\tif err := d.raw.getExtra(&o); err != nil {\n\t\treturn v1.Hash{}, fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn o.digest, nil\n}\n\n// GetData returns the data object associated with descriptor d.\nfunc (d Descriptor) GetData() ([]byte, error) {\n\tb := make([]byte, d.raw.Size)\n\tif _, err := io.ReadFull(d.GetReader(), b); err != nil {\n\t\treturn nil, err\n\t}\n\treturn b, nil\n}\n\n// GetReader returns a io.Reader that reads the data object associated with descriptor d.\nfunc (d Descriptor) GetReader() io.Reader {\n\treturn io.NewSectionReader(d.r, d.raw.Offset, d.raw.Size)\n}\n\n// GetIntegrityReader returns an io.Reader that reads the integrity-protected fields from d.\nfunc (d Descriptor) GetIntegrityReader() io.Reader {\n\tfields := []interface{}{\n\t\td.raw.DataType,\n\t\td.raw.Used,\n\t\td.relativeID,\n\t\td.raw.LinkedID,\n\t\td.raw.Size,\n\t\td.raw.CreatedAt,\n\t\td.raw.UID,\n\t\td.raw.GID,\n\t}\n\n\t// Encode endian-sensitive fields.\n\tdata := bytes.Buffer{}\n\tfor _, f := range fields {\n\t\tif err := binary.Write(&data, binary.LittleEndian, f); err != nil {\n\t\t\tpanic(err) // (*bytes.Buffer).Write() is documented as always returning a nil error.\n\t\t}\n\t}\n\n\treturn io.MultiReader(\n\t\t&data,\n\t\tbytes.NewReader(d.raw.Name[:]),\n\t\tbytes.NewReader(d.raw.Extra[:]),\n\t)\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go",
    "content": "// Copyright (c) 2021-2024, Sylabs Inc. All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"crypto\"\n\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n)\n\n// descriptorOpts accumulates data object options.\ntype descriptorOpts struct {\n\tgroupID   uint32\n\tlinkID    uint32\n\talignment int\n\tname      string\n\tmd        encoding.BinaryMarshaler\n\tt         time.Time\n}\n\n// DescriptorInputOpt are used to specify data object options.\ntype DescriptorInputOpt func(DataType, *descriptorOpts) error\n\n// OptNoGroup specifies the data object is not contained within a data object group.\nfunc OptNoGroup() DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\topts.groupID = 0\n\t\treturn nil\n\t}\n}\n\n// OptGroupID specifies groupID as data object group ID.\nfunc OptGroupID(groupID uint32) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\tif groupID == 0 {\n\t\t\treturn ErrInvalidGroupID\n\t\t}\n\t\topts.groupID = groupID\n\t\treturn nil\n\t}\n}\n\n// OptLinkedID specifies that the data object is linked to the data object with the specified ID.\nfunc OptLinkedID(id uint32) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\tif id == 0 {\n\t\t\treturn ErrInvalidObjectID\n\t\t}\n\t\topts.linkID = id\n\t\treturn nil\n\t}\n}\n\n// OptLinkedGroupID specifies that the data object is linked to the data object group with the\n// specified groupID.\nfunc OptLinkedGroupID(groupID uint32) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\tif groupID == 0 {\n\t\t\treturn ErrInvalidGroupID\n\t\t}\n\t\topts.linkID = groupID | descrGroupMask\n\t\treturn nil\n\t}\n}\n\n// OptObjectAlignment specifies n as the data alignment requirement.\nfunc OptObjectAlignment(n int) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\topts.alignment = n\n\t\treturn nil\n\t}\n}\n\n// OptObjectName specifies name as the data object name.\nfunc OptObjectName(name string) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\topts.name = name\n\t\treturn nil\n\t}\n}\n\n// OptObjectTime specifies t as the data object creation time.\nfunc OptObjectTime(t time.Time) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\topts.t = t\n\t\treturn nil\n\t}\n}\n\n// OptMetadata marshals metadata from md into the \"extra\" field of d.\nfunc OptMetadata(md encoding.BinaryMarshaler) DescriptorInputOpt {\n\treturn func(_ DataType, opts *descriptorOpts) error {\n\t\topts.md = md\n\t\treturn nil\n\t}\n}\n\ntype unexpectedDataTypeError struct {\n\tgot  DataType\n\twant []DataType\n}\n\nfunc (e *unexpectedDataTypeError) Error() string {\n\treturn fmt.Sprintf(\"unexpected data type %v, expected one of: %v\", e.got, e.want)\n}\n\nfunc (e *unexpectedDataTypeError) Is(target error) bool {\n\tt, ok := target.(*unexpectedDataTypeError)\n\tif !ok {\n\t\treturn false\n\t}\n\n\tif len(t.want) > 0 {\n\t\t// Use a map to check that the \"want\" errors in e and t contain the same values, ignoring\n\t\t// any ordering differences.\n\t\tacc := make(map[DataType]int, len(t.want))\n\n\t\t// Increment counter for each data type in e.\n\t\tfor _, dt := range e.want {\n\t\t\tif _, ok := acc[dt]; !ok {\n\t\t\t\tacc[dt] = 0\n\t\t\t}\n\t\t\tacc[dt]++\n\t\t}\n\n\t\t// Decrement counter for each data type in e.\n\t\tfor _, dt := range t.want {\n\t\t\tif _, ok := acc[dt]; !ok {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tacc[dt]--\n\t\t}\n\n\t\t// If the \"want\" errors in e and t are equivalent, all counters should be zero.\n\t\tfor _, n := range acc {\n\t\t\tif n != 0 {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (e.got == t.got || t.got == 0)\n}\n\n// OptCryptoMessageMetadata sets metadata for a crypto message data object. The format type is set\n// to ft, and the message type is set to mt.\n//\n// If this option is applied to a data object with an incompatible type, an error is returned.\nfunc OptCryptoMessageMetadata(ft FormatType, mt MessageType) DescriptorInputOpt {\n\treturn func(t DataType, opts *descriptorOpts) error {\n\t\tif got, want := t, DataCryptoMessage; got != want {\n\t\t\treturn &unexpectedDataTypeError{got, []DataType{want}}\n\t\t}\n\n\t\tm := cryptoMessage{\n\t\t\tFormattype:  ft,\n\t\t\tMessagetype: mt,\n\t\t}\n\n\t\topts.md = binaryMarshaler{m}\n\t\treturn nil\n\t}\n}\n\nvar errUnknownArchitcture = errors.New(\"unknown architecture\")\n\n// OptPartitionMetadata sets metadata for a partition data object. The filesystem type is set to\n// fs, the partition type is set to pt, and the CPU architecture is set to arch. The value of arch\n// should be the architecture as represented by the Go runtime.\n//\n// If this option is applied to a data object with an incompatible type, an error is returned.\nfunc OptPartitionMetadata(fs FSType, pt PartType, arch string) DescriptorInputOpt {\n\treturn func(t DataType, opts *descriptorOpts) error {\n\t\tif got, want := t, DataPartition; got != want {\n\t\t\treturn &unexpectedDataTypeError{got, []DataType{want}}\n\t\t}\n\n\t\tsifarch := getSIFArch(arch)\n\t\tif sifarch == hdrArchUnknown {\n\t\t\treturn fmt.Errorf(\"%w: %v\", errUnknownArchitcture, arch)\n\t\t}\n\n\t\tp := partition{\n\t\t\tFstype:   fs,\n\t\t\tParttype: pt,\n\t\t\tArch:     sifarch,\n\t\t}\n\n\t\topts.md = p\n\t\treturn nil\n\t}\n}\n\n// sifHashType converts h into a HashType.\nfunc sifHashType(h crypto.Hash) hashType {\n\tswitch h {\n\tcase crypto.SHA256:\n\t\treturn hashSHA256\n\tcase crypto.SHA384:\n\t\treturn hashSHA384\n\tcase crypto.SHA512:\n\t\treturn hashSHA512\n\tcase crypto.BLAKE2s_256:\n\t\treturn hashBLAKE2S\n\tcase crypto.BLAKE2b_256:\n\t\treturn hashBLAKE2B\n\t}\n\treturn 0\n}\n\n// OptSignatureMetadata sets metadata for a signature data object. The hash type is set to ht, and\n// the signing entity fingerprint is set to fp.\n//\n// If this option is applied to a data object with an incompatible type, an error is returned.\nfunc OptSignatureMetadata(ht crypto.Hash, fp []byte) DescriptorInputOpt {\n\treturn func(t DataType, opts *descriptorOpts) error {\n\t\tif got, want := t, DataSignature; got != want {\n\t\t\treturn &unexpectedDataTypeError{got, []DataType{want}}\n\t\t}\n\n\t\ts := signature{\n\t\t\tHashtype: sifHashType(ht),\n\t\t}\n\t\tcopy(s.Entity[:], fp)\n\n\t\topts.md = binaryMarshaler{s}\n\t\treturn nil\n\t}\n}\n\n// OptSBOMMetadata sets metadata for a SBOM data object. The SBOM format is set to f.\n//\n// If this option is applied to a data object with an incompatible type, an error is returned.\nfunc OptSBOMMetadata(f SBOMFormat) DescriptorInputOpt {\n\treturn func(t DataType, opts *descriptorOpts) error {\n\t\tif got, want := t, DataSBOM; got != want {\n\t\t\treturn &unexpectedDataTypeError{got, []DataType{want}}\n\t\t}\n\n\t\ts := sbom{\n\t\t\tFormat: f,\n\t\t}\n\n\t\topts.md = binaryMarshaler{s}\n\t\treturn nil\n\t}\n}\n\n// DescriptorInput describes a new data object.\ntype DescriptorInput struct {\n\tdt   DataType\n\tr    io.Reader\n\topts descriptorOpts\n}\n\n// DefaultObjectGroup is the default group that data objects are placed in.\nconst DefaultObjectGroup = 1\n\n// NewDescriptorInput returns a DescriptorInput representing a data object of type t, with contents\n// read from r, configured according to opts.\n//\n// It is possible (and often necessary) to store additional metadata related to certain types of\n// data objects. Consider supplying options such as OptCryptoMessageMetadata, OptPartitionMetadata,\n// OptSignatureMetadata, and OptSBOMMetadata for this purpose. To set custom metadata, use\n// OptMetadata.\n//\n// By default, the data object will be placed in the default data object group (1). To override\n// this behavior, use OptNoGroup or OptGroupID. To link this data object, use OptLinkedID or\n// OptLinkedGroupID.\n//\n// By default, the data object will not be aligned unless it is of type DataPartition, in which\n// case it will be aligned on a 4096 byte boundary. To override this behavior, consider using\n// OptObjectAlignment.\n//\n// By default, no name is set for data object. To set a name, use OptObjectName.\n//\n// When creating a new image, data object creation/modification times are set to the image creation\n// time. When modifying an existing image, the data object creation/modification time is set to the\n// image modification time. To override this behavior, consider using OptObjectTime.\nfunc NewDescriptorInput(t DataType, r io.Reader, opts ...DescriptorInputOpt) (DescriptorInput, error) {\n\tdopts := descriptorOpts{\n\t\tgroupID: DefaultObjectGroup,\n\t}\n\n\tif t == DataPartition {\n\t\tdopts.alignment = 4096\n\t}\n\n\t// Accumulate hash for OCI blobs as they are written.\n\tif t == DataOCIRootIndex || t == DataOCIBlob {\n\t\tmd := newOCIBlobDigest()\n\n\t\tr = io.TeeReader(r, md.hasher)\n\n\t\tdopts.md = md\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(t, &dopts); err != nil {\n\t\t\treturn DescriptorInput{}, fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tdi := DescriptorInput{\n\t\tdt:   t,\n\t\tr:    r,\n\t\topts: dopts,\n\t}\n\n\treturn di, nil\n}\n\n// fillDescriptor fills d according to di. If di does not explicitly specify a time value, use t.\nfunc (di DescriptorInput) fillDescriptor(t time.Time, d *rawDescriptor) error {\n\td.DataType = di.dt\n\td.GroupID = di.opts.groupID | descrGroupMask\n\td.LinkedID = di.opts.linkID\n\n\tif !di.opts.t.IsZero() {\n\t\tt = di.opts.t\n\t}\n\td.CreatedAt = t.Unix()\n\td.ModifiedAt = t.Unix()\n\n\td.UID = 0\n\td.GID = 0\n\n\tif err := d.setName(di.opts.name); err != nil {\n\t\treturn err\n\t}\n\n\treturn d.setExtra(di.opts.md)\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/load.go",
    "content": "// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nvar (\n\terrInvalidMagic        = errors.New(\"invalid SIF magic\")\n\terrIncompatibleVersion = errors.New(\"incompatible SIF version\")\n)\n\n// isValidSif looks at key fields from the global header to assess SIF validity.\nfunc isValidSif(f *FileImage) error {\n\tif f.h.Magic != hdrMagic {\n\t\treturn errInvalidMagic\n\t}\n\n\tif f.h.Version != CurrentVersion.bytes() {\n\t\treturn errIncompatibleVersion\n\t}\n\n\treturn nil\n}\n\n// populateMinIDs populates the minIDs field of f.\nfunc (f *FileImage) populateMinIDs() {\n\tf.minIDs = make(map[uint32]uint32)\n\tf.WithDescriptors(func(d Descriptor) bool {\n\t\tif minID, ok := f.minIDs[d.raw.GroupID]; !ok || d.ID() < minID {\n\t\t\tf.minIDs[d.raw.GroupID] = d.ID()\n\t\t}\n\t\treturn false\n\t})\n}\n\n// loadContainer loads a SIF image from rw.\nfunc loadContainer(rw ReadWriter) (*FileImage, error) {\n\tf := FileImage{rw: rw}\n\n\t// Read global header.\n\terr := binary.Read(\n\t\tio.NewSectionReader(rw, 0, int64(binary.Size(f.h))),\n\t\tbinary.LittleEndian,\n\t\t&f.h,\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading global header: %w\", err)\n\t}\n\n\tif err := isValidSif(&f); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Read descriptors.\n\tf.rds = make([]rawDescriptor, f.h.DescriptorsTotal)\n\terr = binary.Read(\n\t\tio.NewSectionReader(rw, f.h.DescriptorsOffset, f.h.DescriptorsSize),\n\t\tbinary.LittleEndian,\n\t\t&f.rds,\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading descriptors: %w\", err)\n\t}\n\n\tf.populateMinIDs()\n\n\treturn &f, nil\n}\n\n// loadOpts accumulates container loading options.\ntype loadOpts struct {\n\tflag          int\n\tcloseOnUnload bool\n}\n\n// LoadOpt are used to specify container loading options.\ntype LoadOpt func(*loadOpts) error\n\n// OptLoadWithFlag specifies flag (os.O_RDONLY etc.) to be used when opening the container file.\nfunc OptLoadWithFlag(flag int) LoadOpt {\n\treturn func(lo *loadOpts) error {\n\t\tlo.flag = flag\n\t\treturn nil\n\t}\n}\n\n// OptLoadWithCloseOnUnload specifies whether the ReadWriter should be closed by UnloadContainer.\n// By default, the ReadWriter will be closed if it implements the io.Closer interface.\nfunc OptLoadWithCloseOnUnload(b bool) LoadOpt {\n\treturn func(lo *loadOpts) error {\n\t\tlo.closeOnUnload = b\n\t\treturn nil\n\t}\n}\n\n// LoadContainerFromPath loads a new SIF container from path, according to opts.\n//\n// On success, a FileImage is returned. The caller must call UnloadContainer to ensure resources\n// are released.\n//\n// By default, the file is opened for read and write access. To change this behavior, consider\n// using OptLoadWithFlag.\nfunc LoadContainerFromPath(path string, opts ...LoadOpt) (*FileImage, error) {\n\tlo := loadOpts{\n\t\tflag: os.O_RDWR,\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&lo); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tfp, err := os.OpenFile(path, lo.flag, 0)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\tf, err := loadContainer(fp)\n\tif err != nil {\n\t\tfp.Close()\n\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.closeOnUnload = true\n\treturn f, nil\n}\n\n// LoadContainer loads a new SIF container from rw, according to opts.\n//\n// On success, a FileImage is returned. The caller must call UnloadContainer to ensure resources\n// are released. By default, UnloadContainer will close rw if it implements the io.Closer\n// interface. To change this behavior, consider using OptLoadWithCloseOnUnload.\nfunc LoadContainer(rw ReadWriter, opts ...LoadOpt) (*FileImage, error) {\n\tlo := loadOpts{\n\t\tcloseOnUnload: true,\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&lo); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tf, err := loadContainer(rw)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.closeOnUnload = lo.closeOnUnload\n\treturn f, nil\n}\n\n// UnloadContainer unloads f, releasing associated resources.\nfunc (f *FileImage) UnloadContainer() error {\n\tif c, ok := f.rw.(io.Closer); ok && f.closeOnUnload {\n\t\tif err := c.Close(); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/select.go",
    "content": "// Copyright (c) 2021-2024, Sylabs Inc. All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tv1 \"github.com/google/go-containerregistry/pkg/v1\"\n)\n\n// ErrNoObjects is the error returned when an image contains no data objects.\nvar ErrNoObjects = errors.New(\"no objects in image\")\n\n// ErrObjectNotFound is the error returned when a data object is not found.\nvar ErrObjectNotFound = errors.New(\"object not found\")\n\n// ErrMultipleObjectsFound is the error returned when multiple data objects are found.\nvar ErrMultipleObjectsFound = errors.New(\"multiple objects found\")\n\n// ErrInvalidObjectID is the error returned when an invalid object ID is supplied.\nvar ErrInvalidObjectID = errors.New(\"invalid object ID\")\n\n// ErrInvalidGroupID is the error returned when an invalid group ID is supplied.\nvar ErrInvalidGroupID = errors.New(\"invalid group ID\")\n\n// DescriptorSelectorFunc returns true if d matches, and false otherwise.\ntype DescriptorSelectorFunc func(d Descriptor) (bool, error)\n\n// WithDataType selects descriptors that have data type dt.\nfunc WithDataType(dt DataType) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\treturn d.DataType() == dt, nil\n\t}\n}\n\n// WithID selects descriptors with a matching ID.\nfunc WithID(id uint32) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tif id == 0 {\n\t\t\treturn false, ErrInvalidObjectID\n\t\t}\n\t\treturn d.ID() == id, nil\n\t}\n}\n\n// WithNoGroup selects descriptors that are not contained within an object group.\nfunc WithNoGroup() DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\treturn d.GroupID() == 0, nil\n\t}\n}\n\n// WithGroupID returns a selector func that selects descriptors with a matching groupID.\nfunc WithGroupID(groupID uint32) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tif groupID == 0 {\n\t\t\treturn false, ErrInvalidGroupID\n\t\t}\n\t\treturn d.GroupID() == groupID, nil\n\t}\n}\n\n// WithLinkedID selects descriptors that are linked to the data object with specified ID.\nfunc WithLinkedID(id uint32) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tif id == 0 {\n\t\t\treturn false, ErrInvalidObjectID\n\t\t}\n\t\tlinkedID, isGroup := d.LinkedID()\n\t\treturn !isGroup && linkedID == id, nil\n\t}\n}\n\n// WithLinkedGroupID selects descriptors that are linked to the data object group with specified\n// ID.\nfunc WithLinkedGroupID(groupID uint32) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tif groupID == 0 {\n\t\t\treturn false, ErrInvalidGroupID\n\t\t}\n\t\tlinkedID, isGroup := d.LinkedID()\n\t\treturn isGroup && linkedID == groupID, nil\n\t}\n}\n\n// WithPartitionType selects descriptors containing a partition of type pt.\nfunc WithPartitionType(pt PartType) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\treturn d.raw.isPartitionOfType(pt), nil\n\t}\n}\n\n// WithOCIBlobDigest selects descriptors that contain a OCI blob with the specified digest.\nfunc WithOCIBlobDigest(digest v1.Hash) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tif h, err := d.OCIBlobDigest(); err == nil {\n\t\t\treturn h.String() == digest.String(), nil\n\t\t}\n\t\treturn false, nil\n\t}\n}\n\n// descriptorFromRaw populates a Descriptor from rd.\nfunc (f *FileImage) descriptorFromRaw(rd *rawDescriptor) Descriptor {\n\treturn Descriptor{\n\t\traw:        *rd,\n\t\tr:          f.rw,\n\t\trelativeID: rd.ID - f.minIDs[rd.GroupID],\n\t}\n}\n\n// GetDescriptors returns a slice of in-use descriptors for which all selector funcs return true.\n// If the image contains no data objects, an error wrapping ErrNoObjects is returned.\nfunc (f *FileImage) GetDescriptors(fns ...DescriptorSelectorFunc) ([]Descriptor, error) {\n\tif f.DescriptorsFree() == f.DescriptorsTotal() {\n\t\treturn nil, fmt.Errorf(\"%w\", ErrNoObjects)\n\t}\n\n\tvar ds []Descriptor\n\n\terr := f.withDescriptors(multiSelectorFunc(fns...), func(d *rawDescriptor) error {\n\t\tds = append(ds, f.descriptorFromRaw(d))\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn ds, nil\n}\n\n// getDescriptor returns a pointer to the in-use descriptor selected by fns. If no descriptor is\n// selected by fns, ErrObjectNotFound is returned. If multiple descriptors are selected by fns,\n// ErrMultipleObjectsFound is returned.\nfunc (f *FileImage) getDescriptor(fns ...DescriptorSelectorFunc) (*rawDescriptor, error) {\n\tvar d *rawDescriptor\n\n\terr := f.withDescriptors(multiSelectorFunc(fns...), func(found *rawDescriptor) error {\n\t\tif d != nil {\n\t\t\treturn ErrMultipleObjectsFound\n\t\t}\n\t\td = found\n\t\treturn nil\n\t})\n\n\tif err == nil && d == nil {\n\t\terr = ErrObjectNotFound\n\t}\n\n\treturn d, err\n}\n\n// GetDescriptor returns the in-use descriptor selected by fns. If the image contains no data\n// objects, an error wrapping ErrNoObjects is returned. If no descriptor is selected by fns, an\n// error wrapping ErrObjectNotFound is returned. If multiple descriptors are selected by fns, an\n// error wrapping ErrMultipleObjectsFound is returned.\nfunc (f *FileImage) GetDescriptor(fns ...DescriptorSelectorFunc) (Descriptor, error) {\n\tif f.DescriptorsFree() == f.DescriptorsTotal() {\n\t\treturn Descriptor{}, fmt.Errorf(\"%w\", ErrNoObjects)\n\t}\n\n\td, err := f.getDescriptor(fns...)\n\tif err != nil {\n\t\treturn Descriptor{}, fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn f.descriptorFromRaw(d), nil\n}\n\n// multiSelectorFunc returns a DescriptorSelectorFunc that selects a descriptor iff all of fns\n// select the descriptor.\nfunc multiSelectorFunc(fns ...DescriptorSelectorFunc) DescriptorSelectorFunc {\n\treturn func(d Descriptor) (bool, error) {\n\t\tfor _, fn := range fns {\n\t\t\tif ok, err := fn(d); !ok || err != nil {\n\t\t\t\treturn ok, err\n\t\t\t}\n\t\t}\n\t\treturn true, nil\n\t}\n}\n\nvar errNilSelectFunc = errors.New(\"descriptor selector func must not be nil\")\n\n// withDescriptors calls onMatchFn with each in-use descriptor in f for which selectFn returns\n// true. If selectFn or onMatchFn return a non-nil error, the iteration halts, and the error is\n// returned to the caller.\nfunc (f *FileImage) withDescriptors(selectFn DescriptorSelectorFunc, onMatchFn func(*rawDescriptor) error) error {\n\tif selectFn == nil {\n\t\treturn errNilSelectFunc\n\t}\n\n\tfor i, d := range f.rds {\n\t\tif !d.Used {\n\t\t\tcontinue\n\t\t}\n\n\t\tif ok, err := selectFn(f.descriptorFromRaw(&f.rds[i])); err != nil {\n\t\t\treturn err\n\t\t} else if !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := onMatchFn(&f.rds[i]); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nvar errAbort = errors.New(\"abort\")\n\n// abortOnMatch is a semantic convenience function that always returns a non-nil error, which can\n// be used as a no-op matchFn.\nfunc abortOnMatch(*rawDescriptor) error { return errAbort }\n\n// WithDescriptors calls fn with each in-use descriptor in f, until fn returns true.\nfunc (f *FileImage) WithDescriptors(fn func(d Descriptor) bool) {\n\tselectFn := func(d Descriptor) (bool, error) {\n\t\treturn fn(d), nil\n\t}\n\t_ = f.withDescriptors(selectFn, abortOnMatch)\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/set.go",
    "content": "// Copyright (c) 2018-2024, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\npackage sif\n\nimport (\n\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\tv1 \"github.com/google/go-containerregistry/pkg/v1\"\n)\n\n// setOpts accumulates object set options.\ntype setOpts struct {\n\tt time.Time\n}\n\n// SetOpt are used to specify object set options.\ntype SetOpt func(*setOpts) error\n\n// OptSetDeterministic sets header/descriptor fields to values that support deterministic\n// modification of images.\nfunc OptSetDeterministic() SetOpt {\n\treturn func(so *setOpts) error {\n\t\tso.t = time.Time{}\n\t\treturn nil\n\t}\n}\n\n// OptSetWithTime specifies t as the image/object modification time.\nfunc OptSetWithTime(t time.Time) SetOpt {\n\treturn func(so *setOpts) error {\n\t\tso.t = t\n\t\treturn nil\n\t}\n}\n\nvar (\n\terrNotPartition = errors.New(\"data object not a partition\")\n\terrNotSystem    = errors.New(\"data object not a system partition\")\n)\n\n// SetPrimPart sets the specified system partition to be the primary one.\n//\n// By default, the image/object modification times are set to the current time for\n// non-deterministic images, and unset otherwise. To override this, consider using\n// OptSetDeterministic or OptSetWithTime.\nfunc (f *FileImage) SetPrimPart(id uint32, opts ...SetOpt) error {\n\tso := setOpts{}\n\n\tif !f.isDeterministic() {\n\t\tso.t = time.Now()\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&so); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tdescr, err := f.getDescriptor(WithID(id))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif descr.DataType != DataPartition {\n\t\treturn fmt.Errorf(\"%w\", errNotPartition)\n\t}\n\n\tvar p partition\n\tif err := descr.getExtra(binaryUnmarshaler{&p}); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\t// if already primary system partition, nothing to do\n\tif p.Parttype == PartPrimSys {\n\t\treturn nil\n\t}\n\n\tif p.Parttype != PartSystem {\n\t\treturn fmt.Errorf(\"%w\", errNotSystem)\n\t}\n\n\t// If there is currently a primary system partition, update it.\n\tif d, err := f.getDescriptor(WithPartitionType(PartPrimSys)); err == nil {\n\t\tvar p partition\n\t\tif err := d.getExtra(binaryUnmarshaler{&p}); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\n\t\tp.Parttype = PartSystem\n\n\t\tif err := d.setExtra(p); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\n\t\td.ModifiedAt = so.t.Unix()\n\t} else if !errors.Is(err, ErrObjectNotFound) {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\t// Update the descriptor of the new primary system partition.\n\tp.Parttype = PartPrimSys\n\n\tif err := descr.setExtra(p); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tdescr.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.h.Arch = p.Arch\n\tf.h.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn nil\n}\n\n// SetMetadata sets the metadata of the data object with id to md, according to opts.\n//\n// By default, the image/object modification times are set to the current time for\n// non-deterministic images, and unset otherwise. To override this, consider using\n// OptSetDeterministic or OptSetWithTime.\nfunc (f *FileImage) SetMetadata(id uint32, md encoding.BinaryMarshaler, opts ...SetOpt) error {\n\tso := setOpts{}\n\n\tif !f.isDeterministic() {\n\t\tso.t = time.Now()\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&so); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\trd, err := f.getDescriptor(WithID(id))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif err := rd.setExtra(md); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\trd.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.h.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn nil\n}\n\n// SetOCIBlobDigest updates the digest of the OCI blob object with id to h, according to opts.\n//\n// By default, the image/object modification times are set to the current time for\n// non-deterministic images, and unset otherwise. To override this, consider using\n// OptSetDeterministic or OptSetWithTime.\nfunc (f *FileImage) SetOCIBlobDigest(id uint32, h v1.Hash, opts ...SetOpt) error {\n\trd, err := f.getDescriptor(WithID(id))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tif got := rd.DataType; got != DataOCIRootIndex && got != DataOCIBlob {\n\t\treturn &unexpectedDataTypeError{got, []DataType{DataOCIRootIndex, DataOCIBlob}}\n\t}\n\n\tso := setOpts{}\n\n\tif !f.isDeterministic() {\n\t\tso.t = time.Now()\n\t}\n\n\tfor _, opt := range opts {\n\t\tif err := opt(&so); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\", err)\n\t\t}\n\t}\n\n\tmd := &ociBlob{\n\t\tdigest: h,\n\t}\n\tif err := rd.setExtra(md); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\trd.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeDescriptors(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\tf.h.ModifiedAt = so.t.Unix()\n\n\tif err := f.writeHeader(); err != nil {\n\t\treturn fmt.Errorf(\"%w\", err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go",
    "content": "// Copyright (c) 2018-2023, Sylabs Inc. All rights reserved.\n// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.\n// This software is licensed under a 3-clause BSD license. Please consult the\n// LICENSE file distributed with the sources of this project regarding your\n// rights to use or distribute this software.\n\n// Package sif implements data structures and routines to create\n// and access SIF files.\n//\n// Layout of a SIF file (example):\n//\n//\t.================================================.\n//\t| GLOBAL HEADER: Sifheader                       |\n//\t| - launch: \"#!/usr/bin/env...\"                  |\n//\t| - magic: \"SIF_MAGIC\"                           |\n//\t| - version: \"1\"                                 |\n//\t| - arch: \"4\"                                    |\n//\t| - uuid: b2659d4e-bd50-4ea5-bd17-eec5e54f918e   |\n//\t| - ctime: 1504657553                            |\n//\t| - mtime: 1504657653                            |\n//\t| - ndescr: 3                                    |\n//\t| - descroff: 120                                | --.\n//\t| - descrlen: 432                                |   |\n//\t| - dataoff: 4096                                |   |\n//\t| - datalen: 619362                              |   |\n//\t|------------------------------------------------| <-'\n//\t| DESCR[0]: Sifdeffile                           |\n//\t| - Sifcommon                                    |\n//\t|   - datatype: DATA_DEFFILE                     |\n//\t|   - id: 1                                      |\n//\t|   - groupid: 1                                 |\n//\t|   - link: NONE                                 |\n//\t|   - fileoff: 4096                              | --.\n//\t|   - filelen: 222                               |   |\n//\t|------------------------------------------------| <-----.\n//\t| DESCR[1]: Sifpartition                         |   |   |\n//\t| - Sifcommon                                    |   |   |\n//\t|   - datatype: DATA_PARTITION                   |   |   |\n//\t|   - id: 2                                      |   |   |\n//\t|   - groupid: 1                                 |   |   |\n//\t|   - link: NONE                                 |   |   |\n//\t|   - fileoff: 4318                              | ----. |\n//\t|   - filelen: 618496                            |   | | |\n//\t| - fstype: Squashfs                             |   | | |\n//\t| - parttype: System                             |   | | |\n//\t| - content: Linux                               |   | | |\n//\t|------------------------------------------------|   | | |\n//\t| DESCR[2]: Sifsignature                         |   | | |\n//\t| - Sifcommon                                    |   | | |\n//\t|   - datatype: DATA_SIGNATURE                   |   | | |\n//\t|   - id: 3                                      |   | | |\n//\t|   - groupid: NONE                              |   | | |\n//\t|   - link: 2                                    | ------'\n//\t|   - fileoff: 622814                            | ------.\n//\t|   - filelen: 644                               |   | | |\n//\t| - hashtype: SHA384                             |   | | |\n//\t| - entity: @                                    |   | | |\n//\t|------------------------------------------------| <-' | |\n//\t| Definition file data                           |     | |\n//\t| .                                              |     | |\n//\t| .                                              |     | |\n//\t| .                                              |     | |\n//\t|------------------------------------------------| <---' |\n//\t| File system partition image                    |       |\n//\t| .                                              |       |\n//\t| .                                              |       |\n//\t| .                                              |       |\n//\t|------------------------------------------------| <-----'\n//\t| Signed verification data                       |\n//\t| .                                              |\n//\t| .                                              |\n//\t| .                                              |\n//\t`================================================'\npackage sif\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n)\n\n// SIF header constants and quantities.\nconst (\n\thdrLaunchLen  = 32 // len(\"#!/usr/bin/env... \")\n\thdrMagicLen   = 10 // len(\"SIF_MAGIC\")\n\thdrVersionLen = 3  // len(\"99\")\n)\n\nvar hdrMagic = [...]byte{'S', 'I', 'F', '_', 'M', 'A', 'G', 'I', 'C', '\\x00'}\n\n// SpecVersion specifies a SIF specification version.\ntype SpecVersion uint8\n\nfunc (v SpecVersion) String() string { return fmt.Sprintf(\"%02d\", v) }\n\n// bytes returns the value of b, formatted for direct inclusion in a SIF header.\nfunc (v SpecVersion) bytes() [hdrVersionLen]byte {\n\tvar b [3]byte\n\tcopy(b[:], fmt.Sprintf(\"%02d\", v))\n\treturn b\n}\n\n// SIF specification versions.\nconst (\n\tversion01 SpecVersion = iota + 1\n)\n\n// CurrentVersion specifies the current SIF specification version.\nconst CurrentVersion = version01\n\nconst (\n\tdescrGroupMask  = 0xf0000000 // groups start at that offset\n\tdescrEntityLen  = 256        // len(\"Joe Bloe <jbloe@gmail.com>...\")\n\tdescrNameLen    = 128        // descriptor name (string identifier)\n\tdescrMaxPrivLen = 384        // size reserved for descriptor specific data\n)\n\n// DataType represents the different SIF data object types stored in the image.\ntype DataType int32\n\n// List of supported SIF data types.\nconst (\n\tDataDeffile       DataType = iota + 0x4001 // definition file data object\n\tDataEnvVar                                 // environment variables data object\n\tDataLabels                                 // JSON labels data object\n\tDataPartition                              // file system data object\n\tDataSignature                              // signing/verification data object\n\tDataGenericJSON                            // generic JSON meta-data\n\tDataGeneric                                // generic / raw data\n\tDataCryptoMessage                          // cryptographic message data object\n\tDataSBOM                                   // software bill of materials\n\tDataOCIRootIndex                           // root OCI index\n\tDataOCIBlob                                // oci blob data object\n)\n\n// String returns a human-readable representation of t.\nfunc (t DataType) String() string {\n\tswitch t {\n\tcase DataDeffile:\n\t\treturn \"Def.FILE\"\n\tcase DataEnvVar:\n\t\treturn \"Env.Vars\"\n\tcase DataLabels:\n\t\treturn \"JSON.Labels\"\n\tcase DataPartition:\n\t\treturn \"FS\"\n\tcase DataSignature:\n\t\treturn \"Signature\"\n\tcase DataGenericJSON:\n\t\treturn \"JSON.Generic\"\n\tcase DataGeneric:\n\t\treturn \"Generic/Raw\"\n\tcase DataCryptoMessage:\n\t\treturn \"Cryptographic Message\"\n\tcase DataSBOM:\n\t\treturn \"SBOM\"\n\tcase DataOCIRootIndex:\n\t\treturn \"OCI.RootIndex\"\n\tcase DataOCIBlob:\n\t\treturn \"OCI.Blob\"\n\t}\n\treturn \"Unknown\"\n}\n\n// FSType represents the different SIF file system types found in partition data objects.\ntype FSType int32\n\n// List of supported file systems.\nconst (\n\tFsSquash            FSType = iota + 1 // Squashfs file system, RDONLY\n\tFsExt3                                // EXT3 file system, RDWR (deprecated)\n\tFsImmuObj                             // immutable data object archive\n\tFsRaw                                 // raw data\n\tFsEncryptedSquashfs                   // Encrypted Squashfs file system, RDONLY\n)\n\n// String returns a human-readable representation of t.\nfunc (t FSType) String() string {\n\tswitch t {\n\tcase FsSquash:\n\t\treturn \"Squashfs\"\n\tcase FsExt3:\n\t\treturn \"Ext3\"\n\tcase FsImmuObj:\n\t\treturn \"Archive\"\n\tcase FsRaw:\n\t\treturn \"Raw\"\n\tcase FsEncryptedSquashfs:\n\t\treturn \"Encrypted squashfs\"\n\t}\n\treturn \"Unknown\"\n}\n\n// PartType represents the different SIF container partition types (system and data).\ntype PartType int32\n\n// List of supported partition types.\nconst (\n\tPartSystem  PartType = iota + 1 // partition hosts an operating system\n\tPartPrimSys                     // partition hosts the primary operating system\n\tPartData                        // partition hosts data only\n\tPartOverlay                     // partition hosts an overlay\n)\n\n// String returns a human-readable representation of t.\nfunc (t PartType) String() string {\n\tswitch t {\n\tcase PartSystem:\n\t\treturn \"System\"\n\tcase PartPrimSys:\n\t\treturn \"*System\"\n\tcase PartData:\n\t\treturn \"Data\"\n\tcase PartOverlay:\n\t\treturn \"Overlay\"\n\t}\n\treturn \"Unknown\"\n}\n\n// hashType represents the different SIF hashing function types used to fingerprint data objects.\ntype hashType int32\n\n// List of supported hash functions.\nconst (\n\thashSHA256 hashType = iota + 1\n\thashSHA384\n\thashSHA512\n\thashBLAKE2S\n\thashBLAKE2B\n)\n\n// FormatType represents the different formats used to store cryptographic message objects.\ntype FormatType int32\n\n// List of supported cryptographic message formats.\nconst (\n\tFormatOpenPGP FormatType = iota + 1\n\tFormatPEM\n)\n\n// String returns a human-readable representation of t.\nfunc (t FormatType) String() string {\n\tswitch t {\n\tcase FormatOpenPGP:\n\t\treturn \"OpenPGP\"\n\tcase FormatPEM:\n\t\treturn \"PEM\"\n\t}\n\treturn \"Unknown\"\n}\n\n// MessageType represents the different messages stored within cryptographic message objects.\ntype MessageType int32\n\n// List of supported cryptographic message formats.\nconst (\n\t// openPGP formatted messages.\n\tMessageClearSignature MessageType = 0x100\n\n\t// PEM formatted messages.\n\tMessageRSAOAEP MessageType = 0x200\n)\n\n// String returns a human-readable representation of t.\nfunc (t MessageType) String() string {\n\tswitch t {\n\tcase MessageClearSignature:\n\t\treturn \"Clear Signature\"\n\tcase MessageRSAOAEP:\n\t\treturn \"RSA-OAEP\"\n\t}\n\treturn \"Unknown\"\n}\n\n// SBOMFormat represents the format used to store an SBOM object.\ntype SBOMFormat int32\n\n// List of supported SBOM formats.\nconst (\n\tSBOMFormatCycloneDXJSON SBOMFormat = iota + 1 // CycloneDX (JSON)\n\tSBOMFormatCycloneDXXML                        // CycloneDX (XML)\n\tSBOMFormatGitHubJSON                          // GitHub dependency snapshot (JSON)\n\tSBOMFormatSPDXJSON                            // SPDX (JSON)\n\tSBOMFormatSPDXRDF                             // SPDX (RDF/xml)\n\tSBOMFormatSPDXTagValue                        // SPDX (tag/value)\n\tSBOMFormatSPDXYAML                            // SPDX (YAML)\n\tSBOMFormatSyftJSON                            // Syft (JSON)\n)\n\n// String returns a human-readable representation of f.\nfunc (f SBOMFormat) String() string {\n\tswitch f {\n\tcase SBOMFormatCycloneDXJSON:\n\t\treturn \"cyclonedx-json\"\n\tcase SBOMFormatCycloneDXXML:\n\t\treturn \"cyclonedx-xml\"\n\tcase SBOMFormatGitHubJSON:\n\t\treturn \"github-json\"\n\tcase SBOMFormatSPDXJSON:\n\t\treturn \"spdx-json\"\n\tcase SBOMFormatSPDXRDF:\n\t\treturn \"spdx-rdf\"\n\tcase SBOMFormatSPDXTagValue:\n\t\treturn \"spdx-tag-value\"\n\tcase SBOMFormatSPDXYAML:\n\t\treturn \"spdx-yaml\"\n\tcase SBOMFormatSyftJSON:\n\t\treturn \"syft-json\"\n\t}\n\treturn \"unknown\"\n}\n\n// header describes a loaded SIF file.\ntype header struct {\n\tLaunchScript [hdrLaunchLen]byte\n\n\tMagic   [hdrMagicLen]byte\n\tVersion [hdrVersionLen]byte\n\tArch    archType\n\tID      uuid.UUID\n\n\tCreatedAt  int64\n\tModifiedAt int64\n\n\tDescriptorsFree   int64\n\tDescriptorsTotal  int64\n\tDescriptorsOffset int64\n\tDescriptorsSize   int64\n\tDataOffset        int64\n\tDataSize          int64\n}\n\n// GetIntegrityReader returns an io.Reader that reads the integrity-protected fields from h.\nfunc (h header) GetIntegrityReader() io.Reader {\n\treturn io.MultiReader(\n\t\tbytes.NewReader(h.LaunchScript[:]),\n\t\tbytes.NewReader(h.Magic[:]),\n\t\tbytes.NewReader(h.Version[:]),\n\t\tbytes.NewReader(h.ID[:]),\n\t)\n}\n\n// ReadWriter describes the interface required to read and write SIF images.\ntype ReadWriter interface {\n\tio.ReaderAt\n\tio.WriteSeeker\n\tTruncate(int64) error\n}\n\n// FileImage describes the representation of a SIF file in memory.\ntype FileImage struct {\n\trw ReadWriter // Backing storage for image.\n\n\th   header          // Raw global header from image.\n\trds []rawDescriptor // Raw descriptors from image.\n\n\tcloseOnUnload bool              // Close rw on Unload.\n\tminIDs        map[uint32]uint32 // Minimum object IDs for each group ID.\n}\n\n// LaunchScript returns the image launch script.\nfunc (f *FileImage) LaunchScript() string {\n\treturn string(bytes.TrimRight(f.h.LaunchScript[:], \"\\x00\"))\n}\n\n// Version returns the SIF specification version of the image.\nfunc (f *FileImage) Version() string {\n\treturn string(bytes.TrimRight(f.h.Version[:], \"\\x00\"))\n}\n\n// PrimaryArch returns the primary CPU architecture of the image, or \"unknown\" if the primary CPU\n// architecture cannot be determined.\nfunc (f *FileImage) PrimaryArch() string { return f.h.Arch.GoArch() }\n\n// ID returns the ID of the image.\nfunc (f *FileImage) ID() string { return f.h.ID.String() }\n\n// CreatedAt returns the creation time of the image.\nfunc (f *FileImage) CreatedAt() time.Time { return time.Unix(f.h.CreatedAt, 0) }\n\n// ModifiedAt returns the last modification time of the image.\nfunc (f *FileImage) ModifiedAt() time.Time { return time.Unix(f.h.ModifiedAt, 0) }\n\n// DescriptorsFree returns the number of free descriptors in the image.\nfunc (f *FileImage) DescriptorsFree() int64 { return f.h.DescriptorsFree }\n\n// DescriptorsTotal returns the total number of descriptors in the image.\nfunc (f *FileImage) DescriptorsTotal() int64 { return f.h.DescriptorsTotal }\n\n// DescriptorsOffset returns the offset (in bytes) of the descriptors section in the image.\nfunc (f *FileImage) DescriptorsOffset() int64 { return f.h.DescriptorsOffset }\n\n// DescriptorsSize returns the size (in bytes) of the descriptors section in the image.\nfunc (f *FileImage) DescriptorsSize() int64 { return f.h.DescriptorsSize }\n\n// DataOffset returns the offset (in bytes) of the data section in the image.\nfunc (f *FileImage) DataOffset() int64 { return f.h.DataOffset }\n\n// DataSize returns the size (in bytes) of the data section in the image.\nfunc (f *FileImage) DataSize() int64 { return f.h.DataSize }\n\n// GetHeaderIntegrityReader returns an io.Reader that reads the integrity-protected fields from the\n// header of the image.\nfunc (f *FileImage) GetHeaderIntegrityReader() io.Reader {\n\treturn f.h.GetIntegrityReader()\n}\n\n// isDeterministic returns true if the UUID and timestamps in the header of f are set to\n// deterministic values.\nfunc (f *FileImage) isDeterministic() bool {\n\treturn f.h.ID == uuid.Nil && f.CreatedAt().IsZero() && f.ModifiedAt().IsZero()\n}\n"
  },
  {
    "path": "vendor/github.com/tchap/go-patricia/v2/AUTHORS",
    "content": "This is the complete list of go-patricia copyright holders:\n\nOndřej Kupka <ondra.cap@gmail.com>\n"
  },
  {
    "path": "vendor/github.com/tchap/go-patricia/v2/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014 The AUTHORS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject 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, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/tchap/go-patricia/v2/patricia/children.go",
    "content": "// Copyright (c) 2014 The go-patricia AUTHORS\n//\n// Use of this source code is governed by The MIT License\n// that can be found in the LICENSE file.\n\npackage patricia\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"sort\"\n)\n\ntype childList interface {\n\tlength() int\n\thead() *Trie\n\tadd(child *Trie) childList\n\tremove(b byte)\n\treplace(b byte, child *Trie)\n\tnext(b byte) *Trie\n\twalk(prefix *Prefix, visitor VisitorFunc) error\n\tprint(w io.Writer, indent int)\n\tclone() childList\n\ttotal() int\n}\n\ntype tries []*Trie\n\nfunc (t tries) Len() int {\n\treturn len(t)\n}\n\nfunc (t tries) Less(i, j int) bool {\n\tstrings := sort.StringSlice{string(t[i].prefix), string(t[j].prefix)}\n\treturn strings.Less(0, 1)\n}\n\nfunc (t tries) Swap(i, j int) {\n\tt[i], t[j] = t[j], t[i]\n}\n\ntype sparseChildList struct {\n\tchildren tries\n}\n\nfunc newSparseChildList(maxChildrenPerSparseNode int) childList {\n\treturn &sparseChildList{\n\t\tchildren: make(tries, 0, maxChildrenPerSparseNode),\n\t}\n}\n\nfunc (list *sparseChildList) length() int {\n\treturn len(list.children)\n}\n\nfunc (list *sparseChildList) head() *Trie {\n\treturn list.children[0]\n}\n\nfunc (list *sparseChildList) add(child *Trie) childList {\n\t// Search for an empty spot and insert the child if possible.\n\tif len(list.children) != cap(list.children) {\n\t\tlist.children = append(list.children, child)\n\t\treturn list\n\t}\n\n\t// Otherwise we have to transform to the dense list type.\n\treturn newDenseChildList(list, child)\n}\n\nfunc (list *sparseChildList) remove(b byte) {\n\tfor i, node := range list.children {\n\t\tif node.prefix[0] == b {\n\t\t\tlist.children[i] = list.children[len(list.children)-1]\n\t\t\tlist.children[len(list.children)-1] = nil\n\t\t\tlist.children = list.children[:len(list.children)-1]\n\t\t\treturn\n\t\t}\n\t}\n\n\t// This is not supposed to be reached.\n\tpanic(\"removing non-existent child\")\n}\n\nfunc (list *sparseChildList) replace(b byte, child *Trie) {\n\t// Make a consistency check.\n\tif p0 := child.prefix[0]; p0 != b {\n\t\tpanic(fmt.Errorf(\"child prefix mismatch: %v != %v\", p0, b))\n\t}\n\n\t// Seek the child and replace it.\n\tfor i, node := range list.children {\n\t\tif node.prefix[0] == b {\n\t\t\tlist.children[i] = child\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (list *sparseChildList) next(b byte) *Trie {\n\tfor _, child := range list.children {\n\t\tif child.prefix[0] == b {\n\t\t\treturn child\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (list *sparseChildList) walk(prefix *Prefix, visitor VisitorFunc) error {\n\n\tsort.Sort(list.children)\n\n\tfor _, child := range list.children {\n\t\t*prefix = append(*prefix, child.prefix...)\n\t\tif child.item != nil {\n\t\t\terr := visitor(*prefix, child.item)\n\t\t\tif err != nil {\n\t\t\t\tif err == SkipSubtree {\n\t\t\t\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\terr := child.children.walk(prefix, visitor)\n\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (list *sparseChildList) total() int {\n\ttot := 0\n\tfor _, child := range list.children {\n\t\tif child != nil {\n\t\t\ttot = tot + child.total()\n\t\t}\n\t}\n\treturn tot\n}\n\nfunc (list *sparseChildList) clone() childList {\n\tclones := make(tries, len(list.children), cap(list.children))\n\tfor i, child := range list.children {\n\t\tclones[i] = child.Clone()\n\t}\n\n\treturn &sparseChildList{\n\t\tchildren: clones,\n\t}\n}\n\nfunc (list *sparseChildList) print(w io.Writer, indent int) {\n\tfor _, child := range list.children {\n\t\tif child != nil {\n\t\t\tchild.print(w, indent)\n\t\t}\n\t}\n}\n\ntype denseChildList struct {\n\tmin         int\n\tmax         int\n\tnumChildren int\n\theadIndex   int\n\tchildren    []*Trie\n}\n\nfunc newDenseChildList(list *sparseChildList, child *Trie) childList {\n\tvar (\n\t\tmin int = 255\n\t\tmax int = 0\n\t)\n\tfor _, child := range list.children {\n\t\tb := int(child.prefix[0])\n\t\tif b < min {\n\t\t\tmin = b\n\t\t}\n\t\tif b > max {\n\t\t\tmax = b\n\t\t}\n\t}\n\n\tb := int(child.prefix[0])\n\tif b < min {\n\t\tmin = b\n\t}\n\tif b > max {\n\t\tmax = b\n\t}\n\n\tchildren := make([]*Trie, max-min+1)\n\tfor _, child := range list.children {\n\t\tchildren[int(child.prefix[0])-min] = child\n\t}\n\tchildren[int(child.prefix[0])-min] = child\n\n\treturn &denseChildList{\n\t\tmin:         min,\n\t\tmax:         max,\n\t\tnumChildren: list.length() + 1,\n\t\theadIndex:   0,\n\t\tchildren:    children,\n\t}\n}\n\nfunc (list *denseChildList) length() int {\n\treturn list.numChildren\n}\n\nfunc (list *denseChildList) head() *Trie {\n\treturn list.children[list.headIndex]\n}\n\nfunc (list *denseChildList) add(child *Trie) childList {\n\tb := int(child.prefix[0])\n\tvar i int\n\n\tswitch {\n\tcase list.min <= b && b <= list.max:\n\t\tif list.children[b-list.min] != nil {\n\t\t\tpanic(\"dense child list collision detected\")\n\t\t}\n\t\ti = b - list.min\n\t\tlist.children[i] = child\n\n\tcase b < list.min:\n\t\tchildren := make([]*Trie, list.max-b+1)\n\t\ti = 0\n\t\tchildren[i] = child\n\t\tcopy(children[list.min-b:], list.children)\n\t\tlist.children = children\n\t\tlist.min = b\n\n\tdefault: // b > list.max\n\t\tchildren := make([]*Trie, b-list.min+1)\n\t\ti = b - list.min\n\t\tchildren[i] = child\n\t\tcopy(children, list.children)\n\t\tlist.children = children\n\t\tlist.max = b\n\t}\n\n\tlist.numChildren++\n\tif i < list.headIndex {\n\t\tlist.headIndex = i\n\t}\n\treturn list\n}\n\nfunc (list *denseChildList) remove(b byte) {\n\ti := int(b) - list.min\n\tif list.children[i] == nil {\n\t\t// This is not supposed to be reached.\n\t\tpanic(\"removing non-existent child\")\n\t}\n\tlist.numChildren--\n\tlist.children[i] = nil\n\n\t// Update head index.\n\tif i == list.headIndex {\n\t\tfor ; i < len(list.children); i++ {\n\t\t\tif list.children[i] != nil {\n\t\t\t\tlist.headIndex = i\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (list *denseChildList) replace(b byte, child *Trie) {\n\t// Make a consistency check.\n\tif p0 := child.prefix[0]; p0 != b {\n\t\tpanic(fmt.Errorf(\"child prefix mismatch: %v != %v\", p0, b))\n\t}\n\n\t// Replace the child.\n\tlist.children[int(b)-list.min] = child\n}\n\nfunc (list *denseChildList) next(b byte) *Trie {\n\ti := int(b)\n\tif i < list.min || list.max < i {\n\t\treturn nil\n\t}\n\treturn list.children[i-list.min]\n}\n\nfunc (list *denseChildList) walk(prefix *Prefix, visitor VisitorFunc) error {\n\tfor _, child := range list.children {\n\t\tif child == nil {\n\t\t\tcontinue\n\t\t}\n\t\t*prefix = append(*prefix, child.prefix...)\n\t\tif child.item != nil {\n\t\t\tif err := visitor(*prefix, child.item); err != nil {\n\t\t\t\tif err == SkipSubtree {\n\t\t\t\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\terr := child.children.walk(prefix, visitor)\n\t\t*prefix = (*prefix)[:len(*prefix)-len(child.prefix)]\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (list *denseChildList) print(w io.Writer, indent int) {\n\tfor _, child := range list.children {\n\t\tif child != nil {\n\t\t\tchild.print(w, indent)\n\t\t}\n\t}\n}\n\nfunc (list *denseChildList) clone() childList {\n\tclones := make(tries, cap(list.children))\n\n\tif list.numChildren != 0 {\n\t\tclonedCount := 0\n\t\tfor i := list.headIndex; i < len(list.children); i++ {\n\t\t\tchild := list.children[i]\n\t\t\tif child != nil {\n\t\t\t\tclones[i] = child.Clone()\n\t\t\t\tclonedCount++\n\t\t\t\tif clonedCount == list.numChildren {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn &denseChildList{\n\t\tmin:         list.min,\n\t\tmax:         list.max,\n\t\tnumChildren: list.numChildren,\n\t\theadIndex:   list.headIndex,\n\t\tchildren:    clones,\n\t}\n}\n\nfunc (list *denseChildList) total() int {\n\ttot := 0\n\tfor _, child := range list.children {\n\t\tif child != nil {\n\t\t\ttot = tot + child.total()\n\t\t}\n\t}\n\treturn tot\n}\n"
  },
  {
    "path": "vendor/github.com/tchap/go-patricia/v2/patricia/patricia.go",
    "content": "// Copyright (c) 2014 The go-patricia AUTHORS\n//\n// Use of this source code is governed by The MIT License\n// that can be found in the LICENSE file.\n\npackage patricia\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n)\n\n//------------------------------------------------------------------------------\n// Trie\n//------------------------------------------------------------------------------\n\nconst (\n\tDefaultMaxPrefixPerNode         = 10\n\tDefaultMaxChildrenPerSparseNode = 8\n)\n\ntype (\n\tPrefix      []byte\n\tItem        interface{}\n\tVisitorFunc func(prefix Prefix, item Item) error\n)\n\n// Trie is a generic patricia trie that allows fast retrieval of items by prefix.\n// and other funky stuff.\n//\n// Trie is not thread-safe.\ntype Trie struct {\n\tprefix Prefix\n\titem   Item\n\n\tmaxPrefixPerNode         int\n\tmaxChildrenPerSparseNode int\n\n\tchildren childList\n}\n\n// Public API ------------------------------------------------------------------\n\ntype Option func(*Trie)\n\n// Trie constructor.\nfunc NewTrie(options ...Option) *Trie {\n\ttrie := &Trie{}\n\n\tfor _, opt := range options {\n\t\topt(trie)\n\t}\n\n\tif trie.maxPrefixPerNode <= 0 {\n\t\ttrie.maxPrefixPerNode = DefaultMaxPrefixPerNode\n\t}\n\tif trie.maxChildrenPerSparseNode <= 0 {\n\t\ttrie.maxChildrenPerSparseNode = DefaultMaxChildrenPerSparseNode\n\t}\n\n\ttrie.children = newSparseChildList(trie.maxChildrenPerSparseNode)\n\treturn trie\n}\n\nfunc MaxPrefixPerNode(value int) Option {\n\treturn func(trie *Trie) {\n\t\ttrie.maxPrefixPerNode = value\n\t}\n}\n\nfunc MaxChildrenPerSparseNode(value int) Option {\n\treturn func(trie *Trie) {\n\t\ttrie.maxChildrenPerSparseNode = value\n\t}\n}\n\n// Clone makes a copy of an existing trie.\n// Items stored in both tries become shared, obviously.\nfunc (trie *Trie) Clone() *Trie {\n\treturn &Trie{\n\t\tprefix:                   append(Prefix(nil), trie.prefix...),\n\t\titem:                     trie.item,\n\t\tmaxPrefixPerNode:         trie.maxPrefixPerNode,\n\t\tmaxChildrenPerSparseNode: trie.maxChildrenPerSparseNode,\n\t\tchildren:                 trie.children.clone(),\n\t}\n}\n\n// Item returns the item stored in the root of this trie.\nfunc (trie *Trie) Item() Item {\n\treturn trie.item\n}\n\n// Insert inserts a new item into the trie using the given prefix. Insert does\n// not replace existing items. It returns false if an item was already in place.\nfunc (trie *Trie) Insert(key Prefix, item Item) (inserted bool) {\n\treturn trie.put(key, item, false)\n}\n\n// Set works much like Insert, but it always sets the item, possibly replacing\n// the item previously inserted.\nfunc (trie *Trie) Set(key Prefix, item Item) {\n\ttrie.put(key, item, true)\n}\n\n// Get returns the item located at key.\n//\n// This method is a bit dangerous, because Get can as well end up in an internal\n// node that is not really representing any user-defined value. So when nil is\n// a valid value being used, it is not possible to tell if the value was inserted\n// into the tree by the user or not. A possible workaround for this is not to use\n// nil interface as a valid value, even using zero value of any type is enough\n// to prevent this bad behaviour.\nfunc (trie *Trie) Get(key Prefix) (item Item) {\n\t_, node, found, leftover := trie.findSubtree(key)\n\tif !found || len(leftover) != 0 {\n\t\treturn nil\n\t}\n\treturn node.item\n}\n\n// Match returns what Get(prefix) != nil would return. The same warning as for\n// Get applies here as well.\nfunc (trie *Trie) Match(prefix Prefix) (matchedExactly bool) {\n\treturn trie.Get(prefix) != nil\n}\n\n// MatchSubtree returns true when there is a subtree representing extensions\n// to key, that is if there are any keys in the tree which have key as prefix.\nfunc (trie *Trie) MatchSubtree(key Prefix) (matched bool) {\n\t_, _, matched, _ = trie.findSubtree(key)\n\treturn\n}\n\n// Visit calls visitor on every node containing a non-nil item\n// in alphabetical order.\n//\n// If an error is returned from visitor, the function stops visiting the tree\n// and returns that error, unless it is a special error - SkipSubtree. In that\n// case Visit skips the subtree represented by the current node and continues\n// elsewhere.\nfunc (trie *Trie) Visit(visitor VisitorFunc) error {\n\treturn trie.walk(nil, visitor)\n}\n\nfunc (trie *Trie) size() int {\n\tn := 0\n\n\ttrie.walk(nil, func(prefix Prefix, item Item) error {\n\t\tn++\n\t\treturn nil\n\t})\n\n\treturn n\n}\n\nfunc (trie *Trie) total() int {\n\treturn 1 + trie.children.total()\n}\n\n// VisitSubtree works much like Visit, but it only visits nodes matching prefix.\nfunc (trie *Trie) VisitSubtree(prefix Prefix, visitor VisitorFunc) error {\n\t// Nil prefix not allowed.\n\tif prefix == nil {\n\t\tpanic(ErrNilPrefix)\n\t}\n\n\t// Empty trie must be handled explicitly.\n\tif trie.prefix == nil {\n\t\treturn nil\n\t}\n\n\t// Locate the relevant subtree.\n\t_, root, found, leftover := trie.findSubtree(prefix)\n\tif !found {\n\t\treturn nil\n\t}\n\tprefix = append(prefix, leftover...)\n\n\t// Visit it.\n\treturn root.walk(prefix, visitor)\n}\n\n// VisitPrefixes visits only nodes that represent prefixes of key.\n// To say the obvious, returning SkipSubtree from visitor makes no sense here.\nfunc (trie *Trie) VisitPrefixes(key Prefix, visitor VisitorFunc) error {\n\t// Nil key not allowed.\n\tif key == nil {\n\t\tpanic(ErrNilPrefix)\n\t}\n\n\t// Empty trie must be handled explicitly.\n\tif trie.prefix == nil {\n\t\treturn nil\n\t}\n\n\t// Walk the path matching key prefixes.\n\tnode := trie\n\tprefix := key\n\toffset := 0\n\tfor {\n\t\t// Compute what part of prefix matches.\n\t\tcommon := node.longestCommonPrefixLength(key)\n\t\tkey = key[common:]\n\t\toffset += common\n\n\t\t// Partial match means that there is no subtree matching prefix.\n\t\tif common < len(node.prefix) {\n\t\t\treturn nil\n\t\t}\n\n\t\t// Call the visitor.\n\t\tif item := node.item; item != nil {\n\t\t\tif err := visitor(prefix[:offset], item); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif len(key) == 0 {\n\t\t\t// This node represents key, we are finished.\n\t\t\treturn nil\n\t\t}\n\n\t\t// There is some key suffix left, move to the children.\n\t\tchild := node.children.next(key[0])\n\t\tif child == nil {\n\t\t\t// There is nowhere to continue, return.\n\t\t\treturn nil\n\t\t}\n\n\t\tnode = child\n\t}\n}\n\n// Delete deletes the item represented by the given prefix.\n//\n// True is returned if the matching node was found and deleted.\nfunc (trie *Trie) Delete(key Prefix) (deleted bool) {\n\t// Nil prefix not allowed.\n\tif key == nil {\n\t\tpanic(ErrNilPrefix)\n\t}\n\n\t// Empty trie must be handled explicitly.\n\tif trie.prefix == nil {\n\t\treturn false\n\t}\n\n\t// Find the relevant node.\n\tpath, found, _ := trie.findSubtreePath(key)\n\tif !found {\n\t\treturn false\n\t}\n\n\tnode := path[len(path)-1]\n\tvar parent *Trie\n\tif len(path) != 1 {\n\t\tparent = path[len(path)-2]\n\t}\n\n\t// If the item is already set to nil, there is nothing to do.\n\tif node.item == nil {\n\t\treturn false\n\t}\n\n\t// Delete the item.\n\tnode.item = nil\n\n\t// Initialise i before goto.\n\t// Will be used later in a loop.\n\ti := len(path) - 1\n\n\t// In case there are some child nodes, we cannot drop the whole subtree.\n\t// We can try to compact nodes, though.\n\tif node.children.length() != 0 {\n\t\tgoto Compact\n\t}\n\n\t// In case we are at the root, just reset it and we are done.\n\tif parent == nil {\n\t\tnode.reset()\n\t\treturn true\n\t}\n\n\t// We can drop a subtree.\n\t// Find the first ancestor that has its value set or it has 2 or more child nodes.\n\t// That will be the node where to drop the subtree at.\n\tfor ; i >= 0; i-- {\n\t\tif current := path[i]; current.item != nil || current.children.length() >= 2 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Handle the case when there is no such node.\n\t// In other words, we can reset the whole tree.\n\tif i == -1 {\n\t\tpath[0].reset()\n\t\treturn true\n\t}\n\n\t// We can just remove the subtree here.\n\tnode = path[i]\n\tif i == 0 {\n\t\tparent = nil\n\t} else {\n\t\tparent = path[i-1]\n\t}\n\t// i+1 is always a valid index since i is never pointing to the last node.\n\t// The loop above skips at least the last node since we are sure that the item\n\t// is set to nil and it has no children, othewise we would be compacting instead.\n\tnode.children.remove(path[i+1].prefix[0])\n\nCompact:\n\t// The node is set to the first non-empty ancestor,\n\t// so try to compact since that might be possible now.\n\tif compacted := node.compact(); compacted != node {\n\t\tif parent == nil {\n\t\t\t*node = *compacted\n\t\t} else {\n\t\t\tparent.children.replace(node.prefix[0], compacted)\n\t\t\t*parent = *parent.compact()\n\t\t}\n\t}\n\n\treturn true\n}\n\n// DeleteSubtree finds the subtree exactly matching prefix and deletes it.\n//\n// True is returned if the subtree was found and deleted.\nfunc (trie *Trie) DeleteSubtree(prefix Prefix) (deleted bool) {\n\t// Nil prefix not allowed.\n\tif prefix == nil {\n\t\tpanic(ErrNilPrefix)\n\t}\n\n\t// Empty trie must be handled explicitly.\n\tif trie.prefix == nil {\n\t\treturn false\n\t}\n\n\t// Locate the relevant subtree.\n\tparent, root, found, _ := trie.findSubtree(prefix)\n\tif !found {\n\t\treturn false\n\t}\n\n\t// If we are in the root of the trie, reset the trie.\n\tif parent == nil {\n\t\troot.reset()\n\t\treturn true\n\t}\n\n\t// Otherwise remove the root node from its parent.\n\tparent.children.remove(root.prefix[0])\n\treturn true\n}\n\n// Internal helper methods -----------------------------------------------------\n\nfunc (trie *Trie) empty() bool {\n\treturn trie.item == nil && trie.children.length() == 0\n}\n\nfunc (trie *Trie) reset() {\n\ttrie.prefix = nil\n\ttrie.children = newSparseChildList(trie.maxPrefixPerNode)\n}\n\nfunc (trie *Trie) put(key Prefix, item Item, replace bool) (inserted bool) {\n\t// Nil prefix not allowed.\n\tif key == nil {\n\t\tpanic(ErrNilPrefix)\n\t}\n\n\tvar (\n\t\tcommon int\n\t\tnode   *Trie = trie\n\t\tchild  *Trie\n\t)\n\n\tif node.prefix == nil {\n\t\tif len(key) <= trie.maxPrefixPerNode {\n\t\t\tnode.prefix = key\n\t\t\tgoto InsertItem\n\t\t}\n\t\tnode.prefix = key[:trie.maxPrefixPerNode]\n\t\tkey = key[trie.maxPrefixPerNode:]\n\t\tgoto AppendChild\n\t}\n\n\tfor {\n\t\t// Compute the longest common prefix length.\n\t\tcommon = node.longestCommonPrefixLength(key)\n\t\tkey = key[common:]\n\n\t\t// Only a part matches, split.\n\t\tif common < len(node.prefix) {\n\t\t\tgoto SplitPrefix\n\t\t}\n\n\t\t// common == len(node.prefix) since never (common > len(node.prefix))\n\t\t// common == len(former key) <-> 0 == len(key)\n\t\t// -> former key == node.prefix\n\t\tif len(key) == 0 {\n\t\t\tgoto InsertItem\n\t\t}\n\n\t\t// Check children for matching prefix.\n\t\tchild = node.children.next(key[0])\n\t\tif child == nil {\n\t\t\tgoto AppendChild\n\t\t}\n\t\tnode = child\n\t}\n\nSplitPrefix:\n\t// Split the prefix if necessary.\n\tchild = new(Trie)\n\t*child = *node\n\t*node = *NewTrie()\n\tnode.prefix = child.prefix[:common]\n\tchild.prefix = child.prefix[common:]\n\tchild = child.compact()\n\tnode.children = node.children.add(child)\n\nAppendChild:\n\t// Keep appending children until whole prefix is inserted.\n\t// This loop starts with empty node.prefix that needs to be filled.\n\tfor len(key) != 0 {\n\t\tchild := NewTrie()\n\t\tif len(key) <= trie.maxPrefixPerNode {\n\t\t\tchild.prefix = key\n\t\t\tnode.children = node.children.add(child)\n\t\t\tnode = child\n\t\t\tgoto InsertItem\n\t\t} else {\n\t\t\tchild.prefix = key[:trie.maxPrefixPerNode]\n\t\t\tkey = key[trie.maxPrefixPerNode:]\n\t\t\tnode.children = node.children.add(child)\n\t\t\tnode = child\n\t\t}\n\t}\n\nInsertItem:\n\t// Try to insert the item if possible.\n\tif replace || node.item == nil {\n\t\tnode.item = item\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (trie *Trie) compact() *Trie {\n\t// Only a node with a single child can be compacted.\n\tif trie.children.length() != 1 {\n\t\treturn trie\n\t}\n\n\tchild := trie.children.head()\n\n\t// If any item is set, we cannot compact since we want to retain\n\t// the ability to do searching by key. This makes compaction less usable,\n\t// but that simply cannot be avoided.\n\tif child == nil || trie.item != nil || child.item != nil {\n\t\treturn trie\n\t}\n\n\t// Make sure the combined prefixes fit into a single node.\n\tif len(trie.prefix)+len(child.prefix) > trie.maxPrefixPerNode {\n\t\treturn trie\n\t}\n\n\t// Concatenate the prefixes, move the items.\n\tchild.prefix = append(trie.prefix, child.prefix...)\n\tif trie.item != nil {\n\t\tchild.item = trie.item\n\t}\n\n\treturn child\n}\n\nfunc (trie *Trie) findSubtree(prefix Prefix) (parent *Trie, root *Trie, found bool, leftover Prefix) {\n\t// Find the subtree matching prefix.\n\troot = trie\n\tfor {\n\t\t// Compute what part of prefix matches.\n\t\tcommon := root.longestCommonPrefixLength(prefix)\n\t\tprefix = prefix[common:]\n\n\t\t// We used up the whole prefix, subtree found.\n\t\tif len(prefix) == 0 {\n\t\t\tfound = true\n\t\t\tleftover = root.prefix[common:]\n\t\t\treturn\n\t\t}\n\n\t\t// Partial match means that there is no subtree matching prefix.\n\t\tif common < len(root.prefix) {\n\t\t\tleftover = root.prefix[common:]\n\t\t\treturn\n\t\t}\n\n\t\t// There is some prefix left, move to the children.\n\t\tchild := root.children.next(prefix[0])\n\t\tif child == nil {\n\t\t\t// There is nowhere to continue, there is no subtree matching prefix.\n\t\t\treturn\n\t\t}\n\n\t\tparent = root\n\t\troot = child\n\t}\n}\n\nfunc (trie *Trie) findSubtreePath(prefix Prefix) (path []*Trie, found bool, leftover Prefix) {\n\t// Find the subtree matching prefix.\n\troot := trie\n\tvar subtreePath []*Trie\n\tfor {\n\t\t// Append the current root to the path.\n\t\tsubtreePath = append(subtreePath, root)\n\n\t\t// Compute what part of prefix matches.\n\t\tcommon := root.longestCommonPrefixLength(prefix)\n\t\tprefix = prefix[common:]\n\n\t\t// We used up the whole prefix, subtree found.\n\t\tif len(prefix) == 0 {\n\t\t\tpath = subtreePath\n\t\t\tfound = true\n\t\t\tleftover = root.prefix[common:]\n\t\t\treturn\n\t\t}\n\n\t\t// Partial match means that there is no subtree matching prefix.\n\t\tif common < len(root.prefix) {\n\t\t\tleftover = root.prefix[common:]\n\t\t\treturn\n\t\t}\n\n\t\t// There is some prefix left, move to the children.\n\t\tchild := root.children.next(prefix[0])\n\t\tif child == nil {\n\t\t\t// There is nowhere to continue, there is no subtree matching prefix.\n\t\t\treturn\n\t\t}\n\n\t\troot = child\n\t}\n}\n\nfunc (trie *Trie) walk(actualRootPrefix Prefix, visitor VisitorFunc) error {\n\tvar prefix Prefix\n\t// Allocate a bit more space for prefix at the beginning.\n\tif actualRootPrefix == nil {\n\t\tprefix = make(Prefix, 32+len(trie.prefix))\n\t\tcopy(prefix, trie.prefix)\n\t\tprefix = prefix[:len(trie.prefix)]\n\t} else {\n\t\tprefix = make(Prefix, 32+len(actualRootPrefix))\n\t\tcopy(prefix, actualRootPrefix)\n\t\tprefix = prefix[:len(actualRootPrefix)]\n\t}\n\n\t// Visit the root first. Not that this works for empty trie as well since\n\t// in that case item == nil && len(children) == 0.\n\tif trie.item != nil {\n\t\tif err := visitor(prefix, trie.item); err != nil {\n\t\t\tif err == SkipSubtree {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Then continue to the children.\n\treturn trie.children.walk(&prefix, visitor)\n}\n\nfunc (trie *Trie) longestCommonPrefixLength(prefix Prefix) (i int) {\n\tfor ; i < len(prefix) && i < len(trie.prefix) && prefix[i] == trie.prefix[i]; i++ {\n\t}\n\treturn\n}\n\nfunc (trie *Trie) dump() string {\n\twriter := &bytes.Buffer{}\n\ttrie.print(writer, 0)\n\treturn writer.String()\n}\n\nfunc (trie *Trie) print(writer io.Writer, indent int) {\n\tfmt.Fprintf(writer, \"%s%s %v\\n\", strings.Repeat(\" \", indent), string(trie.prefix), trie.item)\n\ttrie.children.print(writer, indent+2)\n}\n\n// Errors ----------------------------------------------------------------------\n\nvar (\n\tSkipSubtree  = errors.New(\"Skip this subtree\")\n\tErrNilPrefix = errors.New(\"Nil prefix passed into a method call\")\n)\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/.gitignore",
    "content": "# .gitignore\n\nTODO.html\nREADME.html\n\nlzma/writer.txt\nlzma/reader.txt\n\ncmd/gxz/gxz\ncmd/xb/xb\n\n# test executables\n*.test\n\n# profile files\n*.out\n\n# vim swap file\n.*.swp\n\n# executables on windows\n*.exe\n\n# default compression test file\nenwik8*\n\n# file generated by example\nexample.xz"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/LICENSE",
    "content": "Copyright (c) 2014-2022  Ulrich Kunitz\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are 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,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* My name, Ulrich Kunitz, may not be used to endorse or promote products\n  derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/README.md",
    "content": "# Package xz\n\nThis Go language package supports the reading and writing of xz\ncompressed streams. It includes also a gxz command for compressing and\ndecompressing data. The package is completely written in Go and doesn't\nhave any dependency on any C code.\n\nThe package is currently under development. There might be bugs and APIs\nare not considered stable. At this time the package cannot compete with\nthe xz tool regarding compression speed and size. The algorithms there\nhave been developed over a long time and are highly optimized. However\nthere are a number of improvements planned and I'm very optimistic about\nparallel compression and decompression. Stay tuned!\n\n## Using the API\n\nThe following example program shows how to use the API.\n\n```go\npackage main\n\nimport (\n    \"bytes\"\n    \"io\"\n    \"log\"\n    \"os\"\n\n    \"github.com/ulikunitz/xz\"\n)\n\nfunc main() {\n    const text = \"The quick brown fox jumps over the lazy dog.\\n\"\n    var buf bytes.Buffer\n    // compress text\n    w, err := xz.NewWriter(&buf)\n    if err != nil {\n        log.Fatalf(\"xz.NewWriter error %s\", err)\n    }\n    if _, err := io.WriteString(w, text); err != nil {\n        log.Fatalf(\"WriteString error %s\", err)\n    }\n    if err := w.Close(); err != nil {\n        log.Fatalf(\"w.Close error %s\", err)\n    }\n    // decompress buffer and write output to stdout\n    r, err := xz.NewReader(&buf)\n    if err != nil {\n        log.Fatalf(\"NewReader error %s\", err)\n    }\n    if _, err = io.Copy(os.Stdout, r); err != nil {\n        log.Fatalf(\"io.Copy error %s\", err)\n    }\n}\n```\n\n## Documentation\n\nYou can find the full documentation at [pkg.go.dev](https://pkg.go.dev/github.com/ulikunitz/xz).\n\n## Using the gxz compression tool\n\nThe package includes a gxz command line utility for compression and\ndecompression.\n\nUse following command for installation:\n\n    $ go get github.com/ulikunitz/xz/cmd/gxz\n\nTo test it call the following command.\n\n    $ gxz bigfile\n\nAfter some time a much smaller file bigfile.xz will replace bigfile.\nTo decompress it use the following command.\n\n    $ gxz -d bigfile.xz\n\n## Security & Vulnerabilities\n\nThe security policy is documented in [SECURITY.md](SECURITY.md). \n\nThe software is not affected by the supply chain attack on the original xz\nimplementation, [CVE-2024-3094](https://nvd.nist.gov/vuln/detail/CVE-2024-3094).\nThis implementation doesn't share any files with the original xz implementation\nand no patches or pull requests are accepted without a review.\n\nAll security advisories for this project are published under\n[github.com/ulikunitz/xz/security/advisories](https://github.com/ulikunitz/xz/security/advisories?state=published).\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\nCurrently the last minor version v0.5.x is supported.\n\n## Reporting a Vulnerability\n\nYou can privately report a vulnerability following this\n[procedure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability).\nAlternatively you can create a Github issue at\n<https://github.com/ulikunitz/xz/issues>.\n\nIn both cases expect a response in at least 7 days.\n\n## Security Advisories\n\nAll security advisories for this project are published under\n[github.com/ulikunitz/xz/security/advisories](https://github.com/ulikunitz/xz/security/advisories?state=published).\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/TODO.md",
    "content": "# TODO list\n\n## Release v0.6\n\n1. Review encoder and check for lzma improvements under xz.\n2. Fix binary tree matcher.\n3. Compare compression ratio with xz tool using comparable parameters and optimize parameters\n4. rename operation action and make it a simple type of size 8\n5. make maxMatches, wordSize parameters\n6. stop searching after a certain length is found (parameter sweetLen)\n\n## Release v0.7\n\n1. Optimize code\n2. Do statistical analysis to get linear presets.\n3. Test sync.Pool compatability for xz and lzma Writer and Reader\n4. Fuzz optimized code.\n\n## Release v0.8\n\n1. Support parallel go routines for writing and reading xz files.\n2. Support a ReaderAt interface for xz files with small block sizes.\n3. Improve compatibility between gxz and xz\n4. Provide manual page for gxz\n\n## Release v0.9\n\n1. Improve documentation\n2. Fuzz again\n\n## Release v1.0\n\n1. Full functioning gxz\n2. Add godoc URL to README.md (godoc.org)\n3. Resolve all issues.\n4. Define release candidates.\n5. Public announcement.\n\n## Package lzma\n\n### v0.6\n\n* Rewrite Encoder into a simple greedy one-op-at-a-time encoder including\n  * simple scan at the dictionary head for the same byte\n  * use the killer byte (requiring matches to get longer, the first test should be the byte that would make the match longer)\n\n## Optimizations\n\n* There may be a lot of false sharing in lzma. State; check whether this  can be improved by reorganizing the internal structure of it.\n\n* Check whether batching encoding and decoding improves speed.\n\n### DAG optimizations\n\n* Use full buffer to create minimal bit-length above range encoder.\n* Might be too slow (see v0.4)\n\n### Different match finders\n\n* hashes with 2, 3 characters additional to 4 characters\n* binary trees with 2-7 characters (uint64 as key, use uint32 as\n\n  pointers into a an array)\n\n* rb-trees with 2-7 characters (uint64 as key, use uint32 as pointers\n\n  into an array with bit-steeling for the colors)\n\n## Release Procedure\n\n* execute goch -l for all packages; probably with lower param like 0.5.\n* check orthography with gospell\n* Write release notes in doc/relnotes.\n* Update README.md\n* xb copyright . in xz directory to ensure all new files have Copyright header\n* `VERSION=<version> go generate github.com/ulikunitz/xz/...` to update version files\n* Execute test for Linux/amd64, Linux/x86 and Windows/amd64.\n* Update TODO.md - write short log entry\n* `git checkout master && git merge dev`\n* `git tag -a <version>`\n* `git push`\n\n## Log\n\n## 2025-08-28\n\nRelease v0.5.14 addresses the security vulnerability CVE-2025-58058. If you put\nbytes in from of a LZMA stream, the header might not be read correctly and\nmemory for the dictionary buffer allocated. I have implemented mitigations for\nthe problem.\n\n### 2025-08-20\n\nRelease v0.5.13 addressed issue #61 regarding handling of multiple WriteClosers\ntogether. So I added a new package xio with a WriteCloserStack to address the\nissue.\n\n### 2024-04-03\n\nRelease v0.5.12 updates README.md and SECURITY.md to address the supply chain\nattack on the original xz implementation.\n\n### 2022-12-12\n\nMatt Dantay (@bodgit) reported an issue with the LZMA reader. The implementation\nreturned an error if the dictionary size was less than 4096 byte, but the\nrecommendation stated the actual used window size should be set to 4096 byte in\nthat case. It actually was the pull request\n[#52](https://github.com/ulikunitz/xz/pull/52). The new patch v0.5.11 will fix\nit.\n\n### 2021-02-02\n\nMituo Heijo has fuzzed xz and found a bug in the function readIndexBody. The\nfunction allocated a slice of records immediately after reading the value\nwithout further checks. Since the number has been too large the make function\ndid panic. The fix is to check the number against the expected number of records\nbefore allocating the records.\n\n### 2020-12-17\n\nRelease v0.5.9 fixes warnings, a typo and adds SECURITY.md.\n\nOne fix is interesting.\n\n```go\nconst (\n  a byte = 0x1\n  b      = 0x2\n)\n```\n\nThe constants a and b don't have the same type. Correct is\n\n```go\nconst (\n  a byte = 0x1\n  b byte = 0x2\n)\n```\n\n### 2020-08-19\n\nRelease v0.5.8 fixes issue\n[issue #35](https://github.com/ulikunitz/xz/issues/35).\n\n### 2020-02-24\n\nRelease v0.5.7 supports the check-ID None and fixes\n[issue #27](https://github.com/ulikunitz/xz/issues/27).\n\n### 2019-02-20\n\nRelease v0.5.6 supports the go.mod file.\n\n### 2018-10-28\n\nRelease v0.5.5 fixes issues #19 observing ErrLimit outputs.\n\n### 2017-06-05\n\nRelease v0.5.4 fixes issues #15 of another problem with the padding size\ncheck for the xz block header. I removed the check completely.\n\n### 2017-02-15\n\nRelease v0.5.3 fixes issue #12 regarding the decompression of an empty\nXZ stream. Many thanks to Tomasz Kłak, who reported the issue.\n\n### 2016-12-02\n\nRelease v0.5.2 became necessary to allow the decoding of xz files with\n4-byte padding in the block header. Many thanks to Greg, who reported\nthe issue.\n\n### 2016-07-23\n\nRelease v0.5.1 became necessary to fix problems with 32-bit platforms.\nMany thanks to Bruno Brigas, who reported the issue.\n\n### 2016-07-04\n\nRelease v0.5 provides improvements to the compressor and provides support for\nthe decompression of xz files with multiple xz streams.\n\n### 2016-01-31\n\nAnother compression rate increase by checking the byte at length of the\nbest match first, before checking the whole prefix. This makes the\ncompressor even faster. We have now a large time budget to beat the\ncompression ratio of the xz tool. For enwik8 we have now over 40 seconds\nto reduce the compressed file size for another 7 MiB.\n\n### 2016-01-30\n\nI simplified the encoder. Speed and compression rate increased\ndramatically. A high compression rate affects also the decompression\nspeed. The approach with the buffer and optimizing for operation\ncompression rate has not been successful. Going for the maximum length\nappears to be the best approach.\n\n### 2016-01-28\n\nThe release v0.4 is ready. It provides a working xz implementation,\nwhich is rather slow, but works and is interoperable with the xz tool.\nIt is an important milestone.\n\n### 2016-01-10\n\nI have the first working implementation of an xz reader and writer. I'm\nhappy about reaching this milestone.\n\n### 2015-12-02\n\nI'm now ready to implement xz because, I have a working LZMA2\nimplementation. I decided today that v0.4 will use the slow encoder\nusing the operations buffer to be able to go back, if I intend to do so.\n\n### 2015-10-21\n\nI have restarted the work on the library. While trying to implement\nLZMA2, I discovered that I need to resimplify the encoder and decoder\nfunctions. The option approach is too complicated. Using a limited byte\nwriter and not caring for written bytes at all and not to try to handle\nuncompressed data simplifies the LZMA encoder and decoder much.\nProcessing uncompressed data and handling limits is a feature of the\nLZMA2 format not of LZMA.\n\nI learned an interesting method from the LZO format. If the last copy is\ntoo far away they are moving the head one 2 bytes and not 1 byte to\nreduce processing times.\n\n### 2015-08-26\n\nI have now reimplemented the lzma package. The code is reasonably fast,\nbut can still be optimized. The next step is to implement LZMA2 and then\nxz.\n\n### 2015-07-05\n\nCreated release v0.3. The version is the foundation for a full xz\nimplementation that is the target of v0.4.\n\n### 2015-06-11\n\nThe gflag package has been developed because I couldn't use flag and\npflag for a fully compatible support of gzip's and lzma's options. It\nseems to work now quite nicely.\n\n### 2015-06-05\n\nThe overflow issue was interesting to research, however Henry S. Warren\nJr. Hacker's Delight book was very helpful as usual and had the issue\nexplained perfectly. Fefe's information on his website was based on the\nC FAQ and quite bad, because it didn't address the issue of -MININT ==\nMININT.\n\n### 2015-06-04\n\nIt has been a productive day. I improved the interface of lzma. Reader\nand lzma. Writer and fixed the error handling.\n\n### 2015-06-01\n\nBy computing the bit length of the LZMA operations I was able to\nimprove the greedy algorithm implementation. By using an 8 MByte buffer\nthe compression rate was not as good as for xz but already better then\ngzip default.\n\nCompression is currently slow, but this is something we will be able to\nimprove over time.\n\n### 2015-05-26\n\nChecked the license of ogier/pflag. The binary lzmago binary should\ninclude the license terms for the pflag library.\n\nI added the endorsement clause as used by Google for the Go sources the\nLICENSE file.\n\n### 2015-05-22\n\nThe package lzb contains now the basic implementation for creating or\nreading LZMA byte streams. It allows the support for the implementation\nof the DAG-shortest-path algorithm for the compression function.\n\n### 2015-04-23\n\nCompleted yesterday the lzbase classes. I'm a little bit concerned that\nusing the components may require too much code, but on the other hand\nthere is a lot of flexibility.\n\n### 2015-04-22\n\nImplemented Reader and Writer during the Bayern game against Porto. The\nsecond half gave me enough time.\n\n### 2015-04-21\n\nWhile showering today morning I discovered that the design for OpEncoder\nand OpDecoder doesn't work, because encoding/decoding might depend on\nthe current status of the dictionary. This is not exactly the right way\nto start the day.\n\nTherefore we need to keep the Reader and Writer design. This time around\nwe simplify it by ignoring size limits. These can be added by wrappers\naround the Reader and Writer interfaces. The Parameters type isn't\nneeded anymore.\n\nHowever I will implement a ReaderState and WriterState type to use\nstatic typing to ensure the right State object is combined with the\nright lzbase. Reader and lzbase. Writer.\n\nAs a start I have implemented ReaderState and WriterState to ensure\nthat the state for reading is only used by readers and WriterState only\nused by Writers.\n\n### 2015-04-20\n\nToday I implemented the OpDecoder and tested OpEncoder and OpDecoder.\n\n### 2015-04-08\n\nCame up with a new simplified design for lzbase. I implemented already\nthe type State that replaces OpCodec.\n\n### 2015-04-06\n\nThe new lzma package is now fully usable and lzmago is using it now. The\nold lzma package has been completely removed.\n\n### 2015-04-05\n\nImplemented lzma. Reader and tested it.\n\n### 2015-04-04\n\nImplemented baseReader by adapting code form lzma. Reader.\n\n### 2015-04-03\n\nThe opCodec has been copied yesterday to lzma2. opCodec has a high\nnumber of dependencies on other files in lzma2. Therefore I had to copy\nalmost all files from lzma.\n\n### 2015-03-31\n\nRemoved only a TODO item.\n\nHowever in Francesco Campoy's presentation \"Go for Javaneros\n(Javaïstes?)\" is the the idea that using an embedded field E, all the\nmethods of E will be defined on T. If E is an interface T satisfies E.\n\n<https://talks.golang.org/2014/go4java.slide#51>\n\nI have never used this, but it seems to be a cool idea.\n\n### 2015-03-30\n\nFinished the type writerDict and wrote a simple test.\n\n### 2015-03-25\n\nI started to implement the writerDict.\n\n### 2015-03-24\n\nAfter thinking long about the LZMA2 code and several false starts, I\nhave now a plan to create a self-sufficient lzma2 package that supports\nthe classic LZMA format as well as LZMA2. The core idea is to support a\nbaseReader and baseWriter type that support the basic LZMA stream\nwithout any headers. Both types must support the reuse of dictionaries\nand the opCodec.\n\n### 2015-01-10\n\n1. Implemented simple lzmago tool\n2. Tested tool against large 4.4G file\n   * compression worked correctly; tested decompression with lzma\n   * decompression hits a full buffer condition\n3. Fixed a bug in the compressor and wrote a test for it\n4. Executed full cycle for 4.4 GB file; performance can be improved ;-)\n\n### 2015-01-11\n\n* Release v0.2 because of the working LZMA encoder and decoder\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/bits.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// putUint32LE puts the little-endian representation of x into the first\n// four bytes of p.\nfunc putUint32LE(p []byte, x uint32) {\n\tp[0] = byte(x)\n\tp[1] = byte(x >> 8)\n\tp[2] = byte(x >> 16)\n\tp[3] = byte(x >> 24)\n}\n\n// putUint64LE puts the little-endian representation of x into the first\n// eight bytes of p.\nfunc putUint64LE(p []byte, x uint64) {\n\tp[0] = byte(x)\n\tp[1] = byte(x >> 8)\n\tp[2] = byte(x >> 16)\n\tp[3] = byte(x >> 24)\n\tp[4] = byte(x >> 32)\n\tp[5] = byte(x >> 40)\n\tp[6] = byte(x >> 48)\n\tp[7] = byte(x >> 56)\n}\n\n// uint32LE converts a little endian representation to an uint32 value.\nfunc uint32LE(p []byte) uint32 {\n\treturn uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 |\n\t\tuint32(p[3])<<24\n}\n\n// putUvarint puts a uvarint representation of x into the byte slice.\nfunc putUvarint(p []byte, x uint64) int {\n\ti := 0\n\tfor x >= 0x80 {\n\t\tp[i] = byte(x) | 0x80\n\t\tx >>= 7\n\t\ti++\n\t}\n\tp[i] = byte(x)\n\treturn i + 1\n}\n\n// errOverflow indicates an overflow of the 64-bit unsigned integer.\nvar errOverflowU64 = errors.New(\"xz: uvarint overflows 64-bit unsigned integer\")\n\n// readUvarint reads a uvarint from the given byte reader.\nfunc readUvarint(r io.ByteReader) (x uint64, n int, err error) {\n\tconst maxUvarintLen = 10\n\n\tvar s uint\n\ti := 0\n\tfor {\n\t\tb, err := r.ReadByte()\n\t\tif err != nil {\n\t\t\treturn x, i, err\n\t\t}\n\t\ti++\n\t\tif i > maxUvarintLen {\n\t\t\treturn x, i, errOverflowU64\n\t\t}\n\t\tif b < 0x80 {\n\t\t\tif i == maxUvarintLen && b > 1 {\n\t\t\t\treturn x, i, errOverflowU64\n\t\t\t}\n\t\t\treturn x | uint64(b)<<s, i, nil\n\t\t}\n\t\tx |= uint64(b&0x7f) << s\n\t\ts += 7\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/crc.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport (\n\t\"hash\"\n\t\"hash/crc32\"\n\t\"hash/crc64\"\n)\n\n// crc32Hash implements the hash.Hash32 interface with Sum returning the\n// crc32 value in little-endian encoding.\ntype crc32Hash struct {\n\thash.Hash32\n}\n\n// Sum returns the crc32 value as little endian.\nfunc (h crc32Hash) Sum(b []byte) []byte {\n\tp := make([]byte, 4)\n\tputUint32LE(p, h.Hash32.Sum32())\n\tb = append(b, p...)\n\treturn b\n}\n\n// newCRC32 returns a CRC-32 hash that returns the 64-bit value in\n// little-endian encoding using the IEEE polynomial.\nfunc newCRC32() hash.Hash {\n\treturn crc32Hash{Hash32: crc32.NewIEEE()}\n}\n\n// crc64Hash implements the Hash64 interface with Sum returning the\n// CRC-64 value in little-endian encoding.\ntype crc64Hash struct {\n\thash.Hash64\n}\n\n// Sum returns the CRC-64 value in little-endian encoding.\nfunc (h crc64Hash) Sum(b []byte) []byte {\n\tp := make([]byte, 8)\n\tputUint64LE(p, h.Hash64.Sum64())\n\tb = append(b, p...)\n\treturn b\n}\n\n// crc64Table is used to create a CRC-64 hash.\nvar crc64Table = crc64.MakeTable(crc64.ECMA)\n\n// newCRC64 returns a CRC-64 hash that returns the 64-bit value in\n// little-endian encoding using the ECMA polynomial.\nfunc newCRC64() hash.Hash {\n\treturn crc64Hash{Hash64: crc64.New(crc64Table)}\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/format.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport (\n\t\"bytes\"\n\t\"crypto/sha256\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"hash/crc32\"\n\t\"io\"\n\n\t\"github.com/ulikunitz/xz/lzma\"\n)\n\n// allZeros checks whether a given byte slice has only zeros.\nfunc allZeros(p []byte) bool {\n\tfor _, c := range p {\n\t\tif c != 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// padLen returns the length of the padding required for the given\n// argument.\nfunc padLen(n int64) int {\n\tk := int(n % 4)\n\tif k > 0 {\n\t\tk = 4 - k\n\t}\n\treturn k\n}\n\n/*** Header ***/\n\n// headerMagic stores the magic bytes for the header\nvar headerMagic = []byte{0xfd, '7', 'z', 'X', 'Z', 0x00}\n\n// HeaderLen provides the length of the xz file header.\nconst HeaderLen = 12\n\n// Constants for the checksum methods supported by xz.\nconst (\n\tNone   byte = 0x0\n\tCRC32  byte = 0x1\n\tCRC64  byte = 0x4\n\tSHA256 byte = 0xa\n)\n\n// errInvalidFlags indicates that flags are invalid.\nvar errInvalidFlags = errors.New(\"xz: invalid flags\")\n\n// verifyFlags returns the error errInvalidFlags if the value is\n// invalid.\nfunc verifyFlags(flags byte) error {\n\tswitch flags {\n\tcase None, CRC32, CRC64, SHA256:\n\t\treturn nil\n\tdefault:\n\t\treturn errInvalidFlags\n\t}\n}\n\n// flagstrings maps flag values to strings.\nvar flagstrings = map[byte]string{\n\tNone:   \"None\",\n\tCRC32:  \"CRC-32\",\n\tCRC64:  \"CRC-64\",\n\tSHA256: \"SHA-256\",\n}\n\n// flagString returns the string representation for the given flags.\nfunc flagString(flags byte) string {\n\ts, ok := flagstrings[flags]\n\tif !ok {\n\t\treturn \"invalid\"\n\t}\n\treturn s\n}\n\n// newHashFunc returns a function that creates hash instances for the\n// hash method encoded in flags.\nfunc newHashFunc(flags byte) (newHash func() hash.Hash, err error) {\n\tswitch flags {\n\tcase None:\n\t\tnewHash = newNoneHash\n\tcase CRC32:\n\t\tnewHash = newCRC32\n\tcase CRC64:\n\t\tnewHash = newCRC64\n\tcase SHA256:\n\t\tnewHash = sha256.New\n\tdefault:\n\t\terr = errInvalidFlags\n\t}\n\treturn\n}\n\n// header provides the actual content of the xz file header: the flags.\ntype header struct {\n\tflags byte\n}\n\n// Errors returned by readHeader.\nvar errHeaderMagic = errors.New(\"xz: invalid header magic bytes\")\n\n// ValidHeader checks whether data is a correct xz file header. The\n// length of data must be HeaderLen.\nfunc ValidHeader(data []byte) bool {\n\tvar h header\n\terr := h.UnmarshalBinary(data)\n\treturn err == nil\n}\n\n// String returns a string representation of the flags.\nfunc (h header) String() string {\n\treturn flagString(h.flags)\n}\n\n// UnmarshalBinary reads header from the provided data slice.\nfunc (h *header) UnmarshalBinary(data []byte) error {\n\t// header length\n\tif len(data) != HeaderLen {\n\t\treturn errors.New(\"xz: wrong file header length\")\n\t}\n\n\t// magic header\n\tif !bytes.Equal(headerMagic, data[:6]) {\n\t\treturn errHeaderMagic\n\t}\n\n\t// checksum\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[6:8])\n\tif uint32LE(data[8:]) != crc.Sum32() {\n\t\treturn errors.New(\"xz: invalid checksum for file header\")\n\t}\n\n\t// stream flags\n\tif data[6] != 0 {\n\t\treturn errInvalidFlags\n\t}\n\tflags := data[7]\n\tif err := verifyFlags(flags); err != nil {\n\t\treturn err\n\t}\n\n\th.flags = flags\n\treturn nil\n}\n\n// MarshalBinary generates the xz file header.\nfunc (h *header) MarshalBinary() (data []byte, err error) {\n\tif err = verifyFlags(h.flags); err != nil {\n\t\treturn nil, err\n\t}\n\n\tdata = make([]byte, 12)\n\tcopy(data, headerMagic)\n\tdata[7] = h.flags\n\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[6:8])\n\tputUint32LE(data[8:], crc.Sum32())\n\n\treturn data, nil\n}\n\n/*** Footer ***/\n\n// footerLen defines the length of the footer.\nconst footerLen = 12\n\n// footerMagic contains the footer magic bytes.\nvar footerMagic = []byte{'Y', 'Z'}\n\n// footer represents the content of the xz file footer.\ntype footer struct {\n\tindexSize int64\n\tflags     byte\n}\n\n// String prints a string representation of the footer structure.\nfunc (f footer) String() string {\n\treturn fmt.Sprintf(\"%s index size %d\", flagString(f.flags), f.indexSize)\n}\n\n// Minimum and maximum for the size of the index (backward size).\nconst (\n\tminIndexSize = 4\n\tmaxIndexSize = (1 << 32) * 4\n)\n\n// MarshalBinary converts footer values into an xz file footer. Note\n// that the footer value is checked for correctness.\nfunc (f *footer) MarshalBinary() (data []byte, err error) {\n\tif err = verifyFlags(f.flags); err != nil {\n\t\treturn nil, err\n\t}\n\tif !(minIndexSize <= f.indexSize && f.indexSize <= maxIndexSize) {\n\t\treturn nil, errors.New(\"xz: index size out of range\")\n\t}\n\tif f.indexSize%4 != 0 {\n\t\treturn nil, errors.New(\n\t\t\t\"xz: index size not aligned to four bytes\")\n\t}\n\n\tdata = make([]byte, footerLen)\n\n\t// backward size (index size)\n\ts := (f.indexSize / 4) - 1\n\tputUint32LE(data[4:], uint32(s))\n\t// flags\n\tdata[9] = f.flags\n\t// footer magic\n\tcopy(data[10:], footerMagic)\n\n\t// CRC-32\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[4:10])\n\tputUint32LE(data, crc.Sum32())\n\n\treturn data, nil\n}\n\n// UnmarshalBinary sets the footer value by unmarshalling an xz file\n// footer.\nfunc (f *footer) UnmarshalBinary(data []byte) error {\n\tif len(data) != footerLen {\n\t\treturn errors.New(\"xz: wrong footer length\")\n\t}\n\n\t// magic bytes\n\tif !bytes.Equal(data[10:], footerMagic) {\n\t\treturn errors.New(\"xz: footer magic invalid\")\n\t}\n\n\t// CRC-32\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[4:10])\n\tif uint32LE(data) != crc.Sum32() {\n\t\treturn errors.New(\"xz: footer checksum error\")\n\t}\n\n\tvar g footer\n\t// backward size (index size)\n\tg.indexSize = (int64(uint32LE(data[4:])) + 1) * 4\n\n\t// flags\n\tif data[8] != 0 {\n\t\treturn errInvalidFlags\n\t}\n\tg.flags = data[9]\n\tif err := verifyFlags(g.flags); err != nil {\n\t\treturn err\n\t}\n\n\t*f = g\n\treturn nil\n}\n\n/*** Block Header ***/\n\n// blockHeader represents the content of an xz block header.\ntype blockHeader struct {\n\tcompressedSize   int64\n\tuncompressedSize int64\n\tfilters          []filter\n}\n\n// String converts the block header into a string.\nfunc (h blockHeader) String() string {\n\tvar buf bytes.Buffer\n\tfirst := true\n\tif h.compressedSize >= 0 {\n\t\tfmt.Fprintf(&buf, \"compressed size %d\", h.compressedSize)\n\t\tfirst = false\n\t}\n\tif h.uncompressedSize >= 0 {\n\t\tif !first {\n\t\t\tbuf.WriteString(\" \")\n\t\t}\n\t\tfmt.Fprintf(&buf, \"uncompressed size %d\", h.uncompressedSize)\n\t\tfirst = false\n\t}\n\tfor _, f := range h.filters {\n\t\tif !first {\n\t\t\tbuf.WriteString(\" \")\n\t\t}\n\t\tfmt.Fprintf(&buf, \"filter %s\", f)\n\t\tfirst = false\n\t}\n\treturn buf.String()\n}\n\n// Masks for the block flags.\nconst (\n\tfilterCountMask         = 0x03\n\tcompressedSizePresent   = 0x40\n\tuncompressedSizePresent = 0x80\n\treservedBlockFlags      = 0x3C\n)\n\n// errIndexIndicator signals that an index indicator (0x00) has been found\n// instead of an expected block header indicator.\nvar errIndexIndicator = errors.New(\"xz: found index indicator\")\n\n// readBlockHeader reads the block header.\nfunc readBlockHeader(r io.Reader) (h *blockHeader, n int, err error) {\n\tvar buf bytes.Buffer\n\tbuf.Grow(20)\n\n\t// block header size\n\tz, err := io.CopyN(&buf, r, 1)\n\tn = int(z)\n\tif err != nil {\n\t\treturn nil, n, err\n\t}\n\ts := buf.Bytes()[0]\n\tif s == 0 {\n\t\treturn nil, n, errIndexIndicator\n\t}\n\n\t// read complete header\n\theaderLen := (int(s) + 1) * 4\n\tbuf.Grow(headerLen - 1)\n\tz, err = io.CopyN(&buf, r, int64(headerLen-1))\n\tn += int(z)\n\tif err != nil {\n\t\treturn nil, n, err\n\t}\n\n\t// unmarshal block header\n\th = new(blockHeader)\n\tif err = h.UnmarshalBinary(buf.Bytes()); err != nil {\n\t\treturn nil, n, err\n\t}\n\n\treturn h, n, nil\n}\n\n// readSizeInBlockHeader reads the uncompressed or compressed size\n// fields in the block header. The present value informs the function\n// whether the respective field is actually present in the header.\nfunc readSizeInBlockHeader(r io.ByteReader, present bool) (n int64, err error) {\n\tif !present {\n\t\treturn -1, nil\n\t}\n\tx, _, err := readUvarint(r)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif x >= 1<<63 {\n\t\treturn 0, errors.New(\"xz: size overflow in block header\")\n\t}\n\treturn int64(x), nil\n}\n\n// UnmarshalBinary unmarshals the block header.\nfunc (h *blockHeader) UnmarshalBinary(data []byte) error {\n\t// Check header length\n\ts := data[0]\n\tif data[0] == 0 {\n\t\treturn errIndexIndicator\n\t}\n\theaderLen := (int(s) + 1) * 4\n\tif len(data) != headerLen {\n\t\treturn fmt.Errorf(\"xz: data length %d; want %d\", len(data),\n\t\t\theaderLen)\n\t}\n\tn := headerLen - 4\n\n\t// Check CRC-32\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[:n])\n\tif crc.Sum32() != uint32LE(data[n:]) {\n\t\treturn errors.New(\"xz: checksum error for block header\")\n\t}\n\n\t// Block header flags\n\tflags := data[1]\n\tif flags&reservedBlockFlags != 0 {\n\t\treturn errors.New(\"xz: reserved block header flags set\")\n\t}\n\n\tr := bytes.NewReader(data[2:n])\n\n\t// Compressed size\n\tvar err error\n\th.compressedSize, err = readSizeInBlockHeader(\n\t\tr, flags&compressedSizePresent != 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Uncompressed size\n\th.uncompressedSize, err = readSizeInBlockHeader(\n\t\tr, flags&uncompressedSizePresent != 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\th.filters, err = readFilters(r, int(flags&filterCountMask)+1)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Check padding\n\t// Since headerLen is a multiple of 4 we don't need to check\n\t// alignment.\n\tk := r.Len()\n\t// The standard spec says that the padding should have not more\n\t// than 3 bytes. However we found paddings of 4 or 5 in the\n\t// wild. See https://github.com/ulikunitz/xz/pull/11 and\n\t// https://github.com/ulikunitz/xz/issues/15\n\t//\n\t// The only reasonable approach seems to be to ignore the\n\t// padding size. We still check that all padding bytes are zero.\n\tif !allZeros(data[n-k : n]) {\n\t\treturn errPadding\n\t}\n\treturn nil\n}\n\n// MarshalBinary marshals the binary header.\nfunc (h *blockHeader) MarshalBinary() (data []byte, err error) {\n\tif !(minFilters <= len(h.filters) && len(h.filters) <= maxFilters) {\n\t\treturn nil, errors.New(\"xz: filter count wrong\")\n\t}\n\tfor i, f := range h.filters {\n\t\tif i < len(h.filters)-1 {\n\t\t\tif f.id() == lzmaFilterID {\n\t\t\t\treturn nil, errors.New(\n\t\t\t\t\t\"xz: LZMA2 filter is not the last\")\n\t\t\t}\n\t\t} else {\n\t\t\t// last filter\n\t\t\tif f.id() != lzmaFilterID {\n\t\t\t\treturn nil, errors.New(\"xz: \" +\n\t\t\t\t\t\"last filter must be the LZMA2 filter\")\n\t\t\t}\n\t\t}\n\t}\n\n\tvar buf bytes.Buffer\n\t// header size must set at the end\n\tbuf.WriteByte(0)\n\n\t// flags\n\tflags := byte(len(h.filters) - 1)\n\tif h.compressedSize >= 0 {\n\t\tflags |= compressedSizePresent\n\t}\n\tif h.uncompressedSize >= 0 {\n\t\tflags |= uncompressedSizePresent\n\t}\n\tbuf.WriteByte(flags)\n\n\tp := make([]byte, 10)\n\tif h.compressedSize >= 0 {\n\t\tk := putUvarint(p, uint64(h.compressedSize))\n\t\tbuf.Write(p[:k])\n\t}\n\tif h.uncompressedSize >= 0 {\n\t\tk := putUvarint(p, uint64(h.uncompressedSize))\n\t\tbuf.Write(p[:k])\n\t}\n\n\tfor _, f := range h.filters {\n\t\tfp, err := f.MarshalBinary()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbuf.Write(fp)\n\t}\n\n\t// padding\n\tfor i := padLen(int64(buf.Len())); i > 0; i-- {\n\t\tbuf.WriteByte(0)\n\t}\n\n\t// crc place holder\n\tbuf.Write(p[:4])\n\n\tdata = buf.Bytes()\n\tif len(data)%4 != 0 {\n\t\tpanic(\"data length not aligned\")\n\t}\n\ts := len(data)/4 - 1\n\tif !(1 < s && s <= 255) {\n\t\tpanic(\"wrong block header size\")\n\t}\n\tdata[0] = byte(s)\n\n\tcrc := crc32.NewIEEE()\n\tcrc.Write(data[:len(data)-4])\n\tputUint32LE(data[len(data)-4:], crc.Sum32())\n\n\treturn data, nil\n}\n\n// Constants used for marshalling and unmarshalling filters in the xz\n// block header.\nconst (\n\tminFilters    = 1\n\tmaxFilters    = 4\n\tminReservedID = 1 << 62\n)\n\n// filter represents a filter in the block header.\ntype filter interface {\n\tid() uint64\n\tUnmarshalBinary(data []byte) error\n\tMarshalBinary() (data []byte, err error)\n\treader(r io.Reader, c *ReaderConfig) (fr io.Reader, err error)\n\twriteCloser(w io.WriteCloser, c *WriterConfig) (fw io.WriteCloser, err error)\n\t// filter must be last filter\n\tlast() bool\n}\n\n// readFilter reads a block filter from the block header. At this point\n// in time only the LZMA2 filter is supported.\nfunc readFilter(r io.Reader) (f filter, err error) {\n\tbr := lzma.ByteReader(r)\n\n\t// index\n\tid, _, err := readUvarint(br)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar data []byte\n\tswitch id {\n\tcase lzmaFilterID:\n\t\tdata = make([]byte, lzmaFilterLen)\n\t\tdata[0] = lzmaFilterID\n\t\tif _, err = io.ReadFull(r, data[1:]); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tf = new(lzmaFilter)\n\tdefault:\n\t\tif id >= minReservedID {\n\t\t\treturn nil, errors.New(\n\t\t\t\t\"xz: reserved filter id in block stream header\")\n\t\t}\n\t\treturn nil, errors.New(\"xz: invalid filter id\")\n\t}\n\tif err = f.UnmarshalBinary(data); err != nil {\n\t\treturn nil, err\n\t}\n\treturn f, err\n}\n\n// readFilters reads count filters. At this point in time only the count\n// 1 is supported.\nfunc readFilters(r io.Reader, count int) (filters []filter, err error) {\n\tif count != 1 {\n\t\treturn nil, errors.New(\"xz: unsupported filter count\")\n\t}\n\tf, err := readFilter(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn []filter{f}, err\n}\n\n/*** Index ***/\n\n// record describes a block in the xz file index.\ntype record struct {\n\tunpaddedSize     int64\n\tuncompressedSize int64\n}\n\n// readRecord reads an index record.\nfunc readRecord(r io.ByteReader) (rec record, n int, err error) {\n\tu, k, err := readUvarint(r)\n\tn += k\n\tif err != nil {\n\t\treturn rec, n, err\n\t}\n\trec.unpaddedSize = int64(u)\n\tif rec.unpaddedSize < 0 {\n\t\treturn rec, n, errors.New(\"xz: unpadded size negative\")\n\t}\n\n\tu, k, err = readUvarint(r)\n\tn += k\n\tif err != nil {\n\t\treturn rec, n, err\n\t}\n\trec.uncompressedSize = int64(u)\n\tif rec.uncompressedSize < 0 {\n\t\treturn rec, n, errors.New(\"xz: uncompressed size negative\")\n\t}\n\n\treturn rec, n, nil\n}\n\n// MarshalBinary converts an index record in its binary encoding.\nfunc (rec *record) MarshalBinary() (data []byte, err error) {\n\t// maximum length of a uvarint is 10\n\tp := make([]byte, 20)\n\tn := putUvarint(p, uint64(rec.unpaddedSize))\n\tn += putUvarint(p[n:], uint64(rec.uncompressedSize))\n\treturn p[:n], nil\n}\n\n// writeIndex writes the index, a sequence of records.\nfunc writeIndex(w io.Writer, index []record) (n int64, err error) {\n\tcrc := crc32.NewIEEE()\n\tmw := io.MultiWriter(w, crc)\n\n\t// index indicator\n\tk, err := mw.Write([]byte{0})\n\tn += int64(k)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\n\t// number of records\n\tp := make([]byte, 10)\n\tk = putUvarint(p, uint64(len(index)))\n\tk, err = mw.Write(p[:k])\n\tn += int64(k)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\n\t// list of records\n\tfor _, rec := range index {\n\t\tp, err := rec.MarshalBinary()\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tk, err = mw.Write(p)\n\t\tn += int64(k)\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t}\n\n\t// index padding\n\tk, err = mw.Write(make([]byte, padLen(int64(n))))\n\tn += int64(k)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\n\t// crc32 checksum\n\tputUint32LE(p, crc.Sum32())\n\tk, err = w.Write(p[:4])\n\tn += int64(k)\n\n\treturn n, err\n}\n\n// readIndexBody reads the index from the reader. It assumes that the\n// index indicator has already been read.\nfunc readIndexBody(r io.Reader, expectedRecordLen int) (records []record, n int64, err error) {\n\tcrc := crc32.NewIEEE()\n\t// index indicator\n\tcrc.Write([]byte{0})\n\n\tbr := lzma.ByteReader(io.TeeReader(r, crc))\n\n\t// number of records\n\tu, k, err := readUvarint(br)\n\tn += int64(k)\n\tif err != nil {\n\t\treturn nil, n, err\n\t}\n\trecLen := int(u)\n\tif recLen < 0 || uint64(recLen) != u {\n\t\treturn nil, n, errors.New(\"xz: record number overflow\")\n\t}\n\tif recLen != expectedRecordLen {\n\t\treturn nil, n, fmt.Errorf(\n\t\t\t\"xz: index length is %d; want %d\",\n\t\t\trecLen, expectedRecordLen)\n\t}\n\n\t// list of records\n\trecords = make([]record, recLen)\n\tfor i := range records {\n\t\trecords[i], k, err = readRecord(br)\n\t\tn += int64(k)\n\t\tif err != nil {\n\t\t\treturn nil, n, err\n\t\t}\n\t}\n\n\tp := make([]byte, padLen(int64(n+1)), 4)\n\tk, err = io.ReadFull(br.(io.Reader), p)\n\tn += int64(k)\n\tif err != nil {\n\t\treturn nil, n, err\n\t}\n\tif !allZeros(p) {\n\t\treturn nil, n, errors.New(\"xz: non-zero byte in index padding\")\n\t}\n\n\t// crc32\n\ts := crc.Sum32()\n\tp = p[:4]\n\tk, err = io.ReadFull(br.(io.Reader), p)\n\tn += int64(k)\n\tif err != nil {\n\t\treturn records, n, err\n\t}\n\tif uint32LE(p) != s {\n\t\treturn nil, n, errors.New(\"xz: wrong checksum for index\")\n\t}\n\n\treturn records, n, nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/internal/hash/cyclic_poly.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hash\n\n// CyclicPoly provides a cyclic polynomial rolling hash.\ntype CyclicPoly struct {\n\th uint64\n\tp []uint64\n\ti int\n}\n\n// ror rotates the unsigned 64-bit integer to right. The argument s must be\n// less than 64.\nfunc ror(x uint64, s uint) uint64 {\n\treturn (x >> s) | (x << (64 - s))\n}\n\n// NewCyclicPoly creates a new instance of the CyclicPoly structure. The\n// argument n gives the number of bytes for which a hash will be executed.\n// This number must be positive; the method panics if this isn't the case.\nfunc NewCyclicPoly(n int) *CyclicPoly {\n\tif n < 1 {\n\t\tpanic(\"argument n must be positive\")\n\t}\n\treturn &CyclicPoly{p: make([]uint64, 0, n)}\n}\n\n// Len returns the length of the byte sequence for which a hash is generated.\nfunc (r *CyclicPoly) Len() int {\n\treturn cap(r.p)\n}\n\n// RollByte hashes the next byte and returns a hash value. The complete becomes\n// available after at least Len() bytes have been hashed.\nfunc (r *CyclicPoly) RollByte(x byte) uint64 {\n\ty := hash[x]\n\tif len(r.p) < cap(r.p) {\n\t\tr.h = ror(r.h, 1) ^ y\n\t\tr.p = append(r.p, y)\n\t} else {\n\t\tr.h ^= ror(r.p[r.i], uint(cap(r.p)-1))\n\t\tr.h = ror(r.h, 1) ^ y\n\t\tr.p[r.i] = y\n\t\tr.i = (r.i + 1) % cap(r.p)\n\t}\n\treturn r.h\n}\n\n// Stores the hash for the individual bytes.\nvar hash = [256]uint64{\n\t0x2e4fc3f904065142, 0xc790984cfbc99527,\n\t0x879f95eb8c62f187, 0x3b61be86b5021ef2,\n\t0x65a896a04196f0a5, 0xc5b307b80470b59e,\n\t0xd3bff376a70df14b, 0xc332f04f0b3f1701,\n\t0x753b5f0e9abf3e0d, 0xb41538fdfe66ef53,\n\t0x1906a10c2c1c0208, 0xfb0c712a03421c0d,\n\t0x38be311a65c9552b, 0xfee7ee4ca6445c7e,\n\t0x71aadeded184f21e, 0xd73426fccda23b2d,\n\t0x29773fb5fb9600b5, 0xce410261cd32981a,\n\t0xfe2848b3c62dbc2d, 0x459eaaff6e43e11c,\n\t0xc13e35fc9c73a887, 0xf30ed5c201e76dbc,\n\t0xa5f10b3910482cea, 0x2945d59be02dfaad,\n\t0x06ee334ff70571b5, 0xbabf9d8070f44380,\n\t0xee3e2e9912ffd27c, 0x2a7118d1ea6b8ea7,\n\t0x26183cb9f7b1664c, 0xea71dac7da068f21,\n\t0xea92eca5bd1d0bb7, 0x415595862defcd75,\n\t0x248a386023c60648, 0x9cf021ab284b3c8a,\n\t0xfc9372df02870f6c, 0x2b92d693eeb3b3fc,\n\t0x73e799d139dc6975, 0x7b15ae312486363c,\n\t0xb70e5454a2239c80, 0x208e3fb31d3b2263,\n\t0x01f563cabb930f44, 0x2ac4533d2a3240d8,\n\t0x84231ed1064f6f7c, 0xa9f020977c2a6d19,\n\t0x213c227271c20122, 0x09fe8a9a0a03d07a,\n\t0x4236dc75bcaf910c, 0x460a8b2bead8f17e,\n\t0xd9b27be1aa07055f, 0xd202d5dc4b11c33e,\n\t0x70adb010543bea12, 0xcdae938f7ea6f579,\n\t0x3f3d870208672f4d, 0x8e6ccbce9d349536,\n\t0xe4c0871a389095ae, 0xf5f2a49152bca080,\n\t0x9a43f9b97269934e, 0xc17b3753cb6f475c,\n\t0xd56d941e8e206bd4, 0xac0a4f3e525eda00,\n\t0xa06d5a011912a550, 0x5537ed19537ad1df,\n\t0xa32fe713d611449d, 0x2a1d05b47c3b579f,\n\t0x991d02dbd30a2a52, 0x39e91e7e28f93eb0,\n\t0x40d06adb3e92c9ac, 0x9b9d3afde1c77c97,\n\t0x9a3f3f41c02c616f, 0x22ecd4ba00f60c44,\n\t0x0b63d5d801708420, 0x8f227ca8f37ffaec,\n\t0x0256278670887c24, 0x107e14877dbf540b,\n\t0x32c19f2786ac1c05, 0x1df5b12bb4bc9c61,\n\t0xc0cac129d0d4c4e2, 0x9fdb52ee9800b001,\n\t0x31f601d5d31c48c4, 0x72ff3c0928bcaec7,\n\t0xd99264421147eb03, 0x535a2d6d38aefcfe,\n\t0x6ba8b4454a916237, 0xfa39366eaae4719c,\n\t0x10f00fd7bbb24b6f, 0x5bd23185c76c84d4,\n\t0xb22c3d7e1b00d33f, 0x3efc20aa6bc830a8,\n\t0xd61c2503fe639144, 0x30ce625441eb92d3,\n\t0xe5d34cf359e93100, 0xa8e5aa13f2b9f7a5,\n\t0x5c2b8d851ca254a6, 0x68fb6c5e8b0d5fdf,\n\t0xc7ea4872c96b83ae, 0x6dd5d376f4392382,\n\t0x1be88681aaa9792f, 0xfef465ee1b6c10d9,\n\t0x1f98b65ed43fcb2e, 0x4d1ca11eb6e9a9c9,\n\t0x7808e902b3857d0b, 0x171c9c4ea4607972,\n\t0x58d66274850146df, 0x42b311c10d3981d1,\n\t0x647fa8c621c41a4c, 0xf472771c66ddfedc,\n\t0x338d27e3f847b46b, 0x6402ce3da97545ce,\n\t0x5162db616fc38638, 0x9c83be97bc22a50e,\n\t0x2d3d7478a78d5e72, 0xe621a9b938fd5397,\n\t0x9454614eb0f81c45, 0x395fb6e742ed39b6,\n\t0x77dd9179d06037bf, 0xc478d0fee4d2656d,\n\t0x35d9d6cb772007af, 0x83a56e92c883f0f6,\n\t0x27937453250c00a1, 0x27bd6ebc3a46a97d,\n\t0x9f543bf784342d51, 0xd158f38c48b0ed52,\n\t0x8dd8537c045f66b4, 0x846a57230226f6d5,\n\t0x6b13939e0c4e7cdf, 0xfca25425d8176758,\n\t0x92e5fc6cd52788e6, 0x9992e13d7a739170,\n\t0x518246f7a199e8ea, 0xf104c2a71b9979c7,\n\t0x86b3ffaabea4768f, 0x6388061cf3e351ad,\n\t0x09d9b5295de5bbb5, 0x38bf1638c2599e92,\n\t0x1d759846499e148d, 0x4c0ff015e5f96ef4,\n\t0xa41a94cfa270f565, 0x42d76f9cb2326c0b,\n\t0x0cf385dd3c9c23ba, 0x0508a6c7508d6e7a,\n\t0x337523aabbe6cf8d, 0x646bb14001d42b12,\n\t0xc178729d138adc74, 0xf900ef4491f24086,\n\t0xee1a90d334bb5ac4, 0x9755c92247301a50,\n\t0xb999bf7c4ff1b610, 0x6aeeb2f3b21e8fc9,\n\t0x0fa8084cf91ac6ff, 0x10d226cf136e6189,\n\t0xd302057a07d4fb21, 0x5f03800e20a0fcc3,\n\t0x80118d4ae46bd210, 0x58ab61a522843733,\n\t0x51edd575c5432a4b, 0x94ee6ff67f9197f7,\n\t0x765669e0e5e8157b, 0xa5347830737132f0,\n\t0x3ba485a69f01510c, 0x0b247d7b957a01c3,\n\t0x1b3d63449fd807dc, 0x0fdc4721c30ad743,\n\t0x8b535ed3829b2b14, 0xee41d0cad65d232c,\n\t0xe6a99ed97a6a982f, 0x65ac6194c202003d,\n\t0x692accf3a70573eb, 0xcc3c02c3e200d5af,\n\t0x0d419e8b325914a3, 0x320f160f42c25e40,\n\t0x00710d647a51fe7a, 0x3c947692330aed60,\n\t0x9288aa280d355a7a, 0xa1806a9b791d1696,\n\t0x5d60e38496763da1, 0x6c69e22e613fd0f4,\n\t0x977fc2a5aadffb17, 0xfb7bd063fc5a94ba,\n\t0x460c17992cbaece1, 0xf7822c5444d3297f,\n\t0x344a9790c69b74aa, 0xb80a42e6cae09dce,\n\t0x1b1361eaf2b1e757, 0xd84c1e758e236f01,\n\t0x88e0b7be347627cc, 0x45246009b7a99490,\n\t0x8011c6dd3fe50472, 0xc341d682bffb99d7,\n\t0x2511be93808e2d15, 0xd5bc13d7fd739840,\n\t0x2a3cd030679ae1ec, 0x8ad9898a4b9ee157,\n\t0x3245fef0a8eaf521, 0x3d6d8dbbb427d2b0,\n\t0x1ed146d8968b3981, 0x0c6a28bf7d45f3fc,\n\t0x4a1fd3dbcee3c561, 0x4210ff6a476bf67e,\n\t0xa559cce0d9199aac, 0xde39d47ef3723380,\n\t0xe5b69d848ce42e35, 0xefa24296f8e79f52,\n\t0x70190b59db9a5afc, 0x26f166cdb211e7bf,\n\t0x4deaf2df3c6b8ef5, 0xf171dbdd670f1017,\n\t0xb9059b05e9420d90, 0x2f0da855c9388754,\n\t0x611d5e9ab77949cc, 0x2912038ac01163f4,\n\t0x0231df50402b2fba, 0x45660fc4f3245f58,\n\t0xb91cc97c7c8dac50, 0xb72d2aafe4953427,\n\t0xfa6463f87e813d6b, 0x4515f7ee95d5c6a2,\n\t0x1310e1c1a48d21c3, 0xad48a7810cdd8544,\n\t0x4d5bdfefd5c9e631, 0xa43ed43f1fdcb7de,\n\t0xe70cfc8fe1ee9626, 0xef4711b0d8dda442,\n\t0xb80dd9bd4dab6c93, 0xa23be08d31ba4d93,\n\t0x9b37db9d0335a39c, 0x494b6f870f5cfebc,\n\t0x6d1b3c1149dda943, 0x372c943a518c1093,\n\t0xad27af45e77c09c4, 0x3b6f92b646044604,\n\t0xac2917909f5fcf4f, 0x2069a60e977e5557,\n\t0x353a469e71014de5, 0x24be356281f55c15,\n\t0x2b6d710ba8e9adea, 0x404ad1751c749c29,\n\t0xed7311bf23d7f185, 0xba4f6976b4acc43e,\n\t0x32d7198d2bc39000, 0xee667019014d6e01,\n\t0x494ef3e128d14c83, 0x1f95a152baecd6be,\n\t0x201648dff1f483a5, 0x68c28550c8384af6,\n\t0x5fc834a6824a7f48, 0x7cd06cb7365eaf28,\n\t0xd82bbd95e9b30909, 0x234f0d1694c53f6d,\n\t0xd2fb7f4a96d83f4a, 0xff0d5da83acac05e,\n\t0xf8f6b97f5585080a, 0x74236084be57b95b,\n\t0xa25e40c03bbc36ad, 0x6b6e5c14ce88465b,\n\t0x4378ffe93e1528c5, 0x94ca92a17118e2d2,\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/internal/hash/doc.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage hash provides rolling hashes.\n\nRolling hashes have to be used for maintaining the positions of n-byte\nsequences in the dictionary buffer.\n\nThe package provides currently the Rabin-Karp rolling hash and a Cyclic\nPolynomial hash. Both support the Hashes method to be used with an interface.\n*/\npackage hash\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/internal/hash/rabin_karp.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hash\n\n// A is the default constant for Robin-Karp rolling hash. This is a random\n// prime.\nconst A = 0x97b548add41d5da1\n\n// RabinKarp supports the computation of a rolling hash.\ntype RabinKarp struct {\n\tA uint64\n\t// a^n\n\taOldest uint64\n\th       uint64\n\tp       []byte\n\ti       int\n}\n\n// NewRabinKarp creates a new RabinKarp value. The argument n defines the\n// length of the byte sequence to be hashed. The default constant will will be\n// used.\nfunc NewRabinKarp(n int) *RabinKarp {\n\treturn NewRabinKarpConst(n, A)\n}\n\n// NewRabinKarpConst creates a new RabinKarp value. The argument n defines the\n// length of the byte sequence to be hashed. The argument a provides the\n// constant used to compute the hash.\nfunc NewRabinKarpConst(n int, a uint64) *RabinKarp {\n\tif n <= 0 {\n\t\tpanic(\"number of bytes n must be positive\")\n\t}\n\taOldest := uint64(1)\n\t// There are faster methods. For the small n required by the LZMA\n\t// compressor O(n) is sufficient.\n\tfor i := 0; i < n; i++ {\n\t\taOldest *= a\n\t}\n\treturn &RabinKarp{\n\t\tA: a, aOldest: aOldest,\n\t\tp: make([]byte, 0, n),\n\t}\n}\n\n// Len returns the length of the byte sequence.\nfunc (r *RabinKarp) Len() int {\n\treturn cap(r.p)\n}\n\n// RollByte computes the hash after x has been added.\nfunc (r *RabinKarp) RollByte(x byte) uint64 {\n\tif len(r.p) < cap(r.p) {\n\t\tr.h += uint64(x)\n\t\tr.h *= r.A\n\t\tr.p = append(r.p, x)\n\t} else {\n\t\tr.h -= uint64(r.p[r.i]) * r.aOldest\n\t\tr.h += uint64(x)\n\t\tr.h *= r.A\n\t\tr.p[r.i] = x\n\t\tr.i = (r.i + 1) % cap(r.p)\n\t}\n\treturn r.h\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/internal/hash/roller.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hash\n\n// Roller provides an interface for rolling hashes. The hash value will become\n// valid after hash has been called Len times.\ntype Roller interface {\n\tLen() int\n\tRollByte(x byte) uint64\n}\n\n// Hashes computes all hash values for the array p. Note that the state of the\n// roller is changed.\nfunc Hashes(r Roller, p []byte) []uint64 {\n\tn := r.Len()\n\tif len(p) < n {\n\t\treturn nil\n\t}\n\th := make([]uint64, len(p)-n+1)\n\tfor i := 0; i < n-1; i++ {\n\t\tr.RollByte(p[i])\n\t}\n\tfor i := range h {\n\t\th[i] = r.RollByte(p[i+n-1])\n\t}\n\treturn h\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/internal/xlog/xlog.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package xlog provides a simple logging package that allows to disable\n// certain message categories. It defines a type, Logger, with multiple\n// methods for formatting output. The package has also a predefined\n// 'standard' Logger accessible through helper function Print[f|ln],\n// Fatal[f|ln], Panic[f|ln], Warn[f|ln], Print[f|ln] and Debug[f|ln]\n// that are easier to use then creating a Logger manually. That logger\n// writes to standard error and prints the date and time of each logged\n// message, which can be configured using the function SetFlags.\n//\n// The Fatal functions call os.Exit(1) after the message is output\n// unless not suppressed by the flags. The Panic functions call panic\n// after the writing the log message unless suppressed.\npackage xlog\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"sync\"\n\t\"time\"\n)\n\n// The flags define what information is prefixed to each log entry\n// generated by the Logger. The Lno* versions allow the suppression of\n// specific output. The bits are or'ed together to control what will be\n// printed. There is no control over the order of the items printed and\n// the format. The full format is:\n//\n//\t2009-01-23 01:23:23.123123 /a/b/c/d.go:23: message\nconst (\n\tLdate         = 1 << iota // the date: 2009-01-23\n\tLtime                     // the time: 01:23:23\n\tLmicroseconds             // microsecond resolution: 01:23:23.123123\n\tLlongfile                 // full file name and line number: /a/b/c/d.go:23\n\tLshortfile                // final file name element and line number: d.go:23\n\tLnopanic                  // suppresses output from Panic[f|ln] but not the panic call\n\tLnofatal                  // suppresses output from Fatal[f|ln] but not the exit\n\tLnowarn                   // suppresses output from Warn[f|ln]\n\tLnoprint                  // suppresses output from Print[f|ln]\n\tLnodebug                  // suppresses output from Debug[f|ln]\n\t// initial values for the standard logger\n\tLstdflags = Ldate | Ltime | Lnodebug\n)\n\n// A Logger represents an active logging object that generates lines of\n// output to an io.Writer. Each logging operation if not suppressed\n// makes a single call to the Writer's Write method. A Logger can be\n// used simultaneously from multiple goroutines; it guarantees to\n// serialize access to the Writer.\ntype Logger struct {\n\tmu sync.Mutex // ensures atomic writes; and protects the following\n\t// fields\n\tprefix string    // prefix to write at beginning of each line\n\tflag   int       // properties\n\tout    io.Writer // destination for output\n\tbuf    []byte    // for accumulating text to write\n}\n\n// New creates a new Logger. The out argument sets the destination to\n// which the log output will be written. The prefix appears at the\n// beginning of each log line. The flag argument defines the logging\n// properties.\nfunc New(out io.Writer, prefix string, flag int) *Logger {\n\treturn &Logger{out: out, prefix: prefix, flag: flag}\n}\n\n// std is the standard logger used by the package scope functions.\nvar std = New(os.Stderr, \"\", Lstdflags)\n\n// itoa converts the integer to ASCII. A negative widths will avoid\n// zero-padding. The function supports only non-negative integers.\nfunc itoa(buf *[]byte, i int, wid int) {\n\tvar u = uint(i)\n\tif u == 0 && wid <= 1 {\n\t\t*buf = append(*buf, '0')\n\t\treturn\n\t}\n\tvar b [32]byte\n\tbp := len(b)\n\tfor ; u > 0 || wid > 0; u /= 10 {\n\t\tbp--\n\t\twid--\n\t\tb[bp] = byte(u%10) + '0'\n\t}\n\t*buf = append(*buf, b[bp:]...)\n}\n\n// formatHeader puts the header into the buf field of the buffer.\nfunc (l *Logger) formatHeader(t time.Time, file string, line int) {\n\tl.buf = append(l.buf, l.prefix...)\n\tif l.flag&(Ldate|Ltime|Lmicroseconds) != 0 {\n\t\tif l.flag&Ldate != 0 {\n\t\t\tyear, month, day := t.Date()\n\t\t\titoa(&l.buf, year, 4)\n\t\t\tl.buf = append(l.buf, '-')\n\t\t\titoa(&l.buf, int(month), 2)\n\t\t\tl.buf = append(l.buf, '-')\n\t\t\titoa(&l.buf, day, 2)\n\t\t\tl.buf = append(l.buf, ' ')\n\t\t}\n\t\tif l.flag&(Ltime|Lmicroseconds) != 0 {\n\t\t\thour, min, sec := t.Clock()\n\t\t\titoa(&l.buf, hour, 2)\n\t\t\tl.buf = append(l.buf, ':')\n\t\t\titoa(&l.buf, min, 2)\n\t\t\tl.buf = append(l.buf, ':')\n\t\t\titoa(&l.buf, sec, 2)\n\t\t\tif l.flag&Lmicroseconds != 0 {\n\t\t\t\tl.buf = append(l.buf, '.')\n\t\t\t\titoa(&l.buf, t.Nanosecond()/1e3, 6)\n\t\t\t}\n\t\t\tl.buf = append(l.buf, ' ')\n\t\t}\n\t}\n\tif l.flag&(Lshortfile|Llongfile) != 0 {\n\t\tif l.flag&Lshortfile != 0 {\n\t\t\tshort := file\n\t\t\tfor i := len(file) - 1; i > 0; i-- {\n\t\t\t\tif file[i] == '/' {\n\t\t\t\t\tshort = file[i+1:]\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile = short\n\t\t}\n\t\tl.buf = append(l.buf, file...)\n\t\tl.buf = append(l.buf, ':')\n\t\titoa(&l.buf, line, -1)\n\t\tl.buf = append(l.buf, \": \"...)\n\t}\n}\n\nfunc (l *Logger) output(calldepth int, now time.Time, s string) error {\n\tvar file string\n\tvar line int\n\tif l.flag&(Lshortfile|Llongfile) != 0 {\n\t\tl.mu.Unlock()\n\t\tvar ok bool\n\t\t_, file, line, ok = runtime.Caller(calldepth)\n\t\tif !ok {\n\t\t\tfile = \"???\"\n\t\t\tline = 0\n\t\t}\n\t\tl.mu.Lock()\n\t}\n\tl.buf = l.buf[:0]\n\tl.formatHeader(now, file, line)\n\tl.buf = append(l.buf, s...)\n\tif len(s) == 0 || s[len(s)-1] != '\\n' {\n\t\tl.buf = append(l.buf, '\\n')\n\t}\n\t_, err := l.out.Write(l.buf)\n\treturn err\n}\n\n// Output writes the string s with the header controlled by the flags to\n// the l.out writer. A newline will be appended if s doesn't end in a\n// newline. Calldepth is used to recover the PC, although all current\n// calls of Output use the call depth 2. Access to the function is serialized.\nfunc (l *Logger) Output(calldepth, noflag int, v ...interface{}) error {\n\tnow := time.Now()\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tif l.flag&noflag != 0 {\n\t\treturn nil\n\t}\n\ts := fmt.Sprint(v...)\n\treturn l.output(calldepth+1, now, s)\n}\n\n// Outputf works like output but formats the output like Printf.\nfunc (l *Logger) Outputf(calldepth int, noflag int, format string, v ...interface{}) error {\n\tnow := time.Now()\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tif l.flag&noflag != 0 {\n\t\treturn nil\n\t}\n\ts := fmt.Sprintf(format, v...)\n\treturn l.output(calldepth+1, now, s)\n}\n\n// Outputln works like output but formats the output like Println.\nfunc (l *Logger) Outputln(calldepth int, noflag int, v ...interface{}) error {\n\tnow := time.Now()\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tif l.flag&noflag != 0 {\n\t\treturn nil\n\t}\n\ts := fmt.Sprintln(v...)\n\treturn l.output(calldepth+1, now, s)\n}\n\n// Panic prints the message like Print and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc (l *Logger) Panic(v ...interface{}) {\n\tl.Output(2, Lnopanic, v...)\n\ts := fmt.Sprint(v...)\n\tpanic(s)\n}\n\n// Panic prints the message like Print and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc Panic(v ...interface{}) {\n\tstd.Output(2, Lnopanic, v...)\n\ts := fmt.Sprint(v...)\n\tpanic(s)\n}\n\n// Panicf prints the message like Printf and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc (l *Logger) Panicf(format string, v ...interface{}) {\n\tl.Outputf(2, Lnopanic, format, v...)\n\ts := fmt.Sprintf(format, v...)\n\tpanic(s)\n}\n\n// Panicf prints the message like Printf and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc Panicf(format string, v ...interface{}) {\n\tstd.Outputf(2, Lnopanic, format, v...)\n\ts := fmt.Sprintf(format, v...)\n\tpanic(s)\n}\n\n// Panicln prints the message like Println and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc (l *Logger) Panicln(v ...interface{}) {\n\tl.Outputln(2, Lnopanic, v...)\n\ts := fmt.Sprintln(v...)\n\tpanic(s)\n}\n\n// Panicln prints the message like Println and calls panic. The printing\n// might be suppressed by the flag Lnopanic.\nfunc Panicln(v ...interface{}) {\n\tstd.Outputln(2, Lnopanic, v...)\n\ts := fmt.Sprintln(v...)\n\tpanic(s)\n}\n\n// Fatal prints the message like Print and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc (l *Logger) Fatal(v ...interface{}) {\n\tl.Output(2, Lnofatal, v...)\n\tos.Exit(1)\n}\n\n// Fatal prints the message like Print and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc Fatal(v ...interface{}) {\n\tstd.Output(2, Lnofatal, v...)\n\tos.Exit(1)\n}\n\n// Fatalf prints the message like Printf and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc (l *Logger) Fatalf(format string, v ...interface{}) {\n\tl.Outputf(2, Lnofatal, format, v...)\n\tos.Exit(1)\n}\n\n// Fatalf prints the message like Printf and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc Fatalf(format string, v ...interface{}) {\n\tstd.Outputf(2, Lnofatal, format, v...)\n\tos.Exit(1)\n}\n\n// Fatalln prints the message like Println and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc (l *Logger) Fatalln(format string, v ...interface{}) {\n\tl.Outputln(2, Lnofatal, v...)\n\tos.Exit(1)\n}\n\n// Fatalln prints the message like Println and calls os.Exit(1). The\n// printing might be suppressed by the flag Lnofatal.\nfunc Fatalln(format string, v ...interface{}) {\n\tstd.Outputln(2, Lnofatal, v...)\n\tos.Exit(1)\n}\n\n// Warn prints the message like Print. The printing might be suppressed\n// by the flag Lnowarn.\nfunc (l *Logger) Warn(v ...interface{}) {\n\tl.Output(2, Lnowarn, v...)\n}\n\n// Warn prints the message like Print. The printing might be suppressed\n// by the flag Lnowarn.\nfunc Warn(v ...interface{}) {\n\tstd.Output(2, Lnowarn, v...)\n}\n\n// Warnf prints the message like Printf. The printing might be suppressed\n// by the flag Lnowarn.\nfunc (l *Logger) Warnf(format string, v ...interface{}) {\n\tl.Outputf(2, Lnowarn, format, v...)\n}\n\n// Warnf prints the message like Printf. The printing might be suppressed\n// by the flag Lnowarn.\nfunc Warnf(format string, v ...interface{}) {\n\tstd.Outputf(2, Lnowarn, format, v...)\n}\n\n// Warnln prints the message like Println. The printing might be suppressed\n// by the flag Lnowarn.\nfunc (l *Logger) Warnln(v ...interface{}) {\n\tl.Outputln(2, Lnowarn, v...)\n}\n\n// Warnln prints the message like Println. The printing might be suppressed\n// by the flag Lnowarn.\nfunc Warnln(v ...interface{}) {\n\tstd.Outputln(2, Lnowarn, v...)\n}\n\n// Print prints the message like fmt.Print. The printing might be suppressed\n// by the flag Lnoprint.\nfunc (l *Logger) Print(v ...interface{}) {\n\tl.Output(2, Lnoprint, v...)\n}\n\n// Print prints the message like fmt.Print. The printing might be suppressed\n// by the flag Lnoprint.\nfunc Print(v ...interface{}) {\n\tstd.Output(2, Lnoprint, v...)\n}\n\n// Printf prints the message like fmt.Printf. The printing might be suppressed\n// by the flag Lnoprint.\nfunc (l *Logger) Printf(format string, v ...interface{}) {\n\tl.Outputf(2, Lnoprint, format, v...)\n}\n\n// Printf prints the message like fmt.Printf. The printing might be suppressed\n// by the flag Lnoprint.\nfunc Printf(format string, v ...interface{}) {\n\tstd.Outputf(2, Lnoprint, format, v...)\n}\n\n// Println prints the message like fmt.Println. The printing might be\n// suppressed by the flag Lnoprint.\nfunc (l *Logger) Println(v ...interface{}) {\n\tl.Outputln(2, Lnoprint, v...)\n}\n\n// Println prints the message like fmt.Println. The printing might be\n// suppressed by the flag Lnoprint.\nfunc Println(v ...interface{}) {\n\tstd.Outputln(2, Lnoprint, v...)\n}\n\n// Debug prints the message like Print. The printing might be suppressed\n// by the flag Lnodebug.\nfunc (l *Logger) Debug(v ...interface{}) {\n\tl.Output(2, Lnodebug, v...)\n}\n\n// Debug prints the message like Print. The printing might be suppressed\n// by the flag Lnodebug.\nfunc Debug(v ...interface{}) {\n\tstd.Output(2, Lnodebug, v...)\n}\n\n// Debugf prints the message like Printf. The printing might be suppressed\n// by the flag Lnodebug.\nfunc (l *Logger) Debugf(format string, v ...interface{}) {\n\tl.Outputf(2, Lnodebug, format, v...)\n}\n\n// Debugf prints the message like Printf. The printing might be suppressed\n// by the flag Lnodebug.\nfunc Debugf(format string, v ...interface{}) {\n\tstd.Outputf(2, Lnodebug, format, v...)\n}\n\n// Debugln prints the message like Println. The printing might be suppressed\n// by the flag Lnodebug.\nfunc (l *Logger) Debugln(v ...interface{}) {\n\tl.Outputln(2, Lnodebug, v...)\n}\n\n// Debugln prints the message like Println. The printing might be suppressed\n// by the flag Lnodebug.\nfunc Debugln(v ...interface{}) {\n\tstd.Outputln(2, Lnodebug, v...)\n}\n\n// Flags returns the current flags used by the logger.\nfunc (l *Logger) Flags() int {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\treturn l.flag\n}\n\n// Flags returns the current flags used by the standard logger.\nfunc Flags() int {\n\treturn std.Flags()\n}\n\n// SetFlags sets the flags of the logger.\nfunc (l *Logger) SetFlags(flag int) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.flag = flag\n}\n\n// SetFlags sets the flags for the standard logger.\nfunc SetFlags(flag int) {\n\tstd.SetFlags(flag)\n}\n\n// Prefix returns the prefix used by the logger.\nfunc (l *Logger) Prefix() string {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\treturn l.prefix\n}\n\n// Prefix returns the prefix used by the standard logger of the package.\nfunc Prefix() string {\n\treturn std.Prefix()\n}\n\n// SetPrefix sets the prefix for the logger.\nfunc (l *Logger) SetPrefix(prefix string) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.prefix = prefix\n}\n\n// SetPrefix sets the prefix of the standard logger of the package.\nfunc SetPrefix(prefix string) {\n\tstd.SetPrefix(prefix)\n}\n\n// SetOutput sets the output of the logger.\nfunc (l *Logger) SetOutput(w io.Writer) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.out = w\n}\n\n// SetOutput sets the output for the standard logger of the package.\nfunc SetOutput(w io.Writer) {\n\tstd.SetOutput(w)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/bintree.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"unicode\"\n)\n\n// node represents a node in the binary tree.\ntype node struct {\n\t// x is the search value\n\tx uint32\n\t// p parent node\n\tp uint32\n\t// l left child\n\tl uint32\n\t// r right child\n\tr uint32\n}\n\n// wordLen is the number of bytes represented by the v field of a node.\nconst wordLen = 4\n\n// binTree supports the identification of the next operation based on a\n// binary tree.\n//\n// Nodes will be identified by their index into the ring buffer.\ntype binTree struct {\n\tdict *encoderDict\n\t// ring buffer of nodes\n\tnode []node\n\t// absolute offset of the entry for the next node. Position 4\n\t// byte larger.\n\thoff int64\n\t// front position in the node ring buffer\n\tfront uint32\n\t// index of the root node\n\troot uint32\n\t// current x value\n\tx uint32\n\t// preallocated array\n\tdata []byte\n}\n\n// null represents the nonexistent index. We can't use zero because it\n// would always exist or we would need to decrease the index for each\n// reference.\nconst null uint32 = 1<<32 - 1\n\n// newBinTree initializes the binTree structure. The capacity defines\n// the size of the buffer and defines the maximum distance for which\n// matches will be found.\nfunc newBinTree(capacity int) (t *binTree, err error) {\n\tif capacity < 1 {\n\t\treturn nil, errors.New(\n\t\t\t\"newBinTree: capacity must be larger than zero\")\n\t}\n\tif int64(capacity) >= int64(null) {\n\t\treturn nil, errors.New(\n\t\t\t\"newBinTree: capacity must less 2^{32}-1\")\n\t}\n\tt = &binTree{\n\t\tnode: make([]node, capacity),\n\t\thoff: -int64(wordLen),\n\t\troot: null,\n\t\tdata: make([]byte, maxMatchLen),\n\t}\n\treturn t, nil\n}\n\nfunc (t *binTree) SetDict(d *encoderDict) { t.dict = d }\n\n// WriteByte writes a single byte into the binary tree.\nfunc (t *binTree) WriteByte(c byte) error {\n\tt.x = (t.x << 8) | uint32(c)\n\tt.hoff++\n\tif t.hoff < 0 {\n\t\treturn nil\n\t}\n\tv := t.front\n\tif int64(v) < t.hoff {\n\t\t// We are overwriting old nodes stored in the tree.\n\t\tt.remove(v)\n\t}\n\tt.node[v].x = t.x\n\tt.add(v)\n\tt.front++\n\tif int64(t.front) >= int64(len(t.node)) {\n\t\tt.front = 0\n\t}\n\treturn nil\n}\n\n// Writes writes a sequence of bytes into the binTree structure.\nfunc (t *binTree) Write(p []byte) (n int, err error) {\n\tfor _, c := range p {\n\t\tt.WriteByte(c)\n\t}\n\treturn len(p), nil\n}\n\n// add puts the node v into the tree. The node must not be part of the\n// tree before.\nfunc (t *binTree) add(v uint32) {\n\tvn := &t.node[v]\n\t// Set left and right to null indices.\n\tvn.l, vn.r = null, null\n\t// If the binary tree is empty make v the root.\n\tif t.root == null {\n\t\tt.root = v\n\t\tvn.p = null\n\t\treturn\n\t}\n\tx := vn.x\n\tp := t.root\n\t// Search for the right leave link and add the new node.\n\tfor {\n\t\tpn := &t.node[p]\n\t\tif x <= pn.x {\n\t\t\tif pn.l == null {\n\t\t\t\tpn.l = v\n\t\t\t\tvn.p = p\n\t\t\t\treturn\n\t\t\t}\n\t\t\tp = pn.l\n\t\t} else {\n\t\t\tif pn.r == null {\n\t\t\t\tpn.r = v\n\t\t\t\tvn.p = p\n\t\t\t\treturn\n\t\t\t}\n\t\t\tp = pn.r\n\t\t}\n\t}\n}\n\n// parent returns the parent node index of v and the pointer to v value\n// in the parent.\nfunc (t *binTree) parent(v uint32) (p uint32, ptr *uint32) {\n\tif t.root == v {\n\t\treturn null, &t.root\n\t}\n\tp = t.node[v].p\n\tif t.node[p].l == v {\n\t\tptr = &t.node[p].l\n\t} else {\n\t\tptr = &t.node[p].r\n\t}\n\treturn\n}\n\n// Remove node v.\nfunc (t *binTree) remove(v uint32) {\n\tvn := &t.node[v]\n\tp, ptr := t.parent(v)\n\tl, r := vn.l, vn.r\n\tif l == null {\n\t\t// Move the right child up.\n\t\t*ptr = r\n\t\tif r != null {\n\t\t\tt.node[r].p = p\n\t\t}\n\t\treturn\n\t}\n\tif r == null {\n\t\t// Move the left child up.\n\t\t*ptr = l\n\t\tt.node[l].p = p\n\t\treturn\n\t}\n\n\t// Search the in-order predecessor u.\n\tun := &t.node[l]\n\tur := un.r\n\tif ur == null {\n\t\t// In order predecessor is l. Move it up.\n\t\tun.r = r\n\t\tt.node[r].p = l\n\t\tun.p = p\n\t\t*ptr = l\n\t\treturn\n\t}\n\tvar u uint32\n\tfor {\n\t\t// Look for the max value in the tree where l is root.\n\t\tu = ur\n\t\tur = t.node[u].r\n\t\tif ur == null {\n\t\t\tbreak\n\t\t}\n\t}\n\t// replace u with ul\n\tun = &t.node[u]\n\tul := un.l\n\tup := un.p\n\tt.node[up].r = ul\n\tif ul != null {\n\t\tt.node[ul].p = up\n\t}\n\n\t// replace v by u\n\tun.l, un.r = l, r\n\tt.node[l].p = u\n\tt.node[r].p = u\n\t*ptr = u\n\tun.p = p\n}\n\n// search looks for the node that have the value x or for the nodes that\n// brace it. The node highest in the tree with the value x will be\n// returned. All other nodes with the same value live in left subtree of\n// the returned node.\nfunc (t *binTree) search(v uint32, x uint32) (a, b uint32) {\n\ta, b = null, null\n\tif v == null {\n\t\treturn\n\t}\n\tfor {\n\t\tvn := &t.node[v]\n\t\tif x <= vn.x {\n\t\t\tif x == vn.x {\n\t\t\t\treturn v, v\n\t\t\t}\n\t\t\tb = v\n\t\t\tif vn.l == null {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tv = vn.l\n\t\t} else {\n\t\t\ta = v\n\t\t\tif vn.r == null {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tv = vn.r\n\t\t}\n\t}\n}\n\n// max returns the node with maximum value in the subtree with v as\n// root.\nfunc (t *binTree) max(v uint32) uint32 {\n\tif v == null {\n\t\treturn null\n\t}\n\tfor {\n\t\tr := t.node[v].r\n\t\tif r == null {\n\t\t\treturn v\n\t\t}\n\t\tv = r\n\t}\n}\n\n// min returns the node with the minimum value in the subtree with v as\n// root.\nfunc (t *binTree) min(v uint32) uint32 {\n\tif v == null {\n\t\treturn null\n\t}\n\tfor {\n\t\tl := t.node[v].l\n\t\tif l == null {\n\t\t\treturn v\n\t\t}\n\t\tv = l\n\t}\n}\n\n// pred returns the in-order predecessor of node v.\nfunc (t *binTree) pred(v uint32) uint32 {\n\tif v == null {\n\t\treturn null\n\t}\n\tu := t.max(t.node[v].l)\n\tif u != null {\n\t\treturn u\n\t}\n\tfor {\n\t\tp := t.node[v].p\n\t\tif p == null {\n\t\t\treturn null\n\t\t}\n\t\tif t.node[p].r == v {\n\t\t\treturn p\n\t\t}\n\t\tv = p\n\t}\n}\n\n// succ returns the in-order successor of node v.\nfunc (t *binTree) succ(v uint32) uint32 {\n\tif v == null {\n\t\treturn null\n\t}\n\tu := t.min(t.node[v].r)\n\tif u != null {\n\t\treturn u\n\t}\n\tfor {\n\t\tp := t.node[v].p\n\t\tif p == null {\n\t\t\treturn null\n\t\t}\n\t\tif t.node[p].l == v {\n\t\t\treturn p\n\t\t}\n\t\tv = p\n\t}\n}\n\n// xval converts the first four bytes of a into an 32-bit unsigned\n// integer in big-endian order.\nfunc xval(a []byte) uint32 {\n\tvar x uint32\n\tswitch len(a) {\n\tdefault:\n\t\tx |= uint32(a[3])\n\t\tfallthrough\n\tcase 3:\n\t\tx |= uint32(a[2]) << 8\n\t\tfallthrough\n\tcase 2:\n\t\tx |= uint32(a[1]) << 16\n\t\tfallthrough\n\tcase 1:\n\t\tx |= uint32(a[0]) << 24\n\tcase 0:\n\t}\n\treturn x\n}\n\n// dumpX converts value x into a four-letter string.\nfunc dumpX(x uint32) string {\n\ta := make([]byte, 4)\n\tfor i := 0; i < 4; i++ {\n\t\tc := byte(x >> uint((3-i)*8))\n\t\tif unicode.IsGraphic(rune(c)) {\n\t\t\ta[i] = c\n\t\t} else {\n\t\t\ta[i] = '.'\n\t\t}\n\t}\n\treturn string(a)\n}\n\n/*\n// dumpNode writes a representation of the node v into the io.Writer.\nfunc (t *binTree) dumpNode(w io.Writer, v uint32, indent int) {\n\tif v == null {\n\t\treturn\n\t}\n\n\tvn := &t.node[v]\n\n\tt.dumpNode(w, vn.r, indent+2)\n\n\tfor i := 0; i < indent; i++ {\n\t\tfmt.Fprint(w, \" \")\n\t}\n\tif vn.p == null {\n\t\tfmt.Fprintf(w, \"node %d %q parent null\\n\", v, dumpX(vn.x))\n\t} else {\n\t\tfmt.Fprintf(w, \"node %d %q parent %d\\n\", v, dumpX(vn.x), vn.p)\n\t}\n\n\tt.dumpNode(w, vn.l, indent+2)\n}\n\n// dump prints a representation of the binary tree into the writer.\nfunc (t *binTree) dump(w io.Writer) error {\n\tbw := bufio.NewWriter(w)\n\tt.dumpNode(bw, t.root, 0)\n\treturn bw.Flush()\n}\n*/\n\nfunc (t *binTree) distance(v uint32) int {\n\tdist := int(t.front) - int(v)\n\tif dist <= 0 {\n\t\tdist += len(t.node)\n\t}\n\treturn dist\n}\n\ntype matchParams struct {\n\trep [4]uint32\n\t// length when match will be accepted\n\tnAccept int\n\t// nodes to check\n\tcheck int\n\t// finish if length get shorter\n\tstopShorter bool\n}\n\nfunc (t *binTree) match(m match, distIter func() (int, bool), p matchParams,\n) (r match, checked int, accepted bool) {\n\tbuf := &t.dict.buf\n\tfor {\n\t\tif checked >= p.check {\n\t\t\treturn m, checked, true\n\t\t}\n\t\tdist, ok := distIter()\n\t\tif !ok {\n\t\t\treturn m, checked, false\n\t\t}\n\t\tchecked++\n\t\tif m.n > 0 {\n\t\t\ti := buf.rear - dist + m.n - 1\n\t\t\tif i < 0 {\n\t\t\t\ti += len(buf.data)\n\t\t\t} else if i >= len(buf.data) {\n\t\t\t\ti -= len(buf.data)\n\t\t\t}\n\t\t\tif buf.data[i] != t.data[m.n-1] {\n\t\t\t\tif p.stopShorter {\n\t\t\t\t\treturn m, checked, false\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tn := buf.matchLen(dist, t.data)\n\t\tswitch n {\n\t\tcase 0:\n\t\t\tif p.stopShorter {\n\t\t\t\treturn m, checked, false\n\t\t\t}\n\t\t\tcontinue\n\t\tcase 1:\n\t\t\tif uint32(dist-minDistance) != p.rep[0] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tif n < m.n || (n == m.n && int64(dist) >= m.distance) {\n\t\t\tcontinue\n\t\t}\n\t\tm = match{int64(dist), n}\n\t\tif n >= p.nAccept {\n\t\t\treturn m, checked, true\n\t\t}\n\t}\n}\n\nfunc (t *binTree) NextOp(rep [4]uint32) operation {\n\t// retrieve maxMatchLen data\n\tn, _ := t.dict.buf.Peek(t.data[:maxMatchLen])\n\tif n == 0 {\n\t\tpanic(\"no data in buffer\")\n\t}\n\tt.data = t.data[:n]\n\n\tvar (\n\t\tm                  match\n\t\tx, u, v            uint32\n\t\titerPred, iterSucc func() (int, bool)\n\t)\n\tp := matchParams{\n\t\trep:     rep,\n\t\tnAccept: maxMatchLen,\n\t\tcheck:   32,\n\t}\n\ti := 4\n\titerSmall := func() (dist int, ok bool) {\n\t\ti--\n\t\tif i <= 0 {\n\t\t\treturn 0, false\n\t\t}\n\t\treturn i, true\n\t}\n\tm, checked, accepted := t.match(m, iterSmall, p)\n\tif accepted {\n\t\tgoto end\n\t}\n\tp.check -= checked\n\tx = xval(t.data)\n\tu, v = t.search(t.root, x)\n\tif u == v && len(t.data) == 4 {\n\t\titer := func() (dist int, ok bool) {\n\t\t\tif u == null {\n\t\t\t\treturn 0, false\n\t\t\t}\n\t\t\tdist = t.distance(u)\n\t\t\tu, v = t.search(t.node[u].l, x)\n\t\t\tif u != v {\n\t\t\t\tu = null\n\t\t\t}\n\t\t\treturn dist, true\n\t\t}\n\t\tm, _, _ = t.match(m, iter, p)\n\t\tgoto end\n\t}\n\tp.stopShorter = true\n\titerSucc = func() (dist int, ok bool) {\n\t\tif v == null {\n\t\t\treturn 0, false\n\t\t}\n\t\tdist = t.distance(v)\n\t\tv = t.succ(v)\n\t\treturn dist, true\n\t}\n\tm, checked, accepted = t.match(m, iterSucc, p)\n\tif accepted {\n\t\tgoto end\n\t}\n\tp.check -= checked\n\titerPred = func() (dist int, ok bool) {\n\t\tif u == null {\n\t\t\treturn 0, false\n\t\t}\n\t\tdist = t.distance(u)\n\t\tu = t.pred(u)\n\t\treturn dist, true\n\t}\n\tm, _, _ = t.match(m, iterPred, p)\nend:\n\tif m.n == 0 {\n\t\treturn lit{t.data[0]}\n\t}\n\treturn m\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/bitops.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n/* Naming conventions follows the CodeReviewComments in the Go Wiki. */\n\n// ntz32Const is used by the functions NTZ and NLZ.\nconst ntz32Const = 0x04d7651f\n\n// ntz32Table is a helper table for de Bruijn algorithm by Danny Dubé.\n// See Henry S. Warren, Jr. \"Hacker's Delight\" section 5-1 figure 5-26.\nvar ntz32Table = [32]int8{\n\t0, 1, 2, 24, 3, 19, 6, 25,\n\t22, 4, 20, 10, 16, 7, 12, 26,\n\t31, 23, 18, 5, 21, 9, 15, 11,\n\t30, 17, 8, 14, 29, 13, 28, 27,\n}\n\n/*\n// ntz32 computes the number of trailing zeros for an unsigned 32-bit integer.\nfunc ntz32(x uint32) int {\n\tif x == 0 {\n\t\treturn 32\n\t}\n\tx = (x & -x) * ntz32Const\n\treturn int(ntz32Table[x>>27])\n}\n*/\n\n// nlz32 computes the number of leading zeros for an unsigned 32-bit integer.\nfunc nlz32(x uint32) int {\n\t// Smear left most bit to the right\n\tx |= x >> 1\n\tx |= x >> 2\n\tx |= x >> 4\n\tx |= x >> 8\n\tx |= x >> 16\n\t// Use ntz mechanism to calculate nlz.\n\tx++\n\tif x == 0 {\n\t\treturn 0\n\t}\n\tx *= ntz32Const\n\treturn 32 - int(ntz32Table[x>>27])\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/breader.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// breader provides the ReadByte function for a Reader. It doesn't read\n// more data from the reader than absolutely necessary.\ntype breader struct {\n\tio.Reader\n\t// helper slice to save allocations\n\tp []byte\n}\n\n// ByteReader converts an io.Reader into an io.ByteReader.\nfunc ByteReader(r io.Reader) io.ByteReader {\n\tbr, ok := r.(io.ByteReader)\n\tif !ok {\n\t\treturn &breader{r, make([]byte, 1)}\n\t}\n\treturn br\n}\n\n// ReadByte read byte function.\nfunc (r *breader) ReadByte() (c byte, err error) {\n\tn, err := r.Reader.Read(r.p)\n\tif n < 1 {\n\t\tif err == nil {\n\t\t\terr = errors.New(\"breader.ReadByte: no data\")\n\t\t}\n\t\treturn 0, err\n\t}\n\treturn r.p[0], nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/buffer.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n)\n\n// buffer provides a circular buffer of bytes. If the front index equals\n// the rear index the buffer is empty. As a consequence front cannot be\n// equal rear for a full buffer. So a full buffer has a length that is\n// one byte less the the length of the data slice.\ntype buffer struct {\n\tdata  []byte\n\tfront int\n\trear  int\n}\n\n// newBuffer creates a buffer with the given size.\nfunc newBuffer(size int) *buffer {\n\treturn &buffer{data: make([]byte, size+1)}\n}\n\n// Cap returns the capacity of the buffer.\nfunc (b *buffer) Cap() int {\n\treturn len(b.data) - 1\n}\n\n// Resets the buffer. The front and rear index are set to zero.\nfunc (b *buffer) Reset() {\n\tb.front = 0\n\tb.rear = 0\n}\n\n// Buffered returns the number of bytes buffered.\nfunc (b *buffer) Buffered() int {\n\tdelta := b.front - b.rear\n\tif delta < 0 {\n\t\tdelta += len(b.data)\n\t}\n\treturn delta\n}\n\n// Available returns the number of bytes available for writing.\nfunc (b *buffer) Available() int {\n\tdelta := b.rear - 1 - b.front\n\tif delta < 0 {\n\t\tdelta += len(b.data)\n\t}\n\treturn delta\n}\n\n// addIndex adds a non-negative integer to the index i and returns the\n// resulting index. The function takes care of wrapping the index as\n// well as potential overflow situations.\nfunc (b *buffer) addIndex(i int, n int) int {\n\t// subtraction of len(b.data) prevents overflow\n\ti += n - len(b.data)\n\tif i < 0 {\n\t\ti += len(b.data)\n\t}\n\treturn i\n}\n\n// Read reads bytes from the buffer into p and returns the number of\n// bytes read. The function never returns an error but might return less\n// data than requested.\nfunc (b *buffer) Read(p []byte) (n int, err error) {\n\tn, err = b.Peek(p)\n\tb.rear = b.addIndex(b.rear, n)\n\treturn n, err\n}\n\n// Peek reads bytes from the buffer into p without changing the buffer.\n// Peek will never return an error but might return less data than\n// requested.\nfunc (b *buffer) Peek(p []byte) (n int, err error) {\n\tm := b.Buffered()\n\tn = len(p)\n\tif m < n {\n\t\tn = m\n\t\tp = p[:n]\n\t}\n\tk := copy(p, b.data[b.rear:])\n\tif k < n {\n\t\tcopy(p[k:], b.data)\n\t}\n\treturn n, nil\n}\n\n// Discard skips the n next bytes to read from the buffer, returning the\n// bytes discarded.\n//\n// If Discards skips fewer than n bytes, it returns an error.\nfunc (b *buffer) Discard(n int) (discarded int, err error) {\n\tif n < 0 {\n\t\treturn 0, errors.New(\"buffer.Discard: negative argument\")\n\t}\n\tm := b.Buffered()\n\tif m < n {\n\t\tn = m\n\t\terr = errors.New(\n\t\t\t\"buffer.Discard: discarded less bytes then requested\")\n\t}\n\tb.rear = b.addIndex(b.rear, n)\n\treturn n, err\n}\n\n// ErrNoSpace indicates that there is insufficient space for the Write\n// operation.\nvar ErrNoSpace = errors.New(\"insufficient space\")\n\n// Write puts data into the  buffer. If less bytes are written than\n// requested ErrNoSpace is returned.\nfunc (b *buffer) Write(p []byte) (n int, err error) {\n\tm := b.Available()\n\tn = len(p)\n\tif m < n {\n\t\tn = m\n\t\tp = p[:m]\n\t\terr = ErrNoSpace\n\t}\n\tk := copy(b.data[b.front:], p)\n\tif k < n {\n\t\tcopy(b.data, p[k:])\n\t}\n\tb.front = b.addIndex(b.front, n)\n\treturn n, err\n}\n\n// WriteByte writes a single byte into the buffer. The error ErrNoSpace\n// is returned if no single byte is available in the buffer for writing.\nfunc (b *buffer) WriteByte(c byte) error {\n\tif b.Available() < 1 {\n\t\treturn ErrNoSpace\n\t}\n\tb.data[b.front] = c\n\tb.front = b.addIndex(b.front, 1)\n\treturn nil\n}\n\n// prefixLen returns the length of the common prefix of a and b.\nfunc prefixLen(a, b []byte) int {\n\tif len(a) > len(b) {\n\t\ta, b = b, a\n\t}\n\tfor i, c := range a {\n\t\tif b[i] != c {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn len(a)\n}\n\n// matchLen returns the length of the common prefix for the given\n// distance from the rear and the byte slice p.\nfunc (b *buffer) matchLen(distance int, p []byte) int {\n\tvar n int\n\ti := b.rear - distance\n\tif i < 0 {\n\t\tif n = prefixLen(p, b.data[len(b.data)+i:]); n < -i {\n\t\t\treturn n\n\t\t}\n\t\tp = p[n:]\n\t\ti = 0\n\t}\n\tn += prefixLen(p, b.data[i:])\n\treturn n\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/bytewriter.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// ErrLimit indicates that the limit of the LimitedByteWriter has been\n// reached.\nvar ErrLimit = errors.New(\"limit reached\")\n\n// LimitedByteWriter provides a byte writer that can be written until a\n// limit is reached. The field N provides the number of remaining\n// bytes.\ntype LimitedByteWriter struct {\n\tBW io.ByteWriter\n\tN  int64\n}\n\n// WriteByte writes a single byte to the limited byte writer. It returns\n// ErrLimit if the limit has been reached. If the byte is successfully\n// written the field N of the LimitedByteWriter will be decremented by\n// one.\nfunc (l *LimitedByteWriter) WriteByte(c byte) error {\n\tif l.N <= 0 {\n\t\treturn ErrLimit\n\t}\n\tif err := l.BW.WriteByte(c); err != nil {\n\t\treturn err\n\t}\n\tl.N--\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/decoder.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// decoder decodes a raw LZMA stream without any header.\ntype decoder struct {\n\t// dictionary; the rear pointer of the buffer will be used for\n\t// reading the data.\n\tDict *decoderDict\n\t// decoder state\n\tState *state\n\t// range decoder\n\trd *rangeDecoder\n\t// start stores the head value of the dictionary for the LZMA\n\t// stream\n\tstart int64\n\t// size of uncompressed data\n\tsize int64\n\t// end-of-stream encountered\n\teos bool\n\t// EOS marker found\n\teosMarker bool\n}\n\n// newDecoder creates a new decoder instance. The parameter size provides\n// the expected byte size of the decompressed data. If the size is\n// unknown use a negative value. In that case the decoder will look for\n// a terminating end-of-stream marker.\nfunc newDecoder(br io.ByteReader, state *state, dict *decoderDict, size int64) (d *decoder, err error) {\n\trd, err := newRangeDecoder(br)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\td = &decoder{\n\t\tState: state,\n\t\tDict:  dict,\n\t\trd:    rd,\n\t\tsize:  size,\n\t\tstart: dict.pos(),\n\t}\n\treturn d, nil\n}\n\n// Reopen restarts the decoder with a new byte reader and a new size. Reopen\n// resets the Decompressed counter to zero.\nfunc (d *decoder) Reopen(br io.ByteReader, size int64) error {\n\tvar err error\n\tif d.rd, err = newRangeDecoder(br); err != nil {\n\t\treturn err\n\t}\n\td.start = d.Dict.pos()\n\td.size = size\n\td.eos = false\n\treturn nil\n}\n\n// decodeLiteral decodes a single literal from the LZMA stream.\nfunc (d *decoder) decodeLiteral() (op operation, err error) {\n\tlitState := d.State.litState(d.Dict.byteAt(1), d.Dict.head)\n\tmatch := d.Dict.byteAt(int(d.State.rep[0]) + 1)\n\ts, err := d.State.litCodec.Decode(d.rd, d.State.state, match, litState)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn lit{s}, nil\n}\n\n// errEOS indicates that an EOS marker has been found.\nvar errEOS = errors.New(\"EOS marker found\")\n\n// readOp decodes the next operation from the compressed stream. It\n// returns the operation. If an explicit end of stream marker is\n// identified the eos error is returned.\nfunc (d *decoder) readOp() (op operation, err error) {\n\t// Value of the end of stream (EOS) marker\n\tconst eosDist = 1<<32 - 1\n\n\tstate, state2, posState := d.State.states(d.Dict.head)\n\n\tb, err := d.State.isMatch[state2].Decode(d.rd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif b == 0 {\n\t\t// literal\n\t\top, err := d.decodeLiteral()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\td.State.updateStateLiteral()\n\t\treturn op, nil\n\t}\n\tb, err = d.State.isRep[state].Decode(d.rd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif b == 0 {\n\t\t// simple match\n\t\td.State.rep[3], d.State.rep[2], d.State.rep[1] =\n\t\t\td.State.rep[2], d.State.rep[1], d.State.rep[0]\n\n\t\td.State.updateStateMatch()\n\t\t// The length decoder returns the length offset.\n\t\tn, err := d.State.lenCodec.Decode(d.rd, posState)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// The dist decoder returns the distance offset. The actual\n\t\t// distance is 1 higher.\n\t\td.State.rep[0], err = d.State.distCodec.Decode(d.rd, n)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif d.State.rep[0] == eosDist {\n\t\t\td.eosMarker = true\n\t\t\treturn nil, errEOS\n\t\t}\n\t\top = match{n: int(n) + minMatchLen,\n\t\t\tdistance: int64(d.State.rep[0]) + minDistance}\n\t\treturn op, nil\n\t}\n\tb, err = d.State.isRepG0[state].Decode(d.rd)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdist := d.State.rep[0]\n\tif b == 0 {\n\t\t// rep match 0\n\t\tb, err = d.State.isRepG0Long[state2].Decode(d.rd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif b == 0 {\n\t\t\td.State.updateStateShortRep()\n\t\t\top = match{n: 1, distance: int64(dist) + minDistance}\n\t\t\treturn op, nil\n\t\t}\n\t} else {\n\t\tb, err = d.State.isRepG1[state].Decode(d.rd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif b == 0 {\n\t\t\tdist = d.State.rep[1]\n\t\t} else {\n\t\t\tb, err = d.State.isRepG2[state].Decode(d.rd)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif b == 0 {\n\t\t\t\tdist = d.State.rep[2]\n\t\t\t} else {\n\t\t\t\tdist = d.State.rep[3]\n\t\t\t\td.State.rep[3] = d.State.rep[2]\n\t\t\t}\n\t\t\td.State.rep[2] = d.State.rep[1]\n\t\t}\n\t\td.State.rep[1] = d.State.rep[0]\n\t\td.State.rep[0] = dist\n\t}\n\tn, err := d.State.repLenCodec.Decode(d.rd, posState)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\td.State.updateStateRep()\n\top = match{n: int(n) + minMatchLen, distance: int64(dist) + minDistance}\n\treturn op, nil\n}\n\n// apply takes the operation and transforms the decoder dictionary accordingly.\nfunc (d *decoder) apply(op operation) error {\n\tvar err error\n\tswitch x := op.(type) {\n\tcase match:\n\t\terr = d.Dict.writeMatch(x.distance, x.n)\n\tcase lit:\n\t\terr = d.Dict.WriteByte(x.b)\n\tdefault:\n\t\tpanic(\"op is neither a match nor a literal\")\n\t}\n\treturn err\n}\n\n// decompress fills the dictionary unless no space for new data is\n// available. If the end of the LZMA stream has been reached io.EOF will\n// be returned.\nfunc (d *decoder) decompress() error {\n\tif d.eos {\n\t\treturn io.EOF\n\t}\n\tfor d.Dict.Available() >= maxMatchLen {\n\t\top, err := d.readOp()\n\t\tswitch err {\n\t\tcase nil:\n\t\t\t// break\n\t\tcase errEOS:\n\t\t\td.eos = true\n\t\t\tif !d.rd.possiblyAtEnd() {\n\t\t\t\treturn errDataAfterEOS\n\t\t\t}\n\t\t\tif d.size >= 0 && d.size != d.Decompressed() {\n\t\t\t\treturn errSize\n\t\t\t}\n\t\t\treturn io.EOF\n\t\tcase io.EOF:\n\t\t\td.eos = true\n\t\t\treturn io.ErrUnexpectedEOF\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\t\tif err = d.apply(op); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif d.size >= 0 && d.Decompressed() >= d.size {\n\t\t\td.eos = true\n\t\t\tif d.Decompressed() > d.size {\n\t\t\t\treturn errSize\n\t\t\t}\n\t\t\tif !d.rd.possiblyAtEnd() {\n\t\t\t\tswitch _, err = d.readOp(); err {\n\t\t\t\tcase nil:\n\t\t\t\t\treturn errSize\n\t\t\t\tcase io.EOF:\n\t\t\t\t\treturn io.ErrUnexpectedEOF\n\t\t\t\tcase errEOS:\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn io.EOF\n\t\t}\n\t}\n\treturn nil\n}\n\n// Errors that may be returned while decoding data.\nvar (\n\terrDataAfterEOS = errors.New(\"lzma: data after end of stream marker\")\n\terrSize         = errors.New(\"lzma: wrong uncompressed data size\")\n)\n\n// Read reads data from the buffer. If no more data is available io.EOF is\n// returned.\nfunc (d *decoder) Read(p []byte) (n int, err error) {\n\tvar k int\n\tfor {\n\t\t// Read of decoder dict never returns an error.\n\t\tk, err = d.Dict.Read(p[n:])\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"dictionary read error %s\", err))\n\t\t}\n\t\tif k == 0 && d.eos {\n\t\t\treturn n, io.EOF\n\t\t}\n\t\tn += k\n\t\tif n >= len(p) {\n\t\t\treturn n, nil\n\t\t}\n\t\tif err = d.decompress(); err != nil && err != io.EOF {\n\t\t\treturn n, err\n\t\t}\n\t}\n}\n\n// Decompressed returns the number of bytes decompressed by the decoder.\nfunc (d *decoder) Decompressed() int64 {\n\treturn d.Dict.pos() - d.start\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/decoderdict.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// decoderDict provides the dictionary for the decoder. The whole\n// dictionary is used as reader buffer.\ntype decoderDict struct {\n\tbuf  buffer\n\thead int64\n}\n\n// newDecoderDict creates a new decoder dictionary. The whole dictionary\n// will be used as reader buffer.\nfunc newDecoderDict(dictCap int) (d *decoderDict, err error) {\n\t// lower limit supports easy test cases\n\tif !(1 <= dictCap && int64(dictCap) <= MaxDictCap) {\n\t\treturn nil, errors.New(\"lzma: dictCap out of range\")\n\t}\n\td = &decoderDict{buf: *newBuffer(dictCap)}\n\treturn d, nil\n}\n\n// Reset clears the dictionary. The read buffer is not changed, so the\n// buffered data can still be read.\nfunc (d *decoderDict) Reset() {\n\td.head = 0\n}\n\n// WriteByte writes a single byte into the dictionary. It is used to\n// write literals into the dictionary.\nfunc (d *decoderDict) WriteByte(c byte) error {\n\tif err := d.buf.WriteByte(c); err != nil {\n\t\treturn err\n\t}\n\td.head++\n\treturn nil\n}\n\n// pos returns the position of the dictionary head.\nfunc (d *decoderDict) pos() int64 { return d.head }\n\n// dictLen returns the actual length of the dictionary.\nfunc (d *decoderDict) dictLen() int {\n\tcapacity := d.buf.Cap()\n\tif d.head >= int64(capacity) {\n\t\treturn capacity\n\t}\n\treturn int(d.head)\n}\n\n// byteAt returns a byte stored in the dictionary. If the distance is\n// non-positive or exceeds the current length of the dictionary the zero\n// byte is returned.\nfunc (d *decoderDict) byteAt(dist int) byte {\n\tif !(0 < dist && dist <= d.dictLen()) {\n\t\treturn 0\n\t}\n\ti := d.buf.front - dist\n\tif i < 0 {\n\t\ti += len(d.buf.data)\n\t}\n\treturn d.buf.data[i]\n}\n\n// writeMatch writes the match at the top of the dictionary. The given\n// distance must point in the current dictionary and the length must not\n// exceed the maximum length 273 supported in LZMA.\n//\n// The error value ErrNoSpace indicates that no space is available in\n// the dictionary for writing. You need to read from the dictionary\n// first.\nfunc (d *decoderDict) writeMatch(dist int64, length int) error {\n\tif !(0 < dist && dist <= int64(d.dictLen())) {\n\t\treturn errors.New(\"writeMatch: distance out of range\")\n\t}\n\tif !(0 < length && length <= maxMatchLen) {\n\t\treturn errors.New(\"writeMatch: length out of range\")\n\t}\n\tif length > d.buf.Available() {\n\t\treturn ErrNoSpace\n\t}\n\td.head += int64(length)\n\n\ti := d.buf.front - int(dist)\n\tif i < 0 {\n\t\ti += len(d.buf.data)\n\t}\n\tfor length > 0 {\n\t\tvar p []byte\n\t\tif i >= d.buf.front {\n\t\t\tp = d.buf.data[i:]\n\t\t\ti = 0\n\t\t} else {\n\t\t\tp = d.buf.data[i:d.buf.front]\n\t\t\ti = d.buf.front\n\t\t}\n\t\tif len(p) > length {\n\t\t\tp = p[:length]\n\t\t}\n\t\tif _, err := d.buf.Write(p); err != nil {\n\t\t\tpanic(fmt.Errorf(\"d.buf.Write returned error %s\", err))\n\t\t}\n\t\tlength -= len(p)\n\t}\n\treturn nil\n}\n\n// Write writes the given bytes into the dictionary and advances the\n// head.\nfunc (d *decoderDict) Write(p []byte) (n int, err error) {\n\tn, err = d.buf.Write(p)\n\td.head += int64(n)\n\treturn n, err\n}\n\n// Available returns the number of available bytes for writing into the\n// decoder dictionary.\nfunc (d *decoderDict) Available() int { return d.buf.Available() }\n\n// Read reads data from the buffer contained in the decoder dictionary.\nfunc (d *decoderDict) Read(p []byte) (n int, err error) { return d.buf.Read(p) }\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/directcodec.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// directCodec allows the encoding and decoding of values with a fixed number\n// of bits. The number of bits must be in the range [1,32].\ntype directCodec byte\n\n// Bits returns the number of bits supported by this codec.\nfunc (dc directCodec) Bits() int {\n\treturn int(dc)\n}\n\n// Encode uses the range encoder to encode a value with the fixed number of\n// bits. The most-significant bit is encoded first.\nfunc (dc directCodec) Encode(e *rangeEncoder, v uint32) error {\n\tfor i := int(dc) - 1; i >= 0; i-- {\n\t\tif err := e.DirectEncodeBit(v >> uint(i)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Decode uses the range decoder to decode a value with the given number of\n// given bits. The most-significant bit is decoded first.\nfunc (dc directCodec) Decode(d *rangeDecoder) (v uint32, err error) {\n\tfor i := int(dc) - 1; i >= 0; i-- {\n\t\tx, err := d.DirectDecodeBit()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tv = (v << 1) | x\n\t}\n\treturn v, nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/distcodec.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// Constants used by the distance codec.\nconst (\n\t// minimum supported distance\n\tminDistance = 1\n\t// maximum supported distance, value is used for the eos marker.\n\tmaxDistance = 1 << 32\n\t// number of the supported len states\n\tlenStates = 4\n\t// start for the position models\n\tstartPosModel = 4\n\t// first index with align bits support\n\tendPosModel = 14\n\t// bits for the position slots\n\tposSlotBits = 6\n\t// number of align bits\n\talignBits = 4\n)\n\n// distCodec provides encoding and decoding of distance values.\ntype distCodec struct {\n\tposSlotCodecs [lenStates]treeCodec\n\tposModel      [endPosModel - startPosModel]treeReverseCodec\n\talignCodec    treeReverseCodec\n}\n\n// deepcopy initializes dc as deep copy of the source.\nfunc (dc *distCodec) deepcopy(src *distCodec) {\n\tif dc == src {\n\t\treturn\n\t}\n\tfor i := range dc.posSlotCodecs {\n\t\tdc.posSlotCodecs[i].deepcopy(&src.posSlotCodecs[i])\n\t}\n\tfor i := range dc.posModel {\n\t\tdc.posModel[i].deepcopy(&src.posModel[i])\n\t}\n\tdc.alignCodec.deepcopy(&src.alignCodec)\n}\n\n// newDistCodec creates a new distance codec.\nfunc (dc *distCodec) init() {\n\tfor i := range dc.posSlotCodecs {\n\t\tdc.posSlotCodecs[i] = makeTreeCodec(posSlotBits)\n\t}\n\tfor i := range dc.posModel {\n\t\tposSlot := startPosModel + i\n\t\tbits := (posSlot >> 1) - 1\n\t\tdc.posModel[i] = makeTreeReverseCodec(bits)\n\t}\n\tdc.alignCodec = makeTreeReverseCodec(alignBits)\n}\n\n// lenState converts the value l to a supported lenState value.\nfunc lenState(l uint32) uint32 {\n\tif l >= lenStates {\n\t\tl = lenStates - 1\n\t}\n\treturn l\n}\n\n// Encode encodes the distance using the parameter l. Dist can have values from\n// the full range of uint32 values. To get the distance offset the actual match\n// distance has to be decreased by 1. A distance offset of 0xffffffff (eos)\n// indicates the end of the stream.\nfunc (dc *distCodec) Encode(e *rangeEncoder, dist uint32, l uint32) (err error) {\n\t// Compute the posSlot using nlz32\n\tvar posSlot uint32\n\tvar bits uint32\n\tif dist < startPosModel {\n\t\tposSlot = dist\n\t} else {\n\t\tbits = uint32(30 - nlz32(dist))\n\t\tposSlot = startPosModel - 2 + (bits << 1)\n\t\tposSlot += (dist >> uint(bits)) & 1\n\t}\n\n\tif err = dc.posSlotCodecs[lenState(l)].Encode(e, posSlot); err != nil {\n\t\treturn\n\t}\n\n\tswitch {\n\tcase posSlot < startPosModel:\n\t\treturn nil\n\tcase posSlot < endPosModel:\n\t\ttc := &dc.posModel[posSlot-startPosModel]\n\t\treturn tc.Encode(dist, e)\n\t}\n\tdic := directCodec(bits - alignBits)\n\tif err = dic.Encode(e, dist>>alignBits); err != nil {\n\t\treturn\n\t}\n\treturn dc.alignCodec.Encode(dist, e)\n}\n\n// Decode decodes the distance offset using the parameter l. The dist value\n// 0xffffffff (eos) indicates the end of the stream. Add one to the distance\n// offset to get the actual match distance.\nfunc (dc *distCodec) Decode(d *rangeDecoder, l uint32) (dist uint32, err error) {\n\tposSlot, err := dc.posSlotCodecs[lenState(l)].Decode(d)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t// posSlot equals distance\n\tif posSlot < startPosModel {\n\t\treturn posSlot, nil\n\t}\n\n\t// posSlot uses the individual models\n\tbits := (posSlot >> 1) - 1\n\tdist = (2 | (posSlot & 1)) << bits\n\tvar u uint32\n\tif posSlot < endPosModel {\n\t\ttc := &dc.posModel[posSlot-startPosModel]\n\t\tif u, err = tc.Decode(d); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tdist += u\n\t\treturn dist, nil\n\t}\n\n\t// posSlots use direct encoding and a single model for the four align\n\t// bits.\n\tdic := directCodec(bits - alignBits)\n\tif u, err = dic.Decode(d); err != nil {\n\t\treturn 0, err\n\t}\n\tdist += u << alignBits\n\tif u, err = dc.alignCodec.Decode(d); err != nil {\n\t\treturn 0, err\n\t}\n\tdist += u\n\treturn dist, nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/encoder.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// opLenMargin provides the upper limit of the number of bytes required\n// to encode a single operation.\nconst opLenMargin = 16\n\n// compressFlags control the compression process.\ntype compressFlags uint32\n\n// Values for compressFlags.\nconst (\n\t// all data should be compressed, even if compression is not\n\t// optimal.\n\tall compressFlags = 1 << iota\n)\n\n// encoderFlags provide the flags for an encoder.\ntype encoderFlags uint32\n\n// Flags for the encoder.\nconst (\n\t// eosMarker requests an EOS marker to be written.\n\teosMarker encoderFlags = 1 << iota\n)\n\n// Encoder compresses data buffered in the encoder dictionary and writes\n// it into a byte writer.\ntype encoder struct {\n\tdict  *encoderDict\n\tstate *state\n\tre    *rangeEncoder\n\tstart int64\n\t// generate eos marker\n\tmarker bool\n\tlimit  bool\n\tmargin int\n}\n\n// newEncoder creates a new encoder. If the byte writer must be\n// limited use LimitedByteWriter provided by this package. The flags\n// argument supports the eosMarker flag, controlling whether a\n// terminating end-of-stream marker must be written.\nfunc newEncoder(bw io.ByteWriter, state *state, dict *encoderDict,\n\tflags encoderFlags) (e *encoder, err error) {\n\n\tre, err := newRangeEncoder(bw)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\te = &encoder{\n\t\tdict:   dict,\n\t\tstate:  state,\n\t\tre:     re,\n\t\tmarker: flags&eosMarker != 0,\n\t\tstart:  dict.Pos(),\n\t\tmargin: opLenMargin,\n\t}\n\tif e.marker {\n\t\te.margin += 5\n\t}\n\treturn e, nil\n}\n\n// Write writes the bytes from p into the dictionary. If not enough\n// space is available the data in the dictionary buffer will be\n// compressed to make additional space available. If the limit of the\n// underlying writer has been reached ErrLimit will be returned.\nfunc (e *encoder) Write(p []byte) (n int, err error) {\n\tfor {\n\t\tk, err := e.dict.Write(p[n:])\n\t\tn += k\n\t\tif err == ErrNoSpace {\n\t\t\tif err = e.compress(0); err != nil {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\treturn n, err\n\t}\n}\n\n// Reopen reopens the encoder with a new byte writer.\nfunc (e *encoder) Reopen(bw io.ByteWriter) error {\n\tvar err error\n\tif e.re, err = newRangeEncoder(bw); err != nil {\n\t\treturn err\n\t}\n\te.start = e.dict.Pos()\n\te.limit = false\n\treturn nil\n}\n\n// writeLiteral writes a literal into the LZMA stream\nfunc (e *encoder) writeLiteral(l lit) error {\n\tvar err error\n\tstate, state2, _ := e.state.states(e.dict.Pos())\n\tif err = e.state.isMatch[state2].Encode(e.re, 0); err != nil {\n\t\treturn err\n\t}\n\tlitState := e.state.litState(e.dict.ByteAt(1), e.dict.Pos())\n\tmatch := e.dict.ByteAt(int(e.state.rep[0]) + 1)\n\terr = e.state.litCodec.Encode(e.re, l.b, state, match, litState)\n\tif err != nil {\n\t\treturn err\n\t}\n\te.state.updateStateLiteral()\n\treturn nil\n}\n\n// iverson implements the Iverson operator as proposed by Donald Knuth in his\n// book Concrete Mathematics.\nfunc iverson(ok bool) uint32 {\n\tif ok {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\n// writeMatch writes a repetition operation into the operation stream\nfunc (e *encoder) writeMatch(m match) error {\n\tvar err error\n\tif !(minDistance <= m.distance && m.distance <= maxDistance) {\n\t\tpanic(fmt.Errorf(\"match distance %d out of range\", m.distance))\n\t}\n\tdist := uint32(m.distance - minDistance)\n\tif !(minMatchLen <= m.n && m.n <= maxMatchLen) &&\n\t\t!(dist == e.state.rep[0] && m.n == 1) {\n\t\tpanic(fmt.Errorf(\n\t\t\t\"match length %d out of range; dist %d rep[0] %d\",\n\t\t\tm.n, dist, e.state.rep[0]))\n\t}\n\tstate, state2, posState := e.state.states(e.dict.Pos())\n\tif err = e.state.isMatch[state2].Encode(e.re, 1); err != nil {\n\t\treturn err\n\t}\n\tg := 0\n\tfor ; g < 4; g++ {\n\t\tif e.state.rep[g] == dist {\n\t\t\tbreak\n\t\t}\n\t}\n\tb := iverson(g < 4)\n\tif err = e.state.isRep[state].Encode(e.re, b); err != nil {\n\t\treturn err\n\t}\n\tn := uint32(m.n - minMatchLen)\n\tif b == 0 {\n\t\t// simple match\n\t\te.state.rep[3], e.state.rep[2], e.state.rep[1], e.state.rep[0] =\n\t\t\te.state.rep[2], e.state.rep[1], e.state.rep[0], dist\n\t\te.state.updateStateMatch()\n\t\tif err = e.state.lenCodec.Encode(e.re, n, posState); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn e.state.distCodec.Encode(e.re, dist, n)\n\t}\n\tb = iverson(g != 0)\n\tif err = e.state.isRepG0[state].Encode(e.re, b); err != nil {\n\t\treturn err\n\t}\n\tif b == 0 {\n\t\t// g == 0\n\t\tb = iverson(m.n != 1)\n\t\tif err = e.state.isRepG0Long[state2].Encode(e.re, b); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif b == 0 {\n\t\t\te.state.updateStateShortRep()\n\t\t\treturn nil\n\t\t}\n\t} else {\n\t\t// g in {1,2,3}\n\t\tb = iverson(g != 1)\n\t\tif err = e.state.isRepG1[state].Encode(e.re, b); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif b == 1 {\n\t\t\t// g in {2,3}\n\t\t\tb = iverson(g != 2)\n\t\t\terr = e.state.isRepG2[state].Encode(e.re, b)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif b == 1 {\n\t\t\t\te.state.rep[3] = e.state.rep[2]\n\t\t\t}\n\t\t\te.state.rep[2] = e.state.rep[1]\n\t\t}\n\t\te.state.rep[1] = e.state.rep[0]\n\t\te.state.rep[0] = dist\n\t}\n\te.state.updateStateRep()\n\treturn e.state.repLenCodec.Encode(e.re, n, posState)\n}\n\n// writeOp writes a single operation to the range encoder. The function\n// checks whether there is enough space available to close the LZMA\n// stream.\nfunc (e *encoder) writeOp(op operation) error {\n\tif e.re.Available() < int64(e.margin) {\n\t\treturn ErrLimit\n\t}\n\tswitch x := op.(type) {\n\tcase lit:\n\t\treturn e.writeLiteral(x)\n\tcase match:\n\t\treturn e.writeMatch(x)\n\tdefault:\n\t\tpanic(\"unexpected operation\")\n\t}\n}\n\n// compress compressed data from the dictionary buffer. If the flag all\n// is set, all data in the dictionary buffer will be compressed. The\n// function returns ErrLimit if the underlying writer has reached its\n// limit.\nfunc (e *encoder) compress(flags compressFlags) error {\n\tn := 0\n\tif flags&all == 0 {\n\t\tn = maxMatchLen - 1\n\t}\n\td := e.dict\n\tm := d.m\n\tfor d.Buffered() > n {\n\t\top := m.NextOp(e.state.rep)\n\t\tif err := e.writeOp(op); err != nil {\n\t\t\treturn err\n\t\t}\n\t\td.Discard(op.Len())\n\t}\n\treturn nil\n}\n\n// eosMatch is a pseudo operation that indicates the end of the stream.\nvar eosMatch = match{distance: maxDistance, n: minMatchLen}\n\n// Close terminates the LZMA stream. If requested the end-of-stream\n// marker will be written. If the byte writer limit has been or will be\n// reached during compression of the remaining data in the buffer the\n// LZMA stream will be closed and data will remain in the buffer.\nfunc (e *encoder) Close() error {\n\terr := e.compress(all)\n\tif err != nil && err != ErrLimit {\n\t\treturn err\n\t}\n\tif e.marker {\n\t\tif err := e.writeMatch(eosMatch); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\terr = e.re.Close()\n\treturn err\n}\n\n// Compressed returns the number bytes of the input data that been\n// compressed.\nfunc (e *encoder) Compressed() int64 {\n\treturn e.dict.Pos() - e.start\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/encoderdict.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// matcher is an interface that supports the identification of the next\n// operation.\ntype matcher interface {\n\tio.Writer\n\tSetDict(d *encoderDict)\n\tNextOp(rep [4]uint32) operation\n}\n\n// encoderDict provides the dictionary of the encoder. It includes an\n// additional buffer atop of the actual dictionary.\ntype encoderDict struct {\n\tbuf      buffer\n\tm        matcher\n\thead     int64\n\tcapacity int\n\t// preallocated array\n\tdata [maxMatchLen]byte\n}\n\n// newEncoderDict creates the encoder dictionary. The argument bufSize\n// defines the size of the additional buffer.\nfunc newEncoderDict(dictCap, bufSize int, m matcher) (d *encoderDict, err error) {\n\tif !(1 <= dictCap && int64(dictCap) <= MaxDictCap) {\n\t\treturn nil, errors.New(\n\t\t\t\"lzma: dictionary capacity out of range\")\n\t}\n\tif bufSize < 1 {\n\t\treturn nil, errors.New(\n\t\t\t\"lzma: buffer size must be larger than zero\")\n\t}\n\td = &encoderDict{\n\t\tbuf:      *newBuffer(dictCap + bufSize),\n\t\tcapacity: dictCap,\n\t\tm:        m,\n\t}\n\tm.SetDict(d)\n\treturn d, nil\n}\n\n// Discard discards n bytes. Note that n must not be larger than\n// MaxMatchLen.\nfunc (d *encoderDict) Discard(n int) {\n\tp := d.data[:n]\n\tk, _ := d.buf.Read(p)\n\tif k < n {\n\t\tpanic(fmt.Errorf(\"lzma: can't discard %d bytes\", n))\n\t}\n\td.head += int64(n)\n\td.m.Write(p)\n}\n\n// Len returns the data available in the encoder dictionary.\nfunc (d *encoderDict) Len() int {\n\tn := d.buf.Available()\n\tif int64(n) > d.head {\n\t\treturn int(d.head)\n\t}\n\treturn n\n}\n\n// DictLen returns the actual length of data in the dictionary.\nfunc (d *encoderDict) DictLen() int {\n\tif d.head < int64(d.capacity) {\n\t\treturn int(d.head)\n\t}\n\treturn d.capacity\n}\n\n// Available returns the number of bytes that can be written by a\n// following Write call.\nfunc (d *encoderDict) Available() int {\n\treturn d.buf.Available() - d.DictLen()\n}\n\n// Write writes data into the dictionary buffer. Note that the position\n// of the dictionary head will not be moved. If there is not enough\n// space in the buffer ErrNoSpace will be returned.\nfunc (d *encoderDict) Write(p []byte) (n int, err error) {\n\tm := d.Available()\n\tif len(p) > m {\n\t\tp = p[:m]\n\t\terr = ErrNoSpace\n\t}\n\tvar e error\n\tif n, e = d.buf.Write(p); e != nil {\n\t\terr = e\n\t}\n\treturn n, err\n}\n\n// Pos returns the position of the head.\nfunc (d *encoderDict) Pos() int64 { return d.head }\n\n// ByteAt returns the byte at the given distance.\nfunc (d *encoderDict) ByteAt(distance int) byte {\n\tif !(0 < distance && distance <= d.Len()) {\n\t\treturn 0\n\t}\n\ti := d.buf.rear - distance\n\tif i < 0 {\n\t\ti += len(d.buf.data)\n\t}\n\treturn d.buf.data[i]\n}\n\n// CopyN copies the last n bytes from the dictionary into the provided\n// writer. This is used for copying uncompressed data into an\n// uncompressed segment.\nfunc (d *encoderDict) CopyN(w io.Writer, n int) (written int, err error) {\n\tif n <= 0 {\n\t\treturn 0, nil\n\t}\n\tm := d.Len()\n\tif n > m {\n\t\tn = m\n\t\terr = ErrNoSpace\n\t}\n\ti := d.buf.rear - n\n\tvar e error\n\tif i < 0 {\n\t\ti += len(d.buf.data)\n\t\tif written, e = w.Write(d.buf.data[i:]); e != nil {\n\t\t\treturn written, e\n\t\t}\n\t\ti = 0\n\t}\n\tvar k int\n\tk, e = w.Write(d.buf.data[i:d.buf.rear])\n\twritten += k\n\tif e != nil {\n\t\terr = e\n\t}\n\treturn written, err\n}\n\n// Buffered returns the number of bytes in the buffer.\nfunc (d *encoderDict) Buffered() int { return d.buf.Buffered() }\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/hashtable.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/ulikunitz/xz/internal/hash\"\n)\n\n/* For compression we need to find byte sequences that match the byte\n * sequence at the dictionary head. A hash table is a simple method to\n * provide this capability.\n */\n\n// maxMatches limits the number of matches requested from the Matches\n// function. This controls the speed of the overall encoding.\nconst maxMatches = 16\n\n// shortDists defines the number of short distances supported by the\n// implementation.\nconst shortDists = 8\n\n// The minimum is somehow arbitrary but the maximum is limited by the\n// memory requirements of the hash table.\nconst (\n\tminTableExponent = 9\n\tmaxTableExponent = 20\n)\n\n// newRoller contains the function used to create an instance of the\n// hash.Roller.\nvar newRoller = func(n int) hash.Roller { return hash.NewCyclicPoly(n) }\n\n// hashTable stores the hash table including the rolling hash method.\n//\n// We implement chained hashing into a circular buffer. Each entry in\n// the circular buffer stores the delta distance to the next position with a\n// word that has the same hash value.\ntype hashTable struct {\n\tdict *encoderDict\n\t// actual hash table\n\tt []int64\n\t// circular list data with the offset to the next word\n\tdata  []uint32\n\tfront int\n\t// mask for computing the index for the hash table\n\tmask uint64\n\t// hash offset; initial value is -int64(wordLen)\n\thoff int64\n\t// length of the hashed word\n\twordLen int\n\t// hash roller for computing the hash values for the Write\n\t// method\n\twr hash.Roller\n\t// hash roller for computing arbitrary hashes\n\thr hash.Roller\n\t// preallocated slices\n\tp         [maxMatches]int64\n\tdistances [maxMatches + shortDists]int\n}\n\n// hashTableExponent derives the hash table exponent from the dictionary\n// capacity.\nfunc hashTableExponent(n uint32) int {\n\te := 30 - nlz32(n)\n\tswitch {\n\tcase e < minTableExponent:\n\t\te = minTableExponent\n\tcase e > maxTableExponent:\n\t\te = maxTableExponent\n\t}\n\treturn e\n}\n\n// newHashTable creates a new hash table for words of length wordLen\nfunc newHashTable(capacity int, wordLen int) (t *hashTable, err error) {\n\tif !(0 < capacity) {\n\t\treturn nil, errors.New(\n\t\t\t\"newHashTable: capacity must not be negative\")\n\t}\n\texp := hashTableExponent(uint32(capacity))\n\tif !(1 <= wordLen && wordLen <= 4) {\n\t\treturn nil, errors.New(\"newHashTable: \" +\n\t\t\t\"argument wordLen out of range\")\n\t}\n\tn := 1 << uint(exp)\n\tif n <= 0 {\n\t\tpanic(\"newHashTable: exponent is too large\")\n\t}\n\tt = &hashTable{\n\t\tt:       make([]int64, n),\n\t\tdata:    make([]uint32, capacity),\n\t\tmask:    (uint64(1) << uint(exp)) - 1,\n\t\thoff:    -int64(wordLen),\n\t\twordLen: wordLen,\n\t\twr:      newRoller(wordLen),\n\t\thr:      newRoller(wordLen),\n\t}\n\treturn t, nil\n}\n\nfunc (t *hashTable) SetDict(d *encoderDict) { t.dict = d }\n\n// buffered returns the number of bytes that are currently hashed.\nfunc (t *hashTable) buffered() int {\n\tn := t.hoff + 1\n\tswitch {\n\tcase n <= 0:\n\t\treturn 0\n\tcase n >= int64(len(t.data)):\n\t\treturn len(t.data)\n\t}\n\treturn int(n)\n}\n\n// addIndex adds n to an index ensuring that is stays inside the\n// circular buffer for the hash chain.\nfunc (t *hashTable) addIndex(i, n int) int {\n\ti += n - len(t.data)\n\tif i < 0 {\n\t\ti += len(t.data)\n\t}\n\treturn i\n}\n\n// putDelta puts the delta instance at the current front of the circular\n// chain buffer.\nfunc (t *hashTable) putDelta(delta uint32) {\n\tt.data[t.front] = delta\n\tt.front = t.addIndex(t.front, 1)\n}\n\n// putEntry puts a new entry into the hash table. If there is already a\n// value stored it is moved into the circular chain buffer.\nfunc (t *hashTable) putEntry(h uint64, pos int64) {\n\tif pos < 0 {\n\t\treturn\n\t}\n\ti := h & t.mask\n\told := t.t[i] - 1\n\tt.t[i] = pos + 1\n\tvar delta int64\n\tif old >= 0 {\n\t\tdelta = pos - old\n\t\tif delta > 1<<32-1 || delta > int64(t.buffered()) {\n\t\t\tdelta = 0\n\t\t}\n\t}\n\tt.putDelta(uint32(delta))\n}\n\n// WriteByte converts a single byte into a hash and puts them into the hash\n// table.\nfunc (t *hashTable) WriteByte(b byte) error {\n\th := t.wr.RollByte(b)\n\tt.hoff++\n\tt.putEntry(h, t.hoff)\n\treturn nil\n}\n\n// Write converts the bytes provided into hash tables and stores the\n// abbreviated offsets into the hash table. The method will never return an\n// error.\nfunc (t *hashTable) Write(p []byte) (n int, err error) {\n\tfor _, b := range p {\n\t\t// WriteByte doesn't generate an error.\n\t\tt.WriteByte(b)\n\t}\n\treturn len(p), nil\n}\n\n// getMatches the matches for a specific hash. The functions returns the\n// number of positions found.\n//\n// TODO: Make a getDistances because that we are actually interested in.\nfunc (t *hashTable) getMatches(h uint64, positions []int64) (n int) {\n\tif t.hoff < 0 || len(positions) == 0 {\n\t\treturn 0\n\t}\n\tbuffered := t.buffered()\n\ttailPos := t.hoff + 1 - int64(buffered)\n\trear := t.front - buffered\n\tif rear >= 0 {\n\t\trear -= len(t.data)\n\t}\n\t// get the slot for the hash\n\tpos := t.t[h&t.mask] - 1\n\tdelta := pos - tailPos\n\tfor {\n\t\tif delta < 0 {\n\t\t\treturn n\n\t\t}\n\t\tpositions[n] = tailPos + delta\n\t\tn++\n\t\tif n >= len(positions) {\n\t\t\treturn n\n\t\t}\n\t\ti := rear + int(delta)\n\t\tif i < 0 {\n\t\t\ti += len(t.data)\n\t\t}\n\t\tu := t.data[i]\n\t\tif u == 0 {\n\t\t\treturn n\n\t\t}\n\t\tdelta -= int64(u)\n\t}\n}\n\n// hash computes the rolling hash for the word stored in p. For correct\n// results its length must be equal to t.wordLen.\nfunc (t *hashTable) hash(p []byte) uint64 {\n\tvar h uint64\n\tfor _, b := range p {\n\t\th = t.hr.RollByte(b)\n\t}\n\treturn h\n}\n\n// Matches fills the positions slice with potential matches. The\n// functions returns the number of positions filled into positions. The\n// byte slice p must have word length of the hash table.\nfunc (t *hashTable) Matches(p []byte, positions []int64) int {\n\tif len(p) != t.wordLen {\n\t\tpanic(fmt.Errorf(\n\t\t\t\"byte slice must have length %d\", t.wordLen))\n\t}\n\th := t.hash(p)\n\treturn t.getMatches(h, positions)\n}\n\n// NextOp identifies the next operation using the hash table.\n//\n// TODO: Use all repetitions to find matches.\nfunc (t *hashTable) NextOp(rep [4]uint32) operation {\n\t// get positions\n\tdata := t.dict.data[:maxMatchLen]\n\tn, _ := t.dict.buf.Peek(data)\n\tdata = data[:n]\n\tvar p []int64\n\tif n < t.wordLen {\n\t\tp = t.p[:0]\n\t} else {\n\t\tp = t.p[:maxMatches]\n\t\tn = t.Matches(data[:t.wordLen], p)\n\t\tp = p[:n]\n\t}\n\n\t// convert positions in potential distances\n\thead := t.dict.head\n\tdists := append(t.distances[:0], 1, 2, 3, 4, 5, 6, 7, 8)\n\tfor _, pos := range p {\n\t\tdis := int(head - pos)\n\t\tif dis > shortDists {\n\t\t\tdists = append(dists, dis)\n\t\t}\n\t}\n\n\t// check distances\n\tvar m match\n\tdictLen := t.dict.DictLen()\n\tfor _, dist := range dists {\n\t\tif dist > dictLen {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Here comes a trick. We are only interested in matches\n\t\t// that are longer than the matches we have been found\n\t\t// before. So before we test the whole byte sequence at\n\t\t// the given distance, we test the first byte that would\n\t\t// make the match longer. If it doesn't match the byte\n\t\t// to match, we don't to care any longer.\n\t\ti := t.dict.buf.rear - dist + m.n\n\t\tif i < 0 {\n\t\t\ti += len(t.dict.buf.data)\n\t\t}\n\t\tif t.dict.buf.data[i] != data[m.n] {\n\t\t\t// We can't get a longer match. Jump to the next\n\t\t\t// distance.\n\t\t\tcontinue\n\t\t}\n\n\t\tn := t.dict.buf.matchLen(dist, data)\n\t\tswitch n {\n\t\tcase 0:\n\t\t\tcontinue\n\t\tcase 1:\n\t\t\tif uint32(dist-minDistance) != rep[0] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tif n > m.n {\n\t\t\tm = match{int64(dist), n}\n\t\t\tif n == len(data) {\n\t\t\t\t// No better match will be found.\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif m.n == 0 {\n\t\treturn lit{data[0]}\n\t}\n\treturn m\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/header.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// uint32LE reads an uint32 integer from a byte slice\nfunc uint32LE(b []byte) uint32 {\n\tx := uint32(b[3]) << 24\n\tx |= uint32(b[2]) << 16\n\tx |= uint32(b[1]) << 8\n\tx |= uint32(b[0])\n\treturn x\n}\n\n// uint64LE converts the uint64 value stored as little endian to an uint64\n// value.\nfunc uint64LE(b []byte) uint64 {\n\tx := uint64(b[7]) << 56\n\tx |= uint64(b[6]) << 48\n\tx |= uint64(b[5]) << 40\n\tx |= uint64(b[4]) << 32\n\tx |= uint64(b[3]) << 24\n\tx |= uint64(b[2]) << 16\n\tx |= uint64(b[1]) << 8\n\tx |= uint64(b[0])\n\treturn x\n}\n\n// putUint32LE puts an uint32 integer into a byte slice that must have at least\n// a length of 4 bytes.\nfunc putUint32LE(b []byte, x uint32) {\n\tb[0] = byte(x)\n\tb[1] = byte(x >> 8)\n\tb[2] = byte(x >> 16)\n\tb[3] = byte(x >> 24)\n}\n\n// putUint64LE puts the uint64 value into the byte slice as little endian\n// value. The byte slice b must have at least place for 8 bytes.\nfunc putUint64LE(b []byte, x uint64) {\n\tb[0] = byte(x)\n\tb[1] = byte(x >> 8)\n\tb[2] = byte(x >> 16)\n\tb[3] = byte(x >> 24)\n\tb[4] = byte(x >> 32)\n\tb[5] = byte(x >> 40)\n\tb[6] = byte(x >> 48)\n\tb[7] = byte(x >> 56)\n}\n\n// noHeaderSize defines the value of the length field in the LZMA header.\nconst noHeaderSize uint64 = 1<<64 - 1\n\n// HeaderLen provides the length of the LZMA file header.\nconst HeaderLen = 13\n\n// Header represents the Header of an LZMA file.\ntype Header struct {\n\tProperties Properties\n\tDictSize   uint32\n\t// uncompressed Size; negative value if no Size is given\n\tSize int64\n}\n\n// marshalBinary marshals the header.\nfunc (h *Header) marshalBinary() (data []byte, err error) {\n\tif err = h.Properties.verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tif !(h.DictSize <= MaxDictCap) {\n\t\treturn nil, fmt.Errorf(\"lzma: DictCap %d out of range\",\n\t\t\th.DictSize)\n\t}\n\n\tdata = make([]byte, 13)\n\n\t// property byte\n\tdata[0] = h.Properties.Code()\n\n\t// dictionary capacity\n\tputUint32LE(data[1:5], uint32(h.DictSize))\n\n\t// uncompressed size\n\tvar s uint64\n\tif h.Size > 0 {\n\t\ts = uint64(h.Size)\n\t} else {\n\t\ts = noHeaderSize\n\t}\n\tputUint64LE(data[5:], s)\n\n\treturn data, nil\n}\n\n// unmarshalBinary unmarshals the header.\nfunc (h *Header) unmarshalBinary(data []byte) error {\n\tif len(data) != HeaderLen {\n\t\treturn errors.New(\"lzma.unmarshalBinary: data has wrong length\")\n\t}\n\n\t// properties\n\tvar err error\n\tif h.Properties, err = PropertiesForCode(data[0]); err != nil {\n\t\treturn err\n\t}\n\n\t// dictionary capacity\n\th.DictSize = uint32LE(data[1:])\n\tif int(h.DictSize) < 0 {\n\t\treturn errors.New(\n\t\t\t\"LZMA header: dictionary capacity exceeds maximum \" +\n\t\t\t\t\"integer\")\n\t}\n\n\t// uncompressed size\n\ts := uint64LE(data[5:])\n\tif s == noHeaderSize {\n\t\th.Size = -1\n\t} else {\n\t\th.Size = int64(s)\n\t\tif h.Size < 0 {\n\t\t\treturn errors.New(\n\t\t\t\t\"LZMA header: uncompressed size \" +\n\t\t\t\t\t\"out of int64 range\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// validDictSize checks whether the dictionary capacity is correct. This\n// is used to weed out wrong file headers.\nfunc validDictSize(dictcap int) bool {\n\tif int64(dictcap) == MaxDictCap {\n\t\treturn true\n\t}\n\tfor n := uint(10); n < 32; n++ {\n\t\tif dictcap == 1<<n {\n\t\t\treturn true\n\t\t}\n\t\tif dictcap == 1<<n+1<<(n-1) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// ValidHeader checks for a valid LZMA file header. It allows only\n// dictionary sizes of 2^n or 2^n+2^(n-1) with n >= 10 or 2^32-1. If\n// there is an explicit size it must not exceed 256 GiB. The length of\n// the data argument must be HeaderLen.\n//\n// This function should be disregarded because there is no guarantee that LZMA\n// files follow the constraints.\nfunc ValidHeader(data []byte) bool {\n\tvar h Header\n\tif err := h.unmarshalBinary(data); err != nil {\n\t\treturn false\n\t}\n\tif !validDictSize(int(h.DictSize)) {\n\t\treturn false\n\t}\n\treturn h.Size < 0 || h.Size <= 1<<38\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/header2.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\nconst (\n\t// maximum size of compressed data in a chunk\n\tmaxCompressed = 1 << 16\n\t// maximum size of uncompressed data in a chunk\n\tmaxUncompressed = 1 << 21\n)\n\n// chunkType represents the type of an LZMA2 chunk. Note that this\n// value is an internal representation and no actual encoding of a LZMA2\n// chunk header.\ntype chunkType byte\n\n// Possible values for the chunk type.\nconst (\n\t// end of stream\n\tcEOS chunkType = iota\n\t// uncompressed; reset dictionary\n\tcUD\n\t// uncompressed; no reset of dictionary\n\tcU\n\t// LZMA compressed; no reset\n\tcL\n\t// LZMA compressed; reset state\n\tcLR\n\t// LZMA compressed; reset state; new property value\n\tcLRN\n\t// LZMA compressed; reset state; new property value; reset dictionary\n\tcLRND\n)\n\n// chunkTypeStrings provide a string representation for the chunk types.\nvar chunkTypeStrings = [...]string{\n\tcEOS:  \"EOS\",\n\tcU:    \"U\",\n\tcUD:   \"UD\",\n\tcL:    \"L\",\n\tcLR:   \"LR\",\n\tcLRN:  \"LRN\",\n\tcLRND: \"LRND\",\n}\n\n// String returns a string representation of the chunk type.\nfunc (c chunkType) String() string {\n\tif !(cEOS <= c && c <= cLRND) {\n\t\treturn \"unknown\"\n\t}\n\treturn chunkTypeStrings[c]\n}\n\n// Actual encodings for the chunk types in the value. Note that the high\n// uncompressed size bits are stored in the header byte additionally.\nconst (\n\thEOS  = 0\n\thUD   = 1\n\thU    = 2\n\thL    = 1 << 7\n\thLR   = 1<<7 | 1<<5\n\thLRN  = 1<<7 | 1<<6\n\thLRND = 1<<7 | 1<<6 | 1<<5\n)\n\n// errHeaderByte indicates an unsupported value for the chunk header\n// byte. These bytes starts the variable-length chunk header.\nvar errHeaderByte = errors.New(\"lzma: unsupported chunk header byte\")\n\n// headerChunkType converts the header byte into a chunk type. It\n// ignores the uncompressed size bits in the chunk header byte.\nfunc headerChunkType(h byte) (c chunkType, err error) {\n\tif h&hL == 0 {\n\t\t// no compression\n\t\tswitch h {\n\t\tcase hEOS:\n\t\t\tc = cEOS\n\t\tcase hUD:\n\t\t\tc = cUD\n\t\tcase hU:\n\t\t\tc = cU\n\t\tdefault:\n\t\t\treturn 0, errHeaderByte\n\t\t}\n\t\treturn\n\t}\n\tswitch h & hLRND {\n\tcase hL:\n\t\tc = cL\n\tcase hLR:\n\t\tc = cLR\n\tcase hLRN:\n\t\tc = cLRN\n\tcase hLRND:\n\t\tc = cLRND\n\tdefault:\n\t\treturn 0, errHeaderByte\n\t}\n\treturn\n}\n\n// uncompressedHeaderLen provides the length of an uncompressed header\nconst uncompressedHeaderLen = 3\n\n// headerLen returns the length of the LZMA2 header for a given chunk\n// type.\nfunc headerLen(c chunkType) int {\n\tswitch c {\n\tcase cEOS:\n\t\treturn 1\n\tcase cU, cUD:\n\t\treturn uncompressedHeaderLen\n\tcase cL, cLR:\n\t\treturn 5\n\tcase cLRN, cLRND:\n\t\treturn 6\n\t}\n\tpanic(fmt.Errorf(\"unsupported chunk type %d\", c))\n}\n\n// chunkHeader represents the contents of a chunk header.\ntype chunkHeader struct {\n\tctype        chunkType\n\tuncompressed uint32\n\tcompressed   uint16\n\tprops        Properties\n}\n\n// String returns a string representation of the chunk header.\nfunc (h *chunkHeader) String() string {\n\treturn fmt.Sprintf(\"%s %d %d %s\", h.ctype, h.uncompressed,\n\t\th.compressed, &h.props)\n}\n\n// UnmarshalBinary reads the content of the chunk header from the data\n// slice. The slice must have the correct length.\nfunc (h *chunkHeader) UnmarshalBinary(data []byte) error {\n\tif len(data) == 0 {\n\t\treturn errors.New(\"no data\")\n\t}\n\tc, err := headerChunkType(data[0])\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tn := headerLen(c)\n\tif len(data) < n {\n\t\treturn errors.New(\"incomplete data\")\n\t}\n\tif len(data) > n {\n\t\treturn errors.New(\"invalid data length\")\n\t}\n\n\t*h = chunkHeader{ctype: c}\n\tif c == cEOS {\n\t\treturn nil\n\t}\n\n\th.uncompressed = uint32(uint16BE(data[1:3]))\n\tif c <= cU {\n\t\treturn nil\n\t}\n\th.uncompressed |= uint32(data[0]&^hLRND) << 16\n\n\th.compressed = uint16BE(data[3:5])\n\tif c <= cLR {\n\t\treturn nil\n\t}\n\n\th.props, err = PropertiesForCode(data[5])\n\treturn err\n}\n\n// MarshalBinary encodes the chunk header value. The function checks\n// whether the content of the chunk header is correct.\nfunc (h *chunkHeader) MarshalBinary() (data []byte, err error) {\n\tif h.ctype > cLRND {\n\t\treturn nil, errors.New(\"invalid chunk type\")\n\t}\n\tif err = h.props.verify(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tdata = make([]byte, headerLen(h.ctype))\n\n\tswitch h.ctype {\n\tcase cEOS:\n\t\treturn data, nil\n\tcase cUD:\n\t\tdata[0] = hUD\n\tcase cU:\n\t\tdata[0] = hU\n\tcase cL:\n\t\tdata[0] = hL\n\tcase cLR:\n\t\tdata[0] = hLR\n\tcase cLRN:\n\t\tdata[0] = hLRN\n\tcase cLRND:\n\t\tdata[0] = hLRND\n\t}\n\n\tputUint16BE(data[1:3], uint16(h.uncompressed))\n\tif h.ctype <= cU {\n\t\treturn data, nil\n\t}\n\tdata[0] |= byte(h.uncompressed>>16) &^ hLRND\n\n\tputUint16BE(data[3:5], h.compressed)\n\tif h.ctype <= cLR {\n\t\treturn data, nil\n\t}\n\n\tdata[5] = h.props.Code()\n\treturn data, nil\n}\n\n// readChunkHeader reads the chunk header from the IO reader.\nfunc readChunkHeader(r io.Reader) (h *chunkHeader, err error) {\n\tp := make([]byte, 1, 6)\n\tif _, err = io.ReadFull(r, p); err != nil {\n\t\treturn\n\t}\n\tc, err := headerChunkType(p[0])\n\tif err != nil {\n\t\treturn\n\t}\n\tp = p[:headerLen(c)]\n\tif _, err = io.ReadFull(r, p[1:]); err != nil {\n\t\treturn\n\t}\n\th = new(chunkHeader)\n\tif err = h.UnmarshalBinary(p); err != nil {\n\t\treturn nil, err\n\t}\n\treturn h, nil\n}\n\n// uint16BE converts a big-endian uint16 representation to an uint16\n// value.\nfunc uint16BE(p []byte) uint16 {\n\treturn uint16(p[0])<<8 | uint16(p[1])\n}\n\n// putUint16BE puts the big-endian uint16 presentation into the given\n// slice.\nfunc putUint16BE(p []byte, x uint16) {\n\tp[0] = byte(x >> 8)\n\tp[1] = byte(x)\n}\n\n// chunkState is used to manage the state of the chunks\ntype chunkState byte\n\n// start and stop define the initial and terminating state of the chunk\n// state\nconst (\n\tstart chunkState = 'S'\n\tstop  chunkState = 'T'\n)\n\n// errors for the chunk state handling\nvar (\n\terrChunkType = errors.New(\"lzma: unexpected chunk type\")\n\terrState     = errors.New(\"lzma: wrong chunk state\")\n)\n\n// next transitions state based on chunk type input\nfunc (c *chunkState) next(ctype chunkType) error {\n\tswitch *c {\n\t// start state\n\tcase 'S':\n\t\tswitch ctype {\n\t\tcase cEOS:\n\t\t\t*c = 'T'\n\t\tcase cUD:\n\t\t\t*c = 'R'\n\t\tcase cLRND:\n\t\t\t*c = 'L'\n\t\tdefault:\n\t\t\treturn errChunkType\n\t\t}\n\t// normal LZMA mode\n\tcase 'L':\n\t\tswitch ctype {\n\t\tcase cEOS:\n\t\t\t*c = 'T'\n\t\tcase cUD:\n\t\t\t*c = 'R'\n\t\tcase cU:\n\t\t\t*c = 'U'\n\t\tcase cL, cLR, cLRN, cLRND:\n\t\t\tbreak\n\t\tdefault:\n\t\t\treturn errChunkType\n\t\t}\n\t// reset required\n\tcase 'R':\n\t\tswitch ctype {\n\t\tcase cEOS:\n\t\t\t*c = 'T'\n\t\tcase cUD, cU:\n\t\t\tbreak\n\t\tcase cLRN, cLRND:\n\t\t\t*c = 'L'\n\t\tdefault:\n\t\t\treturn errChunkType\n\t\t}\n\t// uncompressed\n\tcase 'U':\n\t\tswitch ctype {\n\t\tcase cEOS:\n\t\t\t*c = 'T'\n\t\tcase cUD:\n\t\t\t*c = 'R'\n\t\tcase cU:\n\t\t\tbreak\n\t\tcase cL, cLR, cLRN, cLRND:\n\t\t\t*c = 'L'\n\t\tdefault:\n\t\t\treturn errChunkType\n\t\t}\n\t// terminal state\n\tcase 'T':\n\t\treturn errChunkType\n\tdefault:\n\t\treturn errState\n\t}\n\treturn nil\n}\n\n// defaultChunkType returns the default chunk type for each chunk state.\nfunc (c chunkState) defaultChunkType() chunkType {\n\tswitch c {\n\tcase 'S':\n\t\treturn cLRND\n\tcase 'L', 'U':\n\t\treturn cL\n\tcase 'R':\n\t\treturn cLRN\n\tdefault:\n\t\t// no error\n\t\treturn cEOS\n\t}\n}\n\n// maxDictCap defines the maximum dictionary capacity supported by the\n// LZMA2 dictionary capacity encoding.\nconst maxDictCap = 1<<32 - 1\n\n// maxDictCapCode defines the maximum dictionary capacity code.\nconst maxDictCapCode = 40\n\n// The function decodes the dictionary capacity byte, but doesn't change\n// for the correct range of the given byte.\nfunc decodeDictCap(c byte) int64 {\n\treturn (2 | int64(c)&1) << (11 + (c>>1)&0x1f)\n}\n\n// DecodeDictCap decodes the encoded dictionary capacity. The function\n// returns an error if the code is out of range.\nfunc DecodeDictCap(c byte) (n int64, err error) {\n\tif c >= maxDictCapCode {\n\t\tif c == maxDictCapCode {\n\t\t\treturn maxDictCap, nil\n\t\t}\n\t\treturn 0, errors.New(\"lzma: invalid dictionary size code\")\n\t}\n\treturn decodeDictCap(c), nil\n}\n\n// EncodeDictCap encodes a dictionary capacity. The function returns the\n// code for the capacity that is greater or equal n. If n exceeds the\n// maximum support dictionary capacity, the maximum value is returned.\nfunc EncodeDictCap(n int64) byte {\n\ta, b := byte(0), byte(40)\n\tfor a < b {\n\t\tc := a + (b-a)>>1\n\t\tm := decodeDictCap(c)\n\t\tif n <= m {\n\t\t\tif n == m {\n\t\t\t\treturn c\n\t\t\t}\n\t\t\tb = c\n\t\t} else {\n\t\t\ta = c + 1\n\t\t}\n\t}\n\treturn a\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/lengthcodec.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport \"errors\"\n\n// maxPosBits defines the number of bits of the position value that are used to\n// to compute the posState value. The value is used to select the tree codec\n// for length encoding and decoding.\nconst maxPosBits = 4\n\n// minMatchLen and maxMatchLen give the minimum and maximum values for\n// encoding and decoding length values. minMatchLen is also used as base\n// for the encoded length values.\nconst (\n\tminMatchLen = 2\n\tmaxMatchLen = minMatchLen + 16 + 256 - 1\n)\n\n// lengthCodec support the encoding of the length value.\ntype lengthCodec struct {\n\tchoice [2]prob\n\tlow    [1 << maxPosBits]treeCodec\n\tmid    [1 << maxPosBits]treeCodec\n\thigh   treeCodec\n}\n\n// deepcopy initializes the lc value as deep copy of the source value.\nfunc (lc *lengthCodec) deepcopy(src *lengthCodec) {\n\tif lc == src {\n\t\treturn\n\t}\n\tlc.choice = src.choice\n\tfor i := range lc.low {\n\t\tlc.low[i].deepcopy(&src.low[i])\n\t}\n\tfor i := range lc.mid {\n\t\tlc.mid[i].deepcopy(&src.mid[i])\n\t}\n\tlc.high.deepcopy(&src.high)\n}\n\n// init initializes a new length codec.\nfunc (lc *lengthCodec) init() {\n\tfor i := range lc.choice {\n\t\tlc.choice[i] = probInit\n\t}\n\tfor i := range lc.low {\n\t\tlc.low[i] = makeTreeCodec(3)\n\t}\n\tfor i := range lc.mid {\n\t\tlc.mid[i] = makeTreeCodec(3)\n\t}\n\tlc.high = makeTreeCodec(8)\n}\n\n// Encode encodes the length offset. The length offset l can be compute by\n// subtracting minMatchLen (2) from the actual length.\n//\n//\tl = length - minMatchLen\nfunc (lc *lengthCodec) Encode(e *rangeEncoder, l uint32, posState uint32,\n) (err error) {\n\tif l > maxMatchLen-minMatchLen {\n\t\treturn errors.New(\"lengthCodec.Encode: l out of range\")\n\t}\n\tif l < 8 {\n\t\tif err = lc.choice[0].Encode(e, 0); err != nil {\n\t\t\treturn\n\t\t}\n\t\treturn lc.low[posState].Encode(e, l)\n\t}\n\tif err = lc.choice[0].Encode(e, 1); err != nil {\n\t\treturn\n\t}\n\tif l < 16 {\n\t\tif err = lc.choice[1].Encode(e, 0); err != nil {\n\t\t\treturn\n\t\t}\n\t\treturn lc.mid[posState].Encode(e, l-8)\n\t}\n\tif err = lc.choice[1].Encode(e, 1); err != nil {\n\t\treturn\n\t}\n\tif err = lc.high.Encode(e, l-16); err != nil {\n\t\treturn\n\t}\n\treturn nil\n}\n\n// Decode reads the length offset. Add minMatchLen to compute the actual length\n// to the length offset l.\nfunc (lc *lengthCodec) Decode(d *rangeDecoder, posState uint32,\n) (l uint32, err error) {\n\tvar b uint32\n\tif b, err = lc.choice[0].Decode(d); err != nil {\n\t\treturn\n\t}\n\tif b == 0 {\n\t\tl, err = lc.low[posState].Decode(d)\n\t\treturn\n\t}\n\tif b, err = lc.choice[1].Decode(d); err != nil {\n\t\treturn\n\t}\n\tif b == 0 {\n\t\tl, err = lc.mid[posState].Decode(d)\n\t\tl += 8\n\t\treturn\n\t}\n\tl, err = lc.high.Decode(d)\n\tl += 16\n\treturn\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/literalcodec.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// literalCodec supports the encoding of literal. It provides 768 probability\n// values per literal state. The upper 512 probabilities are used with the\n// context of a match bit.\ntype literalCodec struct {\n\tprobs []prob\n}\n\n// deepcopy initializes literal codec c as a deep copy of the source.\nfunc (c *literalCodec) deepcopy(src *literalCodec) {\n\tif c == src {\n\t\treturn\n\t}\n\tc.probs = make([]prob, len(src.probs))\n\tcopy(c.probs, src.probs)\n}\n\n// init initializes the literal codec.\nfunc (c *literalCodec) init(lc, lp int) {\n\tswitch {\n\tcase !(minLC <= lc && lc <= maxLC):\n\t\tpanic(\"lc out of range\")\n\tcase !(minLP <= lp && lp <= maxLP):\n\t\tpanic(\"lp out of range\")\n\t}\n\tc.probs = make([]prob, 0x300<<uint(lc+lp))\n\tfor i := range c.probs {\n\t\tc.probs[i] = probInit\n\t}\n}\n\n// Encode encodes the byte s using a range encoder as well as the current LZMA\n// encoder state, a match byte and the literal state.\nfunc (c *literalCodec) Encode(e *rangeEncoder, s byte,\n\tstate uint32, match byte, litState uint32,\n) (err error) {\n\tk := litState * 0x300\n\tprobs := c.probs[k : k+0x300]\n\tsymbol := uint32(1)\n\tr := uint32(s)\n\tif state >= 7 {\n\t\tm := uint32(match)\n\t\tfor {\n\t\t\tmatchBit := (m >> 7) & 1\n\t\t\tm <<= 1\n\t\t\tbit := (r >> 7) & 1\n\t\t\tr <<= 1\n\t\t\ti := ((1 + matchBit) << 8) | symbol\n\t\t\tif err = probs[i].Encode(e, bit); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsymbol = (symbol << 1) | bit\n\t\t\tif matchBit != bit {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif symbol >= 0x100 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tfor symbol < 0x100 {\n\t\tbit := (r >> 7) & 1\n\t\tr <<= 1\n\t\tif err = probs[symbol].Encode(e, bit); err != nil {\n\t\t\treturn\n\t\t}\n\t\tsymbol = (symbol << 1) | bit\n\t}\n\treturn nil\n}\n\n// Decode decodes a literal byte using the range decoder as well as the LZMA\n// state, a match byte, and the literal state.\nfunc (c *literalCodec) Decode(d *rangeDecoder,\n\tstate uint32, match byte, litState uint32,\n) (s byte, err error) {\n\tk := litState * 0x300\n\tprobs := c.probs[k : k+0x300]\n\tsymbol := uint32(1)\n\tif state >= 7 {\n\t\tm := uint32(match)\n\t\tfor {\n\t\t\tmatchBit := (m >> 7) & 1\n\t\t\tm <<= 1\n\t\t\ti := ((1 + matchBit) << 8) | symbol\n\t\t\tbit, err := d.DecodeBit(&probs[i])\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\tsymbol = (symbol << 1) | bit\n\t\t\tif matchBit != bit {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif symbol >= 0x100 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tfor symbol < 0x100 {\n\t\tbit, err := d.DecodeBit(&probs[symbol])\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tsymbol = (symbol << 1) | bit\n\t}\n\ts = byte(symbol - 0x100)\n\treturn s, nil\n}\n\n// minLC and maxLC define the range for LC values.\nconst (\n\tminLC = 0\n\tmaxLC = 8\n)\n\n// minLC and maxLC define the range for LP values.\nconst (\n\tminLP = 0\n\tmaxLP = 4\n)\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/matchalgorithm.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport \"errors\"\n\n// MatchAlgorithm identifies an algorithm to find matches in the\n// dictionary.\ntype MatchAlgorithm byte\n\n// Supported matcher algorithms.\nconst (\n\tHashTable4 MatchAlgorithm = iota\n\tBinaryTree\n)\n\n// maStrings are used by the String method.\nvar maStrings = map[MatchAlgorithm]string{\n\tHashTable4: \"HashTable4\",\n\tBinaryTree: \"BinaryTree\",\n}\n\n// String returns a string representation of the Matcher.\nfunc (a MatchAlgorithm) String() string {\n\tif s, ok := maStrings[a]; ok {\n\t\treturn s\n\t}\n\treturn \"unknown\"\n}\n\nvar errUnsupportedMatchAlgorithm = errors.New(\n\t\"lzma: unsupported match algorithm value\")\n\n// verify checks whether the matcher value is supported.\nfunc (a MatchAlgorithm) verify() error {\n\tif _, ok := maStrings[a]; !ok {\n\t\treturn errUnsupportedMatchAlgorithm\n\t}\n\treturn nil\n}\n\nfunc (a MatchAlgorithm) new(dictCap int) (m matcher, err error) {\n\tswitch a {\n\tcase HashTable4:\n\t\treturn newHashTable(dictCap, 4)\n\tcase BinaryTree:\n\t\treturn newBinTree(dictCap)\n\t}\n\treturn nil, errUnsupportedMatchAlgorithm\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/operation.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"fmt\"\n\t\"unicode\"\n)\n\n// operation represents an operation on the dictionary during encoding or\n// decoding.\ntype operation interface {\n\tLen() int\n}\n\n// rep represents a repetition at the given distance and the given length\ntype match struct {\n\t// supports all possible distance values, including the eos marker\n\tdistance int64\n\t// length\n\tn int\n}\n\n// Len returns the number of bytes matched.\nfunc (m match) Len() int {\n\treturn m.n\n}\n\n// String returns a string representation for the repetition.\nfunc (m match) String() string {\n\treturn fmt.Sprintf(\"M{%d,%d}\", m.distance, m.n)\n}\n\n// lit represents a single byte literal.\ntype lit struct {\n\tb byte\n}\n\n// Len returns 1 for the single byte literal.\nfunc (l lit) Len() int {\n\treturn 1\n}\n\n// String returns a string representation for the literal.\nfunc (l lit) String() string {\n\tvar c byte\n\tif unicode.IsPrint(rune(l.b)) {\n\t\tc = l.b\n\t} else {\n\t\tc = '.'\n\t}\n\treturn fmt.Sprintf(\"L{%c/%02x}\", c, l.b)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/prob.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// movebits defines the number of bits used for the updates of probability\n// values.\nconst movebits = 5\n\n// probbits defines the number of bits of a probability value.\nconst probbits = 11\n\n// probInit defines 0.5 as initial value for prob values.\nconst probInit prob = 1 << (probbits - 1)\n\n// Type prob represents probabilities. The type can also be used to encode and\n// decode single bits.\ntype prob uint16\n\n// Dec decreases the probability. The decrease is proportional to the\n// probability value.\nfunc (p *prob) dec() {\n\t*p -= *p >> movebits\n}\n\n// Inc increases the probability. The Increase is proportional to the\n// difference of 1 and the probability value.\nfunc (p *prob) inc() {\n\t*p += ((1 << probbits) - *p) >> movebits\n}\n\n// Computes the new bound for a given range using the probability value.\nfunc (p prob) bound(r uint32) uint32 {\n\treturn (r >> probbits) * uint32(p)\n}\n\n// Bits returns 1. One is the number of bits that can be encoded or decoded\n// with a single prob value.\nfunc (p prob) Bits() int {\n\treturn 1\n}\n\n// Encode encodes the least-significant bit of v. Note that the p value will be\n// changed.\nfunc (p *prob) Encode(e *rangeEncoder, v uint32) error {\n\treturn e.EncodeBit(v, p)\n}\n\n// Decode decodes a single bit. Note that the p value will change.\nfunc (p *prob) Decode(d *rangeDecoder) (v uint32, err error) {\n\treturn d.DecodeBit(p)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/properties.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// maximum and minimum values for the LZMA properties.\nconst (\n\tminPB = 0\n\tmaxPB = 4\n)\n\n// maxPropertyCode is the possible maximum of a properties code byte.\nconst maxPropertyCode = (maxPB+1)*(maxLP+1)*(maxLC+1) - 1\n\n// Properties contains the parameters LC, LP and PB. The parameter LC\n// defines the number of literal context bits; parameter LP the number\n// of literal position bits and PB the number of position bits.\ntype Properties struct {\n\tLC int\n\tLP int\n\tPB int\n}\n\n// String returns the properties in a string representation.\nfunc (p *Properties) String() string {\n\treturn fmt.Sprintf(\"LC %d LP %d PB %d\", p.LC, p.LP, p.PB)\n}\n\n// PropertiesForCode converts a properties code byte into a Properties value.\nfunc PropertiesForCode(code byte) (p Properties, err error) {\n\tif code > maxPropertyCode {\n\t\treturn p, errors.New(\"lzma: invalid properties code\")\n\t}\n\tp.LC = int(code % 9)\n\tcode /= 9\n\tp.LP = int(code % 5)\n\tcode /= 5\n\tp.PB = int(code % 5)\n\treturn p, err\n}\n\n// verify checks the properties for correctness.\nfunc (p *Properties) verify() error {\n\tif p == nil {\n\t\treturn errors.New(\"lzma: properties are nil\")\n\t}\n\tif !(minLC <= p.LC && p.LC <= maxLC) {\n\t\treturn errors.New(\"lzma: lc out of range\")\n\t}\n\tif !(minLP <= p.LP && p.LP <= maxLP) {\n\t\treturn errors.New(\"lzma: lp out of range\")\n\t}\n\tif !(minPB <= p.PB && p.PB <= maxPB) {\n\t\treturn errors.New(\"lzma: pb out of range\")\n\t}\n\treturn nil\n}\n\n// Code converts the properties to a byte. The function assumes that\n// the properties components are all in range.\nfunc (p Properties) Code() byte {\n\treturn byte((p.PB*5+p.LP)*9 + p.LC)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/rangecodec.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\n// rangeEncoder implements range encoding of single bits. The low value can\n// overflow therefore we need uint64. The cache value is used to handle\n// overflows.\ntype rangeEncoder struct {\n\tlbw      *LimitedByteWriter\n\tnrange   uint32\n\tlow      uint64\n\tcacheLen int64\n\tcache    byte\n}\n\n// maxInt64 provides the  maximal value of the int64 type\nconst maxInt64 = 1<<63 - 1\n\n// newRangeEncoder creates a new range encoder.\nfunc newRangeEncoder(bw io.ByteWriter) (re *rangeEncoder, err error) {\n\tlbw, ok := bw.(*LimitedByteWriter)\n\tif !ok {\n\t\tlbw = &LimitedByteWriter{BW: bw, N: maxInt64}\n\t}\n\treturn &rangeEncoder{\n\t\tlbw:      lbw,\n\t\tnrange:   0xffffffff,\n\t\tcacheLen: 1}, nil\n}\n\n// Available returns the number of bytes that still can be written. The\n// method takes the bytes that will be currently written by Close into\n// account.\nfunc (e *rangeEncoder) Available() int64 {\n\treturn e.lbw.N - (e.cacheLen + 4)\n}\n\n// writeByte writes a single byte to the underlying writer. An error is\n// returned if the limit is reached. The written byte will be counted if\n// the underlying writer doesn't return an error.\nfunc (e *rangeEncoder) writeByte(c byte) error {\n\tif e.Available() < 1 {\n\t\treturn ErrLimit\n\t}\n\treturn e.lbw.WriteByte(c)\n}\n\n// DirectEncodeBit encodes the least-significant bit of b with probability 1/2.\nfunc (e *rangeEncoder) DirectEncodeBit(b uint32) error {\n\te.nrange >>= 1\n\te.low += uint64(e.nrange) & (0 - (uint64(b) & 1))\n\n\t// normalize\n\tconst top = 1 << 24\n\tif e.nrange >= top {\n\t\treturn nil\n\t}\n\te.nrange <<= 8\n\treturn e.shiftLow()\n}\n\n// EncodeBit encodes the least significant bit of b. The p value will be\n// updated by the function depending on the bit encoded.\nfunc (e *rangeEncoder) EncodeBit(b uint32, p *prob) error {\n\tbound := p.bound(e.nrange)\n\tif b&1 == 0 {\n\t\te.nrange = bound\n\t\tp.inc()\n\t} else {\n\t\te.low += uint64(bound)\n\t\te.nrange -= bound\n\t\tp.dec()\n\t}\n\n\t// normalize\n\tconst top = 1 << 24\n\tif e.nrange >= top {\n\t\treturn nil\n\t}\n\te.nrange <<= 8\n\treturn e.shiftLow()\n}\n\n// Close writes a complete copy of the low value.\nfunc (e *rangeEncoder) Close() error {\n\tfor i := 0; i < 5; i++ {\n\t\tif err := e.shiftLow(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// shiftLow shifts the low value for 8 bit. The shifted byte is written into\n// the byte writer. The cache value is used to handle overflows.\nfunc (e *rangeEncoder) shiftLow() error {\n\tif uint32(e.low) < 0xff000000 || (e.low>>32) != 0 {\n\t\ttmp := e.cache\n\t\tfor {\n\t\t\terr := e.writeByte(tmp + byte(e.low>>32))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ttmp = 0xff\n\t\t\te.cacheLen--\n\t\t\tif e.cacheLen <= 0 {\n\t\t\t\tif e.cacheLen < 0 {\n\t\t\t\t\tpanic(\"negative cacheLen\")\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\te.cache = byte(uint32(e.low) >> 24)\n\t}\n\te.cacheLen++\n\te.low = uint64(uint32(e.low) << 8)\n\treturn nil\n}\n\n// rangeDecoder decodes single bits of the range encoding stream.\ntype rangeDecoder struct {\n\tbr     io.ByteReader\n\tnrange uint32\n\tcode   uint32\n}\n\n// newRangeDecoder initializes a range decoder. It reads five bytes from the\n// reader and therefore may return an error.\nfunc newRangeDecoder(br io.ByteReader) (d *rangeDecoder, err error) {\n\td = &rangeDecoder{br: br, nrange: 0xffffffff}\n\n\tb, err := d.br.ReadByte()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif b != 0 {\n\t\treturn nil, errors.New(\"newRangeDecoder: first byte not zero\")\n\t}\n\n\tfor i := 0; i < 4; i++ {\n\t\tif err = d.updateCode(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif d.code >= d.nrange {\n\t\treturn nil, errors.New(\"newRangeDecoder: d.code >= d.nrange\")\n\t}\n\n\treturn d, nil\n}\n\n// possiblyAtEnd checks whether the decoder may be at the end of the stream.\nfunc (d *rangeDecoder) possiblyAtEnd() bool {\n\treturn d.code == 0\n}\n\n// DirectDecodeBit decodes a bit with probability 1/2. The return value b will\n// contain the bit at the least-significant position. All other bits will be\n// zero.\nfunc (d *rangeDecoder) DirectDecodeBit() (b uint32, err error) {\n\td.nrange >>= 1\n\td.code -= d.nrange\n\tt := 0 - (d.code >> 31)\n\td.code += d.nrange & t\n\tb = (t + 1) & 1\n\n\t// d.code will stay less then d.nrange\n\n\t// normalize\n\t// assume d.code < d.nrange\n\tconst top = 1 << 24\n\tif d.nrange >= top {\n\t\treturn b, nil\n\t}\n\td.nrange <<= 8\n\t// d.code < d.nrange will be maintained\n\treturn b, d.updateCode()\n}\n\n// decodeBit decodes a single bit. The bit will be returned at the\n// least-significant position. All other bits will be zero. The probability\n// value will be updated.\nfunc (d *rangeDecoder) DecodeBit(p *prob) (b uint32, err error) {\n\tbound := p.bound(d.nrange)\n\tif d.code < bound {\n\t\td.nrange = bound\n\t\tp.inc()\n\t\tb = 0\n\t} else {\n\t\td.code -= bound\n\t\td.nrange -= bound\n\t\tp.dec()\n\t\tb = 1\n\t}\n\t// normalize\n\t// assume d.code < d.nrange\n\tconst top = 1 << 24\n\tif d.nrange >= top {\n\t\treturn b, nil\n\t}\n\td.nrange <<= 8\n\t// d.code < d.nrange will be maintained\n\treturn b, d.updateCode()\n}\n\n// updateCode reads a new byte into the code.\nfunc (d *rangeDecoder) updateCode() error {\n\tb, err := d.br.ReadByte()\n\tif err != nil {\n\t\treturn err\n\t}\n\td.code = (d.code << 8) | uint32(b)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/reader.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package lzma supports the decoding and encoding of LZMA streams.\n// Reader and Writer support the classic LZMA format. Reader2 and\n// Writer2 support the decoding and encoding of LZMA2 streams.\n//\n// The package is written completely in Go and does not rely on any external\n// library.\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// ReaderConfig stores the parameters for the reader of the classic LZMA\n// format.\ntype ReaderConfig struct {\n\t// Since v0.5.14 this parameter sets an upper limit for a .lzma file's\n\t// dictionary size. This helps to mitigate problems with mangled\n\t// headers.\n\tDictCap int\n}\n\n// fill converts the zero values of the configuration to the default values.\nfunc (c *ReaderConfig) fill() {\n\tif c.DictCap == 0 {\n\t\t// set an upper limit of 2 GiB-1 for dictionary capacity\n\t\t// to address the zero prefix security issue.\n\t\tc.DictCap = (1 << 31) - 1\n\t\t// original: c.DictCap = 8 * 1024 * 1024\n\t}\n}\n\n// Verify checks the reader configuration for errors. Zero values will\n// be replaced by default values.\nfunc (c *ReaderConfig) Verify() error {\n\tc.fill()\n\tif !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) {\n\t\treturn errors.New(\"lzma: dictionary capacity is out of range\")\n\t}\n\treturn nil\n}\n\n// Reader provides a reader for LZMA files or streams.\n//\n// # Security concerns\n//\n// Note that LZMA format doesn't support a magic marker in the header. So\n// [NewReader] cannot determine whether it reads the actual header. For instance\n// the LZMA stream might have a zero byte in front of the reader, leading to\n// larger dictionary sizes and file sizes. The code will detect later that there\n// are problems with the stream, but the dictionary has already been allocated\n// and this might consume a lot of memory.\n//\n// Version 0.5.14 introduces built-in mitigations:\n//\n//   - The [ReaderConfig] DictCap field is now interpreted as a limit for the\n//     dictionary size.\n//   - The default is 2 Gigabytes minus 1 byte (2^31-1 bytes).\n//   - Users can check with the [Reader.Header] method what the actual values are in\n//     their LZMA files and set a smaller limit using [ReaderConfig].\n//   - The dictionary size doesn't exceed the larger of the file size and\n//     the minimum dictionary size. This is another measure to prevent huge\n//     memory allocations for the dictionary.\n//   - The code supports stream sizes only up to a pebibyte (1024^5).\ntype Reader struct {\n\tlzma   io.Reader\n\theader Header\n\t// headerOrig stores the original header read from the stream.\n\theaderOrig Header\n\td          *decoder\n}\n\n// NewReader creates a new reader for an LZMA stream using the classic\n// format. NewReader reads and checks the header of the LZMA stream.\nfunc NewReader(lzma io.Reader) (r *Reader, err error) {\n\treturn ReaderConfig{}.NewReader(lzma)\n}\n\n// ErrDictSize reports about an error of the dictionary size.\ntype ErrDictSize struct {\n\tConfigDictCap  int\n\tHeaderDictSize uint32\n\tMessage        string\n}\n\n// Error returns the error message.\nfunc (e *ErrDictSize) Error() string {\n\treturn e.Message\n}\n\nfunc newErrDictSize(messageformat string,\n\tconfigDictCap int, headerDictSize uint32,\n\targs ...interface{}) *ErrDictSize {\n\tnewArgs := make([]interface{}, len(args)+2)\n\tnewArgs[0] = configDictCap\n\tnewArgs[1] = headerDictSize\n\tcopy(newArgs[2:], args)\n\treturn &ErrDictSize{\n\t\tConfigDictCap:  configDictCap,\n\t\tHeaderDictSize: headerDictSize,\n\t\tMessage:        fmt.Sprintf(messageformat, newArgs...),\n\t}\n}\n\n// We support only files not larger than 1 << 50 bytes (a pebibyte, 1024^5).\nconst maxStreamSize = 1 << 50\n\n// NewReader creates a new reader for an LZMA stream in the classic\n// format. The function reads and verifies the header of the LZMA\n// stream.\nfunc (c ReaderConfig) NewReader(lzma io.Reader) (r *Reader, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tdata := make([]byte, HeaderLen)\n\tif _, err := io.ReadFull(lzma, data); err != nil {\n\t\tif err == io.EOF {\n\t\t\treturn nil, errors.New(\"lzma: unexpected EOF\")\n\t\t}\n\t\treturn nil, err\n\t}\n\tr = &Reader{lzma: lzma}\n\tif err = r.header.unmarshalBinary(data); err != nil {\n\t\treturn nil, err\n\t}\n\tr.headerOrig = r.header\n\tdictSize := int64(r.header.DictSize)\n\tif int64(c.DictCap) < dictSize {\n\t\treturn nil, newErrDictSize(\n\t\t\t\"lzma: header dictionary size %[2]d exceeds configured dictionary capacity %[1]d\",\n\t\t\tc.DictCap, uint32(dictSize),\n\t\t)\n\t}\n\tif dictSize < MinDictCap {\n\t\tdictSize = MinDictCap\n\t}\n\t// original code: disabled this because there is no point in increasing\n\t// the dictionary above what is stated in the file.\n\t/*\n\t\tif int64(c.DictCap) > int64(dictSize) {\n\t\t\tdictSize = int64(c.DictCap)\n\t\t}\n\t*/\n\tsize := r.header.Size\n\tif size >= 0 && size < dictSize {\n\t\tdictSize = size\n\t}\n\t// Protect against modified or malicious headers.\n\tif size > maxStreamSize {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"lzma: stream size %d exceeds a pebibyte (1024^5)\",\n\t\t\tsize)\n\t}\n\tif dictSize < MinDictCap {\n\t\tdictSize = MinDictCap\n\t}\n\n\tr.header.DictSize = uint32(dictSize)\n\n\tstate := newState(r.header.Properties)\n\tdict, err := newDecoderDict(int(dictSize))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tr.d, err = newDecoder(ByteReader(lzma), state, dict, r.header.Size)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn r, nil\n}\n\n// Header returns the header as read from the LZMA stream. It is intended to\n// allow the user to understand what parameters are typically provided in the\n// headers of the LZMA files and set the DictCap field in [ReaderConfig]\n// accordingly.\nfunc (r *Reader) Header() (h Header, ok bool) {\n\treturn r.headerOrig, r.d != nil\n}\n\n// EOSMarker indicates that an EOS marker has been encountered.\nfunc (r *Reader) EOSMarker() bool {\n\treturn r.d.eosMarker\n}\n\n// Read returns uncompressed data.\nfunc (r *Reader) Read(p []byte) (n int, err error) {\n\treturn r.d.Read(p)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/reader2.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"errors\"\n\t\"io\"\n\n\t\"github.com/ulikunitz/xz/internal/xlog\"\n)\n\n// Reader2Config stores the parameters for the LZMA2 reader.\n// format.\ntype Reader2Config struct {\n\tDictCap int\n}\n\n// fill converts the zero values of the configuration to the default values.\nfunc (c *Reader2Config) fill() {\n\tif c.DictCap == 0 {\n\t\tc.DictCap = 8 * 1024 * 1024\n\t}\n}\n\n// Verify checks the reader configuration for errors. Zero configuration values\n// will be replaced by default values.\nfunc (c *Reader2Config) Verify() error {\n\tc.fill()\n\tif !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) {\n\t\treturn errors.New(\"lzma: dictionary capacity is out of range\")\n\t}\n\treturn nil\n}\n\n// Reader2 supports the reading of LZMA2 chunk sequences. Note that the\n// first chunk should have a dictionary reset and the first compressed\n// chunk a properties reset. The chunk sequence may not be terminated by\n// an end-of-stream chunk.\ntype Reader2 struct {\n\tr   io.Reader\n\terr error\n\n\tdict        *decoderDict\n\tur          *uncompressedReader\n\tdecoder     *decoder\n\tchunkReader io.Reader\n\n\tcstate chunkState\n}\n\n// NewReader2 creates a reader for an LZMA2 chunk sequence.\nfunc NewReader2(lzma2 io.Reader) (r *Reader2, err error) {\n\treturn Reader2Config{}.NewReader2(lzma2)\n}\n\n// NewReader2 creates an LZMA2 reader using the given configuration.\nfunc (c Reader2Config) NewReader2(lzma2 io.Reader) (r *Reader2, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tr = &Reader2{r: lzma2, cstate: start}\n\tr.dict, err = newDecoderDict(c.DictCap)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err = r.startChunk(); err != nil {\n\t\tr.err = err\n\t}\n\treturn r, nil\n}\n\n// uncompressed tests whether the chunk type specifies an uncompressed\n// chunk.\nfunc uncompressed(ctype chunkType) bool {\n\treturn ctype == cU || ctype == cUD\n}\n\n// startChunk parses a new chunk.\nfunc (r *Reader2) startChunk() error {\n\tr.chunkReader = nil\n\theader, err := readChunkHeader(r.r)\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn err\n\t}\n\txlog.Debugf(\"chunk header %v\", header)\n\tif err = r.cstate.next(header.ctype); err != nil {\n\t\treturn err\n\t}\n\tif r.cstate == stop {\n\t\treturn io.EOF\n\t}\n\tif header.ctype == cUD || header.ctype == cLRND {\n\t\tr.dict.Reset()\n\t}\n\tsize := int64(header.uncompressed) + 1\n\tif uncompressed(header.ctype) {\n\t\tif r.ur != nil {\n\t\t\tr.ur.Reopen(r.r, size)\n\t\t} else {\n\t\t\tr.ur = newUncompressedReader(r.r, r.dict, size)\n\t\t}\n\t\tr.chunkReader = r.ur\n\t\treturn nil\n\t}\n\tbr := ByteReader(io.LimitReader(r.r, int64(header.compressed)+1))\n\tif r.decoder == nil {\n\t\tstate := newState(header.props)\n\t\tr.decoder, err = newDecoder(br, state, r.dict, size)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tr.chunkReader = r.decoder\n\t\treturn nil\n\t}\n\tswitch header.ctype {\n\tcase cLR:\n\t\tr.decoder.State.Reset()\n\tcase cLRN, cLRND:\n\t\tr.decoder.State = newState(header.props)\n\t}\n\terr = r.decoder.Reopen(br, size)\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.chunkReader = r.decoder\n\treturn nil\n}\n\n// Read reads data from the LZMA2 chunk sequence.\nfunc (r *Reader2) Read(p []byte) (n int, err error) {\n\tif r.err != nil {\n\t\treturn 0, r.err\n\t}\n\tfor n < len(p) {\n\t\tvar k int\n\t\tk, err = r.chunkReader.Read(p[n:])\n\t\tn += k\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\terr = r.startChunk()\n\t\t\t\tif err == nil {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.err = err\n\t\t\treturn n, err\n\t\t}\n\t\tif k == 0 {\n\t\t\tr.err = errors.New(\"lzma: Reader2 doesn't get data\")\n\t\t\treturn n, r.err\n\t\t}\n\t}\n\treturn n, nil\n}\n\n// EOS returns whether the LZMA2 stream has been terminated by an\n// end-of-stream chunk.\nfunc (r *Reader2) EOS() bool {\n\treturn r.cstate == stop\n}\n\n// uncompressedReader is used to read uncompressed chunks.\ntype uncompressedReader struct {\n\tlr   io.LimitedReader\n\tDict *decoderDict\n\teof  bool\n\terr  error\n}\n\n// newUncompressedReader initializes a new uncompressedReader.\nfunc newUncompressedReader(r io.Reader, dict *decoderDict, size int64) *uncompressedReader {\n\tur := &uncompressedReader{\n\t\tlr:   io.LimitedReader{R: r, N: size},\n\t\tDict: dict,\n\t}\n\treturn ur\n}\n\n// Reopen reinitializes an uncompressed reader.\nfunc (ur *uncompressedReader) Reopen(r io.Reader, size int64) {\n\tur.err = nil\n\tur.eof = false\n\tur.lr = io.LimitedReader{R: r, N: size}\n}\n\n// fill reads uncompressed data into the dictionary.\nfunc (ur *uncompressedReader) fill() error {\n\tif !ur.eof {\n\t\tn, err := io.CopyN(ur.Dict, &ur.lr, int64(ur.Dict.Available()))\n\t\tif err != io.EOF {\n\t\t\treturn err\n\t\t}\n\t\tur.eof = true\n\t\tif n > 0 {\n\t\t\treturn nil\n\t\t}\n\t}\n\tif ur.lr.N != 0 {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\treturn io.EOF\n}\n\n// Read reads uncompressed data from the limited reader.\nfunc (ur *uncompressedReader) Read(p []byte) (n int, err error) {\n\tif ur.err != nil {\n\t\treturn 0, ur.err\n\t}\n\tfor {\n\t\tvar k int\n\t\tk, err = ur.Dict.Read(p[n:])\n\t\tn += k\n\t\tif n >= len(p) {\n\t\t\treturn n, nil\n\t\t}\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\terr = ur.fill()\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t}\n\tur.err = err\n\treturn n, err\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/state.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// states defines the overall state count\nconst states = 12\n\n// State maintains the full state of the operation encoding or decoding\n// process.\ntype state struct {\n\trep         [4]uint32\n\tisMatch     [states << maxPosBits]prob\n\tisRepG0Long [states << maxPosBits]prob\n\tisRep       [states]prob\n\tisRepG0     [states]prob\n\tisRepG1     [states]prob\n\tisRepG2     [states]prob\n\tlitCodec    literalCodec\n\tlenCodec    lengthCodec\n\trepLenCodec lengthCodec\n\tdistCodec   distCodec\n\tstate       uint32\n\tposBitMask  uint32\n\tProperties  Properties\n}\n\n// initProbSlice initializes a slice of probabilities.\nfunc initProbSlice(p []prob) {\n\tfor i := range p {\n\t\tp[i] = probInit\n\t}\n}\n\n// Reset sets all state information to the original values.\nfunc (s *state) Reset() {\n\tp := s.Properties\n\t*s = state{\n\t\tProperties: p,\n\t\t// dict:       s.dict,\n\t\tposBitMask: (uint32(1) << uint(p.PB)) - 1,\n\t}\n\tinitProbSlice(s.isMatch[:])\n\tinitProbSlice(s.isRep[:])\n\tinitProbSlice(s.isRepG0[:])\n\tinitProbSlice(s.isRepG1[:])\n\tinitProbSlice(s.isRepG2[:])\n\tinitProbSlice(s.isRepG0Long[:])\n\ts.litCodec.init(p.LC, p.LP)\n\ts.lenCodec.init()\n\ts.repLenCodec.init()\n\ts.distCodec.init()\n}\n\n// newState creates a new state from the give Properties.\nfunc newState(p Properties) *state {\n\ts := &state{Properties: p}\n\ts.Reset()\n\treturn s\n}\n\n// deepcopy initializes s as a deep copy of the source.\nfunc (s *state) deepcopy(src *state) {\n\tif s == src {\n\t\treturn\n\t}\n\ts.rep = src.rep\n\ts.isMatch = src.isMatch\n\ts.isRepG0Long = src.isRepG0Long\n\ts.isRep = src.isRep\n\ts.isRepG0 = src.isRepG0\n\ts.isRepG1 = src.isRepG1\n\ts.isRepG2 = src.isRepG2\n\ts.litCodec.deepcopy(&src.litCodec)\n\ts.lenCodec.deepcopy(&src.lenCodec)\n\ts.repLenCodec.deepcopy(&src.repLenCodec)\n\ts.distCodec.deepcopy(&src.distCodec)\n\ts.state = src.state\n\ts.posBitMask = src.posBitMask\n\ts.Properties = src.Properties\n}\n\n// cloneState creates a new clone of the give state.\nfunc cloneState(src *state) *state {\n\ts := new(state)\n\ts.deepcopy(src)\n\treturn s\n}\n\n// updateStateLiteral updates the state for a literal.\nfunc (s *state) updateStateLiteral() {\n\tswitch {\n\tcase s.state < 4:\n\t\ts.state = 0\n\t\treturn\n\tcase s.state < 10:\n\t\ts.state -= 3\n\t\treturn\n\t}\n\ts.state -= 6\n}\n\n// updateStateMatch updates the state for a match.\nfunc (s *state) updateStateMatch() {\n\tif s.state < 7 {\n\t\ts.state = 7\n\t} else {\n\t\ts.state = 10\n\t}\n}\n\n// updateStateRep updates the state for a repetition.\nfunc (s *state) updateStateRep() {\n\tif s.state < 7 {\n\t\ts.state = 8\n\t} else {\n\t\ts.state = 11\n\t}\n}\n\n// updateStateShortRep updates the state for a short repetition.\nfunc (s *state) updateStateShortRep() {\n\tif s.state < 7 {\n\t\ts.state = 9\n\t} else {\n\t\ts.state = 11\n\t}\n}\n\n// states computes the states of the operation codec.\nfunc (s *state) states(dictHead int64) (state1, state2, posState uint32) {\n\tstate1 = s.state\n\tposState = uint32(dictHead) & s.posBitMask\n\tstate2 = (s.state << maxPosBits) | posState\n\treturn\n}\n\n// litState computes the literal state.\nfunc (s *state) litState(prev byte, dictHead int64) uint32 {\n\tlp, lc := uint(s.Properties.LP), uint(s.Properties.LC)\n\tlitState := ((uint32(dictHead) & ((1 << lp) - 1)) << lc) |\n\t\t(uint32(prev) >> (8 - lc))\n\treturn litState\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/treecodecs.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\n// treeCodec encodes or decodes values with a fixed bit size. It is using a\n// tree of probability value. The root of the tree is the most-significant bit.\ntype treeCodec struct {\n\tprobTree\n}\n\n// makeTreeCodec makes a tree codec. The bits value must be inside the range\n// [1,32].\nfunc makeTreeCodec(bits int) treeCodec {\n\treturn treeCodec{makeProbTree(bits)}\n}\n\n// deepcopy initializes tc as a deep copy of the source.\nfunc (tc *treeCodec) deepcopy(src *treeCodec) {\n\ttc.probTree.deepcopy(&src.probTree)\n}\n\n// Encode uses the range encoder to encode a fixed-bit-size value.\nfunc (tc *treeCodec) Encode(e *rangeEncoder, v uint32) (err error) {\n\tm := uint32(1)\n\tfor i := int(tc.bits) - 1; i >= 0; i-- {\n\t\tb := (v >> uint(i)) & 1\n\t\tif err := e.EncodeBit(b, &tc.probs[m]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tm = (m << 1) | b\n\t}\n\treturn nil\n}\n\n// Decodes uses the range decoder to decode a fixed-bit-size value. Errors may\n// be caused by the range decoder.\nfunc (tc *treeCodec) Decode(d *rangeDecoder) (v uint32, err error) {\n\tm := uint32(1)\n\tfor j := 0; j < int(tc.bits); j++ {\n\t\tb, err := d.DecodeBit(&tc.probs[m])\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tm = (m << 1) | b\n\t}\n\treturn m - (1 << uint(tc.bits)), nil\n}\n\n// treeReverseCodec is another tree codec, where the least-significant bit is\n// the start of the probability tree.\ntype treeReverseCodec struct {\n\tprobTree\n}\n\n// deepcopy initializes the treeReverseCodec as a deep copy of the\n// source.\nfunc (tc *treeReverseCodec) deepcopy(src *treeReverseCodec) {\n\ttc.probTree.deepcopy(&src.probTree)\n}\n\n// makeTreeReverseCodec creates treeReverseCodec value. The bits argument must\n// be in the range [1,32].\nfunc makeTreeReverseCodec(bits int) treeReverseCodec {\n\treturn treeReverseCodec{makeProbTree(bits)}\n}\n\n// Encode uses range encoder to encode a fixed-bit-size value. The range\n// encoder may cause errors.\nfunc (tc *treeReverseCodec) Encode(v uint32, e *rangeEncoder) (err error) {\n\tm := uint32(1)\n\tfor i := uint(0); i < uint(tc.bits); i++ {\n\t\tb := (v >> i) & 1\n\t\tif err := e.EncodeBit(b, &tc.probs[m]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tm = (m << 1) | b\n\t}\n\treturn nil\n}\n\n// Decodes uses the range decoder to decode a fixed-bit-size value. Errors\n// returned by the range decoder will be returned.\nfunc (tc *treeReverseCodec) Decode(d *rangeDecoder) (v uint32, err error) {\n\tm := uint32(1)\n\tfor j := uint(0); j < uint(tc.bits); j++ {\n\t\tb, err := d.DecodeBit(&tc.probs[m])\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tm = (m << 1) | b\n\t\tv |= b << j\n\t}\n\treturn v, nil\n}\n\n// probTree stores enough probability values to be used by the treeEncode and\n// treeDecode methods of the range coder types.\ntype probTree struct {\n\tprobs []prob\n\tbits  byte\n}\n\n// deepcopy initializes the probTree value as a deep copy of the source.\nfunc (t *probTree) deepcopy(src *probTree) {\n\tif t == src {\n\t\treturn\n\t}\n\tt.probs = make([]prob, len(src.probs))\n\tcopy(t.probs, src.probs)\n\tt.bits = src.bits\n}\n\n// makeProbTree initializes a probTree structure.\nfunc makeProbTree(bits int) probTree {\n\tif !(1 <= bits && bits <= 32) {\n\t\tpanic(\"bits outside of range [1,32]\")\n\t}\n\tt := probTree{\n\t\tbits:  byte(bits),\n\t\tprobs: make([]prob, 1<<uint(bits)),\n\t}\n\tfor i := range t.probs {\n\t\tt.probs[i] = probInit\n\t}\n\treturn t\n}\n\n// Bits provides the number of bits for the values to de- or encode.\nfunc (t *probTree) Bits() int {\n\treturn int(t.bits)\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/writer.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"io\"\n)\n\n// MinDictCap and MaxDictCap provide the range of supported dictionary\n// capacities.\nconst (\n\tMinDictCap = 1 << 12\n\tMaxDictCap = 1<<32 - 1\n)\n\n// WriterConfig defines the configuration parameter for a writer.\ntype WriterConfig struct {\n\t// Properties for the encoding. If the it is nil the value\n\t// {LC: 3, LP: 0, PB: 2} will be chosen.\n\tProperties *Properties\n\t// The capacity of the dictionary. If DictCap is zero, the value\n\t// 8 MiB will be chosen.\n\tDictCap int\n\t// Size of the lookahead buffer; value 0 indicates default size\n\t// 4096\n\tBufSize int\n\t// Match algorithm\n\tMatcher MatchAlgorithm\n\t// SizeInHeader indicates that the header will contain an\n\t// explicit size.\n\tSizeInHeader bool\n\t// Size of the data to be encoded. A positive value will imply\n\t// than an explicit size will be set in the header.\n\tSize int64\n\t// EOSMarker requests whether the EOSMarker needs to be written.\n\t// If no explicit size is been given the EOSMarker will be\n\t// set automatically.\n\tEOSMarker bool\n}\n\n// fill converts zero-value fields to their explicit default values.\nfunc (c *WriterConfig) fill() {\n\tif c.Properties == nil {\n\t\tc.Properties = &Properties{LC: 3, LP: 0, PB: 2}\n\t}\n\tif c.DictCap == 0 {\n\t\tc.DictCap = 8 * 1024 * 1024\n\t}\n\tif c.BufSize == 0 {\n\t\tc.BufSize = 4096\n\t}\n\tif c.Size > 0 {\n\t\tc.SizeInHeader = true\n\t}\n\tif !c.SizeInHeader {\n\t\tc.EOSMarker = true\n\t}\n}\n\n// Verify checks WriterConfig for errors. Verify will replace zero\n// values with default values.\nfunc (c *WriterConfig) Verify() error {\n\tc.fill()\n\tvar err error\n\tif c == nil {\n\t\treturn errors.New(\"lzma: WriterConfig is nil\")\n\t}\n\tif c.Properties == nil {\n\t\treturn errors.New(\"lzma: WriterConfig has no Properties set\")\n\t}\n\tif err = c.Properties.verify(); err != nil {\n\t\treturn err\n\t}\n\tif !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) {\n\t\treturn errors.New(\"lzma: dictionary capacity is out of range\")\n\t}\n\tif !(maxMatchLen <= c.BufSize) {\n\t\treturn errors.New(\"lzma: lookahead buffer size too small\")\n\t}\n\tif c.SizeInHeader {\n\t\tif c.Size < 0 {\n\t\t\treturn errors.New(\"lzma: negative size not supported\")\n\t\t}\n\t} else if !c.EOSMarker {\n\t\treturn errors.New(\"lzma: EOS marker is required\")\n\t}\n\tif err = c.Matcher.verify(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// header returns the header structure for this configuration.\nfunc (c *WriterConfig) header() Header {\n\th := Header{\n\t\tProperties: *c.Properties,\n\t\tDictSize:   uint32(c.DictCap),\n\t\tSize:       -1,\n\t}\n\tif c.SizeInHeader {\n\t\th.Size = c.Size\n\t}\n\treturn h\n}\n\n// Writer writes an LZMA stream in the classic format.\ntype Writer struct {\n\th   Header\n\tbw  io.ByteWriter\n\tbuf *bufio.Writer\n\te   *encoder\n}\n\n// NewWriter creates a new LZMA writer for the classic format. The\n// method will write the header to the underlying stream.\nfunc (c WriterConfig) NewWriter(lzma io.Writer) (w *Writer, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tw = &Writer{h: c.header()}\n\n\tvar ok bool\n\tw.bw, ok = lzma.(io.ByteWriter)\n\tif !ok {\n\t\tw.buf = bufio.NewWriter(lzma)\n\t\tw.bw = w.buf\n\t}\n\tstate := newState(w.h.Properties)\n\tm, err := c.Matcher.new(int(w.h.DictSize))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdict, err := newEncoderDict(int(w.h.DictSize), c.BufSize, m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar flags encoderFlags\n\tif c.EOSMarker {\n\t\tflags = eosMarker\n\t}\n\tif w.e, err = newEncoder(w.bw, state, dict, flags); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err = w.writeHeader(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn w, nil\n}\n\n// NewWriter creates a new LZMA writer using the classic format. The\n// function writes the header to the underlying stream.\nfunc NewWriter(lzma io.Writer) (w *Writer, err error) {\n\treturn WriterConfig{}.NewWriter(lzma)\n}\n\n// writeHeader writes the LZMA header into the stream.\nfunc (w *Writer) writeHeader() error {\n\tdata, err := w.h.marshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = w.bw.(io.Writer).Write(data)\n\treturn err\n}\n\n// Write puts data into the Writer.\nfunc (w *Writer) Write(p []byte) (n int, err error) {\n\tif w.h.Size >= 0 {\n\t\tm := w.h.Size\n\t\tm -= w.e.Compressed() + int64(w.e.dict.Buffered())\n\t\tif m < 0 {\n\t\t\tm = 0\n\t\t}\n\t\tif m < int64(len(p)) {\n\t\t\tp = p[:m]\n\t\t\terr = ErrNoSpace\n\t\t}\n\t}\n\tvar werr error\n\tif n, werr = w.e.Write(p); werr != nil {\n\t\terr = werr\n\t}\n\treturn n, err\n}\n\n// Close closes the writer stream. It ensures that all data from the\n// buffer will be compressed and the LZMA stream will be finished.\nfunc (w *Writer) Close() error {\n\tif w.h.Size >= 0 {\n\t\tn := w.e.Compressed() + int64(w.e.dict.Buffered())\n\t\tif n != w.h.Size {\n\t\t\treturn errSize\n\t\t}\n\t}\n\terr := w.e.Close()\n\tif w.buf != nil {\n\t\tferr := w.buf.Flush()\n\t\tif err == nil {\n\t\t\terr = ferr\n\t\t}\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzma/writer2.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage lzma\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n)\n\n// Writer2Config is used to create a Writer2 using parameters.\ntype Writer2Config struct {\n\t// The properties for the encoding. If the it is nil the value\n\t// {LC: 3, LP: 0, PB: 2} will be chosen.\n\tProperties *Properties\n\t// The capacity of the dictionary. If DictCap is zero, the value\n\t// 8 MiB will be chosen.\n\tDictCap int\n\t// Size of the lookahead buffer; value 0 indicates default size\n\t// 4096\n\tBufSize int\n\t// Match algorithm\n\tMatcher MatchAlgorithm\n}\n\n// fill replaces zero values with default values.\nfunc (c *Writer2Config) fill() {\n\tif c.Properties == nil {\n\t\tc.Properties = &Properties{LC: 3, LP: 0, PB: 2}\n\t}\n\tif c.DictCap == 0 {\n\t\tc.DictCap = 8 * 1024 * 1024\n\t}\n\tif c.BufSize == 0 {\n\t\tc.BufSize = 4096\n\t}\n}\n\n// Verify checks the Writer2Config for correctness. Zero values will be\n// replaced by default values.\nfunc (c *Writer2Config) Verify() error {\n\tc.fill()\n\tvar err error\n\tif c == nil {\n\t\treturn errors.New(\"lzma: WriterConfig is nil\")\n\t}\n\tif c.Properties == nil {\n\t\treturn errors.New(\"lzma: WriterConfig has no Properties set\")\n\t}\n\tif err = c.Properties.verify(); err != nil {\n\t\treturn err\n\t}\n\tif !(MinDictCap <= c.DictCap && int64(c.DictCap) <= MaxDictCap) {\n\t\treturn errors.New(\"lzma: dictionary capacity is out of range\")\n\t}\n\tif !(maxMatchLen <= c.BufSize) {\n\t\treturn errors.New(\"lzma: lookahead buffer size too small\")\n\t}\n\tif c.Properties.LC+c.Properties.LP > 4 {\n\t\treturn errors.New(\"lzma: sum of lc and lp exceeds 4\")\n\t}\n\tif err = c.Matcher.verify(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Writer2 supports the creation of an LZMA2 stream. But note that\n// written data is buffered, so call Flush or Close to write data to the\n// underlying writer. The Close method writes the end-of-stream marker\n// to the stream. So you may be able to concatenate the output of two\n// writers as long the output of the first writer has only been flushed\n// but not closed.\n//\n// Any change to the fields Properties, DictCap must be done before the\n// first call to Write, Flush or Close.\ntype Writer2 struct {\n\tw io.Writer\n\n\tstart   *state\n\tencoder *encoder\n\n\tcstate chunkState\n\tctype  chunkType\n\n\tbuf bytes.Buffer\n\tlbw LimitedByteWriter\n}\n\n// NewWriter2 creates an LZMA2 chunk sequence writer with the default\n// parameters and options.\nfunc NewWriter2(lzma2 io.Writer) (w *Writer2, err error) {\n\treturn Writer2Config{}.NewWriter2(lzma2)\n}\n\n// NewWriter2 creates a new LZMA2 writer using the given configuration.\nfunc (c Writer2Config) NewWriter2(lzma2 io.Writer) (w *Writer2, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tw = &Writer2{\n\t\tw:      lzma2,\n\t\tstart:  newState(*c.Properties),\n\t\tcstate: start,\n\t\tctype:  start.defaultChunkType(),\n\t}\n\tw.buf.Grow(maxCompressed)\n\tw.lbw = LimitedByteWriter{BW: &w.buf, N: maxCompressed}\n\tm, err := c.Matcher.new(c.DictCap)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\td, err := newEncoderDict(c.DictCap, c.BufSize, m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tw.encoder, err = newEncoder(&w.lbw, cloneState(w.start), d, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn w, nil\n}\n\n// written returns the number of bytes written to the current chunk\nfunc (w *Writer2) written() int {\n\tif w.encoder == nil {\n\t\treturn 0\n\t}\n\treturn int(w.encoder.Compressed()) + w.encoder.dict.Buffered()\n}\n\n// errClosed indicates that the writer is closed.\nvar errClosed = errors.New(\"lzma: writer closed\")\n\n// Writes data to LZMA2 stream. Note that written data will be buffered.\n// Use Flush or Close to ensure that data is written to the underlying\n// writer.\nfunc (w *Writer2) Write(p []byte) (n int, err error) {\n\tif w.cstate == stop {\n\t\treturn 0, errClosed\n\t}\n\tfor n < len(p) {\n\t\tm := maxUncompressed - w.written()\n\t\tif m <= 0 {\n\t\t\tpanic(\"lzma: maxUncompressed reached\")\n\t\t}\n\t\tvar q []byte\n\t\tif n+m < len(p) {\n\t\t\tq = p[n : n+m]\n\t\t} else {\n\t\t\tq = p[n:]\n\t\t}\n\t\tk, err := w.encoder.Write(q)\n\t\tn += k\n\t\tif err != nil && err != ErrLimit {\n\t\t\treturn n, err\n\t\t}\n\t\tif err == ErrLimit || k == m {\n\t\t\tif err = w.flushChunk(); err != nil {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t}\n\treturn n, nil\n}\n\n// writeUncompressedChunk writes an uncompressed chunk to the LZMA2\n// stream.\nfunc (w *Writer2) writeUncompressedChunk() error {\n\tu := w.encoder.Compressed()\n\tif u <= 0 {\n\t\treturn errors.New(\"lzma: can't write empty uncompressed chunk\")\n\t}\n\tif u > maxUncompressed {\n\t\tpanic(\"overrun of uncompressed data limit\")\n\t}\n\tswitch w.ctype {\n\tcase cLRND:\n\t\tw.ctype = cUD\n\tdefault:\n\t\tw.ctype = cU\n\t}\n\tw.encoder.state = w.start\n\n\theader := chunkHeader{\n\t\tctype:        w.ctype,\n\t\tuncompressed: uint32(u - 1),\n\t}\n\thdata, err := header.MarshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err = w.w.Write(hdata); err != nil {\n\t\treturn err\n\t}\n\t_, err = w.encoder.dict.CopyN(w.w, int(u))\n\treturn err\n}\n\n// writeCompressedChunk writes a compressed chunk to the underlying\n// writer.\nfunc (w *Writer2) writeCompressedChunk() error {\n\tif w.ctype == cU || w.ctype == cUD {\n\t\tpanic(\"chunk type uncompressed\")\n\t}\n\n\tu := w.encoder.Compressed()\n\tif u <= 0 {\n\t\treturn errors.New(\"writeCompressedChunk: empty chunk\")\n\t}\n\tif u > maxUncompressed {\n\t\tpanic(\"overrun of uncompressed data limit\")\n\t}\n\tc := w.buf.Len()\n\tif c <= 0 {\n\t\tpanic(\"no compressed data\")\n\t}\n\tif c > maxCompressed {\n\t\tpanic(\"overrun of compressed data limit\")\n\t}\n\theader := chunkHeader{\n\t\tctype:        w.ctype,\n\t\tuncompressed: uint32(u - 1),\n\t\tcompressed:   uint16(c - 1),\n\t\tprops:        w.encoder.state.Properties,\n\t}\n\thdata, err := header.MarshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err = w.w.Write(hdata); err != nil {\n\t\treturn err\n\t}\n\t_, err = io.Copy(w.w, &w.buf)\n\treturn err\n}\n\n// writes a single chunk to the underlying writer.\nfunc (w *Writer2) writeChunk() error {\n\tu := int(uncompressedHeaderLen + w.encoder.Compressed())\n\tc := headerLen(w.ctype) + w.buf.Len()\n\tif u < c {\n\t\treturn w.writeUncompressedChunk()\n\t}\n\treturn w.writeCompressedChunk()\n}\n\n// flushChunk terminates the current chunk. The encoder will be reset\n// to support the next chunk.\nfunc (w *Writer2) flushChunk() error {\n\tif w.written() == 0 {\n\t\treturn nil\n\t}\n\tvar err error\n\tif err = w.encoder.Close(); err != nil {\n\t\treturn err\n\t}\n\tif err = w.writeChunk(); err != nil {\n\t\treturn err\n\t}\n\tw.buf.Reset()\n\tw.lbw.N = maxCompressed\n\tif err = w.encoder.Reopen(&w.lbw); err != nil {\n\t\treturn err\n\t}\n\tif err = w.cstate.next(w.ctype); err != nil {\n\t\treturn err\n\t}\n\tw.ctype = w.cstate.defaultChunkType()\n\tw.start = cloneState(w.encoder.state)\n\treturn nil\n}\n\n// Flush writes all buffered data out to the underlying stream. This\n// could result in multiple chunks to be created.\nfunc (w *Writer2) Flush() error {\n\tif w.cstate == stop {\n\t\treturn errClosed\n\t}\n\tfor w.written() > 0 {\n\t\tif err := w.flushChunk(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Close terminates the LZMA2 stream with an EOS chunk.\nfunc (w *Writer2) Close() error {\n\tif w.cstate == stop {\n\t\treturn errClosed\n\t}\n\tif err := w.Flush(); err != nil {\n\t\treturn nil\n\t}\n\t// write zero byte EOS chunk\n\t_, err := w.w.Write([]byte{0})\n\tif err != nil {\n\t\treturn err\n\t}\n\tw.cstate = stop\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/lzmafilter.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/ulikunitz/xz/lzma\"\n)\n\n// LZMA filter constants.\nconst (\n\tlzmaFilterID  = 0x21\n\tlzmaFilterLen = 3\n)\n\n// lzmaFilter declares the LZMA2 filter information stored in an xz\n// block header.\ntype lzmaFilter struct {\n\tdictCap int64\n}\n\n// String returns a representation of the LZMA filter.\nfunc (f lzmaFilter) String() string {\n\treturn fmt.Sprintf(\"LZMA dict cap %#x\", f.dictCap)\n}\n\n// id returns the ID for the LZMA2 filter.\nfunc (f lzmaFilter) id() uint64 { return lzmaFilterID }\n\n// MarshalBinary converts the lzmaFilter in its encoded representation.\nfunc (f lzmaFilter) MarshalBinary() (data []byte, err error) {\n\tc := lzma.EncodeDictCap(f.dictCap)\n\treturn []byte{lzmaFilterID, 1, c}, nil\n}\n\n// UnmarshalBinary unmarshals the given data representation of the LZMA2\n// filter.\nfunc (f *lzmaFilter) UnmarshalBinary(data []byte) error {\n\tif len(data) != lzmaFilterLen {\n\t\treturn errors.New(\"xz: data for LZMA2 filter has wrong length\")\n\t}\n\tif data[0] != lzmaFilterID {\n\t\treturn errors.New(\"xz: wrong LZMA2 filter id\")\n\t}\n\tif data[1] != 1 {\n\t\treturn errors.New(\"xz: wrong LZMA2 filter size\")\n\t}\n\tdc, err := lzma.DecodeDictCap(data[2])\n\tif err != nil {\n\t\treturn errors.New(\"xz: wrong LZMA2 dictionary size property\")\n\t}\n\n\tf.dictCap = dc\n\treturn nil\n}\n\n// reader creates a new reader for the LZMA2 filter.\nfunc (f lzmaFilter) reader(r io.Reader, c *ReaderConfig) (fr io.Reader,\n\terr error) {\n\n\tconfig := new(lzma.Reader2Config)\n\tif c != nil {\n\t\tconfig.DictCap = c.DictCap\n\t}\n\tdc := int(f.dictCap)\n\tif dc < 1 {\n\t\treturn nil, errors.New(\"xz: LZMA2 filter parameter \" +\n\t\t\t\"dictionary capacity overflow\")\n\t}\n\tif dc > config.DictCap {\n\t\tconfig.DictCap = dc\n\t}\n\n\tfr, err = config.NewReader2(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fr, nil\n}\n\n// writeCloser creates a io.WriteCloser for the LZMA2 filter.\nfunc (f lzmaFilter) writeCloser(w io.WriteCloser, c *WriterConfig,\n) (fw io.WriteCloser, err error) {\n\tconfig := new(lzma.Writer2Config)\n\tif c != nil {\n\t\t*config = lzma.Writer2Config{\n\t\t\tProperties: c.Properties,\n\t\t\tDictCap:    c.DictCap,\n\t\t\tBufSize:    c.BufSize,\n\t\t\tMatcher:    c.Matcher,\n\t\t}\n\t}\n\n\tdc := int(f.dictCap)\n\tif dc < 1 {\n\t\treturn nil, errors.New(\"xz: LZMA2 filter parameter \" +\n\t\t\t\"dictionary capacity overflow\")\n\t}\n\tif dc > config.DictCap {\n\t\tconfig.DictCap = dc\n\t}\n\n\tfw, err = config.NewWriter2(w)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fw, nil\n}\n\n// last returns true, because an LZMA2 filter must be the last filter in\n// the filter list.\nfunc (f lzmaFilter) last() bool { return true }\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/make-docs",
    "content": "#!/bin/sh\n\nset -x\npandoc -t html5 -f markdown -s --css=doc/md.css -o README.html README.md\npandoc -t html5 -f markdown -s --css=doc/md.css -o TODO.html TODO.md\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/none-check.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport \"hash\"\n\ntype noneHash struct{}\n\nfunc (h noneHash) Write(p []byte) (n int, err error) { return len(p), nil }\n\nfunc (h noneHash) Sum(b []byte) []byte { return b }\n\nfunc (h noneHash) Reset() {}\n\nfunc (h noneHash) Size() int { return 0 }\n\nfunc (h noneHash) BlockSize() int { return 0 }\n\nfunc newNoneHash() hash.Hash {\n\treturn &noneHash{}\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/reader.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package xz supports the compression and decompression of xz files. It\n// supports version 1.0.4 of the specification without the non-LZMA2\n// filters. See http://tukaani.org/xz/xz-file-format-1.0.4.txt\npackage xz\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\n\t\"github.com/ulikunitz/xz/internal/xlog\"\n\t\"github.com/ulikunitz/xz/lzma\"\n)\n\n// ReaderConfig defines the parameters for the xz reader. The\n// SingleStream parameter requests the reader to assume that the\n// underlying stream contains only a single stream.\ntype ReaderConfig struct {\n\tDictCap      int\n\tSingleStream bool\n}\n\n// Verify checks the reader parameters for Validity. Zero values will be\n// replaced by default values.\nfunc (c *ReaderConfig) Verify() error {\n\tif c == nil {\n\t\treturn errors.New(\"xz: reader parameters are nil\")\n\t}\n\tlc := lzma.Reader2Config{DictCap: c.DictCap}\n\tif err := lc.Verify(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Reader supports the reading of one or multiple xz streams.\ntype Reader struct {\n\tReaderConfig\n\n\txz io.Reader\n\tsr *streamReader\n}\n\n// streamReader decodes a single xz stream\ntype streamReader struct {\n\tReaderConfig\n\n\txz      io.Reader\n\tbr      *blockReader\n\tnewHash func() hash.Hash\n\th       header\n\tindex   []record\n}\n\n// NewReader creates a new xz reader using the default parameters.\n// The function reads and checks the header of the first XZ stream. The\n// reader will process multiple streams including padding.\nfunc NewReader(xz io.Reader) (r *Reader, err error) {\n\treturn ReaderConfig{}.NewReader(xz)\n}\n\n// NewReader creates an xz stream reader. The created reader will be\n// able to process multiple streams and padding unless a SingleStream\n// has been set in the reader configuration c.\nfunc (c ReaderConfig) NewReader(xz io.Reader) (r *Reader, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tr = &Reader{\n\t\tReaderConfig: c,\n\t\txz:           xz,\n\t}\n\tif r.sr, err = c.newStreamReader(xz); err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn r, nil\n}\n\nvar errUnexpectedData = errors.New(\"xz: unexpected data after stream\")\n\n// Read reads uncompressed data from the stream.\nfunc (r *Reader) Read(p []byte) (n int, err error) {\n\tfor n < len(p) {\n\t\tif r.sr == nil {\n\t\t\tif r.SingleStream {\n\t\t\t\tdata := make([]byte, 1)\n\t\t\t\t_, err = io.ReadFull(r.xz, data)\n\t\t\t\tif err != io.EOF {\n\t\t\t\t\treturn n, errUnexpectedData\n\t\t\t\t}\n\t\t\t\treturn n, io.EOF\n\t\t\t}\n\t\t\tfor {\n\t\t\t\tr.sr, err = r.ReaderConfig.newStreamReader(r.xz)\n\t\t\t\tif err != errPadding {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t\tk, err := r.sr.Read(p[n:])\n\t\tn += k\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tr.sr = nil\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn n, err\n\t\t}\n\t}\n\treturn n, nil\n}\n\nvar errPadding = errors.New(\"xz: padding (4 zero bytes) encountered\")\n\n// newStreamReader creates a new xz stream reader using the given configuration\n// parameters. NewReader reads and checks the header of the xz stream.\nfunc (c ReaderConfig) newStreamReader(xz io.Reader) (r *streamReader, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tdata := make([]byte, HeaderLen)\n\tif _, err := io.ReadFull(xz, data[:4]); err != nil {\n\t\treturn nil, err\n\t}\n\tif bytes.Equal(data[:4], []byte{0, 0, 0, 0}) {\n\t\treturn nil, errPadding\n\t}\n\tif _, err = io.ReadFull(xz, data[4:]); err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn nil, err\n\t}\n\tr = &streamReader{\n\t\tReaderConfig: c,\n\t\txz:           xz,\n\t\tindex:        make([]record, 0, 4),\n\t}\n\tif err = r.h.UnmarshalBinary(data); err != nil {\n\t\treturn nil, err\n\t}\n\txlog.Debugf(\"xz header %s\", r.h)\n\tif r.newHash, err = newHashFunc(r.h.flags); err != nil {\n\t\treturn nil, err\n\t}\n\treturn r, nil\n}\n\n// readTail reads the index body and the xz footer.\nfunc (r *streamReader) readTail() error {\n\tindex, n, err := readIndexBody(r.xz, len(r.index))\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn err\n\t}\n\n\tfor i, rec := range r.index {\n\t\tif rec != index[i] {\n\t\t\treturn fmt.Errorf(\"xz: record %d is %v; want %v\",\n\t\t\t\ti, rec, index[i])\n\t\t}\n\t}\n\n\tp := make([]byte, footerLen)\n\tif _, err = io.ReadFull(r.xz, p); err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn err\n\t}\n\tvar f footer\n\tif err = f.UnmarshalBinary(p); err != nil {\n\t\treturn err\n\t}\n\txlog.Debugf(\"xz footer %s\", f)\n\tif f.flags != r.h.flags {\n\t\treturn errors.New(\"xz: footer flags incorrect\")\n\t}\n\tif f.indexSize != int64(n)+1 {\n\t\treturn errors.New(\"xz: index size in footer wrong\")\n\t}\n\treturn nil\n}\n\n// Read reads actual data from the xz stream.\nfunc (r *streamReader) Read(p []byte) (n int, err error) {\n\tfor n < len(p) {\n\t\tif r.br == nil {\n\t\t\tbh, hlen, err := readBlockHeader(r.xz)\n\t\t\tif err != nil {\n\t\t\t\tif err == errIndexIndicator {\n\t\t\t\t\tif err = r.readTail(); err != nil {\n\t\t\t\t\t\treturn n, err\n\t\t\t\t\t}\n\t\t\t\t\treturn n, io.EOF\n\t\t\t\t}\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t\txlog.Debugf(\"block %v\", *bh)\n\t\t\tr.br, err = r.ReaderConfig.newBlockReader(r.xz, bh,\n\t\t\t\thlen, r.newHash())\n\t\t\tif err != nil {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t\tk, err := r.br.Read(p[n:])\n\t\tn += k\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tr.index = append(r.index, r.br.record())\n\t\t\t\tr.br = nil\n\t\t\t} else {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t}\n\t}\n\treturn n, nil\n}\n\n// countingReader is a reader that counts the bytes read.\ntype countingReader struct {\n\tr io.Reader\n\tn int64\n}\n\n// Read reads data from the wrapped reader and adds it to the n field.\nfunc (lr *countingReader) Read(p []byte) (n int, err error) {\n\tn, err = lr.r.Read(p)\n\tlr.n += int64(n)\n\treturn n, err\n}\n\n// blockReader supports the reading of a block.\ntype blockReader struct {\n\tlxz       countingReader\n\theader    *blockHeader\n\theaderLen int\n\tn         int64\n\thash      hash.Hash\n\tr         io.Reader\n}\n\n// newBlockReader creates a new block reader.\nfunc (c *ReaderConfig) newBlockReader(xz io.Reader, h *blockHeader,\n\thlen int, hash hash.Hash) (br *blockReader, err error) {\n\n\tbr = &blockReader{\n\t\tlxz:       countingReader{r: xz},\n\t\theader:    h,\n\t\theaderLen: hlen,\n\t\thash:      hash,\n\t}\n\n\tfr, err := c.newFilterReader(&br.lxz, h.filters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif br.hash.Size() != 0 {\n\t\tbr.r = io.TeeReader(fr, br.hash)\n\t} else {\n\t\tbr.r = fr\n\t}\n\n\treturn br, nil\n}\n\n// uncompressedSize returns the uncompressed size of the block.\nfunc (br *blockReader) uncompressedSize() int64 {\n\treturn br.n\n}\n\n// compressedSize returns the compressed size of the block.\nfunc (br *blockReader) compressedSize() int64 {\n\treturn br.lxz.n\n}\n\n// unpaddedSize computes the unpadded size for the block.\nfunc (br *blockReader) unpaddedSize() int64 {\n\tn := int64(br.headerLen)\n\tn += br.compressedSize()\n\tn += int64(br.hash.Size())\n\treturn n\n}\n\n// record returns the index record for the current block.\nfunc (br *blockReader) record() record {\n\treturn record{br.unpaddedSize(), br.uncompressedSize()}\n}\n\n// Read reads data from the block.\nfunc (br *blockReader) Read(p []byte) (n int, err error) {\n\tn, err = br.r.Read(p)\n\tbr.n += int64(n)\n\n\tu := br.header.uncompressedSize\n\tif u >= 0 && br.uncompressedSize() > u {\n\t\treturn n, errors.New(\"xz: wrong uncompressed size for block\")\n\t}\n\tc := br.header.compressedSize\n\tif c >= 0 && br.compressedSize() > c {\n\t\treturn n, errors.New(\"xz: wrong compressed size for block\")\n\t}\n\tif err != io.EOF {\n\t\treturn n, err\n\t}\n\tif br.uncompressedSize() < u || br.compressedSize() < c {\n\t\treturn n, io.ErrUnexpectedEOF\n\t}\n\n\ts := br.hash.Size()\n\tk := padLen(br.lxz.n)\n\tq := make([]byte, k+s, k+2*s)\n\tif _, err = io.ReadFull(br.lxz.r, q); err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn n, err\n\t}\n\tif !allZeros(q[:k]) {\n\t\treturn n, errors.New(\"xz: non-zero block padding\")\n\t}\n\tcheckSum := q[k:]\n\tcomputedSum := br.hash.Sum(checkSum[s:])\n\tif !bytes.Equal(checkSum, computedSum) {\n\t\treturn n, errors.New(\"xz: checksum error for block\")\n\t}\n\treturn n, io.EOF\n}\n\nfunc (c *ReaderConfig) newFilterReader(r io.Reader, f []filter) (fr io.Reader,\n\terr error) {\n\n\tif err = verifyFilters(f); err != nil {\n\t\treturn nil, err\n\t}\n\n\tfr = r\n\tfor i := len(f) - 1; i >= 0; i-- {\n\t\tfr, err = f[i].reader(fr, c)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn fr, nil\n}\n"
  },
  {
    "path": "vendor/github.com/ulikunitz/xz/writer.go",
    "content": "// Copyright 2014-2022 Ulrich Kunitz. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage xz\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\n\t\"github.com/ulikunitz/xz/lzma\"\n)\n\n// WriterConfig describe the parameters for an xz writer.\ntype WriterConfig struct {\n\tProperties *lzma.Properties\n\tDictCap    int\n\tBufSize    int\n\tBlockSize  int64\n\t// checksum method: CRC32, CRC64 or SHA256 (default: CRC64)\n\tCheckSum byte\n\t// Forces NoChecksum (default: false)\n\tNoCheckSum bool\n\t// match algorithm\n\tMatcher lzma.MatchAlgorithm\n}\n\n// fill replaces zero values with default values.\nfunc (c *WriterConfig) fill() {\n\tif c.Properties == nil {\n\t\tc.Properties = &lzma.Properties{LC: 3, LP: 0, PB: 2}\n\t}\n\tif c.DictCap == 0 {\n\t\tc.DictCap = 8 * 1024 * 1024\n\t}\n\tif c.BufSize == 0 {\n\t\tc.BufSize = 4096\n\t}\n\tif c.BlockSize == 0 {\n\t\tc.BlockSize = maxInt64\n\t}\n\tif c.CheckSum == 0 {\n\t\tc.CheckSum = CRC64\n\t}\n\tif c.NoCheckSum {\n\t\tc.CheckSum = None\n\t}\n}\n\n// Verify checks the configuration for errors. Zero values will be\n// replaced by default values.\nfunc (c *WriterConfig) Verify() error {\n\tif c == nil {\n\t\treturn errors.New(\"xz: writer configuration is nil\")\n\t}\n\tc.fill()\n\tlc := lzma.Writer2Config{\n\t\tProperties: c.Properties,\n\t\tDictCap:    c.DictCap,\n\t\tBufSize:    c.BufSize,\n\t\tMatcher:    c.Matcher,\n\t}\n\tif err := lc.Verify(); err != nil {\n\t\treturn err\n\t}\n\tif c.BlockSize <= 0 {\n\t\treturn errors.New(\"xz: block size out of range\")\n\t}\n\tif err := verifyFlags(c.CheckSum); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// filters creates the filter list for the given parameters.\nfunc (c *WriterConfig) filters() []filter {\n\treturn []filter{&lzmaFilter{int64(c.DictCap)}}\n}\n\n// maxInt64 defines the maximum 64-bit signed integer.\nconst maxInt64 = 1<<63 - 1\n\n// verifyFilters checks the filter list for the length and the right\n// sequence of filters.\nfunc verifyFilters(f []filter) error {\n\tif len(f) == 0 {\n\t\treturn errors.New(\"xz: no filters\")\n\t}\n\tif len(f) > 4 {\n\t\treturn errors.New(\"xz: more than four filters\")\n\t}\n\tfor _, g := range f[:len(f)-1] {\n\t\tif g.last() {\n\t\t\treturn errors.New(\"xz: last filter is not last\")\n\t\t}\n\t}\n\tif !f[len(f)-1].last() {\n\t\treturn errors.New(\"xz: wrong last filter\")\n\t}\n\treturn nil\n}\n\n// newFilterWriteCloser converts a filter list into a WriteCloser that\n// can be used by a blockWriter.\nfunc (c *WriterConfig) newFilterWriteCloser(w io.Writer, f []filter) (fw io.WriteCloser, err error) {\n\tif err = verifyFilters(f); err != nil {\n\t\treturn nil, err\n\t}\n\tfw = nopWriteCloser(w)\n\tfor i := len(f) - 1; i >= 0; i-- {\n\t\tfw, err = f[i].writeCloser(fw, c)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn fw, nil\n}\n\n// nopWCloser implements a WriteCloser with a Close method not doing\n// anything.\ntype nopWCloser struct {\n\tio.Writer\n}\n\n// Close returns nil and doesn't do anything else.\nfunc (c nopWCloser) Close() error {\n\treturn nil\n}\n\n// nopWriteCloser converts the Writer into a WriteCloser with a Close\n// function that does nothing beside returning nil.\nfunc nopWriteCloser(w io.Writer) io.WriteCloser {\n\treturn nopWCloser{w}\n}\n\n// Writer compresses data written to it. It is an io.WriteCloser.\ntype Writer struct {\n\tWriterConfig\n\n\txz      io.Writer\n\tbw      *blockWriter\n\tnewHash func() hash.Hash\n\th       header\n\tindex   []record\n\tclosed  bool\n}\n\n// newBlockWriter creates a new block writer writes the header out.\nfunc (w *Writer) newBlockWriter() error {\n\tvar err error\n\tw.bw, err = w.WriterConfig.newBlockWriter(w.xz, w.newHash())\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err = w.bw.writeHeader(w.xz); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// closeBlockWriter closes a block writer and records the sizes in the\n// index.\nfunc (w *Writer) closeBlockWriter() error {\n\tvar err error\n\tif err = w.bw.Close(); err != nil {\n\t\treturn err\n\t}\n\tw.index = append(w.index, w.bw.record())\n\treturn nil\n}\n\n// NewWriter creates a new xz writer using default parameters.\nfunc NewWriter(xz io.Writer) (w *Writer, err error) {\n\treturn WriterConfig{}.NewWriter(xz)\n}\n\n// NewWriter creates a new Writer using the given configuration parameters.\nfunc (c WriterConfig) NewWriter(xz io.Writer) (w *Writer, err error) {\n\tif err = c.Verify(); err != nil {\n\t\treturn nil, err\n\t}\n\tw = &Writer{\n\t\tWriterConfig: c,\n\t\txz:           xz,\n\t\th:            header{c.CheckSum},\n\t\tindex:        make([]record, 0, 4),\n\t}\n\tif w.newHash, err = newHashFunc(c.CheckSum); err != nil {\n\t\treturn nil, err\n\t}\n\tdata, err := w.h.MarshalBinary()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"w.h.MarshalBinary(): error %w\", err)\n\t}\n\tif _, err = xz.Write(data); err != nil {\n\t\treturn nil, err\n\t}\n\tif err = w.newBlockWriter(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn w, nil\n\n}\n\n// Write compresses the uncompressed data provided.\nfunc (w *Writer) Write(p []byte) (n int, err error) {\n\tif w.closed {\n\t\treturn 0, errClosed\n\t}\n\tfor {\n\t\tk, err := w.bw.Write(p[n:])\n\t\tn += k\n\t\tif err != errNoSpace {\n\t\t\treturn n, err\n\t\t}\n\t\tif err = w.closeBlockWriter(); err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tif err = w.newBlockWriter(); err != nil {\n\t\t\treturn n, err\n\t\t}\n\t}\n}\n\n// Close closes the writer and adds the footer to the Writer. Close\n// doesn't close the underlying writer.\nfunc (w *Writer) Close() error {\n\tif w.closed {\n\t\treturn errClosed\n\t}\n\tw.closed = true\n\tvar err error\n\tif err = w.closeBlockWriter(); err != nil {\n\t\treturn err\n\t}\n\n\tf := footer{flags: w.h.flags}\n\tif f.indexSize, err = writeIndex(w.xz, w.index); err != nil {\n\t\treturn err\n\t}\n\tdata, err := f.MarshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err = w.xz.Write(data); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// countingWriter is a writer that counts all data written to it.\ntype countingWriter struct {\n\tw io.Writer\n\tn int64\n}\n\n// Write writes data to the countingWriter.\nfunc (cw *countingWriter) Write(p []byte) (n int, err error) {\n\tn, err = cw.w.Write(p)\n\tcw.n += int64(n)\n\tif err == nil && cw.n < 0 {\n\t\treturn n, errors.New(\"xz: counter overflow\")\n\t}\n\treturn\n}\n\n// blockWriter is writes a single block.\ntype blockWriter struct {\n\tcxz countingWriter\n\t// mw combines io.WriteCloser w and the hash.\n\tmw        io.Writer\n\tw         io.WriteCloser\n\tn         int64\n\tblockSize int64\n\tclosed    bool\n\theaderLen int\n\n\tfilters []filter\n\thash    hash.Hash\n}\n\n// newBlockWriter creates a new block writer.\nfunc (c *WriterConfig) newBlockWriter(xz io.Writer, hash hash.Hash) (bw *blockWriter, err error) {\n\tbw = &blockWriter{\n\t\tcxz:       countingWriter{w: xz},\n\t\tblockSize: c.BlockSize,\n\t\tfilters:   c.filters(),\n\t\thash:      hash,\n\t}\n\tbw.w, err = c.newFilterWriteCloser(&bw.cxz, bw.filters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif bw.hash.Size() != 0 {\n\t\tbw.mw = io.MultiWriter(bw.w, bw.hash)\n\t} else {\n\t\tbw.mw = bw.w\n\t}\n\treturn bw, nil\n}\n\n// writeHeader writes the header. If the function is called after Close\n// the commpressedSize and uncompressedSize fields will be filled.\nfunc (bw *blockWriter) writeHeader(w io.Writer) error {\n\th := blockHeader{\n\t\tcompressedSize:   -1,\n\t\tuncompressedSize: -1,\n\t\tfilters:          bw.filters,\n\t}\n\tif bw.closed {\n\t\th.compressedSize = bw.compressedSize()\n\t\th.uncompressedSize = bw.uncompressedSize()\n\t}\n\tdata, err := h.MarshalBinary()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err = w.Write(data); err != nil {\n\t\treturn err\n\t}\n\tbw.headerLen = len(data)\n\treturn nil\n}\n\n// compressed size returns the amount of data written to the underlying\n// stream.\nfunc (bw *blockWriter) compressedSize() int64 {\n\treturn bw.cxz.n\n}\n\n// uncompressedSize returns the number of data written to the\n// blockWriter\nfunc (bw *blockWriter) uncompressedSize() int64 {\n\treturn bw.n\n}\n\n// unpaddedSize returns the sum of the header length, the uncompressed\n// size of the block and the hash size.\nfunc (bw *blockWriter) unpaddedSize() int64 {\n\tif bw.headerLen <= 0 {\n\t\tpanic(\"xz: block header not written\")\n\t}\n\tn := int64(bw.headerLen)\n\tn += bw.compressedSize()\n\tn += int64(bw.hash.Size())\n\treturn n\n}\n\n// record returns the record for the current stream. Call Close before\n// calling this method.\nfunc (bw *blockWriter) record() record {\n\treturn record{bw.unpaddedSize(), bw.uncompressedSize()}\n}\n\nvar errClosed = errors.New(\"xz: writer already closed\")\n\nvar errNoSpace = errors.New(\"xz: no space\")\n\n// Write writes uncompressed data to the block writer.\nfunc (bw *blockWriter) Write(p []byte) (n int, err error) {\n\tif bw.closed {\n\t\treturn 0, errClosed\n\t}\n\n\tt := bw.blockSize - bw.n\n\tif int64(len(p)) > t {\n\t\terr = errNoSpace\n\t\tp = p[:t]\n\t}\n\n\tvar werr error\n\tn, werr = bw.mw.Write(p)\n\tbw.n += int64(n)\n\tif werr != nil {\n\t\treturn n, werr\n\t}\n\treturn n, err\n}\n\n// Close closes the writer.\nfunc (bw *blockWriter) Close() error {\n\tif bw.closed {\n\t\treturn errClosed\n\t}\n\tbw.closed = true\n\tif err := bw.w.Close(); err != nil {\n\t\treturn err\n\t}\n\ts := bw.hash.Size()\n\tk := padLen(bw.cxz.n)\n\tp := make([]byte, k+s)\n\tbw.hash.Sum(p[k:k])\n\tif _, err := bw.cxz.w.Write(p); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/LICENSE",
    "content": "Copyright (c) 2015 Vincent Batts, Raleigh, NC, USA\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\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\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/common.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package tar implements access to tar archives.\n//\n// Tape archives (tar) are a file format for storing a sequence of files that\n// can be read and written in a streaming manner.\n// This package aims to cover most variations of the format,\n// including those produced by GNU and BSD tar tools.\npackage tar\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"path\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// BUG: Use of the Uid and Gid fields in Header could overflow on 32-bit\n// architectures. If a large value is encountered when decoding, the result\n// stored in Header will be the truncated version.\n\nvar (\n\tErrHeader          = errors.New(\"archive/tar: invalid tar header\")\n\tErrWriteTooLong    = errors.New(\"archive/tar: write too long\")\n\tErrFieldTooLong    = errors.New(\"archive/tar: header field too long\")\n\tErrWriteAfterClose = errors.New(\"archive/tar: write after close\")\n\terrMissData        = errors.New(\"archive/tar: sparse file references non-existent data\")\n\terrUnrefData       = errors.New(\"archive/tar: sparse file contains unreferenced data\")\n\terrWriteHole       = errors.New(\"archive/tar: write non-NUL byte in sparse hole\")\n\terrSparseTooLong   = errors.New(\"archive/tar: sparse map too long\")\n)\n\ntype headerError []string\n\nfunc (he headerError) Error() string {\n\tconst prefix = \"archive/tar: cannot encode header\"\n\tvar ss []string\n\tfor _, s := range he {\n\t\tif s != \"\" {\n\t\t\tss = append(ss, s)\n\t\t}\n\t}\n\tif len(ss) == 0 {\n\t\treturn prefix\n\t}\n\treturn fmt.Sprintf(\"%s: %v\", prefix, strings.Join(ss, \"; and \"))\n}\n\n// Type flags for Header.Typeflag.\nconst (\n\t// Type '0' indicates a regular file.\n\tTypeReg  = '0'\n\tTypeRegA = '\\x00' // Deprecated: Use TypeReg instead.\n\n\t// Type '1' to '6' are header-only flags and may not have a data body.\n\tTypeLink    = '1' // Hard link\n\tTypeSymlink = '2' // Symbolic link\n\tTypeChar    = '3' // Character device node\n\tTypeBlock   = '4' // Block device node\n\tTypeDir     = '5' // Directory\n\tTypeFifo    = '6' // FIFO node\n\n\t// Type '7' is reserved.\n\tTypeCont = '7'\n\n\t// Type 'x' is used by the PAX format to store key-value records that\n\t// are only relevant to the next file.\n\t// This package transparently handles these types.\n\tTypeXHeader = 'x'\n\n\t// Type 'g' is used by the PAX format to store key-value records that\n\t// are relevant to all subsequent files.\n\t// This package only supports parsing and composing such headers,\n\t// but does not currently support persisting the global state across files.\n\tTypeXGlobalHeader = 'g'\n\n\t// Type 'S' indicates a sparse file in the GNU format.\n\tTypeGNUSparse = 'S'\n\n\t// Types 'L' and 'K' are used by the GNU format for a meta file\n\t// used to store the path or link name for the next file.\n\t// This package transparently handles these types.\n\tTypeGNULongName = 'L'\n\tTypeGNULongLink = 'K'\n)\n\n// Keywords for PAX extended header records.\nconst (\n\tpaxNone     = \"\" // Indicates that no PAX key is suitable\n\tpaxPath     = \"path\"\n\tpaxLinkpath = \"linkpath\"\n\tpaxSize     = \"size\"\n\tpaxUid      = \"uid\"\n\tpaxGid      = \"gid\"\n\tpaxUname    = \"uname\"\n\tpaxGname    = \"gname\"\n\tpaxMtime    = \"mtime\"\n\tpaxAtime    = \"atime\"\n\tpaxCtime    = \"ctime\"   // Removed from later revision of PAX spec, but was valid\n\tpaxCharset  = \"charset\" // Currently unused\n\tpaxComment  = \"comment\" // Currently unused\n\n\tpaxSchilyXattr = \"SCHILY.xattr.\"\n\n\t// Keywords for GNU sparse files in a PAX extended header.\n\tpaxGNUSparse          = \"GNU.sparse.\"\n\tpaxGNUSparseNumBlocks = \"GNU.sparse.numblocks\"\n\tpaxGNUSparseOffset    = \"GNU.sparse.offset\"\n\tpaxGNUSparseNumBytes  = \"GNU.sparse.numbytes\"\n\tpaxGNUSparseMap       = \"GNU.sparse.map\"\n\tpaxGNUSparseName      = \"GNU.sparse.name\"\n\tpaxGNUSparseMajor     = \"GNU.sparse.major\"\n\tpaxGNUSparseMinor     = \"GNU.sparse.minor\"\n\tpaxGNUSparseSize      = \"GNU.sparse.size\"\n\tpaxGNUSparseRealSize  = \"GNU.sparse.realsize\"\n)\n\n// basicKeys is a set of the PAX keys for which we have built-in support.\n// This does not contain \"charset\" or \"comment\", which are both PAX-specific,\n// so adding them as first-class features of Header is unlikely.\n// Users can use the PAXRecords field to set it themselves.\nvar basicKeys = map[string]bool{\n\tpaxPath: true, paxLinkpath: true, paxSize: true, paxUid: true, paxGid: true,\n\tpaxUname: true, paxGname: true, paxMtime: true, paxAtime: true, paxCtime: true,\n}\n\n// A Header represents a single header in a tar archive.\n// Some fields may not be populated.\n//\n// For forward compatibility, users that retrieve a Header from Reader.Next,\n// mutate it in some ways, and then pass it back to Writer.WriteHeader\n// should do so by creating a new Header and copying the fields\n// that they are interested in preserving.\ntype Header struct {\n\t// Typeflag is the type of header entry.\n\t// The zero value is automatically promoted to either TypeReg or TypeDir\n\t// depending on the presence of a trailing slash in Name.\n\tTypeflag byte\n\n\tName     string // Name of file entry\n\tLinkname string // Target name of link (valid for TypeLink or TypeSymlink)\n\n\tSize  int64  // Logical file size in bytes\n\tMode  int64  // Permission and mode bits\n\tUid   int    // User ID of owner\n\tGid   int    // Group ID of owner\n\tUname string // User name of owner\n\tGname string // Group name of owner\n\n\t// If the Format is unspecified, then Writer.WriteHeader rounds ModTime\n\t// to the nearest second and ignores the AccessTime and ChangeTime fields.\n\t//\n\t// To use AccessTime or ChangeTime, specify the Format as PAX or GNU.\n\t// To use sub-second resolution, specify the Format as PAX.\n\tModTime    time.Time // Modification time\n\tAccessTime time.Time // Access time (requires either PAX or GNU support)\n\tChangeTime time.Time // Change time (requires either PAX or GNU support)\n\n\tDevmajor int64 // Major device number (valid for TypeChar or TypeBlock)\n\tDevminor int64 // Minor device number (valid for TypeChar or TypeBlock)\n\n\t// Xattrs stores extended attributes as PAX records under the\n\t// \"SCHILY.xattr.\" namespace.\n\t//\n\t// The following are semantically equivalent:\n\t//  h.Xattrs[key] = value\n\t//  h.PAXRecords[\"SCHILY.xattr.\"+key] = value\n\t//\n\t// When Writer.WriteHeader is called, the contents of Xattrs will take\n\t// precedence over those in PAXRecords.\n\t//\n\t// Deprecated: Use PAXRecords instead.\n\tXattrs map[string]string\n\n\t// PAXRecords is a map of PAX extended header records.\n\t//\n\t// User-defined records should have keys of the following form:\n\t//\tVENDOR.keyword\n\t// Where VENDOR is some namespace in all uppercase, and keyword may\n\t// not contain the '=' character (e.g., \"GOLANG.pkg.version\").\n\t// The key and value should be non-empty UTF-8 strings.\n\t//\n\t// When Writer.WriteHeader is called, PAX records derived from the\n\t// other fields in Header take precedence over PAXRecords.\n\tPAXRecords map[string]string\n\n\t// Format specifies the format of the tar header.\n\t//\n\t// This is set by Reader.Next as a best-effort guess at the format.\n\t// Since the Reader liberally reads some non-compliant files,\n\t// it is possible for this to be FormatUnknown.\n\t//\n\t// If the format is unspecified when Writer.WriteHeader is called,\n\t// then it uses the first format (in the order of USTAR, PAX, GNU)\n\t// capable of encoding this Header (see Format).\n\tFormat Format\n}\n\n// sparseEntry represents a Length-sized fragment at Offset in the file.\ntype sparseEntry struct{ Offset, Length int64 }\n\nfunc (s sparseEntry) endOffset() int64 { return s.Offset + s.Length }\n\n// A sparse file can be represented as either a sparseDatas or a sparseHoles.\n// As long as the total size is known, they are equivalent and one can be\n// converted to the other form and back. The various tar formats with sparse\n// file support represent sparse files in the sparseDatas form. That is, they\n// specify the fragments in the file that has data, and treat everything else as\n// having zero bytes. As such, the encoding and decoding logic in this package\n// deals with sparseDatas.\n//\n// However, the external API uses sparseHoles instead of sparseDatas because the\n// zero value of sparseHoles logically represents a normal file (i.e., there are\n// no holes in it). On the other hand, the zero value of sparseDatas implies\n// that the file has no data in it, which is rather odd.\n//\n// As an example, if the underlying raw file contains the 10-byte data:\n//\tvar compactFile = \"abcdefgh\"\n//\n// And the sparse map has the following entries:\n//\tvar spd sparseDatas = []sparseEntry{\n//\t\t{Offset: 2,  Length: 5},  // Data fragment for 2..6\n//\t\t{Offset: 18, Length: 3},  // Data fragment for 18..20\n//\t}\n//\tvar sph sparseHoles = []sparseEntry{\n//\t\t{Offset: 0,  Length: 2},  // Hole fragment for 0..1\n//\t\t{Offset: 7,  Length: 11}, // Hole fragment for 7..17\n//\t\t{Offset: 21, Length: 4},  // Hole fragment for 21..24\n//\t}\n//\n// Then the content of the resulting sparse file with a Header.Size of 25 is:\n//\tvar sparseFile = \"\\x00\"*2 + \"abcde\" + \"\\x00\"*11 + \"fgh\" + \"\\x00\"*4\ntype (\n\tsparseDatas []sparseEntry\n\tsparseHoles []sparseEntry\n)\n\n// validateSparseEntries reports whether sp is a valid sparse map.\n// It does not matter whether sp represents data fragments or hole fragments.\nfunc validateSparseEntries(sp []sparseEntry, size int64) bool {\n\t// Validate all sparse entries. These are the same checks as performed by\n\t// the BSD tar utility.\n\tif size < 0 {\n\t\treturn false\n\t}\n\tvar pre sparseEntry\n\tfor _, cur := range sp {\n\t\tswitch {\n\t\tcase cur.Offset < 0 || cur.Length < 0:\n\t\t\treturn false // Negative values are never okay\n\t\tcase cur.Offset > math.MaxInt64-cur.Length:\n\t\t\treturn false // Integer overflow with large length\n\t\tcase cur.endOffset() > size:\n\t\t\treturn false // Region extends beyond the actual size\n\t\tcase pre.endOffset() > cur.Offset:\n\t\t\treturn false // Regions cannot overlap and must be in order\n\t\t}\n\t\tpre = cur\n\t}\n\treturn true\n}\n\n// alignSparseEntries mutates src and returns dst where each fragment's\n// starting offset is aligned up to the nearest block edge, and each\n// ending offset is aligned down to the nearest block edge.\n//\n// Even though the Go tar Reader and the BSD tar utility can handle entries\n// with arbitrary offsets and lengths, the GNU tar utility can only handle\n// offsets and lengths that are multiples of blockSize.\nfunc alignSparseEntries(src []sparseEntry, size int64) []sparseEntry {\n\tdst := src[:0]\n\tfor _, s := range src {\n\t\tpos, end := s.Offset, s.endOffset()\n\t\tpos += blockPadding(+pos) // Round-up to nearest blockSize\n\t\tif end != size {\n\t\t\tend -= blockPadding(-end) // Round-down to nearest blockSize\n\t\t}\n\t\tif pos < end {\n\t\t\tdst = append(dst, sparseEntry{Offset: pos, Length: end - pos})\n\t\t}\n\t}\n\treturn dst\n}\n\n// invertSparseEntries converts a sparse map from one form to the other.\n// If the input is sparseHoles, then it will output sparseDatas and vice-versa.\n// The input must have been already validated.\n//\n// This function mutates src and returns a normalized map where:\n//\t* adjacent fragments are coalesced together\n//\t* only the last fragment may be empty\n//\t* the endOffset of the last fragment is the total size\nfunc invertSparseEntries(src []sparseEntry, size int64) []sparseEntry {\n\tdst := src[:0]\n\tvar pre sparseEntry\n\tfor _, cur := range src {\n\t\tif cur.Length == 0 {\n\t\t\tcontinue // Skip empty fragments\n\t\t}\n\t\tpre.Length = cur.Offset - pre.Offset\n\t\tif pre.Length > 0 {\n\t\t\tdst = append(dst, pre) // Only add non-empty fragments\n\t\t}\n\t\tpre.Offset = cur.endOffset()\n\t}\n\tpre.Length = size - pre.Offset // Possibly the only empty fragment\n\treturn append(dst, pre)\n}\n\n// fileState tracks the number of logical (includes sparse holes) and physical\n// (actual in tar archive) bytes remaining for the current file.\n//\n// Invariant: LogicalRemaining >= PhysicalRemaining\ntype fileState interface {\n\tLogicalRemaining() int64\n\tPhysicalRemaining() int64\n}\n\n// allowedFormats determines which formats can be used.\n// The value returned is the logical OR of multiple possible formats.\n// If the value is FormatUnknown, then the input Header cannot be encoded\n// and an error is returned explaining why.\n//\n// As a by-product of checking the fields, this function returns paxHdrs, which\n// contain all fields that could not be directly encoded.\n// A value receiver ensures that this method does not mutate the source Header.\nfunc (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err error) {\n\tformat = FormatUSTAR | FormatPAX | FormatGNU\n\tpaxHdrs = make(map[string]string)\n\n\tvar whyNoUSTAR, whyNoPAX, whyNoGNU string\n\tvar preferPAX bool // Prefer PAX over USTAR\n\tverifyString := func(s string, size int, name, paxKey string) {\n\t\t// NUL-terminator is optional for path and linkpath.\n\t\t// Technically, it is required for uname and gname,\n\t\t// but neither GNU nor BSD tar checks for it.\n\t\ttooLong := len(s) > size\n\t\tallowLongGNU := paxKey == paxPath || paxKey == paxLinkpath\n\t\tif hasNUL(s) || (tooLong && !allowLongGNU) {\n\t\t\twhyNoGNU = fmt.Sprintf(\"GNU cannot encode %s=%q\", name, s)\n\t\t\tformat.mustNotBe(FormatGNU)\n\t\t}\n\t\tif !isASCII(s) || tooLong {\n\t\t\tcanSplitUSTAR := paxKey == paxPath\n\t\t\tif _, _, ok := splitUSTARPath(s); !canSplitUSTAR || !ok {\n\t\t\t\twhyNoUSTAR = fmt.Sprintf(\"USTAR cannot encode %s=%q\", name, s)\n\t\t\t\tformat.mustNotBe(FormatUSTAR)\n\t\t\t}\n\t\t\tif paxKey == paxNone {\n\t\t\t\twhyNoPAX = fmt.Sprintf(\"PAX cannot encode %s=%q\", name, s)\n\t\t\t\tformat.mustNotBe(FormatPAX)\n\t\t\t} else {\n\t\t\t\tpaxHdrs[paxKey] = s\n\t\t\t}\n\t\t}\n\t\tif v, ok := h.PAXRecords[paxKey]; ok && v == s {\n\t\t\tpaxHdrs[paxKey] = v\n\t\t}\n\t}\n\tverifyNumeric := func(n int64, size int, name, paxKey string) {\n\t\tif !fitsInBase256(size, n) {\n\t\t\twhyNoGNU = fmt.Sprintf(\"GNU cannot encode %s=%d\", name, n)\n\t\t\tformat.mustNotBe(FormatGNU)\n\t\t}\n\t\tif !fitsInOctal(size, n) {\n\t\t\twhyNoUSTAR = fmt.Sprintf(\"USTAR cannot encode %s=%d\", name, n)\n\t\t\tformat.mustNotBe(FormatUSTAR)\n\t\t\tif paxKey == paxNone {\n\t\t\t\twhyNoPAX = fmt.Sprintf(\"PAX cannot encode %s=%d\", name, n)\n\t\t\t\tformat.mustNotBe(FormatPAX)\n\t\t\t} else {\n\t\t\t\tpaxHdrs[paxKey] = strconv.FormatInt(n, 10)\n\t\t\t}\n\t\t}\n\t\tif v, ok := h.PAXRecords[paxKey]; ok && v == strconv.FormatInt(n, 10) {\n\t\t\tpaxHdrs[paxKey] = v\n\t\t}\n\t}\n\tverifyTime := func(ts time.Time, size int, name, paxKey string) {\n\t\tif ts.IsZero() {\n\t\t\treturn // Always okay\n\t\t}\n\t\tif !fitsInBase256(size, ts.Unix()) {\n\t\t\twhyNoGNU = fmt.Sprintf(\"GNU cannot encode %s=%v\", name, ts)\n\t\t\tformat.mustNotBe(FormatGNU)\n\t\t}\n\t\tisMtime := paxKey == paxMtime\n\t\tfitsOctal := fitsInOctal(size, ts.Unix())\n\t\tif (isMtime && !fitsOctal) || !isMtime {\n\t\t\twhyNoUSTAR = fmt.Sprintf(\"USTAR cannot encode %s=%v\", name, ts)\n\t\t\tformat.mustNotBe(FormatUSTAR)\n\t\t}\n\t\tneedsNano := ts.Nanosecond() != 0\n\t\tif !isMtime || !fitsOctal || needsNano {\n\t\t\tpreferPAX = true // USTAR may truncate sub-second measurements\n\t\t\tif paxKey == paxNone {\n\t\t\t\twhyNoPAX = fmt.Sprintf(\"PAX cannot encode %s=%v\", name, ts)\n\t\t\t\tformat.mustNotBe(FormatPAX)\n\t\t\t} else {\n\t\t\t\tpaxHdrs[paxKey] = formatPAXTime(ts)\n\t\t\t}\n\t\t}\n\t\tif v, ok := h.PAXRecords[paxKey]; ok && v == formatPAXTime(ts) {\n\t\t\tpaxHdrs[paxKey] = v\n\t\t}\n\t}\n\n\t// Check basic fields.\n\tvar blk block\n\tv7 := blk.V7()\n\tustar := blk.USTAR()\n\tgnu := blk.GNU()\n\tverifyString(h.Name, len(v7.Name()), \"Name\", paxPath)\n\tverifyString(h.Linkname, len(v7.LinkName()), \"Linkname\", paxLinkpath)\n\tverifyString(h.Uname, len(ustar.UserName()), \"Uname\", paxUname)\n\tverifyString(h.Gname, len(ustar.GroupName()), \"Gname\", paxGname)\n\tverifyNumeric(h.Mode, len(v7.Mode()), \"Mode\", paxNone)\n\tverifyNumeric(int64(h.Uid), len(v7.UID()), \"Uid\", paxUid)\n\tverifyNumeric(int64(h.Gid), len(v7.GID()), \"Gid\", paxGid)\n\tverifyNumeric(h.Size, len(v7.Size()), \"Size\", paxSize)\n\tverifyNumeric(h.Devmajor, len(ustar.DevMajor()), \"Devmajor\", paxNone)\n\tverifyNumeric(h.Devminor, len(ustar.DevMinor()), \"Devminor\", paxNone)\n\tverifyTime(h.ModTime, len(v7.ModTime()), \"ModTime\", paxMtime)\n\tverifyTime(h.AccessTime, len(gnu.AccessTime()), \"AccessTime\", paxAtime)\n\tverifyTime(h.ChangeTime, len(gnu.ChangeTime()), \"ChangeTime\", paxCtime)\n\n\t// Check for header-only types.\n\tvar whyOnlyPAX, whyOnlyGNU string\n\tswitch h.Typeflag {\n\tcase TypeReg, TypeChar, TypeBlock, TypeFifo, TypeGNUSparse:\n\t\t// Exclude TypeLink and TypeSymlink, since they may reference directories.\n\t\tif strings.HasSuffix(h.Name, \"/\") {\n\t\t\treturn FormatUnknown, nil, headerError{\"filename may not have trailing slash\"}\n\t\t}\n\tcase TypeXHeader, TypeGNULongName, TypeGNULongLink:\n\t\treturn FormatUnknown, nil, headerError{\"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink headers\"}\n\tcase TypeXGlobalHeader:\n\t\th2 := Header{Name: h.Name, Typeflag: h.Typeflag, Xattrs: h.Xattrs, PAXRecords: h.PAXRecords, Format: h.Format}\n\t\tif !reflect.DeepEqual(h, h2) {\n\t\t\treturn FormatUnknown, nil, headerError{\"only PAXRecords should be set for TypeXGlobalHeader\"}\n\t\t}\n\t\twhyOnlyPAX = \"only PAX supports TypeXGlobalHeader\"\n\t\tformat.mayOnlyBe(FormatPAX)\n\t}\n\tif !isHeaderOnlyType(h.Typeflag) && h.Size < 0 {\n\t\treturn FormatUnknown, nil, headerError{\"negative size on header-only type\"}\n\t}\n\n\t// Check PAX records.\n\tif len(h.Xattrs) > 0 {\n\t\tfor k, v := range h.Xattrs {\n\t\t\tpaxHdrs[paxSchilyXattr+k] = v\n\t\t}\n\t\twhyOnlyPAX = \"only PAX supports Xattrs\"\n\t\tformat.mayOnlyBe(FormatPAX)\n\t}\n\tif len(h.PAXRecords) > 0 {\n\t\tfor k, v := range h.PAXRecords {\n\t\t\tswitch _, exists := paxHdrs[k]; {\n\t\t\tcase exists:\n\t\t\t\tcontinue // Do not overwrite existing records\n\t\t\tcase h.Typeflag == TypeXGlobalHeader:\n\t\t\t\tpaxHdrs[k] = v // Copy all records\n\t\t\tcase !basicKeys[k] && !strings.HasPrefix(k, paxGNUSparse):\n\t\t\t\tpaxHdrs[k] = v // Ignore local records that may conflict\n\t\t\t}\n\t\t}\n\t\twhyOnlyPAX = \"only PAX supports PAXRecords\"\n\t\tformat.mayOnlyBe(FormatPAX)\n\t}\n\tfor k, v := range paxHdrs {\n\t\tif !validPAXRecord(k, v) {\n\t\t\treturn FormatUnknown, nil, headerError{fmt.Sprintf(\"invalid PAX record: %q\", k+\" = \"+v)}\n\t\t}\n\t}\n\n\t// TODO(dsnet): Re-enable this when adding sparse support.\n\t// See https://golang.org/issue/22735\n\t/*\n\t\t// Check sparse files.\n\t\tif len(h.SparseHoles) > 0 || h.Typeflag == TypeGNUSparse {\n\t\t\tif isHeaderOnlyType(h.Typeflag) {\n\t\t\t\treturn FormatUnknown, nil, headerError{\"header-only type cannot be sparse\"}\n\t\t\t}\n\t\t\tif !validateSparseEntries(h.SparseHoles, h.Size) {\n\t\t\t\treturn FormatUnknown, nil, headerError{\"invalid sparse holes\"}\n\t\t\t}\n\t\t\tif h.Typeflag == TypeGNUSparse {\n\t\t\t\twhyOnlyGNU = \"only GNU supports TypeGNUSparse\"\n\t\t\t\tformat.mayOnlyBe(FormatGNU)\n\t\t\t} else {\n\t\t\t\twhyNoGNU = \"GNU supports sparse files only with TypeGNUSparse\"\n\t\t\t\tformat.mustNotBe(FormatGNU)\n\t\t\t}\n\t\t\twhyNoUSTAR = \"USTAR does not support sparse files\"\n\t\t\tformat.mustNotBe(FormatUSTAR)\n\t\t}\n\t*/\n\n\t// Check desired format.\n\tif wantFormat := h.Format; wantFormat != FormatUnknown {\n\t\tif wantFormat.has(FormatPAX) && !preferPAX {\n\t\t\twantFormat.mayBe(FormatUSTAR) // PAX implies USTAR allowed too\n\t\t}\n\t\tformat.mayOnlyBe(wantFormat) // Set union of formats allowed and format wanted\n\t}\n\tif format == FormatUnknown {\n\t\tswitch h.Format {\n\t\tcase FormatUSTAR:\n\t\t\terr = headerError{\"Format specifies USTAR\", whyNoUSTAR, whyOnlyPAX, whyOnlyGNU}\n\t\tcase FormatPAX:\n\t\t\terr = headerError{\"Format specifies PAX\", whyNoPAX, whyOnlyGNU}\n\t\tcase FormatGNU:\n\t\t\terr = headerError{\"Format specifies GNU\", whyNoGNU, whyOnlyPAX}\n\t\tdefault:\n\t\t\terr = headerError{whyNoUSTAR, whyNoPAX, whyNoGNU, whyOnlyPAX, whyOnlyGNU}\n\t\t}\n\t}\n\treturn format, paxHdrs, err\n}\n\n// FileInfo returns an os.FileInfo for the Header.\nfunc (h *Header) FileInfo() os.FileInfo {\n\treturn headerFileInfo{h}\n}\n\n// headerFileInfo implements os.FileInfo.\ntype headerFileInfo struct {\n\th *Header\n}\n\nfunc (fi headerFileInfo) Size() int64        { return fi.h.Size }\nfunc (fi headerFileInfo) IsDir() bool        { return fi.Mode().IsDir() }\nfunc (fi headerFileInfo) ModTime() time.Time { return fi.h.ModTime }\nfunc (fi headerFileInfo) Sys() interface{}   { return fi.h }\n\n// Name returns the base name of the file.\nfunc (fi headerFileInfo) Name() string {\n\tif fi.IsDir() {\n\t\treturn path.Base(path.Clean(fi.h.Name))\n\t}\n\treturn path.Base(fi.h.Name)\n}\n\n// Mode returns the permission and mode bits for the headerFileInfo.\nfunc (fi headerFileInfo) Mode() (mode os.FileMode) {\n\t// Set file permission bits.\n\tmode = os.FileMode(fi.h.Mode).Perm()\n\n\t// Set setuid, setgid and sticky bits.\n\tif fi.h.Mode&c_ISUID != 0 {\n\t\tmode |= os.ModeSetuid\n\t}\n\tif fi.h.Mode&c_ISGID != 0 {\n\t\tmode |= os.ModeSetgid\n\t}\n\tif fi.h.Mode&c_ISVTX != 0 {\n\t\tmode |= os.ModeSticky\n\t}\n\n\t// Set file mode bits; clear perm, setuid, setgid, and sticky bits.\n\tswitch m := os.FileMode(fi.h.Mode) &^ 07777; m {\n\tcase c_ISDIR:\n\t\tmode |= os.ModeDir\n\tcase c_ISFIFO:\n\t\tmode |= os.ModeNamedPipe\n\tcase c_ISLNK:\n\t\tmode |= os.ModeSymlink\n\tcase c_ISBLK:\n\t\tmode |= os.ModeDevice\n\tcase c_ISCHR:\n\t\tmode |= os.ModeDevice\n\t\tmode |= os.ModeCharDevice\n\tcase c_ISSOCK:\n\t\tmode |= os.ModeSocket\n\t}\n\n\tswitch fi.h.Typeflag {\n\tcase TypeSymlink:\n\t\tmode |= os.ModeSymlink\n\tcase TypeChar:\n\t\tmode |= os.ModeDevice\n\t\tmode |= os.ModeCharDevice\n\tcase TypeBlock:\n\t\tmode |= os.ModeDevice\n\tcase TypeDir:\n\t\tmode |= os.ModeDir\n\tcase TypeFifo:\n\t\tmode |= os.ModeNamedPipe\n\t}\n\n\treturn mode\n}\n\n// sysStat, if non-nil, populates h from system-dependent fields of fi.\nvar sysStat func(fi os.FileInfo, h *Header) error\n\nconst (\n\t// Mode constants from the USTAR spec:\n\t// See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06\n\tc_ISUID = 04000 // Set uid\n\tc_ISGID = 02000 // Set gid\n\tc_ISVTX = 01000 // Save text (sticky bit)\n\n\t// Common Unix mode constants; these are not defined in any common tar standard.\n\t// Header.FileInfo understands these, but FileInfoHeader will never produce these.\n\tc_ISDIR  = 040000  // Directory\n\tc_ISFIFO = 010000  // FIFO\n\tc_ISREG  = 0100000 // Regular file\n\tc_ISLNK  = 0120000 // Symbolic link\n\tc_ISBLK  = 060000  // Block special file\n\tc_ISCHR  = 020000  // Character special file\n\tc_ISSOCK = 0140000 // Socket\n)\n\n// FileInfoHeader creates a partially-populated Header from fi.\n// If fi describes a symlink, FileInfoHeader records link as the link target.\n// If fi describes a directory, a slash is appended to the name.\n//\n// Since os.FileInfo's Name method only returns the base name of\n// the file it describes, it may be necessary to modify Header.Name\n// to provide the full path name of the file.\nfunc FileInfoHeader(fi os.FileInfo, link string) (*Header, error) {\n\tif fi == nil {\n\t\treturn nil, errors.New(\"archive/tar: FileInfo is nil\")\n\t}\n\tfm := fi.Mode()\n\th := &Header{\n\t\tName:    fi.Name(),\n\t\tModTime: fi.ModTime(),\n\t\tMode:    int64(fm.Perm()), // or'd with c_IS* constants later\n\t}\n\tswitch {\n\tcase fm.IsRegular():\n\t\th.Typeflag = TypeReg\n\t\th.Size = fi.Size()\n\tcase fi.IsDir():\n\t\th.Typeflag = TypeDir\n\t\th.Name += \"/\"\n\tcase fm&os.ModeSymlink != 0:\n\t\th.Typeflag = TypeSymlink\n\t\th.Linkname = link\n\tcase fm&os.ModeDevice != 0:\n\t\tif fm&os.ModeCharDevice != 0 {\n\t\t\th.Typeflag = TypeChar\n\t\t} else {\n\t\t\th.Typeflag = TypeBlock\n\t\t}\n\tcase fm&os.ModeNamedPipe != 0:\n\t\th.Typeflag = TypeFifo\n\tcase fm&os.ModeSocket != 0:\n\t\treturn nil, fmt.Errorf(\"archive/tar: sockets not supported\")\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"archive/tar: unknown file mode %v\", fm)\n\t}\n\tif fm&os.ModeSetuid != 0 {\n\t\th.Mode |= c_ISUID\n\t}\n\tif fm&os.ModeSetgid != 0 {\n\t\th.Mode |= c_ISGID\n\t}\n\tif fm&os.ModeSticky != 0 {\n\t\th.Mode |= c_ISVTX\n\t}\n\t// If possible, populate additional fields from OS-specific\n\t// FileInfo fields.\n\tif sys, ok := fi.Sys().(*Header); ok {\n\t\t// This FileInfo came from a Header (not the OS). Use the\n\t\t// original Header to populate all remaining fields.\n\t\th.Uid = sys.Uid\n\t\th.Gid = sys.Gid\n\t\th.Uname = sys.Uname\n\t\th.Gname = sys.Gname\n\t\th.AccessTime = sys.AccessTime\n\t\th.ChangeTime = sys.ChangeTime\n\t\tif sys.Xattrs != nil {\n\t\t\th.Xattrs = make(map[string]string)\n\t\t\tfor k, v := range sys.Xattrs {\n\t\t\t\th.Xattrs[k] = v\n\t\t\t}\n\t\t}\n\t\tif sys.Typeflag == TypeLink {\n\t\t\t// hard link\n\t\t\th.Typeflag = TypeLink\n\t\t\th.Size = 0\n\t\t\th.Linkname = sys.Linkname\n\t\t}\n\t\tif sys.PAXRecords != nil {\n\t\t\th.PAXRecords = make(map[string]string)\n\t\t\tfor k, v := range sys.PAXRecords {\n\t\t\t\th.PAXRecords[k] = v\n\t\t\t}\n\t\t}\n\t}\n\tif sysStat != nil {\n\t\treturn h, sysStat(fi, h)\n\t}\n\treturn h, nil\n}\n\n// isHeaderOnlyType checks if the given type flag is of the type that has no\n// data section even if a size is specified.\nfunc isHeaderOnlyType(flag byte) bool {\n\tswitch flag {\n\tcase TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, TypeFifo:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc min(a, b int64) int64 {\n\tif a < b {\n\t\treturn a\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/format.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage tar\n\nimport \"strings\"\n\n// Format represents the tar archive format.\n//\n// The original tar format was introduced in Unix V7.\n// Since then, there have been multiple competing formats attempting to\n// standardize or extend the V7 format to overcome its limitations.\n// The most common formats are the USTAR, PAX, and GNU formats,\n// each with their own advantages and limitations.\n//\n// The following table captures the capabilities of each format:\n//\n//\t                  |  USTAR |       PAX |       GNU\n//\t------------------+--------+-----------+----------\n//\tName              |   256B | unlimited | unlimited\n//\tLinkname          |   100B | unlimited | unlimited\n//\tSize              | uint33 | unlimited |    uint89\n//\tMode              | uint21 |    uint21 |    uint57\n//\tUid/Gid           | uint21 | unlimited |    uint57\n//\tUname/Gname       |    32B | unlimited |       32B\n//\tModTime           | uint33 | unlimited |     int89\n//\tAccessTime        |    n/a | unlimited |     int89\n//\tChangeTime        |    n/a | unlimited |     int89\n//\tDevmajor/Devminor | uint21 |    uint21 |    uint57\n//\t------------------+--------+-----------+----------\n//\tstring encoding   |  ASCII |     UTF-8 |    binary\n//\tsub-second times  |     no |       yes |        no\n//\tsparse files      |     no |       yes |       yes\n//\n// The table's upper portion shows the Header fields, where each format reports\n// the maximum number of bytes allowed for each string field and\n// the integer type used to store each numeric field\n// (where timestamps are stored as the number of seconds since the Unix epoch).\n//\n// The table's lower portion shows specialized features of each format,\n// such as supported string encodings, support for sub-second timestamps,\n// or support for sparse files.\n//\n// The Writer currently provides no support for sparse files.\ntype Format int\n\n// Constants to identify various tar formats.\nconst (\n\t// Deliberately hide the meaning of constants from public API.\n\t_ Format = (1 << iota) / 4 // Sequence of 0, 0, 1, 2, 4, 8, etc...\n\n\t// FormatUnknown indicates that the format is unknown.\n\tFormatUnknown\n\n\t// The format of the original Unix V7 tar tool prior to standardization.\n\tformatV7\n\n\t// FormatUSTAR represents the USTAR header format defined in POSIX.1-1988.\n\t//\n\t// While this format is compatible with most tar readers,\n\t// the format has several limitations making it unsuitable for some usages.\n\t// Most notably, it cannot support sparse files, files larger than 8GiB,\n\t// filenames larger than 256 characters, and non-ASCII filenames.\n\t//\n\t// Reference:\n\t//\thttp://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06\n\tFormatUSTAR\n\n\t// FormatPAX represents the PAX header format defined in POSIX.1-2001.\n\t//\n\t// PAX extends USTAR by writing a special file with Typeflag TypeXHeader\n\t// preceding the original header. This file contains a set of key-value\n\t// records, which are used to overcome USTAR's shortcomings, in addition to\n\t// providing the ability to have sub-second resolution for timestamps.\n\t//\n\t// Some newer formats add their own extensions to PAX by defining their\n\t// own keys and assigning certain semantic meaning to the associated values.\n\t// For example, sparse file support in PAX is implemented using keys\n\t// defined by the GNU manual (e.g., \"GNU.sparse.map\").\n\t//\n\t// Reference:\n\t//\thttp://pubs.opengroup.org/onlinepubs/009695399/utilities/pax.html\n\tFormatPAX\n\n\t// FormatGNU represents the GNU header format.\n\t//\n\t// The GNU header format is older than the USTAR and PAX standards and\n\t// is not compatible with them. The GNU format supports\n\t// arbitrary file sizes, filenames of arbitrary encoding and length,\n\t// sparse files, and other features.\n\t//\n\t// It is recommended that PAX be chosen over GNU unless the target\n\t// application can only parse GNU formatted archives.\n\t//\n\t// Reference:\n\t//\thttps://www.gnu.org/software/tar/manual/html_node/Standard.html\n\tFormatGNU\n\n\t// Schily's tar format, which is incompatible with USTAR.\n\t// This does not cover STAR extensions to the PAX format; these fall under\n\t// the PAX format.\n\tformatSTAR\n\n\tformatMax\n)\n\nfunc (f Format) has(f2 Format) bool   { return f&f2 != 0 }\nfunc (f *Format) mayBe(f2 Format)     { *f |= f2 }\nfunc (f *Format) mayOnlyBe(f2 Format) { *f &= f2 }\nfunc (f *Format) mustNotBe(f2 Format) { *f &^= f2 }\n\nvar formatNames = map[Format]string{\n\tformatV7: \"V7\", FormatUSTAR: \"USTAR\", FormatPAX: \"PAX\", FormatGNU: \"GNU\", formatSTAR: \"STAR\",\n}\n\nfunc (f Format) String() string {\n\tvar ss []string\n\tfor f2 := Format(1); f2 < formatMax; f2 <<= 1 {\n\t\tif f.has(f2) {\n\t\t\tss = append(ss, formatNames[f2])\n\t\t}\n\t}\n\tswitch len(ss) {\n\tcase 0:\n\t\treturn \"<unknown>\"\n\tcase 1:\n\t\treturn ss[0]\n\tdefault:\n\t\treturn \"(\" + strings.Join(ss, \" | \") + \")\"\n\t}\n}\n\n// Magics used to identify various formats.\nconst (\n\tmagicGNU, versionGNU     = \"ustar \", \" \\x00\"\n\tmagicUSTAR, versionUSTAR = \"ustar\\x00\", \"00\"\n\ttrailerSTAR              = \"tar\\x00\"\n)\n\n// Size constants from various tar specifications.\nconst (\n\tblockSize  = 512 // Size of each block in a tar stream\n\tnameSize   = 100 // Max length of the name field in USTAR format\n\tprefixSize = 155 // Max length of the prefix field in USTAR format\n\n\t// Max length of a special file (PAX header, GNU long name or link).\n\t// This matches the limit used by libarchive.\n\tmaxSpecialFileSize = 1 << 20\n)\n\n// blockPadding computes the number of bytes needed to pad offset up to the\n// nearest block edge where 0 <= n < blockSize.\nfunc blockPadding(offset int64) (n int64) {\n\treturn -offset & (blockSize - 1)\n}\n\nvar zeroBlock block\n\ntype block [blockSize]byte\n\n// Convert block to any number of formats.\nfunc (b *block) V7() *headerV7       { return (*headerV7)(b) }\nfunc (b *block) GNU() *headerGNU     { return (*headerGNU)(b) }\nfunc (b *block) STAR() *headerSTAR   { return (*headerSTAR)(b) }\nfunc (b *block) USTAR() *headerUSTAR { return (*headerUSTAR)(b) }\nfunc (b *block) Sparse() sparseArray { return (sparseArray)(b[:]) }\n\n// GetFormat checks that the block is a valid tar header based on the checksum.\n// It then attempts to guess the specific format based on magic values.\n// If the checksum fails, then FormatUnknown is returned.\nfunc (b *block) GetFormat() Format {\n\t// Verify checksum.\n\tvar p parser\n\tvalue := p.parseOctal(b.V7().Chksum())\n\tchksum1, chksum2 := b.ComputeChecksum()\n\tif p.err != nil || (value != chksum1 && value != chksum2) {\n\t\treturn FormatUnknown\n\t}\n\n\t// Guess the magic values.\n\tmagic := string(b.USTAR().Magic())\n\tversion := string(b.USTAR().Version())\n\ttrailer := string(b.STAR().Trailer())\n\tswitch {\n\tcase magic == magicUSTAR && trailer == trailerSTAR:\n\t\treturn formatSTAR\n\tcase magic == magicUSTAR:\n\t\treturn FormatUSTAR | FormatPAX\n\tcase magic == magicGNU && version == versionGNU:\n\t\treturn FormatGNU\n\tdefault:\n\t\treturn formatV7\n\t}\n}\n\n// SetFormat writes the magic values necessary for specified format\n// and then updates the checksum accordingly.\nfunc (b *block) SetFormat(format Format) {\n\t// Set the magic values.\n\tswitch {\n\tcase format.has(formatV7):\n\t\t// Do nothing.\n\tcase format.has(FormatGNU):\n\t\tcopy(b.GNU().Magic(), magicGNU)\n\t\tcopy(b.GNU().Version(), versionGNU)\n\tcase format.has(formatSTAR):\n\t\tcopy(b.STAR().Magic(), magicUSTAR)\n\t\tcopy(b.STAR().Version(), versionUSTAR)\n\t\tcopy(b.STAR().Trailer(), trailerSTAR)\n\tcase format.has(FormatUSTAR | FormatPAX):\n\t\tcopy(b.USTAR().Magic(), magicUSTAR)\n\t\tcopy(b.USTAR().Version(), versionUSTAR)\n\tdefault:\n\t\tpanic(\"invalid format\")\n\t}\n\n\t// Update checksum.\n\t// This field is special in that it is terminated by a NULL then space.\n\tvar f formatter\n\tfield := b.V7().Chksum()\n\tchksum, _ := b.ComputeChecksum() // Possible values are 256..128776\n\tf.formatOctal(field[:7], chksum) // Never fails since 128776 < 262143\n\tfield[7] = ' '\n}\n\n// ComputeChecksum computes the checksum for the header block.\n// POSIX specifies a sum of the unsigned byte values, but the Sun tar used\n// signed byte values.\n// We compute and return both.\nfunc (b *block) ComputeChecksum() (unsigned, signed int64) {\n\tfor i, c := range b {\n\t\tif 148 <= i && i < 156 {\n\t\t\tc = ' ' // Treat the checksum field itself as all spaces.\n\t\t}\n\t\tunsigned += int64(c)\n\t\tsigned += int64(int8(c))\n\t}\n\treturn unsigned, signed\n}\n\n// Reset clears the block with all zeros.\nfunc (b *block) Reset() {\n\t*b = block{}\n}\n\ntype headerV7 [blockSize]byte\n\nfunc (h *headerV7) Name() []byte     { return h[000:][:100] }\nfunc (h *headerV7) Mode() []byte     { return h[100:][:8] }\nfunc (h *headerV7) UID() []byte      { return h[108:][:8] }\nfunc (h *headerV7) GID() []byte      { return h[116:][:8] }\nfunc (h *headerV7) Size() []byte     { return h[124:][:12] }\nfunc (h *headerV7) ModTime() []byte  { return h[136:][:12] }\nfunc (h *headerV7) Chksum() []byte   { return h[148:][:8] }\nfunc (h *headerV7) TypeFlag() []byte { return h[156:][:1] }\nfunc (h *headerV7) LinkName() []byte { return h[157:][:100] }\n\ntype headerGNU [blockSize]byte\n\nfunc (h *headerGNU) V7() *headerV7       { return (*headerV7)(h) }\nfunc (h *headerGNU) Magic() []byte       { return h[257:][:6] }\nfunc (h *headerGNU) Version() []byte     { return h[263:][:2] }\nfunc (h *headerGNU) UserName() []byte    { return h[265:][:32] }\nfunc (h *headerGNU) GroupName() []byte   { return h[297:][:32] }\nfunc (h *headerGNU) DevMajor() []byte    { return h[329:][:8] }\nfunc (h *headerGNU) DevMinor() []byte    { return h[337:][:8] }\nfunc (h *headerGNU) AccessTime() []byte  { return h[345:][:12] }\nfunc (h *headerGNU) ChangeTime() []byte  { return h[357:][:12] }\nfunc (h *headerGNU) Sparse() sparseArray { return (sparseArray)(h[386:][:24*4+1]) }\nfunc (h *headerGNU) RealSize() []byte    { return h[483:][:12] }\n\ntype headerSTAR [blockSize]byte\n\nfunc (h *headerSTAR) V7() *headerV7      { return (*headerV7)(h) }\nfunc (h *headerSTAR) Magic() []byte      { return h[257:][:6] }\nfunc (h *headerSTAR) Version() []byte    { return h[263:][:2] }\nfunc (h *headerSTAR) UserName() []byte   { return h[265:][:32] }\nfunc (h *headerSTAR) GroupName() []byte  { return h[297:][:32] }\nfunc (h *headerSTAR) DevMajor() []byte   { return h[329:][:8] }\nfunc (h *headerSTAR) DevMinor() []byte   { return h[337:][:8] }\nfunc (h *headerSTAR) Prefix() []byte     { return h[345:][:131] }\nfunc (h *headerSTAR) AccessTime() []byte { return h[476:][:12] }\nfunc (h *headerSTAR) ChangeTime() []byte { return h[488:][:12] }\nfunc (h *headerSTAR) Trailer() []byte    { return h[508:][:4] }\n\ntype headerUSTAR [blockSize]byte\n\nfunc (h *headerUSTAR) V7() *headerV7     { return (*headerV7)(h) }\nfunc (h *headerUSTAR) Magic() []byte     { return h[257:][:6] }\nfunc (h *headerUSTAR) Version() []byte   { return h[263:][:2] }\nfunc (h *headerUSTAR) UserName() []byte  { return h[265:][:32] }\nfunc (h *headerUSTAR) GroupName() []byte { return h[297:][:32] }\nfunc (h *headerUSTAR) DevMajor() []byte  { return h[329:][:8] }\nfunc (h *headerUSTAR) DevMinor() []byte  { return h[337:][:8] }\nfunc (h *headerUSTAR) Prefix() []byte    { return h[345:][:155] }\n\ntype sparseArray []byte\n\nfunc (s sparseArray) Entry(i int) sparseElem { return (sparseElem)(s[i*24:]) }\nfunc (s sparseArray) IsExtended() []byte     { return s[24*s.MaxEntries():][:1] }\nfunc (s sparseArray) MaxEntries() int        { return len(s) / 24 }\n\ntype sparseElem []byte\n\nfunc (s sparseElem) Offset() []byte { return s[00:][:12] }\nfunc (s sparseElem) Length() []byte { return s[12:][:12] }\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/reader.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage tar\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Reader provides sequential access to the contents of a tar archive.\n// Reader.Next advances to the next file in the archive (including the first),\n// and then Reader can be treated as an io.Reader to access the file's data.\ntype Reader struct {\n\tr    io.Reader\n\tpad  int64      // Amount of padding (ignored) after current file entry\n\tcurr fileReader // Reader for current file entry\n\tblk  block      // Buffer to use as temporary local storage\n\n\t// err is a persistent error.\n\t// It is only the responsibility of every exported method of Reader to\n\t// ensure that this error is sticky.\n\terr error\n\n\tRawAccounting bool          // Whether to enable the access needed to reassemble the tar from raw bytes. Some performance/memory hit for this.\n\trawBytes      *bytes.Buffer // last raw bits\n}\n\ntype fileReader interface {\n\tio.Reader\n\tfileState\n\n\tWriteTo(io.Writer) (int64, error)\n}\n\n// RawBytes accesses the raw bytes of the archive, apart from the file payload itself.\n// This includes the header and padding.\n//\n// # This call resets the current rawbytes buffer\n//\n// Only when RawAccounting is enabled, otherwise this returns nil\nfunc (tr *Reader) RawBytes() []byte {\n\tif !tr.RawAccounting {\n\t\treturn nil\n\t}\n\tif tr.rawBytes == nil {\n\t\ttr.rawBytes = bytes.NewBuffer(nil)\n\t}\n\tdefer tr.rawBytes.Reset() // if we've read them, then flush them.\n\n\treturn tr.rawBytes.Bytes()\n\n}\n\n// ExpectedPadding returns the number of bytes of padding expected after the last header returned by Next()\nfunc (tr *Reader) ExpectedPadding() int64 {\n\treturn tr.pad\n}\n\n// NewReader creates a new Reader reading from r.\nfunc NewReader(r io.Reader) *Reader {\n\treturn &Reader{r: r, curr: &regFileReader{r, 0}}\n}\n\n// Next advances to the next entry in the tar archive.\n// The Header.Size determines how many bytes can be read for the next file.\n// Any remaining data in the current file is automatically discarded.\n//\n// io.EOF is returned at the end of the input.\nfunc (tr *Reader) Next() (*Header, error) {\n\tif tr.err != nil {\n\t\treturn nil, tr.err\n\t}\n\thdr, err := tr.next()\n\ttr.err = err\n\treturn hdr, err\n}\n\nfunc (tr *Reader) next() (*Header, error) {\n\tvar paxHdrs map[string]string\n\tvar gnuLongName, gnuLongLink string\n\n\tif tr.RawAccounting {\n\t\tif tr.rawBytes == nil {\n\t\t\ttr.rawBytes = bytes.NewBuffer(nil)\n\t\t} else {\n\t\t\ttr.rawBytes.Reset()\n\t\t}\n\t}\n\n\t// Externally, Next iterates through the tar archive as if it is a series of\n\t// files. Internally, the tar format often uses fake \"files\" to add meta\n\t// data that describes the next file. These meta data \"files\" should not\n\t// normally be visible to the outside. As such, this loop iterates through\n\t// one or more \"header files\" until it finds a \"normal file\".\n\tformat := FormatUSTAR | FormatPAX | FormatGNU\n\tfor {\n\t\t// Discard the remainder of the file and any padding.\n\t\tif err := discard(tr, tr.curr.PhysicalRemaining()); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tn, err := tryReadFull(tr.r, tr.blk[:tr.pad])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif tr.RawAccounting {\n\t\t\ttr.rawBytes.Write(tr.blk[:n])\n\t\t}\n\t\ttr.pad = 0\n\n\t\thdr, rawHdr, err := tr.readHeader()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := tr.handleRegularFile(hdr); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tformat.mayOnlyBe(hdr.Format)\n\n\t\t// Check for PAX/GNU special headers and files.\n\t\tswitch hdr.Typeflag {\n\t\tcase TypeXHeader, TypeXGlobalHeader:\n\t\t\tformat.mayOnlyBe(FormatPAX)\n\t\t\tpaxHdrs, err = parsePAX(tr)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif hdr.Typeflag == TypeXGlobalHeader {\n\t\t\t\tif err = mergePAX(hdr, paxHdrs); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn &Header{\n\t\t\t\t\tName:       hdr.Name,\n\t\t\t\t\tTypeflag:   hdr.Typeflag,\n\t\t\t\t\tXattrs:     hdr.Xattrs,\n\t\t\t\t\tPAXRecords: hdr.PAXRecords,\n\t\t\t\t\tFormat:     format,\n\t\t\t\t}, nil\n\t\t\t}\n\t\t\tcontinue // This is a meta header affecting the next header\n\t\tcase TypeGNULongName, TypeGNULongLink:\n\t\t\tformat.mayOnlyBe(FormatGNU)\n\t\t\trealname, err := readSpecialFile(tr)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tif tr.RawAccounting {\n\t\t\t\ttr.rawBytes.Write(realname)\n\t\t\t}\n\n\t\t\tvar p parser\n\t\t\tswitch hdr.Typeflag {\n\t\t\tcase TypeGNULongName:\n\t\t\t\tgnuLongName = p.parseString(realname)\n\t\t\tcase TypeGNULongLink:\n\t\t\t\tgnuLongLink = p.parseString(realname)\n\t\t\t}\n\t\t\tcontinue // This is a meta header affecting the next header\n\t\tdefault:\n\t\t\t// The old GNU sparse format is handled here since it is technically\n\t\t\t// just a regular file with additional attributes.\n\n\t\t\tif err := mergePAX(hdr, paxHdrs); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif gnuLongName != \"\" {\n\t\t\t\thdr.Name = gnuLongName\n\t\t\t}\n\t\t\tif gnuLongLink != \"\" {\n\t\t\t\thdr.Linkname = gnuLongLink\n\t\t\t}\n\t\t\tif hdr.Typeflag == TypeRegA {\n\t\t\t\tif strings.HasSuffix(hdr.Name, \"/\") {\n\t\t\t\t\thdr.Typeflag = TypeDir // Legacy archives use trailing slash for directories\n\t\t\t\t} else {\n\t\t\t\t\thdr.Typeflag = TypeReg\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// The extended headers may have updated the size.\n\t\t\t// Thus, setup the regFileReader again after merging PAX headers.\n\t\t\tif err := tr.handleRegularFile(hdr); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// Sparse formats rely on being able to read from the logical data\n\t\t\t// section; there must be a preceding call to handleRegularFile.\n\t\t\tif err := tr.handleSparseFile(hdr, rawHdr); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// Set the final guess at the format.\n\t\t\tif format.has(FormatUSTAR) && format.has(FormatPAX) {\n\t\t\t\tformat.mayOnlyBe(FormatUSTAR)\n\t\t\t}\n\t\t\thdr.Format = format\n\t\t\treturn hdr, nil // This is a file, so stop\n\t\t}\n\t}\n}\n\n// handleRegularFile sets up the current file reader and padding such that it\n// can only read the following logical data section. It will properly handle\n// special headers that contain no data section.\nfunc (tr *Reader) handleRegularFile(hdr *Header) error {\n\tnb := hdr.Size\n\tif isHeaderOnlyType(hdr.Typeflag) {\n\t\tnb = 0\n\t}\n\tif nb < 0 {\n\t\treturn ErrHeader\n\t}\n\n\ttr.pad = blockPadding(nb)\n\ttr.curr = &regFileReader{r: tr.r, nb: nb}\n\treturn nil\n}\n\n// handleSparseFile checks if the current file is a sparse format of any type\n// and sets the curr reader appropriately.\nfunc (tr *Reader) handleSparseFile(hdr *Header, rawHdr *block) error {\n\tvar spd sparseDatas\n\tvar err error\n\tif hdr.Typeflag == TypeGNUSparse {\n\t\tspd, err = tr.readOldGNUSparseMap(hdr, rawHdr)\n\t} else {\n\t\tspd, err = tr.readGNUSparsePAXHeaders(hdr)\n\t}\n\n\t// If sp is non-nil, then this is a sparse file.\n\t// Note that it is possible for len(sp) == 0.\n\tif err == nil && spd != nil {\n\t\tif isHeaderOnlyType(hdr.Typeflag) || !validateSparseEntries(spd, hdr.Size) {\n\t\t\treturn ErrHeader\n\t\t}\n\t\tsph := invertSparseEntries(spd, hdr.Size)\n\t\ttr.curr = &sparseFileReader{tr.curr, sph, 0}\n\t}\n\treturn err\n}\n\n// readGNUSparsePAXHeaders checks the PAX headers for GNU sparse headers.\n// If they are found, then this function reads the sparse map and returns it.\n// This assumes that 0.0 headers have already been converted to 0.1 headers\n// by the PAX header parsing logic.\nfunc (tr *Reader) readGNUSparsePAXHeaders(hdr *Header) (sparseDatas, error) {\n\t// Identify the version of GNU headers.\n\tvar is1x0 bool\n\tmajor, minor := hdr.PAXRecords[paxGNUSparseMajor], hdr.PAXRecords[paxGNUSparseMinor]\n\tswitch {\n\tcase major == \"0\" && (minor == \"0\" || minor == \"1\"):\n\t\tis1x0 = false\n\tcase major == \"1\" && minor == \"0\":\n\t\tis1x0 = true\n\tcase major != \"\" || minor != \"\":\n\t\treturn nil, nil // Unknown GNU sparse PAX version\n\tcase hdr.PAXRecords[paxGNUSparseMap] != \"\":\n\t\tis1x0 = false // 0.0 and 0.1 did not have explicit version records, so guess\n\tdefault:\n\t\treturn nil, nil // Not a PAX format GNU sparse file.\n\t}\n\thdr.Format.mayOnlyBe(FormatPAX)\n\n\t// Update hdr from GNU sparse PAX headers.\n\tif name := hdr.PAXRecords[paxGNUSparseName]; name != \"\" {\n\t\thdr.Name = name\n\t}\n\tsize := hdr.PAXRecords[paxGNUSparseSize]\n\tif size == \"\" {\n\t\tsize = hdr.PAXRecords[paxGNUSparseRealSize]\n\t}\n\tif size != \"\" {\n\t\tn, err := strconv.ParseInt(size, 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, ErrHeader\n\t\t}\n\t\thdr.Size = n\n\t}\n\n\t// Read the sparse map according to the appropriate format.\n\tif is1x0 {\n\t\treturn readGNUSparseMap1x0(tr.curr)\n\t}\n\treturn readGNUSparseMap0x1(hdr.PAXRecords)\n}\n\n// mergePAX merges paxHdrs into hdr for all relevant fields of Header.\nfunc mergePAX(hdr *Header, paxHdrs map[string]string) (err error) {\n\tfor k, v := range paxHdrs {\n\t\tif v == \"\" {\n\t\t\tcontinue // Keep the original USTAR value\n\t\t}\n\t\tvar id64 int64\n\t\tswitch k {\n\t\tcase paxPath:\n\t\t\thdr.Name = v\n\t\tcase paxLinkpath:\n\t\t\thdr.Linkname = v\n\t\tcase paxUname:\n\t\t\thdr.Uname = v\n\t\tcase paxGname:\n\t\t\thdr.Gname = v\n\t\tcase paxUid:\n\t\t\tid64, err = strconv.ParseInt(v, 10, 64)\n\t\t\thdr.Uid = int(id64) // Integer overflow possible\n\t\tcase paxGid:\n\t\t\tid64, err = strconv.ParseInt(v, 10, 64)\n\t\t\thdr.Gid = int(id64) // Integer overflow possible\n\t\tcase paxAtime:\n\t\t\thdr.AccessTime, err = parsePAXTime(v)\n\t\tcase paxMtime:\n\t\t\thdr.ModTime, err = parsePAXTime(v)\n\t\tcase paxCtime:\n\t\t\thdr.ChangeTime, err = parsePAXTime(v)\n\t\tcase paxSize:\n\t\t\thdr.Size, err = strconv.ParseInt(v, 10, 64)\n\t\tdefault:\n\t\t\tif strings.HasPrefix(k, paxSchilyXattr) {\n\t\t\t\tif hdr.Xattrs == nil {\n\t\t\t\t\thdr.Xattrs = make(map[string]string)\n\t\t\t\t}\n\t\t\t\thdr.Xattrs[k[len(paxSchilyXattr):]] = v\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\treturn ErrHeader\n\t\t}\n\t}\n\thdr.PAXRecords = paxHdrs\n\treturn nil\n}\n\n// parsePAX parses PAX headers.\n// If an extended header (type 'x') is invalid, ErrHeader is returned\nfunc parsePAX(r io.Reader) (map[string]string, error) {\n\tbuf, err := readSpecialFile(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// leaving this function for io.Reader makes it more testable\n\tif tr, ok := r.(*Reader); ok && tr.RawAccounting {\n\t\tif _, err = tr.rawBytes.Write(buf); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tsbuf := string(buf)\n\n\t// For GNU PAX sparse format 0.0 support.\n\t// This function transforms the sparse format 0.0 headers into format 0.1\n\t// headers since 0.0 headers were not PAX compliant.\n\tvar sparseMap []string\n\n\tpaxHdrs := make(map[string]string)\n\tfor len(sbuf) > 0 {\n\t\tkey, value, residual, err := parsePAXRecord(sbuf)\n\t\tif err != nil {\n\t\t\treturn nil, ErrHeader\n\t\t}\n\t\tsbuf = residual\n\n\t\tswitch key {\n\t\tcase paxGNUSparseOffset, paxGNUSparseNumBytes:\n\t\t\t// Validate sparse header order and value.\n\t\t\tif (len(sparseMap)%2 == 0 && key != paxGNUSparseOffset) ||\n\t\t\t\t(len(sparseMap)%2 == 1 && key != paxGNUSparseNumBytes) ||\n\t\t\t\tstrings.Contains(value, \",\") {\n\t\t\t\treturn nil, ErrHeader\n\t\t\t}\n\t\t\tsparseMap = append(sparseMap, value)\n\t\tdefault:\n\t\t\tpaxHdrs[key] = value\n\t\t}\n\t}\n\tif len(sparseMap) > 0 {\n\t\tpaxHdrs[paxGNUSparseMap] = strings.Join(sparseMap, \",\")\n\t}\n\treturn paxHdrs, nil\n}\n\n// readHeader reads the next block header and assumes that the underlying reader\n// is already aligned to a block boundary. It returns the raw block of the\n// header in case further processing is required.\n//\n// The err will be set to io.EOF only when one of the following occurs:\n//   - Exactly 0 bytes are read and EOF is hit.\n//   - Exactly 1 block of zeros is read and EOF is hit.\n//   - At least 2 blocks of zeros are read.\nfunc (tr *Reader) readHeader() (*Header, *block, error) {\n\t// Two blocks of zero bytes marks the end of the archive.\n\tn, err := io.ReadFull(tr.r, tr.blk[:])\n\tif tr.RawAccounting && (err == nil || err == io.EOF) {\n\t\ttr.rawBytes.Write(tr.blk[:n])\n\t}\n\tif err != nil {\n\t\treturn nil, nil, err // EOF is okay here; exactly 0 bytes read\n\t}\n\n\tif bytes.Equal(tr.blk[:], zeroBlock[:]) {\n\t\tn, err = io.ReadFull(tr.r, tr.blk[:])\n\t\tif tr.RawAccounting && (err == nil || err == io.EOF) {\n\t\t\ttr.rawBytes.Write(tr.blk[:n])\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, nil, err // EOF is okay here; exactly 1 block of zeros read\n\t\t}\n\t\tif bytes.Equal(tr.blk[:], zeroBlock[:]) {\n\t\t\treturn nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read\n\t\t}\n\t\treturn nil, nil, ErrHeader // Zero block and then non-zero block\n\t}\n\n\t// Verify the header matches a known format.\n\tformat := tr.blk.GetFormat()\n\tif format == FormatUnknown {\n\t\treturn nil, nil, ErrHeader\n\t}\n\n\tvar p parser\n\thdr := new(Header)\n\n\t// Unpack the V7 header.\n\tv7 := tr.blk.V7()\n\thdr.Typeflag = v7.TypeFlag()[0]\n\thdr.Name = p.parseString(v7.Name())\n\thdr.Linkname = p.parseString(v7.LinkName())\n\thdr.Size = p.parseNumeric(v7.Size())\n\thdr.Mode = p.parseNumeric(v7.Mode())\n\thdr.Uid = int(p.parseNumeric(v7.UID()))\n\thdr.Gid = int(p.parseNumeric(v7.GID()))\n\thdr.ModTime = time.Unix(p.parseNumeric(v7.ModTime()), 0)\n\n\t// Unpack format specific fields.\n\tif format > formatV7 {\n\t\tustar := tr.blk.USTAR()\n\t\thdr.Uname = p.parseString(ustar.UserName())\n\t\thdr.Gname = p.parseString(ustar.GroupName())\n\t\thdr.Devmajor = p.parseNumeric(ustar.DevMajor())\n\t\thdr.Devminor = p.parseNumeric(ustar.DevMinor())\n\n\t\tvar prefix string\n\t\tswitch {\n\t\tcase format.has(FormatUSTAR | FormatPAX):\n\t\t\thdr.Format = format\n\t\t\tustar := tr.blk.USTAR()\n\t\t\tprefix = p.parseString(ustar.Prefix())\n\n\t\t\t// For Format detection, check if block is properly formatted since\n\t\t\t// the parser is more liberal than what USTAR actually permits.\n\t\t\tnotASCII := func(r rune) bool { return r >= 0x80 }\n\t\t\tif bytes.IndexFunc(tr.blk[:], notASCII) >= 0 {\n\t\t\t\thdr.Format = FormatUnknown // Non-ASCII characters in block.\n\t\t\t}\n\t\t\tnul := func(b []byte) bool { return int(b[len(b)-1]) == 0 }\n\t\t\tif !(nul(v7.Size()) && nul(v7.Mode()) && nul(v7.UID()) && nul(v7.GID()) &&\n\t\t\t\tnul(v7.ModTime()) && nul(ustar.DevMajor()) && nul(ustar.DevMinor())) {\n\t\t\t\thdr.Format = FormatUnknown // Numeric fields must end in NUL\n\t\t\t}\n\t\tcase format.has(formatSTAR):\n\t\t\tstar := tr.blk.STAR()\n\t\t\tprefix = p.parseString(star.Prefix())\n\t\t\thdr.AccessTime = time.Unix(p.parseNumeric(star.AccessTime()), 0)\n\t\t\thdr.ChangeTime = time.Unix(p.parseNumeric(star.ChangeTime()), 0)\n\t\tcase format.has(FormatGNU):\n\t\t\thdr.Format = format\n\t\t\tvar p2 parser\n\t\t\tgnu := tr.blk.GNU()\n\t\t\tif b := gnu.AccessTime(); b[0] != 0 {\n\t\t\t\thdr.AccessTime = time.Unix(p2.parseNumeric(b), 0)\n\t\t\t}\n\t\t\tif b := gnu.ChangeTime(); b[0] != 0 {\n\t\t\t\thdr.ChangeTime = time.Unix(p2.parseNumeric(b), 0)\n\t\t\t}\n\n\t\t\t// Prior to Go1.8, the Writer had a bug where it would output\n\t\t\t// an invalid tar file in certain rare situations because the logic\n\t\t\t// incorrectly believed that the old GNU format had a prefix field.\n\t\t\t// This is wrong and leads to an output file that mangles the\n\t\t\t// atime and ctime fields, which are often left unused.\n\t\t\t//\n\t\t\t// In order to continue reading tar files created by former, buggy\n\t\t\t// versions of Go, we skeptically parse the atime and ctime fields.\n\t\t\t// If we are unable to parse them and the prefix field looks like\n\t\t\t// an ASCII string, then we fallback on the pre-Go1.8 behavior\n\t\t\t// of treating these fields as the USTAR prefix field.\n\t\t\t//\n\t\t\t// Note that this will not use the fallback logic for all possible\n\t\t\t// files generated by a pre-Go1.8 toolchain. If the generated file\n\t\t\t// happened to have a prefix field that parses as valid\n\t\t\t// atime and ctime fields (e.g., when they are valid octal strings),\n\t\t\t// then it is impossible to distinguish between an valid GNU file\n\t\t\t// and an invalid pre-Go1.8 file.\n\t\t\t//\n\t\t\t// See https://golang.org/issues/12594\n\t\t\t// See https://golang.org/issues/21005\n\t\t\tif p2.err != nil {\n\t\t\t\thdr.AccessTime, hdr.ChangeTime = time.Time{}, time.Time{}\n\t\t\t\tustar := tr.blk.USTAR()\n\t\t\t\tif s := p.parseString(ustar.Prefix()); isASCII(s) {\n\t\t\t\t\tprefix = s\n\t\t\t\t}\n\t\t\t\thdr.Format = FormatUnknown // Buggy file is not GNU\n\t\t\t}\n\t\t}\n\t\tif len(prefix) > 0 {\n\t\t\thdr.Name = prefix + \"/\" + hdr.Name\n\t\t}\n\t}\n\treturn hdr, &tr.blk, p.err\n}\n\n// readOldGNUSparseMap reads the sparse map from the old GNU sparse format.\n// The sparse map is stored in the tar header if it's small enough.\n// If it's larger than four entries, then one or more extension headers are used\n// to store the rest of the sparse map.\n//\n// The Header.Size does not reflect the size of any extended headers used.\n// Thus, this function will read from the raw io.Reader to fetch extra headers.\n// This method mutates blk in the process.\nfunc (tr *Reader) readOldGNUSparseMap(hdr *Header, blk *block) (sparseDatas, error) {\n\t// Make sure that the input format is GNU.\n\t// Unfortunately, the STAR format also has a sparse header format that uses\n\t// the same type flag but has a completely different layout.\n\tif blk.GetFormat() != FormatGNU {\n\t\treturn nil, ErrHeader\n\t}\n\thdr.Format.mayOnlyBe(FormatGNU)\n\n\tvar p parser\n\thdr.Size = p.parseNumeric(blk.GNU().RealSize())\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\ts := blk.GNU().Sparse()\n\tspd := make(sparseDatas, 0, s.MaxEntries())\n\tfor {\n\t\tfor i := 0; i < s.MaxEntries(); i++ {\n\t\t\t// This termination condition is identical to GNU and BSD tar.\n\t\t\tif s.Entry(i).Offset()[0] == 0x00 {\n\t\t\t\tbreak // Don't return, need to process extended headers (even if empty)\n\t\t\t}\n\t\t\toffset := p.parseNumeric(s.Entry(i).Offset())\n\t\t\tlength := p.parseNumeric(s.Entry(i).Length())\n\t\t\tif p.err != nil {\n\t\t\t\treturn nil, p.err\n\t\t\t}\n\t\t\tspd = append(spd, sparseEntry{Offset: offset, Length: length})\n\t\t}\n\n\t\tif s.IsExtended()[0] > 0 {\n\t\t\t// There are more entries. Read an extension header and parse its entries.\n\t\t\tif _, err := mustReadFull(tr.r, blk[:]); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif tr.RawAccounting {\n\t\t\t\ttr.rawBytes.Write(blk[:])\n\t\t\t}\n\t\t\ts = blk.Sparse()\n\t\t\tcontinue\n\t\t}\n\t\treturn spd, nil // Done\n\t}\n}\n\n// readGNUSparseMap1x0 reads the sparse map as stored in GNU's PAX sparse format\n// version 1.0. The format of the sparse map consists of a series of\n// newline-terminated numeric fields. The first field is the number of entries\n// and is always present. Following this are the entries, consisting of two\n// fields (offset, length). This function must stop reading at the end\n// boundary of the block containing the last newline.\n//\n// Note that the GNU manual says that numeric values should be encoded in octal\n// format. However, the GNU tar utility itself outputs these values in decimal.\n// As such, this library treats values as being encoded in decimal.\nfunc readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) {\n\tvar (\n\t\tcntNewline int64\n\t\tbuf        bytes.Buffer\n\t\tblk        block\n\t\ttotalSize  int\n\t)\n\n\t// feedTokens copies data in blocks from r into buf until there are\n\t// at least cnt newlines in buf. It will not read more blocks than needed.\n\tfeedTokens := func(n int64) error {\n\t\tfor cntNewline < n {\n\t\t\ttotalSize += len(blk)\n\t\t\tif totalSize > maxSpecialFileSize {\n\t\t\t\treturn errSparseTooLong\n\t\t\t}\n\t\t\tif _, err := mustReadFull(r, blk[:]); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tbuf.Write(blk[:])\n\t\t\tfor _, c := range blk {\n\t\t\t\tif c == '\\n' {\n\t\t\t\t\tcntNewline++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\t// nextToken gets the next token delimited by a newline. This assumes that\n\t// at least one newline exists in the buffer.\n\tnextToken := func() string {\n\t\tcntNewline--\n\t\ttok, _ := buf.ReadString('\\n')\n\t\treturn strings.TrimRight(tok, \"\\n\")\n\t}\n\n\t// Parse for the number of entries.\n\t// Use integer overflow resistant math to check this.\n\tif err := feedTokens(1); err != nil {\n\t\treturn nil, err\n\t}\n\tnumEntries, err := strconv.ParseInt(nextToken(), 10, 0) // Intentionally parse as native int\n\tif err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) {\n\t\treturn nil, ErrHeader\n\t}\n\n\t// Parse for all member entries.\n\t// numEntries is trusted after this since feedTokens limits the number of\n\t// tokens based on maxSpecialFileSize.\n\tif err := feedTokens(2 * numEntries); err != nil {\n\t\treturn nil, err\n\t}\n\tspd := make(sparseDatas, 0, numEntries)\n\tfor i := int64(0); i < numEntries; i++ {\n\t\toffset, err1 := strconv.ParseInt(nextToken(), 10, 64)\n\t\tlength, err2 := strconv.ParseInt(nextToken(), 10, 64)\n\t\tif err1 != nil || err2 != nil {\n\t\t\treturn nil, ErrHeader\n\t\t}\n\t\tspd = append(spd, sparseEntry{Offset: offset, Length: length})\n\t}\n\treturn spd, nil\n}\n\n// readGNUSparseMap0x1 reads the sparse map as stored in GNU's PAX sparse format\n// version 0.1. The sparse map is stored in the PAX headers.\nfunc readGNUSparseMap0x1(paxHdrs map[string]string) (sparseDatas, error) {\n\t// Get number of entries.\n\t// Use integer overflow resistant math to check this.\n\tnumEntriesStr := paxHdrs[paxGNUSparseNumBlocks]\n\tnumEntries, err := strconv.ParseInt(numEntriesStr, 10, 0) // Intentionally parse as native int\n\tif err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) {\n\t\treturn nil, ErrHeader\n\t}\n\n\t// There should be two numbers in sparseMap for each entry.\n\tsparseMap := strings.Split(paxHdrs[paxGNUSparseMap], \",\")\n\tif len(sparseMap) == 1 && sparseMap[0] == \"\" {\n\t\tsparseMap = sparseMap[:0]\n\t}\n\tif int64(len(sparseMap)) != 2*numEntries {\n\t\treturn nil, ErrHeader\n\t}\n\n\t// Loop through the entries in the sparse map.\n\t// numEntries is trusted now.\n\tspd := make(sparseDatas, 0, numEntries)\n\tfor len(sparseMap) >= 2 {\n\t\toffset, err1 := strconv.ParseInt(sparseMap[0], 10, 64)\n\t\tlength, err2 := strconv.ParseInt(sparseMap[1], 10, 64)\n\t\tif err1 != nil || err2 != nil {\n\t\t\treturn nil, ErrHeader\n\t\t}\n\t\tspd = append(spd, sparseEntry{Offset: offset, Length: length})\n\t\tsparseMap = sparseMap[2:]\n\t}\n\treturn spd, nil\n}\n\n// Read reads from the current file in the tar archive.\n// It returns (0, io.EOF) when it reaches the end of that file,\n// until Next is called to advance to the next file.\n//\n// If the current file is sparse, then the regions marked as a hole\n// are read back as NUL-bytes.\n//\n// Calling Read on special types like TypeLink, TypeSymlink, TypeChar,\n// TypeBlock, TypeDir, and TypeFifo returns (0, io.EOF) regardless of what\n// the Header.Size claims.\nfunc (tr *Reader) Read(b []byte) (int, error) {\n\tif tr.err != nil {\n\t\treturn 0, tr.err\n\t}\n\tn, err := tr.curr.Read(b)\n\tif err != nil && err != io.EOF {\n\t\ttr.err = err\n\t}\n\treturn n, err\n}\n\n// writeTo writes the content of the current file to w.\n// The bytes written matches the number of remaining bytes in the current file.\n//\n// If the current file is sparse and w is an io.WriteSeeker,\n// then writeTo uses Seek to skip past holes defined in Header.SparseHoles,\n// assuming that skipped regions are filled with NULs.\n// This always writes the last byte to ensure w is the right size.\n//\n// TODO(dsnet): Re-export this when adding sparse file support.\n// See https://golang.org/issue/22735\nfunc (tr *Reader) writeTo(w io.Writer) (int64, error) {\n\tif tr.err != nil {\n\t\treturn 0, tr.err\n\t}\n\tn, err := tr.curr.WriteTo(w)\n\tif err != nil {\n\t\ttr.err = err\n\t}\n\treturn n, err\n}\n\n// regFileReader is a fileReader for reading data from a regular file entry.\ntype regFileReader struct {\n\tr  io.Reader // Underlying Reader\n\tnb int64     // Number of remaining bytes to read\n}\n\nfunc (fr *regFileReader) Read(b []byte) (n int, err error) {\n\tif int64(len(b)) > fr.nb {\n\t\tb = b[:fr.nb]\n\t}\n\tif len(b) > 0 {\n\t\tn, err = fr.r.Read(b)\n\t\tfr.nb -= int64(n)\n\t}\n\tswitch {\n\tcase err == io.EOF && fr.nb > 0:\n\t\treturn n, io.ErrUnexpectedEOF\n\tcase err == nil && fr.nb == 0:\n\t\treturn n, io.EOF\n\tdefault:\n\t\treturn n, err\n\t}\n}\n\nfunc (fr *regFileReader) WriteTo(w io.Writer) (int64, error) {\n\treturn io.Copy(w, struct{ io.Reader }{fr})\n}\n\nfunc (fr regFileReader) LogicalRemaining() int64 {\n\treturn fr.nb\n}\n\nfunc (fr regFileReader) PhysicalRemaining() int64 {\n\treturn fr.nb\n}\n\n// sparseFileReader is a fileReader for reading data from a sparse file entry.\ntype sparseFileReader struct {\n\tfr  fileReader  // Underlying fileReader\n\tsp  sparseHoles // Normalized list of sparse holes\n\tpos int64       // Current position in sparse file\n}\n\nfunc (sr *sparseFileReader) Read(b []byte) (n int, err error) {\n\tfinished := int64(len(b)) >= sr.LogicalRemaining()\n\tif finished {\n\t\tb = b[:sr.LogicalRemaining()]\n\t}\n\n\tb0 := b\n\tendPos := sr.pos + int64(len(b))\n\tfor endPos > sr.pos && err == nil {\n\t\tvar nf int // Bytes read in fragment\n\t\tholeStart, holeEnd := sr.sp[0].Offset, sr.sp[0].endOffset()\n\t\tif sr.pos < holeStart { // In a data fragment\n\t\t\tbf := b[:min(int64(len(b)), holeStart-sr.pos)]\n\t\t\tnf, err = tryReadFull(sr.fr, bf)\n\t\t} else { // In a hole fragment\n\t\t\tbf := b[:min(int64(len(b)), holeEnd-sr.pos)]\n\t\t\tnf, err = tryReadFull(zeroReader{}, bf)\n\t\t}\n\t\tb = b[nf:]\n\t\tsr.pos += int64(nf)\n\t\tif sr.pos >= holeEnd && len(sr.sp) > 1 {\n\t\t\tsr.sp = sr.sp[1:] // Ensure last fragment always remains\n\t\t}\n\t}\n\n\tn = len(b0) - len(b)\n\tswitch {\n\tcase err == io.EOF:\n\t\treturn n, errMissData // Less data in dense file than sparse file\n\tcase err != nil:\n\t\treturn n, err\n\tcase sr.LogicalRemaining() == 0 && sr.PhysicalRemaining() > 0:\n\t\treturn n, errUnrefData // More data in dense file than sparse file\n\tcase finished:\n\t\treturn n, io.EOF\n\tdefault:\n\t\treturn n, nil\n\t}\n}\n\nfunc (sr *sparseFileReader) WriteTo(w io.Writer) (n int64, err error) {\n\tws, ok := w.(io.WriteSeeker)\n\tif ok {\n\t\tif _, err := ws.Seek(0, io.SeekCurrent); err != nil {\n\t\t\tok = false // Not all io.Seeker can really seek\n\t\t}\n\t}\n\tif !ok {\n\t\treturn io.Copy(w, struct{ io.Reader }{sr})\n\t}\n\n\tvar writeLastByte bool\n\tpos0 := sr.pos\n\tfor sr.LogicalRemaining() > 0 && !writeLastByte && err == nil {\n\t\tvar nf int64 // Size of fragment\n\t\tholeStart, holeEnd := sr.sp[0].Offset, sr.sp[0].endOffset()\n\t\tif sr.pos < holeStart { // In a data fragment\n\t\t\tnf = holeStart - sr.pos\n\t\t\tnf, err = io.CopyN(ws, sr.fr, nf)\n\t\t} else { // In a hole fragment\n\t\t\tnf = holeEnd - sr.pos\n\t\t\tif sr.PhysicalRemaining() == 0 {\n\t\t\t\twriteLastByte = true\n\t\t\t\tnf--\n\t\t\t}\n\t\t\t_, err = ws.Seek(nf, io.SeekCurrent)\n\t\t}\n\t\tsr.pos += nf\n\t\tif sr.pos >= holeEnd && len(sr.sp) > 1 {\n\t\t\tsr.sp = sr.sp[1:] // Ensure last fragment always remains\n\t\t}\n\t}\n\n\t// If the last fragment is a hole, then seek to 1-byte before EOF, and\n\t// write a single byte to ensure the file is the right size.\n\tif writeLastByte && err == nil {\n\t\t_, err = ws.Write([]byte{0})\n\t\tsr.pos++\n\t}\n\n\tn = sr.pos - pos0\n\tswitch {\n\tcase err == io.EOF:\n\t\treturn n, errMissData // Less data in dense file than sparse file\n\tcase err != nil:\n\t\treturn n, err\n\tcase sr.LogicalRemaining() == 0 && sr.PhysicalRemaining() > 0:\n\t\treturn n, errUnrefData // More data in dense file than sparse file\n\tdefault:\n\t\treturn n, nil\n\t}\n}\n\nfunc (sr sparseFileReader) LogicalRemaining() int64 {\n\treturn sr.sp[len(sr.sp)-1].endOffset() - sr.pos\n}\nfunc (sr sparseFileReader) PhysicalRemaining() int64 {\n\treturn sr.fr.PhysicalRemaining()\n}\n\ntype zeroReader struct{}\n\nfunc (zeroReader) Read(b []byte) (int, error) {\n\tfor i := range b {\n\t\tb[i] = 0\n\t}\n\treturn len(b), nil\n}\n\n// mustReadFull is like io.ReadFull except it returns\n// io.ErrUnexpectedEOF when io.EOF is hit before len(b) bytes are read.\nfunc mustReadFull(r io.Reader, b []byte) (int, error) {\n\tn, err := tryReadFull(r, b)\n\tif err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn n, err\n}\n\n// tryReadFull is like io.ReadFull except it returns\n// io.EOF when it is hit before len(b) bytes are read.\nfunc tryReadFull(r io.Reader, b []byte) (n int, err error) {\n\tfor len(b) > n && err == nil {\n\t\tvar nn int\n\t\tnn, err = r.Read(b[n:])\n\t\tn += nn\n\t}\n\tif len(b) == n && err == io.EOF {\n\t\terr = nil\n\t}\n\treturn n, err\n}\n\n// readSpecialFile is like io.ReadAll except it returns\n// ErrFieldTooLong if more than maxSpecialFileSize is read.\nfunc readSpecialFile(r io.Reader) ([]byte, error) {\n\tbuf, err := io.ReadAll(io.LimitReader(r, maxSpecialFileSize+1))\n\tif len(buf) > maxSpecialFileSize {\n\t\treturn nil, ErrFieldTooLong\n\t}\n\treturn buf, err\n}\n\n// discard skips n bytes in r, reporting an error if unable to do so.\nfunc discard(tr *Reader, n int64) error {\n\tvar seekSkipped, copySkipped int64\n\tvar err error\n\tr := tr.r\n\tif tr.RawAccounting {\n\n\t\tcopySkipped, err = io.CopyN(tr.rawBytes, tr.r, n)\n\t\tgoto out\n\t}\n\n\t// If possible, Seek to the last byte before the end of the data section.\n\t// Do this because Seek is often lazy about reporting errors; this will mask\n\t// the fact that the stream may be truncated. We can rely on the\n\t// io.CopyN done shortly afterwards to trigger any IO errors.\n\tif sr, ok := r.(io.Seeker); ok && n > 1 {\n\t\t// Not all io.Seeker can actually Seek. For example, os.Stdin implements\n\t\t// io.Seeker, but calling Seek always returns an error and performs\n\t\t// no action. Thus, we try an innocent seek to the current position\n\t\t// to see if Seek is really supported.\n\t\tpos1, err := sr.Seek(0, io.SeekCurrent)\n\t\tif pos1 >= 0 && err == nil {\n\t\t\t// Seek seems supported, so perform the real Seek.\n\t\t\tpos2, err := sr.Seek(n-1, io.SeekCurrent)\n\t\t\tif pos2 < 0 || err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tseekSkipped = pos2 - pos1\n\t\t}\n\t}\n\n\tcopySkipped, err = io.CopyN(io.Discard, r, n-seekSkipped)\nout:\n\tif err == io.EOF && seekSkipped+copySkipped < n {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build linux dragonfly openbsd solaris\n\npackage tar\n\nimport (\n\t\"syscall\"\n\t\"time\"\n)\n\nfunc statAtime(st *syscall.Stat_t) time.Time {\n\treturn time.Unix(st.Atim.Unix())\n}\n\nfunc statCtime(st *syscall.Stat_t) time.Time {\n\treturn time.Unix(st.Ctim.Unix())\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build darwin freebsd netbsd\n\npackage tar\n\nimport (\n\t\"syscall\"\n\t\"time\"\n)\n\nfunc statAtime(st *syscall.Stat_t) time.Time {\n\treturn time.Unix(st.Atimespec.Unix())\n}\n\nfunc statCtime(st *syscall.Stat_t) time.Time {\n\treturn time.Unix(st.Ctimespec.Unix())\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build linux darwin dragonfly freebsd openbsd netbsd solaris\n\npackage tar\n\nimport (\n\t\"os\"\n\t\"os/user\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"sync\"\n\t\"syscall\"\n)\n\nfunc init() {\n\tsysStat = statUnix\n}\n\n// userMap and groupMap caches UID and GID lookups for performance reasons.\n// The downside is that renaming uname or gname by the OS never takes effect.\nvar userMap, groupMap sync.Map // map[int]string\n\nfunc statUnix(fi os.FileInfo, h *Header) error {\n\tsys, ok := fi.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn nil\n\t}\n\th.Uid = int(sys.Uid)\n\th.Gid = int(sys.Gid)\n\n\t// Best effort at populating Uname and Gname.\n\t// The os/user functions may fail for any number of reasons\n\t// (not implemented on that platform, cgo not enabled, etc).\n\tif u, ok := userMap.Load(h.Uid); ok {\n\t\th.Uname = u.(string)\n\t} else if u, err := user.LookupId(strconv.Itoa(h.Uid)); err == nil {\n\t\th.Uname = u.Username\n\t\tuserMap.Store(h.Uid, h.Uname)\n\t}\n\tif g, ok := groupMap.Load(h.Gid); ok {\n\t\th.Gname = g.(string)\n\t} else if g, err := user.LookupGroupId(strconv.Itoa(h.Gid)); err == nil {\n\t\th.Gname = g.Name\n\t\tgroupMap.Store(h.Gid, h.Gname)\n\t}\n\n\th.AccessTime = statAtime(sys)\n\th.ChangeTime = statCtime(sys)\n\n\t// Best effort at populating Devmajor and Devminor.\n\tif h.Typeflag == TypeChar || h.Typeflag == TypeBlock {\n\t\tdev := uint64(sys.Rdev) // May be int32 or uint32\n\t\tswitch runtime.GOOS {\n\t\tcase \"linux\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_linux.go.\n\t\t\tmajor := uint32((dev & 0x00000000000fff00) >> 8)\n\t\t\tmajor |= uint32((dev & 0xfffff00000000000) >> 32)\n\t\t\tminor := uint32((dev & 0x00000000000000ff) >> 0)\n\t\t\tminor |= uint32((dev & 0x00000ffffff00000) >> 12)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tcase \"darwin\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_darwin.go.\n\t\t\tmajor := uint32((dev >> 24) & 0xff)\n\t\t\tminor := uint32(dev & 0xffffff)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tcase \"dragonfly\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_dragonfly.go.\n\t\t\tmajor := uint32((dev >> 8) & 0xff)\n\t\t\tminor := uint32(dev & 0xffff00ff)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tcase \"freebsd\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_freebsd.go.\n\t\t\tmajor := uint32((dev >> 8) & 0xff)\n\t\t\tminor := uint32(dev & 0xffff00ff)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tcase \"netbsd\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_netbsd.go.\n\t\t\tmajor := uint32((dev & 0x000fff00) >> 8)\n\t\t\tminor := uint32((dev & 0x000000ff) >> 0)\n\t\t\tminor |= uint32((dev & 0xfff00000) >> 12)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tcase \"openbsd\":\n\t\t\t// Copied from golang.org/x/sys/unix/dev_openbsd.go.\n\t\t\tmajor := uint32((dev & 0x0000ff00) >> 8)\n\t\t\tminor := uint32((dev & 0x000000ff) >> 0)\n\t\t\tminor |= uint32((dev & 0xffff0000) >> 8)\n\t\t\th.Devmajor, h.Devminor = int64(major), int64(minor)\n\t\tdefault:\n\t\t\t// TODO: Implement solaris (see https://golang.org/issue/8106)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/strconv.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage tar\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// hasNUL reports whether the NUL character exists within s.\nfunc hasNUL(s string) bool {\n\treturn strings.IndexByte(s, 0) >= 0\n}\n\n// isASCII reports whether the input is an ASCII C-style string.\nfunc isASCII(s string) bool {\n\tfor _, c := range s {\n\t\tif c >= 0x80 || c == 0x00 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// toASCII converts the input to an ASCII C-style string.\n// This a best effort conversion, so invalid characters are dropped.\nfunc toASCII(s string) string {\n\tif isASCII(s) {\n\t\treturn s\n\t}\n\tb := make([]byte, 0, len(s))\n\tfor _, c := range s {\n\t\tif c < 0x80 && c != 0x00 {\n\t\t\tb = append(b, byte(c))\n\t\t}\n\t}\n\treturn string(b)\n}\n\ntype parser struct {\n\terr error // Last error seen\n}\n\ntype formatter struct {\n\terr error // Last error seen\n}\n\n// parseString parses bytes as a NUL-terminated C-style string.\n// If a NUL byte is not found then the whole slice is returned as a string.\nfunc (*parser) parseString(b []byte) string {\n\tif i := bytes.IndexByte(b, 0); i >= 0 {\n\t\treturn string(b[:i])\n\t}\n\treturn string(b)\n}\n\n// formatString copies s into b, NUL-terminating if possible.\nfunc (f *formatter) formatString(b []byte, s string) {\n\tif len(s) > len(b) {\n\t\tf.err = ErrFieldTooLong\n\t}\n\tcopy(b, s)\n\tif len(s) < len(b) {\n\t\tb[len(s)] = 0\n\t}\n\n\t// Some buggy readers treat regular files with a trailing slash\n\t// in the V7 path field as a directory even though the full path\n\t// recorded elsewhere (e.g., via PAX record) contains no trailing slash.\n\tif len(s) > len(b) && b[len(b)-1] == '/' {\n\t\tn := len(strings.TrimRight(s[:len(b)], \"/\"))\n\t\tb[n] = 0 // Replace trailing slash with NUL terminator\n\t}\n}\n\n// fitsInBase256 reports whether x can be encoded into n bytes using base-256\n// encoding. Unlike octal encoding, base-256 encoding does not require that the\n// string ends with a NUL character. Thus, all n bytes are available for output.\n//\n// If operating in binary mode, this assumes strict GNU binary mode; which means\n// that the first byte can only be either 0x80 or 0xff. Thus, the first byte is\n// equivalent to the sign bit in two's complement form.\nfunc fitsInBase256(n int, x int64) bool {\n\tbinBits := uint(n-1) * 8\n\treturn n >= 9 || (x >= -1<<binBits && x < 1<<binBits)\n}\n\n// parseNumeric parses the input as being encoded in either base-256 or octal.\n// This function may return negative numbers.\n// If parsing fails or an integer overflow occurs, err will be set.\nfunc (p *parser) parseNumeric(b []byte) int64 {\n\t// Check for base-256 (binary) format first.\n\t// If the first bit is set, then all following bits constitute a two's\n\t// complement encoded number in big-endian byte order.\n\tif len(b) > 0 && b[0]&0x80 != 0 {\n\t\t// Handling negative numbers relies on the following identity:\n\t\t//\t-a-1 == ^a\n\t\t//\n\t\t// If the number is negative, we use an inversion mask to invert the\n\t\t// data bytes and treat the value as an unsigned number.\n\t\tvar inv byte // 0x00 if positive or zero, 0xff if negative\n\t\tif b[0]&0x40 != 0 {\n\t\t\tinv = 0xff\n\t\t}\n\n\t\tvar x uint64\n\t\tfor i, c := range b {\n\t\t\tc ^= inv // Inverts c only if inv is 0xff, otherwise does nothing\n\t\t\tif i == 0 {\n\t\t\t\tc &= 0x7f // Ignore signal bit in first byte\n\t\t\t}\n\t\t\tif (x >> 56) > 0 {\n\t\t\t\tp.err = ErrHeader // Integer overflow\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\tx = x<<8 | uint64(c)\n\t\t}\n\t\tif (x >> 63) > 0 {\n\t\t\tp.err = ErrHeader // Integer overflow\n\t\t\treturn 0\n\t\t}\n\t\tif inv == 0xff {\n\t\t\treturn ^int64(x)\n\t\t}\n\t\treturn int64(x)\n\t}\n\n\t// Normal case is base-8 (octal) format.\n\treturn p.parseOctal(b)\n}\n\n// formatNumeric encodes x into b using base-8 (octal) encoding if possible.\n// Otherwise it will attempt to use base-256 (binary) encoding.\nfunc (f *formatter) formatNumeric(b []byte, x int64) {\n\tif fitsInOctal(len(b), x) {\n\t\tf.formatOctal(b, x)\n\t\treturn\n\t}\n\n\tif fitsInBase256(len(b), x) {\n\t\tfor i := len(b) - 1; i >= 0; i-- {\n\t\t\tb[i] = byte(x)\n\t\t\tx >>= 8\n\t\t}\n\t\tb[0] |= 0x80 // Highest bit indicates binary format\n\t\treturn\n\t}\n\n\tf.formatOctal(b, 0) // Last resort, just write zero\n\tf.err = ErrFieldTooLong\n}\n\nfunc (p *parser) parseOctal(b []byte) int64 {\n\t// Because unused fields are filled with NULs, we need\n\t// to skip leading NULs. Fields may also be padded with\n\t// spaces or NULs.\n\t// So we remove leading and trailing NULs and spaces to\n\t// be sure.\n\tb = bytes.Trim(b, \" \\x00\")\n\n\tif len(b) == 0 {\n\t\treturn 0\n\t}\n\tx, perr := strconv.ParseUint(p.parseString(b), 8, 64)\n\tif perr != nil {\n\t\tp.err = ErrHeader\n\t}\n\treturn int64(x)\n}\n\nfunc (f *formatter) formatOctal(b []byte, x int64) {\n\tif !fitsInOctal(len(b), x) {\n\t\tx = 0 // Last resort, just write zero\n\t\tf.err = ErrFieldTooLong\n\t}\n\n\ts := strconv.FormatInt(x, 8)\n\t// Add leading zeros, but leave room for a NUL.\n\tif n := len(b) - len(s) - 1; n > 0 {\n\t\ts = strings.Repeat(\"0\", n) + s\n\t}\n\tf.formatString(b, s)\n}\n\n// fitsInOctal reports whether the integer x fits in a field n-bytes long\n// using octal encoding with the appropriate NUL terminator.\nfunc fitsInOctal(n int, x int64) bool {\n\toctBits := uint(n-1) * 3\n\treturn x >= 0 && (n >= 22 || x < 1<<octBits)\n}\n\n// parsePAXTime takes a string of the form %d.%d as described in the PAX\n// specification. Note that this implementation allows for negative timestamps,\n// which is allowed for by the PAX specification, but not always portable.\nfunc parsePAXTime(s string) (time.Time, error) {\n\tconst maxNanoSecondDigits = 9\n\n\t// Split string into seconds and sub-seconds parts.\n\tss, sn := s, \"\"\n\tif pos := strings.IndexByte(s, '.'); pos >= 0 {\n\t\tss, sn = s[:pos], s[pos+1:]\n\t}\n\n\t// Parse the seconds.\n\tsecs, err := strconv.ParseInt(ss, 10, 64)\n\tif err != nil {\n\t\treturn time.Time{}, ErrHeader\n\t}\n\tif len(sn) == 0 {\n\t\treturn time.Unix(secs, 0), nil // No sub-second values\n\t}\n\n\t// Parse the nanoseconds.\n\tif strings.Trim(sn, \"0123456789\") != \"\" {\n\t\treturn time.Time{}, ErrHeader\n\t}\n\tif len(sn) < maxNanoSecondDigits {\n\t\tsn += strings.Repeat(\"0\", maxNanoSecondDigits-len(sn)) // Right pad\n\t} else {\n\t\tsn = sn[:maxNanoSecondDigits] // Right truncate\n\t}\n\tnsecs, _ := strconv.ParseInt(sn, 10, 64) // Must succeed\n\tif len(ss) > 0 && ss[0] == '-' {\n\t\treturn time.Unix(secs, -1*nsecs), nil // Negative correction\n\t}\n\treturn time.Unix(secs, nsecs), nil\n}\n\n// formatPAXTime converts ts into a time of the form %d.%d as described in the\n// PAX specification. This function is capable of negative timestamps.\nfunc formatPAXTime(ts time.Time) (s string) {\n\tsecs, nsecs := ts.Unix(), ts.Nanosecond()\n\tif nsecs == 0 {\n\t\treturn strconv.FormatInt(secs, 10)\n\t}\n\n\t// If seconds is negative, then perform correction.\n\tsign := \"\"\n\tif secs < 0 {\n\t\tsign = \"-\"             // Remember sign\n\t\tsecs = -(secs + 1)     // Add a second to secs\n\t\tnsecs = -(nsecs - 1E9) // Take that second away from nsecs\n\t}\n\treturn strings.TrimRight(fmt.Sprintf(\"%s%d.%09d\", sign, secs, nsecs), \"0\")\n}\n\n// parsePAXRecord parses the input PAX record string into a key-value pair.\n// If parsing is successful, it will slice off the currently read record and\n// return the remainder as r.\nfunc parsePAXRecord(s string) (k, v, r string, err error) {\n\t// The size field ends at the first space.\n\tsp := strings.IndexByte(s, ' ')\n\tif sp == -1 {\n\t\treturn \"\", \"\", s, ErrHeader\n\t}\n\n\t// Parse the first token as a decimal integer.\n\tn, perr := strconv.ParseInt(s[:sp], 10, 0) // Intentionally parse as native int\n\tif perr != nil || n < 5 || int64(len(s)) < n {\n\t\treturn \"\", \"\", s, ErrHeader\n\t}\n\n\t// Extract everything between the space and the final newline.\n\trec, nl, rem := s[sp+1:n-1], s[n-1:n], s[n:]\n\tif nl != \"\\n\" {\n\t\treturn \"\", \"\", s, ErrHeader\n\t}\n\n\t// The first equals separates the key from the value.\n\teq := strings.IndexByte(rec, '=')\n\tif eq == -1 {\n\t\treturn \"\", \"\", s, ErrHeader\n\t}\n\tk, v = rec[:eq], rec[eq+1:]\n\n\tif !validPAXRecord(k, v) {\n\t\treturn \"\", \"\", s, ErrHeader\n\t}\n\treturn k, v, rem, nil\n}\n\n// formatPAXRecord formats a single PAX record, prefixing it with the\n// appropriate length.\nfunc formatPAXRecord(k, v string) (string, error) {\n\tif !validPAXRecord(k, v) {\n\t\treturn \"\", ErrHeader\n\t}\n\n\tconst padding = 3 // Extra padding for ' ', '=', and '\\n'\n\tsize := len(k) + len(v) + padding\n\tsize += len(strconv.Itoa(size))\n\trecord := strconv.Itoa(size) + \" \" + k + \"=\" + v + \"\\n\"\n\n\t// Final adjustment if adding size field increased the record size.\n\tif len(record) != size {\n\t\tsize = len(record)\n\t\trecord = strconv.Itoa(size) + \" \" + k + \"=\" + v + \"\\n\"\n\t}\n\treturn record, nil\n}\n\n// validPAXRecord reports whether the key-value pair is valid where each\n// record is formatted as:\n//\t\"%d %s=%s\\n\" % (size, key, value)\n//\n// Keys and values should be UTF-8, but the number of bad writers out there\n// forces us to be a more liberal.\n// Thus, we only reject all keys with NUL, and only reject NULs in values\n// for the PAX version of the USTAR string fields.\n// The key must not contain an '=' character.\nfunc validPAXRecord(k, v string) bool {\n\tif k == \"\" || strings.IndexByte(k, '=') >= 0 {\n\t\treturn false\n\t}\n\tswitch k {\n\tcase paxPath, paxLinkpath, paxUname, paxGname:\n\t\treturn !hasNUL(v)\n\tdefault:\n\t\treturn !hasNUL(k)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/archive/tar/writer.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage tar\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"path\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Writer provides sequential writing of a tar archive.\n// Write.WriteHeader begins a new file with the provided Header,\n// and then Writer can be treated as an io.Writer to supply that file's data.\ntype Writer struct {\n\tw    io.Writer\n\tpad  int64      // Amount of padding to write after current file entry\n\tcurr fileWriter // Writer for current file entry\n\thdr  Header     // Shallow copy of Header that is safe for mutations\n\tblk  block      // Buffer to use as temporary local storage\n\n\t// err is a persistent error.\n\t// It is only the responsibility of every exported method of Writer to\n\t// ensure that this error is sticky.\n\terr error\n}\n\n// NewWriter creates a new Writer writing to w.\nfunc NewWriter(w io.Writer) *Writer {\n\treturn &Writer{w: w, curr: &regFileWriter{w, 0}}\n}\n\ntype fileWriter interface {\n\tio.Writer\n\tfileState\n\n\tReadFrom(io.Reader) (int64, error)\n}\n\n// Flush finishes writing the current file's block padding.\n// The current file must be fully written before Flush can be called.\n//\n// This is unnecessary as the next call to WriteHeader or Close\n// will implicitly flush out the file's padding.\nfunc (tw *Writer) Flush() error {\n\tif tw.err != nil {\n\t\treturn tw.err\n\t}\n\tif nb := tw.curr.LogicalRemaining(); nb > 0 {\n\t\treturn fmt.Errorf(\"archive/tar: missed writing %d bytes\", nb)\n\t}\n\tif _, tw.err = tw.w.Write(zeroBlock[:tw.pad]); tw.err != nil {\n\t\treturn tw.err\n\t}\n\ttw.pad = 0\n\treturn nil\n}\n\n// WriteHeader writes hdr and prepares to accept the file's contents.\n// The Header.Size determines how many bytes can be written for the next file.\n// If the current file is not fully written, then this returns an error.\n// This implicitly flushes any padding necessary before writing the header.\nfunc (tw *Writer) WriteHeader(hdr *Header) error {\n\tif err := tw.Flush(); err != nil {\n\t\treturn err\n\t}\n\ttw.hdr = *hdr // Shallow copy of Header\n\n\t// Avoid usage of the legacy TypeRegA flag, and automatically promote\n\t// it to use TypeReg or TypeDir.\n\tif tw.hdr.Typeflag == TypeRegA {\n\t\tif strings.HasSuffix(tw.hdr.Name, \"/\") {\n\t\t\ttw.hdr.Typeflag = TypeDir\n\t\t} else {\n\t\t\ttw.hdr.Typeflag = TypeReg\n\t\t}\n\t}\n\n\t// Round ModTime and ignore AccessTime and ChangeTime unless\n\t// the format is explicitly chosen.\n\t// This ensures nominal usage of WriteHeader (without specifying the format)\n\t// does not always result in the PAX format being chosen, which\n\t// causes a 1KiB increase to every header.\n\tif tw.hdr.Format == FormatUnknown {\n\t\ttw.hdr.ModTime = tw.hdr.ModTime.Round(time.Second)\n\t\ttw.hdr.AccessTime = time.Time{}\n\t\ttw.hdr.ChangeTime = time.Time{}\n\t}\n\n\tallowedFormats, paxHdrs, err := tw.hdr.allowedFormats()\n\tswitch {\n\tcase allowedFormats.has(FormatUSTAR):\n\t\ttw.err = tw.writeUSTARHeader(&tw.hdr)\n\t\treturn tw.err\n\tcase allowedFormats.has(FormatPAX):\n\t\ttw.err = tw.writePAXHeader(&tw.hdr, paxHdrs)\n\t\treturn tw.err\n\tcase allowedFormats.has(FormatGNU):\n\t\ttw.err = tw.writeGNUHeader(&tw.hdr)\n\t\treturn tw.err\n\tdefault:\n\t\treturn err // Non-fatal error\n\t}\n}\n\nfunc (tw *Writer) writeUSTARHeader(hdr *Header) error {\n\t// Check if we can use USTAR prefix/suffix splitting.\n\tvar namePrefix string\n\tif prefix, suffix, ok := splitUSTARPath(hdr.Name); ok {\n\t\tnamePrefix, hdr.Name = prefix, suffix\n\t}\n\n\t// Pack the main header.\n\tvar f formatter\n\tblk := tw.templateV7Plus(hdr, f.formatString, f.formatOctal)\n\tf.formatString(blk.USTAR().Prefix(), namePrefix)\n\tblk.SetFormat(FormatUSTAR)\n\tif f.err != nil {\n\t\treturn f.err // Should never happen since header is validated\n\t}\n\treturn tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag)\n}\n\nfunc (tw *Writer) writePAXHeader(hdr *Header, paxHdrs map[string]string) error {\n\trealName, realSize := hdr.Name, hdr.Size\n\n\t// TODO(dsnet): Re-enable this when adding sparse support.\n\t// See https://golang.org/issue/22735\n\t/*\n\t\t// Handle sparse files.\n\t\tvar spd sparseDatas\n\t\tvar spb []byte\n\t\tif len(hdr.SparseHoles) > 0 {\n\t\t\tsph := append([]sparseEntry{}, hdr.SparseHoles...) // Copy sparse map\n\t\t\tsph = alignSparseEntries(sph, hdr.Size)\n\t\t\tspd = invertSparseEntries(sph, hdr.Size)\n\n\t\t\t// Format the sparse map.\n\t\t\thdr.Size = 0 // Replace with encoded size\n\t\t\tspb = append(strconv.AppendInt(spb, int64(len(spd)), 10), '\\n')\n\t\t\tfor _, s := range spd {\n\t\t\t\thdr.Size += s.Length\n\t\t\t\tspb = append(strconv.AppendInt(spb, s.Offset, 10), '\\n')\n\t\t\t\tspb = append(strconv.AppendInt(spb, s.Length, 10), '\\n')\n\t\t\t}\n\t\t\tpad := blockPadding(int64(len(spb)))\n\t\t\tspb = append(spb, zeroBlock[:pad]...)\n\t\t\thdr.Size += int64(len(spb)) // Accounts for encoded sparse map\n\n\t\t\t// Add and modify appropriate PAX records.\n\t\t\tdir, file := path.Split(realName)\n\t\t\thdr.Name = path.Join(dir, \"GNUSparseFile.0\", file)\n\t\t\tpaxHdrs[paxGNUSparseMajor] = \"1\"\n\t\t\tpaxHdrs[paxGNUSparseMinor] = \"0\"\n\t\t\tpaxHdrs[paxGNUSparseName] = realName\n\t\t\tpaxHdrs[paxGNUSparseRealSize] = strconv.FormatInt(realSize, 10)\n\t\t\tpaxHdrs[paxSize] = strconv.FormatInt(hdr.Size, 10)\n\t\t\tdelete(paxHdrs, paxPath) // Recorded by paxGNUSparseName\n\t\t}\n\t*/\n\t_ = realSize\n\n\t// Write PAX records to the output.\n\tisGlobal := hdr.Typeflag == TypeXGlobalHeader\n\tif len(paxHdrs) > 0 || isGlobal {\n\t\t// Sort keys for deterministic ordering.\n\t\tvar keys []string\n\t\tfor k := range paxHdrs {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t\tsort.Strings(keys)\n\n\t\t// Write each record to a buffer.\n\t\tvar buf strings.Builder\n\t\tfor _, k := range keys {\n\t\t\trec, err := formatPAXRecord(k, paxHdrs[k])\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tbuf.WriteString(rec)\n\t\t}\n\n\t\t// Write the extended header file.\n\t\tvar name string\n\t\tvar flag byte\n\t\tif isGlobal {\n\t\t\tname = realName\n\t\t\tif name == \"\" {\n\t\t\t\tname = \"GlobalHead.0.0\"\n\t\t\t}\n\t\t\tflag = TypeXGlobalHeader\n\t\t} else {\n\t\t\tdir, file := path.Split(realName)\n\t\t\tname = path.Join(dir, \"PaxHeaders.0\", file)\n\t\t\tflag = TypeXHeader\n\t\t}\n\t\tdata := buf.String()\n\t\tif len(data) > maxSpecialFileSize {\n\t\t\treturn ErrFieldTooLong\n\t\t}\n\t\tif err := tw.writeRawFile(name, data, flag, FormatPAX); err != nil || isGlobal {\n\t\t\treturn err // Global headers return here\n\t\t}\n\t}\n\n\t// Pack the main header.\n\tvar f formatter // Ignore errors since they are expected\n\tfmtStr := func(b []byte, s string) { f.formatString(b, toASCII(s)) }\n\tblk := tw.templateV7Plus(hdr, fmtStr, f.formatOctal)\n\tblk.SetFormat(FormatPAX)\n\tif err := tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag); err != nil {\n\t\treturn err\n\t}\n\n\t// TODO(dsnet): Re-enable this when adding sparse support.\n\t// See https://golang.org/issue/22735\n\t/*\n\t\t// Write the sparse map and setup the sparse writer if necessary.\n\t\tif len(spd) > 0 {\n\t\t\t// Use tw.curr since the sparse map is accounted for in hdr.Size.\n\t\t\tif _, err := tw.curr.Write(spb); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ttw.curr = &sparseFileWriter{tw.curr, spd, 0}\n\t\t}\n\t*/\n\treturn nil\n}\n\nfunc (tw *Writer) writeGNUHeader(hdr *Header) error {\n\t// Use long-link files if Name or Linkname exceeds the field size.\n\tconst longName = \"././@LongLink\"\n\tif len(hdr.Name) > nameSize {\n\t\tdata := hdr.Name + \"\\x00\"\n\t\tif err := tw.writeRawFile(longName, data, TypeGNULongName, FormatGNU); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif len(hdr.Linkname) > nameSize {\n\t\tdata := hdr.Linkname + \"\\x00\"\n\t\tif err := tw.writeRawFile(longName, data, TypeGNULongLink, FormatGNU); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Pack the main header.\n\tvar f formatter // Ignore errors since they are expected\n\tvar spd sparseDatas\n\tvar spb []byte\n\tblk := tw.templateV7Plus(hdr, f.formatString, f.formatNumeric)\n\tif !hdr.AccessTime.IsZero() {\n\t\tf.formatNumeric(blk.GNU().AccessTime(), hdr.AccessTime.Unix())\n\t}\n\tif !hdr.ChangeTime.IsZero() {\n\t\tf.formatNumeric(blk.GNU().ChangeTime(), hdr.ChangeTime.Unix())\n\t}\n\t// TODO(dsnet): Re-enable this when adding sparse support.\n\t// See https://golang.org/issue/22735\n\t/*\n\t\tif hdr.Typeflag == TypeGNUSparse {\n\t\t\tsph := append([]sparseEntry{}, hdr.SparseHoles...) // Copy sparse map\n\t\t\tsph = alignSparseEntries(sph, hdr.Size)\n\t\t\tspd = invertSparseEntries(sph, hdr.Size)\n\n\t\t\t// Format the sparse map.\n\t\t\tformatSPD := func(sp sparseDatas, sa sparseArray) sparseDatas {\n\t\t\t\tfor i := 0; len(sp) > 0 && i < sa.MaxEntries(); i++ {\n\t\t\t\t\tf.formatNumeric(sa.Entry(i).Offset(), sp[0].Offset)\n\t\t\t\t\tf.formatNumeric(sa.Entry(i).Length(), sp[0].Length)\n\t\t\t\t\tsp = sp[1:]\n\t\t\t\t}\n\t\t\t\tif len(sp) > 0 {\n\t\t\t\t\tsa.IsExtended()[0] = 1\n\t\t\t\t}\n\t\t\t\treturn sp\n\t\t\t}\n\t\t\tsp2 := formatSPD(spd, blk.GNU().Sparse())\n\t\t\tfor len(sp2) > 0 {\n\t\t\t\tvar spHdr block\n\t\t\t\tsp2 = formatSPD(sp2, spHdr.Sparse())\n\t\t\t\tspb = append(spb, spHdr[:]...)\n\t\t\t}\n\n\t\t\t// Update size fields in the header block.\n\t\t\trealSize := hdr.Size\n\t\t\thdr.Size = 0 // Encoded size; does not account for encoded sparse map\n\t\t\tfor _, s := range spd {\n\t\t\t\thdr.Size += s.Length\n\t\t\t}\n\t\t\tcopy(blk.V7().Size(), zeroBlock[:]) // Reset field\n\t\t\tf.formatNumeric(blk.V7().Size(), hdr.Size)\n\t\t\tf.formatNumeric(blk.GNU().RealSize(), realSize)\n\t\t}\n\t*/\n\tblk.SetFormat(FormatGNU)\n\tif err := tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag); err != nil {\n\t\treturn err\n\t}\n\n\t// Write the extended sparse map and setup the sparse writer if necessary.\n\tif len(spd) > 0 {\n\t\t// Use tw.w since the sparse map is not accounted for in hdr.Size.\n\t\tif _, err := tw.w.Write(spb); err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttw.curr = &sparseFileWriter{tw.curr, spd, 0}\n\t}\n\treturn nil\n}\n\ntype (\n\tstringFormatter func([]byte, string)\n\tnumberFormatter func([]byte, int64)\n)\n\n// templateV7Plus fills out the V7 fields of a block using values from hdr.\n// It also fills out fields (uname, gname, devmajor, devminor) that are\n// shared in the USTAR, PAX, and GNU formats using the provided formatters.\n//\n// The block returned is only valid until the next call to\n// templateV7Plus or writeRawFile.\nfunc (tw *Writer) templateV7Plus(hdr *Header, fmtStr stringFormatter, fmtNum numberFormatter) *block {\n\ttw.blk.Reset()\n\n\tmodTime := hdr.ModTime\n\tif modTime.IsZero() {\n\t\tmodTime = time.Unix(0, 0)\n\t}\n\n\tv7 := tw.blk.V7()\n\tv7.TypeFlag()[0] = hdr.Typeflag\n\tfmtStr(v7.Name(), hdr.Name)\n\tfmtStr(v7.LinkName(), hdr.Linkname)\n\tfmtNum(v7.Mode(), hdr.Mode)\n\tfmtNum(v7.UID(), int64(hdr.Uid))\n\tfmtNum(v7.GID(), int64(hdr.Gid))\n\tfmtNum(v7.Size(), hdr.Size)\n\tfmtNum(v7.ModTime(), modTime.Unix())\n\n\tustar := tw.blk.USTAR()\n\tfmtStr(ustar.UserName(), hdr.Uname)\n\tfmtStr(ustar.GroupName(), hdr.Gname)\n\tfmtNum(ustar.DevMajor(), hdr.Devmajor)\n\tfmtNum(ustar.DevMinor(), hdr.Devminor)\n\n\treturn &tw.blk\n}\n\n// writeRawFile writes a minimal file with the given name and flag type.\n// It uses format to encode the header format and will write data as the body.\n// It uses default values for all of the other fields (as BSD and GNU tar does).\nfunc (tw *Writer) writeRawFile(name, data string, flag byte, format Format) error {\n\ttw.blk.Reset()\n\n\t// Best effort for the filename.\n\tname = toASCII(name)\n\tif len(name) > nameSize {\n\t\tname = name[:nameSize]\n\t}\n\tname = strings.TrimRight(name, \"/\")\n\n\tvar f formatter\n\tv7 := tw.blk.V7()\n\tv7.TypeFlag()[0] = flag\n\tf.formatString(v7.Name(), name)\n\tf.formatOctal(v7.Mode(), 0)\n\tf.formatOctal(v7.UID(), 0)\n\tf.formatOctal(v7.GID(), 0)\n\tf.formatOctal(v7.Size(), int64(len(data))) // Must be < 8GiB\n\tf.formatOctal(v7.ModTime(), 0)\n\ttw.blk.SetFormat(format)\n\tif f.err != nil {\n\t\treturn f.err // Only occurs if size condition is violated\n\t}\n\n\t// Write the header and data.\n\tif err := tw.writeRawHeader(&tw.blk, int64(len(data)), flag); err != nil {\n\t\treturn err\n\t}\n\t_, err := io.WriteString(tw, data)\n\treturn err\n}\n\n// writeRawHeader writes the value of blk, regardless of its value.\n// It sets up the Writer such that it can accept a file of the given size.\n// If the flag is a special header-only flag, then the size is treated as zero.\nfunc (tw *Writer) writeRawHeader(blk *block, size int64, flag byte) error {\n\tif err := tw.Flush(); err != nil {\n\t\treturn err\n\t}\n\tif _, err := tw.w.Write(blk[:]); err != nil {\n\t\treturn err\n\t}\n\tif isHeaderOnlyType(flag) {\n\t\tsize = 0\n\t}\n\ttw.curr = &regFileWriter{tw.w, size}\n\ttw.pad = blockPadding(size)\n\treturn nil\n}\n\n// splitUSTARPath splits a path according to USTAR prefix and suffix rules.\n// If the path is not splittable, then it will return (\"\", \"\", false).\nfunc splitUSTARPath(name string) (prefix, suffix string, ok bool) {\n\tlength := len(name)\n\tif length <= nameSize || !isASCII(name) {\n\t\treturn \"\", \"\", false\n\t} else if length > prefixSize+1 {\n\t\tlength = prefixSize + 1\n\t} else if name[length-1] == '/' {\n\t\tlength--\n\t}\n\n\ti := strings.LastIndex(name[:length], \"/\")\n\tnlen := len(name) - i - 1 // nlen is length of suffix\n\tplen := i                 // plen is length of prefix\n\tif i <= 0 || nlen > nameSize || nlen == 0 || plen > prefixSize {\n\t\treturn \"\", \"\", false\n\t}\n\treturn name[:i], name[i+1:], true\n}\n\n// Write writes to the current file in the tar archive.\n// Write returns the error ErrWriteTooLong if more than\n// Header.Size bytes are written after WriteHeader.\n//\n// Calling Write on special types like TypeLink, TypeSymlink, TypeChar,\n// TypeBlock, TypeDir, and TypeFifo returns (0, ErrWriteTooLong) regardless\n// of what the Header.Size claims.\nfunc (tw *Writer) Write(b []byte) (int, error) {\n\tif tw.err != nil {\n\t\treturn 0, tw.err\n\t}\n\tn, err := tw.curr.Write(b)\n\tif err != nil && err != ErrWriteTooLong {\n\t\ttw.err = err\n\t}\n\treturn n, err\n}\n\n// readFrom populates the content of the current file by reading from r.\n// The bytes read must match the number of remaining bytes in the current file.\n//\n// If the current file is sparse and r is an io.ReadSeeker,\n// then readFrom uses Seek to skip past holes defined in Header.SparseHoles,\n// assuming that skipped regions are all NULs.\n// This always reads the last byte to ensure r is the right size.\n//\n// TODO(dsnet): Re-export this when adding sparse file support.\n// See https://golang.org/issue/22735\nfunc (tw *Writer) readFrom(r io.Reader) (int64, error) {\n\tif tw.err != nil {\n\t\treturn 0, tw.err\n\t}\n\tn, err := tw.curr.ReadFrom(r)\n\tif err != nil && err != ErrWriteTooLong {\n\t\ttw.err = err\n\t}\n\treturn n, err\n}\n\n// Close closes the tar archive by flushing the padding, and writing the footer.\n// If the current file (from a prior call to WriteHeader) is not fully written,\n// then this returns an error.\nfunc (tw *Writer) Close() error {\n\tif tw.err == ErrWriteAfterClose {\n\t\treturn nil\n\t}\n\tif tw.err != nil {\n\t\treturn tw.err\n\t}\n\n\t// Trailer: two zero blocks.\n\terr := tw.Flush()\n\tfor i := 0; i < 2 && err == nil; i++ {\n\t\t_, err = tw.w.Write(zeroBlock[:])\n\t}\n\n\t// Ensure all future actions are invalid.\n\ttw.err = ErrWriteAfterClose\n\treturn err // Report IO errors\n}\n\n// regFileWriter is a fileWriter for writing data to a regular file entry.\ntype regFileWriter struct {\n\tw  io.Writer // Underlying Writer\n\tnb int64     // Number of remaining bytes to write\n}\n\nfunc (fw *regFileWriter) Write(b []byte) (n int, err error) {\n\toverwrite := int64(len(b)) > fw.nb\n\tif overwrite {\n\t\tb = b[:fw.nb]\n\t}\n\tif len(b) > 0 {\n\t\tn, err = fw.w.Write(b)\n\t\tfw.nb -= int64(n)\n\t}\n\tswitch {\n\tcase err != nil:\n\t\treturn n, err\n\tcase overwrite:\n\t\treturn n, ErrWriteTooLong\n\tdefault:\n\t\treturn n, nil\n\t}\n}\n\nfunc (fw *regFileWriter) ReadFrom(r io.Reader) (int64, error) {\n\treturn io.Copy(struct{ io.Writer }{fw}, r)\n}\n\nfunc (fw regFileWriter) LogicalRemaining() int64 {\n\treturn fw.nb\n}\nfunc (fw regFileWriter) PhysicalRemaining() int64 {\n\treturn fw.nb\n}\n\n// sparseFileWriter is a fileWriter for writing data to a sparse file entry.\ntype sparseFileWriter struct {\n\tfw  fileWriter  // Underlying fileWriter\n\tsp  sparseDatas // Normalized list of data fragments\n\tpos int64       // Current position in sparse file\n}\n\nfunc (sw *sparseFileWriter) Write(b []byte) (n int, err error) {\n\toverwrite := int64(len(b)) > sw.LogicalRemaining()\n\tif overwrite {\n\t\tb = b[:sw.LogicalRemaining()]\n\t}\n\n\tb0 := b\n\tendPos := sw.pos + int64(len(b))\n\tfor endPos > sw.pos && err == nil {\n\t\tvar nf int // Bytes written in fragment\n\t\tdataStart, dataEnd := sw.sp[0].Offset, sw.sp[0].endOffset()\n\t\tif sw.pos < dataStart { // In a hole fragment\n\t\t\tbf := b[:min(int64(len(b)), dataStart-sw.pos)]\n\t\t\tnf, err = zeroWriter{}.Write(bf)\n\t\t} else { // In a data fragment\n\t\t\tbf := b[:min(int64(len(b)), dataEnd-sw.pos)]\n\t\t\tnf, err = sw.fw.Write(bf)\n\t\t}\n\t\tb = b[nf:]\n\t\tsw.pos += int64(nf)\n\t\tif sw.pos >= dataEnd && len(sw.sp) > 1 {\n\t\t\tsw.sp = sw.sp[1:] // Ensure last fragment always remains\n\t\t}\n\t}\n\n\tn = len(b0) - len(b)\n\tswitch {\n\tcase err == ErrWriteTooLong:\n\t\treturn n, errMissData // Not possible; implies bug in validation logic\n\tcase err != nil:\n\t\treturn n, err\n\tcase sw.LogicalRemaining() == 0 && sw.PhysicalRemaining() > 0:\n\t\treturn n, errUnrefData // Not possible; implies bug in validation logic\n\tcase overwrite:\n\t\treturn n, ErrWriteTooLong\n\tdefault:\n\t\treturn n, nil\n\t}\n}\n\nfunc (sw *sparseFileWriter) ReadFrom(r io.Reader) (n int64, err error) {\n\trs, ok := r.(io.ReadSeeker)\n\tif ok {\n\t\tif _, err := rs.Seek(0, io.SeekCurrent); err != nil {\n\t\t\tok = false // Not all io.Seeker can really seek\n\t\t}\n\t}\n\tif !ok {\n\t\treturn io.Copy(struct{ io.Writer }{sw}, r)\n\t}\n\n\tvar readLastByte bool\n\tpos0 := sw.pos\n\tfor sw.LogicalRemaining() > 0 && !readLastByte && err == nil {\n\t\tvar nf int64 // Size of fragment\n\t\tdataStart, dataEnd := sw.sp[0].Offset, sw.sp[0].endOffset()\n\t\tif sw.pos < dataStart { // In a hole fragment\n\t\t\tnf = dataStart - sw.pos\n\t\t\tif sw.PhysicalRemaining() == 0 {\n\t\t\t\treadLastByte = true\n\t\t\t\tnf--\n\t\t\t}\n\t\t\t_, err = rs.Seek(nf, io.SeekCurrent)\n\t\t} else { // In a data fragment\n\t\t\tnf = dataEnd - sw.pos\n\t\t\tnf, err = io.CopyN(sw.fw, rs, nf)\n\t\t}\n\t\tsw.pos += nf\n\t\tif sw.pos >= dataEnd && len(sw.sp) > 1 {\n\t\t\tsw.sp = sw.sp[1:] // Ensure last fragment always remains\n\t\t}\n\t}\n\n\t// If the last fragment is a hole, then seek to 1-byte before EOF, and\n\t// read a single byte to ensure the file is the right size.\n\tif readLastByte && err == nil {\n\t\t_, err = mustReadFull(rs, []byte{0})\n\t\tsw.pos++\n\t}\n\n\tn = sw.pos - pos0\n\tswitch {\n\tcase err == io.EOF:\n\t\treturn n, io.ErrUnexpectedEOF\n\tcase err == ErrWriteTooLong:\n\t\treturn n, errMissData // Not possible; implies bug in validation logic\n\tcase err != nil:\n\t\treturn n, err\n\tcase sw.LogicalRemaining() == 0 && sw.PhysicalRemaining() > 0:\n\t\treturn n, errUnrefData // Not possible; implies bug in validation logic\n\tdefault:\n\t\treturn n, ensureEOF(rs)\n\t}\n}\n\nfunc (sw sparseFileWriter) LogicalRemaining() int64 {\n\treturn sw.sp[len(sw.sp)-1].endOffset() - sw.pos\n}\nfunc (sw sparseFileWriter) PhysicalRemaining() int64 {\n\treturn sw.fw.PhysicalRemaining()\n}\n\n// zeroWriter may only be written with NULs, otherwise it returns errWriteHole.\ntype zeroWriter struct{}\n\nfunc (zeroWriter) Write(b []byte) (int, error) {\n\tfor i, c := range b {\n\t\tif c != 0 {\n\t\t\treturn i, errWriteHole\n\t\t}\n\t}\n\treturn len(b), nil\n}\n\n// ensureEOF checks whether r is at EOF, reporting ErrWriteTooLong if not so.\nfunc ensureEOF(r io.Reader) error {\n\tn, err := tryReadFull(r, []byte{0})\n\tswitch {\n\tcase n > 0:\n\t\treturn ErrWriteTooLong\n\tcase err == io.EOF:\n\t\treturn nil\n\tdefault:\n\t\treturn err\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/asm/README.md",
    "content": "asm\n===\n\nThis library for assembly and disassembly of tar archives, facilitated by\n`github.com/vbatts/tar-split/tar/storage`.\n\n\nConcerns\n--------\n\nFor completely safe assembly/disassembly, there will need to be a Content\nAddressable Storage (CAS) directory, that maps to a checksum in the\n`storage.Entity` of `storage.FileType`.\n\nThis is due to the fact that tar archives _can_ allow multiple records for the\nsame path, but the last one effectively wins. Even if the prior records had a\ndifferent payload. \n\nIn this way, when assembling an archive from relative paths, if the archive has\nmultiple entries for the same path, then all payloads read in from a relative\npath would be identical.\n\n\nThoughts\n--------\n\nHave a look-aside directory or storage. This way when a clobbering record is\nencountered from the tar stream, then the payload of the prior/existing file is\nstored to the CAS. This way the clobbering record's file payload can be\nextracted, but we'll have preserved the payload needed to reassemble a precise\ntar archive.\n\nclobbered/path/to/file.[0-N]\n\n*alternatively*\n\nWe could just _not_ support tar streams that have clobbering file paths.\nAppending records to the archive is not incredibly common, and doesn't happen\nby default for most implementations.  Not supporting them wouldn't be a\nsecurity concern either, as if it did occur, we would reassemble an archive\nthat doesn't validate signature/checksum, so it shouldn't be trusted anyway.\n\nOtherwise, this will allow us to defer support for appended files as a FUTURE FEATURE.\n\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/asm/assemble.go",
    "content": "package asm\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"hash\"\n\t\"hash/crc64\"\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/vbatts/tar-split/tar/storage\"\n)\n\n// NewOutputTarStream returns an io.ReadCloser that is an assembled tar archive\n// stream.\n//\n// It takes a storage.FileGetter, for mapping the file payloads that are to be read in,\n// and a storage.Unpacker, which has access to the rawbytes and file order\n// metadata. With the combination of these two items, a precise assembled Tar\n// archive is possible.\nfunc NewOutputTarStream(fg storage.FileGetter, up storage.Unpacker) io.ReadCloser {\n\t// ... Since these are interfaces, this is possible, so let's not have a nil pointer\n\tif fg == nil || up == nil {\n\t\treturn nil\n\t}\n\tpr, pw := io.Pipe()\n\tgo func() {\n\t\terr := WriteOutputTarStream(fg, up, pw)\n\t\tif err != nil {\n\t\t\tpw.CloseWithError(err)\n\t\t} else {\n\t\t\tpw.Close()\n\t\t}\n\t}()\n\treturn pr\n}\n\n// WriteOutputTarStream writes assembled tar archive to a writer.\nfunc WriteOutputTarStream(fg storage.FileGetter, up storage.Unpacker, w io.Writer) error {\n\t// ... Since these are interfaces, this is possible, so let's not have a nil pointer\n\tif fg == nil || up == nil {\n\t\treturn nil\n\t}\n\tvar copyBuffer []byte\n\tvar crcHash hash.Hash\n\tvar crcSum []byte\n\tvar multiWriter io.Writer\n\tfor {\n\t\tentry, err := up.Next()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tswitch entry.Type {\n\t\tcase storage.SegmentType:\n\t\t\tif _, err := w.Write(entry.Payload); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase storage.FileType:\n\t\t\tif entry.Size == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfh, err := fg.Get(entry.GetName())\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif crcHash == nil {\n\t\t\t\tcrcHash = crc64.New(storage.CRCTable)\n\t\t\t\tcrcSum = make([]byte, 8)\n\t\t\t\tmultiWriter = io.MultiWriter(w, crcHash)\n\t\t\t\tcopyBuffer = byteBufferPool.Get().([]byte)\n\t\t\t\t// TODO once we have some benchmark or memory profile then we can experiment with using *bytes.Buffer\n\t\t\t\t//nolint:staticcheck // SA6002 not going to do a pointer here\n\t\t\t\tdefer byteBufferPool.Put(copyBuffer)\n\t\t\t} else {\n\t\t\t\tcrcHash.Reset()\n\t\t\t}\n\n\t\t\tif _, err := copyWithBuffer(multiWriter, fh, copyBuffer); err != nil {\n\t\t\t\tfh.Close()\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif !bytes.Equal(crcHash.Sum(crcSum[:0]), entry.Payload) {\n\t\t\t\t// I would rather this be a comparable ErrInvalidChecksum or such,\n\t\t\t\t// but since it's coming through the PipeReader, the context of\n\t\t\t\t// _which_ file would be lost...\n\t\t\t\tfh.Close()\n\t\t\t\treturn fmt.Errorf(\"file integrity checksum failed for %q\", entry.GetName())\n\t\t\t}\n\t\t\tfh.Close()\n\t\t}\n\t}\n}\n\nvar byteBufferPool = &sync.Pool{\n\tNew: func() interface{} {\n\t\treturn make([]byte, 32*1024)\n\t},\n}\n\n// copyWithBuffer is taken from stdlib io.Copy implementation\n// https://github.com/golang/go/blob/go1.5.1/src/io/io.go#L367\nfunc copyWithBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error) {\n\tfor {\n\t\tnr, er := src.Read(buf)\n\t\tif nr > 0 {\n\t\t\tnw, ew := dst.Write(buf[0:nr])\n\t\t\tif nw > 0 {\n\t\t\t\twritten += int64(nw)\n\t\t\t}\n\t\t\tif ew != nil {\n\t\t\t\terr = ew\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif nr != nw {\n\t\t\t\terr = io.ErrShortWrite\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif er == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif er != nil {\n\t\t\terr = er\n\t\t\tbreak\n\t\t}\n\t}\n\treturn written, err\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/asm/disassemble.go",
    "content": "package asm\n\nimport (\n\t\"io\"\n\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n)\n\n// NewInputTarStream wraps the Reader stream of a tar archive and provides a\n// Reader stream of the same.\n//\n// In the middle it will pack the segments and file metadata to storage.Packer\n// `p`.\n//\n// The the storage.FilePutter is where payload of files in the stream are\n// stashed. If this stashing is not needed, you can provide a nil\n// storage.FilePutter. Since the checksumming is still needed, then a default\n// of NewDiscardFilePutter will be used internally\nfunc NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io.Reader, error) {\n\t// What to do here... folks will want their own access to the Reader that is\n\t// their tar archive stream, but we'll need that same stream to use our\n\t// forked 'archive/tar'.\n\t// Perhaps do an io.TeeReader that hands back an io.Reader for them to read\n\t// from, and we'll MITM the stream to store metadata.\n\t// We'll need a storage.FilePutter too ...\n\n\t// Another concern, whether to do any storage.FilePutter operations, such that we\n\t// don't extract any amount of the archive. But then again, we're not making\n\t// files/directories, hardlinks, etc. Just writing the io to the storage.FilePutter.\n\t// Perhaps we have a DiscardFilePutter that is a bit bucket.\n\n\t// we'll return the pipe reader, since TeeReader does not buffer and will\n\t// only read what the outputRdr Read's. Since Tar archives have padding on\n\t// the end, we want to be the one reading the padding, even if the user's\n\t// `archive/tar` doesn't care.\n\tpR, pW := io.Pipe()\n\toutputRdr := io.TeeReader(r, pW)\n\n\t// we need a putter that will generate the crc64 sums of file payloads\n\tif fp == nil {\n\t\tfp = storage.NewDiscardFilePutter()\n\t}\n\n\tgo func() {\n\t\ttr := tar.NewReader(outputRdr)\n\t\ttr.RawAccounting = true\n\t\tfor {\n\t\t\thdr, err := tr.Next()\n\t\t\tif err != nil {\n\t\t\t\tif err != io.EOF {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// even when an EOF is reached, there is often 1024 null bytes on\n\t\t\t\t// the end of an archive. Collect them too.\n\t\t\t\tif b := tr.RawBytes(); len(b) > 0 {\n\t\t\t\t\t_, err := p.AddEntry(storage.Entry{\n\t\t\t\t\t\tType:    storage.SegmentType,\n\t\t\t\t\t\tPayload: b,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak // not return. We need the end of the reader.\n\t\t\t}\n\t\t\tif hdr == nil {\n\t\t\t\tbreak // not return. We need the end of the reader.\n\t\t\t}\n\n\t\t\tif b := tr.RawBytes(); len(b) > 0 {\n\t\t\t\t_, err := p.AddEntry(storage.Entry{\n\t\t\t\t\tType:    storage.SegmentType,\n\t\t\t\t\tPayload: b,\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar csum []byte\n\t\t\tif hdr.Size > 0 {\n\t\t\t\tvar err error\n\t\t\t\t_, csum, err = fp.Put(hdr.Name, tr)\n\t\t\t\tif err != nil {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tentry := storage.Entry{\n\t\t\t\tType:    storage.FileType,\n\t\t\t\tSize:    hdr.Size,\n\t\t\t\tPayload: csum,\n\t\t\t}\n\t\t\t// For proper marshalling of non-utf8 characters\n\t\t\tentry.SetName(hdr.Name)\n\n\t\t\t// File entries added, regardless of size\n\t\t\t_, err = p.AddEntry(entry)\n\t\t\tif err != nil {\n\t\t\t\tpW.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif b := tr.RawBytes(); len(b) > 0 {\n\t\t\t\t_, err = p.AddEntry(storage.Entry{\n\t\t\t\t\tType:    storage.SegmentType,\n\t\t\t\t\tPayload: b,\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// It is allowable, and not uncommon that there is further padding on\n\t\t// the end of an archive, apart from the expected 1024 null bytes. We\n\t\t// do this in chunks rather than in one go to avoid cases where a\n\t\t// maliciously crafted tar file tries to trick us into reading many GBs\n\t\t// into memory.\n\t\tconst paddingChunkSize = 1024 * 1024\n\t\tvar paddingChunk [paddingChunkSize]byte\n\t\tfor {\n\t\t\tvar isEOF bool\n\t\t\tn, err := outputRdr.Read(paddingChunk[:])\n\t\t\tif err != nil {\n\t\t\t\tif err != io.EOF {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tisEOF = true\n\t\t\t}\n\t\t\tif n != 0 {\n\t\t\t\t_, err = p.AddEntry(storage.Entry{\n\t\t\t\t\tType:    storage.SegmentType,\n\t\t\t\t\tPayload: paddingChunk[:n],\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\tpW.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tif isEOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tpW.Close()\n\t}()\n\n\treturn pR, nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/asm/doc.go",
    "content": "/*\nPackage asm provides the API for streaming assembly and disassembly of tar\narchives.\n\nUsing the `github.com/vbatts/tar-split/tar/storage` for Packing/Unpacking the\nmetadata for a stream, as well as an implementation of Getting/Putting the file\nentries' payload.\n*/\npackage asm\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/asm/iterate.go",
    "content": "package asm\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n)\n\n// IterateHeaders calls handler for each tar header provided by Unpacker\nfunc IterateHeaders(unpacker storage.Unpacker, handler func(hdr *tar.Header) error) error {\n\t// We assume about NewInputTarStream:\n\t// - There is a separate SegmentType entry for every tar header, but only one SegmentType entry for the full header incl. any extensions\n\t// - (There is a FileType entry for every tar header, we ignore it)\n\t// - Trailing padding of a file, if any, is included in the next SegmentType entry\n\t// - At the end, there may be SegmentType entries just for the terminating zero blocks.\n\n\tvar pendingPadding int64 = 0\n\tfor {\n\t\ttsEntry, err := unpacker.Next()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"reading tar-split entries: %w\", err)\n\t\t}\n\t\tswitch tsEntry.Type {\n\t\tcase storage.SegmentType:\n\t\t\tpayload := tsEntry.Payload\n\t\t\tif int64(len(payload)) < pendingPadding {\n\t\t\t\treturn fmt.Errorf(\"expected %d bytes of padding after previous file, but next SegmentType only has %d bytes\", pendingPadding, len(payload))\n\t\t\t}\n\t\t\tpayload = payload[pendingPadding:]\n\t\t\tpendingPadding = 0\n\n\t\t\ttr := tar.NewReader(bytes.NewReader(payload))\n\t\t\thdr, err := tr.Next()\n\t\t\tif err != nil {\n\t\t\t\tif err == io.EOF { // Probably the last entry, but let’s let the unpacker drive that.\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"decoding a tar header from a tar-split entry: %w\", err)\n\t\t\t}\n\t\t\tif err := handler(hdr); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tpendingPadding = tr.ExpectedPadding()\n\n\t\tcase storage.FileType:\n\t\t\t// Nothing\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unexpected tar-split entry type %q\", tsEntry.Type)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/storage/doc.go",
    "content": "/*\nPackage storage is for metadata of a tar archive.\n\nPacking and unpacking the Entries of the stream. The types of streams are\neither segments of raw bytes (for the raw headers and various padding) and for\nan entry marking a file payload.\n\nThe raw bytes are stored precisely in the packed (marshalled) Entry, whereas\nthe file payload marker include the name of the file, size, and crc64 checksum\n(for basic file integrity).\n*/\npackage storage\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/storage/entry.go",
    "content": "package storage\n\nimport \"unicode/utf8\"\n\n// Entries is for sorting by Position\ntype Entries []Entry\n\nfunc (e Entries) Len() int           { return len(e) }\nfunc (e Entries) Swap(i, j int)      { e[i], e[j] = e[j], e[i] }\nfunc (e Entries) Less(i, j int) bool { return e[i].Position < e[j].Position }\n\n// Type of Entry\ntype Type int\n\nconst (\n\t// FileType represents a file payload from the tar stream.\n\t//\n\t// This will be used to map to relative paths on disk. Only Size > 0 will get\n\t// read into a resulting output stream (due to hardlinks).\n\tFileType Type = 1 + iota\n\t// SegmentType represents a raw bytes segment from the archive stream. These raw\n\t// byte segments consist of the raw headers and various padding.\n\t//\n\t// Its payload is to be marshalled base64 encoded.\n\tSegmentType\n)\n\n// Entry is the structure for packing and unpacking the information read from\n// the Tar archive.\n//\n// FileType Payload checksum is using `hash/crc64` for basic file integrity,\n// _not_ for cryptography.\n// From http://www.backplane.com/matt/crc64.html, CRC32 has almost 40,000\n// collisions in a sample of 18.2 million, CRC64 had none.\ntype Entry struct {\n\tType     Type   `json:\"type\"`\n\tName     string `json:\"name,omitempty\"`\n\tNameRaw  []byte `json:\"name_raw,omitempty\"`\n\tSize     int64  `json:\"size,omitempty\"`\n\tPayload  []byte `json:\"payload\"` // SegmentType stores payload here; FileType stores crc64 checksum here;\n\tPosition int    `json:\"position\"`\n}\n\n// SetName will check name for valid UTF-8 string, and set the appropriate\n// field. See https://github.com/vbatts/tar-split/issues/17\nfunc (e *Entry) SetName(name string) {\n\tif utf8.ValidString(name) {\n\t\te.Name = name\n\t} else {\n\t\te.NameRaw = []byte(name)\n\t}\n}\n\n// SetNameBytes will check name for valid UTF-8 string, and set the appropriate\n// field\nfunc (e *Entry) SetNameBytes(name []byte) {\n\tif utf8.Valid(name) {\n\t\te.Name = string(name)\n\t} else {\n\t\te.NameRaw = name\n\t}\n}\n\n// GetName returns the string for the entry's name, regardless of the field stored in\nfunc (e *Entry) GetName() string {\n\tif len(e.NameRaw) > 0 {\n\t\treturn string(e.NameRaw)\n\t}\n\treturn e.Name\n}\n\n// GetNameBytes returns the bytes for the entry's name, regardless of the field stored in\nfunc (e *Entry) GetNameBytes() []byte {\n\tif len(e.NameRaw) > 0 {\n\t\treturn e.NameRaw\n\t}\n\treturn []byte(e.Name)\n}\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/storage/getter.go",
    "content": "package storage\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"hash/crc64\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// FileGetter is the interface for getting a stream of a file payload,\n// addressed by name/filename. Presumably, the names will be scoped to relative\n// file paths.\ntype FileGetter interface {\n\t// Get returns a stream for the provided file path\n\tGet(filename string) (output io.ReadCloser, err error)\n}\n\n// FilePutter is the interface for storing a stream of a file payload,\n// addressed by name/filename.\ntype FilePutter interface {\n\t// Put returns the size of the stream received, and the crc64 checksum for\n\t// the provided stream\n\tPut(filename string, input io.Reader) (size int64, checksum []byte, err error)\n}\n\n// FileGetPutter is the interface that groups both Getting and Putting file\n// payloads.\ntype FileGetPutter interface {\n\tFileGetter\n\tFilePutter\n}\n\n// NewPathFileGetter returns a FileGetter that is for files relative to path\n// relpath.\nfunc NewPathFileGetter(relpath string) FileGetter {\n\treturn &pathFileGetter{root: relpath}\n}\n\ntype pathFileGetter struct {\n\troot string\n}\n\nfunc (pfg pathFileGetter) Get(filename string) (io.ReadCloser, error) {\n\treturn os.Open(filepath.Join(pfg.root, filename))\n}\n\ntype bufferFileGetPutter struct {\n\tfiles map[string][]byte\n}\n\nfunc (bfgp bufferFileGetPutter) Get(name string) (io.ReadCloser, error) {\n\tif _, ok := bfgp.files[name]; !ok {\n\t\treturn nil, errors.New(\"no such file\")\n\t}\n\tb := bytes.NewBuffer(bfgp.files[name])\n\treturn &readCloserWrapper{b}, nil\n}\n\nfunc (bfgp *bufferFileGetPutter) Put(name string, r io.Reader) (int64, []byte, error) {\n\tcrc := crc64.New(CRCTable)\n\tbuf := bytes.NewBuffer(nil)\n\tcw := io.MultiWriter(crc, buf)\n\ti, err := io.Copy(cw, r)\n\tif err != nil {\n\t\treturn 0, nil, err\n\t}\n\tbfgp.files[name] = buf.Bytes()\n\treturn i, crc.Sum(nil), nil\n}\n\ntype readCloserWrapper struct {\n\tio.Reader\n}\n\nfunc (w *readCloserWrapper) Close() error { return nil }\n\n// NewBufferFileGetPutter is a simple in-memory FileGetPutter\n//\n// Implication is this is memory intensive...\n// Probably best for testing or light weight cases.\nfunc NewBufferFileGetPutter() FileGetPutter {\n\treturn &bufferFileGetPutter{\n\t\tfiles: map[string][]byte{},\n\t}\n}\n\n// NewDiscardFilePutter is a bit bucket FilePutter\nfunc NewDiscardFilePutter() FilePutter {\n\treturn &bitBucketFilePutter{}\n}\n\ntype bitBucketFilePutter struct {\n\tbuffer [32 * 1024]byte // 32 kB is the buffer size currently used by io.Copy, as of August 2021.\n}\n\nfunc (bbfp *bitBucketFilePutter) Put(name string, r io.Reader) (int64, []byte, error) {\n\tc := crc64.New(CRCTable)\n\ti, err := io.CopyBuffer(c, r, bbfp.buffer[:])\n\treturn i, c.Sum(nil), err\n}\n\n// CRCTable is the default table used for crc64 sum calculations\nvar CRCTable = crc64.MakeTable(crc64.ISO)\n"
  },
  {
    "path": "vendor/github.com/vbatts/tar-split/tar/storage/packer.go",
    "content": "package storage\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"\n\t\"path/filepath\"\n\t\"unicode/utf8\"\n)\n\n// ErrDuplicatePath occurs when a tar archive has more than one entry for the\n// same file path\nvar ErrDuplicatePath = errors.New(\"duplicates of file paths not supported\")\n\n// Packer describes the methods to pack Entries to a storage destination\ntype Packer interface {\n\t// AddEntry packs the Entry and returns its position\n\tAddEntry(e Entry) (int, error)\n}\n\n// Unpacker describes the methods to read Entries from a source\ntype Unpacker interface {\n\t// Next returns the next Entry being unpacked, or error, until io.EOF\n\tNext() (*Entry, error)\n}\n\ntype jsonUnpacker struct {\n\tseen seenNames\n\tdec  *json.Decoder\n}\n\nfunc (jup *jsonUnpacker) Next() (*Entry, error) {\n\tvar e Entry\n\terr := jup.dec.Decode(&e)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// check for dup name\n\tif e.Type == FileType {\n\t\tcName := filepath.Clean(e.GetName())\n\t\tif _, ok := jup.seen[cName]; ok {\n\t\t\treturn nil, ErrDuplicatePath\n\t\t}\n\t\tjup.seen[cName] = struct{}{}\n\t}\n\n\treturn &e, err\n}\n\n// NewJSONUnpacker provides an Unpacker that reads Entries (SegmentType and\n// FileType) as a json document.\n//\n// Each Entry read are expected to be delimited by new line.\nfunc NewJSONUnpacker(r io.Reader) Unpacker {\n\treturn &jsonUnpacker{\n\t\tdec:  json.NewDecoder(r),\n\t\tseen: seenNames{},\n\t}\n}\n\ntype jsonPacker struct {\n\tw    io.Writer\n\te    *json.Encoder\n\tpos  int\n\tseen seenNames\n}\n\ntype seenNames map[string]struct{}\n\nfunc (jp *jsonPacker) AddEntry(e Entry) (int, error) {\n\t// if Name is not valid utf8, switch it to raw first.\n\tif e.Name != \"\" {\n\t\tif !utf8.ValidString(e.Name) {\n\t\t\te.NameRaw = []byte(e.Name)\n\t\t\te.Name = \"\"\n\t\t}\n\t}\n\n\t// check early for dup name\n\tif e.Type == FileType {\n\t\tcName := filepath.Clean(e.GetName())\n\t\tif _, ok := jp.seen[cName]; ok {\n\t\t\treturn -1, ErrDuplicatePath\n\t\t}\n\t\tjp.seen[cName] = struct{}{}\n\t}\n\n\te.Position = jp.pos\n\terr := jp.e.Encode(e)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\t// made it this far, increment now\n\tjp.pos++\n\treturn e.Position, nil\n}\n\n// NewJSONPacker provides a Packer that writes each Entry (SegmentType and\n// FileType) as a json document.\n//\n// The Entries are delimited by new line.\nfunc NewJSONPacker(w io.Writer) Packer {\n\treturn &jsonPacker{\n\t\tw:    w,\n\t\te:    json.NewEncoder(w),\n\t\tseen: seenNames{},\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/.gitignore",
    "content": "# Test binary, build with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/CONTRIBUTING",
    "content": "When contributing your first changes, please include an empty commit for\ncopyright waiver using the following message (replace 'John Doe' with\nyour name or nickname):\n\n  John Doe Copyright Waiver\n\n  I dedicate any and all copyright interest in this software to the\n  public domain.  I make this dedication for the benefit of the public at\n  large and to the detriment of my heirs and successors.  I intend this\n  dedication to be an overt act of relinquishment in perpetuity of all\n  present and future rights to this software under copyright law.\n\nThe command to create an empty commit from the command-line is:\n\n  git commit --allow-empty\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/README.md",
    "content": "# Multi Progress Bar\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/vbauerster/mpb)](https://pkg.go.dev/github.com/vbauerster/mpb/v8)\n[![Test status](https://github.com/vbauerster/mpb/actions/workflows/test.yml/badge.svg)](https://github.com/vbauerster/mpb/actions/workflows/test.yml)\n[![Lint status](https://github.com/vbauerster/mpb/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/vbauerster/mpb/actions/workflows/golangci-lint.yml)\n\n**mpb** is a Go lib for rendering progress bars in terminal applications.\n\n## Features\n\n- **Multiple Bars**: Multiple progress bars are supported\n- **Dynamic Total**: Set total while bar is running\n- **Dynamic Add/Remove**: Dynamically add or remove bars\n- **Cancellation**: Cancel whole rendering process\n- **Predefined Decorators**: Elapsed time, [ewma](https://github.com/VividCortex/ewma) based ETA, Percentage, Bytes counter\n- **Decorator's width sync**: Synchronized decorator's width among multiple bars\n\n## Usage\n\n#### [Rendering single bar](_examples/singleBar/main.go)\n\n```go\npackage main\n\nimport (\n    \"math/rand\"\n    \"time\"\n\n    \"github.com/vbauerster/mpb/v8\"\n    \"github.com/vbauerster/mpb/v8/decor\"\n)\n\nfunc main() {\n    // initialize progress container, with custom width\n    p := mpb.New(mpb.WithWidth(64))\n\n    total := 100\n    name := \"Single Bar:\"\n    // create a single bar, which will inherit container's width\n    bar := p.New(int64(total),\n        // BarFillerBuilder with custom style\n        mpb.BarStyle().Lbound(\"╢\").Filler(\"▌\").Tip(\"▌\").Padding(\"░\").Rbound(\"╟\"),\n        mpb.PrependDecorators(\n            // display our name with one space on the right\n            decor.Name(name, decor.WC{C: decor.DindentRight | decor.DextraSpace}),\n            // replace ETA decorator with \"done\" message, OnComplete event\n            decor.OnComplete(decor.AverageETA(decor.ET_STYLE_GO), \"done\"),\n        ),\n        mpb.AppendDecorators(decor.Percentage()),\n    )\n    // simulating some work\n    max := 100 * time.Millisecond\n    for i := 0; i < total; i++ {\n        time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10)\n        bar.Increment()\n    }\n    // wait for our bar to complete and flush\n    p.Wait()\n}\n```\n\n#### [Rendering multiple bars](_examples/multiBars/main.go)\n\n```go\n    var wg sync.WaitGroup\n    // passed wg will be accounted at p.Wait() call\n    p := mpb.New(mpb.WithWaitGroup(&wg))\n    total, numBars := 100, 3\n    wg.Add(numBars)\n\n    for i := 0; i < numBars; i++ {\n        name := fmt.Sprintf(\"Bar#%d:\", i)\n        bar := p.AddBar(int64(total),\n            mpb.PrependDecorators(\n                // simple name decorator\n                decor.Name(name),\n                // decor.DSyncWidth bit enables column width synchronization\n                decor.Percentage(decor.WCSyncSpace),\n            ),\n            mpb.AppendDecorators(\n                // replace ETA decorator with \"done\" message, OnComplete event\n                decor.OnComplete(\n                    // ETA decorator with ewma age of 30\n                    decor.EwmaETA(decor.ET_STYLE_GO, 30, decor.WCSyncWidth), \"done\",\n                ),\n            ),\n        )\n        // simulating some work\n        go func() {\n            defer wg.Done()\n            rng := rand.New(rand.NewSource(time.Now().UnixNano()))\n            max := 100 * time.Millisecond\n            for i := 0; i < total; i++ {\n                // start variable is solely for EWMA calculation\n                // EWMA's unit of measure is an iteration's duration\n                start := time.Now()\n                time.Sleep(time.Duration(rng.Intn(10)+1) * max / 10)\n                // we need to call EwmaIncrement to fulfill ewma decorator's contract\n                bar.EwmaIncrement(time.Since(start))\n            }\n        }()\n    }\n    // wait for passed wg and for all bars to complete and flush\n    p.Wait()\n```\n\n#### [dynTotal example](_examples/dynTotal/main.go)\n\n![dynTotal](_svg/godEMrCZmJkHYH1X9dN4Nm0U7.svg)\n\n#### [queueBar example](_examples/queueBar/main.go)\n\n![queueBar](_svg/wHzf1M7sd7B3zVa2scBMnjqRf.svg)\n\n#### [io example](_examples/io/main.go)\n\n![io](_svg/hIpTa3A5rQz65ssiVuRJu87X6.svg)\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/UNLICENSE",
    "content": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org/>\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar.go",
    "content": "package mpb\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"io\"\n\t\"math\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/acarl005/stripansi\"\n\t\"github.com/mattn/go-runewidth\"\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\n// Bar represents a progress bar.\ntype Bar struct {\n\tindex        int // used by heap\n\tpriority     int // used by heap\n\tframeCh      chan *renderFrame\n\toperateState chan func(*bState)\n\tcontainer    *Progress\n\tbs           *bState\n\tbsOk         chan struct{}\n\tctx          context.Context\n\tcancel       func()\n}\n\ntype decorSyncTable [2][]*decor.Sync\ntype extenderFunc func(decor.Statistics, ...io.Reader) ([]io.Reader, error)\n\n// bState is actual bar's state.\ntype bState struct {\n\tid              int\n\tpriority        int\n\treqWidth        int\n\tshutdown        int\n\ttotal           int64\n\tcurrent         int64\n\trefill          int64\n\tbuffers         [3]*bytes.Buffer\n\tdecorGroups     [2][]decor.Decorator\n\tewmaDecorators  []decor.EwmaDecorator\n\tfiller          BarFiller\n\textender        extenderFunc\n\trenderReq       chan<- time.Time\n\twaitBar         *Bar // key for (*pState).queueBars\n\ttrimSpace       bool\n\taborted         bool\n\ttriggerComplete bool\n\trmOnComplete    bool\n\tnoPop           bool\n\tautoRefresh     bool\n}\n\ntype renderFrame struct {\n\trows         []io.Reader\n\tshutdown     int\n\trmOnComplete bool\n\tnoPop        bool\n\terr          error\n}\n\n// ProxyReader wraps io.Reader with metrics required for progress\n// tracking. If `r` is 'unknown total/size' reader it's mandatory\n// to call `(*Bar).SetTotal(-1, true)` after the wrapper returns\n// `io.EOF`. If bar is already completed or aborted, returns nil.\n// Panics if `r` is nil.\nfunc (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {\n\tif r == nil {\n\t\tpanic(\"expected non nil io.Reader\")\n\t}\n\tresult := make(chan io.ReadCloser, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tresult <- newProxyReader(r, b, len(s.ewmaDecorators) != 0)\n\t}:\n\t\treturn <-result\n\tcase <-b.ctx.Done():\n\t\treturn nil\n\t}\n}\n\n// ProxyWriter wraps io.Writer with metrics required for progress tracking.\n// If bar is already completed or aborted, returns nil.\n// Panics if `w` is nil.\nfunc (b *Bar) ProxyWriter(w io.Writer) io.WriteCloser {\n\tif w == nil {\n\t\tpanic(\"expected non nil io.Writer\")\n\t}\n\tresult := make(chan io.WriteCloser, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tresult <- newProxyWriter(w, b, len(s.ewmaDecorators) != 0)\n\t}:\n\t\treturn <-result\n\tcase <-b.ctx.Done():\n\t\treturn nil\n\t}\n}\n\n// ID returns id of the bar.\nfunc (b *Bar) ID() int {\n\tresult := make(chan int, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) { result <- s.id }:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.id\n\t}\n}\n\n// Current returns bar's current value, in other words sum of all increments.\nfunc (b *Bar) Current() int64 {\n\tresult := make(chan int64, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) { result <- s.current }:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.current\n\t}\n}\n\n// SetRefill sets refill flag with specified amount.\n// The underlying BarFiller will change its visual representation, to\n// indicate refill event. Refill event may be referred to some retry\n// operation for example.\nfunc (b *Bar) SetRefill(amount int64) {\n\tselect {\n\tcase b.operateState <- func(s *bState) { s.refill = min(amount, s.current) }:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// SetRefillCurrent sets refill to the current amount.\nfunc (b *Bar) SetRefillCurrent() {\n\tb.SetRefill(math.MaxInt64)\n}\n\n// TraverseDecorators traverses available decorators and calls `cb`\n// on each unwrapped one.\nfunc (b *Bar) TraverseDecorators(cb func(decor.Decorator)) (ok bool) {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tfor _, group := range s.decorGroups {\n\t\t\tfor _, d := range group {\n\t\t\t\tcb(unwrap(d))\n\t\t\t}\n\t\t}\n\t}:\n\t\treturn true\n\tcase <-b.ctx.Done():\n\t\treturn false\n\t}\n}\n\n// EnableTriggerComplete enables triggering complete event. It's effective\n// only for bars which were constructed with `total <= 0`. If `current >= total`\n// at the moment of call, complete event is triggered right away.\nfunc (b *Bar) EnableTriggerComplete() {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tif s.triggerComplete {\n\t\t\treturn\n\t\t}\n\t\ts.triggerComplete = true\n\t\tif s.current >= s.total {\n\t\t\ts.current = s.total\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// SetTotal sets total to an arbitrary value. It's effective only for bar\n// which was constructed with `total <= 0`. Setting total to negative value\n// is equivalent to `(*Bar).SetTotal((*Bar).Current(), bool)` but faster.\n// If `complete` is true complete event is triggered right away.\n// Calling `(*Bar).EnableTriggerComplete` makes this one no operational.\nfunc (b *Bar) SetTotal(total int64, complete bool) {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tif s.triggerComplete {\n\t\t\treturn\n\t\t}\n\t\tif total < 0 {\n\t\t\ts.total = s.current\n\t\t} else {\n\t\t\ts.total = total\n\t\t}\n\t\tif complete {\n\t\t\ts.current = s.total\n\t\t\ts.triggerComplete = true\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// SetCurrent sets progress' current to an arbitrary value.\nfunc (b *Bar) SetCurrent(current int64) {\n\tif current < 0 {\n\t\treturn\n\t}\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\ts.current = current\n\t\tif s.triggerComplete && s.current >= s.total {\n\t\t\ts.current = s.total\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// Increment is a shorthand for b.IncrInt64(1).\nfunc (b *Bar) Increment() {\n\tb.IncrInt64(1)\n}\n\n// IncrBy is a shorthand for b.IncrInt64(int64(n)).\nfunc (b *Bar) IncrBy(n int) {\n\tb.IncrInt64(int64(n))\n}\n\n// IncrInt64 increments progress by amount of n.\nfunc (b *Bar) IncrInt64(n int64) {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\ts.current += n\n\t\tif s.triggerComplete && s.current >= s.total {\n\t\t\ts.current = s.total\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// EwmaIncrement is a shorthand for b.EwmaIncrInt64(1, iterDur).\nfunc (b *Bar) EwmaIncrement(iterDur time.Duration) {\n\tb.EwmaIncrInt64(1, iterDur)\n}\n\n// EwmaIncrBy is a shorthand for b.EwmaIncrInt64(int64(n), iterDur).\nfunc (b *Bar) EwmaIncrBy(n int, iterDur time.Duration) {\n\tb.EwmaIncrInt64(int64(n), iterDur)\n}\n\n// EwmaIncrInt64 increments progress by amount of n and updates EWMA based\n// decorators by dur of a single iteration.\nfunc (b *Bar) EwmaIncrInt64(n int64, iterDur time.Duration) {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tfor _, d := range s.ewmaDecorators {\n\t\t\td.EwmaUpdate(n, iterDur)\n\t\t}\n\t\ts.current += n\n\t\tif s.triggerComplete && s.current >= s.total {\n\t\t\ts.current = s.total\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// EwmaSetCurrent sets progress' current to an arbitrary value and updates\n// EWMA based decorators by dur of a single iteration.\nfunc (b *Bar) EwmaSetCurrent(current int64, iterDur time.Duration) {\n\tif current < 0 {\n\t\treturn\n\t}\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tn := current - s.current\n\t\tfor _, d := range s.ewmaDecorators {\n\t\t\td.EwmaUpdate(n, iterDur)\n\t\t}\n\t\ts.current = current\n\t\tif s.triggerComplete && s.current >= s.total {\n\t\t\ts.current = s.total\n\t\t\tb.done(s.renderReq, s.autoRefresh)\n\t\t}\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// DecoratorAverageAdjust adjusts decorators implementing decor.AverageDecorator interface.\n// Call if there is need to set start time after decorators have been constructed.\nfunc (b *Bar) DecoratorAverageAdjust(start time.Time) {\n\tb.TraverseDecorators(func(d decor.Decorator) {\n\t\tif d, ok := d.(decor.AverageDecorator); ok {\n\t\t\td.AverageAdjust(start)\n\t\t}\n\t})\n}\n\n// SetPriority changes bar's order among multiple bars. Zero is highest\n// priority, i.e. bar will be on top. If you don't need to set priority\n// dynamically, better use BarPriority option.\nfunc (b *Bar) SetPriority(priority int) {\n\tb.container.UpdateBarPriority(b, priority, false)\n}\n\n// Abort interrupts bar's running goroutine. Abort won't be engaged\n// if bar is already in complete state. If drop is true bar will be\n// removed as well. To make sure that bar has been removed call\n// `(*Bar).Wait()` method.\nfunc (b *Bar) Abort(drop bool) {\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tif s.aborted || s.completed() {\n\t\t\treturn\n\t\t}\n\t\ts.aborted = true\n\t\ts.rmOnComplete = drop\n\t\ts.triggerComplete = true\n\t\tb.done(s.renderReq, s.autoRefresh)\n\t}:\n\tcase <-b.ctx.Done():\n\t}\n}\n\n// Aborted reports whether the bar is in aborted state.\nfunc (b *Bar) Aborted() bool {\n\tresult := make(chan bool, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) { result <- s.aborted }:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.aborted\n\t}\n}\n\n// Completed reports whether the bar is in completed state.\nfunc (b *Bar) Completed() bool {\n\tresult := make(chan bool, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) { result <- s.completed() }:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.completed()\n\t}\n}\n\n// AbortedOrCompleted reports whether a bar is in aborted or completed state.\n// Faster and atomic version of `(*Bar).Aborted() || (*Bar).Completed()`.\nfunc (b *Bar) AbortedOrCompleted() bool {\n\tresult := make(chan bool, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) {\n\t\tresult <- s.aborted || s.completed()\n\t}:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.aborted || b.bs.completed()\n\t}\n}\n\n// Wait blocks until bar is completed or aborted.\nfunc (b *Bar) Wait() {\n\t<-b.bsOk\n}\n\nfunc (b *Bar) serve(bs *bState) {\n\tdecoratorsOnShutdown := func(group []decor.Decorator) {\n\t\tfor _, d := range group {\n\t\t\tif d, ok := unwrap(d).(decor.ShutdownListener); ok {\n\t\t\t\td.OnShutdown()\n\t\t\t}\n\t\t}\n\t}\n\tdefer func() {\n\t\tdecoratorsOnShutdown(bs.decorGroups[0])\n\t\tdecoratorsOnShutdown(bs.decorGroups[1])\n\t\tb.bs = bs\n\t\tclose(b.bsOk)\n\t\tb.container.bwg.Done()\n\t}()\n\tfor {\n\t\tselect {\n\t\tcase op := <-b.operateState:\n\t\t\top(bs)\n\t\tcase <-b.ctx.Done():\n\t\t\t// bar can be aborted by canceling parent ctx without calling b.Abort\n\t\t\tbs.aborted = bs.aborted || !bs.completed()\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (b *Bar) render(tw int) {\n\tfn := func(s *bState) {\n\t\tframe := new(renderFrame)\n\t\tstat := s.newStatistics(tw)\n\t\tr, err := s.draw(stat)\n\t\tif err != nil {\n\t\t\tfor _, buf := range s.buffers {\n\t\t\t\tbuf.Reset()\n\t\t\t}\n\t\t\tframe.err = err\n\t\t\tb.frameCh <- frame\n\t\t\treturn\n\t\t}\n\t\tframe.rows, frame.err = s.extender(stat, r)\n\t\tif s.aborted || s.completed() {\n\t\t\tframe.shutdown = s.shutdown\n\t\t\tframe.rmOnComplete = s.rmOnComplete\n\t\t\tframe.noPop = s.noPop\n\t\t\t// post increment makes sure OnComplete decorators are rendered\n\t\t\ts.shutdown++\n\t\t}\n\t\tb.frameCh <- frame\n\t}\n\tselect {\n\tcase b.operateState <- fn:\n\tcase <-b.bsOk:\n\t\tfn(b.bs)\n\t}\n}\n\nfunc (b *Bar) wSyncTable() decorSyncTable {\n\tresult := make(chan decorSyncTable, 1)\n\tselect {\n\tcase b.operateState <- func(s *bState) { result <- s.wSyncTable() }:\n\t\treturn <-result\n\tcase <-b.bsOk:\n\t\treturn b.bs.wSyncTable()\n\t}\n}\n\nfunc (s *bState) draw(stat decor.Statistics) (io.Reader, error) {\n\tdecorFiller := func(buf *bytes.Buffer, group []decor.Decorator) (err error) {\n\t\tfor i, d := range group {\n\t\t\t// need to call Decor in any case because of width synchronization\n\t\t\tstr, width := d.Decor(stat)\n\t\t\tif i != 0 && err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif w := stat.AvailableWidth - width; w >= 0 {\n\t\t\t\t_, err = buf.WriteString(str)\n\t\t\t\tstat.AvailableWidth = w\n\t\t\t} else if stat.AvailableWidth > 0 {\n\t\t\t\ttrunc := runewidth.Truncate(stripansi.Strip(str), stat.AvailableWidth, \"…\")\n\t\t\t\t_, err = buf.WriteString(trunc)\n\t\t\t\tstat.AvailableWidth = 0\n\t\t\t}\n\t\t}\n\t\treturn err\n\t}\n\n\tfor i, buf := range s.buffers[1:] {\n\t\terr := decorFiller(buf, s.decorGroups[i])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif s.trimSpace || stat.AvailableWidth < 2 {\n\t\terr := s.filler.Fill(s.buffers[0], stat)\n\t\treturn io.MultiReader(\n\t\t\ts.buffers[1],\n\t\t\ts.buffers[0],\n\t\t\ts.buffers[2],\n\t\t\tstrings.NewReader(\"\\n\"),\n\t\t), err\n\t}\n\n\tstat.AvailableWidth -= 2\n\terr := s.filler.Fill(s.buffers[0], stat)\n\treturn io.MultiReader(\n\t\ts.buffers[1],\n\t\tstrings.NewReader(\" \"),\n\t\ts.buffers[0],\n\t\tstrings.NewReader(\" \"),\n\t\ts.buffers[2],\n\t\tstrings.NewReader(\"\\n\"),\n\t), err\n}\n\nfunc (s *bState) wSyncTable() (table decorSyncTable) {\n\tvar start int\n\tvar row []*decor.Sync\n\n\tfor i, group := range s.decorGroups {\n\t\tfor _, d := range group {\n\t\t\tif s, ok := d.Sync(); ok {\n\t\t\t\trow = append(row, s)\n\t\t\t}\n\t\t}\n\t\ttable[i], start = row[start:], len(row)\n\t}\n\treturn table\n}\n\nfunc (b *Bar) done(renderReq chan<- time.Time, autoRefresh bool) {\n\tif autoRefresh {\n\t\t// Technically this call isn't required, but if refresh rate is set to\n\t\t// one hour for example and bar completes within a few minutes p.Wait()\n\t\t// will wait for one hour. This call helps to avoid unnecessary waiting.\n\t\tgo b.tryEarlyRefresh(renderReq)\n\t} else {\n\t\tb.cancel()\n\t}\n}\n\nfunc (b *Bar) tryEarlyRefresh(renderReq chan<- time.Time) {\n\totherRunning := make(chan struct{})\n\tok := b.container.iterateBars(func(bar *Bar) bool {\n\t\tif b != bar && bar.isRunning() {\n\t\t\tclose(otherRunning)\n\t\t\treturn false // stop traverse\n\t\t}\n\t\treturn true // continue traverse\n\t})\n\tif ok {\n\t\tselect {\n\t\tcase <-otherRunning:\n\t\tdefault:\n\t\t\tfor {\n\t\t\t\tselect {\n\t\t\t\tcase renderReq <- time.Now():\n\t\t\t\tcase <-b.ctx.Done():\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (b *Bar) isRunning() bool {\n\tselect {\n\tcase <-b.ctx.Done():\n\t\treturn false\n\tdefault:\n\t\treturn true\n\t}\n}\n\nfunc (s *bState) completed() bool {\n\treturn s.triggerComplete && s.current == s.total\n}\n\nfunc (s *bState) newStatistics(tw int) decor.Statistics {\n\treturn decor.Statistics{\n\t\tAvailableWidth: tw,\n\t\tRequestedWidth: s.reqWidth,\n\t\tID:             s.id,\n\t\tTotal:          s.total,\n\t\tCurrent:        s.current,\n\t\tRefill:         s.refill,\n\t\tCompleted:      s.completed(),\n\t\tAborted:        s.aborted,\n\t}\n}\n\nfunc unwrap(d decor.Decorator) decor.Decorator {\n\tif d, ok := d.(decor.Wrapper); ok {\n\t\treturn unwrap(d.Unwrap())\n\t}\n\treturn d\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_filler.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\n// BarFiller interface.\n// Bar (without decorators) renders itself by calling BarFiller's Fill method.\ntype BarFiller interface {\n\tFill(io.Writer, decor.Statistics) error\n}\n\n// BarFillerBuilder interface.\n// Default implementations are:\n//\n//\tBarStyle()\n//\tSpinnerStyle()\n//\tNopStyle()\ntype BarFillerBuilder interface {\n\tBuild() BarFiller\n}\n\n// BarFillerFunc is function type adapter to convert compatible function\n// into BarFiller interface.\ntype BarFillerFunc func(io.Writer, decor.Statistics) error\n\nfunc (f BarFillerFunc) Fill(w io.Writer, stat decor.Statistics) error {\n\treturn f(w, stat)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_filler_bar.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\n\t\"github.com/mattn/go-runewidth\"\n\t\"github.com/vbauerster/mpb/v8/decor\"\n\t\"github.com/vbauerster/mpb/v8/internal\"\n)\n\nconst (\n\tiLbound = iota\n\tiRefiller\n\tiFiller\n\tiTip\n\tiPadding\n\tiRbound\n\tiLen\n)\n\nvar defaultBarStyle = [iLen]string{\"[\", \"+\", \"=\", \">\", \"-\", \"]\"}\n\n// BarStyleComposer interface.\ntype BarStyleComposer interface {\n\tBarFillerBuilder\n\tLbound(string) BarStyleComposer\n\tLboundMeta(func(string) string) BarStyleComposer\n\tRbound(string) BarStyleComposer\n\tRboundMeta(func(string) string) BarStyleComposer\n\tFiller(string) BarStyleComposer\n\tFillerMeta(func(string) string) BarStyleComposer\n\tRefiller(string) BarStyleComposer\n\tRefillerMeta(func(string) string) BarStyleComposer\n\tPadding(string) BarStyleComposer\n\tPaddingMeta(func(string) string) BarStyleComposer\n\tTip(frames ...string) BarStyleComposer\n\tTipMeta(func(string) string) BarStyleComposer\n\tTipOnComplete() BarStyleComposer\n\tReverse() BarStyleComposer\n}\n\ntype component struct {\n\twidth int\n\tbytes []byte\n}\n\ntype barSection struct {\n\tmeta  func(string) string\n\tbytes []byte\n}\n\ntype barSections [iLen]barSection\n\ntype barFiller struct {\n\tcomponents [iLen]component\n\tmetas      [iLen]func(string) string\n\tflushOp    func(barSections, io.Writer) error\n\ttip        struct {\n\t\tonComplete bool\n\t\tcount      uint\n\t\tframes     []component\n\t}\n}\n\ntype barStyle struct {\n\tstyle         [iLen]string\n\tmetas         [iLen]func(string) string\n\ttipFrames     []string\n\ttipOnComplete bool\n\trev           bool\n}\n\n// BarStyle constructs default bar style which can be altered via\n// BarStyleComposer interface.\nfunc BarStyle() BarStyleComposer {\n\tbs := barStyle{\n\t\tstyle:     defaultBarStyle,\n\t\ttipFrames: []string{defaultBarStyle[iTip]},\n\t}\n\treturn bs\n}\n\nfunc (s barStyle) Lbound(bound string) BarStyleComposer {\n\ts.style[iLbound] = bound\n\treturn s\n}\n\nfunc (s barStyle) LboundMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iLbound] = fn\n\treturn s\n}\n\nfunc (s barStyle) Rbound(bound string) BarStyleComposer {\n\ts.style[iRbound] = bound\n\treturn s\n}\n\nfunc (s barStyle) RboundMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iRbound] = fn\n\treturn s\n}\n\nfunc (s barStyle) Filler(filler string) BarStyleComposer {\n\ts.style[iFiller] = filler\n\treturn s\n}\n\nfunc (s barStyle) FillerMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iFiller] = fn\n\treturn s\n}\n\nfunc (s barStyle) Refiller(refiller string) BarStyleComposer {\n\ts.style[iRefiller] = refiller\n\treturn s\n}\n\nfunc (s barStyle) RefillerMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iRefiller] = fn\n\treturn s\n}\n\nfunc (s barStyle) Padding(padding string) BarStyleComposer {\n\ts.style[iPadding] = padding\n\treturn s\n}\n\nfunc (s barStyle) PaddingMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iPadding] = fn\n\treturn s\n}\n\nfunc (s barStyle) Tip(frames ...string) BarStyleComposer {\n\tif len(frames) != 0 {\n\t\ts.tipFrames = frames\n\t}\n\treturn s\n}\n\nfunc (s barStyle) TipMeta(fn func(string) string) BarStyleComposer {\n\ts.metas[iTip] = fn\n\treturn s\n}\n\nfunc (s barStyle) TipOnComplete() BarStyleComposer {\n\ts.tipOnComplete = true\n\treturn s\n}\n\nfunc (s barStyle) Reverse() BarStyleComposer {\n\ts.rev = true\n\treturn s\n}\n\nfunc (s barStyle) Build() BarFiller {\n\tbf := &barFiller{metas: s.metas}\n\tbf.components[iLbound] = component{\n\t\twidth: runewidth.StringWidth(s.style[iLbound]),\n\t\tbytes: []byte(s.style[iLbound]),\n\t}\n\tbf.components[iRbound] = component{\n\t\twidth: runewidth.StringWidth(s.style[iRbound]),\n\t\tbytes: []byte(s.style[iRbound]),\n\t}\n\tbf.components[iFiller] = component{\n\t\twidth: runewidth.StringWidth(s.style[iFiller]),\n\t\tbytes: []byte(s.style[iFiller]),\n\t}\n\tbf.components[iRefiller] = component{\n\t\twidth: runewidth.StringWidth(s.style[iRefiller]),\n\t\tbytes: []byte(s.style[iRefiller]),\n\t}\n\tbf.components[iPadding] = component{\n\t\twidth: runewidth.StringWidth(s.style[iPadding]),\n\t\tbytes: []byte(s.style[iPadding]),\n\t}\n\tbf.tip.onComplete = s.tipOnComplete\n\tbf.tip.frames = make([]component, 0, len(s.tipFrames))\n\tfor _, t := range s.tipFrames {\n\t\tbf.tip.frames = append(bf.tip.frames, component{\n\t\t\twidth: runewidth.StringWidth(t),\n\t\t\tbytes: []byte(t),\n\t\t})\n\t}\n\tif s.rev {\n\t\tbf.flushOp = barSections.flushRev\n\t} else {\n\t\tbf.flushOp = barSections.flush\n\t}\n\treturn bf\n}\n\nfunc (s *barFiller) Fill(w io.Writer, stat decor.Statistics) error {\n\twidth := internal.CheckRequestedWidth(stat.RequestedWidth, stat.AvailableWidth)\n\t// don't count brackets as progress\n\twidth -= (s.components[iLbound].width + s.components[iRbound].width)\n\tif width < 0 {\n\t\treturn nil\n\t}\n\n\tvar tip component\n\tvar refilling, filling, padding []byte\n\tvar fillCount int\n\tcurWidth := int(internal.PercentageRound(stat.Total, stat.Current, int64(width)))\n\n\tif curWidth != 0 {\n\t\tif !stat.Completed || s.tip.onComplete {\n\t\t\ttip = s.tip.frames[s.tip.count%uint(len(s.tip.frames))]\n\t\t\ts.tip.count++\n\t\t\tfillCount += tip.width\n\t\t}\n\t\tswitch refWidth := 0; {\n\t\tcase stat.Refill != 0:\n\t\t\trefWidth = int(internal.PercentageRound(stat.Total, stat.Refill, int64(width)))\n\t\t\tcurWidth -= refWidth\n\t\t\trefWidth += curWidth\n\t\t\tfallthrough\n\t\tdefault:\n\t\t\tfor w := s.components[iFiller].width; curWidth-fillCount >= w; fillCount += w {\n\t\t\t\tfilling = append(filling, s.components[iFiller].bytes...)\n\t\t\t}\n\t\t\tfor w := s.components[iRefiller].width; refWidth-fillCount >= w; fillCount += w {\n\t\t\t\trefilling = append(refilling, s.components[iRefiller].bytes...)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor w := s.components[iPadding].width; width-fillCount >= w; fillCount += w {\n\t\tpadding = append(padding, s.components[iPadding].bytes...)\n\t}\n\n\tfor w := 1; width-fillCount >= w; fillCount += w {\n\t\tpadding = append(padding, \"…\"...)\n\t}\n\n\treturn s.flushOp(barSections{\n\t\t{s.metas[iLbound], s.components[iLbound].bytes},\n\t\t{s.metas[iRefiller], refilling},\n\t\t{s.metas[iFiller], filling},\n\t\t{s.metas[iTip], tip.bytes},\n\t\t{s.metas[iPadding], padding},\n\t\t{s.metas[iRbound], s.components[iRbound].bytes},\n\t}, w)\n}\n\nfunc (s barSection) flush(w io.Writer) (err error) {\n\tif s.meta != nil {\n\t\t_, err = io.WriteString(w, s.meta(string(s.bytes)))\n\t} else {\n\t\t_, err = w.Write(s.bytes)\n\t}\n\treturn err\n}\n\nfunc (bb barSections) flush(w io.Writer) error {\n\tfor _, s := range bb {\n\t\terr := s.flush(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (bb barSections) flushRev(w io.Writer) error {\n\tbb[0], bb[len(bb)-1] = bb[len(bb)-1], bb[0]\n\tfor i := len(bb) - 1; i >= 0; i-- {\n\t\terr := bb[i].flush(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_filler_nop.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\n// barFillerBuilderFunc is function type adapter to convert compatible\n// function into BarFillerBuilder interface.\ntype barFillerBuilderFunc func() BarFiller\n\nfunc (f barFillerBuilderFunc) Build() BarFiller {\n\treturn f()\n}\n\n// NopStyle provides BarFillerBuilder which builds NOP BarFiller.\nfunc NopStyle() BarFillerBuilder {\n\treturn barFillerBuilderFunc(func() BarFiller {\n\t\treturn BarFillerFunc(func(io.Writer, decor.Statistics) error {\n\t\t\treturn nil\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_filler_spinner.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\t\"strings\"\n\n\t\"github.com/mattn/go-runewidth\"\n\t\"github.com/vbauerster/mpb/v8/decor\"\n\t\"github.com/vbauerster/mpb/v8/internal\"\n)\n\nconst (\n\tpositionLeft = 1 + iota\n\tpositionRight\n)\n\nvar defaultSpinnerStyle = [...]string{\"⠋\", \"⠙\", \"⠹\", \"⠸\", \"⠼\", \"⠴\", \"⠦\", \"⠧\", \"⠇\", \"⠏\"}\n\n// SpinnerStyleComposer interface.\ntype SpinnerStyleComposer interface {\n\tBarFillerBuilder\n\tPositionLeft() SpinnerStyleComposer\n\tPositionRight() SpinnerStyleComposer\n\tMeta(func(string) string) SpinnerStyleComposer\n}\n\ntype spinnerFiller struct {\n\tframes   []string\n\tcount    uint\n\tmeta     func(string) string\n\tposition func(string, int) string\n}\n\ntype spinnerStyle struct {\n\tposition uint\n\tframes   []string\n\tmeta     func(string) string\n}\n\n// SpinnerStyle constructs default spinner style which can be altered via\n// SpinnerStyleComposer interface.\nfunc SpinnerStyle(frames ...string) SpinnerStyleComposer {\n\tvar ss spinnerStyle\n\tif len(frames) != 0 {\n\t\tss.frames = frames\n\t} else {\n\t\tss.frames = defaultSpinnerStyle[:]\n\t}\n\treturn ss\n}\n\nfunc (s spinnerStyle) PositionLeft() SpinnerStyleComposer {\n\ts.position = positionLeft\n\treturn s\n}\n\nfunc (s spinnerStyle) PositionRight() SpinnerStyleComposer {\n\ts.position = positionRight\n\treturn s\n}\n\nfunc (s spinnerStyle) Meta(fn func(string) string) SpinnerStyleComposer {\n\ts.meta = fn\n\treturn s\n}\n\nfunc (s spinnerStyle) Build() BarFiller {\n\tsf := &spinnerFiller{frames: s.frames}\n\tswitch s.position {\n\tcase positionLeft:\n\t\tsf.position = func(frame string, padWidth int) string {\n\t\t\treturn frame + strings.Repeat(\" \", padWidth)\n\t\t}\n\tcase positionRight:\n\t\tsf.position = func(frame string, padWidth int) string {\n\t\t\treturn strings.Repeat(\" \", padWidth) + frame\n\t\t}\n\tdefault:\n\t\tsf.position = func(frame string, padWidth int) string {\n\t\t\treturn strings.Repeat(\" \", padWidth/2) + frame + strings.Repeat(\" \", padWidth/2+padWidth%2)\n\t\t}\n\t}\n\tif s.meta != nil {\n\t\tsf.meta = s.meta\n\t} else {\n\t\tsf.meta = func(s string) string { return s }\n\t}\n\treturn sf\n}\n\nfunc (s *spinnerFiller) Fill(w io.Writer, stat decor.Statistics) error {\n\twidth := internal.CheckRequestedWidth(stat.RequestedWidth, stat.AvailableWidth)\n\tframe := s.frames[s.count%uint(len(s.frames))]\n\tframeWidth := runewidth.StringWidth(frame)\n\ts.count++\n\n\tif width < frameWidth {\n\t\treturn nil\n\t}\n\n\t_, err := io.WriteString(w, s.position(s.meta(frame), width-frameWidth))\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_heap.go",
    "content": "package mpb\n\nimport \"container/heap\"\n\nvar _ heap.Interface = (*barHeap)(nil)\n\ntype barHeap []*Bar\n\nfunc (s barHeap) Len() int { return len(s) }\n\n// it's a reversed Less same as sort.Reverse(sort.Interface) would do\n// becasuse we need greater priority item to pop first\nfunc (s barHeap) Less(i, j int) bool {\n\treturn s[j].priority < s[i].priority\n}\n\nfunc (s barHeap) Swap(i, j int) {\n\ts[i], s[j] = s[j], s[i]\n\ts[i].index = i\n\ts[j].index = j\n}\n\nfunc (h *barHeap) Push(x interface{}) {\n\tb := x.(*Bar)\n\tb.index = h.Len()\n\t*h = append(*h, b)\n}\n\nfunc (h *barHeap) Pop() interface{} {\n\ts := *h\n\ti := s.Len() - 1\n\tb := s[i]\n\tb.index = -1 // for safety\n\ts[i] = nil   // nil to avoid memory leak\n\t*h = s[:i]\n\treturn b\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/bar_option.go",
    "content": "package mpb\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\n// BarOption is a func option to alter default behavior of a bar.\ntype BarOption func(*bState)\n\n// PrependDecorators let you inject decorators to the bar's left side.\nfunc PrependDecorators(decorators ...decor.Decorator) BarOption {\n\tvar group []decor.Decorator\n\tfor _, decorator := range decorators {\n\t\tif decorator != nil {\n\t\t\tgroup = append(group, decorator)\n\t\t}\n\t}\n\treturn func(s *bState) {\n\t\ts.decorGroups[0] = group\n\t}\n}\n\n// AppendDecorators let you inject decorators to the bar's right side.\nfunc AppendDecorators(decorators ...decor.Decorator) BarOption {\n\tvar group []decor.Decorator\n\tfor _, decorator := range decorators {\n\t\tif decorator != nil {\n\t\t\tgroup = append(group, decorator)\n\t\t}\n\t}\n\treturn func(s *bState) {\n\t\ts.decorGroups[1] = group\n\t}\n}\n\n// BarID sets bar id.\nfunc BarID(id int) BarOption {\n\treturn func(s *bState) {\n\t\ts.id = id\n\t}\n}\n\n// BarWidth sets bar width independent of the container.\nfunc BarWidth(width int) BarOption {\n\treturn func(s *bState) {\n\t\ts.reqWidth = width\n\t}\n}\n\n// BarQueueAfter puts this (being constructed) bar into the queue.\n// BarPriority will be inherited from the argument bar.\n// When argument bar completes or aborts queued bar replaces its place.\nfunc BarQueueAfter(bar *Bar) BarOption {\n\treturn func(s *bState) {\n\t\ts.waitBar = bar\n\t}\n}\n\n// BarRemoveOnComplete removes both bar's filler and its decorators\n// on complete event.\nfunc BarRemoveOnComplete() BarOption {\n\treturn func(s *bState) {\n\t\ts.rmOnComplete = true\n\t}\n}\n\n// BarFillerClearOnComplete clears bar's filler on complete event.\n// It's shortcut for BarFillerOnComplete(\"\").\nfunc BarFillerClearOnComplete() BarOption {\n\treturn BarFillerOnComplete(\"\")\n}\n\n// BarFillerOnComplete replaces bar's filler with message, on complete event.\nfunc BarFillerOnComplete(message string) BarOption {\n\treturn BarFillerMiddleware(func(base BarFiller) BarFiller {\n\t\treturn BarFillerFunc(func(w io.Writer, st decor.Statistics) error {\n\t\t\tif st.Completed {\n\t\t\t\t_, err := io.WriteString(w, message)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treturn base.Fill(w, st)\n\t\t})\n\t})\n}\n\n// BarFillerClearOnAbort clears bar's filler on abort event.\n// It's shortcut for BarFillerOnAbort(\"\").\nfunc BarFillerClearOnAbort() BarOption {\n\treturn BarFillerOnAbort(\"\")\n}\n\n// BarFillerOnAbort replaces bar's filler with message, on abort event.\nfunc BarFillerOnAbort(message string) BarOption {\n\treturn BarFillerMiddleware(func(base BarFiller) BarFiller {\n\t\treturn BarFillerFunc(func(w io.Writer, st decor.Statistics) error {\n\t\t\tif st.Aborted {\n\t\t\t\t_, err := io.WriteString(w, message)\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treturn base.Fill(w, st)\n\t\t})\n\t})\n}\n\n// BarFillerMiddleware provides a way to augment the underlying BarFiller.\nfunc BarFillerMiddleware(middle func(BarFiller) BarFiller) BarOption {\n\tif middle == nil {\n\t\treturn nil\n\t}\n\treturn func(s *bState) {\n\t\ts.filler = middle(s.filler)\n\t}\n}\n\n// BarPriority sets bar's priority. Zero is highest priority, i.e. bar\n// will be on top. This option isn't effective with `BarQueueAfter` option.\nfunc BarPriority(priority int) BarOption {\n\treturn func(s *bState) {\n\t\ts.priority = priority\n\t}\n}\n\n// BarExtender extends bar with arbitrary lines. Provided BarFiller will be\n// called at each render/flush cycle. Any lines written to the underlying\n// io.Writer will extend the bar either in above (rev = true) or below\n// (rev = false) direction.\nfunc BarExtender(filler BarFiller, rev bool) BarOption {\n\tif filler == nil {\n\t\treturn nil\n\t}\n\tif f, ok := filler.(BarFillerFunc); ok && f == nil {\n\t\treturn nil\n\t}\n\tfn := makeExtenderFunc(filler, rev)\n\treturn func(s *bState) {\n\t\ts.extender = fn\n\t}\n}\n\nfunc makeExtenderFunc(filler BarFiller, rev bool) extenderFunc {\n\tbuf := new(bytes.Buffer)\n\tbase := func(stat decor.Statistics, rows ...io.Reader) ([]io.Reader, error) {\n\t\terr := filler.Fill(buf, stat)\n\t\tif err != nil {\n\t\t\tbuf.Reset()\n\t\t\treturn rows, err\n\t\t}\n\t\tfor {\n\t\t\tline, err := buf.ReadBytes('\\n')\n\t\t\tif err != nil {\n\t\t\t\tbuf.Reset()\n\t\t\t\tbreak\n\t\t\t}\n\t\t\trows = append(rows, bytes.NewReader(line))\n\t\t}\n\t\treturn rows, err\n\t}\n\tif !rev {\n\t\treturn base\n\t}\n\treturn func(stat decor.Statistics, rows ...io.Reader) ([]io.Reader, error) {\n\t\trows, err := base(stat, rows...)\n\t\tif err != nil {\n\t\t\treturn rows, err\n\t\t}\n\t\tfor left, right := 0, len(rows)-1; left < right; left, right = left+1, right-1 {\n\t\t\trows[left], rows[right] = rows[right], rows[left]\n\t\t}\n\t\treturn rows, err\n\t}\n}\n\n// BarFillerTrim removes leading and trailing space around the underlying BarFiller.\nfunc BarFillerTrim() BarOption {\n\treturn func(s *bState) {\n\t\ts.trimSpace = true\n\t}\n}\n\n// BarNoPop disables bar pop out of container. Effective when\n// PopCompletedMode of container is enabled.\nfunc BarNoPop() BarOption {\n\treturn func(s *bState) {\n\t\ts.noPop = true\n\t}\n}\n\n// BarOptional will return provided option only when cond is true.\nfunc BarOptional(option BarOption, cond bool) BarOption {\n\tif cond {\n\t\treturn option\n\t}\n\treturn nil\n}\n\n// BarOptOn will return provided option only when predicate evaluates to true.\nfunc BarOptOn(option BarOption, predicate func() bool) BarOption {\n\tif predicate() {\n\t\treturn option\n\t}\n\treturn nil\n}\n\n// BarFuncOptional will call option and return its value only when cond is true.\nfunc BarFuncOptional(option func() BarOption, cond bool) BarOption {\n\tif cond {\n\t\treturn option()\n\t}\n\treturn nil\n}\n\n// BarFuncOptOn will call option and return its value only when predicate evaluates to true.\nfunc BarFuncOptOn(option func() BarOption, predicate func() bool) BarOption {\n\tif predicate() {\n\t\treturn option()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/container_option.go",
    "content": "package mpb\n\nimport (\n\t\"cmp\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n)\n\n// ContainerOption is a func option to alter default behavior of a bar\n// container. Container term refers to a Progress struct which can\n// hold one or more Bars.\ntype ContainerOption func(*pState)\n\n// WithWaitGroup provides means to have a single joint point. If\n// *sync.WaitGroup is provided, you can safely call just p.Wait()\n// without calling Wait() on provided *sync.WaitGroup. Makes sense\n// when there are more than one bar to render.\nfunc WithWaitGroup(wg *sync.WaitGroup) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.uwg = wg\n\t}\n}\n\n// WithWidth sets container width. If not set it defaults to terminal\n// width. A bar added to the container will inherit its width, unless\n// overridden by `func BarWidth(int) BarOption`.\nfunc WithWidth(width int) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.reqWidth = width\n\t}\n}\n\n// WithQueueLen sets buffer size of heap manager channel. Ideally it must be\n// kept at MAX value, where MAX is number of bars to be rendered at the same\n// time. Default queue len is 64.\nfunc WithQueueLen(len int) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.hmQueueLen = len\n\t}\n}\n\n// WithRefreshRate overrides default 150ms refresh rate.\nfunc WithRefreshRate(d time.Duration) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.refreshRate = d\n\t}\n}\n\n// WithManualRefresh disables internal auto refresh time.Ticker.\n// Refresh will occur upon receive value from provided ch.\nfunc WithManualRefresh(ch <-chan interface{}) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.manualRC = ch\n\t}\n}\n\n// WithRenderDelay delays rendering. By default rendering starts as\n// soon as bar is added, with this option it's possible to delay\n// rendering process by keeping provided chan unclosed. In other words\n// rendering will start as soon as provided chan is closed.\nfunc WithRenderDelay(ch <-chan struct{}) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.delayRC = ch\n\t}\n}\n\n// WithShutdownNotifier closes provided channel on shutdown event,\n// i.e. after `(*Progress) Wait()` or `(*Progress) Shutdown()` call.\nfunc WithShutdownNotifier(ch chan interface{}) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.shutdownNotifier = ch\n\t}\n}\n\n// WithOutput overrides default os.Stdout output. If underlying io.Writer\n// is not a terminal then auto refresh is disabled unless WithAutoRefresh\n// option is set.\nfunc WithOutput(w io.Writer) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.output = cmp.Or(w, io.Discard)\n\t}\n}\n\n// WithDebugOutput sets debug output.\nfunc WithDebugOutput(w io.Writer) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.debugOut = cmp.Or(w, io.Discard)\n\t}\n}\n\n// WithAutoRefresh force auto refresh regardless of what output is set to.\n// Applicable only if not WithManualRefresh set.\nfunc WithAutoRefresh() ContainerOption {\n\treturn func(s *pState) {\n\t\ts.autoRefresh = true\n\t}\n}\n\n// PopCompletedMode pop completed bars out of progress container.\n// In this mode completed bars get moved to the top and stop\n// participating in rendering cycle.\nfunc PopCompletedMode() ContainerOption {\n\treturn func(s *pState) {\n\t\ts.popCompleted = true\n\t}\n}\n\n// ContainerOptional will return provided option only when cond is true.\nfunc ContainerOptional(option ContainerOption, cond bool) ContainerOption {\n\tif cond {\n\t\treturn option\n\t}\n\treturn nil\n}\n\n// ContainerOptOn will return provided option only when predicate evaluates to true.\nfunc ContainerOptOn(option ContainerOption, predicate func() bool) ContainerOption {\n\tif predicate() {\n\t\treturn option\n\t}\n\treturn nil\n}\n\n// ContainerFuncOptional will call option and return its value only when cond is true.\nfunc ContainerFuncOptional(option func() ContainerOption, cond bool) ContainerOption {\n\tif cond {\n\t\treturn option()\n\t}\n\treturn nil\n}\n\n// ContainerFuncOptOn will call option and return its value only when predicate evaluates to true.\nfunc ContainerFuncOptOn(option func() ContainerOption, predicate func() bool) ContainerOption {\n\tif predicate() {\n\t\treturn option()\n\t}\n\treturn nil\n}\n\n// withHandOverBarHeap for test purposes only\nfunc withHandOverBarHeap(ch chan<- []*Bar) ContainerOption {\n\treturn func(s *pState) {\n\t\ts.handOverBarHeap = ch\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/doc.go",
    "content": "// Package cwriter is a console writer abstraction for the underlying OS.\npackage cwriter\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/util_bsd.go",
    "content": "//go:build darwin || dragonfly || freebsd || netbsd || openbsd\n\npackage cwriter\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TIOCGETA\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/util_linux.go",
    "content": "//go:build aix || linux\n\npackage cwriter\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TCGETS\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/util_solaris.go",
    "content": "//go:build solaris\n\npackage cwriter\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TCGETA\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/util_zos.go",
    "content": "//go:build zos\n\npackage cwriter\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TCGETS\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/writer.go",
    "content": "package cwriter\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n)\n\n// https://github.com/dylanaraps/pure-sh-bible#cursor-movement\nconst (\n\tescOpen  = \"\\x1b[\"\n\tcuuAndEd = \"A\\x1b[J\"\n)\n\n// ErrNotTTY not a TeleTYpewriter error.\nvar ErrNotTTY = errors.New(\"not a terminal\")\n\n// New returns a new Writer with defaults.\nfunc New(out io.Writer) *Writer {\n\tw := &Writer{\n\t\tBuffer: new(bytes.Buffer),\n\t\tout:    out,\n\t\ttermSize: func(_ int) (int, int, error) {\n\t\t\treturn -1, -1, ErrNotTTY\n\t\t},\n\t}\n\tif f, ok := out.(*os.File); ok {\n\t\tw.fd = int(f.Fd())\n\t\tif IsTerminal(w.fd) {\n\t\t\tw.terminal = true\n\t\t\tw.termSize = GetSize\n\t\t}\n\t}\n\tbb := make([]byte, 16)\n\tw.ew = escWriter(bb[:copy(bb, []byte(escOpen))])\n\treturn w\n}\n\n// IsTerminal tells whether underlying io.Writer is terminal.\nfunc (w *Writer) IsTerminal() bool {\n\treturn w.terminal\n}\n\n// GetTermSize returns WxH of underlying terminal.\nfunc (w *Writer) GetTermSize() (width, height int, err error) {\n\treturn w.termSize(w.fd)\n}\n\ntype escWriter []byte\n\nfunc (b escWriter) ansiCuuAndEd(out io.Writer, n int) error {\n\tb = strconv.AppendInt(b, int64(n), 10)\n\t_, err := out.Write(append(b, []byte(cuuAndEd)...))\n\treturn err\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/writer_posix.go",
    "content": "//go:build !windows\n\npackage cwriter\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Writer is a buffered terminal writer, which moves cursor N lines up\n// on each flush except the first one, where N is a number of lines of\n// a previous flush.\ntype Writer struct {\n\t*bytes.Buffer\n\tout      io.Writer\n\tew       escWriter\n\tfd       int\n\tterminal bool\n\ttermSize func(int) (int, int, error)\n}\n\n// Flush flushes the underlying buffer.\n// It's caller's responsibility to pass correct number of lines.\nfunc (w *Writer) Flush(lines int) error {\n\t_, err := w.WriteTo(w.out)\n\t// some terminals interpret 'cursor up 0' as 'cursor up 1'\n\tif err == nil && lines > 0 {\n\t\terr = w.ew.ansiCuuAndEd(w, lines)\n\t}\n\treturn err\n}\n\n// GetSize returns the dimensions of the given terminal.\nfunc GetSize(fd int) (width, height int, err error) {\n\tws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\treturn int(ws.Col), int(ws.Row), nil\n}\n\n// IsTerminal returns whether the given file descriptor is a terminal.\nfunc IsTerminal(fd int) bool {\n\t_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\treturn err == nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/cwriter/writer_windows.go",
    "content": "//go:build windows\n\npackage cwriter\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nvar kernel32 = windows.NewLazySystemDLL(\"kernel32.dll\")\n\nvar (\n\tprocSetConsoleCursorPosition   = kernel32.NewProc(\"SetConsoleCursorPosition\")\n\tprocFillConsoleOutputCharacter = kernel32.NewProc(\"FillConsoleOutputCharacterW\")\n)\n\n// Writer is a buffered terminal writer, which moves cursor N lines up\n// on each flush except the first one, where N is a number of lines of\n// a previous flush.\ntype Writer struct {\n\t*bytes.Buffer\n\tout      io.Writer\n\tew       escWriter\n\tlines    int\n\tfd       int\n\tterminal bool\n\ttermSize func(int) (int, int, error)\n}\n\n// Flush flushes the underlying buffer.\n// It's caller's responsibility to pass correct number of lines.\nfunc (w *Writer) Flush(lines int) error {\n\tif w.lines > 0 {\n\t\terr := w.clearLines(w.lines)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tw.lines = lines\n\t_, err := w.WriteTo(w.out)\n\treturn err\n}\n\nfunc (w *Writer) clearLines(n int) error {\n\tif !w.terminal {\n\t\t// hope it's cygwin or similar\n\t\treturn w.ew.ansiCuuAndEd(w.out, n)\n\t}\n\n\tvar info windows.ConsoleScreenBufferInfo\n\tif err := windows.GetConsoleScreenBufferInfo(windows.Handle(w.fd), &info); err != nil {\n\t\treturn err\n\t}\n\n\tinfo.CursorPosition.Y -= int16(n)\n\tif info.CursorPosition.Y < 0 {\n\t\tinfo.CursorPosition.Y = 0\n\t}\n\t_, _, _ = procSetConsoleCursorPosition.Call(\n\t\tuintptr(w.fd),\n\t\tuintptr(uint32(uint16(info.CursorPosition.Y))<<16|uint32(uint16(info.CursorPosition.X))),\n\t)\n\n\t// clear the lines\n\tcursor := &windows.Coord{\n\t\tX: info.Window.Left,\n\t\tY: info.CursorPosition.Y,\n\t}\n\tcount := uint32(info.Size.X) * uint32(n)\n\t_, _, _ = procFillConsoleOutputCharacter.Call(\n\t\tuintptr(w.fd),\n\t\tuintptr(' '),\n\t\tuintptr(count),\n\t\t*(*uintptr)(unsafe.Pointer(cursor)),\n\t\tuintptr(unsafe.Pointer(new(uint32))),\n\t)\n\treturn nil\n}\n\n// GetSize returns the visible dimensions of the given terminal.\n// These dimensions don't include any scrollback buffer height.\nfunc GetSize(fd int) (width, height int, err error) {\n\tvar info windows.ConsoleScreenBufferInfo\n\tif err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {\n\t\treturn 0, 0, err\n\t}\n\t// terminal.GetSize from crypto/ssh adds \"+ 1\" to both width and height:\n\t// https://go.googlesource.com/crypto/+/refs/heads/release-branch.go1.14/ssh/terminal/util_windows.go#75\n\t// but looks like this is a root cause of issue #66, so removing both \"+ 1\" have fixed it.\n\treturn int(info.Window.Right - info.Window.Left), int(info.Window.Bottom - info.Window.Top), nil\n}\n\n// IsTerminal returns whether the given file descriptor is a terminal.\nfunc IsTerminal(fd int) bool {\n\tvar st uint32\n\terr := windows.GetConsoleMode(windows.Handle(fd), &st)\n\treturn err == nil\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/any.go",
    "content": "package decor\n\nvar _ Decorator = any{}\n\n// Any decorator.\n// Converts DecorFunc into Decorator.\n//\n//\t`fn` DecorFunc callback\n//\t`wcc` optional WC config\nfunc Any(fn DecorFunc, wcc ...WC) Decorator {\n\treturn any{initWC(wcc...), fn}\n}\n\ntype any struct {\n\tWC\n\tfn DecorFunc\n}\n\nfunc (d any) Decor(s Statistics) (string, int) {\n\treturn d.Format(d.fn(s))\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/counters.go",
    "content": "package decor\n\nimport (\n\t\"fmt\"\n)\n\n// CountersNoUnit is a wrapper around Counters with no unit param.\nfunc CountersNoUnit(pairFmt string, wcc ...WC) Decorator {\n\treturn Counters(0, pairFmt, wcc...)\n}\n\n// CountersKibiByte is a wrapper around Counters with predefined unit\n// as SizeB1024(0).\nfunc CountersKibiByte(pairFmt string, wcc ...WC) Decorator {\n\treturn Counters(SizeB1024(0), pairFmt, wcc...)\n}\n\n// CountersKiloByte is a wrapper around Counters with predefined unit\n// as SizeB1000(0).\nfunc CountersKiloByte(pairFmt string, wcc ...WC) Decorator {\n\treturn Counters(SizeB1000(0), pairFmt, wcc...)\n}\n\n// Counters decorator with dynamic unit measure adjustment.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`pairFmt` printf compatible verbs for current and total\n//\n//\t`wcc` optional WC config\n//\n// pairFmt example if unit=SizeB1000(0):\n//\n//\tpairFmt=\"%d / %d\"       output: \"1MB / 12MB\"\n//\tpairFmt=\"% d / % d\"     output: \"1 MB / 12 MB\"\n//\tpairFmt=\"%.1f / %.1f\"   output: \"1.0MB / 12.0MB\"\n//\tpairFmt=\"% .1f / % .1f\" output: \"1.0 MB / 12.0 MB\"\n//\tpairFmt=\"%f / %f\"       output: \"1.000000MB / 12.000000MB\"\n//\tpairFmt=\"% f / % f\"     output: \"1.000000 MB / 12.000000 MB\"\nfunc Counters(unit interface{}, pairFmt string, wcc ...WC) Decorator {\n\tproducer := func() DecorFunc {\n\t\tswitch unit.(type) {\n\t\tcase SizeB1024:\n\t\t\tif pairFmt == \"\" {\n\t\t\t\tpairFmt = \"% d / % d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(pairFmt, SizeB1024(s.Current), SizeB1024(s.Total))\n\t\t\t}\n\t\tcase SizeB1000:\n\t\t\tif pairFmt == \"\" {\n\t\t\t\tpairFmt = \"% d / % d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(pairFmt, SizeB1000(s.Current), SizeB1000(s.Total))\n\t\t\t}\n\t\tdefault:\n\t\t\tif pairFmt == \"\" {\n\t\t\t\tpairFmt = \"%d / %d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(pairFmt, s.Current, s.Total)\n\t\t\t}\n\t\t}\n\t}\n\treturn Any(producer(), wcc...)\n}\n\n// TotalNoUnit is a wrapper around Total with no unit param.\nfunc TotalNoUnit(format string, wcc ...WC) Decorator {\n\treturn Total(0, format, wcc...)\n}\n\n// TotalKibiByte is a wrapper around Total with predefined unit\n// as SizeB1024(0).\nfunc TotalKibiByte(format string, wcc ...WC) Decorator {\n\treturn Total(SizeB1024(0), format, wcc...)\n}\n\n// TotalKiloByte is a wrapper around Total with predefined unit\n// as SizeB1000(0).\nfunc TotalKiloByte(format string, wcc ...WC) Decorator {\n\treturn Total(SizeB1000(0), format, wcc...)\n}\n\n// Total decorator with dynamic unit measure adjustment.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`format` printf compatible verb for Total\n//\n//\t`wcc` optional WC config\n//\n// format example if unit=SizeB1024(0):\n//\n//\tformat=\"%d\"    output: \"12MiB\"\n//\tformat=\"% d\"   output: \"12 MiB\"\n//\tformat=\"%.1f\"  output: \"12.0MiB\"\n//\tformat=\"% .1f\" output: \"12.0 MiB\"\n//\tformat=\"%f\"    output: \"12.000000MiB\"\n//\tformat=\"% f\"   output: \"12.000000 MiB\"\nfunc Total(unit interface{}, format string, wcc ...WC) Decorator {\n\tproducer := func() DecorFunc {\n\t\tswitch unit.(type) {\n\t\tcase SizeB1024:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1024(s.Total))\n\t\t\t}\n\t\tcase SizeB1000:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1000(s.Total))\n\t\t\t}\n\t\tdefault:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"%d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, s.Total)\n\t\t\t}\n\t\t}\n\t}\n\treturn Any(producer(), wcc...)\n}\n\n// CurrentNoUnit is a wrapper around Current with no unit param.\nfunc CurrentNoUnit(format string, wcc ...WC) Decorator {\n\treturn Current(0, format, wcc...)\n}\n\n// CurrentKibiByte is a wrapper around Current with predefined unit\n// as SizeB1024(0).\nfunc CurrentKibiByte(format string, wcc ...WC) Decorator {\n\treturn Current(SizeB1024(0), format, wcc...)\n}\n\n// CurrentKiloByte is a wrapper around Current with predefined unit\n// as SizeB1000(0).\nfunc CurrentKiloByte(format string, wcc ...WC) Decorator {\n\treturn Current(SizeB1000(0), format, wcc...)\n}\n\n// Current decorator with dynamic unit measure adjustment.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`format` printf compatible verb for Current\n//\n//\t`wcc` optional WC config\n//\n// format example if unit=SizeB1024(0):\n//\n//\tformat=\"%d\"    output: \"12MiB\"\n//\tformat=\"% d\"   output: \"12 MiB\"\n//\tformat=\"%.1f\"  output: \"12.0MiB\"\n//\tformat=\"% .1f\" output: \"12.0 MiB\"\n//\tformat=\"%f\"    output: \"12.000000MiB\"\n//\tformat=\"% f\"   output: \"12.000000 MiB\"\nfunc Current(unit interface{}, format string, wcc ...WC) Decorator {\n\tproducer := func() DecorFunc {\n\t\tswitch unit.(type) {\n\t\tcase SizeB1024:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1024(s.Current))\n\t\t\t}\n\t\tcase SizeB1000:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1000(s.Current))\n\t\t\t}\n\t\tdefault:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"%d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, s.Current)\n\t\t\t}\n\t\t}\n\t}\n\treturn Any(producer(), wcc...)\n}\n\n// InvertedCurrentNoUnit is a wrapper around InvertedCurrent with no unit param.\nfunc InvertedCurrentNoUnit(format string, wcc ...WC) Decorator {\n\treturn InvertedCurrent(0, format, wcc...)\n}\n\n// InvertedCurrentKibiByte is a wrapper around InvertedCurrent with predefined unit\n// as SizeB1024(0).\nfunc InvertedCurrentKibiByte(format string, wcc ...WC) Decorator {\n\treturn InvertedCurrent(SizeB1024(0), format, wcc...)\n}\n\n// InvertedCurrentKiloByte is a wrapper around InvertedCurrent with predefined unit\n// as SizeB1000(0).\nfunc InvertedCurrentKiloByte(format string, wcc ...WC) Decorator {\n\treturn InvertedCurrent(SizeB1000(0), format, wcc...)\n}\n\n// InvertedCurrent decorator with dynamic unit measure adjustment.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`format` printf compatible verb for InvertedCurrent\n//\n//\t`wcc` optional WC config\n//\n// format example if unit=SizeB1024(0):\n//\n//\tformat=\"%d\"    output: \"12MiB\"\n//\tformat=\"% d\"   output: \"12 MiB\"\n//\tformat=\"%.1f\"  output: \"12.0MiB\"\n//\tformat=\"% .1f\" output: \"12.0 MiB\"\n//\tformat=\"%f\"    output: \"12.000000MiB\"\n//\tformat=\"% f\"   output: \"12.000000 MiB\"\nfunc InvertedCurrent(unit interface{}, format string, wcc ...WC) Decorator {\n\tproducer := func() DecorFunc {\n\t\tswitch unit.(type) {\n\t\tcase SizeB1024:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1024(s.Total-s.Current))\n\t\t\t}\n\t\tcase SizeB1000:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"% d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, SizeB1000(s.Total-s.Current))\n\t\t\t}\n\t\tdefault:\n\t\t\tif format == \"\" {\n\t\t\t\tformat = \"%d\"\n\t\t\t}\n\t\t\treturn func(s Statistics) string {\n\t\t\t\treturn fmt.Sprintf(format, s.Total-s.Current)\n\t\t\t}\n\t\t}\n\t}\n\treturn Any(producer(), wcc...)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/decorator.go",
    "content": "package decor\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/mattn/go-runewidth\"\n)\n\nconst (\n\t// DindentRight sets indentation from right to left.\n\t//\n\t//\t|foo   |b     | DindentRight is set\n\t//\t|   foo|     b| DindentRight is not set\n\tDindentRight = 1 << iota\n\n\t// DextraSpace bit adds extra indentation space.\n\tDextraSpace\n\n\t// DSyncWidth bit enables same column width synchronization.\n\t// Effective with multiple bars only.\n\tDSyncWidth\n\n\t// DSyncWidthR is shortcut for DSyncWidth|DindentRight\n\tDSyncWidthR = DSyncWidth | DindentRight\n\n\t// DSyncSpace is shortcut for DSyncWidth|DextraSpace\n\tDSyncSpace = DSyncWidth | DextraSpace\n\n\t// DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DindentRight\n\tDSyncSpaceR = DSyncWidth | DextraSpace | DindentRight\n)\n\n// TimeStyle enum.\ntype TimeStyle int\n\n// TimeStyle kinds.\nconst (\n\tET_STYLE_GO TimeStyle = iota\n\tET_STYLE_HHMMSS\n\tET_STYLE_HHMM\n\tET_STYLE_MMSS\n)\n\n// Statistics contains fields which are necessary for implementing\n// `decor.Decorator` and `mpb.BarFiller` interfaces.\ntype Statistics struct {\n\tAvailableWidth int // calculated width initially equal to terminal width\n\tRequestedWidth int // width set by `mpb.WithWidth`\n\tID             int\n\tTotal          int64\n\tCurrent        int64\n\tRefill         int64\n\tCompleted      bool\n\tAborted        bool\n}\n\n// Decorator interface.\n// Most of the time there is no need to implement this interface\n// manually, as decor package already provides a wide range of decorators\n// which implement this interface. If however built-in decorators don't\n// meet your needs, you're free to implement your own one by implementing\n// this particular interface. The easy way to go is to convert a\n// `DecorFunc` into a `Decorator` interface by using provided\n// `func Any(DecorFunc, ...WC) Decorator`.\ntype Decorator interface {\n\tSynchronizer\n\tFormatter\n\tDecor(Statistics) (str string, viewWidth int)\n}\n\n// DecorFunc func type.\n// To be used with `func Any(DecorFunc, ...WC) Decorator`.\ntype DecorFunc func(Statistics) string\n\n// Sync type used by Synchronizer.\ntype Sync struct {\n\tTx chan int\n\tRx chan int\n}\n\n// Synchronizer interface.\n// All decorators implement this interface implicitly. Its Sync\n// method exposes width sync channel, if DSyncWidth bit is set.\ntype Synchronizer interface {\n\tSync() (*Sync, bool)\n}\n\n// Formatter interface.\n// Format method needs to be called from within Decorator.Decor method\n// in order to format string according to decor.WC settings.\n// No need to implement manually as long as decor.WC is embedded.\ntype Formatter interface {\n\tFormat(string) (_ string, width int)\n}\n\n// Wrapper interface.\n// If you're implementing custom Decorator by wrapping a built-in one,\n// it is necessary to implement this interface to retain functionality\n// of built-in Decorator.\ntype Wrapper interface {\n\tUnwrap() Decorator\n}\n\n// EwmaDecorator interface.\n// EWMA based decorators should implement this one.\ntype EwmaDecorator interface {\n\tEwmaUpdate(int64, time.Duration)\n}\n\n// AverageDecorator interface.\n// Average decorators should implement this interface to provide start\n// time adjustment facility, for resume-able tasks.\ntype AverageDecorator interface {\n\tAverageAdjust(time.Time)\n}\n\n// ShutdownListener interface.\n// If decorator needs to be notified once upon bar shutdown event, so\n// this is the right interface to implement.\ntype ShutdownListener interface {\n\tOnShutdown()\n}\n\n// Global convenience instances of WC with sync width bit set.\n// To be used with multiple bars only, i.e. not effective for single bar usage.\nvar (\n\tWCSyncWidth  = WC{C: DSyncWidth}\n\tWCSyncWidthR = WC{C: DSyncWidthR}\n\tWCSyncSpace  = WC{C: DSyncSpace}\n\tWCSyncSpaceR = WC{C: DSyncSpaceR}\n)\n\n// WC is a struct with two public fields W and C, both of int type.\n// W represents width and C represents bit set of width related config.\n// A decorator should embed WC, to enable width synchronization.\ntype WC struct {\n\tW    int\n\tC    int\n\tsync *Sync\n\tfill func(s string, w int) string\n}\n\n// Format should be called by any Decorator implementation.\n// Returns formatted string and its view (visual) width.\nfunc (wc WC) Format(str string) (string, int) {\n\twidth := runewidth.StringWidth(str)\n\tif wc.W > width {\n\t\twidth = wc.W\n\t} else if (wc.C & DextraSpace) != 0 {\n\t\twidth++\n\t}\n\tif (wc.C & DSyncWidth) != 0 {\n\t\twc.sync.Tx <- width\n\t\twidth = <-wc.sync.Rx\n\t}\n\treturn wc.fill(str, width), width\n}\n\n// Init initializes width related config.\nfunc (wc *WC) Init() WC {\n\tif (wc.C & DindentRight) != 0 {\n\t\twc.fill = runewidth.FillRight\n\t} else {\n\t\twc.fill = runewidth.FillLeft\n\t}\n\tif (wc.C & DSyncWidth) != 0 {\n\t\t// it's deliberate choice to override wc.sync on each Init() call,\n\t\t// this way globals like WCSyncSpace can be reused\n\t\twc.sync = &Sync{make(chan int, 1), make(chan int, 1)}\n\t}\n\treturn *wc\n}\n\n// Sync is implementation of Synchronizer interface.\nfunc (wc WC) Sync() (*Sync, bool) {\n\tif (wc.C&DSyncWidth) != 0 && wc.sync == nil {\n\t\tpanic(fmt.Sprintf(\"%T is not initialized\", wc))\n\t}\n\treturn wc.sync, (wc.C & DSyncWidth) != 0\n}\n\nfunc initWC(wcc ...WC) WC {\n\tvar wc WC\n\tfor _, nwc := range wcc {\n\t\twc = nwc\n\t}\n\treturn wc.Init()\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/doc.go",
    "content": "// Package decor provides common decorators for \"github.com/vbauerster/mpb/v8\" module.\n//\n// Some decorators returned by this package might have a closure state. It is ok to use\n// decorators concurrently, unless you share the same decorator among multiple\n// *mpb.Bar instances. To avoid data races, create new decorator per *mpb.Bar instance.\n//\n// Don't:\n//\n//\tp := mpb.New()\n//\tname := decor.Name(\"bar\")\n//\tp.AddBar(100, mpb.AppendDecorators(name))\n//\tp.AddBar(100, mpb.AppendDecorators(name))\n//\n// Do:\n//\n//\tp := mpb.New()\n//\tp.AddBar(100, mpb.AppendDecorators(decor.Name(\"bar1\")))\n//\tp.AddBar(100, mpb.AppendDecorators(decor.Name(\"bar2\")))\npackage decor\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/elapsed.go",
    "content": "package decor\n\nimport (\n\t\"time\"\n)\n\n// Elapsed decorator. It's wrapper of NewElapsed.\n//\n//\t`style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]\n//\n//\t`wcc` optional WC config\nfunc Elapsed(style TimeStyle, wcc ...WC) Decorator {\n\treturn NewElapsed(style, time.Now(), wcc...)\n}\n\n// NewElapsed returns elapsed time decorator.\n//\n//\t`style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]\n//\n//\t`start` start time\n//\n//\t`wcc` optional WC config\nfunc NewElapsed(style TimeStyle, start time.Time, wcc ...WC) Decorator {\n\tvar msg string\n\tproducer := chooseTimeProducer(style)\n\tfn := func(s Statistics) string {\n\t\tif !s.Completed && !s.Aborted {\n\t\t\tmsg = producer(time.Since(start))\n\t\t}\n\t\treturn msg\n\t}\n\treturn Any(fn, wcc...)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/eta.go",
    "content": "package decor\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n\n\t\"github.com/VividCortex/ewma\"\n)\n\nvar (\n\t_ Decorator        = (*movingAverageETA)(nil)\n\t_ EwmaDecorator    = (*movingAverageETA)(nil)\n\t_ Decorator        = (*averageETA)(nil)\n\t_ AverageDecorator = (*averageETA)(nil)\n)\n\n// TimeNormalizer interface. Implementers could be passed into\n// MovingAverageETA, in order to affect i.e. normalize its output.\ntype TimeNormalizer interface {\n\tNormalize(time.Duration) time.Duration\n}\n\n// TimeNormalizerFunc is function type adapter to convert function\n// into TimeNormalizer.\ntype TimeNormalizerFunc func(time.Duration) time.Duration\n\nfunc (f TimeNormalizerFunc) Normalize(src time.Duration) time.Duration {\n\treturn f(src)\n}\n\n// EwmaETA exponential-weighted-moving-average based ETA decorator. For this\n// decorator to work correctly you have to measure each iteration's duration\n// and pass it to one of the (*Bar).EwmaIncr... family methods.\nfunc EwmaETA(style TimeStyle, age float64, wcc ...WC) Decorator {\n\treturn EwmaNormalizedETA(style, age, nil, wcc...)\n}\n\n// EwmaNormalizedETA same as EwmaETA but with TimeNormalizer option.\nfunc EwmaNormalizedETA(style TimeStyle, age float64, normalizer TimeNormalizer, wcc ...WC) Decorator {\n\tvar average ewma.MovingAverage\n\tif age == 0 {\n\t\taverage = ewma.NewMovingAverage()\n\t} else {\n\t\taverage = ewma.NewMovingAverage(age)\n\t}\n\treturn MovingAverageETA(style, average, normalizer, wcc...)\n}\n\n// MovingAverageETA decorator relies on MovingAverage implementation to calculate its average.\n//\n//\t`style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]\n//\n//\t`average` implementation of MovingAverage interface\n//\n//\t`normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer]\n//\n//\t`wcc` optional WC config\nfunc MovingAverageETA(style TimeStyle, average ewma.MovingAverage, normalizer TimeNormalizer, wcc ...WC) Decorator {\n\tif average == nil {\n\t\taverage = NewMedian()\n\t}\n\td := &movingAverageETA{\n\t\tWC:         initWC(wcc...),\n\t\tproducer:   chooseTimeProducer(style),\n\t\taverage:    average,\n\t\tnormalizer: normalizer,\n\t}\n\treturn d\n}\n\ntype movingAverageETA struct {\n\tWC\n\tproducer   func(time.Duration) string\n\taverage    ewma.MovingAverage\n\tnormalizer TimeNormalizer\n\tzDur       time.Duration\n}\n\nfunc (d *movingAverageETA) Decor(s Statistics) (string, int) {\n\tv := math.Round(d.average.Value())\n\tremaining := time.Duration((s.Total - s.Current) * int64(v))\n\tif d.normalizer != nil {\n\t\tremaining = d.normalizer.Normalize(remaining)\n\t}\n\treturn d.Format(d.producer(remaining))\n}\n\nfunc (d *movingAverageETA) EwmaUpdate(n int64, dur time.Duration) {\n\tif n <= 0 {\n\t\td.zDur += dur\n\t\treturn\n\t}\n\tdurPerItem := float64(d.zDur+dur) / float64(n)\n\tif math.IsInf(durPerItem, 0) || math.IsNaN(durPerItem) {\n\t\td.zDur += dur\n\t\treturn\n\t}\n\td.zDur = 0\n\td.average.Add(durPerItem)\n}\n\n// AverageETA decorator. It's wrapper of NewAverageETA.\n//\n//\t`style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]\n//\n//\t`wcc` optional WC config\nfunc AverageETA(style TimeStyle, wcc ...WC) Decorator {\n\treturn NewAverageETA(style, time.Now(), nil, wcc...)\n}\n\n// NewAverageETA decorator with user provided start time.\n//\n//\t`style` one of [ET_STYLE_GO|ET_STYLE_HHMMSS|ET_STYLE_HHMM|ET_STYLE_MMSS]\n//\n//\t`start` start time\n//\n//\t`normalizer` available implementations are [FixedIntervalTimeNormalizer|MaxTolerateTimeNormalizer]\n//\n//\t`wcc` optional WC config\nfunc NewAverageETA(style TimeStyle, start time.Time, normalizer TimeNormalizer, wcc ...WC) Decorator {\n\td := &averageETA{\n\t\tWC:         initWC(wcc...),\n\t\tstart:      start,\n\t\tnormalizer: normalizer,\n\t\tproducer:   chooseTimeProducer(style),\n\t}\n\treturn d\n}\n\ntype averageETA struct {\n\tWC\n\tstart      time.Time\n\tnormalizer TimeNormalizer\n\tproducer   func(time.Duration) string\n}\n\nfunc (d *averageETA) Decor(s Statistics) (string, int) {\n\tvar remaining time.Duration\n\tif s.Current != 0 {\n\t\tdurPerItem := float64(time.Since(d.start)) / float64(s.Current)\n\t\tdurPerItem = math.Round(durPerItem)\n\t\tremaining = time.Duration((s.Total - s.Current) * int64(durPerItem))\n\t\tif d.normalizer != nil {\n\t\t\tremaining = d.normalizer.Normalize(remaining)\n\t\t}\n\t}\n\treturn d.Format(d.producer(remaining))\n}\n\nfunc (d *averageETA) AverageAdjust(start time.Time) {\n\td.start = start\n}\n\n// MaxTolerateTimeNormalizer returns implementation of TimeNormalizer.\nfunc MaxTolerateTimeNormalizer(maxTolerate time.Duration) TimeNormalizer {\n\tvar normalized time.Duration\n\tvar lastCall time.Time\n\treturn TimeNormalizerFunc(func(remaining time.Duration) time.Duration {\n\t\tif diff := normalized - remaining; diff <= 0 || diff > maxTolerate || remaining < time.Minute {\n\t\t\tnormalized = remaining\n\t\t\tlastCall = time.Now()\n\t\t\treturn remaining\n\t\t}\n\t\tnormalized -= time.Since(lastCall)\n\t\tlastCall = time.Now()\n\t\tif normalized > 0 {\n\t\t\treturn normalized\n\t\t}\n\t\treturn remaining\n\t})\n}\n\n// FixedIntervalTimeNormalizer returns implementation of TimeNormalizer.\nfunc FixedIntervalTimeNormalizer(updInterval int) TimeNormalizer {\n\tvar normalized time.Duration\n\tvar lastCall time.Time\n\tvar count int\n\treturn TimeNormalizerFunc(func(remaining time.Duration) time.Duration {\n\t\tif count == 0 || remaining < time.Minute {\n\t\t\tcount = updInterval\n\t\t\tnormalized = remaining\n\t\t\tlastCall = time.Now()\n\t\t\treturn remaining\n\t\t}\n\t\tcount--\n\t\tnormalized -= time.Since(lastCall)\n\t\tlastCall = time.Now()\n\t\tif normalized > 0 {\n\t\t\treturn normalized\n\t\t}\n\t\treturn remaining\n\t})\n}\n\nfunc chooseTimeProducer(style TimeStyle) func(time.Duration) string {\n\tswitch style {\n\tcase ET_STYLE_HHMMSS:\n\t\treturn func(remaining time.Duration) string {\n\t\t\thours := int64(remaining/time.Hour) % 60\n\t\t\tminutes := int64(remaining/time.Minute) % 60\n\t\t\tseconds := int64(remaining/time.Second) % 60\n\t\t\treturn fmt.Sprintf(\"%02d:%02d:%02d\", hours, minutes, seconds)\n\t\t}\n\tcase ET_STYLE_HHMM:\n\t\treturn func(remaining time.Duration) string {\n\t\t\thours := int64(remaining/time.Hour) % 60\n\t\t\tminutes := int64(remaining/time.Minute) % 60\n\t\t\treturn fmt.Sprintf(\"%02d:%02d\", hours, minutes)\n\t\t}\n\tcase ET_STYLE_MMSS:\n\t\treturn func(remaining time.Duration) string {\n\t\t\thours := int64(remaining/time.Hour) % 60\n\t\t\tminutes := int64(remaining/time.Minute) % 60\n\t\t\tseconds := int64(remaining/time.Second) % 60\n\t\t\tif hours > 0 {\n\t\t\t\treturn fmt.Sprintf(\"%02d:%02d:%02d\", hours, minutes, seconds)\n\t\t\t}\n\t\t\treturn fmt.Sprintf(\"%02d:%02d\", minutes, seconds)\n\t\t}\n\tdefault:\n\t\treturn func(remaining time.Duration) string {\n\t\t\treturn remaining.Truncate(time.Second).String()\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/meta.go",
    "content": "package decor\n\nvar (\n\t_ Decorator = metaWrapper{}\n\t_ Wrapper   = metaWrapper{}\n)\n\n// Meta wrap decorator.\n// Provided fn is supposed to wrap output of given decorator\n// with meta information like ANSI escape codes for example.\n// Primary usage intention is to set SGR display attributes.\n//\n//\t`decorator` Decorator to wrap\n//\t`fn` func to apply meta information\nfunc Meta(decorator Decorator, fn func(string) string) Decorator {\n\tif decorator == nil {\n\t\treturn nil\n\t}\n\treturn metaWrapper{decorator, fn}\n}\n\ntype metaWrapper struct {\n\tDecorator\n\tfn func(string) string\n}\n\nfunc (d metaWrapper) Decor(s Statistics) (string, int) {\n\tstr, width := d.Decorator.Decor(s)\n\treturn d.fn(str), width\n}\n\nfunc (d metaWrapper) Unwrap() Decorator {\n\treturn d.Decorator\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/moving_average.go",
    "content": "package decor\n\nimport (\n\t\"sort\"\n\t\"sync\"\n\n\t\"github.com/VividCortex/ewma\"\n)\n\nvar (\n\t_ ewma.MovingAverage = (*threadSafeMovingAverage)(nil)\n\t_ ewma.MovingAverage = (*medianWindow)(nil)\n\t_ sort.Interface     = (*medianWindow)(nil)\n)\n\ntype threadSafeMovingAverage struct {\n\tewma.MovingAverage\n\tmu sync.Mutex\n}\n\nfunc (s *threadSafeMovingAverage) Add(value float64) {\n\ts.mu.Lock()\n\ts.MovingAverage.Add(value)\n\ts.mu.Unlock()\n}\n\nfunc (s *threadSafeMovingAverage) Value() float64 {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\treturn s.MovingAverage.Value()\n}\n\nfunc (s *threadSafeMovingAverage) Set(value float64) {\n\ts.mu.Lock()\n\ts.MovingAverage.Set(value)\n\ts.mu.Unlock()\n}\n\n// NewThreadSafeMovingAverage converts provided ewma.MovingAverage\n// into thread safe ewma.MovingAverage.\nfunc NewThreadSafeMovingAverage(average ewma.MovingAverage) ewma.MovingAverage {\n\tif tsma, ok := average.(*threadSafeMovingAverage); ok {\n\t\treturn tsma\n\t}\n\treturn &threadSafeMovingAverage{MovingAverage: average}\n}\n\ntype medianWindow [3]float64\n\nfunc (s *medianWindow) Len() int           { return len(s) }\nfunc (s *medianWindow) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }\nfunc (s *medianWindow) Less(i, j int) bool { return s[i] < s[j] }\n\nfunc (s *medianWindow) Add(value float64) {\n\ts[0], s[1] = s[1], s[2]\n\ts[2] = value\n}\n\nfunc (s *medianWindow) Value() float64 {\n\ttmp := *s\n\tsort.Sort(&tmp)\n\treturn tmp[1]\n}\n\nfunc (s *medianWindow) Set(value float64) {\n\tfor i := 0; i < len(s); i++ {\n\t\ts[i] = value\n\t}\n}\n\n// NewMedian is fixed last 3 samples median MovingAverage.\nfunc NewMedian() ewma.MovingAverage {\n\treturn new(medianWindow)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/name.go",
    "content": "package decor\n\n// Name decorator displays text that is set once and can't be changed\n// during decorator's lifetime.\n//\n//\t`str` string to display\n//\n//\t`wcc` optional WC config\nfunc Name(str string, wcc ...WC) Decorator {\n\treturn Any(func(Statistics) string { return str }, wcc...)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/on_abort.go",
    "content": "package decor\n\nvar (\n\t_ Decorator = onAbortWrapper{}\n\t_ Wrapper   = onAbortWrapper{}\n\t_ Decorator = onAbortMetaWrapper{}\n\t_ Wrapper   = onAbortMetaWrapper{}\n)\n\n// OnAbort wrap decorator.\n// Displays provided message on abort event.\n// Has no effect if bar.Abort(true) is called.\n//\n//\t`decorator` Decorator to wrap\n//\t`message` message to display\nfunc OnAbort(decorator Decorator, message string) Decorator {\n\tif decorator == nil {\n\t\treturn nil\n\t}\n\treturn onAbortWrapper{decorator, message}\n}\n\ntype onAbortWrapper struct {\n\tDecorator\n\tmsg string\n}\n\nfunc (d onAbortWrapper) Decor(s Statistics) (string, int) {\n\tif s.Aborted {\n\t\treturn d.Format(d.msg)\n\t}\n\treturn d.Decorator.Decor(s)\n}\n\nfunc (d onAbortWrapper) Unwrap() Decorator {\n\treturn d.Decorator\n}\n\n// OnAbortMeta wrap decorator.\n// Provided fn is supposed to wrap output of given decorator\n// with meta information like ANSI escape codes for example.\n// Primary usage intention is to set SGR display attributes.\n//\n//\t`decorator` Decorator to wrap\n//\t`fn` func to apply meta information\nfunc OnAbortMeta(decorator Decorator, fn func(string) string) Decorator {\n\tif decorator == nil {\n\t\treturn nil\n\t}\n\treturn onAbortMetaWrapper{decorator, fn}\n}\n\ntype onAbortMetaWrapper struct {\n\tDecorator\n\tfn func(string) string\n}\n\nfunc (d onAbortMetaWrapper) Decor(s Statistics) (string, int) {\n\tif s.Aborted {\n\t\tstr, width := d.Decorator.Decor(s)\n\t\treturn d.fn(str), width\n\t}\n\treturn d.Decorator.Decor(s)\n}\n\nfunc (d onAbortMetaWrapper) Unwrap() Decorator {\n\treturn d.Decorator\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/on_abort_or_on_complete.go",
    "content": "package decor\n\n// OnAbortOrOnComplete wrap decorator.\n// Displays provided message on abort or on complete event.\n//\n//\t`decorator` Decorator to wrap\n//\t`message` message to display\nfunc OnAbortOrOnComplete(decorator Decorator, message string) Decorator {\n\treturn OnAbort(OnComplete(decorator, message), message)\n}\n\n// OnAbortMetaOrOnCompleteMeta wrap decorator.\n// Provided fn is supposed to wrap output of given decorator\n// with meta information like ANSI escape codes for example.\n// Primary usage intention is to set SGR display attributes.\n//\n//\t`decorator` Decorator to wrap\n//\t`fn` func to apply meta information\nfunc OnAbortMetaOrOnCompleteMeta(decorator Decorator, fn func(string) string) Decorator {\n\treturn OnAbortMeta(OnCompleteMeta(decorator, fn), fn)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/on_complete.go",
    "content": "package decor\n\nvar (\n\t_ Decorator = onCompleteWrapper{}\n\t_ Wrapper   = onCompleteWrapper{}\n\t_ Decorator = onCompleteMetaWrapper{}\n\t_ Wrapper   = onCompleteMetaWrapper{}\n)\n\n// OnComplete wrap decorator.\n// Displays provided message on complete event.\n//\n//\t`decorator` Decorator to wrap\n//\t`message` message to display\nfunc OnComplete(decorator Decorator, message string) Decorator {\n\tif decorator == nil {\n\t\treturn nil\n\t}\n\treturn onCompleteWrapper{decorator, message}\n}\n\ntype onCompleteWrapper struct {\n\tDecorator\n\tmsg string\n}\n\nfunc (d onCompleteWrapper) Decor(s Statistics) (string, int) {\n\tif s.Completed {\n\t\treturn d.Format(d.msg)\n\t}\n\treturn d.Decorator.Decor(s)\n}\n\nfunc (d onCompleteWrapper) Unwrap() Decorator {\n\treturn d.Decorator\n}\n\n// OnCompleteMeta wrap decorator.\n// Provided fn is supposed to wrap output of given decorator\n// with meta information like ANSI escape codes for example.\n// Primary usage intention is to set SGR display attributes.\n//\n//\t`decorator` Decorator to wrap\n//\t`fn` func to apply meta information\nfunc OnCompleteMeta(decorator Decorator, fn func(string) string) Decorator {\n\tif decorator == nil {\n\t\treturn nil\n\t}\n\treturn onCompleteMetaWrapper{decorator, fn}\n}\n\ntype onCompleteMetaWrapper struct {\n\tDecorator\n\tfn func(string) string\n}\n\nfunc (d onCompleteMetaWrapper) Decor(s Statistics) (string, int) {\n\tif s.Completed {\n\t\tstr, width := d.Decorator.Decor(s)\n\t\treturn d.fn(str), width\n\t}\n\treturn d.Decorator.Decor(s)\n}\n\nfunc (d onCompleteMetaWrapper) Unwrap() Decorator {\n\treturn d.Decorator\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/on_complete_or_on_abort.go",
    "content": "package decor\n\n// OnCompleteOrOnAbort wrap decorator.\n// Displays provided message on complete or on abort event.\n//\n//\t`decorator` Decorator to wrap\n//\t`message` message to display\nfunc OnCompleteOrOnAbort(decorator Decorator, message string) Decorator {\n\treturn OnComplete(OnAbort(decorator, message), message)\n}\n\n// OnCompleteMetaOrOnAbortMeta wrap decorator.\n// Provided fn is supposed to wrap output of given decorator\n// with meta information like ANSI escape codes for example.\n// Primary usage intention is to set SGR display attributes.\n//\n//\t`decorator` Decorator to wrap\n//\t`fn` func to apply meta information\nfunc OnCompleteMetaOrOnAbortMeta(decorator Decorator, fn func(string) string) Decorator {\n\treturn OnCompleteMeta(OnAbortMeta(decorator, fn), fn)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/on_condition.go",
    "content": "package decor\n\n// OnCondition applies decorator only if a condition is true.\n//\n//\t`decorator` Decorator\n//\n//\t`cond` bool\nfunc OnCondition(decorator Decorator, cond bool) Decorator {\n\treturn Conditional(cond, decorator, nil)\n}\n\n// OnPredicate applies decorator only if a predicate evaluates to true.\n//\n//\t`decorator` Decorator\n//\n//\t`predicate` func() bool\nfunc OnPredicate(decorator Decorator, predicate func() bool) Decorator {\n\treturn Predicative(predicate, decorator, nil)\n}\n\n// Conditional returns decorator `a` if condition is true, otherwise\n// decorator `b`.\n//\n//\t`cond` bool\n//\n//\t`a` Decorator\n//\n//\t`b` Decorator\nfunc Conditional(cond bool, a, b Decorator) Decorator {\n\tif cond {\n\t\treturn a\n\t} else {\n\t\treturn b\n\t}\n}\n\n// Predicative returns decorator `a` if predicate evaluates to true,\n// otherwise decorator `b`.\n//\n//\t`predicate` func() bool\n//\n//\t`a` Decorator\n//\n//\t`b` Decorator\nfunc Predicative(predicate func() bool, a, b Decorator) Decorator {\n\tif predicate() {\n\t\treturn a\n\t} else {\n\t\treturn b\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/percentage.go",
    "content": "package decor\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/vbauerster/mpb/v8/internal\"\n)\n\nvar _ fmt.Formatter = percentageType(0)\n\ntype percentageType float64\n\nfunc (s percentageType) Format(st fmt.State, verb rune) {\n\tprec := -1\n\tswitch verb {\n\tcase 'f', 'e', 'E':\n\t\tprec = 6 // default prec of fmt.Printf(\"%f|%e|%E\")\n\t\tfallthrough\n\tcase 'b', 'g', 'G', 'x', 'X':\n\t\tif p, ok := st.Precision(); ok {\n\t\t\tprec = p\n\t\t}\n\tdefault:\n\t\tverb, prec = 'f', 0\n\t}\n\n\tb := strconv.AppendFloat(make([]byte, 0, 16), float64(s), byte(verb), prec, 64)\n\tif st.Flag(' ') {\n\t\tb = append(b, ' ', '%')\n\t} else {\n\t\tb = append(b, '%')\n\t}\n\t_, err := st.Write(b)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\n// Percentage returns percentage decorator. It's a wrapper of NewPercentage.\nfunc Percentage(wcc ...WC) Decorator {\n\treturn NewPercentage(\"% d\", wcc...)\n}\n\n// NewPercentage percentage decorator with custom format string.\n//\n//\t`format` printf compatible verb\n//\n//\t`wcc` optional WC config\n//\n// format examples:\n//\n//\tformat=\"%d\"    output: \"1%\"\n//\tformat=\"% d\"   output: \"1 %\"\n//\tformat=\"%.1f\"  output: \"1.0%\"\n//\tformat=\"% .1f\" output: \"1.0 %\"\n//\tformat=\"%f\"    output: \"1.000000%\"\n//\tformat=\"% f\"   output: \"1.000000 %\"\nfunc NewPercentage(format string, wcc ...WC) Decorator {\n\tif format == \"\" {\n\t\tformat = \"% d\"\n\t}\n\tf := func(s Statistics) string {\n\t\tp := internal.Percentage(s.Total, s.Current, 100)\n\t\treturn fmt.Sprintf(format, percentageType(p))\n\t}\n\treturn Any(f, wcc...)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/size_type.go",
    "content": "//go:generate go tool stringer -type=SizeB1024 -trimprefix=_i\n//go:generate go tool stringer -type=SizeB1000 -trimprefix=_\n\npackage decor\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\nvar (\n\t_ fmt.Formatter = SizeB1024(0)\n\t_ fmt.Stringer  = SizeB1024(0)\n\t_ fmt.Formatter = SizeB1000(0)\n\t_ fmt.Stringer  = SizeB1000(0)\n)\n\nconst (\n\t_ib   SizeB1024 = iota + 1\n\t_iKiB SizeB1024 = 1 << (iota * 10)\n\t_iMiB\n\t_iGiB\n\t_iTiB\n)\n\n// SizeB1024 named type, which implements fmt.Formatter interface. It\n// adjusts its value according to byte size multiple by 1024 and appends\n// appropriate size marker (KiB, MiB, GiB, TiB).\ntype SizeB1024 int64\n\nfunc (s SizeB1024) Format(f fmt.State, verb rune) {\n\tprec := -1\n\tswitch verb {\n\tcase 'f', 'e', 'E':\n\t\tprec = 6 // default prec of fmt.Printf(\"%f|%e|%E\")\n\t\tfallthrough\n\tcase 'b', 'g', 'G', 'x', 'X':\n\t\tif p, ok := f.Precision(); ok {\n\t\t\tprec = p\n\t\t}\n\tdefault:\n\t\tverb, prec = 'f', 0\n\t}\n\n\tvar unit SizeB1024\n\tswitch {\n\tcase s < _iKiB:\n\t\tunit = _ib\n\tcase s < _iMiB:\n\t\tunit = _iKiB\n\tcase s < _iGiB:\n\t\tunit = _iMiB\n\tcase s < _iTiB:\n\t\tunit = _iGiB\n\tdefault:\n\t\tunit = _iTiB\n\t}\n\n\tb := strconv.AppendFloat(make([]byte, 0, 24), float64(s)/float64(unit), byte(verb), prec, 64)\n\tif f.Flag(' ') {\n\t\tb = append(b, ' ')\n\t}\n\tb = append(b, []byte(unit.String())...)\n\t_, err := f.Write(b)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nconst (\n\t_b  SizeB1000 = 1\n\t_KB SizeB1000 = _b * 1000\n\t_MB SizeB1000 = _KB * 1000\n\t_GB SizeB1000 = _MB * 1000\n\t_TB SizeB1000 = _GB * 1000\n)\n\n// SizeB1000 named type, which implements fmt.Formatter interface. It\n// adjusts its value according to byte size multiple by 1000 and appends\n// appropriate size marker (KB, MB, GB, TB).\ntype SizeB1000 int64\n\nfunc (s SizeB1000) Format(f fmt.State, verb rune) {\n\tprec := -1\n\tswitch verb {\n\tcase 'f', 'e', 'E':\n\t\tprec = 6 // default prec of fmt.Printf(\"%f|%e|%E\")\n\t\tfallthrough\n\tcase 'b', 'g', 'G', 'x', 'X':\n\t\tif p, ok := f.Precision(); ok {\n\t\t\tprec = p\n\t\t}\n\tdefault:\n\t\tverb, prec = 'f', 0\n\t}\n\n\tvar unit SizeB1000\n\tswitch {\n\tcase s < _KB:\n\t\tunit = _b\n\tcase s < _MB:\n\t\tunit = _KB\n\tcase s < _GB:\n\t\tunit = _MB\n\tcase s < _TB:\n\t\tunit = _GB\n\tdefault:\n\t\tunit = _TB\n\t}\n\n\tb := strconv.AppendFloat(make([]byte, 0, 24), float64(s)/float64(unit), byte(verb), prec, 64)\n\tif f.Flag(' ') {\n\t\tb = append(b, ' ')\n\t}\n\tb = append(b, []byte(unit.String())...)\n\t_, err := f.Write(b)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/sizeb1000_string.go",
    "content": "// Code generated by \"stringer -type=SizeB1000 -trimprefix=_\"; DO NOT EDIT.\n\npackage decor\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[_b-1]\n\t_ = x[_KB-1000]\n\t_ = x[_MB-1000000]\n\t_ = x[_GB-1000000000]\n\t_ = x[_TB-1000000000000]\n}\n\nconst (\n\t_SizeB1000_name_0 = \"b\"\n\t_SizeB1000_name_1 = \"KB\"\n\t_SizeB1000_name_2 = \"MB\"\n\t_SizeB1000_name_3 = \"GB\"\n\t_SizeB1000_name_4 = \"TB\"\n)\n\nfunc (i SizeB1000) String() string {\n\tswitch {\n\tcase i == 1:\n\t\treturn _SizeB1000_name_0\n\tcase i == 1000:\n\t\treturn _SizeB1000_name_1\n\tcase i == 1000000:\n\t\treturn _SizeB1000_name_2\n\tcase i == 1000000000:\n\t\treturn _SizeB1000_name_3\n\tcase i == 1000000000000:\n\t\treturn _SizeB1000_name_4\n\tdefault:\n\t\treturn \"SizeB1000(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/sizeb1024_string.go",
    "content": "// Code generated by \"stringer -type=SizeB1024 -trimprefix=_i\"; DO NOT EDIT.\n\npackage decor\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[_ib-1]\n\t_ = x[_iKiB-1024]\n\t_ = x[_iMiB-1048576]\n\t_ = x[_iGiB-1073741824]\n\t_ = x[_iTiB-1099511627776]\n}\n\nconst (\n\t_SizeB1024_name_0 = \"b\"\n\t_SizeB1024_name_1 = \"KiB\"\n\t_SizeB1024_name_2 = \"MiB\"\n\t_SizeB1024_name_3 = \"GiB\"\n\t_SizeB1024_name_4 = \"TiB\"\n)\n\nfunc (i SizeB1024) String() string {\n\tswitch {\n\tcase i == 1:\n\t\treturn _SizeB1024_name_0\n\tcase i == 1024:\n\t\treturn _SizeB1024_name_1\n\tcase i == 1048576:\n\t\treturn _SizeB1024_name_2\n\tcase i == 1073741824:\n\t\treturn _SizeB1024_name_3\n\tcase i == 1099511627776:\n\t\treturn _SizeB1024_name_4\n\tdefault:\n\t\treturn \"SizeB1024(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/speed.go",
    "content": "package decor\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"time\"\n\n\t\"github.com/VividCortex/ewma\"\n)\n\nvar (\n\t_ Decorator        = (*movingAverageSpeed)(nil)\n\t_ EwmaDecorator    = (*movingAverageSpeed)(nil)\n\t_ Decorator        = (*averageSpeed)(nil)\n\t_ AverageDecorator = (*averageSpeed)(nil)\n)\n\n// FmtAsSpeed adds \"/s\" to the end of the input formatter. To be\n// used with SizeB1000 or SizeB1024 types, for example:\n//\n//\tfmt.Printf(\"%.1f\", FmtAsSpeed(SizeB1024(2048)))\nfunc FmtAsSpeed(input fmt.Formatter) fmt.Formatter {\n\treturn &speedFormatter{input}\n}\n\ntype speedFormatter struct {\n\tfmt.Formatter\n}\n\nfunc (s *speedFormatter) Format(st fmt.State, verb rune) {\n\ts.Formatter.Format(st, verb)\n\t_, err := io.WriteString(st, \"/s\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\n// EwmaSpeed exponential-weighted-moving-average based speed decorator.\n// For this decorator to work correctly you have to measure each iteration's\n// duration and pass it to one of the (*Bar).EwmaIncr... family methods.\nfunc EwmaSpeed(unit interface{}, format string, age float64, wcc ...WC) Decorator {\n\tvar average ewma.MovingAverage\n\tif age == 0 {\n\t\taverage = ewma.NewMovingAverage()\n\t} else {\n\t\taverage = ewma.NewMovingAverage(age)\n\t}\n\treturn MovingAverageSpeed(unit, format, average, wcc...)\n}\n\n// MovingAverageSpeed decorator relies on MovingAverage implementation\n// to calculate its average.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`format` printf compatible verb for value, like \"%f\" or \"%d\"\n//\n//\t`average` MovingAverage implementation\n//\n//\t`wcc` optional WC config\n//\n// format examples:\n//\n//\tunit=SizeB1024(0), format=\"%.1f\"  output: \"1.0MiB/s\"\n//\tunit=SizeB1024(0), format=\"% .1f\" output: \"1.0 MiB/s\"\n//\tunit=SizeB1000(0), format=\"%.1f\"  output: \"1.0MB/s\"\n//\tunit=SizeB1000(0), format=\"% .1f\" output: \"1.0 MB/s\"\nfunc MovingAverageSpeed(unit interface{}, format string, average ewma.MovingAverage, wcc ...WC) Decorator {\n\td := &movingAverageSpeed{\n\t\tWC:       initWC(wcc...),\n\t\tproducer: chooseSpeedProducer(unit, format),\n\t\taverage:  average,\n\t}\n\treturn d\n}\n\ntype movingAverageSpeed struct {\n\tWC\n\tproducer func(float64) string\n\taverage  ewma.MovingAverage\n\tzDur     time.Duration\n}\n\nfunc (d *movingAverageSpeed) Decor(_ Statistics) (string, int) {\n\tvar str string\n\t// ewma implementation may return 0 before accumulating certain number of samples\n\tif v := d.average.Value(); v != 0 {\n\t\tstr = d.producer(1e9 / v)\n\t} else {\n\t\tstr = d.producer(0)\n\t}\n\treturn d.Format(str)\n}\n\nfunc (d *movingAverageSpeed) EwmaUpdate(n int64, dur time.Duration) {\n\tif n <= 0 {\n\t\td.zDur += dur\n\t\treturn\n\t}\n\tdurPerByte := float64(d.zDur+dur) / float64(n)\n\tif math.IsInf(durPerByte, 0) || math.IsNaN(durPerByte) {\n\t\td.zDur += dur\n\t\treturn\n\t}\n\td.zDur = 0\n\td.average.Add(durPerByte)\n}\n\n// AverageSpeed decorator with dynamic unit measure adjustment. It's\n// a wrapper of NewAverageSpeed.\nfunc AverageSpeed(unit interface{}, format string, wcc ...WC) Decorator {\n\treturn NewAverageSpeed(unit, format, time.Now(), wcc...)\n}\n\n// NewAverageSpeed decorator with dynamic unit measure adjustment and\n// user provided start time.\n//\n//\t`unit` one of [0|SizeB1024(0)|SizeB1000(0)]\n//\n//\t`format` printf compatible verb for value, like \"%f\" or \"%d\"\n//\n//\t`start` start time\n//\n//\t`wcc` optional WC config\n//\n// format examples:\n//\n//\tunit=SizeB1024(0), format=\"%.1f\"  output: \"1.0MiB/s\"\n//\tunit=SizeB1024(0), format=\"% .1f\" output: \"1.0 MiB/s\"\n//\tunit=SizeB1000(0), format=\"%.1f\"  output: \"1.0MB/s\"\n//\tunit=SizeB1000(0), format=\"% .1f\" output: \"1.0 MB/s\"\nfunc NewAverageSpeed(unit interface{}, format string, start time.Time, wcc ...WC) Decorator {\n\td := &averageSpeed{\n\t\tWC:       initWC(wcc...),\n\t\tstart:    start,\n\t\tproducer: chooseSpeedProducer(unit, format),\n\t}\n\treturn d\n}\n\ntype averageSpeed struct {\n\tWC\n\tstart    time.Time\n\tproducer func(float64) string\n\tmsg      string\n}\n\nfunc (d *averageSpeed) Decor(s Statistics) (string, int) {\n\tif !s.Completed {\n\t\tspeed := float64(s.Current) / float64(time.Since(d.start))\n\t\td.msg = d.producer(speed * 1e9)\n\t}\n\treturn d.Format(d.msg)\n}\n\nfunc (d *averageSpeed) AverageAdjust(start time.Time) {\n\td.start = start\n}\n\nfunc chooseSpeedProducer(unit interface{}, format string) func(float64) string {\n\tswitch unit.(type) {\n\tcase SizeB1024:\n\t\tif format == \"\" {\n\t\t\tformat = \"% d\"\n\t\t}\n\t\treturn func(speed float64) string {\n\t\t\treturn fmt.Sprintf(format, FmtAsSpeed(SizeB1024(math.Round(speed))))\n\t\t}\n\tcase SizeB1000:\n\t\tif format == \"\" {\n\t\t\tformat = \"% d\"\n\t\t}\n\t\treturn func(speed float64) string {\n\t\t\treturn fmt.Sprintf(format, FmtAsSpeed(SizeB1000(math.Round(speed))))\n\t\t}\n\tdefault:\n\t\tif format == \"\" {\n\t\t\tformat = \"%f\"\n\t\t}\n\t\treturn func(speed float64) string {\n\t\t\treturn fmt.Sprintf(format, speed)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/decor/spinner.go",
    "content": "package decor\n\nvar defaultSpinnerStyle = [...]string{\"⠋\", \"⠙\", \"⠹\", \"⠸\", \"⠼\", \"⠴\", \"⠦\", \"⠧\", \"⠇\", \"⠏\"}\n\n// Spinner returns spinner decorator.\n//\n//\t`frames` spinner frames, if nil or len==0, default is used\n//\n//\t`wcc` optional WC config\nfunc Spinner(frames []string, wcc ...WC) Decorator {\n\tif len(frames) == 0 {\n\t\tframes = defaultSpinnerStyle[:]\n\t}\n\tvar count uint\n\tf := func(s Statistics) string {\n\t\tframe := frames[count%uint(len(frames))]\n\t\tcount++\n\t\treturn frame\n\t}\n\treturn Any(f, wcc...)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/doc.go",
    "content": "// Package mpb is a library for rendering progress bars in terminal applications.\npackage mpb\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/heap_manager.go",
    "content": "package mpb\n\nimport (\n\t\"container/heap\"\n\t\"iter\"\n\t\"slices\"\n\t\"sync\"\n\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\ntype heapManager chan heapRequest\n\ntype heapCmd int\n\nconst (\n\th_sync heapCmd = iota\n\th_push\n\th_render\n\th_iter\n\th_fix\n)\n\ntype heapRequest struct {\n\tcmd  heapCmd\n\tdata interface{}\n}\n\ntype pushData struct {\n\tbar  *Bar\n\tsync bool\n}\n\ntype renderData struct {\n\twidth int\n\tseqCh chan<- iter.Seq[*Bar]\n}\n\ntype fixData struct {\n\tbar      *Bar\n\tpriority int\n\tlazy     bool\n}\n\nfunc (m heapManager) run(pwg *sync.WaitGroup, shutdown <-chan interface{}, handOverBarHeap chan<- []*Bar) {\n\tvar bHeap barHeap\n\tvar sync bool\n\tvar prevLen int\n\tvar pMatrix map[int][]*decor.Sync\n\tvar aMatrix map[int][]*decor.Sync\n\n\tdefer func() {\n\t\tif handOverBarHeap != nil {\n\t\t\tordered := make([]*Bar, 0, bHeap.Len())\n\t\t\tfor bHeap.Len() != 0 {\n\t\t\t\tordered = append(ordered, heap.Pop(&bHeap).(*Bar))\n\t\t\t}\n\t\t\thandOverBarHeap <- ordered\n\t\t}\n\t\tpwg.Done()\n\t}()\n\n\tfor req := range m {\n\t\tswitch req.cmd {\n\t\tcase h_sync:\n\t\t\tif sync || prevLen != bHeap.Len() {\n\t\t\t\tpMatrix = make(map[int][]*decor.Sync)\n\t\t\t\taMatrix = make(map[int][]*decor.Sync)\n\t\t\t\tfor _, b := range bHeap {\n\t\t\t\t\ttable := b.wSyncTable()\n\t\t\t\t\tfor i, s := range table[0] {\n\t\t\t\t\t\tpMatrix[i] = append(pMatrix[i], s)\n\t\t\t\t\t}\n\t\t\t\t\tfor i, s := range table[1] {\n\t\t\t\t\t\taMatrix[i] = append(aMatrix[i], s)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsync, prevLen = false, bHeap.Len()\n\t\t\t}\n\t\t\tsyncWidth(pMatrix, shutdown)\n\t\t\tsyncWidth(aMatrix, shutdown)\n\t\tcase h_push:\n\t\t\tdata := req.data.(pushData)\n\t\t\theap.Push(&bHeap, data.bar)\n\t\t\tsync = sync || data.sync\n\t\tcase h_render:\n\t\t\tdata := req.data.(renderData)\n\t\t\tfor _, b := range bHeap {\n\t\t\t\tgo b.render(data.width)\n\t\t\t}\n\t\t\tordered := make([]*Bar, 0, bHeap.Len())\n\t\t\tfor bHeap.Len() != 0 {\n\t\t\t\tordered = append(ordered, heap.Pop(&bHeap).(*Bar))\n\t\t\t}\n\t\t\tdata.seqCh <- slices.Values(ordered)\n\t\tcase h_iter:\n\t\t\tseqCh := req.data.(chan<- iter.Seq[*Bar])\n\t\t\tdone := make(chan struct{})\n\t\t\tseqCh <- func(yield func(*Bar) bool) {\n\t\t\t\tdefer close(done)\n\t\t\t\tfor _, b := range bHeap {\n\t\t\t\t\tif !yield(b) {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t<-done\n\t\tcase h_fix:\n\t\t\tdata := req.data.(fixData)\n\t\t\tif data.bar.index < 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdata.bar.priority = data.priority\n\t\t\tif !data.lazy {\n\t\t\t\theap.Fix(&bHeap, data.bar.index)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (m heapManager) sync() {\n\tm <- heapRequest{cmd: h_sync}\n}\n\nfunc (m heapManager) push(b *Bar, sync bool) {\n\tdata := pushData{b, sync}\n\tm <- heapRequest{cmd: h_push, data: data}\n}\n\nfunc (m heapManager) render(width int) iter.Seq[*Bar] {\n\tseqCh := make(chan iter.Seq[*Bar], 1)\n\tm <- heapRequest{cmd: h_render, data: renderData{\n\t\twidth: width,\n\t\tseqCh: seqCh,\n\t}}\n\treturn <-seqCh\n}\n\nfunc (m heapManager) iter(seqCh chan<- iter.Seq[*Bar]) {\n\tm <- heapRequest{cmd: h_iter, data: seqCh}\n}\n\nfunc (m heapManager) fix(b *Bar, priority int, lazy bool) {\n\tdata := fixData{b, priority, lazy}\n\tm <- heapRequest{cmd: h_fix, data: data}\n}\n\nfunc syncWidth(matrix map[int][]*decor.Sync, done <-chan interface{}) {\n\tfor _, column := range matrix {\n\t\tgo maxWidthDistributor(column, done)\n\t}\n}\n\nfunc maxWidthDistributor(column []*decor.Sync, done <-chan interface{}) {\n\tvar maxWidth int\n\tfor _, s := range column {\n\t\tselect {\n\t\tcase w := <-s.Tx:\n\t\t\tif w > maxWidth {\n\t\t\t\tmaxWidth = w\n\t\t\t}\n\t\tcase <-done:\n\t\t\treturn\n\t\t}\n\t}\n\tfor _, s := range column {\n\t\ts.Rx <- maxWidth\n\t}\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/internal/percentage.go",
    "content": "package internal\n\nimport \"math\"\n\n// Percentage is a helper function, to calculate percentage.\nfunc Percentage(total, current, width int64) float64 {\n\tif total == 0 {\n\t\treturn 0\n\t}\n\tif current >= total {\n\t\treturn float64(width)\n\t}\n\treturn float64(width*current) / float64(total)\n}\n\n// PercentageRound same as Percentage but with math.Round.\nfunc PercentageRound(total, current, width int64) float64 {\n\tif total < 0 || current < 0 {\n\t\treturn 0\n\t}\n\treturn math.Round(Percentage(total, current, width))\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/internal/width.go",
    "content": "package internal\n\n// CheckRequestedWidth checks that requested width doesn't overflow\n// available width\nfunc CheckRequestedWidth(requested, available int) int {\n\tif requested < 1 || requested > available {\n\t\treturn available\n\t}\n\treturn requested\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/progress.go",
    "content": "package mpb\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"iter\"\n\t\"math\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/vbauerster/mpb/v8/cwriter\"\n\t\"github.com/vbauerster/mpb/v8/decor\"\n)\n\nconst defaultRefreshRate = 150 * time.Millisecond\nconst defaultHmQueueLength = 64\n\n// ErrDone represents use after `(*Progress).Wait()` error.\nvar ErrDone = fmt.Errorf(\"%T instance can't be reused after %[1]T.Wait()\", (*Progress)(nil))\n\n// Progress represents a container that renders one or more progress bars.\ntype Progress struct {\n\tpwg, bwg     *sync.WaitGroup\n\toperateState chan func(*pState)\n\tinterceptIO  chan func(io.Writer)\n\tdone         <-chan struct{}\n\tctx          context.Context\n\tcancel       func()\n}\n\ntype queueBar struct {\n\tstate *bState\n\tbar   *Bar\n}\n\n// pState holds bars in its priorityQueue, it gets passed to (*Progress).serve monitor goroutine.\ntype pState struct {\n\thm          heapManager\n\trenderReq   chan time.Time\n\tidCount     int\n\tpopPriority int\n\n\t// following are provided/overrode by user\n\thmQueueLen       int\n\treqWidth         int\n\trefreshRate      time.Duration\n\tdelayRC          <-chan struct{}\n\tmanualRC         <-chan interface{}\n\tshutdownNotifier chan interface{}\n\thandOverBarHeap  chan<- []*Bar\n\tqueueBars        map[*Bar]*queueBar\n\toutput           io.Writer\n\tdebugOut         io.Writer\n\tuwg              *sync.WaitGroup\n\tpopCompleted     bool\n\tautoRefresh      bool\n\trmOnComplete     bool\n}\n\n// New creates new Progress container instance. It's not possible to\n// reuse instance after `(*Progress).Wait` method has been called.\nfunc New(options ...ContainerOption) *Progress {\n\treturn NewWithContext(context.Background(), options...)\n}\n\n// NewWithContext creates new Progress container instance with provided\n// context. It's not possible to reuse instance after `(*Progress).Wait`\n// method has been called.\nfunc NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\tctx, cancel := context.WithCancel(ctx)\n\n\ts := &pState{\n\t\thmQueueLen:  defaultHmQueueLength,\n\t\trenderReq:   make(chan time.Time),\n\t\tpopPriority: math.MinInt32,\n\t\trefreshRate: defaultRefreshRate,\n\t\tqueueBars:   make(map[*Bar]*queueBar),\n\t\toutput:      os.Stdout,\n\t\tdebugOut:    io.Discard,\n\t}\n\n\tfor _, opt := range options {\n\t\tif opt != nil {\n\t\t\topt(s)\n\t\t}\n\t}\n\n\tif s.shutdownNotifier == nil {\n\t\ts.shutdownNotifier = make(chan interface{})\n\t}\n\n\ts.hm = make(heapManager, s.hmQueueLen)\n\n\tp := &Progress{\n\t\tpwg:          new(sync.WaitGroup),\n\t\tbwg:          new(sync.WaitGroup),\n\t\toperateState: make(chan func(*pState)),\n\t\tinterceptIO:  make(chan func(io.Writer)),\n\t\tctx:          ctx,\n\t\tcancel:       cancel,\n\t}\n\n\tcw := cwriter.New(s.output)\n\tswitch {\n\tcase s.manualRC != nil:\n\t\tdone := make(chan struct{})\n\t\tp.done = done\n\t\ts.autoRefresh = false\n\t\tgo s.manualRefreshListener(ctx, done)\n\tcase s.autoRefresh || cw.IsTerminal():\n\t\tdone := make(chan struct{})\n\t\tp.done = done\n\t\ts.autoRefresh = true\n\t\tgo s.autoRefreshListener(ctx, done)\n\tdefault:\n\t\tp.done = ctx.Done()\n\t\ts.autoRefresh = false\n\t}\n\n\tp.pwg.Add(2)\n\tgo s.hm.run(p.pwg, s.shutdownNotifier, s.handOverBarHeap)\n\tgo p.serve(s, cw)\n\treturn p\n}\n\n// AddBar creates a bar with default bar filler.\nfunc (p *Progress) AddBar(total int64, options ...BarOption) *Bar {\n\treturn p.New(total, BarStyle(), options...)\n}\n\n// AddSpinner creates a bar with default spinner filler.\nfunc (p *Progress) AddSpinner(total int64, options ...BarOption) *Bar {\n\treturn p.New(total, SpinnerStyle(), options...)\n}\n\n// New creates a bar by calling `Build` method on provided `BarFillerBuilder`.\nfunc (p *Progress) New(total int64, builder BarFillerBuilder, options ...BarOption) *Bar {\n\tif builder == nil {\n\t\treturn p.MustAdd(total, nil, options...)\n\t}\n\treturn p.MustAdd(total, builder.Build(), options...)\n}\n\n// MustAdd creates a bar which renders itself by provided BarFiller.\n// If `total <= 0` triggering complete event by increment methods is\n// disabled. Panics if called after `(*Progress).Wait()`.\nfunc (p *Progress) MustAdd(total int64, filler BarFiller, options ...BarOption) *Bar {\n\tbar, err := p.Add(total, filler, options...)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn bar\n}\n\n// Add creates a bar which renders itself by provided BarFiller.\n// If `total <= 0` triggering complete event by increment methods\n// is disabled. If called after `(*Progress).Wait()` then\n// `(nil, ErrDone)` is returned.\nfunc (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Bar, error) {\n\tif filler == nil {\n\t\tfiller = NopStyle().Build()\n\t} else if f, ok := filler.(BarFillerFunc); ok && f == nil {\n\t\tfiller = NopStyle().Build()\n\t}\n\tch := make(chan *Bar, 1)\n\tselect {\n\tcase p.operateState <- func(ps *pState) {\n\t\tp.bwg.Add(1)\n\t\tbs := ps.makeBarState(total, filler, options...)\n\t\tbar := p.makeBar(bs.priority)\n\t\tif bs.waitBar != nil {\n\t\t\tps.queueBars[bs.waitBar] = &queueBar{bs, bar}\n\t\t} else {\n\t\t\tgo bar.serve(bs)\n\t\t\tps.hm.push(bar, true)\n\t\t}\n\t\tch <- bar\n\t}:\n\t\treturn <-ch, nil\n\tcase <-p.done:\n\t\treturn nil, ErrDone\n\t}\n}\n\nfunc (p *Progress) makeBar(priority int) *Bar {\n\tctx, cancel := context.WithCancel(p.ctx)\n\n\tbar := &Bar{\n\t\tpriority:     priority,\n\t\tframeCh:      make(chan *renderFrame, 1),\n\t\toperateState: make(chan func(*bState)),\n\t\tbsOk:         make(chan struct{}),\n\t\tcontainer:    p,\n\t\tctx:          ctx,\n\t\tcancel:       cancel,\n\t}\n\n\treturn bar\n}\n\n// blocks until iteration is done\nfunc (p *Progress) iterateBars(yield func(*Bar) bool) (ok bool) {\n\tseqCh := make(chan iter.Seq[*Bar], 1)\n\tselect {\n\tcase p.operateState <- func(s *pState) { s.hm.iter(seqCh) }:\n\t\tfor b := range <-seqCh {\n\t\t\tif !yield(b) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\treturn true\n\tcase <-p.done:\n\t\treturn false\n\t}\n}\n\n// UpdateBarPriority either immediately or lazy.\n// With lazy flag order is updated after the next refresh cycle.\n// If you don't care about laziness just use `(*Bar).SetPriority(int)`.\nfunc (p *Progress) UpdateBarPriority(b *Bar, priority int, lazy bool) {\n\tif b == nil {\n\t\treturn\n\t}\n\tselect {\n\tcase p.operateState <- func(s *pState) { s.hm.fix(b, priority, lazy) }:\n\tcase <-p.done:\n\t}\n}\n\n// Write is implementation of io.Writer.\n// Writing to `*Progress` will print lines above a running bar.\n// Writes aren't flushed immediately, but at next refresh cycle.\n// If called after `(*Progress).Wait()` then `(0, ErrDone)` is returned.\nfunc (p *Progress) Write(b []byte) (int, error) {\n\ttype result struct {\n\t\tn   int\n\t\terr error\n\t}\n\tch := make(chan result, 1)\n\tselect {\n\tcase p.interceptIO <- func(w io.Writer) {\n\t\tn, err := w.Write(b)\n\t\tch <- result{n, err}\n\t}:\n\t\tres := <-ch\n\t\treturn res.n, res.err\n\tcase <-p.done:\n\t\treturn 0, ErrDone\n\t}\n}\n\n// Wait waits for all bars to complete and finally shutdowns container. After\n// this method has been called, there is no way to reuse `*Progress` instance.\nfunc (p *Progress) Wait() {\n\tp.bwg.Wait()\n\tp.Shutdown()\n}\n\n// Shutdown cancels any running bar immediately and then shutdowns `*Progress`\n// instance. Normally this method shouldn't be called unless you know what you\n// are doing. Proper way to shutdown is to call `(*Progress).Wait()` instead.\nfunc (p *Progress) Shutdown() {\n\tp.cancel()\n\tp.pwg.Wait()\n}\n\nfunc (p *Progress) serve(s *pState, cw *cwriter.Writer) {\n\tdefer func() {\n\t\tif s.uwg != nil {\n\t\t\ts.uwg.Wait() // wait for user wg\n\t\t}\n\t\tp.bwg.Wait()\n\t\tclose(s.hm)\n\t\tclose(s.shutdownNotifier)\n\t\tp.pwg.Done()\n\t}()\n\n\tvar dw *cwriter.Writer\n\tif s.delayRC != nil {\n\t\tdw = cwriter.New(io.Discard)\n\t} else {\n\t\tdw = cw\n\t}\n\n\tfor {\n\t\tselect {\n\t\tcase <-s.delayRC:\n\t\t\tdw = cw\n\t\t\ts.delayRC = nil\n\t\tcase op := <-p.operateState:\n\t\t\top(s)\n\t\tcase fn := <-p.interceptIO:\n\t\t\tfn(cw)\n\t\tcase <-s.renderReq:\n\t\t\terr := s.render(dw)\n\t\t\tif err != nil {\n\t\t\t\tp.cancel()\n\t\t\t\t// (*pState).(autoRefreshListener|manualRefreshListener) may block\n\t\t\t\t// if not depleting s.renderReq\n\t\t\t\tfor {\n\t\t\t\t\tselect {\n\t\t\t\t\tcase <-s.renderReq:\n\t\t\t\t\tcase <-p.done:\n\t\t\t\t\t\t_, _ = fmt.Fprintln(s.debugOut, err.Error())\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcase <-p.done:\n\t\t\tif s.autoRefresh && s.rmOnComplete {\n\t\t\t\tif err := s.render(cw); err != nil {\n\t\t\t\t\t_, _ = fmt.Fprintln(s.debugOut, err.Error())\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (s *pState) autoRefreshListener(ctx context.Context, done chan struct{}) {\n\tticker := time.NewTicker(s.refreshRate)\n\tdefer ticker.Stop()\n\tfor {\n\t\tselect {\n\t\tcase t := <-ticker.C:\n\t\t\ts.renderReq <- t\n\t\tcase <-ctx.Done():\n\t\t\tclose(done)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (s *pState) manualRefreshListener(ctx context.Context, done chan struct{}) {\n\tfor {\n\t\tselect {\n\t\tcase x := <-s.manualRC:\n\t\t\tif t, ok := x.(time.Time); ok {\n\t\t\t\ts.renderReq <- t\n\t\t\t} else {\n\t\t\t\ts.renderReq <- time.Now()\n\t\t\t}\n\t\tcase <-ctx.Done():\n\t\t\tclose(done)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (s *pState) render(cw *cwriter.Writer) (err error) {\n\ts.hm.sync()\n\n\tvar width, height int\n\tif cw.IsTerminal() {\n\t\twidth, height, err = cw.GetTermSize()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\twidth = cmp.Or(s.reqWidth, 80)\n\t\theight = width\n\t}\n\n\treturn s.flush(cw, height, s.hm.render(width))\n}\n\nfunc (s *pState) flush(cw *cwriter.Writer, height int, seq iter.Seq[*Bar]) error {\n\tvar total, popCount int\n\tvar rows [][]io.Reader\n\n\ts.rmOnComplete = false\n\n\tfor b := range seq {\n\t\tframe := <-b.frameCh\n\t\tif frame.err != nil {\n\t\t\tb.cancel()\n\t\t\ts.hm.push(b, false)\n\t\t\treturn frame.err // b.frameCh is buffered it's ok to return here\n\t\t}\n\t\tvar discarded int\n\t\tfor i := len(frame.rows) - 1; i >= 0; i-- {\n\t\t\tif total < height {\n\t\t\t\ttotal++\n\t\t\t} else {\n\t\t\t\t_, _ = io.Copy(io.Discard, frame.rows[i]) // Found IsInBounds\n\t\t\t\tdiscarded++\n\t\t\t}\n\t\t}\n\t\trows = append(rows, frame.rows)\n\n\t\tswitch frame.shutdown {\n\t\tcase 1:\n\t\t\tif qb, ok := s.queueBars[b]; ok {\n\t\t\t\tdelete(s.queueBars, b)\n\t\t\t\tqb.bar.priority = b.priority\n\t\t\t\tgo qb.bar.serve(qb.state)\n\t\t\t\ts.hm.push(qb.bar, true)\n\t\t\t} else {\n\t\t\t\tswitch {\n\t\t\t\tcase s.popCompleted && !frame.noPop:\n\t\t\t\t\tb.priority = s.popPriority\n\t\t\t\t\ts.popPriority++\n\t\t\t\t\tfallthrough\n\t\t\t\tcase !frame.rmOnComplete:\n\t\t\t\t\ts.hm.push(b, false)\n\t\t\t\t}\n\t\t\t\ts.rmOnComplete = s.rmOnComplete || frame.rmOnComplete\n\t\t\t}\n\t\t\tb.cancel()\n\t\tcase 2:\n\t\t\tif s.popCompleted && !frame.noPop {\n\t\t\t\tpopCount += len(frame.rows) - discarded\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfallthrough\n\t\tdefault:\n\t\t\ts.hm.push(b, false)\n\t\t}\n\t}\n\n\tfor i := len(rows) - 1; i >= 0; i-- {\n\t\tfor _, r := range rows[i] {\n\t\t\t_, err := cw.ReadFrom(r)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn cw.Flush(total - popCount)\n}\n\nfunc (s *pState) makeBarState(total int64, filler BarFiller, options ...BarOption) *bState {\n\tbs := &bState{\n\t\tid:              s.idCount,\n\t\tpriority:        s.idCount,\n\t\treqWidth:        s.reqWidth,\n\t\ttotal:           total,\n\t\tfiller:          filler,\n\t\trenderReq:       s.renderReq,\n\t\ttriggerComplete: total > 0,\n\t\tautoRefresh:     s.autoRefresh,\n\t}\n\n\tbs.extender = func(_ decor.Statistics, rows ...io.Reader) ([]io.Reader, error) {\n\t\treturn rows, nil\n\t}\n\n\tfor _, opt := range options {\n\t\tif opt != nil {\n\t\t\topt(bs)\n\t\t}\n\t}\n\n\tfor _, group := range bs.decorGroups {\n\t\tfor _, d := range group {\n\t\t\tif d, ok := unwrap(d).(decor.EwmaDecorator); ok {\n\t\t\t\tbs.ewmaDecorators = append(bs.ewmaDecorators, d)\n\t\t\t}\n\t\t}\n\t}\n\n\tbs.buffers[0] = bytes.NewBuffer(make([]byte, 0, 256)) // filler\n\tbs.buffers[1] = bytes.NewBuffer(make([]byte, 0, 128)) // prepend\n\tbs.buffers[2] = bytes.NewBuffer(make([]byte, 0, 128)) // append\n\n\ts.idCount++\n\treturn bs\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/proxyreader.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\t\"time\"\n)\n\ntype proxyReader struct {\n\tio.ReadCloser\n\tbar *Bar\n}\n\nfunc (x proxyReader) Read(p []byte) (int, error) {\n\tn, err := x.ReadCloser.Read(p)\n\tx.bar.IncrBy(n)\n\treturn n, err\n}\n\ntype proxyWriterTo struct {\n\tproxyReader\n}\n\nfunc (x proxyWriterTo) WriteTo(w io.Writer) (int64, error) {\n\tn, err := x.ReadCloser.(io.WriterTo).WriteTo(w)\n\tx.bar.IncrInt64(n)\n\treturn n, err\n}\n\ntype ewmaProxyReader struct {\n\tio.ReadCloser\n\tbar *Bar\n}\n\nfunc (x ewmaProxyReader) Read(p []byte) (int, error) {\n\tstart := time.Now()\n\tn, err := x.ReadCloser.Read(p)\n\tx.bar.EwmaIncrBy(n, time.Since(start))\n\treturn n, err\n}\n\ntype ewmaProxyWriterTo struct {\n\tewmaProxyReader\n}\n\nfunc (x ewmaProxyWriterTo) WriteTo(w io.Writer) (int64, error) {\n\tstart := time.Now()\n\tn, err := x.ReadCloser.(io.WriterTo).WriteTo(w)\n\tx.bar.EwmaIncrInt64(n, time.Since(start))\n\treturn n, err\n}\n\nfunc newProxyReader(r io.Reader, b *Bar, hasEwma bool) io.ReadCloser {\n\trc := toReadCloser(r)\n\tif hasEwma {\n\t\tepr := ewmaProxyReader{rc, b}\n\t\tif _, ok := r.(io.WriterTo); ok {\n\t\t\treturn ewmaProxyWriterTo{epr}\n\t\t}\n\t\treturn epr\n\t}\n\tpr := proxyReader{rc, b}\n\tif _, ok := r.(io.WriterTo); ok {\n\t\treturn proxyWriterTo{pr}\n\t}\n\treturn pr\n}\n\nfunc toReadCloser(r io.Reader) io.ReadCloser {\n\tif rc, ok := r.(io.ReadCloser); ok {\n\t\treturn rc\n\t}\n\treturn io.NopCloser(r)\n}\n"
  },
  {
    "path": "vendor/github.com/vbauerster/mpb/v8/proxywriter.go",
    "content": "package mpb\n\nimport (\n\t\"io\"\n\t\"time\"\n)\n\ntype proxyWriter struct {\n\tio.WriteCloser\n\tbar *Bar\n}\n\nfunc (x proxyWriter) Write(p []byte) (int, error) {\n\tn, err := x.WriteCloser.Write(p)\n\tx.bar.IncrBy(n)\n\treturn n, err\n}\n\ntype proxyReaderFrom struct {\n\tproxyWriter\n}\n\nfunc (x proxyReaderFrom) ReadFrom(r io.Reader) (int64, error) {\n\tn, err := x.WriteCloser.(io.ReaderFrom).ReadFrom(r)\n\tx.bar.IncrInt64(n)\n\treturn n, err\n}\n\ntype ewmaProxyWriter struct {\n\tio.WriteCloser\n\tbar *Bar\n}\n\nfunc (x ewmaProxyWriter) Write(p []byte) (int, error) {\n\tstart := time.Now()\n\tn, err := x.WriteCloser.Write(p)\n\tx.bar.EwmaIncrBy(n, time.Since(start))\n\treturn n, err\n}\n\ntype ewmaProxyReaderFrom struct {\n\tewmaProxyWriter\n}\n\nfunc (x ewmaProxyReaderFrom) ReadFrom(r io.Reader) (int64, error) {\n\tstart := time.Now()\n\tn, err := x.WriteCloser.(io.ReaderFrom).ReadFrom(r)\n\tx.bar.EwmaIncrInt64(n, time.Since(start))\n\treturn n, err\n}\n\nfunc newProxyWriter(w io.Writer, b *Bar, hasEwma bool) io.WriteCloser {\n\twc := toWriteCloser(w)\n\tif hasEwma {\n\t\tepw := ewmaProxyWriter{wc, b}\n\t\tif _, ok := w.(io.ReaderFrom); ok {\n\t\t\treturn ewmaProxyReaderFrom{epw}\n\t\t}\n\t\treturn epw\n\t}\n\tpw := proxyWriter{wc, b}\n\tif _, ok := w.(io.ReaderFrom); ok {\n\t\treturn proxyReaderFrom{pw}\n\t}\n\treturn pw\n}\n\nfunc toWriteCloser(w io.Writer) io.WriteCloser {\n\tif wc, ok := w.(io.WriteCloser); ok {\n\t\treturn wc\n\t}\n\treturn toNopWriteCloser(w)\n}\n\nfunc toNopWriteCloser(w io.Writer) io.WriteCloser {\n\tif _, ok := w.(io.ReaderFrom); ok {\n\t\treturn nopWriteCloserReaderFrom{w}\n\t}\n\treturn nopWriteCloser{w}\n}\n\ntype nopWriteCloser struct {\n\tio.Writer\n}\n\nfunc (nopWriteCloser) Close() error { return nil }\n\ntype nopWriteCloserReaderFrom struct {\n\tio.Writer\n}\n\nfunc (nopWriteCloserReaderFrom) Close() error { return nil }\n\nfunc (c nopWriteCloserReaderFrom) ReadFrom(r io.Reader) (int64, error) {\n\treturn c.Writer.(io.ReaderFrom).ReadFrom(r)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md",
    "content": "# Contributing to go.opentelemetry.io/auto/sdk\n\nThe `go.opentelemetry.io/auto/sdk` module is a purpose built OpenTelemetry SDK.\nIt is designed to be:\n\n0. An OpenTelemetry compliant SDK\n1. Instrumented by auto-instrumentation (serializable into OTLP JSON)\n2. Lightweight\n3. User-friendly\n\nThese design choices are listed in the order of their importance.\n\nThe primary design goal of this module is to be an OpenTelemetry SDK.\nThis means that it needs to implement the Go APIs found in `go.opentelemetry.io/otel`.\n\nHaving met the requirement of SDK compliance, this module needs to provide code that the `go.opentelemetry.io/auto` module can instrument.\nThe chosen approach to meet this goal is to ensure the telemetry from the SDK is serializable into JSON encoded OTLP.\nThis ensures then that the serialized form is compatible with other OpenTelemetry systems, and the auto-instrumentation can use these systems to deserialize any telemetry it is sent.\n\nOutside of these first two goals, the intended use becomes relevant.\nThis package is intended to be used in the `go.opentelemetry.io/otel` global API as a default when the auto-instrumentation is running.\nBecause of this, this package needs to not add unnecessary dependencies to that API.\nIdeally, it adds none.\nIt also needs to operate efficiently.\n\nFinally, this module is designed to be user-friendly to Go development.\nIt hides complexity in order to provide simpler APIs when the previous goals can all still be met.\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/LICENSE",
    "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": "vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md",
    "content": "# Versioning\n\nThis document describes the versioning policy for this module.\nThis policy is designed so the following goals can be achieved.\n\n**Users are provided a codebase of value that is stable and secure.**\n\n## Policy\n\n* Versioning of this module will be idiomatic of a Go project using [Go modules](https://github.com/golang/go/wiki/Modules).\n  * [Semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) will be used.\n    * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).\n    * Any `v2` or higher version of this module will be included as a `/vN` at the end of the module path used in `go.mod` files and in the package import path.\n\n* GitHub releases will be made for all releases.\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage sdk provides an auto-instrumentable OpenTelemetry SDK.\n\nAn [go.opentelemetry.io/auto.Instrumentation] can be configured to target the\nprocess running this SDK. In that case, all telemetry the SDK produces will be\nprocessed and handled by that [go.opentelemetry.io/auto.Instrumentation].\n\nBy default, if there is no [go.opentelemetry.io/auto.Instrumentation] set to\nauto-instrument the SDK, the SDK will not generate any telemetry.\n*/\npackage sdk\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\n// Attr is a key-value pair.\ntype Attr struct {\n\tKey   string `json:\"key,omitempty\"`\n\tValue Value  `json:\"value,omitempty\"`\n}\n\n// String returns an Attr for a string value.\nfunc String(key, value string) Attr {\n\treturn Attr{key, StringValue(value)}\n}\n\n// Int64 returns an Attr for an int64 value.\nfunc Int64(key string, value int64) Attr {\n\treturn Attr{key, Int64Value(value)}\n}\n\n// Int returns an Attr for an int value.\nfunc Int(key string, value int) Attr {\n\treturn Int64(key, int64(value))\n}\n\n// Float64 returns an Attr for a float64 value.\nfunc Float64(key string, value float64) Attr {\n\treturn Attr{key, Float64Value(value)}\n}\n\n// Bool returns an Attr for a bool value.\nfunc Bool(key string, value bool) Attr {\n\treturn Attr{key, BoolValue(value)}\n}\n\n// Bytes returns an Attr for a []byte value.\n// The passed slice must not be changed after it is passed.\nfunc Bytes(key string, value []byte) Attr {\n\treturn Attr{key, BytesValue(value)}\n}\n\n// Slice returns an Attr for a []Value value.\n// The passed slice must not be changed after it is passed.\nfunc Slice(key string, value ...Value) Attr {\n\treturn Attr{key, SliceValue(value...)}\n}\n\n// Map returns an Attr for a map value.\n// The passed slice must not be changed after it is passed.\nfunc Map(key string, value ...Attr) Attr {\n\treturn Attr{key, MapValue(value...)}\n}\n\n// Equal returns if a is equal to b.\nfunc (a Attr) Equal(b Attr) bool {\n\treturn a.Key == b.Key && a.Value.Equal(b.Value)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage telemetry provides a lightweight representations of OpenTelemetry\ntelemetry that is compatible with the OTLP JSON protobuf encoding.\n*/\npackage telemetry\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n)\n\nconst (\n\ttraceIDSize = 16\n\tspanIDSize  = 8\n)\n\n// TraceID is a custom data type that is used for all trace IDs.\ntype TraceID [traceIDSize]byte\n\n// String returns the hex string representation form of a TraceID.\nfunc (tid TraceID) String() string {\n\treturn hex.EncodeToString(tid[:])\n}\n\n// IsEmpty returns false if id contains at least one non-zero byte.\nfunc (tid TraceID) IsEmpty() bool {\n\treturn tid == [traceIDSize]byte{}\n}\n\n// MarshalJSON converts the trace ID into a hex string enclosed in quotes.\nfunc (tid TraceID) MarshalJSON() ([]byte, error) {\n\tif tid.IsEmpty() {\n\t\treturn []byte(`\"\"`), nil\n\t}\n\treturn marshalJSON(tid[:])\n}\n\n// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in\n// quotes.\nfunc (tid *TraceID) UnmarshalJSON(data []byte) error {\n\t*tid = [traceIDSize]byte{}\n\treturn unmarshalJSON(tid[:], data)\n}\n\n// SpanID is a custom data type that is used for all span IDs.\ntype SpanID [spanIDSize]byte\n\n// String returns the hex string representation form of a SpanID.\nfunc (sid SpanID) String() string {\n\treturn hex.EncodeToString(sid[:])\n}\n\n// IsEmpty returns true if the span ID contains at least one non-zero byte.\nfunc (sid SpanID) IsEmpty() bool {\n\treturn sid == [spanIDSize]byte{}\n}\n\n// MarshalJSON converts span ID into a hex string enclosed in quotes.\nfunc (sid SpanID) MarshalJSON() ([]byte, error) {\n\tif sid.IsEmpty() {\n\t\treturn []byte(`\"\"`), nil\n\t}\n\treturn marshalJSON(sid[:])\n}\n\n// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes.\nfunc (sid *SpanID) UnmarshalJSON(data []byte) error {\n\t*sid = [spanIDSize]byte{}\n\treturn unmarshalJSON(sid[:], data)\n}\n\n// marshalJSON converts id into a hex string enclosed in quotes.\nfunc marshalJSON(id []byte) ([]byte, error) {\n\t// Plus 2 quote chars at the start and end.\n\thexLen := hex.EncodedLen(len(id)) + 2\n\n\tb := make([]byte, hexLen)\n\thex.Encode(b[1:hexLen-1], id)\n\tb[0], b[hexLen-1] = '\"', '\"'\n\n\treturn b, nil\n}\n\n// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes.\nfunc unmarshalJSON(dst, src []byte) error {\n\tif l := len(src); l >= 2 && src[0] == '\"' && src[l-1] == '\"' {\n\t\tsrc = src[1 : l-1]\n\t}\n\tnLen := len(src)\n\tif nLen == 0 {\n\t\treturn nil\n\t}\n\n\tif len(dst) != hex.DecodedLen(nLen) {\n\t\treturn errors.New(\"invalid length for ID\")\n\t}\n\n\t_, err := hex.Decode(dst, src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot unmarshal ID from string '%s': %w\", string(src), err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"encoding/json\"\n\t\"strconv\"\n)\n\n// protoInt64 represents the protobuf encoding of integers which can be either\n// strings or integers.\ntype protoInt64 int64\n\n// Int64 returns the protoInt64 as an int64.\nfunc (i *protoInt64) Int64() int64 { return int64(*i) }\n\n// UnmarshalJSON decodes both strings and integers.\nfunc (i *protoInt64) UnmarshalJSON(data []byte) error {\n\tif data[0] == '\"' {\n\t\tvar str string\n\t\tif err := json.Unmarshal(data, &str); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparsedInt, err := strconv.ParseInt(str, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoInt64(parsedInt)\n\t} else {\n\t\tvar parsedInt int64\n\t\tif err := json.Unmarshal(data, &parsedInt); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoInt64(parsedInt)\n\t}\n\treturn nil\n}\n\n// protoUint64 represents the protobuf encoding of integers which can be either\n// strings or integers.\ntype protoUint64 uint64\n\n// Uint64 returns the protoUint64 as a uint64.\nfunc (i *protoUint64) Uint64() uint64 { return uint64(*i) }\n\n// UnmarshalJSON decodes both strings and integers.\nfunc (i *protoUint64) UnmarshalJSON(data []byte) error {\n\tif data[0] == '\"' {\n\t\tvar str string\n\t\tif err := json.Unmarshal(data, &str); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparsedUint, err := strconv.ParseUint(str, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoUint64(parsedUint)\n\t} else {\n\t\tvar parsedUint uint64\n\t\tif err := json.Unmarshal(data, &parsedUint); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoUint64(parsedUint)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Resource information.\ntype Resource struct {\n\t// Attrs are the set of attributes that describe the resource. Attribute\n\t// keys MUST be unique (it is not allowed to have more than one attribute\n\t// with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// DroppedAttrs is the number of dropped attributes. If the value\n\t// is 0, then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.\nfunc (r *Resource) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Resource type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Resource field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&r.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&r.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Scope is the identifying values of the instrumentation scope.\ntype Scope struct {\n\tName         string `json:\"name,omitempty\"`\n\tVersion      string `json:\"version,omitempty\"`\n\tAttrs        []Attr `json:\"attributes,omitempty\"`\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.\nfunc (s *Scope) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Scope type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Scope field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&s.Name)\n\t\tcase \"version\":\n\t\t\terr = decoder.Decode(&s.Version)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&s.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&s.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"time\"\n)\n\n// A Span represents a single operation performed by a single component of the\n// system.\ntype Span struct {\n\t// A unique identifier for a trace. All spans from the same trace share\n\t// the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n\t// of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n\t// is zero-length and thus is also invalid).\n\t//\n\t// This field is required.\n\tTraceID TraceID `json:\"traceId,omitempty\"`\n\t// A unique identifier for a span within a trace, assigned when the span\n\t// is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n\t// other than 8 bytes is considered invalid (empty string in OTLP/JSON\n\t// is zero-length and thus is also invalid).\n\t//\n\t// This field is required.\n\tSpanID SpanID `json:\"spanId,omitempty\"`\n\t// trace_state conveys information about request position in multiple distributed tracing graphs.\n\t// It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header\n\t// See also https://github.com/w3c/distributed-tracing for more details about this field.\n\tTraceState string `json:\"traceState,omitempty\"`\n\t// The `span_id` of this span's parent span. If this is a root span, then this\n\t// field must be empty. The ID is an 8-byte array.\n\tParentSpanID SpanID `json:\"parentSpanId,omitempty\"`\n\t// Flags, a bit field.\n\t//\n\t// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n\t// Context specification. To read the 8-bit W3C trace flag, use\n\t// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n\t//\n\t// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n\t//\n\t// Bits 8 and 9 represent the 3 states of whether a span's parent\n\t// is remote. The states are (unknown, is not remote, is remote).\n\t// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n\t// To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n\t//\n\t// When creating span messages, if the message is logically forwarded from another source\n\t// with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD\n\t// be copied as-is. If creating from a source that does not have an equivalent flags field\n\t// (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST\n\t// be set to zero.\n\t// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n\t//\n\t// [Optional].\n\tFlags uint32 `json:\"flags,omitempty\"`\n\t// A description of the span's operation.\n\t//\n\t// For example, the name can be a qualified method name or a file name\n\t// and a line number where the operation is called. A best practice is to use\n\t// the same display name at the same call point in an application.\n\t// This makes it easier to correlate spans in different traces.\n\t//\n\t// This field is semantically required to be set to non-empty string.\n\t// Empty value is equivalent to an unknown span name.\n\t//\n\t// This field is required.\n\tName string `json:\"name\"`\n\t// Distinguishes between spans generated in a particular context. For example,\n\t// two spans with the same name may be distinguished using `CLIENT` (caller)\n\t// and `SERVER` (callee) to identify queueing latency associated with the span.\n\tKind SpanKind `json:\"kind,omitempty\"`\n\t// start_time_unix_nano is the start time of the span. On the client side, this is the time\n\t// kept by the local machine where the span execution starts. On the server side, this\n\t// is the time when the server's application handler starts running.\n\t// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\t//\n\t// This field is semantically required and it is expected that end_time >= start_time.\n\tStartTime time.Time `json:\"startTimeUnixNano,omitempty\"`\n\t// end_time_unix_nano is the end time of the span. On the client side, this is the time\n\t// kept by the local machine where the span execution ends. On the server side, this\n\t// is the time when the server application handler stops running.\n\t// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\t//\n\t// This field is semantically required and it is expected that end_time >= start_time.\n\tEndTime time.Time `json:\"endTimeUnixNano,omitempty\"`\n\t// attributes is a collection of key/value pairs. Note, global attributes\n\t// like server name can be set using the resource API. Examples of attributes:\n\t//\n\t//     \"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n\t//     \"/http/server_latency\": 300\n\t//     \"example.com/myattribute\": true\n\t//     \"example.com/score\": 10.239\n\t//\n\t// The OpenTelemetry API specification further restricts the allowed value types:\n\t// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of attributes that were discarded. Attributes\n\t// can be discarded because their keys are too long or because there are too many\n\t// attributes. If this value is 0, then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n\t// events is a collection of Event items.\n\tEvents []*SpanEvent `json:\"events,omitempty\"`\n\t// dropped_events_count is the number of dropped events. If the value is 0, then no\n\t// events were dropped.\n\tDroppedEvents uint32 `json:\"droppedEventsCount,omitempty\"`\n\t// links is a collection of Links, which are references from this span to a span\n\t// in the same or different trace.\n\tLinks []*SpanLink `json:\"links,omitempty\"`\n\t// dropped_links_count is the number of dropped links after the maximum size was\n\t// enforced. If this value is 0, then no links were dropped.\n\tDroppedLinks uint32 `json:\"droppedLinksCount,omitempty\"`\n\t// An optional final status for this span. Semantically when Status isn't set, it means\n\t// span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).\n\tStatus *Status `json:\"status,omitempty\"`\n}\n\n// MarshalJSON encodes s into OTLP formatted JSON.\nfunc (s Span) MarshalJSON() ([]byte, error) {\n\tstartT := s.StartTime.UnixNano()\n\tif s.StartTime.IsZero() || startT < 0 {\n\t\tstartT = 0\n\t}\n\n\tendT := s.EndTime.UnixNano()\n\tif s.EndTime.IsZero() || endT < 0 {\n\t\tendT = 0\n\t}\n\n\t// Override non-empty default SpanID marshal and omitempty.\n\tvar parentSpanId string\n\tif !s.ParentSpanID.IsEmpty() {\n\t\tb := make([]byte, hex.EncodedLen(spanIDSize))\n\t\thex.Encode(b, s.ParentSpanID[:])\n\t\tparentSpanId = string(b)\n\t}\n\n\ttype Alias Span\n\treturn json.Marshal(struct {\n\t\tAlias\n\t\tParentSpanID string `json:\"parentSpanId,omitempty\"`\n\t\tStartTime    uint64 `json:\"startTimeUnixNano,omitempty\"`\n\t\tEndTime      uint64 `json:\"endTimeUnixNano,omitempty\"`\n\t}{\n\t\tAlias:        Alias(s),\n\t\tParentSpanID: parentSpanId,\n\t\tStartTime:    uint64(startT), // nolint:gosec  // >0 checked above.\n\t\tEndTime:      uint64(endT),   // nolint:gosec  // >0 checked above.\n\t})\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into s.\nfunc (s *Span) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Span type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Span field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"traceId\", \"trace_id\":\n\t\t\terr = decoder.Decode(&s.TraceID)\n\t\tcase \"spanId\", \"span_id\":\n\t\t\terr = decoder.Decode(&s.SpanID)\n\t\tcase \"traceState\", \"trace_state\":\n\t\t\terr = decoder.Decode(&s.TraceState)\n\t\tcase \"parentSpanId\", \"parent_span_id\":\n\t\t\terr = decoder.Decode(&s.ParentSpanID)\n\t\tcase \"flags\":\n\t\t\terr = decoder.Decode(&s.Flags)\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&s.Name)\n\t\tcase \"kind\":\n\t\t\terr = decoder.Decode(&s.Kind)\n\t\tcase \"startTimeUnixNano\", \"start_time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec  // Overflow checked.\n\t\t\ts.StartTime = time.Unix(0, v)\n\t\tcase \"endTimeUnixNano\", \"end_time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec  // Overflow checked.\n\t\t\ts.EndTime = time.Unix(0, v)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&s.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&s.DroppedAttrs)\n\t\tcase \"events\":\n\t\t\terr = decoder.Decode(&s.Events)\n\t\tcase \"droppedEventsCount\", \"dropped_events_count\":\n\t\t\terr = decoder.Decode(&s.DroppedEvents)\n\t\tcase \"links\":\n\t\t\terr = decoder.Decode(&s.Links)\n\t\tcase \"droppedLinksCount\", \"dropped_links_count\":\n\t\t\terr = decoder.Decode(&s.DroppedLinks)\n\t\tcase \"status\":\n\t\t\terr = decoder.Decode(&s.Status)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SpanFlags represents constants used to interpret the\n// Span.flags field, which is protobuf 'fixed32' type and is to\n// be used as bit-fields. Each non-zero value defined in this enum is\n// a bit-mask.  To extract the bit-field, for example, use an\n// expression like:\n//\n//\t(span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)\n//\n// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n//\n// Note that Span flags were introduced in version 1.1 of the\n// OpenTelemetry protocol.  Older Span producers do not set this\n// field, consequently consumers should not rely on the absence of a\n// particular flag bit to indicate the presence of a particular feature.\ntype SpanFlags int32\n\nconst (\n\t// SpanFlagsTraceFlagsMask is a mask for trace-flags.\n\t//\n\t// Bits 0-7 are used for trace flags.\n\tSpanFlagsTraceFlagsMask SpanFlags = 255\n\t// SpanFlagsContextHasIsRemoteMask is a mask for HAS_IS_REMOTE status.\n\t//\n\t// Bits 8 and 9 are used to indicate that the parent span or link span is\n\t// remote. Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.\n\tSpanFlagsContextHasIsRemoteMask SpanFlags = 256\n\t// SpanFlagsContextIsRemoteMask is a mask for IS_REMOTE status.\n\t//\n\t// Bits 8 and 9 are used to indicate that the parent span or link span is\n\t// remote. Bit 9 (`IS_REMOTE`) indicates whether the span or link is\n\t// remote.\n\tSpanFlagsContextIsRemoteMask SpanFlags = 512\n)\n\n// SpanKind is the type of span. Can be used to specify additional relationships between spans\n// in addition to a parent/child relationship.\ntype SpanKind int32\n\nconst (\n\t// SpanKindInternal indicates that the span represents an internal\n\t// operation within an application, as opposed to an operation happening at\n\t// the boundaries.\n\tSpanKindInternal SpanKind = 1\n\t// SpanKindServer indicates that the span covers server-side handling of an\n\t// RPC or other remote network request.\n\tSpanKindServer SpanKind = 2\n\t// SpanKindClient indicates that the span describes a request to some\n\t// remote service.\n\tSpanKindClient SpanKind = 3\n\t// SpanKindProducer indicates that the span describes a producer sending a\n\t// message to a broker. Unlike SpanKindClient and SpanKindServer, there is\n\t// often no direct critical path latency relationship between producer and\n\t// consumer spans. A SpanKindProducer span ends when the message was\n\t// accepted by the broker while the logical processing of the message might\n\t// span a much longer time.\n\tSpanKindProducer SpanKind = 4\n\t// SpanKindConsumer indicates that the span describes a consumer receiving\n\t// a message from a broker. Like SpanKindProducer, there is often no direct\n\t// critical path latency relationship between producer and consumer spans.\n\tSpanKindConsumer SpanKind = 5\n)\n\n// SpanEvent is a time-stamped annotation of the span, consisting of user-supplied\n// text description and key-value pairs.\ntype SpanEvent struct {\n\t// time_unix_nano is the time the event occurred.\n\tTime time.Time `json:\"timeUnixNano,omitempty\"`\n\t// name of the event.\n\t// This field is semantically required to be set to non-empty string.\n\tName string `json:\"name,omitempty\"`\n\t// attributes is a collection of attribute key/value pairs on the event.\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of dropped attributes. If the value is 0,\n\t// then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// MarshalJSON encodes e into OTLP formatted JSON.\nfunc (e SpanEvent) MarshalJSON() ([]byte, error) {\n\tt := e.Time.UnixNano()\n\tif e.Time.IsZero() || t < 0 {\n\t\tt = 0\n\t}\n\n\ttype Alias SpanEvent\n\treturn json.Marshal(struct {\n\t\tAlias\n\t\tTime uint64 `json:\"timeUnixNano,omitempty\"`\n\t}{\n\t\tAlias: Alias(e),\n\t\tTime:  uint64(t), //nolint:gosec  // >0 checked above\n\t})\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into se.\nfunc (se *SpanEvent) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid SpanEvent type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid SpanEvent field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"timeUnixNano\", \"time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec  // Overflow checked.\n\t\t\tse.Time = time.Unix(0, v)\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&se.Name)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&se.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&se.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SpanLink is a reference from the current span to another span in the same\n// trace or in a different trace. For example, this can be used in batching\n// operations, where a single batch handler processes multiple requests from\n// different traces or when the handler receives a request from a different\n// project.\ntype SpanLink struct {\n\t// A unique identifier of a trace that this linked span is part of. The ID is a\n\t// 16-byte array.\n\tTraceID TraceID `json:\"traceId,omitempty\"`\n\t// A unique identifier for the linked span. The ID is an 8-byte array.\n\tSpanID SpanID `json:\"spanId,omitempty\"`\n\t// The trace_state associated with the link.\n\tTraceState string `json:\"traceState,omitempty\"`\n\t// attributes is a collection of attribute key/value pairs on the link.\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of dropped attributes. If the value is 0,\n\t// then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n\t// Flags, a bit field.\n\t//\n\t// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n\t// Context specification. To read the 8-bit W3C trace flag, use\n\t// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n\t//\n\t// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n\t//\n\t// Bits 8 and 9 represent the 3 states of whether the link is remote.\n\t// The states are (unknown, is not remote, is remote).\n\t// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n\t// To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n\t//\n\t// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n\t// When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.\n\t//\n\t// [Optional].\n\tFlags uint32 `json:\"flags,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into sl.\nfunc (sl *SpanLink) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid SpanLink type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid SpanLink field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"traceId\", \"trace_id\":\n\t\t\terr = decoder.Decode(&sl.TraceID)\n\t\tcase \"spanId\", \"span_id\":\n\t\t\terr = decoder.Decode(&sl.SpanID)\n\t\tcase \"traceState\", \"trace_state\":\n\t\t\terr = decoder.Decode(&sl.TraceState)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&sl.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&sl.DroppedAttrs)\n\t\tcase \"flags\":\n\t\t\terr = decoder.Decode(&sl.Flags)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\n// StatusCode is the status of a Span.\n//\n// For the semantics of status codes see\n// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status\ntype StatusCode int32\n\nconst (\n\t// StatusCodeUnset is the default status.\n\tStatusCodeUnset StatusCode = 0\n\t// StatusCodeOK is used when the Span has been validated by an Application\n\t// developer or Operator to have completed successfully.\n\tStatusCodeOK StatusCode = 1\n\t// StatusCodeError is used when the Span contains an error.\n\tStatusCodeError StatusCode = 2\n)\n\nvar statusCodeStrings = []string{\n\t\"Unset\",\n\t\"OK\",\n\t\"Error\",\n}\n\nfunc (s StatusCode) String() string {\n\tif s >= 0 && int(s) < len(statusCodeStrings) {\n\t\treturn statusCodeStrings[s]\n\t}\n\treturn \"<unknown telemetry.StatusCode>\"\n}\n\n// The Status type defines a logical error model that is suitable for different\n// programming environments, including REST APIs and RPC APIs.\ntype Status struct {\n\t// A developer-facing human readable error message.\n\tMessage string `json:\"message,omitempty\"`\n\t// The status code.\n\tCode StatusCode `json:\"code,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Traces represents the traces data that can be stored in a persistent storage,\n// OR can be embedded by other protocols that transfer OTLP traces data but do\n// not implement the OTLP protocol.\n//\n// The main difference between this message and collector protocol is that\n// in this message there will not be any \"control\" or \"metadata\" specific to\n// OTLP protocol.\n//\n// When new fields are added into this message, the OTLP request MUST be updated\n// as well.\ntype Traces struct {\n\t// An array of ResourceSpans.\n\t// For data coming from a single resource this array will typically contain\n\t// one element. Intermediary nodes that receive data from multiple origins\n\t// typically batch the data before forwarding further and in that case this\n\t// array will contain multiple elements.\n\tResourceSpans []*ResourceSpans `json:\"resourceSpans,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into td.\nfunc (td *Traces) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid TracesData type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid TracesData field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"resourceSpans\", \"resource_spans\":\n\t\t\terr = decoder.Decode(&td.ResourceSpans)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ResourceSpans is a collection of ScopeSpans from a Resource.\ntype ResourceSpans struct {\n\t// The resource for the spans in this message.\n\t// If this field is not set then no resource info is known.\n\tResource Resource `json:\"resource\"`\n\t// A list of ScopeSpans that originate from a resource.\n\tScopeSpans []*ScopeSpans `json:\"scopeSpans,omitempty\"`\n\t// This schema_url applies to the data in the \"resource\" field. It does not apply\n\t// to the data in the \"scope_spans\" field which have their own schema_url field.\n\tSchemaURL string `json:\"schemaUrl,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into rs.\nfunc (rs *ResourceSpans) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid ResourceSpans type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid ResourceSpans field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"resource\":\n\t\t\terr = decoder.Decode(&rs.Resource)\n\t\tcase \"scopeSpans\", \"scope_spans\":\n\t\t\terr = decoder.Decode(&rs.ScopeSpans)\n\t\tcase \"schemaUrl\", \"schema_url\":\n\t\t\terr = decoder.Decode(&rs.SchemaURL)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ScopeSpans is a collection of Spans produced by an InstrumentationScope.\ntype ScopeSpans struct {\n\t// The instrumentation scope information for the spans in this message.\n\t// Semantically when InstrumentationScope isn't set, it is equivalent with\n\t// an empty instrumentation scope name (unknown).\n\tScope *Scope `json:\"scope\"`\n\t// A list of Spans that originate from an instrumentation scope.\n\tSpans []*Span `json:\"spans,omitempty\"`\n\t// The Schema URL, if known. This is the identifier of the Schema that the span data\n\t// is recorded in. To learn more about Schema URL see\n\t// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n\t// This schema_url applies to all spans and span events in the \"spans\" field.\n\tSchemaURL string `json:\"schemaUrl,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into ss.\nfunc (ss *ScopeSpans) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid ScopeSpans type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid ScopeSpans field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"scope\":\n\t\t\terr = decoder.Decode(&ss.Scope)\n\t\tcase \"spans\":\n\t\t\terr = decoder.Decode(&ss.Spans)\n\t\tcase \"schemaUrl\", \"schema_url\":\n\t\t\terr = decoder.Decode(&ss.SchemaURL)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"slices\"\n\t\"strconv\"\n\t\"unsafe\"\n)\n\n// A Value represents a structured value.\n// A zero value is valid and represents an empty value.\ntype Value struct {\n\t// Ensure forward compatibility by explicitly making this not comparable.\n\tnoCmp [0]func() //nolint:unused  // This is indeed used.\n\n\t// num holds the value for Int64, Float64, and Bool. It holds the length\n\t// for String, Bytes, Slice, Map.\n\tnum uint64\n\t// any holds either the KindBool, KindInt64, KindFloat64, stringptr,\n\t// bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64\n\t// then the value of Value is in num as described above. Otherwise, it\n\t// contains the value wrapped in the appropriate type.\n\tany any\n}\n\ntype (\n\t// sliceptr represents a value in Value.any for KindString Values.\n\tstringptr *byte\n\t// bytesptr represents a value in Value.any for KindBytes Values.\n\tbytesptr *byte\n\t// sliceptr represents a value in Value.any for KindSlice Values.\n\tsliceptr *Value\n\t// mapptr represents a value in Value.any for KindMap Values.\n\tmapptr *Attr\n)\n\n// ValueKind is the kind of a [Value].\ntype ValueKind int\n\n// ValueKind values.\nconst (\n\tValueKindEmpty ValueKind = iota\n\tValueKindBool\n\tValueKindFloat64\n\tValueKindInt64\n\tValueKindString\n\tValueKindBytes\n\tValueKindSlice\n\tValueKindMap\n)\n\nvar valueKindStrings = []string{\n\t\"Empty\",\n\t\"Bool\",\n\t\"Float64\",\n\t\"Int64\",\n\t\"String\",\n\t\"Bytes\",\n\t\"Slice\",\n\t\"Map\",\n}\n\nfunc (k ValueKind) String() string {\n\tif k >= 0 && int(k) < len(valueKindStrings) {\n\t\treturn valueKindStrings[k]\n\t}\n\treturn \"<unknown telemetry.ValueKind>\"\n}\n\n// StringValue returns a new [Value] for a string.\nfunc StringValue(v string) Value {\n\treturn Value{\n\t\tnum: uint64(len(v)),\n\t\tany: stringptr(unsafe.StringData(v)),\n\t}\n}\n\n// IntValue returns a [Value] for an int.\nfunc IntValue(v int) Value { return Int64Value(int64(v)) }\n\n// Int64Value returns a [Value] for an int64.\nfunc Int64Value(v int64) Value {\n\treturn Value{num: uint64(v), any: ValueKindInt64} //nolint:gosec  // Raw value conv.\n}\n\n// Float64Value returns a [Value] for a float64.\nfunc Float64Value(v float64) Value {\n\treturn Value{num: math.Float64bits(v), any: ValueKindFloat64}\n}\n\n// BoolValue returns a [Value] for a bool.\nfunc BoolValue(v bool) Value { //nolint:revive // Not a control flag.\n\tvar n uint64\n\tif v {\n\t\tn = 1\n\t}\n\treturn Value{num: n, any: ValueKindBool}\n}\n\n// BytesValue returns a [Value] for a byte slice. The passed slice must not be\n// changed after it is passed.\nfunc BytesValue(v []byte) Value {\n\treturn Value{\n\t\tnum: uint64(len(v)),\n\t\tany: bytesptr(unsafe.SliceData(v)),\n\t}\n}\n\n// SliceValue returns a [Value] for a slice of [Value]. The passed slice must\n// not be changed after it is passed.\nfunc SliceValue(vs ...Value) Value {\n\treturn Value{\n\t\tnum: uint64(len(vs)),\n\t\tany: sliceptr(unsafe.SliceData(vs)),\n\t}\n}\n\n// MapValue returns a new [Value] for a slice of key-value pairs. The passed\n// slice must not be changed after it is passed.\nfunc MapValue(kvs ...Attr) Value {\n\treturn Value{\n\t\tnum: uint64(len(kvs)),\n\t\tany: mapptr(unsafe.SliceData(kvs)),\n\t}\n}\n\n// AsString returns the value held by v as a string.\nfunc (v Value) AsString() string {\n\tif sp, ok := v.any.(stringptr); ok {\n\t\treturn unsafe.String(sp, v.num)\n\t}\n\t// TODO: error handle\n\treturn \"\"\n}\n\n// asString returns the value held by v as a string. It will panic if the Value\n// is not KindString.\nfunc (v Value) asString() string {\n\treturn unsafe.String(v.any.(stringptr), v.num)\n}\n\n// AsInt64 returns the value held by v as an int64.\nfunc (v Value) AsInt64() int64 {\n\tif v.Kind() != ValueKindInt64 {\n\t\t// TODO: error handle\n\t\treturn 0\n\t}\n\treturn v.asInt64()\n}\n\n// asInt64 returns the value held by v as an int64. If v is not of KindInt64,\n// this will return garbage.\nfunc (v Value) asInt64() int64 {\n\t// Assumes v.num was a valid int64 (overflow not checked).\n\treturn int64(v.num) //nolint:gosec  // Bounded.\n}\n\n// AsBool returns the value held by v as a bool.\nfunc (v Value) AsBool() bool {\n\tif v.Kind() != ValueKindBool {\n\t\t// TODO: error handle\n\t\treturn false\n\t}\n\treturn v.asBool()\n}\n\n// asBool returns the value held by v as a bool. If v is not of KindBool, this\n// will return garbage.\nfunc (v Value) asBool() bool { return v.num == 1 }\n\n// AsFloat64 returns the value held by v as a float64.\nfunc (v Value) AsFloat64() float64 {\n\tif v.Kind() != ValueKindFloat64 {\n\t\t// TODO: error handle\n\t\treturn 0\n\t}\n\treturn v.asFloat64()\n}\n\n// asFloat64 returns the value held by v as a float64. If v is not of\n// KindFloat64, this will return garbage.\nfunc (v Value) asFloat64() float64 { return math.Float64frombits(v.num) }\n\n// AsBytes returns the value held by v as a []byte.\nfunc (v Value) AsBytes() []byte {\n\tif sp, ok := v.any.(bytesptr); ok {\n\t\treturn unsafe.Slice((*byte)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asBytes returns the value held by v as a []byte. It will panic if the Value\n// is not KindBytes.\nfunc (v Value) asBytes() []byte {\n\treturn unsafe.Slice((*byte)(v.any.(bytesptr)), v.num)\n}\n\n// AsSlice returns the value held by v as a []Value.\nfunc (v Value) AsSlice() []Value {\n\tif sp, ok := v.any.(sliceptr); ok {\n\t\treturn unsafe.Slice((*Value)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asSlice returns the value held by v as a []Value. It will panic if the Value\n// is not KindSlice.\nfunc (v Value) asSlice() []Value {\n\treturn unsafe.Slice((*Value)(v.any.(sliceptr)), v.num)\n}\n\n// AsMap returns the value held by v as a []Attr.\nfunc (v Value) AsMap() []Attr {\n\tif sp, ok := v.any.(mapptr); ok {\n\t\treturn unsafe.Slice((*Attr)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asMap returns the value held by v as a []Attr. It will panic if the\n// Value is not KindMap.\nfunc (v Value) asMap() []Attr {\n\treturn unsafe.Slice((*Attr)(v.any.(mapptr)), v.num)\n}\n\n// Kind returns the Kind of v.\nfunc (v Value) Kind() ValueKind {\n\tswitch x := v.any.(type) {\n\tcase ValueKind:\n\t\treturn x\n\tcase stringptr:\n\t\treturn ValueKindString\n\tcase bytesptr:\n\t\treturn ValueKindBytes\n\tcase sliceptr:\n\t\treturn ValueKindSlice\n\tcase mapptr:\n\t\treturn ValueKindMap\n\tdefault:\n\t\treturn ValueKindEmpty\n\t}\n}\n\n// Empty returns if v does not hold any value.\nfunc (v Value) Empty() bool { return v.Kind() == ValueKindEmpty }\n\n// Equal returns if v is equal to w.\nfunc (v Value) Equal(w Value) bool {\n\tk1 := v.Kind()\n\tk2 := w.Kind()\n\tif k1 != k2 {\n\t\treturn false\n\t}\n\tswitch k1 {\n\tcase ValueKindInt64, ValueKindBool:\n\t\treturn v.num == w.num\n\tcase ValueKindString:\n\t\treturn v.asString() == w.asString()\n\tcase ValueKindFloat64:\n\t\treturn v.asFloat64() == w.asFloat64()\n\tcase ValueKindSlice:\n\t\treturn slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal)\n\tcase ValueKindMap:\n\t\tsv := sortMap(v.asMap())\n\t\tsw := sortMap(w.asMap())\n\t\treturn slices.EqualFunc(sv, sw, Attr.Equal)\n\tcase ValueKindBytes:\n\t\treturn bytes.Equal(v.asBytes(), w.asBytes())\n\tcase ValueKindEmpty:\n\t\treturn true\n\tdefault:\n\t\t// TODO: error handle\n\t\treturn false\n\t}\n}\n\nfunc sortMap(m []Attr) []Attr {\n\tsm := make([]Attr, len(m))\n\tcopy(sm, m)\n\tslices.SortFunc(sm, func(a, b Attr) int {\n\t\treturn cmp.Compare(a.Key, b.Key)\n\t})\n\n\treturn sm\n}\n\n// String returns Value's value as a string, formatted like [fmt.Sprint].\n//\n// The returned string is meant for debugging;\n// the string representation is not stable.\nfunc (v Value) String() string {\n\tswitch v.Kind() {\n\tcase ValueKindString:\n\t\treturn v.asString()\n\tcase ValueKindInt64:\n\t\t// Assumes v.num was a valid int64 (overflow not checked).\n\t\treturn strconv.FormatInt(int64(v.num), 10) //nolint:gosec  // Bounded.\n\tcase ValueKindFloat64:\n\t\treturn strconv.FormatFloat(v.asFloat64(), 'g', -1, 64)\n\tcase ValueKindBool:\n\t\treturn strconv.FormatBool(v.asBool())\n\tcase ValueKindBytes:\n\t\treturn string(v.asBytes())\n\tcase ValueKindMap:\n\t\treturn fmt.Sprint(v.asMap())\n\tcase ValueKindSlice:\n\t\treturn fmt.Sprint(v.asSlice())\n\tcase ValueKindEmpty:\n\t\treturn \"<nil>\"\n\tdefault:\n\t\t// Try to handle this as gracefully as possible.\n\t\t//\n\t\t// Don't panic here. The goal here is to have developers find this\n\t\t// first if a slog.Kind is is not handled. It is\n\t\t// preferable to have user's open issue asking why their attributes\n\t\t// have a \"unhandled: \" prefix than say that their code is panicking.\n\t\treturn fmt.Sprintf(\"<unhandled telemetry.ValueKind: %s>\", v.Kind())\n\t}\n}\n\n// MarshalJSON encodes v into OTLP formatted JSON.\nfunc (v *Value) MarshalJSON() ([]byte, error) {\n\tswitch v.Kind() {\n\tcase ValueKindString:\n\t\treturn json.Marshal(struct {\n\t\t\tValue string `json:\"stringValue\"`\n\t\t}{v.asString()})\n\tcase ValueKindInt64:\n\t\treturn json.Marshal(struct {\n\t\t\tValue string `json:\"intValue\"`\n\t\t}{strconv.FormatInt(int64(v.num), 10)}) //nolint:gosec  // Raw value conv.\n\tcase ValueKindFloat64:\n\t\treturn json.Marshal(struct {\n\t\t\tValue float64 `json:\"doubleValue\"`\n\t\t}{v.asFloat64()})\n\tcase ValueKindBool:\n\t\treturn json.Marshal(struct {\n\t\t\tValue bool `json:\"boolValue\"`\n\t\t}{v.asBool()})\n\tcase ValueKindBytes:\n\t\treturn json.Marshal(struct {\n\t\t\tValue []byte `json:\"bytesValue\"`\n\t\t}{v.asBytes()})\n\tcase ValueKindMap:\n\t\treturn json.Marshal(struct {\n\t\t\tValue struct {\n\t\t\t\tValues []Attr `json:\"values\"`\n\t\t\t} `json:\"kvlistValue\"`\n\t\t}{struct {\n\t\t\tValues []Attr `json:\"values\"`\n\t\t}{v.asMap()}})\n\tcase ValueKindSlice:\n\t\treturn json.Marshal(struct {\n\t\t\tValue struct {\n\t\t\t\tValues []Value `json:\"values\"`\n\t\t\t} `json:\"arrayValue\"`\n\t\t}{struct {\n\t\t\tValues []Value `json:\"values\"`\n\t\t}{v.asSlice()}})\n\tcase ValueKindEmpty:\n\t\treturn nil, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown Value kind: %s\", v.Kind().String())\n\t}\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into v.\nfunc (v *Value) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Value type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Value key: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"stringValue\", \"string_value\":\n\t\t\tvar val string\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = StringValue(val)\n\t\tcase \"boolValue\", \"bool_value\":\n\t\t\tvar val bool\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = BoolValue(val)\n\t\tcase \"intValue\", \"int_value\":\n\t\t\tvar val protoInt64\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = Int64Value(val.Int64())\n\t\tcase \"doubleValue\", \"double_value\":\n\t\t\tvar val float64\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = Float64Value(val)\n\t\tcase \"bytesValue\", \"bytes_value\":\n\t\t\tvar val64 string\n\t\t\tif err := decoder.Decode(&val64); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvar val []byte\n\t\t\tval, err = base64.StdEncoding.DecodeString(val64)\n\t\t\t*v = BytesValue(val)\n\t\tcase \"arrayValue\", \"array_value\":\n\t\t\tvar val struct{ Values []Value }\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = SliceValue(val.Values...)\n\t\tcase \"kvlistValue\", \"kvlist_value\":\n\t\t\tvar val struct{ Values []Attr }\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = MapValue(val.Values...)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t\tcontinue\n\t\t}\n\t\t// Use first valid. Ignore the rest.\n\t\treturn err\n\t}\n\n\t// Only unknown fields. Return nil without unmarshaling any value.\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/limit.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage sdk\n\nimport (\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n)\n\n// maxSpan are the span limits resolved during startup.\nvar maxSpan = newSpanLimits()\n\ntype spanLimits struct {\n\t// Attrs is the number of allowed attributes for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the\n\t// environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if\n\t// that is not set, is used.\n\tAttrs int\n\t// AttrValueLen is the maximum attribute value length allowed for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the\n\t// environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1\n\t// if that is not set, is used.\n\tAttrValueLen int\n\t// Events is the number of allowed events for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set.\n\tEvents int\n\t// EventAttrs is the number of allowed attributes for a span event.\n\t//\n\t// The is resolved from the environment variable value for the\n\t// OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set.\n\tEventAttrs int\n\t// Links is the number of allowed Links for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set.\n\tLinks int\n\t// LinkAttrs is the number of allowed attributes for a span link.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set.\n\tLinkAttrs int\n}\n\nfunc newSpanLimits() spanLimits {\n\treturn spanLimits{\n\t\tAttrs: firstEnv(\n\t\t\t128,\n\t\t\t\"OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT\",\n\t\t\t\"OTEL_ATTRIBUTE_COUNT_LIMIT\",\n\t\t),\n\t\tAttrValueLen: firstEnv(\n\t\t\t-1, // Unlimited.\n\t\t\t\"OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT\",\n\t\t\t\"OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT\",\n\t\t),\n\t\tEvents:     firstEnv(128, \"OTEL_SPAN_EVENT_COUNT_LIMIT\"),\n\t\tEventAttrs: firstEnv(128, \"OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT\"),\n\t\tLinks:      firstEnv(128, \"OTEL_SPAN_LINK_COUNT_LIMIT\"),\n\t\tLinkAttrs:  firstEnv(128, \"OTEL_LINK_ATTRIBUTE_COUNT_LIMIT\"),\n\t}\n}\n\n// firstEnv returns the parsed integer value of the first matching environment\n// variable from keys. The defaultVal is returned if the value is not an\n// integer or no match is found.\nfunc firstEnv(defaultVal int, keys ...string) int {\n\tfor _, key := range keys {\n\t\tstrV := os.Getenv(key)\n\t\tif strV == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tv, err := strconv.Atoi(strV)\n\t\tif err == nil {\n\t\t\treturn v\n\t\t}\n\t\tslog.Warn(\n\t\t\t\"invalid limit environment variable\",\n\t\t\t\"error\", err,\n\t\t\t\"key\", key,\n\t\t\t\"value\", strV,\n\t\t)\n\t}\n\n\treturn defaultVal\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/span.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage sdk\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\tsemconv \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"go.opentelemetry.io/otel/trace/noop\"\n\n\t\"go.opentelemetry.io/auto/sdk/internal/telemetry\"\n)\n\ntype span struct {\n\tnoop.Span\n\n\tspanContext trace.SpanContext\n\tsampled     atomic.Bool\n\n\tmu     sync.Mutex\n\ttraces *telemetry.Traces\n\tspan   *telemetry.Span\n}\n\nfunc (s *span) SpanContext() trace.SpanContext {\n\tif s == nil {\n\t\treturn trace.SpanContext{}\n\t}\n\t// s.spanContext is immutable, do not acquire lock s.mu.\n\treturn s.spanContext\n}\n\nfunc (s *span) IsRecording() bool {\n\tif s == nil {\n\t\treturn false\n\t}\n\n\treturn s.sampled.Load()\n}\n\nfunc (s *span) SetStatus(c codes.Code, msg string) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif s.span.Status == nil {\n\t\ts.span.Status = new(telemetry.Status)\n\t}\n\n\ts.span.Status.Message = msg\n\n\tswitch c {\n\tcase codes.Unset:\n\t\ts.span.Status.Code = telemetry.StatusCodeUnset\n\tcase codes.Error:\n\t\ts.span.Status.Code = telemetry.StatusCodeError\n\tcase codes.Ok:\n\t\ts.span.Status.Code = telemetry.StatusCodeOK\n\t}\n}\n\nfunc (s *span) SetAttributes(attrs ...attribute.KeyValue) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tlimit := maxSpan.Attrs\n\tif limit == 0 {\n\t\t// No attributes allowed.\n\t\tn := int64(len(attrs))\n\t\tif n > 0 {\n\t\t\ts.span.DroppedAttrs += uint32( //nolint:gosec  // Bounds checked.\n\t\t\t\tmin(n, math.MaxUint32),\n\t\t\t)\n\t\t}\n\t\treturn\n\t}\n\n\tm := make(map[string]int)\n\tfor i, a := range s.span.Attrs {\n\t\tm[a.Key] = i\n\t}\n\n\tfor _, a := range attrs {\n\t\tval := convAttrValue(a.Value)\n\t\tif val.Empty() {\n\t\t\ts.span.DroppedAttrs++\n\t\t\tcontinue\n\t\t}\n\n\t\tif idx, ok := m[string(a.Key)]; ok {\n\t\t\ts.span.Attrs[idx] = telemetry.Attr{\n\t\t\t\tKey:   string(a.Key),\n\t\t\t\tValue: val,\n\t\t\t}\n\t\t} else if limit < 0 || len(s.span.Attrs) < limit {\n\t\t\ts.span.Attrs = append(s.span.Attrs, telemetry.Attr{\n\t\t\t\tKey:   string(a.Key),\n\t\t\t\tValue: val,\n\t\t\t})\n\t\t\tm[string(a.Key)] = len(s.span.Attrs) - 1\n\t\t} else {\n\t\t\ts.span.DroppedAttrs++\n\t\t}\n\t}\n}\n\n// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The\n// number of dropped attributes is also returned.\nfunc convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) {\n\tn := len(attrs)\n\tif limit == 0 {\n\t\tvar out uint32\n\t\tif n > 0 {\n\t\t\tout = uint32(min(int64(n), math.MaxUint32)) //nolint:gosec  // Bounds checked.\n\t\t}\n\t\treturn nil, out\n\t}\n\n\tif limit < 0 {\n\t\t// Unlimited.\n\t\treturn convAttrs(attrs), 0\n\t}\n\n\tif n < 0 {\n\t\tn = 0\n\t}\n\n\tlimit = min(n, limit)\n\treturn convAttrs(attrs[:limit]), uint32(n - limit) //nolint:gosec  // Bounds checked.\n}\n\nfunc convAttrs(attrs []attribute.KeyValue) []telemetry.Attr {\n\tif len(attrs) == 0 {\n\t\t// Avoid allocations if not necessary.\n\t\treturn nil\n\t}\n\n\tout := make([]telemetry.Attr, 0, len(attrs))\n\tfor _, attr := range attrs {\n\t\tkey := string(attr.Key)\n\t\tval := convAttrValue(attr.Value)\n\t\tif val.Empty() {\n\t\t\tcontinue\n\t\t}\n\t\tout = append(out, telemetry.Attr{Key: key, Value: val})\n\t}\n\treturn out\n}\n\nfunc convAttrValue(value attribute.Value) telemetry.Value {\n\tswitch value.Type() {\n\tcase attribute.BOOL:\n\t\treturn telemetry.BoolValue(value.AsBool())\n\tcase attribute.INT64:\n\t\treturn telemetry.Int64Value(value.AsInt64())\n\tcase attribute.FLOAT64:\n\t\treturn telemetry.Float64Value(value.AsFloat64())\n\tcase attribute.STRING:\n\t\tv := truncate(maxSpan.AttrValueLen, value.AsString())\n\t\treturn telemetry.StringValue(v)\n\tcase attribute.BOOLSLICE:\n\t\tslice := value.AsBoolSlice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.BoolValue(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.INT64SLICE:\n\t\tslice := value.AsInt64Slice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.Int64Value(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.FLOAT64SLICE:\n\t\tslice := value.AsFloat64Slice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.Float64Value(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.STRINGSLICE:\n\t\tslice := value.AsStringSlice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tv = truncate(maxSpan.AttrValueLen, v)\n\t\t\tout = append(out, telemetry.StringValue(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\t}\n\treturn telemetry.Value{}\n}\n\n// truncate returns a truncated version of s such that it contains less than\n// the limit number of characters. Truncation is applied by returning the limit\n// number of valid characters contained in s.\n//\n// If limit is negative, it returns the original string.\n//\n// UTF-8 is supported. When truncating, all invalid characters are dropped\n// before applying truncation.\n//\n// If s already contains less than the limit number of bytes, it is returned\n// unchanged. No invalid characters are removed.\nfunc truncate(limit int, s string) string {\n\t// This prioritize performance in the following order based on the most\n\t// common expected use-cases.\n\t//\n\t//  - Short values less than the default limit (128).\n\t//  - Strings with valid encodings that exceed the limit.\n\t//  - No limit.\n\t//  - Strings with invalid encodings that exceed the limit.\n\tif limit < 0 || len(s) <= limit {\n\t\treturn s\n\t}\n\n\t// Optimistically, assume all valid UTF-8.\n\tvar b strings.Builder\n\tcount := 0\n\tfor i, c := range s {\n\t\tif c != utf8.RuneError {\n\t\t\tcount++\n\t\t\tif count > limit {\n\t\t\t\treturn s[:i]\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t_, size := utf8.DecodeRuneInString(s[i:])\n\t\tif size == 1 {\n\t\t\t// Invalid encoding.\n\t\t\tb.Grow(len(s) - 1)\n\t\t\t_, _ = b.WriteString(s[:i])\n\t\t\ts = s[i:]\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Fast-path, no invalid input.\n\tif b.Cap() == 0 {\n\t\treturn s\n\t}\n\n\t// Truncate while validating UTF-8.\n\tfor i := 0; i < len(s) && count < limit; {\n\t\tc := s[i]\n\t\tif c < utf8.RuneSelf {\n\t\t\t// Optimization for single byte runes (common case).\n\t\t\t_ = b.WriteByte(c)\n\t\t\ti++\n\t\t\tcount++\n\t\t\tcontinue\n\t\t}\n\n\t\t_, size := utf8.DecodeRuneInString(s[i:])\n\t\tif size == 1 {\n\t\t\t// We checked for all 1-byte runes above, this is a RuneError.\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\n\t\t_, _ = b.WriteString(s[i : i+size])\n\t\ti += size\n\t\tcount++\n\t}\n\n\treturn b.String()\n}\n\nfunc (s *span) End(opts ...trace.SpanEndOption) {\n\tif s == nil || !s.sampled.Swap(false) {\n\t\treturn\n\t}\n\n\t// s.end exists so the lock (s.mu) is not held while s.ended is called.\n\ts.ended(s.end(opts))\n}\n\nfunc (s *span) end(opts []trace.SpanEndOption) []byte {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tcfg := trace.NewSpanEndConfig(opts...)\n\tif t := cfg.Timestamp(); !t.IsZero() {\n\t\ts.span.EndTime = cfg.Timestamp()\n\t} else {\n\t\ts.span.EndTime = time.Now()\n\t}\n\n\tb, _ := json.Marshal(s.traces) // TODO: do not ignore this error.\n\treturn b\n}\n\n// Expected to be implemented in eBPF.\n//\n//go:noinline\nfunc (*span) ended(buf []byte) { ended(buf) }\n\n// ended is used for testing.\nvar ended = func([]byte) {}\n\nfunc (s *span) RecordError(err error, opts ...trace.EventOption) {\n\tif s == nil || err == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tcfg := trace.NewEventConfig(opts...)\n\n\tattrs := cfg.Attributes()\n\tattrs = append(attrs,\n\t\tsemconv.ExceptionType(typeStr(err)),\n\t\tsemconv.ExceptionMessage(err.Error()),\n\t)\n\tif cfg.StackTrace() {\n\t\tbuf := make([]byte, 2048)\n\t\tn := runtime.Stack(buf, false)\n\t\tattrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n])))\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs)\n}\n\nfunc typeStr(i any) string {\n\tt := reflect.TypeOf(i)\n\tif t.PkgPath() == \"\" && t.Name() == \"\" {\n\t\t// Likely a builtin type.\n\t\treturn t.String()\n\t}\n\treturn fmt.Sprintf(\"%s.%s\", t.PkgPath(), t.Name())\n}\n\nfunc (s *span) AddEvent(name string, opts ...trace.EventOption) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tcfg := trace.NewEventConfig(opts...)\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.addEvent(name, cfg.Timestamp(), cfg.Attributes())\n}\n\n// addEvent adds an event with name and attrs at tStamp to the span. The span\n// lock (s.mu) needs to be held by the caller.\nfunc (s *span) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) {\n\tlimit := maxSpan.Events\n\n\tif limit == 0 {\n\t\ts.span.DroppedEvents++\n\t\treturn\n\t}\n\n\tif limit > 0 && len(s.span.Events) == limit {\n\t\t// Drop head while avoiding allocation of more capacity.\n\t\tcopy(s.span.Events[:limit-1], s.span.Events[1:])\n\t\ts.span.Events = s.span.Events[:limit-1]\n\t\ts.span.DroppedEvents++\n\t}\n\n\te := &telemetry.SpanEvent{Time: tStamp, Name: name}\n\te.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs)\n\n\ts.span.Events = append(s.span.Events, e)\n}\n\nfunc (s *span) AddLink(link trace.Link) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tl := maxSpan.Links\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif l == 0 {\n\t\ts.span.DroppedLinks++\n\t\treturn\n\t}\n\n\tif l > 0 && len(s.span.Links) == l {\n\t\t// Drop head while avoiding allocation of more capacity.\n\t\tcopy(s.span.Links[:l-1], s.span.Links[1:])\n\t\ts.span.Links = s.span.Links[:l-1]\n\t\ts.span.DroppedLinks++\n\t}\n\n\ts.span.Links = append(s.span.Links, convLink(link))\n}\n\nfunc convLinks(links []trace.Link) []*telemetry.SpanLink {\n\tout := make([]*telemetry.SpanLink, 0, len(links))\n\tfor _, link := range links {\n\t\tout = append(out, convLink(link))\n\t}\n\treturn out\n}\n\nfunc convLink(link trace.Link) *telemetry.SpanLink {\n\tl := &telemetry.SpanLink{\n\t\tTraceID:    telemetry.TraceID(link.SpanContext.TraceID()),\n\t\tSpanID:     telemetry.SpanID(link.SpanContext.SpanID()),\n\t\tTraceState: link.SpanContext.TraceState().String(),\n\t\tFlags:      uint32(link.SpanContext.TraceFlags()),\n\t}\n\tl.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes)\n\n\treturn l\n}\n\nfunc (s *span) SetName(name string) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.span.Name = name\n}\n\nfunc (*span) TracerProvider() trace.TracerProvider { return TracerProvider() }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/tracer.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage sdk\n\nimport (\n\t\"context\"\n\t\"math\"\n\t\"time\"\n\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"go.opentelemetry.io/otel/trace/noop\"\n\n\t\"go.opentelemetry.io/auto/sdk/internal/telemetry\"\n)\n\ntype tracer struct {\n\tnoop.Tracer\n\n\tname, schemaURL, version string\n}\n\nvar _ trace.Tracer = tracer{}\n\nfunc (t tracer) Start(\n\tctx context.Context,\n\tname string,\n\topts ...trace.SpanStartOption,\n) (context.Context, trace.Span) {\n\tvar psc, sc trace.SpanContext\n\tsampled := true\n\tspan := new(span)\n\n\t// Ask eBPF for sampling decision and span context info.\n\tt.start(ctx, span, &psc, &sampled, &sc)\n\n\tspan.sampled.Store(sampled)\n\tspan.spanContext = sc\n\n\tctx = trace.ContextWithSpan(ctx, span)\n\n\tif sampled {\n\t\t// Only build traces if sampled.\n\t\tcfg := trace.NewSpanStartConfig(opts...)\n\t\tspan.traces, span.span = t.traces(name, cfg, span.spanContext, psc)\n\t}\n\n\treturn ctx, span\n}\n\n// Expected to be implemented in eBPF.\n//\n//go:noinline\nfunc (t *tracer) start(\n\tctx context.Context,\n\tspanPtr *span,\n\tpsc *trace.SpanContext,\n\tsampled *bool,\n\tsc *trace.SpanContext,\n) {\n\tstart(ctx, spanPtr, psc, sampled, sc)\n}\n\n// start is used for testing.\nvar start = func(context.Context, *span, *trace.SpanContext, *bool, *trace.SpanContext) {}\n\nvar intToUint32Bound = min(math.MaxInt, math.MaxUint32)\n\nfunc (t tracer) traces(\n\tname string,\n\tcfg trace.SpanConfig,\n\tsc, psc trace.SpanContext,\n) (*telemetry.Traces, *telemetry.Span) {\n\tspan := &telemetry.Span{\n\t\tTraceID:      telemetry.TraceID(sc.TraceID()),\n\t\tSpanID:       telemetry.SpanID(sc.SpanID()),\n\t\tFlags:        uint32(sc.TraceFlags()),\n\t\tTraceState:   sc.TraceState().String(),\n\t\tParentSpanID: telemetry.SpanID(psc.SpanID()),\n\t\tName:         name,\n\t\tKind:         spanKind(cfg.SpanKind()),\n\t}\n\n\tspan.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes())\n\n\tlinks := cfg.Links()\n\tif limit := maxSpan.Links; limit == 0 {\n\t\tn := len(links)\n\t\tif n > 0 {\n\t\t\tbounded := max(min(n, intToUint32Bound), 0)\n\t\t\tspan.DroppedLinks = uint32(bounded) //nolint:gosec  // Bounds checked.\n\t\t}\n\t} else {\n\t\tif limit > 0 {\n\t\t\tn := max(len(links)-limit, 0)\n\t\t\tbounded := min(n, intToUint32Bound)\n\t\t\tspan.DroppedLinks = uint32(bounded) //nolint:gosec  // Bounds checked.\n\t\t\tlinks = links[n:]\n\t\t}\n\t\tspan.Links = convLinks(links)\n\t}\n\n\tif t := cfg.Timestamp(); !t.IsZero() {\n\t\tspan.StartTime = cfg.Timestamp()\n\t} else {\n\t\tspan.StartTime = time.Now()\n\t}\n\n\treturn &telemetry.Traces{\n\t\tResourceSpans: []*telemetry.ResourceSpans{\n\t\t\t{\n\t\t\t\tScopeSpans: []*telemetry.ScopeSpans{\n\t\t\t\t\t{\n\t\t\t\t\t\tScope: &telemetry.Scope{\n\t\t\t\t\t\t\tName:    t.name,\n\t\t\t\t\t\t\tVersion: t.version,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSpans:     []*telemetry.Span{span},\n\t\t\t\t\t\tSchemaURL: t.schemaURL,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}, span\n}\n\nfunc spanKind(kind trace.SpanKind) telemetry.SpanKind {\n\tswitch kind {\n\tcase trace.SpanKindInternal:\n\t\treturn telemetry.SpanKindInternal\n\tcase trace.SpanKindServer:\n\t\treturn telemetry.SpanKindServer\n\tcase trace.SpanKindClient:\n\t\treturn telemetry.SpanKindClient\n\tcase trace.SpanKindProducer:\n\t\treturn telemetry.SpanKindProducer\n\tcase trace.SpanKindConsumer:\n\t\treturn telemetry.SpanKindConsumer\n\t}\n\treturn telemetry.SpanKind(0) // undefined.\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage sdk\n\nimport (\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"go.opentelemetry.io/otel/trace/noop\"\n)\n\n// TracerProvider returns an auto-instrumentable [trace.TracerProvider].\n//\n// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument\n// the process using the returned TracerProvider, all of the telemetry it\n// produces will be processed and handled by that Instrumentation. By default,\n// if no Instrumentation instruments the TracerProvider it will not generate\n// any trace telemetry.\nfunc TracerProvider() trace.TracerProvider { return tracerProviderInstance }\n\nvar tracerProviderInstance = new(tracerProvider)\n\ntype tracerProvider struct{ noop.TracerProvider }\n\nvar _ trace.TracerProvider = tracerProvider{}\n\nfunc (p tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {\n\tcfg := trace.NewTracerConfig(opts...)\n\treturn tracer{\n\t\tname:      name,\n\t\tversion:   cfg.InstrumentationVersion(),\n\t\tschemaURL: cfg.SchemaURL(),\n\t}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE",
    "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\n--------------------------------------------------------------------------------\n\nCopyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"net/http\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\n// Attribute keys that can be added to a span.\nconst (\n\tReadBytesKey  = attribute.Key(\"http.read_bytes\")  // if anything was read from the request body, the total number of bytes read\n\tReadErrorKey  = attribute.Key(\"http.read_error\")  // If an error occurred while reading a request, the string of the error (io.EOF is not recorded)\n\tWroteBytesKey = attribute.Key(\"http.wrote_bytes\") // if anything was written to the response writer, the total number of bytes written\n\tWriteErrorKey = attribute.Key(\"http.write_error\") // if an error occurred while writing a reply, the string of the error (io.EOF is not recorded)\n)\n\n// Filter is a predicate used to determine whether a given http.request should\n// be traced. A Filter must return true if the request should be traced.\ntype Filter func(*http.Request) bool\n\nfunc newTracer(tp trace.TracerProvider) trace.Tracer {\n\treturn tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version))\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"net/http/httptrace\"\n\n\t\"go.opentelemetry.io/otel\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/propagation\"\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\n// ScopeName is the instrumentation scope name.\nconst ScopeName = \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\n// config represents the configuration options available for the http.Handler\n// and http.Transport types.\ntype config struct {\n\tServerName        string\n\tTracer            trace.Tracer\n\tMeter             metric.Meter\n\tPropagators       propagation.TextMapPropagator\n\tSpanStartOptions  []trace.SpanStartOption\n\tPublicEndpointFn  func(*http.Request) bool\n\tReadEvent         bool\n\tWriteEvent        bool\n\tFilters           []Filter\n\tSpanNameFormatter func(string, *http.Request) string\n\tClientTrace       func(context.Context) *httptrace.ClientTrace\n\n\tTracerProvider     trace.TracerProvider\n\tMeterProvider      metric.MeterProvider\n\tMetricAttributesFn func(*http.Request) []attribute.KeyValue\n}\n\n// Option interface used for setting optional config properties.\ntype Option interface {\n\tapply(*config)\n}\n\ntype optionFunc func(*config)\n\nfunc (o optionFunc) apply(c *config) {\n\to(c)\n}\n\n// newConfig creates a new config struct and applies opts to it.\nfunc newConfig(opts ...Option) *config {\n\tc := &config{\n\t\tPropagators:   otel.GetTextMapPropagator(),\n\t\tMeterProvider: otel.GetMeterProvider(),\n\t}\n\tfor _, opt := range opts {\n\t\topt.apply(c)\n\t}\n\n\t// Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context.\n\tif c.TracerProvider != nil {\n\t\tc.Tracer = newTracer(c.TracerProvider)\n\t}\n\n\tc.Meter = c.MeterProvider.Meter(\n\t\tScopeName,\n\t\tmetric.WithInstrumentationVersion(Version),\n\t)\n\n\treturn c\n}\n\n// WithTracerProvider specifies a tracer provider to use for creating a tracer.\n// If none is specified, the global provider is used.\nfunc WithTracerProvider(provider trace.TracerProvider) Option {\n\treturn optionFunc(func(cfg *config) {\n\t\tif provider != nil {\n\t\t\tcfg.TracerProvider = provider\n\t\t}\n\t})\n}\n\n// WithMeterProvider specifies a meter provider to use for creating a meter.\n// If none is specified, the global provider is used.\nfunc WithMeterProvider(provider metric.MeterProvider) Option {\n\treturn optionFunc(func(cfg *config) {\n\t\tif provider != nil {\n\t\t\tcfg.MeterProvider = provider\n\t\t}\n\t})\n}\n\n// WithPublicEndpointFn runs with every request, and allows conditionally\n// configuring the Handler to link the span with an incoming span context. If\n// this option is not provided or returns false, then the association is a\n// child association instead of a link.\nfunc WithPublicEndpointFn(fn func(*http.Request) bool) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.PublicEndpointFn = fn\n\t})\n}\n\n// WithPropagators configures specific propagators. If this\n// option isn't specified, then the global TextMapPropagator is used.\nfunc WithPropagators(ps propagation.TextMapPropagator) Option {\n\treturn optionFunc(func(c *config) {\n\t\tif ps != nil {\n\t\t\tc.Propagators = ps\n\t\t}\n\t})\n}\n\n// WithSpanOptions configures an additional set of\n// trace.SpanOptions, which are applied to each new span.\nfunc WithSpanOptions(opts ...trace.SpanStartOption) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.SpanStartOptions = append(c.SpanStartOptions, opts...)\n\t})\n}\n\n// WithFilter adds a filter to the list of filters used by the handler.\n// If any filter indicates to exclude a request then the request will not be\n// traced. All filters must allow a request to be traced for a Span to be created.\n// If no filters are provided then all requests are traced.\n// Filters will be invoked for each processed request, it is advised to make them\n// simple and fast.\nfunc WithFilter(f Filter) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.Filters = append(c.Filters, f)\n\t})\n}\n\n// Event represents message event types for [WithMessageEvents].\ntype Event int\n\n// Different types of events that can be recorded, see WithMessageEvents.\nconst (\n\tunspecifiedEvents Event = iota\n\tReadEvents\n\tWriteEvents\n)\n\n// WithMessageEvents configures the Handler to record the specified events\n// (span.AddEvent) on spans. By default only summary attributes are added at the\n// end of the request.\n//\n// Valid events are:\n//   - ReadEvents: Record the number of bytes read after every http.Request.Body.Read\n//     using the ReadBytesKey\n//   - WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write\n//     using the WriteBytesKey\nfunc WithMessageEvents(events ...Event) Option {\n\treturn optionFunc(func(c *config) {\n\t\tfor _, e := range events {\n\t\t\tswitch e {\n\t\t\tcase ReadEvents:\n\t\t\t\tc.ReadEvent = true\n\t\t\tcase WriteEvents:\n\t\t\t\tc.WriteEvent = true\n\t\t\t}\n\t\t}\n\t})\n}\n\n// WithSpanNameFormatter takes a function that will be called on every\n// request and the returned string will become the Span Name.\n//\n// When using [http.ServeMux] (or any middleware that sets the Pattern of [http.Request]),\n// the span name formatter will run twice. Once when the span is created, and\n// second time after the middleware, so the pattern can be used.\nfunc WithSpanNameFormatter(f func(operation string, r *http.Request) string) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.SpanNameFormatter = f\n\t})\n}\n\n// WithClientTrace takes a function that returns client trace instance that will be\n// applied to the requests sent through the otelhttp Transport.\nfunc WithClientTrace(f func(context.Context) *httptrace.ClientTrace) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.ClientTrace = f\n\t})\n}\n\n// WithServerName returns an Option that sets the name of the (virtual) server\n// handling requests.\nfunc WithServerName(server string) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.ServerName = server\n\t})\n}\n\n// WithMetricAttributesFn returns an Option to set a function that maps an HTTP request to a slice of attribute.KeyValue.\n// These attributes will be included in metrics for every request.\nfunc WithMetricAttributesFn(metricAttributesFn func(r *http.Request) []attribute.KeyValue) Option {\n\treturn optionFunc(func(c *config) {\n\t\tc.MetricAttributesFn = metricAttributesFn\n\t})\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package otelhttp provides an http.Handler and functions that are intended\n// to be used to add tracing by wrapping existing handlers.\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/felixge/httpsnoop\"\n\t\"go.opentelemetry.io/otel\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/propagation\"\n\t\"go.opentelemetry.io/otel/trace\"\n\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\"\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n)\n\n// middleware is an http middleware which wraps the next handler in a span.\ntype middleware struct {\n\toperation string\n\tserver    string\n\n\ttracer             trace.Tracer\n\tpropagators        propagation.TextMapPropagator\n\tspanStartOptions   []trace.SpanStartOption\n\treadEvent          bool\n\twriteEvent         bool\n\tfilters            []Filter\n\tspanNameFormatter  func(string, *http.Request) string\n\tpublicEndpointFn   func(*http.Request) bool\n\tmetricAttributesFn func(*http.Request) []attribute.KeyValue\n\n\tsemconv semconv.HTTPServer\n}\n\nfunc defaultHandlerFormatter(operation string, _ *http.Request) string {\n\treturn operation\n}\n\n// NewHandler wraps the passed handler in a span named after the operation and\n// enriches it with metrics.\nfunc NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler {\n\treturn NewMiddleware(operation, opts...)(handler)\n}\n\n// NewMiddleware returns a tracing and metrics instrumentation middleware.\n// The handler returned by the middleware wraps a handler\n// in a span named after the operation and enriches it with metrics.\nfunc NewMiddleware(operation string, opts ...Option) func(http.Handler) http.Handler {\n\th := middleware{\n\t\toperation: operation,\n\t}\n\n\tdefaultOpts := []Option{\n\t\tWithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)),\n\t\tWithSpanNameFormatter(defaultHandlerFormatter),\n\t}\n\n\tc := newConfig(append(defaultOpts, opts...)...)\n\th.configure(c)\n\n\treturn func(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\th.serveHTTP(w, r, next)\n\t\t})\n\t}\n}\n\nfunc (h *middleware) configure(c *config) {\n\th.tracer = c.Tracer\n\th.propagators = c.Propagators\n\th.spanStartOptions = c.SpanStartOptions\n\th.readEvent = c.ReadEvent\n\th.writeEvent = c.WriteEvent\n\th.filters = c.Filters\n\th.spanNameFormatter = c.SpanNameFormatter\n\th.publicEndpointFn = c.PublicEndpointFn\n\th.server = c.ServerName\n\th.semconv = semconv.NewHTTPServer(c.Meter)\n\th.metricAttributesFn = c.MetricAttributesFn\n}\n\n// serveHTTP sets up tracing and calls the given next http.Handler with the span\n// context injected into the request context.\nfunc (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http.Handler) {\n\trequestStartTime := time.Now()\n\tfor _, f := range h.filters {\n\t\tif !f(r) {\n\t\t\t// Simply pass through to the handler if a filter rejects the request\n\t\t\tnext.ServeHTTP(w, r)\n\t\t\treturn\n\t\t}\n\t}\n\n\tctx := h.propagators.Extract(r.Context(), propagation.HeaderCarrier(r.Header))\n\topts := []trace.SpanStartOption{\n\t\ttrace.WithAttributes(h.semconv.RequestTraceAttrs(h.server, r, semconv.RequestTraceAttrsOpts{})...),\n\t}\n\n\topts = append(opts, h.spanStartOptions...)\n\tif h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx)) {\n\t\topts = append(opts, trace.WithNewRoot())\n\t\t// Linking incoming span context if any for public endpoint.\n\t\tif s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() {\n\t\t\topts = append(opts, trace.WithLinks(trace.Link{SpanContext: s}))\n\t\t}\n\t}\n\n\ttracer := h.tracer\n\n\tif tracer == nil {\n\t\tif span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() {\n\t\t\ttracer = newTracer(span.TracerProvider())\n\t\t} else {\n\t\t\ttracer = newTracer(otel.GetTracerProvider())\n\t\t}\n\t}\n\n\tif startTime := StartTimeFromContext(ctx); !startTime.IsZero() {\n\t\topts = append(opts, trace.WithTimestamp(startTime))\n\t\trequestStartTime = startTime\n\t}\n\n\tctx, span := tracer.Start(ctx, h.spanNameFormatter(h.operation, r), opts...)\n\tdefer span.End()\n\n\treadRecordFunc := func(int64) {}\n\tif h.readEvent {\n\t\treadRecordFunc = func(n int64) {\n\t\t\tspan.AddEvent(\"read\", trace.WithAttributes(ReadBytesKey.Int64(n)))\n\t\t}\n\t}\n\n\t// if request body is nil or NoBody, we don't want to mutate the body as it\n\t// will affect the identity of it in an unforeseeable way because we assert\n\t// ReadCloser fulfills a certain interface and it is indeed nil or NoBody.\n\tbw := request.NewBodyWrapper(r.Body, readRecordFunc)\n\tif r.Body != nil && r.Body != http.NoBody {\n\t\tr.Body = bw\n\t}\n\n\twriteRecordFunc := func(int64) {}\n\tif h.writeEvent {\n\t\twriteRecordFunc = func(n int64) {\n\t\t\tspan.AddEvent(\"write\", trace.WithAttributes(WroteBytesKey.Int64(n)))\n\t\t}\n\t}\n\n\trww := request.NewRespWriterWrapper(w, writeRecordFunc)\n\n\t// Wrap w to use our ResponseWriter methods while also exposing\n\t// other interfaces that w may implement (http.CloseNotifier,\n\t// http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom).\n\n\tw = httpsnoop.Wrap(w, httpsnoop.Hooks{\n\t\tHeader: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc {\n\t\t\treturn rww.Header\n\t\t},\n\t\tWrite: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc {\n\t\t\treturn rww.Write\n\t\t},\n\t\tWriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc {\n\t\t\treturn rww.WriteHeader\n\t\t},\n\t\tFlush: func(httpsnoop.FlushFunc) httpsnoop.FlushFunc {\n\t\t\treturn rww.Flush\n\t\t},\n\t})\n\n\tlabeler, found := LabelerFromContext(ctx)\n\tif !found {\n\t\tctx = ContextWithLabeler(ctx, labeler)\n\t}\n\n\tr = r.WithContext(ctx)\n\tnext.ServeHTTP(w, r)\n\n\tif r.Pattern != \"\" {\n\t\tspan.SetName(h.spanNameFormatter(h.operation, r))\n\t}\n\n\tstatusCode := rww.StatusCode()\n\tbytesWritten := rww.BytesWritten()\n\tspan.SetStatus(h.semconv.Status(statusCode))\n\tspan.SetAttributes(h.semconv.ResponseTraceAttrs(semconv.ResponseTelemetry{\n\t\tStatusCode: statusCode,\n\t\tReadBytes:  bw.BytesRead(),\n\t\tReadError:  bw.Error(),\n\t\tWriteBytes: bytesWritten,\n\t\tWriteError: rww.Error(),\n\t})...)\n\n\t// Use floating point division here for higher precision (instead of Millisecond method).\n\telapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)\n\n\tmetricAttributes := semconv.MetricAttributes{\n\t\tReq:                  r,\n\t\tStatusCode:           statusCode,\n\t\tAdditionalAttributes: append(labeler.Get(), h.metricAttributesFromRequest(r)...),\n\t}\n\n\th.semconv.RecordMetrics(ctx, semconv.ServerMetricData{\n\t\tServerName:       h.server,\n\t\tResponseSize:     bytesWritten,\n\t\tMetricAttributes: metricAttributes,\n\t\tMetricData: semconv.MetricData{\n\t\t\tRequestSize: bw.BytesRead(),\n\t\t\tElapsedTime: elapsedTime,\n\t\t},\n\t})\n}\n\nfunc (h *middleware) metricAttributesFromRequest(r *http.Request) []attribute.KeyValue {\n\tvar attributeForRequest []attribute.KeyValue\n\tif h.metricAttributesFn != nil {\n\t\tattributeForRequest = h.metricAttributesFn(r)\n\t}\n\treturn attributeForRequest\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go",
    "content": "// Code generated by gotmpl. DO NOT MODIFY.\n// source: internal/shared/request/body_wrapper.go.tmpl\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package request provides types and functionality to handle HTTP request\n// handling.\npackage request // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\"\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\nvar _ io.ReadCloser = &BodyWrapper{}\n\n// BodyWrapper wraps a http.Request.Body (an io.ReadCloser) to track the number\n// of bytes read and the last error.\ntype BodyWrapper struct {\n\tio.ReadCloser\n\tOnRead func(n int64) // must not be nil\n\n\tmu   sync.Mutex\n\tread int64\n\terr  error\n}\n\n// NewBodyWrapper creates a new BodyWrapper.\n//\n// The onRead attribute is a callback that will be called every time the data\n// is read, with the number of bytes being read.\nfunc NewBodyWrapper(body io.ReadCloser, onRead func(int64)) *BodyWrapper {\n\treturn &BodyWrapper{\n\t\tReadCloser: body,\n\t\tOnRead:     onRead,\n\t}\n}\n\n// Read reads the data from the io.ReadCloser, and stores the number of bytes\n// read and the error.\nfunc (w *BodyWrapper) Read(b []byte) (int, error) {\n\tn, err := w.ReadCloser.Read(b)\n\tn1 := int64(n)\n\n\tw.updateReadData(n1, err)\n\tw.OnRead(n1)\n\treturn n, err\n}\n\nfunc (w *BodyWrapper) updateReadData(n int64, err error) {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\tw.read += n\n\tif err != nil {\n\t\tw.err = err\n\t}\n}\n\n// Close closes the io.ReadCloser.\nfunc (w *BodyWrapper) Close() error {\n\treturn w.ReadCloser.Close()\n}\n\n// BytesRead returns the number of bytes read up to this point.\nfunc (w *BodyWrapper) BytesRead() int64 {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\treturn w.read\n}\n\n// Error returns the last error.\nfunc (w *BodyWrapper) Error() error {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\treturn w.err\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage request // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\"\n\n// Generate request package:\n//go:generate gotmpl --body=../../../../../../internal/shared/request/body_wrapper.go.tmpl \"--data={}\" --out=body_wrapper.go\n//go:generate gotmpl --body=../../../../../../internal/shared/request/body_wrapper_test.go.tmpl \"--data={}\" --out=body_wrapper_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/request/resp_writer_wrapper.go.tmpl \"--data={}\" --out=resp_writer_wrapper.go\n//go:generate gotmpl --body=../../../../../../internal/shared/request/resp_writer_wrapper_test.go.tmpl \"--data={}\" --out=resp_writer_wrapper_test.go\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go",
    "content": "// Code generated by gotmpl. DO NOT MODIFY.\n// source: internal/shared/request/resp_writer_wrapper.go.tmpl\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage request // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\"\n\nimport (\n\t\"net/http\"\n\t\"sync\"\n)\n\nvar _ http.ResponseWriter = &RespWriterWrapper{}\n\n// RespWriterWrapper wraps a http.ResponseWriter in order to track the number of\n// bytes written, the last error, and to catch the first written statusCode.\n// TODO: The wrapped http.ResponseWriter doesn't implement any of the optional\n// types (http.Hijacker, http.Pusher, http.CloseNotifier, etc)\n// that may be useful when using it in real life situations.\ntype RespWriterWrapper struct {\n\thttp.ResponseWriter\n\tOnWrite func(n int64) // must not be nil\n\n\tmu          sync.RWMutex\n\twritten     int64\n\tstatusCode  int\n\terr         error\n\twroteHeader bool\n}\n\n// NewRespWriterWrapper creates a new RespWriterWrapper.\n//\n// The onWrite attribute is a callback that will be called every time the data\n// is written, with the number of bytes that were written.\nfunc NewRespWriterWrapper(w http.ResponseWriter, onWrite func(int64)) *RespWriterWrapper {\n\treturn &RespWriterWrapper{\n\t\tResponseWriter: w,\n\t\tOnWrite:        onWrite,\n\t\tstatusCode:     http.StatusOK, // default status code in case the Handler doesn't write anything\n\t}\n}\n\n// Write writes the bytes array into the [ResponseWriter], and tracks the\n// number of bytes written and last error.\nfunc (w *RespWriterWrapper) Write(p []byte) (int, error) {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\tif !w.wroteHeader {\n\t\tw.writeHeader(http.StatusOK)\n\t}\n\n\tn, err := w.ResponseWriter.Write(p)\n\tn1 := int64(n)\n\tw.OnWrite(n1)\n\tw.written += n1\n\tw.err = err\n\treturn n, err\n}\n\n// WriteHeader persists initial statusCode for span attribution.\n// All calls to WriteHeader will be propagated to the underlying ResponseWriter\n// and will persist the statusCode from the first call.\n// Blocking consecutive calls to WriteHeader alters expected behavior and will\n// remove warning logs from net/http where developers will notice incorrect handler implementations.\nfunc (w *RespWriterWrapper) WriteHeader(statusCode int) {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\tw.writeHeader(statusCode)\n}\n\n// writeHeader persists the status code for span attribution, and propagates\n// the call to the underlying ResponseWriter.\n// It does not acquire a lock, and therefore assumes that is being handled by a\n// parent method.\nfunc (w *RespWriterWrapper) writeHeader(statusCode int) {\n\tif !w.wroteHeader {\n\t\tw.wroteHeader = true\n\t\tw.statusCode = statusCode\n\t}\n\tw.ResponseWriter.WriteHeader(statusCode)\n}\n\n// Flush implements [http.Flusher].\nfunc (w *RespWriterWrapper) Flush() {\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\n\tif !w.wroteHeader {\n\t\tw.writeHeader(http.StatusOK)\n\t}\n\n\tif f, ok := w.ResponseWriter.(http.Flusher); ok {\n\t\tf.Flush()\n\t}\n}\n\n// BytesWritten returns the number of bytes written.\nfunc (w *RespWriterWrapper) BytesWritten() int64 {\n\tw.mu.RLock()\n\tdefer w.mu.RUnlock()\n\n\treturn w.written\n}\n\n// StatusCode returns the HTTP status code that was sent.\nfunc (w *RespWriterWrapper) StatusCode() int {\n\tw.mu.RLock()\n\tdefer w.mu.RUnlock()\n\n\treturn w.statusCode\n}\n\n// Error returns the last error.\nfunc (w *RespWriterWrapper) Error() error {\n\tw.mu.RLock()\n\tdefer w.mu.RUnlock()\n\n\treturn w.err\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go",
    "content": "// Code generated by gotmpl. DO NOT MODIFY.\n// source: internal/shared/semconv/client.go.tmpl\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package semconv provides OpenTelemetry semantic convention types and\n// functionality.\npackage semconv // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\t\"go.opentelemetry.io/otel/semconv/v1.39.0/httpconv\"\n)\n\ntype HTTPClient struct{\n\trequestBodySize httpconv.ClientRequestBodySize\n\trequestDuration httpconv.ClientRequestDuration\n}\n\nfunc NewHTTPClient(meter metric.Meter) HTTPClient {\n\tclient := HTTPClient{}\n\n\tvar err error\n\tclient.requestBodySize, err = httpconv.NewClientRequestBodySize(meter)\n\thandleErr(err)\n\n\tclient.requestDuration, err = httpconv.NewClientRequestDuration(\n\t\tmeter,\n\t\tmetric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10),\n\t)\n\thandleErr(err)\n\n\treturn client\n}\n\nfunc (n HTTPClient) Status(code int) (codes.Code, string) {\n\tif code < 100 || code >= 600 {\n\t\treturn codes.Error, fmt.Sprintf(\"Invalid HTTP status code %d\", code)\n\t}\n\tif code >= 400 {\n\t\treturn codes.Error, \"\"\n\t}\n\treturn codes.Unset, \"\"\n}\n\n// RequestTraceAttrs returns trace attributes for an HTTP request made by a client.\nfunc (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue {\n\t/*\n\t\t below attributes are returned:\n\t\t - http.request.method\n\t\t - http.request.method.original\n\t\t - url.full\n\t\t - server.address\n\t\t - server.port\n\t\t - network.protocol.name\n\t\t - network.protocol.version\n\t*/\n\tnumOfAttributes := 3 // URL, server address, proto, and method.\n\n\tvar urlHost string\n\tif req.URL != nil {\n\t\turlHost = req.URL.Host\n\t}\n\tvar requestHost string\n\tvar requestPort int\n\tfor _, hostport := range []string{urlHost, req.Header.Get(\"Host\")} {\n\t\trequestHost, requestPort = SplitHostPort(hostport)\n\t\tif requestHost != \"\" || requestPort > 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\teligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == \"https\", requestPort)\n\tif eligiblePort > 0 {\n\t\tnumOfAttributes++\n\t}\n\tuseragent := req.UserAgent()\n\tif useragent != \"\" {\n\t\tnumOfAttributes++\n\t}\n\n\tprotoName, protoVersion := netProtocol(req.Proto)\n\tif protoName != \"\" && protoName != \"http\" {\n\t\tnumOfAttributes++\n\t}\n\tif protoVersion != \"\" {\n\t\tnumOfAttributes++\n\t}\n\n\tmethod, originalMethod := n.method(req.Method)\n\tif originalMethod != (attribute.KeyValue{}) {\n\t\tnumOfAttributes++\n\t}\n\n\tattrs := make([]attribute.KeyValue, 0, numOfAttributes)\n\n\tattrs = append(attrs, method)\n\tif originalMethod != (attribute.KeyValue{}) {\n\t\tattrs = append(attrs, originalMethod)\n\t}\n\n\tvar u string\n\tif req.URL != nil {\n\t\t// Remove any username/password info that may be in the URL.\n\t\tuserinfo := req.URL.User\n\t\treq.URL.User = nil\n\t\tu = req.URL.String()\n\t\t// Restore any username/password info that was removed.\n\t\treq.URL.User = userinfo\n\t}\n\tattrs = append(attrs, semconv.URLFull(u))\n\n\tattrs = append(attrs, semconv.ServerAddress(requestHost))\n\tif eligiblePort > 0 {\n\t\tattrs = append(attrs, semconv.ServerPort(eligiblePort))\n\t}\n\n\tif protoName != \"\" && protoName != \"http\" {\n\t\tattrs = append(attrs, semconv.NetworkProtocolName(protoName))\n\t}\n\tif protoVersion != \"\" {\n\t\tattrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion))\n\t}\n\n\treturn attrs\n}\n\n// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client.\nfunc (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue {\n\t/*\n\t\t below attributes are returned:\n\t\t - http.response.status_code\n\t\t - error.type\n\t*/\n\tvar count int\n\tif resp.StatusCode > 0 {\n\t\tcount++\n\t}\n\n\tif isErrorStatusCode(resp.StatusCode) {\n\t\tcount++\n\t}\n\n\tattrs := make([]attribute.KeyValue, 0, count)\n\tif resp.StatusCode > 0 {\n\t\tattrs = append(attrs, semconv.HTTPResponseStatusCode(resp.StatusCode))\n\t}\n\n\tif isErrorStatusCode(resp.StatusCode) {\n\t\terrorType := strconv.Itoa(resp.StatusCode)\n\t\tattrs = append(attrs, semconv.ErrorTypeKey.String(errorType))\n\t}\n\treturn attrs\n}\n\nfunc (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {\n\tif method == \"\" {\n\t\treturn semconv.HTTPRequestMethodGet, attribute.KeyValue{}\n\t}\n\tif attr, ok := methodLookup[method]; ok {\n\t\treturn attr, attribute.KeyValue{}\n\t}\n\n\torig := semconv.HTTPRequestMethodOriginal(method)\n\tif attr, ok := methodLookup[strings.ToUpper(method)]; ok {\n\t\treturn attr, orig\n\t}\n\treturn semconv.HTTPRequestMethodGet, orig\n}\n\nfunc (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {\n\tnum := len(additionalAttributes) + 2\n\tvar h string\n\tif req.URL != nil {\n\t\th = req.URL.Host\n\t}\n\tvar requestHost string\n\tvar requestPort int\n\tfor _, hostport := range []string{h, req.Header.Get(\"Host\")} {\n\t\trequestHost, requestPort = SplitHostPort(hostport)\n\t\tif requestHost != \"\" || requestPort > 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tport := requiredHTTPPort(req.URL != nil && req.URL.Scheme == \"https\", requestPort)\n\tif port > 0 {\n\t\tnum++\n\t}\n\n\tprotoName, protoVersion := netProtocol(req.Proto)\n\tif protoName != \"\" {\n\t\tnum++\n\t}\n\tif protoVersion != \"\" {\n\t\tnum++\n\t}\n\n\tif statusCode > 0 {\n\t\tnum++\n\t}\n\n\tattributes := slices.Grow(additionalAttributes, num)\n\tattributes = append(attributes,\n\t\tsemconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)),\n\t\tsemconv.ServerAddress(requestHost),\n\t\tn.scheme(req),\n\t)\n\n\tif port > 0 {\n\t\tattributes = append(attributes, semconv.ServerPort(port))\n\t}\n\tif protoName != \"\" {\n\t\tattributes = append(attributes, semconv.NetworkProtocolName(protoName))\n\t}\n\tif protoVersion != \"\" {\n\t\tattributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion))\n\t}\n\n\tif statusCode > 0 {\n\t\tattributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode))\n\t}\n\treturn attributes\n}\n\ntype MetricOpts struct {\n\tmeasurement metric.MeasurementOption\n\taddOptions  metric.AddOption\n}\n\nfunc (o MetricOpts) MeasurementOption() metric.MeasurementOption {\n\treturn o.measurement\n}\n\nfunc (o MetricOpts) AddOptions() metric.AddOption {\n\treturn o.addOptions\n}\n\nfunc (n HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts {\n\topts := map[string]MetricOpts{}\n\n\tattributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes)\n\tset := metric.WithAttributeSet(attribute.NewSet(attributes...))\n\topts[\"new\"] = MetricOpts{\n\t\tmeasurement: set,\n\t\taddOptions:  set,\n\t}\n\n\treturn opts\n}\n\nfunc (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) {\n\tn.requestBodySize.Inst().Record(ctx, md.RequestSize, opts[\"new\"].MeasurementOption())\n\tn.requestDuration.Inst().Record(ctx, md.ElapsedTime/1000, opts[\"new\"].MeasurementOption())\n}\n\n// TraceAttributes returns attributes for httptrace.\nfunc (n HTTPClient) TraceAttributes(host string) []attribute.KeyValue {\n\treturn []attribute.KeyValue{\n\t\tsemconv.ServerAddress(host),\n\t}\n}\n\nfunc (n HTTPClient) scheme(req *http.Request) attribute.KeyValue {\n\tif req.URL != nil && req.URL.Scheme != \"\" {\n\t\treturn semconv.URLScheme(req.URL.Scheme)\n\t}\n\tif req.TLS != nil {\n\t\treturn semconv.URLScheme(\"https\")\n\t}\n\treturn semconv.URLScheme(\"http\")\n}\n\nfunc isErrorStatusCode(code int) bool {\n\treturn code >= 400 || code < 100\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n\n// Generate semconv package:\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/bench_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=bench_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/common_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=common_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/server.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=server.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/server_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=server_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/client.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=client.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/client_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=client_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconvtest_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=httpconvtest_test.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/util.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=util.go\n//go:generate gotmpl --body=../../../../../../internal/shared/semconv/util_test.go.tmpl \"--data={ \\\"pkg\\\": \\\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\\\" }\" --out=util_test.go\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go",
    "content": "// Code generated by gotmpl. DO NOT MODIFY.\n// source: internal/shared/semconv/server.go.tmpl\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package semconv provides OpenTelemetry semantic convention types and\n// functionality.\npackage semconv // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\t\"go.opentelemetry.io/otel/semconv/v1.39.0/httpconv\"\n)\n\ntype RequestTraceAttrsOpts struct {\n\t// If set, this is used as value for the \"http.client_ip\" attribute.\n\tHTTPClientIP string\n}\n\ntype ResponseTelemetry struct {\n\tStatusCode int\n\tReadBytes  int64\n\tReadError  error\n\tWriteBytes int64\n\tWriteError error\n}\n\ntype HTTPServer struct{\n\trequestBodySizeHistogram  httpconv.ServerRequestBodySize\n\tresponseBodySizeHistogram httpconv.ServerResponseBodySize\n\trequestDurationHistogram  httpconv.ServerRequestDuration\n}\n\nfunc NewHTTPServer(meter metric.Meter) HTTPServer {\n\tserver := HTTPServer{}\n\n\tvar err error\n\tserver.requestBodySizeHistogram, err = httpconv.NewServerRequestBodySize(meter)\n\thandleErr(err)\n\n\tserver.responseBodySizeHistogram, err = httpconv.NewServerResponseBodySize(meter)\n\thandleErr(err)\n\n\tserver.requestDurationHistogram, err = httpconv.NewServerRequestDuration(\n\t\tmeter,\n\t\tmetric.WithExplicitBucketBoundaries(\n\t\t\t0.005, 0.01, 0.025, 0.05, 0.075, 0.1,\n\t\t\t0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,\n\t\t),\n\t)\n\thandleErr(err)\n\treturn server\n}\n\n// Status returns a span status code and message for an HTTP status code\n// value returned by a server. Status codes in the 400-499 range are not\n// returned as errors.\nfunc (n HTTPServer) Status(code int) (codes.Code, string) {\n\tif code < 100 || code >= 600 {\n\t\treturn codes.Error, fmt.Sprintf(\"Invalid HTTP status code %d\", code)\n\t}\n\tif code >= 500 {\n\t\treturn codes.Error, \"\"\n\t}\n\treturn codes.Unset, \"\"\n}\n\n// RequestTraceAttrs returns trace attributes for an HTTP request received by a\n// server.\n//\n// The server must be the primary server name if it is known. For example this\n// would be the ServerName directive\n// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache\n// server, and the server_name directive\n// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an\n// nginx server. More generically, the primary server name would be the host\n// header value that matches the default virtual host of an HTTP server. It\n// should include the host identifier and if a port is used to route to the\n// server that port identifier should be included as an appropriate port\n// suffix.\n//\n// If the primary server name is not known, server should be an empty string.\n// The req Host will be used to determine the server instead.\nfunc (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue {\n\tcount := 3 // ServerAddress, Method, Scheme\n\n\tvar host string\n\tvar p int\n\tif server == \"\" {\n\t\thost, p = SplitHostPort(req.Host)\n\t} else {\n\t\t// Prioritize the primary server name.\n\t\thost, p = SplitHostPort(server)\n\t\tif p < 0 {\n\t\t\t_, p = SplitHostPort(req.Host)\n\t\t}\n\t}\n\n\thostPort := requiredHTTPPort(req.TLS != nil, p)\n\tif hostPort > 0 {\n\t\tcount++\n\t}\n\n\tmethod, methodOriginal := n.method(req.Method)\n\tif methodOriginal != (attribute.KeyValue{}) {\n\t\tcount++\n\t}\n\n\tscheme := n.scheme(req.TLS != nil)\n\n\tpeer, peerPort := SplitHostPort(req.RemoteAddr)\n\tif peer != \"\" {\n\t\t// The Go HTTP server sets RemoteAddr to \"IP:port\", this will not be a\n\t\t// file-path that would be interpreted with a sock family.\n\t\tcount++\n\t\tif peerPort > 0 {\n\t\t\tcount++\n\t\t}\n\t}\n\n\tuseragent := req.UserAgent()\n\tif useragent != \"\" {\n\t\tcount++\n\t}\n\n\t// For client IP, use, in order:\n\t// 1. The value passed in the options\n\t// 2. The value in the X-Forwarded-For header\n\t// 3. The peer address\n\tclientIP := opts.HTTPClientIP\n\tif clientIP == \"\" {\n\t\tclientIP = serverClientIP(req.Header.Get(\"X-Forwarded-For\"))\n\t\tif clientIP == \"\" {\n\t\t\tclientIP = peer\n\t\t}\n\t}\n\tif clientIP != \"\" {\n\t\tcount++\n\t}\n\n\tif req.URL != nil && req.URL.Path != \"\" {\n\t\tcount++\n\t}\n\n\tprotoName, protoVersion := netProtocol(req.Proto)\n\tif protoName != \"\" && protoName != \"http\" {\n\t\tcount++\n\t}\n\tif protoVersion != \"\" {\n\t\tcount++\n\t}\n\n\troute := httpRoute(req.Pattern)\n\tif route != \"\" {\n\t\tcount++\n\t}\n\n\tattrs := make([]attribute.KeyValue, 0, count)\n\tattrs = append(attrs,\n\t\tsemconv.ServerAddress(host),\n\t\tmethod,\n\t\tscheme,\n\t)\n\n\tif hostPort > 0 {\n\t\tattrs = append(attrs, semconv.ServerPort(hostPort))\n\t}\n\tif methodOriginal != (attribute.KeyValue{}) {\n\t\tattrs = append(attrs, methodOriginal)\n\t}\n\n\tif peer, peerPort := SplitHostPort(req.RemoteAddr); peer != \"\" {\n\t\t// The Go HTTP server sets RemoteAddr to \"IP:port\", this will not be a\n\t\t// file-path that would be interpreted with a sock family.\n\t\tattrs = append(attrs, semconv.NetworkPeerAddress(peer))\n\t\tif peerPort > 0 {\n\t\t\tattrs = append(attrs, semconv.NetworkPeerPort(peerPort))\n\t\t}\n\t}\n\n\tif useragent != \"\" {\n\t\tattrs = append(attrs, semconv.UserAgentOriginal(useragent))\n\t}\n\n\tif clientIP != \"\" {\n\t\tattrs = append(attrs, semconv.ClientAddress(clientIP))\n\t}\n\n\tif req.URL != nil && req.URL.Path != \"\" {\n\t\tattrs = append(attrs, semconv.URLPath(req.URL.Path))\n\t}\n\n\tif protoName != \"\" && protoName != \"http\" {\n\t\tattrs = append(attrs, semconv.NetworkProtocolName(protoName))\n\t}\n\tif protoVersion != \"\" {\n\t\tattrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion))\n\t}\n\n\tif route != \"\" {\n\t\tattrs = append(attrs, n.Route(route))\n\t}\n\n\treturn attrs\n}\n\nfunc (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue {\n\tattr := semconv.NetworkTransportPipe\n\tswitch network {\n\tcase \"tcp\", \"tcp4\", \"tcp6\":\n\t\tattr = semconv.NetworkTransportTCP\n\tcase \"udp\", \"udp4\", \"udp6\":\n\t\tattr = semconv.NetworkTransportUDP\n\tcase \"unix\", \"unixgram\", \"unixpacket\":\n\t\tattr = semconv.NetworkTransportUnix\n\t}\n\n\treturn []attribute.KeyValue{attr}\n}\n\ntype ServerMetricData struct {\n\tServerName   string\n\tResponseSize int64\n\n\tMetricData\n\tMetricAttributes\n}\n\ntype MetricAttributes struct {\n\tReq                  *http.Request\n\tStatusCode           int\n\tRoute                string\n\tAdditionalAttributes []attribute.KeyValue\n}\n\ntype MetricData struct {\n\tRequestSize int64\n\n\t// The request duration, in milliseconds\n\tElapsedTime float64\n}\n\nvar (\n\tmetricAddOptionPool = &sync.Pool{\n\t\tNew: func() any {\n\t\t\treturn &[]metric.AddOption{}\n\t\t},\n\t}\n\n\tmetricRecordOptionPool = &sync.Pool{\n\t\tNew: func() any {\n\t\t\treturn &[]metric.RecordOption{}\n\t\t},\n\t}\n)\n\nfunc (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {\n\tattributes := n.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.Route, md.AdditionalAttributes)\n\to := metric.WithAttributeSet(attribute.NewSet(attributes...))\n\trecordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption)\n\t*recordOpts = append(*recordOpts, o)\n\tn.requestBodySizeHistogram.Inst().Record(ctx, md.RequestSize, *recordOpts...)\n\tn.responseBodySizeHistogram.Inst().Record(ctx, md.ResponseSize, *recordOpts...)\n\tn.requestDurationHistogram.Inst().Record(ctx, md.ElapsedTime/1000.0, o)\n\t*recordOpts = (*recordOpts)[:0]\n\tmetricRecordOptionPool.Put(recordOpts)\n}\n\nfunc (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {\n\tif method == \"\" {\n\t\treturn semconv.HTTPRequestMethodGet, attribute.KeyValue{}\n\t}\n\tif attr, ok := methodLookup[method]; ok {\n\t\treturn attr, attribute.KeyValue{}\n\t}\n\n\torig := semconv.HTTPRequestMethodOriginal(method)\n\tif attr, ok := methodLookup[strings.ToUpper(method)]; ok {\n\t\treturn attr, orig\n\t}\n\treturn semconv.HTTPRequestMethodGet, orig\n}\n\nfunc (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // ignore linter\n\tif https {\n\t\treturn semconv.URLScheme(\"https\")\n\t}\n\treturn semconv.URLScheme(\"http\")\n}\n\n// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP\n// response.\n//\n// If any of the fields in the ResponseTelemetry are not set the attribute will\n// be omitted.\nfunc (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue {\n\tvar count int\n\n\tif resp.ReadBytes > 0 {\n\t\tcount++\n\t}\n\tif resp.WriteBytes > 0 {\n\t\tcount++\n\t}\n\tif resp.StatusCode > 0 {\n\t\tcount++\n\t}\n\n\tattributes := make([]attribute.KeyValue, 0, count)\n\n\tif resp.ReadBytes > 0 {\n\t\tattributes = append(attributes,\n\t\t\tsemconv.HTTPRequestBodySize(int(resp.ReadBytes)),\n\t\t)\n\t}\n\tif resp.WriteBytes > 0 {\n\t\tattributes = append(attributes,\n\t\t\tsemconv.HTTPResponseBodySize(int(resp.WriteBytes)),\n\t\t)\n\t}\n\tif resp.StatusCode > 0 {\n\t\tattributes = append(attributes,\n\t\t\tsemconv.HTTPResponseStatusCode(resp.StatusCode),\n\t\t)\n\t}\n\n\treturn attributes\n}\n\n// Route returns the attribute for the route.\nfunc (n HTTPServer) Route(route string) attribute.KeyValue {\n\treturn semconv.HTTPRoute(route)\n}\n\nfunc (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, route string, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {\n\tnum := len(additionalAttributes) + 3\n\tvar host string\n\tvar p int\n\tif server == \"\" {\n\t\thost, p = SplitHostPort(req.Host)\n\t} else {\n\t\t// Prioritize the primary server name.\n\t\thost, p = SplitHostPort(server)\n\t\tif p < 0 {\n\t\t\t_, p = SplitHostPort(req.Host)\n\t\t}\n\t}\n\thostPort := requiredHTTPPort(req.TLS != nil, p)\n\tif hostPort > 0 {\n\t\tnum++\n\t}\n\tprotoName, protoVersion := netProtocol(req.Proto)\n\tif protoName != \"\" {\n\t\tnum++\n\t}\n\tif protoVersion != \"\" {\n\t\tnum++\n\t}\n\n\tif statusCode > 0 {\n\t\tnum++\n\t}\n\n\tif route != \"\" {\n        num++\n    }\n\n\tattributes := slices.Grow(additionalAttributes, num)\n\tattributes = append(attributes,\n\t\tsemconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)),\n\t\tn.scheme(req.TLS != nil),\n\t\tsemconv.ServerAddress(host))\n\n\tif hostPort > 0 {\n\t\tattributes = append(attributes, semconv.ServerPort(hostPort))\n\t}\n\tif protoName != \"\" {\n\t\tattributes = append(attributes, semconv.NetworkProtocolName(protoName))\n\t}\n\tif protoVersion != \"\" {\n\t\tattributes = append(attributes, semconv.NetworkProtocolVersion(protoVersion))\n\t}\n\n\tif statusCode > 0 {\n\t\tattributes = append(attributes, semconv.HTTPResponseStatusCode(statusCode))\n\t}\n\n\tif route != \"\" {\n        attributes = append(attributes, semconv.HTTPRoute(route))\n    }\n\treturn attributes\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go",
    "content": "// Code generated by gotmpl. DO NOT MODIFY.\n// source: internal/shared/semconv/util.go.tmpl\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"go.opentelemetry.io/otel\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\tsemconvNew \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n)\n\n// SplitHostPort splits a network address hostport of the form \"host\",\n// \"host%zone\", \"[host]\", \"[host%zone], \"host:port\", \"host%zone:port\",\n// \"[host]:port\", \"[host%zone]:port\", or \":port\" into host or host%zone and\n// port.\n//\n// An empty host is returned if it is not provided or unparsable. A negative\n// port is returned if it is not provided or unparsable.\nfunc SplitHostPort(hostport string) (host string, port int) {\n\tport = -1\n\n\tif strings.HasPrefix(hostport, \"[\") {\n\t\taddrEnd := strings.LastIndexByte(hostport, ']')\n\t\tif addrEnd < 0 {\n\t\t\t// Invalid hostport.\n\t\t\treturn\n\t\t}\n\t\tif i := strings.LastIndexByte(hostport[addrEnd:], ':'); i < 0 {\n\t\t\thost = hostport[1:addrEnd]\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tif i := strings.LastIndexByte(hostport, ':'); i < 0 {\n\t\t\thost = hostport\n\t\t\treturn\n\t\t}\n\t}\n\n\thost, pStr, err := net.SplitHostPort(hostport)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tp, err := strconv.ParseUint(pStr, 10, 16)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn host, int(p) //nolint:gosec  // Byte size checked 16 above.\n}\n\nfunc requiredHTTPPort(https bool, port int) int { //nolint:revive // ignore linter\n\tif https {\n\t\tif port > 0 && port != 443 {\n\t\t\treturn port\n\t\t}\n\t} else {\n\t\tif port > 0 && port != 80 {\n\t\t\treturn port\n\t\t}\n\t}\n\treturn -1\n}\n\nfunc serverClientIP(xForwardedFor string) string {\n\tif idx := strings.IndexByte(xForwardedFor, ','); idx >= 0 {\n\t\txForwardedFor = xForwardedFor[:idx]\n\t}\n\treturn xForwardedFor\n}\n\nfunc httpRoute(pattern string) string {\n\tif idx := strings.IndexByte(pattern, '/'); idx >= 0 {\n\t\treturn pattern[idx:]\n\t}\n\treturn \"\"\n}\n\nfunc netProtocol(proto string) (name string, version string) {\n\tname, version, _ = strings.Cut(proto, \"/\")\n\tswitch name {\n\tcase \"HTTP\":\n\t\tname = \"http\"\n\tcase \"QUIC\":\n\t\tname = \"quic\"\n\tcase \"SPDY\":\n\t\tname = \"spdy\"\n\tdefault:\n\t\tname = strings.ToLower(name)\n\t}\n\treturn name, version\n}\n\nvar methodLookup = map[string]attribute.KeyValue{\n\thttp.MethodConnect: semconvNew.HTTPRequestMethodConnect,\n\thttp.MethodDelete:  semconvNew.HTTPRequestMethodDelete,\n\thttp.MethodGet:     semconvNew.HTTPRequestMethodGet,\n\thttp.MethodHead:    semconvNew.HTTPRequestMethodHead,\n\thttp.MethodOptions: semconvNew.HTTPRequestMethodOptions,\n\thttp.MethodPatch:   semconvNew.HTTPRequestMethodPatch,\n\thttp.MethodPost:    semconvNew.HTTPRequestMethodPost,\n\thttp.MethodPut:     semconvNew.HTTPRequestMethodPut,\n\thttp.MethodTrace:   semconvNew.HTTPRequestMethodTrace,\n}\n\nfunc handleErr(err error) {\n\tif err != nil {\n\t\totel.Handle(err)\n\t}\n}\n\nfunc standardizeHTTPMethod(method string) string {\n\tmethod = strings.ToUpper(method)\n\tswitch method {\n\tcase http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace:\n\tdefault:\n\t\tmethod = \"_OTHER\"\n\t}\n\treturn method\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n)\n\n// Labeler is used to allow instrumented HTTP handlers to add custom attributes to\n// the metrics recorded by the net/http instrumentation.\ntype Labeler struct {\n\tmu         sync.Mutex\n\tattributes []attribute.KeyValue\n}\n\n// Add attributes to a Labeler.\nfunc (l *Labeler) Add(ls ...attribute.KeyValue) {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tl.attributes = append(l.attributes, ls...)\n}\n\n// Get returns a copy of the attributes added to the Labeler.\nfunc (l *Labeler) Get() []attribute.KeyValue {\n\tl.mu.Lock()\n\tdefer l.mu.Unlock()\n\tret := make([]attribute.KeyValue, len(l.attributes))\n\tcopy(ret, l.attributes)\n\treturn ret\n}\n\ntype labelerContextKeyType int\n\nconst labelerContextKey labelerContextKeyType = 0\n\n// ContextWithLabeler returns a new context with the provided Labeler instance.\n// Attributes added to the specified labeler will be injected into metrics\n// emitted by the instrumentation. Only one labeller can be injected into the\n// context. Injecting it multiple times will override the previous calls.\nfunc ContextWithLabeler(parent context.Context, l *Labeler) context.Context {\n\treturn context.WithValue(parent, labelerContextKey, l)\n}\n\n// LabelerFromContext retrieves a Labeler instance from the provided context if\n// one is available.  If no Labeler was found in the provided context a new, empty\n// Labeler is returned and the second return value is false.  In this case it is\n// safe to use the Labeler but any attributes added to it will not be used.\nfunc LabelerFromContext(ctx context.Context) (*Labeler, bool) {\n\tl, ok := ctx.Value(labelerContextKey).(*Labeler)\n\tif !ok {\n\t\tl = &Labeler{}\n\t}\n\treturn l, ok\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"context\"\n\t\"time\"\n)\n\ntype startTimeContextKeyType int\n\nconst startTimeContextKey startTimeContextKeyType = 0\n\n// ContextWithStartTime returns a new context with the provided start time. The\n// start time will be used for metrics and traces emitted by the\n// instrumentation. Only one labeller can be injected into the context.\n// Injecting it multiple times will override the previous calls.\nfunc ContextWithStartTime(parent context.Context, start time.Time) context.Context {\n\treturn context.WithValue(parent, startTimeContextKey, start)\n}\n\n// StartTimeFromContext retrieves a time.Time from the provided context if one\n// is available. If no start time was found in the provided context, a new,\n// zero start time is returned and the second return value is false.\nfunc StartTimeFromContext(ctx context.Context) time.Time {\n\tt, _ := ctx.Value(startTimeContextKey).(time.Time)\n\treturn t\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/http/httptrace\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"go.opentelemetry.io/otel\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/propagation\"\n\totelsemconv \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\t\"go.opentelemetry.io/otel/trace\"\n\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\"\n\t\"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\"\n)\n\n// Transport implements the http.RoundTripper interface and wraps\n// outbound HTTP(S) requests with a span and enriches it with metrics.\ntype Transport struct {\n\trt http.RoundTripper\n\n\ttracer             trace.Tracer\n\tpropagators        propagation.TextMapPropagator\n\tspanStartOptions   []trace.SpanStartOption\n\tfilters            []Filter\n\tspanNameFormatter  func(string, *http.Request) string\n\tclientTrace        func(context.Context) *httptrace.ClientTrace\n\tmetricAttributesFn func(*http.Request) []attribute.KeyValue\n\n\tsemconv semconv.HTTPClient\n}\n\nvar _ http.RoundTripper = &Transport{}\n\n// NewTransport wraps the provided http.RoundTripper with one that\n// starts a span, injects the span context into the outbound request headers,\n// and enriches it with metrics.\n//\n// If the provided http.RoundTripper is nil, http.DefaultTransport will be used\n// as the base http.RoundTripper.\nfunc NewTransport(base http.RoundTripper, opts ...Option) *Transport {\n\tif base == nil {\n\t\tbase = http.DefaultTransport\n\t}\n\n\tt := Transport{\n\t\trt: base,\n\t}\n\n\tdefaultOpts := []Option{\n\t\tWithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)),\n\t\tWithSpanNameFormatter(defaultTransportFormatter),\n\t}\n\n\tc := newConfig(append(defaultOpts, opts...)...)\n\tt.applyConfig(c)\n\n\treturn &t\n}\n\nfunc (t *Transport) applyConfig(c *config) {\n\tt.tracer = c.Tracer\n\tt.propagators = c.Propagators\n\tt.spanStartOptions = c.SpanStartOptions\n\tt.filters = c.Filters\n\tt.spanNameFormatter = c.SpanNameFormatter\n\tt.clientTrace = c.ClientTrace\n\tt.semconv = semconv.NewHTTPClient(c.Meter)\n\tt.metricAttributesFn = c.MetricAttributesFn\n}\n\nfunc defaultTransportFormatter(_ string, r *http.Request) string {\n\treturn \"HTTP \" + r.Method\n}\n\n// RoundTrip creates a Span and propagates its context via the provided request's headers\n// before handing the request to the configured base RoundTripper. The created span will\n// end when the response body is closed or when a read from the body returns io.EOF.\n// If GetBody returns an error, the error is reported via otel.Handle and the request\n// continues with the original Body.\nfunc (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {\n\trequestStartTime := time.Now()\n\tfor _, f := range t.filters {\n\t\tif !f(r) {\n\t\t\t// Simply pass through to the base RoundTripper if a filter rejects the request\n\t\t\treturn t.rt.RoundTrip(r)\n\t\t}\n\t}\n\n\ttracer := t.tracer\n\n\tif tracer == nil {\n\t\tif span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() {\n\t\t\ttracer = newTracer(span.TracerProvider())\n\t\t} else {\n\t\t\ttracer = newTracer(otel.GetTracerProvider())\n\t\t}\n\t}\n\n\topts := append([]trace.SpanStartOption{}, t.spanStartOptions...) // start with the configured options\n\n\tctx, span := tracer.Start(r.Context(), t.spanNameFormatter(\"\", r), opts...)\n\n\tif t.clientTrace != nil {\n\t\tctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx))\n\t}\n\n\tlabeler, found := LabelerFromContext(ctx)\n\tif !found {\n\t\tctx = ContextWithLabeler(ctx, labeler)\n\t}\n\n\tr = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request.\n\n\t// GetBody is preferred over direct access to Body if the function is set.\n\t// If the resulting body is nil or is NoBody, we don't want to mutate the body as it\n\t// will affect the identity of it in an unforeseeable way because we assert\n\t// ReadCloser fulfills a certain interface and it is indeed nil or NoBody.\n\tbody := r.Body\n\tif r.GetBody != nil {\n\t\tb, err := r.GetBody()\n\t\tif err != nil {\n\t\t\totel.Handle(fmt.Errorf(\"http.Request GetBody returned an error: %w\", err))\n\t\t} else {\n\t\t\tbody = b\n\t\t}\n\t}\n\n\tbw := request.NewBodyWrapper(body, func(int64) {})\n\tif body != nil && body != http.NoBody {\n\t\tr.Body = bw\n\t}\n\n\tspan.SetAttributes(t.semconv.RequestTraceAttrs(r)...)\n\tt.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))\n\n\tres, err := t.rt.RoundTrip(r)\n\n\t// Defer metrics recording function to record the metrics on error or no error.\n\tdefer func() {\n\t\tmetricAttributes := semconv.MetricAttributes{\n\t\t\tReq:                  r,\n\t\t\tAdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...),\n\t\t}\n\n\t\tif err == nil {\n\t\t\tmetricAttributes.StatusCode = res.StatusCode\n\t\t}\n\n\t\tmetricOpts := t.semconv.MetricOptions(metricAttributes)\n\n\t\tmetricData := semconv.MetricData{\n\t\t\tRequestSize: bw.BytesRead(),\n\t\t}\n\n\t\tif err == nil {\n\t\t\treadRecordFunc := func(int64) {}\n\t\t\tres.Body = newWrappedBody(span, readRecordFunc, res.Body)\n\t\t}\n\n\t\t// Use floating point division here for higher precision (instead of Millisecond method).\n\t\telapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)\n\n\t\tmetricData.ElapsedTime = elapsedTime\n\n\t\tt.semconv.RecordMetrics(ctx, metricData, metricOpts)\n\t}()\n\n\tif err != nil {\n\t\tspan.SetAttributes(otelsemconv.ErrorType(err))\n\t\tspan.SetStatus(codes.Error, err.Error())\n\t\tspan.End()\n\n\t\treturn res, err\n\t}\n\n\t// traces\n\tspan.SetAttributes(t.semconv.ResponseTraceAttrs(res)...)\n\tspan.SetStatus(t.semconv.Status(res.StatusCode))\n\n\treturn res, nil\n}\n\nfunc (t *Transport) metricAttributesFromRequest(r *http.Request) []attribute.KeyValue {\n\tvar attributeForRequest []attribute.KeyValue\n\tif t.metricAttributesFn != nil {\n\t\tattributeForRequest = t.metricAttributesFn(r)\n\t}\n\treturn attributeForRequest\n}\n\n// newWrappedBody returns a new and appropriately scoped *wrappedBody as an\n// io.ReadCloser. If the passed body implements io.Writer, the returned value\n// will implement io.ReadWriteCloser.\nfunc newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser {\n\t// The successful protocol switch responses will have a body that\n\t// implement an io.ReadWriteCloser. Ensure this interface type continues\n\t// to be satisfied if that is the case.\n\tif _, ok := body.(io.ReadWriteCloser); ok {\n\t\treturn &wrappedBody{span: span, record: record, body: body}\n\t}\n\n\t// Remove the implementation of the io.ReadWriteCloser and only implement\n\t// the io.ReadCloser.\n\treturn struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}}\n}\n\n// wrappedBody is the response body type returned by the transport\n// instrumentation to complete a span. Errors encountered when using the\n// response body are recorded in span tracking the response.\n//\n// The span tracking the response is ended when this body is closed.\n//\n// If the response body implements the io.Writer interface (i.e. for\n// successful protocol switches), the wrapped body also will.\ntype wrappedBody struct {\n\tspan     trace.Span\n\trecorded atomic.Bool\n\trecord   func(n int64)\n\tbody     io.ReadCloser\n\tread     atomic.Int64\n}\n\nvar _ io.ReadWriteCloser = &wrappedBody{}\n\nfunc (wb *wrappedBody) Write(p []byte) (int, error) {\n\t// This will not panic given the guard in newWrappedBody.\n\tn, err := wb.body.(io.Writer).Write(p)\n\tif err != nil {\n\t\twb.span.SetAttributes(otelsemconv.ErrorType(err))\n\t\twb.span.SetStatus(codes.Error, err.Error())\n\t}\n\treturn n, err\n}\n\nfunc (wb *wrappedBody) Read(b []byte) (int, error) {\n\tn, err := wb.body.Read(b)\n\t// Record the number of bytes read\n\twb.read.Add(int64(n))\n\n\tswitch err {\n\tcase nil:\n\t\t// nothing to do here but fall through to the return\n\tcase io.EOF:\n\t\twb.recordBytesRead()\n\t\twb.span.End()\n\tdefault:\n\t\twb.span.SetAttributes(otelsemconv.ErrorType(err))\n\t\twb.span.SetStatus(codes.Error, err.Error())\n\t}\n\treturn n, err\n}\n\n// recordBytesRead is a function that ensures the number of bytes read is recorded once and only once.\nfunc (wb *wrappedBody) recordBytesRead() {\n\t// note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that\n\t// two goroutines are racing to call this method, the number of bytes read will no longer increase. Using\n\t// CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish\n\t// calling wb.record(wb.read.Load()).\n\tif wb.recorded.CompareAndSwap(false, true) {\n\t\t// Record the total number of bytes read\n\t\twb.record(wb.read.Load())\n\t}\n}\n\nfunc (wb *wrappedBody) Close() error {\n\twb.recordBytesRead()\n\twb.span.End()\n\tif wb.body != nil {\n\t\treturn wb.body.Close()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otelhttp // import \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\"\n\n// Version is the current release version of the otelhttp instrumentation.\nconst Version = \"0.65.0\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.clomonitor.yml",
    "content": "exemptions:\n  - check: artifacthub_badge\n    reason: \"Artifact Hub doesn't support Go packages\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.codespellignore",
    "content": "ot\nfo\nte\ncollison\nconsequentially\nans\nnam\nvalu\nthirdparty\naddOpt\nobserv\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.codespellrc",
    "content": "# https://github.com/codespell-project/codespell\n[codespell]\nbuiltin = clear,rare,informal\ncheck-filenames =\ncheck-hidden =\nignore-words = .codespellignore\ninteractive = 1\nskip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools\nuri-ignore-words-list = *\nwrite =\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.gitattributes",
    "content": "* text=auto eol=lf\n*.{cmd,[cC][mM][dD]} text eol=crlf\n*.{bat,[bB][aA][tT]} text eol=crlf\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.gitignore",
    "content": ".DS_Store\nThumbs.db\n\n.cache/\n.tools/\nvenv/\n.idea/\n.vscode/\n*.iml\n*.so\ncoverage.*\ngo.work\ngo.work.sum\n\ngen/\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.golangci.yml",
    "content": "version: \"2\"\nrun:\n  issues-exit-code: 1\n  tests: true\nlinters:\n  default: none\n  enable:\n    - asasalint\n    - bodyclose\n    - depguard\n    - errcheck\n    - errorlint\n    - gocritic\n    - godot\n    - gosec\n    - govet\n    - ineffassign\n    - misspell\n    - modernize\n    - perfsprint\n    - revive\n    - staticcheck\n    - testifylint\n    - unconvert\n    - unparam\n    - unused\n    - usestdlibvars\n    - usetesting\n  settings:\n    depguard:\n      rules:\n        auto/sdk:\n          files:\n            - '!internal/global/trace.go'\n            - ~internal/global/trace_test.go\n          deny:\n            - pkg: go.opentelemetry.io/auto/sdk\n              desc: Do not use SDK from automatic instrumentation.\n        non-tests:\n          files:\n            - '!$test'\n            - '!**/*test/*.go'\n            - '!**/internal/matchers/*.go'\n          deny:\n            - pkg: testing\n            - pkg: github.com/stretchr/testify\n            - pkg: crypto/md5\n            - pkg: crypto/sha1\n            - pkg: crypto/**/pkix\n        otel-internal:\n          files:\n            - '**/sdk/*.go'\n            - '**/sdk/**/*.go'\n            - '**/exporters/*.go'\n            - '**/exporters/**/*.go'\n            - '**/schema/*.go'\n            - '**/schema/**/*.go'\n            - '**/metric/*.go'\n            - '**/metric/**/*.go'\n            - '**/bridge/*.go'\n            - '**/bridge/**/*.go'\n            - '**/trace/*.go'\n            - '**/trace/**/*.go'\n            - '**/log/*.go'\n            - '**/log/**/*.go'\n          deny:\n            - pkg: go.opentelemetry.io/otel/internal$\n              desc: Do not use cross-module internal packages.\n            - pkg: go.opentelemetry.io/otel/internal/internaltest\n              desc: Do not use cross-module internal packages.\n        otlp-internal:\n          files:\n            - '!**/exporters/otlp/internal/**/*.go'\n          deny:\n            - pkg: go.opentelemetry.io/otel/exporters/otlp/internal\n              desc: Do not use cross-module internal packages.\n        otlpmetric-internal:\n          files:\n            - '!**/exporters/otlp/otlpmetric/internal/*.go'\n            - '!**/exporters/otlp/otlpmetric/internal/**/*.go'\n          deny:\n            - pkg: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal\n              desc: Do not use cross-module internal packages.\n        otlptrace-internal:\n          files:\n            - '!**/exporters/otlp/otlptrace/*.go'\n            - '!**/exporters/otlp/otlptrace/internal/**.go'\n          deny:\n            - pkg: go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal\n              desc: Do not use cross-module internal packages.\n    gocritic:\n      disabled-checks:\n        - appendAssign\n        - commentedOutCode\n        - dupArg\n        - hugeParam\n        - importShadow\n        - preferDecodeRune\n        - rangeValCopy\n        - unnamedResult\n        - whyNoLint\n      enable-all: true\n    godot:\n      exclude:\n        # Exclude links.\n        - '^ *\\[[^]]+\\]:'\n        # Exclude sentence fragments for lists.\n        - ^[ ]*[-•]\n        # Exclude sentences prefixing a list.\n        - :$\n    misspell:\n      locale: US\n      ignore-rules:\n        - cancelled\n    modernize:\n      disable:\n        - omitzero\n    perfsprint:\n      int-conversion: true\n      err-error: true\n      errorf: true\n      sprintf1: true\n      strconcat: true\n    revive:\n      confidence: 0.01\n      rules:\n        - name: blank-imports\n        - name: bool-literal-in-expr\n        - name: constant-logical-expr\n        - name: context-as-argument\n          arguments:\n            - allowTypesBefore: '*testing.T'\n          disabled: true\n        - name: context-keys-type\n        - name: deep-exit\n        - name: defer\n          arguments:\n            - - call-chain\n              - loop\n        - name: dot-imports\n        - name: duplicated-imports\n        - name: early-return\n          arguments:\n            - preserveScope\n        - name: empty-block\n        - name: empty-lines\n        - name: error-naming\n        - name: error-return\n        - name: error-strings\n        - name: errorf\n        - name: exported\n          arguments:\n            - sayRepetitiveInsteadOfStutters\n        - name: flag-parameter\n        - name: identical-branches\n        - name: if-return\n        - name: import-shadowing\n        - name: increment-decrement\n        - name: indent-error-flow\n          arguments:\n            - preserveScope\n        - name: package-comments\n        - name: range\n        - name: range-val-in-closure\n        - name: range-val-address\n        - name: redefines-builtin-id\n        - name: string-format\n          arguments:\n            - - panic\n              - /^[^\\n]*$/\n              - must not contain line breaks\n        - name: struct-tag\n        - name: superfluous-else\n          arguments:\n            - preserveScope\n        - name: time-equal\n        - name: unconditional-recursion\n        - name: unexported-return\n        - name: unhandled-error\n          arguments:\n            - fmt.Fprint\n            - fmt.Fprintf\n            - fmt.Fprintln\n            - fmt.Print\n            - fmt.Printf\n            - fmt.Println\n        - name: unused-parameter\n        - name: unused-receiver\n        - name: unnecessary-stmt\n        - name: use-any\n        - name: useless-break\n        - name: var-declaration\n        - name: var-naming\n          arguments:\n            - [\"ID\"] # AllowList\n            - [\"Otel\", \"Aws\", \"Gcp\"] # DenyList\n        - name: waitgroup-by-value\n    testifylint:\n      enable-all: true\n      disable:\n        - float-compare\n        - go-require\n        - require-error\n    usetesting:\n      context-background: true\n      context-todo: true\n  exclusions:\n    generated: lax\n    presets:\n      - common-false-positives\n      - legacy\n      - std-error-handling\n    rules:\n      - linters:\n          - revive\n        path: schema/v.*/types/.*\n        text: avoid meaningless package names\n      # TODO: Having appropriate comments for exported objects helps development,\n      # even for objects in internal packages. Appropriate comments for all\n      # exported objects should be added and this exclusion removed.\n      - linters:\n          - revive\n        path: .*internal/.*\n        text: exported (method|function|type|const) (.+) should have comment or be unexported\n      # Yes, they are, but it's okay in a test.\n      - linters:\n          - revive\n        path: _test\\.go\n        text: exported func.*returns unexported type.*which can be annoying to use\n      # Example test functions should be treated like main.\n      - linters:\n          - revive\n        path: example.*_test\\.go\n        text: calls to (.+) only in main[(][)] or init[(][)] functions\n      # It's okay to not run gosec and perfsprint in a test.\n      - linters:\n          - gosec\n          - perfsprint\n        path: _test\\.go\n      # Ignoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand)\n      # as we commonly use it in tests and examples.\n      - linters:\n          - gosec\n        text: 'G404:'\n      # Ignoring gosec G402: TLS MinVersion too low\n      # as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well.\n      - linters:\n          - gosec\n        text: 'G402: TLS MinVersion too low.'\nissues:\n  max-issues-per-linter: 0\n  max-same-issues: 0\nformatters:\n  enable:\n    - gofumpt\n    - goimports\n    - golines\n  settings:\n    gofumpt:\n      extra-rules: true\n    goimports:\n      local-prefixes:\n        - go.opentelemetry.io/otel\n    golines:\n      max-len: 120\n  exclusions:\n    generated: lax\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.lycheeignore",
    "content": "http://localhost\nhttps://localhost\nhttp://jaeger-collector\nhttps://github.com/open-telemetry/opentelemetry-go/milestone/\nhttps://github.com/open-telemetry/opentelemetry-go/projects\n# Weaver model URL for semantic-conventions repository.\nhttps?:\\/\\/github\\.com\\/open-telemetry\\/semantic-conventions\\/archive\\/refs\\/tags\\/[^.]+\\.zip\\[[^]]+]\nfile:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries\nfile:///home/runner/work/opentelemetry-go/opentelemetry-go/manual\nhttp://4.3.2.1:78/user/123\nfile:///home/runner/work/opentelemetry-go/opentelemetry-go/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/dns:/:4317\n# URL works, but it has blocked link checkers.\nhttps://dl.acm.org/doi/10.1145/198429.198435\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/.markdownlint.yaml",
    "content": "# Default state for all rules\ndefault: true\n\n# ul-style\nMD004: false\n\n# hard-tabs\nMD010: false\n\n# line-length\nMD013: false\n\n# no-duplicate-header\nMD024:\n  siblings_only: true\n\n#single-title\nMD025: false\n\n# ol-prefix\nMD029:\n  style: ordered\n\n# no-inline-html\nMD033: false\n\n# fenced-code-language\nMD040: false\n\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\nThis project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n<!-- Released section -->\n<!-- Don't change this section unless doing release -->\n\n## [1.40.0/0.62.0/0.16.0] 2026-02-02\n\n### Added\n\n- Add `AlwaysRecord` sampler in `go.opentelemetry.io/otel/sdk/trace`. (#7724)\n- Add `Enabled` method to all synchronous instrument interfaces (`Float64Counter`, `Float64UpDownCounter`, `Float64Histogram`, `Float64Gauge`, `Int64Counter`, `Int64UpDownCounter`, `Int64Histogram`, `Int64Gauge`,) in `go.opentelemetry.io/otel/metric`.\n  This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763)\n- Add `go.opentelemetry.io/otel/semconv/v1.39.0` package.\n  The package contains semantic conventions from the `v1.39.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.39.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.38.0.` (#7783, #7789)\n\n### Changed\n\n- Improve the concurrent performance of `HistogramReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` by 4x. (#7443)\n- Improve the concurrent performance of `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar`. (#7447)\n- Improve performance of concurrent histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7474)\n- Improve performance of concurrent synchronous gauge measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7478)\n- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`. (#7492)\n- `Exporter` in `go.opentelemetry.io/otel/exporters/prometheus` ignores metrics with the scope `go.opentelemetry.io/contrib/bridges/prometheus`.\n  This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688)\n- Improve performance of concurrent exponential histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7702)\n- The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854)\n- The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854)\n\n### Fixed\n\n- Fix bad log message when key-value pairs are dropped because of key duplication in `go.opentelemetry.io/otel/sdk/log`. (#7662)\n- Fix `DroppedAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not count the non-attribute key-value pairs dropped because of key duplication. (#7662)\n- Fix `SetAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not log that attributes are dropped when they are actually not dropped. (#7662)\n- Fix missing `request.GetBody` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` to correctly handle HTTP/2 `GOAWAY` frame. (#7794)\n- `WithHostID` detector in `go.opentelemetry.io/otel/sdk/resource` to use full path for `ioreg` command on Darwin (macOS). (#7818)\n\n### Deprecated\n\n- Deprecate `go.opentelemetry.io/otel/exporters/zipkin`.\n  For more information, see the [OTel blog post deprecating the Zipkin exporter](https://opentelemetry.io/blog/2025/deprecating-zipkin-exporters/). (#7670)\n\n## [1.39.0/0.61.0/0.15.0/0.0.14] 2025-12-05\n\n### Added\n\n- Greatly reduce the cost of recording metrics in `go.opentelemetry.io/otel/sdk/metric` using hashing for map keys. (#7175)\n- Add `WithInstrumentationAttributeSet` option to `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/trace` packages.\n  This provides a concurrent-safe and performant alternative to `WithInstrumentationAttributes` by accepting a pre-constructed `attribute.Set`. (#7287)\n- Add experimental observability for the Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus`.\n  Check the `go.opentelemetry.io/otel/exporters/prometheus/internal/x` package documentation for more information. (#7345)\n- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7353)\n- Add temporality selector functions `DeltaTemporalitySelector`, `CumulativeTemporalitySelector`, `LowMemoryTemporalitySelector` to `go.opentelemetry.io/otel/sdk/metric`. (#7434)\n- Add experimental observability metrics for simple log processor in `go.opentelemetry.io/otel/sdk/log`. (#7548)\n- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7459)\n- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7486)\n- Add experimental observability metrics for simple span processor in `go.opentelemetry.io/otel/sdk/trace`. (#7374)\n- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7512)\n- Add experimental observability metrics for manual reader in `go.opentelemetry.io/otel/sdk/metric`. (#7524)\n- Add experimental observability metrics for periodic reader in `go.opentelemetry.io/otel/sdk/metric`. (#7571)\n- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environmental variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7608)\n- Add `Enabled` method to the `Processor` interface in `go.opentelemetry.io/otel/sdk/log`.\n  All `Processor` implementations now include an `Enabled` method. (#7639)\n- The `go.opentelemetry.io/otel/semconv/v1.38.0` package.\n  The package contains semantic conventions from the `v1.38.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.38.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.37.0.`(#7648)\n\n### Changed\n\n- `Distinct` in `go.opentelemetry.io/otel/attribute` is no longer guaranteed to uniquely identify an attribute set.\n  Collisions between `Distinct` values for different Sets are possible with extremely high cardinality (billions of series per instrument), but are highly unlikely. (#7175)\n- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/trace` synchronously de-duplicates the passed attributes instead of delegating it to the returned `TracerOption`. (#7266)\n- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/meter` synchronously de-duplicates the passed attributes instead of delegating it to the returned `MeterOption`. (#7266)\n- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/log` synchronously de-duplicates the passed attributes instead of delegating it to the returned `LoggerOption`. (#7266)\n- Rename the `OTEL_GO_X_SELF_OBSERVABILITY` environment variable to `OTEL_GO_X_OBSERVABILITY` in `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7302)\n- Improve performance of histogram `Record` in `go.opentelemetry.io/otel/sdk/metric` when min and max are disabled using `NoMinMax`. (#7306)\n- Improve error handling for dropped data during translation by using `prometheus.NewInvalidMetric` in `go.opentelemetry.io/otel/exporters/prometheus`.\n  ⚠️ **Breaking Change:** Previously, these cases were only logged and scrapes succeeded.\n  Now, when translation would drop data (e.g., invalid label/value), the exporter emits a `NewInvalidMetric`, and Prometheus scrapes **fail with HTTP 500** by default.\n  To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with: `promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }`. (#7363)\n- Replace fnv hash with xxhash in `go.opentelemetry.io/otel/attribute` for better performance. (#7371)\n- The default `TranslationStrategy` in `go.opentelemetry.io/exporters/prometheus` is changed from `otlptranslator.NoUTF8EscapingWithSuffixes` to `otlptranslator.UnderscoreEscapingWithSuffixes`. (#7421)\n- Improve performance of concurrent measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7427)\n- Include W3C TraceFlags (bits 0–7) in the OTLP `Span.Flags` field in `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc`. (#7438)\n- The `ErrorType` function in `go.opentelemetry.io/otel/semconv/v1.37.0` now handles custom error types.\n  If an error implements an `ErrorType() string` method, the return value of that method will be used as the error type. (#7442)\n\n### Fixed\n\n- Fix `WithInstrumentationAttributes` options in `go.opentelemetry.io/otel/trace`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/log` to properly merge attributes when passed multiple times instead of replacing them.\n  Attributes with duplicate keys will use the last value passed. (#7300)\n- The equality of `attribute.Set` when using the `Equal` method is not affected by the user overriding the empty set pointed to by `attribute.EmptySet` in `go.opentelemetry.io/otel/attribute`. (#7357)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7372)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7372)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#7372)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#7372)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7372)\n- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7372)\n- Fix `AddAttributes`, `SetAttributes`, `SetBody` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not mutate input. (#7403)\n- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.37.0`. (#7655)\n- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.36.0`. (#7656)\n\n### Removed\n\n- Drop support for [Go 1.23]. (#7274)\n- Remove the `FilterProcessor` interface in `go.opentelemetry.io/otel/sdk/log`.\n  The `Enabled` method has been added to the `Processor` interface instead.\n  All `Processor` implementations must now implement the `Enabled` method.\n  Custom processors that do not filter records can implement `Enabled` to return `true`. (#7639)\n\n## [1.38.0/0.60.0/0.14.0/0.0.13] 2025-08-29\n\nThis release is the last to support [Go 1.23].\nThe next release will require at least [Go 1.24].\n\n### Added\n\n- Add native histogram exemplar support in `go.opentelemetry.io/otel/exporters/prometheus`. (#6772)\n- Add template attribute functions to the `go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6939)\n  - `ContainerLabel`\n  - `DBOperationParameter`\n  - `DBSystemParameter`\n  - `HTTPRequestHeader`\n  - `HTTPResponseHeader`\n  - `K8SCronJobAnnotation`\n  - `K8SCronJobLabel`\n  - `K8SDaemonSetAnnotation`\n  - `K8SDaemonSetLabel`\n  - `K8SDeploymentAnnotation`\n  - `K8SDeploymentLabel`\n  - `K8SJobAnnotation`\n  - `K8SJobLabel`\n  - `K8SNamespaceAnnotation`\n  - `K8SNamespaceLabel`\n  - `K8SNodeAnnotation`\n  - `K8SNodeLabel`\n  - `K8SPodAnnotation`\n  - `K8SPodLabel`\n  - `K8SReplicaSetAnnotation`\n  - `K8SReplicaSetLabel`\n  - `K8SStatefulSetAnnotation`\n  - `K8SStatefulSetLabel`\n  - `ProcessEnvironmentVariable`\n  - `RPCConnectRPCRequestMetadata`\n  - `RPCConnectRPCResponseMetadata`\n  - `RPCGRPCRequestMetadata`\n  - `RPCGRPCResponseMetadata`\n- Add `ErrorType` attribute helper function to the `go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6962)\n- Add `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log` which can be used to disable deduplication for log records. (#6968)\n- Add `WithCardinalityLimit` option to configure the cardinality limit in `go.opentelemetry.io/otel/sdk/metric`. (#6996, #7065, #7081, #7164, #7165, #7179)\n- Add `Clone` method to `Record` in `go.opentelemetry.io/otel/log` that returns a copy of the record with no shared state. (#7001)\n- Add experimental self-observability span and batch span processor metrics in `go.opentelemetry.io/otel/sdk/trace`.\n  Check the `go.opentelemetry.io/otel/sdk/trace/internal/x` package documentation for more information. (#7027, #6393, #7209)\n- The `go.opentelemetry.io/otel/semconv/v1.36.0` package.\n  The package contains semantic conventions from the `v1.36.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.36.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.34.0.`(#7032, #7041)\n- Add support for configuring Prometheus name translation using `WithTranslationStrategy` option in `go.opentelemetry.io/otel/exporters/prometheus`. The current default translation strategy when UTF-8 mode is enabled is `NoUTF8EscapingWithSuffixes`, but a future release will change the default strategy to `UnderscoreEscapingWithSuffixes` for compliance with the specification. (#7111)\n- Add experimental self-observability log metrics in `go.opentelemetry.io/otel/sdk/log`.\n  Check the `go.opentelemetry.io/otel/sdk/log/internal/x` package documentation for more information. (#7121)\n- Add experimental self-observability trace exporter metrics in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`.\n  Check the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/x` package documentation for more information. (#7133)\n- Support testing of [Go 1.25]. (#7187)\n- The `go.opentelemetry.io/otel/semconv/v1.37.0` package.\n  The package contains semantic conventions from the `v1.37.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.37.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.36.0.`(#7254)\n\n### Changed\n\n- Optimize `TraceIDFromHex` and `SpanIDFromHex` in `go.opentelemetry.io/otel/sdk/trace`. (#6791)\n- Change `AssertEqual` in `go.opentelemetry.io/otel/log/logtest` to accept `TestingT` in order to support benchmarks and fuzz tests. (#6908)\n- Change `DefaultExemplarReservoirProviderSelector` in `go.opentelemetry.io/otel/sdk/metric` to use `runtime.GOMAXPROCS(0)` instead of `runtime.NumCPU()` for the `FixedSizeReservoirProvider` default size. (#7094)\n\n### Fixed\n\n- `SetBody` method of `Record` in `go.opentelemetry.io/otel/sdk/log` now deduplicates key-value collections (`log.Value` of `log.KindMap` from `go.opentelemetry.io/otel/log`). (#7002)\n- Fix `go.opentelemetry.io/otel/exporters/prometheus` to not append a suffix if it's already present in metric name. (#7088)\n- Fix the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` self-observability component type and name. (#7195)\n- Fix partial export count metric in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7199)\n\n### Deprecated\n\n- Deprecate `WithoutUnits` and `WithoutCounterSuffixes` options, preferring `WithTranslationStrategy` instead. (#7111)\n- Deprecate support for `OTEL_GO_X_CARDINALITY_LIMIT` environment variable in `go.opentelemetry.io/otel/sdk/metric`. Use `WithCardinalityLimit` option instead. (#7166)\n\n## [0.59.1] 2025-07-21\n\n### Changed\n\n- Retract `v0.59.0` release of `go.opentelemetry.io/otel/exporters/prometheus` module which appends incorrect unit suffixes. (#7046)\n- Change `go.opentelemetry.io/otel/exporters/prometheus` to no longer deduplicate suffixes when UTF8 is enabled.\n  It is recommended to disable unit and counter suffixes in the exporter, and manually add suffixes if you rely on the existing behavior. (#7044)\n\n### Fixed\n\n- Fix `go.opentelemetry.io/otel/exporters/prometheus` to properly handle unit suffixes when the unit is in brackets.\n  E.g. `{spans}`. (#7044)\n\n## [1.37.0/0.59.0/0.13.0] 2025-06-25\n\n### Added\n\n- The `go.opentelemetry.io/otel/semconv/v1.33.0` package.\n  The package contains semantic conventions from the `v1.33.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799)\n- The `go.opentelemetry.io/otel/semconv/v1.34.0` package.\n  The package contains semantic conventions from the `v1.34.0` version of the OpenTelemetry Semantic Conventions. (#6812)\n- Add metric's schema URL as `otel_scope_schema_url` label in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)\n- Add metric's scope attributes as `otel_scope_[attribute]` labels in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)\n- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/log`. (#6825)\n- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6825)\n- Changed handling of `go.opentelemetry.io/otel/exporters/prometheus` metric renaming to add unit suffixes when it doesn't match one of the pre-defined values in the unit suffix map. (#6839)\n\n### Changed\n\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/bridge/opentracing`. (#6827)\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#6829)\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/metric`. (#6832)\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/resource`. (#6834)\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/trace`. (#6835)\n- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/trace`. (#6836)\n- `Record.Resource` now returns `*resource.Resource` instead of `resource.Resource` in `go.opentelemetry.io/otel/sdk/log`. (#6864)\n- Retry now shows error cause for context timeout in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6898)\n\n### Fixed\n\n- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#6710)\n- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#6710)\n- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#6710)\n- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#6710)\n- Validate exponential histogram scale range for Prometheus compatibility in `go.opentelemetry.io/otel/exporters/prometheus`. (#6822)\n- Context cancellation during metric pipeline produce does not corrupt data in `go.opentelemetry.io/otel/sdk/metric`. (#6914)\n\n### Removed\n\n- `go.opentelemetry.io/otel/exporters/prometheus` no longer exports `otel_scope_info` metric. (#6770)\n\n## [0.12.2] 2025-05-22\n\n### Fixed\n\n- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` module that contains invalid dependencies. (#6804)\n- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` module that contains invalid dependencies. (#6804)\n- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` module that contains invalid dependencies. (#6804)\n\n## [0.12.1] 2025-05-21\n\n### Fixes\n\n- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6800)\n- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6800)\n- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#6800)\n\n## [1.36.0/0.58.0/0.12.0] 2025-05-20\n\n### Added\n\n- Add exponential histogram support in `go.opentelemetry.io/otel/exporters/prometheus`. (#6421)\n- The `go.opentelemetry.io/otel/semconv/v1.31.0` package.\n  The package contains semantic conventions from the `v1.31.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.31.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.30.0`. (#6479)\n- Add `Recording`, `Scope`, and `Record` types in `go.opentelemetry.io/otel/log/logtest`. (#6507)\n- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#6751)\n- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#6752)\n- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6688)\n- Add `ValuesGetter` in `go.opentelemetry.io/otel/propagation`, a `TextMapCarrier` that supports retrieving multiple values for a single key. (#5973)\n- Add `Values` method to `HeaderCarrier` to implement the new `ValuesGetter` interface in `go.opentelemetry.io/otel/propagation`. (#5973)\n- Update `Baggage` in `go.opentelemetry.io/otel/propagation` to retrieve multiple values for a key when the carrier implements `ValuesGetter`. (#5973)\n- Add `AssertEqual` function in `go.opentelemetry.io/otel/log/logtest`. (#6662)\n- The `go.opentelemetry.io/otel/semconv/v1.32.0` package.\n  The package contains semantic conventions from the `v1.32.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.32.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.31.0`(#6782)\n- Add `Transform` option in `go.opentelemetry.io/otel/log/logtest`. (#6794)\n- Add `Desc` option in `go.opentelemetry.io/otel/log/logtest`. (#6796)\n\n### Removed\n\n- Drop support for [Go 1.22]. (#6381, #6418)\n- Remove `Resource` field from `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6494)\n- Remove `RecordFactory` type from `go.opentelemetry.io/otel/log/logtest`. (#6492)\n- Remove `ScopeRecords`, `EmittedRecord`, and `RecordFactory` types from `go.opentelemetry.io/otel/log/logtest`. (#6507)\n- Remove `AssertRecordEqual` function in `go.opentelemetry.io/otel/log/logtest`, use `AssertEqual` instead. (#6662)\n\n### Changed\n\n- ⚠️ Update `github.com/prometheus/client_golang` to `v1.21.1`, which changes the `NameValidationScheme` to `UTF8Validation`.\n  This allows metrics names to keep original delimiters (e.g. `.`), rather than replacing with underscores.\n  This can be reverted by setting `github.com/prometheus/common/model.NameValidationScheme` to `LegacyValidation` in `github.com/prometheus/common/model`. (#6433)\n- Initialize map with `len(keys)` in `NewAllowKeysFilter` and `NewDenyKeysFilter` to avoid unnecessary allocations in `go.opentelemetry.io/otel/attribute`. (#6455)\n- `go.opentelemetry.io/otel/log/logtest` is now a separate Go module. (#6465)\n- `go.opentelemetry.io/otel/sdk/log/logtest` is now a separate Go module. (#6466)\n- `Recorder` in `go.opentelemetry.io/otel/log/logtest` no longer separately stores records emitted by loggers with the same instrumentation scope. (#6507)\n- Improve performance of `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` by not exporting when exporter cannot accept more. (#6569, #6641)\n\n### Deprecated\n\n- Deprecate support for `model.LegacyValidation` for `go.opentelemetry.io/otel/exporters/prometheus`. (#6449)\n\n### Fixes\n\n- Stop percent encoding header environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6392)\n- Ensure the `noopSpan.tracerProvider` method is not inlined in `go.opentelemetry.io/otel/trace` so the `go.opentelemetry.io/auto` instrumentation can instrument non-recording spans. (#6456)\n- Use a `sync.Pool` instead of allocating `metricdata.ResourceMetrics` in `go.opentelemetry.io/otel/exporters/prometheus`. (#6472)\n\n## [1.35.0/0.57.0/0.11.0] 2025-03-05\n\nThis release is the last to support [Go 1.22].\nThe next release will require at least [Go 1.23].\n\n### Added\n\n- Add `ValueFromAttribute` and `KeyValueFromAttribute` in `go.opentelemetry.io/otel/log`. (#6180)\n- Add `EventName` and `SetEventName` to `Record` in `go.opentelemetry.io/otel/log`. (#6187)\n- Add `EventName` to `RecordFactory` in `go.opentelemetry.io/otel/log/logtest`. (#6187)\n- `AssertRecordEqual` in `go.opentelemetry.io/otel/log/logtest` checks `Record.EventName`. (#6187)\n- Add `EventName` and `SetEventName` to `Record` in `go.opentelemetry.io/otel/sdk/log`. (#6193)\n- Add `EventName` to `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest`. (#6193)\n- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6211)\n- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6211)\n- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` (#6210)\n- The `go.opentelemetry.io/otel/semconv/v1.28.0` package.\n  The package contains semantic conventions from the `v1.28.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.28.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.27.0`(#6236)\n- The `go.opentelemetry.io/otel/semconv/v1.30.0` package.\n  The package contains semantic conventions from the `v1.30.0` version of the OpenTelemetry Semantic Conventions.\n  See the [migration documentation](./semconv/v1.30.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.28.0`(#6240)\n- Document the pitfalls of using `Resource` as a comparable type.\n  `Resource.Equal` and `Resource.Equivalent` should be used instead. (#6272)\n- Support [Go 1.24]. (#6304)\n- Add `FilterProcessor` and `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`.\n  It replaces `go.opentelemetry.io/otel/sdk/log/internal/x.FilterProcessor`.\n  Compared to previous version it additionally gives the possibility to filter by resource and instrumentation scope. (#6317)\n\n### Changed\n\n- Update `github.com/prometheus/common` to `v0.62.0`, which changes the `NameValidationScheme` to `NoEscaping`.\n  This allows metrics names to keep original delimiters (e.g. `.`), rather than replacing with underscores.\n  This is controlled by the `Content-Type` header, or can be reverted by setting `NameValidationScheme` to `LegacyValidation` in `github.com/prometheus/common/model`. (#6198)\n\n### Fixes\n\n- Eliminate goroutine leak for the processor returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace` when `Shutdown` is called and the passed `ctx` is canceled and `SpanExporter.Shutdown` has not returned. (#6368)\n- Eliminate goroutine leak for the processor returned by `NewBatchSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace` when `ForceFlush` is called and the passed `ctx` is canceled and `SpanExporter.Export` has not returned. (#6369)\n\n## [1.34.0/0.56.0/0.10.0] 2025-01-17\n\n### Changed\n\n- Remove the notices from `Logger` to make the whole Logs API user-facing in `go.opentelemetry.io/otel/log`. (#6167)\n\n### Fixed\n\n- Relax minimum Go version to 1.22.0 in various modules. (#6073)\n- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` client is corrected from `otlphttpgrpc` to `otlptracegrpc`. (#6143)\n- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlphttpgrpc` client is corrected from `otlphttphttp` to `otlptracehttp`. (#6143)\n\n## [1.33.0/0.55.0/0.9.0/0.0.12] 2024-12-12\n\n### Added\n\n- Add `Reset` method to `SpanRecorder` in `go.opentelemetry.io/otel/sdk/trace/tracetest`. (#5994)\n- Add `EnabledInstrument` interface in `go.opentelemetry.io/otel/sdk/metric/internal/x`.\n  This is an experimental interface that is implemented by synchronous instruments provided by `go.opentelemetry.io/otel/sdk/metric`.\n  Users can use it to avoid performing computationally expensive operations when recording measurements.\n  It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#6016)\n\n### Changed\n\n- The default global API now supports full auto-instrumentation from the `go.opentelemetry.io/auto` package.\n  See that package for more information. (#5920)\n- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5929)\n- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5929)\n- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5929)\n- Performance improvements for attribute value `AsStringSlice`, `AsFloat64Slice`, `AsInt64Slice`, `AsBoolSlice`. (#6011)\n- Change `EnabledParameters` to have a `Severity` field instead of a getter and setter in `go.opentelemetry.io/otel/log`. (#6009)\n\n### Fixed\n\n- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5954)\n- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5954)\n- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5954)\n- Fix invalid exemplar keys in `go.opentelemetry.io/otel/exporters/prometheus`. (#5995)\n- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/trace`. (#5997)\n- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/log`. (#6032)\n\n## [1.32.0/0.54.0/0.8.0/0.0.11] 2024-11-08\n\n### Added\n\n- Add `go.opentelemetry.io/otel/sdk/metric/exemplar.AlwaysOffFilter`, which can be used to disable exemplar recording. (#5850)\n- Add `go.opentelemetry.io/otel/sdk/metric.WithExemplarFilter`, which can be used to configure the exemplar filter used by the metrics SDK. (#5850)\n- Add `ExemplarReservoirProviderSelector` and `DefaultExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric`, which defines the exemplar reservoir to use based on the aggregation of the metric. (#5861)\n- Add `ExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric.Stream` to allow using views to configure the exemplar reservoir to use for a metric. (#5861)\n- Add `ReservoirProvider`, `HistogramReservoirProvider` and `FixedSizeReservoirProvider` to `go.opentelemetry.io/otel/sdk/metric/exemplar` to make it convenient to use providers of Reservoirs. (#5861)\n- The `go.opentelemetry.io/otel/semconv/v1.27.0` package.\n  The package contains semantic conventions from the `v1.27.0` version of the OpenTelemetry Semantic Conventions. (#5894)\n- Add `Attributes attribute.Set` field to `Scope` in `go.opentelemetry.io/otel/sdk/instrumentation`. (#5903)\n- Add `Attributes attribute.Set` field to `ScopeRecords` in `go.opentelemetry.io/otel/log/logtest`. (#5927)\n- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` adds instrumentation scope attributes. (#5934)\n- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` adds instrumentation scope attributes. (#5934)\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` adds instrumentation scope attributes. (#5935)\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` adds instrumentation scope attributes. (#5935)\n- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` adds instrumentation scope attributes. (#5933)\n- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` adds instrumentation scope attributes. (#5933)\n- `go.opentelemetry.io/otel/exporters/prometheus` adds instrumentation scope attributes in `otel_scope_info` metric as labels. (#5932)\n\n### Changed\n\n- Support scope attributes and make them as identifying for `Tracer` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/trace`. (#5924)\n- Support scope attributes and make them as identifying for `Meter` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/metric`. (#5926)\n- Support scope attributes and make them as identifying for `Logger` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/log`. (#5925)\n- Make schema URL and scope attributes as identifying for `Tracer` in `go.opentelemetry.io/otel/bridge/opentracing`. (#5931)\n- Clear unneeded slice elements to allow GC to collect the objects in `go.opentelemetry.io/otel/sdk/metric` and `go.opentelemetry.io/otel/sdk/trace`. (#5804)\n\n### Fixed\n\n- Global MeterProvider registration unwraps global instrument Observers, the undocumented Unwrap() methods are now private. (#5881)\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5892)\n- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5911)\n- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5915)\n- Fix `go.opentelemetry.io/otel/exporters/prometheus` trying to add exemplars to Gauge metrics, which is unsupported. (#5912)\n- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#5944)\n- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5944)\n- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5944)\n- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5944)\n- Fix incorrect metrics generated from callbacks when multiple readers are used in `go.opentelemetry.io/otel/sdk/metric`. (#5900)\n\n### Removed\n\n- Remove all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5930)\n\n## [1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11\n\n### Added\n\n- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes `Exemplar`, `Filter`, `TraceBasedFilter`, `AlwaysOnFilter`, `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and `ValueType` types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862)\n- Add `WithExportBufferSize` option to log batch processor.(#5877)\n\n### Changed\n\n- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778)\n- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791)\n- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791)\n- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847)\n- Performance improvements for the trace SDK `SetAttributes` method in `Span`. (#5864)\n- Reduce memory allocations for the `Event` and `Link` lists in `Span`. (#5858)\n- Performance improvements for the trace SDK `AddEvent`, `AddLink`, `RecordError` and `End` methods in `Span`. (#5874)\n\n### Deprecated\n\n- Deprecate all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5854)\n\n### Fixed\n\n- The race condition for multiple `FixedSize` exemplar reservoirs identified in #5814 is resolved. (#5819)\n- Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803)\n- Fix timer channel drain to avoid hanging on Go 1.23. (#5868)\n- Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827)\n- Change the `reflect.TypeOf` to use a nil pointer to not allocate on the heap unless necessary. (#5827)\n\n## [1.30.0/0.52.0/0.6.0/0.0.9] 2024-09-09\n\n### Added\n\n- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environments in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#5739)\n- The `WithResource` option for `NewMeterProvider` now merges the provided resources with the ones from environment variables. (#5773)\n- The `WithResource` option for `NewLoggerProvider` now merges the provided resources with the ones from environment variables. (#5773)\n- Add UTF-8 support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5755)\n\n### Fixed\n\n- Fix memory leak in the global `MeterProvider` when identical instruments are repeatedly created. (#5754)\n- Fix panic on instruments creation when setting meter provider. (#5758)\n- Fix an issue where `SetMeterProvider` in `go.opentelemetry.io/otel` might miss the delegation for instruments and registries. (#5780)\n\n### Removed\n\n- Drop support for [Go 1.21]. (#5736, #5740, #5800)\n\n## [1.29.0/0.51.0/0.5.0] 2024-08-23\n\nThis release is the last to support [Go 1.21].\nThe next release will require at least [Go 1.22].\n\n### Added\n\n- Add MacOS ARM64 platform to the compatibility testing suite. (#5577)\n- Add `InstrumentationScope` field to `SpanStub` in `go.opentelemetry.io/otel/sdk/trace/tracetest`, as a replacement for the deprecated `InstrumentationLibrary`. (#5627)\n- Make the initial release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.\n  This new module contains an OTLP exporter that transmits log telemetry using gRPC.\n  This module is unstable and breaking changes may be introduced.\n  See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5629)\n- Add `Walk` function to `TraceState` in `go.opentelemetry.io/otel/trace` to iterate all the key-value pairs. (#5651)\n- Bridge the trace state in `go.opentelemetry.io/otel/bridge/opencensus`. (#5651)\n- Zero value of `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` no longer panics. (#5665)\n- The `FilterProcessor` interface type is added in `go.opentelemetry.io/otel/sdk/log/internal/x`.\n  This is an optional and experimental interface that log `Processor`s can implement to instruct the `Logger` if a `Record` will be processed or not.\n  It replaces the existing `Enabled` method that is removed from the `Processor` interface itself.\n  It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#5692)\n- Support [Go 1.23]. (#5720)\n\n### Changed\n\n- `NewMemberRaw`, `NewKeyProperty` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage` allow UTF-8 string in key. (#5132)\n- `Processor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` now accepts a pointer to `Record` instead of a value so that the record modifications done in a processor are propagated to subsequent registered processors. (#5636)\n- `SimpleProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log` now returns `false` if the exporter is `nil`. (#5665)\n- Update the concurrency requirements of `Exporter` in `go.opentelemetry.io/otel/sdk/log`. (#5666)\n- `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` synchronizes `OnEmit` calls. (#5666)\n- The `Processor` interface in `go.opentelemetry.io/otel/sdk/log` no longer includes the `Enabled` method.\n  See the `FilterProcessor` interface type added in `go.opentelemetry.io/otel/sdk/log/internal/x` to continue providing this functionality. (#5692)\n- The `SimpleProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693)\n- The `BatchProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693)\n\n### Fixed\n\n- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5584)\n- Pass the underlying error rather than a generic retry-able failure in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5541)\n- Correct the `Tracer`, `Meter`, and `Logger` names used in `go.opentelemetry.io/otel/example/dice`. (#5612)\n- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/namedtracer`. (#5612)\n- Correct the `Tracer` name used in `go.opentelemetry.io/otel/example/opencensus`. (#5612)\n- Correct the `Tracer` and `Meter` names used in `go.opentelemetry.io/otel/example/otel-collector`. (#5612)\n- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/passthrough`. (#5612)\n- Correct the `Meter` name used in `go.opentelemetry.io/otel/example/prometheus`. (#5612)\n- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/zipkin`. (#5612)\n- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5641)\n- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5650)\n- Stop percent encoding header environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705)\n- Remove invalid environment variable header keys in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705)\n\n### Removed\n\n- The `Enabled` method of the `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692)\n- The `Enabled` method of the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692)\n\n## [1.28.0/0.50.0/0.4.0] 2024-07-02\n\n### Added\n\n- The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`.\n  This method is used to check if an `Instrument` instance is a zero-value. (#5431)\n- Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468)\n- The `go.opentelemetry.io/otel/semconv/v1.26.0` package.\n  The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476)\n- The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499)\n- The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530)\n\n### Changed\n\n- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457)\n- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490)\n- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490)\n- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490)\n  - The exporter no longer exports the deprecated \"otel.library.name\" or \"otel.library.version\" attributes.\n- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490)\n- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490)\n- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493)\n- Use non-generic functions in the `Start` method of `\"go.opentelemetry.io/otel/sdk/trace\".Trace` to reduce memory allocation. (#5497)\n- `service.instance.id` is populated for a `Resource` created with `\"go.opentelemetry.io/otel/sdk/resource\".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520)\n- Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545)\n\n### Fixed\n\n- Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376)\n- Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426)\n- Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426)\n- Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434)\n- Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435)\n- Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456)\n- Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464)\n- Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494)\n- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508)\n- Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514)\n- Fix stale timestamps reported by the last-value aggregation. (#5517)\n- Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521)\n- Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549)\n- Replace invalid percent-encoded octet sequences with replacement char in `go.opentelemetry.io/otel/baggage`. (#5528)\n\n## [1.27.0/0.49.0/0.3.0] 2024-05-21\n\n### Added\n\n- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242)\n- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258)\n- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263)\n- The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276)\n- Add metrics in the `otel-collector` example. (#5283)\n- Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304)\n  - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`.\n  - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument.\n- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349)\n\n### Changed\n\n- The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189)\n- The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189)\n- Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230)\n- De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230)\n- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241)\n- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272)\n- Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286)\n- Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305)\n- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315)\n- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374)\n\n### Fixed\n\n- Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306)\n- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311)\n- Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365)\n- Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371)\n- Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375)\n\n## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24\n\n### Added\n\n- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134)\n- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194)\n- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`.\n  This new module contains the Go implementation of the OpenTelemetry Logs SDK.\n  This module is unstable and breaking changes may be introduced.\n  See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)\n- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.\n  This new module contains an OTLP exporter that transmits log telemetry using HTTP.\n  This module is unstable and breaking changes may be introduced.\n  See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)\n- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.\n  This new module contains an exporter prints log records to STDOUT.\n  This module is unstable and breaking changes may be introduced.\n  See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)\n- The `go.opentelemetry.io/otel/semconv/v1.25.0` package.\n  The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254)\n\n### Changed\n\n- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177)\n- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214)\n- The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244)\n\n### Fixed\n\n- Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159)\n\n## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05\n\n### Added\n\n- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906)\n- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906)\n- Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032)\n- The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`.\n  This method is used to notify users if a log record will be emitted or not. (#5071)\n- Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`.\n  This value represents an unset severity level. (#5072)\n- Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076)\n- Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`.\n  This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes.\n  At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085)\n- Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100)\n- Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108)\n- Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116)\n- Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117)\n- Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111)\n- Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528)\n\n### Changed\n\n- `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049)\n- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with \"dns\" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151)\n  Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError).\n  Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated.\n\n### Fixed\n\n- Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027)\n- Prevent default `ErrorHandler` self-delegation. (#5137)\n- Update all dependencies to address [GO-2024-2687]. (#5139)\n\n### Removed\n\n- Drop support for [Go 1.20]. (#4967)\n\n### Deprecated\n\n- Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734)\n- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734)\n- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734)\n\n## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23\n\nThis release is the last to support [Go 1.20].\nThe next release will require at least [Go 1.21].\n\n### Added\n\n- Support [Go 1.22]. (#4890)\n- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900)\n- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900)\n- The `go.opentelemetry.io/otel/log` module is added.\n  This module includes OpenTelemetry Go's implementation of the Logs Bridge API.\n  This module is in an alpha state, it is subject to breaking changes.\n  See our [versioning policy](./VERSIONING.md) for more info. (#4961)\n- Add ARM64 platform to the compatibility testing suite. (#4994)\n\n### Fixed\n\n- Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945)\n- Fix negative buckets in output of exponential histograms. (#4956)\n\n## [1.23.1] 2024-02-07\n\n### Fixed\n\n- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888)\n\n## [1.23.0] 2024-02-06\n\nThis release contains the first stable, `v1`, release of the following modules:\n\n- `go.opentelemetry.io/otel/bridge/opencensus`\n- `go.opentelemetry.io/otel/bridge/opencensus/test`\n- `go.opentelemetry.io/otel/example/opencensus`\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`\n- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`\n\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Added\n\n- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808)\n- Experimental exemplar exporting is added to the metric SDK.\n  See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871)\n- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`.\n  This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876)\n\n### Changed\n\n- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict.\n  Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned.\n  It is up to the user to decide if they want to use the returned `Resource` or not.\n  It may have desired attributes overwritten or include stale semantic conventions. (#4876)\n\n### Fixed\n\n- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449)\n- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820)\n- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827)\n\n## [1.23.0-rc.1] 2024-01-18\n\nThis is a release candidate for the v1.23.0 release.\nThat release is expected to include the `v1` release of the following modules:\n\n- `go.opentelemetry.io/otel/bridge/opencensus`\n- `go.opentelemetry.io/otel/bridge/opencensus/test`\n- `go.opentelemetry.io/otel/example/opencensus`\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`\n- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`\n\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n## [1.22.0/0.45.0] 2024-01-17\n\n### Added\n\n- The `go.opentelemetry.io/otel/semconv/v1.22.0` package.\n  The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735)\n- The `go.opentelemetry.io/otel/semconv/v1.23.0` package.\n  The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746)\n- The `go.opentelemetry.io/otel/semconv/v1.23.1` package.\n  The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749)\n- The `go.opentelemetry.io/otel/semconv/v1.24.0` package.\n  The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770)\n- Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733)\n- Experimental cardinality limiting is added to the metric SDK.\n  See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457)\n- Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804)\n\n### Changed\n\n- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754)\n- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754)\n- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`.\n  If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g  `if ctx.Err() != nil`). (#4671)\n- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722)\n- Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721)\n- Improve `go.opentelemetry.io/otel/baggage` performance. (#4743)\n- Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774)\n- `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775)\n- Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818)\n- `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804)\n\n### Fixed\n\n- Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755)\n- Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756)\n- Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772)\n- Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776)\n- Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804)\n- Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742)\n\n## [1.21.0/0.44.0] 2023-11-16\n\n### Removed\n\n- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706)\n- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707)\n- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708)\n- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723)\n\n### Fixed\n\n- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719)\n- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719)\n\n## [1.20.0/0.43.0] 2023-11-10\n\nThis release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the \"API Implementations\" section of the [trace API] package documentation for more information about how to accomplish this.\n\n### Added\n\n- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567)\n- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584)\n- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620)\n- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620)\n- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644)\n- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649)\n- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603)\n- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660)\n- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660)\n- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622)\n- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585)\n- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605)\n- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668)\n\n### Deprecated\n\n- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567)\n- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618)\n- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`.\n  Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620)\n- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649)\n- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693)\n\n### Changed\n\n- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583)\n- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type.\n  This extends the `TracerProvider` interface and is is a breaking change for any existing implementation.\n  Implementers need to update their implementations based on what they want the default behavior of the interface to be.\n  See the \"API Implementations\" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)\n- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type.\n  This extends the `Tracer` interface and is is a breaking change for any existing implementation.\n  Implementers need to update their implementations based on what they want the default behavior of the interface to be.\n  See the \"API Implementations\" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)\n- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type.\n  This extends the `Span` interface and is is a breaking change for any existing implementation.\n  Implementers need to update their implementations based on what they want the default behavior of the interface to be.\n  See the \"API Implementations\" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)\n- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)\n- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670)\n- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670)\n- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669)\n- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669)\n- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679)\n- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679)\n\n### Fixed\n\n- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667)\n- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699)\n- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699)\n- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699)\n- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699)\n- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699)\n- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648)\n- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695)\n- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695)\n\n## [1.19.0/0.42.0/0.0.7] 2023-09-28\n\nThis release contains the first stable release of the OpenTelemetry Go [metric SDK].\nOur project stability guarantees now apply to the `go.opentelemetry.io/otel/sdk/metric` package.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Added\n\n- Add the \"Roll the dice\" getting started application example in `go.opentelemetry.io/otel/example/dice`. (#4539)\n- The `WithWriter` and `WithPrettyPrint` options to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to set a custom `io.Writer`, and allow displaying the output in human-readable JSON. (#4507)\n\n### Changed\n\n- Allow '/' characters in metric instrument names. (#4501)\n- The exporter in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` does not prettify its output by default anymore. (#4507)\n- Upgrade `gopkg.io/yaml` from `v2` to `v3` in `go.opentelemetry.io/otel/schema`. (#4535)\n\n### Fixed\n\n- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the Prometheus metric on every `Collect` if we know the scope is invalid. (#4499)\n\n### Removed\n\n- Remove `\"go.opentelemetry.io/otel/bridge/opencensus\".NewMetricExporter`, which is replaced by `NewMetricProducer`. (#4566)\n\n## [1.19.0-rc.1/0.42.0-rc.1] 2023-09-14\n\nThis is a release candidate for the v1.19.0/v0.42.0 release.\nThat release is expected to include the `v1` release of the OpenTelemetry Go metric SDK and will provide stability guarantees of that SDK.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Changed\n\n- Allow '/' characters in metric instrument names. (#4501)\n\n### Fixed\n\n- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the prometheus metric on every `Collect` if we know the scope is invalid. (#4499)\n\n## [1.18.0/0.41.0/0.0.6] 2023-09-12\n\nThis release drops the compatibility guarantee of [Go 1.19].\n\n### Added\n\n- Add `WithProducer` option in `go.opentelemetry.op/otel/exporters/prometheus` to restore the ability to register producers on the prometheus exporter's manual reader. (#4473)\n- Add `IgnoreValue` option in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest` to allow ignoring values when comparing metrics. (#4447)\n\n### Changed\n\n- Use a `TestingT` interface instead of `*testing.T` struct in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#4483)\n\n### Deprecated\n\n- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` was deprecated in `v0.35.0` (#3541).\n  The deprecation notice format for the function has been corrected to trigger Go documentation and build tooling. (#4470)\n\n### Removed\n\n- Removed the deprecated `go.opentelemetry.io/otel/exporters/jaeger` package. (#4467)\n- Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467)\n- Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468)\n- Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469)\n- Dropped guaranteed support for versions of Go less than 1.20. (#4481)\n\n## [1.17.0/0.40.0/0.0.5] 2023-08-28\n\n### Added\n\n- Export the `ManualReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244)\n- Export the `PeriodicReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244)\n- Add support for exponential histogram aggregations.\n  A histogram can be configured as an exponential histogram using a view with `\"go.opentelemetry.io/otel/sdk/metric\".ExponentialHistogram` as the aggregation. (#4245)\n- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4272)\n- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4272)\n- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable. (#4287)\n- Add `WithoutCounterSuffixes` option in `go.opentelemetry.io/otel/exporters/prometheus` to disable addition of `_total` suffixes. (#4306)\n- Add info and debug logging to the metric SDK in `go.opentelemetry.io/otel/sdk/metric`. (#4315)\n- The `go.opentelemetry.io/otel/semconv/v1.21.0` package.\n  The package contains semantic conventions from the `v1.21.0` version of the OpenTelemetry Semantic Conventions. (#4362)\n- Accept 201 to 299 HTTP status as success in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4365)\n- Document the `Temporality` and `Aggregation` methods of the `\"go.opentelemetry.io/otel/sdk/metric\".Exporter\"` need to be concurrent safe. (#4381)\n- Expand the set of units supported by the Prometheus exporter, and don't add unit suffixes if they are already present in `go.opentelemetry.op/otel/exporters/prometheus` (#4374)\n- Move the `Aggregation` interface and its implementations from `go.opentelemetry.io/otel/sdk/metric/aggregation` to `go.opentelemetry.io/otel/sdk/metric`. (#4435)\n- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` environment variable. (#4437)\n- Add the `NewAllowKeysFilter` and `NewDenyKeysFilter` functions to `go.opentelemetry.io/otel/attribute` to allow convenient creation of allow-keys and deny-keys filters. (#4444)\n- Support Go 1.21. (#4463)\n\n### Changed\n\n- Starting from `v1.21.0` of semantic conventions, `go.opentelemetry.io/otel/semconv/{version}/httpconv` and `go.opentelemetry.io/otel/semconv/{version}/netconv` packages will no longer be published. (#4145)\n- Log duplicate instrument conflict at a warning level instead of info in `go.opentelemetry.io/otel/sdk/metric`. (#4202)\n- Return an error on the creation of new instruments in `go.opentelemetry.io/otel/sdk/metric` if their name doesn't pass regexp validation. (#4210)\n- `NewManualReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*ManualReader` instead of `Reader`. (#4244)\n- `NewPeriodicReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*PeriodicReader` instead of `Reader`. (#4244)\n- Count the Collect time in the `PeriodicReader` timeout in `go.opentelemetry.io/otel/sdk/metric`. (#4221)\n- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` returns `*Exporter` instead of `\"go.opentelemetry.io/otel/sdk/metric\".Exporter`. (#4272)\n- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` returns `*Exporter` instead of `\"go.opentelemetry.io/otel/sdk/metric\".Exporter`. (#4272)\n- If an attribute set is omitted from an async callback, the previous value will no longer be exported in `go.opentelemetry.io/otel/sdk/metric`. (#4290)\n- If an attribute set is observed multiple times in an async callback in `go.opentelemetry.io/otel/sdk/metric`, the values will be summed instead of the last observation winning. (#4289)\n- Allow the explicit bucket histogram aggregation to be used for the up-down counter, observable counter, observable up-down counter, and observable gauge in the `go.opentelemetry.io/otel/sdk/metric` package. (#4332)\n- Restrict `Meter`s in `go.opentelemetry.io/otel/sdk/metric` to only register and collect instruments it created. (#4333)\n- `PeriodicReader.Shutdown` and `PeriodicReader.ForceFlush` in `go.opentelemetry.io/otel/sdk/metric` now apply the periodic reader's timeout to the operation if the user provided context does not contain a deadline. (#4356, #4377)\n- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.21.0`. (#4408)\n- Increase instrument name maximum length from 63 to 255 characters in `go.opentelemetry.io/otel/sdk/metric`. (#4434)\n- Add `go.opentelemetry.op/otel/sdk/metric.WithProducer` as an `Option` for `\"go.opentelemetry.io/otel/sdk/metric\".NewManualReader` and `\"go.opentelemetry.io/otel/sdk/metric\".NewPeriodicReader`. (#4346)\n\n### Removed\n\n- Remove `Reader.RegisterProducer` in `go.opentelemetry.io/otel/metric`.\n  Use the added `WithProducer` option instead. (#4346)\n- Remove `Reader.ForceFlush` in `go.opentelemetry.io/otel/metric`.\n  Notice that `PeriodicReader.ForceFlush` is still available. (#4375)\n\n### Fixed\n\n- Correctly format log messages from the `go.opentelemetry.io/otel/exporters/zipkin` exporter. (#4143)\n- Log an error for calls to `NewView` in `go.opentelemetry.io/otel/sdk/metric` that have empty criteria. (#4307)\n- Fix `\"go.opentelemetry.io/otel/sdk/resource\".WithHostID()` to not set an empty `host.id`. (#4317)\n- Use the instrument identifying fields to cache aggregators and determine duplicate instrument registrations in `go.opentelemetry.io/otel/sdk/metric`. (#4337)\n- Detect duplicate instruments for case-insensitive names in `go.opentelemetry.io/otel/sdk/metric`. (#4338)\n- The `ManualReader` will not panic if `AggregationSelector` returns `nil` in `go.opentelemetry.io/otel/sdk/metric`. (#4350)\n- If a `Reader`'s `AggregationSelector` returns `nil` or `DefaultAggregation` the pipeline will use the default aggregation. (#4350)\n- Log a suggested view that fixes instrument conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4349)\n- Fix possible panic, deadlock and race condition in batch span processor in `go.opentelemetry.io/otel/sdk/trace`. (#4353)\n- Improve context cancellation handling in batch span processor's `ForceFlush` in  `go.opentelemetry.io/otel/sdk/trace`. (#4369)\n- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` using gotmpl. (#4397, #3846)\n- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4404, #3846)\n- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4407, #3846)\n- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4400, #3846)\n- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4401, #3846)\n- Do not block the metric SDK when OTLP metric exports are blocked in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#3925, #4395)\n- Do not append `_total` if the counter already has that suffix for the Prometheus exproter in `go.opentelemetry.io/otel/exporter/prometheus`. (#4373)\n- Fix resource detection data race in `go.opentelemetry.io/otel/sdk/resource`. (#4409)\n- Use the first-seen instrument name during instrument name conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4428)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/exporters/jaeger` package is deprecated.\n  OpenTelemetry dropped support for Jaeger exporter in July 2023.\n  Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`\n  or `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` instead. (#4423)\n- The `go.opentelemetry.io/otel/example/jaeger` package is deprecated. (#4423)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` package is deprecated. (#4420)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/oconf` package is deprecated. (#4420)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otest` package is deprecated. (#4420)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/transform` package is deprecated. (#4420)\n- The `go.opentelemetry.io/otel/exporters/otlp/internal` package is deprecated. (#4421)\n- The `go.opentelemetry.io/otel/exporters/otlp/internal/envconfig` package is deprecated. (#4421)\n- The `go.opentelemetry.io/otel/exporters/otlp/internal/retry` package is deprecated. (#4421)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` package is deprecated. (#4425)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/envconfig` package is deprecated. (#4425)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig` package is deprecated. (#4425)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest` package is deprecated. (#4425)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry` package is deprecated. (#4425)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregation` package is deprecated.\n  Use the aggregation types added to `go.opentelemetry.io/otel/sdk/metric` instead. (#4435)\n\n## [1.16.0/0.39.0] 2023-05-18\n\nThis release contains the first stable release of the OpenTelemetry Go [metric API].\nOur project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Added\n\n- The `go.opentelemetry.io/otel/semconv/v1.19.0` package.\n  The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. (#3848)\n- The `go.opentelemetry.io/otel/semconv/v1.20.0` package.\n  The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. (#4078)\n- The Exponential Histogram data types in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#4165)\n- OTLP metrics exporter now supports the Exponential Histogram Data Type. (#4222)\n- Fix serialization of `time.Time` zero values in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` packages. (#4271)\n\n### Changed\n\n- Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. (#4049)\n- `MeterProvider` returns noop meters once it has been shutdown. (#4154)\n\n### Removed\n\n- The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed.\n  Use `go.opentelemetry.io/otel/metric` instead. (#4055)\n\n### Fixed\n\n- Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. (#4077)\n\n## [1.16.0-rc.1/0.39.0-rc.1] 2023-05-03\n\nThis is a release candidate for the v1.16.0/v0.39.0 release.\nThat release is expected to include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Added\n\n- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#4039)\n  - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`.\n  - Use `GetMeterProivder` for a global `metric.MeterProvider`.\n  - Use `SetMeterProivder` to set the global `metric.MeterProvider`.\n\n### Changed\n\n- Move the `go.opentelemetry.io/otel/metric` module to the `stable-v1` module set.\n  This stages the metric API to be released as a stable module. (#4038)\n\n### Removed\n\n- The `go.opentelemetry.io/otel/metric/global` package is removed.\n  Use `go.opentelemetry.io/otel` instead. (#4039)\n\n## [1.15.1/0.38.1] 2023-05-02\n\n### Fixed\n\n- Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. (#4040, #4041)\n\n## [1.15.0/0.38.0] 2023-04-27\n\n### Added\n\n- The `go.opentelemetry.io/otel/metric/embedded` package. (#3916)\n- The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. (#3949)\n- Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. (#3970)\n- The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. (#3971)\n  - The `AddConfig` used to hold configuration for addition measurements\n    - `NewAddConfig` used to create a new `AddConfig`\n    - `AddOption` used to configure an `AddConfig`\n  - The `RecordConfig` used to hold configuration for recorded measurements\n    - `NewRecordConfig` used to create a new `RecordConfig`\n    - `RecordOption` used to configure a `RecordConfig`\n  - The `ObserveConfig` used to hold configuration for observed measurements\n    - `NewObserveConfig` used to create a new `ObserveConfig`\n    - `ObserveOption` used to configure an `ObserveConfig`\n- `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`.\n  They return an option used during a measurement that defines the attribute Set associated with the measurement. (#3971)\n- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. (#3956)\n- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. (#3956)\n\n### Changed\n\n- The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. (#3870)\n- Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`.\n  This adds an implementation requirement to set the interface default behavior for unimplemented methods. (#3916)\n- Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. (#3941)\n  - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider`\n- Add all the methods from `\"go.opentelemetry.io/otel/trace\".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. (#3966)\n- Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. (#3974)\n- The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `\"go.opentelemetry.io/otel/attribute\".KeyValue`. (#3971)\n  - The `Int64Counter.Add` method now accepts `...AddOption`\n  - The `Float64Counter.Add` method now accepts `...AddOption`\n  - The `Int64UpDownCounter.Add` method now accepts `...AddOption`\n  - The `Float64UpDownCounter.Add` method now accepts `...AddOption`\n  - The `Int64Histogram.Record` method now accepts `...RecordOption`\n  - The `Float64Histogram.Record` method now accepts `...RecordOption`\n  - The `Int64Observer.Observe` method now accepts `...ObserveOption`\n  - The `Float64Observer.Observe` method now accepts `...ObserveOption`\n- The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `\"go.opentelemetry.io/otel/attribute\".KeyValue`. (#3971)\n  - The `Observer.ObserveInt64` method now accepts `...ObserveOption`\n  - The `Observer.ObserveFloat64` method now accepts `...ObserveOption`\n- Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. (#3986)\n\n### Fixed\n\n- `TracerProvider` allows calling `Tracer()` while it's shutting down.\n  It used to deadlock. (#3924)\n- Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. (#3949)\n- Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#3951)\n- Automatically figure out the default aggregation with `aggregation.Default`. (#3967)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/metric/instrument` package is deprecated.\n  Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. (#4018)\n\n## [1.15.0-rc.2/0.38.0-rc.2] 2023-03-23\n\nThis is a release candidate for the v1.15.0/v0.38.0 release.\nThat release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\n### Added\n\n- The `WithHostID` option to `go.opentelemetry.io/otel/sdk/resource`. (#3812)\n- The `WithoutTimestamps` option to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to sets all timestamps to zero. (#3828)\n- The new `Exemplar` type is added to `go.opentelemetry.io/otel/sdk/metric/metricdata`.\n  Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849)\n- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895)\n- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900)\n- Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854)\n\n### Changed\n\n- Optimize memory allocation when creation a new `Set` using `NewSet` or `NewSetWithFiltered` in `go.opentelemetry.io/otel/attribute`. (#3832)\n- Optimize memory allocation when creation new metric instruments in `go.opentelemetry.io/otel/sdk/metric`. (#3832)\n- Avoid creating new objects on all calls to `WithDeferredSetup` and `SkipContextSetup` in OpenTracing bridge. (#3833)\n- The `New` and `Detect` functions from `go.opentelemetry.io/otel/sdk/resource` return errors that wrap underlying errors instead of just containing the underlying error strings. (#3844)\n- Both the `Histogram` and `HistogramDataPoint` are redefined with a generic argument of `[N int64 | float64]` in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#3849)\n- The metric `Export` interface from `go.opentelemetry.io/otel/sdk/metric` accepts a `*ResourceMetrics` instead of `ResourceMetrics`. (#3853)\n- Rename `Asynchronous` to `Observable` in `go.opentelemetry.io/otel/metric/instrument`. (#3892)\n- Rename `Int64ObserverOption` to `Int64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895)\n- Rename `Float64ObserverOption` to `Float64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895)\n- The internal logging changes the verbosity level of info to `V(4)`, the verbosity level of debug to `V(8)`. (#3900)\n\n### Fixed\n\n- `TracerProvider` consistently doesn't allow to register a `SpanProcessor` after shutdown. (#3845)\n\n### Removed\n\n- The deprecated `go.opentelemetry.io/otel/metric/global` package is removed. (#3829)\n- The unneeded `Synchronous` interface in `go.opentelemetry.io/otel/metric/instrument` was removed. (#3892)\n- The `Float64ObserverConfig` and `NewFloat64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`.\n  Use the added `float64` instrument configuration instead. (#3895)\n- The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`.\n  Use the added `int64` instrument configuration instead. (#3895)\n- The `NewNoopMeter` function in `go.opentelemetry.io/otel/metric`, use `NewMeterProvider().Meter(\"\")` instead. (#3893)\n\n## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01\n\nThis is a release candidate for the v1.15.0/v0.38.0 release.\nThat release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.\nSee our [versioning policy](VERSIONING.md) for more information about these stability guarantees.\n\nThis release drops the compatibility guarantee of [Go 1.18].\n\n### Added\n\n- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#3818)\n  - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`.\n  - Use `GetMeterProivder` for a global `metric.MeterProvider`.\n  - Use `SetMeterProivder` to set the global `metric.MeterProvider`.\n\n### Changed\n\n- Dropped compatibility testing for [Go 1.18].\n  The project no longer guarantees support for this version of Go. (#3813)\n\n### Fixed\n\n- Handle empty environment variable as it they were not set. (#3764)\n- Clarify the `httpconv` and `netconv` packages in `go.opentelemetry.io/otel/semconv/*` provide tracing semantic conventions. (#3823)\n- Fix race conditions in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic. (#3899)\n- Fix sending nil `scopeInfo` to metrics channel in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic in `github.com/prometheus/client_golang/prometheus`. (#3899)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/metric/global` package is deprecated.\n  Use `go.opentelemetry.io/otel` instead. (#3818)\n\n### Removed\n\n- The deprecated `go.opentelemetry.io/otel/metric/unit` package is removed. (#3814)\n\n## [1.14.0/0.37.0/0.0.4] 2023-02-27\n\nThis release is the last to support [Go 1.18].\nThe next release will require at least [Go 1.19].\n\n### Added\n\n- The `event` type semantic conventions are added to `go.opentelemetry.io/otel/semconv/v1.17.0`. (#3697)\n- Support [Go 1.20]. (#3693)\n- The `go.opentelemetry.io/otel/semconv/v1.18.0` package.\n  The package contains semantic conventions from the `v1.18.0` version of the OpenTelemetry specification. (#3719)\n  - The following `const` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included:\n    - `OtelScopeNameKey` -> `OTelScopeNameKey`\n    - `OtelScopeVersionKey` -> `OTelScopeVersionKey`\n    - `OtelLibraryNameKey` -> `OTelLibraryNameKey`\n    - `OtelLibraryVersionKey` -> `OTelLibraryVersionKey`\n    - `OtelStatusCodeKey` -> `OTelStatusCodeKey`\n    - `OtelStatusDescriptionKey` -> `OTelStatusDescriptionKey`\n    - `OtelStatusCodeOk` -> `OTelStatusCodeOk`\n    - `OtelStatusCodeError` -> `OTelStatusCodeError`\n  - The following `func` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included:\n    - `OtelScopeName` -> `OTelScopeName`\n    - `OtelScopeVersion` -> `OTelScopeVersion`\n    - `OtelLibraryName` -> `OTelLibraryName`\n    - `OtelLibraryVersion` -> `OTelLibraryVersion`\n    - `OtelStatusDescription` -> `OTelStatusDescription`\n- A `IsSampled` method is added to the `SpanContext` implementation in `go.opentelemetry.io/otel/bridge/opentracing` to expose the span sampled state.\n  See the [README](./bridge/opentracing/README.md) for more information. (#3570)\n- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/metric`. (#3738)\n- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/trace`. (#3739)\n- The following environment variables are supported by the periodic `Reader` in `go.opentelemetry.io/otel/sdk/metric`. (#3763)\n  - `OTEL_METRIC_EXPORT_INTERVAL` sets the time between collections and exports.\n  - `OTEL_METRIC_EXPORT_TIMEOUT` sets the timeout an export is attempted.\n\n### Changed\n\n- Fall-back to `TextMapCarrier` when it's not `HttpHeader`s in `go.opentelemetry.io/otel/bridge/opentracing`. (#3679)\n- The `Collect` method of the `\"go.opentelemetry.io/otel/sdk/metric\".Reader` interface is updated to accept the `metricdata.ResourceMetrics` value the collection will be made into.\n  This change is made to enable memory reuse by SDK users. (#3732)\n- The `WithUnit` option in `go.opentelemetry.io/otel/sdk/metric/instrument` is updated to accept a `string` for the unit value. (#3776)\n\n### Fixed\n\n- Ensure `go.opentelemetry.io/otel` does not use generics. (#3723, #3725)\n- Multi-reader `MeterProvider`s now export metrics for all readers, instead of just the first reader. (#3720, #3724)\n- Remove use of deprecated `\"math/rand\".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733)\n- Do not silently drop unknown schema data with `Parse` in  `go.opentelemetry.io/otel/schema/v1.1`. (#3743)\n- Data race issue in OTLP exporter retry mechanism. (#3755, #3756)\n- Wrapping empty errors when exporting in `go.opentelemetry.io/otel/sdk/metric`. (#3698, #3772)\n- Incorrect \"all\" and \"resource\" definition for schema files in `go.opentelemetry.io/otel/schema/v1.1`. (#3777)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/metric/unit` package is deprecated.\n  Use the equivalent unit string instead. (#3776)\n  - Use `\"1\"` instead of `unit.Dimensionless`\n  - Use `\"By\"` instead of `unit.Bytes`\n  - Use `\"ms\"` instead of `unit.Milliseconds`\n\n## [1.13.0/0.36.0] 2023-02-07\n\n### Added\n\n- Attribute `KeyValue` creations functions to `go.opentelemetry.io/otel/semconv/v1.17.0` for all non-enum semantic conventions.\n  These functions ensure semantic convention type correctness. (#3675)\n\n### Fixed\n\n- Removed the `http.target` attribute from being added by `ServerRequest` in the following packages. (#3687)\n  - `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`\n  - `go.opentelemetry.io/otel/semconv/v1.14.0/httpconv`\n  - `go.opentelemetry.io/otel/semconv/v1.15.0/httpconv`\n  - `go.opentelemetry.io/otel/semconv/v1.16.0/httpconv`\n  - `go.opentelemetry.io/otel/semconv/v1.17.0/httpconv`\n\n### Removed\n\n- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631)\n- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631)\n- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631)\n- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631)\n\n## [1.12.0/0.35.0] 2023-01-28\n\n### Added\n\n- The `WithInt64Callback` option to `go.opentelemetry.io/otel/metric/instrument`.\n  This options is used to configure `int64` Observer callbacks during their creation. (#3507)\n- The `WithFloat64Callback` option to `go.opentelemetry.io/otel/metric/instrument`.\n  This options is used to configure `float64` Observer callbacks during their creation. (#3507)\n- The `Producer` interface and `Reader.RegisterProducer(Producer)` to `go.opentelemetry.io/otel/sdk/metric`.\n  These additions are used to enable external metric Producers. (#3524)\n- The `Callback` function type to `go.opentelemetry.io/otel/metric`.\n  This new named function type is registered with a `Meter`. (#3564)\n- The `go.opentelemetry.io/otel/semconv/v1.13.0` package.\n  The package contains semantic conventions from the `v1.13.0` version of the OpenTelemetry specification. (#3499)\n  - The `EndUserAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientRequest` and `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `HTTPAttributesFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientResponse` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `HTTPClientAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `HTTPServerAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `HTTPServerMetricAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `NetAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `Transport` in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` and `ClientRequest` or `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `SpanStatusFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `SpanStatusFromHTTPStatusCodeAndSpanKind` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `ClientStatus` and `ServerStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.\n  - The `Client` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Conn`.\n  - The `Server` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Listener`.\n- The `go.opentelemetry.io/otel/semconv/v1.14.0` package.\n  The package contains semantic conventions from the `v1.14.0` version of the OpenTelemetry specification. (#3566)\n- The `go.opentelemetry.io/otel/semconv/v1.15.0` package.\n  The package contains semantic conventions from the `v1.15.0` version of the OpenTelemetry specification. (#3578)\n- The `go.opentelemetry.io/otel/semconv/v1.16.0` package.\n  The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579)\n- Metric instruments to `go.opentelemetry.io/otel/metric/instrument`.\n  These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586)\n  - `Float64ObservableCounter` replaces the `asyncfloat64.Counter`\n  - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter`\n  - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge`\n  - `Int64ObservableCounter` replaces the `asyncint64.Counter`\n  - `Int64ObservableUpDownCounter` replaces the `asyncint64.UpDownCounter`\n  - `Int64ObservableGauge` replaces the `asyncint64.Gauge`\n  - `Float64Counter` replaces the `syncfloat64.Counter`\n  - `Float64UpDownCounter` replaces the `syncfloat64.UpDownCounter`\n  - `Float64Histogram` replaces the `syncfloat64.Histogram`\n  - `Int64Counter` replaces the `syncint64.Counter`\n  - `Int64UpDownCounter` replaces the `syncint64.UpDownCounter`\n  - `Int64Histogram` replaces the `syncint64.Histogram`\n- `NewTracerProvider` to `go.opentelemetry.io/otel/bridge/opentracing`.\n  This is used to create `WrapperTracer` instances from a `TracerProvider`. (#3116)\n- The `Extrema` type to `go.opentelemetry.io/otel/sdk/metric/metricdata`.\n  This type is used to represent min/max values and still be able to distinguish unset and zero values. (#3487)\n- The `go.opentelemetry.io/otel/semconv/v1.17.0` package.\n  The package contains semantic conventions from the `v1.17.0` version of the OpenTelemetry specification. (#3599)\n\n### Changed\n\n- Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500)\n- Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507)\n  - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`.\n  - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`.\n  - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`.\n  - Use the added `Float64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncfloat64`.\n- Return a `Registration` from the `RegisterCallback` method of a `Meter` in the `go.opentelemetry.io/otel/metric` package.\n  This `Registration` can be used to unregister callbacks. (#3522)\n- Global error handler uses an atomic value instead of a mutex. (#3543)\n- Add `NewMetricProducer` to `go.opentelemetry.io/otel/bridge/opencensus`, which can be used to pass OpenCensus metrics to an OpenTelemetry Reader. (#3541)\n- Global logger uses an atomic value instead of a mutex. (#3545)\n- The `Shutdown` method of the `\"go.opentelemetry.io/otel/sdk/trace\".TracerProvider` releases all computational resources when called the first time. (#3551)\n- The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions.\n  This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557)\n- Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name.\n  Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516)\n- Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514)\n- The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562)\n  - `InstrumentKindSyncCounter` is renamed to `InstrumentKindCounter`\n  - `InstrumentKindSyncUpDownCounter` is renamed to `InstrumentKindUpDownCounter`\n  - `InstrumentKindSyncHistogram` is renamed to `InstrumentKindHistogram`\n  - `InstrumentKindAsyncCounter` is renamed to `InstrumentKindObservableCounter`\n  - `InstrumentKindAsyncUpDownCounter` is renamed to `InstrumentKindObservableUpDownCounter`\n  - `InstrumentKindAsyncGauge` is renamed to `InstrumentKindObservableGauge`\n- The `RegisterCallback` method of the `Meter` in `go.opentelemetry.io/otel/metric` changed.\n  - The named `Callback` replaces the inline function parameter. (#3564)\n  - `Callback` is required to return an error. (#3576)\n  - `Callback` accepts the added `Observer` parameter added.\n    This new parameter is used by `Callback` implementations to observe values for asynchronous instruments instead of calling the `Observe` method of the instrument directly. (#3584)\n  - The slice of `instrument.Asynchronous` is now passed as a variadic argument. (#3587)\n- The exporter from `go.opentelemetry.io/otel/exporters/zipkin` is updated to use the `v1.16.0` version of semantic conventions.\n  This means it no longer uses the removed `net.peer.ip` or `http.host` attributes to determine the remote endpoint.\n  Instead it uses the `net.sock.peer` attributes. (#3581)\n- The `Min` and `Max` fields of the `HistogramDataPoint` in `go.opentelemetry.io/otel/sdk/metric/metricdata` are now defined with the added `Extrema` type instead of a `*float64`. (#3487)\n\n### Fixed\n\n- Asynchronous instruments that use sum aggregators and attribute filters correctly add values from equivalent attribute sets that have been filtered. (#3439, #3549)\n- The `RegisterCallback` method of the `Meter` from `go.opentelemetry.io/otel/sdk/metric` only registers a callback for instruments created by that meter.\n  Trying to register a callback with instruments from a different meter will result in an error being returned. (#3584)\n\n### Deprecated\n\n- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` is deprecated.\n  Use `NewMetricProducer` instead. (#3541)\n- The `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is deprecated.\n  Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)\n- The `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is deprecated.\n  Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)\n- The `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is deprecated.\n  Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)\n- The `go.opentelemetry.io/otel/metric/instrument/syncint64` package is deprecated.\n  Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)\n- The `NewWrappedTracerProvider` in `go.opentelemetry.io/otel/bridge/opentracing` is now deprecated.\n  Use `NewTracerProvider` instead. (#3116)\n\n### Removed\n\n- The deprecated `go.opentelemetry.io/otel/sdk/metric/view` package is removed. (#3520)\n- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncint64` is removed.\n  Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)\n  - The `Counter` method is replaced by `Meter.Int64ObservableCounter`\n  - The `UpDownCounter` method is replaced by `Meter.Int64ObservableUpDownCounter`\n  - The `Gauge` method is replaced by `Meter.Int64ObservableGauge`\n- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncfloat64` is removed.\n  Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)\n  - The `Counter` method is replaced by `Meter.Float64ObservableCounter`\n  - The `UpDownCounter` method is replaced by `Meter.Float64ObservableUpDownCounter`\n  - The `Gauge` method is replaced by `Meter.Float64ObservableGauge`\n- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncint64` is removed.\n  Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)\n  - The `Counter` method is replaced by `Meter.Int64Counter`\n  - The `UpDownCounter` method is replaced by `Meter.Int64UpDownCounter`\n  - The `Histogram` method is replaced by `Meter.Int64Histogram`\n- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncfloat64` is removed.\n  Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)\n  - The `Counter` method is replaced by `Meter.Float64Counter`\n  - The `UpDownCounter` method is replaced by `Meter.Float64UpDownCounter`\n  - The `Histogram` method is replaced by `Meter.Float64Histogram`\n\n## [1.11.2/0.34.0] 2022-12-05\n\n### Added\n\n- The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package.\n   This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387)\n- Add Instrumentation Scope and Version as info metric and label in Prometheus exporter.\n  This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357)\n- OTLP exporters now recognize: (#3363)\n  - `OTEL_EXPORTER_OTLP_INSECURE`\n  - `OTEL_EXPORTER_OTLP_TRACES_INSECURE`\n  - `OTEL_EXPORTER_OTLP_METRICS_INSECURE`\n  - `OTEL_EXPORTER_OTLP_CLIENT_KEY`\n  - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY`\n  - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY`\n  - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`\n  - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE`\n  - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE`\n- The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`.\n  These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459)\n- The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`.\n  These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459)\n- The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459)\n- The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487)\n\n### Changed\n\n- The `\"go.opentelemetry.io/otel/sdk/metric\".WithReader` option no longer accepts views to associate with the `Reader`.\n   Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option.\n   The views registered with the `MeterProvider` apply to all `Reader`s. (#3387)\n- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `\"go.opentelemetry.io/otel/sdk/metric\".Exporter` interface. (#3260)\n- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `\"go.opentelemetry.io/otel/exporters/otlp/otlpmetric\".Client` interface. (#3260)\n- The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260)\n- The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260)\n\n### Fixed\n\n- The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369)\n- Remove comparable requirement for `Reader`s. (#3387)\n- Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389)\n- Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398)\n- Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340)\n- `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436)\n- Re-enabled Attribute Filters in the Metric SDK. (#3396)\n- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408)\n- Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432)\n- Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440)\n- Prevent duplicate Prometheus description, unit, and type. (#3469)\n- Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489)\n\n### Removed\n\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486)\n- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated.\n  Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476)\n\n## [1.11.1/0.33.0] 2022-10-19\n\n### Added\n\n- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation.\n   By default, it will register with the default Prometheus registerer.\n   A non-default registerer can be used by passing the `WithRegisterer` option. (#3239)\n- Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341)\n- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285)\n\n### Changed\n\n- The `\"go.opentelemetry.io/otel/exporters/prometheus\".New` function is updated to return an error.\n   It will return an error if the exporter fails to register with Prometheus. (#3239)\n\n### Fixed\n\n- The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963)\n- The `baggage.NewMember` function decodes the `value` parameter instead of directly using it.\n   This fixes the implementation to be compliant with the W3C specification. (#3226)\n- Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252)\n- The `Shutdown` and `ForceFlush` methods of the `\"go.opentelemetry.io/otel/sdk/trace\".TraceProvider` no longer return an error when no processor is registered. (#3268)\n- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281)\n- The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293)\n- Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278)\n- `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358)\n- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup.\n   Instead the exporter is defined as an \"unchecked\" collector for Prometheus.\n   This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342)\n- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360)\n- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names.\n   This can be disabled using the `WithoutUnits()` option added to that package. (#3352)\n\n## [1.11.0/0.32.3] 2022-10-12\n\n### Added\n\n- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261)\n\n### Changed\n\n- `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214)\n- Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`.\n  This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235)\n\n## [0.32.2] Metric SDK (Alpha) - 2022-10-11\n\n### Added\n\n- Added an example of using metric views to customize instruments. (#3177)\n- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261)\n\n### Changed\n\n- Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220)\n- Update histogram default bounds to match the requirements of the latest specification. (#3222)\n- Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer.  (#3265)\n\n### Fixed\n\n- Use default view if instrument does not match any registered view of a reader. (#3224, #3237)\n- Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251)\n- Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251)\n- Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251)\n- The OpenCensus bridge no longer sends empty batches of metrics. (#3263)\n\n## [0.32.1] Metric SDK (Alpha) - 2022-09-22\n\n### Changed\n\n- The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting.\n   Invalid characters are replaced with `_`. (#3212)\n\n### Added\n\n- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192)\n- The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206)\n\n### Fixed\n\n- Updated go.mods to point to valid versions of the sdk. (#3216)\n- Set the `MeterProvider` resource on all exported metric data. (#3218)\n\n## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18\n\n### Changed\n\n- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification.\n  Please see the package documentation for how the new SDK is initialized and configured. (#3175)\n- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179)\n\n### Removed\n\n- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed.\n  A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed.\n  A replacement package that supports the new metric SDK will be added back in a future release. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175)\n- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175)\n- The `\"go.opentelemetry.io/otel/sdk/metric\".ErrUninitializedInstrument` variable was removed. (#3175)\n- The `\"go.opentelemetry.io/otel/sdk/metric\".ErrBadInstrument` variable was removed. (#3175)\n- The `\"go.opentelemetry.io/otel/sdk/metric\".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175)\n- The `\"go.opentelemetry.io/otel/sdk/metric\".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175)\n- The deprecated `\"go.opentelemetry.io/otel/sdk/metric\".AtomicFieldOffsets` function was removed. (#3175)\n\n## [1.10.0] - 2022-09-09\n\n### Added\n\n- Support Go 1.19. (#3077)\n  Include compatibility testing and document support. (#3077)\n- Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106)\n- Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)\n\n### Changed\n\n- Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`).  (#3096)\n- Attempting to start a span with a nil `context` will no longer cause a panic. (#3110)\n- All exporters will be shutdown even if one reports an error (#3091)\n- Ensure valid UTF-8 when truncating over-length attribute values. (#3156)\n\n## [1.9.0/0.0.3] - 2022-08-01\n\n### Added\n\n- Add support for Schema Files format 1.1.x (metric \"split\" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999)\n- Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package.\n  The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009)\n- Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package.\n  The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010)\n- Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018)\n\n### Fixed\n\n- Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029)\n\n## [1.8.0/0.31.0] - 2022-07-08\n\n### Added\n\n- Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods\nof the `\"go.opentelemetry.io/otel/bridge/opentracing\".BridgeTracer` type. (#2911)\n\n### Changed\n\n- The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886)\n- In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976)\n- Move metric no-op implementation form `nonrecording` to `metric` package. (#2866)\n\n### Removed\n\n- Support for go1.16. Support is now only for go1.17 and go1.18 (#2917)\n\n### Deprecated\n\n- The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated.\n  Use the equivalent `Scope` struct instead. (#2977)\n- The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated.\n  Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977)\n\n## [1.7.0/0.30.0] - 2022-04-28\n\n### Added\n\n- Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package.\n  The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763)\n- Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package.\n  The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792)\n- Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package.\n  The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842)\n- Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776)\n\n### Fixed\n\n- Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784)\n- Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786)\n\n### Changed\n\n- The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790)\n- The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`.\n  The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790)\n- The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`.\n  Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790)\n\n### Deprecated\n\n- The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.\n  Use the equivalent `Iterator.Attribute` method instead. (#2790)\n- The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.\n  Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790)\n- The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.\n  Use the equivalent `MergeIterator.Attribute` method instead. (#2790)\n\n### Removed\n\n- Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864)\n- Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864)\n\n## [0.29.0] - 2022-04-11\n\n### Added\n\n- The metrics global package was added back into several test files. (#2764)\n- The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package.\n  This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750)\n\n### Removed\n\n- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`.\n  Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720)\n\n### Changed\n\n- Don't panic anymore when setting a global MeterProvider to itself. (#2749)\n- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`.\n  This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748)\n\n## [1.6.3] - 2022-04-07\n\n### Fixed\n\n- Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773)\n\n## [1.6.2] - 2022-04-06\n\n### Changed\n\n- Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749)\n- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`.\n  This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748)\n\n## [1.6.1] - 2022-03-28\n\n### Fixed\n\n- The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant.\n  Instead of using `\"https://opentelemetry.io/schemas/v<version>\"` they now use the correct URL without a `v` prefix, `\"https://opentelemetry.io/schemas/<version>\"`. (#2743, #2744)\n\n### Security\n\n- Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`.\n  This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728)\n\n## [1.6.0/0.28.0] - 2022-03-23\n\n### ⚠️ Notice ⚠️\n\nThis update is a breaking change of the unstable Metrics API.\nCode instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified.\n\n### Added\n\n- Add metrics exponential histogram support.\n  New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502)\n- Add Go 1.18 to our compatibility tests. (#2679)\n- Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517)\n- Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660)\n\n### Changed\n\n- The metrics API has been significantly changed to match the revised OpenTelemetry specification.\n  High-level changes include:\n\n  - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s.\n    These `InstrumentProvider`s are managed with a `Meter`.\n  - Synchronous and asynchronous instruments are grouped into their own packages based on value types.\n  - Asynchronous callbacks can now be registered with a `Meter`.\n\n  Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660)\n\n### Fixed\n\n- Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677)\n\n## [1.5.0] - 2022-03-16\n\n### Added\n\n- Log the Exporters configuration in the TracerProviders message. (#2578)\n- Added support to configure the span limits with environment variables.\n  The following environment variables are supported. (#2606, #2637)\n  - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`\n  - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT`\n  - `OTEL_SPAN_EVENT_COUNT_LIMIT`\n  - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT`\n  - `OTEL_SPAN_LINK_COUNT_LIMIT`\n  - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT`\n\n  If the provided environment variables are invalid (negative), the default values would be used.\n- Rename the `gc` runtime name to `go` (#2560)\n- Add resource container ID detection. (#2418)\n- Add span attribute value length limit.\n  The new `AttributeValueLengthLimit` field is added to the `\"go.opentelemetry.io/otel/sdk/trace\".SpanLimits` type to configure this limit for a `TracerProvider`.\n  The default limit for this resource is \"unlimited\". (#2637)\n- Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`.\n  This option replaces the `WithSpanLimits` option.\n  Zero or negative values will not be changed to the default value like `WithSpanLimits` does.\n  Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited.\n  Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637)\n\n### Changed\n\n- Drop oldest tracestate `Member` when capacity is reached. (#2592)\n- Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601)\n- Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639)\n- Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640)\n- Introduce new internal `envconfig` package for OTLP exporters. (#2608)\n- If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661)\n\n### Fixed\n\n- Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616)\n- Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625)\n- Unlimited span limits are now supported (negative values). (#2636, #2637)\n\n### Deprecated\n\n- Deprecated `\"go.opentelemetry.io/otel/sdk/trace\".WithSpanLimits`.\n  Use `WithRawSpanLimits` instead.\n  That option allows setting unlimited and zero limits, this option does not.\n  This option will be kept until the next major version incremented release. (#2637)\n\n## [1.4.1] - 2022-02-16\n\n### Fixed\n\n- Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615)\n\n## [1.4.0] - 2022-02-11\n\n### Added\n\n- Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490)\n- Log the configuration of `TracerProvider`s, and `Tracer`s for debugging.\n  To enable use a logger with Verbosity (V level) `>=1`. (#2500)\n- Added support to configure the batch span-processor with environment variables.\n  The following environment variables are used. (#2515)\n  - `OTEL_BSP_SCHEDULE_DELAY`\n  - `OTEL_BSP_EXPORT_TIMEOUT`\n  - `OTEL_BSP_MAX_QUEUE_SIZE`.\n  - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE`\n\n### Changed\n\n- Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589)\n\n### Deprecated\n\n- Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`.\n  Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382)\n- Deprecate `\"go.opentelemetry.io/otel/sdk/metric\".AtomicFieldOffsets`. (#2445)\n\n### Fixed\n\n- Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461)\n- Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512)\n- Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491)\n- Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493)\n- W3C baggage will now decode urlescaped values. (#2529)\n- Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522)\n- The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification.\n  Instead of dropping the least-recently-used attribute, the last added attribute is dropped.\n  This drop order still only applies to attributes with unique keys not already contained in the span.\n  If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576)\n\n### Removed\n\n- Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546)\n  - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge)\n  - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram)\n  - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum)\n\n## [1.3.0] - 2021-12-10\n\n### ⚠️ Notice ⚠️\n\nWe have updated the project minimum supported Go version to 1.16\n\n### Added\n\n- Added an internal Logger.\n  This can be used by the SDK and API to provide users with feedback of the internal state.\n  To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343)\n- Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425)\n- Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296)\n\n### Changed\n\n- The `\"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc\".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329)\n- The `\"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc\".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425)\n- The `\"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc\".RetrySettings` type is renamed to `RetryConfig`. (#2425)\n- The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432)\n- Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371)\n\n### Fixed\n\n- The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification.\n  Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP_<signal>_ENDPOINT` environment variable is now used without modification of the path.\n  When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433)\n- Basic metric controller updated to use sync.Map to avoid blocking calls (#2381)\n- The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440)\n\n### Deprecated\n\n- Deprecated the `\"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp\".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425)\n- Deprecated the `\"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp\".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425)\n\n### Removed\n\n- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350)\n- Remove the metric Bound Instruments interface and implementations. (#2399)\n- Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423)\n- Metric SDK removes the \"exact\" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348)\n\n## [1.2.0] - 2021-11-12\n\n### Changed\n\n- Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274)\n- The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274)\n- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface:\n  - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner`\n  - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`.\n  - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271)\n- Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335)\n\n### Added\n\n- Add the `\"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc\".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002)\n- Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267)\n- Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334)\n\n## [1.1.0] - 2021-10-27\n\n### Added\n\n- Add the `\"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002)\n- Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package.\n  The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320)\n- Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package.\n  The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321)\n- Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package.\n  The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322)\n  - When upgrading from the `semconv/v1.4.0` package note the following name changes:\n    - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey`\n    - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey`\n    - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey`\n    - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey`\n    - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey`\n    - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey`\n\n### Changed\n\n- Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275).\n\n### Fixed\n\n- The `\"go.opentelemetry.io/otel/semconv/v1.4.0\".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284)\n- The `\"go.opentelemetry.io/otel/semconv/v1.4.0\".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285)\n- The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289)\n\n## [1.0.1] - 2021-10-01\n\n### Fixed\n\n- json stdout exporter no longer crashes due to concurrency bug. (#2265)\n\n## [Metrics 0.24.0] - 2021-10-01\n\n### Changed\n\n- NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237)\n- The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197)\n  - The former `\"go.opentelemetry.io/otel/sdk/export/metric\".CheckpointSet` is renamed `Reader`.\n  - The new interface is named `\"go.opentelemetry.io/otel/sdk/export/metric\".InstrumentationLibraryReader`.\n\n## [1.0.0] - 2021-09-20\n\nThis is the first stable release for the project.\nThis release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md).\n\n### Added\n\n- OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242)\n\n### Fixed\n\n- Slice-valued attributes can correctly be used as map keys. (#2223)\n\n### Removed\n\n- Removed the `\"go.opentelemetry.io/otel/exporters/zipkin\".WithSDKOptions` function. (#2248)\n- Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234)\n- Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233)\n- Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package.\n  Use the typed functions and methods added to the package instead. (#2235)\n  - The `Key.Array` method is removed.\n  - The `Array` function is removed.\n  - The `Any` function is removed.\n  - The `ArrayValue` function is removed.\n  - The `AsArray` function is removed.\n\n## [1.0.0-RC3] - 2021-09-02\n\n### Added\n\n- Added `ErrorHandlerFunc` to use a function as an `\"go.opentelemetry.io/otel\".ErrorHandler`. (#2149)\n- Added `\"go.opentelemetry.io/otel/trace\".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163)\n- Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162)\n  - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package.\n- Added the `go.opentelemetry.io/otel/example/fib` example package.\n  Included is an example application that computes Fibonacci numbers. (#2203)\n\n### Changed\n\n- Metric instruments have been renamed to match the (feature-frozen) metric API specification:\n  - ValueRecorder becomes Histogram\n  - ValueObserver becomes Gauge\n  - SumObserver becomes CounterObserver\n  - UpDownSumObserver becomes UpDownCounterObserver\n  The API exported from this project is still considered experimental. (#2202)\n- Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091)\n- The Metrics SDK export record no longer contains a Resource pointer, the SDK `\"go.opentelemetry.io/otel/sdk/trace/export/metric\".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `\"go.opentelemetry.io/otel/sdk/metric/controller/basic\".Controller.Resource()`. (#2120)\n- The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is \"plain\" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196)\n- Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated.\n  All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package.\n  The functions from that package should be used instead. (#2166)\n- The `\"go.opentelemetry.io/otel/attribute\".Array` function and the related `ARRAY` value type is deprecated.\n  Use the typed `*Slice` functions and types added to the package instead. (#2162)\n- The `\"go.opentelemetry.io/otel/attribute\".Any` function is deprecated.\n  Use the typed functions instead. (#2181)\n- The `go.opentelemetry.io/otel/oteltest` package is deprecated.\n  The `\"go.opentelemetry.io/otel/sdk/trace/tracetest\".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188)\n\n### Removed\n\n- Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105)\n\n### Fixed\n\n- The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138)\n- Setting the global `ErrorHandler` with `\"go.opentelemetry.io/otel\".SetErrorHandler` multiple times is now supported. (#2160, #2140)\n- The `\"go.opentelemetry.io/otel/attribute\".Any` function now supports `int32` values. (#2169)\n- Multiple calls to `\"go.opentelemetry.io/otel/sdk/metric/controller/basic\".WithResource()` are handled correctly, and when no resources are provided `\"go.opentelemetry.io/otel/sdk/resource\".Default()` is used. (#2120)\n- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195)\n- Fixed typos in resources.go. (#2201)\n\n## [1.0.0-RC2] - 2021-07-26\n\n### Added\n\n- Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840)\n- Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840)\n- Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package.\n  This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095)\n- Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115)\n- Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`.\n  This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK.\n  For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118)\n- Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package.\n  This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132)\n\n### Changed\n\n- The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027)\n- Rename the `\"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\".RetrySettings` to `RetryConfig`. (#2095)\n\n### Deprecated\n\n- The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114)\n- The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123)\n- The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated.\n  Use the `trace.ParseTraceState` function instead. (#2122)\n\n### Removed\n\n- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020)\n- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020)\n- Removed the `\"go.opentelemetry.io/otel/sdk/resource\".WithBuiltinDetectors` function.\n  The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097)\n- Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package.\n  The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095)\n- Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118)\n\n### Fixed\n\n- When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032)\n- `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073)\n- OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092)\n- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package.\n  This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102)\n- The `Inject` method for the `\"go.opentelemetry.io/otel/propagation\".TraceContext` type no longer injects empty `tracestate` values. (#2108)\n- Use `6831` as default Jaeger agent port instead of `6832`. (#2131)\n\n## [Experimental Metrics v0.22.0] - 2021-07-19\n\n### Added\n\n- Adds HTTP support for OTLP metrics exporter. (#2022)\n\n### Removed\n\n- Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020)\n\n## [1.0.0-RC1] / 0.21.0 - 2021-06-18\n\nWith this release we are introducing a split in module versions.  The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1`\nwhile the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`.  Modules at major version 1 or greater will not depend on modules\nwith major version 0.\n\n### Added\n\n- Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832)\n  - The following status codes are defined as transient errors:\n      | gRPC Status Code | Description |\n      | ---------------- | ----------- |\n      | 1  | Cancelled |\n      | 4  | Deadline Exceeded |\n      | 8  | Resource Exhausted |\n      | 10 | Aborted |\n      | 10 | Out of Range |\n      | 14 | Unavailable |\n      | 15 | Data Loss |\n- Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874)\n- Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package.\n  This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873)\n- Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886)\n- Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889)\n- Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912)\n- `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package.\n  It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937)\n- Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package.\n  This method returns the number of list-members the `TraceState` holds. (#1937)\n- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data.\n  Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922)\n- Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967)\n- Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package.\n  These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967)\n- The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969)\n- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963)\n- Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938)\n- Several builtin resource detectors now correctly populate the schema URL. (#1938)\n- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data.\n- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991)\n- Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005)\n- Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005)\n- Added a `TracerProvider()` method to the `\"go.opentelemetry.io/otel/trace\".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline.  (#2009)\n\n### Changed\n\n- Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item.\n  `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798)\n- `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810)\n- Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846)\n- CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865)\n- BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860)\n- `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855)\n- Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871)\n- The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method.\n  This method returns the status of a span using the new `Status` type. (#1874)\n- Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`.\n  This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873)\n- Unembed `SpanContext` in `Link`. (#1877)\n- Generate Semantic conventions from the specification YAML. (#1891)\n- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901)\n- The `\"go.opentelemetry.io/otel\".Tracer` function now accepts tracer options. (#1902)\n- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903)\n- Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921)\n- Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)\n- Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921)\n- Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)\n- Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)\n- Refactored option types according to the contribution style guide. (#1882)\n- Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package.\n  This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use.\n  The new `ParseTraceState` function should be used to create a `TraceState`. (#1931)\n- Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931)\n- The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931)\n- Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931)\n- Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931)\n- Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931)\n- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985)\n- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985)\n- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985)\n- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985)\n- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985)\n- Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985)\n- The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987)\n- Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988)\n\n### Deprecated\n\n- The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993)\n- The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993)\n- The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993)\n\n### Removed\n\n- Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810)\n- Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810)\n- Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`.\n  The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate.\n  The `IsRecording` method returns if the span is recording or not.\n  A read-only span value does not need to know if updates to it will be recorded or not.\n  By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873)\n- Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package.\n  The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type.\n  When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873)\n- Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package.\n  Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own.\n  The `\"go.opentelemetry.io/otel\".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900)\n  - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009)\n- The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919)\n- Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931)\n- Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package.\n  Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967)\n- The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed.\n  These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985)\n- The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed.  Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990)\n- The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed.  Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005)\n\n### Fixed\n\n- Only report errors from the `\"go.opentelemetry.io/otel/sdk/resource\".Environment` function when they are not `nil`. (#1850, #1851)\n- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856)\n- BatchSpanProcessor now drops span batches that failed to be exported. (#1860)\n- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898)\n- Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931)\n- Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973)\n- Avoid transport security when OTLP endpoint is a Unix socket. (#2001)\n\n### Security\n\n## [0.20.0] - 2021-04-23\n\n### Added\n\n- The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373)\n- Adds semantic conventions for exceptions. (#1492)\n- Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT`\n  These environment variables can be used to override Jaeger agent hostname and port (#1752)\n- Option `ExportTimeout` was added to batch span processor. (#1755)\n- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770)\n- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771)\n- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771)\n- Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772)\n- Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785)\n- Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788)\n- Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788)\n  - `process.pid`\n  - `process.executable.name`\n  - `process.executable.path`\n  - `process.command_args`\n  - `process.owner`\n  - `process.runtime.name`\n  - `process.runtime.version`\n  - `process.runtime.description`\n- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789)\n- Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811)\n  - `OTEL_EXPORTER_OTLP_ENDPOINT`\n  - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`\n  - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`\n  - `OTEL_EXPORTER_OTLP_HEADERS`\n  - `OTEL_EXPORTER_OTLP_TRACES_HEADERS`\n  - `OTEL_EXPORTER_OTLP_METRICS_HEADERS`\n  - `OTEL_EXPORTER_OTLP_COMPRESSION`\n  - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION`\n  - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION`\n  - `OTEL_EXPORTER_OTLP_TIMEOUT`\n  - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT`\n  - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT`\n  - `OTEL_EXPORTER_OTLP_CERTIFICATE`\n  - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE`\n  - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE`\n- Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821)\n- Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853)\n\n### Fixed\n\n- The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750)\n- The Jaeger exporter now correctly sets tags for the Span status code and message.\n  This means it uses the correct tag keys (`\"otel.status_code\"`, `\"otel.status_description\"`) and does not set the status message as a tag unless it is set on the span. (#1761)\n- The Jaeger exporter now correctly records Span event's names using the `\"event\"` key for a tag.\n  Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768)\n- Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688)\n- Fixed typo for default service name in Jaeger Exporter. (#1797)\n- Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814)\n- Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit.\n  Instead, the exporter now splits the batch into smaller sendable batches. (#1828)\n\n### Changed\n\n- Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492)\n- Jaeger exporter was updated to use thrift v0.14.1. (#1712)\n- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713)\n- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713)\n- The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span.\n  The Span's SpanContext can now self-identify as being remote or not.\n  This means that `\"go.opentelemetry.io/otel/trace\".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731)\n- Improve OTLP/gRPC exporter connection errors. (#1737)\n- Information about a parent span context in a `\"go.opentelemetry.io/otel/export/trace\".SpanSnapshot` is unified in a new `Parent` field.\n  The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748)\n- The `ParentContext` field of the `\"go.opentelemetry.io/otel/sdk/trace\".SamplingParameters` is updated to hold a `context.Context` containing the parent span.\n  This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749)\n- Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD`\n  to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752)\n- Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757)\n- The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself.\n  It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771)\n- Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773)\n- Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777)\n- The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778)\n- The prometheus.InstallNewPipeline example is moved from comment to example test (#1796)\n- The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800)\n- Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create.\n  This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822)\n- Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824)\n- Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument.\n  The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824)\n- The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830)\n- The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830)\n\n### Removed\n\n- Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS`\n  These environment variables will no longer be used to override values of the Jaeger exporter (#1752)\n- No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root.\n  This is unspecified behavior that the OpenTelemetry community plans to standardize in the future.\n  To prevent backwards incompatible changes when it is specified, these links are removed. (#1726)\n- Setting error status while recording error with Span from oteltest package. (#1729)\n- The concept of a remote and local Span stored in a context is unified to just the current Span.\n  Because of this `\"go.opentelemetry.io/otel/trace\".RemoteSpanContextFromContext` is removed as it is no longer needed.\n  Instead, `\"go.opentelemetry.io/otel/trace\".SpanContextFromContext` can be used to return the current Span.\n  If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731)\n- The `HasRemoteParent` field of the `\"go.opentelemetry.io/otel/sdk/trace\".SamplingParameters` is removed.\n  This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749)\n- The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770)\n- Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package.\n  The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804)\n- Remove the `WithDisabled` option from the Jaeger exporter.\n  To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806)\n- Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter.\n  These functions for retrieving specific environment variable values are redundant of other internal functions and\n  are not intended for end user use. (#1824)\n- Removed the Jaeger exporter `WithSDKOptions` `Option`.\n  This option was used to set SDK options for the exporter creation convenience functions.\n  These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases.\n  If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825)\n- The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed.\n  The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830)\n- The Jaeger exporter `Option` type is removed.\n  The type is no longer used by the exporter to configure anything.\n  All the previous configurations these options provided were duplicates of SDK configuration.\n  They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830)\n\n## [0.19.0] - 2021-03-18\n\n### Added\n\n- Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586)\n- A `ForceFlush` method to the `\"go.opentelemetry.io/otel/sdk/trace\".TracerProvider` to flush all registered `SpanProcessor`s. (#1608)\n- Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702)\n- `\"go.opentelemetry.io/otel/trace\".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701)\n- A `Valid` method to the `\"go.opentelemetry.io/otel/attribute\".KeyValue` type. (#1703)\n\n### Changed\n\n- `trace.SpanContext` is now immutable and has no exported fields. (#1573)\n  - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known.\n- Update the `ForceFlush` method signature to the `\"go.opentelemetry.io/otel/sdk/trace\".SpanProcessor` to accept a `context.Context` and return an error. (#1608)\n- Update the `Shutdown` method to the `\"go.opentelemetry.io/otel/sdk/trace\".TracerProvider` return an error on shutdown failure. (#1608)\n- The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612)\n- `\"go.opentelemetry.io/sdk/metric/controller.basic\".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656)\n- Added non-empty string check for trace `Attribute` keys. (#1659)\n- Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662)\n- Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673)\n- Jaeger exporter populates Jaeger's Span Process from Resource. (#1673)\n- Renamed the `LabelSet` method of `\"go.opentelemetry.io/otel/sdk/resource\".Resource` to `Set`. (#1692)\n- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693)\n- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693)\n\n### Removed\n\n- Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549)\n- Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633)\n- Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs.\n   These are now returned as a SpanProcessor interface from their respective constructors. (#1638)\n- Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660)\n- Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663)\n- Removed `jaeger.WithProcess` configuration option. (#1673)\n- Removed `ApplyConfig` method from `\"go.opentelemetry.io/otel/sdk/trace\".TracerProvider` and the now unneeded `Config` struct. (#1693)\n\n### Fixed\n\n- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626)\n- `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655)\n- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678)\n- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681)\n- Synchronization issues in global trace delegate implementation. (#1686)\n- Reduced excess memory usage by global `TracerProvider`. (#1687)\n\n## [0.18.0] - 2021-03-03\n\n### Added\n\n- Added `resource.Default()` for use with meter and tracer providers. (#1507)\n- `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535)\n- Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544)\n- Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558)\n- Compatibility testing suite in the CI system for the following systems. (#1567)\n   | OS      | Go Version | Architecture |\n   | ------- | ---------- | ------------ |\n   | Ubuntu  | 1.15       | amd64        |\n   | Ubuntu  | 1.14       | amd64        |\n   | Ubuntu  | 1.15       | 386          |\n   | Ubuntu  | 1.14       | 386          |\n   | MacOS   | 1.15       | amd64        |\n   | MacOS   | 1.14       | amd64        |\n   | Windows | 1.15       | amd64        |\n   | Windows | 1.14       | amd64        |\n   | Windows | 1.15       | 386          |\n   | Windows | 1.14       | 386          |\n\n### Changed\n\n- Replaced interface `oteltest.SpanRecorder` with its existing implementation\n  `StandardSpanRecorder`. (#1542)\n- Default span limit values to 128. (#1535)\n- Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535)\n- Renamed the `otel/label` package to `otel/attribute`. (#1541)\n- Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551)\n- Parallelize the CI linting and testing. (#1567)\n- Stagger timestamps in exact aggregator tests. (#1569)\n- Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621)\n- Prevent end-users from implementing some interfaces (#1575)\n\n  ```\n      \"otel/exporters/otlp/otlphttp\".Option\n      \"otel/exporters/stdout\".Option\n      \"otel/oteltest\".Option\n      \"otel/trace\".TracerOption\n      \"otel/trace\".SpanOption\n      \"otel/trace\".EventOption\n      \"otel/trace\".LifeCycleOption\n      \"otel/trace\".InstrumentationOption\n      \"otel/sdk/resource\".Option\n      \"otel/sdk/trace\".ParentBasedSamplerOption\n      \"otel/sdk/trace\".ReadOnlySpan\n      \"otel/sdk/trace\".ReadWriteSpan\n  ```\n\n### Removed\n\n- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545)\n- The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567)\n- Removed the `test-386` make target.\n   This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567)\n\n### Fixed\n\n- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572)\n- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577)\n- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579)\n- Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581)\n- The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570)\n\n## [0.17.0] - 2021-02-12\n\n### Changed\n\n- Rename project default branch from `master` to `main`. (#1505)\n- Reverse order in which `Resource` attributes are merged, per change in spec. (#1501)\n- Add tooling to maintain \"replace\" directives in go.mod files automatically. (#1528)\n- Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528)\n- Move metric-related public global APIs from otel to otel/metric/global. (#1528)\n\n## Fixed\n\n- Fixed otlpgrpc reconnection issue.\n- The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513)\n- The otel-collector example now uses the default OTLP receiver port of the collector.\n\n## [0.16.0] - 2021-01-13\n\n### Added\n\n- Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360)\n- `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369)\n- Added documentation about the project's versioning policy. (#1388)\n- Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418)\n- Added codeql workflow to GitHub Actions (#1428)\n- Added Gosec workflow to GitHub Actions (#1429)\n- Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420)\n- Add an OpenCensus exporter bridge. (#1444)\n\n### Changed\n\n- Rename `internal/testing` to `internal/internaltest`. (#1449)\n- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360)\n- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360)\n- Improve span duration accuracy. (#1360)\n- Migrated CI/CD from CircleCI to GitHub Actions (#1382)\n- Remove duplicate checkout from GitHub Actions workflow (#1407)\n- Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412)\n- Metric `exact` aggregator includes per-point timestamps (#1412)\n- Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412)\n- `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369)\n- Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369)\n- Unify endpoint API that related to OTel exporter. (#1401)\n- Optimize metric histogram aggregator to reuse its slice of buckets. (#1435)\n- Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430)\n- Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434)\n- `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432)\n- Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420)\n- The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447)\n- Metric Push and Pull Controller components are combined into a single \"basic\" Controller:\n  - `WithExporter()` and `Start()` to configure Push behavior\n  - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior\n  - `Start()` and `Stop()` accept Context. (#1378)\n- The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452)\n\n### Removed\n\n- Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360)\n- Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412)\n- Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412)\n\n### Fixed\n\n- `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443)\n\n## [0.15.0] - 2020-12-10\n\n### Added\n\n- The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363)\n\n### Changed\n\n- The Zipkin exporter now uses the Span status code to determine. (#1328)\n- `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357)\n- Move the OpenCensus example into `example` directory. (#1359)\n- Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363)\n- Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374)\n- Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375)\n\n### Fixed\n\n- Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381)\n\n## [0.14.0] - 2020-11-19\n\n### Added\n\n- An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254)\n- A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259)\n- `SpanContextFromContext` returns `SpanContext` from context. (#1255)\n- `TraceState` has been added to `SpanContext`. (#1340)\n- `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323)\n- Add an OpenCensus to OpenTelemetry tracing bridge. (#1305)\n- Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333)\n- Add missing tests for `sdk/trace/attributes_map.go`. (#1337)\n\n### Changed\n\n- Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307)\n  - `ID` has been renamed to `TraceID`.\n  - `IDFromHex` has been renamed to `TraceIDFromHex`.\n  - `EmptySpanContext` is removed.\n- Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229)\n- OTLP Exporter updates:\n  - supports OTLP v0.6.0 (#1230, #1354)\n  - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296)\n- The Sampler is now called on local child spans. (#1233)\n- The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240)\n- The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`.\n   This matches the returned type and fixes misuse of the term metric. (#1240)\n- Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241)\n- Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252)\n- Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321)\n- Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316)\n- Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316)\n- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254)\n- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254)\n- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330)\n- Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330)\n- Rename correlation context header from `\"otcorrelations\"` to `\"baggage\"` to match the OpenTelemetry specification. (#1267)\n- Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276)\n- The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and\n  `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235)\n- The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210)\n- Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310)\n- Updated span collection limits for attribute, event and link counts to 1000 (#1318)\n- Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338)\n\n### Removed\n\n- The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243)\n- The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy.\n   It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254)\n- The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`.\n   `Tracer` and `Span` from the same module should be used in their place instead. (#1306)\n- `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350)\n- Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314)\n\n### Fixed\n\n- Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244)\n- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258)\n- Fix condition in `label.Any`. (#1299)\n- Fix global `TracerProvider` to pass options to its configured provider. (#1329)\n- Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309)\n\n## [0.13.0] - 2020-10-08\n\n### Added\n\n- OTLP Metric exporter supports Histogram aggregation. (#1209)\n- The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214)\n- A Baggage API to implement the OpenTelemetry specification. (#1217)\n- Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227)\n\n### Changed\n\n- Set default propagator to no-op propagator. (#1184)\n- The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325)\n- The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212)\n- The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification.\n   They now are `Unset`, `Error`, and `Ok`.\n   They no longer track the gRPC codes. (#1214)\n- The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214)\n- Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325)\n- A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264)\n\n### Fixed\n\n- Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226)\n\n### Removed\n\n- The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212)\n- The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification.\n   The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212)\n- The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216)\n- The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217)\n- Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219)\n- Nested array/slice support has been removed. (#1226)\n\n## [0.12.0] - 2020-09-24\n\n### Added\n\n- A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108)\n- In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s.\n   This addition was made to conform with our project option conventions. (#1155)\n- Instrumentation library information was added to the Zipkin exporter. (#1119)\n- The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166)\n- More semantic conventions for k8s as resource attributes. (#1167)\n\n### Changed\n\n- Add reconnecting udp connection type to Jaeger exporter.\n   This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record.\n   It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063)\n- Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`.\n   This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108)\n- Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`.\n   This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108)\n- The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109)\n- Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package.\n    This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118)\n- Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119)\n- Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115)\n- Move `tools` package under `internal`. (#1141)\n- Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142)\n   The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`.  Other exported functions and types are unchanged.\n- Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153)\n- In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155)\n- Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161)\n- The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to\n   recommend the use of `newConfig()` instead of `configure()`. (#1163)\n- The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163)\n- Ensure exported interface types include parameter names and update the\n   Style Guide to reflect this styling rule. (#1172)\n- Don't consider unset environment variable for resource detection to be an error. (#1170)\n- Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and\n  `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`.\n- ValueObserver instruments use LastValue aggregator by default. (#1165)\n- OTLP Metric exporter supports LastValue aggregation. (#1165)\n- Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185)\n- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190)\n- Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190)\n- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190)\n- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190)\n- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190)\n- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190)\n- Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190)\n- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190)\n- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190)\n- Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190)\n- Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190)\n- Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190)\n- Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190)\n- Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)\n- Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)\n- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)\n- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)\n- Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192)\n- Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201)\n- The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195)\n- Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203)\n\n### Removed\n\n- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the\n   `go.opentelemetry.io/contrib/propagators/` module. (#1191)\n- Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194)\n\n### Fixed\n\n- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171)\n- Fix missing shutdown processor in otel-collector example. (#1186)\n- Fix missing shutdown processor in basic and namedtracer examples. (#1197)\n\n## [0.11.0] - 2020-08-24\n\n### Added\n\n- Support for exporting array-valued attributes via OTLP. (#992)\n- `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994)\n- Support for filtering metric label sets. (#1047)\n- A dimensionality-reducing metric Processor. (#1057)\n- Integration tests for more OTel Collector Attribute types. (#1062)\n- A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078)\n\n### Changed\n\n- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049)\n- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049)\n- Rename `api/testharness` to `api/apitest`. (#1049)\n- Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049)\n- Change Metric Processor to merge multiple observations. (#1024)\n- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module.\n   This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038)\n- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016)\n- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042)\n- Replace `WithSyncer` with `WithBatcher` in examples. (#1044)\n- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046)\n- Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060)\n- Unify Callback Function Naming.\n   Rename `*Callback` with `*Func`. (#1061)\n- CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064)\n- The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface.\n   This interface still supports the export of `SpanData`, but only as a slice.\n   Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078)\n- The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error.\n   If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078)\n- The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`.\n   This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078)\n\n### Removed\n\n- Duplicate, unused API sampler interface. (#999)\n   Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead.\n- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository.\n   This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027)\n- The `WithSpan` method of the `Tracer` interface.\n   The functionality this method provided was limited compared to what a user can provide themselves.\n   It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043)\n- The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions.\n   These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077)\n- The `oterror` package. (#1026)\n- The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032)\n\n### Fixed\n\n- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031)\n- Correct instrumentation version tag in Jaeger exporter. (#1037)\n- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043)\n- Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050)\n- The `otel-collector` example referenced outdated collector processors. (#1006)\n\n## [0.10.0] - 2020-07-29\n\nThis release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages.\n\n### Added\n\n- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern.\n    These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944)\n- Add propagator option for gRPC instrumentation. (#986)\n- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987)\n\n### Changed\n\n- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function.\n   This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944)\n- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`.\n   This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963)\n- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962)\n- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968)\n  - `value.Bool` was replaced with `kv.BoolValue`.\n  - `value.Int64` was replaced with `kv.Int64Value`.\n  - `value.Uint64` was replaced with `kv.Uint64Value`.\n  - `value.Float64` was replaced with `kv.Float64Value`.\n  - `value.Int32` was replaced with `kv.Int32Value`.\n  - `value.Uint32` was replaced with `kv.Uint32Value`.\n  - `value.Float32` was replaced with `kv.Float32Value`.\n  - `value.String` was replaced with `kv.StringValue`.\n  - `value.Int` was replaced with `kv.IntValue`.\n  - `value.Uint` was replaced with `kv.UintValue`.\n  - `value.Array` was replaced with `kv.ArrayValue`.\n- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972)\n- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979)\n- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980)\n- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985)\n- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989)\n\n### Removed\n\n- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970)\n\n### Fixed\n\n- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953)\n- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957)\n- Use `global.Handle` for span export errors in the OTLP exporter. (#946)\n- Correct Go language formatting in the README documentation. (#961)\n- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977)\n- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983)\n- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984)\n\n## [0.9.0] - 2020-07-20\n\n### Added\n\n- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939)\n- A Detector to automatically detect resources from an environment variable. (#939)\n- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938)\n- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`.\n   References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942)\n\n### Changed\n\n- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948)\n\n### Removed\n\n- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943)\n\n## [0.8.0] - 2020-07-09\n\n### Added\n\n- The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject.\n   A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882)\n- The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882)\n- The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882)\n- Add `peer.service` semantic attribute. (#898)\n- Add database-specific semantic attributes. (#899)\n- Add semantic convention for `faas.coldstart` and `container.id`. (#909)\n- Add http content size semantic conventions. (#905)\n- Include `http.request_content_length` in HTTP request basic attributes. (#905)\n- Add semantic conventions for operating system process resource attribute keys. (#919)\n- The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931)\n\n### Changed\n\n- Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879)\n- Use lowercase header names for B3 Multiple Headers. (#881)\n- The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`.\n   This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings.\n   If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882)\n- The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header.\n   Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid.\n   This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882)\n- Extend semantic conventions for RPC. (#900)\n- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920)\n  - `\"api/standard\".FaaSName` -> `FaaSNameKey`\n  - `\"api/standard\".FaaSID` -> `FaaSIDKey`\n  - `\"api/standard\".FaaSVersion` -> `FaaSVersionKey`\n  - `\"api/standard\".FaaSInstance` -> `FaaSInstanceKey`\n\n### Removed\n\n- The `FlagsUnused` trace flag is removed.\n   The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882)\n- The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed.\n   If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882)\n\n### Fixed\n\n- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881)\n- The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882)\n- The B3 propagator now propagates the debug flag.\n   This removes the behavior of changing the debug flag into a set sampling bit.\n   Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882)\n- The B3 propagator now tracks \"unset\" sampling state (meaning \"defer the decision\") and does not set the `X-B3-Sampling` header when injecting. (#882)\n- Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883)\n- Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885)\n- The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896)\n- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908)\n- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912)\n- Prometheus exporter will not apply stale updates or forget inactive metrics. (#903)\n- Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905)\n- Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913)\n- Update otel-collector example to use the v0.5.0 collector. (#915)\n- The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922)\n- The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922)\n- The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists.\n   This is in accordance with OpenTelemetry semantic conventions. (#922)\n- Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923)\n- Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925)\n- Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926)\n- Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930)\n\n## [0.7.0] - 2020-06-26\n\nThis release implements the v0.5.0 version of the OpenTelemetry specification.\n\n### Added\n\n- The othttp instrumentation now includes default metrics. (#861)\n- This CHANGELOG file to track all changes in the project going forward.\n- Support for array type attributes. (#798)\n- Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844)\n- Timestamps are now passed to exporters for each export. (#835)\n- Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s.\n   This replaces the prior `Record` `struct` use for this purpose. (#835)\n- New dependabot integration to automate package upgrades. (#814)\n- `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument.\n   This instrumentation version is passed on to exporters. (#811) (#805) (#802)\n- The OTLP exporter includes the instrumentation version in telemetry it exports. (#811)\n- Environment variables for Jaeger exporter are supported. (#796)\n- New `aggregation.Kind` in the export metric API. (#808)\n- New example that uses OTLP and the collector. (#790)\n- Handle errors in the span `SetName` during span initialization. (#791)\n- Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777)\n- New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778)\n- New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`.\n   There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778)\n- Options to specify propagators for httptrace and grpctrace instrumentation. (#784)\n- The required `application/json` header for the Zipkin exporter is included in all exports. (#774)\n- Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769\n\n### Changed\n\n- Rename `Integrator` to `Processor` in the metric SDK. (#863)\n- Rename `AggregationSelector` to `AggregatorSelector`. (#859)\n- Rename `SynchronizedCopy` to `SynchronizedMove`. (#858)\n- Rename `simple` integrator to `basic` integrator. (#857)\n- Merge otlp collector examples. (#841)\n- Change the metric SDK to support cumulative, delta, and pass-through exporters directly.\n   With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840)\n- The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812)\n- The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other.\n   All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`.\n   Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812)\n- Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812)\n- Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810)\n- Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808\n- Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806)\n- Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791)\n- Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779)\n- Makes the argument order to Histogram and DDSketch `New()` consistent. (#781)\n\n### Removed\n\n- `Uint64NumberKind` and related functions from the API. (#864)\n- Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803)\n- `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775)\n\n### Fixed\n\n- Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866)\n- Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871)\n- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824)\n- Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867)\n- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853)\n- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854)\n- Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848)\n- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817)\n- Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828)\n- Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838)\n- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829)\n- Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815)\n- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823)\n- Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830)\n- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822)\n- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820)\n- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831)\n- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836)\n- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837)\n- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839)\n- Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843)\n- Set span status from HTTP status code in the othttp instrumentation. (#832)\n- Fixed typo in push controller comment. (#834)\n- The `Aggregator` testing has been updated and cleaned. (#812)\n- `metric.Number(0)` expressions are replaced by `0` where possible. (#812)\n- Fixed `global` `handler_test.go` test failure. #804\n- Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766)\n- Fixed OTLP example's accidental early close of exporter. (#807)\n- Ensure zipkin exporter reads and closes response body. (#788)\n- Update instrumentation to use `api/standard` keys instead of custom keys. (#782)\n- Clean up tools and RELEASING documentation. (#762)\n\n## [0.6.0] - 2020-05-21\n\n### Added\n\n- Support for `Resource`s in the prometheus exporter. (#757)\n- New pull controller. (#751)\n- New `UpDownSumObserver` instrument. (#750)\n- OpenTelemetry collector demo. (#711)\n- New `SumObserver` instrument. (#747)\n- New `UpDownCounter` instrument. (#745)\n- New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742)\n- New `api/standards` package to implement semantic conventions and standard key-value generation. (#731)\n\n### Changed\n\n- Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761)\n- Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758)\n- Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756)\n- Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754)\n- The prometheus exporter now uses the new pull controller. (#751)\n- Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752)\n- Support use of synchronous instruments in asynchronous callbacks (#725)\n- Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739)\n- Rename `Observer` instrument to `ValueObserver`. (#734)\n- The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738)\n- Replace `Measure` instrument by `ValueRecorder` instrument. (#732)\n- Rename correlation context header from `\"Correlation-Context\"` to `\"otcorrelations\"` to match the OpenTelemetry specification. (#727)\n\n### Fixed\n\n- Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755)\n- Disable parts of `BatchSpanProcessor` test until a fix is found. (#743)\n- Fix `string` case in `kv` `Infer` function. (#746)\n- Fix panic in grpctrace client interceptors. (#740)\n- Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737)\n- Rewrite span batch process queue batching logic. (#719)\n- Remove the push controller named Meter map. (#738)\n- Fix Histogram aggregator initial state (fix #735). (#736)\n- Ensure golang alpine image is running `golang-1.14` for examples. (#733)\n- Added test for grpctrace `UnaryInterceptorClient`. (#695)\n- Rearrange `api/metric` code layout. (#724)\n\n## [0.5.0] - 2020-05-13\n\n### Added\n\n- Batch `Observer` callback support. (#717)\n- Alias `api` types to root package of project. (#696)\n- Create basic `othttp.Transport` for simple client instrumentation. (#678)\n- `SetAttribute(string, interface{})` to the trace API. (#674)\n- Jaeger exporter option that allows user to specify custom http client. (#671)\n- `Stringer` and `Infer` methods to `key`s. (#662)\n\n### Changed\n\n- Rename `NewKey` in the `kv` package to just `Key`. (#721)\n- Move `core` and `key` to `kv` package. (#720)\n- Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709)\n- Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710)\n- Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710)\n- Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710)\n- Move `Number` from `core` to `api/metric` package. (#706)\n- Move `SpanContext` from `core` to `trace` package. (#692)\n- Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681)\n\n### Fixed\n\n- Update tooling to run generators in all submodules. (#705)\n- gRPC interceptor regexp to match methods without a service name. (#683)\n- Use a `const` for padding 64-bit B3 trace IDs. (#701)\n- Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700)\n- Left-pad 64-bit B3 trace IDs with zero. (#698)\n- Propagate at least the first W3C tracestate header. (#694)\n- Remove internal `StateLocker` implementation. (#688)\n- Increase instance size CI system uses. (#690)\n- Add a `key` benchmark and use reflection in `key.Infer()`. (#679)\n- Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680)\n- Reimplement histogram using mutex instead of `StateLocker`. (#669)\n- Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667)\n- Update documentation to not include any references to `WithKeys`. (#672)\n- Correct misspelling. (#668)\n- Fix clobbering of the span context if extraction fails. (#656)\n- Bump `golangci-lint` and work around the corrupting bug. (#666) (#670)\n\n## [0.4.3] - 2020-04-24\n\n### Added\n\n- `Dockerfile` and `docker-compose.yml` to run example code. (#635)\n- New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621)\n- New `api/label` package, providing common label set implementation. (#651)\n- Support for JSON marshaling of `Resources`. (#654)\n- `TraceID` and `SpanID` implementations for `Stringer` interface. (#642)\n- `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627)\n- `WithSpanFormatter` option to the othttp plugin. (#617)\n- Updated README to include section for compatible libraries and include reference to the contrib repository. (#612)\n- The prometheus exporter now supports exporting histograms. (#601)\n- A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613)\n- An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613)\n- An `Equal` method to the `Resource` test the equivalence of resources. (#613)\n- An iterable structure (`AttributeIterator`) for `Resource` attributes.\n\n### Changed\n\n- zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644)\n- Pass `Resources` through the metrics export pipeline. (#659)\n\n### Removed\n\n- `WithKeys` option from the metric API. (#639)\n\n### Fixed\n\n- Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658)\n- Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653)\n- Use type names for return values in jaeger exporter. (#648)\n- Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650)\n- `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647)\n- Do not cache `reflect.ValueOf()` in metric Labels. (#649)\n- Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626)\n- Add error wrapping to the prometheus exporter. (#631)\n- Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623)\n- Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614)\n- Update `Resource` internal representation to uniquely and reliably identify resources. (#613)\n- Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622)\n- Ensure spans created by httptrace client tracer reflect operation structure. (#618)\n- Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610\n- The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611)\n\n## [0.4.2] - 2020-03-31\n\n### Fixed\n\n- Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607)\n- Fix time conversion from internal to OTLP in OTLP exporter. (#606)\n\n## [0.4.1] - 2020-03-31\n\n### Fixed\n\n- Update `tag.sh` to create signed tags. (#604)\n\n## [0.4.0] - 2020-03-30\n\n### Added\n\n- New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580)\n- Script to verify examples after a new release. (#579)\n\n### Removed\n\n- The dogstatsd exporter due to lack of support.\n   This additionally removes support for statsd. (#591)\n- `LabelSet` from the metric API.\n   This is replaced by a `[]core.KeyValue` slice. (#595)\n- `Labels` from the metric API's `Meter` interface. (#595)\n\n### Changed\n\n- The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574)\n- Renamed `internal/metric.Meter` to `MeterImpl`. (#580)\n- Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580)\n\n### Fixed\n\n- Corrected missing return in mock span. (#582)\n- Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596)\n- Update to v0.3.0 of the OTLP in the OTLP exporter. (#588)\n- Update pre-release script to be compatible between GNU and BSD based systems. (#592)\n- Add a `RecordBatch` benchmark. (#594)\n- Moved span transforms of the OTLP exporter to the internal package. (#593)\n- Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569)\n- Removed unneeded allocation on empty labels in OLTP exporter. (#597)\n- Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599)\n- Update project documentation godoc.org links to pkg.go.dev. (#602)\n\n## [0.3.0] - 2020-03-21\n\nThis is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality.\nThere is still a possibility of breaking changes.\n\n### Added\n\n- Add `Observer` metric instrument. (#474)\n- Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494)\n- Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459)\n- The zipkin trace exporter. (#495)\n- The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545)\n- Add `StatusMessage` field to the trace `Span`. (#524)\n- Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525)\n- The `Resource` type was added to the SDK. (#528)\n- The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538)\n- The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction.\n   Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560)\n- A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560)\n- Scripts to better automate the release process. (#576)\n\n### Changed\n\n- Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506)\n- Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511)\n- Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511)\n- The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524)\n- Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531)\n- Rename metric API `Options` to `Config`. (#541)\n- Rename metric `Counter` aggregator to be `Sum`. (#541)\n- Unify metric options into `Option` from instrument specific options. (#541)\n- The trace API's `TraceProvider` now support `Resource`s. (#545)\n- Correct error in zipkin module name. (#548)\n- The jaeger trace exporter now supports `Resource`s. (#551)\n- Metric SDK now supports `Resource`s.\n   The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552)\n- Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557)\n- The stdout trace exporter now supports `Resource`s. (#558)\n- The metric `Descriptor` is now included at the API instead of the SDK. (#560)\n- Replace `Ordered` with an iterator in `export.Labels`. (#567)\n\n### Removed\n\n- The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452)\n- The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560)\n- `GetDescriptor` from the metric SDK. (#575)\n- The `Gauge` instrument from the metric API. (#537)\n\n### Fixed\n\n- Make histogram aggregator checkpoint consistent. (#438)\n- Update README with import instructions and how to build and test. (#505)\n- The default label encoding was updated to be unique. (#508)\n- Use `NewRoot` in the othttp plugin for public endpoints. (#513)\n- Fix data race in `BatchedSpanProcessor`. (#518)\n- Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521\n- Use a variable-size array to represent ordered labels in maps. (#523)\n- Update the OTLP protobuf and update changed import path. (#532)\n- Use `StateLocker` implementation in `MinMaxSumCount`. (#546)\n- Eliminate goroutine leak in histogram stress test. (#547)\n- Update OTLP exporter with latest protobuf. (#550)\n- Add filters to the othttp plugin. (#556)\n- Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565)\n- Encode labels once during checkpoint.\n   The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter.\n   This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572)\n- Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573)\n\n## [0.2.3] - 2020-03-04\n\n### Added\n\n- `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473)\n- Configurable push frequency for exporters setup pipeline. (#504)\n\n### Changed\n\n- Rename the `exporter` directory to `exporters`.\n   The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`.\n   This resulted in all subsequent releases not becoming the default latest.\n   A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages.\n   Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags.\n   Consequentially, this action also renames *all* exporter packages. (#502)\n\n### Removed\n\n- The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503)\n\n## [0.2.2] - 2020-02-27\n\n### Added\n\n- `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467)\n- `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467)\n- `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467)\n- `Config` and configuring `Option` to the propagator API. (#467)\n- `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467)\n- `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467)\n- `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467)\n- `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467)\n- Histogram aggregator. (#433)\n- `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456)\n- `AlwaysParentSample` sampler to the trace API. (#455)\n- `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451)\n\n### Changed\n\n- Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481)\n- Renamed `FromContext` to `MapFromContext` in the correlation package. (#481)\n- Move correlation context propagation to correlation package. (#479)\n- Do not default to putting remote span context into links. (#480)\n- `Tracer.WithSpan` updated to accept `StartOptions`. (#472)\n- Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432)\n- Renamed the `export` package to `metric` to match directory structure. (#432)\n- Rename the `api/distributedcontext` package to `api/correlation`. (#444)\n- Rename the `api/propagators` package to `api/propagation`. (#444)\n- Move the propagators from the `propagators` package into the `trace` API package. (#444)\n- Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462)\n- Moved all dependencies of tools package to a tools directory. (#466)\n\n### Removed\n\n- Binary propagators. (#467)\n- NOOP propagator. (#467)\n\n### Fixed\n\n- Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492)\n- Fix a possible nil-dereference crash (#478)\n- Correct comments for `InstallNewPipeline` in the stdout exporter. (#483)\n- Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484)\n- Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482)\n- Initialize `onError` based on `Config` in prometheus exporter. (#486)\n- Correct module name in prometheus exporter README. (#475)\n- Removed tracer name prefix from span names. (#430)\n- Fix `aggregator_test.go` import package comment. (#431)\n- Improved detail in stdout exporter. (#436)\n- Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442)\n- Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442)\n- Reword function documentation in gRPC plugin. (#446)\n- Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441)\n- Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441)\n- Upgraded to Go 1.13 in CI. (#465)\n- Correct opentelemetry.io URL in trace SDK documentation. (#464)\n- Refactored reference counting logic in SDK determination of stale records. (#468)\n- Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469)\n\n## [0.2.1.1] - 2020-01-13\n\n### Fixed\n\n- Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428)\n\n## [0.2.1] - 2020-01-08\n\n### Added\n\n- Global meter forwarding implementation.\n   This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392)\n- Global trace forwarding implementation.\n   This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406)\n- Standardize export pipeline creation in all exporters. (#395)\n- A testing, organization, and comments for 64-bit field alignment. (#418)\n- Script to tag all modules in the project. (#414)\n\n### Changed\n\n- Renamed `propagation` package to `propagators`. (#362)\n- Renamed `B3Propagator` propagator to `B3`. (#362)\n- Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362)\n- Renamed `BinaryPropagator` propagator to `Binary`. (#362)\n- Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362)\n- Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362)\n- Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362)\n- Renamed `SpanOption` to `StartOption` in the trace API. (#369)\n- Renamed `StartOptions` to `StartConfig` in the trace API. (#369)\n- Renamed `EndOptions` to `EndConfig` in the trace API. (#369)\n- `Number` now has a pointer receiver for its methods. (#375)\n- Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379)\n- Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379)\n- Renamed `Message` in Event to `Name` in the trace API. (#389)\n- Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385)\n- Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400)\n- Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400)\n- Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400)\n- Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400)\n- Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400)\n- Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400)\n- Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400)\n- Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400)\n- Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400)\n- Renamed the `File` option in the stdout exporter to `Writer`. (#404)\n- Renamed all `Options` to `Config` for all metric exports where this wasn't already the case.\n\n### Fixed\n\n- Aggregator import path corrected. (#421)\n- Correct links in README. (#368)\n- The README was updated to match latest code changes in its examples. (#374)\n- Don't capitalize error statements. (#375)\n- Fix ignored errors. (#375)\n- Fix ambiguous variable naming. (#375)\n- Removed unnecessary type casting. (#375)\n- Use named parameters. (#375)\n- Updated release schedule. (#378)\n- Correct http-stackdriver example module name. (#394)\n- Removed the `http.request` span in `httptrace` package. (#397)\n- Add comments in the metrics SDK (#399)\n- Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403)\n- Add documentation of compatible exporters in the README. (#405)\n- Typo fix. (#408)\n- Simplify span check logic in SDK tracer implementation. (#419)\n\n## [0.2.0] - 2019-12-03\n\n### Added\n\n- Unary gRPC tracing example. (#351)\n- Prometheus exporter. (#334)\n- Dogstatsd metrics exporter. (#326)\n\n### Changed\n\n- Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352)\n- Rename `GetMeter` to `Meter`. (#357)\n- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355)\n- Rename `HTTPB3Propagator` to `B3Propagator`. (#355)\n- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355)\n- Move `/global` package to `/api/global`. (#356)\n- Rename `GetTracer` to `Tracer`. (#347)\n\n### Removed\n\n- `SetAttribute` from the `Span` interface in the trace API. (#361)\n- `AddLink` from the `Span` interface in the trace API. (#349)\n- `Link` from the `Span` interface in the trace API. (#349)\n\n### Fixed\n\n- Exclude example directories from coverage report. (#365)\n- Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360)\n- Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359)\n- Run the race checker for all test. (#354)\n- Redundant commands in the Makefile are removed. (#354)\n- Split the `generate` and `lint` targets of the Makefile. (#354)\n- Renames `circle-ci` target to more generic `ci` in Makefile. (#354)\n- Add example Prometheus binary to gitignore. (#358)\n- Support negative numbers with the `MaxSumCount`. (#335)\n- Resolve race conditions in `push_test.go` identified in #339. (#340)\n- Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336)\n- Trace benchmark now tests both `AlwaysSample` and `NeverSample`.\n   Previously it was testing `AlwaysSample` twice. (#325)\n- Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325)\n- Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325)\n- The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint.\n   This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly.\n   This was corrected. (#333)\n\n## [0.1.2] - 2019-11-18\n\n### Fixed\n\n- Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328)\n- Removed unnecessary unslicing of parameters that are already a slice. (#324)\n\n## [0.1.1] - 2019-11-18\n\nThis release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch.\n\n### Added\n\n- Metrics stdout export pipeline. (#265)\n- Array aggregation for raw measure metrics. (#282)\n- The core.Value now have a `MarshalJSON` method. (#281)\n\n### Removed\n\n- `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314)\n- Prefix slash in `Tracer.Start()` for the Jaeger example. (#292)\n\n### Changed\n\n- Allocation in LabelSet construction to reduce GC overhead. (#318)\n- `trace.WithAttributes` to append values instead of replacing (#315)\n- Use a formula for tolerance in sampling tests. (#298)\n- Move export types into trace and metric-specific sub-directories. (#289)\n- `SpanKind` back to being based on an `int` type. (#288)\n\n### Fixed\n\n- URL to OpenTelemetry website in README. (#323)\n- Name of othttp default tracer. (#321)\n- `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294)\n- CI modules cache to correctly restore/save from/to the cache. (#316)\n- Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293)\n- README now reflects the new code structure introduced with these changes. (#291)\n- Make the basic example work. (#279)\n\n## [0.1.0] - 2019-11-04\n\nThis is the first release of open-telemetry go library.\nIt contains api and sdk for trace and meter.\n\n### Added\n\n- Initial OpenTelemetry trace and metric API prototypes.\n- Initial OpenTelemetry trace, metric, and export SDK packages.\n- A wireframe bridge to support compatibility with OpenTracing.\n- Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup.\n- Exporters for Jaeger, Stackdriver, and stdout.\n- Propagators for binary, B3, and trace-context protocols.\n- Project information and guidelines in the form of a README and CONTRIBUTING.\n- Tools to build the project and a Makefile to automate the process.\n- Apache-2.0 license.\n- CircleCI build CI manifest files.\n- CODEOWNERS file to track owners of this project.\n\n[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...HEAD\n[1.40.0/0.62.0/0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.40.0\n[1.39.0/0.61.0/0.15.0/0.0.14]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.39.0\n[1.38.0/0.60.0/0.14.0/0.0.13]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.38.0\n[0.59.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/exporters/prometheus/v0.59.1\n[1.37.0/0.59.0/0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.37.0\n[0.12.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.2\n[0.12.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.1\n[1.36.0/0.58.0/0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.36.0\n[1.35.0/0.57.0/0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.35.0\n[1.34.0/0.56.0/0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.34.0\n[1.33.0/0.55.0/0.9.0/0.0.12]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.33.0\n[1.32.0/0.54.0/0.8.0/0.0.11]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.32.0\n[1.31.0/0.53.0/0.7.0/0.0.10]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.31.0\n[1.30.0/0.52.0/0.6.0/0.0.9]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.30.0\n[1.29.0/0.51.0/0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.29.0\n[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0\n[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0\n[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0\n[1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0\n[1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0\n[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1\n[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0\n[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1\n[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0\n[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0\n[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0\n[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0\n[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1\n[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0\n[1.17.0/0.40.0/0.0.5]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.17.0\n[1.16.0/0.39.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0\n[1.16.0-rc.1/0.39.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0-rc.1\n[1.15.1/0.38.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1\n[1.15.0/0.38.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0\n[1.15.0-rc.2/0.38.0-rc.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.2\n[1.15.0-rc.1/0.38.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.1\n[1.14.0/0.37.0/0.0.4]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.14.0\n[1.13.0/0.36.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.13.0\n[1.12.0/0.35.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0\n[1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2\n[1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1\n[1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0\n[0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2\n[0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1\n[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0\n[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0\n[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0\n[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0\n[1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0\n[0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0\n[1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3\n[1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2\n[1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1\n[1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0\n[1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0\n[1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1\n[1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0\n[1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0\n[1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0\n[1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0\n[1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1\n[Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0\n[1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0\n[1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3\n[1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2\n[Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0\n[1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1\n[0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0\n[0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0\n[0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0\n[0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0\n[0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0\n[0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0\n[0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0\n[0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0\n[0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0\n[0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0\n[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0\n[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0\n[0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0\n[0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0\n[0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0\n[0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0\n[0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3\n[0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2\n[0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1\n[0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0\n[0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0\n[0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3\n[0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2\n[0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1\n[0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1\n[0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0\n[0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2\n[0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1\n[0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0\n\n<!-- Released section ended -->\n\n[Go 1.25]: https://go.dev/doc/go1.25\n[Go 1.24]: https://go.dev/doc/go1.24\n[Go 1.23]: https://go.dev/doc/go1.23\n[Go 1.22]: https://go.dev/doc/go1.22\n[Go 1.21]: https://go.dev/doc/go1.21\n[Go 1.20]: https://go.dev/doc/go1.20\n[Go 1.19]: https://go.dev/doc/go1.19\n[Go 1.18]: https://go.dev/doc/go1.18\n\n[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric\n[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric\n[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace\n\n[GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/CODEOWNERS",
    "content": "#####################################################\n#\n# List of approvers for this repository\n#\n#####################################################\n#\n# Learn about membership in OpenTelemetry community:\n#  https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md\n#\n#\n# Learn about CODEOWNERS file format:\n#  https://help.github.com/en/articles/about-code-owners\n#\n\n* @MrAlias @XSAM @dashpole @pellared @dmathieu @flc1125\n\nCODEOWNERS @MrAlias @pellared @dashpole @XSAM @dmathieu\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/CONTRIBUTING.md",
    "content": "# Contributing to opentelemetry-go\n\nThe Go special interest group (SIG) meets regularly. See the\nOpenTelemetry\n[community](https://github.com/open-telemetry/community#golang-sdk)\nrepo for information on this and other language SIGs.\n\nSee the [public meeting\nnotes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit)\nfor a summary description of past meetings. To request edit access,\njoin the meeting or get in touch on\n[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT).\n\n## Development\n\nYou can view and edit the source code by cloning this repository:\n\n```sh\ngit clone https://github.com/open-telemetry/opentelemetry-go.git\n```\n\nRun `make test` to run the tests instead of `go test`.\n\nThere are some generated files checked into the repo. To make sure\nthat the generated files are up-to-date, run `make` (or `make\nprecommit` - the `precommit` target is the default).\n\nThe `precommit` target also fixes the formatting of the code and\nchecks the status of the go module files.\n\nAdditionally, there is a `codespell` target that checks for common\ntypos in the code. It is not run by default, but you can run it\nmanually with `make codespell`. It will set up a virtual environment\nin `venv` and install `codespell` there.\n\nIf after running `make precommit` the output of `git status` contains\n`nothing to commit, working tree clean` then it means that everything\nis up-to-date and properly formatted.\n\n## Pull Requests\n\n### How to Send Pull Requests\n\nEveryone is welcome to contribute code to `opentelemetry-go` via\nGitHub pull requests (PRs).\n\nTo create a new PR, fork the project in GitHub and clone the upstream\nrepo:\n\n```sh\ngo get -d go.opentelemetry.io/otel\n```\n\n(This may print some warning about \"build constraints exclude all Go\nfiles\", just ignore it.)\n\nThis will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`.\nAlternatively, you can use `git` directly with:\n\n```sh\ngit clone https://github.com/open-telemetry/opentelemetry-go\n```\n\n(Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name -\nthat name is a kind of a redirector to GitHub that `go get` can\nunderstand, but `git` does not.)\n\nThis will add the project as `opentelemetry-go` within the current directory.\n\nEnter the newly created directory and add your fork as a new remote:\n\n```sh\ngit remote add <YOUR_FORK> git@github.com:<YOUR_GITHUB_USERNAME>/opentelemetry-go\n```\n\nCheck out a new branch, make modifications, run linters and tests, update\n`CHANGELOG.md`, and push the branch to your fork:\n\n```sh\ngit checkout -b <YOUR_BRANCH_NAME>\n# edit files\n# update changelog\nmake precommit\ngit add -p\ngit commit\ngit push <YOUR_FORK> <YOUR_BRANCH_NAME>\n```\n\nOpen a pull request against the main `opentelemetry-go` repo. Be sure to add the pull\nrequest ID to the entry you added to `CHANGELOG.md`.\n\nAvoid rebasing and force-pushing to your branch to facilitate reviewing the pull request.\nRewriting Git history makes it difficult to keep track of iterations during code review.\nAll pull requests are squashed to a single commit upon merge to `main`.\n\n### How to Receive Comments\n\n* If the PR is not ready for review, please put `[WIP]` in the title,\n  tag it as `work-in-progress`, or mark it as\n  [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).\n* Make sure CLA is signed and CI is clear.\n\n### How to Get PRs Merged\n\nA PR is considered **ready to merge** when:\n\n* It has received two qualified approvals[^1].\n\n  This is not enforced through automation, but needs to be validated by the\n  maintainer merging.\n  * At least one of the qualified approvals needs to be from an\n    [Approver]/[Maintainer] affiliated with a different company than the author\n    of the PR.\n  * PRs introducing changes that have already been discussed and consensus\n    reached only need one qualified approval. The discussion and resolution\n    needs to be linked to the PR.\n  * Trivial changes[^2] only need one qualified approval.\n\n* All feedback has been addressed.\n  * All PR comments and suggestions are resolved.\n  * All GitHub Pull Request reviews with a status of \"Request changes\" have\n    been addressed. Another review by the objecting reviewer with a different\n    status can be submitted to clear the original review, or the review can be\n    dismissed by a [Maintainer] when the issues from the original review have\n    been addressed.\n  * Any comments or reviews that cannot be resolved between the PR author and\n    reviewers can be submitted to the community [Approver]s and [Maintainer]s\n    during the weekly SIG meeting. If consensus is reached among the\n    [Approver]s and [Maintainer]s during the SIG meeting the objections to the\n    PR may be dismissed or resolved or the PR closed by a [Maintainer].\n  * Any substantive changes to the PR require existing Approval reviews be\n    cleared unless the approver explicitly states that their approval persists\n    across changes. This includes changes resulting from other feedback.\n    [Approver]s and [Maintainer]s can help in clearing reviews and they should\n    be consulted if there are any questions.\n\n* The PR branch is up to date with the base branch it is merging into.\n  * To ensure this does not block the PR, it should be configured to allow\n    maintainers to update it.\n\n* It has been open for review for at least one working day. This gives people\n  reasonable time to review.\n  * Trivial changes[^2] do not have to wait for one day and may be merged with\n    a single [Maintainer]'s approval.\n\n* All required GitHub workflows have succeeded.\n* Urgent fix can take exception as long as it has been actively communicated\n  among [Maintainer]s.\n\nAny [Maintainer] can merge the PR once the above criteria have been met.\n\n[^1]: A qualified approval is a GitHub Pull Request review with \"Approve\"\n  status from an OpenTelemetry Go [Approver] or [Maintainer].\n[^2]: Trivial changes include: typo corrections, cosmetic non-substantive\n  changes, documentation corrections or updates, dependency updates, etc.\n\n## Design Choices\n\nAs with other OpenTelemetry clients, opentelemetry-go follows the\n[OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel).\n\nIt's especially valuable to read through the [library\nguidelines](https://opentelemetry.io/docs/specs/otel/library-guidelines).\n\n### Focus on Capabilities, Not Structure Compliance\n\nOpenTelemetry is an evolving specification, one where the desires and\nuse cases are clear, but the methods to satisfy those use cases are\nnot.\n\nAs such, Contributions should provide functionality and behavior that\nconforms to the specification, but the interface and structure are\nflexible.\n\nIt is preferable to have contributions follow the idioms of the\nlanguage rather than conform to specific API names or argument\npatterns in the spec.\n\nFor a deeper discussion, see\n[this](https://github.com/open-telemetry/opentelemetry-specification/issues/165).\n\n## Tests\n\nEach functionality should be covered by tests.\n\nPerformance-critical functionality should also be covered by benchmarks.\n\n- Pull requests adding a performance-critical functionality\nshould have `go test -bench` output in their description.\n- Pull requests changing a performance-critical functionality\nshould have [`benchstat`](https://pkg.go.dev/golang.org/x/perf/cmd/benchstat)\noutput in their description.\n\n## Dependencies\n\nThis project uses [Go Modules] for dependency management. All modules will use\n`go.mod` to explicitly list all direct and indirect dependencies, ensuring a\nclear dependency graph. The `go.sum` file for each module will be committed to\nthe repository and used to verify the integrity of downloaded modules,\npreventing malicious tampering.\n\nThis project uses automated dependency update tools (i.e. dependabot,\nrenovatebot) to manage updates to dependencies. This ensures that dependencies\nare kept up-to-date with the latest security patches and features and are\nreviewed before being merged. If you would like to propose a change to a\ndependency it should be done through a pull request that updates the `go.mod`\nfile and includes a description of the change.\n\nSee the [versioning and compatibility](./VERSIONING.md) policy for more details\nabout dependency compatibility.\n\n[Go Modules]: https://pkg.go.dev/cmd/go#hdr-Modules__module_versions__and_more\n\n### Environment Dependencies\n\nThis project does not partition dependencies based on the environment (i.e.\n`development`, `staging`, `production`).\n\nOnly the dependencies explicitly included in the released modules have been\ntested and verified to work with the released code. No other guarantee is made\nabout the compatibility of other dependencies.\n\n## Documentation\n\nEach (non-internal, non-test) package must be documented using\n[Go Doc Comments](https://go.dev/doc/comment),\npreferably in a `doc.go` file.\n\nPrefer using [Examples](https://pkg.go.dev/testing#hdr-Examples)\ninstead of putting code snippets in Go doc comments.\nIn some cases, you can even create [Testable Examples](https://go.dev/blog/examples).\n\nYou can install and run a \"local Go Doc site\" in the following way:\n\n  ```sh\n  go install golang.org/x/pkgsite/cmd/pkgsite@latest\n  pkgsite\n  ```\n\n[`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric)\nis an example of a very well-documented package.\n\n### README files\n\nEach (non-internal, non-test, non-documentation) package must contain a\n`README.md` file containing at least a title, and a `pkg.go.dev` badge.\n\nThe README should not be a repetition of Go doc comments.\n\nYou can verify the presence of all README files with the `make verify-readmes`\ncommand.\n\n## Style Guide\n\nOne of the primary goals of this project is that it is actually used by\ndevelopers. With this goal in mind the project strives to build\nuser-friendly and idiomatic Go code adhering to the Go community's best\npractices.\n\nFor a non-comprehensive but foundational overview of these best practices\nthe [Effective Go](https://golang.org/doc/effective_go.html) documentation\nis an excellent starting place.\n\nWe also recommend following the\n[Go Code Review Comments](https://go.dev/wiki/CodeReviewComments)\nthat collects common comments made during reviews of Go code.\n\nAs a convenience for developers building this project the `make precommit`\nwill format, lint, validate, and in some cases fix the changes you plan to\nsubmit. This check will need to pass for your changes to be able to be\nmerged.\n\nIn addition to idiomatic Go, the project has adopted certain standards for\nimplementations of common patterns. These standards should be followed as a\ndefault, and if they are not followed documentation needs to be included as\nto the reasons why.\n\n### Configuration\n\nWhen creating an instantiation function for a complex `type T struct`, it is\nuseful to allow variable number of options to be applied. However, the strong\ntype system of Go restricts the function design options. There are a few ways\nto solve this problem, but we have landed on the following design.\n\n#### `config`\n\nConfiguration should be held in a `struct` named `config`, or prefixed with\nspecific type name this Configuration applies to if there are multiple\n`config` in the package. This type must contain configuration options.\n\n```go\n// config contains configuration options for a thing.\ntype config struct {\n\t// options ...\n}\n```\n\nIn general the `config` type will not need to be used externally to the\npackage and should be unexported. If, however, it is expected that the user\nwill likely want to build custom options for the configuration, the `config`\nshould be exported. Please, include in the documentation for the `config`\nhow the user can extend the configuration.\n\nIt is important that internal `config` are not shared across package boundaries.\nMeaning a `config` from one package should not be directly used by another. The\none exception is the API packages.  The configs from the base API, eg.\n`go.opentelemetry.io/otel/trace.TracerConfig` and\n`go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed\nby the SDK therefore it is expected that these are exported.\n\nWhen a config is exported we want to maintain forward and backward\ncompatibility, to achieve this no fields should be exported but should\ninstead be accessed by methods.\n\nOptionally, it is common to include a `newConfig` function (with the same\nnaming scheme). This function wraps any defaults setting and looping over\nall options to create a configured `config`.\n\n```go\n// newConfig returns an appropriately configured config.\nfunc newConfig(options ...Option) config {\n\t// Set default values for config.\n\tconfig := config{/* […] */}\n\tfor _, option := range options {\n\t\tconfig = option.apply(config)\n\t}\n\t// Perform any validation here.\n\treturn config\n}\n```\n\nIf validation of the `config` options is also performed this can return an\nerror as well that is expected to be handled by the instantiation function\nor propagated to the user.\n\nGiven the design goal of not having the user need to work with the `config`,\nthe `newConfig` function should also be unexported.\n\n#### `Option`\n\nTo set the value of the options a `config` contains, a corresponding\n`Option` interface type should be used.\n\n```go\ntype Option interface {\n\tapply(config) config\n}\n```\n\nHaving `apply` unexported makes sure that it will not be used externally.\nMoreover, the interface becomes sealed so the user cannot easily implement\nthe interface on its own.\n\nThe `apply` method should return a modified version of the passed config.\nThis approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap.\n\nThe name of the interface should be prefixed in the same way the\ncorresponding `config` is (if at all).\n\n#### Options\n\nAll user configurable options for a `config` must have a related unexported\nimplementation of the `Option` interface and an exported configuration\nfunction that wraps this implementation.\n\nThe wrapping function name should be prefixed with `With*` (or in the\nspecial case of a boolean options `Without*`) and should have the following\nfunction signature.\n\n```go\nfunc With*(…) Option { … }\n```\n\n##### `bool` Options\n\n```go\ntype defaultFalseOption bool\n\nfunc (o defaultFalseOption) apply(c config) config {\n\tc.Bool = bool(o)\n    return c\n}\n\n// WithOption sets a T to have an option included.\nfunc WithOption() Option {\n\treturn defaultFalseOption(true)\n}\n```\n\n```go\ntype defaultTrueOption bool\n\nfunc (o defaultTrueOption) apply(c config) config {\n\tc.Bool = bool(o)\n    return c\n}\n\n// WithoutOption sets a T to have Bool option excluded.\nfunc WithoutOption() Option {\n\treturn defaultTrueOption(false)\n}\n```\n\n##### Declared Type Options\n\n```go\ntype myTypeOption struct {\n\tMyType MyType\n}\n\nfunc (o myTypeOption) apply(c config) config {\n\tc.MyType = o.MyType\n    return c\n}\n\n// WithMyType sets T to have include MyType.\nfunc WithMyType(t MyType) Option {\n\treturn myTypeOption{t}\n}\n```\n\n##### Functional Options\n\n```go\ntype optionFunc func(config) config\n\nfunc (fn optionFunc) apply(c config) config {\n\treturn fn(c)\n}\n\n// WithMyType sets t as MyType.\nfunc WithMyType(t MyType) Option {\n\treturn optionFunc(func(c config) config {\n\t\tc.MyType = t\n        return c\n\t})\n}\n```\n\n#### Instantiation\n\nUsing this configuration pattern to configure instantiation with a `NewT`\nfunction.\n\n```go\nfunc NewT(options ...Option) T {…}\n```\n\nAny required parameters can be declared before the variadic `options`.\n\n#### Dealing with Overlap\n\nSometimes there are multiple complex `struct` that share common\nconfiguration and also have distinct configuration. To avoid repeated\nportions of `config`s, a common `config` can be used with the union of\noptions being handled with the `Option` interface.\n\nFor example.\n\n```go\n// config holds options for all animals.\ntype config struct {\n\tWeight      float64\n\tColor       string\n\tMaxAltitude float64\n}\n\n// DogOption apply Dog specific options.\ntype DogOption interface {\n\tapplyDog(config) config\n}\n\n// BirdOption apply Bird specific options.\ntype BirdOption interface {\n\tapplyBird(config) config\n}\n\n// Option apply options for all animals.\ntype Option interface {\n\tBirdOption\n\tDogOption\n}\n\ntype weightOption float64\n\nfunc (o weightOption) applyDog(c config) config {\n\tc.Weight = float64(o)\n\treturn c\n}\n\nfunc (o weightOption) applyBird(c config) config {\n\tc.Weight = float64(o)\n\treturn c\n}\n\nfunc WithWeight(w float64) Option { return weightOption(w) }\n\ntype furColorOption string\n\nfunc (o furColorOption) applyDog(c config) config {\n\tc.Color = string(o)\n\treturn c\n}\n\nfunc WithFurColor(c string) DogOption { return furColorOption(c) }\n\ntype maxAltitudeOption float64\n\nfunc (o maxAltitudeOption) applyBird(c config) config {\n\tc.MaxAltitude = float64(o)\n\treturn c\n}\n\nfunc WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) }\n\nfunc NewDog(name string, o ...DogOption) Dog    {…}\nfunc NewBird(name string, o ...BirdOption) Bird {…}\n```\n\n### Interfaces\n\nTo allow other developers to better comprehend the code, it is important\nto ensure it is sufficiently documented. One simple measure that contributes\nto this aim is self-documenting by naming method parameters. Therefore,\nwhere appropriate, methods of every exported interface type should have\ntheir parameters appropriately named.\n\n#### Interface Stability\n\nAll exported stable interfaces that include the following warning in their\ndocumentation are allowed to be extended with additional methods.\n\n> Warning: methods may be added to this interface in minor releases.\n\nThese interfaces are defined by the OpenTelemetry specification and will be\nupdated as the specification evolves.\n\nOtherwise, stable interfaces MUST NOT be modified.\n\n#### How to Change Specification Interfaces\n\nWhen an API change must be made, we will update the SDK with the new method one\nrelease before the API change. This will allow the SDK one version before the\nAPI change to work seamlessly with the new API.\n\nIf an incompatible version of the SDK is used with the new API the application\nwill fail to compile.\n\n#### How Not to Change Specification Interfaces\n\nWe have explored using a v2 of the API to change interfaces and found that there\nwas no way to introduce a v2 and have it work seamlessly with the v1 of the API.\nProblems happened with libraries that upgraded to v2 when an application did not,\nand would not produce any telemetry.\n\nMore detail of the approaches considered and their limitations can be found in\nthe [Use a V2 API to evolve interfaces](https://github.com/open-telemetry/opentelemetry-go/issues/3920)\nissue.\n\n#### How to Change Other Interfaces\n\nIf new functionality is needed for an interface that cannot be changed it MUST\nbe added by including an additional interface. That added interface can be a\nsimple interface for the specific functionality that you want to add or it can\nbe a super-set of the original interface. For example, if you wanted to a\n`Close` method to the `Exporter` interface:\n\n```go\ntype Exporter interface {\n\tExport()\n}\n```\n\nA new interface, `Closer`, can be added:\n\n```go\ntype Closer interface {\n\tClose()\n}\n```\n\nCode that is passed the `Exporter` interface can now check to see if the passed\nvalue also satisfies the new interface. E.g.\n\n```go\nfunc caller(e Exporter) {\n\t/* ... */\n\tif c, ok := e.(Closer); ok {\n\t\tc.Close()\n\t}\n\t/* ... */\n}\n```\n\nAlternatively, a new type that is the super-set of an `Exporter` can be created.\n\n```go\ntype ClosingExporter struct {\n\tExporter\n\tClose()\n}\n```\n\nThis new type can be used similar to the simple interface above in that a\npassed `Exporter` type can be asserted to satisfy the `ClosingExporter` type\nand the `Close` method called.\n\nThis super-set approach can be useful if there is explicit behavior that needs\nto be coupled with the original type and passed as a unified type to a new\nfunction, but, because of this coupling, it also limits the applicability of\nthe added functionality. If there exist other interfaces where this\nfunctionality should be added, each one will need their own super-set\ninterfaces and will duplicate the pattern. For this reason, the simple targeted\ninterface that defines the specific functionality should be preferred.\n\nSee also:\n[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces).\n\n### Testing\n\nWe allow using [`testify`](https://github.com/stretchr/testify) even though\nit is seen as non-idiomatic according to\nthe [Go Test Comments](https://go.dev/wiki/TestComments#assert-libraries) page.\n\nThe tests should never leak goroutines.\n\nUse the term `ConcurrentSafe` in the test name when it aims to verify the\nabsence of race conditions. The top-level tests with this term will be run\nmany times in the `test-concurrent-safe` CI job to increase the chance of\ncatching concurrency issues. This does not apply to subtests when this term\nis not in their root name.\n\n### Internal packages\n\nThe use of internal packages should be scoped to a single module. A sub-module\nshould never import from a parent internal package. This creates a coupling\nbetween the two modules where a user can upgrade the parent without the child,\nand if the internal package API has changed, it will fail to upgrade[^3].\n\nThere are two known exceptions to this rule:\n\n- `go.opentelemetry.io/otel/internal/global`\n  - This package manages global state for all of opentelemetry-go. It needs to\n  be a single package in order to ensure the uniqueness of the global state.\n- `go.opentelemetry.io/otel/internal/baggage`\n  - This package provides values in a `context.Context` that need to be\n  recognized by `go.opentelemetry.io/otel/baggage` and\n  `go.opentelemetry.io/otel/bridge/opentracing` but remain private.\n\nIf you have duplicate code in multiple modules, make that code into a Go\ntemplate stored in `go.opentelemetry.io/otel/internal/shared` and use [gotmpl]\nto render the templates in the desired locations. See [#4404] for an example of\nthis.\n\n[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548\n\n### Ignoring context cancellation\n\nOpenTelemetry API implementations need to ignore the cancellation of the context that is\npassed when recording a value (e.g. starting a span, recording a measurement, emitting a log).\nRecording methods should not return an error describing the cancellation state of the context\nwhen they complete, nor should they abort any work.\n\nThis rule may not apply if the OpenTelemetry specification defines a timeout mechanism for\nthe method. In that case the context cancellation can be used for the timeout with the\nrestriction that this behavior is documented for the method. Otherwise, timeouts\nare expected to be handled by the user calling the API, not the implementation.\n\nStoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method\nof a provider. It is assumed the context passed from a user is not used for this purpose.\n\nOutside of the direct recording of telemetry from the API (e.g. exporting telemetry,\nforce flushing telemetry, shutting down a signal provider) the context cancellation\nshould be honored. This means all work done on behalf of the user provided context\nshould be canceled.\n\n### Observability\n\nOpenTelemetry Go SDK components should be instrumented to enable users observability for the health and performance of the telemetry pipeline itself.\nThis allows operators to understand how well their observability infrastructure is functioning and to identify potential issues before they impact their applications.\n\nThis section outlines the best practices for building instrumentation in OpenTelemetry Go SDK components.\n\n#### Environment Variable Activation\n\nObservability features are currently experimental.\nThey should be disabled by default and activated through the `OTEL_GO_X_OBSERVABILITY` environment variable.\nThis follows the established experimental feature pattern used throughout the SDK.\n\nComponents should check for this environment variable using a consistent pattern:\n\n```go\nimport \"go.opentelemetry.io/otel/*/internal/x\"\n\nif x.Observability.Enabled() {\n    // Initialize observability metrics\n}\n```\n\n**References**:\n\n- [stdouttrace exporter](./exporters/stdout/stdouttrace/internal/x/x.go)\n- [sdk](./sdk/internal/x/x.go)\n\n#### Encapsulation\n\nInstrumentation should be encapsulated within a dedicated `struct` (e.g. `instrumentation`).\nIt should not be mixed into the instrumented component.\n\nPrefer this:\n\n```go\ntype SDKComponent struct {\n    inst *instrumentation\n}\n\ntype instrumentation struct {\n\tinflight otelconv.SDKComponentInflight\n\texported otelconv.SDKComponentExported\n}\n```\n\nTo this:\n\n```go\n// ❌ Avoid this pattern.\ntype SDKComponent struct {\n\t/* other SDKComponent fields... */\n\n\tinflight otelconv.SDKComponentInflight\n\texported otelconv.SDKComponentExported\n}\n```\n\nThe instrumentation code should not bloat the code being instrumented.\nLikely, this means its own file, or its own package if it is complex or reused.\n\n#### Initialization\n\nInstrumentation setup should be explicit, side-effect free, and local to the relevant component.\nAvoid relying on global or implicit [side effects][side-effect] for initialization.\n\nEncapsulate setup in constructor functions, ensuring clear ownership and scope:\n\n```go\nimport (\n\t\"errors\"\n\n\tsemconv \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\t\"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv\"\n)\n\ntype SDKComponent struct {\n    inst *instrumentation\n}\n\nfunc NewSDKComponent(config Config) (*SDKComponent, error) {\n    inst, err := newInstrumentation()\n    if err != nil {\n        return nil, err\n    }\n    return &SDKComponent{inst: inst}, nil\n}\n\ntype instrumentation struct {\n    inflight otelconv.SDKComponentInflight\n    exported otelconv.SDKComponentExported\n}\n\nfunc newInstrumentation() (*instrumentation, error) {\n    if !x.Observability.Enabled() {\n        return nil, nil\n    }\n \n    meter := otel.GetMeterProvider().Meter(\n        \"<component-package-name>\",\n        metric.WithInstrumentationVersion(sdk.Version()),\n        metric.WithSchemaURL(semconv.SchemaURL),\n    )\n\n\tinst := &instrumentation{}\n\n\tvar err, e error\n    inst.inflight, e = otelconv.NewSDKComponentInflight(meter)\n\terr = errors.Join(err, e)\n\n    inst.exported, e = otelconv.NewSDKComponentExported(meter)\n\terr = errors.Join(err, e)\n\n    return inst, err\n}\n```\n\n```go\n// ❌ Avoid this pattern.\nfunc (c *Component) initObservability() {\n\t// Initialize observability metrics\n\tif !x.Observability.Enabled() {\n\t\treturn\n\t}\n\n\t// Initialize observability metrics\n\tc.inst = &instrumentation{/* ... */}\n}\n```\n\n[side-effect]: https://en.wikipedia.org/wiki/Side_effect_(computer_science)\n\n#### Performance\n\nWhen observability is disabled there should be little to no overhead.\n\n```go\nfunc (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {\n\tif e.inst != nil {\n\t\tattrs := expensiveOperation()\n\t\te.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...)\n\t}\n    // Export spans...\n}\n```\n\n```go\n// ❌ Avoid this pattern.\nfunc (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {\n\tattrs := expensiveOperation()\n\te.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...)\n    // Export spans...\n}\n\nfunc (i *instrumentation) recordSpanInflight(ctx context.Context, count int64, attrs ...attribute.KeyValue) {\n\tif i == nil || i.inflight == nil {\n\t\treturn\n\t}\n\ti.inflight.Add(ctx, count, metric.WithAttributes(attrs...))\n}\n```\n\nWhen observability is enabled, the instrumentation code paths should be optimized to reduce allocation and computation overhead.\n\n##### Attribute and Option Allocation Management\n\nPool attribute slices and options with [`sync.Pool`] to minimize allocations in measurement calls with dynamic attributes.\n\n```go\nvar (\n\tattrPool = sync.Pool{\n        New: func() any {\n\t\t    // Pre-allocate common capacity\n    \t\tknownCap := 8 // Adjust based on expected usage\n            s := make([]attribute.KeyValue, 0, knownCap)\n    \t\t// Return a pointer to avoid extra allocation on Put().\n            return &s\n        },\n    }\n\n\taddOptPool = &sync.Pool{\n\t\tNew: func() any {\n\t\t\tconst n = 1 // WithAttributeSet\n\t\t\to := make([]metric.AddOption, 0, n)\n    \t\t// Return a pointer to avoid extra allocation on Put().\n\t\t\treturn &o\n\t\t},\n\t}\n)\n\nfunc (i *instrumentation) record(ctx context.Context, value int64, baseAttrs ...attribute.KeyValue) {\n    attrs := attrPool.Get().(*[]attribute.KeyValue)\n    defer func() {\n        *attrs = (*attrs)[:0] // Reset.\n        attrPool.Put(attrs)\n    }()\n\n    *attrs = append(*attrs, baseAttrs...)\n    // Add any dynamic attributes.\n    *attrs = append(*attrs, semconv.OTelComponentName(\"exporter-1\"))\n\n\taddOpt := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*addOpt = (*addOpt)[:0]\n\t\taddOptPool.Put(addOpt)\n\t}()\n\n\tset := attribute.NewSet(*attrs...)\n\t*addOpt = append(*addOpt, metric.WithAttributeSet(set))\n\n    i.counter.Add(ctx, value, *addOpt...)\n}\n```\n\nPools are most effective when there are many pooled objects of the same sufficiently large size, and the objects are repeatedly used.\nThis amortizes the cost of allocation and synchronization.\nIdeally, the pools should be scoped to be used as widely as possible within the component to maximize this efficiency while still ensuring correctness.\n\n[`sync.Pool`]: https://pkg.go.dev/sync#Pool\n\n##### Cache common attribute sets for repeated measurements\n\nIf a static set of attributes are used for measurements and they are known at compile time, pre-compute and cache these attributes.\n\n```go\ntype spanLiveSetKey struct {\n\tsampled bool\n}\n\nvar spanLiveSetCache = map[spanLiveSetKey]attribute.Set{\n\t{true}: attribute.NewSet(\n\t\totelconv.SDKSpanLive{}.AttrSpanSamplingResult(\n\t\t\totelconv.SpanSamplingResultRecordAndSample,\n\t\t),\n\t),\n\t{false}: attribute.NewSet(\n\t\totelconv.SDKSpanLive{}.AttrSpanSamplingResult(\n\t\t\totelconv.SpanSamplingResultRecordOnly,\n\t\t),\n\t),\n}\n\nfunc spanLiveSet(sampled bool) attribute.Set {\n\tkey := spanLiveSetKey{sampled: sampled}\n\treturn spanLiveSetCache[key]\n}\n```\n\n##### Benchmarking\n\nAlways provide benchmarks when introducing or refactoring instrumentation.\nDemonstrate the impact (allocs/op, B/op, ns/op) in enabled/disabled scenarios:\n\n```go\nfunc BenchmarkExportSpans(b *testing.B) {\n    scenarios := []struct {\n        name           string\n        obsEnabled bool\n    }{\n        {\"ObsDisabled\", false},\n        {\"ObsEnabled\", true},\n    }\n \n    for _, scenario := range scenarios {\n        b.Run(scenario.name, func(b *testing.B) {\n            b.Setenv(\n\t\t\t\t\"OTEL_GO_X_OBSERVABILITY\",\n\t\t\t\tstrconv.FormatBool(scenario.obsEnabled),\n\t\t\t)\n\n            exporter := NewExporter()\n            spans := generateTestSpans(100)\n\n            b.ResetTimer()\n            b.ReportAllocs()\n\n            for i := 0; i < b.N; i++ {\n                _ = exporter.ExportSpans(context.Background(), spans)\n            }\n        })\n    }\n}\n```\n\n#### Error Handling and Robustness\n\nErrors should be reported back to the caller if possible, and partial failures should be handled as gracefully as possible.\n\n```go\nfunc newInstrumentation() (*instrumentation, error) {\n    if !x.Observability.Enabled() {\n        return nil, nil\n    }\n \n    m := otel.GetMeterProvider().Meter(/* initialize meter */)\n    counter, err := otelconv.NewSDKComponentCounter(m)\n\t// Use the partially initialized counter if available.\n\ti := &instrumentation{counter: counter}\n\t// Return any error to the caller.\n    return i, err\n}\n```\n\n```go\n// ❌ Avoid this pattern.\nfunc newInstrumentation() *instrumentation {\n    if !x.Observability.Enabled() {\n        return nil, nil\n    }\n \n    m := otel.GetMeterProvider().Meter(/* initialize meter */)\n    counter, err := otelconv.NewSDKComponentCounter(m)\n\tif err != nil {\n\t\t// ❌ Do not dump the error to the OTel Handler. Return it to the\n\t\t// caller.\n\t\totel.Handle(err)\n\t\t// ❌ Do not return nil if we can still use the partially initialized\n\t\t// counter.\n\t\treturn nil\n\t}\n    return &instrumentation{counter: counter}\n}\n```\n\nIf the instrumented component cannot report the error to the user, let it report the error to `otel.Handle`.\n\n#### Context Propagation\n\nEnsure observability measurements receive the correct context, especially for trace exemplars and distributed context:\n\n```go\nfunc (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {\n    // Use the provided context for observability measurements\n    e.inst.recordSpanExportStarted(ctx, len(spans))\n \n    err := e.doExport(ctx, spans)\n\n    if err != nil {\n        e.inst.recordSpanExportFailed(ctx, len(spans), err)\n    } else {\n        e.inst.recordSpanExportSucceeded(ctx, len(spans))\n    }\n \n    return err\n}\n```\n\n```go\n// ❌ Avoid this pattern.\nfunc (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {\n    // ❌ Do not break the context propagation.\n    e.inst.recordSpanExportStarted(context.Background(), len(spans))\n \n    err := e.doExport(ctx, spans)\n\n\t/* ... */\n \n    return err\n}\n```\n\n#### Semantic Conventions Compliance\n\nAll observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md).\n\nUse the metric semantic conventions convenience package [otelconv](./semconv/v1.39.0/otelconv/metric.go).\n\n##### Component Identification\n\nComponent names and types should follow [semantic convention](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/registry/attributes/otel.md#otel-component-attributes).\n\nIf a component is not a well-known type specified in the semantic conventions, use the package path scope type as a stable identifier.\n\n```go\ncomponentType := \"go.opentelemetry.io/otel/sdk/trace.Span\"\n```\n\n```go\n// ❌ Do not do this.\ncomponentType := \"trace-span\"\n```\n\nThe component name should be a stable unique identifier for the specific instance of the component.\n\nUse a global counter to ensure uniqueness if necessary.\n\n```go\n// Unique 0-based ID counter for component instances.\nvar componentIDCounter atomic.Int64\n\n// nextID returns the next unique ID for a component.\nfunc nextID() int64 {\n\treturn componentIDCounter.Add(1) - 1\n}\n\n// componentName returns a unique name for the component instance.\nfunc componentName() attribute.KeyValue {\n\tid := nextID()\n\tname := fmt.Sprintf(\"%s/%d\", componentType, id)\n\treturn semconv.OTelComponentName(name)\n}\n```\n\nThe component ID will need to be resettable for deterministic testing.\nIf tests are in a different package than the component being tested (i.e. a `<component package>_test` package name), use a generated `counter` internal package to manage the counter.\nSee [stdouttrace exporter example](./exporters/stdout/stdouttrace/internal/gen.go) for reference.\n\n#### Testing\n\nUse deterministic testing with isolated state:\n\n```go\nfunc TestObservability(t *testing.T) {\n\t// Restore state after test to ensure this does not affect other tests.\n    prev := otel.GetMeterProvider()\n    t.Cleanup(func() { otel.SetMeterProvider(prev) })\n\n    // Isolate the meter provider for deterministic testing\n    reader := metric.NewManualReader()\n    meterProvider := metric.NewMeterProvider(metric.WithReader(reader))\n    otel.SetMeterProvider(meterProvider)\n\n\t// Use t.Setenv to ensure environment variable is restored after test.\n    t.Setenv(\"OTEL_GO_X_OBSERVABILITY\", \"true\")\n\n\t// Reset component ID counter to ensure deterministic component names.\n\tcomponentIDCounter.Store(0)\n \n\t/* ... test code ... */\n}\n```\n\nTest order should not affect results.\nEnsure that any global state (e.g. component ID counters) is reset between tests.\n\n## Approvers and Maintainers\n\n### Maintainers\n\n- [Damien Mathieu](https://github.com/dmathieu), Elastic ([GPG](https://keys.openpgp.org/search?q=5A126B972A81A6CE443E5E1B408B8E44F0873832))\n- [David Ashpole](https://github.com/dashpole), Google ([GPG](https://keys.openpgp.org/search?q=C0D1BDDCAAEAE573673085F176327DA4D864DC70))\n- [Robert Pająk](https://github.com/pellared), Splunk ([GPG](https://keys.openpgp.org/search?q=CDAD3A60476A3DE599AA5092E5F7C35A4DBE90C2))\n- [Sam Xie](https://github.com/XSAM), Splunk ([GPG](https://keys.openpgp.org/search?q=AEA033782371ABB18EE39188B8044925D6FEEBEA))\n- [Tyler Yahn](https://github.com/MrAlias), Splunk ([GPG](https://keys.openpgp.org/search?q=0x46B0F3E1A8B1BA5A))\n\nFor more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).\n\n### Approvers\n\n- [Flc](https://github.com/flc1125), Independent\n\nFor more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).\n\n### Triagers\n\n- [Alex Kats](https://github.com/akats7), Capital One\n\nFor more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).\n\n### Emeritus\n\n- [Aaron Clawson](https://github.com/MadVikingGod)\n- [Anthony Mirabella](https://github.com/Aneurysm9)\n- [Cheng-Zhen Yang](https://github.com/scorpionknifes)\n- [Chester Cheung](https://github.com/hanyuancheung)\n- [Evan Torrie](https://github.com/evantorrie)\n- [Gustavo Silva Paiva](https://github.com/paivagustavo)\n- [Josh MacDonald](https://github.com/jmacd)\n- [Liz Fong-Jones](https://github.com/lizthegrey)\n\nFor more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).\n\n### Become an Approver or a Maintainer\n\nSee the [community membership document in OpenTelemetry community\nrepo](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md).\n\n[Approver]: #approvers\n[Maintainer]: #maintainers\n[gotmpl]: https://pkg.go.dev/go.opentelemetry.io/build-tools/gotmpl\n[#4404]: https://github.com/open-telemetry/opentelemetry-go/pull/4404\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/LICENSE",
    "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\n--------------------------------------------------------------------------------\n\nCopyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/Makefile",
    "content": "# Copyright The OpenTelemetry Authors\n# SPDX-License-Identifier: Apache-2.0\n\nTOOLS_MOD_DIR := ./internal/tools\n\nALL_DOCS := $(shell find . -name '*.md' -type f | sort)\nALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \\; | sort)\nOTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS))\nALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \\; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort)\n\nGO = go\nTIMEOUT = 60\n\n# User to run as in docker images.\nDOCKER_USER=$(shell id -u):$(shell id -g)\nDEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile\n\n.DEFAULT_GOAL := precommit\n\n.PHONY: precommit ci\nprecommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default\nci: generate toolchain-check license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage\n\n# Tools\n\nTOOLS = $(CURDIR)/.tools\n\n$(TOOLS):\n\t@mkdir -p $@\n$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS)\n\tcd $(TOOLS_MOD_DIR) && \\\n\t$(GO) build -o $@ $(PACKAGE)\n\nMULTIMOD = $(TOOLS)/multimod\n$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod\n\nCROSSLINK = $(TOOLS)/crosslink\n$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink\n\nSEMCONVKIT = $(TOOLS)/semconvkit\n$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit\n\nVERIFYREADMES = $(TOOLS)/verifyreadmes\n$(TOOLS)/verifyreadmes: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/verifyreadmes\n\nGOLANGCI_LINT = $(TOOLS)/golangci-lint\n$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/v2/cmd/golangci-lint\n\nMISSPELL = $(TOOLS)/misspell\n$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell\n\nGOCOVMERGE = $(TOOLS)/gocovmerge\n$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge\n\nSTRINGER = $(TOOLS)/stringer\n$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer\n\nPORTO = $(TOOLS)/porto\n$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto\n\nGOTMPL = $(TOOLS)/gotmpl\n$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl\n\nGORELEASE = $(TOOLS)/gorelease\n$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease\n\nGOVULNCHECK = $(TOOLS)/govulncheck\n$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck\n\n.PHONY: tools\ntools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(VERIFYREADMES) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)\n\n# Virtualized python tools via docker\n\n# The directory where the virtual environment is created.\nVENVDIR := venv\n\n# The directory where the python tools are installed.\nPYTOOLS := $(VENVDIR)/bin\n\n# The pip executable in the virtual environment.\nPIP := $(PYTOOLS)/pip\n\n# The directory in the docker image where the current directory is mounted.\nWORKDIR := /workdir\n\n# The python image to use for the virtual environment.\nPYTHONIMAGE := $(shell awk '$$4==\"python\" {print $$2}' $(DEPENDENCIES_DOCKERFILE))\n\n# Run the python image with the current directory mounted.\nDOCKERPY := docker run --rm -u $(DOCKER_USER) -v \"$(CURDIR):$(WORKDIR)\" -w $(WORKDIR) $(PYTHONIMAGE)\n\n# Create a virtual environment for Python tools.\n$(PYTOOLS):\n# The `--upgrade` flag is needed to ensure that the virtual environment is\n# created with the latest pip version.\n\t@$(DOCKERPY) bash -c \"python3 -m venv $(VENVDIR) && $(PIP) install --upgrade --cache-dir=$(WORKDIR)/.cache/pip pip\"\n\n# Install python packages into the virtual environment.\n$(PYTOOLS)/%: $(PYTOOLS)\n\t@$(DOCKERPY) $(PIP) install --cache-dir=$(WORKDIR)/.cache/pip -r requirements.txt\n\nCODESPELL = $(PYTOOLS)/codespell\n$(CODESPELL): PACKAGE=codespell\n\n# Generate\n\n.PHONY: generate\ngenerate: go-generate vanity-import-fix\n\n.PHONY: go-generate\ngo-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%)\ngo-generate/%: DIR=$*\ngo-generate/%: $(STRINGER) $(GOTMPL)\n\t@echo \"$(GO) generate $(DIR)/...\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& PATH=\"$(TOOLS):$${PATH}\" $(GO) generate ./...\n\n.PHONY: vanity-import-fix\nvanity-import-fix: $(PORTO)\n\t@$(PORTO) --include-internal -w .\n\n# Generate go.work file for local development.\n.PHONY: go-work\ngo-work: $(CROSSLINK)\n\t$(CROSSLINK) work --root=$(shell pwd) --go=1.22.7\n\n# Build\n\n.PHONY: build\n\nbuild: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%)\nbuild/%: DIR=$*\nbuild/%:\n\t@echo \"$(GO) build $(DIR)/...\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GO) build ./...\n\nbuild-tests/%: DIR=$*\nbuild-tests/%:\n\t@echo \"$(GO) build tests $(DIR)/...\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GO) list ./... \\\n\t\t| grep -v third_party \\\n\t\t| xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null\n\n# Tests\n\nTEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe test-fuzz\n.PHONY: $(TEST_TARGETS) test\ntest-default test-race: ARGS=-race\ntest-bench:   ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=.\ntest-short:   ARGS=-short\ntest-fuzz:    ARGS=-fuzztime=10s -fuzz\ntest-verbose: ARGS=-v -race\ntest-concurrent-safe: ARGS=-run=ConcurrentSafe -count=100 -race\ntest-concurrent-safe: TIMEOUT=120\n$(TEST_TARGETS): test\ntest: $(OTEL_GO_MOD_DIRS:%=test/%)\ntest/%: DIR=$*\ntest/%:\n\t@echo \"$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/...\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GO) list ./... \\\n\t\t| grep -v third_party \\\n\t\t| xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS)\n\nCOVERAGE_MODE    = atomic\nCOVERAGE_PROFILE = coverage.out\n.PHONY: test-coverage\ntest-coverage: $(GOCOVMERGE)\n\t@set -e; \\\n\tprintf \"\" > coverage.txt; \\\n\tfor dir in $(ALL_COVERAGE_MOD_DIRS); do \\\n\t  echo \"$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile=\"$(COVERAGE_PROFILE)\" $${dir}/...\"; \\\n\t  (cd \"$${dir}\" && \\\n\t    $(GO) list ./... \\\n\t    | grep -v third_party \\\n\t    | grep -v 'semconv/v.*' \\\n\t    | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile=\"$(COVERAGE_PROFILE)\" && \\\n\t  $(GO) tool cover -html=coverage.out -o coverage.html); \\\n\tdone; \\\n\t$(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt\n\n.PHONY: benchmark\nbenchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%)\nbenchmark/%:\n\t@echo \"$(GO) test -run=xxxxxMatchNothingxxxxx -bench=. $*...\" \\\n\t\t&& cd $* \\\n\t\t&& $(GO) list ./... \\\n\t\t| grep -v third_party \\\n\t\t| xargs $(GO) test -run=xxxxxMatchNothingxxxxx -bench=.\n\n.PHONY: golangci-lint golangci-lint-fix\ngolangci-lint-fix: ARGS=--fix\ngolangci-lint-fix: golangci-lint\ngolangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%)\ngolangci-lint/%: DIR=$*\ngolangci-lint/%: $(GOLANGCI_LINT)\n\t@echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS)\n\n.PHONY: crosslink\ncrosslink: $(CROSSLINK)\n\t@echo \"Updating intra-repository dependencies in all go modules\" \\\n\t\t&& $(CROSSLINK) --root=$(shell pwd) --prune\n\n.PHONY: go-mod-tidy\ngo-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%)\ngo-mod-tidy/%: DIR=$*\ngo-mod-tidy/%: crosslink\n\t@echo \"$(GO) mod tidy in $(DIR)\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GO) mod tidy -compat=1.21\n\n.PHONY: lint\nlint: misspell go-mod-tidy golangci-lint govulncheck\n\n.PHONY: vanity-import-check\nvanity-import-check: $(PORTO)\n\t@$(PORTO) --include-internal -l . || ( echo \"(run: make vanity-import-fix)\"; exit 1 )\n\n.PHONY: misspell\nmisspell: $(MISSPELL)\n\t@$(MISSPELL) -w $(ALL_DOCS)\n\n.PHONY: govulncheck\ngovulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%)\ngovulncheck/%: DIR=$*\ngovulncheck/%: $(GOVULNCHECK)\n\t@echo \"govulncheck ./... in $(DIR)\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GOVULNCHECK) ./...\n\n.PHONY: codespell\ncodespell: $(CODESPELL)\n\t@$(DOCKERPY) $(CODESPELL)\n\n.PHONY: toolchain-check\ntoolchain-check:\n\t@toolchainRes=$$(for f in $(ALL_GO_MOD_DIRS); do \\\n\t           awk '/^toolchain/ { found=1; next } END { if (found) print FILENAME }' $$f/go.mod; \\\n\tdone); \\\n\tif [ -n \"$${toolchainRes}\" ]; then \\\n\t\t\techo \"toolchain checking failed:\"; echo \"$${toolchainRes}\"; \\\n\t\t\texit 1; \\\n\tfi\n\n.PHONY: license-check\nlicense-check:\n\t@licRes=$$(for f in $$(find . -type f \\( -iname '*.go' -o -iname '*.sh' \\) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \\\n\t           awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \\\n\t   done); \\\n\t   if [ -n \"$${licRes}\" ]; then \\\n\t           echo \"license header checking failed:\"; echo \"$${licRes}\"; \\\n\t           exit 1; \\\n\t   fi\n\n.PHONY: check-clean-work-tree\ncheck-clean-work-tree:\n\t@if ! git diff --quiet; then \\\n\t  echo; \\\n\t  echo 'Working tree is not clean, did you forget to run \"make precommit\"?'; \\\n\t  echo; \\\n\t  git status; \\\n\t  exit 1; \\\n\tfi\n\n# The weaver docker image to use for semconv-generate.\nWEAVER_IMAGE := $(shell awk '$$4==\"weaver\" {print $$2}' $(DEPENDENCIES_DOCKERFILE))\n\nSEMCONVPKG ?= \"semconv/\"\n.PHONY: semconv-generate\nsemconv-generate: $(SEMCONVKIT)\n\t[ \"$(TAG)\" ] || ( echo \"TAG unset: missing opentelemetry semantic-conventions tag\"; exit 1 )\n\t# Ensure the target directory for source code is available.\n\tmkdir -p $(PWD)/$(SEMCONVPKG)/${TAG}\n\t# Note: We mount a home directory for downloading/storing the semconv repository.\n\t# Weaver will automatically clean the cache when finished, but the directories will remain.\n\tmkdir -p ~/.weaver\n\tdocker run --rm \\\n\t\t-u $(DOCKER_USER) \\\n\t\t--env HOME=/tmp/weaver \\\n\t\t--mount 'type=bind,source=$(PWD)/semconv/templates,target=/home/weaver/templates,readonly' \\\n\t\t--mount 'type=bind,source=$(PWD)/semconv/${TAG},target=/home/weaver/target' \\\n\t\t--mount 'type=bind,source=$(HOME)/.weaver,target=/tmp/weaver/.weaver' \\\n\t\t$(WEAVER_IMAGE) registry generate \\\n\t\t--registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/$(TAG).zip[model] \\\n\t\t--templates=/home/weaver/templates \\\n\t\t--param tag=$(TAG) \\\n\t\tgo \\\n\t\t/home/weaver/target\n\t$(SEMCONVKIT) -semconv \"$(SEMCONVPKG)\" -tag \"$(TAG)\"\n\n.PHONY: gorelease\ngorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%)\ngorelease/%: DIR=$*\ngorelease/%:| $(GORELEASE)\n\t@echo \"gorelease in $(DIR):\" \\\n\t\t&& cd $(DIR) \\\n\t\t&& $(GORELEASE) \\\n\t\t|| echo \"\"\n\n.PHONY: verify-mods\nverify-mods: $(MULTIMOD)\n\t$(MULTIMOD) verify\n\n.PHONY: prerelease\nprerelease: verify-mods\n\t@[ \"${MODSET}\" ] || ( echo \">> env var MODSET is not set\"; exit 1 )\n\t$(MULTIMOD) prerelease -m ${MODSET}\n\nCOMMIT ?= \"HEAD\"\n.PHONY: add-tags\nadd-tags: verify-mods\n\t@[ \"${MODSET}\" ] || ( echo \">> env var MODSET is not set\"; exit 1 )\n\t$(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}\n\nMARKDOWNIMAGE := $(shell awk '$$4==\"markdown\" {print $$2}' $(DEPENDENCIES_DOCKERFILE))\n.PHONY: lint-markdown\nlint-markdown:\n\tdocker run --rm -u $(DOCKER_USER) -v \"$(CURDIR):$(WORKDIR)\" $(MARKDOWNIMAGE) -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md\n\n.PHONY: verify-readmes\nverify-readmes: $(VERIFYREADMES)\n\t$(VERIFYREADMES)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/README.md",
    "content": "# OpenTelemetry-Go\n\n[![ci](https://github.com/open-telemetry/opentelemetry-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-go/actions/workflows/ci.yml)\n[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main)\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel)\n[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/open-telemetry/opentelemetry-go/badge)](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-go)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9996/badge)](https://www.bestpractices.dev/projects/9996)\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/opentelemetry-go.svg)](https://issues.oss-fuzz.com/issues?q=project:opentelemetry-go)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go?ref=badge_shield&issueType=license)\n[![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT)\n\nOpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/).\nIt provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms.\n\n## Project Status\n\n| Signal  | Status             |\n|---------|--------------------|\n| Traces  | Stable             |\n| Metrics | Stable             |\n| Logs    | Beta[^1]           |\n\nProgress and status specific to this repository is tracked in our\n[project boards](https://github.com/open-telemetry/opentelemetry-go/projects)\nand\n[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones).\n\nProject versioning information and stability guarantees can be found in the\n[versioning documentation](VERSIONING.md).\n\n[^1]: https://github.com/orgs/open-telemetry/projects/43\n\n### Compatibility\n\nOpenTelemetry-Go ensures compatibility with the current supported versions of\nthe [Go language](https://golang.org/doc/devel/release#policy):\n\n> Each major Go release is supported until there are two newer major releases.\n> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.\n\nFor versions of Go that are no longer supported upstream, opentelemetry-go will\nstop ensuring compatibility with these versions in the following manner:\n\n- A minor release of opentelemetry-go will be made to add support for the new\n  supported release of Go.\n- The following minor release of opentelemetry-go will remove compatibility\n  testing for the oldest (now archived upstream) version of Go. This, and\n  future, releases of opentelemetry-go may include features only supported by\n  the currently supported versions of Go.\n\nCurrently, this project supports the following environments.\n\n| OS       | Go Version | Architecture |\n|----------|------------|--------------|\n| Ubuntu   | 1.25       | amd64        |\n| Ubuntu   | 1.24       | amd64        |\n| Ubuntu   | 1.25       | 386          |\n| Ubuntu   | 1.24       | 386          |\n| Ubuntu   | 1.25       | arm64        |\n| Ubuntu   | 1.24       | arm64        |\n| macOS    | 1.25       | amd64        |\n| macOS    | 1.24       | amd64        |\n| macOS    | 1.25       | arm64        |\n| macOS    | 1.24       | arm64        |\n| Windows  | 1.25       | amd64        |\n| Windows  | 1.24       | amd64        |\n| Windows  | 1.25       | 386          |\n| Windows  | 1.24       | 386          |\n\nWhile this project should work for other systems, no compatibility guarantees\nare made for those systems currently.\n\n## Getting Started\n\nYou can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/).\n\nOpenTelemetry's goal is to provide a single set of APIs to capture distributed\ntraces and metrics from your application and send them to an observability\nplatform. This project allows you to do just that for applications written in\nGo. There are two steps to this process: instrument your application, and\nconfigure an exporter.\n\n### Instrumentation\n\nTo start capturing distributed traces and metric events from your application\nit first needs to be instrumented. The easiest way to do this is by using an\ninstrumentation library for your code. Be sure to check out [the officially\nsupported instrumentation\nlibraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation).\n\nIf you need to extend the telemetry an instrumentation library provides or want\nto build your own instrumentation for your application directly you will need\nto use the\n[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel)\npackage. The [examples](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples)\nare a good way to see some practical uses of this process.\n\n### Export\n\nNow that your application is instrumented to collect telemetry, it needs an\nexport pipeline to send that telemetry to an observability platform.\n\nAll officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters).\n\n| Exporter                              | Logs | Metrics | Traces |\n|---------------------------------------|:----:|:-------:|:------:|\n| [OTLP](./exporters/otlp/)             |  ✓   |    ✓    |   ✓    |\n| [Prometheus](./exporters/prometheus/) |      |    ✓    |        |\n| [stdout](./exporters/stdout/)         |  ✓   |    ✓    |   ✓    |\n| [Zipkin](./exporters/zipkin/)         |      |         |   ✓    |\n\n## Contributing\n\nSee the [contributing documentation](CONTRIBUTING.md).\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/RELEASING.md",
    "content": "# Release Process\n\n## Create a `Version Release` issue\n\nCreate a `Version Release` issue to track the release process.\n\n## Semantic Convention Generation\n\nNew versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated.\nThe `semconv-generate` make target is used for this.\n\n1. Set the `TAG` environment variable to the semantic convention tag you want to generate.\n2. Run the `make semconv-generate ...` target from this repository.\n\nFor example,\n\n```sh\nexport TAG=\"v1.30.0\" # Change to the release version you are generating.\nmake semconv-generate # Uses the exported TAG.\n```\n\nThis should create a new sub-package of [`semconv`](./semconv).\nEnsure things look correct before submitting a pull request to include the addition.\n\n## Breaking changes validation\n\nYou can run `make gorelease` which runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes made in the public API.\n\nYou can check/report problems with `gorelease` [here](https://golang.org/issues/26420).\n\n## Verify changes for contrib repository\n\nIf the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository.\n\nFollow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes.\n\n## Pre-Release\n\nFirst, decide which module sets will be released and update their versions\nin `versions.yaml`.  Commit this change to a new branch.\n\nUpdate go.mod for submodules to depend on the new release which will happen in the next step.\n\n1. Run the `prerelease` make target. It creates a branch\n    `prerelease_<module set>_<new tag>` that will contain all release changes.\n\n    ```\n    make prerelease MODSET=<module set>\n    ```\n\n2. Verify the changes.\n\n    ```\n    git diff ...prerelease_<module set>_<new tag>\n    ```\n\n    This should have changed the version for all modules to be `<new tag>`.\n    If these changes look correct, merge them into your pre-release branch:\n\n    ```go\n    git merge prerelease_<module set>_<new tag>\n    ```\n\n3. Update the [Changelog](./CHANGELOG.md).\n   - Make sure all relevant changes for this release are included and are written in language that non-contributors to the project can understand.\n       To verify this, you can look directly at the commits since the `<last tag>`.\n\n       ```\n       git --no-pager log --pretty=oneline \"<last tag>..HEAD\"\n       ```\n\n   - Move all the `Unreleased` changes into a new section following the title scheme (`[<new tag>] - <date of release>`).\n   - Make sure the new section is under the comment for released section, like `<!-- Released section -->`, so it is protected from being overwritten in the future.\n   - Update all the appropriate links at the bottom.\n\n4. Push the changes to upstream and create a Pull Request on GitHub.\n    Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description.\n\n## Tag\n\nOnce the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit.\n\n***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step!\nFailure to do so will leave things in a broken state. As long as you do not\nchange `versions.yaml` between pre-release and this step, things should be fine.\n\n***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189).\nIt is critical you make sure the version you push upstream is correct.\n[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331).\n\n1. For each module set that will be released, run the `add-tags` make target\n    using the `<commit-hash>` of the commit on the main branch for the merged Pull Request.\n\n    ```\n    make add-tags MODSET=<module set> COMMIT=<commit hash>\n    ```\n\n    It should only be necessary to provide an explicit `COMMIT` value if the\n    current `HEAD` of your working directory is not the correct commit.\n\n2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`).\n    Make sure you push all sub-modules as well.\n\n    ```\n    git push upstream <new tag>\n    git push upstream <submodules-path/new tag>\n    ...\n    ```\n\n## Sign artifacts\n\nTo ensure we comply with CNCF best practices, we need to sign the release artifacts.\n\nDownload the `.tar.gz` and `.zip` archives from the [tags page](https://github.com/open-telemetry/opentelemetry-go/tags) for the new release tag.\nBoth archives need to be signed with your GPG key.\n\nYou can use [this script] to verify the contents of the archives before signing them.\n\nTo find your GPG key ID, run:\n\n```terminal\ngpg --list-secret-keys --keyid-format=long\n```\n\nThe key ID is the 16-character string after `sec rsa4096/` (or similar).\n\nSet environment variables and sign both artifacts:\n\n```terminal\nexport VERSION=\"<version>\"  # e.g., v1.32.0\nexport KEY_ID=\"<your-gpg-key-id>\"\n\ngpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.tar.gz\ngpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.zip\n```\n\nYou can verify the signatures with:\n\n```terminal\ngpg --verify opentelemetry-go-$VERSION.tar.gz.asc opentelemetry-go-$VERSION.tar.gz\ngpg --verify opentelemetry-go-$VERSION.zip.asc opentelemetry-go-$VERSION.zip\n```\n\n[this script]: https://github.com/MrAlias/attest-sh\n\n## Release\n\nFinally create a Release for the new `<new tag>` on GitHub.\nThe release body should include all the release notes from the Changelog for this release.\n\n***IMPORTANT***: GitHub Releases are immutable once created.\nYou must upload the signed artifacts (`.tar.gz`, `.tar.gz.asc`, `.zip`, and `.zip.asc`) when creating the release, as they cannot be added or modified later.\n\n## Post-Release\n\n### Contrib Repository\n\nOnce verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release.\n\n### Website Documentation\n\nUpdate the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go].\nImportantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate.\n\n[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions\n[Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/\n[content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go\n\n### Close the milestone\n\nOnce a release is made, ensure all issues that were fixed and PRs that were merged as part of this release are added to the corresponding milestone.\nThis helps track what changes were included in each release.\n\n- To find issues that haven't been included in a milestone, use this [GitHub search query](https://github.com/open-telemetry/opentelemetry-go/issues?q=is%3Aissue%20no%3Amilestone%20is%3Aclosed%20sort%3Aupdated-desc%20reason%3Acompleted%20-label%3AStale%20linked%3Apr)\n- To find merged PRs that haven't been included in a milestone, use this [GitHub search query](https://github.com/open-telemetry/opentelemetry-go/pulls?q=is%3Apr+no%3Amilestone+is%3Amerged).\n\nOnce all related issues and PRs have been added to the milestone, close the milestone.\n\n### Close the `Version Release` issue\n\nOnce the todo list in the `Version Release` issue is complete, close the issue.\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/SECURITY-INSIGHTS.yml",
    "content": "header:\n  schema-version: \"1.0.0\"\n  expiration-date: \"2026-08-04T00:00:00.000Z\"\n  last-updated: \"2025-08-04\"\n  last-reviewed: \"2025-08-04\"\n  commit-hash: 69e81088ad40f45a0764597326722dea8f3f00a8\n  project-url: https://github.com/open-telemetry/opentelemetry-go\n  project-release: \"v1.37.0\"\n  changelog: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CHANGELOG.md\n  license: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/LICENSE\n\nproject-lifecycle:\n  status: active\n  bug-fixes-only: false\n  core-maintainers:\n    - https://github.com/dmathieu\n    - https://github.com/dashpole\n    - https://github.com/pellared\n    - https://github.com/XSAM\n    - https://github.com/MrAlias\n  release-process: |\n    See https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/RELEASING.md\n\ncontribution-policy:\n  accepts-pull-requests: true\n  accepts-automated-pull-requests: true\n  automated-tools-list:\n    - automated-tool: dependabot\n      action: allowed\n      comment: Automated dependency updates are accepted.\n    - automated-tool: renovatebot\n      action: allowed\n      comment: Automated dependency updates are accepted.\n    - automated-tool: opentelemetrybot\n      action: allowed\n      comment: Automated OpenTelemetry actions are accepted.\n  contributing-policy: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md\n  code-of-conduct: https://github.com/open-telemetry/.github/blob/ffa15f76b65ec7bcc41f6a0b277edbb74f832206/CODE_OF_CONDUCT.md\n\ndocumentation:\n  - https://pkg.go.dev/go.opentelemetry.io/otel\n  - https://opentelemetry.io/docs/instrumentation/go/\n\ndistribution-points:\n  - pkg:golang/go.opentelemetry.io/otel\n  - pkg:golang/go.opentelemetry.io/otel/bridge/opencensus\n  - pkg:golang/go.opentelemetry.io/otel/bridge/opencensus/test\n  - pkg:golang/go.opentelemetry.io/otel/bridge/opentracing\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp\n  - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdoutmetric\n  - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdouttrace\n  - pkg:golang/go.opentelemetry.io/otel/exporters/zipkin\n  - pkg:golang/go.opentelemetry.io/otel/metric\n  - pkg:golang/go.opentelemetry.io/otel/sdk\n  - pkg:golang/go.opentelemetry.io/otel/sdk/metric\n  - pkg:golang/go.opentelemetry.io/otel/trace\n  - pkg:golang/go.opentelemetry.io/otel/exporters/prometheus\n  - pkg:golang/go.opentelemetry.io/otel/log\n  - pkg:golang/go.opentelemetry.io/otel/log/logtest\n  - pkg:golang/go.opentelemetry.io/otel/sdk/log\n  - pkg:golang/go.opentelemetry.io/otel/sdk/log/logtest\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc\n  - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp\n  - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdoutlog\n  - pkg:golang/go.opentelemetry.io/otel/schema\n\nsecurity-artifacts:\n  threat-model:\n    threat-model-created: false\n    comment: |\n      No formal threat model created yet.\n  self-assessment:\n    self-assessment-created: false\n    comment: |\n      No formal self-assessment yet.\n\nsecurity-testing:\n  - tool-type: sca\n    tool-name: Dependabot\n    tool-version: latest\n    tool-url: https://github.com/dependabot\n    tool-rulesets:\n      - built-in\n    integration:\n      ad-hoc: false\n      ci: true\n      before-release: true\n    comment: |\n      Automated dependency updates.\n  - tool-type: sast\n    tool-name: golangci-lint\n    tool-version: latest\n    tool-url: https://github.com/golangci/golangci-lint\n    tool-rulesets:\n      - built-in\n    integration:\n      ad-hoc: false\n      ci: true\n      before-release: true\n    comment: |\n      Static analysis in CI.\n  - tool-type: fuzzing\n    tool-name: OSS-Fuzz\n    tool-version: latest\n    tool-url: https://github.com/google/oss-fuzz\n    tool-rulesets:\n      - default\n    integration:\n      ad-hoc: false\n      ci: false\n      before-release: false\n    comment: |\n      OpenTelemetry Go is integrated with OSS-Fuzz for continuous fuzz testing. See https://github.com/google/oss-fuzz/tree/f0f9b221190c6063a773bea606d192ebfc3d00cf/projects/opentelemetry-go for more details.\n  - tool-type: sast\n    tool-name: CodeQL\n    tool-version: latest\n    tool-url: https://github.com/github/codeql\n    tool-rulesets:\n      - default\n    integration:\n      ad-hoc: false\n      ci: true\n      before-release: true\n    comment: |\n      CodeQL static analysis is run in CI for all commits and pull requests to detect security vulnerabilities in the Go source code. See https://github.com/open-telemetry/opentelemetry-go/blob/d5b5b059849720144a03ca5c87561bfbdb940119/.github/workflows/codeql-analysis.yml for workflow details.\n  - tool-type: sca\n    tool-name: govulncheck\n    tool-version: latest\n    tool-url: https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck\n    tool-rulesets:\n      - default\n    integration:\n      ad-hoc: false\n      ci: true\n      before-release: true\n    comment: |\n      govulncheck is run in CI to detect known vulnerabilities in Go modules and code paths. See https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/.github/workflows/ci.yml for workflow configuration.\n\nsecurity-assessments:\n  - auditor-name: 7ASecurity\n    auditor-url: https://7asecurity.com\n    auditor-report: https://7asecurity.com/reports/pentest-report-opentelemetry.pdf\n    report-year: 2023\n    comment: |\n      This independent penetration test by 7ASecurity covered OpenTelemetry repositories including opentelemetry-go. The assessment focused on codebase review, threat modeling, and vulnerability identification. See the report for details of findings and recommendations applicable to opentelemetry-go. No critical vulnerabilities were found for this repository.\n\nsecurity-contacts:\n  - type: email\n    value: cncf-opentelemetry-security@lists.cncf.io\n    primary: true\n  - type: website\n    value: https://github.com/open-telemetry/opentelemetry-go/security/policy\n    primary: false\n\nvulnerability-reporting:\n  accepts-vulnerability-reports: true\n  email-contact: cncf-opentelemetry-security@lists.cncf.io\n  security-policy: https://github.com/open-telemetry/opentelemetry-go/security/policy\n  comment: |\n    Security issues should be reported via email or GitHub security policy page.\n\ndependencies:\n  third-party-packages: true\n  dependencies-lists:\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opencensus/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opencensus/test/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opentracing/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlplog/otlploggrpc/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlplog/otlploghttp/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlpmetric/otlpmetricgrpc/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlpmetric/otlpmetrichttp/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/otlptracegrpc/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/otlptracehttp/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/prometheus/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdoutlog/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdoutmetric/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdouttrace/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/zipkin/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/internal/tools/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/log/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/log/logtest/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/metric/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/schema/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/log/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/log/logtest/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/metric/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/trace/go.mod\n    - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/trace/internal/telemetry/test/go.mod\n  dependencies-lifecycle:\n    policy-url: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md\n    comment: |\n      Dependency lifecycle managed via go.mod and renovatebot.\n  env-dependencies-policy:\n    policy-url: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md\n    comment: |\n      See contributing policy for environment usage.\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/VERSIONING.md",
    "content": "# Versioning\n\nThis document describes the versioning policy for this repository. This policy\nis designed so the following goals can be achieved.\n\n**Users are provided a codebase of value that is stable and secure.**\n\n## Policy\n\n* Versioning of this project will be idiomatic of a Go project using [Go\n  modules](https://github.com/golang/go/wiki/Modules).\n  * [Semantic import\n    versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)\n    will be used.\n    * Versions will comply with [semver\n      2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions.\n      * New methods may be added to exported API interfaces. All exported\n        interfaces that fall within this exception will include the following\n        paragraph in their public documentation.\n\n        > Warning: methods may be added to this interface in minor releases.\n\n    * If a module is version `v2` or higher, the major version of the module\n      must be included as a `/vN` at the end of the module paths used in\n      `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require\n      go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path\n      (e.g., `import \"go.opentelemetry.io/otel/v2/trace\"`). This includes the\n      paths used in `go get` commands (e.g., `go get\n      go.opentelemetry.io/otel/v2@v2.0.1`).  Note there is both a `/v2` and a\n      `@v2.0.1` in that example. One way to think about it is that the module\n      name now includes the `/v2`, so include `/v2` whenever you are using the\n      module name).\n    * If a module is version `v0` or `v1`, do not include the major version in\n      either the module path or the import path.\n  * Modules will be used to encapsulate signals and components.\n    * Experimental modules still under active development will be versioned at\n      `v0` to imply the stability guarantee defined by\n      [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).\n\n      > Major version zero (0.y.z) is for initial development. Anything MAY\n      > change at any time. The public API SHOULD NOT be considered stable.\n\n    * Mature modules for which we guarantee a stable public API will be versioned\n      with a major version greater than `v0`.\n      * The decision to make a module stable will be made on a case-by-case\n        basis by the maintainers of this project.\n    * Experimental modules will start their versioning at `v0.0.0` and will\n      increment their minor version when backwards incompatible changes are\n      released and increment their patch version when backwards compatible\n      changes are released.\n    * All stable modules that use the same major version number will use the\n      same entire version number.\n      * Stable modules may be released with an incremented minor or patch\n        version even though that module has not been changed, but rather so\n        that it will remain at the same version as other stable modules that\n        did undergo change.\n      * When an experimental module becomes stable a new stable module version\n        will be released and will include this now stable module. The new\n        stable module version will be an increment of the minor version number\n        and will be applied to all existing stable modules as well as the newly\n        stable module being released.\n* Versioning of the associated [contrib\n  repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of\n  this project will be idiomatic of a Go project using [Go\n  modules](https://github.com/golang/go/wiki/Modules).\n  * [Semantic import\n    versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)\n    will be used.\n    * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).\n    * If a module is version `v2` or higher, the\n      major version of the module must be included as a `/vN` at the end of the\n      module paths used in `go.mod` files (e.g., `module\n      go.opentelemetry.io/contrib/instrumentation/host/v2`, `require\n      go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the\n      package import path (e.g., `import\n      \"go.opentelemetry.io/contrib/instrumentation/host/v2\"`). This includes\n      the paths used in `go get` commands (e.g., `go get\n      go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`.  Note there\n      is both a `/v2` and a `@v2.0.1` in that example. One way to think about\n      it is that the module name now includes the `/v2`, so include `/v2`\n      whenever you are using the module name).\n    * If a module is version `v0` or `v1`, do not include the major version\n      in either the module path or the import path.\n  * In addition to public APIs, telemetry produced by stable instrumentation\n    will remain stable and backwards compatible. This is to avoid breaking\n    alerts and dashboards.\n  * Modules will be used to encapsulate instrumentation, detectors, exporters,\n    propagators, and any other independent sets of related components.\n    * Experimental modules still under active development will be versioned at\n      `v0` to imply the stability guarantee defined by\n      [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).\n\n      > Major version zero (0.y.z) is for initial development. Anything MAY\n      > change at any time. The public API SHOULD NOT be considered stable.\n\n    * Mature modules for which we guarantee a stable public API and telemetry will\n      be versioned with a major version greater than `v0`.\n    * Experimental modules will start their versioning at `v0.0.0` and will\n      increment their minor version when backwards incompatible changes are\n      released and increment their patch version when backwards compatible\n      changes are released.\n    * Stable contrib modules cannot depend on experimental modules from this\n      project.\n    * All stable contrib modules of the same major version with this project\n      will use the same entire version as this project.\n      * Stable modules may be released with an incremented minor or patch\n        version even though that module's code has not been changed. Instead\n        the only change that will have been included is to have updated that\n        modules dependency on this project's stable APIs.\n      * When an experimental module in contrib becomes stable a new stable\n        module version will be released and will include this now stable\n        module. The new stable module version will be an increment of the minor\n        version number and will be applied to all existing stable contrib\n        modules, this project's modules, and the newly stable module being\n        released.\n  * Contrib modules will be kept up to date with this project's releases.\n    * Due to the dependency contrib modules will implicitly have on this\n      project's modules the release of stable contrib modules to match the\n      released version number will be staggered after this project's release.\n      There is no explicit time guarantee for how long after this projects\n      release the contrib release will be. Effort should be made to keep them\n      as close in time as possible.\n    * No additional stable release in this project can be made until the\n      contrib repository has a matching stable release.\n    * No release can be made in the contrib repository after this project's\n      stable release except for a stable release of the contrib repository.\n* GitHub releases will be made for all releases.\n* Go modules will be made available at Go package mirrors.\n\n## Example Versioning Lifecycle\n\nTo better understand the implementation of the above policy the following\nexample is provided. This project is simplified to include only the following\nmodules and their versions:\n\n* `otel`: `v0.14.0`\n* `otel/trace`: `v0.14.0`\n* `otel/metric`: `v0.14.0`\n* `otel/baggage`: `v0.14.0`\n* `otel/sdk/trace`: `v0.14.0`\n* `otel/sdk/metric`: `v0.14.0`\n\nThese modules have been developed to a point where the `otel/trace`,\n`otel/baggage`, and `otel/sdk/trace` modules have reached a point that they\nshould be considered for a stable release. The `otel/metric` and\n`otel/sdk/metric` are still under active development and the `otel` module\ndepends on both `otel/trace` and `otel/metric`.\n\nThe `otel` package is refactored to remove its dependencies on `otel/metric` so\nit can be released as stable as well. With that done the following release\ncandidates are made:\n\n* `otel`: `v1.0.0-RC1`\n* `otel/trace`: `v1.0.0-RC1`\n* `otel/baggage`: `v1.0.0-RC1`\n* `otel/sdk/trace`: `v1.0.0-RC1`\n\nThe `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`.\n\nA few minor issues are discovered in the `otel/trace` package. These issues are\nresolved with some minor, but backwards incompatible, changes and are released\nas a second release candidate:\n\n* `otel`: `v1.0.0-RC2`\n* `otel/trace`: `v1.0.0-RC2`\n* `otel/baggage`: `v1.0.0-RC2`\n* `otel/sdk/trace`: `v1.0.0-RC2`\n\nNotice that all module version numbers are incremented to adhere to our\nversioning policy.\n\nAfter these release candidates have been evaluated to satisfaction, they are\nreleased as version `v1.0.0`.\n\n* `otel`: `v1.0.0`\n* `otel/trace`: `v1.0.0`\n* `otel/baggage`: `v1.0.0`\n* `otel/sdk/trace`: `v1.0.0`\n\nSince both the `go` utility and the Go module system support [the semantic\nversioning definition of\nprecedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release\nwill correctly be interpreted as the successor to the previous release\ncandidates.\n\nActive development of this project continues. The `otel/metric` module now has\nbackwards incompatible changes to its API that need to be released and the\n`otel/baggage` module has a minor bug fix that needs to be released. The\nfollowing release is made:\n\n* `otel`: `v1.0.1`\n* `otel/trace`: `v1.0.1`\n* `otel/metric`: `v0.15.0`\n* `otel/baggage`: `v1.0.1`\n* `otel/sdk/trace`: `v1.0.1`\n* `otel/sdk/metric`: `v0.15.0`\n\nNotice that, again, all stable module versions are incremented in unison and\nthe `otel/sdk/metric` package, which depends on the `otel/metric` package, also\nbumped its version. This bump of the `otel/sdk/metric` package makes sense\ngiven their coupling, though it is not explicitly required by our versioning\npolicy.\n\nAs we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a\npoint where they should be evaluated for stability. The `otel` module is\nreintegrated with the `otel/metric` package and the following release is made:\n\n* `otel`: `v1.1.0-RC1`\n* `otel/trace`: `v1.1.0-RC1`\n* `otel/metric`: `v1.1.0-RC1`\n* `otel/baggage`: `v1.1.0-RC1`\n* `otel/sdk/trace`: `v1.1.0-RC1`\n* `otel/sdk/metric`: `v1.1.0-RC1`\n\nAll the modules are evaluated and determined to a viable stable release. They\nare then released as version `v1.1.0` (the minor version is incremented to\nindicate the addition of new signal).\n\n* `otel`: `v1.1.0`\n* `otel/trace`: `v1.1.0`\n* `otel/metric`: `v1.1.0`\n* `otel/baggage`: `v1.1.0`\n* `otel/sdk/trace`: `v1.1.0`\n* `otel/sdk/metric`: `v1.1.0`\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/README.md",
    "content": "# Attribute\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package attribute provides key and value attributes.\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/encoder.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"bytes\"\n\t\"sync\"\n\t\"sync/atomic\"\n)\n\ntype (\n\t// Encoder is a mechanism for serializing an attribute set into a specific\n\t// string representation that supports caching, to avoid repeated\n\t// serialization. An example could be an exporter encoding the attribute\n\t// set into a wire representation.\n\tEncoder interface {\n\t\t// Encode returns the serialized encoding of the attribute set using\n\t\t// its Iterator. This result may be cached by an attribute.Set.\n\t\tEncode(iterator Iterator) string\n\n\t\t// ID returns a value that is unique for each class of attribute\n\t\t// encoder. Attribute encoders allocate these using `NewEncoderID`.\n\t\tID() EncoderID\n\t}\n\n\t// EncoderID is used to identify distinct Encoder\n\t// implementations, for caching encoded results.\n\tEncoderID struct {\n\t\tvalue uint64\n\t}\n\n\t// defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of\n\t// allocations used in encoding attributes. This implementation encodes a\n\t// comma-separated list of key=value, with '/'-escaping of '=', ',', and\n\t// '\\'.\n\tdefaultAttrEncoder struct {\n\t\t// pool is a pool of attribute set builders. The buffers in this pool\n\t\t// grow to a size that most attribute encodings will not allocate new\n\t\t// memory.\n\t\tpool sync.Pool // *bytes.Buffer\n\t}\n)\n\n// escapeChar is used to ensure uniqueness of the attribute encoding where\n// keys or values contain either '=' or ','.  Since there is no parser needed\n// for this encoding and its only requirement is to be unique, this choice is\n// arbitrary.  Users will see these in some exporters (e.g., stdout), so the\n// backslash ('\\') is used as a conventional choice.\nconst escapeChar = '\\\\'\n\nvar (\n\t_ Encoder = &defaultAttrEncoder{}\n\n\t// encoderIDCounter is for generating IDs for other attribute encoders.\n\tencoderIDCounter uint64\n\n\tdefaultEncoderOnce     sync.Once\n\tdefaultEncoderID       = NewEncoderID()\n\tdefaultEncoderInstance *defaultAttrEncoder\n)\n\n// NewEncoderID returns a unique attribute encoder ID. It should be called\n// once per each type of attribute encoder. Preferably in init() or in var\n// definition.\nfunc NewEncoderID() EncoderID {\n\treturn EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)}\n}\n\n// DefaultEncoder returns an attribute encoder that encodes attributes in such\n// a way that each escaped attribute's key is followed by an equal sign and\n// then by an escaped attribute's value. All key-value pairs are separated by\n// a comma.\n//\n// Escaping is done by prepending a backslash before either a backslash, equal\n// sign or a comma.\nfunc DefaultEncoder() Encoder {\n\tdefaultEncoderOnce.Do(func() {\n\t\tdefaultEncoderInstance = &defaultAttrEncoder{\n\t\t\tpool: sync.Pool{\n\t\t\t\tNew: func() any {\n\t\t\t\t\treturn &bytes.Buffer{}\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t})\n\treturn defaultEncoderInstance\n}\n\n// Encode is a part of an implementation of the AttributeEncoder interface.\nfunc (d *defaultAttrEncoder) Encode(iter Iterator) string {\n\tbuf := d.pool.Get().(*bytes.Buffer)\n\tdefer d.pool.Put(buf)\n\tbuf.Reset()\n\n\tfor iter.Next() {\n\t\ti, keyValue := iter.IndexedAttribute()\n\t\tif i > 0 {\n\t\t\t_ = buf.WriteByte(',')\n\t\t}\n\t\tcopyAndEscape(buf, string(keyValue.Key))\n\n\t\t_ = buf.WriteByte('=')\n\n\t\tif keyValue.Value.Type() == STRING {\n\t\t\tcopyAndEscape(buf, keyValue.Value.AsString())\n\t\t} else {\n\t\t\t_, _ = buf.WriteString(keyValue.Value.Emit())\n\t\t}\n\t}\n\treturn buf.String()\n}\n\n// ID is a part of an implementation of the AttributeEncoder interface.\nfunc (*defaultAttrEncoder) ID() EncoderID {\n\treturn defaultEncoderID\n}\n\n// copyAndEscape escapes `=`, `,` and its own escape character (`\\`),\n// making the default encoding unique.\nfunc copyAndEscape(buf *bytes.Buffer, val string) {\n\tfor _, ch := range val {\n\t\tswitch ch {\n\t\tcase '=', ',', escapeChar:\n\t\t\t_ = buf.WriteByte(escapeChar)\n\t\t}\n\t\t_, _ = buf.WriteRune(ch)\n\t}\n}\n\n// Valid reports whether this encoder ID was allocated by\n// [NewEncoderID]. Invalid encoder IDs will not be cached.\nfunc (id EncoderID) Valid() bool {\n\treturn id.value != 0\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/filter.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\n// Filter supports removing certain attributes from attribute sets. When\n// the filter returns true, the attribute will be kept in the filtered\n// attribute set. When the filter returns false, the attribute is excluded\n// from the filtered attribute set, and the attribute instead appears in\n// the removed list of excluded attributes.\ntype Filter func(KeyValue) bool\n\n// NewAllowKeysFilter returns a Filter that only allows attributes with one of\n// the provided keys.\n//\n// If keys is empty a deny-all filter is returned.\nfunc NewAllowKeysFilter(keys ...Key) Filter {\n\tif len(keys) == 0 {\n\t\treturn func(KeyValue) bool { return false }\n\t}\n\n\tallowed := make(map[Key]struct{}, len(keys))\n\tfor _, k := range keys {\n\t\tallowed[k] = struct{}{}\n\t}\n\treturn func(kv KeyValue) bool {\n\t\t_, ok := allowed[kv.Key]\n\t\treturn ok\n\t}\n}\n\n// NewDenyKeysFilter returns a Filter that only allows attributes\n// that do not have one of the provided keys.\n//\n// If keys is empty an allow-all filter is returned.\nfunc NewDenyKeysFilter(keys ...Key) Filter {\n\tif len(keys) == 0 {\n\t\treturn func(KeyValue) bool { return true }\n\t}\n\n\tforbid := make(map[Key]struct{}, len(keys))\n\tfor _, k := range keys {\n\t\tforbid[k] = struct{}{}\n\t}\n\treturn func(kv KeyValue) bool {\n\t\t_, ok := forbid[kv.Key]\n\t\treturn !ok\n\t}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/hash.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"go.opentelemetry.io/otel/attribute/internal/xxhash\"\n)\n\n// Type identifiers. These identifiers are hashed before the value of the\n// corresponding type. This is done to distinguish values that are hashed with\n// the same value representation (e.g. `int64(1)` and `true`, []int64{0} and\n// int64(0)).\n//\n// These are all 8 byte length strings converted to a uint64 representation. A\n// uint64 is used instead of the string directly as an optimization, it avoids\n// the for loop in [xxhash] which adds minor overhead.\nconst (\n\tboolID         uint64 = 7953749933313450591 // \"_boolean\" (little endian)\n\tint64ID        uint64 = 7592915492740740150 // \"64_bit_i\" (little endian)\n\tfloat64ID      uint64 = 7376742710626956342 // \"64_bit_f\" (little endian)\n\tstringID       uint64 = 6874584755375207263 // \"_string_\" (little endian)\n\tboolSliceID    uint64 = 6875993255270243167 // \"_[]bool_\" (little endian)\n\tint64SliceID   uint64 = 3762322556277578591 // \"_[]int64\" (little endian)\n\tfloat64SliceID uint64 = 7308324551835016539 // \"[]double\" (little endian)\n\tstringSliceID  uint64 = 7453010373645655387 // \"[]string\" (little endian)\n)\n\n// hashKVs returns a new xxHash64 hash of kvs.\nfunc hashKVs(kvs []KeyValue) uint64 {\n\th := xxhash.New()\n\tfor _, kv := range kvs {\n\t\th = hashKV(h, kv)\n\t}\n\treturn h.Sum64()\n}\n\n// hashKV returns the xxHash64 hash of kv with h as the base.\nfunc hashKV(h xxhash.Hash, kv KeyValue) xxhash.Hash {\n\th = h.String(string(kv.Key))\n\n\tswitch kv.Value.Type() {\n\tcase BOOL:\n\t\th = h.Uint64(boolID)\n\t\th = h.Uint64(kv.Value.numeric)\n\tcase INT64:\n\t\th = h.Uint64(int64ID)\n\t\th = h.Uint64(kv.Value.numeric)\n\tcase FLOAT64:\n\t\th = h.Uint64(float64ID)\n\t\t// Assumes numeric stored with math.Float64bits.\n\t\th = h.Uint64(kv.Value.numeric)\n\tcase STRING:\n\t\th = h.Uint64(stringID)\n\t\th = h.String(kv.Value.stringly)\n\tcase BOOLSLICE:\n\t\th = h.Uint64(boolSliceID)\n\t\trv := reflect.ValueOf(kv.Value.slice)\n\t\tfor i := 0; i < rv.Len(); i++ {\n\t\t\th = h.Bool(rv.Index(i).Bool())\n\t\t}\n\tcase INT64SLICE:\n\t\th = h.Uint64(int64SliceID)\n\t\trv := reflect.ValueOf(kv.Value.slice)\n\t\tfor i := 0; i < rv.Len(); i++ {\n\t\t\th = h.Int64(rv.Index(i).Int())\n\t\t}\n\tcase FLOAT64SLICE:\n\t\th = h.Uint64(float64SliceID)\n\t\trv := reflect.ValueOf(kv.Value.slice)\n\t\tfor i := 0; i < rv.Len(); i++ {\n\t\t\th = h.Float64(rv.Index(i).Float())\n\t\t}\n\tcase STRINGSLICE:\n\t\th = h.Uint64(stringSliceID)\n\t\trv := reflect.ValueOf(kv.Value.slice)\n\t\tfor i := 0; i < rv.Len(); i++ {\n\t\t\th = h.String(rv.Index(i).String())\n\t\t}\n\tcase INVALID:\n\tdefault:\n\t\t// Logging is an alternative, but using the internal logger here\n\t\t// causes an import cycle so it is not done.\n\t\tv := kv.Value.AsInterface()\n\t\tmsg := fmt.Sprintf(\"unknown value type: %[1]v (%[1]T)\", v)\n\t\tpanic(msg)\n\t}\n\treturn h\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage attribute provide several helper functions for some commonly used\nlogic of processing attributes.\n*/\npackage attribute // import \"go.opentelemetry.io/otel/attribute/internal\"\n\nimport (\n\t\"reflect\"\n)\n\n// BoolSliceValue converts a bool slice into an array with same elements as slice.\nfunc BoolSliceValue(v []bool) any {\n\tcp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[bool]())).Elem()\n\treflect.Copy(cp, reflect.ValueOf(v))\n\treturn cp.Interface()\n}\n\n// Int64SliceValue converts an int64 slice into an array with same elements as slice.\nfunc Int64SliceValue(v []int64) any {\n\tcp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]())).Elem()\n\treflect.Copy(cp, reflect.ValueOf(v))\n\treturn cp.Interface()\n}\n\n// Float64SliceValue converts a float64 slice into an array with same elements as slice.\nfunc Float64SliceValue(v []float64) any {\n\tcp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[float64]())).Elem()\n\treflect.Copy(cp, reflect.ValueOf(v))\n\treturn cp.Interface()\n}\n\n// StringSliceValue converts a string slice into an array with same elements as slice.\nfunc StringSliceValue(v []string) any {\n\tcp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[string]())).Elem()\n\treflect.Copy(cp, reflect.ValueOf(v))\n\treturn cp.Interface()\n}\n\n// AsBoolSlice converts a bool array into a slice into with same elements as array.\nfunc AsBoolSlice(v any) []bool {\n\trv := reflect.ValueOf(v)\n\tif rv.Type().Kind() != reflect.Array {\n\t\treturn nil\n\t}\n\tcpy := make([]bool, rv.Len())\n\tif len(cpy) > 0 {\n\t\t_ = reflect.Copy(reflect.ValueOf(cpy), rv)\n\t}\n\treturn cpy\n}\n\n// AsInt64Slice converts an int64 array into a slice into with same elements as array.\nfunc AsInt64Slice(v any) []int64 {\n\trv := reflect.ValueOf(v)\n\tif rv.Type().Kind() != reflect.Array {\n\t\treturn nil\n\t}\n\tcpy := make([]int64, rv.Len())\n\tif len(cpy) > 0 {\n\t\t_ = reflect.Copy(reflect.ValueOf(cpy), rv)\n\t}\n\treturn cpy\n}\n\n// AsFloat64Slice converts a float64 array into a slice into with same elements as array.\nfunc AsFloat64Slice(v any) []float64 {\n\trv := reflect.ValueOf(v)\n\tif rv.Type().Kind() != reflect.Array {\n\t\treturn nil\n\t}\n\tcpy := make([]float64, rv.Len())\n\tif len(cpy) > 0 {\n\t\t_ = reflect.Copy(reflect.ValueOf(cpy), rv)\n\t}\n\treturn cpy\n}\n\n// AsStringSlice converts a string array into a slice into with same elements as array.\nfunc AsStringSlice(v any) []string {\n\trv := reflect.ValueOf(v)\n\tif rv.Type().Kind() != reflect.Array {\n\t\treturn nil\n\t}\n\tcpy := make([]string, rv.Len())\n\tif len(cpy) > 0 {\n\t\t_ = reflect.Copy(reflect.ValueOf(cpy), rv)\n\t}\n\treturn cpy\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package xxhash provides a wrapper around the xxhash library for attribute hashing.\npackage xxhash // import \"go.opentelemetry.io/otel/attribute/internal/xxhash\"\n\nimport (\n\t\"encoding/binary\"\n\t\"math\"\n\n\t\"github.com/cespare/xxhash/v2\"\n)\n\n// Hash wraps xxhash.Digest to provide an API friendly for hashing attribute values.\ntype Hash struct {\n\td *xxhash.Digest\n}\n\n// New returns a new initialized xxHash64 hasher.\nfunc New() Hash {\n\treturn Hash{d: xxhash.New()}\n}\n\nfunc (h Hash) Uint64(val uint64) Hash {\n\tvar buf [8]byte\n\tbinary.LittleEndian.PutUint64(buf[:], val)\n\t// errors from Write are always nil for xxhash\n\t// if it returns an err then panic\n\t_, err := h.d.Write(buf[:])\n\tif err != nil {\n\t\tpanic(\"xxhash write of uint64 failed: \" + err.Error())\n\t}\n\treturn h\n}\n\nfunc (h Hash) Bool(val bool) Hash { // nolint:revive // This is a hashing function.\n\tif val {\n\t\treturn h.Uint64(1)\n\t}\n\treturn h.Uint64(0)\n}\n\nfunc (h Hash) Float64(val float64) Hash {\n\treturn h.Uint64(math.Float64bits(val))\n}\n\nfunc (h Hash) Int64(val int64) Hash {\n\treturn h.Uint64(uint64(val)) // nolint:gosec // Overflow doesn't matter since we are hashing.\n}\n\nfunc (h Hash) String(val string) Hash {\n\t// errors from WriteString are always nil for xxhash\n\t// if it returns an err then panic\n\t_, err := h.d.WriteString(val)\n\tif err != nil {\n\t\tpanic(\"xxhash write of string failed: \" + err.Error())\n\t}\n\treturn h\n}\n\n// Sum64 returns the current hash value.\nfunc (h Hash) Sum64() uint64 {\n\treturn h.d.Sum64()\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/iterator.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\n// Iterator allows iterating over the set of attributes in order, sorted by\n// key.\ntype Iterator struct {\n\tstorage *Set\n\tidx     int\n}\n\n// MergeIterator supports iterating over two sets of attributes while\n// eliminating duplicate values from the combined set. The first iterator\n// value takes precedence.\ntype MergeIterator struct {\n\tone     oneIterator\n\ttwo     oneIterator\n\tcurrent KeyValue\n}\n\ntype oneIterator struct {\n\titer Iterator\n\tdone bool\n\tattr KeyValue\n}\n\n// Next moves the iterator to the next position.\n// Next reports whether there are more attributes.\nfunc (i *Iterator) Next() bool {\n\ti.idx++\n\treturn i.idx < i.Len()\n}\n\n// Label returns current KeyValue. Must be called only after Next returns\n// true.\n//\n// Deprecated: Use Attribute instead.\nfunc (i *Iterator) Label() KeyValue {\n\treturn i.Attribute()\n}\n\n// Attribute returns the current KeyValue of the Iterator. It must be called\n// only after Next returns true.\nfunc (i *Iterator) Attribute() KeyValue {\n\tkv, _ := i.storage.Get(i.idx)\n\treturn kv\n}\n\n// IndexedLabel returns current index and attribute. Must be called only\n// after Next returns true.\n//\n// Deprecated: Use IndexedAttribute instead.\nfunc (i *Iterator) IndexedLabel() (int, KeyValue) {\n\treturn i.idx, i.Attribute()\n}\n\n// IndexedAttribute returns current index and attribute. Must be called only\n// after Next returns true.\nfunc (i *Iterator) IndexedAttribute() (int, KeyValue) {\n\treturn i.idx, i.Attribute()\n}\n\n// Len returns a number of attributes in the iterated set.\nfunc (i *Iterator) Len() int {\n\treturn i.storage.Len()\n}\n\n// ToSlice is a convenience function that creates a slice of attributes from\n// the passed iterator. The iterator is set up to start from the beginning\n// before creating the slice.\nfunc (i *Iterator) ToSlice() []KeyValue {\n\tl := i.Len()\n\tif l == 0 {\n\t\treturn nil\n\t}\n\ti.idx = -1\n\tslice := make([]KeyValue, 0, l)\n\tfor i.Next() {\n\t\tslice = append(slice, i.Attribute())\n\t}\n\treturn slice\n}\n\n// NewMergeIterator returns a MergeIterator for merging two attribute sets.\n// Duplicates are resolved by taking the value from the first set.\nfunc NewMergeIterator(s1, s2 *Set) MergeIterator {\n\tmi := MergeIterator{\n\t\tone: makeOne(s1.Iter()),\n\t\ttwo: makeOne(s2.Iter()),\n\t}\n\treturn mi\n}\n\nfunc makeOne(iter Iterator) oneIterator {\n\toi := oneIterator{\n\t\titer: iter,\n\t}\n\toi.advance()\n\treturn oi\n}\n\nfunc (oi *oneIterator) advance() {\n\tif oi.done = !oi.iter.Next(); !oi.done {\n\t\toi.attr = oi.iter.Attribute()\n\t}\n}\n\n// Next moves the iterator to the next position.\n// Next reports whether there is another attribute available.\nfunc (m *MergeIterator) Next() bool {\n\tif m.one.done && m.two.done {\n\t\treturn false\n\t}\n\tif m.one.done {\n\t\tm.current = m.two.attr\n\t\tm.two.advance()\n\t\treturn true\n\t}\n\tif m.two.done {\n\t\tm.current = m.one.attr\n\t\tm.one.advance()\n\t\treturn true\n\t}\n\tif m.one.attr.Key == m.two.attr.Key {\n\t\tm.current = m.one.attr // first iterator attribute value wins\n\t\tm.one.advance()\n\t\tm.two.advance()\n\t\treturn true\n\t}\n\tif m.one.attr.Key < m.two.attr.Key {\n\t\tm.current = m.one.attr\n\t\tm.one.advance()\n\t\treturn true\n\t}\n\tm.current = m.two.attr\n\tm.two.advance()\n\treturn true\n}\n\n// Label returns the current value after Next() returns true.\n//\n// Deprecated: Use Attribute instead.\nfunc (m *MergeIterator) Label() KeyValue {\n\treturn m.current\n}\n\n// Attribute returns the current value after Next() returns true.\nfunc (m *MergeIterator) Attribute() KeyValue {\n\treturn m.current\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/key.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\n// Key represents the key part in key-value pairs. It's a string. The\n// allowed character set in the key depends on the use of the key.\ntype Key string\n\n// Bool creates a KeyValue instance with a BOOL Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Bool(name, value).\nfunc (k Key) Bool(v bool) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: BoolValue(v),\n\t}\n}\n\n// BoolSlice creates a KeyValue instance with a BOOLSLICE Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- BoolSlice(name, value).\nfunc (k Key) BoolSlice(v []bool) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: BoolSliceValue(v),\n\t}\n}\n\n// Int creates a KeyValue instance with an INT64 Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Int(name, value).\nfunc (k Key) Int(v int) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: IntValue(v),\n\t}\n}\n\n// IntSlice creates a KeyValue instance with an INT64SLICE Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- IntSlice(name, value).\nfunc (k Key) IntSlice(v []int) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: IntSliceValue(v),\n\t}\n}\n\n// Int64 creates a KeyValue instance with an INT64 Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Int64(name, value).\nfunc (k Key) Int64(v int64) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: Int64Value(v),\n\t}\n}\n\n// Int64Slice creates a KeyValue instance with an INT64SLICE Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Int64Slice(name, value).\nfunc (k Key) Int64Slice(v []int64) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: Int64SliceValue(v),\n\t}\n}\n\n// Float64 creates a KeyValue instance with a FLOAT64 Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Float64(name, value).\nfunc (k Key) Float64(v float64) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: Float64Value(v),\n\t}\n}\n\n// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- Float64(name, value).\nfunc (k Key) Float64Slice(v []float64) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: Float64SliceValue(v),\n\t}\n}\n\n// String creates a KeyValue instance with a STRING Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- String(name, value).\nfunc (k Key) String(v string) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: StringValue(v),\n\t}\n}\n\n// StringSlice creates a KeyValue instance with a STRINGSLICE Value.\n//\n// If creating both a key and value at the same time, use the provided\n// convenience function instead -- StringSlice(name, value).\nfunc (k Key) StringSlice(v []string) KeyValue {\n\treturn KeyValue{\n\t\tKey:   k,\n\t\tValue: StringSliceValue(v),\n\t}\n}\n\n// Defined reports whether the key is not empty.\nfunc (k Key) Defined() bool {\n\treturn len(k) != 0\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/kv.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"fmt\"\n)\n\n// KeyValue holds a key and value pair.\ntype KeyValue struct {\n\tKey   Key\n\tValue Value\n}\n\n// Valid reports whether kv is a valid OpenTelemetry attribute.\nfunc (kv KeyValue) Valid() bool {\n\treturn kv.Key.Defined() && kv.Value.Type() != INVALID\n}\n\n// Bool creates a KeyValue with a BOOL Value type.\nfunc Bool(k string, v bool) KeyValue {\n\treturn Key(k).Bool(v)\n}\n\n// BoolSlice creates a KeyValue with a BOOLSLICE Value type.\nfunc BoolSlice(k string, v []bool) KeyValue {\n\treturn Key(k).BoolSlice(v)\n}\n\n// Int creates a KeyValue with an INT64 Value type.\nfunc Int(k string, v int) KeyValue {\n\treturn Key(k).Int(v)\n}\n\n// IntSlice creates a KeyValue with an INT64SLICE Value type.\nfunc IntSlice(k string, v []int) KeyValue {\n\treturn Key(k).IntSlice(v)\n}\n\n// Int64 creates a KeyValue with an INT64 Value type.\nfunc Int64(k string, v int64) KeyValue {\n\treturn Key(k).Int64(v)\n}\n\n// Int64Slice creates a KeyValue with an INT64SLICE Value type.\nfunc Int64Slice(k string, v []int64) KeyValue {\n\treturn Key(k).Int64Slice(v)\n}\n\n// Float64 creates a KeyValue with a FLOAT64 Value type.\nfunc Float64(k string, v float64) KeyValue {\n\treturn Key(k).Float64(v)\n}\n\n// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type.\nfunc Float64Slice(k string, v []float64) KeyValue {\n\treturn Key(k).Float64Slice(v)\n}\n\n// String creates a KeyValue with a STRING Value type.\nfunc String(k, v string) KeyValue {\n\treturn Key(k).String(v)\n}\n\n// StringSlice creates a KeyValue with a STRINGSLICE Value type.\nfunc StringSlice(k string, v []string) KeyValue {\n\treturn Key(k).StringSlice(v)\n}\n\n// Stringer creates a new key-value pair with a passed name and a string\n// value generated by the passed Stringer interface.\nfunc Stringer(k string, v fmt.Stringer) KeyValue {\n\treturn Key(k).String(v.String())\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"math\"\n)\n\nfunc boolToRaw(b bool) uint64 { // nolint:revive  // b is not a control flag.\n\tif b {\n\t\treturn 1\n\t}\n\treturn 0\n}\n\nfunc rawToBool(r uint64) bool {\n\treturn r != 0\n}\n\nfunc int64ToRaw(i int64) uint64 {\n\t// Assumes original was a valid int64 (overflow not checked).\n\treturn uint64(i) // nolint: gosec\n}\n\nfunc rawToInt64(r uint64) int64 {\n\t// Assumes original was a valid int64 (overflow not checked).\n\treturn int64(r) // nolint: gosec\n}\n\nfunc float64ToRaw(f float64) uint64 {\n\treturn math.Float64bits(f)\n}\n\nfunc rawToFloat64(r uint64) float64 {\n\treturn math.Float64frombits(r)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/set.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"cmp\"\n\t\"encoding/json\"\n\t\"reflect\"\n\t\"slices\"\n\t\"sort\"\n\n\t\"go.opentelemetry.io/otel/attribute/internal/xxhash\"\n)\n\ntype (\n\t// Set is the representation for a distinct attribute set. It manages an\n\t// immutable set of attributes, with an internal cache for storing\n\t// attribute encodings.\n\t//\n\t// This type will remain comparable for backwards compatibility. The\n\t// equivalence of Sets across versions is not guaranteed to be stable.\n\t// Prior versions may find two Sets to be equal or not when compared\n\t// directly (i.e. ==), but subsequent versions may not. Users should use\n\t// the Equals method to ensure stable equivalence checking.\n\t//\n\t// Users should also use the Distinct returned from Equivalent as a map key\n\t// instead of a Set directly. Set has relatively poor performance when used\n\t// as a map key compared to Distinct.\n\tSet struct {\n\t\thash uint64\n\t\tdata any\n\t}\n\n\t// Distinct is an identifier of a Set which is very likely to be unique.\n\t//\n\t// Distinct should be used as a map key instead of a Set for to provide better\n\t// performance for map operations.\n\tDistinct struct {\n\t\thash uint64\n\t}\n\n\t// Sortable implements sort.Interface, used for sorting KeyValue.\n\t//\n\t// Deprecated: This type is no longer used. It was added as a performance\n\t// optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no\n\t// longer supported by the module).\n\tSortable []KeyValue\n)\n\n// Compile time check these types remain comparable.\nvar (\n\t_ = isComparable(Set{})\n\t_ = isComparable(Distinct{})\n)\n\nfunc isComparable[T comparable](t T) T { return t }\n\nvar (\n\t// keyValueType is used in computeDistinctReflect.\n\tkeyValueType = reflect.TypeFor[KeyValue]()\n\n\t// emptyHash is the hash of an empty set.\n\temptyHash = xxhash.New().Sum64()\n\n\t// userDefinedEmptySet is an empty set. It was mistakenly exposed to users\n\t// as something they can assign to, so it must remain addressable and\n\t// mutable.\n\t//\n\t// This is kept for backwards compatibility, but should not be used in new code.\n\tuserDefinedEmptySet = &Set{\n\t\thash: emptyHash,\n\t\tdata: [0]KeyValue{},\n\t}\n\n\temptySet = Set{\n\t\thash: emptyHash,\n\t\tdata: [0]KeyValue{},\n\t}\n)\n\n// EmptySet returns a reference to a Set with no elements.\n//\n// This is a convenience provided for optimized calling utility.\nfunc EmptySet() *Set {\n\t// Continue to return the pointer to the user-defined empty set for\n\t// backwards-compatibility.\n\t//\n\t// New code should not use this, instead use emptySet.\n\treturn userDefinedEmptySet\n}\n\n// Valid reports whether this value refers to a valid Set.\nfunc (d Distinct) Valid() bool { return d.hash != 0 }\n\n// reflectValue abbreviates reflect.ValueOf(d).\nfunc (l Set) reflectValue() reflect.Value {\n\treturn reflect.ValueOf(l.data)\n}\n\n// Len returns the number of attributes in this set.\nfunc (l *Set) Len() int {\n\tif l == nil || l.hash == 0 {\n\t\treturn 0\n\t}\n\treturn l.reflectValue().Len()\n}\n\n// Get returns the KeyValue at ordered position idx in this set.\nfunc (l *Set) Get(idx int) (KeyValue, bool) {\n\tif l == nil || l.hash == 0 {\n\t\treturn KeyValue{}, false\n\t}\n\tvalue := l.reflectValue()\n\n\tif idx >= 0 && idx < value.Len() {\n\t\t// Note: The Go compiler successfully avoids an allocation for\n\t\t// the interface{} conversion here:\n\t\treturn value.Index(idx).Interface().(KeyValue), true\n\t}\n\n\treturn KeyValue{}, false\n}\n\n// Value returns the value of a specified key in this set.\nfunc (l *Set) Value(k Key) (Value, bool) {\n\tif l == nil || l.hash == 0 {\n\t\treturn Value{}, false\n\t}\n\trValue := l.reflectValue()\n\tvlen := rValue.Len()\n\n\tidx := sort.Search(vlen, func(idx int) bool {\n\t\treturn rValue.Index(idx).Interface().(KeyValue).Key >= k\n\t})\n\tif idx >= vlen {\n\t\treturn Value{}, false\n\t}\n\tkeyValue := rValue.Index(idx).Interface().(KeyValue)\n\tif k == keyValue.Key {\n\t\treturn keyValue.Value, true\n\t}\n\treturn Value{}, false\n}\n\n// HasValue reports whether a key is defined in this set.\nfunc (l *Set) HasValue(k Key) bool {\n\tif l == nil {\n\t\treturn false\n\t}\n\t_, ok := l.Value(k)\n\treturn ok\n}\n\n// Iter returns an iterator for visiting the attributes in this set.\nfunc (l *Set) Iter() Iterator {\n\treturn Iterator{\n\t\tstorage: l,\n\t\tidx:     -1,\n\t}\n}\n\n// ToSlice returns the set of attributes belonging to this set, sorted, where\n// keys appear no more than once.\nfunc (l *Set) ToSlice() []KeyValue {\n\titer := l.Iter()\n\treturn iter.ToSlice()\n}\n\n// Equivalent returns a value that may be used as a map key. Equal Distinct\n// values are very likely to be equivalent attribute Sets. Distinct value of any\n// attribute set with the same elements as this, where sets are made unique by\n// choosing the last value in the input for any given key.\nfunc (l *Set) Equivalent() Distinct {\n\tif l == nil || l.hash == 0 {\n\t\treturn Distinct{hash: emptySet.hash}\n\t}\n\treturn Distinct{hash: l.hash}\n}\n\n// Equals reports whether the argument set is equivalent to this set.\nfunc (l *Set) Equals(o *Set) bool {\n\tif l.Equivalent() != o.Equivalent() {\n\t\treturn false\n\t}\n\tif l == nil || l.hash == 0 {\n\t\tl = &emptySet\n\t}\n\tif o == nil || o.hash == 0 {\n\t\to = &emptySet\n\t}\n\treturn l.data == o.data\n}\n\n// Encoded returns the encoded form of this set, according to encoder.\nfunc (l *Set) Encoded(encoder Encoder) string {\n\tif l == nil || encoder == nil {\n\t\treturn \"\"\n\t}\n\n\treturn encoder.Encode(l.Iter())\n}\n\n// NewSet returns a new Set. See the documentation for\n// NewSetWithSortableFiltered for more details.\n//\n// Except for empty sets, this method adds an additional allocation compared\n// with calls that include a Sortable.\nfunc NewSet(kvs ...KeyValue) Set {\n\ts, _ := NewSetWithFiltered(kvs, nil)\n\treturn s\n}\n\n// NewSetWithSortable returns a new Set. See the documentation for\n// NewSetWithSortableFiltered for more details.\n//\n// This call includes a Sortable option as a memory optimization.\n//\n// Deprecated: Use [NewSet] instead.\nfunc NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set {\n\ts, _ := NewSetWithFiltered(kvs, nil)\n\treturn s\n}\n\n// NewSetWithFiltered returns a new Set. See the documentation for\n// NewSetWithSortableFiltered for more details.\n//\n// This call includes a Filter to include/exclude attribute keys from the\n// return value. Excluded keys are returned as a slice of attribute values.\nfunc NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) {\n\t// Check for empty set.\n\tif len(kvs) == 0 {\n\t\treturn emptySet, nil\n\t}\n\n\t// Stable sort so the following de-duplication can implement\n\t// last-value-wins semantics.\n\tslices.SortStableFunc(kvs, func(a, b KeyValue) int {\n\t\treturn cmp.Compare(a.Key, b.Key)\n\t})\n\n\tposition := len(kvs) - 1\n\toffset := position - 1\n\n\t// The requirements stated above require that the stable\n\t// result be placed in the end of the input slice, while\n\t// overwritten values are swapped to the beginning.\n\t//\n\t// De-duplicate with last-value-wins semantics.  Preserve\n\t// duplicate values at the beginning of the input slice.\n\tfor ; offset >= 0; offset-- {\n\t\tif kvs[offset].Key == kvs[position].Key {\n\t\t\tcontinue\n\t\t}\n\t\tposition--\n\t\tkvs[offset], kvs[position] = kvs[position], kvs[offset]\n\t}\n\tkvs = kvs[position:]\n\n\tif filter != nil {\n\t\tif div := filteredToFront(kvs, filter); div != 0 {\n\t\t\treturn newSet(kvs[div:]), kvs[:div]\n\t\t}\n\t}\n\treturn newSet(kvs), nil\n}\n\n// NewSetWithSortableFiltered returns a new Set.\n//\n// Duplicate keys are eliminated by taking the last value.  This\n// re-orders the input slice so that unique last-values are contiguous\n// at the end of the slice.\n//\n// This ensures the following:\n//\n// - Last-value-wins semantics\n// - Caller sees the reordering, but doesn't lose values\n// - Repeated call preserve last-value wins.\n//\n// Note that methods are defined on Set, although this returns Set. Callers\n// can avoid memory allocations by:\n//\n// - allocating a Sortable for use as a temporary in this method\n// - allocating a Set for storing the return value of this constructor.\n//\n// The result maintains a cache of encoded attributes, by attribute.EncoderID.\n// This value should not be copied after its first use.\n//\n// The second []KeyValue return value is a list of attributes that were\n// excluded by the Filter (if non-nil).\n//\n// Deprecated: Use [NewSetWithFiltered] instead.\nfunc NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) {\n\treturn NewSetWithFiltered(kvs, filter)\n}\n\n// filteredToFront filters slice in-place using keep function. All KeyValues that need to\n// be removed are moved to the front. All KeyValues that need to be kept are\n// moved (in-order) to the back. The index for the first KeyValue to be kept is\n// returned.\nfunc filteredToFront(slice []KeyValue, keep Filter) int {\n\tn := len(slice)\n\tj := n\n\tfor i := n - 1; i >= 0; i-- {\n\t\tif keep(slice[i]) {\n\t\t\tj--\n\t\t\tslice[i], slice[j] = slice[j], slice[i]\n\t\t}\n\t}\n\treturn j\n}\n\n// Filter returns a filtered copy of this Set. See the documentation for\n// NewSetWithSortableFiltered for more details.\nfunc (l *Set) Filter(re Filter) (Set, []KeyValue) {\n\tif re == nil {\n\t\treturn *l, nil\n\t}\n\n\t// Iterate in reverse to the first attribute that will be filtered out.\n\tn := l.Len()\n\tfirst := n - 1\n\tfor ; first >= 0; first-- {\n\t\tkv, _ := l.Get(first)\n\t\tif !re(kv) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// No attributes will be dropped, return the immutable Set l and nil.\n\tif first < 0 {\n\t\treturn *l, nil\n\t}\n\n\t// Copy now that we know we need to return a modified set.\n\t//\n\t// Do not do this in-place on the underlying storage of *Set l. Sets are\n\t// immutable and filtering should not change this.\n\tslice := l.ToSlice()\n\n\t// Don't re-iterate the slice if only slice[0] is filtered.\n\tif first == 0 {\n\t\t// It is safe to assume len(slice) >= 1 given we found at least one\n\t\t// attribute above that needs to be filtered out.\n\t\treturn newSet(slice[1:]), slice[:1]\n\t}\n\n\t// Move the filtered slice[first] to the front (preserving order).\n\tkv := slice[first]\n\tcopy(slice[1:first+1], slice[:first])\n\tslice[0] = kv\n\n\t// Do not re-evaluate re(slice[first+1:]).\n\tdiv := filteredToFront(slice[1:first+1], re) + 1\n\treturn newSet(slice[div:]), slice[:div]\n}\n\n// newSet returns a new set based on the sorted and uniqued kvs.\nfunc newSet(kvs []KeyValue) Set {\n\ts := Set{\n\t\thash: hashKVs(kvs),\n\t\tdata: computeDataFixed(kvs),\n\t}\n\tif s.data == nil {\n\t\ts.data = computeDataReflect(kvs)\n\t}\n\treturn s\n}\n\n// computeDataFixed computes a Set data for small slices. It returns nil if the\n// input is too large for this code path.\nfunc computeDataFixed(kvs []KeyValue) any {\n\tswitch len(kvs) {\n\tcase 1:\n\t\treturn [1]KeyValue(kvs)\n\tcase 2:\n\t\treturn [2]KeyValue(kvs)\n\tcase 3:\n\t\treturn [3]KeyValue(kvs)\n\tcase 4:\n\t\treturn [4]KeyValue(kvs)\n\tcase 5:\n\t\treturn [5]KeyValue(kvs)\n\tcase 6:\n\t\treturn [6]KeyValue(kvs)\n\tcase 7:\n\t\treturn [7]KeyValue(kvs)\n\tcase 8:\n\t\treturn [8]KeyValue(kvs)\n\tcase 9:\n\t\treturn [9]KeyValue(kvs)\n\tcase 10:\n\t\treturn [10]KeyValue(kvs)\n\tdefault:\n\t\treturn nil\n\t}\n}\n\n// computeDataReflect computes a Set data using reflection, works for any size\n// input.\nfunc computeDataReflect(kvs []KeyValue) any {\n\tat := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem()\n\tfor i, keyValue := range kvs {\n\t\t*(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue\n\t}\n\treturn at.Interface()\n}\n\n// MarshalJSON returns the JSON encoding of the Set.\nfunc (l *Set) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(l.data)\n}\n\n// MarshalLog is the marshaling function used by the logging system to represent this Set.\nfunc (l Set) MarshalLog() any {\n\tkvs := make(map[string]string)\n\tfor _, kv := range l.ToSlice() {\n\t\tkvs[string(kv.Key)] = kv.Value.Emit()\n\t}\n\treturn kvs\n}\n\n// Len implements sort.Interface.\nfunc (l *Sortable) Len() int {\n\treturn len(*l)\n}\n\n// Swap implements sort.Interface.\nfunc (l *Sortable) Swap(i, j int) {\n\t(*l)[i], (*l)[j] = (*l)[j], (*l)[i]\n}\n\n// Less implements sort.Interface.\nfunc (l *Sortable) Less(i, j int) bool {\n\treturn (*l)[i].Key < (*l)[j].Key\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/type_string.go",
    "content": "// Code generated by \"stringer -type=Type\"; DO NOT EDIT.\n\npackage attribute\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[INVALID-0]\n\t_ = x[BOOL-1]\n\t_ = x[INT64-2]\n\t_ = x[FLOAT64-3]\n\t_ = x[STRING-4]\n\t_ = x[BOOLSLICE-5]\n\t_ = x[INT64SLICE-6]\n\t_ = x[FLOAT64SLICE-7]\n\t_ = x[STRINGSLICE-8]\n}\n\nconst _Type_name = \"INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE\"\n\nvar _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71}\n\nfunc (i Type) String() string {\n\tidx := int(i) - 0\n\tif i < 0 || idx >= len(_Type_index)-1 {\n\t\treturn \"Type(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _Type_name[_Type_index[idx]:_Type_index[idx+1]]\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/attribute/value.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage attribute // import \"go.opentelemetry.io/otel/attribute\"\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\n\tattribute \"go.opentelemetry.io/otel/attribute/internal\"\n)\n\n//go:generate stringer -type=Type\n\n// Type describes the type of the data Value holds.\ntype Type int // nolint: revive  // redefines builtin Type.\n\n// Value represents the value part in key-value pairs.\ntype Value struct {\n\tvtype    Type\n\tnumeric  uint64\n\tstringly string\n\tslice    any\n}\n\nconst (\n\t// INVALID is used for a Value with no value set.\n\tINVALID Type = iota\n\t// BOOL is a boolean Type Value.\n\tBOOL\n\t// INT64 is a 64-bit signed integral Type Value.\n\tINT64\n\t// FLOAT64 is a 64-bit floating point Type Value.\n\tFLOAT64\n\t// STRING is a string Type Value.\n\tSTRING\n\t// BOOLSLICE is a slice of booleans Type Value.\n\tBOOLSLICE\n\t// INT64SLICE is a slice of 64-bit signed integral numbers Type Value.\n\tINT64SLICE\n\t// FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value.\n\tFLOAT64SLICE\n\t// STRINGSLICE is a slice of strings Type Value.\n\tSTRINGSLICE\n)\n\n// BoolValue creates a BOOL Value.\nfunc BoolValue(v bool) Value {\n\treturn Value{\n\t\tvtype:   BOOL,\n\t\tnumeric: boolToRaw(v),\n\t}\n}\n\n// BoolSliceValue creates a BOOLSLICE Value.\nfunc BoolSliceValue(v []bool) Value {\n\treturn Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)}\n}\n\n// IntValue creates an INT64 Value.\nfunc IntValue(v int) Value {\n\treturn Int64Value(int64(v))\n}\n\n// IntSliceValue creates an INTSLICE Value.\nfunc IntSliceValue(v []int) Value {\n\tcp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]()))\n\tfor i, val := range v {\n\t\tcp.Elem().Index(i).SetInt(int64(val))\n\t}\n\treturn Value{\n\t\tvtype: INT64SLICE,\n\t\tslice: cp.Elem().Interface(),\n\t}\n}\n\n// Int64Value creates an INT64 Value.\nfunc Int64Value(v int64) Value {\n\treturn Value{\n\t\tvtype:   INT64,\n\t\tnumeric: int64ToRaw(v),\n\t}\n}\n\n// Int64SliceValue creates an INT64SLICE Value.\nfunc Int64SliceValue(v []int64) Value {\n\treturn Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)}\n}\n\n// Float64Value creates a FLOAT64 Value.\nfunc Float64Value(v float64) Value {\n\treturn Value{\n\t\tvtype:   FLOAT64,\n\t\tnumeric: float64ToRaw(v),\n\t}\n}\n\n// Float64SliceValue creates a FLOAT64SLICE Value.\nfunc Float64SliceValue(v []float64) Value {\n\treturn Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)}\n}\n\n// StringValue creates a STRING Value.\nfunc StringValue(v string) Value {\n\treturn Value{\n\t\tvtype:    STRING,\n\t\tstringly: v,\n\t}\n}\n\n// StringSliceValue creates a STRINGSLICE Value.\nfunc StringSliceValue(v []string) Value {\n\treturn Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)}\n}\n\n// Type returns a type of the Value.\nfunc (v Value) Type() Type {\n\treturn v.vtype\n}\n\n// AsBool returns the bool value. Make sure that the Value's type is\n// BOOL.\nfunc (v Value) AsBool() bool {\n\treturn rawToBool(v.numeric)\n}\n\n// AsBoolSlice returns the []bool value. Make sure that the Value's type is\n// BOOLSLICE.\nfunc (v Value) AsBoolSlice() []bool {\n\tif v.vtype != BOOLSLICE {\n\t\treturn nil\n\t}\n\treturn v.asBoolSlice()\n}\n\nfunc (v Value) asBoolSlice() []bool {\n\treturn attribute.AsBoolSlice(v.slice)\n}\n\n// AsInt64 returns the int64 value. Make sure that the Value's type is\n// INT64.\nfunc (v Value) AsInt64() int64 {\n\treturn rawToInt64(v.numeric)\n}\n\n// AsInt64Slice returns the []int64 value. Make sure that the Value's type is\n// INT64SLICE.\nfunc (v Value) AsInt64Slice() []int64 {\n\tif v.vtype != INT64SLICE {\n\t\treturn nil\n\t}\n\treturn v.asInt64Slice()\n}\n\nfunc (v Value) asInt64Slice() []int64 {\n\treturn attribute.AsInt64Slice(v.slice)\n}\n\n// AsFloat64 returns the float64 value. Make sure that the Value's\n// type is FLOAT64.\nfunc (v Value) AsFloat64() float64 {\n\treturn rawToFloat64(v.numeric)\n}\n\n// AsFloat64Slice returns the []float64 value. Make sure that the Value's type is\n// FLOAT64SLICE.\nfunc (v Value) AsFloat64Slice() []float64 {\n\tif v.vtype != FLOAT64SLICE {\n\t\treturn nil\n\t}\n\treturn v.asFloat64Slice()\n}\n\nfunc (v Value) asFloat64Slice() []float64 {\n\treturn attribute.AsFloat64Slice(v.slice)\n}\n\n// AsString returns the string value. Make sure that the Value's type\n// is STRING.\nfunc (v Value) AsString() string {\n\treturn v.stringly\n}\n\n// AsStringSlice returns the []string value. Make sure that the Value's type is\n// STRINGSLICE.\nfunc (v Value) AsStringSlice() []string {\n\tif v.vtype != STRINGSLICE {\n\t\treturn nil\n\t}\n\treturn v.asStringSlice()\n}\n\nfunc (v Value) asStringSlice() []string {\n\treturn attribute.AsStringSlice(v.slice)\n}\n\ntype unknownValueType struct{}\n\n// AsInterface returns Value's data as any.\nfunc (v Value) AsInterface() any {\n\tswitch v.Type() {\n\tcase BOOL:\n\t\treturn v.AsBool()\n\tcase BOOLSLICE:\n\t\treturn v.asBoolSlice()\n\tcase INT64:\n\t\treturn v.AsInt64()\n\tcase INT64SLICE:\n\t\treturn v.asInt64Slice()\n\tcase FLOAT64:\n\t\treturn v.AsFloat64()\n\tcase FLOAT64SLICE:\n\t\treturn v.asFloat64Slice()\n\tcase STRING:\n\t\treturn v.stringly\n\tcase STRINGSLICE:\n\t\treturn v.asStringSlice()\n\t}\n\treturn unknownValueType{}\n}\n\n// Emit returns a string representation of Value's data.\nfunc (v Value) Emit() string {\n\tswitch v.Type() {\n\tcase BOOLSLICE:\n\t\treturn fmt.Sprint(v.asBoolSlice())\n\tcase BOOL:\n\t\treturn strconv.FormatBool(v.AsBool())\n\tcase INT64SLICE:\n\t\tj, err := json.Marshal(v.asInt64Slice())\n\t\tif err != nil {\n\t\t\treturn fmt.Sprintf(\"invalid: %v\", v.asInt64Slice())\n\t\t}\n\t\treturn string(j)\n\tcase INT64:\n\t\treturn strconv.FormatInt(v.AsInt64(), 10)\n\tcase FLOAT64SLICE:\n\t\tj, err := json.Marshal(v.asFloat64Slice())\n\t\tif err != nil {\n\t\t\treturn fmt.Sprintf(\"invalid: %v\", v.asFloat64Slice())\n\t\t}\n\t\treturn string(j)\n\tcase FLOAT64:\n\t\treturn fmt.Sprint(v.AsFloat64())\n\tcase STRINGSLICE:\n\t\tj, err := json.Marshal(v.asStringSlice())\n\t\tif err != nil {\n\t\t\treturn fmt.Sprintf(\"invalid: %v\", v.asStringSlice())\n\t\t}\n\t\treturn string(j)\n\tcase STRING:\n\t\treturn v.stringly\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n\n// MarshalJSON returns the JSON encoding of the Value.\nfunc (v Value) MarshalJSON() ([]byte, error) {\n\tvar jsonVal struct {\n\t\tType  string\n\t\tValue any\n\t}\n\tjsonVal.Type = v.Type().String()\n\tjsonVal.Value = v.AsInterface()\n\treturn json.Marshal(jsonVal)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/baggage/README.md",
    "content": "# Baggage\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/baggage)](https://pkg.go.dev/go.opentelemetry.io/otel/baggage)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/baggage/baggage.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage baggage // import \"go.opentelemetry.io/otel/baggage\"\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"go.opentelemetry.io/otel/internal/baggage\"\n)\n\nconst (\n\tmaxMembers               = 180\n\tmaxBytesPerMembers       = 4096\n\tmaxBytesPerBaggageString = 8192\n\n\tlistDelimiter     = \",\"\n\tkeyValueDelimiter = \"=\"\n\tpropertyDelimiter = \";\"\n)\n\nvar (\n\terrInvalidKey      = errors.New(\"invalid key\")\n\terrInvalidValue    = errors.New(\"invalid value\")\n\terrInvalidProperty = errors.New(\"invalid baggage list-member property\")\n\terrInvalidMember   = errors.New(\"invalid baggage list-member\")\n\terrMemberNumber    = errors.New(\"too many list-members in baggage-string\")\n\terrMemberBytes     = errors.New(\"list-member too large\")\n\terrBaggageBytes    = errors.New(\"baggage-string too large\")\n)\n\n// Property is an additional metadata entry for a baggage list-member.\ntype Property struct {\n\tkey, value string\n\n\t// hasValue indicates if a zero-value value means the property does not\n\t// have a value or if it was the zero-value.\n\thasValue bool\n}\n\n// NewKeyProperty returns a new Property for key.\n//\n// The passed key must be valid, non-empty UTF-8 string.\n// If key is invalid, an error will be returned.\n// However, the specific Propagators that are used to transmit baggage entries across\n// component boundaries may impose their own restrictions on Property key.\n// For example, the W3C Baggage specification restricts the Property keys to strings that\n// satisfy the token definition from RFC7230, Section 3.2.6.\n// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.\nfunc NewKeyProperty(key string) (Property, error) {\n\tif !validateBaggageName(key) {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidKey, key)\n\t}\n\n\tp := Property{key: key}\n\treturn p, nil\n}\n\n// NewKeyValueProperty returns a new Property for key with value.\n//\n// The passed key must be compliant with W3C Baggage specification.\n// The passed value must be percent-encoded as defined in W3C Baggage specification.\n//\n// Notice: Consider using [NewKeyValuePropertyRaw] instead\n// that does not require percent-encoding of the value.\nfunc NewKeyValueProperty(key, value string) (Property, error) {\n\tif !validateKey(key) {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidKey, key)\n\t}\n\n\tif !validateValue(value) {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidValue, value)\n\t}\n\tdecodedValue, err := url.PathUnescape(value)\n\tif err != nil {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidValue, value)\n\t}\n\treturn NewKeyValuePropertyRaw(key, decodedValue)\n}\n\n// NewKeyValuePropertyRaw returns a new Property for key with value.\n//\n// The passed key must be valid, non-empty UTF-8 string.\n// The passed value must be valid UTF-8 string.\n// However, the specific Propagators that are used to transmit baggage entries across\n// component boundaries may impose their own restrictions on Property key.\n// For example, the W3C Baggage specification restricts the Property keys to strings that\n// satisfy the token definition from RFC7230, Section 3.2.6.\n// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.\nfunc NewKeyValuePropertyRaw(key, value string) (Property, error) {\n\tif !validateBaggageName(key) {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidKey, key)\n\t}\n\tif !validateBaggageValue(value) {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidValue, value)\n\t}\n\n\tp := Property{\n\t\tkey:      key,\n\t\tvalue:    value,\n\t\thasValue: true,\n\t}\n\treturn p, nil\n}\n\nfunc newInvalidProperty() Property {\n\treturn Property{}\n}\n\n// parseProperty attempts to decode a Property from the passed string. It\n// returns an error if the input is invalid according to the W3C Baggage\n// specification.\nfunc parseProperty(property string) (Property, error) {\n\tif property == \"\" {\n\t\treturn newInvalidProperty(), nil\n\t}\n\n\tp, ok := parsePropertyInternal(property)\n\tif !ok {\n\t\treturn newInvalidProperty(), fmt.Errorf(\"%w: %q\", errInvalidProperty, property)\n\t}\n\n\treturn p, nil\n}\n\n// validate ensures p conforms to the W3C Baggage specification, returning an\n// error otherwise.\nfunc (p Property) validate() error {\n\terrFunc := func(err error) error {\n\t\treturn fmt.Errorf(\"invalid property: %w\", err)\n\t}\n\n\tif !validateBaggageName(p.key) {\n\t\treturn errFunc(fmt.Errorf(\"%w: %q\", errInvalidKey, p.key))\n\t}\n\tif !p.hasValue && p.value != \"\" {\n\t\treturn errFunc(errors.New(\"inconsistent value\"))\n\t}\n\tif p.hasValue && !validateBaggageValue(p.value) {\n\t\treturn errFunc(fmt.Errorf(\"%w: %q\", errInvalidValue, p.value))\n\t}\n\treturn nil\n}\n\n// Key returns the Property key.\nfunc (p Property) Key() string {\n\treturn p.key\n}\n\n// Value returns the Property value. Additionally, a boolean value is returned\n// indicating if the returned value is the empty if the Property has a value\n// that is empty or if the value is not set.\nfunc (p Property) Value() (string, bool) {\n\treturn p.value, p.hasValue\n}\n\n// String encodes Property into a header string compliant with the W3C Baggage\n// specification.\n// It would return empty string if the key is invalid with the W3C Baggage\n// specification. This could happen for a UTF-8 key, as it may contain\n// invalid characters.\nfunc (p Property) String() string {\n\t//  W3C Baggage specification does not allow percent-encoded keys.\n\tif !validateKey(p.key) {\n\t\treturn \"\"\n\t}\n\n\tif p.hasValue {\n\t\treturn fmt.Sprintf(\"%s%s%v\", p.key, keyValueDelimiter, valueEscape(p.value))\n\t}\n\treturn p.key\n}\n\ntype properties []Property\n\nfunc fromInternalProperties(iProps []baggage.Property) properties {\n\tif len(iProps) == 0 {\n\t\treturn nil\n\t}\n\n\tprops := make(properties, len(iProps))\n\tfor i, p := range iProps {\n\t\tprops[i] = Property{\n\t\t\tkey:      p.Key,\n\t\t\tvalue:    p.Value,\n\t\t\thasValue: p.HasValue,\n\t\t}\n\t}\n\treturn props\n}\n\nfunc (p properties) asInternal() []baggage.Property {\n\tif len(p) == 0 {\n\t\treturn nil\n\t}\n\n\tiProps := make([]baggage.Property, len(p))\n\tfor i, prop := range p {\n\t\tiProps[i] = baggage.Property{\n\t\t\tKey:      prop.key,\n\t\t\tValue:    prop.value,\n\t\t\tHasValue: prop.hasValue,\n\t\t}\n\t}\n\treturn iProps\n}\n\nfunc (p properties) Copy() properties {\n\tif len(p) == 0 {\n\t\treturn nil\n\t}\n\n\tprops := make(properties, len(p))\n\tcopy(props, p)\n\treturn props\n}\n\n// validate ensures each Property in p conforms to the W3C Baggage\n// specification, returning an error otherwise.\nfunc (p properties) validate() error {\n\tfor _, prop := range p {\n\t\tif err := prop.validate(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// String encodes properties into a header string compliant with the W3C Baggage\n// specification.\nfunc (p properties) String() string {\n\tprops := make([]string, 0, len(p))\n\tfor _, prop := range p {\n\t\ts := prop.String()\n\n\t\t// Ignored empty properties.\n\t\tif s != \"\" {\n\t\t\tprops = append(props, s)\n\t\t}\n\t}\n\treturn strings.Join(props, propertyDelimiter)\n}\n\n// Member is a list-member of a baggage-string as defined by the W3C Baggage\n// specification.\ntype Member struct {\n\tkey, value string\n\tproperties properties\n\n\t// hasData indicates whether the created property contains data or not.\n\t// Properties that do not contain data are invalid with no other check\n\t// required.\n\thasData bool\n}\n\n// NewMember returns a new Member from the passed arguments.\n//\n// The passed key must be compliant with W3C Baggage specification.\n// The passed value must be percent-encoded as defined in W3C Baggage specification.\n//\n// Notice: Consider using [NewMemberRaw] instead\n// that does not require percent-encoding of the value.\nfunc NewMember(key, value string, props ...Property) (Member, error) {\n\tif !validateKey(key) {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidKey, key)\n\t}\n\n\tif !validateValue(value) {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidValue, value)\n\t}\n\tdecodedValue, err := url.PathUnescape(value)\n\tif err != nil {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidValue, value)\n\t}\n\treturn NewMemberRaw(key, decodedValue, props...)\n}\n\n// NewMemberRaw returns a new Member from the passed arguments.\n//\n// The passed key must be valid, non-empty UTF-8 string.\n// The passed value must be valid UTF-8 string.\n// However, the specific Propagators that are used to transmit baggage entries across\n// component boundaries may impose their own restrictions on baggage key.\n// For example, the W3C Baggage specification restricts the baggage keys to strings that\n// satisfy the token definition from RFC7230, Section 3.2.6.\n// For maximum compatibility, alphanumeric value are strongly recommended to be used as baggage key.\nfunc NewMemberRaw(key, value string, props ...Property) (Member, error) {\n\tm := Member{\n\t\tkey:        key,\n\t\tvalue:      value,\n\t\tproperties: properties(props).Copy(),\n\t\thasData:    true,\n\t}\n\tif err := m.validate(); err != nil {\n\t\treturn newInvalidMember(), err\n\t}\n\treturn m, nil\n}\n\nfunc newInvalidMember() Member {\n\treturn Member{}\n}\n\n// parseMember attempts to decode a Member from the passed string. It returns\n// an error if the input is invalid according to the W3C Baggage\n// specification.\nfunc parseMember(member string) (Member, error) {\n\tif n := len(member); n > maxBytesPerMembers {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %d\", errMemberBytes, n)\n\t}\n\n\tvar props properties\n\tkeyValue, properties, found := strings.Cut(member, propertyDelimiter)\n\tif found {\n\t\t// Parse the member properties.\n\t\tfor pStr := range strings.SplitSeq(properties, propertyDelimiter) {\n\t\t\tp, err := parseProperty(pStr)\n\t\t\tif err != nil {\n\t\t\t\treturn newInvalidMember(), err\n\t\t\t}\n\t\t\tprops = append(props, p)\n\t\t}\n\t}\n\t// Parse the member key/value pair.\n\n\t// Take into account a value can contain equal signs (=).\n\tk, v, found := strings.Cut(keyValue, keyValueDelimiter)\n\tif !found {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidMember, member)\n\t}\n\t// \"Leading and trailing whitespaces are allowed but MUST be trimmed\n\t// when converting the header into a data structure.\"\n\tkey := strings.TrimSpace(k)\n\tif !validateKey(key) {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidKey, key)\n\t}\n\n\trawVal := strings.TrimSpace(v)\n\tif !validateValue(rawVal) {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %q\", errInvalidValue, v)\n\t}\n\n\t// Decode a percent-encoded value.\n\tunescapeVal, err := url.PathUnescape(rawVal)\n\tif err != nil {\n\t\treturn newInvalidMember(), fmt.Errorf(\"%w: %w\", errInvalidValue, err)\n\t}\n\n\tvalue := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal)\n\treturn Member{key: key, value: value, properties: props, hasData: true}, nil\n}\n\n// replaceInvalidUTF8Sequences replaces invalid UTF-8 sequences with '�'.\nfunc replaceInvalidUTF8Sequences(c int, unescapeVal string) string {\n\tif utf8.ValidString(unescapeVal) {\n\t\treturn unescapeVal\n\t}\n\t// W3C baggage spec:\n\t// https://github.com/w3c/baggage/blob/8c215efbeebd3fa4b1aceb937a747e56444f22f3/baggage/HTTP_HEADER_FORMAT.md?plain=1#L69\n\n\tvar b strings.Builder\n\tb.Grow(c)\n\tfor i := 0; i < len(unescapeVal); {\n\t\tr, size := utf8.DecodeRuneInString(unescapeVal[i:])\n\t\tif r == utf8.RuneError && size == 1 {\n\t\t\t// Invalid UTF-8 sequence found, replace it with '�'\n\t\t\t_, _ = b.WriteString(\"�\")\n\t\t} else {\n\t\t\t_, _ = b.WriteRune(r)\n\t\t}\n\t\ti += size\n\t}\n\n\treturn b.String()\n}\n\n// validate ensures m conforms to the W3C Baggage specification.\n// A key must be an ASCII string, returning an error otherwise.\nfunc (m Member) validate() error {\n\tif !m.hasData {\n\t\treturn fmt.Errorf(\"%w: %q\", errInvalidMember, m)\n\t}\n\n\tif !validateBaggageName(m.key) {\n\t\treturn fmt.Errorf(\"%w: %q\", errInvalidKey, m.key)\n\t}\n\tif !validateBaggageValue(m.value) {\n\t\treturn fmt.Errorf(\"%w: %q\", errInvalidValue, m.value)\n\t}\n\treturn m.properties.validate()\n}\n\n// Key returns the Member key.\nfunc (m Member) Key() string { return m.key }\n\n// Value returns the Member value.\nfunc (m Member) Value() string { return m.value }\n\n// Properties returns a copy of the Member properties.\nfunc (m Member) Properties() []Property { return m.properties.Copy() }\n\n// String encodes Member into a header string compliant with the W3C Baggage\n// specification.\n// It would return empty string if the key is invalid with the W3C Baggage\n// specification. This could happen for a UTF-8 key, as it may contain\n// invalid characters.\nfunc (m Member) String() string {\n\t//  W3C Baggage specification does not allow percent-encoded keys.\n\tif !validateKey(m.key) {\n\t\treturn \"\"\n\t}\n\n\ts := m.key + keyValueDelimiter + valueEscape(m.value)\n\tif len(m.properties) > 0 {\n\t\ts += propertyDelimiter + m.properties.String()\n\t}\n\treturn s\n}\n\n// Baggage is a list of baggage members representing the baggage-string as\n// defined by the W3C Baggage specification.\ntype Baggage struct { //nolint:golint\n\tlist baggage.List\n}\n\n// New returns a new valid Baggage. It returns an error if it results in a\n// Baggage exceeding limits set in that specification.\n//\n// It expects all the provided members to have already been validated.\nfunc New(members ...Member) (Baggage, error) {\n\tif len(members) == 0 {\n\t\treturn Baggage{}, nil\n\t}\n\n\tb := make(baggage.List)\n\tfor _, m := range members {\n\t\tif !m.hasData {\n\t\t\treturn Baggage{}, errInvalidMember\n\t\t}\n\n\t\t// OpenTelemetry resolves duplicates by last-one-wins.\n\t\tb[m.key] = baggage.Item{\n\t\t\tValue:      m.value,\n\t\t\tProperties: m.properties.asInternal(),\n\t\t}\n\t}\n\n\t// Check member numbers after deduplication.\n\tif len(b) > maxMembers {\n\t\treturn Baggage{}, errMemberNumber\n\t}\n\n\tbag := Baggage{b}\n\tif n := len(bag.String()); n > maxBytesPerBaggageString {\n\t\treturn Baggage{}, fmt.Errorf(\"%w: %d\", errBaggageBytes, n)\n\t}\n\n\treturn bag, nil\n}\n\n// Parse attempts to decode a baggage-string from the passed string. It\n// returns an error if the input is invalid according to the W3C Baggage\n// specification.\n//\n// If there are duplicate list-members contained in baggage, the last one\n// defined (reading left-to-right) will be the only one kept. This diverges\n// from the W3C Baggage specification which allows duplicate list-members, but\n// conforms to the OpenTelemetry Baggage specification.\nfunc Parse(bStr string) (Baggage, error) {\n\tif bStr == \"\" {\n\t\treturn Baggage{}, nil\n\t}\n\n\tif n := len(bStr); n > maxBytesPerBaggageString {\n\t\treturn Baggage{}, fmt.Errorf(\"%w: %d\", errBaggageBytes, n)\n\t}\n\n\tb := make(baggage.List)\n\tfor memberStr := range strings.SplitSeq(bStr, listDelimiter) {\n\t\tm, err := parseMember(memberStr)\n\t\tif err != nil {\n\t\t\treturn Baggage{}, err\n\t\t}\n\t\t// OpenTelemetry resolves duplicates by last-one-wins.\n\t\tb[m.key] = baggage.Item{\n\t\t\tValue:      m.value,\n\t\t\tProperties: m.properties.asInternal(),\n\t\t}\n\t}\n\n\t// OpenTelemetry does not allow for duplicate list-members, but the W3C\n\t// specification does. Now that we have deduplicated, ensure the baggage\n\t// does not exceed list-member limits.\n\tif len(b) > maxMembers {\n\t\treturn Baggage{}, errMemberNumber\n\t}\n\n\treturn Baggage{b}, nil\n}\n\n// Member returns the baggage list-member identified by key.\n//\n// If there is no list-member matching the passed key the returned Member will\n// be a zero-value Member.\n// The returned member is not validated, as we assume the validation happened\n// when it was added to the Baggage.\nfunc (b Baggage) Member(key string) Member {\n\tv, ok := b.list[key]\n\tif !ok {\n\t\t// We do not need to worry about distinguishing between the situation\n\t\t// where a zero-valued Member is included in the Baggage because a\n\t\t// zero-valued Member is invalid according to the W3C Baggage\n\t\t// specification (it has an empty key).\n\t\treturn newInvalidMember()\n\t}\n\n\treturn Member{\n\t\tkey:        key,\n\t\tvalue:      v.Value,\n\t\tproperties: fromInternalProperties(v.Properties),\n\t\thasData:    true,\n\t}\n}\n\n// Members returns all the baggage list-members.\n// The order of the returned list-members is not significant.\n//\n// The returned members are not validated, as we assume the validation happened\n// when they were added to the Baggage.\nfunc (b Baggage) Members() []Member {\n\tif len(b.list) == 0 {\n\t\treturn nil\n\t}\n\n\tmembers := make([]Member, 0, len(b.list))\n\tfor k, v := range b.list {\n\t\tmembers = append(members, Member{\n\t\t\tkey:        k,\n\t\t\tvalue:      v.Value,\n\t\t\tproperties: fromInternalProperties(v.Properties),\n\t\t\thasData:    true,\n\t\t})\n\t}\n\treturn members\n}\n\n// SetMember returns a copy of the Baggage with the member included. If the\n// baggage contains a Member with the same key, the existing Member is\n// replaced.\n//\n// If member is invalid according to the W3C Baggage specification, an error\n// is returned with the original Baggage.\nfunc (b Baggage) SetMember(member Member) (Baggage, error) {\n\tif !member.hasData {\n\t\treturn b, errInvalidMember\n\t}\n\n\tn := len(b.list)\n\tif _, ok := b.list[member.key]; !ok {\n\t\tn++\n\t}\n\tlist := make(baggage.List, n)\n\n\tfor k, v := range b.list {\n\t\t// Do not copy if we are just going to overwrite.\n\t\tif k == member.key {\n\t\t\tcontinue\n\t\t}\n\t\tlist[k] = v\n\t}\n\n\tlist[member.key] = baggage.Item{\n\t\tValue:      member.value,\n\t\tProperties: member.properties.asInternal(),\n\t}\n\n\treturn Baggage{list: list}, nil\n}\n\n// DeleteMember returns a copy of the Baggage with the list-member identified\n// by key removed.\nfunc (b Baggage) DeleteMember(key string) Baggage {\n\tn := len(b.list)\n\tif _, ok := b.list[key]; ok {\n\t\tn--\n\t}\n\tlist := make(baggage.List, n)\n\n\tfor k, v := range b.list {\n\t\tif k == key {\n\t\t\tcontinue\n\t\t}\n\t\tlist[k] = v\n\t}\n\n\treturn Baggage{list: list}\n}\n\n// Len returns the number of list-members in the Baggage.\nfunc (b Baggage) Len() int {\n\treturn len(b.list)\n}\n\n// String encodes Baggage into a header string compliant with the W3C Baggage\n// specification.\n// It would ignore members where the member key is invalid with the W3C Baggage\n// specification. This could happen for a UTF-8 key, as it may contain\n// invalid characters.\nfunc (b Baggage) String() string {\n\tmembers := make([]string, 0, len(b.list))\n\tfor k, v := range b.list {\n\t\ts := Member{\n\t\t\tkey:        k,\n\t\t\tvalue:      v.Value,\n\t\t\tproperties: fromInternalProperties(v.Properties),\n\t\t}.String()\n\n\t\t// Ignored empty members.\n\t\tif s != \"\" {\n\t\t\tmembers = append(members, s)\n\t\t}\n\t}\n\treturn strings.Join(members, listDelimiter)\n}\n\n// parsePropertyInternal attempts to decode a Property from the passed string.\n// It follows the spec at https://www.w3.org/TR/baggage/#definition.\nfunc parsePropertyInternal(s string) (p Property, ok bool) {\n\t// For the entire function we will use \"   key    =    value  \" as an example.\n\t// Attempting to parse the key.\n\t// First skip spaces at the beginning \"<   >key    =    value  \" (they could be empty).\n\tindex := skipSpace(s, 0)\n\n\t// Parse the key: \"   <key>    =    value  \".\n\tkeyStart := index\n\tkeyEnd := index\n\tfor _, c := range s[keyStart:] {\n\t\tif !validateKeyChar(c) {\n\t\t\tbreak\n\t\t}\n\t\tkeyEnd++\n\t}\n\n\t// If we couldn't find any valid key character,\n\t// it means the key is either empty or invalid.\n\tif keyStart == keyEnd {\n\t\treturn p, ok\n\t}\n\n\t// Skip spaces after the key: \"   key<    >=    value  \".\n\tindex = skipSpace(s, keyEnd)\n\n\tif index == len(s) {\n\t\t// A key can have no value, like: \"   key    \".\n\t\tok = true\n\t\tp.key = s[keyStart:keyEnd]\n\t\treturn p, ok\n\t}\n\n\t// If we have not reached the end and we can't find the '=' delimiter,\n\t// it means the property is invalid.\n\tif s[index] != keyValueDelimiter[0] {\n\t\treturn p, ok\n\t}\n\n\t// Attempting to parse the value.\n\t// Match: \"   key    =<    >value  \".\n\tindex = skipSpace(s, index+1)\n\n\t// Match the value string: \"   key    =    <value>  \".\n\t// A valid property can be: \"   key    =\".\n\t// Therefore, we don't have to check if the value is empty.\n\tvalueStart := index\n\tvalueEnd := index\n\tfor _, c := range s[valueStart:] {\n\t\tif !validateValueChar(c) {\n\t\t\tbreak\n\t\t}\n\t\tvalueEnd++\n\t}\n\n\t// Skip all trailing whitespaces: \"   key    =    value<  >\".\n\tindex = skipSpace(s, valueEnd)\n\n\t// If after looking for the value and skipping whitespaces\n\t// we have not reached the end, it means the property is\n\t// invalid, something like: \"   key    =    value  value1\".\n\tif index != len(s) {\n\t\treturn p, ok\n\t}\n\n\t// Decode a percent-encoded value.\n\trawVal := s[valueStart:valueEnd]\n\tunescapeVal, err := url.PathUnescape(rawVal)\n\tif err != nil {\n\t\treturn p, ok\n\t}\n\tvalue := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal)\n\n\tok = true\n\tp.key = s[keyStart:keyEnd]\n\tp.hasValue = true\n\n\tp.value = value\n\treturn p, ok\n}\n\nfunc skipSpace(s string, offset int) int {\n\ti := offset\n\tfor ; i < len(s); i++ {\n\t\tc := s[i]\n\t\tif c != ' ' && c != '\\t' {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn i\n}\n\nvar safeKeyCharset = [utf8.RuneSelf]bool{\n\t// 0x23 to 0x27\n\t'#':  true,\n\t'$':  true,\n\t'%':  true,\n\t'&':  true,\n\t'\\'': true,\n\n\t// 0x30 to 0x39\n\t'0': true,\n\t'1': true,\n\t'2': true,\n\t'3': true,\n\t'4': true,\n\t'5': true,\n\t'6': true,\n\t'7': true,\n\t'8': true,\n\t'9': true,\n\n\t// 0x41 to 0x5a\n\t'A': true,\n\t'B': true,\n\t'C': true,\n\t'D': true,\n\t'E': true,\n\t'F': true,\n\t'G': true,\n\t'H': true,\n\t'I': true,\n\t'J': true,\n\t'K': true,\n\t'L': true,\n\t'M': true,\n\t'N': true,\n\t'O': true,\n\t'P': true,\n\t'Q': true,\n\t'R': true,\n\t'S': true,\n\t'T': true,\n\t'U': true,\n\t'V': true,\n\t'W': true,\n\t'X': true,\n\t'Y': true,\n\t'Z': true,\n\n\t// 0x5e to 0x7a\n\t'^': true,\n\t'_': true,\n\t'`': true,\n\t'a': true,\n\t'b': true,\n\t'c': true,\n\t'd': true,\n\t'e': true,\n\t'f': true,\n\t'g': true,\n\t'h': true,\n\t'i': true,\n\t'j': true,\n\t'k': true,\n\t'l': true,\n\t'm': true,\n\t'n': true,\n\t'o': true,\n\t'p': true,\n\t'q': true,\n\t'r': true,\n\t's': true,\n\t't': true,\n\t'u': true,\n\t'v': true,\n\t'w': true,\n\t'x': true,\n\t'y': true,\n\t'z': true,\n\n\t// remainder\n\t'!': true,\n\t'*': true,\n\t'+': true,\n\t'-': true,\n\t'.': true,\n\t'|': true,\n\t'~': true,\n}\n\n// validateBaggageName checks if the string is a valid OpenTelemetry Baggage name.\n// Baggage name is a valid, non-empty UTF-8 string.\nfunc validateBaggageName(s string) bool {\n\tif s == \"\" {\n\t\treturn false\n\t}\n\n\treturn utf8.ValidString(s)\n}\n\n// validateBaggageValue checks if the string is a valid OpenTelemetry Baggage value.\n// Baggage value is a valid UTF-8 strings.\n// Empty string is also a valid UTF-8 string.\nfunc validateBaggageValue(s string) bool {\n\treturn utf8.ValidString(s)\n}\n\n// validateKey checks if the string is a valid W3C Baggage key.\nfunc validateKey(s string) bool {\n\tif s == \"\" {\n\t\treturn false\n\t}\n\n\tfor _, c := range s {\n\t\tif !validateKeyChar(c) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc validateKeyChar(c int32) bool {\n\treturn c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c]\n}\n\n// validateValue checks if the string is a valid W3C Baggage value.\nfunc validateValue(s string) bool {\n\tfor _, c := range s {\n\t\tif !validateValueChar(c) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nvar safeValueCharset = [utf8.RuneSelf]bool{\n\t'!': true, // 0x21\n\n\t// 0x23 to 0x2b\n\t'#':  true,\n\t'$':  true,\n\t'%':  true,\n\t'&':  true,\n\t'\\'': true,\n\t'(':  true,\n\t')':  true,\n\t'*':  true,\n\t'+':  true,\n\n\t// 0x2d to 0x3a\n\t'-': true,\n\t'.': true,\n\t'/': true,\n\t'0': true,\n\t'1': true,\n\t'2': true,\n\t'3': true,\n\t'4': true,\n\t'5': true,\n\t'6': true,\n\t'7': true,\n\t'8': true,\n\t'9': true,\n\t':': true,\n\n\t// 0x3c to 0x5b\n\t'<': true, // 0x3C\n\t'=': true, // 0x3D\n\t'>': true, // 0x3E\n\t'?': true, // 0x3F\n\t'@': true, // 0x40\n\t'A': true, // 0x41\n\t'B': true, // 0x42\n\t'C': true, // 0x43\n\t'D': true, // 0x44\n\t'E': true, // 0x45\n\t'F': true, // 0x46\n\t'G': true, // 0x47\n\t'H': true, // 0x48\n\t'I': true, // 0x49\n\t'J': true, // 0x4A\n\t'K': true, // 0x4B\n\t'L': true, // 0x4C\n\t'M': true, // 0x4D\n\t'N': true, // 0x4E\n\t'O': true, // 0x4F\n\t'P': true, // 0x50\n\t'Q': true, // 0x51\n\t'R': true, // 0x52\n\t'S': true, // 0x53\n\t'T': true, // 0x54\n\t'U': true, // 0x55\n\t'V': true, // 0x56\n\t'W': true, // 0x57\n\t'X': true, // 0x58\n\t'Y': true, // 0x59\n\t'Z': true, // 0x5A\n\t'[': true, // 0x5B\n\n\t// 0x5d to 0x7e\n\t']': true, // 0x5D\n\t'^': true, // 0x5E\n\t'_': true, // 0x5F\n\t'`': true, // 0x60\n\t'a': true, // 0x61\n\t'b': true, // 0x62\n\t'c': true, // 0x63\n\t'd': true, // 0x64\n\t'e': true, // 0x65\n\t'f': true, // 0x66\n\t'g': true, // 0x67\n\t'h': true, // 0x68\n\t'i': true, // 0x69\n\t'j': true, // 0x6A\n\t'k': true, // 0x6B\n\t'l': true, // 0x6C\n\t'm': true, // 0x6D\n\t'n': true, // 0x6E\n\t'o': true, // 0x6F\n\t'p': true, // 0x70\n\t'q': true, // 0x71\n\t'r': true, // 0x72\n\t's': true, // 0x73\n\t't': true, // 0x74\n\t'u': true, // 0x75\n\t'v': true, // 0x76\n\t'w': true, // 0x77\n\t'x': true, // 0x78\n\t'y': true, // 0x79\n\t'z': true, // 0x7A\n\t'{': true, // 0x7B\n\t'|': true, // 0x7C\n\t'}': true, // 0x7D\n\t'~': true, // 0x7E\n}\n\nfunc validateValueChar(c int32) bool {\n\treturn c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c]\n}\n\n// valueEscape escapes the string so it can be safely placed inside a baggage value,\n// replacing special characters with %XX sequences as needed.\n//\n// The implementation is based on:\n// https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285.\nfunc valueEscape(s string) string {\n\thexCount := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tif shouldEscape(c) {\n\t\t\thexCount++\n\t\t}\n\t}\n\n\tif hexCount == 0 {\n\t\treturn s\n\t}\n\n\tvar buf [64]byte\n\tvar t []byte\n\n\trequired := len(s) + 2*hexCount\n\tif required <= len(buf) {\n\t\tt = buf[:required]\n\t} else {\n\t\tt = make([]byte, required)\n\t}\n\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tif shouldEscape(s[i]) {\n\t\t\tconst upperhex = \"0123456789ABCDEF\"\n\t\t\tt[j] = '%'\n\t\t\tt[j+1] = upperhex[c>>4]\n\t\t\tt[j+2] = upperhex[c&15]\n\t\t\tj += 3\n\t\t} else {\n\t\t\tt[j] = c\n\t\t\tj++\n\t\t}\n\t}\n\n\treturn string(t)\n}\n\n// shouldEscape returns true if the specified byte should be escaped when\n// appearing in a baggage value string.\nfunc shouldEscape(c byte) bool {\n\tif c == '%' {\n\t\t// The percent character must be encoded so that percent-encoding can work.\n\t\treturn true\n\t}\n\treturn !validateValueChar(int32(c))\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/baggage/context.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage baggage // import \"go.opentelemetry.io/otel/baggage\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/internal/baggage\"\n)\n\n// ContextWithBaggage returns a copy of parent with baggage.\nfunc ContextWithBaggage(parent context.Context, b Baggage) context.Context {\n\t// Delegate so any hooks for the OpenTracing bridge are handled.\n\treturn baggage.ContextWithList(parent, b.list)\n}\n\n// ContextWithoutBaggage returns a copy of parent with no baggage.\nfunc ContextWithoutBaggage(parent context.Context) context.Context {\n\t// Delegate so any hooks for the OpenTracing bridge are handled.\n\treturn baggage.ContextWithList(parent, nil)\n}\n\n// FromContext returns the baggage contained in ctx.\nfunc FromContext(ctx context.Context) Baggage {\n\t// Delegate so any hooks for the OpenTracing bridge are handled.\n\treturn Baggage{list: baggage.ListFromContext(ctx)}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/baggage/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage baggage provides functionality for storing and retrieving\nbaggage items in Go context. For propagating the baggage, see the\ngo.opentelemetry.io/otel/propagation package.\n*/\npackage baggage // import \"go.opentelemetry.io/otel/baggage\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/codes/README.md",
    "content": "# Codes\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/codes/codes.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage codes // import \"go.opentelemetry.io/otel/codes\"\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n)\n\nconst (\n\t// Unset is the default status code.\n\tUnset Code = 0\n\n\t// Error indicates the operation contains an error.\n\t//\n\t// NOTE: The error code in OTLP is 2.\n\t// The value of this enum is only relevant to the internals\n\t// of the Go SDK.\n\tError Code = 1\n\n\t// Ok indicates operation has been validated by an Application developers\n\t// or Operator to have completed successfully, or contain no error.\n\t//\n\t// NOTE: The Ok code in OTLP is 1.\n\t// The value of this enum is only relevant to the internals\n\t// of the Go SDK.\n\tOk Code = 2\n\n\tmaxCode = 3\n)\n\n// Code is an 32-bit representation of a status state.\ntype Code uint32\n\nvar codeToStr = map[Code]string{\n\tUnset: \"Unset\",\n\tError: \"Error\",\n\tOk:    \"Ok\",\n}\n\nvar strToCode = map[string]Code{\n\t`\"Unset\"`: Unset,\n\t`\"Error\"`: Error,\n\t`\"Ok\"`:    Ok,\n}\n\n// String returns the Code as a string.\nfunc (c Code) String() string {\n\treturn codeToStr[c]\n}\n\n// UnmarshalJSON unmarshals b into the Code.\n//\n// This is based on the functionality in the gRPC codes package:\n// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244\nfunc (c *Code) UnmarshalJSON(b []byte) error {\n\t// From json.Unmarshaler: By convention, to approximate the behavior of\n\t// Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte(\"null\")) as\n\t// a no-op.\n\tif string(b) == \"null\" {\n\t\treturn nil\n\t}\n\tif c == nil {\n\t\treturn errors.New(\"nil receiver passed to UnmarshalJSON\")\n\t}\n\n\tvar x any\n\tif err := json.Unmarshal(b, &x); err != nil {\n\t\treturn err\n\t}\n\tswitch x.(type) {\n\tcase string:\n\t\tif jc, ok := strToCode[string(b)]; ok {\n\t\t\t*c = jc\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"invalid code: %q\", string(b))\n\tcase float64:\n\t\tif ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {\n\t\t\tif ci >= maxCode {\n\t\t\t\treturn fmt.Errorf(\"invalid code: %q\", ci)\n\t\t\t}\n\n\t\t\t*c = Code(ci) // nolint: gosec  // Bit size of 32 check above.\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"invalid code: %q\", string(b))\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid code: %q\", string(b))\n\t}\n}\n\n// MarshalJSON returns c as the JSON encoding of c.\nfunc (c *Code) MarshalJSON() ([]byte, error) {\n\tif c == nil {\n\t\treturn []byte(\"null\"), nil\n\t}\n\tstr, ok := codeToStr[*c]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"invalid code: %d\", *c)\n\t}\n\treturn fmt.Appendf(nil, \"%q\", str), nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/codes/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage codes defines the canonical error codes used by OpenTelemetry.\n\nIt conforms to [the OpenTelemetry\nspecification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status).\n*/\npackage codes // import \"go.opentelemetry.io/otel/codes\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/dependencies.Dockerfile",
    "content": "# This is a renovate-friendly source of Docker images.\nFROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python\nFROM otel/weaver:v0.20.0@sha256:fa4f1c6954ecea78ab1a4e865bd6f5b4aaba80c1896f9f4a11e2c361d04e197e AS weaver\nFROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage otel provides global access to the OpenTelemetry API. The subpackages of\nthe otel package provide an implementation of the OpenTelemetry API.\n\nThe provided API is used to instrument code and measure data about that code's\nperformance and operation. The measured data, by default, is not processed or\ntransmitted anywhere. An implementation of the OpenTelemetry SDK, like the\ndefault SDK implementation (go.opentelemetry.io/otel/sdk), and associated\nexporters are used to process and transport this data.\n\nTo read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/.\n\nTo read more about tracing, see go.opentelemetry.io/otel/trace.\n\nTo read more about metrics, see go.opentelemetry.io/otel/metric.\n\nTo read more about logs, see go.opentelemetry.io/otel/log.\n\nTo read more about propagation, see go.opentelemetry.io/otel/propagation and\ngo.opentelemetry.io/otel/baggage.\n*/\npackage otel // import \"go.opentelemetry.io/otel\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/error_handler.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\n// ErrorHandler handles irremediable events.\ntype ErrorHandler interface {\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Handle handles any error deemed irremediable by an OpenTelemetry\n\t// component.\n\tHandle(error)\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n}\n\n// ErrorHandlerFunc is a convenience adapter to allow the use of a function\n// as an ErrorHandler.\ntype ErrorHandlerFunc func(error)\n\nvar _ ErrorHandler = ErrorHandlerFunc(nil)\n\n// Handle handles the irremediable error by calling the ErrorHandlerFunc itself.\nfunc (f ErrorHandlerFunc) Handle(err error) {\n\tf(err)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/handler.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\nimport (\n\t\"go.opentelemetry.io/otel/internal/global\"\n)\n\n// Compile-time check global.ErrDelegator implements ErrorHandler.\nvar _ ErrorHandler = (*global.ErrDelegator)(nil)\n\n// GetErrorHandler returns the global ErrorHandler instance.\n//\n// The default ErrorHandler instance returned will log all errors to STDERR\n// until an override ErrorHandler is set with SetErrorHandler. All\n// ErrorHandler returned prior to this will automatically forward errors to\n// the set instance instead of logging.\n//\n// Subsequent calls to SetErrorHandler after the first will not forward errors\n// to the new ErrorHandler for prior returned instances.\nfunc GetErrorHandler() ErrorHandler { return global.GetErrorHandler() }\n\n// SetErrorHandler sets the global ErrorHandler to h.\n//\n// The first time this is called all ErrorHandler previously returned from\n// GetErrorHandler will send errors to h instead of the default logging\n// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not\n// delegate errors to h.\nfunc SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) }\n\n// Handle is a convenience function for GetErrorHandler().Handle(err).\nfunc Handle(err error) { global.GetErrorHandler().Handle(err) }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage baggage provides base types and functionality to store and retrieve\nbaggage in Go context. This package exists because the OpenTracing bridge to\nOpenTelemetry needs to synchronize state whenever baggage for a context is\nmodified and that context contains an OpenTracing span. If it were not for\nthis need this package would not need to exist and the\n`go.opentelemetry.io/otel/baggage` package would be the singular place where\nW3C baggage is handled.\n*/\npackage baggage // import \"go.opentelemetry.io/otel/internal/baggage\"\n\n// List is the collection of baggage members. The W3C allows for duplicates,\n// but OpenTelemetry does not, therefore, this is represented as a map.\ntype List map[string]Item\n\n// Item is the value and metadata properties part of a list-member.\ntype Item struct {\n\tValue      string\n\tProperties []Property\n}\n\n// Property is a metadata entry for a list-member.\ntype Property struct {\n\tKey, Value string\n\n\t// HasValue indicates if a zero-value value means the property does not\n\t// have a value or if it was the zero-value.\n\tHasValue bool\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/baggage/context.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage baggage // import \"go.opentelemetry.io/otel/internal/baggage\"\n\nimport \"context\"\n\ntype baggageContextKeyType int\n\nconst baggageKey baggageContextKeyType = iota\n\n// SetHookFunc is a callback called when storing baggage in the context.\ntype SetHookFunc func(context.Context, List) context.Context\n\n// GetHookFunc is a callback called when getting baggage from the context.\ntype GetHookFunc func(context.Context, List) List\n\ntype baggageState struct {\n\tlist List\n\n\tsetHook SetHookFunc\n\tgetHook GetHookFunc\n}\n\n// ContextWithSetHook returns a copy of parent with hook configured to be\n// invoked every time ContextWithBaggage is called.\n//\n// Passing nil SetHookFunc creates a context with no set hook to call.\nfunc ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context {\n\tvar s baggageState\n\tif v, ok := parent.Value(baggageKey).(baggageState); ok {\n\t\ts = v\n\t}\n\n\ts.setHook = hook\n\treturn context.WithValue(parent, baggageKey, s)\n}\n\n// ContextWithGetHook returns a copy of parent with hook configured to be\n// invoked every time FromContext is called.\n//\n// Passing nil GetHookFunc creates a context with no get hook to call.\nfunc ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context {\n\tvar s baggageState\n\tif v, ok := parent.Value(baggageKey).(baggageState); ok {\n\t\ts = v\n\t}\n\n\ts.getHook = hook\n\treturn context.WithValue(parent, baggageKey, s)\n}\n\n// ContextWithList returns a copy of parent with baggage. Passing nil list\n// returns a context without any baggage.\nfunc ContextWithList(parent context.Context, list List) context.Context {\n\tvar s baggageState\n\tif v, ok := parent.Value(baggageKey).(baggageState); ok {\n\t\ts = v\n\t}\n\n\ts.list = list\n\tctx := context.WithValue(parent, baggageKey, s)\n\tif s.setHook != nil {\n\t\tctx = s.setHook(ctx, list)\n\t}\n\n\treturn ctx\n}\n\n// ListFromContext returns the baggage contained in ctx.\nfunc ListFromContext(ctx context.Context) List {\n\tswitch v := ctx.Value(baggageKey).(type) {\n\tcase baggageState:\n\t\tif v.getHook != nil {\n\t\t\treturn v.getHook(ctx, v.list)\n\t\t}\n\t\treturn v.list\n\tdefault:\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/handler.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package global provides the OpenTelemetry global API.\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"log\"\n\t\"sync/atomic\"\n)\n\n// ErrorHandler handles irremediable events.\ntype ErrorHandler interface {\n\t// Handle handles any error deemed irremediable by an OpenTelemetry\n\t// component.\n\tHandle(error)\n}\n\ntype ErrDelegator struct {\n\tdelegate atomic.Pointer[ErrorHandler]\n}\n\n// Compile-time check that delegator implements ErrorHandler.\nvar _ ErrorHandler = (*ErrDelegator)(nil)\n\nfunc (d *ErrDelegator) Handle(err error) {\n\tif eh := d.delegate.Load(); eh != nil {\n\t\t(*eh).Handle(err)\n\t\treturn\n\t}\n\tlog.Print(err)\n}\n\n// setDelegate sets the ErrorHandler delegate.\nfunc (d *ErrDelegator) setDelegate(eh ErrorHandler) {\n\td.delegate.Store(&eh)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/instruments.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"context\"\n\t\"sync/atomic\"\n\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// unwrapper unwraps to return the underlying instrument implementation.\ntype unwrapper interface {\n\tunwrap() metric.Observable\n}\n\ntype afCounter struct {\n\tembedded.Float64ObservableCounter\n\tmetric.Float64Observable\n\n\tname string\n\topts []metric.Float64ObservableCounterOption\n\n\tdelegate atomic.Value // metric.Float64ObservableCounter\n}\n\nvar (\n\t_ unwrapper                       = (*afCounter)(nil)\n\t_ metric.Float64ObservableCounter = (*afCounter)(nil)\n)\n\nfunc (i *afCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64ObservableCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *afCounter) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64ObservableCounter)\n\t}\n\treturn nil\n}\n\ntype afUpDownCounter struct {\n\tembedded.Float64ObservableUpDownCounter\n\tmetric.Float64Observable\n\n\tname string\n\topts []metric.Float64ObservableUpDownCounterOption\n\n\tdelegate atomic.Value // metric.Float64ObservableUpDownCounter\n}\n\nvar (\n\t_ unwrapper                             = (*afUpDownCounter)(nil)\n\t_ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)\n)\n\nfunc (i *afUpDownCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *afUpDownCounter) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64ObservableUpDownCounter)\n\t}\n\treturn nil\n}\n\ntype afGauge struct {\n\tembedded.Float64ObservableGauge\n\tmetric.Float64Observable\n\n\tname string\n\topts []metric.Float64ObservableGaugeOption\n\n\tdelegate atomic.Value // metric.Float64ObservableGauge\n}\n\nvar (\n\t_ unwrapper                     = (*afGauge)(nil)\n\t_ metric.Float64ObservableGauge = (*afGauge)(nil)\n)\n\nfunc (i *afGauge) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64ObservableGauge(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *afGauge) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64ObservableGauge)\n\t}\n\treturn nil\n}\n\ntype aiCounter struct {\n\tembedded.Int64ObservableCounter\n\tmetric.Int64Observable\n\n\tname string\n\topts []metric.Int64ObservableCounterOption\n\n\tdelegate atomic.Value // metric.Int64ObservableCounter\n}\n\nvar (\n\t_ unwrapper                     = (*aiCounter)(nil)\n\t_ metric.Int64ObservableCounter = (*aiCounter)(nil)\n)\n\nfunc (i *aiCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64ObservableCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *aiCounter) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64ObservableCounter)\n\t}\n\treturn nil\n}\n\ntype aiUpDownCounter struct {\n\tembedded.Int64ObservableUpDownCounter\n\tmetric.Int64Observable\n\n\tname string\n\topts []metric.Int64ObservableUpDownCounterOption\n\n\tdelegate atomic.Value // metric.Int64ObservableUpDownCounter\n}\n\nvar (\n\t_ unwrapper                           = (*aiUpDownCounter)(nil)\n\t_ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)\n)\n\nfunc (i *aiUpDownCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *aiUpDownCounter) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64ObservableUpDownCounter)\n\t}\n\treturn nil\n}\n\ntype aiGauge struct {\n\tembedded.Int64ObservableGauge\n\tmetric.Int64Observable\n\n\tname string\n\topts []metric.Int64ObservableGaugeOption\n\n\tdelegate atomic.Value // metric.Int64ObservableGauge\n}\n\nvar (\n\t_ unwrapper                   = (*aiGauge)(nil)\n\t_ metric.Int64ObservableGauge = (*aiGauge)(nil)\n)\n\nfunc (i *aiGauge) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64ObservableGauge(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *aiGauge) unwrap() metric.Observable {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64ObservableGauge)\n\t}\n\treturn nil\n}\n\n// Sync Instruments.\ntype sfCounter struct {\n\tembedded.Float64Counter\n\n\tname string\n\topts []metric.Float64CounterOption\n\n\tdelegate atomic.Value // metric.Float64Counter\n}\n\nvar _ metric.Float64Counter = (*sfCounter)(nil)\n\nfunc (i *sfCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64Counter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Float64Counter).Add(ctx, incr, opts...)\n\t}\n}\n\nfunc (i *sfCounter) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64Counter).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype sfUpDownCounter struct {\n\tembedded.Float64UpDownCounter\n\n\tname string\n\topts []metric.Float64UpDownCounterOption\n\n\tdelegate atomic.Value // metric.Float64UpDownCounter\n}\n\nvar _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil)\n\nfunc (i *sfUpDownCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64UpDownCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Float64UpDownCounter).Add(ctx, incr, opts...)\n\t}\n}\n\nfunc (i *sfUpDownCounter) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64UpDownCounter).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype sfHistogram struct {\n\tembedded.Float64Histogram\n\n\tname string\n\topts []metric.Float64HistogramOption\n\n\tdelegate atomic.Value // metric.Float64Histogram\n}\n\nvar _ metric.Float64Histogram = (*sfHistogram)(nil)\n\nfunc (i *sfHistogram) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64Histogram(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.RecordOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Float64Histogram).Record(ctx, x, opts...)\n\t}\n}\n\nfunc (i *sfHistogram) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64Histogram).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype sfGauge struct {\n\tembedded.Float64Gauge\n\n\tname string\n\topts []metric.Float64GaugeOption\n\n\tdelegate atomic.Value // metric.Float64Gauge\n}\n\nvar _ metric.Float64Gauge = (*sfGauge)(nil)\n\nfunc (i *sfGauge) setDelegate(m metric.Meter) {\n\tctr, err := m.Float64Gauge(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Float64Gauge).Record(ctx, x, opts...)\n\t}\n}\n\nfunc (i *sfGauge) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Float64Gauge).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype siCounter struct {\n\tembedded.Int64Counter\n\n\tname string\n\topts []metric.Int64CounterOption\n\n\tdelegate atomic.Value // metric.Int64Counter\n}\n\nvar _ metric.Int64Counter = (*siCounter)(nil)\n\nfunc (i *siCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64Counter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Int64Counter).Add(ctx, x, opts...)\n\t}\n}\n\nfunc (i *siCounter) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64Counter).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype siUpDownCounter struct {\n\tembedded.Int64UpDownCounter\n\n\tname string\n\topts []metric.Int64UpDownCounterOption\n\n\tdelegate atomic.Value // metric.Int64UpDownCounter\n}\n\nvar _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil)\n\nfunc (i *siUpDownCounter) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64UpDownCounter(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Int64UpDownCounter).Add(ctx, x, opts...)\n\t}\n}\n\nfunc (i *siUpDownCounter) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64UpDownCounter).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype siHistogram struct {\n\tembedded.Int64Histogram\n\n\tname string\n\topts []metric.Int64HistogramOption\n\n\tdelegate atomic.Value // metric.Int64Histogram\n}\n\nvar _ metric.Int64Histogram = (*siHistogram)(nil)\n\nfunc (i *siHistogram) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64Histogram(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.RecordOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Int64Histogram).Record(ctx, x, opts...)\n\t}\n}\n\nfunc (i *siHistogram) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64Histogram).Enabled(ctx)\n\t}\n\treturn false\n}\n\ntype siGauge struct {\n\tembedded.Int64Gauge\n\n\tname string\n\topts []metric.Int64GaugeOption\n\n\tdelegate atomic.Value // metric.Int64Gauge\n}\n\nvar _ metric.Int64Gauge = (*siGauge)(nil)\n\nfunc (i *siGauge) setDelegate(m metric.Meter) {\n\tctr, err := m.Int64Gauge(i.name, i.opts...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\ti.delegate.Store(ctr)\n}\n\nfunc (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\tctr.(metric.Int64Gauge).Record(ctx, x, opts...)\n\t}\n}\n\nfunc (i *siGauge) Enabled(ctx context.Context) bool {\n\tif ctr := i.delegate.Load(); ctr != nil {\n\t\treturn ctr.(metric.Int64Gauge).Enabled(ctx)\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"sync/atomic\"\n\n\t\"github.com/go-logr/logr\"\n\t\"github.com/go-logr/stdr\"\n)\n\n// globalLogger holds a reference to the [logr.Logger] used within\n// go.opentelemetry.io/otel.\n//\n// The default logger uses stdr which is backed by the standard `log.Logger`\n// interface. This logger will only show messages at the Error Level.\nvar globalLogger = func() *atomic.Pointer[logr.Logger] {\n\tl := stdr.New(log.New(os.Stderr, \"\", log.LstdFlags|log.Lshortfile))\n\n\tp := new(atomic.Pointer[logr.Logger])\n\tp.Store(&l)\n\treturn p\n}()\n\n// SetLogger sets the global Logger to l.\n//\n// To see Warn messages use a logger with `l.V(1).Enabled() == true`\n// To see Info messages use a logger with `l.V(4).Enabled() == true`\n// To see Debug messages use a logger with `l.V(8).Enabled() == true`.\nfunc SetLogger(l logr.Logger) {\n\tglobalLogger.Store(&l)\n}\n\n// GetLogger returns the global logger.\nfunc GetLogger() logr.Logger {\n\treturn *globalLogger.Load()\n}\n\n// Info prints messages about the general state of the API or SDK.\n// This should usually be less than 5 messages a minute.\nfunc Info(msg string, keysAndValues ...any) {\n\tGetLogger().V(4).Info(msg, keysAndValues...)\n}\n\n// Error prints messages about exceptional states of the API or SDK.\nfunc Error(err error, msg string, keysAndValues ...any) {\n\tGetLogger().Error(err, msg, keysAndValues...)\n}\n\n// Debug prints messages about all internal changes in the API or SDK.\nfunc Debug(msg string, keysAndValues ...any) {\n\tGetLogger().V(8).Info(msg, keysAndValues...)\n}\n\n// Warn prints messages about warnings in the API or SDK.\n// Not an error but is likely more important than an informational event.\nfunc Warn(msg string, keysAndValues ...any) {\n\tGetLogger().V(1).Info(msg, keysAndValues...)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/meter.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"container/list\"\n\t\"context\"\n\t\"reflect\"\n\t\"sync\"\n\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// meterProvider is a placeholder for a configured SDK MeterProvider.\n//\n// All MeterProvider functionality is forwarded to a delegate once\n// configured.\ntype meterProvider struct {\n\tembedded.MeterProvider\n\n\tmtx    sync.Mutex\n\tmeters map[il]*meter\n\n\tdelegate metric.MeterProvider\n}\n\n// setDelegate configures p to delegate all MeterProvider functionality to\n// provider.\n//\n// All Meters provided prior to this function call are switched out to be\n// Meters provided by provider. All instruments and callbacks are recreated and\n// delegated.\n//\n// It is guaranteed by the caller that this happens only once.\nfunc (p *meterProvider) setDelegate(provider metric.MeterProvider) {\n\tp.mtx.Lock()\n\tdefer p.mtx.Unlock()\n\n\tp.delegate = provider\n\n\tif len(p.meters) == 0 {\n\t\treturn\n\t}\n\n\tfor _, meter := range p.meters {\n\t\tmeter.setDelegate(provider)\n\t}\n\n\tp.meters = nil\n}\n\n// Meter implements MeterProvider.\nfunc (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter {\n\tp.mtx.Lock()\n\tdefer p.mtx.Unlock()\n\n\tif p.delegate != nil {\n\t\treturn p.delegate.Meter(name, opts...)\n\t}\n\n\t// At this moment it is guaranteed that no sdk is installed, save the meter in the meters map.\n\n\tc := metric.NewMeterConfig(opts...)\n\tkey := il{\n\t\tname:    name,\n\t\tversion: c.InstrumentationVersion(),\n\t\tschema:  c.SchemaURL(),\n\t\tattrs:   c.InstrumentationAttributes(),\n\t}\n\n\tif p.meters == nil {\n\t\tp.meters = make(map[il]*meter)\n\t}\n\n\tif val, ok := p.meters[key]; ok {\n\t\treturn val\n\t}\n\n\tt := &meter{name: name, opts: opts, instruments: make(map[instID]delegatedInstrument)}\n\tp.meters[key] = t\n\treturn t\n}\n\n// meter is a placeholder for a metric.Meter.\n//\n// All Meter functionality is forwarded to a delegate once configured.\n// Otherwise, all functionality is forwarded to a NoopMeter.\ntype meter struct {\n\tembedded.Meter\n\n\tname string\n\topts []metric.MeterOption\n\n\tmtx         sync.Mutex\n\tinstruments map[instID]delegatedInstrument\n\n\tregistry list.List\n\n\tdelegate metric.Meter\n}\n\ntype delegatedInstrument interface {\n\tsetDelegate(metric.Meter)\n}\n\n// instID are the identifying properties of an instrument.\ntype instID struct {\n\t// name is the name of the stream.\n\tname string\n\t// description is the description of the stream.\n\tdescription string\n\t// kind defines the functional group of the instrument.\n\tkind reflect.Type\n\t// unit is the unit of the stream.\n\tunit string\n}\n\n// setDelegate configures m to delegate all Meter functionality to Meters\n// created by provider.\n//\n// All subsequent calls to the Meter methods will be passed to the delegate.\n//\n// It is guaranteed by the caller that this happens only once.\nfunc (m *meter) setDelegate(provider metric.MeterProvider) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tmeter := provider.Meter(m.name, m.opts...)\n\tm.delegate = meter\n\n\tfor _, inst := range m.instruments {\n\t\tinst.setDelegate(meter)\n\t}\n\n\tvar n *list.Element\n\tfor e := m.registry.Front(); e != nil; e = n {\n\t\tr := e.Value.(*registration)\n\t\tr.setDelegate(meter)\n\t\tn = e.Next()\n\t\tm.registry.Remove(e)\n\t}\n\n\tm.instruments = nil\n\tm.registry.Init()\n}\n\nfunc (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) (metric.Int64Counter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64Counter(name, options...)\n\t}\n\n\tcfg := metric.NewInt64CounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*siCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64Counter), nil\n\t}\n\ti := &siCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64UpDownCounter(\n\tname string,\n\toptions ...metric.Int64UpDownCounterOption,\n) (metric.Int64UpDownCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64UpDownCounter(name, options...)\n\t}\n\n\tcfg := metric.NewInt64UpDownCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*siUpDownCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64UpDownCounter), nil\n\t}\n\ti := &siUpDownCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64Histogram(name, options...)\n\t}\n\n\tcfg := metric.NewInt64HistogramConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*siHistogram](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64Histogram), nil\n\t}\n\ti := &siHistogram{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64Gauge(name, options...)\n\t}\n\n\tcfg := metric.NewInt64GaugeConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*siGauge](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64Gauge), nil\n\t}\n\ti := &siGauge{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64ObservableCounter(\n\tname string,\n\toptions ...metric.Int64ObservableCounterOption,\n) (metric.Int64ObservableCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64ObservableCounter(name, options...)\n\t}\n\n\tcfg := metric.NewInt64ObservableCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*aiCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64ObservableCounter), nil\n\t}\n\ti := &aiCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64ObservableUpDownCounter(\n\tname string,\n\toptions ...metric.Int64ObservableUpDownCounterOption,\n) (metric.Int64ObservableUpDownCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64ObservableUpDownCounter(name, options...)\n\t}\n\n\tcfg := metric.NewInt64ObservableUpDownCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*aiUpDownCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64ObservableUpDownCounter), nil\n\t}\n\ti := &aiUpDownCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Int64ObservableGauge(\n\tname string,\n\toptions ...metric.Int64ObservableGaugeOption,\n) (metric.Int64ObservableGauge, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Int64ObservableGauge(name, options...)\n\t}\n\n\tcfg := metric.NewInt64ObservableGaugeConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*aiGauge](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Int64ObservableGauge), nil\n\t}\n\ti := &aiGauge{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64Counter(name string, options ...metric.Float64CounterOption) (metric.Float64Counter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64Counter(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64CounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*sfCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64Counter), nil\n\t}\n\ti := &sfCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64UpDownCounter(\n\tname string,\n\toptions ...metric.Float64UpDownCounterOption,\n) (metric.Float64UpDownCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64UpDownCounter(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64UpDownCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*sfUpDownCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64UpDownCounter), nil\n\t}\n\ti := &sfUpDownCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64Histogram(\n\tname string,\n\toptions ...metric.Float64HistogramOption,\n) (metric.Float64Histogram, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64Histogram(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64HistogramConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*sfHistogram](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64Histogram), nil\n\t}\n\ti := &sfHistogram{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64Gauge(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64GaugeConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*sfGauge](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64Gauge), nil\n\t}\n\ti := &sfGauge{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64ObservableCounter(\n\tname string,\n\toptions ...metric.Float64ObservableCounterOption,\n) (metric.Float64ObservableCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64ObservableCounter(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64ObservableCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*afCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64ObservableCounter), nil\n\t}\n\ti := &afCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64ObservableUpDownCounter(\n\tname string,\n\toptions ...metric.Float64ObservableUpDownCounterOption,\n) (metric.Float64ObservableUpDownCounter, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64ObservableUpDownCounter(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64ObservableUpDownCounterConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*afUpDownCounter](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64ObservableUpDownCounter), nil\n\t}\n\ti := &afUpDownCounter{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\nfunc (m *meter) Float64ObservableGauge(\n\tname string,\n\toptions ...metric.Float64ObservableGaugeOption,\n) (metric.Float64ObservableGauge, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.Float64ObservableGauge(name, options...)\n\t}\n\n\tcfg := metric.NewFloat64ObservableGaugeConfig(options...)\n\tid := instID{\n\t\tname:        name,\n\t\tkind:        reflect.TypeFor[*afGauge](),\n\t\tdescription: cfg.Description(),\n\t\tunit:        cfg.Unit(),\n\t}\n\tif f, ok := m.instruments[id]; ok {\n\t\treturn f.(metric.Float64ObservableGauge), nil\n\t}\n\ti := &afGauge{name: name, opts: options}\n\tm.instruments[id] = i\n\treturn i, nil\n}\n\n// RegisterCallback captures the function that will be called during Collect.\nfunc (m *meter) RegisterCallback(f metric.Callback, insts ...metric.Observable) (metric.Registration, error) {\n\tm.mtx.Lock()\n\tdefer m.mtx.Unlock()\n\n\tif m.delegate != nil {\n\t\treturn m.delegate.RegisterCallback(unwrapCallback(f), unwrapInstruments(insts)...)\n\t}\n\n\treg := &registration{instruments: insts, function: f}\n\te := m.registry.PushBack(reg)\n\treg.unreg = func() error {\n\t\tm.mtx.Lock()\n\t\t_ = m.registry.Remove(e)\n\t\tm.mtx.Unlock()\n\t\treturn nil\n\t}\n\treturn reg, nil\n}\n\nfunc unwrapInstruments(instruments []metric.Observable) []metric.Observable {\n\tout := make([]metric.Observable, 0, len(instruments))\n\n\tfor _, inst := range instruments {\n\t\tif in, ok := inst.(unwrapper); ok {\n\t\t\tout = append(out, in.unwrap())\n\t\t} else {\n\t\t\tout = append(out, inst)\n\t\t}\n\t}\n\n\treturn out\n}\n\ntype registration struct {\n\tembedded.Registration\n\n\tinstruments []metric.Observable\n\tfunction    metric.Callback\n\n\tunreg   func() error\n\tunregMu sync.Mutex\n}\n\ntype unwrapObs struct {\n\tembedded.Observer\n\tobs metric.Observer\n}\n\n// unwrapFloat64Observable returns an expected metric.Float64Observable after\n// unwrapping the global object.\nfunc unwrapFloat64Observable(inst metric.Float64Observable) metric.Float64Observable {\n\tif unwrapped, ok := inst.(unwrapper); ok {\n\t\tif floatObs, ok := unwrapped.unwrap().(metric.Float64Observable); ok {\n\t\t\t// Note: if the unwrapped object does not\n\t\t\t// unwrap as an observable for either of the\n\t\t\t// predicates here, it means an internal bug in\n\t\t\t// this package.  We avoid logging an error in\n\t\t\t// this case, because the SDK has to try its\n\t\t\t// own type conversion on the object.  The SDK\n\t\t\t// will see this and be forced to respond with\n\t\t\t// its own error.\n\t\t\t//\n\t\t\t// This code uses a double-nested if statement\n\t\t\t// to avoid creating a branch that is\n\t\t\t// impossible to cover.\n\t\t\tinst = floatObs\n\t\t}\n\t}\n\treturn inst\n}\n\n// unwrapInt64Observable returns an expected metric.Int64Observable after\n// unwrapping the global object.\nfunc unwrapInt64Observable(inst metric.Int64Observable) metric.Int64Observable {\n\tif unwrapped, ok := inst.(unwrapper); ok {\n\t\tif unint, ok := unwrapped.unwrap().(metric.Int64Observable); ok {\n\t\t\t// See the comment in unwrapFloat64Observable().\n\t\t\tinst = unint\n\t\t}\n\t}\n\treturn inst\n}\n\nfunc (uo *unwrapObs) ObserveFloat64(inst metric.Float64Observable, value float64, opts ...metric.ObserveOption) {\n\tuo.obs.ObserveFloat64(unwrapFloat64Observable(inst), value, opts...)\n}\n\nfunc (uo *unwrapObs) ObserveInt64(inst metric.Int64Observable, value int64, opts ...metric.ObserveOption) {\n\tuo.obs.ObserveInt64(unwrapInt64Observable(inst), value, opts...)\n}\n\nfunc unwrapCallback(f metric.Callback) metric.Callback {\n\treturn func(ctx context.Context, obs metric.Observer) error {\n\t\treturn f(ctx, &unwrapObs{obs: obs})\n\t}\n}\n\nfunc (c *registration) setDelegate(m metric.Meter) {\n\tc.unregMu.Lock()\n\tdefer c.unregMu.Unlock()\n\n\tif c.unreg == nil {\n\t\t// Unregister already called.\n\t\treturn\n\t}\n\n\treg, err := m.RegisterCallback(unwrapCallback(c.function), unwrapInstruments(c.instruments)...)\n\tif err != nil {\n\t\tGetErrorHandler().Handle(err)\n\t\treturn\n\t}\n\n\tc.unreg = reg.Unregister\n}\n\nfunc (c *registration) Unregister() error {\n\tc.unregMu.Lock()\n\tdefer c.unregMu.Unlock()\n\tif c.unreg == nil {\n\t\t// Unregister already called.\n\t\treturn nil\n\t}\n\n\tvar err error\n\terr, c.unreg = c.unreg(), nil\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/propagator.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\t\"go.opentelemetry.io/otel/propagation\"\n)\n\n// textMapPropagator is a default TextMapPropagator that delegates calls to a\n// registered delegate if one is set, otherwise it defaults to delegating the\n// calls to a the default no-op propagation.TextMapPropagator.\ntype textMapPropagator struct {\n\tmtx      sync.Mutex\n\tonce     sync.Once\n\tdelegate propagation.TextMapPropagator\n\tnoop     propagation.TextMapPropagator\n}\n\n// Compile-time guarantee that textMapPropagator implements the\n// propagation.TextMapPropagator interface.\nvar _ propagation.TextMapPropagator = (*textMapPropagator)(nil)\n\nfunc newTextMapPropagator() *textMapPropagator {\n\treturn &textMapPropagator{\n\t\tnoop: propagation.NewCompositeTextMapPropagator(),\n\t}\n}\n\n// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are\n// forwarded to. Delegation can only be performed once, all subsequent calls\n// perform no delegation.\nfunc (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) {\n\tif delegate == nil {\n\t\treturn\n\t}\n\n\tp.mtx.Lock()\n\tp.once.Do(func() { p.delegate = delegate })\n\tp.mtx.Unlock()\n}\n\n// effectiveDelegate returns the current delegate of p if one is set,\n// otherwise the default noop TextMapPropagator is returned. This method\n// can be called concurrently.\nfunc (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator {\n\tp.mtx.Lock()\n\tdefer p.mtx.Unlock()\n\tif p.delegate != nil {\n\t\treturn p.delegate\n\t}\n\treturn p.noop\n}\n\n// Inject set cross-cutting concerns from the Context into the carrier.\nfunc (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) {\n\tp.effectiveDelegate().Inject(ctx, carrier)\n}\n\n// Extract reads cross-cutting concerns from the carrier into a Context.\nfunc (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context {\n\treturn p.effectiveDelegate().Extract(ctx, carrier)\n}\n\n// Fields returns the keys whose values are set with Inject.\nfunc (p *textMapPropagator) Fields() []string {\n\treturn p.effectiveDelegate().Fields()\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/state.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\nimport (\n\t\"errors\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/propagation\"\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\ntype (\n\terrorHandlerHolder struct {\n\t\teh ErrorHandler\n\t}\n\n\ttracerProviderHolder struct {\n\t\ttp trace.TracerProvider\n\t}\n\n\tpropagatorsHolder struct {\n\t\ttm propagation.TextMapPropagator\n\t}\n\n\tmeterProviderHolder struct {\n\t\tmp metric.MeterProvider\n\t}\n)\n\nvar (\n\tglobalErrorHandler  = defaultErrorHandler()\n\tglobalTracer        = defaultTracerValue()\n\tglobalPropagators   = defaultPropagatorsValue()\n\tglobalMeterProvider = defaultMeterProvider()\n\n\tdelegateErrorHandlerOnce      sync.Once\n\tdelegateTraceOnce             sync.Once\n\tdelegateTextMapPropagatorOnce sync.Once\n\tdelegateMeterOnce             sync.Once\n)\n\n// GetErrorHandler returns the global ErrorHandler instance.\n//\n// The default ErrorHandler instance returned will log all errors to STDERR\n// until an override ErrorHandler is set with SetErrorHandler. All\n// ErrorHandler returned prior to this will automatically forward errors to\n// the set instance instead of logging.\n//\n// Subsequent calls to SetErrorHandler after the first will not forward errors\n// to the new ErrorHandler for prior returned instances.\nfunc GetErrorHandler() ErrorHandler {\n\treturn globalErrorHandler.Load().(errorHandlerHolder).eh\n}\n\n// SetErrorHandler sets the global ErrorHandler to h.\n//\n// The first time this is called all ErrorHandler previously returned from\n// GetErrorHandler will send errors to h instead of the default logging\n// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not\n// delegate errors to h.\nfunc SetErrorHandler(h ErrorHandler) {\n\tcurrent := GetErrorHandler()\n\n\tif _, cOk := current.(*ErrDelegator); cOk {\n\t\tif _, ehOk := h.(*ErrDelegator); ehOk && current == h {\n\t\t\t// Do not assign to the delegate of the default ErrDelegator to be\n\t\t\t// itself.\n\t\t\tError(\n\t\t\t\terrors.New(\"no ErrorHandler delegate configured\"),\n\t\t\t\t\"ErrorHandler remains its current value.\",\n\t\t\t)\n\t\t\treturn\n\t\t}\n\t}\n\n\tdelegateErrorHandlerOnce.Do(func() {\n\t\tif def, ok := current.(*ErrDelegator); ok {\n\t\t\tdef.setDelegate(h)\n\t\t}\n\t})\n\tglobalErrorHandler.Store(errorHandlerHolder{eh: h})\n}\n\n// TracerProvider is the internal implementation for global.TracerProvider.\nfunc TracerProvider() trace.TracerProvider {\n\treturn globalTracer.Load().(tracerProviderHolder).tp\n}\n\n// SetTracerProvider is the internal implementation for global.SetTracerProvider.\nfunc SetTracerProvider(tp trace.TracerProvider) {\n\tcurrent := TracerProvider()\n\n\tif _, cOk := current.(*tracerProvider); cOk {\n\t\tif _, tpOk := tp.(*tracerProvider); tpOk && current == tp {\n\t\t\t// Do not assign the default delegating TracerProvider to delegate\n\t\t\t// to itself.\n\t\t\tError(\n\t\t\t\terrors.New(\"no delegate configured in tracer provider\"),\n\t\t\t\t\"Setting tracer provider to its current value. No delegate will be configured\",\n\t\t\t)\n\t\t\treturn\n\t\t}\n\t}\n\n\tdelegateTraceOnce.Do(func() {\n\t\tif def, ok := current.(*tracerProvider); ok {\n\t\t\tdef.setDelegate(tp)\n\t\t}\n\t})\n\tglobalTracer.Store(tracerProviderHolder{tp: tp})\n}\n\n// TextMapPropagator is the internal implementation for global.TextMapPropagator.\nfunc TextMapPropagator() propagation.TextMapPropagator {\n\treturn globalPropagators.Load().(propagatorsHolder).tm\n}\n\n// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator.\nfunc SetTextMapPropagator(p propagation.TextMapPropagator) {\n\tcurrent := TextMapPropagator()\n\n\tif _, cOk := current.(*textMapPropagator); cOk {\n\t\tif _, pOk := p.(*textMapPropagator); pOk && current == p {\n\t\t\t// Do not assign the default delegating TextMapPropagator to\n\t\t\t// delegate to itself.\n\t\t\tError(\n\t\t\t\terrors.New(\"no delegate configured in text map propagator\"),\n\t\t\t\t\"Setting text map propagator to its current value. No delegate will be configured\",\n\t\t\t)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// For the textMapPropagator already returned by TextMapPropagator\n\t// delegate to p.\n\tdelegateTextMapPropagatorOnce.Do(func() {\n\t\tif def, ok := current.(*textMapPropagator); ok {\n\t\t\tdef.SetDelegate(p)\n\t\t}\n\t})\n\t// Return p when subsequent calls to TextMapPropagator are made.\n\tglobalPropagators.Store(propagatorsHolder{tm: p})\n}\n\n// MeterProvider is the internal implementation for global.MeterProvider.\nfunc MeterProvider() metric.MeterProvider {\n\treturn globalMeterProvider.Load().(meterProviderHolder).mp\n}\n\n// SetMeterProvider is the internal implementation for global.SetMeterProvider.\nfunc SetMeterProvider(mp metric.MeterProvider) {\n\tcurrent := MeterProvider()\n\tif _, cOk := current.(*meterProvider); cOk {\n\t\tif _, mpOk := mp.(*meterProvider); mpOk && current == mp {\n\t\t\t// Do not assign the default delegating MeterProvider to delegate\n\t\t\t// to itself.\n\t\t\tError(\n\t\t\t\terrors.New(\"no delegate configured in meter provider\"),\n\t\t\t\t\"Setting meter provider to its current value. No delegate will be configured\",\n\t\t\t)\n\t\t\treturn\n\t\t}\n\t}\n\n\tdelegateMeterOnce.Do(func() {\n\t\tif def, ok := current.(*meterProvider); ok {\n\t\t\tdef.setDelegate(mp)\n\t\t}\n\t})\n\tglobalMeterProvider.Store(meterProviderHolder{mp: mp})\n}\n\nfunc defaultErrorHandler() *atomic.Value {\n\tv := &atomic.Value{}\n\tv.Store(errorHandlerHolder{eh: &ErrDelegator{}})\n\treturn v\n}\n\nfunc defaultTracerValue() *atomic.Value {\n\tv := &atomic.Value{}\n\tv.Store(tracerProviderHolder{tp: &tracerProvider{}})\n\treturn v\n}\n\nfunc defaultPropagatorsValue() *atomic.Value {\n\tv := &atomic.Value{}\n\tv.Store(propagatorsHolder{tm: newTextMapPropagator()})\n\treturn v\n}\n\nfunc defaultMeterProvider() *atomic.Value {\n\tv := &atomic.Value{}\n\tv.Store(meterProviderHolder{mp: &meterProvider{}})\n\treturn v\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal/global/trace.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage global // import \"go.opentelemetry.io/otel/internal/global\"\n\n/*\nThis file contains the forwarding implementation of the TracerProvider used as\nthe default global instance. Prior to initialization of an SDK, Tracers\nreturned by the global TracerProvider will provide no-op functionality. This\nmeans that all Span created prior to initialization are no-op Spans.\n\nOnce an SDK has been initialized, all provided no-op Tracers are swapped for\nTracers provided by the SDK defined TracerProvider. However, any Span started\nprior to this initialization does not change its behavior. Meaning, the Span\nremains a no-op Span.\n\nThe implementation to track and swap Tracers locks all new Tracer creation\nuntil the swap is complete. This assumes that this operation is not\nperformance-critical. If that assumption is incorrect, be sure to configure an\nSDK prior to any Tracer creation.\n*/\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"go.opentelemetry.io/auto/sdk\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n)\n\n// tracerProvider is a placeholder for a configured SDK TracerProvider.\n//\n// All TracerProvider functionality is forwarded to a delegate once\n// configured.\ntype tracerProvider struct {\n\tembedded.TracerProvider\n\n\tmtx      sync.Mutex\n\ttracers  map[il]*tracer\n\tdelegate trace.TracerProvider\n}\n\n// Compile-time guarantee that tracerProvider implements the TracerProvider\n// interface.\nvar _ trace.TracerProvider = &tracerProvider{}\n\n// setDelegate configures p to delegate all TracerProvider functionality to\n// provider.\n//\n// All Tracers provided prior to this function call are switched out to be\n// Tracers provided by provider.\n//\n// It is guaranteed by the caller that this happens only once.\nfunc (p *tracerProvider) setDelegate(provider trace.TracerProvider) {\n\tp.mtx.Lock()\n\tdefer p.mtx.Unlock()\n\n\tp.delegate = provider\n\n\tif len(p.tracers) == 0 {\n\t\treturn\n\t}\n\n\tfor _, t := range p.tracers {\n\t\tt.setDelegate(provider)\n\t}\n\n\tp.tracers = nil\n}\n\n// Tracer implements TracerProvider.\nfunc (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {\n\tp.mtx.Lock()\n\tdefer p.mtx.Unlock()\n\n\tif p.delegate != nil {\n\t\treturn p.delegate.Tracer(name, opts...)\n\t}\n\n\t// At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map.\n\n\tc := trace.NewTracerConfig(opts...)\n\tkey := il{\n\t\tname:    name,\n\t\tversion: c.InstrumentationVersion(),\n\t\tschema:  c.SchemaURL(),\n\t\tattrs:   c.InstrumentationAttributes(),\n\t}\n\n\tif p.tracers == nil {\n\t\tp.tracers = make(map[il]*tracer)\n\t}\n\n\tif val, ok := p.tracers[key]; ok {\n\t\treturn val\n\t}\n\n\tt := &tracer{name: name, opts: opts, provider: p}\n\tp.tracers[key] = t\n\treturn t\n}\n\ntype il struct {\n\tname    string\n\tversion string\n\tschema  string\n\tattrs   attribute.Set\n}\n\n// tracer is a placeholder for a trace.Tracer.\n//\n// All Tracer functionality is forwarded to a delegate once configured.\n// Otherwise, all functionality is forwarded to a NoopTracer.\ntype tracer struct {\n\tembedded.Tracer\n\n\tname     string\n\topts     []trace.TracerOption\n\tprovider *tracerProvider\n\n\tdelegate atomic.Value\n}\n\n// Compile-time guarantee that tracer implements the trace.Tracer interface.\nvar _ trace.Tracer = &tracer{}\n\n// setDelegate configures t to delegate all Tracer functionality to Tracers\n// created by provider.\n//\n// All subsequent calls to the Tracer methods will be passed to the delegate.\n//\n// It is guaranteed by the caller that this happens only once.\nfunc (t *tracer) setDelegate(provider trace.TracerProvider) {\n\tt.delegate.Store(provider.Tracer(t.name, t.opts...))\n}\n\n// Start implements trace.Tracer by forwarding the call to t.delegate if\n// set, otherwise it forwards the call to a NoopTracer.\nfunc (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {\n\tdelegate := t.delegate.Load()\n\tif delegate != nil {\n\t\treturn delegate.(trace.Tracer).Start(ctx, name, opts...)\n\t}\n\n\treturn t.newSpan(ctx, autoInstEnabled, name, opts)\n}\n\n// autoInstEnabled determines if the auto-instrumentation SDK span is returned\n// from the tracer when not backed by a delegate and auto-instrumentation has\n// attached to this process.\n//\n// The auto-instrumentation is expected to overwrite this value to true when it\n// attaches. By default, this will point to false and mean a tracer will return\n// a nonRecordingSpan by default.\nvar autoInstEnabled = new(bool)\n\n// newSpan is called by tracer.Start so auto-instrumentation can attach an eBPF\n// uprobe to this code.\n//\n// \"noinline\" pragma prevents the method from ever being inlined.\n//\n//go:noinline\nfunc (t *tracer) newSpan(\n\tctx context.Context,\n\tautoSpan *bool,\n\tname string,\n\topts []trace.SpanStartOption,\n) (context.Context, trace.Span) {\n\t// autoInstEnabled is passed to newSpan via the autoSpan parameter. This is\n\t// so the auto-instrumentation can define a uprobe for (*t).newSpan and be\n\t// provided with the address of the bool autoInstEnabled points to. It\n\t// needs to be a parameter so that pointer can be reliably determined, it\n\t// should not be read from the global.\n\n\tif *autoSpan {\n\t\ttracer := sdk.TracerProvider().Tracer(t.name, t.opts...)\n\t\treturn tracer.Start(ctx, name, opts...)\n\t}\n\n\ts := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t}\n\tctx = trace.ContextWithSpan(ctx, s)\n\treturn ctx, s\n}\n\n// nonRecordingSpan is a minimal implementation of a Span that wraps a\n// SpanContext. It performs no operations other than to return the wrapped\n// SpanContext.\ntype nonRecordingSpan struct {\n\tembedded.Span\n\n\tsc     trace.SpanContext\n\ttracer *tracer\n}\n\nvar _ trace.Span = nonRecordingSpan{}\n\n// SpanContext returns the wrapped SpanContext.\nfunc (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc }\n\n// IsRecording always returns false.\nfunc (nonRecordingSpan) IsRecording() bool { return false }\n\n// SetStatus does nothing.\nfunc (nonRecordingSpan) SetStatus(codes.Code, string) {}\n\n// SetError does nothing.\nfunc (nonRecordingSpan) SetError(bool) {}\n\n// SetAttributes does nothing.\nfunc (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {}\n\n// End does nothing.\nfunc (nonRecordingSpan) End(...trace.SpanEndOption) {}\n\n// RecordError does nothing.\nfunc (nonRecordingSpan) RecordError(error, ...trace.EventOption) {}\n\n// AddEvent does nothing.\nfunc (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {}\n\n// AddLink does nothing.\nfunc (nonRecordingSpan) AddLink(trace.Link) {}\n\n// SetName does nothing.\nfunc (nonRecordingSpan) SetName(string) {}\n\nfunc (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/internal_logging.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\nimport (\n\t\"github.com/go-logr/logr\"\n\n\t\"go.opentelemetry.io/otel/internal/global\"\n)\n\n// SetLogger configures the logger used internally to opentelemetry.\nfunc SetLogger(logger logr.Logger) {\n\tglobal.SetLogger(logger)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/LICENSE",
    "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\n--------------------------------------------------------------------------------\n\nCopyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/README.md",
    "content": "# Metric API\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric)](https://pkg.go.dev/go.opentelemetry.io/otel/metric)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// Float64Observable describes a set of instruments used asynchronously to\n// record float64 measurements once per collection cycle. Observations of\n// these instruments are only made within a callback.\n//\n// Warning: Methods may be added to this interface in minor releases.\ntype Float64Observable interface {\n\tObservable\n\n\tfloat64Observable()\n}\n\n// Float64ObservableCounter is an instrument used to asynchronously record\n// increasing float64 measurements once per collection cycle. Observations are\n// only made within a callback for this instrument. The value observed is\n// assumed the to be the cumulative sum of the count.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for\n// unimplemented methods.\ntype Float64ObservableCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64ObservableCounter\n\n\tFloat64Observable\n}\n\n// Float64ObservableCounterConfig contains options for asynchronous counter\n// instruments that record float64 values.\ntype Float64ObservableCounterConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Float64Callback\n}\n\n// NewFloat64ObservableCounterConfig returns a new\n// [Float64ObservableCounterConfig] with all opts applied.\nfunc NewFloat64ObservableCounterConfig(opts ...Float64ObservableCounterOption) Float64ObservableCounterConfig {\n\tvar config Float64ObservableCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64ObservableCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64ObservableCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64ObservableCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Float64ObservableCounterConfig) Callbacks() []Float64Callback {\n\treturn c.callbacks\n}\n\n// Float64ObservableCounterOption applies options to a\n// [Float64ObservableCounterConfig]. See [Float64ObservableOption] and\n// [InstrumentOption] for other options that can be used as a\n// Float64ObservableCounterOption.\ntype Float64ObservableCounterOption interface {\n\tapplyFloat64ObservableCounter(Float64ObservableCounterConfig) Float64ObservableCounterConfig\n}\n\n// Float64ObservableUpDownCounter is an instrument used to asynchronously\n// record float64 measurements once per collection cycle. Observations are only\n// made within a callback for this instrument. The value observed is assumed\n// the to be the cumulative sum of the count.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64ObservableUpDownCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64ObservableUpDownCounter\n\n\tFloat64Observable\n}\n\n// Float64ObservableUpDownCounterConfig contains options for asynchronous\n// counter instruments that record float64 values.\ntype Float64ObservableUpDownCounterConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Float64Callback\n}\n\n// NewFloat64ObservableUpDownCounterConfig returns a new\n// [Float64ObservableUpDownCounterConfig] with all opts applied.\nfunc NewFloat64ObservableUpDownCounterConfig(\n\topts ...Float64ObservableUpDownCounterOption,\n) Float64ObservableUpDownCounterConfig {\n\tvar config Float64ObservableUpDownCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64ObservableUpDownCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64ObservableUpDownCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64ObservableUpDownCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Float64ObservableUpDownCounterConfig) Callbacks() []Float64Callback {\n\treturn c.callbacks\n}\n\n// Float64ObservableUpDownCounterOption applies options to a\n// [Float64ObservableUpDownCounterConfig]. See [Float64ObservableOption] and\n// [InstrumentOption] for other options that can be used as a\n// Float64ObservableUpDownCounterOption.\ntype Float64ObservableUpDownCounterOption interface {\n\tapplyFloat64ObservableUpDownCounter(Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig\n}\n\n// Float64ObservableGauge is an instrument used to asynchronously record\n// instantaneous float64 measurements once per collection cycle. Observations\n// are only made within a callback for this instrument.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64ObservableGauge interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64ObservableGauge\n\n\tFloat64Observable\n}\n\n// Float64ObservableGaugeConfig contains options for asynchronous counter\n// instruments that record float64 values.\ntype Float64ObservableGaugeConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Float64Callback\n}\n\n// NewFloat64ObservableGaugeConfig returns a new [Float64ObservableGaugeConfig]\n// with all opts applied.\nfunc NewFloat64ObservableGaugeConfig(opts ...Float64ObservableGaugeOption) Float64ObservableGaugeConfig {\n\tvar config Float64ObservableGaugeConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64ObservableGauge(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64ObservableGaugeConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64ObservableGaugeConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Float64ObservableGaugeConfig) Callbacks() []Float64Callback {\n\treturn c.callbacks\n}\n\n// Float64ObservableGaugeOption applies options to a\n// [Float64ObservableGaugeConfig]. See [Float64ObservableOption] and\n// [InstrumentOption] for other options that can be used as a\n// Float64ObservableGaugeOption.\ntype Float64ObservableGaugeOption interface {\n\tapplyFloat64ObservableGauge(Float64ObservableGaugeConfig) Float64ObservableGaugeConfig\n}\n\n// Float64Observer is a recorder of float64 measurements.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64Observer interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64Observer\n\n\t// Observe records the float64 value.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tObserve(value float64, options ...ObserveOption)\n}\n\n// Float64Callback is a function registered with a Meter that makes\n// observations for a Float64Observable instrument it is registered with.\n// Calls to the Float64Observer record measurement values for the\n// Float64Observable.\n//\n// The function needs to complete in a finite amount of time and the deadline\n// of the passed context is expected to be honored.\n//\n// The function needs to make unique observations across all registered\n// Float64Callbacks. Meaning, it should not report measurements with the same\n// attributes as another Float64Callbacks also registered for the same\n// instrument.\n//\n// The function needs to be reentrant and concurrent safe.\n//\n// Note that Go's mutexes are not reentrant, and locking a mutex takes\n// an indefinite amount of time. It is therefore advised to avoid\n// using mutexes inside callbacks.\ntype Float64Callback func(context.Context, Float64Observer) error\n\n// Float64ObservableOption applies options to float64 Observer instruments.\ntype Float64ObservableOption interface {\n\tFloat64ObservableCounterOption\n\tFloat64ObservableUpDownCounterOption\n\tFloat64ObservableGaugeOption\n}\n\ntype float64CallbackOpt struct {\n\tcback Float64Callback\n}\n\nfunc (o float64CallbackOpt) applyFloat64ObservableCounter(\n\tcfg Float64ObservableCounterConfig,\n) Float64ObservableCounterConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\nfunc (o float64CallbackOpt) applyFloat64ObservableUpDownCounter(\n\tcfg Float64ObservableUpDownCounterConfig,\n) Float64ObservableUpDownCounterConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\nfunc (o float64CallbackOpt) applyFloat64ObservableGauge(cfg Float64ObservableGaugeConfig) Float64ObservableGaugeConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\n// WithFloat64Callback adds callback to be called for an instrument.\nfunc WithFloat64Callback(callback Float64Callback) Float64ObservableOption {\n\treturn float64CallbackOpt{callback}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/asyncint64.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// Int64Observable describes a set of instruments used asynchronously to record\n// int64 measurements once per collection cycle. Observations of these\n// instruments are only made within a callback.\n//\n// Warning: Methods may be added to this interface in minor releases.\ntype Int64Observable interface {\n\tObservable\n\n\tint64Observable()\n}\n\n// Int64ObservableCounter is an instrument used to asynchronously record\n// increasing int64 measurements once per collection cycle. Observations are\n// only made within a callback for this instrument. The value observed is\n// assumed the to be the cumulative sum of the count.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64ObservableCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64ObservableCounter\n\n\tInt64Observable\n}\n\n// Int64ObservableCounterConfig contains options for asynchronous counter\n// instruments that record int64 values.\ntype Int64ObservableCounterConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Int64Callback\n}\n\n// NewInt64ObservableCounterConfig returns a new [Int64ObservableCounterConfig]\n// with all opts applied.\nfunc NewInt64ObservableCounterConfig(opts ...Int64ObservableCounterOption) Int64ObservableCounterConfig {\n\tvar config Int64ObservableCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64ObservableCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64ObservableCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64ObservableCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Int64ObservableCounterConfig) Callbacks() []Int64Callback {\n\treturn c.callbacks\n}\n\n// Int64ObservableCounterOption applies options to a\n// [Int64ObservableCounterConfig]. See [Int64ObservableOption] and\n// [InstrumentOption] for other options that can be used as an\n// Int64ObservableCounterOption.\ntype Int64ObservableCounterOption interface {\n\tapplyInt64ObservableCounter(Int64ObservableCounterConfig) Int64ObservableCounterConfig\n}\n\n// Int64ObservableUpDownCounter is an instrument used to asynchronously record\n// int64 measurements once per collection cycle. Observations are only made\n// within a callback for this instrument. The value observed is assumed the to\n// be the cumulative sum of the count.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64ObservableUpDownCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64ObservableUpDownCounter\n\n\tInt64Observable\n}\n\n// Int64ObservableUpDownCounterConfig contains options for asynchronous counter\n// instruments that record int64 values.\ntype Int64ObservableUpDownCounterConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Int64Callback\n}\n\n// NewInt64ObservableUpDownCounterConfig returns a new\n// [Int64ObservableUpDownCounterConfig] with all opts applied.\nfunc NewInt64ObservableUpDownCounterConfig(\n\topts ...Int64ObservableUpDownCounterOption,\n) Int64ObservableUpDownCounterConfig {\n\tvar config Int64ObservableUpDownCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64ObservableUpDownCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64ObservableUpDownCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64ObservableUpDownCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Int64ObservableUpDownCounterConfig) Callbacks() []Int64Callback {\n\treturn c.callbacks\n}\n\n// Int64ObservableUpDownCounterOption applies options to a\n// [Int64ObservableUpDownCounterConfig]. See [Int64ObservableOption] and\n// [InstrumentOption] for other options that can be used as an\n// Int64ObservableUpDownCounterOption.\ntype Int64ObservableUpDownCounterOption interface {\n\tapplyInt64ObservableUpDownCounter(Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig\n}\n\n// Int64ObservableGauge is an instrument used to asynchronously record\n// instantaneous int64 measurements once per collection cycle. Observations are\n// only made within a callback for this instrument.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64ObservableGauge interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64ObservableGauge\n\n\tInt64Observable\n}\n\n// Int64ObservableGaugeConfig contains options for asynchronous counter\n// instruments that record int64 values.\ntype Int64ObservableGaugeConfig struct {\n\tdescription string\n\tunit        string\n\tcallbacks   []Int64Callback\n}\n\n// NewInt64ObservableGaugeConfig returns a new [Int64ObservableGaugeConfig]\n// with all opts applied.\nfunc NewInt64ObservableGaugeConfig(opts ...Int64ObservableGaugeOption) Int64ObservableGaugeConfig {\n\tvar config Int64ObservableGaugeConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64ObservableGauge(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64ObservableGaugeConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64ObservableGaugeConfig) Unit() string {\n\treturn c.unit\n}\n\n// Callbacks returns the configured callbacks.\nfunc (c Int64ObservableGaugeConfig) Callbacks() []Int64Callback {\n\treturn c.callbacks\n}\n\n// Int64ObservableGaugeOption applies options to a\n// [Int64ObservableGaugeConfig]. See [Int64ObservableOption] and\n// [InstrumentOption] for other options that can be used as an\n// Int64ObservableGaugeOption.\ntype Int64ObservableGaugeOption interface {\n\tapplyInt64ObservableGauge(Int64ObservableGaugeConfig) Int64ObservableGaugeConfig\n}\n\n// Int64Observer is a recorder of int64 measurements.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64Observer interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64Observer\n\n\t// Observe records the int64 value.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tObserve(value int64, options ...ObserveOption)\n}\n\n// Int64Callback is a function registered with a Meter that makes observations\n// for an Int64Observable instrument it is registered with. Calls to the\n// Int64Observer record measurement values for the Int64Observable.\n//\n// The function needs to complete in a finite amount of time and the deadline\n// of the passed context is expected to be honored.\n//\n// The function needs to make unique observations across all registered\n// Int64Callbacks. Meaning, it should not report measurements with the same\n// attributes as another Int64Callbacks also registered for the same\n// instrument.\n//\n// The function needs to be reentrant and concurrent safe.\n//\n// Note that Go's mutexes are not reentrant, and locking a mutex takes\n// an indefinite amount of time. It is therefore advised to avoid\n// using mutexes inside callbacks.\ntype Int64Callback func(context.Context, Int64Observer) error\n\n// Int64ObservableOption applies options to int64 Observer instruments.\ntype Int64ObservableOption interface {\n\tInt64ObservableCounterOption\n\tInt64ObservableUpDownCounterOption\n\tInt64ObservableGaugeOption\n}\n\ntype int64CallbackOpt struct {\n\tcback Int64Callback\n}\n\nfunc (o int64CallbackOpt) applyInt64ObservableCounter(cfg Int64ObservableCounterConfig) Int64ObservableCounterConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\nfunc (o int64CallbackOpt) applyInt64ObservableUpDownCounter(\n\tcfg Int64ObservableUpDownCounterConfig,\n) Int64ObservableUpDownCounterConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\nfunc (o int64CallbackOpt) applyInt64ObservableGauge(cfg Int64ObservableGaugeConfig) Int64ObservableGaugeConfig {\n\tcfg.callbacks = append(cfg.callbacks, o.cback)\n\treturn cfg\n}\n\n// WithInt64Callback adds callback to be called for an instrument.\nfunc WithInt64Callback(callback Int64Callback) Int64ObservableOption {\n\treturn int64CallbackOpt{callback}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/config.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"slices\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n)\n\n// MeterConfig contains options for Meters.\ntype MeterConfig struct {\n\tinstrumentationVersion string\n\tschemaURL              string\n\tattrs                  attribute.Set\n\n\t// Ensure forward compatibility by explicitly making this not comparable.\n\tnoCmp [0]func() //nolint: unused  // This is indeed used.\n}\n\n// InstrumentationVersion returns the version of the library providing\n// instrumentation.\nfunc (cfg MeterConfig) InstrumentationVersion() string {\n\treturn cfg.instrumentationVersion\n}\n\n// InstrumentationAttributes returns the attributes associated with the library\n// providing instrumentation.\nfunc (cfg MeterConfig) InstrumentationAttributes() attribute.Set {\n\treturn cfg.attrs\n}\n\n// SchemaURL is the schema_url of the library providing instrumentation.\nfunc (cfg MeterConfig) SchemaURL() string {\n\treturn cfg.schemaURL\n}\n\n// MeterOption is an interface for applying Meter options.\ntype MeterOption interface {\n\t// applyMeter is used to set a MeterOption value of a MeterConfig.\n\tapplyMeter(MeterConfig) MeterConfig\n}\n\n// NewMeterConfig creates a new MeterConfig and applies\n// all the given options.\nfunc NewMeterConfig(opts ...MeterOption) MeterConfig {\n\tvar config MeterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyMeter(config)\n\t}\n\treturn config\n}\n\ntype meterOptionFunc func(MeterConfig) MeterConfig\n\nfunc (fn meterOptionFunc) applyMeter(cfg MeterConfig) MeterConfig {\n\treturn fn(cfg)\n}\n\n// WithInstrumentationVersion sets the instrumentation version.\nfunc WithInstrumentationVersion(version string) MeterOption {\n\treturn meterOptionFunc(func(config MeterConfig) MeterConfig {\n\t\tconfig.instrumentationVersion = version\n\t\treturn config\n\t})\n}\n\n// WithInstrumentationAttributes adds the instrumentation attributes.\n//\n// This is equivalent to calling [WithInstrumentationAttributeSet] with an\n// [attribute.Set] created from a clone of the passed attributes.\n// [WithInstrumentationAttributeSet] is recommended for more control.\n//\n// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet]\n// options are passed, the attributes will be merged together in the order\n// they are passed. Attributes with duplicate keys will use the last value passed.\nfunc WithInstrumentationAttributes(attr ...attribute.KeyValue) MeterOption {\n\tset := attribute.NewSet(slices.Clone(attr)...)\n\treturn WithInstrumentationAttributeSet(set)\n}\n\n// WithInstrumentationAttributeSet adds the instrumentation attributes.\n//\n// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet]\n// options are passed, the attributes will be merged together in the order\n// they are passed. Attributes with duplicate keys will use the last value passed.\nfunc WithInstrumentationAttributeSet(set attribute.Set) MeterOption {\n\tif set.Len() == 0 {\n\t\treturn meterOptionFunc(func(config MeterConfig) MeterConfig {\n\t\t\treturn config\n\t\t})\n\t}\n\n\treturn meterOptionFunc(func(config MeterConfig) MeterConfig {\n\t\tif config.attrs.Len() == 0 {\n\t\t\tconfig.attrs = set\n\t\t} else {\n\t\t\tconfig.attrs = mergeSets(config.attrs, set)\n\t\t}\n\t\treturn config\n\t})\n}\n\n// WithSchemaURL sets the schema URL.\nfunc WithSchemaURL(schemaURL string) MeterOption {\n\treturn meterOptionFunc(func(config MeterConfig) MeterConfig {\n\t\tconfig.schemaURL = schemaURL\n\t\treturn config\n\t})\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage metric provides the OpenTelemetry API used to measure metrics about\nsource code operation.\n\nThis API is separate from its implementation so the instrumentation built from\nit is reusable. See [go.opentelemetry.io/otel/sdk/metric] for the official\nOpenTelemetry implementation of this API.\n\nAll measurements made with this package are made via instruments. These\ninstruments are created by a [Meter] which itself is created by a\n[MeterProvider]. Applications need to accept a [MeterProvider] implementation\nas a starting point when instrumenting. This can be done directly, or by using\nthe OpenTelemetry global MeterProvider via [GetMeterProvider]. Using an\nappropriately named [Meter] from the accepted [MeterProvider], instrumentation\ncan then be built from the [Meter]'s instruments.\n\n# Instruments\n\nEach instrument is designed to make measurements of a particular type. Broadly,\nall instruments fall into two overlapping logical categories: asynchronous or\nsynchronous, and int64 or float64.\n\nAll synchronous instruments ([Int64Counter], [Int64UpDownCounter],\n[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and\n[Float64Histogram]) are used to measure the operation and performance of source\ncode during the source code execution. These instruments only make measurements\nwhen the source code they instrument is run.\n\nAll asynchronous instruments ([Int64ObservableCounter],\n[Int64ObservableUpDownCounter], [Int64ObservableGauge],\n[Float64ObservableCounter], [Float64ObservableUpDownCounter], and\n[Float64ObservableGauge]) are used to measure metrics outside of the execution\nof source code. They are said to make \"observations\" via a callback function\ncalled once every measurement collection cycle.\n\nEach instrument is also grouped by the value type it measures. Either int64 or\nfloat64. The value being measured will dictate which instrument in these\ncategories to use.\n\nOutside of these two broad categories, instruments are described by the\nfunction they are designed to serve. All Counters ([Int64Counter],\n[Float64Counter], [Int64ObservableCounter], and [Float64ObservableCounter]) are\ndesigned to measure values that never decrease in value, but instead only\nincrementally increase in value. UpDownCounters ([Int64UpDownCounter],\n[Float64UpDownCounter], [Int64ObservableUpDownCounter], and\n[Float64ObservableUpDownCounter]) on the other hand, are designed to measure\nvalues that can increase and decrease. When more information needs to be\nconveyed about all the synchronous measurements made during a collection cycle,\na Histogram ([Int64Histogram] and [Float64Histogram]) should be used. Finally,\nwhen just the most recent measurement needs to be conveyed about an\nasynchronous measurement, a Gauge ([Int64ObservableGauge] and\n[Float64ObservableGauge]) should be used.\n\nSee the [OpenTelemetry documentation] for more information about instruments\nand their intended use.\n\n# Instrument Name\n\nOpenTelemetry defines an [instrument name syntax] that restricts what\ninstrument names are allowed.\n\nInstrument names should ...\n\n  - Not be empty.\n  - Have an alphabetic character as their first letter.\n  - Have any letter after the first be an alphanumeric character, ‘_’, ‘.’,\n    ‘-’, or ‘/’.\n  - Have a maximum length of 255 letters.\n\nTo ensure compatibility with observability platforms, all instruments created\nneed to conform to this syntax. Not all implementations of the API will validate\nthese names, it is the callers responsibility to ensure compliance.\n\n# Measurements\n\nMeasurements are made by recording values and information about the values with\nan instrument. How these measurements are recorded depends on the instrument.\n\nMeasurements for synchronous instruments ([Int64Counter], [Int64UpDownCounter],\n[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and\n[Float64Histogram]) are recorded using the instrument methods directly. All\ncounter instruments have an Add method that is used to measure an increment\nvalue, and all histogram instruments have a Record method to measure a data\npoint.\n\nAsynchronous instruments ([Int64ObservableCounter],\n[Int64ObservableUpDownCounter], [Int64ObservableGauge],\n[Float64ObservableCounter], [Float64ObservableUpDownCounter], and\n[Float64ObservableGauge]) record measurements within a callback function. The\ncallback is registered with the Meter which ensures the callback is called once\nper collection cycle. A callback can be registered two ways: during the\ninstrument's creation using an option, or later using the RegisterCallback\nmethod of the [Meter] that created the instrument.\n\nIf the following criteria are met, an option ([WithInt64Callback] or\n[WithFloat64Callback]) can be used during the asynchronous instrument's\ncreation to register a callback ([Int64Callback] or [Float64Callback],\nrespectively):\n\n  - The measurement process is known when the instrument is created\n  - Only that instrument will make a measurement within the callback\n  - The callback never needs to be unregistered\n\nIf the criteria are not met, use the RegisterCallback method of the [Meter] that\ncreated the instrument to register a [Callback].\n\n# API Implementations\n\nThis package does not conform to the standard Go versioning policy, all of its\ninterfaces may have methods added to them without a package major version bump.\nThis non-standard API evolution could surprise an uninformed implementation\nauthor. They could unknowingly build their implementation in a way that would\nresult in a runtime panic for their users that update to the new API.\n\nThe API is designed to help inform an instrumentation author about this\nnon-standard API evolution. It requires them to choose a default behavior for\nunimplemented interface methods. There are three behavior choices they can\nmake:\n\n  - Compilation failure\n  - Panic\n  - Default to another implementation\n\nAll interfaces in this API embed a corresponding interface from\n[go.opentelemetry.io/otel/metric/embedded]. If an author wants the default\nbehavior of their implementations to be a compilation failure, signaling to\ntheir users they need to update to the latest version of that implementation,\nthey need to embed the corresponding interface from\n[go.opentelemetry.io/otel/metric/embedded] in their implementation. For\nexample,\n\n\timport \"go.opentelemetry.io/otel/metric/embedded\"\n\n\ttype MeterProvider struct {\n\t\tembedded.MeterProvider\n\t\t// ...\n\t}\n\nIf an author wants the default behavior of their implementations to a panic,\nthey need to embed the API interface directly.\n\n\timport \"go.opentelemetry.io/otel/metric\"\n\n\ttype MeterProvider struct {\n\t\tmetric.MeterProvider\n\t\t// ...\n\t}\n\nThis is not a recommended behavior as it could lead to publishing packages that\ncontain runtime panics when users update other package that use newer versions\nof [go.opentelemetry.io/otel/metric].\n\nFinally, an author can embed another implementation in theirs. The embedded\nimplementation will be used for methods not defined by the author. For example,\nan author who wants to default to silently dropping the call can use\n[go.opentelemetry.io/otel/metric/noop]:\n\n\timport \"go.opentelemetry.io/otel/metric/noop\"\n\n\ttype MeterProvider struct {\n\t\tnoop.MeterProvider\n\t\t// ...\n\t}\n\nIt is strongly recommended that authors only embed\n[go.opentelemetry.io/otel/metric/noop] if they choose this default behavior.\nThat implementation is the only one OpenTelemetry authors can guarantee will\nfully implement all the API interfaces when a user updates their API.\n\n[instrument name syntax]: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-name-syntax\n[OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/\n[GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider\n*/\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/embedded/README.md",
    "content": "# Metric Embedded\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/embedded)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package embedded provides interfaces embedded within the [OpenTelemetry\n// metric API].\n//\n// Implementers of the [OpenTelemetry metric API] can embed the relevant type\n// from this package into their implementation directly. Doing so will result\n// in a compilation error for users when the [OpenTelemetry metric API] is\n// extended (which is something that can happen without a major version bump of\n// the API package).\n//\n// [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric\npackage embedded // import \"go.opentelemetry.io/otel/metric/embedded\"\n\n// MeterProvider is embedded in\n// [go.opentelemetry.io/otel/metric.MeterProvider].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.MeterProvider] if you want users to\n// experience a compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.MeterProvider]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype MeterProvider interface{ meterProvider() }\n\n// Meter is embedded in [go.opentelemetry.io/otel/metric.Meter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Meter] if you want users to experience a\n// compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.Meter] interface\n// is extended (which is something that can happen without a major version bump\n// of the API package).\ntype Meter interface{ meter() }\n\n// Float64Observer is embedded in\n// [go.opentelemetry.io/otel/metric.Float64Observer].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64Observer] if you want\n// users to experience a compilation error, signaling they need to update to\n// your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64Observer] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Float64Observer interface{ float64Observer() }\n\n// Int64Observer is embedded in\n// [go.opentelemetry.io/otel/metric.Int64Observer].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64Observer] if you want users\n// to experience a compilation error, signaling they need to update to your\n// latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64Observer] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Int64Observer interface{ int64Observer() }\n\n// Observer is embedded in [go.opentelemetry.io/otel/metric.Observer].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Observer] if you want users to experience a\n// compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.Observer]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Observer interface{ observer() }\n\n// Registration is embedded in [go.opentelemetry.io/otel/metric.Registration].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Registration] if you want users to\n// experience a compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.Registration]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Registration interface{ registration() }\n\n// Float64Counter is embedded in\n// [go.opentelemetry.io/otel/metric.Float64Counter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64Counter] if you want\n// users to experience a compilation error, signaling they need to update to\n// your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64Counter] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Float64Counter interface{ float64Counter() }\n\n// Float64Histogram is embedded in\n// [go.opentelemetry.io/otel/metric.Float64Histogram].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64Histogram] if you want\n// users to experience a compilation error, signaling they need to update to\n// your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64Histogram] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Float64Histogram interface{ float64Histogram() }\n\n// Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to\n// experience a compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Float64Gauge interface{ float64Gauge() }\n\n// Float64ObservableCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Float64ObservableCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64ObservableCounter] if you\n// want users to experience a compilation error, signaling they need to update\n// to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64ObservableCounter]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Float64ObservableCounter interface{ float64ObservableCounter() }\n\n// Float64ObservableGauge is embedded in\n// [go.opentelemetry.io/otel/metric.Float64ObservableGauge].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64ObservableGauge] if you\n// want users to experience a compilation error, signaling they need to update\n// to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64ObservableGauge]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Float64ObservableGauge interface{ float64ObservableGauge() }\n\n// Float64ObservableUpDownCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]\n// if you want users to experience a compilation error, signaling they need to\n// update to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Float64ObservableUpDownCounter interface{ float64ObservableUpDownCounter() }\n\n// Float64UpDownCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Float64UpDownCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] if you\n// want users to experience a compilation error, signaling they need to update\n// to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] interface\n// is extended (which is something that can happen without a major version bump\n// of the API package).\ntype Float64UpDownCounter interface{ float64UpDownCounter() }\n\n// Int64Counter is embedded in\n// [go.opentelemetry.io/otel/metric.Int64Counter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64Counter] if you want users\n// to experience a compilation error, signaling they need to update to your\n// latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64Counter] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Int64Counter interface{ int64Counter() }\n\n// Int64Histogram is embedded in\n// [go.opentelemetry.io/otel/metric.Int64Histogram].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64Histogram] if you want\n// users to experience a compilation error, signaling they need to update to\n// your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64Histogram] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Int64Histogram interface{ int64Histogram() }\n\n// Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience\n// a compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Int64Gauge interface{ int64Gauge() }\n\n// Int64ObservableCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Int64ObservableCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64ObservableCounter] if you\n// want users to experience a compilation error, signaling they need to update\n// to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64ObservableCounter]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Int64ObservableCounter interface{ int64ObservableCounter() }\n\n// Int64ObservableGauge is embedded in\n// [go.opentelemetry.io/otel/metric.Int64ObservableGauge].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] if you\n// want users to experience a compilation error, signaling they need to update\n// to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] interface\n// is extended (which is something that can happen without a major version bump\n// of the API package).\ntype Int64ObservableGauge interface{ int64ObservableGauge() }\n\n// Int64ObservableUpDownCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] if\n// you want users to experience a compilation error, signaling they need to\n// update to your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype Int64ObservableUpDownCounter interface{ int64ObservableUpDownCounter() }\n\n// Int64UpDownCounter is embedded in\n// [go.opentelemetry.io/otel/metric.Int64UpDownCounter].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] if you want\n// users to experience a compilation error, signaling they need to update to\n// your latest implementation, when the\n// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Int64UpDownCounter interface{ int64UpDownCounter() }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/instrument.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport \"go.opentelemetry.io/otel/attribute\"\n\n// Observable is used as a grouping mechanism for all instruments that are\n// updated within a Callback.\ntype Observable interface {\n\tobservable()\n}\n\n// InstrumentOption applies options to all instruments.\ntype InstrumentOption interface {\n\tInt64CounterOption\n\tInt64UpDownCounterOption\n\tInt64HistogramOption\n\tInt64GaugeOption\n\tInt64ObservableCounterOption\n\tInt64ObservableUpDownCounterOption\n\tInt64ObservableGaugeOption\n\n\tFloat64CounterOption\n\tFloat64UpDownCounterOption\n\tFloat64HistogramOption\n\tFloat64GaugeOption\n\tFloat64ObservableCounterOption\n\tFloat64ObservableUpDownCounterOption\n\tFloat64ObservableGaugeOption\n}\n\n// HistogramOption applies options to histogram instruments.\ntype HistogramOption interface {\n\tInt64HistogramOption\n\tFloat64HistogramOption\n}\n\ntype descOpt string\n\nfunc (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64ObservableUpDownCounter(\n\tc Float64ObservableUpDownCounterConfig,\n) Float64ObservableUpDownCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64ObservableUpDownCounter(\n\tc Int64ObservableUpDownCounterConfig,\n) Int64ObservableUpDownCounterConfig {\n\tc.description = string(o)\n\treturn c\n}\n\nfunc (o descOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig {\n\tc.description = string(o)\n\treturn c\n}\n\n// WithDescription sets the instrument description.\nfunc WithDescription(desc string) InstrumentOption { return descOpt(desc) }\n\ntype unitOpt string\n\nfunc (o unitOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64ObservableUpDownCounter(\n\tc Float64ObservableUpDownCounterConfig,\n) Float64ObservableUpDownCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64ObservableUpDownCounter(\n\tc Int64ObservableUpDownCounterConfig,\n) Int64ObservableUpDownCounterConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\nfunc (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig {\n\tc.unit = string(o)\n\treturn c\n}\n\n// WithUnit sets the instrument unit.\n//\n// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code.\nfunc WithUnit(u string) InstrumentOption { return unitOpt(u) }\n\n// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries.\n//\n// This option is considered \"advisory\", and may be ignored by API implementations.\nfunc WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) }\n\ntype bucketOpt []float64\n\nfunc (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig {\n\tc.explicitBucketBoundaries = o\n\treturn c\n}\n\nfunc (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig {\n\tc.explicitBucketBoundaries = o\n\treturn c\n}\n\n// AddOption applies options to an addition measurement. See\n// [MeasurementOption] for other options that can be used as an AddOption.\ntype AddOption interface {\n\tapplyAdd(AddConfig) AddConfig\n}\n\n// AddConfig contains options for an addition measurement.\ntype AddConfig struct {\n\tattrs attribute.Set\n}\n\n// NewAddConfig returns a new [AddConfig] with all opts applied.\nfunc NewAddConfig(opts []AddOption) AddConfig {\n\tconfig := AddConfig{attrs: *attribute.EmptySet()}\n\tfor _, o := range opts {\n\t\tconfig = o.applyAdd(config)\n\t}\n\treturn config\n}\n\n// Attributes returns the configured attribute set.\nfunc (c AddConfig) Attributes() attribute.Set {\n\treturn c.attrs\n}\n\n// RecordOption applies options to an addition measurement. See\n// [MeasurementOption] for other options that can be used as a RecordOption.\ntype RecordOption interface {\n\tapplyRecord(RecordConfig) RecordConfig\n}\n\n// RecordConfig contains options for a recorded measurement.\ntype RecordConfig struct {\n\tattrs attribute.Set\n}\n\n// NewRecordConfig returns a new [RecordConfig] with all opts applied.\nfunc NewRecordConfig(opts []RecordOption) RecordConfig {\n\tconfig := RecordConfig{attrs: *attribute.EmptySet()}\n\tfor _, o := range opts {\n\t\tconfig = o.applyRecord(config)\n\t}\n\treturn config\n}\n\n// Attributes returns the configured attribute set.\nfunc (c RecordConfig) Attributes() attribute.Set {\n\treturn c.attrs\n}\n\n// ObserveOption applies options to an addition measurement. See\n// [MeasurementOption] for other options that can be used as a ObserveOption.\ntype ObserveOption interface {\n\tapplyObserve(ObserveConfig) ObserveConfig\n}\n\n// ObserveConfig contains options for an observed measurement.\ntype ObserveConfig struct {\n\tattrs attribute.Set\n}\n\n// NewObserveConfig returns a new [ObserveConfig] with all opts applied.\nfunc NewObserveConfig(opts []ObserveOption) ObserveConfig {\n\tconfig := ObserveConfig{attrs: *attribute.EmptySet()}\n\tfor _, o := range opts {\n\t\tconfig = o.applyObserve(config)\n\t}\n\treturn config\n}\n\n// Attributes returns the configured attribute set.\nfunc (c ObserveConfig) Attributes() attribute.Set {\n\treturn c.attrs\n}\n\n// MeasurementOption applies options to all instrument measurement.\ntype MeasurementOption interface {\n\tAddOption\n\tRecordOption\n\tObserveOption\n}\n\ntype attrOpt struct {\n\tset attribute.Set\n}\n\n// mergeSets returns the union of keys between a and b. Any duplicate keys will\n// use the value associated with b.\nfunc mergeSets(a, b attribute.Set) attribute.Set {\n\t// NewMergeIterator uses the first value for any duplicates.\n\titer := attribute.NewMergeIterator(&b, &a)\n\tmerged := make([]attribute.KeyValue, 0, a.Len()+b.Len())\n\tfor iter.Next() {\n\t\tmerged = append(merged, iter.Attribute())\n\t}\n\treturn attribute.NewSet(merged...)\n}\n\nfunc (o attrOpt) applyAdd(c AddConfig) AddConfig {\n\tswitch {\n\tcase o.set.Len() == 0:\n\tcase c.attrs.Len() == 0:\n\t\tc.attrs = o.set\n\tdefault:\n\t\tc.attrs = mergeSets(c.attrs, o.set)\n\t}\n\treturn c\n}\n\nfunc (o attrOpt) applyRecord(c RecordConfig) RecordConfig {\n\tswitch {\n\tcase o.set.Len() == 0:\n\tcase c.attrs.Len() == 0:\n\t\tc.attrs = o.set\n\tdefault:\n\t\tc.attrs = mergeSets(c.attrs, o.set)\n\t}\n\treturn c\n}\n\nfunc (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig {\n\tswitch {\n\tcase o.set.Len() == 0:\n\tcase c.attrs.Len() == 0:\n\t\tc.attrs = o.set\n\tdefault:\n\t\tc.attrs = mergeSets(c.attrs, o.set)\n\t}\n\treturn c\n}\n\n// WithAttributeSet sets the attribute Set associated with a measurement is\n// made with.\n//\n// If multiple WithAttributeSet or WithAttributes options are passed the\n// attributes will be merged together in the order they are passed. Attributes\n// with duplicate keys will use the last value passed.\nfunc WithAttributeSet(attributes attribute.Set) MeasurementOption {\n\treturn attrOpt{set: attributes}\n}\n\n// WithAttributes converts attributes into an attribute Set and sets the Set to\n// be associated with a measurement. This is shorthand for:\n//\n//\tcp := make([]attribute.KeyValue, len(attributes))\n//\tcopy(cp, attributes)\n//\tWithAttributeSet(attribute.NewSet(cp...))\n//\n// [attribute.NewSet] may modify the passed attributes so this will make a copy\n// of attributes before creating a set in order to ensure this function is\n// concurrent safe. This makes this option function less optimized in\n// comparison to [WithAttributeSet]. Therefore, [WithAttributeSet] should be\n// preferred for performance sensitive code.\n//\n// See [WithAttributeSet] for information about how multiple WithAttributes are\n// merged.\nfunc WithAttributes(attributes ...attribute.KeyValue) MeasurementOption {\n\tcp := make([]attribute.KeyValue, len(attributes))\n\tcopy(cp, attributes)\n\treturn attrOpt{set: attribute.NewSet(cp...)}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/meter.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// MeterProvider provides access to named Meter instances, for instrumenting\n// an application or package.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype MeterProvider interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.MeterProvider\n\n\t// Meter returns a new Meter with the provided name and configuration.\n\t//\n\t// A Meter should be scoped at most to a single package. The name needs to\n\t// be unique so it does not collide with other names used by\n\t// an application, nor other applications. To achieve this, the import path\n\t// of the instrumentation package is recommended to be used as name.\n\t//\n\t// If the name is empty, then an implementation defined default name will\n\t// be used instead.\n\tMeter(name string, opts ...MeterOption) Meter\n}\n\n// Meter provides access to instrument instances for recording metrics.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Meter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Meter\n\n\t// Int64Counter returns a new Int64Counter instrument identified by name\n\t// and configured with options. The instrument is used to synchronously\n\t// record increasing int64 measurements during a computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64Counter(name string, options ...Int64CounterOption) (Int64Counter, error)\n\n\t// Int64UpDownCounter returns a new Int64UpDownCounter instrument\n\t// identified by name and configured with options. The instrument is used\n\t// to synchronously record int64 measurements during a computational\n\t// operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error)\n\n\t// Int64Histogram returns a new Int64Histogram instrument identified by\n\t// name and configured with options. The instrument is used to\n\t// synchronously record the distribution of int64 measurements during a\n\t// computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error)\n\n\t// Int64Gauge returns a new Int64Gauge instrument identified by name and\n\t// configured with options. The instrument is used to synchronously record\n\t// instantaneous int64 measurements during a computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error)\n\n\t// Int64ObservableCounter returns a new Int64ObservableCounter identified\n\t// by name and configured with options. The instrument is used to\n\t// asynchronously record increasing int64 measurements once per a\n\t// measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithInt64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error)\n\n\t// Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter\n\t// instrument identified by name and configured with options. The\n\t// instrument is used to asynchronously record int64 measurements once per\n\t// a measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithInt64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64ObservableUpDownCounter(\n\t\tname string,\n\t\toptions ...Int64ObservableUpDownCounterOption,\n\t) (Int64ObservableUpDownCounter, error)\n\n\t// Int64ObservableGauge returns a new Int64ObservableGauge instrument\n\t// identified by name and configured with options. The instrument is used\n\t// to asynchronously record instantaneous int64 measurements once per a\n\t// measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithInt64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tInt64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error)\n\n\t// Float64Counter returns a new Float64Counter instrument identified by\n\t// name and configured with options. The instrument is used to\n\t// synchronously record increasing float64 measurements during a\n\t// computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64Counter(name string, options ...Float64CounterOption) (Float64Counter, error)\n\n\t// Float64UpDownCounter returns a new Float64UpDownCounter instrument\n\t// identified by name and configured with options. The instrument is used\n\t// to synchronously record float64 measurements during a computational\n\t// operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error)\n\n\t// Float64Histogram returns a new Float64Histogram instrument identified by\n\t// name and configured with options. The instrument is used to\n\t// synchronously record the distribution of float64 measurements during a\n\t// computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error)\n\n\t// Float64Gauge returns a new Float64Gauge instrument identified by name and\n\t// configured with options. The instrument is used to synchronously record\n\t// instantaneous float64 measurements during a computational operation.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error)\n\n\t// Float64ObservableCounter returns a new Float64ObservableCounter\n\t// instrument identified by name and configured with options. The\n\t// instrument is used to asynchronously record increasing float64\n\t// measurements once per a measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithFloat64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error)\n\n\t// Float64ObservableUpDownCounter returns a new\n\t// Float64ObservableUpDownCounter instrument identified by name and\n\t// configured with options. The instrument is used to asynchronously record\n\t// float64 measurements once per a measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithFloat64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64ObservableUpDownCounter(\n\t\tname string,\n\t\toptions ...Float64ObservableUpDownCounterOption,\n\t) (Float64ObservableUpDownCounter, error)\n\n\t// Float64ObservableGauge returns a new Float64ObservableGauge instrument\n\t// identified by name and configured with options. The instrument is used\n\t// to asynchronously record instantaneous float64 measurements once per a\n\t// measurement collection cycle.\n\t//\n\t// Measurements for the returned instrument are made via a callback. Use\n\t// the WithFloat64Callback option to register the callback here, or use the\n\t// RegisterCallback method of this Meter to register one later. See the\n\t// Measurements section of the package documentation for more information.\n\t//\n\t// The name needs to conform to the OpenTelemetry instrument name syntax.\n\t// See the Instrument Name section of the package documentation for more\n\t// information.\n\tFloat64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error)\n\n\t// RegisterCallback registers f to be called during the collection of a\n\t// measurement cycle.\n\t//\n\t// If Unregister of the returned Registration is called, f needs to be\n\t// unregistered and not called during collection.\n\t//\n\t// The instruments f is registered with are the only instruments that f may\n\t// observe values for.\n\t//\n\t// If no instruments are passed, f should not be registered nor called\n\t// during collection.\n\t//\n\t// The function f needs to be concurrent safe.\n\tRegisterCallback(f Callback, instruments ...Observable) (Registration, error)\n}\n\n// Callback is a function registered with a Meter that makes observations for\n// the set of instruments it is registered with. The Observer parameter is used\n// to record measurement observations for these instruments.\n//\n// The function needs to complete in a finite amount of time and the deadline\n// of the passed context is expected to be honored.\n//\n// The function needs to make unique observations across all registered\n// Callbacks. Meaning, it should not report measurements for an instrument with\n// the same attributes as another Callback will report.\n//\n// The function needs to be reentrant and concurrent safe.\n//\n// Note that Go's mutexes are not reentrant, and locking a mutex takes\n// an indefinite amount of time. It is therefore advised to avoid\n// using mutexes inside callbacks.\ntype Callback func(context.Context, Observer) error\n\n// Observer records measurements for multiple instruments in a Callback.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Observer interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Observer\n\n\t// ObserveFloat64 records the float64 value for obsrv.\n\tObserveFloat64(obsrv Float64Observable, value float64, opts ...ObserveOption)\n\n\t// ObserveInt64 records the int64 value for obsrv.\n\tObserveInt64(obsrv Int64Observable, value int64, opts ...ObserveOption)\n}\n\n// Registration is an token representing the unique registration of a callback\n// for a set of instruments with a Meter.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Registration interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Registration\n\n\t// Unregister removes the callback registration from a Meter.\n\t//\n\t// This method needs to be idempotent and concurrent safe.\n\tUnregister() error\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/noop/README.md",
    "content": "# Metric Noop\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/noop)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/noop/noop.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package noop provides an implementation of the OpenTelemetry metric API that\n// produces no telemetry and minimizes used computation resources.\n//\n// Using this package to implement the OpenTelemetry metric API will\n// effectively disable OpenTelemetry.\n//\n// This implementation can be embedded in other implementations of the\n// OpenTelemetry metric API. Doing so will mean the implementation defaults to\n// no operation for methods it does not implement.\npackage noop // import \"go.opentelemetry.io/otel/metric/noop\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\nvar (\n\t// Compile-time check this implements the OpenTelemetry API.\n\n\t_ metric.MeterProvider                  = MeterProvider{}\n\t_ metric.Meter                          = Meter{}\n\t_ metric.Observer                       = Observer{}\n\t_ metric.Registration                   = Registration{}\n\t_ metric.Int64Counter                   = Int64Counter{}\n\t_ metric.Float64Counter                 = Float64Counter{}\n\t_ metric.Int64UpDownCounter             = Int64UpDownCounter{}\n\t_ metric.Float64UpDownCounter           = Float64UpDownCounter{}\n\t_ metric.Int64Histogram                 = Int64Histogram{}\n\t_ metric.Float64Histogram               = Float64Histogram{}\n\t_ metric.Int64Gauge                     = Int64Gauge{}\n\t_ metric.Float64Gauge                   = Float64Gauge{}\n\t_ metric.Int64ObservableCounter         = Int64ObservableCounter{}\n\t_ metric.Float64ObservableCounter       = Float64ObservableCounter{}\n\t_ metric.Int64ObservableGauge           = Int64ObservableGauge{}\n\t_ metric.Float64ObservableGauge         = Float64ObservableGauge{}\n\t_ metric.Int64ObservableUpDownCounter   = Int64ObservableUpDownCounter{}\n\t_ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{}\n\t_ metric.Int64Observer                  = Int64Observer{}\n\t_ metric.Float64Observer                = Float64Observer{}\n)\n\n// MeterProvider is an OpenTelemetry No-Op MeterProvider.\ntype MeterProvider struct{ embedded.MeterProvider }\n\n// NewMeterProvider returns a MeterProvider that does not record any telemetry.\nfunc NewMeterProvider() MeterProvider {\n\treturn MeterProvider{}\n}\n\n// Meter returns an OpenTelemetry Meter that does not record any telemetry.\nfunc (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter {\n\treturn Meter{}\n}\n\n// Meter is an OpenTelemetry No-Op Meter.\ntype Meter struct{ embedded.Meter }\n\n// Int64Counter returns a Counter used to record int64 measurements that\n// produces no telemetry.\nfunc (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) {\n\treturn Int64Counter{}, nil\n}\n\n// Int64UpDownCounter returns an UpDownCounter used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) {\n\treturn Int64UpDownCounter{}, nil\n}\n\n// Int64Histogram returns a Histogram used to record int64 measurements that\n// produces no telemetry.\nfunc (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {\n\treturn Int64Histogram{}, nil\n}\n\n// Int64Gauge returns a Gauge used to record int64 measurements that\n// produces no telemetry.\nfunc (Meter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error) {\n\treturn Int64Gauge{}, nil\n}\n\n// Int64ObservableCounter returns an ObservableCounter used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Int64ObservableCounter(\n\tstring,\n\t...metric.Int64ObservableCounterOption,\n) (metric.Int64ObservableCounter, error) {\n\treturn Int64ObservableCounter{}, nil\n}\n\n// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to\n// record int64 measurements that produces no telemetry.\nfunc (Meter) Int64ObservableUpDownCounter(\n\tstring,\n\t...metric.Int64ObservableUpDownCounterOption,\n) (metric.Int64ObservableUpDownCounter, error) {\n\treturn Int64ObservableUpDownCounter{}, nil\n}\n\n// Int64ObservableGauge returns an ObservableGauge used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) {\n\treturn Int64ObservableGauge{}, nil\n}\n\n// Float64Counter returns a Counter used to record int64 measurements that\n// produces no telemetry.\nfunc (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) {\n\treturn Float64Counter{}, nil\n}\n\n// Float64UpDownCounter returns an UpDownCounter used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) {\n\treturn Float64UpDownCounter{}, nil\n}\n\n// Float64Histogram returns a Histogram used to record int64 measurements that\n// produces no telemetry.\nfunc (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {\n\treturn Float64Histogram{}, nil\n}\n\n// Float64Gauge returns a Gauge used to record float64 measurements that\n// produces no telemetry.\nfunc (Meter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error) {\n\treturn Float64Gauge{}, nil\n}\n\n// Float64ObservableCounter returns an ObservableCounter used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Float64ObservableCounter(\n\tstring,\n\t...metric.Float64ObservableCounterOption,\n) (metric.Float64ObservableCounter, error) {\n\treturn Float64ObservableCounter{}, nil\n}\n\n// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to\n// record int64 measurements that produces no telemetry.\nfunc (Meter) Float64ObservableUpDownCounter(\n\tstring,\n\t...metric.Float64ObservableUpDownCounterOption,\n) (metric.Float64ObservableUpDownCounter, error) {\n\treturn Float64ObservableUpDownCounter{}, nil\n}\n\n// Float64ObservableGauge returns an ObservableGauge used to record int64\n// measurements that produces no telemetry.\nfunc (Meter) Float64ObservableGauge(\n\tstring,\n\t...metric.Float64ObservableGaugeOption,\n) (metric.Float64ObservableGauge, error) {\n\treturn Float64ObservableGauge{}, nil\n}\n\n// RegisterCallback performs no operation.\nfunc (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) {\n\treturn Registration{}, nil\n}\n\n// Observer acts as a recorder of measurements for multiple instruments in a\n// Callback, it performing no operation.\ntype Observer struct{ embedded.Observer }\n\n// ObserveFloat64 performs no operation.\nfunc (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) {\n}\n\n// ObserveInt64 performs no operation.\nfunc (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) {\n}\n\n// Registration is the registration of a Callback with a No-Op Meter.\ntype Registration struct{ embedded.Registration }\n\n// Unregister unregisters the Callback the Registration represents with the\n// No-Op Meter. This will always return nil because the No-Op Meter performs no\n// operation, including hold any record of registrations.\nfunc (Registration) Unregister() error { return nil }\n\n// Int64Counter is an OpenTelemetry Counter used to record int64 measurements.\n// It produces no telemetry.\ntype Int64Counter struct{ embedded.Int64Counter }\n\n// Add performs no operation.\nfunc (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {}\n\n// Enabled performs no operation.\nfunc (Int64Counter) Enabled(context.Context) bool { return false }\n\n// Float64Counter is an OpenTelemetry Counter used to record float64\n// measurements. It produces no telemetry.\ntype Float64Counter struct{ embedded.Float64Counter }\n\n// Add performs no operation.\nfunc (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {}\n\n// Enabled performs no operation.\nfunc (Float64Counter) Enabled(context.Context) bool { return false }\n\n// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64\n// measurements. It produces no telemetry.\ntype Int64UpDownCounter struct{ embedded.Int64UpDownCounter }\n\n// Add performs no operation.\nfunc (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {}\n\n// Enabled performs no operation.\nfunc (Int64UpDownCounter) Enabled(context.Context) bool { return false }\n\n// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record\n// float64 measurements. It produces no telemetry.\ntype Float64UpDownCounter struct{ embedded.Float64UpDownCounter }\n\n// Add performs no operation.\nfunc (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {}\n\n// Enabled performs no operation.\nfunc (Float64UpDownCounter) Enabled(context.Context) bool { return false }\n\n// Int64Histogram is an OpenTelemetry Histogram used to record int64\n// measurements. It produces no telemetry.\ntype Int64Histogram struct{ embedded.Int64Histogram }\n\n// Record performs no operation.\nfunc (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {}\n\n// Enabled performs no operation.\nfunc (Int64Histogram) Enabled(context.Context) bool { return false }\n\n// Float64Histogram is an OpenTelemetry Histogram used to record float64\n// measurements. It produces no telemetry.\ntype Float64Histogram struct{ embedded.Float64Histogram }\n\n// Record performs no operation.\nfunc (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {}\n\n// Enabled performs no operation.\nfunc (Float64Histogram) Enabled(context.Context) bool { return false }\n\n// Int64Gauge is an OpenTelemetry Gauge used to record instantaneous int64\n// measurements. It produces no telemetry.\ntype Int64Gauge struct{ embedded.Int64Gauge }\n\n// Record performs no operation.\nfunc (Int64Gauge) Record(context.Context, int64, ...metric.RecordOption) {}\n\n// Enabled performs no operation.\nfunc (Int64Gauge) Enabled(context.Context) bool { return false }\n\n// Float64Gauge is an OpenTelemetry Gauge used to record instantaneous float64\n// measurements. It produces no telemetry.\ntype Float64Gauge struct{ embedded.Float64Gauge }\n\n// Record performs no operation.\nfunc (Float64Gauge) Record(context.Context, float64, ...metric.RecordOption) {}\n\n// Enabled performs no operation.\nfunc (Float64Gauge) Enabled(context.Context) bool { return false }\n\n// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record\n// int64 measurements. It produces no telemetry.\ntype Int64ObservableCounter struct {\n\tmetric.Int64Observable\n\tembedded.Int64ObservableCounter\n}\n\n// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record\n// float64 measurements. It produces no telemetry.\ntype Float64ObservableCounter struct {\n\tmetric.Float64Observable\n\tembedded.Float64ObservableCounter\n}\n\n// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record\n// int64 measurements. It produces no telemetry.\ntype Int64ObservableGauge struct {\n\tmetric.Int64Observable\n\tembedded.Int64ObservableGauge\n}\n\n// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record\n// float64 measurements. It produces no telemetry.\ntype Float64ObservableGauge struct {\n\tmetric.Float64Observable\n\tembedded.Float64ObservableGauge\n}\n\n// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter\n// used to record int64 measurements. It produces no telemetry.\ntype Int64ObservableUpDownCounter struct {\n\tmetric.Int64Observable\n\tembedded.Int64ObservableUpDownCounter\n}\n\n// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter\n// used to record float64 measurements. It produces no telemetry.\ntype Float64ObservableUpDownCounter struct {\n\tmetric.Float64Observable\n\tembedded.Float64ObservableUpDownCounter\n}\n\n// Int64Observer is a recorder of int64 measurements that performs no operation.\ntype Int64Observer struct{ embedded.Int64Observer }\n\n// Observe performs no operation.\nfunc (Int64Observer) Observe(int64, ...metric.ObserveOption) {}\n\n// Float64Observer is a recorder of float64 measurements that performs no\n// operation.\ntype Float64Observer struct{ embedded.Float64Observer }\n\n// Observe performs no operation.\nfunc (Float64Observer) Observe(float64, ...metric.ObserveOption) {}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/syncfloat64.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// Float64Counter is an instrument that records increasing float64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64Counter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64Counter\n\n\t// Add records a change to the counter.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tAdd(ctx context.Context, incr float64, options ...AddOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Float64CounterConfig contains options for synchronous counter instruments that\n// record float64 values.\ntype Float64CounterConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewFloat64CounterConfig returns a new [Float64CounterConfig] with all opts\n// applied.\nfunc NewFloat64CounterConfig(opts ...Float64CounterOption) Float64CounterConfig {\n\tvar config Float64CounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64Counter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64CounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64CounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Float64CounterOption applies options to a [Float64CounterConfig]. See\n// [InstrumentOption] for other options that can be used as a\n// Float64CounterOption.\ntype Float64CounterOption interface {\n\tapplyFloat64Counter(Float64CounterConfig) Float64CounterConfig\n}\n\n// Float64UpDownCounter is an instrument that records increasing or decreasing\n// float64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64UpDownCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64UpDownCounter\n\n\t// Add records a change to the counter.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tAdd(ctx context.Context, incr float64, options ...AddOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Float64UpDownCounterConfig contains options for synchronous counter\n// instruments that record float64 values.\ntype Float64UpDownCounterConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewFloat64UpDownCounterConfig returns a new [Float64UpDownCounterConfig]\n// with all opts applied.\nfunc NewFloat64UpDownCounterConfig(opts ...Float64UpDownCounterOption) Float64UpDownCounterConfig {\n\tvar config Float64UpDownCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64UpDownCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64UpDownCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64UpDownCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Float64UpDownCounterOption applies options to a\n// [Float64UpDownCounterConfig]. See [InstrumentOption] for other options that\n// can be used as a Float64UpDownCounterOption.\ntype Float64UpDownCounterOption interface {\n\tapplyFloat64UpDownCounter(Float64UpDownCounterConfig) Float64UpDownCounterConfig\n}\n\n// Float64Histogram is an instrument that records a distribution of float64\n// values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64Histogram interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64Histogram\n\n\t// Record adds an additional value to the distribution.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tRecord(ctx context.Context, incr float64, options ...RecordOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Float64HistogramConfig contains options for synchronous histogram\n// instruments that record float64 values.\ntype Float64HistogramConfig struct {\n\tdescription              string\n\tunit                     string\n\texplicitBucketBoundaries []float64\n}\n\n// NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all\n// opts applied.\nfunc NewFloat64HistogramConfig(opts ...Float64HistogramOption) Float64HistogramConfig {\n\tvar config Float64HistogramConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64Histogram(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64HistogramConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64HistogramConfig) Unit() string {\n\treturn c.unit\n}\n\n// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.\nfunc (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 {\n\treturn c.explicitBucketBoundaries\n}\n\n// Float64HistogramOption applies options to a [Float64HistogramConfig]. See\n// [InstrumentOption] for other options that can be used as a\n// Float64HistogramOption.\ntype Float64HistogramOption interface {\n\tapplyFloat64Histogram(Float64HistogramConfig) Float64HistogramConfig\n}\n\n// Float64Gauge is an instrument that records instantaneous float64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Float64Gauge interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Float64Gauge\n\n\t// Record records the instantaneous value.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tRecord(ctx context.Context, value float64, options ...RecordOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Float64GaugeConfig contains options for synchronous gauge instruments that\n// record float64 values.\ntype Float64GaugeConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewFloat64GaugeConfig returns a new [Float64GaugeConfig] with all opts\n// applied.\nfunc NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig {\n\tvar config Float64GaugeConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyFloat64Gauge(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Float64GaugeConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Float64GaugeConfig) Unit() string {\n\treturn c.unit\n}\n\n// Float64GaugeOption applies options to a [Float64GaugeConfig]. See\n// [InstrumentOption] for other options that can be used as a\n// Float64GaugeOption.\ntype Float64GaugeOption interface {\n\tapplyFloat64Gauge(Float64GaugeConfig) Float64GaugeConfig\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric/syncint64.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage metric // import \"go.opentelemetry.io/otel/metric\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/metric/embedded\"\n)\n\n// Int64Counter is an instrument that records increasing int64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64Counter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64Counter\n\n\t// Add records a change to the counter.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tAdd(ctx context.Context, incr int64, options ...AddOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Int64CounterConfig contains options for synchronous counter instruments that\n// record int64 values.\ntype Int64CounterConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewInt64CounterConfig returns a new [Int64CounterConfig] with all opts\n// applied.\nfunc NewInt64CounterConfig(opts ...Int64CounterOption) Int64CounterConfig {\n\tvar config Int64CounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64Counter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64CounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64CounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Int64CounterOption applies options to a [Int64CounterConfig]. See\n// [InstrumentOption] for other options that can be used as an\n// Int64CounterOption.\ntype Int64CounterOption interface {\n\tapplyInt64Counter(Int64CounterConfig) Int64CounterConfig\n}\n\n// Int64UpDownCounter is an instrument that records increasing or decreasing\n// int64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64UpDownCounter interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64UpDownCounter\n\n\t// Add records a change to the counter.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tAdd(ctx context.Context, incr int64, options ...AddOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Int64UpDownCounterConfig contains options for synchronous counter\n// instruments that record int64 values.\ntype Int64UpDownCounterConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewInt64UpDownCounterConfig returns a new [Int64UpDownCounterConfig] with\n// all opts applied.\nfunc NewInt64UpDownCounterConfig(opts ...Int64UpDownCounterOption) Int64UpDownCounterConfig {\n\tvar config Int64UpDownCounterConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64UpDownCounter(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64UpDownCounterConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64UpDownCounterConfig) Unit() string {\n\treturn c.unit\n}\n\n// Int64UpDownCounterOption applies options to a [Int64UpDownCounterConfig].\n// See [InstrumentOption] for other options that can be used as an\n// Int64UpDownCounterOption.\ntype Int64UpDownCounterOption interface {\n\tapplyInt64UpDownCounter(Int64UpDownCounterConfig) Int64UpDownCounterConfig\n}\n\n// Int64Histogram is an instrument that records a distribution of int64\n// values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64Histogram interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64Histogram\n\n\t// Record adds an additional value to the distribution.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tRecord(ctx context.Context, incr int64, options ...RecordOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Int64HistogramConfig contains options for synchronous histogram instruments\n// that record int64 values.\ntype Int64HistogramConfig struct {\n\tdescription              string\n\tunit                     string\n\texplicitBucketBoundaries []float64\n}\n\n// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts\n// applied.\nfunc NewInt64HistogramConfig(opts ...Int64HistogramOption) Int64HistogramConfig {\n\tvar config Int64HistogramConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64Histogram(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64HistogramConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64HistogramConfig) Unit() string {\n\treturn c.unit\n}\n\n// ExplicitBucketBoundaries returns the configured explicit bucket boundaries.\nfunc (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 {\n\treturn c.explicitBucketBoundaries\n}\n\n// Int64HistogramOption applies options to a [Int64HistogramConfig]. See\n// [InstrumentOption] for other options that can be used as an\n// Int64HistogramOption.\ntype Int64HistogramOption interface {\n\tapplyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig\n}\n\n// Int64Gauge is an instrument that records instantaneous int64 values.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Int64Gauge interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Int64Gauge\n\n\t// Record records the instantaneous value.\n\t//\n\t// Use the WithAttributeSet (or, if performance is not a concern,\n\t// the WithAttributes) option to include measurement attributes.\n\tRecord(ctx context.Context, value int64, options ...RecordOption)\n\n\t// Enabled reports whether the instrument will process measurements for the given context.\n\t//\n\t// This function can be used in places where measuring an instrument\n\t// would result in computationally expensive operations.\n\tEnabled(context.Context) bool\n}\n\n// Int64GaugeConfig contains options for synchronous gauge instruments that\n// record int64 values.\ntype Int64GaugeConfig struct {\n\tdescription string\n\tunit        string\n}\n\n// NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts\n// applied.\nfunc NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig {\n\tvar config Int64GaugeConfig\n\tfor _, o := range opts {\n\t\tconfig = o.applyInt64Gauge(config)\n\t}\n\treturn config\n}\n\n// Description returns the configured description.\nfunc (c Int64GaugeConfig) Description() string {\n\treturn c.description\n}\n\n// Unit returns the configured unit.\nfunc (c Int64GaugeConfig) Unit() string {\n\treturn c.unit\n}\n\n// Int64GaugeOption applies options to a [Int64GaugeConfig]. See\n// [InstrumentOption] for other options that can be used as a\n// Int64GaugeOption.\ntype Int64GaugeOption interface {\n\tapplyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/metric.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\nimport (\n\t\"go.opentelemetry.io/otel/internal/global\"\n\t\"go.opentelemetry.io/otel/metric\"\n)\n\n// Meter returns a Meter from the global MeterProvider. The name must be the\n// name of the library providing instrumentation. This name may be the same as\n// the instrumented code only if that code provides built-in instrumentation.\n// If the name is empty, then an implementation defined default name will be\n// used instead.\n//\n// If this is called before a global MeterProvider is registered the returned\n// Meter will be a No-op implementation of a Meter. When a global MeterProvider\n// is registered for the first time, the returned Meter, and all the\n// instruments it has created or will create, are recreated automatically from\n// the new MeterProvider.\n//\n// This is short for GetMeterProvider().Meter(name).\nfunc Meter(name string, opts ...metric.MeterOption) metric.Meter {\n\treturn GetMeterProvider().Meter(name, opts...)\n}\n\n// GetMeterProvider returns the registered global meter provider.\n//\n// If no global GetMeterProvider has been registered, a No-op GetMeterProvider\n// implementation is returned. When a global GetMeterProvider is registered for\n// the first time, the returned GetMeterProvider, and all the Meters it has\n// created or will create, are recreated automatically from the new\n// GetMeterProvider.\nfunc GetMeterProvider() metric.MeterProvider {\n\treturn global.MeterProvider()\n}\n\n// SetMeterProvider registers mp as the global MeterProvider.\nfunc SetMeterProvider(mp metric.MeterProvider) {\n\tglobal.SetMeterProvider(mp)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation/README.md",
    "content": "# Propagation\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/propagation)](https://pkg.go.dev/go.opentelemetry.io/otel/propagation)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation/baggage.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage propagation // import \"go.opentelemetry.io/otel/propagation\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/baggage\"\n)\n\nconst baggageHeader = \"baggage\"\n\n// Baggage is a propagator that supports the W3C Baggage format.\n//\n// This propagates user-defined baggage associated with a trace. The complete\n// specification is defined at https://www.w3.org/TR/baggage/.\ntype Baggage struct{}\n\nvar _ TextMapPropagator = Baggage{}\n\n// Inject sets baggage key-values from ctx into the carrier.\nfunc (Baggage) Inject(ctx context.Context, carrier TextMapCarrier) {\n\tbStr := baggage.FromContext(ctx).String()\n\tif bStr != \"\" {\n\t\tcarrier.Set(baggageHeader, bStr)\n\t}\n}\n\n// Extract returns a copy of parent with the baggage from the carrier added.\n// If carrier implements [ValuesGetter] (e.g. [HeaderCarrier]), Values is invoked\n// for multiple values extraction. Otherwise, Get is called.\nfunc (Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context {\n\tif multiCarrier, ok := carrier.(ValuesGetter); ok {\n\t\treturn extractMultiBaggage(parent, multiCarrier)\n\t}\n\treturn extractSingleBaggage(parent, carrier)\n}\n\n// Fields returns the keys who's values are set with Inject.\nfunc (Baggage) Fields() []string {\n\treturn []string{baggageHeader}\n}\n\nfunc extractSingleBaggage(parent context.Context, carrier TextMapCarrier) context.Context {\n\tbStr := carrier.Get(baggageHeader)\n\tif bStr == \"\" {\n\t\treturn parent\n\t}\n\n\tbag, err := baggage.Parse(bStr)\n\tif err != nil {\n\t\treturn parent\n\t}\n\treturn baggage.ContextWithBaggage(parent, bag)\n}\n\nfunc extractMultiBaggage(parent context.Context, carrier ValuesGetter) context.Context {\n\tbVals := carrier.Values(baggageHeader)\n\tif len(bVals) == 0 {\n\t\treturn parent\n\t}\n\tvar members []baggage.Member\n\tfor _, bStr := range bVals {\n\t\tcurrBag, err := baggage.Parse(bStr)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tmembers = append(members, currBag.Members()...)\n\t}\n\n\tb, err := baggage.New(members...)\n\tif err != nil || b.Len() == 0 {\n\t\treturn parent\n\t}\n\treturn baggage.ContextWithBaggage(parent, b)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage propagation contains OpenTelemetry context propagators.\n\nOpenTelemetry propagators are used to extract and inject context data from and\ninto messages exchanged by applications. The propagator supported by this\npackage is the W3C Trace Context encoding\n(https://www.w3.org/TR/trace-context/), and W3C Baggage\n(https://www.w3.org/TR/baggage/).\n*/\npackage propagation // import \"go.opentelemetry.io/otel/propagation\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation/propagation.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage propagation // import \"go.opentelemetry.io/otel/propagation\"\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\n// TextMapCarrier is the storage medium used by a TextMapPropagator.\n// See ValuesGetter for how a TextMapCarrier can get multiple values for a key.\ntype TextMapCarrier interface {\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Get returns the value associated with the passed key.\n\tGet(key string) string\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Set stores the key-value pair.\n\tSet(key, value string)\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Keys lists the keys stored in this carrier.\n\tKeys() []string\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n}\n\n// ValuesGetter can return multiple values for a single key,\n// with contrast to TextMapCarrier.Get which returns a single value.\ntype ValuesGetter interface {\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Values returns all values associated with the passed key.\n\tValues(key string) []string\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n}\n\n// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage\n// medium for propagated key-value pairs.\ntype MapCarrier map[string]string\n\n// Compile time check that MapCarrier implements the TextMapCarrier.\nvar _ TextMapCarrier = MapCarrier{}\n\n// Get returns the value associated with the passed key.\nfunc (c MapCarrier) Get(key string) string {\n\treturn c[key]\n}\n\n// Set stores the key-value pair.\nfunc (c MapCarrier) Set(key, value string) {\n\tc[key] = value\n}\n\n// Keys lists the keys stored in this carrier.\nfunc (c MapCarrier) Keys() []string {\n\tkeys := make([]string, 0, len(c))\n\tfor k := range c {\n\t\tkeys = append(keys, k)\n\t}\n\treturn keys\n}\n\n// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier and ValuesGetter interfaces.\ntype HeaderCarrier http.Header\n\n// Compile time check that HeaderCarrier implements ValuesGetter.\nvar _ TextMapCarrier = HeaderCarrier{}\n\n// Compile time check that HeaderCarrier implements TextMapCarrier.\nvar _ ValuesGetter = HeaderCarrier{}\n\n// Get returns the first value associated with the passed key.\nfunc (hc HeaderCarrier) Get(key string) string {\n\treturn http.Header(hc).Get(key)\n}\n\n// Values returns all values associated with the passed key.\nfunc (hc HeaderCarrier) Values(key string) []string {\n\treturn http.Header(hc).Values(key)\n}\n\n// Set stores the key-value pair.\nfunc (hc HeaderCarrier) Set(key, value string) {\n\thttp.Header(hc).Set(key, value)\n}\n\n// Keys lists the keys stored in this carrier.\nfunc (hc HeaderCarrier) Keys() []string {\n\tkeys := make([]string, 0, len(hc))\n\tfor k := range hc {\n\t\tkeys = append(keys, k)\n\t}\n\treturn keys\n}\n\n// TextMapPropagator propagates cross-cutting concerns as key-value text\n// pairs within a carrier that travels in-band across process boundaries.\ntype TextMapPropagator interface {\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Inject set cross-cutting concerns from the Context into the carrier.\n\tInject(ctx context.Context, carrier TextMapCarrier)\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Extract reads cross-cutting concerns from the carrier into a Context.\n\t// Implementations may check if the carrier implements ValuesGetter,\n\t// to support extraction of multiple values per key.\n\tExtract(ctx context.Context, carrier TextMapCarrier) context.Context\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n\n\t// Fields returns the keys whose values are set with Inject.\n\tFields() []string\n\t// DO NOT CHANGE: any modification will not be backwards compatible and\n\t// must never be done outside of a new major release.\n}\n\ntype compositeTextMapPropagator []TextMapPropagator\n\nfunc (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) {\n\tfor _, i := range p {\n\t\ti.Inject(ctx, carrier)\n\t}\n}\n\nfunc (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context {\n\tfor _, i := range p {\n\t\tctx = i.Extract(ctx, carrier)\n\t}\n\treturn ctx\n}\n\nfunc (p compositeTextMapPropagator) Fields() []string {\n\tunique := make(map[string]struct{})\n\tfor _, i := range p {\n\t\tfor _, k := range i.Fields() {\n\t\t\tunique[k] = struct{}{}\n\t\t}\n\t}\n\n\tfields := make([]string, 0, len(unique))\n\tfor k := range unique {\n\t\tfields = append(fields, k)\n\t}\n\treturn fields\n}\n\n// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the\n// group of passed TextMapPropagator. This allows different cross-cutting\n// concerns to be propagates in a unified manner.\n//\n// The returned TextMapPropagator will inject and extract cross-cutting\n// concerns in the order the TextMapPropagators were provided. Additionally,\n// the Fields method will return a de-duplicated slice of the keys that are\n// set with the Inject method.\nfunc NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator {\n\treturn compositeTextMapPropagator(p)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation/trace_context.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage propagation // import \"go.opentelemetry.io/otel/propagation\"\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\nconst (\n\tsupportedVersion  = 0\n\tmaxVersion        = 254\n\ttraceparentHeader = \"traceparent\"\n\ttracestateHeader  = \"tracestate\"\n\tdelimiter         = \"-\"\n)\n\n// TraceContext is a propagator that supports the W3C Trace Context format\n// (https://www.w3.org/TR/trace-context/)\n//\n// This propagator will propagate the traceparent and tracestate headers to\n// guarantee traces are not broken. It is up to the users of this propagator\n// to choose if they want to participate in a trace by modifying the\n// traceparent header and relevant parts of the tracestate header containing\n// their proprietary information.\ntype TraceContext struct{}\n\nvar (\n\t_           TextMapPropagator = TraceContext{}\n\tversionPart                   = fmt.Sprintf(\"%.2X\", supportedVersion)\n)\n\n// Inject injects the trace context from ctx into carrier.\nfunc (TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {\n\tsc := trace.SpanContextFromContext(ctx)\n\tif !sc.IsValid() {\n\t\treturn\n\t}\n\n\tif ts := sc.TraceState().String(); ts != \"\" {\n\t\tcarrier.Set(tracestateHeader, ts)\n\t}\n\n\t// Clear all flags other than the trace-context supported sampling bit.\n\tflags := sc.TraceFlags() & trace.FlagsSampled\n\n\tvar sb strings.Builder\n\tsb.Grow(2 + 32 + 16 + 2 + 3)\n\t_, _ = sb.WriteString(versionPart)\n\ttraceID := sc.TraceID()\n\tspanID := sc.SpanID()\n\tflagByte := [1]byte{byte(flags)}\n\tvar buf [32]byte\n\tfor _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} {\n\t\t_ = sb.WriteByte(delimiter[0])\n\t\tn := hex.Encode(buf[:], src)\n\t\t_, _ = sb.Write(buf[:n])\n\t}\n\tcarrier.Set(traceparentHeader, sb.String())\n}\n\n// Extract reads tracecontext from the carrier into a returned Context.\n//\n// The returned Context will be a copy of ctx and contain the extracted\n// tracecontext as the remote SpanContext. If the extracted tracecontext is\n// invalid, the passed ctx will be returned directly instead.\nfunc (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context {\n\tsc := tc.extract(carrier)\n\tif !sc.IsValid() {\n\t\treturn ctx\n\t}\n\treturn trace.ContextWithRemoteSpanContext(ctx, sc)\n}\n\nfunc (TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {\n\th := carrier.Get(traceparentHeader)\n\tif h == \"\" {\n\t\treturn trace.SpanContext{}\n\t}\n\n\tvar ver [1]byte\n\tif !extractPart(ver[:], &h, 2) {\n\t\treturn trace.SpanContext{}\n\t}\n\tversion := int(ver[0])\n\tif version > maxVersion {\n\t\treturn trace.SpanContext{}\n\t}\n\n\tvar scc trace.SpanContextConfig\n\tif !extractPart(scc.TraceID[:], &h, 32) {\n\t\treturn trace.SpanContext{}\n\t}\n\tif !extractPart(scc.SpanID[:], &h, 16) {\n\t\treturn trace.SpanContext{}\n\t}\n\n\tvar opts [1]byte\n\tif !extractPart(opts[:], &h, 2) {\n\t\treturn trace.SpanContext{}\n\t}\n\tif version == 0 && (h != \"\" || opts[0] > 2) {\n\t\t// version 0 not allow extra\n\t\t// version 0 not allow other flag\n\t\treturn trace.SpanContext{}\n\t}\n\n\t// Clear all flags other than the trace-context supported sampling bit.\n\tscc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled // nolint:gosec // slice size already checked.\n\n\t// Ignore the error returned here. Failure to parse tracestate MUST NOT\n\t// affect the parsing of traceparent according to the W3C tracecontext\n\t// specification.\n\tscc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader))\n\tscc.Remote = true\n\n\tsc := trace.NewSpanContext(scc)\n\tif !sc.IsValid() {\n\t\treturn trace.SpanContext{}\n\t}\n\n\treturn sc\n}\n\n// upperHex detect hex is upper case Unicode characters.\nfunc upperHex(v string) bool {\n\tfor _, c := range v {\n\t\tif c >= 'A' && c <= 'F' {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc extractPart(dst []byte, h *string, n int) bool {\n\tpart, left, _ := strings.Cut(*h, delimiter)\n\t*h = left\n\t// hex.Decode decodes unsupported upper-case characters, so exclude explicitly.\n\tif len(part) != n || upperHex(part) {\n\t\treturn false\n\t}\n\tif p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Fields returns the keys who's values are set with Inject.\nfunc (TraceContext) Fields() []string {\n\treturn []string{traceparentHeader, tracestateHeader}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/propagation.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\nimport (\n\t\"go.opentelemetry.io/otel/internal/global\"\n\t\"go.opentelemetry.io/otel/propagation\"\n)\n\n// GetTextMapPropagator returns the global TextMapPropagator. If none has been\n// set, a No-Op TextMapPropagator is returned.\nfunc GetTextMapPropagator() propagation.TextMapPropagator {\n\treturn global.TextMapPropagator()\n}\n\n// SetTextMapPropagator sets propagator as the global TextMapPropagator.\nfunc SetTextMapPropagator(propagator propagation.TextMapPropagator) {\n\tglobal.SetTextMapPropagator(propagator)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"config:best-practices\",\n    \"helpers:pinGitHubActionDigestsToSemver\"\n  ],\n  \"ignorePaths\": [],\n  \"labels\": [\"Skip Changelog\", \"dependencies\"],\n  \"postUpdateOptions\" : [\n    \"gomodTidy\"\n  ],\n  \"packageRules\": [\n    {\n      \"matchManagers\": [\"gomod\"],\n      \"matchDepTypes\": [\"indirect\"],\n      \"enabled\": true\n    },\n    {\n      \"matchPackageNames\": [\"go.opentelemetry.io/build-tools/**\"],\n      \"groupName\": \"build-tools\"\n    },\n    {\n      \"matchPackageNames\": [\"google.golang.org/genproto/googleapis/**\"],\n      \"groupName\": \"googleapis\"\n    },\n    {\n      \"matchPackageNames\": [\"golang.org/x/**\"],\n      \"groupName\": \"golang.org/x\"\n    },\n    {\n      \"matchPackageNames\": [\"go.opentelemetry.io/otel/sdk/log/logtest\"],\n      \"enabled\": false\n    }\n  ]\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/requirements.txt",
    "content": "codespell==2.4.1\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/MIGRATION.md",
    "content": "<!-- Generated. DO NOT MODIFY. -->\n# Migration from v1.36.0 to v1.37.0\n\nThe `go.opentelemetry.io/otel/semconv/v1.37.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.36.0` with the following exceptions.\n\n## Removed\n\nThe following declarations have been removed.\nRefer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions.\n\nIf the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use.\nIf you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case.\n\n- `ContainerRuntime`\n- `ContainerRuntimeKey`\n- `GenAIOpenAIRequestServiceTierAuto`\n- `GenAIOpenAIRequestServiceTierDefault`\n- `GenAIOpenAIRequestServiceTierKey`\n- `GenAIOpenAIResponseServiceTier`\n- `GenAIOpenAIResponseServiceTierKey`\n- `GenAIOpenAIResponseSystemFingerprint`\n- `GenAIOpenAIResponseSystemFingerprintKey`\n- `GenAISystemAWSBedrock`\n- `GenAISystemAnthropic`\n- `GenAISystemAzureAIInference`\n- `GenAISystemAzureAIOpenAI`\n- `GenAISystemCohere`\n- `GenAISystemDeepseek`\n- `GenAISystemGCPGemini`\n- `GenAISystemGCPGenAI`\n- `GenAISystemGCPVertexAI`\n- `GenAISystemGroq`\n- `GenAISystemIBMWatsonxAI`\n- `GenAISystemKey`\n- `GenAISystemMistralAI`\n- `GenAISystemOpenAI`\n- `GenAISystemPerplexity`\n- `GenAISystemXai`\n\n[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions\n[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/README.md",
    "content": "# Semconv v1.37.0\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.37.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.37.0)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated from semantic convention specification. DO NOT EDIT.\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n\nimport \"go.opentelemetry.io/otel/attribute\"\n\n// Namespace: android\nconst (\n\t// AndroidAppStateKey is the attribute Key conforming to the \"android.app.state\"\n\t// semantic conventions. It represents the this attribute represents the state\n\t// of the application.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"created\"\n\t// Note: The Android lifecycle states are defined in\n\t// [Activity lifecycle callbacks], and from which the `OS identifiers` are\n\t// derived.\n\t//\n\t// [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc\n\tAndroidAppStateKey = attribute.Key(\"android.app.state\")\n\n\t// AndroidOSAPILevelKey is the attribute Key conforming to the\n\t// \"android.os.api_level\" semantic conventions. It represents the uniquely\n\t// identifies the framework API revision offered by a version (`os.version`) of\n\t// the android operating system. More information can be found in the\n\t// [Android API levels documentation].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"33\", \"32\"\n\t//\n\t// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels\n\tAndroidOSAPILevelKey = attribute.Key(\"android.os.api_level\")\n)\n\n// AndroidOSAPILevel returns an attribute KeyValue conforming to the\n// \"android.os.api_level\" semantic conventions. It represents the uniquely\n// identifies the framework API revision offered by a version (`os.version`) of\n// the android operating system. More information can be found in the\n// [Android API levels documentation].\n//\n// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels\nfunc AndroidOSAPILevel(val string) attribute.KeyValue {\n\treturn AndroidOSAPILevelKey.String(val)\n}\n\n// Enum values for android.app.state\nvar (\n\t// Any time before Activity.onResume() or, if the app has no Activity,\n\t// Context.startService() has been called in the app for the first time.\n\t//\n\t// Stability: development\n\tAndroidAppStateCreated = AndroidAppStateKey.String(\"created\")\n\t// Any time after Activity.onPause() or, if the app has no Activity,\n\t// Context.stopService() has been called when the app was in the foreground\n\t// state.\n\t//\n\t// Stability: development\n\tAndroidAppStateBackground = AndroidAppStateKey.String(\"background\")\n\t// Any time after Activity.onResume() or, if the app has no Activity,\n\t// Context.startService() has been called when the app was in either the created\n\t// or background states.\n\t//\n\t// Stability: development\n\tAndroidAppStateForeground = AndroidAppStateKey.String(\"foreground\")\n)\n\n// Namespace: app\nconst (\n\t// AppBuildIDKey is the attribute Key conforming to the \"app.build_id\" semantic\n\t// conventions. It represents the unique identifier for a particular build or\n\t// compilation of the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6cff0a7e-cefc-4668-96f5-1273d8b334d0\",\n\t// \"9f2b833506aa6973a92fde9733e6271f\", \"my-app-1.0.0-code-123\"\n\tAppBuildIDKey = attribute.Key(\"app.build_id\")\n\n\t// AppInstallationIDKey is the attribute Key conforming to the\n\t// \"app.installation.id\" semantic conventions. It represents a unique identifier\n\t// representing the installation of an application on a specific device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2ab2916d-a51f-4ac8-80ee-45ac31a28092\"\n\t// Note: Its value SHOULD persist across launches of the same application\n\t// installation, including through application upgrades.\n\t// It SHOULD change if the application is uninstalled or if all applications of\n\t// the vendor are uninstalled.\n\t// Additionally, users might be able to reset this value (e.g. by clearing\n\t// application data).\n\t// If an app is installed multiple times on the same device (e.g. in different\n\t// accounts on Android), each `app.installation.id` SHOULD have a different\n\t// value.\n\t// If multiple OpenTelemetry SDKs are used within the same application, they\n\t// SHOULD use the same value for `app.installation.id`.\n\t// Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the\n\t// `app.installation.id`.\n\t//\n\t// For iOS, this value SHOULD be equal to the [vendor identifier].\n\t//\n\t// For Android, examples of `app.installation.id` implementations include:\n\t//\n\t//   - [Firebase Installation ID].\n\t//   - A globally unique UUID which is persisted across sessions in your\n\t//     application.\n\t//   - [App set ID].\n\t//   - [`Settings.getString(Settings.Secure.ANDROID_ID)`].\n\t//\n\t// More information about Android identifier best practices can be found in the\n\t// [Android user data IDs guide].\n\t//\n\t// [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor\n\t// [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations\n\t// [App set ID]: https://developer.android.com/identity/app-set-id\n\t// [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID\n\t// [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids\n\tAppInstallationIDKey = attribute.Key(\"app.installation.id\")\n\n\t// AppJankFrameCountKey is the attribute Key conforming to the\n\t// \"app.jank.frame_count\" semantic conventions. It represents a number of frame\n\t// renders that experienced jank.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 9, 42\n\t// Note: Depending on platform limitations, the value provided MAY be\n\t// approximation.\n\tAppJankFrameCountKey = attribute.Key(\"app.jank.frame_count\")\n\n\t// AppJankPeriodKey is the attribute Key conforming to the \"app.jank.period\"\n\t// semantic conventions. It represents the time period, in seconds, for which\n\t// this jank is being reported.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 5.0, 10.24\n\tAppJankPeriodKey = attribute.Key(\"app.jank.period\")\n\n\t// AppJankThresholdKey is the attribute Key conforming to the\n\t// \"app.jank.threshold\" semantic conventions. It represents the minimum\n\t// rendering threshold for this jank, in seconds.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.016, 0.7, 1.024\n\tAppJankThresholdKey = attribute.Key(\"app.jank.threshold\")\n\n\t// AppScreenCoordinateXKey is the attribute Key conforming to the\n\t// \"app.screen.coordinate.x\" semantic conventions. It represents the x\n\t// (horizontal) coordinate of a screen coordinate, in screen pixels.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 131\n\tAppScreenCoordinateXKey = attribute.Key(\"app.screen.coordinate.x\")\n\n\t// AppScreenCoordinateYKey is the attribute Key conforming to the\n\t// \"app.screen.coordinate.y\" semantic conventions. It represents the y\n\t// (vertical) component of a screen coordinate, in screen pixels.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12, 99\n\tAppScreenCoordinateYKey = attribute.Key(\"app.screen.coordinate.y\")\n\n\t// AppWidgetIDKey is the attribute Key conforming to the \"app.widget.id\"\n\t// semantic conventions. It represents an identifier that uniquely\n\t// differentiates this widget from other widgets in the same application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"f9bc787d-ff05-48ad-90e1-fca1d46130b3\", \"submit_order_1829\"\n\t// Note: A widget is an application component, typically an on-screen visual GUI\n\t// element.\n\tAppWidgetIDKey = attribute.Key(\"app.widget.id\")\n\n\t// AppWidgetNameKey is the attribute Key conforming to the \"app.widget.name\"\n\t// semantic conventions. It represents the name of an application widget.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"submit\", \"attack\", \"Clear Cart\"\n\t// Note: A widget is an application component, typically an on-screen visual GUI\n\t// element.\n\tAppWidgetNameKey = attribute.Key(\"app.widget.name\")\n)\n\n// AppBuildID returns an attribute KeyValue conforming to the \"app.build_id\"\n// semantic conventions. It represents the unique identifier for a particular\n// build or compilation of the application.\nfunc AppBuildID(val string) attribute.KeyValue {\n\treturn AppBuildIDKey.String(val)\n}\n\n// AppInstallationID returns an attribute KeyValue conforming to the\n// \"app.installation.id\" semantic conventions. It represents a unique identifier\n// representing the installation of an application on a specific device.\nfunc AppInstallationID(val string) attribute.KeyValue {\n\treturn AppInstallationIDKey.String(val)\n}\n\n// AppJankFrameCount returns an attribute KeyValue conforming to the\n// \"app.jank.frame_count\" semantic conventions. It represents a number of frame\n// renders that experienced jank.\nfunc AppJankFrameCount(val int) attribute.KeyValue {\n\treturn AppJankFrameCountKey.Int(val)\n}\n\n// AppJankPeriod returns an attribute KeyValue conforming to the\n// \"app.jank.period\" semantic conventions. It represents the time period, in\n// seconds, for which this jank is being reported.\nfunc AppJankPeriod(val float64) attribute.KeyValue {\n\treturn AppJankPeriodKey.Float64(val)\n}\n\n// AppJankThreshold returns an attribute KeyValue conforming to the\n// \"app.jank.threshold\" semantic conventions. It represents the minimum rendering\n// threshold for this jank, in seconds.\nfunc AppJankThreshold(val float64) attribute.KeyValue {\n\treturn AppJankThresholdKey.Float64(val)\n}\n\n// AppScreenCoordinateX returns an attribute KeyValue conforming to the\n// \"app.screen.coordinate.x\" semantic conventions. It represents the x\n// (horizontal) coordinate of a screen coordinate, in screen pixels.\nfunc AppScreenCoordinateX(val int) attribute.KeyValue {\n\treturn AppScreenCoordinateXKey.Int(val)\n}\n\n// AppScreenCoordinateY returns an attribute KeyValue conforming to the\n// \"app.screen.coordinate.y\" semantic conventions. It represents the y (vertical)\n// component of a screen coordinate, in screen pixels.\nfunc AppScreenCoordinateY(val int) attribute.KeyValue {\n\treturn AppScreenCoordinateYKey.Int(val)\n}\n\n// AppWidgetID returns an attribute KeyValue conforming to the \"app.widget.id\"\n// semantic conventions. It represents an identifier that uniquely differentiates\n// this widget from other widgets in the same application.\nfunc AppWidgetID(val string) attribute.KeyValue {\n\treturn AppWidgetIDKey.String(val)\n}\n\n// AppWidgetName returns an attribute KeyValue conforming to the\n// \"app.widget.name\" semantic conventions. It represents the name of an\n// application widget.\nfunc AppWidgetName(val string) attribute.KeyValue {\n\treturn AppWidgetNameKey.String(val)\n}\n\n// Namespace: artifact\nconst (\n\t// ArtifactAttestationFilenameKey is the attribute Key conforming to the\n\t// \"artifact.attestation.filename\" semantic conventions. It represents the\n\t// provenance filename of the built attestation which directly relates to the\n\t// build artifact filename. This filename SHOULD accompany the artifact at\n\t// publish time. See the [SLSA Relationship] specification for more information.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"golang-binary-amd64-v0.1.0.attestation\",\n\t// \"docker-image-amd64-v0.1.0.intoto.json1\", \"release-1.tar.gz.attestation\",\n\t// \"file-name-package.tar.gz.intoto.json1\"\n\t//\n\t// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations\n\tArtifactAttestationFilenameKey = attribute.Key(\"artifact.attestation.filename\")\n\n\t// ArtifactAttestationHashKey is the attribute Key conforming to the\n\t// \"artifact.attestation.hash\" semantic conventions. It represents the full\n\t// [hash value (see glossary)], of the built attestation. Some envelopes in the\n\t// [software attestation space] also refer to this as the **digest**.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408\"\n\t//\n\t// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec\n\tArtifactAttestationHashKey = attribute.Key(\"artifact.attestation.hash\")\n\n\t// ArtifactAttestationIDKey is the attribute Key conforming to the\n\t// \"artifact.attestation.id\" semantic conventions. It represents the id of the\n\t// build [software attestation].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123\"\n\t//\n\t// [software attestation]: https://slsa.dev/attestation-model\n\tArtifactAttestationIDKey = attribute.Key(\"artifact.attestation.id\")\n\n\t// ArtifactFilenameKey is the attribute Key conforming to the\n\t// \"artifact.filename\" semantic conventions. It represents the human readable\n\t// file name of the artifact, typically generated during build and release\n\t// processes. Often includes the package name and version in the file name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"golang-binary-amd64-v0.1.0\", \"docker-image-amd64-v0.1.0\",\n\t// \"release-1.tar.gz\", \"file-name-package.tar.gz\"\n\t// Note: This file name can also act as the [Package Name]\n\t// in cases where the package ecosystem maps accordingly.\n\t// Additionally, the artifact [can be published]\n\t// for others, but that is not a guarantee.\n\t//\n\t// [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model\n\t// [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain\n\tArtifactFilenameKey = attribute.Key(\"artifact.filename\")\n\n\t// ArtifactHashKey is the attribute Key conforming to the \"artifact.hash\"\n\t// semantic conventions. It represents the full [hash value (see glossary)],\n\t// often found in checksum.txt on a release of the artifact and used to verify\n\t// package integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9\"\n\t// Note: The specific algorithm used to create the cryptographic hash value is\n\t// not defined. In situations where an artifact has multiple\n\t// cryptographic hashes, it is up to the implementer to choose which\n\t// hash value to set here; this should be the most secure hash algorithm\n\t// that is suitable for the situation and consistent with the\n\t// corresponding attestation. The implementer can then provide the other\n\t// hash values through an additional set of attribute extensions as they\n\t// deem necessary.\n\t//\n\t// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\tArtifactHashKey = attribute.Key(\"artifact.hash\")\n\n\t// ArtifactPurlKey is the attribute Key conforming to the \"artifact.purl\"\n\t// semantic conventions. It represents the [Package URL] of the\n\t// [package artifact] provides a standard way to identify and locate the\n\t// packaged artifact.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pkg:github/package-url/purl-spec@1209109710924\",\n\t// \"pkg:npm/foo@12.12.3\"\n\t//\n\t// [Package URL]: https://github.com/package-url/purl-spec\n\t// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model\n\tArtifactPurlKey = attribute.Key(\"artifact.purl\")\n\n\t// ArtifactVersionKey is the attribute Key conforming to the \"artifact.version\"\n\t// semantic conventions. It represents the version of the artifact.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"v0.1.0\", \"1.2.1\", \"122691-build\"\n\tArtifactVersionKey = attribute.Key(\"artifact.version\")\n)\n\n// ArtifactAttestationFilename returns an attribute KeyValue conforming to the\n// \"artifact.attestation.filename\" semantic conventions. It represents the\n// provenance filename of the built attestation which directly relates to the\n// build artifact filename. This filename SHOULD accompany the artifact at\n// publish time. See the [SLSA Relationship] specification for more information.\n//\n// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations\nfunc ArtifactAttestationFilename(val string) attribute.KeyValue {\n\treturn ArtifactAttestationFilenameKey.String(val)\n}\n\n// ArtifactAttestationHash returns an attribute KeyValue conforming to the\n// \"artifact.attestation.hash\" semantic conventions. It represents the full\n// [hash value (see glossary)], of the built attestation. Some envelopes in the\n// [software attestation space] also refer to this as the **digest**.\n//\n// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec\nfunc ArtifactAttestationHash(val string) attribute.KeyValue {\n\treturn ArtifactAttestationHashKey.String(val)\n}\n\n// ArtifactAttestationID returns an attribute KeyValue conforming to the\n// \"artifact.attestation.id\" semantic conventions. It represents the id of the\n// build [software attestation].\n//\n// [software attestation]: https://slsa.dev/attestation-model\nfunc ArtifactAttestationID(val string) attribute.KeyValue {\n\treturn ArtifactAttestationIDKey.String(val)\n}\n\n// ArtifactFilename returns an attribute KeyValue conforming to the\n// \"artifact.filename\" semantic conventions. It represents the human readable\n// file name of the artifact, typically generated during build and release\n// processes. Often includes the package name and version in the file name.\nfunc ArtifactFilename(val string) attribute.KeyValue {\n\treturn ArtifactFilenameKey.String(val)\n}\n\n// ArtifactHash returns an attribute KeyValue conforming to the \"artifact.hash\"\n// semantic conventions. It represents the full [hash value (see glossary)],\n// often found in checksum.txt on a release of the artifact and used to verify\n// package integrity.\n//\n// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\nfunc ArtifactHash(val string) attribute.KeyValue {\n\treturn ArtifactHashKey.String(val)\n}\n\n// ArtifactPurl returns an attribute KeyValue conforming to the \"artifact.purl\"\n// semantic conventions. It represents the [Package URL] of the\n// [package artifact] provides a standard way to identify and locate the packaged\n// artifact.\n//\n// [Package URL]: https://github.com/package-url/purl-spec\n// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model\nfunc ArtifactPurl(val string) attribute.KeyValue {\n\treturn ArtifactPurlKey.String(val)\n}\n\n// ArtifactVersion returns an attribute KeyValue conforming to the\n// \"artifact.version\" semantic conventions. It represents the version of the\n// artifact.\nfunc ArtifactVersion(val string) attribute.KeyValue {\n\treturn ArtifactVersionKey.String(val)\n}\n\n// Namespace: aws\nconst (\n\t// AWSBedrockGuardrailIDKey is the attribute Key conforming to the\n\t// \"aws.bedrock.guardrail.id\" semantic conventions. It represents the unique\n\t// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and\n\t// prevent unwanted behavior from model responses or user messages.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"sgi5gkybzqak\"\n\t//\n\t// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html\n\tAWSBedrockGuardrailIDKey = attribute.Key(\"aws.bedrock.guardrail.id\")\n\n\t// AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the\n\t// \"aws.bedrock.knowledge_base.id\" semantic conventions. It represents the\n\t// unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a\n\t// bank of information that can be queried by models to generate more relevant\n\t// responses and augment prompts.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"XFWUPB9PAW\"\n\t//\n\t// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html\n\tAWSBedrockKnowledgeBaseIDKey = attribute.Key(\"aws.bedrock.knowledge_base.id\")\n\n\t// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.attribute_definitions\" semantic conventions. It represents the\n\t// JSON-serialized value of each item in the `AttributeDefinitions` request\n\t// field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }\"\n\tAWSDynamoDBAttributeDefinitionsKey = attribute.Key(\"aws.dynamodb.attribute_definitions\")\n\n\t// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.attributes_to_get\" semantic conventions. It represents the\n\t// value of the `AttributesToGet` request parameter.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"lives\", \"id\"\n\tAWSDynamoDBAttributesToGetKey = attribute.Key(\"aws.dynamodb.attributes_to_get\")\n\n\t// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.consistent_read\" semantic conventions. It represents the value\n\t// of the `ConsistentRead` request parameter.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAWSDynamoDBConsistentReadKey = attribute.Key(\"aws.dynamodb.consistent_read\")\n\n\t// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.consumed_capacity\" semantic conventions. It represents the\n\t// JSON-serialized value of each item in the `ConsumedCapacity` response field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" :\n\t// { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\":\n\t// number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number,\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } },\n\t// \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number,\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\":\n\t// \"string\", \"WriteCapacityUnits\": number }\"\n\tAWSDynamoDBConsumedCapacityKey = attribute.Key(\"aws.dynamodb.consumed_capacity\")\n\n\t// AWSDynamoDBCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.count\" semantic conventions. It represents the value of the\n\t// `Count` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBCountKey = attribute.Key(\"aws.dynamodb.count\")\n\n\t// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.exclusive_start_table\" semantic conventions. It represents the\n\t// value of the `ExclusiveStartTableName` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Users\", \"CatsTable\"\n\tAWSDynamoDBExclusiveStartTableKey = attribute.Key(\"aws.dynamodb.exclusive_start_table\")\n\n\t// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to\n\t// the \"aws.dynamodb.global_secondary_index_updates\" semantic conventions. It\n\t// represents the JSON-serialized value of each item in the\n\t// `GlobalSecondaryIndexUpdates` request field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ {\n\t// \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": {\n\t// \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" },\n\t// \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\":\n\t// number } }\"\n\tAWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key(\"aws.dynamodb.global_secondary_index_updates\")\n\n\t// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.global_secondary_indexes\" semantic conventions. It represents\n\t// the JSON-serialized value of each item of the `GlobalSecondaryIndexes`\n\t// request field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\":\n\t// \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [\n\t// \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": {\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }\"\n\tAWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key(\"aws.dynamodb.global_secondary_indexes\")\n\n\t// AWSDynamoDBIndexNameKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.index_name\" semantic conventions. It represents the value of\n\t// the `IndexName` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"name_to_group\"\n\tAWSDynamoDBIndexNameKey = attribute.Key(\"aws.dynamodb.index_name\")\n\n\t// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.item_collection_metrics\" semantic conventions. It represents\n\t// the JSON-serialized value of the `ItemCollectionMetrics` response field.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob,\n\t// \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" :\n\t// \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\":\n\t// \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }\"\n\tAWSDynamoDBItemCollectionMetricsKey = attribute.Key(\"aws.dynamodb.item_collection_metrics\")\n\n\t// AWSDynamoDBLimitKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.limit\" semantic conventions. It represents the value of the\n\t// `Limit` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBLimitKey = attribute.Key(\"aws.dynamodb.limit\")\n\n\t// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.local_secondary_indexes\" semantic conventions. It represents\n\t// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request\n\t// field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\":\n\t// number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\",\n\t// \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ],\n\t// \"ProjectionType\": \"string\" } }\"\n\tAWSDynamoDBLocalSecondaryIndexesKey = attribute.Key(\"aws.dynamodb.local_secondary_indexes\")\n\n\t// AWSDynamoDBProjectionKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.projection\" semantic conventions. It represents the value of\n\t// the `ProjectionExpression` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Title\", \"Title, Price, Color\", \"Title, Description, RelatedItems,\n\t// ProductReviews\"\n\tAWSDynamoDBProjectionKey = attribute.Key(\"aws.dynamodb.projection\")\n\n\t// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.provisioned_read_capacity\" semantic conventions. It represents\n\t// the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 2.0\n\tAWSDynamoDBProvisionedReadCapacityKey = attribute.Key(\"aws.dynamodb.provisioned_read_capacity\")\n\n\t// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.provisioned_write_capacity\" semantic conventions. It represents\n\t// the value of the `ProvisionedThroughput.WriteCapacityUnits` request\n\t// parameter.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 2.0\n\tAWSDynamoDBProvisionedWriteCapacityKey = attribute.Key(\"aws.dynamodb.provisioned_write_capacity\")\n\n\t// AWSDynamoDBScanForwardKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.scan_forward\" semantic conventions. It represents the value of\n\t// the `ScanIndexForward` request parameter.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAWSDynamoDBScanForwardKey = attribute.Key(\"aws.dynamodb.scan_forward\")\n\n\t// AWSDynamoDBScannedCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.scanned_count\" semantic conventions. It represents the value of\n\t// the `ScannedCount` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 50\n\tAWSDynamoDBScannedCountKey = attribute.Key(\"aws.dynamodb.scanned_count\")\n\n\t// AWSDynamoDBSegmentKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.segment\" semantic conventions. It represents the value of the\n\t// `Segment` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBSegmentKey = attribute.Key(\"aws.dynamodb.segment\")\n\n\t// AWSDynamoDBSelectKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.select\" semantic conventions. It represents the value of the\n\t// `Select` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ALL_ATTRIBUTES\", \"COUNT\"\n\tAWSDynamoDBSelectKey = attribute.Key(\"aws.dynamodb.select\")\n\n\t// AWSDynamoDBTableCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.table_count\" semantic conventions. It represents the number of\n\t// items in the `TableNames` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 20\n\tAWSDynamoDBTableCountKey = attribute.Key(\"aws.dynamodb.table_count\")\n\n\t// AWSDynamoDBTableNamesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.table_names\" semantic conventions. It represents the keys in\n\t// the `RequestItems` object field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Users\", \"Cats\"\n\tAWSDynamoDBTableNamesKey = attribute.Key(\"aws.dynamodb.table_names\")\n\n\t// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.total_segments\" semantic conventions. It represents the value\n\t// of the `TotalSegments` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tAWSDynamoDBTotalSegmentsKey = attribute.Key(\"aws.dynamodb.total_segments\")\n\n\t// AWSECSClusterARNKey is the attribute Key conforming to the\n\t// \"aws.ecs.cluster.arn\" semantic conventions. It represents the ARN of an\n\t// [ECS cluster].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster\"\n\t//\n\t// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html\n\tAWSECSClusterARNKey = attribute.Key(\"aws.ecs.cluster.arn\")\n\n\t// AWSECSContainerARNKey is the attribute Key conforming to the\n\t// \"aws.ecs.container.arn\" semantic conventions. It represents the Amazon\n\t// Resource Name (ARN) of an [ECS container instance].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9\"\n\t//\n\t// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html\n\tAWSECSContainerARNKey = attribute.Key(\"aws.ecs.container.arn\")\n\n\t// AWSECSLaunchtypeKey is the attribute Key conforming to the\n\t// \"aws.ecs.launchtype\" semantic conventions. It represents the [launch type]\n\t// for an ECS task.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html\n\tAWSECSLaunchtypeKey = attribute.Key(\"aws.ecs.launchtype\")\n\n\t// AWSECSTaskARNKey is the attribute Key conforming to the \"aws.ecs.task.arn\"\n\t// semantic conventions. It represents the ARN of a running [ECS task].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b\",\n\t// \"arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd\"\n\t//\n\t// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids\n\tAWSECSTaskARNKey = attribute.Key(\"aws.ecs.task.arn\")\n\n\t// AWSECSTaskFamilyKey is the attribute Key conforming to the\n\t// \"aws.ecs.task.family\" semantic conventions. It represents the family name of\n\t// the [ECS task definition] used to create the ECS task.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-family\"\n\t//\n\t// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html\n\tAWSECSTaskFamilyKey = attribute.Key(\"aws.ecs.task.family\")\n\n\t// AWSECSTaskIDKey is the attribute Key conforming to the \"aws.ecs.task.id\"\n\t// semantic conventions. It represents the ID of a running ECS task. The ID MUST\n\t// be extracted from `task.arn`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10838bed-421f-43ef-870a-f43feacbbb5b\",\n\t// \"23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd\"\n\tAWSECSTaskIDKey = attribute.Key(\"aws.ecs.task.id\")\n\n\t// AWSECSTaskRevisionKey is the attribute Key conforming to the\n\t// \"aws.ecs.task.revision\" semantic conventions. It represents the revision for\n\t// the task definition used to create the ECS task.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"8\", \"26\"\n\tAWSECSTaskRevisionKey = attribute.Key(\"aws.ecs.task.revision\")\n\n\t// AWSEKSClusterARNKey is the attribute Key conforming to the\n\t// \"aws.eks.cluster.arn\" semantic conventions. It represents the ARN of an EKS\n\t// cluster.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster\"\n\tAWSEKSClusterARNKey = attribute.Key(\"aws.eks.cluster.arn\")\n\n\t// AWSExtendedRequestIDKey is the attribute Key conforming to the\n\t// \"aws.extended_request_id\" semantic conventions. It represents the AWS\n\t// extended request ID as returned in the response header `x-amz-id-2`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"\n\tAWSExtendedRequestIDKey = attribute.Key(\"aws.extended_request_id\")\n\n\t// AWSKinesisStreamNameKey is the attribute Key conforming to the\n\t// \"aws.kinesis.stream_name\" semantic conventions. It represents the name of the\n\t// AWS Kinesis [stream] the request refers to. Corresponds to the\n\t// `--stream-name` parameter of the Kinesis [describe-stream] operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"some-stream-name\"\n\t//\n\t// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html\n\t// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html\n\tAWSKinesisStreamNameKey = attribute.Key(\"aws.kinesis.stream_name\")\n\n\t// AWSLambdaInvokedARNKey is the attribute Key conforming to the\n\t// \"aws.lambda.invoked_arn\" semantic conventions. It represents the full invoked\n\t// ARN as provided on the `Context` passed to the function (\n\t// `Lambda-Runtime-Invoked-Function-Arn` header on the\n\t// `/runtime/invocation/next` applicable).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:lambda:us-east-1:123456:function:myfunction:myalias\"\n\t// Note: This may be different from `cloud.resource_id` if an alias is involved.\n\tAWSLambdaInvokedARNKey = attribute.Key(\"aws.lambda.invoked_arn\")\n\n\t// AWSLambdaResourceMappingIDKey is the attribute Key conforming to the\n\t// \"aws.lambda.resource_mapping.id\" semantic conventions. It represents the UUID\n\t// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda\n\t// function. It's contents are read by Lambda and used to trigger a function.\n\t// This isn't available in the lambda execution context or the lambda runtime\n\t// environtment. This is going to be populated by the AWS SDK for each language\n\t// when that UUID is present. Some of these operations are\n\t// Create/Delete/Get/List/Update EventSourceMapping.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"587ad24b-03b9-4413-8202-bbd56b36e5b7\"\n\t//\n\t// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html\n\tAWSLambdaResourceMappingIDKey = attribute.Key(\"aws.lambda.resource_mapping.id\")\n\n\t// AWSLogGroupARNsKey is the attribute Key conforming to the\n\t// \"aws.log.group.arns\" semantic conventions. It represents the Amazon Resource\n\t// Name(s) (ARN) of the AWS log group(s).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*\"\n\t// Note: See the [log group ARN format documentation].\n\t//\n\t// [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format\n\tAWSLogGroupARNsKey = attribute.Key(\"aws.log.group.arns\")\n\n\t// AWSLogGroupNamesKey is the attribute Key conforming to the\n\t// \"aws.log.group.names\" semantic conventions. It represents the name(s) of the\n\t// AWS log group(s) an application is writing to.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/aws/lambda/my-function\", \"opentelemetry-service\"\n\t// Note: Multiple log groups must be supported for cases like multi-container\n\t// applications, where a single application has sidecar containers, and each\n\t// write to their own log group.\n\tAWSLogGroupNamesKey = attribute.Key(\"aws.log.group.names\")\n\n\t// AWSLogStreamARNsKey is the attribute Key conforming to the\n\t// \"aws.log.stream.arns\" semantic conventions. It represents the ARN(s) of the\n\t// AWS log stream(s).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"\n\t// Note: See the [log stream ARN format documentation]. One log group can\n\t// contain several log streams, so these ARNs necessarily identify both a log\n\t// group and a log stream.\n\t//\n\t// [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format\n\tAWSLogStreamARNsKey = attribute.Key(\"aws.log.stream.arns\")\n\n\t// AWSLogStreamNamesKey is the attribute Key conforming to the\n\t// \"aws.log.stream.names\" semantic conventions. It represents the name(s) of the\n\t// AWS log stream(s) an application is writing to.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"\n\tAWSLogStreamNamesKey = attribute.Key(\"aws.log.stream.names\")\n\n\t// AWSRequestIDKey is the attribute Key conforming to the \"aws.request_id\"\n\t// semantic conventions. It represents the AWS request ID as returned in the\n\t// response headers `x-amzn-requestid`, `x-amzn-request-id` or\n\t// `x-amz-request-id`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"79b9da39-b7ae-508a-a6bc-864b2829c622\", \"C9ER4AJX75574TDJ\"\n\tAWSRequestIDKey = attribute.Key(\"aws.request_id\")\n\n\t// AWSS3BucketKey is the attribute Key conforming to the \"aws.s3.bucket\"\n\t// semantic conventions. It represents the S3 bucket name the request refers to.\n\t// Corresponds to the `--bucket` parameter of the [S3 API] operations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"some-bucket-name\"\n\t// Note: The `bucket` attribute is applicable to all S3 operations that\n\t// reference a bucket, i.e. that require the bucket name as a mandatory\n\t// parameter.\n\t// This applies to almost all S3 operations except `list-buckets`.\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\tAWSS3BucketKey = attribute.Key(\"aws.s3.bucket\")\n\n\t// AWSS3CopySourceKey is the attribute Key conforming to the\n\t// \"aws.s3.copy_source\" semantic conventions. It represents the source object\n\t// (in the form `bucket`/`key`) for the copy operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"someFile.yml\"\n\t// Note: The `copy_source` attribute applies to S3 copy operations and\n\t// corresponds to the `--copy-source` parameter\n\t// of the [copy-object operation within the S3 API].\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [copy-object]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3CopySourceKey = attribute.Key(\"aws.s3.copy_source\")\n\n\t// AWSS3DeleteKey is the attribute Key conforming to the \"aws.s3.delete\"\n\t// semantic conventions. It represents the delete request container that\n\t// specifies the objects to be deleted.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean\"\n\t// Note: The `delete` attribute is only applicable to the [delete-object]\n\t// operation.\n\t// The `delete` attribute corresponds to the `--delete` parameter of the\n\t// [delete-objects operation within the S3 API].\n\t//\n\t// [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html\n\t// [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html\n\tAWSS3DeleteKey = attribute.Key(\"aws.s3.delete\")\n\n\t// AWSS3KeyKey is the attribute Key conforming to the \"aws.s3.key\" semantic\n\t// conventions. It represents the S3 object key the request refers to.\n\t// Corresponds to the `--key` parameter of the [S3 API] operations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"someFile.yml\"\n\t// Note: The `key` attribute is applicable to all object-related S3 operations,\n\t// i.e. that require the object key as a mandatory parameter.\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [copy-object]\n\t//   - [delete-object]\n\t//   - [get-object]\n\t//   - [head-object]\n\t//   - [put-object]\n\t//   - [restore-object]\n\t//   - [select-object-content]\n\t//   - [abort-multipart-upload]\n\t//   - [complete-multipart-upload]\n\t//   - [create-multipart-upload]\n\t//   - [list-parts]\n\t//   - [upload-part]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\t// [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html\n\t// [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html\n\t// [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html\n\t// [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html\n\t// [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html\n\t// [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html\n\t// [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html\n\t// [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html\n\t// [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html\n\t// [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3KeyKey = attribute.Key(\"aws.s3.key\")\n\n\t// AWSS3PartNumberKey is the attribute Key conforming to the\n\t// \"aws.s3.part_number\" semantic conventions. It represents the part number of\n\t// the part being uploaded in a multipart-upload operation. This is a positive\n\t// integer between 1 and 10,000.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3456\n\t// Note: The `part_number` attribute is only applicable to the [upload-part]\n\t// and [upload-part-copy] operations.\n\t// The `part_number` attribute corresponds to the `--part-number` parameter of\n\t// the\n\t// [upload-part operation within the S3 API].\n\t//\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\t// [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\tAWSS3PartNumberKey = attribute.Key(\"aws.s3.part_number\")\n\n\t// AWSS3UploadIDKey is the attribute Key conforming to the \"aws.s3.upload_id\"\n\t// semantic conventions. It represents the upload ID that identifies the\n\t// multipart upload.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ\"\n\t// Note: The `upload_id` attribute applies to S3 multipart-upload operations and\n\t// corresponds to the `--upload-id` parameter\n\t// of the [S3 API] multipart operations.\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [abort-multipart-upload]\n\t//   - [complete-multipart-upload]\n\t//   - [list-parts]\n\t//   - [upload-part]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\t// [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html\n\t// [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html\n\t// [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3UploadIDKey = attribute.Key(\"aws.s3.upload_id\")\n\n\t// AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the\n\t// \"aws.secretsmanager.secret.arn\" semantic conventions. It represents the ARN\n\t// of the Secret stored in the Secrets Mangger.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters\"\n\tAWSSecretsmanagerSecretARNKey = attribute.Key(\"aws.secretsmanager.secret.arn\")\n\n\t// AWSSNSTopicARNKey is the attribute Key conforming to the \"aws.sns.topic.arn\"\n\t// semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon\n\t// SNS [topic] is a logical access point that acts as a communication channel.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE\"\n\t//\n\t// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html\n\tAWSSNSTopicARNKey = attribute.Key(\"aws.sns.topic.arn\")\n\n\t// AWSSQSQueueURLKey is the attribute Key conforming to the \"aws.sqs.queue.url\"\n\t// semantic conventions. It represents the URL of the AWS SQS Queue. It's a\n\t// unique identifier for a queue in Amazon Simple Queue Service (SQS) and is\n\t// used to access the queue and perform actions on it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue\"\n\tAWSSQSQueueURLKey = attribute.Key(\"aws.sqs.queue.url\")\n\n\t// AWSStepFunctionsActivityARNKey is the attribute Key conforming to the\n\t// \"aws.step_functions.activity.arn\" semantic conventions. It represents the ARN\n\t// of the AWS Step Functions Activity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:states:us-east-1:123456789012:activity:get-greeting\"\n\tAWSStepFunctionsActivityARNKey = attribute.Key(\"aws.step_functions.activity.arn\")\n\n\t// AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the\n\t// \"aws.step_functions.state_machine.arn\" semantic conventions. It represents\n\t// the ARN of the AWS Step Functions State Machine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1\"\n\tAWSStepFunctionsStateMachineARNKey = attribute.Key(\"aws.step_functions.state_machine.arn\")\n)\n\n// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the\n// \"aws.bedrock.guardrail.id\" semantic conventions. It represents the unique\n// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and\n// prevent unwanted behavior from model responses or user messages.\n//\n// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html\nfunc AWSBedrockGuardrailID(val string) attribute.KeyValue {\n\treturn AWSBedrockGuardrailIDKey.String(val)\n}\n\n// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the\n// \"aws.bedrock.knowledge_base.id\" semantic conventions. It represents the unique\n// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of\n// information that can be queried by models to generate more relevant responses\n// and augment prompts.\n//\n// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html\nfunc AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue {\n\treturn AWSBedrockKnowledgeBaseIDKey.String(val)\n}\n\n// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.attribute_definitions\" semantic conventions. It represents\n// the JSON-serialized value of each item in the `AttributeDefinitions` request\n// field.\nfunc AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)\n}\n\n// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.attributes_to_get\" semantic conventions. It represents the value\n// of the `AttributesToGet` request parameter.\nfunc AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBAttributesToGetKey.StringSlice(val)\n}\n\n// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.consistent_read\" semantic conventions. It represents the value\n// of the `ConsistentRead` request parameter.\nfunc AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {\n\treturn AWSDynamoDBConsistentReadKey.Bool(val)\n}\n\n// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.consumed_capacity\" semantic conventions. It represents the\n// JSON-serialized value of each item in the `ConsumedCapacity` response field.\nfunc AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBConsumedCapacityKey.StringSlice(val)\n}\n\n// AWSDynamoDBCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.count\" semantic conventions. It represents the value of the\n// `Count` response parameter.\nfunc AWSDynamoDBCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBCountKey.Int(val)\n}\n\n// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.exclusive_start_table\" semantic conventions. It represents the\n// value of the `ExclusiveStartTableName` request parameter.\nfunc AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {\n\treturn AWSDynamoDBExclusiveStartTableKey.String(val)\n}\n\n// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue\n// conforming to the \"aws.dynamodb.global_secondary_index_updates\" semantic\n// conventions. It represents the JSON-serialized value of each item in the\n// `GlobalSecondaryIndexUpdates` request field.\nfunc AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)\n}\n\n// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.global_secondary_indexes\" semantic conventions. It\n// represents the JSON-serialized value of each item of the\n// `GlobalSecondaryIndexes` request field.\nfunc AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)\n}\n\n// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.index_name\" semantic conventions. It represents the value of the\n// `IndexName` request parameter.\nfunc AWSDynamoDBIndexName(val string) attribute.KeyValue {\n\treturn AWSDynamoDBIndexNameKey.String(val)\n}\n\n// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.item_collection_metrics\" semantic conventions. It represents\n// the JSON-serialized value of the `ItemCollectionMetrics` response field.\nfunc AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {\n\treturn AWSDynamoDBItemCollectionMetricsKey.String(val)\n}\n\n// AWSDynamoDBLimit returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.limit\" semantic conventions. It represents the value of the\n// `Limit` request parameter.\nfunc AWSDynamoDBLimit(val int) attribute.KeyValue {\n\treturn AWSDynamoDBLimitKey.Int(val)\n}\n\n// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.local_secondary_indexes\" semantic conventions. It represents\n// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request\n// field.\nfunc AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)\n}\n\n// AWSDynamoDBProjection returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.projection\" semantic conventions. It represents the value of the\n// `ProjectionExpression` request parameter.\nfunc AWSDynamoDBProjection(val string) attribute.KeyValue {\n\treturn AWSDynamoDBProjectionKey.String(val)\n}\n\n// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.provisioned_read_capacity\" semantic conventions. It\n// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request\n// parameter.\nfunc AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {\n\treturn AWSDynamoDBProvisionedReadCapacityKey.Float64(val)\n}\n\n// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming\n// to the \"aws.dynamodb.provisioned_write_capacity\" semantic conventions. It\n// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request\n// parameter.\nfunc AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {\n\treturn AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)\n}\n\n// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.scan_forward\" semantic conventions. It represents the value of\n// the `ScanIndexForward` request parameter.\nfunc AWSDynamoDBScanForward(val bool) attribute.KeyValue {\n\treturn AWSDynamoDBScanForwardKey.Bool(val)\n}\n\n// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.scanned_count\" semantic conventions. It represents the value of\n// the `ScannedCount` response parameter.\nfunc AWSDynamoDBScannedCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBScannedCountKey.Int(val)\n}\n\n// AWSDynamoDBSegment returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.segment\" semantic conventions. It represents the value of the\n// `Segment` request parameter.\nfunc AWSDynamoDBSegment(val int) attribute.KeyValue {\n\treturn AWSDynamoDBSegmentKey.Int(val)\n}\n\n// AWSDynamoDBSelect returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.select\" semantic conventions. It represents the value of the\n// `Select` request parameter.\nfunc AWSDynamoDBSelect(val string) attribute.KeyValue {\n\treturn AWSDynamoDBSelectKey.String(val)\n}\n\n// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.table_count\" semantic conventions. It represents the number of\n// items in the `TableNames` response parameter.\nfunc AWSDynamoDBTableCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBTableCountKey.Int(val)\n}\n\n// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.table_names\" semantic conventions. It represents the keys in the\n// `RequestItems` object field.\nfunc AWSDynamoDBTableNames(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBTableNamesKey.StringSlice(val)\n}\n\n// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.total_segments\" semantic conventions. It represents the value of\n// the `TotalSegments` request parameter.\nfunc AWSDynamoDBTotalSegments(val int) attribute.KeyValue {\n\treturn AWSDynamoDBTotalSegmentsKey.Int(val)\n}\n\n// AWSECSClusterARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.cluster.arn\" semantic conventions. It represents the ARN of an\n// [ECS cluster].\n//\n// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html\nfunc AWSECSClusterARN(val string) attribute.KeyValue {\n\treturn AWSECSClusterARNKey.String(val)\n}\n\n// AWSECSContainerARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.container.arn\" semantic conventions. It represents the Amazon\n// Resource Name (ARN) of an [ECS container instance].\n//\n// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html\nfunc AWSECSContainerARN(val string) attribute.KeyValue {\n\treturn AWSECSContainerARNKey.String(val)\n}\n\n// AWSECSTaskARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.arn\" semantic conventions. It represents the ARN of a running\n// [ECS task].\n//\n// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids\nfunc AWSECSTaskARN(val string) attribute.KeyValue {\n\treturn AWSECSTaskARNKey.String(val)\n}\n\n// AWSECSTaskFamily returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.family\" semantic conventions. It represents the family name of\n// the [ECS task definition] used to create the ECS task.\n//\n// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html\nfunc AWSECSTaskFamily(val string) attribute.KeyValue {\n\treturn AWSECSTaskFamilyKey.String(val)\n}\n\n// AWSECSTaskID returns an attribute KeyValue conforming to the \"aws.ecs.task.id\"\n// semantic conventions. It represents the ID of a running ECS task. The ID MUST\n// be extracted from `task.arn`.\nfunc AWSECSTaskID(val string) attribute.KeyValue {\n\treturn AWSECSTaskIDKey.String(val)\n}\n\n// AWSECSTaskRevision returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.revision\" semantic conventions. It represents the revision for\n// the task definition used to create the ECS task.\nfunc AWSECSTaskRevision(val string) attribute.KeyValue {\n\treturn AWSECSTaskRevisionKey.String(val)\n}\n\n// AWSEKSClusterARN returns an attribute KeyValue conforming to the\n// \"aws.eks.cluster.arn\" semantic conventions. It represents the ARN of an EKS\n// cluster.\nfunc AWSEKSClusterARN(val string) attribute.KeyValue {\n\treturn AWSEKSClusterARNKey.String(val)\n}\n\n// AWSExtendedRequestID returns an attribute KeyValue conforming to the\n// \"aws.extended_request_id\" semantic conventions. It represents the AWS extended\n// request ID as returned in the response header `x-amz-id-2`.\nfunc AWSExtendedRequestID(val string) attribute.KeyValue {\n\treturn AWSExtendedRequestIDKey.String(val)\n}\n\n// AWSKinesisStreamName returns an attribute KeyValue conforming to the\n// \"aws.kinesis.stream_name\" semantic conventions. It represents the name of the\n// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`\n//  parameter of the Kinesis [describe-stream] operation.\n//\n// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html\n// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html\nfunc AWSKinesisStreamName(val string) attribute.KeyValue {\n\treturn AWSKinesisStreamNameKey.String(val)\n}\n\n// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the\n// \"aws.lambda.invoked_arn\" semantic conventions. It represents the full invoked\n// ARN as provided on the `Context` passed to the function (\n// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`\n//  applicable).\nfunc AWSLambdaInvokedARN(val string) attribute.KeyValue {\n\treturn AWSLambdaInvokedARNKey.String(val)\n}\n\n// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the\n// \"aws.lambda.resource_mapping.id\" semantic conventions. It represents the UUID\n// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda\n// function. It's contents are read by Lambda and used to trigger a function.\n// This isn't available in the lambda execution context or the lambda runtime\n// environtment. This is going to be populated by the AWS SDK for each language\n// when that UUID is present. Some of these operations are\n// Create/Delete/Get/List/Update EventSourceMapping.\n//\n// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html\nfunc AWSLambdaResourceMappingID(val string) attribute.KeyValue {\n\treturn AWSLambdaResourceMappingIDKey.String(val)\n}\n\n// AWSLogGroupARNs returns an attribute KeyValue conforming to the\n// \"aws.log.group.arns\" semantic conventions. It represents the Amazon Resource\n// Name(s) (ARN) of the AWS log group(s).\nfunc AWSLogGroupARNs(val ...string) attribute.KeyValue {\n\treturn AWSLogGroupARNsKey.StringSlice(val)\n}\n\n// AWSLogGroupNames returns an attribute KeyValue conforming to the\n// \"aws.log.group.names\" semantic conventions. It represents the name(s) of the\n// AWS log group(s) an application is writing to.\nfunc AWSLogGroupNames(val ...string) attribute.KeyValue {\n\treturn AWSLogGroupNamesKey.StringSlice(val)\n}\n\n// AWSLogStreamARNs returns an attribute KeyValue conforming to the\n// \"aws.log.stream.arns\" semantic conventions. It represents the ARN(s) of the\n// AWS log stream(s).\nfunc AWSLogStreamARNs(val ...string) attribute.KeyValue {\n\treturn AWSLogStreamARNsKey.StringSlice(val)\n}\n\n// AWSLogStreamNames returns an attribute KeyValue conforming to the\n// \"aws.log.stream.names\" semantic conventions. It represents the name(s) of the\n// AWS log stream(s) an application is writing to.\nfunc AWSLogStreamNames(val ...string) attribute.KeyValue {\n\treturn AWSLogStreamNamesKey.StringSlice(val)\n}\n\n// AWSRequestID returns an attribute KeyValue conforming to the \"aws.request_id\"\n// semantic conventions. It represents the AWS request ID as returned in the\n// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`\n// .\nfunc AWSRequestID(val string) attribute.KeyValue {\n\treturn AWSRequestIDKey.String(val)\n}\n\n// AWSS3Bucket returns an attribute KeyValue conforming to the \"aws.s3.bucket\"\n// semantic conventions. It represents the S3 bucket name the request refers to.\n// Corresponds to the `--bucket` parameter of the [S3 API] operations.\n//\n// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\nfunc AWSS3Bucket(val string) attribute.KeyValue {\n\treturn AWSS3BucketKey.String(val)\n}\n\n// AWSS3CopySource returns an attribute KeyValue conforming to the\n// \"aws.s3.copy_source\" semantic conventions. It represents the source object (in\n// the form `bucket`/`key`) for the copy operation.\nfunc AWSS3CopySource(val string) attribute.KeyValue {\n\treturn AWSS3CopySourceKey.String(val)\n}\n\n// AWSS3Delete returns an attribute KeyValue conforming to the \"aws.s3.delete\"\n// semantic conventions. It represents the delete request container that\n// specifies the objects to be deleted.\nfunc AWSS3Delete(val string) attribute.KeyValue {\n\treturn AWSS3DeleteKey.String(val)\n}\n\n// AWSS3Key returns an attribute KeyValue conforming to the \"aws.s3.key\" semantic\n// conventions. It represents the S3 object key the request refers to.\n// Corresponds to the `--key` parameter of the [S3 API] operations.\n//\n// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\nfunc AWSS3Key(val string) attribute.KeyValue {\n\treturn AWSS3KeyKey.String(val)\n}\n\n// AWSS3PartNumber returns an attribute KeyValue conforming to the\n// \"aws.s3.part_number\" semantic conventions. It represents the part number of\n// the part being uploaded in a multipart-upload operation. This is a positive\n// integer between 1 and 10,000.\nfunc AWSS3PartNumber(val int) attribute.KeyValue {\n\treturn AWSS3PartNumberKey.Int(val)\n}\n\n// AWSS3UploadID returns an attribute KeyValue conforming to the\n// \"aws.s3.upload_id\" semantic conventions. It represents the upload ID that\n// identifies the multipart upload.\nfunc AWSS3UploadID(val string) attribute.KeyValue {\n\treturn AWSS3UploadIDKey.String(val)\n}\n\n// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the\n// \"aws.secretsmanager.secret.arn\" semantic conventions. It represents the ARN of\n// the Secret stored in the Secrets Mangger.\nfunc AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {\n\treturn AWSSecretsmanagerSecretARNKey.String(val)\n}\n\n// AWSSNSTopicARN returns an attribute KeyValue conforming to the\n// \"aws.sns.topic.arn\" semantic conventions. It represents the ARN of the AWS SNS\n// Topic. An Amazon SNS [topic] is a logical access point that acts as a\n// communication channel.\n//\n// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html\nfunc AWSSNSTopicARN(val string) attribute.KeyValue {\n\treturn AWSSNSTopicARNKey.String(val)\n}\n\n// AWSSQSQueueURL returns an attribute KeyValue conforming to the\n// \"aws.sqs.queue.url\" semantic conventions. It represents the URL of the AWS SQS\n// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service\n// (SQS) and is used to access the queue and perform actions on it.\nfunc AWSSQSQueueURL(val string) attribute.KeyValue {\n\treturn AWSSQSQueueURLKey.String(val)\n}\n\n// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the\n// \"aws.step_functions.activity.arn\" semantic conventions. It represents the ARN\n// of the AWS Step Functions Activity.\nfunc AWSStepFunctionsActivityARN(val string) attribute.KeyValue {\n\treturn AWSStepFunctionsActivityARNKey.String(val)\n}\n\n// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to\n// the \"aws.step_functions.state_machine.arn\" semantic conventions. It represents\n// the ARN of the AWS Step Functions State Machine.\nfunc AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue {\n\treturn AWSStepFunctionsStateMachineARNKey.String(val)\n}\n\n// Enum values for aws.ecs.launchtype\nvar (\n\t// Amazon EC2\n\t// Stability: development\n\tAWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String(\"ec2\")\n\t// Amazon Fargate\n\t// Stability: development\n\tAWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String(\"fargate\")\n)\n\n// Namespace: azure\nconst (\n\t// AzureClientIDKey is the attribute Key conforming to the \"azure.client.id\"\n\t// semantic conventions. It represents the unique identifier of the client\n\t// instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"3ba4827d-4422-483f-b59f-85b74211c11d\", \"storage-client-1\"\n\tAzureClientIDKey = attribute.Key(\"azure.client.id\")\n\n\t// AzureCosmosDBConnectionModeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.connection.mode\" semantic conventions. It represents the\n\t// cosmos client connection mode.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAzureCosmosDBConnectionModeKey = attribute.Key(\"azure.cosmosdb.connection.mode\")\n\n\t// AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.consistency.level\" semantic conventions. It represents the\n\t// account or request [consistency level].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Eventual\", \"ConsistentPrefix\", \"BoundedStaleness\", \"Strong\",\n\t// \"Session\"\n\t//\n\t// [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels\n\tAzureCosmosDBConsistencyLevelKey = attribute.Key(\"azure.cosmosdb.consistency.level\")\n\n\t// AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to\n\t// the \"azure.cosmosdb.operation.contacted_regions\" semantic conventions. It\n\t// represents the list of regions contacted during operation in the order that\n\t// they were contacted. If there is more than one region listed, it indicates\n\t// that the operation was performed on multiple regions i.e. cross-regional\n\t// call.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"North Central US\", \"Australia East\", \"Australia Southeast\"\n\t// Note: Region name matches the format of `displayName` in [Azure Location API]\n\t//\n\t// [Azure Location API]: https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location\n\tAzureCosmosDBOperationContactedRegionsKey = attribute.Key(\"azure.cosmosdb.operation.contacted_regions\")\n\n\t// AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.operation.request_charge\" semantic conventions. It represents\n\t// the number of request units consumed by the operation.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 46.18, 1.0\n\tAzureCosmosDBOperationRequestChargeKey = attribute.Key(\"azure.cosmosdb.operation.request_charge\")\n\n\t// AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.request.body.size\" semantic conventions. It represents the\n\t// request payload size in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAzureCosmosDBRequestBodySizeKey = attribute.Key(\"azure.cosmosdb.request.body.size\")\n\n\t// AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.response.sub_status_code\" semantic conventions. It represents\n\t// the cosmos DB sub status code.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1000, 1002\n\tAzureCosmosDBResponseSubStatusCodeKey = attribute.Key(\"azure.cosmosdb.response.sub_status_code\")\n\n\t// AzureResourceProviderNamespaceKey is the attribute Key conforming to the\n\t// \"azure.resource_provider.namespace\" semantic conventions. It represents the\n\t// [Azure Resource Provider Namespace] as recognized by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Microsoft.Storage\", \"Microsoft.KeyVault\", \"Microsoft.ServiceBus\"\n\t//\n\t// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers\n\tAzureResourceProviderNamespaceKey = attribute.Key(\"azure.resource_provider.namespace\")\n\n\t// AzureServiceRequestIDKey is the attribute Key conforming to the\n\t// \"azure.service.request.id\" semantic conventions. It represents the unique\n\t// identifier of the service request. It's generated by the Azure service and\n\t// returned with the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"00000000-0000-0000-0000-000000000000\"\n\tAzureServiceRequestIDKey = attribute.Key(\"azure.service.request.id\")\n)\n\n// AzureClientID returns an attribute KeyValue conforming to the\n// \"azure.client.id\" semantic conventions. It represents the unique identifier of\n// the client instance.\nfunc AzureClientID(val string) attribute.KeyValue {\n\treturn AzureClientIDKey.String(val)\n}\n\n// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue\n// conforming to the \"azure.cosmosdb.operation.contacted_regions\" semantic\n// conventions. It represents the list of regions contacted during operation in\n// the order that they were contacted. If there is more than one region listed,\n// it indicates that the operation was performed on multiple regions i.e.\n// cross-regional call.\nfunc AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue {\n\treturn AzureCosmosDBOperationContactedRegionsKey.StringSlice(val)\n}\n\n// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming\n// to the \"azure.cosmosdb.operation.request_charge\" semantic conventions. It\n// represents the number of request units consumed by the operation.\nfunc AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue {\n\treturn AzureCosmosDBOperationRequestChargeKey.Float64(val)\n}\n\n// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the\n// \"azure.cosmosdb.request.body.size\" semantic conventions. It represents the\n// request payload size in bytes.\nfunc AzureCosmosDBRequestBodySize(val int) attribute.KeyValue {\n\treturn AzureCosmosDBRequestBodySizeKey.Int(val)\n}\n\n// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to\n// the \"azure.cosmosdb.response.sub_status_code\" semantic conventions. It\n// represents the cosmos DB sub status code.\nfunc AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue {\n\treturn AzureCosmosDBResponseSubStatusCodeKey.Int(val)\n}\n\n// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the\n// \"azure.resource_provider.namespace\" semantic conventions. It represents the\n// [Azure Resource Provider Namespace] as recognized by the client.\n//\n// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers\nfunc AzureResourceProviderNamespace(val string) attribute.KeyValue {\n\treturn AzureResourceProviderNamespaceKey.String(val)\n}\n\n// AzureServiceRequestID returns an attribute KeyValue conforming to the\n// \"azure.service.request.id\" semantic conventions. It represents the unique\n// identifier of the service request. It's generated by the Azure service and\n// returned with the response.\nfunc AzureServiceRequestID(val string) attribute.KeyValue {\n\treturn AzureServiceRequestIDKey.String(val)\n}\n\n// Enum values for azure.cosmosdb.connection.mode\nvar (\n\t// Gateway (HTTP) connection.\n\t// Stability: development\n\tAzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String(\"gateway\")\n\t// Direct connection.\n\t// Stability: development\n\tAzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String(\"direct\")\n)\n\n// Enum values for azure.cosmosdb.consistency.level\nvar (\n\t// Strong\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String(\"Strong\")\n\t// Bounded Staleness\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String(\"BoundedStaleness\")\n\t// Session\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String(\"Session\")\n\t// Eventual\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String(\"Eventual\")\n\t// Consistent Prefix\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String(\"ConsistentPrefix\")\n)\n\n// Namespace: browser\nconst (\n\t// BrowserBrandsKey is the attribute Key conforming to the \"browser.brands\"\n\t// semantic conventions. It represents the array of brand name and version\n\t// separated by a space.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \" Not A;Brand 99\", \"Chromium 99\", \"Chrome 99\"\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.brands`).\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\tBrowserBrandsKey = attribute.Key(\"browser.brands\")\n\n\t// BrowserLanguageKey is the attribute Key conforming to the \"browser.language\"\n\t// semantic conventions. It represents the preferred language of the user using\n\t// the browser.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"en\", \"en-US\", \"fr\", \"fr-FR\"\n\t// Note: This value is intended to be taken from the Navigator API\n\t// `navigator.language`.\n\tBrowserLanguageKey = attribute.Key(\"browser.language\")\n\n\t// BrowserMobileKey is the attribute Key conforming to the \"browser.mobile\"\n\t// semantic conventions. It represents a boolean that is true if the browser is\n\t// running on a mobile device.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be\n\t// left unset.\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\tBrowserMobileKey = attribute.Key(\"browser.mobile\")\n\n\t// BrowserPlatformKey is the attribute Key conforming to the \"browser.platform\"\n\t// semantic conventions. It represents the platform on which the browser is\n\t// running.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Windows\", \"macOS\", \"Android\"\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.platform`). If unavailable, the legacy\n\t// `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD\n\t// be left unset in order for the values to be consistent.\n\t// The list of possible values is defined in the\n\t// [W3C User-Agent Client Hints specification]. Note that some (but not all) of\n\t// these values can overlap with values in the\n\t// [`os.type` and `os.name` attributes]. However, for consistency, the values in\n\t// the `browser.platform` attribute should capture the exact value that the user\n\t// agent provides.\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\t// [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform\n\t// [`os.type` and `os.name` attributes]: ./os.md\n\tBrowserPlatformKey = attribute.Key(\"browser.platform\")\n)\n\n// BrowserBrands returns an attribute KeyValue conforming to the \"browser.brands\"\n// semantic conventions. It represents the array of brand name and version\n// separated by a space.\nfunc BrowserBrands(val ...string) attribute.KeyValue {\n\treturn BrowserBrandsKey.StringSlice(val)\n}\n\n// BrowserLanguage returns an attribute KeyValue conforming to the\n// \"browser.language\" semantic conventions. It represents the preferred language\n// of the user using the browser.\nfunc BrowserLanguage(val string) attribute.KeyValue {\n\treturn BrowserLanguageKey.String(val)\n}\n\n// BrowserMobile returns an attribute KeyValue conforming to the \"browser.mobile\"\n// semantic conventions. It represents a boolean that is true if the browser is\n// running on a mobile device.\nfunc BrowserMobile(val bool) attribute.KeyValue {\n\treturn BrowserMobileKey.Bool(val)\n}\n\n// BrowserPlatform returns an attribute KeyValue conforming to the\n// \"browser.platform\" semantic conventions. It represents the platform on which\n// the browser is running.\nfunc BrowserPlatform(val string) attribute.KeyValue {\n\treturn BrowserPlatformKey.String(val)\n}\n\n// Namespace: cassandra\nconst (\n\t// CassandraConsistencyLevelKey is the attribute Key conforming to the\n\t// \"cassandra.consistency.level\" semantic conventions. It represents the\n\t// consistency level of the query. Based on consistency values from [CQL].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html\n\tCassandraConsistencyLevelKey = attribute.Key(\"cassandra.consistency.level\")\n\n\t// CassandraCoordinatorDCKey is the attribute Key conforming to the\n\t// \"cassandra.coordinator.dc\" semantic conventions. It represents the data\n\t// center of the coordinating node for a query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: us-west-2\n\tCassandraCoordinatorDCKey = attribute.Key(\"cassandra.coordinator.dc\")\n\n\t// CassandraCoordinatorIDKey is the attribute Key conforming to the\n\t// \"cassandra.coordinator.id\" semantic conventions. It represents the ID of the\n\t// coordinating node for a query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: be13faa2-8574-4d71-926d-27f16cf8a7af\n\tCassandraCoordinatorIDKey = attribute.Key(\"cassandra.coordinator.id\")\n\n\t// CassandraPageSizeKey is the attribute Key conforming to the\n\t// \"cassandra.page.size\" semantic conventions. It represents the fetch size used\n\t// for paging, i.e. how many rows will be returned at once.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 5000\n\tCassandraPageSizeKey = attribute.Key(\"cassandra.page.size\")\n\n\t// CassandraQueryIdempotentKey is the attribute Key conforming to the\n\t// \"cassandra.query.idempotent\" semantic conventions. It represents the whether\n\t// or not the query is idempotent.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tCassandraQueryIdempotentKey = attribute.Key(\"cassandra.query.idempotent\")\n\n\t// CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the\n\t// \"cassandra.speculative_execution.count\" semantic conventions. It represents\n\t// the number of times a query was speculatively executed. Not set or `0` if the\n\t// query was not executed speculatively.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 2\n\tCassandraSpeculativeExecutionCountKey = attribute.Key(\"cassandra.speculative_execution.count\")\n)\n\n// CassandraCoordinatorDC returns an attribute KeyValue conforming to the\n// \"cassandra.coordinator.dc\" semantic conventions. It represents the data center\n// of the coordinating node for a query.\nfunc CassandraCoordinatorDC(val string) attribute.KeyValue {\n\treturn CassandraCoordinatorDCKey.String(val)\n}\n\n// CassandraCoordinatorID returns an attribute KeyValue conforming to the\n// \"cassandra.coordinator.id\" semantic conventions. It represents the ID of the\n// coordinating node for a query.\nfunc CassandraCoordinatorID(val string) attribute.KeyValue {\n\treturn CassandraCoordinatorIDKey.String(val)\n}\n\n// CassandraPageSize returns an attribute KeyValue conforming to the\n// \"cassandra.page.size\" semantic conventions. It represents the fetch size used\n// for paging, i.e. how many rows will be returned at once.\nfunc CassandraPageSize(val int) attribute.KeyValue {\n\treturn CassandraPageSizeKey.Int(val)\n}\n\n// CassandraQueryIdempotent returns an attribute KeyValue conforming to the\n// \"cassandra.query.idempotent\" semantic conventions. It represents the whether\n// or not the query is idempotent.\nfunc CassandraQueryIdempotent(val bool) attribute.KeyValue {\n\treturn CassandraQueryIdempotentKey.Bool(val)\n}\n\n// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to\n// the \"cassandra.speculative_execution.count\" semantic conventions. It\n// represents the number of times a query was speculatively executed. Not set or\n// `0` if the query was not executed speculatively.\nfunc CassandraSpeculativeExecutionCount(val int) attribute.KeyValue {\n\treturn CassandraSpeculativeExecutionCountKey.Int(val)\n}\n\n// Enum values for cassandra.consistency.level\nvar (\n\t// All\n\t// Stability: development\n\tCassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String(\"all\")\n\t// Each Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String(\"each_quorum\")\n\t// Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String(\"quorum\")\n\t// Local Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String(\"local_quorum\")\n\t// One\n\t// Stability: development\n\tCassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String(\"one\")\n\t// Two\n\t// Stability: development\n\tCassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String(\"two\")\n\t// Three\n\t// Stability: development\n\tCassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String(\"three\")\n\t// Local One\n\t// Stability: development\n\tCassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String(\"local_one\")\n\t// Any\n\t// Stability: development\n\tCassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String(\"any\")\n\t// Serial\n\t// Stability: development\n\tCassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String(\"serial\")\n\t// Local Serial\n\t// Stability: development\n\tCassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String(\"local_serial\")\n)\n\n// Namespace: cicd\nconst (\n\t// CICDPipelineActionNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.action.name\" semantic conventions. It represents the kind of\n\t// action a pipeline run is performing.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"BUILD\", \"RUN\", \"SYNC\"\n\tCICDPipelineActionNameKey = attribute.Key(\"cicd.pipeline.action.name\")\n\n\t// CICDPipelineNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.name\" semantic conventions. It represents the human readable\n\t// name of the pipeline within a CI/CD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Build and Test\", \"Lint\", \"Deploy Go Project\",\n\t// \"deploy_to_environment\"\n\tCICDPipelineNameKey = attribute.Key(\"cicd.pipeline.name\")\n\n\t// CICDPipelineResultKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.result\" semantic conventions. It represents the result of a\n\t// pipeline run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"timeout\", \"skipped\"\n\tCICDPipelineResultKey = attribute.Key(\"cicd.pipeline.result\")\n\n\t// CICDPipelineRunIDKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.id\" semantic conventions. It represents the unique\n\t// identifier of a pipeline run within a CI/CD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"120912\"\n\tCICDPipelineRunIDKey = attribute.Key(\"cicd.pipeline.run.id\")\n\n\t// CICDPipelineRunStateKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.state\" semantic conventions. It represents the pipeline\n\t// run goes through these states during its lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pending\", \"executing\", \"finalizing\"\n\tCICDPipelineRunStateKey = attribute.Key(\"cicd.pipeline.run.state\")\n\n\t// CICDPipelineRunURLFullKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.url.full\" semantic conventions. It represents the [URL] of\n\t// the pipeline run, providing the complete address in order to locate and\n\t// identify the pipeline run.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDPipelineRunURLFullKey = attribute.Key(\"cicd.pipeline.run.url.full\")\n\n\t// CICDPipelineTaskNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.name\" semantic conventions. It represents the human\n\t// readable name of a task within a pipeline. Task here most closely aligns with\n\t// a [computing process] in a pipeline. Other terms for tasks include commands,\n\t// steps, and procedures.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Run GoLang Linter\", \"Go Build\", \"go-test\", \"deploy_binary\"\n\t//\n\t// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)\n\tCICDPipelineTaskNameKey = attribute.Key(\"cicd.pipeline.task.name\")\n\n\t// CICDPipelineTaskRunIDKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.id\" semantic conventions. It represents the unique\n\t// identifier of a task run within a pipeline.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"12097\"\n\tCICDPipelineTaskRunIDKey = attribute.Key(\"cicd.pipeline.task.run.id\")\n\n\t// CICDPipelineTaskRunResultKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.result\" semantic conventions. It represents the\n\t// result of a task run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"timeout\", \"skipped\"\n\tCICDPipelineTaskRunResultKey = attribute.Key(\"cicd.pipeline.task.run.result\")\n\n\t// CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.url.full\" semantic conventions. It represents the\n\t// [URL] of the pipeline task run, providing the complete address in order to\n\t// locate and identify the pipeline task run.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDPipelineTaskRunURLFullKey = attribute.Key(\"cicd.pipeline.task.run.url.full\")\n\n\t// CICDPipelineTaskTypeKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.type\" semantic conventions. It represents the type of the\n\t// task within a pipeline.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"build\", \"test\", \"deploy\"\n\tCICDPipelineTaskTypeKey = attribute.Key(\"cicd.pipeline.task.type\")\n\n\t// CICDSystemComponentKey is the attribute Key conforming to the\n\t// \"cicd.system.component\" semantic conventions. It represents the name of a\n\t// component of the CICD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"controller\", \"scheduler\", \"agent\"\n\tCICDSystemComponentKey = attribute.Key(\"cicd.system.component\")\n\n\t// CICDWorkerIDKey is the attribute Key conforming to the \"cicd.worker.id\"\n\t// semantic conventions. It represents the unique identifier of a worker within\n\t// a CICD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"abc123\", \"10.0.1.2\", \"controller\"\n\tCICDWorkerIDKey = attribute.Key(\"cicd.worker.id\")\n\n\t// CICDWorkerNameKey is the attribute Key conforming to the \"cicd.worker.name\"\n\t// semantic conventions. It represents the name of a worker within a CICD\n\t// system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"agent-abc\", \"controller\", \"Ubuntu LTS\"\n\tCICDWorkerNameKey = attribute.Key(\"cicd.worker.name\")\n\n\t// CICDWorkerStateKey is the attribute Key conforming to the \"cicd.worker.state\"\n\t// semantic conventions. It represents the state of a CICD worker / agent.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"idle\", \"busy\", \"down\"\n\tCICDWorkerStateKey = attribute.Key(\"cicd.worker.state\")\n\n\t// CICDWorkerURLFullKey is the attribute Key conforming to the\n\t// \"cicd.worker.url.full\" semantic conventions. It represents the [URL] of the\n\t// worker, providing the complete address in order to locate and identify the\n\t// worker.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://cicd.example.org/worker/abc123\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDWorkerURLFullKey = attribute.Key(\"cicd.worker.url.full\")\n)\n\n// CICDPipelineName returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.name\" semantic conventions. It represents the human readable\n// name of the pipeline within a CI/CD system.\nfunc CICDPipelineName(val string) attribute.KeyValue {\n\treturn CICDPipelineNameKey.String(val)\n}\n\n// CICDPipelineRunID returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.run.id\" semantic conventions. It represents the unique\n// identifier of a pipeline run within a CI/CD system.\nfunc CICDPipelineRunID(val string) attribute.KeyValue {\n\treturn CICDPipelineRunIDKey.String(val)\n}\n\n// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.run.url.full\" semantic conventions. It represents the [URL] of\n// the pipeline run, providing the complete address in order to locate and\n// identify the pipeline run.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDPipelineRunURLFull(val string) attribute.KeyValue {\n\treturn CICDPipelineRunURLFullKey.String(val)\n}\n\n// CICDPipelineTaskName returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.name\" semantic conventions. It represents the human\n// readable name of a task within a pipeline. Task here most closely aligns with\n// a [computing process] in a pipeline. Other terms for tasks include commands,\n// steps, and procedures.\n//\n// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)\nfunc CICDPipelineTaskName(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskNameKey.String(val)\n}\n\n// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.run.id\" semantic conventions. It represents the unique\n// identifier of a task run within a pipeline.\nfunc CICDPipelineTaskRunID(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskRunIDKey.String(val)\n}\n\n// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.run.url.full\" semantic conventions. It represents the\n// [URL] of the pipeline task run, providing the complete address in order to\n// locate and identify the pipeline task run.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDPipelineTaskRunURLFull(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskRunURLFullKey.String(val)\n}\n\n// CICDSystemComponent returns an attribute KeyValue conforming to the\n// \"cicd.system.component\" semantic conventions. It represents the name of a\n// component of the CICD system.\nfunc CICDSystemComponent(val string) attribute.KeyValue {\n\treturn CICDSystemComponentKey.String(val)\n}\n\n// CICDWorkerID returns an attribute KeyValue conforming to the \"cicd.worker.id\"\n// semantic conventions. It represents the unique identifier of a worker within a\n// CICD system.\nfunc CICDWorkerID(val string) attribute.KeyValue {\n\treturn CICDWorkerIDKey.String(val)\n}\n\n// CICDWorkerName returns an attribute KeyValue conforming to the\n// \"cicd.worker.name\" semantic conventions. It represents the name of a worker\n// within a CICD system.\nfunc CICDWorkerName(val string) attribute.KeyValue {\n\treturn CICDWorkerNameKey.String(val)\n}\n\n// CICDWorkerURLFull returns an attribute KeyValue conforming to the\n// \"cicd.worker.url.full\" semantic conventions. It represents the [URL] of the\n// worker, providing the complete address in order to locate and identify the\n// worker.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDWorkerURLFull(val string) attribute.KeyValue {\n\treturn CICDWorkerURLFullKey.String(val)\n}\n\n// Enum values for cicd.pipeline.action.name\nvar (\n\t// The pipeline run is executing a build.\n\t// Stability: development\n\tCICDPipelineActionNameBuild = CICDPipelineActionNameKey.String(\"BUILD\")\n\t// The pipeline run is executing.\n\t// Stability: development\n\tCICDPipelineActionNameRun = CICDPipelineActionNameKey.String(\"RUN\")\n\t// The pipeline run is executing a sync.\n\t// Stability: development\n\tCICDPipelineActionNameSync = CICDPipelineActionNameKey.String(\"SYNC\")\n)\n\n// Enum values for cicd.pipeline.result\nvar (\n\t// The pipeline run finished successfully.\n\t// Stability: development\n\tCICDPipelineResultSuccess = CICDPipelineResultKey.String(\"success\")\n\t// The pipeline run did not finish successfully, eg. due to a compile error or a\n\t// failing test. Such failures are usually detected by non-zero exit codes of\n\t// the tools executed in the pipeline run.\n\t// Stability: development\n\tCICDPipelineResultFailure = CICDPipelineResultKey.String(\"failure\")\n\t// The pipeline run failed due to an error in the CICD system, eg. due to the\n\t// worker being killed.\n\t// Stability: development\n\tCICDPipelineResultError = CICDPipelineResultKey.String(\"error\")\n\t// A timeout caused the pipeline run to be interrupted.\n\t// Stability: development\n\tCICDPipelineResultTimeout = CICDPipelineResultKey.String(\"timeout\")\n\t// The pipeline run was cancelled, eg. by a user manually cancelling the\n\t// pipeline run.\n\t// Stability: development\n\tCICDPipelineResultCancellation = CICDPipelineResultKey.String(\"cancellation\")\n\t// The pipeline run was skipped, eg. due to a precondition not being met.\n\t// Stability: development\n\tCICDPipelineResultSkip = CICDPipelineResultKey.String(\"skip\")\n)\n\n// Enum values for cicd.pipeline.run.state\nvar (\n\t// The run pending state spans from the event triggering the pipeline run until\n\t// the execution of the run starts (eg. time spent in a queue, provisioning\n\t// agents, creating run resources).\n\t//\n\t// Stability: development\n\tCICDPipelineRunStatePending = CICDPipelineRunStateKey.String(\"pending\")\n\t// The executing state spans the execution of any run tasks (eg. build, test).\n\t// Stability: development\n\tCICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String(\"executing\")\n\t// The finalizing state spans from when the run has finished executing (eg.\n\t// cleanup of run resources).\n\t// Stability: development\n\tCICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String(\"finalizing\")\n)\n\n// Enum values for cicd.pipeline.task.run.result\nvar (\n\t// The task run finished successfully.\n\t// Stability: development\n\tCICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String(\"success\")\n\t// The task run did not finish successfully, eg. due to a compile error or a\n\t// failing test. Such failures are usually detected by non-zero exit codes of\n\t// the tools executed in the task run.\n\t// Stability: development\n\tCICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String(\"failure\")\n\t// The task run failed due to an error in the CICD system, eg. due to the worker\n\t// being killed.\n\t// Stability: development\n\tCICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String(\"error\")\n\t// A timeout caused the task run to be interrupted.\n\t// Stability: development\n\tCICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String(\"timeout\")\n\t// The task run was cancelled, eg. by a user manually cancelling the task run.\n\t// Stability: development\n\tCICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String(\"cancellation\")\n\t// The task run was skipped, eg. due to a precondition not being met.\n\t// Stability: development\n\tCICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String(\"skip\")\n)\n\n// Enum values for cicd.pipeline.task.type\nvar (\n\t// build\n\t// Stability: development\n\tCICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String(\"build\")\n\t// test\n\t// Stability: development\n\tCICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String(\"test\")\n\t// deploy\n\t// Stability: development\n\tCICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String(\"deploy\")\n)\n\n// Enum values for cicd.worker.state\nvar (\n\t// The worker is not performing work for the CICD system. It is available to the\n\t// CICD system to perform work on (online / idle).\n\t// Stability: development\n\tCICDWorkerStateAvailable = CICDWorkerStateKey.String(\"available\")\n\t// The worker is performing work for the CICD system.\n\t// Stability: development\n\tCICDWorkerStateBusy = CICDWorkerStateKey.String(\"busy\")\n\t// The worker is not available to the CICD system (disconnected / down).\n\t// Stability: development\n\tCICDWorkerStateOffline = CICDWorkerStateKey.String(\"offline\")\n)\n\n// Namespace: client\nconst (\n\t// ClientAddressKey is the attribute Key conforming to the \"client.address\"\n\t// semantic conventions. It represents the client address - domain name if\n\t// available without reverse DNS lookup; otherwise, IP address or Unix domain\n\t// socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"client.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the server side, and when communicating through an\n\t// intermediary, `client.address` SHOULD represent the client address behind any\n\t// intermediaries, for example proxies, if it's available.\n\tClientAddressKey = attribute.Key(\"client.address\")\n\n\t// ClientPortKey is the attribute Key conforming to the \"client.port\" semantic\n\t// conventions. It represents the client port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\t// Note: When observed from the server side, and when communicating through an\n\t// intermediary, `client.port` SHOULD represent the client port behind any\n\t// intermediaries, for example proxies, if it's available.\n\tClientPortKey = attribute.Key(\"client.port\")\n)\n\n// ClientAddress returns an attribute KeyValue conforming to the \"client.address\"\n// semantic conventions. It represents the client address - domain name if\n// available without reverse DNS lookup; otherwise, IP address or Unix domain\n// socket name.\nfunc ClientAddress(val string) attribute.KeyValue {\n\treturn ClientAddressKey.String(val)\n}\n\n// ClientPort returns an attribute KeyValue conforming to the \"client.port\"\n// semantic conventions. It represents the client port number.\nfunc ClientPort(val int) attribute.KeyValue {\n\treturn ClientPortKey.Int(val)\n}\n\n// Namespace: cloud\nconst (\n\t// CloudAccountIDKey is the attribute Key conforming to the \"cloud.account.id\"\n\t// semantic conventions. It represents the cloud account ID the resource is\n\t// assigned to.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"111111111111\", \"opentelemetry\"\n\tCloudAccountIDKey = attribute.Key(\"cloud.account.id\")\n\n\t// CloudAvailabilityZoneKey is the attribute Key conforming to the\n\t// \"cloud.availability_zone\" semantic conventions. It represents the cloud\n\t// regions often have multiple, isolated locations known as zones to increase\n\t// availability. Availability zone represents the zone where the resource is\n\t// running.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-east-1c\"\n\t// Note: Availability zones are called \"zones\" on Alibaba Cloud and Google\n\t// Cloud.\n\tCloudAvailabilityZoneKey = attribute.Key(\"cloud.availability_zone\")\n\n\t// CloudPlatformKey is the attribute Key conforming to the \"cloud.platform\"\n\t// semantic conventions. It represents the cloud platform in use.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The prefix of the service SHOULD match the one specified in\n\t// `cloud.provider`.\n\tCloudPlatformKey = attribute.Key(\"cloud.platform\")\n\n\t// CloudProviderKey is the attribute Key conforming to the \"cloud.provider\"\n\t// semantic conventions. It represents the name of the cloud provider.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tCloudProviderKey = attribute.Key(\"cloud.provider\")\n\n\t// CloudRegionKey is the attribute Key conforming to the \"cloud.region\" semantic\n\t// conventions. It represents the geographical region within a cloud provider.\n\t// When associated with a resource, this attribute specifies the region where\n\t// the resource operates. When calling services or APIs deployed on a cloud,\n\t// this attribute identifies the region where the called destination is\n\t// deployed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-central1\", \"us-east-1\"\n\t// Note: Refer to your provider's docs to see the available regions, for example\n\t// [Alibaba Cloud regions], [AWS regions], [Azure regions],\n\t// [Google Cloud regions], or [Tencent Cloud regions].\n\t//\n\t// [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm\n\t// [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/\n\t// [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/\n\t// [Google Cloud regions]: https://cloud.google.com/about/locations\n\t// [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091\n\tCloudRegionKey = attribute.Key(\"cloud.region\")\n\n\t// CloudResourceIDKey is the attribute Key conforming to the \"cloud.resource_id\"\n\t// semantic conventions. It represents the cloud provider-specific native\n\t// identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a\n\t// [fully qualified resource ID] on Azure, a [full resource name] on GCP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",\n\t// \"//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID\",\n\t// \"/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>\n\t// /providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>\"\n\t// Note: On some cloud providers, it may not be possible to determine the full\n\t// ID at startup,\n\t// so it may be necessary to set `cloud.resource_id` as a span attribute\n\t// instead.\n\t//\n\t// The exact value to use for `cloud.resource_id` depends on the cloud provider.\n\t// The following well-known definitions MUST be used if you set this attribute\n\t// and they apply:\n\t//\n\t//   - **AWS Lambda:** The function [ARN].\n\t//     Take care not to use the \"invoked ARN\" directly but replace any\n\t//     [alias suffix]\n\t//     with the resolved function version, as the same runtime instance may be\n\t//     invocable with\n\t//     multiple different aliases.\n\t//   - **GCP:** The [URI of the resource]\n\t//   - **Azure:** The [Fully Qualified Resource ID] of the invoked function,\n\t//     *not* the function app, having the form\n\t//\n\t//     `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`\n\t//     .\n\t//     This means that a span attribute MUST be used, as an Azure function app\n\t//     can host multiple functions that would usually share\n\t//     a TracerProvider.\n\t//\n\t//\n\t// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n\t// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n\t// [full resource name]: https://google.aip.dev/122#full-resource-names\n\t// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n\t// [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html\n\t// [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names\n\t// [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n\tCloudResourceIDKey = attribute.Key(\"cloud.resource_id\")\n)\n\n// CloudAccountID returns an attribute KeyValue conforming to the\n// \"cloud.account.id\" semantic conventions. It represents the cloud account ID\n// the resource is assigned to.\nfunc CloudAccountID(val string) attribute.KeyValue {\n\treturn CloudAccountIDKey.String(val)\n}\n\n// CloudAvailabilityZone returns an attribute KeyValue conforming to the\n// \"cloud.availability_zone\" semantic conventions. It represents the cloud\n// regions often have multiple, isolated locations known as zones to increase\n// availability. Availability zone represents the zone where the resource is\n// running.\nfunc CloudAvailabilityZone(val string) attribute.KeyValue {\n\treturn CloudAvailabilityZoneKey.String(val)\n}\n\n// CloudRegion returns an attribute KeyValue conforming to the \"cloud.region\"\n// semantic conventions. It represents the geographical region within a cloud\n// provider. When associated with a resource, this attribute specifies the region\n// where the resource operates. When calling services or APIs deployed on a\n// cloud, this attribute identifies the region where the called destination is\n// deployed.\nfunc CloudRegion(val string) attribute.KeyValue {\n\treturn CloudRegionKey.String(val)\n}\n\n// CloudResourceID returns an attribute KeyValue conforming to the\n// \"cloud.resource_id\" semantic conventions. It represents the cloud\n// provider-specific native identifier of the monitored cloud resource (e.g. an\n// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]\n//  on GCP).\n//\n// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n// [full resource name]: https://google.aip.dev/122#full-resource-names\nfunc CloudResourceID(val string) attribute.KeyValue {\n\treturn CloudResourceIDKey.String(val)\n}\n\n// Enum values for cloud.platform\nvar (\n\t// Alibaba Cloud Elastic Compute Service\n\t// Stability: development\n\tCloudPlatformAlibabaCloudECS = CloudPlatformKey.String(\"alibaba_cloud_ecs\")\n\t// Alibaba Cloud Function Compute\n\t// Stability: development\n\tCloudPlatformAlibabaCloudFC = CloudPlatformKey.String(\"alibaba_cloud_fc\")\n\t// Red Hat OpenShift on Alibaba Cloud\n\t// Stability: development\n\tCloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String(\"alibaba_cloud_openshift\")\n\t// AWS Elastic Compute Cloud\n\t// Stability: development\n\tCloudPlatformAWSEC2 = CloudPlatformKey.String(\"aws_ec2\")\n\t// AWS Elastic Container Service\n\t// Stability: development\n\tCloudPlatformAWSECS = CloudPlatformKey.String(\"aws_ecs\")\n\t// AWS Elastic Kubernetes Service\n\t// Stability: development\n\tCloudPlatformAWSEKS = CloudPlatformKey.String(\"aws_eks\")\n\t// AWS Lambda\n\t// Stability: development\n\tCloudPlatformAWSLambda = CloudPlatformKey.String(\"aws_lambda\")\n\t// AWS Elastic Beanstalk\n\t// Stability: development\n\tCloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String(\"aws_elastic_beanstalk\")\n\t// AWS App Runner\n\t// Stability: development\n\tCloudPlatformAWSAppRunner = CloudPlatformKey.String(\"aws_app_runner\")\n\t// Red Hat OpenShift on AWS (ROSA)\n\t// Stability: development\n\tCloudPlatformAWSOpenShift = CloudPlatformKey.String(\"aws_openshift\")\n\t// Azure Virtual Machines\n\t// Stability: development\n\tCloudPlatformAzureVM = CloudPlatformKey.String(\"azure.vm\")\n\t// Azure Container Apps\n\t// Stability: development\n\tCloudPlatformAzureContainerApps = CloudPlatformKey.String(\"azure.container_apps\")\n\t// Azure Container Instances\n\t// Stability: development\n\tCloudPlatformAzureContainerInstances = CloudPlatformKey.String(\"azure.container_instances\")\n\t// Azure Kubernetes Service\n\t// Stability: development\n\tCloudPlatformAzureAKS = CloudPlatformKey.String(\"azure.aks\")\n\t// Azure Functions\n\t// Stability: development\n\tCloudPlatformAzureFunctions = CloudPlatformKey.String(\"azure.functions\")\n\t// Azure App Service\n\t// Stability: development\n\tCloudPlatformAzureAppService = CloudPlatformKey.String(\"azure.app_service\")\n\t// Azure Red Hat OpenShift\n\t// Stability: development\n\tCloudPlatformAzureOpenShift = CloudPlatformKey.String(\"azure.openshift\")\n\t// Google Bare Metal Solution (BMS)\n\t// Stability: development\n\tCloudPlatformGCPBareMetalSolution = CloudPlatformKey.String(\"gcp_bare_metal_solution\")\n\t// Google Cloud Compute Engine (GCE)\n\t// Stability: development\n\tCloudPlatformGCPComputeEngine = CloudPlatformKey.String(\"gcp_compute_engine\")\n\t// Google Cloud Run\n\t// Stability: development\n\tCloudPlatformGCPCloudRun = CloudPlatformKey.String(\"gcp_cloud_run\")\n\t// Google Cloud Kubernetes Engine (GKE)\n\t// Stability: development\n\tCloudPlatformGCPKubernetesEngine = CloudPlatformKey.String(\"gcp_kubernetes_engine\")\n\t// Google Cloud Functions (GCF)\n\t// Stability: development\n\tCloudPlatformGCPCloudFunctions = CloudPlatformKey.String(\"gcp_cloud_functions\")\n\t// Google Cloud App Engine (GAE)\n\t// Stability: development\n\tCloudPlatformGCPAppEngine = CloudPlatformKey.String(\"gcp_app_engine\")\n\t// Red Hat OpenShift on Google Cloud\n\t// Stability: development\n\tCloudPlatformGCPOpenShift = CloudPlatformKey.String(\"gcp_openshift\")\n\t// Red Hat OpenShift on IBM Cloud\n\t// Stability: development\n\tCloudPlatformIBMCloudOpenShift = CloudPlatformKey.String(\"ibm_cloud_openshift\")\n\t// Compute on Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudPlatformOracleCloudCompute = CloudPlatformKey.String(\"oracle_cloud_compute\")\n\t// Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudPlatformOracleCloudOKE = CloudPlatformKey.String(\"oracle_cloud_oke\")\n\t// Tencent Cloud Cloud Virtual Machine (CVM)\n\t// Stability: development\n\tCloudPlatformTencentCloudCVM = CloudPlatformKey.String(\"tencent_cloud_cvm\")\n\t// Tencent Cloud Elastic Kubernetes Service (EKS)\n\t// Stability: development\n\tCloudPlatformTencentCloudEKS = CloudPlatformKey.String(\"tencent_cloud_eks\")\n\t// Tencent Cloud Serverless Cloud Function (SCF)\n\t// Stability: development\n\tCloudPlatformTencentCloudSCF = CloudPlatformKey.String(\"tencent_cloud_scf\")\n)\n\n// Enum values for cloud.provider\nvar (\n\t// Alibaba Cloud\n\t// Stability: development\n\tCloudProviderAlibabaCloud = CloudProviderKey.String(\"alibaba_cloud\")\n\t// Amazon Web Services\n\t// Stability: development\n\tCloudProviderAWS = CloudProviderKey.String(\"aws\")\n\t// Microsoft Azure\n\t// Stability: development\n\tCloudProviderAzure = CloudProviderKey.String(\"azure\")\n\t// Google Cloud Platform\n\t// Stability: development\n\tCloudProviderGCP = CloudProviderKey.String(\"gcp\")\n\t// Heroku Platform as a Service\n\t// Stability: development\n\tCloudProviderHeroku = CloudProviderKey.String(\"heroku\")\n\t// IBM Cloud\n\t// Stability: development\n\tCloudProviderIBMCloud = CloudProviderKey.String(\"ibm_cloud\")\n\t// Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudProviderOracleCloud = CloudProviderKey.String(\"oracle_cloud\")\n\t// Tencent Cloud\n\t// Stability: development\n\tCloudProviderTencentCloud = CloudProviderKey.String(\"tencent_cloud\")\n)\n\n// Namespace: cloudevents\nconst (\n\t// CloudEventsEventIDKey is the attribute Key conforming to the\n\t// \"cloudevents.event_id\" semantic conventions. It represents the [event_id]\n\t// uniquely identifies the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123e4567-e89b-12d3-a456-426614174000\", \"0001\"\n\t//\n\t// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id\n\tCloudEventsEventIDKey = attribute.Key(\"cloudevents.event_id\")\n\n\t// CloudEventsEventSourceKey is the attribute Key conforming to the\n\t// \"cloudevents.event_source\" semantic conventions. It represents the [source]\n\t// identifies the context in which an event happened.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://github.com/cloudevents\", \"/cloudevents/spec/pull/123\",\n\t// \"my-service\"\n\t//\n\t// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1\n\tCloudEventsEventSourceKey = attribute.Key(\"cloudevents.event_source\")\n\n\t// CloudEventsEventSpecVersionKey is the attribute Key conforming to the\n\t// \"cloudevents.event_spec_version\" semantic conventions. It represents the\n\t// [version of the CloudEvents specification] which the event uses.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\t//\n\t// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion\n\tCloudEventsEventSpecVersionKey = attribute.Key(\"cloudevents.event_spec_version\")\n\n\t// CloudEventsEventSubjectKey is the attribute Key conforming to the\n\t// \"cloudevents.event_subject\" semantic conventions. It represents the [subject]\n\t//  of the event in the context of the event producer (identified by source).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: mynewfile.jpg\n\t//\n\t// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject\n\tCloudEventsEventSubjectKey = attribute.Key(\"cloudevents.event_subject\")\n\n\t// CloudEventsEventTypeKey is the attribute Key conforming to the\n\t// \"cloudevents.event_type\" semantic conventions. It represents the [event_type]\n\t//  contains a value describing the type of event related to the originating\n\t// occurrence.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com.github.pull_request.opened\", \"com.example.object.deleted.v2\"\n\t//\n\t// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type\n\tCloudEventsEventTypeKey = attribute.Key(\"cloudevents.event_type\")\n)\n\n// CloudEventsEventID returns an attribute KeyValue conforming to the\n// \"cloudevents.event_id\" semantic conventions. It represents the [event_id]\n// uniquely identifies the event.\n//\n// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id\nfunc CloudEventsEventID(val string) attribute.KeyValue {\n\treturn CloudEventsEventIDKey.String(val)\n}\n\n// CloudEventsEventSource returns an attribute KeyValue conforming to the\n// \"cloudevents.event_source\" semantic conventions. It represents the [source]\n// identifies the context in which an event happened.\n//\n// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1\nfunc CloudEventsEventSource(val string) attribute.KeyValue {\n\treturn CloudEventsEventSourceKey.String(val)\n}\n\n// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the\n// \"cloudevents.event_spec_version\" semantic conventions. It represents the\n// [version of the CloudEvents specification] which the event uses.\n//\n// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion\nfunc CloudEventsEventSpecVersion(val string) attribute.KeyValue {\n\treturn CloudEventsEventSpecVersionKey.String(val)\n}\n\n// CloudEventsEventSubject returns an attribute KeyValue conforming to the\n// \"cloudevents.event_subject\" semantic conventions. It represents the [subject]\n// of the event in the context of the event producer (identified by source).\n//\n// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject\nfunc CloudEventsEventSubject(val string) attribute.KeyValue {\n\treturn CloudEventsEventSubjectKey.String(val)\n}\n\n// CloudEventsEventType returns an attribute KeyValue conforming to the\n// \"cloudevents.event_type\" semantic conventions. It represents the [event_type]\n// contains a value describing the type of event related to the originating\n// occurrence.\n//\n// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type\nfunc CloudEventsEventType(val string) attribute.KeyValue {\n\treturn CloudEventsEventTypeKey.String(val)\n}\n\n// Namespace: cloudfoundry\nconst (\n\t// CloudFoundryAppIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.id\" semantic conventions. It represents the guid of the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.application_id`. This is the same value as\n\t// reported by `cf app <app-name> --guid`.\n\tCloudFoundryAppIDKey = attribute.Key(\"cloudfoundry.app.id\")\n\n\t// CloudFoundryAppInstanceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.instance.id\" semantic conventions. It represents the index\n\t// of the application instance. 0 when just one instance is active.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0\", \"1\"\n\t// Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]\n\t// .\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the application instance index for applications\n\t// deployed on the runtime.\n\t//\n\t// Application instrumentation should use the value from environment\n\t// variable `CF_INSTANCE_INDEX`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\tCloudFoundryAppInstanceIDKey = attribute.Key(\"cloudfoundry.app.instance.id\")\n\n\t// CloudFoundryAppNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.name\" semantic conventions. It represents the name of the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-app-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.application_name`. This is the same value\n\t// as reported by `cf apps`.\n\tCloudFoundryAppNameKey = attribute.Key(\"cloudfoundry.app.name\")\n\n\t// CloudFoundryOrgIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.org.id\" semantic conventions. It represents the guid of the\n\t// CloudFoundry org the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.org_id`. This is the same value as\n\t// reported by `cf org <org-name> --guid`.\n\tCloudFoundryOrgIDKey = attribute.Key(\"cloudfoundry.org.id\")\n\n\t// CloudFoundryOrgNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.org.name\" semantic conventions. It represents the name of the\n\t// CloudFoundry organization the app is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-org-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.org_name`. This is the same value as\n\t// reported by `cf orgs`.\n\tCloudFoundryOrgNameKey = attribute.Key(\"cloudfoundry.org.name\")\n\n\t// CloudFoundryProcessIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.process.id\" semantic conventions. It represents the UID\n\t// identifying the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to\n\t// `VCAP_APPLICATION.app_id` for applications deployed to the runtime.\n\t// For system components, this could be the actual PID.\n\tCloudFoundryProcessIDKey = attribute.Key(\"cloudfoundry.process.id\")\n\n\t// CloudFoundryProcessTypeKey is the attribute Key conforming to the\n\t// \"cloudfoundry.process.type\" semantic conventions. It represents the type of\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"web\"\n\t// Note: CloudFoundry applications can consist of multiple jobs. Usually the\n\t// main process will be of type `web`. There can be additional background\n\t// tasks or side-cars with different process types.\n\tCloudFoundryProcessTypeKey = attribute.Key(\"cloudfoundry.process.type\")\n\n\t// CloudFoundrySpaceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.space.id\" semantic conventions. It represents the guid of the\n\t// CloudFoundry space the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.space_id`. This is the same value as\n\t// reported by `cf space <space-name> --guid`.\n\tCloudFoundrySpaceIDKey = attribute.Key(\"cloudfoundry.space.id\")\n\n\t// CloudFoundrySpaceNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.space.name\" semantic conventions. It represents the name of the\n\t// CloudFoundry space the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-space-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.space_name`. This is the same value as\n\t// reported by `cf spaces`.\n\tCloudFoundrySpaceNameKey = attribute.Key(\"cloudfoundry.space.name\")\n\n\t// CloudFoundrySystemIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.system.id\" semantic conventions. It represents a guid or\n\t// another name describing the event source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cf/gorouter\"\n\t// Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope].\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the component name, e.g. \"gorouter\", for\n\t// CloudFoundry components.\n\t//\n\t// When system components are instrumented, values from the\n\t// [Bosh spec]\n\t// should be used. The `system.id` should be set to\n\t// `spec.deployment/spec.name`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\t// [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec\n\tCloudFoundrySystemIDKey = attribute.Key(\"cloudfoundry.system.id\")\n\n\t// CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.system.instance.id\" semantic conventions. It represents a guid\n\t// describing the concrete instance of the event source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]\n\t// .\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the vm id for CloudFoundry components.\n\t//\n\t// When system components are instrumented, values from the\n\t// [Bosh spec]\n\t// should be used. The `system.instance.id` should be set to `spec.id`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\t// [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec\n\tCloudFoundrySystemInstanceIDKey = attribute.Key(\"cloudfoundry.system.instance.id\")\n)\n\n// CloudFoundryAppID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.id\" semantic conventions. It represents the guid of the\n// application.\nfunc CloudFoundryAppID(val string) attribute.KeyValue {\n\treturn CloudFoundryAppIDKey.String(val)\n}\n\n// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.instance.id\" semantic conventions. It represents the index\n// of the application instance. 0 when just one instance is active.\nfunc CloudFoundryAppInstanceID(val string) attribute.KeyValue {\n\treturn CloudFoundryAppInstanceIDKey.String(val)\n}\n\n// CloudFoundryAppName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.name\" semantic conventions. It represents the name of the\n// application.\nfunc CloudFoundryAppName(val string) attribute.KeyValue {\n\treturn CloudFoundryAppNameKey.String(val)\n}\n\n// CloudFoundryOrgID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.org.id\" semantic conventions. It represents the guid of the\n// CloudFoundry org the application is running in.\nfunc CloudFoundryOrgID(val string) attribute.KeyValue {\n\treturn CloudFoundryOrgIDKey.String(val)\n}\n\n// CloudFoundryOrgName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.org.name\" semantic conventions. It represents the name of the\n// CloudFoundry organization the app is running in.\nfunc CloudFoundryOrgName(val string) attribute.KeyValue {\n\treturn CloudFoundryOrgNameKey.String(val)\n}\n\n// CloudFoundryProcessID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.process.id\" semantic conventions. It represents the UID\n// identifying the process.\nfunc CloudFoundryProcessID(val string) attribute.KeyValue {\n\treturn CloudFoundryProcessIDKey.String(val)\n}\n\n// CloudFoundryProcessType returns an attribute KeyValue conforming to the\n// \"cloudfoundry.process.type\" semantic conventions. It represents the type of\n// process.\nfunc CloudFoundryProcessType(val string) attribute.KeyValue {\n\treturn CloudFoundryProcessTypeKey.String(val)\n}\n\n// CloudFoundrySpaceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.space.id\" semantic conventions. It represents the guid of the\n// CloudFoundry space the application is running in.\nfunc CloudFoundrySpaceID(val string) attribute.KeyValue {\n\treturn CloudFoundrySpaceIDKey.String(val)\n}\n\n// CloudFoundrySpaceName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.space.name\" semantic conventions. It represents the name of the\n// CloudFoundry space the application is running in.\nfunc CloudFoundrySpaceName(val string) attribute.KeyValue {\n\treturn CloudFoundrySpaceNameKey.String(val)\n}\n\n// CloudFoundrySystemID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.system.id\" semantic conventions. It represents a guid or another\n// name describing the event source.\nfunc CloudFoundrySystemID(val string) attribute.KeyValue {\n\treturn CloudFoundrySystemIDKey.String(val)\n}\n\n// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.system.instance.id\" semantic conventions. It represents a guid\n// describing the concrete instance of the event source.\nfunc CloudFoundrySystemInstanceID(val string) attribute.KeyValue {\n\treturn CloudFoundrySystemInstanceIDKey.String(val)\n}\n\n// Namespace: code\nconst (\n\t// CodeColumnNumberKey is the attribute Key conforming to the\n\t// \"code.column.number\" semantic conventions. It represents the column number in\n\t// `code.file.path` best representing the operation. It SHOULD point within the\n\t// code unit named in `code.function.name`. This attribute MUST NOT be used on\n\t// the Profile signal since the data is already captured in 'message Line'. This\n\t// constraint is imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\tCodeColumnNumberKey = attribute.Key(\"code.column.number\")\n\n\t// CodeFilePathKey is the attribute Key conforming to the \"code.file.path\"\n\t// semantic conventions. It represents the source code file name that identifies\n\t// the code unit as uniquely as possible (preferably an absolute file path).\n\t// This attribute MUST NOT be used on the Profile signal since the data is\n\t// already captured in 'message Function'. This constraint is imposed to prevent\n\t// redundancy and maintain data integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: /usr/local/MyApplication/content_root/app/index.php\n\tCodeFilePathKey = attribute.Key(\"code.file.path\")\n\n\t// CodeFunctionNameKey is the attribute Key conforming to the\n\t// \"code.function.name\" semantic conventions. It represents the method or\n\t// function fully-qualified name without arguments. The value should fit the\n\t// natural representation of the language runtime, which is also likely the same\n\t// used within `code.stacktrace` attribute value. This attribute MUST NOT be\n\t// used on the Profile signal since the data is already captured in 'message\n\t// Function'. This constraint is imposed to prevent redundancy and maintain data\n\t// integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"com.example.MyHttpService.serveRequest\",\n\t// \"GuzzleHttp\\Client::transfer\", \"fopen\"\n\t// Note: Values and format depends on each language runtime, thus it is\n\t// impossible to provide an exhaustive list of examples.\n\t// The values are usually the same (or prefixes of) the ones found in native\n\t// stack trace representation stored in\n\t// `code.stacktrace` without information on arguments.\n\t//\n\t// Examples:\n\t//\n\t//   - Java method: `com.example.MyHttpService.serveRequest`\n\t//   - Java anonymous class method: `com.mycompany.Main$1.myMethod`\n\t//   - Java lambda method:\n\t//     `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`\n\t//   - PHP function: `GuzzleHttp\\Client::transfer`\n\t//   - Go function: `github.com/my/repo/pkg.foo.func5`\n\t//   - Elixir: `OpenTelemetry.Ctx.new`\n\t//   - Erlang: `opentelemetry_ctx:new`\n\t//   - Rust: `playground::my_module::my_cool_func`\n\t//   - C function: `fopen`\n\tCodeFunctionNameKey = attribute.Key(\"code.function.name\")\n\n\t// CodeLineNumberKey is the attribute Key conforming to the \"code.line.number\"\n\t// semantic conventions. It represents the line number in `code.file.path` best\n\t// representing the operation. It SHOULD point within the code unit named in\n\t// `code.function.name`. This attribute MUST NOT be used on the Profile signal\n\t// since the data is already captured in 'message Line'. This constraint is\n\t// imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\tCodeLineNumberKey = attribute.Key(\"code.line.number\")\n\n\t// CodeStacktraceKey is the attribute Key conforming to the \"code.stacktrace\"\n\t// semantic conventions. It represents a stacktrace as a string in the natural\n\t// representation for the language runtime. The representation is identical to\n\t// [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile\n\t// signal since the data is already captured in 'message Location'. This\n\t// constraint is imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at\n\t// com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at\n\t// com.example.GenerateTrace.main(GenerateTrace.java:5)\n\t//\n\t// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation\n\tCodeStacktraceKey = attribute.Key(\"code.stacktrace\")\n)\n\n// CodeColumnNumber returns an attribute KeyValue conforming to the\n// \"code.column.number\" semantic conventions. It represents the column number in\n// `code.file.path` best representing the operation. It SHOULD point within the\n// code unit named in `code.function.name`. This attribute MUST NOT be used on\n// the Profile signal since the data is already captured in 'message Line'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\nfunc CodeColumnNumber(val int) attribute.KeyValue {\n\treturn CodeColumnNumberKey.Int(val)\n}\n\n// CodeFilePath returns an attribute KeyValue conforming to the \"code.file.path\"\n// semantic conventions. It represents the source code file name that identifies\n// the code unit as uniquely as possible (preferably an absolute file path). This\n// attribute MUST NOT be used on the Profile signal since the data is already\n// captured in 'message Function'. This constraint is imposed to prevent\n// redundancy and maintain data integrity.\nfunc CodeFilePath(val string) attribute.KeyValue {\n\treturn CodeFilePathKey.String(val)\n}\n\n// CodeFunctionName returns an attribute KeyValue conforming to the\n// \"code.function.name\" semantic conventions. It represents the method or\n// function fully-qualified name without arguments. The value should fit the\n// natural representation of the language runtime, which is also likely the same\n// used within `code.stacktrace` attribute value. This attribute MUST NOT be used\n// on the Profile signal since the data is already captured in 'message\n// Function'. This constraint is imposed to prevent redundancy and maintain data\n// integrity.\nfunc CodeFunctionName(val string) attribute.KeyValue {\n\treturn CodeFunctionNameKey.String(val)\n}\n\n// CodeLineNumber returns an attribute KeyValue conforming to the\n// \"code.line.number\" semantic conventions. It represents the line number in\n// `code.file.path` best representing the operation. It SHOULD point within the\n// code unit named in `code.function.name`. This attribute MUST NOT be used on\n// the Profile signal since the data is already captured in 'message Line'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\nfunc CodeLineNumber(val int) attribute.KeyValue {\n\treturn CodeLineNumberKey.Int(val)\n}\n\n// CodeStacktrace returns an attribute KeyValue conforming to the\n// \"code.stacktrace\" semantic conventions. It represents a stacktrace as a string\n// in the natural representation for the language runtime. The representation is\n// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the\n// Profile signal since the data is already captured in 'message Location'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\n//\n// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation\nfunc CodeStacktrace(val string) attribute.KeyValue {\n\treturn CodeStacktraceKey.String(val)\n}\n\n// Namespace: container\nconst (\n\t// ContainerCommandKey is the attribute Key conforming to the\n\t// \"container.command\" semantic conventions. It represents the command used to\n\t// run the container (i.e. the command name).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol\"\n\t// Note: If using embedded credentials or sensitive data, it is recommended to\n\t// remove them to prevent potential leakage.\n\tContainerCommandKey = attribute.Key(\"container.command\")\n\n\t// ContainerCommandArgsKey is the attribute Key conforming to the\n\t// \"container.command_args\" semantic conventions. It represents the all the\n\t// command arguments (including the command/executable itself) run by the\n\t// container.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol\", \"--config\", \"config.yaml\"\n\tContainerCommandArgsKey = attribute.Key(\"container.command_args\")\n\n\t// ContainerCommandLineKey is the attribute Key conforming to the\n\t// \"container.command_line\" semantic conventions. It represents the full command\n\t// run by the container as a single string representing the full command.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol --config config.yaml\"\n\tContainerCommandLineKey = attribute.Key(\"container.command_line\")\n\n\t// ContainerCSIPluginNameKey is the attribute Key conforming to the\n\t// \"container.csi.plugin.name\" semantic conventions. It represents the name of\n\t// the CSI ([Container Storage Interface]) plugin used by the volume.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pd.csi.storage.gke.io\"\n\t// Note: This can sometimes be referred to as a \"driver\" in CSI implementations.\n\t// This should represent the `name` field of the GetPluginInfo RPC.\n\t//\n\t// [Container Storage Interface]: https://github.com/container-storage-interface/spec\n\tContainerCSIPluginNameKey = attribute.Key(\"container.csi.plugin.name\")\n\n\t// ContainerCSIVolumeIDKey is the attribute Key conforming to the\n\t// \"container.csi.volume.id\" semantic conventions. It represents the unique\n\t// volume ID returned by the CSI ([Container Storage Interface]) plugin.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk\"\n\t// Note: This can sometimes be referred to as a \"volume handle\" in CSI\n\t// implementations. This should represent the `Volume.volume_id` field in CSI\n\t// spec.\n\t//\n\t// [Container Storage Interface]: https://github.com/container-storage-interface/spec\n\tContainerCSIVolumeIDKey = attribute.Key(\"container.csi.volume.id\")\n\n\t// ContainerIDKey is the attribute Key conforming to the \"container.id\" semantic\n\t// conventions. It represents the container ID. Usually a UUID, as for example\n\t// used to [identify Docker containers]. The UUID might be abbreviated.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"a3bf90e006b2\"\n\t//\n\t// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification\n\tContainerIDKey = attribute.Key(\"container.id\")\n\n\t// ContainerImageIDKey is the attribute Key conforming to the\n\t// \"container.image.id\" semantic conventions. It represents the runtime specific\n\t// image identifier. Usually a hash algorithm followed by a UUID.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f\"\n\t// Note: Docker defines a sha256 of the image id; `container.image.id`\n\t// corresponds to the `Image` field from the Docker container inspect [API]\n\t// endpoint.\n\t// K8s defines a link to the container registry repository with digest\n\t// `\"imageID\": \"registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625\"`\n\t// .\n\t// The ID is assigned by the container runtime and can vary in different\n\t// environments. Consider using `oci.manifest.digest` if it is important to\n\t// identify the same image in different environments/runtimes.\n\t//\n\t// [API]: https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect\n\tContainerImageIDKey = attribute.Key(\"container.image.id\")\n\n\t// ContainerImageNameKey is the attribute Key conforming to the\n\t// \"container.image.name\" semantic conventions. It represents the name of the\n\t// image the container was built on.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"gcr.io/opentelemetry/operator\"\n\tContainerImageNameKey = attribute.Key(\"container.image.name\")\n\n\t// ContainerImageRepoDigestsKey is the attribute Key conforming to the\n\t// \"container.image.repo_digests\" semantic conventions. It represents the repo\n\t// digests of the container image as provided by the container runtime.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb\",\n\t// \"internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578\"\n\t// Note: [Docker] and [CRI] report those under the `RepoDigests` field.\n\t//\n\t// [Docker]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect\n\t// [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238\n\tContainerImageRepoDigestsKey = attribute.Key(\"container.image.repo_digests\")\n\n\t// ContainerImageTagsKey is the attribute Key conforming to the\n\t// \"container.image.tags\" semantic conventions. It represents the container\n\t// image tags. An example can be found in [Docker Image Inspect]. Should be only\n\t// the `<tag>` section of the full name for example from\n\t// `registry.example.com/my-org/my-image:<tag>`.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"v1.27.1\", \"3.5.7-0\"\n\t//\n\t// [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect\n\tContainerImageTagsKey = attribute.Key(\"container.image.tags\")\n\n\t// ContainerNameKey is the attribute Key conforming to the \"container.name\"\n\t// semantic conventions. It represents the container name used by container\n\t// runtime.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-autoconf\"\n\tContainerNameKey = attribute.Key(\"container.name\")\n\n\t// ContainerRuntimeDescriptionKey is the attribute Key conforming to the\n\t// \"container.runtime.description\" semantic conventions. It represents a\n\t// description about the runtime which could include, for example details about\n\t// the CRI/API version being used or other customisations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"docker://19.3.1 - CRI: 1.22.0\"\n\tContainerRuntimeDescriptionKey = attribute.Key(\"container.runtime.description\")\n\n\t// ContainerRuntimeNameKey is the attribute Key conforming to the\n\t// \"container.runtime.name\" semantic conventions. It represents the container\n\t// runtime managing this container.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"docker\", \"containerd\", \"rkt\"\n\tContainerRuntimeNameKey = attribute.Key(\"container.runtime.name\")\n\n\t// ContainerRuntimeVersionKey is the attribute Key conforming to the\n\t// \"container.runtime.version\" semantic conventions. It represents the version\n\t// of the runtime of this process, as returned by the runtime without\n\t// modification.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0.0\n\tContainerRuntimeVersionKey = attribute.Key(\"container.runtime.version\")\n)\n\n// ContainerCommand returns an attribute KeyValue conforming to the\n// \"container.command\" semantic conventions. It represents the command used to\n// run the container (i.e. the command name).\nfunc ContainerCommand(val string) attribute.KeyValue {\n\treturn ContainerCommandKey.String(val)\n}\n\n// ContainerCommandArgs returns an attribute KeyValue conforming to the\n// \"container.command_args\" semantic conventions. It represents the all the\n// command arguments (including the command/executable itself) run by the\n// container.\nfunc ContainerCommandArgs(val ...string) attribute.KeyValue {\n\treturn ContainerCommandArgsKey.StringSlice(val)\n}\n\n// ContainerCommandLine returns an attribute KeyValue conforming to the\n// \"container.command_line\" semantic conventions. It represents the full command\n// run by the container as a single string representing the full command.\nfunc ContainerCommandLine(val string) attribute.KeyValue {\n\treturn ContainerCommandLineKey.String(val)\n}\n\n// ContainerCSIPluginName returns an attribute KeyValue conforming to the\n// \"container.csi.plugin.name\" semantic conventions. It represents the name of\n// the CSI ([Container Storage Interface]) plugin used by the volume.\n//\n// [Container Storage Interface]: https://github.com/container-storage-interface/spec\nfunc ContainerCSIPluginName(val string) attribute.KeyValue {\n\treturn ContainerCSIPluginNameKey.String(val)\n}\n\n// ContainerCSIVolumeID returns an attribute KeyValue conforming to the\n// \"container.csi.volume.id\" semantic conventions. It represents the unique\n// volume ID returned by the CSI ([Container Storage Interface]) plugin.\n//\n// [Container Storage Interface]: https://github.com/container-storage-interface/spec\nfunc ContainerCSIVolumeID(val string) attribute.KeyValue {\n\treturn ContainerCSIVolumeIDKey.String(val)\n}\n\n// ContainerID returns an attribute KeyValue conforming to the \"container.id\"\n// semantic conventions. It represents the container ID. Usually a UUID, as for\n// example used to [identify Docker containers]. The UUID might be abbreviated.\n//\n// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification\nfunc ContainerID(val string) attribute.KeyValue {\n\treturn ContainerIDKey.String(val)\n}\n\n// ContainerImageID returns an attribute KeyValue conforming to the\n// \"container.image.id\" semantic conventions. It represents the runtime specific\n// image identifier. Usually a hash algorithm followed by a UUID.\nfunc ContainerImageID(val string) attribute.KeyValue {\n\treturn ContainerImageIDKey.String(val)\n}\n\n// ContainerImageName returns an attribute KeyValue conforming to the\n// \"container.image.name\" semantic conventions. It represents the name of the\n// image the container was built on.\nfunc ContainerImageName(val string) attribute.KeyValue {\n\treturn ContainerImageNameKey.String(val)\n}\n\n// ContainerImageRepoDigests returns an attribute KeyValue conforming to the\n// \"container.image.repo_digests\" semantic conventions. It represents the repo\n// digests of the container image as provided by the container runtime.\nfunc ContainerImageRepoDigests(val ...string) attribute.KeyValue {\n\treturn ContainerImageRepoDigestsKey.StringSlice(val)\n}\n\n// ContainerImageTags returns an attribute KeyValue conforming to the\n// \"container.image.tags\" semantic conventions. It represents the container image\n// tags. An example can be found in [Docker Image Inspect]. Should be only the\n// `<tag>` section of the full name for example from\n// `registry.example.com/my-org/my-image:<tag>`.\n//\n// [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect\nfunc ContainerImageTags(val ...string) attribute.KeyValue {\n\treturn ContainerImageTagsKey.StringSlice(val)\n}\n\n// ContainerLabel returns an attribute KeyValue conforming to the\n// \"container.label\" semantic conventions. It represents the container labels,\n// `<key>` being the label name, the value being the label value.\nfunc ContainerLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"container.label.\"+key, val)\n}\n\n// ContainerName returns an attribute KeyValue conforming to the \"container.name\"\n// semantic conventions. It represents the container name used by container\n// runtime.\nfunc ContainerName(val string) attribute.KeyValue {\n\treturn ContainerNameKey.String(val)\n}\n\n// ContainerRuntimeDescription returns an attribute KeyValue conforming to the\n// \"container.runtime.description\" semantic conventions. It represents a\n// description about the runtime which could include, for example details about\n// the CRI/API version being used or other customisations.\nfunc ContainerRuntimeDescription(val string) attribute.KeyValue {\n\treturn ContainerRuntimeDescriptionKey.String(val)\n}\n\n// ContainerRuntimeName returns an attribute KeyValue conforming to the\n// \"container.runtime.name\" semantic conventions. It represents the container\n// runtime managing this container.\nfunc ContainerRuntimeName(val string) attribute.KeyValue {\n\treturn ContainerRuntimeNameKey.String(val)\n}\n\n// ContainerRuntimeVersion returns an attribute KeyValue conforming to the\n// \"container.runtime.version\" semantic conventions. It represents the version of\n// the runtime of this process, as returned by the runtime without modification.\nfunc ContainerRuntimeVersion(val string) attribute.KeyValue {\n\treturn ContainerRuntimeVersionKey.String(val)\n}\n\n// Namespace: cpu\nconst (\n\t// CPULogicalNumberKey is the attribute Key conforming to the\n\t// \"cpu.logical_number\" semantic conventions. It represents the logical CPU\n\t// number [0..n-1].\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1\n\tCPULogicalNumberKey = attribute.Key(\"cpu.logical_number\")\n\n\t// CPUModeKey is the attribute Key conforming to the \"cpu.mode\" semantic\n\t// conventions. It represents the mode of the CPU.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"user\", \"system\"\n\tCPUModeKey = attribute.Key(\"cpu.mode\")\n)\n\n// CPULogicalNumber returns an attribute KeyValue conforming to the\n// \"cpu.logical_number\" semantic conventions. It represents the logical CPU\n// number [0..n-1].\nfunc CPULogicalNumber(val int) attribute.KeyValue {\n\treturn CPULogicalNumberKey.Int(val)\n}\n\n// Enum values for cpu.mode\nvar (\n\t// User\n\t// Stability: development\n\tCPUModeUser = CPUModeKey.String(\"user\")\n\t// System\n\t// Stability: development\n\tCPUModeSystem = CPUModeKey.String(\"system\")\n\t// Nice\n\t// Stability: development\n\tCPUModeNice = CPUModeKey.String(\"nice\")\n\t// Idle\n\t// Stability: development\n\tCPUModeIdle = CPUModeKey.String(\"idle\")\n\t// IO Wait\n\t// Stability: development\n\tCPUModeIOWait = CPUModeKey.String(\"iowait\")\n\t// Interrupt\n\t// Stability: development\n\tCPUModeInterrupt = CPUModeKey.String(\"interrupt\")\n\t// Steal\n\t// Stability: development\n\tCPUModeSteal = CPUModeKey.String(\"steal\")\n\t// Kernel\n\t// Stability: development\n\tCPUModeKernel = CPUModeKey.String(\"kernel\")\n)\n\n// Namespace: db\nconst (\n\t// DBClientConnectionPoolNameKey is the attribute Key conforming to the\n\t// \"db.client.connection.pool.name\" semantic conventions. It represents the name\n\t// of the connection pool; unique within the instrumented application. In case\n\t// the connection pool implementation doesn't provide a name, instrumentation\n\t// SHOULD use a combination of parameters that would make the name unique, for\n\t// example, combining attributes `server.address`, `server.port`, and\n\t// `db.namespace`, formatted as `server.address:server.port/db.namespace`.\n\t// Instrumentations that generate connection pool name following different\n\t// patterns SHOULD document it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myDataSource\"\n\tDBClientConnectionPoolNameKey = attribute.Key(\"db.client.connection.pool.name\")\n\n\t// DBClientConnectionStateKey is the attribute Key conforming to the\n\t// \"db.client.connection.state\" semantic conventions. It represents the state of\n\t// a connection in the pool.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"idle\"\n\tDBClientConnectionStateKey = attribute.Key(\"db.client.connection.state\")\n\n\t// DBCollectionNameKey is the attribute Key conforming to the\n\t// \"db.collection.name\" semantic conventions. It represents the name of a\n\t// collection (table, container) within the database.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"public.users\", \"customers\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// The collection name SHOULD NOT be extracted from `db.query.text`,\n\t// when the database system supports query text with multiple collections\n\t// in non-batch operations.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// collection name then that collection name SHOULD be used.\n\tDBCollectionNameKey = attribute.Key(\"db.collection.name\")\n\n\t// DBNamespaceKey is the attribute Key conforming to the \"db.namespace\" semantic\n\t// conventions. It represents the name of the database, fully qualified within\n\t// the server address and port.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"customers\", \"test.users\"\n\t// Note: If a database system has multiple namespace components, they SHOULD be\n\t// concatenated from the most general to the most specific namespace component,\n\t// using `|` as a separator between the components. Any missing components (and\n\t// their associated separators) SHOULD be omitted.\n\t// Semantic conventions for individual database systems SHOULD document what\n\t// `db.namespace` means in the context of that system.\n\t// It is RECOMMENDED to capture the value as provided by the application without\n\t// attempting to do any case normalization.\n\tDBNamespaceKey = attribute.Key(\"db.namespace\")\n\n\t// DBOperationBatchSizeKey is the attribute Key conforming to the\n\t// \"db.operation.batch.size\" semantic conventions. It represents the number of\n\t// queries included in a batch operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 2, 3, 4\n\t// Note: Operations are only considered batches when they contain two or more\n\t// operations, and so `db.operation.batch.size` SHOULD never be `1`.\n\tDBOperationBatchSizeKey = attribute.Key(\"db.operation.batch.size\")\n\n\t// DBOperationNameKey is the attribute Key conforming to the \"db.operation.name\"\n\t// semantic conventions. It represents the name of the operation or command\n\t// being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"findAndModify\", \"HMSET\", \"SELECT\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// The operation name SHOULD NOT be extracted from `db.query.text`,\n\t// when the database system supports query text with multiple operations\n\t// in non-batch operations.\n\t//\n\t// If spaces can occur in the operation name, multiple consecutive spaces\n\t// SHOULD be normalized to a single space.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// operation name\n\t// then that operation name SHOULD be used prepended by `BATCH `,\n\t// otherwise `db.operation.name` SHOULD be `BATCH` or some other database\n\t// system specific term if more applicable.\n\tDBOperationNameKey = attribute.Key(\"db.operation.name\")\n\n\t// DBQuerySummaryKey is the attribute Key conforming to the \"db.query.summary\"\n\t// semantic conventions. It represents the low cardinality summary of a database\n\t// query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SELECT wuser_table\", \"INSERT shipping_details SELECT orders\", \"get\n\t// user by id\"\n\t// Note: The query summary describes a class of database queries and is useful\n\t// as a grouping key, especially when analyzing telemetry for database\n\t// calls involving complex queries.\n\t//\n\t// Summary may be available to the instrumentation through\n\t// instrumentation hooks or other means. If it is not available,\n\t// instrumentations\n\t// that support query parsing SHOULD generate a summary following\n\t// [Generating query summary]\n\t// section.\n\t//\n\t// [Generating query summary]: /docs/database/database-spans.md#generating-a-summary-of-the-query\n\tDBQuerySummaryKey = attribute.Key(\"db.query.summary\")\n\n\t// DBQueryTextKey is the attribute Key conforming to the \"db.query.text\"\n\t// semantic conventions. It represents the database query being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SELECT * FROM wuser_table where username = ?\", \"SET mykey ?\"\n\t// Note: For sanitization see [Sanitization of `db.query.text`].\n\t// For batch operations, if the individual operations are known to have the same\n\t// query text then that query text SHOULD be used, otherwise all of the\n\t// individual query texts SHOULD be concatenated with separator `; ` or some\n\t// other database system specific separator if more applicable.\n\t// Parameterized query text SHOULD NOT be sanitized. Even though parameterized\n\t// query text can potentially have sensitive data, by using a parameterized\n\t// query the user is giving a strong signal that any sensitive data will be\n\t// passed as parameter values, and the benefit to observability of capturing the\n\t// static part of the query text by default outweighs the risk.\n\t//\n\t// [Sanitization of `db.query.text`]: /docs/database/database-spans.md#sanitization-of-dbquerytext\n\tDBQueryTextKey = attribute.Key(\"db.query.text\")\n\n\t// DBResponseReturnedRowsKey is the attribute Key conforming to the\n\t// \"db.response.returned_rows\" semantic conventions. It represents the number of\n\t// rows returned by the operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10, 30, 1000\n\tDBResponseReturnedRowsKey = attribute.Key(\"db.response.returned_rows\")\n\n\t// DBResponseStatusCodeKey is the attribute Key conforming to the\n\t// \"db.response.status_code\" semantic conventions. It represents the database\n\t// response status code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"102\", \"ORA-17002\", \"08P01\", \"404\"\n\t// Note: The status code returned by the database. Usually it represents an\n\t// error code, but may also represent partial success, warning, or differentiate\n\t// between various types of successful outcomes.\n\t// Semantic conventions for individual database systems SHOULD document what\n\t// `db.response.status_code` means in the context of that system.\n\tDBResponseStatusCodeKey = attribute.Key(\"db.response.status_code\")\n\n\t// DBStoredProcedureNameKey is the attribute Key conforming to the\n\t// \"db.stored_procedure.name\" semantic conventions. It represents the name of a\n\t// stored procedure within the database.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GetCustomer\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// stored procedure name then that stored procedure name SHOULD be used.\n\tDBStoredProcedureNameKey = attribute.Key(\"db.stored_procedure.name\")\n\n\t// DBSystemNameKey is the attribute Key conforming to the \"db.system.name\"\n\t// semantic conventions. It represents the database management system (DBMS)\n\t// product as identified by the client instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\t// Note: The actual DBMS may differ from the one identified by the client. For\n\t// example, when using PostgreSQL client libraries to connect to a CockroachDB,\n\t// the `db.system.name` is set to `postgresql` based on the instrumentation's\n\t// best knowledge.\n\tDBSystemNameKey = attribute.Key(\"db.system.name\")\n)\n\n// DBClientConnectionPoolName returns an attribute KeyValue conforming to the\n// \"db.client.connection.pool.name\" semantic conventions. It represents the name\n// of the connection pool; unique within the instrumented application. In case\n// the connection pool implementation doesn't provide a name, instrumentation\n// SHOULD use a combination of parameters that would make the name unique, for\n// example, combining attributes `server.address`, `server.port`, and\n// `db.namespace`, formatted as `server.address:server.port/db.namespace`.\n// Instrumentations that generate connection pool name following different\n// patterns SHOULD document it.\nfunc DBClientConnectionPoolName(val string) attribute.KeyValue {\n\treturn DBClientConnectionPoolNameKey.String(val)\n}\n\n// DBCollectionName returns an attribute KeyValue conforming to the\n// \"db.collection.name\" semantic conventions. It represents the name of a\n// collection (table, container) within the database.\nfunc DBCollectionName(val string) attribute.KeyValue {\n\treturn DBCollectionNameKey.String(val)\n}\n\n// DBNamespace returns an attribute KeyValue conforming to the \"db.namespace\"\n// semantic conventions. It represents the name of the database, fully qualified\n// within the server address and port.\nfunc DBNamespace(val string) attribute.KeyValue {\n\treturn DBNamespaceKey.String(val)\n}\n\n// DBOperationBatchSize returns an attribute KeyValue conforming to the\n// \"db.operation.batch.size\" semantic conventions. It represents the number of\n// queries included in a batch operation.\nfunc DBOperationBatchSize(val int) attribute.KeyValue {\n\treturn DBOperationBatchSizeKey.Int(val)\n}\n\n// DBOperationName returns an attribute KeyValue conforming to the\n// \"db.operation.name\" semantic conventions. It represents the name of the\n// operation or command being executed.\nfunc DBOperationName(val string) attribute.KeyValue {\n\treturn DBOperationNameKey.String(val)\n}\n\n// DBOperationParameter returns an attribute KeyValue conforming to the\n// \"db.operation.parameter\" semantic conventions. It represents a database\n// operation parameter, with `<key>` being the parameter name, and the attribute\n// value being a string representation of the parameter value.\nfunc DBOperationParameter(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"db.operation.parameter.\"+key, val)\n}\n\n// DBQueryParameter returns an attribute KeyValue conforming to the\n// \"db.query.parameter\" semantic conventions. It represents a database query\n// parameter, with `<key>` being the parameter name, and the attribute value\n// being a string representation of the parameter value.\nfunc DBQueryParameter(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"db.query.parameter.\"+key, val)\n}\n\n// DBQuerySummary returns an attribute KeyValue conforming to the\n// \"db.query.summary\" semantic conventions. It represents the low cardinality\n// summary of a database query.\nfunc DBQuerySummary(val string) attribute.KeyValue {\n\treturn DBQuerySummaryKey.String(val)\n}\n\n// DBQueryText returns an attribute KeyValue conforming to the \"db.query.text\"\n// semantic conventions. It represents the database query being executed.\nfunc DBQueryText(val string) attribute.KeyValue {\n\treturn DBQueryTextKey.String(val)\n}\n\n// DBResponseReturnedRows returns an attribute KeyValue conforming to the\n// \"db.response.returned_rows\" semantic conventions. It represents the number of\n// rows returned by the operation.\nfunc DBResponseReturnedRows(val int) attribute.KeyValue {\n\treturn DBResponseReturnedRowsKey.Int(val)\n}\n\n// DBResponseStatusCode returns an attribute KeyValue conforming to the\n// \"db.response.status_code\" semantic conventions. It represents the database\n// response status code.\nfunc DBResponseStatusCode(val string) attribute.KeyValue {\n\treturn DBResponseStatusCodeKey.String(val)\n}\n\n// DBStoredProcedureName returns an attribute KeyValue conforming to the\n// \"db.stored_procedure.name\" semantic conventions. It represents the name of a\n// stored procedure within the database.\nfunc DBStoredProcedureName(val string) attribute.KeyValue {\n\treturn DBStoredProcedureNameKey.String(val)\n}\n\n// Enum values for db.client.connection.state\nvar (\n\t// idle\n\t// Stability: development\n\tDBClientConnectionStateIdle = DBClientConnectionStateKey.String(\"idle\")\n\t// used\n\t// Stability: development\n\tDBClientConnectionStateUsed = DBClientConnectionStateKey.String(\"used\")\n)\n\n// Enum values for db.system.name\nvar (\n\t// Some other SQL database. Fallback only.\n\t// Stability: development\n\tDBSystemNameOtherSQL = DBSystemNameKey.String(\"other_sql\")\n\t// [Adabas (Adaptable Database System)]\n\t// Stability: development\n\t//\n\t// [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas\n\tDBSystemNameSoftwareagAdabas = DBSystemNameKey.String(\"softwareag.adabas\")\n\t// [Actian Ingres]\n\t// Stability: development\n\t//\n\t// [Actian Ingres]: https://www.actian.com/databases/ingres/\n\tDBSystemNameActianIngres = DBSystemNameKey.String(\"actian.ingres\")\n\t// [Amazon DynamoDB]\n\t// Stability: development\n\t//\n\t// [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/\n\tDBSystemNameAWSDynamoDB = DBSystemNameKey.String(\"aws.dynamodb\")\n\t// [Amazon Redshift]\n\t// Stability: development\n\t//\n\t// [Amazon Redshift]: https://aws.amazon.com/redshift/\n\tDBSystemNameAWSRedshift = DBSystemNameKey.String(\"aws.redshift\")\n\t// [Azure Cosmos DB]\n\t// Stability: development\n\t//\n\t// [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db\n\tDBSystemNameAzureCosmosDB = DBSystemNameKey.String(\"azure.cosmosdb\")\n\t// [InterSystems Caché]\n\t// Stability: development\n\t//\n\t// [InterSystems Caché]: https://www.intersystems.com/products/cache/\n\tDBSystemNameIntersystemsCache = DBSystemNameKey.String(\"intersystems.cache\")\n\t// [Apache Cassandra]\n\t// Stability: development\n\t//\n\t// [Apache Cassandra]: https://cassandra.apache.org/\n\tDBSystemNameCassandra = DBSystemNameKey.String(\"cassandra\")\n\t// [ClickHouse]\n\t// Stability: development\n\t//\n\t// [ClickHouse]: https://clickhouse.com/\n\tDBSystemNameClickHouse = DBSystemNameKey.String(\"clickhouse\")\n\t// [CockroachDB]\n\t// Stability: development\n\t//\n\t// [CockroachDB]: https://www.cockroachlabs.com/\n\tDBSystemNameCockroachDB = DBSystemNameKey.String(\"cockroachdb\")\n\t// [Couchbase]\n\t// Stability: development\n\t//\n\t// [Couchbase]: https://www.couchbase.com/\n\tDBSystemNameCouchbase = DBSystemNameKey.String(\"couchbase\")\n\t// [Apache CouchDB]\n\t// Stability: development\n\t//\n\t// [Apache CouchDB]: https://couchdb.apache.org/\n\tDBSystemNameCouchDB = DBSystemNameKey.String(\"couchdb\")\n\t// [Apache Derby]\n\t// Stability: development\n\t//\n\t// [Apache Derby]: https://db.apache.org/derby/\n\tDBSystemNameDerby = DBSystemNameKey.String(\"derby\")\n\t// [Elasticsearch]\n\t// Stability: development\n\t//\n\t// [Elasticsearch]: https://www.elastic.co/elasticsearch\n\tDBSystemNameElasticsearch = DBSystemNameKey.String(\"elasticsearch\")\n\t// [Firebird]\n\t// Stability: development\n\t//\n\t// [Firebird]: https://www.firebirdsql.org/\n\tDBSystemNameFirebirdSQL = DBSystemNameKey.String(\"firebirdsql\")\n\t// [Google Cloud Spanner]\n\t// Stability: development\n\t//\n\t// [Google Cloud Spanner]: https://cloud.google.com/spanner\n\tDBSystemNameGCPSpanner = DBSystemNameKey.String(\"gcp.spanner\")\n\t// [Apache Geode]\n\t// Stability: development\n\t//\n\t// [Apache Geode]: https://geode.apache.org/\n\tDBSystemNameGeode = DBSystemNameKey.String(\"geode\")\n\t// [H2 Database]\n\t// Stability: development\n\t//\n\t// [H2 Database]: https://h2database.com/\n\tDBSystemNameH2database = DBSystemNameKey.String(\"h2database\")\n\t// [Apache HBase]\n\t// Stability: development\n\t//\n\t// [Apache HBase]: https://hbase.apache.org/\n\tDBSystemNameHBase = DBSystemNameKey.String(\"hbase\")\n\t// [Apache Hive]\n\t// Stability: development\n\t//\n\t// [Apache Hive]: https://hive.apache.org/\n\tDBSystemNameHive = DBSystemNameKey.String(\"hive\")\n\t// [HyperSQL Database]\n\t// Stability: development\n\t//\n\t// [HyperSQL Database]: https://hsqldb.org/\n\tDBSystemNameHSQLDB = DBSystemNameKey.String(\"hsqldb\")\n\t// [IBM Db2]\n\t// Stability: development\n\t//\n\t// [IBM Db2]: https://www.ibm.com/db2\n\tDBSystemNameIBMDB2 = DBSystemNameKey.String(\"ibm.db2\")\n\t// [IBM Informix]\n\t// Stability: development\n\t//\n\t// [IBM Informix]: https://www.ibm.com/products/informix\n\tDBSystemNameIBMInformix = DBSystemNameKey.String(\"ibm.informix\")\n\t// [IBM Netezza]\n\t// Stability: development\n\t//\n\t// [IBM Netezza]: https://www.ibm.com/products/netezza\n\tDBSystemNameIBMNetezza = DBSystemNameKey.String(\"ibm.netezza\")\n\t// [InfluxDB]\n\t// Stability: development\n\t//\n\t// [InfluxDB]: https://www.influxdata.com/\n\tDBSystemNameInfluxDB = DBSystemNameKey.String(\"influxdb\")\n\t// [Instant]\n\t// Stability: development\n\t//\n\t// [Instant]: https://www.instantdb.com/\n\tDBSystemNameInstantDB = DBSystemNameKey.String(\"instantdb\")\n\t// [MariaDB]\n\t// Stability: stable\n\t//\n\t// [MariaDB]: https://mariadb.org/\n\tDBSystemNameMariaDB = DBSystemNameKey.String(\"mariadb\")\n\t// [Memcached]\n\t// Stability: development\n\t//\n\t// [Memcached]: https://memcached.org/\n\tDBSystemNameMemcached = DBSystemNameKey.String(\"memcached\")\n\t// [MongoDB]\n\t// Stability: development\n\t//\n\t// [MongoDB]: https://www.mongodb.com/\n\tDBSystemNameMongoDB = DBSystemNameKey.String(\"mongodb\")\n\t// [Microsoft SQL Server]\n\t// Stability: stable\n\t//\n\t// [Microsoft SQL Server]: https://www.microsoft.com/sql-server\n\tDBSystemNameMicrosoftSQLServer = DBSystemNameKey.String(\"microsoft.sql_server\")\n\t// [MySQL]\n\t// Stability: stable\n\t//\n\t// [MySQL]: https://www.mysql.com/\n\tDBSystemNameMySQL = DBSystemNameKey.String(\"mysql\")\n\t// [Neo4j]\n\t// Stability: development\n\t//\n\t// [Neo4j]: https://neo4j.com/\n\tDBSystemNameNeo4j = DBSystemNameKey.String(\"neo4j\")\n\t// [OpenSearch]\n\t// Stability: development\n\t//\n\t// [OpenSearch]: https://opensearch.org/\n\tDBSystemNameOpenSearch = DBSystemNameKey.String(\"opensearch\")\n\t// [Oracle Database]\n\t// Stability: development\n\t//\n\t// [Oracle Database]: https://www.oracle.com/database/\n\tDBSystemNameOracleDB = DBSystemNameKey.String(\"oracle.db\")\n\t// [PostgreSQL]\n\t// Stability: stable\n\t//\n\t// [PostgreSQL]: https://www.postgresql.org/\n\tDBSystemNamePostgreSQL = DBSystemNameKey.String(\"postgresql\")\n\t// [Redis]\n\t// Stability: development\n\t//\n\t// [Redis]: https://redis.io/\n\tDBSystemNameRedis = DBSystemNameKey.String(\"redis\")\n\t// [SAP HANA]\n\t// Stability: development\n\t//\n\t// [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html\n\tDBSystemNameSAPHANA = DBSystemNameKey.String(\"sap.hana\")\n\t// [SAP MaxDB]\n\t// Stability: development\n\t//\n\t// [SAP MaxDB]: https://maxdb.sap.com/\n\tDBSystemNameSAPMaxDB = DBSystemNameKey.String(\"sap.maxdb\")\n\t// [SQLite]\n\t// Stability: development\n\t//\n\t// [SQLite]: https://www.sqlite.org/\n\tDBSystemNameSQLite = DBSystemNameKey.String(\"sqlite\")\n\t// [Teradata]\n\t// Stability: development\n\t//\n\t// [Teradata]: https://www.teradata.com/\n\tDBSystemNameTeradata = DBSystemNameKey.String(\"teradata\")\n\t// [Trino]\n\t// Stability: development\n\t//\n\t// [Trino]: https://trino.io/\n\tDBSystemNameTrino = DBSystemNameKey.String(\"trino\")\n)\n\n// Namespace: deployment\nconst (\n\t// DeploymentEnvironmentNameKey is the attribute Key conforming to the\n\t// \"deployment.environment.name\" semantic conventions. It represents the name of\n\t// the [deployment environment] (aka deployment tier).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"staging\", \"production\"\n\t// Note: `deployment.environment.name` does not affect the uniqueness\n\t// constraints defined through\n\t// the `service.namespace`, `service.name` and `service.instance.id` resource\n\t// attributes.\n\t// This implies that resources carrying the following attribute combinations\n\t// MUST be\n\t// considered to be identifying the same service:\n\t//\n\t//   - `service.name=frontend`, `deployment.environment.name=production`\n\t//   - `service.name=frontend`, `deployment.environment.name=staging`.\n\t//\n\t//\n\t// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment\n\tDeploymentEnvironmentNameKey = attribute.Key(\"deployment.environment.name\")\n\n\t// DeploymentIDKey is the attribute Key conforming to the \"deployment.id\"\n\t// semantic conventions. It represents the id of the deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1208\"\n\tDeploymentIDKey = attribute.Key(\"deployment.id\")\n\n\t// DeploymentNameKey is the attribute Key conforming to the \"deployment.name\"\n\t// semantic conventions. It represents the name of the deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"deploy my app\", \"deploy-frontend\"\n\tDeploymentNameKey = attribute.Key(\"deployment.name\")\n\n\t// DeploymentStatusKey is the attribute Key conforming to the\n\t// \"deployment.status\" semantic conventions. It represents the status of the\n\t// deployment.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tDeploymentStatusKey = attribute.Key(\"deployment.status\")\n)\n\n// DeploymentEnvironmentName returns an attribute KeyValue conforming to the\n// \"deployment.environment.name\" semantic conventions. It represents the name of\n// the [deployment environment] (aka deployment tier).\n//\n// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment\nfunc DeploymentEnvironmentName(val string) attribute.KeyValue {\n\treturn DeploymentEnvironmentNameKey.String(val)\n}\n\n// DeploymentID returns an attribute KeyValue conforming to the \"deployment.id\"\n// semantic conventions. It represents the id of the deployment.\nfunc DeploymentID(val string) attribute.KeyValue {\n\treturn DeploymentIDKey.String(val)\n}\n\n// DeploymentName returns an attribute KeyValue conforming to the\n// \"deployment.name\" semantic conventions. It represents the name of the\n// deployment.\nfunc DeploymentName(val string) attribute.KeyValue {\n\treturn DeploymentNameKey.String(val)\n}\n\n// Enum values for deployment.status\nvar (\n\t// failed\n\t// Stability: development\n\tDeploymentStatusFailed = DeploymentStatusKey.String(\"failed\")\n\t// succeeded\n\t// Stability: development\n\tDeploymentStatusSucceeded = DeploymentStatusKey.String(\"succeeded\")\n)\n\n// Namespace: destination\nconst (\n\t// DestinationAddressKey is the attribute Key conforming to the\n\t// \"destination.address\" semantic conventions. It represents the destination\n\t// address - domain name if available without reverse DNS lookup; otherwise, IP\n\t// address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"destination.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the source side, and when communicating through an\n\t// intermediary, `destination.address` SHOULD represent the destination address\n\t// behind any intermediaries, for example proxies, if it's available.\n\tDestinationAddressKey = attribute.Key(\"destination.address\")\n\n\t// DestinationPortKey is the attribute Key conforming to the \"destination.port\"\n\t// semantic conventions. It represents the destination port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3389, 2888\n\tDestinationPortKey = attribute.Key(\"destination.port\")\n)\n\n// DestinationAddress returns an attribute KeyValue conforming to the\n// \"destination.address\" semantic conventions. It represents the destination\n// address - domain name if available without reverse DNS lookup; otherwise, IP\n// address or Unix domain socket name.\nfunc DestinationAddress(val string) attribute.KeyValue {\n\treturn DestinationAddressKey.String(val)\n}\n\n// DestinationPort returns an attribute KeyValue conforming to the\n// \"destination.port\" semantic conventions. It represents the destination port\n// number.\nfunc DestinationPort(val int) attribute.KeyValue {\n\treturn DestinationPortKey.Int(val)\n}\n\n// Namespace: device\nconst (\n\t// DeviceIDKey is the attribute Key conforming to the \"device.id\" semantic\n\t// conventions. It represents a unique identifier representing the device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123456789012345\", \"01:23:45:67:89:AB\"\n\t// Note: Its value SHOULD be identical for all apps on a device and it SHOULD\n\t// NOT change if an app is uninstalled and re-installed.\n\t// However, it might be resettable by the user for all apps on a device.\n\t// Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be\n\t// used as values.\n\t//\n\t// More information about Android identifier best practices can be found in the\n\t// [Android user data IDs guide].\n\t//\n\t// > [!WARNING]> This attribute may contain sensitive (PII) information. Caution\n\t// > should be taken when storing personal data or anything which can identify a\n\t// > user. GDPR and data protection laws may apply,\n\t// > ensure you do your own due diligence.> Due to these reasons, this\n\t// > identifier is not recommended for consumer applications and will likely\n\t// > result in rejection from both Google Play and App Store.\n\t// > However, it may be appropriate for specific enterprise scenarios, such as\n\t// > kiosk devices or enterprise-managed devices, with appropriate compliance\n\t// > clearance.\n\t// > Any instrumentation providing this identifier MUST implement it as an\n\t// > opt-in feature.> See [`app.installation.id`]>  for a more\n\t// > privacy-preserving alternative.\n\t//\n\t// [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids\n\t// [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id\n\tDeviceIDKey = attribute.Key(\"device.id\")\n\n\t// DeviceManufacturerKey is the attribute Key conforming to the\n\t// \"device.manufacturer\" semantic conventions. It represents the name of the\n\t// device manufacturer.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Apple\", \"Samsung\"\n\t// Note: The Android OS provides this field via [Build]. iOS apps SHOULD\n\t// hardcode the value `Apple`.\n\t//\n\t// [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER\n\tDeviceManufacturerKey = attribute.Key(\"device.manufacturer\")\n\n\t// DeviceModelIdentifierKey is the attribute Key conforming to the\n\t// \"device.model.identifier\" semantic conventions. It represents the model\n\t// identifier for the device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iPhone3,4\", \"SM-G920F\"\n\t// Note: It's recommended this value represents a machine-readable version of\n\t// the model identifier rather than the market or consumer-friendly name of the\n\t// device.\n\tDeviceModelIdentifierKey = attribute.Key(\"device.model.identifier\")\n\n\t// DeviceModelNameKey is the attribute Key conforming to the \"device.model.name\"\n\t// semantic conventions. It represents the marketing name for the device model.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iPhone 6s Plus\", \"Samsung Galaxy S6\"\n\t// Note: It's recommended this value represents a human-readable version of the\n\t// device model rather than a machine-readable alternative.\n\tDeviceModelNameKey = attribute.Key(\"device.model.name\")\n)\n\n// DeviceID returns an attribute KeyValue conforming to the \"device.id\" semantic\n// conventions. It represents a unique identifier representing the device.\nfunc DeviceID(val string) attribute.KeyValue {\n\treturn DeviceIDKey.String(val)\n}\n\n// DeviceManufacturer returns an attribute KeyValue conforming to the\n// \"device.manufacturer\" semantic conventions. It represents the name of the\n// device manufacturer.\nfunc DeviceManufacturer(val string) attribute.KeyValue {\n\treturn DeviceManufacturerKey.String(val)\n}\n\n// DeviceModelIdentifier returns an attribute KeyValue conforming to the\n// \"device.model.identifier\" semantic conventions. It represents the model\n// identifier for the device.\nfunc DeviceModelIdentifier(val string) attribute.KeyValue {\n\treturn DeviceModelIdentifierKey.String(val)\n}\n\n// DeviceModelName returns an attribute KeyValue conforming to the\n// \"device.model.name\" semantic conventions. It represents the marketing name for\n// the device model.\nfunc DeviceModelName(val string) attribute.KeyValue {\n\treturn DeviceModelNameKey.String(val)\n}\n\n// Namespace: disk\nconst (\n\t// DiskIODirectionKey is the attribute Key conforming to the \"disk.io.direction\"\n\t// semantic conventions. It represents the disk IO operation direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"read\"\n\tDiskIODirectionKey = attribute.Key(\"disk.io.direction\")\n)\n\n// Enum values for disk.io.direction\nvar (\n\t// read\n\t// Stability: development\n\tDiskIODirectionRead = DiskIODirectionKey.String(\"read\")\n\t// write\n\t// Stability: development\n\tDiskIODirectionWrite = DiskIODirectionKey.String(\"write\")\n)\n\n// Namespace: dns\nconst (\n\t// DNSAnswersKey is the attribute Key conforming to the \"dns.answers\" semantic\n\t// conventions. It represents the list of IPv4 or IPv6 addresses resolved during\n\t// DNS lookup.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10.0.0.1\", \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"\n\tDNSAnswersKey = attribute.Key(\"dns.answers\")\n\n\t// DNSQuestionNameKey is the attribute Key conforming to the \"dns.question.name\"\n\t// semantic conventions. It represents the name being queried.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"www.example.com\", \"opentelemetry.io\"\n\t// Note: If the name field contains non-printable characters (below 32 or above\n\t// 126), those characters should be represented as escaped base 10 integers\n\t// (\\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns,\n\t// and line feeds should be converted to \\t, \\r, and \\n respectively.\n\tDNSQuestionNameKey = attribute.Key(\"dns.question.name\")\n)\n\n// DNSAnswers returns an attribute KeyValue conforming to the \"dns.answers\"\n// semantic conventions. It represents the list of IPv4 or IPv6 addresses\n// resolved during DNS lookup.\nfunc DNSAnswers(val ...string) attribute.KeyValue {\n\treturn DNSAnswersKey.StringSlice(val)\n}\n\n// DNSQuestionName returns an attribute KeyValue conforming to the\n// \"dns.question.name\" semantic conventions. It represents the name being\n// queried.\nfunc DNSQuestionName(val string) attribute.KeyValue {\n\treturn DNSQuestionNameKey.String(val)\n}\n\n// Namespace: elasticsearch\nconst (\n\t// ElasticsearchNodeNameKey is the attribute Key conforming to the\n\t// \"elasticsearch.node.name\" semantic conventions. It represents the represents\n\t// the human-readable identifier of the node/instance to which a request was\n\t// routed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"instance-0000000001\"\n\tElasticsearchNodeNameKey = attribute.Key(\"elasticsearch.node.name\")\n)\n\n// ElasticsearchNodeName returns an attribute KeyValue conforming to the\n// \"elasticsearch.node.name\" semantic conventions. It represents the represents\n// the human-readable identifier of the node/instance to which a request was\n// routed.\nfunc ElasticsearchNodeName(val string) attribute.KeyValue {\n\treturn ElasticsearchNodeNameKey.String(val)\n}\n\n// Namespace: enduser\nconst (\n\t// EnduserIDKey is the attribute Key conforming to the \"enduser.id\" semantic\n\t// conventions. It represents the unique identifier of an end user in the\n\t// system. It maybe a username, email address, or other identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"username\"\n\t// Note: Unique identifier of an end user in the system.\n\t//\n\t// > [!Warning]\n\t// > This field contains sensitive (PII) information.\n\tEnduserIDKey = attribute.Key(\"enduser.id\")\n\n\t// EnduserPseudoIDKey is the attribute Key conforming to the \"enduser.pseudo.id\"\n\t// semantic conventions. It represents the pseudonymous identifier of an end\n\t// user. This identifier should be a random value that is not directly linked or\n\t// associated with the end user's actual identity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"QdH5CAWJgqVT4rOr0qtumf\"\n\t// Note: Pseudonymous identifier of an end user.\n\t//\n\t// > [!Warning]\n\t// > This field contains sensitive (linkable PII) information.\n\tEnduserPseudoIDKey = attribute.Key(\"enduser.pseudo.id\")\n)\n\n// EnduserID returns an attribute KeyValue conforming to the \"enduser.id\"\n// semantic conventions. It represents the unique identifier of an end user in\n// the system. It maybe a username, email address, or other identifier.\nfunc EnduserID(val string) attribute.KeyValue {\n\treturn EnduserIDKey.String(val)\n}\n\n// EnduserPseudoID returns an attribute KeyValue conforming to the\n// \"enduser.pseudo.id\" semantic conventions. It represents the pseudonymous\n// identifier of an end user. This identifier should be a random value that is\n// not directly linked or associated with the end user's actual identity.\nfunc EnduserPseudoID(val string) attribute.KeyValue {\n\treturn EnduserPseudoIDKey.String(val)\n}\n\n// Namespace: error\nconst (\n\t// ErrorMessageKey is the attribute Key conforming to the \"error.message\"\n\t// semantic conventions. It represents a message providing more detail about an\n\t// error in human-readable form.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Unexpected input type: string\", \"The user has exceeded their\n\t// storage quota\"\n\t// Note: `error.message` should provide additional context and detail about an\n\t// error.\n\t// It is NOT RECOMMENDED to duplicate the value of `error.type` in\n\t// `error.message`.\n\t// It is also NOT RECOMMENDED to duplicate the value of `exception.message` in\n\t// `error.message`.\n\t//\n\t// `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded\n\t// cardinality and overlap with span status.\n\tErrorMessageKey = attribute.Key(\"error.message\")\n\n\t// ErrorTypeKey is the attribute Key conforming to the \"error.type\" semantic\n\t// conventions. It represents the describes a class of error the operation ended\n\t// with.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"timeout\", \"java.net.UnknownHostException\",\n\t// \"server_certificate_invalid\", \"500\"\n\t// Note: The `error.type` SHOULD be predictable, and SHOULD have low\n\t// cardinality.\n\t//\n\t// When `error.type` is set to a type (e.g., an exception type), its\n\t// canonical class name identifying the type within the artifact SHOULD be used.\n\t//\n\t// Instrumentations SHOULD document the list of errors they report.\n\t//\n\t// The cardinality of `error.type` within one instrumentation library SHOULD be\n\t// low.\n\t// Telemetry consumers that aggregate data from multiple instrumentation\n\t// libraries and applications\n\t// should be prepared for `error.type` to have high cardinality at query time\n\t// when no\n\t// additional filters are applied.\n\t//\n\t// If the operation has completed successfully, instrumentations SHOULD NOT set\n\t// `error.type`.\n\t//\n\t// If a specific domain defines its own set of error identifiers (such as HTTP\n\t// or gRPC status codes),\n\t// it's RECOMMENDED to:\n\t//\n\t//   - Use a domain-specific attribute\n\t//   - Set `error.type` to capture all errors, regardless of whether they are\n\t//     defined within the domain-specific set or not.\n\tErrorTypeKey = attribute.Key(\"error.type\")\n)\n\n// ErrorMessage returns an attribute KeyValue conforming to the \"error.message\"\n// semantic conventions. It represents a message providing more detail about an\n// error in human-readable form.\nfunc ErrorMessage(val string) attribute.KeyValue {\n\treturn ErrorMessageKey.String(val)\n}\n\n// Enum values for error.type\nvar (\n\t// A fallback error value to be used when the instrumentation doesn't define a\n\t// custom value.\n\t//\n\t// Stability: stable\n\tErrorTypeOther = ErrorTypeKey.String(\"_OTHER\")\n)\n\n// Namespace: exception\nconst (\n\t// ExceptionMessageKey is the attribute Key conforming to the\n\t// \"exception.message\" semantic conventions. It represents the exception\n\t// message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"Division by zero\", \"Can't convert 'int' object to str implicitly\"\n\tExceptionMessageKey = attribute.Key(\"exception.message\")\n\n\t// ExceptionStacktraceKey is the attribute Key conforming to the\n\t// \"exception.stacktrace\" semantic conventions. It represents a stacktrace as a\n\t// string in the natural representation for the language runtime. The\n\t// representation is to be determined and documented by each language SIG.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: Exception in thread \"main\" java.lang.RuntimeException: Test\n\t// exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at\n\t// com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at\n\t// com.example.GenerateTrace.main(GenerateTrace.java:5)\n\tExceptionStacktraceKey = attribute.Key(\"exception.stacktrace\")\n\n\t// ExceptionTypeKey is the attribute Key conforming to the \"exception.type\"\n\t// semantic conventions. It represents the type of the exception (its\n\t// fully-qualified class name, if applicable). The dynamic type of the exception\n\t// should be preferred over the static type in languages that support it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"java.net.ConnectException\", \"OSError\"\n\tExceptionTypeKey = attribute.Key(\"exception.type\")\n)\n\n// ExceptionMessage returns an attribute KeyValue conforming to the\n// \"exception.message\" semantic conventions. It represents the exception message.\nfunc ExceptionMessage(val string) attribute.KeyValue {\n\treturn ExceptionMessageKey.String(val)\n}\n\n// ExceptionStacktrace returns an attribute KeyValue conforming to the\n// \"exception.stacktrace\" semantic conventions. It represents a stacktrace as a\n// string in the natural representation for the language runtime. The\n// representation is to be determined and documented by each language SIG.\nfunc ExceptionStacktrace(val string) attribute.KeyValue {\n\treturn ExceptionStacktraceKey.String(val)\n}\n\n// ExceptionType returns an attribute KeyValue conforming to the \"exception.type\"\n// semantic conventions. It represents the type of the exception (its\n// fully-qualified class name, if applicable). The dynamic type of the exception\n// should be preferred over the static type in languages that support it.\nfunc ExceptionType(val string) attribute.KeyValue {\n\treturn ExceptionTypeKey.String(val)\n}\n\n// Namespace: faas\nconst (\n\t// FaaSColdstartKey is the attribute Key conforming to the \"faas.coldstart\"\n\t// semantic conventions. It represents a boolean that is true if the serverless\n\t// function is executed for the first time (aka cold-start).\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSColdstartKey = attribute.Key(\"faas.coldstart\")\n\n\t// FaaSCronKey is the attribute Key conforming to the \"faas.cron\" semantic\n\t// conventions. It represents a string containing the schedule period as\n\t// [Cron Expression].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0/5 * * * ? *\n\t//\n\t// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm\n\tFaaSCronKey = attribute.Key(\"faas.cron\")\n\n\t// FaaSDocumentCollectionKey is the attribute Key conforming to the\n\t// \"faas.document.collection\" semantic conventions. It represents the name of\n\t// the source on which the triggering operation was performed. For example, in\n\t// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the\n\t// database name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myBucketName\", \"myDbName\"\n\tFaaSDocumentCollectionKey = attribute.Key(\"faas.document.collection\")\n\n\t// FaaSDocumentNameKey is the attribute Key conforming to the\n\t// \"faas.document.name\" semantic conventions. It represents the document\n\t// name/table subjected to the operation. For example, in Cloud Storage or S3 is\n\t// the name of the file, and in Cosmos DB the table name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myFile.txt\", \"myTableName\"\n\tFaaSDocumentNameKey = attribute.Key(\"faas.document.name\")\n\n\t// FaaSDocumentOperationKey is the attribute Key conforming to the\n\t// \"faas.document.operation\" semantic conventions. It represents the describes\n\t// the type of the operation that was performed on the data.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSDocumentOperationKey = attribute.Key(\"faas.document.operation\")\n\n\t// FaaSDocumentTimeKey is the attribute Key conforming to the\n\t// \"faas.document.time\" semantic conventions. It represents a string containing\n\t// the time when the data was accessed in the [ISO 8601] format expressed in\n\t// [UTC].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 2020-01-23T13:47:06Z\n\t//\n\t// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n\t// [UTC]: https://www.w3.org/TR/NOTE-datetime\n\tFaaSDocumentTimeKey = attribute.Key(\"faas.document.time\")\n\n\t// FaaSInstanceKey is the attribute Key conforming to the \"faas.instance\"\n\t// semantic conventions. It represents the execution environment ID as a string,\n\t// that will be potentially reused for other invocations to the same\n\t// function/function version.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de\"\n\t// Note: - **AWS Lambda:** Use the (full) log stream name.\n\tFaaSInstanceKey = attribute.Key(\"faas.instance\")\n\n\t// FaaSInvocationIDKey is the attribute Key conforming to the\n\t// \"faas.invocation_id\" semantic conventions. It represents the invocation ID of\n\t// the current function invocation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28\n\tFaaSInvocationIDKey = attribute.Key(\"faas.invocation_id\")\n\n\t// FaaSInvokedNameKey is the attribute Key conforming to the \"faas.invoked_name\"\n\t// semantic conventions. It represents the name of the invoked function.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: my-function\n\t// Note: SHOULD be equal to the `faas.name` resource attribute of the invoked\n\t// function.\n\tFaaSInvokedNameKey = attribute.Key(\"faas.invoked_name\")\n\n\t// FaaSInvokedProviderKey is the attribute Key conforming to the\n\t// \"faas.invoked_provider\" semantic conventions. It represents the cloud\n\t// provider of the invoked function.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: SHOULD be equal to the `cloud.provider` resource attribute of the\n\t// invoked function.\n\tFaaSInvokedProviderKey = attribute.Key(\"faas.invoked_provider\")\n\n\t// FaaSInvokedRegionKey is the attribute Key conforming to the\n\t// \"faas.invoked_region\" semantic conventions. It represents the cloud region of\n\t// the invoked function.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: eu-central-1\n\t// Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked\n\t// function.\n\tFaaSInvokedRegionKey = attribute.Key(\"faas.invoked_region\")\n\n\t// FaaSMaxMemoryKey is the attribute Key conforming to the \"faas.max_memory\"\n\t// semantic conventions. It represents the amount of memory available to the\n\t// serverless function converted to Bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: It's recommended to set this attribute since e.g. too little memory can\n\t// easily stop a Java AWS Lambda function from working correctly. On AWS Lambda,\n\t// the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this\n\t// information (which must be multiplied by 1,048,576).\n\tFaaSMaxMemoryKey = attribute.Key(\"faas.max_memory\")\n\n\t// FaaSNameKey is the attribute Key conforming to the \"faas.name\" semantic\n\t// conventions. It represents the name of the single function that this runtime\n\t// instance executes.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-function\", \"myazurefunctionapp/some-function-name\"\n\t// Note: This is the name of the function as configured/deployed on the FaaS\n\t// platform and is usually different from the name of the callback\n\t// function (which may be stored in the\n\t// [`code.namespace`/`code.function.name`]\n\t// span attributes).\n\t//\n\t// For some cloud providers, the above definition is ambiguous. The following\n\t// definition of function name MUST be used for this attribute\n\t// (and consequently the span name) for the listed cloud providers/products:\n\t//\n\t//   - **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name\n\t//     followed by a forward slash followed by the function name (this form\n\t//     can also be seen in the resource JSON for the function).\n\t//     This means that a span attribute MUST be used, as an Azure function\n\t//     app can host multiple functions that would usually share\n\t//     a TracerProvider (see also the `cloud.resource_id` attribute).\n\t//\n\t//\n\t// [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes\n\tFaaSNameKey = attribute.Key(\"faas.name\")\n\n\t// FaaSTimeKey is the attribute Key conforming to the \"faas.time\" semantic\n\t// conventions. It represents a string containing the function invocation time\n\t// in the [ISO 8601] format expressed in [UTC].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 2020-01-23T13:47:06Z\n\t//\n\t// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n\t// [UTC]: https://www.w3.org/TR/NOTE-datetime\n\tFaaSTimeKey = attribute.Key(\"faas.time\")\n\n\t// FaaSTriggerKey is the attribute Key conforming to the \"faas.trigger\" semantic\n\t// conventions. It represents the type of the trigger which caused this function\n\t// invocation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSTriggerKey = attribute.Key(\"faas.trigger\")\n\n\t// FaaSVersionKey is the attribute Key conforming to the \"faas.version\" semantic\n\t// conventions. It represents the immutable version of the function being\n\t// executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"26\", \"pinkfroid-00002\"\n\t// Note: Depending on the cloud provider and platform, use:\n\t//\n\t//   - **AWS Lambda:** The [function version]\n\t//     (an integer represented as a decimal string).\n\t//   - **Google Cloud Run (Services):** The [revision]\n\t//     (i.e., the function name plus the revision suffix).\n\t//   - **Google Cloud Functions:** The value of the\n\t//     [`K_REVISION` environment variable].\n\t//   - **Azure Functions:** Not applicable. Do not set this attribute.\n\t//\n\t//\n\t// [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html\n\t// [revision]: https://cloud.google.com/run/docs/managing/revisions\n\t// [`K_REVISION` environment variable]: https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically\n\tFaaSVersionKey = attribute.Key(\"faas.version\")\n)\n\n// FaaSColdstart returns an attribute KeyValue conforming to the \"faas.coldstart\"\n// semantic conventions. It represents a boolean that is true if the serverless\n// function is executed for the first time (aka cold-start).\nfunc FaaSColdstart(val bool) attribute.KeyValue {\n\treturn FaaSColdstartKey.Bool(val)\n}\n\n// FaaSCron returns an attribute KeyValue conforming to the \"faas.cron\" semantic\n// conventions. It represents a string containing the schedule period as\n// [Cron Expression].\n//\n// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm\nfunc FaaSCron(val string) attribute.KeyValue {\n\treturn FaaSCronKey.String(val)\n}\n\n// FaaSDocumentCollection returns an attribute KeyValue conforming to the\n// \"faas.document.collection\" semantic conventions. It represents the name of the\n// source on which the triggering operation was performed. For example, in Cloud\n// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database\n// name.\nfunc FaaSDocumentCollection(val string) attribute.KeyValue {\n\treturn FaaSDocumentCollectionKey.String(val)\n}\n\n// FaaSDocumentName returns an attribute KeyValue conforming to the\n// \"faas.document.name\" semantic conventions. It represents the document\n// name/table subjected to the operation. For example, in Cloud Storage or S3 is\n// the name of the file, and in Cosmos DB the table name.\nfunc FaaSDocumentName(val string) attribute.KeyValue {\n\treturn FaaSDocumentNameKey.String(val)\n}\n\n// FaaSDocumentTime returns an attribute KeyValue conforming to the\n// \"faas.document.time\" semantic conventions. It represents a string containing\n// the time when the data was accessed in the [ISO 8601] format expressed in\n// [UTC].\n//\n// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n// [UTC]: https://www.w3.org/TR/NOTE-datetime\nfunc FaaSDocumentTime(val string) attribute.KeyValue {\n\treturn FaaSDocumentTimeKey.String(val)\n}\n\n// FaaSInstance returns an attribute KeyValue conforming to the \"faas.instance\"\n// semantic conventions. It represents the execution environment ID as a string,\n// that will be potentially reused for other invocations to the same\n// function/function version.\nfunc FaaSInstance(val string) attribute.KeyValue {\n\treturn FaaSInstanceKey.String(val)\n}\n\n// FaaSInvocationID returns an attribute KeyValue conforming to the\n// \"faas.invocation_id\" semantic conventions. It represents the invocation ID of\n// the current function invocation.\nfunc FaaSInvocationID(val string) attribute.KeyValue {\n\treturn FaaSInvocationIDKey.String(val)\n}\n\n// FaaSInvokedName returns an attribute KeyValue conforming to the\n// \"faas.invoked_name\" semantic conventions. It represents the name of the\n// invoked function.\nfunc FaaSInvokedName(val string) attribute.KeyValue {\n\treturn FaaSInvokedNameKey.String(val)\n}\n\n// FaaSInvokedRegion returns an attribute KeyValue conforming to the\n// \"faas.invoked_region\" semantic conventions. It represents the cloud region of\n// the invoked function.\nfunc FaaSInvokedRegion(val string) attribute.KeyValue {\n\treturn FaaSInvokedRegionKey.String(val)\n}\n\n// FaaSMaxMemory returns an attribute KeyValue conforming to the\n// \"faas.max_memory\" semantic conventions. It represents the amount of memory\n// available to the serverless function converted to Bytes.\nfunc FaaSMaxMemory(val int) attribute.KeyValue {\n\treturn FaaSMaxMemoryKey.Int(val)\n}\n\n// FaaSName returns an attribute KeyValue conforming to the \"faas.name\" semantic\n// conventions. It represents the name of the single function that this runtime\n// instance executes.\nfunc FaaSName(val string) attribute.KeyValue {\n\treturn FaaSNameKey.String(val)\n}\n\n// FaaSTime returns an attribute KeyValue conforming to the \"faas.time\" semantic\n// conventions. It represents a string containing the function invocation time in\n// the [ISO 8601] format expressed in [UTC].\n//\n// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n// [UTC]: https://www.w3.org/TR/NOTE-datetime\nfunc FaaSTime(val string) attribute.KeyValue {\n\treturn FaaSTimeKey.String(val)\n}\n\n// FaaSVersion returns an attribute KeyValue conforming to the \"faas.version\"\n// semantic conventions. It represents the immutable version of the function\n// being executed.\nfunc FaaSVersion(val string) attribute.KeyValue {\n\treturn FaaSVersionKey.String(val)\n}\n\n// Enum values for faas.document.operation\nvar (\n\t// When a new object is created.\n\t// Stability: development\n\tFaaSDocumentOperationInsert = FaaSDocumentOperationKey.String(\"insert\")\n\t// When an object is modified.\n\t// Stability: development\n\tFaaSDocumentOperationEdit = FaaSDocumentOperationKey.String(\"edit\")\n\t// When an object is deleted.\n\t// Stability: development\n\tFaaSDocumentOperationDelete = FaaSDocumentOperationKey.String(\"delete\")\n)\n\n// Enum values for faas.invoked_provider\nvar (\n\t// Alibaba Cloud\n\t// Stability: development\n\tFaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String(\"alibaba_cloud\")\n\t// Amazon Web Services\n\t// Stability: development\n\tFaaSInvokedProviderAWS = FaaSInvokedProviderKey.String(\"aws\")\n\t// Microsoft Azure\n\t// Stability: development\n\tFaaSInvokedProviderAzure = FaaSInvokedProviderKey.String(\"azure\")\n\t// Google Cloud Platform\n\t// Stability: development\n\tFaaSInvokedProviderGCP = FaaSInvokedProviderKey.String(\"gcp\")\n\t// Tencent Cloud\n\t// Stability: development\n\tFaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String(\"tencent_cloud\")\n)\n\n// Enum values for faas.trigger\nvar (\n\t// A response to some data source operation such as a database or filesystem\n\t// read/write\n\t// Stability: development\n\tFaaSTriggerDatasource = FaaSTriggerKey.String(\"datasource\")\n\t// To provide an answer to an inbound HTTP request\n\t// Stability: development\n\tFaaSTriggerHTTP = FaaSTriggerKey.String(\"http\")\n\t// A function is set to be executed when messages are sent to a messaging system\n\t// Stability: development\n\tFaaSTriggerPubSub = FaaSTriggerKey.String(\"pubsub\")\n\t// A function is scheduled to be executed regularly\n\t// Stability: development\n\tFaaSTriggerTimer = FaaSTriggerKey.String(\"timer\")\n\t// If none of the others apply\n\t// Stability: development\n\tFaaSTriggerOther = FaaSTriggerKey.String(\"other\")\n)\n\n// Namespace: feature_flag\nconst (\n\t// FeatureFlagContextIDKey is the attribute Key conforming to the\n\t// \"feature_flag.context.id\" semantic conventions. It represents the unique\n\t// identifier for the flag evaluation context. For example, the targeting key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"5157782b-2203-4c80-a857-dbbd5e7761db\"\n\tFeatureFlagContextIDKey = attribute.Key(\"feature_flag.context.id\")\n\n\t// FeatureFlagKeyKey is the attribute Key conforming to the \"feature_flag.key\"\n\t// semantic conventions. It represents the lookup key of the feature flag.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"logo-color\"\n\tFeatureFlagKeyKey = attribute.Key(\"feature_flag.key\")\n\n\t// FeatureFlagProviderNameKey is the attribute Key conforming to the\n\t// \"feature_flag.provider.name\" semantic conventions. It represents the\n\t// identifies the feature flag provider.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"Flag Manager\"\n\tFeatureFlagProviderNameKey = attribute.Key(\"feature_flag.provider.name\")\n\n\t// FeatureFlagResultReasonKey is the attribute Key conforming to the\n\t// \"feature_flag.result.reason\" semantic conventions. It represents the reason\n\t// code which shows how a feature flag value was determined.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"static\", \"targeting_match\", \"error\", \"default\"\n\tFeatureFlagResultReasonKey = attribute.Key(\"feature_flag.result.reason\")\n\n\t// FeatureFlagResultValueKey is the attribute Key conforming to the\n\t// \"feature_flag.result.value\" semantic conventions. It represents the evaluated\n\t// value of the feature flag.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"#ff0000\", true, 3\n\t// Note: With some feature flag providers, feature flag results can be quite\n\t// large or contain private or sensitive details.\n\t// Because of this, `feature_flag.result.variant` is often the preferred\n\t// attribute if it is available.\n\t//\n\t// It may be desirable to redact or otherwise limit the size and scope of\n\t// `feature_flag.result.value` if possible.\n\t// Because the evaluated flag value is unstructured and may be any type, it is\n\t// left to the instrumentation author to determine how best to achieve this.\n\tFeatureFlagResultValueKey = attribute.Key(\"feature_flag.result.value\")\n\n\t// FeatureFlagResultVariantKey is the attribute Key conforming to the\n\t// \"feature_flag.result.variant\" semantic conventions. It represents a semantic\n\t// identifier for an evaluated flag value.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"red\", \"true\", \"on\"\n\t// Note: A semantic identifier, commonly referred to as a variant, provides a\n\t// means\n\t// for referring to a value without including the value itself. This can\n\t// provide additional context for understanding the meaning behind a value.\n\t// For example, the variant `red` maybe be used for the value `#c05543`.\n\tFeatureFlagResultVariantKey = attribute.Key(\"feature_flag.result.variant\")\n\n\t// FeatureFlagSetIDKey is the attribute Key conforming to the\n\t// \"feature_flag.set.id\" semantic conventions. It represents the identifier of\n\t// the [flag set] to which the feature flag belongs.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"proj-1\", \"ab98sgs\", \"service1/dev\"\n\t//\n\t// [flag set]: https://openfeature.dev/specification/glossary/#flag-set\n\tFeatureFlagSetIDKey = attribute.Key(\"feature_flag.set.id\")\n\n\t// FeatureFlagVersionKey is the attribute Key conforming to the\n\t// \"feature_flag.version\" semantic conventions. It represents the version of the\n\t// ruleset used during the evaluation. This may be any stable value which\n\t// uniquely identifies the ruleset.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"1\", \"01ABCDEF\"\n\tFeatureFlagVersionKey = attribute.Key(\"feature_flag.version\")\n)\n\n// FeatureFlagContextID returns an attribute KeyValue conforming to the\n// \"feature_flag.context.id\" semantic conventions. It represents the unique\n// identifier for the flag evaluation context. For example, the targeting key.\nfunc FeatureFlagContextID(val string) attribute.KeyValue {\n\treturn FeatureFlagContextIDKey.String(val)\n}\n\n// FeatureFlagKey returns an attribute KeyValue conforming to the\n// \"feature_flag.key\" semantic conventions. It represents the lookup key of the\n// feature flag.\nfunc FeatureFlagKey(val string) attribute.KeyValue {\n\treturn FeatureFlagKeyKey.String(val)\n}\n\n// FeatureFlagProviderName returns an attribute KeyValue conforming to the\n// \"feature_flag.provider.name\" semantic conventions. It represents the\n// identifies the feature flag provider.\nfunc FeatureFlagProviderName(val string) attribute.KeyValue {\n\treturn FeatureFlagProviderNameKey.String(val)\n}\n\n// FeatureFlagResultVariant returns an attribute KeyValue conforming to the\n// \"feature_flag.result.variant\" semantic conventions. It represents a semantic\n// identifier for an evaluated flag value.\nfunc FeatureFlagResultVariant(val string) attribute.KeyValue {\n\treturn FeatureFlagResultVariantKey.String(val)\n}\n\n// FeatureFlagSetID returns an attribute KeyValue conforming to the\n// \"feature_flag.set.id\" semantic conventions. It represents the identifier of\n// the [flag set] to which the feature flag belongs.\n//\n// [flag set]: https://openfeature.dev/specification/glossary/#flag-set\nfunc FeatureFlagSetID(val string) attribute.KeyValue {\n\treturn FeatureFlagSetIDKey.String(val)\n}\n\n// FeatureFlagVersion returns an attribute KeyValue conforming to the\n// \"feature_flag.version\" semantic conventions. It represents the version of the\n// ruleset used during the evaluation. This may be any stable value which\n// uniquely identifies the ruleset.\nfunc FeatureFlagVersion(val string) attribute.KeyValue {\n\treturn FeatureFlagVersionKey.String(val)\n}\n\n// Enum values for feature_flag.result.reason\nvar (\n\t// The resolved value is static (no dynamic evaluation).\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String(\"static\")\n\t// The resolved value fell back to a pre-configured value (no dynamic evaluation\n\t// occurred or dynamic evaluation yielded no result).\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String(\"default\")\n\t// The resolved value was the result of a dynamic evaluation, such as a rule or\n\t// specific user-targeting.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String(\"targeting_match\")\n\t// The resolved value was the result of pseudorandom assignment.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String(\"split\")\n\t// The resolved value was retrieved from cache.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String(\"cached\")\n\t// The resolved value was the result of the flag being disabled in the\n\t// management system.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String(\"disabled\")\n\t// The reason for the resolved value could not be determined.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String(\"unknown\")\n\t// The resolved value is non-authoritative or possibly out of date\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String(\"stale\")\n\t// The resolved value was the result of an error.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonError = FeatureFlagResultReasonKey.String(\"error\")\n)\n\n// Namespace: file\nconst (\n\t// FileAccessedKey is the attribute Key conforming to the \"file.accessed\"\n\t// semantic conventions. It represents the time when the file was last accessed,\n\t// in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: This attribute might not be supported by some file systems — NFS,\n\t// FAT32, in embedded OS, etc.\n\tFileAccessedKey = attribute.Key(\"file.accessed\")\n\n\t// FileAttributesKey is the attribute Key conforming to the \"file.attributes\"\n\t// semantic conventions. It represents the array of file attributes.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"readonly\", \"hidden\"\n\t// Note: Attributes names depend on the OS or file system. Here’s a\n\t// non-exhaustive list of values expected for this attribute: `archive`,\n\t// `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`,\n\t// `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`,\n\t// `write`.\n\tFileAttributesKey = attribute.Key(\"file.attributes\")\n\n\t// FileChangedKey is the attribute Key conforming to the \"file.changed\" semantic\n\t// conventions. It represents the time when the file attributes or metadata was\n\t// last changed, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: `file.changed` captures the time when any of the file's properties or\n\t// attributes (including the content) are changed, while `file.modified`\n\t// captures the timestamp when the file content is modified.\n\tFileChangedKey = attribute.Key(\"file.changed\")\n\n\t// FileCreatedKey is the attribute Key conforming to the \"file.created\" semantic\n\t// conventions. It represents the time when the file was created, in ISO 8601\n\t// format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: This attribute might not be supported by some file systems — NFS,\n\t// FAT32, in embedded OS, etc.\n\tFileCreatedKey = attribute.Key(\"file.created\")\n\n\t// FileDirectoryKey is the attribute Key conforming to the \"file.directory\"\n\t// semantic conventions. It represents the directory where the file is located.\n\t// It should include the drive letter, when appropriate.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/home/user\", \"C:\\Program Files\\MyApp\"\n\tFileDirectoryKey = attribute.Key(\"file.directory\")\n\n\t// FileExtensionKey is the attribute Key conforming to the \"file.extension\"\n\t// semantic conventions. It represents the file extension, excluding the leading\n\t// dot.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"png\", \"gz\"\n\t// Note: When the file name has multiple extensions (example.tar.gz), only the\n\t// last one should be captured (\"gz\", not \"tar.gz\").\n\tFileExtensionKey = attribute.Key(\"file.extension\")\n\n\t// FileForkNameKey is the attribute Key conforming to the \"file.fork_name\"\n\t// semantic conventions. It represents the name of the fork. A fork is\n\t// additional data associated with a filesystem object.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Zone.Identifier\"\n\t// Note: On Linux, a resource fork is used to store additional data with a\n\t// filesystem object. A file always has at least one fork for the data portion,\n\t// and additional forks may exist.\n\t// On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default\n\t// data stream for a file is just called $DATA. Zone.Identifier is commonly used\n\t// by Windows to track contents downloaded from the Internet. An ADS is\n\t// typically of the form: C:\\path\\to\\filename.extension:some_fork_name, and\n\t// some_fork_name is the value that should populate `fork_name`.\n\t// `filename.extension` should populate `file.name`, and `extension` should\n\t// populate `file.extension`. The full path, `file.path`, will include the fork\n\t// name.\n\tFileForkNameKey = attribute.Key(\"file.fork_name\")\n\n\t// FileGroupIDKey is the attribute Key conforming to the \"file.group.id\"\n\t// semantic conventions. It represents the primary Group ID (GID) of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1000\"\n\tFileGroupIDKey = attribute.Key(\"file.group.id\")\n\n\t// FileGroupNameKey is the attribute Key conforming to the \"file.group.name\"\n\t// semantic conventions. It represents the primary group name of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"users\"\n\tFileGroupNameKey = attribute.Key(\"file.group.name\")\n\n\t// FileInodeKey is the attribute Key conforming to the \"file.inode\" semantic\n\t// conventions. It represents the inode representing the file in the filesystem.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"256383\"\n\tFileInodeKey = attribute.Key(\"file.inode\")\n\n\t// FileModeKey is the attribute Key conforming to the \"file.mode\" semantic\n\t// conventions. It represents the mode of the file in octal representation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0640\"\n\tFileModeKey = attribute.Key(\"file.mode\")\n\n\t// FileModifiedKey is the attribute Key conforming to the \"file.modified\"\n\t// semantic conventions. It represents the time when the file content was last\n\t// modified, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\tFileModifiedKey = attribute.Key(\"file.modified\")\n\n\t// FileNameKey is the attribute Key conforming to the \"file.name\" semantic\n\t// conventions. It represents the name of the file including the extension,\n\t// without the directory.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"example.png\"\n\tFileNameKey = attribute.Key(\"file.name\")\n\n\t// FileOwnerIDKey is the attribute Key conforming to the \"file.owner.id\"\n\t// semantic conventions. It represents the user ID (UID) or security identifier\n\t// (SID) of the file owner.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1000\"\n\tFileOwnerIDKey = attribute.Key(\"file.owner.id\")\n\n\t// FileOwnerNameKey is the attribute Key conforming to the \"file.owner.name\"\n\t// semantic conventions. It represents the username of the file owner.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tFileOwnerNameKey = attribute.Key(\"file.owner.name\")\n\n\t// FilePathKey is the attribute Key conforming to the \"file.path\" semantic\n\t// conventions. It represents the full path to the file, including the file\n\t// name. It should include the drive letter, when appropriate.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/home/alice/example.png\", \"C:\\Program Files\\MyApp\\myapp.exe\"\n\tFilePathKey = attribute.Key(\"file.path\")\n\n\t// FileSizeKey is the attribute Key conforming to the \"file.size\" semantic\n\t// conventions. It represents the file size in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFileSizeKey = attribute.Key(\"file.size\")\n\n\t// FileSymbolicLinkTargetPathKey is the attribute Key conforming to the\n\t// \"file.symbolic_link.target_path\" semantic conventions. It represents the path\n\t// to the target of a symbolic link.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/usr/bin/python3\"\n\t// Note: This attribute is only applicable to symbolic links.\n\tFileSymbolicLinkTargetPathKey = attribute.Key(\"file.symbolic_link.target_path\")\n)\n\n// FileAccessed returns an attribute KeyValue conforming to the \"file.accessed\"\n// semantic conventions. It represents the time when the file was last accessed,\n// in ISO 8601 format.\nfunc FileAccessed(val string) attribute.KeyValue {\n\treturn FileAccessedKey.String(val)\n}\n\n// FileAttributes returns an attribute KeyValue conforming to the\n// \"file.attributes\" semantic conventions. It represents the array of file\n// attributes.\nfunc FileAttributes(val ...string) attribute.KeyValue {\n\treturn FileAttributesKey.StringSlice(val)\n}\n\n// FileChanged returns an attribute KeyValue conforming to the \"file.changed\"\n// semantic conventions. It represents the time when the file attributes or\n// metadata was last changed, in ISO 8601 format.\nfunc FileChanged(val string) attribute.KeyValue {\n\treturn FileChangedKey.String(val)\n}\n\n// FileCreated returns an attribute KeyValue conforming to the \"file.created\"\n// semantic conventions. It represents the time when the file was created, in ISO\n// 8601 format.\nfunc FileCreated(val string) attribute.KeyValue {\n\treturn FileCreatedKey.String(val)\n}\n\n// FileDirectory returns an attribute KeyValue conforming to the \"file.directory\"\n// semantic conventions. It represents the directory where the file is located.\n// It should include the drive letter, when appropriate.\nfunc FileDirectory(val string) attribute.KeyValue {\n\treturn FileDirectoryKey.String(val)\n}\n\n// FileExtension returns an attribute KeyValue conforming to the \"file.extension\"\n// semantic conventions. It represents the file extension, excluding the leading\n// dot.\nfunc FileExtension(val string) attribute.KeyValue {\n\treturn FileExtensionKey.String(val)\n}\n\n// FileForkName returns an attribute KeyValue conforming to the \"file.fork_name\"\n// semantic conventions. It represents the name of the fork. A fork is additional\n// data associated with a filesystem object.\nfunc FileForkName(val string) attribute.KeyValue {\n\treturn FileForkNameKey.String(val)\n}\n\n// FileGroupID returns an attribute KeyValue conforming to the \"file.group.id\"\n// semantic conventions. It represents the primary Group ID (GID) of the file.\nfunc FileGroupID(val string) attribute.KeyValue {\n\treturn FileGroupIDKey.String(val)\n}\n\n// FileGroupName returns an attribute KeyValue conforming to the\n// \"file.group.name\" semantic conventions. It represents the primary group name\n// of the file.\nfunc FileGroupName(val string) attribute.KeyValue {\n\treturn FileGroupNameKey.String(val)\n}\n\n// FileInode returns an attribute KeyValue conforming to the \"file.inode\"\n// semantic conventions. It represents the inode representing the file in the\n// filesystem.\nfunc FileInode(val string) attribute.KeyValue {\n\treturn FileInodeKey.String(val)\n}\n\n// FileMode returns an attribute KeyValue conforming to the \"file.mode\" semantic\n// conventions. It represents the mode of the file in octal representation.\nfunc FileMode(val string) attribute.KeyValue {\n\treturn FileModeKey.String(val)\n}\n\n// FileModified returns an attribute KeyValue conforming to the \"file.modified\"\n// semantic conventions. It represents the time when the file content was last\n// modified, in ISO 8601 format.\nfunc FileModified(val string) attribute.KeyValue {\n\treturn FileModifiedKey.String(val)\n}\n\n// FileName returns an attribute KeyValue conforming to the \"file.name\" semantic\n// conventions. It represents the name of the file including the extension,\n// without the directory.\nfunc FileName(val string) attribute.KeyValue {\n\treturn FileNameKey.String(val)\n}\n\n// FileOwnerID returns an attribute KeyValue conforming to the \"file.owner.id\"\n// semantic conventions. It represents the user ID (UID) or security identifier\n// (SID) of the file owner.\nfunc FileOwnerID(val string) attribute.KeyValue {\n\treturn FileOwnerIDKey.String(val)\n}\n\n// FileOwnerName returns an attribute KeyValue conforming to the\n// \"file.owner.name\" semantic conventions. It represents the username of the file\n// owner.\nfunc FileOwnerName(val string) attribute.KeyValue {\n\treturn FileOwnerNameKey.String(val)\n}\n\n// FilePath returns an attribute KeyValue conforming to the \"file.path\" semantic\n// conventions. It represents the full path to the file, including the file name.\n// It should include the drive letter, when appropriate.\nfunc FilePath(val string) attribute.KeyValue {\n\treturn FilePathKey.String(val)\n}\n\n// FileSize returns an attribute KeyValue conforming to the \"file.size\" semantic\n// conventions. It represents the file size in bytes.\nfunc FileSize(val int) attribute.KeyValue {\n\treturn FileSizeKey.Int(val)\n}\n\n// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the\n// \"file.symbolic_link.target_path\" semantic conventions. It represents the path\n// to the target of a symbolic link.\nfunc FileSymbolicLinkTargetPath(val string) attribute.KeyValue {\n\treturn FileSymbolicLinkTargetPathKey.String(val)\n}\n\n// Namespace: gcp\nconst (\n\t// GCPAppHubApplicationContainerKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.container\" semantic conventions. It represents the\n\t// container within GCP where the AppHub application is defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"projects/my-container-project\"\n\tGCPAppHubApplicationContainerKey = attribute.Key(\"gcp.apphub.application.container\")\n\n\t// GCPAppHubApplicationIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.id\" semantic conventions. It represents the name of\n\t// the application as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-application\"\n\tGCPAppHubApplicationIDKey = attribute.Key(\"gcp.apphub.application.id\")\n\n\t// GCPAppHubApplicationLocationKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.location\" semantic conventions. It represents the GCP\n\t// zone or region where the application is defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-central1\"\n\tGCPAppHubApplicationLocationKey = attribute.Key(\"gcp.apphub.application.location\")\n\n\t// GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.criticality_type\" semantic conventions. It represents the\n\t// criticality of a service indicates its importance to the business.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub type enum]\n\t//\n\t// [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubServiceCriticalityTypeKey = attribute.Key(\"gcp.apphub.service.criticality_type\")\n\n\t// GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.environment_type\" semantic conventions. It represents the\n\t// environment of a service is the stage of a software lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub environment type]\n\t//\n\t// [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubServiceEnvironmentTypeKey = attribute.Key(\"gcp.apphub.service.environment_type\")\n\n\t// GCPAppHubServiceIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.id\" semantic conventions. It represents the name of the\n\t// service as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-service\"\n\tGCPAppHubServiceIDKey = attribute.Key(\"gcp.apphub.service.id\")\n\n\t// GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.criticality_type\" semantic conventions. It represents\n\t// the criticality of a workload indicates its importance to the business.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub type enum]\n\t//\n\t// [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubWorkloadCriticalityTypeKey = attribute.Key(\"gcp.apphub.workload.criticality_type\")\n\n\t// GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.environment_type\" semantic conventions. It represents\n\t// the environment of a workload is the stage of a software lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub environment type]\n\t//\n\t// [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubWorkloadEnvironmentTypeKey = attribute.Key(\"gcp.apphub.workload.environment_type\")\n\n\t// GCPAppHubWorkloadIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.id\" semantic conventions. It represents the name of the\n\t// workload as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-workload\"\n\tGCPAppHubWorkloadIDKey = attribute.Key(\"gcp.apphub.workload.id\")\n\n\t// GCPClientServiceKey is the attribute Key conforming to the\n\t// \"gcp.client.service\" semantic conventions. It represents the identifies the\n\t// Google Cloud service for which the official client library is intended.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"appengine\", \"run\", \"firestore\", \"alloydb\", \"spanner\"\n\t// Note: Intended to be a stable identifier for Google Cloud client libraries\n\t// that is uniform across implementation languages. The value should be derived\n\t// from the canonical service domain for the service; for example,\n\t// 'foo.googleapis.com' should result in a value of 'foo'.\n\tGCPClientServiceKey = attribute.Key(\"gcp.client.service\")\n\n\t// GCPCloudRunJobExecutionKey is the attribute Key conforming to the\n\t// \"gcp.cloud_run.job.execution\" semantic conventions. It represents the name of\n\t// the Cloud Run [execution] being run for the Job, as set by the\n\t// [`CLOUD_RUN_EXECUTION`] environment variable.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"job-name-xxxx\", \"sample-job-mdw84\"\n\t//\n\t// [execution]: https://cloud.google.com/run/docs/managing/job-executions\n\t// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\n\tGCPCloudRunJobExecutionKey = attribute.Key(\"gcp.cloud_run.job.execution\")\n\n\t// GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the\n\t// \"gcp.cloud_run.job.task_index\" semantic conventions. It represents the index\n\t// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]\n\t// environment variable.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 1\n\t//\n\t// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\n\tGCPCloudRunJobTaskIndexKey = attribute.Key(\"gcp.cloud_run.job.task_index\")\n\n\t// GCPGCEInstanceHostnameKey is the attribute Key conforming to the\n\t// \"gcp.gce.instance.hostname\" semantic conventions. It represents the hostname\n\t// of a GCE instance. This is the full value of the default or [custom hostname]\n\t// .\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-host1234.example.com\",\n\t// \"sample-vm.us-west1-b.c.my-project.internal\"\n\t//\n\t// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm\n\tGCPGCEInstanceHostnameKey = attribute.Key(\"gcp.gce.instance.hostname\")\n\n\t// GCPGCEInstanceNameKey is the attribute Key conforming to the\n\t// \"gcp.gce.instance.name\" semantic conventions. It represents the instance name\n\t// of a GCE instance. This is the value provided by `host.name`, the visible\n\t// name of the instance in the Cloud Console UI, and the prefix for the default\n\t// hostname of the instance as defined by the [default internal DNS name].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"instance-1\", \"my-vm-name\"\n\t//\n\t// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names\n\tGCPGCEInstanceNameKey = attribute.Key(\"gcp.gce.instance.name\")\n)\n\n// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.container\" semantic conventions. It represents the\n// container within GCP where the AppHub application is defined.\nfunc GCPAppHubApplicationContainer(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationContainerKey.String(val)\n}\n\n// GCPAppHubApplicationID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.id\" semantic conventions. It represents the name of\n// the application as configured in AppHub.\nfunc GCPAppHubApplicationID(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationIDKey.String(val)\n}\n\n// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.location\" semantic conventions. It represents the GCP\n// zone or region where the application is defined.\nfunc GCPAppHubApplicationLocation(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationLocationKey.String(val)\n}\n\n// GCPAppHubServiceID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.service.id\" semantic conventions. It represents the name of the\n// service as configured in AppHub.\nfunc GCPAppHubServiceID(val string) attribute.KeyValue {\n\treturn GCPAppHubServiceIDKey.String(val)\n}\n\n// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.workload.id\" semantic conventions. It represents the name of the\n// workload as configured in AppHub.\nfunc GCPAppHubWorkloadID(val string) attribute.KeyValue {\n\treturn GCPAppHubWorkloadIDKey.String(val)\n}\n\n// GCPClientService returns an attribute KeyValue conforming to the\n// \"gcp.client.service\" semantic conventions. It represents the identifies the\n// Google Cloud service for which the official client library is intended.\nfunc GCPClientService(val string) attribute.KeyValue {\n\treturn GCPClientServiceKey.String(val)\n}\n\n// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the\n// \"gcp.cloud_run.job.execution\" semantic conventions. It represents the name of\n// the Cloud Run [execution] being run for the Job, as set by the\n// [`CLOUD_RUN_EXECUTION`] environment variable.\n//\n// [execution]: https://cloud.google.com/run/docs/managing/job-executions\n// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\nfunc GCPCloudRunJobExecution(val string) attribute.KeyValue {\n\treturn GCPCloudRunJobExecutionKey.String(val)\n}\n\n// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the\n// \"gcp.cloud_run.job.task_index\" semantic conventions. It represents the index\n// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]\n// environment variable.\n//\n// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\nfunc GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {\n\treturn GCPCloudRunJobTaskIndexKey.Int(val)\n}\n\n// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the\n// \"gcp.gce.instance.hostname\" semantic conventions. It represents the hostname\n// of a GCE instance. This is the full value of the default or [custom hostname]\n// .\n//\n// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm\nfunc GCPGCEInstanceHostname(val string) attribute.KeyValue {\n\treturn GCPGCEInstanceHostnameKey.String(val)\n}\n\n// GCPGCEInstanceName returns an attribute KeyValue conforming to the\n// \"gcp.gce.instance.name\" semantic conventions. It represents the instance name\n// of a GCE instance. This is the value provided by `host.name`, the visible name\n// of the instance in the Cloud Console UI, and the prefix for the default\n// hostname of the instance as defined by the [default internal DNS name].\n//\n// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names\nfunc GCPGCEInstanceName(val string) attribute.KeyValue {\n\treturn GCPGCEInstanceNameKey.String(val)\n}\n\n// Enum values for gcp.apphub.service.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub.service.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Enum values for gcp.apphub.workload.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub.workload.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Namespace: gen_ai\nconst (\n\t// GenAIAgentDescriptionKey is the attribute Key conforming to the\n\t// \"gen_ai.agent.description\" semantic conventions. It represents the free-form\n\t// description of the GenAI agent provided by the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Helps with math problems\", \"Generates fiction stories\"\n\tGenAIAgentDescriptionKey = attribute.Key(\"gen_ai.agent.description\")\n\n\t// GenAIAgentIDKey is the attribute Key conforming to the \"gen_ai.agent.id\"\n\t// semantic conventions. It represents the unique identifier of the GenAI agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"asst_5j66UpCpwteGg4YSxUnt7lPY\"\n\tGenAIAgentIDKey = attribute.Key(\"gen_ai.agent.id\")\n\n\t// GenAIAgentNameKey is the attribute Key conforming to the \"gen_ai.agent.name\"\n\t// semantic conventions. It represents the human-readable name of the GenAI\n\t// agent provided by the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Math Tutor\", \"Fiction Writer\"\n\tGenAIAgentNameKey = attribute.Key(\"gen_ai.agent.name\")\n\n\t// GenAIConversationIDKey is the attribute Key conforming to the\n\t// \"gen_ai.conversation.id\" semantic conventions. It represents the unique\n\t// identifier for a conversation (session, thread), used to store and correlate\n\t// messages within this conversation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"conv_5j66UpCpwteGg4YSxUnt7lPY\"\n\tGenAIConversationIDKey = attribute.Key(\"gen_ai.conversation.id\")\n\n\t// GenAIDataSourceIDKey is the attribute Key conforming to the\n\t// \"gen_ai.data_source.id\" semantic conventions. It represents the data source\n\t// identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"H7STPQYOND\"\n\t// Note: Data sources are used by AI agents and RAG applications to store\n\t// grounding data. A data source may be an external database, object store,\n\t// document collection, website, or any other storage system used by the GenAI\n\t// agent or application. The `gen_ai.data_source.id` SHOULD match the identifier\n\t// used by the GenAI system rather than a name specific to the external storage,\n\t// such as a database or object store. Semantic conventions referencing\n\t// `gen_ai.data_source.id` MAY also leverage additional attributes, such as\n\t// `db.*`, to further identify and describe the data source.\n\tGenAIDataSourceIDKey = attribute.Key(\"gen_ai.data_source.id\")\n\n\t// GenAIInputMessagesKey is the attribute Key conforming to the\n\t// \"gen_ai.input.messages\" semantic conventions. It represents the chat history\n\t// provided to the model as an input.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"role\": \"user\",\\n \"parts\": [\\n {\\n \"type\": \"text\",\\n\n\t// \"content\": \"Weather in Paris?\"\\n }\\n ]\\n },\\n {\\n \"role\": \"assistant\",\\n\n\t// \"parts\": [\\n {\\n \"type\": \"tool_call\",\\n \"id\":\n\t// \"call_VSPygqKTWdrhaFErNvMV18Yl\",\\n \"name\": \"get_weather\",\\n \"arguments\": {\\n\n\t// \"location\": \"Paris\"\\n }\\n }\\n ]\\n },\\n {\\n \"role\": \"tool\",\\n \"parts\": [\\n {\\n\n\t// \"type\": \"tool_call_response\",\\n \"id\": \" call_VSPygqKTWdrhaFErNvMV18Yl\",\\n\n\t// \"result\": \"rainy, 57°F\"\\n }\\n ]\\n }\\n]\\n\"\n\t// Note: Instrumentations MUST follow [Input messages JSON schema].\n\t// When the attribute is recorded on events, it MUST be recorded in structured\n\t// form. When recorded on spans, it MAY be recorded as a JSON string if\n\t// structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Messages MUST be provided in the order they were sent to the model.\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// input messages.\n\t//\n\t// > [!Warning]\n\t// > This attribute is likely to contain sensitive information including\n\t// > user/PII data.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [Input messages JSON schema]: /docs/gen-ai/gen-ai-input-messages.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAIInputMessagesKey = attribute.Key(\"gen_ai.input.messages\")\n\n\t// GenAIOperationNameKey is the attribute Key conforming to the\n\t// \"gen_ai.operation.name\" semantic conventions. It represents the name of the\n\t// operation being performed.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: If one of the predefined values applies, but specific system uses a\n\t// different name it's RECOMMENDED to document it in the semantic conventions\n\t// for specific GenAI system and use system-specific name in the\n\t// instrumentation. If a different name is not documented, instrumentation\n\t// libraries SHOULD use applicable predefined value.\n\tGenAIOperationNameKey = attribute.Key(\"gen_ai.operation.name\")\n\n\t// GenAIOutputMessagesKey is the attribute Key conforming to the\n\t// \"gen_ai.output.messages\" semantic conventions. It represents the messages\n\t// returned by the model where each message represents a specific model response\n\t// (choice, candidate).\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"role\": \"assistant\",\\n \"parts\": [\\n {\\n \"type\": \"text\",\\n\n\t// \"content\": \"The weather in Paris is currently rainy with a temperature of\n\t// 57°F.\"\\n }\\n ],\\n \"finish_reason\": \"stop\"\\n }\\n]\\n\"\n\t// Note: Instrumentations MUST follow [Output messages JSON schema]\n\t//\n\t// Each message represents a single output choice/candidate generated by\n\t// the model. Each message corresponds to exactly one generation\n\t// (choice/candidate) and vice versa - one choice cannot be split across\n\t// multiple messages or one message cannot contain parts from multiple choices.\n\t//\n\t// When the attribute is recorded on events, it MUST be recorded in structured\n\t// form. When recorded on spans, it MAY be recorded as a JSON string if\n\t// structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// output messages.\n\t//\n\t// > [!Warning]\n\t// > This attribute is likely to contain sensitive information including\n\t// > user/PII data.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [Output messages JSON schema]: /docs/gen-ai/gen-ai-output-messages.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAIOutputMessagesKey = attribute.Key(\"gen_ai.output.messages\")\n\n\t// GenAIOutputTypeKey is the attribute Key conforming to the\n\t// \"gen_ai.output.type\" semantic conventions. It represents the represents the\n\t// content type requested by the client.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This attribute SHOULD be used when the client requests output of a\n\t// specific type. The model may return zero or more outputs of this type.\n\t// This attribute specifies the output modality and not the actual output\n\t// format. For example, if an image is requested, the actual output could be a\n\t// URL pointing to an image file.\n\t// Additional output format details may be recorded in the future in the\n\t// `gen_ai.output.{type}.*` attributes.\n\tGenAIOutputTypeKey = attribute.Key(\"gen_ai.output.type\")\n\n\t// GenAIProviderNameKey is the attribute Key conforming to the\n\t// \"gen_ai.provider.name\" semantic conventions. It represents the Generative AI\n\t// provider as identified by the client or server instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The attribute SHOULD be set based on the instrumentation's best\n\t// knowledge and may differ from the actual model provider.\n\t//\n\t// Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms\n\t// are accessible using the OpenAI REST API and corresponding client libraries,\n\t// but may proxy or host models from different providers.\n\t//\n\t// The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`\n\t// attributes may help identify the actual system in use.\n\t//\n\t// The `gen_ai.provider.name` attribute acts as a discriminator that\n\t// identifies the GenAI telemetry format flavor specific to that provider\n\t// within GenAI semantic conventions.\n\t// It SHOULD be set consistently with provider-specific attributes and signals.\n\t// For example, GenAI spans, metrics, and events related to AWS Bedrock\n\t// should have the `gen_ai.provider.name` set to `aws.bedrock` and include\n\t// applicable `aws.bedrock.*` attributes and are not expected to include\n\t// `openai.*` attributes.\n\tGenAIProviderNameKey = attribute.Key(\"gen_ai.provider.name\")\n\n\t// GenAIRequestChoiceCountKey is the attribute Key conforming to the\n\t// \"gen_ai.request.choice.count\" semantic conventions. It represents the target\n\t// number of candidate completions to return.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3\n\tGenAIRequestChoiceCountKey = attribute.Key(\"gen_ai.request.choice.count\")\n\n\t// GenAIRequestEncodingFormatsKey is the attribute Key conforming to the\n\t// \"gen_ai.request.encoding_formats\" semantic conventions. It represents the\n\t// encoding formats requested in an embeddings operation, if specified.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"base64\"], [\"float\", \"binary\"\n\t// Note: In some GenAI systems the encoding formats are called embedding types.\n\t// Also, some GenAI systems only accept a single format per request.\n\tGenAIRequestEncodingFormatsKey = attribute.Key(\"gen_ai.request.encoding_formats\")\n\n\t// GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the\n\t// \"gen_ai.request.frequency_penalty\" semantic conventions. It represents the\n\t// frequency penalty setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.1\n\tGenAIRequestFrequencyPenaltyKey = attribute.Key(\"gen_ai.request.frequency_penalty\")\n\n\t// GenAIRequestMaxTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.request.max_tokens\" semantic conventions. It represents the maximum\n\t// number of tokens the model generates for a request.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIRequestMaxTokensKey = attribute.Key(\"gen_ai.request.max_tokens\")\n\n\t// GenAIRequestModelKey is the attribute Key conforming to the\n\t// \"gen_ai.request.model\" semantic conventions. It represents the name of the\n\t// GenAI model a request is being made to.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: gpt-4\n\tGenAIRequestModelKey = attribute.Key(\"gen_ai.request.model\")\n\n\t// GenAIRequestPresencePenaltyKey is the attribute Key conforming to the\n\t// \"gen_ai.request.presence_penalty\" semantic conventions. It represents the\n\t// presence penalty setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.1\n\tGenAIRequestPresencePenaltyKey = attribute.Key(\"gen_ai.request.presence_penalty\")\n\n\t// GenAIRequestSeedKey is the attribute Key conforming to the\n\t// \"gen_ai.request.seed\" semantic conventions. It represents the requests with\n\t// same seed value more likely to return same result.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIRequestSeedKey = attribute.Key(\"gen_ai.request.seed\")\n\n\t// GenAIRequestStopSequencesKey is the attribute Key conforming to the\n\t// \"gen_ai.request.stop_sequences\" semantic conventions. It represents the list\n\t// of sequences that the model will use to stop generating further tokens.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"forest\", \"lived\"\n\tGenAIRequestStopSequencesKey = attribute.Key(\"gen_ai.request.stop_sequences\")\n\n\t// GenAIRequestTemperatureKey is the attribute Key conforming to the\n\t// \"gen_ai.request.temperature\" semantic conventions. It represents the\n\t// temperature setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.0\n\tGenAIRequestTemperatureKey = attribute.Key(\"gen_ai.request.temperature\")\n\n\t// GenAIRequestTopKKey is the attribute Key conforming to the\n\t// \"gen_ai.request.top_k\" semantic conventions. It represents the top_k sampling\n\t// setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\tGenAIRequestTopKKey = attribute.Key(\"gen_ai.request.top_k\")\n\n\t// GenAIRequestTopPKey is the attribute Key conforming to the\n\t// \"gen_ai.request.top_p\" semantic conventions. It represents the top_p sampling\n\t// setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\tGenAIRequestTopPKey = attribute.Key(\"gen_ai.request.top_p\")\n\n\t// GenAIResponseFinishReasonsKey is the attribute Key conforming to the\n\t// \"gen_ai.response.finish_reasons\" semantic conventions. It represents the\n\t// array of reasons the model stopped generating tokens, corresponding to each\n\t// generation received.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"stop\"], [\"stop\", \"length\"\n\tGenAIResponseFinishReasonsKey = attribute.Key(\"gen_ai.response.finish_reasons\")\n\n\t// GenAIResponseIDKey is the attribute Key conforming to the\n\t// \"gen_ai.response.id\" semantic conventions. It represents the unique\n\t// identifier for the completion.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"chatcmpl-123\"\n\tGenAIResponseIDKey = attribute.Key(\"gen_ai.response.id\")\n\n\t// GenAIResponseModelKey is the attribute Key conforming to the\n\t// \"gen_ai.response.model\" semantic conventions. It represents the name of the\n\t// model that generated the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"gpt-4-0613\"\n\tGenAIResponseModelKey = attribute.Key(\"gen_ai.response.model\")\n\n\t// GenAISystemInstructionsKey is the attribute Key conforming to the\n\t// \"gen_ai.system_instructions\" semantic conventions. It represents the system\n\t// message or instructions provided to the GenAI model separately from the chat\n\t// history.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"type\": \"text\",\\n \"content\": \"You are an Agent that greet\n\t// users, always use greetings tool to respond\"\\n }\\n]\\n\", \"[\\n {\\n \"type\":\n\t// \"text\",\\n \"content\": \"You are a language translator.\"\\n },\\n {\\n \"type\":\n\t// \"text\",\\n \"content\": \"Your mission is to translate text in English to\n\t// French.\"\\n }\\n]\\n\"\n\t// Note: This attribute SHOULD be used when the corresponding provider or API\n\t// allows to provide system instructions or messages separately from the\n\t// chat history.\n\t//\n\t// Instructions that are part of the chat history SHOULD be recorded in\n\t// `gen_ai.input.messages` attribute instead.\n\t//\n\t// Instrumentations MUST follow [System instructions JSON schema].\n\t//\n\t// When recorded on spans, it MAY be recorded as a JSON string if structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// system instructions.\n\t//\n\t// > [!Warning]\n\t// > This attribute may contain sensitive information.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [System instructions JSON schema]: /docs/gen-ai/gen-ai-system-instructions.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAISystemInstructionsKey = attribute.Key(\"gen_ai.system_instructions\")\n\n\t// GenAITokenTypeKey is the attribute Key conforming to the \"gen_ai.token.type\"\n\t// semantic conventions. It represents the type of token being counted.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"input\", \"output\"\n\tGenAITokenTypeKey = attribute.Key(\"gen_ai.token.type\")\n\n\t// GenAIToolCallIDKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.call.id\" semantic conventions. It represents the tool call\n\t// identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"call_mszuSIzqtI65i1wAUOE8w5H4\"\n\tGenAIToolCallIDKey = attribute.Key(\"gen_ai.tool.call.id\")\n\n\t// GenAIToolDescriptionKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.description\" semantic conventions. It represents the tool\n\t// description.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Multiply two numbers\"\n\tGenAIToolDescriptionKey = attribute.Key(\"gen_ai.tool.description\")\n\n\t// GenAIToolNameKey is the attribute Key conforming to the \"gen_ai.tool.name\"\n\t// semantic conventions. It represents the name of the tool utilized by the\n\t// agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Flights\"\n\tGenAIToolNameKey = attribute.Key(\"gen_ai.tool.name\")\n\n\t// GenAIToolTypeKey is the attribute Key conforming to the \"gen_ai.tool.type\"\n\t// semantic conventions. It represents the type of the tool utilized by the\n\t// agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"function\", \"extension\", \"datastore\"\n\t// Note: Extension: A tool executed on the agent-side to directly call external\n\t// APIs, bridging the gap between the agent and real-world systems.\n\t// Agent-side operations involve actions that are performed by the agent on the\n\t// server or within the agent's controlled environment.\n\t// Function: A tool executed on the client-side, where the agent generates\n\t// parameters for a predefined function, and the client executes the logic.\n\t// Client-side operations are actions taken on the user's end or within the\n\t// client application.\n\t// Datastore: A tool used by the agent to access and query structured or\n\t// unstructured external data for retrieval-augmented tasks or knowledge\n\t// updates.\n\tGenAIToolTypeKey = attribute.Key(\"gen_ai.tool.type\")\n\n\t// GenAIUsageInputTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.usage.input_tokens\" semantic conventions. It represents the number of\n\t// tokens used in the GenAI input (prompt).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIUsageInputTokensKey = attribute.Key(\"gen_ai.usage.input_tokens\")\n\n\t// GenAIUsageOutputTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.usage.output_tokens\" semantic conventions. It represents the number\n\t// of tokens used in the GenAI response (completion).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 180\n\tGenAIUsageOutputTokensKey = attribute.Key(\"gen_ai.usage.output_tokens\")\n)\n\n// GenAIAgentDescription returns an attribute KeyValue conforming to the\n// \"gen_ai.agent.description\" semantic conventions. It represents the free-form\n// description of the GenAI agent provided by the application.\nfunc GenAIAgentDescription(val string) attribute.KeyValue {\n\treturn GenAIAgentDescriptionKey.String(val)\n}\n\n// GenAIAgentID returns an attribute KeyValue conforming to the \"gen_ai.agent.id\"\n// semantic conventions. It represents the unique identifier of the GenAI agent.\nfunc GenAIAgentID(val string) attribute.KeyValue {\n\treturn GenAIAgentIDKey.String(val)\n}\n\n// GenAIAgentName returns an attribute KeyValue conforming to the\n// \"gen_ai.agent.name\" semantic conventions. It represents the human-readable\n// name of the GenAI agent provided by the application.\nfunc GenAIAgentName(val string) attribute.KeyValue {\n\treturn GenAIAgentNameKey.String(val)\n}\n\n// GenAIConversationID returns an attribute KeyValue conforming to the\n// \"gen_ai.conversation.id\" semantic conventions. It represents the unique\n// identifier for a conversation (session, thread), used to store and correlate\n// messages within this conversation.\nfunc GenAIConversationID(val string) attribute.KeyValue {\n\treturn GenAIConversationIDKey.String(val)\n}\n\n// GenAIDataSourceID returns an attribute KeyValue conforming to the\n// \"gen_ai.data_source.id\" semantic conventions. It represents the data source\n// identifier.\nfunc GenAIDataSourceID(val string) attribute.KeyValue {\n\treturn GenAIDataSourceIDKey.String(val)\n}\n\n// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the\n// \"gen_ai.request.choice.count\" semantic conventions. It represents the target\n// number of candidate completions to return.\nfunc GenAIRequestChoiceCount(val int) attribute.KeyValue {\n\treturn GenAIRequestChoiceCountKey.Int(val)\n}\n\n// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the\n// \"gen_ai.request.encoding_formats\" semantic conventions. It represents the\n// encoding formats requested in an embeddings operation, if specified.\nfunc GenAIRequestEncodingFormats(val ...string) attribute.KeyValue {\n\treturn GenAIRequestEncodingFormatsKey.StringSlice(val)\n}\n\n// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the\n// \"gen_ai.request.frequency_penalty\" semantic conventions. It represents the\n// frequency penalty setting for the GenAI request.\nfunc GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue {\n\treturn GenAIRequestFrequencyPenaltyKey.Float64(val)\n}\n\n// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.request.max_tokens\" semantic conventions. It represents the maximum\n// number of tokens the model generates for a request.\nfunc GenAIRequestMaxTokens(val int) attribute.KeyValue {\n\treturn GenAIRequestMaxTokensKey.Int(val)\n}\n\n// GenAIRequestModel returns an attribute KeyValue conforming to the\n// \"gen_ai.request.model\" semantic conventions. It represents the name of the\n// GenAI model a request is being made to.\nfunc GenAIRequestModel(val string) attribute.KeyValue {\n\treturn GenAIRequestModelKey.String(val)\n}\n\n// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the\n// \"gen_ai.request.presence_penalty\" semantic conventions. It represents the\n// presence penalty setting for the GenAI request.\nfunc GenAIRequestPresencePenalty(val float64) attribute.KeyValue {\n\treturn GenAIRequestPresencePenaltyKey.Float64(val)\n}\n\n// GenAIRequestSeed returns an attribute KeyValue conforming to the\n// \"gen_ai.request.seed\" semantic conventions. It represents the requests with\n// same seed value more likely to return same result.\nfunc GenAIRequestSeed(val int) attribute.KeyValue {\n\treturn GenAIRequestSeedKey.Int(val)\n}\n\n// GenAIRequestStopSequences returns an attribute KeyValue conforming to the\n// \"gen_ai.request.stop_sequences\" semantic conventions. It represents the list\n// of sequences that the model will use to stop generating further tokens.\nfunc GenAIRequestStopSequences(val ...string) attribute.KeyValue {\n\treturn GenAIRequestStopSequencesKey.StringSlice(val)\n}\n\n// GenAIRequestTemperature returns an attribute KeyValue conforming to the\n// \"gen_ai.request.temperature\" semantic conventions. It represents the\n// temperature setting for the GenAI request.\nfunc GenAIRequestTemperature(val float64) attribute.KeyValue {\n\treturn GenAIRequestTemperatureKey.Float64(val)\n}\n\n// GenAIRequestTopK returns an attribute KeyValue conforming to the\n// \"gen_ai.request.top_k\" semantic conventions. It represents the top_k sampling\n// setting for the GenAI request.\nfunc GenAIRequestTopK(val float64) attribute.KeyValue {\n\treturn GenAIRequestTopKKey.Float64(val)\n}\n\n// GenAIRequestTopP returns an attribute KeyValue conforming to the\n// \"gen_ai.request.top_p\" semantic conventions. It represents the top_p sampling\n// setting for the GenAI request.\nfunc GenAIRequestTopP(val float64) attribute.KeyValue {\n\treturn GenAIRequestTopPKey.Float64(val)\n}\n\n// GenAIResponseFinishReasons returns an attribute KeyValue conforming to the\n// \"gen_ai.response.finish_reasons\" semantic conventions. It represents the array\n// of reasons the model stopped generating tokens, corresponding to each\n// generation received.\nfunc GenAIResponseFinishReasons(val ...string) attribute.KeyValue {\n\treturn GenAIResponseFinishReasonsKey.StringSlice(val)\n}\n\n// GenAIResponseID returns an attribute KeyValue conforming to the\n// \"gen_ai.response.id\" semantic conventions. It represents the unique identifier\n// for the completion.\nfunc GenAIResponseID(val string) attribute.KeyValue {\n\treturn GenAIResponseIDKey.String(val)\n}\n\n// GenAIResponseModel returns an attribute KeyValue conforming to the\n// \"gen_ai.response.model\" semantic conventions. It represents the name of the\n// model that generated the response.\nfunc GenAIResponseModel(val string) attribute.KeyValue {\n\treturn GenAIResponseModelKey.String(val)\n}\n\n// GenAIToolCallID returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.call.id\" semantic conventions. It represents the tool call\n// identifier.\nfunc GenAIToolCallID(val string) attribute.KeyValue {\n\treturn GenAIToolCallIDKey.String(val)\n}\n\n// GenAIToolDescription returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.description\" semantic conventions. It represents the tool\n// description.\nfunc GenAIToolDescription(val string) attribute.KeyValue {\n\treturn GenAIToolDescriptionKey.String(val)\n}\n\n// GenAIToolName returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.name\" semantic conventions. It represents the name of the tool\n// utilized by the agent.\nfunc GenAIToolName(val string) attribute.KeyValue {\n\treturn GenAIToolNameKey.String(val)\n}\n\n// GenAIToolType returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.type\" semantic conventions. It represents the type of the tool\n// utilized by the agent.\nfunc GenAIToolType(val string) attribute.KeyValue {\n\treturn GenAIToolTypeKey.String(val)\n}\n\n// GenAIUsageInputTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.usage.input_tokens\" semantic conventions. It represents the number of\n// tokens used in the GenAI input (prompt).\nfunc GenAIUsageInputTokens(val int) attribute.KeyValue {\n\treturn GenAIUsageInputTokensKey.Int(val)\n}\n\n// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.usage.output_tokens\" semantic conventions. It represents the number of\n// tokens used in the GenAI response (completion).\nfunc GenAIUsageOutputTokens(val int) attribute.KeyValue {\n\treturn GenAIUsageOutputTokensKey.Int(val)\n}\n\n// Enum values for gen_ai.operation.name\nvar (\n\t// Chat completion operation such as [OpenAI Chat API]\n\t// Stability: development\n\t//\n\t// [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat\n\tGenAIOperationNameChat = GenAIOperationNameKey.String(\"chat\")\n\t// Multimodal content generation operation such as [Gemini Generate Content]\n\t// Stability: development\n\t//\n\t// [Gemini Generate Content]: https://ai.google.dev/api/generate-content\n\tGenAIOperationNameGenerateContent = GenAIOperationNameKey.String(\"generate_content\")\n\t// Text completions operation such as [OpenAI Completions API (Legacy)]\n\t// Stability: development\n\t//\n\t// [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions\n\tGenAIOperationNameTextCompletion = GenAIOperationNameKey.String(\"text_completion\")\n\t// Embeddings operation such as [OpenAI Create embeddings API]\n\t// Stability: development\n\t//\n\t// [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create\n\tGenAIOperationNameEmbeddings = GenAIOperationNameKey.String(\"embeddings\")\n\t// Create GenAI agent\n\t// Stability: development\n\tGenAIOperationNameCreateAgent = GenAIOperationNameKey.String(\"create_agent\")\n\t// Invoke GenAI agent\n\t// Stability: development\n\tGenAIOperationNameInvokeAgent = GenAIOperationNameKey.String(\"invoke_agent\")\n\t// Execute a tool\n\t// Stability: development\n\tGenAIOperationNameExecuteTool = GenAIOperationNameKey.String(\"execute_tool\")\n)\n\n// Enum values for gen_ai.output.type\nvar (\n\t// Plain text\n\t// Stability: development\n\tGenAIOutputTypeText = GenAIOutputTypeKey.String(\"text\")\n\t// JSON object with known or unknown schema\n\t// Stability: development\n\tGenAIOutputTypeJSON = GenAIOutputTypeKey.String(\"json\")\n\t// Image\n\t// Stability: development\n\tGenAIOutputTypeImage = GenAIOutputTypeKey.String(\"image\")\n\t// Speech\n\t// Stability: development\n\tGenAIOutputTypeSpeech = GenAIOutputTypeKey.String(\"speech\")\n)\n\n// Enum values for gen_ai.provider.name\nvar (\n\t// [OpenAI]\n\t// Stability: development\n\t//\n\t// [OpenAI]: https://openai.com/\n\tGenAIProviderNameOpenAI = GenAIProviderNameKey.String(\"openai\")\n\t// Any Google generative AI endpoint\n\t// Stability: development\n\tGenAIProviderNameGCPGenAI = GenAIProviderNameKey.String(\"gcp.gen_ai\")\n\t// [Vertex AI]\n\t// Stability: development\n\t//\n\t// [Vertex AI]: https://cloud.google.com/vertex-ai\n\tGenAIProviderNameGCPVertexAI = GenAIProviderNameKey.String(\"gcp.vertex_ai\")\n\t// [Gemini]\n\t// Stability: development\n\t//\n\t// [Gemini]: https://cloud.google.com/products/gemini\n\tGenAIProviderNameGCPGemini = GenAIProviderNameKey.String(\"gcp.gemini\")\n\t// [Anthropic]\n\t// Stability: development\n\t//\n\t// [Anthropic]: https://www.anthropic.com/\n\tGenAIProviderNameAnthropic = GenAIProviderNameKey.String(\"anthropic\")\n\t// [Cohere]\n\t// Stability: development\n\t//\n\t// [Cohere]: https://cohere.com/\n\tGenAIProviderNameCohere = GenAIProviderNameKey.String(\"cohere\")\n\t// Azure AI Inference\n\t// Stability: development\n\tGenAIProviderNameAzureAIInference = GenAIProviderNameKey.String(\"azure.ai.inference\")\n\t// [Azure OpenAI]\n\t// Stability: development\n\t//\n\t// [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/\n\tGenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String(\"azure.ai.openai\")\n\t// [IBM Watsonx AI]\n\t// Stability: development\n\t//\n\t// [IBM Watsonx AI]: https://www.ibm.com/products/watsonx-ai\n\tGenAIProviderNameIBMWatsonxAI = GenAIProviderNameKey.String(\"ibm.watsonx.ai\")\n\t// [AWS Bedrock]\n\t// Stability: development\n\t//\n\t// [AWS Bedrock]: https://aws.amazon.com/bedrock\n\tGenAIProviderNameAWSBedrock = GenAIProviderNameKey.String(\"aws.bedrock\")\n\t// [Perplexity]\n\t// Stability: development\n\t//\n\t// [Perplexity]: https://www.perplexity.ai/\n\tGenAIProviderNamePerplexity = GenAIProviderNameKey.String(\"perplexity\")\n\t// [xAI]\n\t// Stability: development\n\t//\n\t// [xAI]: https://x.ai/\n\tGenAIProviderNameXAI = GenAIProviderNameKey.String(\"x_ai\")\n\t// [DeepSeek]\n\t// Stability: development\n\t//\n\t// [DeepSeek]: https://www.deepseek.com/\n\tGenAIProviderNameDeepseek = GenAIProviderNameKey.String(\"deepseek\")\n\t// [Groq]\n\t// Stability: development\n\t//\n\t// [Groq]: https://groq.com/\n\tGenAIProviderNameGroq = GenAIProviderNameKey.String(\"groq\")\n\t// [Mistral AI]\n\t// Stability: development\n\t//\n\t// [Mistral AI]: https://mistral.ai/\n\tGenAIProviderNameMistralAI = GenAIProviderNameKey.String(\"mistral_ai\")\n)\n\n// Enum values for gen_ai.token.type\nvar (\n\t// Input tokens (prompt, input, etc.)\n\t// Stability: development\n\tGenAITokenTypeInput = GenAITokenTypeKey.String(\"input\")\n\t// Output tokens (completion, response, etc.)\n\t// Stability: development\n\tGenAITokenTypeOutput = GenAITokenTypeKey.String(\"output\")\n)\n\n// Namespace: geo\nconst (\n\t// GeoContinentCodeKey is the attribute Key conforming to the\n\t// \"geo.continent.code\" semantic conventions. It represents the two-letter code\n\t// representing continent’s name.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tGeoContinentCodeKey = attribute.Key(\"geo.continent.code\")\n\n\t// GeoCountryISOCodeKey is the attribute Key conforming to the\n\t// \"geo.country.iso_code\" semantic conventions. It represents the two-letter ISO\n\t// Country Code ([ISO 3166-1 alpha2]).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CA\"\n\t//\n\t// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes\n\tGeoCountryISOCodeKey = attribute.Key(\"geo.country.iso_code\")\n\n\t// GeoLocalityNameKey is the attribute Key conforming to the \"geo.locality.name\"\n\t// semantic conventions. It represents the locality name. Represents the name of\n\t// a city, town, village, or similar populated place.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Montreal\", \"Berlin\"\n\tGeoLocalityNameKey = attribute.Key(\"geo.locality.name\")\n\n\t// GeoLocationLatKey is the attribute Key conforming to the \"geo.location.lat\"\n\t// semantic conventions. It represents the latitude of the geo location in\n\t// [WGS84].\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 45.505918\n\t//\n\t// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\n\tGeoLocationLatKey = attribute.Key(\"geo.location.lat\")\n\n\t// GeoLocationLonKey is the attribute Key conforming to the \"geo.location.lon\"\n\t// semantic conventions. It represents the longitude of the geo location in\n\t// [WGS84].\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: -73.61483\n\t//\n\t// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\n\tGeoLocationLonKey = attribute.Key(\"geo.location.lon\")\n\n\t// GeoPostalCodeKey is the attribute Key conforming to the \"geo.postal_code\"\n\t// semantic conventions. It represents the postal code associated with the\n\t// location. Values appropriate for this field may also be known as a postcode\n\t// or ZIP code and will vary widely from country to country.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"94040\"\n\tGeoPostalCodeKey = attribute.Key(\"geo.postal_code\")\n\n\t// GeoRegionISOCodeKey is the attribute Key conforming to the\n\t// \"geo.region.iso_code\" semantic conventions. It represents the region ISO code\n\t// ([ISO 3166-2]).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CA-QC\"\n\t//\n\t// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2\n\tGeoRegionISOCodeKey = attribute.Key(\"geo.region.iso_code\")\n)\n\n// GeoCountryISOCode returns an attribute KeyValue conforming to the\n// \"geo.country.iso_code\" semantic conventions. It represents the two-letter ISO\n// Country Code ([ISO 3166-1 alpha2]).\n//\n// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes\nfunc GeoCountryISOCode(val string) attribute.KeyValue {\n\treturn GeoCountryISOCodeKey.String(val)\n}\n\n// GeoLocalityName returns an attribute KeyValue conforming to the\n// \"geo.locality.name\" semantic conventions. It represents the locality name.\n// Represents the name of a city, town, village, or similar populated place.\nfunc GeoLocalityName(val string) attribute.KeyValue {\n\treturn GeoLocalityNameKey.String(val)\n}\n\n// GeoLocationLat returns an attribute KeyValue conforming to the\n// \"geo.location.lat\" semantic conventions. It represents the latitude of the geo\n// location in [WGS84].\n//\n// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\nfunc GeoLocationLat(val float64) attribute.KeyValue {\n\treturn GeoLocationLatKey.Float64(val)\n}\n\n// GeoLocationLon returns an attribute KeyValue conforming to the\n// \"geo.location.lon\" semantic conventions. It represents the longitude of the\n// geo location in [WGS84].\n//\n// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\nfunc GeoLocationLon(val float64) attribute.KeyValue {\n\treturn GeoLocationLonKey.Float64(val)\n}\n\n// GeoPostalCode returns an attribute KeyValue conforming to the\n// \"geo.postal_code\" semantic conventions. It represents the postal code\n// associated with the location. Values appropriate for this field may also be\n// known as a postcode or ZIP code and will vary widely from country to country.\nfunc GeoPostalCode(val string) attribute.KeyValue {\n\treturn GeoPostalCodeKey.String(val)\n}\n\n// GeoRegionISOCode returns an attribute KeyValue conforming to the\n// \"geo.region.iso_code\" semantic conventions. It represents the region ISO code\n// ([ISO 3166-2]).\n//\n// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2\nfunc GeoRegionISOCode(val string) attribute.KeyValue {\n\treturn GeoRegionISOCodeKey.String(val)\n}\n\n// Enum values for geo.continent.code\nvar (\n\t// Africa\n\t// Stability: development\n\tGeoContinentCodeAf = GeoContinentCodeKey.String(\"AF\")\n\t// Antarctica\n\t// Stability: development\n\tGeoContinentCodeAn = GeoContinentCodeKey.String(\"AN\")\n\t// Asia\n\t// Stability: development\n\tGeoContinentCodeAs = GeoContinentCodeKey.String(\"AS\")\n\t// Europe\n\t// Stability: development\n\tGeoContinentCodeEu = GeoContinentCodeKey.String(\"EU\")\n\t// North America\n\t// Stability: development\n\tGeoContinentCodeNa = GeoContinentCodeKey.String(\"NA\")\n\t// Oceania\n\t// Stability: development\n\tGeoContinentCodeOc = GeoContinentCodeKey.String(\"OC\")\n\t// South America\n\t// Stability: development\n\tGeoContinentCodeSa = GeoContinentCodeKey.String(\"SA\")\n)\n\n// Namespace: go\nconst (\n\t// GoMemoryTypeKey is the attribute Key conforming to the \"go.memory.type\"\n\t// semantic conventions. It represents the type of memory.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"other\", \"stack\"\n\tGoMemoryTypeKey = attribute.Key(\"go.memory.type\")\n)\n\n// Enum values for go.memory.type\nvar (\n\t// Memory allocated from the heap that is reserved for stack space, whether or\n\t// not it is currently in-use.\n\t// Stability: development\n\tGoMemoryTypeStack = GoMemoryTypeKey.String(\"stack\")\n\t// Memory used by the Go runtime, excluding other categories of memory usage\n\t// described in this enumeration.\n\t// Stability: development\n\tGoMemoryTypeOther = GoMemoryTypeKey.String(\"other\")\n)\n\n// Namespace: graphql\nconst (\n\t// GraphQLDocumentKey is the attribute Key conforming to the \"graphql.document\"\n\t// semantic conventions. It represents the GraphQL document being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: query findBookById { bookById(id: ?) { name } }\n\t// Note: The value may be sanitized to exclude sensitive information.\n\tGraphQLDocumentKey = attribute.Key(\"graphql.document\")\n\n\t// GraphQLOperationNameKey is the attribute Key conforming to the\n\t// \"graphql.operation.name\" semantic conventions. It represents the name of the\n\t// operation being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: findBookById\n\tGraphQLOperationNameKey = attribute.Key(\"graphql.operation.name\")\n\n\t// GraphQLOperationTypeKey is the attribute Key conforming to the\n\t// \"graphql.operation.type\" semantic conventions. It represents the type of the\n\t// operation being executed.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"query\", \"mutation\", \"subscription\"\n\tGraphQLOperationTypeKey = attribute.Key(\"graphql.operation.type\")\n)\n\n// GraphQLDocument returns an attribute KeyValue conforming to the\n// \"graphql.document\" semantic conventions. It represents the GraphQL document\n// being executed.\nfunc GraphQLDocument(val string) attribute.KeyValue {\n\treturn GraphQLDocumentKey.String(val)\n}\n\n// GraphQLOperationName returns an attribute KeyValue conforming to the\n// \"graphql.operation.name\" semantic conventions. It represents the name of the\n// operation being executed.\nfunc GraphQLOperationName(val string) attribute.KeyValue {\n\treturn GraphQLOperationNameKey.String(val)\n}\n\n// Enum values for graphql.operation.type\nvar (\n\t// GraphQL query\n\t// Stability: development\n\tGraphQLOperationTypeQuery = GraphQLOperationTypeKey.String(\"query\")\n\t// GraphQL mutation\n\t// Stability: development\n\tGraphQLOperationTypeMutation = GraphQLOperationTypeKey.String(\"mutation\")\n\t// GraphQL subscription\n\t// Stability: development\n\tGraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String(\"subscription\")\n)\n\n// Namespace: heroku\nconst (\n\t// HerokuAppIDKey is the attribute Key conforming to the \"heroku.app.id\"\n\t// semantic conventions. It represents the unique identifier for the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2daa2797-e42b-4624-9322-ec3f968df4da\"\n\tHerokuAppIDKey = attribute.Key(\"heroku.app.id\")\n\n\t// HerokuReleaseCommitKey is the attribute Key conforming to the\n\t// \"heroku.release.commit\" semantic conventions. It represents the commit hash\n\t// for the current release.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"e6134959463efd8966b20e75b913cafe3f5ec\"\n\tHerokuReleaseCommitKey = attribute.Key(\"heroku.release.commit\")\n\n\t// HerokuReleaseCreationTimestampKey is the attribute Key conforming to the\n\t// \"heroku.release.creation_timestamp\" semantic conventions. It represents the\n\t// time and date the release was created.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2022-10-23T18:00:42Z\"\n\tHerokuReleaseCreationTimestampKey = attribute.Key(\"heroku.release.creation_timestamp\")\n)\n\n// HerokuAppID returns an attribute KeyValue conforming to the \"heroku.app.id\"\n// semantic conventions. It represents the unique identifier for the application.\nfunc HerokuAppID(val string) attribute.KeyValue {\n\treturn HerokuAppIDKey.String(val)\n}\n\n// HerokuReleaseCommit returns an attribute KeyValue conforming to the\n// \"heroku.release.commit\" semantic conventions. It represents the commit hash\n// for the current release.\nfunc HerokuReleaseCommit(val string) attribute.KeyValue {\n\treturn HerokuReleaseCommitKey.String(val)\n}\n\n// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the\n// \"heroku.release.creation_timestamp\" semantic conventions. It represents the\n// time and date the release was created.\nfunc HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {\n\treturn HerokuReleaseCreationTimestampKey.String(val)\n}\n\n// Namespace: host\nconst (\n\t// HostArchKey is the attribute Key conforming to the \"host.arch\" semantic\n\t// conventions. It represents the CPU architecture the host system is running\n\t// on.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHostArchKey = attribute.Key(\"host.arch\")\n\n\t// HostCPUCacheL2SizeKey is the attribute Key conforming to the\n\t// \"host.cpu.cache.l2.size\" semantic conventions. It represents the amount of\n\t// level 2 memory cache available to the processor (in Bytes).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12288000\n\tHostCPUCacheL2SizeKey = attribute.Key(\"host.cpu.cache.l2.size\")\n\n\t// HostCPUFamilyKey is the attribute Key conforming to the \"host.cpu.family\"\n\t// semantic conventions. It represents the family or generation of the CPU.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6\", \"PA-RISC 1.1e\"\n\tHostCPUFamilyKey = attribute.Key(\"host.cpu.family\")\n\n\t// HostCPUModelIDKey is the attribute Key conforming to the \"host.cpu.model.id\"\n\t// semantic conventions. It represents the model identifier. It provides more\n\t// granular information about the CPU, distinguishing it from other CPUs within\n\t// the same family.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6\", \"9000/778/B180L\"\n\tHostCPUModelIDKey = attribute.Key(\"host.cpu.model.id\")\n\n\t// HostCPUModelNameKey is the attribute Key conforming to the\n\t// \"host.cpu.model.name\" semantic conventions. It represents the model\n\t// designation of the processor.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\"\n\tHostCPUModelNameKey = attribute.Key(\"host.cpu.model.name\")\n\n\t// HostCPUSteppingKey is the attribute Key conforming to the \"host.cpu.stepping\"\n\t// semantic conventions. It represents the stepping or core revisions.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1\", \"r1p1\"\n\tHostCPUSteppingKey = attribute.Key(\"host.cpu.stepping\")\n\n\t// HostCPUVendorIDKey is the attribute Key conforming to the\n\t// \"host.cpu.vendor.id\" semantic conventions. It represents the processor\n\t// manufacturer identifier. A maximum 12-character string.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"GenuineIntel\"\n\t// Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX\n\t// registers. Writing these to memory in this order results in a 12-character\n\t// string.\n\t//\n\t// [CPUID]: https://wiki.osdev.org/CPUID\n\tHostCPUVendorIDKey = attribute.Key(\"host.cpu.vendor.id\")\n\n\t// HostIDKey is the attribute Key conforming to the \"host.id\" semantic\n\t// conventions. It represents the unique host ID. For Cloud, this must be the\n\t// instance_id assigned by the cloud provider. For non-containerized systems,\n\t// this should be the `machine-id`. See the table below for the sources to use\n\t// to determine the `machine-id` based on operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"fdbf79e8af94cb7f9e8df36789187052\"\n\tHostIDKey = attribute.Key(\"host.id\")\n\n\t// HostImageIDKey is the attribute Key conforming to the \"host.image.id\"\n\t// semantic conventions. It represents the VM image ID or host OS image ID. For\n\t// Cloud, this value is from the provider.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ami-07b06b442921831e5\"\n\tHostImageIDKey = attribute.Key(\"host.image.id\")\n\n\t// HostImageNameKey is the attribute Key conforming to the \"host.image.name\"\n\t// semantic conventions. It represents the name of the VM image or OS install\n\t// the host was instantiated from.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"infra-ami-eks-worker-node-7d4ec78312\", \"CentOS-8-x86_64-1905\"\n\tHostImageNameKey = attribute.Key(\"host.image.name\")\n\n\t// HostImageVersionKey is the attribute Key conforming to the\n\t// \"host.image.version\" semantic conventions. It represents the version string\n\t// of the VM image or host OS as defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0.1\"\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\tHostImageVersionKey = attribute.Key(\"host.image.version\")\n\n\t// HostIPKey is the attribute Key conforming to the \"host.ip\" semantic\n\t// conventions. It represents the available IP addresses of the host, excluding\n\t// loopback interfaces.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"192.168.1.140\", \"fe80::abc2:4a28:737a:609e\"\n\t// Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6\n\t// addresses MUST be specified in the [RFC 5952] format.\n\t//\n\t// [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html\n\tHostIPKey = attribute.Key(\"host.ip\")\n\n\t// HostMacKey is the attribute Key conforming to the \"host.mac\" semantic\n\t// conventions. It represents the available MAC addresses of the host, excluding\n\t// loopback interfaces.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"AC-DE-48-23-45-67\", \"AC-DE-48-23-45-67-01-9F\"\n\t// Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as\n\t// hyphen-separated octets in uppercase hexadecimal form from most to least\n\t// significant.\n\t//\n\t// [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf\n\tHostMacKey = attribute.Key(\"host.mac\")\n\n\t// HostNameKey is the attribute Key conforming to the \"host.name\" semantic\n\t// conventions. It represents the name of the host. On Unix systems, it may\n\t// contain what the hostname command returns, or the fully qualified hostname,\n\t// or another name specified by the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-test\"\n\tHostNameKey = attribute.Key(\"host.name\")\n\n\t// HostTypeKey is the attribute Key conforming to the \"host.type\" semantic\n\t// conventions. It represents the type of host. For Cloud, this must be the\n\t// machine type.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"n1-standard-1\"\n\tHostTypeKey = attribute.Key(\"host.type\")\n)\n\n// HostCPUCacheL2Size returns an attribute KeyValue conforming to the\n// \"host.cpu.cache.l2.size\" semantic conventions. It represents the amount of\n// level 2 memory cache available to the processor (in Bytes).\nfunc HostCPUCacheL2Size(val int) attribute.KeyValue {\n\treturn HostCPUCacheL2SizeKey.Int(val)\n}\n\n// HostCPUFamily returns an attribute KeyValue conforming to the\n// \"host.cpu.family\" semantic conventions. It represents the family or generation\n// of the CPU.\nfunc HostCPUFamily(val string) attribute.KeyValue {\n\treturn HostCPUFamilyKey.String(val)\n}\n\n// HostCPUModelID returns an attribute KeyValue conforming to the\n// \"host.cpu.model.id\" semantic conventions. It represents the model identifier.\n// It provides more granular information about the CPU, distinguishing it from\n// other CPUs within the same family.\nfunc HostCPUModelID(val string) attribute.KeyValue {\n\treturn HostCPUModelIDKey.String(val)\n}\n\n// HostCPUModelName returns an attribute KeyValue conforming to the\n// \"host.cpu.model.name\" semantic conventions. It represents the model\n// designation of the processor.\nfunc HostCPUModelName(val string) attribute.KeyValue {\n\treturn HostCPUModelNameKey.String(val)\n}\n\n// HostCPUStepping returns an attribute KeyValue conforming to the\n// \"host.cpu.stepping\" semantic conventions. It represents the stepping or core\n// revisions.\nfunc HostCPUStepping(val string) attribute.KeyValue {\n\treturn HostCPUSteppingKey.String(val)\n}\n\n// HostCPUVendorID returns an attribute KeyValue conforming to the\n// \"host.cpu.vendor.id\" semantic conventions. It represents the processor\n// manufacturer identifier. A maximum 12-character string.\nfunc HostCPUVendorID(val string) attribute.KeyValue {\n\treturn HostCPUVendorIDKey.String(val)\n}\n\n// HostID returns an attribute KeyValue conforming to the \"host.id\" semantic\n// conventions. It represents the unique host ID. For Cloud, this must be the\n// instance_id assigned by the cloud provider. For non-containerized systems,\n// this should be the `machine-id`. See the table below for the sources to use to\n// determine the `machine-id` based on operating system.\nfunc HostID(val string) attribute.KeyValue {\n\treturn HostIDKey.String(val)\n}\n\n// HostImageID returns an attribute KeyValue conforming to the \"host.image.id\"\n// semantic conventions. It represents the VM image ID or host OS image ID. For\n// Cloud, this value is from the provider.\nfunc HostImageID(val string) attribute.KeyValue {\n\treturn HostImageIDKey.String(val)\n}\n\n// HostImageName returns an attribute KeyValue conforming to the\n// \"host.image.name\" semantic conventions. It represents the name of the VM image\n// or OS install the host was instantiated from.\nfunc HostImageName(val string) attribute.KeyValue {\n\treturn HostImageNameKey.String(val)\n}\n\n// HostImageVersion returns an attribute KeyValue conforming to the\n// \"host.image.version\" semantic conventions. It represents the version string of\n// the VM image or host OS as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc HostImageVersion(val string) attribute.KeyValue {\n\treturn HostImageVersionKey.String(val)\n}\n\n// HostIP returns an attribute KeyValue conforming to the \"host.ip\" semantic\n// conventions. It represents the available IP addresses of the host, excluding\n// loopback interfaces.\nfunc HostIP(val ...string) attribute.KeyValue {\n\treturn HostIPKey.StringSlice(val)\n}\n\n// HostMac returns an attribute KeyValue conforming to the \"host.mac\" semantic\n// conventions. It represents the available MAC addresses of the host, excluding\n// loopback interfaces.\nfunc HostMac(val ...string) attribute.KeyValue {\n\treturn HostMacKey.StringSlice(val)\n}\n\n// HostName returns an attribute KeyValue conforming to the \"host.name\" semantic\n// conventions. It represents the name of the host. On Unix systems, it may\n// contain what the hostname command returns, or the fully qualified hostname, or\n// another name specified by the user.\nfunc HostName(val string) attribute.KeyValue {\n\treturn HostNameKey.String(val)\n}\n\n// HostType returns an attribute KeyValue conforming to the \"host.type\" semantic\n// conventions. It represents the type of host. For Cloud, this must be the\n// machine type.\nfunc HostType(val string) attribute.KeyValue {\n\treturn HostTypeKey.String(val)\n}\n\n// Enum values for host.arch\nvar (\n\t// AMD64\n\t// Stability: development\n\tHostArchAMD64 = HostArchKey.String(\"amd64\")\n\t// ARM32\n\t// Stability: development\n\tHostArchARM32 = HostArchKey.String(\"arm32\")\n\t// ARM64\n\t// Stability: development\n\tHostArchARM64 = HostArchKey.String(\"arm64\")\n\t// Itanium\n\t// Stability: development\n\tHostArchIA64 = HostArchKey.String(\"ia64\")\n\t// 32-bit PowerPC\n\t// Stability: development\n\tHostArchPPC32 = HostArchKey.String(\"ppc32\")\n\t// 64-bit PowerPC\n\t// Stability: development\n\tHostArchPPC64 = HostArchKey.String(\"ppc64\")\n\t// IBM z/Architecture\n\t// Stability: development\n\tHostArchS390x = HostArchKey.String(\"s390x\")\n\t// 32-bit x86\n\t// Stability: development\n\tHostArchX86 = HostArchKey.String(\"x86\")\n)\n\n// Namespace: http\nconst (\n\t// HTTPConnectionStateKey is the attribute Key conforming to the\n\t// \"http.connection.state\" semantic conventions. It represents the state of the\n\t// HTTP connection in the HTTP connection pool.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"active\", \"idle\"\n\tHTTPConnectionStateKey = attribute.Key(\"http.connection.state\")\n\n\t// HTTPRequestBodySizeKey is the attribute Key conforming to the\n\t// \"http.request.body.size\" semantic conventions. It represents the size of the\n\t// request payload body in bytes. This is the number of bytes transferred\n\t// excluding headers and is often, but not always, present as the\n\t// [Content-Length] header. For requests using transport encoding, this should\n\t// be the compressed size.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\n\tHTTPRequestBodySizeKey = attribute.Key(\"http.request.body.size\")\n\n\t// HTTPRequestMethodKey is the attribute Key conforming to the\n\t// \"http.request.method\" semantic conventions. It represents the HTTP request\n\t// method.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GET\", \"POST\", \"HEAD\"\n\t// Note: HTTP request method value SHOULD be \"known\" to the instrumentation.\n\t// By default, this convention defines \"known\" methods as the ones listed in\n\t// [RFC9110]\n\t// and the PATCH method defined in [RFC5789].\n\t//\n\t// If the HTTP request method is not known to instrumentation, it MUST set the\n\t// `http.request.method` attribute to `_OTHER`.\n\t//\n\t// If the HTTP instrumentation could end up converting valid HTTP request\n\t// methods to `_OTHER`, then it MUST provide a way to override\n\t// the list of known HTTP methods. If this override is done via environment\n\t// variable, then the environment variable MUST be named\n\t// OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of\n\t// case-sensitive known HTTP methods\n\t// (this list MUST be a full override of the default known method, it is not a\n\t// list of known methods in addition to the defaults).\n\t//\n\t// HTTP method names are case-sensitive and `http.request.method` attribute\n\t// value MUST match a known HTTP method name exactly.\n\t// Instrumentations for specific web frameworks that consider HTTP methods to be\n\t// case insensitive, SHOULD populate a canonical equivalent.\n\t// Tracing instrumentations that do so, MUST also set\n\t// `http.request.method_original` to the original value.\n\t//\n\t// [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods\n\t// [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html\n\tHTTPRequestMethodKey = attribute.Key(\"http.request.method\")\n\n\t// HTTPRequestMethodOriginalKey is the attribute Key conforming to the\n\t// \"http.request.method_original\" semantic conventions. It represents the\n\t// original HTTP method sent by the client in the request line.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GeT\", \"ACL\", \"foo\"\n\tHTTPRequestMethodOriginalKey = attribute.Key(\"http.request.method_original\")\n\n\t// HTTPRequestResendCountKey is the attribute Key conforming to the\n\t// \"http.request.resend_count\" semantic conventions. It represents the ordinal\n\t// number of request resending attempt (for any reason, including redirects).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Note: The resend count SHOULD be updated each time an HTTP request gets\n\t// resent by the client, regardless of what was the cause of the resending (e.g.\n\t// redirection, authorization failure, 503 Server Unavailable, network issues,\n\t// or any other).\n\tHTTPRequestResendCountKey = attribute.Key(\"http.request.resend_count\")\n\n\t// HTTPRequestSizeKey is the attribute Key conforming to the \"http.request.size\"\n\t// semantic conventions. It represents the total size of the request in bytes.\n\t// This should be the total number of bytes sent over the wire, including the\n\t// request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request\n\t// body if any.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tHTTPRequestSizeKey = attribute.Key(\"http.request.size\")\n\n\t// HTTPResponseBodySizeKey is the attribute Key conforming to the\n\t// \"http.response.body.size\" semantic conventions. It represents the size of the\n\t// response payload body in bytes. This is the number of bytes transferred\n\t// excluding headers and is often, but not always, present as the\n\t// [Content-Length] header. For requests using transport encoding, this should\n\t// be the compressed size.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\n\tHTTPResponseBodySizeKey = attribute.Key(\"http.response.body.size\")\n\n\t// HTTPResponseSizeKey is the attribute Key conforming to the\n\t// \"http.response.size\" semantic conventions. It represents the total size of\n\t// the response in bytes. This should be the total number of bytes sent over the\n\t// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),\n\t// headers, and response body and trailers if any.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tHTTPResponseSizeKey = attribute.Key(\"http.response.size\")\n\n\t// HTTPResponseStatusCodeKey is the attribute Key conforming to the\n\t// \"http.response.status_code\" semantic conventions. It represents the\n\t// [HTTP response status code].\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 200\n\t//\n\t// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\n\tHTTPResponseStatusCodeKey = attribute.Key(\"http.response.status_code\")\n\n\t// HTTPRouteKey is the attribute Key conforming to the \"http.route\" semantic\n\t// conventions. It represents the matched route, that is, the path template in\n\t// the format used by the respective server framework.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"/users/:userID?\", \"{controller}/{action}/{id?}\"\n\t// Note: MUST NOT be populated when this is not supported by the HTTP server\n\t// framework as the route attribute should have low-cardinality and the URI path\n\t// can NOT substitute it.\n\t// SHOULD include the [application root] if there is one.\n\t//\n\t// [application root]: /docs/http/http-spans.md#http-server-definitions\n\tHTTPRouteKey = attribute.Key(\"http.route\")\n)\n\n// HTTPRequestBodySize returns an attribute KeyValue conforming to the\n// \"http.request.body.size\" semantic conventions. It represents the size of the\n// request payload body in bytes. This is the number of bytes transferred\n// excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc HTTPRequestBodySize(val int) attribute.KeyValue {\n\treturn HTTPRequestBodySizeKey.Int(val)\n}\n\n// HTTPRequestHeader returns an attribute KeyValue conforming to the\n// \"http.request.header\" semantic conventions. It represents the HTTP request\n// headers, `<key>` being the normalized HTTP Header name (lowercase), the value\n// being the header values.\nfunc HTTPRequestHeader(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"http.request.header.\"+key, val)\n}\n\n// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the\n// \"http.request.method_original\" semantic conventions. It represents the\n// original HTTP method sent by the client in the request line.\nfunc HTTPRequestMethodOriginal(val string) attribute.KeyValue {\n\treturn HTTPRequestMethodOriginalKey.String(val)\n}\n\n// HTTPRequestResendCount returns an attribute KeyValue conforming to the\n// \"http.request.resend_count\" semantic conventions. It represents the ordinal\n// number of request resending attempt (for any reason, including redirects).\nfunc HTTPRequestResendCount(val int) attribute.KeyValue {\n\treturn HTTPRequestResendCountKey.Int(val)\n}\n\n// HTTPRequestSize returns an attribute KeyValue conforming to the\n// \"http.request.size\" semantic conventions. It represents the total size of the\n// request in bytes. This should be the total number of bytes sent over the wire,\n// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers,\n// and request body if any.\nfunc HTTPRequestSize(val int) attribute.KeyValue {\n\treturn HTTPRequestSizeKey.Int(val)\n}\n\n// HTTPResponseBodySize returns an attribute KeyValue conforming to the\n// \"http.response.body.size\" semantic conventions. It represents the size of the\n// response payload body in bytes. This is the number of bytes transferred\n// excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc HTTPResponseBodySize(val int) attribute.KeyValue {\n\treturn HTTPResponseBodySizeKey.Int(val)\n}\n\n// HTTPResponseHeader returns an attribute KeyValue conforming to the\n// \"http.response.header\" semantic conventions. It represents the HTTP response\n// headers, `<key>` being the normalized HTTP Header name (lowercase), the value\n// being the header values.\nfunc HTTPResponseHeader(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"http.response.header.\"+key, val)\n}\n\n// HTTPResponseSize returns an attribute KeyValue conforming to the\n// \"http.response.size\" semantic conventions. It represents the total size of the\n// response in bytes. This should be the total number of bytes sent over the\n// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),\n// headers, and response body and trailers if any.\nfunc HTTPResponseSize(val int) attribute.KeyValue {\n\treturn HTTPResponseSizeKey.Int(val)\n}\n\n// HTTPResponseStatusCode returns an attribute KeyValue conforming to the\n// \"http.response.status_code\" semantic conventions. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc HTTPResponseStatusCode(val int) attribute.KeyValue {\n\treturn HTTPResponseStatusCodeKey.Int(val)\n}\n\n// HTTPRoute returns an attribute KeyValue conforming to the \"http.route\"\n// semantic conventions. It represents the matched route, that is, the path\n// template in the format used by the respective server framework.\nfunc HTTPRoute(val string) attribute.KeyValue {\n\treturn HTTPRouteKey.String(val)\n}\n\n// Enum values for http.connection.state\nvar (\n\t// active state.\n\t// Stability: development\n\tHTTPConnectionStateActive = HTTPConnectionStateKey.String(\"active\")\n\t// idle state.\n\t// Stability: development\n\tHTTPConnectionStateIdle = HTTPConnectionStateKey.String(\"idle\")\n)\n\n// Enum values for http.request.method\nvar (\n\t// CONNECT method.\n\t// Stability: stable\n\tHTTPRequestMethodConnect = HTTPRequestMethodKey.String(\"CONNECT\")\n\t// DELETE method.\n\t// Stability: stable\n\tHTTPRequestMethodDelete = HTTPRequestMethodKey.String(\"DELETE\")\n\t// GET method.\n\t// Stability: stable\n\tHTTPRequestMethodGet = HTTPRequestMethodKey.String(\"GET\")\n\t// HEAD method.\n\t// Stability: stable\n\tHTTPRequestMethodHead = HTTPRequestMethodKey.String(\"HEAD\")\n\t// OPTIONS method.\n\t// Stability: stable\n\tHTTPRequestMethodOptions = HTTPRequestMethodKey.String(\"OPTIONS\")\n\t// PATCH method.\n\t// Stability: stable\n\tHTTPRequestMethodPatch = HTTPRequestMethodKey.String(\"PATCH\")\n\t// POST method.\n\t// Stability: stable\n\tHTTPRequestMethodPost = HTTPRequestMethodKey.String(\"POST\")\n\t// PUT method.\n\t// Stability: stable\n\tHTTPRequestMethodPut = HTTPRequestMethodKey.String(\"PUT\")\n\t// TRACE method.\n\t// Stability: stable\n\tHTTPRequestMethodTrace = HTTPRequestMethodKey.String(\"TRACE\")\n\t// Any HTTP method that the instrumentation has no prior knowledge of.\n\t// Stability: stable\n\tHTTPRequestMethodOther = HTTPRequestMethodKey.String(\"_OTHER\")\n)\n\n// Namespace: hw\nconst (\n\t// HwBatteryCapacityKey is the attribute Key conforming to the\n\t// \"hw.battery.capacity\" semantic conventions. It represents the design capacity\n\t// in Watts-hours or Amper-hours.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9.3Ah\", \"50Wh\"\n\tHwBatteryCapacityKey = attribute.Key(\"hw.battery.capacity\")\n\n\t// HwBatteryChemistryKey is the attribute Key conforming to the\n\t// \"hw.battery.chemistry\" semantic conventions. It represents the battery\n\t// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Li-ion\", \"NiMH\"\n\t//\n\t// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html\n\tHwBatteryChemistryKey = attribute.Key(\"hw.battery.chemistry\")\n\n\t// HwBatteryStateKey is the attribute Key conforming to the \"hw.battery.state\"\n\t// semantic conventions. It represents the current state of the battery.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwBatteryStateKey = attribute.Key(\"hw.battery.state\")\n\n\t// HwBiosVersionKey is the attribute Key conforming to the \"hw.bios_version\"\n\t// semantic conventions. It represents the BIOS version of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2.3\"\n\tHwBiosVersionKey = attribute.Key(\"hw.bios_version\")\n\n\t// HwDriverVersionKey is the attribute Key conforming to the \"hw.driver_version\"\n\t// semantic conventions. It represents the driver version for the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10.2.1-3\"\n\tHwDriverVersionKey = attribute.Key(\"hw.driver_version\")\n\n\t// HwEnclosureTypeKey is the attribute Key conforming to the \"hw.enclosure.type\"\n\t// semantic conventions. It represents the type of the enclosure (useful for\n\t// modular systems).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Computer\", \"Storage\", \"Switch\"\n\tHwEnclosureTypeKey = attribute.Key(\"hw.enclosure.type\")\n\n\t// HwFirmwareVersionKey is the attribute Key conforming to the\n\t// \"hw.firmware_version\" semantic conventions. It represents the firmware\n\t// version of the hardware component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2.0.1\"\n\tHwFirmwareVersionKey = attribute.Key(\"hw.firmware_version\")\n\n\t// HwGpuTaskKey is the attribute Key conforming to the \"hw.gpu.task\" semantic\n\t// conventions. It represents the type of task the GPU is performing.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwGpuTaskKey = attribute.Key(\"hw.gpu.task\")\n\n\t// HwIDKey is the attribute Key conforming to the \"hw.id\" semantic conventions.\n\t// It represents an identifier for the hardware component, unique within the\n\t// monitored host.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"win32battery_battery_testsysa33_1\"\n\tHwIDKey = attribute.Key(\"hw.id\")\n\n\t// HwLimitTypeKey is the attribute Key conforming to the \"hw.limit_type\"\n\t// semantic conventions. It represents the type of limit for hardware\n\t// components.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwLimitTypeKey = attribute.Key(\"hw.limit_type\")\n\n\t// HwLogicalDiskRaidLevelKey is the attribute Key conforming to the\n\t// \"hw.logical_disk.raid_level\" semantic conventions. It represents the RAID\n\t// Level of the logical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"RAID0+1\", \"RAID5\", \"RAID10\"\n\tHwLogicalDiskRaidLevelKey = attribute.Key(\"hw.logical_disk.raid_level\")\n\n\t// HwLogicalDiskStateKey is the attribute Key conforming to the\n\t// \"hw.logical_disk.state\" semantic conventions. It represents the state of the\n\t// logical disk space usage.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwLogicalDiskStateKey = attribute.Key(\"hw.logical_disk.state\")\n\n\t// HwMemoryTypeKey is the attribute Key conforming to the \"hw.memory.type\"\n\t// semantic conventions. It represents the type of the memory module.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"DDR4\", \"DDR5\", \"LPDDR5\"\n\tHwMemoryTypeKey = attribute.Key(\"hw.memory.type\")\n\n\t// HwModelKey is the attribute Key conforming to the \"hw.model\" semantic\n\t// conventions. It represents the descriptive model name of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"PERC H740P\", \"Intel(R) Core(TM) i7-10700K\", \"Dell XPS 15 Battery\"\n\tHwModelKey = attribute.Key(\"hw.model\")\n\n\t// HwNameKey is the attribute Key conforming to the \"hw.name\" semantic\n\t// conventions. It represents an easily-recognizable name for the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"eth0\"\n\tHwNameKey = attribute.Key(\"hw.name\")\n\n\t// HwNetworkLogicalAddressesKey is the attribute Key conforming to the\n\t// \"hw.network.logical_addresses\" semantic conventions. It represents the\n\t// logical addresses of the adapter (e.g. IP address, or WWPN).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"172.16.8.21\", \"57.11.193.42\"\n\tHwNetworkLogicalAddressesKey = attribute.Key(\"hw.network.logical_addresses\")\n\n\t// HwNetworkPhysicalAddressKey is the attribute Key conforming to the\n\t// \"hw.network.physical_address\" semantic conventions. It represents the\n\t// physical address of the adapter (e.g. MAC address, or WWNN).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"00-90-F5-E9-7B-36\"\n\tHwNetworkPhysicalAddressKey = attribute.Key(\"hw.network.physical_address\")\n\n\t// HwParentKey is the attribute Key conforming to the \"hw.parent\" semantic\n\t// conventions. It represents the unique identifier of the parent component\n\t// (typically the `hw.id` attribute of the enclosure, or disk controller).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"dellStorage_perc_0\"\n\tHwParentKey = attribute.Key(\"hw.parent\")\n\n\t// HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.smart_attribute\" semantic conventions. It represents the\n\t// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute\n\t// of the physical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Spin Retry Count\", \"Seek Error Rate\", \"Raw Read Error Rate\"\n\t//\n\t// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.\n\tHwPhysicalDiskSmartAttributeKey = attribute.Key(\"hw.physical_disk.smart_attribute\")\n\n\t// HwPhysicalDiskStateKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.state\" semantic conventions. It represents the state of the\n\t// physical disk endurance utilization.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwPhysicalDiskStateKey = attribute.Key(\"hw.physical_disk.state\")\n\n\t// HwPhysicalDiskTypeKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.type\" semantic conventions. It represents the type of the\n\t// physical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"HDD\", \"SSD\", \"10K\"\n\tHwPhysicalDiskTypeKey = attribute.Key(\"hw.physical_disk.type\")\n\n\t// HwSensorLocationKey is the attribute Key conforming to the\n\t// \"hw.sensor_location\" semantic conventions. It represents the location of the\n\t// sensor.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cpu0\", \"ps1\", \"INLET\", \"CPU0_DIE\", \"AMBIENT\", \"MOTHERBOARD\", \"PS0\n\t// V3_3\", \"MAIN_12V\", \"CPU_VCORE\"\n\tHwSensorLocationKey = attribute.Key(\"hw.sensor_location\")\n\n\t// HwSerialNumberKey is the attribute Key conforming to the \"hw.serial_number\"\n\t// semantic conventions. It represents the serial number of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CNFCP0123456789\"\n\tHwSerialNumberKey = attribute.Key(\"hw.serial_number\")\n\n\t// HwStateKey is the attribute Key conforming to the \"hw.state\" semantic\n\t// conventions. It represents the current state of the component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwStateKey = attribute.Key(\"hw.state\")\n\n\t// HwTapeDriveOperationTypeKey is the attribute Key conforming to the\n\t// \"hw.tape_drive.operation_type\" semantic conventions. It represents the type\n\t// of tape drive operation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwTapeDriveOperationTypeKey = attribute.Key(\"hw.tape_drive.operation_type\")\n\n\t// HwTypeKey is the attribute Key conforming to the \"hw.type\" semantic\n\t// conventions. It represents the type of the component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: Describes the category of the hardware component for which `hw.state`\n\t// is being reported. For example, `hw.type=temperature` along with\n\t// `hw.state=degraded` would indicate that the temperature of the hardware\n\t// component has been reported as `degraded`.\n\tHwTypeKey = attribute.Key(\"hw.type\")\n\n\t// HwVendorKey is the attribute Key conforming to the \"hw.vendor\" semantic\n\t// conventions. It represents the vendor name of the hardware component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Dell\", \"HP\", \"Intel\", \"AMD\", \"LSI\", \"Lenovo\"\n\tHwVendorKey = attribute.Key(\"hw.vendor\")\n)\n\n// HwBatteryCapacity returns an attribute KeyValue conforming to the\n// \"hw.battery.capacity\" semantic conventions. It represents the design capacity\n// in Watts-hours or Amper-hours.\nfunc HwBatteryCapacity(val string) attribute.KeyValue {\n\treturn HwBatteryCapacityKey.String(val)\n}\n\n// HwBatteryChemistry returns an attribute KeyValue conforming to the\n// \"hw.battery.chemistry\" semantic conventions. It represents the battery\n// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.\n//\n// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html\nfunc HwBatteryChemistry(val string) attribute.KeyValue {\n\treturn HwBatteryChemistryKey.String(val)\n}\n\n// HwBiosVersion returns an attribute KeyValue conforming to the\n// \"hw.bios_version\" semantic conventions. It represents the BIOS version of the\n// hardware component.\nfunc HwBiosVersion(val string) attribute.KeyValue {\n\treturn HwBiosVersionKey.String(val)\n}\n\n// HwDriverVersion returns an attribute KeyValue conforming to the\n// \"hw.driver_version\" semantic conventions. It represents the driver version for\n// the hardware component.\nfunc HwDriverVersion(val string) attribute.KeyValue {\n\treturn HwDriverVersionKey.String(val)\n}\n\n// HwEnclosureType returns an attribute KeyValue conforming to the\n// \"hw.enclosure.type\" semantic conventions. It represents the type of the\n// enclosure (useful for modular systems).\nfunc HwEnclosureType(val string) attribute.KeyValue {\n\treturn HwEnclosureTypeKey.String(val)\n}\n\n// HwFirmwareVersion returns an attribute KeyValue conforming to the\n// \"hw.firmware_version\" semantic conventions. It represents the firmware version\n// of the hardware component.\nfunc HwFirmwareVersion(val string) attribute.KeyValue {\n\treturn HwFirmwareVersionKey.String(val)\n}\n\n// HwID returns an attribute KeyValue conforming to the \"hw.id\" semantic\n// conventions. It represents an identifier for the hardware component, unique\n// within the monitored host.\nfunc HwID(val string) attribute.KeyValue {\n\treturn HwIDKey.String(val)\n}\n\n// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the\n// \"hw.logical_disk.raid_level\" semantic conventions. It represents the RAID\n// Level of the logical disk.\nfunc HwLogicalDiskRaidLevel(val string) attribute.KeyValue {\n\treturn HwLogicalDiskRaidLevelKey.String(val)\n}\n\n// HwMemoryType returns an attribute KeyValue conforming to the \"hw.memory.type\"\n// semantic conventions. It represents the type of the memory module.\nfunc HwMemoryType(val string) attribute.KeyValue {\n\treturn HwMemoryTypeKey.String(val)\n}\n\n// HwModel returns an attribute KeyValue conforming to the \"hw.model\" semantic\n// conventions. It represents the descriptive model name of the hardware\n// component.\nfunc HwModel(val string) attribute.KeyValue {\n\treturn HwModelKey.String(val)\n}\n\n// HwName returns an attribute KeyValue conforming to the \"hw.name\" semantic\n// conventions. It represents an easily-recognizable name for the hardware\n// component.\nfunc HwName(val string) attribute.KeyValue {\n\treturn HwNameKey.String(val)\n}\n\n// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the\n// \"hw.network.logical_addresses\" semantic conventions. It represents the logical\n// addresses of the adapter (e.g. IP address, or WWPN).\nfunc HwNetworkLogicalAddresses(val ...string) attribute.KeyValue {\n\treturn HwNetworkLogicalAddressesKey.StringSlice(val)\n}\n\n// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the\n// \"hw.network.physical_address\" semantic conventions. It represents the physical\n// address of the adapter (e.g. MAC address, or WWNN).\nfunc HwNetworkPhysicalAddress(val string) attribute.KeyValue {\n\treturn HwNetworkPhysicalAddressKey.String(val)\n}\n\n// HwParent returns an attribute KeyValue conforming to the \"hw.parent\" semantic\n// conventions. It represents the unique identifier of the parent component\n// (typically the `hw.id` attribute of the enclosure, or disk controller).\nfunc HwParent(val string) attribute.KeyValue {\n\treturn HwParentKey.String(val)\n}\n\n// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the\n// \"hw.physical_disk.smart_attribute\" semantic conventions. It represents the\n// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute\n// of the physical disk.\n//\n// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.\nfunc HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue {\n\treturn HwPhysicalDiskSmartAttributeKey.String(val)\n}\n\n// HwPhysicalDiskType returns an attribute KeyValue conforming to the\n// \"hw.physical_disk.type\" semantic conventions. It represents the type of the\n// physical disk.\nfunc HwPhysicalDiskType(val string) attribute.KeyValue {\n\treturn HwPhysicalDiskTypeKey.String(val)\n}\n\n// HwSensorLocation returns an attribute KeyValue conforming to the\n// \"hw.sensor_location\" semantic conventions. It represents the location of the\n// sensor.\nfunc HwSensorLocation(val string) attribute.KeyValue {\n\treturn HwSensorLocationKey.String(val)\n}\n\n// HwSerialNumber returns an attribute KeyValue conforming to the\n// \"hw.serial_number\" semantic conventions. It represents the serial number of\n// the hardware component.\nfunc HwSerialNumber(val string) attribute.KeyValue {\n\treturn HwSerialNumberKey.String(val)\n}\n\n// HwVendor returns an attribute KeyValue conforming to the \"hw.vendor\" semantic\n// conventions. It represents the vendor name of the hardware component.\nfunc HwVendor(val string) attribute.KeyValue {\n\treturn HwVendorKey.String(val)\n}\n\n// Enum values for hw.battery.state\nvar (\n\t// Charging\n\t// Stability: development\n\tHwBatteryStateCharging = HwBatteryStateKey.String(\"charging\")\n\t// Discharging\n\t// Stability: development\n\tHwBatteryStateDischarging = HwBatteryStateKey.String(\"discharging\")\n)\n\n// Enum values for hw.gpu.task\nvar (\n\t// Decoder\n\t// Stability: development\n\tHwGpuTaskDecoder = HwGpuTaskKey.String(\"decoder\")\n\t// Encoder\n\t// Stability: development\n\tHwGpuTaskEncoder = HwGpuTaskKey.String(\"encoder\")\n\t// General\n\t// Stability: development\n\tHwGpuTaskGeneral = HwGpuTaskKey.String(\"general\")\n)\n\n// Enum values for hw.limit_type\nvar (\n\t// Critical\n\t// Stability: development\n\tHwLimitTypeCritical = HwLimitTypeKey.String(\"critical\")\n\t// Degraded\n\t// Stability: development\n\tHwLimitTypeDegraded = HwLimitTypeKey.String(\"degraded\")\n\t// High Critical\n\t// Stability: development\n\tHwLimitTypeHighCritical = HwLimitTypeKey.String(\"high.critical\")\n\t// High Degraded\n\t// Stability: development\n\tHwLimitTypeHighDegraded = HwLimitTypeKey.String(\"high.degraded\")\n\t// Low Critical\n\t// Stability: development\n\tHwLimitTypeLowCritical = HwLimitTypeKey.String(\"low.critical\")\n\t// Low Degraded\n\t// Stability: development\n\tHwLimitTypeLowDegraded = HwLimitTypeKey.String(\"low.degraded\")\n\t// Maximum\n\t// Stability: development\n\tHwLimitTypeMax = HwLimitTypeKey.String(\"max\")\n\t// Throttled\n\t// Stability: development\n\tHwLimitTypeThrottled = HwLimitTypeKey.String(\"throttled\")\n\t// Turbo\n\t// Stability: development\n\tHwLimitTypeTurbo = HwLimitTypeKey.String(\"turbo\")\n)\n\n// Enum values for hw.logical_disk.state\nvar (\n\t// Used\n\t// Stability: development\n\tHwLogicalDiskStateUsed = HwLogicalDiskStateKey.String(\"used\")\n\t// Free\n\t// Stability: development\n\tHwLogicalDiskStateFree = HwLogicalDiskStateKey.String(\"free\")\n)\n\n// Enum values for hw.physical_disk.state\nvar (\n\t// Remaining\n\t// Stability: development\n\tHwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String(\"remaining\")\n)\n\n// Enum values for hw.state\nvar (\n\t// Degraded\n\t// Stability: development\n\tHwStateDegraded = HwStateKey.String(\"degraded\")\n\t// Failed\n\t// Stability: development\n\tHwStateFailed = HwStateKey.String(\"failed\")\n\t// Needs Cleaning\n\t// Stability: development\n\tHwStateNeedsCleaning = HwStateKey.String(\"needs_cleaning\")\n\t// OK\n\t// Stability: development\n\tHwStateOk = HwStateKey.String(\"ok\")\n\t// Predicted Failure\n\t// Stability: development\n\tHwStatePredictedFailure = HwStateKey.String(\"predicted_failure\")\n)\n\n// Enum values for hw.tape_drive.operation_type\nvar (\n\t// Mount\n\t// Stability: development\n\tHwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String(\"mount\")\n\t// Unmount\n\t// Stability: development\n\tHwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String(\"unmount\")\n\t// Clean\n\t// Stability: development\n\tHwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String(\"clean\")\n)\n\n// Enum values for hw.type\nvar (\n\t// Battery\n\t// Stability: development\n\tHwTypeBattery = HwTypeKey.String(\"battery\")\n\t// CPU\n\t// Stability: development\n\tHwTypeCPU = HwTypeKey.String(\"cpu\")\n\t// Disk controller\n\t// Stability: development\n\tHwTypeDiskController = HwTypeKey.String(\"disk_controller\")\n\t// Enclosure\n\t// Stability: development\n\tHwTypeEnclosure = HwTypeKey.String(\"enclosure\")\n\t// Fan\n\t// Stability: development\n\tHwTypeFan = HwTypeKey.String(\"fan\")\n\t// GPU\n\t// Stability: development\n\tHwTypeGpu = HwTypeKey.String(\"gpu\")\n\t// Logical disk\n\t// Stability: development\n\tHwTypeLogicalDisk = HwTypeKey.String(\"logical_disk\")\n\t// Memory\n\t// Stability: development\n\tHwTypeMemory = HwTypeKey.String(\"memory\")\n\t// Network\n\t// Stability: development\n\tHwTypeNetwork = HwTypeKey.String(\"network\")\n\t// Physical disk\n\t// Stability: development\n\tHwTypePhysicalDisk = HwTypeKey.String(\"physical_disk\")\n\t// Power supply\n\t// Stability: development\n\tHwTypePowerSupply = HwTypeKey.String(\"power_supply\")\n\t// Tape drive\n\t// Stability: development\n\tHwTypeTapeDrive = HwTypeKey.String(\"tape_drive\")\n\t// Temperature\n\t// Stability: development\n\tHwTypeTemperature = HwTypeKey.String(\"temperature\")\n\t// Voltage\n\t// Stability: development\n\tHwTypeVoltage = HwTypeKey.String(\"voltage\")\n)\n\n// Namespace: ios\nconst (\n\t// IOSAppStateKey is the attribute Key conforming to the \"ios.app.state\"\n\t// semantic conventions. It represents the this attribute represents the state\n\t// of the application.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The iOS lifecycle states are defined in the\n\t// [UIApplicationDelegate documentation], and from which the `OS terminology`\n\t// column values are derived.\n\t//\n\t// [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate\n\tIOSAppStateKey = attribute.Key(\"ios.app.state\")\n)\n\n// Enum values for ios.app.state\nvar (\n\t// The app has become `active`. Associated with UIKit notification\n\t// `applicationDidBecomeActive`.\n\t//\n\t// Stability: development\n\tIOSAppStateActive = IOSAppStateKey.String(\"active\")\n\t// The app is now `inactive`. Associated with UIKit notification\n\t// `applicationWillResignActive`.\n\t//\n\t// Stability: development\n\tIOSAppStateInactive = IOSAppStateKey.String(\"inactive\")\n\t// The app is now in the background. This value is associated with UIKit\n\t// notification `applicationDidEnterBackground`.\n\t//\n\t// Stability: development\n\tIOSAppStateBackground = IOSAppStateKey.String(\"background\")\n\t// The app is now in the foreground. This value is associated with UIKit\n\t// notification `applicationWillEnterForeground`.\n\t//\n\t// Stability: development\n\tIOSAppStateForeground = IOSAppStateKey.String(\"foreground\")\n\t// The app is about to terminate. Associated with UIKit notification\n\t// `applicationWillTerminate`.\n\t//\n\t// Stability: development\n\tIOSAppStateTerminate = IOSAppStateKey.String(\"terminate\")\n)\n\n// Namespace: k8s\nconst (\n\t// K8SClusterNameKey is the attribute Key conforming to the \"k8s.cluster.name\"\n\t// semantic conventions. It represents the name of the cluster.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-cluster\"\n\tK8SClusterNameKey = attribute.Key(\"k8s.cluster.name\")\n\n\t// K8SClusterUIDKey is the attribute Key conforming to the \"k8s.cluster.uid\"\n\t// semantic conventions. It represents a pseudo-ID for the cluster, set to the\n\t// UID of the `kube-system` namespace.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: K8s doesn't have support for obtaining a cluster ID. If this is ever\n\t// added, we will recommend collecting the `k8s.cluster.uid` through the\n\t// official APIs. In the meantime, we are able to use the `uid` of the\n\t// `kube-system` namespace as a proxy for cluster ID. Read on for the\n\t// rationale.\n\t//\n\t// Every object created in a K8s cluster is assigned a distinct UID. The\n\t// `kube-system` namespace is used by Kubernetes itself and will exist\n\t// for the lifetime of the cluster. Using the `uid` of the `kube-system`\n\t// namespace is a reasonable proxy for the K8s ClusterID as it will only\n\t// change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are\n\t// UUIDs as standardized by\n\t// [ISO/IEC 9834-8 and ITU-T X.667].\n\t// Which states:\n\t//\n\t// > If generated according to one of the mechanisms defined in Rec.\n\t// > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be\n\t// > different from all other UUIDs generated before 3603 A.D., or is\n\t// > extremely likely to be different (depending on the mechanism chosen).\n\t//\n\t// Therefore, UIDs between clusters should be extremely unlikely to\n\t// conflict.\n\t//\n\t// [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html\n\tK8SClusterUIDKey = attribute.Key(\"k8s.cluster.uid\")\n\n\t// K8SContainerNameKey is the attribute Key conforming to the\n\t// \"k8s.container.name\" semantic conventions. It represents the name of the\n\t// Container from Pod specification, must be unique within a Pod. Container\n\t// runtime usually uses different globally unique name (`container.name`).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"redis\"\n\tK8SContainerNameKey = attribute.Key(\"k8s.container.name\")\n\n\t// K8SContainerRestartCountKey is the attribute Key conforming to the\n\t// \"k8s.container.restart_count\" semantic conventions. It represents the number\n\t// of times the container was restarted. This attribute can be used to identify\n\t// a particular container (running or stopped) within a container spec.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tK8SContainerRestartCountKey = attribute.Key(\"k8s.container.restart_count\")\n\n\t// K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to\n\t// the \"k8s.container.status.last_terminated_reason\" semantic conventions. It\n\t// represents the last terminated reason of the Container.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Evicted\", \"Error\"\n\tK8SContainerStatusLastTerminatedReasonKey = attribute.Key(\"k8s.container.status.last_terminated_reason\")\n\n\t// K8SContainerStatusReasonKey is the attribute Key conforming to the\n\t// \"k8s.container.status.reason\" semantic conventions. It represents the reason\n\t// for the container state. Corresponds to the `reason` field of the:\n\t// [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ContainerCreating\", \"CrashLoopBackOff\",\n\t// \"CreateContainerConfigError\", \"ErrImagePull\", \"ImagePullBackOff\",\n\t// \"OOMKilled\", \"Completed\", \"Error\", \"ContainerCannotRun\"\n\t//\n\t// [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core\n\t// [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core\n\tK8SContainerStatusReasonKey = attribute.Key(\"k8s.container.status.reason\")\n\n\t// K8SContainerStatusStateKey is the attribute Key conforming to the\n\t// \"k8s.container.status.state\" semantic conventions. It represents the state of\n\t// the container. [K8s ContainerState].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"terminated\", \"running\", \"waiting\"\n\t//\n\t// [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core\n\tK8SContainerStatusStateKey = attribute.Key(\"k8s.container.status.state\")\n\n\t// K8SCronJobNameKey is the attribute Key conforming to the \"k8s.cronjob.name\"\n\t// semantic conventions. It represents the name of the CronJob.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SCronJobNameKey = attribute.Key(\"k8s.cronjob.name\")\n\n\t// K8SCronJobUIDKey is the attribute Key conforming to the \"k8s.cronjob.uid\"\n\t// semantic conventions. It represents the UID of the CronJob.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SCronJobUIDKey = attribute.Key(\"k8s.cronjob.uid\")\n\n\t// K8SDaemonSetNameKey is the attribute Key conforming to the\n\t// \"k8s.daemonset.name\" semantic conventions. It represents the name of the\n\t// DaemonSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SDaemonSetNameKey = attribute.Key(\"k8s.daemonset.name\")\n\n\t// K8SDaemonSetUIDKey is the attribute Key conforming to the \"k8s.daemonset.uid\"\n\t// semantic conventions. It represents the UID of the DaemonSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SDaemonSetUIDKey = attribute.Key(\"k8s.daemonset.uid\")\n\n\t// K8SDeploymentNameKey is the attribute Key conforming to the\n\t// \"k8s.deployment.name\" semantic conventions. It represents the name of the\n\t// Deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SDeploymentNameKey = attribute.Key(\"k8s.deployment.name\")\n\n\t// K8SDeploymentUIDKey is the attribute Key conforming to the\n\t// \"k8s.deployment.uid\" semantic conventions. It represents the UID of the\n\t// Deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SDeploymentUIDKey = attribute.Key(\"k8s.deployment.uid\")\n\n\t// K8SHPAMetricTypeKey is the attribute Key conforming to the\n\t// \"k8s.hpa.metric.type\" semantic conventions. It represents the type of metric\n\t// source for the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Resource\", \"ContainerResource\"\n\t// Note: This attribute reflects the `type` field of spec.metrics[] in the HPA.\n\tK8SHPAMetricTypeKey = attribute.Key(\"k8s.hpa.metric.type\")\n\n\t// K8SHPANameKey is the attribute Key conforming to the \"k8s.hpa.name\" semantic\n\t// conventions. It represents the name of the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SHPANameKey = attribute.Key(\"k8s.hpa.name\")\n\n\t// K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.api_version\" semantic conventions. It represents the\n\t// API version of the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"apps/v1\", \"autoscaling/v2\"\n\t// Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA\n\t// spec.\n\tK8SHPAScaletargetrefAPIVersionKey = attribute.Key(\"k8s.hpa.scaletargetref.api_version\")\n\n\t// K8SHPAScaletargetrefKindKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.kind\" semantic conventions. It represents the kind of\n\t// the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Deployment\", \"StatefulSet\"\n\t// Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.\n\tK8SHPAScaletargetrefKindKey = attribute.Key(\"k8s.hpa.scaletargetref.kind\")\n\n\t// K8SHPAScaletargetrefNameKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.name\" semantic conventions. It represents the name of\n\t// the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-deployment\", \"my-statefulset\"\n\t// Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec.\n\tK8SHPAScaletargetrefNameKey = attribute.Key(\"k8s.hpa.scaletargetref.name\")\n\n\t// K8SHPAUIDKey is the attribute Key conforming to the \"k8s.hpa.uid\" semantic\n\t// conventions. It represents the UID of the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SHPAUIDKey = attribute.Key(\"k8s.hpa.uid\")\n\n\t// K8SHugepageSizeKey is the attribute Key conforming to the \"k8s.hugepage.size\"\n\t// semantic conventions. It represents the size (identifier) of the K8s huge\n\t// page.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2Mi\"\n\tK8SHugepageSizeKey = attribute.Key(\"k8s.hugepage.size\")\n\n\t// K8SJobNameKey is the attribute Key conforming to the \"k8s.job.name\" semantic\n\t// conventions. It represents the name of the Job.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SJobNameKey = attribute.Key(\"k8s.job.name\")\n\n\t// K8SJobUIDKey is the attribute Key conforming to the \"k8s.job.uid\" semantic\n\t// conventions. It represents the UID of the Job.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SJobUIDKey = attribute.Key(\"k8s.job.uid\")\n\n\t// K8SNamespaceNameKey is the attribute Key conforming to the\n\t// \"k8s.namespace.name\" semantic conventions. It represents the name of the\n\t// namespace that the pod is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"default\"\n\tK8SNamespaceNameKey = attribute.Key(\"k8s.namespace.name\")\n\n\t// K8SNamespacePhaseKey is the attribute Key conforming to the\n\t// \"k8s.namespace.phase\" semantic conventions. It represents the phase of the\n\t// K8s namespace.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"active\", \"terminating\"\n\t// Note: This attribute aligns with the `phase` field of the\n\t// [K8s NamespaceStatus]\n\t//\n\t// [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core\n\tK8SNamespacePhaseKey = attribute.Key(\"k8s.namespace.phase\")\n\n\t// K8SNodeConditionStatusKey is the attribute Key conforming to the\n\t// \"k8s.node.condition.status\" semantic conventions. It represents the status of\n\t// the condition, one of True, False, Unknown.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"true\", \"false\", \"unknown\"\n\t// Note: This attribute aligns with the `status` field of the\n\t// [NodeCondition]\n\t//\n\t// [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core\n\tK8SNodeConditionStatusKey = attribute.Key(\"k8s.node.condition.status\")\n\n\t// K8SNodeConditionTypeKey is the attribute Key conforming to the\n\t// \"k8s.node.condition.type\" semantic conventions. It represents the condition\n\t// type of a K8s Node.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Ready\", \"DiskPressure\"\n\t// Note: K8s Node conditions as described\n\t// by [K8s documentation].\n\t//\n\t// This attribute aligns with the `type` field of the\n\t// [NodeCondition]\n\t//\n\t// The set of possible values is not limited to those listed here. Managed\n\t// Kubernetes environments,\n\t// or custom controllers MAY introduce additional node condition types.\n\t// When this occurs, the exact value as reported by the Kubernetes API SHOULD be\n\t// used.\n\t//\n\t// [K8s documentation]: https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition\n\t// [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core\n\tK8SNodeConditionTypeKey = attribute.Key(\"k8s.node.condition.type\")\n\n\t// K8SNodeNameKey is the attribute Key conforming to the \"k8s.node.name\"\n\t// semantic conventions. It represents the name of the Node.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"node-1\"\n\tK8SNodeNameKey = attribute.Key(\"k8s.node.name\")\n\n\t// K8SNodeUIDKey is the attribute Key conforming to the \"k8s.node.uid\" semantic\n\t// conventions. It represents the UID of the Node.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2\"\n\tK8SNodeUIDKey = attribute.Key(\"k8s.node.uid\")\n\n\t// K8SPodNameKey is the attribute Key conforming to the \"k8s.pod.name\" semantic\n\t// conventions. It represents the name of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-pod-autoconf\"\n\tK8SPodNameKey = attribute.Key(\"k8s.pod.name\")\n\n\t// K8SPodUIDKey is the attribute Key conforming to the \"k8s.pod.uid\" semantic\n\t// conventions. It represents the UID of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SPodUIDKey = attribute.Key(\"k8s.pod.uid\")\n\n\t// K8SReplicaSetNameKey is the attribute Key conforming to the\n\t// \"k8s.replicaset.name\" semantic conventions. It represents the name of the\n\t// ReplicaSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SReplicaSetNameKey = attribute.Key(\"k8s.replicaset.name\")\n\n\t// K8SReplicaSetUIDKey is the attribute Key conforming to the\n\t// \"k8s.replicaset.uid\" semantic conventions. It represents the UID of the\n\t// ReplicaSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SReplicaSetUIDKey = attribute.Key(\"k8s.replicaset.uid\")\n\n\t// K8SReplicationControllerNameKey is the attribute Key conforming to the\n\t// \"k8s.replicationcontroller.name\" semantic conventions. It represents the name\n\t// of the replication controller.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SReplicationControllerNameKey = attribute.Key(\"k8s.replicationcontroller.name\")\n\n\t// K8SReplicationControllerUIDKey is the attribute Key conforming to the\n\t// \"k8s.replicationcontroller.uid\" semantic conventions. It represents the UID\n\t// of the replication controller.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SReplicationControllerUIDKey = attribute.Key(\"k8s.replicationcontroller.uid\")\n\n\t// K8SResourceQuotaNameKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.name\" semantic conventions. It represents the name of the\n\t// resource quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SResourceQuotaNameKey = attribute.Key(\"k8s.resourcequota.name\")\n\n\t// K8SResourceQuotaResourceNameKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.resource_name\" semantic conventions. It represents the\n\t// name of the K8s resource a resource quota defines.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"count/replicationcontrollers\"\n\t// Note: The value for this attribute can be either the full\n\t// `count/<resource>[.<group>]` string (e.g., count/deployments.apps,\n\t// count/pods), or, for certain core Kubernetes resources, just the resource\n\t// name (e.g., pods, services, configmaps). Both forms are supported by\n\t// Kubernetes for object count quotas. See\n\t// [Kubernetes Resource Quotas documentation] for more details.\n\t//\n\t// [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota\n\tK8SResourceQuotaResourceNameKey = attribute.Key(\"k8s.resourcequota.resource_name\")\n\n\t// K8SResourceQuotaUIDKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.uid\" semantic conventions. It represents the UID of the\n\t// resource quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SResourceQuotaUIDKey = attribute.Key(\"k8s.resourcequota.uid\")\n\n\t// K8SStatefulSetNameKey is the attribute Key conforming to the\n\t// \"k8s.statefulset.name\" semantic conventions. It represents the name of the\n\t// StatefulSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SStatefulSetNameKey = attribute.Key(\"k8s.statefulset.name\")\n\n\t// K8SStatefulSetUIDKey is the attribute Key conforming to the\n\t// \"k8s.statefulset.uid\" semantic conventions. It represents the UID of the\n\t// StatefulSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SStatefulSetUIDKey = attribute.Key(\"k8s.statefulset.uid\")\n\n\t// K8SStorageclassNameKey is the attribute Key conforming to the\n\t// \"k8s.storageclass.name\" semantic conventions. It represents the name of K8s\n\t// [StorageClass] object.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"gold.storageclass.storage.k8s.io\"\n\t//\n\t// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io\n\tK8SStorageclassNameKey = attribute.Key(\"k8s.storageclass.name\")\n\n\t// K8SVolumeNameKey is the attribute Key conforming to the \"k8s.volume.name\"\n\t// semantic conventions. It represents the name of the K8s volume.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"volume0\"\n\tK8SVolumeNameKey = attribute.Key(\"k8s.volume.name\")\n\n\t// K8SVolumeTypeKey is the attribute Key conforming to the \"k8s.volume.type\"\n\t// semantic conventions. It represents the type of the K8s volume.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"emptyDir\", \"persistentVolumeClaim\"\n\tK8SVolumeTypeKey = attribute.Key(\"k8s.volume.type\")\n)\n\n// K8SClusterName returns an attribute KeyValue conforming to the\n// \"k8s.cluster.name\" semantic conventions. It represents the name of the\n// cluster.\nfunc K8SClusterName(val string) attribute.KeyValue {\n\treturn K8SClusterNameKey.String(val)\n}\n\n// K8SClusterUID returns an attribute KeyValue conforming to the\n// \"k8s.cluster.uid\" semantic conventions. It represents a pseudo-ID for the\n// cluster, set to the UID of the `kube-system` namespace.\nfunc K8SClusterUID(val string) attribute.KeyValue {\n\treturn K8SClusterUIDKey.String(val)\n}\n\n// K8SContainerName returns an attribute KeyValue conforming to the\n// \"k8s.container.name\" semantic conventions. It represents the name of the\n// Container from Pod specification, must be unique within a Pod. Container\n// runtime usually uses different globally unique name (`container.name`).\nfunc K8SContainerName(val string) attribute.KeyValue {\n\treturn K8SContainerNameKey.String(val)\n}\n\n// K8SContainerRestartCount returns an attribute KeyValue conforming to the\n// \"k8s.container.restart_count\" semantic conventions. It represents the number\n// of times the container was restarted. This attribute can be used to identify a\n// particular container (running or stopped) within a container spec.\nfunc K8SContainerRestartCount(val int) attribute.KeyValue {\n\treturn K8SContainerRestartCountKey.Int(val)\n}\n\n// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue\n// conforming to the \"k8s.container.status.last_terminated_reason\" semantic\n// conventions. It represents the last terminated reason of the Container.\nfunc K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {\n\treturn K8SContainerStatusLastTerminatedReasonKey.String(val)\n}\n\n// K8SCronJobAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.annotation\" semantic conventions. It represents the cronjob\n// annotation placed on the CronJob, the `<key>` being the annotation name, the\n// value being the annotation value.\nfunc K8SCronJobAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.cronjob.annotation.\"+key, val)\n}\n\n// K8SCronJobLabel returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.label\" semantic conventions. It represents the label placed on\n// the CronJob, the `<key>` being the label name, the value being the label\n// value.\nfunc K8SCronJobLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.cronjob.label.\"+key, val)\n}\n\n// K8SCronJobName returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.name\" semantic conventions. It represents the name of the\n// CronJob.\nfunc K8SCronJobName(val string) attribute.KeyValue {\n\treturn K8SCronJobNameKey.String(val)\n}\n\n// K8SCronJobUID returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.uid\" semantic conventions. It represents the UID of the CronJob.\nfunc K8SCronJobUID(val string) attribute.KeyValue {\n\treturn K8SCronJobUIDKey.String(val)\n}\n\n// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.annotation\" semantic conventions. It represents the annotation\n// placed on the DaemonSet, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.daemonset.annotation.\"+key, val)\n}\n\n// K8SDaemonSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.label\" semantic conventions. It represents the label placed on\n// the DaemonSet, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SDaemonSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.daemonset.label.\"+key, val)\n}\n\n// K8SDaemonSetName returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.name\" semantic conventions. It represents the name of the\n// DaemonSet.\nfunc K8SDaemonSetName(val string) attribute.KeyValue {\n\treturn K8SDaemonSetNameKey.String(val)\n}\n\n// K8SDaemonSetUID returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.uid\" semantic conventions. It represents the UID of the\n// DaemonSet.\nfunc K8SDaemonSetUID(val string) attribute.KeyValue {\n\treturn K8SDaemonSetUIDKey.String(val)\n}\n\n// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.deployment.annotation\" semantic conventions. It represents the annotation\n// placed on the Deployment, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SDeploymentAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.deployment.annotation.\"+key, val)\n}\n\n// K8SDeploymentLabel returns an attribute KeyValue conforming to the\n// \"k8s.deployment.label\" semantic conventions. It represents the label placed on\n// the Deployment, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SDeploymentLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.deployment.label.\"+key, val)\n}\n\n// K8SDeploymentName returns an attribute KeyValue conforming to the\n// \"k8s.deployment.name\" semantic conventions. It represents the name of the\n// Deployment.\nfunc K8SDeploymentName(val string) attribute.KeyValue {\n\treturn K8SDeploymentNameKey.String(val)\n}\n\n// K8SDeploymentUID returns an attribute KeyValue conforming to the\n// \"k8s.deployment.uid\" semantic conventions. It represents the UID of the\n// Deployment.\nfunc K8SDeploymentUID(val string) attribute.KeyValue {\n\treturn K8SDeploymentUIDKey.String(val)\n}\n\n// K8SHPAMetricType returns an attribute KeyValue conforming to the\n// \"k8s.hpa.metric.type\" semantic conventions. It represents the type of metric\n// source for the horizontal pod autoscaler.\nfunc K8SHPAMetricType(val string) attribute.KeyValue {\n\treturn K8SHPAMetricTypeKey.String(val)\n}\n\n// K8SHPAName returns an attribute KeyValue conforming to the \"k8s.hpa.name\"\n// semantic conventions. It represents the name of the horizontal pod autoscaler.\nfunc K8SHPAName(val string) attribute.KeyValue {\n\treturn K8SHPANameKey.String(val)\n}\n\n// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.api_version\" semantic conventions. It represents the\n// API version of the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefAPIVersionKey.String(val)\n}\n\n// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.kind\" semantic conventions. It represents the kind of\n// the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefKind(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefKindKey.String(val)\n}\n\n// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.name\" semantic conventions. It represents the name of\n// the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefName(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefNameKey.String(val)\n}\n\n// K8SHPAUID returns an attribute KeyValue conforming to the \"k8s.hpa.uid\"\n// semantic conventions. It represents the UID of the horizontal pod autoscaler.\nfunc K8SHPAUID(val string) attribute.KeyValue {\n\treturn K8SHPAUIDKey.String(val)\n}\n\n// K8SHugepageSize returns an attribute KeyValue conforming to the\n// \"k8s.hugepage.size\" semantic conventions. It represents the size (identifier)\n// of the K8s huge page.\nfunc K8SHugepageSize(val string) attribute.KeyValue {\n\treturn K8SHugepageSizeKey.String(val)\n}\n\n// K8SJobAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.job.annotation\" semantic conventions. It represents the annotation placed\n// on the Job, the `<key>` being the annotation name, the value being the\n// annotation value, even if the value is empty.\nfunc K8SJobAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.job.annotation.\"+key, val)\n}\n\n// K8SJobLabel returns an attribute KeyValue conforming to the \"k8s.job.label\"\n// semantic conventions. It represents the label placed on the Job, the `<key>`\n// being the label name, the value being the label value, even if the value is\n// empty.\nfunc K8SJobLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.job.label.\"+key, val)\n}\n\n// K8SJobName returns an attribute KeyValue conforming to the \"k8s.job.name\"\n// semantic conventions. It represents the name of the Job.\nfunc K8SJobName(val string) attribute.KeyValue {\n\treturn K8SJobNameKey.String(val)\n}\n\n// K8SJobUID returns an attribute KeyValue conforming to the \"k8s.job.uid\"\n// semantic conventions. It represents the UID of the Job.\nfunc K8SJobUID(val string) attribute.KeyValue {\n\treturn K8SJobUIDKey.String(val)\n}\n\n// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.namespace.annotation\" semantic conventions. It represents the annotation\n// placed on the Namespace, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SNamespaceAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.namespace.annotation.\"+key, val)\n}\n\n// K8SNamespaceLabel returns an attribute KeyValue conforming to the\n// \"k8s.namespace.label\" semantic conventions. It represents the label placed on\n// the Namespace, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SNamespaceLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.namespace.label.\"+key, val)\n}\n\n// K8SNamespaceName returns an attribute KeyValue conforming to the\n// \"k8s.namespace.name\" semantic conventions. It represents the name of the\n// namespace that the pod is running in.\nfunc K8SNamespaceName(val string) attribute.KeyValue {\n\treturn K8SNamespaceNameKey.String(val)\n}\n\n// K8SNodeAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.node.annotation\" semantic conventions. It represents the annotation\n// placed on the Node, the `<key>` being the annotation name, the value being the\n// annotation value, even if the value is empty.\nfunc K8SNodeAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.node.annotation.\"+key, val)\n}\n\n// K8SNodeLabel returns an attribute KeyValue conforming to the \"k8s.node.label\"\n// semantic conventions. It represents the label placed on the Node, the `<key>`\n// being the label name, the value being the label value, even if the value is\n// empty.\nfunc K8SNodeLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.node.label.\"+key, val)\n}\n\n// K8SNodeName returns an attribute KeyValue conforming to the \"k8s.node.name\"\n// semantic conventions. It represents the name of the Node.\nfunc K8SNodeName(val string) attribute.KeyValue {\n\treturn K8SNodeNameKey.String(val)\n}\n\n// K8SNodeUID returns an attribute KeyValue conforming to the \"k8s.node.uid\"\n// semantic conventions. It represents the UID of the Node.\nfunc K8SNodeUID(val string) attribute.KeyValue {\n\treturn K8SNodeUIDKey.String(val)\n}\n\n// K8SPodAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.pod.annotation\" semantic conventions. It represents the annotation placed\n// on the Pod, the `<key>` being the annotation name, the value being the\n// annotation value.\nfunc K8SPodAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.pod.annotation.\"+key, val)\n}\n\n// K8SPodLabel returns an attribute KeyValue conforming to the \"k8s.pod.label\"\n// semantic conventions. It represents the label placed on the Pod, the `<key>`\n// being the label name, the value being the label value.\nfunc K8SPodLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.pod.label.\"+key, val)\n}\n\n// K8SPodName returns an attribute KeyValue conforming to the \"k8s.pod.name\"\n// semantic conventions. It represents the name of the Pod.\nfunc K8SPodName(val string) attribute.KeyValue {\n\treturn K8SPodNameKey.String(val)\n}\n\n// K8SPodUID returns an attribute KeyValue conforming to the \"k8s.pod.uid\"\n// semantic conventions. It represents the UID of the Pod.\nfunc K8SPodUID(val string) attribute.KeyValue {\n\treturn K8SPodUIDKey.String(val)\n}\n\n// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.annotation\" semantic conventions. It represents the annotation\n// placed on the ReplicaSet, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.replicaset.annotation.\"+key, val)\n}\n\n// K8SReplicaSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.label\" semantic conventions. It represents the label placed on\n// the ReplicaSet, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SReplicaSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.replicaset.label.\"+key, val)\n}\n\n// K8SReplicaSetName returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.name\" semantic conventions. It represents the name of the\n// ReplicaSet.\nfunc K8SReplicaSetName(val string) attribute.KeyValue {\n\treturn K8SReplicaSetNameKey.String(val)\n}\n\n// K8SReplicaSetUID returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.uid\" semantic conventions. It represents the UID of the\n// ReplicaSet.\nfunc K8SReplicaSetUID(val string) attribute.KeyValue {\n\treturn K8SReplicaSetUIDKey.String(val)\n}\n\n// K8SReplicationControllerName returns an attribute KeyValue conforming to the\n// \"k8s.replicationcontroller.name\" semantic conventions. It represents the name\n// of the replication controller.\nfunc K8SReplicationControllerName(val string) attribute.KeyValue {\n\treturn K8SReplicationControllerNameKey.String(val)\n}\n\n// K8SReplicationControllerUID returns an attribute KeyValue conforming to the\n// \"k8s.replicationcontroller.uid\" semantic conventions. It represents the UID of\n// the replication controller.\nfunc K8SReplicationControllerUID(val string) attribute.KeyValue {\n\treturn K8SReplicationControllerUIDKey.String(val)\n}\n\n// K8SResourceQuotaName returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.name\" semantic conventions. It represents the name of the\n// resource quota.\nfunc K8SResourceQuotaName(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaNameKey.String(val)\n}\n\n// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.resource_name\" semantic conventions. It represents the name\n// of the K8s resource a resource quota defines.\nfunc K8SResourceQuotaResourceName(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaResourceNameKey.String(val)\n}\n\n// K8SResourceQuotaUID returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.uid\" semantic conventions. It represents the UID of the\n// resource quota.\nfunc K8SResourceQuotaUID(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaUIDKey.String(val)\n}\n\n// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.annotation\" semantic conventions. It represents the\n// annotation placed on the StatefulSet, the `<key>` being the annotation name,\n// the value being the annotation value, even if the value is empty.\nfunc K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.statefulset.annotation.\"+key, val)\n}\n\n// K8SStatefulSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.label\" semantic conventions. It represents the label placed\n// on the StatefulSet, the `<key>` being the label name, the value being the\n// label value, even if the value is empty.\nfunc K8SStatefulSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.statefulset.label.\"+key, val)\n}\n\n// K8SStatefulSetName returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.name\" semantic conventions. It represents the name of the\n// StatefulSet.\nfunc K8SStatefulSetName(val string) attribute.KeyValue {\n\treturn K8SStatefulSetNameKey.String(val)\n}\n\n// K8SStatefulSetUID returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.uid\" semantic conventions. It represents the UID of the\n// StatefulSet.\nfunc K8SStatefulSetUID(val string) attribute.KeyValue {\n\treturn K8SStatefulSetUIDKey.String(val)\n}\n\n// K8SStorageclassName returns an attribute KeyValue conforming to the\n// \"k8s.storageclass.name\" semantic conventions. It represents the name of K8s\n// [StorageClass] object.\n//\n// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io\nfunc K8SStorageclassName(val string) attribute.KeyValue {\n\treturn K8SStorageclassNameKey.String(val)\n}\n\n// K8SVolumeName returns an attribute KeyValue conforming to the\n// \"k8s.volume.name\" semantic conventions. It represents the name of the K8s\n// volume.\nfunc K8SVolumeName(val string) attribute.KeyValue {\n\treturn K8SVolumeNameKey.String(val)\n}\n\n// Enum values for k8s.container.status.reason\nvar (\n\t// The container is being created.\n\t// Stability: development\n\tK8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String(\"ContainerCreating\")\n\t// The container is in a crash loop back off state.\n\t// Stability: development\n\tK8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String(\"CrashLoopBackOff\")\n\t// There was an error creating the container configuration.\n\t// Stability: development\n\tK8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String(\"CreateContainerConfigError\")\n\t// There was an error pulling the container image.\n\t// Stability: development\n\tK8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String(\"ErrImagePull\")\n\t// The container image pull is in back off state.\n\t// Stability: development\n\tK8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String(\"ImagePullBackOff\")\n\t// The container was killed due to out of memory.\n\t// Stability: development\n\tK8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String(\"OOMKilled\")\n\t// The container has completed execution.\n\t// Stability: development\n\tK8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String(\"Completed\")\n\t// There was an error with the container.\n\t// Stability: development\n\tK8SContainerStatusReasonError = K8SContainerStatusReasonKey.String(\"Error\")\n\t// The container cannot run.\n\t// Stability: development\n\tK8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String(\"ContainerCannotRun\")\n)\n\n// Enum values for k8s.container.status.state\nvar (\n\t// The container has terminated.\n\t// Stability: development\n\tK8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String(\"terminated\")\n\t// The container is running.\n\t// Stability: development\n\tK8SContainerStatusStateRunning = K8SContainerStatusStateKey.String(\"running\")\n\t// The container is waiting.\n\t// Stability: development\n\tK8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String(\"waiting\")\n)\n\n// Enum values for k8s.namespace.phase\nvar (\n\t// Active namespace phase as described by [K8s API]\n\t// Stability: development\n\t//\n\t// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase\n\tK8SNamespacePhaseActive = K8SNamespacePhaseKey.String(\"active\")\n\t// Terminating namespace phase as described by [K8s API]\n\t// Stability: development\n\t//\n\t// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase\n\tK8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String(\"terminating\")\n)\n\n// Enum values for k8s.node.condition.status\nvar (\n\t// condition_true\n\t// Stability: development\n\tK8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String(\"true\")\n\t// condition_false\n\t// Stability: development\n\tK8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String(\"false\")\n\t// condition_unknown\n\t// Stability: development\n\tK8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String(\"unknown\")\n)\n\n// Enum values for k8s.node.condition.type\nvar (\n\t// The node is healthy and ready to accept pods\n\t// Stability: development\n\tK8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String(\"Ready\")\n\t// Pressure exists on the disk size—that is, if the disk capacity is low\n\t// Stability: development\n\tK8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String(\"DiskPressure\")\n\t// Pressure exists on the node memory—that is, if the node memory is low\n\t// Stability: development\n\tK8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String(\"MemoryPressure\")\n\t// Pressure exists on the processes—that is, if there are too many processes\n\t// on the node\n\t// Stability: development\n\tK8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String(\"PIDPressure\")\n\t// The network for the node is not correctly configured\n\t// Stability: development\n\tK8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String(\"NetworkUnavailable\")\n)\n\n// Enum values for k8s.volume.type\nvar (\n\t// A [persistentVolumeClaim] volume\n\t// Stability: development\n\t//\n\t// [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim\n\tK8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String(\"persistentVolumeClaim\")\n\t// A [configMap] volume\n\t// Stability: development\n\t//\n\t// [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap\n\tK8SVolumeTypeConfigMap = K8SVolumeTypeKey.String(\"configMap\")\n\t// A [downwardAPI] volume\n\t// Stability: development\n\t//\n\t// [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi\n\tK8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String(\"downwardAPI\")\n\t// An [emptyDir] volume\n\t// Stability: development\n\t//\n\t// [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir\n\tK8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String(\"emptyDir\")\n\t// A [secret] volume\n\t// Stability: development\n\t//\n\t// [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret\n\tK8SVolumeTypeSecret = K8SVolumeTypeKey.String(\"secret\")\n\t// A [local] volume\n\t// Stability: development\n\t//\n\t// [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local\n\tK8SVolumeTypeLocal = K8SVolumeTypeKey.String(\"local\")\n)\n\n// Namespace: linux\nconst (\n\t// LinuxMemorySlabStateKey is the attribute Key conforming to the\n\t// \"linux.memory.slab.state\" semantic conventions. It represents the Linux Slab\n\t// memory state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"reclaimable\", \"unreclaimable\"\n\tLinuxMemorySlabStateKey = attribute.Key(\"linux.memory.slab.state\")\n)\n\n// Enum values for linux.memory.slab.state\nvar (\n\t// reclaimable\n\t// Stability: development\n\tLinuxMemorySlabStateReclaimable = LinuxMemorySlabStateKey.String(\"reclaimable\")\n\t// unreclaimable\n\t// Stability: development\n\tLinuxMemorySlabStateUnreclaimable = LinuxMemorySlabStateKey.String(\"unreclaimable\")\n)\n\n// Namespace: log\nconst (\n\t// LogFileNameKey is the attribute Key conforming to the \"log.file.name\"\n\t// semantic conventions. It represents the basename of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"audit.log\"\n\tLogFileNameKey = attribute.Key(\"log.file.name\")\n\n\t// LogFileNameResolvedKey is the attribute Key conforming to the\n\t// \"log.file.name_resolved\" semantic conventions. It represents the basename of\n\t// the file, with symlinks resolved.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"uuid.log\"\n\tLogFileNameResolvedKey = attribute.Key(\"log.file.name_resolved\")\n\n\t// LogFilePathKey is the attribute Key conforming to the \"log.file.path\"\n\t// semantic conventions. It represents the full path to the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/var/log/mysql/audit.log\"\n\tLogFilePathKey = attribute.Key(\"log.file.path\")\n\n\t// LogFilePathResolvedKey is the attribute Key conforming to the\n\t// \"log.file.path_resolved\" semantic conventions. It represents the full path to\n\t// the file, with symlinks resolved.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/var/lib/docker/uuid.log\"\n\tLogFilePathResolvedKey = attribute.Key(\"log.file.path_resolved\")\n\n\t// LogIostreamKey is the attribute Key conforming to the \"log.iostream\" semantic\n\t// conventions. It represents the stream associated with the log. See below for\n\t// a list of well-known values.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tLogIostreamKey = attribute.Key(\"log.iostream\")\n\n\t// LogRecordOriginalKey is the attribute Key conforming to the\n\t// \"log.record.original\" semantic conventions. It represents the complete\n\t// original Log Record.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - -\n\t// Something happened\", \"[INFO] 8/3/24 12:34:56 Something happened\"\n\t// Note: This value MAY be added when processing a Log Record which was\n\t// originally transmitted as a string or equivalent data type AND the Body field\n\t// of the Log Record does not contain the same value. (e.g. a syslog or a log\n\t// record read from a file.)\n\tLogRecordOriginalKey = attribute.Key(\"log.record.original\")\n\n\t// LogRecordUIDKey is the attribute Key conforming to the \"log.record.uid\"\n\t// semantic conventions. It represents a unique identifier for the Log Record.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"01ARZ3NDEKTSV4RRFFQ69G5FAV\"\n\t// Note: If an id is provided, other log records with the same id will be\n\t// considered duplicates and can be removed safely. This means, that two\n\t// distinguishable log records MUST have different values.\n\t// The id MAY be an\n\t// [Universally Unique Lexicographically Sortable Identifier (ULID)], but other\n\t// identifiers (e.g. UUID) may be used as needed.\n\t//\n\t// [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec\n\tLogRecordUIDKey = attribute.Key(\"log.record.uid\")\n)\n\n// LogFileName returns an attribute KeyValue conforming to the \"log.file.name\"\n// semantic conventions. It represents the basename of the file.\nfunc LogFileName(val string) attribute.KeyValue {\n\treturn LogFileNameKey.String(val)\n}\n\n// LogFileNameResolved returns an attribute KeyValue conforming to the\n// \"log.file.name_resolved\" semantic conventions. It represents the basename of\n// the file, with symlinks resolved.\nfunc LogFileNameResolved(val string) attribute.KeyValue {\n\treturn LogFileNameResolvedKey.String(val)\n}\n\n// LogFilePath returns an attribute KeyValue conforming to the \"log.file.path\"\n// semantic conventions. It represents the full path to the file.\nfunc LogFilePath(val string) attribute.KeyValue {\n\treturn LogFilePathKey.String(val)\n}\n\n// LogFilePathResolved returns an attribute KeyValue conforming to the\n// \"log.file.path_resolved\" semantic conventions. It represents the full path to\n// the file, with symlinks resolved.\nfunc LogFilePathResolved(val string) attribute.KeyValue {\n\treturn LogFilePathResolvedKey.String(val)\n}\n\n// LogRecordOriginal returns an attribute KeyValue conforming to the\n// \"log.record.original\" semantic conventions. It represents the complete\n// original Log Record.\nfunc LogRecordOriginal(val string) attribute.KeyValue {\n\treturn LogRecordOriginalKey.String(val)\n}\n\n// LogRecordUID returns an attribute KeyValue conforming to the \"log.record.uid\"\n// semantic conventions. It represents a unique identifier for the Log Record.\nfunc LogRecordUID(val string) attribute.KeyValue {\n\treturn LogRecordUIDKey.String(val)\n}\n\n// Enum values for log.iostream\nvar (\n\t// Logs from stdout stream\n\t// Stability: development\n\tLogIostreamStdout = LogIostreamKey.String(\"stdout\")\n\t// Events from stderr stream\n\t// Stability: development\n\tLogIostreamStderr = LogIostreamKey.String(\"stderr\")\n)\n\n// Namespace: mainframe\nconst (\n\t// MainframeLparNameKey is the attribute Key conforming to the\n\t// \"mainframe.lpar.name\" semantic conventions. It represents the name of the\n\t// logical partition that hosts a systems with a mainframe operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"LPAR01\"\n\tMainframeLparNameKey = attribute.Key(\"mainframe.lpar.name\")\n)\n\n// MainframeLparName returns an attribute KeyValue conforming to the\n// \"mainframe.lpar.name\" semantic conventions. It represents the name of the\n// logical partition that hosts a systems with a mainframe operating system.\nfunc MainframeLparName(val string) attribute.KeyValue {\n\treturn MainframeLparNameKey.String(val)\n}\n\n// Namespace: messaging\nconst (\n\t// MessagingBatchMessageCountKey is the attribute Key conforming to the\n\t// \"messaging.batch.message_count\" semantic conventions. It represents the\n\t// number of messages sent, received, or processed in the scope of the batching\n\t// operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 1, 2\n\t// Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on\n\t// spans that operate with a single message. When a messaging client library\n\t// supports both batch and single-message API for the same operation,\n\t// instrumentations SHOULD use `messaging.batch.message_count` for batching APIs\n\t// and SHOULD NOT use it for single-message APIs.\n\tMessagingBatchMessageCountKey = attribute.Key(\"messaging.batch.message_count\")\n\n\t// MessagingClientIDKey is the attribute Key conforming to the\n\t// \"messaging.client.id\" semantic conventions. It represents a unique identifier\n\t// for the client that consumes or produces a message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"client-5\", \"myhost@8742@s8083jm\"\n\tMessagingClientIDKey = attribute.Key(\"messaging.client.id\")\n\n\t// MessagingConsumerGroupNameKey is the attribute Key conforming to the\n\t// \"messaging.consumer.group.name\" semantic conventions. It represents the name\n\t// of the consumer group with which a consumer is associated.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-group\", \"indexer\"\n\t// Note: Semantic conventions for individual messaging systems SHOULD document\n\t// whether `messaging.consumer.group.name` is applicable and what it means in\n\t// the context of that system.\n\tMessagingConsumerGroupNameKey = attribute.Key(\"messaging.consumer.group.name\")\n\n\t// MessagingDestinationAnonymousKey is the attribute Key conforming to the\n\t// \"messaging.destination.anonymous\" semantic conventions. It represents a\n\t// boolean that is true if the message destination is anonymous (could be\n\t// unnamed or have auto-generated name).\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingDestinationAnonymousKey = attribute.Key(\"messaging.destination.anonymous\")\n\n\t// MessagingDestinationNameKey is the attribute Key conforming to the\n\t// \"messaging.destination.name\" semantic conventions. It represents the message\n\t// destination name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MyQueue\", \"MyTopic\"\n\t// Note: Destination name SHOULD uniquely identify a specific queue, topic or\n\t// other entity within the broker. If\n\t// the broker doesn't have such notion, the destination name SHOULD uniquely\n\t// identify the broker.\n\tMessagingDestinationNameKey = attribute.Key(\"messaging.destination.name\")\n\n\t// MessagingDestinationPartitionIDKey is the attribute Key conforming to the\n\t// \"messaging.destination.partition.id\" semantic conventions. It represents the\n\t// identifier of the partition messages are sent to or received from, unique\n\t// within the `messaging.destination.name`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1\n\tMessagingDestinationPartitionIDKey = attribute.Key(\"messaging.destination.partition.id\")\n\n\t// MessagingDestinationSubscriptionNameKey is the attribute Key conforming to\n\t// the \"messaging.destination.subscription.name\" semantic conventions. It\n\t// represents the name of the destination subscription from which a message is\n\t// consumed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"subscription-a\"\n\t// Note: Semantic conventions for individual messaging systems SHOULD document\n\t// whether `messaging.destination.subscription.name` is applicable and what it\n\t// means in the context of that system.\n\tMessagingDestinationSubscriptionNameKey = attribute.Key(\"messaging.destination.subscription.name\")\n\n\t// MessagingDestinationTemplateKey is the attribute Key conforming to the\n\t// \"messaging.destination.template\" semantic conventions. It represents the low\n\t// cardinality representation of the messaging destination name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/customers/{customerId}\"\n\t// Note: Destination names could be constructed from templates. An example would\n\t// be a destination name involving a user name or product id. Although the\n\t// destination name in this case is of high cardinality, the underlying template\n\t// is of low cardinality and can be effectively used for grouping and\n\t// aggregation.\n\tMessagingDestinationTemplateKey = attribute.Key(\"messaging.destination.template\")\n\n\t// MessagingDestinationTemporaryKey is the attribute Key conforming to the\n\t// \"messaging.destination.temporary\" semantic conventions. It represents a\n\t// boolean that is true if the message destination is temporary and might not\n\t// exist anymore after messages are processed.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingDestinationTemporaryKey = attribute.Key(\"messaging.destination.temporary\")\n\n\t// MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to\n\t// the \"messaging.eventhubs.message.enqueued_time\" semantic conventions. It\n\t// represents the UTC epoch seconds at which the message has been accepted and\n\t// stored in the entity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingEventHubsMessageEnqueuedTimeKey = attribute.Key(\"messaging.eventhubs.message.enqueued_time\")\n\n\t// MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to\n\t// the \"messaging.gcp_pubsub.message.ack_deadline\" semantic conventions. It\n\t// represents the ack deadline in seconds set for the modify ack deadline\n\t// request.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingGCPPubSubMessageAckDeadlineKey = attribute.Key(\"messaging.gcp_pubsub.message.ack_deadline\")\n\n\t// MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the\n\t// \"messaging.gcp_pubsub.message.ack_id\" semantic conventions. It represents the\n\t// ack id for a given message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: ack_id\n\tMessagingGCPPubSubMessageAckIDKey = attribute.Key(\"messaging.gcp_pubsub.message.ack_id\")\n\n\t// MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming\n\t// to the \"messaging.gcp_pubsub.message.delivery_attempt\" semantic conventions.\n\t// It represents the delivery attempt for a given message.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key(\"messaging.gcp_pubsub.message.delivery_attempt\")\n\n\t// MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to\n\t// the \"messaging.gcp_pubsub.message.ordering_key\" semantic conventions. It\n\t// represents the ordering key for a given message. If the attribute is not\n\t// present, the message does not have an ordering key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: ordering_key\n\tMessagingGCPPubSubMessageOrderingKeyKey = attribute.Key(\"messaging.gcp_pubsub.message.ordering_key\")\n\n\t// MessagingKafkaMessageKeyKey is the attribute Key conforming to the\n\t// \"messaging.kafka.message.key\" semantic conventions. It represents the message\n\t// keys in Kafka are used for grouping alike messages to ensure they're\n\t// processed on the same partition. They differ from `messaging.message.id` in\n\t// that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myKey\n\t// Note: If the key type is not string, it's string representation has to be\n\t// supplied for the attribute. If the key has no unambiguous, canonical string\n\t// form, don't include its value.\n\tMessagingKafkaMessageKeyKey = attribute.Key(\"messaging.kafka.message.key\")\n\n\t// MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the\n\t// \"messaging.kafka.message.tombstone\" semantic conventions. It represents a\n\t// boolean that is true if the message is a tombstone.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingKafkaMessageTombstoneKey = attribute.Key(\"messaging.kafka.message.tombstone\")\n\n\t// MessagingKafkaOffsetKey is the attribute Key conforming to the\n\t// \"messaging.kafka.offset\" semantic conventions. It represents the offset of a\n\t// record in the corresponding Kafka partition.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingKafkaOffsetKey = attribute.Key(\"messaging.kafka.offset\")\n\n\t// MessagingMessageBodySizeKey is the attribute Key conforming to the\n\t// \"messaging.message.body.size\" semantic conventions. It represents the size of\n\t// the message body in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: This can refer to both the compressed or uncompressed body size. If\n\t// both sizes are known, the uncompressed\n\t// body size should be used.\n\tMessagingMessageBodySizeKey = attribute.Key(\"messaging.message.body.size\")\n\n\t// MessagingMessageConversationIDKey is the attribute Key conforming to the\n\t// \"messaging.message.conversation_id\" semantic conventions. It represents the\n\t// conversation ID identifying the conversation to which the message belongs,\n\t// represented as a string. Sometimes called \"Correlation ID\".\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: MyConversationId\n\tMessagingMessageConversationIDKey = attribute.Key(\"messaging.message.conversation_id\")\n\n\t// MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the\n\t// \"messaging.message.envelope.size\" semantic conventions. It represents the\n\t// size of the message body and metadata in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: This can refer to both the compressed or uncompressed size. If both\n\t// sizes are known, the uncompressed\n\t// size should be used.\n\tMessagingMessageEnvelopeSizeKey = attribute.Key(\"messaging.message.envelope.size\")\n\n\t// MessagingMessageIDKey is the attribute Key conforming to the\n\t// \"messaging.message.id\" semantic conventions. It represents a value used by\n\t// the messaging system as an identifier for the message, represented as a\n\t// string.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 452a7c7c7c7048c2f887f61572b18fc2\n\tMessagingMessageIDKey = attribute.Key(\"messaging.message.id\")\n\n\t// MessagingOperationNameKey is the attribute Key conforming to the\n\t// \"messaging.operation.name\" semantic conventions. It represents the\n\t// system-specific name of the messaging operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ack\", \"nack\", \"send\"\n\tMessagingOperationNameKey = attribute.Key(\"messaging.operation.name\")\n\n\t// MessagingOperationTypeKey is the attribute Key conforming to the\n\t// \"messaging.operation.type\" semantic conventions. It represents a string\n\t// identifying the type of the messaging operation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: If a custom value is used, it MUST be of low cardinality.\n\tMessagingOperationTypeKey = attribute.Key(\"messaging.operation.type\")\n\n\t// MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to\n\t// the \"messaging.rabbitmq.destination.routing_key\" semantic conventions. It\n\t// represents the rabbitMQ message routing key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myKey\n\tMessagingRabbitMQDestinationRoutingKeyKey = attribute.Key(\"messaging.rabbitmq.destination.routing_key\")\n\n\t// MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the\n\t// \"messaging.rabbitmq.message.delivery_tag\" semantic conventions. It represents\n\t// the rabbitMQ message delivery tag.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRabbitMQMessageDeliveryTagKey = attribute.Key(\"messaging.rabbitmq.message.delivery_tag\")\n\n\t// MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.consumption_model\" semantic conventions. It represents\n\t// the model of message consumption. This only applies to consumer spans.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingRocketMQConsumptionModelKey = attribute.Key(\"messaging.rocketmq.consumption_model\")\n\n\t// MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to\n\t// the \"messaging.rocketmq.message.delay_time_level\" semantic conventions. It\n\t// represents the delay time level for delay message, which determines the\n\t// message delay time.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRocketMQMessageDelayTimeLevelKey = attribute.Key(\"messaging.rocketmq.message.delay_time_level\")\n\n\t// MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming\n\t// to the \"messaging.rocketmq.message.delivery_timestamp\" semantic conventions.\n\t// It represents the timestamp in milliseconds that the delay message is\n\t// expected to be delivered to consumer.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRocketMQMessageDeliveryTimestampKey = attribute.Key(\"messaging.rocketmq.message.delivery_timestamp\")\n\n\t// MessagingRocketMQMessageGroupKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.group\" semantic conventions. It represents the it\n\t// is essential for FIFO message. Messages that belong to the same message group\n\t// are always processed one by one within the same consumer group.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myMessageGroup\n\tMessagingRocketMQMessageGroupKey = attribute.Key(\"messaging.rocketmq.message.group\")\n\n\t// MessagingRocketMQMessageKeysKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.keys\" semantic conventions. It represents the\n\t// key(s) of message, another way to mark message besides message id.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"keyA\", \"keyB\"\n\tMessagingRocketMQMessageKeysKey = attribute.Key(\"messaging.rocketmq.message.keys\")\n\n\t// MessagingRocketMQMessageTagKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.tag\" semantic conventions. It represents the\n\t// secondary classifier of message besides topic.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: tagA\n\tMessagingRocketMQMessageTagKey = attribute.Key(\"messaging.rocketmq.message.tag\")\n\n\t// MessagingRocketMQMessageTypeKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.type\" semantic conventions. It represents the\n\t// type of message.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingRocketMQMessageTypeKey = attribute.Key(\"messaging.rocketmq.message.type\")\n\n\t// MessagingRocketMQNamespaceKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.namespace\" semantic conventions. It represents the\n\t// namespace of RocketMQ resources, resources in different namespaces are\n\t// individual.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myNamespace\n\tMessagingRocketMQNamespaceKey = attribute.Key(\"messaging.rocketmq.namespace\")\n\n\t// MessagingServiceBusDispositionStatusKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.disposition_status\" semantic conventions. It\n\t// represents the describes the [settlement type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n\tMessagingServiceBusDispositionStatusKey = attribute.Key(\"messaging.servicebus.disposition_status\")\n\n\t// MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.message.delivery_count\" semantic conventions. It\n\t// represents the number of deliveries that have been attempted for this\n\t// message.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingServiceBusMessageDeliveryCountKey = attribute.Key(\"messaging.servicebus.message.delivery_count\")\n\n\t// MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.message.enqueued_time\" semantic conventions. It\n\t// represents the UTC epoch seconds at which the message has been accepted and\n\t// stored in the entity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingServiceBusMessageEnqueuedTimeKey = attribute.Key(\"messaging.servicebus.message.enqueued_time\")\n\n\t// MessagingSystemKey is the attribute Key conforming to the \"messaging.system\"\n\t// semantic conventions. It represents the messaging system as identified by the\n\t// client instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The actual messaging system may differ from the one known by the\n\t// client. For example, when using Kafka client libraries to communicate with\n\t// Azure Event Hubs, the `messaging.system` is set to `kafka` based on the\n\t// instrumentation's best knowledge.\n\tMessagingSystemKey = attribute.Key(\"messaging.system\")\n)\n\n// MessagingBatchMessageCount returns an attribute KeyValue conforming to the\n// \"messaging.batch.message_count\" semantic conventions. It represents the number\n// of messages sent, received, or processed in the scope of the batching\n// operation.\nfunc MessagingBatchMessageCount(val int) attribute.KeyValue {\n\treturn MessagingBatchMessageCountKey.Int(val)\n}\n\n// MessagingClientID returns an attribute KeyValue conforming to the\n// \"messaging.client.id\" semantic conventions. It represents a unique identifier\n// for the client that consumes or produces a message.\nfunc MessagingClientID(val string) attribute.KeyValue {\n\treturn MessagingClientIDKey.String(val)\n}\n\n// MessagingConsumerGroupName returns an attribute KeyValue conforming to the\n// \"messaging.consumer.group.name\" semantic conventions. It represents the name\n// of the consumer group with which a consumer is associated.\nfunc MessagingConsumerGroupName(val string) attribute.KeyValue {\n\treturn MessagingConsumerGroupNameKey.String(val)\n}\n\n// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the\n// \"messaging.destination.anonymous\" semantic conventions. It represents a\n// boolean that is true if the message destination is anonymous (could be unnamed\n// or have auto-generated name).\nfunc MessagingDestinationAnonymous(val bool) attribute.KeyValue {\n\treturn MessagingDestinationAnonymousKey.Bool(val)\n}\n\n// MessagingDestinationName returns an attribute KeyValue conforming to the\n// \"messaging.destination.name\" semantic conventions. It represents the message\n// destination name.\nfunc MessagingDestinationName(val string) attribute.KeyValue {\n\treturn MessagingDestinationNameKey.String(val)\n}\n\n// MessagingDestinationPartitionID returns an attribute KeyValue conforming to\n// the \"messaging.destination.partition.id\" semantic conventions. It represents\n// the identifier of the partition messages are sent to or received from, unique\n// within the `messaging.destination.name`.\nfunc MessagingDestinationPartitionID(val string) attribute.KeyValue {\n\treturn MessagingDestinationPartitionIDKey.String(val)\n}\n\n// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming\n// to the \"messaging.destination.subscription.name\" semantic conventions. It\n// represents the name of the destination subscription from which a message is\n// consumed.\nfunc MessagingDestinationSubscriptionName(val string) attribute.KeyValue {\n\treturn MessagingDestinationSubscriptionNameKey.String(val)\n}\n\n// MessagingDestinationTemplate returns an attribute KeyValue conforming to the\n// \"messaging.destination.template\" semantic conventions. It represents the low\n// cardinality representation of the messaging destination name.\nfunc MessagingDestinationTemplate(val string) attribute.KeyValue {\n\treturn MessagingDestinationTemplateKey.String(val)\n}\n\n// MessagingDestinationTemporary returns an attribute KeyValue conforming to the\n// \"messaging.destination.temporary\" semantic conventions. It represents a\n// boolean that is true if the message destination is temporary and might not\n// exist anymore after messages are processed.\nfunc MessagingDestinationTemporary(val bool) attribute.KeyValue {\n\treturn MessagingDestinationTemporaryKey.Bool(val)\n}\n\n// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming\n// to the \"messaging.eventhubs.message.enqueued_time\" semantic conventions. It\n// represents the UTC epoch seconds at which the message has been accepted and\n// stored in the entity.\nfunc MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue {\n\treturn MessagingEventHubsMessageEnqueuedTimeKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming\n// to the \"messaging.gcp_pubsub.message.ack_deadline\" semantic conventions. It\n// represents the ack deadline in seconds set for the modify ack deadline\n// request.\nfunc MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageAckDeadlineKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the\n// \"messaging.gcp_pubsub.message.ack_id\" semantic conventions. It represents the\n// ack id for a given message.\nfunc MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageAckIDKey.String(val)\n}\n\n// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue\n// conforming to the \"messaging.gcp_pubsub.message.delivery_attempt\" semantic\n// conventions. It represents the delivery attempt for a given message.\nfunc MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming\n// to the \"messaging.gcp_pubsub.message.ordering_key\" semantic conventions. It\n// represents the ordering key for a given message. If the attribute is not\n// present, the message does not have an ordering key.\nfunc MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageOrderingKeyKey.String(val)\n}\n\n// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the\n// \"messaging.kafka.message.key\" semantic conventions. It represents the message\n// keys in Kafka are used for grouping alike messages to ensure they're processed\n// on the same partition. They differ from `messaging.message.id` in that they're\n// not unique. If the key is `null`, the attribute MUST NOT be set.\nfunc MessagingKafkaMessageKey(val string) attribute.KeyValue {\n\treturn MessagingKafkaMessageKeyKey.String(val)\n}\n\n// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the\n// \"messaging.kafka.message.tombstone\" semantic conventions. It represents a\n// boolean that is true if the message is a tombstone.\nfunc MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {\n\treturn MessagingKafkaMessageTombstoneKey.Bool(val)\n}\n\n// MessagingKafkaOffset returns an attribute KeyValue conforming to the\n// \"messaging.kafka.offset\" semantic conventions. It represents the offset of a\n// record in the corresponding Kafka partition.\nfunc MessagingKafkaOffset(val int) attribute.KeyValue {\n\treturn MessagingKafkaOffsetKey.Int(val)\n}\n\n// MessagingMessageBodySize returns an attribute KeyValue conforming to the\n// \"messaging.message.body.size\" semantic conventions. It represents the size of\n// the message body in bytes.\nfunc MessagingMessageBodySize(val int) attribute.KeyValue {\n\treturn MessagingMessageBodySizeKey.Int(val)\n}\n\n// MessagingMessageConversationID returns an attribute KeyValue conforming to the\n// \"messaging.message.conversation_id\" semantic conventions. It represents the\n// conversation ID identifying the conversation to which the message belongs,\n// represented as a string. Sometimes called \"Correlation ID\".\nfunc MessagingMessageConversationID(val string) attribute.KeyValue {\n\treturn MessagingMessageConversationIDKey.String(val)\n}\n\n// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the\n// \"messaging.message.envelope.size\" semantic conventions. It represents the size\n// of the message body and metadata in bytes.\nfunc MessagingMessageEnvelopeSize(val int) attribute.KeyValue {\n\treturn MessagingMessageEnvelopeSizeKey.Int(val)\n}\n\n// MessagingMessageID returns an attribute KeyValue conforming to the\n// \"messaging.message.id\" semantic conventions. It represents a value used by the\n// messaging system as an identifier for the message, represented as a string.\nfunc MessagingMessageID(val string) attribute.KeyValue {\n\treturn MessagingMessageIDKey.String(val)\n}\n\n// MessagingOperationName returns an attribute KeyValue conforming to the\n// \"messaging.operation.name\" semantic conventions. It represents the\n// system-specific name of the messaging operation.\nfunc MessagingOperationName(val string) attribute.KeyValue {\n\treturn MessagingOperationNameKey.String(val)\n}\n\n// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue\n// conforming to the \"messaging.rabbitmq.destination.routing_key\" semantic\n// conventions. It represents the rabbitMQ message routing key.\nfunc MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue {\n\treturn MessagingRabbitMQDestinationRoutingKeyKey.String(val)\n}\n\n// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming\n// to the \"messaging.rabbitmq.message.delivery_tag\" semantic conventions. It\n// represents the rabbitMQ message delivery tag.\nfunc MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue {\n\treturn MessagingRabbitMQMessageDeliveryTagKey.Int(val)\n}\n\n// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue\n// conforming to the \"messaging.rocketmq.message.delay_time_level\" semantic\n// conventions. It represents the delay time level for delay message, which\n// determines the message delay time.\nfunc MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue {\n\treturn MessagingRocketMQMessageDelayTimeLevelKey.Int(val)\n}\n\n// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue\n// conforming to the \"messaging.rocketmq.message.delivery_timestamp\" semantic\n// conventions. It represents the timestamp in milliseconds that the delay\n// message is expected to be delivered to consumer.\nfunc MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue {\n\treturn MessagingRocketMQMessageDeliveryTimestampKey.Int(val)\n}\n\n// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.group\" semantic conventions. It represents the it\n// is essential for FIFO message. Messages that belong to the same message group\n// are always processed one by one within the same consumer group.\nfunc MessagingRocketMQMessageGroup(val string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageGroupKey.String(val)\n}\n\n// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.keys\" semantic conventions. It represents the\n// key(s) of message, another way to mark message besides message id.\nfunc MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageKeysKey.StringSlice(val)\n}\n\n// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.tag\" semantic conventions. It represents the\n// secondary classifier of message besides topic.\nfunc MessagingRocketMQMessageTag(val string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageTagKey.String(val)\n}\n\n// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.namespace\" semantic conventions. It represents the\n// namespace of RocketMQ resources, resources in different namespaces are\n// individual.\nfunc MessagingRocketMQNamespace(val string) attribute.KeyValue {\n\treturn MessagingRocketMQNamespaceKey.String(val)\n}\n\n// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue\n// conforming to the \"messaging.servicebus.message.delivery_count\" semantic\n// conventions. It represents the number of deliveries that have been attempted\n// for this message.\nfunc MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue {\n\treturn MessagingServiceBusMessageDeliveryCountKey.Int(val)\n}\n\n// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue\n// conforming to the \"messaging.servicebus.message.enqueued_time\" semantic\n// conventions. It represents the UTC epoch seconds at which the message has been\n// accepted and stored in the entity.\nfunc MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue {\n\treturn MessagingServiceBusMessageEnqueuedTimeKey.Int(val)\n}\n\n// Enum values for messaging.operation.type\nvar (\n\t// A message is created. \"Create\" spans always refer to a single message and are\n\t// used to provide a unique creation context for messages in batch sending\n\t// scenarios.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeCreate = MessagingOperationTypeKey.String(\"create\")\n\t// One or more messages are provided for sending to an intermediary. If a single\n\t// message is sent, the context of the \"Send\" span can be used as the creation\n\t// context and no \"Create\" span needs to be created.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeSend = MessagingOperationTypeKey.String(\"send\")\n\t// One or more messages are requested by a consumer. This operation refers to\n\t// pull-based scenarios, where consumers explicitly call methods of messaging\n\t// SDKs to receive messages.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeReceive = MessagingOperationTypeKey.String(\"receive\")\n\t// One or more messages are processed by a consumer.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeProcess = MessagingOperationTypeKey.String(\"process\")\n\t// One or more messages are settled.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeSettle = MessagingOperationTypeKey.String(\"settle\")\n)\n\n// Enum values for messaging.rocketmq.consumption_model\nvar (\n\t// Clustering consumption model\n\t// Stability: development\n\tMessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String(\"clustering\")\n\t// Broadcasting consumption model\n\t// Stability: development\n\tMessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String(\"broadcasting\")\n)\n\n// Enum values for messaging.rocketmq.message.type\nvar (\n\t// Normal message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String(\"normal\")\n\t// FIFO message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String(\"fifo\")\n\t// Delay message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String(\"delay\")\n\t// Transaction message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String(\"transaction\")\n)\n\n// Enum values for messaging.servicebus.disposition_status\nvar (\n\t// Message is completed\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String(\"complete\")\n\t// Message is abandoned\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String(\"abandon\")\n\t// Message is sent to dead letter queue\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String(\"dead_letter\")\n\t// Message is deferred\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String(\"defer\")\n)\n\n// Enum values for messaging.system\nvar (\n\t// Apache ActiveMQ\n\t// Stability: development\n\tMessagingSystemActiveMQ = MessagingSystemKey.String(\"activemq\")\n\t// Amazon Simple Notification Service (SNS)\n\t// Stability: development\n\tMessagingSystemAWSSNS = MessagingSystemKey.String(\"aws.sns\")\n\t// Amazon Simple Queue Service (SQS)\n\t// Stability: development\n\tMessagingSystemAWSSQS = MessagingSystemKey.String(\"aws_sqs\")\n\t// Azure Event Grid\n\t// Stability: development\n\tMessagingSystemEventGrid = MessagingSystemKey.String(\"eventgrid\")\n\t// Azure Event Hubs\n\t// Stability: development\n\tMessagingSystemEventHubs = MessagingSystemKey.String(\"eventhubs\")\n\t// Azure Service Bus\n\t// Stability: development\n\tMessagingSystemServiceBus = MessagingSystemKey.String(\"servicebus\")\n\t// Google Cloud Pub/Sub\n\t// Stability: development\n\tMessagingSystemGCPPubSub = MessagingSystemKey.String(\"gcp_pubsub\")\n\t// Java Message Service\n\t// Stability: development\n\tMessagingSystemJMS = MessagingSystemKey.String(\"jms\")\n\t// Apache Kafka\n\t// Stability: development\n\tMessagingSystemKafka = MessagingSystemKey.String(\"kafka\")\n\t// RabbitMQ\n\t// Stability: development\n\tMessagingSystemRabbitMQ = MessagingSystemKey.String(\"rabbitmq\")\n\t// Apache RocketMQ\n\t// Stability: development\n\tMessagingSystemRocketMQ = MessagingSystemKey.String(\"rocketmq\")\n\t// Apache Pulsar\n\t// Stability: development\n\tMessagingSystemPulsar = MessagingSystemKey.String(\"pulsar\")\n)\n\n// Namespace: network\nconst (\n\t// NetworkCarrierICCKey is the attribute Key conforming to the\n\t// \"network.carrier.icc\" semantic conventions. It represents the ISO 3166-1\n\t// alpha-2 2-character country code associated with the mobile carrier network.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: DE\n\tNetworkCarrierICCKey = attribute.Key(\"network.carrier.icc\")\n\n\t// NetworkCarrierMCCKey is the attribute Key conforming to the\n\t// \"network.carrier.mcc\" semantic conventions. It represents the mobile carrier\n\t// country code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 310\n\tNetworkCarrierMCCKey = attribute.Key(\"network.carrier.mcc\")\n\n\t// NetworkCarrierMNCKey is the attribute Key conforming to the\n\t// \"network.carrier.mnc\" semantic conventions. It represents the mobile carrier\n\t// network code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 001\n\tNetworkCarrierMNCKey = attribute.Key(\"network.carrier.mnc\")\n\n\t// NetworkCarrierNameKey is the attribute Key conforming to the\n\t// \"network.carrier.name\" semantic conventions. It represents the name of the\n\t// mobile carrier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: sprint\n\tNetworkCarrierNameKey = attribute.Key(\"network.carrier.name\")\n\n\t// NetworkConnectionStateKey is the attribute Key conforming to the\n\t// \"network.connection.state\" semantic conventions. It represents the state of\n\t// network connection.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"close_wait\"\n\t// Note: Connection states are defined as part of the [rfc9293]\n\t//\n\t// [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2\n\tNetworkConnectionStateKey = attribute.Key(\"network.connection.state\")\n\n\t// NetworkConnectionSubtypeKey is the attribute Key conforming to the\n\t// \"network.connection.subtype\" semantic conventions. It represents the this\n\t// describes more details regarding the connection.type. It may be the type of\n\t// cell technology connection, but it could be used for describing details about\n\t// a wifi connection.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: LTE\n\tNetworkConnectionSubtypeKey = attribute.Key(\"network.connection.subtype\")\n\n\t// NetworkConnectionTypeKey is the attribute Key conforming to the\n\t// \"network.connection.type\" semantic conventions. It represents the internet\n\t// connection type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: wifi\n\tNetworkConnectionTypeKey = attribute.Key(\"network.connection.type\")\n\n\t// NetworkInterfaceNameKey is the attribute Key conforming to the\n\t// \"network.interface.name\" semantic conventions. It represents the network\n\t// interface name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"lo\", \"eth0\"\n\tNetworkInterfaceNameKey = attribute.Key(\"network.interface.name\")\n\n\t// NetworkIODirectionKey is the attribute Key conforming to the\n\t// \"network.io.direction\" semantic conventions. It represents the network IO\n\t// operation direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"transmit\"\n\tNetworkIODirectionKey = attribute.Key(\"network.io.direction\")\n\n\t// NetworkLocalAddressKey is the attribute Key conforming to the\n\t// \"network.local.address\" semantic conventions. It represents the local address\n\t// of the network connection - IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"10.1.2.80\", \"/tmp/my.sock\"\n\tNetworkLocalAddressKey = attribute.Key(\"network.local.address\")\n\n\t// NetworkLocalPortKey is the attribute Key conforming to the\n\t// \"network.local.port\" semantic conventions. It represents the local port\n\t// number of the network connection.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\tNetworkLocalPortKey = attribute.Key(\"network.local.port\")\n\n\t// NetworkPeerAddressKey is the attribute Key conforming to the\n\t// \"network.peer.address\" semantic conventions. It represents the peer address\n\t// of the network connection - IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"10.1.2.80\", \"/tmp/my.sock\"\n\tNetworkPeerAddressKey = attribute.Key(\"network.peer.address\")\n\n\t// NetworkPeerPortKey is the attribute Key conforming to the \"network.peer.port\"\n\t// semantic conventions. It represents the peer port number of the network\n\t// connection.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\tNetworkPeerPortKey = attribute.Key(\"network.peer.port\")\n\n\t// NetworkProtocolNameKey is the attribute Key conforming to the\n\t// \"network.protocol.name\" semantic conventions. It represents the\n\t// [OSI application layer] or non-OSI equivalent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"amqp\", \"http\", \"mqtt\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\n\tNetworkProtocolNameKey = attribute.Key(\"network.protocol.name\")\n\n\t// NetworkProtocolVersionKey is the attribute Key conforming to the\n\t// \"network.protocol.version\" semantic conventions. It represents the actual\n\t// version of the protocol used for network communication.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.1\", \"2\"\n\t// Note: If protocol version is subject to negotiation (for example using [ALPN]\n\t// ), this attribute SHOULD be set to the negotiated version. If the actual\n\t// protocol version is not known, this attribute SHOULD NOT be set.\n\t//\n\t// [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html\n\tNetworkProtocolVersionKey = attribute.Key(\"network.protocol.version\")\n\n\t// NetworkTransportKey is the attribute Key conforming to the\n\t// \"network.transport\" semantic conventions. It represents the\n\t// [OSI transport layer] or [inter-process communication method].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"tcp\", \"udp\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// Consider always setting the transport when setting a port number, since\n\t// a port number is ambiguous without knowing the transport. For example\n\t// different processes could be listening on TCP port 12345 and UDP port 12345.\n\t//\n\t// [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer\n\t// [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication\n\tNetworkTransportKey = attribute.Key(\"network.transport\")\n\n\t// NetworkTypeKey is the attribute Key conforming to the \"network.type\" semantic\n\t// conventions. It represents the [OSI network layer] or non-OSI equivalent.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"ipv4\", \"ipv6\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// [OSI network layer]: https://wikipedia.org/wiki/Network_layer\n\tNetworkTypeKey = attribute.Key(\"network.type\")\n)\n\n// NetworkCarrierICC returns an attribute KeyValue conforming to the\n// \"network.carrier.icc\" semantic conventions. It represents the ISO 3166-1\n// alpha-2 2-character country code associated with the mobile carrier network.\nfunc NetworkCarrierICC(val string) attribute.KeyValue {\n\treturn NetworkCarrierICCKey.String(val)\n}\n\n// NetworkCarrierMCC returns an attribute KeyValue conforming to the\n// \"network.carrier.mcc\" semantic conventions. It represents the mobile carrier\n// country code.\nfunc NetworkCarrierMCC(val string) attribute.KeyValue {\n\treturn NetworkCarrierMCCKey.String(val)\n}\n\n// NetworkCarrierMNC returns an attribute KeyValue conforming to the\n// \"network.carrier.mnc\" semantic conventions. It represents the mobile carrier\n// network code.\nfunc NetworkCarrierMNC(val string) attribute.KeyValue {\n\treturn NetworkCarrierMNCKey.String(val)\n}\n\n// NetworkCarrierName returns an attribute KeyValue conforming to the\n// \"network.carrier.name\" semantic conventions. It represents the name of the\n// mobile carrier.\nfunc NetworkCarrierName(val string) attribute.KeyValue {\n\treturn NetworkCarrierNameKey.String(val)\n}\n\n// NetworkInterfaceName returns an attribute KeyValue conforming to the\n// \"network.interface.name\" semantic conventions. It represents the network\n// interface name.\nfunc NetworkInterfaceName(val string) attribute.KeyValue {\n\treturn NetworkInterfaceNameKey.String(val)\n}\n\n// NetworkLocalAddress returns an attribute KeyValue conforming to the\n// \"network.local.address\" semantic conventions. It represents the local address\n// of the network connection - IP address or Unix domain socket name.\nfunc NetworkLocalAddress(val string) attribute.KeyValue {\n\treturn NetworkLocalAddressKey.String(val)\n}\n\n// NetworkLocalPort returns an attribute KeyValue conforming to the\n// \"network.local.port\" semantic conventions. It represents the local port number\n// of the network connection.\nfunc NetworkLocalPort(val int) attribute.KeyValue {\n\treturn NetworkLocalPortKey.Int(val)\n}\n\n// NetworkPeerAddress returns an attribute KeyValue conforming to the\n// \"network.peer.address\" semantic conventions. It represents the peer address of\n// the network connection - IP address or Unix domain socket name.\nfunc NetworkPeerAddress(val string) attribute.KeyValue {\n\treturn NetworkPeerAddressKey.String(val)\n}\n\n// NetworkPeerPort returns an attribute KeyValue conforming to the\n// \"network.peer.port\" semantic conventions. It represents the peer port number\n// of the network connection.\nfunc NetworkPeerPort(val int) attribute.KeyValue {\n\treturn NetworkPeerPortKey.Int(val)\n}\n\n// NetworkProtocolName returns an attribute KeyValue conforming to the\n// \"network.protocol.name\" semantic conventions. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc NetworkProtocolName(val string) attribute.KeyValue {\n\treturn NetworkProtocolNameKey.String(val)\n}\n\n// NetworkProtocolVersion returns an attribute KeyValue conforming to the\n// \"network.protocol.version\" semantic conventions. It represents the actual\n// version of the protocol used for network communication.\nfunc NetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn NetworkProtocolVersionKey.String(val)\n}\n\n// Enum values for network.connection.state\nvar (\n\t// closed\n\t// Stability: development\n\tNetworkConnectionStateClosed = NetworkConnectionStateKey.String(\"closed\")\n\t// close_wait\n\t// Stability: development\n\tNetworkConnectionStateCloseWait = NetworkConnectionStateKey.String(\"close_wait\")\n\t// closing\n\t// Stability: development\n\tNetworkConnectionStateClosing = NetworkConnectionStateKey.String(\"closing\")\n\t// established\n\t// Stability: development\n\tNetworkConnectionStateEstablished = NetworkConnectionStateKey.String(\"established\")\n\t// fin_wait_1\n\t// Stability: development\n\tNetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String(\"fin_wait_1\")\n\t// fin_wait_2\n\t// Stability: development\n\tNetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String(\"fin_wait_2\")\n\t// last_ack\n\t// Stability: development\n\tNetworkConnectionStateLastAck = NetworkConnectionStateKey.String(\"last_ack\")\n\t// listen\n\t// Stability: development\n\tNetworkConnectionStateListen = NetworkConnectionStateKey.String(\"listen\")\n\t// syn_received\n\t// Stability: development\n\tNetworkConnectionStateSynReceived = NetworkConnectionStateKey.String(\"syn_received\")\n\t// syn_sent\n\t// Stability: development\n\tNetworkConnectionStateSynSent = NetworkConnectionStateKey.String(\"syn_sent\")\n\t// time_wait\n\t// Stability: development\n\tNetworkConnectionStateTimeWait = NetworkConnectionStateKey.String(\"time_wait\")\n)\n\n// Enum values for network.connection.subtype\nvar (\n\t// GPRS\n\t// Stability: development\n\tNetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String(\"gprs\")\n\t// EDGE\n\t// Stability: development\n\tNetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String(\"edge\")\n\t// UMTS\n\t// Stability: development\n\tNetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String(\"umts\")\n\t// CDMA\n\t// Stability: development\n\tNetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String(\"cdma\")\n\t// EVDO Rel. 0\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String(\"evdo_0\")\n\t// EVDO Rev. A\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String(\"evdo_a\")\n\t// CDMA2000 1XRTT\n\t// Stability: development\n\tNetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String(\"cdma2000_1xrtt\")\n\t// HSDPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String(\"hsdpa\")\n\t// HSUPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String(\"hsupa\")\n\t// HSPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String(\"hspa\")\n\t// IDEN\n\t// Stability: development\n\tNetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String(\"iden\")\n\t// EVDO Rev. B\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String(\"evdo_b\")\n\t// LTE\n\t// Stability: development\n\tNetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String(\"lte\")\n\t// EHRPD\n\t// Stability: development\n\tNetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String(\"ehrpd\")\n\t// HSPAP\n\t// Stability: development\n\tNetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String(\"hspap\")\n\t// GSM\n\t// Stability: development\n\tNetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String(\"gsm\")\n\t// TD-SCDMA\n\t// Stability: development\n\tNetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String(\"td_scdma\")\n\t// IWLAN\n\t// Stability: development\n\tNetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String(\"iwlan\")\n\t// 5G NR (New Radio)\n\t// Stability: development\n\tNetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String(\"nr\")\n\t// 5G NRNSA (New Radio Non-Standalone)\n\t// Stability: development\n\tNetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String(\"nrnsa\")\n\t// LTE CA\n\t// Stability: development\n\tNetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String(\"lte_ca\")\n)\n\n// Enum values for network.connection.type\nvar (\n\t// wifi\n\t// Stability: development\n\tNetworkConnectionTypeWifi = NetworkConnectionTypeKey.String(\"wifi\")\n\t// wired\n\t// Stability: development\n\tNetworkConnectionTypeWired = NetworkConnectionTypeKey.String(\"wired\")\n\t// cell\n\t// Stability: development\n\tNetworkConnectionTypeCell = NetworkConnectionTypeKey.String(\"cell\")\n\t// unavailable\n\t// Stability: development\n\tNetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String(\"unavailable\")\n\t// unknown\n\t// Stability: development\n\tNetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String(\"unknown\")\n)\n\n// Enum values for network.io.direction\nvar (\n\t// transmit\n\t// Stability: development\n\tNetworkIODirectionTransmit = NetworkIODirectionKey.String(\"transmit\")\n\t// receive\n\t// Stability: development\n\tNetworkIODirectionReceive = NetworkIODirectionKey.String(\"receive\")\n)\n\n// Enum values for network.transport\nvar (\n\t// TCP\n\t// Stability: stable\n\tNetworkTransportTCP = NetworkTransportKey.String(\"tcp\")\n\t// UDP\n\t// Stability: stable\n\tNetworkTransportUDP = NetworkTransportKey.String(\"udp\")\n\t// Named or anonymous pipe.\n\t// Stability: stable\n\tNetworkTransportPipe = NetworkTransportKey.String(\"pipe\")\n\t// Unix domain socket\n\t// Stability: stable\n\tNetworkTransportUnix = NetworkTransportKey.String(\"unix\")\n\t// QUIC\n\t// Stability: stable\n\tNetworkTransportQUIC = NetworkTransportKey.String(\"quic\")\n)\n\n// Enum values for network.type\nvar (\n\t// IPv4\n\t// Stability: stable\n\tNetworkTypeIPv4 = NetworkTypeKey.String(\"ipv4\")\n\t// IPv6\n\t// Stability: stable\n\tNetworkTypeIPv6 = NetworkTypeKey.String(\"ipv6\")\n)\n\n// Namespace: oci\nconst (\n\t// OCIManifestDigestKey is the attribute Key conforming to the\n\t// \"oci.manifest.digest\" semantic conventions. It represents the digest of the\n\t// OCI image manifest. For container images specifically is the digest by which\n\t// the container image is known.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4\"\n\t// Note: Follows [OCI Image Manifest Specification], and specifically the\n\t// [Digest property].\n\t// An example can be found in [Example Image Manifest].\n\t//\n\t// [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md\n\t// [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests\n\t// [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest\n\tOCIManifestDigestKey = attribute.Key(\"oci.manifest.digest\")\n)\n\n// OCIManifestDigest returns an attribute KeyValue conforming to the\n// \"oci.manifest.digest\" semantic conventions. It represents the digest of the\n// OCI image manifest. For container images specifically is the digest by which\n// the container image is known.\nfunc OCIManifestDigest(val string) attribute.KeyValue {\n\treturn OCIManifestDigestKey.String(val)\n}\n\n// Namespace: openai\nconst (\n\t// OpenAIRequestServiceTierKey is the attribute Key conforming to the\n\t// \"openai.request.service_tier\" semantic conventions. It represents the service\n\t// tier requested. May be a specific tier, default, or auto.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"auto\", \"default\"\n\tOpenAIRequestServiceTierKey = attribute.Key(\"openai.request.service_tier\")\n\n\t// OpenAIResponseServiceTierKey is the attribute Key conforming to the\n\t// \"openai.response.service_tier\" semantic conventions. It represents the\n\t// service tier used for the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"scale\", \"default\"\n\tOpenAIResponseServiceTierKey = attribute.Key(\"openai.response.service_tier\")\n\n\t// OpenAIResponseSystemFingerprintKey is the attribute Key conforming to the\n\t// \"openai.response.system_fingerprint\" semantic conventions. It represents a\n\t// fingerprint to track any eventual change in the Generative AI environment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"fp_44709d6fcb\"\n\tOpenAIResponseSystemFingerprintKey = attribute.Key(\"openai.response.system_fingerprint\")\n)\n\n// OpenAIResponseServiceTier returns an attribute KeyValue conforming to the\n// \"openai.response.service_tier\" semantic conventions. It represents the service\n// tier used for the response.\nfunc OpenAIResponseServiceTier(val string) attribute.KeyValue {\n\treturn OpenAIResponseServiceTierKey.String(val)\n}\n\n// OpenAIResponseSystemFingerprint returns an attribute KeyValue conforming to\n// the \"openai.response.system_fingerprint\" semantic conventions. It represents a\n// fingerprint to track any eventual change in the Generative AI environment.\nfunc OpenAIResponseSystemFingerprint(val string) attribute.KeyValue {\n\treturn OpenAIResponseSystemFingerprintKey.String(val)\n}\n\n// Enum values for openai.request.service_tier\nvar (\n\t// The system will utilize scale tier credits until they are exhausted.\n\t// Stability: development\n\tOpenAIRequestServiceTierAuto = OpenAIRequestServiceTierKey.String(\"auto\")\n\t// The system will utilize the default scale tier.\n\t// Stability: development\n\tOpenAIRequestServiceTierDefault = OpenAIRequestServiceTierKey.String(\"default\")\n)\n\n// Namespace: opentracing\nconst (\n\t// OpenTracingRefTypeKey is the attribute Key conforming to the\n\t// \"opentracing.ref_type\" semantic conventions. It represents the parent-child\n\t// Reference type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The causal relationship between a child Span and a parent Span.\n\tOpenTracingRefTypeKey = attribute.Key(\"opentracing.ref_type\")\n)\n\n// Enum values for opentracing.ref_type\nvar (\n\t// The parent Span depends on the child Span in some capacity\n\t// Stability: development\n\tOpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String(\"child_of\")\n\t// The parent Span doesn't depend in any way on the result of the child Span\n\t// Stability: development\n\tOpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String(\"follows_from\")\n)\n\n// Namespace: os\nconst (\n\t// OSBuildIDKey is the attribute Key conforming to the \"os.build_id\" semantic\n\t// conventions. It represents the unique identifier for a particular build or\n\t// compilation of the operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TQ3C.230805.001.B2\", \"20E247\", \"22621\"\n\tOSBuildIDKey = attribute.Key(\"os.build_id\")\n\n\t// OSDescriptionKey is the attribute Key conforming to the \"os.description\"\n\t// semantic conventions. It represents the human readable (not intended to be\n\t// parsed) OS version information, like e.g. reported by `ver` or\n\t// `lsb_release -a` commands.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Microsoft Windows [Version 10.0.18363.778]\", \"Ubuntu 18.04.1 LTS\"\n\tOSDescriptionKey = attribute.Key(\"os.description\")\n\n\t// OSNameKey is the attribute Key conforming to the \"os.name\" semantic\n\t// conventions. It represents the human readable operating system name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iOS\", \"Android\", \"Ubuntu\"\n\tOSNameKey = attribute.Key(\"os.name\")\n\n\t// OSTypeKey is the attribute Key conforming to the \"os.type\" semantic\n\t// conventions. It represents the operating system type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOSTypeKey = attribute.Key(\"os.type\")\n\n\t// OSVersionKey is the attribute Key conforming to the \"os.version\" semantic\n\t// conventions. It represents the version string of the operating system as\n\t// defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.2.1\", \"18.04.1\"\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\tOSVersionKey = attribute.Key(\"os.version\")\n)\n\n// OSBuildID returns an attribute KeyValue conforming to the \"os.build_id\"\n// semantic conventions. It represents the unique identifier for a particular\n// build or compilation of the operating system.\nfunc OSBuildID(val string) attribute.KeyValue {\n\treturn OSBuildIDKey.String(val)\n}\n\n// OSDescription returns an attribute KeyValue conforming to the \"os.description\"\n// semantic conventions. It represents the human readable (not intended to be\n// parsed) OS version information, like e.g. reported by `ver` or\n// `lsb_release -a` commands.\nfunc OSDescription(val string) attribute.KeyValue {\n\treturn OSDescriptionKey.String(val)\n}\n\n// OSName returns an attribute KeyValue conforming to the \"os.name\" semantic\n// conventions. It represents the human readable operating system name.\nfunc OSName(val string) attribute.KeyValue {\n\treturn OSNameKey.String(val)\n}\n\n// OSVersion returns an attribute KeyValue conforming to the \"os.version\"\n// semantic conventions. It represents the version string of the operating system\n// as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc OSVersion(val string) attribute.KeyValue {\n\treturn OSVersionKey.String(val)\n}\n\n// Enum values for os.type\nvar (\n\t// Microsoft Windows\n\t// Stability: development\n\tOSTypeWindows = OSTypeKey.String(\"windows\")\n\t// Linux\n\t// Stability: development\n\tOSTypeLinux = OSTypeKey.String(\"linux\")\n\t// Apple Darwin\n\t// Stability: development\n\tOSTypeDarwin = OSTypeKey.String(\"darwin\")\n\t// FreeBSD\n\t// Stability: development\n\tOSTypeFreeBSD = OSTypeKey.String(\"freebsd\")\n\t// NetBSD\n\t// Stability: development\n\tOSTypeNetBSD = OSTypeKey.String(\"netbsd\")\n\t// OpenBSD\n\t// Stability: development\n\tOSTypeOpenBSD = OSTypeKey.String(\"openbsd\")\n\t// DragonFly BSD\n\t// Stability: development\n\tOSTypeDragonflyBSD = OSTypeKey.String(\"dragonflybsd\")\n\t// HP-UX (Hewlett Packard Unix)\n\t// Stability: development\n\tOSTypeHPUX = OSTypeKey.String(\"hpux\")\n\t// AIX (Advanced Interactive eXecutive)\n\t// Stability: development\n\tOSTypeAIX = OSTypeKey.String(\"aix\")\n\t// SunOS, Oracle Solaris\n\t// Stability: development\n\tOSTypeSolaris = OSTypeKey.String(\"solaris\")\n\t// IBM z/OS\n\t// Stability: development\n\tOSTypeZOS = OSTypeKey.String(\"zos\")\n)\n\n// Namespace: otel\nconst (\n\t// OTelComponentNameKey is the attribute Key conforming to the\n\t// \"otel.component.name\" semantic conventions. It represents a name uniquely\n\t// identifying the instance of the OpenTelemetry component within its containing\n\t// SDK instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otlp_grpc_span_exporter/0\", \"custom-name\"\n\t// Note: Implementations SHOULD ensure a low cardinality for this attribute,\n\t// even across application or SDK restarts.\n\t// E.g. implementations MUST NOT use UUIDs as values for this attribute.\n\t//\n\t// Implementations MAY achieve these goals by following a\n\t// `<otel.component.type>/<instance-counter>` pattern, e.g.\n\t// `batching_span_processor/0`.\n\t// Hereby `otel.component.type` refers to the corresponding attribute value of\n\t// the component.\n\t//\n\t// The value of `instance-counter` MAY be automatically assigned by the\n\t// component and uniqueness within the enclosing SDK instance MUST be\n\t// guaranteed.\n\t// For example, `<instance-counter>` MAY be implemented by using a monotonically\n\t// increasing counter (starting with `0`), which is incremented every time an\n\t// instance of the given component type is started.\n\t//\n\t// With this implementation, for example the first Batching Span Processor would\n\t// have `batching_span_processor/0`\n\t// as `otel.component.name`, the second one `batching_span_processor/1` and so\n\t// on.\n\t// These values will therefore be reused in the case of an application restart.\n\tOTelComponentNameKey = attribute.Key(\"otel.component.name\")\n\n\t// OTelComponentTypeKey is the attribute Key conforming to the\n\t// \"otel.component.type\" semantic conventions. It represents a name identifying\n\t// the type of the OpenTelemetry component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"batching_span_processor\", \"com.example.MySpanExporter\"\n\t// Note: If none of the standardized values apply, implementations SHOULD use\n\t// the language-defined name of the type.\n\t// E.g. for Java the fully qualified classname SHOULD be used in this case.\n\tOTelComponentTypeKey = attribute.Key(\"otel.component.type\")\n\n\t// OTelScopeNameKey is the attribute Key conforming to the \"otel.scope.name\"\n\t// semantic conventions. It represents the name of the instrumentation scope - (\n\t// `InstrumentationScope.Name` in OTLP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"io.opentelemetry.contrib.mongodb\"\n\tOTelScopeNameKey = attribute.Key(\"otel.scope.name\")\n\n\t// OTelScopeSchemaURLKey is the attribute Key conforming to the\n\t// \"otel.scope.schema_url\" semantic conventions. It represents the schema URL of\n\t// the instrumentation scope.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://opentelemetry.io/schemas/1.31.0\"\n\tOTelScopeSchemaURLKey = attribute.Key(\"otel.scope.schema_url\")\n\n\t// OTelScopeVersionKey is the attribute Key conforming to the\n\t// \"otel.scope.version\" semantic conventions. It represents the version of the\n\t// instrumentation scope - (`InstrumentationScope.Version` in OTLP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.0.0\"\n\tOTelScopeVersionKey = attribute.Key(\"otel.scope.version\")\n\n\t// OTelSpanParentOriginKey is the attribute Key conforming to the\n\t// \"otel.span.parent.origin\" semantic conventions. It represents the determines\n\t// whether the span has a parent span, and if so,\n\t// [whether it is a remote parent].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginKey = attribute.Key(\"otel.span.parent.origin\")\n\n\t// OTelSpanSamplingResultKey is the attribute Key conforming to the\n\t// \"otel.span.sampling_result\" semantic conventions. It represents the result\n\t// value of the sampler for this span.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOTelSpanSamplingResultKey = attribute.Key(\"otel.span.sampling_result\")\n\n\t// OTelStatusCodeKey is the attribute Key conforming to the \"otel.status_code\"\n\t// semantic conventions. It represents the name of the code, either \"OK\" or\n\t// \"ERROR\". MUST NOT be set if the status code is UNSET.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\tOTelStatusCodeKey = attribute.Key(\"otel.status_code\")\n\n\t// OTelStatusDescriptionKey is the attribute Key conforming to the\n\t// \"otel.status_description\" semantic conventions. It represents the description\n\t// of the Status if it has a value, otherwise not set.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"resource not found\"\n\tOTelStatusDescriptionKey = attribute.Key(\"otel.status_description\")\n)\n\n// OTelComponentName returns an attribute KeyValue conforming to the\n// \"otel.component.name\" semantic conventions. It represents a name uniquely\n// identifying the instance of the OpenTelemetry component within its containing\n// SDK instance.\nfunc OTelComponentName(val string) attribute.KeyValue {\n\treturn OTelComponentNameKey.String(val)\n}\n\n// OTelScopeName returns an attribute KeyValue conforming to the\n// \"otel.scope.name\" semantic conventions. It represents the name of the\n// instrumentation scope - (`InstrumentationScope.Name` in OTLP).\nfunc OTelScopeName(val string) attribute.KeyValue {\n\treturn OTelScopeNameKey.String(val)\n}\n\n// OTelScopeSchemaURL returns an attribute KeyValue conforming to the\n// \"otel.scope.schema_url\" semantic conventions. It represents the schema URL of\n// the instrumentation scope.\nfunc OTelScopeSchemaURL(val string) attribute.KeyValue {\n\treturn OTelScopeSchemaURLKey.String(val)\n}\n\n// OTelScopeVersion returns an attribute KeyValue conforming to the\n// \"otel.scope.version\" semantic conventions. It represents the version of the\n// instrumentation scope - (`InstrumentationScope.Version` in OTLP).\nfunc OTelScopeVersion(val string) attribute.KeyValue {\n\treturn OTelScopeVersionKey.String(val)\n}\n\n// OTelStatusDescription returns an attribute KeyValue conforming to the\n// \"otel.status_description\" semantic conventions. It represents the description\n// of the Status if it has a value, otherwise not set.\nfunc OTelStatusDescription(val string) attribute.KeyValue {\n\treturn OTelStatusDescriptionKey.String(val)\n}\n\n// Enum values for otel.component.type\nvar (\n\t// The builtin SDK batching span processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String(\"batching_span_processor\")\n\t// The builtin SDK simple span processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String(\"simple_span_processor\")\n\t// The builtin SDK batching log record processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String(\"batching_log_processor\")\n\t// The builtin SDK simple log record processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String(\"simple_log_processor\")\n\t// OTLP span exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String(\"otlp_grpc_span_exporter\")\n\t// OTLP span exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String(\"otlp_http_span_exporter\")\n\t// OTLP span exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String(\"otlp_http_json_span_exporter\")\n\t// Zipkin span exporter over HTTP\n\t//\n\t// Stability: development\n\tOTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String(\"zipkin_http_span_exporter\")\n\t// OTLP log record exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String(\"otlp_grpc_log_exporter\")\n\t// OTLP log record exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String(\"otlp_http_log_exporter\")\n\t// OTLP log record exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String(\"otlp_http_json_log_exporter\")\n\t// The builtin SDK periodically exporting metric reader\n\t//\n\t// Stability: development\n\tOTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String(\"periodic_metric_reader\")\n\t// OTLP metric exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String(\"otlp_grpc_metric_exporter\")\n\t// OTLP metric exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String(\"otlp_http_metric_exporter\")\n\t// OTLP metric exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String(\"otlp_http_json_metric_exporter\")\n\t// Prometheus metric exporter over HTTP with the default text-based format\n\t//\n\t// Stability: development\n\tOTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String(\"prometheus_http_text_metric_exporter\")\n)\n\n// Enum values for otel.span.parent.origin\nvar (\n\t// The span does not have a parent, it is a root span\n\t// Stability: development\n\tOTelSpanParentOriginNone = OTelSpanParentOriginKey.String(\"none\")\n\t// The span has a parent and the parent's span context [isRemote()] is false\n\t// Stability: development\n\t//\n\t// [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginLocal = OTelSpanParentOriginKey.String(\"local\")\n\t// The span has a parent and the parent's span context [isRemote()] is true\n\t// Stability: development\n\t//\n\t// [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginRemote = OTelSpanParentOriginKey.String(\"remote\")\n)\n\n// Enum values for otel.span.sampling_result\nvar (\n\t// The span is not sampled and not recording\n\t// Stability: development\n\tOTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String(\"DROP\")\n\t// The span is not sampled, but recording\n\t// Stability: development\n\tOTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String(\"RECORD_ONLY\")\n\t// The span is sampled and recording\n\t// Stability: development\n\tOTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String(\"RECORD_AND_SAMPLE\")\n)\n\n// Enum values for otel.status_code\nvar (\n\t// The operation has been validated by an Application developer or Operator to\n\t// have completed successfully.\n\t// Stability: stable\n\tOTelStatusCodeOk = OTelStatusCodeKey.String(\"OK\")\n\t// The operation contains an error.\n\t// Stability: stable\n\tOTelStatusCodeError = OTelStatusCodeKey.String(\"ERROR\")\n)\n\n// Namespace: peer\nconst (\n\t// PeerServiceKey is the attribute Key conforming to the \"peer.service\" semantic\n\t// conventions. It represents the [`service.name`] of the remote service. SHOULD\n\t// be equal to the actual `service.name` resource attribute of the remote\n\t// service if any.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: AuthTokenCache\n\t//\n\t// [`service.name`]: /docs/resource/README.md#service\n\tPeerServiceKey = attribute.Key(\"peer.service\")\n)\n\n// PeerService returns an attribute KeyValue conforming to the \"peer.service\"\n// semantic conventions. It represents the [`service.name`] of the remote\n// service. SHOULD be equal to the actual `service.name` resource attribute of\n// the remote service if any.\n//\n// [`service.name`]: /docs/resource/README.md#service\nfunc PeerService(val string) attribute.KeyValue {\n\treturn PeerServiceKey.String(val)\n}\n\n// Namespace: process\nconst (\n\t// ProcessArgsCountKey is the attribute Key conforming to the\n\t// \"process.args_count\" semantic conventions. It represents the length of the\n\t// process.command_args array.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 4\n\t// Note: This field can be useful for querying or performing bucket analysis on\n\t// how many arguments were provided to start a process. More arguments may be an\n\t// indication of suspicious activity.\n\tProcessArgsCountKey = attribute.Key(\"process.args_count\")\n\n\t// ProcessCommandKey is the attribute Key conforming to the \"process.command\"\n\t// semantic conventions. It represents the command used to launch the process\n\t// (i.e. the command name). On Linux based systems, can be set to the zeroth\n\t// string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter\n\t// extracted from `GetCommandLineW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cmd/otelcol\"\n\tProcessCommandKey = attribute.Key(\"process.command\")\n\n\t// ProcessCommandArgsKey is the attribute Key conforming to the\n\t// \"process.command_args\" semantic conventions. It represents the all the\n\t// command arguments (including the command/executable itself) as received by\n\t// the process. On Linux-based systems (and some other Unixoid systems\n\t// supporting procfs), can be set according to the list of null-delimited\n\t// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this\n\t// would be the full argv vector passed to `main`. SHOULD NOT be collected by\n\t// default unless there is sanitization that excludes sensitive data.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cmd/otecol\", \"--config=config.yaml\"\n\tProcessCommandArgsKey = attribute.Key(\"process.command_args\")\n\n\t// ProcessCommandLineKey is the attribute Key conforming to the\n\t// \"process.command_line\" semantic conventions. It represents the full command\n\t// used to launch the process as a single string representing the full command.\n\t// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if\n\t// you have to assemble it just for monitoring; use `process.command_args`\n\t// instead. SHOULD NOT be collected by default unless there is sanitization that\n\t// excludes sensitive data.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"C:\\cmd\\otecol --config=\"my directory\\config.yaml\"\"\n\tProcessCommandLineKey = attribute.Key(\"process.command_line\")\n\n\t// ProcessContextSwitchTypeKey is the attribute Key conforming to the\n\t// \"process.context_switch_type\" semantic conventions. It represents the\n\t// specifies whether the context switches for this data point were voluntary or\n\t// involuntary.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tProcessContextSwitchTypeKey = attribute.Key(\"process.context_switch_type\")\n\n\t// ProcessCreationTimeKey is the attribute Key conforming to the\n\t// \"process.creation.time\" semantic conventions. It represents the date and time\n\t// the process was created, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2023-11-21T09:25:34.853Z\"\n\tProcessCreationTimeKey = attribute.Key(\"process.creation.time\")\n\n\t// ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.gnu\" semantic conventions. It represents the GNU\n\t// build ID as found in the `.note.gnu.build-id` ELF section (hex string).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"c89b11207f6479603b0d49bf291c092c2b719293\"\n\tProcessExecutableBuildIDGNUKey = attribute.Key(\"process.executable.build_id.gnu\")\n\n\t// ProcessExecutableBuildIDGoKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.go\" semantic conventions. It represents the Go\n\t// build ID as retrieved by `go tool buildid <go executable>`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY\"\n\tProcessExecutableBuildIDGoKey = attribute.Key(\"process.executable.build_id.go\")\n\n\t// ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.htlhash\" semantic conventions. It represents the\n\t// profiling specific build ID for executables. See the OTel specification for\n\t// Profiles for more information.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"600DCAFE4A110000F2BF38C493F5FB92\"\n\tProcessExecutableBuildIDHtlhashKey = attribute.Key(\"process.executable.build_id.htlhash\")\n\n\t// ProcessExecutableNameKey is the attribute Key conforming to the\n\t// \"process.executable.name\" semantic conventions. It represents the name of the\n\t// process executable. On Linux based systems, this SHOULD be set to the base\n\t// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to\n\t// the base name of `GetProcessImageFileNameW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcol\"\n\tProcessExecutableNameKey = attribute.Key(\"process.executable.name\")\n\n\t// ProcessExecutablePathKey is the attribute Key conforming to the\n\t// \"process.executable.path\" semantic conventions. It represents the full path\n\t// to the process executable. On Linux based systems, can be set to the target\n\t// of `proc/[pid]/exe`. On Windows, can be set to the result of\n\t// `GetProcessImageFileNameW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/usr/bin/cmd/otelcol\"\n\tProcessExecutablePathKey = attribute.Key(\"process.executable.path\")\n\n\t// ProcessExitCodeKey is the attribute Key conforming to the \"process.exit.code\"\n\t// semantic conventions. It represents the exit code of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 127\n\tProcessExitCodeKey = attribute.Key(\"process.exit.code\")\n\n\t// ProcessExitTimeKey is the attribute Key conforming to the \"process.exit.time\"\n\t// semantic conventions. It represents the date and time the process exited, in\n\t// ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2023-11-21T09:26:12.315Z\"\n\tProcessExitTimeKey = attribute.Key(\"process.exit.time\")\n\n\t// ProcessGroupLeaderPIDKey is the attribute Key conforming to the\n\t// \"process.group_leader.pid\" semantic conventions. It represents the PID of the\n\t// process's group leader. This is also the process group ID (PGID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 23\n\tProcessGroupLeaderPIDKey = attribute.Key(\"process.group_leader.pid\")\n\n\t// ProcessInteractiveKey is the attribute Key conforming to the\n\t// \"process.interactive\" semantic conventions. It represents the whether the\n\t// process is connected to an interactive shell.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tProcessInteractiveKey = attribute.Key(\"process.interactive\")\n\n\t// ProcessLinuxCgroupKey is the attribute Key conforming to the\n\t// \"process.linux.cgroup\" semantic conventions. It represents the control group\n\t// associated with the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1:name=systemd:/user.slice/user-1000.slice/session-3.scope\",\n\t// \"0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope\"\n\t// Note: Control groups (cgroups) are a kernel feature used to organize and\n\t// manage process resources. This attribute provides the path(s) to the\n\t// cgroup(s) associated with the process, which should match the contents of the\n\t// [/proc/[PID]/cgroup] file.\n\t//\n\t// [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html\n\tProcessLinuxCgroupKey = attribute.Key(\"process.linux.cgroup\")\n\n\t// ProcessOwnerKey is the attribute Key conforming to the \"process.owner\"\n\t// semantic conventions. It represents the username of the user that owns the\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tProcessOwnerKey = attribute.Key(\"process.owner\")\n\n\t// ProcessPagingFaultTypeKey is the attribute Key conforming to the\n\t// \"process.paging.fault_type\" semantic conventions. It represents the type of\n\t// page fault for this data point. Type `major` is for major/hard page faults,\n\t// and `minor` is for minor/soft page faults.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tProcessPagingFaultTypeKey = attribute.Key(\"process.paging.fault_type\")\n\n\t// ProcessParentPIDKey is the attribute Key conforming to the\n\t// \"process.parent_pid\" semantic conventions. It represents the parent Process\n\t// identifier (PPID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 111\n\tProcessParentPIDKey = attribute.Key(\"process.parent_pid\")\n\n\t// ProcessPIDKey is the attribute Key conforming to the \"process.pid\" semantic\n\t// conventions. It represents the process identifier (PID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1234\n\tProcessPIDKey = attribute.Key(\"process.pid\")\n\n\t// ProcessRealUserIDKey is the attribute Key conforming to the\n\t// \"process.real_user.id\" semantic conventions. It represents the real user ID\n\t// (RUID) of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1000\n\tProcessRealUserIDKey = attribute.Key(\"process.real_user.id\")\n\n\t// ProcessRealUserNameKey is the attribute Key conforming to the\n\t// \"process.real_user.name\" semantic conventions. It represents the username of\n\t// the real user of the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"operator\"\n\tProcessRealUserNameKey = attribute.Key(\"process.real_user.name\")\n\n\t// ProcessRuntimeDescriptionKey is the attribute Key conforming to the\n\t// \"process.runtime.description\" semantic conventions. It represents an\n\t// additional description about the runtime of the process, for example a\n\t// specific vendor customization of the runtime environment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0\n\tProcessRuntimeDescriptionKey = attribute.Key(\"process.runtime.description\")\n\n\t// ProcessRuntimeNameKey is the attribute Key conforming to the\n\t// \"process.runtime.name\" semantic conventions. It represents the name of the\n\t// runtime of this process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"OpenJDK Runtime Environment\"\n\tProcessRuntimeNameKey = attribute.Key(\"process.runtime.name\")\n\n\t// ProcessRuntimeVersionKey is the attribute Key conforming to the\n\t// \"process.runtime.version\" semantic conventions. It represents the version of\n\t// the runtime of this process, as returned by the runtime without modification.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 14.0.2\n\tProcessRuntimeVersionKey = attribute.Key(\"process.runtime.version\")\n\n\t// ProcessSavedUserIDKey is the attribute Key conforming to the\n\t// \"process.saved_user.id\" semantic conventions. It represents the saved user ID\n\t// (SUID) of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1002\n\tProcessSavedUserIDKey = attribute.Key(\"process.saved_user.id\")\n\n\t// ProcessSavedUserNameKey is the attribute Key conforming to the\n\t// \"process.saved_user.name\" semantic conventions. It represents the username of\n\t// the saved user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"operator\"\n\tProcessSavedUserNameKey = attribute.Key(\"process.saved_user.name\")\n\n\t// ProcessSessionLeaderPIDKey is the attribute Key conforming to the\n\t// \"process.session_leader.pid\" semantic conventions. It represents the PID of\n\t// the process's session leader. This is also the session ID (SID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 14\n\tProcessSessionLeaderPIDKey = attribute.Key(\"process.session_leader.pid\")\n\n\t// ProcessTitleKey is the attribute Key conforming to the \"process.title\"\n\t// semantic conventions. It represents the process title (proctitle).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cat /etc/hostname\", \"xfce4-session\", \"bash\"\n\t// Note: In many Unix-like systems, process title (proctitle), is the string\n\t// that represents the name or command line of a running process, displayed by\n\t// system monitoring tools like ps, top, and htop.\n\tProcessTitleKey = attribute.Key(\"process.title\")\n\n\t// ProcessUserIDKey is the attribute Key conforming to the \"process.user.id\"\n\t// semantic conventions. It represents the effective user ID (EUID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1001\n\tProcessUserIDKey = attribute.Key(\"process.user.id\")\n\n\t// ProcessUserNameKey is the attribute Key conforming to the \"process.user.name\"\n\t// semantic conventions. It represents the username of the effective user of the\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tProcessUserNameKey = attribute.Key(\"process.user.name\")\n\n\t// ProcessVpidKey is the attribute Key conforming to the \"process.vpid\" semantic\n\t// conventions. It represents the virtual process identifier.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12\n\t// Note: The process ID within a PID namespace. This is not necessarily unique\n\t// across all processes on the host but it is unique within the process\n\t// namespace that the process exists within.\n\tProcessVpidKey = attribute.Key(\"process.vpid\")\n\n\t// ProcessWorkingDirectoryKey is the attribute Key conforming to the\n\t// \"process.working_directory\" semantic conventions. It represents the working\n\t// directory of the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/root\"\n\tProcessWorkingDirectoryKey = attribute.Key(\"process.working_directory\")\n)\n\n// ProcessArgsCount returns an attribute KeyValue conforming to the\n// \"process.args_count\" semantic conventions. It represents the length of the\n// process.command_args array.\nfunc ProcessArgsCount(val int) attribute.KeyValue {\n\treturn ProcessArgsCountKey.Int(val)\n}\n\n// ProcessCommand returns an attribute KeyValue conforming to the\n// \"process.command\" semantic conventions. It represents the command used to\n// launch the process (i.e. the command name). On Linux based systems, can be set\n// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the\n// first parameter extracted from `GetCommandLineW`.\nfunc ProcessCommand(val string) attribute.KeyValue {\n\treturn ProcessCommandKey.String(val)\n}\n\n// ProcessCommandArgs returns an attribute KeyValue conforming to the\n// \"process.command_args\" semantic conventions. It represents the all the command\n// arguments (including the command/executable itself) as received by the\n// process. On Linux-based systems (and some other Unixoid systems supporting\n// procfs), can be set according to the list of null-delimited strings extracted\n// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full\n// argv vector passed to `main`. SHOULD NOT be collected by default unless there\n// is sanitization that excludes sensitive data.\nfunc ProcessCommandArgs(val ...string) attribute.KeyValue {\n\treturn ProcessCommandArgsKey.StringSlice(val)\n}\n\n// ProcessCommandLine returns an attribute KeyValue conforming to the\n// \"process.command_line\" semantic conventions. It represents the full command\n// used to launch the process as a single string representing the full command.\n// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if\n// you have to assemble it just for monitoring; use `process.command_args`\n// instead. SHOULD NOT be collected by default unless there is sanitization that\n// excludes sensitive data.\nfunc ProcessCommandLine(val string) attribute.KeyValue {\n\treturn ProcessCommandLineKey.String(val)\n}\n\n// ProcessCreationTime returns an attribute KeyValue conforming to the\n// \"process.creation.time\" semantic conventions. It represents the date and time\n// the process was created, in ISO 8601 format.\nfunc ProcessCreationTime(val string) attribute.KeyValue {\n\treturn ProcessCreationTimeKey.String(val)\n}\n\n// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the\n// \"process.environment_variable\" semantic conventions. It represents the process\n// environment variables, `<key>` being the environment variable name, the value\n// being the environment variable value.\nfunc ProcessEnvironmentVariable(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"process.environment_variable.\"+key, val)\n}\n\n// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the\n// \"process.executable.build_id.gnu\" semantic conventions. It represents the GNU\n// build ID as found in the `.note.gnu.build-id` ELF section (hex string).\nfunc ProcessExecutableBuildIDGNU(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDGNUKey.String(val)\n}\n\n// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the\n// \"process.executable.build_id.go\" semantic conventions. It represents the Go\n// build ID as retrieved by `go tool buildid <go executable>`.\nfunc ProcessExecutableBuildIDGo(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDGoKey.String(val)\n}\n\n// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to\n// the \"process.executable.build_id.htlhash\" semantic conventions. It represents\n// the profiling specific build ID for executables. See the OTel specification\n// for Profiles for more information.\nfunc ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDHtlhashKey.String(val)\n}\n\n// ProcessExecutableName returns an attribute KeyValue conforming to the\n// \"process.executable.name\" semantic conventions. It represents the name of the\n// process executable. On Linux based systems, this SHOULD be set to the base\n// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the\n// base name of `GetProcessImageFileNameW`.\nfunc ProcessExecutableName(val string) attribute.KeyValue {\n\treturn ProcessExecutableNameKey.String(val)\n}\n\n// ProcessExecutablePath returns an attribute KeyValue conforming to the\n// \"process.executable.path\" semantic conventions. It represents the full path to\n// the process executable. On Linux based systems, can be set to the target of\n// `proc/[pid]/exe`. On Windows, can be set to the result of\n// `GetProcessImageFileNameW`.\nfunc ProcessExecutablePath(val string) attribute.KeyValue {\n\treturn ProcessExecutablePathKey.String(val)\n}\n\n// ProcessExitCode returns an attribute KeyValue conforming to the\n// \"process.exit.code\" semantic conventions. It represents the exit code of the\n// process.\nfunc ProcessExitCode(val int) attribute.KeyValue {\n\treturn ProcessExitCodeKey.Int(val)\n}\n\n// ProcessExitTime returns an attribute KeyValue conforming to the\n// \"process.exit.time\" semantic conventions. It represents the date and time the\n// process exited, in ISO 8601 format.\nfunc ProcessExitTime(val string) attribute.KeyValue {\n\treturn ProcessExitTimeKey.String(val)\n}\n\n// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the\n// \"process.group_leader.pid\" semantic conventions. It represents the PID of the\n// process's group leader. This is also the process group ID (PGID) of the\n// process.\nfunc ProcessGroupLeaderPID(val int) attribute.KeyValue {\n\treturn ProcessGroupLeaderPIDKey.Int(val)\n}\n\n// ProcessInteractive returns an attribute KeyValue conforming to the\n// \"process.interactive\" semantic conventions. It represents the whether the\n// process is connected to an interactive shell.\nfunc ProcessInteractive(val bool) attribute.KeyValue {\n\treturn ProcessInteractiveKey.Bool(val)\n}\n\n// ProcessLinuxCgroup returns an attribute KeyValue conforming to the\n// \"process.linux.cgroup\" semantic conventions. It represents the control group\n// associated with the process.\nfunc ProcessLinuxCgroup(val string) attribute.KeyValue {\n\treturn ProcessLinuxCgroupKey.String(val)\n}\n\n// ProcessOwner returns an attribute KeyValue conforming to the \"process.owner\"\n// semantic conventions. It represents the username of the user that owns the\n// process.\nfunc ProcessOwner(val string) attribute.KeyValue {\n\treturn ProcessOwnerKey.String(val)\n}\n\n// ProcessParentPID returns an attribute KeyValue conforming to the\n// \"process.parent_pid\" semantic conventions. It represents the parent Process\n// identifier (PPID).\nfunc ProcessParentPID(val int) attribute.KeyValue {\n\treturn ProcessParentPIDKey.Int(val)\n}\n\n// ProcessPID returns an attribute KeyValue conforming to the \"process.pid\"\n// semantic conventions. It represents the process identifier (PID).\nfunc ProcessPID(val int) attribute.KeyValue {\n\treturn ProcessPIDKey.Int(val)\n}\n\n// ProcessRealUserID returns an attribute KeyValue conforming to the\n// \"process.real_user.id\" semantic conventions. It represents the real user ID\n// (RUID) of the process.\nfunc ProcessRealUserID(val int) attribute.KeyValue {\n\treturn ProcessRealUserIDKey.Int(val)\n}\n\n// ProcessRealUserName returns an attribute KeyValue conforming to the\n// \"process.real_user.name\" semantic conventions. It represents the username of\n// the real user of the process.\nfunc ProcessRealUserName(val string) attribute.KeyValue {\n\treturn ProcessRealUserNameKey.String(val)\n}\n\n// ProcessRuntimeDescription returns an attribute KeyValue conforming to the\n// \"process.runtime.description\" semantic conventions. It represents an\n// additional description about the runtime of the process, for example a\n// specific vendor customization of the runtime environment.\nfunc ProcessRuntimeDescription(val string) attribute.KeyValue {\n\treturn ProcessRuntimeDescriptionKey.String(val)\n}\n\n// ProcessRuntimeName returns an attribute KeyValue conforming to the\n// \"process.runtime.name\" semantic conventions. It represents the name of the\n// runtime of this process.\nfunc ProcessRuntimeName(val string) attribute.KeyValue {\n\treturn ProcessRuntimeNameKey.String(val)\n}\n\n// ProcessRuntimeVersion returns an attribute KeyValue conforming to the\n// \"process.runtime.version\" semantic conventions. It represents the version of\n// the runtime of this process, as returned by the runtime without modification.\nfunc ProcessRuntimeVersion(val string) attribute.KeyValue {\n\treturn ProcessRuntimeVersionKey.String(val)\n}\n\n// ProcessSavedUserID returns an attribute KeyValue conforming to the\n// \"process.saved_user.id\" semantic conventions. It represents the saved user ID\n// (SUID) of the process.\nfunc ProcessSavedUserID(val int) attribute.KeyValue {\n\treturn ProcessSavedUserIDKey.Int(val)\n}\n\n// ProcessSavedUserName returns an attribute KeyValue conforming to the\n// \"process.saved_user.name\" semantic conventions. It represents the username of\n// the saved user.\nfunc ProcessSavedUserName(val string) attribute.KeyValue {\n\treturn ProcessSavedUserNameKey.String(val)\n}\n\n// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the\n// \"process.session_leader.pid\" semantic conventions. It represents the PID of\n// the process's session leader. This is also the session ID (SID) of the\n// process.\nfunc ProcessSessionLeaderPID(val int) attribute.KeyValue {\n\treturn ProcessSessionLeaderPIDKey.Int(val)\n}\n\n// ProcessTitle returns an attribute KeyValue conforming to the \"process.title\"\n// semantic conventions. It represents the process title (proctitle).\nfunc ProcessTitle(val string) attribute.KeyValue {\n\treturn ProcessTitleKey.String(val)\n}\n\n// ProcessUserID returns an attribute KeyValue conforming to the\n// \"process.user.id\" semantic conventions. It represents the effective user ID\n// (EUID) of the process.\nfunc ProcessUserID(val int) attribute.KeyValue {\n\treturn ProcessUserIDKey.Int(val)\n}\n\n// ProcessUserName returns an attribute KeyValue conforming to the\n// \"process.user.name\" semantic conventions. It represents the username of the\n// effective user of the process.\nfunc ProcessUserName(val string) attribute.KeyValue {\n\treturn ProcessUserNameKey.String(val)\n}\n\n// ProcessVpid returns an attribute KeyValue conforming to the \"process.vpid\"\n// semantic conventions. It represents the virtual process identifier.\nfunc ProcessVpid(val int) attribute.KeyValue {\n\treturn ProcessVpidKey.Int(val)\n}\n\n// ProcessWorkingDirectory returns an attribute KeyValue conforming to the\n// \"process.working_directory\" semantic conventions. It represents the working\n// directory of the process.\nfunc ProcessWorkingDirectory(val string) attribute.KeyValue {\n\treturn ProcessWorkingDirectoryKey.String(val)\n}\n\n// Enum values for process.context_switch_type\nvar (\n\t// voluntary\n\t// Stability: development\n\tProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String(\"voluntary\")\n\t// involuntary\n\t// Stability: development\n\tProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String(\"involuntary\")\n)\n\n// Enum values for process.paging.fault_type\nvar (\n\t// major\n\t// Stability: development\n\tProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String(\"major\")\n\t// minor\n\t// Stability: development\n\tProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String(\"minor\")\n)\n\n// Namespace: profile\nconst (\n\t// ProfileFrameTypeKey is the attribute Key conforming to the\n\t// \"profile.frame.type\" semantic conventions. It represents the describes the\n\t// interpreter or compiler of a single frame.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cpython\"\n\tProfileFrameTypeKey = attribute.Key(\"profile.frame.type\")\n)\n\n// Enum values for profile.frame.type\nvar (\n\t// [.NET]\n\t//\n\t// Stability: development\n\t//\n\t// [.NET]: https://wikipedia.org/wiki/.NET\n\tProfileFrameTypeDotnet = ProfileFrameTypeKey.String(\"dotnet\")\n\t// [JVM]\n\t//\n\t// Stability: development\n\t//\n\t// [JVM]: https://wikipedia.org/wiki/Java_virtual_machine\n\tProfileFrameTypeJVM = ProfileFrameTypeKey.String(\"jvm\")\n\t// [Kernel]\n\t//\n\t// Stability: development\n\t//\n\t// [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system)\n\tProfileFrameTypeKernel = ProfileFrameTypeKey.String(\"kernel\")\n\t// Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a\n\t// more precise value MUST be used.\n\t//\n\t// Stability: development\n\t//\n\t// [C]: https://wikipedia.org/wiki/C_(programming_language)\n\t// [C++]: https://wikipedia.org/wiki/C%2B%2B\n\t// [Go]: https://wikipedia.org/wiki/Go_(programming_language)\n\t// [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)\n\tProfileFrameTypeNative = ProfileFrameTypeKey.String(\"native\")\n\t// [Perl]\n\t//\n\t// Stability: development\n\t//\n\t// [Perl]: https://wikipedia.org/wiki/Perl\n\tProfileFrameTypePerl = ProfileFrameTypeKey.String(\"perl\")\n\t// [PHP]\n\t//\n\t// Stability: development\n\t//\n\t// [PHP]: https://wikipedia.org/wiki/PHP\n\tProfileFrameTypePHP = ProfileFrameTypeKey.String(\"php\")\n\t// [Python]\n\t//\n\t// Stability: development\n\t//\n\t// [Python]: https://wikipedia.org/wiki/Python_(programming_language)\n\tProfileFrameTypeCpython = ProfileFrameTypeKey.String(\"cpython\")\n\t// [Ruby]\n\t//\n\t// Stability: development\n\t//\n\t// [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language)\n\tProfileFrameTypeRuby = ProfileFrameTypeKey.String(\"ruby\")\n\t// [V8JS]\n\t//\n\t// Stability: development\n\t//\n\t// [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine)\n\tProfileFrameTypeV8JS = ProfileFrameTypeKey.String(\"v8js\")\n\t// [Erlang]\n\t//\n\t// Stability: development\n\t//\n\t// [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)\n\tProfileFrameTypeBeam = ProfileFrameTypeKey.String(\"beam\")\n\t// [Go],\n\t//\n\t// Stability: development\n\t//\n\t// [Go]: https://wikipedia.org/wiki/Go_(programming_language)\n\tProfileFrameTypeGo = ProfileFrameTypeKey.String(\"go\")\n\t// [Rust]\n\t//\n\t// Stability: development\n\t//\n\t// [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)\n\tProfileFrameTypeRust = ProfileFrameTypeKey.String(\"rust\")\n)\n\n// Namespace: rpc\nconst (\n\t// RPCConnectRPCErrorCodeKey is the attribute Key conforming to the\n\t// \"rpc.connect_rpc.error_code\" semantic conventions. It represents the\n\t// [error codes] of the Connect request. Error codes are always string values.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [error codes]: https://connectrpc.com//docs/protocol/#error-codes\n\tRPCConnectRPCErrorCodeKey = attribute.Key(\"rpc.connect_rpc.error_code\")\n\n\t// RPCGRPCStatusCodeKey is the attribute Key conforming to the\n\t// \"rpc.grpc.status_code\" semantic conventions. It represents the\n\t// [numeric status code] of the gRPC request.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [numeric status code]: https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md\n\tRPCGRPCStatusCodeKey = attribute.Key(\"rpc.grpc.status_code\")\n\n\t// RPCJSONRPCErrorCodeKey is the attribute Key conforming to the\n\t// \"rpc.jsonrpc.error_code\" semantic conventions. It represents the `error.code`\n\t//  property of response if it is an error response.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: -32700, 100\n\tRPCJSONRPCErrorCodeKey = attribute.Key(\"rpc.jsonrpc.error_code\")\n\n\t// RPCJSONRPCErrorMessageKey is the attribute Key conforming to the\n\t// \"rpc.jsonrpc.error_message\" semantic conventions. It represents the\n\t// `error.message` property of response if it is an error response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Parse error\", \"User already exists\"\n\tRPCJSONRPCErrorMessageKey = attribute.Key(\"rpc.jsonrpc.error_message\")\n\n\t// RPCJSONRPCRequestIDKey is the attribute Key conforming to the\n\t// \"rpc.jsonrpc.request_id\" semantic conventions. It represents the `id`\n\t// property of request or response. Since protocol allows id to be int, string,\n\t// `null` or missing (for notifications), value is expected to be cast to string\n\t// for simplicity. Use empty string in case of `null` value. Omit entirely if\n\t// this is a notification.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10\", \"request-7\", \"\"\n\tRPCJSONRPCRequestIDKey = attribute.Key(\"rpc.jsonrpc.request_id\")\n\n\t// RPCJSONRPCVersionKey is the attribute Key conforming to the\n\t// \"rpc.jsonrpc.version\" semantic conventions. It represents the protocol\n\t// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0\n\t// doesn't specify this, the value can be omitted.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2.0\", \"1.0\"\n\tRPCJSONRPCVersionKey = attribute.Key(\"rpc.jsonrpc.version\")\n\n\t// RPCMessageCompressedSizeKey is the attribute Key conforming to the\n\t// \"rpc.message.compressed_size\" semantic conventions. It represents the\n\t// compressed size of the message in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageCompressedSizeKey = attribute.Key(\"rpc.message.compressed_size\")\n\n\t// RPCMessageIDKey is the attribute Key conforming to the \"rpc.message.id\"\n\t// semantic conventions. It MUST be calculated as two different counters\n\t// starting from `1` one for sent messages and one for received message..\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This way we guarantee that the values will be consistent between\n\t// different implementations.\n\tRPCMessageIDKey = attribute.Key(\"rpc.message.id\")\n\n\t// RPCMessageTypeKey is the attribute Key conforming to the \"rpc.message.type\"\n\t// semantic conventions. It represents the whether this is a received or sent\n\t// message.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageTypeKey = attribute.Key(\"rpc.message.type\")\n\n\t// RPCMessageUncompressedSizeKey is the attribute Key conforming to the\n\t// \"rpc.message.uncompressed_size\" semantic conventions. It represents the\n\t// uncompressed size of the message in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageUncompressedSizeKey = attribute.Key(\"rpc.message.uncompressed_size\")\n\n\t// RPCMethodKey is the attribute Key conforming to the \"rpc.method\" semantic\n\t// conventions. It represents the name of the (logical) method being called,\n\t// must be equal to the $method part in the span name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: exampleMethod\n\t// Note: This is the logical name of the method from the RPC interface\n\t// perspective, which can be different from the name of any implementing\n\t// method/function. The `code.function.name` attribute may be used to store the\n\t// latter (e.g., method actually executing the call on the server side, RPC\n\t// client stub method on the client side).\n\tRPCMethodKey = attribute.Key(\"rpc.method\")\n\n\t// RPCServiceKey is the attribute Key conforming to the \"rpc.service\" semantic\n\t// conventions. It represents the full (logical) name of the service being\n\t// called, including its package name, if applicable.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myservice.EchoService\n\t// Note: This is the logical name of the service from the RPC interface\n\t// perspective, which can be different from the name of any implementing class.\n\t// The `code.namespace` attribute may be used to store the latter (despite the\n\t// attribute name, it may include a class name; e.g., class with method actually\n\t// executing the call on the server side, RPC client stub class on the client\n\t// side).\n\tRPCServiceKey = attribute.Key(\"rpc.service\")\n\n\t// RPCSystemKey is the attribute Key conforming to the \"rpc.system\" semantic\n\t// conventions. It represents a string identifying the remoting system. See\n\t// below for a list of well-known identifiers.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCSystemKey = attribute.Key(\"rpc.system\")\n)\n\n// RPCConnectRPCRequestMetadata returns an attribute KeyValue conforming to the\n// \"rpc.connect_rpc.request.metadata\" semantic conventions. It represents the\n// connect request metadata, `<key>` being the normalized Connect Metadata key\n// (lowercase), the value being the metadata values.\nfunc RPCConnectRPCRequestMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.connect_rpc.request.metadata.\"+key, val)\n}\n\n// RPCConnectRPCResponseMetadata returns an attribute KeyValue conforming to the\n// \"rpc.connect_rpc.response.metadata\" semantic conventions. It represents the\n// connect response metadata, `<key>` being the normalized Connect Metadata key\n// (lowercase), the value being the metadata values.\nfunc RPCConnectRPCResponseMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.connect_rpc.response.metadata.\"+key, val)\n}\n\n// RPCGRPCRequestMetadata returns an attribute KeyValue conforming to the\n// \"rpc.grpc.request.metadata\" semantic conventions. It represents the gRPC\n// request metadata, `<key>` being the normalized gRPC Metadata key (lowercase),\n// the value being the metadata values.\nfunc RPCGRPCRequestMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.grpc.request.metadata.\"+key, val)\n}\n\n// RPCGRPCResponseMetadata returns an attribute KeyValue conforming to the\n// \"rpc.grpc.response.metadata\" semantic conventions. It represents the gRPC\n// response metadata, `<key>` being the normalized gRPC Metadata key (lowercase),\n// the value being the metadata values.\nfunc RPCGRPCResponseMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.grpc.response.metadata.\"+key, val)\n}\n\n// RPCJSONRPCErrorCode returns an attribute KeyValue conforming to the\n// \"rpc.jsonrpc.error_code\" semantic conventions. It represents the `error.code`\n// property of response if it is an error response.\nfunc RPCJSONRPCErrorCode(val int) attribute.KeyValue {\n\treturn RPCJSONRPCErrorCodeKey.Int(val)\n}\n\n// RPCJSONRPCErrorMessage returns an attribute KeyValue conforming to the\n// \"rpc.jsonrpc.error_message\" semantic conventions. It represents the\n// `error.message` property of response if it is an error response.\nfunc RPCJSONRPCErrorMessage(val string) attribute.KeyValue {\n\treturn RPCJSONRPCErrorMessageKey.String(val)\n}\n\n// RPCJSONRPCRequestID returns an attribute KeyValue conforming to the\n// \"rpc.jsonrpc.request_id\" semantic conventions. It represents the `id` property\n// of request or response. Since protocol allows id to be int, string, `null` or\n// missing (for notifications), value is expected to be cast to string for\n// simplicity. Use empty string in case of `null` value. Omit entirely if this is\n// a notification.\nfunc RPCJSONRPCRequestID(val string) attribute.KeyValue {\n\treturn RPCJSONRPCRequestIDKey.String(val)\n}\n\n// RPCJSONRPCVersion returns an attribute KeyValue conforming to the\n// \"rpc.jsonrpc.version\" semantic conventions. It represents the protocol version\n// as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't\n// specify this, the value can be omitted.\nfunc RPCJSONRPCVersion(val string) attribute.KeyValue {\n\treturn RPCJSONRPCVersionKey.String(val)\n}\n\n// RPCMessageCompressedSize returns an attribute KeyValue conforming to the\n// \"rpc.message.compressed_size\" semantic conventions. It represents the\n// compressed size of the message in bytes.\nfunc RPCMessageCompressedSize(val int) attribute.KeyValue {\n\treturn RPCMessageCompressedSizeKey.Int(val)\n}\n\n// RPCMessageID returns an attribute KeyValue conforming to the \"rpc.message.id\"\n// semantic conventions. It MUST be calculated as two different counters starting\n// from `1` one for sent messages and one for received message..\nfunc RPCMessageID(val int) attribute.KeyValue {\n\treturn RPCMessageIDKey.Int(val)\n}\n\n// RPCMessageUncompressedSize returns an attribute KeyValue conforming to the\n// \"rpc.message.uncompressed_size\" semantic conventions. It represents the\n// uncompressed size of the message in bytes.\nfunc RPCMessageUncompressedSize(val int) attribute.KeyValue {\n\treturn RPCMessageUncompressedSizeKey.Int(val)\n}\n\n// RPCMethod returns an attribute KeyValue conforming to the \"rpc.method\"\n// semantic conventions. It represents the name of the (logical) method being\n// called, must be equal to the $method part in the span name.\nfunc RPCMethod(val string) attribute.KeyValue {\n\treturn RPCMethodKey.String(val)\n}\n\n// RPCService returns an attribute KeyValue conforming to the \"rpc.service\"\n// semantic conventions. It represents the full (logical) name of the service\n// being called, including its package name, if applicable.\nfunc RPCService(val string) attribute.KeyValue {\n\treturn RPCServiceKey.String(val)\n}\n\n// Enum values for rpc.connect_rpc.error_code\nvar (\n\t// cancelled\n\t// Stability: development\n\tRPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String(\"cancelled\")\n\t// unknown\n\t// Stability: development\n\tRPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String(\"unknown\")\n\t// invalid_argument\n\t// Stability: development\n\tRPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String(\"invalid_argument\")\n\t// deadline_exceeded\n\t// Stability: development\n\tRPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String(\"deadline_exceeded\")\n\t// not_found\n\t// Stability: development\n\tRPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String(\"not_found\")\n\t// already_exists\n\t// Stability: development\n\tRPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String(\"already_exists\")\n\t// permission_denied\n\t// Stability: development\n\tRPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String(\"permission_denied\")\n\t// resource_exhausted\n\t// Stability: development\n\tRPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String(\"resource_exhausted\")\n\t// failed_precondition\n\t// Stability: development\n\tRPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String(\"failed_precondition\")\n\t// aborted\n\t// Stability: development\n\tRPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String(\"aborted\")\n\t// out_of_range\n\t// Stability: development\n\tRPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String(\"out_of_range\")\n\t// unimplemented\n\t// Stability: development\n\tRPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String(\"unimplemented\")\n\t// internal\n\t// Stability: development\n\tRPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String(\"internal\")\n\t// unavailable\n\t// Stability: development\n\tRPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String(\"unavailable\")\n\t// data_loss\n\t// Stability: development\n\tRPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String(\"data_loss\")\n\t// unauthenticated\n\t// Stability: development\n\tRPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String(\"unauthenticated\")\n)\n\n// Enum values for rpc.grpc.status_code\nvar (\n\t// OK\n\t// Stability: development\n\tRPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)\n\t// CANCELLED\n\t// Stability: development\n\tRPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)\n\t// UNKNOWN\n\t// Stability: development\n\tRPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)\n\t// INVALID_ARGUMENT\n\t// Stability: development\n\tRPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)\n\t// DEADLINE_EXCEEDED\n\t// Stability: development\n\tRPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)\n\t// NOT_FOUND\n\t// Stability: development\n\tRPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)\n\t// ALREADY_EXISTS\n\t// Stability: development\n\tRPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)\n\t// PERMISSION_DENIED\n\t// Stability: development\n\tRPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)\n\t// RESOURCE_EXHAUSTED\n\t// Stability: development\n\tRPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)\n\t// FAILED_PRECONDITION\n\t// Stability: development\n\tRPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)\n\t// ABORTED\n\t// Stability: development\n\tRPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)\n\t// OUT_OF_RANGE\n\t// Stability: development\n\tRPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)\n\t// UNIMPLEMENTED\n\t// Stability: development\n\tRPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)\n\t// INTERNAL\n\t// Stability: development\n\tRPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)\n\t// UNAVAILABLE\n\t// Stability: development\n\tRPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)\n\t// DATA_LOSS\n\t// Stability: development\n\tRPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)\n\t// UNAUTHENTICATED\n\t// Stability: development\n\tRPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)\n)\n\n// Enum values for rpc.message.type\nvar (\n\t// sent\n\t// Stability: development\n\tRPCMessageTypeSent = RPCMessageTypeKey.String(\"SENT\")\n\t// received\n\t// Stability: development\n\tRPCMessageTypeReceived = RPCMessageTypeKey.String(\"RECEIVED\")\n)\n\n// Enum values for rpc.system\nvar (\n\t// gRPC\n\t// Stability: development\n\tRPCSystemGRPC = RPCSystemKey.String(\"grpc\")\n\t// Java RMI\n\t// Stability: development\n\tRPCSystemJavaRmi = RPCSystemKey.String(\"java_rmi\")\n\t// .NET WCF\n\t// Stability: development\n\tRPCSystemDotnetWcf = RPCSystemKey.String(\"dotnet_wcf\")\n\t// Apache Dubbo\n\t// Stability: development\n\tRPCSystemApacheDubbo = RPCSystemKey.String(\"apache_dubbo\")\n\t// Connect RPC\n\t// Stability: development\n\tRPCSystemConnectRPC = RPCSystemKey.String(\"connect_rpc\")\n)\n\n// Namespace: security_rule\nconst (\n\t// SecurityRuleCategoryKey is the attribute Key conforming to the\n\t// \"security_rule.category\" semantic conventions. It represents a categorization\n\t// value keyword used by the entity using the rule for detection of this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Attempted Information Leak\"\n\tSecurityRuleCategoryKey = attribute.Key(\"security_rule.category\")\n\n\t// SecurityRuleDescriptionKey is the attribute Key conforming to the\n\t// \"security_rule.description\" semantic conventions. It represents the\n\t// description of the rule generating the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Block requests to public DNS over HTTPS / TLS protocols\"\n\tSecurityRuleDescriptionKey = attribute.Key(\"security_rule.description\")\n\n\t// SecurityRuleLicenseKey is the attribute Key conforming to the\n\t// \"security_rule.license\" semantic conventions. It represents the name of the\n\t// license under which the rule used to generate this event is made available.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Apache 2.0\"\n\tSecurityRuleLicenseKey = attribute.Key(\"security_rule.license\")\n\n\t// SecurityRuleNameKey is the attribute Key conforming to the\n\t// \"security_rule.name\" semantic conventions. It represents the name of the rule\n\t// or signature generating the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"BLOCK_DNS_over_TLS\"\n\tSecurityRuleNameKey = attribute.Key(\"security_rule.name\")\n\n\t// SecurityRuleReferenceKey is the attribute Key conforming to the\n\t// \"security_rule.reference\" semantic conventions. It represents the reference\n\t// URL to additional information about the rule used to generate this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://en.wikipedia.org/wiki/DNS_over_TLS\"\n\t// Note: The URL can point to the vendor’s documentation about the rule. If\n\t// that’s not available, it can also be a link to a more general page\n\t// describing this type of alert.\n\tSecurityRuleReferenceKey = attribute.Key(\"security_rule.reference\")\n\n\t// SecurityRuleRulesetNameKey is the attribute Key conforming to the\n\t// \"security_rule.ruleset.name\" semantic conventions. It represents the name of\n\t// the ruleset, policy, group, or parent category in which the rule used to\n\t// generate this event is a member.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Standard_Protocol_Filters\"\n\tSecurityRuleRulesetNameKey = attribute.Key(\"security_rule.ruleset.name\")\n\n\t// SecurityRuleUUIDKey is the attribute Key conforming to the\n\t// \"security_rule.uuid\" semantic conventions. It represents a rule ID that is\n\t// unique within the scope of a set or group of agents, observers, or other\n\t// entities using the rule for detection of this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"550e8400-e29b-41d4-a716-446655440000\", \"1100110011\"\n\tSecurityRuleUUIDKey = attribute.Key(\"security_rule.uuid\")\n\n\t// SecurityRuleVersionKey is the attribute Key conforming to the\n\t// \"security_rule.version\" semantic conventions. It represents the version /\n\t// revision of the rule being used for analysis.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.0.0\"\n\tSecurityRuleVersionKey = attribute.Key(\"security_rule.version\")\n)\n\n// SecurityRuleCategory returns an attribute KeyValue conforming to the\n// \"security_rule.category\" semantic conventions. It represents a categorization\n// value keyword used by the entity using the rule for detection of this event.\nfunc SecurityRuleCategory(val string) attribute.KeyValue {\n\treturn SecurityRuleCategoryKey.String(val)\n}\n\n// SecurityRuleDescription returns an attribute KeyValue conforming to the\n// \"security_rule.description\" semantic conventions. It represents the\n// description of the rule generating the event.\nfunc SecurityRuleDescription(val string) attribute.KeyValue {\n\treturn SecurityRuleDescriptionKey.String(val)\n}\n\n// SecurityRuleLicense returns an attribute KeyValue conforming to the\n// \"security_rule.license\" semantic conventions. It represents the name of the\n// license under which the rule used to generate this event is made available.\nfunc SecurityRuleLicense(val string) attribute.KeyValue {\n\treturn SecurityRuleLicenseKey.String(val)\n}\n\n// SecurityRuleName returns an attribute KeyValue conforming to the\n// \"security_rule.name\" semantic conventions. It represents the name of the rule\n// or signature generating the event.\nfunc SecurityRuleName(val string) attribute.KeyValue {\n\treturn SecurityRuleNameKey.String(val)\n}\n\n// SecurityRuleReference returns an attribute KeyValue conforming to the\n// \"security_rule.reference\" semantic conventions. It represents the reference\n// URL to additional information about the rule used to generate this event.\nfunc SecurityRuleReference(val string) attribute.KeyValue {\n\treturn SecurityRuleReferenceKey.String(val)\n}\n\n// SecurityRuleRulesetName returns an attribute KeyValue conforming to the\n// \"security_rule.ruleset.name\" semantic conventions. It represents the name of\n// the ruleset, policy, group, or parent category in which the rule used to\n// generate this event is a member.\nfunc SecurityRuleRulesetName(val string) attribute.KeyValue {\n\treturn SecurityRuleRulesetNameKey.String(val)\n}\n\n// SecurityRuleUUID returns an attribute KeyValue conforming to the\n// \"security_rule.uuid\" semantic conventions. It represents a rule ID that is\n// unique within the scope of a set or group of agents, observers, or other\n// entities using the rule for detection of this event.\nfunc SecurityRuleUUID(val string) attribute.KeyValue {\n\treturn SecurityRuleUUIDKey.String(val)\n}\n\n// SecurityRuleVersion returns an attribute KeyValue conforming to the\n// \"security_rule.version\" semantic conventions. It represents the version /\n// revision of the rule being used for analysis.\nfunc SecurityRuleVersion(val string) attribute.KeyValue {\n\treturn SecurityRuleVersionKey.String(val)\n}\n\n// Namespace: server\nconst (\n\t// ServerAddressKey is the attribute Key conforming to the \"server.address\"\n\t// semantic conventions. It represents the server domain name if available\n\t// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the client side, and when communicating through an\n\t// intermediary, `server.address` SHOULD represent the server address behind any\n\t// intermediaries, for example proxies, if it's available.\n\tServerAddressKey = attribute.Key(\"server.address\")\n\n\t// ServerPortKey is the attribute Key conforming to the \"server.port\" semantic\n\t// conventions. It represents the server port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 80, 8080, 443\n\t// Note: When observed from the client side, and when communicating through an\n\t// intermediary, `server.port` SHOULD represent the server port behind any\n\t// intermediaries, for example proxies, if it's available.\n\tServerPortKey = attribute.Key(\"server.port\")\n)\n\n// ServerAddress returns an attribute KeyValue conforming to the \"server.address\"\n// semantic conventions. It represents the server domain name if available\n// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\nfunc ServerAddress(val string) attribute.KeyValue {\n\treturn ServerAddressKey.String(val)\n}\n\n// ServerPort returns an attribute KeyValue conforming to the \"server.port\"\n// semantic conventions. It represents the server port number.\nfunc ServerPort(val int) attribute.KeyValue {\n\treturn ServerPortKey.Int(val)\n}\n\n// Namespace: service\nconst (\n\t// ServiceInstanceIDKey is the attribute Key conforming to the\n\t// \"service.instance.id\" semantic conventions. It represents the string ID of\n\t// the service instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"627cc493-f310-47de-96bd-71410b7dec09\"\n\t// Note: MUST be unique for each instance of the same\n\t// `service.namespace,service.name` pair (in other words\n\t// `service.namespace,service.name,service.instance.id` triplet MUST be globally\n\t// unique). The ID helps to\n\t// distinguish instances of the same service that exist at the same time (e.g.\n\t// instances of a horizontally scaled\n\t// service).\n\t//\n\t// Implementations, such as SDKs, are recommended to generate a random Version 1\n\t// or Version 4 [RFC\n\t// 4122] UUID, but are free to use an inherent unique ID as\n\t// the source of\n\t// this value if stability is desirable. In that case, the ID SHOULD be used as\n\t// source of a UUID Version 5 and\n\t// SHOULD use the following UUID as the namespace:\n\t// `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\n\t//\n\t// UUIDs are typically recommended, as only an opaque value for the purposes of\n\t// identifying a service instance is\n\t// needed. Similar to what can be seen in the man page for the\n\t// [`/etc/machine-id`] file, the underlying\n\t// data, such as pod name and namespace should be treated as confidential, being\n\t// the user's choice to expose it\n\t// or not via another resource attribute.\n\t//\n\t// For applications running behind an application server (like unicorn), we do\n\t// not recommend using one identifier\n\t// for all processes participating in the application. Instead, it's recommended\n\t// each division (e.g. a worker\n\t// thread in unicorn) to have its own instance.id.\n\t//\n\t// It's not recommended for a Collector to set `service.instance.id` if it can't\n\t// unambiguously determine the\n\t// service instance that is generating that telemetry. For instance, creating an\n\t// UUID based on `pod.name` will\n\t// likely be wrong, as the Collector might not know from which container within\n\t// that pod the telemetry originated.\n\t// However, Collectors can set the `service.instance.id` if they can\n\t// unambiguously determine the service instance\n\t// for that telemetry. This is typically the case for scraping receivers, as\n\t// they know the target address and\n\t// port.\n\t//\n\t// [RFC\n\t// 4122]: https://www.ietf.org/rfc/rfc4122.txt\n\t// [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html\n\tServiceInstanceIDKey = attribute.Key(\"service.instance.id\")\n\n\t// ServiceNameKey is the attribute Key conforming to the \"service.name\" semantic\n\t// conventions. It represents the logical name of the service.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"shoppingcart\"\n\t// Note: MUST be the same for all instances of horizontally scaled services. If\n\t// the value was not specified, SDKs MUST fallback to `unknown_service:`\n\t// concatenated with [`process.executable.name`], e.g. `unknown_service:bash`.\n\t// If `process.executable.name` is not available, the value MUST be set to\n\t// `unknown_service`.\n\t//\n\t// [`process.executable.name`]: process.md\n\tServiceNameKey = attribute.Key(\"service.name\")\n\n\t// ServiceNamespaceKey is the attribute Key conforming to the\n\t// \"service.namespace\" semantic conventions. It represents a namespace for\n\t// `service.name`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Shop\"\n\t// Note: A string value having a meaning that helps to distinguish a group of\n\t// services, for example the team name that owns a group of services.\n\t// `service.name` is expected to be unique within the same namespace. If\n\t// `service.namespace` is not specified in the Resource then `service.name` is\n\t// expected to be unique for all services that have no explicit namespace\n\t// defined (so the empty/unspecified namespace is simply one more valid\n\t// namespace). Zero-length namespace string is assumed equal to unspecified\n\t// namespace.\n\tServiceNamespaceKey = attribute.Key(\"service.namespace\")\n\n\t// ServiceVersionKey is the attribute Key conforming to the \"service.version\"\n\t// semantic conventions. It represents the version string of the service API or\n\t// implementation. The format is not defined by these conventions.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"2.0.0\", \"a01dbef8a\"\n\tServiceVersionKey = attribute.Key(\"service.version\")\n)\n\n// ServiceInstanceID returns an attribute KeyValue conforming to the\n// \"service.instance.id\" semantic conventions. It represents the string ID of the\n// service instance.\nfunc ServiceInstanceID(val string) attribute.KeyValue {\n\treturn ServiceInstanceIDKey.String(val)\n}\n\n// ServiceName returns an attribute KeyValue conforming to the \"service.name\"\n// semantic conventions. It represents the logical name of the service.\nfunc ServiceName(val string) attribute.KeyValue {\n\treturn ServiceNameKey.String(val)\n}\n\n// ServiceNamespace returns an attribute KeyValue conforming to the\n// \"service.namespace\" semantic conventions. It represents a namespace for\n// `service.name`.\nfunc ServiceNamespace(val string) attribute.KeyValue {\n\treturn ServiceNamespaceKey.String(val)\n}\n\n// ServiceVersion returns an attribute KeyValue conforming to the\n// \"service.version\" semantic conventions. It represents the version string of\n// the service API or implementation. The format is not defined by these\n// conventions.\nfunc ServiceVersion(val string) attribute.KeyValue {\n\treturn ServiceVersionKey.String(val)\n}\n\n// Namespace: session\nconst (\n\t// SessionIDKey is the attribute Key conforming to the \"session.id\" semantic\n\t// conventions. It represents a unique id to identify a session.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 00112233-4455-6677-8899-aabbccddeeff\n\tSessionIDKey = attribute.Key(\"session.id\")\n\n\t// SessionPreviousIDKey is the attribute Key conforming to the\n\t// \"session.previous_id\" semantic conventions. It represents the previous\n\t// `session.id` for this user, when known.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 00112233-4455-6677-8899-aabbccddeeff\n\tSessionPreviousIDKey = attribute.Key(\"session.previous_id\")\n)\n\n// SessionID returns an attribute KeyValue conforming to the \"session.id\"\n// semantic conventions. It represents a unique id to identify a session.\nfunc SessionID(val string) attribute.KeyValue {\n\treturn SessionIDKey.String(val)\n}\n\n// SessionPreviousID returns an attribute KeyValue conforming to the\n// \"session.previous_id\" semantic conventions. It represents the previous\n// `session.id` for this user, when known.\nfunc SessionPreviousID(val string) attribute.KeyValue {\n\treturn SessionPreviousIDKey.String(val)\n}\n\n// Namespace: signalr\nconst (\n\t// SignalRConnectionStatusKey is the attribute Key conforming to the\n\t// \"signalr.connection.status\" semantic conventions. It represents the signalR\n\t// HTTP connection closure status.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"app_shutdown\", \"timeout\"\n\tSignalRConnectionStatusKey = attribute.Key(\"signalr.connection.status\")\n\n\t// SignalRTransportKey is the attribute Key conforming to the\n\t// \"signalr.transport\" semantic conventions. It represents the\n\t// [SignalR transport type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"web_sockets\", \"long_polling\"\n\t//\n\t// [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md\n\tSignalRTransportKey = attribute.Key(\"signalr.transport\")\n)\n\n// Enum values for signalr.connection.status\nvar (\n\t// The connection was closed normally.\n\t// Stability: stable\n\tSignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String(\"normal_closure\")\n\t// The connection was closed due to a timeout.\n\t// Stability: stable\n\tSignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String(\"timeout\")\n\t// The connection was closed because the app is shutting down.\n\t// Stability: stable\n\tSignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String(\"app_shutdown\")\n)\n\n// Enum values for signalr.transport\nvar (\n\t// ServerSentEvents protocol\n\t// Stability: stable\n\tSignalRTransportServerSentEvents = SignalRTransportKey.String(\"server_sent_events\")\n\t// LongPolling protocol\n\t// Stability: stable\n\tSignalRTransportLongPolling = SignalRTransportKey.String(\"long_polling\")\n\t// WebSockets protocol\n\t// Stability: stable\n\tSignalRTransportWebSockets = SignalRTransportKey.String(\"web_sockets\")\n)\n\n// Namespace: source\nconst (\n\t// SourceAddressKey is the attribute Key conforming to the \"source.address\"\n\t// semantic conventions. It represents the source address - domain name if\n\t// available without reverse DNS lookup; otherwise, IP address or Unix domain\n\t// socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"source.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the destination side, and when communicating through\n\t// an intermediary, `source.address` SHOULD represent the source address behind\n\t// any intermediaries, for example proxies, if it's available.\n\tSourceAddressKey = attribute.Key(\"source.address\")\n\n\t// SourcePortKey is the attribute Key conforming to the \"source.port\" semantic\n\t// conventions. It represents the source port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3389, 2888\n\tSourcePortKey = attribute.Key(\"source.port\")\n)\n\n// SourceAddress returns an attribute KeyValue conforming to the \"source.address\"\n// semantic conventions. It represents the source address - domain name if\n// available without reverse DNS lookup; otherwise, IP address or Unix domain\n// socket name.\nfunc SourceAddress(val string) attribute.KeyValue {\n\treturn SourceAddressKey.String(val)\n}\n\n// SourcePort returns an attribute KeyValue conforming to the \"source.port\"\n// semantic conventions. It represents the source port number.\nfunc SourcePort(val int) attribute.KeyValue {\n\treturn SourcePortKey.Int(val)\n}\n\n// Namespace: system\nconst (\n\t// SystemCPULogicalNumberKey is the attribute Key conforming to the\n\t// \"system.cpu.logical_number\" semantic conventions. It represents the\n\t// deprecated, use `cpu.logical_number` instead.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1\n\tSystemCPULogicalNumberKey = attribute.Key(\"system.cpu.logical_number\")\n\n\t// SystemDeviceKey is the attribute Key conforming to the \"system.device\"\n\t// semantic conventions. It represents the device identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"(identifier)\"\n\tSystemDeviceKey = attribute.Key(\"system.device\")\n\n\t// SystemFilesystemModeKey is the attribute Key conforming to the\n\t// \"system.filesystem.mode\" semantic conventions. It represents the filesystem\n\t// mode.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"rw, ro\"\n\tSystemFilesystemModeKey = attribute.Key(\"system.filesystem.mode\")\n\n\t// SystemFilesystemMountpointKey is the attribute Key conforming to the\n\t// \"system.filesystem.mountpoint\" semantic conventions. It represents the\n\t// filesystem mount path.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/mnt/data\"\n\tSystemFilesystemMountpointKey = attribute.Key(\"system.filesystem.mountpoint\")\n\n\t// SystemFilesystemStateKey is the attribute Key conforming to the\n\t// \"system.filesystem.state\" semantic conventions. It represents the filesystem\n\t// state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"used\"\n\tSystemFilesystemStateKey = attribute.Key(\"system.filesystem.state\")\n\n\t// SystemFilesystemTypeKey is the attribute Key conforming to the\n\t// \"system.filesystem.type\" semantic conventions. It represents the filesystem\n\t// type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ext4\"\n\tSystemFilesystemTypeKey = attribute.Key(\"system.filesystem.type\")\n\n\t// SystemMemoryStateKey is the attribute Key conforming to the\n\t// \"system.memory.state\" semantic conventions. It represents the memory state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"free\", \"cached\"\n\tSystemMemoryStateKey = attribute.Key(\"system.memory.state\")\n\n\t// SystemPagingDirectionKey is the attribute Key conforming to the\n\t// \"system.paging.direction\" semantic conventions. It represents the paging\n\t// access direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"in\"\n\tSystemPagingDirectionKey = attribute.Key(\"system.paging.direction\")\n\n\t// SystemPagingStateKey is the attribute Key conforming to the\n\t// \"system.paging.state\" semantic conventions. It represents the memory paging\n\t// state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"free\"\n\tSystemPagingStateKey = attribute.Key(\"system.paging.state\")\n\n\t// SystemPagingTypeKey is the attribute Key conforming to the\n\t// \"system.paging.type\" semantic conventions. It represents the memory paging\n\t// type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"minor\"\n\tSystemPagingTypeKey = attribute.Key(\"system.paging.type\")\n\n\t// SystemProcessStatusKey is the attribute Key conforming to the\n\t// \"system.process.status\" semantic conventions. It represents the process\n\t// state, e.g., [Linux Process State Codes].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"running\"\n\t//\n\t// [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES\n\tSystemProcessStatusKey = attribute.Key(\"system.process.status\")\n)\n\n// SystemCPULogicalNumber returns an attribute KeyValue conforming to the\n// \"system.cpu.logical_number\" semantic conventions. It represents the\n// deprecated, use `cpu.logical_number` instead.\nfunc SystemCPULogicalNumber(val int) attribute.KeyValue {\n\treturn SystemCPULogicalNumberKey.Int(val)\n}\n\n// SystemDevice returns an attribute KeyValue conforming to the \"system.device\"\n// semantic conventions. It represents the device identifier.\nfunc SystemDevice(val string) attribute.KeyValue {\n\treturn SystemDeviceKey.String(val)\n}\n\n// SystemFilesystemMode returns an attribute KeyValue conforming to the\n// \"system.filesystem.mode\" semantic conventions. It represents the filesystem\n// mode.\nfunc SystemFilesystemMode(val string) attribute.KeyValue {\n\treturn SystemFilesystemModeKey.String(val)\n}\n\n// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the\n// \"system.filesystem.mountpoint\" semantic conventions. It represents the\n// filesystem mount path.\nfunc SystemFilesystemMountpoint(val string) attribute.KeyValue {\n\treturn SystemFilesystemMountpointKey.String(val)\n}\n\n// Enum values for system.filesystem.state\nvar (\n\t// used\n\t// Stability: development\n\tSystemFilesystemStateUsed = SystemFilesystemStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemFilesystemStateFree = SystemFilesystemStateKey.String(\"free\")\n\t// reserved\n\t// Stability: development\n\tSystemFilesystemStateReserved = SystemFilesystemStateKey.String(\"reserved\")\n)\n\n// Enum values for system.filesystem.type\nvar (\n\t// fat32\n\t// Stability: development\n\tSystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String(\"fat32\")\n\t// exfat\n\t// Stability: development\n\tSystemFilesystemTypeExfat = SystemFilesystemTypeKey.String(\"exfat\")\n\t// ntfs\n\t// Stability: development\n\tSystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String(\"ntfs\")\n\t// refs\n\t// Stability: development\n\tSystemFilesystemTypeRefs = SystemFilesystemTypeKey.String(\"refs\")\n\t// hfsplus\n\t// Stability: development\n\tSystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String(\"hfsplus\")\n\t// ext4\n\t// Stability: development\n\tSystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String(\"ext4\")\n)\n\n// Enum values for system.memory.state\nvar (\n\t// Actual used virtual memory in bytes.\n\t// Stability: development\n\tSystemMemoryStateUsed = SystemMemoryStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemMemoryStateFree = SystemMemoryStateKey.String(\"free\")\n\t// buffers\n\t// Stability: development\n\tSystemMemoryStateBuffers = SystemMemoryStateKey.String(\"buffers\")\n\t// cached\n\t// Stability: development\n\tSystemMemoryStateCached = SystemMemoryStateKey.String(\"cached\")\n)\n\n// Enum values for system.paging.direction\nvar (\n\t// in\n\t// Stability: development\n\tSystemPagingDirectionIn = SystemPagingDirectionKey.String(\"in\")\n\t// out\n\t// Stability: development\n\tSystemPagingDirectionOut = SystemPagingDirectionKey.String(\"out\")\n)\n\n// Enum values for system.paging.state\nvar (\n\t// used\n\t// Stability: development\n\tSystemPagingStateUsed = SystemPagingStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemPagingStateFree = SystemPagingStateKey.String(\"free\")\n)\n\n// Enum values for system.paging.type\nvar (\n\t// major\n\t// Stability: development\n\tSystemPagingTypeMajor = SystemPagingTypeKey.String(\"major\")\n\t// minor\n\t// Stability: development\n\tSystemPagingTypeMinor = SystemPagingTypeKey.String(\"minor\")\n)\n\n// Enum values for system.process.status\nvar (\n\t// running\n\t// Stability: development\n\tSystemProcessStatusRunning = SystemProcessStatusKey.String(\"running\")\n\t// sleeping\n\t// Stability: development\n\tSystemProcessStatusSleeping = SystemProcessStatusKey.String(\"sleeping\")\n\t// stopped\n\t// Stability: development\n\tSystemProcessStatusStopped = SystemProcessStatusKey.String(\"stopped\")\n\t// defunct\n\t// Stability: development\n\tSystemProcessStatusDefunct = SystemProcessStatusKey.String(\"defunct\")\n)\n\n// Namespace: telemetry\nconst (\n\t// TelemetryDistroNameKey is the attribute Key conforming to the\n\t// \"telemetry.distro.name\" semantic conventions. It represents the name of the\n\t// auto instrumentation agent or distribution, if used.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"parts-unlimited-java\"\n\t// Note: Official auto instrumentation agents and distributions SHOULD set the\n\t// `telemetry.distro.name` attribute to\n\t// a string starting with `opentelemetry-`, e.g.\n\t// `opentelemetry-java-instrumentation`.\n\tTelemetryDistroNameKey = attribute.Key(\"telemetry.distro.name\")\n\n\t// TelemetryDistroVersionKey is the attribute Key conforming to the\n\t// \"telemetry.distro.version\" semantic conventions. It represents the version\n\t// string of the auto instrumentation agent or distribution, if used.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2.3\"\n\tTelemetryDistroVersionKey = attribute.Key(\"telemetry.distro.version\")\n\n\t// TelemetrySDKLanguageKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.language\" semantic conventions. It represents the language of\n\t// the telemetry SDK.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\tTelemetrySDKLanguageKey = attribute.Key(\"telemetry.sdk.language\")\n\n\t// TelemetrySDKNameKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.name\" semantic conventions. It represents the name of the\n\t// telemetry SDK as defined above.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"opentelemetry\"\n\t// Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to\n\t// `opentelemetry`.\n\t// If another SDK, like a fork or a vendor-provided implementation, is used,\n\t// this SDK MUST set the\n\t// `telemetry.sdk.name` attribute to the fully-qualified class or module name of\n\t// this SDK's main entry point\n\t// or another suitable identifier depending on the language.\n\t// The identifier `opentelemetry` is reserved and MUST NOT be used in this case.\n\t// All custom identifiers SHOULD be stable across different versions of an\n\t// implementation.\n\tTelemetrySDKNameKey = attribute.Key(\"telemetry.sdk.name\")\n\n\t// TelemetrySDKVersionKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.version\" semantic conventions. It represents the version\n\t// string of the telemetry SDK.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.2.3\"\n\tTelemetrySDKVersionKey = attribute.Key(\"telemetry.sdk.version\")\n)\n\n// TelemetryDistroName returns an attribute KeyValue conforming to the\n// \"telemetry.distro.name\" semantic conventions. It represents the name of the\n// auto instrumentation agent or distribution, if used.\nfunc TelemetryDistroName(val string) attribute.KeyValue {\n\treturn TelemetryDistroNameKey.String(val)\n}\n\n// TelemetryDistroVersion returns an attribute KeyValue conforming to the\n// \"telemetry.distro.version\" semantic conventions. It represents the version\n// string of the auto instrumentation agent or distribution, if used.\nfunc TelemetryDistroVersion(val string) attribute.KeyValue {\n\treturn TelemetryDistroVersionKey.String(val)\n}\n\n// TelemetrySDKName returns an attribute KeyValue conforming to the\n// \"telemetry.sdk.name\" semantic conventions. It represents the name of the\n// telemetry SDK as defined above.\nfunc TelemetrySDKName(val string) attribute.KeyValue {\n\treturn TelemetrySDKNameKey.String(val)\n}\n\n// TelemetrySDKVersion returns an attribute KeyValue conforming to the\n// \"telemetry.sdk.version\" semantic conventions. It represents the version string\n// of the telemetry SDK.\nfunc TelemetrySDKVersion(val string) attribute.KeyValue {\n\treturn TelemetrySDKVersionKey.String(val)\n}\n\n// Enum values for telemetry.sdk.language\nvar (\n\t// cpp\n\t// Stability: stable\n\tTelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String(\"cpp\")\n\t// dotnet\n\t// Stability: stable\n\tTelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String(\"dotnet\")\n\t// erlang\n\t// Stability: stable\n\tTelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String(\"erlang\")\n\t// go\n\t// Stability: stable\n\tTelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String(\"go\")\n\t// java\n\t// Stability: stable\n\tTelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String(\"java\")\n\t// nodejs\n\t// Stability: stable\n\tTelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String(\"nodejs\")\n\t// php\n\t// Stability: stable\n\tTelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String(\"php\")\n\t// python\n\t// Stability: stable\n\tTelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String(\"python\")\n\t// ruby\n\t// Stability: stable\n\tTelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String(\"ruby\")\n\t// rust\n\t// Stability: stable\n\tTelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String(\"rust\")\n\t// swift\n\t// Stability: stable\n\tTelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String(\"swift\")\n\t// webjs\n\t// Stability: stable\n\tTelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String(\"webjs\")\n)\n\n// Namespace: test\nconst (\n\t// TestCaseNameKey is the attribute Key conforming to the \"test.case.name\"\n\t// semantic conventions. It represents the fully qualified human readable name\n\t// of the [test case].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"org.example.TestCase1.test1\", \"example/tests/TestCase1.test1\",\n\t// \"ExampleTestCase1_test1\"\n\t//\n\t// [test case]: https://wikipedia.org/wiki/Test_case\n\tTestCaseNameKey = attribute.Key(\"test.case.name\")\n\n\t// TestCaseResultStatusKey is the attribute Key conforming to the\n\t// \"test.case.result.status\" semantic conventions. It represents the status of\n\t// the actual test case result from test execution.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pass\", \"fail\"\n\tTestCaseResultStatusKey = attribute.Key(\"test.case.result.status\")\n\n\t// TestSuiteNameKey is the attribute Key conforming to the \"test.suite.name\"\n\t// semantic conventions. It represents the human readable name of a [test suite]\n\t// .\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TestSuite1\"\n\t//\n\t// [test suite]: https://wikipedia.org/wiki/Test_suite\n\tTestSuiteNameKey = attribute.Key(\"test.suite.name\")\n\n\t// TestSuiteRunStatusKey is the attribute Key conforming to the\n\t// \"test.suite.run.status\" semantic conventions. It represents the status of the\n\t// test suite run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"skipped\", \"aborted\", \"timed_out\",\n\t// \"in_progress\"\n\tTestSuiteRunStatusKey = attribute.Key(\"test.suite.run.status\")\n)\n\n// TestCaseName returns an attribute KeyValue conforming to the \"test.case.name\"\n// semantic conventions. It represents the fully qualified human readable name of\n// the [test case].\n//\n// [test case]: https://wikipedia.org/wiki/Test_case\nfunc TestCaseName(val string) attribute.KeyValue {\n\treturn TestCaseNameKey.String(val)\n}\n\n// TestSuiteName returns an attribute KeyValue conforming to the\n// \"test.suite.name\" semantic conventions. It represents the human readable name\n// of a [test suite].\n//\n// [test suite]: https://wikipedia.org/wiki/Test_suite\nfunc TestSuiteName(val string) attribute.KeyValue {\n\treturn TestSuiteNameKey.String(val)\n}\n\n// Enum values for test.case.result.status\nvar (\n\t// pass\n\t// Stability: development\n\tTestCaseResultStatusPass = TestCaseResultStatusKey.String(\"pass\")\n\t// fail\n\t// Stability: development\n\tTestCaseResultStatusFail = TestCaseResultStatusKey.String(\"fail\")\n)\n\n// Enum values for test.suite.run.status\nvar (\n\t// success\n\t// Stability: development\n\tTestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String(\"success\")\n\t// failure\n\t// Stability: development\n\tTestSuiteRunStatusFailure = TestSuiteRunStatusKey.String(\"failure\")\n\t// skipped\n\t// Stability: development\n\tTestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String(\"skipped\")\n\t// aborted\n\t// Stability: development\n\tTestSuiteRunStatusAborted = TestSuiteRunStatusKey.String(\"aborted\")\n\t// timed_out\n\t// Stability: development\n\tTestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String(\"timed_out\")\n\t// in_progress\n\t// Stability: development\n\tTestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String(\"in_progress\")\n)\n\n// Namespace: thread\nconst (\n\t// ThreadIDKey is the attribute Key conforming to the \"thread.id\" semantic\n\t// conventions. It represents the current \"managed\" thread ID (as opposed to OS\n\t// thread ID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tThreadIDKey = attribute.Key(\"thread.id\")\n\n\t// ThreadNameKey is the attribute Key conforming to the \"thread.name\" semantic\n\t// conventions. It represents the current thread name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: main\n\tThreadNameKey = attribute.Key(\"thread.name\")\n)\n\n// ThreadID returns an attribute KeyValue conforming to the \"thread.id\" semantic\n// conventions. It represents the current \"managed\" thread ID (as opposed to OS\n// thread ID).\nfunc ThreadID(val int) attribute.KeyValue {\n\treturn ThreadIDKey.Int(val)\n}\n\n// ThreadName returns an attribute KeyValue conforming to the \"thread.name\"\n// semantic conventions. It represents the current thread name.\nfunc ThreadName(val string) attribute.KeyValue {\n\treturn ThreadNameKey.String(val)\n}\n\n// Namespace: tls\nconst (\n\t// TLSCipherKey is the attribute Key conforming to the \"tls.cipher\" semantic\n\t// conventions. It represents the string indicating the [cipher] used during the\n\t// current connection.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TLS_RSA_WITH_3DES_EDE_CBC_SHA\",\n\t// \"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\"\n\t// Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions`\n\t// of the [registered TLS Cipher Suits].\n\t//\n\t// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5\n\t// [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4\n\tTLSCipherKey = attribute.Key(\"tls.cipher\")\n\n\t// TLSClientCertificateKey is the attribute Key conforming to the\n\t// \"tls.client.certificate\" semantic conventions. It represents the PEM-encoded\n\t// stand-alone certificate offered by the client. This is usually\n\t// mutually-exclusive of `client.certificate_chain` since this value also exists\n\t// in that list.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\"\n\tTLSClientCertificateKey = attribute.Key(\"tls.client.certificate\")\n\n\t// TLSClientCertificateChainKey is the attribute Key conforming to the\n\t// \"tls.client.certificate_chain\" semantic conventions. It represents the array\n\t// of PEM-encoded certificates that make up the certificate chain offered by the\n\t// client. This is usually mutually-exclusive of `client.certificate` since that\n\t// value should be the first certificate in the chain.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\", \"MI...\"\n\tTLSClientCertificateChainKey = attribute.Key(\"tls.client.certificate_chain\")\n\n\t// TLSClientHashMd5Key is the attribute Key conforming to the\n\t// \"tls.client.hash.md5\" semantic conventions. It represents the certificate\n\t// fingerprint using the MD5 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"\n\tTLSClientHashMd5Key = attribute.Key(\"tls.client.hash.md5\")\n\n\t// TLSClientHashSha1Key is the attribute Key conforming to the\n\t// \"tls.client.hash.sha1\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA1 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9E393D93138888D288266C2D915214D1D1CCEB2A\"\n\tTLSClientHashSha1Key = attribute.Key(\"tls.client.hash.sha1\")\n\n\t// TLSClientHashSha256Key is the attribute Key conforming to the\n\t// \"tls.client.hash.sha256\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA256 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"\n\tTLSClientHashSha256Key = attribute.Key(\"tls.client.hash.sha256\")\n\n\t// TLSClientIssuerKey is the attribute Key conforming to the \"tls.client.issuer\"\n\t// semantic conventions. It represents the distinguished name of [subject] of\n\t// the issuer of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"\n\t//\n\t// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\n\tTLSClientIssuerKey = attribute.Key(\"tls.client.issuer\")\n\n\t// TLSClientJa3Key is the attribute Key conforming to the \"tls.client.ja3\"\n\t// semantic conventions. It represents a hash that identifies clients based on\n\t// how they perform an SSL/TLS handshake.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"d4e5b18d6b55c71272893221c96ba240\"\n\tTLSClientJa3Key = attribute.Key(\"tls.client.ja3\")\n\n\t// TLSClientNotAfterKey is the attribute Key conforming to the\n\t// \"tls.client.not_after\" semantic conventions. It represents the date/Time\n\t// indicating when client certificate is no longer considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T00:00:00.000Z\"\n\tTLSClientNotAfterKey = attribute.Key(\"tls.client.not_after\")\n\n\t// TLSClientNotBeforeKey is the attribute Key conforming to the\n\t// \"tls.client.not_before\" semantic conventions. It represents the date/Time\n\t// indicating when client certificate is first considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1970-01-01T00:00:00.000Z\"\n\tTLSClientNotBeforeKey = attribute.Key(\"tls.client.not_before\")\n\n\t// TLSClientSubjectKey is the attribute Key conforming to the\n\t// \"tls.client.subject\" semantic conventions. It represents the distinguished\n\t// name of subject of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=myclient, OU=Documentation Team, DC=example, DC=com\"\n\tTLSClientSubjectKey = attribute.Key(\"tls.client.subject\")\n\n\t// TLSClientSupportedCiphersKey is the attribute Key conforming to the\n\t// \"tls.client.supported_ciphers\" semantic conventions. It represents the array\n\t// of ciphers offered by the client during the client hello.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\",\n\t// \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\"\n\tTLSClientSupportedCiphersKey = attribute.Key(\"tls.client.supported_ciphers\")\n\n\t// TLSCurveKey is the attribute Key conforming to the \"tls.curve\" semantic\n\t// conventions. It represents the string indicating the curve used for the given\n\t// cipher, when applicable.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"secp256r1\"\n\tTLSCurveKey = attribute.Key(\"tls.curve\")\n\n\t// TLSEstablishedKey is the attribute Key conforming to the \"tls.established\"\n\t// semantic conventions. It represents the boolean flag indicating if the TLS\n\t// negotiation was successful and transitioned to an encrypted tunnel.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: true\n\tTLSEstablishedKey = attribute.Key(\"tls.established\")\n\n\t// TLSNextProtocolKey is the attribute Key conforming to the \"tls.next_protocol\"\n\t// semantic conventions. It represents the string indicating the protocol being\n\t// tunneled. Per the values in the [IANA registry], this string should be lower\n\t// case.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"http/1.1\"\n\t//\n\t// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\n\tTLSNextProtocolKey = attribute.Key(\"tls.next_protocol\")\n\n\t// TLSProtocolNameKey is the attribute Key conforming to the \"tls.protocol.name\"\n\t// semantic conventions. It represents the normalized lowercase protocol name\n\t// parsed from original string of the negotiated [SSL/TLS protocol version].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\n\tTLSProtocolNameKey = attribute.Key(\"tls.protocol.name\")\n\n\t// TLSProtocolVersionKey is the attribute Key conforming to the\n\t// \"tls.protocol.version\" semantic conventions. It represents the numeric part\n\t// of the version parsed from the original string of the negotiated\n\t// [SSL/TLS protocol version].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2\", \"3\"\n\t//\n\t// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\n\tTLSProtocolVersionKey = attribute.Key(\"tls.protocol.version\")\n\n\t// TLSResumedKey is the attribute Key conforming to the \"tls.resumed\" semantic\n\t// conventions. It represents the boolean flag indicating if this TLS connection\n\t// was resumed from an existing TLS negotiation.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: true\n\tTLSResumedKey = attribute.Key(\"tls.resumed\")\n\n\t// TLSServerCertificateKey is the attribute Key conforming to the\n\t// \"tls.server.certificate\" semantic conventions. It represents the PEM-encoded\n\t// stand-alone certificate offered by the server. This is usually\n\t// mutually-exclusive of `server.certificate_chain` since this value also exists\n\t// in that list.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\"\n\tTLSServerCertificateKey = attribute.Key(\"tls.server.certificate\")\n\n\t// TLSServerCertificateChainKey is the attribute Key conforming to the\n\t// \"tls.server.certificate_chain\" semantic conventions. It represents the array\n\t// of PEM-encoded certificates that make up the certificate chain offered by the\n\t// server. This is usually mutually-exclusive of `server.certificate` since that\n\t// value should be the first certificate in the chain.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\", \"MI...\"\n\tTLSServerCertificateChainKey = attribute.Key(\"tls.server.certificate_chain\")\n\n\t// TLSServerHashMd5Key is the attribute Key conforming to the\n\t// \"tls.server.hash.md5\" semantic conventions. It represents the certificate\n\t// fingerprint using the MD5 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"\n\tTLSServerHashMd5Key = attribute.Key(\"tls.server.hash.md5\")\n\n\t// TLSServerHashSha1Key is the attribute Key conforming to the\n\t// \"tls.server.hash.sha1\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA1 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9E393D93138888D288266C2D915214D1D1CCEB2A\"\n\tTLSServerHashSha1Key = attribute.Key(\"tls.server.hash.sha1\")\n\n\t// TLSServerHashSha256Key is the attribute Key conforming to the\n\t// \"tls.server.hash.sha256\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA256 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"\n\tTLSServerHashSha256Key = attribute.Key(\"tls.server.hash.sha256\")\n\n\t// TLSServerIssuerKey is the attribute Key conforming to the \"tls.server.issuer\"\n\t// semantic conventions. It represents the distinguished name of [subject] of\n\t// the issuer of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"\n\t//\n\t// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\n\tTLSServerIssuerKey = attribute.Key(\"tls.server.issuer\")\n\n\t// TLSServerJa3sKey is the attribute Key conforming to the \"tls.server.ja3s\"\n\t// semantic conventions. It represents a hash that identifies servers based on\n\t// how they perform an SSL/TLS handshake.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"d4e5b18d6b55c71272893221c96ba240\"\n\tTLSServerJa3sKey = attribute.Key(\"tls.server.ja3s\")\n\n\t// TLSServerNotAfterKey is the attribute Key conforming to the\n\t// \"tls.server.not_after\" semantic conventions. It represents the date/Time\n\t// indicating when server certificate is no longer considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T00:00:00.000Z\"\n\tTLSServerNotAfterKey = attribute.Key(\"tls.server.not_after\")\n\n\t// TLSServerNotBeforeKey is the attribute Key conforming to the\n\t// \"tls.server.not_before\" semantic conventions. It represents the date/Time\n\t// indicating when server certificate is first considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1970-01-01T00:00:00.000Z\"\n\tTLSServerNotBeforeKey = attribute.Key(\"tls.server.not_before\")\n\n\t// TLSServerSubjectKey is the attribute Key conforming to the\n\t// \"tls.server.subject\" semantic conventions. It represents the distinguished\n\t// name of subject of the x.509 certificate presented by the server.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=myserver, OU=Documentation Team, DC=example, DC=com\"\n\tTLSServerSubjectKey = attribute.Key(\"tls.server.subject\")\n)\n\n// TLSCipher returns an attribute KeyValue conforming to the \"tls.cipher\"\n// semantic conventions. It represents the string indicating the [cipher] used\n// during the current connection.\n//\n// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5\nfunc TLSCipher(val string) attribute.KeyValue {\n\treturn TLSCipherKey.String(val)\n}\n\n// TLSClientCertificate returns an attribute KeyValue conforming to the\n// \"tls.client.certificate\" semantic conventions. It represents the PEM-encoded\n// stand-alone certificate offered by the client. This is usually\n// mutually-exclusive of `client.certificate_chain` since this value also exists\n// in that list.\nfunc TLSClientCertificate(val string) attribute.KeyValue {\n\treturn TLSClientCertificateKey.String(val)\n}\n\n// TLSClientCertificateChain returns an attribute KeyValue conforming to the\n// \"tls.client.certificate_chain\" semantic conventions. It represents the array\n// of PEM-encoded certificates that make up the certificate chain offered by the\n// client. This is usually mutually-exclusive of `client.certificate` since that\n// value should be the first certificate in the chain.\nfunc TLSClientCertificateChain(val ...string) attribute.KeyValue {\n\treturn TLSClientCertificateChainKey.StringSlice(val)\n}\n\n// TLSClientHashMd5 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.md5\" semantic conventions. It represents the certificate\n// fingerprint using the MD5 digest of DER-encoded version of certificate offered\n// by the client. For consistency with other hash values, this value should be\n// formatted as an uppercase hash.\nfunc TLSClientHashMd5(val string) attribute.KeyValue {\n\treturn TLSClientHashMd5Key.String(val)\n}\n\n// TLSClientHashSha1 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.sha1\" semantic conventions. It represents the certificate\n// fingerprint using the SHA1 digest of DER-encoded version of certificate\n// offered by the client. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSClientHashSha1(val string) attribute.KeyValue {\n\treturn TLSClientHashSha1Key.String(val)\n}\n\n// TLSClientHashSha256 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.sha256\" semantic conventions. It represents the certificate\n// fingerprint using the SHA256 digest of DER-encoded version of certificate\n// offered by the client. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSClientHashSha256(val string) attribute.KeyValue {\n\treturn TLSClientHashSha256Key.String(val)\n}\n\n// TLSClientIssuer returns an attribute KeyValue conforming to the\n// \"tls.client.issuer\" semantic conventions. It represents the distinguished name\n// of [subject] of the issuer of the x.509 certificate presented by the client.\n//\n// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\nfunc TLSClientIssuer(val string) attribute.KeyValue {\n\treturn TLSClientIssuerKey.String(val)\n}\n\n// TLSClientJa3 returns an attribute KeyValue conforming to the \"tls.client.ja3\"\n// semantic conventions. It represents a hash that identifies clients based on\n// how they perform an SSL/TLS handshake.\nfunc TLSClientJa3(val string) attribute.KeyValue {\n\treturn TLSClientJa3Key.String(val)\n}\n\n// TLSClientNotAfter returns an attribute KeyValue conforming to the\n// \"tls.client.not_after\" semantic conventions. It represents the date/Time\n// indicating when client certificate is no longer considered valid.\nfunc TLSClientNotAfter(val string) attribute.KeyValue {\n\treturn TLSClientNotAfterKey.String(val)\n}\n\n// TLSClientNotBefore returns an attribute KeyValue conforming to the\n// \"tls.client.not_before\" semantic conventions. It represents the date/Time\n// indicating when client certificate is first considered valid.\nfunc TLSClientNotBefore(val string) attribute.KeyValue {\n\treturn TLSClientNotBeforeKey.String(val)\n}\n\n// TLSClientSubject returns an attribute KeyValue conforming to the\n// \"tls.client.subject\" semantic conventions. It represents the distinguished\n// name of subject of the x.509 certificate presented by the client.\nfunc TLSClientSubject(val string) attribute.KeyValue {\n\treturn TLSClientSubjectKey.String(val)\n}\n\n// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the\n// \"tls.client.supported_ciphers\" semantic conventions. It represents the array\n// of ciphers offered by the client during the client hello.\nfunc TLSClientSupportedCiphers(val ...string) attribute.KeyValue {\n\treturn TLSClientSupportedCiphersKey.StringSlice(val)\n}\n\n// TLSCurve returns an attribute KeyValue conforming to the \"tls.curve\" semantic\n// conventions. It represents the string indicating the curve used for the given\n// cipher, when applicable.\nfunc TLSCurve(val string) attribute.KeyValue {\n\treturn TLSCurveKey.String(val)\n}\n\n// TLSEstablished returns an attribute KeyValue conforming to the\n// \"tls.established\" semantic conventions. It represents the boolean flag\n// indicating if the TLS negotiation was successful and transitioned to an\n// encrypted tunnel.\nfunc TLSEstablished(val bool) attribute.KeyValue {\n\treturn TLSEstablishedKey.Bool(val)\n}\n\n// TLSNextProtocol returns an attribute KeyValue conforming to the\n// \"tls.next_protocol\" semantic conventions. It represents the string indicating\n// the protocol being tunneled. Per the values in the [IANA registry], this\n// string should be lower case.\n//\n// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\nfunc TLSNextProtocol(val string) attribute.KeyValue {\n\treturn TLSNextProtocolKey.String(val)\n}\n\n// TLSProtocolVersion returns an attribute KeyValue conforming to the\n// \"tls.protocol.version\" semantic conventions. It represents the numeric part of\n// the version parsed from the original string of the negotiated\n// [SSL/TLS protocol version].\n//\n// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\nfunc TLSProtocolVersion(val string) attribute.KeyValue {\n\treturn TLSProtocolVersionKey.String(val)\n}\n\n// TLSResumed returns an attribute KeyValue conforming to the \"tls.resumed\"\n// semantic conventions. It represents the boolean flag indicating if this TLS\n// connection was resumed from an existing TLS negotiation.\nfunc TLSResumed(val bool) attribute.KeyValue {\n\treturn TLSResumedKey.Bool(val)\n}\n\n// TLSServerCertificate returns an attribute KeyValue conforming to the\n// \"tls.server.certificate\" semantic conventions. It represents the PEM-encoded\n// stand-alone certificate offered by the server. This is usually\n// mutually-exclusive of `server.certificate_chain` since this value also exists\n// in that list.\nfunc TLSServerCertificate(val string) attribute.KeyValue {\n\treturn TLSServerCertificateKey.String(val)\n}\n\n// TLSServerCertificateChain returns an attribute KeyValue conforming to the\n// \"tls.server.certificate_chain\" semantic conventions. It represents the array\n// of PEM-encoded certificates that make up the certificate chain offered by the\n// server. This is usually mutually-exclusive of `server.certificate` since that\n// value should be the first certificate in the chain.\nfunc TLSServerCertificateChain(val ...string) attribute.KeyValue {\n\treturn TLSServerCertificateChainKey.StringSlice(val)\n}\n\n// TLSServerHashMd5 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.md5\" semantic conventions. It represents the certificate\n// fingerprint using the MD5 digest of DER-encoded version of certificate offered\n// by the server. For consistency with other hash values, this value should be\n// formatted as an uppercase hash.\nfunc TLSServerHashMd5(val string) attribute.KeyValue {\n\treturn TLSServerHashMd5Key.String(val)\n}\n\n// TLSServerHashSha1 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.sha1\" semantic conventions. It represents the certificate\n// fingerprint using the SHA1 digest of DER-encoded version of certificate\n// offered by the server. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSServerHashSha1(val string) attribute.KeyValue {\n\treturn TLSServerHashSha1Key.String(val)\n}\n\n// TLSServerHashSha256 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.sha256\" semantic conventions. It represents the certificate\n// fingerprint using the SHA256 digest of DER-encoded version of certificate\n// offered by the server. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSServerHashSha256(val string) attribute.KeyValue {\n\treturn TLSServerHashSha256Key.String(val)\n}\n\n// TLSServerIssuer returns an attribute KeyValue conforming to the\n// \"tls.server.issuer\" semantic conventions. It represents the distinguished name\n// of [subject] of the issuer of the x.509 certificate presented by the client.\n//\n// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\nfunc TLSServerIssuer(val string) attribute.KeyValue {\n\treturn TLSServerIssuerKey.String(val)\n}\n\n// TLSServerJa3s returns an attribute KeyValue conforming to the\n// \"tls.server.ja3s\" semantic conventions. It represents a hash that identifies\n// servers based on how they perform an SSL/TLS handshake.\nfunc TLSServerJa3s(val string) attribute.KeyValue {\n\treturn TLSServerJa3sKey.String(val)\n}\n\n// TLSServerNotAfter returns an attribute KeyValue conforming to the\n// \"tls.server.not_after\" semantic conventions. It represents the date/Time\n// indicating when server certificate is no longer considered valid.\nfunc TLSServerNotAfter(val string) attribute.KeyValue {\n\treturn TLSServerNotAfterKey.String(val)\n}\n\n// TLSServerNotBefore returns an attribute KeyValue conforming to the\n// \"tls.server.not_before\" semantic conventions. It represents the date/Time\n// indicating when server certificate is first considered valid.\nfunc TLSServerNotBefore(val string) attribute.KeyValue {\n\treturn TLSServerNotBeforeKey.String(val)\n}\n\n// TLSServerSubject returns an attribute KeyValue conforming to the\n// \"tls.server.subject\" semantic conventions. It represents the distinguished\n// name of subject of the x.509 certificate presented by the server.\nfunc TLSServerSubject(val string) attribute.KeyValue {\n\treturn TLSServerSubjectKey.String(val)\n}\n\n// Enum values for tls.protocol.name\nvar (\n\t// ssl\n\t// Stability: development\n\tTLSProtocolNameSsl = TLSProtocolNameKey.String(\"ssl\")\n\t// tls\n\t// Stability: development\n\tTLSProtocolNameTLS = TLSProtocolNameKey.String(\"tls\")\n)\n\n// Namespace: url\nconst (\n\t// URLDomainKey is the attribute Key conforming to the \"url.domain\" semantic\n\t// conventions. It represents the domain extracted from the `url.full`, such as\n\t// \"opentelemetry.io\".\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"www.foo.bar\", \"opentelemetry.io\", \"3.12.167.2\",\n\t// \"[1080:0:0:0:8:800:200C:417A]\"\n\t// Note: In some cases a URL may refer to an IP and/or port directly, without a\n\t// domain name. In this case, the IP address would go to the domain field. If\n\t// the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[`\n\t// and `]` characters should also be captured in the domain field.\n\t//\n\t// [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2\n\tURLDomainKey = attribute.Key(\"url.domain\")\n\n\t// URLExtensionKey is the attribute Key conforming to the \"url.extension\"\n\t// semantic conventions. It represents the file extension extracted from the\n\t// `url.full`, excluding the leading dot.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"png\", \"gz\"\n\t// Note: The file extension is only set if it exists, as not every url has a\n\t// file extension. When the file name has multiple extensions `example.tar.gz`,\n\t// only the last one should be captured `gz`, not `tar.gz`.\n\tURLExtensionKey = attribute.Key(\"url.extension\")\n\n\t// URLFragmentKey is the attribute Key conforming to the \"url.fragment\" semantic\n\t// conventions. It represents the [URI fragment] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SemConv\"\n\t//\n\t// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5\n\tURLFragmentKey = attribute.Key(\"url.fragment\")\n\n\t// URLFullKey is the attribute Key conforming to the \"url.full\" semantic\n\t// conventions. It represents the absolute URL describing a network resource\n\t// according to [RFC3986].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"//localhost\"\n\t// Note: For network calls, URL usually has\n\t// `scheme://host[:port][path][?query][#fragment]` format, where the fragment\n\t// is not transmitted over HTTP, but if it is known, it SHOULD be included\n\t// nevertheless.\n\t//\n\t// `url.full` MUST NOT contain credentials passed via URL in form of\n\t// `https://username:password@www.example.com/`.\n\t// In such case username and password SHOULD be redacted and attribute's value\n\t// SHOULD be `https://REDACTED:REDACTED@www.example.com/`.\n\t//\n\t// `url.full` SHOULD capture the absolute URL when it is available (or can be\n\t// reconstructed).\n\t//\n\t// Sensitive content provided in `url.full` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t//\n\t// Query string values for the following keys SHOULD be redacted by default and\n\t// replaced by the\n\t// value `REDACTED`:\n\t//\n\t//   - [`AWSAccessKeyId`]\n\t//   - [`Signature`]\n\t//   - [`sig`]\n\t//   - [`X-Goog-Signature`]\n\t//\n\t// This list is subject to change over time.\n\t//\n\t// When a query string value is redacted, the query string key SHOULD still be\n\t// preserved, e.g.\n\t// `https://www.example.com/path?color=blue&sig=REDACTED`.\n\t//\n\t// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986\n\t// [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token\n\t// [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls\n\tURLFullKey = attribute.Key(\"url.full\")\n\n\t// URLOriginalKey is the attribute Key conforming to the \"url.original\" semantic\n\t// conventions. It represents the unmodified original URL as seen in the event\n\t// source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://www.foo.bar/search?q=OpenTelemetry#SemConv\",\n\t// \"search?q=OpenTelemetry\"\n\t// Note: In network monitoring, the observed URL may be a full URL, whereas in\n\t// access logs, the URL is often just represented as a path. This field is meant\n\t// to represent the URL as it was observed, complete or not.\n\t// `url.original` might contain credentials passed via URL in form of\n\t// `https://username:password@www.example.com/`. In such case password and\n\t// username SHOULD NOT be redacted and attribute's value SHOULD remain the same.\n\tURLOriginalKey = attribute.Key(\"url.original\")\n\n\t// URLPathKey is the attribute Key conforming to the \"url.path\" semantic\n\t// conventions. It represents the [URI path] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"/search\"\n\t// Note: Sensitive content provided in `url.path` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3\n\tURLPathKey = attribute.Key(\"url.path\")\n\n\t// URLPortKey is the attribute Key conforming to the \"url.port\" semantic\n\t// conventions. It represents the port extracted from the `url.full`.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 443\n\tURLPortKey = attribute.Key(\"url.port\")\n\n\t// URLQueryKey is the attribute Key conforming to the \"url.query\" semantic\n\t// conventions. It represents the [URI query] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"q=OpenTelemetry\"\n\t// Note: Sensitive content provided in `url.query` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t//\n\t// Query string values for the following keys SHOULD be redacted by default and\n\t// replaced by the value `REDACTED`:\n\t//\n\t//   - [`AWSAccessKeyId`]\n\t//   - [`Signature`]\n\t//   - [`sig`]\n\t//   - [`X-Goog-Signature`]\n\t//\n\t// This list is subject to change over time.\n\t//\n\t// When a query string value is redacted, the query string key SHOULD still be\n\t// preserved, e.g.\n\t// `q=OpenTelemetry&sig=REDACTED`.\n\t//\n\t// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4\n\t// [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token\n\t// [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls\n\tURLQueryKey = attribute.Key(\"url.query\")\n\n\t// URLRegisteredDomainKey is the attribute Key conforming to the\n\t// \"url.registered_domain\" semantic conventions. It represents the highest\n\t// registered url domain, stripped of the subdomain.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"example.com\", \"foo.co.uk\"\n\t// Note: This value can be determined precisely with the [public suffix list].\n\t// For example, the registered domain for `foo.example.com` is `example.com`.\n\t// Trying to approximate this by simply taking the last two labels will not work\n\t// well for TLDs such as `co.uk`.\n\t//\n\t// [public suffix list]: https://publicsuffix.org/\n\tURLRegisteredDomainKey = attribute.Key(\"url.registered_domain\")\n\n\t// URLSchemeKey is the attribute Key conforming to the \"url.scheme\" semantic\n\t// conventions. It represents the [URI scheme] component identifying the used\n\t// protocol.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"https\", \"ftp\", \"telnet\"\n\t//\n\t// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\n\tURLSchemeKey = attribute.Key(\"url.scheme\")\n\n\t// URLSubdomainKey is the attribute Key conforming to the \"url.subdomain\"\n\t// semantic conventions. It represents the subdomain portion of a fully\n\t// qualified domain name includes all of the names except the host name under\n\t// the registered_domain. In a partially qualified domain, or if the\n\t// qualification level of the full name cannot be determined, subdomain contains\n\t// all of the names below the registered domain.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"east\", \"sub2.sub1\"\n\t// Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the\n\t// domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the\n\t// subdomain field should contain `sub2.sub1`, with no trailing period.\n\tURLSubdomainKey = attribute.Key(\"url.subdomain\")\n\n\t// URLTemplateKey is the attribute Key conforming to the \"url.template\" semantic\n\t// conventions. It represents the low-cardinality template of an\n\t// [absolute path reference].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/users/{id}\", \"/users/:id\", \"/users?id={id}\"\n\t//\n\t// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\n\tURLTemplateKey = attribute.Key(\"url.template\")\n\n\t// URLTopLevelDomainKey is the attribute Key conforming to the\n\t// \"url.top_level_domain\" semantic conventions. It represents the effective top\n\t// level domain (eTLD), also known as the domain suffix, is the last part of the\n\t// domain name. For example, the top level domain for example.com is `com`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com\", \"co.uk\"\n\t// Note: This value can be determined precisely with the [public suffix list].\n\t//\n\t// [public suffix list]: https://publicsuffix.org/\n\tURLTopLevelDomainKey = attribute.Key(\"url.top_level_domain\")\n)\n\n// URLDomain returns an attribute KeyValue conforming to the \"url.domain\"\n// semantic conventions. It represents the domain extracted from the `url.full`,\n// such as \"opentelemetry.io\".\nfunc URLDomain(val string) attribute.KeyValue {\n\treturn URLDomainKey.String(val)\n}\n\n// URLExtension returns an attribute KeyValue conforming to the \"url.extension\"\n// semantic conventions. It represents the file extension extracted from the\n// `url.full`, excluding the leading dot.\nfunc URLExtension(val string) attribute.KeyValue {\n\treturn URLExtensionKey.String(val)\n}\n\n// URLFragment returns an attribute KeyValue conforming to the \"url.fragment\"\n// semantic conventions. It represents the [URI fragment] component.\n//\n// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5\nfunc URLFragment(val string) attribute.KeyValue {\n\treturn URLFragmentKey.String(val)\n}\n\n// URLFull returns an attribute KeyValue conforming to the \"url.full\" semantic\n// conventions. It represents the absolute URL describing a network resource\n// according to [RFC3986].\n//\n// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986\nfunc URLFull(val string) attribute.KeyValue {\n\treturn URLFullKey.String(val)\n}\n\n// URLOriginal returns an attribute KeyValue conforming to the \"url.original\"\n// semantic conventions. It represents the unmodified original URL as seen in the\n// event source.\nfunc URLOriginal(val string) attribute.KeyValue {\n\treturn URLOriginalKey.String(val)\n}\n\n// URLPath returns an attribute KeyValue conforming to the \"url.path\" semantic\n// conventions. It represents the [URI path] component.\n//\n// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3\nfunc URLPath(val string) attribute.KeyValue {\n\treturn URLPathKey.String(val)\n}\n\n// URLPort returns an attribute KeyValue conforming to the \"url.port\" semantic\n// conventions. It represents the port extracted from the `url.full`.\nfunc URLPort(val int) attribute.KeyValue {\n\treturn URLPortKey.Int(val)\n}\n\n// URLQuery returns an attribute KeyValue conforming to the \"url.query\" semantic\n// conventions. It represents the [URI query] component.\n//\n// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4\nfunc URLQuery(val string) attribute.KeyValue {\n\treturn URLQueryKey.String(val)\n}\n\n// URLRegisteredDomain returns an attribute KeyValue conforming to the\n// \"url.registered_domain\" semantic conventions. It represents the highest\n// registered url domain, stripped of the subdomain.\nfunc URLRegisteredDomain(val string) attribute.KeyValue {\n\treturn URLRegisteredDomainKey.String(val)\n}\n\n// URLScheme returns an attribute KeyValue conforming to the \"url.scheme\"\n// semantic conventions. It represents the [URI scheme] component identifying the\n// used protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc URLScheme(val string) attribute.KeyValue {\n\treturn URLSchemeKey.String(val)\n}\n\n// URLSubdomain returns an attribute KeyValue conforming to the \"url.subdomain\"\n// semantic conventions. It represents the subdomain portion of a fully qualified\n// domain name includes all of the names except the host name under the\n// registered_domain. In a partially qualified domain, or if the qualification\n// level of the full name cannot be determined, subdomain contains all of the\n// names below the registered domain.\nfunc URLSubdomain(val string) attribute.KeyValue {\n\treturn URLSubdomainKey.String(val)\n}\n\n// URLTemplate returns an attribute KeyValue conforming to the \"url.template\"\n// semantic conventions. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc URLTemplate(val string) attribute.KeyValue {\n\treturn URLTemplateKey.String(val)\n}\n\n// URLTopLevelDomain returns an attribute KeyValue conforming to the\n// \"url.top_level_domain\" semantic conventions. It represents the effective top\n// level domain (eTLD), also known as the domain suffix, is the last part of the\n// domain name. For example, the top level domain for example.com is `com`.\nfunc URLTopLevelDomain(val string) attribute.KeyValue {\n\treturn URLTopLevelDomainKey.String(val)\n}\n\n// Namespace: user\nconst (\n\t// UserEmailKey is the attribute Key conforming to the \"user.email\" semantic\n\t// conventions. It represents the user email address.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"a.einstein@example.com\"\n\tUserEmailKey = attribute.Key(\"user.email\")\n\n\t// UserFullNameKey is the attribute Key conforming to the \"user.full_name\"\n\t// semantic conventions. It represents the user's full name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Albert Einstein\"\n\tUserFullNameKey = attribute.Key(\"user.full_name\")\n\n\t// UserHashKey is the attribute Key conforming to the \"user.hash\" semantic\n\t// conventions. It represents the unique user hash to correlate information for\n\t// a user in anonymized form.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"364fc68eaf4c8acec74a4e52d7d1feaa\"\n\t// Note: Useful if `user.id` or `user.name` contain confidential information and\n\t// cannot be used.\n\tUserHashKey = attribute.Key(\"user.hash\")\n\n\t// UserIDKey is the attribute Key conforming to the \"user.id\" semantic\n\t// conventions. It represents the unique identifier of the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"S-1-5-21-202424912787-2692429404-2351956786-1000\"\n\tUserIDKey = attribute.Key(\"user.id\")\n\n\t// UserNameKey is the attribute Key conforming to the \"user.name\" semantic\n\t// conventions. It represents the short name or login/username of the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"a.einstein\"\n\tUserNameKey = attribute.Key(\"user.name\")\n\n\t// UserRolesKey is the attribute Key conforming to the \"user.roles\" semantic\n\t// conventions. It represents the array of user roles at the time of the event.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"admin\", \"reporting_user\"\n\tUserRolesKey = attribute.Key(\"user.roles\")\n)\n\n// UserEmail returns an attribute KeyValue conforming to the \"user.email\"\n// semantic conventions. It represents the user email address.\nfunc UserEmail(val string) attribute.KeyValue {\n\treturn UserEmailKey.String(val)\n}\n\n// UserFullName returns an attribute KeyValue conforming to the \"user.full_name\"\n// semantic conventions. It represents the user's full name.\nfunc UserFullName(val string) attribute.KeyValue {\n\treturn UserFullNameKey.String(val)\n}\n\n// UserHash returns an attribute KeyValue conforming to the \"user.hash\" semantic\n// conventions. It represents the unique user hash to correlate information for a\n// user in anonymized form.\nfunc UserHash(val string) attribute.KeyValue {\n\treturn UserHashKey.String(val)\n}\n\n// UserID returns an attribute KeyValue conforming to the \"user.id\" semantic\n// conventions. It represents the unique identifier of the user.\nfunc UserID(val string) attribute.KeyValue {\n\treturn UserIDKey.String(val)\n}\n\n// UserName returns an attribute KeyValue conforming to the \"user.name\" semantic\n// conventions. It represents the short name or login/username of the user.\nfunc UserName(val string) attribute.KeyValue {\n\treturn UserNameKey.String(val)\n}\n\n// UserRoles returns an attribute KeyValue conforming to the \"user.roles\"\n// semantic conventions. It represents the array of user roles at the time of the\n// event.\nfunc UserRoles(val ...string) attribute.KeyValue {\n\treturn UserRolesKey.StringSlice(val)\n}\n\n// Namespace: user_agent\nconst (\n\t// UserAgentNameKey is the attribute Key conforming to the \"user_agent.name\"\n\t// semantic conventions. It represents the name of the user-agent extracted from\n\t// original. Usually refers to the browser's name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Safari\", \"YourApp\"\n\t// Note: [Example] of extracting browser's name from original string. In the\n\t// case of using a user-agent for non-browser products, such as microservices\n\t// with multiple names/versions inside the `user_agent.original`, the most\n\t// significant name SHOULD be selected. In such a scenario it should align with\n\t// `user_agent.version`\n\t//\n\t// [Example]: https://www.whatsmyua.info\n\tUserAgentNameKey = attribute.Key(\"user_agent.name\")\n\n\t// UserAgentOriginalKey is the attribute Key conforming to the\n\t// \"user_agent.original\" semantic conventions. It represents the value of the\n\t// [HTTP User-Agent] header sent by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"CERN-LineMode/2.15 libwww/2.17b3\", \"Mozilla/5.0 (iPhone; CPU\n\t// iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)\n\t// Version/14.1.2 Mobile/15E148 Safari/604.1\", \"YourApp/1.0.0\n\t// grpc-java-okhttp/1.27.2\"\n\t//\n\t// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent\n\tUserAgentOriginalKey = attribute.Key(\"user_agent.original\")\n\n\t// UserAgentOSNameKey is the attribute Key conforming to the\n\t// \"user_agent.os.name\" semantic conventions. It represents the human readable\n\t// operating system name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iOS\", \"Android\", \"Ubuntu\"\n\t// Note: For mapping user agent strings to OS names, libraries such as\n\t// [ua-parser] can be utilized.\n\t//\n\t// [ua-parser]: https://github.com/ua-parser\n\tUserAgentOSNameKey = attribute.Key(\"user_agent.os.name\")\n\n\t// UserAgentOSVersionKey is the attribute Key conforming to the\n\t// \"user_agent.os.version\" semantic conventions. It represents the version\n\t// string of the operating system as defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.2.1\", \"18.04.1\"\n\t// Note: For mapping user agent strings to OS versions, libraries such as\n\t// [ua-parser] can be utilized.\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\t// [ua-parser]: https://github.com/ua-parser\n\tUserAgentOSVersionKey = attribute.Key(\"user_agent.os.version\")\n\n\t// UserAgentSyntheticTypeKey is the attribute Key conforming to the\n\t// \"user_agent.synthetic.type\" semantic conventions. It represents the specifies\n\t// the category of synthetic traffic, such as tests or bots.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This attribute MAY be derived from the contents of the\n\t// `user_agent.original` attribute. Components that populate the attribute are\n\t// responsible for determining what they consider to be synthetic bot or test\n\t// traffic. This attribute can either be set for self-identification purposes,\n\t// or on telemetry detected to be generated as a result of a synthetic request.\n\t// This attribute is useful for distinguishing between genuine client traffic\n\t// and synthetic traffic generated by bots or tests.\n\tUserAgentSyntheticTypeKey = attribute.Key(\"user_agent.synthetic.type\")\n\n\t// UserAgentVersionKey is the attribute Key conforming to the\n\t// \"user_agent.version\" semantic conventions. It represents the version of the\n\t// user-agent extracted from original. Usually refers to the browser's version.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.1.2\", \"1.0.0\"\n\t// Note: [Example] of extracting browser's version from original string. In the\n\t// case of using a user-agent for non-browser products, such as microservices\n\t// with multiple names/versions inside the `user_agent.original`, the most\n\t// significant version SHOULD be selected. In such a scenario it should align\n\t// with `user_agent.name`\n\t//\n\t// [Example]: https://www.whatsmyua.info\n\tUserAgentVersionKey = attribute.Key(\"user_agent.version\")\n)\n\n// UserAgentName returns an attribute KeyValue conforming to the\n// \"user_agent.name\" semantic conventions. It represents the name of the\n// user-agent extracted from original. Usually refers to the browser's name.\nfunc UserAgentName(val string) attribute.KeyValue {\n\treturn UserAgentNameKey.String(val)\n}\n\n// UserAgentOriginal returns an attribute KeyValue conforming to the\n// \"user_agent.original\" semantic conventions. It represents the value of the\n// [HTTP User-Agent] header sent by the client.\n//\n// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent\nfunc UserAgentOriginal(val string) attribute.KeyValue {\n\treturn UserAgentOriginalKey.String(val)\n}\n\n// UserAgentOSName returns an attribute KeyValue conforming to the\n// \"user_agent.os.name\" semantic conventions. It represents the human readable\n// operating system name.\nfunc UserAgentOSName(val string) attribute.KeyValue {\n\treturn UserAgentOSNameKey.String(val)\n}\n\n// UserAgentOSVersion returns an attribute KeyValue conforming to the\n// \"user_agent.os.version\" semantic conventions. It represents the version string\n// of the operating system as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc UserAgentOSVersion(val string) attribute.KeyValue {\n\treturn UserAgentOSVersionKey.String(val)\n}\n\n// UserAgentVersion returns an attribute KeyValue conforming to the\n// \"user_agent.version\" semantic conventions. It represents the version of the\n// user-agent extracted from original. Usually refers to the browser's version.\nfunc UserAgentVersion(val string) attribute.KeyValue {\n\treturn UserAgentVersionKey.String(val)\n}\n\n// Enum values for user_agent.synthetic.type\nvar (\n\t// Bot source.\n\t// Stability: development\n\tUserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String(\"bot\")\n\t// Synthetic test source.\n\t// Stability: development\n\tUserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String(\"test\")\n)\n\n// Namespace: vcs\nconst (\n\t// VCSChangeIDKey is the attribute Key conforming to the \"vcs.change.id\"\n\t// semantic conventions. It represents the ID of the change (pull request/merge\n\t// request/changelist) if applicable. This is usually a unique (within\n\t// repository) identifier generated by the VCS system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123\"\n\tVCSChangeIDKey = attribute.Key(\"vcs.change.id\")\n\n\t// VCSChangeStateKey is the attribute Key conforming to the \"vcs.change.state\"\n\t// semantic conventions. It represents the state of the change (pull\n\t// request/merge request/changelist).\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"open\", \"closed\", \"merged\"\n\tVCSChangeStateKey = attribute.Key(\"vcs.change.state\")\n\n\t// VCSChangeTitleKey is the attribute Key conforming to the \"vcs.change.title\"\n\t// semantic conventions. It represents the human readable title of the change\n\t// (pull request/merge request/changelist). This title is often a brief summary\n\t// of the change and may get merged in to a ref as the commit summary.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Fixes broken thing\", \"feat: add my new feature\", \"[chore] update\n\t// dependency\"\n\tVCSChangeTitleKey = attribute.Key(\"vcs.change.title\")\n\n\t// VCSLineChangeTypeKey is the attribute Key conforming to the\n\t// \"vcs.line_change.type\" semantic conventions. It represents the type of line\n\t// change being measured on a branch or change.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"added\", \"removed\"\n\tVCSLineChangeTypeKey = attribute.Key(\"vcs.line_change.type\")\n\n\t// VCSOwnerNameKey is the attribute Key conforming to the \"vcs.owner.name\"\n\t// semantic conventions. It represents the group owner within the version\n\t// control system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-org\", \"myteam\", \"business-unit\"\n\tVCSOwnerNameKey = attribute.Key(\"vcs.owner.name\")\n\n\t// VCSProviderNameKey is the attribute Key conforming to the \"vcs.provider.name\"\n\t// semantic conventions. It represents the name of the version control system\n\t// provider.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"github\", \"gitlab\", \"gitea\", \"bitbucket\"\n\tVCSProviderNameKey = attribute.Key(\"vcs.provider.name\")\n\n\t// VCSRefBaseNameKey is the attribute Key conforming to the \"vcs.ref.base.name\"\n\t// semantic conventions. It represents the name of the [reference] such as\n\t// **branch** or **tag** in the repository.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-feature-branch\", \"tag-1-test\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefBaseNameKey = attribute.Key(\"vcs.ref.base.name\")\n\n\t// VCSRefBaseRevisionKey is the attribute Key conforming to the\n\t// \"vcs.ref.base.revision\" semantic conventions. It represents the revision,\n\t// literally [revised version], The revision most often refers to a commit\n\t// object in Git, or a revision number in SVN.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t// \"main\", \"123\", \"HEAD\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits. The\n\t// revision can be a full [hash value (see\n\t// glossary)],\n\t// of the recorded change to a ref within a repository pointing to a\n\t// commit [commit] object. It does\n\t// not necessarily have to be a hash; it can simply define a [revision\n\t// number]\n\t// which is an integer that is monotonically increasing. In cases where\n\t// it is identical to the `ref.base.name`, it SHOULD still be included.\n\t// It is up to the implementer to decide which value to set as the\n\t// revision based on the VCS system and situational context.\n\t//\n\t// [revised version]: https://www.merriam-webster.com/dictionary/revision\n\t// [hash value (see\n\t// glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [commit]: https://git-scm.com/docs/git-commit\n\t// [revision\n\t// number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html\n\tVCSRefBaseRevisionKey = attribute.Key(\"vcs.ref.base.revision\")\n\n\t// VCSRefBaseTypeKey is the attribute Key conforming to the \"vcs.ref.base.type\"\n\t// semantic conventions. It represents the type of the [reference] in the\n\t// repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefBaseTypeKey = attribute.Key(\"vcs.ref.base.type\")\n\n\t// VCSRefHeadNameKey is the attribute Key conforming to the \"vcs.ref.head.name\"\n\t// semantic conventions. It represents the name of the [reference] such as\n\t// **branch** or **tag** in the repository.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-feature-branch\", \"tag-1-test\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefHeadNameKey = attribute.Key(\"vcs.ref.head.name\")\n\n\t// VCSRefHeadRevisionKey is the attribute Key conforming to the\n\t// \"vcs.ref.head.revision\" semantic conventions. It represents the revision,\n\t// literally [revised version], The revision most often refers to a commit\n\t// object in Git, or a revision number in SVN.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t// \"main\", \"123\", \"HEAD\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.The revision can be a full [hash value (see\n\t// glossary)],\n\t// of the recorded change to a ref within a repository pointing to a\n\t// commit [commit] object. It does\n\t// not necessarily have to be a hash; it can simply define a [revision\n\t// number]\n\t// which is an integer that is monotonically increasing. In cases where\n\t// it is identical to the `ref.head.name`, it SHOULD still be included.\n\t// It is up to the implementer to decide which value to set as the\n\t// revision based on the VCS system and situational context.\n\t//\n\t// [revised version]: https://www.merriam-webster.com/dictionary/revision\n\t// [hash value (see\n\t// glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [commit]: https://git-scm.com/docs/git-commit\n\t// [revision\n\t// number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html\n\tVCSRefHeadRevisionKey = attribute.Key(\"vcs.ref.head.revision\")\n\n\t// VCSRefHeadTypeKey is the attribute Key conforming to the \"vcs.ref.head.type\"\n\t// semantic conventions. It represents the type of the [reference] in the\n\t// repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefHeadTypeKey = attribute.Key(\"vcs.ref.head.type\")\n\n\t// VCSRefTypeKey is the attribute Key conforming to the \"vcs.ref.type\" semantic\n\t// conventions. It represents the type of the [reference] in the repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefTypeKey = attribute.Key(\"vcs.ref.type\")\n\n\t// VCSRepositoryNameKey is the attribute Key conforming to the\n\t// \"vcs.repository.name\" semantic conventions. It represents the human readable\n\t// name of the repository. It SHOULD NOT include any additional identifier like\n\t// Group/SubGroup in GitLab or organization in GitHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"semantic-conventions\", \"my-cool-repo\"\n\t// Note: Due to it only being the name, it can clash with forks of the same\n\t// repository if collecting telemetry across multiple orgs or groups in\n\t// the same backends.\n\tVCSRepositoryNameKey = attribute.Key(\"vcs.repository.name\")\n\n\t// VCSRepositoryURLFullKey is the attribute Key conforming to the\n\t// \"vcs.repository.url.full\" semantic conventions. It represents the\n\t// [canonical URL] of the repository providing the complete HTTP(S) address in\n\t// order to locate and identify the repository through a browser.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/opentelemetry/open-telemetry-collector-contrib\",\n\t// \"https://gitlab.com/my-org/my-project/my-projects-project/repo\"\n\t// Note: In Git Version Control Systems, the canonical URL SHOULD NOT include\n\t// the `.git` extension.\n\t//\n\t// [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.\n\tVCSRepositoryURLFullKey = attribute.Key(\"vcs.repository.url.full\")\n\n\t// VCSRevisionDeltaDirectionKey is the attribute Key conforming to the\n\t// \"vcs.revision_delta.direction\" semantic conventions. It represents the type\n\t// of revision comparison.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ahead\", \"behind\"\n\tVCSRevisionDeltaDirectionKey = attribute.Key(\"vcs.revision_delta.direction\")\n)\n\n// VCSChangeID returns an attribute KeyValue conforming to the \"vcs.change.id\"\n// semantic conventions. It represents the ID of the change (pull request/merge\n// request/changelist) if applicable. This is usually a unique (within\n// repository) identifier generated by the VCS system.\nfunc VCSChangeID(val string) attribute.KeyValue {\n\treturn VCSChangeIDKey.String(val)\n}\n\n// VCSChangeTitle returns an attribute KeyValue conforming to the\n// \"vcs.change.title\" semantic conventions. It represents the human readable\n// title of the change (pull request/merge request/changelist). This title is\n// often a brief summary of the change and may get merged in to a ref as the\n// commit summary.\nfunc VCSChangeTitle(val string) attribute.KeyValue {\n\treturn VCSChangeTitleKey.String(val)\n}\n\n// VCSOwnerName returns an attribute KeyValue conforming to the \"vcs.owner.name\"\n// semantic conventions. It represents the group owner within the version control\n// system.\nfunc VCSOwnerName(val string) attribute.KeyValue {\n\treturn VCSOwnerNameKey.String(val)\n}\n\n// VCSRefBaseName returns an attribute KeyValue conforming to the\n// \"vcs.ref.base.name\" semantic conventions. It represents the name of the\n// [reference] such as **branch** or **tag** in the repository.\n//\n// [reference]: https://git-scm.com/docs/gitglossary#def_ref\nfunc VCSRefBaseName(val string) attribute.KeyValue {\n\treturn VCSRefBaseNameKey.String(val)\n}\n\n// VCSRefBaseRevision returns an attribute KeyValue conforming to the\n// \"vcs.ref.base.revision\" semantic conventions. It represents the revision,\n// literally [revised version], The revision most often refers to a commit object\n// in Git, or a revision number in SVN.\n//\n// [revised version]: https://www.merriam-webster.com/dictionary/revision\nfunc VCSRefBaseRevision(val string) attribute.KeyValue {\n\treturn VCSRefBaseRevisionKey.String(val)\n}\n\n// VCSRefHeadName returns an attribute KeyValue conforming to the\n// \"vcs.ref.head.name\" semantic conventions. It represents the name of the\n// [reference] such as **branch** or **tag** in the repository.\n//\n// [reference]: https://git-scm.com/docs/gitglossary#def_ref\nfunc VCSRefHeadName(val string) attribute.KeyValue {\n\treturn VCSRefHeadNameKey.String(val)\n}\n\n// VCSRefHeadRevision returns an attribute KeyValue conforming to the\n// \"vcs.ref.head.revision\" semantic conventions. It represents the revision,\n// literally [revised version], The revision most often refers to a commit object\n// in Git, or a revision number in SVN.\n//\n// [revised version]: https://www.merriam-webster.com/dictionary/revision\nfunc VCSRefHeadRevision(val string) attribute.KeyValue {\n\treturn VCSRefHeadRevisionKey.String(val)\n}\n\n// VCSRepositoryName returns an attribute KeyValue conforming to the\n// \"vcs.repository.name\" semantic conventions. It represents the human readable\n// name of the repository. It SHOULD NOT include any additional identifier like\n// Group/SubGroup in GitLab or organization in GitHub.\nfunc VCSRepositoryName(val string) attribute.KeyValue {\n\treturn VCSRepositoryNameKey.String(val)\n}\n\n// VCSRepositoryURLFull returns an attribute KeyValue conforming to the\n// \"vcs.repository.url.full\" semantic conventions. It represents the\n// [canonical URL] of the repository providing the complete HTTP(S) address in\n// order to locate and identify the repository through a browser.\n//\n// [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.\nfunc VCSRepositoryURLFull(val string) attribute.KeyValue {\n\treturn VCSRepositoryURLFullKey.String(val)\n}\n\n// Enum values for vcs.change.state\nvar (\n\t// Open means the change is currently active and under review. It hasn't been\n\t// merged into the target branch yet, and it's still possible to make changes or\n\t// add comments.\n\t// Stability: development\n\tVCSChangeStateOpen = VCSChangeStateKey.String(\"open\")\n\t// WIP (work-in-progress, draft) means the change is still in progress and not\n\t// yet ready for a full review. It might still undergo significant changes.\n\t// Stability: development\n\tVCSChangeStateWip = VCSChangeStateKey.String(\"wip\")\n\t// Closed means the merge request has been closed without merging. This can\n\t// happen for various reasons, such as the changes being deemed unnecessary, the\n\t// issue being resolved in another way, or the author deciding to withdraw the\n\t// request.\n\t// Stability: development\n\tVCSChangeStateClosed = VCSChangeStateKey.String(\"closed\")\n\t// Merged indicates that the change has been successfully integrated into the\n\t// target codebase.\n\t// Stability: development\n\tVCSChangeStateMerged = VCSChangeStateKey.String(\"merged\")\n)\n\n// Enum values for vcs.line_change.type\nvar (\n\t// How many lines were added.\n\t// Stability: development\n\tVCSLineChangeTypeAdded = VCSLineChangeTypeKey.String(\"added\")\n\t// How many lines were removed.\n\t// Stability: development\n\tVCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String(\"removed\")\n)\n\n// Enum values for vcs.provider.name\nvar (\n\t// [GitHub]\n\t// Stability: development\n\t//\n\t// [GitHub]: https://github.com\n\tVCSProviderNameGithub = VCSProviderNameKey.String(\"github\")\n\t// [GitLab]\n\t// Stability: development\n\t//\n\t// [GitLab]: https://gitlab.com\n\tVCSProviderNameGitlab = VCSProviderNameKey.String(\"gitlab\")\n\t// [Gitea]\n\t// Stability: development\n\t//\n\t// [Gitea]: https://gitea.io\n\tVCSProviderNameGitea = VCSProviderNameKey.String(\"gitea\")\n\t// [Bitbucket]\n\t// Stability: development\n\t//\n\t// [Bitbucket]: https://bitbucket.org\n\tVCSProviderNameBitbucket = VCSProviderNameKey.String(\"bitbucket\")\n)\n\n// Enum values for vcs.ref.base.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefBaseTypeBranch = VCSRefBaseTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefBaseTypeTag = VCSRefBaseTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.ref.head.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefHeadTypeBranch = VCSRefHeadTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefHeadTypeTag = VCSRefHeadTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.ref.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefTypeBranch = VCSRefTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefTypeTag = VCSRefTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.revision_delta.direction\nvar (\n\t// How many revisions the change is behind the target ref.\n\t// Stability: development\n\tVCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String(\"behind\")\n\t// How many revisions the change is ahead of the target ref.\n\t// Stability: development\n\tVCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String(\"ahead\")\n)\n\n// Namespace: webengine\nconst (\n\t// WebEngineDescriptionKey is the attribute Key conforming to the\n\t// \"webengine.description\" semantic conventions. It represents the additional\n\t// description of the web engine (e.g. detailed version and edition\n\t// information).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -\n\t// 2.2.2.Final\"\n\tWebEngineDescriptionKey = attribute.Key(\"webengine.description\")\n\n\t// WebEngineNameKey is the attribute Key conforming to the \"webengine.name\"\n\t// semantic conventions. It represents the name of the web engine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"WildFly\"\n\tWebEngineNameKey = attribute.Key(\"webengine.name\")\n\n\t// WebEngineVersionKey is the attribute Key conforming to the\n\t// \"webengine.version\" semantic conventions. It represents the version of the\n\t// web engine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"21.0.0\"\n\tWebEngineVersionKey = attribute.Key(\"webengine.version\")\n)\n\n// WebEngineDescription returns an attribute KeyValue conforming to the\n// \"webengine.description\" semantic conventions. It represents the additional\n// description of the web engine (e.g. detailed version and edition information).\nfunc WebEngineDescription(val string) attribute.KeyValue {\n\treturn WebEngineDescriptionKey.String(val)\n}\n\n// WebEngineName returns an attribute KeyValue conforming to the \"webengine.name\"\n// semantic conventions. It represents the name of the web engine.\nfunc WebEngineName(val string) attribute.KeyValue {\n\treturn WebEngineNameKey.String(val)\n}\n\n// WebEngineVersion returns an attribute KeyValue conforming to the\n// \"webengine.version\" semantic conventions. It represents the version of the web\n// engine.\nfunc WebEngineVersion(val string) attribute.KeyValue {\n\treturn WebEngineVersionKey.String(val)\n}\n\n// Namespace: zos\nconst (\n\t// ZOSSmfIDKey is the attribute Key conforming to the \"zos.smf.id\" semantic\n\t// conventions. It represents the System Management Facility (SMF) Identifier\n\t// uniquely identified a z/OS system within a SYSPLEX or mainframe environment\n\t// and is used for system and performance analysis.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"SYS1\"\n\tZOSSmfIDKey = attribute.Key(\"zos.smf.id\")\n\n\t// ZOSSysplexNameKey is the attribute Key conforming to the \"zos.sysplex.name\"\n\t// semantic conventions. It represents the name of the SYSPLEX to which the z/OS\n\t// system belongs too.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"SYSPLEX1\"\n\tZOSSysplexNameKey = attribute.Key(\"zos.sysplex.name\")\n)\n\n// ZOSSmfID returns an attribute KeyValue conforming to the \"zos.smf.id\" semantic\n// conventions. It represents the System Management Facility (SMF) Identifier\n// uniquely identified a z/OS system within a SYSPLEX or mainframe environment\n// and is used for system and performance analysis.\nfunc ZOSSmfID(val string) attribute.KeyValue {\n\treturn ZOSSmfIDKey.String(val)\n}\n\n// ZOSSysplexName returns an attribute KeyValue conforming to the\n// \"zos.sysplex.name\" semantic conventions. It represents the name of the SYSPLEX\n// to which the z/OS system belongs too.\nfunc ZOSSysplexName(val string) attribute.KeyValue {\n\treturn ZOSSysplexNameKey.String(val)\n}"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package semconv implements OpenTelemetry semantic conventions.\n//\n// OpenTelemetry semantic conventions are agreed standardized naming\n// patterns for OpenTelemetry things. This package represents the v1.37.0\n// version of the OpenTelemetry semantic conventions.\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n\nimport (\n\t\"reflect\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n)\n\n// ErrorType returns an [attribute.KeyValue] identifying the error type of err.\n//\n// If err is nil, the returned attribute has the default value\n// [ErrorTypeOther].\n//\n// If err's type has the method\n//\n//\tErrorType() string\n//\n// then the returned attribute has the value of err.ErrorType(). Otherwise, the\n// returned attribute has a value derived from the concrete type of err.\n//\n// The key of the returned attribute is [ErrorTypeKey].\nfunc ErrorType(err error) attribute.KeyValue {\n\tif err == nil {\n\t\treturn ErrorTypeOther\n\t}\n\n\treturn ErrorTypeKey.String(errorType(err))\n}\n\nfunc errorType(err error) string {\n\tvar s string\n\tif et, ok := err.(interface{ ErrorType() string }); ok {\n\t\t// Prioritize the ErrorType method if available.\n\t\ts = et.ErrorType()\n\t}\n\tif s == \"\" {\n\t\t// Fallback to reflection if the ErrorType method is not supported or\n\t\t// returns an empty value.\n\n\t\tt := reflect.TypeOf(err)\n\t\tpkg, name := t.PkgPath(), t.Name()\n\t\tif pkg != \"\" && name != \"\" {\n\t\t\ts = pkg + \".\" + name\n\t\t} else {\n\t\t\t// The type has no package path or name (predeclared, not-defined,\n\t\t\t// or alias for a not-defined type).\n\t\t\t//\n\t\t\t// This is not guaranteed to be unique, but is a best effort.\n\t\t\ts = t.String()\n\t\t}\n\t}\n\treturn s\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n\nconst (\n\t// ExceptionEventName is the name of the Span event representing an exception.\n\tExceptionEventName = \"exception\"\n)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.37.0\"\n\n// SchemaURL is the schema URL that matches the version of the semantic conventions\n// that this package defines. Semconv packages starting from v1.4.0 must declare\n// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>\nconst SchemaURL = \"https://opentelemetry.io/schemas/1.37.0\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md",
    "content": "<!-- Generated. DO NOT MODIFY. -->\n# Migration from v1.38.0 to v1.39.0\n\nThe `go.opentelemetry.io/otel/semconv/v1.39.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.38.0` with the following exceptions.\n\n## Removed\n\nThe following declarations have been removed.\nRefer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions.\n\nIf the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use.\nIf you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case.\n\n- `LinuxMemorySlabStateKey`\n- `LinuxMemorySlabStateReclaimable`\n- `LinuxMemorySlabStateUnreclaimable`\n- `PeerService`\n- `PeerServiceKey`\n- `RPCConnectRPCErrorCodeAborted`\n- `RPCConnectRPCErrorCodeAlreadyExists`\n- `RPCConnectRPCErrorCodeCancelled`\n- `RPCConnectRPCErrorCodeDataLoss`\n- `RPCConnectRPCErrorCodeDeadlineExceeded`\n- `RPCConnectRPCErrorCodeFailedPrecondition`\n- `RPCConnectRPCErrorCodeInternal`\n- `RPCConnectRPCErrorCodeInvalidArgument`\n- `RPCConnectRPCErrorCodeKey`\n- `RPCConnectRPCErrorCodeNotFound`\n- `RPCConnectRPCErrorCodeOutOfRange`\n- `RPCConnectRPCErrorCodePermissionDenied`\n- `RPCConnectRPCErrorCodeResourceExhausted`\n- `RPCConnectRPCErrorCodeUnauthenticated`\n- `RPCConnectRPCErrorCodeUnavailable`\n- `RPCConnectRPCErrorCodeUnimplemented`\n- `RPCConnectRPCErrorCodeUnknown`\n- `RPCConnectRPCRequestMetadata`\n- `RPCConnectRPCResponseMetadata`\n- `RPCGRPCRequestMetadata`\n- `RPCGRPCResponseMetadata`\n- `RPCGRPCStatusCodeAborted`\n- `RPCGRPCStatusCodeAlreadyExists`\n- `RPCGRPCStatusCodeCancelled`\n- `RPCGRPCStatusCodeDataLoss`\n- `RPCGRPCStatusCodeDeadlineExceeded`\n- `RPCGRPCStatusCodeFailedPrecondition`\n- `RPCGRPCStatusCodeInternal`\n- `RPCGRPCStatusCodeInvalidArgument`\n- `RPCGRPCStatusCodeKey`\n- `RPCGRPCStatusCodeNotFound`\n- `RPCGRPCStatusCodeOk`\n- `RPCGRPCStatusCodeOutOfRange`\n- `RPCGRPCStatusCodePermissionDenied`\n- `RPCGRPCStatusCodeResourceExhausted`\n- `RPCGRPCStatusCodeUnauthenticated`\n- `RPCGRPCStatusCodeUnavailable`\n- `RPCGRPCStatusCodeUnimplemented`\n- `RPCGRPCStatusCodeUnknown`\n- `RPCJSONRPCErrorCode`\n- `RPCJSONRPCErrorCodeKey`\n- `RPCJSONRPCErrorMessage`\n- `RPCJSONRPCErrorMessageKey`\n- `RPCJSONRPCRequestID`\n- `RPCJSONRPCRequestIDKey`\n- `RPCJSONRPCVersion`\n- `RPCJSONRPCVersionKey`\n- `RPCService`\n- `RPCServiceKey`\n- `RPCSystemApacheDubbo`\n- `RPCSystemConnectRPC`\n- `RPCSystemDotnetWcf`\n- `RPCSystemGRPC`\n- `RPCSystemJSONRPC`\n- `RPCSystemJavaRmi`\n- `RPCSystemKey`\n- `RPCSystemOncRPC`\n\n[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions\n[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md",
    "content": "# Semconv v1.39.0\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.39.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.39.0)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Code generated from semantic convention specification. DO NOT EDIT.\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\nimport \"go.opentelemetry.io/otel/attribute\"\n\n// Namespace: android\nconst (\n\t// AndroidAppStateKey is the attribute Key conforming to the \"android.app.state\"\n\t// semantic conventions. It represents the this attribute represents the state\n\t// of the application.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"created\"\n\t// Note: The Android lifecycle states are defined in\n\t// [Activity lifecycle callbacks], and from which the `OS identifiers` are\n\t// derived.\n\t//\n\t// [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc\n\tAndroidAppStateKey = attribute.Key(\"android.app.state\")\n\n\t// AndroidOSAPILevelKey is the attribute Key conforming to the\n\t// \"android.os.api_level\" semantic conventions. It represents the uniquely\n\t// identifies the framework API revision offered by a version (`os.version`) of\n\t// the android operating system. More information can be found in the\n\t// [Android API levels documentation].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"33\", \"32\"\n\t//\n\t// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels\n\tAndroidOSAPILevelKey = attribute.Key(\"android.os.api_level\")\n)\n\n// AndroidOSAPILevel returns an attribute KeyValue conforming to the\n// \"android.os.api_level\" semantic conventions. It represents the uniquely\n// identifies the framework API revision offered by a version (`os.version`) of\n// the android operating system. More information can be found in the\n// [Android API levels documentation].\n//\n// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels\nfunc AndroidOSAPILevel(val string) attribute.KeyValue {\n\treturn AndroidOSAPILevelKey.String(val)\n}\n\n// Enum values for android.app.state\nvar (\n\t// Any time before Activity.onResume() or, if the app has no Activity,\n\t// Context.startService() has been called in the app for the first time.\n\t//\n\t// Stability: development\n\tAndroidAppStateCreated = AndroidAppStateKey.String(\"created\")\n\t// Any time after Activity.onPause() or, if the app has no Activity,\n\t// Context.stopService() has been called when the app was in the foreground\n\t// state.\n\t//\n\t// Stability: development\n\tAndroidAppStateBackground = AndroidAppStateKey.String(\"background\")\n\t// Any time after Activity.onResume() or, if the app has no Activity,\n\t// Context.startService() has been called when the app was in either the created\n\t// or background states.\n\t//\n\t// Stability: development\n\tAndroidAppStateForeground = AndroidAppStateKey.String(\"foreground\")\n)\n\n// Namespace: app\nconst (\n\t// AppBuildIDKey is the attribute Key conforming to the \"app.build_id\" semantic\n\t// conventions. It represents the unique identifier for a particular build or\n\t// compilation of the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6cff0a7e-cefc-4668-96f5-1273d8b334d0\",\n\t// \"9f2b833506aa6973a92fde9733e6271f\", \"my-app-1.0.0-code-123\"\n\tAppBuildIDKey = attribute.Key(\"app.build_id\")\n\n\t// AppInstallationIDKey is the attribute Key conforming to the\n\t// \"app.installation.id\" semantic conventions. It represents a unique identifier\n\t// representing the installation of an application on a specific device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2ab2916d-a51f-4ac8-80ee-45ac31a28092\"\n\t// Note: Its value SHOULD persist across launches of the same application\n\t// installation, including through application upgrades.\n\t// It SHOULD change if the application is uninstalled or if all applications of\n\t// the vendor are uninstalled.\n\t// Additionally, users might be able to reset this value (e.g. by clearing\n\t// application data).\n\t// If an app is installed multiple times on the same device (e.g. in different\n\t// accounts on Android), each `app.installation.id` SHOULD have a different\n\t// value.\n\t// If multiple OpenTelemetry SDKs are used within the same application, they\n\t// SHOULD use the same value for `app.installation.id`.\n\t// Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the\n\t// `app.installation.id`.\n\t//\n\t// For iOS, this value SHOULD be equal to the [vendor identifier].\n\t//\n\t// For Android, examples of `app.installation.id` implementations include:\n\t//\n\t//   - [Firebase Installation ID].\n\t//   - A globally unique UUID which is persisted across sessions in your\n\t//     application.\n\t//   - [App set ID].\n\t//   - [`Settings.getString(Settings.Secure.ANDROID_ID)`].\n\t//\n\t// More information about Android identifier best practices can be found in the\n\t// [Android user data IDs guide].\n\t//\n\t// [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor\n\t// [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations\n\t// [App set ID]: https://developer.android.com/identity/app-set-id\n\t// [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID\n\t// [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids\n\tAppInstallationIDKey = attribute.Key(\"app.installation.id\")\n\n\t// AppJankFrameCountKey is the attribute Key conforming to the\n\t// \"app.jank.frame_count\" semantic conventions. It represents a number of frame\n\t// renders that experienced jank.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 9, 42\n\t// Note: Depending on platform limitations, the value provided MAY be\n\t// approximation.\n\tAppJankFrameCountKey = attribute.Key(\"app.jank.frame_count\")\n\n\t// AppJankPeriodKey is the attribute Key conforming to the \"app.jank.period\"\n\t// semantic conventions. It represents the time period, in seconds, for which\n\t// this jank is being reported.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 5.0, 10.24\n\tAppJankPeriodKey = attribute.Key(\"app.jank.period\")\n\n\t// AppJankThresholdKey is the attribute Key conforming to the\n\t// \"app.jank.threshold\" semantic conventions. It represents the minimum\n\t// rendering threshold for this jank, in seconds.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.016, 0.7, 1.024\n\tAppJankThresholdKey = attribute.Key(\"app.jank.threshold\")\n\n\t// AppScreenCoordinateXKey is the attribute Key conforming to the\n\t// \"app.screen.coordinate.x\" semantic conventions. It represents the x\n\t// (horizontal) coordinate of a screen coordinate, in screen pixels.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 131\n\tAppScreenCoordinateXKey = attribute.Key(\"app.screen.coordinate.x\")\n\n\t// AppScreenCoordinateYKey is the attribute Key conforming to the\n\t// \"app.screen.coordinate.y\" semantic conventions. It represents the y\n\t// (vertical) component of a screen coordinate, in screen pixels.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12, 99\n\tAppScreenCoordinateYKey = attribute.Key(\"app.screen.coordinate.y\")\n\n\t// AppScreenIDKey is the attribute Key conforming to the \"app.screen.id\"\n\t// semantic conventions. It represents an identifier that uniquely\n\t// differentiates this screen from other screens in the same application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"f9bc787d-ff05-48ad-90e1-fca1d46130b3\",\n\t// \"com.example.app.MainActivity\", \"com.example.shop.ProductDetailFragment\",\n\t// \"MyApp.ProfileView\", \"MyApp.ProfileViewController\"\n\t// Note: A screen represents only the part of the device display drawn by the\n\t// app. It typically contains multiple widgets or UI components and is larger in\n\t// scope than individual widgets. Multiple screens can coexist on the same\n\t// display simultaneously (e.g., split view on tablets).\n\tAppScreenIDKey = attribute.Key(\"app.screen.id\")\n\n\t// AppScreenNameKey is the attribute Key conforming to the \"app.screen.name\"\n\t// semantic conventions. It represents the name of an application screen.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MainActivity\", \"ProductDetailFragment\", \"ProfileView\",\n\t// \"ProfileViewController\"\n\t// Note: A screen represents only the part of the device display drawn by the\n\t// app. It typically contains multiple widgets or UI components and is larger in\n\t// scope than individual widgets. Multiple screens can coexist on the same\n\t// display simultaneously (e.g., split view on tablets).\n\tAppScreenNameKey = attribute.Key(\"app.screen.name\")\n\n\t// AppWidgetIDKey is the attribute Key conforming to the \"app.widget.id\"\n\t// semantic conventions. It represents an identifier that uniquely\n\t// differentiates this widget from other widgets in the same application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"f9bc787d-ff05-48ad-90e1-fca1d46130b3\", \"submit_order_1829\"\n\t// Note: A widget is an application component, typically an on-screen visual GUI\n\t// element.\n\tAppWidgetIDKey = attribute.Key(\"app.widget.id\")\n\n\t// AppWidgetNameKey is the attribute Key conforming to the \"app.widget.name\"\n\t// semantic conventions. It represents the name of an application widget.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"submit\", \"attack\", \"Clear Cart\"\n\t// Note: A widget is an application component, typically an on-screen visual GUI\n\t// element.\n\tAppWidgetNameKey = attribute.Key(\"app.widget.name\")\n)\n\n// AppBuildID returns an attribute KeyValue conforming to the \"app.build_id\"\n// semantic conventions. It represents the unique identifier for a particular\n// build or compilation of the application.\nfunc AppBuildID(val string) attribute.KeyValue {\n\treturn AppBuildIDKey.String(val)\n}\n\n// AppInstallationID returns an attribute KeyValue conforming to the\n// \"app.installation.id\" semantic conventions. It represents a unique identifier\n// representing the installation of an application on a specific device.\nfunc AppInstallationID(val string) attribute.KeyValue {\n\treturn AppInstallationIDKey.String(val)\n}\n\n// AppJankFrameCount returns an attribute KeyValue conforming to the\n// \"app.jank.frame_count\" semantic conventions. It represents a number of frame\n// renders that experienced jank.\nfunc AppJankFrameCount(val int) attribute.KeyValue {\n\treturn AppJankFrameCountKey.Int(val)\n}\n\n// AppJankPeriod returns an attribute KeyValue conforming to the\n// \"app.jank.period\" semantic conventions. It represents the time period, in\n// seconds, for which this jank is being reported.\nfunc AppJankPeriod(val float64) attribute.KeyValue {\n\treturn AppJankPeriodKey.Float64(val)\n}\n\n// AppJankThreshold returns an attribute KeyValue conforming to the\n// \"app.jank.threshold\" semantic conventions. It represents the minimum rendering\n// threshold for this jank, in seconds.\nfunc AppJankThreshold(val float64) attribute.KeyValue {\n\treturn AppJankThresholdKey.Float64(val)\n}\n\n// AppScreenCoordinateX returns an attribute KeyValue conforming to the\n// \"app.screen.coordinate.x\" semantic conventions. It represents the x\n// (horizontal) coordinate of a screen coordinate, in screen pixels.\nfunc AppScreenCoordinateX(val int) attribute.KeyValue {\n\treturn AppScreenCoordinateXKey.Int(val)\n}\n\n// AppScreenCoordinateY returns an attribute KeyValue conforming to the\n// \"app.screen.coordinate.y\" semantic conventions. It represents the y (vertical)\n// component of a screen coordinate, in screen pixels.\nfunc AppScreenCoordinateY(val int) attribute.KeyValue {\n\treturn AppScreenCoordinateYKey.Int(val)\n}\n\n// AppScreenID returns an attribute KeyValue conforming to the \"app.screen.id\"\n// semantic conventions. It represents an identifier that uniquely differentiates\n// this screen from other screens in the same application.\nfunc AppScreenID(val string) attribute.KeyValue {\n\treturn AppScreenIDKey.String(val)\n}\n\n// AppScreenName returns an attribute KeyValue conforming to the\n// \"app.screen.name\" semantic conventions. It represents the name of an\n// application screen.\nfunc AppScreenName(val string) attribute.KeyValue {\n\treturn AppScreenNameKey.String(val)\n}\n\n// AppWidgetID returns an attribute KeyValue conforming to the \"app.widget.id\"\n// semantic conventions. It represents an identifier that uniquely differentiates\n// this widget from other widgets in the same application.\nfunc AppWidgetID(val string) attribute.KeyValue {\n\treturn AppWidgetIDKey.String(val)\n}\n\n// AppWidgetName returns an attribute KeyValue conforming to the\n// \"app.widget.name\" semantic conventions. It represents the name of an\n// application widget.\nfunc AppWidgetName(val string) attribute.KeyValue {\n\treturn AppWidgetNameKey.String(val)\n}\n\n// Namespace: artifact\nconst (\n\t// ArtifactAttestationFilenameKey is the attribute Key conforming to the\n\t// \"artifact.attestation.filename\" semantic conventions. It represents the\n\t// provenance filename of the built attestation which directly relates to the\n\t// build artifact filename. This filename SHOULD accompany the artifact at\n\t// publish time. See the [SLSA Relationship] specification for more information.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"golang-binary-amd64-v0.1.0.attestation\",\n\t// \"docker-image-amd64-v0.1.0.intoto.json1\", \"release-1.tar.gz.attestation\",\n\t// \"file-name-package.tar.gz.intoto.json1\"\n\t//\n\t// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations\n\tArtifactAttestationFilenameKey = attribute.Key(\"artifact.attestation.filename\")\n\n\t// ArtifactAttestationHashKey is the attribute Key conforming to the\n\t// \"artifact.attestation.hash\" semantic conventions. It represents the full\n\t// [hash value (see glossary)], of the built attestation. Some envelopes in the\n\t// [software attestation space] also refer to this as the **digest**.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408\"\n\t//\n\t// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec\n\tArtifactAttestationHashKey = attribute.Key(\"artifact.attestation.hash\")\n\n\t// ArtifactAttestationIDKey is the attribute Key conforming to the\n\t// \"artifact.attestation.id\" semantic conventions. It represents the id of the\n\t// build [software attestation].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123\"\n\t//\n\t// [software attestation]: https://slsa.dev/attestation-model\n\tArtifactAttestationIDKey = attribute.Key(\"artifact.attestation.id\")\n\n\t// ArtifactFilenameKey is the attribute Key conforming to the\n\t// \"artifact.filename\" semantic conventions. It represents the human readable\n\t// file name of the artifact, typically generated during build and release\n\t// processes. Often includes the package name and version in the file name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"golang-binary-amd64-v0.1.0\", \"docker-image-amd64-v0.1.0\",\n\t// \"release-1.tar.gz\", \"file-name-package.tar.gz\"\n\t// Note: This file name can also act as the [Package Name]\n\t// in cases where the package ecosystem maps accordingly.\n\t// Additionally, the artifact [can be published]\n\t// for others, but that is not a guarantee.\n\t//\n\t// [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model\n\t// [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain\n\tArtifactFilenameKey = attribute.Key(\"artifact.filename\")\n\n\t// ArtifactHashKey is the attribute Key conforming to the \"artifact.hash\"\n\t// semantic conventions. It represents the full [hash value (see glossary)],\n\t// often found in checksum.txt on a release of the artifact and used to verify\n\t// package integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9\"\n\t// Note: The specific algorithm used to create the cryptographic hash value is\n\t// not defined. In situations where an artifact has multiple\n\t// cryptographic hashes, it is up to the implementer to choose which\n\t// hash value to set here; this should be the most secure hash algorithm\n\t// that is suitable for the situation and consistent with the\n\t// corresponding attestation. The implementer can then provide the other\n\t// hash values through an additional set of attribute extensions as they\n\t// deem necessary.\n\t//\n\t// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\tArtifactHashKey = attribute.Key(\"artifact.hash\")\n\n\t// ArtifactPurlKey is the attribute Key conforming to the \"artifact.purl\"\n\t// semantic conventions. It represents the [Package URL] of the\n\t// [package artifact] provides a standard way to identify and locate the\n\t// packaged artifact.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pkg:github/package-url/purl-spec@1209109710924\",\n\t// \"pkg:npm/foo@12.12.3\"\n\t//\n\t// [Package URL]: https://github.com/package-url/purl-spec\n\t// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model\n\tArtifactPurlKey = attribute.Key(\"artifact.purl\")\n\n\t// ArtifactVersionKey is the attribute Key conforming to the \"artifact.version\"\n\t// semantic conventions. It represents the version of the artifact.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"v0.1.0\", \"1.2.1\", \"122691-build\"\n\tArtifactVersionKey = attribute.Key(\"artifact.version\")\n)\n\n// ArtifactAttestationFilename returns an attribute KeyValue conforming to the\n// \"artifact.attestation.filename\" semantic conventions. It represents the\n// provenance filename of the built attestation which directly relates to the\n// build artifact filename. This filename SHOULD accompany the artifact at\n// publish time. See the [SLSA Relationship] specification for more information.\n//\n// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations\nfunc ArtifactAttestationFilename(val string) attribute.KeyValue {\n\treturn ArtifactAttestationFilenameKey.String(val)\n}\n\n// ArtifactAttestationHash returns an attribute KeyValue conforming to the\n// \"artifact.attestation.hash\" semantic conventions. It represents the full\n// [hash value (see glossary)], of the built attestation. Some envelopes in the\n// [software attestation space] also refer to this as the **digest**.\n//\n// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec\nfunc ArtifactAttestationHash(val string) attribute.KeyValue {\n\treturn ArtifactAttestationHashKey.String(val)\n}\n\n// ArtifactAttestationID returns an attribute KeyValue conforming to the\n// \"artifact.attestation.id\" semantic conventions. It represents the id of the\n// build [software attestation].\n//\n// [software attestation]: https://slsa.dev/attestation-model\nfunc ArtifactAttestationID(val string) attribute.KeyValue {\n\treturn ArtifactAttestationIDKey.String(val)\n}\n\n// ArtifactFilename returns an attribute KeyValue conforming to the\n// \"artifact.filename\" semantic conventions. It represents the human readable\n// file name of the artifact, typically generated during build and release\n// processes. Often includes the package name and version in the file name.\nfunc ArtifactFilename(val string) attribute.KeyValue {\n\treturn ArtifactFilenameKey.String(val)\n}\n\n// ArtifactHash returns an attribute KeyValue conforming to the \"artifact.hash\"\n// semantic conventions. It represents the full [hash value (see glossary)],\n// often found in checksum.txt on a release of the artifact and used to verify\n// package integrity.\n//\n// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\nfunc ArtifactHash(val string) attribute.KeyValue {\n\treturn ArtifactHashKey.String(val)\n}\n\n// ArtifactPurl returns an attribute KeyValue conforming to the \"artifact.purl\"\n// semantic conventions. It represents the [Package URL] of the\n// [package artifact] provides a standard way to identify and locate the packaged\n// artifact.\n//\n// [Package URL]: https://github.com/package-url/purl-spec\n// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model\nfunc ArtifactPurl(val string) attribute.KeyValue {\n\treturn ArtifactPurlKey.String(val)\n}\n\n// ArtifactVersion returns an attribute KeyValue conforming to the\n// \"artifact.version\" semantic conventions. It represents the version of the\n// artifact.\nfunc ArtifactVersion(val string) attribute.KeyValue {\n\treturn ArtifactVersionKey.String(val)\n}\n\n// Namespace: aws\nconst (\n\t// AWSBedrockGuardrailIDKey is the attribute Key conforming to the\n\t// \"aws.bedrock.guardrail.id\" semantic conventions. It represents the unique\n\t// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and\n\t// prevent unwanted behavior from model responses or user messages.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"sgi5gkybzqak\"\n\t//\n\t// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html\n\tAWSBedrockGuardrailIDKey = attribute.Key(\"aws.bedrock.guardrail.id\")\n\n\t// AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the\n\t// \"aws.bedrock.knowledge_base.id\" semantic conventions. It represents the\n\t// unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a\n\t// bank of information that can be queried by models to generate more relevant\n\t// responses and augment prompts.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"XFWUPB9PAW\"\n\t//\n\t// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html\n\tAWSBedrockKnowledgeBaseIDKey = attribute.Key(\"aws.bedrock.knowledge_base.id\")\n\n\t// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.attribute_definitions\" semantic conventions. It represents the\n\t// JSON-serialized value of each item in the `AttributeDefinitions` request\n\t// field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }\"\n\tAWSDynamoDBAttributeDefinitionsKey = attribute.Key(\"aws.dynamodb.attribute_definitions\")\n\n\t// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.attributes_to_get\" semantic conventions. It represents the\n\t// value of the `AttributesToGet` request parameter.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"lives\", \"id\"\n\tAWSDynamoDBAttributesToGetKey = attribute.Key(\"aws.dynamodb.attributes_to_get\")\n\n\t// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.consistent_read\" semantic conventions. It represents the value\n\t// of the `ConsistentRead` request parameter.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAWSDynamoDBConsistentReadKey = attribute.Key(\"aws.dynamodb.consistent_read\")\n\n\t// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.consumed_capacity\" semantic conventions. It represents the\n\t// JSON-serialized value of each item in the `ConsumedCapacity` response field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" :\n\t// { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\":\n\t// number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number,\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } },\n\t// \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number,\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\":\n\t// \"string\", \"WriteCapacityUnits\": number }\"\n\tAWSDynamoDBConsumedCapacityKey = attribute.Key(\"aws.dynamodb.consumed_capacity\")\n\n\t// AWSDynamoDBCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.count\" semantic conventions. It represents the value of the\n\t// `Count` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBCountKey = attribute.Key(\"aws.dynamodb.count\")\n\n\t// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.exclusive_start_table\" semantic conventions. It represents the\n\t// value of the `ExclusiveStartTableName` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Users\", \"CatsTable\"\n\tAWSDynamoDBExclusiveStartTableKey = attribute.Key(\"aws.dynamodb.exclusive_start_table\")\n\n\t// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to\n\t// the \"aws.dynamodb.global_secondary_index_updates\" semantic conventions. It\n\t// represents the JSON-serialized value of each item in the\n\t// `GlobalSecondaryIndexUpdates` request field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ {\n\t// \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": {\n\t// \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" },\n\t// \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\":\n\t// number } }\"\n\tAWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key(\"aws.dynamodb.global_secondary_index_updates\")\n\n\t// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.global_secondary_indexes\" semantic conventions. It represents\n\t// the JSON-serialized value of each item of the `GlobalSecondaryIndexes`\n\t// request field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\":\n\t// \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [\n\t// \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": {\n\t// \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }\"\n\tAWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key(\"aws.dynamodb.global_secondary_indexes\")\n\n\t// AWSDynamoDBIndexNameKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.index_name\" semantic conventions. It represents the value of\n\t// the `IndexName` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"name_to_group\"\n\tAWSDynamoDBIndexNameKey = attribute.Key(\"aws.dynamodb.index_name\")\n\n\t// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.item_collection_metrics\" semantic conventions. It represents\n\t// the JSON-serialized value of the `ItemCollectionMetrics` response field.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob,\n\t// \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" :\n\t// \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\":\n\t// \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }\"\n\tAWSDynamoDBItemCollectionMetricsKey = attribute.Key(\"aws.dynamodb.item_collection_metrics\")\n\n\t// AWSDynamoDBLimitKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.limit\" semantic conventions. It represents the value of the\n\t// `Limit` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBLimitKey = attribute.Key(\"aws.dynamodb.limit\")\n\n\t// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.local_secondary_indexes\" semantic conventions. It represents\n\t// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request\n\t// field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\":\n\t// number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\",\n\t// \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ],\n\t// \"ProjectionType\": \"string\" } }\"\n\tAWSDynamoDBLocalSecondaryIndexesKey = attribute.Key(\"aws.dynamodb.local_secondary_indexes\")\n\n\t// AWSDynamoDBProjectionKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.projection\" semantic conventions. It represents the value of\n\t// the `ProjectionExpression` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Title\", \"Title, Price, Color\", \"Title, Description, RelatedItems,\n\t// ProductReviews\"\n\tAWSDynamoDBProjectionKey = attribute.Key(\"aws.dynamodb.projection\")\n\n\t// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.provisioned_read_capacity\" semantic conventions. It represents\n\t// the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 2.0\n\tAWSDynamoDBProvisionedReadCapacityKey = attribute.Key(\"aws.dynamodb.provisioned_read_capacity\")\n\n\t// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.provisioned_write_capacity\" semantic conventions. It represents\n\t// the value of the `ProvisionedThroughput.WriteCapacityUnits` request\n\t// parameter.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0, 2.0\n\tAWSDynamoDBProvisionedWriteCapacityKey = attribute.Key(\"aws.dynamodb.provisioned_write_capacity\")\n\n\t// AWSDynamoDBScanForwardKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.scan_forward\" semantic conventions. It represents the value of\n\t// the `ScanIndexForward` request parameter.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAWSDynamoDBScanForwardKey = attribute.Key(\"aws.dynamodb.scan_forward\")\n\n\t// AWSDynamoDBScannedCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.scanned_count\" semantic conventions. It represents the value of\n\t// the `ScannedCount` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 50\n\tAWSDynamoDBScannedCountKey = attribute.Key(\"aws.dynamodb.scanned_count\")\n\n\t// AWSDynamoDBSegmentKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.segment\" semantic conventions. It represents the value of the\n\t// `Segment` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10\n\tAWSDynamoDBSegmentKey = attribute.Key(\"aws.dynamodb.segment\")\n\n\t// AWSDynamoDBSelectKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.select\" semantic conventions. It represents the value of the\n\t// `Select` request parameter.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ALL_ATTRIBUTES\", \"COUNT\"\n\tAWSDynamoDBSelectKey = attribute.Key(\"aws.dynamodb.select\")\n\n\t// AWSDynamoDBTableCountKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.table_count\" semantic conventions. It represents the number of\n\t// items in the `TableNames` response parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 20\n\tAWSDynamoDBTableCountKey = attribute.Key(\"aws.dynamodb.table_count\")\n\n\t// AWSDynamoDBTableNamesKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.table_names\" semantic conventions. It represents the keys in\n\t// the `RequestItems` object field.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Users\", \"Cats\"\n\tAWSDynamoDBTableNamesKey = attribute.Key(\"aws.dynamodb.table_names\")\n\n\t// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the\n\t// \"aws.dynamodb.total_segments\" semantic conventions. It represents the value\n\t// of the `TotalSegments` request parameter.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tAWSDynamoDBTotalSegmentsKey = attribute.Key(\"aws.dynamodb.total_segments\")\n\n\t// AWSECSClusterARNKey is the attribute Key conforming to the\n\t// \"aws.ecs.cluster.arn\" semantic conventions. It represents the ARN of an\n\t// [ECS cluster].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster\"\n\t//\n\t// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html\n\tAWSECSClusterARNKey = attribute.Key(\"aws.ecs.cluster.arn\")\n\n\t// AWSECSContainerARNKey is the attribute Key conforming to the\n\t// \"aws.ecs.container.arn\" semantic conventions. It represents the Amazon\n\t// Resource Name (ARN) of an [ECS container instance].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9\"\n\t//\n\t// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html\n\tAWSECSContainerARNKey = attribute.Key(\"aws.ecs.container.arn\")\n\n\t// AWSECSLaunchtypeKey is the attribute Key conforming to the\n\t// \"aws.ecs.launchtype\" semantic conventions. It represents the [launch type]\n\t// for an ECS task.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html\n\tAWSECSLaunchtypeKey = attribute.Key(\"aws.ecs.launchtype\")\n\n\t// AWSECSTaskARNKey is the attribute Key conforming to the \"aws.ecs.task.arn\"\n\t// semantic conventions. It represents the ARN of a running [ECS task].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b\",\n\t// \"arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd\"\n\t//\n\t// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids\n\tAWSECSTaskARNKey = attribute.Key(\"aws.ecs.task.arn\")\n\n\t// AWSECSTaskFamilyKey is the attribute Key conforming to the\n\t// \"aws.ecs.task.family\" semantic conventions. It represents the family name of\n\t// the [ECS task definition] used to create the ECS task.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-family\"\n\t//\n\t// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html\n\tAWSECSTaskFamilyKey = attribute.Key(\"aws.ecs.task.family\")\n\n\t// AWSECSTaskIDKey is the attribute Key conforming to the \"aws.ecs.task.id\"\n\t// semantic conventions. It represents the ID of a running ECS task. The ID MUST\n\t// be extracted from `task.arn`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10838bed-421f-43ef-870a-f43feacbbb5b\",\n\t// \"23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd\"\n\tAWSECSTaskIDKey = attribute.Key(\"aws.ecs.task.id\")\n\n\t// AWSECSTaskRevisionKey is the attribute Key conforming to the\n\t// \"aws.ecs.task.revision\" semantic conventions. It represents the revision for\n\t// the task definition used to create the ECS task.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"8\", \"26\"\n\tAWSECSTaskRevisionKey = attribute.Key(\"aws.ecs.task.revision\")\n\n\t// AWSEKSClusterARNKey is the attribute Key conforming to the\n\t// \"aws.eks.cluster.arn\" semantic conventions. It represents the ARN of an EKS\n\t// cluster.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster\"\n\tAWSEKSClusterARNKey = attribute.Key(\"aws.eks.cluster.arn\")\n\n\t// AWSExtendedRequestIDKey is the attribute Key conforming to the\n\t// \"aws.extended_request_id\" semantic conventions. It represents the AWS\n\t// extended request ID as returned in the response header `x-amz-id-2`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"\n\tAWSExtendedRequestIDKey = attribute.Key(\"aws.extended_request_id\")\n\n\t// AWSKinesisStreamNameKey is the attribute Key conforming to the\n\t// \"aws.kinesis.stream_name\" semantic conventions. It represents the name of the\n\t// AWS Kinesis [stream] the request refers to. Corresponds to the\n\t// `--stream-name` parameter of the Kinesis [describe-stream] operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"some-stream-name\"\n\t//\n\t// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html\n\t// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html\n\tAWSKinesisStreamNameKey = attribute.Key(\"aws.kinesis.stream_name\")\n\n\t// AWSLambdaInvokedARNKey is the attribute Key conforming to the\n\t// \"aws.lambda.invoked_arn\" semantic conventions. It represents the full invoked\n\t// ARN as provided on the `Context` passed to the function (\n\t// `Lambda-Runtime-Invoked-Function-Arn` header on the\n\t// `/runtime/invocation/next` applicable).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:lambda:us-east-1:123456:function:myfunction:myalias\"\n\t// Note: This may be different from `cloud.resource_id` if an alias is involved.\n\tAWSLambdaInvokedARNKey = attribute.Key(\"aws.lambda.invoked_arn\")\n\n\t// AWSLambdaResourceMappingIDKey is the attribute Key conforming to the\n\t// \"aws.lambda.resource_mapping.id\" semantic conventions. It represents the UUID\n\t// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda\n\t// function. It's contents are read by Lambda and used to trigger a function.\n\t// This isn't available in the lambda execution context or the lambda runtime\n\t// environtment. This is going to be populated by the AWS SDK for each language\n\t// when that UUID is present. Some of these operations are\n\t// Create/Delete/Get/List/Update EventSourceMapping.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"587ad24b-03b9-4413-8202-bbd56b36e5b7\"\n\t//\n\t// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html\n\tAWSLambdaResourceMappingIDKey = attribute.Key(\"aws.lambda.resource_mapping.id\")\n\n\t// AWSLogGroupARNsKey is the attribute Key conforming to the\n\t// \"aws.log.group.arns\" semantic conventions. It represents the Amazon Resource\n\t// Name(s) (ARN) of the AWS log group(s).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*\"\n\t// Note: See the [log group ARN format documentation].\n\t//\n\t// [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format\n\tAWSLogGroupARNsKey = attribute.Key(\"aws.log.group.arns\")\n\n\t// AWSLogGroupNamesKey is the attribute Key conforming to the\n\t// \"aws.log.group.names\" semantic conventions. It represents the name(s) of the\n\t// AWS log group(s) an application is writing to.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/aws/lambda/my-function\", \"opentelemetry-service\"\n\t// Note: Multiple log groups must be supported for cases like multi-container\n\t// applications, where a single application has sidecar containers, and each\n\t// write to their own log group.\n\tAWSLogGroupNamesKey = attribute.Key(\"aws.log.group.names\")\n\n\t// AWSLogStreamARNsKey is the attribute Key conforming to the\n\t// \"aws.log.stream.arns\" semantic conventions. It represents the ARN(s) of the\n\t// AWS log stream(s).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"\n\t// Note: See the [log stream ARN format documentation]. One log group can\n\t// contain several log streams, so these ARNs necessarily identify both a log\n\t// group and a log stream.\n\t//\n\t// [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format\n\tAWSLogStreamARNsKey = attribute.Key(\"aws.log.stream.arns\")\n\n\t// AWSLogStreamNamesKey is the attribute Key conforming to the\n\t// \"aws.log.stream.names\" semantic conventions. It represents the name(s) of the\n\t// AWS log stream(s) an application is writing to.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"\n\tAWSLogStreamNamesKey = attribute.Key(\"aws.log.stream.names\")\n\n\t// AWSRequestIDKey is the attribute Key conforming to the \"aws.request_id\"\n\t// semantic conventions. It represents the AWS request ID as returned in the\n\t// response headers `x-amzn-requestid`, `x-amzn-request-id` or\n\t// `x-amz-request-id`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"79b9da39-b7ae-508a-a6bc-864b2829c622\", \"C9ER4AJX75574TDJ\"\n\tAWSRequestIDKey = attribute.Key(\"aws.request_id\")\n\n\t// AWSS3BucketKey is the attribute Key conforming to the \"aws.s3.bucket\"\n\t// semantic conventions. It represents the S3 bucket name the request refers to.\n\t// Corresponds to the `--bucket` parameter of the [S3 API] operations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"some-bucket-name\"\n\t// Note: The `bucket` attribute is applicable to all S3 operations that\n\t// reference a bucket, i.e. that require the bucket name as a mandatory\n\t// parameter.\n\t// This applies to almost all S3 operations except `list-buckets`.\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\tAWSS3BucketKey = attribute.Key(\"aws.s3.bucket\")\n\n\t// AWSS3CopySourceKey is the attribute Key conforming to the\n\t// \"aws.s3.copy_source\" semantic conventions. It represents the source object\n\t// (in the form `bucket`/`key`) for the copy operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"someFile.yml\"\n\t// Note: The `copy_source` attribute applies to S3 copy operations and\n\t// corresponds to the `--copy-source` parameter\n\t// of the [copy-object operation within the S3 API].\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [copy-object]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3CopySourceKey = attribute.Key(\"aws.s3.copy_source\")\n\n\t// AWSS3DeleteKey is the attribute Key conforming to the \"aws.s3.delete\"\n\t// semantic conventions. It represents the delete request container that\n\t// specifies the objects to be deleted.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean\"\n\t// Note: The `delete` attribute is only applicable to the [delete-object]\n\t// operation.\n\t// The `delete` attribute corresponds to the `--delete` parameter of the\n\t// [delete-objects operation within the S3 API].\n\t//\n\t// [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html\n\t// [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html\n\tAWSS3DeleteKey = attribute.Key(\"aws.s3.delete\")\n\n\t// AWSS3KeyKey is the attribute Key conforming to the \"aws.s3.key\" semantic\n\t// conventions. It represents the S3 object key the request refers to.\n\t// Corresponds to the `--key` parameter of the [S3 API] operations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"someFile.yml\"\n\t// Note: The `key` attribute is applicable to all object-related S3 operations,\n\t// i.e. that require the object key as a mandatory parameter.\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [copy-object]\n\t//   - [delete-object]\n\t//   - [get-object]\n\t//   - [head-object]\n\t//   - [put-object]\n\t//   - [restore-object]\n\t//   - [select-object-content]\n\t//   - [abort-multipart-upload]\n\t//   - [complete-multipart-upload]\n\t//   - [create-multipart-upload]\n\t//   - [list-parts]\n\t//   - [upload-part]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\t// [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html\n\t// [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html\n\t// [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html\n\t// [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html\n\t// [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html\n\t// [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html\n\t// [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html\n\t// [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html\n\t// [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html\n\t// [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html\n\t// [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3KeyKey = attribute.Key(\"aws.s3.key\")\n\n\t// AWSS3PartNumberKey is the attribute Key conforming to the\n\t// \"aws.s3.part_number\" semantic conventions. It represents the part number of\n\t// the part being uploaded in a multipart-upload operation. This is a positive\n\t// integer between 1 and 10,000.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3456\n\t// Note: The `part_number` attribute is only applicable to the [upload-part]\n\t// and [upload-part-copy] operations.\n\t// The `part_number` attribute corresponds to the `--part-number` parameter of\n\t// the\n\t// [upload-part operation within the S3 API].\n\t//\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\t// [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\tAWSS3PartNumberKey = attribute.Key(\"aws.s3.part_number\")\n\n\t// AWSS3UploadIDKey is the attribute Key conforming to the \"aws.s3.upload_id\"\n\t// semantic conventions. It represents the upload ID that identifies the\n\t// multipart upload.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ\"\n\t// Note: The `upload_id` attribute applies to S3 multipart-upload operations and\n\t// corresponds to the `--upload-id` parameter\n\t// of the [S3 API] multipart operations.\n\t// This applies in particular to the following operations:\n\t//\n\t//   - [abort-multipart-upload]\n\t//   - [complete-multipart-upload]\n\t//   - [list-parts]\n\t//   - [upload-part]\n\t//   - [upload-part-copy]\n\t//\n\t//\n\t// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\n\t// [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html\n\t// [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html\n\t// [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html\n\t// [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html\n\t// [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html\n\tAWSS3UploadIDKey = attribute.Key(\"aws.s3.upload_id\")\n\n\t// AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the\n\t// \"aws.secretsmanager.secret.arn\" semantic conventions. It represents the ARN\n\t// of the Secret stored in the Secrets Mangger.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters\"\n\tAWSSecretsmanagerSecretARNKey = attribute.Key(\"aws.secretsmanager.secret.arn\")\n\n\t// AWSSNSTopicARNKey is the attribute Key conforming to the \"aws.sns.topic.arn\"\n\t// semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon\n\t// SNS [topic] is a logical access point that acts as a communication channel.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE\"\n\t//\n\t// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html\n\tAWSSNSTopicARNKey = attribute.Key(\"aws.sns.topic.arn\")\n\n\t// AWSSQSQueueURLKey is the attribute Key conforming to the \"aws.sqs.queue.url\"\n\t// semantic conventions. It represents the URL of the AWS SQS Queue. It's a\n\t// unique identifier for a queue in Amazon Simple Queue Service (SQS) and is\n\t// used to access the queue and perform actions on it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue\"\n\tAWSSQSQueueURLKey = attribute.Key(\"aws.sqs.queue.url\")\n\n\t// AWSStepFunctionsActivityARNKey is the attribute Key conforming to the\n\t// \"aws.step_functions.activity.arn\" semantic conventions. It represents the ARN\n\t// of the AWS Step Functions Activity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:states:us-east-1:123456789012:activity:get-greeting\"\n\tAWSStepFunctionsActivityARNKey = attribute.Key(\"aws.step_functions.activity.arn\")\n\n\t// AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the\n\t// \"aws.step_functions.state_machine.arn\" semantic conventions. It represents\n\t// the ARN of the AWS Step Functions State Machine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1\"\n\tAWSStepFunctionsStateMachineARNKey = attribute.Key(\"aws.step_functions.state_machine.arn\")\n)\n\n// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the\n// \"aws.bedrock.guardrail.id\" semantic conventions. It represents the unique\n// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and\n// prevent unwanted behavior from model responses or user messages.\n//\n// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html\nfunc AWSBedrockGuardrailID(val string) attribute.KeyValue {\n\treturn AWSBedrockGuardrailIDKey.String(val)\n}\n\n// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the\n// \"aws.bedrock.knowledge_base.id\" semantic conventions. It represents the unique\n// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of\n// information that can be queried by models to generate more relevant responses\n// and augment prompts.\n//\n// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html\nfunc AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue {\n\treturn AWSBedrockKnowledgeBaseIDKey.String(val)\n}\n\n// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.attribute_definitions\" semantic conventions. It represents\n// the JSON-serialized value of each item in the `AttributeDefinitions` request\n// field.\nfunc AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)\n}\n\n// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.attributes_to_get\" semantic conventions. It represents the value\n// of the `AttributesToGet` request parameter.\nfunc AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBAttributesToGetKey.StringSlice(val)\n}\n\n// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.consistent_read\" semantic conventions. It represents the value\n// of the `ConsistentRead` request parameter.\nfunc AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {\n\treturn AWSDynamoDBConsistentReadKey.Bool(val)\n}\n\n// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.consumed_capacity\" semantic conventions. It represents the\n// JSON-serialized value of each item in the `ConsumedCapacity` response field.\nfunc AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBConsumedCapacityKey.StringSlice(val)\n}\n\n// AWSDynamoDBCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.count\" semantic conventions. It represents the value of the\n// `Count` response parameter.\nfunc AWSDynamoDBCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBCountKey.Int(val)\n}\n\n// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.exclusive_start_table\" semantic conventions. It represents the\n// value of the `ExclusiveStartTableName` request parameter.\nfunc AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {\n\treturn AWSDynamoDBExclusiveStartTableKey.String(val)\n}\n\n// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue\n// conforming to the \"aws.dynamodb.global_secondary_index_updates\" semantic\n// conventions. It represents the JSON-serialized value of each item in the\n// `GlobalSecondaryIndexUpdates` request field.\nfunc AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)\n}\n\n// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.global_secondary_indexes\" semantic conventions. It\n// represents the JSON-serialized value of each item of the\n// `GlobalSecondaryIndexes` request field.\nfunc AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)\n}\n\n// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.index_name\" semantic conventions. It represents the value of the\n// `IndexName` request parameter.\nfunc AWSDynamoDBIndexName(val string) attribute.KeyValue {\n\treturn AWSDynamoDBIndexNameKey.String(val)\n}\n\n// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.item_collection_metrics\" semantic conventions. It represents\n// the JSON-serialized value of the `ItemCollectionMetrics` response field.\nfunc AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {\n\treturn AWSDynamoDBItemCollectionMetricsKey.String(val)\n}\n\n// AWSDynamoDBLimit returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.limit\" semantic conventions. It represents the value of the\n// `Limit` request parameter.\nfunc AWSDynamoDBLimit(val int) attribute.KeyValue {\n\treturn AWSDynamoDBLimitKey.Int(val)\n}\n\n// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.local_secondary_indexes\" semantic conventions. It represents\n// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request\n// field.\nfunc AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)\n}\n\n// AWSDynamoDBProjection returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.projection\" semantic conventions. It represents the value of the\n// `ProjectionExpression` request parameter.\nfunc AWSDynamoDBProjection(val string) attribute.KeyValue {\n\treturn AWSDynamoDBProjectionKey.String(val)\n}\n\n// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to\n// the \"aws.dynamodb.provisioned_read_capacity\" semantic conventions. It\n// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request\n// parameter.\nfunc AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {\n\treturn AWSDynamoDBProvisionedReadCapacityKey.Float64(val)\n}\n\n// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming\n// to the \"aws.dynamodb.provisioned_write_capacity\" semantic conventions. It\n// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request\n// parameter.\nfunc AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {\n\treturn AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)\n}\n\n// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.scan_forward\" semantic conventions. It represents the value of\n// the `ScanIndexForward` request parameter.\nfunc AWSDynamoDBScanForward(val bool) attribute.KeyValue {\n\treturn AWSDynamoDBScanForwardKey.Bool(val)\n}\n\n// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.scanned_count\" semantic conventions. It represents the value of\n// the `ScannedCount` response parameter.\nfunc AWSDynamoDBScannedCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBScannedCountKey.Int(val)\n}\n\n// AWSDynamoDBSegment returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.segment\" semantic conventions. It represents the value of the\n// `Segment` request parameter.\nfunc AWSDynamoDBSegment(val int) attribute.KeyValue {\n\treturn AWSDynamoDBSegmentKey.Int(val)\n}\n\n// AWSDynamoDBSelect returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.select\" semantic conventions. It represents the value of the\n// `Select` request parameter.\nfunc AWSDynamoDBSelect(val string) attribute.KeyValue {\n\treturn AWSDynamoDBSelectKey.String(val)\n}\n\n// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.table_count\" semantic conventions. It represents the number of\n// items in the `TableNames` response parameter.\nfunc AWSDynamoDBTableCount(val int) attribute.KeyValue {\n\treturn AWSDynamoDBTableCountKey.Int(val)\n}\n\n// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.table_names\" semantic conventions. It represents the keys in the\n// `RequestItems` object field.\nfunc AWSDynamoDBTableNames(val ...string) attribute.KeyValue {\n\treturn AWSDynamoDBTableNamesKey.StringSlice(val)\n}\n\n// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the\n// \"aws.dynamodb.total_segments\" semantic conventions. It represents the value of\n// the `TotalSegments` request parameter.\nfunc AWSDynamoDBTotalSegments(val int) attribute.KeyValue {\n\treturn AWSDynamoDBTotalSegmentsKey.Int(val)\n}\n\n// AWSECSClusterARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.cluster.arn\" semantic conventions. It represents the ARN of an\n// [ECS cluster].\n//\n// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html\nfunc AWSECSClusterARN(val string) attribute.KeyValue {\n\treturn AWSECSClusterARNKey.String(val)\n}\n\n// AWSECSContainerARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.container.arn\" semantic conventions. It represents the Amazon\n// Resource Name (ARN) of an [ECS container instance].\n//\n// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html\nfunc AWSECSContainerARN(val string) attribute.KeyValue {\n\treturn AWSECSContainerARNKey.String(val)\n}\n\n// AWSECSTaskARN returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.arn\" semantic conventions. It represents the ARN of a running\n// [ECS task].\n//\n// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids\nfunc AWSECSTaskARN(val string) attribute.KeyValue {\n\treturn AWSECSTaskARNKey.String(val)\n}\n\n// AWSECSTaskFamily returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.family\" semantic conventions. It represents the family name of\n// the [ECS task definition] used to create the ECS task.\n//\n// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html\nfunc AWSECSTaskFamily(val string) attribute.KeyValue {\n\treturn AWSECSTaskFamilyKey.String(val)\n}\n\n// AWSECSTaskID returns an attribute KeyValue conforming to the \"aws.ecs.task.id\"\n// semantic conventions. It represents the ID of a running ECS task. The ID MUST\n// be extracted from `task.arn`.\nfunc AWSECSTaskID(val string) attribute.KeyValue {\n\treturn AWSECSTaskIDKey.String(val)\n}\n\n// AWSECSTaskRevision returns an attribute KeyValue conforming to the\n// \"aws.ecs.task.revision\" semantic conventions. It represents the revision for\n// the task definition used to create the ECS task.\nfunc AWSECSTaskRevision(val string) attribute.KeyValue {\n\treturn AWSECSTaskRevisionKey.String(val)\n}\n\n// AWSEKSClusterARN returns an attribute KeyValue conforming to the\n// \"aws.eks.cluster.arn\" semantic conventions. It represents the ARN of an EKS\n// cluster.\nfunc AWSEKSClusterARN(val string) attribute.KeyValue {\n\treturn AWSEKSClusterARNKey.String(val)\n}\n\n// AWSExtendedRequestID returns an attribute KeyValue conforming to the\n// \"aws.extended_request_id\" semantic conventions. It represents the AWS extended\n// request ID as returned in the response header `x-amz-id-2`.\nfunc AWSExtendedRequestID(val string) attribute.KeyValue {\n\treturn AWSExtendedRequestIDKey.String(val)\n}\n\n// AWSKinesisStreamName returns an attribute KeyValue conforming to the\n// \"aws.kinesis.stream_name\" semantic conventions. It represents the name of the\n// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`\n//  parameter of the Kinesis [describe-stream] operation.\n//\n// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html\n// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html\nfunc AWSKinesisStreamName(val string) attribute.KeyValue {\n\treturn AWSKinesisStreamNameKey.String(val)\n}\n\n// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the\n// \"aws.lambda.invoked_arn\" semantic conventions. It represents the full invoked\n// ARN as provided on the `Context` passed to the function (\n// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`\n//  applicable).\nfunc AWSLambdaInvokedARN(val string) attribute.KeyValue {\n\treturn AWSLambdaInvokedARNKey.String(val)\n}\n\n// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the\n// \"aws.lambda.resource_mapping.id\" semantic conventions. It represents the UUID\n// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda\n// function. It's contents are read by Lambda and used to trigger a function.\n// This isn't available in the lambda execution context or the lambda runtime\n// environtment. This is going to be populated by the AWS SDK for each language\n// when that UUID is present. Some of these operations are\n// Create/Delete/Get/List/Update EventSourceMapping.\n//\n// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html\nfunc AWSLambdaResourceMappingID(val string) attribute.KeyValue {\n\treturn AWSLambdaResourceMappingIDKey.String(val)\n}\n\n// AWSLogGroupARNs returns an attribute KeyValue conforming to the\n// \"aws.log.group.arns\" semantic conventions. It represents the Amazon Resource\n// Name(s) (ARN) of the AWS log group(s).\nfunc AWSLogGroupARNs(val ...string) attribute.KeyValue {\n\treturn AWSLogGroupARNsKey.StringSlice(val)\n}\n\n// AWSLogGroupNames returns an attribute KeyValue conforming to the\n// \"aws.log.group.names\" semantic conventions. It represents the name(s) of the\n// AWS log group(s) an application is writing to.\nfunc AWSLogGroupNames(val ...string) attribute.KeyValue {\n\treturn AWSLogGroupNamesKey.StringSlice(val)\n}\n\n// AWSLogStreamARNs returns an attribute KeyValue conforming to the\n// \"aws.log.stream.arns\" semantic conventions. It represents the ARN(s) of the\n// AWS log stream(s).\nfunc AWSLogStreamARNs(val ...string) attribute.KeyValue {\n\treturn AWSLogStreamARNsKey.StringSlice(val)\n}\n\n// AWSLogStreamNames returns an attribute KeyValue conforming to the\n// \"aws.log.stream.names\" semantic conventions. It represents the name(s) of the\n// AWS log stream(s) an application is writing to.\nfunc AWSLogStreamNames(val ...string) attribute.KeyValue {\n\treturn AWSLogStreamNamesKey.StringSlice(val)\n}\n\n// AWSRequestID returns an attribute KeyValue conforming to the \"aws.request_id\"\n// semantic conventions. It represents the AWS request ID as returned in the\n// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`\n// .\nfunc AWSRequestID(val string) attribute.KeyValue {\n\treturn AWSRequestIDKey.String(val)\n}\n\n// AWSS3Bucket returns an attribute KeyValue conforming to the \"aws.s3.bucket\"\n// semantic conventions. It represents the S3 bucket name the request refers to.\n// Corresponds to the `--bucket` parameter of the [S3 API] operations.\n//\n// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\nfunc AWSS3Bucket(val string) attribute.KeyValue {\n\treturn AWSS3BucketKey.String(val)\n}\n\n// AWSS3CopySource returns an attribute KeyValue conforming to the\n// \"aws.s3.copy_source\" semantic conventions. It represents the source object (in\n// the form `bucket`/`key`) for the copy operation.\nfunc AWSS3CopySource(val string) attribute.KeyValue {\n\treturn AWSS3CopySourceKey.String(val)\n}\n\n// AWSS3Delete returns an attribute KeyValue conforming to the \"aws.s3.delete\"\n// semantic conventions. It represents the delete request container that\n// specifies the objects to be deleted.\nfunc AWSS3Delete(val string) attribute.KeyValue {\n\treturn AWSS3DeleteKey.String(val)\n}\n\n// AWSS3Key returns an attribute KeyValue conforming to the \"aws.s3.key\" semantic\n// conventions. It represents the S3 object key the request refers to.\n// Corresponds to the `--key` parameter of the [S3 API] operations.\n//\n// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html\nfunc AWSS3Key(val string) attribute.KeyValue {\n\treturn AWSS3KeyKey.String(val)\n}\n\n// AWSS3PartNumber returns an attribute KeyValue conforming to the\n// \"aws.s3.part_number\" semantic conventions. It represents the part number of\n// the part being uploaded in a multipart-upload operation. This is a positive\n// integer between 1 and 10,000.\nfunc AWSS3PartNumber(val int) attribute.KeyValue {\n\treturn AWSS3PartNumberKey.Int(val)\n}\n\n// AWSS3UploadID returns an attribute KeyValue conforming to the\n// \"aws.s3.upload_id\" semantic conventions. It represents the upload ID that\n// identifies the multipart upload.\nfunc AWSS3UploadID(val string) attribute.KeyValue {\n\treturn AWSS3UploadIDKey.String(val)\n}\n\n// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the\n// \"aws.secretsmanager.secret.arn\" semantic conventions. It represents the ARN of\n// the Secret stored in the Secrets Mangger.\nfunc AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {\n\treturn AWSSecretsmanagerSecretARNKey.String(val)\n}\n\n// AWSSNSTopicARN returns an attribute KeyValue conforming to the\n// \"aws.sns.topic.arn\" semantic conventions. It represents the ARN of the AWS SNS\n// Topic. An Amazon SNS [topic] is a logical access point that acts as a\n// communication channel.\n//\n// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html\nfunc AWSSNSTopicARN(val string) attribute.KeyValue {\n\treturn AWSSNSTopicARNKey.String(val)\n}\n\n// AWSSQSQueueURL returns an attribute KeyValue conforming to the\n// \"aws.sqs.queue.url\" semantic conventions. It represents the URL of the AWS SQS\n// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service\n// (SQS) and is used to access the queue and perform actions on it.\nfunc AWSSQSQueueURL(val string) attribute.KeyValue {\n\treturn AWSSQSQueueURLKey.String(val)\n}\n\n// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the\n// \"aws.step_functions.activity.arn\" semantic conventions. It represents the ARN\n// of the AWS Step Functions Activity.\nfunc AWSStepFunctionsActivityARN(val string) attribute.KeyValue {\n\treturn AWSStepFunctionsActivityARNKey.String(val)\n}\n\n// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to\n// the \"aws.step_functions.state_machine.arn\" semantic conventions. It represents\n// the ARN of the AWS Step Functions State Machine.\nfunc AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue {\n\treturn AWSStepFunctionsStateMachineARNKey.String(val)\n}\n\n// Enum values for aws.ecs.launchtype\nvar (\n\t// Amazon EC2\n\t// Stability: development\n\tAWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String(\"ec2\")\n\t// Amazon Fargate\n\t// Stability: development\n\tAWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String(\"fargate\")\n)\n\n// Namespace: azure\nconst (\n\t// AzureClientIDKey is the attribute Key conforming to the \"azure.client.id\"\n\t// semantic conventions. It represents the unique identifier of the client\n\t// instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"3ba4827d-4422-483f-b59f-85b74211c11d\", \"storage-client-1\"\n\tAzureClientIDKey = attribute.Key(\"azure.client.id\")\n\n\t// AzureCosmosDBConnectionModeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.connection.mode\" semantic conventions. It represents the\n\t// cosmos client connection mode.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAzureCosmosDBConnectionModeKey = attribute.Key(\"azure.cosmosdb.connection.mode\")\n\n\t// AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.consistency.level\" semantic conventions. It represents the\n\t// account or request [consistency level].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Eventual\", \"ConsistentPrefix\", \"BoundedStaleness\", \"Strong\",\n\t// \"Session\"\n\t//\n\t// [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels\n\tAzureCosmosDBConsistencyLevelKey = attribute.Key(\"azure.cosmosdb.consistency.level\")\n\n\t// AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to\n\t// the \"azure.cosmosdb.operation.contacted_regions\" semantic conventions. It\n\t// represents the list of regions contacted during operation in the order that\n\t// they were contacted. If there is more than one region listed, it indicates\n\t// that the operation was performed on multiple regions i.e. cross-regional\n\t// call.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"North Central US\", \"Australia East\", \"Australia Southeast\"\n\t// Note: Region name matches the format of `displayName` in [Azure Location API]\n\t//\n\t// [Azure Location API]: https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations\n\tAzureCosmosDBOperationContactedRegionsKey = attribute.Key(\"azure.cosmosdb.operation.contacted_regions\")\n\n\t// AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.operation.request_charge\" semantic conventions. It represents\n\t// the number of request units consumed by the operation.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 46.18, 1.0\n\tAzureCosmosDBOperationRequestChargeKey = attribute.Key(\"azure.cosmosdb.operation.request_charge\")\n\n\t// AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.request.body.size\" semantic conventions. It represents the\n\t// request payload size in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tAzureCosmosDBRequestBodySizeKey = attribute.Key(\"azure.cosmosdb.request.body.size\")\n\n\t// AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the\n\t// \"azure.cosmosdb.response.sub_status_code\" semantic conventions. It represents\n\t// the cosmos DB sub status code.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1000, 1002\n\tAzureCosmosDBResponseSubStatusCodeKey = attribute.Key(\"azure.cosmosdb.response.sub_status_code\")\n\n\t// AzureResourceProviderNamespaceKey is the attribute Key conforming to the\n\t// \"azure.resource_provider.namespace\" semantic conventions. It represents the\n\t// [Azure Resource Provider Namespace] as recognized by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Microsoft.Storage\", \"Microsoft.KeyVault\", \"Microsoft.ServiceBus\"\n\t//\n\t// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers\n\tAzureResourceProviderNamespaceKey = attribute.Key(\"azure.resource_provider.namespace\")\n\n\t// AzureServiceRequestIDKey is the attribute Key conforming to the\n\t// \"azure.service.request.id\" semantic conventions. It represents the unique\n\t// identifier of the service request. It's generated by the Azure service and\n\t// returned with the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"00000000-0000-0000-0000-000000000000\"\n\tAzureServiceRequestIDKey = attribute.Key(\"azure.service.request.id\")\n)\n\n// AzureClientID returns an attribute KeyValue conforming to the\n// \"azure.client.id\" semantic conventions. It represents the unique identifier of\n// the client instance.\nfunc AzureClientID(val string) attribute.KeyValue {\n\treturn AzureClientIDKey.String(val)\n}\n\n// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue\n// conforming to the \"azure.cosmosdb.operation.contacted_regions\" semantic\n// conventions. It represents the list of regions contacted during operation in\n// the order that they were contacted. If there is more than one region listed,\n// it indicates that the operation was performed on multiple regions i.e.\n// cross-regional call.\nfunc AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue {\n\treturn AzureCosmosDBOperationContactedRegionsKey.StringSlice(val)\n}\n\n// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming\n// to the \"azure.cosmosdb.operation.request_charge\" semantic conventions. It\n// represents the number of request units consumed by the operation.\nfunc AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue {\n\treturn AzureCosmosDBOperationRequestChargeKey.Float64(val)\n}\n\n// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the\n// \"azure.cosmosdb.request.body.size\" semantic conventions. It represents the\n// request payload size in bytes.\nfunc AzureCosmosDBRequestBodySize(val int) attribute.KeyValue {\n\treturn AzureCosmosDBRequestBodySizeKey.Int(val)\n}\n\n// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to\n// the \"azure.cosmosdb.response.sub_status_code\" semantic conventions. It\n// represents the cosmos DB sub status code.\nfunc AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue {\n\treturn AzureCosmosDBResponseSubStatusCodeKey.Int(val)\n}\n\n// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the\n// \"azure.resource_provider.namespace\" semantic conventions. It represents the\n// [Azure Resource Provider Namespace] as recognized by the client.\n//\n// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers\nfunc AzureResourceProviderNamespace(val string) attribute.KeyValue {\n\treturn AzureResourceProviderNamespaceKey.String(val)\n}\n\n// AzureServiceRequestID returns an attribute KeyValue conforming to the\n// \"azure.service.request.id\" semantic conventions. It represents the unique\n// identifier of the service request. It's generated by the Azure service and\n// returned with the response.\nfunc AzureServiceRequestID(val string) attribute.KeyValue {\n\treturn AzureServiceRequestIDKey.String(val)\n}\n\n// Enum values for azure.cosmosdb.connection.mode\nvar (\n\t// Gateway (HTTP) connection.\n\t// Stability: development\n\tAzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String(\"gateway\")\n\t// Direct connection.\n\t// Stability: development\n\tAzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String(\"direct\")\n)\n\n// Enum values for azure.cosmosdb.consistency.level\nvar (\n\t// Strong\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String(\"Strong\")\n\t// Bounded Staleness\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String(\"BoundedStaleness\")\n\t// Session\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String(\"Session\")\n\t// Eventual\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String(\"Eventual\")\n\t// Consistent Prefix\n\t// Stability: development\n\tAzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String(\"ConsistentPrefix\")\n)\n\n// Namespace: browser\nconst (\n\t// BrowserBrandsKey is the attribute Key conforming to the \"browser.brands\"\n\t// semantic conventions. It represents the array of brand name and version\n\t// separated by a space.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \" Not A;Brand 99\", \"Chromium 99\", \"Chrome 99\"\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.brands`).\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\tBrowserBrandsKey = attribute.Key(\"browser.brands\")\n\n\t// BrowserLanguageKey is the attribute Key conforming to the \"browser.language\"\n\t// semantic conventions. It represents the preferred language of the user using\n\t// the browser.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"en\", \"en-US\", \"fr\", \"fr-FR\"\n\t// Note: This value is intended to be taken from the Navigator API\n\t// `navigator.language`.\n\tBrowserLanguageKey = attribute.Key(\"browser.language\")\n\n\t// BrowserMobileKey is the attribute Key conforming to the \"browser.mobile\"\n\t// semantic conventions. It represents a boolean that is true if the browser is\n\t// running on a mobile device.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be\n\t// left unset.\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\tBrowserMobileKey = attribute.Key(\"browser.mobile\")\n\n\t// BrowserPlatformKey is the attribute Key conforming to the \"browser.platform\"\n\t// semantic conventions. It represents the platform on which the browser is\n\t// running.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Windows\", \"macOS\", \"Android\"\n\t// Note: This value is intended to be taken from the [UA client hints API] (\n\t// `navigator.userAgentData.platform`). If unavailable, the legacy\n\t// `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD\n\t// be left unset in order for the values to be consistent.\n\t// The list of possible values is defined in the\n\t// [W3C User-Agent Client Hints specification]. Note that some (but not all) of\n\t// these values can overlap with values in the\n\t// [`os.type` and `os.name` attributes]. However, for consistency, the values in\n\t// the `browser.platform` attribute should capture the exact value that the user\n\t// agent provides.\n\t//\n\t// [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface\n\t// [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform\n\t// [`os.type` and `os.name` attributes]: ./os.md\n\tBrowserPlatformKey = attribute.Key(\"browser.platform\")\n)\n\n// BrowserBrands returns an attribute KeyValue conforming to the \"browser.brands\"\n// semantic conventions. It represents the array of brand name and version\n// separated by a space.\nfunc BrowserBrands(val ...string) attribute.KeyValue {\n\treturn BrowserBrandsKey.StringSlice(val)\n}\n\n// BrowserLanguage returns an attribute KeyValue conforming to the\n// \"browser.language\" semantic conventions. It represents the preferred language\n// of the user using the browser.\nfunc BrowserLanguage(val string) attribute.KeyValue {\n\treturn BrowserLanguageKey.String(val)\n}\n\n// BrowserMobile returns an attribute KeyValue conforming to the \"browser.mobile\"\n// semantic conventions. It represents a boolean that is true if the browser is\n// running on a mobile device.\nfunc BrowserMobile(val bool) attribute.KeyValue {\n\treturn BrowserMobileKey.Bool(val)\n}\n\n// BrowserPlatform returns an attribute KeyValue conforming to the\n// \"browser.platform\" semantic conventions. It represents the platform on which\n// the browser is running.\nfunc BrowserPlatform(val string) attribute.KeyValue {\n\treturn BrowserPlatformKey.String(val)\n}\n\n// Namespace: cassandra\nconst (\n\t// CassandraConsistencyLevelKey is the attribute Key conforming to the\n\t// \"cassandra.consistency.level\" semantic conventions. It represents the\n\t// consistency level of the query. Based on consistency values from [CQL].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html\n\tCassandraConsistencyLevelKey = attribute.Key(\"cassandra.consistency.level\")\n\n\t// CassandraCoordinatorDCKey is the attribute Key conforming to the\n\t// \"cassandra.coordinator.dc\" semantic conventions. It represents the data\n\t// center of the coordinating node for a query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: us-west-2\n\tCassandraCoordinatorDCKey = attribute.Key(\"cassandra.coordinator.dc\")\n\n\t// CassandraCoordinatorIDKey is the attribute Key conforming to the\n\t// \"cassandra.coordinator.id\" semantic conventions. It represents the ID of the\n\t// coordinating node for a query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: be13faa2-8574-4d71-926d-27f16cf8a7af\n\tCassandraCoordinatorIDKey = attribute.Key(\"cassandra.coordinator.id\")\n\n\t// CassandraPageSizeKey is the attribute Key conforming to the\n\t// \"cassandra.page.size\" semantic conventions. It represents the fetch size used\n\t// for paging, i.e. how many rows will be returned at once.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 5000\n\tCassandraPageSizeKey = attribute.Key(\"cassandra.page.size\")\n\n\t// CassandraQueryIdempotentKey is the attribute Key conforming to the\n\t// \"cassandra.query.idempotent\" semantic conventions. It represents the whether\n\t// or not the query is idempotent.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tCassandraQueryIdempotentKey = attribute.Key(\"cassandra.query.idempotent\")\n\n\t// CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the\n\t// \"cassandra.speculative_execution.count\" semantic conventions. It represents\n\t// the number of times a query was speculatively executed. Not set or `0` if the\n\t// query was not executed speculatively.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 2\n\tCassandraSpeculativeExecutionCountKey = attribute.Key(\"cassandra.speculative_execution.count\")\n)\n\n// CassandraCoordinatorDC returns an attribute KeyValue conforming to the\n// \"cassandra.coordinator.dc\" semantic conventions. It represents the data center\n// of the coordinating node for a query.\nfunc CassandraCoordinatorDC(val string) attribute.KeyValue {\n\treturn CassandraCoordinatorDCKey.String(val)\n}\n\n// CassandraCoordinatorID returns an attribute KeyValue conforming to the\n// \"cassandra.coordinator.id\" semantic conventions. It represents the ID of the\n// coordinating node for a query.\nfunc CassandraCoordinatorID(val string) attribute.KeyValue {\n\treturn CassandraCoordinatorIDKey.String(val)\n}\n\n// CassandraPageSize returns an attribute KeyValue conforming to the\n// \"cassandra.page.size\" semantic conventions. It represents the fetch size used\n// for paging, i.e. how many rows will be returned at once.\nfunc CassandraPageSize(val int) attribute.KeyValue {\n\treturn CassandraPageSizeKey.Int(val)\n}\n\n// CassandraQueryIdempotent returns an attribute KeyValue conforming to the\n// \"cassandra.query.idempotent\" semantic conventions. It represents the whether\n// or not the query is idempotent.\nfunc CassandraQueryIdempotent(val bool) attribute.KeyValue {\n\treturn CassandraQueryIdempotentKey.Bool(val)\n}\n\n// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to\n// the \"cassandra.speculative_execution.count\" semantic conventions. It\n// represents the number of times a query was speculatively executed. Not set or\n// `0` if the query was not executed speculatively.\nfunc CassandraSpeculativeExecutionCount(val int) attribute.KeyValue {\n\treturn CassandraSpeculativeExecutionCountKey.Int(val)\n}\n\n// Enum values for cassandra.consistency.level\nvar (\n\t// All\n\t// Stability: development\n\tCassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String(\"all\")\n\t// Each Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String(\"each_quorum\")\n\t// Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String(\"quorum\")\n\t// Local Quorum\n\t// Stability: development\n\tCassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String(\"local_quorum\")\n\t// One\n\t// Stability: development\n\tCassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String(\"one\")\n\t// Two\n\t// Stability: development\n\tCassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String(\"two\")\n\t// Three\n\t// Stability: development\n\tCassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String(\"three\")\n\t// Local One\n\t// Stability: development\n\tCassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String(\"local_one\")\n\t// Any\n\t// Stability: development\n\tCassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String(\"any\")\n\t// Serial\n\t// Stability: development\n\tCassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String(\"serial\")\n\t// Local Serial\n\t// Stability: development\n\tCassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String(\"local_serial\")\n)\n\n// Namespace: cicd\nconst (\n\t// CICDPipelineActionNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.action.name\" semantic conventions. It represents the kind of\n\t// action a pipeline run is performing.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"BUILD\", \"RUN\", \"SYNC\"\n\tCICDPipelineActionNameKey = attribute.Key(\"cicd.pipeline.action.name\")\n\n\t// CICDPipelineNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.name\" semantic conventions. It represents the human readable\n\t// name of the pipeline within a CI/CD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Build and Test\", \"Lint\", \"Deploy Go Project\",\n\t// \"deploy_to_environment\"\n\tCICDPipelineNameKey = attribute.Key(\"cicd.pipeline.name\")\n\n\t// CICDPipelineResultKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.result\" semantic conventions. It represents the result of a\n\t// pipeline run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"timeout\", \"skipped\"\n\tCICDPipelineResultKey = attribute.Key(\"cicd.pipeline.result\")\n\n\t// CICDPipelineRunIDKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.id\" semantic conventions. It represents the unique\n\t// identifier of a pipeline run within a CI/CD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"120912\"\n\tCICDPipelineRunIDKey = attribute.Key(\"cicd.pipeline.run.id\")\n\n\t// CICDPipelineRunStateKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.state\" semantic conventions. It represents the pipeline\n\t// run goes through these states during its lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pending\", \"executing\", \"finalizing\"\n\tCICDPipelineRunStateKey = attribute.Key(\"cicd.pipeline.run.state\")\n\n\t// CICDPipelineRunURLFullKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.run.url.full\" semantic conventions. It represents the [URL] of\n\t// the pipeline run, providing the complete address in order to locate and\n\t// identify the pipeline run.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDPipelineRunURLFullKey = attribute.Key(\"cicd.pipeline.run.url.full\")\n\n\t// CICDPipelineTaskNameKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.name\" semantic conventions. It represents the human\n\t// readable name of a task within a pipeline. Task here most closely aligns with\n\t// a [computing process] in a pipeline. Other terms for tasks include commands,\n\t// steps, and procedures.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Run GoLang Linter\", \"Go Build\", \"go-test\", \"deploy_binary\"\n\t//\n\t// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)\n\tCICDPipelineTaskNameKey = attribute.Key(\"cicd.pipeline.task.name\")\n\n\t// CICDPipelineTaskRunIDKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.id\" semantic conventions. It represents the unique\n\t// identifier of a task run within a pipeline.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"12097\"\n\tCICDPipelineTaskRunIDKey = attribute.Key(\"cicd.pipeline.task.run.id\")\n\n\t// CICDPipelineTaskRunResultKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.result\" semantic conventions. It represents the\n\t// result of a task run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"timeout\", \"skipped\"\n\tCICDPipelineTaskRunResultKey = attribute.Key(\"cicd.pipeline.task.run.result\")\n\n\t// CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.run.url.full\" semantic conventions. It represents the\n\t// [URL] of the pipeline task run, providing the complete address in order to\n\t// locate and identify the pipeline task run.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDPipelineTaskRunURLFullKey = attribute.Key(\"cicd.pipeline.task.run.url.full\")\n\n\t// CICDPipelineTaskTypeKey is the attribute Key conforming to the\n\t// \"cicd.pipeline.task.type\" semantic conventions. It represents the type of the\n\t// task within a pipeline.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"build\", \"test\", \"deploy\"\n\tCICDPipelineTaskTypeKey = attribute.Key(\"cicd.pipeline.task.type\")\n\n\t// CICDSystemComponentKey is the attribute Key conforming to the\n\t// \"cicd.system.component\" semantic conventions. It represents the name of a\n\t// component of the CICD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"controller\", \"scheduler\", \"agent\"\n\tCICDSystemComponentKey = attribute.Key(\"cicd.system.component\")\n\n\t// CICDWorkerIDKey is the attribute Key conforming to the \"cicd.worker.id\"\n\t// semantic conventions. It represents the unique identifier of a worker within\n\t// a CICD system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"abc123\", \"10.0.1.2\", \"controller\"\n\tCICDWorkerIDKey = attribute.Key(\"cicd.worker.id\")\n\n\t// CICDWorkerNameKey is the attribute Key conforming to the \"cicd.worker.name\"\n\t// semantic conventions. It represents the name of a worker within a CICD\n\t// system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"agent-abc\", \"controller\", \"Ubuntu LTS\"\n\tCICDWorkerNameKey = attribute.Key(\"cicd.worker.name\")\n\n\t// CICDWorkerStateKey is the attribute Key conforming to the \"cicd.worker.state\"\n\t// semantic conventions. It represents the state of a CICD worker / agent.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"idle\", \"busy\", \"down\"\n\tCICDWorkerStateKey = attribute.Key(\"cicd.worker.state\")\n\n\t// CICDWorkerURLFullKey is the attribute Key conforming to the\n\t// \"cicd.worker.url.full\" semantic conventions. It represents the [URL] of the\n\t// worker, providing the complete address in order to locate and identify the\n\t// worker.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://cicd.example.org/worker/abc123\"\n\t//\n\t// [URL]: https://wikipedia.org/wiki/URL\n\tCICDWorkerURLFullKey = attribute.Key(\"cicd.worker.url.full\")\n)\n\n// CICDPipelineName returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.name\" semantic conventions. It represents the human readable\n// name of the pipeline within a CI/CD system.\nfunc CICDPipelineName(val string) attribute.KeyValue {\n\treturn CICDPipelineNameKey.String(val)\n}\n\n// CICDPipelineRunID returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.run.id\" semantic conventions. It represents the unique\n// identifier of a pipeline run within a CI/CD system.\nfunc CICDPipelineRunID(val string) attribute.KeyValue {\n\treturn CICDPipelineRunIDKey.String(val)\n}\n\n// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.run.url.full\" semantic conventions. It represents the [URL] of\n// the pipeline run, providing the complete address in order to locate and\n// identify the pipeline run.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDPipelineRunURLFull(val string) attribute.KeyValue {\n\treturn CICDPipelineRunURLFullKey.String(val)\n}\n\n// CICDPipelineTaskName returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.name\" semantic conventions. It represents the human\n// readable name of a task within a pipeline. Task here most closely aligns with\n// a [computing process] in a pipeline. Other terms for tasks include commands,\n// steps, and procedures.\n//\n// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)\nfunc CICDPipelineTaskName(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskNameKey.String(val)\n}\n\n// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.run.id\" semantic conventions. It represents the unique\n// identifier of a task run within a pipeline.\nfunc CICDPipelineTaskRunID(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskRunIDKey.String(val)\n}\n\n// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the\n// \"cicd.pipeline.task.run.url.full\" semantic conventions. It represents the\n// [URL] of the pipeline task run, providing the complete address in order to\n// locate and identify the pipeline task run.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDPipelineTaskRunURLFull(val string) attribute.KeyValue {\n\treturn CICDPipelineTaskRunURLFullKey.String(val)\n}\n\n// CICDSystemComponent returns an attribute KeyValue conforming to the\n// \"cicd.system.component\" semantic conventions. It represents the name of a\n// component of the CICD system.\nfunc CICDSystemComponent(val string) attribute.KeyValue {\n\treturn CICDSystemComponentKey.String(val)\n}\n\n// CICDWorkerID returns an attribute KeyValue conforming to the \"cicd.worker.id\"\n// semantic conventions. It represents the unique identifier of a worker within a\n// CICD system.\nfunc CICDWorkerID(val string) attribute.KeyValue {\n\treturn CICDWorkerIDKey.String(val)\n}\n\n// CICDWorkerName returns an attribute KeyValue conforming to the\n// \"cicd.worker.name\" semantic conventions. It represents the name of a worker\n// within a CICD system.\nfunc CICDWorkerName(val string) attribute.KeyValue {\n\treturn CICDWorkerNameKey.String(val)\n}\n\n// CICDWorkerURLFull returns an attribute KeyValue conforming to the\n// \"cicd.worker.url.full\" semantic conventions. It represents the [URL] of the\n// worker, providing the complete address in order to locate and identify the\n// worker.\n//\n// [URL]: https://wikipedia.org/wiki/URL\nfunc CICDWorkerURLFull(val string) attribute.KeyValue {\n\treturn CICDWorkerURLFullKey.String(val)\n}\n\n// Enum values for cicd.pipeline.action.name\nvar (\n\t// The pipeline run is executing a build.\n\t// Stability: development\n\tCICDPipelineActionNameBuild = CICDPipelineActionNameKey.String(\"BUILD\")\n\t// The pipeline run is executing.\n\t// Stability: development\n\tCICDPipelineActionNameRun = CICDPipelineActionNameKey.String(\"RUN\")\n\t// The pipeline run is executing a sync.\n\t// Stability: development\n\tCICDPipelineActionNameSync = CICDPipelineActionNameKey.String(\"SYNC\")\n)\n\n// Enum values for cicd.pipeline.result\nvar (\n\t// The pipeline run finished successfully.\n\t// Stability: development\n\tCICDPipelineResultSuccess = CICDPipelineResultKey.String(\"success\")\n\t// The pipeline run did not finish successfully, eg. due to a compile error or a\n\t// failing test. Such failures are usually detected by non-zero exit codes of\n\t// the tools executed in the pipeline run.\n\t// Stability: development\n\tCICDPipelineResultFailure = CICDPipelineResultKey.String(\"failure\")\n\t// The pipeline run failed due to an error in the CICD system, eg. due to the\n\t// worker being killed.\n\t// Stability: development\n\tCICDPipelineResultError = CICDPipelineResultKey.String(\"error\")\n\t// A timeout caused the pipeline run to be interrupted.\n\t// Stability: development\n\tCICDPipelineResultTimeout = CICDPipelineResultKey.String(\"timeout\")\n\t// The pipeline run was cancelled, eg. by a user manually cancelling the\n\t// pipeline run.\n\t// Stability: development\n\tCICDPipelineResultCancellation = CICDPipelineResultKey.String(\"cancellation\")\n\t// The pipeline run was skipped, eg. due to a precondition not being met.\n\t// Stability: development\n\tCICDPipelineResultSkip = CICDPipelineResultKey.String(\"skip\")\n)\n\n// Enum values for cicd.pipeline.run.state\nvar (\n\t// The run pending state spans from the event triggering the pipeline run until\n\t// the execution of the run starts (eg. time spent in a queue, provisioning\n\t// agents, creating run resources).\n\t//\n\t// Stability: development\n\tCICDPipelineRunStatePending = CICDPipelineRunStateKey.String(\"pending\")\n\t// The executing state spans the execution of any run tasks (eg. build, test).\n\t// Stability: development\n\tCICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String(\"executing\")\n\t// The finalizing state spans from when the run has finished executing (eg.\n\t// cleanup of run resources).\n\t// Stability: development\n\tCICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String(\"finalizing\")\n)\n\n// Enum values for cicd.pipeline.task.run.result\nvar (\n\t// The task run finished successfully.\n\t// Stability: development\n\tCICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String(\"success\")\n\t// The task run did not finish successfully, eg. due to a compile error or a\n\t// failing test. Such failures are usually detected by non-zero exit codes of\n\t// the tools executed in the task run.\n\t// Stability: development\n\tCICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String(\"failure\")\n\t// The task run failed due to an error in the CICD system, eg. due to the worker\n\t// being killed.\n\t// Stability: development\n\tCICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String(\"error\")\n\t// A timeout caused the task run to be interrupted.\n\t// Stability: development\n\tCICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String(\"timeout\")\n\t// The task run was cancelled, eg. by a user manually cancelling the task run.\n\t// Stability: development\n\tCICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String(\"cancellation\")\n\t// The task run was skipped, eg. due to a precondition not being met.\n\t// Stability: development\n\tCICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String(\"skip\")\n)\n\n// Enum values for cicd.pipeline.task.type\nvar (\n\t// build\n\t// Stability: development\n\tCICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String(\"build\")\n\t// test\n\t// Stability: development\n\tCICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String(\"test\")\n\t// deploy\n\t// Stability: development\n\tCICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String(\"deploy\")\n)\n\n// Enum values for cicd.worker.state\nvar (\n\t// The worker is not performing work for the CICD system. It is available to the\n\t// CICD system to perform work on (online / idle).\n\t// Stability: development\n\tCICDWorkerStateAvailable = CICDWorkerStateKey.String(\"available\")\n\t// The worker is performing work for the CICD system.\n\t// Stability: development\n\tCICDWorkerStateBusy = CICDWorkerStateKey.String(\"busy\")\n\t// The worker is not available to the CICD system (disconnected / down).\n\t// Stability: development\n\tCICDWorkerStateOffline = CICDWorkerStateKey.String(\"offline\")\n)\n\n// Namespace: client\nconst (\n\t// ClientAddressKey is the attribute Key conforming to the \"client.address\"\n\t// semantic conventions. It represents the client address - domain name if\n\t// available without reverse DNS lookup; otherwise, IP address or Unix domain\n\t// socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"client.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the server side, and when communicating through an\n\t// intermediary, `client.address` SHOULD represent the client address behind any\n\t// intermediaries, for example proxies, if it's available.\n\tClientAddressKey = attribute.Key(\"client.address\")\n\n\t// ClientPortKey is the attribute Key conforming to the \"client.port\" semantic\n\t// conventions. It represents the client port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\t// Note: When observed from the server side, and when communicating through an\n\t// intermediary, `client.port` SHOULD represent the client port behind any\n\t// intermediaries, for example proxies, if it's available.\n\tClientPortKey = attribute.Key(\"client.port\")\n)\n\n// ClientAddress returns an attribute KeyValue conforming to the \"client.address\"\n// semantic conventions. It represents the client address - domain name if\n// available without reverse DNS lookup; otherwise, IP address or Unix domain\n// socket name.\nfunc ClientAddress(val string) attribute.KeyValue {\n\treturn ClientAddressKey.String(val)\n}\n\n// ClientPort returns an attribute KeyValue conforming to the \"client.port\"\n// semantic conventions. It represents the client port number.\nfunc ClientPort(val int) attribute.KeyValue {\n\treturn ClientPortKey.Int(val)\n}\n\n// Namespace: cloud\nconst (\n\t// CloudAccountIDKey is the attribute Key conforming to the \"cloud.account.id\"\n\t// semantic conventions. It represents the cloud account ID the resource is\n\t// assigned to.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"111111111111\", \"opentelemetry\"\n\tCloudAccountIDKey = attribute.Key(\"cloud.account.id\")\n\n\t// CloudAvailabilityZoneKey is the attribute Key conforming to the\n\t// \"cloud.availability_zone\" semantic conventions. It represents the cloud\n\t// regions often have multiple, isolated locations known as zones to increase\n\t// availability. Availability zone represents the zone where the resource is\n\t// running.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-east-1c\"\n\t// Note: Availability zones are called \"zones\" on Alibaba Cloud and Google\n\t// Cloud.\n\tCloudAvailabilityZoneKey = attribute.Key(\"cloud.availability_zone\")\n\n\t// CloudPlatformKey is the attribute Key conforming to the \"cloud.platform\"\n\t// semantic conventions. It represents the cloud platform in use.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The prefix of the service SHOULD match the one specified in\n\t// `cloud.provider`.\n\tCloudPlatformKey = attribute.Key(\"cloud.platform\")\n\n\t// CloudProviderKey is the attribute Key conforming to the \"cloud.provider\"\n\t// semantic conventions. It represents the name of the cloud provider.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tCloudProviderKey = attribute.Key(\"cloud.provider\")\n\n\t// CloudRegionKey is the attribute Key conforming to the \"cloud.region\" semantic\n\t// conventions. It represents the geographical region within a cloud provider.\n\t// When associated with a resource, this attribute specifies the region where\n\t// the resource operates. When calling services or APIs deployed on a cloud,\n\t// this attribute identifies the region where the called destination is\n\t// deployed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-central1\", \"us-east-1\"\n\t// Note: Refer to your provider's docs to see the available regions, for example\n\t// [Alibaba Cloud regions], [AWS regions], [Azure regions],\n\t// [Google Cloud regions], or [Tencent Cloud regions].\n\t//\n\t// [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm\n\t// [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/\n\t// [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/\n\t// [Google Cloud regions]: https://cloud.google.com/about/locations\n\t// [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091\n\tCloudRegionKey = attribute.Key(\"cloud.region\")\n\n\t// CloudResourceIDKey is the attribute Key conforming to the \"cloud.resource_id\"\n\t// semantic conventions. It represents the cloud provider-specific native\n\t// identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a\n\t// [fully qualified resource ID] on Azure, a [full resource name] on GCP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",\n\t// \"//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID\",\n\t// \"/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>\n\t// /providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>\"\n\t// Note: On some cloud providers, it may not be possible to determine the full\n\t// ID at startup,\n\t// so it may be necessary to set `cloud.resource_id` as a span attribute\n\t// instead.\n\t//\n\t// The exact value to use for `cloud.resource_id` depends on the cloud provider.\n\t// The following well-known definitions MUST be used if you set this attribute\n\t// and they apply:\n\t//\n\t//   - **AWS Lambda:** The function [ARN].\n\t//     Take care not to use the \"invoked ARN\" directly but replace any\n\t//     [alias suffix]\n\t//     with the resolved function version, as the same runtime instance may be\n\t//     invocable with\n\t//     multiple different aliases.\n\t//   - **GCP:** The [URI of the resource]\n\t//   - **Azure:** The [Fully Qualified Resource ID] of the invoked function,\n\t//     *not* the function app, having the form\n\t//\n\t//     `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`\n\t//     .\n\t//     This means that a span attribute MUST be used, as an Azure function app\n\t//     can host multiple functions that would usually share\n\t//     a TracerProvider.\n\t//\n\t//\n\t// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n\t// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n\t// [full resource name]: https://google.aip.dev/122#full-resource-names\n\t// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n\t// [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html\n\t// [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names\n\t// [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n\tCloudResourceIDKey = attribute.Key(\"cloud.resource_id\")\n)\n\n// CloudAccountID returns an attribute KeyValue conforming to the\n// \"cloud.account.id\" semantic conventions. It represents the cloud account ID\n// the resource is assigned to.\nfunc CloudAccountID(val string) attribute.KeyValue {\n\treturn CloudAccountIDKey.String(val)\n}\n\n// CloudAvailabilityZone returns an attribute KeyValue conforming to the\n// \"cloud.availability_zone\" semantic conventions. It represents the cloud\n// regions often have multiple, isolated locations known as zones to increase\n// availability. Availability zone represents the zone where the resource is\n// running.\nfunc CloudAvailabilityZone(val string) attribute.KeyValue {\n\treturn CloudAvailabilityZoneKey.String(val)\n}\n\n// CloudRegion returns an attribute KeyValue conforming to the \"cloud.region\"\n// semantic conventions. It represents the geographical region within a cloud\n// provider. When associated with a resource, this attribute specifies the region\n// where the resource operates. When calling services or APIs deployed on a\n// cloud, this attribute identifies the region where the called destination is\n// deployed.\nfunc CloudRegion(val string) attribute.KeyValue {\n\treturn CloudRegionKey.String(val)\n}\n\n// CloudResourceID returns an attribute KeyValue conforming to the\n// \"cloud.resource_id\" semantic conventions. It represents the cloud\n// provider-specific native identifier of the monitored cloud resource (e.g. an\n// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]\n//  on GCP).\n//\n// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html\n// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id\n// [full resource name]: https://google.aip.dev/122#full-resource-names\nfunc CloudResourceID(val string) attribute.KeyValue {\n\treturn CloudResourceIDKey.String(val)\n}\n\n// Enum values for cloud.platform\nvar (\n\t// Akamai Cloud Compute\n\t// Stability: development\n\tCloudPlatformAkamaiCloudCompute = CloudPlatformKey.String(\"akamai_cloud.compute\")\n\t// Alibaba Cloud Elastic Compute Service\n\t// Stability: development\n\tCloudPlatformAlibabaCloudECS = CloudPlatformKey.String(\"alibaba_cloud_ecs\")\n\t// Alibaba Cloud Function Compute\n\t// Stability: development\n\tCloudPlatformAlibabaCloudFC = CloudPlatformKey.String(\"alibaba_cloud_fc\")\n\t// Red Hat OpenShift on Alibaba Cloud\n\t// Stability: development\n\tCloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String(\"alibaba_cloud_openshift\")\n\t// AWS Elastic Compute Cloud\n\t// Stability: development\n\tCloudPlatformAWSEC2 = CloudPlatformKey.String(\"aws_ec2\")\n\t// AWS Elastic Container Service\n\t// Stability: development\n\tCloudPlatformAWSECS = CloudPlatformKey.String(\"aws_ecs\")\n\t// AWS Elastic Kubernetes Service\n\t// Stability: development\n\tCloudPlatformAWSEKS = CloudPlatformKey.String(\"aws_eks\")\n\t// AWS Lambda\n\t// Stability: development\n\tCloudPlatformAWSLambda = CloudPlatformKey.String(\"aws_lambda\")\n\t// AWS Elastic Beanstalk\n\t// Stability: development\n\tCloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String(\"aws_elastic_beanstalk\")\n\t// AWS App Runner\n\t// Stability: development\n\tCloudPlatformAWSAppRunner = CloudPlatformKey.String(\"aws_app_runner\")\n\t// Red Hat OpenShift on AWS (ROSA)\n\t// Stability: development\n\tCloudPlatformAWSOpenShift = CloudPlatformKey.String(\"aws_openshift\")\n\t// Azure Virtual Machines\n\t// Stability: development\n\tCloudPlatformAzureVM = CloudPlatformKey.String(\"azure.vm\")\n\t// Azure Container Apps\n\t// Stability: development\n\tCloudPlatformAzureContainerApps = CloudPlatformKey.String(\"azure.container_apps\")\n\t// Azure Container Instances\n\t// Stability: development\n\tCloudPlatformAzureContainerInstances = CloudPlatformKey.String(\"azure.container_instances\")\n\t// Azure Kubernetes Service\n\t// Stability: development\n\tCloudPlatformAzureAKS = CloudPlatformKey.String(\"azure.aks\")\n\t// Azure Functions\n\t// Stability: development\n\tCloudPlatformAzureFunctions = CloudPlatformKey.String(\"azure.functions\")\n\t// Azure App Service\n\t// Stability: development\n\tCloudPlatformAzureAppService = CloudPlatformKey.String(\"azure.app_service\")\n\t// Azure Red Hat OpenShift\n\t// Stability: development\n\tCloudPlatformAzureOpenShift = CloudPlatformKey.String(\"azure.openshift\")\n\t// Google Vertex AI Agent Engine\n\t// Stability: development\n\tCloudPlatformGCPAgentEngine = CloudPlatformKey.String(\"gcp.agent_engine\")\n\t// Google Bare Metal Solution (BMS)\n\t// Stability: development\n\tCloudPlatformGCPBareMetalSolution = CloudPlatformKey.String(\"gcp_bare_metal_solution\")\n\t// Google Cloud Compute Engine (GCE)\n\t// Stability: development\n\tCloudPlatformGCPComputeEngine = CloudPlatformKey.String(\"gcp_compute_engine\")\n\t// Google Cloud Run\n\t// Stability: development\n\tCloudPlatformGCPCloudRun = CloudPlatformKey.String(\"gcp_cloud_run\")\n\t// Google Cloud Kubernetes Engine (GKE)\n\t// Stability: development\n\tCloudPlatformGCPKubernetesEngine = CloudPlatformKey.String(\"gcp_kubernetes_engine\")\n\t// Google Cloud Functions (GCF)\n\t// Stability: development\n\tCloudPlatformGCPCloudFunctions = CloudPlatformKey.String(\"gcp_cloud_functions\")\n\t// Google Cloud App Engine (GAE)\n\t// Stability: development\n\tCloudPlatformGCPAppEngine = CloudPlatformKey.String(\"gcp_app_engine\")\n\t// Red Hat OpenShift on Google Cloud\n\t// Stability: development\n\tCloudPlatformGCPOpenShift = CloudPlatformKey.String(\"gcp_openshift\")\n\t// Server on Hetzner Cloud\n\t// Stability: development\n\tCloudPlatformHetznerCloudServer = CloudPlatformKey.String(\"hetzner.cloud_server\")\n\t// Red Hat OpenShift on IBM Cloud\n\t// Stability: development\n\tCloudPlatformIBMCloudOpenShift = CloudPlatformKey.String(\"ibm_cloud_openshift\")\n\t// Compute on Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudPlatformOracleCloudCompute = CloudPlatformKey.String(\"oracle_cloud_compute\")\n\t// Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudPlatformOracleCloudOKE = CloudPlatformKey.String(\"oracle_cloud_oke\")\n\t// Tencent Cloud Cloud Virtual Machine (CVM)\n\t// Stability: development\n\tCloudPlatformTencentCloudCVM = CloudPlatformKey.String(\"tencent_cloud_cvm\")\n\t// Tencent Cloud Elastic Kubernetes Service (EKS)\n\t// Stability: development\n\tCloudPlatformTencentCloudEKS = CloudPlatformKey.String(\"tencent_cloud_eks\")\n\t// Tencent Cloud Serverless Cloud Function (SCF)\n\t// Stability: development\n\tCloudPlatformTencentCloudSCF = CloudPlatformKey.String(\"tencent_cloud_scf\")\n\t// Vultr Cloud Compute\n\t// Stability: development\n\tCloudPlatformVultrCloudCompute = CloudPlatformKey.String(\"vultr.cloud_compute\")\n)\n\n// Enum values for cloud.provider\nvar (\n\t// Akamai Cloud\n\t// Stability: development\n\tCloudProviderAkamaiCloud = CloudProviderKey.String(\"akamai_cloud\")\n\t// Alibaba Cloud\n\t// Stability: development\n\tCloudProviderAlibabaCloud = CloudProviderKey.String(\"alibaba_cloud\")\n\t// Amazon Web Services\n\t// Stability: development\n\tCloudProviderAWS = CloudProviderKey.String(\"aws\")\n\t// Microsoft Azure\n\t// Stability: development\n\tCloudProviderAzure = CloudProviderKey.String(\"azure\")\n\t// Google Cloud Platform\n\t// Stability: development\n\tCloudProviderGCP = CloudProviderKey.String(\"gcp\")\n\t// Heroku Platform as a Service\n\t// Stability: development\n\tCloudProviderHeroku = CloudProviderKey.String(\"heroku\")\n\t// Hetzner\n\t// Stability: development\n\tCloudProviderHetzner = CloudProviderKey.String(\"hetzner\")\n\t// IBM Cloud\n\t// Stability: development\n\tCloudProviderIBMCloud = CloudProviderKey.String(\"ibm_cloud\")\n\t// Oracle Cloud Infrastructure (OCI)\n\t// Stability: development\n\tCloudProviderOracleCloud = CloudProviderKey.String(\"oracle_cloud\")\n\t// Tencent Cloud\n\t// Stability: development\n\tCloudProviderTencentCloud = CloudProviderKey.String(\"tencent_cloud\")\n\t// Vultr\n\t// Stability: development\n\tCloudProviderVultr = CloudProviderKey.String(\"vultr\")\n)\n\n// Namespace: cloudevents\nconst (\n\t// CloudEventsEventIDKey is the attribute Key conforming to the\n\t// \"cloudevents.event_id\" semantic conventions. It represents the [event_id]\n\t// uniquely identifies the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123e4567-e89b-12d3-a456-426614174000\", \"0001\"\n\t//\n\t// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id\n\tCloudEventsEventIDKey = attribute.Key(\"cloudevents.event_id\")\n\n\t// CloudEventsEventSourceKey is the attribute Key conforming to the\n\t// \"cloudevents.event_source\" semantic conventions. It represents the [source]\n\t// identifies the context in which an event happened.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://github.com/cloudevents\", \"/cloudevents/spec/pull/123\",\n\t// \"my-service\"\n\t//\n\t// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1\n\tCloudEventsEventSourceKey = attribute.Key(\"cloudevents.event_source\")\n\n\t// CloudEventsEventSpecVersionKey is the attribute Key conforming to the\n\t// \"cloudevents.event_spec_version\" semantic conventions. It represents the\n\t// [version of the CloudEvents specification] which the event uses.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\t//\n\t// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion\n\tCloudEventsEventSpecVersionKey = attribute.Key(\"cloudevents.event_spec_version\")\n\n\t// CloudEventsEventSubjectKey is the attribute Key conforming to the\n\t// \"cloudevents.event_subject\" semantic conventions. It represents the [subject]\n\t//  of the event in the context of the event producer (identified by source).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: mynewfile.jpg\n\t//\n\t// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject\n\tCloudEventsEventSubjectKey = attribute.Key(\"cloudevents.event_subject\")\n\n\t// CloudEventsEventTypeKey is the attribute Key conforming to the\n\t// \"cloudevents.event_type\" semantic conventions. It represents the [event_type]\n\t//  contains a value describing the type of event related to the originating\n\t// occurrence.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com.github.pull_request.opened\", \"com.example.object.deleted.v2\"\n\t//\n\t// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type\n\tCloudEventsEventTypeKey = attribute.Key(\"cloudevents.event_type\")\n)\n\n// CloudEventsEventID returns an attribute KeyValue conforming to the\n// \"cloudevents.event_id\" semantic conventions. It represents the [event_id]\n// uniquely identifies the event.\n//\n// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id\nfunc CloudEventsEventID(val string) attribute.KeyValue {\n\treturn CloudEventsEventIDKey.String(val)\n}\n\n// CloudEventsEventSource returns an attribute KeyValue conforming to the\n// \"cloudevents.event_source\" semantic conventions. It represents the [source]\n// identifies the context in which an event happened.\n//\n// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1\nfunc CloudEventsEventSource(val string) attribute.KeyValue {\n\treturn CloudEventsEventSourceKey.String(val)\n}\n\n// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the\n// \"cloudevents.event_spec_version\" semantic conventions. It represents the\n// [version of the CloudEvents specification] which the event uses.\n//\n// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion\nfunc CloudEventsEventSpecVersion(val string) attribute.KeyValue {\n\treturn CloudEventsEventSpecVersionKey.String(val)\n}\n\n// CloudEventsEventSubject returns an attribute KeyValue conforming to the\n// \"cloudevents.event_subject\" semantic conventions. It represents the [subject]\n// of the event in the context of the event producer (identified by source).\n//\n// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject\nfunc CloudEventsEventSubject(val string) attribute.KeyValue {\n\treturn CloudEventsEventSubjectKey.String(val)\n}\n\n// CloudEventsEventType returns an attribute KeyValue conforming to the\n// \"cloudevents.event_type\" semantic conventions. It represents the [event_type]\n// contains a value describing the type of event related to the originating\n// occurrence.\n//\n// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type\nfunc CloudEventsEventType(val string) attribute.KeyValue {\n\treturn CloudEventsEventTypeKey.String(val)\n}\n\n// Namespace: cloudfoundry\nconst (\n\t// CloudFoundryAppIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.id\" semantic conventions. It represents the guid of the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.application_id`. This is the same value as\n\t// reported by `cf app <app-name> --guid`.\n\tCloudFoundryAppIDKey = attribute.Key(\"cloudfoundry.app.id\")\n\n\t// CloudFoundryAppInstanceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.instance.id\" semantic conventions. It represents the index\n\t// of the application instance. 0 when just one instance is active.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0\", \"1\"\n\t// Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]\n\t// .\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the application instance index for applications\n\t// deployed on the runtime.\n\t//\n\t// Application instrumentation should use the value from environment\n\t// variable `CF_INSTANCE_INDEX`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\tCloudFoundryAppInstanceIDKey = attribute.Key(\"cloudfoundry.app.instance.id\")\n\n\t// CloudFoundryAppNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.app.name\" semantic conventions. It represents the name of the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-app-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.application_name`. This is the same value\n\t// as reported by `cf apps`.\n\tCloudFoundryAppNameKey = attribute.Key(\"cloudfoundry.app.name\")\n\n\t// CloudFoundryOrgIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.org.id\" semantic conventions. It represents the guid of the\n\t// CloudFoundry org the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.org_id`. This is the same value as\n\t// reported by `cf org <org-name> --guid`.\n\tCloudFoundryOrgIDKey = attribute.Key(\"cloudfoundry.org.id\")\n\n\t// CloudFoundryOrgNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.org.name\" semantic conventions. It represents the name of the\n\t// CloudFoundry organization the app is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-org-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.org_name`. This is the same value as\n\t// reported by `cf orgs`.\n\tCloudFoundryOrgNameKey = attribute.Key(\"cloudfoundry.org.name\")\n\n\t// CloudFoundryProcessIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.process.id\" semantic conventions. It represents the UID\n\t// identifying the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to\n\t// `VCAP_APPLICATION.app_id` for applications deployed to the runtime.\n\t// For system components, this could be the actual PID.\n\tCloudFoundryProcessIDKey = attribute.Key(\"cloudfoundry.process.id\")\n\n\t// CloudFoundryProcessTypeKey is the attribute Key conforming to the\n\t// \"cloudfoundry.process.type\" semantic conventions. It represents the type of\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"web\"\n\t// Note: CloudFoundry applications can consist of multiple jobs. Usually the\n\t// main process will be of type `web`. There can be additional background\n\t// tasks or side-cars with different process types.\n\tCloudFoundryProcessTypeKey = attribute.Key(\"cloudfoundry.process.type\")\n\n\t// CloudFoundrySpaceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.space.id\" semantic conventions. It represents the guid of the\n\t// CloudFoundry space the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.space_id`. This is the same value as\n\t// reported by `cf space <space-name> --guid`.\n\tCloudFoundrySpaceIDKey = attribute.Key(\"cloudfoundry.space.id\")\n\n\t// CloudFoundrySpaceNameKey is the attribute Key conforming to the\n\t// \"cloudfoundry.space.name\" semantic conventions. It represents the name of the\n\t// CloudFoundry space the application is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-space-name\"\n\t// Note: Application instrumentation should use the value from environment\n\t// variable `VCAP_APPLICATION.space_name`. This is the same value as\n\t// reported by `cf spaces`.\n\tCloudFoundrySpaceNameKey = attribute.Key(\"cloudfoundry.space.name\")\n\n\t// CloudFoundrySystemIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.system.id\" semantic conventions. It represents a guid or\n\t// another name describing the event source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cf/gorouter\"\n\t// Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope].\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the component name, e.g. \"gorouter\", for\n\t// CloudFoundry components.\n\t//\n\t// When system components are instrumented, values from the\n\t// [Bosh spec]\n\t// should be used. The `system.id` should be set to\n\t// `spec.deployment/spec.name`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\t// [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec\n\tCloudFoundrySystemIDKey = attribute.Key(\"cloudfoundry.system.id\")\n\n\t// CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the\n\t// \"cloudfoundry.system.instance.id\" semantic conventions. It represents a guid\n\t// describing the concrete instance of the event source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]\n\t// .\n\t// It is used for logs and metrics emitted by CloudFoundry. It is\n\t// supposed to contain the vm id for CloudFoundry components.\n\t//\n\t// When system components are instrumented, values from the\n\t// [Bosh spec]\n\t// should be used. The `system.instance.id` should be set to `spec.id`.\n\t//\n\t// [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope\n\t// [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec\n\tCloudFoundrySystemInstanceIDKey = attribute.Key(\"cloudfoundry.system.instance.id\")\n)\n\n// CloudFoundryAppID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.id\" semantic conventions. It represents the guid of the\n// application.\nfunc CloudFoundryAppID(val string) attribute.KeyValue {\n\treturn CloudFoundryAppIDKey.String(val)\n}\n\n// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.instance.id\" semantic conventions. It represents the index\n// of the application instance. 0 when just one instance is active.\nfunc CloudFoundryAppInstanceID(val string) attribute.KeyValue {\n\treturn CloudFoundryAppInstanceIDKey.String(val)\n}\n\n// CloudFoundryAppName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.app.name\" semantic conventions. It represents the name of the\n// application.\nfunc CloudFoundryAppName(val string) attribute.KeyValue {\n\treturn CloudFoundryAppNameKey.String(val)\n}\n\n// CloudFoundryOrgID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.org.id\" semantic conventions. It represents the guid of the\n// CloudFoundry org the application is running in.\nfunc CloudFoundryOrgID(val string) attribute.KeyValue {\n\treturn CloudFoundryOrgIDKey.String(val)\n}\n\n// CloudFoundryOrgName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.org.name\" semantic conventions. It represents the name of the\n// CloudFoundry organization the app is running in.\nfunc CloudFoundryOrgName(val string) attribute.KeyValue {\n\treturn CloudFoundryOrgNameKey.String(val)\n}\n\n// CloudFoundryProcessID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.process.id\" semantic conventions. It represents the UID\n// identifying the process.\nfunc CloudFoundryProcessID(val string) attribute.KeyValue {\n\treturn CloudFoundryProcessIDKey.String(val)\n}\n\n// CloudFoundryProcessType returns an attribute KeyValue conforming to the\n// \"cloudfoundry.process.type\" semantic conventions. It represents the type of\n// process.\nfunc CloudFoundryProcessType(val string) attribute.KeyValue {\n\treturn CloudFoundryProcessTypeKey.String(val)\n}\n\n// CloudFoundrySpaceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.space.id\" semantic conventions. It represents the guid of the\n// CloudFoundry space the application is running in.\nfunc CloudFoundrySpaceID(val string) attribute.KeyValue {\n\treturn CloudFoundrySpaceIDKey.String(val)\n}\n\n// CloudFoundrySpaceName returns an attribute KeyValue conforming to the\n// \"cloudfoundry.space.name\" semantic conventions. It represents the name of the\n// CloudFoundry space the application is running in.\nfunc CloudFoundrySpaceName(val string) attribute.KeyValue {\n\treturn CloudFoundrySpaceNameKey.String(val)\n}\n\n// CloudFoundrySystemID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.system.id\" semantic conventions. It represents a guid or another\n// name describing the event source.\nfunc CloudFoundrySystemID(val string) attribute.KeyValue {\n\treturn CloudFoundrySystemIDKey.String(val)\n}\n\n// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the\n// \"cloudfoundry.system.instance.id\" semantic conventions. It represents a guid\n// describing the concrete instance of the event source.\nfunc CloudFoundrySystemInstanceID(val string) attribute.KeyValue {\n\treturn CloudFoundrySystemInstanceIDKey.String(val)\n}\n\n// Namespace: code\nconst (\n\t// CodeColumnNumberKey is the attribute Key conforming to the\n\t// \"code.column.number\" semantic conventions. It represents the column number in\n\t// `code.file.path` best representing the operation. It SHOULD point within the\n\t// code unit named in `code.function.name`. This attribute MUST NOT be used on\n\t// the Profile signal since the data is already captured in 'message Line'. This\n\t// constraint is imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\tCodeColumnNumberKey = attribute.Key(\"code.column.number\")\n\n\t// CodeFilePathKey is the attribute Key conforming to the \"code.file.path\"\n\t// semantic conventions. It represents the source code file name that identifies\n\t// the code unit as uniquely as possible (preferably an absolute file path).\n\t// This attribute MUST NOT be used on the Profile signal since the data is\n\t// already captured in 'message Function'. This constraint is imposed to prevent\n\t// redundancy and maintain data integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: /usr/local/MyApplication/content_root/app/index.php\n\tCodeFilePathKey = attribute.Key(\"code.file.path\")\n\n\t// CodeFunctionNameKey is the attribute Key conforming to the\n\t// \"code.function.name\" semantic conventions. It represents the method or\n\t// function fully-qualified name without arguments. The value should fit the\n\t// natural representation of the language runtime, which is also likely the same\n\t// used within `code.stacktrace` attribute value. This attribute MUST NOT be\n\t// used on the Profile signal since the data is already captured in 'message\n\t// Function'. This constraint is imposed to prevent redundancy and maintain data\n\t// integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"com.example.MyHttpService.serveRequest\",\n\t// \"GuzzleHttp\\Client::transfer\", \"fopen\"\n\t// Note: Values and format depends on each language runtime, thus it is\n\t// impossible to provide an exhaustive list of examples.\n\t// The values are usually the same (or prefixes of) the ones found in native\n\t// stack trace representation stored in\n\t// `code.stacktrace` without information on arguments.\n\t//\n\t// Examples:\n\t//\n\t//   - Java method: `com.example.MyHttpService.serveRequest`\n\t//   - Java anonymous class method: `com.mycompany.Main$1.myMethod`\n\t//   - Java lambda method:\n\t//     `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`\n\t//   - PHP function: `GuzzleHttp\\Client::transfer`\n\t//   - Go function: `github.com/my/repo/pkg.foo.func5`\n\t//   - Elixir: `OpenTelemetry.Ctx.new`\n\t//   - Erlang: `opentelemetry_ctx:new`\n\t//   - Rust: `playground::my_module::my_cool_func`\n\t//   - C function: `fopen`\n\tCodeFunctionNameKey = attribute.Key(\"code.function.name\")\n\n\t// CodeLineNumberKey is the attribute Key conforming to the \"code.line.number\"\n\t// semantic conventions. It represents the line number in `code.file.path` best\n\t// representing the operation. It SHOULD point within the code unit named in\n\t// `code.function.name`. This attribute MUST NOT be used on the Profile signal\n\t// since the data is already captured in 'message Line'. This constraint is\n\t// imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\tCodeLineNumberKey = attribute.Key(\"code.line.number\")\n\n\t// CodeStacktraceKey is the attribute Key conforming to the \"code.stacktrace\"\n\t// semantic conventions. It represents a stacktrace as a string in the natural\n\t// representation for the language runtime. The representation is identical to\n\t// [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile\n\t// signal since the data is already captured in 'message Location'. This\n\t// constraint is imposed to prevent redundancy and maintain data integrity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at\n\t// com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at\n\t// com.example.GenerateTrace.main(GenerateTrace.java:5)\n\t//\n\t// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation\n\tCodeStacktraceKey = attribute.Key(\"code.stacktrace\")\n)\n\n// CodeColumnNumber returns an attribute KeyValue conforming to the\n// \"code.column.number\" semantic conventions. It represents the column number in\n// `code.file.path` best representing the operation. It SHOULD point within the\n// code unit named in `code.function.name`. This attribute MUST NOT be used on\n// the Profile signal since the data is already captured in 'message Line'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\nfunc CodeColumnNumber(val int) attribute.KeyValue {\n\treturn CodeColumnNumberKey.Int(val)\n}\n\n// CodeFilePath returns an attribute KeyValue conforming to the \"code.file.path\"\n// semantic conventions. It represents the source code file name that identifies\n// the code unit as uniquely as possible (preferably an absolute file path). This\n// attribute MUST NOT be used on the Profile signal since the data is already\n// captured in 'message Function'. This constraint is imposed to prevent\n// redundancy and maintain data integrity.\nfunc CodeFilePath(val string) attribute.KeyValue {\n\treturn CodeFilePathKey.String(val)\n}\n\n// CodeFunctionName returns an attribute KeyValue conforming to the\n// \"code.function.name\" semantic conventions. It represents the method or\n// function fully-qualified name without arguments. The value should fit the\n// natural representation of the language runtime, which is also likely the same\n// used within `code.stacktrace` attribute value. This attribute MUST NOT be used\n// on the Profile signal since the data is already captured in 'message\n// Function'. This constraint is imposed to prevent redundancy and maintain data\n// integrity.\nfunc CodeFunctionName(val string) attribute.KeyValue {\n\treturn CodeFunctionNameKey.String(val)\n}\n\n// CodeLineNumber returns an attribute KeyValue conforming to the\n// \"code.line.number\" semantic conventions. It represents the line number in\n// `code.file.path` best representing the operation. It SHOULD point within the\n// code unit named in `code.function.name`. This attribute MUST NOT be used on\n// the Profile signal since the data is already captured in 'message Line'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\nfunc CodeLineNumber(val int) attribute.KeyValue {\n\treturn CodeLineNumberKey.Int(val)\n}\n\n// CodeStacktrace returns an attribute KeyValue conforming to the\n// \"code.stacktrace\" semantic conventions. It represents a stacktrace as a string\n// in the natural representation for the language runtime. The representation is\n// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the\n// Profile signal since the data is already captured in 'message Location'. This\n// constraint is imposed to prevent redundancy and maintain data integrity.\n//\n// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation\nfunc CodeStacktrace(val string) attribute.KeyValue {\n\treturn CodeStacktraceKey.String(val)\n}\n\n// Namespace: container\nconst (\n\t// ContainerCommandKey is the attribute Key conforming to the\n\t// \"container.command\" semantic conventions. It represents the command used to\n\t// run the container (i.e. the command name).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol\"\n\t// Note: If using embedded credentials or sensitive data, it is recommended to\n\t// remove them to prevent potential leakage.\n\tContainerCommandKey = attribute.Key(\"container.command\")\n\n\t// ContainerCommandArgsKey is the attribute Key conforming to the\n\t// \"container.command_args\" semantic conventions. It represents the all the\n\t// command arguments (including the command/executable itself) run by the\n\t// container.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol\", \"--config\", \"config.yaml\"\n\tContainerCommandArgsKey = attribute.Key(\"container.command_args\")\n\n\t// ContainerCommandLineKey is the attribute Key conforming to the\n\t// \"container.command_line\" semantic conventions. It represents the full command\n\t// run by the container as a single string representing the full command.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcontribcol --config config.yaml\"\n\tContainerCommandLineKey = attribute.Key(\"container.command_line\")\n\n\t// ContainerCSIPluginNameKey is the attribute Key conforming to the\n\t// \"container.csi.plugin.name\" semantic conventions. It represents the name of\n\t// the CSI ([Container Storage Interface]) plugin used by the volume.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pd.csi.storage.gke.io\"\n\t// Note: This can sometimes be referred to as a \"driver\" in CSI implementations.\n\t// This should represent the `name` field of the GetPluginInfo RPC.\n\t//\n\t// [Container Storage Interface]: https://github.com/container-storage-interface/spec\n\tContainerCSIPluginNameKey = attribute.Key(\"container.csi.plugin.name\")\n\n\t// ContainerCSIVolumeIDKey is the attribute Key conforming to the\n\t// \"container.csi.volume.id\" semantic conventions. It represents the unique\n\t// volume ID returned by the CSI ([Container Storage Interface]) plugin.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk\"\n\t// Note: This can sometimes be referred to as a \"volume handle\" in CSI\n\t// implementations. This should represent the `Volume.volume_id` field in CSI\n\t// spec.\n\t//\n\t// [Container Storage Interface]: https://github.com/container-storage-interface/spec\n\tContainerCSIVolumeIDKey = attribute.Key(\"container.csi.volume.id\")\n\n\t// ContainerIDKey is the attribute Key conforming to the \"container.id\" semantic\n\t// conventions. It represents the container ID. Usually a UUID, as for example\n\t// used to [identify Docker containers]. The UUID might be abbreviated.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"a3bf90e006b2\"\n\t//\n\t// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification\n\tContainerIDKey = attribute.Key(\"container.id\")\n\n\t// ContainerImageIDKey is the attribute Key conforming to the\n\t// \"container.image.id\" semantic conventions. It represents the runtime specific\n\t// image identifier. Usually a hash algorithm followed by a UUID.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f\"\n\t// Note: Docker defines a sha256 of the image id; `container.image.id`\n\t// corresponds to the `Image` field from the Docker container inspect [API]\n\t// endpoint.\n\t// K8s defines a link to the container registry repository with digest\n\t// `\"imageID\": \"registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625\"`\n\t// .\n\t// The ID is assigned by the container runtime and can vary in different\n\t// environments. Consider using `oci.manifest.digest` if it is important to\n\t// identify the same image in different environments/runtimes.\n\t//\n\t// [API]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect\n\tContainerImageIDKey = attribute.Key(\"container.image.id\")\n\n\t// ContainerImageNameKey is the attribute Key conforming to the\n\t// \"container.image.name\" semantic conventions. It represents the name of the\n\t// image the container was built on.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"gcr.io/opentelemetry/operator\"\n\tContainerImageNameKey = attribute.Key(\"container.image.name\")\n\n\t// ContainerImageRepoDigestsKey is the attribute Key conforming to the\n\t// \"container.image.repo_digests\" semantic conventions. It represents the repo\n\t// digests of the container image as provided by the container runtime.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples:\n\t// \"example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb\",\n\t// \"internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578\"\n\t// Note: [Docker] and [CRI] report those under the `RepoDigests` field.\n\t//\n\t// [Docker]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect\n\t// [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238\n\tContainerImageRepoDigestsKey = attribute.Key(\"container.image.repo_digests\")\n\n\t// ContainerImageTagsKey is the attribute Key conforming to the\n\t// \"container.image.tags\" semantic conventions. It represents the container\n\t// image tags. An example can be found in [Docker Image Inspect]. Should be only\n\t// the `<tag>` section of the full name for example from\n\t// `registry.example.com/my-org/my-image:<tag>`.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"v1.27.1\", \"3.5.7-0\"\n\t//\n\t// [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect\n\tContainerImageTagsKey = attribute.Key(\"container.image.tags\")\n\n\t// ContainerNameKey is the attribute Key conforming to the \"container.name\"\n\t// semantic conventions. It represents the container name used by container\n\t// runtime.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-autoconf\"\n\tContainerNameKey = attribute.Key(\"container.name\")\n\n\t// ContainerRuntimeDescriptionKey is the attribute Key conforming to the\n\t// \"container.runtime.description\" semantic conventions. It represents a\n\t// description about the runtime which could include, for example details about\n\t// the CRI/API version being used or other customisations.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"docker://19.3.1 - CRI: 1.22.0\"\n\tContainerRuntimeDescriptionKey = attribute.Key(\"container.runtime.description\")\n\n\t// ContainerRuntimeNameKey is the attribute Key conforming to the\n\t// \"container.runtime.name\" semantic conventions. It represents the container\n\t// runtime managing this container.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"docker\", \"containerd\", \"rkt\"\n\tContainerRuntimeNameKey = attribute.Key(\"container.runtime.name\")\n\n\t// ContainerRuntimeVersionKey is the attribute Key conforming to the\n\t// \"container.runtime.version\" semantic conventions. It represents the version\n\t// of the runtime of this process, as returned by the runtime without\n\t// modification.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0.0\n\tContainerRuntimeVersionKey = attribute.Key(\"container.runtime.version\")\n)\n\n// ContainerCommand returns an attribute KeyValue conforming to the\n// \"container.command\" semantic conventions. It represents the command used to\n// run the container (i.e. the command name).\nfunc ContainerCommand(val string) attribute.KeyValue {\n\treturn ContainerCommandKey.String(val)\n}\n\n// ContainerCommandArgs returns an attribute KeyValue conforming to the\n// \"container.command_args\" semantic conventions. It represents the all the\n// command arguments (including the command/executable itself) run by the\n// container.\nfunc ContainerCommandArgs(val ...string) attribute.KeyValue {\n\treturn ContainerCommandArgsKey.StringSlice(val)\n}\n\n// ContainerCommandLine returns an attribute KeyValue conforming to the\n// \"container.command_line\" semantic conventions. It represents the full command\n// run by the container as a single string representing the full command.\nfunc ContainerCommandLine(val string) attribute.KeyValue {\n\treturn ContainerCommandLineKey.String(val)\n}\n\n// ContainerCSIPluginName returns an attribute KeyValue conforming to the\n// \"container.csi.plugin.name\" semantic conventions. It represents the name of\n// the CSI ([Container Storage Interface]) plugin used by the volume.\n//\n// [Container Storage Interface]: https://github.com/container-storage-interface/spec\nfunc ContainerCSIPluginName(val string) attribute.KeyValue {\n\treturn ContainerCSIPluginNameKey.String(val)\n}\n\n// ContainerCSIVolumeID returns an attribute KeyValue conforming to the\n// \"container.csi.volume.id\" semantic conventions. It represents the unique\n// volume ID returned by the CSI ([Container Storage Interface]) plugin.\n//\n// [Container Storage Interface]: https://github.com/container-storage-interface/spec\nfunc ContainerCSIVolumeID(val string) attribute.KeyValue {\n\treturn ContainerCSIVolumeIDKey.String(val)\n}\n\n// ContainerID returns an attribute KeyValue conforming to the \"container.id\"\n// semantic conventions. It represents the container ID. Usually a UUID, as for\n// example used to [identify Docker containers]. The UUID might be abbreviated.\n//\n// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification\nfunc ContainerID(val string) attribute.KeyValue {\n\treturn ContainerIDKey.String(val)\n}\n\n// ContainerImageID returns an attribute KeyValue conforming to the\n// \"container.image.id\" semantic conventions. It represents the runtime specific\n// image identifier. Usually a hash algorithm followed by a UUID.\nfunc ContainerImageID(val string) attribute.KeyValue {\n\treturn ContainerImageIDKey.String(val)\n}\n\n// ContainerImageName returns an attribute KeyValue conforming to the\n// \"container.image.name\" semantic conventions. It represents the name of the\n// image the container was built on.\nfunc ContainerImageName(val string) attribute.KeyValue {\n\treturn ContainerImageNameKey.String(val)\n}\n\n// ContainerImageRepoDigests returns an attribute KeyValue conforming to the\n// \"container.image.repo_digests\" semantic conventions. It represents the repo\n// digests of the container image as provided by the container runtime.\nfunc ContainerImageRepoDigests(val ...string) attribute.KeyValue {\n\treturn ContainerImageRepoDigestsKey.StringSlice(val)\n}\n\n// ContainerImageTags returns an attribute KeyValue conforming to the\n// \"container.image.tags\" semantic conventions. It represents the container image\n// tags. An example can be found in [Docker Image Inspect]. Should be only the\n// `<tag>` section of the full name for example from\n// `registry.example.com/my-org/my-image:<tag>`.\n//\n// [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect\nfunc ContainerImageTags(val ...string) attribute.KeyValue {\n\treturn ContainerImageTagsKey.StringSlice(val)\n}\n\n// ContainerLabel returns an attribute KeyValue conforming to the\n// \"container.label\" semantic conventions. It represents the container labels,\n// `<key>` being the label name, the value being the label value.\nfunc ContainerLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"container.label.\"+key, val)\n}\n\n// ContainerName returns an attribute KeyValue conforming to the \"container.name\"\n// semantic conventions. It represents the container name used by container\n// runtime.\nfunc ContainerName(val string) attribute.KeyValue {\n\treturn ContainerNameKey.String(val)\n}\n\n// ContainerRuntimeDescription returns an attribute KeyValue conforming to the\n// \"container.runtime.description\" semantic conventions. It represents a\n// description about the runtime which could include, for example details about\n// the CRI/API version being used or other customisations.\nfunc ContainerRuntimeDescription(val string) attribute.KeyValue {\n\treturn ContainerRuntimeDescriptionKey.String(val)\n}\n\n// ContainerRuntimeName returns an attribute KeyValue conforming to the\n// \"container.runtime.name\" semantic conventions. It represents the container\n// runtime managing this container.\nfunc ContainerRuntimeName(val string) attribute.KeyValue {\n\treturn ContainerRuntimeNameKey.String(val)\n}\n\n// ContainerRuntimeVersion returns an attribute KeyValue conforming to the\n// \"container.runtime.version\" semantic conventions. It represents the version of\n// the runtime of this process, as returned by the runtime without modification.\nfunc ContainerRuntimeVersion(val string) attribute.KeyValue {\n\treturn ContainerRuntimeVersionKey.String(val)\n}\n\n// Namespace: cpu\nconst (\n\t// CPULogicalNumberKey is the attribute Key conforming to the\n\t// \"cpu.logical_number\" semantic conventions. It represents the logical CPU\n\t// number [0..n-1].\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1\n\tCPULogicalNumberKey = attribute.Key(\"cpu.logical_number\")\n\n\t// CPUModeKey is the attribute Key conforming to the \"cpu.mode\" semantic\n\t// conventions. It represents the mode of the CPU.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"user\", \"system\"\n\tCPUModeKey = attribute.Key(\"cpu.mode\")\n)\n\n// CPULogicalNumber returns an attribute KeyValue conforming to the\n// \"cpu.logical_number\" semantic conventions. It represents the logical CPU\n// number [0..n-1].\nfunc CPULogicalNumber(val int) attribute.KeyValue {\n\treturn CPULogicalNumberKey.Int(val)\n}\n\n// Enum values for cpu.mode\nvar (\n\t// User\n\t// Stability: development\n\tCPUModeUser = CPUModeKey.String(\"user\")\n\t// System\n\t// Stability: development\n\tCPUModeSystem = CPUModeKey.String(\"system\")\n\t// Nice\n\t// Stability: development\n\tCPUModeNice = CPUModeKey.String(\"nice\")\n\t// Idle\n\t// Stability: development\n\tCPUModeIdle = CPUModeKey.String(\"idle\")\n\t// IO Wait\n\t// Stability: development\n\tCPUModeIOWait = CPUModeKey.String(\"iowait\")\n\t// Interrupt\n\t// Stability: development\n\tCPUModeInterrupt = CPUModeKey.String(\"interrupt\")\n\t// Steal\n\t// Stability: development\n\tCPUModeSteal = CPUModeKey.String(\"steal\")\n\t// Kernel\n\t// Stability: development\n\tCPUModeKernel = CPUModeKey.String(\"kernel\")\n)\n\n// Namespace: db\nconst (\n\t// DBClientConnectionPoolNameKey is the attribute Key conforming to the\n\t// \"db.client.connection.pool.name\" semantic conventions. It represents the name\n\t// of the connection pool; unique within the instrumented application. In case\n\t// the connection pool implementation doesn't provide a name, instrumentation\n\t// SHOULD use a combination of parameters that would make the name unique, for\n\t// example, combining attributes `server.address`, `server.port`, and\n\t// `db.namespace`, formatted as `server.address:server.port/db.namespace`.\n\t// Instrumentations that generate connection pool name following different\n\t// patterns SHOULD document it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myDataSource\"\n\tDBClientConnectionPoolNameKey = attribute.Key(\"db.client.connection.pool.name\")\n\n\t// DBClientConnectionStateKey is the attribute Key conforming to the\n\t// \"db.client.connection.state\" semantic conventions. It represents the state of\n\t// a connection in the pool.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"idle\"\n\tDBClientConnectionStateKey = attribute.Key(\"db.client.connection.state\")\n\n\t// DBCollectionNameKey is the attribute Key conforming to the\n\t// \"db.collection.name\" semantic conventions. It represents the name of a\n\t// collection (table, container) within the database.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"public.users\", \"customers\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// The collection name SHOULD NOT be extracted from `db.query.text`,\n\t// when the database system supports query text with multiple collections\n\t// in non-batch operations.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// collection name then that collection name SHOULD be used.\n\tDBCollectionNameKey = attribute.Key(\"db.collection.name\")\n\n\t// DBNamespaceKey is the attribute Key conforming to the \"db.namespace\" semantic\n\t// conventions. It represents the name of the database, fully qualified within\n\t// the server address and port.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"customers\", \"test.users\"\n\t// Note: If a database system has multiple namespace components, they SHOULD be\n\t// concatenated from the most general to the most specific namespace component,\n\t// using `|` as a separator between the components. Any missing components (and\n\t// their associated separators) SHOULD be omitted.\n\t// Semantic conventions for individual database systems SHOULD document what\n\t// `db.namespace` means in the context of that system.\n\t// It is RECOMMENDED to capture the value as provided by the application without\n\t// attempting to do any case normalization.\n\tDBNamespaceKey = attribute.Key(\"db.namespace\")\n\n\t// DBOperationBatchSizeKey is the attribute Key conforming to the\n\t// \"db.operation.batch.size\" semantic conventions. It represents the number of\n\t// queries included in a batch operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 2, 3, 4\n\t// Note: Operations are only considered batches when they contain two or more\n\t// operations, and so `db.operation.batch.size` SHOULD never be `1`.\n\tDBOperationBatchSizeKey = attribute.Key(\"db.operation.batch.size\")\n\n\t// DBOperationNameKey is the attribute Key conforming to the \"db.operation.name\"\n\t// semantic conventions. It represents the name of the operation or command\n\t// being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"findAndModify\", \"HMSET\", \"SELECT\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// The operation name SHOULD NOT be extracted from `db.query.text`,\n\t// when the database system supports query text with multiple operations\n\t// in non-batch operations.\n\t//\n\t// If spaces can occur in the operation name, multiple consecutive spaces\n\t// SHOULD be normalized to a single space.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// operation name\n\t// then that operation name SHOULD be used prepended by `BATCH `,\n\t// otherwise `db.operation.name` SHOULD be `BATCH` or some other database\n\t// system specific term if more applicable.\n\tDBOperationNameKey = attribute.Key(\"db.operation.name\")\n\n\t// DBQuerySummaryKey is the attribute Key conforming to the \"db.query.summary\"\n\t// semantic conventions. It represents the low cardinality summary of a database\n\t// query.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SELECT wuser_table\", \"INSERT shipping_details SELECT orders\", \"get\n\t// user by id\"\n\t// Note: The query summary describes a class of database queries and is useful\n\t// as a grouping key, especially when analyzing telemetry for database\n\t// calls involving complex queries.\n\t//\n\t// Summary may be available to the instrumentation through\n\t// instrumentation hooks or other means. If it is not available,\n\t// instrumentations\n\t// that support query parsing SHOULD generate a summary following\n\t// [Generating query summary]\n\t// section.\n\t//\n\t// [Generating query summary]: /docs/db/database-spans.md#generating-a-summary-of-the-query\n\tDBQuerySummaryKey = attribute.Key(\"db.query.summary\")\n\n\t// DBQueryTextKey is the attribute Key conforming to the \"db.query.text\"\n\t// semantic conventions. It represents the database query being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SELECT * FROM wuser_table where username = ?\", \"SET mykey ?\"\n\t// Note: For sanitization see [Sanitization of `db.query.text`].\n\t// For batch operations, if the individual operations are known to have the same\n\t// query text then that query text SHOULD be used, otherwise all of the\n\t// individual query texts SHOULD be concatenated with separator `; ` or some\n\t// other database system specific separator if more applicable.\n\t// Parameterized query text SHOULD NOT be sanitized. Even though parameterized\n\t// query text can potentially have sensitive data, by using a parameterized\n\t// query the user is giving a strong signal that any sensitive data will be\n\t// passed as parameter values, and the benefit to observability of capturing the\n\t// static part of the query text by default outweighs the risk.\n\t//\n\t// [Sanitization of `db.query.text`]: /docs/db/database-spans.md#sanitization-of-dbquerytext\n\tDBQueryTextKey = attribute.Key(\"db.query.text\")\n\n\t// DBResponseReturnedRowsKey is the attribute Key conforming to the\n\t// \"db.response.returned_rows\" semantic conventions. It represents the number of\n\t// rows returned by the operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 10, 30, 1000\n\tDBResponseReturnedRowsKey = attribute.Key(\"db.response.returned_rows\")\n\n\t// DBResponseStatusCodeKey is the attribute Key conforming to the\n\t// \"db.response.status_code\" semantic conventions. It represents the database\n\t// response status code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"102\", \"ORA-17002\", \"08P01\", \"404\"\n\t// Note: The status code returned by the database. Usually it represents an\n\t// error code, but may also represent partial success, warning, or differentiate\n\t// between various types of successful outcomes.\n\t// Semantic conventions for individual database systems SHOULD document what\n\t// `db.response.status_code` means in the context of that system.\n\tDBResponseStatusCodeKey = attribute.Key(\"db.response.status_code\")\n\n\t// DBStoredProcedureNameKey is the attribute Key conforming to the\n\t// \"db.stored_procedure.name\" semantic conventions. It represents the name of a\n\t// stored procedure within the database.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GetCustomer\"\n\t// Note: It is RECOMMENDED to capture the value as provided by the application\n\t// without attempting to do any case normalization.\n\t//\n\t// For batch operations, if the individual operations are known to have the same\n\t// stored procedure name then that stored procedure name SHOULD be used.\n\tDBStoredProcedureNameKey = attribute.Key(\"db.stored_procedure.name\")\n\n\t// DBSystemNameKey is the attribute Key conforming to the \"db.system.name\"\n\t// semantic conventions. It represents the database management system (DBMS)\n\t// product as identified by the client instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\t// Note: The actual DBMS may differ from the one identified by the client. For\n\t// example, when using PostgreSQL client libraries to connect to a CockroachDB,\n\t// the `db.system.name` is set to `postgresql` based on the instrumentation's\n\t// best knowledge.\n\tDBSystemNameKey = attribute.Key(\"db.system.name\")\n)\n\n// DBClientConnectionPoolName returns an attribute KeyValue conforming to the\n// \"db.client.connection.pool.name\" semantic conventions. It represents the name\n// of the connection pool; unique within the instrumented application. In case\n// the connection pool implementation doesn't provide a name, instrumentation\n// SHOULD use a combination of parameters that would make the name unique, for\n// example, combining attributes `server.address`, `server.port`, and\n// `db.namespace`, formatted as `server.address:server.port/db.namespace`.\n// Instrumentations that generate connection pool name following different\n// patterns SHOULD document it.\nfunc DBClientConnectionPoolName(val string) attribute.KeyValue {\n\treturn DBClientConnectionPoolNameKey.String(val)\n}\n\n// DBCollectionName returns an attribute KeyValue conforming to the\n// \"db.collection.name\" semantic conventions. It represents the name of a\n// collection (table, container) within the database.\nfunc DBCollectionName(val string) attribute.KeyValue {\n\treturn DBCollectionNameKey.String(val)\n}\n\n// DBNamespace returns an attribute KeyValue conforming to the \"db.namespace\"\n// semantic conventions. It represents the name of the database, fully qualified\n// within the server address and port.\nfunc DBNamespace(val string) attribute.KeyValue {\n\treturn DBNamespaceKey.String(val)\n}\n\n// DBOperationBatchSize returns an attribute KeyValue conforming to the\n// \"db.operation.batch.size\" semantic conventions. It represents the number of\n// queries included in a batch operation.\nfunc DBOperationBatchSize(val int) attribute.KeyValue {\n\treturn DBOperationBatchSizeKey.Int(val)\n}\n\n// DBOperationName returns an attribute KeyValue conforming to the\n// \"db.operation.name\" semantic conventions. It represents the name of the\n// operation or command being executed.\nfunc DBOperationName(val string) attribute.KeyValue {\n\treturn DBOperationNameKey.String(val)\n}\n\n// DBOperationParameter returns an attribute KeyValue conforming to the\n// \"db.operation.parameter\" semantic conventions. It represents a database\n// operation parameter, with `<key>` being the parameter name, and the attribute\n// value being a string representation of the parameter value.\nfunc DBOperationParameter(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"db.operation.parameter.\"+key, val)\n}\n\n// DBQueryParameter returns an attribute KeyValue conforming to the\n// \"db.query.parameter\" semantic conventions. It represents a database query\n// parameter, with `<key>` being the parameter name, and the attribute value\n// being a string representation of the parameter value.\nfunc DBQueryParameter(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"db.query.parameter.\"+key, val)\n}\n\n// DBQuerySummary returns an attribute KeyValue conforming to the\n// \"db.query.summary\" semantic conventions. It represents the low cardinality\n// summary of a database query.\nfunc DBQuerySummary(val string) attribute.KeyValue {\n\treturn DBQuerySummaryKey.String(val)\n}\n\n// DBQueryText returns an attribute KeyValue conforming to the \"db.query.text\"\n// semantic conventions. It represents the database query being executed.\nfunc DBQueryText(val string) attribute.KeyValue {\n\treturn DBQueryTextKey.String(val)\n}\n\n// DBResponseReturnedRows returns an attribute KeyValue conforming to the\n// \"db.response.returned_rows\" semantic conventions. It represents the number of\n// rows returned by the operation.\nfunc DBResponseReturnedRows(val int) attribute.KeyValue {\n\treturn DBResponseReturnedRowsKey.Int(val)\n}\n\n// DBResponseStatusCode returns an attribute KeyValue conforming to the\n// \"db.response.status_code\" semantic conventions. It represents the database\n// response status code.\nfunc DBResponseStatusCode(val string) attribute.KeyValue {\n\treturn DBResponseStatusCodeKey.String(val)\n}\n\n// DBStoredProcedureName returns an attribute KeyValue conforming to the\n// \"db.stored_procedure.name\" semantic conventions. It represents the name of a\n// stored procedure within the database.\nfunc DBStoredProcedureName(val string) attribute.KeyValue {\n\treturn DBStoredProcedureNameKey.String(val)\n}\n\n// Enum values for db.client.connection.state\nvar (\n\t// idle\n\t// Stability: development\n\tDBClientConnectionStateIdle = DBClientConnectionStateKey.String(\"idle\")\n\t// used\n\t// Stability: development\n\tDBClientConnectionStateUsed = DBClientConnectionStateKey.String(\"used\")\n)\n\n// Enum values for db.system.name\nvar (\n\t// Some other SQL database. Fallback only.\n\t// Stability: development\n\tDBSystemNameOtherSQL = DBSystemNameKey.String(\"other_sql\")\n\t// [Adabas (Adaptable Database System)]\n\t// Stability: development\n\t//\n\t// [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas\n\tDBSystemNameSoftwareagAdabas = DBSystemNameKey.String(\"softwareag.adabas\")\n\t// [Actian Ingres]\n\t// Stability: development\n\t//\n\t// [Actian Ingres]: https://www.actian.com/databases/ingres/\n\tDBSystemNameActianIngres = DBSystemNameKey.String(\"actian.ingres\")\n\t// [Amazon DynamoDB]\n\t// Stability: development\n\t//\n\t// [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/\n\tDBSystemNameAWSDynamoDB = DBSystemNameKey.String(\"aws.dynamodb\")\n\t// [Amazon Redshift]\n\t// Stability: development\n\t//\n\t// [Amazon Redshift]: https://aws.amazon.com/redshift/\n\tDBSystemNameAWSRedshift = DBSystemNameKey.String(\"aws.redshift\")\n\t// [Azure Cosmos DB]\n\t// Stability: development\n\t//\n\t// [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db\n\tDBSystemNameAzureCosmosDB = DBSystemNameKey.String(\"azure.cosmosdb\")\n\t// [InterSystems Caché]\n\t// Stability: development\n\t//\n\t// [InterSystems Caché]: https://www.intersystems.com/products/cache/\n\tDBSystemNameIntersystemsCache = DBSystemNameKey.String(\"intersystems.cache\")\n\t// [Apache Cassandra]\n\t// Stability: development\n\t//\n\t// [Apache Cassandra]: https://cassandra.apache.org/\n\tDBSystemNameCassandra = DBSystemNameKey.String(\"cassandra\")\n\t// [ClickHouse]\n\t// Stability: development\n\t//\n\t// [ClickHouse]: https://clickhouse.com/\n\tDBSystemNameClickHouse = DBSystemNameKey.String(\"clickhouse\")\n\t// [CockroachDB]\n\t// Stability: development\n\t//\n\t// [CockroachDB]: https://www.cockroachlabs.com/\n\tDBSystemNameCockroachDB = DBSystemNameKey.String(\"cockroachdb\")\n\t// [Couchbase]\n\t// Stability: development\n\t//\n\t// [Couchbase]: https://www.couchbase.com/\n\tDBSystemNameCouchbase = DBSystemNameKey.String(\"couchbase\")\n\t// [Apache CouchDB]\n\t// Stability: development\n\t//\n\t// [Apache CouchDB]: https://couchdb.apache.org/\n\tDBSystemNameCouchDB = DBSystemNameKey.String(\"couchdb\")\n\t// [Apache Derby]\n\t// Stability: development\n\t//\n\t// [Apache Derby]: https://db.apache.org/derby/\n\tDBSystemNameDerby = DBSystemNameKey.String(\"derby\")\n\t// [Elasticsearch]\n\t// Stability: development\n\t//\n\t// [Elasticsearch]: https://www.elastic.co/elasticsearch\n\tDBSystemNameElasticsearch = DBSystemNameKey.String(\"elasticsearch\")\n\t// [Firebird]\n\t// Stability: development\n\t//\n\t// [Firebird]: https://www.firebirdsql.org/\n\tDBSystemNameFirebirdSQL = DBSystemNameKey.String(\"firebirdsql\")\n\t// [Google Cloud Spanner]\n\t// Stability: development\n\t//\n\t// [Google Cloud Spanner]: https://cloud.google.com/spanner\n\tDBSystemNameGCPSpanner = DBSystemNameKey.String(\"gcp.spanner\")\n\t// [Apache Geode]\n\t// Stability: development\n\t//\n\t// [Apache Geode]: https://geode.apache.org/\n\tDBSystemNameGeode = DBSystemNameKey.String(\"geode\")\n\t// [H2 Database]\n\t// Stability: development\n\t//\n\t// [H2 Database]: https://h2database.com/\n\tDBSystemNameH2database = DBSystemNameKey.String(\"h2database\")\n\t// [Apache HBase]\n\t// Stability: development\n\t//\n\t// [Apache HBase]: https://hbase.apache.org/\n\tDBSystemNameHBase = DBSystemNameKey.String(\"hbase\")\n\t// [Apache Hive]\n\t// Stability: development\n\t//\n\t// [Apache Hive]: https://hive.apache.org/\n\tDBSystemNameHive = DBSystemNameKey.String(\"hive\")\n\t// [HyperSQL Database]\n\t// Stability: development\n\t//\n\t// [HyperSQL Database]: https://hsqldb.org/\n\tDBSystemNameHSQLDB = DBSystemNameKey.String(\"hsqldb\")\n\t// [IBM Db2]\n\t// Stability: development\n\t//\n\t// [IBM Db2]: https://www.ibm.com/db2\n\tDBSystemNameIBMDB2 = DBSystemNameKey.String(\"ibm.db2\")\n\t// [IBM Informix]\n\t// Stability: development\n\t//\n\t// [IBM Informix]: https://www.ibm.com/products/informix\n\tDBSystemNameIBMInformix = DBSystemNameKey.String(\"ibm.informix\")\n\t// [IBM Netezza]\n\t// Stability: development\n\t//\n\t// [IBM Netezza]: https://www.ibm.com/products/netezza\n\tDBSystemNameIBMNetezza = DBSystemNameKey.String(\"ibm.netezza\")\n\t// [InfluxDB]\n\t// Stability: development\n\t//\n\t// [InfluxDB]: https://www.influxdata.com/\n\tDBSystemNameInfluxDB = DBSystemNameKey.String(\"influxdb\")\n\t// [Instant]\n\t// Stability: development\n\t//\n\t// [Instant]: https://www.instantdb.com/\n\tDBSystemNameInstantDB = DBSystemNameKey.String(\"instantdb\")\n\t// [MariaDB]\n\t// Stability: stable\n\t//\n\t// [MariaDB]: https://mariadb.org/\n\tDBSystemNameMariaDB = DBSystemNameKey.String(\"mariadb\")\n\t// [Memcached]\n\t// Stability: development\n\t//\n\t// [Memcached]: https://memcached.org/\n\tDBSystemNameMemcached = DBSystemNameKey.String(\"memcached\")\n\t// [MongoDB]\n\t// Stability: development\n\t//\n\t// [MongoDB]: https://www.mongodb.com/\n\tDBSystemNameMongoDB = DBSystemNameKey.String(\"mongodb\")\n\t// [Microsoft SQL Server]\n\t// Stability: stable\n\t//\n\t// [Microsoft SQL Server]: https://www.microsoft.com/sql-server\n\tDBSystemNameMicrosoftSQLServer = DBSystemNameKey.String(\"microsoft.sql_server\")\n\t// [MySQL]\n\t// Stability: stable\n\t//\n\t// [MySQL]: https://www.mysql.com/\n\tDBSystemNameMySQL = DBSystemNameKey.String(\"mysql\")\n\t// [Neo4j]\n\t// Stability: development\n\t//\n\t// [Neo4j]: https://neo4j.com/\n\tDBSystemNameNeo4j = DBSystemNameKey.String(\"neo4j\")\n\t// [OpenSearch]\n\t// Stability: development\n\t//\n\t// [OpenSearch]: https://opensearch.org/\n\tDBSystemNameOpenSearch = DBSystemNameKey.String(\"opensearch\")\n\t// [Oracle Database]\n\t// Stability: development\n\t//\n\t// [Oracle Database]: https://www.oracle.com/database/\n\tDBSystemNameOracleDB = DBSystemNameKey.String(\"oracle.db\")\n\t// [PostgreSQL]\n\t// Stability: stable\n\t//\n\t// [PostgreSQL]: https://www.postgresql.org/\n\tDBSystemNamePostgreSQL = DBSystemNameKey.String(\"postgresql\")\n\t// [Redis]\n\t// Stability: development\n\t//\n\t// [Redis]: https://redis.io/\n\tDBSystemNameRedis = DBSystemNameKey.String(\"redis\")\n\t// [SAP HANA]\n\t// Stability: development\n\t//\n\t// [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html\n\tDBSystemNameSAPHANA = DBSystemNameKey.String(\"sap.hana\")\n\t// [SAP MaxDB]\n\t// Stability: development\n\t//\n\t// [SAP MaxDB]: https://maxdb.sap.com/\n\tDBSystemNameSAPMaxDB = DBSystemNameKey.String(\"sap.maxdb\")\n\t// [SQLite]\n\t// Stability: development\n\t//\n\t// [SQLite]: https://www.sqlite.org/\n\tDBSystemNameSQLite = DBSystemNameKey.String(\"sqlite\")\n\t// [Teradata]\n\t// Stability: development\n\t//\n\t// [Teradata]: https://www.teradata.com/\n\tDBSystemNameTeradata = DBSystemNameKey.String(\"teradata\")\n\t// [Trino]\n\t// Stability: development\n\t//\n\t// [Trino]: https://trino.io/\n\tDBSystemNameTrino = DBSystemNameKey.String(\"trino\")\n)\n\n// Namespace: deployment\nconst (\n\t// DeploymentEnvironmentNameKey is the attribute Key conforming to the\n\t// \"deployment.environment.name\" semantic conventions. It represents the name of\n\t// the [deployment environment] (aka deployment tier).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"staging\", \"production\"\n\t// Note: `deployment.environment.name` does not affect the uniqueness\n\t// constraints defined through\n\t// the `service.namespace`, `service.name` and `service.instance.id` resource\n\t// attributes.\n\t// This implies that resources carrying the following attribute combinations\n\t// MUST be\n\t// considered to be identifying the same service:\n\t//\n\t//   - `service.name=frontend`, `deployment.environment.name=production`\n\t//   - `service.name=frontend`, `deployment.environment.name=staging`.\n\t//\n\t//\n\t// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment\n\tDeploymentEnvironmentNameKey = attribute.Key(\"deployment.environment.name\")\n\n\t// DeploymentIDKey is the attribute Key conforming to the \"deployment.id\"\n\t// semantic conventions. It represents the id of the deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1208\"\n\tDeploymentIDKey = attribute.Key(\"deployment.id\")\n\n\t// DeploymentNameKey is the attribute Key conforming to the \"deployment.name\"\n\t// semantic conventions. It represents the name of the deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"deploy my app\", \"deploy-frontend\"\n\tDeploymentNameKey = attribute.Key(\"deployment.name\")\n\n\t// DeploymentStatusKey is the attribute Key conforming to the\n\t// \"deployment.status\" semantic conventions. It represents the status of the\n\t// deployment.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tDeploymentStatusKey = attribute.Key(\"deployment.status\")\n)\n\n// DeploymentEnvironmentName returns an attribute KeyValue conforming to the\n// \"deployment.environment.name\" semantic conventions. It represents the name of\n// the [deployment environment] (aka deployment tier).\n//\n// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment\nfunc DeploymentEnvironmentName(val string) attribute.KeyValue {\n\treturn DeploymentEnvironmentNameKey.String(val)\n}\n\n// DeploymentID returns an attribute KeyValue conforming to the \"deployment.id\"\n// semantic conventions. It represents the id of the deployment.\nfunc DeploymentID(val string) attribute.KeyValue {\n\treturn DeploymentIDKey.String(val)\n}\n\n// DeploymentName returns an attribute KeyValue conforming to the\n// \"deployment.name\" semantic conventions. It represents the name of the\n// deployment.\nfunc DeploymentName(val string) attribute.KeyValue {\n\treturn DeploymentNameKey.String(val)\n}\n\n// Enum values for deployment.status\nvar (\n\t// failed\n\t// Stability: development\n\tDeploymentStatusFailed = DeploymentStatusKey.String(\"failed\")\n\t// succeeded\n\t// Stability: development\n\tDeploymentStatusSucceeded = DeploymentStatusKey.String(\"succeeded\")\n)\n\n// Namespace: destination\nconst (\n\t// DestinationAddressKey is the attribute Key conforming to the\n\t// \"destination.address\" semantic conventions. It represents the destination\n\t// address - domain name if available without reverse DNS lookup; otherwise, IP\n\t// address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"destination.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the source side, and when communicating through an\n\t// intermediary, `destination.address` SHOULD represent the destination address\n\t// behind any intermediaries, for example proxies, if it's available.\n\tDestinationAddressKey = attribute.Key(\"destination.address\")\n\n\t// DestinationPortKey is the attribute Key conforming to the \"destination.port\"\n\t// semantic conventions. It represents the destination port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3389, 2888\n\tDestinationPortKey = attribute.Key(\"destination.port\")\n)\n\n// DestinationAddress returns an attribute KeyValue conforming to the\n// \"destination.address\" semantic conventions. It represents the destination\n// address - domain name if available without reverse DNS lookup; otherwise, IP\n// address or Unix domain socket name.\nfunc DestinationAddress(val string) attribute.KeyValue {\n\treturn DestinationAddressKey.String(val)\n}\n\n// DestinationPort returns an attribute KeyValue conforming to the\n// \"destination.port\" semantic conventions. It represents the destination port\n// number.\nfunc DestinationPort(val int) attribute.KeyValue {\n\treturn DestinationPortKey.Int(val)\n}\n\n// Namespace: device\nconst (\n\t// DeviceIDKey is the attribute Key conforming to the \"device.id\" semantic\n\t// conventions. It represents a unique identifier representing the device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123456789012345\", \"01:23:45:67:89:AB\"\n\t// Note: Its value SHOULD be identical for all apps on a device and it SHOULD\n\t// NOT change if an app is uninstalled and re-installed.\n\t// However, it might be resettable by the user for all apps on a device.\n\t// Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be\n\t// used as values.\n\t//\n\t// More information about Android identifier best practices can be found in the\n\t// [Android user data IDs guide].\n\t//\n\t// > [!WARNING]> This attribute may contain sensitive (PII) information. Caution\n\t// > should be taken when storing personal data or anything which can identify a\n\t// > user. GDPR and data protection laws may apply,\n\t// > ensure you do your own due diligence.> Due to these reasons, this\n\t// > identifier is not recommended for consumer applications and will likely\n\t// > result in rejection from both Google Play and App Store.\n\t// > However, it may be appropriate for specific enterprise scenarios, such as\n\t// > kiosk devices or enterprise-managed devices, with appropriate compliance\n\t// > clearance.\n\t// > Any instrumentation providing this identifier MUST implement it as an\n\t// > opt-in feature.> See [`app.installation.id`]>  for a more\n\t// > privacy-preserving alternative.\n\t//\n\t// [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids\n\t// [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id\n\tDeviceIDKey = attribute.Key(\"device.id\")\n\n\t// DeviceManufacturerKey is the attribute Key conforming to the\n\t// \"device.manufacturer\" semantic conventions. It represents the name of the\n\t// device manufacturer.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Apple\", \"Samsung\"\n\t// Note: The Android OS provides this field via [Build]. iOS apps SHOULD\n\t// hardcode the value `Apple`.\n\t//\n\t// [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER\n\tDeviceManufacturerKey = attribute.Key(\"device.manufacturer\")\n\n\t// DeviceModelIdentifierKey is the attribute Key conforming to the\n\t// \"device.model.identifier\" semantic conventions. It represents the model\n\t// identifier for the device.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iPhone3,4\", \"SM-G920F\"\n\t// Note: It's recommended this value represents a machine-readable version of\n\t// the model identifier rather than the market or consumer-friendly name of the\n\t// device.\n\tDeviceModelIdentifierKey = attribute.Key(\"device.model.identifier\")\n\n\t// DeviceModelNameKey is the attribute Key conforming to the \"device.model.name\"\n\t// semantic conventions. It represents the marketing name for the device model.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iPhone 6s Plus\", \"Samsung Galaxy S6\"\n\t// Note: It's recommended this value represents a human-readable version of the\n\t// device model rather than a machine-readable alternative.\n\tDeviceModelNameKey = attribute.Key(\"device.model.name\")\n)\n\n// DeviceID returns an attribute KeyValue conforming to the \"device.id\" semantic\n// conventions. It represents a unique identifier representing the device.\nfunc DeviceID(val string) attribute.KeyValue {\n\treturn DeviceIDKey.String(val)\n}\n\n// DeviceManufacturer returns an attribute KeyValue conforming to the\n// \"device.manufacturer\" semantic conventions. It represents the name of the\n// device manufacturer.\nfunc DeviceManufacturer(val string) attribute.KeyValue {\n\treturn DeviceManufacturerKey.String(val)\n}\n\n// DeviceModelIdentifier returns an attribute KeyValue conforming to the\n// \"device.model.identifier\" semantic conventions. It represents the model\n// identifier for the device.\nfunc DeviceModelIdentifier(val string) attribute.KeyValue {\n\treturn DeviceModelIdentifierKey.String(val)\n}\n\n// DeviceModelName returns an attribute KeyValue conforming to the\n// \"device.model.name\" semantic conventions. It represents the marketing name for\n// the device model.\nfunc DeviceModelName(val string) attribute.KeyValue {\n\treturn DeviceModelNameKey.String(val)\n}\n\n// Namespace: disk\nconst (\n\t// DiskIODirectionKey is the attribute Key conforming to the \"disk.io.direction\"\n\t// semantic conventions. It represents the disk IO operation direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"read\"\n\tDiskIODirectionKey = attribute.Key(\"disk.io.direction\")\n)\n\n// Enum values for disk.io.direction\nvar (\n\t// read\n\t// Stability: development\n\tDiskIODirectionRead = DiskIODirectionKey.String(\"read\")\n\t// write\n\t// Stability: development\n\tDiskIODirectionWrite = DiskIODirectionKey.String(\"write\")\n)\n\n// Namespace: dns\nconst (\n\t// DNSAnswersKey is the attribute Key conforming to the \"dns.answers\" semantic\n\t// conventions. It represents the list of IPv4 or IPv6 addresses resolved during\n\t// DNS lookup.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10.0.0.1\", \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"\n\tDNSAnswersKey = attribute.Key(\"dns.answers\")\n\n\t// DNSQuestionNameKey is the attribute Key conforming to the \"dns.question.name\"\n\t// semantic conventions. It represents the name being queried.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"www.example.com\", \"opentelemetry.io\"\n\t// Note: The name represents the queried domain name as it appears in the DNS\n\t// query without any additional normalization.\n\tDNSQuestionNameKey = attribute.Key(\"dns.question.name\")\n)\n\n// DNSAnswers returns an attribute KeyValue conforming to the \"dns.answers\"\n// semantic conventions. It represents the list of IPv4 or IPv6 addresses\n// resolved during DNS lookup.\nfunc DNSAnswers(val ...string) attribute.KeyValue {\n\treturn DNSAnswersKey.StringSlice(val)\n}\n\n// DNSQuestionName returns an attribute KeyValue conforming to the\n// \"dns.question.name\" semantic conventions. It represents the name being\n// queried.\nfunc DNSQuestionName(val string) attribute.KeyValue {\n\treturn DNSQuestionNameKey.String(val)\n}\n\n// Namespace: elasticsearch\nconst (\n\t// ElasticsearchNodeNameKey is the attribute Key conforming to the\n\t// \"elasticsearch.node.name\" semantic conventions. It represents the represents\n\t// the human-readable identifier of the node/instance to which a request was\n\t// routed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"instance-0000000001\"\n\tElasticsearchNodeNameKey = attribute.Key(\"elasticsearch.node.name\")\n)\n\n// ElasticsearchNodeName returns an attribute KeyValue conforming to the\n// \"elasticsearch.node.name\" semantic conventions. It represents the represents\n// the human-readable identifier of the node/instance to which a request was\n// routed.\nfunc ElasticsearchNodeName(val string) attribute.KeyValue {\n\treturn ElasticsearchNodeNameKey.String(val)\n}\n\n// Namespace: enduser\nconst (\n\t// EnduserIDKey is the attribute Key conforming to the \"enduser.id\" semantic\n\t// conventions. It represents the unique identifier of an end user in the\n\t// system. It maybe a username, email address, or other identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"username\"\n\t// Note: Unique identifier of an end user in the system.\n\t//\n\t// > [!Warning]\n\t// > This field contains sensitive (PII) information.\n\tEnduserIDKey = attribute.Key(\"enduser.id\")\n\n\t// EnduserPseudoIDKey is the attribute Key conforming to the \"enduser.pseudo.id\"\n\t// semantic conventions. It represents the pseudonymous identifier of an end\n\t// user. This identifier should be a random value that is not directly linked or\n\t// associated with the end user's actual identity.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"QdH5CAWJgqVT4rOr0qtumf\"\n\t// Note: Pseudonymous identifier of an end user.\n\t//\n\t// > [!Warning]\n\t// > This field contains sensitive (linkable PII) information.\n\tEnduserPseudoIDKey = attribute.Key(\"enduser.pseudo.id\")\n)\n\n// EnduserID returns an attribute KeyValue conforming to the \"enduser.id\"\n// semantic conventions. It represents the unique identifier of an end user in\n// the system. It maybe a username, email address, or other identifier.\nfunc EnduserID(val string) attribute.KeyValue {\n\treturn EnduserIDKey.String(val)\n}\n\n// EnduserPseudoID returns an attribute KeyValue conforming to the\n// \"enduser.pseudo.id\" semantic conventions. It represents the pseudonymous\n// identifier of an end user. This identifier should be a random value that is\n// not directly linked or associated with the end user's actual identity.\nfunc EnduserPseudoID(val string) attribute.KeyValue {\n\treturn EnduserPseudoIDKey.String(val)\n}\n\n// Namespace: error\nconst (\n\t// ErrorMessageKey is the attribute Key conforming to the \"error.message\"\n\t// semantic conventions. It represents a message providing more detail about an\n\t// error in human-readable form.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Unexpected input type: string\", \"The user has exceeded their\n\t// storage quota\"\n\t// Note: `error.message` should provide additional context and detail about an\n\t// error.\n\t// It is NOT RECOMMENDED to duplicate the value of `error.type` in\n\t// `error.message`.\n\t// It is also NOT RECOMMENDED to duplicate the value of `exception.message` in\n\t// `error.message`.\n\t//\n\t// `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded\n\t// cardinality and overlap with span status.\n\tErrorMessageKey = attribute.Key(\"error.message\")\n\n\t// ErrorTypeKey is the attribute Key conforming to the \"error.type\" semantic\n\t// conventions. It represents the describes a class of error the operation ended\n\t// with.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"timeout\", \"java.net.UnknownHostException\",\n\t// \"server_certificate_invalid\", \"500\"\n\t// Note: The `error.type` SHOULD be predictable, and SHOULD have low\n\t// cardinality.\n\t//\n\t// When `error.type` is set to a type (e.g., an exception type), its\n\t// canonical class name identifying the type within the artifact SHOULD be used.\n\t//\n\t// Instrumentations SHOULD document the list of errors they report.\n\t//\n\t// The cardinality of `error.type` within one instrumentation library SHOULD be\n\t// low.\n\t// Telemetry consumers that aggregate data from multiple instrumentation\n\t// libraries and applications\n\t// should be prepared for `error.type` to have high cardinality at query time\n\t// when no\n\t// additional filters are applied.\n\t//\n\t// If the operation has completed successfully, instrumentations SHOULD NOT set\n\t// `error.type`.\n\t//\n\t// If a specific domain defines its own set of error identifiers (such as HTTP\n\t// or RPC status codes),\n\t// it's RECOMMENDED to:\n\t//\n\t//   - Use a domain-specific attribute\n\t//   - Set `error.type` to capture all errors, regardless of whether they are\n\t//     defined within the domain-specific set or not.\n\tErrorTypeKey = attribute.Key(\"error.type\")\n)\n\n// ErrorMessage returns an attribute KeyValue conforming to the \"error.message\"\n// semantic conventions. It represents a message providing more detail about an\n// error in human-readable form.\nfunc ErrorMessage(val string) attribute.KeyValue {\n\treturn ErrorMessageKey.String(val)\n}\n\n// Enum values for error.type\nvar (\n\t// A fallback error value to be used when the instrumentation doesn't define a\n\t// custom value.\n\t//\n\t// Stability: stable\n\tErrorTypeOther = ErrorTypeKey.String(\"_OTHER\")\n)\n\n// Namespace: exception\nconst (\n\t// ExceptionMessageKey is the attribute Key conforming to the\n\t// \"exception.message\" semantic conventions. It represents the exception\n\t// message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"Division by zero\", \"Can't convert 'int' object to str implicitly\"\n\tExceptionMessageKey = attribute.Key(\"exception.message\")\n\n\t// ExceptionStacktraceKey is the attribute Key conforming to the\n\t// \"exception.stacktrace\" semantic conventions. It represents a stacktrace as a\n\t// string in the natural representation for the language runtime. The\n\t// representation is to be determined and documented by each language SIG.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: Exception in thread \"main\" java.lang.RuntimeException: Test\n\t// exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at\n\t// com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at\n\t// com.example.GenerateTrace.main(GenerateTrace.java:5)\n\tExceptionStacktraceKey = attribute.Key(\"exception.stacktrace\")\n\n\t// ExceptionTypeKey is the attribute Key conforming to the \"exception.type\"\n\t// semantic conventions. It represents the type of the exception (its\n\t// fully-qualified class name, if applicable). The dynamic type of the exception\n\t// should be preferred over the static type in languages that support it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"java.net.ConnectException\", \"OSError\"\n\tExceptionTypeKey = attribute.Key(\"exception.type\")\n)\n\n// ExceptionMessage returns an attribute KeyValue conforming to the\n// \"exception.message\" semantic conventions. It represents the exception message.\nfunc ExceptionMessage(val string) attribute.KeyValue {\n\treturn ExceptionMessageKey.String(val)\n}\n\n// ExceptionStacktrace returns an attribute KeyValue conforming to the\n// \"exception.stacktrace\" semantic conventions. It represents a stacktrace as a\n// string in the natural representation for the language runtime. The\n// representation is to be determined and documented by each language SIG.\nfunc ExceptionStacktrace(val string) attribute.KeyValue {\n\treturn ExceptionStacktraceKey.String(val)\n}\n\n// ExceptionType returns an attribute KeyValue conforming to the \"exception.type\"\n// semantic conventions. It represents the type of the exception (its\n// fully-qualified class name, if applicable). The dynamic type of the exception\n// should be preferred over the static type in languages that support it.\nfunc ExceptionType(val string) attribute.KeyValue {\n\treturn ExceptionTypeKey.String(val)\n}\n\n// Namespace: faas\nconst (\n\t// FaaSColdstartKey is the attribute Key conforming to the \"faas.coldstart\"\n\t// semantic conventions. It represents a boolean that is true if the serverless\n\t// function is executed for the first time (aka cold-start).\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSColdstartKey = attribute.Key(\"faas.coldstart\")\n\n\t// FaaSCronKey is the attribute Key conforming to the \"faas.cron\" semantic\n\t// conventions. It represents a string containing the schedule period as\n\t// [Cron Expression].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0/5 * * * ? *\n\t//\n\t// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm\n\tFaaSCronKey = attribute.Key(\"faas.cron\")\n\n\t// FaaSDocumentCollectionKey is the attribute Key conforming to the\n\t// \"faas.document.collection\" semantic conventions. It represents the name of\n\t// the source on which the triggering operation was performed. For example, in\n\t// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the\n\t// database name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myBucketName\", \"myDbName\"\n\tFaaSDocumentCollectionKey = attribute.Key(\"faas.document.collection\")\n\n\t// FaaSDocumentNameKey is the attribute Key conforming to the\n\t// \"faas.document.name\" semantic conventions. It represents the document\n\t// name/table subjected to the operation. For example, in Cloud Storage or S3 is\n\t// the name of the file, and in Cosmos DB the table name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"myFile.txt\", \"myTableName\"\n\tFaaSDocumentNameKey = attribute.Key(\"faas.document.name\")\n\n\t// FaaSDocumentOperationKey is the attribute Key conforming to the\n\t// \"faas.document.operation\" semantic conventions. It represents the describes\n\t// the type of the operation that was performed on the data.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSDocumentOperationKey = attribute.Key(\"faas.document.operation\")\n\n\t// FaaSDocumentTimeKey is the attribute Key conforming to the\n\t// \"faas.document.time\" semantic conventions. It represents a string containing\n\t// the time when the data was accessed in the [ISO 8601] format expressed in\n\t// [UTC].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 2020-01-23T13:47:06Z\n\t//\n\t// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n\t// [UTC]: https://www.w3.org/TR/NOTE-datetime\n\tFaaSDocumentTimeKey = attribute.Key(\"faas.document.time\")\n\n\t// FaaSInstanceKey is the attribute Key conforming to the \"faas.instance\"\n\t// semantic conventions. It represents the execution environment ID as a string,\n\t// that will be potentially reused for other invocations to the same\n\t// function/function version.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de\"\n\t// Note: - **AWS Lambda:** Use the (full) log stream name.\n\tFaaSInstanceKey = attribute.Key(\"faas.instance\")\n\n\t// FaaSInvocationIDKey is the attribute Key conforming to the\n\t// \"faas.invocation_id\" semantic conventions. It represents the invocation ID of\n\t// the current function invocation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28\n\tFaaSInvocationIDKey = attribute.Key(\"faas.invocation_id\")\n\n\t// FaaSInvokedNameKey is the attribute Key conforming to the \"faas.invoked_name\"\n\t// semantic conventions. It represents the name of the invoked function.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: my-function\n\t// Note: SHOULD be equal to the `faas.name` resource attribute of the invoked\n\t// function.\n\tFaaSInvokedNameKey = attribute.Key(\"faas.invoked_name\")\n\n\t// FaaSInvokedProviderKey is the attribute Key conforming to the\n\t// \"faas.invoked_provider\" semantic conventions. It represents the cloud\n\t// provider of the invoked function.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: SHOULD be equal to the `cloud.provider` resource attribute of the\n\t// invoked function.\n\tFaaSInvokedProviderKey = attribute.Key(\"faas.invoked_provider\")\n\n\t// FaaSInvokedRegionKey is the attribute Key conforming to the\n\t// \"faas.invoked_region\" semantic conventions. It represents the cloud region of\n\t// the invoked function.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: eu-central-1\n\t// Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked\n\t// function.\n\tFaaSInvokedRegionKey = attribute.Key(\"faas.invoked_region\")\n\n\t// FaaSMaxMemoryKey is the attribute Key conforming to the \"faas.max_memory\"\n\t// semantic conventions. It represents the amount of memory available to the\n\t// serverless function converted to Bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: It's recommended to set this attribute since e.g. too little memory can\n\t// easily stop a Java AWS Lambda function from working correctly. On AWS Lambda,\n\t// the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this\n\t// information (which must be multiplied by 1,048,576).\n\tFaaSMaxMemoryKey = attribute.Key(\"faas.max_memory\")\n\n\t// FaaSNameKey is the attribute Key conforming to the \"faas.name\" semantic\n\t// conventions. It represents the name of the single function that this runtime\n\t// instance executes.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-function\", \"myazurefunctionapp/some-function-name\"\n\t// Note: This is the name of the function as configured/deployed on the FaaS\n\t// platform and is usually different from the name of the callback\n\t// function (which may be stored in the\n\t// [`code.namespace`/`code.function.name`]\n\t// span attributes).\n\t//\n\t// For some cloud providers, the above definition is ambiguous. The following\n\t// definition of function name MUST be used for this attribute\n\t// (and consequently the span name) for the listed cloud providers/products:\n\t//\n\t//   - **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name\n\t//     followed by a forward slash followed by the function name (this form\n\t//     can also be seen in the resource JSON for the function).\n\t//     This means that a span attribute MUST be used, as an Azure function\n\t//     app can host multiple functions that would usually share\n\t//     a TracerProvider (see also the `cloud.resource_id` attribute).\n\t//\n\t//\n\t// [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes\n\tFaaSNameKey = attribute.Key(\"faas.name\")\n\n\t// FaaSTimeKey is the attribute Key conforming to the \"faas.time\" semantic\n\t// conventions. It represents a string containing the function invocation time\n\t// in the [ISO 8601] format expressed in [UTC].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 2020-01-23T13:47:06Z\n\t//\n\t// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n\t// [UTC]: https://www.w3.org/TR/NOTE-datetime\n\tFaaSTimeKey = attribute.Key(\"faas.time\")\n\n\t// FaaSTriggerKey is the attribute Key conforming to the \"faas.trigger\" semantic\n\t// conventions. It represents the type of the trigger which caused this function\n\t// invocation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFaaSTriggerKey = attribute.Key(\"faas.trigger\")\n\n\t// FaaSVersionKey is the attribute Key conforming to the \"faas.version\" semantic\n\t// conventions. It represents the immutable version of the function being\n\t// executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"26\", \"pinkfroid-00002\"\n\t// Note: Depending on the cloud provider and platform, use:\n\t//\n\t//   - **AWS Lambda:** The [function version]\n\t//     (an integer represented as a decimal string).\n\t//   - **Google Cloud Run (Services):** The [revision]\n\t//     (i.e., the function name plus the revision suffix).\n\t//   - **Google Cloud Functions:** The value of the\n\t//     [`K_REVISION` environment variable].\n\t//   - **Azure Functions:** Not applicable. Do not set this attribute.\n\t//\n\t//\n\t// [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html\n\t// [revision]: https://cloud.google.com/run/docs/managing/revisions\n\t// [`K_REVISION` environment variable]: https://cloud.google.com/run/docs/container-contract#services-env-vars\n\tFaaSVersionKey = attribute.Key(\"faas.version\")\n)\n\n// FaaSColdstart returns an attribute KeyValue conforming to the \"faas.coldstart\"\n// semantic conventions. It represents a boolean that is true if the serverless\n// function is executed for the first time (aka cold-start).\nfunc FaaSColdstart(val bool) attribute.KeyValue {\n\treturn FaaSColdstartKey.Bool(val)\n}\n\n// FaaSCron returns an attribute KeyValue conforming to the \"faas.cron\" semantic\n// conventions. It represents a string containing the schedule period as\n// [Cron Expression].\n//\n// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm\nfunc FaaSCron(val string) attribute.KeyValue {\n\treturn FaaSCronKey.String(val)\n}\n\n// FaaSDocumentCollection returns an attribute KeyValue conforming to the\n// \"faas.document.collection\" semantic conventions. It represents the name of the\n// source on which the triggering operation was performed. For example, in Cloud\n// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database\n// name.\nfunc FaaSDocumentCollection(val string) attribute.KeyValue {\n\treturn FaaSDocumentCollectionKey.String(val)\n}\n\n// FaaSDocumentName returns an attribute KeyValue conforming to the\n// \"faas.document.name\" semantic conventions. It represents the document\n// name/table subjected to the operation. For example, in Cloud Storage or S3 is\n// the name of the file, and in Cosmos DB the table name.\nfunc FaaSDocumentName(val string) attribute.KeyValue {\n\treturn FaaSDocumentNameKey.String(val)\n}\n\n// FaaSDocumentTime returns an attribute KeyValue conforming to the\n// \"faas.document.time\" semantic conventions. It represents a string containing\n// the time when the data was accessed in the [ISO 8601] format expressed in\n// [UTC].\n//\n// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n// [UTC]: https://www.w3.org/TR/NOTE-datetime\nfunc FaaSDocumentTime(val string) attribute.KeyValue {\n\treturn FaaSDocumentTimeKey.String(val)\n}\n\n// FaaSInstance returns an attribute KeyValue conforming to the \"faas.instance\"\n// semantic conventions. It represents the execution environment ID as a string,\n// that will be potentially reused for other invocations to the same\n// function/function version.\nfunc FaaSInstance(val string) attribute.KeyValue {\n\treturn FaaSInstanceKey.String(val)\n}\n\n// FaaSInvocationID returns an attribute KeyValue conforming to the\n// \"faas.invocation_id\" semantic conventions. It represents the invocation ID of\n// the current function invocation.\nfunc FaaSInvocationID(val string) attribute.KeyValue {\n\treturn FaaSInvocationIDKey.String(val)\n}\n\n// FaaSInvokedName returns an attribute KeyValue conforming to the\n// \"faas.invoked_name\" semantic conventions. It represents the name of the\n// invoked function.\nfunc FaaSInvokedName(val string) attribute.KeyValue {\n\treturn FaaSInvokedNameKey.String(val)\n}\n\n// FaaSInvokedRegion returns an attribute KeyValue conforming to the\n// \"faas.invoked_region\" semantic conventions. It represents the cloud region of\n// the invoked function.\nfunc FaaSInvokedRegion(val string) attribute.KeyValue {\n\treturn FaaSInvokedRegionKey.String(val)\n}\n\n// FaaSMaxMemory returns an attribute KeyValue conforming to the\n// \"faas.max_memory\" semantic conventions. It represents the amount of memory\n// available to the serverless function converted to Bytes.\nfunc FaaSMaxMemory(val int) attribute.KeyValue {\n\treturn FaaSMaxMemoryKey.Int(val)\n}\n\n// FaaSName returns an attribute KeyValue conforming to the \"faas.name\" semantic\n// conventions. It represents the name of the single function that this runtime\n// instance executes.\nfunc FaaSName(val string) attribute.KeyValue {\n\treturn FaaSNameKey.String(val)\n}\n\n// FaaSTime returns an attribute KeyValue conforming to the \"faas.time\" semantic\n// conventions. It represents a string containing the function invocation time in\n// the [ISO 8601] format expressed in [UTC].\n//\n// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html\n// [UTC]: https://www.w3.org/TR/NOTE-datetime\nfunc FaaSTime(val string) attribute.KeyValue {\n\treturn FaaSTimeKey.String(val)\n}\n\n// FaaSVersion returns an attribute KeyValue conforming to the \"faas.version\"\n// semantic conventions. It represents the immutable version of the function\n// being executed.\nfunc FaaSVersion(val string) attribute.KeyValue {\n\treturn FaaSVersionKey.String(val)\n}\n\n// Enum values for faas.document.operation\nvar (\n\t// When a new object is created.\n\t// Stability: development\n\tFaaSDocumentOperationInsert = FaaSDocumentOperationKey.String(\"insert\")\n\t// When an object is modified.\n\t// Stability: development\n\tFaaSDocumentOperationEdit = FaaSDocumentOperationKey.String(\"edit\")\n\t// When an object is deleted.\n\t// Stability: development\n\tFaaSDocumentOperationDelete = FaaSDocumentOperationKey.String(\"delete\")\n)\n\n// Enum values for faas.invoked_provider\nvar (\n\t// Alibaba Cloud\n\t// Stability: development\n\tFaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String(\"alibaba_cloud\")\n\t// Amazon Web Services\n\t// Stability: development\n\tFaaSInvokedProviderAWS = FaaSInvokedProviderKey.String(\"aws\")\n\t// Microsoft Azure\n\t// Stability: development\n\tFaaSInvokedProviderAzure = FaaSInvokedProviderKey.String(\"azure\")\n\t// Google Cloud Platform\n\t// Stability: development\n\tFaaSInvokedProviderGCP = FaaSInvokedProviderKey.String(\"gcp\")\n\t// Tencent Cloud\n\t// Stability: development\n\tFaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String(\"tencent_cloud\")\n)\n\n// Enum values for faas.trigger\nvar (\n\t// A response to some data source operation such as a database or filesystem\n\t// read/write\n\t// Stability: development\n\tFaaSTriggerDatasource = FaaSTriggerKey.String(\"datasource\")\n\t// To provide an answer to an inbound HTTP request\n\t// Stability: development\n\tFaaSTriggerHTTP = FaaSTriggerKey.String(\"http\")\n\t// A function is set to be executed when messages are sent to a messaging system\n\t// Stability: development\n\tFaaSTriggerPubSub = FaaSTriggerKey.String(\"pubsub\")\n\t// A function is scheduled to be executed regularly\n\t// Stability: development\n\tFaaSTriggerTimer = FaaSTriggerKey.String(\"timer\")\n\t// If none of the others apply\n\t// Stability: development\n\tFaaSTriggerOther = FaaSTriggerKey.String(\"other\")\n)\n\n// Namespace: feature_flag\nconst (\n\t// FeatureFlagContextIDKey is the attribute Key conforming to the\n\t// \"feature_flag.context.id\" semantic conventions. It represents the unique\n\t// identifier for the flag evaluation context. For example, the targeting key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"5157782b-2203-4c80-a857-dbbd5e7761db\"\n\tFeatureFlagContextIDKey = attribute.Key(\"feature_flag.context.id\")\n\n\t// FeatureFlagKeyKey is the attribute Key conforming to the \"feature_flag.key\"\n\t// semantic conventions. It represents the lookup key of the feature flag.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"logo-color\"\n\tFeatureFlagKeyKey = attribute.Key(\"feature_flag.key\")\n\n\t// FeatureFlagProviderNameKey is the attribute Key conforming to the\n\t// \"feature_flag.provider.name\" semantic conventions. It represents the\n\t// identifies the feature flag provider.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"Flag Manager\"\n\tFeatureFlagProviderNameKey = attribute.Key(\"feature_flag.provider.name\")\n\n\t// FeatureFlagResultReasonKey is the attribute Key conforming to the\n\t// \"feature_flag.result.reason\" semantic conventions. It represents the reason\n\t// code which shows how a feature flag value was determined.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"static\", \"targeting_match\", \"error\", \"default\"\n\tFeatureFlagResultReasonKey = attribute.Key(\"feature_flag.result.reason\")\n\n\t// FeatureFlagResultValueKey is the attribute Key conforming to the\n\t// \"feature_flag.result.value\" semantic conventions. It represents the evaluated\n\t// value of the feature flag.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"#ff0000\", true, 3\n\t// Note: With some feature flag providers, feature flag results can be quite\n\t// large or contain private or sensitive details.\n\t// Because of this, `feature_flag.result.variant` is often the preferred\n\t// attribute if it is available.\n\t//\n\t// It may be desirable to redact or otherwise limit the size and scope of\n\t// `feature_flag.result.value` if possible.\n\t// Because the evaluated flag value is unstructured and may be any type, it is\n\t// left to the instrumentation author to determine how best to achieve this.\n\tFeatureFlagResultValueKey = attribute.Key(\"feature_flag.result.value\")\n\n\t// FeatureFlagResultVariantKey is the attribute Key conforming to the\n\t// \"feature_flag.result.variant\" semantic conventions. It represents a semantic\n\t// identifier for an evaluated flag value.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"red\", \"true\", \"on\"\n\t// Note: A semantic identifier, commonly referred to as a variant, provides a\n\t// means\n\t// for referring to a value without including the value itself. This can\n\t// provide additional context for understanding the meaning behind a value.\n\t// For example, the variant `red` maybe be used for the value `#c05543`.\n\tFeatureFlagResultVariantKey = attribute.Key(\"feature_flag.result.variant\")\n\n\t// FeatureFlagSetIDKey is the attribute Key conforming to the\n\t// \"feature_flag.set.id\" semantic conventions. It represents the identifier of\n\t// the [flag set] to which the feature flag belongs.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"proj-1\", \"ab98sgs\", \"service1/dev\"\n\t//\n\t// [flag set]: https://openfeature.dev/specification/glossary/#flag-set\n\tFeatureFlagSetIDKey = attribute.Key(\"feature_flag.set.id\")\n\n\t// FeatureFlagVersionKey is the attribute Key conforming to the\n\t// \"feature_flag.version\" semantic conventions. It represents the version of the\n\t// ruleset used during the evaluation. This may be any stable value which\n\t// uniquely identifies the ruleset.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Release_Candidate\n\t//\n\t// Examples: \"1\", \"01ABCDEF\"\n\tFeatureFlagVersionKey = attribute.Key(\"feature_flag.version\")\n)\n\n// FeatureFlagContextID returns an attribute KeyValue conforming to the\n// \"feature_flag.context.id\" semantic conventions. It represents the unique\n// identifier for the flag evaluation context. For example, the targeting key.\nfunc FeatureFlagContextID(val string) attribute.KeyValue {\n\treturn FeatureFlagContextIDKey.String(val)\n}\n\n// FeatureFlagKey returns an attribute KeyValue conforming to the\n// \"feature_flag.key\" semantic conventions. It represents the lookup key of the\n// feature flag.\nfunc FeatureFlagKey(val string) attribute.KeyValue {\n\treturn FeatureFlagKeyKey.String(val)\n}\n\n// FeatureFlagProviderName returns an attribute KeyValue conforming to the\n// \"feature_flag.provider.name\" semantic conventions. It represents the\n// identifies the feature flag provider.\nfunc FeatureFlagProviderName(val string) attribute.KeyValue {\n\treturn FeatureFlagProviderNameKey.String(val)\n}\n\n// FeatureFlagResultVariant returns an attribute KeyValue conforming to the\n// \"feature_flag.result.variant\" semantic conventions. It represents a semantic\n// identifier for an evaluated flag value.\nfunc FeatureFlagResultVariant(val string) attribute.KeyValue {\n\treturn FeatureFlagResultVariantKey.String(val)\n}\n\n// FeatureFlagSetID returns an attribute KeyValue conforming to the\n// \"feature_flag.set.id\" semantic conventions. It represents the identifier of\n// the [flag set] to which the feature flag belongs.\n//\n// [flag set]: https://openfeature.dev/specification/glossary/#flag-set\nfunc FeatureFlagSetID(val string) attribute.KeyValue {\n\treturn FeatureFlagSetIDKey.String(val)\n}\n\n// FeatureFlagVersion returns an attribute KeyValue conforming to the\n// \"feature_flag.version\" semantic conventions. It represents the version of the\n// ruleset used during the evaluation. This may be any stable value which\n// uniquely identifies the ruleset.\nfunc FeatureFlagVersion(val string) attribute.KeyValue {\n\treturn FeatureFlagVersionKey.String(val)\n}\n\n// Enum values for feature_flag.result.reason\nvar (\n\t// The resolved value is static (no dynamic evaluation).\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String(\"static\")\n\t// The resolved value fell back to a pre-configured value (no dynamic evaluation\n\t// occurred or dynamic evaluation yielded no result).\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String(\"default\")\n\t// The resolved value was the result of a dynamic evaluation, such as a rule or\n\t// specific user-targeting.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String(\"targeting_match\")\n\t// The resolved value was the result of pseudorandom assignment.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String(\"split\")\n\t// The resolved value was retrieved from cache.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String(\"cached\")\n\t// The resolved value was the result of the flag being disabled in the\n\t// management system.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String(\"disabled\")\n\t// The reason for the resolved value could not be determined.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String(\"unknown\")\n\t// The resolved value is non-authoritative or possibly out of date\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String(\"stale\")\n\t// The resolved value was the result of an error.\n\t// Stability: release_candidate\n\tFeatureFlagResultReasonError = FeatureFlagResultReasonKey.String(\"error\")\n)\n\n// Namespace: file\nconst (\n\t// FileAccessedKey is the attribute Key conforming to the \"file.accessed\"\n\t// semantic conventions. It represents the time when the file was last accessed,\n\t// in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: This attribute might not be supported by some file systems — NFS,\n\t// FAT32, in embedded OS, etc.\n\tFileAccessedKey = attribute.Key(\"file.accessed\")\n\n\t// FileAttributesKey is the attribute Key conforming to the \"file.attributes\"\n\t// semantic conventions. It represents the array of file attributes.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"readonly\", \"hidden\"\n\t// Note: Attributes names depend on the OS or file system. Here’s a\n\t// non-exhaustive list of values expected for this attribute: `archive`,\n\t// `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`,\n\t// `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`,\n\t// `write`.\n\tFileAttributesKey = attribute.Key(\"file.attributes\")\n\n\t// FileChangedKey is the attribute Key conforming to the \"file.changed\" semantic\n\t// conventions. It represents the time when the file attributes or metadata was\n\t// last changed, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: `file.changed` captures the time when any of the file's properties or\n\t// attributes (including the content) are changed, while `file.modified`\n\t// captures the timestamp when the file content is modified.\n\tFileChangedKey = attribute.Key(\"file.changed\")\n\n\t// FileCreatedKey is the attribute Key conforming to the \"file.created\" semantic\n\t// conventions. It represents the time when the file was created, in ISO 8601\n\t// format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\t// Note: This attribute might not be supported by some file systems — NFS,\n\t// FAT32, in embedded OS, etc.\n\tFileCreatedKey = attribute.Key(\"file.created\")\n\n\t// FileDirectoryKey is the attribute Key conforming to the \"file.directory\"\n\t// semantic conventions. It represents the directory where the file is located.\n\t// It should include the drive letter, when appropriate.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/home/user\", \"C:\\Program Files\\MyApp\"\n\tFileDirectoryKey = attribute.Key(\"file.directory\")\n\n\t// FileExtensionKey is the attribute Key conforming to the \"file.extension\"\n\t// semantic conventions. It represents the file extension, excluding the leading\n\t// dot.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"png\", \"gz\"\n\t// Note: When the file name has multiple extensions (example.tar.gz), only the\n\t// last one should be captured (\"gz\", not \"tar.gz\").\n\tFileExtensionKey = attribute.Key(\"file.extension\")\n\n\t// FileForkNameKey is the attribute Key conforming to the \"file.fork_name\"\n\t// semantic conventions. It represents the name of the fork. A fork is\n\t// additional data associated with a filesystem object.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Zone.Identifier\"\n\t// Note: On Linux, a resource fork is used to store additional data with a\n\t// filesystem object. A file always has at least one fork for the data portion,\n\t// and additional forks may exist.\n\t// On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default\n\t// data stream for a file is just called $DATA. Zone.Identifier is commonly used\n\t// by Windows to track contents downloaded from the Internet. An ADS is\n\t// typically of the form: C:\\path\\to\\filename.extension:some_fork_name, and\n\t// some_fork_name is the value that should populate `fork_name`.\n\t// `filename.extension` should populate `file.name`, and `extension` should\n\t// populate `file.extension`. The full path, `file.path`, will include the fork\n\t// name.\n\tFileForkNameKey = attribute.Key(\"file.fork_name\")\n\n\t// FileGroupIDKey is the attribute Key conforming to the \"file.group.id\"\n\t// semantic conventions. It represents the primary Group ID (GID) of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1000\"\n\tFileGroupIDKey = attribute.Key(\"file.group.id\")\n\n\t// FileGroupNameKey is the attribute Key conforming to the \"file.group.name\"\n\t// semantic conventions. It represents the primary group name of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"users\"\n\tFileGroupNameKey = attribute.Key(\"file.group.name\")\n\n\t// FileInodeKey is the attribute Key conforming to the \"file.inode\" semantic\n\t// conventions. It represents the inode representing the file in the filesystem.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"256383\"\n\tFileInodeKey = attribute.Key(\"file.inode\")\n\n\t// FileModeKey is the attribute Key conforming to the \"file.mode\" semantic\n\t// conventions. It represents the mode of the file in octal representation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0640\"\n\tFileModeKey = attribute.Key(\"file.mode\")\n\n\t// FileModifiedKey is the attribute Key conforming to the \"file.modified\"\n\t// semantic conventions. It represents the time when the file content was last\n\t// modified, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T12:00:00Z\"\n\tFileModifiedKey = attribute.Key(\"file.modified\")\n\n\t// FileNameKey is the attribute Key conforming to the \"file.name\" semantic\n\t// conventions. It represents the name of the file including the extension,\n\t// without the directory.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"example.png\"\n\tFileNameKey = attribute.Key(\"file.name\")\n\n\t// FileOwnerIDKey is the attribute Key conforming to the \"file.owner.id\"\n\t// semantic conventions. It represents the user ID (UID) or security identifier\n\t// (SID) of the file owner.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1000\"\n\tFileOwnerIDKey = attribute.Key(\"file.owner.id\")\n\n\t// FileOwnerNameKey is the attribute Key conforming to the \"file.owner.name\"\n\t// semantic conventions. It represents the username of the file owner.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tFileOwnerNameKey = attribute.Key(\"file.owner.name\")\n\n\t// FilePathKey is the attribute Key conforming to the \"file.path\" semantic\n\t// conventions. It represents the full path to the file, including the file\n\t// name. It should include the drive letter, when appropriate.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/home/alice/example.png\", \"C:\\Program Files\\MyApp\\myapp.exe\"\n\tFilePathKey = attribute.Key(\"file.path\")\n\n\t// FileSizeKey is the attribute Key conforming to the \"file.size\" semantic\n\t// conventions. It represents the file size in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tFileSizeKey = attribute.Key(\"file.size\")\n\n\t// FileSymbolicLinkTargetPathKey is the attribute Key conforming to the\n\t// \"file.symbolic_link.target_path\" semantic conventions. It represents the path\n\t// to the target of a symbolic link.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/usr/bin/python3\"\n\t// Note: This attribute is only applicable to symbolic links.\n\tFileSymbolicLinkTargetPathKey = attribute.Key(\"file.symbolic_link.target_path\")\n)\n\n// FileAccessed returns an attribute KeyValue conforming to the \"file.accessed\"\n// semantic conventions. It represents the time when the file was last accessed,\n// in ISO 8601 format.\nfunc FileAccessed(val string) attribute.KeyValue {\n\treturn FileAccessedKey.String(val)\n}\n\n// FileAttributes returns an attribute KeyValue conforming to the\n// \"file.attributes\" semantic conventions. It represents the array of file\n// attributes.\nfunc FileAttributes(val ...string) attribute.KeyValue {\n\treturn FileAttributesKey.StringSlice(val)\n}\n\n// FileChanged returns an attribute KeyValue conforming to the \"file.changed\"\n// semantic conventions. It represents the time when the file attributes or\n// metadata was last changed, in ISO 8601 format.\nfunc FileChanged(val string) attribute.KeyValue {\n\treturn FileChangedKey.String(val)\n}\n\n// FileCreated returns an attribute KeyValue conforming to the \"file.created\"\n// semantic conventions. It represents the time when the file was created, in ISO\n// 8601 format.\nfunc FileCreated(val string) attribute.KeyValue {\n\treturn FileCreatedKey.String(val)\n}\n\n// FileDirectory returns an attribute KeyValue conforming to the \"file.directory\"\n// semantic conventions. It represents the directory where the file is located.\n// It should include the drive letter, when appropriate.\nfunc FileDirectory(val string) attribute.KeyValue {\n\treturn FileDirectoryKey.String(val)\n}\n\n// FileExtension returns an attribute KeyValue conforming to the \"file.extension\"\n// semantic conventions. It represents the file extension, excluding the leading\n// dot.\nfunc FileExtension(val string) attribute.KeyValue {\n\treturn FileExtensionKey.String(val)\n}\n\n// FileForkName returns an attribute KeyValue conforming to the \"file.fork_name\"\n// semantic conventions. It represents the name of the fork. A fork is additional\n// data associated with a filesystem object.\nfunc FileForkName(val string) attribute.KeyValue {\n\treturn FileForkNameKey.String(val)\n}\n\n// FileGroupID returns an attribute KeyValue conforming to the \"file.group.id\"\n// semantic conventions. It represents the primary Group ID (GID) of the file.\nfunc FileGroupID(val string) attribute.KeyValue {\n\treturn FileGroupIDKey.String(val)\n}\n\n// FileGroupName returns an attribute KeyValue conforming to the\n// \"file.group.name\" semantic conventions. It represents the primary group name\n// of the file.\nfunc FileGroupName(val string) attribute.KeyValue {\n\treturn FileGroupNameKey.String(val)\n}\n\n// FileInode returns an attribute KeyValue conforming to the \"file.inode\"\n// semantic conventions. It represents the inode representing the file in the\n// filesystem.\nfunc FileInode(val string) attribute.KeyValue {\n\treturn FileInodeKey.String(val)\n}\n\n// FileMode returns an attribute KeyValue conforming to the \"file.mode\" semantic\n// conventions. It represents the mode of the file in octal representation.\nfunc FileMode(val string) attribute.KeyValue {\n\treturn FileModeKey.String(val)\n}\n\n// FileModified returns an attribute KeyValue conforming to the \"file.modified\"\n// semantic conventions. It represents the time when the file content was last\n// modified, in ISO 8601 format.\nfunc FileModified(val string) attribute.KeyValue {\n\treturn FileModifiedKey.String(val)\n}\n\n// FileName returns an attribute KeyValue conforming to the \"file.name\" semantic\n// conventions. It represents the name of the file including the extension,\n// without the directory.\nfunc FileName(val string) attribute.KeyValue {\n\treturn FileNameKey.String(val)\n}\n\n// FileOwnerID returns an attribute KeyValue conforming to the \"file.owner.id\"\n// semantic conventions. It represents the user ID (UID) or security identifier\n// (SID) of the file owner.\nfunc FileOwnerID(val string) attribute.KeyValue {\n\treturn FileOwnerIDKey.String(val)\n}\n\n// FileOwnerName returns an attribute KeyValue conforming to the\n// \"file.owner.name\" semantic conventions. It represents the username of the file\n// owner.\nfunc FileOwnerName(val string) attribute.KeyValue {\n\treturn FileOwnerNameKey.String(val)\n}\n\n// FilePath returns an attribute KeyValue conforming to the \"file.path\" semantic\n// conventions. It represents the full path to the file, including the file name.\n// It should include the drive letter, when appropriate.\nfunc FilePath(val string) attribute.KeyValue {\n\treturn FilePathKey.String(val)\n}\n\n// FileSize returns an attribute KeyValue conforming to the \"file.size\" semantic\n// conventions. It represents the file size in bytes.\nfunc FileSize(val int) attribute.KeyValue {\n\treturn FileSizeKey.Int(val)\n}\n\n// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the\n// \"file.symbolic_link.target_path\" semantic conventions. It represents the path\n// to the target of a symbolic link.\nfunc FileSymbolicLinkTargetPath(val string) attribute.KeyValue {\n\treturn FileSymbolicLinkTargetPathKey.String(val)\n}\n\n// Namespace: gcp\nconst (\n\t// GCPAppHubApplicationContainerKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.container\" semantic conventions. It represents the\n\t// container within GCP where the AppHub application is defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"projects/my-container-project\"\n\tGCPAppHubApplicationContainerKey = attribute.Key(\"gcp.apphub.application.container\")\n\n\t// GCPAppHubApplicationIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.id\" semantic conventions. It represents the name of\n\t// the application as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-application\"\n\tGCPAppHubApplicationIDKey = attribute.Key(\"gcp.apphub.application.id\")\n\n\t// GCPAppHubApplicationLocationKey is the attribute Key conforming to the\n\t// \"gcp.apphub.application.location\" semantic conventions. It represents the GCP\n\t// zone or region where the application is defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-central1\"\n\tGCPAppHubApplicationLocationKey = attribute.Key(\"gcp.apphub.application.location\")\n\n\t// GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.criticality_type\" semantic conventions. It represents the\n\t// criticality of a service indicates its importance to the business.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub type enum]\n\t//\n\t// [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubServiceCriticalityTypeKey = attribute.Key(\"gcp.apphub.service.criticality_type\")\n\n\t// GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.environment_type\" semantic conventions. It represents the\n\t// environment of a service is the stage of a software lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub environment type]\n\t//\n\t// [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubServiceEnvironmentTypeKey = attribute.Key(\"gcp.apphub.service.environment_type\")\n\n\t// GCPAppHubServiceIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.service.id\" semantic conventions. It represents the name of the\n\t// service as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-service\"\n\tGCPAppHubServiceIDKey = attribute.Key(\"gcp.apphub.service.id\")\n\n\t// GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.criticality_type\" semantic conventions. It represents\n\t// the criticality of a workload indicates its importance to the business.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub type enum]\n\t//\n\t// [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubWorkloadCriticalityTypeKey = attribute.Key(\"gcp.apphub.workload.criticality_type\")\n\n\t// GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.environment_type\" semantic conventions. It represents\n\t// the environment of a workload is the stage of a software lifecycle.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: [See AppHub environment type]\n\t//\n\t// [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubWorkloadEnvironmentTypeKey = attribute.Key(\"gcp.apphub.workload.environment_type\")\n\n\t// GCPAppHubWorkloadIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub.workload.id\" semantic conventions. It represents the name of the\n\t// workload as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-workload\"\n\tGCPAppHubWorkloadIDKey = attribute.Key(\"gcp.apphub.workload.id\")\n\n\t// GCPAppHubDestinationApplicationContainerKey is the attribute Key conforming\n\t// to the \"gcp.apphub_destination.application.container\" semantic conventions.\n\t// It represents the container within GCP where the AppHub destination\n\t// application is defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"projects/my-container-project\"\n\tGCPAppHubDestinationApplicationContainerKey = attribute.Key(\"gcp.apphub_destination.application.container\")\n\n\t// GCPAppHubDestinationApplicationIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub_destination.application.id\" semantic conventions. It represents\n\t// the name of the destination application as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-application\"\n\tGCPAppHubDestinationApplicationIDKey = attribute.Key(\"gcp.apphub_destination.application.id\")\n\n\t// GCPAppHubDestinationApplicationLocationKey is the attribute Key conforming to\n\t// the \"gcp.apphub_destination.application.location\" semantic conventions. It\n\t// represents the GCP zone or region where the destination application is\n\t// defined.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"us-central1\"\n\tGCPAppHubDestinationApplicationLocationKey = attribute.Key(\"gcp.apphub_destination.application.location\")\n\n\t// GCPAppHubDestinationServiceCriticalityTypeKey is the attribute Key conforming\n\t// to the \"gcp.apphub_destination.service.criticality_type\" semantic\n\t// conventions. It represents the criticality of a destination workload\n\t// indicates its importance to the business as specified in [AppHub type enum].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubDestinationServiceCriticalityTypeKey = attribute.Key(\"gcp.apphub_destination.service.criticality_type\")\n\n\t// GCPAppHubDestinationServiceEnvironmentTypeKey is the attribute Key conforming\n\t// to the \"gcp.apphub_destination.service.environment_type\" semantic\n\t// conventions. It represents the software lifecycle stage of a destination\n\t// service as defined [AppHub environment type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubDestinationServiceEnvironmentTypeKey = attribute.Key(\"gcp.apphub_destination.service.environment_type\")\n\n\t// GCPAppHubDestinationServiceIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub_destination.service.id\" semantic conventions. It represents the\n\t// name of the destination service as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-service\"\n\tGCPAppHubDestinationServiceIDKey = attribute.Key(\"gcp.apphub_destination.service.id\")\n\n\t// GCPAppHubDestinationWorkloadCriticalityTypeKey is the attribute Key\n\t// conforming to the \"gcp.apphub_destination.workload.criticality_type\" semantic\n\t// conventions. It represents the criticality of a destination workload\n\t// indicates its importance to the business as specified in [AppHub type enum].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type\n\tGCPAppHubDestinationWorkloadCriticalityTypeKey = attribute.Key(\"gcp.apphub_destination.workload.criticality_type\")\n\n\t// GCPAppHubDestinationWorkloadEnvironmentTypeKey is the attribute Key\n\t// conforming to the \"gcp.apphub_destination.workload.environment_type\" semantic\n\t// conventions. It represents the environment of a destination workload is the\n\t// stage of a software lifecycle as provided in the [AppHub environment type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1\n\tGCPAppHubDestinationWorkloadEnvironmentTypeKey = attribute.Key(\"gcp.apphub_destination.workload.environment_type\")\n\n\t// GCPAppHubDestinationWorkloadIDKey is the attribute Key conforming to the\n\t// \"gcp.apphub_destination.workload.id\" semantic conventions. It represents the\n\t// name of the destination workload as configured in AppHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-workload\"\n\tGCPAppHubDestinationWorkloadIDKey = attribute.Key(\"gcp.apphub_destination.workload.id\")\n\n\t// GCPClientServiceKey is the attribute Key conforming to the\n\t// \"gcp.client.service\" semantic conventions. It represents the identifies the\n\t// Google Cloud service for which the official client library is intended.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"appengine\", \"run\", \"firestore\", \"alloydb\", \"spanner\"\n\t// Note: Intended to be a stable identifier for Google Cloud client libraries\n\t// that is uniform across implementation languages. The value should be derived\n\t// from the canonical service domain for the service; for example,\n\t// 'foo.googleapis.com' should result in a value of 'foo'.\n\tGCPClientServiceKey = attribute.Key(\"gcp.client.service\")\n\n\t// GCPCloudRunJobExecutionKey is the attribute Key conforming to the\n\t// \"gcp.cloud_run.job.execution\" semantic conventions. It represents the name of\n\t// the Cloud Run [execution] being run for the Job, as set by the\n\t// [`CLOUD_RUN_EXECUTION`] environment variable.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"job-name-xxxx\", \"sample-job-mdw84\"\n\t//\n\t// [execution]: https://cloud.google.com/run/docs/managing/job-executions\n\t// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\n\tGCPCloudRunJobExecutionKey = attribute.Key(\"gcp.cloud_run.job.execution\")\n\n\t// GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the\n\t// \"gcp.cloud_run.job.task_index\" semantic conventions. It represents the index\n\t// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]\n\t// environment variable.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 1\n\t//\n\t// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\n\tGCPCloudRunJobTaskIndexKey = attribute.Key(\"gcp.cloud_run.job.task_index\")\n\n\t// GCPGCEInstanceHostnameKey is the attribute Key conforming to the\n\t// \"gcp.gce.instance.hostname\" semantic conventions. It represents the hostname\n\t// of a GCE instance. This is the full value of the default or [custom hostname]\n\t// .\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-host1234.example.com\",\n\t// \"sample-vm.us-west1-b.c.my-project.internal\"\n\t//\n\t// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm\n\tGCPGCEInstanceHostnameKey = attribute.Key(\"gcp.gce.instance.hostname\")\n\n\t// GCPGCEInstanceNameKey is the attribute Key conforming to the\n\t// \"gcp.gce.instance.name\" semantic conventions. It represents the instance name\n\t// of a GCE instance. This is the value provided by `host.name`, the visible\n\t// name of the instance in the Cloud Console UI, and the prefix for the default\n\t// hostname of the instance as defined by the [default internal DNS name].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"instance-1\", \"my-vm-name\"\n\t//\n\t// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names\n\tGCPGCEInstanceNameKey = attribute.Key(\"gcp.gce.instance.name\")\n)\n\n// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.container\" semantic conventions. It represents the\n// container within GCP where the AppHub application is defined.\nfunc GCPAppHubApplicationContainer(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationContainerKey.String(val)\n}\n\n// GCPAppHubApplicationID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.id\" semantic conventions. It represents the name of\n// the application as configured in AppHub.\nfunc GCPAppHubApplicationID(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationIDKey.String(val)\n}\n\n// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the\n// \"gcp.apphub.application.location\" semantic conventions. It represents the GCP\n// zone or region where the application is defined.\nfunc GCPAppHubApplicationLocation(val string) attribute.KeyValue {\n\treturn GCPAppHubApplicationLocationKey.String(val)\n}\n\n// GCPAppHubServiceID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.service.id\" semantic conventions. It represents the name of the\n// service as configured in AppHub.\nfunc GCPAppHubServiceID(val string) attribute.KeyValue {\n\treturn GCPAppHubServiceIDKey.String(val)\n}\n\n// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the\n// \"gcp.apphub.workload.id\" semantic conventions. It represents the name of the\n// workload as configured in AppHub.\nfunc GCPAppHubWorkloadID(val string) attribute.KeyValue {\n\treturn GCPAppHubWorkloadIDKey.String(val)\n}\n\n// GCPAppHubDestinationApplicationContainer returns an attribute KeyValue\n// conforming to the \"gcp.apphub_destination.application.container\" semantic\n// conventions. It represents the container within GCP where the AppHub\n// destination application is defined.\nfunc GCPAppHubDestinationApplicationContainer(val string) attribute.KeyValue {\n\treturn GCPAppHubDestinationApplicationContainerKey.String(val)\n}\n\n// GCPAppHubDestinationApplicationID returns an attribute KeyValue conforming to\n// the \"gcp.apphub_destination.application.id\" semantic conventions. It\n// represents the name of the destination application as configured in AppHub.\nfunc GCPAppHubDestinationApplicationID(val string) attribute.KeyValue {\n\treturn GCPAppHubDestinationApplicationIDKey.String(val)\n}\n\n// GCPAppHubDestinationApplicationLocation returns an attribute KeyValue\n// conforming to the \"gcp.apphub_destination.application.location\" semantic\n// conventions. It represents the GCP zone or region where the destination\n// application is defined.\nfunc GCPAppHubDestinationApplicationLocation(val string) attribute.KeyValue {\n\treturn GCPAppHubDestinationApplicationLocationKey.String(val)\n}\n\n// GCPAppHubDestinationServiceID returns an attribute KeyValue conforming to the\n// \"gcp.apphub_destination.service.id\" semantic conventions. It represents the\n// name of the destination service as configured in AppHub.\nfunc GCPAppHubDestinationServiceID(val string) attribute.KeyValue {\n\treturn GCPAppHubDestinationServiceIDKey.String(val)\n}\n\n// GCPAppHubDestinationWorkloadID returns an attribute KeyValue conforming to the\n// \"gcp.apphub_destination.workload.id\" semantic conventions. It represents the\n// name of the destination workload as configured in AppHub.\nfunc GCPAppHubDestinationWorkloadID(val string) attribute.KeyValue {\n\treturn GCPAppHubDestinationWorkloadIDKey.String(val)\n}\n\n// GCPClientService returns an attribute KeyValue conforming to the\n// \"gcp.client.service\" semantic conventions. It represents the identifies the\n// Google Cloud service for which the official client library is intended.\nfunc GCPClientService(val string) attribute.KeyValue {\n\treturn GCPClientServiceKey.String(val)\n}\n\n// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the\n// \"gcp.cloud_run.job.execution\" semantic conventions. It represents the name of\n// the Cloud Run [execution] being run for the Job, as set by the\n// [`CLOUD_RUN_EXECUTION`] environment variable.\n//\n// [execution]: https://cloud.google.com/run/docs/managing/job-executions\n// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\nfunc GCPCloudRunJobExecution(val string) attribute.KeyValue {\n\treturn GCPCloudRunJobExecutionKey.String(val)\n}\n\n// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the\n// \"gcp.cloud_run.job.task_index\" semantic conventions. It represents the index\n// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]\n// environment variable.\n//\n// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars\nfunc GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {\n\treturn GCPCloudRunJobTaskIndexKey.Int(val)\n}\n\n// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the\n// \"gcp.gce.instance.hostname\" semantic conventions. It represents the hostname\n// of a GCE instance. This is the full value of the default or [custom hostname]\n// .\n//\n// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm\nfunc GCPGCEInstanceHostname(val string) attribute.KeyValue {\n\treturn GCPGCEInstanceHostnameKey.String(val)\n}\n\n// GCPGCEInstanceName returns an attribute KeyValue conforming to the\n// \"gcp.gce.instance.name\" semantic conventions. It represents the instance name\n// of a GCE instance. This is the value provided by `host.name`, the visible name\n// of the instance in the Cloud Console UI, and the prefix for the default\n// hostname of the instance as defined by the [default internal DNS name].\n//\n// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names\nfunc GCPGCEInstanceName(val string) attribute.KeyValue {\n\treturn GCPGCEInstanceNameKey.String(val)\n}\n\n// Enum values for gcp.apphub.service.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub.service.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Enum values for gcp.apphub.workload.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub.workload.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Enum values for gcp.apphub_destination.service.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubDestinationServiceCriticalityTypeMissionCritical = GCPAppHubDestinationServiceCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubDestinationServiceCriticalityTypeHigh = GCPAppHubDestinationServiceCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubDestinationServiceCriticalityTypeMedium = GCPAppHubDestinationServiceCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubDestinationServiceCriticalityTypeLow = GCPAppHubDestinationServiceCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub_destination.service.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubDestinationServiceEnvironmentTypeProduction = GCPAppHubDestinationServiceEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubDestinationServiceEnvironmentTypeStaging = GCPAppHubDestinationServiceEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubDestinationServiceEnvironmentTypeTest = GCPAppHubDestinationServiceEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubDestinationServiceEnvironmentTypeDevelopment = GCPAppHubDestinationServiceEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Enum values for gcp.apphub_destination.workload.criticality_type\nvar (\n\t// Mission critical service.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadCriticalityTypeMissionCritical = GCPAppHubDestinationWorkloadCriticalityTypeKey.String(\"MISSION_CRITICAL\")\n\t// High impact.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadCriticalityTypeHigh = GCPAppHubDestinationWorkloadCriticalityTypeKey.String(\"HIGH\")\n\t// Medium impact.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadCriticalityTypeMedium = GCPAppHubDestinationWorkloadCriticalityTypeKey.String(\"MEDIUM\")\n\t// Low impact.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadCriticalityTypeLow = GCPAppHubDestinationWorkloadCriticalityTypeKey.String(\"LOW\")\n)\n\n// Enum values for gcp.apphub_destination.workload.environment_type\nvar (\n\t// Production environment.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadEnvironmentTypeProduction = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String(\"PRODUCTION\")\n\t// Staging environment.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadEnvironmentTypeStaging = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String(\"STAGING\")\n\t// Test environment.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadEnvironmentTypeTest = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String(\"TEST\")\n\t// Development environment.\n\t// Stability: development\n\tGCPAppHubDestinationWorkloadEnvironmentTypeDevelopment = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String(\"DEVELOPMENT\")\n)\n\n// Namespace: gen_ai\nconst (\n\t// GenAIAgentDescriptionKey is the attribute Key conforming to the\n\t// \"gen_ai.agent.description\" semantic conventions. It represents the free-form\n\t// description of the GenAI agent provided by the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Helps with math problems\", \"Generates fiction stories\"\n\tGenAIAgentDescriptionKey = attribute.Key(\"gen_ai.agent.description\")\n\n\t// GenAIAgentIDKey is the attribute Key conforming to the \"gen_ai.agent.id\"\n\t// semantic conventions. It represents the unique identifier of the GenAI agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"asst_5j66UpCpwteGg4YSxUnt7lPY\"\n\tGenAIAgentIDKey = attribute.Key(\"gen_ai.agent.id\")\n\n\t// GenAIAgentNameKey is the attribute Key conforming to the \"gen_ai.agent.name\"\n\t// semantic conventions. It represents the human-readable name of the GenAI\n\t// agent provided by the application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Math Tutor\", \"Fiction Writer\"\n\tGenAIAgentNameKey = attribute.Key(\"gen_ai.agent.name\")\n\n\t// GenAIConversationIDKey is the attribute Key conforming to the\n\t// \"gen_ai.conversation.id\" semantic conventions. It represents the unique\n\t// identifier for a conversation (session, thread), used to store and correlate\n\t// messages within this conversation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"conv_5j66UpCpwteGg4YSxUnt7lPY\"\n\tGenAIConversationIDKey = attribute.Key(\"gen_ai.conversation.id\")\n\n\t// GenAIDataSourceIDKey is the attribute Key conforming to the\n\t// \"gen_ai.data_source.id\" semantic conventions. It represents the data source\n\t// identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"H7STPQYOND\"\n\t// Note: Data sources are used by AI agents and RAG applications to store\n\t// grounding data. A data source may be an external database, object store,\n\t// document collection, website, or any other storage system used by the GenAI\n\t// agent or application. The `gen_ai.data_source.id` SHOULD match the identifier\n\t// used by the GenAI system rather than a name specific to the external storage,\n\t// such as a database or object store. Semantic conventions referencing\n\t// `gen_ai.data_source.id` MAY also leverage additional attributes, such as\n\t// `db.*`, to further identify and describe the data source.\n\tGenAIDataSourceIDKey = attribute.Key(\"gen_ai.data_source.id\")\n\n\t// GenAIEmbeddingsDimensionCountKey is the attribute Key conforming to the\n\t// \"gen_ai.embeddings.dimension.count\" semantic conventions. It represents the\n\t// number of dimensions the resulting output embeddings should have.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 512, 1024\n\tGenAIEmbeddingsDimensionCountKey = attribute.Key(\"gen_ai.embeddings.dimension.count\")\n\n\t// GenAIEvaluationExplanationKey is the attribute Key conforming to the\n\t// \"gen_ai.evaluation.explanation\" semantic conventions. It represents a\n\t// free-form explanation for the assigned score provided by the evaluator.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"The response is factually accurate but lacks sufficient detail to\n\t// fully address the question.\"\n\tGenAIEvaluationExplanationKey = attribute.Key(\"gen_ai.evaluation.explanation\")\n\n\t// GenAIEvaluationNameKey is the attribute Key conforming to the\n\t// \"gen_ai.evaluation.name\" semantic conventions. It represents the name of the\n\t// evaluation metric used for the GenAI response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Relevance\", \"IntentResolution\"\n\tGenAIEvaluationNameKey = attribute.Key(\"gen_ai.evaluation.name\")\n\n\t// GenAIEvaluationScoreLabelKey is the attribute Key conforming to the\n\t// \"gen_ai.evaluation.score.label\" semantic conventions. It represents the human\n\t// readable label for evaluation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"relevant\", \"not_relevant\", \"correct\", \"incorrect\", \"pass\", \"fail\"\n\t// Note: This attribute provides a human-readable interpretation of the\n\t// evaluation score produced by an evaluator. For example, a score value of 1\n\t// could mean \"relevant\" in one evaluation system and \"not relevant\" in another,\n\t// depending on the scoring range and evaluator. The label SHOULD have low\n\t// cardinality. Possible values depend on the evaluation metric and evaluator\n\t// used; implementations SHOULD document the possible values.\n\tGenAIEvaluationScoreLabelKey = attribute.Key(\"gen_ai.evaluation.score.label\")\n\n\t// GenAIEvaluationScoreValueKey is the attribute Key conforming to the\n\t// \"gen_ai.evaluation.score.value\" semantic conventions. It represents the\n\t// evaluation score returned by the evaluator.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 4.0\n\tGenAIEvaluationScoreValueKey = attribute.Key(\"gen_ai.evaluation.score.value\")\n\n\t// GenAIInputMessagesKey is the attribute Key conforming to the\n\t// \"gen_ai.input.messages\" semantic conventions. It represents the chat history\n\t// provided to the model as an input.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"role\": \"user\",\\n \"parts\": [\\n {\\n \"type\": \"text\",\\n\n\t// \"content\": \"Weather in Paris?\"\\n }\\n ]\\n },\\n {\\n \"role\": \"assistant\",\\n\n\t// \"parts\": [\\n {\\n \"type\": \"tool_call\",\\n \"id\":\n\t// \"call_VSPygqKTWdrhaFErNvMV18Yl\",\\n \"name\": \"get_weather\",\\n \"arguments\": {\\n\n\t// \"location\": \"Paris\"\\n }\\n }\\n ]\\n },\\n {\\n \"role\": \"tool\",\\n \"parts\": [\\n {\\n\n\t// \"type\": \"tool_call_response\",\\n \"id\": \" call_VSPygqKTWdrhaFErNvMV18Yl\",\\n\n\t// \"result\": \"rainy, 57°F\"\\n }\\n ]\\n }\\n]\\n\"\n\t// Note: Instrumentations MUST follow [Input messages JSON schema].\n\t// When the attribute is recorded on events, it MUST be recorded in structured\n\t// form. When recorded on spans, it MAY be recorded as a JSON string if\n\t// structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Messages MUST be provided in the order they were sent to the model.\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// input messages.\n\t//\n\t// > [!Warning]\n\t// > This attribute is likely to contain sensitive information including\n\t// > user/PII data.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [Input messages JSON schema]: /docs/gen-ai/gen-ai-input-messages.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAIInputMessagesKey = attribute.Key(\"gen_ai.input.messages\")\n\n\t// GenAIOperationNameKey is the attribute Key conforming to the\n\t// \"gen_ai.operation.name\" semantic conventions. It represents the name of the\n\t// operation being performed.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: If one of the predefined values applies, but specific system uses a\n\t// different name it's RECOMMENDED to document it in the semantic conventions\n\t// for specific GenAI system and use system-specific name in the\n\t// instrumentation. If a different name is not documented, instrumentation\n\t// libraries SHOULD use applicable predefined value.\n\tGenAIOperationNameKey = attribute.Key(\"gen_ai.operation.name\")\n\n\t// GenAIOutputMessagesKey is the attribute Key conforming to the\n\t// \"gen_ai.output.messages\" semantic conventions. It represents the messages\n\t// returned by the model where each message represents a specific model response\n\t// (choice, candidate).\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"role\": \"assistant\",\\n \"parts\": [\\n {\\n \"type\": \"text\",\\n\n\t// \"content\": \"The weather in Paris is currently rainy with a temperature of\n\t// 57°F.\"\\n }\\n ],\\n \"finish_reason\": \"stop\"\\n }\\n]\\n\"\n\t// Note: Instrumentations MUST follow [Output messages JSON schema]\n\t//\n\t// Each message represents a single output choice/candidate generated by\n\t// the model. Each message corresponds to exactly one generation\n\t// (choice/candidate) and vice versa - one choice cannot be split across\n\t// multiple messages or one message cannot contain parts from multiple choices.\n\t//\n\t// When the attribute is recorded on events, it MUST be recorded in structured\n\t// form. When recorded on spans, it MAY be recorded as a JSON string if\n\t// structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// output messages.\n\t//\n\t// > [!Warning]\n\t// > This attribute is likely to contain sensitive information including\n\t// > user/PII data.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [Output messages JSON schema]: /docs/gen-ai/gen-ai-output-messages.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAIOutputMessagesKey = attribute.Key(\"gen_ai.output.messages\")\n\n\t// GenAIOutputTypeKey is the attribute Key conforming to the\n\t// \"gen_ai.output.type\" semantic conventions. It represents the represents the\n\t// content type requested by the client.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This attribute SHOULD be used when the client requests output of a\n\t// specific type. The model may return zero or more outputs of this type.\n\t// This attribute specifies the output modality and not the actual output\n\t// format. For example, if an image is requested, the actual output could be a\n\t// URL pointing to an image file.\n\t// Additional output format details may be recorded in the future in the\n\t// `gen_ai.output.{type}.*` attributes.\n\tGenAIOutputTypeKey = attribute.Key(\"gen_ai.output.type\")\n\n\t// GenAIPromptNameKey is the attribute Key conforming to the\n\t// \"gen_ai.prompt.name\" semantic conventions. It represents the name of the\n\t// prompt that uniquely identifies it.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"analyze-code\"\n\tGenAIPromptNameKey = attribute.Key(\"gen_ai.prompt.name\")\n\n\t// GenAIProviderNameKey is the attribute Key conforming to the\n\t// \"gen_ai.provider.name\" semantic conventions. It represents the Generative AI\n\t// provider as identified by the client or server instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The attribute SHOULD be set based on the instrumentation's best\n\t// knowledge and may differ from the actual model provider.\n\t//\n\t// Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms\n\t// are accessible using the OpenAI REST API and corresponding client libraries,\n\t// but may proxy or host models from different providers.\n\t//\n\t// The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`\n\t// attributes may help identify the actual system in use.\n\t//\n\t// The `gen_ai.provider.name` attribute acts as a discriminator that\n\t// identifies the GenAI telemetry format flavor specific to that provider\n\t// within GenAI semantic conventions.\n\t// It SHOULD be set consistently with provider-specific attributes and signals.\n\t// For example, GenAI spans, metrics, and events related to AWS Bedrock\n\t// should have the `gen_ai.provider.name` set to `aws.bedrock` and include\n\t// applicable `aws.bedrock.*` attributes and are not expected to include\n\t// `openai.*` attributes.\n\tGenAIProviderNameKey = attribute.Key(\"gen_ai.provider.name\")\n\n\t// GenAIRequestChoiceCountKey is the attribute Key conforming to the\n\t// \"gen_ai.request.choice.count\" semantic conventions. It represents the target\n\t// number of candidate completions to return.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3\n\tGenAIRequestChoiceCountKey = attribute.Key(\"gen_ai.request.choice.count\")\n\n\t// GenAIRequestEncodingFormatsKey is the attribute Key conforming to the\n\t// \"gen_ai.request.encoding_formats\" semantic conventions. It represents the\n\t// encoding formats requested in an embeddings operation, if specified.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"base64\"], [\"float\", \"binary\"\n\t// Note: In some GenAI systems the encoding formats are called embedding types.\n\t// Also, some GenAI systems only accept a single format per request.\n\tGenAIRequestEncodingFormatsKey = attribute.Key(\"gen_ai.request.encoding_formats\")\n\n\t// GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the\n\t// \"gen_ai.request.frequency_penalty\" semantic conventions. It represents the\n\t// frequency penalty setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.1\n\tGenAIRequestFrequencyPenaltyKey = attribute.Key(\"gen_ai.request.frequency_penalty\")\n\n\t// GenAIRequestMaxTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.request.max_tokens\" semantic conventions. It represents the maximum\n\t// number of tokens the model generates for a request.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIRequestMaxTokensKey = attribute.Key(\"gen_ai.request.max_tokens\")\n\n\t// GenAIRequestModelKey is the attribute Key conforming to the\n\t// \"gen_ai.request.model\" semantic conventions. It represents the name of the\n\t// GenAI model a request is being made to.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: gpt-4\n\tGenAIRequestModelKey = attribute.Key(\"gen_ai.request.model\")\n\n\t// GenAIRequestPresencePenaltyKey is the attribute Key conforming to the\n\t// \"gen_ai.request.presence_penalty\" semantic conventions. It represents the\n\t// presence penalty setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.1\n\tGenAIRequestPresencePenaltyKey = attribute.Key(\"gen_ai.request.presence_penalty\")\n\n\t// GenAIRequestSeedKey is the attribute Key conforming to the\n\t// \"gen_ai.request.seed\" semantic conventions. It represents the requests with\n\t// same seed value more likely to return same result.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIRequestSeedKey = attribute.Key(\"gen_ai.request.seed\")\n\n\t// GenAIRequestStopSequencesKey is the attribute Key conforming to the\n\t// \"gen_ai.request.stop_sequences\" semantic conventions. It represents the list\n\t// of sequences that the model will use to stop generating further tokens.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"forest\", \"lived\"\n\tGenAIRequestStopSequencesKey = attribute.Key(\"gen_ai.request.stop_sequences\")\n\n\t// GenAIRequestTemperatureKey is the attribute Key conforming to the\n\t// \"gen_ai.request.temperature\" semantic conventions. It represents the\n\t// temperature setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0.0\n\tGenAIRequestTemperatureKey = attribute.Key(\"gen_ai.request.temperature\")\n\n\t// GenAIRequestTopKKey is the attribute Key conforming to the\n\t// \"gen_ai.request.top_k\" semantic conventions. It represents the top_k sampling\n\t// setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\tGenAIRequestTopKKey = attribute.Key(\"gen_ai.request.top_k\")\n\n\t// GenAIRequestTopPKey is the attribute Key conforming to the\n\t// \"gen_ai.request.top_p\" semantic conventions. It represents the top_p sampling\n\t// setting for the GenAI request.\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1.0\n\tGenAIRequestTopPKey = attribute.Key(\"gen_ai.request.top_p\")\n\n\t// GenAIResponseFinishReasonsKey is the attribute Key conforming to the\n\t// \"gen_ai.response.finish_reasons\" semantic conventions. It represents the\n\t// array of reasons the model stopped generating tokens, corresponding to each\n\t// generation received.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"stop\"], [\"stop\", \"length\"\n\tGenAIResponseFinishReasonsKey = attribute.Key(\"gen_ai.response.finish_reasons\")\n\n\t// GenAIResponseIDKey is the attribute Key conforming to the\n\t// \"gen_ai.response.id\" semantic conventions. It represents the unique\n\t// identifier for the completion.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"chatcmpl-123\"\n\tGenAIResponseIDKey = attribute.Key(\"gen_ai.response.id\")\n\n\t// GenAIResponseModelKey is the attribute Key conforming to the\n\t// \"gen_ai.response.model\" semantic conventions. It represents the name of the\n\t// model that generated the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"gpt-4-0613\"\n\tGenAIResponseModelKey = attribute.Key(\"gen_ai.response.model\")\n\n\t// GenAISystemInstructionsKey is the attribute Key conforming to the\n\t// \"gen_ai.system_instructions\" semantic conventions. It represents the system\n\t// message or instructions provided to the GenAI model separately from the chat\n\t// history.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"type\": \"text\",\\n \"content\": \"You are an Agent that greet\n\t// users, always use greetings tool to respond\"\\n }\\n]\\n\", \"[\\n {\\n \"type\":\n\t// \"text\",\\n \"content\": \"You are a language translator.\"\\n },\\n {\\n \"type\":\n\t// \"text\",\\n \"content\": \"Your mission is to translate text in English to\n\t// French.\"\\n }\\n]\\n\"\n\t// Note: This attribute SHOULD be used when the corresponding provider or API\n\t// allows to provide system instructions or messages separately from the\n\t// chat history.\n\t//\n\t// Instructions that are part of the chat history SHOULD be recorded in\n\t// `gen_ai.input.messages` attribute instead.\n\t//\n\t// Instrumentations MUST follow [System instructions JSON schema].\n\t//\n\t// When recorded on spans, it MAY be recorded as a JSON string if structured\n\t// format is not supported and SHOULD be recorded in structured form otherwise.\n\t//\n\t// Instrumentations MAY provide a way for users to filter or truncate\n\t// system instructions.\n\t//\n\t// > [!Warning]\n\t// > This attribute may contain sensitive information.\n\t//\n\t// See [Recording content on attributes]\n\t// section for more details.\n\t//\n\t// [System instructions JSON schema]: /docs/gen-ai/gen-ai-system-instructions.json\n\t// [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes\n\tGenAISystemInstructionsKey = attribute.Key(\"gen_ai.system_instructions\")\n\n\t// GenAITokenTypeKey is the attribute Key conforming to the \"gen_ai.token.type\"\n\t// semantic conventions. It represents the type of token being counted.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"input\", \"output\"\n\tGenAITokenTypeKey = attribute.Key(\"gen_ai.token.type\")\n\n\t// GenAIToolCallArgumentsKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.call.arguments\" semantic conventions. It represents the\n\t// parameters passed to the tool call.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{\\n \"location\": \"San Francisco?\",\\n \"date\": \"2025-10-01\"\\n}\\n\"\n\t// Note: > [!WARNING]\n\t//\n\t// > This attribute may contain sensitive information.\n\t//\n\t// It's expected to be an object - in case a serialized string is available\n\t// to the instrumentation, the instrumentation SHOULD do the best effort to\n\t// deserialize it to an object. When recorded on spans, it MAY be recorded as a\n\t// JSON string if structured format is not supported and SHOULD be recorded in\n\t// structured form otherwise.\n\tGenAIToolCallArgumentsKey = attribute.Key(\"gen_ai.tool.call.arguments\")\n\n\t// GenAIToolCallIDKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.call.id\" semantic conventions. It represents the tool call\n\t// identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"call_mszuSIzqtI65i1wAUOE8w5H4\"\n\tGenAIToolCallIDKey = attribute.Key(\"gen_ai.tool.call.id\")\n\n\t// GenAIToolCallResultKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.call.result\" semantic conventions. It represents the result\n\t// returned by the tool call (if any and if execution was successful).\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"{\\n \"temperature_range\": {\\n \"high\": 75,\\n \"low\": 60\\n },\\n\n\t// \"conditions\": \"sunny\"\\n}\\n\"\n\t// Note: > [!WARNING]\n\t//\n\t// > This attribute may contain sensitive information.\n\t//\n\t// It's expected to be an object - in case a serialized string is available\n\t// to the instrumentation, the instrumentation SHOULD do the best effort to\n\t// deserialize it to an object. When recorded on spans, it MAY be recorded as a\n\t// JSON string if structured format is not supported and SHOULD be recorded in\n\t// structured form otherwise.\n\tGenAIToolCallResultKey = attribute.Key(\"gen_ai.tool.call.result\")\n\n\t// GenAIToolDefinitionsKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.definitions\" semantic conventions. It represents the list of\n\t// source system tool definitions available to the GenAI agent or model.\n\t//\n\t// Type: any\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"[\\n {\\n \"type\": \"function\",\\n \"name\": \"get_current_weather\",\\n\n\t// \"description\": \"Get the current weather in a given location\",\\n \"parameters\":\n\t// {\\n \"type\": \"object\",\\n \"properties\": {\\n \"location\": {\\n \"type\": \"string\",\\n\n\t// \"description\": \"The city and state, e.g. San Francisco, CA\"\\n },\\n \"unit\":\n\t// {\\n \"type\": \"string\",\\n \"enum\": [\\n \"celsius\",\\n \"fahrenheit\"\\n ]\\n }\\n },\\n\n\t// \"required\": [\\n \"location\",\\n \"unit\"\\n ]\\n }\\n }\\n]\\n\"\n\t// Note: The value of this attribute matches source system tool definition\n\t// format.\n\t//\n\t// It's expected to be an array of objects where each object represents a tool\n\t// definition. In case a serialized string is available\n\t// to the instrumentation, the instrumentation SHOULD do the best effort to\n\t// deserialize it to an array. When recorded on spans, it MAY be recorded as a\n\t// JSON string if structured format is not supported and SHOULD be recorded in\n\t// structured form otherwise.\n\t//\n\t// Since this attribute could be large, it's NOT RECOMMENDED to populate\n\t// it by default. Instrumentations MAY provide a way to enable\n\t// populating this attribute.\n\tGenAIToolDefinitionsKey = attribute.Key(\"gen_ai.tool.definitions\")\n\n\t// GenAIToolDescriptionKey is the attribute Key conforming to the\n\t// \"gen_ai.tool.description\" semantic conventions. It represents the tool\n\t// description.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Multiply two numbers\"\n\tGenAIToolDescriptionKey = attribute.Key(\"gen_ai.tool.description\")\n\n\t// GenAIToolNameKey is the attribute Key conforming to the \"gen_ai.tool.name\"\n\t// semantic conventions. It represents the name of the tool utilized by the\n\t// agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Flights\"\n\tGenAIToolNameKey = attribute.Key(\"gen_ai.tool.name\")\n\n\t// GenAIToolTypeKey is the attribute Key conforming to the \"gen_ai.tool.type\"\n\t// semantic conventions. It represents the type of the tool utilized by the\n\t// agent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"function\", \"extension\", \"datastore\"\n\t// Note: Extension: A tool executed on the agent-side to directly call external\n\t// APIs, bridging the gap between the agent and real-world systems.\n\t// Agent-side operations involve actions that are performed by the agent on the\n\t// server or within the agent's controlled environment.\n\t// Function: A tool executed on the client-side, where the agent generates\n\t// parameters for a predefined function, and the client executes the logic.\n\t// Client-side operations are actions taken on the user's end or within the\n\t// client application.\n\t// Datastore: A tool used by the agent to access and query structured or\n\t// unstructured external data for retrieval-augmented tasks or knowledge\n\t// updates.\n\tGenAIToolTypeKey = attribute.Key(\"gen_ai.tool.type\")\n\n\t// GenAIUsageInputTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.usage.input_tokens\" semantic conventions. It represents the number of\n\t// tokens used in the GenAI input (prompt).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 100\n\tGenAIUsageInputTokensKey = attribute.Key(\"gen_ai.usage.input_tokens\")\n\n\t// GenAIUsageOutputTokensKey is the attribute Key conforming to the\n\t// \"gen_ai.usage.output_tokens\" semantic conventions. It represents the number\n\t// of tokens used in the GenAI response (completion).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 180\n\tGenAIUsageOutputTokensKey = attribute.Key(\"gen_ai.usage.output_tokens\")\n)\n\n// GenAIAgentDescription returns an attribute KeyValue conforming to the\n// \"gen_ai.agent.description\" semantic conventions. It represents the free-form\n// description of the GenAI agent provided by the application.\nfunc GenAIAgentDescription(val string) attribute.KeyValue {\n\treturn GenAIAgentDescriptionKey.String(val)\n}\n\n// GenAIAgentID returns an attribute KeyValue conforming to the \"gen_ai.agent.id\"\n// semantic conventions. It represents the unique identifier of the GenAI agent.\nfunc GenAIAgentID(val string) attribute.KeyValue {\n\treturn GenAIAgentIDKey.String(val)\n}\n\n// GenAIAgentName returns an attribute KeyValue conforming to the\n// \"gen_ai.agent.name\" semantic conventions. It represents the human-readable\n// name of the GenAI agent provided by the application.\nfunc GenAIAgentName(val string) attribute.KeyValue {\n\treturn GenAIAgentNameKey.String(val)\n}\n\n// GenAIConversationID returns an attribute KeyValue conforming to the\n// \"gen_ai.conversation.id\" semantic conventions. It represents the unique\n// identifier for a conversation (session, thread), used to store and correlate\n// messages within this conversation.\nfunc GenAIConversationID(val string) attribute.KeyValue {\n\treturn GenAIConversationIDKey.String(val)\n}\n\n// GenAIDataSourceID returns an attribute KeyValue conforming to the\n// \"gen_ai.data_source.id\" semantic conventions. It represents the data source\n// identifier.\nfunc GenAIDataSourceID(val string) attribute.KeyValue {\n\treturn GenAIDataSourceIDKey.String(val)\n}\n\n// GenAIEmbeddingsDimensionCount returns an attribute KeyValue conforming to the\n// \"gen_ai.embeddings.dimension.count\" semantic conventions. It represents the\n// number of dimensions the resulting output embeddings should have.\nfunc GenAIEmbeddingsDimensionCount(val int) attribute.KeyValue {\n\treturn GenAIEmbeddingsDimensionCountKey.Int(val)\n}\n\n// GenAIEvaluationExplanation returns an attribute KeyValue conforming to the\n// \"gen_ai.evaluation.explanation\" semantic conventions. It represents a\n// free-form explanation for the assigned score provided by the evaluator.\nfunc GenAIEvaluationExplanation(val string) attribute.KeyValue {\n\treturn GenAIEvaluationExplanationKey.String(val)\n}\n\n// GenAIEvaluationName returns an attribute KeyValue conforming to the\n// \"gen_ai.evaluation.name\" semantic conventions. It represents the name of the\n// evaluation metric used for the GenAI response.\nfunc GenAIEvaluationName(val string) attribute.KeyValue {\n\treturn GenAIEvaluationNameKey.String(val)\n}\n\n// GenAIEvaluationScoreLabel returns an attribute KeyValue conforming to the\n// \"gen_ai.evaluation.score.label\" semantic conventions. It represents the human\n// readable label for evaluation.\nfunc GenAIEvaluationScoreLabel(val string) attribute.KeyValue {\n\treturn GenAIEvaluationScoreLabelKey.String(val)\n}\n\n// GenAIEvaluationScoreValue returns an attribute KeyValue conforming to the\n// \"gen_ai.evaluation.score.value\" semantic conventions. It represents the\n// evaluation score returned by the evaluator.\nfunc GenAIEvaluationScoreValue(val float64) attribute.KeyValue {\n\treturn GenAIEvaluationScoreValueKey.Float64(val)\n}\n\n// GenAIPromptName returns an attribute KeyValue conforming to the\n// \"gen_ai.prompt.name\" semantic conventions. It represents the name of the\n// prompt that uniquely identifies it.\nfunc GenAIPromptName(val string) attribute.KeyValue {\n\treturn GenAIPromptNameKey.String(val)\n}\n\n// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the\n// \"gen_ai.request.choice.count\" semantic conventions. It represents the target\n// number of candidate completions to return.\nfunc GenAIRequestChoiceCount(val int) attribute.KeyValue {\n\treturn GenAIRequestChoiceCountKey.Int(val)\n}\n\n// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the\n// \"gen_ai.request.encoding_formats\" semantic conventions. It represents the\n// encoding formats requested in an embeddings operation, if specified.\nfunc GenAIRequestEncodingFormats(val ...string) attribute.KeyValue {\n\treturn GenAIRequestEncodingFormatsKey.StringSlice(val)\n}\n\n// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the\n// \"gen_ai.request.frequency_penalty\" semantic conventions. It represents the\n// frequency penalty setting for the GenAI request.\nfunc GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue {\n\treturn GenAIRequestFrequencyPenaltyKey.Float64(val)\n}\n\n// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.request.max_tokens\" semantic conventions. It represents the maximum\n// number of tokens the model generates for a request.\nfunc GenAIRequestMaxTokens(val int) attribute.KeyValue {\n\treturn GenAIRequestMaxTokensKey.Int(val)\n}\n\n// GenAIRequestModel returns an attribute KeyValue conforming to the\n// \"gen_ai.request.model\" semantic conventions. It represents the name of the\n// GenAI model a request is being made to.\nfunc GenAIRequestModel(val string) attribute.KeyValue {\n\treturn GenAIRequestModelKey.String(val)\n}\n\n// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the\n// \"gen_ai.request.presence_penalty\" semantic conventions. It represents the\n// presence penalty setting for the GenAI request.\nfunc GenAIRequestPresencePenalty(val float64) attribute.KeyValue {\n\treturn GenAIRequestPresencePenaltyKey.Float64(val)\n}\n\n// GenAIRequestSeed returns an attribute KeyValue conforming to the\n// \"gen_ai.request.seed\" semantic conventions. It represents the requests with\n// same seed value more likely to return same result.\nfunc GenAIRequestSeed(val int) attribute.KeyValue {\n\treturn GenAIRequestSeedKey.Int(val)\n}\n\n// GenAIRequestStopSequences returns an attribute KeyValue conforming to the\n// \"gen_ai.request.stop_sequences\" semantic conventions. It represents the list\n// of sequences that the model will use to stop generating further tokens.\nfunc GenAIRequestStopSequences(val ...string) attribute.KeyValue {\n\treturn GenAIRequestStopSequencesKey.StringSlice(val)\n}\n\n// GenAIRequestTemperature returns an attribute KeyValue conforming to the\n// \"gen_ai.request.temperature\" semantic conventions. It represents the\n// temperature setting for the GenAI request.\nfunc GenAIRequestTemperature(val float64) attribute.KeyValue {\n\treturn GenAIRequestTemperatureKey.Float64(val)\n}\n\n// GenAIRequestTopK returns an attribute KeyValue conforming to the\n// \"gen_ai.request.top_k\" semantic conventions. It represents the top_k sampling\n// setting for the GenAI request.\nfunc GenAIRequestTopK(val float64) attribute.KeyValue {\n\treturn GenAIRequestTopKKey.Float64(val)\n}\n\n// GenAIRequestTopP returns an attribute KeyValue conforming to the\n// \"gen_ai.request.top_p\" semantic conventions. It represents the top_p sampling\n// setting for the GenAI request.\nfunc GenAIRequestTopP(val float64) attribute.KeyValue {\n\treturn GenAIRequestTopPKey.Float64(val)\n}\n\n// GenAIResponseFinishReasons returns an attribute KeyValue conforming to the\n// \"gen_ai.response.finish_reasons\" semantic conventions. It represents the array\n// of reasons the model stopped generating tokens, corresponding to each\n// generation received.\nfunc GenAIResponseFinishReasons(val ...string) attribute.KeyValue {\n\treturn GenAIResponseFinishReasonsKey.StringSlice(val)\n}\n\n// GenAIResponseID returns an attribute KeyValue conforming to the\n// \"gen_ai.response.id\" semantic conventions. It represents the unique identifier\n// for the completion.\nfunc GenAIResponseID(val string) attribute.KeyValue {\n\treturn GenAIResponseIDKey.String(val)\n}\n\n// GenAIResponseModel returns an attribute KeyValue conforming to the\n// \"gen_ai.response.model\" semantic conventions. It represents the name of the\n// model that generated the response.\nfunc GenAIResponseModel(val string) attribute.KeyValue {\n\treturn GenAIResponseModelKey.String(val)\n}\n\n// GenAIToolCallID returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.call.id\" semantic conventions. It represents the tool call\n// identifier.\nfunc GenAIToolCallID(val string) attribute.KeyValue {\n\treturn GenAIToolCallIDKey.String(val)\n}\n\n// GenAIToolDescription returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.description\" semantic conventions. It represents the tool\n// description.\nfunc GenAIToolDescription(val string) attribute.KeyValue {\n\treturn GenAIToolDescriptionKey.String(val)\n}\n\n// GenAIToolName returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.name\" semantic conventions. It represents the name of the tool\n// utilized by the agent.\nfunc GenAIToolName(val string) attribute.KeyValue {\n\treturn GenAIToolNameKey.String(val)\n}\n\n// GenAIToolType returns an attribute KeyValue conforming to the\n// \"gen_ai.tool.type\" semantic conventions. It represents the type of the tool\n// utilized by the agent.\nfunc GenAIToolType(val string) attribute.KeyValue {\n\treturn GenAIToolTypeKey.String(val)\n}\n\n// GenAIUsageInputTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.usage.input_tokens\" semantic conventions. It represents the number of\n// tokens used in the GenAI input (prompt).\nfunc GenAIUsageInputTokens(val int) attribute.KeyValue {\n\treturn GenAIUsageInputTokensKey.Int(val)\n}\n\n// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the\n// \"gen_ai.usage.output_tokens\" semantic conventions. It represents the number of\n// tokens used in the GenAI response (completion).\nfunc GenAIUsageOutputTokens(val int) attribute.KeyValue {\n\treturn GenAIUsageOutputTokensKey.Int(val)\n}\n\n// Enum values for gen_ai.operation.name\nvar (\n\t// Chat completion operation such as [OpenAI Chat API]\n\t// Stability: development\n\t//\n\t// [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat\n\tGenAIOperationNameChat = GenAIOperationNameKey.String(\"chat\")\n\t// Multimodal content generation operation such as [Gemini Generate Content]\n\t// Stability: development\n\t//\n\t// [Gemini Generate Content]: https://ai.google.dev/api/generate-content\n\tGenAIOperationNameGenerateContent = GenAIOperationNameKey.String(\"generate_content\")\n\t// Text completions operation such as [OpenAI Completions API (Legacy)]\n\t// Stability: development\n\t//\n\t// [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions\n\tGenAIOperationNameTextCompletion = GenAIOperationNameKey.String(\"text_completion\")\n\t// Embeddings operation such as [OpenAI Create embeddings API]\n\t// Stability: development\n\t//\n\t// [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create\n\tGenAIOperationNameEmbeddings = GenAIOperationNameKey.String(\"embeddings\")\n\t// Create GenAI agent\n\t// Stability: development\n\tGenAIOperationNameCreateAgent = GenAIOperationNameKey.String(\"create_agent\")\n\t// Invoke GenAI agent\n\t// Stability: development\n\tGenAIOperationNameInvokeAgent = GenAIOperationNameKey.String(\"invoke_agent\")\n\t// Execute a tool\n\t// Stability: development\n\tGenAIOperationNameExecuteTool = GenAIOperationNameKey.String(\"execute_tool\")\n)\n\n// Enum values for gen_ai.output.type\nvar (\n\t// Plain text\n\t// Stability: development\n\tGenAIOutputTypeText = GenAIOutputTypeKey.String(\"text\")\n\t// JSON object with known or unknown schema\n\t// Stability: development\n\tGenAIOutputTypeJSON = GenAIOutputTypeKey.String(\"json\")\n\t// Image\n\t// Stability: development\n\tGenAIOutputTypeImage = GenAIOutputTypeKey.String(\"image\")\n\t// Speech\n\t// Stability: development\n\tGenAIOutputTypeSpeech = GenAIOutputTypeKey.String(\"speech\")\n)\n\n// Enum values for gen_ai.provider.name\nvar (\n\t// [OpenAI]\n\t// Stability: development\n\t//\n\t// [OpenAI]: https://openai.com/\n\tGenAIProviderNameOpenAI = GenAIProviderNameKey.String(\"openai\")\n\t// Any Google generative AI endpoint\n\t// Stability: development\n\tGenAIProviderNameGCPGenAI = GenAIProviderNameKey.String(\"gcp.gen_ai\")\n\t// [Vertex AI]\n\t// Stability: development\n\t//\n\t// [Vertex AI]: https://cloud.google.com/vertex-ai\n\tGenAIProviderNameGCPVertexAI = GenAIProviderNameKey.String(\"gcp.vertex_ai\")\n\t// [Gemini]\n\t// Stability: development\n\t//\n\t// [Gemini]: https://cloud.google.com/products/gemini\n\tGenAIProviderNameGCPGemini = GenAIProviderNameKey.String(\"gcp.gemini\")\n\t// [Anthropic]\n\t// Stability: development\n\t//\n\t// [Anthropic]: https://www.anthropic.com/\n\tGenAIProviderNameAnthropic = GenAIProviderNameKey.String(\"anthropic\")\n\t// [Cohere]\n\t// Stability: development\n\t//\n\t// [Cohere]: https://cohere.com/\n\tGenAIProviderNameCohere = GenAIProviderNameKey.String(\"cohere\")\n\t// Azure AI Inference\n\t// Stability: development\n\tGenAIProviderNameAzureAIInference = GenAIProviderNameKey.String(\"azure.ai.inference\")\n\t// [Azure OpenAI]\n\t// Stability: development\n\t//\n\t// [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/\n\tGenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String(\"azure.ai.openai\")\n\t// [IBM Watsonx AI]\n\t// Stability: development\n\t//\n\t// [IBM Watsonx AI]: https://www.ibm.com/products/watsonx-ai\n\tGenAIProviderNameIBMWatsonxAI = GenAIProviderNameKey.String(\"ibm.watsonx.ai\")\n\t// [AWS Bedrock]\n\t// Stability: development\n\t//\n\t// [AWS Bedrock]: https://aws.amazon.com/bedrock\n\tGenAIProviderNameAWSBedrock = GenAIProviderNameKey.String(\"aws.bedrock\")\n\t// [Perplexity]\n\t// Stability: development\n\t//\n\t// [Perplexity]: https://www.perplexity.ai/\n\tGenAIProviderNamePerplexity = GenAIProviderNameKey.String(\"perplexity\")\n\t// [xAI]\n\t// Stability: development\n\t//\n\t// [xAI]: https://x.ai/\n\tGenAIProviderNameXAI = GenAIProviderNameKey.String(\"x_ai\")\n\t// [DeepSeek]\n\t// Stability: development\n\t//\n\t// [DeepSeek]: https://www.deepseek.com/\n\tGenAIProviderNameDeepseek = GenAIProviderNameKey.String(\"deepseek\")\n\t// [Groq]\n\t// Stability: development\n\t//\n\t// [Groq]: https://groq.com/\n\tGenAIProviderNameGroq = GenAIProviderNameKey.String(\"groq\")\n\t// [Mistral AI]\n\t// Stability: development\n\t//\n\t// [Mistral AI]: https://mistral.ai/\n\tGenAIProviderNameMistralAI = GenAIProviderNameKey.String(\"mistral_ai\")\n)\n\n// Enum values for gen_ai.token.type\nvar (\n\t// Input tokens (prompt, input, etc.)\n\t// Stability: development\n\tGenAITokenTypeInput = GenAITokenTypeKey.String(\"input\")\n\t// Output tokens (completion, response, etc.)\n\t// Stability: development\n\tGenAITokenTypeOutput = GenAITokenTypeKey.String(\"output\")\n)\n\n// Namespace: geo\nconst (\n\t// GeoContinentCodeKey is the attribute Key conforming to the\n\t// \"geo.continent.code\" semantic conventions. It represents the two-letter code\n\t// representing continent’s name.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tGeoContinentCodeKey = attribute.Key(\"geo.continent.code\")\n\n\t// GeoCountryISOCodeKey is the attribute Key conforming to the\n\t// \"geo.country.iso_code\" semantic conventions. It represents the two-letter ISO\n\t// Country Code ([ISO 3166-1 alpha2]).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CA\"\n\t//\n\t// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes\n\tGeoCountryISOCodeKey = attribute.Key(\"geo.country.iso_code\")\n\n\t// GeoLocalityNameKey is the attribute Key conforming to the \"geo.locality.name\"\n\t// semantic conventions. It represents the locality name. Represents the name of\n\t// a city, town, village, or similar populated place.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Montreal\", \"Berlin\"\n\tGeoLocalityNameKey = attribute.Key(\"geo.locality.name\")\n\n\t// GeoLocationLatKey is the attribute Key conforming to the \"geo.location.lat\"\n\t// semantic conventions. It represents the latitude of the geo location in\n\t// [WGS84].\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 45.505918\n\t//\n\t// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\n\tGeoLocationLatKey = attribute.Key(\"geo.location.lat\")\n\n\t// GeoLocationLonKey is the attribute Key conforming to the \"geo.location.lon\"\n\t// semantic conventions. It represents the longitude of the geo location in\n\t// [WGS84].\n\t//\n\t// Type: double\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: -73.61483\n\t//\n\t// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\n\tGeoLocationLonKey = attribute.Key(\"geo.location.lon\")\n\n\t// GeoPostalCodeKey is the attribute Key conforming to the \"geo.postal_code\"\n\t// semantic conventions. It represents the postal code associated with the\n\t// location. Values appropriate for this field may also be known as a postcode\n\t// or ZIP code and will vary widely from country to country.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"94040\"\n\tGeoPostalCodeKey = attribute.Key(\"geo.postal_code\")\n\n\t// GeoRegionISOCodeKey is the attribute Key conforming to the\n\t// \"geo.region.iso_code\" semantic conventions. It represents the region ISO code\n\t// ([ISO 3166-2]).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CA-QC\"\n\t//\n\t// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2\n\tGeoRegionISOCodeKey = attribute.Key(\"geo.region.iso_code\")\n)\n\n// GeoCountryISOCode returns an attribute KeyValue conforming to the\n// \"geo.country.iso_code\" semantic conventions. It represents the two-letter ISO\n// Country Code ([ISO 3166-1 alpha2]).\n//\n// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes\nfunc GeoCountryISOCode(val string) attribute.KeyValue {\n\treturn GeoCountryISOCodeKey.String(val)\n}\n\n// GeoLocalityName returns an attribute KeyValue conforming to the\n// \"geo.locality.name\" semantic conventions. It represents the locality name.\n// Represents the name of a city, town, village, or similar populated place.\nfunc GeoLocalityName(val string) attribute.KeyValue {\n\treturn GeoLocalityNameKey.String(val)\n}\n\n// GeoLocationLat returns an attribute KeyValue conforming to the\n// \"geo.location.lat\" semantic conventions. It represents the latitude of the geo\n// location in [WGS84].\n//\n// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\nfunc GeoLocationLat(val float64) attribute.KeyValue {\n\treturn GeoLocationLatKey.Float64(val)\n}\n\n// GeoLocationLon returns an attribute KeyValue conforming to the\n// \"geo.location.lon\" semantic conventions. It represents the longitude of the\n// geo location in [WGS84].\n//\n// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84\nfunc GeoLocationLon(val float64) attribute.KeyValue {\n\treturn GeoLocationLonKey.Float64(val)\n}\n\n// GeoPostalCode returns an attribute KeyValue conforming to the\n// \"geo.postal_code\" semantic conventions. It represents the postal code\n// associated with the location. Values appropriate for this field may also be\n// known as a postcode or ZIP code and will vary widely from country to country.\nfunc GeoPostalCode(val string) attribute.KeyValue {\n\treturn GeoPostalCodeKey.String(val)\n}\n\n// GeoRegionISOCode returns an attribute KeyValue conforming to the\n// \"geo.region.iso_code\" semantic conventions. It represents the region ISO code\n// ([ISO 3166-2]).\n//\n// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2\nfunc GeoRegionISOCode(val string) attribute.KeyValue {\n\treturn GeoRegionISOCodeKey.String(val)\n}\n\n// Enum values for geo.continent.code\nvar (\n\t// Africa\n\t// Stability: development\n\tGeoContinentCodeAf = GeoContinentCodeKey.String(\"AF\")\n\t// Antarctica\n\t// Stability: development\n\tGeoContinentCodeAn = GeoContinentCodeKey.String(\"AN\")\n\t// Asia\n\t// Stability: development\n\tGeoContinentCodeAs = GeoContinentCodeKey.String(\"AS\")\n\t// Europe\n\t// Stability: development\n\tGeoContinentCodeEu = GeoContinentCodeKey.String(\"EU\")\n\t// North America\n\t// Stability: development\n\tGeoContinentCodeNa = GeoContinentCodeKey.String(\"NA\")\n\t// Oceania\n\t// Stability: development\n\tGeoContinentCodeOc = GeoContinentCodeKey.String(\"OC\")\n\t// South America\n\t// Stability: development\n\tGeoContinentCodeSa = GeoContinentCodeKey.String(\"SA\")\n)\n\n// Namespace: go\nconst (\n\t// GoMemoryTypeKey is the attribute Key conforming to the \"go.memory.type\"\n\t// semantic conventions. It represents the type of memory.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"other\", \"stack\"\n\tGoMemoryTypeKey = attribute.Key(\"go.memory.type\")\n)\n\n// Enum values for go.memory.type\nvar (\n\t// Memory allocated from the heap that is reserved for stack space, whether or\n\t// not it is currently in-use.\n\t// Stability: development\n\tGoMemoryTypeStack = GoMemoryTypeKey.String(\"stack\")\n\t// Memory used by the Go runtime, excluding other categories of memory usage\n\t// described in this enumeration.\n\t// Stability: development\n\tGoMemoryTypeOther = GoMemoryTypeKey.String(\"other\")\n)\n\n// Namespace: graphql\nconst (\n\t// GraphQLDocumentKey is the attribute Key conforming to the \"graphql.document\"\n\t// semantic conventions. It represents the GraphQL document being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: query findBookById { bookById(id: ?) { name } }\n\t// Note: The value may be sanitized to exclude sensitive information.\n\tGraphQLDocumentKey = attribute.Key(\"graphql.document\")\n\n\t// GraphQLOperationNameKey is the attribute Key conforming to the\n\t// \"graphql.operation.name\" semantic conventions. It represents the name of the\n\t// operation being executed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: findBookById\n\tGraphQLOperationNameKey = attribute.Key(\"graphql.operation.name\")\n\n\t// GraphQLOperationTypeKey is the attribute Key conforming to the\n\t// \"graphql.operation.type\" semantic conventions. It represents the type of the\n\t// operation being executed.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"query\", \"mutation\", \"subscription\"\n\tGraphQLOperationTypeKey = attribute.Key(\"graphql.operation.type\")\n)\n\n// GraphQLDocument returns an attribute KeyValue conforming to the\n// \"graphql.document\" semantic conventions. It represents the GraphQL document\n// being executed.\nfunc GraphQLDocument(val string) attribute.KeyValue {\n\treturn GraphQLDocumentKey.String(val)\n}\n\n// GraphQLOperationName returns an attribute KeyValue conforming to the\n// \"graphql.operation.name\" semantic conventions. It represents the name of the\n// operation being executed.\nfunc GraphQLOperationName(val string) attribute.KeyValue {\n\treturn GraphQLOperationNameKey.String(val)\n}\n\n// Enum values for graphql.operation.type\nvar (\n\t// GraphQL query\n\t// Stability: development\n\tGraphQLOperationTypeQuery = GraphQLOperationTypeKey.String(\"query\")\n\t// GraphQL mutation\n\t// Stability: development\n\tGraphQLOperationTypeMutation = GraphQLOperationTypeKey.String(\"mutation\")\n\t// GraphQL subscription\n\t// Stability: development\n\tGraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String(\"subscription\")\n)\n\n// Namespace: heroku\nconst (\n\t// HerokuAppIDKey is the attribute Key conforming to the \"heroku.app.id\"\n\t// semantic conventions. It represents the unique identifier for the\n\t// application.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2daa2797-e42b-4624-9322-ec3f968df4da\"\n\tHerokuAppIDKey = attribute.Key(\"heroku.app.id\")\n\n\t// HerokuReleaseCommitKey is the attribute Key conforming to the\n\t// \"heroku.release.commit\" semantic conventions. It represents the commit hash\n\t// for the current release.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"e6134959463efd8966b20e75b913cafe3f5ec\"\n\tHerokuReleaseCommitKey = attribute.Key(\"heroku.release.commit\")\n\n\t// HerokuReleaseCreationTimestampKey is the attribute Key conforming to the\n\t// \"heroku.release.creation_timestamp\" semantic conventions. It represents the\n\t// time and date the release was created.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2022-10-23T18:00:42Z\"\n\tHerokuReleaseCreationTimestampKey = attribute.Key(\"heroku.release.creation_timestamp\")\n)\n\n// HerokuAppID returns an attribute KeyValue conforming to the \"heroku.app.id\"\n// semantic conventions. It represents the unique identifier for the application.\nfunc HerokuAppID(val string) attribute.KeyValue {\n\treturn HerokuAppIDKey.String(val)\n}\n\n// HerokuReleaseCommit returns an attribute KeyValue conforming to the\n// \"heroku.release.commit\" semantic conventions. It represents the commit hash\n// for the current release.\nfunc HerokuReleaseCommit(val string) attribute.KeyValue {\n\treturn HerokuReleaseCommitKey.String(val)\n}\n\n// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the\n// \"heroku.release.creation_timestamp\" semantic conventions. It represents the\n// time and date the release was created.\nfunc HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {\n\treturn HerokuReleaseCreationTimestampKey.String(val)\n}\n\n// Namespace: host\nconst (\n\t// HostArchKey is the attribute Key conforming to the \"host.arch\" semantic\n\t// conventions. It represents the CPU architecture the host system is running\n\t// on.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHostArchKey = attribute.Key(\"host.arch\")\n\n\t// HostCPUCacheL2SizeKey is the attribute Key conforming to the\n\t// \"host.cpu.cache.l2.size\" semantic conventions. It represents the amount of\n\t// level 2 memory cache available to the processor (in Bytes).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12288000\n\tHostCPUCacheL2SizeKey = attribute.Key(\"host.cpu.cache.l2.size\")\n\n\t// HostCPUFamilyKey is the attribute Key conforming to the \"host.cpu.family\"\n\t// semantic conventions. It represents the family or generation of the CPU.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6\", \"PA-RISC 1.1e\"\n\tHostCPUFamilyKey = attribute.Key(\"host.cpu.family\")\n\n\t// HostCPUModelIDKey is the attribute Key conforming to the \"host.cpu.model.id\"\n\t// semantic conventions. It represents the model identifier. It provides more\n\t// granular information about the CPU, distinguishing it from other CPUs within\n\t// the same family.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"6\", \"9000/778/B180L\"\n\tHostCPUModelIDKey = attribute.Key(\"host.cpu.model.id\")\n\n\t// HostCPUModelNameKey is the attribute Key conforming to the\n\t// \"host.cpu.model.name\" semantic conventions. It represents the model\n\t// designation of the processor.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\"\n\tHostCPUModelNameKey = attribute.Key(\"host.cpu.model.name\")\n\n\t// HostCPUSteppingKey is the attribute Key conforming to the \"host.cpu.stepping\"\n\t// semantic conventions. It represents the stepping or core revisions.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1\", \"r1p1\"\n\tHostCPUSteppingKey = attribute.Key(\"host.cpu.stepping\")\n\n\t// HostCPUVendorIDKey is the attribute Key conforming to the\n\t// \"host.cpu.vendor.id\" semantic conventions. It represents the processor\n\t// manufacturer identifier. A maximum 12-character string.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"GenuineIntel\"\n\t// Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX\n\t// registers. Writing these to memory in this order results in a 12-character\n\t// string.\n\t//\n\t// [CPUID]: https://wiki.osdev.org/CPUID\n\tHostCPUVendorIDKey = attribute.Key(\"host.cpu.vendor.id\")\n\n\t// HostIDKey is the attribute Key conforming to the \"host.id\" semantic\n\t// conventions. It represents the unique host ID. For Cloud, this must be the\n\t// instance_id assigned by the cloud provider. For non-containerized systems,\n\t// this should be the `machine-id`. See the table below for the sources to use\n\t// to determine the `machine-id` based on operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"fdbf79e8af94cb7f9e8df36789187052\"\n\tHostIDKey = attribute.Key(\"host.id\")\n\n\t// HostImageIDKey is the attribute Key conforming to the \"host.image.id\"\n\t// semantic conventions. It represents the VM image ID or host OS image ID. For\n\t// Cloud, this value is from the provider.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ami-07b06b442921831e5\"\n\tHostImageIDKey = attribute.Key(\"host.image.id\")\n\n\t// HostImageNameKey is the attribute Key conforming to the \"host.image.name\"\n\t// semantic conventions. It represents the name of the VM image or OS install\n\t// the host was instantiated from.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"infra-ami-eks-worker-node-7d4ec78312\", \"CentOS-8-x86_64-1905\"\n\tHostImageNameKey = attribute.Key(\"host.image.name\")\n\n\t// HostImageVersionKey is the attribute Key conforming to the\n\t// \"host.image.version\" semantic conventions. It represents the version string\n\t// of the VM image or host OS as defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0.1\"\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\tHostImageVersionKey = attribute.Key(\"host.image.version\")\n\n\t// HostIPKey is the attribute Key conforming to the \"host.ip\" semantic\n\t// conventions. It represents the available IP addresses of the host, excluding\n\t// loopback interfaces.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"192.168.1.140\", \"fe80::abc2:4a28:737a:609e\"\n\t// Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6\n\t// addresses MUST be specified in the [RFC 5952] format.\n\t//\n\t// [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html\n\tHostIPKey = attribute.Key(\"host.ip\")\n\n\t// HostMacKey is the attribute Key conforming to the \"host.mac\" semantic\n\t// conventions. It represents the available MAC addresses of the host, excluding\n\t// loopback interfaces.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"AC-DE-48-23-45-67\", \"AC-DE-48-23-45-67-01-9F\"\n\t// Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as\n\t// hyphen-separated octets in uppercase hexadecimal form from most to least\n\t// significant.\n\t//\n\t// [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf\n\tHostMacKey = attribute.Key(\"host.mac\")\n\n\t// HostNameKey is the attribute Key conforming to the \"host.name\" semantic\n\t// conventions. It represents the name of the host. On Unix systems, it may\n\t// contain what the hostname command returns, or the fully qualified hostname,\n\t// or another name specified by the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry-test\"\n\tHostNameKey = attribute.Key(\"host.name\")\n\n\t// HostTypeKey is the attribute Key conforming to the \"host.type\" semantic\n\t// conventions. It represents the type of host. For Cloud, this must be the\n\t// machine type.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"n1-standard-1\"\n\tHostTypeKey = attribute.Key(\"host.type\")\n)\n\n// HostCPUCacheL2Size returns an attribute KeyValue conforming to the\n// \"host.cpu.cache.l2.size\" semantic conventions. It represents the amount of\n// level 2 memory cache available to the processor (in Bytes).\nfunc HostCPUCacheL2Size(val int) attribute.KeyValue {\n\treturn HostCPUCacheL2SizeKey.Int(val)\n}\n\n// HostCPUFamily returns an attribute KeyValue conforming to the\n// \"host.cpu.family\" semantic conventions. It represents the family or generation\n// of the CPU.\nfunc HostCPUFamily(val string) attribute.KeyValue {\n\treturn HostCPUFamilyKey.String(val)\n}\n\n// HostCPUModelID returns an attribute KeyValue conforming to the\n// \"host.cpu.model.id\" semantic conventions. It represents the model identifier.\n// It provides more granular information about the CPU, distinguishing it from\n// other CPUs within the same family.\nfunc HostCPUModelID(val string) attribute.KeyValue {\n\treturn HostCPUModelIDKey.String(val)\n}\n\n// HostCPUModelName returns an attribute KeyValue conforming to the\n// \"host.cpu.model.name\" semantic conventions. It represents the model\n// designation of the processor.\nfunc HostCPUModelName(val string) attribute.KeyValue {\n\treturn HostCPUModelNameKey.String(val)\n}\n\n// HostCPUStepping returns an attribute KeyValue conforming to the\n// \"host.cpu.stepping\" semantic conventions. It represents the stepping or core\n// revisions.\nfunc HostCPUStepping(val string) attribute.KeyValue {\n\treturn HostCPUSteppingKey.String(val)\n}\n\n// HostCPUVendorID returns an attribute KeyValue conforming to the\n// \"host.cpu.vendor.id\" semantic conventions. It represents the processor\n// manufacturer identifier. A maximum 12-character string.\nfunc HostCPUVendorID(val string) attribute.KeyValue {\n\treturn HostCPUVendorIDKey.String(val)\n}\n\n// HostID returns an attribute KeyValue conforming to the \"host.id\" semantic\n// conventions. It represents the unique host ID. For Cloud, this must be the\n// instance_id assigned by the cloud provider. For non-containerized systems,\n// this should be the `machine-id`. See the table below for the sources to use to\n// determine the `machine-id` based on operating system.\nfunc HostID(val string) attribute.KeyValue {\n\treturn HostIDKey.String(val)\n}\n\n// HostImageID returns an attribute KeyValue conforming to the \"host.image.id\"\n// semantic conventions. It represents the VM image ID or host OS image ID. For\n// Cloud, this value is from the provider.\nfunc HostImageID(val string) attribute.KeyValue {\n\treturn HostImageIDKey.String(val)\n}\n\n// HostImageName returns an attribute KeyValue conforming to the\n// \"host.image.name\" semantic conventions. It represents the name of the VM image\n// or OS install the host was instantiated from.\nfunc HostImageName(val string) attribute.KeyValue {\n\treturn HostImageNameKey.String(val)\n}\n\n// HostImageVersion returns an attribute KeyValue conforming to the\n// \"host.image.version\" semantic conventions. It represents the version string of\n// the VM image or host OS as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc HostImageVersion(val string) attribute.KeyValue {\n\treturn HostImageVersionKey.String(val)\n}\n\n// HostIP returns an attribute KeyValue conforming to the \"host.ip\" semantic\n// conventions. It represents the available IP addresses of the host, excluding\n// loopback interfaces.\nfunc HostIP(val ...string) attribute.KeyValue {\n\treturn HostIPKey.StringSlice(val)\n}\n\n// HostMac returns an attribute KeyValue conforming to the \"host.mac\" semantic\n// conventions. It represents the available MAC addresses of the host, excluding\n// loopback interfaces.\nfunc HostMac(val ...string) attribute.KeyValue {\n\treturn HostMacKey.StringSlice(val)\n}\n\n// HostName returns an attribute KeyValue conforming to the \"host.name\" semantic\n// conventions. It represents the name of the host. On Unix systems, it may\n// contain what the hostname command returns, or the fully qualified hostname, or\n// another name specified by the user.\nfunc HostName(val string) attribute.KeyValue {\n\treturn HostNameKey.String(val)\n}\n\n// HostType returns an attribute KeyValue conforming to the \"host.type\" semantic\n// conventions. It represents the type of host. For Cloud, this must be the\n// machine type.\nfunc HostType(val string) attribute.KeyValue {\n\treturn HostTypeKey.String(val)\n}\n\n// Enum values for host.arch\nvar (\n\t// AMD64\n\t// Stability: development\n\tHostArchAMD64 = HostArchKey.String(\"amd64\")\n\t// ARM32\n\t// Stability: development\n\tHostArchARM32 = HostArchKey.String(\"arm32\")\n\t// ARM64\n\t// Stability: development\n\tHostArchARM64 = HostArchKey.String(\"arm64\")\n\t// Itanium\n\t// Stability: development\n\tHostArchIA64 = HostArchKey.String(\"ia64\")\n\t// 32-bit PowerPC\n\t// Stability: development\n\tHostArchPPC32 = HostArchKey.String(\"ppc32\")\n\t// 64-bit PowerPC\n\t// Stability: development\n\tHostArchPPC64 = HostArchKey.String(\"ppc64\")\n\t// IBM z/Architecture\n\t// Stability: development\n\tHostArchS390x = HostArchKey.String(\"s390x\")\n\t// 32-bit x86\n\t// Stability: development\n\tHostArchX86 = HostArchKey.String(\"x86\")\n)\n\n// Namespace: http\nconst (\n\t// HTTPConnectionStateKey is the attribute Key conforming to the\n\t// \"http.connection.state\" semantic conventions. It represents the state of the\n\t// HTTP connection in the HTTP connection pool.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"active\", \"idle\"\n\tHTTPConnectionStateKey = attribute.Key(\"http.connection.state\")\n\n\t// HTTPRequestBodySizeKey is the attribute Key conforming to the\n\t// \"http.request.body.size\" semantic conventions. It represents the size of the\n\t// request payload body in bytes. This is the number of bytes transferred\n\t// excluding headers and is often, but not always, present as the\n\t// [Content-Length] header. For requests using transport encoding, this should\n\t// be the compressed size.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\n\tHTTPRequestBodySizeKey = attribute.Key(\"http.request.body.size\")\n\n\t// HTTPRequestMethodKey is the attribute Key conforming to the\n\t// \"http.request.method\" semantic conventions. It represents the HTTP request\n\t// method.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GET\", \"POST\", \"HEAD\"\n\t// Note: HTTP request method value SHOULD be \"known\" to the instrumentation.\n\t// By default, this convention defines \"known\" methods as the ones listed in\n\t// [RFC9110],\n\t// the PATCH method defined in [RFC5789]\n\t// and the QUERY method defined in [httpbis-safe-method-w-body].\n\t//\n\t// If the HTTP request method is not known to instrumentation, it MUST set the\n\t// `http.request.method` attribute to `_OTHER`.\n\t//\n\t// If the HTTP instrumentation could end up converting valid HTTP request\n\t// methods to `_OTHER`, then it MUST provide a way to override\n\t// the list of known HTTP methods. If this override is done via environment\n\t// variable, then the environment variable MUST be named\n\t// OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of\n\t// case-sensitive known HTTP methods\n\t// (this list MUST be a full override of the default known method, it is not a\n\t// list of known methods in addition to the defaults).\n\t//\n\t// HTTP method names are case-sensitive and `http.request.method` attribute\n\t// value MUST match a known HTTP method name exactly.\n\t// Instrumentations for specific web frameworks that consider HTTP methods to be\n\t// case insensitive, SHOULD populate a canonical equivalent.\n\t// Tracing instrumentations that do so, MUST also set\n\t// `http.request.method_original` to the original value.\n\t//\n\t// [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods\n\t// [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html\n\t// [httpbis-safe-method-w-body]: https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1\n\tHTTPRequestMethodKey = attribute.Key(\"http.request.method\")\n\n\t// HTTPRequestMethodOriginalKey is the attribute Key conforming to the\n\t// \"http.request.method_original\" semantic conventions. It represents the\n\t// original HTTP method sent by the client in the request line.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"GeT\", \"ACL\", \"foo\"\n\tHTTPRequestMethodOriginalKey = attribute.Key(\"http.request.method_original\")\n\n\t// HTTPRequestResendCountKey is the attribute Key conforming to the\n\t// \"http.request.resend_count\" semantic conventions. It represents the ordinal\n\t// number of request resending attempt (for any reason, including redirects).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Note: The resend count SHOULD be updated each time an HTTP request gets\n\t// resent by the client, regardless of what was the cause of the resending (e.g.\n\t// redirection, authorization failure, 503 Server Unavailable, network issues,\n\t// or any other).\n\tHTTPRequestResendCountKey = attribute.Key(\"http.request.resend_count\")\n\n\t// HTTPRequestSizeKey is the attribute Key conforming to the \"http.request.size\"\n\t// semantic conventions. It represents the total size of the request in bytes.\n\t// This should be the total number of bytes sent over the wire, including the\n\t// request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request\n\t// body if any.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tHTTPRequestSizeKey = attribute.Key(\"http.request.size\")\n\n\t// HTTPResponseBodySizeKey is the attribute Key conforming to the\n\t// \"http.response.body.size\" semantic conventions. It represents the size of the\n\t// response payload body in bytes. This is the number of bytes transferred\n\t// excluding headers and is often, but not always, present as the\n\t// [Content-Length] header. For requests using transport encoding, this should\n\t// be the compressed size.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\n\tHTTPResponseBodySizeKey = attribute.Key(\"http.response.body.size\")\n\n\t// HTTPResponseSizeKey is the attribute Key conforming to the\n\t// \"http.response.size\" semantic conventions. It represents the total size of\n\t// the response in bytes. This should be the total number of bytes sent over the\n\t// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),\n\t// headers, and response body and trailers if any.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tHTTPResponseSizeKey = attribute.Key(\"http.response.size\")\n\n\t// HTTPResponseStatusCodeKey is the attribute Key conforming to the\n\t// \"http.response.status_code\" semantic conventions. It represents the\n\t// [HTTP response status code].\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 200\n\t//\n\t// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\n\tHTTPResponseStatusCodeKey = attribute.Key(\"http.response.status_code\")\n\n\t// HTTPRouteKey is the attribute Key conforming to the \"http.route\" semantic\n\t// conventions. It represents the matched route template for the request. This\n\t// MUST be low-cardinality and include all static path segments, with dynamic\n\t// path segments represented with placeholders.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"/users/:userID?\", \"my-controller/my-action/{id?}\"\n\t// Note: MUST NOT be populated when this is not supported by the HTTP server\n\t// framework as the route attribute should have low-cardinality and the URI path\n\t// can NOT substitute it.\n\t// SHOULD include the [application root] if there is one.\n\t//\n\t// A static path segment is a part of the route template with a fixed,\n\t// low-cardinality value. This includes literal strings like `/users/` and\n\t// placeholders that\n\t// are constrained to a finite, predefined set of values, e.g. `{controller}` or\n\t// `{action}`.\n\t//\n\t// A dynamic path segment is a placeholder for a value that can have high\n\t// cardinality and is not constrained to a predefined list like static path\n\t// segments.\n\t//\n\t// Instrumentations SHOULD use routing information provided by the corresponding\n\t// web framework. They SHOULD pick the most precise source of routing\n\t// information and MAY\n\t// support custom route formatting. Instrumentations SHOULD document the format\n\t// and the API used to obtain the route string.\n\t//\n\t// [application root]: /docs/http/http-spans.md#http-server-definitions\n\tHTTPRouteKey = attribute.Key(\"http.route\")\n)\n\n// HTTPRequestBodySize returns an attribute KeyValue conforming to the\n// \"http.request.body.size\" semantic conventions. It represents the size of the\n// request payload body in bytes. This is the number of bytes transferred\n// excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc HTTPRequestBodySize(val int) attribute.KeyValue {\n\treturn HTTPRequestBodySizeKey.Int(val)\n}\n\n// HTTPRequestHeader returns an attribute KeyValue conforming to the\n// \"http.request.header\" semantic conventions. It represents the HTTP request\n// headers, `<key>` being the normalized HTTP Header name (lowercase), the value\n// being the header values.\nfunc HTTPRequestHeader(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"http.request.header.\"+key, val)\n}\n\n// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the\n// \"http.request.method_original\" semantic conventions. It represents the\n// original HTTP method sent by the client in the request line.\nfunc HTTPRequestMethodOriginal(val string) attribute.KeyValue {\n\treturn HTTPRequestMethodOriginalKey.String(val)\n}\n\n// HTTPRequestResendCount returns an attribute KeyValue conforming to the\n// \"http.request.resend_count\" semantic conventions. It represents the ordinal\n// number of request resending attempt (for any reason, including redirects).\nfunc HTTPRequestResendCount(val int) attribute.KeyValue {\n\treturn HTTPRequestResendCountKey.Int(val)\n}\n\n// HTTPRequestSize returns an attribute KeyValue conforming to the\n// \"http.request.size\" semantic conventions. It represents the total size of the\n// request in bytes. This should be the total number of bytes sent over the wire,\n// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers,\n// and request body if any.\nfunc HTTPRequestSize(val int) attribute.KeyValue {\n\treturn HTTPRequestSizeKey.Int(val)\n}\n\n// HTTPResponseBodySize returns an attribute KeyValue conforming to the\n// \"http.response.body.size\" semantic conventions. It represents the size of the\n// response payload body in bytes. This is the number of bytes transferred\n// excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc HTTPResponseBodySize(val int) attribute.KeyValue {\n\treturn HTTPResponseBodySizeKey.Int(val)\n}\n\n// HTTPResponseHeader returns an attribute KeyValue conforming to the\n// \"http.response.header\" semantic conventions. It represents the HTTP response\n// headers, `<key>` being the normalized HTTP Header name (lowercase), the value\n// being the header values.\nfunc HTTPResponseHeader(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"http.response.header.\"+key, val)\n}\n\n// HTTPResponseSize returns an attribute KeyValue conforming to the\n// \"http.response.size\" semantic conventions. It represents the total size of the\n// response in bytes. This should be the total number of bytes sent over the\n// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),\n// headers, and response body and trailers if any.\nfunc HTTPResponseSize(val int) attribute.KeyValue {\n\treturn HTTPResponseSizeKey.Int(val)\n}\n\n// HTTPResponseStatusCode returns an attribute KeyValue conforming to the\n// \"http.response.status_code\" semantic conventions. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc HTTPResponseStatusCode(val int) attribute.KeyValue {\n\treturn HTTPResponseStatusCodeKey.Int(val)\n}\n\n// HTTPRoute returns an attribute KeyValue conforming to the \"http.route\"\n// semantic conventions. It represents the matched route template for the\n// request. This MUST be low-cardinality and include all static path segments,\n// with dynamic path segments represented with placeholders.\nfunc HTTPRoute(val string) attribute.KeyValue {\n\treturn HTTPRouteKey.String(val)\n}\n\n// Enum values for http.connection.state\nvar (\n\t// active state.\n\t// Stability: development\n\tHTTPConnectionStateActive = HTTPConnectionStateKey.String(\"active\")\n\t// idle state.\n\t// Stability: development\n\tHTTPConnectionStateIdle = HTTPConnectionStateKey.String(\"idle\")\n)\n\n// Enum values for http.request.method\nvar (\n\t// CONNECT method.\n\t// Stability: stable\n\tHTTPRequestMethodConnect = HTTPRequestMethodKey.String(\"CONNECT\")\n\t// DELETE method.\n\t// Stability: stable\n\tHTTPRequestMethodDelete = HTTPRequestMethodKey.String(\"DELETE\")\n\t// GET method.\n\t// Stability: stable\n\tHTTPRequestMethodGet = HTTPRequestMethodKey.String(\"GET\")\n\t// HEAD method.\n\t// Stability: stable\n\tHTTPRequestMethodHead = HTTPRequestMethodKey.String(\"HEAD\")\n\t// OPTIONS method.\n\t// Stability: stable\n\tHTTPRequestMethodOptions = HTTPRequestMethodKey.String(\"OPTIONS\")\n\t// PATCH method.\n\t// Stability: stable\n\tHTTPRequestMethodPatch = HTTPRequestMethodKey.String(\"PATCH\")\n\t// POST method.\n\t// Stability: stable\n\tHTTPRequestMethodPost = HTTPRequestMethodKey.String(\"POST\")\n\t// PUT method.\n\t// Stability: stable\n\tHTTPRequestMethodPut = HTTPRequestMethodKey.String(\"PUT\")\n\t// TRACE method.\n\t// Stability: stable\n\tHTTPRequestMethodTrace = HTTPRequestMethodKey.String(\"TRACE\")\n\t// QUERY method.\n\t// Stability: development\n\tHTTPRequestMethodQuery = HTTPRequestMethodKey.String(\"QUERY\")\n\t// Any HTTP method that the instrumentation has no prior knowledge of.\n\t// Stability: stable\n\tHTTPRequestMethodOther = HTTPRequestMethodKey.String(\"_OTHER\")\n)\n\n// Namespace: hw\nconst (\n\t// HwBatteryCapacityKey is the attribute Key conforming to the\n\t// \"hw.battery.capacity\" semantic conventions. It represents the design capacity\n\t// in Watts-hours or Amper-hours.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9.3Ah\", \"50Wh\"\n\tHwBatteryCapacityKey = attribute.Key(\"hw.battery.capacity\")\n\n\t// HwBatteryChemistryKey is the attribute Key conforming to the\n\t// \"hw.battery.chemistry\" semantic conventions. It represents the battery\n\t// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Li-ion\", \"NiMH\"\n\t//\n\t// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html\n\tHwBatteryChemistryKey = attribute.Key(\"hw.battery.chemistry\")\n\n\t// HwBatteryStateKey is the attribute Key conforming to the \"hw.battery.state\"\n\t// semantic conventions. It represents the current state of the battery.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwBatteryStateKey = attribute.Key(\"hw.battery.state\")\n\n\t// HwBiosVersionKey is the attribute Key conforming to the \"hw.bios_version\"\n\t// semantic conventions. It represents the BIOS version of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2.3\"\n\tHwBiosVersionKey = attribute.Key(\"hw.bios_version\")\n\n\t// HwDriverVersionKey is the attribute Key conforming to the \"hw.driver_version\"\n\t// semantic conventions. It represents the driver version for the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10.2.1-3\"\n\tHwDriverVersionKey = attribute.Key(\"hw.driver_version\")\n\n\t// HwEnclosureTypeKey is the attribute Key conforming to the \"hw.enclosure.type\"\n\t// semantic conventions. It represents the type of the enclosure (useful for\n\t// modular systems).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Computer\", \"Storage\", \"Switch\"\n\tHwEnclosureTypeKey = attribute.Key(\"hw.enclosure.type\")\n\n\t// HwFirmwareVersionKey is the attribute Key conforming to the\n\t// \"hw.firmware_version\" semantic conventions. It represents the firmware\n\t// version of the hardware component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2.0.1\"\n\tHwFirmwareVersionKey = attribute.Key(\"hw.firmware_version\")\n\n\t// HwGpuTaskKey is the attribute Key conforming to the \"hw.gpu.task\" semantic\n\t// conventions. It represents the type of task the GPU is performing.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwGpuTaskKey = attribute.Key(\"hw.gpu.task\")\n\n\t// HwIDKey is the attribute Key conforming to the \"hw.id\" semantic conventions.\n\t// It represents an identifier for the hardware component, unique within the\n\t// monitored host.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"win32battery_battery_testsysa33_1\"\n\tHwIDKey = attribute.Key(\"hw.id\")\n\n\t// HwLimitTypeKey is the attribute Key conforming to the \"hw.limit_type\"\n\t// semantic conventions. It represents the type of limit for hardware\n\t// components.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwLimitTypeKey = attribute.Key(\"hw.limit_type\")\n\n\t// HwLogicalDiskRaidLevelKey is the attribute Key conforming to the\n\t// \"hw.logical_disk.raid_level\" semantic conventions. It represents the RAID\n\t// Level of the logical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"RAID0+1\", \"RAID5\", \"RAID10\"\n\tHwLogicalDiskRaidLevelKey = attribute.Key(\"hw.logical_disk.raid_level\")\n\n\t// HwLogicalDiskStateKey is the attribute Key conforming to the\n\t// \"hw.logical_disk.state\" semantic conventions. It represents the state of the\n\t// logical disk space usage.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwLogicalDiskStateKey = attribute.Key(\"hw.logical_disk.state\")\n\n\t// HwMemoryTypeKey is the attribute Key conforming to the \"hw.memory.type\"\n\t// semantic conventions. It represents the type of the memory module.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"DDR4\", \"DDR5\", \"LPDDR5\"\n\tHwMemoryTypeKey = attribute.Key(\"hw.memory.type\")\n\n\t// HwModelKey is the attribute Key conforming to the \"hw.model\" semantic\n\t// conventions. It represents the descriptive model name of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"PERC H740P\", \"Intel(R) Core(TM) i7-10700K\", \"Dell XPS 15 Battery\"\n\tHwModelKey = attribute.Key(\"hw.model\")\n\n\t// HwNameKey is the attribute Key conforming to the \"hw.name\" semantic\n\t// conventions. It represents an easily-recognizable name for the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"eth0\"\n\tHwNameKey = attribute.Key(\"hw.name\")\n\n\t// HwNetworkLogicalAddressesKey is the attribute Key conforming to the\n\t// \"hw.network.logical_addresses\" semantic conventions. It represents the\n\t// logical addresses of the adapter (e.g. IP address, or WWPN).\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"172.16.8.21\", \"57.11.193.42\"\n\tHwNetworkLogicalAddressesKey = attribute.Key(\"hw.network.logical_addresses\")\n\n\t// HwNetworkPhysicalAddressKey is the attribute Key conforming to the\n\t// \"hw.network.physical_address\" semantic conventions. It represents the\n\t// physical address of the adapter (e.g. MAC address, or WWNN).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"00-90-F5-E9-7B-36\"\n\tHwNetworkPhysicalAddressKey = attribute.Key(\"hw.network.physical_address\")\n\n\t// HwParentKey is the attribute Key conforming to the \"hw.parent\" semantic\n\t// conventions. It represents the unique identifier of the parent component\n\t// (typically the `hw.id` attribute of the enclosure, or disk controller).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"dellStorage_perc_0\"\n\tHwParentKey = attribute.Key(\"hw.parent\")\n\n\t// HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.smart_attribute\" semantic conventions. It represents the\n\t// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute\n\t// of the physical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Spin Retry Count\", \"Seek Error Rate\", \"Raw Read Error Rate\"\n\t//\n\t// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.\n\tHwPhysicalDiskSmartAttributeKey = attribute.Key(\"hw.physical_disk.smart_attribute\")\n\n\t// HwPhysicalDiskStateKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.state\" semantic conventions. It represents the state of the\n\t// physical disk endurance utilization.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwPhysicalDiskStateKey = attribute.Key(\"hw.physical_disk.state\")\n\n\t// HwPhysicalDiskTypeKey is the attribute Key conforming to the\n\t// \"hw.physical_disk.type\" semantic conventions. It represents the type of the\n\t// physical disk.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"HDD\", \"SSD\", \"10K\"\n\tHwPhysicalDiskTypeKey = attribute.Key(\"hw.physical_disk.type\")\n\n\t// HwSensorLocationKey is the attribute Key conforming to the\n\t// \"hw.sensor_location\" semantic conventions. It represents the location of the\n\t// sensor.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cpu0\", \"ps1\", \"INLET\", \"CPU0_DIE\", \"AMBIENT\", \"MOTHERBOARD\", \"PS0\n\t// V3_3\", \"MAIN_12V\", \"CPU_VCORE\"\n\tHwSensorLocationKey = attribute.Key(\"hw.sensor_location\")\n\n\t// HwSerialNumberKey is the attribute Key conforming to the \"hw.serial_number\"\n\t// semantic conventions. It represents the serial number of the hardware\n\t// component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CNFCP0123456789\"\n\tHwSerialNumberKey = attribute.Key(\"hw.serial_number\")\n\n\t// HwStateKey is the attribute Key conforming to the \"hw.state\" semantic\n\t// conventions. It represents the current state of the component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwStateKey = attribute.Key(\"hw.state\")\n\n\t// HwTapeDriveOperationTypeKey is the attribute Key conforming to the\n\t// \"hw.tape_drive.operation_type\" semantic conventions. It represents the type\n\t// of tape drive operation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tHwTapeDriveOperationTypeKey = attribute.Key(\"hw.tape_drive.operation_type\")\n\n\t// HwTypeKey is the attribute Key conforming to the \"hw.type\" semantic\n\t// conventions. It represents the type of the component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: Describes the category of the hardware component for which `hw.state`\n\t// is being reported. For example, `hw.type=temperature` along with\n\t// `hw.state=degraded` would indicate that the temperature of the hardware\n\t// component has been reported as `degraded`.\n\tHwTypeKey = attribute.Key(\"hw.type\")\n\n\t// HwVendorKey is the attribute Key conforming to the \"hw.vendor\" semantic\n\t// conventions. It represents the vendor name of the hardware component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Dell\", \"HP\", \"Intel\", \"AMD\", \"LSI\", \"Lenovo\"\n\tHwVendorKey = attribute.Key(\"hw.vendor\")\n)\n\n// HwBatteryCapacity returns an attribute KeyValue conforming to the\n// \"hw.battery.capacity\" semantic conventions. It represents the design capacity\n// in Watts-hours or Amper-hours.\nfunc HwBatteryCapacity(val string) attribute.KeyValue {\n\treturn HwBatteryCapacityKey.String(val)\n}\n\n// HwBatteryChemistry returns an attribute KeyValue conforming to the\n// \"hw.battery.chemistry\" semantic conventions. It represents the battery\n// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.\n//\n// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html\nfunc HwBatteryChemistry(val string) attribute.KeyValue {\n\treturn HwBatteryChemistryKey.String(val)\n}\n\n// HwBiosVersion returns an attribute KeyValue conforming to the\n// \"hw.bios_version\" semantic conventions. It represents the BIOS version of the\n// hardware component.\nfunc HwBiosVersion(val string) attribute.KeyValue {\n\treturn HwBiosVersionKey.String(val)\n}\n\n// HwDriverVersion returns an attribute KeyValue conforming to the\n// \"hw.driver_version\" semantic conventions. It represents the driver version for\n// the hardware component.\nfunc HwDriverVersion(val string) attribute.KeyValue {\n\treturn HwDriverVersionKey.String(val)\n}\n\n// HwEnclosureType returns an attribute KeyValue conforming to the\n// \"hw.enclosure.type\" semantic conventions. It represents the type of the\n// enclosure (useful for modular systems).\nfunc HwEnclosureType(val string) attribute.KeyValue {\n\treturn HwEnclosureTypeKey.String(val)\n}\n\n// HwFirmwareVersion returns an attribute KeyValue conforming to the\n// \"hw.firmware_version\" semantic conventions. It represents the firmware version\n// of the hardware component.\nfunc HwFirmwareVersion(val string) attribute.KeyValue {\n\treturn HwFirmwareVersionKey.String(val)\n}\n\n// HwID returns an attribute KeyValue conforming to the \"hw.id\" semantic\n// conventions. It represents an identifier for the hardware component, unique\n// within the monitored host.\nfunc HwID(val string) attribute.KeyValue {\n\treturn HwIDKey.String(val)\n}\n\n// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the\n// \"hw.logical_disk.raid_level\" semantic conventions. It represents the RAID\n// Level of the logical disk.\nfunc HwLogicalDiskRaidLevel(val string) attribute.KeyValue {\n\treturn HwLogicalDiskRaidLevelKey.String(val)\n}\n\n// HwMemoryType returns an attribute KeyValue conforming to the \"hw.memory.type\"\n// semantic conventions. It represents the type of the memory module.\nfunc HwMemoryType(val string) attribute.KeyValue {\n\treturn HwMemoryTypeKey.String(val)\n}\n\n// HwModel returns an attribute KeyValue conforming to the \"hw.model\" semantic\n// conventions. It represents the descriptive model name of the hardware\n// component.\nfunc HwModel(val string) attribute.KeyValue {\n\treturn HwModelKey.String(val)\n}\n\n// HwName returns an attribute KeyValue conforming to the \"hw.name\" semantic\n// conventions. It represents an easily-recognizable name for the hardware\n// component.\nfunc HwName(val string) attribute.KeyValue {\n\treturn HwNameKey.String(val)\n}\n\n// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the\n// \"hw.network.logical_addresses\" semantic conventions. It represents the logical\n// addresses of the adapter (e.g. IP address, or WWPN).\nfunc HwNetworkLogicalAddresses(val ...string) attribute.KeyValue {\n\treturn HwNetworkLogicalAddressesKey.StringSlice(val)\n}\n\n// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the\n// \"hw.network.physical_address\" semantic conventions. It represents the physical\n// address of the adapter (e.g. MAC address, or WWNN).\nfunc HwNetworkPhysicalAddress(val string) attribute.KeyValue {\n\treturn HwNetworkPhysicalAddressKey.String(val)\n}\n\n// HwParent returns an attribute KeyValue conforming to the \"hw.parent\" semantic\n// conventions. It represents the unique identifier of the parent component\n// (typically the `hw.id` attribute of the enclosure, or disk controller).\nfunc HwParent(val string) attribute.KeyValue {\n\treturn HwParentKey.String(val)\n}\n\n// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the\n// \"hw.physical_disk.smart_attribute\" semantic conventions. It represents the\n// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute\n// of the physical disk.\n//\n// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.\nfunc HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue {\n\treturn HwPhysicalDiskSmartAttributeKey.String(val)\n}\n\n// HwPhysicalDiskType returns an attribute KeyValue conforming to the\n// \"hw.physical_disk.type\" semantic conventions. It represents the type of the\n// physical disk.\nfunc HwPhysicalDiskType(val string) attribute.KeyValue {\n\treturn HwPhysicalDiskTypeKey.String(val)\n}\n\n// HwSensorLocation returns an attribute KeyValue conforming to the\n// \"hw.sensor_location\" semantic conventions. It represents the location of the\n// sensor.\nfunc HwSensorLocation(val string) attribute.KeyValue {\n\treturn HwSensorLocationKey.String(val)\n}\n\n// HwSerialNumber returns an attribute KeyValue conforming to the\n// \"hw.serial_number\" semantic conventions. It represents the serial number of\n// the hardware component.\nfunc HwSerialNumber(val string) attribute.KeyValue {\n\treturn HwSerialNumberKey.String(val)\n}\n\n// HwVendor returns an attribute KeyValue conforming to the \"hw.vendor\" semantic\n// conventions. It represents the vendor name of the hardware component.\nfunc HwVendor(val string) attribute.KeyValue {\n\treturn HwVendorKey.String(val)\n}\n\n// Enum values for hw.battery.state\nvar (\n\t// Charging\n\t// Stability: development\n\tHwBatteryStateCharging = HwBatteryStateKey.String(\"charging\")\n\t// Discharging\n\t// Stability: development\n\tHwBatteryStateDischarging = HwBatteryStateKey.String(\"discharging\")\n)\n\n// Enum values for hw.gpu.task\nvar (\n\t// Decoder\n\t// Stability: development\n\tHwGpuTaskDecoder = HwGpuTaskKey.String(\"decoder\")\n\t// Encoder\n\t// Stability: development\n\tHwGpuTaskEncoder = HwGpuTaskKey.String(\"encoder\")\n\t// General\n\t// Stability: development\n\tHwGpuTaskGeneral = HwGpuTaskKey.String(\"general\")\n)\n\n// Enum values for hw.limit_type\nvar (\n\t// Critical\n\t// Stability: development\n\tHwLimitTypeCritical = HwLimitTypeKey.String(\"critical\")\n\t// Degraded\n\t// Stability: development\n\tHwLimitTypeDegraded = HwLimitTypeKey.String(\"degraded\")\n\t// High Critical\n\t// Stability: development\n\tHwLimitTypeHighCritical = HwLimitTypeKey.String(\"high.critical\")\n\t// High Degraded\n\t// Stability: development\n\tHwLimitTypeHighDegraded = HwLimitTypeKey.String(\"high.degraded\")\n\t// Low Critical\n\t// Stability: development\n\tHwLimitTypeLowCritical = HwLimitTypeKey.String(\"low.critical\")\n\t// Low Degraded\n\t// Stability: development\n\tHwLimitTypeLowDegraded = HwLimitTypeKey.String(\"low.degraded\")\n\t// Maximum\n\t// Stability: development\n\tHwLimitTypeMax = HwLimitTypeKey.String(\"max\")\n\t// Throttled\n\t// Stability: development\n\tHwLimitTypeThrottled = HwLimitTypeKey.String(\"throttled\")\n\t// Turbo\n\t// Stability: development\n\tHwLimitTypeTurbo = HwLimitTypeKey.String(\"turbo\")\n)\n\n// Enum values for hw.logical_disk.state\nvar (\n\t// Used\n\t// Stability: development\n\tHwLogicalDiskStateUsed = HwLogicalDiskStateKey.String(\"used\")\n\t// Free\n\t// Stability: development\n\tHwLogicalDiskStateFree = HwLogicalDiskStateKey.String(\"free\")\n)\n\n// Enum values for hw.physical_disk.state\nvar (\n\t// Remaining\n\t// Stability: development\n\tHwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String(\"remaining\")\n)\n\n// Enum values for hw.state\nvar (\n\t// Degraded\n\t// Stability: development\n\tHwStateDegraded = HwStateKey.String(\"degraded\")\n\t// Failed\n\t// Stability: development\n\tHwStateFailed = HwStateKey.String(\"failed\")\n\t// Needs Cleaning\n\t// Stability: development\n\tHwStateNeedsCleaning = HwStateKey.String(\"needs_cleaning\")\n\t// OK\n\t// Stability: development\n\tHwStateOk = HwStateKey.String(\"ok\")\n\t// Predicted Failure\n\t// Stability: development\n\tHwStatePredictedFailure = HwStateKey.String(\"predicted_failure\")\n)\n\n// Enum values for hw.tape_drive.operation_type\nvar (\n\t// Mount\n\t// Stability: development\n\tHwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String(\"mount\")\n\t// Unmount\n\t// Stability: development\n\tHwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String(\"unmount\")\n\t// Clean\n\t// Stability: development\n\tHwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String(\"clean\")\n)\n\n// Enum values for hw.type\nvar (\n\t// Battery\n\t// Stability: development\n\tHwTypeBattery = HwTypeKey.String(\"battery\")\n\t// CPU\n\t// Stability: development\n\tHwTypeCPU = HwTypeKey.String(\"cpu\")\n\t// Disk controller\n\t// Stability: development\n\tHwTypeDiskController = HwTypeKey.String(\"disk_controller\")\n\t// Enclosure\n\t// Stability: development\n\tHwTypeEnclosure = HwTypeKey.String(\"enclosure\")\n\t// Fan\n\t// Stability: development\n\tHwTypeFan = HwTypeKey.String(\"fan\")\n\t// GPU\n\t// Stability: development\n\tHwTypeGpu = HwTypeKey.String(\"gpu\")\n\t// Logical disk\n\t// Stability: development\n\tHwTypeLogicalDisk = HwTypeKey.String(\"logical_disk\")\n\t// Memory\n\t// Stability: development\n\tHwTypeMemory = HwTypeKey.String(\"memory\")\n\t// Network\n\t// Stability: development\n\tHwTypeNetwork = HwTypeKey.String(\"network\")\n\t// Physical disk\n\t// Stability: development\n\tHwTypePhysicalDisk = HwTypeKey.String(\"physical_disk\")\n\t// Power supply\n\t// Stability: development\n\tHwTypePowerSupply = HwTypeKey.String(\"power_supply\")\n\t// Tape drive\n\t// Stability: development\n\tHwTypeTapeDrive = HwTypeKey.String(\"tape_drive\")\n\t// Temperature\n\t// Stability: development\n\tHwTypeTemperature = HwTypeKey.String(\"temperature\")\n\t// Voltage\n\t// Stability: development\n\tHwTypeVoltage = HwTypeKey.String(\"voltage\")\n)\n\n// Namespace: ios\nconst (\n\t// IOSAppStateKey is the attribute Key conforming to the \"ios.app.state\"\n\t// semantic conventions. It represents the this attribute represents the state\n\t// of the application.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The iOS lifecycle states are defined in the\n\t// [UIApplicationDelegate documentation], and from which the `OS terminology`\n\t// column values are derived.\n\t//\n\t// [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate\n\tIOSAppStateKey = attribute.Key(\"ios.app.state\")\n)\n\n// Enum values for ios.app.state\nvar (\n\t// The app has become `active`. Associated with UIKit notification\n\t// `applicationDidBecomeActive`.\n\t//\n\t// Stability: development\n\tIOSAppStateActive = IOSAppStateKey.String(\"active\")\n\t// The app is now `inactive`. Associated with UIKit notification\n\t// `applicationWillResignActive`.\n\t//\n\t// Stability: development\n\tIOSAppStateInactive = IOSAppStateKey.String(\"inactive\")\n\t// The app is now in the background. This value is associated with UIKit\n\t// notification `applicationDidEnterBackground`.\n\t//\n\t// Stability: development\n\tIOSAppStateBackground = IOSAppStateKey.String(\"background\")\n\t// The app is now in the foreground. This value is associated with UIKit\n\t// notification `applicationWillEnterForeground`.\n\t//\n\t// Stability: development\n\tIOSAppStateForeground = IOSAppStateKey.String(\"foreground\")\n\t// The app is about to terminate. Associated with UIKit notification\n\t// `applicationWillTerminate`.\n\t//\n\t// Stability: development\n\tIOSAppStateTerminate = IOSAppStateKey.String(\"terminate\")\n)\n\n// Namespace: jsonrpc\nconst (\n\t// JSONRPCProtocolVersionKey is the attribute Key conforming to the\n\t// \"jsonrpc.protocol.version\" semantic conventions. It represents the protocol\n\t// version, as specified in the `jsonrpc` property of the request and its\n\t// corresponding response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2.0\", \"1.0\"\n\tJSONRPCProtocolVersionKey = attribute.Key(\"jsonrpc.protocol.version\")\n\n\t// JSONRPCRequestIDKey is the attribute Key conforming to the\n\t// \"jsonrpc.request.id\" semantic conventions. It represents a string\n\t// representation of the `id` property of the request and its corresponding\n\t// response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"10\", \"request-7\"\n\t// Note: Under the [JSON-RPC specification], the `id` property may be a string,\n\t// number, null, or omitted entirely. When omitted, the request is treated as a\n\t// notification. Using `null` is not equivalent to omitting the `id`, but it is\n\t// discouraged.\n\t// Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or\n\t// omitted.\n\t//\n\t// [JSON-RPC specification]: https://www.jsonrpc.org/specification\n\tJSONRPCRequestIDKey = attribute.Key(\"jsonrpc.request.id\")\n)\n\n// JSONRPCProtocolVersion returns an attribute KeyValue conforming to the\n// \"jsonrpc.protocol.version\" semantic conventions. It represents the protocol\n// version, as specified in the `jsonrpc` property of the request and its\n// corresponding response.\nfunc JSONRPCProtocolVersion(val string) attribute.KeyValue {\n\treturn JSONRPCProtocolVersionKey.String(val)\n}\n\n// JSONRPCRequestID returns an attribute KeyValue conforming to the\n// \"jsonrpc.request.id\" semantic conventions. It represents a string\n// representation of the `id` property of the request and its corresponding\n// response.\nfunc JSONRPCRequestID(val string) attribute.KeyValue {\n\treturn JSONRPCRequestIDKey.String(val)\n}\n\n// Namespace: k8s\nconst (\n\t// K8SClusterNameKey is the attribute Key conforming to the \"k8s.cluster.name\"\n\t// semantic conventions. It represents the name of the cluster.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry-cluster\"\n\tK8SClusterNameKey = attribute.Key(\"k8s.cluster.name\")\n\n\t// K8SClusterUIDKey is the attribute Key conforming to the \"k8s.cluster.uid\"\n\t// semantic conventions. It represents a pseudo-ID for the cluster, set to the\n\t// UID of the `kube-system` namespace.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"\n\t// Note: K8s doesn't have support for obtaining a cluster ID. If this is ever\n\t// added, we will recommend collecting the `k8s.cluster.uid` through the\n\t// official APIs. In the meantime, we are able to use the `uid` of the\n\t// `kube-system` namespace as a proxy for cluster ID. Read on for the\n\t// rationale.\n\t//\n\t// Every object created in a K8s cluster is assigned a distinct UID. The\n\t// `kube-system` namespace is used by Kubernetes itself and will exist\n\t// for the lifetime of the cluster. Using the `uid` of the `kube-system`\n\t// namespace is a reasonable proxy for the K8s ClusterID as it will only\n\t// change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are\n\t// UUIDs as standardized by\n\t// [ISO/IEC 9834-8 and ITU-T X.667].\n\t// Which states:\n\t//\n\t// > If generated according to one of the mechanisms defined in Rec.\n\t// > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be\n\t// > different from all other UUIDs generated before 3603 A.D., or is\n\t// > extremely likely to be different (depending on the mechanism chosen).\n\t//\n\t// Therefore, UIDs between clusters should be extremely unlikely to\n\t// conflict.\n\t//\n\t// [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html\n\tK8SClusterUIDKey = attribute.Key(\"k8s.cluster.uid\")\n\n\t// K8SContainerNameKey is the attribute Key conforming to the\n\t// \"k8s.container.name\" semantic conventions. It represents the name of the\n\t// Container from Pod specification, must be unique within a Pod. Container\n\t// runtime usually uses different globally unique name (`container.name`).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"redis\"\n\tK8SContainerNameKey = attribute.Key(\"k8s.container.name\")\n\n\t// K8SContainerRestartCountKey is the attribute Key conforming to the\n\t// \"k8s.container.restart_count\" semantic conventions. It represents the number\n\t// of times the container was restarted. This attribute can be used to identify\n\t// a particular container (running or stopped) within a container spec.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples:\n\tK8SContainerRestartCountKey = attribute.Key(\"k8s.container.restart_count\")\n\n\t// K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to\n\t// the \"k8s.container.status.last_terminated_reason\" semantic conventions. It\n\t// represents the last terminated reason of the Container.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Evicted\", \"Error\"\n\tK8SContainerStatusLastTerminatedReasonKey = attribute.Key(\"k8s.container.status.last_terminated_reason\")\n\n\t// K8SContainerStatusReasonKey is the attribute Key conforming to the\n\t// \"k8s.container.status.reason\" semantic conventions. It represents the reason\n\t// for the container state. Corresponds to the `reason` field of the:\n\t// [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ContainerCreating\", \"CrashLoopBackOff\",\n\t// \"CreateContainerConfigError\", \"ErrImagePull\", \"ImagePullBackOff\",\n\t// \"OOMKilled\", \"Completed\", \"Error\", \"ContainerCannotRun\"\n\t//\n\t// [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core\n\t// [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core\n\tK8SContainerStatusReasonKey = attribute.Key(\"k8s.container.status.reason\")\n\n\t// K8SContainerStatusStateKey is the attribute Key conforming to the\n\t// \"k8s.container.status.state\" semantic conventions. It represents the state of\n\t// the container. [K8s ContainerState].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"terminated\", \"running\", \"waiting\"\n\t//\n\t// [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core\n\tK8SContainerStatusStateKey = attribute.Key(\"k8s.container.status.state\")\n\n\t// K8SCronJobNameKey is the attribute Key conforming to the \"k8s.cronjob.name\"\n\t// semantic conventions. It represents the name of the CronJob.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SCronJobNameKey = attribute.Key(\"k8s.cronjob.name\")\n\n\t// K8SCronJobUIDKey is the attribute Key conforming to the \"k8s.cronjob.uid\"\n\t// semantic conventions. It represents the UID of the CronJob.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SCronJobUIDKey = attribute.Key(\"k8s.cronjob.uid\")\n\n\t// K8SDaemonSetNameKey is the attribute Key conforming to the\n\t// \"k8s.daemonset.name\" semantic conventions. It represents the name of the\n\t// DaemonSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SDaemonSetNameKey = attribute.Key(\"k8s.daemonset.name\")\n\n\t// K8SDaemonSetUIDKey is the attribute Key conforming to the \"k8s.daemonset.uid\"\n\t// semantic conventions. It represents the UID of the DaemonSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SDaemonSetUIDKey = attribute.Key(\"k8s.daemonset.uid\")\n\n\t// K8SDeploymentNameKey is the attribute Key conforming to the\n\t// \"k8s.deployment.name\" semantic conventions. It represents the name of the\n\t// Deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SDeploymentNameKey = attribute.Key(\"k8s.deployment.name\")\n\n\t// K8SDeploymentUIDKey is the attribute Key conforming to the\n\t// \"k8s.deployment.uid\" semantic conventions. It represents the UID of the\n\t// Deployment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SDeploymentUIDKey = attribute.Key(\"k8s.deployment.uid\")\n\n\t// K8SHPAMetricTypeKey is the attribute Key conforming to the\n\t// \"k8s.hpa.metric.type\" semantic conventions. It represents the type of metric\n\t// source for the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Resource\", \"ContainerResource\"\n\t// Note: This attribute reflects the `type` field of spec.metrics[] in the HPA.\n\tK8SHPAMetricTypeKey = attribute.Key(\"k8s.hpa.metric.type\")\n\n\t// K8SHPANameKey is the attribute Key conforming to the \"k8s.hpa.name\" semantic\n\t// conventions. It represents the name of the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SHPANameKey = attribute.Key(\"k8s.hpa.name\")\n\n\t// K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.api_version\" semantic conventions. It represents the\n\t// API version of the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"apps/v1\", \"autoscaling/v2\"\n\t// Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA\n\t// spec.\n\tK8SHPAScaletargetrefAPIVersionKey = attribute.Key(\"k8s.hpa.scaletargetref.api_version\")\n\n\t// K8SHPAScaletargetrefKindKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.kind\" semantic conventions. It represents the kind of\n\t// the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Deployment\", \"StatefulSet\"\n\t// Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.\n\tK8SHPAScaletargetrefKindKey = attribute.Key(\"k8s.hpa.scaletargetref.kind\")\n\n\t// K8SHPAScaletargetrefNameKey is the attribute Key conforming to the\n\t// \"k8s.hpa.scaletargetref.name\" semantic conventions. It represents the name of\n\t// the target resource to scale for the HorizontalPodAutoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-deployment\", \"my-statefulset\"\n\t// Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec.\n\tK8SHPAScaletargetrefNameKey = attribute.Key(\"k8s.hpa.scaletargetref.name\")\n\n\t// K8SHPAUIDKey is the attribute Key conforming to the \"k8s.hpa.uid\" semantic\n\t// conventions. It represents the UID of the horizontal pod autoscaler.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SHPAUIDKey = attribute.Key(\"k8s.hpa.uid\")\n\n\t// K8SHugepageSizeKey is the attribute Key conforming to the \"k8s.hugepage.size\"\n\t// semantic conventions. It represents the size (identifier) of the K8s huge\n\t// page.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2Mi\"\n\tK8SHugepageSizeKey = attribute.Key(\"k8s.hugepage.size\")\n\n\t// K8SJobNameKey is the attribute Key conforming to the \"k8s.job.name\" semantic\n\t// conventions. It represents the name of the Job.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SJobNameKey = attribute.Key(\"k8s.job.name\")\n\n\t// K8SJobUIDKey is the attribute Key conforming to the \"k8s.job.uid\" semantic\n\t// conventions. It represents the UID of the Job.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SJobUIDKey = attribute.Key(\"k8s.job.uid\")\n\n\t// K8SNamespaceNameKey is the attribute Key conforming to the\n\t// \"k8s.namespace.name\" semantic conventions. It represents the name of the\n\t// namespace that the pod is running in.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"default\"\n\tK8SNamespaceNameKey = attribute.Key(\"k8s.namespace.name\")\n\n\t// K8SNamespacePhaseKey is the attribute Key conforming to the\n\t// \"k8s.namespace.phase\" semantic conventions. It represents the phase of the\n\t// K8s namespace.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"active\", \"terminating\"\n\t// Note: This attribute aligns with the `phase` field of the\n\t// [K8s NamespaceStatus]\n\t//\n\t// [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core\n\tK8SNamespacePhaseKey = attribute.Key(\"k8s.namespace.phase\")\n\n\t// K8SNodeConditionStatusKey is the attribute Key conforming to the\n\t// \"k8s.node.condition.status\" semantic conventions. It represents the status of\n\t// the condition, one of True, False, Unknown.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"true\", \"false\", \"unknown\"\n\t// Note: This attribute aligns with the `status` field of the\n\t// [NodeCondition]\n\t//\n\t// [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core\n\tK8SNodeConditionStatusKey = attribute.Key(\"k8s.node.condition.status\")\n\n\t// K8SNodeConditionTypeKey is the attribute Key conforming to the\n\t// \"k8s.node.condition.type\" semantic conventions. It represents the condition\n\t// type of a K8s Node.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Ready\", \"DiskPressure\"\n\t// Note: K8s Node conditions as described\n\t// by [K8s documentation].\n\t//\n\t// This attribute aligns with the `type` field of the\n\t// [NodeCondition]\n\t//\n\t// The set of possible values is not limited to those listed here. Managed\n\t// Kubernetes environments,\n\t// or custom controllers MAY introduce additional node condition types.\n\t// When this occurs, the exact value as reported by the Kubernetes API SHOULD be\n\t// used.\n\t//\n\t// [K8s documentation]: https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition\n\t// [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core\n\tK8SNodeConditionTypeKey = attribute.Key(\"k8s.node.condition.type\")\n\n\t// K8SNodeNameKey is the attribute Key conforming to the \"k8s.node.name\"\n\t// semantic conventions. It represents the name of the Node.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"node-1\"\n\tK8SNodeNameKey = attribute.Key(\"k8s.node.name\")\n\n\t// K8SNodeUIDKey is the attribute Key conforming to the \"k8s.node.uid\" semantic\n\t// conventions. It represents the UID of the Node.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2\"\n\tK8SNodeUIDKey = attribute.Key(\"k8s.node.uid\")\n\n\t// K8SPodHostnameKey is the attribute Key conforming to the \"k8s.pod.hostname\"\n\t// semantic conventions. It represents the specifies the hostname of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"collector-gateway\"\n\t// Note: The K8s Pod spec has an optional hostname field, which can be used to\n\t// specify a hostname.\n\t// Refer to [K8s docs]\n\t// for more information about this field.\n\t//\n\t// This attribute aligns with the `hostname` field of the\n\t// [K8s PodSpec].\n\t//\n\t// [K8s docs]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field\n\t// [K8s PodSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core\n\tK8SPodHostnameKey = attribute.Key(\"k8s.pod.hostname\")\n\n\t// K8SPodIPKey is the attribute Key conforming to the \"k8s.pod.ip\" semantic\n\t// conventions. It represents the IP address allocated to the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"172.18.0.2\"\n\t// Note: This attribute aligns with the `podIP` field of the\n\t// [K8s PodStatus].\n\t//\n\t// [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core\n\tK8SPodIPKey = attribute.Key(\"k8s.pod.ip\")\n\n\t// K8SPodNameKey is the attribute Key conforming to the \"k8s.pod.name\" semantic\n\t// conventions. It represents the name of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry-pod-autoconf\"\n\tK8SPodNameKey = attribute.Key(\"k8s.pod.name\")\n\n\t// K8SPodStartTimeKey is the attribute Key conforming to the\n\t// \"k8s.pod.start_time\" semantic conventions. It represents the start timestamp\n\t// of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"2025-12-04T08:41:03Z\"\n\t// Note: Date and time at which the object was acknowledged by the Kubelet.\n\t// This is before the Kubelet pulled the container image(s) for the pod.\n\t//\n\t// This attribute aligns with the `startTime` field of the\n\t// [K8s PodStatus],\n\t// in ISO 8601 (RFC 3339 compatible) format.\n\t//\n\t// [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core\n\tK8SPodStartTimeKey = attribute.Key(\"k8s.pod.start_time\")\n\n\t// K8SPodStatusPhaseKey is the attribute Key conforming to the\n\t// \"k8s.pod.status.phase\" semantic conventions. It represents the phase for the\n\t// pod. Corresponds to the `phase` field of the: [K8s PodStatus].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Pending\", \"Running\"\n\t//\n\t// [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core\n\tK8SPodStatusPhaseKey = attribute.Key(\"k8s.pod.status.phase\")\n\n\t// K8SPodStatusReasonKey is the attribute Key conforming to the\n\t// \"k8s.pod.status.reason\" semantic conventions. It represents the reason for\n\t// the pod state. Corresponds to the `reason` field of the: [K8s PodStatus].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Evicted\", \"NodeAffinity\"\n\t//\n\t// [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core\n\tK8SPodStatusReasonKey = attribute.Key(\"k8s.pod.status.reason\")\n\n\t// K8SPodUIDKey is the attribute Key conforming to the \"k8s.pod.uid\" semantic\n\t// conventions. It represents the UID of the Pod.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SPodUIDKey = attribute.Key(\"k8s.pod.uid\")\n\n\t// K8SReplicaSetNameKey is the attribute Key conforming to the\n\t// \"k8s.replicaset.name\" semantic conventions. It represents the name of the\n\t// ReplicaSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SReplicaSetNameKey = attribute.Key(\"k8s.replicaset.name\")\n\n\t// K8SReplicaSetUIDKey is the attribute Key conforming to the\n\t// \"k8s.replicaset.uid\" semantic conventions. It represents the UID of the\n\t// ReplicaSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SReplicaSetUIDKey = attribute.Key(\"k8s.replicaset.uid\")\n\n\t// K8SReplicationControllerNameKey is the attribute Key conforming to the\n\t// \"k8s.replicationcontroller.name\" semantic conventions. It represents the name\n\t// of the replication controller.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SReplicationControllerNameKey = attribute.Key(\"k8s.replicationcontroller.name\")\n\n\t// K8SReplicationControllerUIDKey is the attribute Key conforming to the\n\t// \"k8s.replicationcontroller.uid\" semantic conventions. It represents the UID\n\t// of the replication controller.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SReplicationControllerUIDKey = attribute.Key(\"k8s.replicationcontroller.uid\")\n\n\t// K8SResourceQuotaNameKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.name\" semantic conventions. It represents the name of the\n\t// resource quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SResourceQuotaNameKey = attribute.Key(\"k8s.resourcequota.name\")\n\n\t// K8SResourceQuotaResourceNameKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.resource_name\" semantic conventions. It represents the\n\t// name of the K8s resource a resource quota defines.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"count/replicationcontrollers\"\n\t// Note: The value for this attribute can be either the full\n\t// `count/<resource>[.<group>]` string (e.g., count/deployments.apps,\n\t// count/pods), or, for certain core Kubernetes resources, just the resource\n\t// name (e.g., pods, services, configmaps). Both forms are supported by\n\t// Kubernetes for object count quotas. See\n\t// [Kubernetes Resource Quotas documentation] for more details.\n\t//\n\t// [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count\n\tK8SResourceQuotaResourceNameKey = attribute.Key(\"k8s.resourcequota.resource_name\")\n\n\t// K8SResourceQuotaUIDKey is the attribute Key conforming to the\n\t// \"k8s.resourcequota.uid\" semantic conventions. It represents the UID of the\n\t// resource quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SResourceQuotaUIDKey = attribute.Key(\"k8s.resourcequota.uid\")\n\n\t// K8SStatefulSetNameKey is the attribute Key conforming to the\n\t// \"k8s.statefulset.name\" semantic conventions. It represents the name of the\n\t// StatefulSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"opentelemetry\"\n\tK8SStatefulSetNameKey = attribute.Key(\"k8s.statefulset.name\")\n\n\t// K8SStatefulSetUIDKey is the attribute Key conforming to the\n\t// \"k8s.statefulset.uid\" semantic conventions. It represents the UID of the\n\t// StatefulSet.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Alpha\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tK8SStatefulSetUIDKey = attribute.Key(\"k8s.statefulset.uid\")\n\n\t// K8SStorageclassNameKey is the attribute Key conforming to the\n\t// \"k8s.storageclass.name\" semantic conventions. It represents the name of K8s\n\t// [StorageClass] object.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"gold.storageclass.storage.k8s.io\"\n\t//\n\t// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io\n\tK8SStorageclassNameKey = attribute.Key(\"k8s.storageclass.name\")\n\n\t// K8SVolumeNameKey is the attribute Key conforming to the \"k8s.volume.name\"\n\t// semantic conventions. It represents the name of the K8s volume.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"volume0\"\n\tK8SVolumeNameKey = attribute.Key(\"k8s.volume.name\")\n\n\t// K8SVolumeTypeKey is the attribute Key conforming to the \"k8s.volume.type\"\n\t// semantic conventions. It represents the type of the K8s volume.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"emptyDir\", \"persistentVolumeClaim\"\n\tK8SVolumeTypeKey = attribute.Key(\"k8s.volume.type\")\n)\n\n// K8SClusterName returns an attribute KeyValue conforming to the\n// \"k8s.cluster.name\" semantic conventions. It represents the name of the\n// cluster.\nfunc K8SClusterName(val string) attribute.KeyValue {\n\treturn K8SClusterNameKey.String(val)\n}\n\n// K8SClusterUID returns an attribute KeyValue conforming to the\n// \"k8s.cluster.uid\" semantic conventions. It represents a pseudo-ID for the\n// cluster, set to the UID of the `kube-system` namespace.\nfunc K8SClusterUID(val string) attribute.KeyValue {\n\treturn K8SClusterUIDKey.String(val)\n}\n\n// K8SContainerName returns an attribute KeyValue conforming to the\n// \"k8s.container.name\" semantic conventions. It represents the name of the\n// Container from Pod specification, must be unique within a Pod. Container\n// runtime usually uses different globally unique name (`container.name`).\nfunc K8SContainerName(val string) attribute.KeyValue {\n\treturn K8SContainerNameKey.String(val)\n}\n\n// K8SContainerRestartCount returns an attribute KeyValue conforming to the\n// \"k8s.container.restart_count\" semantic conventions. It represents the number\n// of times the container was restarted. This attribute can be used to identify a\n// particular container (running or stopped) within a container spec.\nfunc K8SContainerRestartCount(val int) attribute.KeyValue {\n\treturn K8SContainerRestartCountKey.Int(val)\n}\n\n// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue\n// conforming to the \"k8s.container.status.last_terminated_reason\" semantic\n// conventions. It represents the last terminated reason of the Container.\nfunc K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {\n\treturn K8SContainerStatusLastTerminatedReasonKey.String(val)\n}\n\n// K8SCronJobAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.annotation\" semantic conventions. It represents the cronjob\n// annotation placed on the CronJob, the `<key>` being the annotation name, the\n// value being the annotation value.\nfunc K8SCronJobAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.cronjob.annotation.\"+key, val)\n}\n\n// K8SCronJobLabel returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.label\" semantic conventions. It represents the label placed on\n// the CronJob, the `<key>` being the label name, the value being the label\n// value.\nfunc K8SCronJobLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.cronjob.label.\"+key, val)\n}\n\n// K8SCronJobName returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.name\" semantic conventions. It represents the name of the\n// CronJob.\nfunc K8SCronJobName(val string) attribute.KeyValue {\n\treturn K8SCronJobNameKey.String(val)\n}\n\n// K8SCronJobUID returns an attribute KeyValue conforming to the\n// \"k8s.cronjob.uid\" semantic conventions. It represents the UID of the CronJob.\nfunc K8SCronJobUID(val string) attribute.KeyValue {\n\treturn K8SCronJobUIDKey.String(val)\n}\n\n// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.annotation\" semantic conventions. It represents the annotation\n// placed on the DaemonSet, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.daemonset.annotation.\"+key, val)\n}\n\n// K8SDaemonSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.label\" semantic conventions. It represents the label placed on\n// the DaemonSet, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SDaemonSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.daemonset.label.\"+key, val)\n}\n\n// K8SDaemonSetName returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.name\" semantic conventions. It represents the name of the\n// DaemonSet.\nfunc K8SDaemonSetName(val string) attribute.KeyValue {\n\treturn K8SDaemonSetNameKey.String(val)\n}\n\n// K8SDaemonSetUID returns an attribute KeyValue conforming to the\n// \"k8s.daemonset.uid\" semantic conventions. It represents the UID of the\n// DaemonSet.\nfunc K8SDaemonSetUID(val string) attribute.KeyValue {\n\treturn K8SDaemonSetUIDKey.String(val)\n}\n\n// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.deployment.annotation\" semantic conventions. It represents the annotation\n// placed on the Deployment, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SDeploymentAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.deployment.annotation.\"+key, val)\n}\n\n// K8SDeploymentLabel returns an attribute KeyValue conforming to the\n// \"k8s.deployment.label\" semantic conventions. It represents the label placed on\n// the Deployment, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SDeploymentLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.deployment.label.\"+key, val)\n}\n\n// K8SDeploymentName returns an attribute KeyValue conforming to the\n// \"k8s.deployment.name\" semantic conventions. It represents the name of the\n// Deployment.\nfunc K8SDeploymentName(val string) attribute.KeyValue {\n\treturn K8SDeploymentNameKey.String(val)\n}\n\n// K8SDeploymentUID returns an attribute KeyValue conforming to the\n// \"k8s.deployment.uid\" semantic conventions. It represents the UID of the\n// Deployment.\nfunc K8SDeploymentUID(val string) attribute.KeyValue {\n\treturn K8SDeploymentUIDKey.String(val)\n}\n\n// K8SHPAMetricType returns an attribute KeyValue conforming to the\n// \"k8s.hpa.metric.type\" semantic conventions. It represents the type of metric\n// source for the horizontal pod autoscaler.\nfunc K8SHPAMetricType(val string) attribute.KeyValue {\n\treturn K8SHPAMetricTypeKey.String(val)\n}\n\n// K8SHPAName returns an attribute KeyValue conforming to the \"k8s.hpa.name\"\n// semantic conventions. It represents the name of the horizontal pod autoscaler.\nfunc K8SHPAName(val string) attribute.KeyValue {\n\treturn K8SHPANameKey.String(val)\n}\n\n// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.api_version\" semantic conventions. It represents the\n// API version of the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefAPIVersionKey.String(val)\n}\n\n// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.kind\" semantic conventions. It represents the kind of\n// the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefKind(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefKindKey.String(val)\n}\n\n// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the\n// \"k8s.hpa.scaletargetref.name\" semantic conventions. It represents the name of\n// the target resource to scale for the HorizontalPodAutoscaler.\nfunc K8SHPAScaletargetrefName(val string) attribute.KeyValue {\n\treturn K8SHPAScaletargetrefNameKey.String(val)\n}\n\n// K8SHPAUID returns an attribute KeyValue conforming to the \"k8s.hpa.uid\"\n// semantic conventions. It represents the UID of the horizontal pod autoscaler.\nfunc K8SHPAUID(val string) attribute.KeyValue {\n\treturn K8SHPAUIDKey.String(val)\n}\n\n// K8SHugepageSize returns an attribute KeyValue conforming to the\n// \"k8s.hugepage.size\" semantic conventions. It represents the size (identifier)\n// of the K8s huge page.\nfunc K8SHugepageSize(val string) attribute.KeyValue {\n\treturn K8SHugepageSizeKey.String(val)\n}\n\n// K8SJobAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.job.annotation\" semantic conventions. It represents the annotation placed\n// on the Job, the `<key>` being the annotation name, the value being the\n// annotation value, even if the value is empty.\nfunc K8SJobAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.job.annotation.\"+key, val)\n}\n\n// K8SJobLabel returns an attribute KeyValue conforming to the \"k8s.job.label\"\n// semantic conventions. It represents the label placed on the Job, the `<key>`\n// being the label name, the value being the label value, even if the value is\n// empty.\nfunc K8SJobLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.job.label.\"+key, val)\n}\n\n// K8SJobName returns an attribute KeyValue conforming to the \"k8s.job.name\"\n// semantic conventions. It represents the name of the Job.\nfunc K8SJobName(val string) attribute.KeyValue {\n\treturn K8SJobNameKey.String(val)\n}\n\n// K8SJobUID returns an attribute KeyValue conforming to the \"k8s.job.uid\"\n// semantic conventions. It represents the UID of the Job.\nfunc K8SJobUID(val string) attribute.KeyValue {\n\treturn K8SJobUIDKey.String(val)\n}\n\n// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.namespace.annotation\" semantic conventions. It represents the annotation\n// placed on the Namespace, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SNamespaceAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.namespace.annotation.\"+key, val)\n}\n\n// K8SNamespaceLabel returns an attribute KeyValue conforming to the\n// \"k8s.namespace.label\" semantic conventions. It represents the label placed on\n// the Namespace, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SNamespaceLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.namespace.label.\"+key, val)\n}\n\n// K8SNamespaceName returns an attribute KeyValue conforming to the\n// \"k8s.namespace.name\" semantic conventions. It represents the name of the\n// namespace that the pod is running in.\nfunc K8SNamespaceName(val string) attribute.KeyValue {\n\treturn K8SNamespaceNameKey.String(val)\n}\n\n// K8SNodeAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.node.annotation\" semantic conventions. It represents the annotation\n// placed on the Node, the `<key>` being the annotation name, the value being the\n// annotation value, even if the value is empty.\nfunc K8SNodeAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.node.annotation.\"+key, val)\n}\n\n// K8SNodeLabel returns an attribute KeyValue conforming to the \"k8s.node.label\"\n// semantic conventions. It represents the label placed on the Node, the `<key>`\n// being the label name, the value being the label value, even if the value is\n// empty.\nfunc K8SNodeLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.node.label.\"+key, val)\n}\n\n// K8SNodeName returns an attribute KeyValue conforming to the \"k8s.node.name\"\n// semantic conventions. It represents the name of the Node.\nfunc K8SNodeName(val string) attribute.KeyValue {\n\treturn K8SNodeNameKey.String(val)\n}\n\n// K8SNodeUID returns an attribute KeyValue conforming to the \"k8s.node.uid\"\n// semantic conventions. It represents the UID of the Node.\nfunc K8SNodeUID(val string) attribute.KeyValue {\n\treturn K8SNodeUIDKey.String(val)\n}\n\n// K8SPodAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.pod.annotation\" semantic conventions. It represents the annotation placed\n// on the Pod, the `<key>` being the annotation name, the value being the\n// annotation value.\nfunc K8SPodAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.pod.annotation.\"+key, val)\n}\n\n// K8SPodHostname returns an attribute KeyValue conforming to the\n// \"k8s.pod.hostname\" semantic conventions. It represents the specifies the\n// hostname of the Pod.\nfunc K8SPodHostname(val string) attribute.KeyValue {\n\treturn K8SPodHostnameKey.String(val)\n}\n\n// K8SPodIP returns an attribute KeyValue conforming to the \"k8s.pod.ip\" semantic\n// conventions. It represents the IP address allocated to the Pod.\nfunc K8SPodIP(val string) attribute.KeyValue {\n\treturn K8SPodIPKey.String(val)\n}\n\n// K8SPodLabel returns an attribute KeyValue conforming to the \"k8s.pod.label\"\n// semantic conventions. It represents the label placed on the Pod, the `<key>`\n// being the label name, the value being the label value.\nfunc K8SPodLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.pod.label.\"+key, val)\n}\n\n// K8SPodName returns an attribute KeyValue conforming to the \"k8s.pod.name\"\n// semantic conventions. It represents the name of the Pod.\nfunc K8SPodName(val string) attribute.KeyValue {\n\treturn K8SPodNameKey.String(val)\n}\n\n// K8SPodStartTime returns an attribute KeyValue conforming to the\n// \"k8s.pod.start_time\" semantic conventions. It represents the start timestamp\n// of the Pod.\nfunc K8SPodStartTime(val string) attribute.KeyValue {\n\treturn K8SPodStartTimeKey.String(val)\n}\n\n// K8SPodUID returns an attribute KeyValue conforming to the \"k8s.pod.uid\"\n// semantic conventions. It represents the UID of the Pod.\nfunc K8SPodUID(val string) attribute.KeyValue {\n\treturn K8SPodUIDKey.String(val)\n}\n\n// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.annotation\" semantic conventions. It represents the annotation\n// placed on the ReplicaSet, the `<key>` being the annotation name, the value\n// being the annotation value, even if the value is empty.\nfunc K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.replicaset.annotation.\"+key, val)\n}\n\n// K8SReplicaSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.label\" semantic conventions. It represents the label placed on\n// the ReplicaSet, the `<key>` being the label name, the value being the label\n// value, even if the value is empty.\nfunc K8SReplicaSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.replicaset.label.\"+key, val)\n}\n\n// K8SReplicaSetName returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.name\" semantic conventions. It represents the name of the\n// ReplicaSet.\nfunc K8SReplicaSetName(val string) attribute.KeyValue {\n\treturn K8SReplicaSetNameKey.String(val)\n}\n\n// K8SReplicaSetUID returns an attribute KeyValue conforming to the\n// \"k8s.replicaset.uid\" semantic conventions. It represents the UID of the\n// ReplicaSet.\nfunc K8SReplicaSetUID(val string) attribute.KeyValue {\n\treturn K8SReplicaSetUIDKey.String(val)\n}\n\n// K8SReplicationControllerName returns an attribute KeyValue conforming to the\n// \"k8s.replicationcontroller.name\" semantic conventions. It represents the name\n// of the replication controller.\nfunc K8SReplicationControllerName(val string) attribute.KeyValue {\n\treturn K8SReplicationControllerNameKey.String(val)\n}\n\n// K8SReplicationControllerUID returns an attribute KeyValue conforming to the\n// \"k8s.replicationcontroller.uid\" semantic conventions. It represents the UID of\n// the replication controller.\nfunc K8SReplicationControllerUID(val string) attribute.KeyValue {\n\treturn K8SReplicationControllerUIDKey.String(val)\n}\n\n// K8SResourceQuotaName returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.name\" semantic conventions. It represents the name of the\n// resource quota.\nfunc K8SResourceQuotaName(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaNameKey.String(val)\n}\n\n// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.resource_name\" semantic conventions. It represents the name\n// of the K8s resource a resource quota defines.\nfunc K8SResourceQuotaResourceName(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaResourceNameKey.String(val)\n}\n\n// K8SResourceQuotaUID returns an attribute KeyValue conforming to the\n// \"k8s.resourcequota.uid\" semantic conventions. It represents the UID of the\n// resource quota.\nfunc K8SResourceQuotaUID(val string) attribute.KeyValue {\n\treturn K8SResourceQuotaUIDKey.String(val)\n}\n\n// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.annotation\" semantic conventions. It represents the\n// annotation placed on the StatefulSet, the `<key>` being the annotation name,\n// the value being the annotation value, even if the value is empty.\nfunc K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.statefulset.annotation.\"+key, val)\n}\n\n// K8SStatefulSetLabel returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.label\" semantic conventions. It represents the label placed\n// on the StatefulSet, the `<key>` being the label name, the value being the\n// label value, even if the value is empty.\nfunc K8SStatefulSetLabel(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"k8s.statefulset.label.\"+key, val)\n}\n\n// K8SStatefulSetName returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.name\" semantic conventions. It represents the name of the\n// StatefulSet.\nfunc K8SStatefulSetName(val string) attribute.KeyValue {\n\treturn K8SStatefulSetNameKey.String(val)\n}\n\n// K8SStatefulSetUID returns an attribute KeyValue conforming to the\n// \"k8s.statefulset.uid\" semantic conventions. It represents the UID of the\n// StatefulSet.\nfunc K8SStatefulSetUID(val string) attribute.KeyValue {\n\treturn K8SStatefulSetUIDKey.String(val)\n}\n\n// K8SStorageclassName returns an attribute KeyValue conforming to the\n// \"k8s.storageclass.name\" semantic conventions. It represents the name of K8s\n// [StorageClass] object.\n//\n// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io\nfunc K8SStorageclassName(val string) attribute.KeyValue {\n\treturn K8SStorageclassNameKey.String(val)\n}\n\n// K8SVolumeName returns an attribute KeyValue conforming to the\n// \"k8s.volume.name\" semantic conventions. It represents the name of the K8s\n// volume.\nfunc K8SVolumeName(val string) attribute.KeyValue {\n\treturn K8SVolumeNameKey.String(val)\n}\n\n// Enum values for k8s.container.status.reason\nvar (\n\t// The container is being created.\n\t// Stability: development\n\tK8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String(\"ContainerCreating\")\n\t// The container is in a crash loop back off state.\n\t// Stability: development\n\tK8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String(\"CrashLoopBackOff\")\n\t// There was an error creating the container configuration.\n\t// Stability: development\n\tK8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String(\"CreateContainerConfigError\")\n\t// There was an error pulling the container image.\n\t// Stability: development\n\tK8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String(\"ErrImagePull\")\n\t// The container image pull is in back off state.\n\t// Stability: development\n\tK8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String(\"ImagePullBackOff\")\n\t// The container was killed due to out of memory.\n\t// Stability: development\n\tK8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String(\"OOMKilled\")\n\t// The container has completed execution.\n\t// Stability: development\n\tK8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String(\"Completed\")\n\t// There was an error with the container.\n\t// Stability: development\n\tK8SContainerStatusReasonError = K8SContainerStatusReasonKey.String(\"Error\")\n\t// The container cannot run.\n\t// Stability: development\n\tK8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String(\"ContainerCannotRun\")\n)\n\n// Enum values for k8s.container.status.state\nvar (\n\t// The container has terminated.\n\t// Stability: development\n\tK8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String(\"terminated\")\n\t// The container is running.\n\t// Stability: development\n\tK8SContainerStatusStateRunning = K8SContainerStatusStateKey.String(\"running\")\n\t// The container is waiting.\n\t// Stability: development\n\tK8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String(\"waiting\")\n)\n\n// Enum values for k8s.namespace.phase\nvar (\n\t// Active namespace phase as described by [K8s API]\n\t// Stability: development\n\t//\n\t// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase\n\tK8SNamespacePhaseActive = K8SNamespacePhaseKey.String(\"active\")\n\t// Terminating namespace phase as described by [K8s API]\n\t// Stability: development\n\t//\n\t// [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase\n\tK8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String(\"terminating\")\n)\n\n// Enum values for k8s.node.condition.status\nvar (\n\t// condition_true\n\t// Stability: development\n\tK8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String(\"true\")\n\t// condition_false\n\t// Stability: development\n\tK8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String(\"false\")\n\t// condition_unknown\n\t// Stability: development\n\tK8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String(\"unknown\")\n)\n\n// Enum values for k8s.node.condition.type\nvar (\n\t// The node is healthy and ready to accept pods\n\t// Stability: development\n\tK8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String(\"Ready\")\n\t// Pressure exists on the disk size—that is, if the disk capacity is low\n\t// Stability: development\n\tK8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String(\"DiskPressure\")\n\t// Pressure exists on the node memory—that is, if the node memory is low\n\t// Stability: development\n\tK8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String(\"MemoryPressure\")\n\t// Pressure exists on the processes—that is, if there are too many processes\n\t// on the node\n\t// Stability: development\n\tK8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String(\"PIDPressure\")\n\t// The network for the node is not correctly configured\n\t// Stability: development\n\tK8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String(\"NetworkUnavailable\")\n)\n\n// Enum values for k8s.pod.status.phase\nvar (\n\t// The pod has been accepted by the system, but one or more of the containers\n\t// has not been started. This includes time before being bound to a node, as\n\t// well as time spent pulling images onto the host.\n\t//\n\t// Stability: development\n\tK8SPodStatusPhasePending = K8SPodStatusPhaseKey.String(\"Pending\")\n\t// The pod has been bound to a node and all of the containers have been started.\n\t// At least one container is still running or is in the process of being\n\t// restarted.\n\t//\n\t// Stability: development\n\tK8SPodStatusPhaseRunning = K8SPodStatusPhaseKey.String(\"Running\")\n\t// All containers in the pod have voluntarily terminated with a container exit\n\t// code of 0, and the system is not going to restart any of these containers.\n\t//\n\t// Stability: development\n\tK8SPodStatusPhaseSucceeded = K8SPodStatusPhaseKey.String(\"Succeeded\")\n\t// All containers in the pod have terminated, and at least one container has\n\t// terminated in a failure (exited with a non-zero exit code or was stopped by\n\t// the system).\n\t//\n\t// Stability: development\n\tK8SPodStatusPhaseFailed = K8SPodStatusPhaseKey.String(\"Failed\")\n\t// For some reason the state of the pod could not be obtained, typically due to\n\t// an error in communicating with the host of the pod.\n\t//\n\t// Stability: development\n\tK8SPodStatusPhaseUnknown = K8SPodStatusPhaseKey.String(\"Unknown\")\n)\n\n// Enum values for k8s.pod.status.reason\nvar (\n\t// The pod is evicted.\n\t// Stability: development\n\tK8SPodStatusReasonEvicted = K8SPodStatusReasonKey.String(\"Evicted\")\n\t// The pod is in a status because of its node affinity\n\t// Stability: development\n\tK8SPodStatusReasonNodeAffinity = K8SPodStatusReasonKey.String(\"NodeAffinity\")\n\t// The reason on a pod when its state cannot be confirmed as kubelet is\n\t// unresponsive on the node it is (was) running.\n\t//\n\t// Stability: development\n\tK8SPodStatusReasonNodeLost = K8SPodStatusReasonKey.String(\"NodeLost\")\n\t// The node is shutdown\n\t// Stability: development\n\tK8SPodStatusReasonShutdown = K8SPodStatusReasonKey.String(\"Shutdown\")\n\t// The pod was rejected admission to the node because of an error during\n\t// admission that could not be categorized.\n\t//\n\t// Stability: development\n\tK8SPodStatusReasonUnexpectedAdmissionError = K8SPodStatusReasonKey.String(\"UnexpectedAdmissionError\")\n)\n\n// Enum values for k8s.volume.type\nvar (\n\t// A [persistentVolumeClaim] volume\n\t// Stability: development\n\t//\n\t// [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim\n\tK8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String(\"persistentVolumeClaim\")\n\t// A [configMap] volume\n\t// Stability: development\n\t//\n\t// [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap\n\tK8SVolumeTypeConfigMap = K8SVolumeTypeKey.String(\"configMap\")\n\t// A [downwardAPI] volume\n\t// Stability: development\n\t//\n\t// [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi\n\tK8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String(\"downwardAPI\")\n\t// An [emptyDir] volume\n\t// Stability: development\n\t//\n\t// [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir\n\tK8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String(\"emptyDir\")\n\t// A [secret] volume\n\t// Stability: development\n\t//\n\t// [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret\n\tK8SVolumeTypeSecret = K8SVolumeTypeKey.String(\"secret\")\n\t// A [local] volume\n\t// Stability: development\n\t//\n\t// [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local\n\tK8SVolumeTypeLocal = K8SVolumeTypeKey.String(\"local\")\n)\n\n// Namespace: log\nconst (\n\t// LogFileNameKey is the attribute Key conforming to the \"log.file.name\"\n\t// semantic conventions. It represents the basename of the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"audit.log\"\n\tLogFileNameKey = attribute.Key(\"log.file.name\")\n\n\t// LogFileNameResolvedKey is the attribute Key conforming to the\n\t// \"log.file.name_resolved\" semantic conventions. It represents the basename of\n\t// the file, with symlinks resolved.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"uuid.log\"\n\tLogFileNameResolvedKey = attribute.Key(\"log.file.name_resolved\")\n\n\t// LogFilePathKey is the attribute Key conforming to the \"log.file.path\"\n\t// semantic conventions. It represents the full path to the file.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/var/log/mysql/audit.log\"\n\tLogFilePathKey = attribute.Key(\"log.file.path\")\n\n\t// LogFilePathResolvedKey is the attribute Key conforming to the\n\t// \"log.file.path_resolved\" semantic conventions. It represents the full path to\n\t// the file, with symlinks resolved.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/var/lib/docker/uuid.log\"\n\tLogFilePathResolvedKey = attribute.Key(\"log.file.path_resolved\")\n\n\t// LogIostreamKey is the attribute Key conforming to the \"log.iostream\" semantic\n\t// conventions. It represents the stream associated with the log. See below for\n\t// a list of well-known values.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tLogIostreamKey = attribute.Key(\"log.iostream\")\n\n\t// LogRecordOriginalKey is the attribute Key conforming to the\n\t// \"log.record.original\" semantic conventions. It represents the complete\n\t// original Log Record.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - -\n\t// Something happened\", \"[INFO] 8/3/24 12:34:56 Something happened\"\n\t// Note: This value MAY be added when processing a Log Record which was\n\t// originally transmitted as a string or equivalent data type AND the Body field\n\t// of the Log Record does not contain the same value. (e.g. a syslog or a log\n\t// record read from a file.)\n\tLogRecordOriginalKey = attribute.Key(\"log.record.original\")\n\n\t// LogRecordUIDKey is the attribute Key conforming to the \"log.record.uid\"\n\t// semantic conventions. It represents a unique identifier for the Log Record.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"01ARZ3NDEKTSV4RRFFQ69G5FAV\"\n\t// Note: If an id is provided, other log records with the same id will be\n\t// considered duplicates and can be removed safely. This means, that two\n\t// distinguishable log records MUST have different values.\n\t// The id MAY be an\n\t// [Universally Unique Lexicographically Sortable Identifier (ULID)], but other\n\t// identifiers (e.g. UUID) may be used as needed.\n\t//\n\t// [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec\n\tLogRecordUIDKey = attribute.Key(\"log.record.uid\")\n)\n\n// LogFileName returns an attribute KeyValue conforming to the \"log.file.name\"\n// semantic conventions. It represents the basename of the file.\nfunc LogFileName(val string) attribute.KeyValue {\n\treturn LogFileNameKey.String(val)\n}\n\n// LogFileNameResolved returns an attribute KeyValue conforming to the\n// \"log.file.name_resolved\" semantic conventions. It represents the basename of\n// the file, with symlinks resolved.\nfunc LogFileNameResolved(val string) attribute.KeyValue {\n\treturn LogFileNameResolvedKey.String(val)\n}\n\n// LogFilePath returns an attribute KeyValue conforming to the \"log.file.path\"\n// semantic conventions. It represents the full path to the file.\nfunc LogFilePath(val string) attribute.KeyValue {\n\treturn LogFilePathKey.String(val)\n}\n\n// LogFilePathResolved returns an attribute KeyValue conforming to the\n// \"log.file.path_resolved\" semantic conventions. It represents the full path to\n// the file, with symlinks resolved.\nfunc LogFilePathResolved(val string) attribute.KeyValue {\n\treturn LogFilePathResolvedKey.String(val)\n}\n\n// LogRecordOriginal returns an attribute KeyValue conforming to the\n// \"log.record.original\" semantic conventions. It represents the complete\n// original Log Record.\nfunc LogRecordOriginal(val string) attribute.KeyValue {\n\treturn LogRecordOriginalKey.String(val)\n}\n\n// LogRecordUID returns an attribute KeyValue conforming to the \"log.record.uid\"\n// semantic conventions. It represents a unique identifier for the Log Record.\nfunc LogRecordUID(val string) attribute.KeyValue {\n\treturn LogRecordUIDKey.String(val)\n}\n\n// Enum values for log.iostream\nvar (\n\t// Logs from stdout stream\n\t// Stability: development\n\tLogIostreamStdout = LogIostreamKey.String(\"stdout\")\n\t// Events from stderr stream\n\t// Stability: development\n\tLogIostreamStderr = LogIostreamKey.String(\"stderr\")\n)\n\n// Namespace: mainframe\nconst (\n\t// MainframeLparNameKey is the attribute Key conforming to the\n\t// \"mainframe.lpar.name\" semantic conventions. It represents the name of the\n\t// logical partition that hosts a systems with a mainframe operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"LPAR01\"\n\tMainframeLparNameKey = attribute.Key(\"mainframe.lpar.name\")\n)\n\n// MainframeLparName returns an attribute KeyValue conforming to the\n// \"mainframe.lpar.name\" semantic conventions. It represents the name of the\n// logical partition that hosts a systems with a mainframe operating system.\nfunc MainframeLparName(val string) attribute.KeyValue {\n\treturn MainframeLparNameKey.String(val)\n}\n\n// Namespace: mcp\nconst (\n\t// McpMethodNameKey is the attribute Key conforming to the \"mcp.method.name\"\n\t// semantic conventions. It represents the name of the request or notification\n\t// method.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMcpMethodNameKey = attribute.Key(\"mcp.method.name\")\n\n\t// McpProtocolVersionKey is the attribute Key conforming to the\n\t// \"mcp.protocol.version\" semantic conventions. It represents the [version] of\n\t// the Model Context Protocol used.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2025-06-18\"\n\t//\n\t// [version]: https://modelcontextprotocol.io/specification/versioning\n\tMcpProtocolVersionKey = attribute.Key(\"mcp.protocol.version\")\n\n\t// McpResourceURIKey is the attribute Key conforming to the \"mcp.resource.uri\"\n\t// semantic conventions. It represents the value of the resource uri.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"postgres://database/customers/schema\",\n\t// \"file:///home/user/documents/report.pdf\"\n\t// Note: This is a URI of the resource provided in the following requests or\n\t// notifications: `resources/read`, `resources/subscribe`,\n\t// `resources/unsubscribe`, or `notifications/resources/updated`.\n\tMcpResourceURIKey = attribute.Key(\"mcp.resource.uri\")\n\n\t// McpSessionIDKey is the attribute Key conforming to the \"mcp.session.id\"\n\t// semantic conventions. It represents the identifies [MCP session].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"191c4850af6c49e08843a3f6c80e5046\"\n\t//\n\t// [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management\n\tMcpSessionIDKey = attribute.Key(\"mcp.session.id\")\n)\n\n// McpProtocolVersion returns an attribute KeyValue conforming to the\n// \"mcp.protocol.version\" semantic conventions. It represents the [version] of\n// the Model Context Protocol used.\n//\n// [version]: https://modelcontextprotocol.io/specification/versioning\nfunc McpProtocolVersion(val string) attribute.KeyValue {\n\treturn McpProtocolVersionKey.String(val)\n}\n\n// McpResourceURI returns an attribute KeyValue conforming to the\n// \"mcp.resource.uri\" semantic conventions. It represents the value of the\n// resource uri.\nfunc McpResourceURI(val string) attribute.KeyValue {\n\treturn McpResourceURIKey.String(val)\n}\n\n// McpSessionID returns an attribute KeyValue conforming to the \"mcp.session.id\"\n// semantic conventions. It represents the identifies [MCP session].\n//\n// [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management\nfunc McpSessionID(val string) attribute.KeyValue {\n\treturn McpSessionIDKey.String(val)\n}\n\n// Enum values for mcp.method.name\nvar (\n\t// Notification cancelling a previously-issued request.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsCancelled = McpMethodNameKey.String(\"notifications/cancelled\")\n\t// Request to initialize the MCP client.\n\t//\n\t// Stability: development\n\tMcpMethodNameInitialize = McpMethodNameKey.String(\"initialize\")\n\t// Notification indicating that the MCP client has been initialized.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsInitialized = McpMethodNameKey.String(\"notifications/initialized\")\n\t// Notification indicating the progress for a long-running operation.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsProgress = McpMethodNameKey.String(\"notifications/progress\")\n\t// Request to check that the other party is still alive.\n\t//\n\t// Stability: development\n\tMcpMethodNamePing = McpMethodNameKey.String(\"ping\")\n\t// Request to list resources available on server.\n\t//\n\t// Stability: development\n\tMcpMethodNameResourcesList = McpMethodNameKey.String(\"resources/list\")\n\t// Request to list resource templates available on server.\n\t//\n\t// Stability: development\n\tMcpMethodNameResourcesTemplatesList = McpMethodNameKey.String(\"resources/templates/list\")\n\t// Request to read a resource.\n\t//\n\t// Stability: development\n\tMcpMethodNameResourcesRead = McpMethodNameKey.String(\"resources/read\")\n\t// Notification indicating that the list of resources has changed.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsResourcesListChanged = McpMethodNameKey.String(\"notifications/resources/list_changed\")\n\t// Request to subscribe to a resource.\n\t//\n\t// Stability: development\n\tMcpMethodNameResourcesSubscribe = McpMethodNameKey.String(\"resources/subscribe\")\n\t// Request to unsubscribe from resource updates.\n\t//\n\t// Stability: development\n\tMcpMethodNameResourcesUnsubscribe = McpMethodNameKey.String(\"resources/unsubscribe\")\n\t// Notification indicating that a resource has been updated.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsResourcesUpdated = McpMethodNameKey.String(\"notifications/resources/updated\")\n\t// Request to list prompts available on server.\n\t//\n\t// Stability: development\n\tMcpMethodNamePromptsList = McpMethodNameKey.String(\"prompts/list\")\n\t// Request to get a prompt.\n\t//\n\t// Stability: development\n\tMcpMethodNamePromptsGet = McpMethodNameKey.String(\"prompts/get\")\n\t// Notification indicating that the list of prompts has changed.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsPromptsListChanged = McpMethodNameKey.String(\"notifications/prompts/list_changed\")\n\t// Request to list tools available on server.\n\t//\n\t// Stability: development\n\tMcpMethodNameToolsList = McpMethodNameKey.String(\"tools/list\")\n\t// Request to call a tool.\n\t//\n\t// Stability: development\n\tMcpMethodNameToolsCall = McpMethodNameKey.String(\"tools/call\")\n\t// Notification indicating that the list of tools has changed.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsToolsListChanged = McpMethodNameKey.String(\"notifications/tools/list_changed\")\n\t// Request to set the logging level.\n\t//\n\t// Stability: development\n\tMcpMethodNameLoggingSetLevel = McpMethodNameKey.String(\"logging/setLevel\")\n\t// Notification indicating that a message has been received.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsMessage = McpMethodNameKey.String(\"notifications/message\")\n\t// Request to create a sampling message.\n\t//\n\t// Stability: development\n\tMcpMethodNameSamplingCreateMessage = McpMethodNameKey.String(\"sampling/createMessage\")\n\t// Request to complete a prompt.\n\t//\n\t// Stability: development\n\tMcpMethodNameCompletionComplete = McpMethodNameKey.String(\"completion/complete\")\n\t// Request to list roots available on server.\n\t//\n\t// Stability: development\n\tMcpMethodNameRootsList = McpMethodNameKey.String(\"roots/list\")\n\t// Notification indicating that the list of roots has changed.\n\t//\n\t// Stability: development\n\tMcpMethodNameNotificationsRootsListChanged = McpMethodNameKey.String(\"notifications/roots/list_changed\")\n\t// Request from the server to elicit additional information from the user via\n\t// the client\n\t//\n\t// Stability: development\n\tMcpMethodNameElicitationCreate = McpMethodNameKey.String(\"elicitation/create\")\n)\n\n// Namespace: messaging\nconst (\n\t// MessagingBatchMessageCountKey is the attribute Key conforming to the\n\t// \"messaging.batch.message_count\" semantic conventions. It represents the\n\t// number of messages sent, received, or processed in the scope of the batching\n\t// operation.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 0, 1, 2\n\t// Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on\n\t// spans that operate with a single message. When a messaging client library\n\t// supports both batch and single-message API for the same operation,\n\t// instrumentations SHOULD use `messaging.batch.message_count` for batching APIs\n\t// and SHOULD NOT use it for single-message APIs.\n\tMessagingBatchMessageCountKey = attribute.Key(\"messaging.batch.message_count\")\n\n\t// MessagingClientIDKey is the attribute Key conforming to the\n\t// \"messaging.client.id\" semantic conventions. It represents a unique identifier\n\t// for the client that consumes or produces a message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"client-5\", \"myhost@8742@s8083jm\"\n\tMessagingClientIDKey = attribute.Key(\"messaging.client.id\")\n\n\t// MessagingConsumerGroupNameKey is the attribute Key conforming to the\n\t// \"messaging.consumer.group.name\" semantic conventions. It represents the name\n\t// of the consumer group with which a consumer is associated.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-group\", \"indexer\"\n\t// Note: Semantic conventions for individual messaging systems SHOULD document\n\t// whether `messaging.consumer.group.name` is applicable and what it means in\n\t// the context of that system.\n\tMessagingConsumerGroupNameKey = attribute.Key(\"messaging.consumer.group.name\")\n\n\t// MessagingDestinationAnonymousKey is the attribute Key conforming to the\n\t// \"messaging.destination.anonymous\" semantic conventions. It represents a\n\t// boolean that is true if the message destination is anonymous (could be\n\t// unnamed or have auto-generated name).\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingDestinationAnonymousKey = attribute.Key(\"messaging.destination.anonymous\")\n\n\t// MessagingDestinationNameKey is the attribute Key conforming to the\n\t// \"messaging.destination.name\" semantic conventions. It represents the message\n\t// destination name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MyQueue\", \"MyTopic\"\n\t// Note: Destination name SHOULD uniquely identify a specific queue, topic or\n\t// other entity within the broker. If\n\t// the broker doesn't have such notion, the destination name SHOULD uniquely\n\t// identify the broker.\n\tMessagingDestinationNameKey = attribute.Key(\"messaging.destination.name\")\n\n\t// MessagingDestinationPartitionIDKey is the attribute Key conforming to the\n\t// \"messaging.destination.partition.id\" semantic conventions. It represents the\n\t// identifier of the partition messages are sent to or received from, unique\n\t// within the `messaging.destination.name`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1\n\tMessagingDestinationPartitionIDKey = attribute.Key(\"messaging.destination.partition.id\")\n\n\t// MessagingDestinationSubscriptionNameKey is the attribute Key conforming to\n\t// the \"messaging.destination.subscription.name\" semantic conventions. It\n\t// represents the name of the destination subscription from which a message is\n\t// consumed.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"subscription-a\"\n\t// Note: Semantic conventions for individual messaging systems SHOULD document\n\t// whether `messaging.destination.subscription.name` is applicable and what it\n\t// means in the context of that system.\n\tMessagingDestinationSubscriptionNameKey = attribute.Key(\"messaging.destination.subscription.name\")\n\n\t// MessagingDestinationTemplateKey is the attribute Key conforming to the\n\t// \"messaging.destination.template\" semantic conventions. It represents the low\n\t// cardinality representation of the messaging destination name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/customers/{customerId}\"\n\t// Note: Destination names could be constructed from templates. An example would\n\t// be a destination name involving a user name or product id. Although the\n\t// destination name in this case is of high cardinality, the underlying template\n\t// is of low cardinality and can be effectively used for grouping and\n\t// aggregation.\n\tMessagingDestinationTemplateKey = attribute.Key(\"messaging.destination.template\")\n\n\t// MessagingDestinationTemporaryKey is the attribute Key conforming to the\n\t// \"messaging.destination.temporary\" semantic conventions. It represents a\n\t// boolean that is true if the message destination is temporary and might not\n\t// exist anymore after messages are processed.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingDestinationTemporaryKey = attribute.Key(\"messaging.destination.temporary\")\n\n\t// MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to\n\t// the \"messaging.eventhubs.message.enqueued_time\" semantic conventions. It\n\t// represents the UTC epoch seconds at which the message has been accepted and\n\t// stored in the entity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingEventHubsMessageEnqueuedTimeKey = attribute.Key(\"messaging.eventhubs.message.enqueued_time\")\n\n\t// MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to\n\t// the \"messaging.gcp_pubsub.message.ack_deadline\" semantic conventions. It\n\t// represents the ack deadline in seconds set for the modify ack deadline\n\t// request.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingGCPPubSubMessageAckDeadlineKey = attribute.Key(\"messaging.gcp_pubsub.message.ack_deadline\")\n\n\t// MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the\n\t// \"messaging.gcp_pubsub.message.ack_id\" semantic conventions. It represents the\n\t// ack id for a given message.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: ack_id\n\tMessagingGCPPubSubMessageAckIDKey = attribute.Key(\"messaging.gcp_pubsub.message.ack_id\")\n\n\t// MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming\n\t// to the \"messaging.gcp_pubsub.message.delivery_attempt\" semantic conventions.\n\t// It represents the delivery attempt for a given message.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key(\"messaging.gcp_pubsub.message.delivery_attempt\")\n\n\t// MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to\n\t// the \"messaging.gcp_pubsub.message.ordering_key\" semantic conventions. It\n\t// represents the ordering key for a given message. If the attribute is not\n\t// present, the message does not have an ordering key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: ordering_key\n\tMessagingGCPPubSubMessageOrderingKeyKey = attribute.Key(\"messaging.gcp_pubsub.message.ordering_key\")\n\n\t// MessagingKafkaMessageKeyKey is the attribute Key conforming to the\n\t// \"messaging.kafka.message.key\" semantic conventions. It represents the message\n\t// keys in Kafka are used for grouping alike messages to ensure they're\n\t// processed on the same partition. They differ from `messaging.message.id` in\n\t// that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myKey\n\t// Note: If the key type is not string, it's string representation has to be\n\t// supplied for the attribute. If the key has no unambiguous, canonical string\n\t// form, don't include its value.\n\tMessagingKafkaMessageKeyKey = attribute.Key(\"messaging.kafka.message.key\")\n\n\t// MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the\n\t// \"messaging.kafka.message.tombstone\" semantic conventions. It represents a\n\t// boolean that is true if the message is a tombstone.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingKafkaMessageTombstoneKey = attribute.Key(\"messaging.kafka.message.tombstone\")\n\n\t// MessagingKafkaOffsetKey is the attribute Key conforming to the\n\t// \"messaging.kafka.offset\" semantic conventions. It represents the offset of a\n\t// record in the corresponding Kafka partition.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingKafkaOffsetKey = attribute.Key(\"messaging.kafka.offset\")\n\n\t// MessagingMessageBodySizeKey is the attribute Key conforming to the\n\t// \"messaging.message.body.size\" semantic conventions. It represents the size of\n\t// the message body in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: This can refer to both the compressed or uncompressed body size. If\n\t// both sizes are known, the uncompressed\n\t// body size should be used.\n\tMessagingMessageBodySizeKey = attribute.Key(\"messaging.message.body.size\")\n\n\t// MessagingMessageConversationIDKey is the attribute Key conforming to the\n\t// \"messaging.message.conversation_id\" semantic conventions. It represents the\n\t// conversation ID identifying the conversation to which the message belongs,\n\t// represented as a string. Sometimes called \"Correlation ID\".\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: MyConversationId\n\tMessagingMessageConversationIDKey = attribute.Key(\"messaging.message.conversation_id\")\n\n\t// MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the\n\t// \"messaging.message.envelope.size\" semantic conventions. It represents the\n\t// size of the message body and metadata in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note: This can refer to both the compressed or uncompressed size. If both\n\t// sizes are known, the uncompressed\n\t// size should be used.\n\tMessagingMessageEnvelopeSizeKey = attribute.Key(\"messaging.message.envelope.size\")\n\n\t// MessagingMessageIDKey is the attribute Key conforming to the\n\t// \"messaging.message.id\" semantic conventions. It represents a value used by\n\t// the messaging system as an identifier for the message, represented as a\n\t// string.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 452a7c7c7c7048c2f887f61572b18fc2\n\tMessagingMessageIDKey = attribute.Key(\"messaging.message.id\")\n\n\t// MessagingOperationNameKey is the attribute Key conforming to the\n\t// \"messaging.operation.name\" semantic conventions. It represents the\n\t// system-specific name of the messaging operation.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ack\", \"nack\", \"send\"\n\tMessagingOperationNameKey = attribute.Key(\"messaging.operation.name\")\n\n\t// MessagingOperationTypeKey is the attribute Key conforming to the\n\t// \"messaging.operation.type\" semantic conventions. It represents a string\n\t// identifying the type of the messaging operation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: If a custom value is used, it MUST be of low cardinality.\n\tMessagingOperationTypeKey = attribute.Key(\"messaging.operation.type\")\n\n\t// MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to\n\t// the \"messaging.rabbitmq.destination.routing_key\" semantic conventions. It\n\t// represents the rabbitMQ message routing key.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myKey\n\tMessagingRabbitMQDestinationRoutingKeyKey = attribute.Key(\"messaging.rabbitmq.destination.routing_key\")\n\n\t// MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the\n\t// \"messaging.rabbitmq.message.delivery_tag\" semantic conventions. It represents\n\t// the rabbitMQ message delivery tag.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRabbitMQMessageDeliveryTagKey = attribute.Key(\"messaging.rabbitmq.message.delivery_tag\")\n\n\t// MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.consumption_model\" semantic conventions. It represents\n\t// the model of message consumption. This only applies to consumer spans.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingRocketMQConsumptionModelKey = attribute.Key(\"messaging.rocketmq.consumption_model\")\n\n\t// MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to\n\t// the \"messaging.rocketmq.message.delay_time_level\" semantic conventions. It\n\t// represents the delay time level for delay message, which determines the\n\t// message delay time.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRocketMQMessageDelayTimeLevelKey = attribute.Key(\"messaging.rocketmq.message.delay_time_level\")\n\n\t// MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming\n\t// to the \"messaging.rocketmq.message.delivery_timestamp\" semantic conventions.\n\t// It represents the timestamp in milliseconds that the delay message is\n\t// expected to be delivered to consumer.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingRocketMQMessageDeliveryTimestampKey = attribute.Key(\"messaging.rocketmq.message.delivery_timestamp\")\n\n\t// MessagingRocketMQMessageGroupKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.group\" semantic conventions. It represents the it\n\t// is essential for FIFO message. Messages that belong to the same message group\n\t// are always processed one by one within the same consumer group.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myMessageGroup\n\tMessagingRocketMQMessageGroupKey = attribute.Key(\"messaging.rocketmq.message.group\")\n\n\t// MessagingRocketMQMessageKeysKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.keys\" semantic conventions. It represents the\n\t// key(s) of message, another way to mark message besides message id.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"keyA\", \"keyB\"\n\tMessagingRocketMQMessageKeysKey = attribute.Key(\"messaging.rocketmq.message.keys\")\n\n\t// MessagingRocketMQMessageTagKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.tag\" semantic conventions. It represents the\n\t// secondary classifier of message besides topic.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: tagA\n\tMessagingRocketMQMessageTagKey = attribute.Key(\"messaging.rocketmq.message.tag\")\n\n\t// MessagingRocketMQMessageTypeKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.message.type\" semantic conventions. It represents the\n\t// type of message.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tMessagingRocketMQMessageTypeKey = attribute.Key(\"messaging.rocketmq.message.type\")\n\n\t// MessagingRocketMQNamespaceKey is the attribute Key conforming to the\n\t// \"messaging.rocketmq.namespace\" semantic conventions. It represents the\n\t// namespace of RocketMQ resources, resources in different namespaces are\n\t// individual.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: myNamespace\n\tMessagingRocketMQNamespaceKey = attribute.Key(\"messaging.rocketmq.namespace\")\n\n\t// MessagingServiceBusDispositionStatusKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.disposition_status\" semantic conventions. It\n\t// represents the describes the [settlement type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n\tMessagingServiceBusDispositionStatusKey = attribute.Key(\"messaging.servicebus.disposition_status\")\n\n\t// MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.message.delivery_count\" semantic conventions. It\n\t// represents the number of deliveries that have been attempted for this\n\t// message.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingServiceBusMessageDeliveryCountKey = attribute.Key(\"messaging.servicebus.message.delivery_count\")\n\n\t// MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to\n\t// the \"messaging.servicebus.message.enqueued_time\" semantic conventions. It\n\t// represents the UTC epoch seconds at which the message has been accepted and\n\t// stored in the entity.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\tMessagingServiceBusMessageEnqueuedTimeKey = attribute.Key(\"messaging.servicebus.message.enqueued_time\")\n\n\t// MessagingSystemKey is the attribute Key conforming to the \"messaging.system\"\n\t// semantic conventions. It represents the messaging system as identified by the\n\t// client instrumentation.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The actual messaging system may differ from the one known by the\n\t// client. For example, when using Kafka client libraries to communicate with\n\t// Azure Event Hubs, the `messaging.system` is set to `kafka` based on the\n\t// instrumentation's best knowledge.\n\tMessagingSystemKey = attribute.Key(\"messaging.system\")\n)\n\n// MessagingBatchMessageCount returns an attribute KeyValue conforming to the\n// \"messaging.batch.message_count\" semantic conventions. It represents the number\n// of messages sent, received, or processed in the scope of the batching\n// operation.\nfunc MessagingBatchMessageCount(val int) attribute.KeyValue {\n\treturn MessagingBatchMessageCountKey.Int(val)\n}\n\n// MessagingClientID returns an attribute KeyValue conforming to the\n// \"messaging.client.id\" semantic conventions. It represents a unique identifier\n// for the client that consumes or produces a message.\nfunc MessagingClientID(val string) attribute.KeyValue {\n\treturn MessagingClientIDKey.String(val)\n}\n\n// MessagingConsumerGroupName returns an attribute KeyValue conforming to the\n// \"messaging.consumer.group.name\" semantic conventions. It represents the name\n// of the consumer group with which a consumer is associated.\nfunc MessagingConsumerGroupName(val string) attribute.KeyValue {\n\treturn MessagingConsumerGroupNameKey.String(val)\n}\n\n// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the\n// \"messaging.destination.anonymous\" semantic conventions. It represents a\n// boolean that is true if the message destination is anonymous (could be unnamed\n// or have auto-generated name).\nfunc MessagingDestinationAnonymous(val bool) attribute.KeyValue {\n\treturn MessagingDestinationAnonymousKey.Bool(val)\n}\n\n// MessagingDestinationName returns an attribute KeyValue conforming to the\n// \"messaging.destination.name\" semantic conventions. It represents the message\n// destination name.\nfunc MessagingDestinationName(val string) attribute.KeyValue {\n\treturn MessagingDestinationNameKey.String(val)\n}\n\n// MessagingDestinationPartitionID returns an attribute KeyValue conforming to\n// the \"messaging.destination.partition.id\" semantic conventions. It represents\n// the identifier of the partition messages are sent to or received from, unique\n// within the `messaging.destination.name`.\nfunc MessagingDestinationPartitionID(val string) attribute.KeyValue {\n\treturn MessagingDestinationPartitionIDKey.String(val)\n}\n\n// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming\n// to the \"messaging.destination.subscription.name\" semantic conventions. It\n// represents the name of the destination subscription from which a message is\n// consumed.\nfunc MessagingDestinationSubscriptionName(val string) attribute.KeyValue {\n\treturn MessagingDestinationSubscriptionNameKey.String(val)\n}\n\n// MessagingDestinationTemplate returns an attribute KeyValue conforming to the\n// \"messaging.destination.template\" semantic conventions. It represents the low\n// cardinality representation of the messaging destination name.\nfunc MessagingDestinationTemplate(val string) attribute.KeyValue {\n\treturn MessagingDestinationTemplateKey.String(val)\n}\n\n// MessagingDestinationTemporary returns an attribute KeyValue conforming to the\n// \"messaging.destination.temporary\" semantic conventions. It represents a\n// boolean that is true if the message destination is temporary and might not\n// exist anymore after messages are processed.\nfunc MessagingDestinationTemporary(val bool) attribute.KeyValue {\n\treturn MessagingDestinationTemporaryKey.Bool(val)\n}\n\n// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming\n// to the \"messaging.eventhubs.message.enqueued_time\" semantic conventions. It\n// represents the UTC epoch seconds at which the message has been accepted and\n// stored in the entity.\nfunc MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue {\n\treturn MessagingEventHubsMessageEnqueuedTimeKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming\n// to the \"messaging.gcp_pubsub.message.ack_deadline\" semantic conventions. It\n// represents the ack deadline in seconds set for the modify ack deadline\n// request.\nfunc MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageAckDeadlineKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the\n// \"messaging.gcp_pubsub.message.ack_id\" semantic conventions. It represents the\n// ack id for a given message.\nfunc MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageAckIDKey.String(val)\n}\n\n// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue\n// conforming to the \"messaging.gcp_pubsub.message.delivery_attempt\" semantic\n// conventions. It represents the delivery attempt for a given message.\nfunc MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val)\n}\n\n// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming\n// to the \"messaging.gcp_pubsub.message.ordering_key\" semantic conventions. It\n// represents the ordering key for a given message. If the attribute is not\n// present, the message does not have an ordering key.\nfunc MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue {\n\treturn MessagingGCPPubSubMessageOrderingKeyKey.String(val)\n}\n\n// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the\n// \"messaging.kafka.message.key\" semantic conventions. It represents the message\n// keys in Kafka are used for grouping alike messages to ensure they're processed\n// on the same partition. They differ from `messaging.message.id` in that they're\n// not unique. If the key is `null`, the attribute MUST NOT be set.\nfunc MessagingKafkaMessageKey(val string) attribute.KeyValue {\n\treturn MessagingKafkaMessageKeyKey.String(val)\n}\n\n// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the\n// \"messaging.kafka.message.tombstone\" semantic conventions. It represents a\n// boolean that is true if the message is a tombstone.\nfunc MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {\n\treturn MessagingKafkaMessageTombstoneKey.Bool(val)\n}\n\n// MessagingKafkaOffset returns an attribute KeyValue conforming to the\n// \"messaging.kafka.offset\" semantic conventions. It represents the offset of a\n// record in the corresponding Kafka partition.\nfunc MessagingKafkaOffset(val int) attribute.KeyValue {\n\treturn MessagingKafkaOffsetKey.Int(val)\n}\n\n// MessagingMessageBodySize returns an attribute KeyValue conforming to the\n// \"messaging.message.body.size\" semantic conventions. It represents the size of\n// the message body in bytes.\nfunc MessagingMessageBodySize(val int) attribute.KeyValue {\n\treturn MessagingMessageBodySizeKey.Int(val)\n}\n\n// MessagingMessageConversationID returns an attribute KeyValue conforming to the\n// \"messaging.message.conversation_id\" semantic conventions. It represents the\n// conversation ID identifying the conversation to which the message belongs,\n// represented as a string. Sometimes called \"Correlation ID\".\nfunc MessagingMessageConversationID(val string) attribute.KeyValue {\n\treturn MessagingMessageConversationIDKey.String(val)\n}\n\n// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the\n// \"messaging.message.envelope.size\" semantic conventions. It represents the size\n// of the message body and metadata in bytes.\nfunc MessagingMessageEnvelopeSize(val int) attribute.KeyValue {\n\treturn MessagingMessageEnvelopeSizeKey.Int(val)\n}\n\n// MessagingMessageID returns an attribute KeyValue conforming to the\n// \"messaging.message.id\" semantic conventions. It represents a value used by the\n// messaging system as an identifier for the message, represented as a string.\nfunc MessagingMessageID(val string) attribute.KeyValue {\n\treturn MessagingMessageIDKey.String(val)\n}\n\n// MessagingOperationName returns an attribute KeyValue conforming to the\n// \"messaging.operation.name\" semantic conventions. It represents the\n// system-specific name of the messaging operation.\nfunc MessagingOperationName(val string) attribute.KeyValue {\n\treturn MessagingOperationNameKey.String(val)\n}\n\n// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue\n// conforming to the \"messaging.rabbitmq.destination.routing_key\" semantic\n// conventions. It represents the rabbitMQ message routing key.\nfunc MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue {\n\treturn MessagingRabbitMQDestinationRoutingKeyKey.String(val)\n}\n\n// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming\n// to the \"messaging.rabbitmq.message.delivery_tag\" semantic conventions. It\n// represents the rabbitMQ message delivery tag.\nfunc MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue {\n\treturn MessagingRabbitMQMessageDeliveryTagKey.Int(val)\n}\n\n// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue\n// conforming to the \"messaging.rocketmq.message.delay_time_level\" semantic\n// conventions. It represents the delay time level for delay message, which\n// determines the message delay time.\nfunc MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue {\n\treturn MessagingRocketMQMessageDelayTimeLevelKey.Int(val)\n}\n\n// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue\n// conforming to the \"messaging.rocketmq.message.delivery_timestamp\" semantic\n// conventions. It represents the timestamp in milliseconds that the delay\n// message is expected to be delivered to consumer.\nfunc MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue {\n\treturn MessagingRocketMQMessageDeliveryTimestampKey.Int(val)\n}\n\n// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.group\" semantic conventions. It represents the it\n// is essential for FIFO message. Messages that belong to the same message group\n// are always processed one by one within the same consumer group.\nfunc MessagingRocketMQMessageGroup(val string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageGroupKey.String(val)\n}\n\n// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.keys\" semantic conventions. It represents the\n// key(s) of message, another way to mark message besides message id.\nfunc MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageKeysKey.StringSlice(val)\n}\n\n// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.message.tag\" semantic conventions. It represents the\n// secondary classifier of message besides topic.\nfunc MessagingRocketMQMessageTag(val string) attribute.KeyValue {\n\treturn MessagingRocketMQMessageTagKey.String(val)\n}\n\n// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the\n// \"messaging.rocketmq.namespace\" semantic conventions. It represents the\n// namespace of RocketMQ resources, resources in different namespaces are\n// individual.\nfunc MessagingRocketMQNamespace(val string) attribute.KeyValue {\n\treturn MessagingRocketMQNamespaceKey.String(val)\n}\n\n// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue\n// conforming to the \"messaging.servicebus.message.delivery_count\" semantic\n// conventions. It represents the number of deliveries that have been attempted\n// for this message.\nfunc MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue {\n\treturn MessagingServiceBusMessageDeliveryCountKey.Int(val)\n}\n\n// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue\n// conforming to the \"messaging.servicebus.message.enqueued_time\" semantic\n// conventions. It represents the UTC epoch seconds at which the message has been\n// accepted and stored in the entity.\nfunc MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue {\n\treturn MessagingServiceBusMessageEnqueuedTimeKey.Int(val)\n}\n\n// Enum values for messaging.operation.type\nvar (\n\t// A message is created. \"Create\" spans always refer to a single message and are\n\t// used to provide a unique creation context for messages in batch sending\n\t// scenarios.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeCreate = MessagingOperationTypeKey.String(\"create\")\n\t// One or more messages are provided for sending to an intermediary. If a single\n\t// message is sent, the context of the \"Send\" span can be used as the creation\n\t// context and no \"Create\" span needs to be created.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeSend = MessagingOperationTypeKey.String(\"send\")\n\t// One or more messages are requested by a consumer. This operation refers to\n\t// pull-based scenarios, where consumers explicitly call methods of messaging\n\t// SDKs to receive messages.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeReceive = MessagingOperationTypeKey.String(\"receive\")\n\t// One or more messages are processed by a consumer.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeProcess = MessagingOperationTypeKey.String(\"process\")\n\t// One or more messages are settled.\n\t//\n\t// Stability: development\n\tMessagingOperationTypeSettle = MessagingOperationTypeKey.String(\"settle\")\n)\n\n// Enum values for messaging.rocketmq.consumption_model\nvar (\n\t// Clustering consumption model\n\t// Stability: development\n\tMessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String(\"clustering\")\n\t// Broadcasting consumption model\n\t// Stability: development\n\tMessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String(\"broadcasting\")\n)\n\n// Enum values for messaging.rocketmq.message.type\nvar (\n\t// Normal message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String(\"normal\")\n\t// FIFO message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String(\"fifo\")\n\t// Delay message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String(\"delay\")\n\t// Transaction message\n\t// Stability: development\n\tMessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String(\"transaction\")\n)\n\n// Enum values for messaging.servicebus.disposition_status\nvar (\n\t// Message is completed\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String(\"complete\")\n\t// Message is abandoned\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String(\"abandon\")\n\t// Message is sent to dead letter queue\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String(\"dead_letter\")\n\t// Message is deferred\n\t// Stability: development\n\tMessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String(\"defer\")\n)\n\n// Enum values for messaging.system\nvar (\n\t// Apache ActiveMQ\n\t// Stability: development\n\tMessagingSystemActiveMQ = MessagingSystemKey.String(\"activemq\")\n\t// Amazon Simple Notification Service (SNS)\n\t// Stability: development\n\tMessagingSystemAWSSNS = MessagingSystemKey.String(\"aws.sns\")\n\t// Amazon Simple Queue Service (SQS)\n\t// Stability: development\n\tMessagingSystemAWSSQS = MessagingSystemKey.String(\"aws_sqs\")\n\t// Azure Event Grid\n\t// Stability: development\n\tMessagingSystemEventGrid = MessagingSystemKey.String(\"eventgrid\")\n\t// Azure Event Hubs\n\t// Stability: development\n\tMessagingSystemEventHubs = MessagingSystemKey.String(\"eventhubs\")\n\t// Azure Service Bus\n\t// Stability: development\n\tMessagingSystemServiceBus = MessagingSystemKey.String(\"servicebus\")\n\t// Google Cloud Pub/Sub\n\t// Stability: development\n\tMessagingSystemGCPPubSub = MessagingSystemKey.String(\"gcp_pubsub\")\n\t// Java Message Service\n\t// Stability: development\n\tMessagingSystemJMS = MessagingSystemKey.String(\"jms\")\n\t// Apache Kafka\n\t// Stability: development\n\tMessagingSystemKafka = MessagingSystemKey.String(\"kafka\")\n\t// RabbitMQ\n\t// Stability: development\n\tMessagingSystemRabbitMQ = MessagingSystemKey.String(\"rabbitmq\")\n\t// Apache RocketMQ\n\t// Stability: development\n\tMessagingSystemRocketMQ = MessagingSystemKey.String(\"rocketmq\")\n\t// Apache Pulsar\n\t// Stability: development\n\tMessagingSystemPulsar = MessagingSystemKey.String(\"pulsar\")\n)\n\n// Namespace: network\nconst (\n\t// NetworkCarrierICCKey is the attribute Key conforming to the\n\t// \"network.carrier.icc\" semantic conventions. It represents the ISO 3166-1\n\t// alpha-2 2-character country code associated with the mobile carrier network.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: DE\n\tNetworkCarrierICCKey = attribute.Key(\"network.carrier.icc\")\n\n\t// NetworkCarrierMCCKey is the attribute Key conforming to the\n\t// \"network.carrier.mcc\" semantic conventions. It represents the mobile carrier\n\t// country code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 310\n\tNetworkCarrierMCCKey = attribute.Key(\"network.carrier.mcc\")\n\n\t// NetworkCarrierMNCKey is the attribute Key conforming to the\n\t// \"network.carrier.mnc\" semantic conventions. It represents the mobile carrier\n\t// network code.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 001\n\tNetworkCarrierMNCKey = attribute.Key(\"network.carrier.mnc\")\n\n\t// NetworkCarrierNameKey is the attribute Key conforming to the\n\t// \"network.carrier.name\" semantic conventions. It represents the name of the\n\t// mobile carrier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: sprint\n\tNetworkCarrierNameKey = attribute.Key(\"network.carrier.name\")\n\n\t// NetworkConnectionStateKey is the attribute Key conforming to the\n\t// \"network.connection.state\" semantic conventions. It represents the state of\n\t// network connection.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"close_wait\"\n\t// Note: Connection states are defined as part of the [rfc9293]\n\t//\n\t// [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2\n\tNetworkConnectionStateKey = attribute.Key(\"network.connection.state\")\n\n\t// NetworkConnectionSubtypeKey is the attribute Key conforming to the\n\t// \"network.connection.subtype\" semantic conventions. It represents the this\n\t// describes more details regarding the connection.type. It may be the type of\n\t// cell technology connection, but it could be used for describing details about\n\t// a wifi connection.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: LTE\n\tNetworkConnectionSubtypeKey = attribute.Key(\"network.connection.subtype\")\n\n\t// NetworkConnectionTypeKey is the attribute Key conforming to the\n\t// \"network.connection.type\" semantic conventions. It represents the internet\n\t// connection type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: wifi\n\tNetworkConnectionTypeKey = attribute.Key(\"network.connection.type\")\n\n\t// NetworkInterfaceNameKey is the attribute Key conforming to the\n\t// \"network.interface.name\" semantic conventions. It represents the network\n\t// interface name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"lo\", \"eth0\"\n\tNetworkInterfaceNameKey = attribute.Key(\"network.interface.name\")\n\n\t// NetworkIODirectionKey is the attribute Key conforming to the\n\t// \"network.io.direction\" semantic conventions. It represents the network IO\n\t// operation direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"transmit\"\n\tNetworkIODirectionKey = attribute.Key(\"network.io.direction\")\n\n\t// NetworkLocalAddressKey is the attribute Key conforming to the\n\t// \"network.local.address\" semantic conventions. It represents the local address\n\t// of the network connection - IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"10.1.2.80\", \"/tmp/my.sock\"\n\tNetworkLocalAddressKey = attribute.Key(\"network.local.address\")\n\n\t// NetworkLocalPortKey is the attribute Key conforming to the\n\t// \"network.local.port\" semantic conventions. It represents the local port\n\t// number of the network connection.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\tNetworkLocalPortKey = attribute.Key(\"network.local.port\")\n\n\t// NetworkPeerAddressKey is the attribute Key conforming to the\n\t// \"network.peer.address\" semantic conventions. It represents the peer address\n\t// of the network connection - IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"10.1.2.80\", \"/tmp/my.sock\"\n\tNetworkPeerAddressKey = attribute.Key(\"network.peer.address\")\n\n\t// NetworkPeerPortKey is the attribute Key conforming to the \"network.peer.port\"\n\t// semantic conventions. It represents the peer port number of the network\n\t// connection.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 65123\n\tNetworkPeerPortKey = attribute.Key(\"network.peer.port\")\n\n\t// NetworkProtocolNameKey is the attribute Key conforming to the\n\t// \"network.protocol.name\" semantic conventions. It represents the\n\t// [OSI application layer] or non-OSI equivalent.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"amqp\", \"http\", \"mqtt\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\n\tNetworkProtocolNameKey = attribute.Key(\"network.protocol.name\")\n\n\t// NetworkProtocolVersionKey is the attribute Key conforming to the\n\t// \"network.protocol.version\" semantic conventions. It represents the actual\n\t// version of the protocol used for network communication.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.1\", \"2\"\n\t// Note: If protocol version is subject to negotiation (for example using [ALPN]\n\t// ), this attribute SHOULD be set to the negotiated version. If the actual\n\t// protocol version is not known, this attribute SHOULD NOT be set.\n\t//\n\t// [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html\n\tNetworkProtocolVersionKey = attribute.Key(\"network.protocol.version\")\n\n\t// NetworkTransportKey is the attribute Key conforming to the\n\t// \"network.transport\" semantic conventions. It represents the\n\t// [OSI transport layer] or [inter-process communication method].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"tcp\", \"udp\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// Consider always setting the transport when setting a port number, since\n\t// a port number is ambiguous without knowing the transport. For example\n\t// different processes could be listening on TCP port 12345 and UDP port 12345.\n\t//\n\t// [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer\n\t// [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication\n\tNetworkTransportKey = attribute.Key(\"network.transport\")\n\n\t// NetworkTypeKey is the attribute Key conforming to the \"network.type\" semantic\n\t// conventions. It represents the [OSI network layer] or non-OSI equivalent.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"ipv4\", \"ipv6\"\n\t// Note: The value SHOULD be normalized to lowercase.\n\t//\n\t// [OSI network layer]: https://wikipedia.org/wiki/Network_layer\n\tNetworkTypeKey = attribute.Key(\"network.type\")\n)\n\n// NetworkCarrierICC returns an attribute KeyValue conforming to the\n// \"network.carrier.icc\" semantic conventions. It represents the ISO 3166-1\n// alpha-2 2-character country code associated with the mobile carrier network.\nfunc NetworkCarrierICC(val string) attribute.KeyValue {\n\treturn NetworkCarrierICCKey.String(val)\n}\n\n// NetworkCarrierMCC returns an attribute KeyValue conforming to the\n// \"network.carrier.mcc\" semantic conventions. It represents the mobile carrier\n// country code.\nfunc NetworkCarrierMCC(val string) attribute.KeyValue {\n\treturn NetworkCarrierMCCKey.String(val)\n}\n\n// NetworkCarrierMNC returns an attribute KeyValue conforming to the\n// \"network.carrier.mnc\" semantic conventions. It represents the mobile carrier\n// network code.\nfunc NetworkCarrierMNC(val string) attribute.KeyValue {\n\treturn NetworkCarrierMNCKey.String(val)\n}\n\n// NetworkCarrierName returns an attribute KeyValue conforming to the\n// \"network.carrier.name\" semantic conventions. It represents the name of the\n// mobile carrier.\nfunc NetworkCarrierName(val string) attribute.KeyValue {\n\treturn NetworkCarrierNameKey.String(val)\n}\n\n// NetworkInterfaceName returns an attribute KeyValue conforming to the\n// \"network.interface.name\" semantic conventions. It represents the network\n// interface name.\nfunc NetworkInterfaceName(val string) attribute.KeyValue {\n\treturn NetworkInterfaceNameKey.String(val)\n}\n\n// NetworkLocalAddress returns an attribute KeyValue conforming to the\n// \"network.local.address\" semantic conventions. It represents the local address\n// of the network connection - IP address or Unix domain socket name.\nfunc NetworkLocalAddress(val string) attribute.KeyValue {\n\treturn NetworkLocalAddressKey.String(val)\n}\n\n// NetworkLocalPort returns an attribute KeyValue conforming to the\n// \"network.local.port\" semantic conventions. It represents the local port number\n// of the network connection.\nfunc NetworkLocalPort(val int) attribute.KeyValue {\n\treturn NetworkLocalPortKey.Int(val)\n}\n\n// NetworkPeerAddress returns an attribute KeyValue conforming to the\n// \"network.peer.address\" semantic conventions. It represents the peer address of\n// the network connection - IP address or Unix domain socket name.\nfunc NetworkPeerAddress(val string) attribute.KeyValue {\n\treturn NetworkPeerAddressKey.String(val)\n}\n\n// NetworkPeerPort returns an attribute KeyValue conforming to the\n// \"network.peer.port\" semantic conventions. It represents the peer port number\n// of the network connection.\nfunc NetworkPeerPort(val int) attribute.KeyValue {\n\treturn NetworkPeerPortKey.Int(val)\n}\n\n// NetworkProtocolName returns an attribute KeyValue conforming to the\n// \"network.protocol.name\" semantic conventions. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc NetworkProtocolName(val string) attribute.KeyValue {\n\treturn NetworkProtocolNameKey.String(val)\n}\n\n// NetworkProtocolVersion returns an attribute KeyValue conforming to the\n// \"network.protocol.version\" semantic conventions. It represents the actual\n// version of the protocol used for network communication.\nfunc NetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn NetworkProtocolVersionKey.String(val)\n}\n\n// Enum values for network.connection.state\nvar (\n\t// closed\n\t// Stability: development\n\tNetworkConnectionStateClosed = NetworkConnectionStateKey.String(\"closed\")\n\t// close_wait\n\t// Stability: development\n\tNetworkConnectionStateCloseWait = NetworkConnectionStateKey.String(\"close_wait\")\n\t// closing\n\t// Stability: development\n\tNetworkConnectionStateClosing = NetworkConnectionStateKey.String(\"closing\")\n\t// established\n\t// Stability: development\n\tNetworkConnectionStateEstablished = NetworkConnectionStateKey.String(\"established\")\n\t// fin_wait_1\n\t// Stability: development\n\tNetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String(\"fin_wait_1\")\n\t// fin_wait_2\n\t// Stability: development\n\tNetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String(\"fin_wait_2\")\n\t// last_ack\n\t// Stability: development\n\tNetworkConnectionStateLastAck = NetworkConnectionStateKey.String(\"last_ack\")\n\t// listen\n\t// Stability: development\n\tNetworkConnectionStateListen = NetworkConnectionStateKey.String(\"listen\")\n\t// syn_received\n\t// Stability: development\n\tNetworkConnectionStateSynReceived = NetworkConnectionStateKey.String(\"syn_received\")\n\t// syn_sent\n\t// Stability: development\n\tNetworkConnectionStateSynSent = NetworkConnectionStateKey.String(\"syn_sent\")\n\t// time_wait\n\t// Stability: development\n\tNetworkConnectionStateTimeWait = NetworkConnectionStateKey.String(\"time_wait\")\n)\n\n// Enum values for network.connection.subtype\nvar (\n\t// GPRS\n\t// Stability: development\n\tNetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String(\"gprs\")\n\t// EDGE\n\t// Stability: development\n\tNetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String(\"edge\")\n\t// UMTS\n\t// Stability: development\n\tNetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String(\"umts\")\n\t// CDMA\n\t// Stability: development\n\tNetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String(\"cdma\")\n\t// EVDO Rel. 0\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String(\"evdo_0\")\n\t// EVDO Rev. A\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String(\"evdo_a\")\n\t// CDMA2000 1XRTT\n\t// Stability: development\n\tNetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String(\"cdma2000_1xrtt\")\n\t// HSDPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String(\"hsdpa\")\n\t// HSUPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String(\"hsupa\")\n\t// HSPA\n\t// Stability: development\n\tNetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String(\"hspa\")\n\t// IDEN\n\t// Stability: development\n\tNetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String(\"iden\")\n\t// EVDO Rev. B\n\t// Stability: development\n\tNetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String(\"evdo_b\")\n\t// LTE\n\t// Stability: development\n\tNetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String(\"lte\")\n\t// EHRPD\n\t// Stability: development\n\tNetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String(\"ehrpd\")\n\t// HSPAP\n\t// Stability: development\n\tNetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String(\"hspap\")\n\t// GSM\n\t// Stability: development\n\tNetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String(\"gsm\")\n\t// TD-SCDMA\n\t// Stability: development\n\tNetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String(\"td_scdma\")\n\t// IWLAN\n\t// Stability: development\n\tNetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String(\"iwlan\")\n\t// 5G NR (New Radio)\n\t// Stability: development\n\tNetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String(\"nr\")\n\t// 5G NRNSA (New Radio Non-Standalone)\n\t// Stability: development\n\tNetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String(\"nrnsa\")\n\t// LTE CA\n\t// Stability: development\n\tNetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String(\"lte_ca\")\n)\n\n// Enum values for network.connection.type\nvar (\n\t// wifi\n\t// Stability: development\n\tNetworkConnectionTypeWifi = NetworkConnectionTypeKey.String(\"wifi\")\n\t// wired\n\t// Stability: development\n\tNetworkConnectionTypeWired = NetworkConnectionTypeKey.String(\"wired\")\n\t// cell\n\t// Stability: development\n\tNetworkConnectionTypeCell = NetworkConnectionTypeKey.String(\"cell\")\n\t// unavailable\n\t// Stability: development\n\tNetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String(\"unavailable\")\n\t// unknown\n\t// Stability: development\n\tNetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String(\"unknown\")\n)\n\n// Enum values for network.io.direction\nvar (\n\t// transmit\n\t// Stability: development\n\tNetworkIODirectionTransmit = NetworkIODirectionKey.String(\"transmit\")\n\t// receive\n\t// Stability: development\n\tNetworkIODirectionReceive = NetworkIODirectionKey.String(\"receive\")\n)\n\n// Enum values for network.transport\nvar (\n\t// TCP\n\t// Stability: stable\n\tNetworkTransportTCP = NetworkTransportKey.String(\"tcp\")\n\t// UDP\n\t// Stability: stable\n\tNetworkTransportUDP = NetworkTransportKey.String(\"udp\")\n\t// Named or anonymous pipe.\n\t// Stability: stable\n\tNetworkTransportPipe = NetworkTransportKey.String(\"pipe\")\n\t// Unix domain socket\n\t// Stability: stable\n\tNetworkTransportUnix = NetworkTransportKey.String(\"unix\")\n\t// QUIC\n\t// Stability: stable\n\tNetworkTransportQUIC = NetworkTransportKey.String(\"quic\")\n)\n\n// Enum values for network.type\nvar (\n\t// IPv4\n\t// Stability: stable\n\tNetworkTypeIPv4 = NetworkTypeKey.String(\"ipv4\")\n\t// IPv6\n\t// Stability: stable\n\tNetworkTypeIPv6 = NetworkTypeKey.String(\"ipv6\")\n)\n\n// Namespace: nfs\nconst (\n\t// NfsOperationNameKey is the attribute Key conforming to the\n\t// \"nfs.operation.name\" semantic conventions. It represents the NFSv4+ operation\n\t// name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"OPEN\", \"READ\", \"GETATTR\"\n\tNfsOperationNameKey = attribute.Key(\"nfs.operation.name\")\n\n\t// NfsServerRepcacheStatusKey is the attribute Key conforming to the\n\t// \"nfs.server.repcache.status\" semantic conventions. It represents the linux:\n\t// one of \"hit\" (NFSD_STATS_RC_HITS), \"miss\" (NFSD_STATS_RC_MISSES), or\n\t// \"nocache\" (NFSD_STATS_RC_NOCACHE -- uncacheable).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: hit\n\tNfsServerRepcacheStatusKey = attribute.Key(\"nfs.server.repcache.status\")\n)\n\n// NfsOperationName returns an attribute KeyValue conforming to the\n// \"nfs.operation.name\" semantic conventions. It represents the NFSv4+ operation\n// name.\nfunc NfsOperationName(val string) attribute.KeyValue {\n\treturn NfsOperationNameKey.String(val)\n}\n\n// NfsServerRepcacheStatus returns an attribute KeyValue conforming to the\n// \"nfs.server.repcache.status\" semantic conventions. It represents the linux:\n// one of \"hit\" (NFSD_STATS_RC_HITS), \"miss\" (NFSD_STATS_RC_MISSES), or \"nocache\"\n// (NFSD_STATS_RC_NOCACHE -- uncacheable).\nfunc NfsServerRepcacheStatus(val string) attribute.KeyValue {\n\treturn NfsServerRepcacheStatusKey.String(val)\n}\n\n// Namespace: oci\nconst (\n\t// OCIManifestDigestKey is the attribute Key conforming to the\n\t// \"oci.manifest.digest\" semantic conventions. It represents the digest of the\n\t// OCI image manifest. For container images specifically is the digest by which\n\t// the container image is known.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4\"\n\t// Note: Follows [OCI Image Manifest Specification], and specifically the\n\t// [Digest property].\n\t// An example can be found in [Example Image Manifest].\n\t//\n\t// [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md\n\t// [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests\n\t// [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest\n\tOCIManifestDigestKey = attribute.Key(\"oci.manifest.digest\")\n)\n\n// OCIManifestDigest returns an attribute KeyValue conforming to the\n// \"oci.manifest.digest\" semantic conventions. It represents the digest of the\n// OCI image manifest. For container images specifically is the digest by which\n// the container image is known.\nfunc OCIManifestDigest(val string) attribute.KeyValue {\n\treturn OCIManifestDigestKey.String(val)\n}\n\n// Namespace: onc_rpc\nconst (\n\t// OncRPCProcedureNameKey is the attribute Key conforming to the\n\t// \"onc_rpc.procedure.name\" semantic conventions. It represents the ONC/Sun RPC\n\t// procedure name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"OPEN\", \"READ\", \"GETATTR\"\n\tOncRPCProcedureNameKey = attribute.Key(\"onc_rpc.procedure.name\")\n\n\t// OncRPCProcedureNumberKey is the attribute Key conforming to the\n\t// \"onc_rpc.procedure.number\" semantic conventions. It represents the ONC/Sun\n\t// RPC procedure number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOncRPCProcedureNumberKey = attribute.Key(\"onc_rpc.procedure.number\")\n\n\t// OncRPCProgramNameKey is the attribute Key conforming to the\n\t// \"onc_rpc.program.name\" semantic conventions. It represents the ONC/Sun RPC\n\t// program name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"portmapper\", \"nfs\"\n\tOncRPCProgramNameKey = attribute.Key(\"onc_rpc.program.name\")\n\n\t// OncRPCVersionKey is the attribute Key conforming to the \"onc_rpc.version\"\n\t// semantic conventions. It represents the ONC/Sun RPC program version.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOncRPCVersionKey = attribute.Key(\"onc_rpc.version\")\n)\n\n// OncRPCProcedureName returns an attribute KeyValue conforming to the\n// \"onc_rpc.procedure.name\" semantic conventions. It represents the ONC/Sun RPC\n// procedure name.\nfunc OncRPCProcedureName(val string) attribute.KeyValue {\n\treturn OncRPCProcedureNameKey.String(val)\n}\n\n// OncRPCProcedureNumber returns an attribute KeyValue conforming to the\n// \"onc_rpc.procedure.number\" semantic conventions. It represents the ONC/Sun RPC\n// procedure number.\nfunc OncRPCProcedureNumber(val int) attribute.KeyValue {\n\treturn OncRPCProcedureNumberKey.Int(val)\n}\n\n// OncRPCProgramName returns an attribute KeyValue conforming to the\n// \"onc_rpc.program.name\" semantic conventions. It represents the ONC/Sun RPC\n// program name.\nfunc OncRPCProgramName(val string) attribute.KeyValue {\n\treturn OncRPCProgramNameKey.String(val)\n}\n\n// OncRPCVersion returns an attribute KeyValue conforming to the\n// \"onc_rpc.version\" semantic conventions. It represents the ONC/Sun RPC program\n// version.\nfunc OncRPCVersion(val int) attribute.KeyValue {\n\treturn OncRPCVersionKey.Int(val)\n}\n\n// Namespace: openai\nconst (\n\t// OpenAIRequestServiceTierKey is the attribute Key conforming to the\n\t// \"openai.request.service_tier\" semantic conventions. It represents the service\n\t// tier requested. May be a specific tier, default, or auto.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"auto\", \"default\"\n\tOpenAIRequestServiceTierKey = attribute.Key(\"openai.request.service_tier\")\n\n\t// OpenAIResponseServiceTierKey is the attribute Key conforming to the\n\t// \"openai.response.service_tier\" semantic conventions. It represents the\n\t// service tier used for the response.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"scale\", \"default\"\n\tOpenAIResponseServiceTierKey = attribute.Key(\"openai.response.service_tier\")\n\n\t// OpenAIResponseSystemFingerprintKey is the attribute Key conforming to the\n\t// \"openai.response.system_fingerprint\" semantic conventions. It represents a\n\t// fingerprint to track any eventual change in the Generative AI environment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"fp_44709d6fcb\"\n\tOpenAIResponseSystemFingerprintKey = attribute.Key(\"openai.response.system_fingerprint\")\n)\n\n// OpenAIResponseServiceTier returns an attribute KeyValue conforming to the\n// \"openai.response.service_tier\" semantic conventions. It represents the service\n// tier used for the response.\nfunc OpenAIResponseServiceTier(val string) attribute.KeyValue {\n\treturn OpenAIResponseServiceTierKey.String(val)\n}\n\n// OpenAIResponseSystemFingerprint returns an attribute KeyValue conforming to\n// the \"openai.response.system_fingerprint\" semantic conventions. It represents a\n// fingerprint to track any eventual change in the Generative AI environment.\nfunc OpenAIResponseSystemFingerprint(val string) attribute.KeyValue {\n\treturn OpenAIResponseSystemFingerprintKey.String(val)\n}\n\n// Enum values for openai.request.service_tier\nvar (\n\t// The system will utilize scale tier credits until they are exhausted.\n\t// Stability: development\n\tOpenAIRequestServiceTierAuto = OpenAIRequestServiceTierKey.String(\"auto\")\n\t// The system will utilize the default scale tier.\n\t// Stability: development\n\tOpenAIRequestServiceTierDefault = OpenAIRequestServiceTierKey.String(\"default\")\n)\n\n// Namespace: openshift\nconst (\n\t// OpenShiftClusterquotaNameKey is the attribute Key conforming to the\n\t// \"openshift.clusterquota.name\" semantic conventions. It represents the name of\n\t// the cluster quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"opentelemetry\"\n\tOpenShiftClusterquotaNameKey = attribute.Key(\"openshift.clusterquota.name\")\n\n\t// OpenShiftClusterquotaUIDKey is the attribute Key conforming to the\n\t// \"openshift.clusterquota.uid\" semantic conventions. It represents the UID of\n\t// the cluster quota.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"\n\tOpenShiftClusterquotaUIDKey = attribute.Key(\"openshift.clusterquota.uid\")\n)\n\n// OpenShiftClusterquotaName returns an attribute KeyValue conforming to the\n// \"openshift.clusterquota.name\" semantic conventions. It represents the name of\n// the cluster quota.\nfunc OpenShiftClusterquotaName(val string) attribute.KeyValue {\n\treturn OpenShiftClusterquotaNameKey.String(val)\n}\n\n// OpenShiftClusterquotaUID returns an attribute KeyValue conforming to the\n// \"openshift.clusterquota.uid\" semantic conventions. It represents the UID of\n// the cluster quota.\nfunc OpenShiftClusterquotaUID(val string) attribute.KeyValue {\n\treturn OpenShiftClusterquotaUIDKey.String(val)\n}\n\n// Namespace: opentracing\nconst (\n\t// OpenTracingRefTypeKey is the attribute Key conforming to the\n\t// \"opentracing.ref_type\" semantic conventions. It represents the parent-child\n\t// Reference type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The causal relationship between a child Span and a parent Span.\n\tOpenTracingRefTypeKey = attribute.Key(\"opentracing.ref_type\")\n)\n\n// Enum values for opentracing.ref_type\nvar (\n\t// The parent Span depends on the child Span in some capacity\n\t// Stability: development\n\tOpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String(\"child_of\")\n\t// The parent Span doesn't depend in any way on the result of the child Span\n\t// Stability: development\n\tOpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String(\"follows_from\")\n)\n\n// Namespace: os\nconst (\n\t// OSBuildIDKey is the attribute Key conforming to the \"os.build_id\" semantic\n\t// conventions. It represents the unique identifier for a particular build or\n\t// compilation of the operating system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TQ3C.230805.001.B2\", \"20E247\", \"22621\"\n\tOSBuildIDKey = attribute.Key(\"os.build_id\")\n\n\t// OSDescriptionKey is the attribute Key conforming to the \"os.description\"\n\t// semantic conventions. It represents the human readable (not intended to be\n\t// parsed) OS version information, like e.g. reported by `ver` or\n\t// `lsb_release -a` commands.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Microsoft Windows [Version 10.0.18363.778]\", \"Ubuntu 18.04.1 LTS\"\n\tOSDescriptionKey = attribute.Key(\"os.description\")\n\n\t// OSNameKey is the attribute Key conforming to the \"os.name\" semantic\n\t// conventions. It represents the human readable operating system name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iOS\", \"Android\", \"Ubuntu\"\n\tOSNameKey = attribute.Key(\"os.name\")\n\n\t// OSTypeKey is the attribute Key conforming to the \"os.type\" semantic\n\t// conventions. It represents the operating system type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOSTypeKey = attribute.Key(\"os.type\")\n\n\t// OSVersionKey is the attribute Key conforming to the \"os.version\" semantic\n\t// conventions. It represents the version string of the operating system as\n\t// defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.2.1\", \"18.04.1\"\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\tOSVersionKey = attribute.Key(\"os.version\")\n)\n\n// OSBuildID returns an attribute KeyValue conforming to the \"os.build_id\"\n// semantic conventions. It represents the unique identifier for a particular\n// build or compilation of the operating system.\nfunc OSBuildID(val string) attribute.KeyValue {\n\treturn OSBuildIDKey.String(val)\n}\n\n// OSDescription returns an attribute KeyValue conforming to the \"os.description\"\n// semantic conventions. It represents the human readable (not intended to be\n// parsed) OS version information, like e.g. reported by `ver` or\n// `lsb_release -a` commands.\nfunc OSDescription(val string) attribute.KeyValue {\n\treturn OSDescriptionKey.String(val)\n}\n\n// OSName returns an attribute KeyValue conforming to the \"os.name\" semantic\n// conventions. It represents the human readable operating system name.\nfunc OSName(val string) attribute.KeyValue {\n\treturn OSNameKey.String(val)\n}\n\n// OSVersion returns an attribute KeyValue conforming to the \"os.version\"\n// semantic conventions. It represents the version string of the operating system\n// as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc OSVersion(val string) attribute.KeyValue {\n\treturn OSVersionKey.String(val)\n}\n\n// Enum values for os.type\nvar (\n\t// Microsoft Windows\n\t// Stability: development\n\tOSTypeWindows = OSTypeKey.String(\"windows\")\n\t// Linux\n\t// Stability: development\n\tOSTypeLinux = OSTypeKey.String(\"linux\")\n\t// Apple Darwin\n\t// Stability: development\n\tOSTypeDarwin = OSTypeKey.String(\"darwin\")\n\t// FreeBSD\n\t// Stability: development\n\tOSTypeFreeBSD = OSTypeKey.String(\"freebsd\")\n\t// NetBSD\n\t// Stability: development\n\tOSTypeNetBSD = OSTypeKey.String(\"netbsd\")\n\t// OpenBSD\n\t// Stability: development\n\tOSTypeOpenBSD = OSTypeKey.String(\"openbsd\")\n\t// DragonFly BSD\n\t// Stability: development\n\tOSTypeDragonflyBSD = OSTypeKey.String(\"dragonflybsd\")\n\t// HP-UX (Hewlett Packard Unix)\n\t// Stability: development\n\tOSTypeHPUX = OSTypeKey.String(\"hpux\")\n\t// AIX (Advanced Interactive eXecutive)\n\t// Stability: development\n\tOSTypeAIX = OSTypeKey.String(\"aix\")\n\t// SunOS, Oracle Solaris\n\t// Stability: development\n\tOSTypeSolaris = OSTypeKey.String(\"solaris\")\n\t// IBM z/OS\n\t// Stability: development\n\tOSTypeZOS = OSTypeKey.String(\"zos\")\n)\n\n// Namespace: otel\nconst (\n\t// OTelComponentNameKey is the attribute Key conforming to the\n\t// \"otel.component.name\" semantic conventions. It represents a name uniquely\n\t// identifying the instance of the OpenTelemetry component within its containing\n\t// SDK instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otlp_grpc_span_exporter/0\", \"custom-name\"\n\t// Note: Implementations SHOULD ensure a low cardinality for this attribute,\n\t// even across application or SDK restarts.\n\t// E.g. implementations MUST NOT use UUIDs as values for this attribute.\n\t//\n\t// Implementations MAY achieve these goals by following a\n\t// `<otel.component.type>/<instance-counter>` pattern, e.g.\n\t// `batching_span_processor/0`.\n\t// Hereby `otel.component.type` refers to the corresponding attribute value of\n\t// the component.\n\t//\n\t// The value of `instance-counter` MAY be automatically assigned by the\n\t// component and uniqueness within the enclosing SDK instance MUST be\n\t// guaranteed.\n\t// For example, `<instance-counter>` MAY be implemented by using a monotonically\n\t// increasing counter (starting with `0`), which is incremented every time an\n\t// instance of the given component type is started.\n\t//\n\t// With this implementation, for example the first Batching Span Processor would\n\t// have `batching_span_processor/0`\n\t// as `otel.component.name`, the second one `batching_span_processor/1` and so\n\t// on.\n\t// These values will therefore be reused in the case of an application restart.\n\tOTelComponentNameKey = attribute.Key(\"otel.component.name\")\n\n\t// OTelComponentTypeKey is the attribute Key conforming to the\n\t// \"otel.component.type\" semantic conventions. It represents a name identifying\n\t// the type of the OpenTelemetry component.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"batching_span_processor\", \"com.example.MySpanExporter\"\n\t// Note: If none of the standardized values apply, implementations SHOULD use\n\t// the language-defined name of the type.\n\t// E.g. for Java the fully qualified classname SHOULD be used in this case.\n\tOTelComponentTypeKey = attribute.Key(\"otel.component.type\")\n\n\t// OTelEventNameKey is the attribute Key conforming to the \"otel.event.name\"\n\t// semantic conventions. It represents the identifies the class / type of event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"browser.mouse.click\", \"device.app.lifecycle\"\n\t// Note: This attribute SHOULD be used by non-OTLP exporters when destination\n\t// does not support `EventName` or equivalent field. This attribute MAY be used\n\t// by applications using existing logging libraries so that it can be used to\n\t// set the `EventName` field by Collector or SDK components.\n\tOTelEventNameKey = attribute.Key(\"otel.event.name\")\n\n\t// OTelScopeNameKey is the attribute Key conforming to the \"otel.scope.name\"\n\t// semantic conventions. It represents the name of the instrumentation scope - (\n\t// `InstrumentationScope.Name` in OTLP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"io.opentelemetry.contrib.mongodb\"\n\tOTelScopeNameKey = attribute.Key(\"otel.scope.name\")\n\n\t// OTelScopeSchemaURLKey is the attribute Key conforming to the\n\t// \"otel.scope.schema_url\" semantic conventions. It represents the schema URL of\n\t// the instrumentation scope.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://opentelemetry.io/schemas/1.31.0\"\n\tOTelScopeSchemaURLKey = attribute.Key(\"otel.scope.schema_url\")\n\n\t// OTelScopeVersionKey is the attribute Key conforming to the\n\t// \"otel.scope.version\" semantic conventions. It represents the version of the\n\t// instrumentation scope - (`InstrumentationScope.Version` in OTLP).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.0.0\"\n\tOTelScopeVersionKey = attribute.Key(\"otel.scope.version\")\n\n\t// OTelSpanParentOriginKey is the attribute Key conforming to the\n\t// \"otel.span.parent.origin\" semantic conventions. It represents the determines\n\t// whether the span has a parent span, and if so,\n\t// [whether it is a remote parent].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginKey = attribute.Key(\"otel.span.parent.origin\")\n\n\t// OTelSpanSamplingResultKey is the attribute Key conforming to the\n\t// \"otel.span.sampling_result\" semantic conventions. It represents the result\n\t// value of the sampler for this span.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tOTelSpanSamplingResultKey = attribute.Key(\"otel.span.sampling_result\")\n\n\t// OTelStatusCodeKey is the attribute Key conforming to the \"otel.status_code\"\n\t// semantic conventions. It represents the name of the code, either \"OK\" or\n\t// \"ERROR\". MUST NOT be set if the status code is UNSET.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\tOTelStatusCodeKey = attribute.Key(\"otel.status_code\")\n\n\t// OTelStatusDescriptionKey is the attribute Key conforming to the\n\t// \"otel.status_description\" semantic conventions. It represents the description\n\t// of the Status if it has a value, otherwise not set.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"resource not found\"\n\tOTelStatusDescriptionKey = attribute.Key(\"otel.status_description\")\n)\n\n// OTelComponentName returns an attribute KeyValue conforming to the\n// \"otel.component.name\" semantic conventions. It represents a name uniquely\n// identifying the instance of the OpenTelemetry component within its containing\n// SDK instance.\nfunc OTelComponentName(val string) attribute.KeyValue {\n\treturn OTelComponentNameKey.String(val)\n}\n\n// OTelEventName returns an attribute KeyValue conforming to the\n// \"otel.event.name\" semantic conventions. It represents the identifies the class\n// / type of event.\nfunc OTelEventName(val string) attribute.KeyValue {\n\treturn OTelEventNameKey.String(val)\n}\n\n// OTelScopeName returns an attribute KeyValue conforming to the\n// \"otel.scope.name\" semantic conventions. It represents the name of the\n// instrumentation scope - (`InstrumentationScope.Name` in OTLP).\nfunc OTelScopeName(val string) attribute.KeyValue {\n\treturn OTelScopeNameKey.String(val)\n}\n\n// OTelScopeSchemaURL returns an attribute KeyValue conforming to the\n// \"otel.scope.schema_url\" semantic conventions. It represents the schema URL of\n// the instrumentation scope.\nfunc OTelScopeSchemaURL(val string) attribute.KeyValue {\n\treturn OTelScopeSchemaURLKey.String(val)\n}\n\n// OTelScopeVersion returns an attribute KeyValue conforming to the\n// \"otel.scope.version\" semantic conventions. It represents the version of the\n// instrumentation scope - (`InstrumentationScope.Version` in OTLP).\nfunc OTelScopeVersion(val string) attribute.KeyValue {\n\treturn OTelScopeVersionKey.String(val)\n}\n\n// OTelStatusDescription returns an attribute KeyValue conforming to the\n// \"otel.status_description\" semantic conventions. It represents the description\n// of the Status if it has a value, otherwise not set.\nfunc OTelStatusDescription(val string) attribute.KeyValue {\n\treturn OTelStatusDescriptionKey.String(val)\n}\n\n// Enum values for otel.component.type\nvar (\n\t// The builtin SDK batching span processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String(\"batching_span_processor\")\n\t// The builtin SDK simple span processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String(\"simple_span_processor\")\n\t// The builtin SDK batching log record processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String(\"batching_log_processor\")\n\t// The builtin SDK simple log record processor\n\t//\n\t// Stability: development\n\tOTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String(\"simple_log_processor\")\n\t// OTLP span exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String(\"otlp_grpc_span_exporter\")\n\t// OTLP span exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String(\"otlp_http_span_exporter\")\n\t// OTLP span exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String(\"otlp_http_json_span_exporter\")\n\t// Zipkin span exporter over HTTP\n\t//\n\t// Stability: development\n\tOTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String(\"zipkin_http_span_exporter\")\n\t// OTLP log record exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String(\"otlp_grpc_log_exporter\")\n\t// OTLP log record exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String(\"otlp_http_log_exporter\")\n\t// OTLP log record exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String(\"otlp_http_json_log_exporter\")\n\t// The builtin SDK periodically exporting metric reader\n\t//\n\t// Stability: development\n\tOTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String(\"periodic_metric_reader\")\n\t// OTLP metric exporter over gRPC with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String(\"otlp_grpc_metric_exporter\")\n\t// OTLP metric exporter over HTTP with protobuf serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String(\"otlp_http_metric_exporter\")\n\t// OTLP metric exporter over HTTP with JSON serialization\n\t//\n\t// Stability: development\n\tOTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String(\"otlp_http_json_metric_exporter\")\n\t// Prometheus metric exporter over HTTP with the default text-based format\n\t//\n\t// Stability: development\n\tOTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String(\"prometheus_http_text_metric_exporter\")\n)\n\n// Enum values for otel.span.parent.origin\nvar (\n\t// The span does not have a parent, it is a root span\n\t// Stability: development\n\tOTelSpanParentOriginNone = OTelSpanParentOriginKey.String(\"none\")\n\t// The span has a parent and the parent's span context [isRemote()] is false\n\t// Stability: development\n\t//\n\t// [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginLocal = OTelSpanParentOriginKey.String(\"local\")\n\t// The span has a parent and the parent's span context [isRemote()] is true\n\t// Stability: development\n\t//\n\t// [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote\n\tOTelSpanParentOriginRemote = OTelSpanParentOriginKey.String(\"remote\")\n)\n\n// Enum values for otel.span.sampling_result\nvar (\n\t// The span is not sampled and not recording\n\t// Stability: development\n\tOTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String(\"DROP\")\n\t// The span is not sampled, but recording\n\t// Stability: development\n\tOTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String(\"RECORD_ONLY\")\n\t// The span is sampled and recording\n\t// Stability: development\n\tOTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String(\"RECORD_AND_SAMPLE\")\n)\n\n// Enum values for otel.status_code\nvar (\n\t// The operation has been validated by an Application developer or Operator to\n\t// have completed successfully.\n\t// Stability: stable\n\tOTelStatusCodeOk = OTelStatusCodeKey.String(\"OK\")\n\t// The operation contains an error.\n\t// Stability: stable\n\tOTelStatusCodeError = OTelStatusCodeKey.String(\"ERROR\")\n)\n\n// Namespace: pprof\nconst (\n\t// PprofLocationIsFoldedKey is the attribute Key conforming to the\n\t// \"pprof.location.is_folded\" semantic conventions. It represents the provides\n\t// an indication that multiple symbols map to this location's address, for\n\t// example due to identical code folding by the linker. In that case the line\n\t// information represents one of the multiple symbols. This field must be\n\t// recomputed when the symbolization state of the profile changes.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tPprofLocationIsFoldedKey = attribute.Key(\"pprof.location.is_folded\")\n\n\t// PprofMappingHasFilenamesKey is the attribute Key conforming to the\n\t// \"pprof.mapping.has_filenames\" semantic conventions. It represents the\n\t// indicates that there are filenames related to this mapping.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tPprofMappingHasFilenamesKey = attribute.Key(\"pprof.mapping.has_filenames\")\n\n\t// PprofMappingHasFunctionsKey is the attribute Key conforming to the\n\t// \"pprof.mapping.has_functions\" semantic conventions. It represents the\n\t// indicates that there are functions related to this mapping.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tPprofMappingHasFunctionsKey = attribute.Key(\"pprof.mapping.has_functions\")\n\n\t// PprofMappingHasInlineFramesKey is the attribute Key conforming to the\n\t// \"pprof.mapping.has_inline_frames\" semantic conventions. It represents the\n\t// indicates that there are inline frames related to this mapping.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tPprofMappingHasInlineFramesKey = attribute.Key(\"pprof.mapping.has_inline_frames\")\n\n\t// PprofMappingHasLineNumbersKey is the attribute Key conforming to the\n\t// \"pprof.mapping.has_line_numbers\" semantic conventions. It represents the\n\t// indicates that there are line numbers related to this mapping.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tPprofMappingHasLineNumbersKey = attribute.Key(\"pprof.mapping.has_line_numbers\")\n\n\t// PprofProfileCommentKey is the attribute Key conforming to the\n\t// \"pprof.profile.comment\" semantic conventions. It represents the free-form\n\t// text associated with the profile. This field should not be used to store any\n\t// machine-readable information, it is only for human-friendly content.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"hello world\", \"bazinga\"\n\tPprofProfileCommentKey = attribute.Key(\"pprof.profile.comment\")\n\n\t// PprofProfileDocURLKey is the attribute Key conforming to the\n\t// \"pprof.profile.doc_url\" semantic conventions. It represents the documentation\n\t// link for this profile type.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"http://pprof.example.com/cpu-profile.html\"\n\t// Note: The URL must be absolute and may be missing if the profile was\n\t// generated by code that did not supply a link\n\tPprofProfileDocURLKey = attribute.Key(\"pprof.profile.doc_url\")\n\n\t// PprofProfileDropFramesKey is the attribute Key conforming to the\n\t// \"pprof.profile.drop_frames\" semantic conventions. It represents the frames\n\t// with Function.function_name fully matching the regexp will be dropped from\n\t// the samples, along with their successors.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/foobar/\"\n\tPprofProfileDropFramesKey = attribute.Key(\"pprof.profile.drop_frames\")\n\n\t// PprofProfileKeepFramesKey is the attribute Key conforming to the\n\t// \"pprof.profile.keep_frames\" semantic conventions. It represents the frames\n\t// with Function.function_name fully matching the regexp will be kept, even if\n\t// it matches drop_frames.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/bazinga/\"\n\tPprofProfileKeepFramesKey = attribute.Key(\"pprof.profile.keep_frames\")\n)\n\n// PprofLocationIsFolded returns an attribute KeyValue conforming to the\n// \"pprof.location.is_folded\" semantic conventions. It represents the provides an\n// indication that multiple symbols map to this location's address, for example\n// due to identical code folding by the linker. In that case the line information\n// represents one of the multiple symbols. This field must be recomputed when the\n// symbolization state of the profile changes.\nfunc PprofLocationIsFolded(val bool) attribute.KeyValue {\n\treturn PprofLocationIsFoldedKey.Bool(val)\n}\n\n// PprofMappingHasFilenames returns an attribute KeyValue conforming to the\n// \"pprof.mapping.has_filenames\" semantic conventions. It represents the\n// indicates that there are filenames related to this mapping.\nfunc PprofMappingHasFilenames(val bool) attribute.KeyValue {\n\treturn PprofMappingHasFilenamesKey.Bool(val)\n}\n\n// PprofMappingHasFunctions returns an attribute KeyValue conforming to the\n// \"pprof.mapping.has_functions\" semantic conventions. It represents the\n// indicates that there are functions related to this mapping.\nfunc PprofMappingHasFunctions(val bool) attribute.KeyValue {\n\treturn PprofMappingHasFunctionsKey.Bool(val)\n}\n\n// PprofMappingHasInlineFrames returns an attribute KeyValue conforming to the\n// \"pprof.mapping.has_inline_frames\" semantic conventions. It represents the\n// indicates that there are inline frames related to this mapping.\nfunc PprofMappingHasInlineFrames(val bool) attribute.KeyValue {\n\treturn PprofMappingHasInlineFramesKey.Bool(val)\n}\n\n// PprofMappingHasLineNumbers returns an attribute KeyValue conforming to the\n// \"pprof.mapping.has_line_numbers\" semantic conventions. It represents the\n// indicates that there are line numbers related to this mapping.\nfunc PprofMappingHasLineNumbers(val bool) attribute.KeyValue {\n\treturn PprofMappingHasLineNumbersKey.Bool(val)\n}\n\n// PprofProfileComment returns an attribute KeyValue conforming to the\n// \"pprof.profile.comment\" semantic conventions. It represents the free-form text\n// associated with the profile. This field should not be used to store any\n// machine-readable information, it is only for human-friendly content.\nfunc PprofProfileComment(val ...string) attribute.KeyValue {\n\treturn PprofProfileCommentKey.StringSlice(val)\n}\n\n// PprofProfileDocURL returns an attribute KeyValue conforming to the\n// \"pprof.profile.doc_url\" semantic conventions. It represents the documentation\n// link for this profile type.\nfunc PprofProfileDocURL(val string) attribute.KeyValue {\n\treturn PprofProfileDocURLKey.String(val)\n}\n\n// PprofProfileDropFrames returns an attribute KeyValue conforming to the\n// \"pprof.profile.drop_frames\" semantic conventions. It represents the frames\n// with Function.function_name fully matching the regexp will be dropped from the\n// samples, along with their successors.\nfunc PprofProfileDropFrames(val string) attribute.KeyValue {\n\treturn PprofProfileDropFramesKey.String(val)\n}\n\n// PprofProfileKeepFrames returns an attribute KeyValue conforming to the\n// \"pprof.profile.keep_frames\" semantic conventions. It represents the frames\n// with Function.function_name fully matching the regexp will be kept, even if it\n// matches drop_frames.\nfunc PprofProfileKeepFrames(val string) attribute.KeyValue {\n\treturn PprofProfileKeepFramesKey.String(val)\n}\n\n// Namespace: process\nconst (\n\t// ProcessArgsCountKey is the attribute Key conforming to the\n\t// \"process.args_count\" semantic conventions. It represents the length of the\n\t// process.command_args array.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 4\n\t// Note: This field can be useful for querying or performing bucket analysis on\n\t// how many arguments were provided to start a process. More arguments may be an\n\t// indication of suspicious activity.\n\tProcessArgsCountKey = attribute.Key(\"process.args_count\")\n\n\t// ProcessCommandKey is the attribute Key conforming to the \"process.command\"\n\t// semantic conventions. It represents the command used to launch the process\n\t// (i.e. the command name). On Linux based systems, can be set to the zeroth\n\t// string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter\n\t// extracted from `GetCommandLineW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cmd/otelcol\"\n\tProcessCommandKey = attribute.Key(\"process.command\")\n\n\t// ProcessCommandArgsKey is the attribute Key conforming to the\n\t// \"process.command_args\" semantic conventions. It represents the all the\n\t// command arguments (including the command/executable itself) as received by\n\t// the process. On Linux-based systems (and some other Unixoid systems\n\t// supporting procfs), can be set according to the list of null-delimited\n\t// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this\n\t// would be the full argv vector passed to `main`. SHOULD NOT be collected by\n\t// default unless there is sanitization that excludes sensitive data.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cmd/otecol\", \"--config=config.yaml\"\n\tProcessCommandArgsKey = attribute.Key(\"process.command_args\")\n\n\t// ProcessCommandLineKey is the attribute Key conforming to the\n\t// \"process.command_line\" semantic conventions. It represents the full command\n\t// used to launch the process as a single string representing the full command.\n\t// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if\n\t// you have to assemble it just for monitoring; use `process.command_args`\n\t// instead. SHOULD NOT be collected by default unless there is sanitization that\n\t// excludes sensitive data.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"C:\\cmd\\otecol --config=\"my directory\\config.yaml\"\"\n\tProcessCommandLineKey = attribute.Key(\"process.command_line\")\n\n\t// ProcessContextSwitchTypeKey is the attribute Key conforming to the\n\t// \"process.context_switch.type\" semantic conventions. It represents the\n\t// specifies whether the context switches for this data point were voluntary or\n\t// involuntary.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tProcessContextSwitchTypeKey = attribute.Key(\"process.context_switch.type\")\n\n\t// ProcessCreationTimeKey is the attribute Key conforming to the\n\t// \"process.creation.time\" semantic conventions. It represents the date and time\n\t// the process was created, in ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2023-11-21T09:25:34.853Z\"\n\tProcessCreationTimeKey = attribute.Key(\"process.creation.time\")\n\n\t// ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.gnu\" semantic conventions. It represents the GNU\n\t// build ID as found in the `.note.gnu.build-id` ELF section (hex string).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"c89b11207f6479603b0d49bf291c092c2b719293\"\n\tProcessExecutableBuildIDGNUKey = attribute.Key(\"process.executable.build_id.gnu\")\n\n\t// ProcessExecutableBuildIDGoKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.go\" semantic conventions. It represents the Go\n\t// build ID as retrieved by `go tool buildid <go executable>`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY\"\n\tProcessExecutableBuildIDGoKey = attribute.Key(\"process.executable.build_id.go\")\n\n\t// ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the\n\t// \"process.executable.build_id.htlhash\" semantic conventions. It represents the\n\t// profiling specific build ID for executables. See the OTel specification for\n\t// Profiles for more information.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"600DCAFE4A110000F2BF38C493F5FB92\"\n\tProcessExecutableBuildIDHtlhashKey = attribute.Key(\"process.executable.build_id.htlhash\")\n\n\t// ProcessExecutableNameKey is the attribute Key conforming to the\n\t// \"process.executable.name\" semantic conventions. It represents the name of the\n\t// process executable. On Linux based systems, this SHOULD be set to the base\n\t// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to\n\t// the base name of `GetProcessImageFileNameW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"otelcol\"\n\tProcessExecutableNameKey = attribute.Key(\"process.executable.name\")\n\n\t// ProcessExecutablePathKey is the attribute Key conforming to the\n\t// \"process.executable.path\" semantic conventions. It represents the full path\n\t// to the process executable. On Linux based systems, can be set to the target\n\t// of `proc/[pid]/exe`. On Windows, can be set to the result of\n\t// `GetProcessImageFileNameW`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/usr/bin/cmd/otelcol\"\n\tProcessExecutablePathKey = attribute.Key(\"process.executable.path\")\n\n\t// ProcessExitCodeKey is the attribute Key conforming to the \"process.exit.code\"\n\t// semantic conventions. It represents the exit code of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 127\n\tProcessExitCodeKey = attribute.Key(\"process.exit.code\")\n\n\t// ProcessExitTimeKey is the attribute Key conforming to the \"process.exit.time\"\n\t// semantic conventions. It represents the date and time the process exited, in\n\t// ISO 8601 format.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2023-11-21T09:26:12.315Z\"\n\tProcessExitTimeKey = attribute.Key(\"process.exit.time\")\n\n\t// ProcessGroupLeaderPIDKey is the attribute Key conforming to the\n\t// \"process.group_leader.pid\" semantic conventions. It represents the PID of the\n\t// process's group leader. This is also the process group ID (PGID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 23\n\tProcessGroupLeaderPIDKey = attribute.Key(\"process.group_leader.pid\")\n\n\t// ProcessInteractiveKey is the attribute Key conforming to the\n\t// \"process.interactive\" semantic conventions. It represents the whether the\n\t// process is connected to an interactive shell.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tProcessInteractiveKey = attribute.Key(\"process.interactive\")\n\n\t// ProcessLinuxCgroupKey is the attribute Key conforming to the\n\t// \"process.linux.cgroup\" semantic conventions. It represents the control group\n\t// associated with the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1:name=systemd:/user.slice/user-1000.slice/session-3.scope\",\n\t// \"0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope\"\n\t// Note: Control groups (cgroups) are a kernel feature used to organize and\n\t// manage process resources. This attribute provides the path(s) to the\n\t// cgroup(s) associated with the process, which should match the contents of the\n\t// [/proc/[PID]/cgroup] file.\n\t//\n\t// [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html\n\tProcessLinuxCgroupKey = attribute.Key(\"process.linux.cgroup\")\n\n\t// ProcessOwnerKey is the attribute Key conforming to the \"process.owner\"\n\t// semantic conventions. It represents the username of the user that owns the\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tProcessOwnerKey = attribute.Key(\"process.owner\")\n\n\t// ProcessParentPIDKey is the attribute Key conforming to the\n\t// \"process.parent_pid\" semantic conventions. It represents the parent Process\n\t// identifier (PPID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 111\n\tProcessParentPIDKey = attribute.Key(\"process.parent_pid\")\n\n\t// ProcessPIDKey is the attribute Key conforming to the \"process.pid\" semantic\n\t// conventions. It represents the process identifier (PID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1234\n\tProcessPIDKey = attribute.Key(\"process.pid\")\n\n\t// ProcessRealUserIDKey is the attribute Key conforming to the\n\t// \"process.real_user.id\" semantic conventions. It represents the real user ID\n\t// (RUID) of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1000\n\tProcessRealUserIDKey = attribute.Key(\"process.real_user.id\")\n\n\t// ProcessRealUserNameKey is the attribute Key conforming to the\n\t// \"process.real_user.name\" semantic conventions. It represents the username of\n\t// the real user of the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"operator\"\n\tProcessRealUserNameKey = attribute.Key(\"process.real_user.name\")\n\n\t// ProcessRuntimeDescriptionKey is the attribute Key conforming to the\n\t// \"process.runtime.description\" semantic conventions. It represents an\n\t// additional description about the runtime of the process, for example a\n\t// specific vendor customization of the runtime environment.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0\n\tProcessRuntimeDescriptionKey = attribute.Key(\"process.runtime.description\")\n\n\t// ProcessRuntimeNameKey is the attribute Key conforming to the\n\t// \"process.runtime.name\" semantic conventions. It represents the name of the\n\t// runtime of this process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"OpenJDK Runtime Environment\"\n\tProcessRuntimeNameKey = attribute.Key(\"process.runtime.name\")\n\n\t// ProcessRuntimeVersionKey is the attribute Key conforming to the\n\t// \"process.runtime.version\" semantic conventions. It represents the version of\n\t// the runtime of this process, as returned by the runtime without modification.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 14.0.2\n\tProcessRuntimeVersionKey = attribute.Key(\"process.runtime.version\")\n\n\t// ProcessSavedUserIDKey is the attribute Key conforming to the\n\t// \"process.saved_user.id\" semantic conventions. It represents the saved user ID\n\t// (SUID) of the process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1002\n\tProcessSavedUserIDKey = attribute.Key(\"process.saved_user.id\")\n\n\t// ProcessSavedUserNameKey is the attribute Key conforming to the\n\t// \"process.saved_user.name\" semantic conventions. It represents the username of\n\t// the saved user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"operator\"\n\tProcessSavedUserNameKey = attribute.Key(\"process.saved_user.name\")\n\n\t// ProcessSessionLeaderPIDKey is the attribute Key conforming to the\n\t// \"process.session_leader.pid\" semantic conventions. It represents the PID of\n\t// the process's session leader. This is also the session ID (SID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 14\n\tProcessSessionLeaderPIDKey = attribute.Key(\"process.session_leader.pid\")\n\n\t// ProcessStateKey is the attribute Key conforming to the \"process.state\"\n\t// semantic conventions. It represents the process state, e.g.,\n\t// [Linux Process State Codes].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"running\"\n\t//\n\t// [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES\n\tProcessStateKey = attribute.Key(\"process.state\")\n\n\t// ProcessTitleKey is the attribute Key conforming to the \"process.title\"\n\t// semantic conventions. It represents the process title (proctitle).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cat /etc/hostname\", \"xfce4-session\", \"bash\"\n\t// Note: In many Unix-like systems, process title (proctitle), is the string\n\t// that represents the name or command line of a running process, displayed by\n\t// system monitoring tools like ps, top, and htop.\n\tProcessTitleKey = attribute.Key(\"process.title\")\n\n\t// ProcessUserIDKey is the attribute Key conforming to the \"process.user.id\"\n\t// semantic conventions. It represents the effective user ID (EUID) of the\n\t// process.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 1001\n\tProcessUserIDKey = attribute.Key(\"process.user.id\")\n\n\t// ProcessUserNameKey is the attribute Key conforming to the \"process.user.name\"\n\t// semantic conventions. It represents the username of the effective user of the\n\t// process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"root\"\n\tProcessUserNameKey = attribute.Key(\"process.user.name\")\n\n\t// ProcessVpidKey is the attribute Key conforming to the \"process.vpid\" semantic\n\t// conventions. It represents the virtual process identifier.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 12\n\t// Note: The process ID within a PID namespace. This is not necessarily unique\n\t// across all processes on the host but it is unique within the process\n\t// namespace that the process exists within.\n\tProcessVpidKey = attribute.Key(\"process.vpid\")\n\n\t// ProcessWorkingDirectoryKey is the attribute Key conforming to the\n\t// \"process.working_directory\" semantic conventions. It represents the working\n\t// directory of the process.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/root\"\n\tProcessWorkingDirectoryKey = attribute.Key(\"process.working_directory\")\n)\n\n// ProcessArgsCount returns an attribute KeyValue conforming to the\n// \"process.args_count\" semantic conventions. It represents the length of the\n// process.command_args array.\nfunc ProcessArgsCount(val int) attribute.KeyValue {\n\treturn ProcessArgsCountKey.Int(val)\n}\n\n// ProcessCommand returns an attribute KeyValue conforming to the\n// \"process.command\" semantic conventions. It represents the command used to\n// launch the process (i.e. the command name). On Linux based systems, can be set\n// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the\n// first parameter extracted from `GetCommandLineW`.\nfunc ProcessCommand(val string) attribute.KeyValue {\n\treturn ProcessCommandKey.String(val)\n}\n\n// ProcessCommandArgs returns an attribute KeyValue conforming to the\n// \"process.command_args\" semantic conventions. It represents the all the command\n// arguments (including the command/executable itself) as received by the\n// process. On Linux-based systems (and some other Unixoid systems supporting\n// procfs), can be set according to the list of null-delimited strings extracted\n// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full\n// argv vector passed to `main`. SHOULD NOT be collected by default unless there\n// is sanitization that excludes sensitive data.\nfunc ProcessCommandArgs(val ...string) attribute.KeyValue {\n\treturn ProcessCommandArgsKey.StringSlice(val)\n}\n\n// ProcessCommandLine returns an attribute KeyValue conforming to the\n// \"process.command_line\" semantic conventions. It represents the full command\n// used to launch the process as a single string representing the full command.\n// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if\n// you have to assemble it just for monitoring; use `process.command_args`\n// instead. SHOULD NOT be collected by default unless there is sanitization that\n// excludes sensitive data.\nfunc ProcessCommandLine(val string) attribute.KeyValue {\n\treturn ProcessCommandLineKey.String(val)\n}\n\n// ProcessCreationTime returns an attribute KeyValue conforming to the\n// \"process.creation.time\" semantic conventions. It represents the date and time\n// the process was created, in ISO 8601 format.\nfunc ProcessCreationTime(val string) attribute.KeyValue {\n\treturn ProcessCreationTimeKey.String(val)\n}\n\n// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the\n// \"process.environment_variable\" semantic conventions. It represents the process\n// environment variables, `<key>` being the environment variable name, the value\n// being the environment variable value.\nfunc ProcessEnvironmentVariable(key string, val string) attribute.KeyValue {\n\treturn attribute.String(\"process.environment_variable.\"+key, val)\n}\n\n// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the\n// \"process.executable.build_id.gnu\" semantic conventions. It represents the GNU\n// build ID as found in the `.note.gnu.build-id` ELF section (hex string).\nfunc ProcessExecutableBuildIDGNU(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDGNUKey.String(val)\n}\n\n// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the\n// \"process.executable.build_id.go\" semantic conventions. It represents the Go\n// build ID as retrieved by `go tool buildid <go executable>`.\nfunc ProcessExecutableBuildIDGo(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDGoKey.String(val)\n}\n\n// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to\n// the \"process.executable.build_id.htlhash\" semantic conventions. It represents\n// the profiling specific build ID for executables. See the OTel specification\n// for Profiles for more information.\nfunc ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {\n\treturn ProcessExecutableBuildIDHtlhashKey.String(val)\n}\n\n// ProcessExecutableName returns an attribute KeyValue conforming to the\n// \"process.executable.name\" semantic conventions. It represents the name of the\n// process executable. On Linux based systems, this SHOULD be set to the base\n// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the\n// base name of `GetProcessImageFileNameW`.\nfunc ProcessExecutableName(val string) attribute.KeyValue {\n\treturn ProcessExecutableNameKey.String(val)\n}\n\n// ProcessExecutablePath returns an attribute KeyValue conforming to the\n// \"process.executable.path\" semantic conventions. It represents the full path to\n// the process executable. On Linux based systems, can be set to the target of\n// `proc/[pid]/exe`. On Windows, can be set to the result of\n// `GetProcessImageFileNameW`.\nfunc ProcessExecutablePath(val string) attribute.KeyValue {\n\treturn ProcessExecutablePathKey.String(val)\n}\n\n// ProcessExitCode returns an attribute KeyValue conforming to the\n// \"process.exit.code\" semantic conventions. It represents the exit code of the\n// process.\nfunc ProcessExitCode(val int) attribute.KeyValue {\n\treturn ProcessExitCodeKey.Int(val)\n}\n\n// ProcessExitTime returns an attribute KeyValue conforming to the\n// \"process.exit.time\" semantic conventions. It represents the date and time the\n// process exited, in ISO 8601 format.\nfunc ProcessExitTime(val string) attribute.KeyValue {\n\treturn ProcessExitTimeKey.String(val)\n}\n\n// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the\n// \"process.group_leader.pid\" semantic conventions. It represents the PID of the\n// process's group leader. This is also the process group ID (PGID) of the\n// process.\nfunc ProcessGroupLeaderPID(val int) attribute.KeyValue {\n\treturn ProcessGroupLeaderPIDKey.Int(val)\n}\n\n// ProcessInteractive returns an attribute KeyValue conforming to the\n// \"process.interactive\" semantic conventions. It represents the whether the\n// process is connected to an interactive shell.\nfunc ProcessInteractive(val bool) attribute.KeyValue {\n\treturn ProcessInteractiveKey.Bool(val)\n}\n\n// ProcessLinuxCgroup returns an attribute KeyValue conforming to the\n// \"process.linux.cgroup\" semantic conventions. It represents the control group\n// associated with the process.\nfunc ProcessLinuxCgroup(val string) attribute.KeyValue {\n\treturn ProcessLinuxCgroupKey.String(val)\n}\n\n// ProcessOwner returns an attribute KeyValue conforming to the \"process.owner\"\n// semantic conventions. It represents the username of the user that owns the\n// process.\nfunc ProcessOwner(val string) attribute.KeyValue {\n\treturn ProcessOwnerKey.String(val)\n}\n\n// ProcessParentPID returns an attribute KeyValue conforming to the\n// \"process.parent_pid\" semantic conventions. It represents the parent Process\n// identifier (PPID).\nfunc ProcessParentPID(val int) attribute.KeyValue {\n\treturn ProcessParentPIDKey.Int(val)\n}\n\n// ProcessPID returns an attribute KeyValue conforming to the \"process.pid\"\n// semantic conventions. It represents the process identifier (PID).\nfunc ProcessPID(val int) attribute.KeyValue {\n\treturn ProcessPIDKey.Int(val)\n}\n\n// ProcessRealUserID returns an attribute KeyValue conforming to the\n// \"process.real_user.id\" semantic conventions. It represents the real user ID\n// (RUID) of the process.\nfunc ProcessRealUserID(val int) attribute.KeyValue {\n\treturn ProcessRealUserIDKey.Int(val)\n}\n\n// ProcessRealUserName returns an attribute KeyValue conforming to the\n// \"process.real_user.name\" semantic conventions. It represents the username of\n// the real user of the process.\nfunc ProcessRealUserName(val string) attribute.KeyValue {\n\treturn ProcessRealUserNameKey.String(val)\n}\n\n// ProcessRuntimeDescription returns an attribute KeyValue conforming to the\n// \"process.runtime.description\" semantic conventions. It represents an\n// additional description about the runtime of the process, for example a\n// specific vendor customization of the runtime environment.\nfunc ProcessRuntimeDescription(val string) attribute.KeyValue {\n\treturn ProcessRuntimeDescriptionKey.String(val)\n}\n\n// ProcessRuntimeName returns an attribute KeyValue conforming to the\n// \"process.runtime.name\" semantic conventions. It represents the name of the\n// runtime of this process.\nfunc ProcessRuntimeName(val string) attribute.KeyValue {\n\treturn ProcessRuntimeNameKey.String(val)\n}\n\n// ProcessRuntimeVersion returns an attribute KeyValue conforming to the\n// \"process.runtime.version\" semantic conventions. It represents the version of\n// the runtime of this process, as returned by the runtime without modification.\nfunc ProcessRuntimeVersion(val string) attribute.KeyValue {\n\treturn ProcessRuntimeVersionKey.String(val)\n}\n\n// ProcessSavedUserID returns an attribute KeyValue conforming to the\n// \"process.saved_user.id\" semantic conventions. It represents the saved user ID\n// (SUID) of the process.\nfunc ProcessSavedUserID(val int) attribute.KeyValue {\n\treturn ProcessSavedUserIDKey.Int(val)\n}\n\n// ProcessSavedUserName returns an attribute KeyValue conforming to the\n// \"process.saved_user.name\" semantic conventions. It represents the username of\n// the saved user.\nfunc ProcessSavedUserName(val string) attribute.KeyValue {\n\treturn ProcessSavedUserNameKey.String(val)\n}\n\n// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the\n// \"process.session_leader.pid\" semantic conventions. It represents the PID of\n// the process's session leader. This is also the session ID (SID) of the\n// process.\nfunc ProcessSessionLeaderPID(val int) attribute.KeyValue {\n\treturn ProcessSessionLeaderPIDKey.Int(val)\n}\n\n// ProcessTitle returns an attribute KeyValue conforming to the \"process.title\"\n// semantic conventions. It represents the process title (proctitle).\nfunc ProcessTitle(val string) attribute.KeyValue {\n\treturn ProcessTitleKey.String(val)\n}\n\n// ProcessUserID returns an attribute KeyValue conforming to the\n// \"process.user.id\" semantic conventions. It represents the effective user ID\n// (EUID) of the process.\nfunc ProcessUserID(val int) attribute.KeyValue {\n\treturn ProcessUserIDKey.Int(val)\n}\n\n// ProcessUserName returns an attribute KeyValue conforming to the\n// \"process.user.name\" semantic conventions. It represents the username of the\n// effective user of the process.\nfunc ProcessUserName(val string) attribute.KeyValue {\n\treturn ProcessUserNameKey.String(val)\n}\n\n// ProcessVpid returns an attribute KeyValue conforming to the \"process.vpid\"\n// semantic conventions. It represents the virtual process identifier.\nfunc ProcessVpid(val int) attribute.KeyValue {\n\treturn ProcessVpidKey.Int(val)\n}\n\n// ProcessWorkingDirectory returns an attribute KeyValue conforming to the\n// \"process.working_directory\" semantic conventions. It represents the working\n// directory of the process.\nfunc ProcessWorkingDirectory(val string) attribute.KeyValue {\n\treturn ProcessWorkingDirectoryKey.String(val)\n}\n\n// Enum values for process.context_switch.type\nvar (\n\t// voluntary\n\t// Stability: development\n\tProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String(\"voluntary\")\n\t// involuntary\n\t// Stability: development\n\tProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String(\"involuntary\")\n)\n\n// Enum values for process.state\nvar (\n\t// running\n\t// Stability: development\n\tProcessStateRunning = ProcessStateKey.String(\"running\")\n\t// sleeping\n\t// Stability: development\n\tProcessStateSleeping = ProcessStateKey.String(\"sleeping\")\n\t// stopped\n\t// Stability: development\n\tProcessStateStopped = ProcessStateKey.String(\"stopped\")\n\t// defunct\n\t// Stability: development\n\tProcessStateDefunct = ProcessStateKey.String(\"defunct\")\n)\n\n// Namespace: profile\nconst (\n\t// ProfileFrameTypeKey is the attribute Key conforming to the\n\t// \"profile.frame.type\" semantic conventions. It represents the describes the\n\t// interpreter or compiler of a single frame.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"cpython\"\n\tProfileFrameTypeKey = attribute.Key(\"profile.frame.type\")\n)\n\n// Enum values for profile.frame.type\nvar (\n\t// [.NET]\n\t//\n\t// Stability: development\n\t//\n\t// [.NET]: https://wikipedia.org/wiki/.NET\n\tProfileFrameTypeDotnet = ProfileFrameTypeKey.String(\"dotnet\")\n\t// [JVM]\n\t//\n\t// Stability: development\n\t//\n\t// [JVM]: https://wikipedia.org/wiki/Java_virtual_machine\n\tProfileFrameTypeJVM = ProfileFrameTypeKey.String(\"jvm\")\n\t// [Kernel]\n\t//\n\t// Stability: development\n\t//\n\t// [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system)\n\tProfileFrameTypeKernel = ProfileFrameTypeKey.String(\"kernel\")\n\t// Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a\n\t// more precise value MUST be used.\n\t//\n\t// Stability: development\n\t//\n\t// [C]: https://wikipedia.org/wiki/C_(programming_language)\n\t// [C++]: https://wikipedia.org/wiki/C%2B%2B\n\t// [Go]: https://wikipedia.org/wiki/Go_(programming_language)\n\t// [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)\n\tProfileFrameTypeNative = ProfileFrameTypeKey.String(\"native\")\n\t// [Perl]\n\t//\n\t// Stability: development\n\t//\n\t// [Perl]: https://wikipedia.org/wiki/Perl\n\tProfileFrameTypePerl = ProfileFrameTypeKey.String(\"perl\")\n\t// [PHP]\n\t//\n\t// Stability: development\n\t//\n\t// [PHP]: https://wikipedia.org/wiki/PHP\n\tProfileFrameTypePHP = ProfileFrameTypeKey.String(\"php\")\n\t// [Python]\n\t//\n\t// Stability: development\n\t//\n\t// [Python]: https://wikipedia.org/wiki/Python_(programming_language)\n\tProfileFrameTypeCpython = ProfileFrameTypeKey.String(\"cpython\")\n\t// [Ruby]\n\t//\n\t// Stability: development\n\t//\n\t// [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language)\n\tProfileFrameTypeRuby = ProfileFrameTypeKey.String(\"ruby\")\n\t// [V8JS]\n\t//\n\t// Stability: development\n\t//\n\t// [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine)\n\tProfileFrameTypeV8JS = ProfileFrameTypeKey.String(\"v8js\")\n\t// [Erlang]\n\t//\n\t// Stability: development\n\t//\n\t// [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)\n\tProfileFrameTypeBeam = ProfileFrameTypeKey.String(\"beam\")\n\t// [Go],\n\t//\n\t// Stability: development\n\t//\n\t// [Go]: https://wikipedia.org/wiki/Go_(programming_language)\n\tProfileFrameTypeGo = ProfileFrameTypeKey.String(\"go\")\n\t// [Rust]\n\t//\n\t// Stability: development\n\t//\n\t// [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)\n\tProfileFrameTypeRust = ProfileFrameTypeKey.String(\"rust\")\n)\n\n// Namespace: rpc\nconst (\n\t// RPCMessageCompressedSizeKey is the attribute Key conforming to the\n\t// \"rpc.message.compressed_size\" semantic conventions. It represents the\n\t// compressed size of the message in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageCompressedSizeKey = attribute.Key(\"rpc.message.compressed_size\")\n\n\t// RPCMessageIDKey is the attribute Key conforming to the \"rpc.message.id\"\n\t// semantic conventions. It MUST be calculated as two different counters\n\t// starting from `1` one for sent messages and one for received message..\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This way we guarantee that the values will be consistent between\n\t// different implementations.\n\tRPCMessageIDKey = attribute.Key(\"rpc.message.id\")\n\n\t// RPCMessageTypeKey is the attribute Key conforming to the \"rpc.message.type\"\n\t// semantic conventions. It represents the whether this is a received or sent\n\t// message.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageTypeKey = attribute.Key(\"rpc.message.type\")\n\n\t// RPCMessageUncompressedSizeKey is the attribute Key conforming to the\n\t// \"rpc.message.uncompressed_size\" semantic conventions. It represents the\n\t// uncompressed size of the message in bytes.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\tRPCMessageUncompressedSizeKey = attribute.Key(\"rpc.message.uncompressed_size\")\n\n\t// RPCMethodKey is the attribute Key conforming to the \"rpc.method\" semantic\n\t// conventions. It represents the fully-qualified logical name of the method\n\t// from the RPC interface perspective.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com.example.ExampleService/exampleMethod\", \"EchoService/Echo\",\n\t// \"_OTHER\"\n\t// Note: The method name MAY have unbounded cardinality in edge or error cases.\n\t//\n\t// Some RPC frameworks or libraries provide a fixed set of recognized methods\n\t// for client stubs and server implementations. Instrumentations for such\n\t// frameworks MUST set this attribute to the original method name only\n\t// when the method is recognized by the framework or library.\n\t//\n\t// When the method is not recognized, for example, when the server receives\n\t// a request for a method that is not predefined on the server, or when\n\t// instrumentation is not able to reliably detect if the method is predefined,\n\t// the attribute MUST be set to `_OTHER`. In such cases, tracing\n\t// instrumentations MUST also set `rpc.method_original` attribute to\n\t// the original method value.\n\t//\n\t// If the RPC instrumentation could end up converting valid RPC methods to\n\t// `_OTHER`, then it SHOULD provide a way to configure the list of recognized\n\t// RPC methods.\n\t//\n\t// The `rpc.method` can be different from the name of any implementing\n\t// method/function.\n\t// The `code.function.name` attribute may be used to record the fully-qualified\n\t// method actually executing the call on the server side, or the\n\t// RPC client stub method on the client side.\n\tRPCMethodKey = attribute.Key(\"rpc.method\")\n\n\t// RPCMethodOriginalKey is the attribute Key conforming to the\n\t// \"rpc.method_original\" semantic conventions. It represents the original name\n\t// of the method used by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com.myservice.EchoService/catchAll\",\n\t// \"com.myservice.EchoService/unknownMethod\", \"InvalidMethod\"\n\tRPCMethodOriginalKey = attribute.Key(\"rpc.method_original\")\n\n\t// RPCResponseStatusCodeKey is the attribute Key conforming to the\n\t// \"rpc.response.status_code\" semantic conventions. It represents the status\n\t// code of the RPC returned by the RPC server or generated by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"OK\", \"DEADLINE_EXCEEDED\", \"-32602\"\n\t// Note: Usually it represents an error code, but may also represent partial\n\t// success, warning, or differentiate between various types of successful\n\t// outcomes.\n\t// Semantic conventions for individual RPC frameworks SHOULD document what\n\t// `rpc.response.status_code` means in the context of that system and which\n\t// values are considered to represent errors.\n\tRPCResponseStatusCodeKey = attribute.Key(\"rpc.response.status_code\")\n\n\t// RPCSystemNameKey is the attribute Key conforming to the \"rpc.system.name\"\n\t// semantic conventions. It represents the Remote Procedure Call (RPC) system.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: The client and server RPC systems may differ for the same RPC\n\t// interaction. For example, a client may use Apache Dubbo or Connect RPC to\n\t// communicate with a server that uses gRPC since both protocols provide\n\t// compatibility with gRPC.\n\tRPCSystemNameKey = attribute.Key(\"rpc.system.name\")\n)\n\n// RPCMessageCompressedSize returns an attribute KeyValue conforming to the\n// \"rpc.message.compressed_size\" semantic conventions. It represents the\n// compressed size of the message in bytes.\nfunc RPCMessageCompressedSize(val int) attribute.KeyValue {\n\treturn RPCMessageCompressedSizeKey.Int(val)\n}\n\n// RPCMessageID returns an attribute KeyValue conforming to the \"rpc.message.id\"\n// semantic conventions. It MUST be calculated as two different counters starting\n// from `1` one for sent messages and one for received message..\nfunc RPCMessageID(val int) attribute.KeyValue {\n\treturn RPCMessageIDKey.Int(val)\n}\n\n// RPCMessageUncompressedSize returns an attribute KeyValue conforming to the\n// \"rpc.message.uncompressed_size\" semantic conventions. It represents the\n// uncompressed size of the message in bytes.\nfunc RPCMessageUncompressedSize(val int) attribute.KeyValue {\n\treturn RPCMessageUncompressedSizeKey.Int(val)\n}\n\n// RPCMethod returns an attribute KeyValue conforming to the \"rpc.method\"\n// semantic conventions. It represents the fully-qualified logical name of the\n// method from the RPC interface perspective.\nfunc RPCMethod(val string) attribute.KeyValue {\n\treturn RPCMethodKey.String(val)\n}\n\n// RPCMethodOriginal returns an attribute KeyValue conforming to the\n// \"rpc.method_original\" semantic conventions. It represents the original name of\n// the method used by the client.\nfunc RPCMethodOriginal(val string) attribute.KeyValue {\n\treturn RPCMethodOriginalKey.String(val)\n}\n\n// RPCRequestMetadata returns an attribute KeyValue conforming to the\n// \"rpc.request.metadata\" semantic conventions. It represents the RPC request\n// metadata, `<key>` being the normalized RPC metadata key (lowercase), the value\n// being the metadata values.\nfunc RPCRequestMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.request.metadata.\"+key, val)\n}\n\n// RPCResponseMetadata returns an attribute KeyValue conforming to the\n// \"rpc.response.metadata\" semantic conventions. It represents the RPC response\n// metadata, `<key>` being the normalized RPC metadata key (lowercase), the value\n// being the metadata values.\nfunc RPCResponseMetadata(key string, val ...string) attribute.KeyValue {\n\treturn attribute.StringSlice(\"rpc.response.metadata.\"+key, val)\n}\n\n// RPCResponseStatusCode returns an attribute KeyValue conforming to the\n// \"rpc.response.status_code\" semantic conventions. It represents the status code\n// of the RPC returned by the RPC server or generated by the client.\nfunc RPCResponseStatusCode(val string) attribute.KeyValue {\n\treturn RPCResponseStatusCodeKey.String(val)\n}\n\n// Enum values for rpc.message.type\nvar (\n\t// sent\n\t// Stability: development\n\tRPCMessageTypeSent = RPCMessageTypeKey.String(\"SENT\")\n\t// received\n\t// Stability: development\n\tRPCMessageTypeReceived = RPCMessageTypeKey.String(\"RECEIVED\")\n)\n\n// Enum values for rpc.system.name\nvar (\n\t// [gRPC]\n\t// Stability: development\n\t//\n\t// [gRPC]: https://grpc.io/\n\tRPCSystemNameGRPC = RPCSystemNameKey.String(\"grpc\")\n\t// [Apache Dubbo]\n\t// Stability: development\n\t//\n\t// [Apache Dubbo]: https://dubbo.apache.org/\n\tRPCSystemNameDubbo = RPCSystemNameKey.String(\"dubbo\")\n\t// [Connect RPC]\n\t// Stability: development\n\t//\n\t// [Connect RPC]: https://connectrpc.com/\n\tRPCSystemNameConnectrpc = RPCSystemNameKey.String(\"connectrpc\")\n\t// [JSON-RPC]\n\t// Stability: development\n\t//\n\t// [JSON-RPC]: https://www.jsonrpc.org/\n\tRPCSystemNameJSONRPC = RPCSystemNameKey.String(\"jsonrpc\")\n)\n\n// Namespace: security_rule\nconst (\n\t// SecurityRuleCategoryKey is the attribute Key conforming to the\n\t// \"security_rule.category\" semantic conventions. It represents a categorization\n\t// value keyword used by the entity using the rule for detection of this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Attempted Information Leak\"\n\tSecurityRuleCategoryKey = attribute.Key(\"security_rule.category\")\n\n\t// SecurityRuleDescriptionKey is the attribute Key conforming to the\n\t// \"security_rule.description\" semantic conventions. It represents the\n\t// description of the rule generating the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Block requests to public DNS over HTTPS / TLS protocols\"\n\tSecurityRuleDescriptionKey = attribute.Key(\"security_rule.description\")\n\n\t// SecurityRuleLicenseKey is the attribute Key conforming to the\n\t// \"security_rule.license\" semantic conventions. It represents the name of the\n\t// license under which the rule used to generate this event is made available.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Apache 2.0\"\n\tSecurityRuleLicenseKey = attribute.Key(\"security_rule.license\")\n\n\t// SecurityRuleNameKey is the attribute Key conforming to the\n\t// \"security_rule.name\" semantic conventions. It represents the name of the rule\n\t// or signature generating the event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"BLOCK_DNS_over_TLS\"\n\tSecurityRuleNameKey = attribute.Key(\"security_rule.name\")\n\n\t// SecurityRuleReferenceKey is the attribute Key conforming to the\n\t// \"security_rule.reference\" semantic conventions. It represents the reference\n\t// URL to additional information about the rule used to generate this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://en.wikipedia.org/wiki/DNS_over_TLS\"\n\t// Note: The URL can point to the vendor’s documentation about the rule. If\n\t// that’s not available, it can also be a link to a more general page\n\t// describing this type of alert.\n\tSecurityRuleReferenceKey = attribute.Key(\"security_rule.reference\")\n\n\t// SecurityRuleRulesetNameKey is the attribute Key conforming to the\n\t// \"security_rule.ruleset.name\" semantic conventions. It represents the name of\n\t// the ruleset, policy, group, or parent category in which the rule used to\n\t// generate this event is a member.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Standard_Protocol_Filters\"\n\tSecurityRuleRulesetNameKey = attribute.Key(\"security_rule.ruleset.name\")\n\n\t// SecurityRuleUUIDKey is the attribute Key conforming to the\n\t// \"security_rule.uuid\" semantic conventions. It represents a rule ID that is\n\t// unique within the scope of a set or group of agents, observers, or other\n\t// entities using the rule for detection of this event.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"550e8400-e29b-41d4-a716-446655440000\", \"1100110011\"\n\tSecurityRuleUUIDKey = attribute.Key(\"security_rule.uuid\")\n\n\t// SecurityRuleVersionKey is the attribute Key conforming to the\n\t// \"security_rule.version\" semantic conventions. It represents the version /\n\t// revision of the rule being used for analysis.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.0.0\"\n\tSecurityRuleVersionKey = attribute.Key(\"security_rule.version\")\n)\n\n// SecurityRuleCategory returns an attribute KeyValue conforming to the\n// \"security_rule.category\" semantic conventions. It represents a categorization\n// value keyword used by the entity using the rule for detection of this event.\nfunc SecurityRuleCategory(val string) attribute.KeyValue {\n\treturn SecurityRuleCategoryKey.String(val)\n}\n\n// SecurityRuleDescription returns an attribute KeyValue conforming to the\n// \"security_rule.description\" semantic conventions. It represents the\n// description of the rule generating the event.\nfunc SecurityRuleDescription(val string) attribute.KeyValue {\n\treturn SecurityRuleDescriptionKey.String(val)\n}\n\n// SecurityRuleLicense returns an attribute KeyValue conforming to the\n// \"security_rule.license\" semantic conventions. It represents the name of the\n// license under which the rule used to generate this event is made available.\nfunc SecurityRuleLicense(val string) attribute.KeyValue {\n\treturn SecurityRuleLicenseKey.String(val)\n}\n\n// SecurityRuleName returns an attribute KeyValue conforming to the\n// \"security_rule.name\" semantic conventions. It represents the name of the rule\n// or signature generating the event.\nfunc SecurityRuleName(val string) attribute.KeyValue {\n\treturn SecurityRuleNameKey.String(val)\n}\n\n// SecurityRuleReference returns an attribute KeyValue conforming to the\n// \"security_rule.reference\" semantic conventions. It represents the reference\n// URL to additional information about the rule used to generate this event.\nfunc SecurityRuleReference(val string) attribute.KeyValue {\n\treturn SecurityRuleReferenceKey.String(val)\n}\n\n// SecurityRuleRulesetName returns an attribute KeyValue conforming to the\n// \"security_rule.ruleset.name\" semantic conventions. It represents the name of\n// the ruleset, policy, group, or parent category in which the rule used to\n// generate this event is a member.\nfunc SecurityRuleRulesetName(val string) attribute.KeyValue {\n\treturn SecurityRuleRulesetNameKey.String(val)\n}\n\n// SecurityRuleUUID returns an attribute KeyValue conforming to the\n// \"security_rule.uuid\" semantic conventions. It represents a rule ID that is\n// unique within the scope of a set or group of agents, observers, or other\n// entities using the rule for detection of this event.\nfunc SecurityRuleUUID(val string) attribute.KeyValue {\n\treturn SecurityRuleUUIDKey.String(val)\n}\n\n// SecurityRuleVersion returns an attribute KeyValue conforming to the\n// \"security_rule.version\" semantic conventions. It represents the version /\n// revision of the rule being used for analysis.\nfunc SecurityRuleVersion(val string) attribute.KeyValue {\n\treturn SecurityRuleVersionKey.String(val)\n}\n\n// Namespace: server\nconst (\n\t// ServerAddressKey is the attribute Key conforming to the \"server.address\"\n\t// semantic conventions. It represents the server domain name if available\n\t// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the client side, and when communicating through an\n\t// intermediary, `server.address` SHOULD represent the server address behind any\n\t// intermediaries, for example proxies, if it's available.\n\tServerAddressKey = attribute.Key(\"server.address\")\n\n\t// ServerPortKey is the attribute Key conforming to the \"server.port\" semantic\n\t// conventions. It represents the server port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: 80, 8080, 443\n\t// Note: When observed from the client side, and when communicating through an\n\t// intermediary, `server.port` SHOULD represent the server port behind any\n\t// intermediaries, for example proxies, if it's available.\n\tServerPortKey = attribute.Key(\"server.port\")\n)\n\n// ServerAddress returns an attribute KeyValue conforming to the \"server.address\"\n// semantic conventions. It represents the server domain name if available\n// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\nfunc ServerAddress(val string) attribute.KeyValue {\n\treturn ServerAddressKey.String(val)\n}\n\n// ServerPort returns an attribute KeyValue conforming to the \"server.port\"\n// semantic conventions. It represents the server port number.\nfunc ServerPort(val int) attribute.KeyValue {\n\treturn ServerPortKey.Int(val)\n}\n\n// Namespace: service\nconst (\n\t// ServiceInstanceIDKey is the attribute Key conforming to the\n\t// \"service.instance.id\" semantic conventions. It represents the string ID of\n\t// the service instance.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"627cc493-f310-47de-96bd-71410b7dec09\"\n\t// Note: MUST be unique for each instance of the same\n\t// `service.namespace,service.name` pair (in other words\n\t// `service.namespace,service.name,service.instance.id` triplet MUST be globally\n\t// unique). The ID helps to\n\t// distinguish instances of the same service that exist at the same time (e.g.\n\t// instances of a horizontally scaled\n\t// service).\n\t//\n\t// Implementations, such as SDKs, are recommended to generate a random Version 1\n\t// or Version 4 [RFC\n\t// 4122] UUID, but are free to use an inherent unique ID as\n\t// the source of\n\t// this value if stability is desirable. In that case, the ID SHOULD be used as\n\t// source of a UUID Version 5 and\n\t// SHOULD use the following UUID as the namespace:\n\t// `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\n\t//\n\t// UUIDs are typically recommended, as only an opaque value for the purposes of\n\t// identifying a service instance is\n\t// needed. Similar to what can be seen in the man page for the\n\t// [`/etc/machine-id`] file, the underlying\n\t// data, such as pod name and namespace should be treated as confidential, being\n\t// the user's choice to expose it\n\t// or not via another resource attribute.\n\t//\n\t// For applications running behind an application server (like unicorn), we do\n\t// not recommend using one identifier\n\t// for all processes participating in the application. Instead, it's recommended\n\t// each division (e.g. a worker\n\t// thread in unicorn) to have its own instance.id.\n\t//\n\t// It's not recommended for a Collector to set `service.instance.id` if it can't\n\t// unambiguously determine the\n\t// service instance that is generating that telemetry. For instance, creating an\n\t// UUID based on `pod.name` will\n\t// likely be wrong, as the Collector might not know from which container within\n\t// that pod the telemetry originated.\n\t// However, Collectors can set the `service.instance.id` if they can\n\t// unambiguously determine the service instance\n\t// for that telemetry. This is typically the case for scraping receivers, as\n\t// they know the target address and\n\t// port.\n\t//\n\t// [RFC\n\t// 4122]: https://www.ietf.org/rfc/rfc4122.txt\n\t// [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html\n\tServiceInstanceIDKey = attribute.Key(\"service.instance.id\")\n\n\t// ServiceNameKey is the attribute Key conforming to the \"service.name\" semantic\n\t// conventions. It represents the logical name of the service.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"shoppingcart\"\n\t// Note: MUST be the same for all instances of horizontally scaled services. If\n\t// the value was not specified, SDKs MUST fallback to `unknown_service:`\n\t// concatenated with [`process.executable.name`], e.g. `unknown_service:bash`.\n\t// If `process.executable.name` is not available, the value MUST be set to\n\t// `unknown_service`.\n\t//\n\t// [`process.executable.name`]: process.md\n\tServiceNameKey = attribute.Key(\"service.name\")\n\n\t// ServiceNamespaceKey is the attribute Key conforming to the\n\t// \"service.namespace\" semantic conventions. It represents a namespace for\n\t// `service.name`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Shop\"\n\t// Note: A string value having a meaning that helps to distinguish a group of\n\t// services, for example the team name that owns a group of services.\n\t// `service.name` is expected to be unique within the same namespace. If\n\t// `service.namespace` is not specified in the Resource then `service.name` is\n\t// expected to be unique for all services that have no explicit namespace\n\t// defined (so the empty/unspecified namespace is simply one more valid\n\t// namespace). Zero-length namespace string is assumed equal to unspecified\n\t// namespace.\n\tServiceNamespaceKey = attribute.Key(\"service.namespace\")\n\n\t// ServicePeerNameKey is the attribute Key conforming to the \"service.peer.name\"\n\t// semantic conventions. It represents the logical name of the service on the\n\t// other side of the connection. SHOULD be equal to the actual [`service.name`]\n\t// resource attribute of the remote service if any.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"shoppingcart\"\n\t//\n\t// [`service.name`]: /docs/resource/README.md#service\n\tServicePeerNameKey = attribute.Key(\"service.peer.name\")\n\n\t// ServicePeerNamespaceKey is the attribute Key conforming to the\n\t// \"service.peer.namespace\" semantic conventions. It represents the logical\n\t// namespace of the service on the other side of the connection. SHOULD be equal\n\t// to the actual [`service.namespace`] resource attribute of the remote service\n\t// if any.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Shop\"\n\t//\n\t// [`service.namespace`]: /docs/resource/README.md#service\n\tServicePeerNamespaceKey = attribute.Key(\"service.peer.namespace\")\n\n\t// ServiceVersionKey is the attribute Key conforming to the \"service.version\"\n\t// semantic conventions. It represents the version string of the service\n\t// component. The format is not defined by these conventions.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"2.0.0\", \"a01dbef8a\"\n\tServiceVersionKey = attribute.Key(\"service.version\")\n)\n\n// ServiceInstanceID returns an attribute KeyValue conforming to the\n// \"service.instance.id\" semantic conventions. It represents the string ID of the\n// service instance.\nfunc ServiceInstanceID(val string) attribute.KeyValue {\n\treturn ServiceInstanceIDKey.String(val)\n}\n\n// ServiceName returns an attribute KeyValue conforming to the \"service.name\"\n// semantic conventions. It represents the logical name of the service.\nfunc ServiceName(val string) attribute.KeyValue {\n\treturn ServiceNameKey.String(val)\n}\n\n// ServiceNamespace returns an attribute KeyValue conforming to the\n// \"service.namespace\" semantic conventions. It represents a namespace for\n// `service.name`.\nfunc ServiceNamespace(val string) attribute.KeyValue {\n\treturn ServiceNamespaceKey.String(val)\n}\n\n// ServicePeerName returns an attribute KeyValue conforming to the\n// \"service.peer.name\" semantic conventions. It represents the logical name of\n// the service on the other side of the connection. SHOULD be equal to the actual\n// [`service.name`] resource attribute of the remote service if any.\n//\n// [`service.name`]: /docs/resource/README.md#service\nfunc ServicePeerName(val string) attribute.KeyValue {\n\treturn ServicePeerNameKey.String(val)\n}\n\n// ServicePeerNamespace returns an attribute KeyValue conforming to the\n// \"service.peer.namespace\" semantic conventions. It represents the logical\n// namespace of the service on the other side of the connection. SHOULD be equal\n// to the actual [`service.namespace`] resource attribute of the remote service\n// if any.\n//\n// [`service.namespace`]: /docs/resource/README.md#service\nfunc ServicePeerNamespace(val string) attribute.KeyValue {\n\treturn ServicePeerNamespaceKey.String(val)\n}\n\n// ServiceVersion returns an attribute KeyValue conforming to the\n// \"service.version\" semantic conventions. It represents the version string of\n// the service component. The format is not defined by these conventions.\nfunc ServiceVersion(val string) attribute.KeyValue {\n\treturn ServiceVersionKey.String(val)\n}\n\n// Namespace: session\nconst (\n\t// SessionIDKey is the attribute Key conforming to the \"session.id\" semantic\n\t// conventions. It represents a unique id to identify a session.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 00112233-4455-6677-8899-aabbccddeeff\n\tSessionIDKey = attribute.Key(\"session.id\")\n\n\t// SessionPreviousIDKey is the attribute Key conforming to the\n\t// \"session.previous_id\" semantic conventions. It represents the previous\n\t// `session.id` for this user, when known.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 00112233-4455-6677-8899-aabbccddeeff\n\tSessionPreviousIDKey = attribute.Key(\"session.previous_id\")\n)\n\n// SessionID returns an attribute KeyValue conforming to the \"session.id\"\n// semantic conventions. It represents a unique id to identify a session.\nfunc SessionID(val string) attribute.KeyValue {\n\treturn SessionIDKey.String(val)\n}\n\n// SessionPreviousID returns an attribute KeyValue conforming to the\n// \"session.previous_id\" semantic conventions. It represents the previous\n// `session.id` for this user, when known.\nfunc SessionPreviousID(val string) attribute.KeyValue {\n\treturn SessionPreviousIDKey.String(val)\n}\n\n// Namespace: signalr\nconst (\n\t// SignalRConnectionStatusKey is the attribute Key conforming to the\n\t// \"signalr.connection.status\" semantic conventions. It represents the signalR\n\t// HTTP connection closure status.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"app_shutdown\", \"timeout\"\n\tSignalRConnectionStatusKey = attribute.Key(\"signalr.connection.status\")\n\n\t// SignalRTransportKey is the attribute Key conforming to the\n\t// \"signalr.transport\" semantic conventions. It represents the\n\t// [SignalR transport type].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"web_sockets\", \"long_polling\"\n\t//\n\t// [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md\n\tSignalRTransportKey = attribute.Key(\"signalr.transport\")\n)\n\n// Enum values for signalr.connection.status\nvar (\n\t// The connection was closed normally.\n\t// Stability: stable\n\tSignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String(\"normal_closure\")\n\t// The connection was closed due to a timeout.\n\t// Stability: stable\n\tSignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String(\"timeout\")\n\t// The connection was closed because the app is shutting down.\n\t// Stability: stable\n\tSignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String(\"app_shutdown\")\n)\n\n// Enum values for signalr.transport\nvar (\n\t// ServerSentEvents protocol\n\t// Stability: stable\n\tSignalRTransportServerSentEvents = SignalRTransportKey.String(\"server_sent_events\")\n\t// LongPolling protocol\n\t// Stability: stable\n\tSignalRTransportLongPolling = SignalRTransportKey.String(\"long_polling\")\n\t// WebSockets protocol\n\t// Stability: stable\n\tSignalRTransportWebSockets = SignalRTransportKey.String(\"web_sockets\")\n)\n\n// Namespace: source\nconst (\n\t// SourceAddressKey is the attribute Key conforming to the \"source.address\"\n\t// semantic conventions. It represents the source address - domain name if\n\t// available without reverse DNS lookup; otherwise, IP address or Unix domain\n\t// socket name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"source.example.com\", \"10.1.2.80\", \"/tmp/my.sock\"\n\t// Note: When observed from the destination side, and when communicating through\n\t// an intermediary, `source.address` SHOULD represent the source address behind\n\t// any intermediaries, for example proxies, if it's available.\n\tSourceAddressKey = attribute.Key(\"source.address\")\n\n\t// SourcePortKey is the attribute Key conforming to the \"source.port\" semantic\n\t// conventions. It represents the source port number.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 3389, 2888\n\tSourcePortKey = attribute.Key(\"source.port\")\n)\n\n// SourceAddress returns an attribute KeyValue conforming to the \"source.address\"\n// semantic conventions. It represents the source address - domain name if\n// available without reverse DNS lookup; otherwise, IP address or Unix domain\n// socket name.\nfunc SourceAddress(val string) attribute.KeyValue {\n\treturn SourceAddressKey.String(val)\n}\n\n// SourcePort returns an attribute KeyValue conforming to the \"source.port\"\n// semantic conventions. It represents the source port number.\nfunc SourcePort(val int) attribute.KeyValue {\n\treturn SourcePortKey.Int(val)\n}\n\n// Namespace: system\nconst (\n\t// SystemDeviceKey is the attribute Key conforming to the \"system.device\"\n\t// semantic conventions. It represents the device identifier.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"(identifier)\"\n\tSystemDeviceKey = attribute.Key(\"system.device\")\n\n\t// SystemFilesystemModeKey is the attribute Key conforming to the\n\t// \"system.filesystem.mode\" semantic conventions. It represents the filesystem\n\t// mode.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"rw, ro\"\n\tSystemFilesystemModeKey = attribute.Key(\"system.filesystem.mode\")\n\n\t// SystemFilesystemMountpointKey is the attribute Key conforming to the\n\t// \"system.filesystem.mountpoint\" semantic conventions. It represents the\n\t// filesystem mount path.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/mnt/data\"\n\tSystemFilesystemMountpointKey = attribute.Key(\"system.filesystem.mountpoint\")\n\n\t// SystemFilesystemStateKey is the attribute Key conforming to the\n\t// \"system.filesystem.state\" semantic conventions. It represents the filesystem\n\t// state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"used\"\n\tSystemFilesystemStateKey = attribute.Key(\"system.filesystem.state\")\n\n\t// SystemFilesystemTypeKey is the attribute Key conforming to the\n\t// \"system.filesystem.type\" semantic conventions. It represents the filesystem\n\t// type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ext4\"\n\tSystemFilesystemTypeKey = attribute.Key(\"system.filesystem.type\")\n\n\t// SystemMemoryLinuxSlabStateKey is the attribute Key conforming to the\n\t// \"system.memory.linux.slab.state\" semantic conventions. It represents the\n\t// Linux Slab memory state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"reclaimable\", \"unreclaimable\"\n\tSystemMemoryLinuxSlabStateKey = attribute.Key(\"system.memory.linux.slab.state\")\n\n\t// SystemMemoryStateKey is the attribute Key conforming to the\n\t// \"system.memory.state\" semantic conventions. It represents the memory state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"free\", \"cached\"\n\tSystemMemoryStateKey = attribute.Key(\"system.memory.state\")\n\n\t// SystemPagingDirectionKey is the attribute Key conforming to the\n\t// \"system.paging.direction\" semantic conventions. It represents the paging\n\t// access direction.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"in\"\n\tSystemPagingDirectionKey = attribute.Key(\"system.paging.direction\")\n\n\t// SystemPagingFaultTypeKey is the attribute Key conforming to the\n\t// \"system.paging.fault.type\" semantic conventions. It represents the paging\n\t// fault type.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"minor\"\n\tSystemPagingFaultTypeKey = attribute.Key(\"system.paging.fault.type\")\n\n\t// SystemPagingStateKey is the attribute Key conforming to the\n\t// \"system.paging.state\" semantic conventions. It represents the memory paging\n\t// state.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"free\"\n\tSystemPagingStateKey = attribute.Key(\"system.paging.state\")\n)\n\n// SystemDevice returns an attribute KeyValue conforming to the \"system.device\"\n// semantic conventions. It represents the device identifier.\nfunc SystemDevice(val string) attribute.KeyValue {\n\treturn SystemDeviceKey.String(val)\n}\n\n// SystemFilesystemMode returns an attribute KeyValue conforming to the\n// \"system.filesystem.mode\" semantic conventions. It represents the filesystem\n// mode.\nfunc SystemFilesystemMode(val string) attribute.KeyValue {\n\treturn SystemFilesystemModeKey.String(val)\n}\n\n// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the\n// \"system.filesystem.mountpoint\" semantic conventions. It represents the\n// filesystem mount path.\nfunc SystemFilesystemMountpoint(val string) attribute.KeyValue {\n\treturn SystemFilesystemMountpointKey.String(val)\n}\n\n// Enum values for system.filesystem.state\nvar (\n\t// used\n\t// Stability: development\n\tSystemFilesystemStateUsed = SystemFilesystemStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemFilesystemStateFree = SystemFilesystemStateKey.String(\"free\")\n\t// reserved\n\t// Stability: development\n\tSystemFilesystemStateReserved = SystemFilesystemStateKey.String(\"reserved\")\n)\n\n// Enum values for system.filesystem.type\nvar (\n\t// fat32\n\t// Stability: development\n\tSystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String(\"fat32\")\n\t// exfat\n\t// Stability: development\n\tSystemFilesystemTypeExfat = SystemFilesystemTypeKey.String(\"exfat\")\n\t// ntfs\n\t// Stability: development\n\tSystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String(\"ntfs\")\n\t// refs\n\t// Stability: development\n\tSystemFilesystemTypeRefs = SystemFilesystemTypeKey.String(\"refs\")\n\t// hfsplus\n\t// Stability: development\n\tSystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String(\"hfsplus\")\n\t// ext4\n\t// Stability: development\n\tSystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String(\"ext4\")\n)\n\n// Enum values for system.memory.linux.slab.state\nvar (\n\t// reclaimable\n\t// Stability: development\n\tSystemMemoryLinuxSlabStateReclaimable = SystemMemoryLinuxSlabStateKey.String(\"reclaimable\")\n\t// unreclaimable\n\t// Stability: development\n\tSystemMemoryLinuxSlabStateUnreclaimable = SystemMemoryLinuxSlabStateKey.String(\"unreclaimable\")\n)\n\n// Enum values for system.memory.state\nvar (\n\t// Actual used virtual memory in bytes.\n\t// Stability: development\n\tSystemMemoryStateUsed = SystemMemoryStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemMemoryStateFree = SystemMemoryStateKey.String(\"free\")\n\t// buffers\n\t// Stability: development\n\tSystemMemoryStateBuffers = SystemMemoryStateKey.String(\"buffers\")\n\t// cached\n\t// Stability: development\n\tSystemMemoryStateCached = SystemMemoryStateKey.String(\"cached\")\n)\n\n// Enum values for system.paging.direction\nvar (\n\t// in\n\t// Stability: development\n\tSystemPagingDirectionIn = SystemPagingDirectionKey.String(\"in\")\n\t// out\n\t// Stability: development\n\tSystemPagingDirectionOut = SystemPagingDirectionKey.String(\"out\")\n)\n\n// Enum values for system.paging.fault.type\nvar (\n\t// major\n\t// Stability: development\n\tSystemPagingFaultTypeMajor = SystemPagingFaultTypeKey.String(\"major\")\n\t// minor\n\t// Stability: development\n\tSystemPagingFaultTypeMinor = SystemPagingFaultTypeKey.String(\"minor\")\n)\n\n// Enum values for system.paging.state\nvar (\n\t// used\n\t// Stability: development\n\tSystemPagingStateUsed = SystemPagingStateKey.String(\"used\")\n\t// free\n\t// Stability: development\n\tSystemPagingStateFree = SystemPagingStateKey.String(\"free\")\n)\n\n// Namespace: telemetry\nconst (\n\t// TelemetryDistroNameKey is the attribute Key conforming to the\n\t// \"telemetry.distro.name\" semantic conventions. It represents the name of the\n\t// auto instrumentation agent or distribution, if used.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"parts-unlimited-java\"\n\t// Note: Official auto instrumentation agents and distributions SHOULD set the\n\t// `telemetry.distro.name` attribute to\n\t// a string starting with `opentelemetry-`, e.g.\n\t// `opentelemetry-java-instrumentation`.\n\tTelemetryDistroNameKey = attribute.Key(\"telemetry.distro.name\")\n\n\t// TelemetryDistroVersionKey is the attribute Key conforming to the\n\t// \"telemetry.distro.version\" semantic conventions. It represents the version\n\t// string of the auto instrumentation agent or distribution, if used.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2.3\"\n\tTelemetryDistroVersionKey = attribute.Key(\"telemetry.distro.version\")\n\n\t// TelemetrySDKLanguageKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.language\" semantic conventions. It represents the language of\n\t// the telemetry SDK.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples:\n\tTelemetrySDKLanguageKey = attribute.Key(\"telemetry.sdk.language\")\n\n\t// TelemetrySDKNameKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.name\" semantic conventions. It represents the name of the\n\t// telemetry SDK as defined above.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"opentelemetry\"\n\t// Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to\n\t// `opentelemetry`.\n\t// If another SDK, like a fork or a vendor-provided implementation, is used,\n\t// this SDK MUST set the\n\t// `telemetry.sdk.name` attribute to the fully-qualified class or module name of\n\t// this SDK's main entry point\n\t// or another suitable identifier depending on the language.\n\t// The identifier `opentelemetry` is reserved and MUST NOT be used in this case.\n\t// All custom identifiers SHOULD be stable across different versions of an\n\t// implementation.\n\tTelemetrySDKNameKey = attribute.Key(\"telemetry.sdk.name\")\n\n\t// TelemetrySDKVersionKey is the attribute Key conforming to the\n\t// \"telemetry.sdk.version\" semantic conventions. It represents the version\n\t// string of the telemetry SDK.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"1.2.3\"\n\tTelemetrySDKVersionKey = attribute.Key(\"telemetry.sdk.version\")\n)\n\n// TelemetryDistroName returns an attribute KeyValue conforming to the\n// \"telemetry.distro.name\" semantic conventions. It represents the name of the\n// auto instrumentation agent or distribution, if used.\nfunc TelemetryDistroName(val string) attribute.KeyValue {\n\treturn TelemetryDistroNameKey.String(val)\n}\n\n// TelemetryDistroVersion returns an attribute KeyValue conforming to the\n// \"telemetry.distro.version\" semantic conventions. It represents the version\n// string of the auto instrumentation agent or distribution, if used.\nfunc TelemetryDistroVersion(val string) attribute.KeyValue {\n\treturn TelemetryDistroVersionKey.String(val)\n}\n\n// TelemetrySDKName returns an attribute KeyValue conforming to the\n// \"telemetry.sdk.name\" semantic conventions. It represents the name of the\n// telemetry SDK as defined above.\nfunc TelemetrySDKName(val string) attribute.KeyValue {\n\treturn TelemetrySDKNameKey.String(val)\n}\n\n// TelemetrySDKVersion returns an attribute KeyValue conforming to the\n// \"telemetry.sdk.version\" semantic conventions. It represents the version string\n// of the telemetry SDK.\nfunc TelemetrySDKVersion(val string) attribute.KeyValue {\n\treturn TelemetrySDKVersionKey.String(val)\n}\n\n// Enum values for telemetry.sdk.language\nvar (\n\t// cpp\n\t// Stability: stable\n\tTelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String(\"cpp\")\n\t// dotnet\n\t// Stability: stable\n\tTelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String(\"dotnet\")\n\t// erlang\n\t// Stability: stable\n\tTelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String(\"erlang\")\n\t// go\n\t// Stability: stable\n\tTelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String(\"go\")\n\t// java\n\t// Stability: stable\n\tTelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String(\"java\")\n\t// nodejs\n\t// Stability: stable\n\tTelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String(\"nodejs\")\n\t// php\n\t// Stability: stable\n\tTelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String(\"php\")\n\t// python\n\t// Stability: stable\n\tTelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String(\"python\")\n\t// ruby\n\t// Stability: stable\n\tTelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String(\"ruby\")\n\t// rust\n\t// Stability: stable\n\tTelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String(\"rust\")\n\t// swift\n\t// Stability: stable\n\tTelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String(\"swift\")\n\t// webjs\n\t// Stability: stable\n\tTelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String(\"webjs\")\n)\n\n// Namespace: test\nconst (\n\t// TestCaseNameKey is the attribute Key conforming to the \"test.case.name\"\n\t// semantic conventions. It represents the fully qualified human readable name\n\t// of the [test case].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"org.example.TestCase1.test1\", \"example/tests/TestCase1.test1\",\n\t// \"ExampleTestCase1_test1\"\n\t//\n\t// [test case]: https://wikipedia.org/wiki/Test_case\n\tTestCaseNameKey = attribute.Key(\"test.case.name\")\n\n\t// TestCaseResultStatusKey is the attribute Key conforming to the\n\t// \"test.case.result.status\" semantic conventions. It represents the status of\n\t// the actual test case result from test execution.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"pass\", \"fail\"\n\tTestCaseResultStatusKey = attribute.Key(\"test.case.result.status\")\n\n\t// TestSuiteNameKey is the attribute Key conforming to the \"test.suite.name\"\n\t// semantic conventions. It represents the human readable name of a [test suite]\n\t// .\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TestSuite1\"\n\t//\n\t// [test suite]: https://wikipedia.org/wiki/Test_suite\n\tTestSuiteNameKey = attribute.Key(\"test.suite.name\")\n\n\t// TestSuiteRunStatusKey is the attribute Key conforming to the\n\t// \"test.suite.run.status\" semantic conventions. It represents the status of the\n\t// test suite run.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"success\", \"failure\", \"skipped\", \"aborted\", \"timed_out\",\n\t// \"in_progress\"\n\tTestSuiteRunStatusKey = attribute.Key(\"test.suite.run.status\")\n)\n\n// TestCaseName returns an attribute KeyValue conforming to the \"test.case.name\"\n// semantic conventions. It represents the fully qualified human readable name of\n// the [test case].\n//\n// [test case]: https://wikipedia.org/wiki/Test_case\nfunc TestCaseName(val string) attribute.KeyValue {\n\treturn TestCaseNameKey.String(val)\n}\n\n// TestSuiteName returns an attribute KeyValue conforming to the\n// \"test.suite.name\" semantic conventions. It represents the human readable name\n// of a [test suite].\n//\n// [test suite]: https://wikipedia.org/wiki/Test_suite\nfunc TestSuiteName(val string) attribute.KeyValue {\n\treturn TestSuiteNameKey.String(val)\n}\n\n// Enum values for test.case.result.status\nvar (\n\t// pass\n\t// Stability: development\n\tTestCaseResultStatusPass = TestCaseResultStatusKey.String(\"pass\")\n\t// fail\n\t// Stability: development\n\tTestCaseResultStatusFail = TestCaseResultStatusKey.String(\"fail\")\n)\n\n// Enum values for test.suite.run.status\nvar (\n\t// success\n\t// Stability: development\n\tTestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String(\"success\")\n\t// failure\n\t// Stability: development\n\tTestSuiteRunStatusFailure = TestSuiteRunStatusKey.String(\"failure\")\n\t// skipped\n\t// Stability: development\n\tTestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String(\"skipped\")\n\t// aborted\n\t// Stability: development\n\tTestSuiteRunStatusAborted = TestSuiteRunStatusKey.String(\"aborted\")\n\t// timed_out\n\t// Stability: development\n\tTestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String(\"timed_out\")\n\t// in_progress\n\t// Stability: development\n\tTestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String(\"in_progress\")\n)\n\n// Namespace: thread\nconst (\n\t// ThreadIDKey is the attribute Key conforming to the \"thread.id\" semantic\n\t// conventions. It represents the current \"managed\" thread ID (as opposed to OS\n\t// thread ID).\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Note:\n\t// Examples of where the value can be extracted from:\n\t//\n\t// | Language or platform | Source |\n\t// | --- | --- |\n\t// | JVM | `Thread.currentThread().threadId()` |\n\t// | .NET | `Thread.CurrentThread.ManagedThreadId` |\n\t// | Python | `threading.current_thread().ident` |\n\t// | Ruby | `Thread.current.object_id` |\n\t// | C++ | `std::this_thread::get_id()` |\n\t// | Erlang | `erlang:self()` |\n\tThreadIDKey = attribute.Key(\"thread.id\")\n\n\t// ThreadNameKey is the attribute Key conforming to the \"thread.name\" semantic\n\t// conventions. It represents the current thread name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: main\n\t// Note:\n\t// Examples of where the value can be extracted from:\n\t//\n\t// | Language or platform | Source |\n\t// | --- | --- |\n\t// | JVM | `Thread.currentThread().getName()` |\n\t// | .NET | `Thread.CurrentThread.Name` |\n\t// | Python | `threading.current_thread().name` |\n\t// | Ruby | `Thread.current.name` |\n\t// | Erlang | `erlang:process_info(self(), registered_name)` |\n\tThreadNameKey = attribute.Key(\"thread.name\")\n)\n\n// ThreadID returns an attribute KeyValue conforming to the \"thread.id\" semantic\n// conventions. It represents the current \"managed\" thread ID (as opposed to OS\n// thread ID).\nfunc ThreadID(val int) attribute.KeyValue {\n\treturn ThreadIDKey.Int(val)\n}\n\n// ThreadName returns an attribute KeyValue conforming to the \"thread.name\"\n// semantic conventions. It represents the current thread name.\nfunc ThreadName(val string) attribute.KeyValue {\n\treturn ThreadNameKey.String(val)\n}\n\n// Namespace: tls\nconst (\n\t// TLSCipherKey is the attribute Key conforming to the \"tls.cipher\" semantic\n\t// conventions. It represents the string indicating the [cipher] used during the\n\t// current connection.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TLS_RSA_WITH_3DES_EDE_CBC_SHA\",\n\t// \"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\"\n\t// Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions`\n\t// of the [registered TLS Cipher Suits].\n\t//\n\t// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5\n\t// [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4\n\tTLSCipherKey = attribute.Key(\"tls.cipher\")\n\n\t// TLSClientCertificateKey is the attribute Key conforming to the\n\t// \"tls.client.certificate\" semantic conventions. It represents the PEM-encoded\n\t// stand-alone certificate offered by the client. This is usually\n\t// mutually-exclusive of `client.certificate_chain` since this value also exists\n\t// in that list.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\"\n\tTLSClientCertificateKey = attribute.Key(\"tls.client.certificate\")\n\n\t// TLSClientCertificateChainKey is the attribute Key conforming to the\n\t// \"tls.client.certificate_chain\" semantic conventions. It represents the array\n\t// of PEM-encoded certificates that make up the certificate chain offered by the\n\t// client. This is usually mutually-exclusive of `client.certificate` since that\n\t// value should be the first certificate in the chain.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\", \"MI...\"\n\tTLSClientCertificateChainKey = attribute.Key(\"tls.client.certificate_chain\")\n\n\t// TLSClientHashMd5Key is the attribute Key conforming to the\n\t// \"tls.client.hash.md5\" semantic conventions. It represents the certificate\n\t// fingerprint using the MD5 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"\n\tTLSClientHashMd5Key = attribute.Key(\"tls.client.hash.md5\")\n\n\t// TLSClientHashSha1Key is the attribute Key conforming to the\n\t// \"tls.client.hash.sha1\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA1 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9E393D93138888D288266C2D915214D1D1CCEB2A\"\n\tTLSClientHashSha1Key = attribute.Key(\"tls.client.hash.sha1\")\n\n\t// TLSClientHashSha256Key is the attribute Key conforming to the\n\t// \"tls.client.hash.sha256\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA256 digest of DER-encoded version of certificate\n\t// offered by the client. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"\n\tTLSClientHashSha256Key = attribute.Key(\"tls.client.hash.sha256\")\n\n\t// TLSClientIssuerKey is the attribute Key conforming to the \"tls.client.issuer\"\n\t// semantic conventions. It represents the distinguished name of [subject] of\n\t// the issuer of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"\n\t//\n\t// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\n\tTLSClientIssuerKey = attribute.Key(\"tls.client.issuer\")\n\n\t// TLSClientJa3Key is the attribute Key conforming to the \"tls.client.ja3\"\n\t// semantic conventions. It represents a hash that identifies clients based on\n\t// how they perform an SSL/TLS handshake.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"d4e5b18d6b55c71272893221c96ba240\"\n\tTLSClientJa3Key = attribute.Key(\"tls.client.ja3\")\n\n\t// TLSClientNotAfterKey is the attribute Key conforming to the\n\t// \"tls.client.not_after\" semantic conventions. It represents the date/Time\n\t// indicating when client certificate is no longer considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T00:00:00.000Z\"\n\tTLSClientNotAfterKey = attribute.Key(\"tls.client.not_after\")\n\n\t// TLSClientNotBeforeKey is the attribute Key conforming to the\n\t// \"tls.client.not_before\" semantic conventions. It represents the date/Time\n\t// indicating when client certificate is first considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1970-01-01T00:00:00.000Z\"\n\tTLSClientNotBeforeKey = attribute.Key(\"tls.client.not_before\")\n\n\t// TLSClientSubjectKey is the attribute Key conforming to the\n\t// \"tls.client.subject\" semantic conventions. It represents the distinguished\n\t// name of subject of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=myclient, OU=Documentation Team, DC=example, DC=com\"\n\tTLSClientSubjectKey = attribute.Key(\"tls.client.subject\")\n\n\t// TLSClientSupportedCiphersKey is the attribute Key conforming to the\n\t// \"tls.client.supported_ciphers\" semantic conventions. It represents the array\n\t// of ciphers offered by the client during the client hello.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\",\n\t// \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\"\n\tTLSClientSupportedCiphersKey = attribute.Key(\"tls.client.supported_ciphers\")\n\n\t// TLSCurveKey is the attribute Key conforming to the \"tls.curve\" semantic\n\t// conventions. It represents the string indicating the curve used for the given\n\t// cipher, when applicable.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"secp256r1\"\n\tTLSCurveKey = attribute.Key(\"tls.curve\")\n\n\t// TLSEstablishedKey is the attribute Key conforming to the \"tls.established\"\n\t// semantic conventions. It represents the boolean flag indicating if the TLS\n\t// negotiation was successful and transitioned to an encrypted tunnel.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: true\n\tTLSEstablishedKey = attribute.Key(\"tls.established\")\n\n\t// TLSNextProtocolKey is the attribute Key conforming to the \"tls.next_protocol\"\n\t// semantic conventions. It represents the string indicating the protocol being\n\t// tunneled. Per the values in the [IANA registry], this string should be lower\n\t// case.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"http/1.1\"\n\t//\n\t// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\n\tTLSNextProtocolKey = attribute.Key(\"tls.next_protocol\")\n\n\t// TLSProtocolNameKey is the attribute Key conforming to the \"tls.protocol.name\"\n\t// semantic conventions. It represents the normalized lowercase protocol name\n\t// parsed from original string of the negotiated [SSL/TLS protocol version].\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t//\n\t// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\n\tTLSProtocolNameKey = attribute.Key(\"tls.protocol.name\")\n\n\t// TLSProtocolVersionKey is the attribute Key conforming to the\n\t// \"tls.protocol.version\" semantic conventions. It represents the numeric part\n\t// of the version parsed from the original string of the negotiated\n\t// [SSL/TLS protocol version].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1.2\", \"3\"\n\t//\n\t// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\n\tTLSProtocolVersionKey = attribute.Key(\"tls.protocol.version\")\n\n\t// TLSResumedKey is the attribute Key conforming to the \"tls.resumed\" semantic\n\t// conventions. It represents the boolean flag indicating if this TLS connection\n\t// was resumed from an existing TLS negotiation.\n\t//\n\t// Type: boolean\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: true\n\tTLSResumedKey = attribute.Key(\"tls.resumed\")\n\n\t// TLSServerCertificateKey is the attribute Key conforming to the\n\t// \"tls.server.certificate\" semantic conventions. It represents the PEM-encoded\n\t// stand-alone certificate offered by the server. This is usually\n\t// mutually-exclusive of `server.certificate_chain` since this value also exists\n\t// in that list.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\"\n\tTLSServerCertificateKey = attribute.Key(\"tls.server.certificate\")\n\n\t// TLSServerCertificateChainKey is the attribute Key conforming to the\n\t// \"tls.server.certificate_chain\" semantic conventions. It represents the array\n\t// of PEM-encoded certificates that make up the certificate chain offered by the\n\t// server. This is usually mutually-exclusive of `server.certificate` since that\n\t// value should be the first certificate in the chain.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"MII...\", \"MI...\"\n\tTLSServerCertificateChainKey = attribute.Key(\"tls.server.certificate_chain\")\n\n\t// TLSServerHashMd5Key is the attribute Key conforming to the\n\t// \"tls.server.hash.md5\" semantic conventions. It represents the certificate\n\t// fingerprint using the MD5 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"\n\tTLSServerHashMd5Key = attribute.Key(\"tls.server.hash.md5\")\n\n\t// TLSServerHashSha1Key is the attribute Key conforming to the\n\t// \"tls.server.hash.sha1\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA1 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9E393D93138888D288266C2D915214D1D1CCEB2A\"\n\tTLSServerHashSha1Key = attribute.Key(\"tls.server.hash.sha1\")\n\n\t// TLSServerHashSha256Key is the attribute Key conforming to the\n\t// \"tls.server.hash.sha256\" semantic conventions. It represents the certificate\n\t// fingerprint using the SHA256 digest of DER-encoded version of certificate\n\t// offered by the server. For consistency with other hash values, this value\n\t// should be formatted as an uppercase hash.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"\n\tTLSServerHashSha256Key = attribute.Key(\"tls.server.hash.sha256\")\n\n\t// TLSServerIssuerKey is the attribute Key conforming to the \"tls.server.issuer\"\n\t// semantic conventions. It represents the distinguished name of [subject] of\n\t// the issuer of the x.509 certificate presented by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"\n\t//\n\t// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\n\tTLSServerIssuerKey = attribute.Key(\"tls.server.issuer\")\n\n\t// TLSServerJa3sKey is the attribute Key conforming to the \"tls.server.ja3s\"\n\t// semantic conventions. It represents a hash that identifies servers based on\n\t// how they perform an SSL/TLS handshake.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"d4e5b18d6b55c71272893221c96ba240\"\n\tTLSServerJa3sKey = attribute.Key(\"tls.server.ja3s\")\n\n\t// TLSServerNotAfterKey is the attribute Key conforming to the\n\t// \"tls.server.not_after\" semantic conventions. It represents the date/Time\n\t// indicating when server certificate is no longer considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"2021-01-01T00:00:00.000Z\"\n\tTLSServerNotAfterKey = attribute.Key(\"tls.server.not_after\")\n\n\t// TLSServerNotBeforeKey is the attribute Key conforming to the\n\t// \"tls.server.not_before\" semantic conventions. It represents the date/Time\n\t// indicating when server certificate is first considered valid.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"1970-01-01T00:00:00.000Z\"\n\tTLSServerNotBeforeKey = attribute.Key(\"tls.server.not_before\")\n\n\t// TLSServerSubjectKey is the attribute Key conforming to the\n\t// \"tls.server.subject\" semantic conventions. It represents the distinguished\n\t// name of subject of the x.509 certificate presented by the server.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"CN=myserver, OU=Documentation Team, DC=example, DC=com\"\n\tTLSServerSubjectKey = attribute.Key(\"tls.server.subject\")\n)\n\n// TLSCipher returns an attribute KeyValue conforming to the \"tls.cipher\"\n// semantic conventions. It represents the string indicating the [cipher] used\n// during the current connection.\n//\n// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5\nfunc TLSCipher(val string) attribute.KeyValue {\n\treturn TLSCipherKey.String(val)\n}\n\n// TLSClientCertificate returns an attribute KeyValue conforming to the\n// \"tls.client.certificate\" semantic conventions. It represents the PEM-encoded\n// stand-alone certificate offered by the client. This is usually\n// mutually-exclusive of `client.certificate_chain` since this value also exists\n// in that list.\nfunc TLSClientCertificate(val string) attribute.KeyValue {\n\treturn TLSClientCertificateKey.String(val)\n}\n\n// TLSClientCertificateChain returns an attribute KeyValue conforming to the\n// \"tls.client.certificate_chain\" semantic conventions. It represents the array\n// of PEM-encoded certificates that make up the certificate chain offered by the\n// client. This is usually mutually-exclusive of `client.certificate` since that\n// value should be the first certificate in the chain.\nfunc TLSClientCertificateChain(val ...string) attribute.KeyValue {\n\treturn TLSClientCertificateChainKey.StringSlice(val)\n}\n\n// TLSClientHashMd5 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.md5\" semantic conventions. It represents the certificate\n// fingerprint using the MD5 digest of DER-encoded version of certificate offered\n// by the client. For consistency with other hash values, this value should be\n// formatted as an uppercase hash.\nfunc TLSClientHashMd5(val string) attribute.KeyValue {\n\treturn TLSClientHashMd5Key.String(val)\n}\n\n// TLSClientHashSha1 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.sha1\" semantic conventions. It represents the certificate\n// fingerprint using the SHA1 digest of DER-encoded version of certificate\n// offered by the client. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSClientHashSha1(val string) attribute.KeyValue {\n\treturn TLSClientHashSha1Key.String(val)\n}\n\n// TLSClientHashSha256 returns an attribute KeyValue conforming to the\n// \"tls.client.hash.sha256\" semantic conventions. It represents the certificate\n// fingerprint using the SHA256 digest of DER-encoded version of certificate\n// offered by the client. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSClientHashSha256(val string) attribute.KeyValue {\n\treturn TLSClientHashSha256Key.String(val)\n}\n\n// TLSClientIssuer returns an attribute KeyValue conforming to the\n// \"tls.client.issuer\" semantic conventions. It represents the distinguished name\n// of [subject] of the issuer of the x.509 certificate presented by the client.\n//\n// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\nfunc TLSClientIssuer(val string) attribute.KeyValue {\n\treturn TLSClientIssuerKey.String(val)\n}\n\n// TLSClientJa3 returns an attribute KeyValue conforming to the \"tls.client.ja3\"\n// semantic conventions. It represents a hash that identifies clients based on\n// how they perform an SSL/TLS handshake.\nfunc TLSClientJa3(val string) attribute.KeyValue {\n\treturn TLSClientJa3Key.String(val)\n}\n\n// TLSClientNotAfter returns an attribute KeyValue conforming to the\n// \"tls.client.not_after\" semantic conventions. It represents the date/Time\n// indicating when client certificate is no longer considered valid.\nfunc TLSClientNotAfter(val string) attribute.KeyValue {\n\treturn TLSClientNotAfterKey.String(val)\n}\n\n// TLSClientNotBefore returns an attribute KeyValue conforming to the\n// \"tls.client.not_before\" semantic conventions. It represents the date/Time\n// indicating when client certificate is first considered valid.\nfunc TLSClientNotBefore(val string) attribute.KeyValue {\n\treturn TLSClientNotBeforeKey.String(val)\n}\n\n// TLSClientSubject returns an attribute KeyValue conforming to the\n// \"tls.client.subject\" semantic conventions. It represents the distinguished\n// name of subject of the x.509 certificate presented by the client.\nfunc TLSClientSubject(val string) attribute.KeyValue {\n\treturn TLSClientSubjectKey.String(val)\n}\n\n// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the\n// \"tls.client.supported_ciphers\" semantic conventions. It represents the array\n// of ciphers offered by the client during the client hello.\nfunc TLSClientSupportedCiphers(val ...string) attribute.KeyValue {\n\treturn TLSClientSupportedCiphersKey.StringSlice(val)\n}\n\n// TLSCurve returns an attribute KeyValue conforming to the \"tls.curve\" semantic\n// conventions. It represents the string indicating the curve used for the given\n// cipher, when applicable.\nfunc TLSCurve(val string) attribute.KeyValue {\n\treturn TLSCurveKey.String(val)\n}\n\n// TLSEstablished returns an attribute KeyValue conforming to the\n// \"tls.established\" semantic conventions. It represents the boolean flag\n// indicating if the TLS negotiation was successful and transitioned to an\n// encrypted tunnel.\nfunc TLSEstablished(val bool) attribute.KeyValue {\n\treturn TLSEstablishedKey.Bool(val)\n}\n\n// TLSNextProtocol returns an attribute KeyValue conforming to the\n// \"tls.next_protocol\" semantic conventions. It represents the string indicating\n// the protocol being tunneled. Per the values in the [IANA registry], this\n// string should be lower case.\n//\n// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\nfunc TLSNextProtocol(val string) attribute.KeyValue {\n\treturn TLSNextProtocolKey.String(val)\n}\n\n// TLSProtocolVersion returns an attribute KeyValue conforming to the\n// \"tls.protocol.version\" semantic conventions. It represents the numeric part of\n// the version parsed from the original string of the negotiated\n// [SSL/TLS protocol version].\n//\n// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values\nfunc TLSProtocolVersion(val string) attribute.KeyValue {\n\treturn TLSProtocolVersionKey.String(val)\n}\n\n// TLSResumed returns an attribute KeyValue conforming to the \"tls.resumed\"\n// semantic conventions. It represents the boolean flag indicating if this TLS\n// connection was resumed from an existing TLS negotiation.\nfunc TLSResumed(val bool) attribute.KeyValue {\n\treturn TLSResumedKey.Bool(val)\n}\n\n// TLSServerCertificate returns an attribute KeyValue conforming to the\n// \"tls.server.certificate\" semantic conventions. It represents the PEM-encoded\n// stand-alone certificate offered by the server. This is usually\n// mutually-exclusive of `server.certificate_chain` since this value also exists\n// in that list.\nfunc TLSServerCertificate(val string) attribute.KeyValue {\n\treturn TLSServerCertificateKey.String(val)\n}\n\n// TLSServerCertificateChain returns an attribute KeyValue conforming to the\n// \"tls.server.certificate_chain\" semantic conventions. It represents the array\n// of PEM-encoded certificates that make up the certificate chain offered by the\n// server. This is usually mutually-exclusive of `server.certificate` since that\n// value should be the first certificate in the chain.\nfunc TLSServerCertificateChain(val ...string) attribute.KeyValue {\n\treturn TLSServerCertificateChainKey.StringSlice(val)\n}\n\n// TLSServerHashMd5 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.md5\" semantic conventions. It represents the certificate\n// fingerprint using the MD5 digest of DER-encoded version of certificate offered\n// by the server. For consistency with other hash values, this value should be\n// formatted as an uppercase hash.\nfunc TLSServerHashMd5(val string) attribute.KeyValue {\n\treturn TLSServerHashMd5Key.String(val)\n}\n\n// TLSServerHashSha1 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.sha1\" semantic conventions. It represents the certificate\n// fingerprint using the SHA1 digest of DER-encoded version of certificate\n// offered by the server. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSServerHashSha1(val string) attribute.KeyValue {\n\treturn TLSServerHashSha1Key.String(val)\n}\n\n// TLSServerHashSha256 returns an attribute KeyValue conforming to the\n// \"tls.server.hash.sha256\" semantic conventions. It represents the certificate\n// fingerprint using the SHA256 digest of DER-encoded version of certificate\n// offered by the server. For consistency with other hash values, this value\n// should be formatted as an uppercase hash.\nfunc TLSServerHashSha256(val string) attribute.KeyValue {\n\treturn TLSServerHashSha256Key.String(val)\n}\n\n// TLSServerIssuer returns an attribute KeyValue conforming to the\n// \"tls.server.issuer\" semantic conventions. It represents the distinguished name\n// of [subject] of the issuer of the x.509 certificate presented by the client.\n//\n// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6\nfunc TLSServerIssuer(val string) attribute.KeyValue {\n\treturn TLSServerIssuerKey.String(val)\n}\n\n// TLSServerJa3s returns an attribute KeyValue conforming to the\n// \"tls.server.ja3s\" semantic conventions. It represents a hash that identifies\n// servers based on how they perform an SSL/TLS handshake.\nfunc TLSServerJa3s(val string) attribute.KeyValue {\n\treturn TLSServerJa3sKey.String(val)\n}\n\n// TLSServerNotAfter returns an attribute KeyValue conforming to the\n// \"tls.server.not_after\" semantic conventions. It represents the date/Time\n// indicating when server certificate is no longer considered valid.\nfunc TLSServerNotAfter(val string) attribute.KeyValue {\n\treturn TLSServerNotAfterKey.String(val)\n}\n\n// TLSServerNotBefore returns an attribute KeyValue conforming to the\n// \"tls.server.not_before\" semantic conventions. It represents the date/Time\n// indicating when server certificate is first considered valid.\nfunc TLSServerNotBefore(val string) attribute.KeyValue {\n\treturn TLSServerNotBeforeKey.String(val)\n}\n\n// TLSServerSubject returns an attribute KeyValue conforming to the\n// \"tls.server.subject\" semantic conventions. It represents the distinguished\n// name of subject of the x.509 certificate presented by the server.\nfunc TLSServerSubject(val string) attribute.KeyValue {\n\treturn TLSServerSubjectKey.String(val)\n}\n\n// Enum values for tls.protocol.name\nvar (\n\t// ssl\n\t// Stability: development\n\tTLSProtocolNameSsl = TLSProtocolNameKey.String(\"ssl\")\n\t// tls\n\t// Stability: development\n\tTLSProtocolNameTLS = TLSProtocolNameKey.String(\"tls\")\n)\n\n// Namespace: url\nconst (\n\t// URLDomainKey is the attribute Key conforming to the \"url.domain\" semantic\n\t// conventions. It represents the domain extracted from the `url.full`, such as\n\t// \"opentelemetry.io\".\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"www.foo.bar\", \"opentelemetry.io\", \"3.12.167.2\",\n\t// \"[1080:0:0:0:8:800:200C:417A]\"\n\t// Note: In some cases a URL may refer to an IP and/or port directly, without a\n\t// domain name. In this case, the IP address would go to the domain field. If\n\t// the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[`\n\t// and `]` characters should also be captured in the domain field.\n\t//\n\t// [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2\n\tURLDomainKey = attribute.Key(\"url.domain\")\n\n\t// URLExtensionKey is the attribute Key conforming to the \"url.extension\"\n\t// semantic conventions. It represents the file extension extracted from the\n\t// `url.full`, excluding the leading dot.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"png\", \"gz\"\n\t// Note: The file extension is only set if it exists, as not every url has a\n\t// file extension. When the file name has multiple extensions `example.tar.gz`,\n\t// only the last one should be captured `gz`, not `tar.gz`.\n\tURLExtensionKey = attribute.Key(\"url.extension\")\n\n\t// URLFragmentKey is the attribute Key conforming to the \"url.fragment\" semantic\n\t// conventions. It represents the [URI fragment] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"SemConv\"\n\t//\n\t// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5\n\tURLFragmentKey = attribute.Key(\"url.fragment\")\n\n\t// URLFullKey is the attribute Key conforming to the \"url.full\" semantic\n\t// conventions. It represents the absolute URL describing a network resource\n\t// according to [RFC3986].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"//localhost\"\n\t// Note: For network calls, URL usually has\n\t// `scheme://host[:port][path][?query][#fragment]` format, where the fragment\n\t// is not transmitted over HTTP, but if it is known, it SHOULD be included\n\t// nevertheless.\n\t//\n\t// `url.full` MUST NOT contain credentials passed via URL in form of\n\t// `https://username:password@www.example.com/`.\n\t// In such case username and password SHOULD be redacted and attribute's value\n\t// SHOULD be `https://REDACTED:REDACTED@www.example.com/`.\n\t//\n\t// `url.full` SHOULD capture the absolute URL when it is available (or can be\n\t// reconstructed).\n\t//\n\t// Sensitive content provided in `url.full` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t//\n\t// Query string values for the following keys SHOULD be redacted by default and\n\t// replaced by the\n\t// value `REDACTED`:\n\t//\n\t//   - [`AWSAccessKeyId`]\n\t//   - [`Signature`]\n\t//   - [`sig`]\n\t//   - [`X-Goog-Signature`]\n\t//\n\t// This list is subject to change over time.\n\t//\n\t// When a query string value is redacted, the query string key SHOULD still be\n\t// preserved, e.g.\n\t// `https://www.example.com/path?color=blue&sig=REDACTED`.\n\t//\n\t// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986\n\t// [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token\n\t// [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls\n\tURLFullKey = attribute.Key(\"url.full\")\n\n\t// URLOriginalKey is the attribute Key conforming to the \"url.original\" semantic\n\t// conventions. It represents the unmodified original URL as seen in the event\n\t// source.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"https://www.foo.bar/search?q=OpenTelemetry#SemConv\",\n\t// \"search?q=OpenTelemetry\"\n\t// Note: In network monitoring, the observed URL may be a full URL, whereas in\n\t// access logs, the URL is often just represented as a path. This field is meant\n\t// to represent the URL as it was observed, complete or not.\n\t// `url.original` might contain credentials passed via URL in form of\n\t// `https://username:password@www.example.com/`. In such case password and\n\t// username SHOULD NOT be redacted and attribute's value SHOULD remain the same.\n\tURLOriginalKey = attribute.Key(\"url.original\")\n\n\t// URLPathKey is the attribute Key conforming to the \"url.path\" semantic\n\t// conventions. It represents the [URI path] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"/search\"\n\t// Note: Sensitive content provided in `url.path` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3\n\tURLPathKey = attribute.Key(\"url.path\")\n\n\t// URLPortKey is the attribute Key conforming to the \"url.port\" semantic\n\t// conventions. It represents the port extracted from the `url.full`.\n\t//\n\t// Type: int\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: 443\n\tURLPortKey = attribute.Key(\"url.port\")\n\n\t// URLQueryKey is the attribute Key conforming to the \"url.query\" semantic\n\t// conventions. It represents the [URI query] component.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"q=OpenTelemetry\"\n\t// Note: Sensitive content provided in `url.query` SHOULD be scrubbed when\n\t// instrumentations can identify it.\n\t//\n\t//\n\t// Query string values for the following keys SHOULD be redacted by default and\n\t// replaced by the value `REDACTED`:\n\t//\n\t//   - [`AWSAccessKeyId`]\n\t//   - [`Signature`]\n\t//   - [`sig`]\n\t//   - [`X-Goog-Signature`]\n\t//\n\t// This list is subject to change over time.\n\t//\n\t// When a query string value is redacted, the query string key SHOULD still be\n\t// preserved, e.g.\n\t// `q=OpenTelemetry&sig=REDACTED`.\n\t//\n\t// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4\n\t// [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth\n\t// [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token\n\t// [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls\n\tURLQueryKey = attribute.Key(\"url.query\")\n\n\t// URLRegisteredDomainKey is the attribute Key conforming to the\n\t// \"url.registered_domain\" semantic conventions. It represents the highest\n\t// registered url domain, stripped of the subdomain.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"example.com\", \"foo.co.uk\"\n\t// Note: This value can be determined precisely with the [public suffix list].\n\t// For example, the registered domain for `foo.example.com` is `example.com`.\n\t// Trying to approximate this by simply taking the last two labels will not work\n\t// well for TLDs such as `co.uk`.\n\t//\n\t// [public suffix list]: https://publicsuffix.org/\n\tURLRegisteredDomainKey = attribute.Key(\"url.registered_domain\")\n\n\t// URLSchemeKey is the attribute Key conforming to the \"url.scheme\" semantic\n\t// conventions. It represents the [URI scheme] component identifying the used\n\t// protocol.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"https\", \"ftp\", \"telnet\"\n\t//\n\t// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\n\tURLSchemeKey = attribute.Key(\"url.scheme\")\n\n\t// URLSubdomainKey is the attribute Key conforming to the \"url.subdomain\"\n\t// semantic conventions. It represents the subdomain portion of a fully\n\t// qualified domain name includes all of the names except the host name under\n\t// the registered_domain. In a partially qualified domain, or if the\n\t// qualification level of the full name cannot be determined, subdomain contains\n\t// all of the names below the registered domain.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"east\", \"sub2.sub1\"\n\t// Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the\n\t// domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the\n\t// subdomain field should contain `sub2.sub1`, with no trailing period.\n\tURLSubdomainKey = attribute.Key(\"url.subdomain\")\n\n\t// URLTemplateKey is the attribute Key conforming to the \"url.template\" semantic\n\t// conventions. It represents the low-cardinality template of an\n\t// [absolute path reference].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"/users/{id}\", \"/users/:id\", \"/users?id={id}\"\n\t//\n\t// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\n\tURLTemplateKey = attribute.Key(\"url.template\")\n\n\t// URLTopLevelDomainKey is the attribute Key conforming to the\n\t// \"url.top_level_domain\" semantic conventions. It represents the effective top\n\t// level domain (eTLD), also known as the domain suffix, is the last part of the\n\t// domain name. For example, the top level domain for example.com is `com`.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"com\", \"co.uk\"\n\t// Note: This value can be determined precisely with the [public suffix list].\n\t//\n\t// [public suffix list]: https://publicsuffix.org/\n\tURLTopLevelDomainKey = attribute.Key(\"url.top_level_domain\")\n)\n\n// URLDomain returns an attribute KeyValue conforming to the \"url.domain\"\n// semantic conventions. It represents the domain extracted from the `url.full`,\n// such as \"opentelemetry.io\".\nfunc URLDomain(val string) attribute.KeyValue {\n\treturn URLDomainKey.String(val)\n}\n\n// URLExtension returns an attribute KeyValue conforming to the \"url.extension\"\n// semantic conventions. It represents the file extension extracted from the\n// `url.full`, excluding the leading dot.\nfunc URLExtension(val string) attribute.KeyValue {\n\treturn URLExtensionKey.String(val)\n}\n\n// URLFragment returns an attribute KeyValue conforming to the \"url.fragment\"\n// semantic conventions. It represents the [URI fragment] component.\n//\n// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5\nfunc URLFragment(val string) attribute.KeyValue {\n\treturn URLFragmentKey.String(val)\n}\n\n// URLFull returns an attribute KeyValue conforming to the \"url.full\" semantic\n// conventions. It represents the absolute URL describing a network resource\n// according to [RFC3986].\n//\n// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986\nfunc URLFull(val string) attribute.KeyValue {\n\treturn URLFullKey.String(val)\n}\n\n// URLOriginal returns an attribute KeyValue conforming to the \"url.original\"\n// semantic conventions. It represents the unmodified original URL as seen in the\n// event source.\nfunc URLOriginal(val string) attribute.KeyValue {\n\treturn URLOriginalKey.String(val)\n}\n\n// URLPath returns an attribute KeyValue conforming to the \"url.path\" semantic\n// conventions. It represents the [URI path] component.\n//\n// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3\nfunc URLPath(val string) attribute.KeyValue {\n\treturn URLPathKey.String(val)\n}\n\n// URLPort returns an attribute KeyValue conforming to the \"url.port\" semantic\n// conventions. It represents the port extracted from the `url.full`.\nfunc URLPort(val int) attribute.KeyValue {\n\treturn URLPortKey.Int(val)\n}\n\n// URLQuery returns an attribute KeyValue conforming to the \"url.query\" semantic\n// conventions. It represents the [URI query] component.\n//\n// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4\nfunc URLQuery(val string) attribute.KeyValue {\n\treturn URLQueryKey.String(val)\n}\n\n// URLRegisteredDomain returns an attribute KeyValue conforming to the\n// \"url.registered_domain\" semantic conventions. It represents the highest\n// registered url domain, stripped of the subdomain.\nfunc URLRegisteredDomain(val string) attribute.KeyValue {\n\treturn URLRegisteredDomainKey.String(val)\n}\n\n// URLScheme returns an attribute KeyValue conforming to the \"url.scheme\"\n// semantic conventions. It represents the [URI scheme] component identifying the\n// used protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc URLScheme(val string) attribute.KeyValue {\n\treturn URLSchemeKey.String(val)\n}\n\n// URLSubdomain returns an attribute KeyValue conforming to the \"url.subdomain\"\n// semantic conventions. It represents the subdomain portion of a fully qualified\n// domain name includes all of the names except the host name under the\n// registered_domain. In a partially qualified domain, or if the qualification\n// level of the full name cannot be determined, subdomain contains all of the\n// names below the registered domain.\nfunc URLSubdomain(val string) attribute.KeyValue {\n\treturn URLSubdomainKey.String(val)\n}\n\n// URLTemplate returns an attribute KeyValue conforming to the \"url.template\"\n// semantic conventions. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc URLTemplate(val string) attribute.KeyValue {\n\treturn URLTemplateKey.String(val)\n}\n\n// URLTopLevelDomain returns an attribute KeyValue conforming to the\n// \"url.top_level_domain\" semantic conventions. It represents the effective top\n// level domain (eTLD), also known as the domain suffix, is the last part of the\n// domain name. For example, the top level domain for example.com is `com`.\nfunc URLTopLevelDomain(val string) attribute.KeyValue {\n\treturn URLTopLevelDomainKey.String(val)\n}\n\n// Namespace: user\nconst (\n\t// UserEmailKey is the attribute Key conforming to the \"user.email\" semantic\n\t// conventions. It represents the user email address.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"a.einstein@example.com\"\n\tUserEmailKey = attribute.Key(\"user.email\")\n\n\t// UserFullNameKey is the attribute Key conforming to the \"user.full_name\"\n\t// semantic conventions. It represents the user's full name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Albert Einstein\"\n\tUserFullNameKey = attribute.Key(\"user.full_name\")\n\n\t// UserHashKey is the attribute Key conforming to the \"user.hash\" semantic\n\t// conventions. It represents the unique user hash to correlate information for\n\t// a user in anonymized form.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"364fc68eaf4c8acec74a4e52d7d1feaa\"\n\t// Note: Useful if `user.id` or `user.name` contain confidential information and\n\t// cannot be used.\n\tUserHashKey = attribute.Key(\"user.hash\")\n\n\t// UserIDKey is the attribute Key conforming to the \"user.id\" semantic\n\t// conventions. It represents the unique identifier of the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"S-1-5-21-202424912787-2692429404-2351956786-1000\"\n\tUserIDKey = attribute.Key(\"user.id\")\n\n\t// UserNameKey is the attribute Key conforming to the \"user.name\" semantic\n\t// conventions. It represents the short name or login/username of the user.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"a.einstein\"\n\tUserNameKey = attribute.Key(\"user.name\")\n\n\t// UserRolesKey is the attribute Key conforming to the \"user.roles\" semantic\n\t// conventions. It represents the array of user roles at the time of the event.\n\t//\n\t// Type: string[]\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"admin\", \"reporting_user\"\n\tUserRolesKey = attribute.Key(\"user.roles\")\n)\n\n// UserEmail returns an attribute KeyValue conforming to the \"user.email\"\n// semantic conventions. It represents the user email address.\nfunc UserEmail(val string) attribute.KeyValue {\n\treturn UserEmailKey.String(val)\n}\n\n// UserFullName returns an attribute KeyValue conforming to the \"user.full_name\"\n// semantic conventions. It represents the user's full name.\nfunc UserFullName(val string) attribute.KeyValue {\n\treturn UserFullNameKey.String(val)\n}\n\n// UserHash returns an attribute KeyValue conforming to the \"user.hash\" semantic\n// conventions. It represents the unique user hash to correlate information for a\n// user in anonymized form.\nfunc UserHash(val string) attribute.KeyValue {\n\treturn UserHashKey.String(val)\n}\n\n// UserID returns an attribute KeyValue conforming to the \"user.id\" semantic\n// conventions. It represents the unique identifier of the user.\nfunc UserID(val string) attribute.KeyValue {\n\treturn UserIDKey.String(val)\n}\n\n// UserName returns an attribute KeyValue conforming to the \"user.name\" semantic\n// conventions. It represents the short name or login/username of the user.\nfunc UserName(val string) attribute.KeyValue {\n\treturn UserNameKey.String(val)\n}\n\n// UserRoles returns an attribute KeyValue conforming to the \"user.roles\"\n// semantic conventions. It represents the array of user roles at the time of the\n// event.\nfunc UserRoles(val ...string) attribute.KeyValue {\n\treturn UserRolesKey.StringSlice(val)\n}\n\n// Namespace: user_agent\nconst (\n\t// UserAgentNameKey is the attribute Key conforming to the \"user_agent.name\"\n\t// semantic conventions. It represents the name of the user-agent extracted from\n\t// original. Usually refers to the browser's name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Safari\", \"YourApp\"\n\t// Note: [Example] of extracting browser's name from original string. In the\n\t// case of using a user-agent for non-browser products, such as microservices\n\t// with multiple names/versions inside the `user_agent.original`, the most\n\t// significant name SHOULD be selected. In such a scenario it should align with\n\t// `user_agent.version`\n\t//\n\t// [Example]: https://uaparser.dev/#demo\n\tUserAgentNameKey = attribute.Key(\"user_agent.name\")\n\n\t// UserAgentOriginalKey is the attribute Key conforming to the\n\t// \"user_agent.original\" semantic conventions. It represents the value of the\n\t// [HTTP User-Agent] header sent by the client.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Stable\n\t//\n\t// Examples: \"CERN-LineMode/2.15 libwww/2.17b3\", \"Mozilla/5.0 (iPhone; CPU\n\t// iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)\n\t// Version/14.1.2 Mobile/15E148 Safari/604.1\", \"YourApp/1.0.0\n\t// grpc-java-okhttp/1.27.2\"\n\t//\n\t// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent\n\tUserAgentOriginalKey = attribute.Key(\"user_agent.original\")\n\n\t// UserAgentOSNameKey is the attribute Key conforming to the\n\t// \"user_agent.os.name\" semantic conventions. It represents the human readable\n\t// operating system name.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"iOS\", \"Android\", \"Ubuntu\"\n\t// Note: For mapping user agent strings to OS names, libraries such as\n\t// [ua-parser] can be utilized.\n\t//\n\t// [ua-parser]: https://github.com/ua-parser\n\tUserAgentOSNameKey = attribute.Key(\"user_agent.os.name\")\n\n\t// UserAgentOSVersionKey is the attribute Key conforming to the\n\t// \"user_agent.os.version\" semantic conventions. It represents the version\n\t// string of the operating system as defined in [Version Attributes].\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.2.1\", \"18.04.1\"\n\t// Note: For mapping user agent strings to OS versions, libraries such as\n\t// [ua-parser] can be utilized.\n\t//\n\t// [Version Attributes]: /docs/resource/README.md#version-attributes\n\t// [ua-parser]: https://github.com/ua-parser\n\tUserAgentOSVersionKey = attribute.Key(\"user_agent.os.version\")\n\n\t// UserAgentSyntheticTypeKey is the attribute Key conforming to the\n\t// \"user_agent.synthetic.type\" semantic conventions. It represents the specifies\n\t// the category of synthetic traffic, such as tests or bots.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// Note: This attribute MAY be derived from the contents of the\n\t// `user_agent.original` attribute. Components that populate the attribute are\n\t// responsible for determining what they consider to be synthetic bot or test\n\t// traffic. This attribute can either be set for self-identification purposes,\n\t// or on telemetry detected to be generated as a result of a synthetic request.\n\t// This attribute is useful for distinguishing between genuine client traffic\n\t// and synthetic traffic generated by bots or tests.\n\tUserAgentSyntheticTypeKey = attribute.Key(\"user_agent.synthetic.type\")\n\n\t// UserAgentVersionKey is the attribute Key conforming to the\n\t// \"user_agent.version\" semantic conventions. It represents the version of the\n\t// user-agent extracted from original. Usually refers to the browser's version.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"14.1.2\", \"1.0.0\"\n\t// Note: [Example] of extracting browser's version from original string. In the\n\t// case of using a user-agent for non-browser products, such as microservices\n\t// with multiple names/versions inside the `user_agent.original`, the most\n\t// significant version SHOULD be selected. In such a scenario it should align\n\t// with `user_agent.name`\n\t//\n\t// [Example]: https://uaparser.dev/#demo\n\tUserAgentVersionKey = attribute.Key(\"user_agent.version\")\n)\n\n// UserAgentName returns an attribute KeyValue conforming to the\n// \"user_agent.name\" semantic conventions. It represents the name of the\n// user-agent extracted from original. Usually refers to the browser's name.\nfunc UserAgentName(val string) attribute.KeyValue {\n\treturn UserAgentNameKey.String(val)\n}\n\n// UserAgentOriginal returns an attribute KeyValue conforming to the\n// \"user_agent.original\" semantic conventions. It represents the value of the\n// [HTTP User-Agent] header sent by the client.\n//\n// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent\nfunc UserAgentOriginal(val string) attribute.KeyValue {\n\treturn UserAgentOriginalKey.String(val)\n}\n\n// UserAgentOSName returns an attribute KeyValue conforming to the\n// \"user_agent.os.name\" semantic conventions. It represents the human readable\n// operating system name.\nfunc UserAgentOSName(val string) attribute.KeyValue {\n\treturn UserAgentOSNameKey.String(val)\n}\n\n// UserAgentOSVersion returns an attribute KeyValue conforming to the\n// \"user_agent.os.version\" semantic conventions. It represents the version string\n// of the operating system as defined in [Version Attributes].\n//\n// [Version Attributes]: /docs/resource/README.md#version-attributes\nfunc UserAgentOSVersion(val string) attribute.KeyValue {\n\treturn UserAgentOSVersionKey.String(val)\n}\n\n// UserAgentVersion returns an attribute KeyValue conforming to the\n// \"user_agent.version\" semantic conventions. It represents the version of the\n// user-agent extracted from original. Usually refers to the browser's version.\nfunc UserAgentVersion(val string) attribute.KeyValue {\n\treturn UserAgentVersionKey.String(val)\n}\n\n// Enum values for user_agent.synthetic.type\nvar (\n\t// Bot source.\n\t// Stability: development\n\tUserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String(\"bot\")\n\t// Synthetic test source.\n\t// Stability: development\n\tUserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String(\"test\")\n)\n\n// Namespace: vcs\nconst (\n\t// VCSChangeIDKey is the attribute Key conforming to the \"vcs.change.id\"\n\t// semantic conventions. It represents the ID of the change (pull request/merge\n\t// request/changelist) if applicable. This is usually a unique (within\n\t// repository) identifier generated by the VCS system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"123\"\n\tVCSChangeIDKey = attribute.Key(\"vcs.change.id\")\n\n\t// VCSChangeStateKey is the attribute Key conforming to the \"vcs.change.state\"\n\t// semantic conventions. It represents the state of the change (pull\n\t// request/merge request/changelist).\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"open\", \"closed\", \"merged\"\n\tVCSChangeStateKey = attribute.Key(\"vcs.change.state\")\n\n\t// VCSChangeTitleKey is the attribute Key conforming to the \"vcs.change.title\"\n\t// semantic conventions. It represents the human readable title of the change\n\t// (pull request/merge request/changelist). This title is often a brief summary\n\t// of the change and may get merged in to a ref as the commit summary.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"Fixes broken thing\", \"feat: add my new feature\", \"[chore] update\n\t// dependency\"\n\tVCSChangeTitleKey = attribute.Key(\"vcs.change.title\")\n\n\t// VCSLineChangeTypeKey is the attribute Key conforming to the\n\t// \"vcs.line_change.type\" semantic conventions. It represents the type of line\n\t// change being measured on a branch or change.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"added\", \"removed\"\n\tVCSLineChangeTypeKey = attribute.Key(\"vcs.line_change.type\")\n\n\t// VCSOwnerNameKey is the attribute Key conforming to the \"vcs.owner.name\"\n\t// semantic conventions. It represents the group owner within the version\n\t// control system.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-org\", \"myteam\", \"business-unit\"\n\tVCSOwnerNameKey = attribute.Key(\"vcs.owner.name\")\n\n\t// VCSProviderNameKey is the attribute Key conforming to the \"vcs.provider.name\"\n\t// semantic conventions. It represents the name of the version control system\n\t// provider.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"github\", \"gitlab\", \"gitea\", \"bitbucket\"\n\tVCSProviderNameKey = attribute.Key(\"vcs.provider.name\")\n\n\t// VCSRefBaseNameKey is the attribute Key conforming to the \"vcs.ref.base.name\"\n\t// semantic conventions. It represents the name of the [reference] such as\n\t// **branch** or **tag** in the repository.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-feature-branch\", \"tag-1-test\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefBaseNameKey = attribute.Key(\"vcs.ref.base.name\")\n\n\t// VCSRefBaseRevisionKey is the attribute Key conforming to the\n\t// \"vcs.ref.base.revision\" semantic conventions. It represents the revision,\n\t// literally [revised version], The revision most often refers to a commit\n\t// object in Git, or a revision number in SVN.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t// \"main\", \"123\", \"HEAD\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits. The\n\t// revision can be a full [hash value (see\n\t// glossary)],\n\t// of the recorded change to a ref within a repository pointing to a\n\t// commit [commit] object. It does\n\t// not necessarily have to be a hash; it can simply define a [revision\n\t// number]\n\t// which is an integer that is monotonically increasing. In cases where\n\t// it is identical to the `ref.base.name`, it SHOULD still be included.\n\t// It is up to the implementer to decide which value to set as the\n\t// revision based on the VCS system and situational context.\n\t//\n\t// [revised version]: https://www.merriam-webster.com/dictionary/revision\n\t// [hash value (see\n\t// glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [commit]: https://git-scm.com/docs/git-commit\n\t// [revision\n\t// number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html\n\tVCSRefBaseRevisionKey = attribute.Key(\"vcs.ref.base.revision\")\n\n\t// VCSRefBaseTypeKey is the attribute Key conforming to the \"vcs.ref.base.type\"\n\t// semantic conventions. It represents the type of the [reference] in the\n\t// repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t// Note: `base` refers to the starting point of a change. For example, `main`\n\t// would be the base reference of type branch if you've created a new\n\t// reference of type branch from it and created new commits.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefBaseTypeKey = attribute.Key(\"vcs.ref.base.type\")\n\n\t// VCSRefHeadNameKey is the attribute Key conforming to the \"vcs.ref.head.name\"\n\t// semantic conventions. It represents the name of the [reference] such as\n\t// **branch** or **tag** in the repository.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"my-feature-branch\", \"tag-1-test\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefHeadNameKey = attribute.Key(\"vcs.ref.head.name\")\n\n\t// VCSRefHeadRevisionKey is the attribute Key conforming to the\n\t// \"vcs.ref.head.revision\" semantic conventions. It represents the revision,\n\t// literally [revised version], The revision most often refers to a commit\n\t// object in Git, or a revision number in SVN.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t// \"main\", \"123\", \"HEAD\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.The revision can be a full [hash value (see\n\t// glossary)],\n\t// of the recorded change to a ref within a repository pointing to a\n\t// commit [commit] object. It does\n\t// not necessarily have to be a hash; it can simply define a [revision\n\t// number]\n\t// which is an integer that is monotonically increasing. In cases where\n\t// it is identical to the `ref.head.name`, it SHOULD still be included.\n\t// It is up to the implementer to decide which value to set as the\n\t// revision based on the VCS system and situational context.\n\t//\n\t// [revised version]: https://www.merriam-webster.com/dictionary/revision\n\t// [hash value (see\n\t// glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf\n\t// [commit]: https://git-scm.com/docs/git-commit\n\t// [revision\n\t// number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html\n\tVCSRefHeadRevisionKey = attribute.Key(\"vcs.ref.head.revision\")\n\n\t// VCSRefHeadTypeKey is the attribute Key conforming to the \"vcs.ref.head.type\"\n\t// semantic conventions. It represents the type of the [reference] in the\n\t// repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t// Note: `head` refers to where you are right now; the current reference at a\n\t// given time.\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefHeadTypeKey = attribute.Key(\"vcs.ref.head.type\")\n\n\t// VCSRefTypeKey is the attribute Key conforming to the \"vcs.ref.type\" semantic\n\t// conventions. It represents the type of the [reference] in the repository.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"branch\", \"tag\"\n\t//\n\t// [reference]: https://git-scm.com/docs/gitglossary#def_ref\n\tVCSRefTypeKey = attribute.Key(\"vcs.ref.type\")\n\n\t// VCSRepositoryNameKey is the attribute Key conforming to the\n\t// \"vcs.repository.name\" semantic conventions. It represents the human readable\n\t// name of the repository. It SHOULD NOT include any additional identifier like\n\t// Group/SubGroup in GitLab or organization in GitHub.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"semantic-conventions\", \"my-cool-repo\"\n\t// Note: Due to it only being the name, it can clash with forks of the same\n\t// repository if collecting telemetry across multiple orgs or groups in\n\t// the same backends.\n\tVCSRepositoryNameKey = attribute.Key(\"vcs.repository.name\")\n\n\t// VCSRepositoryURLFullKey is the attribute Key conforming to the\n\t// \"vcs.repository.url.full\" semantic conventions. It represents the\n\t// [canonical URL] of the repository providing the complete HTTP(S) address in\n\t// order to locate and identify the repository through a browser.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples:\n\t// \"https://github.com/opentelemetry/open-telemetry-collector-contrib\",\n\t// \"https://gitlab.com/my-org/my-project/my-projects-project/repo\"\n\t// Note: In Git Version Control Systems, the canonical URL SHOULD NOT include\n\t// the `.git` extension.\n\t//\n\t// [canonical URL]: https://support.google.com/webmasters/answer/10347851\n\tVCSRepositoryURLFullKey = attribute.Key(\"vcs.repository.url.full\")\n\n\t// VCSRevisionDeltaDirectionKey is the attribute Key conforming to the\n\t// \"vcs.revision_delta.direction\" semantic conventions. It represents the type\n\t// of revision comparison.\n\t//\n\t// Type: Enum\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"ahead\", \"behind\"\n\tVCSRevisionDeltaDirectionKey = attribute.Key(\"vcs.revision_delta.direction\")\n)\n\n// VCSChangeID returns an attribute KeyValue conforming to the \"vcs.change.id\"\n// semantic conventions. It represents the ID of the change (pull request/merge\n// request/changelist) if applicable. This is usually a unique (within\n// repository) identifier generated by the VCS system.\nfunc VCSChangeID(val string) attribute.KeyValue {\n\treturn VCSChangeIDKey.String(val)\n}\n\n// VCSChangeTitle returns an attribute KeyValue conforming to the\n// \"vcs.change.title\" semantic conventions. It represents the human readable\n// title of the change (pull request/merge request/changelist). This title is\n// often a brief summary of the change and may get merged in to a ref as the\n// commit summary.\nfunc VCSChangeTitle(val string) attribute.KeyValue {\n\treturn VCSChangeTitleKey.String(val)\n}\n\n// VCSOwnerName returns an attribute KeyValue conforming to the \"vcs.owner.name\"\n// semantic conventions. It represents the group owner within the version control\n// system.\nfunc VCSOwnerName(val string) attribute.KeyValue {\n\treturn VCSOwnerNameKey.String(val)\n}\n\n// VCSRefBaseName returns an attribute KeyValue conforming to the\n// \"vcs.ref.base.name\" semantic conventions. It represents the name of the\n// [reference] such as **branch** or **tag** in the repository.\n//\n// [reference]: https://git-scm.com/docs/gitglossary#def_ref\nfunc VCSRefBaseName(val string) attribute.KeyValue {\n\treturn VCSRefBaseNameKey.String(val)\n}\n\n// VCSRefBaseRevision returns an attribute KeyValue conforming to the\n// \"vcs.ref.base.revision\" semantic conventions. It represents the revision,\n// literally [revised version], The revision most often refers to a commit object\n// in Git, or a revision number in SVN.\n//\n// [revised version]: https://www.merriam-webster.com/dictionary/revision\nfunc VCSRefBaseRevision(val string) attribute.KeyValue {\n\treturn VCSRefBaseRevisionKey.String(val)\n}\n\n// VCSRefHeadName returns an attribute KeyValue conforming to the\n// \"vcs.ref.head.name\" semantic conventions. It represents the name of the\n// [reference] such as **branch** or **tag** in the repository.\n//\n// [reference]: https://git-scm.com/docs/gitglossary#def_ref\nfunc VCSRefHeadName(val string) attribute.KeyValue {\n\treturn VCSRefHeadNameKey.String(val)\n}\n\n// VCSRefHeadRevision returns an attribute KeyValue conforming to the\n// \"vcs.ref.head.revision\" semantic conventions. It represents the revision,\n// literally [revised version], The revision most often refers to a commit object\n// in Git, or a revision number in SVN.\n//\n// [revised version]: https://www.merriam-webster.com/dictionary/revision\nfunc VCSRefHeadRevision(val string) attribute.KeyValue {\n\treturn VCSRefHeadRevisionKey.String(val)\n}\n\n// VCSRepositoryName returns an attribute KeyValue conforming to the\n// \"vcs.repository.name\" semantic conventions. It represents the human readable\n// name of the repository. It SHOULD NOT include any additional identifier like\n// Group/SubGroup in GitLab or organization in GitHub.\nfunc VCSRepositoryName(val string) attribute.KeyValue {\n\treturn VCSRepositoryNameKey.String(val)\n}\n\n// VCSRepositoryURLFull returns an attribute KeyValue conforming to the\n// \"vcs.repository.url.full\" semantic conventions. It represents the\n// [canonical URL] of the repository providing the complete HTTP(S) address in\n// order to locate and identify the repository through a browser.\n//\n// [canonical URL]: https://support.google.com/webmasters/answer/10347851\nfunc VCSRepositoryURLFull(val string) attribute.KeyValue {\n\treturn VCSRepositoryURLFullKey.String(val)\n}\n\n// Enum values for vcs.change.state\nvar (\n\t// Open means the change is currently active and under review. It hasn't been\n\t// merged into the target branch yet, and it's still possible to make changes or\n\t// add comments.\n\t// Stability: development\n\tVCSChangeStateOpen = VCSChangeStateKey.String(\"open\")\n\t// WIP (work-in-progress, draft) means the change is still in progress and not\n\t// yet ready for a full review. It might still undergo significant changes.\n\t// Stability: development\n\tVCSChangeStateWip = VCSChangeStateKey.String(\"wip\")\n\t// Closed means the merge request has been closed without merging. This can\n\t// happen for various reasons, such as the changes being deemed unnecessary, the\n\t// issue being resolved in another way, or the author deciding to withdraw the\n\t// request.\n\t// Stability: development\n\tVCSChangeStateClosed = VCSChangeStateKey.String(\"closed\")\n\t// Merged indicates that the change has been successfully integrated into the\n\t// target codebase.\n\t// Stability: development\n\tVCSChangeStateMerged = VCSChangeStateKey.String(\"merged\")\n)\n\n// Enum values for vcs.line_change.type\nvar (\n\t// How many lines were added.\n\t// Stability: development\n\tVCSLineChangeTypeAdded = VCSLineChangeTypeKey.String(\"added\")\n\t// How many lines were removed.\n\t// Stability: development\n\tVCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String(\"removed\")\n)\n\n// Enum values for vcs.provider.name\nvar (\n\t// [GitHub]\n\t// Stability: development\n\t//\n\t// [GitHub]: https://github.com\n\tVCSProviderNameGithub = VCSProviderNameKey.String(\"github\")\n\t// [GitLab]\n\t// Stability: development\n\t//\n\t// [GitLab]: https://gitlab.com\n\tVCSProviderNameGitlab = VCSProviderNameKey.String(\"gitlab\")\n\t// [Gitea]\n\t// Stability: development\n\t//\n\t// [Gitea]: https://gitea.io\n\tVCSProviderNameGitea = VCSProviderNameKey.String(\"gitea\")\n\t// [Bitbucket]\n\t// Stability: development\n\t//\n\t// [Bitbucket]: https://bitbucket.org\n\tVCSProviderNameBitbucket = VCSProviderNameKey.String(\"bitbucket\")\n)\n\n// Enum values for vcs.ref.base.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefBaseTypeBranch = VCSRefBaseTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefBaseTypeTag = VCSRefBaseTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.ref.head.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefHeadTypeBranch = VCSRefHeadTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefHeadTypeTag = VCSRefHeadTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.ref.type\nvar (\n\t// [branch]\n\t// Stability: development\n\t//\n\t// [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch\n\tVCSRefTypeBranch = VCSRefTypeKey.String(\"branch\")\n\t// [tag]\n\t// Stability: development\n\t//\n\t// [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag\n\tVCSRefTypeTag = VCSRefTypeKey.String(\"tag\")\n)\n\n// Enum values for vcs.revision_delta.direction\nvar (\n\t// How many revisions the change is behind the target ref.\n\t// Stability: development\n\tVCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String(\"behind\")\n\t// How many revisions the change is ahead of the target ref.\n\t// Stability: development\n\tVCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String(\"ahead\")\n)\n\n// Namespace: webengine\nconst (\n\t// WebEngineDescriptionKey is the attribute Key conforming to the\n\t// \"webengine.description\" semantic conventions. It represents the additional\n\t// description of the web engine (e.g. detailed version and edition\n\t// information).\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -\n\t// 2.2.2.Final\"\n\tWebEngineDescriptionKey = attribute.Key(\"webengine.description\")\n\n\t// WebEngineNameKey is the attribute Key conforming to the \"webengine.name\"\n\t// semantic conventions. It represents the name of the web engine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"WildFly\"\n\tWebEngineNameKey = attribute.Key(\"webengine.name\")\n\n\t// WebEngineVersionKey is the attribute Key conforming to the\n\t// \"webengine.version\" semantic conventions. It represents the version of the\n\t// web engine.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"21.0.0\"\n\tWebEngineVersionKey = attribute.Key(\"webengine.version\")\n)\n\n// WebEngineDescription returns an attribute KeyValue conforming to the\n// \"webengine.description\" semantic conventions. It represents the additional\n// description of the web engine (e.g. detailed version and edition information).\nfunc WebEngineDescription(val string) attribute.KeyValue {\n\treturn WebEngineDescriptionKey.String(val)\n}\n\n// WebEngineName returns an attribute KeyValue conforming to the \"webengine.name\"\n// semantic conventions. It represents the name of the web engine.\nfunc WebEngineName(val string) attribute.KeyValue {\n\treturn WebEngineNameKey.String(val)\n}\n\n// WebEngineVersion returns an attribute KeyValue conforming to the\n// \"webengine.version\" semantic conventions. It represents the version of the web\n// engine.\nfunc WebEngineVersion(val string) attribute.KeyValue {\n\treturn WebEngineVersionKey.String(val)\n}\n\n// Namespace: zos\nconst (\n\t// ZOSSmfIDKey is the attribute Key conforming to the \"zos.smf.id\" semantic\n\t// conventions. It represents the System Management Facility (SMF) Identifier\n\t// uniquely identified a z/OS system within a SYSPLEX or mainframe environment\n\t// and is used for system and performance analysis.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"SYS1\"\n\tZOSSmfIDKey = attribute.Key(\"zos.smf.id\")\n\n\t// ZOSSysplexNameKey is the attribute Key conforming to the \"zos.sysplex.name\"\n\t// semantic conventions. It represents the name of the SYSPLEX to which the z/OS\n\t// system belongs too.\n\t//\n\t// Type: string\n\t// RequirementLevel: Recommended\n\t// Stability: Development\n\t//\n\t// Examples: \"SYSPLEX1\"\n\tZOSSysplexNameKey = attribute.Key(\"zos.sysplex.name\")\n)\n\n// ZOSSmfID returns an attribute KeyValue conforming to the \"zos.smf.id\" semantic\n// conventions. It represents the System Management Facility (SMF) Identifier\n// uniquely identified a z/OS system within a SYSPLEX or mainframe environment\n// and is used for system and performance analysis.\nfunc ZOSSmfID(val string) attribute.KeyValue {\n\treturn ZOSSmfIDKey.String(val)\n}\n\n// ZOSSysplexName returns an attribute KeyValue conforming to the\n// \"zos.sysplex.name\" semantic conventions. It represents the name of the SYSPLEX\n// to which the z/OS system belongs too.\nfunc ZOSSysplexName(val string) attribute.KeyValue {\n\treturn ZOSSysplexNameKey.String(val)\n}"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package semconv implements OpenTelemetry semantic conventions.\n//\n// OpenTelemetry semantic conventions are agreed standardized naming\n// patterns for OpenTelemetry things. This package represents the v1.39.0\n// version of the OpenTelemetry semantic conventions.\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\nimport (\n\t\"reflect\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n)\n\n// ErrorType returns an [attribute.KeyValue] identifying the error type of err.\n//\n// If err is nil, the returned attribute has the default value\n// [ErrorTypeOther].\n//\n// If err's type has the method\n//\n//\tErrorType() string\n//\n// then the returned attribute has the value of err.ErrorType(). Otherwise, the\n// returned attribute has a value derived from the concrete type of err.\n//\n// The key of the returned attribute is [ErrorTypeKey].\nfunc ErrorType(err error) attribute.KeyValue {\n\tif err == nil {\n\t\treturn ErrorTypeOther\n\t}\n\n\treturn ErrorTypeKey.String(errorType(err))\n}\n\nfunc errorType(err error) string {\n\tvar s string\n\tif et, ok := err.(interface{ ErrorType() string }); ok {\n\t\t// Prioritize the ErrorType method if available.\n\t\ts = et.ErrorType()\n\t}\n\tif s == \"\" {\n\t\t// Fallback to reflection if the ErrorType method is not supported or\n\t\t// returns an empty value.\n\n\t\tt := reflect.TypeOf(err)\n\t\tpkg, name := t.PkgPath(), t.Name()\n\t\tif pkg != \"\" && name != \"\" {\n\t\t\ts = pkg + \".\" + name\n\t\t} else {\n\t\t\t// The type has no package path or name (predeclared, not-defined,\n\t\t\t// or alias for a not-defined type).\n\t\t\t//\n\t\t\t// This is not guaranteed to be unique, but is a best effort.\n\t\t\ts = t.String()\n\t\t}\n\t}\n\treturn s\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\nconst (\n\t// ExceptionEventName is the name of the Span event representing an exception.\n\tExceptionEventName = \"exception\"\n)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/httpconv/metric.go",
    "content": "// Code generated from semantic convention specification. DO NOT EDIT.\n\n// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package httpconv provides types and functionality for OpenTelemetry semantic\n// conventions in the \"http\" namespace.\npackage httpconv\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/metric\"\n\t\"go.opentelemetry.io/otel/metric/noop\"\n)\n\nvar (\n\taddOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}\n\trecOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}\n)\n\n// ErrorTypeAttr is an attribute conforming to the error.type semantic\n// conventions. It represents the describes a class of error the operation ended\n// with.\ntype ErrorTypeAttr string\n\nvar (\n\t// ErrorTypeOther is a fallback error value to be used when the instrumentation\n\t// doesn't define a custom value.\n\tErrorTypeOther ErrorTypeAttr = \"_OTHER\"\n)\n\n// ConnectionStateAttr is an attribute conforming to the http.connection.state\n// semantic conventions. It represents the state of the HTTP connection in the\n// HTTP connection pool.\ntype ConnectionStateAttr string\n\nvar (\n\t// ConnectionStateActive is the active state.\n\tConnectionStateActive ConnectionStateAttr = \"active\"\n\t// ConnectionStateIdle is the idle state.\n\tConnectionStateIdle ConnectionStateAttr = \"idle\"\n)\n\n// RequestMethodAttr is an attribute conforming to the http.request.method\n// semantic conventions. It represents the HTTP request method.\ntype RequestMethodAttr string\n\nvar (\n\t// RequestMethodConnect is the CONNECT method.\n\tRequestMethodConnect RequestMethodAttr = \"CONNECT\"\n\t// RequestMethodDelete is the DELETE method.\n\tRequestMethodDelete RequestMethodAttr = \"DELETE\"\n\t// RequestMethodGet is the GET method.\n\tRequestMethodGet RequestMethodAttr = \"GET\"\n\t// RequestMethodHead is the HEAD method.\n\tRequestMethodHead RequestMethodAttr = \"HEAD\"\n\t// RequestMethodOptions is the OPTIONS method.\n\tRequestMethodOptions RequestMethodAttr = \"OPTIONS\"\n\t// RequestMethodPatch is the PATCH method.\n\tRequestMethodPatch RequestMethodAttr = \"PATCH\"\n\t// RequestMethodPost is the POST method.\n\tRequestMethodPost RequestMethodAttr = \"POST\"\n\t// RequestMethodPut is the PUT method.\n\tRequestMethodPut RequestMethodAttr = \"PUT\"\n\t// RequestMethodTrace is the TRACE method.\n\tRequestMethodTrace RequestMethodAttr = \"TRACE\"\n\t// RequestMethodQuery is the QUERY method.\n\tRequestMethodQuery RequestMethodAttr = \"QUERY\"\n\t// RequestMethodOther is the any HTTP method that the instrumentation has no\n\t// prior knowledge of.\n\tRequestMethodOther RequestMethodAttr = \"_OTHER\"\n)\n\n// UserAgentSyntheticTypeAttr is an attribute conforming to the\n// user_agent.synthetic.type semantic conventions. It represents the specifies\n// the category of synthetic traffic, such as tests or bots.\ntype UserAgentSyntheticTypeAttr string\n\nvar (\n\t// UserAgentSyntheticTypeBot is the bot source.\n\tUserAgentSyntheticTypeBot UserAgentSyntheticTypeAttr = \"bot\"\n\t// UserAgentSyntheticTypeTest is the synthetic test source.\n\tUserAgentSyntheticTypeTest UserAgentSyntheticTypeAttr = \"test\"\n)\n\n// ClientActiveRequests is an instrument used to record metric values conforming\n// to the \"http.client.active_requests\" semantic conventions. It represents the\n// number of active HTTP requests.\ntype ClientActiveRequests struct {\n\tmetric.Int64UpDownCounter\n}\n\nvar newClientActiveRequestsOpts = []metric.Int64UpDownCounterOption{\n\tmetric.WithDescription(\"Number of active HTTP requests.\"),\n\tmetric.WithUnit(\"{request}\"),\n}\n\n// NewClientActiveRequests returns a new ClientActiveRequests instrument.\nfunc NewClientActiveRequests(\n\tm metric.Meter,\n\topt ...metric.Int64UpDownCounterOption,\n) (ClientActiveRequests, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientActiveRequests{noop.Int64UpDownCounter{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientActiveRequestsOpts\n\t} else {\n\t\topt = append(opt, newClientActiveRequestsOpts...)\n\t}\n\n\ti, err := m.Int64UpDownCounter(\n\t\t\"http.client.active_requests\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientActiveRequests{noop.Int64UpDownCounter{}}, err\n\t}\n\treturn ClientActiveRequests{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientActiveRequests) Inst() metric.Int64UpDownCounter {\n\treturn m.Int64UpDownCounter\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientActiveRequests) Name() string {\n\treturn \"http.client.active_requests\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientActiveRequests) Unit() string {\n\treturn \"{request}\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientActiveRequests) Description() string {\n\treturn \"Number of active HTTP requests.\"\n}\n\n// Add adds incr to the existing count for attrs.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\nfunc (m ClientActiveRequests) Add(\n\tctx context.Context,\n\tincr int64,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AddSet adds incr to the existing count for set.\nfunc (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AttrURLTemplate returns an optional attribute for the \"url.template\" semantic\n// convention. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc (ClientActiveRequests) AttrURLTemplate(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.template\", val)\n}\n\n// AttrRequestMethod returns an optional attribute for the \"http.request.method\"\n// semantic convention. It represents the HTTP request method.\nfunc (ClientActiveRequests) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue {\n\treturn attribute.String(\"http.request.method\", string(val))\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// ClientConnectionDuration is an instrument used to record metric values\n// conforming to the \"http.client.connection.duration\" semantic conventions. It\n// represents the duration of the successfully established outbound HTTP\n// connections.\ntype ClientConnectionDuration struct {\n\tmetric.Float64Histogram\n}\n\nvar newClientConnectionDurationOpts = []metric.Float64HistogramOption{\n\tmetric.WithDescription(\"The duration of the successfully established outbound HTTP connections.\"),\n\tmetric.WithUnit(\"s\"),\n}\n\n// NewClientConnectionDuration returns a new ClientConnectionDuration instrument.\nfunc NewClientConnectionDuration(\n\tm metric.Meter,\n\topt ...metric.Float64HistogramOption,\n) (ClientConnectionDuration, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientConnectionDuration{noop.Float64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientConnectionDurationOpts\n\t} else {\n\t\topt = append(opt, newClientConnectionDurationOpts...)\n\t}\n\n\ti, err := m.Float64Histogram(\n\t\t\"http.client.connection.duration\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientConnectionDuration{noop.Float64Histogram{}}, err\n\t}\n\treturn ClientConnectionDuration{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientConnectionDuration) Inst() metric.Float64Histogram {\n\treturn m.Float64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientConnectionDuration) Name() string {\n\treturn \"http.client.connection.duration\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientConnectionDuration) Unit() string {\n\treturn \"s\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientConnectionDuration) Description() string {\n\treturn \"The duration of the successfully established outbound HTTP connections.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\nfunc (m ClientConnectionDuration) Record(\n\tctx context.Context,\n\tval float64,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\nfunc (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrNetworkPeerAddress returns an optional attribute for the\n// \"network.peer.address\" semantic convention. It represents the peer address of\n// the network connection - IP address or Unix domain socket name.\nfunc (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.peer.address\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientConnectionDuration) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// ClientOpenConnections is an instrument used to record metric values conforming\n// to the \"http.client.open_connections\" semantic conventions. It represents the\n// number of outbound HTTP connections that are currently active or idle on the\n// client.\ntype ClientOpenConnections struct {\n\tmetric.Int64UpDownCounter\n}\n\nvar newClientOpenConnectionsOpts = []metric.Int64UpDownCounterOption{\n\tmetric.WithDescription(\"Number of outbound HTTP connections that are currently active or idle on the client.\"),\n\tmetric.WithUnit(\"{connection}\"),\n}\n\n// NewClientOpenConnections returns a new ClientOpenConnections instrument.\nfunc NewClientOpenConnections(\n\tm metric.Meter,\n\topt ...metric.Int64UpDownCounterOption,\n) (ClientOpenConnections, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientOpenConnections{noop.Int64UpDownCounter{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientOpenConnectionsOpts\n\t} else {\n\t\topt = append(opt, newClientOpenConnectionsOpts...)\n\t}\n\n\ti, err := m.Int64UpDownCounter(\n\t\t\"http.client.open_connections\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientOpenConnections{noop.Int64UpDownCounter{}}, err\n\t}\n\treturn ClientOpenConnections{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientOpenConnections) Inst() metric.Int64UpDownCounter {\n\treturn m.Int64UpDownCounter\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientOpenConnections) Name() string {\n\treturn \"http.client.open_connections\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientOpenConnections) Unit() string {\n\treturn \"{connection}\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientOpenConnections) Description() string {\n\treturn \"Number of outbound HTTP connections that are currently active or idle on the client.\"\n}\n\n// Add adds incr to the existing count for attrs.\n//\n// The connectionState is the state of the HTTP connection in the HTTP connection\n// pool.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\nfunc (m ClientOpenConnections) Add(\n\tctx context.Context,\n\tincr int64,\n\tconnectionState ConnectionStateAttr,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.connection.state\", string(connectionState)),\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AddSet adds incr to the existing count for set.\nfunc (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AttrNetworkPeerAddress returns an optional attribute for the\n// \"network.peer.address\" semantic convention. It represents the peer address of\n// the network connection - IP address or Unix domain socket name.\nfunc (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.peer.address\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// ClientRequestBodySize is an instrument used to record metric values conforming\n// to the \"http.client.request.body.size\" semantic conventions. It represents the\n// size of HTTP client request bodies.\ntype ClientRequestBodySize struct {\n\tmetric.Int64Histogram\n}\n\nvar newClientRequestBodySizeOpts = []metric.Int64HistogramOption{\n\tmetric.WithDescription(\"Size of HTTP client request bodies.\"),\n\tmetric.WithUnit(\"By\"),\n}\n\n// NewClientRequestBodySize returns a new ClientRequestBodySize instrument.\nfunc NewClientRequestBodySize(\n\tm metric.Meter,\n\topt ...metric.Int64HistogramOption,\n) (ClientRequestBodySize, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientRequestBodySize{noop.Int64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientRequestBodySizeOpts\n\t} else {\n\t\topt = append(opt, newClientRequestBodySizeOpts...)\n\t}\n\n\ti, err := m.Int64Histogram(\n\t\t\"http.client.request.body.size\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientRequestBodySize{noop.Int64Histogram{}}, err\n\t}\n\treturn ClientRequestBodySize{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientRequestBodySize) Inst() metric.Int64Histogram {\n\treturn m.Int64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientRequestBodySize) Name() string {\n\treturn \"http.client.request.body.size\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientRequestBodySize) Unit() string {\n\treturn \"By\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientRequestBodySize) Description() string {\n\treturn \"Size of HTTP client request bodies.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// The size of the request payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ClientRequestBodySize) Record(\n\tctx context.Context,\n\tval int64,\n\trequestMethod RequestMethodAttr,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\n//\n// The size of the request payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ClientRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ClientRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ClientRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrURLTemplate returns an optional attribute for the \"url.template\" semantic\n// convention. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc (ClientRequestBodySize) AttrURLTemplate(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.template\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ClientRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientRequestBodySize) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// ClientRequestDuration is an instrument used to record metric values conforming\n// to the \"http.client.request.duration\" semantic conventions. It represents the\n// duration of HTTP client requests.\ntype ClientRequestDuration struct {\n\tmetric.Float64Histogram\n}\n\nvar newClientRequestDurationOpts = []metric.Float64HistogramOption{\n\tmetric.WithDescription(\"Duration of HTTP client requests.\"),\n\tmetric.WithUnit(\"s\"),\n}\n\n// NewClientRequestDuration returns a new ClientRequestDuration instrument.\nfunc NewClientRequestDuration(\n\tm metric.Meter,\n\topt ...metric.Float64HistogramOption,\n) (ClientRequestDuration, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientRequestDuration{noop.Float64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientRequestDurationOpts\n\t} else {\n\t\topt = append(opt, newClientRequestDurationOpts...)\n\t}\n\n\ti, err := m.Float64Histogram(\n\t\t\"http.client.request.duration\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientRequestDuration{noop.Float64Histogram{}}, err\n\t}\n\treturn ClientRequestDuration{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientRequestDuration) Inst() metric.Float64Histogram {\n\treturn m.Float64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientRequestDuration) Name() string {\n\treturn \"http.client.request.duration\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientRequestDuration) Unit() string {\n\treturn \"s\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientRequestDuration) Description() string {\n\treturn \"Duration of HTTP client requests.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\nfunc (m ClientRequestDuration) Record(\n\tctx context.Context,\n\tval float64,\n\trequestMethod RequestMethodAttr,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\nfunc (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ClientRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ClientRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ClientRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ClientRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientRequestDuration) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// AttrURLTemplate returns an optional attribute for the \"url.template\" semantic\n// convention. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc (ClientRequestDuration) AttrURLTemplate(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.template\", val)\n}\n\n// ClientResponseBodySize is an instrument used to record metric values\n// conforming to the \"http.client.response.body.size\" semantic conventions. It\n// represents the size of HTTP client response bodies.\ntype ClientResponseBodySize struct {\n\tmetric.Int64Histogram\n}\n\nvar newClientResponseBodySizeOpts = []metric.Int64HistogramOption{\n\tmetric.WithDescription(\"Size of HTTP client response bodies.\"),\n\tmetric.WithUnit(\"By\"),\n}\n\n// NewClientResponseBodySize returns a new ClientResponseBodySize instrument.\nfunc NewClientResponseBodySize(\n\tm metric.Meter,\n\topt ...metric.Int64HistogramOption,\n) (ClientResponseBodySize, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ClientResponseBodySize{noop.Int64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newClientResponseBodySizeOpts\n\t} else {\n\t\topt = append(opt, newClientResponseBodySizeOpts...)\n\t}\n\n\ti, err := m.Int64Histogram(\n\t\t\"http.client.response.body.size\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ClientResponseBodySize{noop.Int64Histogram{}}, err\n\t}\n\treturn ClientResponseBodySize{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ClientResponseBodySize) Inst() metric.Int64Histogram {\n\treturn m.Int64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ClientResponseBodySize) Name() string {\n\treturn \"http.client.response.body.size\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ClientResponseBodySize) Unit() string {\n\treturn \"By\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ClientResponseBodySize) Description() string {\n\treturn \"Size of HTTP client response bodies.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The serverAddress is the server domain name if available without reverse DNS\n// lookup; otherwise, IP address or Unix domain socket name.\n//\n// The serverPort is the server port number.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// The size of the response payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ClientResponseBodySize) Record(\n\tctx context.Context,\n\tval int64,\n\trequestMethod RequestMethodAttr,\n\tserverAddress string,\n\tserverPort int,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"server.address\", serverAddress),\n\t\t\t\tattribute.Int(\"server.port\", serverPort),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\n//\n// The size of the response payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ClientResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ClientResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ClientResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrURLTemplate returns an optional attribute for the \"url.template\" semantic\n// convention. It represents the low-cardinality template of an\n// [absolute path reference].\n//\n// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2\nfunc (ClientResponseBodySize) AttrURLTemplate(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.template\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ClientResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrURLScheme returns an optional attribute for the \"url.scheme\" semantic\n// convention. It represents the [URI scheme] component identifying the used\n// protocol.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (ClientResponseBodySize) AttrURLScheme(val string) attribute.KeyValue {\n\treturn attribute.String(\"url.scheme\", val)\n}\n\n// ServerActiveRequests is an instrument used to record metric values conforming\n// to the \"http.server.active_requests\" semantic conventions. It represents the\n// number of active HTTP server requests.\ntype ServerActiveRequests struct {\n\tmetric.Int64UpDownCounter\n}\n\nvar newServerActiveRequestsOpts = []metric.Int64UpDownCounterOption{\n\tmetric.WithDescription(\"Number of active HTTP server requests.\"),\n\tmetric.WithUnit(\"{request}\"),\n}\n\n// NewServerActiveRequests returns a new ServerActiveRequests instrument.\nfunc NewServerActiveRequests(\n\tm metric.Meter,\n\topt ...metric.Int64UpDownCounterOption,\n) (ServerActiveRequests, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ServerActiveRequests{noop.Int64UpDownCounter{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newServerActiveRequestsOpts\n\t} else {\n\t\topt = append(opt, newServerActiveRequestsOpts...)\n\t}\n\n\ti, err := m.Int64UpDownCounter(\n\t\t\"http.server.active_requests\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ServerActiveRequests{noop.Int64UpDownCounter{}}, err\n\t}\n\treturn ServerActiveRequests{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ServerActiveRequests) Inst() metric.Int64UpDownCounter {\n\treturn m.Int64UpDownCounter\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ServerActiveRequests) Name() string {\n\treturn \"http.server.active_requests\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ServerActiveRequests) Unit() string {\n\treturn \"{request}\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ServerActiveRequests) Description() string {\n\treturn \"Number of active HTTP server requests.\"\n}\n\n// Add adds incr to the existing count for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The urlScheme is the the [URI scheme] component identifying the used protocol.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (m ServerActiveRequests) Add(\n\tctx context.Context,\n\tincr int64,\n\trequestMethod RequestMethodAttr,\n\turlScheme string,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"url.scheme\", urlScheme),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AddSet adds incr to the existing count for set.\nfunc (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64UpDownCounter.Add(ctx, incr)\n\t\treturn\n\t}\n\n\to := addOptPool.Get().(*[]metric.AddOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\taddOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64UpDownCounter.Add(ctx, incr, *o...)\n}\n\n// AttrServerAddress returns an optional attribute for the \"server.address\"\n// semantic convention. It represents the name of the local HTTP server that\n// received the request.\nfunc (ServerActiveRequests) AttrServerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"server.address\", val)\n}\n\n// AttrServerPort returns an optional attribute for the \"server.port\" semantic\n// convention. It represents the port of the local HTTP server that received the\n// request.\nfunc (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue {\n\treturn attribute.Int(\"server.port\", val)\n}\n\n// ServerRequestBodySize is an instrument used to record metric values conforming\n// to the \"http.server.request.body.size\" semantic conventions. It represents the\n// size of HTTP server request bodies.\ntype ServerRequestBodySize struct {\n\tmetric.Int64Histogram\n}\n\nvar newServerRequestBodySizeOpts = []metric.Int64HistogramOption{\n\tmetric.WithDescription(\"Size of HTTP server request bodies.\"),\n\tmetric.WithUnit(\"By\"),\n}\n\n// NewServerRequestBodySize returns a new ServerRequestBodySize instrument.\nfunc NewServerRequestBodySize(\n\tm metric.Meter,\n\topt ...metric.Int64HistogramOption,\n) (ServerRequestBodySize, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ServerRequestBodySize{noop.Int64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newServerRequestBodySizeOpts\n\t} else {\n\t\topt = append(opt, newServerRequestBodySizeOpts...)\n\t}\n\n\ti, err := m.Int64Histogram(\n\t\t\"http.server.request.body.size\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ServerRequestBodySize{noop.Int64Histogram{}}, err\n\t}\n\treturn ServerRequestBodySize{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ServerRequestBodySize) Inst() metric.Int64Histogram {\n\treturn m.Int64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ServerRequestBodySize) Name() string {\n\treturn \"http.server.request.body.size\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ServerRequestBodySize) Unit() string {\n\treturn \"By\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ServerRequestBodySize) Description() string {\n\treturn \"Size of HTTP server request bodies.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The urlScheme is the the [URI scheme] component identifying the used protocol.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\n//\n// The size of the request payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ServerRequestBodySize) Record(\n\tctx context.Context,\n\tval int64,\n\trequestMethod RequestMethodAttr,\n\turlScheme string,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"url.scheme\", urlScheme),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\n//\n// The size of the request payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ServerRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ServerRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrRoute returns an optional attribute for the \"http.route\" semantic\n// convention. It represents the matched route template for the request. This\n// MUST be low-cardinality and include all static path segments, with dynamic\n// path segments represented with placeholders.\nfunc (ServerRequestBodySize) AttrRoute(val string) attribute.KeyValue {\n\treturn attribute.String(\"http.route\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ServerRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ServerRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrServerAddress returns an optional attribute for the \"server.address\"\n// semantic convention. It represents the name of the local HTTP server that\n// received the request.\nfunc (ServerRequestBodySize) AttrServerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"server.address\", val)\n}\n\n// AttrServerPort returns an optional attribute for the \"server.port\" semantic\n// convention. It represents the port of the local HTTP server that received the\n// request.\nfunc (ServerRequestBodySize) AttrServerPort(val int) attribute.KeyValue {\n\treturn attribute.Int(\"server.port\", val)\n}\n\n// AttrUserAgentSyntheticType returns an optional attribute for the\n// \"user_agent.synthetic.type\" semantic convention. It represents the specifies\n// the category of synthetic traffic, such as tests or bots.\nfunc (ServerRequestBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"user_agent.synthetic.type\", string(val))\n}\n\n// ServerRequestDuration is an instrument used to record metric values conforming\n// to the \"http.server.request.duration\" semantic conventions. It represents the\n// duration of HTTP server requests.\ntype ServerRequestDuration struct {\n\tmetric.Float64Histogram\n}\n\nvar newServerRequestDurationOpts = []metric.Float64HistogramOption{\n\tmetric.WithDescription(\"Duration of HTTP server requests.\"),\n\tmetric.WithUnit(\"s\"),\n}\n\n// NewServerRequestDuration returns a new ServerRequestDuration instrument.\nfunc NewServerRequestDuration(\n\tm metric.Meter,\n\topt ...metric.Float64HistogramOption,\n) (ServerRequestDuration, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ServerRequestDuration{noop.Float64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newServerRequestDurationOpts\n\t} else {\n\t\topt = append(opt, newServerRequestDurationOpts...)\n\t}\n\n\ti, err := m.Float64Histogram(\n\t\t\"http.server.request.duration\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ServerRequestDuration{noop.Float64Histogram{}}, err\n\t}\n\treturn ServerRequestDuration{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ServerRequestDuration) Inst() metric.Float64Histogram {\n\treturn m.Float64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ServerRequestDuration) Name() string {\n\treturn \"http.server.request.duration\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ServerRequestDuration) Unit() string {\n\treturn \"s\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ServerRequestDuration) Description() string {\n\treturn \"Duration of HTTP server requests.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The urlScheme is the the [URI scheme] component identifying the used protocol.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\nfunc (m ServerRequestDuration) Record(\n\tctx context.Context,\n\tval float64,\n\trequestMethod RequestMethodAttr,\n\turlScheme string,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"url.scheme\", urlScheme),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\nfunc (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Float64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Float64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ServerRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ServerRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrRoute returns an optional attribute for the \"http.route\" semantic\n// convention. It represents the matched route template for the request. This\n// MUST be low-cardinality and include all static path segments, with dynamic\n// path segments represented with placeholders.\nfunc (ServerRequestDuration) AttrRoute(val string) attribute.KeyValue {\n\treturn attribute.String(\"http.route\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ServerRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ServerRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrServerAddress returns an optional attribute for the \"server.address\"\n// semantic convention. It represents the name of the local HTTP server that\n// received the request.\nfunc (ServerRequestDuration) AttrServerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"server.address\", val)\n}\n\n// AttrServerPort returns an optional attribute for the \"server.port\" semantic\n// convention. It represents the port of the local HTTP server that received the\n// request.\nfunc (ServerRequestDuration) AttrServerPort(val int) attribute.KeyValue {\n\treturn attribute.Int(\"server.port\", val)\n}\n\n// AttrUserAgentSyntheticType returns an optional attribute for the\n// \"user_agent.synthetic.type\" semantic convention. It represents the specifies\n// the category of synthetic traffic, such as tests or bots.\nfunc (ServerRequestDuration) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"user_agent.synthetic.type\", string(val))\n}\n\n// ServerResponseBodySize is an instrument used to record metric values\n// conforming to the \"http.server.response.body.size\" semantic conventions. It\n// represents the size of HTTP server response bodies.\ntype ServerResponseBodySize struct {\n\tmetric.Int64Histogram\n}\n\nvar newServerResponseBodySizeOpts = []metric.Int64HistogramOption{\n\tmetric.WithDescription(\"Size of HTTP server response bodies.\"),\n\tmetric.WithUnit(\"By\"),\n}\n\n// NewServerResponseBodySize returns a new ServerResponseBodySize instrument.\nfunc NewServerResponseBodySize(\n\tm metric.Meter,\n\topt ...metric.Int64HistogramOption,\n) (ServerResponseBodySize, error) {\n\t// Check if the meter is nil.\n\tif m == nil {\n\t\treturn ServerResponseBodySize{noop.Int64Histogram{}}, nil\n\t}\n\n\tif len(opt) == 0 {\n\t\topt = newServerResponseBodySizeOpts\n\t} else {\n\t\topt = append(opt, newServerResponseBodySizeOpts...)\n\t}\n\n\ti, err := m.Int64Histogram(\n\t\t\"http.server.response.body.size\",\n\t\topt...,\n\t)\n\tif err != nil {\n\t\treturn ServerResponseBodySize{noop.Int64Histogram{}}, err\n\t}\n\treturn ServerResponseBodySize{i}, nil\n}\n\n// Inst returns the underlying metric instrument.\nfunc (m ServerResponseBodySize) Inst() metric.Int64Histogram {\n\treturn m.Int64Histogram\n}\n\n// Name returns the semantic convention name of the instrument.\nfunc (ServerResponseBodySize) Name() string {\n\treturn \"http.server.response.body.size\"\n}\n\n// Unit returns the semantic convention unit of the instrument\nfunc (ServerResponseBodySize) Unit() string {\n\treturn \"By\"\n}\n\n// Description returns the semantic convention description of the instrument\nfunc (ServerResponseBodySize) Description() string {\n\treturn \"Size of HTTP server response bodies.\"\n}\n\n// Record records val to the current distribution for attrs.\n//\n// The requestMethod is the HTTP request method.\n//\n// The urlScheme is the the [URI scheme] component identifying the used protocol.\n//\n// All additional attrs passed are included in the recorded value.\n//\n// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1\n//\n// The size of the response payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ServerResponseBodySize) Record(\n\tctx context.Context,\n\tval int64,\n\trequestMethod RequestMethodAttr,\n\turlScheme string,\n\tattrs ...attribute.KeyValue,\n) {\n\tif len(attrs) == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(\n\t\t*o,\n\t\tmetric.WithAttributes(\n\t\t\tappend(\n\t\t\t\tattrs,\n\t\t\t\tattribute.String(\"http.request.method\", string(requestMethod)),\n\t\t\t\tattribute.String(\"url.scheme\", urlScheme),\n\t\t\t)...,\n\t\t),\n\t)\n\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// RecordSet records val to the current distribution for set.\n//\n// The size of the response payload body in bytes. This is the number of bytes\n// transferred excluding headers and is often, but not always, present as the\n// [Content-Length] header. For requests using transport encoding, this should be\n// the compressed size.\n//\n// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length\nfunc (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {\n\tif set.Len() == 0 {\n\t\tm.Int64Histogram.Record(ctx, val)\n\t\treturn\n\t}\n\n\to := recOptPool.Get().(*[]metric.RecordOption)\n\tdefer func() {\n\t\t*o = (*o)[:0]\n\t\trecOptPool.Put(o)\n\t}()\n\n\t*o = append(*o, metric.WithAttributeSet(set))\n\tm.Int64Histogram.Record(ctx, val, *o...)\n}\n\n// AttrErrorType returns an optional attribute for the \"error.type\" semantic\n// convention. It represents the describes a class of error the operation ended\n// with.\nfunc (ServerResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"error.type\", string(val))\n}\n\n// AttrResponseStatusCode returns an optional attribute for the\n// \"http.response.status_code\" semantic convention. It represents the\n// [HTTP response status code].\n//\n// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6\nfunc (ServerResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue {\n\treturn attribute.Int(\"http.response.status_code\", val)\n}\n\n// AttrRoute returns an optional attribute for the \"http.route\" semantic\n// convention. It represents the matched route template for the request. This\n// MUST be low-cardinality and include all static path segments, with dynamic\n// path segments represented with placeholders.\nfunc (ServerResponseBodySize) AttrRoute(val string) attribute.KeyValue {\n\treturn attribute.String(\"http.route\", val)\n}\n\n// AttrNetworkProtocolName returns an optional attribute for the\n// \"network.protocol.name\" semantic convention. It represents the\n// [OSI application layer] or non-OSI equivalent.\n//\n// [OSI application layer]: https://wikipedia.org/wiki/Application_layer\nfunc (ServerResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.name\", val)\n}\n\n// AttrNetworkProtocolVersion returns an optional attribute for the\n// \"network.protocol.version\" semantic convention. It represents the actual\n// version of the protocol used for network communication.\nfunc (ServerResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue {\n\treturn attribute.String(\"network.protocol.version\", val)\n}\n\n// AttrServerAddress returns an optional attribute for the \"server.address\"\n// semantic convention. It represents the name of the local HTTP server that\n// received the request.\nfunc (ServerResponseBodySize) AttrServerAddress(val string) attribute.KeyValue {\n\treturn attribute.String(\"server.address\", val)\n}\n\n// AttrServerPort returns an optional attribute for the \"server.port\" semantic\n// convention. It represents the port of the local HTTP server that received the\n// request.\nfunc (ServerResponseBodySize) AttrServerPort(val int) attribute.KeyValue {\n\treturn attribute.Int(\"server.port\", val)\n}\n\n// AttrUserAgentSyntheticType returns an optional attribute for the\n// \"user_agent.synthetic.type\" semantic convention. It represents the specifies\n// the category of synthetic traffic, such as tests or bots.\nfunc (ServerResponseBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue {\n\treturn attribute.String(\"user_agent.synthetic.type\", string(val))\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage semconv // import \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\n// SchemaURL is the schema URL that matches the version of the semantic conventions\n// that this package defines. Semconv packages starting from v1.4.0 must declare\n// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>\nconst SchemaURL = \"https://opentelemetry.io/schemas/1.39.0\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/LICENSE",
    "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\n--------------------------------------------------------------------------------\n\nCopyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/README.md",
    "content": "# Trace API\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/auto.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\tsemconv \"go.opentelemetry.io/otel/semconv/v1.39.0\"\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n\t\"go.opentelemetry.io/otel/trace/internal/telemetry\"\n)\n\n// newAutoTracerProvider returns an auto-instrumentable [trace.TracerProvider].\n// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument\n// the process using the returned TracerProvider, all of the telemetry it\n// produces will be processed and handled by that Instrumentation. By default,\n// if no Instrumentation instruments the TracerProvider it will not generate\n// any trace telemetry.\nfunc newAutoTracerProvider() TracerProvider { return tracerProviderInstance }\n\nvar tracerProviderInstance = new(autoTracerProvider)\n\ntype autoTracerProvider struct{ embedded.TracerProvider }\n\nvar _ TracerProvider = autoTracerProvider{}\n\nfunc (autoTracerProvider) Tracer(name string, opts ...TracerOption) Tracer {\n\tcfg := NewTracerConfig(opts...)\n\treturn autoTracer{\n\t\tname:      name,\n\t\tversion:   cfg.InstrumentationVersion(),\n\t\tschemaURL: cfg.SchemaURL(),\n\t}\n}\n\ntype autoTracer struct {\n\tembedded.Tracer\n\n\tname, schemaURL, version string\n}\n\nvar _ Tracer = autoTracer{}\n\nfunc (t autoTracer) Start(ctx context.Context, name string, opts ...SpanStartOption) (context.Context, Span) {\n\tvar psc, sc SpanContext\n\tsampled := true\n\tspan := new(autoSpan)\n\n\t// Ask eBPF for sampling decision and span context info.\n\tt.start(ctx, span, &psc, &sampled, &sc)\n\n\tspan.sampled.Store(sampled)\n\tspan.spanContext = sc\n\n\tctx = ContextWithSpan(ctx, span)\n\n\tif sampled {\n\t\t// Only build traces if sampled.\n\t\tcfg := NewSpanStartConfig(opts...)\n\t\tspan.traces, span.span = t.traces(name, cfg, span.spanContext, psc)\n\t}\n\n\treturn ctx, span\n}\n\n// Expected to be implemented in eBPF.\n//\n//go:noinline\nfunc (*autoTracer) start(\n\tctx context.Context,\n\tspanPtr *autoSpan,\n\tpsc *SpanContext,\n\tsampled *bool,\n\tsc *SpanContext,\n) {\n\tstart(ctx, spanPtr, psc, sampled, sc)\n}\n\n// start is used for testing.\nvar start = func(context.Context, *autoSpan, *SpanContext, *bool, *SpanContext) {}\n\nfunc (t autoTracer) traces(name string, cfg SpanConfig, sc, psc SpanContext) (*telemetry.Traces, *telemetry.Span) {\n\tspan := &telemetry.Span{\n\t\tTraceID:      telemetry.TraceID(sc.TraceID()),\n\t\tSpanID:       telemetry.SpanID(sc.SpanID()),\n\t\tFlags:        uint32(sc.TraceFlags()),\n\t\tTraceState:   sc.TraceState().String(),\n\t\tParentSpanID: telemetry.SpanID(psc.SpanID()),\n\t\tName:         name,\n\t\tKind:         spanKind(cfg.SpanKind()),\n\t}\n\n\tspan.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes())\n\n\tlinks := cfg.Links()\n\tif limit := maxSpan.Links; limit == 0 {\n\t\tn := int64(len(links))\n\t\tif n > 0 {\n\t\t\tspan.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec  // Bounds checked.\n\t\t}\n\t} else {\n\t\tif limit > 0 {\n\t\t\tn := int64(max(len(links)-limit, 0))\n\t\t\tspan.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec  // Bounds checked.\n\t\t\tlinks = links[n:]\n\t\t}\n\t\tspan.Links = convLinks(links)\n\t}\n\n\tif t := cfg.Timestamp(); !t.IsZero() {\n\t\tspan.StartTime = cfg.Timestamp()\n\t} else {\n\t\tspan.StartTime = time.Now()\n\t}\n\n\treturn &telemetry.Traces{\n\t\tResourceSpans: []*telemetry.ResourceSpans{\n\t\t\t{\n\t\t\t\tScopeSpans: []*telemetry.ScopeSpans{\n\t\t\t\t\t{\n\t\t\t\t\t\tScope: &telemetry.Scope{\n\t\t\t\t\t\t\tName:    t.name,\n\t\t\t\t\t\t\tVersion: t.version,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSpans:     []*telemetry.Span{span},\n\t\t\t\t\t\tSchemaURL: t.schemaURL,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}, span\n}\n\nfunc spanKind(kind SpanKind) telemetry.SpanKind {\n\tswitch kind {\n\tcase SpanKindInternal:\n\t\treturn telemetry.SpanKindInternal\n\tcase SpanKindServer:\n\t\treturn telemetry.SpanKindServer\n\tcase SpanKindClient:\n\t\treturn telemetry.SpanKindClient\n\tcase SpanKindProducer:\n\t\treturn telemetry.SpanKindProducer\n\tcase SpanKindConsumer:\n\t\treturn telemetry.SpanKindConsumer\n\t}\n\treturn telemetry.SpanKind(0) // undefined.\n}\n\ntype autoSpan struct {\n\tembedded.Span\n\n\tspanContext SpanContext\n\tsampled     atomic.Bool\n\n\tmu     sync.Mutex\n\ttraces *telemetry.Traces\n\tspan   *telemetry.Span\n}\n\nfunc (s *autoSpan) SpanContext() SpanContext {\n\tif s == nil {\n\t\treturn SpanContext{}\n\t}\n\t// s.spanContext is immutable, do not acquire lock s.mu.\n\treturn s.spanContext\n}\n\nfunc (s *autoSpan) IsRecording() bool {\n\tif s == nil {\n\t\treturn false\n\t}\n\n\treturn s.sampled.Load()\n}\n\nfunc (s *autoSpan) SetStatus(c codes.Code, msg string) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif s.span.Status == nil {\n\t\ts.span.Status = new(telemetry.Status)\n\t}\n\n\ts.span.Status.Message = msg\n\n\tswitch c {\n\tcase codes.Unset:\n\t\ts.span.Status.Code = telemetry.StatusCodeUnset\n\tcase codes.Error:\n\t\ts.span.Status.Code = telemetry.StatusCodeError\n\tcase codes.Ok:\n\t\ts.span.Status.Code = telemetry.StatusCodeOK\n\t}\n}\n\nfunc (s *autoSpan) SetAttributes(attrs ...attribute.KeyValue) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tlimit := maxSpan.Attrs\n\tif limit == 0 {\n\t\t// No attributes allowed.\n\t\tn := int64(len(attrs))\n\t\tif n > 0 {\n\t\t\ts.span.DroppedAttrs += uint32(min(n, math.MaxUint32)) // nolint: gosec  // Bounds checked.\n\t\t}\n\t\treturn\n\t}\n\n\tm := make(map[string]int)\n\tfor i, a := range s.span.Attrs {\n\t\tm[a.Key] = i\n\t}\n\n\tfor _, a := range attrs {\n\t\tval := convAttrValue(a.Value)\n\t\tif val.Empty() {\n\t\t\ts.span.DroppedAttrs++\n\t\t\tcontinue\n\t\t}\n\n\t\tif idx, ok := m[string(a.Key)]; ok {\n\t\t\ts.span.Attrs[idx] = telemetry.Attr{\n\t\t\t\tKey:   string(a.Key),\n\t\t\t\tValue: val,\n\t\t\t}\n\t\t} else if limit < 0 || len(s.span.Attrs) < limit {\n\t\t\ts.span.Attrs = append(s.span.Attrs, telemetry.Attr{\n\t\t\t\tKey:   string(a.Key),\n\t\t\t\tValue: val,\n\t\t\t})\n\t\t\tm[string(a.Key)] = len(s.span.Attrs) - 1\n\t\t} else {\n\t\t\ts.span.DroppedAttrs++\n\t\t}\n\t}\n}\n\n// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The\n// number of dropped attributes is also returned.\nfunc convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) {\n\tn := len(attrs)\n\tif limit == 0 {\n\t\tvar out uint32\n\t\tif n > 0 {\n\t\t\tout = uint32(min(int64(n), math.MaxUint32)) // nolint: gosec  // Bounds checked.\n\t\t}\n\t\treturn nil, out\n\t}\n\n\tif limit < 0 {\n\t\t// Unlimited.\n\t\treturn convAttrs(attrs), 0\n\t}\n\n\tif n < 0 {\n\t\tn = 0\n\t}\n\n\tlimit = min(n, limit)\n\treturn convAttrs(attrs[:limit]), uint32(n - limit) // nolint: gosec  // Bounds checked.\n}\n\nfunc convAttrs(attrs []attribute.KeyValue) []telemetry.Attr {\n\tif len(attrs) == 0 {\n\t\t// Avoid allocations if not necessary.\n\t\treturn nil\n\t}\n\n\tout := make([]telemetry.Attr, 0, len(attrs))\n\tfor _, attr := range attrs {\n\t\tkey := string(attr.Key)\n\t\tval := convAttrValue(attr.Value)\n\t\tif val.Empty() {\n\t\t\tcontinue\n\t\t}\n\t\tout = append(out, telemetry.Attr{Key: key, Value: val})\n\t}\n\treturn out\n}\n\nfunc convAttrValue(value attribute.Value) telemetry.Value {\n\tswitch value.Type() {\n\tcase attribute.BOOL:\n\t\treturn telemetry.BoolValue(value.AsBool())\n\tcase attribute.INT64:\n\t\treturn telemetry.Int64Value(value.AsInt64())\n\tcase attribute.FLOAT64:\n\t\treturn telemetry.Float64Value(value.AsFloat64())\n\tcase attribute.STRING:\n\t\tv := truncate(maxSpan.AttrValueLen, value.AsString())\n\t\treturn telemetry.StringValue(v)\n\tcase attribute.BOOLSLICE:\n\t\tslice := value.AsBoolSlice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.BoolValue(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.INT64SLICE:\n\t\tslice := value.AsInt64Slice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.Int64Value(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.FLOAT64SLICE:\n\t\tslice := value.AsFloat64Slice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tout = append(out, telemetry.Float64Value(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\tcase attribute.STRINGSLICE:\n\t\tslice := value.AsStringSlice()\n\t\tout := make([]telemetry.Value, 0, len(slice))\n\t\tfor _, v := range slice {\n\t\t\tv = truncate(maxSpan.AttrValueLen, v)\n\t\t\tout = append(out, telemetry.StringValue(v))\n\t\t}\n\t\treturn telemetry.SliceValue(out...)\n\t}\n\treturn telemetry.Value{}\n}\n\n// truncate returns a truncated version of s such that it contains less than\n// the limit number of characters. Truncation is applied by returning the limit\n// number of valid characters contained in s.\n//\n// If limit is negative, it returns the original string.\n//\n// UTF-8 is supported. When truncating, all invalid characters are dropped\n// before applying truncation.\n//\n// If s already contains less than the limit number of bytes, it is returned\n// unchanged. No invalid characters are removed.\nfunc truncate(limit int, s string) string {\n\t// This prioritize performance in the following order based on the most\n\t// common expected use-cases.\n\t//\n\t//  - Short values less than the default limit (128).\n\t//  - Strings with valid encodings that exceed the limit.\n\t//  - No limit.\n\t//  - Strings with invalid encodings that exceed the limit.\n\tif limit < 0 || len(s) <= limit {\n\t\treturn s\n\t}\n\n\t// Optimistically, assume all valid UTF-8.\n\tvar b strings.Builder\n\tcount := 0\n\tfor i, c := range s {\n\t\tif c != utf8.RuneError {\n\t\t\tcount++\n\t\t\tif count > limit {\n\t\t\t\treturn s[:i]\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t_, size := utf8.DecodeRuneInString(s[i:])\n\t\tif size == 1 {\n\t\t\t// Invalid encoding.\n\t\t\tb.Grow(len(s) - 1)\n\t\t\t_, _ = b.WriteString(s[:i])\n\t\t\ts = s[i:]\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Fast-path, no invalid input.\n\tif b.Cap() == 0 {\n\t\treturn s\n\t}\n\n\t// Truncate while validating UTF-8.\n\tfor i := 0; i < len(s) && count < limit; {\n\t\tc := s[i]\n\t\tif c < utf8.RuneSelf {\n\t\t\t// Optimization for single byte runes (common case).\n\t\t\t_ = b.WriteByte(c)\n\t\t\ti++\n\t\t\tcount++\n\t\t\tcontinue\n\t\t}\n\n\t\t_, size := utf8.DecodeRuneInString(s[i:])\n\t\tif size == 1 {\n\t\t\t// We checked for all 1-byte runes above, this is a RuneError.\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\n\t\t_, _ = b.WriteString(s[i : i+size])\n\t\ti += size\n\t\tcount++\n\t}\n\n\treturn b.String()\n}\n\nfunc (s *autoSpan) End(opts ...SpanEndOption) {\n\tif s == nil || !s.sampled.Swap(false) {\n\t\treturn\n\t}\n\n\t// s.end exists so the lock (s.mu) is not held while s.ended is called.\n\ts.ended(s.end(opts))\n}\n\nfunc (s *autoSpan) end(opts []SpanEndOption) []byte {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tcfg := NewSpanEndConfig(opts...)\n\tif t := cfg.Timestamp(); !t.IsZero() {\n\t\ts.span.EndTime = cfg.Timestamp()\n\t} else {\n\t\ts.span.EndTime = time.Now()\n\t}\n\n\tb, _ := json.Marshal(s.traces) // TODO: do not ignore this error.\n\treturn b\n}\n\n// Expected to be implemented in eBPF.\n//\n//go:noinline\nfunc (*autoSpan) ended(buf []byte) { ended(buf) }\n\n// ended is used for testing.\nvar ended = func([]byte) {}\n\nfunc (s *autoSpan) RecordError(err error, opts ...EventOption) {\n\tif s == nil || err == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tcfg := NewEventConfig(opts...)\n\n\tattrs := cfg.Attributes()\n\tattrs = append(attrs,\n\t\tsemconv.ExceptionType(typeStr(err)),\n\t\tsemconv.ExceptionMessage(err.Error()),\n\t)\n\tif cfg.StackTrace() {\n\t\tbuf := make([]byte, 2048)\n\t\tn := runtime.Stack(buf, false)\n\t\tattrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n])))\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs)\n}\n\nfunc typeStr(i any) string {\n\tt := reflect.TypeOf(i)\n\tif t.PkgPath() == \"\" && t.Name() == \"\" {\n\t\t// Likely a builtin type.\n\t\treturn t.String()\n\t}\n\treturn fmt.Sprintf(\"%s.%s\", t.PkgPath(), t.Name())\n}\n\nfunc (s *autoSpan) AddEvent(name string, opts ...EventOption) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tcfg := NewEventConfig(opts...)\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.addEvent(name, cfg.Timestamp(), cfg.Attributes())\n}\n\n// addEvent adds an event with name and attrs at tStamp to the span. The span\n// lock (s.mu) needs to be held by the caller.\nfunc (s *autoSpan) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) {\n\tlimit := maxSpan.Events\n\n\tif limit == 0 {\n\t\ts.span.DroppedEvents++\n\t\treturn\n\t}\n\n\tif limit > 0 && len(s.span.Events) == limit {\n\t\t// Drop head while avoiding allocation of more capacity.\n\t\tcopy(s.span.Events[:limit-1], s.span.Events[1:])\n\t\ts.span.Events = s.span.Events[:limit-1]\n\t\ts.span.DroppedEvents++\n\t}\n\n\te := &telemetry.SpanEvent{Time: tStamp, Name: name}\n\te.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs)\n\n\ts.span.Events = append(s.span.Events, e)\n}\n\nfunc (s *autoSpan) AddLink(link Link) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\tl := maxSpan.Links\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif l == 0 {\n\t\ts.span.DroppedLinks++\n\t\treturn\n\t}\n\n\tif l > 0 && len(s.span.Links) == l {\n\t\t// Drop head while avoiding allocation of more capacity.\n\t\tcopy(s.span.Links[:l-1], s.span.Links[1:])\n\t\ts.span.Links = s.span.Links[:l-1]\n\t\ts.span.DroppedLinks++\n\t}\n\n\ts.span.Links = append(s.span.Links, convLink(link))\n}\n\nfunc convLinks(links []Link) []*telemetry.SpanLink {\n\tout := make([]*telemetry.SpanLink, 0, len(links))\n\tfor _, link := range links {\n\t\tout = append(out, convLink(link))\n\t}\n\treturn out\n}\n\nfunc convLink(link Link) *telemetry.SpanLink {\n\tl := &telemetry.SpanLink{\n\t\tTraceID:    telemetry.TraceID(link.SpanContext.TraceID()),\n\t\tSpanID:     telemetry.SpanID(link.SpanContext.SpanID()),\n\t\tTraceState: link.SpanContext.TraceState().String(),\n\t\tFlags:      uint32(link.SpanContext.TraceFlags()),\n\t}\n\tl.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes)\n\n\treturn l\n}\n\nfunc (s *autoSpan) SetName(name string) {\n\tif s == nil || !s.sampled.Load() {\n\t\treturn\n\t}\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\ts.span.Name = name\n}\n\nfunc (*autoSpan) TracerProvider() TracerProvider { return newAutoTracerProvider() }\n\n// maxSpan are the span limits resolved during startup.\nvar maxSpan = newSpanLimits()\n\ntype spanLimits struct {\n\t// Attrs is the number of allowed attributes for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the\n\t// environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if\n\t// that is not set, is used.\n\tAttrs int\n\t// AttrValueLen is the maximum attribute value length allowed for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the\n\t// environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1\n\t// if that is not set, is used.\n\tAttrValueLen int\n\t// Events is the number of allowed events for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set.\n\tEvents int\n\t// EventAttrs is the number of allowed attributes for a span event.\n\t//\n\t// The is resolved from the environment variable value for the\n\t// OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set.\n\tEventAttrs int\n\t// Links is the number of allowed Links for a span.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set.\n\tLinks int\n\t// LinkAttrs is the number of allowed attributes for a span link.\n\t//\n\t// This is resolved from the environment variable value for the\n\t// OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set.\n\tLinkAttrs int\n}\n\nfunc newSpanLimits() spanLimits {\n\treturn spanLimits{\n\t\tAttrs: firstEnv(\n\t\t\t128,\n\t\t\t\"OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT\",\n\t\t\t\"OTEL_ATTRIBUTE_COUNT_LIMIT\",\n\t\t),\n\t\tAttrValueLen: firstEnv(\n\t\t\t-1, // Unlimited.\n\t\t\t\"OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT\",\n\t\t\t\"OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT\",\n\t\t),\n\t\tEvents:     firstEnv(128, \"OTEL_SPAN_EVENT_COUNT_LIMIT\"),\n\t\tEventAttrs: firstEnv(128, \"OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT\"),\n\t\tLinks:      firstEnv(128, \"OTEL_SPAN_LINK_COUNT_LIMIT\"),\n\t\tLinkAttrs:  firstEnv(128, \"OTEL_LINK_ATTRIBUTE_COUNT_LIMIT\"),\n\t}\n}\n\n// firstEnv returns the parsed integer value of the first matching environment\n// variable from keys. The defaultVal is returned if the value is not an\n// integer or no match is found.\nfunc firstEnv(defaultVal int, keys ...string) int {\n\tfor _, key := range keys {\n\t\tstrV := os.Getenv(key)\n\t\tif strV == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tv, err := strconv.Atoi(strV)\n\t\tif err == nil {\n\t\t\treturn v\n\t\t}\n\t\t// Ignore invalid environment variable.\n\t}\n\n\treturn defaultVal\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/config.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"slices\"\n\t\"time\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n)\n\n// TracerConfig is a group of options for a Tracer.\ntype TracerConfig struct {\n\tinstrumentationVersion string\n\t// Schema URL of the telemetry emitted by the Tracer.\n\tschemaURL string\n\tattrs     attribute.Set\n}\n\n// InstrumentationVersion returns the version of the library providing instrumentation.\nfunc (t *TracerConfig) InstrumentationVersion() string {\n\treturn t.instrumentationVersion\n}\n\n// InstrumentationAttributes returns the attributes associated with the library\n// providing instrumentation.\nfunc (t *TracerConfig) InstrumentationAttributes() attribute.Set {\n\treturn t.attrs\n}\n\n// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer.\nfunc (t *TracerConfig) SchemaURL() string {\n\treturn t.schemaURL\n}\n\n// NewTracerConfig applies all the options to a returned TracerConfig.\nfunc NewTracerConfig(options ...TracerOption) TracerConfig {\n\tvar config TracerConfig\n\tfor _, option := range options {\n\t\tconfig = option.apply(config)\n\t}\n\treturn config\n}\n\n// TracerOption applies an option to a TracerConfig.\ntype TracerOption interface {\n\tapply(TracerConfig) TracerConfig\n}\n\ntype tracerOptionFunc func(TracerConfig) TracerConfig\n\nfunc (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig {\n\treturn fn(cfg)\n}\n\n// SpanConfig is a group of options for a Span.\ntype SpanConfig struct {\n\tattributes []attribute.KeyValue\n\ttimestamp  time.Time\n\tlinks      []Link\n\tnewRoot    bool\n\tspanKind   SpanKind\n\tstackTrace bool\n}\n\n// Attributes describe the associated qualities of a Span.\nfunc (cfg *SpanConfig) Attributes() []attribute.KeyValue {\n\treturn cfg.attributes\n}\n\n// Timestamp is a time in a Span life-cycle.\nfunc (cfg *SpanConfig) Timestamp() time.Time {\n\treturn cfg.timestamp\n}\n\n// StackTrace reports whether stack trace capturing is enabled.\nfunc (cfg *SpanConfig) StackTrace() bool {\n\treturn cfg.stackTrace\n}\n\n// Links are the associations a Span has with other Spans.\nfunc (cfg *SpanConfig) Links() []Link {\n\treturn cfg.links\n}\n\n// NewRoot identifies a Span as the root Span for a new trace. This is\n// commonly used when an existing trace crosses trust boundaries and the\n// remote parent span context should be ignored for security.\nfunc (cfg *SpanConfig) NewRoot() bool {\n\treturn cfg.newRoot\n}\n\n// SpanKind is the role a Span has in a trace.\nfunc (cfg *SpanConfig) SpanKind() SpanKind {\n\treturn cfg.spanKind\n}\n\n// NewSpanStartConfig applies all the options to a returned SpanConfig.\n// No validation is performed on the returned SpanConfig (e.g. no uniqueness\n// checking or bounding of data), it is left to the SDK to perform this\n// action.\nfunc NewSpanStartConfig(options ...SpanStartOption) SpanConfig {\n\tvar c SpanConfig\n\tfor _, option := range options {\n\t\tc = option.applySpanStart(c)\n\t}\n\treturn c\n}\n\n// NewSpanEndConfig applies all the options to a returned SpanConfig.\n// No validation is performed on the returned SpanConfig (e.g. no uniqueness\n// checking or bounding of data), it is left to the SDK to perform this\n// action.\nfunc NewSpanEndConfig(options ...SpanEndOption) SpanConfig {\n\tvar c SpanConfig\n\tfor _, option := range options {\n\t\tc = option.applySpanEnd(c)\n\t}\n\treturn c\n}\n\n// SpanStartOption applies an option to a SpanConfig. These options are applicable\n// only when the span is created.\ntype SpanStartOption interface {\n\tapplySpanStart(SpanConfig) SpanConfig\n}\n\ntype spanOptionFunc func(SpanConfig) SpanConfig\n\nfunc (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig {\n\treturn fn(cfg)\n}\n\n// SpanEndOption applies an option to a SpanConfig. These options are\n// applicable only when the span is ended.\ntype SpanEndOption interface {\n\tapplySpanEnd(SpanConfig) SpanConfig\n}\n\n// EventConfig is a group of options for an Event.\ntype EventConfig struct {\n\tattributes []attribute.KeyValue\n\ttimestamp  time.Time\n\tstackTrace bool\n}\n\n// Attributes describe the associated qualities of an Event.\nfunc (cfg *EventConfig) Attributes() []attribute.KeyValue {\n\treturn cfg.attributes\n}\n\n// Timestamp is a time in an Event life-cycle.\nfunc (cfg *EventConfig) Timestamp() time.Time {\n\treturn cfg.timestamp\n}\n\n// StackTrace reports whether stack trace capturing is enabled.\nfunc (cfg *EventConfig) StackTrace() bool {\n\treturn cfg.stackTrace\n}\n\n// NewEventConfig applies all the EventOptions to a returned EventConfig. If no\n// timestamp option is passed, the returned EventConfig will have a Timestamp\n// set to the call time, otherwise no validation is performed on the returned\n// EventConfig.\nfunc NewEventConfig(options ...EventOption) EventConfig {\n\tvar c EventConfig\n\tfor _, option := range options {\n\t\tc = option.applyEvent(c)\n\t}\n\tif c.timestamp.IsZero() {\n\t\tc.timestamp = time.Now()\n\t}\n\treturn c\n}\n\n// EventOption applies span event options to an EventConfig.\ntype EventOption interface {\n\tapplyEvent(EventConfig) EventConfig\n}\n\n// SpanOption are options that can be used at both the beginning and end of a span.\ntype SpanOption interface {\n\tSpanStartOption\n\tSpanEndOption\n}\n\n// SpanStartEventOption are options that can be used at the start of a span, or with an event.\ntype SpanStartEventOption interface {\n\tSpanStartOption\n\tEventOption\n}\n\n// SpanEndEventOption are options that can be used at the end of a span, or with an event.\ntype SpanEndEventOption interface {\n\tSpanEndOption\n\tEventOption\n}\n\ntype attributeOption []attribute.KeyValue\n\nfunc (o attributeOption) applySpan(c SpanConfig) SpanConfig {\n\tc.attributes = append(c.attributes, []attribute.KeyValue(o)...)\n\treturn c\n}\nfunc (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) }\nfunc (o attributeOption) applyEvent(c EventConfig) EventConfig {\n\tc.attributes = append(c.attributes, []attribute.KeyValue(o)...)\n\treturn c\n}\n\nvar _ SpanStartEventOption = attributeOption{}\n\n// WithAttributes adds the attributes related to a span life-cycle event.\n// These attributes are used to describe the work a Span represents when this\n// option is provided to a Span's start event. Otherwise, these\n// attributes provide additional information about the event being recorded\n// (e.g. error, state change, processing progress, system event).\n//\n// If multiple of these options are passed the attributes of each successive\n// option will extend the attributes instead of overwriting. There is no\n// guarantee of uniqueness in the resulting attributes.\nfunc WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption {\n\treturn attributeOption(attributes)\n}\n\n// SpanEventOption are options that can be used with an event or a span.\ntype SpanEventOption interface {\n\tSpanOption\n\tEventOption\n}\n\ntype timestampOption time.Time\n\nfunc (o timestampOption) applySpan(c SpanConfig) SpanConfig {\n\tc.timestamp = time.Time(o)\n\treturn c\n}\nfunc (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) }\nfunc (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig   { return o.applySpan(c) }\nfunc (o timestampOption) applyEvent(c EventConfig) EventConfig {\n\tc.timestamp = time.Time(o)\n\treturn c\n}\n\nvar _ SpanEventOption = timestampOption{}\n\n// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g.\n// started, stopped, errored).\nfunc WithTimestamp(t time.Time) SpanEventOption {\n\treturn timestampOption(t)\n}\n\ntype stackTraceOption bool\n\nfunc (o stackTraceOption) applyEvent(c EventConfig) EventConfig {\n\tc.stackTrace = bool(o)\n\treturn c\n}\n\nfunc (o stackTraceOption) applySpan(c SpanConfig) SpanConfig {\n\tc.stackTrace = bool(o)\n\treturn c\n}\nfunc (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) }\n\n// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false).\nfunc WithStackTrace(b bool) SpanEndEventOption {\n\treturn stackTraceOption(b)\n}\n\n// WithLinks adds links to a Span. The links are added to the existing Span\n// links, i.e. this does not overwrite. Links with invalid span context are ignored.\nfunc WithLinks(links ...Link) SpanStartOption {\n\treturn spanOptionFunc(func(cfg SpanConfig) SpanConfig {\n\t\tcfg.links = append(cfg.links, links...)\n\t\treturn cfg\n\t})\n}\n\n// WithNewRoot specifies that the Span should be treated as a root Span. Any\n// existing parent span context will be ignored when defining the Span's trace\n// identifiers.\nfunc WithNewRoot() SpanStartOption {\n\treturn spanOptionFunc(func(cfg SpanConfig) SpanConfig {\n\t\tcfg.newRoot = true\n\t\treturn cfg\n\t})\n}\n\n// WithSpanKind sets the SpanKind of a Span.\nfunc WithSpanKind(kind SpanKind) SpanStartOption {\n\treturn spanOptionFunc(func(cfg SpanConfig) SpanConfig {\n\t\tcfg.spanKind = kind\n\t\treturn cfg\n\t})\n}\n\n// WithInstrumentationVersion sets the instrumentation version.\nfunc WithInstrumentationVersion(version string) TracerOption {\n\treturn tracerOptionFunc(func(cfg TracerConfig) TracerConfig {\n\t\tcfg.instrumentationVersion = version\n\t\treturn cfg\n\t})\n}\n\n// mergeSets returns the union of keys between a and b. Any duplicate keys will\n// use the value associated with b.\nfunc mergeSets(a, b attribute.Set) attribute.Set {\n\t// NewMergeIterator uses the first value for any duplicates.\n\titer := attribute.NewMergeIterator(&b, &a)\n\tmerged := make([]attribute.KeyValue, 0, a.Len()+b.Len())\n\tfor iter.Next() {\n\t\tmerged = append(merged, iter.Attribute())\n\t}\n\treturn attribute.NewSet(merged...)\n}\n\n// WithInstrumentationAttributes adds the instrumentation attributes.\n//\n// This is equivalent to calling [WithInstrumentationAttributeSet] with an\n// [attribute.Set] created from a clone of the passed attributes.\n// [WithInstrumentationAttributeSet] is recommended for more control.\n//\n// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet]\n// options are passed, the attributes will be merged together in the order\n// they are passed. Attributes with duplicate keys will use the last value passed.\nfunc WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption {\n\tset := attribute.NewSet(slices.Clone(attr)...)\n\treturn WithInstrumentationAttributeSet(set)\n}\n\n// WithInstrumentationAttributeSet adds the instrumentation attributes.\n//\n// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet]\n// options are passed, the attributes will be merged together in the order\n// they are passed. Attributes with duplicate keys will use the last value passed.\nfunc WithInstrumentationAttributeSet(set attribute.Set) TracerOption {\n\tif set.Len() == 0 {\n\t\treturn tracerOptionFunc(func(config TracerConfig) TracerConfig {\n\t\t\treturn config\n\t\t})\n\t}\n\n\treturn tracerOptionFunc(func(config TracerConfig) TracerConfig {\n\t\tif config.attrs.Len() == 0 {\n\t\t\tconfig.attrs = set\n\t\t} else {\n\t\t\tconfig.attrs = mergeSets(config.attrs, set)\n\t\t}\n\t\treturn config\n\t})\n}\n\n// WithSchemaURL sets the schema URL for the Tracer.\nfunc WithSchemaURL(schemaURL string) TracerOption {\n\treturn tracerOptionFunc(func(cfg TracerConfig) TracerConfig {\n\t\tcfg.schemaURL = schemaURL\n\t\treturn cfg\n\t})\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/context.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport \"context\"\n\ntype traceContextKeyType int\n\nconst currentSpanKey traceContextKeyType = iota\n\n// ContextWithSpan returns a copy of parent with span set as the current Span.\nfunc ContextWithSpan(parent context.Context, span Span) context.Context {\n\treturn context.WithValue(parent, currentSpanKey, span)\n}\n\n// ContextWithSpanContext returns a copy of parent with sc as the current\n// Span. The Span implementation that wraps sc is non-recording and performs\n// no operations other than to return sc as the SpanContext from the\n// SpanContext method.\nfunc ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context {\n\treturn ContextWithSpan(parent, nonRecordingSpan{sc: sc})\n}\n\n// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicitly\n// as a remote SpanContext and as the current Span. The Span implementation\n// that wraps rsc is non-recording and performs no operations other than to\n// return rsc as the SpanContext from the SpanContext method.\nfunc ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context {\n\treturn ContextWithSpanContext(parent, rsc.WithRemote(true))\n}\n\n// SpanFromContext returns the current Span from ctx.\n//\n// If no Span is currently set in ctx an implementation of a Span that\n// performs no operations is returned.\nfunc SpanFromContext(ctx context.Context) Span {\n\tif ctx == nil {\n\t\treturn noopSpanInstance\n\t}\n\tif span, ok := ctx.Value(currentSpanKey).(Span); ok {\n\t\treturn span\n\t}\n\treturn noopSpanInstance\n}\n\n// SpanContextFromContext returns the current Span's SpanContext.\nfunc SpanContextFromContext(ctx context.Context) SpanContext {\n\treturn SpanFromContext(ctx).SpanContext()\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage trace provides an implementation of the tracing part of the\nOpenTelemetry API.\n\nTo participate in distributed traces a Span needs to be created for the\noperation being performed as part of a traced workflow. In its simplest form:\n\n\tvar tracer trace.Tracer\n\n\tfunc init() {\n\t\ttracer = otel.Tracer(\"instrumentation/package/name\")\n\t}\n\n\tfunc operation(ctx context.Context) {\n\t\tvar span trace.Span\n\t\tctx, span = tracer.Start(ctx, \"operation\")\n\t\tdefer span.End()\n\t\t// ...\n\t}\n\nA Tracer is unique to the instrumentation and is used to create Spans.\nInstrumentation should be designed to accept a TracerProvider from which it\ncan create its own unique Tracer. Alternatively, the registered global\nTracerProvider from the go.opentelemetry.io/otel package can be used as\na default.\n\n\tconst (\n\t\tname    = \"instrumentation/package/name\"\n\t\tversion = \"0.1.0\"\n\t)\n\n\ttype Instrumentation struct {\n\t\ttracer trace.Tracer\n\t}\n\n\tfunc NewInstrumentation(tp trace.TracerProvider) *Instrumentation {\n\t\tif tp == nil {\n\t\t\ttp = otel.TracerProvider()\n\t\t}\n\t\treturn &Instrumentation{\n\t\t\ttracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)),\n\t\t}\n\t}\n\n\tfunc operation(ctx context.Context, inst *Instrumentation) {\n\t\tvar span trace.Span\n\t\tctx, span = inst.tracer.Start(ctx, \"operation\")\n\t\tdefer span.End()\n\t\t// ...\n\t}\n\n# API Implementations\n\nThis package does not conform to the standard Go versioning policy; all of its\ninterfaces may have methods added to them without a package major version bump.\nThis non-standard API evolution could surprise an uninformed implementation\nauthor. They could unknowingly build their implementation in a way that would\nresult in a runtime panic for their users that update to the new API.\n\nThe API is designed to help inform an instrumentation author about this\nnon-standard API evolution. It requires them to choose a default behavior for\nunimplemented interface methods. There are three behavior choices they can\nmake:\n\n  - Compilation failure\n  - Panic\n  - Default to another implementation\n\nAll interfaces in this API embed a corresponding interface from\n[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default\nbehavior of their implementations to be a compilation failure, signaling to\ntheir users they need to update to the latest version of that implementation,\nthey need to embed the corresponding interface from\n[go.opentelemetry.io/otel/trace/embedded] in their implementation. For\nexample,\n\n\timport \"go.opentelemetry.io/otel/trace/embedded\"\n\n\ttype TracerProvider struct {\n\t\tembedded.TracerProvider\n\t\t// ...\n\t}\n\nIf an author wants the default behavior of their implementations to panic, they\ncan embed the API interface directly.\n\n\timport \"go.opentelemetry.io/otel/trace\"\n\n\ttype TracerProvider struct {\n\t\ttrace.TracerProvider\n\t\t// ...\n\t}\n\nThis option is not recommended. It will lead to publishing packages that\ncontain runtime panics when users update to newer versions of\n[go.opentelemetry.io/otel/trace], which may be done with a transitive\ndependency.\n\nFinally, an author can embed another implementation in theirs. The embedded\nimplementation will be used for methods not defined by the author. For example,\nan author who wants to default to silently dropping the call can use\n[go.opentelemetry.io/otel/trace/noop]:\n\n\timport \"go.opentelemetry.io/otel/trace/noop\"\n\n\ttype TracerProvider struct {\n\t\tnoop.TracerProvider\n\t\t// ...\n\t}\n\nIt is strongly recommended that authors only embed\n[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior.\nThat implementation is the only one OpenTelemetry authors can guarantee will\nfully implement all the API interfaces when a user updates their API.\n*/\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/embedded/README.md",
    "content": "# Trace Embedded\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package embedded provides interfaces embedded within the [OpenTelemetry\n// trace API].\n//\n// Implementers of the [OpenTelemetry trace API] can embed the relevant type\n// from this package into their implementation directly. Doing so will result\n// in a compilation error for users when the [OpenTelemetry trace API] is\n// extended (which is something that can happen without a major version bump of\n// the API package).\n//\n// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace\npackage embedded // import \"go.opentelemetry.io/otel/trace/embedded\"\n\n// TracerProvider is embedded in\n// [go.opentelemetry.io/otel/trace.TracerProvider].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to\n// experience a compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider]\n// interface is extended (which is something that can happen without a major\n// version bump of the API package).\ntype TracerProvider interface{ tracerProvider() }\n\n// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a\n// compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface\n// is extended (which is something that can happen without a major version bump\n// of the API package).\ntype Tracer interface{ tracer() }\n\n// Span is embedded in [go.opentelemetry.io/otel/trace.Span].\n//\n// Embed this interface in your implementation of the\n// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a\n// compilation error, signaling they need to update to your latest\n// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is\n// extended (which is something that can happen without a major version bump of\n// the API package).\ntype Span interface{ span() }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/hex.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nconst (\n\t// hexLU is a hex lookup table of the 16 lowercase hex digits.\n\t// The character values of the string are indexed at the equivalent\n\t// hexadecimal value they represent. This table efficiently encodes byte data\n\t// into a string representation of hexadecimal.\n\thexLU = \"0123456789abcdef\"\n\n\t// hexRev is a reverse hex lookup table for lowercase hex digits.\n\t// The table is efficiently decodes a hexadecimal string into bytes.\n\t// Valid hexadecimal characters are indexed at their respective values. All\n\t// other invalid ASCII characters are represented with '\\xff'.\n\t//\n\t// The '\\xff' character is used as invalid because no valid character has\n\t// the upper 4 bits set. Meaning, an efficient validation can be performed\n\t// over multiple character parsing by checking these bits remain zero.\n\thexRev = \"\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\" +\n\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\"\n)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\n// Attr is a key-value pair.\ntype Attr struct {\n\tKey   string `json:\"key,omitempty\"`\n\tValue Value  `json:\"value,omitempty\"`\n}\n\n// String returns an Attr for a string value.\nfunc String(key, value string) Attr {\n\treturn Attr{key, StringValue(value)}\n}\n\n// Int64 returns an Attr for an int64 value.\nfunc Int64(key string, value int64) Attr {\n\treturn Attr{key, Int64Value(value)}\n}\n\n// Int returns an Attr for an int value.\nfunc Int(key string, value int) Attr {\n\treturn Int64(key, int64(value))\n}\n\n// Float64 returns an Attr for a float64 value.\nfunc Float64(key string, value float64) Attr {\n\treturn Attr{key, Float64Value(value)}\n}\n\n// Bool returns an Attr for a bool value.\nfunc Bool(key string, value bool) Attr {\n\treturn Attr{key, BoolValue(value)}\n}\n\n// Bytes returns an Attr for a []byte value.\n// The passed slice must not be changed after it is passed.\nfunc Bytes(key string, value []byte) Attr {\n\treturn Attr{key, BytesValue(value)}\n}\n\n// Slice returns an Attr for a []Value value.\n// The passed slice must not be changed after it is passed.\nfunc Slice(key string, value ...Value) Attr {\n\treturn Attr{key, SliceValue(value...)}\n}\n\n// Map returns an Attr for a map value.\n// The passed slice must not be changed after it is passed.\nfunc Map(key string, value ...Attr) Attr {\n\treturn Attr{key, MapValue(value...)}\n}\n\n// Equal reports whether a is equal to b.\nfunc (a Attr) Equal(b Attr) bool {\n\treturn a.Key == b.Key && a.Value.Equal(b.Value)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/*\nPackage telemetry provides a lightweight representations of OpenTelemetry\ntelemetry that is compatible with the OTLP JSON protobuf encoding.\n*/\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n)\n\nconst (\n\ttraceIDSize = 16\n\tspanIDSize  = 8\n)\n\n// TraceID is a custom data type that is used for all trace IDs.\ntype TraceID [traceIDSize]byte\n\n// String returns the hex string representation form of a TraceID.\nfunc (tid TraceID) String() string {\n\treturn hex.EncodeToString(tid[:])\n}\n\n// IsEmpty reports whether the TraceID contains only zero bytes.\nfunc (tid TraceID) IsEmpty() bool {\n\treturn tid == [traceIDSize]byte{}\n}\n\n// MarshalJSON converts the trace ID into a hex string enclosed in quotes.\nfunc (tid TraceID) MarshalJSON() ([]byte, error) {\n\tif tid.IsEmpty() {\n\t\treturn []byte(`\"\"`), nil\n\t}\n\treturn marshalJSON(tid[:])\n}\n\n// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in\n// quotes.\nfunc (tid *TraceID) UnmarshalJSON(data []byte) error {\n\t*tid = [traceIDSize]byte{}\n\treturn unmarshalJSON(tid[:], data)\n}\n\n// SpanID is a custom data type that is used for all span IDs.\ntype SpanID [spanIDSize]byte\n\n// String returns the hex string representation form of a SpanID.\nfunc (sid SpanID) String() string {\n\treturn hex.EncodeToString(sid[:])\n}\n\n// IsEmpty reports whether the SpanID contains only zero bytes.\nfunc (sid SpanID) IsEmpty() bool {\n\treturn sid == [spanIDSize]byte{}\n}\n\n// MarshalJSON converts span ID into a hex string enclosed in quotes.\nfunc (sid SpanID) MarshalJSON() ([]byte, error) {\n\tif sid.IsEmpty() {\n\t\treturn []byte(`\"\"`), nil\n\t}\n\treturn marshalJSON(sid[:])\n}\n\n// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes.\nfunc (sid *SpanID) UnmarshalJSON(data []byte) error {\n\t*sid = [spanIDSize]byte{}\n\treturn unmarshalJSON(sid[:], data)\n}\n\n// marshalJSON converts id into a hex string enclosed in quotes.\nfunc marshalJSON(id []byte) ([]byte, error) {\n\t// Plus 2 quote chars at the start and end.\n\thexLen := hex.EncodedLen(len(id)) + 2\n\n\tb := make([]byte, hexLen)\n\thex.Encode(b[1:hexLen-1], id)\n\tb[0], b[hexLen-1] = '\"', '\"'\n\n\treturn b, nil\n}\n\n// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes.\nfunc unmarshalJSON(dst, src []byte) error {\n\tif l := len(src); l >= 2 && src[0] == '\"' && src[l-1] == '\"' {\n\t\tsrc = src[1 : l-1]\n\t}\n\tnLen := len(src)\n\tif nLen == 0 {\n\t\treturn nil\n\t}\n\n\tif len(dst) != hex.DecodedLen(nLen) {\n\t\treturn errors.New(\"invalid length for ID\")\n\t}\n\n\t_, err := hex.Decode(dst, src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot unmarshal ID from string '%s': %w\", string(src), err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"encoding/json\"\n\t\"strconv\"\n)\n\n// protoInt64 represents the protobuf encoding of integers which can be either\n// strings or integers.\ntype protoInt64 int64\n\n// Int64 returns the protoInt64 as an int64.\nfunc (i *protoInt64) Int64() int64 { return int64(*i) }\n\n// UnmarshalJSON decodes both strings and integers.\nfunc (i *protoInt64) UnmarshalJSON(data []byte) error {\n\tif data[0] == '\"' {\n\t\tvar str string\n\t\tif err := json.Unmarshal(data, &str); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparsedInt, err := strconv.ParseInt(str, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoInt64(parsedInt)\n\t} else {\n\t\tvar parsedInt int64\n\t\tif err := json.Unmarshal(data, &parsedInt); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoInt64(parsedInt)\n\t}\n\treturn nil\n}\n\n// protoUint64 represents the protobuf encoding of integers which can be either\n// strings or integers.\ntype protoUint64 uint64\n\n// Int64 returns the protoUint64 as a uint64.\nfunc (i *protoUint64) Uint64() uint64 { return uint64(*i) }\n\n// UnmarshalJSON decodes both strings and integers.\nfunc (i *protoUint64) UnmarshalJSON(data []byte) error {\n\tif data[0] == '\"' {\n\t\tvar str string\n\t\tif err := json.Unmarshal(data, &str); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparsedUint, err := strconv.ParseUint(str, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoUint64(parsedUint)\n\t} else {\n\t\tvar parsedUint uint64\n\t\tif err := json.Unmarshal(data, &parsedUint); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*i = protoUint64(parsedUint)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Resource information.\ntype Resource struct {\n\t// Attrs are the set of attributes that describe the resource. Attribute\n\t// keys MUST be unique (it is not allowed to have more than one attribute\n\t// with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// DroppedAttrs is the number of dropped attributes. If the value\n\t// is 0, then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.\nfunc (r *Resource) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Resource type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Resource field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&r.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&r.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Scope is the identifying values of the instrumentation scope.\ntype Scope struct {\n\tName         string `json:\"name,omitempty\"`\n\tVersion      string `json:\"version,omitempty\"`\n\tAttrs        []Attr `json:\"attributes,omitempty\"`\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.\nfunc (s *Scope) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Scope type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Scope field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&s.Name)\n\t\tcase \"version\":\n\t\t\terr = decoder.Decode(&s.Version)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&s.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&s.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"time\"\n)\n\n// A Span represents a single operation performed by a single component of the\n// system.\ntype Span struct {\n\t// A unique identifier for a trace. All spans from the same trace share\n\t// the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\n\t// of length other than 16 bytes is considered invalid (empty string in OTLP/JSON\n\t// is zero-length and thus is also invalid).\n\t//\n\t// This field is required.\n\tTraceID TraceID `json:\"traceId,omitempty\"`\n\t// A unique identifier for a span within a trace, assigned when the span\n\t// is created. The ID is an 8-byte array. An ID with all zeroes OR of length\n\t// other than 8 bytes is considered invalid (empty string in OTLP/JSON\n\t// is zero-length and thus is also invalid).\n\t//\n\t// This field is required.\n\tSpanID SpanID `json:\"spanId,omitempty\"`\n\t// trace_state conveys information about request position in multiple distributed tracing graphs.\n\t// It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header\n\t// See also https://github.com/w3c/distributed-tracing for more details about this field.\n\tTraceState string `json:\"traceState,omitempty\"`\n\t// The `span_id` of this span's parent span. If this is a root span, then this\n\t// field must be empty. The ID is an 8-byte array.\n\tParentSpanID SpanID `json:\"parentSpanId,omitempty\"`\n\t// Flags, a bit field.\n\t//\n\t// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n\t// Context specification. To read the 8-bit W3C trace flag, use\n\t// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n\t//\n\t// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n\t//\n\t// Bits 8 and 9 represent the 3 states of whether a span's parent\n\t// is remote. The states are (unknown, is not remote, is remote).\n\t// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n\t// To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n\t//\n\t// When creating span messages, if the message is logically forwarded from another source\n\t// with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD\n\t// be copied as-is. If creating from a source that does not have an equivalent flags field\n\t// (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST\n\t// be set to zero.\n\t// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n\t//\n\t// [Optional].\n\tFlags uint32 `json:\"flags,omitempty\"`\n\t// A description of the span's operation.\n\t//\n\t// For example, the name can be a qualified method name or a file name\n\t// and a line number where the operation is called. A best practice is to use\n\t// the same display name at the same call point in an application.\n\t// This makes it easier to correlate spans in different traces.\n\t//\n\t// This field is semantically required to be set to non-empty string.\n\t// Empty value is equivalent to an unknown span name.\n\t//\n\t// This field is required.\n\tName string `json:\"name\"`\n\t// Distinguishes between spans generated in a particular context. For example,\n\t// two spans with the same name may be distinguished using `CLIENT` (caller)\n\t// and `SERVER` (callee) to identify queueing latency associated with the span.\n\tKind SpanKind `json:\"kind,omitempty\"`\n\t// start_time_unix_nano is the start time of the span. On the client side, this is the time\n\t// kept by the local machine where the span execution starts. On the server side, this\n\t// is the time when the server's application handler starts running.\n\t// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\t//\n\t// This field is semantically required and it is expected that end_time >= start_time.\n\tStartTime time.Time `json:\"startTimeUnixNano,omitempty\"`\n\t// end_time_unix_nano is the end time of the span. On the client side, this is the time\n\t// kept by the local machine where the span execution ends. On the server side, this\n\t// is the time when the server application handler stops running.\n\t// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.\n\t//\n\t// This field is semantically required and it is expected that end_time >= start_time.\n\tEndTime time.Time `json:\"endTimeUnixNano,omitempty\"`\n\t// attributes is a collection of key/value pairs. Note, global attributes\n\t// like server name can be set using the resource API. Examples of attributes:\n\t//\n\t//     \"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n\t//     \"/http/server_latency\": 300\n\t//     \"example.com/myattribute\": true\n\t//     \"example.com/score\": 10.239\n\t//\n\t// The OpenTelemetry API specification further restricts the allowed value types:\n\t// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of attributes that were discarded. Attributes\n\t// can be discarded because their keys are too long or because there are too many\n\t// attributes. If this value is 0, then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n\t// events is a collection of Event items.\n\tEvents []*SpanEvent `json:\"events,omitempty\"`\n\t// dropped_events_count is the number of dropped events. If the value is 0, then no\n\t// events were dropped.\n\tDroppedEvents uint32 `json:\"droppedEventsCount,omitempty\"`\n\t// links is a collection of Links, which are references from this span to a span\n\t// in the same or different trace.\n\tLinks []*SpanLink `json:\"links,omitempty\"`\n\t// dropped_links_count is the number of dropped links after the maximum size was\n\t// enforced. If this value is 0, then no links were dropped.\n\tDroppedLinks uint32 `json:\"droppedLinksCount,omitempty\"`\n\t// An optional final status for this span. Semantically when Status isn't set, it means\n\t// span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).\n\tStatus *Status `json:\"status,omitempty\"`\n}\n\n// MarshalJSON encodes s into OTLP formatted JSON.\nfunc (s Span) MarshalJSON() ([]byte, error) {\n\tstartT := s.StartTime.UnixNano()\n\tif s.StartTime.IsZero() || startT < 0 {\n\t\tstartT = 0\n\t}\n\n\tendT := s.EndTime.UnixNano()\n\tif s.EndTime.IsZero() || endT < 0 {\n\t\tendT = 0\n\t}\n\n\t// Override non-empty default SpanID marshal and omitempty.\n\tvar parentSpanId string\n\tif !s.ParentSpanID.IsEmpty() {\n\t\tb := make([]byte, hex.EncodedLen(spanIDSize))\n\t\thex.Encode(b, s.ParentSpanID[:])\n\t\tparentSpanId = string(b)\n\t}\n\n\ttype Alias Span\n\treturn json.Marshal(struct {\n\t\tAlias\n\t\tParentSpanID string `json:\"parentSpanId,omitempty\"`\n\t\tStartTime    uint64 `json:\"startTimeUnixNano,omitempty\"`\n\t\tEndTime      uint64 `json:\"endTimeUnixNano,omitempty\"`\n\t}{\n\t\tAlias:        Alias(s),\n\t\tParentSpanID: parentSpanId,\n\t\tStartTime:    uint64(startT), // nolint:gosec  // >0 checked above.\n\t\tEndTime:      uint64(endT),   // nolint:gosec  // >0 checked above.\n\t})\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into s.\nfunc (s *Span) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Span type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Span field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"traceId\", \"trace_id\":\n\t\t\terr = decoder.Decode(&s.TraceID)\n\t\tcase \"spanId\", \"span_id\":\n\t\t\terr = decoder.Decode(&s.SpanID)\n\t\tcase \"traceState\", \"trace_state\":\n\t\t\terr = decoder.Decode(&s.TraceState)\n\t\tcase \"parentSpanId\", \"parent_span_id\":\n\t\t\terr = decoder.Decode(&s.ParentSpanID)\n\t\tcase \"flags\":\n\t\t\terr = decoder.Decode(&s.Flags)\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&s.Name)\n\t\tcase \"kind\":\n\t\t\terr = decoder.Decode(&s.Kind)\n\t\tcase \"startTimeUnixNano\", \"start_time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec  // Overflow checked.\n\t\t\ts.StartTime = time.Unix(0, v)\n\t\tcase \"endTimeUnixNano\", \"end_time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec  // Overflow checked.\n\t\t\ts.EndTime = time.Unix(0, v)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&s.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&s.DroppedAttrs)\n\t\tcase \"events\":\n\t\t\terr = decoder.Decode(&s.Events)\n\t\tcase \"droppedEventsCount\", \"dropped_events_count\":\n\t\t\terr = decoder.Decode(&s.DroppedEvents)\n\t\tcase \"links\":\n\t\t\terr = decoder.Decode(&s.Links)\n\t\tcase \"droppedLinksCount\", \"dropped_links_count\":\n\t\t\terr = decoder.Decode(&s.DroppedLinks)\n\t\tcase \"status\":\n\t\t\terr = decoder.Decode(&s.Status)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SpanFlags represents constants used to interpret the\n// Span.flags field, which is protobuf 'fixed32' type and is to\n// be used as bit-fields. Each non-zero value defined in this enum is\n// a bit-mask.  To extract the bit-field, for example, use an\n// expression like:\n//\n//\t(span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)\n//\n// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n//\n// Note that Span flags were introduced in version 1.1 of the\n// OpenTelemetry protocol.  Older Span producers do not set this\n// field, consequently consumers should not rely on the absence of a\n// particular flag bit to indicate the presence of a particular feature.\ntype SpanFlags int32\n\nconst (\n\t// SpanFlagsTraceFlagsMask is a mask for trace-flags.\n\t//\n\t// Bits 0-7 are used for trace flags.\n\tSpanFlagsTraceFlagsMask SpanFlags = 255\n\t// SpanFlagsContextHasIsRemoteMask is a mask for HAS_IS_REMOTE status.\n\t//\n\t// Bits 8 and 9 are used to indicate that the parent span or link span is\n\t// remote. Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.\n\tSpanFlagsContextHasIsRemoteMask SpanFlags = 256\n\t// SpanFlagsContextIsRemoteMask is a mask for IS_REMOTE status.\n\t//\n\t// Bits 8 and 9 are used to indicate that the parent span or link span is\n\t// remote. Bit 9 (`IS_REMOTE`) indicates whether the span or link is\n\t// remote.\n\tSpanFlagsContextIsRemoteMask SpanFlags = 512\n)\n\n// SpanKind is the type of span. Can be used to specify additional relationships between spans\n// in addition to a parent/child relationship.\ntype SpanKind int32\n\nconst (\n\t// SpanKindInternal indicates that the span represents an internal\n\t// operation within an application, as opposed to an operation happening at\n\t// the boundaries.\n\tSpanKindInternal SpanKind = 1\n\t// SpanKindServer indicates that the span covers server-side handling of an\n\t// RPC or other remote network request.\n\tSpanKindServer SpanKind = 2\n\t// SpanKindClient indicates that the span describes a request to some\n\t// remote service.\n\tSpanKindClient SpanKind = 3\n\t// SpanKindProducer indicates that the span describes a producer sending a\n\t// message to a broker. Unlike SpanKindClient and SpanKindServer, there is\n\t// often no direct critical path latency relationship between producer and\n\t// consumer spans. A SpanKindProducer span ends when the message was\n\t// accepted by the broker while the logical processing of the message might\n\t// span a much longer time.\n\tSpanKindProducer SpanKind = 4\n\t// SpanKindConsumer indicates that the span describes a consumer receiving\n\t// a message from a broker. Like SpanKindProducer, there is often no direct\n\t// critical path latency relationship between producer and consumer spans.\n\tSpanKindConsumer SpanKind = 5\n)\n\n// SpanEvent is a time-stamped annotation of the span, consisting of\n// user-supplied text description and key-value pairs.\ntype SpanEvent struct {\n\t// time_unix_nano is the time the event occurred.\n\tTime time.Time `json:\"timeUnixNano,omitempty\"`\n\t// name of the event.\n\t// This field is semantically required to be set to non-empty string.\n\tName string `json:\"name,omitempty\"`\n\t// attributes is a collection of attribute key/value pairs on the event.\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of dropped attributes. If the value is 0,\n\t// then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n}\n\n// MarshalJSON encodes e into OTLP formatted JSON.\nfunc (e SpanEvent) MarshalJSON() ([]byte, error) {\n\tt := e.Time.UnixNano()\n\tif e.Time.IsZero() || t < 0 {\n\t\tt = 0\n\t}\n\n\ttype Alias SpanEvent\n\treturn json.Marshal(struct {\n\t\tAlias\n\t\tTime uint64 `json:\"timeUnixNano,omitempty\"`\n\t}{\n\t\tAlias: Alias(e),\n\t\tTime:  uint64(t), // nolint: gosec  // >0 checked above\n\t})\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into se.\nfunc (se *SpanEvent) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid SpanEvent type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid SpanEvent field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"timeUnixNano\", \"time_unix_nano\":\n\t\t\tvar val protoUint64\n\t\t\terr = decoder.Decode(&val)\n\t\t\tv := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec  // Overflow checked.\n\t\t\tse.Time = time.Unix(0, v)\n\t\tcase \"name\":\n\t\t\terr = decoder.Decode(&se.Name)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&se.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&se.DroppedAttrs)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SpanLink is a reference from the current span to another span in the same\n// trace or in a different trace. For example, this can be used in batching\n// operations, where a single batch handler processes multiple requests from\n// different traces or when the handler receives a request from a different\n// project.\ntype SpanLink struct {\n\t// A unique identifier of a trace that this linked span is part of. The ID is a\n\t// 16-byte array.\n\tTraceID TraceID `json:\"traceId,omitempty\"`\n\t// A unique identifier for the linked span. The ID is an 8-byte array.\n\tSpanID SpanID `json:\"spanId,omitempty\"`\n\t// The trace_state associated with the link.\n\tTraceState string `json:\"traceState,omitempty\"`\n\t// attributes is a collection of attribute key/value pairs on the link.\n\t// Attribute keys MUST be unique (it is not allowed to have more than one\n\t// attribute with the same key).\n\tAttrs []Attr `json:\"attributes,omitempty\"`\n\t// dropped_attributes_count is the number of dropped attributes. If the value is 0,\n\t// then no attributes were dropped.\n\tDroppedAttrs uint32 `json:\"droppedAttributesCount,omitempty\"`\n\t// Flags, a bit field.\n\t//\n\t// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace\n\t// Context specification. To read the 8-bit W3C trace flag, use\n\t// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.\n\t//\n\t// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.\n\t//\n\t// Bits 8 and 9 represent the 3 states of whether the link is remote.\n\t// The states are (unknown, is not remote, is remote).\n\t// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.\n\t// To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.\n\t//\n\t// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.\n\t// When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.\n\t//\n\t// [Optional].\n\tFlags uint32 `json:\"flags,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into sl.\nfunc (sl *SpanLink) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid SpanLink type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid SpanLink field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"traceId\", \"trace_id\":\n\t\t\terr = decoder.Decode(&sl.TraceID)\n\t\tcase \"spanId\", \"span_id\":\n\t\t\terr = decoder.Decode(&sl.SpanID)\n\t\tcase \"traceState\", \"trace_state\":\n\t\t\terr = decoder.Decode(&sl.TraceState)\n\t\tcase \"attributes\":\n\t\t\terr = decoder.Decode(&sl.Attrs)\n\t\tcase \"droppedAttributesCount\", \"dropped_attributes_count\":\n\t\t\terr = decoder.Decode(&sl.DroppedAttrs)\n\t\tcase \"flags\":\n\t\t\terr = decoder.Decode(&sl.Flags)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\n// StatusCode is the status of a Span.\n//\n// For the semantics of status codes see\n// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status\ntype StatusCode int32\n\nconst (\n\t// StatusCodeUnset is the default status.\n\tStatusCodeUnset StatusCode = 0\n\t// StatusCodeOK is used when the Span has been validated by an Application\n\t// developer or Operator to have completed successfully.\n\tStatusCodeOK StatusCode = 1\n\t// StatusCodeError is used when the Span contains an error.\n\tStatusCodeError StatusCode = 2\n)\n\nvar statusCodeStrings = []string{\n\t\"Unset\",\n\t\"OK\",\n\t\"Error\",\n}\n\nfunc (s StatusCode) String() string {\n\tif s >= 0 && int(s) < len(statusCodeStrings) {\n\t\treturn statusCodeStrings[s]\n\t}\n\treturn \"<unknown telemetry.StatusCode>\"\n}\n\n// Status defines a logical error model that is suitable for different\n// programming environments, including REST APIs and RPC APIs.\ntype Status struct {\n\t// A developer-facing human readable error message.\n\tMessage string `json:\"message,omitempty\"`\n\t// The status code.\n\tCode StatusCode `json:\"code,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n)\n\n// Traces represents the traces data that can be stored in a persistent storage,\n// OR can be embedded by other protocols that transfer OTLP traces data but do\n// not implement the OTLP protocol.\n//\n// The main difference between this message and collector protocol is that\n// in this message there will not be any \"control\" or \"metadata\" specific to\n// OTLP protocol.\n//\n// When new fields are added into this message, the OTLP request MUST be updated\n// as well.\ntype Traces struct {\n\t// An array of ResourceSpans.\n\t// For data coming from a single resource this array will typically contain\n\t// one element. Intermediary nodes that receive data from multiple origins\n\t// typically batch the data before forwarding further and in that case this\n\t// array will contain multiple elements.\n\tResourceSpans []*ResourceSpans `json:\"resourceSpans,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into td.\nfunc (td *Traces) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid TracesData type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid TracesData field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"resourceSpans\", \"resource_spans\":\n\t\t\terr = decoder.Decode(&td.ResourceSpans)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ResourceSpans is a collection of ScopeSpans from a Resource.\ntype ResourceSpans struct {\n\t// The resource for the spans in this message.\n\t// If this field is not set then no resource info is known.\n\tResource Resource `json:\"resource\"`\n\t// A list of ScopeSpans that originate from a resource.\n\tScopeSpans []*ScopeSpans `json:\"scopeSpans,omitempty\"`\n\t// This schema_url applies to the data in the \"resource\" field. It does not apply\n\t// to the data in the \"scope_spans\" field which have their own schema_url field.\n\tSchemaURL string `json:\"schemaUrl,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into rs.\nfunc (rs *ResourceSpans) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid ResourceSpans type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid ResourceSpans field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"resource\":\n\t\t\terr = decoder.Decode(&rs.Resource)\n\t\tcase \"scopeSpans\", \"scope_spans\":\n\t\t\terr = decoder.Decode(&rs.ScopeSpans)\n\t\tcase \"schemaUrl\", \"schema_url\":\n\t\t\terr = decoder.Decode(&rs.SchemaURL)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ScopeSpans is a collection of Spans produced by an InstrumentationScope.\ntype ScopeSpans struct {\n\t// The instrumentation scope information for the spans in this message.\n\t// Semantically when InstrumentationScope isn't set, it is equivalent with\n\t// an empty instrumentation scope name (unknown).\n\tScope *Scope `json:\"scope\"`\n\t// A list of Spans that originate from an instrumentation scope.\n\tSpans []*Span `json:\"spans,omitempty\"`\n\t// The Schema URL, if known. This is the identifier of the Schema that the span data\n\t// is recorded in. To learn more about Schema URL see\n\t// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url\n\t// This schema_url applies to all spans and span events in the \"spans\" field.\n\tSchemaURL string `json:\"schemaUrl,omitempty\"`\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into ss.\nfunc (ss *ScopeSpans) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid ScopeSpans type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid ScopeSpans field: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"scope\":\n\t\t\terr = decoder.Decode(&ss.Scope)\n\t\tcase \"spans\":\n\t\t\terr = decoder.Decode(&ss.Spans)\n\t\tcase \"schemaUrl\", \"schema_url\":\n\t\t\terr = decoder.Decode(&ss.SchemaURL)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage telemetry // import \"go.opentelemetry.io/otel/trace/internal/telemetry\"\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"slices\"\n\t\"strconv\"\n\t\"unsafe\"\n)\n\n// A Value represents a structured value.\n// A zero value is valid and represents an empty value.\ntype Value struct {\n\t// Ensure forward compatibility by explicitly making this not comparable.\n\tnoCmp [0]func() //nolint: unused  // This is indeed used.\n\n\t// num holds the value for Int64, Float64, and Bool. It holds the length\n\t// for String, Bytes, Slice, Map.\n\tnum uint64\n\t// any holds either the KindBool, KindInt64, KindFloat64, stringptr,\n\t// bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64\n\t// then the value of Value is in num as described above. Otherwise, it\n\t// contains the value wrapped in the appropriate type.\n\tany any\n}\n\ntype (\n\t// sliceptr represents a value in Value.any for KindString Values.\n\tstringptr *byte\n\t// bytesptr represents a value in Value.any for KindBytes Values.\n\tbytesptr *byte\n\t// sliceptr represents a value in Value.any for KindSlice Values.\n\tsliceptr *Value\n\t// mapptr represents a value in Value.any for KindMap Values.\n\tmapptr *Attr\n)\n\n// ValueKind is the kind of a [Value].\ntype ValueKind int\n\n// ValueKind values.\nconst (\n\tValueKindEmpty ValueKind = iota\n\tValueKindBool\n\tValueKindFloat64\n\tValueKindInt64\n\tValueKindString\n\tValueKindBytes\n\tValueKindSlice\n\tValueKindMap\n)\n\nvar valueKindStrings = []string{\n\t\"Empty\",\n\t\"Bool\",\n\t\"Float64\",\n\t\"Int64\",\n\t\"String\",\n\t\"Bytes\",\n\t\"Slice\",\n\t\"Map\",\n}\n\nfunc (k ValueKind) String() string {\n\tif k >= 0 && int(k) < len(valueKindStrings) {\n\t\treturn valueKindStrings[k]\n\t}\n\treturn \"<unknown telemetry.ValueKind>\"\n}\n\n// StringValue returns a new [Value] for a string.\nfunc StringValue(v string) Value {\n\treturn Value{\n\t\tnum: uint64(len(v)),\n\t\tany: stringptr(unsafe.StringData(v)),\n\t}\n}\n\n// IntValue returns a [Value] for an int.\nfunc IntValue(v int) Value { return Int64Value(int64(v)) }\n\n// Int64Value returns a [Value] for an int64.\nfunc Int64Value(v int64) Value {\n\treturn Value{\n\t\tnum: uint64(v), // nolint: gosec  // Store raw bytes.\n\t\tany: ValueKindInt64,\n\t}\n}\n\n// Float64Value returns a [Value] for a float64.\nfunc Float64Value(v float64) Value {\n\treturn Value{num: math.Float64bits(v), any: ValueKindFloat64}\n}\n\n// BoolValue returns a [Value] for a bool.\nfunc BoolValue(v bool) Value { //nolint:revive // Not a control flag.\n\tvar n uint64\n\tif v {\n\t\tn = 1\n\t}\n\treturn Value{num: n, any: ValueKindBool}\n}\n\n// BytesValue returns a [Value] for a byte slice. The passed slice must not be\n// changed after it is passed.\nfunc BytesValue(v []byte) Value {\n\treturn Value{\n\t\tnum: uint64(len(v)),\n\t\tany: bytesptr(unsafe.SliceData(v)),\n\t}\n}\n\n// SliceValue returns a [Value] for a slice of [Value]. The passed slice must\n// not be changed after it is passed.\nfunc SliceValue(vs ...Value) Value {\n\treturn Value{\n\t\tnum: uint64(len(vs)),\n\t\tany: sliceptr(unsafe.SliceData(vs)),\n\t}\n}\n\n// MapValue returns a new [Value] for a slice of key-value pairs. The passed\n// slice must not be changed after it is passed.\nfunc MapValue(kvs ...Attr) Value {\n\treturn Value{\n\t\tnum: uint64(len(kvs)),\n\t\tany: mapptr(unsafe.SliceData(kvs)),\n\t}\n}\n\n// AsString returns the value held by v as a string.\nfunc (v Value) AsString() string {\n\tif sp, ok := v.any.(stringptr); ok {\n\t\treturn unsafe.String(sp, v.num)\n\t}\n\t// TODO: error handle\n\treturn \"\"\n}\n\n// asString returns the value held by v as a string. It will panic if the Value\n// is not KindString.\nfunc (v Value) asString() string {\n\treturn unsafe.String(v.any.(stringptr), v.num)\n}\n\n// AsInt64 returns the value held by v as an int64.\nfunc (v Value) AsInt64() int64 {\n\tif v.Kind() != ValueKindInt64 {\n\t\t// TODO: error handle\n\t\treturn 0\n\t}\n\treturn v.asInt64()\n}\n\n// asInt64 returns the value held by v as an int64. If v is not of KindInt64,\n// this will return garbage.\nfunc (v Value) asInt64() int64 {\n\t// Assumes v.num was a valid int64 (overflow not checked).\n\treturn int64(v.num) // nolint: gosec\n}\n\n// AsBool returns the value held by v as a bool.\nfunc (v Value) AsBool() bool {\n\tif v.Kind() != ValueKindBool {\n\t\t// TODO: error handle\n\t\treturn false\n\t}\n\treturn v.asBool()\n}\n\n// asBool returns the value held by v as a bool. If v is not of KindBool, this\n// will return garbage.\nfunc (v Value) asBool() bool { return v.num == 1 }\n\n// AsFloat64 returns the value held by v as a float64.\nfunc (v Value) AsFloat64() float64 {\n\tif v.Kind() != ValueKindFloat64 {\n\t\t// TODO: error handle\n\t\treturn 0\n\t}\n\treturn v.asFloat64()\n}\n\n// asFloat64 returns the value held by v as a float64. If v is not of\n// KindFloat64, this will return garbage.\nfunc (v Value) asFloat64() float64 { return math.Float64frombits(v.num) }\n\n// AsBytes returns the value held by v as a []byte.\nfunc (v Value) AsBytes() []byte {\n\tif sp, ok := v.any.(bytesptr); ok {\n\t\treturn unsafe.Slice((*byte)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asBytes returns the value held by v as a []byte. It will panic if the Value\n// is not KindBytes.\nfunc (v Value) asBytes() []byte {\n\treturn unsafe.Slice((*byte)(v.any.(bytesptr)), v.num)\n}\n\n// AsSlice returns the value held by v as a []Value.\nfunc (v Value) AsSlice() []Value {\n\tif sp, ok := v.any.(sliceptr); ok {\n\t\treturn unsafe.Slice((*Value)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asSlice returns the value held by v as a []Value. It will panic if the Value\n// is not KindSlice.\nfunc (v Value) asSlice() []Value {\n\treturn unsafe.Slice((*Value)(v.any.(sliceptr)), v.num)\n}\n\n// AsMap returns the value held by v as a []Attr.\nfunc (v Value) AsMap() []Attr {\n\tif sp, ok := v.any.(mapptr); ok {\n\t\treturn unsafe.Slice((*Attr)(sp), v.num)\n\t}\n\t// TODO: error handle\n\treturn nil\n}\n\n// asMap returns the value held by v as a []Attr. It will panic if the\n// Value is not KindMap.\nfunc (v Value) asMap() []Attr {\n\treturn unsafe.Slice((*Attr)(v.any.(mapptr)), v.num)\n}\n\n// Kind returns the Kind of v.\nfunc (v Value) Kind() ValueKind {\n\tswitch x := v.any.(type) {\n\tcase ValueKind:\n\t\treturn x\n\tcase stringptr:\n\t\treturn ValueKindString\n\tcase bytesptr:\n\t\treturn ValueKindBytes\n\tcase sliceptr:\n\t\treturn ValueKindSlice\n\tcase mapptr:\n\t\treturn ValueKindMap\n\tdefault:\n\t\treturn ValueKindEmpty\n\t}\n}\n\n// Empty reports whether v does not hold any value.\nfunc (v Value) Empty() bool { return v.Kind() == ValueKindEmpty }\n\n// Equal reports whether v is equal to w.\nfunc (v Value) Equal(w Value) bool {\n\tk1 := v.Kind()\n\tk2 := w.Kind()\n\tif k1 != k2 {\n\t\treturn false\n\t}\n\tswitch k1 {\n\tcase ValueKindInt64, ValueKindBool:\n\t\treturn v.num == w.num\n\tcase ValueKindString:\n\t\treturn v.asString() == w.asString()\n\tcase ValueKindFloat64:\n\t\treturn v.asFloat64() == w.asFloat64()\n\tcase ValueKindSlice:\n\t\treturn slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal)\n\tcase ValueKindMap:\n\t\tsv := sortMap(v.asMap())\n\t\tsw := sortMap(w.asMap())\n\t\treturn slices.EqualFunc(sv, sw, Attr.Equal)\n\tcase ValueKindBytes:\n\t\treturn bytes.Equal(v.asBytes(), w.asBytes())\n\tcase ValueKindEmpty:\n\t\treturn true\n\tdefault:\n\t\t// TODO: error handle\n\t\treturn false\n\t}\n}\n\nfunc sortMap(m []Attr) []Attr {\n\tsm := make([]Attr, len(m))\n\tcopy(sm, m)\n\tslices.SortFunc(sm, func(a, b Attr) int {\n\t\treturn cmp.Compare(a.Key, b.Key)\n\t})\n\n\treturn sm\n}\n\n// String returns Value's value as a string, formatted like [fmt.Sprint].\n//\n// The returned string is meant for debugging;\n// the string representation is not stable.\nfunc (v Value) String() string {\n\tswitch v.Kind() {\n\tcase ValueKindString:\n\t\treturn v.asString()\n\tcase ValueKindInt64:\n\t\t// Assumes v.num was a valid int64 (overflow not checked).\n\t\treturn strconv.FormatInt(int64(v.num), 10) // nolint: gosec\n\tcase ValueKindFloat64:\n\t\treturn strconv.FormatFloat(v.asFloat64(), 'g', -1, 64)\n\tcase ValueKindBool:\n\t\treturn strconv.FormatBool(v.asBool())\n\tcase ValueKindBytes:\n\t\treturn string(v.asBytes())\n\tcase ValueKindMap:\n\t\treturn fmt.Sprint(v.asMap())\n\tcase ValueKindSlice:\n\t\treturn fmt.Sprint(v.asSlice())\n\tcase ValueKindEmpty:\n\t\treturn \"<nil>\"\n\tdefault:\n\t\t// Try to handle this as gracefully as possible.\n\t\t//\n\t\t// Don't panic here. The goal here is to have developers find this\n\t\t// first if a slog.Kind is is not handled. It is\n\t\t// preferable to have user's open issue asking why their attributes\n\t\t// have a \"unhandled: \" prefix than say that their code is panicking.\n\t\treturn fmt.Sprintf(\"<unhandled telemetry.ValueKind: %s>\", v.Kind())\n\t}\n}\n\n// MarshalJSON encodes v into OTLP formatted JSON.\nfunc (v *Value) MarshalJSON() ([]byte, error) {\n\tswitch v.Kind() {\n\tcase ValueKindString:\n\t\treturn json.Marshal(struct {\n\t\t\tValue string `json:\"stringValue\"`\n\t\t}{v.asString()})\n\tcase ValueKindInt64:\n\t\treturn json.Marshal(struct {\n\t\t\tValue string `json:\"intValue\"`\n\t\t}{strconv.FormatInt(int64(v.num), 10)}) // nolint: gosec  // From raw bytes.\n\tcase ValueKindFloat64:\n\t\treturn json.Marshal(struct {\n\t\t\tValue float64 `json:\"doubleValue\"`\n\t\t}{v.asFloat64()})\n\tcase ValueKindBool:\n\t\treturn json.Marshal(struct {\n\t\t\tValue bool `json:\"boolValue\"`\n\t\t}{v.asBool()})\n\tcase ValueKindBytes:\n\t\treturn json.Marshal(struct {\n\t\t\tValue []byte `json:\"bytesValue\"`\n\t\t}{v.asBytes()})\n\tcase ValueKindMap:\n\t\treturn json.Marshal(struct {\n\t\t\tValue struct {\n\t\t\t\tValues []Attr `json:\"values\"`\n\t\t\t} `json:\"kvlistValue\"`\n\t\t}{struct {\n\t\t\tValues []Attr `json:\"values\"`\n\t\t}{v.asMap()}})\n\tcase ValueKindSlice:\n\t\treturn json.Marshal(struct {\n\t\t\tValue struct {\n\t\t\t\tValues []Value `json:\"values\"`\n\t\t\t} `json:\"arrayValue\"`\n\t\t}{struct {\n\t\t\tValues []Value `json:\"values\"`\n\t\t}{v.asSlice()}})\n\tcase ValueKindEmpty:\n\t\treturn nil, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown Value kind: %s\", v.Kind().String())\n\t}\n}\n\n// UnmarshalJSON decodes the OTLP formatted JSON contained in data into v.\nfunc (v *Value) UnmarshalJSON(data []byte) error {\n\tdecoder := json.NewDecoder(bytes.NewReader(data))\n\n\tt, err := decoder.Token()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif t != json.Delim('{') {\n\t\treturn errors.New(\"invalid Value type\")\n\t}\n\n\tfor decoder.More() {\n\t\tkeyIface, err := decoder.Token()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\t// Empty.\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tkey, ok := keyIface.(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"invalid Value key: %#v\", keyIface)\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"stringValue\", \"string_value\":\n\t\t\tvar val string\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = StringValue(val)\n\t\tcase \"boolValue\", \"bool_value\":\n\t\t\tvar val bool\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = BoolValue(val)\n\t\tcase \"intValue\", \"int_value\":\n\t\t\tvar val protoInt64\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = Int64Value(val.Int64())\n\t\tcase \"doubleValue\", \"double_value\":\n\t\t\tvar val float64\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = Float64Value(val)\n\t\tcase \"bytesValue\", \"bytes_value\":\n\t\t\tvar val64 string\n\t\t\tif err := decoder.Decode(&val64); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvar val []byte\n\t\t\tval, err = base64.StdEncoding.DecodeString(val64)\n\t\t\t*v = BytesValue(val)\n\t\tcase \"arrayValue\", \"array_value\":\n\t\t\tvar val struct{ Values []Value }\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = SliceValue(val.Values...)\n\t\tcase \"kvlistValue\", \"kvlist_value\":\n\t\t\tvar val struct{ Values []Attr }\n\t\t\terr = decoder.Decode(&val)\n\t\t\t*v = MapValue(val.Values...)\n\t\tdefault:\n\t\t\t// Skip unknown.\n\t\t\tcontinue\n\t\t}\n\t\t// Use first valid. Ignore the rest.\n\t\treturn err\n\t}\n\n\t// Only unknown fields. Return nil without unmarshaling any value.\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/nonrecording.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\n// nonRecordingSpan is a minimal implementation of a Span that wraps a\n// SpanContext. It performs no operations other than to return the wrapped\n// SpanContext.\ntype nonRecordingSpan struct {\n\tnoopSpan\n\n\tsc SpanContext\n}\n\n// SpanContext returns the wrapped SpanContext.\nfunc (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/noop/README.md",
    "content": "# Trace Noop\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/noop)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/noop)\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/noop/noop.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// Package noop provides an implementation of the OpenTelemetry trace API that\n// produces no telemetry and minimizes used computation resources.\n//\n// Using this package to implement the OpenTelemetry trace API will effectively\n// disable OpenTelemetry.\n//\n// This implementation can be embedded in other implementations of the\n// OpenTelemetry trace API. Doing so will mean the implementation defaults to\n// no operation for methods it does not implement.\npackage noop // import \"go.opentelemetry.io/otel/trace/noop\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n)\n\nvar (\n\t// Compile-time check this implements the OpenTelemetry API.\n\n\t_ trace.TracerProvider = TracerProvider{}\n\t_ trace.Tracer         = Tracer{}\n\t_ trace.Span           = Span{}\n)\n\n// TracerProvider is an OpenTelemetry No-Op TracerProvider.\ntype TracerProvider struct{ embedded.TracerProvider }\n\n// NewTracerProvider returns a TracerProvider that does not record any telemetry.\nfunc NewTracerProvider() TracerProvider {\n\treturn TracerProvider{}\n}\n\n// Tracer returns an OpenTelemetry Tracer that does not record any telemetry.\nfunc (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {\n\treturn Tracer{}\n}\n\n// Tracer is an OpenTelemetry No-Op Tracer.\ntype Tracer struct{ embedded.Tracer }\n\n// Start creates a span. The created span will be set in a child context of ctx\n// and returned with the span.\n//\n// If ctx contains a span context, the returned span will also contain that\n// span context. If the span context in ctx is for a non-recording span, that\n// span instance will be returned directly.\nfunc (Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) {\n\tspan := trace.SpanFromContext(ctx)\n\n\t// If the parent context contains a non-zero span context, that span\n\t// context needs to be returned as a non-recording span\n\t// (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk).\n\tvar zeroSC trace.SpanContext\n\tif sc := span.SpanContext(); !sc.Equal(zeroSC) {\n\t\tif !span.IsRecording() {\n\t\t\t// If the span is not recording return it directly.\n\t\t\treturn ctx, span\n\t\t}\n\t\t// Otherwise, return the span context needs in a non-recording span.\n\t\tspan = Span{sc: sc}\n\t} else {\n\t\t// No parent, return a No-Op span with an empty span context.\n\t\tspan = noopSpanInstance\n\t}\n\treturn trace.ContextWithSpan(ctx, span), span\n}\n\nvar noopSpanInstance trace.Span = Span{}\n\n// Span is an OpenTelemetry No-Op Span.\ntype Span struct {\n\tembedded.Span\n\n\tsc trace.SpanContext\n}\n\n// SpanContext returns an empty span context.\nfunc (s Span) SpanContext() trace.SpanContext { return s.sc }\n\n// IsRecording always returns false.\nfunc (Span) IsRecording() bool { return false }\n\n// SetStatus does nothing.\nfunc (Span) SetStatus(codes.Code, string) {}\n\n// SetAttributes does nothing.\nfunc (Span) SetAttributes(...attribute.KeyValue) {}\n\n// End does nothing.\nfunc (Span) End(...trace.SpanEndOption) {}\n\n// RecordError does nothing.\nfunc (Span) RecordError(error, ...trace.EventOption) {}\n\n// AddEvent does nothing.\nfunc (Span) AddEvent(string, ...trace.EventOption) {}\n\n// AddLink does nothing.\nfunc (Span) AddLink(trace.Link) {}\n\n// SetName does nothing.\nfunc (Span) SetName(string) {}\n\n// TracerProvider returns a No-Op TracerProvider.\nfunc (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} }\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/noop.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n)\n\n// NewNoopTracerProvider returns an implementation of TracerProvider that\n// performs no operations. The Tracer and Spans created from the returned\n// TracerProvider also perform no operations.\n//\n// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider]\n// instead.\nfunc NewNoopTracerProvider() TracerProvider {\n\treturn noopTracerProvider{}\n}\n\ntype noopTracerProvider struct{ embedded.TracerProvider }\n\nvar _ TracerProvider = noopTracerProvider{}\n\n// Tracer returns noop implementation of Tracer.\nfunc (noopTracerProvider) Tracer(string, ...TracerOption) Tracer {\n\treturn noopTracer{}\n}\n\n// noopTracer is an implementation of Tracer that performs no operations.\ntype noopTracer struct{ embedded.Tracer }\n\nvar _ Tracer = noopTracer{}\n\n// Start carries forward a non-recording Span, if one is present in the context, otherwise it\n// creates a no-op Span.\nfunc (noopTracer) Start(ctx context.Context, _ string, _ ...SpanStartOption) (context.Context, Span) {\n\tspan := SpanFromContext(ctx)\n\tif _, ok := span.(nonRecordingSpan); !ok {\n\t\t// span is likely already a noopSpan, but let's be sure\n\t\tspan = noopSpanInstance\n\t}\n\treturn ContextWithSpan(ctx, span), span\n}\n\n// noopSpan is an implementation of Span that performs no operations.\ntype noopSpan struct{ embedded.Span }\n\nvar noopSpanInstance Span = noopSpan{}\n\n// SpanContext returns an empty span context.\nfunc (noopSpan) SpanContext() SpanContext { return SpanContext{} }\n\n// IsRecording always returns false.\nfunc (noopSpan) IsRecording() bool { return false }\n\n// SetStatus does nothing.\nfunc (noopSpan) SetStatus(codes.Code, string) {}\n\n// SetError does nothing.\nfunc (noopSpan) SetError(bool) {}\n\n// SetAttributes does nothing.\nfunc (noopSpan) SetAttributes(...attribute.KeyValue) {}\n\n// End does nothing.\nfunc (noopSpan) End(...SpanEndOption) {}\n\n// RecordError does nothing.\nfunc (noopSpan) RecordError(error, ...EventOption) {}\n\n// AddEvent does nothing.\nfunc (noopSpan) AddEvent(string, ...EventOption) {}\n\n// AddLink does nothing.\nfunc (noopSpan) AddLink(Link) {}\n\n// SetName does nothing.\nfunc (noopSpan) SetName(string) {}\n\n// TracerProvider returns a no-op TracerProvider.\nfunc (s noopSpan) TracerProvider() TracerProvider {\n\treturn s.tracerProvider(autoInstEnabled)\n}\n\n// autoInstEnabled defines if the auto-instrumentation SDK is enabled.\n//\n// The auto-instrumentation is expected to overwrite this value to true when it\n// attaches to the process.\nvar autoInstEnabled = new(bool)\n\n// tracerProvider return a noopTracerProvider if autoEnabled is false,\n// otherwise it will return a TracerProvider from the sdk package used in\n// auto-instrumentation.\n//\n//go:noinline\nfunc (noopSpan) tracerProvider(autoEnabled *bool) TracerProvider {\n\tif *autoEnabled {\n\t\treturn newAutoTracerProvider()\n\t}\n\treturn noopTracerProvider{}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/provider.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport \"go.opentelemetry.io/otel/trace/embedded\"\n\n// TracerProvider provides Tracers that are used by instrumentation code to\n// trace computational workflows.\n//\n// A TracerProvider is the collection destination of all Spans from Tracers it\n// provides, it represents a unique telemetry collection pipeline. How that\n// pipeline is defined, meaning how those Spans are collected, processed, and\n// where they are exported, depends on its implementation. Instrumentation\n// authors do not need to define this implementation, rather just use the\n// provided Tracers to instrument code.\n//\n// Commonly, instrumentation code will accept a TracerProvider implementation\n// at runtime from its users or it can simply use the globally registered one\n// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider).\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype TracerProvider interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.TracerProvider\n\n\t// Tracer returns a unique Tracer scoped to be used by instrumentation code\n\t// to trace computational workflows. The scope and identity of that\n\t// instrumentation code is uniquely defined by the name and options passed.\n\t//\n\t// The passed name needs to uniquely identify instrumentation code.\n\t// Therefore, it is recommended that name is the Go package name of the\n\t// library providing instrumentation (note: not the code being\n\t// instrumented). Instrumentation libraries can have multiple versions,\n\t// therefore, the WithInstrumentationVersion option should be used to\n\t// distinguish these different codebases. Additionally, instrumentation\n\t// libraries may sometimes use traces to communicate different domains of\n\t// workflow data (i.e. using spans to communicate workflow events only). If\n\t// this is the case, the WithScopeAttributes option should be used to\n\t// uniquely identify Tracers that handle the different domains of workflow\n\t// data.\n\t//\n\t// If the same name and options are passed multiple times, the same Tracer\n\t// will be returned (it is up to the implementation if this will be the\n\t// same underlying instance of that Tracer or not). It is not necessary to\n\t// call this multiple times with the same name and options to get an\n\t// up-to-date Tracer. All implementations will ensure any TracerProvider\n\t// configuration changes are propagated to all provided Tracers.\n\t//\n\t// If name is empty, then an implementation defined default name will be\n\t// used instead.\n\t//\n\t// This method is safe to call concurrently.\n\tTracer(name string, options ...TracerOption) Tracer\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/span.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n)\n\n// Span is the individual component of a trace. It represents a single named\n// and timed operation of a workflow that is traced. A Tracer is used to\n// create a Span and it is then up to the operation the Span represents to\n// properly end the Span when the operation itself ends.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Span interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Span\n\n\t// End completes the Span. The Span is considered complete and ready to be\n\t// delivered through the rest of the telemetry pipeline after this method\n\t// is called. Therefore, updates to the Span are not allowed after this\n\t// method has been called.\n\tEnd(options ...SpanEndOption)\n\n\t// AddEvent adds an event with the provided name and options.\n\tAddEvent(name string, options ...EventOption)\n\n\t// AddLink adds a link.\n\t// Adding links at span creation using WithLinks is preferred to calling AddLink\n\t// later, for contexts that are available during span creation, because head\n\t// sampling decisions can only consider information present during span creation.\n\tAddLink(link Link)\n\n\t// IsRecording returns the recording state of the Span. It will return\n\t// true if the Span is active and events can be recorded.\n\tIsRecording() bool\n\n\t// RecordError will record err as an exception span event for this span. An\n\t// additional call to SetStatus is required if the Status of the Span should\n\t// be set to Error, as this method does not change the Span status. If this\n\t// span is not being recorded or err is nil then this method does nothing.\n\tRecordError(err error, options ...EventOption)\n\n\t// SpanContext returns the SpanContext of the Span. The returned SpanContext\n\t// is usable even after the End method has been called for the Span.\n\tSpanContext() SpanContext\n\n\t// SetStatus sets the status of the Span in the form of a code and a\n\t// description, provided the status hasn't already been set to a higher\n\t// value before (OK > Error > Unset). The description is only included in a\n\t// status when the code is for an error.\n\tSetStatus(code codes.Code, description string)\n\n\t// SetName sets the Span name.\n\tSetName(name string)\n\n\t// SetAttributes sets kv as attributes of the Span. If a key from kv\n\t// already exists for an attribute of the Span it will be overwritten with\n\t// the value contained in kv.\n\t//\n\t// Note that adding attributes at span creation using [WithAttributes] is preferred\n\t// to calling SetAttribute later, as samplers can only consider information\n\t// already present during span creation.\n\tSetAttributes(kv ...attribute.KeyValue)\n\n\t// TracerProvider returns a TracerProvider that can be used to generate\n\t// additional Spans on the same telemetry pipeline as the current Span.\n\tTracerProvider() TracerProvider\n}\n\n// Link is the relationship between two Spans. The relationship can be within\n// the same Trace or across different Traces.\n//\n// For example, a Link is used in the following situations:\n//\n//  1. Batch Processing: A batch of operations may contain operations\n//     associated with one or more traces/spans. Since there can only be one\n//     parent SpanContext, a Link is used to keep reference to the\n//     SpanContext of all operations in the batch.\n//  2. Public Endpoint: A SpanContext for an in incoming client request on a\n//     public endpoint should be considered untrusted. In such a case, a new\n//     trace with its own identity and sampling decision needs to be created,\n//     but this new trace needs to be related to the original trace in some\n//     form. A Link is used to keep reference to the original SpanContext and\n//     track the relationship.\ntype Link struct {\n\t// SpanContext of the linked Span.\n\tSpanContext SpanContext\n\n\t// Attributes describe the aspects of the link.\n\tAttributes []attribute.KeyValue\n}\n\n// LinkFromContext returns a link encapsulating the SpanContext in the provided\n// ctx.\nfunc LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link {\n\treturn Link{\n\t\tSpanContext: SpanContextFromContext(ctx),\n\t\tAttributes:  attrs,\n\t}\n}\n\n// SpanKind is the role a Span plays in a Trace.\ntype SpanKind int\n\n// As a convenience, these match the proto definition, see\n// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129\n//\n// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()`\n// to coerce a span kind to a valid value.\nconst (\n\t// SpanKindUnspecified is an unspecified SpanKind and is not a valid\n\t// SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal\n\t// if it is received.\n\tSpanKindUnspecified SpanKind = 0\n\t// SpanKindInternal is a SpanKind for a Span that represents an internal\n\t// operation within an application.\n\tSpanKindInternal SpanKind = 1\n\t// SpanKindServer is a SpanKind for a Span that represents the operation\n\t// of handling a request from a client.\n\tSpanKindServer SpanKind = 2\n\t// SpanKindClient is a SpanKind for a Span that represents the operation\n\t// of client making a request to a server.\n\tSpanKindClient SpanKind = 3\n\t// SpanKindProducer is a SpanKind for a Span that represents the operation\n\t// of a producer sending a message to a message broker. Unlike\n\t// SpanKindClient and SpanKindServer, there is often no direct\n\t// relationship between this kind of Span and a SpanKindConsumer kind. A\n\t// SpanKindProducer Span will end once the message is accepted by the\n\t// message broker which might not overlap with the processing of that\n\t// message.\n\tSpanKindProducer SpanKind = 4\n\t// SpanKindConsumer is a SpanKind for a Span that represents the operation\n\t// of a consumer receiving a message from a message broker. Like\n\t// SpanKindProducer Spans, there is often no direct relationship between\n\t// this Span and the Span that produced the message.\n\tSpanKindConsumer SpanKind = 5\n)\n\n// ValidateSpanKind returns a valid span kind value.  This will coerce\n// invalid values into the default value, SpanKindInternal.\nfunc ValidateSpanKind(spanKind SpanKind) SpanKind {\n\tswitch spanKind {\n\tcase SpanKindInternal,\n\t\tSpanKindServer,\n\t\tSpanKindClient,\n\t\tSpanKindProducer,\n\t\tSpanKindConsumer:\n\t\t// valid\n\t\treturn spanKind\n\tdefault:\n\t\treturn SpanKindInternal\n\t}\n}\n\n// String returns the specified name of the SpanKind in lower-case.\nfunc (sk SpanKind) String() string {\n\tswitch sk {\n\tcase SpanKindInternal:\n\t\treturn \"internal\"\n\tcase SpanKindServer:\n\t\treturn \"server\"\n\tcase SpanKindClient:\n\t\treturn \"client\"\n\tcase SpanKindProducer:\n\t\treturn \"producer\"\n\tcase SpanKindConsumer:\n\t\treturn \"consumer\"\n\tdefault:\n\t\treturn \"unspecified\"\n\t}\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/trace.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"encoding/json\"\n)\n\nconst (\n\t// FlagsSampled is a bitmask with the sampled bit set. A SpanContext\n\t// with the sampling bit set means the span is sampled.\n\tFlagsSampled = TraceFlags(0x01)\n\n\terrInvalidHexID errorConst = \"trace-id and span-id can only contain [0-9a-f] characters, all lowercase\"\n\n\terrInvalidTraceIDLength errorConst = \"hex encoded trace-id must have length equals to 32\"\n\terrNilTraceID           errorConst = \"trace-id can't be all zero\"\n\n\terrInvalidSpanIDLength errorConst = \"hex encoded span-id must have length equals to 16\"\n\terrNilSpanID           errorConst = \"span-id can't be all zero\"\n)\n\ntype errorConst string\n\nfunc (e errorConst) Error() string {\n\treturn string(e)\n}\n\n// TraceID is a unique identity of a trace.\n// nolint:revive // revive complains about stutter of `trace.TraceID`.\ntype TraceID [16]byte\n\nvar (\n\tnilTraceID TraceID\n\t_          json.Marshaler = nilTraceID\n)\n\n// IsValid reports whether the trace TraceID is valid. A valid trace ID does\n// not consist of zeros only.\nfunc (t TraceID) IsValid() bool {\n\treturn t != nilTraceID\n}\n\n// MarshalJSON implements a custom marshal function to encode TraceID\n// as a hex string.\nfunc (t TraceID) MarshalJSON() ([]byte, error) {\n\tb := [32 + 2]byte{0: '\"', 33: '\"'}\n\th := t.hexBytes()\n\tcopy(b[1:], h[:])\n\treturn b[:], nil\n}\n\n// String returns the hex string representation form of a TraceID.\nfunc (t TraceID) String() string {\n\th := t.hexBytes()\n\treturn string(h[:])\n}\n\n// hexBytes returns the hex string representation form of a TraceID.\nfunc (t TraceID) hexBytes() [32]byte {\n\treturn [32]byte{\n\t\thexLU[t[0x0]>>4], hexLU[t[0x0]&0xf],\n\t\thexLU[t[0x1]>>4], hexLU[t[0x1]&0xf],\n\t\thexLU[t[0x2]>>4], hexLU[t[0x2]&0xf],\n\t\thexLU[t[0x3]>>4], hexLU[t[0x3]&0xf],\n\t\thexLU[t[0x4]>>4], hexLU[t[0x4]&0xf],\n\t\thexLU[t[0x5]>>4], hexLU[t[0x5]&0xf],\n\t\thexLU[t[0x6]>>4], hexLU[t[0x6]&0xf],\n\t\thexLU[t[0x7]>>4], hexLU[t[0x7]&0xf],\n\t\thexLU[t[0x8]>>4], hexLU[t[0x8]&0xf],\n\t\thexLU[t[0x9]>>4], hexLU[t[0x9]&0xf],\n\t\thexLU[t[0xa]>>4], hexLU[t[0xa]&0xf],\n\t\thexLU[t[0xb]>>4], hexLU[t[0xb]&0xf],\n\t\thexLU[t[0xc]>>4], hexLU[t[0xc]&0xf],\n\t\thexLU[t[0xd]>>4], hexLU[t[0xd]&0xf],\n\t\thexLU[t[0xe]>>4], hexLU[t[0xe]&0xf],\n\t\thexLU[t[0xf]>>4], hexLU[t[0xf]&0xf],\n\t}\n}\n\n// SpanID is a unique identity of a span in a trace.\ntype SpanID [8]byte\n\nvar (\n\tnilSpanID SpanID\n\t_         json.Marshaler = nilSpanID\n)\n\n// IsValid reports whether the SpanID is valid. A valid SpanID does not consist\n// of zeros only.\nfunc (s SpanID) IsValid() bool {\n\treturn s != nilSpanID\n}\n\n// MarshalJSON implements a custom marshal function to encode SpanID\n// as a hex string.\nfunc (s SpanID) MarshalJSON() ([]byte, error) {\n\tb := [16 + 2]byte{0: '\"', 17: '\"'}\n\th := s.hexBytes()\n\tcopy(b[1:], h[:])\n\treturn b[:], nil\n}\n\n// String returns the hex string representation form of a SpanID.\nfunc (s SpanID) String() string {\n\tb := s.hexBytes()\n\treturn string(b[:])\n}\n\nfunc (s SpanID) hexBytes() [16]byte {\n\treturn [16]byte{\n\t\thexLU[s[0]>>4], hexLU[s[0]&0xf],\n\t\thexLU[s[1]>>4], hexLU[s[1]&0xf],\n\t\thexLU[s[2]>>4], hexLU[s[2]&0xf],\n\t\thexLU[s[3]>>4], hexLU[s[3]&0xf],\n\t\thexLU[s[4]>>4], hexLU[s[4]&0xf],\n\t\thexLU[s[5]>>4], hexLU[s[5]&0xf],\n\t\thexLU[s[6]>>4], hexLU[s[6]&0xf],\n\t\thexLU[s[7]>>4], hexLU[s[7]&0xf],\n\t}\n}\n\n// TraceIDFromHex returns a TraceID from a hex string if it is compliant with\n// the W3C trace-context specification.  See more at\n// https://www.w3.org/TR/trace-context/#trace-id\n// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`.\nfunc TraceIDFromHex(h string) (TraceID, error) {\n\tif len(h) != 32 {\n\t\treturn [16]byte{}, errInvalidTraceIDLength\n\t}\n\tvar b [16]byte\n\tinvalidMark := byte(0)\n\tfor i := 0; i < len(h); i += 4 {\n\t\tb[i/2] = (hexRev[h[i]] << 4) | hexRev[h[i+1]]\n\t\tb[i/2+1] = (hexRev[h[i+2]] << 4) | hexRev[h[i+3]]\n\t\tinvalidMark |= hexRev[h[i]] | hexRev[h[i+1]] | hexRev[h[i+2]] | hexRev[h[i+3]]\n\t}\n\t// If the upper 4 bits of any byte are not zero, there was an invalid hex\n\t// character since invalid hex characters are 0xff in hexRev.\n\tif invalidMark&0xf0 != 0 {\n\t\treturn [16]byte{}, errInvalidHexID\n\t}\n\t// If we didn't set any bits, then h was all zeros.\n\tif invalidMark == 0 {\n\t\treturn [16]byte{}, errNilTraceID\n\t}\n\treturn b, nil\n}\n\n// SpanIDFromHex returns a SpanID from a hex string if it is compliant\n// with the w3c trace-context specification.\n// See more at https://www.w3.org/TR/trace-context/#parent-id\nfunc SpanIDFromHex(h string) (SpanID, error) {\n\tif len(h) != 16 {\n\t\treturn [8]byte{}, errInvalidSpanIDLength\n\t}\n\tvar b [8]byte\n\tinvalidMark := byte(0)\n\tfor i := 0; i < len(h); i += 4 {\n\t\tb[i/2] = (hexRev[h[i]] << 4) | hexRev[h[i+1]]\n\t\tb[i/2+1] = (hexRev[h[i+2]] << 4) | hexRev[h[i+3]]\n\t\tinvalidMark |= hexRev[h[i]] | hexRev[h[i+1]] | hexRev[h[i+2]] | hexRev[h[i+3]]\n\t}\n\t// If the upper 4 bits of any byte are not zero, there was an invalid hex\n\t// character since invalid hex characters are 0xff in hexRev.\n\tif invalidMark&0xf0 != 0 {\n\t\treturn [8]byte{}, errInvalidHexID\n\t}\n\t// If we didn't set any bits, then h was all zeros.\n\tif invalidMark == 0 {\n\t\treturn [8]byte{}, errNilSpanID\n\t}\n\treturn b, nil\n}\n\n// TraceFlags contains flags that can be set on a SpanContext.\ntype TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`.\n\n// IsSampled reports whether the sampling bit is set in the TraceFlags.\nfunc (tf TraceFlags) IsSampled() bool {\n\treturn tf&FlagsSampled == FlagsSampled\n}\n\n// WithSampled sets the sampling bit in a new copy of the TraceFlags.\nfunc (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive  // sampled is not a control flag.\n\tif sampled {\n\t\treturn tf | FlagsSampled\n\t}\n\n\treturn tf &^ FlagsSampled\n}\n\n// MarshalJSON implements a custom marshal function to encode TraceFlags\n// as a hex string.\nfunc (tf TraceFlags) MarshalJSON() ([]byte, error) {\n\tb := [2 + 2]byte{0: '\"', 3: '\"'}\n\th := tf.hexBytes()\n\tcopy(b[1:], h[:])\n\treturn b[:], nil\n}\n\n// String returns the hex string representation form of TraceFlags.\nfunc (tf TraceFlags) String() string {\n\th := tf.hexBytes()\n\treturn string(h[:])\n}\n\nfunc (tf TraceFlags) hexBytes() [2]byte {\n\treturn [2]byte{hexLU[tf>>4], hexLU[tf&0xf]}\n}\n\n// SpanContextConfig contains mutable fields usable for constructing\n// an immutable SpanContext.\ntype SpanContextConfig struct {\n\tTraceID    TraceID\n\tSpanID     SpanID\n\tTraceFlags TraceFlags\n\tTraceState TraceState\n\tRemote     bool\n}\n\n// NewSpanContext constructs a SpanContext using values from the provided\n// SpanContextConfig.\nfunc NewSpanContext(config SpanContextConfig) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    config.TraceID,\n\t\tspanID:     config.SpanID,\n\t\ttraceFlags: config.TraceFlags,\n\t\ttraceState: config.TraceState,\n\t\tremote:     config.Remote,\n\t}\n}\n\n// SpanContext contains identifying trace information about a Span.\ntype SpanContext struct {\n\ttraceID    TraceID\n\tspanID     SpanID\n\ttraceFlags TraceFlags\n\ttraceState TraceState\n\tremote     bool\n}\n\nvar _ json.Marshaler = SpanContext{}\n\n// IsValid reports whether the SpanContext is valid. A valid span context has a\n// valid TraceID and SpanID.\nfunc (sc SpanContext) IsValid() bool {\n\treturn sc.HasTraceID() && sc.HasSpanID()\n}\n\n// IsRemote reports whether the SpanContext represents a remotely-created Span.\nfunc (sc SpanContext) IsRemote() bool {\n\treturn sc.remote\n}\n\n// WithRemote returns a copy of sc with the Remote property set to remote.\nfunc (sc SpanContext) WithRemote(remote bool) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    sc.traceID,\n\t\tspanID:     sc.spanID,\n\t\ttraceFlags: sc.traceFlags,\n\t\ttraceState: sc.traceState,\n\t\tremote:     remote,\n\t}\n}\n\n// TraceID returns the TraceID from the SpanContext.\nfunc (sc SpanContext) TraceID() TraceID {\n\treturn sc.traceID\n}\n\n// HasTraceID reports whether the SpanContext has a valid TraceID.\nfunc (sc SpanContext) HasTraceID() bool {\n\treturn sc.traceID.IsValid()\n}\n\n// WithTraceID returns a new SpanContext with the TraceID replaced.\nfunc (sc SpanContext) WithTraceID(traceID TraceID) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    traceID,\n\t\tspanID:     sc.spanID,\n\t\ttraceFlags: sc.traceFlags,\n\t\ttraceState: sc.traceState,\n\t\tremote:     sc.remote,\n\t}\n}\n\n// SpanID returns the SpanID from the SpanContext.\nfunc (sc SpanContext) SpanID() SpanID {\n\treturn sc.spanID\n}\n\n// HasSpanID reports whether the SpanContext has a valid SpanID.\nfunc (sc SpanContext) HasSpanID() bool {\n\treturn sc.spanID.IsValid()\n}\n\n// WithSpanID returns a new SpanContext with the SpanID replaced.\nfunc (sc SpanContext) WithSpanID(spanID SpanID) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    sc.traceID,\n\t\tspanID:     spanID,\n\t\ttraceFlags: sc.traceFlags,\n\t\ttraceState: sc.traceState,\n\t\tremote:     sc.remote,\n\t}\n}\n\n// TraceFlags returns the flags from the SpanContext.\nfunc (sc SpanContext) TraceFlags() TraceFlags {\n\treturn sc.traceFlags\n}\n\n// IsSampled reports whether the sampling bit is set in the SpanContext's TraceFlags.\nfunc (sc SpanContext) IsSampled() bool {\n\treturn sc.traceFlags.IsSampled()\n}\n\n// WithTraceFlags returns a new SpanContext with the TraceFlags replaced.\nfunc (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    sc.traceID,\n\t\tspanID:     sc.spanID,\n\t\ttraceFlags: flags,\n\t\ttraceState: sc.traceState,\n\t\tremote:     sc.remote,\n\t}\n}\n\n// TraceState returns the TraceState from the SpanContext.\nfunc (sc SpanContext) TraceState() TraceState {\n\treturn sc.traceState\n}\n\n// WithTraceState returns a new SpanContext with the TraceState replaced.\nfunc (sc SpanContext) WithTraceState(state TraceState) SpanContext {\n\treturn SpanContext{\n\t\ttraceID:    sc.traceID,\n\t\tspanID:     sc.spanID,\n\t\ttraceFlags: sc.traceFlags,\n\t\ttraceState: state,\n\t\tremote:     sc.remote,\n\t}\n}\n\n// Equal reports whether two SpanContext values are equal.\nfunc (sc SpanContext) Equal(other SpanContext) bool {\n\treturn sc.traceID == other.traceID &&\n\t\tsc.spanID == other.spanID &&\n\t\tsc.traceFlags == other.traceFlags &&\n\t\tsc.traceState.String() == other.traceState.String() &&\n\t\tsc.remote == other.remote\n}\n\n// MarshalJSON implements a custom marshal function to encode a SpanContext.\nfunc (sc SpanContext) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(SpanContextConfig{\n\t\tTraceID:    sc.traceID,\n\t\tSpanID:     sc.spanID,\n\t\tTraceFlags: sc.traceFlags,\n\t\tTraceState: sc.traceState,\n\t\tRemote:     sc.remote,\n\t})\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/tracer.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"context\"\n\n\t\"go.opentelemetry.io/otel/trace/embedded\"\n)\n\n// Tracer is the creator of Spans.\n//\n// Warning: Methods may be added to this interface in minor releases. See\n// package documentation on API implementation for information on how to set\n// default behavior for unimplemented methods.\ntype Tracer interface {\n\t// Users of the interface can ignore this. This embedded type is only used\n\t// by implementations of this interface. See the \"API Implementations\"\n\t// section of the package documentation for more information.\n\tembedded.Tracer\n\n\t// Start creates a span and a context.Context containing the newly-created span.\n\t//\n\t// If the context.Context provided in `ctx` contains a Span then the newly-created\n\t// Span will be a child of that span, otherwise it will be a root span. This behavior\n\t// can be overridden by providing `WithNewRoot()` as a SpanOption, causing the\n\t// newly-created Span to be a root span even if `ctx` contains a Span.\n\t//\n\t// When creating a Span it is recommended to provide all known span attributes using\n\t// the `WithAttributes()` SpanOption as samplers will only have access to the\n\t// attributes provided when a Span is created.\n\t//\n\t// Any Span that is created MUST also be ended. This is the responsibility of the user.\n\t// Implementations of this API may leak memory or other resources if Spans are not ended.\n\tStart(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace/tracestate.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage trace // import \"go.opentelemetry.io/otel/trace\"\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n)\n\nconst (\n\tmaxListMembers = 32\n\n\tlistDelimiters  = \",\"\n\tmemberDelimiter = \"=\"\n\n\terrInvalidKey    errorConst = \"invalid tracestate key\"\n\terrInvalidValue  errorConst = \"invalid tracestate value\"\n\terrInvalidMember errorConst = \"invalid tracestate list-member\"\n\terrMemberNumber  errorConst = \"too many list-members in tracestate\"\n\terrDuplicate     errorConst = \"duplicate list-member in tracestate\"\n)\n\ntype member struct {\n\tKey   string\n\tValue string\n}\n\n// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) )\n// means (chr = %x20-2B / %x2D-3C / %x3E-7E) .\nfunc checkValueChar(v byte) bool {\n\treturn v >= '\\x20' && v <= '\\x7e' && v != '\\x2c' && v != '\\x3d'\n}\n\n// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) .\nfunc checkValueLast(v byte) bool {\n\treturn v >= '\\x21' && v <= '\\x7e' && v != '\\x2c' && v != '\\x3d'\n}\n\n// based on the W3C Trace Context specification\n//\n//\tvalue    = (0*255(chr)) nblk-chr\n//\tnblk-chr = %x21-2B / %x2D-3C / %x3E-7E\n//\tchr      = %x20 / nblk-chr\n//\n// see https://www.w3.org/TR/trace-context-1/#value\nfunc checkValue(val string) bool {\n\tn := len(val)\n\tif n == 0 || n > 256 {\n\t\treturn false\n\t}\n\tfor i := 0; i < n-1; i++ {\n\t\tif !checkValueChar(val[i]) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn checkValueLast(val[n-1])\n}\n\nfunc checkKeyRemain(key string) bool {\n\t// ( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" )\n\tfor _, v := range key {\n\t\tif isAlphaNum(byte(v)) {\n\t\t\tcontinue\n\t\t}\n\t\tswitch v {\n\t\tcase '_', '-', '*', '/':\n\t\t\tcontinue\n\t\t}\n\t\treturn false\n\t}\n\treturn true\n}\n\n// according to\n//\n//\tsimple-key = lcalpha (0*255( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" ))\n//\tsystem-id = lcalpha (0*13( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" ))\n//\n// param n is remain part length, should be 255 in simple-key or 13 in system-id.\nfunc checkKeyPart(key string, n int) bool {\n\tif key == \"\" {\n\t\treturn false\n\t}\n\tfirst := key[0] // key's first char\n\tret := len(key[1:]) <= n\n\tret = ret && first >= 'a' && first <= 'z'\n\treturn ret && checkKeyRemain(key[1:])\n}\n\nfunc isAlphaNum(c byte) bool {\n\tif c >= 'a' && c <= 'z' {\n\t\treturn true\n\t}\n\treturn c >= '0' && c <= '9'\n}\n\n// according to\n//\n//\ttenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" )\n//\n// param n is remain part length, should be 240 exactly.\nfunc checkKeyTenant(key string, n int) bool {\n\tif key == \"\" {\n\t\treturn false\n\t}\n\treturn isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:])\n}\n\n// based on the W3C Trace Context specification\n//\n//\tkey = simple-key / multi-tenant-key\n//\tsimple-key = lcalpha (0*255( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" ))\n//\tmulti-tenant-key = tenant-id \"@\" system-id\n//\ttenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" ))\n//\tsystem-id = lcalpha (0*13( lcalpha / DIGIT / \"_\" / \"-\"/ \"*\" / \"/\" ))\n//\tlcalpha    = %x61-7A ; a-z\n//\n// see https://www.w3.org/TR/trace-context-1/#tracestate-header.\nfunc checkKey(key string) bool {\n\ttenant, system, ok := strings.Cut(key, \"@\")\n\tif !ok {\n\t\treturn checkKeyPart(key, 255)\n\t}\n\treturn checkKeyTenant(tenant, 240) && checkKeyPart(system, 13)\n}\n\nfunc newMember(key, value string) (member, error) {\n\tif !checkKey(key) {\n\t\treturn member{}, errInvalidKey\n\t}\n\tif !checkValue(value) {\n\t\treturn member{}, errInvalidValue\n\t}\n\treturn member{Key: key, Value: value}, nil\n}\n\nfunc parseMember(m string) (member, error) {\n\tkey, val, ok := strings.Cut(m, memberDelimiter)\n\tif !ok {\n\t\treturn member{}, fmt.Errorf(\"%w: %s\", errInvalidMember, m)\n\t}\n\tkey = strings.TrimLeft(key, \" \\t\")\n\tval = strings.TrimRight(val, \" \\t\")\n\tresult, e := newMember(key, val)\n\tif e != nil {\n\t\treturn member{}, fmt.Errorf(\"%w: %s\", errInvalidMember, m)\n\t}\n\treturn result, nil\n}\n\n// String encodes member into a string compliant with the W3C Trace Context\n// specification.\nfunc (m member) String() string {\n\treturn m.Key + \"=\" + m.Value\n}\n\n// TraceState provides additional vendor-specific trace identification\n// information across different distributed tracing systems. It represents an\n// immutable list consisting of key/value pairs, each pair is referred to as a\n// list-member.\n//\n// TraceState conforms to the W3C Trace Context specification\n// (https://www.w3.org/TR/trace-context-1). All operations that create or copy\n// a TraceState do so by validating all input and will only produce TraceState\n// that conform to the specification. Specifically, this means that all\n// list-member's key/value pairs are valid, no duplicate list-members exist,\n// and the maximum number of list-members (32) is not exceeded.\ntype TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState`\n\t// list is the members in order.\n\tlist []member\n}\n\nvar _ json.Marshaler = TraceState{}\n\n// ParseTraceState attempts to decode a TraceState from the passed\n// string. It returns an error if the input is invalid according to the W3C\n// Trace Context specification.\nfunc ParseTraceState(ts string) (TraceState, error) {\n\tif ts == \"\" {\n\t\treturn TraceState{}, nil\n\t}\n\n\twrapErr := func(err error) error {\n\t\treturn fmt.Errorf(\"failed to parse tracestate: %w\", err)\n\t}\n\n\tvar members []member\n\tfound := make(map[string]struct{})\n\tfor ts != \"\" {\n\t\tvar memberStr string\n\t\tmemberStr, ts, _ = strings.Cut(ts, listDelimiters)\n\t\tif memberStr == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tm, err := parseMember(memberStr)\n\t\tif err != nil {\n\t\t\treturn TraceState{}, wrapErr(err)\n\t\t}\n\n\t\tif _, ok := found[m.Key]; ok {\n\t\t\treturn TraceState{}, wrapErr(errDuplicate)\n\t\t}\n\t\tfound[m.Key] = struct{}{}\n\n\t\tmembers = append(members, m)\n\t\tif n := len(members); n > maxListMembers {\n\t\t\treturn TraceState{}, wrapErr(errMemberNumber)\n\t\t}\n\t}\n\n\treturn TraceState{list: members}, nil\n}\n\n// MarshalJSON marshals the TraceState into JSON.\nfunc (ts TraceState) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(ts.String())\n}\n\n// String encodes the TraceState into a string compliant with the W3C\n// Trace Context specification. The returned string will be invalid if the\n// TraceState contains any invalid members.\nfunc (ts TraceState) String() string {\n\tif len(ts.list) == 0 {\n\t\treturn \"\"\n\t}\n\tvar n int\n\tn += len(ts.list)     // member delimiters: '='\n\tn += len(ts.list) - 1 // list delimiters: ','\n\tfor _, mem := range ts.list {\n\t\tn += len(mem.Key)\n\t\tn += len(mem.Value)\n\t}\n\n\tvar sb strings.Builder\n\tsb.Grow(n)\n\t_, _ = sb.WriteString(ts.list[0].Key)\n\t_ = sb.WriteByte('=')\n\t_, _ = sb.WriteString(ts.list[0].Value)\n\tfor i := 1; i < len(ts.list); i++ {\n\t\t_ = sb.WriteByte(listDelimiters[0])\n\t\t_, _ = sb.WriteString(ts.list[i].Key)\n\t\t_ = sb.WriteByte('=')\n\t\t_, _ = sb.WriteString(ts.list[i].Value)\n\t}\n\treturn sb.String()\n}\n\n// Get returns the value paired with key from the corresponding TraceState\n// list-member if it exists, otherwise an empty string is returned.\nfunc (ts TraceState) Get(key string) string {\n\tfor _, member := range ts.list {\n\t\tif member.Key == key {\n\t\t\treturn member.Value\n\t\t}\n\t}\n\n\treturn \"\"\n}\n\n// Walk walks all key value pairs in the TraceState by calling f\n// Iteration stops if f returns false.\nfunc (ts TraceState) Walk(f func(key, value string) bool) {\n\tfor _, m := range ts.list {\n\t\tif !f(m.Key, m.Value) {\n\t\t\tbreak\n\t\t}\n\t}\n}\n\n// Insert adds a new list-member defined by the key/value pair to the\n// TraceState. If a list-member already exists for the given key, that\n// list-member's value is updated. The new or updated list-member is always\n// moved to the beginning of the TraceState as specified by the W3C Trace\n// Context specification.\n//\n// If key or value are invalid according to the W3C Trace Context\n// specification an error is returned with the original TraceState.\n//\n// If adding a new list-member means the TraceState would have more members\n// then is allowed, the new list-member will be inserted and the right-most\n// list-member will be dropped in the returned TraceState.\nfunc (ts TraceState) Insert(key, value string) (TraceState, error) {\n\tm, err := newMember(key, value)\n\tif err != nil {\n\t\treturn ts, err\n\t}\n\tn := len(ts.list)\n\tfound := n\n\tfor i := range ts.list {\n\t\tif ts.list[i].Key == key {\n\t\t\tfound = i\n\t\t}\n\t}\n\tcTS := TraceState{}\n\tif found == n && n < maxListMembers {\n\t\tcTS.list = make([]member, n+1)\n\t} else {\n\t\tcTS.list = make([]member, n)\n\t}\n\tcTS.list[0] = m\n\t// When the number of members exceeds capacity, drop the \"right-most\".\n\tcopy(cTS.list[1:], ts.list[0:found])\n\tif found < n {\n\t\tcopy(cTS.list[1+found:], ts.list[found+1:])\n\t}\n\treturn cTS, nil\n}\n\n// Delete returns a copy of the TraceState with the list-member identified by\n// key removed.\nfunc (ts TraceState) Delete(key string) TraceState {\n\tmembers := make([]member, ts.Len())\n\tcopy(members, ts.list)\n\tfor i, member := range ts.list {\n\t\tif member.Key == key {\n\t\t\tmembers = append(members[:i], members[i+1:]...)\n\t\t\t// TraceState should contain no duplicate members.\n\t\t\tbreak\n\t\t}\n\t}\n\treturn TraceState{list: members}\n}\n\n// Len returns the number of list-members in the TraceState.\nfunc (ts TraceState) Len() int {\n\treturn len(ts.list)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/trace.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\nimport (\n\t\"go.opentelemetry.io/otel/internal/global\"\n\t\"go.opentelemetry.io/otel/trace\"\n)\n\n// Tracer creates a named tracer that implements Tracer interface.\n// If the name is an empty string then provider uses default name.\n//\n// This is short for GetTracerProvider().Tracer(name, opts...)\nfunc Tracer(name string, opts ...trace.TracerOption) trace.Tracer {\n\treturn GetTracerProvider().Tracer(name, opts...)\n}\n\n// GetTracerProvider returns the registered global trace provider.\n// If none is registered then an instance of NoopTracerProvider is returned.\n//\n// Use the trace provider to create a named tracer. E.g.\n//\n//\ttracer := otel.GetTracerProvider().Tracer(\"example.com/foo\")\n//\n// or\n//\n//\ttracer := otel.Tracer(\"example.com/foo\")\nfunc GetTracerProvider() trace.TracerProvider {\n\treturn global.TracerProvider()\n}\n\n// SetTracerProvider registers `tp` as the global trace provider.\nfunc SetTracerProvider(tp trace.TracerProvider) {\n\tglobal.SetTracerProvider(tp)\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/verify_released_changelog.sh",
    "content": "#!/bin/bash\n\n# Copyright The OpenTelemetry Authors\n# SPDX-License-Identifier: Apache-2.0\n\nset -euo pipefail\n\nTARGET=\"${1:?Must provide target ref}\"\n\nFILE=\"CHANGELOG.md\"\nTEMP_DIR=$(mktemp -d)\necho \"Temp folder: $TEMP_DIR\"\n\n# Only the latest commit of the feature branch is available\n# automatically. To diff with the base branch, we need to\n# fetch that too (and we only need its latest commit).\ngit fetch origin \"${TARGET}\" --depth=1\n\n# Checkout the previous version on the base branch of the changelog to tmpfolder\ngit --work-tree=\"$TEMP_DIR\" checkout FETCH_HEAD $FILE\n\nPREVIOUS_FILE=\"$TEMP_DIR/$FILE\"\nCURRENT_FILE=\"$FILE\"\nPREVIOUS_LOCKED_FILE=\"$TEMP_DIR/previous_locked_section.md\"\nCURRENT_LOCKED_FILE=\"$TEMP_DIR/current_locked_section.md\"\n\n# Extract released sections from the previous version\nawk '/^<!-- Released section -->/ {flag=1} /^<!-- Released section ended -->/ {flag=0} flag' \"$PREVIOUS_FILE\" > \"$PREVIOUS_LOCKED_FILE\"\n\n# Extract released sections from the current version\nawk '/^<!-- Released section -->/ {flag=1} /^<!-- Released section ended -->/ {flag=0} flag' \"$CURRENT_FILE\" > \"$CURRENT_LOCKED_FILE\"\n\n# Compare the released sections\nif ! diff -q \"$PREVIOUS_LOCKED_FILE\" \"$CURRENT_LOCKED_FILE\"; then\n    echo \"Error: The released sections of the changelog file have been modified.\"\n    diff \"$PREVIOUS_LOCKED_FILE\" \"$CURRENT_LOCKED_FILE\"\n    rm -rf \"$TEMP_DIR\"\n    false\nfi\n\nrm -rf \"$TEMP_DIR\"\necho \"The released sections remain unchanged.\"\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/version.go",
    "content": "// Copyright The OpenTelemetry Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage otel // import \"go.opentelemetry.io/otel\"\n\n// Version is the current release version of OpenTelemetry in use.\nfunc Version() string {\n\treturn \"1.40.0\"\n}\n"
  },
  {
    "path": "vendor/go.opentelemetry.io/otel/versions.yaml",
    "content": "# Copyright The OpenTelemetry Authors\n# SPDX-License-Identifier: Apache-2.0\n\nmodule-sets:\n  stable-v1:\n    version: v1.40.0\n    modules:\n      - go.opentelemetry.io/otel\n      - go.opentelemetry.io/otel/bridge/opencensus\n      - go.opentelemetry.io/otel/bridge/opencensus/test\n      - go.opentelemetry.io/otel/bridge/opentracing\n      - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc\n      - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp\n      - go.opentelemetry.io/otel/exporters/otlp/otlptrace\n      - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\n      - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp\n      - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric\n      - go.opentelemetry.io/otel/exporters/stdout/stdouttrace\n      - go.opentelemetry.io/otel/exporters/zipkin\n      - go.opentelemetry.io/otel/metric\n      - go.opentelemetry.io/otel/sdk\n      - go.opentelemetry.io/otel/sdk/metric\n      - go.opentelemetry.io/otel/trace\n  experimental-metrics:\n    version: v0.62.0\n    modules:\n      - go.opentelemetry.io/otel/exporters/prometheus\n  experimental-logs:\n    version: v0.16.0\n    modules:\n      - go.opentelemetry.io/otel/log\n      - go.opentelemetry.io/otel/log/logtest\n      - go.opentelemetry.io/otel/sdk/log\n      - go.opentelemetry.io/otel/sdk/log/logtest\n      - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc\n      - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp\n      - go.opentelemetry.io/otel/exporters/stdout/stdoutlog\n  experimental-schema:\n    version: v0.0.14\n    modules:\n      - go.opentelemetry.io/otel/schema\nexcluded-modules:\n  - go.opentelemetry.io/otel/internal/tools\n  - go.opentelemetry.io/otel/trace/internal/telemetry/test\nmodules:\n  go.opentelemetry.io/otel/exporters/stdout/stdouttrace:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/stdout/stdoutmetric:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/prometheus:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp:\n    version-refs:\n      - ./internal/version.go\n  go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp:\n    version-refs:\n      - ./internal/version.go\n"
  },
  {
    "path": "vendor/go.podman.io/common/LICENSE",
    "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": "vendor/go.podman.io/common/pkg/auth/auth.go",
    "content": "package auth\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\tpasswd \"go.podman.io/common/pkg/password\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/pkg/docker/config\"\n\t\"go.podman.io/image/v5/pkg/sysregistriesv2\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n)\n\n// ErrNewCredentialsInvalid means that the new user-provided credentials are\n// not accepted by the registry.\ntype ErrNewCredentialsInvalid struct {\n\tunderlyingError error\n\tmessage         string\n}\n\n// Error returns the error message as a string.\nfunc (e ErrNewCredentialsInvalid) Error() string {\n\treturn e.message\n}\n\n// Unwrap returns the underlying error.\nfunc (e ErrNewCredentialsInvalid) Unwrap() error {\n\treturn e.underlyingError\n}\n\n// GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default\n// --authfile path used in multiple --authfile flag definitions\n// Will fail over to DOCKER_CONFIG if REGISTRY_AUTH_FILE environment is not set\n//\n// WARNINGS:\n//   - In almost all invocations, expect this function to return \"\"; so it can not be used\n//     for directly accessing the file.\n//   - Use this only for commands that _read_ credentials, not write them.\n//     The path may refer to github.com/containers auth.json, or to Docker config.json,\n//     and the distinction is lost; writing auth.json data to config.json may not be consumable by Docker,\n//     or it may overwrite and discard unrelated Docker configuration set by the user.\nfunc GetDefaultAuthFile() string {\n\t// Keep this in sync with the default logic in systemContextWithOptions!\n\n\tif authfile := os.Getenv(\"REGISTRY_AUTH_FILE\"); authfile != \"\" {\n\t\treturn authfile\n\t}\n\t// This pre-existing behavior is not conceptually consistent:\n\t// If users have a ~/.docker/config.json in the default path, and no environment variable\n\t// set, we read auth.json first, falling back to config.json;\n\t// but if DOCKER_CONFIG is set, we read only config.json in that path, and we don’t read auth.json at all.\n\tif authEnv := os.Getenv(\"DOCKER_CONFIG\"); authEnv != \"\" {\n\t\treturn filepath.Join(authEnv, \"config.json\")\n\t}\n\treturn \"\"\n}\n\n// CheckAuthFile validates a path option, failing if the option is set but the referenced file is not accessible.\nfunc CheckAuthFile(pathOption string) error {\n\tif pathOption == \"\" {\n\t\treturn nil\n\t}\n\tif err := fileutils.Exists(pathOption); err != nil {\n\t\treturn fmt.Errorf(\"credential file is not accessible: %w\", err)\n\t}\n\treturn nil\n}\n\n// systemContextWithOptions returns a version of sys\n// updated with authFile, dockerCompatAuthFile and certDir values (if they are not \"\").\n// NOTE: this is a shallow copy that can be used and updated, but may share\n// data with the original parameter.\nfunc systemContextWithOptions(sys *types.SystemContext, authFile, dockerCompatAuthFile, certDir string) (*types.SystemContext, error) {\n\tif sys != nil {\n\t\tsysCopy := *sys\n\t\tsys = &sysCopy\n\t} else {\n\t\tsys = &types.SystemContext{}\n\t}\n\n\tdefaultDockerConfigPath := filepath.Join(homedir.Get(), \".docker\", \"config.json\")\n\tswitch {\n\tcase authFile != \"\" && dockerCompatAuthFile != \"\":\n\t\treturn nil, errors.New(\"options for paths to the credential file and to the Docker-compatible credential file can not be set simultaneously\")\n\tcase authFile != \"\":\n\t\tif authFile == defaultDockerConfigPath {\n\t\t\tlogrus.Warn(\"saving credentials to ~/.docker/config.json, but not using Docker-compatible file format\")\n\t\t}\n\t\tsys.AuthFilePath = authFile\n\tcase dockerCompatAuthFile != \"\":\n\t\tsys.DockerCompatAuthFilePath = dockerCompatAuthFile\n\tdefault:\n\t\t// Keep this in sync with GetDefaultAuthFile()!\n\t\t//\n\t\t// Note that c/image does not natively implement the REGISTRY_AUTH_FILE\n\t\t// variable, so not all callers look for credentials in this location.\n\t\tif authFileVar := os.Getenv(\"REGISTRY_AUTH_FILE\"); authFileVar != \"\" {\n\t\t\tif authFileVar == defaultDockerConfigPath {\n\t\t\t\tlogrus.Warn(\"$REGISTRY_AUTH_FILE points to ~/.docker/config.json, but the file format is not fully compatible; use the Docker-compatible file path option instead\")\n\t\t\t}\n\t\t\tsys.AuthFilePath = authFileVar\n\t\t} else if dockerConfig := os.Getenv(\"DOCKER_CONFIG\"); dockerConfig != \"\" {\n\t\t\t// This preserves pre-existing _inconsistent_ behavior:\n\t\t\t// If the Docker configuration exists in the default ~/.docker/config.json location,\n\t\t\t// we DO NOT write to it; instead, we update auth.json in the default path.\n\t\t\t// Only if the user explicitly sets DOCKER_CONFIG, we write to that config.json.\n\t\t\tsys.DockerCompatAuthFilePath = filepath.Join(dockerConfig, \"config.json\")\n\t\t}\n\t}\n\tif certDir != \"\" {\n\t\tsys.DockerCertPath = certDir\n\t}\n\treturn sys, nil\n}\n\n// Login implements a “log in” command with the provided opts and args\n// reading the password from opts.Stdin or the options in opts.\nfunc Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginOptions, args []string) error {\n\tsystemContext, err := systemContextWithOptions(systemContext, opts.AuthFile, opts.DockerCompatAuthFile, opts.CertDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar key, registry string\n\tswitch len(args) {\n\tcase 0:\n\t\tif !opts.AcceptUnspecifiedRegistry {\n\t\t\treturn errors.New(\"please provide a registry to log in to\")\n\t\t}\n\t\tif key, err = defaultRegistryWhenUnspecified(systemContext); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tregistry = key\n\t\tlogrus.Debugf(\"registry not specified, default to the first registry %q from registries.conf\", key)\n\n\tcase 1:\n\t\tkey, registry, err = parseCredentialsKey(args[0], opts.AcceptRepositories)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\tdefault:\n\t\treturn errors.New(\"login accepts only one registry to log in to\")\n\t}\n\n\tauthConfig, err := config.GetCredentials(systemContext, key)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get credentials: %w\", err)\n\t}\n\n\tif opts.GetLoginSet {\n\t\tif authConfig.Username == \"\" {\n\t\t\treturn fmt.Errorf(\"not logged into %s\", key)\n\t\t}\n\t\tfmt.Fprintf(opts.Stdout, \"%s\\n\", authConfig.Username)\n\t\treturn nil\n\t}\n\tif authConfig.IdentityToken != \"\" {\n\t\treturn errors.New(\"currently logged in, auth file contains an Identity token\")\n\t}\n\n\tpassword := opts.Password\n\tif opts.StdinPassword {\n\t\tvar stdinPasswordStrBuilder strings.Builder\n\t\tif opts.Password != \"\" {\n\t\t\treturn errors.New(\"can't specify both --password-stdin and --password\")\n\t\t}\n\t\tif opts.Username == \"\" {\n\t\t\treturn errors.New(\"must provide --username with --password-stdin\")\n\t\t}\n\t\tscanner := bufio.NewScanner(opts.Stdin)\n\t\tfor scanner.Scan() {\n\t\t\tfmt.Fprint(&stdinPasswordStrBuilder, scanner.Text())\n\t\t}\n\t\tpassword = stdinPasswordStrBuilder.String()\n\t}\n\n\t// If no username and no password is specified, try to use existing ones.\n\tif opts.Username == \"\" && password == \"\" && authConfig.Username != \"\" && authConfig.Password != \"\" {\n\t\tfmt.Fprintf(opts.Stdout, \"Authenticating with existing credentials for %s\\n\", key)\n\t\tif err := docker.CheckAuth(ctx, systemContext, authConfig.Username, authConfig.Password, registry); err == nil {\n\t\t\tfmt.Fprintf(opts.Stdout, \"Existing credentials are valid. Already logged in to %s\\n\", registry)\n\t\t\treturn nil\n\t\t}\n\t\tfmt.Fprintln(opts.Stdout, \"Existing credentials are invalid, please enter valid username and password\")\n\t}\n\n\tusername, password, err := getUserAndPass(opts, password, authConfig.Username)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"getting username and password: %w\", err)\n\t}\n\n\tif err = docker.CheckAuth(ctx, systemContext, username, password, registry); err == nil {\n\t\tif !opts.NoWriteBack {\n\t\t\t// Write the new credentials to the authfile\n\t\t\tdesc, err := config.SetCredentials(systemContext, key, username, password)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif opts.Verbose {\n\t\t\t\tfmt.Fprintln(opts.Stdout, \"Used: \", desc)\n\t\t\t}\n\t\t}\n\t\tfmt.Fprintln(opts.Stdout, \"Login Succeeded!\")\n\t\treturn nil\n\t}\n\tif unauthorized, ok := err.(docker.ErrUnauthorizedForCredentials); ok {\n\t\tlogrus.Debugf(\"error logging into %q: %v\", key, unauthorized)\n\t\treturn ErrNewCredentialsInvalid{\n\t\t\tunderlyingError: err,\n\t\t\tmessage:         fmt.Sprintf(\"logging into %q: invalid username/password\", key),\n\t\t}\n\t}\n\treturn fmt.Errorf(\"authenticating creds for %q: %w\", key, err)\n}\n\n// parseCredentialsKey turns the provided argument into a valid credential key\n// and computes the registry part.\nfunc parseCredentialsKey(arg string, acceptRepositories bool) (key, registry string, err error) {\n\t// URL arguments are replaced with their host[:port] parts.\n\tkey, err = replaceURLByHostPort(arg)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tregistry, _, _ = strings.Cut(key, \"/\")\n\n\tif !acceptRepositories {\n\t\treturn registry, registry, nil\n\t}\n\n\t// Return early if the key isn't namespaced or uses an http{s} prefix.\n\tif registry == key {\n\t\treturn key, registry, nil\n\t}\n\n\t// Sanity-check that the key looks reasonable (e.g. doesn't use invalid characters),\n\t// and does not contain a tag or digest.\n\t// WARNING: ref.Named() MUST NOT be used to compute key, because\n\t// reference.ParseNormalizedNamed() turns docker.io/vendor to docker.io/library/vendor\n\t// Ideally c/image should provide dedicated validation functionality.\n\tref, err := reference.ParseNormalizedNamed(key)\n\tif err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"parse reference from %q: %w\", key, err)\n\t}\n\tif !reference.IsNameOnly(ref) {\n\t\treturn \"\", \"\", fmt.Errorf(\"reference %q contains tag or digest\", ref.String())\n\t}\n\trefRegistry := reference.Domain(ref)\n\tif refRegistry != registry { // This should never happen, check just to make sure\n\t\treturn \"\", \"\", fmt.Errorf(\"internal error: key %q registry mismatch, %q vs. %q\", key, ref, refRegistry)\n\t}\n\n\treturn key, registry, nil\n}\n\n// If the specified string starts with http{s} it is replaced with it's\n// host[:port] parts; everything else is stripped. Otherwise, the string is\n// returned as is.\nfunc replaceURLByHostPort(repository string) (string, error) {\n\tif !strings.HasPrefix(repository, \"https://\") && !strings.HasPrefix(repository, \"http://\") {\n\t\treturn repository, nil\n\t}\n\tu, err := url.Parse(repository)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"trimming http{s} prefix: %v\", err)\n\t}\n\treturn u.Host, nil\n}\n\n// getUserAndPass gets the username and password from STDIN if not given\n// using the -u and -p flags.  If the username prompt is left empty, the\n// displayed userFromAuthFile will be used instead.\nfunc getUserAndPass(opts *LoginOptions, password, userFromAuthFile string) (user, pass string, err error) {\n\tusername := opts.Username\n\tif username == \"\" {\n\t\tif opts.Stdin == nil {\n\t\t\treturn \"\", \"\", errors.New(\"cannot prompt for username without stdin\")\n\t\t}\n\n\t\tif userFromAuthFile != \"\" {\n\t\t\tfmt.Fprintf(opts.Stdout, \"Username (%s): \", userFromAuthFile)\n\t\t} else {\n\t\t\tfmt.Fprint(opts.Stdout, \"Username: \")\n\t\t}\n\n\t\treader := bufio.NewReader(opts.Stdin)\n\t\tusername, err = reader.ReadString('\\n')\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(\"reading username: %w\", err)\n\t\t}\n\t\t// If the user just hit enter, use the displayed user from\n\t\t// the authentication file.  This allows to do a lazy\n\t\t// `$ buildah login -p $NEW_PASSWORD` without specifying the\n\t\t// user.\n\t\tif strings.TrimSpace(username) == \"\" {\n\t\t\tusername = userFromAuthFile\n\t\t}\n\t}\n\tif password == \"\" {\n\t\tfmt.Fprint(opts.Stdout, \"Password: \")\n\t\tpass, err := passwd.Read(int(os.Stdin.Fd()))\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", fmt.Errorf(\"reading password: %w\", err)\n\t\t}\n\t\tpassword = string(pass)\n\t\tfmt.Fprintln(opts.Stdout)\n\t}\n\treturn strings.TrimSpace(username), password, err\n}\n\n// Logout implements a “log out” command with the provided opts and args.\nfunc Logout(systemContext *types.SystemContext, opts *LogoutOptions, args []string) error {\n\tif err := CheckAuthFile(opts.AuthFile); err != nil {\n\t\treturn err\n\t}\n\tif err := CheckAuthFile(opts.DockerCompatAuthFile); err != nil {\n\t\treturn err\n\t}\n\tsystemContext, err := systemContextWithOptions(systemContext, opts.AuthFile, opts.DockerCompatAuthFile, \"\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif opts.All {\n\t\tif len(args) != 0 {\n\t\t\treturn errors.New(\"--all takes no arguments\")\n\t\t}\n\t\tif err := config.RemoveAllAuthentication(systemContext); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Fprintln(opts.Stdout, \"Removed login credentials for all registries\")\n\t\treturn nil\n\t}\n\n\tvar key, registry string\n\tswitch len(args) {\n\tcase 0:\n\t\tif !opts.AcceptUnspecifiedRegistry {\n\t\t\treturn errors.New(\"please provide a registry to log out from\")\n\t\t}\n\t\tif key, err = defaultRegistryWhenUnspecified(systemContext); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tregistry = key\n\t\tlogrus.Debugf(\"registry not specified, default to the first registry %q from registries.conf\", key)\n\n\tcase 1:\n\t\tkey, registry, err = parseCredentialsKey(args[0], opts.AcceptRepositories)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\tdefault:\n\t\treturn errors.New(\"logout accepts only one registry to log out from\")\n\t}\n\n\terr = config.RemoveAuthentication(systemContext, key)\n\tif err == nil {\n\t\tfmt.Fprintf(opts.Stdout, \"Removed login credentials for %s\\n\", key)\n\t\treturn nil\n\t}\n\n\tif errors.Is(err, config.ErrNotLoggedIn) {\n\t\tauthConfig, err := config.GetCredentials(systemContext, key)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"get credentials: %w\", err)\n\t\t}\n\n\t\tauthInvalid := docker.CheckAuth(context.Background(), systemContext, authConfig.Username, authConfig.Password, registry)\n\t\tif authConfig.Username != \"\" && authConfig.Password != \"\" && authInvalid == nil {\n\t\t\tfmt.Printf(\"Not logged into %s with current tool. Existing credentials were established via docker login. Please use docker logout instead.\\n\", key) //nolint:forbidigo\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"not logged into %s\", key)\n\t}\n\n\treturn fmt.Errorf(\"logging out of %q: %w\", key, err)\n}\n\n// defaultRegistryWhenUnspecified returns first registry from search list of registry.conf\n// used by login/logout when registry argument is not specified.\nfunc defaultRegistryWhenUnspecified(systemContext *types.SystemContext) (string, error) {\n\tregistriesFromFile, err := sysregistriesv2.UnqualifiedSearchRegistries(systemContext)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting registry from registry.conf, please specify a registry: %w\", err)\n\t}\n\tif len(registriesFromFile) == 0 {\n\t\treturn \"\", errors.New(\"no registries found in registries.conf, a registry must be provided\")\n\t}\n\treturn registriesFromFile[0], nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/auth/cli.go",
    "content": "package auth\n\nimport (\n\t\"io\"\n\n\t\"github.com/spf13/pflag\"\n\t\"go.podman.io/common/pkg/completion\"\n)\n\n// LoginOptions represents common flags in login\n// In addition, the caller should probably provide a --tls-verify flag (that affects the provided\n// *types.SystemContest).\ntype LoginOptions struct {\n\t// CLI flags managed by the FlagSet returned by GetLoginFlags\n\t// Callers that use GetLoginFlags should not need to touch these values at all; callers that use\n\t// other CLI frameworks should set them based on user input.\n\tAuthFile             string\n\tDockerCompatAuthFile string\n\tCertDir              string\n\tPassword             string\n\tUsername             string\n\tStdinPassword        bool\n\tGetLoginSet          bool\n\tVerbose              bool // set to true for verbose output\n\tAcceptRepositories   bool // set to true to allow namespaces or repositories rather than just registries\n\t// Options caller can set\n\tStdin                     io.Reader // set to os.Stdin\n\tStdout                    io.Writer // set to os.Stdout\n\tAcceptUnspecifiedRegistry bool      // set to true if allows login with unspecified registry\n\tNoWriteBack               bool      // set to true to not write the credentials to the authfile/cred helpers\n}\n\n// LogoutOptions represents the results for flags in logout.\ntype LogoutOptions struct {\n\t// CLI flags managed by the FlagSet returned by GetLogoutFlags\n\t// Callers that use GetLogoutFlags should not need to touch these values at all; callers that use\n\t// other CLI frameworks should set them based on user input.\n\tAuthFile             string\n\tDockerCompatAuthFile string\n\tAll                  bool\n\tAcceptRepositories   bool // set to true to allow namespaces or repositories rather than just registries\n\t// Options caller can set\n\tStdout                    io.Writer // set to os.Stdout\n\tAcceptUnspecifiedRegistry bool      // set to true if allows logout with unspecified registry\n}\n\n// GetLoginFlags defines and returns login flags for containers tools.\nfunc GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {\n\tfs := pflag.FlagSet{}\n\tfs.StringVar(&flags.AuthFile, \"authfile\", \"\", \"path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override\")\n\tfs.StringVar(&flags.DockerCompatAuthFile, \"compat-auth-file\", \"\", \"path of a Docker-compatible config file to update instead\")\n\tfs.StringVar(&flags.CertDir, \"cert-dir\", \"\", \"use certificates at the specified path to access the registry\")\n\tfs.StringVarP(&flags.Password, \"password\", \"p\", \"\", \"Password for registry\")\n\tfs.StringVarP(&flags.Username, \"username\", \"u\", \"\", \"Username for registry\")\n\tfs.BoolVar(&flags.StdinPassword, \"password-stdin\", false, \"Take the password from stdin\")\n\tfs.BoolVar(&flags.GetLoginSet, \"get-login\", false, \"Return the current login user for the registry\")\n\tfs.BoolVarP(&flags.Verbose, \"verbose\", \"v\", false, \"Write more detailed information to stdout\")\n\treturn &fs\n}\n\n// GetLoginFlagsCompletions returns the FlagCompletions for the login flags.\nfunc GetLoginFlagsCompletions() completion.FlagCompletions {\n\tflagCompletion := completion.FlagCompletions{}\n\tflagCompletion[\"authfile\"] = completion.AutocompleteDefault\n\tflagCompletion[\"compat-auth-file\"] = completion.AutocompleteDefault\n\tflagCompletion[\"cert-dir\"] = completion.AutocompleteDefault\n\tflagCompletion[\"password\"] = completion.AutocompleteNone\n\tflagCompletion[\"username\"] = completion.AutocompleteNone\n\treturn flagCompletion\n}\n\n// GetLogoutFlags defines and returns logout flags for containers tools.\nfunc GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {\n\tfs := pflag.FlagSet{}\n\tfs.StringVar(&flags.AuthFile, \"authfile\", \"\", \"path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override\")\n\tfs.StringVar(&flags.DockerCompatAuthFile, \"compat-auth-file\", \"\", \"path of a Docker-compatible config file to update instead\")\n\tfs.BoolVarP(&flags.All, \"all\", \"a\", false, \"Remove the cached credentials for all registries in the auth file\")\n\treturn &fs\n}\n\n// GetLogoutFlagsCompletions returns the FlagCompletions for the logout flags.\nfunc GetLogoutFlagsCompletions() completion.FlagCompletions {\n\tflagCompletion := completion.FlagCompletions{}\n\tflagCompletion[\"authfile\"] = completion.AutocompleteDefault\n\tflagCompletion[\"compat-auth-file\"] = completion.AutocompleteDefault\n\treturn flagCompletion\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/capabilities/capabilities.go",
    "content": "package capabilities\n\n// Copyright 2013-2018 Docker, Inc.\n\n// NOTE: this package has been copied from github.com/docker/docker but been\n//       changed significantly to fit the needs of libpod.\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/moby/sys/capability\"\n)\n\nvar (\n\t// ErrUnknownCapability is thrown when an unknown capability is processed.\n\tErrUnknownCapability = errors.New(\"unknown capability\")\n\n\t// ContainerImageLabels - label can indicate the required\n\t// capabilities required by containers to run the container image.\n\tContainerImageLabels = []string{\"io.containers.capabilities\"}\n)\n\n// All is a special value used to add/drop all known capabilities.\n// Useful on the CLI for `--cap-add=all` etc.\nconst All = \"ALL\"\n\nfunc capName(c capability.Cap) string {\n\treturn \"CAP_\" + strings.ToUpper(c.String())\n}\n\n// capStrList returns all capabilities supported by the currently running kernel,\n// or an error if the list can not be obtained.\nvar capStrList = sync.OnceValues(func() ([]string, error) {\n\tlist, err := capability.ListSupported()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcaps := make([]string, len(list))\n\tfor i, c := range list {\n\t\tcaps[i] = capName(c)\n\t}\n\tslices.Sort(caps)\n\treturn caps, nil\n})\n\n// BoundingSet returns the capabilities in the current bounding set.\nfunc BoundingSet() ([]string, error) {\n\treturn boundingSet()\n}\n\nvar boundingSet = sync.OnceValues(func() ([]string, error) {\n\tcurrentCaps, err := capability.NewPid2(0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = currentCaps.Load()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlist, err := capability.ListSupported()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar r []string\n\tfor _, c := range list {\n\t\tif !currentCaps.Get(capability.BOUNDING, c) {\n\t\t\tcontinue\n\t\t}\n\t\tr = append(r, capName(c))\n\t}\n\tslices.Sort(r)\n\treturn r, nil\n})\n\n// AllCapabilities returns all capabilities supported by the running kernel.\nfunc AllCapabilities() []string {\n\tlist, _ := capStrList()\n\treturn list\n}\n\n// NormalizeCapabilities normalizes caps by adding a \"CAP_\" prefix (if not yet\n// present).\nfunc NormalizeCapabilities(caps []string) ([]string, error) {\n\tall, err := capStrList()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tnormalized := make([]string, 0, len(caps))\n\tfor _, c := range caps {\n\t\tc = strings.ToUpper(c)\n\t\tif c == All {\n\t\t\tnormalized = append(normalized, c)\n\t\t\tcontinue\n\t\t}\n\t\tif !strings.HasPrefix(c, \"CAP_\") {\n\t\t\tc = \"CAP_\" + c\n\t\t}\n\t\tif !slices.Contains(all, c) {\n\t\t\treturn nil, fmt.Errorf(\"%q: %w\", c, ErrUnknownCapability)\n\t\t}\n\t\tnormalized = append(normalized, c)\n\t}\n\tslices.Sort(normalized)\n\treturn normalized, nil\n}\n\n// ValidateCapabilities validates if caps only contains valid capabilities.\nfunc ValidateCapabilities(caps []string) error {\n\tall, err := capStrList()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, c := range caps {\n\t\tif !slices.Contains(all, c) {\n\t\t\treturn fmt.Errorf(\"%q: %w\", c, ErrUnknownCapability)\n\t\t}\n\t}\n\treturn nil\n}\n\n// MergeCapabilities computes a set of capabilities by adding capabilities\n// to or dropping them from base.\n//\n// Note that:\n// \"ALL\" in capAdd adds returns known capabilities\n// \"All\" in capDrop returns only the capabilities specified in capAdd.\nfunc MergeCapabilities(base, adds, drops []string) ([]string, error) {\n\t// Normalize the base capabilities\n\tbase, err := NormalizeCapabilities(base)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(adds) == 0 && len(drops) == 0 {\n\t\t// Nothing to tweak; we're done\n\t\treturn base, nil\n\t}\n\tcapDrop, err := NormalizeCapabilities(drops)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcapAdd, err := NormalizeCapabilities(adds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif slices.Contains(capDrop, All) {\n\t\tif slices.Contains(capAdd, All) {\n\t\t\treturn nil, errors.New(\"adding all caps and removing all caps not allowed\")\n\t\t}\n\t\t// \"Drop\" all capabilities; return what's in capAdd instead\n\t\tslices.Sort(capAdd)\n\t\treturn capAdd, nil\n\t}\n\n\tif slices.Contains(capAdd, All) {\n\t\tbase, err = BoundingSet()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcapAdd = []string{}\n\t} else {\n\t\tfor _, add := range capAdd {\n\t\t\tif slices.Contains(capDrop, add) {\n\t\t\t\treturn nil, fmt.Errorf(\"capability %q cannot be dropped and added\", add)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, drop := range capDrop {\n\t\tif slices.Contains(capAdd, drop) {\n\t\t\treturn nil, fmt.Errorf(\"capability %q cannot be dropped and added\", drop)\n\t\t}\n\t}\n\n\tcaps := make([]string, 0, len(base)+len(capAdd))\n\t// Drop any capabilities in capDrop that are in base\n\tfor _, cap := range base {\n\t\tif slices.Contains(capDrop, cap) {\n\t\t\tcontinue\n\t\t}\n\t\tcaps = append(caps, cap)\n\t}\n\n\t// Add any capabilities in capAdd that are not in base\n\tfor _, cap := range capAdd {\n\t\tif slices.Contains(base, cap) {\n\t\t\tcontinue\n\t\t}\n\t\tcaps = append(caps, cap)\n\t}\n\tslices.Sort(caps)\n\treturn caps, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/completion/completion.go",
    "content": "package completion\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"strings\"\n\t\"unicode\"\n\n\t\"github.com/spf13/cobra\"\n\t\"go.podman.io/common/pkg/capabilities\"\n)\n\n// FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags().\ntype FlagCompletions map[string]func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)\n\n// CompleteCommandFlags - Add completion functions for each flagname in FlagCompletions.\nfunc CompleteCommandFlags(cmd *cobra.Command, flags FlagCompletions) {\n\tfor flagName, completionFunc := range flags {\n\t\t_ = cmd.RegisterFlagCompletionFunc(flagName, completionFunc)\n\t}\n}\n\n/* Autocomplete Functions for cobra ValidArgsFunction */\n\n// AutocompleteNone - Block the default shell completion (no paths).\nfunc AutocompleteNone(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\treturn nil, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteDefault - Use the default shell completion,\n// allows path completion.\nfunc AutocompleteDefault(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\treturn nil, cobra.ShellCompDirectiveDefault\n}\n\n// AutocompleteCapabilities - Autocomplete linux capabilities options.\n// Used by --cap-add and --cap-drop.\nfunc AutocompleteCapabilities(_ *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) {\n\tcaps := capabilities.AllCapabilities()\n\n\t// convertCase will convert a string to lowercase only if the user input is lowercase\n\tconvertCase := func(s string) string { return s }\n\tif len(toComplete) > 0 && unicode.IsLower(rune(toComplete[0])) {\n\t\tconvertCase = strings.ToLower\n\t}\n\n\t// offset is used to trim \"CAP_\" if the user doesn't type CA... or ca...\n\toffset := 0\n\tif !strings.HasPrefix(toComplete, convertCase(\"CA\")) {\n\t\t// setting the offset to 4 is safe since each cap starts with CAP_\n\t\toffset = 4\n\t}\n\n\tcompletions := make([]string, 0, len(caps))\n\tfor _, cap := range caps {\n\t\tcompletions = append(completions, convertCase(cap)[offset:])\n\t}\n\n\t// add ALL here which is also a valid argument\n\tcompletions = append(completions, convertCase(capabilities.All))\n\treturn completions, cobra.ShellCompDirectiveNoFileComp\n}\n\n// autocompleteSubIDName - autocomplete the names in /etc/subuid or /etc/subgid.\nfunc autocompleteSubIDName(filename string) ([]string, cobra.ShellCompDirective) {\n\tfile, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, cobra.ShellCompDirectiveError\n\t}\n\tdefer file.Close()\n\n\tvar names []string\n\tscanner := bufio.NewScanner(file)\n\tfor scanner.Scan() {\n\t\tname, _, _ := strings.Cut(scanner.Text(), \":\")\n\t\tnames = append(names, name)\n\t}\n\tif err = scanner.Err(); err != nil {\n\t\treturn nil, cobra.ShellCompDirectiveError\n\t}\n\n\treturn names, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteSubgidName - Autocomplete subgidname based on the names in the /etc/subgid file.\nfunc AutocompleteSubgidName(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\treturn autocompleteSubIDName(\"/etc/subgid\")\n}\n\n// AutocompleteSubuidName - Autocomplete subuidname based on the names in the /etc/subuid file.\nfunc AutocompleteSubuidName(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\treturn autocompleteSubIDName(\"/etc/subuid\")\n}\n\n// AutocompletePlatform - Autocomplete platform supported by container engines.\nfunc AutocompletePlatform(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\tcompletions := []string{\n\t\t\"linux/386\",\n\t\t\"linux/amd64\",\n\t\t\"linux/arm\",\n\t\t\"linux/arm64\",\n\t\t\"linux/ppc64\",\n\t\t\"linux/ppc64le\",\n\t\t\"linux/mips\",\n\t\t\"linux/mipsle\",\n\t\t\"linux/mips64\",\n\t\t\"linux/mips64le\",\n\t\t\"linux/riscv64\",\n\t\t\"linux/s390x\",\n\t\t\"windows/386\",\n\t\t\"windows/amd64\",\n\t\t\"windows/arm\",\n\t}\n\treturn completions, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteArch - Autocomplete architectures supported by container engines.\nfunc AutocompleteArch(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\tcompletions := []string{\n\t\t\"386\",\n\t\t\"amd64\",\n\t\t\"arm\",\n\t\t\"arm64\",\n\t\t\"ppc64\",\n\t\t\"ppc64le\",\n\t\t\"mips\",\n\t\t\"mipsle\",\n\t\t\"mips64\",\n\t\t\"mips64le\",\n\t\t\"riscv64\",\n\t\t\"s390x\",\n\t}\n\n\treturn completions, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteOS - Autocomplete OS supported by container engines.\nfunc AutocompleteOS(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\tcompletions := []string{\"linux\", \"windows\"}\n\treturn completions, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteJSONFormat - Autocomplete format flag option.\n// -> \"json\".\nfunc AutocompleteJSONFormat(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {\n\treturn []string{\"json\"}, cobra.ShellCompDirectiveNoFileComp\n}\n\n// AutocompleteOneArg - Autocomplete one random arg.\nfunc AutocompleteOneArg(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) {\n\tif len(args) == 1 {\n\t\treturn nil, cobra.ShellCompDirectiveDefault\n\t}\n\treturn nil, cobra.ShellCompDirectiveNoFileComp\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/flag/flag.go",
    "content": "package flag\n\nimport (\n\t\"strconv\"\n\n\t\"github.com/spf13/pflag\"\n)\n\n// OptionalBool is a boolean with a separate presence flag and value.\ntype OptionalBool struct {\n\tpresent bool\n\tvalue   bool\n}\n\n// Present returns the bool's presence flag.\nfunc (ob *OptionalBool) Present() bool {\n\treturn ob.present\n}\n\n// Value returns the bool's value. Should only be used if Present() is true.\nfunc (ob *OptionalBool) Value() bool {\n\treturn ob.value\n}\n\n// optionalBool is a cli.Generic == flag.Value implementation equivalent to\n// the one underlying flag.Bool, except that it records whether the flag has been set.\n// This is distinct from optionalBool to (pretend to) force callers to use\n// optionalBoolFlag.\ntype optionalBoolValue OptionalBool\n\n// OptionalBoolFlag creates new flag for an optional in the specified flag with\n// the specified name and usage.\nfunc OptionalBoolFlag(fs *pflag.FlagSet, p *OptionalBool, name, usage string) *pflag.Flag {\n\tflag := fs.VarPF(internalNewOptionalBoolValue(p), name, \"\", usage)\n\tflag.NoOptDefVal = \"true\"\n\tflag.DefValue = \"false\"\n\treturn flag\n}\n\n// WARNING: Do not directly use this method to define optionalBool flag.\n// Caller should use optionalBoolFlag.\nfunc internalNewOptionalBoolValue(p *OptionalBool) pflag.Value {\n\tp.present = false\n\treturn (*optionalBoolValue)(p)\n}\n\n// Set parses the string to a bool and sets it.\nfunc (ob *optionalBoolValue) Set(s string) error {\n\tv, err := strconv.ParseBool(s)\n\tif err != nil {\n\t\treturn err\n\t}\n\tob.value = v\n\tob.present = true\n\treturn nil\n}\n\n// String returns the string representation of the string.\nfunc (ob *optionalBoolValue) String() string {\n\tif !ob.present {\n\t\treturn \"\" // This is, sadly, not round-trip safe: --flag is interpreted as --flag=true\n\t}\n\treturn strconv.FormatBool(ob.value)\n}\n\n// Type returns the type.\nfunc (ob *optionalBoolValue) Type() string {\n\treturn \"bool\"\n}\n\n// IsBoolFlag indicates that it's a bool flag.\nfunc (ob *optionalBoolValue) IsBoolFlag() bool {\n\treturn true\n}\n\n// OptionalString is a string with a separate presence flag.\ntype OptionalString struct {\n\tpresent bool\n\tvalue   string\n}\n\n// Present returns the strings's presence flag.\nfunc (os *OptionalString) Present() bool {\n\treturn os.present\n}\n\n// Value returns the string's value. Should only be used if Present() is true.\nfunc (os *OptionalString) Value() string {\n\treturn os.value\n}\n\n// optionalString is a cli.Generic == flag.Value implementation equivalent to\n// the one underlying flag.String, except that it records whether the flag has been set.\n// This is distinct from optionalString to (pretend to) force callers to use\n// newoptionalString.\ntype optionalStringValue OptionalString\n\n// NewOptionalStringValue returns a pflag.Value for the string.\nfunc NewOptionalStringValue(p *OptionalString) pflag.Value {\n\tp.present = false\n\treturn (*optionalStringValue)(p)\n}\n\n// Set sets the string.\nfunc (ob *optionalStringValue) Set(s string) error {\n\tob.value = s\n\tob.present = true\n\treturn nil\n}\n\n// String returns the string if present.\nfunc (ob *optionalStringValue) String() string {\n\tif !ob.present {\n\t\treturn \"\" // This is, sadly, not round-trip safe: --flag= is interpreted as {present:true, value:\"\"}\n\t}\n\treturn ob.value\n}\n\n// Type returns the string type.\nfunc (ob *optionalStringValue) Type() string {\n\treturn \"string\"\n}\n\n// OptionalInt is a int with a separate presence flag.\ntype OptionalInt struct {\n\tpresent bool\n\tvalue   int\n}\n\n// Present returns the int's presence flag.\nfunc (oi *OptionalInt) Present() bool {\n\treturn oi.present\n}\n\n// Value returns the int's value. Should only be used if Present() is true.\nfunc (oi *OptionalInt) Value() int {\n\treturn oi.value\n}\n\n// optionalInt is a cli.Generic == flag.Value implementation equivalent to\n// the one underlying flag.Int, except that it records whether the flag has been set.\n// This is distinct from optionalInt to (pretend to) force callers to use\n// newoptionalIntValue.\ntype optionalIntValue OptionalInt\n\n// NewOptionalIntValue returns the pflag.Value of the int.\nfunc NewOptionalIntValue(p *OptionalInt) pflag.Value {\n\tp.present = false\n\treturn (*optionalIntValue)(p)\n}\n\n// Set parses the string to an int and sets it.\nfunc (ob *optionalIntValue) Set(s string) error {\n\tv, err := strconv.ParseInt(s, 0, strconv.IntSize)\n\tif err != nil {\n\t\treturn err\n\t}\n\tob.value = int(v)\n\tob.present = true\n\treturn nil\n}\n\n// String returns the string representation of the int.\nfunc (ob *optionalIntValue) String() string {\n\tif !ob.present {\n\t\treturn \"\" // If the value is not present, just return an empty string, any other value wouldn't make sense.\n\t}\n\treturn strconv.Itoa(ob.value)\n}\n\n// Type returns the int's type.\nfunc (ob *optionalIntValue) Type() string {\n\treturn \"int\"\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/handler.go",
    "content": "package jsonproxy\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/image\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/transports/alltransports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// handler is the core request processing logic.\ntype handler struct {\n\t// lock protects everything else in this structure.\n\tlock sync.Mutex\n\n\t// Dependency injection functions.\n\tgetSystemContext func() (*types.SystemContext, error)\n\tgetPolicyContext func() (*signature.PolicyContext, error)\n\tlogger           logrus.FieldLogger\n\n\t// Internal state.\n\tsysctx      *types.SystemContext\n\tcache       types.BlobInfoCache\n\timageSerial uint64\n\timages      map[uint64]*openImage\n\tactivePipes map[uint32]*activePipe\n}\n\n// newHandler creates a new handler with the given dependencies.\nfunc newHandler(getSystemContext func() (*types.SystemContext, error), getPolicyContext func() (*signature.PolicyContext, error), logger logrus.FieldLogger) *handler {\n\treturn &handler{\n\t\tgetSystemContext: getSystemContext,\n\t\tgetPolicyContext: getPolicyContext,\n\t\tlogger:           logger,\n\t\timages:           make(map[uint64]*openImage),\n\t\tactivePipes:      make(map[uint32]*activePipe),\n\t}\n}\n\n// close releases all resources associated with this handler.\nfunc (h *handler) close() {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tfor _, image := range h.images {\n\t\tif err := image.src.Close(); err != nil {\n\t\t\t// This shouldn't be fatal\n\t\t\th.logger.Warnf(\"Failed to close image: %v\", err)\n\t\t}\n\t}\n}\n\n// Initialize performs one-time initialization, and returns the protocol version.\nfunc (h *handler) Initialize(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif len(args) != 0 {\n\t\treturn ret, errors.New(\"invalid request, expecting zero arguments\")\n\t}\n\n\tif h.sysctx != nil {\n\t\treturn ret, errors.New(\"already initialized\")\n\t}\n\n\tsysctx, err := h.getSystemContext()\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\th.sysctx = sysctx\n\th.cache = blobinfocache.DefaultCache(sysctx)\n\n\tr := replyBuf{\n\t\tvalue: protocolVersion,\n\t}\n\treturn r, nil\n}\n\n// OpenImage accepts a string image reference i.e. TRANSPORT:REF - like `skopeo copy`.\n// The return value is an opaque integer handle.\nfunc (h *handler) OpenImage(ctx context.Context, args []any) (replyBuf, error) {\n\treturn h.openImageImpl(ctx, args, false)\n}\n\nfunc (h *handler) openImageImpl(ctx context.Context, args []any, allowNotFound bool) (retReplyBuf replyBuf, retErr error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 1 {\n\t\treturn ret, errors.New(\"invalid request, expecting one argument\")\n\t}\n\timageref, ok := args[0].(string)\n\tif !ok {\n\t\treturn ret, fmt.Errorf(\"expecting string imageref, not %T\", args[0])\n\t}\n\n\timgRef, err := alltransports.ParseImageName(imageref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timgsrc, err := imgRef.NewImageSource(ctx, h.sysctx)\n\tif err != nil {\n\t\tif allowNotFound && isNotFoundImageError(err) {\n\t\t\tret.value = sentinelImageID\n\t\t\treturn ret, nil\n\t\t}\n\t\treturn ret, err\n\t}\n\n\tpolicyContext, err := h.getPolicyContext()\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tdefer func() {\n\t\tif err := policyContext.Destroy(); err != nil {\n\t\t\tretErr = noteCloseFailure(retErr, \"tearing down policy context\", err)\n\t\t}\n\t}()\n\n\tunparsedTopLevel := image.UnparsedInstance(imgsrc, nil)\n\tallowed, err := policyContext.IsRunningImageAllowed(ctx, unparsedTopLevel)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tif !allowed {\n\t\treturn ret, errors.New(\"internal inconsistency: policy verification failed without returning an error\")\n\t}\n\n\t// Note that we never return zero as an imageid; this code doesn't yet\n\t// handle overflow though.\n\th.imageSerial++\n\topenimg := &openImage{\n\t\tid:  h.imageSerial,\n\t\tsrc: imgsrc,\n\t}\n\th.images[openimg.id] = openimg\n\tret.value = openimg.id\n\n\treturn ret, nil\n}\n\n// OpenImageOptional accepts a string image reference i.e. TRANSPORT:REF - like `skopeo copy`.\n// The return value is an opaque integer handle.  If the image does not exist, zero\n// is returned.\nfunc (h *handler) OpenImageOptional(ctx context.Context, args []any) (replyBuf, error) {\n\treturn h.openImageImpl(ctx, args, true)\n}\n\nfunc (h *handler) CloseImage(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 1 {\n\t\treturn ret, errors.New(\"invalid request, expecting one argument\")\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timgref.src.Close()\n\tdelete(h.images, imgref.id)\n\n\treturn ret, nil\n}\n\n// parseUint64 validates that a number fits inside a JavaScript safe integer.\nfunc parseUint64(v any) (uint64, error) {\n\tf, ok := v.(float64)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"expecting numeric, not %T\", v)\n\t}\n\tif f > maxJSONFloat {\n\t\treturn 0, fmt.Errorf(\"out of range integer for numeric %f\", f)\n\t}\n\treturn uint64(f), nil\n}\n\nfunc (h *handler) parseImageFromID(v any) (*openImage, error) {\n\timgid, err := parseUint64(v)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif imgid == sentinelImageID {\n\t\treturn nil, errors.New(\"invalid imageid value of zero\")\n\t}\n\timgref, ok := h.images[imgid]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"no image %v\", imgid)\n\t}\n\treturn imgref, nil\n}\n\nfunc (h *handler) allocPipe() (*os.File, *activePipe, error) {\n\tpiper, pipew, err := os.Pipe()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tf := activePipe{\n\t\tw: pipew,\n\t}\n\th.activePipes[uint32(pipew.Fd())] = &f\n\tf.wg.Add(1)\n\treturn piper, &f, nil\n}\n\n// returnBytes generates a return pipe() from a byte array.\n// In the future it might be nicer to return this via memfd_create().\nfunc (h *handler) returnBytes(retval any, buf []byte) (replyBuf, error) {\n\tvar ret replyBuf\n\tpiper, f, err := h.allocPipe()\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\tgo func() {\n\t\t// Signal completion when we return\n\t\tdefer f.wg.Done()\n\t\t_, err = io.Copy(f.w, bytes.NewReader(buf))\n\t\tif err != nil {\n\t\t\tf.err = err\n\t\t}\n\t}()\n\n\tret.value = retval\n\tret.fd = piper\n\tret.pipeid = uint32(f.w.Fd())\n\treturn ret, nil\n}\n\n// cacheTargetManifest is invoked when GetManifest or GetConfig is invoked\n// the first time for a given image.  If the requested image is a manifest\n// list, this function resolves it to the image matching the calling process'\n// operating system and architecture.\n//\n// TODO: Add GetRawManifest or so that exposes manifest lists.\nfunc (h *handler) cacheTargetManifest(ctx context.Context, img *openImage) error {\n\tif img.cachedimg != nil {\n\t\treturn nil\n\t}\n\tunparsedToplevel := image.UnparsedInstance(img.src, nil)\n\tmfest, manifestType, err := unparsedToplevel.Manifest(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar target *image.UnparsedImage\n\tif manifest.MIMETypeIsMultiImage(manifestType) {\n\t\tmanifestList, err := manifest.ListFromBlob(mfest, manifestType)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinstanceDigest, err := manifestList.ChooseInstance(h.sysctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttarget = image.UnparsedInstance(img.src, &instanceDigest)\n\t} else {\n\t\ttarget = unparsedToplevel\n\t}\n\tcachedimg, err := image.FromUnparsedImage(ctx, h.sysctx, target)\n\tif err != nil {\n\t\treturn err\n\t}\n\timg.cachedimg = cachedimg\n\treturn nil\n}\n\n// GetManifest returns a copy of the manifest, converted to OCI format, along with the original digest.\n// Manifest lists are resolved to the current operating system and architecture.\nfunc (h *handler) GetManifest(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 1 {\n\t\treturn ret, errors.New(\"invalid request, expecting one argument\")\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\terr = h.cacheTargetManifest(ctx, imgref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timg := imgref.cachedimg\n\n\trawManifest, manifestType, err := img.Manifest(ctx)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\t// We only support OCI and docker2schema2.  We know docker2schema2 can be easily+cheaply\n\t// converted into OCI, so consumers only need to see OCI.\n\tswitch manifestType {\n\tcase imgspecv1.MediaTypeImageManifest, manifest.DockerV2Schema2MediaType:\n\t\tbreak\n\t// Explicitly reject e.g. docker schema 1 type with a \"legacy\" note\n\tcase manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType:\n\t\treturn ret, fmt.Errorf(\"unsupported legacy manifest MIME type: %s\", manifestType)\n\tdefault:\n\t\treturn ret, fmt.Errorf(\"unsupported manifest MIME type: %s\", manifestType)\n\t}\n\n\t// We always return the original digest, as that's what clients need to do pull-by-digest\n\t// and in general identify the image.\n\tdigest, err := manifest.Digest(rawManifest)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tvar serialized []byte\n\t// But, we convert to OCI format on the wire if it's not already.  The idea here is that by reusing the containers/image\n\t// stack, clients to this proxy can pretend the world is OCI only, and not need to care about e.g.\n\t// docker schema and MIME types.\n\tif manifestType != imgspecv1.MediaTypeImageManifest {\n\t\tmanifestUpdates := types.ManifestUpdateOptions{ManifestMIMEType: imgspecv1.MediaTypeImageManifest}\n\t\tociImage, err := img.UpdatedImage(ctx, manifestUpdates)\n\t\tif err != nil {\n\t\t\treturn ret, err\n\t\t}\n\n\t\tociSerialized, _, err := ociImage.Manifest(ctx)\n\t\tif err != nil {\n\t\t\treturn ret, err\n\t\t}\n\t\tserialized = ociSerialized\n\t} else {\n\t\tserialized = rawManifest\n\t}\n\treturn h.returnBytes(digest, serialized)\n}\n\n// GetFullConfig returns a copy of the image configuration, converted to OCI format.\n// https://github.com/opencontainers/image-spec/blob/main/config.md\nfunc (h *handler) GetFullConfig(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 1 {\n\t\treturn ret, errors.New(\"invalid request, expecting: [imgid]\")\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\terr = h.cacheTargetManifest(ctx, imgref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timg := imgref.cachedimg\n\n\tconfig, err := img.OCIConfig(ctx)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tserialized, err := json.Marshal(&config)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\treturn h.returnBytes(nil, serialized)\n}\n\n// GetConfig returns a copy of the container runtime configuration, converted to OCI format.\n// Note that due to a historical mistake, this returns not the full image configuration,\n// but just the container runtime configuration.  You should use GetFullConfig instead.\nfunc (h *handler) GetConfig(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 1 {\n\t\treturn ret, errors.New(\"invalid request, expecting: [imgid]\")\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\terr = h.cacheTargetManifest(ctx, imgref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timg := imgref.cachedimg\n\n\tconfig, err := img.OCIConfig(ctx)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tserialized, err := json.Marshal(&config.Config)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\treturn h.returnBytes(nil, serialized)\n}\n\n// GetBlob fetches a blob, performing digest verification.\nfunc (h *handler) GetBlob(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 3 {\n\t\treturn ret, fmt.Errorf(\"found %d args, expecting (imgid, digest, size)\", len(args))\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tdigestStr, ok := args[1].(string)\n\tif !ok {\n\t\treturn ret, errors.New(\"expecting string blobid\")\n\t}\n\tsize, err := parseUint64(args[2])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\td, err := digest.Parse(digestStr)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tblobr, blobSize, err := imgref.src.GetBlob(ctx, types.BlobInfo{Digest: d, Size: int64(size)}, h.cache)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\tpiper, f, err := h.allocPipe()\n\tif err != nil {\n\t\tblobr.Close()\n\t\treturn ret, err\n\t}\n\tgo func() {\n\t\t// Signal completion when we return\n\t\tdefer blobr.Close()\n\t\tdefer f.wg.Done()\n\t\tverifier := d.Verifier()\n\t\ttr := io.TeeReader(blobr, verifier)\n\t\tn, err := io.Copy(f.w, tr)\n\t\tif err != nil {\n\t\t\tf.err = err\n\t\t\treturn\n\t\t}\n\t\tif n != int64(size) {\n\t\t\tf.err = fmt.Errorf(\"expected %d bytes in blob, got %d\", size, n)\n\t\t}\n\t\tif !verifier.Verified() {\n\t\t\tf.err = fmt.Errorf(\"corrupted blob, expecting %s\", d.String())\n\t\t}\n\t}()\n\n\tret.value = blobSize\n\tret.fd = piper\n\tret.pipeid = uint32(f.w.Fd())\n\treturn ret, nil\n}\n\n// GetRawBlob can be viewed as a more general purpose successor\n// to GetBlob. First, it does not verify the digest, which in\n// some cases is unnecessary as the client would prefer to do it.\n//\n// It also does not use the \"FinishPipe\" API call, but instead\n// returns *two* file descriptors, one for errors and one for data.\n//\n// On (initial) success, the return value provided to the client is the size of the blob.\nfunc (h *handler) GetRawBlob(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\tif len(args) != 2 {\n\t\treturn ret, fmt.Errorf(\"found %d args, expecting (imgid, digest)\", len(args))\n\t}\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tdigestStr, ok := args[1].(string)\n\tif !ok {\n\t\treturn ret, errors.New(\"expecting string blobid\")\n\t}\n\n\td, err := digest.Parse(digestStr)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tblobr, blobSize, err := imgref.src.GetBlob(ctx, types.BlobInfo{Digest: d, Size: int64(-1)}, h.cache)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\t// Note this doesn't call allocPipe; we're not using the FinishPipe infrastructure.\n\tpiper, pipew, err := os.Pipe()\n\tif err != nil {\n\t\tblobr.Close()\n\t\treturn ret, err\n\t}\n\terrpipeR, errpipeW, err := os.Pipe()\n\tif err != nil {\n\t\tpiper.Close()\n\t\tpipew.Close()\n\t\tblobr.Close()\n\t\treturn ret, err\n\t}\n\t// Asynchronous worker doing a copy\n\tgo func() {\n\t\t// We own the read from registry, and write pipe objects\n\t\tdefer blobr.Close()\n\t\tdefer pipew.Close()\n\t\tdefer errpipeW.Close()\n\t\th.logger.Debugf(\"Copying blob to client: %d bytes\", blobSize)\n\t\t_, err := io.Copy(pipew, blobr)\n\t\t// Handle errors here by serializing a JSON error back over\n\t\t// the error channel. In either case, both file descriptors\n\t\t// will be closed, signaling the completion of the operation.\n\t\tif err != nil {\n\t\t\th.logger.Debugf(\"Sending error to client: %v\", err)\n\t\t\tserializedErr := newProxyError(err)\n\t\t\tbuf, marshalErr := json.Marshal(serializedErr)\n\t\t\tif marshalErr != nil {\n\t\t\t\th.logger.Errorf(\"Failed to marshal error: %v\", marshalErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t_, writeErr := errpipeW.Write(buf)\n\t\t\tif writeErr != nil && !errors.Is(writeErr, syscall.EPIPE) {\n\t\t\t\th.logger.Debugf(\"Writing to client: %v\", writeErr)\n\t\t\t}\n\t\t}\n\t\th.logger.Debugf(\"Completed GetRawBlob operation\")\n\t}()\n\n\tret.value = blobSize\n\tret.fd = piper\n\tret.errfd = errpipeR\n\treturn ret, nil\n}\n\n// GetLayerInfo returns data about the layers of an image, useful for reading the layer contents.\n//\n// This is the same as GetLayerInfoPiped, but returns its contents inline. This is subject to\n// failure for large images (because we use SOCK_SEQPACKET which has a maximum buffer size)\n// and is hence only retained for backwards compatibility. Callers are expected to use\n// the semver to know whether they can call the new API.\nfunc (h *handler) GetLayerInfo(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\n\tif len(args) != 1 {\n\t\treturn ret, fmt.Errorf(\"found %d args, expecting (imgid)\", len(args))\n\t}\n\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\terr = h.cacheTargetManifest(ctx, imgref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timg := imgref.cachedimg\n\n\tlayerInfos, err := img.LayerInfosForCopy(ctx)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\tif layerInfos == nil {\n\t\tlayerInfos = img.LayerInfos()\n\t}\n\n\tlayers := make([]convertedLayerInfo, 0, len(layerInfos))\n\tfor _, layer := range layerInfos {\n\t\tlayers = append(layers, convertedLayerInfo{layer.Digest, layer.Size, layer.MediaType})\n\t}\n\n\tret.value = layers\n\treturn ret, nil\n}\n\n// GetLayerInfoPiped returns data about the layers of an image, useful for reading the layer contents.\n//\n// This needs to be called since the data returned by GetManifest() does not allow to correctly\n// calling GetBlob() for the containers-storage: transport (which doesn't store the original compressed\n// representations referenced in the manifest).\nfunc (h *handler) GetLayerInfoPiped(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tif h.sysctx == nil {\n\t\treturn ret, errors.New(\"client error: must invoke Initialize\")\n\t}\n\n\tif len(args) != 1 {\n\t\treturn ret, fmt.Errorf(\"found %d args, expecting (imgid)\", len(args))\n\t}\n\n\timgref, err := h.parseImageFromID(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\terr = h.cacheTargetManifest(ctx, imgref)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\timg := imgref.cachedimg\n\n\tlayerInfos, err := img.LayerInfosForCopy(ctx)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\n\tif layerInfos == nil {\n\t\tlayerInfos = img.LayerInfos()\n\t}\n\n\tlayers := make([]convertedLayerInfo, 0, len(layerInfos))\n\tfor _, layer := range layerInfos {\n\t\tlayers = append(layers, convertedLayerInfo{layer.Digest, layer.Size, layer.MediaType})\n\t}\n\n\tserialized, err := json.Marshal(&layers)\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\treturn h.returnBytes(nil, serialized)\n}\n\n// FinishPipe waits for the worker goroutine to finish, and closes the write side of the pipe.\nfunc (h *handler) FinishPipe(ctx context.Context, args []any) (replyBuf, error) {\n\th.lock.Lock()\n\tdefer h.lock.Unlock()\n\n\tvar ret replyBuf\n\n\tpipeidv, err := parseUint64(args[0])\n\tif err != nil {\n\t\treturn ret, err\n\t}\n\tpipeid := uint32(pipeidv)\n\n\tf, ok := h.activePipes[pipeid]\n\tif !ok {\n\t\treturn ret, fmt.Errorf(\"finishpipe: no active pipe %d\", pipeid)\n\t}\n\n\t// Wait for the goroutine to complete\n\tf.wg.Wait()\n\th.logger.Debug(\"Completed pipe goroutine\")\n\t// And only now do we close the write half; this forces the client to call this API\n\tf.w.Close()\n\t// Propagate any errors from the goroutine worker\n\terr = f.err\n\tdelete(h.activePipes, pipeid)\n\treturn ret, err\n}\n\n// processRequest dispatches a remote request.\n// replyBuf is the result of the invocation.\n// terminate should be true if processing of requests should halt.\nfunc (h *handler) processRequest(ctx context.Context, readBytes []byte) (rb replyBuf, terminate bool, err error) {\n\tvar req request\n\n\t// Parse the request JSON\n\tif err = json.Unmarshal(readBytes, &req); err != nil {\n\t\terr = fmt.Errorf(\"invalid request: %v\", err)\n\t\treturn\n\t}\n\th.logger.Debugf(\"Executing method %s\", req.Method)\n\n\t// Dispatch on the method\n\tswitch req.Method {\n\tcase \"Initialize\":\n\t\trb, err = h.Initialize(ctx, req.Args)\n\tcase \"OpenImage\":\n\t\trb, err = h.OpenImage(ctx, req.Args)\n\tcase \"OpenImageOptional\":\n\t\trb, err = h.OpenImageOptional(ctx, req.Args)\n\tcase \"CloseImage\":\n\t\trb, err = h.CloseImage(ctx, req.Args)\n\tcase \"GetManifest\":\n\t\trb, err = h.GetManifest(ctx, req.Args)\n\tcase \"GetConfig\":\n\t\trb, err = h.GetConfig(ctx, req.Args)\n\tcase \"GetFullConfig\":\n\t\trb, err = h.GetFullConfig(ctx, req.Args)\n\tcase \"GetBlob\":\n\t\trb, err = h.GetBlob(ctx, req.Args)\n\tcase \"GetRawBlob\":\n\t\trb, err = h.GetRawBlob(ctx, req.Args)\n\tcase \"GetLayerInfo\":\n\t\trb, err = h.GetLayerInfo(ctx, req.Args)\n\tcase \"GetLayerInfoPiped\":\n\t\trb, err = h.GetLayerInfoPiped(ctx, req.Args)\n\tcase \"FinishPipe\":\n\t\trb, err = h.FinishPipe(ctx, req.Args)\n\tcase \"Shutdown\":\n\t\tterminate = true\n\t// NOTE: If you add a method here, you should very likely be bumping the\n\t// const protocolVersion above.\n\tdefault:\n\t\terr = fmt.Errorf(\"unknown method: %s\", req.Method)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/proxy.go",
    "content": "// EXPERIMENTAL: This package is experimental and subject to breaking changes.\n// The APIs may change in incompatible ways without notice. Use with caution\n// in production environments.\npackage jsonproxy\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// options holds the internal configuration for a Manager.\ntype options struct {\n\tgetSystemContext func() (*types.SystemContext, error)\n\tgetPolicyContext func() (*signature.PolicyContext, error)\n\tlogger           logrus.FieldLogger\n}\n\n// Option configures a Manager. Use the With* functions to create Options.\n//\n// EXPERIMENTAL: This type is experimental and subject to breaking changes.\ntype Option func(*options)\n\n// WithSystemContext sets the function used to obtain a SystemContext for image operations.\n//\n// EXPERIMENTAL: This function is experimental and subject to breaking changes.\nfunc WithSystemContext(fn func() (*types.SystemContext, error)) Option {\n\treturn func(o *options) {\n\t\to.getSystemContext = fn\n\t}\n}\n\n// WithPolicyContext sets the function used to obtain a PolicyContext for signature verification.\n//\n// EXPERIMENTAL: This function is experimental and subject to breaking changes.\nfunc WithPolicyContext(fn func() (*signature.PolicyContext, error)) Option {\n\treturn func(o *options) {\n\t\to.getPolicyContext = fn\n\t}\n}\n\n// WithLogger sets the logger for the Manager. If not provided, the logrus\n// standard logger is used.\n//\n// EXPERIMENTAL: This function is experimental and subject to breaking changes.\nfunc WithLogger(logger logrus.FieldLogger) Option {\n\treturn func(o *options) {\n\t\to.logger = logger\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/proxy_unix.go",
    "content": "//go:build !windows\n\npackage jsonproxy\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// manager is the proxy server for managing JSON-RPC proxy operations.\n// Use NewManager to create one.\ntype manager struct {\n\thandler *handler\n\tlogger  logrus.FieldLogger\n}\n\n// NewManager creates a new proxy manager with the given options.\n// WithSystemContext and WithPolicyContext are required.\n//\n// EXPERIMENTAL: This function is experimental and subject to breaking changes.\nfunc NewManager(opts ...Option) (*manager, error) {\n\to := &options{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\tif o.getSystemContext == nil {\n\t\treturn nil, errors.New(\"WithSystemContext is required\")\n\t}\n\tif o.getPolicyContext == nil {\n\t\treturn nil, errors.New(\"WithPolicyContext is required\")\n\t}\n\tif o.logger == nil {\n\t\to.logger = logrus.StandardLogger()\n\t}\n\n\thandler := newHandler(o.getSystemContext, o.getPolicyContext, o.logger)\n\n\treturn &manager{\n\t\thandler: handler,\n\t\tlogger:  o.logger,\n\t}, nil\n}\n\n// Serve runs the proxy server, reading requests from the given socket file descriptor.\nfunc (m *manager) Serve(ctx context.Context, sockfd int) error {\n\tdefer m.handler.close()\n\n\t// Convert the socket FD passed by client into a net.FileConn\n\tfd := os.NewFile(uintptr(sockfd), \"sock\")\n\tfconn, err := net.FileConn(fd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tconn, ok := fconn.(*net.UnixConn)\n\tif !ok {\n\t\treturn fmt.Errorf(\"expected unix connection, got %T\", fconn)\n\t}\n\n\t// Allocate a buffer to copy the packet into\n\tbuf := make([]byte, maxMsgSize)\n\tfor {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tdefault:\n\t\t}\n\n\t\tn, _, err := conn.ReadFrom(buf)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"reading socket: %v\", err)\n\t\t}\n\t\treadbuf := buf[0:n]\n\n\t\trb, terminate, err := m.handler.processRequest(ctx, readbuf)\n\t\tif terminate {\n\t\t\tm.logger.Debug(\"terminating\")\n\t\t\treturn nil\n\t\t}\n\n\t\tif err := rb.send(conn, err); err != nil {\n\t\t\treturn fmt.Errorf(\"writing to socket: %w\", err)\n\t\t}\n\t}\n}\n\n// Close releases all resources associated with this manager.\nfunc (m *manager) Close() error {\n\tm.handler.close()\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/types.go",
    "content": "package jsonproxy\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/common/pkg/retry\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// protocolVersion is semantic version of the protocol used by this proxy.\n// The first version of the protocol has major version 0.2 to signify a\n// departure from the original code which used HTTP.\n//\n// When bumping this, please also update the man page.\nconst protocolVersion = \"0.2.8\"\n\n// maxMsgSize is the current limit on a packet size.\n// Note that all non-metadata (i.e. payload data) is sent over a pipe.\nconst maxMsgSize = 32 * 1024\n\n// maxJSONFloat is ECMA Number.MAX_SAFE_INTEGER\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER\n// We hard error if the input JSON numbers we expect to be\n// integers are above this.\nconst maxJSONFloat = float64(uint64(1)<<53 - 1)\n\n// sentinelImageID represents \"image not found\" on the wire.\nconst sentinelImageID = 0\n\n// request is the JSON serialization of a function call.\ntype request struct {\n\t// Method is the name of the function.\n\tMethod string `json:\"method\"`\n\t// Args is the arguments (parsed inside the function).\n\tArgs []any `json:\"args\"`\n}\n\ntype proxyErrorCode string\n\nconst (\n\t// proxyErrPipe means we got EPIPE writing to a pipe owned by the client.\n\tproxyErrPipe proxyErrorCode = \"EPIPE\"\n\t// proxyErrRetryable can be used by clients to automatically retry operations.\n\tproxyErrRetryable proxyErrorCode = \"retryable\"\n\t// proxyErrOther represents all other errors.\n\tproxyErrOther proxyErrorCode = \"other\"\n)\n\n// proxyError is serialized over the errfd channel for GetRawBlob.\ntype proxyError struct {\n\tCode    proxyErrorCode `json:\"code\"`\n\tMessage string         `json:\"message\"`\n}\n\n// reply is serialized to JSON as the return value from a function call.\ntype reply struct {\n\t// Success is true if and only if the call succeeded.\n\tSuccess bool `json:\"success\"`\n\t// Value is an arbitrary value (or values, as array/map) returned from the call.\n\tValue any `json:\"value\"`\n\t// PipeID is an index into open pipes, and should be passed to FinishPipe.\n\tPipeID uint32 `json:\"pipeid\"`\n\t// ErrorCode will be non-empty if error is set (new in 0.2.8).\n\tErrorCode proxyErrorCode `json:\"error_code\"`\n\t// Error should be non-empty if Success == false.\n\tError string `json:\"error\"`\n}\n\n// replyBuf is our internal deserialization of reply plus optional fd.\ntype replyBuf struct {\n\t// value will be converted to a reply Value.\n\tvalue any\n\t// fd is the read half of a pipe, passed back to the client for additional data.\n\tfd *os.File\n\t// errfd will be a serialization of error state. This is optional and is currently\n\t// only used by GetRawBlob.\n\terrfd *os.File\n\t// pipeid will be provided to the client as PipeID, an index into our open pipes.\n\tpipeid uint32\n}\n\n// activePipe is an open pipe to the client\n// that contains an error value.\ntype activePipe struct {\n\t// w is the write half of the pipe.\n\tw *os.File\n\t// wg is completed when our worker goroutine is done.\n\twg sync.WaitGroup\n\t// err may be set in our worker goroutine.\n\terr error\n}\n\n// openImage is an opened image reference.\ntype openImage struct {\n\t// id is an opaque integer handle.\n\tid        uint64\n\tsrc       types.ImageSource\n\tcachedimg types.Image\n}\n\n// convertedLayerInfo is the reduced form of the OCI type BlobInfo\n// used in the return value of GetLayerInfo.\ntype convertedLayerInfo struct {\n\tDigest    digest.Digest `json:\"digest\"`\n\tSize      int64         `json:\"size\"`\n\tMediaType string        `json:\"media_type\"`\n}\n\n// mapProxyErrorCode turns an error into a known string value.\nfunc mapProxyErrorCode(err error) proxyErrorCode {\n\tswitch {\n\tcase err == nil:\n\t\treturn \"\"\n\tcase errors.Is(err, syscall.EPIPE):\n\t\treturn proxyErrPipe\n\tcase retry.IsErrorRetryable(err):\n\t\treturn proxyErrRetryable\n\tdefault:\n\t\treturn proxyErrOther\n\t}\n}\n\n// newProxyError creates a serializable structure for\n// the client containing a mapped error code based\n// on the error type, plus its value as a string.\nfunc newProxyError(err error) proxyError {\n\treturn proxyError{\n\t\tCode:    mapProxyErrorCode(err),\n\t\tMessage: fmt.Sprintf(\"%v\", err),\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/types_unix.go",
    "content": "//go:build unix\n\npackage jsonproxy\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"net\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// send writes a reply buffer to the socket.\nfunc (buf replyBuf) send(conn *net.UnixConn, err error) error {\n\tlogrus.Debugf(\"Sending reply: err=%v value=%v pipeid=%v datafd=%v errfd=%v\", err, buf.value, buf.pipeid, buf.fd, buf.errfd)\n\t// We took ownership of these FDs, so close when we're done sending them or on error\n\tdefer func() {\n\t\tif buf.fd != nil {\n\t\t\tbuf.fd.Close()\n\t\t}\n\t\tif buf.errfd != nil {\n\t\t\tbuf.errfd.Close()\n\t\t}\n\t}()\n\treplyToSerialize := reply{\n\t\tSuccess: err == nil,\n\t\tValue:   buf.value,\n\t\tPipeID:  buf.pipeid,\n\t}\n\tif err != nil {\n\t\treplyToSerialize.ErrorCode = mapProxyErrorCode(err)\n\t\treplyToSerialize.Error = err.Error()\n\t}\n\tserializedReply, err := json.Marshal(&replyToSerialize)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Copy the FD number(s) to the socket ancillary buffer\n\tfds := make([]int, 0)\n\tif buf.fd != nil {\n\t\tfds = append(fds, int(buf.fd.Fd()))\n\t}\n\tif buf.errfd != nil {\n\t\tfds = append(fds, int(buf.errfd.Fd()))\n\t}\n\toob := syscall.UnixRights(fds...)\n\tn, oobn, err := conn.WriteMsgUnix(serializedReply, oob, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Validate that we sent the full packet\n\tif n != len(serializedReply) || oobn != len(oob) {\n\t\treturn io.ErrShortWrite\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/json-proxy/utils.go",
    "content": "package jsonproxy\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tdockerdistributionerrcode \"github.com/docker/distribution/registry/api/errcode\"\n\tdockerdistributionapi \"github.com/docker/distribution/registry/api/v2\"\n\tociarchive \"go.podman.io/image/v5/oci/archive\"\n\tocilayout \"go.podman.io/image/v5/oci/layout\"\n\t\"go.podman.io/image/v5/storage\"\n)\n\n// noteCloseFailure helps with handling close errors in defer statements.\nfunc noteCloseFailure(err error, description string, closeErr error) error {\n\t// We don't accept a Closer() and close it ourselves because signature.PolicyContext has .Destroy(), not .Close().\n\t// This also makes it harder for a caller to do\n\t//     defer noteCloseFailure(returnedErr, …)\n\t// which doesn't use the right value of returnedErr, and doesn't update it.\n\tif err == nil {\n\t\treturn fmt.Errorf(\"%s: %w\", description, closeErr)\n\t}\n\t// In this case we prioritize the primary error for use with %w; closeErr is usually less relevant, or might be a consequence of the primary error.\n\treturn fmt.Errorf(\"%w (%s: %v)\", err, description, closeErr)\n}\n\n// isNotFoundImageError checks if an error indicates that an image was not found.\nfunc isNotFoundImageError(err error) bool {\n\tvar layoutImageNotFoundError ocilayout.ImageNotFoundError\n\tvar archiveImageNotFoundError ociarchive.ImageNotFoundError\n\treturn isDockerManifestUnknownError(err) ||\n\t\terrors.Is(err, storage.ErrNoSuchImage) ||\n\t\terrors.As(err, &layoutImageNotFoundError) ||\n\t\terrors.As(err, &archiveImageNotFoundError)\n}\n\n// isDockerManifestUnknownError checks if an error is a Docker manifest unknown error.\nfunc isDockerManifestUnknownError(err error) bool {\n\tvar ec dockerdistributionerrcode.ErrorCoder\n\tif !errors.As(err, &ec) {\n\t\treturn false\n\t}\n\treturn ec.ErrorCode() == dockerdistributionapi.ErrorCodeManifestUnknown\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/password/password_supported.go",
    "content": "//go:build linux || darwin || freebsd || netbsd\n\npackage password\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\tterminal \"golang.org/x/term\"\n)\n\nvar ErrInterrupt = errors.New(\"interrupted\")\n\n// Read reads a password from the terminal without echo.\nfunc Read(fd int) ([]byte, error) {\n\t// Store and restore the terminal status on interruptions to\n\t// avoid that the terminal remains in the password state\n\t// This is necessary as for https://github.com/golang/go/issues/31180\n\n\toldState, err := terminal.GetState(fd)\n\tif err != nil {\n\t\treturn make([]byte, 0), err\n\t}\n\n\ttype Buffer struct {\n\t\tBuffer []byte\n\t\tError  error\n\t}\n\terrorChannel := make(chan Buffer, 1)\n\n\t// SIGINT and SIGTERM restore the terminal, otherwise the no-echo mode would remain intact\n\tinterruptChannel := make(chan os.Signal, 1)\n\tsignal.Notify(interruptChannel, syscall.SIGINT, syscall.SIGTERM)\n\tdefer func() {\n\t\tsignal.Stop(interruptChannel)\n\t\tclose(interruptChannel)\n\t}()\n\tgo func() {\n\t\tfor range interruptChannel {\n\t\t\tif oldState != nil {\n\t\t\t\t_ = terminal.Restore(fd, oldState)\n\t\t\t}\n\t\t\terrorChannel <- Buffer{Buffer: make([]byte, 0), Error: ErrInterrupt}\n\t\t}\n\t}()\n\n\tgo func() {\n\t\tbuf, err := terminal.ReadPassword(fd)\n\t\terrorChannel <- Buffer{Buffer: buf, Error: err}\n\t}()\n\n\tbuf := <-errorChannel\n\treturn buf.Buffer, buf.Error\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/password/password_windows.go",
    "content": "//go:build windows\n\npackage password\n\nimport (\n\tterminal \"golang.org/x/term\"\n)\n\n// Read reads a password from the terminal.\nfunc Read(fd int) ([]byte, error) {\n\toldState, err := terminal.GetState(fd)\n\tif err != nil {\n\t\treturn make([]byte, 0), err\n\t}\n\tbuf, err := terminal.ReadPassword(fd)\n\tif oldState != nil {\n\t\t_ = terminal.Restore(fd, oldState)\n\t}\n\treturn buf, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/camelcase/LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Fatih Arslan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject 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, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/camelcase/README.md",
    "content": "# CamelCase [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/fatih/camelcase) [![Build Status](http://img.shields.io/travis/fatih/camelcase.svg?style=flat-square)](https://travis-ci.org/fatih/camelcase)\n\nCamelCase is a Golang (Go) package to split the words of a camelcase type\nstring into a slice of words. It can be used to convert a camelcase word (lower\nor upper case) into any type of word.\n\n## Splitting rules:\n\n1. If string is not valid UTF-8, return it without splitting as\n   single item array.\n2. Assign all unicode characters into one of 4 sets: lower case\n   letters, upper case letters, numbers, and all other characters.\n3. Iterate through characters of string, introducing splits\n   between adjacent characters that belong to different sets.\n4. Iterate through array of split strings, and if a given string\n   is upper case:\n   * if subsequent string is lower case:\n     * move last character of upper case string to beginning of\n       lower case string\n\n## Install\n\n```bash\ngo get github.com/fatih/camelcase\n```\n\n## Usage and examples\n\n```go\nsplit := camelcase.Split(\"GolangPackage\")\n\nfmt.Println(split[0], split[1]) // prints: \"Golang\", \"Package\"\n```\n\nBoth lower camel case and upper camel case are supported. For more info please\ncheck: [http://en.wikipedia.org/wiki/CamelCase](http://en.wikipedia.org/wiki/CamelCase)\n\nBelow are some example cases:\n\n```\n\"\" =>                     []\n\"lowercase\" =>            [\"lowercase\"]\n\"Class\" =>                [\"Class\"]\n\"MyClass\" =>              [\"My\", \"Class\"]\n\"MyC\" =>                  [\"My\", \"C\"]\n\"HTML\" =>                 [\"HTML\"]\n\"PDFLoader\" =>            [\"PDF\", \"Loader\"]\n\"AString\" =>              [\"A\", \"String\"]\n\"SimpleXMLParser\" =>      [\"Simple\", \"XML\", \"Parser\"]\n\"vimRPCPlugin\" =>         [\"vim\", \"RPC\", \"Plugin\"]\n\"GL11Version\" =>          [\"GL\", \"11\", \"Version\"]\n\"99Bottles\" =>            [\"99\", \"Bottles\"]\n\"May5\" =>                 [\"May\", \"5\"]\n\"BFG9000\" =>              [\"BFG\", \"9000\"]\n\"BöseÜberraschung\" =>     [\"Böse\", \"Überraschung\"]\n\"Two  spaces\" =>          [\"Two\", \"  \", \"spaces\"]\n\"BadUTF8\\xe2\\xe2\\xa1\" =>  [\"BadUTF8\\xe2\\xe2\\xa1\"]\n```\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/camelcase/camelcase.go",
    "content": "// Package camelcase is a micro package to split the words of a camelcase type\n// string into a slice of words.\npackage camelcase\n\nimport (\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n// Split splits the camelcase word and returns a list of words. It also\n// supports digits. Both lower camel case and upper camel case are supported.\n// For more info please check: http://en.wikipedia.org/wiki/CamelCase\n//\n// Examples\n//\n//\t\"\" =>                     [\"\"]\n//\t\"lowercase\" =>            [\"lowercase\"]\n//\t\"Class\" =>                [\"Class\"]\n//\t\"MyClass\" =>              [\"My\", \"Class\"]\n//\t\"MyC\" =>                  [\"My\", \"C\"]\n//\t\"HTML\" =>                 [\"HTML\"]\n//\t\"PDFLoader\" =>            [\"PDF\", \"Loader\"]\n//\t\"AString\" =>              [\"A\", \"String\"]\n//\t\"SimpleXMLParser\" =>      [\"Simple\", \"XML\", \"Parser\"]\n//\t\"vimRPCPlugin\" =>         [\"vim\", \"RPC\", \"Plugin\"]\n//\t\"GL11Version\" =>          [\"GL\", \"11\", \"Version\"]\n//\t\"99Bottles\" =>            [\"99\", \"Bottles\"]\n//\t\"May5\" =>                 [\"May\", \"5\"]\n//\t\"BFG9000\" =>              [\"BFG\", \"9000\"]\n//\t\"BöseÜberraschung\" =>     [\"Böse\", \"Überraschung\"]\n//\t\"Two  spaces\" =>          [\"Two\", \"  \", \"spaces\"]\n//\t\"BadUTF8\\xe2\\xe2\\xa1\" =>  [\"BadUTF8\\xe2\\xe2\\xa1\"]\n//\n// Splitting rules\n//\n//  1. If string is not valid UTF-8, return it without splitting as\n//     single item array.\n//  2. Assign all unicode characters into one of 4 sets: lower case\n//     letters, upper case letters, numbers, and all other characters.\n//  3. Iterate through characters of string, introducing splits\n//     between adjacent characters that belong to different sets.\n//  4. Iterate through array of split strings, and if a given string\n//     is upper case:\n//     if subsequent string is lower case:\n//     move last character of upper case string to beginning of\n//     lower case string\nfunc Split(src string) (entries []string) {\n\t// don't split invalid utf8\n\tif !utf8.ValidString(src) {\n\t\treturn []string{src}\n\t}\n\tentries = []string{}\n\tvar runes [][]rune\n\tvar class, lastClass int\n\t// split into fields based on class of unicode character\n\tfor _, r := range src {\n\t\tswitch {\n\t\tcase unicode.IsLower(r):\n\t\t\tclass = 1\n\t\tcase unicode.IsUpper(r):\n\t\t\tclass = 2\n\t\tcase unicode.IsDigit(r):\n\t\t\tclass = 3\n\t\tdefault:\n\t\t\tclass = 4\n\t\t}\n\t\tif class == lastClass {\n\t\t\trunes[len(runes)-1] = append(runes[len(runes)-1], r)\n\t\t} else {\n\t\t\trunes = append(runes, []rune{r})\n\t\t}\n\t\tlastClass = class\n\t}\n\t// handle upper case -> lower case sequences, e.g.\n\t// \"PDFL\", \"oader\" -> \"PDF\", \"Loader\"\n\tfor i := range len(runes) - 1 {\n\t\tif unicode.IsUpper(runes[i][0]) && unicode.IsLower(runes[i+1][0]) {\n\t\t\trunes[i+1] = append([]rune{runes[i][len(runes[i])-1]}, runes[i+1]...)\n\t\t\trunes[i] = runes[i][:len(runes[i])-1]\n\t\t}\n\t}\n\t// construct []string from results\n\tfor _, s := range runes {\n\t\tif len(s) > 0 {\n\t\t\tentries = append(entries, string(s))\n\t\t}\n\t}\n\n\treturn entries\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/doc.go",
    "content": "/*\nPackage report provides helper structs/methods/funcs for formatting output\n\n# Examples\n\nTo format output for an array of structs:\n\nExamplePodman:\n\n\theaders := report.Headers(struct {\n\t\tID string\n\t}{}, nil)\n\n\tf := report.New(os.Stdout, \"Command Name\")\n\tf, _ := f.Parse(report.OriginPodman, \"{{range .}}{{.ID}}{{end}}\")\n\tdefer f.Flush()\n\n\tif f.RenderHeaders {\n\t\tf.Execute(headers)\n\t}\n\tf.Execute( map[string]string{\n\t\t\"ID\":\"fa85da03b40141899f3af3de6d27852b\",\n\t})\n\n\t// Output:\n\t// ID\n\t// fa85da03b40141899f3af3de6d27852b\n\nExampleUser:\n\n\theaders := report.Headers(struct {\n\t\tCID string\n\t}{}, map[string]string{\"CID\":\"ID\"})\n\n\tf, _ := report.New(os.Stdout, \"Command Name\").Parse(report.OriginUser, \"table {{.CID}}\")\n\tdefer f.Flush()\n\n\tif f.RenderHeaders {\n\t\tt.Execute(t, headers)\n\t}\n\tt.Execute(t,map[string]string{\n\t\t\"CID\":\"fa85da03b40141899f3af3de6d27852b\",\n\t})\n\n\t// Output:\n\t// ID\n\t// fa85da03b40141899f3af3de6d27852b\n\nHelpers:\n\n\tif report.IsJSON(cmd.Flag(\"format\").Value.String()) {\n\t\t... process JSON and output\n\t}\n\n\tif report.HasTable(cmd.Flag(\"format\").Value.String()) {\n\t\t... \"table\" keyword prefix in format text\n\t}\n\n# Template Functions\n\nThe following template functions are added to the template when parsed:\n  - join  strings.Join, {{join .Field separator}}\n  - json encode field as JSON {{ json .Field }}\n  - lower strings.ToLower {{ .Field | lower }}\n  - pad add spaces as prefix and suffix {{ pad . 2 2 }}\n  - split strings.Split {{ .Field | split }}\n  - title strings.Title {{ .Field | title }}\n  - truncate limit field length {{ truncate . 10 }}\n  - upper strings.ToUpper {{ .Field | upper }}\n\nreport.Funcs() may be used to add additional template functions.\nAdding an existing function will replace that function for the life of that template.\n\nNote: Your code should not ignore errors\n*/\npackage report\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/formatter.go",
    "content": "package report\n\nimport (\n\t\"io\"\n\t\"maps\"\n\t\"strings\"\n\t\"text/tabwriter\"\n\t\"text/template\"\n)\n\n// Flusher is the interface that wraps the Flush method.\ntype Flusher interface {\n\tFlush() error\n}\n\n// NopFlusher represents a type which flush operation is nop.\ntype NopFlusher struct{}\n\n// Flush is a nop operation.\nfunc (f *NopFlusher) Flush() error {\n\treturn nil\n}\n\ntype Origin int\n\nconst (\n\tOriginUnknown Origin = iota\n\tOriginPodman\n\tOriginUser\n)\n\nfunc (o Origin) String() string {\n\tswitch o {\n\tcase OriginPodman:\n\t\treturn \"OriginPodman\"\n\tcase OriginUser:\n\t\treturn \"OriginUser\"\n\tdefault:\n\t\treturn \"OriginUnknown\"\n\t}\n}\n\n// Formatter holds the configured Writer and parsed Template, additional state fields are\n// maintained to assist in the podman command report writing.\ntype Formatter struct {\n\tOrigin        Origin             // Source of go template. OriginUser or OriginPodman\n\tRenderHeaders bool               // Hint, default behavior for given template is to include headers\n\tRenderTable   bool               // Does template have \"table\" keyword\n\tflusher       Flusher            // Flush any buffered formatted output\n\ttemplate      *template.Template // Go text/template for formatting output\n\ttext          string             // value of canonical template after processing\n\twriter        io.Writer          // Destination for formatted output\n}\n\n// stringsCutPrefix is equivalent to Go 1.20’s strings.CutPrefix.\n// Replace this function with a direct call to the standard library after we update to Go 1.20.\nfunc stringsCutPrefix(s, prefix string) (string, bool) {\n\tif !strings.HasPrefix(s, prefix) {\n\t\treturn s, false\n\t}\n\treturn s[len(prefix):], true\n}\n\n// Parse parses golang template returning a formatter\n//\n//   - OriginPodman implies text is a template from podman code. Output will\n//     be filtered through a tabwriter.\n//\n//   - OriginUser implies text is a template from a user. If template includes\n//     keyword \"table\" output will be filtered through a tabwriter.\nfunc (f *Formatter) Parse(origin Origin, text string) (*Formatter, error) {\n\tf.Origin = origin\n\n\t// docker tries to be smart and replaces \\n with the actual newline character.\n\t// For compat we do the same but this will break formats such as '{{printf \"\\n\"}}'\n\t// To be backwards compatible with the previous behavior we try to replace and\n\t// parse the template. If it fails use the original text and parse again.\n\tvar normText string\n\ttextWithoutTable, hasTable := stringsCutPrefix(text, \"table \")\n\tswitch {\n\tcase hasTable:\n\t\tf.RenderTable = true\n\t\tnormText = \"{{range .}}\" + NormalizeFormat(text) + \"{{end -}}\"\n\t\ttext = \"{{range .}}\" + textWithoutTable + \"{{end -}}\"\n\tcase OriginUser == origin:\n\t\tnormText = EnforceRange(NormalizeFormat(text))\n\t\ttext = EnforceRange(text)\n\tdefault:\n\t\tnormText = NormalizeFormat(text)\n\t}\n\n\tif f.RenderTable || origin == OriginPodman {\n\t\ttw := tabwriter.NewWriter(f.writer, 12, 2, 2, ' ', tabwriter.StripEscape)\n\t\tf.writer = tw\n\t\tf.flusher = tw\n\t\tf.RenderHeaders = true\n\t}\n\n\ttmpl, err := f.template.Funcs(template.FuncMap(DefaultFuncs)).Parse(normText)\n\tif err != nil {\n\t\ttmpl, err = f.template.Funcs(template.FuncMap(DefaultFuncs)).Parse(text)\n\t\tf.template = tmpl\n\t\tf.text = text\n\t\treturn f, err\n\t}\n\tf.text = normText\n\tf.template = tmpl\n\treturn f, nil\n}\n\n// Funcs adds the elements of the argument map to the template's function map.\n// A default template function will be replaced if there is a key collision.\nfunc (f *Formatter) Funcs(funcMap template.FuncMap) *Formatter {\n\tm := make(template.FuncMap, len(DefaultFuncs)+len(funcMap))\n\tmaps.Copy(m, DefaultFuncs)\n\tmaps.Copy(m, funcMap)\n\tf.template = f.template.Funcs(funcMap)\n\treturn f\n}\n\n// Init either resets the given tabwriter with new values or wraps w in tabwriter with given values.\nfunc (f *Formatter) Init(w io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Formatter {\n\tflags |= tabwriter.StripEscape\n\n\tif tw, ok := f.writer.(*tabwriter.Writer); ok {\n\t\ttw = tw.Init(w, minwidth, tabwidth, padding, padchar, flags)\n\t\tf.writer = tw\n\t\tf.flusher = tw\n\t} else {\n\t\ttw = tabwriter.NewWriter(w, minwidth, tabwidth, padding, padchar, flags)\n\t\tf.writer = tw\n\t\tf.flusher = tw\n\t}\n\treturn f\n}\n\n// Execute applies a parsed template to the specified data object,\n// and writes the output to Formatter.Writer.\nfunc (f *Formatter) Execute(data any) error {\n\treturn f.template.Execute(f.writer, data)\n}\n\n// Flush should be called after the last call to Write to ensure\n// that any data buffered in the Formatter is written to output. Any\n// incomplete escape sequence at the end is considered\n// complete for formatting purposes.\nfunc (f *Formatter) Flush() error {\n\t// Indirection is required here to prevent caller from having to know when\n\t// value of Flusher may be changed.\n\treturn f.flusher.Flush()\n}\n\n// Writer returns the embedded io.Writer from Formatter.\nfunc (f *Formatter) Writer() io.Writer {\n\treturn f.writer\n}\n\n// New allocates a new, undefined Formatter with the given name and Writer.\nfunc New(output io.Writer, name string) *Formatter {\n\tf := new(Formatter)\n\n\tf.flusher = new(NopFlusher)\n\tif flusher, ok := output.(Flusher); ok {\n\t\tf.flusher = flusher\n\t}\n\n\tf.template = template.New(name)\n\tf.writer = output\n\treturn f\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/template.go",
    "content": "package report\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"maps\"\n\t\"reflect\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"go.podman.io/common/pkg/report/camelcase\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// Template embeds template.Template to add functionality to methods.\ntype Template struct {\n\t*template.Template\n\tisTable bool\n}\n\n// FuncMap is aliased from template.FuncMap.\ntype FuncMap template.FuncMap\n\n// tableReplacer will remove 'table ' prefix and clean up tabs.\nvar tableReplacer = strings.NewReplacer(\n\t\"table \", \"\",\n\t`\\t`, \"\\t\",\n\t\" \", \"\\t\",\n\t`\\n`, \"\\n\",\n)\n\n// escapedReplacer will clean up escaped characters from CLI.\nvar escapedReplacer = strings.NewReplacer(\n\t`\\t`, \"\\t\",\n\t`\\n`, \"\\n\",\n)\n\nvar DefaultFuncs = FuncMap{\n\t\"join\": strings.Join,\n\t\"json\": func(v any) string {\n\t\tbuf := new(bytes.Buffer)\n\t\tenc := json.NewEncoder(buf)\n\t\tenc.SetEscapeHTML(false)\n\t\t_ = enc.Encode(v)\n\t\t// Remove the trailing new line added by the encoder\n\t\treturn strings.TrimSpace(buf.String())\n\t},\n\t\"lower\":    strings.ToLower,\n\t\"pad\":      padWithSpace,\n\t\"split\":    strings.Split,\n\t\"title\":    strings.Title, //nolint:staticcheck\n\t\"truncate\": truncateWithLength,\n\t\"upper\":    strings.ToUpper,\n}\n\n// NormalizeFormat reads given go template format provided by CLI and munges it into what we need.\nfunc NormalizeFormat(format string) string {\n\tvar f string\n\t// two replacers used so we only remove the prefix keyword `table`\n\tif strings.HasPrefix(format, \"table \") {\n\t\tf = tableReplacer.Replace(format)\n\t} else {\n\t\tf = escapedReplacer.Replace(format)\n\t}\n\n\tif !strings.HasSuffix(f, \"\\n\") {\n\t\tf += \"\\n\"\n\t}\n\treturn f\n}\n\n// padWithSpace adds spaces*prefix and spaces*suffix to the input when it is non-empty.\nfunc padWithSpace(source string, prefix, suffix int) string {\n\tif source == \"\" {\n\t\treturn source\n\t}\n\treturn strings.Repeat(\" \", prefix) + source + strings.Repeat(\" \", suffix)\n}\n\n// truncateWithLength truncates the source string up to the length provided by the input.\nfunc truncateWithLength(source string, length int) string {\n\tif len(source) < length {\n\t\treturn source\n\t}\n\treturn source[:length]\n}\n\n// Headers queries the interface for field names.\n// Array of map is returned to support range templates\n// Note: unexported fields can be supported by adding field to overrides\n// Note: It is left to the developer to write out said headers\n//\n//\tPodman commands use the general rules of:\n//\t1) unchanged --format includes headers\n//\t2) --format '{{.ID}\"        # no headers\n//\t3) --format 'table {{.ID}}' # includes headers\nfunc Headers(object any, overrides map[string]string) []map[string]string {\n\tvalue := reflect.ValueOf(object)\n\tif value.Kind() == reflect.Pointer {\n\t\tvalue = value.Elem()\n\t}\n\n\t// Column header will be field name upper-cased.\n\theaders := make(map[string]string, value.NumField())\n\tfor i := range value.Type().NumField() {\n\t\tfield := value.Type().Field(i)\n\t\t// Recurse to find field names from promoted structs\n\t\tif field.Type.Kind() == reflect.Struct && field.Anonymous {\n\t\t\th := Headers(reflect.New(field.Type).Interface(), nil)\n\t\t\tmaps.Copy(headers, h[0])\n\t\t\tcontinue\n\t\t}\n\t\tname := strings.Join(camelcase.Split(field.Name), \" \")\n\t\theaders[field.Name] = strings.ToUpper(name)\n\t}\n\n\tif len(overrides) > 0 {\n\t\t// Override column header as provided\n\t\tfor k, v := range overrides {\n\t\t\theaders[k] = strings.ToUpper(v)\n\t\t}\n\t}\n\treturn []map[string]string{headers}\n}\n\n// NewTemplate creates a new template object.\nfunc NewTemplate(name string) *Template {\n\treturn &Template{Template: template.New(name).Funcs(template.FuncMap(DefaultFuncs))}\n}\n\n// Parse parses text as a template body for t.\nfunc (t *Template) Parse(text string) (*Template, error) {\n\tif strings.HasPrefix(text, \"table \") {\n\t\tt.isTable = true\n\t\ttext = \"{{range .}}\" + NormalizeFormat(text) + \"{{end -}}\"\n\t} else {\n\t\ttext = NormalizeFormat(text)\n\t}\n\n\ttt, err := t.Template.Funcs(template.FuncMap(DefaultFuncs)).Parse(text)\n\treturn &Template{tt, t.isTable}, err\n}\n\n// Funcs adds the elements of the argument map to the template's function map.\n// A default template function will be replace if there is a key collision.\nfunc (t *Template) Funcs(funcMap FuncMap) *Template {\n\tm := make(FuncMap)\n\tmaps.Copy(m, DefaultFuncs)\n\tmaps.Copy(m, funcMap)\n\treturn &Template{Template: t.Template.Funcs(template.FuncMap(m)), isTable: t.isTable}\n}\n\n// IsTable returns true if format string defines a \"table\".\nfunc (t *Template) IsTable() bool {\n\treturn t.isTable\n}\n\nvar rangeRegex = regexp.Delayed(`(?s){{\\s*range\\s*\\.\\s*}}.*{{\\s*end\\s*-?\\s*}}`)\n\n// EnforceRange ensures that the format string contains a range.\nfunc EnforceRange(format string) string {\n\tif !rangeRegex.MatchString(format) {\n\t\treturn \"{{range .}}\" + format + \"{{end -}}\"\n\t}\n\treturn format\n}\n\n// HasTable returns whether the format is a table.\nfunc HasTable(format string) bool {\n\treturn strings.HasPrefix(format, \"table \")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/validate.go",
    "content": "package report\n\nimport (\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// Check for json, {{json }} and {{ json. }} which are not valid go template,\n// {{json .}} is valid and thus not matched to let the template handle it like docker does.\nvar jsonRegex = regexp.Delayed(`^\\s*(json|{{\\s*json\\.?\\s*}})\\s*$`)\n\n// IsJSON check if CLI --format string is a JSON request\n//\n//\tif report.IsJSON(cmd.Flag(\"format\").Value.String()) {\n//\t  ... process JSON and output\n//\t}\nfunc IsJSON(s string) bool {\n\treturn jsonRegex.MatchString(s)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/report/writer.go",
    "content": "package report\n\nimport (\n\t\"io\"\n\t\"text/tabwriter\"\n)\n\n// Writer aliases tabwriter.Writer to provide Podman defaults.\ntype Writer struct {\n\t*tabwriter.Writer\n}\n\n// NewWriter initializes a new report.Writer with given values.\nfunc NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) (*Writer, error) {\n\tt := tabwriter.NewWriter(output, minwidth, tabwidth, padding, padchar, flags)\n\treturn &Writer{t}, nil\n}\n\n// NewWriterDefault initializes a new report.Writer with Podman defaults.\nfunc NewWriterDefault(output io.Writer) (*Writer, error) {\n\treturn NewWriter(output, 12, 2, 2, ' ', 0)\n}\n\n// Flush any output left in buffers.\nfunc (w *Writer) Flush() error {\n\treturn w.Writer.Flush()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/retry/retry.go",
    "content": "package retry\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"math\"\n\t\"math/rand/v2\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\terrcodev2 \"github.com/docker/distribution/registry/api/v2\"\n\t\"github.com/hashicorp/go-multierror\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker\"\n)\n\n// Options defines the option to retry.\ntype Options struct {\n\tMaxRetry         int           // The number of times to possibly retry.\n\tDelay            time.Duration // The delay to use between retries, if set.\n\tIsErrorRetryable func(error) bool\n}\n\n// RetryOptions is deprecated, use Options.\ntype RetryOptions = Options // nolint:revive\n\n// RetryIfNecessary deprecated function use IfNecessary.\nfunc RetryIfNecessary(ctx context.Context, operation func() error, options *Options) error { // nolint:revive\n\treturn IfNecessary(ctx, operation, options)\n}\n\n// IfNecessary retries the operation in exponential backoff with the retry Options.\nfunc IfNecessary(ctx context.Context, operation func() error, options *Options) error {\n\tvar isRetryable func(error) bool\n\tif options.IsErrorRetryable != nil {\n\t\tisRetryable = options.IsErrorRetryable\n\t} else {\n\t\tisRetryable = IsErrorRetryable\n\t}\n\terr := operation()\n\tfor attempt := 0; err != nil && isRetryable(err) && attempt < options.MaxRetry; attempt++ {\n\t\tdelay := time.Duration(int(math.Pow(2, float64(attempt)))) * time.Second\n\t\tif options.Delay != 0 {\n\t\t\tdelay = options.Delay\n\t\t}\n\t\tlogrus.Warnf(\"Failed, retrying in %s ... (%d/%d). Error: %v\", delay, attempt+1, options.MaxRetry, err)\n\t\tdelay += rand.N(delay / 10) // 10 % jitter so that a failure blip doesn’t cause a deterministic stampede\n\t\tlogrus.Debugf(\"Retry delay with added jitter: %s\", delay)\n\t\tselect {\n\t\tcase <-time.After(delay):\n\t\t\t// Do nothing.\n\t\tcase <-ctx.Done():\n\t\t\treturn err\n\t\t}\n\t\terr = operation()\n\t}\n\treturn err\n}\n\n// IsErrorRetryable makes a HEURISTIC determination whether it is worth retrying upon encountering an error.\n// That heuristic is NOT STABLE and it CAN CHANGE AT ANY TIME.\n// Callers that have a hard requirement for specific treatment of a class of errors should make their own check\n// instead of relying on this function maintaining its past behavior.\nfunc IsErrorRetryable(err error) bool {\n\tswitch err {\n\tcase nil:\n\t\treturn false\n\tcase context.Canceled, context.DeadlineExceeded:\n\t\treturn false\n\tdefault: // continue\n\t}\n\n\ttype unwrapper interface {\n\t\tUnwrap() error\n\t}\n\n\tswitch e := err.(type) {\n\tcase errcode.Error:\n\t\tswitch e.Code {\n\t\tcase errcode.ErrorCodeUnauthorized, errcode.ErrorCodeDenied,\n\t\t\terrcodev2.ErrorCodeNameUnknown, errcodev2.ErrorCodeManifestUnknown:\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\tcase docker.UnexpectedHTTPStatusError:\n\t\t// Retry on 502, 502 and 503 http server errors, they appear to be quite common in the field.\n\t\t// https://github.com/containers/common/issues/2299\n\t\tif e.StatusCode >= http.StatusBadGateway && e.StatusCode <= http.StatusGatewayTimeout {\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\tcase *net.OpError:\n\t\treturn IsErrorRetryable(e.Err)\n\tcase *url.Error: // This includes errors returned by the net/http client.\n\t\tif e.Err == io.EOF { // Happens when a server accepts a HTTP connection and sends EOF\n\t\t\treturn true\n\t\t}\n\t\treturn IsErrorRetryable(e.Err)\n\tcase syscall.Errno:\n\t\treturn isErrnoRetryable(e)\n\tcase errcode.Errors:\n\t\t// if this error is a group of errors, process them all in turn\n\t\tfor i := range e {\n\t\t\tif !IsErrorRetryable(e[i]) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\tcase *multierror.Error:\n\t\t// if this error is a group of errors, process them all in turn\n\t\tfor i := range e.Errors {\n\t\t\tif !IsErrorRetryable(e.Errors[i]) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\tcase net.Error:\n\t\tif e.Timeout() {\n\t\t\treturn true\n\t\t}\n\t\tif unwrappable, ok := e.(unwrapper); ok {\n\t\t\terr = unwrappable.Unwrap()\n\t\t\treturn IsErrorRetryable(err)\n\t\t}\n\tcase unwrapper: // Test this last, because various error types might implement .Unwrap()\n\t\terr = e.Unwrap()\n\t\treturn IsErrorRetryable(err)\n\t}\n\n\treturn false\n}\n\nfunc isErrnoRetryable(e error) bool {\n\tswitch e {\n\tcase syscall.ECONNREFUSED, syscall.EINTR, syscall.EAGAIN, syscall.EBUSY, syscall.ENETDOWN, syscall.ENETUNREACH, syscall.ENETRESET, syscall.ECONNABORTED, syscall.ECONNRESET, syscall.ETIMEDOUT, syscall.EHOSTDOWN, syscall.EHOSTUNREACH:\n\t\treturn true\n\t}\n\treturn isErrnoERESTART(e)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/retry/retry_linux.go",
    "content": "package retry\n\nimport (\n\t\"syscall\"\n)\n\nfunc isErrnoERESTART(e error) bool {\n\treturn e == syscall.ERESTART\n}\n"
  },
  {
    "path": "vendor/go.podman.io/common/pkg/retry/retry_unsupported.go",
    "content": "//go:build !linux\n\npackage retry\n\nfunc isErrnoERESTART(e error) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/go.podman.io/image/v5/copy/blob.go",
    "content": "package copy\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/private\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// copyBlobFromStream copies a blob with srcInfo (with known Digest and Annotations and possibly known Size) from srcReader to dest,\n// perhaps sending a copy to an io.Writer if getOriginalLayerCopyWriter != nil,\n// perhaps (de/re/)compressing it if canModifyBlob,\n// and returns a complete blobInfo of the copied blob.\nfunc (ic *imageCopier) copyBlobFromStream(ctx context.Context, srcReader io.Reader, srcInfo types.BlobInfo,\n\tgetOriginalLayerCopyWriter func(decompressor compressiontypes.DecompressorFunc) io.Writer,\n\tisConfig bool, toEncrypt bool, bar *progressBar, layerIndex int, emptyLayer bool,\n) (types.BlobInfo, error) {\n\t// The copying happens through a pipeline of connected io.Readers;\n\t// that pipeline is built by updating stream.\n\t// === Input: srcReader\n\tstream := sourceStream{\n\t\treader: srcReader,\n\t\tinfo:   srcInfo,\n\t}\n\n\t// === Process input through digestingReader to validate against the expected digest.\n\t// Be paranoid; in case PutBlob somehow managed to ignore an error from digestingReader,\n\t// use a separate validation failure indicator.\n\t// Note that for this check we don't use the stronger \"validationSucceeded\" indicator, because\n\t// dest.PutBlob may detect that the layer already exists, in which case we don't\n\t// read stream to the end, and validation does not happen.\n\tdigestingReader, err := newDigestingReader(stream.reader, srcInfo.Digest)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, fmt.Errorf(\"preparing to verify blob %s: %w\", srcInfo.Digest, err)\n\t}\n\tstream.reader = digestingReader\n\n\t// === Update progress bars\n\tstream.reader = bar.ProxyReader(stream.reader)\n\n\t// === Decrypt the stream, if required.\n\tdecryptionStep, err := ic.blobPipelineDecryptionStep(&stream, srcInfo)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\n\t// === Detect compression of the input stream.\n\t// This requires us to “peek ahead” into the stream to read the initial part, which requires us to chain through another io.Reader returned by DetectCompression.\n\tdetectedCompression, err := blobPipelineDetectCompressionStep(&stream, srcInfo)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\n\t// === Send a copy of the original, uncompressed, stream, to a separate path if necessary.\n\tvar originalLayerReader io.Reader // DO NOT USE this other than to drain the input if no other consumer in the pipeline has done so.\n\tif getOriginalLayerCopyWriter != nil {\n\t\tstream.reader = io.TeeReader(stream.reader, getOriginalLayerCopyWriter(detectedCompression.decompressor))\n\t\toriginalLayerReader = stream.reader\n\t}\n\n\t// WARNING: If you are adding new reasons to change the blob, update also the OptimizeDestinationImageAlreadyExists\n\t// short-circuit conditions\n\tcanModifyBlob := !isConfig && ic.cannotModifyManifestReason == \"\"\n\t// === Deal with layer compression/decompression if necessary\n\tcompressionStep, err := ic.blobPipelineCompressionStep(&stream, canModifyBlob, srcInfo, detectedCompression)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\tdefer compressionStep.close()\n\n\t// === Encrypt the stream for valid mediatypes if ociEncryptConfig provided\n\tif decryptionStep.decrypting && toEncrypt {\n\t\t// If nothing else, we can only set uploadedInfo.CryptoOperation to a single value.\n\t\t// Before relaxing this, see the original pull request’s review if there are other reasons to reject this.\n\t\treturn types.BlobInfo{}, errors.New(\"Unable to support both decryption and encryption in the same copy\")\n\t}\n\tencryptionStep, err := ic.blobPipelineEncryptionStep(&stream, toEncrypt, srcInfo, decryptionStep)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\n\t// === Report progress using the ic.c.options.Progress channel, if required.\n\tif ic.c.options.Progress != nil && ic.c.options.ProgressInterval > 0 {\n\t\tprogressReader := newProgressReader(\n\t\t\tstream.reader,\n\t\t\tic.c.options.Progress,\n\t\t\tic.c.options.ProgressInterval,\n\t\t\tsrcInfo,\n\t\t)\n\t\tdefer progressReader.reportDone()\n\t\tstream.reader = progressReader\n\t}\n\n\t// === Finally, send the layer stream to dest.\n\toptions := private.PutBlobOptions{\n\t\tCache:      ic.c.blobInfoCache,\n\t\tIsConfig:   isConfig,\n\t\tEmptyLayer: emptyLayer,\n\t}\n\tif !isConfig {\n\t\toptions.LayerIndex = &layerIndex\n\t}\n\tdestBlob, err := ic.c.dest.PutBlobWithOptions(ctx, &errorAnnotationReader{stream.reader}, stream.info, options)\n\tif err != nil {\n\t\treturn types.BlobInfo{}, fmt.Errorf(\"writing blob: %w\", err)\n\t}\n\tuploadedInfo := updatedBlobInfoFromUpload(stream.info, destBlob)\n\n\tcompressionStep.updateCompressionEdits(&uploadedInfo.CompressionOperation, &uploadedInfo.CompressionAlgorithm, &uploadedInfo.Annotations)\n\tdecryptionStep.updateCryptoOperation(&uploadedInfo.CryptoOperation)\n\tif err := encryptionStep.updateCryptoOperationAndAnnotations(&uploadedInfo.CryptoOperation, &uploadedInfo.Annotations); err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\n\t// This is fairly horrible: the writer from getOriginalLayerCopyWriter wants to consume\n\t// all of the input (to compute DiffIDs), even if dest.PutBlob does not need it.\n\t// So, read everything from originalLayerReader, which will cause the rest to be\n\t// sent there if we are not already at EOF.\n\tif getOriginalLayerCopyWriter != nil {\n\t\tlogrus.Debugf(\"Consuming rest of the original blob to satisfy getOriginalLayerCopyWriter\")\n\t\t_, err := io.Copy(io.Discard, originalLayerReader)\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, fmt.Errorf(\"reading input blob %s: %w\", srcInfo.Digest, err)\n\t\t}\n\t}\n\n\tif digestingReader.validationFailed { // Coverage: This should never happen.\n\t\treturn types.BlobInfo{}, fmt.Errorf(\"Internal error writing blob %s, digest verification failed but was ignored\", srcInfo.Digest)\n\t}\n\tif stream.info.Digest != \"\" && uploadedInfo.Digest != stream.info.Digest {\n\t\treturn types.BlobInfo{}, fmt.Errorf(\"Internal error writing blob %s, blob with digest %s saved with digest %s\", srcInfo.Digest, stream.info.Digest, uploadedInfo.Digest)\n\t}\n\tif digestingReader.validationSucceeded {\n\t\tif err := compressionStep.recordValidatedDigestData(ic.c, uploadedInfo, srcInfo, encryptionStep, decryptionStep); err != nil {\n\t\t\treturn types.BlobInfo{}, err\n\t\t}\n\t}\n\n\treturn uploadedInfo, nil\n}\n\n// sourceStream encapsulates an input consumed by copyBlobFromStream, in progress of being built.\n// This allows handles of individual aspects to build the copy pipeline without _too much_\n// specific cooperation by the caller.\n//\n// We are currently very far from a generalized plug-and-play API for building/consuming the pipeline\n// without specific knowledge of various aspects in copyBlobFromStream; that may come one day.\ntype sourceStream struct {\n\treader io.Reader\n\tinfo   types.BlobInfo // corresponding to the data available in reader.\n}\n\n// errorAnnotationReader wraps the io.Reader passed to PutBlob for annotating the error happened during read.\n// These errors are reported as PutBlob errors, so we would otherwise misleadingly attribute them to the copy destination.\ntype errorAnnotationReader struct {\n\treader io.Reader\n}\n\n// Read annotates the error happened during read\nfunc (r errorAnnotationReader) Read(b []byte) (n int, err error) {\n\tn, err = r.reader.Read(b)\n\tif err != nil && err != io.EOF {\n\t\treturn n, fmt.Errorf(\"happened during read: %w\", err)\n\t}\n\treturn n, err\n}\n\n// updatedBlobInfoFromUpload returns inputInfo updated with uploadedBlob which was created based on inputInfo.\nfunc updatedBlobInfoFromUpload(inputInfo types.BlobInfo, uploadedBlob private.UploadedBlob) types.BlobInfo {\n\t// The transport is only tasked with dealing with the raw blob, and possibly computing Digest/Size.\n\t// Handling of compression, encryption, and the related MIME types and the like are all the responsibility\n\t// of the generic code in this package.\n\treturn types.BlobInfo{\n\t\tDigest:               uploadedBlob.Digest,\n\t\tSize:                 uploadedBlob.Size,\n\t\tURLs:                 nil, // This _must_ be cleared if Digest changes; clear it in other cases as well, to preserve previous behavior.\n\t\tAnnotations:          inputInfo.Annotations,\n\t\tMediaType:            inputInfo.MediaType,            // Mostly irrelevant, MediaType is updated based on Compression/Crypto.\n\t\tCompressionOperation: inputInfo.CompressionOperation, // Expected to be unset, and only updated by copyBlobFromStream.\n\t\tCompressionAlgorithm: inputInfo.CompressionAlgorithm, // Expected to be unset, and only updated by copyBlobFromStream.\n\t\tCryptoOperation:      inputInfo.CryptoOperation,      // Expected to be unset, and only updated by copyBlobFromStream.\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/compression.go",
    "content": "package copy\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\tinternalblobinfocache \"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n\tchunkedToc \"go.podman.io/storage/pkg/chunked/toc\"\n)\n\nvar (\n\t// defaultCompressionFormat is used if the destination transport requests\n\t// compression, and the user does not explicitly instruct us to use an algorithm.\n\tdefaultCompressionFormat = &compression.Gzip\n\n\t// compressionBufferSize is the buffer size used to compress a blob\n\tcompressionBufferSize = 1048576\n\n\t// expectedBaseCompressionFormats is used to check if a blob with a specified media type is compressed\n\t// using the algorithm that the media type says it should be compressed with\n\texpectedBaseCompressionFormats = map[string]*compressiontypes.Algorithm{\n\t\timgspecv1.MediaTypeImageLayerGzip:         &compression.Gzip,\n\t\timgspecv1.MediaTypeImageLayerZstd:         &compression.Zstd,\n\t\tmanifest.DockerV2Schema2LayerMediaType:    &compression.Gzip,\n\t\tmanifest.DockerV2SchemaLayerMediaTypeZstd: &compression.Zstd,\n\t}\n)\n\n// bpDetectCompressionStepData contains data that the copy pipeline needs about the “detect compression” step.\ntype bpDetectCompressionStepData struct {\n\tisCompressed                 bool\n\tformat                       compressiontypes.Algorithm        // Valid if isCompressed\n\tdecompressor                 compressiontypes.DecompressorFunc // Valid if isCompressed\n\tsrcCompressorBaseVariantName string                            // Compressor name to possibly record in the blob info cache for the source blob.\n}\n\n// blobPipelineDetectCompressionStep updates *stream to detect its current compression format.\n// srcInfo is only used for error messages.\n// Returns data for other steps.\nfunc blobPipelineDetectCompressionStep(stream *sourceStream, srcInfo types.BlobInfo) (bpDetectCompressionStepData, error) {\n\t// This requires us to “peek ahead” into the stream to read the initial part, which requires us to chain through another io.Reader returned by DetectCompression.\n\tformat, decompressor, reader, err := compression.DetectCompressionFormat(stream.reader) // We could skip this in some cases, but let's keep the code path uniform\n\tif err != nil {\n\t\treturn bpDetectCompressionStepData{}, fmt.Errorf(\"reading blob %s: %w\", srcInfo.Digest, err)\n\t}\n\tstream.reader = reader\n\n\tif decompressor != nil && format.Name() == compressiontypes.ZstdAlgorithmName {\n\t\ttocDigest, err := chunkedToc.GetTOCDigest(srcInfo.Annotations)\n\t\tif err != nil {\n\t\t\treturn bpDetectCompressionStepData{}, err\n\t\t}\n\t\tif tocDigest != nil {\n\t\t\tformat = compression.ZstdChunked\n\t\t}\n\n\t}\n\tres := bpDetectCompressionStepData{\n\t\tisCompressed: decompressor != nil,\n\t\tformat:       format,\n\t\tdecompressor: decompressor,\n\t}\n\tif res.isCompressed {\n\t\tres.srcCompressorBaseVariantName = format.BaseVariantName()\n\t} else {\n\t\tres.srcCompressorBaseVariantName = internalblobinfocache.Uncompressed\n\t}\n\n\tif expectedBaseFormat, known := expectedBaseCompressionFormats[stream.info.MediaType]; known && res.isCompressed && format.BaseVariantName() != expectedBaseFormat.Name() {\n\t\tlogrus.Debugf(\"blob %s with type %s should be compressed with %s, but compressor appears to be %s\", srcInfo.Digest.String(), srcInfo.MediaType, expectedBaseFormat.Name(), format.Name())\n\t}\n\treturn res, nil\n}\n\n// bpCompressionStepData contains data that the copy pipeline needs about the compression step.\ntype bpCompressionStepData struct {\n\toperation                             bpcOperation                // What we are actually doing\n\tuploadedOperation                     types.LayerCompression      // Operation to use for updating the blob metadata (matching the end state, not necessarily what we do)\n\tuploadedAlgorithm                     *compressiontypes.Algorithm // An algorithm parameter for the compressionOperation edits.\n\tuploadedAnnotations                   map[string]string           // Compression-related annotations that should be set on the uploaded blob. WARNING: This is only set after the srcStream.reader is fully consumed.\n\tsrcCompressorBaseVariantName          string                      // Compressor base variant name to record in the blob info cache for the source blob.\n\tuploadedCompressorBaseVariantName     string                      // Compressor base variant name to record in the blob info cache for the uploaded blob.\n\tuploadedCompressorSpecificVariantName string                      // Compressor specific variant name to record in the blob info cache for the uploaded blob.\n\tclosers                               []io.Closer                 // Objects to close after the upload is done, if any.\n}\n\ntype bpcOperation int\n\nconst (\n\tbpcOpInvalid              bpcOperation = iota\n\tbpcOpPreserveOpaque                    // We are preserving something where compression is not applicable\n\tbpcOpPreserveCompressed                // We are preserving a compressed, and decompressible, layer\n\tbpcOpPreserveUncompressed              // We are preserving an uncompressed, and compressible, layer\n\tbpcOpCompressUncompressed              // We are compressing uncompressed data\n\tbpcOpRecompressCompressed              // We are recompressing compressed data\n\tbpcOpDecompressCompressed              // We are decompressing compressed data\n)\n\n// blobPipelineCompressionStep updates *stream to compress and/or decompress it.\n// srcInfo is primarily used for error messages.\n// Returns data for other steps; the caller should eventually call updateCompressionEdits and perhaps recordValidatedBlobData,\n// and must eventually call close.\nfunc (ic *imageCopier) blobPipelineCompressionStep(stream *sourceStream, canModifyBlob bool, srcInfo types.BlobInfo,\n\tdetected bpDetectCompressionStepData,\n) (*bpCompressionStepData, error) {\n\t// WARNING: If you are adding new reasons to change the blob, update also the OptimizeDestinationImageAlreadyExists\n\t// short-circuit conditions\n\tlayerCompressionChangeSupported := ic.src.CanChangeLayerCompression(stream.info.MediaType)\n\tif !layerCompressionChangeSupported {\n\t\tlogrus.Debugf(\"Compression change for blob %s (%q) not supported\", srcInfo.Digest, stream.info.MediaType)\n\t}\n\tif canModifyBlob && layerCompressionChangeSupported {\n\t\tfor _, fn := range []func(*sourceStream, bpDetectCompressionStepData) (*bpCompressionStepData, error){\n\t\t\tic.bpcPreserveEncrypted,\n\t\t\tic.bpcCompressUncompressed,\n\t\t\tic.bpcRecompressCompressed,\n\t\t\tic.bpcDecompressCompressed,\n\t\t} {\n\t\t\tres, err := fn(stream, detected)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif res != nil {\n\t\t\t\treturn res, nil\n\t\t\t}\n\t\t}\n\t}\n\treturn ic.bpcPreserveOriginal(stream, detected, layerCompressionChangeSupported), nil\n}\n\n// bpcPreserveEncrypted checks if the input is encrypted, and returns a *bpCompressionStepData if so.\nfunc (ic *imageCopier) bpcPreserveEncrypted(stream *sourceStream, _ bpDetectCompressionStepData) (*bpCompressionStepData, error) {\n\tif isOciEncrypted(stream.info.MediaType) {\n\t\t// We can’t do anything with an encrypted blob unless decrypted.\n\t\tlogrus.Debugf(\"Using original blob without modification for encrypted blob\")\n\t\treturn &bpCompressionStepData{\n\t\t\toperation:                             bpcOpPreserveOpaque,\n\t\t\tuploadedOperation:                     types.PreserveOriginal,\n\t\t\tuploadedAlgorithm:                     nil,\n\t\t\tsrcCompressorBaseVariantName:          internalblobinfocache.UnknownCompression,\n\t\t\tuploadedCompressorBaseVariantName:     internalblobinfocache.UnknownCompression,\n\t\t\tuploadedCompressorSpecificVariantName: internalblobinfocache.UnknownCompression,\n\t\t}, nil\n\t}\n\treturn nil, nil\n}\n\n// bpcCompressUncompressed checks if we should be compressing an uncompressed input, and returns a *bpCompressionStepData if so.\nfunc (ic *imageCopier) bpcCompressUncompressed(stream *sourceStream, detected bpDetectCompressionStepData) (*bpCompressionStepData, error) {\n\tif ic.c.dest.DesiredLayerCompression() == types.Compress && !detected.isCompressed {\n\t\tlogrus.Debugf(\"Compressing blob on the fly\")\n\t\tvar uploadedAlgorithm *compressiontypes.Algorithm\n\t\tif ic.compressionFormat != nil {\n\t\t\tuploadedAlgorithm = ic.compressionFormat\n\t\t} else {\n\t\t\tuploadedAlgorithm = defaultCompressionFormat\n\t\t}\n\n\t\treader, annotations := ic.compressedStream(stream.reader, *uploadedAlgorithm)\n\t\t// Note: reader must be closed on all return paths.\n\t\tstream.reader = reader\n\t\tstream.info = types.BlobInfo{ // FIXME? Should we preserve more data in src.info?\n\t\t\tDigest: \"\",\n\t\t\tSize:   -1,\n\t\t}\n\t\tspecificVariantName := uploadedAlgorithm.Name()\n\t\tif specificVariantName == uploadedAlgorithm.BaseVariantName() {\n\t\t\tspecificVariantName = internalblobinfocache.UnknownCompression\n\t\t}\n\t\treturn &bpCompressionStepData{\n\t\t\toperation:                             bpcOpCompressUncompressed,\n\t\t\tuploadedOperation:                     types.Compress,\n\t\t\tuploadedAlgorithm:                     uploadedAlgorithm,\n\t\t\tuploadedAnnotations:                   annotations,\n\t\t\tsrcCompressorBaseVariantName:          detected.srcCompressorBaseVariantName,\n\t\t\tuploadedCompressorBaseVariantName:     uploadedAlgorithm.BaseVariantName(),\n\t\t\tuploadedCompressorSpecificVariantName: specificVariantName,\n\t\t\tclosers:                               []io.Closer{reader},\n\t\t}, nil\n\t}\n\treturn nil, nil\n}\n\n// bpcRecompressCompressed checks if we should be recompressing a compressed input to another format, and returns a *bpCompressionStepData if so.\nfunc (ic *imageCopier) bpcRecompressCompressed(stream *sourceStream, detected bpDetectCompressionStepData) (*bpCompressionStepData, error) {\n\tif ic.c.dest.DesiredLayerCompression() == types.Compress && detected.isCompressed &&\n\t\tic.compressionFormat != nil &&\n\t\t(ic.compressionFormat.Name() != detected.format.Name() && ic.compressionFormat.Name() != detected.format.BaseVariantName()) {\n\t\t// When the blob is compressed, but the desired format is different, it first needs to be decompressed and finally\n\t\t// re-compressed using the desired format.\n\t\tlogrus.Debugf(\"Blob will be converted\")\n\n\t\tdecompressed, err := detected.decompressor(stream.reader)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsucceeded := false\n\t\tdefer func() {\n\t\t\tif !succeeded {\n\t\t\t\tdecompressed.Close()\n\t\t\t}\n\t\t}()\n\n\t\trecompressed, annotations := ic.compressedStream(decompressed, *ic.compressionFormat)\n\t\t// Note: recompressed must be closed on all return paths.\n\t\tstream.reader = recompressed\n\t\tstream.info = types.BlobInfo{ // FIXME? Should we preserve more data in src.info? Notably the current approach correctly removes zstd:chunked metadata annotations.\n\t\t\tDigest: \"\",\n\t\t\tSize:   -1,\n\t\t}\n\t\tspecificVariantName := ic.compressionFormat.Name()\n\t\tif specificVariantName == ic.compressionFormat.BaseVariantName() {\n\t\t\tspecificVariantName = internalblobinfocache.UnknownCompression\n\t\t}\n\t\tsucceeded = true\n\t\treturn &bpCompressionStepData{\n\t\t\toperation:                             bpcOpRecompressCompressed,\n\t\t\tuploadedOperation:                     types.PreserveOriginal,\n\t\t\tuploadedAlgorithm:                     ic.compressionFormat,\n\t\t\tuploadedAnnotations:                   annotations,\n\t\t\tsrcCompressorBaseVariantName:          detected.srcCompressorBaseVariantName,\n\t\t\tuploadedCompressorBaseVariantName:     ic.compressionFormat.BaseVariantName(),\n\t\t\tuploadedCompressorSpecificVariantName: specificVariantName,\n\t\t\tclosers:                               []io.Closer{decompressed, recompressed},\n\t\t}, nil\n\t}\n\treturn nil, nil\n}\n\n// bpcDecompressCompressed checks if we should be decompressing a compressed input, and returns a *bpCompressionStepData if so.\nfunc (ic *imageCopier) bpcDecompressCompressed(stream *sourceStream, detected bpDetectCompressionStepData) (*bpCompressionStepData, error) {\n\tif ic.c.dest.DesiredLayerCompression() == types.Decompress && detected.isCompressed {\n\t\tlogrus.Debugf(\"Blob will be decompressed\")\n\t\ts, err := detected.decompressor(stream.reader)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// Note: s must be closed on all return paths.\n\t\tstream.reader = s\n\t\tstream.info = types.BlobInfo{ // FIXME? Should we preserve more data in src.info? Notably the current approach correctly removes zstd:chunked metadata annotations.\n\t\t\tDigest: \"\",\n\t\t\tSize:   -1,\n\t\t}\n\t\treturn &bpCompressionStepData{\n\t\t\toperation:                             bpcOpDecompressCompressed,\n\t\t\tuploadedOperation:                     types.Decompress,\n\t\t\tuploadedAlgorithm:                     nil,\n\t\t\tsrcCompressorBaseVariantName:          detected.srcCompressorBaseVariantName,\n\t\t\tuploadedCompressorBaseVariantName:     internalblobinfocache.Uncompressed,\n\t\t\tuploadedCompressorSpecificVariantName: internalblobinfocache.UnknownCompression,\n\t\t\tclosers:                               []io.Closer{s},\n\t\t}, nil\n\t}\n\treturn nil, nil\n}\n\n// bpcPreserveOriginal returns a *bpCompressionStepData for not changing the original blob.\n// This does not change the sourceStream parameter; we include it for symmetry with other\n// pipeline steps.\nfunc (ic *imageCopier) bpcPreserveOriginal(_ *sourceStream, detected bpDetectCompressionStepData,\n\tlayerCompressionChangeSupported bool,\n) *bpCompressionStepData {\n\tlogrus.Debugf(\"Using original blob without modification\")\n\t// Remember if the original blob was compressed, and if so how, so that if\n\t// LayerInfosForCopy() returned something that differs from what was in the\n\t// source's manifest, and UpdatedImage() needs to call UpdateLayerInfos(),\n\t// it will be able to correctly derive the MediaType for the copied blob.\n\t//\n\t// But don’t touch blobs in objects where we can’t change compression,\n\t// so that src.UpdatedImage() doesn’t fail; assume that for such blobs\n\t// LayerInfosForCopy() should not be making any changes in the first place.\n\tvar bpcOp bpcOperation\n\tvar uploadedOp types.LayerCompression\n\tvar algorithm *compressiontypes.Algorithm\n\tswitch {\n\tcase !layerCompressionChangeSupported:\n\t\tbpcOp = bpcOpPreserveOpaque\n\t\tuploadedOp = types.PreserveOriginal\n\t\talgorithm = nil\n\tcase detected.isCompressed:\n\t\tbpcOp = bpcOpPreserveCompressed\n\t\tuploadedOp = types.PreserveOriginal\n\t\talgorithm = &detected.format\n\tdefault:\n\t\tbpcOp = bpcOpPreserveUncompressed\n\t\tuploadedOp = types.Decompress\n\t\talgorithm = nil\n\t}\n\treturn &bpCompressionStepData{\n\t\toperation:                    bpcOp,\n\t\tuploadedOperation:            uploadedOp,\n\t\tuploadedAlgorithm:            algorithm,\n\t\tsrcCompressorBaseVariantName: detected.srcCompressorBaseVariantName,\n\t\t// We only record the base variant of the format on upload; we didn’t do anything with\n\t\t// the TOC, we don’t know whether it matches the blob digest, so we don’t want to trigger\n\t\t// reuse of any kind between the blob digest and the TOC digest.\n\t\tuploadedCompressorBaseVariantName:     detected.srcCompressorBaseVariantName,\n\t\tuploadedCompressorSpecificVariantName: internalblobinfocache.UnknownCompression,\n\t}\n}\n\n// updateCompressionEdits sets *operation, *algorithm and updates *annotations, if necessary.\nfunc (d *bpCompressionStepData) updateCompressionEdits(operation *types.LayerCompression, algorithm **compressiontypes.Algorithm, annotations *map[string]string) {\n\t*operation = d.uploadedOperation\n\t// If we can modify the layer's blob, set the desired algorithm for it to be set in the manifest.\n\t*algorithm = d.uploadedAlgorithm\n\tif *annotations == nil {\n\t\t*annotations = map[string]string{}\n\t}\n\tmaps.Copy(*annotations, d.uploadedAnnotations)\n}\n\n// recordValidatedDigestData updates b.blobInfoCache with data about the created uploadedInfo (as returned by PutBlob)\n// and the original srcInfo (which the caller guarantees has been validated).\n// This must ONLY be called if all data has been validated by OUR code, and is not coming from third parties.\nfunc (d *bpCompressionStepData) recordValidatedDigestData(c *copier, uploadedInfo types.BlobInfo, srcInfo types.BlobInfo,\n\tencryptionStep *bpEncryptionStepData, decryptionStep *bpDecryptionStepData,\n) error {\n\t// Don’t record any associations that involve encrypted data. This is a bit crude,\n\t// some blob substitutions (replacing pulls of encrypted data with local reuse of known decryption outcomes)\n\t// might be safe, but it’s not trivially obvious, so let’s be conservative for now.\n\t// This crude approach also means we don’t need to record whether a blob is encrypted\n\t// in the blob info cache (which would probably be necessary for any more complex logic),\n\t// and the simplicity is attractive.\n\tif !encryptionStep.encrypting && !decryptionStep.decrypting {\n\t\t// If d.operation != bpcOpPreserve*, we now have two reliable digest values:\n\t\t// srcinfo.Digest describes the pre-d.operation input, verified by digestingReader\n\t\t// uploadedInfo.Digest describes the post-d.operation output, computed by PutBlob\n\t\t// (because we set stream.info.Digest == \"\", this must have been computed afresh).\n\t\tswitch d.operation {\n\t\tcase bpcOpPreserveOpaque:\n\t\t\t// No useful information\n\t\tcase bpcOpCompressUncompressed:\n\t\t\tc.blobInfoCache.RecordDigestUncompressedPair(uploadedInfo.Digest, srcInfo.Digest)\n\t\t\tif d.uploadedAnnotations != nil {\n\t\t\t\ttocDigest, err := chunkedToc.GetTOCDigest(d.uploadedAnnotations)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"parsing just-created compression annotations: %w\", err)\n\t\t\t\t}\n\t\t\t\tif tocDigest != nil {\n\t\t\t\t\tc.blobInfoCache.RecordTOCUncompressedPair(*tocDigest, srcInfo.Digest)\n\t\t\t\t}\n\t\t\t}\n\t\tcase bpcOpDecompressCompressed:\n\t\t\tc.blobInfoCache.RecordDigestUncompressedPair(srcInfo.Digest, uploadedInfo.Digest)\n\t\tcase bpcOpRecompressCompressed, bpcOpPreserveCompressed:\n\t\t\t// We know one or two compressed digests. BlobInfoCache associates compression variants via the uncompressed digest,\n\t\t\t// and we don’t know that one.\n\t\t\t// That also means that repeated copies with the same recompression don’t identify reuse opportunities (unless\n\t\t\t// RecordDigestUncompressedPair was called for both compressed variants for some other reason).\n\t\tcase bpcOpPreserveUncompressed:\n\t\t\tc.blobInfoCache.RecordDigestUncompressedPair(srcInfo.Digest, srcInfo.Digest)\n\t\tcase bpcOpInvalid:\n\t\t\tfallthrough\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"Internal error: Unexpected d.operation value %#v\", d.operation)\n\t\t}\n\t}\n\tif d.srcCompressorBaseVariantName == \"\" || d.uploadedCompressorBaseVariantName == \"\" || d.uploadedCompressorSpecificVariantName == \"\" {\n\t\treturn fmt.Errorf(\"internal error: missing compressor names (src base: %q, uploaded base: %q, uploaded specific: %q)\",\n\t\t\td.srcCompressorBaseVariantName, d.uploadedCompressorBaseVariantName, d.uploadedCompressorSpecificVariantName)\n\t}\n\tif d.uploadedCompressorBaseVariantName != internalblobinfocache.UnknownCompression {\n\t\tc.blobInfoCache.RecordDigestCompressorData(uploadedInfo.Digest, internalblobinfocache.DigestCompressorData{\n\t\t\tBaseVariantCompressor:      d.uploadedCompressorBaseVariantName,\n\t\t\tSpecificVariantCompressor:  d.uploadedCompressorSpecificVariantName,\n\t\t\tSpecificVariantAnnotations: d.uploadedAnnotations,\n\t\t})\n\t}\n\tif srcInfo.Digest != \"\" && srcInfo.Digest != uploadedInfo.Digest &&\n\t\td.srcCompressorBaseVariantName != internalblobinfocache.UnknownCompression {\n\t\t// If the source is already using some TOC-dependent variant, we either copied the\n\t\t// blob as is, or perhaps decompressed it; either way we don’t trust the TOC digest,\n\t\t// so record neither the variant name, nor the TOC digest.\n\t\tc.blobInfoCache.RecordDigestCompressorData(srcInfo.Digest, internalblobinfocache.DigestCompressorData{\n\t\t\tBaseVariantCompressor:      d.srcCompressorBaseVariantName,\n\t\t\tSpecificVariantCompressor:  internalblobinfocache.UnknownCompression,\n\t\t\tSpecificVariantAnnotations: nil,\n\t\t})\n\t}\n\treturn nil\n}\n\n// close closes objects that carry state throughout the compression/decompression operation.\nfunc (d *bpCompressionStepData) close() {\n\tfor _, c := range d.closers {\n\t\tc.Close()\n\t}\n}\n\n// doCompression reads all input from src and writes its compressed equivalent to dest.\nfunc doCompression(dest io.Writer, src io.Reader, metadata map[string]string, compressionFormat compressiontypes.Algorithm, compressionLevel *int) error {\n\tcompressor, err := compression.CompressStreamWithMetadata(dest, metadata, compressionFormat, compressionLevel)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbuf := make([]byte, compressionBufferSize)\n\n\t_, err = io.CopyBuffer(compressor, src, buf) // Sets err to nil, i.e. causes dest.Close()\n\tif err != nil {\n\t\tcompressor.Close()\n\t\treturn err\n\t}\n\n\treturn compressor.Close()\n}\n\n// compressGoroutine reads all input from src and writes its compressed equivalent to dest.\nfunc (ic *imageCopier) compressGoroutine(dest *io.PipeWriter, src io.Reader, metadata map[string]string, compressionFormat compressiontypes.Algorithm) {\n\terr := errors.New(\"Internal error: unexpected panic in compressGoroutine\")\n\tdefer func() { // Note that this is not the same as {defer dest.CloseWithError(err)}; we need err to be evaluated lazily.\n\t\t_ = dest.CloseWithError(err) // CloseWithError(nil) is equivalent to Close(), always returns nil\n\t}()\n\n\terr = doCompression(dest, src, metadata, compressionFormat, ic.compressionLevel)\n}\n\n// compressedStream returns a stream the input reader compressed using format, and a metadata map.\n// The caller must close the returned reader.\n// AFTER the stream is consumed, metadata will be updated with annotations to use on the data.\nfunc (ic *imageCopier) compressedStream(reader io.Reader, algorithm compressiontypes.Algorithm) (io.ReadCloser, map[string]string) {\n\tpipeReader, pipeWriter := io.Pipe()\n\tannotations := map[string]string{}\n\t// If this fails while writing data, it will do pipeWriter.CloseWithError(); if it fails otherwise,\n\t// e.g. because we have exited and due to pipeReader.Close() above further writing to the pipe has failed,\n\t// we don’t care.\n\tgo ic.compressGoroutine(pipeWriter, reader, annotations, algorithm) // Closes pipeWriter\n\treturn pipeReader, annotations\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/copy.go",
    "content": "package copy\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"slices\"\n\t\"time\"\n\n\tencconfig \"github.com/containers/ocicrypt/config\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\tinternalblobinfocache \"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/digests\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/imagedestination\"\n\t\"go.podman.io/image/v5/internal/imagesource\"\n\tinternalManifest \"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/signature/signer\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"golang.org/x/sync/semaphore\"\n\t\"golang.org/x/term\"\n)\n\nvar (\n\t// ErrDecryptParamsMissing is returned if there is missing decryption parameters\n\tErrDecryptParamsMissing = errors.New(\"Necessary DecryptParameters not present\")\n\n\t// maxParallelDownloads is used to limit the maximum number of parallel\n\t// downloads.  Let's follow Firefox by limiting it to 6.\n\tmaxParallelDownloads = uint(6)\n)\n\n// InstancePlatformFilter specifies a platform by OS and Architecture for filtering instances\ntype InstancePlatformFilter struct {\n\tOS           string // OS, e.g., \"linux\"\n\tArchitecture string // Architecture, e.g., \"amd64\"\n}\n\nconst (\n\t// CopySystemImage is the default value which, when set in\n\t// Options.ImageListSelection, indicates that the caller expects only one\n\t// image to be copied, so if the source reference refers to a list of\n\t// images, one that matches the current system will be selected.\n\tCopySystemImage ImageListSelection = iota\n\t// CopyAllImages is a value which, when set in Options.ImageListSelection,\n\t// indicates that the caller expects to copy multiple images, and if\n\t// the source reference refers to a list, that the list and every image\n\t// to which it refers will be copied.  If the source reference refers\n\t// to a list, the target reference can not accept lists, an error\n\t// should be returned.\n\tCopyAllImages\n\t// CopySpecificImages is a value which, when set in\n\t// Options.ImageListSelection, indicates that the caller expects the\n\t// source reference to be either a single image or a list of images,\n\t// and if the source reference is a list, wants only specific instances\n\t// from it copied (or none of them, if the list of instances to copy is\n\t// empty), along with the list itself.  If the target reference can\n\t// only accept one image (i.e., it cannot accept lists), an error\n\t// should be returned.\n\tCopySpecificImages\n)\n\n// ImageListSelection is one of CopySystemImage, CopyAllImages, or\n// CopySpecificImages, to control whether, when the source reference is a list,\n// copy.Image() copies only an image which matches the current runtime\n// environment, or all images which match the supplied reference, or only\n// specific images from the source reference.\ntype ImageListSelection int\n\n// Options allows supplying non-default configuration modifying the behavior of CopyImage.\ntype Options struct {\n\tRemoveSignatures bool // Remove any pre-existing signatures. Signers and SignBy… will still add a new signature.\n\t// Signers to use to add signatures during the copy.\n\t// Callers are still responsible for closing these Signer objects; they can be reused for multiple copy.Image operations in a row.\n\tSigners                          []*signer.Signer\n\tSignBy                           string          // If non-empty, asks for a signature to be added during the copy, and specifies a key ID, as accepted by signature.NewGPGSigningMechanism().SignDockerManifest(),\n\tSignPassphrase                   string          // Passphrase to use when signing with the key ID from `SignBy`.\n\tSignBySigstorePrivateKeyFile     string          // If non-empty, asks for a signature to be added during the copy, using a sigstore private key file at the provided path.\n\tSignSigstorePrivateKeyPassphrase []byte          // Passphrase to use when signing with `SignBySigstorePrivateKeyFile`.\n\tSignIdentity                     reference.Named // Identify to use when signing, defaults to the docker reference of the destination\n\n\tReportWriter     io.Writer\n\tSourceCtx        *types.SystemContext\n\tDestinationCtx   *types.SystemContext\n\tProgressInterval time.Duration                 // time to wait between reports to signal the progress channel\n\tProgress         chan types.ProgressProperties // Reported to when ProgressInterval has arrived for a single artifact+offset.\n\n\t// Preserve digests, and fail if we cannot.\n\tPreserveDigests bool\n\t// manifest MIME type of image set by user. \"\" is default and means use the autodetection to the manifest MIME type\n\tForceManifestMIMEType string\n\tImageListSelection    ImageListSelection       // set to either CopySystemImage (the default), CopyAllImages, or CopySpecificImages to control which instances we copy when the source reference is a list; ignored if the source reference is not a list\n\tInstances             []digest.Digest          // if ImageListSelection is CopySpecificImages, copy only these instances, instances matching the InstancePlatforms list, and the list itself\n\tInstancePlatforms     []InstancePlatformFilter // if ImageListSelection is CopySpecificImages, copy instances with matching OS/Architecture (all variants and compressions), it also copies the index/manifest_list instance.\n\t// Give priority to pulling gzip images if multiple images are present when configured to OptionalBoolTrue,\n\t// prefers the best compression if this is configured as OptionalBoolFalse. Choose automatically (and the choice may change over time)\n\t// if this is set to OptionalBoolUndefined (which is the default behavior, and recommended for most callers).\n\t// This only affects CopySystemImage.\n\tPreferGzipInstances types.OptionalBool\n\n\t// If OciEncryptConfig is non-nil, it indicates that an image should be encrypted.\n\t// The encryption options is derived from the construction of EncryptConfig object.\n\tOciEncryptConfig *encconfig.EncryptConfig\n\t// OciEncryptLayers represents the list of layers to encrypt.\n\t// If nil, don't encrypt any layers.\n\t// If non-nil and len==0, denotes encrypt all layers.\n\t// integers in the slice represent 0-indexed layer indices, with support for negative\n\t// indexing. i.e. 0 is the first layer, -1 is the last (top-most) layer.\n\tOciEncryptLayers *[]int\n\t// OciDecryptConfig contains the config that can be used to decrypt an image if it is\n\t// encrypted if non-nil. If nil, it does not attempt to decrypt an image.\n\tOciDecryptConfig *encconfig.DecryptConfig\n\n\t// A weighted semaphore to limit the amount of concurrently copied layers and configs. Applies to all copy operations using the semaphore. If set, MaxParallelDownloads is ignored.\n\tConcurrentBlobCopiesSemaphore *semaphore.Weighted\n\n\t// MaxParallelDownloads indicates the maximum layers to pull at the same time. Applies to a single copy operation. A reasonable default is used if this is left as 0. Ignored if ConcurrentBlobCopiesSemaphore is set.\n\tMaxParallelDownloads uint\n\n\t// When OptimizeDestinationImageAlreadyExists is set, optimize the copy assuming that the destination image already\n\t// exists (and is equivalent). Making the eventual (no-op) copy more performant for this case. Enabling the option\n\t// is slightly pessimistic if the destination image doesn't exist, or is not equivalent.\n\tOptimizeDestinationImageAlreadyExists bool\n\n\t// Download layer contents with \"nondistributable\" media types (\"foreign\" layers) and translate the layer media type\n\t// to not indicate \"nondistributable\".\n\tDownloadForeignLayers bool\n\n\t// Contains slice of OptionCompressionVariant, where copy will ensure that for each platform\n\t// in the manifest list, a variant with the requested compression will exist.\n\t// Invalid when copying a non-multi-architecture image. That will probably\n\t// change in the future.\n\tEnsureCompressionVariantsExist []OptionCompressionVariant\n\t// ForceCompressionFormat ensures that the compression algorithm set in\n\t// DestinationCtx.CompressionFormat is used exclusively, and blobs of other\n\t// compression algorithms are not reused.\n\tForceCompressionFormat bool\n\n\t// ReportResolvedReference, if set, asks the destination transport to store\n\t// a “resolved” (more detailed) reference to the created image\n\t// into the value this option points to.\n\t// What “resolved” means is transport-specific.\n\t// Most transports don’t support this, and cause the value to be set to nil.\n\t//\n\t// For the containers-storage: transport, the reference contains an image ID,\n\t// so that storage.ResolveReference returns exactly the created image.\n\t// WARNING: It is unspecified whether the reference also contains a reference.Named element.\n\tReportResolvedReference *types.ImageReference\n\n\t// DestinationTimestamp, if set, will force timestamps of content created in the destination to this value.\n\t// Most transports don't support this.\n\t//\n\t// In oci-archive: destinations, this will set the create/mod/access timestamps in each tar entry\n\t// (but not a timestamp of the created archive file).\n\tDestinationTimestamp *time.Time\n\n\t// FIXME:\n\t// - this reference to an internal type is unusable from the outside even if we made the field public\n\t// - what is the actual semantics? Right now it is probably “choices to use when writing to the destination”, TBD\n\t// - anyway do we want to expose _all_ of the digests.Options tunables, or fewer?\n\t// - … do we want to expose _more_ granularity than that?\n\t//   - (“must have at least sha512 integrity when reading”, what does “at least” mean for random pairs of algorithms?)\n\t//   - should some of this be in config files, maybe ever per-registry?\n\tdigestOptions digests.Options\n}\n\n// OptionCompressionVariant allows to supply information about\n// selected compression algorithm and compression level by the\n// end-user. Refer to EnsureCompressionVariantsExist to know\n// more about its usage.\ntype OptionCompressionVariant struct {\n\tAlgorithm compression.Algorithm\n\tLevel     *int // Only used when we are creating a new image instance using the specified algorithm, not when the image already contains such an instance\n}\n\n// copier allows us to keep track of diffID values for blobs, and other\n// data shared across one or more images in a possible manifest list.\n// The owner must call close() when done.\ntype copier struct {\n\tpolicyContext *signature.PolicyContext\n\tdest          private.ImageDestination\n\trawSource     private.ImageSource\n\toptions       *Options // never nil\n\n\treportWriter   io.Writer\n\tprogressOutput io.Writer\n\n\tunparsedToplevel              *image.UnparsedImage // for rawSource\n\tblobInfoCache                 internalblobinfocache.BlobInfoCache2\n\tconcurrentBlobCopiesSemaphore *semaphore.Weighted // Limits the amount of concurrently copied blobs\n\tsigners                       []*signer.Signer    // Signers to use to create new signatures for the image\n\tsignersToClose                []*signer.Signer    // Signers that should be closed when this copier is destroyed.\n}\n\n// Internal function to validate `requireCompressionFormatMatch` for copySingleImageOptions\nfunc shouldRequireCompressionFormatMatch(options *Options) (bool, error) {\n\tif options.ForceCompressionFormat && (options.DestinationCtx == nil || options.DestinationCtx.CompressionFormat == nil) {\n\t\treturn false, fmt.Errorf(\"cannot use ForceCompressionFormat with undefined default compression format\")\n\t}\n\treturn options.ForceCompressionFormat, nil\n}\n\n// Image copies image from srcRef to destRef, using policyContext to validate\n// source image admissibility.  It returns the manifest which was written to\n// the new copy of the image.\nfunc Image(ctx context.Context, policyContext *signature.PolicyContext, destRef, srcRef types.ImageReference, options *Options) (copiedManifest []byte, retErr error) {\n\tif options == nil {\n\t\toptions = &Options{}\n\t}\n\t// FIXME: Currently, digestsOptions is not implemented at all, and exists in the codebase\n\t// only to allow gradually building the feature set.\n\t// After c/image/copy consistently implements it, provide a public digest options API of some kind.\n\toptionsCopy := *options\n\toptionsCopy.digestOptions = digests.CanonicalDefault()\n\toptions = &optionsCopy\n\n\tif err := validateImageListSelection(options.ImageListSelection); err != nil {\n\t\treturn nil, err\n\t}\n\n\treportWriter := io.Discard\n\n\tif options.ReportWriter != nil {\n\t\treportWriter = options.ReportWriter\n\t}\n\n\t// safeClose amends retErr with an error from c.Close(), if any.\n\tsafeClose := func(name string, c io.Closer) {\n\t\terr := c.Close()\n\t\tif err == nil {\n\t\t\treturn\n\t\t}\n\t\t// Do not use %w for err as we don't want it to be unwrapped by callers.\n\t\tif retErr != nil {\n\t\t\tretErr = fmt.Errorf(\" (%s: %s): %w\", name, err.Error(), retErr)\n\t\t} else {\n\t\t\tretErr = fmt.Errorf(\" (%s: %s)\", name, err.Error())\n\t\t}\n\t}\n\n\tpublicDest, err := destRef.NewImageDestination(ctx, options.DestinationCtx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing destination %s: %w\", transports.ImageName(destRef), err)\n\t}\n\tdest := imagedestination.FromPublic(publicDest)\n\tdefer safeClose(\"dest\", dest)\n\n\tpublicRawSource, err := srcRef.NewImageSource(ctx, options.SourceCtx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing source %s: %w\", transports.ImageName(srcRef), err)\n\t}\n\trawSource := imagesource.FromPublic(publicRawSource)\n\tdefer safeClose(\"src\", rawSource)\n\n\t// If reportWriter is not a TTY (e.g., when piping to a file), do not\n\t// print the progress bars to avoid long and hard to parse output.\n\t// Instead use printCopyInfo() to print single line \"Copying ...\" messages.\n\tprogressOutput := reportWriter\n\tif !isTTY(reportWriter) {\n\t\tprogressOutput = io.Discard\n\t}\n\n\tc := &copier{\n\t\tpolicyContext: policyContext,\n\t\tdest:          dest,\n\t\trawSource:     rawSource,\n\t\toptions:       options,\n\n\t\treportWriter:   reportWriter,\n\t\tprogressOutput: progressOutput,\n\n\t\tunparsedToplevel: image.UnparsedInstance(rawSource, nil),\n\t\t// FIXME? The cache is used for sources and destinations equally, but we only have a SourceCtx and DestinationCtx.\n\t\t// For now, use DestinationCtx (because blob reuse changes the behavior of the destination side more).\n\t\t// Conceptually the cache settings should be in copy.Options instead.\n\t\tblobInfoCache: internalblobinfocache.FromBlobInfoCache(blobinfocache.DefaultCache(options.DestinationCtx)),\n\t}\n\tdefer c.close()\n\tc.blobInfoCache.Open()\n\tdefer c.blobInfoCache.Close()\n\n\t// Set the concurrentBlobCopiesSemaphore if we can copy layers in parallel.\n\tif dest.HasThreadSafePutBlob() && rawSource.HasThreadSafeGetBlob() {\n\t\tc.concurrentBlobCopiesSemaphore = c.options.ConcurrentBlobCopiesSemaphore\n\t\tif c.concurrentBlobCopiesSemaphore == nil {\n\t\t\tmax := c.options.MaxParallelDownloads\n\t\t\tif max == 0 {\n\t\t\t\tmax = maxParallelDownloads\n\t\t\t}\n\t\t\tc.concurrentBlobCopiesSemaphore = semaphore.NewWeighted(int64(max))\n\t\t}\n\t} else {\n\t\tc.concurrentBlobCopiesSemaphore = semaphore.NewWeighted(int64(1))\n\t\tif c.options.ConcurrentBlobCopiesSemaphore != nil {\n\t\t\tif err := c.options.ConcurrentBlobCopiesSemaphore.Acquire(ctx, 1); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"acquiring semaphore for concurrent blob copies: %w\", err)\n\t\t\t}\n\t\t\tdefer c.options.ConcurrentBlobCopiesSemaphore.Release(1)\n\t\t}\n\t}\n\n\tif err := c.setupSigners(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tmultiImage, err := isMultiImage(ctx, c.unparsedToplevel)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"determining manifest MIME type for %s: %w\", transports.ImageName(srcRef), err)\n\t}\n\n\tif !multiImage {\n\t\tif len(options.EnsureCompressionVariantsExist) > 0 {\n\t\t\treturn nil, fmt.Errorf(\"EnsureCompressionVariantsExist is not implemented when not creating a multi-architecture image\")\n\t\t}\n\t\trequireCompressionFormatMatch, err := shouldRequireCompressionFormatMatch(options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// The simple case: just copy a single image.\n\t\tsingle, err := c.copySingleImage(ctx, c.unparsedToplevel, nil, copySingleImageOptions{requireCompressionFormatMatch: requireCompressionFormatMatch})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcopiedManifest = single.manifest\n\t} else if c.options.ImageListSelection == CopySystemImage {\n\t\tif len(options.EnsureCompressionVariantsExist) > 0 {\n\t\t\treturn nil, fmt.Errorf(\"EnsureCompressionVariantsExist is not implemented when not creating a multi-architecture image\")\n\t\t}\n\t\trequireCompressionFormatMatch, err := shouldRequireCompressionFormatMatch(options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// This is a manifest list, and we weren't asked to copy multiple images.  Choose a single image that\n\t\t// matches the current system to copy, and copy it.\n\t\tmfest, manifestType, err := c.unparsedToplevel.Manifest(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"reading manifest for %s: %w\", transports.ImageName(srcRef), err)\n\t\t}\n\t\tmanifestList, err := internalManifest.ListFromBlob(mfest, manifestType)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing primary manifest as list for %s: %w\", transports.ImageName(srcRef), err)\n\t\t}\n\t\tinstanceDigest, err := manifestList.ChooseInstanceByCompression(c.options.SourceCtx, c.options.PreferGzipInstances) // try to pick one that matches c.options.SourceCtx\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"choosing an image from manifest list %s: %w\", transports.ImageName(srcRef), err)\n\t\t}\n\t\tlogrus.Debugf(\"Source is a manifest list; copying (only) instance %s for current system\", instanceDigest)\n\t\tunparsedInstance := image.UnparsedInstance(rawSource, &instanceDigest)\n\t\tsingle, err := c.copySingleImage(ctx, unparsedInstance, nil, copySingleImageOptions{requireCompressionFormatMatch: requireCompressionFormatMatch})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"copying system image from manifest list: %w\", err)\n\t\t}\n\t\tcopiedManifest = single.manifest\n\t} else { /* c.options.ImageListSelection == CopyAllImages or c.options.ImageListSelection == CopySpecificImages, */\n\t\t// If we were asked to copy multiple images and can't, that's an error.\n\t\tif !supportsMultipleImages(c.dest) {\n\t\t\treturn nil, fmt.Errorf(\"copying multiple images: destination transport %q does not support copying multiple images as a group\", destRef.Transport().Name())\n\t\t}\n\t\t// Copy some or all of the images.\n\t\tswitch c.options.ImageListSelection {\n\t\tcase CopyAllImages:\n\t\t\tlogrus.Debugf(\"Source is a manifest list; copying all instances\")\n\t\tcase CopySpecificImages:\n\t\t\tlogrus.Debugf(\"Source is a manifest list; copying some instances\")\n\t\t}\n\t\tif copiedManifest, err = c.copyMultipleImages(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif options.ReportResolvedReference != nil {\n\t\t*options.ReportResolvedReference = nil // The default outcome, if not specifically supported by the transport.\n\t}\n\tif err := c.dest.CommitWithOptions(ctx, private.CommitOptions{\n\t\tUnparsedToplevel:        c.unparsedToplevel,\n\t\tReportResolvedReference: options.ReportResolvedReference,\n\t\tTimestamp:               options.DestinationTimestamp,\n\t}); err != nil {\n\t\treturn nil, fmt.Errorf(\"committing the finished image: %w\", err)\n\t}\n\n\treturn copiedManifest, nil\n}\n\n// Printf writes a formatted string to c.reportWriter.\n// Note that the method name Printf is not entirely arbitrary: (go tool vet)\n// has a built-in list of functions/methods (whatever object they are for)\n// which have their format strings checked; for other names we would have\n// to pass a parameter to every (go tool vet) invocation.\nfunc (c *copier) Printf(format string, a ...any) {\n\tfmt.Fprintf(c.reportWriter, format, a...)\n}\n\n// close tears down state owned by copier.\nfunc (c *copier) close() {\n\tfor i, s := range c.signersToClose {\n\t\tif err := s.Close(); err != nil {\n\t\t\tlogrus.Warnf(\"Error closing per-copy signer %d: %v\", i+1, err)\n\t\t}\n\t}\n}\n\n// validateImageListSelection returns an error if the passed-in value is not one that we recognize as a valid ImageListSelection value\nfunc validateImageListSelection(selection ImageListSelection) error {\n\tswitch selection {\n\tcase CopySystemImage, CopyAllImages, CopySpecificImages:\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"Invalid value for options.ImageListSelection: %d\", selection)\n\t}\n}\n\n// Checks if the destination supports accepting multiple images by checking if it can support\n// manifest types that are lists of other manifests.\nfunc supportsMultipleImages(dest types.ImageDestination) bool {\n\tmtypes := dest.SupportedManifestMIMETypes()\n\tif len(mtypes) == 0 {\n\t\t// Anything goes!\n\t\treturn true\n\t}\n\treturn slices.ContainsFunc(mtypes, manifest.MIMETypeIsMultiImage)\n}\n\n// isTTY returns true if the io.Writer is a file and a tty.\nfunc isTTY(w io.Writer) bool {\n\tif f, ok := w.(*os.File); ok {\n\t\treturn term.IsTerminal(int(f.Fd()))\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/digesting_reader.go",
    "content": "package copy\n\nimport (\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n)\n\ntype digestingReader struct {\n\tsource              io.Reader\n\tdigester            digest.Digester\n\thash                hash.Hash\n\texpectedDigest      digest.Digest\n\tvalidationFailed    bool\n\tvalidationSucceeded bool\n}\n\n// newDigestingReader returns an io.Reader implementation with contents of source, which will eventually return a non-EOF error\n// or set validationSucceeded/validationFailed to true if the source stream does/does not match expectedDigest.\n// (neither is set if EOF is never reached).\nfunc newDigestingReader(source io.Reader, expectedDigest digest.Digest) (*digestingReader, error) {\n\tvar digester digest.Digester\n\tif err := expectedDigest.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid digest specification %q: %w\", expectedDigest, err)\n\t}\n\tdigestAlgorithm := expectedDigest.Algorithm()\n\tif !digestAlgorithm.Available() {\n\t\treturn nil, fmt.Errorf(\"invalid digest specification %q: unsupported digest algorithm %q\", expectedDigest, digestAlgorithm)\n\t}\n\tdigester = digestAlgorithm.Digester()\n\n\treturn &digestingReader{\n\t\tsource:           source,\n\t\tdigester:         digester,\n\t\thash:             digester.Hash(),\n\t\texpectedDigest:   expectedDigest,\n\t\tvalidationFailed: false,\n\t}, nil\n}\n\nfunc (d *digestingReader) Read(p []byte) (int, error) {\n\tn, err := d.source.Read(p)\n\tif n > 0 {\n\t\tif n2, err := d.hash.Write(p[:n]); n2 != n || err != nil {\n\t\t\t// Coverage: This should not happen, the hash.Hash interface requires\n\t\t\t// d.digest.Write to never return an error, and the io.Writer interface\n\t\t\t// requires n2 == len(input) if no error is returned.\n\t\t\treturn 0, fmt.Errorf(\"updating digest during verification: %d vs. %d: %w\", n2, n, err)\n\t\t}\n\t}\n\tif err == io.EOF {\n\t\tactualDigest := d.digester.Digest()\n\t\tif actualDigest != d.expectedDigest {\n\t\t\td.validationFailed = true\n\t\t\treturn 0, fmt.Errorf(\"Digest did not match, expected %s, got %s\", d.expectedDigest, actualDigest)\n\t\t}\n\t\td.validationSucceeded = true\n\t}\n\treturn n, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/encryption.go",
    "content": "package copy\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/containers/ocicrypt\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// isOciEncrypted returns a bool indicating if a mediatype is encrypted\n// This function will be moved to be part of OCI spec when adopted.\nfunc isOciEncrypted(mediatype string) bool {\n\treturn strings.HasSuffix(mediatype, \"+encrypted\")\n}\n\n// isEncrypted checks if an image is encrypted\nfunc isEncrypted(i types.Image) bool {\n\tlayers := i.LayerInfos()\n\treturn slices.ContainsFunc(layers, func(l types.BlobInfo) bool {\n\t\treturn isOciEncrypted(l.MediaType)\n\t})\n}\n\n// bpDecryptionStepData contains data that the copy pipeline needs about the decryption step.\ntype bpDecryptionStepData struct {\n\tdecrypting bool // We are actually decrypting the stream\n}\n\n// blobPipelineDecryptionStep updates *stream to decrypt if, it necessary.\n// srcInfo is only used for error messages.\n// Returns data for other steps; the caller should eventually use updateCryptoOperation.\nfunc (ic *imageCopier) blobPipelineDecryptionStep(stream *sourceStream, srcInfo types.BlobInfo) (*bpDecryptionStepData, error) {\n\tif !isOciEncrypted(stream.info.MediaType) || ic.c.options.OciDecryptConfig == nil {\n\t\treturn &bpDecryptionStepData{\n\t\t\tdecrypting: false,\n\t\t}, nil\n\t}\n\n\tif ic.cannotModifyManifestReason != \"\" {\n\t\treturn nil, fmt.Errorf(\"layer %s should be decrypted, but we can’t modify the manifest: %s\", srcInfo.Digest, ic.cannotModifyManifestReason)\n\t}\n\n\tdesc := imgspecv1.Descriptor{\n\t\tAnnotations: stream.info.Annotations,\n\t}\n\t// DecryptLayer supposedly returns a digest of the decrypted stream.\n\t// In practice, that value is never set in the current implementation.\n\t// And we shouldn’t use it anyway, because it is not trusted: encryption can be made to a public key,\n\t// i.e. it doesn’t authenticate the origin of the metadata in any way.\n\treader, _, err := ocicrypt.DecryptLayer(ic.c.options.OciDecryptConfig, stream.reader, desc, false)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decrypting layer %s: %w\", srcInfo.Digest, err)\n\t}\n\n\tstream.reader = reader\n\tstream.info.Digest = \"\"\n\tstream.info.Size = -1\n\tmaps.DeleteFunc(stream.info.Annotations, func(k string, _ string) bool {\n\t\treturn strings.HasPrefix(k, \"org.opencontainers.image.enc\")\n\t})\n\treturn &bpDecryptionStepData{\n\t\tdecrypting: true,\n\t}, nil\n}\n\n// updateCryptoOperation sets *operation, if necessary.\nfunc (d *bpDecryptionStepData) updateCryptoOperation(operation *types.LayerCrypto) {\n\tif d.decrypting {\n\t\t*operation = types.Decrypt\n\t}\n}\n\n// bpEncryptionStepData contains data that the copy pipeline needs about the encryption step.\ntype bpEncryptionStepData struct {\n\tencrypting bool // We are actually encrypting the stream\n\tfinalizer  ocicrypt.EncryptLayerFinalizer\n}\n\n// blobPipelineEncryptionStep updates *stream to encrypt if, it required by toEncrypt.\n// srcInfo is primarily used for error messages.\n// Returns data for other steps; the caller should eventually call updateCryptoOperationAndAnnotations.\nfunc (ic *imageCopier) blobPipelineEncryptionStep(stream *sourceStream, toEncrypt bool, srcInfo types.BlobInfo,\n\tdecryptionStep *bpDecryptionStepData,\n) (*bpEncryptionStepData, error) {\n\tif !toEncrypt || isOciEncrypted(srcInfo.MediaType) || ic.c.options.OciEncryptConfig == nil {\n\t\treturn &bpEncryptionStepData{\n\t\t\tencrypting: false,\n\t\t}, nil\n\t}\n\n\tif ic.cannotModifyManifestReason != \"\" {\n\t\treturn nil, fmt.Errorf(\"layer %s should be encrypted, but we can’t modify the manifest: %s\", srcInfo.Digest, ic.cannotModifyManifestReason)\n\t}\n\n\tvar annotations map[string]string\n\tif !decryptionStep.decrypting {\n\t\tannotations = srcInfo.Annotations\n\t}\n\tdesc := imgspecv1.Descriptor{\n\t\tMediaType:   srcInfo.MediaType,\n\t\tDigest:      srcInfo.Digest,\n\t\tSize:        srcInfo.Size,\n\t\tAnnotations: annotations,\n\t}\n\treader, finalizer, err := ocicrypt.EncryptLayer(ic.c.options.OciEncryptConfig, stream.reader, desc)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"encrypting blob %s: %w\", srcInfo.Digest, err)\n\t}\n\n\tstream.reader = reader\n\tstream.info.Digest = \"\"\n\tstream.info.Size = -1\n\treturn &bpEncryptionStepData{\n\t\tencrypting: true,\n\t\tfinalizer:  finalizer,\n\t}, nil\n}\n\n// updateCryptoOperationAndAnnotations sets *operation and updates *annotations, if necessary.\nfunc (d *bpEncryptionStepData) updateCryptoOperationAndAnnotations(operation *types.LayerCrypto, annotations *map[string]string) error {\n\tif !d.encrypting {\n\t\treturn nil\n\t}\n\n\tencryptAnnotations, err := d.finalizer()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Unable to finalize encryption: %w\", err)\n\t}\n\t*operation = types.Encrypt\n\tif *annotations == nil {\n\t\t*annotations = map[string]string{}\n\t}\n\tmaps.Copy(*annotations, encryptAnnotations)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/manifest.go",
    "content": "package copy\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\n\tv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\tinternalManifest \"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/manifest\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// preferredManifestMIMETypes lists manifest MIME types in order of our preference, if we can't use the original manifest and need to convert.\n// Prefer v2s2 to v2s1 because v2s2 does not need to be changed when uploading to a different location.\n// Include v2s1 signed but not v2s1 unsigned, because docker/distribution requires a signature even if the unsigned MIME type is used.\nvar preferredManifestMIMETypes = []string{manifest.DockerV2Schema2MediaType, manifest.DockerV2Schema1SignedMediaType}\n\n// allManifestMIMETypes lists all possible manifest MIME types.\nvar allManifestMIMETypes = []string{v1.MediaTypeImageManifest, manifest.DockerV2Schema2MediaType, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema1MediaType}\n\n// orderedSet is a list of strings (MIME types or platform descriptors in our case), with each string appearing at most once.\ntype orderedSet struct {\n\tlist     []string\n\tincluded *set.Set[string]\n}\n\n// newOrderedSet creates a correctly initialized orderedSet.\n// [Sometimes it would be really nice if Golang had constructors…]\nfunc newOrderedSet() *orderedSet {\n\treturn &orderedSet{\n\t\tlist:     []string{},\n\t\tincluded: set.New[string](),\n\t}\n}\n\n// append adds s to the end of os, only if it is not included already.\nfunc (os *orderedSet) append(s string) {\n\tif !os.included.Contains(s) {\n\t\tos.list = append(os.list, s)\n\t\tos.included.Add(s)\n\t}\n}\n\n// determineManifestConversionInputs contains the inputs for determineManifestConversion.\ntype determineManifestConversionInputs struct {\n\tsrcMIMEType string // MIME type of the input manifest\n\n\tdestSupportedManifestMIMETypes []string // MIME types supported by the destination, per types.ImageDestination.SupportedManifestMIMETypes()\n\n\tforceManifestMIMEType      string                      // User’s choice of forced manifest MIME type\n\trequestedCompressionFormat *compressiontypes.Algorithm // Compression algorithm to use, if the user _explictily_ requested one.\n\trequiresOCIEncryption      bool                        // Restrict to manifest formats that can support OCI encryption\n\tcannotModifyManifestReason string                      // The reason the manifest cannot be modified, or an empty string if it can\n}\n\n// manifestConversionPlan contains the decisions made by determineManifestConversion.\ntype manifestConversionPlan struct {\n\t// The preferred manifest MIME type (whether we are converting to it or using it unmodified).\n\t// We compute this only to show it in error messages; without having to add this context\n\t// in an error message, we would be happy enough to know only that no conversion is needed.\n\tpreferredMIMEType                string\n\tpreferredMIMETypeNeedsConversion bool     // True if using preferredMIMEType requires a conversion step.\n\totherMIMETypeCandidates          []string // Other possible alternatives, in order\n}\n\n// determineManifestConversion returns a plan for what formats, and possibly conversions, to use based on in.\nfunc determineManifestConversion(in determineManifestConversionInputs) (manifestConversionPlan, error) {\n\tsrcType := in.srcMIMEType\n\tnormalizedSrcType := manifest.NormalizedMIMEType(srcType)\n\tif srcType != normalizedSrcType {\n\t\tlogrus.Debugf(\"Source manifest MIME type %q, treating it as %q\", srcType, normalizedSrcType)\n\t\tsrcType = normalizedSrcType\n\t}\n\n\tdestSupportedManifestMIMETypes := in.destSupportedManifestMIMETypes\n\tif in.forceManifestMIMEType != \"\" {\n\t\tdestSupportedManifestMIMETypes = []string{in.forceManifestMIMEType}\n\t}\n\tif len(destSupportedManifestMIMETypes) == 0 {\n\t\tdestSupportedManifestMIMETypes = allManifestMIMETypes\n\t}\n\n\trestrictiveCompressionRequired := in.requestedCompressionFormat != nil && !internalManifest.CompressionAlgorithmIsUniversallySupported(*in.requestedCompressionFormat)\n\tsupportedByDest := set.New[string]()\n\tfor _, t := range destSupportedManifestMIMETypes {\n\t\tif in.requiresOCIEncryption && !manifest.MIMETypeSupportsEncryption(t) {\n\t\t\tcontinue\n\t\t}\n\t\tif restrictiveCompressionRequired && !internalManifest.MIMETypeSupportsCompressionAlgorithm(t, *in.requestedCompressionFormat) {\n\t\t\tcontinue\n\t\t}\n\t\tsupportedByDest.Add(t)\n\t}\n\tif supportedByDest.Empty() {\n\t\tif len(destSupportedManifestMIMETypes) == 0 { // Coverage: This should never happen, empty values were replaced by allManifestMIMETypes\n\t\t\treturn manifestConversionPlan{}, errors.New(\"internal error: destSupportedManifestMIMETypes is empty\")\n\t\t}\n\t\t// We know, and have verified, that destSupportedManifestMIMETypes is not empty, so some filtering of supported MIME types must have been involved.\n\n\t\t// destSupportedManifestMIMETypes has three possible origins:\n\t\tif in.forceManifestMIMEType != \"\" { // 1. forceManifestType specified\n\t\t\tswitch {\n\t\t\tcase in.requiresOCIEncryption && restrictiveCompressionRequired:\n\t\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"compression using %s, and encryption, required together with format %s, which does not support both\",\n\t\t\t\t\tin.requestedCompressionFormat.Name(), in.forceManifestMIMEType)\n\t\t\tcase in.requiresOCIEncryption:\n\t\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"encryption required together with format %s, which does not support encryption\",\n\t\t\t\t\tin.forceManifestMIMEType)\n\t\t\tcase restrictiveCompressionRequired:\n\t\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"compression using %s required together with format %s, which does not support it\",\n\t\t\t\t\tin.requestedCompressionFormat.Name(), in.forceManifestMIMEType)\n\t\t\tdefault:\n\t\t\t\treturn manifestConversionPlan{}, errors.New(\"internal error: forceManifestMIMEType was rejected for an unknown reason\")\n\t\t\t}\n\t\t}\n\t\tif len(in.destSupportedManifestMIMETypes) == 0 { // 2. destination accepts anything and we have chosen allManifestTypes\n\t\t\tif !restrictiveCompressionRequired {\n\t\t\t\t// Coverage: This should never happen.\n\t\t\t\t// If we have not rejected for encryption reasons, we must have rejected due to encryption, but\n\t\t\t\t// allManifestTypes includes OCI, which supports encryption.\n\t\t\t\treturn manifestConversionPlan{}, errors.New(\"internal error: in.destSupportedManifestMIMETypes is empty but supportedByDest is empty as well\")\n\t\t\t}\n\t\t\t// This can legitimately happen when the user asks for completely unsupported formats like Bzip2 or Xz.\n\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"compression using %s required, but none of the known manifest formats support it\", in.requestedCompressionFormat.Name())\n\t\t}\n\t\t// 3. destination accepts a restricted list of mime types\n\t\tdestMIMEList := strings.Join(destSupportedManifestMIMETypes, \", \")\n\t\tswitch {\n\t\tcase in.requiresOCIEncryption && restrictiveCompressionRequired:\n\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"compression using %s, and encryption, required but the destination only supports MIME types [%s], none of which support both\",\n\t\t\t\tin.requestedCompressionFormat.Name(), destMIMEList)\n\t\tcase in.requiresOCIEncryption:\n\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"encryption required but the destination only supports MIME types [%s], none of which support encryption\",\n\t\t\t\tdestMIMEList)\n\t\tcase restrictiveCompressionRequired:\n\t\t\treturn manifestConversionPlan{}, fmt.Errorf(\"compression using %s required but the destination only supports MIME types [%s], none of which support it\",\n\t\t\t\tin.requestedCompressionFormat.Name(), destMIMEList)\n\t\tdefault: // Coverage: This should never happen, we only filter for in.requiresOCIEncryption || restrictiveCompressionRequired\n\t\t\treturn manifestConversionPlan{}, errors.New(\"internal error: supportedByDest is empty but destSupportedManifestMIMETypes is not, and we are neither encrypting nor requiring a restrictive compression algorithm\")\n\t\t}\n\t}\n\n\t// destSupportedManifestMIMETypes is a static guess; a particular registry may still only support a subset of the types.\n\t// So, build a list of types to try in order of decreasing preference.\n\t// FIXME? This treats manifest.DockerV2Schema1SignedMediaType and manifest.DockerV2Schema1MediaType as distinct,\n\t// although we are not really making any conversion, and it is very unlikely that a destination would support one but not the other.\n\t// In practice, schema1 is probably the lowest common denominator, so we would expect to try the first one of the MIME types\n\t// and never attempt the other one.\n\tprioritizedTypes := newOrderedSet()\n\n\t// First of all, prefer to keep the original manifest unmodified.\n\tif supportedByDest.Contains(srcType) {\n\t\tprioritizedTypes.append(srcType)\n\t}\n\tif in.cannotModifyManifestReason != \"\" {\n\t\t// We could also drop this check and have the caller\n\t\t// make the choice; it is already doing that to an extent, to improve error\n\t\t// messages.  But it is nice to hide the “if we can't modify, do no conversion”\n\t\t// special case in here; the caller can then worry (or not) only about a good UI.\n\t\tlogrus.Debugf(\"We can't modify the manifest, hoping for the best...\")\n\t\treturn manifestConversionPlan{ // Take our chances - FIXME? Or should we fail without trying?\n\t\t\tpreferredMIMEType:       srcType,\n\t\t\totherMIMETypeCandidates: []string{},\n\t\t}, nil\n\t}\n\n\t// Then use our list of preferred types.\n\tfor _, t := range preferredManifestMIMETypes {\n\t\tif supportedByDest.Contains(t) {\n\t\t\tprioritizedTypes.append(t)\n\t\t}\n\t}\n\n\t// Finally, try anything else the destination supports.\n\tfor _, t := range destSupportedManifestMIMETypes {\n\t\tif supportedByDest.Contains(t) {\n\t\t\tprioritizedTypes.append(t)\n\t\t}\n\t}\n\n\tlogrus.Debugf(\"Manifest has MIME type %s, ordered candidate list [%s]\", srcType, strings.Join(prioritizedTypes.list, \", \"))\n\tif len(prioritizedTypes.list) == 0 { // Coverage: destSupportedManifestMIMETypes and supportedByDest, which is a subset, is not empty (or we would have exited above), so this should never happen.\n\t\treturn manifestConversionPlan{}, errors.New(\"Internal error: no candidate MIME types\")\n\t}\n\tres := manifestConversionPlan{\n\t\tpreferredMIMEType:       prioritizedTypes.list[0],\n\t\totherMIMETypeCandidates: prioritizedTypes.list[1:],\n\t}\n\tres.preferredMIMETypeNeedsConversion = res.preferredMIMEType != srcType\n\tif !res.preferredMIMETypeNeedsConversion {\n\t\tlogrus.Debugf(\"... will first try using the original manifest unmodified\")\n\t}\n\treturn res, nil\n}\n\n// isMultiImage returns true if img is a list of images\nfunc isMultiImage(ctx context.Context, img types.UnparsedImage) (bool, error) {\n\t_, mt, err := img.Manifest(ctx)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn manifest.MIMETypeIsMultiImage(mt), nil\n}\n\n// determineListConversion takes the current MIME type of a list of manifests,\n// the list of MIME types supported for a given destination, and a possible\n// forced value, and returns the MIME type to which we should convert the list\n// of manifests (regardless of whether we are converting to it or using it\n// unmodified) and a slice of other list types which might be supported by the\n// destination.\nfunc (c *copier) determineListConversion(currentListMIMEType string, destSupportedMIMETypes []string, forcedListMIMEType string) (string, []string, error) {\n\t// If there's no list of supported types, then anything we support is expected to be supported.\n\tif len(destSupportedMIMETypes) == 0 {\n\t\tdestSupportedMIMETypes = manifest.SupportedListMIMETypes\n\t}\n\t// If we're forcing it, replace the list of supported types with the forced value.\n\tif forcedListMIMEType != \"\" {\n\t\tdestSupportedMIMETypes = []string{forcedListMIMEType}\n\t}\n\n\tprioritizedTypes := newOrderedSet()\n\t// The first priority is the current type, if it's in the list, since that lets us avoid a\n\t// conversion that isn't strictly necessary.\n\tif slices.Contains(destSupportedMIMETypes, currentListMIMEType) {\n\t\tprioritizedTypes.append(currentListMIMEType)\n\t}\n\t// Pick out the other list types that we support.\n\tfor _, t := range destSupportedMIMETypes {\n\t\tif manifest.MIMETypeIsMultiImage(t) {\n\t\t\tprioritizedTypes.append(t)\n\t\t}\n\t}\n\n\tlogrus.Debugf(\"Manifest list has MIME type %q, ordered candidate list [%s]\", currentListMIMEType, strings.Join(destSupportedMIMETypes, \", \"))\n\tif len(prioritizedTypes.list) == 0 {\n\t\treturn \"\", nil, fmt.Errorf(\"destination does not support any supported manifest list types (%v)\", manifest.SupportedListMIMETypes)\n\t}\n\tselectedType := prioritizedTypes.list[0]\n\totherSupportedTypes := prioritizedTypes.list[1:]\n\tif selectedType != currentListMIMEType {\n\t\tlogrus.Debugf(\"... will convert to %s first, and then try %v\", selectedType, otherSupportedTypes)\n\t} else {\n\t\tlogrus.Debugf(\"... will use the original manifest list type, and then try %v\", otherSupportedTypes)\n\t}\n\t// Done.\n\treturn selectedType, otherSupportedTypes, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/multiple.go",
    "content": "package copy\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"maps\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\tinternalManifest \"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n)\n\ntype instanceCopyKind int\n\nconst (\n\tinstanceCopyCopy instanceCopyKind = iota\n\tinstanceCopyClone\n)\n\ntype instanceCopy struct {\n\top           instanceCopyKind\n\tsourceDigest digest.Digest\n\n\t// Fields which can be used by callers when operation\n\t// is `instanceCopyCopy`\n\tcopyForceCompressionFormat bool\n\n\t// Fields which can be used by callers when operation\n\t// is `instanceCopyClone`\n\tcloneArtifactType       string\n\tcloneCompressionVariant OptionCompressionVariant\n\tclonePlatform           *imgspecv1.Platform\n\tcloneAnnotations        map[string]string\n}\n\n// internal type only to make imgspecv1.Platform comparable\ntype platformComparable struct {\n\tarchitecture string\n\tos           string\n\tosVersion    string\n\tosFeatures   string\n\tvariant      string\n}\n\n// Converts imgspecv1.Platform to a comparable format.\nfunc platformV1ToPlatformComparable(platform *imgspecv1.Platform) platformComparable {\n\tif platform == nil {\n\t\treturn platformComparable{}\n\t}\n\tosFeatures := slices.Clone(platform.OSFeatures)\n\tsort.Strings(osFeatures)\n\treturn platformComparable{\n\t\tarchitecture: platform.Architecture,\n\t\tos:           platform.OS,\n\t\t// This is strictly speaking ambiguous, fields of OSFeatures can contain a ','. Probably good enough for now.\n\t\tosFeatures: strings.Join(osFeatures, \",\"),\n\t\tosVersion:  platform.OSVersion,\n\t\tvariant:    platform.Variant,\n\t}\n}\n\n// platformCompressionMap prepares a mapping of platformComparable -> CompressionAlgorithmNames for given digests\nfunc platformCompressionMap(list internalManifest.List, instanceDigests []digest.Digest) (map[platformComparable]*set.Set[string], error) {\n\tres := make(map[platformComparable]*set.Set[string])\n\tfor _, instanceDigest := range instanceDigests {\n\t\tinstanceDetails, err := list.Instance(instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getting details for instance %s: %w\", instanceDigest, err)\n\t\t}\n\t\tplatform := platformV1ToPlatformComparable(instanceDetails.ReadOnly.Platform)\n\t\tplatformSet, ok := res[platform]\n\t\tif !ok {\n\t\t\tplatformSet = set.New[string]()\n\t\t\tres[platform] = platformSet\n\t\t}\n\t\tplatformSet.AddSeq(slices.Values(instanceDetails.ReadOnly.CompressionAlgorithmNames))\n\t}\n\treturn res, nil\n}\n\nfunc validateCompressionVariantExists(input []OptionCompressionVariant) error {\n\tfor _, option := range input {\n\t\t_, err := compression.AlgorithmByName(option.Algorithm.Name())\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid algorithm %q in option.EnsureCompressionVariantsExist: %w\", option.Algorithm.Name(), err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// prepareInstanceCopies prepares a list of instances which needs to copied to the manifest list.\nfunc prepareInstanceCopies(list internalManifest.List, instanceDigests []digest.Digest, options *Options) ([]instanceCopy, error) {\n\tres := []instanceCopy{}\n\tif options.ImageListSelection == CopySpecificImages && len(options.EnsureCompressionVariantsExist) > 0 {\n\t\t// List can already contain compressed instance for a compression selected in `EnsureCompressionVariantsExist`\n\t\t// It's unclear what it means when `CopySpecificImages` includes an instance in options.Instances,\n\t\t// EnsureCompressionVariantsExist asks for an instance with some compression,\n\t\t// an instance with that compression already exists, but is not included in options.Instances.\n\t\t// We might define the semantics and implement this in the future.\n\t\treturn res, fmt.Errorf(\"EnsureCompressionVariantsExist is not implemented for CopySpecificImages\")\n\t}\n\terr := validateCompressionVariantExists(options.EnsureCompressionVariantsExist)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tcompressionsByPlatform, err := platformCompressionMap(list, instanceDigests)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Determine which specific images to copy (combining digest-based and platform-based selection)\n\tvar specificImages *set.Set[digest.Digest]\n\tif options.ImageListSelection == CopySpecificImages {\n\t\tspecificImages, err = determineSpecificImages(options, list)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tfor i, instanceDigest := range instanceDigests {\n\t\tif options.ImageListSelection == CopySpecificImages &&\n\t\t\t!specificImages.Contains(instanceDigest) {\n\t\t\tlogrus.Debugf(\"Skipping instance %s (%d/%d)\", instanceDigest, i+1, len(instanceDigests))\n\t\t\tcontinue\n\t\t}\n\t\tinstanceDetails, err := list.Instance(instanceDigest)\n\t\tif err != nil {\n\t\t\treturn res, fmt.Errorf(\"getting details for instance %s: %w\", instanceDigest, err)\n\t\t}\n\t\tforceCompressionFormat, err := shouldRequireCompressionFormatMatch(options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres = append(res, instanceCopy{\n\t\t\top:                         instanceCopyCopy,\n\t\t\tsourceDigest:               instanceDigest,\n\t\t\tcopyForceCompressionFormat: forceCompressionFormat,\n\t\t})\n\t\tplatform := platformV1ToPlatformComparable(instanceDetails.ReadOnly.Platform)\n\t\tcompressionList := compressionsByPlatform[platform]\n\t\tfor _, compressionVariant := range options.EnsureCompressionVariantsExist {\n\t\t\tif !compressionList.Contains(compressionVariant.Algorithm.Name()) {\n\t\t\t\tres = append(res, instanceCopy{\n\t\t\t\t\top:                      instanceCopyClone,\n\t\t\t\t\tsourceDigest:            instanceDigest,\n\t\t\t\t\tcloneArtifactType:       instanceDetails.ReadOnly.ArtifactType,\n\t\t\t\t\tcloneCompressionVariant: compressionVariant,\n\t\t\t\t\tclonePlatform:           instanceDetails.ReadOnly.Platform,\n\t\t\t\t\tcloneAnnotations:        maps.Clone(instanceDetails.ReadOnly.Annotations),\n\t\t\t\t})\n\t\t\t\t// add current compression to the list so that we don’t create duplicate clones\n\t\t\t\tcompressionList.Add(compressionVariant.Algorithm.Name())\n\t\t\t}\n\t\t}\n\t}\n\treturn res, nil\n}\n\n// determineSpecificImages returns a set of images to copy based on the\n// Instances and InstancePlatforms fields of the passed-in options structure\nfunc determineSpecificImages(options *Options, updatedList internalManifest.List) (*set.Set[digest.Digest], error) {\n\tspecificImages := set.NewWithValues(options.Instances...)\n\n\tif len(options.InstancePlatforms) > 0 {\n\t\t// Find ALL instances matching each platform specification (OS and Architecture)\n\t\tfor _, filter := range options.InstancePlatforms {\n\t\t\tmatched := false\n\t\t\tinstanceDigests := updatedList.Instances()\n\t\t\tfor _, instanceDigest := range instanceDigests {\n\t\t\t\tinstanceDetails, err := updatedList.Instance(instanceDigest)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"getting details for instance %s: %w\", instanceDigest, err)\n\t\t\t\t}\n\n\t\t\t\t// Match the platform. We match nil platforms against empty filter values.\n\t\t\t\tinstanceOS := \"\"\n\t\t\t\tinstanceArch := \"\"\n\t\t\t\tif instanceDetails.ReadOnly.Platform != nil {\n\t\t\t\t\tinstanceOS = instanceDetails.ReadOnly.Platform.OS\n\t\t\t\t\tinstanceArch = instanceDetails.ReadOnly.Platform.Architecture\n\t\t\t\t}\n\n\t\t\t\tif instanceOS == filter.OS && instanceArch == filter.Architecture {\n\t\t\t\t\tspecificImages.Add(instanceDigest)\n\t\t\t\t\tmatched = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif !matched {\n\t\t\t\treturn nil, fmt.Errorf(\"no instances found for platform %s/%s\", filter.OS, filter.Architecture)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn specificImages, nil\n}\n\n// copyMultipleImages copies some or all of an image list's instances, using\n// c.policyContext to validate source image admissibility.\nfunc (c *copier) copyMultipleImages(ctx context.Context) (copiedManifest []byte, retErr error) {\n\t// Parse the list and get a copy of the original value after it's re-encoded.\n\tmanifestList, manifestType, err := c.unparsedToplevel.Manifest(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading manifest list: %w\", err)\n\t}\n\toriginalList, err := internalManifest.ListFromBlob(manifestList, manifestType)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing manifest list %q: %w\", string(manifestList), err)\n\t}\n\tupdatedList := originalList.CloneInternal()\n\n\tsigs, err := c.sourceSignatures(ctx, c.unparsedToplevel,\n\t\t\"Getting image list signatures\",\n\t\t\"Checking if image list destination supports signatures\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// If the destination is a digested reference, make a note of that, determine what digest value we're\n\t// expecting, and check that the source manifest matches it.\n\tdestIsDigestedReference := false\n\tif named := c.dest.Reference().DockerReference(); named != nil {\n\t\tif digested, ok := named.(reference.Digested); ok {\n\t\t\tdestIsDigestedReference = true\n\t\t\tmatches, err := manifest.MatchesDigest(manifestList, digested.Digest())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"computing digest of source image's manifest: %w\", err)\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\treturn nil, errors.New(\"Digest of source image's manifest would not match destination reference\")\n\t\t\t}\n\t\t}\n\t}\n\n\t// Determine if we're allowed to modify the manifest list.\n\t// If we can, set to the empty string. If we can't, set to the reason why.\n\t// Compare, and perhaps keep in sync with, the version in copySingleImage.\n\tcannotModifyManifestListReason := \"\"\n\tif len(sigs) > 0 {\n\t\tcannotModifyManifestListReason = \"Would invalidate signatures\"\n\t}\n\tif destIsDigestedReference {\n\t\tcannotModifyManifestListReason = \"Destination specifies a digest\"\n\t}\n\tif c.options.PreserveDigests {\n\t\tcannotModifyManifestListReason = \"Instructed to preserve digests\"\n\t}\n\n\t// Determine if we'll need to convert the manifest list to a different format.\n\tforceListMIMEType := c.options.ForceManifestMIMEType\n\tswitch forceListMIMEType {\n\tcase manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema2MediaType:\n\t\tforceListMIMEType = manifest.DockerV2ListMediaType\n\tcase imgspecv1.MediaTypeImageManifest:\n\t\tforceListMIMEType = imgspecv1.MediaTypeImageIndex\n\t}\n\t// FIXME: This does not take into account cannotModifyManifestListReason.\n\tselectedListType, otherManifestMIMETypeCandidates, err := c.determineListConversion(manifestType, c.dest.SupportedManifestMIMETypes(), forceListMIMEType)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"determining manifest list type to write to destination: %w\", err)\n\t}\n\tif selectedListType != originalList.MIMEType() {\n\t\tif cannotModifyManifestListReason != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"Manifest list must be converted to type %q to be written to destination, but we cannot modify it: %q\", selectedListType, cannotModifyManifestListReason)\n\t\t}\n\t}\n\n\t// Copy each image, or just the ones we want to copy, in turn.\n\tinstanceDigests := updatedList.Instances()\n\tinstanceEdits := []internalManifest.ListEdit{}\n\tinstanceCopyList, err := prepareInstanceCopies(updatedList, instanceDigests, c.options)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"preparing instances for copy: %w\", err)\n\t}\n\tc.Printf(\"Copying %d images generated from %d images in list\\n\", len(instanceCopyList), len(instanceDigests))\n\tfor i, instance := range instanceCopyList {\n\t\t// Update instances to be edited by their `ListOperation` and\n\t\t// populate necessary fields.\n\t\tswitch instance.op {\n\t\tcase instanceCopyCopy:\n\t\t\tlogrus.Debugf(\"Copying instance %s (%d/%d)\", instance.sourceDigest, i+1, len(instanceCopyList))\n\t\t\tc.Printf(\"Copying image %s (%d/%d)\\n\", instance.sourceDigest, i+1, len(instanceCopyList))\n\t\t\tunparsedInstance := image.UnparsedInstance(c.rawSource, &instanceCopyList[i].sourceDigest)\n\t\t\tupdated, err := c.copySingleImage(ctx, unparsedInstance, &instanceCopyList[i].sourceDigest, copySingleImageOptions{requireCompressionFormatMatch: instance.copyForceCompressionFormat})\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"copying image %d/%d from manifest list: %w\", i+1, len(instanceCopyList), err)\n\t\t\t}\n\t\t\t// Record the result of a possible conversion here.\n\t\t\tinstanceEdits = append(instanceEdits, internalManifest.ListEdit{\n\t\t\t\tListOperation:               internalManifest.ListOpUpdate,\n\t\t\t\tUpdateOldDigest:             instance.sourceDigest,\n\t\t\t\tUpdateDigest:                updated.manifestDigest,\n\t\t\t\tUpdateSize:                  int64(len(updated.manifest)),\n\t\t\t\tUpdateCompressionAlgorithms: updated.compressionAlgorithms,\n\t\t\t\tUpdateMediaType:             updated.manifestMIMEType,\n\t\t\t})\n\t\tcase instanceCopyClone:\n\t\t\tlogrus.Debugf(\"Replicating instance %s (%d/%d)\", instance.sourceDigest, i+1, len(instanceCopyList))\n\t\t\tc.Printf(\"Replicating image %s (%d/%d)\\n\", instance.sourceDigest, i+1, len(instanceCopyList))\n\t\t\tunparsedInstance := image.UnparsedInstance(c.rawSource, &instanceCopyList[i].sourceDigest)\n\t\t\tupdated, err := c.copySingleImage(ctx, unparsedInstance, &instanceCopyList[i].sourceDigest, copySingleImageOptions{\n\t\t\t\trequireCompressionFormatMatch: true,\n\t\t\t\tcompressionFormat:             &instance.cloneCompressionVariant.Algorithm,\n\t\t\t\tcompressionLevel:              instance.cloneCompressionVariant.Level,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"replicating image %d/%d from manifest list: %w\", i+1, len(instanceCopyList), err)\n\t\t\t}\n\t\t\t// Record the result of a possible conversion here.\n\t\t\tinstanceEdits = append(instanceEdits, internalManifest.ListEdit{\n\t\t\t\tListOperation:            internalManifest.ListOpAdd,\n\t\t\t\tAddDigest:                updated.manifestDigest,\n\t\t\t\tAddSize:                  int64(len(updated.manifest)),\n\t\t\t\tAddMediaType:             updated.manifestMIMEType,\n\t\t\t\tAddArtifactType:          instance.cloneArtifactType,\n\t\t\t\tAddPlatform:              instance.clonePlatform,\n\t\t\t\tAddAnnotations:           instance.cloneAnnotations,\n\t\t\t\tAddCompressionAlgorithms: updated.compressionAlgorithms,\n\t\t\t})\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"copying image: invalid copy operation %d\", instance.op)\n\t\t}\n\t}\n\n\t// Now reset the digest/size/types of the manifests in the list to account for any conversions that we made.\n\tif err = updatedList.EditInstances(instanceEdits, cannotModifyManifestListReason != \"\"); err != nil {\n\t\treturn nil, fmt.Errorf(\"updating manifest list: %w\", err)\n\t}\n\n\t// Iterate through supported list types, preferred format first.\n\tc.Printf(\"Writing manifest list to image destination\\n\")\n\tvar errs []string\n\tfor _, thisListType := range append([]string{selectedListType}, otherManifestMIMETypeCandidates...) {\n\t\tvar attemptedList internalManifest.ListPublic = updatedList\n\n\t\tlogrus.Debugf(\"Trying to use manifest list type %s…\", thisListType)\n\n\t\t// Perform the list conversion, if we need one.\n\t\tif thisListType != updatedList.MIMEType() {\n\t\t\tattemptedList, err = updatedList.ConvertToMIMEType(thisListType)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"converting manifest list to list with MIME type %q: %w\", thisListType, err)\n\t\t\t}\n\t\t}\n\n\t\t// Check if the updates or a type conversion meaningfully changed the list of images\n\t\t// by serializing them both so that we can compare them.\n\t\tattemptedManifestList, err := attemptedList.Serialize()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"encoding updated manifest list (%q: %#v): %w\", updatedList.MIMEType(), updatedList.Instances(), err)\n\t\t}\n\t\toriginalManifestList, err := originalList.Serialize()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"encoding original manifest list for comparison (%q: %#v): %w\", originalList.MIMEType(), originalList.Instances(), err)\n\t\t}\n\n\t\t// If we can't just use the original value, but we have to change it, flag an error.\n\t\tif !bytes.Equal(attemptedManifestList, originalManifestList) {\n\t\t\tif cannotModifyManifestListReason != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"Manifest list was edited, but we cannot modify it: %q\", cannotModifyManifestListReason)\n\t\t\t}\n\t\t\tlogrus.Debugf(\"Manifest list has been updated\")\n\t\t} else {\n\t\t\t// We can just use the original value, so use it instead of the one we just rebuilt, so that we don't change the digest.\n\t\t\tattemptedManifestList = manifestList\n\t\t}\n\n\t\t// Save the manifest list.\n\t\terr = c.dest.PutManifest(ctx, attemptedManifestList, nil)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Upload of manifest list type %s failed: %v\", thisListType, err)\n\t\t\terrs = append(errs, fmt.Sprintf(\"%s(%v)\", thisListType, err))\n\t\t\tcontinue\n\t\t}\n\t\terrs = nil\n\t\tmanifestList = attemptedManifestList\n\t\tbreak\n\t}\n\tif errs != nil {\n\t\treturn nil, fmt.Errorf(\"Uploading manifest list failed, attempted the following formats: %s\", strings.Join(errs, \", \"))\n\t}\n\n\t// Sign the manifest list.\n\tnewSigs, err := c.createSignatures(ctx, manifestList, c.options.SignIdentity)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsigs = append(slices.Clone(sigs), newSigs...)\n\n\tc.Printf(\"Storing list signatures\\n\")\n\tif err := c.dest.PutSignaturesWithFormat(ctx, sigs, nil); err != nil {\n\t\treturn nil, fmt.Errorf(\"writing signatures: %w\", err)\n\t}\n\n\treturn manifestList, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/progress_bars.go",
    "content": "package copy\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"time\"\n\n\t\"github.com/vbauerster/mpb/v8\"\n\t\"github.com/vbauerster/mpb/v8/decor\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// newProgressPool creates a *mpb.Progress.\n// The caller must eventually call pool.Wait() after the pool will no longer be updated.\n// NOTE: Every progress bar created within the progress pool must either successfully\n// complete or be aborted, or pool.Wait() will hang. That is typically done\n// using \"defer bar.Abort(false)\", which must be called BEFORE pool.Wait() is called.\nfunc (c *copier) newProgressPool() *mpb.Progress {\n\treturn mpb.New(mpb.WithWidth(40), mpb.WithOutput(c.progressOutput))\n}\n\n// customPartialBlobDecorFunc implements mpb.DecorFunc for the partial blobs retrieval progress bar\nfunc customPartialBlobDecorFunc(s decor.Statistics) string {\n\tcurrent := decor.SizeB1024(s.Current)\n\ttotal := decor.SizeB1024(s.Total)\n\trefill := decor.SizeB1024(s.Refill)\n\tif s.Total == 0 {\n\t\treturn fmt.Sprintf(\"%.1f / %.1f (skipped: %.1f)\", current, total, refill)\n\t}\n\t// If we didn't do a partial fetch then let's not output a distracting (\"skipped: 0.0b = 0.00%\")\n\tif s.Refill == 0 {\n\t\treturn fmt.Sprintf(\"%.1f / %.1f\", current, total)\n\t}\n\tpercentage := 100.0 * float64(s.Refill) / float64(s.Total)\n\treturn fmt.Sprintf(\"%.1f / %.1f (skipped: %.1f = %.2f%%)\", current, total, refill, percentage)\n}\n\n// progressBar wraps a *mpb.Bar, allowing us to add extra state and methods.\ntype progressBar struct {\n\t*mpb.Bar\n\toriginalSize int64 // or -1 if unknown\n}\n\n// createProgressBar creates a progressBar in pool.  Note that if the copier's reportWriter\n// is io.Discard, the progress bar's output will be discarded.  Callers may call printCopyInfo()\n// to print a single line instead.\n//\n// NOTE: Every progress bar created within a progress pool must either successfully\n// complete or be aborted, or pool.Wait() will hang. That is typically done\n// using \"defer bar.Abort(false)\", which must happen BEFORE pool.Wait() is called.\n//\n// As a convention, most users of progress bars should call mark100PercentComplete on full success;\n// by convention, we don't leave progress bars in partial state when fully done\n// (even if we copied much less data than anticipated).\nfunc (c *copier) createProgressBar(pool *mpb.Progress, partial bool, info types.BlobInfo, kind string, onComplete string) (*progressBar, error) {\n\t// shortDigestLen is the length of the digest used for blobs.\n\tconst shortDigestLen = 12\n\n\tif err := info.Digest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, so validate explicitly.\n\t\treturn nil, err\n\t}\n\tprefix := fmt.Sprintf(\"Copying %s %s\", kind, info.Digest.Encoded())\n\t// Truncate the prefix (chopping of some part of the digest) to make all progress bars aligned in a column.\n\tmaxPrefixLen := len(\"Copying blob \") + shortDigestLen\n\tif len(prefix) > maxPrefixLen {\n\t\tprefix = prefix[:maxPrefixLen]\n\t}\n\n\t// onComplete will replace prefix once the bar/spinner has completed\n\tonComplete = prefix + \" \" + onComplete\n\n\t// Use a normal progress bar when we know the size (i.e., size > 0).\n\t// Otherwise, use a spinner to indicate that something's happening.\n\tvar bar *mpb.Bar\n\tif info.Size > 0 {\n\t\tif partial {\n\t\t\tbar = pool.AddBar(info.Size,\n\t\t\t\tmpb.BarFillerClearOnComplete(),\n\t\t\t\tmpb.PrependDecorators(\n\t\t\t\t\tdecor.OnComplete(decor.Name(prefix), onComplete),\n\t\t\t\t),\n\t\t\t\tmpb.AppendDecorators(\n\t\t\t\t\tdecor.Any(customPartialBlobDecorFunc),\n\t\t\t\t),\n\t\t\t)\n\t\t} else {\n\t\t\tbar = pool.AddBar(info.Size,\n\t\t\t\tmpb.BarFillerClearOnComplete(),\n\t\t\t\tmpb.PrependDecorators(\n\t\t\t\t\tdecor.OnComplete(decor.Name(prefix), onComplete),\n\t\t\t\t),\n\t\t\t\tmpb.AppendDecorators(\n\t\t\t\t\tdecor.OnComplete(decor.CountersKibiByte(\"%.1f / %.1f\"), \"\"),\n\t\t\t\t\tdecor.Name(\" | \"),\n\t\t\t\t\tdecor.OnComplete(decor.EwmaSpeed(decor.SizeB1024(0), \"% .1f\", 30), \"\"),\n\t\t\t\t),\n\t\t\t)\n\t\t}\n\t} else {\n\t\tbar = pool.New(0,\n\t\t\tmpb.SpinnerStyle(\".\", \"..\", \"...\", \"....\", \"\").PositionLeft(),\n\t\t\tmpb.BarFillerClearOnComplete(),\n\t\t\tmpb.PrependDecorators(\n\t\t\t\tdecor.OnComplete(decor.Name(prefix), onComplete),\n\t\t\t),\n\t\t\tmpb.AppendDecorators(\n\t\t\t\tdecor.OnComplete(decor.EwmaSpeed(decor.SizeB1024(0), \"% .1f\", 30), \"\"),\n\t\t\t),\n\t\t)\n\t}\n\treturn &progressBar{\n\t\tBar:          bar,\n\t\toriginalSize: info.Size,\n\t}, nil\n}\n\n// printCopyInfo prints a \"Copying ...\" message on the copier if the output is\n// set to `io.Discard`.  In that case, the progress bars won't be rendered but\n// we still want to indicate when blobs and configs are copied.\nfunc (c *copier) printCopyInfo(kind string, info types.BlobInfo) {\n\tif c.progressOutput == io.Discard {\n\t\tc.Printf(\"Copying %s %s\\n\", kind, info.Digest)\n\t}\n}\n\n// mark100PercentComplete marks the progress bars as 100% complete;\n// it may do so by possibly advancing the current state if it is below the known total.\nfunc (bar *progressBar) mark100PercentComplete() {\n\tif bar.originalSize > 0 {\n\t\t// We can't call bar.SetTotal even if we wanted to; the total can not be changed\n\t\t// after a progress bar is created with a definite total.\n\t\tbar.SetCurrent(bar.originalSize) // This triggers the completion condition.\n\t} else {\n\t\t// -1 = unknown size\n\t\t// 0 is somewhat of a special case: Unlike c/image, where 0 is a definite known\n\t\t// size (possible at least in theory), in mpb, zero-sized progress bars are treated\n\t\t// as unknown size, in particular they are not configured to be marked as\n\t\t// complete on bar.Current() reaching bar.total (because that would happen already\n\t\t// when creating the progress bar).\n\t\t// That means that we are both _allowed_ to call SetTotal, and we _have to_.\n\t\tbar.SetTotal(-1, true) // total < 0 = set it to bar.Current(), report it; and mark the bar as complete.\n\t}\n}\n\n// blobChunkAccessorProxy wraps a BlobChunkAccessor and updates a *progressBar\n// with the number of received bytes.\ntype blobChunkAccessorProxy struct {\n\twrapped private.BlobChunkAccessor // The underlying BlobChunkAccessor\n\tbar     *progressBar              // A progress bar updated with the number of bytes read so far\n}\n\n// GetBlobAt returns a sequential channel of readers that contain data for the requested\n// blob chunks, and a channel that might get a single error value.\n// The specified chunks must be not overlapping and sorted by their offset.\n// The readers must be fully consumed, in the order they are returned, before blocking\n// to read the next chunk.\n// If the Length for the last chunk is set to math.MaxUint64, then it\n// fully fetches the remaining data from the offset to the end of the blob.\nfunc (s *blobChunkAccessorProxy) GetBlobAt(ctx context.Context, info types.BlobInfo, chunks []private.ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\tstart := time.Now()\n\trc, errs, err := s.wrapped.GetBlobAt(ctx, info, chunks)\n\tif err == nil {\n\t\ttotal := int64(0)\n\t\tfor _, c := range chunks {\n\t\t\t// do not update the progress bar if there is a chunk with unknown length.\n\t\t\tif c.Length == math.MaxUint64 {\n\t\t\t\treturn rc, errs, err\n\t\t\t}\n\t\t\ttotal += int64(c.Length)\n\t\t}\n\t\ts.bar.EwmaIncrInt64(total, time.Since(start))\n\t}\n\treturn rc, errs, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/progress_channel.go",
    "content": "package copy\n\nimport (\n\t\"io\"\n\t\"time\"\n\n\t\"go.podman.io/image/v5/types\"\n)\n\n// progressReader is a reader that reports its progress to a types.ProgressProperties channel on an interval.\ntype progressReader struct {\n\tsource       io.Reader\n\tchannel      chan<- types.ProgressProperties\n\tinterval     time.Duration\n\tartifact     types.BlobInfo\n\tlastUpdate   time.Time\n\toffset       uint64\n\toffsetUpdate uint64\n}\n\n// newProgressReader creates a new progress reader for:\n// `source`:   The source when internally reading bytes\n// `channel`:  The reporter channel to which the progress will be sent\n// `interval`: The update interval to indicate how often the progress should update\n// `artifact`: The blob metadata which is currently being progressed\nfunc newProgressReader(\n\tsource io.Reader,\n\tchannel chan<- types.ProgressProperties,\n\tinterval time.Duration,\n\tartifact types.BlobInfo,\n) *progressReader {\n\t// The progress reader constructor informs the progress channel\n\t// that a new artifact will be read\n\tchannel <- types.ProgressProperties{\n\t\tEvent:    types.ProgressEventNewArtifact,\n\t\tArtifact: artifact,\n\t}\n\treturn &progressReader{\n\t\tsource:       source,\n\t\tchannel:      channel,\n\t\tinterval:     interval,\n\t\tartifact:     artifact,\n\t\tlastUpdate:   time.Now(),\n\t\toffset:       0,\n\t\toffsetUpdate: 0,\n\t}\n}\n\n// reportDone indicates to the internal channel that the progress has been\n// finished\nfunc (r *progressReader) reportDone() {\n\tr.channel <- types.ProgressProperties{\n\t\tEvent:        types.ProgressEventDone,\n\t\tArtifact:     r.artifact,\n\t\tOffset:       r.offset,\n\t\tOffsetUpdate: r.offsetUpdate,\n\t}\n}\n\n// Read continuously reads bytes into the progress reader and reports the\n// status via the internal channel\nfunc (r *progressReader) Read(p []byte) (int, error) {\n\tn, err := r.source.Read(p)\n\tr.offset += uint64(n)\n\tr.offsetUpdate += uint64(n)\n\n\t// Fire the progress reader in the provided interval\n\tif time.Since(r.lastUpdate) > r.interval {\n\t\tr.channel <- types.ProgressProperties{\n\t\t\tEvent:        types.ProgressEventRead,\n\t\t\tArtifact:     r.artifact,\n\t\t\tOffset:       r.offset,\n\t\t\tOffsetUpdate: r.offsetUpdate,\n\t\t}\n\t\tr.lastUpdate = time.Now()\n\t\tr.offsetUpdate = 0\n\t}\n\treturn n, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/sign.go",
    "content": "package copy\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/private\"\n\tinternalsig \"go.podman.io/image/v5/internal/signature\"\n\tinternalSigner \"go.podman.io/image/v5/internal/signer\"\n\t\"go.podman.io/image/v5/signature/sigstore\"\n\t\"go.podman.io/image/v5/signature/simplesigning\"\n\t\"go.podman.io/image/v5/transports\"\n)\n\n// setupSigners initializes c.signers.\nfunc (c *copier) setupSigners() error {\n\tc.signers = append(c.signers, c.options.Signers...)\n\t// c.signersToClose is intentionally not updated with c.options.Signers.\n\n\t// We immediately append created signers to c.signers, and we rely on c.close() to clean them up; so we don’t need\n\t// to clean up any created signers on failure.\n\n\tif c.options.SignBy != \"\" {\n\t\topts := []simplesigning.Option{\n\t\t\tsimplesigning.WithKeyFingerprint(c.options.SignBy),\n\t\t}\n\t\tif c.options.SignPassphrase != \"\" {\n\t\t\topts = append(opts, simplesigning.WithPassphrase(c.options.SignPassphrase))\n\t\t}\n\t\tsigner, err := simplesigning.NewSigner(opts...)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.signers = append(c.signers, signer)\n\t\tc.signersToClose = append(c.signersToClose, signer)\n\t}\n\n\tif c.options.SignBySigstorePrivateKeyFile != \"\" {\n\t\tsigner, err := sigstore.NewSigner(\n\t\t\tsigstore.WithPrivateKeyFile(c.options.SignBySigstorePrivateKeyFile, c.options.SignSigstorePrivateKeyPassphrase),\n\t\t)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.signers = append(c.signers, signer)\n\t\tc.signersToClose = append(c.signersToClose, signer)\n\t}\n\n\treturn nil\n}\n\n// sourceSignatures returns signatures from unparsedSource,\n// and verifies that they can be used (to avoid copying a large image when we\n// can tell in advance that it would ultimately fail)\nfunc (c *copier) sourceSignatures(ctx context.Context, unparsed private.UnparsedImage,\n\tgettingSignaturesMessage, checkingDestMessage string,\n) ([]internalsig.Signature, error) {\n\tvar sigs []internalsig.Signature\n\tif c.options.RemoveSignatures {\n\t\tsigs = []internalsig.Signature{}\n\t} else {\n\t\tc.Printf(\"%s\\n\", gettingSignaturesMessage)\n\t\ts, err := unparsed.UntrustedSignatures(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"reading signatures: %w\", err)\n\t\t}\n\t\tsigs = s\n\t}\n\tif len(sigs) != 0 {\n\t\tc.Printf(\"%s\\n\", checkingDestMessage)\n\t\tif err := c.dest.SupportsSignatures(ctx); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Can not copy signatures to %s: %w\", transports.ImageName(c.dest.Reference()), err)\n\t\t}\n\t}\n\treturn sigs, nil\n}\n\n// createSignatures creates signatures for manifest and an optional identity.\nfunc (c *copier) createSignatures(ctx context.Context, manifest []byte, identity reference.Named) ([]internalsig.Signature, error) {\n\tif len(c.signers) == 0 {\n\t\t// We must exit early here, otherwise copies with no Docker reference wouldn’t be possible.\n\t\treturn nil, nil\n\t}\n\n\tif identity != nil {\n\t\tif reference.IsNameOnly(identity) {\n\t\t\treturn nil, fmt.Errorf(\"Sign identity must be a fully specified reference %s\", identity.String())\n\t\t}\n\t} else {\n\t\tidentity = c.dest.Reference().DockerReference()\n\t\tif identity == nil {\n\t\t\treturn nil, fmt.Errorf(\"Cannot determine canonical Docker reference for destination %s\", transports.ImageName(c.dest.Reference()))\n\t\t}\n\t}\n\n\tres := make([]internalsig.Signature, 0, len(c.signers))\n\tfor signerIndex, signer := range c.signers {\n\t\tmsg := internalSigner.ProgressMessage(signer)\n\t\tif len(c.signers) == 1 {\n\t\t\tc.Printf(\"Creating signature: %s\\n\", msg)\n\t\t} else {\n\t\t\tc.Printf(\"Creating signature %d: %s\\n\", signerIndex+1, msg)\n\t\t}\n\t\tnewSig, err := internalSigner.SignImageManifest(ctx, signer, manifest, identity)\n\t\tif err != nil {\n\t\t\tif len(c.signers) == 1 {\n\t\t\t\treturn nil, fmt.Errorf(\"creating signature: %w\", err)\n\t\t\t} else {\n\t\t\t\treturn nil, fmt.Errorf(\"creating signature %d: %w\", signerIndex+1, err)\n\t\t\t}\n\t\t}\n\t\tres = append(res, newSig)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/copy/single.go",
    "content": "package copy\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"iter\"\n\t\"maps\"\n\t\"reflect\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbauerster/mpb/v8\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/pkg/platform\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\tchunkedToc \"go.podman.io/storage/pkg/chunked/toc\"\n)\n\n// imageCopier tracks state specific to a single image (possibly an item of a manifest list)\ntype imageCopier struct {\n\tc                             *copier\n\tmanifestUpdates               *types.ManifestUpdateOptions\n\tsrc                           *image.SourcedImage\n\tmanifestConversionPlan        manifestConversionPlan\n\tdiffIDsAreNeeded              bool\n\tcannotModifyManifestReason    string // The reason the manifest cannot be modified, or an empty string if it can\n\tcanSubstituteBlobs            bool\n\tcompressionFormat             *compressiontypes.Algorithm // Compression algorithm to use, if the user explicitly requested one, or nil.\n\tcompressionLevel              *int\n\trequireCompressionFormatMatch bool\n}\n\ntype copySingleImageOptions struct {\n\trequireCompressionFormatMatch bool\n\tcompressionFormat             *compressiontypes.Algorithm // Compression algorithm to use, if the user explicitly requested one, or nil.\n\tcompressionLevel              *int\n}\n\n// copySingleImageResult carries data produced by copySingleImage\ntype copySingleImageResult struct {\n\tmanifest              []byte\n\tmanifestMIMEType      string\n\tmanifestDigest        digest.Digest\n\tcompressionAlgorithms []compressiontypes.Algorithm\n}\n\n// copySingleImage copies a single (non-manifest-list) image unparsedImage, using c.policyContext to validate\n// source image admissibility.\nfunc (c *copier) copySingleImage(ctx context.Context, unparsedImage *image.UnparsedImage, targetInstance *digest.Digest, opts copySingleImageOptions) (copySingleImageResult, error) {\n\t// The caller is handling manifest lists; this could happen only if a manifest list contains a manifest list.\n\t// Make sure we fail cleanly in such cases.\n\tmultiImage, err := isMultiImage(ctx, unparsedImage)\n\tif err != nil {\n\t\t// FIXME FIXME: How to name a reference for the sub-image?\n\t\treturn copySingleImageResult{}, fmt.Errorf(\"determining manifest MIME type for %s: %w\", transports.ImageName(unparsedImage.Reference()), err)\n\t}\n\tif multiImage {\n\t\treturn copySingleImageResult{}, fmt.Errorf(\"Unexpectedly received a manifest list instead of a manifest for a single image\")\n\t}\n\n\t// Please keep this policy check BEFORE reading any other information about the image.\n\t// (The multiImage check above only matches the MIME type, which we have received anyway.\n\t// Actual parsing of anything should be deferred.)\n\tif allowed, err := c.policyContext.IsRunningImageAllowed(ctx, unparsedImage); !allowed || err != nil { // Be paranoid and fail if either return value indicates so.\n\t\treturn copySingleImageResult{}, fmt.Errorf(\"Source image rejected: %w\", err)\n\t}\n\tsrc, err := image.FromUnparsedImage(ctx, c.options.SourceCtx, unparsedImage)\n\tif err != nil {\n\t\treturn copySingleImageResult{}, fmt.Errorf(\"initializing image from source %s: %w\", transports.ImageName(c.rawSource.Reference()), err)\n\t}\n\n\t// If the destination is a digested reference, make a note of that, determine what digest value we're\n\t// expecting, and check that the source manifest matches it.  If the source manifest doesn't, but it's\n\t// one item from a manifest list that matches it, accept that as a match.\n\tdestIsDigestedReference := false\n\tif named := c.dest.Reference().DockerReference(); named != nil {\n\t\tif digested, ok := named.(reference.Digested); ok {\n\t\t\tdestIsDigestedReference = true\n\t\t\tmatches, err := manifest.MatchesDigest(src.ManifestBlob, digested.Digest())\n\t\t\tif err != nil {\n\t\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"computing digest of source image's manifest: %w\", err)\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\tmanifestList, _, err := c.unparsedToplevel.Manifest(ctx)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"reading manifest from source image: %w\", err)\n\t\t\t\t}\n\t\t\t\tmatches, err = manifest.MatchesDigest(manifestList, digested.Digest())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"computing digest of source image's manifest: %w\", err)\n\t\t\t\t}\n\t\t\t\tif !matches {\n\t\t\t\t\treturn copySingleImageResult{}, errors.New(\"Digest of source image's manifest would not match destination reference\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif err := prepareImageConfigForDest(ctx, c.options.DestinationCtx, src, c.dest); err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\n\tsigs, err := c.sourceSignatures(ctx, src,\n\t\t\"Getting image source signatures\",\n\t\t\"Checking if image destination supports signatures\")\n\tif err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\n\t// Determine if we're allowed to modify the manifest.\n\t// If we can, set to the empty string. If we can't, set to the reason why.\n\t// Compare, and perhaps keep in sync with, the version in copyMultipleImages.\n\tcannotModifyManifestReason := \"\"\n\tif len(sigs) > 0 {\n\t\tcannotModifyManifestReason = \"Would invalidate signatures\"\n\t}\n\tif destIsDigestedReference {\n\t\tcannotModifyManifestReason = \"Destination specifies a digest\"\n\t}\n\tif c.options.PreserveDigests {\n\t\tcannotModifyManifestReason = \"Instructed to preserve digests\"\n\t}\n\n\tic := imageCopier{\n\t\tc:               c,\n\t\tmanifestUpdates: &types.ManifestUpdateOptions{InformationOnly: types.ManifestUpdateInformation{Destination: c.dest}},\n\t\tsrc:             src,\n\t\t// manifestConversionPlan and diffIDsAreNeeded are computed later\n\t\tcannotModifyManifestReason:    cannotModifyManifestReason,\n\t\trequireCompressionFormatMatch: opts.requireCompressionFormatMatch,\n\t}\n\tif opts.compressionFormat != nil {\n\t\tic.compressionFormat = opts.compressionFormat\n\t\tic.compressionLevel = opts.compressionLevel\n\t} else if c.options.DestinationCtx != nil {\n\t\t// Note that compressionFormat and compressionLevel can be nil.\n\t\tic.compressionFormat = c.options.DestinationCtx.CompressionFormat\n\t\tic.compressionLevel = c.options.DestinationCtx.CompressionLevel\n\t}\n\t// HACK: Don’t combine zstd:chunked and encryption.\n\t// zstd:chunked can only usefully be consumed using range requests of parts of the layer, which would require the encryption\n\t// to support decrypting arbitrary subsets of the stream. That’s plausible but not supported using the encryption API we have.\n\t// Also, the chunked metadata is exposed in annotations unencrypted, which reveals the TOC digest = layer identity without\n\t// encryption. (That can be determined from the unencrypted config anyway, but, still...)\n\t//\n\t// Ideally this should query a well-defined property of the compression algorithm (and $somehow determine the right fallback) instead of\n\t// hard-coding zstd:chunked / zstd.\n\tif ic.c.options.OciEncryptLayers != nil {\n\t\tformat := ic.compressionFormat\n\t\tif format == nil {\n\t\t\tformat = defaultCompressionFormat\n\t\t}\n\t\tif format.Name() == compressiontypes.ZstdChunkedAlgorithmName {\n\t\t\tif ic.requireCompressionFormatMatch {\n\t\t\t\treturn copySingleImageResult{}, errors.New(\"explicitly requested to combine zstd:chunked with encryption, which is not beneficial; use plain zstd instead\")\n\t\t\t}\n\t\t\tlogrus.Warnf(\"Compression using zstd:chunked is not beneficial for encrypted layers, using plain zstd instead\")\n\t\t\tic.compressionFormat = &compression.Zstd\n\t\t}\n\t}\n\n\t// Decide whether we can substitute blobs with semantic equivalents:\n\t// - Don’t do that if we can’t modify the manifest at all\n\t// - Ensure _this_ copy sees exactly the intended data when either processing a signed image or signing it.\n\t//   This may be too conservative, but for now, better safe than sorry, _especially_ on the len(c.signers) != 0 path:\n\t//   The signature makes the content non-repudiable, so it very much matters that the signature is made over exactly what the user intended.\n\t//   We do intend the RecordDigestUncompressedPair calls to only work with reliable data, but at least there’s a risk\n\t//   that the compressed version coming from a third party may be designed to attack some other decompressor implementation,\n\t//   and we would reuse and sign it.\n\tic.canSubstituteBlobs = ic.cannotModifyManifestReason == \"\" && len(c.signers) == 0\n\n\tif err := ic.updateEmbeddedDockerReference(); err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\n\tdestRequiresOciEncryption := (isEncrypted(src) && ic.c.options.OciDecryptConfig == nil) || c.options.OciEncryptLayers != nil\n\n\tic.manifestConversionPlan, err = determineManifestConversion(determineManifestConversionInputs{\n\t\tsrcMIMEType:                    ic.src.ManifestMIMEType,\n\t\tdestSupportedManifestMIMETypes: ic.c.dest.SupportedManifestMIMETypes(),\n\t\tforceManifestMIMEType:          c.options.ForceManifestMIMEType,\n\t\trequestedCompressionFormat:     ic.compressionFormat,\n\t\trequiresOCIEncryption:          destRequiresOciEncryption,\n\t\tcannotModifyManifestReason:     ic.cannotModifyManifestReason,\n\t})\n\tif err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\t// We set up this part of ic.manifestUpdates quite early, not just around the\n\t// code that calls copyUpdatedConfigAndManifest, so that other parts of the copy code\n\t// (e.g. the UpdatedImageNeedsLayerDiffIDs check just below) can make decisions based\n\t// on the expected destination format.\n\tif ic.manifestConversionPlan.preferredMIMETypeNeedsConversion {\n\t\tic.manifestUpdates.ManifestMIMEType = ic.manifestConversionPlan.preferredMIMEType\n\t}\n\n\t// If src.UpdatedImageNeedsLayerDiffIDs(ic.manifestUpdates) will be true, it needs to be true by the time we get here.\n\tic.diffIDsAreNeeded = src.UpdatedImageNeedsLayerDiffIDs(*ic.manifestUpdates)\n\n\t// If enabled, fetch and compare the destination's manifest. And as an optimization skip updating the destination iff equal\n\tif c.options.OptimizeDestinationImageAlreadyExists {\n\t\tshouldUpdateSigs := len(sigs) > 0 || len(c.signers) != 0 // TODO: Consider allowing signatures updates only and skipping the image's layers/manifest copy if possible\n\t\tnoPendingManifestUpdates := ic.noPendingManifestUpdates()\n\n\t\tlogrus.Debugf(\"Checking if we can skip copying: has signatures=%t, OCI encryption=%t, no manifest updates=%t, compression match required for reusing blobs=%t\", shouldUpdateSigs, destRequiresOciEncryption, noPendingManifestUpdates, opts.requireCompressionFormatMatch)\n\t\tif !shouldUpdateSigs && !destRequiresOciEncryption && noPendingManifestUpdates && !ic.requireCompressionFormatMatch {\n\t\t\tmatchedResult, err := ic.compareImageDestinationManifestEqual(ctx, targetInstance)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Warnf(\"Failed to compare destination image manifest: %v\", err)\n\t\t\t\treturn copySingleImageResult{}, err\n\t\t\t}\n\n\t\t\tif matchedResult != nil {\n\t\t\t\tc.Printf(\"Skipping: image already present at destination\\n\")\n\t\t\t\treturn *matchedResult, nil\n\t\t\t}\n\t\t}\n\t}\n\n\tcompressionAlgos, err := ic.copyLayers(ctx)\n\tif err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\n\t// With docker/distribution registries we do not know whether the registry accepts schema2 or schema1 only;\n\t// and at least with the OpenShift registry \"acceptschema2\" option, there is no way to detect the support\n\t// without actually trying to upload something and getting a types.ManifestTypeRejectedError.\n\t// So, try the preferred manifest MIME type with possibly-updated blob digests, media types, and sizes if\n\t// we're altering how they're compressed.  If the process succeeds, fine…\n\tmanifestBytes, manifestDigest, err := ic.copyUpdatedConfigAndManifest(ctx, targetInstance)\n\twipResult := copySingleImageResult{\n\t\tmanifest:         manifestBytes,\n\t\tmanifestMIMEType: ic.manifestConversionPlan.preferredMIMEType,\n\t\tmanifestDigest:   manifestDigest,\n\t}\n\tif err != nil {\n\t\tlogrus.Debugf(\"Writing manifest using preferred type %s failed: %v\", ic.manifestConversionPlan.preferredMIMEType, err)\n\t\t// … if it fails, and the failure is either because the manifest is rejected by the registry, or\n\t\t// because we failed to create a manifest of the specified type because the specific manifest type\n\t\t// doesn't support the type of compression we're trying to use (e.g. docker v2s2 and zstd), we may\n\t\t// have other options available that could still succeed.\n\t\tvar manifestTypeRejectedError types.ManifestTypeRejectedError\n\t\tvar manifestLayerCompressionIncompatibilityError manifest.ManifestLayerCompressionIncompatibilityError\n\t\tisManifestRejected := errors.As(err, &manifestTypeRejectedError)\n\t\tisCompressionIncompatible := errors.As(err, &manifestLayerCompressionIncompatibilityError)\n\t\tif (!isManifestRejected && !isCompressionIncompatible) || len(ic.manifestConversionPlan.otherMIMETypeCandidates) == 0 {\n\t\t\t// We don’t have other options.\n\t\t\t// In principle the code below would handle this as well, but the resulting  error message is fairly ugly.\n\t\t\t// Don’t bother the user with MIME types if we have no choice.\n\t\t\treturn copySingleImageResult{}, err\n\t\t}\n\t\t// If the original MIME type is acceptable, determineManifestConversion always uses it as ic.manifestConversionPlan.preferredMIMEType.\n\t\t// So if we are here, we will definitely be trying to convert the manifest.\n\t\t// With ic.cannotModifyManifestReason != \"\", that would just be a string of repeated failures for the same reason,\n\t\t// so let’s bail out early and with a better error message.\n\t\tif ic.cannotModifyManifestReason != \"\" {\n\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"writing manifest failed and we cannot try conversions: %q: %w\", cannotModifyManifestReason, err)\n\t\t}\n\n\t\t// errs is a list of errors when trying various manifest types. Also serves as an \"upload succeeded\" flag when set to nil.\n\t\terrs := []string{fmt.Sprintf(\"%s(%v)\", ic.manifestConversionPlan.preferredMIMEType, err)}\n\t\tfor _, manifestMIMEType := range ic.manifestConversionPlan.otherMIMETypeCandidates {\n\t\t\tlogrus.Debugf(\"Trying to use manifest type %s…\", manifestMIMEType)\n\t\t\tic.manifestUpdates.ManifestMIMEType = manifestMIMEType\n\t\t\tattemptedManifest, attemptedManifestDigest, err := ic.copyUpdatedConfigAndManifest(ctx, targetInstance)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Debugf(\"Upload of manifest type %s failed: %v\", manifestMIMEType, err)\n\t\t\t\terrs = append(errs, fmt.Sprintf(\"%s(%v)\", manifestMIMEType, err))\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// We have successfully uploaded a manifest.\n\t\t\twipResult = copySingleImageResult{\n\t\t\t\tmanifest:         attemptedManifest,\n\t\t\t\tmanifestMIMEType: manifestMIMEType,\n\t\t\t\tmanifestDigest:   attemptedManifestDigest,\n\t\t\t}\n\t\t\terrs = nil // Mark this as a success so that we don't abort below.\n\t\t\tbreak\n\t\t}\n\t\tif errs != nil {\n\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"Uploading manifest failed, attempted the following formats: %s\", strings.Join(errs, \", \"))\n\t\t}\n\t}\n\tif targetInstance != nil {\n\t\ttargetInstance = &wipResult.manifestDigest\n\t}\n\n\tnewSigs, err := c.createSignatures(ctx, wipResult.manifest, c.options.SignIdentity)\n\tif err != nil {\n\t\treturn copySingleImageResult{}, err\n\t}\n\tsigs = append(slices.Clone(sigs), newSigs...)\n\n\tif len(sigs) > 0 {\n\t\tc.Printf(\"Storing signatures\\n\")\n\t\tif err := c.dest.PutSignaturesWithFormat(ctx, sigs, targetInstance); err != nil {\n\t\t\treturn copySingleImageResult{}, fmt.Errorf(\"writing signatures: %w\", err)\n\t\t}\n\t}\n\twipResult.compressionAlgorithms = compressionAlgos\n\tres := wipResult // We are done\n\treturn res, nil\n}\n\n// prepareImageConfigForDest enforces dest.MustMatchRuntimeOS and handles dest.NoteOriginalOCIConfig, if necessary.\nfunc prepareImageConfigForDest(ctx context.Context, sys *types.SystemContext, src types.Image, dest private.ImageDestination) error {\n\tociConfig, configErr := src.OCIConfig(ctx)\n\t// Do not fail on configErr here, this might be an artifact\n\t// and maybe nothing needs this to be a container image and to process the config.\n\n\tif dest.MustMatchRuntimeOS() {\n\t\tif configErr != nil {\n\t\t\treturn fmt.Errorf(\"parsing image configuration: %w\", configErr)\n\t\t}\n\t\twantedPlatforms := platform.WantedPlatforms(sys)\n\n\t\tif !slices.ContainsFunc(wantedPlatforms, func(wantedPlatform imgspecv1.Platform) bool {\n\t\t\t// For a transitional period, this might trigger warnings because the Variant\n\t\t\t// field was added to OCI config only recently. If this turns out to be too noisy,\n\t\t\t// revert this check to only look for (OS, Architecture).\n\t\t\treturn platform.MatchesPlatform(ociConfig.Platform, wantedPlatform)\n\t\t}) {\n\t\t\toptions := newOrderedSet()\n\t\t\tfor _, p := range wantedPlatforms {\n\t\t\t\toptions.append(fmt.Sprintf(\"%s+%s+%q\", p.OS, p.Architecture, p.Variant))\n\t\t\t}\n\t\t\tlogrus.Infof(\"Image operating system mismatch: image uses OS %q+architecture %q+%q, expecting one of %q\",\n\t\t\t\tociConfig.OS, ociConfig.Architecture, ociConfig.Variant, strings.Join(options.list, \", \"))\n\t\t}\n\t}\n\n\tif err := dest.NoteOriginalOCIConfig(ociConfig, configErr); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// updateEmbeddedDockerReference handles the Docker reference embedded in Docker schema1 manifests.\nfunc (ic *imageCopier) updateEmbeddedDockerReference() error {\n\tif ic.c.dest.IgnoresEmbeddedDockerReference() {\n\t\treturn nil // Destination would prefer us not to update the embedded reference.\n\t}\n\tdestRef := ic.c.dest.Reference().DockerReference()\n\tif destRef == nil {\n\t\treturn nil // Destination does not care about Docker references\n\t}\n\tif !ic.src.EmbeddedDockerReferenceConflicts(destRef) {\n\t\treturn nil // No reference embedded in the manifest, or it matches destRef already.\n\t}\n\n\tif ic.cannotModifyManifestReason != \"\" {\n\t\treturn fmt.Errorf(\"Copying a schema1 image with an embedded Docker reference to %s (Docker reference %s) would change the manifest, which we cannot do: %q\",\n\t\t\ttransports.ImageName(ic.c.dest.Reference()), destRef.String(), ic.cannotModifyManifestReason)\n\t}\n\tic.manifestUpdates.EmbeddedDockerReference = destRef\n\treturn nil\n}\n\nfunc (ic *imageCopier) noPendingManifestUpdates() bool {\n\treturn reflect.DeepEqual(*ic.manifestUpdates, types.ManifestUpdateOptions{InformationOnly: ic.manifestUpdates.InformationOnly})\n}\n\n// compareImageDestinationManifestEqual compares the source and destination image manifests (reading the manifest from the\n// (possibly remote) destination). If they are equal, it returns a full copySingleImageResult, nil otherwise.\nfunc (ic *imageCopier) compareImageDestinationManifestEqual(ctx context.Context, targetInstance *digest.Digest) (*copySingleImageResult, error) {\n\tdestImageSource, err := ic.c.dest.Reference().NewImageSource(ctx, ic.c.options.DestinationCtx)\n\tif err != nil {\n\t\tlogrus.Debugf(\"Unable to create destination image %s source: %v\", transports.ImageName(ic.c.dest.Reference()), err)\n\t\treturn nil, nil\n\t}\n\tdefer destImageSource.Close()\n\n\tdestManifest, destManifestType, err := destImageSource.GetManifest(ctx, targetInstance)\n\tif err != nil {\n\t\tlogrus.Debugf(\"Unable to get destination image %s/%s manifest: %v\", transports.ImageName(destImageSource.Reference()), targetInstance, err)\n\t\treturn nil, nil\n\t}\n\n\tif !bytes.Equal(ic.src.ManifestBlob, destManifest) {\n\t\tlogrus.Debugf(\"Source and destination manifests differ\")\n\t\treturn nil, nil\n\t}\n\tlogrus.Debugf(\"Destination already matches the source manifest\")\n\n\tsrcManifestDigest, err := manifest.Digest(ic.src.ManifestBlob)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"calculating manifest digest: %w\", err)\n\t}\n\n\tcompressionAlgos := set.New[string]()\n\tfor _, srcInfo := range ic.src.LayerInfos() {\n\t\t_, c, err := compressionEditsFromBlobInfo(srcInfo)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif c != nil {\n\t\t\tcompressionAlgos.Add(c.Name())\n\t\t}\n\t}\n\n\talgos, err := algorithmsByNames(compressionAlgos.All())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Destination and source manifests, types and digests should all be equivalent\n\treturn &copySingleImageResult{\n\t\tmanifest:              destManifest,\n\t\tmanifestMIMEType:      destManifestType,\n\t\tmanifestDigest:        srcManifestDigest,\n\t\tcompressionAlgorithms: algos,\n\t}, nil\n}\n\n// copyLayers copies layers from ic.src/ic.c.rawSource to dest, using and updating ic.manifestUpdates if necessary and ic.cannotModifyManifestReason == \"\".\nfunc (ic *imageCopier) copyLayers(ctx context.Context) ([]compressiontypes.Algorithm, error) {\n\tsrcInfos := ic.src.LayerInfos()\n\tupdatedSrcInfos, err := ic.src.LayerInfosForCopy(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsrcInfosUpdated := false\n\tif updatedSrcInfos != nil && !reflect.DeepEqual(srcInfos, updatedSrcInfos) {\n\t\tif ic.cannotModifyManifestReason != \"\" {\n\t\t\treturn nil, fmt.Errorf(\"Copying this image would require changing layer representation, which we cannot do: %q\", ic.cannotModifyManifestReason)\n\t\t}\n\t\tsrcInfos = updatedSrcInfos\n\t\tsrcInfosUpdated = true\n\t}\n\n\ttype copyLayerData struct {\n\t\tdestInfo types.BlobInfo\n\t\tdiffID   digest.Digest\n\t\terr      error\n\t}\n\n\t// The manifest is used to extract the information whether a given\n\t// layer is empty.\n\tman, err := manifest.FromBlob(ic.src.ManifestBlob, ic.src.ManifestMIMEType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmanifestLayerInfos := man.LayerInfos()\n\n\tdata := make([]copyLayerData, len(srcInfos))\n\tcopyLayerHelper := func(index int, srcLayer types.BlobInfo, toEncrypt bool, pool *mpb.Progress, srcRef reference.Named) {\n\t\tdefer ic.c.concurrentBlobCopiesSemaphore.Release(1)\n\t\tcld := copyLayerData{}\n\t\tif !ic.c.options.DownloadForeignLayers && ic.c.dest.AcceptsForeignLayerURLs() && len(srcLayer.URLs) != 0 {\n\t\t\t// DiffIDs are, currently, needed only when converting from schema1.\n\t\t\t// In which case src.LayerInfos will not have URLs because schema1\n\t\t\t// does not support them.\n\t\t\tif ic.diffIDsAreNeeded {\n\t\t\t\tcld.err = errors.New(\"getting DiffID for foreign layers is unimplemented\")\n\t\t\t} else {\n\t\t\t\tcld.destInfo = srcLayer\n\t\t\t\tlogrus.Debugf(\"Skipping foreign layer %q copy to %s\", cld.destInfo.Digest, ic.c.dest.Reference().Transport().Name())\n\t\t\t}\n\t\t} else {\n\t\t\tcld.destInfo, cld.diffID, cld.err = ic.copyLayer(ctx, srcLayer, toEncrypt, pool, index, srcRef, manifestLayerInfos[index].EmptyLayer)\n\t\t}\n\t\tdata[index] = cld\n\t}\n\n\t// Decide which layers to encrypt\n\tlayersToEncrypt := set.New[int]()\n\tif ic.c.options.OciEncryptLayers != nil {\n\t\ttotalLayers := len(srcInfos)\n\t\tfor _, l := range *ic.c.options.OciEncryptLayers {\n\t\t\tswitch {\n\t\t\tcase l >= 0 && l < totalLayers:\n\t\t\t\tlayersToEncrypt.Add(l)\n\t\t\tcase l < 0 && l+totalLayers >= 0: // Implies (l + totalLayers) < totalLayers\n\t\t\t\tlayersToEncrypt.Add(l + totalLayers) // If l is negative, it is reverse indexed.\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"when choosing layers to encrypt, layer index %d out of range (%d layers exist)\", l, totalLayers)\n\t\t\t}\n\t\t}\n\n\t\tif len(*ic.c.options.OciEncryptLayers) == 0 { // “encrypt all layers”\n\t\t\tfor i := 0; i < len(srcInfos); i++ {\n\t\t\t\tlayersToEncrypt.Add(i)\n\t\t\t}\n\t\t}\n\t}\n\n\tif err := func() error { // A scope for defer\n\t\tprogressPool := ic.c.newProgressPool()\n\t\tdefer progressPool.Wait()\n\n\t\t// Ensure we wait for all layers to be copied. progressPool.Wait() must not be called while any of the copyLayerHelpers interact with the progressPool.\n\t\tcopyGroup := sync.WaitGroup{}\n\t\tdefer copyGroup.Wait()\n\n\t\tfor i, srcLayer := range srcInfos {\n\t\t\tif err := ic.c.concurrentBlobCopiesSemaphore.Acquire(ctx, 1); err != nil {\n\t\t\t\t// This can only fail with ctx.Err(), so no need to blame acquiring the semaphore.\n\t\t\t\treturn fmt.Errorf(\"copying layer: %w\", err)\n\t\t\t}\n\t\t\tcopyGroup.Go(func() {\n\t\t\t\tcopyLayerHelper(i, srcLayer, layersToEncrypt.Contains(i), progressPool, ic.c.rawSource.Reference().DockerReference())\n\t\t\t})\n\t\t}\n\n\t\t// A call to copyGroup.Wait() is done at this point by the defer above.\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tcompressionAlgos := set.New[string]()\n\tdestInfos := make([]types.BlobInfo, len(srcInfos))\n\tdiffIDs := make([]digest.Digest, len(srcInfos))\n\tfor i, cld := range data {\n\t\tif cld.err != nil {\n\t\t\treturn nil, cld.err\n\t\t}\n\t\tif cld.destInfo.CompressionAlgorithm != nil {\n\t\t\tcompressionAlgos.Add(cld.destInfo.CompressionAlgorithm.Name())\n\t\t}\n\t\tdestInfos[i] = cld.destInfo\n\t\tdiffIDs[i] = cld.diffID\n\t}\n\n\t// WARNING: If you are adding new reasons to change ic.manifestUpdates, also update the\n\t// OptimizeDestinationImageAlreadyExists short-circuit conditions\n\tic.manifestUpdates.InformationOnly.LayerInfos = destInfos\n\tif ic.diffIDsAreNeeded {\n\t\tic.manifestUpdates.InformationOnly.LayerDiffIDs = diffIDs\n\t}\n\tif srcInfosUpdated || layerDigestsDiffer(srcInfos, destInfos) {\n\t\tic.manifestUpdates.LayerInfos = destInfos\n\t}\n\talgos, err := algorithmsByNames(compressionAlgos.All())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn algos, nil\n}\n\n// layerDigestsDiffer returns true iff the digests in a and b differ (ignoring sizes and possible other fields)\nfunc layerDigestsDiffer(a, b []types.BlobInfo) bool {\n\treturn !slices.EqualFunc(a, b, func(a, b types.BlobInfo) bool {\n\t\treturn a.Digest == b.Digest\n\t})\n}\n\n// copyUpdatedConfigAndManifest updates the image per ic.manifestUpdates, if necessary,\n// stores the resulting config and manifest to the destination, and returns the stored manifest\n// and its digest.\nfunc (ic *imageCopier) copyUpdatedConfigAndManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, digest.Digest, error) {\n\tvar pendingImage types.Image = ic.src\n\tif !ic.noPendingManifestUpdates() {\n\t\tif ic.cannotModifyManifestReason != \"\" {\n\t\t\treturn nil, \"\", fmt.Errorf(\"Internal error: copy needs an updated manifest but that was known to be forbidden: %q\", ic.cannotModifyManifestReason)\n\t\t}\n\t\tif !ic.diffIDsAreNeeded && ic.src.UpdatedImageNeedsLayerDiffIDs(*ic.manifestUpdates) {\n\t\t\t// We have set ic.diffIDsAreNeeded based on the preferred MIME type returned by determineManifestConversion.\n\t\t\t// So, this can only happen if we are trying to upload using one of the other MIME type candidates.\n\t\t\t// Because UpdatedImageNeedsLayerDiffIDs is true only when converting from s1 to s2, this case should only arise\n\t\t\t// when ic.c.dest.SupportedManifestMIMETypes() includes both s1 and s2, the upload using s1 failed, and we are now trying s2.\n\t\t\t// Supposedly s2-only registries do not exist or are extremely rare, so failing with this error message is good enough for now.\n\t\t\t// If handling such registries turns out to be necessary, we could compute ic.diffIDsAreNeeded based on the full list of manifest MIME type candidates.\n\t\t\treturn nil, \"\", fmt.Errorf(\"Can not convert image to %s, preparing DiffIDs for this case is not supported\", ic.manifestUpdates.ManifestMIMEType)\n\t\t}\n\t\tpi, err := ic.src.UpdatedImage(ctx, *ic.manifestUpdates)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", fmt.Errorf(\"creating an updated image manifest: %w\", err)\n\t\t}\n\t\tpendingImage = pi\n\t}\n\tman, _, err := pendingImage.Manifest(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"reading manifest: %w\", err)\n\t}\n\n\tif err := ic.copyConfig(ctx, pendingImage); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tic.c.Printf(\"Writing manifest to image destination\\n\")\n\tmanifestDigest, err := manifest.Digest(man)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif instanceDigest != nil {\n\t\tinstanceDigest = &manifestDigest\n\t}\n\tif err := ic.c.dest.PutManifest(ctx, man, instanceDigest); err != nil {\n\t\tlogrus.Debugf(\"Error %v while writing manifest %q\", err, string(man))\n\t\treturn nil, \"\", fmt.Errorf(\"writing manifest: %w\", err)\n\t}\n\treturn man, manifestDigest, nil\n}\n\n// copyConfig copies config.json, if any, from src to dest.\nfunc (ic *imageCopier) copyConfig(ctx context.Context, src types.Image) error {\n\tsrcInfo := src.ConfigInfo()\n\tif srcInfo.Digest != \"\" {\n\t\tif err := ic.c.concurrentBlobCopiesSemaphore.Acquire(ctx, 1); err != nil {\n\t\t\t// This can only fail with ctx.Err(), so no need to blame acquiring the semaphore.\n\t\t\treturn fmt.Errorf(\"copying config: %w\", err)\n\t\t}\n\t\tdefer ic.c.concurrentBlobCopiesSemaphore.Release(1)\n\n\t\tdestInfo, err := func() (types.BlobInfo, error) { // A scope for defer\n\t\t\tprogressPool := ic.c.newProgressPool()\n\t\t\tdefer progressPool.Wait()\n\t\t\tbar, err := ic.c.createProgressBar(progressPool, false, srcInfo, \"config\", \"done\")\n\t\t\tif err != nil {\n\t\t\t\treturn types.BlobInfo{}, err\n\t\t\t}\n\t\t\tdefer bar.Abort(false)\n\t\t\tic.c.printCopyInfo(\"config\", srcInfo)\n\n\t\t\tconfigBlob, err := src.ConfigBlob(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn types.BlobInfo{}, fmt.Errorf(\"reading config blob %s: %w\", srcInfo.Digest, err)\n\t\t\t}\n\n\t\t\tdestInfo, err := ic.copyBlobFromStream(ctx, bytes.NewReader(configBlob), srcInfo, nil, true, false, bar, -1, false)\n\t\t\tif err != nil {\n\t\t\t\treturn types.BlobInfo{}, err\n\t\t\t}\n\n\t\t\tbar.mark100PercentComplete()\n\t\t\treturn destInfo, nil\n\t\t}()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif destInfo.Digest != srcInfo.Digest {\n\t\t\treturn fmt.Errorf(\"Internal error: copying uncompressed config blob %s changed digest to %s\", srcInfo.Digest, destInfo.Digest)\n\t\t}\n\t}\n\treturn nil\n}\n\n// diffIDResult contains both a digest value and an error from diffIDComputationGoroutine.\n// We could also send the error through the pipeReader, but this more cleanly separates the copying of the layer and the DiffID computation.\ntype diffIDResult struct {\n\tdigest digest.Digest\n\terr    error\n}\n\n// compressionEditsFromBlobInfo returns a (CompressionOperation, CompressionAlgorithm) value pair suitable\n// for types.BlobInfo.\nfunc compressionEditsFromBlobInfo(srcInfo types.BlobInfo) (types.LayerCompression, *compressiontypes.Algorithm, error) {\n\t// This MIME type → compression mapping belongs in manifest-specific code in our manifest\n\t// package (but we should preferably replace/change UpdatedImage instead of productizing\n\t// this workaround).\n\tswitch srcInfo.MediaType {\n\tcase manifest.DockerV2Schema2LayerMediaType, imgspecv1.MediaTypeImageLayerGzip:\n\t\treturn types.PreserveOriginal, &compression.Gzip, nil\n\tcase imgspecv1.MediaTypeImageLayerZstd:\n\t\ttocDigest, err := chunkedToc.GetTOCDigest(srcInfo.Annotations)\n\t\tif err != nil {\n\t\t\treturn types.PreserveOriginal, nil, err\n\t\t}\n\t\tif tocDigest != nil {\n\t\t\treturn types.PreserveOriginal, &compression.ZstdChunked, nil\n\t\t}\n\t\treturn types.PreserveOriginal, &compression.Zstd, nil\n\tcase manifest.DockerV2SchemaLayerMediaTypeUncompressed, imgspecv1.MediaTypeImageLayer:\n\t\treturn types.Decompress, nil, nil\n\tdefault:\n\t\treturn types.PreserveOriginal, nil, nil\n\t}\n}\n\n// copyLayer copies a layer with srcInfo (with known Digest and Annotations and possibly known Size) in src to dest, perhaps (de/re/)compressing it,\n// and returns a complete blobInfo of the copied layer, and a value for LayerDiffIDs if diffIDIsNeeded\n// srcRef can be used as an additional hint to the destination during checking whether a layer can be reused but srcRef can be nil.\nfunc (ic *imageCopier) copyLayer(ctx context.Context, srcInfo types.BlobInfo, toEncrypt bool, pool *mpb.Progress, layerIndex int, srcRef reference.Named, emptyLayer bool) (types.BlobInfo, digest.Digest, error) {\n\t// If the srcInfo doesn't contain compression information, try to compute it from the\n\t// MediaType, which was either read from a manifest by way of LayerInfos() or constructed\n\t// by LayerInfosForCopy(), if it was supplied at all.  If we succeed in copying the blob,\n\t// the BlobInfo we return will be passed to UpdatedImage() and then to UpdateLayerInfos(),\n\t// which uses the compression information to compute the updated MediaType values.\n\t// (Sadly UpdatedImage() is documented to not update MediaTypes from\n\t//  ManifestUpdateOptions.LayerInfos[].MediaType, so we are doing it indirectly.)\n\tif srcInfo.CompressionOperation == types.PreserveOriginal && srcInfo.CompressionAlgorithm == nil {\n\t\top, algo, err := compressionEditsFromBlobInfo(srcInfo)\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", err\n\t\t}\n\t\tsrcInfo.CompressionOperation = op\n\t\tsrcInfo.CompressionAlgorithm = algo\n\t}\n\n\tic.c.printCopyInfo(\"blob\", srcInfo)\n\n\tdiffIDIsNeeded := false\n\tvar cachedDiffID digest.Digest = \"\"\n\tif ic.diffIDsAreNeeded {\n\t\tcachedDiffID = ic.c.blobInfoCache.UncompressedDigest(srcInfo.Digest) // May be \"\"\n\t\tdiffIDIsNeeded = cachedDiffID == \"\"\n\t}\n\t// When encrypting to decrypting, only use the simple code path. We might be able to optimize more\n\t// (e.g. if we know the DiffID of an encrypted compressed layer, it might not be necessary to pull, decrypt and decompress again),\n\t// but it’s not trivially safe to do such things, so until someone takes the effort to make a comprehensive argument, let’s not.\n\tencryptingOrDecrypting := toEncrypt || (isOciEncrypted(srcInfo.MediaType) && ic.c.options.OciDecryptConfig != nil)\n\tcanAvoidProcessingCompleteLayer := !diffIDIsNeeded && !encryptingOrDecrypting\n\n\t// Don’t read the layer from the source if we already have the blob, and optimizations are acceptable.\n\tif canAvoidProcessingCompleteLayer {\n\t\tcanChangeLayerCompression := ic.src.CanChangeLayerCompression(srcInfo.MediaType)\n\t\tlogrus.Debugf(\"Checking if we can reuse blob %s: general substitution = %v, compression for MIME type %q = %v\",\n\t\t\tsrcInfo.Digest, ic.canSubstituteBlobs, srcInfo.MediaType, canChangeLayerCompression)\n\t\tcanSubstitute := ic.canSubstituteBlobs && canChangeLayerCompression\n\n\t\tvar requiredCompression *compressiontypes.Algorithm\n\t\tif ic.requireCompressionFormatMatch {\n\t\t\trequiredCompression = ic.compressionFormat\n\t\t}\n\n\t\tvar tocDigest digest.Digest\n\n\t\t// Check if we have a chunked layer in storage that's based on that blob.  These layers are stored by their TOC digest.\n\t\td, err := chunkedToc.GetTOCDigest(srcInfo.Annotations)\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", err\n\t\t}\n\t\tif d != nil {\n\t\t\ttocDigest = *d\n\t\t}\n\n\t\treused, reusedBlob, err := ic.c.dest.TryReusingBlobWithOptions(ctx, srcInfo, private.TryReusingBlobOptions{\n\t\t\tCache:                   ic.c.blobInfoCache,\n\t\t\tCanSubstitute:           canSubstitute,\n\t\t\tEmptyLayer:              emptyLayer,\n\t\t\tLayerIndex:              &layerIndex,\n\t\t\tSrcRef:                  srcRef,\n\t\t\tPossibleManifestFormats: append([]string{ic.manifestConversionPlan.preferredMIMEType}, ic.manifestConversionPlan.otherMIMETypeCandidates...),\n\t\t\tRequiredCompression:     requiredCompression,\n\t\t\tOriginalCompression:     srcInfo.CompressionAlgorithm,\n\t\t\tTOCDigest:               tocDigest,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", fmt.Errorf(\"trying to reuse blob %s at destination: %w\", srcInfo.Digest, err)\n\t\t}\n\t\tif reused {\n\t\t\tlogrus.Debugf(\"Skipping blob %s (already present):\", srcInfo.Digest)\n\t\t\tif err := func() error { // A scope for defer\n\t\t\t\tlabel := \"skipped: already exists\"\n\t\t\t\tif reusedBlob.MatchedByTOCDigest {\n\t\t\t\t\tlabel = \"skipped: already exists (found by TOC)\"\n\t\t\t\t}\n\t\t\t\tbar, err := ic.c.createProgressBar(pool, false, types.BlobInfo{Digest: reusedBlob.Digest, Size: 0}, \"blob\", label)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tdefer bar.Abort(false)\n\t\t\t\tbar.mark100PercentComplete()\n\t\t\t\treturn nil\n\t\t\t}(); err != nil {\n\t\t\t\treturn types.BlobInfo{}, \"\", err\n\t\t\t}\n\n\t\t\t// Throw an event that the layer has been skipped\n\t\t\tif ic.c.options.Progress != nil && ic.c.options.ProgressInterval > 0 {\n\t\t\t\tic.c.options.Progress <- types.ProgressProperties{\n\t\t\t\t\tEvent:    types.ProgressEventSkipped,\n\t\t\t\t\tArtifact: srcInfo,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn updatedBlobInfoFromReuse(srcInfo, reusedBlob), cachedDiffID, nil\n\t\t}\n\t}\n\n\t// A partial pull is managed by the destination storage, that decides what portions\n\t// of the source file are not known yet and must be fetched.\n\t// Attempt a partial only when the source allows to retrieve a blob partially and\n\t// the destination has support for it.\n\tif canAvoidProcessingCompleteLayer && ic.c.rawSource.SupportsGetBlobAt() && ic.c.dest.SupportsPutBlobPartial() {\n\t\treused, blobInfo, err := func() (bool, types.BlobInfo, error) { // A scope for defer\n\t\t\tbar, err := ic.c.createProgressBar(pool, true, srcInfo, \"blob\", \"done\")\n\t\t\tif err != nil {\n\t\t\t\treturn false, types.BlobInfo{}, err\n\t\t\t}\n\t\t\thideProgressBar := true\n\t\t\tdefer func() { // Note that this is not the same as defer bar.Abort(hideProgressBar); we need hideProgressBar to be evaluated lazily.\n\t\t\t\tbar.Abort(hideProgressBar)\n\t\t\t}()\n\n\t\t\tproxy := blobChunkAccessorProxy{\n\t\t\t\twrapped: ic.c.rawSource,\n\t\t\t\tbar:     bar,\n\t\t\t}\n\t\t\tuploadedBlob, err := ic.c.dest.PutBlobPartial(ctx, &proxy, srcInfo, private.PutBlobPartialOptions{\n\t\t\t\tCache:      ic.c.blobInfoCache,\n\t\t\t\tEmptyLayer: emptyLayer,\n\t\t\t\tLayerIndex: layerIndex,\n\t\t\t})\n\t\t\tif err == nil {\n\t\t\t\tif srcInfo.Size != -1 {\n\t\t\t\t\trefill := srcInfo.Size - bar.Current()\n\t\t\t\t\tbar.SetCurrent(srcInfo.Size)\n\t\t\t\t\tbar.SetRefill(refill)\n\t\t\t\t}\n\t\t\t\tbar.mark100PercentComplete()\n\t\t\t\thideProgressBar = false\n\t\t\t\tlogrus.Debugf(\"Retrieved partial blob %v\", srcInfo.Digest)\n\t\t\t\treturn true, updatedBlobInfoFromUpload(srcInfo, uploadedBlob), nil\n\t\t\t}\n\t\t\t// On a \"partial content not available\" error, ignore it and retrieve the whole layer.\n\t\t\tvar perr private.ErrFallbackToOrdinaryLayerDownload\n\t\t\tif errors.As(err, &perr) {\n\t\t\t\tlogrus.Debugf(\"Failed to retrieve partial blob: %v\", err)\n\t\t\t\treturn false, types.BlobInfo{}, nil\n\t\t\t}\n\t\t\treturn false, types.BlobInfo{}, err\n\t\t}()\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", fmt.Errorf(\"partial pull of blob %s: %w\", srcInfo.Digest, err)\n\t\t}\n\t\tif reused {\n\t\t\treturn blobInfo, cachedDiffID, nil\n\t\t}\n\t}\n\n\t// Fallback: copy the layer, computing the diffID if we need to do so\n\treturn func() (types.BlobInfo, digest.Digest, error) { // A scope for defer\n\t\tbar, err := ic.c.createProgressBar(pool, false, srcInfo, \"blob\", \"done\")\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", err\n\t\t}\n\t\tdefer bar.Abort(false)\n\n\t\tsrcStream, srcBlobSize, err := ic.c.rawSource.GetBlob(ctx, srcInfo, ic.c.blobInfoCache)\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", fmt.Errorf(\"reading blob %s: %w\", srcInfo.Digest, err)\n\t\t}\n\t\tdefer srcStream.Close()\n\n\t\tblobInfo, diffIDChan, err := ic.copyLayerFromStream(ctx, srcStream, types.BlobInfo{Digest: srcInfo.Digest, Size: srcBlobSize, MediaType: srcInfo.MediaType, Annotations: srcInfo.Annotations}, diffIDIsNeeded, toEncrypt, bar, layerIndex, emptyLayer)\n\t\tif err != nil {\n\t\t\treturn types.BlobInfo{}, \"\", err\n\t\t}\n\n\t\tdiffID := cachedDiffID\n\t\tif diffIDIsNeeded {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\treturn types.BlobInfo{}, \"\", ctx.Err()\n\t\t\tcase diffIDResult := <-diffIDChan:\n\t\t\t\tif diffIDResult.err != nil {\n\t\t\t\t\treturn types.BlobInfo{}, \"\", fmt.Errorf(\"computing layer DiffID: %w\", diffIDResult.err)\n\t\t\t\t}\n\t\t\t\tlogrus.Debugf(\"Computed DiffID %s for layer %s\", diffIDResult.digest, srcInfo.Digest)\n\t\t\t\t// Don’t record any associations that involve encrypted data. This is a bit crude,\n\t\t\t\t// some blob substitutions (replacing pulls of encrypted data with local reuse of known decryption outcomes)\n\t\t\t\t// might be safe, but it’s not trivially obvious, so let’s be conservative for now.\n\t\t\t\t// This crude approach also means we don’t need to record whether a blob is encrypted\n\t\t\t\t// in the blob info cache (which would probably be necessary for any more complex logic),\n\t\t\t\t// and the simplicity is attractive.\n\t\t\t\tif !encryptingOrDecrypting {\n\t\t\t\t\t// This is safe because we have just computed diffIDResult.Digest ourselves, and in the process\n\t\t\t\t\t// we have read all of the input blob, so srcInfo.Digest must have been validated by digestingReader.\n\t\t\t\t\tic.c.blobInfoCache.RecordDigestUncompressedPair(srcInfo.Digest, diffIDResult.digest)\n\t\t\t\t}\n\t\t\t\tdiffID = diffIDResult.digest\n\t\t\t}\n\t\t}\n\n\t\tbar.mark100PercentComplete()\n\t\treturn blobInfo, diffID, nil\n\t}()\n}\n\n// updatedBlobInfoFromReuse returns inputInfo updated with reusedBlob which was created based on inputInfo.\nfunc updatedBlobInfoFromReuse(inputInfo types.BlobInfo, reusedBlob private.ReusedBlob) types.BlobInfo {\n\t// The transport is only tasked with finding the blob, determining its size if necessary, and returning the right\n\t// compression format if the blob was substituted.\n\t// Handling of compression, encryption, and the related MIME types and the like are all the responsibility\n\t// of the generic code in this package.\n\tres := types.BlobInfo{\n\t\tDigest: reusedBlob.Digest,\n\t\tSize:   reusedBlob.Size,\n\t\tURLs:   nil, // This _must_ be cleared if Digest changes; clear it in other cases as well, to preserve previous behavior.\n\t\t// FIXME: This should remove zstd:chunked annotations IF the original was chunked and the new one isn’t\n\t\t// (but those annotations being left with incorrect values should not break pulls).\n\t\tAnnotations:          maps.Clone(inputInfo.Annotations),\n\t\tMediaType:            inputInfo.MediaType, // Mostly irrelevant, MediaType is updated based on Compression*/CryptoOperation.\n\t\tCompressionOperation: reusedBlob.CompressionOperation,\n\t\tCompressionAlgorithm: reusedBlob.CompressionAlgorithm,\n\t\tCryptoOperation:      inputInfo.CryptoOperation, // Expected to be unset anyway.\n\t}\n\t// The transport is only expected to fill CompressionOperation and CompressionAlgorithm\n\t// if the blob was substituted; otherwise, it is optional, and if not set, fill it in based\n\t// on what we know from the srcInfos we were given.\n\tif reusedBlob.Digest == inputInfo.Digest {\n\t\tif res.CompressionOperation == types.PreserveOriginal {\n\t\t\tres.CompressionOperation = inputInfo.CompressionOperation\n\t\t}\n\t\tif res.CompressionAlgorithm == nil {\n\t\t\tres.CompressionAlgorithm = inputInfo.CompressionAlgorithm\n\t\t}\n\t}\n\tif len(reusedBlob.CompressionAnnotations) != 0 {\n\t\tif res.Annotations == nil {\n\t\t\tres.Annotations = map[string]string{}\n\t\t}\n\t\tmaps.Copy(res.Annotations, reusedBlob.CompressionAnnotations)\n\t}\n\treturn res\n}\n\n// copyLayerFromStream is an implementation detail of copyLayer; mostly providing a separate “defer” scope.\n// it copies a blob with srcInfo (with known Digest and Annotations and possibly known Size) from srcStream to dest,\n// perhaps (de/re/)compressing the stream,\n// and returns a complete blobInfo of the copied blob and perhaps a <-chan diffIDResult if diffIDIsNeeded, to be read by the caller.\nfunc (ic *imageCopier) copyLayerFromStream(ctx context.Context, srcStream io.Reader, srcInfo types.BlobInfo,\n\tdiffIDIsNeeded bool, toEncrypt bool, bar *progressBar, layerIndex int, emptyLayer bool,\n) (types.BlobInfo, <-chan diffIDResult, error) {\n\tvar getDiffIDRecorder func(compressiontypes.DecompressorFunc) io.Writer // = nil\n\tvar diffIDChan chan diffIDResult\n\n\terr := errors.New(\"Internal error: unexpected panic in copyLayer\") // For pipeWriter.CloseWithbelow\n\tif diffIDIsNeeded {\n\t\tdiffIDChan = make(chan diffIDResult, 1) // Buffered, so that sending a value after this or our caller has failed and exited does not block.\n\t\tpipeReader, pipeWriter := io.Pipe()\n\t\tdefer func() { // Note that this is not the same as {defer pipeWriter.CloseWithError(err)}; we need err to be evaluated lazily.\n\t\t\t_ = pipeWriter.CloseWithError(err) // CloseWithError(nil) is equivalent to Close(), always returns nil\n\t\t}()\n\n\t\tgetDiffIDRecorder = func(decompressor compressiontypes.DecompressorFunc) io.Writer {\n\t\t\t// If this fails, e.g. because we have exited and due to pipeWriter.CloseWithError() above further\n\t\t\t// reading from the pipe has failed, we don’t really care.\n\t\t\t// We only read from diffIDChan if the rest of the flow has succeeded, and when we do read from it,\n\t\t\t// the return value includes an error indication, which we do check.\n\t\t\t//\n\t\t\t// If this gets never called, pipeReader will not be used anywhere, but pipeWriter will only be\n\t\t\t// closed above, so we are happy enough with both pipeReader and pipeWriter to just get collected by GC.\n\t\t\tgo diffIDComputationGoroutine(diffIDChan, pipeReader, decompressor) // Closes pipeReader\n\t\t\treturn pipeWriter\n\t\t}\n\t}\n\n\tblobInfo, err := ic.copyBlobFromStream(ctx, srcStream, srcInfo, getDiffIDRecorder, false, toEncrypt, bar, layerIndex, emptyLayer) // Sets err to nil on success\n\treturn blobInfo, diffIDChan, err\n\t// We need the defer … pipeWriter.CloseWithError() to happen HERE so that the caller can block on reading from diffIDChan\n}\n\n// diffIDComputationGoroutine reads all input from layerStream, uncompresses using decompressor if necessary, and sends its digest, and status, if any, to dest.\nfunc diffIDComputationGoroutine(dest chan<- diffIDResult, layerStream io.ReadCloser, decompressor compressiontypes.DecompressorFunc) {\n\tresult := diffIDResult{\n\t\tdigest: \"\",\n\t\terr:    errors.New(\"Internal error: unexpected panic in diffIDComputationGoroutine\"),\n\t}\n\tdefer func() { dest <- result }()\n\tdefer layerStream.Close() // We do not care to bother the other end of the pipe with other failures; we send them to dest instead.\n\n\tresult.digest, result.err = computeDiffID(layerStream, decompressor)\n}\n\n// computeDiffID reads all input from layerStream, uncompresses it using decompressor if necessary, and returns its digest.\nfunc computeDiffID(stream io.Reader, decompressor compressiontypes.DecompressorFunc) (digest.Digest, error) {\n\tif decompressor != nil {\n\t\ts, err := decompressor(stream)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tdefer s.Close()\n\t\tstream = s\n\t}\n\n\treturn digest.Canonical.FromReader(stream)\n}\n\n// algorithmsByNames returns slice of Algorithms from a sequence of Algorithm Names\nfunc algorithmsByNames(names iter.Seq[string]) ([]compressiontypes.Algorithm, error) {\n\tresult := []compressiontypes.Algorithm{}\n\tfor name := range names {\n\t\talgo, err := compression.AlgorithmByName(name)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult = append(result, algo)\n\t}\n\treturn result, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/directory/directory_dest.go",
    "content": "package directory\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/putblobdigest\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n)\n\n// ErrNotContainerImageDir indicates that the directory doesn't match the expected contents of a directory created\n// using the 'dir' transport\nvar ErrNotContainerImageDir = errors.New(\"not a containers image directory, don't want to overwrite important data\")\n\ntype dirImageDestination struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.IgnoresOriginalOCIConfig\n\tstubs.NoPutBlobPartialInitialize\n\tstubs.AlwaysSupportsSignatures\n\n\tref                 dirReference\n\tusesNonSHA256Digest bool\n}\n\n// newImageDestination returns an ImageDestination for writing to a directory.\nfunc newImageDestination(sys *types.SystemContext, ref dirReference) (private.ImageDestination, error) {\n\tdesiredLayerCompression := types.PreserveOriginal\n\tif sys != nil {\n\t\tif sys.DirForceCompress {\n\t\t\tdesiredLayerCompression = types.Compress\n\n\t\t\tif sys.DirForceDecompress {\n\t\t\t\treturn nil, fmt.Errorf(\"Cannot compress and decompress at the same time\")\n\t\t\t}\n\t\t}\n\t\tif sys.DirForceDecompress {\n\t\t\tdesiredLayerCompression = types.Decompress\n\t\t}\n\t}\n\n\t// If directory exists check if it is empty\n\t// if not empty, check whether the contents match that of a container image directory and overwrite the contents\n\t// if the contents don't match throw an error\n\tdirExists, err := pathExists(ref.resolvedPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"checking for path %q: %w\", ref.resolvedPath, err)\n\t}\n\tif dirExists {\n\t\tisEmpty, err := isDirEmpty(ref.resolvedPath)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif !isEmpty {\n\t\t\tversionExists, err := pathExists(ref.versionPath())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"checking if path exists %q: %w\", ref.versionPath(), err)\n\t\t\t}\n\t\t\tif versionExists {\n\t\t\t\tcontents, err := os.ReadFile(ref.versionPath())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\t// check if contents of version file is what we expect it to be\n\t\t\t\tversionStr := string(contents)\n\t\t\t\tparsedVersion, err := parseVersion(versionStr)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, ErrNotContainerImageDir\n\t\t\t\t}\n\t\t\t\tif parsedVersion.isGreaterThan(maxSupportedVersion) {\n\t\t\t\t\treturn nil, UnsupportedVersionError{Version: versionStr, Path: ref.resolvedPath}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn nil, ErrNotContainerImageDir\n\t\t\t}\n\t\t\t// delete directory contents so that only one image is in the directory at a time\n\t\t\tif err = removeDirContents(ref.resolvedPath); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"erasing contents in %q: %w\", ref.resolvedPath, err)\n\t\t\t}\n\t\t\tlogrus.Debugf(\"overwriting existing container image directory %q\", ref.resolvedPath)\n\t\t}\n\t} else {\n\t\t// create directory if it doesn't exist\n\t\tif err := os.MkdirAll(ref.resolvedPath, 0o755); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to create directory %q: %w\", ref.resolvedPath, err)\n\t\t}\n\t}\n\n\td := &dirImageDestination{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tSupportedManifestMIMETypes:     nil,\n\t\t\tDesiredLayerCompression:        desiredLayerCompression,\n\t\t\tAcceptsForeignLayerURLs:        false,\n\t\t\tMustMatchRuntimeOS:             false,\n\t\t\tIgnoresEmbeddedDockerReference: false, // N/A, DockerReference() returns nil.\n\t\t\tHasThreadSafePutBlob:           true,\n\t\t}),\n\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartial(ref),\n\n\t\tref: ref,\n\t}\n\td.Compat = impl.AddCompat(d)\n\treturn d, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (d *dirImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *dirImageDestination) Close() error {\n\treturn nil\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *dirImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\tblobFile, err := os.CreateTemp(d.ref.path, \"dir-put-blob\")\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tsucceeded := false\n\texplicitClosed := false\n\tdefer func() {\n\t\tif !explicitClosed {\n\t\t\tblobFile.Close()\n\t\t}\n\t\tif !succeeded {\n\t\t\tos.Remove(blobFile.Name())\n\t\t}\n\t}()\n\n\tdigester, stream := putblobdigest.DigestIfUnknown(stream, inputInfo)\n\n\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\tsize, err := io.Copy(blobFile, stream)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tblobDigest := digester.Digest()\n\tif blobDigest.Algorithm() != digest.Canonical { // compare the special case in layerPath\n\t\td.usesNonSHA256Digest = true\n\t}\n\tif inputInfo.Size != -1 && size != inputInfo.Size {\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"Size mismatch when copying %s, expected %d, got %d\", blobDigest, inputInfo.Size, size)\n\t}\n\tif err := blobFile.Sync(); err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\n\t// On POSIX systems, blobFile was created with mode 0600, so we need to make it readable.\n\t// On Windows, the “permissions of newly created files” argument to syscall.Open is\n\t// ignored and the file is already readable; besides, blobFile.Chmod, i.e. syscall.Fchmod,\n\t// always fails on Windows.\n\tif runtime.GOOS != \"windows\" {\n\t\tif err := blobFile.Chmod(0o644); err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t}\n\n\tblobPath, err := d.ref.layerPath(blobDigest)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\t// need to explicitly close the file, since a rename won't otherwise not work on Windows\n\tblobFile.Close()\n\texplicitClosed = true\n\tif err := os.Rename(blobFile.Name(), blobPath); err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tsucceeded = true\n\treturn private.UploadedBlob{Digest: blobDigest, Size: size}, nil\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *dirImageDestination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif !impl.OriginalCandidateMatchesTryReusingBlobOptions(options) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\tif info.Digest == \"\" {\n\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"Can not check for a blob with unknown digest\")\n\t}\n\tblobPath, err := d.ref.layerPath(info.Digest)\n\tif err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\tfinfo, err := os.Stat(blobPath)\n\tif err != nil && os.IsNotExist(err) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\tif err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\treturn true, private.ReusedBlob{Digest: info.Digest, Size: finfo.Size()}, nil\n}\n\n// PutManifest writes manifest to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write the manifest for (when\n// the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// It is expected but not enforced that the instanceDigest, when specified, matches the digest of `manifest` as generated\n// by `manifest.Digest()`.\n// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\nfunc (d *dirImageDestination) PutManifest(ctx context.Context, manifest []byte, instanceDigest *digest.Digest) error {\n\tif instanceDigest != nil && instanceDigest.Algorithm() != digest.Canonical { // compare the special case in manifestPath\n\t\td.usesNonSHA256Digest = true\n\t}\n\tpath, err := d.ref.manifestPath(instanceDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn os.WriteFile(path, manifest, 0o644)\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (d *dirImageDestination) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tif instanceDigest != nil && instanceDigest.Algorithm() != digest.Canonical { // compare the special case in signaturePath\n\t\td.usesNonSHA256Digest = true\n\t}\n\tfor i, sig := range signatures {\n\t\tblob, err := signature.Blob(sig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpath, err := d.ref.signaturePath(i, instanceDigest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := os.WriteFile(path, blob, 0o644); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *dirImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\tversionToWrite := version1_1\n\tif d.usesNonSHA256Digest {\n\t\tversionToWrite = version1_2\n\t}\n\terr := os.WriteFile(d.ref.versionPath(), []byte(versionToWrite.String()), 0o644)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"writing version file %q: %w\", d.ref.versionPath(), err)\n\t}\n\treturn nil\n}\n\n// returns true if path exists\nfunc pathExists(path string) (bool, error) {\n\terr := fileutils.Exists(path)\n\tif err == nil {\n\t\treturn true, nil\n\t}\n\tif os.IsNotExist(err) {\n\t\treturn false, nil\n\t}\n\treturn false, err\n}\n\n// returns true if directory is empty\nfunc isDirEmpty(path string) (bool, error) {\n\tfiles, err := os.ReadDir(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn len(files) == 0, nil\n}\n\n// deletes the contents of a directory\nfunc removeDirContents(path string) error {\n\tfiles, err := os.ReadDir(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, file := range files {\n\t\tif err := os.RemoveAll(filepath.Join(path, file.Name())); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/directory/directory_src.go",
    "content": "package directory\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype dirImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.NoGetBlobAtInitialize\n\n\tref dirReference\n}\n\n// newImageSource returns an ImageSource reading from an existing directory.\n// The caller must call .Close() on the returned ImageSource.\nfunc newImageSource(ref dirReference) (private.ImageSource, error) {\n\tversionPath := ref.versionPath()\n\tcontents, err := os.ReadFile(versionPath)\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, fmt.Errorf(\"reading version file %q: %w\", versionPath, err)\n\t\t}\n\t} else {\n\t\tversionStr := string(contents)\n\t\tparsedVersion, err := parseVersion(versionStr)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid version file content: %q\", versionStr)\n\t\t}\n\t\tif parsedVersion.isGreaterThan(maxSupportedVersion) {\n\t\t\treturn nil, UnsupportedVersionError{Version: versionStr, Path: ref.resolvedPath}\n\t\t}\n\t}\n\n\ts := &dirImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: false,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),\n\n\t\tref: ref,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s, nil\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (s *dirImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\nfunc (s *dirImageSource) Close() error {\n\treturn nil\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *dirImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tpath, err := s.ref.manifestPath(instanceDigest)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tm, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn m, manifest.GuessMIMEType(m), err\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *dirImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tpath, err := s.ref.layerPath(info.Digest)\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\tr, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\tfi, err := r.Stat()\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\treturn r, fi.Size(), nil\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (s *dirImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\tsignatures := []signature.Signature{}\n\tfor i := 0; ; i++ {\n\t\tpath, err := s.ref.signaturePath(i, instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsigBlob, err := os.ReadFile(path)\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\tsignature, err := signature.FromBlob(sigBlob)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing signature %q: %w\", path, err)\n\t\t}\n\t\tsignatures = append(signatures, signature)\n\t}\n\treturn signatures, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/directory/directory_transport.go",
    "content": "package directory\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/directory/explicitfilepath\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for directory paths.\nvar Transport = dirTransport{}\n\ntype dirTransport struct{}\n\nfunc (t dirTransport) Name() string {\n\treturn \"dir\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t dirTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn NewReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t dirTransport) ValidatePolicyConfigurationScope(scope string) error {\n\tif !strings.HasPrefix(scope, \"/\") {\n\t\treturn fmt.Errorf(\"Invalid scope %s: Must be an absolute path\", scope)\n\t}\n\t// Refuse also \"/\", otherwise \"/\" and \"\" would have the same semantics,\n\t// and \"\" could be unexpectedly shadowed by the \"/\" entry.\n\tif scope == \"/\" {\n\t\treturn errors.New(`Invalid scope \"/\": Use the generic default scope \"\"`)\n\t}\n\tcleaned := filepath.Clean(scope)\n\tif cleaned != scope {\n\t\treturn fmt.Errorf(`Invalid scope %s: Uses non-canonical format, perhaps try %s`, scope, cleaned)\n\t}\n\treturn nil\n}\n\n// dirReference is an ImageReference for directory paths.\ntype dirReference struct {\n\t// Note that the interpretation of paths below depends on the underlying filesystem state, which may change under us at any time!\n\t// Either of the paths may point to a different, or no, inode over time.  resolvedPath may contain symbolic links, and so on.\n\n\t// Generally we follow the intent of the user, and use the \"path\" member for filesystem operations (e.g. the user can use a relative path to avoid\n\t// being exposed to symlinks and renames in the parent directories to the working directory).\n\t// (But in general, we make no attempt to be completely safe against concurrent hostile filesystem modifications.)\n\tpath         string // As specified by the user. May be relative, contain symlinks, etc.\n\tresolvedPath string // Absolute path with no symlinks, at least at the time of its creation. Primarily used for policy namespaces.\n}\n\n// There is no directory.ParseReference because it is rather pointless.\n// Callers who need a transport-independent interface will go through\n// dirTransport.ParseReference; callers who intentionally deal with directories\n// can use directory.NewReference.\n\n// NewReference returns a directory reference for a specified path.\n//\n// We do not expose an API supplying the resolvedPath; we could, but recomputing it\n// is generally cheap enough that we prefer being confident about the properties of resolvedPath.\nfunc NewReference(path string) (types.ImageReference, error) {\n\tresolved, err := explicitfilepath.ResolvePathToFullyExplicit(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn dirReference{path: path, resolvedPath: resolved}, nil\n}\n\nfunc (ref dirReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix.\nfunc (ref dirReference) StringWithinTransport() string {\n\treturn ref.path\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref dirReference) DockerReference() reference.Named {\n\treturn nil\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref dirReference) PolicyConfigurationIdentity() string {\n\treturn ref.resolvedPath\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref dirReference) PolicyConfigurationNamespaces() []string {\n\tres := []string{}\n\tpath := ref.resolvedPath\n\tfor {\n\t\tlastSlash := strings.LastIndex(path, \"/\")\n\t\tif lastSlash == -1 || lastSlash == 0 {\n\t\t\tbreak\n\t\t}\n\t\tpath = path[:lastSlash]\n\t\tres = append(res, path)\n\t}\n\t// Note that we do not include \"/\"; it is redundant with the default \"\" global default,\n\t// and rejected by dirTransport.ValidatePolicyConfigurationScope above.\n\treturn res\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref dirReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref dirReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref dirReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref dirReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\treturn errors.New(\"Deleting images not implemented for dir: images\")\n}\n\n// manifestPath returns a path for the manifest within a directory using our conventions.\nfunc (ref dirReference) manifestPath(instanceDigest *digest.Digest) (string, error) {\n\tif instanceDigest != nil {\n\t\tif err := instanceDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly.\n\t\t\treturn \"\", err\n\t\t}\n\t\tvar filename string\n\t\tif instanceDigest.Algorithm() == digest.Canonical {\n\t\t\tfilename = instanceDigest.Encoded() + \".manifest.json\"\n\t\t} else {\n\t\t\tfilename = instanceDigest.Algorithm().String() + \"-\" + instanceDigest.Encoded() + \".manifest.json\"\n\t\t}\n\t\treturn filepath.Join(ref.path, filename), nil\n\t}\n\treturn filepath.Join(ref.path, \"manifest.json\"), nil\n}\n\n// layerPath returns a path for a layer tarball within a directory using our conventions.\nfunc (ref dirReference) layerPath(d digest.Digest) (string, error) {\n\tif err := d.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly.\n\t\treturn \"\", err\n\t}\n\n\tvar filename string\n\tif d.Algorithm() == digest.Canonical {\n\t\tfilename = d.Encoded()\n\t} else {\n\t\tfilename = d.Algorithm().String() + \"-\" + d.Encoded()\n\t}\n\n\treturn filepath.Join(ref.path, filename), nil\n}\n\n// signaturePath returns a path for a signature within a directory using our conventions.\nfunc (ref dirReference) signaturePath(index int, instanceDigest *digest.Digest) (string, error) {\n\tif instanceDigest != nil {\n\t\tif err := instanceDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly.\n\t\t\treturn \"\", err\n\t\t}\n\t\tvar prefix string\n\t\tif instanceDigest.Algorithm() == digest.Canonical {\n\t\t\tprefix = instanceDigest.Encoded()\n\t\t} else {\n\t\t\tprefix = instanceDigest.Algorithm().String() + \"-\" + instanceDigest.Encoded()\n\t\t}\n\t\treturn filepath.Join(ref.path, fmt.Sprintf(prefix+\".signature-%d\", index+1)), nil\n\t}\n\treturn filepath.Join(ref.path, fmt.Sprintf(\"signature-%d\", index+1)), nil\n}\n\n// versionPath returns a path for the version file within a directory using our conventions.\nfunc (ref dirReference) versionPath() string {\n\treturn filepath.Join(ref.path, \"version\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/directory/explicitfilepath/path.go",
    "content": "package explicitfilepath\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"go.podman.io/storage/pkg/fileutils\"\n)\n\n// ResolvePathToFullyExplicit returns the input path converted to an absolute, no-symlinks, cleaned up path.\n// To do so, all elements of the input path must exist; as a special case, the final component may be\n// a non-existent name (but not a symlink pointing to a non-existent name)\n// This is intended as a helper for implementations of types.ImageReference.PolicyConfigurationIdentity etc.\nfunc ResolvePathToFullyExplicit(path string) (string, error) {\n\tswitch err := fileutils.Lexists(path); {\n\tcase err == nil:\n\t\treturn resolveExistingPathToFullyExplicit(path)\n\tcase os.IsNotExist(err):\n\t\tparent, file := filepath.Split(path)\n\t\tresolvedParent, err := resolveExistingPathToFullyExplicit(parent)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif file == \".\" || file == \"..\" {\n\t\t\t// Coverage: This can happen, but very rarely: if we have successfully resolved the parent, both \".\" and \"..\" in it should have been resolved as well.\n\t\t\t// This can still happen if there is a filesystem race condition, causing the Lstat() above to fail but the later resolution to succeed.\n\t\t\t// We do not care to promise anything if such filesystem race conditions can happen, but we definitely don't want to return \".\"/\"..\" components\n\t\t\t// in the resulting path, and especially not at the end.\n\t\t\treturn \"\", fmt.Errorf(\"Unexpectedly missing special filename component in %s\", path)\n\t\t}\n\t\tresolvedPath := filepath.Join(resolvedParent, file)\n\t\t// As a sanity check, ensure that there are no \".\" or \"..\" components.\n\t\tcleanedResolvedPath := filepath.Clean(resolvedPath)\n\t\tif cleanedResolvedPath != resolvedPath {\n\t\t\t// Coverage: This should never happen.\n\t\t\treturn \"\", fmt.Errorf(\"Internal inconsistency: Path %s resolved to %s still cleaned up to %s\", path, resolvedPath, cleanedResolvedPath)\n\t\t}\n\t\treturn resolvedPath, nil\n\tdefault: // err != nil, unrecognized\n\t\treturn \"\", err\n\t}\n}\n\n// resolveExistingPathToFullyExplicit is the same as ResolvePathToFullyExplicit,\n// but without the special case for missing final component.\nfunc resolveExistingPathToFullyExplicit(path string) (string, error) {\n\tresolved, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn \"\", err // Coverage: This can fail only if os.Getwd() fails.\n\t}\n\tresolved, err = filepath.EvalSymlinks(resolved)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn filepath.Clean(resolved), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/directory/version.go",
    "content": "package directory\n\nimport (\n\t\"fmt\"\n)\n\nconst (\n\tversionPrefix = \"Directory Transport Version: \"\n)\n\n// version represents a parsed directory transport version\ntype version struct {\n\tmajor int\n\tminor int\n}\n\n// Supported versions\n// Write version file based on digest algorithm used.\n// 1.1 for sha256-only images, 1.2 otherwise.\nvar (\n\tversion1_1          = version{major: 1, minor: 1}\n\tversion1_2          = version{major: 1, minor: 2}\n\tmaxSupportedVersion = version1_2\n)\n\n// String formats a version as a string suitable for writing to the version file\nfunc (v version) String() string {\n\treturn fmt.Sprintf(\"%s%d.%d\\n\", versionPrefix, v.major, v.minor)\n}\n\n// parseVersion parses a version string into major and minor components.\n// Returns an error if the format is invalid.\nfunc parseVersion(versionStr string) (version, error) {\n\tvar v version\n\texpectedFormat := versionPrefix + \"%d.%d\\n\"\n\t// Sscanf parsing is a bit loose (treats spaces specially), but a strict check immediately follows\n\tn, err := fmt.Sscanf(versionStr, expectedFormat, &v.major, &v.minor)\n\tif err != nil || n != 2 || versionStr != v.String() {\n\t\treturn version{}, fmt.Errorf(\"invalid version format\")\n\t}\n\treturn v, nil\n}\n\n// TODO: Potential refactor for better interoperability with `cmp`\n// https://github.com/containers/container-libs/pull/475#discussion_r2571131267\n// isGreaterThan returns true if v is greater than other\nfunc (v version) isGreaterThan(other version) bool {\n\tif v.major != other.major {\n\t\treturn v.major > other.major\n\t}\n\treturn v.minor > other.minor\n}\n\n// UnsupportedVersionError indicates that the directory uses a version newer than we support\ntype UnsupportedVersionError struct {\n\tVersion string // The unsupported version string found\n\tPath    string // The path to the directory\n}\n\nfunc (e UnsupportedVersionError) Error() string {\n\treturn fmt.Sprintf(\"unsupported directory transport version %q at %s\", e.Version, e.Path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/archive/dest.go",
    "content": "package archive\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype archiveImageDestination struct {\n\t*tarfile.Destination // Implements most of types.ImageDestination\n\tref                  archiveReference\n\twriter               *Writer // Should be closed if closeWriter\n\tcloseWriter          bool\n}\n\nfunc newImageDestination(sys *types.SystemContext, ref archiveReference) (private.ImageDestination, error) {\n\tif ref.sourceIndex != -1 {\n\t\treturn nil, fmt.Errorf(\"Destination reference must not contain a manifest index @%d\", ref.sourceIndex)\n\t}\n\n\tvar writer *Writer\n\tvar closeWriter bool\n\tif ref.writer != nil {\n\t\twriter = ref.writer\n\t\tcloseWriter = false\n\t} else {\n\t\tw, err := NewWriter(sys, ref.path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\twriter = w\n\t\tcloseWriter = true\n\t}\n\td := &archiveImageDestination{\n\t\tref:         ref,\n\t\twriter:      writer,\n\t\tcloseWriter: closeWriter,\n\t}\n\ttarDest := tarfile.NewDestination(sys, writer.archive, ref.Transport().Name(), ref.ref, d.CommitWithOptions)\n\tif sys != nil && sys.DockerArchiveAdditionalTags != nil {\n\t\ttarDest.AddRepoTags(sys.DockerArchiveAdditionalTags)\n\t}\n\td.Destination = tarDest\n\treturn d, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (d *archiveImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *archiveImageDestination) Close() error {\n\tif d.closeWriter {\n\t\treturn d.writer.Close()\n\t}\n\treturn nil\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *archiveImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\td.writer.imageCommitted()\n\tif d.closeWriter {\n\t\t// We could do this only in .Close(), but failures in .Close() are much more likely to be\n\t\t// ignored by callers that use defer. So, in single-image destinations, try to complete\n\t\t// the archive here.\n\t\t// But if Commit() is never called, let .Close() clean up.\n\t\terr := d.writer.Close()\n\t\td.closeWriter = false\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/archive/reader.go",
    "content": "package archive\n\nimport (\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Reader manages a single Docker archive, allows listing its contents and accessing\n// individual images with less overhead than creating image references individually\n// (because the archive is, if necessary, copied or decompressed only once).\ntype Reader struct {\n\tpath    string // The original, user-specified path; not the maintained temporary file, if any\n\tarchive *tarfile.Reader\n}\n\n// NewReader returns a Reader for path.\n// The caller should call .Close() on the returned object.\nfunc NewReader(sys *types.SystemContext, path string) (*Reader, error) {\n\tarchive, err := tarfile.NewReaderFromFile(sys, path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Reader{\n\t\tpath:    path,\n\t\tarchive: archive,\n\t}, nil\n}\n\n// Close deletes temporary files associated with the Reader, if any.\nfunc (r *Reader) Close() error {\n\treturn r.archive.Close()\n}\n\n// NewReaderForReference creates a Reader from a Reader-independent imageReference, which must be from docker/archive.Transport,\n// and a variant of imageReference that points at the same image within the reader.\n// The caller should call .Close() on the returned Reader.\nfunc NewReaderForReference(sys *types.SystemContext, ref types.ImageReference) (*Reader, types.ImageReference, error) {\n\tstandalone, ok := ref.(archiveReference)\n\tif !ok {\n\t\treturn nil, nil, fmt.Errorf(\"Internal error: NewReaderForReference called for a non-docker/archive ImageReference %s\", transports.ImageName(ref))\n\t}\n\tif standalone.archiveReader != nil {\n\t\treturn nil, nil, fmt.Errorf(\"Internal error: NewReaderForReference called for a reader-bound reference %s\", standalone.StringWithinTransport())\n\t}\n\treader, err := NewReader(sys, standalone.path)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\treader.Close()\n\t\t}\n\t}()\n\treaderRef, err := newReference(standalone.path, standalone.ref, standalone.sourceIndex, reader.archive, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tsucceeded = true\n\treturn reader, readerRef, nil\n}\n\n// List returns the a set of references for images in the Reader,\n// grouped by the image the references point to.\n// The references are valid only until the Reader is closed.\nfunc (r *Reader) List() ([][]types.ImageReference, error) {\n\tres := [][]types.ImageReference{}\n\tfor imageIndex, image := range r.archive.Manifest {\n\t\trefs := []types.ImageReference{}\n\t\tfor _, tag := range image.RepoTags {\n\t\t\tparsedTag, err := reference.ParseNormalizedNamed(tag)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid tag %#v in manifest item @%d: %w\", tag, imageIndex, err)\n\t\t\t}\n\t\t\tnt, ok := parsedTag.(reference.NamedTagged)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid tag %q (%s): does not contain a tag\", tag, parsedTag.String())\n\t\t\t}\n\t\t\tref, err := newReference(r.path, nt, -1, r.archive, nil)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"creating a reference for tag %#v in manifest item @%d: %w\", tag, imageIndex, err)\n\t\t\t}\n\t\t\trefs = append(refs, ref)\n\t\t}\n\t\tif len(refs) == 0 {\n\t\t\tref, err := newReference(r.path, nil, imageIndex, r.archive, nil)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"creating a reference for manifest item @%d: %w\", imageIndex, err)\n\t\t\t}\n\t\t\trefs = append(refs, ref)\n\t\t}\n\t\tres = append(res, refs)\n\t}\n\treturn res, nil\n}\n\n// ManifestTagsForReference returns the set of tags “matching” ref in reader, as strings\n// (i.e. exposing the short names before normalization).\n// The function reports an error if ref does not identify a single image.\n// If ref contains a NamedTagged reference, only a single tag “matching” ref is returned;\n// If ref contains a source index, or neither a NamedTagged nor a source index, all tags\n// matching the image are returned.\n// Almost all users should use List() or ImageReference.DockerReference() instead.\nfunc (r *Reader) ManifestTagsForReference(ref types.ImageReference) ([]string, error) {\n\tarchiveRef, ok := ref.(archiveReference)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"Internal error: ManifestTagsForReference called for a non-docker/archive ImageReference %s\", transports.ImageName(ref))\n\t}\n\tmanifestItem, tagIndex, err := r.archive.ChooseManifestItem(archiveRef.ref, archiveRef.sourceIndex)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif tagIndex != -1 {\n\t\treturn []string{manifestItem.RepoTags[tagIndex]}, nil\n\t}\n\treturn manifestItem.RepoTags, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/archive/src.go",
    "content": "package archive\n\nimport (\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype archiveImageSource struct {\n\t*tarfile.Source // Implements most of types.ImageSource\n\tref             archiveReference\n}\n\n// newImageSource returns a types.ImageSource for the specified image reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc newImageSource(sys *types.SystemContext, ref archiveReference) (private.ImageSource, error) {\n\tvar archive *tarfile.Reader\n\tvar closeArchive bool\n\tif ref.archiveReader != nil {\n\t\tarchive = ref.archiveReader\n\t\tcloseArchive = false\n\t} else {\n\t\ta, err := tarfile.NewReaderFromFile(sys, ref.path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tarchive = a\n\t\tcloseArchive = true\n\t}\n\tsrc := tarfile.NewSource(archive, closeArchive, ref.Transport().Name(), ref.ref, ref.sourceIndex)\n\treturn &archiveImageSource{\n\t\tSource: src,\n\t\tref:    ref,\n\t}, nil\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (s *archiveImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/archive/transport.go",
    "content": "package archive\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\tctrImage \"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for local Docker archives.\nvar Transport = archiveTransport{}\n\ntype archiveTransport struct{}\n\nfunc (t archiveTransport) Name() string {\n\treturn \"docker-archive\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t archiveTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t archiveTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// See the explanation in archiveReference.PolicyConfigurationIdentity.\n\treturn errors.New(`docker-archive: does not support any scopes except the default \"\" one`)\n}\n\n// archiveReference is an ImageReference for Docker images.\ntype archiveReference struct {\n\tpath string\n\t// May be nil to read the only image in an archive, or to create an untagged image.\n\tref reference.NamedTagged\n\t// If not -1, a zero-based index of the image in the manifest. Valid only for sources.\n\t// Must not be set if ref is set.\n\tsourceIndex int\n\t// If not nil, must have been created from path (but archiveReader.path may point at a temporary\n\t// file, not necessarily path precisely).\n\tarchiveReader *tarfile.Reader\n\t// If not nil, must have been created for path\n\twriter *Writer\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an Docker ImageReference.\nfunc ParseReference(refString string) (types.ImageReference, error) {\n\tif refString == \"\" {\n\t\treturn nil, fmt.Errorf(\"docker-archive reference %s isn't of the form <path>[:<reference>]\", refString)\n\t}\n\n\tpath, tagOrIndex, gotTagOrIndex := strings.Cut(refString, \":\")\n\tvar nt reference.NamedTagged\n\tsourceIndex := -1\n\n\tif gotTagOrIndex {\n\t\t// A :tag or :@index was specified.\n\t\tif len(tagOrIndex) > 0 && tagOrIndex[0] == '@' {\n\t\t\ti, err := strconv.Atoi(tagOrIndex[1:])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid source index %s: %w\", tagOrIndex, err)\n\t\t\t}\n\t\t\tif i < 0 {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid source index @%d: must not be negative\", i)\n\t\t\t}\n\t\t\tsourceIndex = i\n\t\t} else {\n\t\t\tref, err := reference.ParseNormalizedNamed(tagOrIndex)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"docker-archive parsing reference: %w\", err)\n\t\t\t}\n\t\t\tref = reference.TagNameOnly(ref)\n\t\t\trefTagged, isTagged := ref.(reference.NamedTagged)\n\t\t\tif !isTagged { // If ref contains a digest, TagNameOnly does not change it\n\t\t\t\treturn nil, fmt.Errorf(\"reference does not include a tag: %s\", ref.String())\n\t\t\t}\n\t\t\tnt = refTagged\n\t\t}\n\t}\n\n\treturn newReference(path, nt, sourceIndex, nil, nil)\n}\n\n// NewReference returns a Docker archive reference for a path and an optional reference.\nfunc NewReference(path string, ref reference.NamedTagged) (types.ImageReference, error) {\n\treturn newReference(path, ref, -1, nil, nil)\n}\n\n// NewIndexReference returns a Docker archive reference for a path and a zero-based source manifest index.\nfunc NewIndexReference(path string, sourceIndex int) (types.ImageReference, error) {\n\tif sourceIndex < 0 {\n\t\treturn nil, fmt.Errorf(\"invalid call to NewIndexReference with negative index %d\", sourceIndex)\n\t}\n\treturn newReference(path, nil, sourceIndex, nil, nil)\n}\n\n// newReference returns a docker archive reference for a path, an optional reference or sourceIndex,\n// and optionally a tarfile.Reader and/or a tarfile.Writer matching path.\nfunc newReference(path string, ref reference.NamedTagged, sourceIndex int,\n\tarchiveReader *tarfile.Reader, writer *Writer,\n) (types.ImageReference, error) {\n\tif strings.Contains(path, \":\") {\n\t\treturn nil, fmt.Errorf(\"Invalid docker-archive: reference: colon in path %q is not supported\", path)\n\t}\n\tif ref != nil && sourceIndex != -1 {\n\t\treturn nil, fmt.Errorf(\"Invalid docker-archive: reference: cannot use both a tag and a source index\")\n\t}\n\tif _, isDigest := ref.(reference.Canonical); isDigest {\n\t\treturn nil, fmt.Errorf(\"docker-archive doesn't support digest references: %s\", ref.String())\n\t}\n\tif sourceIndex != -1 && sourceIndex < 0 {\n\t\treturn nil, fmt.Errorf(\"Invalid docker-archive: reference: index @%d must not be negative\", sourceIndex)\n\t}\n\treturn archiveReference{\n\t\tpath:          path,\n\t\tref:           ref,\n\t\tsourceIndex:   sourceIndex,\n\t\tarchiveReader: archiveReader,\n\t\twriter:        writer,\n\t}, nil\n}\n\nfunc (ref archiveReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix.\nfunc (ref archiveReference) StringWithinTransport() string {\n\tswitch {\n\tcase ref.ref != nil:\n\t\treturn fmt.Sprintf(\"%s:%s\", ref.path, ref.ref.String())\n\tcase ref.sourceIndex != -1:\n\t\treturn fmt.Sprintf(\"%s:@%d\", ref.path, ref.sourceIndex)\n\tdefault:\n\t\treturn ref.path\n\t}\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref archiveReference) DockerReference() reference.Named {\n\treturn ref.ref\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref archiveReference) PolicyConfigurationIdentity() string {\n\t// Punt, the justification is similar to dockerReference.PolicyConfigurationIdentity.\n\treturn \"\"\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref archiveReference) PolicyConfigurationNamespaces() []string {\n\t// TODO\n\treturn []string{}\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref archiveReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn ctrImage.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref archiveReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref archiveReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref archiveReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\t// Not really supported, for safety reasons.\n\treturn errors.New(\"Deleting images not implemented for docker-archive: images\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/archive/writer.go",
    "content": "package archive\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Writer manages a single in-progress Docker archive and allows adding images to it.\ntype Writer struct {\n\tpath        string // The original, user-specified path; not the maintained temporary file, if any\n\tregularFile bool   // path refers to a regular file (e.g. not a pipe)\n\tarchive     *tarfile.Writer\n\twriter      io.Closer\n\n\t// The following state can only be accessed with the mutex held.\n\tmutex     sync.Mutex\n\thadCommit bool // At least one successful commit has happened\n}\n\n// NewWriter returns a Writer for path.\n// The caller should call .Close() on the returned object.\nfunc NewWriter(sys *types.SystemContext, path string) (*Writer, error) {\n\t// path can be either a pipe or a regular file\n\t// in the case of a pipe, we require that we can open it for write\n\t// in the case of a regular file, we don't want to overwrite any pre-existing file\n\t// so we check for Size() == 0 below (This is racy, but using O_EXCL would also be racy,\n\t// only in a different way. Either way, it’s up to the user to not have two writers to the same path.)\n\tfh, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0o644)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"opening file %q: %w\", path, err)\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tfh.Close()\n\t\t}\n\t}()\n\n\tfhStat, err := fh.Stat()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"statting file %q: %w\", path, err)\n\t}\n\tregularFile := fhStat.Mode().IsRegular()\n\tif regularFile && fhStat.Size() != 0 {\n\t\treturn nil, errors.New(\"docker-archive doesn't support modifying existing images\")\n\t}\n\n\tarchive := tarfile.NewWriter(fh)\n\n\tsucceeded = true\n\treturn &Writer{\n\t\tpath:        path,\n\t\tregularFile: regularFile,\n\t\tarchive:     archive,\n\t\twriter:      fh,\n\t\thadCommit:   false,\n\t}, nil\n}\n\n// imageCommitted notifies the Writer that at least one image was successfully committed to the stream.\nfunc (w *Writer) imageCommitted() {\n\tw.mutex.Lock()\n\tdefer w.mutex.Unlock()\n\tw.hadCommit = true\n}\n\n// Close writes all outstanding data about images to the archive, and\n// releases state associated with the Writer, if any.\n// No more images can be added after this is called.\nfunc (w *Writer) Close() error {\n\terr := w.archive.Close()\n\tif err2 := w.writer.Close(); err2 != nil && err == nil {\n\t\terr = err2\n\t}\n\tif err == nil && w.regularFile && !w.hadCommit {\n\t\t// Writing to the destination never had a success; delete the destination if we created it.\n\t\t// This is done primarily because we don’t implement adding another image to a pre-existing image, so if we\n\t\t// left a partial archive around (notably because reading from the _source_ has failed), we couldn’t retry without\n\t\t// the caller manually deleting the partial archive. So, delete it instead.\n\t\t//\n\t\t// Archives with at least one successfully created image are left around; they might still be valuable.\n\t\t//\n\t\t// Note a corner case: If there _originally_ was an empty file (which is not a valid archive anyway), this deletes it.\n\t\t// Ideally, if w.regularFile, we should write the full contents to a temporary file and use os.Rename here, only on success.\n\t\tif err2 := os.Remove(w.path); err2 != nil {\n\t\t\terr = err2\n\t\t}\n\t}\n\treturn err\n}\n\n// NewReference returns an ImageReference that allows adding an image to Writer,\n// with an optional reference.\nfunc (w *Writer) NewReference(destinationRef reference.NamedTagged) (types.ImageReference, error) {\n\treturn newReference(w.path, destinationRef, -1, nil, w)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/body_reader.go",
    "content": "package docker\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"math/rand/v2\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\nconst (\n\t// bodyReaderMinimumProgress is the minimum progress we consider a good reason to retry\n\tbodyReaderMinimumProgress = 1 * 1024 * 1024\n\t// bodyReaderMSSinceLastRetry is the minimum time since a last retry we consider a good reason to retry\n\tbodyReaderMSSinceLastRetry = 60 * 1_000\n)\n\n// bodyReader is an io.ReadCloser returned by dockerImageSource.GetBlob,\n// which can transparently resume some (very limited) kinds of aborted connections.\ntype bodyReader struct {\n\tctx                 context.Context\n\tc                   *dockerClient\n\tpath                string   // path to pass to makeRequest to retry\n\tlogURL              *url.URL // a string to use in error messages\n\tfirstConnectionTime time.Time\n\n\tbody            io.ReadCloser // The currently open connection we use to read data, or nil if there is nothing to read from / close.\n\tlastRetryOffset int64         // -1 if N/A\n\tlastRetryTime   time.Time     // IsZero() if N/A\n\toffset          int64         // Current offset within the blob\n\tlastSuccessTime time.Time     // IsZero() if N/A\n}\n\n// newBodyReader creates a bodyReader for request path in c.\n// firstBody is an already correctly opened body for the blob, returning the full blob from the start.\n// If reading from firstBody fails, bodyReader may heuristically decide to resume.\nfunc newBodyReader(ctx context.Context, c *dockerClient, path string, firstBody io.ReadCloser) (io.ReadCloser, error) {\n\tlogURL, err := c.resolveRequestURL(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := &bodyReader{\n\t\tctx:                 ctx,\n\t\tc:                   c,\n\t\tpath:                path,\n\t\tlogURL:              logURL,\n\t\tfirstConnectionTime: time.Now(),\n\n\t\tbody:            firstBody,\n\t\tlastRetryOffset: -1,\n\t\tlastRetryTime:   time.Time{},\n\t\toffset:          0,\n\t\tlastSuccessTime: time.Time{},\n\t}\n\treturn res, nil\n}\n\n// parseDecimalInString ensures that s[start:] starts with a non-negative decimal number, and returns that number and the offset after the number.\nfunc parseDecimalInString(s string, start int) (int64, int, error) {\n\ti := start\n\tfor i < len(s) && s[i] >= '0' && s[i] <= '9' {\n\t\ti++\n\t}\n\tif i == start {\n\t\treturn -1, -1, errors.New(\"missing decimal number\")\n\t}\n\tv, err := strconv.ParseInt(s[start:i], 10, 64)\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"parsing number: %w\", err)\n\t}\n\treturn v, i, nil\n}\n\n// parseExpectedChar ensures that s[pos] is the expected byte, and returns the offset after it.\nfunc parseExpectedChar(s string, pos int, expected byte) (int, error) {\n\tif pos == len(s) || s[pos] != expected {\n\t\treturn -1, fmt.Errorf(\"missing expected %q\", expected)\n\t}\n\treturn pos + 1, nil\n}\n\n// parseContentRange ensures that res contains a Content-Range header with a byte range, and returns (first, last, completeLength) on success. Size can be -1.\nfunc parseContentRange(res *http.Response) (int64, int64, int64, error) {\n\thdrs := res.Header.Values(\"Content-Range\")\n\tswitch len(hdrs) {\n\tcase 0:\n\t\treturn -1, -1, -1, errors.New(\"missing Content-Range: header\")\n\tcase 1:\n\t\tbreak\n\tdefault:\n\t\treturn -1, -1, -1, fmt.Errorf(\"ambiguous Content-Range:, %d header values\", len(hdrs))\n\t}\n\thdr := hdrs[0]\n\texpectedPrefix := \"bytes \"\n\tif !strings.HasPrefix(hdr, expectedPrefix) {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q, missing prefix %q\", hdr, expectedPrefix)\n\t}\n\tfirst, pos, err := parseDecimalInString(hdr, len(expectedPrefix))\n\tif err != nil {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q, parsing first-pos: %w\", hdr, err)\n\t}\n\tpos, err = parseExpectedChar(hdr, pos, '-')\n\tif err != nil {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q: %w\", hdr, err)\n\t}\n\tlast, pos, err := parseDecimalInString(hdr, pos)\n\tif err != nil {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q, parsing last-pos: %w\", hdr, err)\n\t}\n\tpos, err = parseExpectedChar(hdr, pos, '/')\n\tif err != nil {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q: %w\", hdr, err)\n\t}\n\tcompleteLength := int64(-1)\n\tif pos < len(hdr) && hdr[pos] == '*' {\n\t\tpos++\n\t} else {\n\t\tcompleteLength, pos, err = parseDecimalInString(hdr, pos)\n\t\tif err != nil {\n\t\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q, parsing complete-length: %w\", hdr, err)\n\t\t}\n\t}\n\tif pos < len(hdr) {\n\t\treturn -1, -1, -1, fmt.Errorf(\"invalid Content-Range: %q, unexpected trailing content\", hdr)\n\t}\n\treturn first, last, completeLength, nil\n}\n\n// Read implements io.ReadCloser\nfunc (br *bodyReader) Read(p []byte) (int, error) {\n\tif br.body == nil {\n\t\treturn 0, fmt.Errorf(\"internal error: bodyReader.Read called on a closed object for %s\", br.logURL.Redacted())\n\t}\n\tn, err := br.body.Read(p)\n\tbr.offset += int64(n)\n\tswitch {\n\tcase err == nil || err == io.EOF:\n\t\tbr.lastSuccessTime = time.Now()\n\t\treturn n, err // Unlike the default: case, don’t log anything.\n\n\tcase errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, syscall.ECONNRESET):\n\t\toriginalErr := err\n\t\tredactedURL := br.logURL.Redacted()\n\t\tif err := br.errorIfNotReconnecting(originalErr, redactedURL); err != nil {\n\t\t\treturn n, err\n\t\t}\n\n\t\tif err := br.body.Close(); err != nil {\n\t\t\tlogrus.Debugf(\"Error closing blob body: %v\", err) // … and ignore err otherwise\n\t\t}\n\t\tbr.body = nil\n\t\ttime.Sleep(1*time.Second + rand.N(100_000*time.Microsecond)) // Some jitter so that a failure blip doesn’t cause a deterministic stampede\n\n\t\theaders := map[string][]string{\n\t\t\t\"Range\": {fmt.Sprintf(\"bytes=%d-\", br.offset)},\n\t\t}\n\t\tres, err := br.c.makeRequest(br.ctx, http.MethodGet, br.path, headers, nil, v2Auth, nil)\n\t\tif err != nil {\n\t\t\treturn n, fmt.Errorf(\"%w (while reconnecting: %v)\", originalErr, err)\n\t\t}\n\t\tconsumedBody := false\n\t\tdefer func() {\n\t\t\tif !consumedBody {\n\t\t\t\tres.Body.Close()\n\t\t\t}\n\t\t}()\n\t\tswitch res.StatusCode {\n\t\tcase http.StatusPartialContent: // OK\n\t\t\t// A client MUST inspect a 206 response's Content-Type and Content-Range field(s) to determine what parts are enclosed and whether additional requests are needed.\n\t\t\t// The recipient of an invalid Content-Range MUST NOT attempt to recombine the received content with a stored representation.\n\t\t\tfirst, last, completeLength, err := parseContentRange(res)\n\t\t\tif err != nil {\n\t\t\t\treturn n, fmt.Errorf(\"%w (after reconnecting, invalid Content-Range header: %v)\", originalErr, err)\n\t\t\t}\n\t\t\t// We don’t handle responses that start at an unrequested offset, nor responses that terminate before the end of the full blob.\n\t\t\tif first != br.offset || (completeLength != -1 && last+1 != completeLength) {\n\t\t\t\treturn n, fmt.Errorf(\"%w (after reconnecting at offset %d, got unexpected Content-Range %d-%d/%d)\", originalErr, br.offset, first, last, completeLength)\n\t\t\t}\n\t\t\t// Continue below\n\t\tcase http.StatusOK:\n\t\t\treturn n, fmt.Errorf(\"%w (after reconnecting, server did not process a Range: header, status %d)\", originalErr, http.StatusOK)\n\t\tdefault:\n\t\t\terr := registryHTTPResponseToError(res)\n\t\t\treturn n, fmt.Errorf(\"%w (after reconnecting, fetching blob: %v)\", originalErr, err)\n\t\t}\n\n\t\tlogrus.Debugf(\"Successfully reconnected to %s\", redactedURL)\n\t\tconsumedBody = true\n\t\tbr.body = res.Body\n\t\tbr.lastRetryOffset = br.offset\n\t\tbr.lastRetryTime = time.Now()\n\t\treturn n, nil\n\n\tdefault:\n\t\tlogrus.Debugf(\"Error reading blob body from %s: %#v\", br.logURL.Redacted(), err)\n\t\treturn n, err\n\t}\n}\n\n// millisecondsSinceOptional is like currentTime.Sub(tm).Milliseconds, but it returns a floating-point value.\n// If tm.IsZero(), it returns math.NaN()\nfunc millisecondsSinceOptional(currentTime time.Time, tm time.Time) float64 {\n\tif tm.IsZero() {\n\t\treturn math.NaN()\n\t}\n\treturn float64(currentTime.Sub(tm).Nanoseconds()) / 1_000_000.0\n}\n\n// errorIfNotReconnecting makes a heuristic decision whether we should reconnect after err at redactedURL; if so, it returns nil,\n// otherwise it returns an appropriate error to return to the caller (possibly augmented with data about the heuristic)\nfunc (br *bodyReader) errorIfNotReconnecting(originalErr error, redactedURL string) error {\n\tcurrentTime := time.Now()\n\tmsSinceFirstConnection := millisecondsSinceOptional(currentTime, br.firstConnectionTime)\n\tmsSinceLastRetry := millisecondsSinceOptional(currentTime, br.lastRetryTime)\n\tmsSinceLastSuccess := millisecondsSinceOptional(currentTime, br.lastSuccessTime)\n\tlogrus.Debugf(\"Reading blob body from %s failed (%#v), decision inputs: total %d @%.3f ms, last retry %d @%.3f ms, last progress @%.3f ms\",\n\t\tredactedURL, originalErr, br.offset, msSinceFirstConnection, br.lastRetryOffset, msSinceLastRetry, msSinceLastSuccess)\n\tprogress := br.offset - br.lastRetryOffset\n\tif progress >= bodyReaderMinimumProgress {\n\t\tlogrus.Infof(\"Reading blob body from %s failed (%v), reconnecting after %d bytes…\", redactedURL, originalErr, progress)\n\t\treturn nil\n\t}\n\tif br.lastRetryTime.IsZero() {\n\t\tlogrus.Infof(\"Reading blob body from %s failed (%v), reconnecting (first reconnection)…\", redactedURL, originalErr)\n\t\treturn nil\n\t}\n\tif msSinceLastRetry >= bodyReaderMSSinceLastRetry {\n\t\tlogrus.Infof(\"Reading blob body from %s failed (%v), reconnecting after %.3f ms…\", redactedURL, originalErr, msSinceLastRetry)\n\t\treturn nil\n\t}\n\tlogrus.Debugf(\"Not reconnecting to %s: insufficient progress %d / time since last retry %.3f ms\", redactedURL, progress, msSinceLastRetry)\n\treturn fmt.Errorf(\"(heuristic tuning data: total %d @%.3f ms, last retry %d @%.3f ms, last progress @ %.3f ms): %w\",\n\t\tbr.offset, msSinceFirstConnection, br.lastRetryOffset, msSinceLastRetry, msSinceLastSuccess, originalErr)\n}\n\n// Close implements io.ReadCloser\nfunc (br *bodyReader) Close() error {\n\tif br.body == nil {\n\t\treturn nil\n\t}\n\terr := br.body.Close()\n\tbr.body = nil\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/cache.go",
    "content": "package docker\n\nimport (\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// bicTransportScope returns a BICTransportScope appropriate for ref.\nfunc bicTransportScope(ref dockerReference) types.BICTransportScope {\n\t// Blobs can be reused across the whole registry.\n\treturn types.BICTransportScope{Opaque: reference.Domain(ref.ref)}\n}\n\n// newBICLocationReference returns a BICLocationReference appropriate for ref.\nfunc newBICLocationReference(ref dockerReference) types.BICLocationReference {\n\t// Blobs are scoped to repositories (the tag/digest are not necessary to reuse a blob).\n\treturn types.BICLocationReference{Opaque: ref.ref.Name()}\n}\n\n// parseBICLocationReference returns a repository for encoded lr.\nfunc parseBICLocationReference(lr types.BICLocationReference) (reference.Named, error) {\n\treturn reference.ParseNormalizedNamed(lr.Opaque)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/daemon/client.go",
    "content": "package daemon\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/docker/go-connections/tlsconfig\"\n\tdockerclient \"github.com/moby/moby/client\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// NewDockerClient initializes a new API client based on the passed SystemContext.\nfunc newDockerClient(sys *types.SystemContext) (*dockerclient.Client, error) {\n\thost := dockerclient.DefaultDockerHost\n\tif sys != nil && sys.DockerDaemonHost != \"\" {\n\t\thost = sys.DockerDaemonHost\n\t}\n\n\topts := []dockerclient.Opt{\n\t\tdockerclient.WithHost(host),\n\t}\n\n\t// We conditionalize building the TLS configuration only to TLS sockets:\n\t//\n\t// The dockerclient.Client implementation differentiates between\n\t// - Client.proto, which is ~how the connection is establishe (IP / AF_UNIX/Windows)\n\t// - Client.scheme, which is what is sent over the connection (HTTP with/without TLS).\n\t//\n\t// Only Client.proto is set from the URL in dockerclient.WithHost(),\n\t// Client.scheme is detected based on a http.Client.TLSClientConfig presence;\n\t// dockerclient.WithHTTPClient with a client that has TLSClientConfig set\n\t// will, by default, trigger an attempt to use TLS.\n\t//\n\t// So, don’t use WithHTTPClient for unix:// sockets at all.\n\t//\n\t// Similarly, if we want to communicate over plain HTTP on a TCP socket (http://),\n\t// we also should not set TLSClientConfig.  We continue to use WithHTTPClient\n\t// with our slightly non-default settings to avoid a behavior change on updates of c/image.\n\t//\n\t// Alternatively we could use dockerclient.WithScheme to drive the TLS/non-TLS logic\n\t// explicitly, but we would still want to set WithHTTPClient (differently) for https:// and http:// ;\n\t// so that would not be any simpler.\n\tserverURL, err := dockerclient.ParseHostURL(host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tswitch serverURL.Scheme {\n\tcase \"unix\": // Nothing\n\tcase \"npipe\": // Nothing\n\tcase \"http\":\n\t\thc := httpConfig()\n\t\topts = append(opts, dockerclient.WithHTTPClient(hc))\n\tdefault:\n\t\thc, err := tlsConfig(sys)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\topts = append(opts, dockerclient.WithHTTPClient(hc))\n\t}\n\n\treturn dockerclient.New(opts...)\n}\n\nfunc tlsConfig(sys *types.SystemContext) (*http.Client, error) {\n\t// This is intended to follow github.com/moby/moby/client.defaultHTTPClient\n\t// and approximately github.com/moby/moby/client.WithTLSClientConfigFromEnv;\n\t// we can’t use WithTLSClientConfig because 1) it uses ExclusiveRootPools:true,\n\t// and 2) there is no clean way to override the crypto choices of tlsconfig.Client.\n\t// So, we need to load the certs and keys ourselves in the BaseTLSConfig case\n\t// anyway, we might just as well do it in the other case as well.\n\n\tvar tlsConfig *tls.Config\n\tif sys != nil && sys.BaseTLSConfig != nil {\n\t\ttlsConfig = sys.BaseTLSConfig.Clone()\n\t} else {\n\t\ttlsConfig = &tls.Config{\n\t\t\t// As of 2025-08, tlsconfig.ClientDefault() differs from Go 1.23 defaults only in CipherSuites;\n\t\t\t// so, limit us to only using that value. If go-connections/tlsconfig changes its policy, we\n\t\t\t// will want to consider that and make a decision whether to follow suit.\n\t\t\t// There is some chance that eventually the Go default will be to require TLS 1.3, and that point\n\t\t\t// we might want to drop the dependency on go-connections entirely.\n\t\t\tCipherSuites: tlsconfig.ClientDefault().CipherSuites,\n\t\t}\n\t}\n\n\tif sys != nil {\n\t\tif sys.DockerDaemonInsecureSkipTLSVerify {\n\t\t\ttlsConfig.InsecureSkipVerify = true\n\t\t} else if sys.DockerDaemonCertPath != \"\" {\n\t\t\tcaFilePath := filepath.Join(sys.DockerDaemonCertPath, \"ca.pem\")\n\t\t\tcaData, err := os.ReadFile(caFilePath)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"reading CA file %q: %w\", caFilePath, err)\n\t\t\t}\n\t\t\tcaPool, err := x509.SystemCertPool()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"reading systemwide CAs: %w\", err)\n\t\t\t}\n\t\t\tif !caPool.AppendCertsFromPEM(caData) {\n\t\t\t\treturn nil, fmt.Errorf(\"no certificate found in %q\", caFilePath)\n\t\t\t}\n\t\t\ttlsConfig.RootCAs = caPool\n\t\t}\n\n\t\tif sys.DockerDaemonCertPath != \"\" {\n\t\t\tcert, err := tls.LoadX509KeyPair(\n\t\t\t\tfilepath.Join(sys.DockerDaemonCertPath, \"cert.pem\"),\n\t\t\t\tfilepath.Join(sys.DockerDaemonCertPath, \"key.pem\"))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"loading X509 key pair: %w\", err)\n\t\t\t}\n\t\t\ttlsConfig.Certificates = []tls.Certificate{cert}\n\t\t}\n\t}\n\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tProxy:           http.ProxyFromEnvironment,\n\t\t\tTLSClientConfig: tlsConfig,\n\t\t\t// In general we want to follow github.com/moby/moby/client.defaultHTTPClient , as long as it doesn’t affect compatibility.\n\t\t\t// These idle connection limits really only apply to long-running clients, which is not our case here;\n\t\t\t// we include the same values purely for symmetry.\n\t\t\tMaxIdleConns:    6,\n\t\t\tIdleConnTimeout: 30 * time.Second,\n\t\t},\n\t\tCheckRedirect: dockerclient.CheckRedirect,\n\t}, nil\n}\n\nfunc httpConfig() *http.Client {\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tProxy:           http.ProxyFromEnvironment,\n\t\t\tTLSClientConfig: nil,\n\t\t\t// In general we want to follow github.com/moby/moby/client.defaultHTTPClient , as long as it doesn’t affect compatibility.\n\t\t\t// These idle connection limits really only apply to long-running clients, which is not our case here;\n\t\t\t// we include the same values purely for symmetry.\n\t\t\tMaxIdleConns:    6,\n\t\t\tIdleConnTimeout: 30 * time.Second,\n\t\t},\n\t\tCheckRedirect: dockerclient.CheckRedirect,\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/daemon/daemon_dest.go",
    "content": "package daemon\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/moby/moby/client\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype daemonImageDestination struct {\n\tref                  daemonReference\n\tmustMatchRuntimeOS   bool\n\t*tarfile.Destination // Implements most of types.ImageDestination\n\tarchive              *tarfile.Writer\n\t// For talking to imageLoadGoroutine\n\tgoroutineCancel context.CancelFunc\n\tstatusChannel   <-chan error\n\twriter          *io.PipeWriter\n\t// Other state\n\tcommitted bool // writer has been closed\n}\n\n// newImageDestination returns a types.ImageDestination for the specified image reference.\nfunc newImageDestination(ctx context.Context, sys *types.SystemContext, ref daemonReference) (private.ImageDestination, error) {\n\tif ref.ref == nil {\n\t\treturn nil, fmt.Errorf(\"Invalid destination docker-daemon:%s: a destination must be a name:tag\", ref.StringWithinTransport())\n\t}\n\tnamedTaggedRef, ok := ref.ref.(reference.NamedTagged)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"Invalid destination docker-daemon:%s: a destination must be a name:tag\", ref.StringWithinTransport())\n\t}\n\n\tmustMatchRuntimeOS := sys == nil || sys.DockerDaemonHost == client.DefaultDockerHost\n\n\tc, err := newDockerClient(sys)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing docker engine client: %w\", err)\n\t}\n\n\treader, writer := io.Pipe()\n\tarchive := tarfile.NewWriter(writer)\n\t// Commit() may never be called, so we may never read from this channel; so, make this buffered to allow imageLoadGoroutine to write status and terminate even if we never read it.\n\tstatusChannel := make(chan error, 1)\n\n\tgoroutineContext, goroutineCancel := context.WithCancel(ctx)\n\tgo imageLoadGoroutine(goroutineContext, c, reader, statusChannel)\n\n\td := &daemonImageDestination{\n\t\tref:                ref,\n\t\tmustMatchRuntimeOS: mustMatchRuntimeOS,\n\t\tarchive:            archive,\n\t\tgoroutineCancel:    goroutineCancel,\n\t\tstatusChannel:      statusChannel,\n\t\twriter:             writer,\n\t\tcommitted:          false,\n\t}\n\td.Destination = tarfile.NewDestination(sys, archive, ref.Transport().Name(), namedTaggedRef, d.CommitWithOptions)\n\treturn d, nil\n}\n\n// imageLoadGoroutine accepts tar stream on reader, sends it to c, and reports error or success by writing to statusChannel\nfunc imageLoadGoroutine(ctx context.Context, c *client.Client, reader *io.PipeReader, statusChannel chan<- error) {\n\tdefer c.Close()\n\terr := errors.New(\"Internal error: unexpected panic in imageLoadGoroutine\")\n\tdefer func() {\n\t\tlogrus.Debugf(\"docker-daemon: sending done, status %v\", err)\n\t\tstatusChannel <- err\n\t}()\n\tdefer func() {\n\t\tif err == nil {\n\t\t\treader.Close()\n\t\t} else {\n\t\t\tif err := reader.CloseWithError(err); err != nil {\n\t\t\t\tlogrus.Debugf(\"imageLoadGoroutine: Error during reader.CloseWithError: %v\", err)\n\t\t\t}\n\t\t}\n\t}()\n\n\terr = imageLoad(ctx, c, reader)\n}\n\n// imageLoad accepts tar stream on reader and sends it to c\nfunc imageLoad(ctx context.Context, c *client.Client, reader *io.PipeReader) error {\n\tres, err := c.ImageLoad(ctx, reader, client.ImageLoadWithQuiet(true))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"starting a load operation in docker engine: %w\", err)\n\t}\n\tdefer res.Close()\n\n\t// jsonError and jsonMessage are small subsets of docker/docker/pkg/jsonmessage.JSONError and JSONMessage,\n\t// copied here to minimize dependencies.\n\ttype jsonError struct {\n\t\tMessage string `json:\"message,omitempty\"`\n\t}\n\ttype jsonMessage struct {\n\t\tError *jsonError `json:\"errorDetail,omitempty\"`\n\t}\n\n\tdec := json.NewDecoder(res)\n\tfor {\n\t\tvar msg jsonMessage\n\t\tif err := dec.Decode(&msg); err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"parsing docker load progress: %w\", err)\n\t\t}\n\t\tif msg.Error != nil {\n\t\t\treturn fmt.Errorf(\"docker engine reported: %q\", msg.Error.Message)\n\t\t}\n\t}\n\treturn nil // No error reported = success\n}\n\n// DesiredLayerCompression indicates if layers must be compressed, decompressed or preserved\nfunc (d *daemonImageDestination) DesiredLayerCompression() types.LayerCompression {\n\treturn types.PreserveOriginal\n}\n\n// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime architecture and OS. False otherwise.\nfunc (d *daemonImageDestination) MustMatchRuntimeOS() bool {\n\treturn d.mustMatchRuntimeOS\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *daemonImageDestination) Close() error {\n\tif !d.committed {\n\t\tlogrus.Debugf(\"docker-daemon: Closing tar stream to abort loading\")\n\t\t// In principle, goroutineCancel() should abort the HTTP request and stop the process from continuing.\n\t\t// In practice, though, various HTTP implementations used by client.Client.ImageLoad() (including\n\t\t// https://github.com/golang/net/blob/master/context/ctxhttp/ctxhttp_pre17.go and the\n\t\t// net/http version with native Context support in Go 1.7) do not always actually immediately cancel\n\t\t// the operation: they may process the HTTP request, or a part of it, to completion in a goroutine, and\n\t\t// return early if the context is canceled without terminating the goroutine at all.\n\t\t// So we need this CloseWithError to terminate sending the HTTP request Body\n\t\t// immediately, and hopefully, through terminating the sending which uses \"Transfer-Encoding: chunked\"\" without sending\n\t\t// the terminating zero-length chunk, prevent the docker daemon from processing the tar stream at all.\n\t\t// Whether that works or not, closing the PipeWriter seems desirable in any case.\n\t\tif err := d.writer.CloseWithError(errors.New(\"Aborting upload, daemonImageDestination closed without a previous .CommitWithOptions()\")); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\td.goroutineCancel()\n\n\treturn nil\n}\n\nfunc (d *daemonImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *daemonImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\tlogrus.Debugf(\"docker-daemon: Closing tar stream\")\n\tif err := d.archive.Close(); err != nil {\n\t\treturn err\n\t}\n\tif err := d.writer.Close(); err != nil {\n\t\treturn err\n\t}\n\td.committed = true // We may still fail, but we are done sending to imageLoadGoroutine.\n\n\tlogrus.Debugf(\"docker-daemon: Waiting for status\")\n\tselect {\n\tcase <-ctx.Done():\n\t\treturn ctx.Err()\n\tcase err := <-d.statusChannel:\n\t\treturn err\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/daemon/daemon_src.go",
    "content": "package daemon\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/docker/internal/tarfile\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype daemonImageSource struct {\n\tref             daemonReference\n\t*tarfile.Source // Implements most of types.ImageSource\n}\n\n// newImageSource returns a types.ImageSource for the specified image reference.\n// The caller must call .Close() on the returned ImageSource.\n//\n// It would be great if we were able to stream the input tar as it is being\n// sent; but Docker sends the top-level manifest, which determines which paths\n// to look for, at the end, so in we will need to seek back and re-read, several times.\n// (We could, perhaps, expect an exact sequence, assume that the first plaintext file\n// is the config, and that the following len(RootFS) files are the layers, but that feels\n// way too brittle.)\nfunc newImageSource(ctx context.Context, sys *types.SystemContext, ref daemonReference) (private.ImageSource, error) {\n\tc, err := newDockerClient(sys)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing docker engine client: %w\", err)\n\t}\n\tdefer c.Close()\n\n\t// Per NewReference(), ref.StringWithinTransport() is either an image ID (config digest), or a !reference.NameOnly() reference.\n\t// Either way ImageSave should create a tarball with exactly one image.\n\tinputStream, err := c.ImageSave(ctx, []string{ref.StringWithinTransport()})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading image from docker engine: %w\", err)\n\t}\n\tdefer inputStream.Close()\n\n\tarchive, err := tarfile.NewReaderFromStream(sys, inputStream)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsrc := tarfile.NewSource(archive, true, ref.Transport().Name(), nil, -1)\n\treturn &daemonImageSource{\n\t\tref:    ref,\n\t\tSource: src,\n\t}, nil\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (s *daemonImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/daemon/daemon_transport.go",
    "content": "package daemon\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/docker/policyconfiguration\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for images managed by a local Docker daemon.\nvar Transport = daemonTransport{}\n\ntype daemonTransport struct{}\n\n// Name returns the name of the transport, which must be unique among other transports.\nfunc (t daemonTransport) Name() string {\n\treturn \"docker-daemon\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t daemonTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t daemonTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// ID values cannot be effectively namespaced, and are clearly invalid host:port values.\n\tif _, err := digest.Parse(scope); err == nil {\n\t\treturn fmt.Errorf(`docker-daemon: can not use algo:digest value %s as a namespace`, scope)\n\t}\n\n\t// FIXME? We could be verifying the various character set and length restrictions\n\t// from docker/distribution/reference.regexp.go, but other than that there\n\t// are few semantically invalid strings.\n\treturn nil\n}\n\n// daemonReference is an ImageReference for images managed by a local Docker daemon\n// Exactly one of id and ref can be set.\n// For daemonImageSource, both id and ref are acceptable, ref must not be a NameOnly (interpreted as all tags in that repository by the daemon)\n// For daemonImageDestination, it must be a ref, which is NamedTagged.\n// (We could, in principle, also allow storing images without tagging them, and the user would have to refer to them using the docker image ID = config digest.\n// Using the config digest requires the caller to parse the manifest themselves, which is very cumbersome; so, for now, we don’t bother.)\ntype daemonReference struct {\n\tid  digest.Digest\n\tref reference.Named // !reference.IsNameOnly\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc ParseReference(refString string) (types.ImageReference, error) {\n\t// This is intended to be compatible with reference.ParseAnyReference, but more strict about refusing some of the ambiguous cases.\n\t// In particular, this rejects unprefixed digest values (64 hex chars), and sha256 digest prefixes (sha256:fewer-than-64-hex-chars).\n\n\t// digest:hexstring is structurally the same as a reponame:tag (meaning docker.io/library/reponame:tag).\n\t// reference.ParseAnyReference interprets such strings as digests.\n\tif dgst, err := digest.Parse(refString); err == nil {\n\t\t// The daemon explicitly refuses to tag images with a reponame equal to digest.Canonical - but _only_ this digest name.\n\t\t// Other digest references are ambiguous, so refuse them.\n\t\tif dgst.Algorithm() != digest.Canonical {\n\t\t\treturn nil, fmt.Errorf(\"Invalid docker-daemon: reference %s: only digest algorithm %s accepted\", refString, digest.Canonical)\n\t\t}\n\t\treturn NewReference(dgst, nil)\n\t}\n\n\tref, err := reference.ParseNormalizedNamed(refString) // This also rejects unprefixed digest values\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif reference.FamiliarName(ref) == digest.Canonical.String() {\n\t\treturn nil, fmt.Errorf(\"Invalid docker-daemon: reference %s: The %s repository name is reserved for (non-shortened) digest references\", refString, digest.Canonical)\n\t}\n\treturn NewReference(\"\", ref)\n}\n\n// NewReference returns a docker-daemon reference for either the supplied image ID (config digest) or the supplied reference (which must satisfy !reference.IsNameOnly)\nfunc NewReference(id digest.Digest, ref reference.Named) (types.ImageReference, error) {\n\tswitch {\n\tcase id != \"\" && ref != nil:\n\t\treturn nil, errors.New(\"docker-daemon: reference must not have an image ID and a reference string specified at the same time\")\n\tcase id == \"\" && ref == nil:\n\t\treturn nil, errors.New(\"docker-daemon: reference must have at least one of an image ID and a reference string\")\n\n\tcase ref != nil:\n\t\tif reference.IsNameOnly(ref) {\n\t\t\treturn nil, fmt.Errorf(\"docker-daemon: reference %s has neither a tag nor a digest\", reference.FamiliarString(ref))\n\t\t}\n\t\t// A github.com/distribution/reference value can have a tag and a digest at the same time!\n\t\t// Most versions of docker/reference do not handle that (ignoring the tag), so reject such input.\n\t\t// This MAY be accepted in the future.\n\t\t// (Even if it were supported, the semantics of policy namespaces are unclear - should we drop\n\t\t// the tag or the digest first?)\n\t\t_, isTagged := ref.(reference.NamedTagged)\n\t\t_, isDigested := ref.(reference.Canonical)\n\t\tif isTagged && isDigested {\n\t\t\treturn nil, fmt.Errorf(\"docker-daemon: references with both a tag and digest are currently not supported\")\n\t\t}\n\t}\n\treturn daemonReference{\n\t\tid:  id,\n\t\tref: ref,\n\t}, nil\n}\n\nfunc (ref daemonReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix;\n// instead, see transports.ImageName().\nfunc (ref daemonReference) StringWithinTransport() string {\n\tswitch {\n\tcase ref.id != \"\":\n\t\treturn ref.id.String()\n\tcase ref.ref != nil:\n\t\treturn reference.FamiliarString(ref.ref)\n\tdefault: // Coverage: Should never happen, NewReference above should refuse such values.\n\t\tpanic(\"Internal inconsistency: daemonReference has empty id and nil ref\")\n\t}\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref daemonReference) DockerReference() reference.Named {\n\treturn ref.ref // May be nil\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref daemonReference) PolicyConfigurationIdentity() string {\n\t// We must allow referring to images in the daemon by image ID, otherwise untagged images would not be accessible.\n\t// But the existence of image IDs means that we can’t truly well namespace the input:\n\t// a single image can be namespaced either using the name or the ID depending on how it is named.\n\t//\n\t// That’s fairly unexpected, but we have to cope somehow.\n\t//\n\t// So, use the ordinary docker/policyconfiguration namespacing for named images.\n\t// image IDs all fall into the root namespace.\n\t// Users can set up the root namespace to be either untrusted or rejected,\n\t// and to set up specific trust for named namespaces.  This allows verifying image\n\t// identity when a name is known, and unnamed images would be untrusted or rejected.\n\tswitch {\n\tcase ref.id != \"\":\n\t\treturn \"\" // This still allows using the default \"\" scope to define a global policy for ID-identified images.\n\tcase ref.ref != nil:\n\t\tres, err := policyconfiguration.DockerReferenceIdentity(ref.ref)\n\t\tif res == \"\" || err != nil { // Coverage: Should never happen, NewReference above should refuse values which could cause a failure.\n\t\t\tpanic(fmt.Sprintf(\"Internal inconsistency: policyconfiguration.DockerReferenceIdentity returned %#v, %v\", res, err))\n\t\t}\n\t\treturn res\n\tdefault: // Coverage: Should never happen, NewReference above should refuse such values.\n\t\tpanic(\"Internal inconsistency: daemonReference has empty id and nil ref\")\n\t}\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref daemonReference) PolicyConfigurationNamespaces() []string {\n\t// See the explanation in daemonReference.PolicyConfigurationIdentity.\n\tswitch {\n\tcase ref.id != \"\":\n\t\treturn []string{}\n\tcase ref.ref != nil:\n\t\treturn policyconfiguration.DockerReferenceNamespaces(ref.ref)\n\tdefault: // Coverage: Should never happen, NewReference above should refuse such values.\n\t\tpanic(\"Internal inconsistency: daemonReference has empty id and nil ref\")\n\t}\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref daemonReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref daemonReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(ctx, sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref daemonReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(ctx, sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref daemonReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\t// Should this just untag the image? Should this stop running containers?\n\t// The semantics is not quite as clear as for remote repositories.\n\t// The user can run (docker rmi) directly anyway, so, for now(?), punt instead of trying to guess what the user meant.\n\treturn errors.New(\"Deleting images not implemented for docker-daemon: images\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/distribution_error.go",
    "content": "// Code below is taken from https://github.com/distribution/distribution/blob/a4d9db5a884b70be0c96dd6a7a9dbef4f2798c51/registry/client/errors.go\n// Copyright 2022 github.com/distribution/distribution authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage docker\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"slices\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n)\n\n// errNoErrorsInBody is returned when an HTTP response body parses to an empty\n// errcode.Errors slice.\nvar errNoErrorsInBody = errors.New(\"no error details found in HTTP response body\")\n\n// UnexpectedHTTPStatusError is returned when an unexpected HTTP status is\n// returned when making a registry api call.\ntype UnexpectedHTTPStatusError struct {\n\t// StatusCode code as returned from the server, so callers can\n\t// match the exact code to make certain decisions if needed.\n\tStatusCode int\n\t// status text as displayed in the error message, not exposed as callers should match the number.\n\tstatus string\n}\n\nfunc (e UnexpectedHTTPStatusError) Error() string {\n\treturn fmt.Sprintf(\"received unexpected HTTP status: %s\", e.status)\n}\n\nfunc newUnexpectedHTTPStatusError(resp *http.Response) UnexpectedHTTPStatusError {\n\treturn UnexpectedHTTPStatusError{\n\t\tStatusCode: resp.StatusCode,\n\t\tstatus:     resp.Status,\n\t}\n}\n\n// unexpectedHTTPResponseError is returned when an expected HTTP status code\n// is returned, but the content was unexpected and failed to be parsed.\ntype unexpectedHTTPResponseError struct {\n\tParseErr   error\n\tStatusCode int\n\tResponse   []byte\n}\n\nfunc (e *unexpectedHTTPResponseError) Error() string {\n\treturn fmt.Sprintf(\"error parsing HTTP %d response body: %s: %q\", e.StatusCode, e.ParseErr.Error(), string(e.Response))\n}\n\nfunc parseHTTPErrorResponse(statusCode int, r io.Reader) error {\n\tvar errors errcode.Errors\n\tbody, err := io.ReadAll(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// For backward compatibility, handle irregularly formatted\n\t// messages that contain a \"details\" field.\n\tvar detailsErr struct {\n\t\tDetails string `json:\"details\"`\n\t}\n\terr = json.Unmarshal(body, &detailsErr)\n\tif err == nil && detailsErr.Details != \"\" {\n\t\tswitch statusCode {\n\t\tcase http.StatusUnauthorized:\n\t\t\treturn errcode.ErrorCodeUnauthorized.WithMessage(detailsErr.Details)\n\t\tcase http.StatusTooManyRequests:\n\t\t\treturn errcode.ErrorCodeTooManyRequests.WithMessage(detailsErr.Details)\n\t\tdefault:\n\t\t\treturn errcode.ErrorCodeUnknown.WithMessage(detailsErr.Details)\n\t\t}\n\t}\n\n\tif err := json.Unmarshal(body, &errors); err != nil {\n\t\treturn &unexpectedHTTPResponseError{\n\t\t\tParseErr:   err,\n\t\t\tStatusCode: statusCode,\n\t\t\tResponse:   body,\n\t\t}\n\t}\n\n\tif len(errors) == 0 {\n\t\t// If there was no error specified in the body, return\n\t\t// UnexpectedHTTPResponseError.\n\t\treturn &unexpectedHTTPResponseError{\n\t\t\tParseErr:   errNoErrorsInBody,\n\t\t\tStatusCode: statusCode,\n\t\t\tResponse:   body,\n\t\t}\n\t}\n\n\treturn errors\n}\n\nfunc makeErrorList(err error) []error {\n\tif errL, ok := err.(errcode.Errors); ok {\n\t\treturn []error(errL)\n\t}\n\treturn []error{err}\n}\n\nfunc mergeErrors(err1, err2 error) error {\n\treturn errcode.Errors(append(slices.Clone(makeErrorList(err1)), makeErrorList(err2)...))\n}\n\n// handleErrorResponse returns error parsed from HTTP response for an\n// unsuccessful HTTP response code (in the range 400 - 499 inclusive). An\n// UnexpectedHTTPStatusError returned for response code outside of expected\n// range.\nfunc handleErrorResponse(resp *http.Response) error {\n\tswitch {\n\tcase resp.StatusCode == http.StatusUnauthorized:\n\t\t// Check for OAuth errors within the `WWW-Authenticate` header first\n\t\t// See https://tools.ietf.org/html/rfc6750#section-3\n\t\tfor c := range iterateAuthHeader(resp.Header) {\n\t\t\tif c.Scheme == \"bearer\" {\n\t\t\t\tvar err errcode.Error\n\t\t\t\t// codes defined at https://tools.ietf.org/html/rfc6750#section-3.1\n\t\t\t\tswitch c.Parameters[\"error\"] {\n\t\t\t\tcase \"invalid_token\":\n\t\t\t\t\terr.Code = errcode.ErrorCodeUnauthorized\n\t\t\t\tcase \"insufficient_scope\":\n\t\t\t\t\terr.Code = errcode.ErrorCodeDenied\n\t\t\t\tdefault:\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif description := c.Parameters[\"error_description\"]; description != \"\" {\n\t\t\t\t\terr.Message = description\n\t\t\t\t} else {\n\t\t\t\t\terr.Message = err.Code.Message()\n\t\t\t\t}\n\n\t\t\t\treturn mergeErrors(err, parseHTTPErrorResponse(resp.StatusCode, resp.Body))\n\t\t\t}\n\t\t}\n\t\tfallthrough\n\tcase resp.StatusCode >= 400 && resp.StatusCode < 500:\n\t\terr := parseHTTPErrorResponse(resp.StatusCode, resp.Body)\n\t\tif uErr, ok := err.(*unexpectedHTTPResponseError); ok && resp.StatusCode == 401 {\n\t\t\treturn errcode.ErrorCodeUnauthorized.WithDetail(uErr.Response)\n\t\t}\n\t\treturn err\n\t}\n\treturn newUnexpectedHTTPStatusError(resp)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/docker_client.go",
    "content": "package docker\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\tv2 \"github.com/docker/distribution/registry/api/v2\"\n\t\"github.com/docker/go-connections/tlsconfig\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/internal/useragent\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/docker/config\"\n\t\"go.podman.io/image/v5/pkg/sysregistriesv2\"\n\t\"go.podman.io/image/v5/pkg/tlsclientconfig\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"golang.org/x/sync/semaphore\"\n)\n\nconst (\n\tdockerHostname   = \"docker.io\"\n\tdockerV1Hostname = \"index.docker.io\"\n\tdockerRegistry   = \"registry-1.docker.io\"\n\n\tresolvedPingV2URL       = \"%s://%s/v2/\"\n\ttagsPath                = \"/v2/%s/tags/list\"\n\tmanifestPath            = \"/v2/%s/manifests/%s\"\n\tblobsPath               = \"/v2/%s/blobs/%s\"\n\tblobUploadPath          = \"/v2/%s/blobs/uploads/\"\n\textensionsSignaturePath = \"/extensions/v2/%s/signatures/%s\"\n\n\tminimumTokenLifetimeSeconds = 60\n\n\textensionSignatureSchemaVersion = 2        // extensionSignature.Version\n\textensionSignatureTypeAtomic    = \"atomic\" // extensionSignature.Type\n\n\tbackoffNumIterations = 5\n\tbackoffInitialDelay  = 2 * time.Second\n\tbackoffMaxDelay      = 60 * time.Second\n)\n\ntype certPath struct {\n\tpath     string\n\tabsolute bool\n}\n\nvar (\n\thomeCertDir     = filepath.FromSlash(\".config/containers/certs.d\")\n\tperHostCertDirs = []certPath{\n\t\t{path: etcDir + \"/containers/certs.d\", absolute: true},\n\t\t{path: etcDir + \"/docker/certs.d\", absolute: true},\n\t}\n)\n\n// extensionSignature and extensionSignatureList come from github.com/openshift/origin/pkg/dockerregistry/server/signaturedispatcher.go:\n// signature represents a Docker image signature.\ntype extensionSignature struct {\n\tVersion int    `json:\"schemaVersion\"` // Version specifies the schema version\n\tName    string `json:\"name\"`          // Name must be in \"sha256:<digest>@signatureName\" format\n\tType    string `json:\"type\"`          // Type is optional, of not set it will be defaulted to \"AtomicImageV1\"\n\tContent []byte `json:\"content\"`       // Content contains the signature\n}\n\n// signatureList represents list of Docker image signatures.\ntype extensionSignatureList struct {\n\tSignatures []extensionSignature `json:\"signatures\"`\n}\n\n// bearerToken records a cached token we can use to authenticate, or a pending process to obtain one.\n//\n// The goroutine obtaining the token holds lock to block concurrent token requests, and fills the structure (err and possibly the other fields)\n// before releasing the lock.\n// Other goroutines obtain lock to block on the token request, if any; and then inspect err to see if the token is usable.\n// If it is not, they try to get a new one.\ntype bearerToken struct {\n\t// lock is held while obtaining the token. Potentially nested inside dockerClient.tokenCacheLock.\n\t// This is a counting semaphore only because we need a cancellable lock operation.\n\tlock *semaphore.Weighted\n\n\t// The following fields can only be accessed with lock held.\n\terr            error // nil if the token was successfully obtained (but may be expired); an error if the next lock holder _must_ obtain a new token.\n\ttoken          string\n\texpirationTime time.Time\n}\n\n// dockerClient is configuration for dealing with a single container registry.\ntype dockerClient struct {\n\t// The following members are set by newDockerClient and do not change afterwards.\n\tsys       *types.SystemContext\n\tregistry  string\n\tuserAgent string\n\n\t// tlsClientConfig is setup by newDockerClient and will be used and updated\n\t// by detectProperties(). Callers can edit tlsClientConfig.InsecureSkipVerify in the meantime.\n\ttlsClientConfig *tls.Config\n\t// The following members are not set by newDockerClient and must be set by callers if needed.\n\tauth                   types.DockerAuthConfig\n\tregistryToken          string\n\tsignatureBase          lookasideStorageBase\n\tuseSigstoreAttachments bool\n\tscope                  authScope\n\n\t// The following members are detected registry properties:\n\t// They are set after a successful detectProperties(), and never change afterwards.\n\tclient             *http.Client\n\tscheme             string\n\tchallenges         []challenge\n\tsupportsSignatures bool\n\n\t// Private state for setupRequestAuth\n\ttokenCacheLock sync.Mutex // Protects tokenCache.\n\ttokenCache     map[string]*bearerToken\n\t// Private state for detectProperties:\n\tdetectPropertiesOnce  sync.Once // detectPropertiesOnce is used to execute detectProperties() at most once.\n\tdetectPropertiesError error     // detectPropertiesError caches the initial error.\n\t// Private state for logResponseWarnings\n\treportedWarningsLock sync.Mutex\n\treportedWarnings     *set.Set[string]\n}\n\ntype authScope struct {\n\tresourceType string\n\tremoteName   string\n\tactions      string\n}\n\n// sendAuth determines whether we need authentication for v2 or v1 endpoint.\ntype sendAuth int\n\nconst (\n\t// v2 endpoint with authentication.\n\tv2Auth sendAuth = iota\n\t// v1 endpoint with authentication.\n\t// TODO: Get v1Auth working\n\t// v1Auth\n\t// no authentication, works for both v1 and v2.\n\tnoAuth\n)\n\n// dockerCertDir returns a path to a directory to be consumed by tlsclientconfig.SetupCertificates() depending on ctx and hostPort.\nfunc dockerCertDir(sys *types.SystemContext, hostPort string) (string, error) {\n\tif sys != nil && sys.DockerCertPath != \"\" {\n\t\treturn sys.DockerCertPath, nil\n\t}\n\tif sys != nil && sys.DockerPerHostCertDirPath != \"\" {\n\t\treturn filepath.Join(sys.DockerPerHostCertDirPath, hostPort), nil\n\t}\n\n\tvar (\n\t\thostCertDir     string\n\t\tfullCertDirPath string\n\t)\n\n\tfor _, perHostCertDir := range append([]certPath{{path: filepath.Join(homedir.Get(), homeCertDir), absolute: false}}, perHostCertDirs...) {\n\t\tif sys != nil && sys.RootForImplicitAbsolutePaths != \"\" && perHostCertDir.absolute {\n\t\t\thostCertDir = filepath.Join(sys.RootForImplicitAbsolutePaths, perHostCertDir.path)\n\t\t} else {\n\t\t\thostCertDir = perHostCertDir.path\n\t\t}\n\n\t\tfullCertDirPath = filepath.Join(hostCertDir, hostPort)\n\t\terr := fileutils.Exists(fullCertDirPath)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif os.IsNotExist(err) {\n\t\t\tcontinue\n\t\t}\n\t\tif os.IsPermission(err) {\n\t\t\tlogrus.Debugf(\"error accessing certs directory due to permissions: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\treturn \"\", err\n\t}\n\treturn fullCertDirPath, nil\n}\n\n// newDockerClientFromRef returns a new dockerClient instance for refHostname (a host a specified in the Docker image reference, not canonicalized to dockerRegistry)\n// “write” specifies whether the client will be used for \"write\" access (in particular passed to lookaside.go:toplevelFromSection)\n// signatureBase is always set in the return value\n// The caller must call .Close() on the returned client when done.\nfunc newDockerClientFromRef(sys *types.SystemContext, ref dockerReference, registryConfig *registryConfiguration, write bool, actions string) (*dockerClient, error) {\n\tauth, err := config.GetCredentialsForRef(sys, ref.ref)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting username and password: %w\", err)\n\t}\n\n\tsigBase, err := registryConfig.lookasideStorageBaseURL(ref, write)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tregistry := reference.Domain(ref.ref)\n\tclient, err := newDockerClient(sys, registry, ref.ref.Name())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient.auth = auth\n\tif sys != nil {\n\t\tclient.registryToken = sys.DockerBearerRegistryToken\n\t}\n\tclient.signatureBase = sigBase\n\tclient.useSigstoreAttachments = registryConfig.useSigstoreAttachments(ref)\n\tclient.scope.resourceType = \"repository\"\n\tclient.scope.actions = actions\n\tclient.scope.remoteName = reference.Path(ref.ref)\n\treturn client, nil\n}\n\n// newDockerClient returns a new dockerClient instance for the given registry\n// and reference.  The reference is used to query the registry configuration\n// and can either be a registry (e.g, \"registry.com[:5000]\"), a repository\n// (e.g., \"registry.com[:5000][/some/namespace]/repo\").\n// Please note that newDockerClient does not set all members of dockerClient\n// (e.g., username and password); those must be set by callers if necessary.\n// The caller must call .Close() on the returned client when done.\nfunc newDockerClient(sys *types.SystemContext, registry, reference string) (*dockerClient, error) {\n\thostName := registry\n\tif registry == dockerHostname {\n\t\tregistry = dockerRegistry\n\t}\n\tvar tlsClientConfig *tls.Config\n\tif sys != nil && sys.BaseTLSConfig != nil {\n\t\ttlsClientConfig = sys.BaseTLSConfig.Clone()\n\t} else {\n\t\ttlsClientConfig = &tls.Config{\n\t\t\t// As of 2025-08, tlsconfig.ClientDefault() differs from Go 1.23 defaults only in CipherSuites;\n\t\t\t// so, limit us to only using that value. If go-connections/tlsconfig changes its policy, we\n\t\t\t// will want to consider that and make a decision whether to follow suit.\n\t\t\t// There is some chance that eventually the Go default will be to require TLS 1.3, and that point\n\t\t\t// we might want to drop the dependency on go-connections entirely.\n\t\t\tCipherSuites: tlsconfig.ClientDefault().CipherSuites,\n\t\t}\n\t}\n\n\t// It is undefined whether the host[:port] string for dockerHostname should be dockerHostname or dockerRegistry,\n\t// because docker/docker does not read the certs.d subdirectory at all in that case.  We use the user-visible\n\t// dockerHostname here, because it is more symmetrical to read the configuration in that case as well, and because\n\t// generally the UI hides the existence of the different dockerRegistry.  But note that this behavior is\n\t// undocumented and may change if docker/docker changes.\n\tcertDir, err := dockerCertDir(sys, hostName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := tlsclientconfig.SetupCertificates(certDir, tlsClientConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Check if TLS verification shall be skipped (default=false) which can\n\t// be specified in the sysregistriesv2 configuration.\n\tskipVerify := false\n\treg, err := sysregistriesv2.FindRegistry(sys, reference)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading registries: %w\", err)\n\t}\n\tif reg != nil {\n\t\tif reg.Blocked {\n\t\t\treturn nil, fmt.Errorf(\"registry %s is blocked in one of %s\", reg.Prefix, sysregistriesv2.ConfigurationSourceDescription(sys))\n\t\t}\n\t\tskipVerify = reg.Insecure\n\t}\n\ttlsClientConfig.InsecureSkipVerify = skipVerify\n\n\tuserAgent := useragent.DefaultUserAgent\n\tif sys != nil && sys.DockerRegistryUserAgent != \"\" {\n\t\tuserAgent = sys.DockerRegistryUserAgent\n\t}\n\n\treturn &dockerClient{\n\t\tsys:              sys,\n\t\tregistry:         registry,\n\t\tuserAgent:        userAgent,\n\t\ttlsClientConfig:  tlsClientConfig,\n\t\ttokenCache:       map[string]*bearerToken{},\n\t\treportedWarnings: set.New[string](),\n\t}, nil\n}\n\n// CheckAuth validates the credentials by attempting to log into the registry\n// returns an error if an error occurred while making the http request or the status code received was 401\nfunc CheckAuth(ctx context.Context, sys *types.SystemContext, username, password, registry string) error {\n\tclient, err := newDockerClient(sys, registry, registry)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"creating new docker client: %w\", err)\n\t}\n\tdefer client.Close()\n\tclient.auth = types.DockerAuthConfig{\n\t\tUsername: username,\n\t\tPassword: password,\n\t}\n\n\tresp, err := client.makeRequest(ctx, http.MethodGet, \"/v2/\", nil, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK {\n\t\terr := registryHTTPResponseToError(resp)\n\t\tif resp.StatusCode == http.StatusUnauthorized {\n\t\t\terr = ErrUnauthorizedForCredentials{Err: err}\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// SearchResult holds the information of each matching image\n// It matches the output returned by the v1 endpoint\ntype SearchResult struct {\n\tName        string `json:\"name\"`\n\tDescription string `json:\"description\"`\n\t// StarCount states the number of stars the image has\n\tStarCount int  `json:\"star_count\"`\n\tIsTrusted bool `json:\"is_trusted\"`\n\t// IsAutomated states whether the image is an automated build\n\tIsAutomated bool `json:\"is_automated\"`\n\t// IsOfficial states whether the image is an official build\n\tIsOfficial bool `json:\"is_official\"`\n}\n\n// SearchRegistry queries a registry for images that contain \"image\" in their name\n// The limit is the max number of results desired\n// Note: The limit value doesn't work with all registries\n// for example registry.access.redhat.com returns all the results without limiting it to the limit value\nfunc SearchRegistry(ctx context.Context, sys *types.SystemContext, registry, image string, limit int) ([]SearchResult, error) {\n\ttype V2Results struct {\n\t\t// Repositories holds the results returned by the /v2/_catalog endpoint\n\t\tRepositories []string `json:\"repositories\"`\n\t}\n\ttype V1Results struct {\n\t\t// Results holds the results returned by the /v1/search endpoint\n\t\tResults []SearchResult `json:\"results\"`\n\t}\n\tv1Res := &V1Results{}\n\n\t// Get credentials from authfile for the underlying hostname\n\t// We can't use GetCredentialsForRef here because we want to search the whole registry.\n\tauth, err := config.GetCredentials(sys, registry)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting username and password: %w\", err)\n\t}\n\n\t// The /v2/_catalog endpoint has been disabled for docker.io therefore\n\t// the call made to that endpoint will fail.  So using the v1 hostname\n\t// for docker.io for simplicity of implementation and the fact that it\n\t// returns search results.\n\thostname := registry\n\tif registry == dockerHostname {\n\t\thostname = dockerV1Hostname\n\t\t// A search term of library/foo does not find the library/foo image on the docker.io servers,\n\t\t// which is surprising - and that Docker is modifying the search term client-side this same way,\n\t\t// and it seems convenient to do the same thing.\n\t\t// Read more here: https://github.com/containers/image/pull/2133#issue-1928524334\n\t\timage = strings.TrimPrefix(image, \"library/\")\n\t}\n\n\tclient, err := newDockerClient(sys, hostname, registry)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating new docker client: %w\", err)\n\t}\n\tdefer client.Close()\n\tclient.auth = auth\n\tif sys != nil {\n\t\tclient.registryToken = sys.DockerBearerRegistryToken\n\t}\n\n\t// Only try the v1 search endpoint if the search query is not empty. If it is\n\t// empty skip to the v2 endpoint.\n\tif image != \"\" {\n\t\t// set up the query values for the v1 endpoint\n\t\tu := url.URL{\n\t\t\tPath: \"/v1/search\",\n\t\t}\n\t\tq := u.Query()\n\t\tq.Set(\"q\", image)\n\t\tq.Set(\"n\", strconv.Itoa(limit))\n\t\tu.RawQuery = q.Encode()\n\n\t\tlogrus.Debugf(\"trying to talk to v1 search endpoint\")\n\t\tresp, err := client.makeRequest(ctx, http.MethodGet, u.String(), nil, nil, noAuth, nil)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"error getting search results from v1 endpoint %q: %v\", registry, err)\n\t\t} else {\n\t\t\tdefer resp.Body.Close()\n\t\t\tif resp.StatusCode != http.StatusOK {\n\t\t\t\tlogrus.Debugf(\"error getting search results from v1 endpoint %q: %v\", registry, httpResponseToError(resp, \"\"))\n\t\t\t} else {\n\t\t\t\tif err := json.NewDecoder(resp.Body).Decode(v1Res); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn v1Res.Results, nil\n\t\t\t}\n\t\t}\n\t}\n\n\tlogrus.Debugf(\"trying to talk to v2 search endpoint\")\n\tsearchRes := []SearchResult{}\n\tpath := \"/v2/_catalog\"\n\tfor len(searchRes) < limit {\n\t\tresp, err := client.makeRequest(ctx, http.MethodGet, path, nil, nil, v2Auth, nil)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"error getting search results from v2 endpoint %q: %v\", registry, err)\n\t\t\treturn nil, fmt.Errorf(\"couldn't search registry %q: %w\", registry, err)\n\t\t}\n\t\tdefer resp.Body.Close()\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\terr := registryHTTPResponseToError(resp)\n\t\t\tlogrus.Errorf(\"error getting search results from v2 endpoint %q: %v\", registry, err)\n\t\t\treturn nil, fmt.Errorf(\"couldn't search registry %q: %w\", registry, err)\n\t\t}\n\t\tv2Res := &V2Results{}\n\t\tif err := json.NewDecoder(resp.Body).Decode(v2Res); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfor _, repo := range v2Res.Repositories {\n\t\t\tif len(searchRes) == limit {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif strings.Contains(repo, image) {\n\t\t\t\tres := SearchResult{\n\t\t\t\t\tName: repo,\n\t\t\t\t}\n\t\t\t\t// bugzilla.redhat.com/show_bug.cgi?id=1976283\n\t\t\t\t// If we have a full match, make sure it's listed as the first result.\n\t\t\t\t// (Note there might be a full match we never see if we reach the result limit first.)\n\t\t\t\tif repo == image {\n\t\t\t\t\tsearchRes = append([]SearchResult{res}, searchRes...)\n\t\t\t\t} else {\n\t\t\t\t\tsearchRes = append(searchRes, res)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlink := resp.Header.Get(\"Link\")\n\t\tif link == \"\" {\n\t\t\tbreak\n\t\t}\n\t\tlinkURLPart, _, _ := strings.Cut(link, \";\")\n\t\tlinkURL, err := url.Parse(strings.Trim(linkURLPart, \"<>\"))\n\t\tif err != nil {\n\t\t\treturn searchRes, err\n\t\t}\n\n\t\t// can be relative or absolute, but we only want the path (and I\n\t\t// guess we're in trouble if it forwards to a new place...)\n\t\tpath = linkURL.Path\n\t\tif linkURL.RawQuery != \"\" {\n\t\t\tpath += \"?\"\n\t\t\tpath += linkURL.RawQuery\n\t\t}\n\t}\n\treturn searchRes, nil\n}\n\n// makeRequest creates and executes a http.Request with the specified parameters, adding authentication and TLS options for the Docker client.\n// The host name and schema is taken from the client or autodetected, and the path is relative to it, i.e. the path usually starts with /v2/.\nfunc (c *dockerClient) makeRequest(ctx context.Context, method, path string, headers map[string][]string, stream io.Reader, auth sendAuth, extraScope *authScope) (*http.Response, error) {\n\tif err := c.detectProperties(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\n\trequestURL, err := c.resolveRequestURL(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn c.makeRequestToResolvedURL(ctx, method, requestURL, headers, stream, -1, auth, extraScope)\n}\n\n// resolveRequestURL turns a path for c.makeRequest into a full URL.\n// Most users should call makeRequest directly, this exists basically to make the URL available for debug logs.\nfunc (c *dockerClient) resolveRequestURL(path string) (*url.URL, error) {\n\turlString := fmt.Sprintf(\"%s://%s%s\", c.scheme, c.registry, path)\n\tres, err := url.Parse(urlString)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn res, nil\n}\n\n// Checks if the auth headers in the response contain an indication of a failed\n// authorization because of an \"insufficient_scope\" error. If that's the case,\n// returns the required scope to be used for fetching a new token.\nfunc needsRetryWithUpdatedScope(res *http.Response) (bool, *authScope) {\n\tif res.StatusCode == http.StatusUnauthorized {\n\t\tfor challenge := range iterateAuthHeader(res.Header) {\n\t\t\tif challenge.Scheme == \"bearer\" {\n\t\t\t\tif errmsg, ok := challenge.Parameters[\"error\"]; ok && errmsg == \"insufficient_scope\" {\n\t\t\t\t\tif scope, ok := challenge.Parameters[\"scope\"]; ok && scope != \"\" {\n\t\t\t\t\t\tif newScope, err := parseAuthScope(scope); err == nil {\n\t\t\t\t\t\t\treturn true, newScope\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogrus.WithFields(logrus.Fields{\n\t\t\t\t\t\t\t\t\"error\":     err,\n\t\t\t\t\t\t\t\t\"scope\":     scope,\n\t\t\t\t\t\t\t\t\"challenge\": challenge,\n\t\t\t\t\t\t\t}).Error(\"Failed to parse the authentication scope from the given challenge\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false, nil\n}\n\n// parseRetryAfter determines the delay required by the \"Retry-After\" header in res and returns it,\n// silently falling back to fallbackDelay if the header is missing or invalid.\nfunc parseRetryAfter(res *http.Response, fallbackDelay time.Duration) time.Duration {\n\tafter := res.Header.Get(\"Retry-After\")\n\tif after == \"\" {\n\t\treturn fallbackDelay\n\t}\n\tlogrus.Debugf(\"Detected 'Retry-After' header %q\", after)\n\t// First, check if we have a numerical value.\n\tif num, err := strconv.ParseInt(after, 10, 64); err == nil {\n\t\treturn time.Duration(num) * time.Second\n\t}\n\t// Second, check if we have an HTTP date.\n\tif t, err := http.ParseTime(after); err == nil {\n\t\t// If the delta between the date and now is positive, use it.\n\t\tdelta := time.Until(t)\n\t\tif delta > 0 {\n\t\t\treturn delta\n\t\t}\n\t\tlogrus.Debugf(\"Retry-After date in the past, ignoring it\")\n\t\treturn fallbackDelay\n\t}\n\tlogrus.Debugf(\"Invalid Retry-After format, ignoring it\")\n\treturn fallbackDelay\n}\n\n// makeRequestToResolvedURL creates and executes a http.Request with the specified parameters, adding authentication and TLS options for the Docker client.\n// streamLen, if not -1, specifies the length of the data expected on stream.\n// makeRequest should generally be preferred.\n// In case of an HTTP 429 status code in the response, it may automatically retry a few times.\n// TODO(runcom): too many arguments here, use a struct\nfunc (c *dockerClient) makeRequestToResolvedURL(ctx context.Context, method string, requestURL *url.URL, headers map[string][]string, stream io.Reader, streamLen int64, auth sendAuth, extraScope *authScope) (*http.Response, error) {\n\tdelay := backoffInitialDelay\n\tattempts := 0\n\tfor {\n\t\tres, err := c.makeRequestToResolvedURLOnce(ctx, method, requestURL, headers, stream, streamLen, auth, extraScope)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tattempts++\n\n\t\t// By default we use pre-defined scopes per operation. In\n\t\t// certain cases, this can fail when our authentication is\n\t\t// insufficient, then we might be getting an error back with a\n\t\t// Www-Authenticate Header indicating an insufficient scope.\n\t\t//\n\t\t// Check for that and update the client challenges to retry after\n\t\t// requesting a new token\n\t\t//\n\t\t// We only try this on the first attempt, to not overload an\n\t\t// already struggling server.\n\t\t// We also cannot retry with a body (stream != nil) as stream\n\t\t// was already read\n\t\tif attempts == 1 && stream == nil && auth != noAuth {\n\t\t\tif retry, newScope := needsRetryWithUpdatedScope(res); retry {\n\t\t\t\tlogrus.Debug(\"Detected insufficient_scope error, will retry request with updated scope\")\n\t\t\t\tres.Body.Close()\n\t\t\t\t// Note: This retry ignores extraScope. That’s, strictly speaking, incorrect, but we don’t currently\n\t\t\t\t// expect the insufficient_scope errors to happen for those callers. If that changes, we can add support\n\t\t\t\t// for more than one extra scope.\n\t\t\t\tres, err = c.makeRequestToResolvedURLOnce(ctx, method, requestURL, headers, stream, streamLen, auth, newScope)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\textraScope = newScope\n\t\t\t}\n\t\t}\n\n\t\tif res.StatusCode != http.StatusTooManyRequests || // Only retry on StatusTooManyRequests, success or other failure is returned to caller immediately\n\t\t\tstream != nil || // We can't retry with a body (which is not restartable in the general case)\n\t\t\tattempts == backoffNumIterations {\n\t\t\treturn res, nil\n\t\t}\n\t\t// close response body before retry or context done\n\t\tres.Body.Close()\n\n\t\tdelay = min(parseRetryAfter(res, delay), backoffMaxDelay)\n\t\tlogrus.Debugf(\"Too many requests to %s: sleeping for %f seconds before next attempt\", requestURL.Redacted(), delay.Seconds())\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn nil, ctx.Err()\n\t\tcase <-time.After(delay):\n\t\t\t// Nothing\n\t\t}\n\t\tdelay *= 2 // If the registry does not specify a delay, back off exponentially.\n\t}\n}\n\n// makeRequestToResolvedURLOnce creates and executes a http.Request with the specified parameters, adding authentication and TLS options for the Docker client.\n// streamLen, if not -1, specifies the length of the data expected on stream.\n// makeRequest should generally be preferred.\n// Note that no exponential back off is performed when receiving an http 429 status code.\nfunc (c *dockerClient) makeRequestToResolvedURLOnce(ctx context.Context, method string, resolvedURL *url.URL, headers map[string][]string, stream io.Reader, streamLen int64, auth sendAuth, extraScope *authScope) (*http.Response, error) {\n\treq, err := http.NewRequestWithContext(ctx, method, resolvedURL.String(), stream)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif streamLen != -1 { // Do not blindly overwrite if streamLen == -1, http.NewRequestWithContext above can figure out the length of bytes.Reader and similar objects without us having to compute it.\n\t\treq.ContentLength = streamLen\n\t}\n\treq.Header.Set(\"Docker-Distribution-API-Version\", \"registry/2.0\")\n\tfor n, h := range headers {\n\t\tfor _, hh := range h {\n\t\t\treq.Header.Add(n, hh)\n\t\t}\n\t}\n\treq.Header.Add(\"User-Agent\", c.userAgent)\n\tif auth == v2Auth {\n\t\tif err := c.setupRequestAuth(req, extraScope); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tlogrus.Debugf(\"%s %s\", method, resolvedURL.Redacted())\n\tres, err := c.client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif warnings := res.Header.Values(\"Warning\"); len(warnings) != 0 {\n\t\tc.logResponseWarnings(res, warnings)\n\t}\n\treturn res, nil\n}\n\n// logResponseWarnings logs warningHeaders from res, if any.\nfunc (c *dockerClient) logResponseWarnings(res *http.Response, warningHeaders []string) {\n\tc.reportedWarningsLock.Lock()\n\tdefer c.reportedWarningsLock.Unlock()\n\n\tfor _, header := range warningHeaders {\n\t\twarningString := parseRegistryWarningHeader(header)\n\t\tif warningString == \"\" {\n\t\t\tlogrus.Debugf(\"Ignored Warning: header from registry: %q\", header)\n\t\t} else {\n\t\t\tif !c.reportedWarnings.Contains(warningString) {\n\t\t\t\tc.reportedWarnings.Add(warningString)\n\t\t\t\t// Note that reportedWarnings is based only on warningString, so that we don’t\n\t\t\t\t// repeat the same warning for every request - but the warning includes the URL;\n\t\t\t\t// so it may not be specific to that URL.\n\t\t\t\tlogrus.Warnf(\"Warning from registry (first encountered at %q): %q\", res.Request.URL.Redacted(), warningString)\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Repeated warning from registry at %q: %q\", res.Request.URL.Redacted(), warningString)\n\t\t\t}\n\t\t}\n\t}\n}\n\n// parseRegistryWarningHeader parses a Warning: header per RFC 7234, limited to the warning\n// values allowed by opencontainers/distribution-spec.\n// It returns the warning string if the header has the expected format, or \"\" otherwise.\nfunc parseRegistryWarningHeader(header string) string {\n\tconst expectedPrefix = `299 - \"`\n\tconst expectedSuffix = `\"`\n\n\t// warning-value = warn-code SP warn-agent SP warn-text\t[ SP warn-date ]\n\t// distribution-spec requires warn-code=299, warn-agent=\"-\", warn-date missing\n\theader, ok := strings.CutPrefix(header, expectedPrefix)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\theader, ok = strings.CutSuffix(header, expectedSuffix)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\n\t// ”Recipients that process the value of a quoted-string MUST handle a quoted-pair\n\t// as if it were replaced by the octet following the backslash.”, so let’s do that…\n\tres := strings.Builder{}\n\tafterBackslash := false\n\tfor _, c := range []byte(header) { // []byte because escaping is defined in terms of bytes, not Unicode code points\n\t\tswitch {\n\t\tcase c == 0x7F || (c < ' ' && c != '\\t'):\n\t\t\treturn \"\" // Control characters are forbidden\n\t\tcase afterBackslash:\n\t\t\tres.WriteByte(c)\n\t\t\tafterBackslash = false\n\t\tcase c == '\"':\n\t\t\t// This terminates the warn-text and warn-date, forbidden by distribution-spec, follows,\n\t\t\t// or completely invalid input.\n\t\t\treturn \"\"\n\t\tcase c == '\\\\':\n\t\t\tafterBackslash = true\n\t\tdefault:\n\t\t\tres.WriteByte(c)\n\t\t}\n\t}\n\tif afterBackslash {\n\t\treturn \"\"\n\t}\n\treturn res.String()\n}\n\n// we're using the challenges from the /v2/ ping response and not the one from the destination\n// URL in this request because:\n//\n// 1) docker does that as well\n// 2) gcr.io is sending 401 without a WWW-Authenticate header in the real request\n//\n// debugging: https://github.com/containers/image/pull/211#issuecomment-273426236 and follows up\nfunc (c *dockerClient) setupRequestAuth(req *http.Request, extraScope *authScope) error {\n\tif len(c.challenges) == 0 {\n\t\treturn nil\n\t}\n\tschemeNames := make([]string, 0, len(c.challenges))\n\tfor _, challenge := range c.challenges {\n\t\tschemeNames = append(schemeNames, challenge.Scheme)\n\t\tswitch challenge.Scheme {\n\t\tcase \"basic\":\n\t\t\treq.SetBasicAuth(c.auth.Username, c.auth.Password)\n\t\t\treturn nil\n\t\tcase \"bearer\":\n\t\t\ttoken, err := c.obtainBearerToken(req.Context(), challenge, extraScope)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", token))\n\t\t\treturn nil\n\t\tdefault:\n\t\t\tlogrus.Debugf(\"no handler for %s authentication\", challenge.Scheme)\n\t\t}\n\t}\n\tlogrus.Infof(\"None of the challenges sent by server (%s) are supported, trying an unauthenticated request anyway\", strings.Join(schemeNames, \", \"))\n\treturn nil\n}\n\n// obtainBearerToken gets an \"Authorization: Bearer\" token if one is available, or obtains a fresh one.\nfunc (c *dockerClient) obtainBearerToken(ctx context.Context, challenge challenge, extraScope *authScope) (string, error) {\n\tif c.registryToken != \"\" {\n\t\treturn c.registryToken, nil\n\t}\n\n\tcacheKey := \"\"\n\tscopes := []authScope{c.scope}\n\tif extraScope != nil {\n\t\t// Using ':' as a separator here is unambiguous because getBearerToken below\n\t\t// uses the same separator when formatting a remote request (and because\n\t\t// repository names that we create can't contain colons, and extraScope values\n\t\t// coming from a server come from `parseAuthScope`, which also splits on colons).\n\t\tcacheKey = fmt.Sprintf(\"%s:%s:%s\", extraScope.resourceType, extraScope.remoteName, extraScope.actions)\n\t\tif colonCount := strings.Count(cacheKey, \":\"); colonCount != 2 {\n\t\t\treturn \"\", fmt.Errorf(\n\t\t\t\t\"Internal error: there must be exactly 2 colons in the cacheKey ('%s') but got %d\",\n\t\t\t\tcacheKey,\n\t\t\t\tcolonCount,\n\t\t\t)\n\t\t}\n\t\tscopes = append(scopes, *extraScope)\n\t}\n\n\ttoken, newEntry, err := func() (*bearerToken, bool, error) { // A scope for defer\n\t\tc.tokenCacheLock.Lock()\n\t\tdefer c.tokenCacheLock.Unlock()\n\t\ttoken, ok := c.tokenCache[cacheKey]\n\t\tif ok {\n\t\t\treturn token, false, nil\n\t\t} else {\n\t\t\ttoken = &bearerToken{\n\t\t\t\tlock: semaphore.NewWeighted(1),\n\t\t\t}\n\t\t\t// If this is a new *bearerToken, lock the entry before adding it to the cache, so that any other goroutine that finds\n\t\t\t// this entry blocks until we obtain the token for the first time, and does not see an empty object\n\t\t\t// (and does not try to obtain the token itself when we are going to do so).\n\t\t\tif err := token.lock.Acquire(ctx, 1); err != nil {\n\t\t\t\t// We do not block on this Acquire, so we don’t really expect to fail here — but if ctx is canceled,\n\t\t\t\t// there is no point in trying to continue anyway.\n\t\t\t\treturn nil, false, err\n\t\t\t}\n\t\t\tc.tokenCache[cacheKey] = token\n\t\t\treturn token, true, nil\n\t\t}\n\t}()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif !newEntry {\n\t\t// If this is an existing *bearerToken, obtain the lock only after releasing c.tokenCacheLock,\n\t\t// so that users of other cacheKey values are not blocked for the whole duration of our HTTP roundtrip.\n\t\tif err := token.lock.Acquire(ctx, 1); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\n\tdefer token.lock.Release(1)\n\n\tif !newEntry && token.err == nil && !time.Now().After(token.expirationTime) {\n\t\treturn token.token, nil // We have a usable token already.\n\t}\n\n\tif c.auth.IdentityToken != \"\" {\n\t\terr = c.getBearerTokenOAuth2(ctx, token, challenge, scopes)\n\t} else {\n\t\terr = c.getBearerToken(ctx, token, challenge, scopes)\n\t}\n\ttoken.err = err\n\tif token.err != nil {\n\t\treturn \"\", token.err\n\t}\n\treturn token.token, nil\n}\n\n// getBearerTokenOAuth2 obtains an \"Authorization: Bearer\" token using a pre-existing identity token per\n// https://github.com/distribution/distribution/blob/main/docs/spec/auth/oauth.md for challenge and scopes,\n// and writes it into dest.\nfunc (c *dockerClient) getBearerTokenOAuth2(ctx context.Context, dest *bearerToken, challenge challenge,\n\tscopes []authScope,\n) error {\n\trealm, ok := challenge.Parameters[\"realm\"]\n\tif !ok {\n\t\treturn errors.New(\"missing realm in bearer auth challenge\")\n\t}\n\n\tauthReq, err := http.NewRequestWithContext(ctx, http.MethodPost, realm, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Make the form data required against the oauth2 authentication\n\t// More details here: https://docs.docker.com/registry/spec/auth/oauth/\n\tparams := authReq.URL.Query()\n\tif service, ok := challenge.Parameters[\"service\"]; ok && service != \"\" {\n\t\tparams.Add(\"service\", service)\n\t}\n\n\tfor _, scope := range scopes {\n\t\tif scope.resourceType != \"\" && scope.remoteName != \"\" && scope.actions != \"\" {\n\t\t\tparams.Add(\"scope\", fmt.Sprintf(\"%s:%s:%s\", scope.resourceType, scope.remoteName, scope.actions))\n\t\t}\n\t}\n\tparams.Add(\"grant_type\", \"refresh_token\")\n\tparams.Add(\"refresh_token\", c.auth.IdentityToken)\n\tparams.Add(\"client_id\", \"containers/image\")\n\n\tauthReq.Body = io.NopCloser(strings.NewReader(params.Encode()))\n\tauthReq.Header.Add(\"User-Agent\", c.userAgent)\n\tauthReq.Header.Add(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\tlogrus.Debugf(\"%s %s\", authReq.Method, authReq.URL.Redacted())\n\tres, err := c.client.Do(authReq)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Body.Close()\n\tif err := httpResponseToError(res, \"Trying to obtain access token\"); err != nil {\n\t\treturn err\n\t}\n\n\treturn dest.readFromHTTPResponseBody(res)\n}\n\n// getBearerToken obtains an \"Authorization: Bearer\" token using a GET request, per\n// https://github.com/distribution/distribution/blob/main/docs/spec/auth/token.md for challenge and scopes,\n// and writes it into dest.\nfunc (c *dockerClient) getBearerToken(ctx context.Context, dest *bearerToken, challenge challenge,\n\tscopes []authScope,\n) error {\n\trealm, ok := challenge.Parameters[\"realm\"]\n\tif !ok {\n\t\treturn errors.New(\"missing realm in bearer auth challenge\")\n\t}\n\n\tauthReq, err := http.NewRequestWithContext(ctx, http.MethodGet, realm, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tparams := authReq.URL.Query()\n\tif c.auth.Username != \"\" {\n\t\tparams.Add(\"account\", c.auth.Username)\n\t}\n\n\tif service, ok := challenge.Parameters[\"service\"]; ok && service != \"\" {\n\t\tparams.Add(\"service\", service)\n\t}\n\n\tfor _, scope := range scopes {\n\t\tif scope.resourceType != \"\" && scope.remoteName != \"\" && scope.actions != \"\" {\n\t\t\tparams.Add(\"scope\", fmt.Sprintf(\"%s:%s:%s\", scope.resourceType, scope.remoteName, scope.actions))\n\t\t}\n\t}\n\n\tauthReq.URL.RawQuery = params.Encode()\n\n\tif c.auth.Username != \"\" && c.auth.Password != \"\" {\n\t\tauthReq.SetBasicAuth(c.auth.Username, c.auth.Password)\n\t}\n\tauthReq.Header.Add(\"User-Agent\", c.userAgent)\n\n\tlogrus.Debugf(\"%s %s\", authReq.Method, authReq.URL.Redacted())\n\tres, err := c.client.Do(authReq)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Body.Close()\n\tif err := httpResponseToError(res, \"Requesting bearer token\"); err != nil {\n\t\treturn err\n\t}\n\n\treturn dest.readFromHTTPResponseBody(res)\n}\n\n// readFromHTTPResponseBody sets token data by parsing a http.Response.\n// The caller is still responsible for ensuring res.Body is closed.\nfunc (bt *bearerToken) readFromHTTPResponseBody(res *http.Response) error {\n\tblob, err := iolimits.ReadAtMost(res.Body, iolimits.MaxAuthTokenBodySize)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar token struct {\n\t\tToken          string    `json:\"token\"`\n\t\tAccessToken    string    `json:\"access_token\"`\n\t\tExpiresIn      int       `json:\"expires_in\"`\n\t\tIssuedAt       time.Time `json:\"issued_at\"`\n\t\texpirationTime time.Time\n\t}\n\tif err := json.Unmarshal(blob, &token); err != nil {\n\t\tconst bodySampleLength = 50\n\t\tbodySample := blob\n\t\tif len(bodySample) > bodySampleLength {\n\t\t\tbodySample = bodySample[:bodySampleLength]\n\t\t}\n\t\treturn fmt.Errorf(\"decoding bearer token (last URL %q, body start %q): %w\", res.Request.URL.Redacted(), string(bodySample), err)\n\t}\n\n\tbt.token = token.Token\n\tif bt.token == \"\" {\n\t\tbt.token = token.AccessToken\n\t}\n\n\tif token.ExpiresIn < minimumTokenLifetimeSeconds {\n\t\ttoken.ExpiresIn = minimumTokenLifetimeSeconds\n\t\tlogrus.Debugf(\"Increasing token expiration to: %d seconds\", token.ExpiresIn)\n\t}\n\tif token.IssuedAt.IsZero() {\n\t\ttoken.IssuedAt = time.Now().UTC()\n\t}\n\tbt.expirationTime = token.IssuedAt.Add(time.Duration(token.ExpiresIn) * time.Second)\n\treturn nil\n}\n\n// detectPropertiesHelper performs the work of detectProperties which executes\n// it at most once.\nfunc (c *dockerClient) detectPropertiesHelper(ctx context.Context) error {\n\t// We overwrite the TLS clients `InsecureSkipVerify` only if explicitly\n\t// specified by the system context\n\tif c.sys != nil && c.sys.DockerInsecureSkipTLSVerify != types.OptionalBoolUndefined {\n\t\tc.tlsClientConfig.InsecureSkipVerify = c.sys.DockerInsecureSkipTLSVerify == types.OptionalBoolTrue\n\t}\n\ttr := tlsclientconfig.NewTransport()\n\ttr.TLSClientConfig = c.tlsClientConfig\n\t// if set DockerProxyURL explicitly, use the DockerProxyURL instead of system proxy\n\tif c.sys != nil && c.sys.DockerProxyURL != nil {\n\t\ttr.Proxy = http.ProxyURL(c.sys.DockerProxyURL)\n\t}\n\tif c.sys != nil && c.sys.DockerProxy != nil {\n\t\ttr.Proxy = func(request *http.Request) (*url.URL, error) {\n\t\t\treturn c.sys.DockerProxy(request.URL)\n\t\t}\n\t}\n\tc.client = &http.Client{Transport: tr}\n\n\tping := func(scheme string) error {\n\t\tpingURL, err := url.Parse(fmt.Sprintf(resolvedPingV2URL, scheme, c.registry))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tresp, err := c.makeRequestToResolvedURL(ctx, http.MethodGet, pingURL, nil, nil, -1, noAuth, nil)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Ping %s err %s (%#v)\", pingURL.Redacted(), err.Error(), err)\n\t\t\treturn err\n\t\t}\n\t\tdefer resp.Body.Close()\n\t\tlogrus.Debugf(\"Ping %s status %d\", pingURL.Redacted(), resp.StatusCode)\n\t\tif resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized {\n\t\t\treturn registryHTTPResponseToError(resp)\n\t\t}\n\t\tc.challenges = slices.Collect(iterateAuthHeader(resp.Header))\n\t\tc.scheme = scheme\n\t\tc.supportsSignatures = resp.Header.Get(\"X-Registry-Supports-Signatures\") == \"1\"\n\t\treturn nil\n\t}\n\terr := ping(\"https\")\n\tif err != nil && c.tlsClientConfig.InsecureSkipVerify {\n\t\terr = ping(\"http\")\n\t}\n\tif err != nil {\n\t\terr = fmt.Errorf(\"pinging container registry %s: %w\", c.registry, err)\n\t}\n\treturn err\n}\n\n// detectProperties detects various properties of the registry.\n// See the dockerClient documentation for members which are affected by this.\nfunc (c *dockerClient) detectProperties(ctx context.Context) error {\n\tc.detectPropertiesOnce.Do(func() { c.detectPropertiesError = c.detectPropertiesHelper(ctx) })\n\treturn c.detectPropertiesError\n}\n\n// fetchManifest fetches a manifest for (the repo of ref) + tagOrDigest.\n// The caller is responsible for ensuring tagOrDigest uses the expected format.\nfunc (c *dockerClient) fetchManifest(ctx context.Context, ref dockerReference, tagOrDigest string) ([]byte, string, error) {\n\tpath := fmt.Sprintf(manifestPath, reference.Path(ref.ref), tagOrDigest)\n\theaders := map[string][]string{\n\t\t\"Accept\": manifest.DefaultRequestedManifestMIMETypes,\n\t}\n\tres, err := c.makeRequest(ctx, http.MethodGet, path, headers, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tlogrus.Debugf(\"Content-Type from manifest GET is %q\", res.Header.Get(\"Content-Type\"))\n\tdefer res.Body.Close()\n\tif res.StatusCode != http.StatusOK {\n\t\treturn nil, \"\", fmt.Errorf(\"reading manifest %s in %s: %w\", tagOrDigest, ref.ref.Name(), registryHTTPResponseToError(res))\n\t}\n\n\tmanblob, err := iolimits.ReadAtMost(res.Body, iolimits.MaxManifestBodySize)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn manblob, simplifyContentType(res.Header.Get(\"Content-Type\")), nil\n}\n\n// getExternalBlob returns the reader of the first available blob URL from urls, which must not be empty.\n// This function can return nil reader when no url is supported by this function. In this case, the caller\n// should fallback to fetch the non-external blob (i.e. pull from the registry).\nfunc (c *dockerClient) getExternalBlob(ctx context.Context, urls []string) (io.ReadCloser, int64, error) {\n\tif len(urls) == 0 {\n\t\treturn nil, 0, errors.New(\"internal error: getExternalBlob called with no URLs\")\n\t}\n\tvar remoteErrors []error\n\tfor _, u := range urls {\n\t\tblobURL, err := url.Parse(u)\n\t\tif err != nil || (blobURL.Scheme != \"http\" && blobURL.Scheme != \"https\") {\n\t\t\tcontinue // unsupported url. skip this url.\n\t\t}\n\t\t// NOTE: we must not authenticate on additional URLs as those\n\t\t//       can be abused to leak credentials or tokens.  Please\n\t\t//       refer to CVE-2020-15157 for more information.\n\t\tresp, err := c.makeRequestToResolvedURL(ctx, http.MethodGet, blobURL, nil, nil, -1, noAuth, nil)\n\t\tif err != nil {\n\t\t\tremoteErrors = append(remoteErrors, err)\n\t\t\tcontinue\n\t\t}\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\terr := fmt.Errorf(\"error fetching external blob from %q: %w\", u, newUnexpectedHTTPStatusError(resp))\n\t\t\tremoteErrors = append(remoteErrors, err)\n\t\t\tlogrus.Debug(err)\n\t\t\tresp.Body.Close()\n\t\t\tcontinue\n\t\t}\n\n\t\tsize, err := getBlobSize(resp)\n\t\tif err != nil {\n\t\t\tsize = -1\n\t\t}\n\t\treturn resp.Body, size, nil\n\t}\n\tif remoteErrors == nil {\n\t\treturn nil, 0, nil // fallback to non-external blob\n\t}\n\treturn nil, 0, fmt.Errorf(\"failed fetching external blob from all urls: %w\", multierr.Format(\"\", \", \", \"\", remoteErrors))\n}\n\nfunc getBlobSize(resp *http.Response) (int64, error) {\n\thdrs := resp.Header.Values(\"Content-Length\")\n\tif len(hdrs) == 0 {\n\t\treturn -1, errors.New(`Missing \"Content-Length\" header in response`)\n\t}\n\thdr := hdrs[0] // Equivalent to resp.Header.Get(…)\n\tsize, err := strconv.ParseInt(hdr, 10, 64)\n\tif err != nil { // Go’s response reader should already reject such values.\n\t\treturn -1, err\n\t}\n\tif size < 0 { // '-' is not a valid character in Content-Length, so negative values are invalid. Go’s response reader should already reject such values.\n\t\treturn -1, fmt.Errorf(`Invalid negative \"Content-Length\" %q`, hdr)\n\t}\n\treturn size, nil\n}\n\n// getBlob returns a stream for the specified blob in ref, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (c *dockerClient) getBlob(ctx context.Context, ref dockerReference, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tif len(info.URLs) != 0 {\n\t\tr, s, err := c.getExternalBlob(ctx, info.URLs)\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t} else if r != nil {\n\t\t\treturn r, s, nil\n\t\t}\n\t}\n\n\tif err := info.Digest.Validate(); err != nil { // Make sure info.Digest.String() does not contain any unexpected characters\n\t\treturn nil, 0, err\n\t}\n\tpath := fmt.Sprintf(blobsPath, reference.Path(ref.ref), info.Digest.String())\n\tlogrus.Debugf(\"Downloading %s\", path)\n\tres, err := c.makeRequest(ctx, http.MethodGet, path, nil, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\tif res.StatusCode != http.StatusOK {\n\t\terr := registryHTTPResponseToError(res)\n\t\tres.Body.Close()\n\t\treturn nil, 0, fmt.Errorf(\"fetching blob: %w\", err)\n\t}\n\tcache.RecordKnownLocation(ref.Transport(), bicTransportScope(ref), info.Digest, newBICLocationReference(ref))\n\tblobSize, err := getBlobSize(res)\n\tif err != nil {\n\t\t// See above, we don't guarantee returning a size\n\t\tlogrus.Debugf(\"failed to get blob size: %v\", err)\n\t\tblobSize = -1\n\t}\n\n\treconnectingReader, err := newBodyReader(ctx, c, path, res.Body)\n\tif err != nil {\n\t\tres.Body.Close()\n\t\treturn nil, 0, err\n\t}\n\treturn reconnectingReader, blobSize, nil\n}\n\n// getOCIDescriptorContents returns the contents a blob specified by descriptor in ref, which must fit within limit.\nfunc (c *dockerClient) getOCIDescriptorContents(ctx context.Context, ref dockerReference, desc imgspecv1.Descriptor, maxSize int, cache types.BlobInfoCache) ([]byte, error) {\n\t// Note that this copies all kinds of attachments: attestations, and whatever else is there,\n\t// not just signatures. We leave the signature consumers to decide based on the MIME type.\n\n\tif err := desc.Digest.Validate(); err != nil { // .Algorithm() might panic without this check\n\t\treturn nil, fmt.Errorf(\"invalid digest %q: %w\", desc.Digest.String(), err)\n\t}\n\tdigestAlgorithm := desc.Digest.Algorithm()\n\tif !digestAlgorithm.Available() {\n\t\treturn nil, fmt.Errorf(\"invalid digest %q: unsupported digest algorithm %q\", desc.Digest.String(), digestAlgorithm.String())\n\t}\n\n\treader, _, err := c.getBlob(ctx, ref, manifest.BlobInfoFromOCI1Descriptor(desc), cache)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer reader.Close()\n\tpayload, err := iolimits.ReadAtMost(reader, maxSize)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading blob %s in %s: %w\", desc.Digest.String(), ref.ref.Name(), err)\n\t}\n\tactualDigest := digestAlgorithm.FromBytes(payload)\n\tif actualDigest != desc.Digest {\n\t\treturn nil, fmt.Errorf(\"digest mismatch, expected %q, got %q\", desc.Digest.String(), actualDigest.String())\n\t}\n\treturn payload, nil\n}\n\n// isManifestUnknownError returns true iff err from fetchManifest is a “manifest unknown” error.\nfunc isManifestUnknownError(err error) bool {\n\t// docker/distribution, and as defined in the spec\n\tvar ec errcode.ErrorCoder\n\tif errors.As(err, &ec) && ec.ErrorCode() == v2.ErrorCodeManifestUnknown {\n\t\treturn true\n\t}\n\t// registry.redhat.io as of October 2022\n\tvar e errcode.Error\n\tif errors.As(err, &e) && e.ErrorCode() == errcode.ErrorCodeUnknown && e.Message == \"Not Found\" {\n\t\treturn true\n\t}\n\t// Harbor v2.10.2\n\tif errors.As(err, &e) && e.ErrorCode() == errcode.ErrorCodeUnknown && strings.Contains(strings.ToLower(e.Message), \"not found\") {\n\t\treturn true\n\t}\n\n\t// opencontainers/distribution-spec does not require the errcode.Error payloads to be used,\n\t// but specifies that the HTTP status must be 404.\n\tvar unexpected *unexpectedHTTPResponseError\n\tif errors.As(err, &unexpected) && unexpected.StatusCode == http.StatusNotFound {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// getSigstoreAttachmentManifest loads and parses the manifest for sigstore attachments for\n// digest in ref.\n// It returns (nil, nil) if the manifest does not exist.\nfunc (c *dockerClient) getSigstoreAttachmentManifest(ctx context.Context, ref dockerReference, digest digest.Digest) (*manifest.OCI1, error) {\n\ttag, err := sigstoreAttachmentTag(digest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsigstoreRef, err := reference.WithTag(reference.TrimNamed(ref.ref), tag)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogrus.Debugf(\"Looking for sigstore attachments in %s\", sigstoreRef.String())\n\tmanifestBlob, mimeType, err := c.fetchManifest(ctx, ref, tag)\n\tif err != nil {\n\t\t// FIXME: Are we going to need better heuristics??\n\t\t// This alone is probably a good enough reason for sigstore to be opt-in only,\n\t\t// otherwise we would just break ordinary copies.\n\t\tif isManifestUnknownError(err) {\n\t\t\tlogrus.Debugf(\"Fetching sigstore attachment manifest failed, assuming it does not exist: %v\", err)\n\t\t\treturn nil, nil\n\t\t}\n\t\tlogrus.Debugf(\"Fetching sigstore attachment manifest failed: %v\", err)\n\t\treturn nil, err\n\t}\n\tif mimeType != imgspecv1.MediaTypeImageManifest {\n\t\t// FIXME: Try anyway??\n\t\treturn nil, fmt.Errorf(\"unexpected MIME type for sigstore attachment manifest %s: %q\",\n\t\t\tsigstoreRef.String(), mimeType)\n\t}\n\tres, err := manifest.OCI1FromManifest(manifestBlob)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing manifest %s: %w\", sigstoreRef.String(), err)\n\t}\n\treturn res, nil\n}\n\n// getExtensionsSignatures returns signatures from the X-Registry-Supports-Signatures API extension,\n// using the original data structures.\nfunc (c *dockerClient) getExtensionsSignatures(ctx context.Context, ref dockerReference, manifestDigest digest.Digest) (*extensionSignatureList, error) {\n\tif err := manifestDigest.Validate(); err != nil { // Make sure manifestDigest.String() does not contain any unexpected characters\n\t\treturn nil, err\n\t}\n\tpath := fmt.Sprintf(extensionsSignaturePath, reference.Path(ref.ref), manifestDigest)\n\tres, err := c.makeRequest(ctx, http.MethodGet, path, nil, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Body.Close()\n\tif res.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"downloading signatures for %s in %s: %w\", manifestDigest, ref.ref.Name(), registryHTTPResponseToError(res))\n\t}\n\n\tbody, err := iolimits.ReadAtMost(res.Body, iolimits.MaxSignatureListBodySize)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar parsedBody extensionSignatureList\n\tif err := json.Unmarshal(body, &parsedBody); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding signature list: %w\", err)\n\t}\n\treturn &parsedBody, nil\n}\n\n// sigstoreAttachmentTag returns a sigstore attachment tag for the specified digest.\nfunc sigstoreAttachmentTag(d digest.Digest) (string, error) {\n\tif err := d.Validate(); err != nil { // Make sure d.String() doesn’t contain any unexpected characters\n\t\treturn \"\", err\n\t}\n\treturn strings.Replace(d.String(), \":\", \"-\", 1) + \".sig\", nil\n}\n\n// Close removes resources associated with an initialized dockerClient, if any.\nfunc (c *dockerClient) Close() error {\n\tif c.client != nil {\n\t\tc.client.CloseIdleConnections()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/docker_image.go",
    "content": "package docker\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Image is a Docker-specific implementation of types.ImageCloser with a few extra methods\n// which are specific to Docker.\ntype Image struct {\n\ttypes.ImageCloser\n\tsrc *dockerImageSource\n}\n\n// newImage returns a new Image interface type after setting up\n// a client to the registry hosting the given image.\n// The caller must call .Close() on the returned Image.\nfunc newImage(ctx context.Context, sys *types.SystemContext, ref dockerReference) (types.ImageCloser, error) {\n\ts, err := newImageSource(ctx, sys, ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\timg, err := image.FromSource(ctx, sys, s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Image{ImageCloser: img, src: s}, nil\n}\n\n// SourceRefFullName returns a fully expanded name for the repository this image is in.\nfunc (i *Image) SourceRefFullName() string {\n\treturn i.src.logicalRef.ref.Name()\n}\n\n// GetRepositoryTags list all tags available in the repository. The tag\n// provided inside the ImageReference will be ignored. (This is a\n// backward-compatible shim method which calls the module-level\n// GetRepositoryTags)\nfunc (i *Image) GetRepositoryTags(ctx context.Context) ([]string, error) {\n\treturn GetRepositoryTags(ctx, i.src.c.sys, i.src.logicalRef)\n}\n\n// GetRepositoryTags list all tags available in the repository. The tag\n// provided inside the ImageReference will be ignored.\nfunc GetRepositoryTags(ctx context.Context, sys *types.SystemContext, ref types.ImageReference) ([]string, error) {\n\tdr, ok := ref.(dockerReference)\n\tif !ok {\n\t\treturn nil, errors.New(\"ref must be a dockerReference\")\n\t}\n\n\tregistryConfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpath := fmt.Sprintf(tagsPath, reference.Path(dr.ref))\n\tclient, err := newDockerClientFromRef(sys, dr, registryConfig, false, \"pull\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create client: %w\", err)\n\t}\n\tdefer client.Close()\n\n\ttags := make([]string, 0)\n\n\tfor {\n\t\tres, err := client.makeRequest(ctx, http.MethodGet, path, nil, nil, v2Auth, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer res.Body.Close()\n\t\tif res.StatusCode != http.StatusOK {\n\t\t\treturn nil, fmt.Errorf(\"fetching tags list: %w\", registryHTTPResponseToError(res))\n\t\t}\n\n\t\tvar tagsHolder struct {\n\t\t\tTags []string\n\t\t}\n\t\tif err = json.NewDecoder(res.Body).Decode(&tagsHolder); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, tag := range tagsHolder.Tags {\n\t\t\tif _, err := reference.WithTag(dr.ref, tag); err != nil { // Ensure the tag does not contain unexpected values\n\t\t\t\t// Per https://github.com/containers/skopeo/issues/2409 , Sonatype Nexus 3.58, contrary\n\t\t\t\t// to the spec, may include JSON null values in the list; and Go silently parses them as \"\".\n\t\t\t\tif tag == \"\" {\n\t\t\t\t\tlogrus.Debugf(\"Ignoring invalid empty tag\")\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Per https://github.com/containers/skopeo/issues/2346 , unknown versions of JFrog Artifactory,\n\t\t\t\t// contrary to the tag format specified in\n\t\t\t\t// https://github.com/opencontainers/distribution-spec/blob/8a871c8234977df058f1a14e299fe0a673853da2/spec.md?plain=1#L160 ,\n\t\t\t\t// include digests in the list.\n\t\t\t\tif _, err := digest.Parse(tag); err == nil {\n\t\t\t\t\tlogrus.Debugf(\"Ignoring invalid tag %q matching a digest format\", tag)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn nil, fmt.Errorf(\"registry returned invalid tag %q: %w\", tag, err)\n\t\t\t}\n\t\t\ttags = append(tags, tag)\n\t\t}\n\n\t\tlink := res.Header.Get(\"Link\")\n\t\tif link == \"\" {\n\t\t\tbreak\n\t\t}\n\n\t\tlinkURLPart, _, _ := strings.Cut(link, \";\")\n\t\tlinkURL, err := url.Parse(strings.Trim(linkURLPart, \"<>\"))\n\t\tif err != nil {\n\t\t\treturn tags, err\n\t\t}\n\n\t\t// can be relative or absolute, but we only want the path (and I\n\t\t// guess we're in trouble if it forwards to a new place...)\n\t\tpath = linkURL.Path\n\t\tif linkURL.RawQuery != \"\" {\n\t\t\tpath += \"?\"\n\t\t\tpath += linkURL.RawQuery\n\t\t}\n\t}\n\treturn tags, nil\n}\n\n// GetDigest returns the image's digest\n// Use this to optimize and avoid use of an ImageSource based on the returned digest;\n// if you are going to use an ImageSource anyway, it’s more efficient to create it first\n// and compute the digest from the value returned by GetManifest.\n// NOTE: Implemented to avoid Docker Hub API limits, and mirror configuration may be\n// ignored (but may be implemented in the future)\nfunc GetDigest(ctx context.Context, sys *types.SystemContext, ref types.ImageReference) (digest.Digest, error) {\n\tdr, ok := ref.(dockerReference)\n\tif !ok {\n\t\treturn \"\", errors.New(\"ref must be a dockerReference\")\n\t}\n\tif dr.isUnknownDigest {\n\t\treturn \"\", fmt.Errorf(\"docker: reference %q is for unknown digest case; cannot get digest\", dr.StringWithinTransport())\n\t}\n\n\ttagOrDigest, err := dr.tagOrDigest()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tregistryConfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tclient, err := newDockerClientFromRef(sys, dr, registryConfig, false, \"pull\")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create client: %w\", err)\n\t}\n\tdefer client.Close()\n\n\tpath := fmt.Sprintf(manifestPath, reference.Path(dr.ref), tagOrDigest)\n\theaders := map[string][]string{\n\t\t\"Accept\": manifest.DefaultRequestedManifestMIMETypes,\n\t}\n\n\tres, err := client.makeRequest(ctx, http.MethodHead, path, headers, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tdefer res.Body.Close()\n\tif res.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"reading digest %s in %s: %w\", tagOrDigest, dr.ref.Name(), registryHTTPResponseToError(res))\n\t}\n\n\tdig, err := digest.Parse(res.Header.Get(\"Docker-Content-Digest\"))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn dig, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/docker_image_dest.go",
    "content": "package docker\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\tv2 \"github.com/docker/distribution/registry/api/v2\"\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/putblobdigest\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/internal/streamdigest\"\n\t\"go.podman.io/image/v5/internal/uploadreader\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/none\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype dockerImageDestination struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.IgnoresOriginalOCIConfig\n\tstubs.NoPutBlobPartialInitialize\n\n\tref dockerReference\n\tc   *dockerClient\n\t// State\n\tmanifestDigest digest.Digest // or \"\" if not yet known.\n}\n\n// newImageDestination creates a new ImageDestination for the specified image reference.\nfunc newImageDestination(sys *types.SystemContext, ref dockerReference) (private.ImageDestination, error) {\n\tregistryConfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tc, err := newDockerClientFromRef(sys, ref, registryConfig, true, \"pull,push\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmimeTypes := []string{\n\t\timgspecv1.MediaTypeImageManifest,\n\t\tmanifest.DockerV2Schema2MediaType,\n\t\timgspecv1.MediaTypeImageIndex,\n\t\tmanifest.DockerV2ListMediaType,\n\t}\n\tif c.sys == nil || !c.sys.DockerDisableDestSchema1MIMETypes {\n\t\tmimeTypes = append(mimeTypes, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema1MediaType)\n\t}\n\n\tdest := &dockerImageDestination{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tSupportedManifestMIMETypes:     mimeTypes,\n\t\t\tDesiredLayerCompression:        types.Compress,\n\t\t\tMustMatchRuntimeOS:             false,\n\t\t\tIgnoresEmbeddedDockerReference: false, // We do want the manifest updated; older registry versions refuse manifests if the embedded reference does not match.\n\t\t\tHasThreadSafePutBlob:           true,\n\t\t}),\n\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartial(ref),\n\n\t\tref: ref,\n\t\tc:   c,\n\t}\n\tdest.Compat = impl.AddCompat(dest)\n\treturn dest, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (d *dockerImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *dockerImageDestination) Close() error {\n\treturn d.c.Close()\n}\n\n// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures.\n// Note: It is still possible for PutSignatures to fail if SupportsSignatures returns nil.\nfunc (d *dockerImageDestination) SupportsSignatures(ctx context.Context) error {\n\tif err := d.c.detectProperties(ctx); err != nil {\n\t\treturn err\n\t}\n\tswitch {\n\tcase d.c.supportsSignatures:\n\t\treturn nil\n\tcase d.c.signatureBase != nil:\n\t\treturn nil\n\tdefault:\n\t\treturn errors.New(\"Internal error: X-Registry-Supports-Signatures extension not supported, and lookaside should not be empty configuration\")\n\t}\n}\n\n// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually\n// uploaded to the image destination, true otherwise.\nfunc (d *dockerImageDestination) AcceptsForeignLayerURLs() bool {\n\treturn true\n}\n\n// sizeCounter is an io.Writer which only counts the total size of its input.\ntype sizeCounter struct{ size int64 }\n\nfunc (c *sizeCounter) Write(p []byte) (n int, err error) {\n\tc.size += int64(len(p))\n\treturn len(p), nil\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *dockerImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\t// If requested, precompute the blob digest to prevent uploading layers that already exist on the registry.\n\t// This functionality is particularly useful when BlobInfoCache has not been populated with compressed digests,\n\t// the source blob is uncompressed, and the destination blob is being compressed \"on the fly\".\n\tif inputInfo.Digest == \"\" && d.c.sys != nil && d.c.sys.DockerRegistryPushPrecomputeDigests {\n\t\tlogrus.Debugf(\"Precomputing digest layer for %s\", reference.Path(d.ref.ref))\n\t\tstreamCopy, cleanup, err := streamdigest.ComputeBlobInfo(d.c.sys, stream, &inputInfo)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t\tdefer cleanup()\n\t\tstream = streamCopy\n\t}\n\n\tif inputInfo.Digest != \"\" {\n\t\t// This should not really be necessary, at least the copy code calls TryReusingBlob automatically.\n\t\t// Still, we need to check, if only because the \"initiate upload\" endpoint does not have a documented \"blob already exists\" return value.\n\t\thaveBlob, reusedInfo, err := d.tryReusingExactBlob(ctx, inputInfo, options.Cache)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t\tif haveBlob {\n\t\t\treturn private.UploadedBlob{Digest: reusedInfo.Digest, Size: reusedInfo.Size}, nil\n\t\t}\n\t}\n\n\t// FIXME? Chunked upload, progress reporting, etc.\n\tuploadPath := fmt.Sprintf(blobUploadPath, reference.Path(d.ref.ref))\n\tlogrus.Debugf(\"Uploading %s\", uploadPath)\n\tres, err := d.c.makeRequest(ctx, http.MethodPost, uploadPath, nil, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tdefer res.Body.Close()\n\tif res.StatusCode != http.StatusAccepted {\n\t\tlogrus.Debugf(\"Error initiating layer upload, response %#v\", *res)\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"initiating layer upload to %s in %s: %w\", uploadPath, d.c.registry, registryHTTPResponseToError(res))\n\t}\n\tuploadLocation, err := res.Location()\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"determining upload URL: %w\", err)\n\t}\n\n\tdigester, stream := putblobdigest.DigestIfCanonicalUnknown(stream, inputInfo)\n\tsizeCounter := &sizeCounter{}\n\tstream = io.TeeReader(stream, sizeCounter)\n\n\tuploadLocation, err = func() (*url.URL, error) { // A scope for defer\n\t\tuploadReader := uploadreader.NewUploadReader(stream)\n\t\t// This error text should never be user-visible, we terminate only after makeRequestToResolvedURL\n\t\t// returns, so there isn’t a way for the error text to be provided to any of our callers.\n\t\tdefer uploadReader.Terminate(errors.New(\"Reading data from an already terminated upload\"))\n\t\tres, err = d.c.makeRequestToResolvedURL(ctx, http.MethodPatch, uploadLocation, map[string][]string{\"Content-Type\": {\"application/octet-stream\"}}, uploadReader, inputInfo.Size, v2Auth, nil)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Error uploading layer chunked %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer res.Body.Close()\n\t\tif !successStatus(res.StatusCode) {\n\t\t\treturn nil, fmt.Errorf(\"uploading layer chunked: %w\", registryHTTPResponseToError(res))\n\t\t}\n\t\tuploadLocation, err := res.Location()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"determining upload URL: %w\", err)\n\t\t}\n\t\treturn uploadLocation, nil\n\t}()\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tblobDigest := digester.Digest()\n\n\t// FIXME: DELETE uploadLocation on failure (does not really work in docker/distribution servers, which incorrectly require the \"delete\" action in the token's scope)\n\n\tlocationQuery := uploadLocation.Query()\n\tlocationQuery.Set(\"digest\", blobDigest.String())\n\tuploadLocation.RawQuery = locationQuery.Encode()\n\tres, err = d.c.makeRequestToResolvedURL(ctx, http.MethodPut, uploadLocation, map[string][]string{\"Content-Type\": {\"application/octet-stream\"}}, nil, -1, v2Auth, nil)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tdefer res.Body.Close()\n\tif res.StatusCode != http.StatusCreated {\n\t\tlogrus.Debugf(\"Error uploading layer, response %#v\", *res)\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"uploading layer to %s: %w\", uploadLocation, registryHTTPResponseToError(res))\n\t}\n\n\tlogrus.Debugf(\"Upload of layer %s complete\", blobDigest)\n\toptions.Cache.RecordKnownLocation(d.ref.Transport(), bicTransportScope(d.ref), blobDigest, newBICLocationReference(d.ref))\n\treturn private.UploadedBlob{Digest: blobDigest, Size: sizeCounter.size}, nil\n}\n\n// blobExists returns true iff repo contains a blob with digest, and if so, also its size.\n// If the destination does not contain the blob, or it is unknown, blobExists ordinarily returns (false, -1, nil);\n// it returns a non-nil error only on an unexpected failure.\nfunc (d *dockerImageDestination) blobExists(ctx context.Context, repo reference.Named, digest digest.Digest, extraScope *authScope) (bool, int64, error) {\n\tif err := digest.Validate(); err != nil { // Make sure digest.String() does not contain any unexpected characters\n\t\treturn false, -1, err\n\t}\n\tcheckPath := fmt.Sprintf(blobsPath, reference.Path(repo), digest.String())\n\tlogrus.Debugf(\"Checking %s\", checkPath)\n\tres, err := d.c.makeRequest(ctx, http.MethodHead, checkPath, nil, nil, v2Auth, extraScope)\n\tif err != nil {\n\t\treturn false, -1, err\n\t}\n\tdefer res.Body.Close()\n\tswitch res.StatusCode {\n\tcase http.StatusOK:\n\t\tsize, err := getBlobSize(res)\n\t\tif err != nil {\n\t\t\treturn false, -1, fmt.Errorf(\"determining size of blob %s in %s: %w\", digest, repo.Name(), err)\n\t\t}\n\t\tlogrus.Debugf(\"... already exists\")\n\t\treturn true, size, nil\n\tcase http.StatusUnauthorized:\n\t\tlogrus.Debugf(\"... not authorized\")\n\t\treturn false, -1, fmt.Errorf(\"checking whether a blob %s exists in %s: %w\", digest, repo.Name(), registryHTTPResponseToError(res))\n\tcase http.StatusNotFound:\n\t\tlogrus.Debugf(\"... not present\")\n\t\treturn false, -1, nil\n\tdefault:\n\t\treturn false, -1, fmt.Errorf(\"checking whether a blob %s exists in %s: %w\", digest, repo.Name(), registryHTTPResponseToError(res))\n\t}\n}\n\n// mountBlob tries to mount blob srcDigest from srcRepo to the current destination.\nfunc (d *dockerImageDestination) mountBlob(ctx context.Context, srcRepo reference.Named, srcDigest digest.Digest, extraScope *authScope) error {\n\tu := url.URL{\n\t\tPath: fmt.Sprintf(blobUploadPath, reference.Path(d.ref.ref)),\n\t\tRawQuery: url.Values{\n\t\t\t\"mount\": {srcDigest.String()},\n\t\t\t\"from\":  {reference.Path(srcRepo)},\n\t\t}.Encode(),\n\t}\n\tlogrus.Debugf(\"Trying to mount %s\", u.Redacted())\n\tres, err := d.c.makeRequest(ctx, http.MethodPost, u.String(), nil, nil, v2Auth, extraScope)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Body.Close()\n\tswitch res.StatusCode {\n\tcase http.StatusCreated:\n\t\tlogrus.Debugf(\"... mount OK\")\n\t\treturn nil\n\tcase http.StatusAccepted:\n\t\t// Oops, the mount was ignored - either the registry does not support that yet, or the blob does not exist; the registry has started an ordinary upload process.\n\t\t// Abort, and let the ultimate caller do an upload when its ready, instead.\n\t\t// NOTE: This does not really work in docker/distribution servers, which incorrectly require the \"delete\" action in the token's scope, and is thus entirely untested.\n\t\tuploadLocation, err := res.Location()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"determining upload URL after a mount attempt: %w\", err)\n\t\t}\n\t\tlogrus.Debugf(\"... started an upload instead of mounting, trying to cancel at %s\", uploadLocation.Redacted())\n\t\tres2, err := d.c.makeRequestToResolvedURL(ctx, http.MethodDelete, uploadLocation, nil, nil, -1, v2Auth, extraScope)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Error trying to cancel an inadvertent upload: %s\", err)\n\t\t} else {\n\t\t\tdefer res2.Body.Close()\n\t\t\tif res2.StatusCode != http.StatusNoContent {\n\t\t\t\tlogrus.Debugf(\"Error trying to cancel an inadvertent upload, status %s\", http.StatusText(res.StatusCode))\n\t\t\t}\n\t\t}\n\t\t// Anyway, if canceling the upload fails, ignore it and return the more important error:\n\t\treturn fmt.Errorf(\"Mounting %s from %s to %s started an upload instead\", srcDigest, srcRepo.Name(), d.ref.ref.Name())\n\tdefault:\n\t\tlogrus.Debugf(\"Error mounting, response %#v\", *res)\n\t\treturn fmt.Errorf(\"mounting %s from %s to %s: %w\", srcDigest, srcRepo.Name(), d.ref.ref.Name(), registryHTTPResponseToError(res))\n\t}\n}\n\n// tryReusingExactBlob is a subset of TryReusingBlob which _only_ looks for exactly the specified\n// blob in the current repository, with no cross-repo reuse or mounting; cache may be updated, it is not read.\n// The caller must ensure info.Digest is set.\nfunc (d *dockerImageDestination) tryReusingExactBlob(ctx context.Context, info types.BlobInfo, cache blobinfocache.BlobInfoCache2) (bool, private.ReusedBlob, error) {\n\texists, size, err := d.blobExists(ctx, d.ref.ref, info.Digest, nil)\n\tif err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\tif exists {\n\t\tcache.RecordKnownLocation(d.ref.Transport(), bicTransportScope(d.ref), info.Digest, newBICLocationReference(d.ref))\n\t\treturn true, private.ReusedBlob{Digest: info.Digest, Size: size}, nil\n\t}\n\treturn false, private.ReusedBlob{}, nil\n}\n\nfunc optionalCompressionName(algo *compressiontypes.Algorithm) string {\n\tif algo != nil {\n\t\treturn algo.Name()\n\t}\n\treturn \"nil\"\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *dockerImageDestination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif info.Digest == \"\" {\n\t\treturn false, private.ReusedBlob{}, errors.New(\"Can not check for a blob with unknown digest\")\n\t}\n\n\toriginalCandidateKnownToBeMissing := false\n\tif impl.OriginalCandidateMatchesTryReusingBlobOptions(options) {\n\t\t// First, check whether the blob happens to already exist at the destination.\n\t\thaveBlob, reusedInfo, err := d.tryReusingExactBlob(ctx, info, options.Cache)\n\t\tif err != nil {\n\t\t\treturn false, private.ReusedBlob{}, err\n\t\t}\n\t\tif haveBlob {\n\t\t\treturn true, reusedInfo, nil\n\t\t}\n\t\toriginalCandidateKnownToBeMissing = true\n\t} else {\n\t\tlogrus.Debugf(\"Ignoring exact blob match, compression %s does not match required %s or MIME types %#v\",\n\t\t\toptionalCompressionName(options.OriginalCompression), optionalCompressionName(options.RequiredCompression), options.PossibleManifestFormats)\n\t\t// We can get here with a blob detected to be zstd when the user wants a zstd:chunked.\n\t\t// In that case we keep originalCandiateKnownToBeMissing = false, so that if we find\n\t\t// a BIC entry for this blob, we do use that entry and return a zstd:chunked entry\n\t\t// with the BIC’s annotations.\n\t\t// This is not quite correct, it only works if the BIC also contains an acceptable _location_.\n\t\t// Ideally, we could look up just the compression algorithm/annotations for info.digest,\n\t\t// and use it even if no location candidate exists and the original dandidate is present.\n\t}\n\n\t// Then try reusing blobs from other locations.\n\tcandidates := options.Cache.CandidateLocations2(d.ref.Transport(), bicTransportScope(d.ref), info.Digest, blobinfocache.CandidateLocations2Options{\n\t\tCanSubstitute:           options.CanSubstitute,\n\t\tPossibleManifestFormats: options.PossibleManifestFormats,\n\t\tRequiredCompression:     options.RequiredCompression,\n\t})\n\tfor _, candidate := range candidates {\n\t\tvar candidateRepo reference.Named\n\t\tif !candidate.UnknownLocation {\n\t\t\tvar err error\n\t\t\tcandidateRepo, err = parseBICLocationReference(candidate.Location)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Debugf(\"Error parsing BlobInfoCache location reference: %s\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif candidate.CompressionAlgorithm != nil {\n\t\t\t\tlogrus.Debugf(\"Trying to reuse blob with cached digest %s compressed with %s in destination repo %s\", candidate.Digest.String(), candidate.CompressionAlgorithm.Name(), candidateRepo.Name())\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Trying to reuse blob with cached digest %s in destination repo %s\", candidate.Digest.String(), candidateRepo.Name())\n\t\t\t}\n\t\t\t// Sanity checks:\n\t\t\tif reference.Domain(candidateRepo) != reference.Domain(d.ref.ref) {\n\t\t\t\t// OCI distribution spec 1.1 allows mounting blobs without specifying the source repo\n\t\t\t\t// (the \"from\" parameter); in that case we might try to use these candidates as well.\n\t\t\t\t//\n\t\t\t\t// OTOH that would mean we can’t do the “blobExists” check, and if there is no match\n\t\t\t\t// we could get an upload request that we would have to cancel.\n\t\t\t\tlogrus.Debugf(\"... Internal error: domain %s does not match destination %s\", reference.Domain(candidateRepo), reference.Domain(d.ref.ref))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t} else {\n\t\t\tif candidate.CompressionAlgorithm != nil {\n\t\t\t\tlogrus.Debugf(\"Trying to reuse blob with cached digest %s compressed with %s with no location match, checking current repo\", candidate.Digest.String(), candidate.CompressionAlgorithm.Name())\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Trying to reuse blob with cached digest %s in destination repo with no location match, checking current repo\", candidate.Digest.String())\n\t\t\t}\n\t\t\t// This digest is a known variant of this blob but we don’t\n\t\t\t// have a recorded location in this registry, let’s try looking\n\t\t\t// for it in the current repo.\n\t\t\tcandidateRepo = reference.TrimNamed(d.ref.ref)\n\t\t}\n\t\tif originalCandidateKnownToBeMissing &&\n\t\t\tcandidateRepo.Name() == d.ref.ref.Name() && candidate.Digest == info.Digest {\n\t\t\tlogrus.Debug(\"... Already tried the primary destination\")\n\t\t\tcontinue\n\t\t}\n\n\t\t// Whatever happens here, don't abort the entire operation.  It's likely we just don't have permissions, and if it is a critical network error, we will find out soon enough anyway.\n\n\t\t// Checking candidateRepo, and mounting from it, requires an\n\t\t// expanded token scope.\n\t\textraScope := &authScope{\n\t\t\tresourceType: \"repository\",\n\t\t\tremoteName:   reference.Path(candidateRepo),\n\t\t\tactions:      \"pull\",\n\t\t}\n\t\t// This existence check is not, strictly speaking, necessary: We only _really_ need it to get the blob size, and we could record that in the cache instead.\n\t\t// But a \"failed\" d.mountBlob currently leaves around an unterminated server-side upload, which we would try to cancel.\n\t\t// So, without this existence check, it would be 1 request on success, 2 requests on failure; with it, it is 2 requests on success, 1 request on failure.\n\t\t// On success we avoid the actual costly upload; so, in a sense, the success case is \"free\", but failures are always costly.\n\t\t// Even worse, docker/distribution does not actually reasonably implement canceling uploads\n\t\t// (it would require a \"delete\" action in the token, and Quay does not give that to anyone, so we can't ask);\n\t\t// so, be a nice client and don't create unnecessary upload sessions on the server.\n\t\texists, size, err := d.blobExists(ctx, candidateRepo, candidate.Digest, extraScope)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"... Failed: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tif !exists {\n\t\t\t// FIXME? Should we drop the blob from cache here (and elsewhere?)?\n\t\t\tcontinue // logrus.Debug() already happened in blobExists\n\t\t}\n\t\tif candidateRepo.Name() != d.ref.ref.Name() {\n\t\t\tif err := d.mountBlob(ctx, candidateRepo, candidate.Digest, extraScope); err != nil {\n\t\t\t\tlogrus.Debugf(\"... Mount failed: %v\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\toptions.Cache.RecordKnownLocation(d.ref.Transport(), bicTransportScope(d.ref), candidate.Digest, newBICLocationReference(d.ref))\n\n\t\treturn true, private.ReusedBlob{\n\t\t\tDigest:                 candidate.Digest,\n\t\t\tSize:                   size,\n\t\t\tCompressionOperation:   candidate.CompressionOperation,\n\t\t\tCompressionAlgorithm:   candidate.CompressionAlgorithm,\n\t\t\tCompressionAnnotations: candidate.CompressionAnnotations,\n\t\t}, nil\n\t}\n\n\treturn false, private.ReusedBlob{}, nil\n}\n\n// PutManifest writes manifest to the destination.\n// When the primary manifest is a manifest list, if instanceDigest is nil, we're saving the list\n// itself, else instanceDigest contains a digest of the specific manifest instance to overwrite the\n// manifest for; when the primary manifest is not a manifest list, instanceDigest should always be nil.\n// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\nfunc (d *dockerImageDestination) PutManifest(ctx context.Context, m []byte, instanceDigest *digest.Digest) error {\n\tvar refTail string\n\t// If d.ref.isUnknownDigest=true, then we push without a tag, so get the\n\t// digest that will be used\n\tif d.ref.isUnknownDigest {\n\t\tdigest, err := manifest.Digest(m)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\trefTail = digest.String()\n\t} else if instanceDigest != nil {\n\t\t// If the instanceDigest is provided, then use it as the refTail, because the reference,\n\t\t// whether it includes a tag or a digest, refers to the list as a whole, and not this\n\t\t// particular instance.\n\t\trefTail = instanceDigest.String()\n\t\t// Double-check that the manifest we've been given matches the digest we've been given.\n\t\t// This also validates the format of instanceDigest.\n\t\tmatches, err := manifest.MatchesDigest(m, *instanceDigest)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"digesting manifest in PutManifest: %w\", err)\n\t\t}\n\t\tif !matches {\n\t\t\tmanifestDigest, merr := manifest.Digest(m)\n\t\t\tif merr != nil {\n\t\t\t\treturn fmt.Errorf(\"Attempted to PutManifest using an explicitly specified digest (%q) that didn't match the manifest's digest: %w\", instanceDigest.String(), merr)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"Attempted to PutManifest using an explicitly specified digest (%q) that didn't match the manifest's digest (%q)\", instanceDigest.String(), manifestDigest.String())\n\t\t}\n\t} else {\n\t\t// Compute the digest of the main manifest, or the list if it's a list, so that we\n\t\t// have a digest value to use if we're asked to save a signature for the manifest.\n\t\tdigest, err := manifest.Digest(m)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\td.manifestDigest = digest\n\t\t// The refTail should be either a digest (which we expect to match the value we just\n\t\t// computed) or a tag name.\n\t\trefTail, err = d.ref.tagOrDigest()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn d.uploadManifest(ctx, m, refTail)\n}\n\n// uploadManifest writes manifest to tagOrDigest.\nfunc (d *dockerImageDestination) uploadManifest(ctx context.Context, m []byte, tagOrDigest string) error {\n\tpath := fmt.Sprintf(manifestPath, reference.Path(d.ref.ref), tagOrDigest)\n\n\theaders := map[string][]string{}\n\tmimeType := manifest.GuessMIMEType(m)\n\tif mimeType != \"\" {\n\t\theaders[\"Content-Type\"] = []string{mimeType}\n\t}\n\tres, err := d.c.makeRequest(ctx, http.MethodPut, path, headers, bytes.NewReader(m), v2Auth, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Body.Close()\n\tif !successStatus(res.StatusCode) {\n\t\trawErr := registryHTTPResponseToError(res)\n\t\terr := fmt.Errorf(\"uploading manifest %s to %s: %w\", tagOrDigest, d.ref.ref.Name(), rawErr)\n\t\tif isManifestInvalidError(rawErr) {\n\t\t\terr = types.ManifestTypeRejectedError{Err: err}\n\t\t}\n\t\treturn err\n\t}\n\t// A HTTP server may not be a registry at all, and just return 200 OK to everything\n\t// (in particular that can fairly easily happen after tearing down a website and\n\t// replacing it with a global 302 redirect to a new website, completely ignoring the\n\t// path in the request); in that case we could “succeed” uploading a whole image.\n\t// With docker/distribution we could rely on a Docker-Content-Digest header being present\n\t// (because docker/distribution/registry/client has been failing uploads if it was missing),\n\t// but that has been defined as explicitly optional by\n\t// https://github.com/opencontainers/distribution-spec/blob/ec90a2af85fe4d612cf801e1815b95bfa40ae72b/spec.md#legacy-docker-support-http-headers\n\t// So, just note the missing header in a debug log.\n\tif v := res.Header.Values(\"Docker-Content-Digest\"); len(v) == 0 {\n\t\tlogrus.Debugf(\"Manifest upload response didn’t contain a Docker-Content-Digest header, it might not be a container registry\")\n\t}\n\treturn nil\n}\n\n// successStatus returns true if the argument is a successful HTTP response\n// code (in the range 200 - 399 inclusive).\nfunc successStatus(status int) bool {\n\treturn status >= 200 && status <= 399\n}\n\n// isManifestInvalidError returns true iff err from registryHTTPResponseToError is a “manifest invalid” error.\nfunc isManifestInvalidError(err error) bool {\n\tvar ec errcode.ErrorCoder\n\tif ok := errors.As(err, &ec); !ok {\n\t\treturn false\n\t}\n\n\tswitch ec.ErrorCode() {\n\t// ErrorCodeManifestInvalid is returned by OpenShift with acceptschema2=false.\n\tcase v2.ErrorCodeManifestInvalid:\n\t\treturn true\n\t// ErrorCodeTagInvalid is returned by docker/distribution (at least as of commit ec87e9b6971d831f0eff752ddb54fb64693e51cd)\n\t// when uploading to a tag (because it can’t find a matching tag inside the manifest)\n\tcase v2.ErrorCodeTagInvalid:\n\t\treturn true\n\t// ErrorCodeUnsupported with 'Invalid JSON syntax' is returned by AWS ECR when\n\t// uploading an OCI manifest that is (correctly, according to the spec) missing\n\t// a top-level media type. See libpod issue #1719\n\t// FIXME: remove this case when ECR behavior is fixed\n\tcase errcode.ErrorCodeUnsupported:\n\t\treturn strings.Contains(err.Error(), \"Invalid JSON syntax\")\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (d *dockerImageDestination) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tif instanceDigest == nil {\n\t\tif d.manifestDigest == \"\" {\n\t\t\t// This shouldn’t happen, ImageDestination users are required to call PutManifest before PutSignatures\n\t\t\treturn errors.New(\"Unknown manifest digest, can't add signatures\")\n\t\t}\n\t\tinstanceDigest = &d.manifestDigest\n\t}\n\n\tsigstoreSignatures := []signature.Sigstore{}\n\totherSignatures := []signature.Signature{}\n\tfor _, sig := range signatures {\n\t\tif sigstoreSig, ok := sig.(signature.Sigstore); ok {\n\t\t\tsigstoreSignatures = append(sigstoreSignatures, sigstoreSig)\n\t\t} else {\n\t\t\totherSignatures = append(otherSignatures, sig)\n\t\t}\n\t}\n\n\t// Only write sigstores signatures to sigstores attachments. We _could_ store them to lookaside\n\t// instead, but that would probably be rather surprising.\n\t// FIXME: So should we enable sigstores in all cases? Or write in all cases, but opt-in to read?\n\n\tif len(sigstoreSignatures) != 0 {\n\t\tif err := d.putSignaturesToSigstoreAttachments(ctx, sigstoreSignatures, *instanceDigest); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif len(otherSignatures) != 0 {\n\t\tif err := d.c.detectProperties(ctx); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch {\n\t\tcase d.c.supportsSignatures:\n\t\t\tif err := d.putSignaturesToAPIExtension(ctx, otherSignatures, *instanceDigest); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase d.c.signatureBase != nil:\n\t\t\tif err := d.putSignaturesToLookaside(otherSignatures, *instanceDigest); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tdefault:\n\t\t\treturn errors.New(\"Internal error: X-Registry-Supports-Signatures extension not supported, and lookaside should not be empty configuration\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// putSignaturesToLookaside implements PutSignaturesWithFormat() from the lookaside location configured in s.c.signatureBase,\n// which is not nil, for a manifest with manifestDigest.\nfunc (d *dockerImageDestination) putSignaturesToLookaside(signatures []signature.Signature, manifestDigest digest.Digest) error {\n\t// FIXME? This overwrites files one at a time, definitely not atomic.\n\t// A failure when updating signatures with a reordered copy could lose some of them.\n\n\t// Skip dealing with the manifest digest if not necessary.\n\tif len(signatures) == 0 {\n\t\treturn nil\n\t}\n\n\t// NOTE: Keep this in sync with docs/signature-protocols.md!\n\tfor i, signature := range signatures {\n\t\tsigURL, err := lookasideStorageURL(d.c.signatureBase, manifestDigest, i)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := d.putOneSignature(sigURL, signature); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// Remove any other signatures, if present.\n\t// We stop at the first missing signature; if a previous deleting loop aborted\n\t// prematurely, this may not clean up all of them, but one missing signature\n\t// is enough for dockerImageSource to stop looking for other signatures, so that\n\t// is sufficient.\n\tfor i := len(signatures); ; i++ {\n\t\tsigURL, err := lookasideStorageURL(d.c.signatureBase, manifestDigest, i)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmissing, err := d.c.deleteOneSignature(sigURL)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif missing {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// putOneSignature stores sig to sigURL.\n// NOTE: Keep this in sync with docs/signature-protocols.md!\nfunc (d *dockerImageDestination) putOneSignature(sigURL *url.URL, sig signature.Signature) error {\n\tswitch sigURL.Scheme {\n\tcase \"file\":\n\t\tlogrus.Debugf(\"Writing to %s\", sigURL.Path)\n\t\terr := os.MkdirAll(filepath.Dir(sigURL.Path), 0o755)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tblob, err := signature.Blob(sig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = os.WriteFile(sigURL.Path, blob, 0o644)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\n\tcase \"http\", \"https\":\n\t\treturn fmt.Errorf(\"Writing directly to a %s lookaside %s is not supported. Configure a lookaside-staging: location\", sigURL.Scheme, sigURL.Redacted())\n\tdefault:\n\t\treturn fmt.Errorf(\"Unsupported scheme when writing signature to %s\", sigURL.Redacted())\n\t}\n}\n\nfunc (d *dockerImageDestination) putSignaturesToSigstoreAttachments(ctx context.Context, signatures []signature.Sigstore, manifestDigest digest.Digest) error {\n\tif !d.c.useSigstoreAttachments {\n\t\treturn errors.New(\"writing sigstore attachments is disabled by configuration\")\n\t}\n\n\tociManifest, err := d.c.getSigstoreAttachmentManifest(ctx, d.ref, manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar ociConfig imgspecv1.Image // Most fields empty by default\n\tif ociManifest == nil {\n\t\tociManifest = manifest.OCI1FromComponents(imgspecv1.Descriptor{\n\t\t\tMediaType: imgspecv1.MediaTypeImageConfig,\n\t\t\tDigest:    \"\", // We will fill this in later.\n\t\t\tSize:      0,\n\t\t}, nil)\n\t\tociConfig.RootFS.Type = \"layers\"\n\t} else {\n\t\tlogrus.Debugf(\"Fetching sigstore attachment config %s\", ociManifest.Config.Digest.String())\n\t\t// We don’t benefit from a real BlobInfoCache here because we never try to reuse/mount configs.\n\t\tconfigBlob, err := d.c.getOCIDescriptorContents(ctx, d.ref, ociManifest.Config, iolimits.MaxConfigBodySize,\n\t\t\tnone.NoCache)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := json.Unmarshal(configBlob, &ociConfig); err != nil {\n\t\t\treturn fmt.Errorf(\"parsing sigstore attachment config %s in %s: %w\", ociManifest.Config.Digest.String(),\n\t\t\t\td.ref.ref.Name(), err)\n\t\t}\n\t}\n\n\t// To make sure we can safely append to the slices of ociManifest, without adding a remote dependency on the code that creates it.\n\tociManifest.Layers = slices.Clone(ociManifest.Layers)\n\t// We don’t need to ^^^ for ociConfig.RootFS.DiffIDs because we have created it empty ourselves, and json.Unmarshal is documented to append() to\n\t// the slice in the original object (or in a newly allocated object).\n\tfor _, sig := range signatures {\n\t\tmimeType := sig.UntrustedMIMEType()\n\t\tpayloadBlob := sig.UntrustedPayload()\n\t\tannotations := sig.UntrustedAnnotations()\n\n\t\talreadyOnRegistry := false\n\t\tfor _, layer := range ociManifest.Layers {\n\t\t\tif layerMatchesSigstoreSignature(layer, mimeType, payloadBlob, annotations) {\n\t\t\t\tlogrus.Debugf(\"Signature with digest %s already exists on the registry\", layer.Digest.String())\n\t\t\t\talreadyOnRegistry = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif alreadyOnRegistry {\n\t\t\tcontinue\n\t\t}\n\n\t\t// We don’t benefit from a real BlobInfoCache here because we never try to reuse/mount attachment payloads.\n\t\t// That might eventually need to change if payloads grow to be not just signatures, but something\n\t\t// significantly large.\n\t\tsigDesc, err := d.putBlobBytesAsOCI(ctx, payloadBlob, mimeType, private.PutBlobOptions{\n\t\t\tCache:      none.NoCache,\n\t\t\tIsConfig:   false,\n\t\t\tEmptyLayer: false,\n\t\t\tLayerIndex: nil,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsigDesc.Annotations = annotations\n\t\tociManifest.Layers = append(ociManifest.Layers, sigDesc)\n\t\tociConfig.RootFS.DiffIDs = append(ociConfig.RootFS.DiffIDs, sigDesc.Digest)\n\t\tlogrus.Debugf(\"Adding new signature, digest %s\", sigDesc.Digest.String())\n\t}\n\n\tconfigBlob, err := json.Marshal(ociConfig)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Uploading updated sigstore attachment config\")\n\t// We don’t benefit from a real BlobInfoCache here because we never try to reuse/mount configs.\n\tconfigDesc, err := d.putBlobBytesAsOCI(ctx, configBlob, imgspecv1.MediaTypeImageConfig, private.PutBlobOptions{\n\t\tCache:      none.NoCache,\n\t\tIsConfig:   true,\n\t\tEmptyLayer: false,\n\t\tLayerIndex: nil,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tociManifest.Config = configDesc\n\n\tmanifestBlob, err := ociManifest.Serialize()\n\tif err != nil {\n\t\treturn err\n\t}\n\tattachmentTag, err := sigstoreAttachmentTag(manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Uploading sigstore attachment manifest\")\n\treturn d.uploadManifest(ctx, manifestBlob, attachmentTag)\n}\n\nfunc layerMatchesSigstoreSignature(layer imgspecv1.Descriptor, mimeType string,\n\tpayloadBlob []byte, annotations map[string]string,\n) bool {\n\tif layer.MediaType != mimeType ||\n\t\tlayer.Size != int64(len(payloadBlob)) ||\n\t\t// This is not quite correct, we should use the layer’s digest algorithm.\n\t\t// But right now we don’t want to deal with corner cases like bad digest formats\n\t\t// or unavailable algorithms; in the worst case we end up with duplicate signature\n\t\t// entries.\n\t\tlayer.Digest.String() != digest.FromBytes(payloadBlob).String() ||\n\t\t!maps.Equal(layer.Annotations, annotations) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// putBlobBytesAsOCI uploads a blob with the specified contents, and returns an appropriate\n// OCI descriptor.\nfunc (d *dockerImageDestination) putBlobBytesAsOCI(ctx context.Context, contents []byte, mimeType string, options private.PutBlobOptions) (imgspecv1.Descriptor, error) {\n\tblobDigest := digest.FromBytes(contents)\n\tinfo, err := d.PutBlobWithOptions(ctx, bytes.NewReader(contents),\n\t\ttypes.BlobInfo{\n\t\t\tDigest:    blobDigest,\n\t\t\tSize:      int64(len(contents)),\n\t\t\tMediaType: mimeType,\n\t\t}, options)\n\tif err != nil {\n\t\treturn imgspecv1.Descriptor{}, fmt.Errorf(\"writing blob %s: %w\", blobDigest.String(), err)\n\t}\n\treturn imgspecv1.Descriptor{\n\t\tMediaType: mimeType,\n\t\tDigest:    info.Digest,\n\t\tSize:      info.Size,\n\t}, nil\n}\n\n// deleteOneSignature deletes a signature from sigURL, if it exists.\n// If it successfully determines that the signature does not exist, returns (true, nil)\n// NOTE: Keep this in sync with docs/signature-protocols.md!\nfunc (c *dockerClient) deleteOneSignature(sigURL *url.URL) (missing bool, err error) {\n\tswitch sigURL.Scheme {\n\tcase \"file\":\n\t\tlogrus.Debugf(\"Deleting %s\", sigURL.Path)\n\t\terr := os.Remove(sigURL.Path)\n\t\tif err != nil && os.IsNotExist(err) {\n\t\t\treturn true, nil\n\t\t}\n\t\treturn false, err\n\n\tcase \"http\", \"https\":\n\t\treturn false, fmt.Errorf(\"Writing directly to a %s lookaside %s is not supported. Configure a lookaside-staging: location\", sigURL.Scheme, sigURL.Redacted())\n\tdefault:\n\t\treturn false, fmt.Errorf(\"Unsupported scheme when deleting signature from %s\", sigURL.Redacted())\n\t}\n}\n\n// putSignaturesToAPIExtension implements PutSignaturesWithFormat() using the X-Registry-Supports-Signatures API extension,\n// for a manifest with manifestDigest.\nfunc (d *dockerImageDestination) putSignaturesToAPIExtension(ctx context.Context, signatures []signature.Signature, manifestDigest digest.Digest) error {\n\t// Skip dealing with the manifest digest, or reading the old state, if not necessary.\n\tif len(signatures) == 0 {\n\t\treturn nil\n\t}\n\n\t// Because image signatures are a shared resource in Atomic Registry, the default upload\n\t// always adds signatures.  Eventually we should also allow removing signatures,\n\t// but the X-Registry-Supports-Signatures API extension does not support that yet.\n\n\texistingSignatures, err := d.c.getExtensionsSignatures(ctx, d.ref, manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\texistingSigNames := set.New[string]()\n\tfor _, sig := range existingSignatures.Signatures {\n\t\texistingSigNames.Add(sig.Name)\n\t}\n\n\tfor _, newSigWithFormat := range signatures {\n\t\tnewSigSimple, ok := newSigWithFormat.(signature.SimpleSigning)\n\t\tif !ok {\n\t\t\treturn signature.UnsupportedFormatError(newSigWithFormat)\n\t\t}\n\t\tnewSig := newSigSimple.UntrustedSignature()\n\n\t\tif slices.ContainsFunc(existingSignatures.Signatures, func(existingSig extensionSignature) bool {\n\t\t\treturn existingSig.Version == extensionSignatureSchemaVersion && existingSig.Type == extensionSignatureTypeAtomic && bytes.Equal(existingSig.Content, newSig)\n\t\t}) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// The API expect us to invent a new unique name. This is racy, but hopefully good enough.\n\t\tvar signatureName string\n\t\tfor {\n\t\t\trandBytes := make([]byte, 16)\n\t\t\tn, err := rand.Read(randBytes)\n\t\t\tif err != nil || n != 16 {\n\t\t\t\treturn fmt.Errorf(\"generating random signature len %d: %w\", n, err)\n\t\t\t}\n\t\t\tsignatureName = fmt.Sprintf(\"%s@%032x\", manifestDigest.String(), randBytes)\n\t\t\tif !existingSigNames.Contains(signatureName) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tsig := extensionSignature{\n\t\t\tVersion: extensionSignatureSchemaVersion,\n\t\t\tName:    signatureName,\n\t\t\tType:    extensionSignatureTypeAtomic,\n\t\t\tContent: newSig,\n\t\t}\n\t\tbody, err := json.Marshal(sig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// manifestDigest is known to be valid because it was not rejected by getExtensionsSignatures above.\n\t\tpath := fmt.Sprintf(extensionsSignaturePath, reference.Path(d.ref.ref), manifestDigest.String())\n\t\tres, err := d.c.makeRequest(ctx, http.MethodPut, path, nil, bytes.NewReader(body), v2Auth, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer res.Body.Close()\n\t\tif res.StatusCode != http.StatusCreated {\n\t\t\tlogrus.Debugf(\"Error uploading signature, status %d, %#v\", res.StatusCode, res)\n\t\t\treturn fmt.Errorf(\"uploading signature to %s in %s: %w\", path, d.c.registry, registryHTTPResponseToError(res))\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *dockerImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/docker_image_src.go",
    "content": "package docker\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"mime\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"sync\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/none\"\n\t\"go.podman.io/image/v5/pkg/sysregistriesv2\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// maxLookasideSignatures is an arbitrary limit for the total number of signatures we would try to read from a lookaside server,\n// even if it were broken or malicious and it continued serving an enormous number of items.\nconst maxLookasideSignatures = 128\n\ntype dockerImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.ImplementsGetBlobAt\n\n\tlogicalRef  dockerReference // The reference the user requested. This must satisfy !isUnknownDigest\n\tphysicalRef dockerReference // The actual reference we are accessing (possibly a mirror). This must satisfy !isUnknownDigest\n\tc           *dockerClient\n\t// State\n\tcachedManifest         []byte // nil if not loaded yet\n\tcachedManifestMIMEType string // Only valid if cachedManifest != nil\n}\n\n// newImageSource creates a new ImageSource for the specified image reference.\n// The caller must call .Close() on the returned ImageSource.\n// The caller must ensure !ref.isUnknownDigest.\nfunc newImageSource(ctx context.Context, sys *types.SystemContext, ref dockerReference) (*dockerImageSource, error) {\n\tif ref.isUnknownDigest {\n\t\treturn nil, fmt.Errorf(\"reading images from docker: reference %q without a tag or digest is not supported\", ref.StringWithinTransport())\n\t}\n\n\tregistryConfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tregistry, err := sysregistriesv2.FindRegistry(sys, ref.ref.Name())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading registries configuration: %w\", err)\n\t}\n\tif registry == nil {\n\t\t// No configuration was found for the provided reference, so use the\n\t\t// equivalent of a default configuration.\n\t\tregistry = &sysregistriesv2.Registry{\n\t\t\tEndpoint: sysregistriesv2.Endpoint{\n\t\t\t\tLocation: ref.ref.String(),\n\t\t\t},\n\t\t\tPrefix: ref.ref.String(),\n\t\t}\n\t}\n\n\t// Check all endpoints for the manifest availability. If we find one that does\n\t// contain the image, it will be used for all future pull actions.  Always try the\n\t// non-mirror original location last; this both transparently handles the case\n\t// of no mirrors configured, and ensures we return the error encountered when\n\t// accessing the upstream location if all endpoints fail.\n\tpullSources, err := registry.PullSourcesFromReference(ref.ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttype attempt struct {\n\t\tref reference.Named\n\t\terr error\n\t}\n\tattempts := []attempt{}\n\tfor _, pullSource := range pullSources {\n\t\tif sys != nil && sys.DockerLogMirrorChoice {\n\t\t\tlogrus.Infof(\"Trying to access %q\", pullSource.Reference)\n\t\t} else {\n\t\t\tlogrus.Debugf(\"Trying to access %q\", pullSource.Reference)\n\t\t}\n\t\ts, err := newImageSourceAttempt(ctx, sys, ref, pullSource, registryConfig)\n\t\tif err == nil {\n\t\t\treturn s, nil\n\t\t}\n\t\tlogrus.Debugf(\"Accessing %q failed: %v\", pullSource.Reference, err)\n\t\tattempts = append(attempts, attempt{\n\t\t\tref: pullSource.Reference,\n\t\t\terr: err,\n\t\t})\n\t}\n\tswitch len(attempts) {\n\tcase 0:\n\t\treturn nil, errors.New(\"Internal error: newImageSource returned without trying any endpoint\")\n\tcase 1:\n\t\treturn nil, attempts[0].err // If no mirrors are used, perfectly preserve the error type and add no noise.\n\tdefault:\n\t\t// Don’t just build a string, try to preserve the typed error.\n\t\tprimary := &attempts[len(attempts)-1]\n\t\textras := []string{}\n\t\tfor _, attempt := range attempts[:len(attempts)-1] {\n\t\t\t// This is difficult to fit into a single-line string, when the error can contain arbitrary strings including any metacharacters we decide to use.\n\t\t\t// The paired [] at least have some chance of being unambiguous.\n\t\t\textras = append(extras, fmt.Sprintf(\"[%s: %v]\", attempt.ref.String(), attempt.err))\n\t\t}\n\t\treturn nil, fmt.Errorf(\"(Mirrors also failed: %s): %s: %w\", strings.Join(extras, \"\\n\"), primary.ref.String(), primary.err)\n\t}\n}\n\n// newImageSourceAttempt is an internal helper for newImageSource. Everyone else must call newImageSource.\n// Given a logicalReference and a pullSource, return a dockerImageSource if it is reachable.\n// The caller must call .Close() on the returned ImageSource.\nfunc newImageSourceAttempt(ctx context.Context, sys *types.SystemContext, logicalRef dockerReference, pullSource sysregistriesv2.PullSource,\n\tregistryConfig *registryConfiguration,\n) (*dockerImageSource, error) {\n\tphysicalRef, err := newReference(pullSource.Reference, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tendpointSys := sys\n\t// sys.DockerAuthConfig does not explicitly specify a registry; we must not blindly send the credentials intended for the primary endpoint to mirrors.\n\tif endpointSys != nil && endpointSys.DockerAuthConfig != nil && reference.Domain(physicalRef.ref) != reference.Domain(logicalRef.ref) {\n\t\tcopy := *endpointSys\n\t\tcopy.DockerAuthConfig = nil\n\t\tcopy.DockerBearerRegistryToken = \"\"\n\t\tendpointSys = &copy\n\t}\n\n\tclient, err := newDockerClientFromRef(endpointSys, physicalRef, registryConfig, false, \"pull\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient.tlsClientConfig.InsecureSkipVerify = pullSource.Endpoint.Insecure\n\n\ts := &dockerImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: true,\n\t\t}),\n\n\t\tlogicalRef:  logicalRef,\n\t\tphysicalRef: physicalRef,\n\t\tc:           client,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\n\tif err := s.ensureManifestIsLoaded(ctx); err != nil {\n\t\tclient.Close()\n\t\treturn nil, err\n\t}\n\n\tif h, err := sysregistriesv2.AdditionalLayerStoreAuthHelper(endpointSys); err == nil && h != \"\" {\n\t\tacf := map[string]struct {\n\t\t\tUsername      string `json:\"username,omitempty\"`\n\t\t\tPassword      string `json:\"password,omitempty\"`\n\t\t\tIdentityToken string `json:\"identityToken,omitempty\"`\n\t\t}{\n\t\t\tphysicalRef.ref.String(): {\n\t\t\t\tUsername:      client.auth.Username,\n\t\t\t\tPassword:      client.auth.Password,\n\t\t\t\tIdentityToken: client.auth.IdentityToken,\n\t\t\t},\n\t\t}\n\t\tacfD, err := json.Marshal(acf)\n\t\tif err != nil {\n\t\t\tlogrus.Warnf(\"failed to marshal auth config: %v\", err)\n\t\t} else {\n\t\t\tcmd := exec.Command(h)\n\t\t\tcmd.Stdin = bytes.NewReader(acfD)\n\t\t\tif err := cmd.Run(); err != nil {\n\t\t\t\tvar stderr string\n\t\t\t\tif ee, ok := err.(*exec.ExitError); ok {\n\t\t\t\t\tstderr = string(ee.Stderr)\n\t\t\t\t}\n\t\t\t\tlogrus.Warnf(\"Failed to call additional-layer-store-auth-helper (stderr:%s): %v\", stderr, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn s, nil\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (s *dockerImageSource) Reference() types.ImageReference {\n\treturn s.logicalRef\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\nfunc (s *dockerImageSource) Close() error {\n\treturn s.c.Close()\n}\n\n// simplifyContentType drops parameters from a HTTP media type (see https://tools.ietf.org/html/rfc7231#section-3.1.1.1)\n// Alternatively, an empty string is returned unchanged, and invalid values are \"simplified\" to an empty string.\nfunc simplifyContentType(contentType string) string {\n\tif contentType == \"\" {\n\t\treturn contentType\n\t}\n\tmimeType, _, err := mime.ParseMediaType(contentType)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn mimeType\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *dockerImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tif instanceDigest != nil {\n\t\tif err := instanceDigest.Validate(); err != nil { // Make sure instanceDigest.String() does not contain any unexpected characters\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\treturn s.fetchManifest(ctx, instanceDigest.String())\n\t}\n\terr := s.ensureManifestIsLoaded(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn s.cachedManifest, s.cachedManifestMIMEType, nil\n}\n\n// fetchManifest fetches a manifest for tagOrDigest.\n// The caller is responsible for ensuring tagOrDigest uses the expected format.\nfunc (s *dockerImageSource) fetchManifest(ctx context.Context, tagOrDigest string) ([]byte, string, error) {\n\treturn s.c.fetchManifest(ctx, s.physicalRef, tagOrDigest)\n}\n\n// ensureManifestIsLoaded sets s.cachedManifest and s.cachedManifestMIMEType\n//\n// ImageSource implementations are not required or expected to do any caching,\n// but because our signatures are “attached” to the manifest digest,\n// we need to ensure that the digest of the manifest returned by GetManifest(ctx, nil)\n// and used by GetSignatures(ctx, nil) are consistent, otherwise we would get spurious\n// signature verification failures when pulling while a tag is being updated.\nfunc (s *dockerImageSource) ensureManifestIsLoaded(ctx context.Context) error {\n\tif s.cachedManifest != nil {\n\t\treturn nil\n\t}\n\n\treference, err := s.physicalRef.tagOrDigest()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmanblob, mt, err := s.fetchManifest(ctx, reference)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// We might validate manblob against the Docker-Content-Digest header here to protect against transport errors.\n\ts.cachedManifest = manblob\n\ts.cachedManifestMIMEType = mt\n\treturn nil\n}\n\n// splitHTTP200ResponseToPartial splits a 200 response in multiple streams as specified by the chunks\nfunc splitHTTP200ResponseToPartial(streams chan io.ReadCloser, errs chan error, body io.ReadCloser, chunks []private.ImageSourceChunk) {\n\tdefer close(streams)\n\tdefer close(errs)\n\tcurrentOffset := uint64(0)\n\n\tbody = makeBufferedNetworkReader(body, 64, 16384)\n\tdefer body.Close()\n\tfor _, c := range chunks {\n\t\tif c.Offset != currentOffset {\n\t\t\tif c.Offset < currentOffset {\n\t\t\t\terrs <- fmt.Errorf(\"invalid chunk offset specified %v (expected >= %v)\", c.Offset, currentOffset)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\ttoSkip := c.Offset - currentOffset\n\t\t\tif _, err := io.Copy(io.Discard, io.LimitReader(body, int64(toSkip))); err != nil {\n\t\t\t\terrs <- err\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcurrentOffset += toSkip\n\t\t}\n\t\tvar reader io.Reader\n\t\tif c.Length == math.MaxUint64 {\n\t\t\treader = body\n\t\t} else {\n\t\t\treader = io.LimitReader(body, int64(c.Length))\n\t\t}\n\t\ts := signalCloseReader{\n\t\t\tclosed:        make(chan struct{}),\n\t\t\tstream:        io.NopCloser(reader),\n\t\t\tconsumeStream: true,\n\t\t}\n\t\tstreams <- s\n\n\t\t// Wait until the stream is closed before going to the next chunk\n\t\t<-s.closed\n\t\tcurrentOffset += c.Length\n\t}\n}\n\n// handle206Response reads a 206 response and send each part as a separate ReadCloser to the streams chan.\nfunc handle206Response(streams chan io.ReadCloser, errs chan error, body io.ReadCloser, chunks []private.ImageSourceChunk, mediaType string, params map[string]string) {\n\tdefer close(streams)\n\tdefer close(errs)\n\tif !strings.HasPrefix(mediaType, \"multipart/\") {\n\t\tstreams <- body\n\t\treturn\n\t}\n\tboundary, found := params[\"boundary\"]\n\tif !found {\n\t\terrs <- errors.New(\"could not find boundary\")\n\t\tbody.Close()\n\t\treturn\n\t}\n\tbuffered := makeBufferedNetworkReader(body, 64, 16384)\n\tdefer buffered.Close()\n\tmr := multipart.NewReader(buffered, boundary)\n\tparts := 0\n\tfor {\n\t\tp, err := mr.NextPart()\n\t\tif err != nil {\n\t\t\tif err != io.EOF {\n\t\t\t\terrs <- err\n\t\t\t}\n\t\t\tif parts != len(chunks) {\n\t\t\t\terrs <- errors.New(\"invalid number of chunks returned by the server\")\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tif parts >= len(chunks) {\n\t\t\terrs <- errors.New(\"too many parts returned by the server\")\n\t\t\tbreak\n\t\t}\n\t\ts := signalCloseReader{\n\t\t\tclosed: make(chan struct{}),\n\t\t\tstream: p,\n\t\t}\n\t\tstreams <- s\n\t\t// NextPart() cannot be called while the current part\n\t\t// is being read, so wait until it is closed\n\t\t<-s.closed\n\t\tparts++\n\t}\n}\n\nvar multipartByteRangesRe = regexp.Delayed(\"multipart/byteranges; boundary=([A-Za-z-0-9:]+)\")\n\nfunc parseMediaType(contentType string) (string, map[string]string, error) {\n\tmediaType, params, err := mime.ParseMediaType(contentType)\n\tif err != nil {\n\t\tif err == mime.ErrInvalidMediaParameter {\n\t\t\t// CloudFront returns an invalid MIME type, that contains an unquoted \":\" in the boundary\n\t\t\t// param, let's handle it here.\n\t\t\tmatches := multipartByteRangesRe.FindStringSubmatch(contentType)\n\t\t\tif len(matches) == 2 {\n\t\t\t\tmediaType = \"multipart/byteranges\"\n\t\t\t\tparams = map[string]string{\n\t\t\t\t\t\"boundary\": matches[1],\n\t\t\t\t}\n\t\t\t\terr = nil\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\treturn \"\", nil, err\n\t\t}\n\t}\n\treturn mediaType, params, err\n}\n\n// GetBlobAt returns a sequential channel of readers that contain data for the requested\n// blob chunks, and a channel that might get a single error value.\n// The specified chunks must be not overlapping and sorted by their offset.\n// The readers must be fully consumed, in the order they are returned, before blocking\n// to read the next chunk.\n// If the Length for the last chunk is set to math.MaxUint64, then it\n// fully fetches the remaining data from the offset to the end of the blob.\nfunc (s *dockerImageSource) GetBlobAt(ctx context.Context, info types.BlobInfo, chunks []private.ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\theaders := make(map[string][]string)\n\n\trangeVals := make([]string, 0, len(chunks))\n\tlastFound := false\n\tfor _, c := range chunks {\n\t\tif lastFound {\n\t\t\treturn nil, nil, fmt.Errorf(\"internal error: another chunk requested after an util-EOF chunk\")\n\t\t}\n\t\t// If the Length is set to -1, then request anything after the specified offset.\n\t\tif c.Length == math.MaxUint64 {\n\t\t\tlastFound = true\n\t\t\trangeVals = append(rangeVals, fmt.Sprintf(\"%d-\", c.Offset))\n\t\t} else {\n\t\t\trangeVals = append(rangeVals, fmt.Sprintf(\"%d-%d\", c.Offset, c.Offset+c.Length-1))\n\t\t}\n\t}\n\n\theaders[\"Range\"] = []string{fmt.Sprintf(\"bytes=%s\", strings.Join(rangeVals, \",\"))}\n\n\tif len(info.URLs) != 0 {\n\t\treturn nil, nil, fmt.Errorf(\"external URLs not supported with GetBlobAt\")\n\t}\n\n\tif err := info.Digest.Validate(); err != nil { // Make sure info.Digest.String() does not contain any unexpected characters\n\t\treturn nil, nil, err\n\t}\n\tpath := fmt.Sprintf(blobsPath, reference.Path(s.physicalRef.ref), info.Digest.String())\n\tlogrus.Debugf(\"Downloading %s\", path)\n\tres, err := s.c.makeRequest(ctx, http.MethodGet, path, headers, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tswitch res.StatusCode {\n\tcase http.StatusOK:\n\t\t// if the server replied with a 200 status code, convert the full body response to a series of\n\t\t// streams as it would have been done with 206.\n\t\tstreams := make(chan io.ReadCloser)\n\t\terrs := make(chan error)\n\t\tgo splitHTTP200ResponseToPartial(streams, errs, res.Body, chunks)\n\t\treturn streams, errs, nil\n\tcase http.StatusPartialContent:\n\t\tmediaType, params, err := parseMediaType(res.Header.Get(\"Content-Type\"))\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\n\t\tstreams := make(chan io.ReadCloser)\n\t\terrs := make(chan error)\n\n\t\tgo handle206Response(streams, errs, res.Body, chunks, mediaType, params)\n\t\treturn streams, errs, nil\n\tcase http.StatusBadRequest:\n\t\tres.Body.Close()\n\t\treturn nil, nil, private.BadPartialRequestError{Status: res.Status}\n\tdefault:\n\t\terr := registryHTTPResponseToError(res)\n\t\tres.Body.Close()\n\t\treturn nil, nil, fmt.Errorf(\"fetching partial blob: %w\", err)\n\t}\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *dockerImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\treturn s.c.getBlob(ctx, s.physicalRef, info, cache)\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (s *dockerImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\tif err := s.c.detectProperties(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\tvar res []signature.Signature\n\tswitch {\n\tcase s.c.supportsSignatures:\n\t\tif err := s.appendSignaturesFromAPIExtension(ctx, &res, instanceDigest); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tcase s.c.signatureBase != nil:\n\t\tif err := s.appendSignaturesFromLookaside(ctx, &res, instanceDigest); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"Internal error: X-Registry-Supports-Signatures extension not supported, and lookaside should not be empty configuration\")\n\t}\n\n\tif err := s.appendSignaturesFromSigstoreAttachments(ctx, &res, instanceDigest); err != nil {\n\t\treturn nil, err\n\t}\n\treturn res, nil\n}\n\n// manifestDigest returns a digest of the manifest, from instanceDigest if non-nil; or from the supplied reference,\n// or finally, from a fetched manifest.\nfunc (s *dockerImageSource) manifestDigest(ctx context.Context, instanceDigest *digest.Digest) (digest.Digest, error) {\n\tif instanceDigest != nil {\n\t\treturn *instanceDigest, nil\n\t}\n\tif digested, ok := s.physicalRef.ref.(reference.Digested); ok {\n\t\td := digested.Digest()\n\t\tif d.Algorithm() == digest.Canonical {\n\t\t\treturn d, nil\n\t\t}\n\t}\n\tif err := s.ensureManifestIsLoaded(ctx); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn manifest.Digest(s.cachedManifest)\n}\n\n// appendSignaturesFromLookaside implements GetSignaturesWithFormat() from the lookaside location configured in s.c.signatureBase,\n// which is not nil, storing the signatures to *dest.\n// On error, the contents of *dest are undefined.\nfunc (s *dockerImageSource) appendSignaturesFromLookaside(ctx context.Context, dest *[]signature.Signature, instanceDigest *digest.Digest) error {\n\tmanifestDigest, err := s.manifestDigest(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// NOTE: Keep this in sync with docs/signature-protocols.md!\n\tfor i := 0; ; i++ {\n\t\tif i >= maxLookasideSignatures {\n\t\t\treturn fmt.Errorf(\"server provided %d signatures, assuming that's unreasonable and a server error\", maxLookasideSignatures)\n\t\t}\n\n\t\tsigURL, err := lookasideStorageURL(s.c.signatureBase, manifestDigest, i)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsignature, missing, err := s.getOneSignature(ctx, sigURL)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif missing {\n\t\t\tbreak\n\t\t}\n\t\t*dest = append(*dest, signature)\n\t}\n\treturn nil\n}\n\n// getOneSignature downloads one signature from sigURL, and returns (signature, false, nil)\n// If it successfully determines that the signature does not exist, returns (nil, true, nil).\n// NOTE: Keep this in sync with docs/signature-protocols.md!\nfunc (s *dockerImageSource) getOneSignature(ctx context.Context, sigURL *url.URL) (signature.Signature, bool, error) {\n\tswitch sigURL.Scheme {\n\tcase \"file\":\n\t\tlogrus.Debugf(\"Reading %s\", sigURL.Path)\n\t\tsigBlob, err := os.ReadFile(sigURL.Path)\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) {\n\t\t\t\treturn nil, true, nil\n\t\t\t}\n\t\t\treturn nil, false, err\n\t\t}\n\t\tsig, err := signature.FromBlob(sigBlob)\n\t\tif err != nil {\n\t\t\treturn nil, false, fmt.Errorf(\"parsing signature %q: %w\", sigURL.Path, err)\n\t\t}\n\t\treturn sig, false, nil\n\n\tcase \"http\", \"https\":\n\t\tlogrus.Debugf(\"GET %s\", sigURL.Redacted())\n\t\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, sigURL.String(), nil)\n\t\tif err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\tres, err := s.c.client.Do(req)\n\t\tif err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\tdefer res.Body.Close()\n\t\tif res.StatusCode == http.StatusNotFound {\n\t\t\tlogrus.Debugf(\"... got status 404, as expected = end of signatures\")\n\t\t\treturn nil, true, nil\n\t\t} else if res.StatusCode != http.StatusOK {\n\t\t\treturn nil, false, fmt.Errorf(\"reading signature from %s: %w\", sigURL.Redacted(), newUnexpectedHTTPStatusError(res))\n\t\t}\n\n\t\tcontentType := res.Header.Get(\"Content-Type\")\n\t\tif mimeType := simplifyContentType(contentType); mimeType == \"text/html\" {\n\t\t\tlogrus.Warnf(\"Signature %q has Content-Type %q, unexpected for a signature\", sigURL.Redacted(), contentType)\n\t\t\t// Don’t immediately fail; the lookaside spec does not place any requirements on Content-Type.\n\t\t\t// If the content really is HTML, it’s going to fail in signature.FromBlob.\n\t\t}\n\n\t\tsigBlob, err := iolimits.ReadAtMost(res.Body, iolimits.MaxSignatureBodySize)\n\t\tif err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\tsig, err := signature.FromBlob(sigBlob)\n\t\tif err != nil {\n\t\t\treturn nil, false, fmt.Errorf(\"parsing signature %s: %w\", sigURL.Redacted(), err)\n\t\t}\n\t\treturn sig, false, nil\n\n\tdefault:\n\t\treturn nil, false, fmt.Errorf(\"Unsupported scheme when reading signature from %s\", sigURL.Redacted())\n\t}\n}\n\n// appendSignaturesFromAPIExtension implements GetSignaturesWithFormat() using the X-Registry-Supports-Signatures API extension,\n// storing the signatures to *dest.\n// On error, the contents of *dest are undefined.\nfunc (s *dockerImageSource) appendSignaturesFromAPIExtension(ctx context.Context, dest *[]signature.Signature, instanceDigest *digest.Digest) error {\n\tmanifestDigest, err := s.manifestDigest(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tparsedBody, err := s.c.getExtensionsSignatures(ctx, s.physicalRef, manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, sig := range parsedBody.Signatures {\n\t\tif sig.Version == extensionSignatureSchemaVersion && sig.Type == extensionSignatureTypeAtomic {\n\t\t\t*dest = append(*dest, signature.SimpleSigningFromBlob(sig.Content))\n\t\t}\n\t}\n\treturn nil\n}\n\n// appendSignaturesFromSigstoreAttachments implements GetSignaturesWithFormat() using the sigstore tag convention,\n// storing the signatures to *dest.\n// On error, the contents of *dest are undefined.\nfunc (s *dockerImageSource) appendSignaturesFromSigstoreAttachments(ctx context.Context, dest *[]signature.Signature, instanceDigest *digest.Digest) error {\n\tif !s.c.useSigstoreAttachments {\n\t\tlogrus.Debugf(\"Not looking for sigstore attachments: disabled by configuration\")\n\t\treturn nil\n\t}\n\n\tmanifestDigest, err := s.manifestDigest(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tociManifest, err := s.c.getSigstoreAttachmentManifest(ctx, s.physicalRef, manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif ociManifest == nil {\n\t\treturn nil\n\t}\n\n\tlogrus.Debugf(\"Found a sigstore attachment manifest with %d layers\", len(ociManifest.Layers))\n\tfor layerIndex, layer := range ociManifest.Layers {\n\t\t// Note that this copies all kinds of attachments: attestations, and whatever else is there,\n\t\t// not just signatures. We leave the signature consumers to decide based on the MIME type.\n\t\tlogrus.Debugf(\"Fetching sigstore attachment %d/%d: %s\", layerIndex+1, len(ociManifest.Layers), layer.Digest.String())\n\t\t// We don’t benefit from a real BlobInfoCache here because we never try to reuse/mount attachment payloads.\n\t\t// That might eventually need to change if payloads grow to be not just signatures, but something\n\t\t// significantly large.\n\t\tpayload, err := s.c.getOCIDescriptorContents(ctx, s.physicalRef, layer, iolimits.MaxSignatureBodySize,\n\t\t\tnone.NoCache)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t*dest = append(*dest, signature.SigstoreFromComponents(layer.MediaType, payload, layer.Annotations))\n\t}\n\treturn nil\n}\n\n// deleteImage deletes the named image from the registry, if supported.\nfunc deleteImage(ctx context.Context, sys *types.SystemContext, ref dockerReference) error {\n\tif ref.isUnknownDigest {\n\t\treturn fmt.Errorf(\"Docker reference without a tag or digest cannot be deleted\")\n\t}\n\n\tregistryConfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// docker/distribution does not document what action should be used for deleting images.\n\t//\n\t// Current docker/distribution requires \"pull\" for reading the manifest and \"delete\" for deleting it.\n\t// quay.io requires \"push\" (an explicit \"pull\" is unnecessary), does not grant any token (fails parsing the request) if \"delete\" is included.\n\t// OpenShift ignores the action string (both the password and the token is an OpenShift API token identifying a user).\n\t//\n\t// We have to hard-code a single string, luckily both docker/distribution and quay.io support \"*\" to mean \"everything\".\n\tc, err := newDockerClientFromRef(sys, ref, registryConfig, true, \"*\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer c.Close()\n\n\theaders := map[string][]string{\n\t\t\"Accept\": manifest.DefaultRequestedManifestMIMETypes,\n\t}\n\trefTail, err := ref.tagOrDigest()\n\tif err != nil {\n\t\treturn err\n\t}\n\tgetPath := fmt.Sprintf(manifestPath, reference.Path(ref.ref), refTail)\n\tget, err := c.makeRequest(ctx, http.MethodGet, getPath, headers, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer get.Body.Close()\n\tswitch get.StatusCode {\n\tcase http.StatusOK:\n\tcase http.StatusNotFound:\n\t\treturn fmt.Errorf(\"Unable to delete %v. Image may not exist or is not stored with a v2 Schema in a v2 registry\", ref.ref)\n\tdefault:\n\t\treturn fmt.Errorf(\"deleting %v: %w\", ref.ref, registryHTTPResponseToError(get))\n\t}\n\tmanifestBody, err := iolimits.ReadAtMost(get.Body, iolimits.MaxManifestBodySize)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmanifestDigest, err := manifest.Digest(manifestBody)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"computing manifest digest: %w\", err)\n\t}\n\tdeletePath := fmt.Sprintf(manifestPath, reference.Path(ref.ref), manifestDigest)\n\n\t// When retrieving the digest from a registry >= 2.3 use the following header:\n\t//   \"Accept\": \"application/vnd.docker.distribution.manifest.v2+json\"\n\tdelete, err := c.makeRequest(ctx, http.MethodDelete, deletePath, headers, nil, v2Auth, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer delete.Body.Close()\n\tif delete.StatusCode != http.StatusAccepted {\n\t\treturn fmt.Errorf(\"deleting %v: %w\", ref.ref, registryHTTPResponseToError(delete))\n\t}\n\n\tfor i := 0; ; i++ {\n\t\tsigURL, err := lookasideStorageURL(c.signatureBase, manifestDigest, i)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmissing, err := c.deleteOneSignature(sigURL)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif missing {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype bufferedNetworkReaderBuffer struct {\n\tdata     []byte\n\tlen      int\n\tconsumed int\n\terr      error\n}\n\ntype bufferedNetworkReader struct {\n\tstream      io.ReadCloser\n\temptyBuffer chan *bufferedNetworkReaderBuffer\n\treadyBuffer chan *bufferedNetworkReaderBuffer\n\tterminate   chan bool\n\tcurrent     *bufferedNetworkReaderBuffer\n\tmutex       sync.Mutex\n\tgotEOF      bool\n}\n\n// handleBufferedNetworkReader runs in a goroutine\nfunc handleBufferedNetworkReader(br *bufferedNetworkReader) {\n\tdefer close(br.readyBuffer)\n\tfor {\n\t\tselect {\n\t\tcase b := <-br.emptyBuffer:\n\t\t\tb.len, b.err = br.stream.Read(b.data)\n\t\t\tbr.readyBuffer <- b\n\t\t\tif b.err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\tcase <-br.terminate:\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (n *bufferedNetworkReader) Close() error {\n\tclose(n.terminate)\n\tclose(n.emptyBuffer)\n\treturn n.stream.Close()\n}\n\nfunc (n *bufferedNetworkReader) read(p []byte) (int, error) {\n\tif n.current != nil {\n\t\tcopied := copy(p, n.current.data[n.current.consumed:n.current.len])\n\t\tn.current.consumed += copied\n\t\tif n.current.consumed == n.current.len {\n\t\t\tn.emptyBuffer <- n.current\n\t\t\tn.current = nil\n\t\t}\n\t\tif copied > 0 {\n\t\t\treturn copied, nil\n\t\t}\n\t}\n\tif n.gotEOF {\n\t\treturn 0, io.EOF\n\t}\n\n\tvar b *bufferedNetworkReaderBuffer\n\n\tselect {\n\tcase b = <-n.readyBuffer:\n\t\tif b.err != nil {\n\t\t\tif b.err != io.EOF {\n\t\t\t\treturn b.len, b.err\n\t\t\t}\n\t\t\tn.gotEOF = true\n\t\t}\n\t\tb.consumed = 0\n\t\tn.current = b\n\t\treturn n.read(p)\n\tcase <-n.terminate:\n\t\treturn 0, io.EOF\n\t}\n}\n\nfunc (n *bufferedNetworkReader) Read(p []byte) (int, error) {\n\tn.mutex.Lock()\n\tdefer n.mutex.Unlock()\n\n\treturn n.read(p)\n}\n\nfunc makeBufferedNetworkReader(stream io.ReadCloser, nBuffers, bufferSize uint) *bufferedNetworkReader {\n\tbr := bufferedNetworkReader{\n\t\tstream:      stream,\n\t\temptyBuffer: make(chan *bufferedNetworkReaderBuffer, nBuffers),\n\t\treadyBuffer: make(chan *bufferedNetworkReaderBuffer, nBuffers),\n\t\tterminate:   make(chan bool),\n\t}\n\n\tgo func() {\n\t\thandleBufferedNetworkReader(&br)\n\t}()\n\n\tfor range nBuffers {\n\t\tb := bufferedNetworkReaderBuffer{\n\t\t\tdata: make([]byte, bufferSize),\n\t\t}\n\t\tbr.emptyBuffer <- &b\n\t}\n\n\treturn &br\n}\n\ntype signalCloseReader struct {\n\tclosed        chan struct{}\n\tstream        io.ReadCloser\n\tconsumeStream bool\n}\n\nfunc (s signalCloseReader) Read(p []byte) (int, error) {\n\treturn s.stream.Read(p)\n}\n\nfunc (s signalCloseReader) Close() error {\n\tdefer close(s.closed)\n\tif s.consumeStream {\n\t\tif _, err := io.Copy(io.Discard, s.stream); err != nil {\n\t\t\ts.stream.Close()\n\t\t\treturn err\n\t\t}\n\t}\n\treturn s.stream.Close()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/docker_transport.go",
    "content": "package docker\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/policyconfiguration\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// UnknownDigestSuffix can be appended to a reference when the caller\n// wants to push an image without a tag or digest.\n// NewReferenceUnknownDigest() is called when this const is detected.\nconst UnknownDigestSuffix = \"@@unknown-digest@@\"\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for container registry-hosted images.\nvar Transport = dockerTransport{}\n\ntype dockerTransport struct{}\n\nfunc (t dockerTransport) Name() string {\n\treturn \"docker\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t dockerTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t dockerTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// FIXME? We could be verifying the various character set and length restrictions\n\t// from docker/distribution/reference.regexp.go, but other than that there\n\t// are few semantically invalid strings.\n\treturn nil\n}\n\n// dockerReference is an ImageReference for Docker images.\ntype dockerReference struct {\n\tref             reference.Named // By construction we know that !reference.IsNameOnly(ref) unless isUnknownDigest=true\n\tisUnknownDigest bool\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an Docker ImageReference.\nfunc ParseReference(refString string) (types.ImageReference, error) {\n\trefString, ok := strings.CutPrefix(refString, \"//\")\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"docker: image reference %s does not start with //\", refString)\n\t}\n\trefString, unknownDigest := strings.CutSuffix(refString, UnknownDigestSuffix)\n\tref, err := reference.ParseNormalizedNamed(refString)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif unknownDigest {\n\t\tif !reference.IsNameOnly(ref) {\n\t\t\treturn nil, fmt.Errorf(\"docker: image reference %q has unknown digest set but it contains either a tag or digest\", ref.String()+UnknownDigestSuffix)\n\t\t}\n\t\treturn NewReferenceUnknownDigest(ref)\n\t}\n\n\tref = reference.TagNameOnly(ref)\n\treturn NewReference(ref)\n}\n\n// NewReference returns a Docker reference for a named reference. The reference must satisfy !reference.IsNameOnly().\nfunc NewReference(ref reference.Named) (types.ImageReference, error) {\n\treturn newReference(ref, false)\n}\n\n// NewReferenceUnknownDigest returns a Docker reference for a named reference, which can be used to write images without setting\n// a tag on the registry. The reference must satisfy reference.IsNameOnly()\nfunc NewReferenceUnknownDigest(ref reference.Named) (types.ImageReference, error) {\n\treturn newReference(ref, true)\n}\n\n// newReference returns a dockerReference for a named reference.\nfunc newReference(ref reference.Named, unknownDigest bool) (dockerReference, error) {\n\tif reference.IsNameOnly(ref) && !unknownDigest {\n\t\treturn dockerReference{}, fmt.Errorf(\"Docker reference %s is not for an unknown digest case; tag or digest is needed\", reference.FamiliarString(ref))\n\t}\n\tif !reference.IsNameOnly(ref) && unknownDigest {\n\t\treturn dockerReference{}, fmt.Errorf(\"Docker reference %s is for an unknown digest case but reference has a tag or digest\", reference.FamiliarString(ref))\n\t}\n\t// A github.com/distribution/reference value can have a tag and a digest at the same time!\n\t// The docker/distribution API does not really support that (we can’t ask for an image with a specific\n\t// tag and digest), so fail.  This MAY be accepted in the future.\n\t// (Even if it were supported, the semantics of policy namespaces are unclear - should we drop\n\t// the tag or the digest first?)\n\t_, isTagged := ref.(reference.NamedTagged)\n\t_, isDigested := ref.(reference.Canonical)\n\tif isTagged && isDigested {\n\t\treturn dockerReference{}, errors.New(\"Docker references with both a tag and digest are currently not supported\")\n\t}\n\n\treturn dockerReference{\n\t\tref:             ref,\n\t\tisUnknownDigest: unknownDigest,\n\t}, nil\n}\n\nfunc (ref dockerReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix.\nfunc (ref dockerReference) StringWithinTransport() string {\n\tfamString := \"//\" + reference.FamiliarString(ref.ref)\n\tif ref.isUnknownDigest {\n\t\treturn famString + UnknownDigestSuffix\n\t}\n\treturn famString\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref dockerReference) DockerReference() reference.Named {\n\treturn ref.ref\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref dockerReference) PolicyConfigurationIdentity() string {\n\tif ref.isUnknownDigest {\n\t\treturn ref.ref.Name()\n\t}\n\tres, err := policyconfiguration.DockerReferenceIdentity(ref.ref)\n\tif res == \"\" || err != nil { // Coverage: Should never happen, NewReference above should refuse values which could cause a failure.\n\t\tpanic(fmt.Sprintf(\"Internal inconsistency: policyconfiguration.DockerReferenceIdentity returned %#v, %v\", res, err))\n\t}\n\treturn res\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref dockerReference) PolicyConfigurationNamespaces() []string {\n\tnamespaces := policyconfiguration.DockerReferenceNamespaces(ref.ref)\n\tif ref.isUnknownDigest {\n\t\tif len(namespaces) != 0 && namespaces[0] == ref.ref.Name() {\n\t\t\tnamespaces = namespaces[1:]\n\t\t}\n\t}\n\treturn namespaces\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref dockerReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn newImage(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref dockerReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(ctx, sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref dockerReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref dockerReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\treturn deleteImage(ctx, sys, ref)\n}\n\n// tagOrDigest returns a tag or digest from the reference.\nfunc (ref dockerReference) tagOrDigest() (string, error) {\n\tif ref, ok := ref.ref.(reference.Canonical); ok {\n\t\treturn ref.Digest().String(), nil\n\t}\n\tif ref, ok := ref.ref.(reference.NamedTagged); ok {\n\t\treturn ref.Tag(), nil\n\t}\n\n\tif ref.isUnknownDigest {\n\t\treturn \"\", fmt.Errorf(\"Docker reference %q is for an unknown digest case, has neither a digest nor a tag\", reference.FamiliarString(ref.ref))\n\t}\n\t// This should not happen, NewReference above refuses reference.IsNameOnly values.\n\treturn \"\", fmt.Errorf(\"Internal inconsistency: Reference %s unexpectedly has neither a digest nor a tag\", reference.FamiliarString(ref.ref))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/errors.go",
    "content": "package docker\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/docker/distribution/registry/api/errcode\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nvar (\n\t// ErrV1NotSupported is returned when we're trying to talk to a\n\t// docker V1 registry.\n\t// Deprecated: The V1 container registry detection is no longer performed, so this error is never returned.\n\tErrV1NotSupported = errors.New(\"can't talk to a V1 container registry\")\n\t// ErrTooManyRequests is returned when the status code returned is 429\n\tErrTooManyRequests = errors.New(\"too many requests to registry\")\n)\n\n// ErrUnauthorizedForCredentials is returned when the status code returned is 401\ntype ErrUnauthorizedForCredentials struct { // We only use a struct to allow a type assertion, without limiting the contents of the error otherwise.\n\tErr error\n}\n\nfunc (e ErrUnauthorizedForCredentials) Error() string {\n\treturn fmt.Sprintf(\"unable to retrieve auth token: invalid username/password: %s\", e.Err.Error())\n}\n\n// httpResponseToError translates the https.Response into an error, possibly prefixing it with the supplied context. It returns\n// nil if the response is not considered an error.\n// NOTE: Almost all callers in this package should use registryHTTPResponseToError instead.\nfunc httpResponseToError(res *http.Response, context string) error {\n\tswitch res.StatusCode {\n\tcase http.StatusOK:\n\t\treturn nil\n\tcase http.StatusTooManyRequests:\n\t\treturn ErrTooManyRequests\n\tcase http.StatusUnauthorized:\n\t\terr := registryHTTPResponseToError(res)\n\t\treturn ErrUnauthorizedForCredentials{Err: err}\n\tdefault:\n\t\tif context == \"\" {\n\t\t\treturn newUnexpectedHTTPStatusError(res)\n\t\t}\n\t\treturn fmt.Errorf(\"%s: %w\", context, newUnexpectedHTTPStatusError(res))\n\t}\n}\n\n// registryHTTPResponseToError creates a Go error from an HTTP error response of a docker/distribution\n// registry.\n//\n// WARNING: The OCI distribution spec says\n// “A `4XX` response code from the registry MAY return a body in any format.”; but if it is\n// JSON, it MUST use the errcode.Error structure.\n// So, callers should primarily decide based on HTTP StatusCode, not based on error type here.\nfunc registryHTTPResponseToError(res *http.Response) error {\n\terr := handleErrorResponse(res)\n\t// len(errs) == 0 should never be returned by handleErrorResponse; if it does, we don't modify it and let the caller report it as is.\n\tif errs, ok := err.(errcode.Errors); ok && len(errs) > 0 {\n\t\t// The docker/distribution registry implementation almost never returns\n\t\t// more than one error in the HTTP body; it seems there is only one\n\t\t// possible instance, where the second error reports a cleanup failure\n\t\t// we don't really care about.\n\t\t//\n\t\t// The only _common_ case where a multi-element error is returned is\n\t\t// created by the handleErrorResponse parser when OAuth authorization fails:\n\t\t// the first element contains errors from a WWW-Authenticate header, the second\n\t\t// element contains errors from the response body.\n\t\t//\n\t\t// In that case the first one is currently _slightly_ more informative (ErrorCodeUnauthorized\n\t\t// for invalid tokens, ErrorCodeDenied for permission denied with a valid token\n\t\t// for the first error, vs. ErrorCodeUnauthorized for both cases for the second error.)\n\t\t//\n\t\t// Also, docker/docker similarly only logs the other errors and returns the\n\t\t// first one.\n\t\tif len(errs) > 1 {\n\t\t\tlogrus.Debugf(\"Discarding non-primary errors:\")\n\t\t\tfor _, err := range errs[1:] {\n\t\t\t\tlogrus.Debugf(\"  %s\", err.Error())\n\t\t\t}\n\t\t}\n\t\terr = errs[0]\n\t}\n\tswitch e := err.(type) {\n\tcase *unexpectedHTTPResponseError:\n\t\tresponse := string(e.Response)\n\t\tif len(response) > 50 {\n\t\t\tresponse = response[:50] + \"...\"\n\t\t}\n\t\t// %.0w makes e visible to error.Unwrap() without including any text\n\t\terr = fmt.Errorf(\"StatusCode: %d, %q%.0w\", e.StatusCode, response, e)\n\tcase errcode.Error:\n\t\t// e.Error() is fmt.Sprintf(\"%s: %s\", e.Code.Error(), e.Message, which is usually\n\t\t// rather redundant. So reword it without using e.Code.Error() if e.Message is the default.\n\t\tif e.Message == e.Code.Message() {\n\t\t\t// %.0w makes e visible to error.Unwrap() without including any text\n\t\t\terr = fmt.Errorf(\"%s%.0w\", e.Message, e)\n\t\t}\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/internal/tarfile/dest.go",
    "content": "package tarfile\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/streamdigest\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Destination is a partial implementation of private.ImageDestination for writing to a Writer.\ntype Destination struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.IgnoresOriginalOCIConfig\n\tstubs.NoPutBlobPartialInitialize\n\tstubs.NoSignaturesInitialize\n\n\tarchive           *Writer\n\tcommitWithOptions func(ctx context.Context, options private.CommitOptions) error\n\trepoTags          []reference.NamedTagged\n\t// Other state.\n\tconfig []byte\n\tsysCtx *types.SystemContext\n}\n\n// NewDestination returns a tarfile.Destination adding images to the specified Writer.\n// commitWithOptions implements ImageDestination.CommitWithOptions.\nfunc NewDestination(sys *types.SystemContext, archive *Writer, transportName string, ref reference.NamedTagged,\n\tcommitWithOptions func(ctx context.Context, options private.CommitOptions) error,\n) *Destination {\n\trepoTags := []reference.NamedTagged{}\n\tif ref != nil {\n\t\trepoTags = append(repoTags, ref)\n\t}\n\tdest := &Destination{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tSupportedManifestMIMETypes: []string{\n\t\t\t\tmanifest.DockerV2Schema2MediaType, // We rely on the types.Image.UpdatedImage schema conversion capabilities.\n\t\t\t},\n\t\t\tDesiredLayerCompression:        types.Decompress,\n\t\t\tAcceptsForeignLayerURLs:        false,\n\t\t\tMustMatchRuntimeOS:             false,\n\t\t\tIgnoresEmbeddedDockerReference: false, // N/A, we only accept schema2 images where EmbeddedDockerReferenceConflicts() is always false.\n\t\t\t// The code _is_ actually thread-safe, but apart from computing sizes/digests of layers where\n\t\t\t// this is unknown in advance, the actual copy is serialized by d.archive, so there probably isn’t\n\t\t\t// much benefit from concurrency, mostly just extra CPU, memory and I/O contention.\n\t\t\tHasThreadSafePutBlob: false,\n\t\t}),\n\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartialRaw(transportName),\n\t\tNoSignaturesInitialize:     stubs.NoSignatures(\"Storing signatures for docker tar files is not supported\"),\n\n\t\tarchive:           archive,\n\t\tcommitWithOptions: commitWithOptions,\n\t\trepoTags:          repoTags,\n\t\tsysCtx:            sys,\n\t}\n\tdest.Compat = impl.AddCompat(dest)\n\treturn dest\n}\n\n// AddRepoTags adds the specified tags to the destination's repoTags.\nfunc (d *Destination) AddRepoTags(tags []reference.NamedTagged) {\n\td.repoTags = append(d.repoTags, tags...)\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *Destination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\t// Ouch, we need to stream the blob into a temporary file just to determine the size.\n\t// When the layer is decompressed, we also have to generate the digest on uncompressed data.\n\tif inputInfo.Size == -1 || inputInfo.Digest == \"\" {\n\t\tlogrus.Debugf(\"docker tarfile: input with unknown size, streaming to disk first ...\")\n\t\tstreamCopy, cleanup, err := streamdigest.ComputeBlobInfo(d.sysCtx, stream, &inputInfo)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t\tdefer cleanup()\n\t\tstream = streamCopy\n\t\tlogrus.Debugf(\"... streaming done\")\n\t}\n\n\tif err := d.archive.lock(); err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tdefer d.archive.unlock()\n\n\t// Maybe the blob has been already sent\n\tok, reusedInfo, err := d.archive.tryReusingBlobLocked(inputInfo)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tif ok {\n\t\treturn private.UploadedBlob{Digest: reusedInfo.Digest, Size: reusedInfo.Size}, nil\n\t}\n\n\tif options.IsConfig {\n\t\tbuf, err := iolimits.ReadAtMost(stream, iolimits.MaxConfigBodySize)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, fmt.Errorf(\"reading Config file stream: %w\", err)\n\t\t}\n\t\td.config = buf\n\t\tconfigPath, err := d.archive.configPath(inputInfo.Digest)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t\tif err := d.archive.sendFileLocked(configPath, inputInfo.Size, bytes.NewReader(buf)); err != nil {\n\t\t\treturn private.UploadedBlob{}, fmt.Errorf(\"writing Config file: %w\", err)\n\t\t}\n\t} else {\n\t\tlayerPath, err := d.archive.physicalLayerPath(inputInfo.Digest)\n\t\tif err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t\tif err := d.archive.sendFileLocked(layerPath, inputInfo.Size, stream); err != nil {\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t}\n\td.archive.recordBlobLocked(types.BlobInfo{Digest: inputInfo.Digest, Size: inputInfo.Size})\n\treturn private.UploadedBlob{Digest: inputInfo.Digest, Size: inputInfo.Size}, nil\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *Destination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif !impl.OriginalCandidateMatchesTryReusingBlobOptions(options) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\tif err := d.archive.lock(); err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\tdefer d.archive.unlock()\n\n\treturn d.archive.tryReusingBlobLocked(info)\n}\n\n// PutManifest writes manifest to the destination.\n// The instanceDigest value is expected to always be nil, because this transport does not support manifest lists, so\n// there can be no secondary manifests.\n// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\nfunc (d *Destination) PutManifest(ctx context.Context, m []byte, instanceDigest *digest.Digest) error {\n\tif instanceDigest != nil {\n\t\treturn errors.New(`Manifest lists are not supported for docker tar files`)\n\t}\n\t// We do not bother with types.ManifestTypeRejectedError; our .SupportedManifestMIMETypes() above is already providing only one alternative,\n\t// so the caller trying a different manifest kind would be pointless.\n\tvar man manifest.Schema2\n\tif err := json.Unmarshal(m, &man); err != nil {\n\t\treturn fmt.Errorf(\"parsing manifest: %w\", err)\n\t}\n\tif man.SchemaVersion != 2 || man.MediaType != manifest.DockerV2Schema2MediaType {\n\t\treturn errors.New(\"Unsupported manifest type, need a Docker schema 2 manifest\")\n\t}\n\n\tif err := d.archive.lock(); err != nil {\n\t\treturn err\n\t}\n\tdefer d.archive.unlock()\n\n\tif err := d.archive.writeLegacyMetadataLocked(man.LayersDescriptors, d.config, d.repoTags); err != nil {\n\t\treturn err\n\t}\n\n\treturn d.archive.ensureManifestItemLocked(man.LayersDescriptors, man.ConfigDescriptor.Digest, d.repoTags)\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *Destination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\t// This indirection exists because impl.Compat expects all ImageDestinationInternalOnly methods\n\t// to be implemented in one place.\n\treturn d.commitWithOptions(ctx, options)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/internal/tarfile/reader.go",
    "content": "package tarfile\n\nimport (\n\t\"archive/tar\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Reader is a ((docker save)-formatted) tar archive that allows random access to any component.\ntype Reader struct {\n\t// None of the fields below are modified after the archive is created, until .Close();\n\t// this allows concurrent readers of the same archive.\n\tpath          string         // \"\" if the archive has already been closed.\n\tremoveOnClose bool           // Remove file on close if true\n\tManifest      []ManifestItem // Guaranteed to exist after the archive is created.\n}\n\n// NewReaderFromFile returns a Reader for the specified path.\n// The caller should call .Close() on the returned archive when done.\nfunc NewReaderFromFile(sys *types.SystemContext, path string) (*Reader, error) {\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"opening file %q: %w\", path, err)\n\t}\n\tdefer file.Close()\n\n\t// If the file is seekable and already not compressed we can just return the file itself\n\t// as a source. Otherwise we pass the stream to NewReaderFromStream.\n\tvar stream io.Reader = file\n\tif _, err := file.Seek(0, io.SeekCurrent); err == nil { // seeking is possible\n\t\tdecompressed, isCompressed, err := compression.AutoDecompress(file)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"detecting compression for file %q: %w\", path, err)\n\t\t}\n\t\tdefer decompressed.Close()\n\t\tstream = decompressed\n\t\tif !isCompressed {\n\t\t\treturn newReader(path, false)\n\t\t}\n\t}\n\treturn NewReaderFromStream(sys, stream)\n}\n\n// NewReaderFromStream returns a Reader for the specified inputStream,\n// which can be either compressed or uncompressed. The caller can close the\n// inputStream immediately after NewReaderFromFile returns.\n// The caller should call .Close() on the returned archive when done.\nfunc NewReaderFromStream(sys *types.SystemContext, inputStream io.Reader) (*Reader, error) {\n\t// Save inputStream to a temporary file\n\ttarCopyFile, err := tmpdir.CreateBigFileTemp(sys, \"docker-tar\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating temporary file: %w\", err)\n\t}\n\tdefer tarCopyFile.Close()\n\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tos.Remove(tarCopyFile.Name())\n\t\t}\n\t}()\n\n\t// In order to be compatible with docker-load, we need to support\n\t// auto-decompression (it's also a nice quality-of-life thing to avoid\n\t// giving users really confusing \"invalid tar header\" errors).\n\tuncompressedStream, _, err := compression.AutoDecompress(inputStream)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"auto-decompressing input: %w\", err)\n\t}\n\tdefer uncompressedStream.Close()\n\n\t// Copy the plain archive to the temporary file.\n\t//\n\t// TODO: This can take quite some time, and should ideally be cancellable\n\t//       using a context.Context.\n\tif _, err := io.Copy(tarCopyFile, uncompressedStream); err != nil {\n\t\treturn nil, fmt.Errorf(\"copying contents to temporary file %q: %w\", tarCopyFile.Name(), err)\n\t}\n\tsucceeded = true\n\n\treturn newReader(tarCopyFile.Name(), true)\n}\n\n// newReader creates a Reader for the specified path and removeOnClose flag.\n// The caller should call .Close() on the returned archive when done.\nfunc newReader(path string, removeOnClose bool) (*Reader, error) {\n\t// This is a valid enough archive, except Manifest is not yet filled.\n\tr := Reader{\n\t\tpath:          path,\n\t\tremoveOnClose: removeOnClose,\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tr.Close()\n\t\t}\n\t}()\n\n\t// We initialize Manifest immediately when constructing the Reader instead\n\t// of later on-demand because every caller will need the data, and because doing it now\n\t// removes the need to synchronize the access/creation of the data if the archive is later\n\t// used from multiple goroutines to access different images.\n\n\t// FIXME? Do we need to deal with the legacy format?\n\tbytes, err := r.readTarComponent(manifestFileName, iolimits.MaxTarFileManifestSize)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := json.Unmarshal(bytes, &r.Manifest); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding tar manifest.json: %w\", err)\n\t}\n\n\tsucceeded = true\n\treturn &r, nil\n}\n\n// Close removes resources associated with an initialized Reader, if any.\nfunc (r *Reader) Close() error {\n\tpath := r.path\n\tr.path = \"\" // Mark the archive as closed\n\tif r.removeOnClose {\n\t\treturn os.Remove(path)\n\t}\n\treturn nil\n}\n\n// ChooseManifestItem selects a manifest item from r.Manifest matching (ref, sourceIndex), one or\n// both of which should be (nil, -1).\n// On success, it returns the manifest item and an index of the matching tag, if a tag was used\n// for matching; the index is -1 if a tag was not used.\nfunc (r *Reader) ChooseManifestItem(ref reference.NamedTagged, sourceIndex int) (*ManifestItem, int, error) {\n\tswitch {\n\tcase ref != nil && sourceIndex != -1:\n\t\treturn nil, -1, fmt.Errorf(\"Internal error: Cannot have both ref %s and source index @%d\",\n\t\t\tref.String(), sourceIndex)\n\n\tcase ref != nil:\n\t\trefString := ref.String()\n\t\tfor i := range r.Manifest {\n\t\t\tfor tagIndex, tag := range r.Manifest[i].RepoTags {\n\t\t\t\tparsedTag, err := reference.ParseNormalizedNamed(tag)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, -1, fmt.Errorf(\"Invalid tag %#v in manifest.json item @%d: %w\", tag, i, err)\n\t\t\t\t}\n\t\t\t\tif parsedTag.String() == refString {\n\t\t\t\t\treturn &r.Manifest[i], tagIndex, nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil, -1, fmt.Errorf(\"Tag %#v not found\", refString)\n\n\tcase sourceIndex != -1:\n\t\tif sourceIndex >= len(r.Manifest) {\n\t\t\treturn nil, -1, fmt.Errorf(\"Invalid source index @%d, only %d manifest items available\",\n\t\t\t\tsourceIndex, len(r.Manifest))\n\t\t}\n\t\treturn &r.Manifest[sourceIndex], -1, nil\n\n\tdefault:\n\t\tif len(r.Manifest) != 1 {\n\t\t\treturn nil, -1, fmt.Errorf(\"Unexpected tar manifest.json: expected 1 item, got %d\", len(r.Manifest))\n\t\t}\n\t\treturn &r.Manifest[0], -1, nil\n\t}\n}\n\n// tarReadCloser is a way to close the backing file of a tar.Reader when the user no longer needs the tar component.\ntype tarReadCloser struct {\n\t*tar.Reader\n\tbackingFile *os.File\n}\n\nfunc (t *tarReadCloser) Close() error {\n\treturn t.backingFile.Close()\n}\n\n// openTarComponent returns a ReadCloser for the specific file within the archive.\n// This is linear scan; we assume that the tar file will have a fairly small amount of files (~layers),\n// and that filesystem caching will make the repeated seeking over the (uncompressed) tarPath cheap enough.\n// It is safe to call this method from multiple goroutines simultaneously.\n// The caller should call .Close() on the returned stream.\nfunc (r *Reader) openTarComponent(componentPath string) (io.ReadCloser, error) {\n\t// This is only a sanity check; if anyone did concurrently close ra, this access is technically\n\t// racy against the write in .Close().\n\tif r.path == \"\" {\n\t\treturn nil, errors.New(\"Internal error: trying to read an already closed tarfile.Reader\")\n\t}\n\n\tf, err := os.Open(r.path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tf.Close()\n\t\t}\n\t}()\n\n\ttarReader, header, err := findTarComponent(f, componentPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif header == nil {\n\t\treturn nil, os.ErrNotExist\n\t}\n\tif header.FileInfo().Mode()&os.ModeType == os.ModeSymlink { // FIXME: untested\n\t\t// We follow only one symlink; so no loops are possible.\n\t\tif _, err := f.Seek(0, io.SeekStart); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// The new path could easily point \"outside\" the archive, but we only compare it to existing tar headers without extracting the archive,\n\t\t// so we don't care.\n\t\ttarReader, header, err = findTarComponent(f, path.Join(path.Dir(componentPath), header.Linkname))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif header == nil {\n\t\t\treturn nil, os.ErrNotExist\n\t\t}\n\t}\n\n\tif !header.FileInfo().Mode().IsRegular() {\n\t\treturn nil, fmt.Errorf(\"Error reading tar archive component %q: not a regular file\", header.Name)\n\t}\n\tsucceeded = true\n\treturn &tarReadCloser{Reader: tarReader, backingFile: f}, nil\n}\n\n// findTarComponent returns a header and a reader matching componentPath within inputFile,\n// or (nil, nil, nil) if not found.\nfunc findTarComponent(inputFile io.Reader, componentPath string) (*tar.Reader, *tar.Header, error) {\n\tt := tar.NewReader(inputFile)\n\tcomponentPath = path.Clean(componentPath)\n\tfor {\n\t\th, err := t.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tif path.Clean(h.Name) == componentPath {\n\t\t\treturn t, h, nil\n\t\t}\n\t}\n\treturn nil, nil, nil\n}\n\n// readTarComponent returns full contents of componentPath.\n// It is safe to call this method from multiple goroutines simultaneously.\nfunc (r *Reader) readTarComponent(path string, limit int) ([]byte, error) {\n\tfile, err := r.openTarComponent(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading tar component %q: %w\", path, err)\n\t}\n\tdefer file.Close()\n\tbytes, err := iolimits.ReadAtMost(file, limit)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn bytes, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/internal/tarfile/src.go",
    "content": "package tarfile\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"sync\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Source is a partial implementation of types.ImageSource for reading from tarPath.\ntype Source struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.NoSignatures\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.NoGetBlobAtInitialize\n\n\tarchive      *Reader\n\tcloseArchive bool // .Close() the archive when the source is closed.\n\t// If ref is nil and sourceIndex is -1, indicates the only image in the archive.\n\tref         reference.NamedTagged // May be nil\n\tsourceIndex int                   // May be -1\n\t// The following data is only available after ensureCachedDataIsPresent() succeeds\n\ttarManifest       *ManifestItem // nil if not available yet.\n\tconfigBytes       []byte\n\tconfigDigest      digest.Digest\n\torderedDiffIDList []digest.Digest\n\tknownLayers       map[digest.Digest]*layerInfo\n\t// Other state\n\tgeneratedManifest []byte    // Private cache for GetManifest(), nil if not set yet.\n\tcacheDataLock     sync.Once // Private state for ensureCachedDataIsPresent to make it concurrency-safe\n\tcacheDataResult   error     // Private state for ensureCachedDataIsPresent\n}\n\ntype layerInfo struct {\n\tpath string\n\tsize int64\n}\n\n// NewSource returns a tarfile.Source for an image in the specified archive matching ref\n// and sourceIndex (or the only image if they are (nil, -1)).\n// The archive will be closed if closeArchive\nfunc NewSource(archive *Reader, closeArchive bool, transportName string, ref reference.NamedTagged, sourceIndex int) *Source {\n\ts := &Source{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: true,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAtRaw(transportName),\n\n\t\tarchive:      archive,\n\t\tcloseArchive: closeArchive,\n\t\tref:          ref,\n\t\tsourceIndex:  sourceIndex,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s\n}\n\n// ensureCachedDataIsPresent loads data necessary for any of the public accessors.\n// It is safe to call this from multi-threaded code.\nfunc (s *Source) ensureCachedDataIsPresent() error {\n\ts.cacheDataLock.Do(func() {\n\t\ts.cacheDataResult = s.ensureCachedDataIsPresentPrivate()\n\t})\n\treturn s.cacheDataResult\n}\n\n// ensureCachedDataIsPresentPrivate is a private implementation detail of ensureCachedDataIsPresent.\n// Call ensureCachedDataIsPresent instead.\nfunc (s *Source) ensureCachedDataIsPresentPrivate() error {\n\ttarManifest, _, err := s.archive.ChooseManifestItem(s.ref, s.sourceIndex)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Read and parse config.\n\tconfigBytes, err := s.archive.readTarComponent(tarManifest.Config, iolimits.MaxConfigBodySize)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar parsedConfig manifest.Schema2Image // There's a lot of info there, but we only really care about layer DiffIDs.\n\tif err := json.Unmarshal(configBytes, &parsedConfig); err != nil {\n\t\treturn fmt.Errorf(\"decoding tar config %q: %w\", tarManifest.Config, err)\n\t}\n\tif parsedConfig.RootFS == nil {\n\t\treturn fmt.Errorf(\"Invalid image config (rootFS is not set): %q\", tarManifest.Config)\n\t}\n\n\tknownLayers, err := s.prepareLayerData(tarManifest, &parsedConfig)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Success; commit.\n\ts.tarManifest = tarManifest\n\ts.configBytes = configBytes\n\ts.configDigest = digest.FromBytes(configBytes)\n\ts.orderedDiffIDList = parsedConfig.RootFS.DiffIDs\n\ts.knownLayers = knownLayers\n\treturn nil\n}\n\n// Close removes resources associated with an initialized Source, if any.\nfunc (s *Source) Close() error {\n\tif s.closeArchive {\n\t\treturn s.archive.Close()\n\t}\n\treturn nil\n}\n\n// TarManifest returns contents of manifest.json\nfunc (s *Source) TarManifest() []ManifestItem {\n\treturn s.archive.Manifest\n}\n\nfunc (s *Source) prepareLayerData(tarManifest *ManifestItem, parsedConfig *manifest.Schema2Image) (map[digest.Digest]*layerInfo, error) {\n\t// Collect layer data available in manifest and config.\n\tif len(tarManifest.Layers) != len(parsedConfig.RootFS.DiffIDs) {\n\t\treturn nil, fmt.Errorf(\"Inconsistent layer count: %d in manifest, %d in config\", len(tarManifest.Layers), len(parsedConfig.RootFS.DiffIDs))\n\t}\n\tknownLayers := map[digest.Digest]*layerInfo{}\n\tunknownLayerSizes := map[string]*layerInfo{} // Points into knownLayers, a \"to do list\" of items with unknown sizes.\n\tfor i, diffID := range parsedConfig.RootFS.DiffIDs {\n\t\tif _, ok := knownLayers[diffID]; ok {\n\t\t\t// Apparently it really can happen that a single image contains the same layer diff more than once.\n\t\t\t// In that case, the diffID validation ensures that both layers truly are the same, and it should not matter\n\t\t\t// which of the tarManifest.Layers paths is used; (docker save) actually makes the duplicates symlinks to the original.\n\t\t\tcontinue\n\t\t}\n\t\tlayerPath := path.Clean(tarManifest.Layers[i])\n\t\tif _, ok := unknownLayerSizes[layerPath]; ok {\n\t\t\treturn nil, fmt.Errorf(\"Layer tarfile %q used for two different DiffID values\", layerPath)\n\t\t}\n\t\tli := &layerInfo{ // A new element in each iteration\n\t\t\tpath: layerPath,\n\t\t\tsize: -1,\n\t\t}\n\t\tknownLayers[diffID] = li\n\t\tunknownLayerSizes[layerPath] = li\n\t}\n\n\t// Scan the tar file to collect layer sizes.\n\tfile, err := os.Open(s.archive.path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\tt := tar.NewReader(file)\n\tfor {\n\t\th, err := t.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tlayerPath := path.Clean(h.Name)\n\t\t// FIXME: Cache this data across images in Reader.\n\t\tif li, ok := unknownLayerSizes[layerPath]; ok {\n\t\t\t// Since GetBlob will decompress layers that are compressed we need\n\t\t\t// to do the decompression here as well, otherwise we will\n\t\t\t// incorrectly report the size. Pretty critical, since tools like\n\t\t\t// umoci always compress layer blobs. Obviously we only bother with\n\t\t\t// the slower method of checking if it's compressed.\n\t\t\tuncompressedStream, isCompressed, err := compression.AutoDecompress(t)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"auto-decompressing %q to determine its size: %w\", layerPath, err)\n\t\t\t}\n\t\t\tdefer uncompressedStream.Close()\n\n\t\t\tuncompressedSize := h.Size\n\t\t\tif isCompressed {\n\t\t\t\tuncompressedSize, err = io.Copy(io.Discard, uncompressedStream)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"reading %q to find its size: %w\", layerPath, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tli.size = uncompressedSize\n\t\t\tdelete(unknownLayerSizes, layerPath)\n\t\t}\n\t}\n\tif len(unknownLayerSizes) != 0 {\n\t\treturn nil, errors.New(\"Some layer tarfiles are missing in the tarball\") // This could do with a better error reporting, if this ever happened in practice.\n\t}\n\n\treturn knownLayers, nil\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\n// This source implementation does not support manifest lists, so the passed-in instanceDigest should always be nil,\n// as the primary manifest can not be a list, so there can be no secondary instances.\nfunc (s *Source) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tif instanceDigest != nil {\n\t\t// How did we even get here? GetManifest(ctx, nil) has returned a manifest.DockerV2Schema2MediaType.\n\t\treturn nil, \"\", errors.New(`Manifest lists are not supported by \"docker-daemon:\"`)\n\t}\n\tif s.generatedManifest == nil {\n\t\tif err := s.ensureCachedDataIsPresent(); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tm := manifest.Schema2{\n\t\t\tSchemaVersion: 2,\n\t\t\tMediaType:     manifest.DockerV2Schema2MediaType,\n\t\t\tConfigDescriptor: manifest.Schema2Descriptor{\n\t\t\t\tMediaType: manifest.DockerV2Schema2ConfigMediaType,\n\t\t\t\tSize:      int64(len(s.configBytes)),\n\t\t\t\tDigest:    s.configDigest,\n\t\t\t},\n\t\t\tLayersDescriptors: []manifest.Schema2Descriptor{},\n\t\t}\n\t\tfor _, diffID := range s.orderedDiffIDList {\n\t\t\tli, ok := s.knownLayers[diffID]\n\t\t\tif !ok {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"Internal inconsistency: Information about layer %s missing\", diffID)\n\t\t\t}\n\t\t\tm.LayersDescriptors = append(m.LayersDescriptors, manifest.Schema2Descriptor{\n\t\t\t\tDigest:    diffID, // diffID is a digest of the uncompressed tarball\n\t\t\t\tMediaType: manifest.DockerV2Schema2LayerMediaType,\n\t\t\t\tSize:      li.size,\n\t\t\t})\n\t\t}\n\t\tmanifestBytes, err := json.Marshal(&m)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\ts.generatedManifest = manifestBytes\n\t}\n\treturn s.generatedManifest, manifest.DockerV2Schema2MediaType, nil\n}\n\n// uncompressedReadCloser is an io.ReadCloser that closes both the uncompressed stream and the underlying input.\ntype uncompressedReadCloser struct {\n\tio.Reader\n\tunderlyingCloser   func() error\n\tuncompressedCloser func() error\n}\n\nfunc (r uncompressedReadCloser) Close() error {\n\tvar res error\n\tif err := r.uncompressedCloser(); err != nil {\n\t\tres = err\n\t}\n\tif err := r.underlyingCloser(); err != nil && res == nil {\n\t\tres = err\n\t}\n\treturn res\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *Source) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tif err := s.ensureCachedDataIsPresent(); err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tif info.Digest == s.configDigest { // FIXME? Implement a more general algorithm matching instead of assuming sha256.\n\t\treturn io.NopCloser(bytes.NewReader(s.configBytes)), int64(len(s.configBytes)), nil\n\t}\n\n\tif li, ok := s.knownLayers[info.Digest]; ok { // diffID is a digest of the uncompressed tarball,\n\t\tunderlyingStream, err := s.archive.openTarComponent(li.path)\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t}\n\t\tcloseUnderlyingStream := true\n\t\tdefer func() {\n\t\t\tif closeUnderlyingStream {\n\t\t\t\tunderlyingStream.Close()\n\t\t\t}\n\t\t}()\n\n\t\t// In order to handle the fact that digests != diffIDs (and thus that a\n\t\t// caller which is trying to verify the blob will run into problems),\n\t\t// we need to decompress blobs. This is a bit ugly, but it's a\n\t\t// consequence of making everything addressable by their DiffID rather\n\t\t// than by their digest...\n\t\t//\n\t\t// In particular, because the v2s2 manifest being generated uses\n\t\t// DiffIDs, any caller of GetBlob is going to be asking for DiffIDs of\n\t\t// layers not their _actual_ digest. The result is that copy/... will\n\t\t// be verifying a \"digest\" which is not the actual layer's digest (but\n\t\t// is instead the DiffID).\n\n\t\tuncompressedStream, _, err := compression.AutoDecompress(underlyingStream)\n\t\tif err != nil {\n\t\t\treturn nil, 0, fmt.Errorf(\"auto-decompressing blob %s: %w\", info.Digest, err)\n\t\t}\n\n\t\tnewStream := uncompressedReadCloser{\n\t\t\tReader:             uncompressedStream,\n\t\t\tunderlyingCloser:   underlyingStream.Close,\n\t\t\tuncompressedCloser: uncompressedStream.Close,\n\t\t}\n\t\tcloseUnderlyingStream = false\n\n\t\treturn newStream, li.size, nil\n\t}\n\n\treturn nil, 0, fmt.Errorf(\"Unknown blob %s\", info.Digest)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/internal/tarfile/types.go",
    "content": "package tarfile\n\nimport (\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/manifest\"\n)\n\n// Various data structures.\n\n// Based on github.com/docker/docker/image/tarexport/tarexport.go\nconst (\n\tmanifestFileName           = \"manifest.json\"\n\tlegacyLayerFileName        = \"layer.tar\"\n\tlegacyConfigFileName       = \"json\"\n\tlegacyVersionFileName      = \"VERSION\"\n\tlegacyRepositoriesFileName = \"repositories\"\n)\n\n// ManifestItem is an element of the array stored in the top-level manifest.json file.\ntype ManifestItem struct { // NOTE: This is visible as docker/tarfile.ManifestItem, and a part of the stable API.\n\tConfig       string\n\tRepoTags     []string\n\tLayers       []string\n\tParent       imageID                                      `json:\",omitempty\"`\n\tLayerSources map[digest.Digest]manifest.Schema2Descriptor `json:\",omitempty\"`\n}\n\ntype imageID string\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/internal/tarfile/writer.go",
    "content": "package tarfile\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Writer allows creating a (docker save)-formatted tar archive containing one or more images.\ntype Writer struct {\n\tmutex sync.Mutex\n\t// ALL of the following members can only be accessed with the mutex held.\n\t// Use Writer.lock() to obtain the mutex.\n\twriter io.Writer\n\ttar    *tar.Writer // nil if the Writer has already been closed.\n\t// Other state.\n\tblobs            map[digest.Digest]types.BlobInfo // list of already-sent blobs\n\trepositories     map[string]map[string]string\n\tlegacyLayers     *set.Set[string] // A set of IDs of legacy layers that have been already sent.\n\tmanifest         []ManifestItem\n\tmanifestByConfig map[digest.Digest]int // A map from config digest to an entry index in manifest above.\n}\n\n// NewWriter returns a Writer for the specified io.Writer.\n// The caller must eventually call .Close() on the returned object to create a valid archive.\nfunc NewWriter(dest io.Writer) *Writer {\n\treturn &Writer{\n\t\twriter:           dest,\n\t\ttar:              tar.NewWriter(dest),\n\t\tblobs:            make(map[digest.Digest]types.BlobInfo),\n\t\trepositories:     map[string]map[string]string{},\n\t\tlegacyLayers:     set.New[string](),\n\t\tmanifestByConfig: map[digest.Digest]int{},\n\t}\n}\n\n// lock does some sanity checks and locks the Writer.\n// If this function succeeds, the caller must call w.unlock.\n// Do not use Writer.mutex directly.\nfunc (w *Writer) lock() error {\n\tw.mutex.Lock()\n\tif w.tar == nil {\n\t\tw.mutex.Unlock()\n\t\treturn errors.New(\"Internal error: trying to use an already closed tarfile.Writer\")\n\t}\n\treturn nil\n}\n\n// unlock releases the lock obtained by Writer.lock\n// Do not use Writer.mutex directly.\nfunc (w *Writer) unlock() {\n\tw.mutex.Unlock()\n}\n\n// tryReusingBlobLocked checks whether the transport already contains, a blob, and if so, returns its metadata.\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, tryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\n// The caller must have locked the Writer.\nfunc (w *Writer) tryReusingBlobLocked(info types.BlobInfo) (bool, private.ReusedBlob, error) {\n\tif info.Digest == \"\" {\n\t\treturn false, private.ReusedBlob{}, errors.New(\"Can not check for a blob with unknown digest\")\n\t}\n\tif blob, ok := w.blobs[info.Digest]; ok {\n\t\treturn true, private.ReusedBlob{Digest: info.Digest, Size: blob.Size}, nil\n\t}\n\treturn false, private.ReusedBlob{}, nil\n}\n\n// recordBlob records metadata of a recorded blob, which must contain at least a digest and size.\n// The caller must have locked the Writer.\nfunc (w *Writer) recordBlobLocked(info types.BlobInfo) {\n\tw.blobs[info.Digest] = info\n}\n\n// ensureSingleLegacyLayerLocked writes legacy VERSION and configuration files for a single layer\n// The caller must have locked the Writer.\nfunc (w *Writer) ensureSingleLegacyLayerLocked(layerID string, layerDigest digest.Digest, configBytes []byte) error {\n\tif !w.legacyLayers.Contains(layerID) {\n\t\t// Create a symlink for the legacy format, where there is one subdirectory per layer (\"image\").\n\t\t// See also the comment in physicalLayerPath.\n\t\tphysicalLayerPath, err := w.physicalLayerPath(layerDigest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := w.sendSymlinkLocked(filepath.Join(layerID, legacyLayerFileName), filepath.Join(\"..\", physicalLayerPath)); err != nil {\n\t\t\treturn fmt.Errorf(\"creating layer symbolic link: %w\", err)\n\t\t}\n\n\t\tb := []byte(\"1.0\")\n\t\tif err := w.sendBytesLocked(filepath.Join(layerID, legacyVersionFileName), b); err != nil {\n\t\t\treturn fmt.Errorf(\"writing VERSION file: %w\", err)\n\t\t}\n\n\t\tif err := w.sendBytesLocked(filepath.Join(layerID, legacyConfigFileName), configBytes); err != nil {\n\t\t\treturn fmt.Errorf(\"writing config json file: %w\", err)\n\t\t}\n\n\t\tw.legacyLayers.Add(layerID)\n\t}\n\treturn nil\n}\n\n// writeLegacyMetadataLocked writes legacy layer metadata and records tags for a single image.\nfunc (w *Writer) writeLegacyMetadataLocked(layerDescriptors []manifest.Schema2Descriptor, configBytes []byte, repoTags []reference.NamedTagged) error {\n\tvar chainID digest.Digest\n\tlastLayerID := \"\"\n\tfor i, l := range layerDescriptors {\n\t\t// The legacy format requires a config file per layer\n\t\tlayerConfig := make(map[string]any)\n\n\t\t// The root layer doesn't have any parent\n\t\tif lastLayerID != \"\" {\n\t\t\tlayerConfig[\"parent\"] = lastLayerID\n\t\t}\n\t\t// The top layer configuration file is generated by using subpart of the image configuration\n\t\tif i == len(layerDescriptors)-1 {\n\t\t\tvar config map[string]*json.RawMessage\n\t\t\terr := json.Unmarshal(configBytes, &config)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unmarshaling config: %w\", err)\n\t\t\t}\n\t\t\tfor _, attr := range [7]string{\"architecture\", \"config\", \"container\", \"container_config\", \"created\", \"docker_version\", \"os\"} {\n\t\t\t\tlayerConfig[attr] = config[attr]\n\t\t\t}\n\t\t}\n\n\t\t// This chainID value matches the computation in docker/docker/layer.CreateChainID …\n\t\tif err := l.Digest.Validate(); err != nil { // This should never fail on this code path, still: make sure the chainID computation is unambiguous.\n\t\t\treturn err\n\t\t}\n\t\tif chainID == \"\" {\n\t\t\tchainID = l.Digest\n\t\t} else {\n\t\t\tchainID = digest.Canonical.FromString(chainID.String() + \" \" + l.Digest.String())\n\t\t}\n\t\t// … but note that the image ID does not _exactly_ match docker/docker/image/v1.CreateID, primarily because\n\t\t// we create the image configs differently in details. At least recent versions allocate new IDs on load,\n\t\t// so this is fine as long as the IDs we use are unique / cannot loop.\n\t\t//\n\t\t// For intermediate images, we could just use the chainID as an image ID, but using a digest of ~the created\n\t\t// config makes sure that everything uses the same “namespace”; a bit less efficient but clearer.\n\t\t//\n\t\t// Temporarily add the chainID to the config, only for the purpose of generating the image ID.\n\t\tlayerConfig[\"layer_id\"] = chainID\n\t\tb, err := json.Marshal(layerConfig) // Note that layerConfig[\"id\"] is not set yet at this point.\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"marshaling layer config: %w\", err)\n\t\t}\n\t\tdelete(layerConfig, \"layer_id\")\n\t\tlayerID := digest.Canonical.FromBytes(b).Encoded()\n\t\tlayerConfig[\"id\"] = layerID\n\n\t\tconfigBytes, err := json.Marshal(layerConfig)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"marshaling layer config: %w\", err)\n\t\t}\n\n\t\tif err := w.ensureSingleLegacyLayerLocked(layerID, l.Digest, configBytes); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tlastLayerID = layerID\n\t}\n\n\tif lastLayerID != \"\" {\n\t\tfor _, repoTag := range repoTags {\n\t\t\tif val, ok := w.repositories[repoTag.Name()]; ok {\n\t\t\t\tval[repoTag.Tag()] = lastLayerID\n\t\t\t} else {\n\t\t\t\tw.repositories[repoTag.Name()] = map[string]string{repoTag.Tag(): lastLayerID}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// checkManifestItemsMatch checks that a and b describe the same image,\n// and returns an error if that’s not the case (which should never happen).\nfunc checkManifestItemsMatch(a, b *ManifestItem) error {\n\tif a.Config != b.Config {\n\t\treturn fmt.Errorf(\"Internal error: Trying to reuse ManifestItem values with configs %#v vs. %#v\", a.Config, b.Config)\n\t}\n\tif !slices.Equal(a.Layers, b.Layers) {\n\t\treturn fmt.Errorf(\"Internal error: Trying to reuse ManifestItem values with layers %#v vs. %#v\", a.Layers, b.Layers)\n\t}\n\t// Ignore RepoTags, that will be built later.\n\t// Ignore Parent and LayerSources, which we don’t set to anything meaningful.\n\treturn nil\n}\n\n// ensureManifestItemLocked ensures that there is a manifest item pointing to (layerDescriptors, configDigest) with repoTags\n// The caller must have locked the Writer.\nfunc (w *Writer) ensureManifestItemLocked(layerDescriptors []manifest.Schema2Descriptor, configDigest digest.Digest, repoTags []reference.NamedTagged) error {\n\tlayerPaths := []string{}\n\tfor _, l := range layerDescriptors {\n\t\tp, err := w.physicalLayerPath(l.Digest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlayerPaths = append(layerPaths, p)\n\t}\n\n\tvar item *ManifestItem\n\tconfigPath, err := w.configPath(configDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tnewItem := ManifestItem{\n\t\tConfig:       configPath,\n\t\tRepoTags:     []string{},\n\t\tLayers:       layerPaths,\n\t\tParent:       \"\", // We don’t have this information\n\t\tLayerSources: nil,\n\t}\n\tif i, ok := w.manifestByConfig[configDigest]; ok {\n\t\titem = &w.manifest[i]\n\t\tif err := checkManifestItemsMatch(item, &newItem); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\ti := len(w.manifest)\n\t\tw.manifestByConfig[configDigest] = i\n\t\tw.manifest = append(w.manifest, newItem)\n\t\titem = &w.manifest[i]\n\t}\n\n\tknownRepoTags := set.New[string]()\n\tknownRepoTags.AddSeq(slices.Values(item.RepoTags))\n\tfor _, tag := range repoTags {\n\t\t// For github.com/docker/docker consumers, this works just as well as\n\t\t//   refString := ref.String()\n\t\t// because when reading the RepoTags strings, github.com/docker/docker/reference\n\t\t// normalizes both of them to the same value.\n\t\t//\n\t\t// Doing it this way to include the normalized-out `docker.io[/library]` does make\n\t\t// a difference for github.com/projectatomic/docker consumers, with the\n\t\t// “Add --add-registry and --block-registry options to docker daemon” patch.\n\t\t// These consumers treat reference strings which include a hostname and reference\n\t\t// strings without a hostname differently.\n\t\t//\n\t\t// Using the host name here is more explicit about the intent, and it has the same\n\t\t// effect as (docker pull) in projectatomic/docker, which tags the result using\n\t\t// a hostname-qualified reference.\n\t\t// See https://github.com/containers/image/issues/72 for a more detailed\n\t\t// analysis and explanation.\n\t\trefString := fmt.Sprintf(\"%s:%s\", tag.Name(), tag.Tag())\n\n\t\tif !knownRepoTags.Contains(refString) {\n\t\t\titem.RepoTags = append(item.RepoTags, refString)\n\t\t\tknownRepoTags.Add(refString)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Close writes all outstanding data about images to the archive, and finishes writing data\n// to the underlying io.Writer.\n// No more images can be added after this is called.\nfunc (w *Writer) Close() error {\n\tif err := w.lock(); err != nil {\n\t\treturn err\n\t}\n\tdefer w.unlock()\n\n\tb, err := json.Marshal(&w.manifest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := w.sendBytesLocked(manifestFileName, b); err != nil {\n\t\treturn err\n\t}\n\n\tb, err = json.Marshal(w.repositories)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"marshaling repositories: %w\", err)\n\t}\n\tif err := w.sendBytesLocked(legacyRepositoriesFileName, b); err != nil {\n\t\treturn fmt.Errorf(\"writing config json file: %w\", err)\n\t}\n\n\tif err := w.tar.Close(); err != nil {\n\t\treturn err\n\t}\n\tw.tar = nil // Mark the Writer as closed.\n\treturn nil\n}\n\n// configPath returns a path we choose for storing a config with the specified digest.\n// NOTE: This is an internal implementation detail, not a format property, and can change\n// any time.\nfunc (w *Writer) configPath(configDigest digest.Digest) (string, error) {\n\tif err := configDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in unexpected paths, so validate explicitly.\n\t\treturn \"\", err\n\t}\n\treturn configDigest.Encoded() + \".json\", nil\n}\n\n// physicalLayerPath returns a path we choose for storing a layer with the specified digest\n// (the actual path, i.e. a regular file, not a symlink that may be used in the legacy format).\n// NOTE: This is an internal implementation detail, not a format property, and can change\n// any time.\nfunc (w *Writer) physicalLayerPath(layerDigest digest.Digest) (string, error) {\n\tif err := layerDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in unexpected paths, so validate explicitly.\n\t\treturn \"\", err\n\t}\n\t// Note that this can't be e.g. filepath.Join(l.Digest.Encoded(), legacyLayerFileName); due to the way\n\t// writeLegacyMetadata constructs layer IDs differently from inputinfo.Digest values (as described\n\t// inside it), most of the layers would end up in subdirectories alone without any metadata; (docker load)\n\t// tries to load every subdirectory as an image and fails if the config is missing.  So, keep the layers\n\t// in the root of the tarball.\n\treturn layerDigest.Encoded() + \".tar\", nil\n}\n\ntype tarFI struct {\n\tpath      string\n\tsize      int64\n\tisSymlink bool\n}\n\nfunc (t *tarFI) Name() string {\n\treturn t.path\n}\n\nfunc (t *tarFI) Size() int64 {\n\treturn t.size\n}\n\nfunc (t *tarFI) Mode() os.FileMode {\n\tif t.isSymlink {\n\t\treturn os.ModeSymlink\n\t}\n\treturn 0o444\n}\n\nfunc (t *tarFI) ModTime() time.Time {\n\treturn time.Unix(0, 0)\n}\n\nfunc (t *tarFI) IsDir() bool {\n\treturn false\n}\n\nfunc (t *tarFI) Sys() any {\n\treturn nil\n}\n\n// sendSymlinkLocked sends a symlink into the tar stream.\n// The caller must have locked the Writer.\nfunc (w *Writer) sendSymlinkLocked(path string, target string) error {\n\thdr, err := tar.FileInfoHeader(&tarFI{path: path, size: 0, isSymlink: true}, target)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Sending as tar link %s -> %s\", path, target)\n\treturn w.tar.WriteHeader(hdr)\n}\n\n// sendBytesLocked sends a path into the tar stream.\n// The caller must have locked the Writer.\nfunc (w *Writer) sendBytesLocked(path string, b []byte) error {\n\treturn w.sendFileLocked(path, int64(len(b)), bytes.NewReader(b))\n}\n\n// sendFileLocked sends a file into the tar stream.\n// The caller must have locked the Writer.\nfunc (w *Writer) sendFileLocked(path string, expectedSize int64, stream io.Reader) error {\n\thdr, err := tar.FileInfoHeader(&tarFI{path: path, size: expectedSize}, \"\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Sending as tar file %s\", path)\n\tif err := w.tar.WriteHeader(hdr); err != nil {\n\t\treturn err\n\t}\n\t// TODO: This can take quite some time, and should ideally be cancellable using a context.Context.\n\tsize, err := io.Copy(w.tar, stream)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif size != expectedSize {\n\t\treturn fmt.Errorf(\"Size mismatch when copying %s, expected %d, got %d\", path, expectedSize, size)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/paths_common.go",
    "content": "//go:build !freebsd\n\npackage docker\n\nconst etcDir = \"/etc\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/paths_freebsd.go",
    "content": "//go:build freebsd\n\npackage docker\n\nconst etcDir = \"/usr/local/etc\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/policyconfiguration/naming.go",
    "content": "package policyconfiguration\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n)\n\n// DockerReferenceIdentity returns a string representation of the reference, suitable for policy lookup,\n// as a backend for ImageReference.PolicyConfigurationIdentity.\n// The reference must satisfy !reference.IsNameOnly().\nfunc DockerReferenceIdentity(ref reference.Named) (string, error) {\n\tres := ref.Name()\n\ttagged, isTagged := ref.(reference.NamedTagged)\n\tdigested, isDigested := ref.(reference.Canonical)\n\tswitch {\n\tcase isTagged && isDigested: // Note that this CAN actually happen.\n\t\treturn \"\", fmt.Errorf(\"Unexpected Docker reference %s with both a name and a digest\", reference.FamiliarString(ref))\n\tcase !isTagged && !isDigested: // This should not happen, the caller is expected to ensure !reference.IsNameOnly()\n\t\treturn \"\", fmt.Errorf(\"Internal inconsistency: Docker reference %s with neither a tag nor a digest\", reference.FamiliarString(ref))\n\tcase isTagged:\n\t\tres = res + \":\" + tagged.Tag()\n\tcase isDigested:\n\t\tres = res + \"@\" + digested.Digest().String()\n\tdefault: // Coverage: The above was supposed to be exhaustive.\n\t\treturn \"\", errors.New(\"Internal inconsistency, unexpected default branch\")\n\t}\n\treturn res, nil\n}\n\n// DockerReferenceNamespaces returns a list of other policy configuration namespaces to search,\n// as a backend for ImageReference.PolicyConfigurationIdentity.\n// The reference must satisfy !reference.IsNameOnly().\nfunc DockerReferenceNamespaces(ref reference.Named) []string {\n\t// Look for a match of the repository, and then of the possible parent\n\t// namespaces. Note that this only happens on the expanded host names\n\t// and repository names, i.e. \"busybox\" is looked up as \"docker.io/library/busybox\",\n\t// then in its parent \"docker.io/library\"; in none of \"busybox\",\n\t// un-namespaced \"library\" nor in \"\" supposedly implicitly representing \"library/\".\n\t//\n\t// ref.Name() == ref.Domain() + \"/\" + ref.Path(), so the last\n\t// iteration matches the host name (for any namespace).\n\tres := []string{}\n\tname := ref.Name()\n\tfor {\n\t\tres = append(res, name)\n\n\t\tlastSlash := strings.LastIndex(name, \"/\")\n\t\tif lastSlash == -1 {\n\t\t\tbreak\n\t\t}\n\t\tname = name[:lastSlash]\n\t}\n\n\t// Strip port number if any, before appending to res slice.\n\t// Currently, the most compatible behavior is to return\n\t// example.com:8443/ns, example.com:8443, *.com.\n\t// If a port number is not specified, the expected behavior would be\n\t// example.com/ns, example.com, *.com\n\tportNumColon := strings.Index(name, \":\")\n\tif portNumColon != -1 {\n\t\tname = name[:portNumColon]\n\t}\n\n\t// Append wildcarded domains to res slice\n\tfor {\n\t\tfirstDot := strings.Index(name, \".\")\n\t\tif firstDot == -1 {\n\t\t\tbreak\n\t\t}\n\t\tname = name[firstDot+1:]\n\n\t\tres = append(res, \"*.\"+name)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/README.md",
    "content": "This is a copy of github.com/docker/distribution/reference as of commit 3226863cbcba6dbc2f6c83a37b28126c934af3f8,\nexcept that ParseAnyReferenceWithSet has been removed to drop the dependency on github.com/docker/distribution/digestset."
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/helpers.go",
    "content": "package reference\n\nimport \"path\"\n\n// IsNameOnly returns true if reference only contains a repo name.\nfunc IsNameOnly(ref Named) bool {\n\tif _, ok := ref.(NamedTagged); ok {\n\t\treturn false\n\t}\n\tif _, ok := ref.(Canonical); ok {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// FamiliarName returns the familiar name string\n// for the given named, familiarizing if needed.\nfunc FamiliarName(ref Named) string {\n\tif nn, ok := ref.(normalizedNamed); ok {\n\t\treturn nn.Familiar().Name()\n\t}\n\treturn ref.Name()\n}\n\n// FamiliarString returns the familiar string representation\n// for the given reference, familiarizing if needed.\nfunc FamiliarString(ref Reference) string {\n\tif nn, ok := ref.(normalizedNamed); ok {\n\t\treturn nn.Familiar().String()\n\t}\n\treturn ref.String()\n}\n\n// FamiliarMatch reports whether ref matches the specified pattern.\n// See https://godoc.org/path#Match for supported patterns.\nfunc FamiliarMatch(pattern string, ref Reference) (bool, error) {\n\tmatched, err := path.Match(pattern, FamiliarString(ref))\n\tif namedRef, isNamed := ref.(Named); isNamed && !matched {\n\t\tmatched, _ = path.Match(pattern, FamiliarName(namedRef))\n\t}\n\treturn matched, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/normalize.go",
    "content": "package reference\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nvar (\n\tlegacyDefaultDomain = \"index.docker.io\"\n\tdefaultDomain       = \"docker.io\"\n\tofficialRepoName    = \"library\"\n\tdefaultTag          = \"latest\"\n)\n\n// normalizedNamed represents a name which has been\n// normalized and has a familiar form. A familiar name\n// is what is used in Docker UI. An example normalized\n// name is \"docker.io/library/ubuntu\" and corresponding\n// familiar name of \"ubuntu\".\ntype normalizedNamed interface {\n\tNamed\n\tFamiliar() Named\n}\n\n// ParseNormalizedNamed parses a string into a named reference\n// transforming a familiar name from Docker UI to a fully\n// qualified reference. If the value may be an identifier\n// use ParseAnyReference.\nfunc ParseNormalizedNamed(s string) (Named, error) {\n\tif ok := anchoredIdentifierRegexp.MatchString(s); ok {\n\t\treturn nil, fmt.Errorf(\"invalid repository name (%s), cannot specify 64-byte hexadecimal strings\", s)\n\t}\n\tdomain, remainder := splitDockerDomain(s)\n\tvar remoteName string\n\tif tagSep := strings.IndexRune(remainder, ':'); tagSep > -1 {\n\t\tremoteName = remainder[:tagSep]\n\t} else {\n\t\tremoteName = remainder\n\t}\n\tif strings.ToLower(remoteName) != remoteName {\n\t\treturn nil, errors.New(\"invalid reference format: repository name must be lowercase\")\n\t}\n\n\tref, err := Parse(domain + \"/\" + remainder)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tnamed, isNamed := ref.(Named)\n\tif !isNamed {\n\t\treturn nil, fmt.Errorf(\"reference %s has no name\", ref.String())\n\t}\n\treturn named, nil\n}\n\n// ParseDockerRef normalizes the image reference following the docker convention. This is added\n// mainly for backward compatibility.\n// The reference returned can only be either tagged or digested. For reference contains both tag\n// and digest, the function returns digested reference, e.g. docker.io/library/busybox:latest@\n// sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa will be returned as\n// docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa.\nfunc ParseDockerRef(ref string) (Named, error) {\n\tnamed, err := ParseNormalizedNamed(ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, ok := named.(NamedTagged); ok {\n\t\tif canonical, ok := named.(Canonical); ok {\n\t\t\t// The reference is both tagged and digested, only\n\t\t\t// return digested.\n\t\t\tnewNamed, err := WithName(canonical.Name())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tnewCanonical, err := WithDigest(newNamed, canonical.Digest())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn newCanonical, nil\n\t\t}\n\t}\n\treturn TagNameOnly(named), nil\n}\n\n// splitDockerDomain splits a repository name to domain and remotename string.\n// If no valid domain is found, the default domain is used. Repository name\n// needs to be already validated before.\nfunc splitDockerDomain(name string) (domain, remainder string) {\n\ti := strings.IndexRune(name, '/')\n\tif i == -1 || (!strings.ContainsAny(name[:i], \".:\") && name[:i] != \"localhost\") {\n\t\tdomain, remainder = defaultDomain, name\n\t} else {\n\t\tdomain, remainder = name[:i], name[i+1:]\n\t}\n\tif domain == legacyDefaultDomain {\n\t\tdomain = defaultDomain\n\t}\n\tif domain == defaultDomain && !strings.ContainsRune(remainder, '/') {\n\t\tremainder = officialRepoName + \"/\" + remainder\n\t}\n\treturn domain, remainder\n}\n\n// familiarizeName returns a shortened version of the name familiar\n// to the Docker UI. Familiar names have the default domain\n// \"docker.io\" and \"library/\" repository prefix removed.\n// For example, \"docker.io/library/redis\" will have the familiar\n// name \"redis\" and \"docker.io/dmcgowan/myapp\" will be \"dmcgowan/myapp\".\n// Returns a familiarized named only reference.\nfunc familiarizeName(named namedRepository) repository {\n\trepo := repository{\n\t\tdomain: named.Domain(),\n\t\tpath:   named.Path(),\n\t}\n\n\tif repo.domain == defaultDomain {\n\t\trepo.domain = \"\"\n\t\t// Handle official repositories which have the pattern \"library/<official repo name>\"\n\t\tif split := strings.Split(repo.path, \"/\"); len(split) == 2 && split[0] == officialRepoName {\n\t\t\trepo.path = split[1]\n\t\t}\n\t}\n\treturn repo\n}\n\nfunc (r reference) Familiar() Named {\n\treturn reference{\n\t\tnamedRepository: familiarizeName(r.namedRepository),\n\t\ttag:             r.tag,\n\t\tdigest:          r.digest,\n\t}\n}\n\nfunc (r repository) Familiar() Named {\n\treturn familiarizeName(r)\n}\n\nfunc (t taggedReference) Familiar() Named {\n\treturn taggedReference{\n\t\tnamedRepository: familiarizeName(t.namedRepository),\n\t\ttag:             t.tag,\n\t}\n}\n\nfunc (c canonicalReference) Familiar() Named {\n\treturn canonicalReference{\n\t\tnamedRepository: familiarizeName(c.namedRepository),\n\t\tdigest:          c.digest,\n\t}\n}\n\n// TagNameOnly adds the default tag \"latest\" to a reference if it only has\n// a repo name.\nfunc TagNameOnly(ref Named) Named {\n\tif IsNameOnly(ref) {\n\t\tnamedTagged, err := WithTag(ref, defaultTag)\n\t\tif err != nil {\n\t\t\t// Default tag must be valid, to create a NamedTagged\n\t\t\t// type with non-validated input the WithTag function\n\t\t\t// should be used instead\n\t\t\tpanic(err)\n\t\t}\n\t\treturn namedTagged\n\t}\n\treturn ref\n}\n\n// ParseAnyReference parses a reference string as a possible identifier,\n// full digest, or familiar name.\n//\n// Deprecated: This parses inputs with 64 hexadecimal characters as sha256 digests,\n// and that can’t be generalized (a digest algorithm can not be determined purely\n// from the length of the input).\n//\n// In the future, image IDs will either stay 256-bit, but will not be SHA-256 values;\n// or they will support arbitrary algorithms, in which case the hexadecimal-only syntax\n// is not sufficient. Either way, this function will not be fit for purpose.\n//\n// Callers (if any) should redesign their syntax to strictly differentiate between\n// image IDs (with an as-yet-unknown future syntax) and named image references.\nfunc ParseAnyReference(ref string) (Reference, error) {\n\tif ok := anchoredIdentifierRegexp.MatchString(ref); ok {\n\t\treturn digestReference(\"sha256:\" + ref), nil\n\t}\n\tif dgst, err := digest.Parse(ref); err == nil {\n\t\treturn digestReference(dgst), nil\n\t}\n\n\treturn ParseNormalizedNamed(ref)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/reference.go",
    "content": "// Package reference provides a general type to represent any way of referencing images within the registry.\n// Its main purpose is to abstract tags and digests (content-addressable hash).\n//\n// Grammar\n//\n//\treference                       := name [ \":\" tag ] [ \"@\" digest ]\n//\tname                            := [domain '/'] path-component ['/' path-component]*\n//\tdomain                          := domain-component ['.' domain-component]* [':' port-number]\n//\tdomain-component                := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/\n//\tport-number                     := /[0-9]+/\n//\tpath-component                  := alphanumeric [separator alphanumeric]*\n//\talphanumeric                   := /[a-z0-9]+/\n//\tseparator                       := /[_.]|__|[-]*/\n//\n//\ttag                             := /[\\w][\\w.-]{0,127}/\n//\n//\tdigest                          := digest-algorithm \":\" digest-hex\n//\tdigest-algorithm                := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]*\n//\tdigest-algorithm-separator      := /[+.-_]/\n//\tdigest-algorithm-component      := /[A-Za-z][A-Za-z0-9]*/\n//\tdigest-hex                      := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value\n//\n//\tidentifier                      := /[a-f0-9]{64}/\n//\tshort-identifier                := /[a-f0-9]{6,64}/\npackage reference\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nconst (\n\t// NameTotalLengthMax is the maximum total number of characters in a repository name.\n\tNameTotalLengthMax = 255\n)\n\nvar (\n\t// ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference.\n\tErrReferenceInvalidFormat = errors.New(\"invalid reference format\")\n\n\t// ErrTagInvalidFormat represents an error while trying to parse a string as a tag.\n\tErrTagInvalidFormat = errors.New(\"invalid tag format\")\n\n\t// ErrDigestInvalidFormat represents an error while trying to parse a string as a tag.\n\tErrDigestInvalidFormat = errors.New(\"invalid digest format\")\n\n\t// ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters.\n\tErrNameContainsUppercase = errors.New(\"repository name must be lowercase\")\n\n\t// ErrNameEmpty is returned for empty, invalid repository names.\n\tErrNameEmpty = errors.New(\"repository name must have at least one component\")\n\n\t// ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax.\n\tErrNameTooLong = fmt.Errorf(\"repository name must not be more than %v characters\", NameTotalLengthMax)\n\n\t// ErrNameNotCanonical is returned when a name is not canonical.\n\tErrNameNotCanonical = errors.New(\"repository name must be canonical\")\n)\n\n// Reference is an opaque object reference identifier that may include\n// modifiers such as a hostname, name, tag, and digest.\ntype Reference interface {\n\t// String returns the full reference\n\tString() string\n}\n\n// Field provides a wrapper type for resolving correct reference types when\n// working with encoding.\ntype Field struct {\n\treference Reference\n}\n\n// AsField wraps a reference in a Field for encoding.\nfunc AsField(reference Reference) Field {\n\treturn Field{reference}\n}\n\n// Reference unwraps the reference type from the field to\n// return the Reference object. This object should be\n// of the appropriate type to further check for different\n// reference types.\nfunc (f Field) Reference() Reference {\n\treturn f.reference\n}\n\n// MarshalText serializes the field to byte text which\n// is the string of the reference.\nfunc (f Field) MarshalText() (p []byte, err error) {\n\treturn []byte(f.reference.String()), nil\n}\n\n// UnmarshalText parses text bytes by invoking the\n// reference parser to ensure the appropriately\n// typed reference object is wrapped by field.\nfunc (f *Field) UnmarshalText(p []byte) error {\n\tr, err := Parse(string(p))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tf.reference = r\n\treturn nil\n}\n\n// Named is an object with a full name\ntype Named interface {\n\tReference\n\tName() string\n}\n\n// Tagged is an object which has a tag\ntype Tagged interface {\n\tReference\n\tTag() string\n}\n\n// NamedTagged is an object including a name and tag.\ntype NamedTagged interface {\n\tNamed\n\tTag() string\n}\n\n// Digested is an object which has a digest\n// in which it can be referenced by\ntype Digested interface {\n\tReference\n\tDigest() digest.Digest\n}\n\n// Canonical reference is an object with a fully unique\n// name including a name with domain and digest\ntype Canonical interface {\n\tNamed\n\tDigest() digest.Digest\n}\n\n// namedRepository is a reference to a repository with a name.\n// A namedRepository has both domain and path components.\ntype namedRepository interface {\n\tNamed\n\tDomain() string\n\tPath() string\n}\n\n// Domain returns the domain part of the Named reference\nfunc Domain(named Named) string {\n\tif r, ok := named.(namedRepository); ok {\n\t\treturn r.Domain()\n\t}\n\tdomain, _ := splitDomain(named.Name())\n\treturn domain\n}\n\n// Path returns the name without the domain part of the Named reference\nfunc Path(named Named) (name string) {\n\tif r, ok := named.(namedRepository); ok {\n\t\treturn r.Path()\n\t}\n\t_, path := splitDomain(named.Name())\n\treturn path\n}\n\nfunc splitDomain(name string) (string, string) {\n\tmatch := anchoredNameRegexp.FindStringSubmatch(name)\n\tif len(match) != 3 {\n\t\treturn \"\", name\n\t}\n\treturn match[1], match[2]\n}\n\n// SplitHostname splits a named reference into a\n// hostname and name string. If no valid hostname is\n// found, the hostname is empty and the full value\n// is returned as name\n// Deprecated: Use Domain or Path\nfunc SplitHostname(named Named) (string, string) {\n\tif r, ok := named.(namedRepository); ok {\n\t\treturn r.Domain(), r.Path()\n\t}\n\treturn splitDomain(named.Name())\n}\n\n// Parse parses s and returns a syntactically valid Reference.\n// If an error was encountered it is returned, along with a nil Reference.\n// NOTE: Parse will not handle short digests.\nfunc Parse(s string) (Reference, error) {\n\tmatches := ReferenceRegexp.FindStringSubmatch(s)\n\tif matches == nil {\n\t\tif s == \"\" {\n\t\t\treturn nil, ErrNameEmpty\n\t\t}\n\t\tif ReferenceRegexp.FindStringSubmatch(strings.ToLower(s)) != nil {\n\t\t\treturn nil, ErrNameContainsUppercase\n\t\t}\n\t\treturn nil, ErrReferenceInvalidFormat\n\t}\n\n\tif len(matches[1]) > NameTotalLengthMax {\n\t\treturn nil, ErrNameTooLong\n\t}\n\n\tvar repo repository\n\n\tnameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1])\n\tif len(nameMatch) == 3 {\n\t\trepo.domain = nameMatch[1]\n\t\trepo.path = nameMatch[2]\n\t} else {\n\t\trepo.domain = \"\"\n\t\trepo.path = matches[1]\n\t}\n\n\tref := reference{\n\t\tnamedRepository: repo,\n\t\ttag:             matches[2],\n\t}\n\tif matches[3] != \"\" {\n\t\tvar err error\n\t\tref.digest, err = digest.Parse(matches[3])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tr := getBestReferenceType(ref)\n\tif r == nil {\n\t\treturn nil, ErrNameEmpty\n\t}\n\n\treturn r, nil\n}\n\n// ParseNamed parses s and returns a syntactically valid reference implementing\n// the Named interface. The reference must have a name and be in the canonical\n// form, otherwise an error is returned.\n// If an error was encountered it is returned, along with a nil Reference.\n// NOTE: ParseNamed will not handle short digests.\nfunc ParseNamed(s string) (Named, error) {\n\tnamed, err := ParseNormalizedNamed(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif named.String() != s {\n\t\treturn nil, ErrNameNotCanonical\n\t}\n\treturn named, nil\n}\n\n// WithName returns a named object representing the given string. If the input\n// is invalid ErrReferenceInvalidFormat will be returned.\nfunc WithName(name string) (Named, error) {\n\tif len(name) > NameTotalLengthMax {\n\t\treturn nil, ErrNameTooLong\n\t}\n\n\tmatch := anchoredNameRegexp.FindStringSubmatch(name)\n\tif match == nil || len(match) != 3 {\n\t\treturn nil, ErrReferenceInvalidFormat\n\t}\n\treturn repository{\n\t\tdomain: match[1],\n\t\tpath:   match[2],\n\t}, nil\n}\n\n// WithTag combines the name from \"name\" and the tag from \"tag\" to form a\n// reference incorporating both the name and the tag.\nfunc WithTag(name Named, tag string) (NamedTagged, error) {\n\tif !anchoredTagRegexp.MatchString(tag) {\n\t\treturn nil, ErrTagInvalidFormat\n\t}\n\tvar repo repository\n\tif r, ok := name.(namedRepository); ok {\n\t\trepo.domain = r.Domain()\n\t\trepo.path = r.Path()\n\t} else {\n\t\trepo.path = name.Name()\n\t}\n\tif canonical, ok := name.(Canonical); ok {\n\t\treturn reference{\n\t\t\tnamedRepository: repo,\n\t\t\ttag:             tag,\n\t\t\tdigest:          canonical.Digest(),\n\t\t}, nil\n\t}\n\treturn taggedReference{\n\t\tnamedRepository: repo,\n\t\ttag:             tag,\n\t}, nil\n}\n\n// WithDigest combines the name from \"name\" and the digest from \"digest\" to form\n// a reference incorporating both the name and the digest.\nfunc WithDigest(name Named, digest digest.Digest) (Canonical, error) {\n\tif !anchoredDigestRegexp.MatchString(digest.String()) {\n\t\treturn nil, ErrDigestInvalidFormat\n\t}\n\tvar repo repository\n\tif r, ok := name.(namedRepository); ok {\n\t\trepo.domain = r.Domain()\n\t\trepo.path = r.Path()\n\t} else {\n\t\trepo.path = name.Name()\n\t}\n\tif tagged, ok := name.(Tagged); ok {\n\t\treturn reference{\n\t\t\tnamedRepository: repo,\n\t\t\ttag:             tagged.Tag(),\n\t\t\tdigest:          digest,\n\t\t}, nil\n\t}\n\treturn canonicalReference{\n\t\tnamedRepository: repo,\n\t\tdigest:          digest,\n\t}, nil\n}\n\n// TrimNamed removes any tag or digest from the named reference.\nfunc TrimNamed(ref Named) Named {\n\tdomain, path := SplitHostname(ref)\n\treturn repository{\n\t\tdomain: domain,\n\t\tpath:   path,\n\t}\n}\n\nfunc getBestReferenceType(ref reference) Reference {\n\tif ref.Name() == \"\" {\n\t\t// Allow digest only references\n\t\tif ref.digest != \"\" {\n\t\t\treturn digestReference(ref.digest)\n\t\t}\n\t\treturn nil\n\t}\n\tif ref.tag == \"\" {\n\t\tif ref.digest != \"\" {\n\t\t\treturn canonicalReference{\n\t\t\t\tnamedRepository: ref.namedRepository,\n\t\t\t\tdigest:          ref.digest,\n\t\t\t}\n\t\t}\n\t\treturn ref.namedRepository\n\t}\n\tif ref.digest == \"\" {\n\t\treturn taggedReference{\n\t\t\tnamedRepository: ref.namedRepository,\n\t\t\ttag:             ref.tag,\n\t\t}\n\t}\n\n\treturn ref\n}\n\ntype reference struct {\n\tnamedRepository\n\ttag    string\n\tdigest digest.Digest\n}\n\nfunc (r reference) String() string {\n\treturn r.Name() + \":\" + r.tag + \"@\" + r.digest.String()\n}\n\nfunc (r reference) Tag() string {\n\treturn r.tag\n}\n\nfunc (r reference) Digest() digest.Digest {\n\treturn r.digest\n}\n\ntype repository struct {\n\tdomain string\n\tpath   string\n}\n\nfunc (r repository) String() string {\n\treturn r.Name()\n}\n\nfunc (r repository) Name() string {\n\tif r.domain == \"\" {\n\t\treturn r.path\n\t}\n\treturn r.domain + \"/\" + r.path\n}\n\nfunc (r repository) Domain() string {\n\treturn r.domain\n}\n\nfunc (r repository) Path() string {\n\treturn r.path\n}\n\ntype digestReference digest.Digest\n\nfunc (d digestReference) String() string {\n\treturn digest.Digest(d).String()\n}\n\nfunc (d digestReference) Digest() digest.Digest {\n\treturn digest.Digest(d)\n}\n\ntype taggedReference struct {\n\tnamedRepository\n\ttag string\n}\n\nfunc (t taggedReference) String() string {\n\treturn t.Name() + \":\" + t.tag\n}\n\nfunc (t taggedReference) Tag() string {\n\treturn t.tag\n}\n\ntype canonicalReference struct {\n\tnamedRepository\n\tdigest digest.Digest\n}\n\nfunc (c canonicalReference) String() string {\n\treturn c.Name() + \"@\" + c.digest.String()\n}\n\nfunc (c canonicalReference) Digest() digest.Digest {\n\treturn c.digest\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/regexp-additions.go",
    "content": "package reference\n\n// Return true if the specified string fully matches `IdentifierRegexp`.\nfunc IsFullIdentifier(s string) bool {\n\treturn anchoredIdentifierRegexp.MatchString(s)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/reference/regexp.go",
    "content": "package reference\n\nimport (\n\t\"regexp\"\n\t\"strings\"\n\n\tstorageRegexp \"go.podman.io/storage/pkg/regexp\"\n)\n\nconst (\n\t// alphaNumeric defines the alpha numeric atom, typically a\n\t// component of names. This only allows lower case characters and digits.\n\talphaNumeric = `[a-z0-9]+`\n\n\t// separator defines the separators allowed to be embedded in name\n\t// components. This allow one period, one or two underscore and multiple\n\t// dashes. Repeated dashes and underscores are intentionally treated\n\t// differently. In order to support valid hostnames as name components,\n\t// supporting repeated dash was added. Additionally double underscore is\n\t// now allowed as a separator to loosen the restriction for previously\n\t// supported names.\n\tseparator = `(?:[._]|__|[-]*)`\n\n\t// repository name to start with a component as defined by DomainRegexp\n\t// and followed by an optional port.\n\tdomainComponent = `(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`\n\n\t// The string counterpart for TagRegexp.\n\ttag = `[\\w][\\w.-]{0,127}`\n\n\t// The string counterpart for DigestRegexp.\n\tdigestPat = `[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`\n\n\t// The string counterpart for IdentifierRegexp.\n\tidentifier = `([a-f0-9]{64})`\n\n\t// The string counterpart for ShortIdentifierRegexp.\n\tshortIdentifier = `([a-f0-9]{6,64})`\n)\n\nvar (\n\t// nameComponent restricts registry path component names to start\n\t// with at least one letter or number, with following parts able to be\n\t// separated by one period, one or two underscore and multiple dashes.\n\tnameComponent = expression(\n\t\talphaNumeric,\n\t\toptional(repeated(separator, alphaNumeric)))\n\n\tdomain = expression(\n\t\tdomainComponent,\n\t\toptional(repeated(literal(`.`), domainComponent)),\n\t\toptional(literal(`:`), `[0-9]+`))\n\t// DomainRegexp defines the structure of potential domain components\n\t// that may be part of image names. This is purposely a subset of what is\n\t// allowed by DNS to ensure backwards compatibility with Docker image\n\t// names.\n\tDomainRegexp = re(domain)\n\n\t// TagRegexp matches valid tag names. From docker/docker:graph/tags.go.\n\tTagRegexp = re(tag)\n\n\tanchoredTag = anchored(tag)\n\t// anchoredTagRegexp matches valid tag names, anchored at the start and\n\t// end of the matched string.\n\tanchoredTagRegexp = storageRegexp.Delayed(anchoredTag)\n\n\t// DigestRegexp matches valid digests.\n\tDigestRegexp = re(digestPat)\n\n\tanchoredDigest = anchored(digestPat)\n\t// anchoredDigestRegexp matches valid digests, anchored at the start and\n\t// end of the matched string.\n\tanchoredDigestRegexp = storageRegexp.Delayed(anchoredDigest)\n\n\tnamePat = expression(\n\t\toptional(domain, literal(`/`)),\n\t\tnameComponent,\n\t\toptional(repeated(literal(`/`), nameComponent)))\n\t// NameRegexp is the format for the name component of references. The\n\t// regexp has capturing groups for the domain and name part omitting\n\t// the separating forward slash from either.\n\tNameRegexp = re(namePat)\n\n\tanchoredName = anchored(\n\t\toptional(capture(domain), literal(`/`)),\n\t\tcapture(nameComponent,\n\t\t\toptional(repeated(literal(`/`), nameComponent))))\n\t// anchoredNameRegexp is used to parse a name value, capturing the\n\t// domain and trailing components.\n\tanchoredNameRegexp = storageRegexp.Delayed(anchoredName)\n\n\treferencePat = anchored(capture(namePat),\n\t\toptional(literal(\":\"), capture(tag)),\n\t\toptional(literal(\"@\"), capture(digestPat)))\n\t// ReferenceRegexp is the full supported format of a reference. The regexp\n\t// is anchored and has capturing groups for name, tag, and digest\n\t// components.\n\tReferenceRegexp = re(referencePat)\n\n\t// IdentifierRegexp is the format for string identifier used as a\n\t// content addressable identifier using sha256. These identifiers\n\t// are like digests without the algorithm, since sha256 is used.\n\tIdentifierRegexp = re(identifier)\n\n\t// ShortIdentifierRegexp is the format used to represent a prefix\n\t// of an identifier. A prefix may be used to match a sha256 identifier\n\t// within a list of trusted identifiers.\n\tShortIdentifierRegexp = re(shortIdentifier)\n\n\tanchoredIdentifier = anchored(identifier)\n\t// anchoredIdentifierRegexp is used to check or match an\n\t// identifier value, anchored at start and end of string.\n\tanchoredIdentifierRegexp = storageRegexp.Delayed(anchoredIdentifier)\n)\n\n// re compiles the string to a regular expression.\nvar re = regexp.MustCompile\n\n// literal compiles s into a literal regular expression, escaping any regexp\n// reserved characters.\nfunc literal(s string) string {\n\treturn regexp.QuoteMeta(s)\n}\n\n// expression defines a full expression, where each regular expression must\n// follow the previous.\nfunc expression(res ...string) string {\n\treturn strings.Join(res, \"\")\n}\n\n// optional wraps the expression in a non-capturing group and makes the\n// production optional.\nfunc optional(res ...string) string {\n\treturn group(expression(res...)) + `?`\n}\n\n// repeated wraps the regexp in a non-capturing group to get one or more\n// matches.\nfunc repeated(res ...string) string {\n\treturn group(expression(res...)) + `+`\n}\n\n// group wraps the regexp in a non-capturing group.\nfunc group(res ...string) string {\n\treturn `(?:` + expression(res...) + `)`\n}\n\n// capture wraps the expression in a capturing group.\nfunc capture(res ...string) string {\n\treturn `(` + expression(res...) + `)`\n}\n\n// anchored anchors the regular expression by adding start and end delimiters.\nfunc anchored(res ...string) string {\n\treturn `^` + expression(res...) + `$`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/registries_d.go",
    "content": "package docker\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"net/url\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/rootless\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// systemRegistriesDirPath is the path to registries.d, used for locating lookaside Docker signature storage.\n// You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/docker.systemRegistriesDirPath=$your_path'\nvar systemRegistriesDirPath = builtinRegistriesDirPath\n\n// builtinRegistriesDirPath is the path to registries.d.\n// DO NOT change this, instead see systemRegistriesDirPath above.\nconst builtinRegistriesDirPath = etcDir + \"/containers/registries.d\"\n\n// userRegistriesDirPath is the path to the per user registries.d.\nvar userRegistriesDir = filepath.FromSlash(\".config/containers/registries.d\")\n\n// defaultUserDockerDir is the default lookaside directory for unprivileged user\nvar defaultUserDockerDir = filepath.FromSlash(\".local/share/containers/sigstore\")\n\n// defaultDockerDir is the default lookaside directory for root\nvar defaultDockerDir = \"/var/lib/containers/sigstore\"\n\n// registryConfiguration is one of the files in registriesDirPath configuring lookaside locations, or the result of merging them all.\n// NOTE: Keep this in sync with docs/registries.d.md!\ntype registryConfiguration struct {\n\tDefaultDocker *registryNamespace `yaml:\"default-docker\"`\n\t// The key is a namespace, using fully-expanded Docker reference format or parent namespaces (per dockerReference.PolicyConfiguration*),\n\tDocker map[string]registryNamespace `yaml:\"docker\"`\n}\n\n// registryNamespace defines lookaside locations for a single namespace.\ntype registryNamespace struct {\n\tLookaside              string `yaml:\"lookaside\"`         // For reading, and if LookasideStaging is not present, for writing.\n\tLookasideStaging       string `yaml:\"lookaside-staging\"` // For writing only.\n\tSigStore               string `yaml:\"sigstore\"`          // For compatibility, deprecated in favor of Lookaside.\n\tSigStoreStaging        string `yaml:\"sigstore-staging\"`  // For compatibility, deprecated in favor of LookasideStaging.\n\tUseSigstoreAttachments *bool  `yaml:\"use-sigstore-attachments,omitempty\"`\n}\n\n// lookasideStorageBase is an \"opaque\" type representing a lookaside Docker signature storage.\n// Users outside of this file should use SignatureStorageBaseURL and lookasideStorageURL below.\ntype lookasideStorageBase *url.URL\n\n// SignatureStorageBaseURL reads configuration to find an appropriate lookaside storage URL for ref, for write access if “write”.\n// the usage of the BaseURL is defined under docker/distribution registries—separate storage of docs/signature-protocols.md\n// Warning: This function only exposes configuration in registries.d;\n// just because this function returns an URL does not mean that the URL will be used by c/image/docker (e.g. if the registry natively supports X-R-S-S).\nfunc SignatureStorageBaseURL(sys *types.SystemContext, ref types.ImageReference, write bool) (*url.URL, error) {\n\tdr, ok := ref.(dockerReference)\n\tif !ok {\n\t\treturn nil, errors.New(\"ref must be a dockerReference\")\n\t}\n\tconfig, err := loadRegistryConfiguration(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn config.lookasideStorageBaseURL(dr, write)\n}\n\n// loadRegistryConfiguration returns a registryConfiguration appropriate for sys.\nfunc loadRegistryConfiguration(sys *types.SystemContext) (*registryConfiguration, error) {\n\tdirPath := registriesDirPath(sys)\n\tlogrus.Debugf(`Using registries.d directory %s`, dirPath)\n\treturn loadAndMergeConfig(dirPath)\n}\n\n// registriesDirPath returns a path to registries.d\nfunc registriesDirPath(sys *types.SystemContext) string {\n\treturn registriesDirPathWithHomeDir(sys, homedir.Get())\n}\n\n// registriesDirPathWithHomeDir is an internal implementation detail of registriesDirPath,\n// it exists only to allow testing it with an artificial home directory.\nfunc registriesDirPathWithHomeDir(sys *types.SystemContext, homeDir string) string {\n\tif sys != nil && sys.RegistriesDirPath != \"\" {\n\t\treturn sys.RegistriesDirPath\n\t}\n\tuserRegistriesDirPath := filepath.Join(homeDir, userRegistriesDir)\n\tif err := fileutils.Exists(userRegistriesDirPath); err == nil {\n\t\treturn userRegistriesDirPath\n\t}\n\tif sys != nil && sys.RootForImplicitAbsolutePaths != \"\" {\n\t\treturn filepath.Join(sys.RootForImplicitAbsolutePaths, systemRegistriesDirPath)\n\t}\n\n\treturn systemRegistriesDirPath\n}\n\n// loadAndMergeConfig loads configuration files in dirPath\n// FIXME: Probably rename to loadRegistryConfigurationForPath\nfunc loadAndMergeConfig(dirPath string) (*registryConfiguration, error) {\n\tmergedConfig := registryConfiguration{Docker: map[string]registryNamespace{}}\n\tdockerDefaultMergedFrom := \"\"\n\tnsMergedFrom := map[string]string{}\n\n\tdir, err := os.Open(dirPath)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn &mergedConfig, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\tconfigNames, err := dir.Readdirnames(0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, configName := range configNames {\n\t\tif !strings.HasSuffix(configName, \".yaml\") {\n\t\t\tcontinue\n\t\t}\n\t\tconfigPath := filepath.Join(dirPath, configName)\n\t\tconfigBytes, err := os.ReadFile(configPath)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t\t// file must have been removed between the directory listing\n\t\t\t\t// and the open call, ignore that as it is a expected race\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar config registryConfiguration\n\t\terr = yaml.Unmarshal(configBytes, &config)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing %s: %w\", configPath, err)\n\t\t}\n\n\t\tif config.DefaultDocker != nil {\n\t\t\tif mergedConfig.DefaultDocker != nil {\n\t\t\t\treturn nil, fmt.Errorf(`Error parsing signature storage configuration: \"default-docker\" defined both in %q and %q`,\n\t\t\t\t\tdockerDefaultMergedFrom, configPath)\n\t\t\t}\n\t\t\tmergedConfig.DefaultDocker = config.DefaultDocker\n\t\t\tdockerDefaultMergedFrom = configPath\n\t\t}\n\n\t\tfor nsName, nsConfig := range config.Docker { // includes config.Docker == nil\n\t\t\tif _, ok := mergedConfig.Docker[nsName]; ok {\n\t\t\t\treturn nil, fmt.Errorf(`Error parsing signature storage configuration: \"docker\" namespace %q defined both in %q and %q`,\n\t\t\t\t\tnsName, nsMergedFrom[nsName], configPath)\n\t\t\t}\n\t\t\tmergedConfig.Docker[nsName] = nsConfig\n\t\t\tnsMergedFrom[nsName] = configPath\n\t\t}\n\t}\n\n\treturn &mergedConfig, nil\n}\n\n// lookasideStorageBaseURL returns an appropriate signature storage URL for ref, for write access if “write”.\n// the usage of the BaseURL is defined under docker/distribution registries—separate storage of docs/signature-protocols.md\nfunc (config *registryConfiguration) lookasideStorageBaseURL(dr dockerReference, write bool) (*url.URL, error) {\n\ttopLevel := config.signatureTopLevel(dr, write)\n\tvar baseURL *url.URL\n\tif topLevel != \"\" {\n\t\tu, err := url.Parse(topLevel)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Invalid signature storage URL %s: %w\", topLevel, err)\n\t\t}\n\t\tbaseURL = u\n\t} else {\n\t\t// returns default directory if no lookaside specified in configuration file\n\t\tbaseURL = builtinDefaultLookasideStorageDir(rootless.GetRootlessEUID())\n\t\tlogrus.Debugf(\" No signature storage configuration found for %s, using built-in default %s\", dr.PolicyConfigurationIdentity(), baseURL.Redacted())\n\t}\n\t// NOTE: Keep this in sync with docs/signature-protocols.md!\n\t// FIXME? Restrict to explicitly supported schemes?\n\trepo := reference.Path(dr.ref) // Note that this is without a tag or digest.\n\tif path.Clean(repo) != repo {  // Coverage: This should not be reachable because /./ and /../ components are not valid in docker references\n\t\treturn nil, fmt.Errorf(\"Unexpected path elements in Docker reference %s for signature storage\", dr.ref.String())\n\t}\n\tbaseURL.Path = baseURL.Path + \"/\" + repo\n\treturn baseURL, nil\n}\n\n// builtinDefaultLookasideStorageDir returns default signature storage URL as per euid\nfunc builtinDefaultLookasideStorageDir(euid int) *url.URL {\n\tif euid != 0 {\n\t\treturn &url.URL{Scheme: \"file\", Path: filepath.Join(homedir.Get(), defaultUserDockerDir)}\n\t}\n\treturn &url.URL{Scheme: \"file\", Path: defaultDockerDir}\n}\n\n// config.signatureTopLevel returns an URL string configured in config for ref, for write access if “write”.\n// (the top level of the storage, namespaced by repo.FullName etc.), or \"\" if nothing has been configured.\nfunc (config *registryConfiguration) signatureTopLevel(ref dockerReference, write bool) string {\n\tif config.Docker != nil {\n\t\t// Look for a full match.\n\t\tidentity := ref.PolicyConfigurationIdentity()\n\t\tif ns, ok := config.Docker[identity]; ok {\n\t\t\tlogrus.Debugf(` Lookaside configuration: using \"docker\" namespace %s`, identity)\n\t\t\tif ret := ns.signatureTopLevel(write); ret != \"\" {\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\n\t\t// Look for a match of the possible parent namespaces.\n\t\tfor _, name := range ref.PolicyConfigurationNamespaces() {\n\t\t\tif ns, ok := config.Docker[name]; ok {\n\t\t\t\tlogrus.Debugf(` Lookaside configuration: using \"docker\" namespace %s`, name)\n\t\t\t\tif ret := ns.signatureTopLevel(write); ret != \"\" {\n\t\t\t\t\treturn ret\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Look for a default location\n\tif config.DefaultDocker != nil {\n\t\tlogrus.Debugf(` Lookaside configuration: using \"default-docker\" configuration`)\n\t\tif ret := config.DefaultDocker.signatureTopLevel(write); ret != \"\" {\n\t\t\treturn ret\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// config.useSigstoreAttachments returns whether we should look for and write sigstore attachments.\n// for ref.\nfunc (config *registryConfiguration) useSigstoreAttachments(ref dockerReference) bool {\n\tif config.Docker != nil {\n\t\t// Look for a full match.\n\t\tidentity := ref.PolicyConfigurationIdentity()\n\t\tif ns, ok := config.Docker[identity]; ok {\n\t\t\tlogrus.Debugf(` Sigstore attachments: using \"docker\" namespace %s`, identity)\n\t\t\tif ns.UseSigstoreAttachments != nil {\n\t\t\t\treturn *ns.UseSigstoreAttachments\n\t\t\t}\n\t\t}\n\n\t\t// Look for a match of the possible parent namespaces.\n\t\tfor _, name := range ref.PolicyConfigurationNamespaces() {\n\t\t\tif ns, ok := config.Docker[name]; ok {\n\t\t\t\tlogrus.Debugf(` Sigstore attachments: using \"docker\" namespace %s`, name)\n\t\t\t\tif ns.UseSigstoreAttachments != nil {\n\t\t\t\t\treturn *ns.UseSigstoreAttachments\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Look for a default location\n\tif config.DefaultDocker != nil {\n\t\tlogrus.Debugf(` Sigstore attachments: using \"default-docker\" configuration`)\n\t\tif config.DefaultDocker.UseSigstoreAttachments != nil {\n\t\t\treturn *config.DefaultDocker.UseSigstoreAttachments\n\t\t}\n\t}\n\treturn false\n}\n\n// ns.signatureTopLevel returns an URL string configured in ns for ref, for write access if “write”.\n// or \"\" if nothing has been configured.\nfunc (ns registryNamespace) signatureTopLevel(write bool) string {\n\tif write {\n\t\tif ns.LookasideStaging != \"\" {\n\t\t\tlogrus.Debugf(`  Using \"lookaside-staging\" %s`, ns.LookasideStaging)\n\t\t\treturn ns.LookasideStaging\n\t\t}\n\t\tif ns.SigStoreStaging != \"\" {\n\t\t\tlogrus.Debugf(`  Using \"sigstore-staging\" %s`, ns.SigStoreStaging)\n\t\t\treturn ns.SigStoreStaging\n\t\t}\n\t}\n\tif ns.Lookaside != \"\" {\n\t\tlogrus.Debugf(`  Using \"lookaside\" %s`, ns.Lookaside)\n\t\treturn ns.Lookaside\n\t}\n\tif ns.SigStore != \"\" {\n\t\tlogrus.Debugf(`  Using \"sigstore\" %s`, ns.SigStore)\n\t\treturn ns.SigStore\n\t}\n\treturn \"\"\n}\n\n// lookasideStorageURL returns an URL usable for accessing signature index in base with known manifestDigest.\n// base is not nil from the caller\n// NOTE: Keep this in sync with docs/signature-protocols.md!\nfunc lookasideStorageURL(base lookasideStorageBase, manifestDigest digest.Digest, index int) (*url.URL, error) {\n\tif err := manifestDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly.\n\t\treturn nil, err\n\t}\n\tsigURL := *base\n\tsigURL.Path = fmt.Sprintf(\"%s@%s=%s/signature-%d\", sigURL.Path, manifestDigest.Algorithm(), manifestDigest.Encoded(), index+1)\n\treturn &sigURL, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/docker/wwwauthenticate.go",
    "content": "package docker\n\n// Based on github.com/docker/distribution/registry/client/auth/authchallenge.go, primarily stripping unnecessary dependencies.\n\nimport (\n\t\"fmt\"\n\t\"iter\"\n\t\"net/http\"\n\t\"strings\"\n)\n\n// challenge carries information from a WWW-Authenticate response header.\n// See RFC 7235.\ntype challenge struct {\n\t// Scheme is the auth-scheme according to RFC 7235\n\tScheme string\n\n\t// Parameters are the auth-params according to RFC 7235\n\tParameters map[string]string\n}\n\n// Octet types from RFC 7230.\ntype octetType byte\n\nvar octetTypes [256]octetType\n\nconst (\n\tisToken octetType = 1 << iota\n\tisSpace\n)\n\nfunc init() {\n\t// OCTET      = <any 8-bit sequence of data>\n\t// CHAR       = <any US-ASCII character (octets 0 - 127)>\n\t// CTL        = <any US-ASCII control character (octets 0 - 31) and DEL (127)>\n\t// CR         = <US-ASCII CR, carriage return (13)>\n\t// LF         = <US-ASCII LF, linefeed (10)>\n\t// SP         = <US-ASCII SP, space (32)>\n\t// HT         = <US-ASCII HT, horizontal-tab (9)>\n\t// <\">        = <US-ASCII double-quote mark (34)>\n\t// CRLF       = CR LF\n\t// LWS        = [CRLF] 1*( SP | HT )\n\t// TEXT       = <any OCTET except CTLs, but including LWS>\n\t// separators = \"(\" | \")\" | \"<\" | \">\" | \"@\" | \",\" | \";\" | \":\" | \"\\\" | <\">\n\t//              | \"/\" | \"[\" | \"]\" | \"?\" | \"=\" | \"{\" | \"}\" | SP | HT\n\t// token      = 1*<any CHAR except CTLs or separators>\n\t// qdtext     = <any TEXT except <\">>\n\n\tfor c := range octetTypes {\n\t\tvar t octetType\n\t\tisCtl := c <= 31 || c == 127\n\t\tisChar := 0 <= c && c <= 127\n\t\tisSeparator := strings.ContainsRune(\" \\t\\\"(),/:;<=>?@[]\\\\{}\", rune(c))\n\t\tif strings.ContainsRune(\" \\t\\r\\n\", rune(c)) {\n\t\t\tt |= isSpace\n\t\t}\n\t\tif isChar && !isCtl && !isSeparator {\n\t\t\tt |= isToken\n\t\t}\n\t\toctetTypes[c] = t\n\t}\n}\n\nfunc iterateAuthHeader(header http.Header) iter.Seq[challenge] {\n\treturn func(yield func(challenge) bool) {\n\t\tfor _, h := range header[http.CanonicalHeaderKey(\"WWW-Authenticate\")] {\n\t\t\tv, p := parseValueAndParams(h)\n\t\t\tif v != \"\" {\n\t\t\t\tif !yield(challenge{Scheme: v, Parameters: p}) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// parseAuthScope parses an authentication scope string of the form `$resource:$remote:$actions`\nfunc parseAuthScope(scopeStr string) (*authScope, error) {\n\tif parts := strings.Split(scopeStr, \":\"); len(parts) == 3 {\n\t\treturn &authScope{\n\t\t\tresourceType: parts[0],\n\t\t\tremoteName:   parts[1],\n\t\t\tactions:      parts[2],\n\t\t}, nil\n\t}\n\treturn nil, fmt.Errorf(\"error parsing auth scope: '%s'\", scopeStr)\n}\n\n// NOTE: This is not a fully compliant parser per RFC 7235:\n// Most notably it does not support more than one challenge within a single header\n// Some of the whitespace parsing also seems noncompliant.\n// But it is clearly better than what we used to have…\nfunc parseValueAndParams(header string) (value string, params map[string]string) {\n\tparams = make(map[string]string)\n\tvalue, s := expectToken(header)\n\tif value == \"\" {\n\t\treturn value, params\n\t}\n\tvalue = strings.ToLower(value)\n\ts = \",\" + skipSpace(s)\n\tfor strings.HasPrefix(s, \",\") {\n\t\tvar pkey string\n\t\tpkey, s = expectToken(skipSpace(s[1:]))\n\t\tif pkey == \"\" {\n\t\t\treturn value, params\n\t\t}\n\t\tif !strings.HasPrefix(s, \"=\") {\n\t\t\treturn value, params\n\t\t}\n\t\tvar pvalue string\n\t\tpvalue, s = expectTokenOrQuoted(s[1:])\n\t\tif pvalue == \"\" {\n\t\t\treturn value, params\n\t\t}\n\t\tpkey = strings.ToLower(pkey)\n\t\tparams[pkey] = pvalue\n\t\ts = skipSpace(s)\n\t}\n\treturn value, params\n}\n\nfunc skipSpace(s string) (rest string) {\n\ti := 0\n\tfor ; i < len(s); i++ {\n\t\tif octetTypes[s[i]]&isSpace == 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn s[i:]\n}\n\nfunc expectToken(s string) (token, rest string) {\n\ti := 0\n\tfor ; i < len(s); i++ {\n\t\tif octetTypes[s[i]]&isToken == 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn s[:i], s[i:]\n}\n\nfunc expectTokenOrQuoted(s string) (value string, rest string) {\n\tif !strings.HasPrefix(s, \"\\\"\") {\n\t\treturn expectToken(s)\n\t}\n\ts = s[1:]\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch s[i] {\n\t\tcase '\"':\n\t\t\treturn s[:i], s[i+1:]\n\t\tcase '\\\\':\n\t\t\tp := make([]byte, len(s)-1)\n\t\t\tj := copy(p, s[:i])\n\t\t\tescape := true\n\t\t\tfor i++; i < len(s); i++ {\n\t\t\t\tb := s[i]\n\t\t\t\tswitch {\n\t\t\t\tcase escape:\n\t\t\t\t\tescape = false\n\t\t\t\t\tp[j] = b\n\t\t\t\t\tj++\n\t\t\t\tcase b == '\\\\':\n\t\t\t\t\tescape = true\n\t\t\t\tcase b == '\"':\n\t\t\t\t\treturn string(p[:j]), s[i+1:]\n\t\t\t\tdefault:\n\t\t\t\t\tp[j] = b\n\t\t\t\t\tj++\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\", \"\"\n\t\t}\n\t}\n\treturn \"\", \"\"\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/image/docker_schema2.go",
    "content": "package image\n\nimport (\n\t\"go.podman.io/image/v5/internal/image\"\n)\n\n// GzippedEmptyLayer is a gzip-compressed version of an empty tar file (1024 NULL bytes)\n// This comes from github.com/docker/distribution/manifest/schema1/config_builder.go; there is\n// a non-zero embedded timestamp; we could zero that, but that would just waste storage space\n// in registries, so let’s use the same values.\nvar GzippedEmptyLayer = image.GzippedEmptyLayer\n\n// GzippedEmptyLayerDigest is a digest of GzippedEmptyLayer\nconst GzippedEmptyLayerDigest = image.GzippedEmptyLayerDigest\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/image/sourced.go",
    "content": "// Package image consolidates knowledge about various container image formats\n// (as opposed to image storage mechanisms, which are handled by types.ImageSource)\n// and exposes all of them using an unified interface.\npackage image\n\nimport (\n\t\"context\"\n\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// FromSource returns a types.ImageCloser implementation for the default instance of source.\n// If source is a manifest list, .Manifest() still returns the manifest list,\n// but other methods transparently return data from an appropriate image instance.\n//\n// The caller must call .Close() on the returned ImageCloser.\n//\n// FromSource “takes ownership” of the input ImageSource and will call src.Close()\n// when the image is closed.  (This does not prevent callers from using both the\n// Image and ImageSource objects simultaneously, but it means that they only need to\n// the Image.)\n//\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage instead of calling this function.\nfunc FromSource(ctx context.Context, sys *types.SystemContext, src types.ImageSource) (types.ImageCloser, error) {\n\treturn image.FromSource(ctx, sys, src)\n}\n\n// FromUnparsedImage returns a types.Image implementation for unparsed.\n// If unparsed represents a manifest list, .Manifest() still returns the manifest list,\n// but other methods transparently return data from an appropriate single image.\n//\n// The Image must not be used after the underlying ImageSource is Close()d.\nfunc FromUnparsedImage(ctx context.Context, sys *types.SystemContext, unparsed *UnparsedImage) (types.Image, error) {\n\treturn image.FromUnparsedImage(ctx, sys, unparsed)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/image/unparsed.go",
    "content": "package image\n\nimport (\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/unparsedimage\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// UnparsedImage implements types.UnparsedImage .\n// An UnparsedImage is a pair of (ImageSource, instance digest); it can represent either a manifest list or a single image instance.\ntype UnparsedImage = image.UnparsedImage\n\n// UnparsedInstance returns a types.UnparsedImage implementation for (source, instanceDigest).\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list).\n//\n// This implementation of [types.UnparsedImage] ensures that [types.UnparsedImage.Manifest] validates the image\n// against instanceDigest if set, or, if not, a digest implied by src.Reference, if any.\n//\n// The UnparsedImage must not be used after the underlying ImageSource is Close()d.\nfunc UnparsedInstance(src types.ImageSource, instanceDigest *digest.Digest) *UnparsedImage {\n\treturn image.UnparsedInstance(src, instanceDigest)\n}\n\n// unparsedWithRef wraps a private.UnparsedImage, claiming another replacementRef\ntype unparsedWithRef struct {\n\tprivate.UnparsedImage\n\tref types.ImageReference\n}\n\nfunc (uwr *unparsedWithRef) Reference() types.ImageReference {\n\treturn uwr.ref\n}\n\n// UnparsedInstanceWithReference returns a types.UnparsedImage for wrappedInstance which claims to be a replacementRef.\n// This is useful for combining image data with other reference values, e.g. to check signatures on a locally-pulled image\n// based on a remote-registry policy.\n//\n// For the purposes of digest validation in [types.UnparsedImage.Manifest], what matters is the\n// reference originally used to create wrappedInstance, not replacementRef.\nfunc UnparsedInstanceWithReference(wrappedInstance types.UnparsedImage, replacementRef types.ImageReference) types.UnparsedImage {\n\treturn &unparsedWithRef{\n\t\tUnparsedImage: unparsedimage.FromPublic(wrappedInstance),\n\t\tref:           replacementRef,\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/blobinfocache/blobinfocache.go",
    "content": "package blobinfocache\n\nimport (\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// FromBlobInfoCache returns a BlobInfoCache2 based on a BlobInfoCache, returning the original\n// object if it implements BlobInfoCache2, or a wrapper which discards compression information\n// if it only implements BlobInfoCache.\nfunc FromBlobInfoCache(bic types.BlobInfoCache) BlobInfoCache2 {\n\tif bic2, ok := bic.(BlobInfoCache2); ok {\n\t\treturn bic2\n\t}\n\treturn &v1OnlyBlobInfoCache{\n\t\tBlobInfoCache: bic,\n\t}\n}\n\ntype v1OnlyBlobInfoCache struct {\n\ttypes.BlobInfoCache\n}\n\nfunc (bic *v1OnlyBlobInfoCache) Open() {\n}\n\nfunc (bic *v1OnlyBlobInfoCache) Close() {\n}\n\nfunc (bic *v1OnlyBlobInfoCache) UncompressedDigestForTOC(tocDigest digest.Digest) digest.Digest {\n\treturn \"\"\n}\n\nfunc (bic *v1OnlyBlobInfoCache) RecordTOCUncompressedPair(tocDigest digest.Digest, uncompressed digest.Digest) {\n}\n\nfunc (bic *v1OnlyBlobInfoCache) RecordDigestCompressorData(anyDigest digest.Digest, data DigestCompressorData) {\n}\n\nfunc (bic *v1OnlyBlobInfoCache) CandidateLocations2(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, options CandidateLocations2Options) []BICReplacementCandidate2 {\n\treturn nil\n}\n\n// CandidateLocationsFromV2 converts a slice of BICReplacementCandidate2 to a slice of\n// types.BICReplacementCandidate, dropping compression information.\nfunc CandidateLocationsFromV2(v2candidates []BICReplacementCandidate2) []types.BICReplacementCandidate {\n\tcandidates := make([]types.BICReplacementCandidate, 0, len(v2candidates))\n\tfor _, c := range v2candidates {\n\t\tcandidates = append(candidates, types.BICReplacementCandidate{\n\t\t\tDigest:   c.Digest,\n\t\t\tLocation: c.Location,\n\t\t})\n\t}\n\treturn candidates\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/blobinfocache/types.go",
    "content": "package blobinfocache\n\nimport (\n\tdigest \"github.com/opencontainers/go-digest\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\t// Uncompressed is the value we store in a blob info cache to indicate that we know that\n\t// the blob in the corresponding location is not compressed.\n\tUncompressed = \"uncompressed\"\n\t// UnknownCompression is the value we store in a blob info cache to indicate that we don't\n\t// know if the blob in the corresponding location is compressed (and if so, how) or not.\n\tUnknownCompression = \"unknown\"\n)\n\n// BlobInfoCache2 extends BlobInfoCache by adding the ability to track information about what kind\n// of compression was applied to the blobs it keeps information about.\ntype BlobInfoCache2 interface {\n\ttypes.BlobInfoCache\n\n\t// Open() sets up the cache for future accesses, potentially acquiring costly state. Each Open() must be paired with a Close().\n\t// Note that public callers may call the types.BlobInfoCache operations without Open()/Close().\n\tOpen()\n\t// Close destroys state created by Open().\n\tClose()\n\n\t// UncompressedDigestForTOC returns an uncompressed digest corresponding to anyDigest.\n\t// Returns \"\" if the uncompressed digest is unknown.\n\tUncompressedDigestForTOC(tocDigest digest.Digest) digest.Digest\n\t// RecordTOCUncompressedPair records that the tocDigest corresponds to uncompressed.\n\t// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n\t// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n\t// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\n\tRecordTOCUncompressedPair(tocDigest digest.Digest, uncompressed digest.Digest)\n\n\t// RecordDigestCompressorData records data for the blob with the specified digest.\n\t// WARNING: Only call this with LOCALLY VERIFIED data:\n\t//  - don’t record a compressor for a digest just because some remote author claims so\n\t//    (e.g. because a manifest says so);\n\t//  - don’t record the non-base variant or annotations if we are not _sure_ that the base variant\n\t//    and the blob’s digest match the non-base variant’s annotations (e.g. because we saw them\n\t//    in a manifest)\n\t// otherwise the cache could be poisoned and cause us to make incorrect edits to type\n\t// information in a manifest.\n\tRecordDigestCompressorData(anyDigest digest.Digest, data DigestCompressorData)\n\t// CandidateLocations2 returns a prioritized, limited, number of blobs and their locations (if known)\n\t// that could possibly be reused within the specified (transport scope) (if they still\n\t// exist, which is not guaranteed).\n\tCandidateLocations2(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, options CandidateLocations2Options) []BICReplacementCandidate2\n}\n\n// DigestCompressorData is information known about how a blob is compressed.\n// (This is worded generically, but basically targeted at the zstd / zstd:chunked situation.)\ntype DigestCompressorData struct {\n\tBaseVariantCompressor string // A compressor’s base variant name, or Uncompressed or UnknownCompression.\n\t// The following fields are only valid if the base variant is neither Uncompressed nor UnknownCompression:\n\tSpecificVariantCompressor  string            // A non-base variant compressor (or UnknownCompression if the true format is just the base variant)\n\tSpecificVariantAnnotations map[string]string // Annotations required to benefit from the base variant.\n}\n\n// CandidateLocations2Options are used in CandidateLocations2.\ntype CandidateLocations2Options struct {\n\t// If !CanSubstitute, the returned candidates will match the submitted digest exactly; if\n\t// CanSubstitute, data from previous RecordDigestUncompressedPair calls is used to also look\n\t// up variants of the blob which have the same uncompressed digest.\n\tCanSubstitute           bool\n\tPossibleManifestFormats []string                    // If set, a set of possible manifest formats; at least one should support the reused layer\n\tRequiredCompression     *compressiontypes.Algorithm // If set, only reuse layers with a matching algorithm\n}\n\n// BICReplacementCandidate2 is an item returned by BlobInfoCache2.CandidateLocations2.\ntype BICReplacementCandidate2 struct {\n\tDigest                 digest.Digest\n\tCompressionOperation   types.LayerCompression      // Either types.Decompress for uncompressed, or types.Compress for compressed\n\tCompressionAlgorithm   *compressiontypes.Algorithm // An algorithm when the candidate is compressed, or nil when it is uncompressed\n\tCompressionAnnotations map[string]string           // If necessary, annotations necessary to use CompressionAlgorithm\n\tUnknownLocation        bool                        // is true when `Location` for this blob is not set\n\tLocation               types.BICLocationReference  // not set if UnknownLocation is set to `true`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/digests/digests.go",
    "content": "// Package digests provides an internal representation of users’ digest use preferences.\n//\n// Something like this _might_ be eventually made available as a public API:\n// before doing so, carefully think whether the API should be modified before we commit to it.\n\npackage digests\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\n// Options records users’ preferences for used digest algorithm usage.\n// It is a value type and can be copied using ordinary assignment.\n//\n// It can only be created using one of the provided constructors.\ntype Options struct {\n\tinitialized bool // To prevent uses that don’t call a public constructor; this is necessary to enforce the .Available() promise.\n\n\t// If any of the fields below is set, it is guaranteed to be .Available().\n\n\tmustUse     digest.Algorithm // If not \"\", written digests must use this algorithm.\n\tprefer      digest.Algorithm // If not \"\", use this algorithm whenever possible.\n\tdefaultAlgo digest.Algorithm // If not \"\", use this algorithm if there is no reason to use anything else.\n}\n\n// CanonicalDefault is Options which default to using digest.Canonical if there is no reason to use a different algorithm\n// (e.g. when there is no pre-existing digest).\n//\n// The configuration can be customized using .WithPreferred() or .WithDefault().\nfunc CanonicalDefault() Options {\n\t// This does not set .defaultAlgo so that .WithDefault() can be called (once).\n\treturn Options{\n\t\tinitialized: true,\n\t}\n}\n\n// MustUse constructs Options which always use algo.\nfunc MustUse(algo digest.Algorithm) (Options, error) {\n\t// We don’t provide Options.WithMustUse because there is no other option that makes a difference\n\t// once .mustUse is set.\n\tif !algo.Available() {\n\t\treturn Options{}, fmt.Errorf(\"attempt to use an unavailable digest algorithm %q\", algo.String())\n\t}\n\treturn Options{\n\t\tinitialized: true,\n\t\tmustUse:     algo,\n\t}, nil\n}\n\n// WithPreferred returns a copy of o with a “preferred” algorithm set to algo.\n// The preferred algorithm is used whenever possible (but if there is a strict requirement to use something else, it will be overridden).\nfunc (o Options) WithPreferred(algo digest.Algorithm) (Options, error) {\n\tif err := o.ensureInitialized(); err != nil {\n\t\treturn Options{}, err\n\t}\n\tif o.prefer != \"\" {\n\t\treturn Options{}, errors.New(\"digests.Options already have a 'prefer' algorithm configured\")\n\t}\n\n\tif !algo.Available() {\n\t\treturn Options{}, fmt.Errorf(\"attempt to use an unavailable digest algorithm %q\", algo.String())\n\t}\n\to.prefer = algo\n\treturn o, nil\n}\n\n// WithDefault returns a copy of o with a “default” algorithm set to algo.\n// The default algorithm is used if there is no reason to use anything else (e.g. when there is no pre-existing digest).\nfunc (o Options) WithDefault(algo digest.Algorithm) (Options, error) {\n\tif err := o.ensureInitialized(); err != nil {\n\t\treturn Options{}, err\n\t}\n\tif o.defaultAlgo != \"\" {\n\t\treturn Options{}, errors.New(\"digests.Options already have a 'default' algorithm configured\")\n\t}\n\n\tif !algo.Available() {\n\t\treturn Options{}, fmt.Errorf(\"attempt to use an unavailable digest algorithm %q\", algo.String())\n\t}\n\to.defaultAlgo = algo\n\treturn o, nil\n}\n\n// ensureInitialized returns an error if o is not initialized.\nfunc (o Options) ensureInitialized() error {\n\tif !o.initialized {\n\t\treturn errors.New(\"internal error: use of uninitialized digests.Options\")\n\t}\n\treturn nil\n}\n\n// Situation records the context in which a digest is being chosen.\ntype Situation struct {\n\tPreexisting                 digest.Digest // If not \"\", a pre-existing digest value (frequently one which is cheaper to use than others)\n\tCannotChangeAlgorithmReason string        // The reason why we must use Preexisting, or \"\" if we can use other algorithms.\n}\n\n// Choose chooses a digest algorithm based on the options and the situation.\nfunc (o Options) Choose(s Situation) (digest.Algorithm, error) {\n\tif err := o.ensureInitialized(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif s.CannotChangeAlgorithmReason != \"\" && s.Preexisting == \"\" {\n\t\treturn \"\", fmt.Errorf(\"internal error: digests.Situation.CannotChangeAlgorithmReason is set but Preexisting is empty\")\n\t}\n\n\tvar choice digest.Algorithm // = what we want to use\n\tswitch {\n\tcase o.mustUse != \"\":\n\t\tchoice = o.mustUse\n\tcase s.CannotChangeAlgorithmReason != \"\":\n\t\tchoice = s.Preexisting.Algorithm()\n\t\tif !choice.Available() {\n\t\t\treturn \"\", fmt.Errorf(\"existing digest uses unimplemented algorithm %s\", choice)\n\t\t}\n\tcase o.prefer != \"\":\n\t\tchoice = o.prefer\n\tcase s.Preexisting != \"\" && s.Preexisting.Algorithm().Available():\n\t\tchoice = s.Preexisting.Algorithm()\n\tcase o.defaultAlgo != \"\":\n\t\tchoice = o.defaultAlgo\n\tdefault:\n\t\tchoice = digest.Canonical // We assume digest.Canonical is always available.\n\t}\n\n\tif s.CannotChangeAlgorithmReason != \"\" && choice != s.Preexisting.Algorithm() {\n\t\treturn \"\", fmt.Errorf(\"requested to always use digest algorithm %s but we cannot replace existing digest algorithm %s: %s\",\n\t\t\tchoice, s.Preexisting.Algorithm(), s.CannotChangeAlgorithmReason)\n\t}\n\n\treturn choice, nil\n}\n\n// MustUseSet returns an algorithm if o is set to always use a specific algorithm, \"\" if it is flexible.\nfunc (o Options) MustUseSet() digest.Algorithm {\n\t// We don’t do .ensureInitialized() because that would require an extra error value just for that.\n\t// This should not be a part of any public API either way.\n\tif o.mustUse != \"\" {\n\t\treturn o.mustUse\n\t}\n\treturn \"\"\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/digest_validation.go",
    "content": "package image\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\nfunc validateBlobAgainstDigest(blob []byte, expectedDigest digest.Digest) error {\n\tif expectedDigest == \"\" {\n\t\treturn fmt.Errorf(\"expected digest is empty\")\n\t}\n\terr := expectedDigest.Validate()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid digest format %q: %w\", expectedDigest, err)\n\t}\n\tdigestAlgorithm := expectedDigest.Algorithm()\n\tif !digestAlgorithm.Available() {\n\t\treturn fmt.Errorf(\"unsupported digest algorithm: %s\", digestAlgorithm)\n\t}\n\tcomputedDigest := digestAlgorithm.FromBytes(blob)\n\tif computedDigest != expectedDigest {\n\t\treturn fmt.Errorf(\"blob digest %s does not match expected %s\", computedDigest, expectedDigest)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/docker_list.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc manifestSchema2FromManifestList(ctx context.Context, sys *types.SystemContext, src types.ImageSource, manblob []byte) (genericManifest, error) {\n\tlist, err := manifest.Schema2ListFromManifest(manblob)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing schema2 manifest list: %w\", err)\n\t}\n\ttargetManifestDigest, err := list.ChooseInstance(sys)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"choosing image instance: %w\", err)\n\t}\n\tmanblob, mt, err := src.GetManifest(ctx, &targetManifestDigest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fetching target platform image selected from manifest list: %w\", err)\n\t}\n\n\tmatches, err := manifest.MatchesDigest(manblob, targetManifestDigest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"computing manifest digest: %w\", err)\n\t}\n\tif !matches {\n\t\treturn nil, fmt.Errorf(\"Image manifest does not match selected manifest digest %s\", targetManifestDigest)\n\t}\n\n\treturn manifestInstanceFromBlob(ctx, sys, src, manblob, mt)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/docker_schema1.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype manifestSchema1 struct {\n\tm *manifest.Schema1\n}\n\nfunc manifestSchema1FromManifest(manifestBlob []byte) (genericManifest, error) {\n\tm, err := manifest.Schema1FromManifest(manifestBlob)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &manifestSchema1{m: m}, nil\n}\n\n// manifestSchema1FromComponents builds a new manifestSchema1 from the supplied data.\nfunc manifestSchema1FromComponents(ref reference.Named, fsLayers []manifest.Schema1FSLayers, history []manifest.Schema1History, architecture string) (genericManifest, error) {\n\tm, err := manifest.Schema1FromComponents(ref, fsLayers, history, architecture)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &manifestSchema1{m: m}, nil\n}\n\nfunc (m *manifestSchema1) serialize() ([]byte, error) {\n\treturn m.m.Serialize()\n}\n\nfunc (m *manifestSchema1) manifestMIMEType() string {\n\treturn manifest.DockerV2Schema1SignedMediaType\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n// Note that the config object may not exist in the underlying storage in the return value of UpdatedImage! Use ConfigBlob() below.\nfunc (m *manifestSchema1) ConfigInfo() types.BlobInfo {\n\treturn m.m.ConfigInfo()\n}\n\n// ConfigBlob returns the blob described by ConfigInfo, iff ConfigInfo().Digest != \"\"; nil otherwise.\n// The result is cached; it is OK to call this however often you need.\nfunc (m *manifestSchema1) ConfigBlob(context.Context) ([]byte, error) {\n\treturn nil, nil\n}\n\n// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about\n// layers in the resulting configuration isn't guaranteed to be returned to due how\n// old image manifests work (docker v2s1 especially).\nfunc (m *manifestSchema1) OCIConfig(ctx context.Context) (*imgspecv1.Image, error) {\n\tv2s2, err := m.convertToManifestSchema2(ctx, &types.ManifestUpdateOptions{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn v2s2.OCIConfig(ctx)\n}\n\n// LayerInfos returns a list of BlobInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *manifestSchema1) LayerInfos() []types.BlobInfo {\n\treturn manifestLayerInfosToBlobInfos(m.m.LayerInfos())\n}\n\n// EmbeddedDockerReferenceConflicts whether a Docker reference embedded in the manifest, if any, conflicts with destination ref.\n// It returns false if the manifest does not embed a Docker reference.\n// (This embedding unfortunately happens for Docker schema1, please do not add support for this in any new formats.)\nfunc (m *manifestSchema1) EmbeddedDockerReferenceConflicts(ref reference.Named) bool {\n\t// This is a bit convoluted: We can’t just have a \"get embedded docker reference\" method\n\t// and have the “does it conflict” logic in the generic copy code, because the manifest does not actually\n\t// embed a full docker/distribution reference, but only the repo name and tag (without the host name).\n\t// So we would have to provide a “return repo without host name, and tag” getter for the generic code,\n\t// which would be very awkward.  Instead, we do the matching here in schema1-specific code, and all the\n\t// generic copy code needs to know about is reference.Named and that a manifest may need updating\n\t// for some destinations.\n\tname := reference.Path(ref)\n\tvar tag string\n\tif tagged, isTagged := ref.(reference.NamedTagged); isTagged {\n\t\ttag = tagged.Tag()\n\t} else {\n\t\ttag = \"\"\n\t}\n\treturn m.m.Name != name || m.m.Tag != tag\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *manifestSchema1) Inspect(context.Context) (*types.ImageInspectInfo, error) {\n\treturn m.m.Inspect(nil)\n}\n\n// UpdatedImageNeedsLayerDiffIDs returns true iff UpdatedImage(options) needs InformationOnly.LayerDiffIDs.\n// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute\n// (most importantly it forces us to download the full layers even if they are already present at the destination).\nfunc (m *manifestSchema1) UpdatedImageNeedsLayerDiffIDs(options types.ManifestUpdateOptions) bool {\n\treturn (options.ManifestMIMEType == manifest.DockerV2Schema2MediaType || options.ManifestMIMEType == imgspecv1.MediaTypeImageManifest)\n}\n\n// UpdatedImage returns a types.Image modified according to options.\n// This does not change the state of the original Image object.\nfunc (m *manifestSchema1) UpdatedImage(ctx context.Context, options types.ManifestUpdateOptions) (types.Image, error) {\n\tcopy := manifestSchema1{m: manifest.Schema1Clone(m.m)}\n\n\t// We have 2 MIME types for schema 1, which are basically equivalent (even the un-\"Signed\" MIME type will be rejected if there isn’t a signature; so,\n\t// handle conversions between them by doing nothing.\n\tif options.ManifestMIMEType != manifest.DockerV2Schema1MediaType && options.ManifestMIMEType != manifest.DockerV2Schema1SignedMediaType {\n\t\tconverted, err := convertManifestIfRequiredWithUpdate(ctx, options, map[string]manifestConvertFn{\n\t\t\timgspecv1.MediaTypeImageManifest:  copy.convertToManifestOCI1,\n\t\t\tmanifest.DockerV2Schema2MediaType: copy.convertToManifestSchema2Generic,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif converted != nil {\n\t\t\treturn converted, nil\n\t\t}\n\t}\n\n\t// No conversion required, update manifest\n\tif options.LayerInfos != nil {\n\t\tif err := copy.m.UpdateLayerInfos(options.LayerInfos); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif options.EmbeddedDockerReference != nil {\n\t\tcopy.m.Name = reference.Path(options.EmbeddedDockerReference)\n\t\tif tagged, isTagged := options.EmbeddedDockerReference.(reference.NamedTagged); isTagged {\n\t\t\tcopy.m.Tag = tagged.Tag()\n\t\t} else {\n\t\t\tcopy.m.Tag = \"\"\n\t\t}\n\t}\n\n\treturn memoryImageFromManifest(&copy), nil\n}\n\n// convertToManifestSchema2Generic returns a genericManifest implementation converted to manifest.DockerV2Schema2MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema1 object.\n//\n// We need this function just because a function returning an implementation of the genericManifest\n// interface is not automatically assignable to a function type returning the genericManifest interface\nfunc (m *manifestSchema1) convertToManifestSchema2Generic(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error) {\n\treturn m.convertToManifestSchema2(ctx, options)\n}\n\n// convertToManifestSchema2 returns a genericManifest implementation converted to manifest.DockerV2Schema2MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema1 object.\n//\n// Based on github.com/docker/docker/distribution/pull_v2.go\nfunc (m *manifestSchema1) convertToManifestSchema2(_ context.Context, options *types.ManifestUpdateOptions) (*manifestSchema2, error) {\n\tuploadedLayerInfos := options.InformationOnly.LayerInfos\n\tlayerDiffIDs := options.InformationOnly.LayerDiffIDs\n\n\tif len(m.m.ExtractedV1Compatibility) == 0 {\n\t\t// What would this even mean?! Anyhow, the rest of the code depends on FSLayers[0] and ExtractedV1Compatibility[0] existing.\n\t\treturn nil, fmt.Errorf(\"Cannot convert an image with 0 history entries to %s\", manifest.DockerV2Schema2MediaType)\n\t}\n\tif len(m.m.ExtractedV1Compatibility) != len(m.m.FSLayers) {\n\t\treturn nil, fmt.Errorf(\"Inconsistent schema 1 manifest: %d history entries, %d fsLayers entries\", len(m.m.ExtractedV1Compatibility), len(m.m.FSLayers))\n\t}\n\tif uploadedLayerInfos != nil && len(uploadedLayerInfos) != len(m.m.FSLayers) {\n\t\treturn nil, fmt.Errorf(\"Internal error: uploaded %d blobs, but schema1 manifest has %d fsLayers\", len(uploadedLayerInfos), len(m.m.FSLayers))\n\t}\n\tif layerDiffIDs != nil && len(layerDiffIDs) != len(m.m.FSLayers) {\n\t\treturn nil, fmt.Errorf(\"Internal error: collected %d DiffID values, but schema1 manifest has %d fsLayers\", len(layerDiffIDs), len(m.m.FSLayers))\n\t}\n\n\tvar convertedLayerUpdates []types.BlobInfo // Only used if options.LayerInfos != nil\n\tif options.LayerInfos != nil {\n\t\tif len(options.LayerInfos) != len(m.m.FSLayers) {\n\t\t\treturn nil, fmt.Errorf(\"Error converting image: layer edits for %d layers vs %d existing layers\",\n\t\t\t\tlen(options.LayerInfos), len(m.m.FSLayers))\n\t\t}\n\t\tconvertedLayerUpdates = []types.BlobInfo{}\n\t}\n\n\t// Build a list of the diffIDs for the non-empty layers.\n\tdiffIDs := []digest.Digest{}\n\tvar layers []manifest.Schema2Descriptor\n\tfor v1Index := len(m.m.ExtractedV1Compatibility) - 1; v1Index >= 0; v1Index-- {\n\t\tv2Index := (len(m.m.ExtractedV1Compatibility) - 1) - v1Index\n\n\t\tif !m.m.ExtractedV1Compatibility[v1Index].ThrowAway {\n\t\t\tvar size int64\n\t\t\tif uploadedLayerInfos != nil {\n\t\t\t\tsize = uploadedLayerInfos[v2Index].Size\n\t\t\t}\n\t\t\tvar d digest.Digest\n\t\t\tif layerDiffIDs != nil {\n\t\t\t\td = layerDiffIDs[v2Index]\n\t\t\t}\n\t\t\tlayers = append(layers, manifest.Schema2Descriptor{\n\t\t\t\tMediaType: manifest.DockerV2Schema2LayerMediaType,\n\t\t\t\tSize:      size,\n\t\t\t\tDigest:    m.m.FSLayers[v1Index].BlobSum,\n\t\t\t})\n\t\t\tif options.LayerInfos != nil {\n\t\t\t\tconvertedLayerUpdates = append(convertedLayerUpdates, options.LayerInfos[v2Index])\n\t\t\t}\n\t\t\tdiffIDs = append(diffIDs, d)\n\t\t}\n\t}\n\tconfigJSON, err := m.m.ToSchema2Config(diffIDs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconfigDescriptor := manifest.Schema2Descriptor{\n\t\tMediaType: manifest.DockerV2Schema2ConfigMediaType,\n\t\tSize:      int64(len(configJSON)),\n\t\tDigest:    digest.FromBytes(configJSON),\n\t}\n\n\tif options.LayerInfos != nil {\n\t\toptions.LayerInfos = convertedLayerUpdates\n\t}\n\treturn manifestSchema2FromComponents(configDescriptor, nil, configJSON, layers), nil\n}\n\n// convertToManifestOCI1 returns a genericManifest implementation converted to imgspecv1.MediaTypeImageManifest.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema1 object.\nfunc (m *manifestSchema1) convertToManifestOCI1(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error) {\n\t// We can't directly convert to OCI, but we can transitively convert via a Docker V2.2 Distribution manifest\n\tm2, err := m.convertToManifestSchema2(ctx, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn m2.convertToManifestOCI1(ctx, options)\n}\n\n// SupportsEncryption returns if encryption is supported for the manifest type\nfunc (m *manifestSchema1) SupportsEncryption(context.Context) bool {\n\treturn false\n}\n\n// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n// (and the code can handle that).\n// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n// algorithms depends not on the current format, but possibly on the target of a conversion (if UpdatedImage converts\n// to a different manifest format).\nfunc (m *manifestSchema1) CanChangeLayerCompression(mimeType string) bool {\n\treturn true // There are no MIME types in the manifest, so we must assume a valid image.\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/docker_schema2.go",
    "content": "package image\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/none\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// GzippedEmptyLayer is a gzip-compressed version of an empty tar file (1024 NULL bytes)\n// This comes from github.com/docker/distribution/manifest/schema1/config_builder.go; there is\n// a non-zero embedded timestamp; we could zero that, but that would just waste storage space\n// in registries, so let’s use the same values.\n//\n// This is publicly visible as c/image/image.GzippedEmptyLayer.\nvar GzippedEmptyLayer = []byte{\n\t31, 139, 8, 0, 0, 9, 110, 136, 0, 255, 98, 24, 5, 163, 96, 20, 140, 88,\n\t0, 8, 0, 0, 255, 255, 46, 175, 181, 239, 0, 4, 0, 0,\n}\n\n// GzippedEmptyLayerDigest is a digest of GzippedEmptyLayer\n//\n// This is publicly visible as c/image/image.GzippedEmptyLayerDigest.\nconst GzippedEmptyLayerDigest = digest.Digest(\"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\")\n\ntype manifestSchema2 struct {\n\tsrc        types.ImageSource // May be nil if configBlob is not nil\n\tconfigBlob []byte            // If set, corresponds to contents of ConfigDescriptor.\n\tm          *manifest.Schema2\n}\n\nfunc manifestSchema2FromManifest(src types.ImageSource, manifestBlob []byte) (genericManifest, error) {\n\tm, err := manifest.Schema2FromManifest(manifestBlob)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &manifestSchema2{\n\t\tsrc: src,\n\t\tm:   m,\n\t}, nil\n}\n\n// manifestSchema2FromComponents builds a new manifestSchema2 from the supplied data:\nfunc manifestSchema2FromComponents(config manifest.Schema2Descriptor, src types.ImageSource, configBlob []byte, layers []manifest.Schema2Descriptor) *manifestSchema2 {\n\treturn &manifestSchema2{\n\t\tsrc:        src,\n\t\tconfigBlob: configBlob,\n\t\tm:          manifest.Schema2FromComponents(config, layers),\n\t}\n}\n\nfunc (m *manifestSchema2) serialize() ([]byte, error) {\n\treturn m.m.Serialize()\n}\n\nfunc (m *manifestSchema2) manifestMIMEType() string {\n\treturn m.m.MediaType\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n// Note that the config object may not exist in the underlying storage in the return value of UpdatedImage! Use ConfigBlob() below.\nfunc (m *manifestSchema2) ConfigInfo() types.BlobInfo {\n\treturn m.m.ConfigInfo()\n}\n\n// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about\n// layers in the resulting configuration isn't guaranteed to be returned to due how\n// old image manifests work (docker v2s1 especially).\nfunc (m *manifestSchema2) OCIConfig(ctx context.Context) (*imgspecv1.Image, error) {\n\tconfigBlob, err := m.ConfigBlob(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// docker v2s2 and OCI v1 are mostly compatible but v2s2 contains more fields\n\t// than OCI v1. This unmarshal makes sure we drop docker v2s2\n\t// fields that aren't needed in OCI v1.\n\tconfigOCI := &imgspecv1.Image{}\n\tif err := json.Unmarshal(configBlob, configOCI); err != nil {\n\t\treturn nil, err\n\t}\n\treturn configOCI, nil\n}\n\n// ConfigBlob returns the blob described by ConfigInfo, iff ConfigInfo().Digest != \"\"; nil otherwise.\n// The result is cached; it is OK to call this however often you need.\nfunc (m *manifestSchema2) ConfigBlob(ctx context.Context) ([]byte, error) {\n\tif m.configBlob == nil {\n\t\tif m.src == nil {\n\t\t\treturn nil, fmt.Errorf(\"Internal error: neither src nor configBlob set in manifestSchema2\")\n\t\t}\n\t\tstream, _, err := m.src.GetBlob(ctx, manifest.BlobInfoFromSchema2Descriptor(m.m.ConfigDescriptor), none.NoCache)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer stream.Close()\n\t\tblob, err := iolimits.ReadAtMost(stream, iolimits.MaxConfigBodySize)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := validateBlobAgainstDigest(blob, m.m.ConfigDescriptor.Digest); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"config validation failed: %w\", err)\n\t\t}\n\t\tm.configBlob = blob\n\t}\n\treturn m.configBlob, nil\n}\n\n// LayerInfos returns a list of BlobInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *manifestSchema2) LayerInfos() []types.BlobInfo {\n\treturn manifestLayerInfosToBlobInfos(m.m.LayerInfos())\n}\n\n// EmbeddedDockerReferenceConflicts whether a Docker reference embedded in the manifest, if any, conflicts with destination ref.\n// It returns false if the manifest does not embed a Docker reference.\n// (This embedding unfortunately happens for Docker schema1, please do not add support for this in any new formats.)\nfunc (m *manifestSchema2) EmbeddedDockerReferenceConflicts(ref reference.Named) bool {\n\treturn false\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *manifestSchema2) Inspect(ctx context.Context) (*types.ImageInspectInfo, error) {\n\tgetter := func(info types.BlobInfo) ([]byte, error) {\n\t\tif info.Digest != m.ConfigInfo().Digest {\n\t\t\t// Shouldn't ever happen\n\t\t\treturn nil, errors.New(\"asked for a different config blob\")\n\t\t}\n\t\tconfig, err := m.ConfigBlob(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn config, nil\n\t}\n\treturn m.m.Inspect(getter)\n}\n\n// UpdatedImageNeedsLayerDiffIDs returns true iff UpdatedImage(options) needs InformationOnly.LayerDiffIDs.\n// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute\n// (most importantly it forces us to download the full layers even if they are already present at the destination).\nfunc (m *manifestSchema2) UpdatedImageNeedsLayerDiffIDs(options types.ManifestUpdateOptions) bool {\n\treturn false\n}\n\n// UpdatedImage returns a types.Image modified according to options.\n// This does not change the state of the original Image object.\n// The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError\n// if the CompressionOperation and CompressionAlgorithm specified in one or more\n// options.LayerInfos items is anything other than gzip.\nfunc (m *manifestSchema2) UpdatedImage(ctx context.Context, options types.ManifestUpdateOptions) (types.Image, error) {\n\tcopy := manifestSchema2{ // NOTE: This is not a deep copy, it still shares slices etc.\n\t\tsrc:        m.src,\n\t\tconfigBlob: m.configBlob,\n\t\tm:          manifest.Schema2Clone(m.m),\n\t}\n\n\tconverted, err := convertManifestIfRequiredWithUpdate(ctx, options, map[string]manifestConvertFn{\n\t\tmanifest.DockerV2Schema1MediaType:       copy.convertToManifestSchema1,\n\t\tmanifest.DockerV2Schema1SignedMediaType: copy.convertToManifestSchema1,\n\t\timgspecv1.MediaTypeImageManifest:        copy.convertToManifestOCI1,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif converted != nil {\n\t\treturn converted, nil\n\t}\n\n\t// No conversion required, update manifest\n\tif options.LayerInfos != nil {\n\t\tif err := copy.m.UpdateLayerInfos(options.LayerInfos); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// Ignore options.EmbeddedDockerReference: it may be set when converting from schema1 to schema2, but we really don't care.\n\n\treturn memoryImageFromManifest(&copy), nil\n}\n\nfunc oci1DescriptorFromSchema2Descriptor(d manifest.Schema2Descriptor) imgspecv1.Descriptor {\n\treturn imgspecv1.Descriptor{\n\t\tMediaType: d.MediaType,\n\t\tSize:      d.Size,\n\t\tDigest:    d.Digest,\n\t\tURLs:      d.URLs,\n\t}\n}\n\n// convertToManifestOCI1 returns a genericManifest implementation converted to imgspecv1.MediaTypeImageManifest.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema2 object.\nfunc (m *manifestSchema2) convertToManifestOCI1(ctx context.Context, _ *types.ManifestUpdateOptions) (genericManifest, error) {\n\tconfigOCI, err := m.OCIConfig(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconfigOCIBytes, err := json.Marshal(configOCI)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfig := imgspecv1.Descriptor{\n\t\tMediaType: imgspecv1.MediaTypeImageConfig,\n\t\tSize:      int64(len(configOCIBytes)),\n\t\tDigest:    digest.FromBytes(configOCIBytes),\n\t}\n\n\tlayers := make([]imgspecv1.Descriptor, len(m.m.LayersDescriptors))\n\tfor idx := range layers {\n\t\tlayers[idx] = oci1DescriptorFromSchema2Descriptor(m.m.LayersDescriptors[idx])\n\t\tswitch m.m.LayersDescriptors[idx].MediaType {\n\t\tcase manifest.DockerV2Schema2ForeignLayerMediaType:\n\t\t\tlayers[idx].MediaType = imgspecv1.MediaTypeImageLayerNonDistributable //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\tcase manifest.DockerV2Schema2ForeignLayerMediaTypeGzip:\n\t\t\tlayers[idx].MediaType = imgspecv1.MediaTypeImageLayerNonDistributableGzip //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\tcase manifest.DockerV2SchemaLayerMediaTypeUncompressed:\n\t\t\tlayers[idx].MediaType = imgspecv1.MediaTypeImageLayer\n\t\tcase manifest.DockerV2Schema2LayerMediaType:\n\t\t\tlayers[idx].MediaType = imgspecv1.MediaTypeImageLayerGzip\n\t\tcase manifest.DockerV2SchemaLayerMediaTypeZstd:\n\t\t\tlayers[idx].MediaType = imgspecv1.MediaTypeImageLayerZstd\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"Unknown media type during manifest conversion: %q\", m.m.LayersDescriptors[idx].MediaType)\n\t\t}\n\t}\n\n\treturn manifestOCI1FromComponents(config, m.src, configOCIBytes, layers), nil\n}\n\n// convertToManifestSchema1 returns a genericManifest implementation converted to manifest.DockerV2Schema1{Signed,}MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema2 object.\n//\n// Based on docker/distribution/manifest/schema1/config_builder.go\nfunc (m *manifestSchema2) convertToManifestSchema1(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error) {\n\tdest := options.InformationOnly.Destination\n\n\tvar convertedLayerUpdates []types.BlobInfo // Only used if options.LayerInfos != nil\n\tif options.LayerInfos != nil {\n\t\tif len(options.LayerInfos) != len(m.m.LayersDescriptors) {\n\t\t\treturn nil, fmt.Errorf(\"Error converting image: layer edits for %d layers vs %d existing layers\",\n\t\t\t\tlen(options.LayerInfos), len(m.m.LayersDescriptors))\n\t\t}\n\t\tconvertedLayerUpdates = []types.BlobInfo{}\n\t}\n\n\tconfigBytes, err := m.ConfigBlob(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\timageConfig := &manifest.Schema2Image{}\n\tif err := json.Unmarshal(configBytes, imageConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Build fsLayers and History, discarding all configs. We will patch the top-level config in later.\n\tfsLayers := make([]manifest.Schema1FSLayers, len(imageConfig.History))\n\thistory := make([]manifest.Schema1History, len(imageConfig.History))\n\tnonemptyLayerIndex := 0\n\tvar parentV1ID string // Set in the loop\n\tv1ID := \"\"\n\thaveGzippedEmptyLayer := false\n\tif len(imageConfig.History) == 0 {\n\t\t// What would this even mean?! Anyhow, the rest of the code depends on fsLayers[0] and history[0] existing.\n\t\treturn nil, fmt.Errorf(\"Cannot convert an image with 0 history entries to %s\", manifest.DockerV2Schema1SignedMediaType)\n\t}\n\tfor v2Index, historyEntry := range imageConfig.History {\n\t\tparentV1ID = v1ID\n\t\tv1Index := len(imageConfig.History) - 1 - v2Index\n\n\t\tvar blobDigest digest.Digest\n\t\tif historyEntry.EmptyLayer {\n\t\t\temptyLayerBlobInfo := types.BlobInfo{Digest: GzippedEmptyLayerDigest, Size: int64(len(GzippedEmptyLayer))}\n\n\t\t\tif !haveGzippedEmptyLayer {\n\t\t\t\tlogrus.Debugf(\"Uploading empty layer during conversion to schema 1\")\n\t\t\t\t// Ideally we should update the relevant BlobInfoCache about this layer, but that would require passing it down here,\n\t\t\t\t// and anyway this blob is so small that it’s easier to just copy it than to worry about figuring out another location where to get it.\n\t\t\t\tinfo, err := dest.PutBlob(ctx, bytes.NewReader(GzippedEmptyLayer), emptyLayerBlobInfo, none.NoCache, false)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"uploading empty layer: %w\", err)\n\t\t\t\t}\n\t\t\t\tif info.Digest != emptyLayerBlobInfo.Digest {\n\t\t\t\t\treturn nil, fmt.Errorf(\"Internal error: Uploaded empty layer has digest %#v instead of %s\", info.Digest, emptyLayerBlobInfo.Digest)\n\t\t\t\t}\n\t\t\t\thaveGzippedEmptyLayer = true\n\t\t\t}\n\t\t\tif options.LayerInfos != nil {\n\t\t\t\tconvertedLayerUpdates = append(convertedLayerUpdates, emptyLayerBlobInfo)\n\t\t\t}\n\t\t\tblobDigest = emptyLayerBlobInfo.Digest\n\t\t} else {\n\t\t\tif nonemptyLayerIndex >= len(m.m.LayersDescriptors) {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid image configuration, needs more than the %d distributed layers\", len(m.m.LayersDescriptors))\n\t\t\t}\n\t\t\tif options.LayerInfos != nil {\n\t\t\t\tconvertedLayerUpdates = append(convertedLayerUpdates, options.LayerInfos[nonemptyLayerIndex])\n\t\t\t}\n\t\t\tblobDigest = m.m.LayersDescriptors[nonemptyLayerIndex].Digest\n\t\t\tnonemptyLayerIndex++\n\t\t}\n\n\t\t// AFAICT pull ignores these ID values, at least nowadays, so we could use anything unique, including a simple counter. Use what Docker uses for cargo-cult consistency.\n\t\tv, err := v1IDFromBlobDigestAndComponents(blobDigest, parentV1ID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tv1ID = v\n\n\t\tfakeImage := manifest.Schema1V1Compatibility{\n\t\t\tID:        v1ID,\n\t\t\tParent:    parentV1ID,\n\t\t\tComment:   historyEntry.Comment,\n\t\t\tCreated:   historyEntry.Created,\n\t\t\tAuthor:    historyEntry.Author,\n\t\t\tThrowAway: historyEntry.EmptyLayer,\n\t\t}\n\t\tfakeImage.ContainerConfig.Cmd = []string{historyEntry.CreatedBy}\n\t\tv1CompatibilityBytes, err := json.Marshal(&fakeImage)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Internal error: Error creating v1compatibility for %#v\", fakeImage)\n\t\t}\n\n\t\tfsLayers[v1Index] = manifest.Schema1FSLayers{BlobSum: blobDigest}\n\t\thistory[v1Index] = manifest.Schema1History{V1Compatibility: string(v1CompatibilityBytes)}\n\t\t// Note that parentV1ID of the top layer is preserved when exiting this loop\n\t}\n\n\t// Now patch in real configuration for the top layer (v1Index == 0)\n\tv1ID, err = v1IDFromBlobDigestAndComponents(fsLayers[0].BlobSum, parentV1ID, string(configBytes)) // See above WRT v1ID value generation and cargo-cult consistency.\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv1Config, err := v1ConfigFromConfigJSON(configBytes, v1ID, parentV1ID, imageConfig.History[len(imageConfig.History)-1].EmptyLayer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thistory[0].V1Compatibility = string(v1Config)\n\n\tif options.LayerInfos != nil {\n\t\toptions.LayerInfos = convertedLayerUpdates\n\t}\n\tm1, err := manifestSchema1FromComponents(dest.Reference().DockerReference(), fsLayers, history, imageConfig.Architecture)\n\tif err != nil {\n\t\treturn nil, err // This should never happen, we should have created all the components correctly.\n\t}\n\treturn m1, nil\n}\n\nfunc v1IDFromBlobDigestAndComponents(blobDigest digest.Digest, others ...string) (string, error) {\n\tif err := blobDigest.Validate(); err != nil {\n\t\treturn \"\", err\n\t}\n\tparts := append([]string{blobDigest.Encoded()}, others...)\n\tv1IDHash := sha256.Sum256([]byte(strings.Join(parts, \" \")))\n\treturn hex.EncodeToString(v1IDHash[:]), nil\n}\n\nfunc v1ConfigFromConfigJSON(configJSON []byte, v1ID, parentV1ID string, throwaway bool) ([]byte, error) {\n\t// Preserve everything we don't specifically know about.\n\t// (This must be a *json.RawMessage, even though *[]byte is fairly redundant, because only *RawMessage implements json.Marshaler.)\n\trawContents := map[string]*json.RawMessage{}\n\tif err := json.Unmarshal(configJSON, &rawContents); err != nil { // We have already unmarshaled it before, using a more detailed schema?!\n\t\treturn nil, err\n\t}\n\tdelete(rawContents, \"rootfs\")\n\tdelete(rawContents, \"history\")\n\n\tupdates := map[string]any{\"id\": v1ID}\n\tif parentV1ID != \"\" {\n\t\tupdates[\"parent\"] = parentV1ID\n\t}\n\tif throwaway {\n\t\tupdates[\"throwaway\"] = throwaway\n\t}\n\tfor field, value := range updates {\n\t\tencoded, err := json.Marshal(value)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trawContents[field] = (*json.RawMessage)(&encoded)\n\t}\n\treturn json.Marshal(rawContents)\n}\n\n// SupportsEncryption returns if encryption is supported for the manifest type\nfunc (m *manifestSchema2) SupportsEncryption(context.Context) bool {\n\treturn false\n}\n\n// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n// (and the code can handle that).\n// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n// algorithms depends not on the current format, but possibly on the target of a conversion (if UpdatedImage converts\n// to a different manifest format).\nfunc (m *manifestSchema2) CanChangeLayerCompression(mimeType string) bool {\n\treturn m.m.CanChangeLayerCompression(mimeType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/manifest.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// genericManifest is an interface for parsing, modifying image manifests and related data.\n// The public methods are related to types.Image so that embedding a genericManifest implements most of it,\n// but there are also public methods that are only visible by packages that can import c/image/internal/image.\ntype genericManifest interface {\n\tserialize() ([]byte, error)\n\tmanifestMIMEType() string\n\t// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n\t// Note that the config object may not exist in the underlying storage in the return value of UpdatedImage! Use ConfigBlob() below.\n\tConfigInfo() types.BlobInfo\n\t// ConfigBlob returns the blob described by ConfigInfo, iff ConfigInfo().Digest != \"\"; nil otherwise.\n\t// The result is cached; it is OK to call this however often you need.\n\tConfigBlob(context.Context) ([]byte, error)\n\t// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about\n\t// layers in the resulting configuration isn't guaranteed to be returned to due how\n\t// old image manifests work (docker v2s1 especially).\n\tOCIConfig(context.Context) (*imgspecv1.Image, error)\n\t// LayerInfos returns a list of BlobInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n\t// The Digest field is guaranteed to be provided; Size may be -1.\n\t// WARNING: The list may contain duplicates, and they are semantically relevant.\n\tLayerInfos() []types.BlobInfo\n\t// EmbeddedDockerReferenceConflicts whether a Docker reference embedded in the manifest, if any, conflicts with destination ref.\n\t// It returns false if the manifest does not embed a Docker reference.\n\t// (This embedding unfortunately happens for Docker schema1, please do not add support for this in any new formats.)\n\tEmbeddedDockerReferenceConflicts(ref reference.Named) bool\n\t// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\n\tInspect(context.Context) (*types.ImageInspectInfo, error)\n\t// UpdatedImageNeedsLayerDiffIDs returns true iff UpdatedImage(options) needs InformationOnly.LayerDiffIDs.\n\t// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute\n\t// (most importantly it forces us to download the full layers even if they are already present at the destination).\n\tUpdatedImageNeedsLayerDiffIDs(options types.ManifestUpdateOptions) bool\n\t// UpdatedImage returns a types.Image modified according to options.\n\t// This does not change the state of the original Image object.\n\tUpdatedImage(ctx context.Context, options types.ManifestUpdateOptions) (types.Image, error)\n\t// SupportsEncryption returns if encryption is supported for the manifest type\n\t//\n\t// Deprecated: Initially used to determine if a manifest can be copied from a source manifest type since\n\t// the process of updating a manifest between different manifest types was to update then convert.\n\t// This resulted in some fields in the update being lost. This has been fixed by: https://github.com/containers/image/pull/836\n\tSupportsEncryption(ctx context.Context) bool\n\n\t// The following methods are not a part of types.Image:\n\t// ===\n\n\t// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n\t// (and the code can handle that).\n\t// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n\t// algorithms depends not on the current format, but possibly on the target of a conversion (if UpdatedImage converts\n\t// to a different manifest format).\n\tCanChangeLayerCompression(mimeType string) bool\n}\n\n// manifestInstanceFromBlob returns a genericManifest implementation for (manblob, mt) in src.\n// If manblob is a manifest list, it implicitly chooses an appropriate image from the list.\nfunc manifestInstanceFromBlob(ctx context.Context, sys *types.SystemContext, src types.ImageSource, manblob []byte, mt string) (genericManifest, error) {\n\tswitch manifest.NormalizedMIMEType(mt) {\n\tcase manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType:\n\t\treturn manifestSchema1FromManifest(manblob)\n\tcase imgspecv1.MediaTypeImageManifest:\n\t\treturn manifestOCI1FromManifest(src, manblob)\n\tcase manifest.DockerV2Schema2MediaType:\n\t\treturn manifestSchema2FromManifest(src, manblob)\n\tcase manifest.DockerV2ListMediaType:\n\t\treturn manifestSchema2FromManifestList(ctx, sys, src, manblob)\n\tcase imgspecv1.MediaTypeImageIndex:\n\t\treturn manifestOCI1FromImageIndex(ctx, sys, src, manblob)\n\tdefault: // Note that this may not be reachable, manifest.NormalizedMIMEType has a default for unknown values.\n\t\treturn nil, fmt.Errorf(\"Unimplemented manifest MIME type %q\", mt)\n\t}\n}\n\n// manifestLayerInfosToBlobInfos extracts a []types.BlobInfo from a []manifest.LayerInfo.\nfunc manifestLayerInfosToBlobInfos(layers []manifest.LayerInfo) []types.BlobInfo {\n\tblobs := make([]types.BlobInfo, len(layers))\n\tfor i, layer := range layers {\n\t\tblobs[i] = layer.BlobInfo\n\t}\n\treturn blobs\n}\n\n// manifestConvertFn (a method of genericManifest object) returns a genericManifest implementation\n// converted to a specific manifest MIME type.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original genericManifest object.\ntype manifestConvertFn func(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error)\n\n// convertManifestIfRequiredWithUpdate will run conversion functions of a manifest if\n// required and re-apply the options to the converted type.\n// It returns (nil, nil) if no conversion was requested.\nfunc convertManifestIfRequiredWithUpdate(ctx context.Context, options types.ManifestUpdateOptions, converters map[string]manifestConvertFn) (types.Image, error) {\n\tif options.ManifestMIMEType == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tconverter, ok := converters[options.ManifestMIMEType]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"Unsupported conversion type: %v\", options.ManifestMIMEType)\n\t}\n\n\toptionsCopy := options\n\tconvertedManifest, err := converter(ctx, &optionsCopy)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconvertedImage := memoryImageFromManifest(convertedManifest)\n\n\toptionsCopy.ManifestMIMEType = \"\"\n\treturn convertedImage.UpdatedImage(ctx, optionsCopy)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/memory.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"go.podman.io/image/v5/types\"\n)\n\n// memoryImage is a mostly-implementation of types.Image assembled from data\n// created in memory, used primarily as a return value of types.Image.UpdatedImage\n// as a way to carry various structured information in a type-safe and easy-to-use way.\n// Note that this _only_ carries the immediate metadata; it is _not_ a stand-alone\n// collection of all related information, e.g. there is no way to get layer blobs\n// from a memoryImage.\ntype memoryImage struct {\n\tgenericManifest\n\tserializedManifest []byte // A private cache for Manifest()\n}\n\nfunc memoryImageFromManifest(m genericManifest) types.Image {\n\treturn &memoryImage{\n\t\tgenericManifest:    m,\n\t\tserializedManifest: nil,\n\t}\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (i *memoryImage) Reference() types.ImageReference {\n\t// It would really be inappropriate to return the ImageReference of the image this was based on.\n\treturn nil\n}\n\n// Size returns the size of the image as stored, if known, or -1 if not.\nfunc (i *memoryImage) Size() (int64, error) {\n\treturn -1, nil\n}\n\n// Manifest is like ImageSource.GetManifest, but the result is cached; it is OK to call this however often you need.\nfunc (i *memoryImage) Manifest(ctx context.Context) ([]byte, string, error) {\n\tif i.serializedManifest == nil {\n\t\tm, err := i.genericManifest.serialize()\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\ti.serializedManifest = m\n\t}\n\treturn i.serializedManifest, i.genericManifest.manifestMIMEType(), nil\n}\n\n// Signatures is like ImageSource.GetSignatures, but the result is cached; it is OK to call this however often you need.\nfunc (i *memoryImage) Signatures(ctx context.Context) ([][]byte, error) {\n\t// Modifying an image invalidates signatures; a caller asking the updated image for signatures\n\t// is probably confused.\n\treturn nil, errors.New(\"Internal error: Image.Signatures() is not supported for images modified in memory\")\n}\n\n// LayerInfosForCopy returns an updated set of layer blob information which may not match the manifest.\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (i *memoryImage) LayerInfosForCopy(ctx context.Context) ([]types.BlobInfo, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/oci.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\n\tociencspec \"github.com/containers/ocicrypt/spec\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\tinternalManifest \"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/none\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype manifestOCI1 struct {\n\tsrc        types.ImageSource // May be nil if configBlob is not nil\n\tconfigBlob []byte            // If set, corresponds to contents of m.Config.\n\tm          *manifest.OCI1\n}\n\nfunc manifestOCI1FromManifest(src types.ImageSource, manifestBlob []byte) (genericManifest, error) {\n\tm, err := manifest.OCI1FromManifest(manifestBlob)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &manifestOCI1{\n\t\tsrc: src,\n\t\tm:   m,\n\t}, nil\n}\n\n// manifestOCI1FromComponents builds a new manifestOCI1 from the supplied data:\nfunc manifestOCI1FromComponents(config imgspecv1.Descriptor, src types.ImageSource, configBlob []byte, layers []imgspecv1.Descriptor) genericManifest {\n\treturn &manifestOCI1{\n\t\tsrc:        src,\n\t\tconfigBlob: configBlob,\n\t\tm:          manifest.OCI1FromComponents(config, layers),\n\t}\n}\n\nfunc (m *manifestOCI1) serialize() ([]byte, error) {\n\treturn m.m.Serialize()\n}\n\nfunc (m *manifestOCI1) manifestMIMEType() string {\n\treturn imgspecv1.MediaTypeImageManifest\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n// Note that the config object may not exist in the underlying storage in the return value of UpdatedImage! Use ConfigBlob() below.\nfunc (m *manifestOCI1) ConfigInfo() types.BlobInfo {\n\treturn m.m.ConfigInfo()\n}\n\n// ConfigBlob returns the blob described by ConfigInfo, iff ConfigInfo().Digest != \"\"; nil otherwise.\n// The result is cached; it is OK to call this however often you need.\nfunc (m *manifestOCI1) ConfigBlob(ctx context.Context) ([]byte, error) {\n\tif m.configBlob == nil {\n\t\tif m.src == nil {\n\t\t\treturn nil, errors.New(\"Internal error: neither src nor configBlob set in manifestOCI1\")\n\t\t}\n\t\tstream, _, err := m.src.GetBlob(ctx, manifest.BlobInfoFromOCI1Descriptor(m.m.Config), none.NoCache)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer stream.Close()\n\t\tblob, err := iolimits.ReadAtMost(stream, iolimits.MaxConfigBodySize)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := validateBlobAgainstDigest(blob, m.m.Config.Digest); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"config validation failed: %w\", err)\n\t\t}\n\t\tm.configBlob = blob\n\t}\n\treturn m.configBlob, nil\n}\n\n// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about\n// layers in the resulting configuration isn't guaranteed to be returned to due how\n// old image manifests work (docker v2s1 especially).\nfunc (m *manifestOCI1) OCIConfig(ctx context.Context) (*imgspecv1.Image, error) {\n\tif m.m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\treturn nil, internalManifest.NewNonImageArtifactError(&m.m.Manifest)\n\t}\n\n\tcb, err := m.ConfigBlob(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconfigOCI := &imgspecv1.Image{}\n\tif err := json.Unmarshal(cb, configOCI); err != nil {\n\t\treturn nil, err\n\t}\n\treturn configOCI, nil\n}\n\n// LayerInfos returns a list of BlobInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *manifestOCI1) LayerInfos() []types.BlobInfo {\n\treturn manifestLayerInfosToBlobInfos(m.m.LayerInfos())\n}\n\n// EmbeddedDockerReferenceConflicts whether a Docker reference embedded in the manifest, if any, conflicts with destination ref.\n// It returns false if the manifest does not embed a Docker reference.\n// (This embedding unfortunately happens for Docker schema1, please do not add support for this in any new formats.)\nfunc (m *manifestOCI1) EmbeddedDockerReferenceConflicts(ref reference.Named) bool {\n\treturn false\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *manifestOCI1) Inspect(ctx context.Context) (*types.ImageInspectInfo, error) {\n\tgetter := func(info types.BlobInfo) ([]byte, error) {\n\t\tif info.Digest != m.ConfigInfo().Digest {\n\t\t\t// Shouldn't ever happen\n\t\t\treturn nil, errors.New(\"asked for a different config blob\")\n\t\t}\n\t\tconfig, err := m.ConfigBlob(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn config, nil\n\t}\n\treturn m.m.Inspect(getter)\n}\n\n// UpdatedImageNeedsLayerDiffIDs returns true iff UpdatedImage(options) needs InformationOnly.LayerDiffIDs.\n// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute\n// (most importantly it forces us to download the full layers even if they are already present at the destination).\nfunc (m *manifestOCI1) UpdatedImageNeedsLayerDiffIDs(options types.ManifestUpdateOptions) bool {\n\treturn false\n}\n\n// UpdatedImage returns a types.Image modified according to options.\n// This does not change the state of the original Image object.\n// The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError\n// if the combination of CompressionOperation and CompressionAlgorithm specified\n// in one or more options.LayerInfos items indicates that a layer is compressed using\n// an algorithm that is not allowed in OCI.\nfunc (m *manifestOCI1) UpdatedImage(ctx context.Context, options types.ManifestUpdateOptions) (types.Image, error) {\n\tcopy := manifestOCI1{ // NOTE: This is not a deep copy, it still shares slices etc.\n\t\tsrc:        m.src,\n\t\tconfigBlob: m.configBlob,\n\t\tm:          manifest.OCI1Clone(m.m),\n\t}\n\n\tconverted, err := convertManifestIfRequiredWithUpdate(ctx, options, map[string]manifestConvertFn{\n\t\tmanifest.DockerV2Schema2MediaType:       copy.convertToManifestSchema2Generic,\n\t\tmanifest.DockerV2Schema1MediaType:       copy.convertToManifestSchema1,\n\t\tmanifest.DockerV2Schema1SignedMediaType: copy.convertToManifestSchema1,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif converted != nil {\n\t\treturn converted, nil\n\t}\n\n\t// No conversion required, update manifest\n\tif options.LayerInfos != nil {\n\t\tif err := copy.m.UpdateLayerInfos(options.LayerInfos); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// Ignore options.EmbeddedDockerReference: it may be set when converting from schema1, but we really don't care.\n\n\treturn memoryImageFromManifest(&copy), nil\n}\n\nfunc schema2DescriptorFromOCI1Descriptor(d imgspecv1.Descriptor) manifest.Schema2Descriptor {\n\treturn manifest.Schema2Descriptor{\n\t\tMediaType: d.MediaType,\n\t\tSize:      d.Size,\n\t\tDigest:    d.Digest,\n\t\tURLs:      d.URLs,\n\t}\n}\n\n// convertToManifestSchema2Generic returns a genericManifest implementation converted to manifest.DockerV2Schema2MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestSchema1 object.\n//\n// We need this function just because a function returning an implementation of the genericManifest\n// interface is not automatically assignable to a function type returning the genericManifest interface\nfunc (m *manifestOCI1) convertToManifestSchema2Generic(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error) {\n\treturn m.convertToManifestSchema2(ctx, options)\n}\n\n// layerEditsOfOCIOnlyFeatures checks if options requires some layer edits to be done before converting to a Docker format.\n// If not, it returns (nil, nil).\n// If decryption is required, it returns a set of edits to provide to OCI1.UpdateLayerInfos,\n// and edits *options to not try decryption again.\nfunc (m *manifestOCI1) layerEditsOfOCIOnlyFeatures(options *types.ManifestUpdateOptions) ([]types.BlobInfo, error) {\n\tif options == nil || options.LayerInfos == nil {\n\t\treturn nil, nil\n\t}\n\n\toriginalInfos := m.LayerInfos()\n\tif len(originalInfos) != len(options.LayerInfos) {\n\t\treturn nil, fmt.Errorf(\"preparing to decrypt before conversion: %d layers vs. %d layer edits\", len(originalInfos), len(options.LayerInfos))\n\t}\n\n\tociOnlyEdits := slices.Clone(originalInfos) // Start with a full copy so that we don't forget to copy anything: use the current data in full unless we intentionally deviate.\n\tlaterEdits := slices.Clone(options.LayerInfos)\n\tneedsOCIOnlyEdits := false\n\tfor i, edit := range options.LayerInfos {\n\t\t// Unless determined otherwise, don't do any compression-related MIME type conversions. m.LayerInfos() should not set these edit instructions, but be explicit.\n\t\tociOnlyEdits[i].CompressionOperation = types.PreserveOriginal\n\t\tociOnlyEdits[i].CompressionAlgorithm = nil\n\n\t\tif edit.CryptoOperation == types.Decrypt {\n\t\t\tneedsOCIOnlyEdits = true // Encrypted types must be removed before conversion because they can’t be represented in Docker schemas\n\t\t\tociOnlyEdits[i].CryptoOperation = types.Decrypt\n\t\t\tlaterEdits[i].CryptoOperation = types.PreserveOriginalCrypto // Don't try to decrypt in a schema[12] manifest later, that would fail.\n\t\t}\n\n\t\tif originalInfos[i].MediaType == imgspecv1.MediaTypeImageLayerZstd ||\n\t\t\toriginalInfos[i].MediaType == imgspecv1.MediaTypeImageLayerNonDistributableZstd { //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\t\tneedsOCIOnlyEdits = true // Zstd MIME types must be removed before conversion because they can’t be represented in Docker schemas.\n\t\t\tociOnlyEdits[i].CompressionOperation = edit.CompressionOperation\n\t\t\tociOnlyEdits[i].CompressionAlgorithm = edit.CompressionAlgorithm\n\t\t\tlaterEdits[i].CompressionOperation = types.PreserveOriginal\n\t\t\tlaterEdits[i].CompressionAlgorithm = nil\n\t\t}\n\t}\n\tif !needsOCIOnlyEdits {\n\t\treturn nil, nil\n\t}\n\n\toptions.LayerInfos = laterEdits\n\treturn ociOnlyEdits, nil\n}\n\n// convertToManifestSchema2 returns a genericManifest implementation converted to manifest.DockerV2Schema2MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestOCI1 object.\nfunc (m *manifestOCI1) convertToManifestSchema2(_ context.Context, options *types.ManifestUpdateOptions) (*manifestSchema2, error) {\n\tif m.m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\treturn nil, internalManifest.NewNonImageArtifactError(&m.m.Manifest)\n\t}\n\n\t// Mostly we first make a format conversion, and _afterwards_ do layer edits. But first we need to do the layer edits\n\t// which remove OCI-specific features, because trying to convert those layers would fail.\n\t// So, do the layer updates for decryption, and for conversions from Zstd.\n\tociManifest := m.m\n\tociOnlyEdits, err := m.layerEditsOfOCIOnlyFeatures(options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif ociOnlyEdits != nil {\n\t\tociManifest = manifest.OCI1Clone(ociManifest)\n\t\tif err := ociManifest.UpdateLayerInfos(ociOnlyEdits); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// Create a copy of the descriptor.\n\tconfig := schema2DescriptorFromOCI1Descriptor(ociManifest.Config)\n\n\t// Above, we have already checked that this manifest refers to an image, not an OCI artifact,\n\t// so the only difference between OCI and DockerSchema2 is the mediatypes. The\n\t// media type of the manifest is handled by manifestSchema2FromComponents.\n\tconfig.MediaType = manifest.DockerV2Schema2ConfigMediaType\n\n\tlayers := make([]manifest.Schema2Descriptor, len(ociManifest.Layers))\n\tfor idx := range layers {\n\t\tlayers[idx] = schema2DescriptorFromOCI1Descriptor(ociManifest.Layers[idx])\n\t\tswitch layers[idx].MediaType {\n\t\tcase imgspecv1.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\t\tlayers[idx].MediaType = manifest.DockerV2Schema2ForeignLayerMediaType\n\t\tcase imgspecv1.MediaTypeImageLayerNonDistributableGzip: //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\t\tlayers[idx].MediaType = manifest.DockerV2Schema2ForeignLayerMediaTypeGzip\n\t\tcase imgspecv1.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\t\treturn nil, fmt.Errorf(\"Error during manifest conversion: %q: zstd compression is not supported for docker images\", layers[idx].MediaType)\n\t\tcase imgspecv1.MediaTypeImageLayer:\n\t\t\tlayers[idx].MediaType = manifest.DockerV2SchemaLayerMediaTypeUncompressed\n\t\tcase imgspecv1.MediaTypeImageLayerGzip:\n\t\t\tlayers[idx].MediaType = manifest.DockerV2Schema2LayerMediaType\n\t\tcase imgspecv1.MediaTypeImageLayerZstd:\n\t\t\treturn nil, fmt.Errorf(\"Error during manifest conversion: %q: zstd compression is not officially supported for docker images\", layers[idx].MediaType)\n\t\tcase ociencspec.MediaTypeLayerEnc, ociencspec.MediaTypeLayerGzipEnc, ociencspec.MediaTypeLayerZstdEnc,\n\t\t\tociencspec.MediaTypeLayerNonDistributableEnc, ociencspec.MediaTypeLayerNonDistributableGzipEnc, ociencspec.MediaTypeLayerNonDistributableZstdEnc:\n\t\t\treturn nil, fmt.Errorf(\"during manifest conversion: encrypted layers (%q) are not supported in docker images\", layers[idx].MediaType)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"Unknown media type during manifest conversion: %q\", layers[idx].MediaType)\n\t\t}\n\t}\n\n\t// Rather than copying the ConfigBlob now, we just pass m.src to the\n\t// translated manifest, since the only difference is the mediatype of\n\t// descriptors there is no change to any blob stored in m.src.\n\treturn manifestSchema2FromComponents(config, m.src, nil, layers), nil\n}\n\n// convertToManifestSchema1 returns a genericManifest implementation converted to manifest.DockerV2Schema1{Signed,}MediaType.\n// It may use options.InformationOnly and also adjust *options to be appropriate for editing the returned\n// value.\n// This does not change the state of the original manifestOCI1 object.\nfunc (m *manifestOCI1) convertToManifestSchema1(ctx context.Context, options *types.ManifestUpdateOptions) (genericManifest, error) {\n\tif m.m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\treturn nil, internalManifest.NewNonImageArtifactError(&m.m.Manifest)\n\t}\n\n\t// We can't directly convert images to V1, but we can transitively convert via a V2 image\n\tm2, err := m.convertToManifestSchema2(ctx, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn m2.convertToManifestSchema1(ctx, options)\n}\n\n// SupportsEncryption returns if encryption is supported for the manifest type\nfunc (m *manifestOCI1) SupportsEncryption(context.Context) bool {\n\treturn true\n}\n\n// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n// (and the code can handle that).\n// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n// algorithms depends not on the current format, but possibly on the target of a conversion (if UpdatedImage converts\n// to a different manifest format).\nfunc (m *manifestOCI1) CanChangeLayerCompression(mimeType string) bool {\n\treturn m.m.CanChangeLayerCompression(mimeType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/oci_index.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc manifestOCI1FromImageIndex(ctx context.Context, sys *types.SystemContext, src types.ImageSource, manblob []byte) (genericManifest, error) {\n\tindex, err := manifest.OCI1IndexFromManifest(manblob)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing OCI1 index: %w\", err)\n\t}\n\ttargetManifestDigest, err := index.ChooseInstance(sys)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"choosing image instance: %w\", err)\n\t}\n\tmanblob, mt, err := src.GetManifest(ctx, &targetManifestDigest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fetching target platform image selected from image index: %w\", err)\n\t}\n\n\tmatches, err := manifest.MatchesDigest(manblob, targetManifestDigest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"computing manifest digest: %w\", err)\n\t}\n\tif !matches {\n\t\treturn nil, fmt.Errorf(\"Image manifest does not match selected manifest digest %s\", targetManifestDigest)\n\t}\n\n\treturn manifestInstanceFromBlob(ctx, sys, src, manblob, mt)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/sourced.go",
    "content": "// Package image consolidates knowledge about various container image formats\n// (as opposed to image storage mechanisms, which are handled by types.ImageSource)\n// and exposes all of them using an unified interface.\npackage image\n\nimport (\n\t\"context\"\n\n\t\"go.podman.io/image/v5/types\"\n)\n\n// FromReference returns a types.ImageCloser implementation for the default instance reading from reference.\n// If reference points to a manifest list, .Manifest() still returns the manifest list,\n// but other methods transparently return data from an appropriate image instance.\n//\n// The caller must call .Close() on the returned ImageCloser.\n//\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage instead of calling this function.\nfunc FromReference(ctx context.Context, sys *types.SystemContext, ref types.ImageReference) (types.ImageCloser, error) {\n\tsrc, err := ref.NewImageSource(ctx, sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\timg, err := FromSource(ctx, sys, src)\n\tif err != nil {\n\t\tsrc.Close()\n\t\treturn nil, err\n\t}\n\treturn img, nil\n}\n\n// imageCloser implements types.ImageCloser, perhaps allowing simple users\n// to use a single object without having keep a reference to a types.ImageSource\n// only to call types.ImageSource.Close().\ntype imageCloser struct {\n\ttypes.Image\n\tsrc types.ImageSource\n}\n\n// FromSource returns a types.ImageCloser implementation for the default instance of source.\n// If source is a manifest list, .Manifest() still returns the manifest list,\n// but other methods transparently return data from an appropriate image instance.\n//\n// The caller must call .Close() on the returned ImageCloser.\n//\n// FromSource “takes ownership” of the input ImageSource and will call src.Close()\n// when the image is closed.  (This does not prevent callers from using both the\n// Image and ImageSource objects simultaneously, but it means that they only need to\n// the Image.)\n//\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage instead of calling this function.\n//\n// Most callers can use either FromUnparsedImage or FromReference instead.\n//\n// This is publicly visible as c/image/image.FromSource.\nfunc FromSource(ctx context.Context, sys *types.SystemContext, src types.ImageSource) (types.ImageCloser, error) {\n\timg, err := FromUnparsedImage(ctx, sys, UnparsedInstance(src, nil))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &imageCloser{\n\t\tImage: img,\n\t\tsrc:   src,\n\t}, nil\n}\n\nfunc (ic *imageCloser) Close() error {\n\treturn ic.src.Close()\n}\n\n// SourcedImage is a general set of utilities for working with container images,\n// whatever is their underlying transport (i.e. ImageSource-independent).\n// Note the existence of docker.Image and image.memoryImage: various instances\n// of a types.Image may not be a SourcedImage directly.\n//\n// Most external users of `types.Image` do not care, and those who care about `docker.Image` know they do.\n//\n// Internal users may depend on methods available in SourcedImage but not (yet?) in types.Image.\ntype SourcedImage struct {\n\t*UnparsedImage\n\tManifestBlob     []byte // The manifest of the relevant instance\n\tManifestMIMEType string // MIME type of ManifestBlob\n\t// genericManifest contains data corresponding to manifestBlob.\n\t// NOTE: The manifest may have been modified in the process; DO NOT reserialize and store genericManifest\n\t// if you want to preserve the original manifest; use manifestBlob directly.\n\tgenericManifest\n}\n\n// FromUnparsedImage returns a types.Image implementation for unparsed.\n// If unparsed represents a manifest list, .Manifest() still returns the manifest list,\n// but other methods transparently return data from an appropriate single image.\n//\n// The Image must not be used after the underlying ImageSource is Close()d.\n//\n// This is publicly visible as c/image/image.FromUnparsedImage.\nfunc FromUnparsedImage(ctx context.Context, sys *types.SystemContext, unparsed *UnparsedImage) (*SourcedImage, error) {\n\t// Note that the input parameter above is specifically *image.UnparsedImage, not types.UnparsedImage:\n\t// we want to be able to use unparsed.src.  We could make that an explicit interface, but, well,\n\t// this is the only UnparsedImage implementation around, anyway.\n\n\t// NOTE: It is essential for signature verification that all parsing done in this object happens on the same manifest which is returned by unparsed.Manifest().\n\tmanifestBlob, manifestMIMEType, err := unparsed.Manifest(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tparsedManifest, err := manifestInstanceFromBlob(ctx, sys, unparsed.src, manifestBlob, manifestMIMEType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &SourcedImage{\n\t\tUnparsedImage:    unparsed,\n\t\tManifestBlob:     manifestBlob,\n\t\tManifestMIMEType: manifestMIMEType,\n\t\tgenericManifest:  parsedManifest,\n\t}, nil\n}\n\n// Size returns the size of the image as stored, if it's known, or -1 if it isn't.\nfunc (i *SourcedImage) Size() (int64, error) {\n\treturn -1, nil\n}\n\n// Manifest overrides the UnparsedImage.Manifest to always use the fields which we have already fetched.\nfunc (i *SourcedImage) Manifest(ctx context.Context) ([]byte, string, error) {\n\treturn i.ManifestBlob, i.ManifestMIMEType, nil\n}\n\nfunc (i *SourcedImage) LayerInfosForCopy(ctx context.Context) ([]types.BlobInfo, error) {\n\treturn i.UnparsedImage.src.LayerInfosForCopy(ctx, i.UnparsedImage.instanceDigest)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/image/unparsed.go",
    "content": "package image\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/imagesource\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// UnparsedImage implements types.UnparsedImage .\n// An UnparsedImage is a pair of (ImageSource, instance digest); it can represent either a manifest list or a single image instance.\n//\n// This is publicly visible as c/image/image.UnparsedImage.\ntype UnparsedImage struct {\n\tsrc            private.ImageSource\n\tinstanceDigest *digest.Digest\n\tcachedManifest []byte // A private cache for Manifest(); nil if not yet known.\n\t// A private cache for Manifest(), may be the empty string if guessing failed.\n\t// Valid iff cachedManifest is not nil.\n\tcachedManifestMIMEType string\n\tcachedSignatures       []signature.Signature // A private cache for Signatures(); nil if not yet known.\n}\n\n// UnparsedInstance returns a types.UnparsedImage implementation for (source, instanceDigest).\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list).\n//\n// This implementation of [types.UnparsedImage] ensures that [types.UnparsedImage.Manifest] validates the image\n// against instanceDigest if set, or, if not, a digest implied by src.Reference, if any.\n//\n// The UnparsedImage must not be used after the underlying ImageSource is Close()d.\n//\n// This is publicly visible as c/image/image.UnparsedInstance.\nfunc UnparsedInstance(src types.ImageSource, instanceDigest *digest.Digest) *UnparsedImage {\n\treturn &UnparsedImage{\n\t\tsrc:            imagesource.FromPublic(src),\n\t\tinstanceDigest: instanceDigest,\n\t}\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (i *UnparsedImage) Reference() types.ImageReference {\n\t// Note that this does not depend on instanceDigest; e.g. all instances within a manifest list need to be signed with the manifest list identity.\n\treturn i.src.Reference()\n}\n\n// Manifest is like ImageSource.GetManifest, but the result is cached; it is OK to call this however often you need.\n//\n// Users of UnparsedImage are promised that this validates the image\n// against either i.instanceDigest if set, or against a digest included in i.src.Reference.\nfunc (i *UnparsedImage) Manifest(ctx context.Context) ([]byte, string, error) {\n\tif i.cachedManifest == nil {\n\t\tm, mt, err := i.src.GetManifest(ctx, i.instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\t// ImageSource.GetManifest does not do digest verification, but we do;\n\t\t// this immediately protects also any user of types.Image.\n\t\tif digest, haveDigest := i.expectedManifestDigest(); haveDigest {\n\t\t\tmatches, err := manifest.MatchesDigest(m, digest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"computing manifest digest: %w\", err)\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"Manifest does not match provided manifest digest %s\", digest)\n\t\t\t}\n\t\t}\n\n\t\ti.cachedManifest = m\n\t\ti.cachedManifestMIMEType = mt\n\t}\n\treturn i.cachedManifest, i.cachedManifestMIMEType, nil\n}\n\n// expectedManifestDigest returns a the expected value of the manifest digest, and an indicator whether it is known.\n// The bool return value seems redundant with digest != \"\"; it is used explicitly\n// to refuse (unexpected) situations when the digest exists but is \"\".\nfunc (i *UnparsedImage) expectedManifestDigest() (digest.Digest, bool) {\n\tif i.instanceDigest != nil {\n\t\treturn *i.instanceDigest, true\n\t}\n\tref := i.Reference().DockerReference()\n\tif ref != nil {\n\t\tif canonical, ok := ref.(reference.Canonical); ok {\n\t\t\treturn canonical.Digest(), true\n\t\t}\n\t}\n\treturn \"\", false\n}\n\n// Signatures is like ImageSource.GetSignatures, but the result is cached; it is OK to call this however often you need.\nfunc (i *UnparsedImage) Signatures(ctx context.Context) ([][]byte, error) {\n\t// It would be consistent to make this an internal/unparsedimage/impl.Compat wrapper,\n\t// but this is very likely to be the only implementation ever.\n\tsigs, err := i.UntrustedSignatures(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsimpleSigs := [][]byte{}\n\tfor _, sig := range sigs {\n\t\tif sig, ok := sig.(signature.SimpleSigning); ok {\n\t\t\tsimpleSigs = append(simpleSigs, sig.UntrustedSignature())\n\t\t}\n\t}\n\treturn simpleSigs, nil\n}\n\n// UntrustedSignatures is like ImageSource.GetSignaturesWithFormat, but the result is cached; it is OK to call this however often you need.\nfunc (i *UnparsedImage) UntrustedSignatures(ctx context.Context) ([]signature.Signature, error) {\n\tif i.cachedSignatures == nil {\n\t\tsigs, err := i.src.GetSignaturesWithFormat(ctx, i.instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ti.cachedSignatures = sigs\n\t}\n\treturn i.cachedSignatures, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/impl/compat.go",
    "content": "package impl\n\nimport (\n\t\"context\"\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Compat implements the obsolete parts of types.ImageDestination\n// for implementations of private.ImageDestination.\n// See AddCompat below.\ntype Compat struct {\n\tdest private.ImageDestinationInternalOnly\n}\n\n// AddCompat initializes Compat to implement the obsolete parts of types.ImageDestination\n// for implementations of private.ImageDestination.\n//\n// Use it like this:\n//\n//\ttype yourDestination struct {\n//\t\timpl.Compat\n//\t\t…\n//\t}\n//\n//\tdest := &yourDestination{…}\n//\tdest.Compat = impl.AddCompat(dest)\nfunc AddCompat(dest private.ImageDestinationInternalOnly) Compat {\n\treturn Compat{dest}\n}\n\n// PutBlob writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// May update cache.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.\nfunc (c *Compat) PutBlob(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, cache types.BlobInfoCache, isConfig bool) (types.BlobInfo, error) {\n\tres, err := c.dest.PutBlobWithOptions(ctx, stream, inputInfo, private.PutBlobOptions{\n\t\tCache:    blobinfocache.FromBlobInfoCache(cache),\n\t\tIsConfig: isConfig,\n\t})\n\tif err != nil {\n\t\treturn types.BlobInfo{}, err\n\t}\n\treturn types.BlobInfo{\n\t\tDigest: res.Digest,\n\t\tSize:   res.Size,\n\t}, nil\n}\n\n// TryReusingBlob checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If canSubstitute, TryReusingBlob can use an equivalent equivalent of the desired blob; in that case the returned info may not match the input.\n// If the blob has been successfully reused, returns (true, info, nil); info must contain at least a digest and size, and may\n// include CompressionOperation and CompressionAlgorithm fields to indicate that a change to the compression type should be\n// reflected in the manifest that will be written.\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\n// May use and/or update cache.\nfunc (c *Compat) TryReusingBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache, canSubstitute bool) (bool, types.BlobInfo, error) {\n\treused, blob, err := c.dest.TryReusingBlobWithOptions(ctx, info, private.TryReusingBlobOptions{\n\t\tCache:         blobinfocache.FromBlobInfoCache(cache),\n\t\tCanSubstitute: canSubstitute,\n\t})\n\tif !reused || err != nil {\n\t\treturn reused, types.BlobInfo{}, err\n\t}\n\tres := types.BlobInfo{\n\t\tDigest:               blob.Digest,\n\t\tSize:                 blob.Size,\n\t\tCompressionOperation: blob.CompressionOperation,\n\t\tCompressionAlgorithm: blob.CompressionAlgorithm,\n\t}\n\t// This is probably not necessary; we preserve MediaType to decrease risks of breaking for external callers.\n\t// Some transports were not setting the MediaType field anyway, and others were setting the old value on substitution;\n\t// provide the value in cases where it is likely to be correct.\n\tif blob.Digest == info.Digest {\n\t\tres.MediaType = info.MediaType\n\t}\n\treturn true, res, nil\n}\n\n// PutSignatures writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (c *Compat) PutSignatures(ctx context.Context, signatures [][]byte, instanceDigest *digest.Digest) error {\n\twithFormat := []signature.Signature{}\n\tfor _, sig := range signatures {\n\t\twithFormat = append(withFormat, signature.SimpleSigningFromBlob(sig))\n\t}\n\treturn c.dest.PutSignaturesWithFormat(ctx, withFormat, instanceDigest)\n}\n\n// Commit marks the process of storing the image as successful and asks for the image to be persisted.\n// unparsedToplevel contains data about the top-level manifest of the source (which may be a single-arch image or a manifest list\n// if PutManifest was only called for the single-arch image with instanceDigest == nil), primarily to allow lookups by the\n// original manifest list digest, if desired.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before Commit() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without Commit() (i.e. rollback is allowed but not guaranteed)\nfunc (c *Compat) Commit(ctx context.Context, unparsedToplevel types.UnparsedImage) error {\n\treturn c.dest.CommitWithOptions(ctx, private.CommitOptions{\n\t\tUnparsedToplevel: unparsedToplevel,\n\t})\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/impl/helpers.go",
    "content": "package impl\n\nimport (\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/private\"\n)\n\n// OriginalCandidateMatchesTryReusingBlobOptions returns true if the original blob passed to TryReusingBlobWithOptions\n// is acceptable based on opts.\nfunc OriginalCandidateMatchesTryReusingBlobOptions(opts private.TryReusingBlobOptions) bool {\n\treturn manifest.CandidateCompressionMatchesReuseConditions(manifest.ReuseConditions{\n\t\tPossibleManifestFormats: opts.PossibleManifestFormats,\n\t\tRequiredCompression:     opts.RequiredCompression,\n\t}, opts.OriginalCompression)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/impl/properties.go",
    "content": "package impl\n\nimport \"go.podman.io/image/v5/types\"\n\n// Properties collects properties of an ImageDestination that are constant throughout its lifetime\n// (but might differ across instances).\ntype Properties struct {\n\t// SupportedManifestMIMETypes tells which manifest MIME types the destination supports.\n\t// A empty slice or nil means any MIME type can be tried to upload.\n\tSupportedManifestMIMETypes []string\n\t// DesiredLayerCompression indicates the kind of compression to apply on layers\n\tDesiredLayerCompression types.LayerCompression\n\t// AcceptsForeignLayerURLs is false if foreign layers in manifest should be actually\n\t// uploaded to the image destination, true otherwise.\n\tAcceptsForeignLayerURLs bool\n\t// MustMatchRuntimeOS is set to true if the destination can store only images targeted for the current runtime architecture and OS.\n\tMustMatchRuntimeOS bool\n\t// IgnoresEmbeddedDockerReference is set to true if the destination does not care about Image.EmbeddedDockerReferenceConflicts(),\n\t// and would prefer to receive an unmodified manifest instead of one modified for the destination.\n\t// Does not make a difference if Reference().DockerReference() is nil.\n\tIgnoresEmbeddedDockerReference bool\n\t// HasThreadSafePutBlob indicates that PutBlob can be executed concurrently.\n\tHasThreadSafePutBlob bool\n}\n\n// PropertyMethodsInitialize implements parts of private.ImageDestination corresponding to Properties.\ntype PropertyMethodsInitialize struct {\n\t// We need two separate structs, PropertyMethodsInitialize and Properties, because Go prohibits fields and methods with the same name.\n\n\tvals Properties\n}\n\n// PropertyMethods creates an PropertyMethodsInitialize for vals.\nfunc PropertyMethods(vals Properties) PropertyMethodsInitialize {\n\treturn PropertyMethodsInitialize{\n\t\tvals: vals,\n\t}\n}\n\n// SupportedManifestMIMETypes tells which manifest mime types the destination supports\n// If an empty slice or nil it's returned, then any mime type can be tried to upload\nfunc (o PropertyMethodsInitialize) SupportedManifestMIMETypes() []string {\n\treturn o.vals.SupportedManifestMIMETypes\n}\n\n// DesiredLayerCompression indicates the kind of compression to apply on layers\nfunc (o PropertyMethodsInitialize) DesiredLayerCompression() types.LayerCompression {\n\treturn o.vals.DesiredLayerCompression\n}\n\n// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually\n// uploaded to the image destination, true otherwise.\nfunc (o PropertyMethodsInitialize) AcceptsForeignLayerURLs() bool {\n\treturn o.vals.AcceptsForeignLayerURLs\n}\n\n// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime architecture and OS. False otherwise.\nfunc (o PropertyMethodsInitialize) MustMatchRuntimeOS() bool {\n\treturn o.vals.MustMatchRuntimeOS\n}\n\n// IgnoresEmbeddedDockerReference() returns true iff the destination does not care about Image.EmbeddedDockerReferenceConflicts(),\n// and would prefer to receive an unmodified manifest instead of one modified for the destination.\n// Does not make a difference if Reference().DockerReference() is nil.\nfunc (o PropertyMethodsInitialize) IgnoresEmbeddedDockerReference() bool {\n\treturn o.vals.IgnoresEmbeddedDockerReference\n}\n\n// HasThreadSafePutBlob indicates whether PutBlob can be executed concurrently.\nfunc (o PropertyMethodsInitialize) HasThreadSafePutBlob() bool {\n\treturn o.vals.HasThreadSafePutBlob\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/stubs/original_oci_config.go",
    "content": "package stubs\n\nimport (\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// IgnoresOriginalOCIConfig implements NoteOriginalOCIConfig() that does nothing.\ntype IgnoresOriginalOCIConfig struct{}\n\n// NoteOriginalOCIConfig provides the config of the image, as it exists on the source, BUT converted to OCI format,\n// or an error obtaining that value (e.g. if the image is an artifact and not a container image).\n// The destination can use it in its TryReusingBlob/PutBlob implementations\n// (otherwise it only obtains the final config after all layers are written).\nfunc (stub IgnoresOriginalOCIConfig) NoteOriginalOCIConfig(ociConfig *imgspecv1.Image, configErr error) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/stubs/put_blob_partial.go",
    "content": "package stubs\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// NoPutBlobPartialInitialize implements parts of private.ImageDestination\n// for transports that don’t support PutBlobPartial().\n// See NoPutBlobPartial() below.\ntype NoPutBlobPartialInitialize struct {\n\ttransportName string\n}\n\n// NoPutBlobPartial creates a NoPutBlobPartialInitialize for ref.\nfunc NoPutBlobPartial(ref types.ImageReference) NoPutBlobPartialInitialize {\n\treturn NoPutBlobPartialRaw(ref.Transport().Name())\n}\n\n// NoPutBlobPartialRaw is the same thing as NoPutBlobPartial, but it can be used\n// in situations where no ImageReference is available.\nfunc NoPutBlobPartialRaw(transportName string) NoPutBlobPartialInitialize {\n\treturn NoPutBlobPartialInitialize{\n\t\ttransportName: transportName,\n\t}\n}\n\n// SupportsPutBlobPartial returns true if PutBlobPartial is supported.\nfunc (stub NoPutBlobPartialInitialize) SupportsPutBlobPartial() bool {\n\treturn false\n}\n\n// PutBlobPartial attempts to create a blob using the data that is already present\n// at the destination. chunkAccessor is accessed in a non-sequential way to retrieve the missing chunks.\n// It is available only if SupportsPutBlobPartial().\n// Even if SupportsPutBlobPartial() returns true, the call can fail.\n// If the call fails with ErrFallbackToOrdinaryLayerDownload, the caller can fall back to PutBlobWithOptions.\n// The fallback _must not_ be done otherwise.\nfunc (stub NoPutBlobPartialInitialize) PutBlobPartial(ctx context.Context, chunkAccessor private.BlobChunkAccessor, srcInfo types.BlobInfo, options private.PutBlobPartialOptions) (private.UploadedBlob, error) {\n\treturn private.UploadedBlob{}, fmt.Errorf(\"internal error: PutBlobPartial is not supported by the %q transport\", stub.transportName)\n}\n\n// ImplementsPutBlobPartial implements SupportsPutBlobPartial() that returns true.\ntype ImplementsPutBlobPartial struct{}\n\n// SupportsPutBlobPartial returns true if PutBlobPartial is supported.\nfunc (stub ImplementsPutBlobPartial) SupportsPutBlobPartial() bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/stubs/signatures.go",
    "content": "package stubs\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/signature\"\n)\n\n// NoSignaturesInitialize implements parts of private.ImageDestination\n// for transports that don’t support storing signatures.\n// See NoSignatures() below.\ntype NoSignaturesInitialize struct {\n\tmessage string\n}\n\n// NoSignatures creates a NoSignaturesInitialize, failing with message.\nfunc NoSignatures(message string) NoSignaturesInitialize {\n\treturn NoSignaturesInitialize{\n\t\tmessage: message,\n\t}\n}\n\n// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures.\n// Note: It is still possible for PutSignatures to fail if SupportsSignatures returns nil.\nfunc (stub NoSignaturesInitialize) SupportsSignatures(ctx context.Context) error {\n\treturn errors.New(stub.message)\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (stub NoSignaturesInitialize) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tif len(signatures) != 0 {\n\t\treturn errors.New(stub.message)\n\t}\n\treturn nil\n}\n\n// SupportsSignatures implements SupportsSignatures() that returns nil.\n// Note that it might be even more useful to return a value dynamically detected based on\ntype AlwaysSupportsSignatures struct{}\n\n// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures.\n// Note: It is still possible for PutSignatures to fail if SupportsSignatures returns nil.\nfunc (stub AlwaysSupportsSignatures) SupportsSignatures(ctx context.Context) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/stubs/stubs.go",
    "content": "// Package stubs contains trivial stubs for parts of private.ImageDestination.\n// It can be used from internal/wrapper, so it should not drag in any extra dependencies.\n// Compare with imagedestination/impl, which might require non-trivial implementation work.\n//\n// There are two kinds of stubs:\n//\n// First, there are pure stubs, like ImplementsPutBlobPartial. Those can just be included in an imageDestination\n// implementation:\n//\n//\ttype yourDestination struct {\n//\t\tstubs.ImplementsPutBlobPartial\n//\t\t…\n//\t}\n//\n// Second, there are stubs with a constructor, like NoPutBlobPartialInitialize. The Initialize marker\n// means that a constructor must be called:\n//\n//\ttype yourDestination struct {\n//\t\tstubs.NoPutBlobPartialInitialize\n//\t\t…\n//\t}\n//\n//\tdest := &yourDestination{\n//\t\t…\n//\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartial(ref),\n//\t}\npackage stubs\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagedestination/wrapper.go",
    "content": "package imagedestination\n\nimport (\n\t\"context\"\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// wrapped provides the private.ImageDestination operations\n// for a destination that only implements types.ImageDestination\ntype wrapped struct {\n\tstubs.IgnoresOriginalOCIConfig\n\tstubs.NoPutBlobPartialInitialize\n\n\ttypes.ImageDestination\n}\n\n// FromPublic(dest) returns an object that provides the private.ImageDestination API\n//\n// Eventually, we might want to expose this function, and methods of the returned object,\n// as a public API (or rather, a variant that does not include the already-superseded\n// methods of types.ImageDestination, and has added more future-proofing), and more strongly\n// deprecate direct use of types.ImageDestination.\n//\n// NOTE: The returned API MUST NOT be a public interface (it can be either just a struct\n// with public methods, or perhaps a private interface), so that we can add methods\n// without breaking any external implementers of a public interface.\nfunc FromPublic(dest types.ImageDestination) private.ImageDestination {\n\tif dest2, ok := dest.(private.ImageDestination); ok {\n\t\treturn dest2\n\t}\n\treturn &wrapped{\n\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartial(dest.Reference()),\n\n\t\tImageDestination: dest,\n\t}\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (w *wrapped) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\tres, err := w.PutBlob(ctx, stream, inputInfo, options.Cache, options.IsConfig)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\treturn private.UploadedBlob{\n\t\tDigest: res.Digest,\n\t\tSize:   res.Size,\n\t}, nil\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (w *wrapped) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif options.RequiredCompression != nil {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\treused, blob, err := w.TryReusingBlob(ctx, info, options.Cache, options.CanSubstitute)\n\tif !reused || err != nil {\n\t\treturn reused, private.ReusedBlob{}, err\n\t}\n\treturn true, private.ReusedBlob{\n\t\tDigest:               blob.Digest,\n\t\tSize:                 blob.Size,\n\t\tCompressionOperation: blob.CompressionOperation,\n\t\tCompressionAlgorithm: blob.CompressionAlgorithm,\n\t\t// CompressionAnnotations could be set to blob.Annotations, but that may contain unrelated\n\t\t// annotations, and we didn’t use the blob.Annotations field previously, so we’ll\n\t\t// continue not using it.\n\t}, nil\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (w *wrapped) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tsimpleSigs := [][]byte{}\n\tfor _, sig := range signatures {\n\t\tsimpleSig, ok := sig.(signature.SimpleSigning)\n\t\tif !ok {\n\t\t\treturn signature.UnsupportedFormatError(sig)\n\t\t}\n\t\tsimpleSigs = append(simpleSigs, simpleSig.UntrustedSignature())\n\t}\n\treturn w.PutSignatures(ctx, simpleSigs, instanceDigest)\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (w *wrapped) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\treturn w.Commit(ctx, options.UnparsedToplevel)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/impl/compat.go",
    "content": "package impl\n\nimport (\n\t\"context\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n)\n\n// Compat implements the obsolete parts of types.ImageSource\n// for implementations of private.ImageSource.\n// See AddCompat below.\ntype Compat struct {\n\tsrc private.ImageSourceInternalOnly\n}\n\n// AddCompat initializes Compat to implement the obsolete parts of types.ImageSource\n// for implementations of private.ImageSource.\n//\n// Use it like this:\n//\n//\ttype yourSource struct {\n//\t\timpl.Compat\n//\t\t…\n//\t}\n//\n//\tsrc := &yourSource{…}\n//\tsrc.Compat = impl.AddCompat(src)\nfunc AddCompat(src private.ImageSourceInternalOnly) Compat {\n\treturn Compat{src}\n}\n\n// GetSignatures returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (c *Compat) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error) {\n\t// Silently ignore signatures with other formats; the caller can’t handle them.\n\t// Admittedly callers that want to sync all of the image might want to fail instead; this\n\t// way an upgrade of c/image neither breaks them nor adds new functionality.\n\t// Alternatively, we could possibly define the old GetSignatures to use the multi-format\n\t// signature.Blob representation now, in general, but that could silently break them as well.\n\tsigs, err := c.src.GetSignaturesWithFormat(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsimpleSigs := [][]byte{}\n\tfor _, sig := range sigs {\n\t\tif sig, ok := sig.(signature.SimpleSigning); ok {\n\t\t\tsimpleSigs = append(simpleSigs, sig.UntrustedSignature())\n\t\t}\n\t}\n\treturn simpleSigs, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/impl/layer_infos.go",
    "content": "package impl\n\nimport (\n\t\"context\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// DoesNotAffectLayerInfosForCopy implements LayerInfosForCopy() that returns nothing.\ntype DoesNotAffectLayerInfosForCopy struct{}\n\n// LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer\n// blobsums that are listed in the image's manifest.  If values are returned, they should be used when using GetBlob()\n// to read the image's layers.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve BlobInfos for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (stub DoesNotAffectLayerInfosForCopy) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/impl/properties.go",
    "content": "package impl\n\n// Properties collects properties of an ImageSource that are constant throughout its lifetime\n// (but might differ across instances).\ntype Properties struct {\n\t// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.\n\tHasThreadSafeGetBlob bool\n}\n\n// PropertyMethodsInitialize implements parts of private.ImageSource corresponding to Properties.\ntype PropertyMethodsInitialize struct {\n\t// We need two separate structs, PropertyMethodsInitialize and Properties, because Go prohibits fields and methods with the same name.\n\n\tvals Properties\n}\n\n// PropertyMethods creates an PropertyMethodsInitialize for vals.\nfunc PropertyMethods(vals Properties) PropertyMethodsInitialize {\n\treturn PropertyMethodsInitialize{\n\t\tvals: vals,\n\t}\n}\n\n// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.\nfunc (o PropertyMethodsInitialize) HasThreadSafeGetBlob() bool {\n\treturn o.vals.HasThreadSafeGetBlob\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/impl/signatures.go",
    "content": "package impl\n\nimport (\n\t\"context\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/signature\"\n)\n\n// NoSignatures implements GetSignatures() that returns nothing.\ntype NoSignatures struct{}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (stub NoSignatures) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/stubs/get_blob_at.go",
    "content": "package stubs\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// NoGetBlobAtInitialize implements parts of private.ImageSource\n// for transports that don’t support GetBlobAt().\n// See NoGetBlobAt() below.\ntype NoGetBlobAtInitialize struct {\n\ttransportName string\n}\n\n// NoGetBlobAt() creates a NoGetBlobAtInitialize for ref.\nfunc NoGetBlobAt(ref types.ImageReference) NoGetBlobAtInitialize {\n\treturn NoGetBlobAtRaw(ref.Transport().Name())\n}\n\n// NoGetBlobAtRaw is the same thing as NoGetBlobAt, but it can be used\n// in situations where no ImageReference is available.\nfunc NoGetBlobAtRaw(transportName string) NoGetBlobAtInitialize {\n\treturn NoGetBlobAtInitialize{\n\t\ttransportName: transportName,\n\t}\n}\n\n// SupportsGetBlobAt() returns true if GetBlobAt (BlobChunkAccessor) is supported.\nfunc (stub NoGetBlobAtInitialize) SupportsGetBlobAt() bool {\n\treturn false\n}\n\n// GetBlobAt returns a sequential channel of readers that contain data for the requested\n// blob chunks, and a channel that might get a single error value.\n// The specified chunks must be not overlapping and sorted by their offset.\n// The readers must be fully consumed, in the order they are returned, before blocking\n// to read the next chunk.\n// If the Length for the last chunk is set to math.MaxUint64, then it\n// fully fetches the remaining data from the offset to the end of the blob.\nfunc (stub NoGetBlobAtInitialize) GetBlobAt(ctx context.Context, info types.BlobInfo, chunks []private.ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\treturn nil, nil, fmt.Errorf(\"internal error: GetBlobAt is not supported by the %q transport\", stub.transportName)\n}\n\n// ImplementsGetBlobAt implements SupportsGetBlobAt() that returns true.\ntype ImplementsGetBlobAt struct{}\n\n// SupportsGetBlobAt() returns true if GetBlobAt (BlobChunkAccessor) is supported.\nfunc (stub ImplementsGetBlobAt) SupportsGetBlobAt() bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/stubs/stubs.go",
    "content": "// Package stubs contains trivial stubs for parts of private.ImageSource.\n// It can be used from internal/wrapper, so it should not drag in any extra dependencies.\n// Compare with imagesource/impl, which might require non-trivial implementation work.\n//\n// There are two kinds of stubs:\n//\n// First, there are pure stubs, like ImplementsGetBlobAt. Those can just be included in an ImageSource\n//\n// implementation:\n//\n//\ttype yourSource struct {\n//\t\tstubs.ImplementsGetBlobAt\n//\t\t…\n//\t}\n//\n// Second, there are stubs with a constructor, like NoGetBlobAtInitialize. The Initialize marker\n// means that a constructor must be called:\n//\n//\ttype yourSource struct {\n//\t\tstubs.NoGetBlobAtInitialize\n//\t\t…\n//\t}\n//\n//\tdest := &yourSource{\n//\t\t…\n//\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),\n//\t}\npackage stubs\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/imagesource/wrapper.go",
    "content": "package imagesource\n\nimport (\n\t\"context\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// wrapped provides the private.ImageSource operations\n// for a source that only implements types.ImageSource\ntype wrapped struct {\n\tstubs.NoGetBlobAtInitialize\n\n\ttypes.ImageSource\n}\n\n// FromPublic(src) returns an object that provides the private.ImageSource API\n//\n// Eventually, we might want to expose this function, and methods of the returned object,\n// as a public API (or rather, a variant that does not include the already-superseded\n// methods of types.ImageSource, and has added more future-proofing), and more strongly\n// deprecate direct use of types.ImageSource.\n//\n// NOTE: The returned API MUST NOT be a public interface (it can be either just a struct\n// with public methods, or perhaps a private interface), so that we can add methods\n// without breaking any external implementers of a public interface.\nfunc FromPublic(src types.ImageSource) private.ImageSource {\n\tif src2, ok := src.(private.ImageSource); ok {\n\t\treturn src2\n\t}\n\treturn &wrapped{\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(src.Reference()),\n\n\t\tImageSource: src,\n\t}\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (w *wrapped) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\tsigs, err := w.GetSignatures(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := []signature.Signature{}\n\tfor _, sig := range sigs {\n\t\tres = append(res, signature.SimpleSigningFromBlob(sig))\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/iolimits/iolimits.go",
    "content": "package iolimits\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// All constants below are intended to be used as limits for `ReadAtMost`. The\n// immediate use-case for limiting the size of in-memory copied data is to\n// protect against OOM DOS attacks as described inCVE-2020-1702. Instead of\n// copying data until running out of memory, we error out after hitting the\n// specified limit.\nconst (\n\t// megaByte denotes one megabyte and is intended to be used as a limit in\n\t// `ReadAtMost`.\n\tmegaByte = 1 << 20\n\t// MaxManifestBodySize is the maximum allowed size of a manifest. The limit\n\t// of 4 MB aligns with the one of a Docker registry:\n\t// https://github.com/docker/distribution/blob/a8371794149d1d95f1e846744b05c87f2f825e5a/registry/handlers/manifests.go#L30\n\tMaxManifestBodySize = 4 * megaByte\n\t// MaxAuthTokenBodySize is the maximum allowed size of an auth token.\n\t// The limit of 1 MB is considered to be greatly sufficient.\n\tMaxAuthTokenBodySize = megaByte\n\t// MaxSignatureListBodySize is the maximum allowed size of a signature list.\n\t// The limit of 4 MB is considered to be greatly sufficient.\n\tMaxSignatureListBodySize = 4 * megaByte\n\t// MaxSignatureBodySize is the maximum allowed size of a signature.\n\t// The limit of 4 MB is considered to be greatly sufficient.\n\tMaxSignatureBodySize = 4 * megaByte\n\t// MaxErrorBodySize is the maximum allowed size of an error-response body.\n\t// The limit of 1 MB is considered to be greatly sufficient.\n\tMaxErrorBodySize = megaByte\n\t// MaxConfigBodySize is the maximum allowed size of a config blob.\n\t// The limit of 4 MB is considered to be greatly sufficient.\n\tMaxConfigBodySize = 4 * megaByte\n\t// MaxOpenShiftStatusBody is the maximum allowed size of an OpenShift status body.\n\t// The limit of 4 MB is considered to be greatly sufficient.\n\tMaxOpenShiftStatusBody = 4 * megaByte\n\t// MaxTarFileManifestSize is the maximum allowed size of a (docker save)-like manifest (which may contain multiple images)\n\t// The limit of 1 MB is considered to be greatly sufficient.\n\tMaxTarFileManifestSize = megaByte\n)\n\n// ReadAtMost reads from reader and errors out if the specified limit (in bytes) is exceeded.\nfunc ReadAtMost(reader io.Reader, limit int) ([]byte, error) {\n\tlimitedReader := io.LimitReader(reader, int64(limit+1))\n\n\tres, err := io.ReadAll(limitedReader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(res) > limit {\n\t\treturn nil, fmt.Errorf(\"exceeded maximum allowed size of %d bytes\", limit)\n\t}\n\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/common.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\n// AllowedManifestFields is a bit mask of “essential” manifest fields that ValidateUnambiguousManifestFormat\n// can expect to be present.\ntype AllowedManifestFields int\n\nconst (\n\tAllowedFieldConfig AllowedManifestFields = 1 << iota\n\tAllowedFieldFSLayers\n\tAllowedFieldHistory\n\tAllowedFieldLayers\n\tAllowedFieldManifests\n\tAllowedFieldFirstUnusedBit // Keep this at the end!\n)\n\n// ValidateUnambiguousManifestFormat rejects manifests (incl. multi-arch) that look like more than\n// one kind we currently recognize, i.e. if they contain any of the known “essential” format fields\n// other than the ones the caller specifically allows.\n// expectedMIMEType is used only for diagnostics.\n// NOTE: The caller should do the non-heuristic validations (e.g. check for any specified format\n// identification/version, or other “magic numbers”) before calling this, to cleanly reject unambiguous\n// data that just isn’t what was expected, as opposed to actually ambiguous data.\nfunc ValidateUnambiguousManifestFormat(manifest []byte, expectedMIMEType string,\n\tallowed AllowedManifestFields,\n) error {\n\tif allowed >= AllowedFieldFirstUnusedBit {\n\t\treturn fmt.Errorf(\"internal error: invalid allowedManifestFields value %#v\", allowed)\n\t}\n\t// Use a private type to decode, not just a map[string]any, because we want\n\t// to also reject case-insensitive matches (which would be used by Go when really decoding\n\t// the manifest).\n\t// (It is expected that as manifest formats are added or extended over time, more fields will be added\n\t// here.)\n\tdetectedFields := struct {\n\t\tConfig    any `json:\"config\"`\n\t\tFSLayers  any `json:\"fsLayers\"`\n\t\tHistory   any `json:\"history\"`\n\t\tLayers    any `json:\"layers\"`\n\t\tManifests any `json:\"manifests\"`\n\t}{}\n\tif err := json.Unmarshal(manifest, &detectedFields); err != nil {\n\t\t// The caller was supposed to already validate version numbers, so this should not happen;\n\t\t// let’s not bother with making this error “nice”.\n\t\treturn err\n\t}\n\tunexpected := []string{}\n\t// Sadly this isn’t easy to automate in Go, without reflection. So, copy&paste.\n\tif detectedFields.Config != nil && (allowed&AllowedFieldConfig) == 0 {\n\t\tunexpected = append(unexpected, \"config\")\n\t}\n\tif detectedFields.FSLayers != nil && (allowed&AllowedFieldFSLayers) == 0 {\n\t\tunexpected = append(unexpected, \"fsLayers\")\n\t}\n\tif detectedFields.History != nil && (allowed&AllowedFieldHistory) == 0 {\n\t\tunexpected = append(unexpected, \"history\")\n\t}\n\tif detectedFields.Layers != nil && (allowed&AllowedFieldLayers) == 0 {\n\t\tunexpected = append(unexpected, \"layers\")\n\t}\n\tif detectedFields.Manifests != nil && (allowed&AllowedFieldManifests) == 0 {\n\t\tunexpected = append(unexpected, \"manifests\")\n\t}\n\tif len(unexpected) != 0 {\n\t\treturn fmt.Errorf(`rejecting ambiguous manifest, unexpected fields %#v in supposedly %s`,\n\t\t\tunexpected, expectedMIMEType)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/docker_schema2.go",
    "content": "package manifest\n\nimport (\n\t\"github.com/opencontainers/go-digest\"\n)\n\n// Schema2Descriptor is a “descriptor” in docker/distribution schema 2.\n//\n// This is publicly visible as c/image/manifest.Schema2Descriptor.\ntype Schema2Descriptor struct {\n\tMediaType string        `json:\"mediaType\"`\n\tSize      int64         `json:\"size\"`\n\tDigest    digest.Digest `json:\"digest\"`\n\tURLs      []string      `json:\"urls,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/docker_schema2_list.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\tplatform \"go.podman.io/image/v5/internal/pkg/platform\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Schema2PlatformSpec describes the platform which a particular manifest is\n// specialized for.\n// This is publicly visible as c/image/manifest.Schema2PlatformSpec.\ntype Schema2PlatformSpec struct {\n\tArchitecture string   `json:\"architecture\"`\n\tOS           string   `json:\"os\"`\n\tOSVersion    string   `json:\"os.version,omitempty\"`\n\tOSFeatures   []string `json:\"os.features,omitempty\"`\n\tVariant      string   `json:\"variant,omitempty\"`\n\tFeatures     []string `json:\"features,omitempty\"` // removed in OCI\n}\n\n// Schema2ManifestDescriptor references a platform-specific manifest.\n// This is publicly visible as c/image/manifest.Schema2ManifestDescriptor.\ntype Schema2ManifestDescriptor struct {\n\tSchema2Descriptor\n\tPlatform Schema2PlatformSpec `json:\"platform\"`\n}\n\n// Schema2ListPublic is a list of platform-specific manifests.\n// This is publicly visible as c/image/manifest.Schema2List.\n// Internal users should usually use Schema2List instead.\ntype Schema2ListPublic struct {\n\tSchemaVersion int                         `json:\"schemaVersion\"`\n\tMediaType     string                      `json:\"mediaType\"`\n\tManifests     []Schema2ManifestDescriptor `json:\"manifests\"`\n}\n\n// MIMEType returns the MIME type of this particular manifest list.\nfunc (list *Schema2ListPublic) MIMEType() string {\n\treturn list.MediaType\n}\n\n// Instances returns a slice of digests of the manifests that this list knows of.\nfunc (list *Schema2ListPublic) Instances() []digest.Digest {\n\tresults := make([]digest.Digest, len(list.Manifests))\n\tfor i, m := range list.Manifests {\n\t\tresults[i] = m.Digest\n\t}\n\treturn results\n}\n\n// Instance returns the ListUpdate of a particular instance in the list.\nfunc (list *Schema2ListPublic) Instance(instanceDigest digest.Digest) (ListUpdate, error) {\n\tfor _, manifest := range list.Manifests {\n\t\tif manifest.Digest == instanceDigest {\n\t\t\tret := ListUpdate{\n\t\t\t\tDigest:    manifest.Digest,\n\t\t\t\tSize:      manifest.Size,\n\t\t\t\tMediaType: manifest.MediaType,\n\t\t\t}\n\t\t\tret.ReadOnly.CompressionAlgorithmNames = []string{compression.GzipAlgorithmName}\n\t\t\tplatform := ociPlatformFromSchema2PlatformSpec(manifest.Platform)\n\t\t\tret.ReadOnly.Platform = &platform\n\t\t\treturn ret, nil\n\t\t}\n\t}\n\treturn ListUpdate{}, fmt.Errorf(\"unable to find instance %s passed to Schema2List.Instances\", instanceDigest)\n}\n\n// UpdateInstances updates the sizes, digests, and media types of the manifests\n// which the list catalogs.\nfunc (list *Schema2ListPublic) UpdateInstances(updates []ListUpdate) error {\n\teditInstances := []ListEdit{}\n\tfor i, instance := range updates {\n\t\teditInstances = append(editInstances, ListEdit{\n\t\t\tUpdateOldDigest: list.Manifests[i].Digest,\n\t\t\tUpdateDigest:    instance.Digest,\n\t\t\tUpdateSize:      instance.Size,\n\t\t\tUpdateMediaType: instance.MediaType,\n\t\t\tListOperation:   ListOpUpdate,\n\t\t})\n\t}\n\treturn list.editInstances(editInstances, false)\n}\n\n// editInstances edits information about the list's instances, based on instructions in editInstances.\n// If cannotModifyManifest, avoidable updates should be skipped.\nfunc (list *Schema2ListPublic) editInstances(editInstances []ListEdit, cannotModifyManifest bool) error {\n\t_ = cannotModifyManifest // None of the edits we make are avoidable.\n\taddedEntries := []Schema2ManifestDescriptor{}\n\tfor i, editInstance := range editInstances {\n\t\tswitch editInstance.ListOperation {\n\t\tcase ListOpUpdate:\n\t\t\tif err := editInstance.UpdateOldDigest.Validate(); err != nil {\n\t\t\t\treturn fmt.Errorf(\"Schema2List.EditInstances: Attempting to update %s which is an invalid digest: %w\", editInstance.UpdateOldDigest, err)\n\t\t\t}\n\t\t\tif err := editInstance.UpdateDigest.Validate(); err != nil {\n\t\t\t\treturn fmt.Errorf(\"Schema2List.EditInstances: Modified digest %s is an invalid digest: %w\", editInstance.UpdateDigest, err)\n\t\t\t}\n\t\t\ttargetIndex := slices.IndexFunc(list.Manifests, func(m Schema2ManifestDescriptor) bool {\n\t\t\t\treturn m.Digest == editInstance.UpdateOldDigest\n\t\t\t})\n\t\t\tif targetIndex == -1 {\n\t\t\t\treturn fmt.Errorf(\"Schema2List.EditInstances: digest %s not found\", editInstance.UpdateOldDigest)\n\t\t\t}\n\t\t\tlist.Manifests[targetIndex].Digest = editInstance.UpdateDigest\n\t\t\tif editInstance.UpdateSize < 0 {\n\t\t\t\treturn fmt.Errorf(\"update %d of %d passed to Schema2List.UpdateInstances had an invalid size (%d)\", i+1, len(editInstances), editInstance.UpdateSize)\n\t\t\t}\n\t\t\tlist.Manifests[targetIndex].Size = editInstance.UpdateSize\n\t\t\tif editInstance.UpdateMediaType == \"\" {\n\t\t\t\treturn fmt.Errorf(\"update %d of %d passed to Schema2List.UpdateInstances had no media type (was %q)\", i+1, len(editInstances), list.Manifests[i].MediaType)\n\t\t\t}\n\t\t\tlist.Manifests[targetIndex].MediaType = editInstance.UpdateMediaType\n\t\tcase ListOpAdd:\n\t\t\tif editInstance.AddPlatform == nil {\n\t\t\t\t// Should we create a struct with empty fields instead?\n\t\t\t\t// Right now ListOpAdd is only called when an instance with the same platform value\n\t\t\t\t// already exists in the manifest, so this should not be reached in practice.\n\t\t\t\treturn fmt.Errorf(\"adding a schema2 list instance with no platform specified is not supported\")\n\t\t\t}\n\t\t\taddedEntries = append(addedEntries, Schema2ManifestDescriptor{\n\t\t\t\tSchema2Descriptor{\n\t\t\t\t\tDigest:    editInstance.AddDigest,\n\t\t\t\t\tSize:      editInstance.AddSize,\n\t\t\t\t\tMediaType: editInstance.AddMediaType,\n\t\t\t\t},\n\t\t\t\tschema2PlatformSpecFromOCIPlatform(*editInstance.AddPlatform),\n\t\t\t})\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"internal error: invalid operation: %d\", editInstance.ListOperation)\n\t\t}\n\t}\n\tif len(addedEntries) != 0 {\n\t\t// slices.Clone() here to ensure a private backing array;\n\t\t// an external caller could have manually created Schema2ListPublic with a slice with extra capacity.\n\t\tlist.Manifests = append(slices.Clone(list.Manifests), addedEntries...)\n\t}\n\treturn nil\n}\n\n// EditInstances edits information about the list's instances, based on instructions in editInstances.\n// If cannotModifyManifest, avoidable updates should be skipped.\nfunc (list *Schema2List) EditInstances(editInstances []ListEdit, cannotModifyManifest bool) error {\n\treturn list.editInstances(editInstances, cannotModifyManifest)\n}\n\nfunc (list *Schema2ListPublic) ChooseInstanceByCompression(ctx *types.SystemContext, preferGzip types.OptionalBool) (digest.Digest, error) {\n\t// ChooseInstanceByCompression is same as ChooseInstance for schema2 manifest list.\n\treturn list.ChooseInstance(ctx)\n}\n\n// ChooseInstance parses blob as a schema2 manifest list, and returns the digest\n// of the image which is appropriate for the current environment.\nfunc (list *Schema2ListPublic) ChooseInstance(ctx *types.SystemContext) (digest.Digest, error) {\n\twantedPlatforms := platform.WantedPlatforms(ctx)\n\tfor _, wantedPlatform := range wantedPlatforms {\n\t\tfor _, d := range list.Manifests {\n\t\t\timagePlatform := ociPlatformFromSchema2PlatformSpec(d.Platform)\n\t\t\tif platform.MatchesPlatform(imagePlatform, wantedPlatform) {\n\t\t\t\treturn d.Digest, nil\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"no image found in manifest list for architecture %q, variant %q, OS %q\", wantedPlatforms[0].Architecture, wantedPlatforms[0].Variant, wantedPlatforms[0].OS)\n}\n\n// Serialize returns the list in a blob format.\n// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\nfunc (list *Schema2ListPublic) Serialize() ([]byte, error) {\n\tbuf, err := json.Marshal(list)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"marshaling Schema2List %#v: %w\", list, err)\n\t}\n\treturn buf, nil\n}\n\n// Schema2ListPublicFromComponents creates a Schema2 manifest list instance from the\n// supplied data.\n// This is publicly visible as c/image/manifest.Schema2ListFromComponents.\nfunc Schema2ListPublicFromComponents(components []Schema2ManifestDescriptor) *Schema2ListPublic {\n\tlist := Schema2ListPublic{\n\t\tSchemaVersion: 2,\n\t\tMediaType:     DockerV2ListMediaType,\n\t\tManifests:     make([]Schema2ManifestDescriptor, len(components)),\n\t}\n\tfor i, component := range components {\n\t\tm := Schema2ManifestDescriptor{\n\t\t\tSchema2Descriptor{\n\t\t\t\tMediaType: component.MediaType,\n\t\t\t\tSize:      component.Size,\n\t\t\t\tDigest:    component.Digest,\n\t\t\t\tURLs:      slices.Clone(component.URLs),\n\t\t\t},\n\t\t\tSchema2PlatformSpec{\n\t\t\t\tArchitecture: component.Platform.Architecture,\n\t\t\t\tOS:           component.Platform.OS,\n\t\t\t\tOSVersion:    component.Platform.OSVersion,\n\t\t\t\tOSFeatures:   slices.Clone(component.Platform.OSFeatures),\n\t\t\t\tVariant:      component.Platform.Variant,\n\t\t\t\tFeatures:     slices.Clone(component.Platform.Features),\n\t\t\t},\n\t\t}\n\t\tlist.Manifests[i] = m\n\t}\n\treturn &list\n}\n\n// Schema2ListPublicClone creates a deep copy of the passed-in list.\n// This is publicly visible as c/image/manifest.Schema2ListClone.\nfunc Schema2ListPublicClone(list *Schema2ListPublic) *Schema2ListPublic {\n\treturn Schema2ListPublicFromComponents(list.Manifests)\n}\n\n// ToOCI1Index returns the list encoded as an OCI1 index.\nfunc (list *Schema2ListPublic) ToOCI1Index() (*OCI1IndexPublic, error) {\n\tcomponents := make([]imgspecv1.Descriptor, 0, len(list.Manifests))\n\tfor _, manifest := range list.Manifests {\n\t\tplatform := ociPlatformFromSchema2PlatformSpec(manifest.Platform)\n\t\tcomponents = append(components, imgspecv1.Descriptor{\n\t\t\tMediaType: manifest.MediaType,\n\t\t\tSize:      manifest.Size,\n\t\t\tDigest:    manifest.Digest,\n\t\t\tURLs:      slices.Clone(manifest.URLs),\n\t\t\tPlatform:  &platform,\n\t\t})\n\t}\n\toci := OCI1IndexPublicFromComponents(components, nil)\n\treturn oci, nil\n}\n\n// ToSchema2List returns the list encoded as a Schema2 list.\nfunc (list *Schema2ListPublic) ToSchema2List() (*Schema2ListPublic, error) {\n\treturn Schema2ListPublicClone(list), nil\n}\n\n// Schema2ListPublicFromManifest creates a Schema2 manifest list instance from marshalled\n// JSON, presumably generated by encoding a Schema2 manifest list.\n// This is publicly visible as c/image/manifest.Schema2ListFromManifest.\nfunc Schema2ListPublicFromManifest(manifest []byte) (*Schema2ListPublic, error) {\n\tlist := Schema2ListPublic{\n\t\tManifests: []Schema2ManifestDescriptor{},\n\t}\n\tif err := json.Unmarshal(manifest, &list); err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshaling Schema2List %q: %w\", string(manifest), err)\n\t}\n\tif err := ValidateUnambiguousManifestFormat(manifest, DockerV2ListMediaType,\n\t\tAllowedFieldManifests); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &list, nil\n}\n\n// Clone returns a deep copy of this list and its contents.\nfunc (list *Schema2ListPublic) Clone() ListPublic {\n\treturn Schema2ListPublicClone(list)\n}\n\n// ConvertToMIMEType converts the passed-in manifest list to a manifest\n// list of the specified type.\nfunc (list *Schema2ListPublic) ConvertToMIMEType(manifestMIMEType string) (ListPublic, error) {\n\tswitch normalized := NormalizedMIMEType(manifestMIMEType); normalized {\n\tcase DockerV2ListMediaType:\n\t\treturn list.Clone(), nil\n\tcase imgspecv1.MediaTypeImageIndex:\n\t\treturn list.ToOCI1Index()\n\tcase DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType, imgspecv1.MediaTypeImageManifest, DockerV2Schema2MediaType:\n\t\treturn nil, fmt.Errorf(\"Can not convert manifest list to MIME type %q, which is not a list type\", manifestMIMEType)\n\tdefault:\n\t\t// Note that this may not be reachable, NormalizedMIMEType has a default for unknown values.\n\t\treturn nil, fmt.Errorf(\"Unimplemented manifest list MIME type %s\", manifestMIMEType)\n\t}\n}\n\n// Schema2List is a list of platform-specific manifests.\ntype Schema2List struct {\n\tSchema2ListPublic\n}\n\nfunc schema2ListFromPublic(public *Schema2ListPublic) *Schema2List {\n\treturn &Schema2List{*public}\n}\n\nfunc (list *Schema2List) CloneInternal() List {\n\treturn schema2ListFromPublic(Schema2ListPublicClone(&list.Schema2ListPublic))\n}\n\nfunc (list *Schema2List) Clone() ListPublic {\n\treturn list.CloneInternal()\n}\n\n// Schema2ListFromManifest creates a Schema2 manifest list instance from marshalled\n// JSON, presumably generated by encoding a Schema2 manifest list.\nfunc Schema2ListFromManifest(manifest []byte) (*Schema2List, error) {\n\tpublic, err := Schema2ListPublicFromManifest(manifest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn schema2ListFromPublic(public), nil\n}\n\n// ociPlatformFromSchema2PlatformSpec converts a schema2 platform p to the OCI struccture.\nfunc ociPlatformFromSchema2PlatformSpec(p Schema2PlatformSpec) imgspecv1.Platform {\n\treturn imgspecv1.Platform{\n\t\tArchitecture: p.Architecture,\n\t\tOS:           p.OS,\n\t\tOSVersion:    p.OSVersion,\n\t\tOSFeatures:   slices.Clone(p.OSFeatures),\n\t\tVariant:      p.Variant,\n\t\t// Features is not supported in OCI, and discarded.\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/errors.go",
    "content": "package manifest\n\nimport (\n\t\"fmt\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n)\n\n// FIXME: This is a duplicate of c/image/manifestDockerV2Schema2ConfigMediaType.\n// Deduplicate that, depending on outcome of https://github.com/containers/image/pull/1791 .\nconst dockerV2Schema2ConfigMediaType = \"application/vnd.docker.container.image.v1+json\"\n\n// NonImageArtifactError (detected via errors.As) is used when asking for an image-specific operation\n// on an object which is not a “container image” in the standard sense (e.g. an OCI artifact)\n//\n// This is publicly visible as c/image/manifest.NonImageArtifactError (but we don’t provide a public constructor)\ntype NonImageArtifactError struct {\n\t// Callers should not be blindly calling image-specific operations and only checking MIME types\n\t// on failure; if they care about the artifact type, they should check before using it.\n\t// If they blindly assume an image, they don’t really need this value; just a type check\n\t// is sufficient for basic \"we can only pull images\" UI.\n\t//\n\t// Also, there are fairly widespread “artifacts” which nevertheless use imgspecv1.MediaTypeImageConfig,\n\t// e.g. https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md , which could cause the callers\n\t// to complain about a non-image artifact with the correct MIME type; we should probably add some other kind of\n\t// type discrimination, _and_ somehow make it available in the API, if we expect API callers to make decisions\n\t// based on that kind of data.\n\t//\n\t// So, let’s not expose this until a specific need is identified.\n\tmimeType string\n}\n\n// NewNonImageArtifactError returns a NonImageArtifactError about an artifact manifest.\n//\n// This is typically called if manifest.Config.MediaType != imgspecv1.MediaTypeImageConfig .\nfunc NewNonImageArtifactError(manifest *imgspecv1.Manifest) error {\n\t// Callers decide based on manifest.Config.MediaType that this is not an image;\n\t// in that case manifest.ArtifactType can be optionally defined, and if it is, it is typically\n\t// more relevant because config may be ~absent with imgspecv1.MediaTypeEmptyJSON.\n\t//\n\t// If ArtifactType and Config.MediaType are both defined and non-trivial, presumably\n\t// ArtifactType is the “top-level” one, although that’s not defined by the spec.\n\tmimeType := manifest.ArtifactType\n\tif mimeType == \"\" {\n\t\tmimeType = manifest.Config.MediaType\n\t}\n\treturn NonImageArtifactError{mimeType: mimeType}\n}\n\nfunc (e NonImageArtifactError) Error() string {\n\t// Special-case these invalid mixed images, which show up from time to time:\n\tif e.mimeType == dockerV2Schema2ConfigMediaType {\n\t\treturn fmt.Sprintf(\"invalid mixed OCI image with Docker v2s2 config (%q)\", e.mimeType)\n\t}\n\treturn fmt.Sprintf(\"unsupported image-specific operation on artifact with type %q\", e.mimeType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/list.go",
    "content": "package manifest\n\nimport (\n\t\"fmt\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// ListPublic is a subset of List which is a part of the public API;\n// so no methods can be added, removed or changed.\n//\n// Internal users should usually use List instead.\ntype ListPublic interface {\n\t// MIMEType returns the MIME type of this particular manifest list.\n\tMIMEType() string\n\n\t// Instances returns a list of the manifests that this list knows of, other than its own.\n\tInstances() []digest.Digest\n\n\t// Update information about the list's instances.  The length of the passed-in slice must\n\t// match the length of the list of instances which the list already contains, and every field\n\t// must be specified.\n\tUpdateInstances([]ListUpdate) error\n\n\t// Instance returns the size and MIME type of a particular instance in the list.\n\tInstance(digest.Digest) (ListUpdate, error)\n\n\t// ChooseInstance selects which manifest is most appropriate for the platform described by the\n\t// SystemContext, or for the current platform if the SystemContext doesn't specify any details.\n\tChooseInstance(ctx *types.SystemContext) (digest.Digest, error)\n\n\t// Serialize returns the list in a blob format.\n\t// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded\n\t// from, even if no modifications were made!\n\tSerialize() ([]byte, error)\n\n\t// ConvertToMIMEType returns the list rebuilt to the specified MIME type, or an error.\n\tConvertToMIMEType(mimeType string) (ListPublic, error)\n\n\t// Clone returns a deep copy of this list and its contents.\n\tClone() ListPublic\n}\n\n// List is an interface for parsing, modifying lists of image manifests.\n// Callers can either use this abstract interface without understanding the details of the formats,\n// or instantiate a specific implementation (e.g. manifest.OCI1Index) and access the public members\n// directly.\ntype List interface {\n\tListPublic\n\t// CloneInternal returns a deep copy of this list and its contents.\n\tCloneInternal() List\n\t// ChooseInstanceInstanceByCompression selects which manifest is most appropriate for the platform and compression described by the\n\t// SystemContext ( or for the current platform if the SystemContext doesn't specify any detail ) and preferGzip for compression which\n\t// when configured to OptionalBoolTrue and chooses best available compression when it is OptionalBoolFalse or left OptionalBoolUndefined.\n\tChooseInstanceByCompression(ctx *types.SystemContext, preferGzip types.OptionalBool) (digest.Digest, error)\n\t// EditInstances edits information about the list's instances, based on instructions in editInstances.\n\t// If cannotModifyManifest, avoidable updates should be skipped.\n\tEditInstances(editInstances []ListEdit, cannotModifyManifest bool) error\n}\n\n// ListUpdate includes the fields which a List's UpdateInstances() method will modify.\n// This is publicly visible as c/image/manifest.ListUpdate.\ntype ListUpdate struct {\n\tDigest    digest.Digest\n\tSize      int64\n\tMediaType string\n\t// ReadOnly fields: may be set by Instance(), ignored by UpdateInstance()\n\tReadOnly struct {\n\t\tPlatform                  *imgspecv1.Platform\n\t\tAnnotations               map[string]string\n\t\tCompressionAlgorithmNames []string\n\t\tArtifactType              string\n\t}\n}\n\ntype ListOp int\n\nconst (\n\tlistOpInvalid ListOp = iota\n\tListOpAdd\n\tListOpUpdate\n)\n\n// ListEdit includes the fields which a List's EditInstances() method will modify.\ntype ListEdit struct {\n\tListOperation ListOp\n\n\t// if Op == ListEditUpdate (basically the previous UpdateInstances). All fields must be set.\n\tUpdateOldDigest             digest.Digest\n\tUpdateDigest                digest.Digest\n\tUpdateSize                  int64\n\tUpdateMediaType             string\n\tUpdateAffectAnnotations     bool\n\tUpdateAnnotations           map[string]string\n\tUpdateCompressionAlgorithms []compression.Algorithm\n\n\t// If Op = ListEditAdd. All fields must be set.\n\tAddDigest                digest.Digest\n\tAddSize                  int64\n\tAddMediaType             string\n\tAddArtifactType          string\n\tAddPlatform              *imgspecv1.Platform\n\tAddAnnotations           map[string]string\n\tAddCompressionAlgorithms []compression.Algorithm\n}\n\n// ListPublicFromBlob parses a list of manifests.\n// This is publicly visible as c/image/manifest.ListFromBlob.\nfunc ListPublicFromBlob(manifest []byte, manifestMIMEType string) (ListPublic, error) {\n\tlist, err := ListFromBlob(manifest, manifestMIMEType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn list, nil\n}\n\n// ListFromBlob parses a list of manifests.\nfunc ListFromBlob(manifest []byte, manifestMIMEType string) (List, error) {\n\tnormalized := NormalizedMIMEType(manifestMIMEType)\n\tswitch normalized {\n\tcase DockerV2ListMediaType:\n\t\treturn Schema2ListFromManifest(manifest)\n\tcase imgspecv1.MediaTypeImageIndex:\n\t\treturn OCI1IndexFromManifest(manifest)\n\tcase DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType, imgspecv1.MediaTypeImageManifest, DockerV2Schema2MediaType:\n\t\treturn nil, fmt.Errorf(\"Treating single images as manifest lists is not implemented\")\n\t}\n\treturn nil, fmt.Errorf(\"Unimplemented manifest list MIME type %q (normalized as %q)\", manifestMIMEType, normalized)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/manifest.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"slices\"\n\n\t\"github.com/containers/libtrust\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n)\n\n// FIXME: Should we just use docker/distribution and docker/docker implementations directly?\n\n// FIXME(runcom, mitr): should we have a mediatype pkg??\nconst (\n\t// DockerV2Schema1MediaType MIME type represents Docker manifest schema 1\n\tDockerV2Schema1MediaType = \"application/vnd.docker.distribution.manifest.v1+json\"\n\t// DockerV2Schema1SignedMediaType MIME type represents Docker manifest schema 1 with a JWS signature\n\tDockerV2Schema1SignedMediaType = \"application/vnd.docker.distribution.manifest.v1+prettyjws\"\n\t// DockerV2Schema2MediaType MIME type represents Docker manifest schema 2\n\tDockerV2Schema2MediaType = \"application/vnd.docker.distribution.manifest.v2+json\"\n\t// DockerV2Schema2ConfigMediaType is the MIME type used for schema 2 config blobs.\n\tDockerV2Schema2ConfigMediaType = \"application/vnd.docker.container.image.v1+json\"\n\t// DockerV2Schema2LayerMediaType is the MIME type used for schema 2 layers.\n\tDockerV2Schema2LayerMediaType = \"application/vnd.docker.image.rootfs.diff.tar.gzip\"\n\t// DockerV2SchemaLayerMediaTypeUncompressed is the mediaType used for uncompressed layers.\n\tDockerV2SchemaLayerMediaTypeUncompressed = \"application/vnd.docker.image.rootfs.diff.tar\"\n\t// DockerV2SchemaLayerMediaTypeZstd is the MIME type used for schema 2 layers.\n\tDockerV2SchemaLayerMediaTypeZstd = \"application/vnd.docker.image.rootfs.diff.tar.zstd\"\n\t// DockerV2ListMediaType MIME type represents Docker manifest schema 2 list\n\tDockerV2ListMediaType = \"application/vnd.docker.distribution.manifest.list.v2+json\"\n\t// DockerV2Schema2ForeignLayerMediaType is the MIME type used for schema 2 foreign layers.\n\tDockerV2Schema2ForeignLayerMediaType = \"application/vnd.docker.image.rootfs.foreign.diff.tar\"\n\t// DockerV2Schema2ForeignLayerMediaTypeGzip is the MIME type used for gzipped schema 2 foreign layers.\n\tDockerV2Schema2ForeignLayerMediaTypeGzip = \"application/vnd.docker.image.rootfs.foreign.diff.tar.gzip\"\n)\n\n// GuessMIMEType guesses MIME type of a manifest and returns it _if it is recognized_, or \"\" if unknown or unrecognized.\n// FIXME? We should, in general, prefer out-of-band MIME type instead of blindly parsing the manifest,\n// but we may not have such metadata available (e.g. when the manifest is a local file).\n// This is publicly visible as c/image/manifest.GuessMIMEType.\nfunc GuessMIMEType(manifest []byte) string {\n\t// A subset of manifest fields; the rest is silently ignored by json.Unmarshal.\n\t// Also docker/distribution/manifest.Versioned.\n\tmeta := struct {\n\t\tMediaType     string `json:\"mediaType\"`\n\t\tSchemaVersion int    `json:\"schemaVersion\"`\n\t\tSignatures    any    `json:\"signatures\"`\n\t}{}\n\tif err := json.Unmarshal(manifest, &meta); err != nil {\n\t\treturn \"\"\n\t}\n\n\tswitch meta.MediaType {\n\tcase DockerV2Schema2MediaType, DockerV2ListMediaType,\n\t\timgspecv1.MediaTypeImageManifest, imgspecv1.MediaTypeImageIndex: // A recognized type.\n\t\treturn meta.MediaType\n\t}\n\t// this is the only way the function can return DockerV2Schema1MediaType, and recognizing that is essential for stripping the JWS signatures = computing the correct manifest digest.\n\tswitch meta.SchemaVersion {\n\tcase 1:\n\t\tif meta.Signatures != nil {\n\t\t\treturn DockerV2Schema1SignedMediaType\n\t\t}\n\t\treturn DockerV2Schema1MediaType\n\tcase 2:\n\t\t// Best effort to understand if this is an OCI image since mediaType\n\t\t// wasn't in the manifest for OCI image-spec < 1.0.2.\n\t\t// For docker v2s2 meta.MediaType should have been set. But given the data, this is our best guess.\n\t\tociMan := struct {\n\t\t\tConfig struct {\n\t\t\t\tMediaType string `json:\"mediaType\"`\n\t\t\t} `json:\"config\"`\n\t\t}{}\n\t\tif err := json.Unmarshal(manifest, &ociMan); err != nil {\n\t\t\treturn \"\"\n\t\t}\n\t\tswitch ociMan.Config.MediaType {\n\t\tcase imgspecv1.MediaTypeImageConfig:\n\t\t\treturn imgspecv1.MediaTypeImageManifest\n\t\tcase DockerV2Schema2ConfigMediaType:\n\t\t\t// This case should not happen since a Docker image\n\t\t\t// must declare a top-level media type and\n\t\t\t// `meta.MediaType` has already been checked.\n\t\t\treturn DockerV2Schema2MediaType\n\t\t}\n\t\t// Maybe an image index or an OCI artifact.\n\t\tociIndex := struct {\n\t\t\tManifests []imgspecv1.Descriptor `json:\"manifests\"`\n\t\t}{}\n\t\tif err := json.Unmarshal(manifest, &ociIndex); err != nil {\n\t\t\treturn \"\"\n\t\t}\n\t\tif len(ociIndex.Manifests) != 0 {\n\t\t\tif ociMan.Config.MediaType == \"\" {\n\t\t\t\treturn imgspecv1.MediaTypeImageIndex\n\t\t\t}\n\t\t\t// FIXME: this is mixing media types of manifests and configs.\n\t\t\treturn ociMan.Config.MediaType\n\t\t}\n\t\t// It's most likely an OCI artifact with a custom config media\n\t\t// type which is not (and cannot) be covered by the media-type\n\t\t// checks cabove.\n\t\treturn imgspecv1.MediaTypeImageManifest\n\t}\n\treturn \"\"\n}\n\n// Digest returns the digest of a docker manifest, with any necessary implied transformations like stripping v1s1 signatures.\n// This is publicly visible as c/image/manifest.Digest.\nfunc Digest(manifest []byte) (digest.Digest, error) {\n\treturn DigestWithAlgorithm(manifest, digest.Canonical)\n}\n\n// DigestWithAlgorithm returns the digest of a docker manifest using the specified algorithm,\n// with any necessary implied transformations like stripping v1s1 signatures.\n// This is publicly visible as c/image/manifest.DigestWithAlgorithm.\nfunc DigestWithAlgorithm(manifest []byte, algo digest.Algorithm) (digest.Digest, error) {\n\tif GuessMIMEType(manifest) == DockerV2Schema1SignedMediaType {\n\t\tsig, err := libtrust.ParsePrettySignature(manifest, \"signatures\")\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tmanifest, err = sig.Payload()\n\t\tif err != nil {\n\t\t\t// Coverage: This should never happen, libtrust's Payload() can fail only if joseBase64UrlDecode() fails, on a string\n\t\t\t// that libtrust itself has josebase64UrlEncode()d\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\treturn algo.FromBytes(manifest), nil\n}\n\n// MatchesDigest returns true iff the manifest matches expectedDigest.\n// Error may be set if this returns false.\n// Note that this is not doing ConstantTimeCompare; by the time we get here, the cryptographic signature must already have been verified,\n// or we are not using a cryptographic channel and the attacker can modify the digest along with the manifest blob.\n// This is publicly visible as c/image/manifest.MatchesDigest.\nfunc MatchesDigest(manifest []byte, expectedDigest digest.Digest) (bool, error) {\n\t// This should eventually support various digest types.\n\tactualDigest, err := Digest(manifest)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn expectedDigest == actualDigest, nil\n}\n\n// NormalizedMIMEType returns the effective MIME type of a manifest MIME type returned by a server,\n// centralizing various workarounds.\n// This is publicly visible as c/image/manifest.NormalizedMIMEType.\nfunc NormalizedMIMEType(input string) string {\n\tswitch input {\n\t// \"application/json\" is a valid v2s1 value per https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-1.md .\n\t// This works for now, when nothing else seems to return \"application/json\"; if that were not true, the mapping/detection might\n\t// need to happen within the ImageSource.\n\tcase \"application/json\":\n\t\treturn DockerV2Schema1SignedMediaType\n\tcase DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType,\n\t\timgspecv1.MediaTypeImageManifest,\n\t\timgspecv1.MediaTypeImageIndex,\n\t\tDockerV2Schema2MediaType,\n\t\tDockerV2ListMediaType:\n\t\treturn input\n\tdefault:\n\t\t// If it's not a recognized manifest media type, or we have failed determining the type, we'll try one last time\n\t\t// to deserialize using v2s1 as per https://github.com/docker/distribution/blob/master/manifests.go#L108\n\t\t// and https://github.com/docker/distribution/blob/master/manifest/schema1/manifest.go#L50\n\t\t//\n\t\t// Crane registries can also return \"text/plain\", or pretty much anything else depending on a file extension “recognized” in the tag.\n\t\t// This makes no real sense, but it happens\n\t\t// because requests for manifests are\n\t\t// redirected to a content distribution\n\t\t// network which is configured that way. See https://bugzilla.redhat.com/show_bug.cgi?id=1389442\n\t\treturn DockerV2Schema1SignedMediaType\n\t}\n}\n\n// CompressionAlgorithmIsUniversallySupported returns true if MIMETypeSupportsCompressionAlgorithm(mimeType, algo) returns true for all mimeType values.\nfunc CompressionAlgorithmIsUniversallySupported(algo compressiontypes.Algorithm) bool {\n\t// Compare the discussion about BaseVariantName in MIMETypeSupportsCompressionAlgorithm().\n\tswitch algo.Name() {\n\tcase compressiontypes.GzipAlgorithmName:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// MIMETypeSupportsCompressionAlgorithm returns true if mimeType can represent algo.\nfunc MIMETypeSupportsCompressionAlgorithm(mimeType string, algo compressiontypes.Algorithm) bool {\n\tif CompressionAlgorithmIsUniversallySupported(algo) {\n\t\treturn true\n\t}\n\t// This does not use BaseVariantName: Plausibly a manifest format might support zstd but not have annotation fields.\n\t// The logic might have to be more complex (and more ad-hoc) if more manifest formats, with more capabilities, emerge.\n\tswitch algo.Name() {\n\tcase compressiontypes.ZstdAlgorithmName, compressiontypes.ZstdChunkedAlgorithmName:\n\t\treturn mimeType == imgspecv1.MediaTypeImageManifest\n\tdefault: // Includes Bzip2AlgorithmName and XzAlgorithmName, which are defined names but are not supported anywhere\n\t\treturn false\n\t}\n}\n\n// ReuseConditions are an input to CandidateCompressionMatchesReuseConditions;\n// it is a struct to allow longer and better-documented field names.\ntype ReuseConditions struct {\n\tPossibleManifestFormats []string                    // If set, a set of possible manifest formats; at least one should support the reused layer\n\tRequiredCompression     *compressiontypes.Algorithm // If set, only reuse layers with a matching algorithm\n}\n\n// CandidateCompressionMatchesReuseConditions returns true if a layer with candidateCompression\n// (which can be nil to represent uncompressed or unknown) matches reuseConditions.\nfunc CandidateCompressionMatchesReuseConditions(c ReuseConditions, candidateCompression *compressiontypes.Algorithm) bool {\n\tif c.RequiredCompression != nil {\n\t\tif candidateCompression == nil ||\n\t\t\t(c.RequiredCompression.Name() != candidateCompression.Name() && c.RequiredCompression.Name() != candidateCompression.BaseVariantName()) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// For candidateCompression == nil, we can’t tell the difference between “uncompressed” and “unknown”;\n\t// and “uncompressed” is acceptable in all known formats (well, it seems to work in practice for schema1),\n\t// so don’t impose any restrictions if candidateCompression == nil\n\tif c.PossibleManifestFormats != nil && candidateCompression != nil {\n\t\tif !slices.ContainsFunc(c.PossibleManifestFormats, func(mt string) bool {\n\t\t\treturn MIMETypeSupportsCompressionAlgorithm(mt, *candidateCompression)\n\t\t}) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/manifest/oci_index.go",
    "content": "package manifest\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"maps\"\n\t\"math\"\n\t\"runtime\"\n\t\"slices\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspec \"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\tplatform \"go.podman.io/image/v5/internal/pkg/platform\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\t// OCI1InstanceAnnotationCompressionZSTD is an annotation name that can be placed on a manifest descriptor in an OCI index.\n\t// The value of the annotation must be the string \"true\".\n\t// If this annotation is present on a manifest, consuming that image instance requires support for Zstd compression.\n\t// That also suggests that this instance benefits from\n\t// Zstd compression, so it can be preferred by compatible consumers over instances that\n\t// use gzip, depending on their local policy.\n\tOCI1InstanceAnnotationCompressionZSTD      = \"io.github.containers.compression.zstd\"\n\tOCI1InstanceAnnotationCompressionZSTDValue = \"true\"\n)\n\n// OCI1IndexPublic is just an alias for the OCI index type, but one which we can\n// provide methods for.\n// This is publicly visible as c/image/manifest.OCI1Index\n// Internal users should usually use OCI1Index instead.\ntype OCI1IndexPublic struct {\n\timgspecv1.Index\n}\n\n// MIMEType returns the MIME type of this particular manifest index.\nfunc (index *OCI1IndexPublic) MIMEType() string {\n\treturn imgspecv1.MediaTypeImageIndex\n}\n\n// Instances returns a slice of digests of the manifests that this index knows of.\nfunc (index *OCI1IndexPublic) Instances() []digest.Digest {\n\tresults := make([]digest.Digest, len(index.Manifests))\n\tfor i, m := range index.Manifests {\n\t\tresults[i] = m.Digest\n\t}\n\treturn results\n}\n\n// Instance returns the ListUpdate of a particular instance in the index.\nfunc (index *OCI1IndexPublic) Instance(instanceDigest digest.Digest) (ListUpdate, error) {\n\tfor _, manifest := range index.Manifests {\n\t\tif manifest.Digest == instanceDigest {\n\t\t\tret := ListUpdate{\n\t\t\t\tDigest:    manifest.Digest,\n\t\t\t\tSize:      manifest.Size,\n\t\t\t\tMediaType: manifest.MediaType,\n\t\t\t}\n\t\t\tret.ReadOnly.Platform = manifest.Platform\n\t\t\tret.ReadOnly.Annotations = manifest.Annotations\n\t\t\tret.ReadOnly.CompressionAlgorithmNames = annotationsToCompressionAlgorithmNames(manifest.Annotations)\n\t\t\tret.ReadOnly.ArtifactType = manifest.ArtifactType\n\t\t\treturn ret, nil\n\t\t}\n\t}\n\treturn ListUpdate{}, fmt.Errorf(\"unable to find instance %s in OCI1Index\", instanceDigest)\n}\n\n// UpdateInstances updates the sizes, digests, and media types of the manifests\n// which the list catalogs.\nfunc (index *OCI1IndexPublic) UpdateInstances(updates []ListUpdate) error {\n\teditInstances := []ListEdit{}\n\tfor i, instance := range updates {\n\t\teditInstances = append(editInstances, ListEdit{\n\t\t\tUpdateOldDigest: index.Manifests[i].Digest,\n\t\t\tUpdateDigest:    instance.Digest,\n\t\t\tUpdateSize:      instance.Size,\n\t\t\tUpdateMediaType: instance.MediaType,\n\t\t\tListOperation:   ListOpUpdate,\n\t\t})\n\t}\n\treturn index.editInstances(editInstances, false)\n}\n\nfunc annotationsToCompressionAlgorithmNames(annotations map[string]string) []string {\n\tresult := make([]string, 0, 1)\n\tif annotations[OCI1InstanceAnnotationCompressionZSTD] == OCI1InstanceAnnotationCompressionZSTDValue {\n\t\tresult = append(result, compression.ZstdAlgorithmName)\n\t}\n\t// No compression was detected, hence assume instance has default compression `Gzip`\n\tif len(result) == 0 {\n\t\tresult = append(result, compression.GzipAlgorithmName)\n\t}\n\treturn result\n}\n\n// addCompressionAnnotations updates annotationsMap for a manifest, based on compressionAlgorithms known to be used in that instance.\n// If cannotModifyManifest, avoidable updates should be skipped (i.e. this does nothing, because the algorithm annotation is “only” used for prioritization).\nfunc addCompressionAnnotations(compressionAlgorithms []compression.Algorithm, annotationsMap *map[string]string, cannotModifyManifest bool) {\n\tif cannotModifyManifest {\n\t\treturn\n\t}\n\t// TODO: This should also delete the algorithm if map already contains an algorithm and compressionAlgorithm\n\t// list has a different algorithm. To do that, we would need to modify the callers to always provide a reliable\n\t// and full compressionAlghorithms list.\n\tif *annotationsMap == nil && len(compressionAlgorithms) > 0 {\n\t\t*annotationsMap = map[string]string{}\n\t}\n\tfor _, algo := range compressionAlgorithms {\n\t\tswitch algo.BaseVariantName() {\n\t\tcase compression.ZstdAlgorithmName:\n\t\t\t(*annotationsMap)[OCI1InstanceAnnotationCompressionZSTD] = OCI1InstanceAnnotationCompressionZSTDValue\n\t\tdefault:\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\n// editInstances edits information about the list's instances, based on instructions in editInstances.\n// If cannotModifyManifest, avoidable updates should be skipped.\nfunc (index *OCI1IndexPublic) editInstances(editInstances []ListEdit, cannotModifyManifest bool) error {\n\taddedEntries := []imgspecv1.Descriptor{}\n\tupdatedAnnotations := false\n\tfor i, editInstance := range editInstances {\n\t\tswitch editInstance.ListOperation {\n\t\tcase ListOpUpdate:\n\t\t\tif err := editInstance.UpdateOldDigest.Validate(); err != nil {\n\t\t\t\treturn fmt.Errorf(\"OCI1Index.EditInstances: Attempting to update %s which is an invalid digest: %w\", editInstance.UpdateOldDigest, err)\n\t\t\t}\n\t\t\tif err := editInstance.UpdateDigest.Validate(); err != nil {\n\t\t\t\treturn fmt.Errorf(\"OCI1Index.EditInstances: Modified digest %s is an invalid digest: %w\", editInstance.UpdateDigest, err)\n\t\t\t}\n\t\t\ttargetIndex := slices.IndexFunc(index.Manifests, func(m imgspecv1.Descriptor) bool {\n\t\t\t\treturn m.Digest == editInstance.UpdateOldDigest\n\t\t\t})\n\t\t\tif targetIndex == -1 {\n\t\t\t\treturn fmt.Errorf(\"OCI1Index.EditInstances: digest %s not found\", editInstance.UpdateOldDigest)\n\t\t\t}\n\t\t\tindex.Manifests[targetIndex].Digest = editInstance.UpdateDigest\n\t\t\tif editInstance.UpdateSize < 0 {\n\t\t\t\treturn fmt.Errorf(\"update %d of %d passed to OCI1Index.UpdateInstances had an invalid size (%d)\", i+1, len(editInstances), editInstance.UpdateSize)\n\t\t\t}\n\t\t\tindex.Manifests[targetIndex].Size = editInstance.UpdateSize\n\t\t\tif editInstance.UpdateMediaType == \"\" {\n\t\t\t\treturn fmt.Errorf(\"update %d of %d passed to OCI1Index.UpdateInstances had no media type (was %q)\", i+1, len(editInstances), index.Manifests[i].MediaType)\n\t\t\t}\n\t\t\tindex.Manifests[targetIndex].MediaType = editInstance.UpdateMediaType\n\t\t\tif editInstance.UpdateAnnotations != nil {\n\t\t\t\tupdatedAnnotations = true\n\t\t\t\tif editInstance.UpdateAffectAnnotations {\n\t\t\t\t\tindex.Manifests[targetIndex].Annotations = maps.Clone(editInstance.UpdateAnnotations)\n\t\t\t\t} else {\n\t\t\t\t\tif index.Manifests[targetIndex].Annotations == nil {\n\t\t\t\t\t\tindex.Manifests[targetIndex].Annotations = map[string]string{}\n\t\t\t\t\t}\n\t\t\t\t\tmaps.Copy(index.Manifests[targetIndex].Annotations, editInstance.UpdateAnnotations)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// FIXME: This does not set updatedAnnotations, so we don’t re-sort images with Zstd instances if some other\n\t\t\t// tool created them without the OCI1InstanceAnnotationCompressionZSTD annotation.\n\t\t\taddCompressionAnnotations(editInstance.UpdateCompressionAlgorithms, &index.Manifests[targetIndex].Annotations, cannotModifyManifest)\n\t\tcase ListOpAdd:\n\t\t\tannotations := map[string]string{}\n\t\t\tif editInstance.AddAnnotations != nil {\n\t\t\t\tannotations = maps.Clone(editInstance.AddAnnotations)\n\t\t\t}\n\t\t\taddCompressionAnnotations(editInstance.AddCompressionAlgorithms, &annotations, false) // We are adding a full new entry, so skipping the annotation would still not allow preserving the original manifest.\n\t\t\taddedEntries = append(addedEntries, imgspecv1.Descriptor{\n\t\t\t\tMediaType:    editInstance.AddMediaType,\n\t\t\t\tArtifactType: editInstance.AddArtifactType,\n\t\t\t\tSize:         editInstance.AddSize,\n\t\t\t\tDigest:       editInstance.AddDigest,\n\t\t\t\tPlatform:     editInstance.AddPlatform,\n\t\t\t\tAnnotations:  annotations,\n\t\t\t})\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"internal error: invalid operation: %d\", editInstance.ListOperation)\n\t\t}\n\t}\n\tif len(addedEntries) != 0 {\n\t\t// slices.Clone() here to ensure the slice uses a private backing array;\n\t\t// an external caller could have manually created OCI1IndexPublic with a slice with extra capacity.\n\t\tindex.Manifests = append(slices.Clone(index.Manifests), addedEntries...)\n\t}\n\tif len(addedEntries) != 0 || updatedAnnotations {\n\t\tslices.SortStableFunc(index.Manifests, func(a, b imgspecv1.Descriptor) int {\n\t\t\t// FIXME? With Go 1.21 and cmp.Compare available, turn instanceIsZstd into an integer score that can be compared, and generalizes\n\t\t\t// into more algorithms?\n\t\t\taZstd := instanceIsZstd(a)\n\t\t\tbZstd := instanceIsZstd(b)\n\t\t\tswitch {\n\t\t\tcase aZstd == bZstd:\n\t\t\t\treturn 0\n\t\t\tcase !aZstd: // Implies bZstd\n\t\t\t\treturn -1\n\t\t\tdefault: // aZstd && !bZstd\n\t\t\t\treturn 1\n\t\t\t}\n\t\t})\n\t}\n\treturn nil\n}\n\n// EditInstances edits information about the list's instances, based on instructions in editInstances.\n// If cannotModifyManifest, avoidable updates should be skipped.\nfunc (index *OCI1Index) EditInstances(editInstances []ListEdit, cannotModifyManifest bool) error {\n\treturn index.editInstances(editInstances, cannotModifyManifest)\n}\n\n// instanceIsZstd returns true if instance is a zstd instance otherwise false.\nfunc instanceIsZstd(manifest imgspecv1.Descriptor) bool {\n\tif value, ok := manifest.Annotations[OCI1InstanceAnnotationCompressionZSTD]; ok && value == \"true\" {\n\t\treturn true\n\t}\n\treturn false\n}\n\ntype instanceCandidate struct {\n\tplatformIndex    int           // Index of the candidate in platform.WantedPlatforms: lower numbers are preferred; or math.maxInt if the candidate doesn’t have a platform\n\tisZstd           bool          // tells if particular instance if zstd instance\n\tmanifestPosition int           // A zero-based index of the instance in the manifest list\n\tdigest           digest.Digest // Instance digest\n}\n\nfunc (ic instanceCandidate) isPreferredOver(other *instanceCandidate, preferGzip types.OptionalBool) bool {\n\tswitch {\n\tcase ic.platformIndex != other.platformIndex:\n\t\treturn ic.platformIndex < other.platformIndex\n\tcase ic.isZstd != other.isZstd:\n\t\tif preferGzip != types.OptionalBoolTrue {\n\t\t\treturn ic.isZstd\n\t\t} else {\n\t\t\treturn !ic.isZstd\n\t\t}\n\tcase ic.manifestPosition != other.manifestPosition:\n\t\treturn ic.manifestPosition < other.manifestPosition\n\t}\n\tpanic(\"internal error: invalid comparison between two candidates\") // This should not be reachable because in all calls we make, the two candidates differ at least in manifestPosition.\n}\n\n// chooseInstance is a private equivalent to ChooseInstanceByCompression,\n// shared by ChooseInstance and ChooseInstanceByCompression.\nfunc (index *OCI1IndexPublic) chooseInstance(ctx *types.SystemContext, preferGzip types.OptionalBool) (digest.Digest, error) {\n\twantedPlatforms := platform.WantedPlatforms(ctx)\n\tvar bestMatch *instanceCandidate\n\tbestMatch = nil\n\tfor manifestIndex, d := range index.Manifests {\n\t\tcandidate := instanceCandidate{platformIndex: math.MaxInt, manifestPosition: manifestIndex, isZstd: instanceIsZstd(d), digest: d.Digest}\n\t\tif d.Platform != nil {\n\t\t\timagePlatform := ociPlatformClone(*d.Platform)\n\t\t\tplatformIndex := slices.IndexFunc(wantedPlatforms, func(wantedPlatform imgspecv1.Platform) bool {\n\t\t\t\treturn platform.MatchesPlatform(imagePlatform, wantedPlatform)\n\t\t\t})\n\t\t\tif platformIndex == -1 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcandidate.platformIndex = platformIndex\n\t\t}\n\t\tif bestMatch == nil || candidate.isPreferredOver(bestMatch, preferGzip) {\n\t\t\tbestMatch = &candidate\n\t\t}\n\t}\n\tif bestMatch != nil {\n\t\treturn bestMatch.digest, nil\n\t}\n\treturn \"\", fmt.Errorf(\"no image found in image index for architecture %q, variant %q, OS %q\", wantedPlatforms[0].Architecture, wantedPlatforms[0].Variant, wantedPlatforms[0].OS)\n}\n\nfunc (index *OCI1Index) ChooseInstanceByCompression(ctx *types.SystemContext, preferGzip types.OptionalBool) (digest.Digest, error) {\n\treturn index.chooseInstance(ctx, preferGzip)\n}\n\n// ChooseInstance parses blob as an oci v1 manifest index, and returns the digest\n// of the image which is appropriate for the current environment.\nfunc (index *OCI1IndexPublic) ChooseInstance(ctx *types.SystemContext) (digest.Digest, error) {\n\treturn index.chooseInstance(ctx, types.OptionalBoolFalse)\n}\n\n// Serialize returns the index in a blob format.\n// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\nfunc (index *OCI1IndexPublic) Serialize() ([]byte, error) {\n\tbuf, err := json.Marshal(index)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"marshaling OCI1Index %#v: %w\", index, err)\n\t}\n\treturn buf, nil\n}\n\n// OCI1IndexPublicFromComponents creates an OCI1 image index instance from the\n// supplied data.\n// This is publicly visible as c/image/manifest.OCI1IndexFromComponents.\nfunc OCI1IndexPublicFromComponents(components []imgspecv1.Descriptor, annotations map[string]string) *OCI1IndexPublic {\n\tindex := OCI1IndexPublic{\n\t\timgspecv1.Index{\n\t\t\tVersioned:   imgspec.Versioned{SchemaVersion: 2},\n\t\t\tMediaType:   imgspecv1.MediaTypeImageIndex,\n\t\t\tManifests:   make([]imgspecv1.Descriptor, len(components)),\n\t\t\tAnnotations: maps.Clone(annotations),\n\t\t},\n\t}\n\tfor i, component := range components {\n\t\tindex.Manifests[i] = oci1DescriptorClone(component)\n\t}\n\treturn &index\n}\n\nfunc oci1DescriptorClone(d imgspecv1.Descriptor) imgspecv1.Descriptor {\n\tvar platform *imgspecv1.Platform\n\tif d.Platform != nil {\n\t\tplatformCopy := ociPlatformClone(*d.Platform)\n\t\tplatform = &platformCopy\n\t}\n\treturn imgspecv1.Descriptor{\n\t\tMediaType:    d.MediaType,\n\t\tDigest:       d.Digest,\n\t\tSize:         d.Size,\n\t\tURLs:         slices.Clone(d.URLs),\n\t\tAnnotations:  maps.Clone(d.Annotations),\n\t\tData:         bytes.Clone(d.Data),\n\t\tPlatform:     platform,\n\t\tArtifactType: d.ArtifactType,\n\t}\n}\n\n// OCI1IndexPublicClone creates a deep copy of the passed-in index.\n// This is publicly visible as c/image/manifest.OCI1IndexClone.\nfunc OCI1IndexPublicClone(index *OCI1IndexPublic) *OCI1IndexPublic {\n\tvar subject *imgspecv1.Descriptor\n\tif index.Subject != nil {\n\t\ts := oci1DescriptorClone(*index.Subject)\n\t\tsubject = &s\n\t}\n\tmanifests := make([]imgspecv1.Descriptor, len(index.Manifests))\n\tfor i, m := range index.Manifests {\n\t\tmanifests[i] = oci1DescriptorClone(m)\n\t}\n\treturn &OCI1IndexPublic{\n\t\tIndex: imgspecv1.Index{\n\t\t\tVersioned:    index.Versioned,\n\t\t\tMediaType:    index.MediaType,\n\t\t\tArtifactType: index.ArtifactType,\n\t\t\tManifests:    manifests,\n\t\t\tSubject:      subject,\n\t\t\tAnnotations:  maps.Clone(index.Annotations),\n\t\t},\n\t}\n}\n\n// ToOCI1Index returns the index encoded as an OCI1 index.\nfunc (index *OCI1IndexPublic) ToOCI1Index() (*OCI1IndexPublic, error) {\n\treturn OCI1IndexPublicClone(index), nil\n}\n\n// ToSchema2List returns the index encoded as a Schema2 list.\nfunc (index *OCI1IndexPublic) ToSchema2List() (*Schema2ListPublic, error) {\n\tcomponents := make([]Schema2ManifestDescriptor, 0, len(index.Manifests))\n\tfor _, manifest := range index.Manifests {\n\t\tplatform := manifest.Platform\n\t\tif platform == nil {\n\t\t\tplatform = &imgspecv1.Platform{\n\t\t\t\tOS:           runtime.GOOS,\n\t\t\t\tArchitecture: runtime.GOARCH,\n\t\t\t}\n\t\t}\n\t\tcomponents = append(components, Schema2ManifestDescriptor{\n\t\t\tSchema2Descriptor{\n\t\t\t\tMediaType: manifest.MediaType,\n\t\t\t\tSize:      manifest.Size,\n\t\t\t\tDigest:    manifest.Digest,\n\t\t\t\tURLs:      slices.Clone(manifest.URLs),\n\t\t\t},\n\t\t\tschema2PlatformSpecFromOCIPlatform(*platform),\n\t\t})\n\t}\n\ts2 := Schema2ListPublicFromComponents(components)\n\treturn s2, nil\n}\n\n// OCI1IndexPublicFromManifest creates an OCI1 manifest index instance from marshalled\n// JSON, presumably generated by encoding a OCI1 manifest index.\n// This is publicly visible as c/image/manifest.OCI1IndexFromManifest.\nfunc OCI1IndexPublicFromManifest(manifest []byte) (*OCI1IndexPublic, error) {\n\tindex := OCI1IndexPublic{\n\t\tIndex: imgspecv1.Index{\n\t\t\tVersioned:   imgspec.Versioned{SchemaVersion: 2},\n\t\t\tMediaType:   imgspecv1.MediaTypeImageIndex,\n\t\t\tManifests:   []imgspecv1.Descriptor{},\n\t\t\tAnnotations: make(map[string]string),\n\t\t},\n\t}\n\tif err := json.Unmarshal(manifest, &index); err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshaling OCI1Index %q: %w\", string(manifest), err)\n\t}\n\tif err := ValidateUnambiguousManifestFormat(manifest, imgspecv1.MediaTypeImageIndex,\n\t\tAllowedFieldManifests); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &index, nil\n}\n\n// Clone returns a deep copy of this list and its contents.\nfunc (index *OCI1IndexPublic) Clone() ListPublic {\n\treturn OCI1IndexPublicClone(index)\n}\n\n// ConvertToMIMEType converts the passed-in image index to a manifest list of\n// the specified type.\nfunc (index *OCI1IndexPublic) ConvertToMIMEType(manifestMIMEType string) (ListPublic, error) {\n\tswitch normalized := NormalizedMIMEType(manifestMIMEType); normalized {\n\tcase DockerV2ListMediaType:\n\t\treturn index.ToSchema2List()\n\tcase imgspecv1.MediaTypeImageIndex:\n\t\treturn index.Clone(), nil\n\tcase DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType, imgspecv1.MediaTypeImageManifest, DockerV2Schema2MediaType:\n\t\treturn nil, fmt.Errorf(\"Can not convert image index to MIME type %q, which is not a list type\", manifestMIMEType)\n\tdefault:\n\t\t// Note that this may not be reachable, NormalizedMIMEType has a default for unknown values.\n\t\treturn nil, fmt.Errorf(\"Unimplemented manifest MIME type %s\", manifestMIMEType)\n\t}\n}\n\ntype OCI1Index struct {\n\tOCI1IndexPublic\n}\n\nfunc oci1IndexFromPublic(public *OCI1IndexPublic) *OCI1Index {\n\treturn &OCI1Index{*public}\n}\n\nfunc (index *OCI1Index) CloneInternal() List {\n\treturn oci1IndexFromPublic(OCI1IndexPublicClone(&index.OCI1IndexPublic))\n}\n\nfunc (index *OCI1Index) Clone() ListPublic {\n\treturn index.CloneInternal()\n}\n\n// OCI1IndexFromManifest creates a OCI1 manifest list instance from marshalled\n// JSON, presumably generated by encoding a OCI1 manifest list.\nfunc OCI1IndexFromManifest(manifest []byte) (*OCI1Index, error) {\n\tpublic, err := OCI1IndexPublicFromManifest(manifest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn oci1IndexFromPublic(public), nil\n}\n\n// ociPlatformClone returns an independent copy of p.\nfunc ociPlatformClone(p imgspecv1.Platform) imgspecv1.Platform {\n\t// The only practical way in Go to give read-only access to an array is to copy it.\n\t// The only practical way in Go to copy a deep structure is to either do it manually field by field,\n\t// or to use reflection (incl. a round-trip through JSON, which uses reflection).\n\t//\n\t// The combination of the two is just sad, and leads to code like this, which will\n\t// need to be updated with every new Platform field.\n\treturn imgspecv1.Platform{\n\t\tArchitecture: p.Architecture,\n\t\tOS:           p.OS,\n\t\tOSVersion:    p.OSVersion,\n\t\tOSFeatures:   slices.Clone(p.OSFeatures),\n\t\tVariant:      p.Variant,\n\t}\n}\n\n// schema2PlatformSpecFromOCIPlatform converts an OCI platform p to the schema2 structure.\nfunc schema2PlatformSpecFromOCIPlatform(p imgspecv1.Platform) Schema2PlatformSpec {\n\treturn Schema2PlatformSpec{\n\t\tArchitecture: p.Architecture,\n\t\tOS:           p.OS,\n\t\tOSVersion:    p.OSVersion,\n\t\tOSFeatures:   slices.Clone(p.OSFeatures),\n\t\tVariant:      p.Variant,\n\t\tFeatures:     nil,\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/multierr/multierr.go",
    "content": "package multierr\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Format creates an error value from the input array (which should not be empty)\n// If the input contains a single error value, it is returned as is.\n// If there are multiple, they are formatted as a multi-error (with Unwrap() []error) with the provided initial, separator, and ending strings.\n//\n// Typical usage:\n//\n//\tvar errs []error\n//\t// …\n//\terrs = append(errs, …)\n//\t// …\n//\tif errs != nil { return multierr.Format(\"Failures doing $FOO\", \"\\n* \", \"\", errs)}\nfunc Format(first, middle, last string, errs []error) error {\n\tswitch len(errs) {\n\tcase 0:\n\t\treturn fmt.Errorf(\"internal error: multierr.Format called with 0 errors\")\n\tcase 1:\n\t\treturn errs[0]\n\tdefault:\n\t\t// We have to do this — and this function only really exists — because fmt.Errorf(format, errs...) is invalid:\n\t\t// []error is not a valid parameter to a function expecting []any\n\t\tanyErrs := make([]any, 0, len(errs))\n\t\tfor _, e := range errs {\n\t\t\tanyErrs = append(anyErrs, e)\n\t\t}\n\t\treturn fmt.Errorf(first+\"%w\"+strings.Repeat(middle+\"%w\", len(errs)-1)+last, anyErrs...)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/pkg/platform/platform_matcher.go",
    "content": "package platform\n\n// Largely based on\n// https://github.com/moby/moby/blob/bc846d2e8fe5538220e0c31e9d0e8446f6fbc022/distribution/cpuinfo_unix.go\n// Copyright 2012-2017 Docker, Inc.\n//\n// https://github.com/containerd/containerd/blob/726dcaea50883e51b2ec6db13caff0e7936b711d/platforms/cpuinfo.go\n//    Copyright The containerd Authors.\n//    Licensed under the Apache License, Version 2.0 (the \"License\");\n//    you may not use this file except in compliance with the License.\n//    You may obtain a copy of the License at\n//        https://www.apache.org/licenses/LICENSE-2.0\n//    Unless required by applicable law or agreed to in writing, software\n//    distributed under the License is distributed on an \"AS IS\" BASIS,\n//    WITHOUT WARRANTIES OR CONDITIONS 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 (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strings\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// For Linux, the kernel has already detected the ABI, ISA and Features.\n// So we don't need to access the ARM registers to detect platform information\n// by ourselves. We can just parse these information from /proc/cpuinfo\nfunc getCPUInfo(pattern string) (info string, err error) {\n\tif runtime.GOOS != \"linux\" {\n\t\treturn \"\", fmt.Errorf(\"getCPUInfo for OS %s not implemented\", runtime.GOOS)\n\t}\n\n\tcpuinfo, err := os.Open(\"/proc/cpuinfo\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer cpuinfo.Close()\n\n\t// Start to Parse the Cpuinfo line by line. For SMP SoC, we parse\n\t// the first core is enough.\n\tscanner := bufio.NewScanner(cpuinfo)\n\tfor scanner.Scan() {\n\t\tnewline := scanner.Text()\n\t\tlist := strings.Split(newline, \":\")\n\n\t\tif len(list) > 1 && strings.EqualFold(strings.TrimSpace(list[0]), pattern) {\n\t\t\treturn strings.TrimSpace(list[1]), nil\n\t\t}\n\t}\n\n\t// Check whether the scanner encountered errors\n\terr = scanner.Err()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn \"\", fmt.Errorf(\"getCPUInfo for pattern: %s not found\", pattern)\n}\n\nfunc getCPUVariantDarwinWindows(arch string) string {\n\t// Darwin and Windows only support v7 for ARM32 and v8 for ARM64 and so we can use\n\t// runtime.GOARCH to determine the variants\n\tvar variant string\n\tswitch arch {\n\tcase \"arm64\":\n\t\tvariant = \"v8\"\n\tcase \"arm\":\n\t\tvariant = \"v7\"\n\tdefault:\n\t\tvariant = \"\"\n\t}\n\n\treturn variant\n}\n\nfunc getCPUVariantArm() string {\n\tvariant, err := getCPUInfo(\"Cpu architecture\")\n\tif err != nil {\n\t\tlogrus.Errorf(\"Couldn't get cpu architecture: %v\", err)\n\t\treturn \"\"\n\t}\n\n\tswitch strings.ToLower(variant) {\n\tcase \"8\", \"aarch64\":\n\t\tvariant = \"v8\"\n\tcase \"7m\", \"?(12)\", \"?(13)\", \"?(14)\", \"?(15)\", \"?(16)\", \"?(17)\":\n\t\tvariant = \"v7\"\n\tcase \"7\":\n\t\t// handle RPi Zero variant mismatch due to wrong variant from kernel\n\t\t// https://github.com/containerd/containerd/pull/4530\n\t\t// https://www.raspberrypi.org/forums/viewtopic.php?t=12614\n\t\t// https://github.com/moby/moby/pull/36121#issuecomment-398328286\n\t\tmodel, err := getCPUInfo(\"model name\")\n\t\tif err != nil {\n\t\t\tlogrus.Errorf(\"Couldn't get cpu model name, it may be the corner case where variant is 6: %v\", err)\n\t\t\treturn \"\"\n\t\t}\n\t\t// model name is NOT a value provided by the CPU; it is another outcome of Linux CPU detection,\n\t\t// https://github.com/torvalds/linux/blob/190bf7b14b0cf3df19c059061be032bd8994a597/arch/arm/mm/proc-v6.S#L178C35-L178C35\n\t\t// (matching happens based on value + mask at https://github.com/torvalds/linux/blob/190bf7b14b0cf3df19c059061be032bd8994a597/arch/arm/mm/proc-v6.S#L273-L274 )\n\t\t// ARM CPU ID starts with a “main” ID register https://developer.arm.com/documentation/ddi0406/cb/System-Level-Architecture/System-Control-Registers-in-a-VMSA-implementation/VMSA-System-control-registers-descriptions--in-register-order/MIDR--Main-ID-Register--VMSA?lang=en ,\n\t\t// but the ARMv6/ARMv7 differences are not a single dimension, https://developer.arm.com/documentation/ddi0406/cb/System-Level-Architecture/The-CPUID-Identification-Scheme?lang=en .\n\t\t// The Linux \"cpu architecture\" is determined by a “memory model” feature.\n\t\t//\n\t\t// So, the \"armv6-compatible\" check basically checks for a \"v6 or v7 CPU, but not one found listed as a known v7 one in the .proc.info.init tables of\n\t\t// https://github.com/torvalds/linux/blob/190bf7b14b0cf3df19c059061be032bd8994a597/arch/arm/mm/proc-v7.S .\n\t\tif strings.HasPrefix(strings.ToLower(model), \"armv6-compatible\") {\n\t\t\tlogrus.Debugf(\"Detected corner case, setting cpu variant to v6\")\n\t\t\tvariant = \"v6\"\n\t\t} else {\n\t\t\tvariant = \"v7\"\n\t\t}\n\tcase \"6\", \"6tej\":\n\t\tvariant = \"v6\"\n\tcase \"5\", \"5t\", \"5te\", \"5tej\":\n\t\tvariant = \"v5\"\n\tcase \"4\", \"4t\":\n\t\tvariant = \"v4\"\n\tcase \"3\":\n\t\tvariant = \"v3\"\n\tdefault:\n\t\tvariant = \"\"\n\t}\n\n\treturn variant\n}\n\nfunc getCPUVariant(os string, arch string) string {\n\tif os == \"darwin\" || os == \"windows\" {\n\t\treturn getCPUVariantDarwinWindows(arch)\n\t}\n\tif arch == \"arm\" || arch == \"arm64\" {\n\t\treturn getCPUVariantArm()\n\t}\n\treturn \"\"\n}\n\n// compatibility contains, for a specified architecture, a list of known variants, in the\n// order from most capable (most restrictive) to least capable (most compatible).\n// Architectures that don’t have variants should not have an entry here.\nvar compatibility = map[string][]string{\n\t\"arm\":   {\"v8\", \"v7\", \"v6\", \"v5\"},\n\t\"arm64\": {\"v8\"},\n}\n\n// WantedPlatforms returns all compatible platforms with the platform specifics possibly overridden by user,\n// the most compatible platform is first.\n// If some option (arch, os, variant) is not present, a value from current platform is detected.\nfunc WantedPlatforms(ctx *types.SystemContext) []imgspecv1.Platform {\n\t// Note that this does not use Platform.OSFeatures and Platform.OSVersion at all.\n\t// The fields are not specified by the OCI specification, as of version 1.1, usefully enough\n\t// to be interoperable, anyway.\n\n\twantedArch := runtime.GOARCH\n\twantedVariant := \"\"\n\tif ctx != nil && ctx.ArchitectureChoice != \"\" {\n\t\twantedArch = ctx.ArchitectureChoice\n\t} else {\n\t\t// Only auto-detect the variant if we are using the default architecture.\n\t\t// If the user has specified the ArchitectureChoice, don't autodetect, even if\n\t\t// ctx.ArchitectureChoice == runtime.GOARCH, because we have no idea whether the runtime.GOARCH\n\t\t// value is relevant to the use case, and if we do autodetect a variant,\n\t\t// ctx.VariantChoice can't be used to override it back to \"\".\n\t\twantedVariant = getCPUVariant(runtime.GOOS, runtime.GOARCH)\n\t}\n\tif ctx != nil && ctx.VariantChoice != \"\" {\n\t\twantedVariant = ctx.VariantChoice\n\t}\n\n\twantedOS := runtime.GOOS\n\tif ctx != nil && ctx.OSChoice != \"\" {\n\t\twantedOS = ctx.OSChoice\n\t}\n\n\tvar variants []string = nil\n\tif wantedVariant != \"\" {\n\t\t// If the user requested a specific variant, we'll walk down\n\t\t// the list from most to least compatible.\n\t\tif variantOrder := compatibility[wantedArch]; variantOrder != nil {\n\t\t\tif i := slices.Index(variantOrder, wantedVariant); i != -1 {\n\t\t\t\tvariants = variantOrder[i:]\n\t\t\t}\n\t\t}\n\t\tif variants == nil {\n\t\t\t// user wants a variant which we know nothing about - not even compatibility\n\t\t\tvariants = []string{wantedVariant}\n\t\t}\n\t\t// Make sure to have a candidate with an empty variant as well.\n\t\tvariants = append(variants, \"\")\n\t} else {\n\t\t// Make sure to have a candidate with an empty variant as well.\n\t\tvariants = append(variants, \"\")\n\t\t// If available add the entire compatibility matrix for the specific architecture.\n\t\tif possibleVariants, ok := compatibility[wantedArch]; ok {\n\t\t\tvariants = append(variants, possibleVariants...)\n\t\t}\n\t}\n\n\tres := make([]imgspecv1.Platform, 0, len(variants))\n\tfor _, v := range variants {\n\t\tres = append(res, imgspecv1.Platform{\n\t\t\tOS:           wantedOS,\n\t\t\tArchitecture: wantedArch,\n\t\t\tVariant:      v,\n\t\t})\n\t}\n\treturn res\n}\n\n// MatchesPlatform returns true if a platform descriptor from a multi-arch image matches\n// an item from the return value of WantedPlatforms.\nfunc MatchesPlatform(image imgspecv1.Platform, wanted imgspecv1.Platform) bool {\n\treturn image.Architecture == wanted.Architecture &&\n\t\timage.OS == wanted.OS &&\n\t\timage.Variant == wanted.Variant\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/private/private.go",
    "content": "package private\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// ImageSourceInternalOnly is the part of private.ImageSource that is not\n// a part of types.ImageSource.\ntype ImageSourceInternalOnly interface {\n\t// SupportsGetBlobAt() returns true if GetBlobAt (BlobChunkAccessor) is supported.\n\tSupportsGetBlobAt() bool\n\t// BlobChunkAccessor.GetBlobAt is available only if SupportsGetBlobAt().\n\tBlobChunkAccessor\n\n\t// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n\t// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n\t// (e.g. if the source never returns manifest lists).\n\tGetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error)\n}\n\n// ImageSource is an internal extension to the types.ImageSource interface.\ntype ImageSource interface {\n\ttypes.ImageSource\n\tImageSourceInternalOnly\n}\n\n// ImageDestinationInternalOnly is the part of private.ImageDestination that is not\n// a part of types.ImageDestination.\ntype ImageDestinationInternalOnly interface {\n\t// SupportsPutBlobPartial returns true if PutBlobPartial is supported.\n\tSupportsPutBlobPartial() bool\n\t// FIXME: Add SupportsSignaturesWithFormat or something like that, to allow early failures\n\t// on unsupported formats.\n\n\t// NoteOriginalOCIConfig provides the config of the image, as it exists on the source, BUT converted to OCI format,\n\t// or an error obtaining that value (e.g. if the image is an artifact and not a container image).\n\t// The destination can use it in its TryReusingBlob/PutBlob implementations\n\t// (otherwise it only obtains the final config after all layers are written).\n\tNoteOriginalOCIConfig(ociConfig *imgspecv1.Image, configErr error) error\n\n\t// PutBlobWithOptions writes contents of stream and returns data representing the result.\n\t// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n\t// inputInfo.Size is the expected length of stream, if known.\n\t// inputInfo.MediaType describes the blob format, if known.\n\t// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n\t// to any other readers for download using the supplied digest.\n\t// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\n\tPutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options PutBlobOptions) (UploadedBlob, error)\n\n\t// PutBlobPartial attempts to create a blob using the data that is already present\n\t// at the destination. chunkAccessor is accessed in a non-sequential way to retrieve the missing chunks.\n\t// It is available only if SupportsPutBlobPartial().\n\t// Even if SupportsPutBlobPartial() returns true, the call can fail.\n\t// If the call fails with ErrFallbackToOrdinaryLayerDownload, the caller can fall back to PutBlobWithOptions.\n\t// The fallback _must not_ be done otherwise.\n\tPutBlobPartial(ctx context.Context, chunkAccessor BlobChunkAccessor, srcInfo types.BlobInfo, options PutBlobPartialOptions) (UploadedBlob, error)\n\n\t// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n\t// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n\t// info.Digest must not be empty.\n\t// If the blob has been successfully reused, returns (true, info, nil).\n\t// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\n\tTryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options TryReusingBlobOptions) (bool, ReusedBlob, error)\n\n\t// PutSignaturesWithFormat writes a set of signatures to the destination.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n\t// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n\t// MUST be called after PutManifest (signatures may reference manifest contents).\n\tPutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error\n\n\t// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n\t// WARNING: This does not have any transactional semantics:\n\t// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n\t// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\n\tCommitWithOptions(ctx context.Context, options CommitOptions) error\n}\n\n// ImageDestination is an internal extension to the types.ImageDestination\n// interface.\ntype ImageDestination interface {\n\ttypes.ImageDestination\n\tImageDestinationInternalOnly\n}\n\n// UploadedBlob is information about a blob written to a destination.\n// It is the subset of types.BlobInfo fields the transport is responsible for setting; all fields must be provided.\ntype UploadedBlob struct {\n\tDigest digest.Digest\n\tSize   int64\n}\n\n// PutBlobOptions are used in PutBlobWithOptions.\ntype PutBlobOptions struct {\n\tCache    blobinfocache.BlobInfoCache2 // Cache to optionally update with the uploaded bloblook up blob infos.\n\tIsConfig bool                         // True if the blob is a config\n\n\t// The following fields are new to internal/private.  Users of internal/private MUST fill them in,\n\t// but they also must expect that they will be ignored by types.ImageDestination transports.\n\t// Transports, OTOH, MUST support these fields being zero-valued for types.ImageDestination callers\n\t// if they use internal/imagedestination/impl.Compat;\n\t// in that case, they will all be consistently zero-valued.\n\n\tEmptyLayer bool // True if the blob is an \"empty\"/\"throwaway\" layer, and may not necessarily be physically represented.\n\tLayerIndex *int // If the blob is a layer, a zero-based index of the layer within the image; nil otherwise.\n}\n\n// PutBlobPartialOptions are used in PutBlobPartial.\ntype PutBlobPartialOptions struct {\n\tCache      blobinfocache.BlobInfoCache2 // Cache to use and/or update.\n\tEmptyLayer bool                         // True if the blob is an \"empty\"/\"throwaway\" layer, and may not necessarily be physically represented.\n\tLayerIndex int                          // A zero-based index of the layer within the image (PutBlobPartial is only called with layer-like blobs, not configs)\n}\n\n// TryReusingBlobOptions are used in TryReusingBlobWithOptions.\ntype TryReusingBlobOptions struct {\n\tCache blobinfocache.BlobInfoCache2 // Cache to use and/or update.\n\t// If true, it is allowed to use an equivalent of the desired blob;\n\t// in that case the returned info may not match the input.\n\tCanSubstitute bool\n\n\t// The following fields are new to internal/private.  Users of internal/private MUST fill them in,\n\t// but they also must expect that they will be ignored by types.ImageDestination transports.\n\t// Transports, OTOH, MUST support these fields being zero-valued for types.ImageDestination callers\n\t// if they use internal/imagedestination/impl.Compat;\n\t// in that case, they will all be consistently zero-valued.\n\tEmptyLayer              bool                   // True if the blob is an \"empty\"/\"throwaway\" layer, and may not necessarily be physically represented.\n\tLayerIndex              *int                   // If the blob is a layer, a zero-based index of the layer within the image; nil otherwise.\n\tSrcRef                  reference.Named        // A reference to the source image that contains the input blob.\n\tPossibleManifestFormats []string               // A set of possible manifest formats; at least one should support the reused layer blob.\n\tRequiredCompression     *compression.Algorithm // If set, reuse blobs with a matching algorithm as per implementations in internal/imagedestination/impl.helpers.go\n\tOriginalCompression     *compression.Algorithm // May be nil to indicate “uncompressed” or “unknown”.\n\tTOCDigest               digest.Digest          // If specified, the blob can be looked up in the destination also by its TOC digest.\n}\n\n// ReusedBlob is information about a blob reused in a destination.\n// It is the subset of types.BlobInfo fields the transport is responsible for setting.\ntype ReusedBlob struct {\n\tDigest digest.Digest // Must be provided\n\tSize   int64         // Must be provided\n\t// The following compression fields should be set when the reuse substitutes\n\t// a differently-compressed blob.\n\t// They may be set also to change from a base variant to a specific variant of an algorithm.\n\tCompressionOperation types.LayerCompression // Compress/Decompress, matching the reused blob; PreserveOriginal if N/A\n\tCompressionAlgorithm *compression.Algorithm // Algorithm if compressed, nil if decompressed or N/A\n\n\t// Annotations that should be added, for CompressionAlgorithm. Note that they might need to be\n\t// added even if the digest doesn’t change (if we found the annotations in a cache).\n\tCompressionAnnotations map[string]string\n\n\tMatchedByTOCDigest bool // Whether the layer was reused/matched by TOC digest. Used only for UI purposes.\n}\n\n// CommitOptions are used in CommitWithOptions\ntype CommitOptions struct {\n\t// UnparsedToplevel contains data about the top-level manifest of the source (which may be a single-arch image or a manifest list\n\t// if PutManifest was only called for the single-arch image with instanceDigest == nil), primarily to allow lookups by the\n\t// original manifest list digest, if desired.\n\tUnparsedToplevel types.UnparsedImage\n\t// ReportResolvedReference, if set, asks the transport to store a “resolved” (more detailed) reference to the created image\n\t// into the value this option points to.\n\t// What “resolved” means is transport-specific.\n\t// Transports which don’t support reporting resolved references can ignore the field; the generic copy code writes \"nil\" into the value.\n\tReportResolvedReference *types.ImageReference\n\t// Timestamp, if set, will force timestamps of content created in the destination to this value.\n\t// Most transports don't support this.\n\t//\n\t// In oci-archive: destinations, this will set the create/mod/access timestamps in each tar entry\n\t// (but not a timestamp of the created archive file).\n\tTimestamp *time.Time\n}\n\n// ImageSourceChunk is a portion of a blob.\n// This API is experimental and can be changed without bumping the major version number.\ntype ImageSourceChunk struct {\n\t// Offset specifies the starting position of the chunk within the source blob.\n\tOffset uint64\n\n\t// Length specifies the size of the chunk.  If it is set to math.MaxUint64,\n\t// then it refers to all the data from Offset to the end of the blob.\n\tLength uint64\n}\n\n// BlobChunkAccessor allows fetching discontiguous chunks of a blob.\ntype BlobChunkAccessor interface {\n\t// GetBlobAt returns a sequential channel of readers that contain data for the requested\n\t// blob chunks, and a channel that might get a single error value.\n\t// The specified chunks must be not overlapping and sorted by their offset.\n\t// The readers must be fully consumed, in the order they are returned, before blocking\n\t// to read the next chunk.\n\t// If the Length for the last chunk is set to math.MaxUint64, then it\n\t// fully fetches the remaining data from the offset to the end of the blob.\n\tGetBlobAt(ctx context.Context, info types.BlobInfo, chunks []ImageSourceChunk) (chan io.ReadCloser, chan error, error)\n}\n\n// BadPartialRequestError is returned by BlobChunkAccessor.GetBlobAt on an invalid request.\ntype BadPartialRequestError struct {\n\tStatus string\n}\n\nfunc (e BadPartialRequestError) Error() string {\n\treturn e.Status\n}\n\n// UnparsedImage is an internal extension to the types.UnparsedImage interface.\ntype UnparsedImage interface {\n\ttypes.UnparsedImage\n\t// UntrustedSignatures is like ImageSource.GetSignaturesWithFormat, but the result is cached; it is OK to call this however often you need.\n\tUntrustedSignatures(ctx context.Context) ([]signature.Signature, error)\n}\n\n// ErrFallbackToOrdinaryLayerDownload is a custom error type returned by PutBlobPartial.\n// It suggests to the caller that a fallback mechanism can be used instead of a hard failure;\n// otherwise the caller of PutBlobPartial _must not_ fall back to PutBlob.\ntype ErrFallbackToOrdinaryLayerDownload struct {\n\terr error\n}\n\nfunc (c ErrFallbackToOrdinaryLayerDownload) Error() string {\n\treturn c.err.Error()\n}\n\nfunc (c ErrFallbackToOrdinaryLayerDownload) Unwrap() error {\n\treturn c.err\n}\n\nfunc NewErrFallbackToOrdinaryLayerDownload(err error) error {\n\treturn ErrFallbackToOrdinaryLayerDownload{err: err}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/putblobdigest/put_blob_digest.go",
    "content": "package putblobdigest\n\nimport (\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Digester computes a digest of the provided stream, if not known yet.\ntype Digester struct {\n\tknownDigest digest.Digest   // Or \"\"\n\tdigester    digest.Digester // Or nil\n}\n\n// newDigester initiates computation of a digest.Canonical digest of stream,\n// if !validDigest; otherwise it just records knownDigest to be returned later.\n// The caller MUST use the returned stream instead of the original value.\nfunc newDigester(stream io.Reader, knownDigest digest.Digest, validDigest bool) (Digester, io.Reader) {\n\tif validDigest {\n\t\treturn Digester{knownDigest: knownDigest}, stream\n\t} else {\n\t\tres := Digester{\n\t\t\tdigester: digest.Canonical.Digester(),\n\t\t}\n\t\tstream = io.TeeReader(stream, res.digester.Hash())\n\t\treturn res, stream\n\t}\n}\n\n// DigestIfUnknown initiates computation of a digest.Canonical digest of stream,\n// if no digest is supplied in the provided blobInfo; otherwise blobInfo.Digest will\n// be used (accepting any algorithm).\n// The caller MUST use the returned stream instead of the original value.\nfunc DigestIfUnknown(stream io.Reader, blobInfo types.BlobInfo) (Digester, io.Reader) {\n\td := blobInfo.Digest\n\treturn newDigester(stream, d, d != \"\")\n}\n\n// DigestIfCanonicalUnknown initiates computation of a digest.Canonical digest of stream,\n// if a digest.Canonical digest is not supplied in the provided blobInfo;\n// otherwise blobInfo.Digest will be used.\n// The caller MUST use the returned stream instead of the original value.\nfunc DigestIfCanonicalUnknown(stream io.Reader, blobInfo types.BlobInfo) (Digester, io.Reader) {\n\td := blobInfo.Digest\n\treturn newDigester(stream, d, d != \"\" && d.Algorithm() == digest.Canonical)\n}\n\n// Digest() returns a digest value possibly computed by Digester.\n// This must be called only after all of the stream returned by a Digester constructor\n// has been successfully read.\nfunc (d Digester) Digest() digest.Digest {\n\tif d.digester != nil {\n\t\treturn d.digester.Digest()\n\t}\n\treturn d.knownDigest\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/rootless/rootless.go",
    "content": "package rootless\n\nimport (\n\t\"os\"\n\t\"strconv\"\n)\n\n// GetRootlessEUID returns the UID of the current user (in the parent userNS, if any)\n//\n// Podman and similar software, in “rootless” configuration, when run as a non-root\n// user, very early switches to a user namespace, where Geteuid() == 0 (but does not\n// switch to a limited mount namespace); so, code relying on Geteuid() would use\n// system-wide paths in e.g. /var, when the user is actually not privileged to write to\n// them, and expects state to be stored in the home directory.\n//\n// If Podman is setting up such a user namespace, it records the original UID in an\n// environment variable, allowing us to make choices based on the actual user’s identity.\nfunc GetRootlessEUID() int {\n\teuidEnv := os.Getenv(\"_CONTAINERS_ROOTLESS_UID\")\n\tif euidEnv != \"\" {\n\t\teuid, _ := strconv.Atoi(euidEnv)\n\t\treturn euid\n\t}\n\treturn os.Geteuid()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/set/set.go",
    "content": "package set\n\nimport (\n\t\"iter\"\n\t\"maps\"\n)\n\n// FIXME:\n// - Docstrings\n// - This should be in a public library somewhere\n\ntype Set[E comparable] struct {\n\tm map[E]struct{}\n}\n\nfunc New[E comparable]() *Set[E] {\n\treturn &Set[E]{\n\t\tm: map[E]struct{}{},\n\t}\n}\n\nfunc NewWithValues[E comparable](values ...E) *Set[E] {\n\ts := New[E]()\n\tfor _, v := range values {\n\t\ts.Add(v)\n\t}\n\treturn s\n}\n\nfunc (s *Set[E]) Add(v E) {\n\ts.m[v] = struct{}{} // Possibly writing the same struct{}{} presence marker again.\n}\n\nfunc (s *Set[E]) AddSeq(seq iter.Seq[E]) {\n\tfor v := range seq {\n\t\ts.Add(v)\n\t}\n}\n\nfunc (s *Set[E]) Delete(v E) {\n\tdelete(s.m, v)\n}\n\nfunc (s *Set[E]) Contains(v E) bool {\n\t_, ok := s.m[v]\n\treturn ok\n}\n\nfunc (s *Set[E]) Empty() bool {\n\treturn len(s.m) == 0\n}\n\nfunc (s *Set[E]) All() iter.Seq[E] {\n\treturn maps.Keys(s.m)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/signature/signature.go",
    "content": "package signature\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n)\n\n// FIXME FIXME: MIME type? Int? String?\n// An interface with a name, parse methods?\ntype FormatID string\n\nconst (\n\tSimpleSigningFormat FormatID = \"simple-signing\"\n\tSigstoreFormat      FormatID = \"sigstore-json\"\n\t// Update also UnsupportedFormatError below\n)\n\n// Signature is an image signature of some kind.\ntype Signature interface {\n\tFormatID() FormatID\n\t// blobChunk returns a representation of signature as a []byte, suitable for long-term storage.\n\t// Almost everyone should use signature.Blob() instead.\n\tblobChunk() ([]byte, error)\n}\n\n// Blob returns a representation of sig as a []byte, suitable for long-term storage.\nfunc Blob(sig Signature) ([]byte, error) {\n\tchunk, err := sig.blobChunk()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tformat := sig.FormatID()\n\tswitch format {\n\tcase SimpleSigningFormat:\n\t\t// For compatibility with old dir formats:\n\t\treturn chunk, nil\n\tdefault:\n\t\tres := []byte{0} // Start with a zero byte to clearly mark this is a binary format, and disambiguate from random text.\n\t\tres = append(res, []byte(format)...)\n\t\tres = append(res, '\\n')\n\t\tres = append(res, chunk...)\n\t\treturn res, nil\n\t}\n}\n\n// FromBlob returns a signature from parsing a blob created by signature.Blob.\nfunc FromBlob(blob []byte) (Signature, error) {\n\tif len(blob) == 0 {\n\t\treturn nil, errors.New(\"empty signature blob\")\n\t}\n\t// Historically we’ve just been using GPG with no identification; try to auto-detect that.\n\tswitch blob[0] {\n\t// OpenPGP \"compressed data\" wrapping the message\n\tcase 0xA0, 0xA1, 0xA2, 0xA3, // bit 7 = 1; bit 6 = 0 (old packet format); bits 5…2 = 8 (tag: compressed data packet); bits 1…0 = length-type (any)\n\t\t0xC8, // bit 7 = 1; bit 6 = 1 (new packet format); bits 5…0 = 8 (tag: compressed data packet)\n\t\t// OpenPGP “one-pass signature” starting a signature\n\t\t0x90, 0x91, 0x92, 0x3d, // bit 7 = 1; bit 6 = 0 (old packet format); bits 5…2 = 4 (tag: one-pass signature packet); bits 1…0 = length-type (any)\n\t\t0xC4, // bit 7 = 1; bit 6 = 1 (new packet format); bits 5…0 = 4 (tag: one-pass signature packet)\n\t\t// OpenPGP signature packet signing the following data\n\t\t0x88, 0x89, 0x8A, 0x8B, // bit 7 = 1; bit 6 = 0 (old packet format); bits 5…2 = 2 (tag: signature packet); bits 1…0 = length-type (any)\n\t\t0xC2: // bit 7 = 1; bit 6 = 1 (new packet format); bits 5…0 = 2 (tag: signature packet)\n\t\treturn SimpleSigningFromBlob(blob), nil\n\n\t\t// The newer format: binary 0, format name, newline, data\n\tcase 0x00:\n\t\tblob = blob[1:]\n\t\tformatBytes, blobChunk, foundNewline := bytes.Cut(blob, []byte{'\\n'})\n\t\tif !foundNewline {\n\t\t\treturn nil, fmt.Errorf(\"invalid signature format, missing newline\")\n\t\t}\n\t\tfor _, b := range formatBytes {\n\t\t\tif b < 32 || b >= 0x7F {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid signature format, non-ASCII byte %#x\", b)\n\t\t\t}\n\t\t}\n\t\tswitch {\n\t\tcase bytes.Equal(formatBytes, []byte(SimpleSigningFormat)):\n\t\t\treturn SimpleSigningFromBlob(blobChunk), nil\n\t\tcase bytes.Equal(formatBytes, []byte(SigstoreFormat)):\n\t\t\treturn sigstoreFromBlobChunk(blobChunk)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unrecognized signature format %q\", string(formatBytes))\n\t\t}\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unrecognized signature format, starting with binary %#x\", blob[0])\n\t}\n}\n\n// UnsupportedFormatError returns an error complaining about sig having an unsupported format.\nfunc UnsupportedFormatError(sig Signature) error {\n\tformatID := sig.FormatID()\n\tswitch formatID {\n\tcase SimpleSigningFormat, SigstoreFormat:\n\t\treturn fmt.Errorf(\"unsupported signature format %s\", string(formatID))\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported, and unrecognized, signature format %q\", string(formatID))\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/signature/sigstore.go",
    "content": "package signature\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"maps\"\n)\n\nconst (\n\t// from sigstore/cosign/pkg/types.SimpleSigningMediaType\n\tSigstoreSignatureMIMEType = \"application/vnd.dev.cosign.simplesigning.v1+json\"\n\t// from sigstore/cosign/pkg/oci/static.SignatureAnnotationKey\n\tSigstoreSignatureAnnotationKey = \"dev.cosignproject.cosign/signature\"\n\t// from sigstore/cosign/pkg/oci/static.BundleAnnotationKey\n\tSigstoreSETAnnotationKey = \"dev.sigstore.cosign/bundle\"\n\t// from sigstore/cosign/pkg/oci/static.CertificateAnnotationKey\n\tSigstoreCertificateAnnotationKey = \"dev.sigstore.cosign/certificate\"\n\t// from sigstore/cosign/pkg/oci/static.ChainAnnotationKey\n\tSigstoreIntermediateCertificateChainAnnotationKey = \"dev.sigstore.cosign/chain\"\n)\n\n// Sigstore is a github.com/cosign/cosign signature.\n// For the persistent-storage format used for blobChunk(), we want\n// a degree of forward compatibility against unexpected field changes\n// (as has happened before), which is why this data type\n// contains just a payload + annotations (including annotations\n// that we don’t recognize or support), instead of individual fields\n// for the known annotations.\ntype Sigstore struct {\n\tuntrustedMIMEType    string\n\tuntrustedPayload     []byte\n\tuntrustedAnnotations map[string]string\n}\n\n// sigstoreJSONRepresentation needs the files to be public, which we don’t want for\n// the main Sigstore type.\ntype sigstoreJSONRepresentation struct {\n\tUntrustedMIMEType    string            `json:\"mimeType\"`\n\tUntrustedPayload     []byte            `json:\"payload\"`\n\tUntrustedAnnotations map[string]string `json:\"annotations\"`\n}\n\n// SigstoreFromComponents returns a Sigstore object from its components.\nfunc SigstoreFromComponents(untrustedMimeType string, untrustedPayload []byte, untrustedAnnotations map[string]string) Sigstore {\n\treturn Sigstore{\n\t\tuntrustedMIMEType:    untrustedMimeType,\n\t\tuntrustedPayload:     bytes.Clone(untrustedPayload),\n\t\tuntrustedAnnotations: maps.Clone(untrustedAnnotations),\n\t}\n}\n\n// sigstoreFromBlobChunk converts a Sigstore signature, as returned by Sigstore.blobChunk, into a Sigstore object.\nfunc sigstoreFromBlobChunk(blobChunk []byte) (Sigstore, error) {\n\tvar v sigstoreJSONRepresentation\n\tif err := json.Unmarshal(blobChunk, &v); err != nil {\n\t\treturn Sigstore{}, err\n\t}\n\treturn SigstoreFromComponents(v.UntrustedMIMEType,\n\t\tv.UntrustedPayload,\n\t\tv.UntrustedAnnotations), nil\n}\n\nfunc (s Sigstore) FormatID() FormatID {\n\treturn SigstoreFormat\n}\n\n// blobChunk returns a representation of signature as a []byte, suitable for long-term storage.\n// Almost everyone should use signature.Blob() instead.\nfunc (s Sigstore) blobChunk() ([]byte, error) {\n\treturn json.Marshal(sigstoreJSONRepresentation{\n\t\tUntrustedMIMEType:    s.UntrustedMIMEType(),\n\t\tUntrustedPayload:     s.UntrustedPayload(),\n\t\tUntrustedAnnotations: s.UntrustedAnnotations(),\n\t})\n}\n\nfunc (s Sigstore) UntrustedMIMEType() string {\n\treturn s.untrustedMIMEType\n}\n\nfunc (s Sigstore) UntrustedPayload() []byte {\n\treturn bytes.Clone(s.untrustedPayload)\n}\n\nfunc (s Sigstore) UntrustedAnnotations() map[string]string {\n\treturn maps.Clone(s.untrustedAnnotations)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/signature/simple.go",
    "content": "package signature\n\nimport \"bytes\"\n\n// SimpleSigning is a “simple signing” signature.\ntype SimpleSigning struct {\n\tuntrustedSignature []byte\n}\n\n// SimpleSigningFromBlob converts a “simple signing” signature into a SimpleSigning object.\nfunc SimpleSigningFromBlob(blobChunk []byte) SimpleSigning {\n\treturn SimpleSigning{\n\t\tuntrustedSignature: bytes.Clone(blobChunk),\n\t}\n}\n\nfunc (s SimpleSigning) FormatID() FormatID {\n\treturn SimpleSigningFormat\n}\n\n// blobChunk returns a representation of signature as a []byte, suitable for long-term storage.\n// Almost everyone should use signature.Blob() instead.\nfunc (s SimpleSigning) blobChunk() ([]byte, error) {\n\treturn bytes.Clone(s.untrustedSignature), nil\n}\n\nfunc (s SimpleSigning) UntrustedSignature() []byte {\n\treturn bytes.Clone(s.untrustedSignature)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/signer/signer.go",
    "content": "package signer\n\nimport (\n\t\"context\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/signature\"\n)\n\n// Signer is an object, possibly carrying state, that can be used by copy.Image to sign one or more container images.\n// This type is visible to external callers, so it has no public fields or methods apart from Close().\n//\n// The owner of a Signer must call Close() when done.\ntype Signer struct {\n\timplementation SignerImplementation\n}\n\n// NewSigner creates a public Signer from a SignerImplementation\nfunc NewSigner(impl SignerImplementation) *Signer {\n\treturn &Signer{implementation: impl}\n}\n\nfunc (s *Signer) Close() error {\n\treturn s.implementation.Close()\n}\n\n// ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature.\n// Alternatively, should SignImageManifest be provided a logging writer of some kind?\nfunc ProgressMessage(signer *Signer) string {\n\treturn signer.implementation.ProgressMessage()\n}\n\n// SignImageManifest invokes a SignerImplementation.\n// This is a function, not a method, so that it can only be called by code that is allowed to import this internal subpackage.\nfunc SignImageManifest(ctx context.Context, signer *Signer, manifest []byte, dockerReference reference.Named) (signature.Signature, error) {\n\treturn signer.implementation.SignImageManifest(ctx, manifest, dockerReference)\n}\n\n// SignerImplementation is an object, possibly carrying state, that can be used by copy.Image to sign one or more container images.\n// This interface is distinct from Signer so that implementations can be created outside of this package.\ntype SignerImplementation interface {\n\t// ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature.\n\tProgressMessage() string\n\t// SignImageManifest creates a new signature for manifest m as dockerReference.\n\tSignImageManifest(ctx context.Context, m []byte, dockerReference reference.Named) (signature.Signature, error)\n\tClose() error\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/streamdigest/stream_digest.go",
    "content": "package streamdigest\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"go.podman.io/image/v5/internal/putblobdigest\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// ComputeBlobInfo streams a blob to a temporary file and populates Digest and Size in inputInfo.\n// The temporary file is returned as an io.Reader along with a cleanup function.\n// It is the caller's responsibility to call the cleanup function, which closes and removes the temporary file.\n// If an error occurs, inputInfo is not modified.\nfunc ComputeBlobInfo(sys *types.SystemContext, stream io.Reader, inputInfo *types.BlobInfo) (io.Reader, func(), error) {\n\tdiskBlob, err := tmpdir.CreateBigFileTemp(sys, \"stream-blob\")\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"creating temporary on-disk layer: %w\", err)\n\t}\n\tcleanup := func() {\n\t\tdiskBlob.Close()\n\t\tos.Remove(diskBlob.Name())\n\t}\n\tdigester, stream := putblobdigest.DigestIfCanonicalUnknown(stream, *inputInfo)\n\twritten, err := io.Copy(diskBlob, stream)\n\tif err != nil {\n\t\tcleanup()\n\t\treturn nil, nil, fmt.Errorf(\"writing to temporary on-disk layer: %w\", err)\n\t}\n\t_, err = diskBlob.Seek(0, io.SeekStart)\n\tif err != nil {\n\t\tcleanup()\n\t\treturn nil, nil, fmt.Errorf(\"rewinding temporary on-disk layer: %w\", err)\n\t}\n\tinputInfo.Digest = digester.Digest()\n\tinputInfo.Size = written\n\treturn diskBlob, cleanup, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/tmpdir/tmpdir.go",
    "content": "package tmpdir\n\nimport (\n\t\"os\"\n\t\"runtime\"\n\n\t\"go.podman.io/image/v5/types\"\n)\n\n// unixTempDirForBigFiles is the directory path to store big files on non Windows systems.\n// You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/internal/tmpdir.unixTempDirForBigFiles=$your_path'\nvar unixTempDirForBigFiles = builtinUnixTempDirForBigFiles\n\n// builtinUnixTempDirForBigFiles is the directory path to store big files.\n// Do not use the system default of os.TempDir(), usually /tmp, because with systemd it could be a tmpfs.\n// DO NOT change this, instead see unixTempDirForBigFiles above.\nconst builtinUnixTempDirForBigFiles = \"/var/tmp\"\n\nconst prefix = \"container_images_\"\n\n// TemporaryDirectoryForBigFiles returns a directory for temporary (big) files.\n// On non Windows systems it avoids the use of os.TempDir(), because the default temporary directory usually falls under /tmp\n// which on systemd based systems could be the unsuitable tmpfs filesystem.\nfunc temporaryDirectoryForBigFiles(sys *types.SystemContext) string {\n\tif sys != nil && sys.BigFilesTemporaryDir != \"\" {\n\t\treturn sys.BigFilesTemporaryDir\n\t}\n\tvar temporaryDirectoryForBigFiles string\n\tif runtime.GOOS == \"windows\" {\n\t\ttemporaryDirectoryForBigFiles = os.TempDir()\n\t} else {\n\t\ttemporaryDirectoryForBigFiles = unixTempDirForBigFiles\n\t}\n\treturn temporaryDirectoryForBigFiles\n}\n\nfunc CreateBigFileTemp(sys *types.SystemContext, name string) (*os.File, error) {\n\treturn os.CreateTemp(temporaryDirectoryForBigFiles(sys), prefix+name)\n}\n\nfunc MkDirBigFileTemp(sys *types.SystemContext, name string) (string, error) {\n\treturn os.MkdirTemp(temporaryDirectoryForBigFiles(sys), prefix+name)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/unparsedimage/wrapper.go",
    "content": "package unparsedimage\n\nimport (\n\t\"context\"\n\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// wrapped provides the private.UnparsedImage operations\n// for an object that only implements types.UnparsedImage\ntype wrapped struct {\n\ttypes.UnparsedImage\n}\n\n// FromPublic(unparsed) returns an object that provides the private.UnparsedImage API\nfunc FromPublic(unparsed types.UnparsedImage) private.UnparsedImage {\n\tif unparsed2, ok := unparsed.(private.UnparsedImage); ok {\n\t\treturn unparsed2\n\t}\n\treturn &wrapped{\n\t\tUnparsedImage: unparsed,\n\t}\n}\n\n// UntrustedSignatures is like ImageSource.GetSignaturesWithFormat, but the result is cached; it is OK to call this however often you need.\nfunc (w *wrapped) UntrustedSignatures(ctx context.Context) ([]signature.Signature, error) {\n\tsigs, err := w.Signatures(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres := []signature.Signature{}\n\tfor _, sig := range sigs {\n\t\tres = append(res, signature.SimpleSigningFromBlob(sig))\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/uploadreader/upload_reader.go",
    "content": "package uploadreader\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\n// UploadReader is a pass-through reader for use in sending non-trivial data using the net/http\n// package (http.NewRequest, http.Post and the like).\n//\n// The net/http package uses a separate goroutine to upload data to a HTTP connection,\n// and it is possible for the server to return a response (typically an error) before consuming\n// the full body of the request. In that case http.Client.Do can return with an error while\n// the body is still being read — regardless of the cancellation, if any, of http.Request.Context().\n//\n// As a result, any data used/updated by the io.Reader() provided as the request body may be\n// used/updated even after http.Client.Do returns, causing races.\n//\n// To fix this, UploadReader provides a synchronized Terminate() method, which can block for\n// a not-completely-negligible time (for a duration of the underlying Read()), but guarantees that\n// after Terminate() returns, the underlying reader is never used any more (unlike calling\n// the cancellation callback of context.WithCancel, which returns before any recipients may have\n// reacted to the cancellation).\ntype UploadReader struct {\n\tmutex sync.Mutex\n\t// The following members can only be used with mutex held\n\treader           io.Reader\n\tterminationError error // nil if not terminated yet\n}\n\n// NewUploadReader returns an UploadReader for an \"underlying\" reader.\nfunc NewUploadReader(underlying io.Reader) *UploadReader {\n\treturn &UploadReader{\n\t\treader:           underlying,\n\t\tterminationError: nil,\n\t}\n}\n\n// Read returns the error set by Terminate, if any, or calls the underlying reader.\n// It is safe to call this from a different goroutine than Terminate.\nfunc (ur *UploadReader) Read(p []byte) (int, error) {\n\tur.mutex.Lock()\n\tdefer ur.mutex.Unlock()\n\n\tif ur.terminationError != nil {\n\t\treturn 0, ur.terminationError\n\t}\n\treturn ur.reader.Read(p)\n}\n\n// Terminate waits for in-progress Read calls, if any, to finish, and ensures that after\n// this function returns, any Read calls will fail with the provided error, and the underlying\n// reader will never be used any more.\n//\n// It is safe to call this from a different goroutine than Read.\nfunc (ur *UploadReader) Terminate(err error) {\n\tur.mutex.Lock() // May block for some time if ur.reader.Read() is in progress\n\tdefer ur.mutex.Unlock()\n\n\tur.terminationError = err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/internal/useragent/useragent.go",
    "content": "package useragent\n\nimport \"go.podman.io/image/v5/version\"\n\n// DefaultUserAgent is a value that should be used by User-Agent headers, unless the user specifically instructs us otherwise.\nvar DefaultUserAgent = \"containers/\" + version.Version + \" (github.com/containers/image)\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/common.go",
    "content": "package manifest\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/sirupsen/logrus\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// layerInfosToStrings converts a list of layer infos, presumably obtained from a Manifest.LayerInfos()\n// method call, into a format suitable for inclusion in a types.ImageInspectInfo structure.\nfunc layerInfosToStrings(infos []LayerInfo) []string {\n\tlayers := make([]string, len(infos))\n\tfor i, info := range infos {\n\t\tlayers[i] = info.Digest.String()\n\t}\n\treturn layers\n}\n\n// compressionMIMETypeSet describes a set of MIME type “variants” that represent differently-compressed\n// versions of “the same kind of content”.\n// The map key is the return value of compressiontypes.Algorithm.Name(), or mtsUncompressed;\n// the map value is a MIME type, or mtsUnsupportedMIMEType to mean \"recognized but unsupported\".\ntype compressionMIMETypeSet map[string]string\n\nconst (\n\tmtsUncompressed        = \"\" // A key in compressionMIMETypeSet for the uncompressed variant\n\tmtsUnsupportedMIMEType = \"\" // A value in compressionMIMETypeSet that means “recognized but unsupported”\n)\n\n// findCompressionMIMETypeSet returns a pointer to a compressionMIMETypeSet in variantTable that contains a value of mimeType, or nil if not found\nfunc findCompressionMIMETypeSet(variantTable []compressionMIMETypeSet, mimeType string) compressionMIMETypeSet {\n\tfor _, variants := range variantTable {\n\t\tfor _, mt := range variants {\n\t\t\tif mt == mimeType {\n\t\t\t\treturn variants\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// compressionVariantMIMEType returns a variant of mimeType for the specified algorithm (which may be nil\n// to mean \"no compression\"), based on variantTable.\n// The returned error will be a ManifestLayerCompressionIncompatibilityError if mimeType has variants\n// that differ only in what type of compression is applied, but it can't be combined with this\n// algorithm to produce an updated MIME type that complies with the standard that defines mimeType.\n// If the compression algorithm is unrecognized, or mimeType is not known to have variants that\n// differ from it only in what type of compression has been applied, the returned error will not be\n// a ManifestLayerCompressionIncompatibilityError.\nfunc compressionVariantMIMEType(variantTable []compressionMIMETypeSet, mimeType string, algorithm *compressiontypes.Algorithm) (string, error) {\n\tif mimeType == mtsUnsupportedMIMEType { // Prevent matching against the {algo:mtsUnsupportedMIMEType} entries\n\t\treturn \"\", fmt.Errorf(\"cannot update unknown MIME type\")\n\t}\n\tvariants := findCompressionMIMETypeSet(variantTable, mimeType)\n\tif variants != nil {\n\t\tname := mtsUncompressed\n\t\tif algorithm != nil {\n\t\t\tname = algorithm.BaseVariantName()\n\t\t}\n\t\tif res, ok := variants[name]; ok {\n\t\t\tif res != mtsUnsupportedMIMEType {\n\t\t\t\treturn res, nil\n\t\t\t}\n\t\t\tif name != mtsUncompressed {\n\t\t\t\treturn \"\", ManifestLayerCompressionIncompatibilityError{fmt.Sprintf(\"%s compression is not supported for type %q\", name, mimeType)}\n\t\t\t}\n\t\t\treturn \"\", ManifestLayerCompressionIncompatibilityError{fmt.Sprintf(\"uncompressed variant is not supported for type %q\", mimeType)}\n\t\t}\n\t\tif name != mtsUncompressed {\n\t\t\treturn \"\", ManifestLayerCompressionIncompatibilityError{fmt.Sprintf(\"unknown compressed with algorithm %s variant for type %q\", name, mimeType)}\n\t\t}\n\t\t// We can't very well say “the idea of no compression is unknown”\n\t\treturn \"\", ManifestLayerCompressionIncompatibilityError{fmt.Sprintf(\"uncompressed variant is not supported for type %q\", mimeType)}\n\t}\n\tif algorithm != nil {\n\t\treturn \"\", fmt.Errorf(\"unsupported MIME type for compression: %q\", mimeType)\n\t}\n\treturn \"\", fmt.Errorf(\"unsupported MIME type for decompression: %q\", mimeType)\n}\n\n// updatedMIMEType returns the result of applying edits in updated (MediaType, CompressionOperation) to\n// mimeType, based on variantTable.  It may use updated.Digest for error messages.\n// The returned error will be a ManifestLayerCompressionIncompatibilityError if mimeType has variants\n// that differ only in what type of compression is applied, but applying updated.CompressionOperation\n// and updated.CompressionAlgorithm to it won't produce an updated MIME type that complies with the\n// standard that defines mimeType.\nfunc updatedMIMEType(variantTable []compressionMIMETypeSet, mimeType string, updated types.BlobInfo) (string, error) {\n\t// Note that manifests in containers-storage might be reporting the\n\t// wrong media type since the original manifests are stored while layers\n\t// are decompressed in storage.  Hence, we need to consider the case\n\t// that an already {de}compressed layer should be {de}compressed;\n\t// compressionVariantMIMEType does that by not caring whether the original is\n\t// {de}compressed.\n\tswitch updated.CompressionOperation {\n\tcase types.PreserveOriginal:\n\t\t// Force a change to the media type if we're being told to use a particular compressor,\n\t\t// since it might be different from the one associated with the media type.  Otherwise,\n\t\t// try to keep the original media type.\n\t\tif updated.CompressionAlgorithm != nil {\n\t\t\treturn compressionVariantMIMEType(variantTable, mimeType, updated.CompressionAlgorithm)\n\t\t}\n\t\t// Keep the original media type.\n\t\treturn mimeType, nil\n\n\tcase types.Decompress:\n\t\treturn compressionVariantMIMEType(variantTable, mimeType, nil)\n\n\tcase types.Compress:\n\t\tif updated.CompressionAlgorithm == nil {\n\t\t\tlogrus.Debugf(\"Error preparing updated manifest: blob %q was compressed but does not specify by which algorithm: falling back to use the original blob\", updated.Digest)\n\t\t\treturn mimeType, nil\n\t\t}\n\t\treturn compressionVariantMIMEType(variantTable, mimeType, updated.CompressionAlgorithm)\n\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unknown compression operation (%d)\", updated.CompressionOperation)\n\t}\n}\n\n// ManifestLayerCompressionIncompatibilityError indicates that a specified compression algorithm\n// could not be applied to a layer MIME type.  A caller that receives this should either retry\n// the call with a different compression algorithm, or attempt to use a different manifest type.\ntype ManifestLayerCompressionIncompatibilityError struct {\n\ttext string\n}\n\nfunc (m ManifestLayerCompressionIncompatibilityError) Error() string {\n\treturn m.text\n}\n\n// compressionVariantsRecognizeMIMEType returns true if variantTable contains data about compressing/decompressing layers with mimeType\n// Note that the caller still needs to worry about a specific algorithm not being supported.\nfunc compressionVariantsRecognizeMIMEType(variantTable []compressionMIMETypeSet, mimeType string) bool {\n\tif mimeType == mtsUnsupportedMIMEType { // Prevent matching against the {algo:mtsUnsupportedMIMEType} entries\n\t\treturn false\n\t}\n\tvariants := findCompressionMIMETypeSet(variantTable, mimeType)\n\treturn variants != nil // Alternatively, this could be len(variants) > 1, but really the caller should ask about a specific algorithm.\n}\n\n// imgInspectLayersFromLayerInfos converts a list of layer infos, presumably obtained from a Manifest.LayerInfos()\n// method call, into a format suitable for inclusion in a types.ImageInspectInfo structure.\nfunc imgInspectLayersFromLayerInfos(infos []LayerInfo) []types.ImageInspectLayer {\n\tlayers := make([]types.ImageInspectLayer, len(infos))\n\tfor i, info := range infos {\n\t\tlayers[i].MIMEType = info.MediaType\n\t\tlayers[i].Digest = info.Digest\n\t\tlayers[i].Size = info.Size\n\t\tlayers[i].Annotations = info.Annotations\n\t}\n\treturn layers\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/docker_schema1.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/moby/moby/client/pkg/versions\"\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/set\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// Schema1FSLayers is an entry of the \"fsLayers\" array in docker/distribution schema 1.\ntype Schema1FSLayers struct {\n\tBlobSum digest.Digest `json:\"blobSum\"`\n}\n\n// Schema1History is an entry of the \"history\" array in docker/distribution schema 1.\ntype Schema1History struct {\n\tV1Compatibility string `json:\"v1Compatibility\"`\n}\n\n// Schema1 is a manifest in docker/distribution schema 1.\ntype Schema1 struct {\n\tName                     string                   `json:\"name\"`\n\tTag                      string                   `json:\"tag\"`\n\tArchitecture             string                   `json:\"architecture\"`\n\tFSLayers                 []Schema1FSLayers        `json:\"fsLayers\"`\n\tHistory                  []Schema1History         `json:\"history\"` // Keep this in sync with ExtractedV1Compatibility!\n\tExtractedV1Compatibility []Schema1V1Compatibility `json:\"-\"`       // Keep this in sync with History! Does not contain the full config (Schema2V1Image)\n\tSchemaVersion            int                      `json:\"schemaVersion\"`\n}\n\ntype schema1V1CompatibilityContainerConfig struct {\n\tCmd []string\n}\n\n// Schema1V1Compatibility is a v1Compatibility in docker/distribution schema 1.\ntype Schema1V1Compatibility struct {\n\tID              string                                `json:\"id\"`\n\tParent          string                                `json:\"parent,omitempty\"`\n\tComment         string                                `json:\"comment,omitempty\"`\n\tCreated         time.Time                             `json:\"created\"`\n\tContainerConfig schema1V1CompatibilityContainerConfig `json:\"container_config\"`\n\tAuthor          string                                `json:\"author,omitempty\"`\n\tThrowAway       bool                                  `json:\"throwaway,omitempty\"`\n}\n\n// Schema1FromManifest creates a Schema1 manifest instance from a manifest blob.\n// (NOTE: The instance is not necessary a literal representation of the original blob,\n// layers with duplicate IDs are eliminated.)\nfunc Schema1FromManifest(manifestBlob []byte) (*Schema1, error) {\n\ts1 := Schema1{}\n\tif err := json.Unmarshal(manifestBlob, &s1); err != nil {\n\t\treturn nil, err\n\t}\n\tif s1.SchemaVersion != 1 {\n\t\treturn nil, fmt.Errorf(\"unsupported schema version %d\", s1.SchemaVersion)\n\t}\n\tif err := manifest.ValidateUnambiguousManifestFormat(manifestBlob, DockerV2Schema1SignedMediaType,\n\t\tmanifest.AllowedFieldFSLayers|manifest.AllowedFieldHistory); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := s1.initialize(); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := s1.fixManifestLayers(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &s1, nil\n}\n\n// Schema1FromComponents creates an Schema1 manifest instance from the supplied data.\nfunc Schema1FromComponents(ref reference.Named, fsLayers []Schema1FSLayers, history []Schema1History, architecture string) (*Schema1, error) {\n\tvar name, tag string\n\tif ref != nil { // Well, what to do if it _is_ nil? Most consumers actually don't use these fields nowadays, so we might as well try not supplying them.\n\t\tname = reference.Path(ref)\n\t\tif tagged, ok := ref.(reference.NamedTagged); ok {\n\t\t\ttag = tagged.Tag()\n\t\t}\n\t}\n\ts1 := Schema1{\n\t\tName:          name,\n\t\tTag:           tag,\n\t\tArchitecture:  architecture,\n\t\tFSLayers:      fsLayers,\n\t\tHistory:       history,\n\t\tSchemaVersion: 1,\n\t}\n\tif err := s1.initialize(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &s1, nil\n}\n\n// Schema1Clone creates a copy of the supplied Schema1 manifest.\nfunc Schema1Clone(src *Schema1) *Schema1 {\n\tcopy := *src\n\treturn &copy\n}\n\n// initialize initializes ExtractedV1Compatibility and verifies invariants, so that the rest of this code can assume a minimally healthy manifest.\nfunc (m *Schema1) initialize() error {\n\tif len(m.FSLayers) != len(m.History) {\n\t\treturn errors.New(\"length of history not equal to number of layers\")\n\t}\n\tif len(m.FSLayers) == 0 {\n\t\treturn errors.New(\"no FSLayers in manifest\")\n\t}\n\tm.ExtractedV1Compatibility = make([]Schema1V1Compatibility, len(m.History))\n\tfor i, h := range m.History {\n\t\tif err := json.Unmarshal([]byte(h.V1Compatibility), &m.ExtractedV1Compatibility[i]); err != nil {\n\t\t\treturn fmt.Errorf(\"parsing v2s1 history entry %d: %w\", i, err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\nfunc (m *Schema1) ConfigInfo() types.BlobInfo {\n\treturn types.BlobInfo{}\n}\n\n// LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *Schema1) LayerInfos() []LayerInfo {\n\tlayers := make([]LayerInfo, 0, len(m.FSLayers))\n\tfor i, layer := range slices.Backward(m.FSLayers) { // NOTE: This includes empty layers (where m.History.V1Compatibility->ThrowAway)\n\t\tlayers = append(layers, LayerInfo{\n\t\t\tBlobInfo:   types.BlobInfo{Digest: layer.BlobSum, Size: -1},\n\t\t\tEmptyLayer: m.ExtractedV1Compatibility[i].ThrowAway,\n\t\t})\n\t}\n\treturn layers\n}\n\nconst fakeSchema1MIMEType = DockerV2Schema2LayerMediaType // Used only in schema1CompressionMIMETypeSets\nvar schema1CompressionMIMETypeSets = []compressionMIMETypeSet{\n\t{\n\t\tmtsUncompressed:                    fakeSchema1MIMEType,\n\t\tcompressiontypes.GzipAlgorithmName: fakeSchema1MIMEType,\n\t\tcompressiontypes.ZstdAlgorithmName: mtsUnsupportedMIMEType,\n\t},\n}\n\n// UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers)\nfunc (m *Schema1) UpdateLayerInfos(layerInfos []types.BlobInfo) error {\n\t// Our LayerInfos includes empty layers (where m.ExtractedV1Compatibility[].ThrowAway), so expect them to be included here as well.\n\tif len(m.FSLayers) != len(layerInfos) {\n\t\treturn fmt.Errorf(\"Error preparing updated manifest: layer count changed from %d to %d\", len(m.FSLayers), len(layerInfos))\n\t}\n\tm.FSLayers = make([]Schema1FSLayers, len(layerInfos))\n\tfor i, info := range layerInfos {\n\t\t// There are no MIME types in schema1, but we do a “conversion” here to reject unsupported compression algorithms,\n\t\t// in a way that is consistent with the other schema implementations.\n\t\tif _, err := updatedMIMEType(schema1CompressionMIMETypeSets, fakeSchema1MIMEType, info); err != nil {\n\t\t\treturn fmt.Errorf(\"preparing updated manifest, layer %q: %w\", info.Digest, err)\n\t\t}\n\t\t// (docker push) sets up m.ExtractedV1Compatibility[].{Id,Parent} based on values of info.Digest,\n\t\t// but (docker pull) ignores them in favor of computing DiffIDs from uncompressed data, except verifying the child->parent links and uniqueness.\n\t\t// So, we don't bother recomputing the IDs in m.History.V1Compatibility.\n\t\tm.FSLayers[(len(layerInfos)-1)-i].BlobSum = info.Digest\n\t\tif info.CryptoOperation != types.PreserveOriginalCrypto {\n\t\t\treturn fmt.Errorf(\"encryption change (for layer %q) is not supported in schema1 manifests\", info.Digest)\n\t\t}\n\t}\n\treturn nil\n}\n\n// Serialize returns the manifest in a blob format.\n// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\nfunc (m *Schema1) Serialize() ([]byte, error) {\n\t// docker/distribution requires a signature even if the incoming data uses the nominally unsigned DockerV2Schema1MediaType.\n\tunsigned, err := json.Marshal(*m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn AddDummyV2S1Signature(unsigned)\n}\n\n// fixManifestLayers, after validating the supplied manifest\n// (to use correctly-formatted IDs, and to not have non-consecutive ID collisions in m.History),\n// modifies manifest to only have one entry for each layer ID in m.History (deleting the older duplicates,\n// both from m.History and m.FSLayers).\n// Note that even after this succeeds, m.FSLayers may contain duplicate entries\n// (for Dockerfile operations which change the configuration but not the filesystem).\nfunc (m *Schema1) fixManifestLayers() error {\n\t// m.initialize() has verified that len(m.FSLayers) == len(m.History)\n\tfor _, compat := range m.ExtractedV1Compatibility {\n\t\tif err := validateV1ID(compat.ID); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif m.ExtractedV1Compatibility[len(m.ExtractedV1Compatibility)-1].Parent != \"\" {\n\t\treturn errors.New(\"Invalid parent ID in the base layer of the image\")\n\t}\n\t// check general duplicates to error instead of a deadlock\n\tidmap := set.New[string]()\n\tvar lastID string\n\tfor _, img := range m.ExtractedV1Compatibility {\n\t\t// skip IDs that appear after each other, we handle those later\n\t\tif img.ID != lastID && idmap.Contains(img.ID) {\n\t\t\treturn fmt.Errorf(\"ID %+v appears multiple times in manifest\", img.ID)\n\t\t}\n\t\tlastID = img.ID\n\t\tidmap.Add(lastID)\n\t}\n\t// backwards loop so that we keep the remaining indexes after removing items\n\tfor i := len(m.ExtractedV1Compatibility) - 2; i >= 0; i-- {\n\t\tif m.ExtractedV1Compatibility[i].ID == m.ExtractedV1Compatibility[i+1].ID { // repeated ID. remove and continue\n\t\t\tm.FSLayers = slices.Delete(m.FSLayers, i, i+1)\n\t\t\tm.History = slices.Delete(m.History, i, i+1)\n\t\t\tm.ExtractedV1Compatibility = slices.Delete(m.ExtractedV1Compatibility, i, i+1)\n\t\t} else if m.ExtractedV1Compatibility[i].Parent != m.ExtractedV1Compatibility[i+1].ID {\n\t\t\treturn fmt.Errorf(\"Invalid parent ID. Expected %v, got %q\", m.ExtractedV1Compatibility[i+1].ID, m.ExtractedV1Compatibility[i].Parent)\n\t\t}\n\t}\n\treturn nil\n}\n\nvar validHex = regexp.Delayed(`^([a-f0-9]{64})$`)\n\nfunc validateV1ID(id string) error {\n\tif ok := validHex.MatchString(id); !ok {\n\t\treturn fmt.Errorf(\"image ID %q is invalid\", id)\n\t}\n\treturn nil\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *Schema1) Inspect(_ func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error) {\n\ts1 := &Schema2V1Image{}\n\tif err := json.Unmarshal([]byte(m.History[0].V1Compatibility), s1); err != nil {\n\t\treturn nil, err\n\t}\n\tlayerInfos := m.LayerInfos()\n\ti := &types.ImageInspectInfo{\n\t\tTag:           m.Tag,\n\t\tCreated:       &s1.Created,\n\t\tDockerVersion: s1.DockerVersion,\n\t\tArchitecture:  s1.Architecture,\n\t\tVariant:       s1.Variant,\n\t\tOs:            s1.OS,\n\t\tLayers:        layerInfosToStrings(layerInfos),\n\t\tLayersData:    imgInspectLayersFromLayerInfos(layerInfos),\n\t\tAuthor:        s1.Author,\n\t}\n\tif s1.Config != nil {\n\t\ti.Labels = s1.Config.Labels\n\t\ti.Env = s1.Config.Env\n\t}\n\treturn i, nil\n}\n\n// ToSchema2Config builds a schema2-style configuration blob using the supplied diffIDs.\nfunc (m *Schema1) ToSchema2Config(diffIDs []digest.Digest) ([]byte, error) {\n\t// Convert the schema 1 compat info into a schema 2 config, constructing some of the fields\n\t// that aren't directly comparable using info from the manifest.\n\tif len(m.History) == 0 {\n\t\treturn nil, errors.New(\"image has no layers\")\n\t}\n\ts1 := Schema2V1Image{}\n\tconfig := []byte(m.History[0].V1Compatibility)\n\terr := json.Unmarshal(config, &s1)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding configuration: %w\", err)\n\t}\n\t// Images created with versions prior to 1.8.3 require us to re-encode the encoded object,\n\t// adding some fields that aren't \"omitempty\".\n\tif s1.DockerVersion != \"\" && versions.LessThan(s1.DockerVersion, \"1.8.3\") {\n\t\tconfig, err = json.Marshal(&s1)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"re-encoding compat image config %#v: %w\", s1, err)\n\t\t}\n\t}\n\t// Build the history.\n\tconvertedHistory := []Schema2History{}\n\tfor _, compat := range slices.Backward(m.ExtractedV1Compatibility) {\n\t\thitem := Schema2History{\n\t\t\tCreated:    compat.Created,\n\t\t\tCreatedBy:  strings.Join(compat.ContainerConfig.Cmd, \" \"),\n\t\t\tAuthor:     compat.Author,\n\t\t\tComment:    compat.Comment,\n\t\t\tEmptyLayer: compat.ThrowAway,\n\t\t}\n\t\tconvertedHistory = append(convertedHistory, hitem)\n\t}\n\t// Build the rootfs information.  We need the decompressed sums that we've been\n\t// calculating to fill in the DiffIDs.  It's expected (but not enforced by us)\n\t// that the number of diffIDs corresponds to the number of non-EmptyLayer\n\t// entries in the history.\n\trootFS := &Schema2RootFS{\n\t\tType:    \"layers\",\n\t\tDiffIDs: diffIDs,\n\t}\n\t// And now for some raw manipulation.\n\traw := make(map[string]*json.RawMessage)\n\terr = json.Unmarshal(config, &raw)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"re-decoding compat image config %#v: %w\", s1, err)\n\t}\n\t// Drop some fields.\n\tdelete(raw, \"id\")\n\tdelete(raw, \"parent\")\n\tdelete(raw, \"parent_id\")\n\tdelete(raw, \"layer_id\")\n\tdelete(raw, \"throwaway\")\n\tdelete(raw, \"Size\")\n\t// Add the history and rootfs information.\n\trootfs, err := json.Marshal(rootFS)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error encoding rootfs information %#v: %w\", rootFS, err)\n\t}\n\trawRootfs := json.RawMessage(rootfs)\n\traw[\"rootfs\"] = &rawRootfs\n\thistory, err := json.Marshal(convertedHistory)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error encoding history information %#v: %w\", convertedHistory, err)\n\t}\n\trawHistory := json.RawMessage(history)\n\traw[\"history\"] = &rawHistory\n\t// Encode the result.\n\tconfig, err = json.Marshal(raw)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error re-encoding compat image config %#v: %w\", s1, err)\n\t}\n\treturn config, nil\n}\n\n// ImageID computes an ID which can uniquely identify this image by its contents.\nfunc (m *Schema1) ImageID(diffIDs []digest.Digest) (string, error) {\n\timage, err := m.ToSchema2Config(diffIDs)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn digest.FromBytes(image).Encoded(), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/docker_schema2.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/pkg/strslice\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// Schema2Descriptor is a “descriptor” in docker/distribution schema 2.\ntype Schema2Descriptor = manifest.Schema2Descriptor\n\n// BlobInfoFromSchema2Descriptor returns a types.BlobInfo based on the input schema 2 descriptor.\nfunc BlobInfoFromSchema2Descriptor(desc Schema2Descriptor) types.BlobInfo {\n\treturn types.BlobInfo{\n\t\tDigest:    desc.Digest,\n\t\tSize:      desc.Size,\n\t\tURLs:      desc.URLs,\n\t\tMediaType: desc.MediaType,\n\t}\n}\n\n// Schema2 is a manifest in docker/distribution schema 2.\ntype Schema2 struct {\n\tSchemaVersion     int                 `json:\"schemaVersion\"`\n\tMediaType         string              `json:\"mediaType\"`\n\tConfigDescriptor  Schema2Descriptor   `json:\"config\"`\n\tLayersDescriptors []Schema2Descriptor `json:\"layers\"`\n}\n\n// Schema2Port is a Port, a string containing port number and protocol in the\n// format \"80/tcp\", from docker/go-connections/nat.\ntype Schema2Port string\n\n// Schema2PortSet is a PortSet, a collection of structs indexed by Port, from\n// docker/go-connections/nat.\ntype Schema2PortSet map[Schema2Port]struct{}\n\n// Schema2HealthConfig is a HealthConfig, which holds configuration settings\n// for the HEALTHCHECK feature, from docker/docker/api/types/container.\ntype Schema2HealthConfig struct {\n\t// Test is the test to perform to check that the container is healthy.\n\t// An empty slice means to inherit the default.\n\t// The options are:\n\t// {} : inherit healthcheck\n\t// {\"NONE\"} : disable healthcheck\n\t// {\"CMD\", args...} : exec arguments directly\n\t// {\"CMD-SHELL\", command} : run command with system's default shell\n\tTest []string `json:\",omitempty\"`\n\n\t// Zero means to inherit. Durations are expressed as integer nanoseconds.\n\tStartPeriod   time.Duration `json:\",omitempty\"` // StartPeriod is the time to wait after starting before running the first check.\n\tStartInterval time.Duration `json:\",omitempty\"` // StartInterval is the time to wait between checks during the start period.\n\tInterval      time.Duration `json:\",omitempty\"` // Interval is the time to wait between checks.\n\tTimeout       time.Duration `json:\",omitempty\"` // Timeout is the time to wait before considering the check to have hung.\n\n\t// Retries is the number of consecutive failures needed to consider a container as unhealthy.\n\t// Zero means inherit.\n\tRetries int `json:\",omitempty\"`\n}\n\n// Schema2Config is a Config in docker/docker/api/types/container.\ntype Schema2Config struct {\n\tHostname        string               // Hostname\n\tDomainname      string               // Domainname\n\tUser            string               // User that will run the command(s) inside the container, also support user:group\n\tAttachStdin     bool                 // Attach the standard input, makes possible user interaction\n\tAttachStdout    bool                 // Attach the standard output\n\tAttachStderr    bool                 // Attach the standard error\n\tExposedPorts    Schema2PortSet       `json:\",omitempty\"` // List of exposed ports\n\tTty             bool                 // Attach standard streams to a tty, including stdin if it is not closed.\n\tOpenStdin       bool                 // Open stdin\n\tStdinOnce       bool                 // If true, close stdin after the 1 attached client disconnects.\n\tEnv             []string             // List of environment variable to set in the container\n\tCmd             strslice.StrSlice    // Command to run when starting the container\n\tHealthcheck     *Schema2HealthConfig `json:\",omitempty\"` // Healthcheck describes how to check the container is healthy\n\tArgsEscaped     bool                 `json:\",omitempty\"` // True if command is already escaped (Windows specific)\n\tImage           string               // Name of the image as it was passed by the operator (e.g. could be symbolic)\n\tVolumes         map[string]struct{}  // List of volumes (mounts) used for the container\n\tWorkingDir      string               // Current directory (PWD) in the command will be launched\n\tEntrypoint      strslice.StrSlice    // Entrypoint to run when starting the container\n\tNetworkDisabled bool                 `json:\",omitempty\"` // Is network disabled\n\tMacAddress      string               `json:\",omitempty\"` // Mac Address of the container\n\tOnBuild         []string             // ONBUILD metadata that were defined on the image Dockerfile\n\tLabels          map[string]string    // List of labels set to this container\n\tStopSignal      string               `json:\",omitempty\"` // Signal to stop a container\n\tStopTimeout     *int                 `json:\",omitempty\"` // Timeout (in seconds) to stop a container\n\tShell           strslice.StrSlice    `json:\",omitempty\"` // Shell for shell-form of RUN, CMD, ENTRYPOINT\n}\n\n// Schema2V1Image is a V1Image in docker/docker/image.\ntype Schema2V1Image struct {\n\t// ID is a unique 64 character identifier of the image\n\tID string `json:\"id,omitempty\"`\n\t// Parent is the ID of the parent image\n\tParent string `json:\"parent,omitempty\"`\n\t// Comment is the commit message that was set when committing the image\n\tComment string `json:\"comment,omitempty\"`\n\t// Created is the timestamp at which the image was created\n\tCreated time.Time `json:\"created\"`\n\t// Container is the id of the container used to commit\n\tContainer string `json:\"container,omitempty\"`\n\t// ContainerConfig is the configuration of the container that is committed into the image\n\tContainerConfig Schema2Config `json:\"container_config\"`\n\t// DockerVersion specifies the version of Docker that was used to build the image\n\tDockerVersion string `json:\"docker_version,omitempty\"`\n\t// Author is the name of the author that was specified when committing the image\n\tAuthor string `json:\"author,omitempty\"`\n\t// Config is the configuration of the container received from the client\n\tConfig *Schema2Config `json:\"config,omitempty\"`\n\t// Architecture is the hardware that the image is built and runs on\n\tArchitecture string `json:\"architecture,omitempty\"`\n\t// Variant is a variant of the CPU that the image is built and runs on\n\tVariant string `json:\"variant,omitempty\"`\n\t// OS is the operating system used to built and run the image\n\tOS string `json:\"os,omitempty\"`\n\t// Size is the total size of the image including all layers it is composed of\n\tSize int64 `json:\",omitempty\"`\n}\n\n// Schema2RootFS is a description of how to build up an image's root filesystem, from docker/docker/image.\ntype Schema2RootFS struct {\n\tType    string          `json:\"type\"`\n\tDiffIDs []digest.Digest `json:\"diff_ids,omitempty\"`\n}\n\n// Schema2History stores build commands that were used to create an image, from docker/docker/image.\ntype Schema2History struct {\n\t// Created is the timestamp at which the image was created\n\tCreated time.Time `json:\"created\"`\n\t// Author is the name of the author that was specified when committing the image\n\tAuthor string `json:\"author,omitempty\"`\n\t// CreatedBy keeps the Dockerfile command used while building the image\n\tCreatedBy string `json:\"created_by,omitempty\"`\n\t// Comment is the commit message that was set when committing the image\n\tComment string `json:\"comment,omitempty\"`\n\t// EmptyLayer is set to true if this history item did not generate a\n\t// layer. Otherwise, the history item is associated with the next\n\t// layer in the RootFS section.\n\tEmptyLayer bool `json:\"empty_layer,omitempty\"`\n}\n\n// Schema2Image is an Image in docker/docker/image.\ntype Schema2Image struct {\n\tSchema2V1Image\n\tParent     digest.Digest    `json:\"parent,omitempty\"`\n\tRootFS     *Schema2RootFS   `json:\"rootfs,omitempty\"`\n\tHistory    []Schema2History `json:\"history,omitempty\"`\n\tOSVersion  string           `json:\"os.version,omitempty\"`\n\tOSFeatures []string         `json:\"os.features,omitempty\"`\n}\n\n// Schema2FromManifest creates a Schema2 manifest instance from a manifest blob.\nfunc Schema2FromManifest(manifestBlob []byte) (*Schema2, error) {\n\ts2 := Schema2{}\n\tif err := json.Unmarshal(manifestBlob, &s2); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := manifest.ValidateUnambiguousManifestFormat(manifestBlob, DockerV2Schema2MediaType,\n\t\tmanifest.AllowedFieldConfig|manifest.AllowedFieldLayers); err != nil {\n\t\treturn nil, err\n\t}\n\t// Check manifest's and layers' media types.\n\tif err := SupportedSchema2MediaType(s2.MediaType); err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, layer := range s2.LayersDescriptors {\n\t\tif err := SupportedSchema2MediaType(layer.MediaType); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn &s2, nil\n}\n\n// Schema2FromComponents creates an Schema2 manifest instance from the supplied data.\nfunc Schema2FromComponents(config Schema2Descriptor, layers []Schema2Descriptor) *Schema2 {\n\treturn &Schema2{\n\t\tSchemaVersion:     2,\n\t\tMediaType:         DockerV2Schema2MediaType,\n\t\tConfigDescriptor:  config,\n\t\tLayersDescriptors: layers,\n\t}\n}\n\n// Schema2Clone creates a copy of the supplied Schema2 manifest.\nfunc Schema2Clone(src *Schema2) *Schema2 {\n\tcopy := *src\n\treturn &copy\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\nfunc (m *Schema2) ConfigInfo() types.BlobInfo {\n\treturn BlobInfoFromSchema2Descriptor(m.ConfigDescriptor)\n}\n\n// LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *Schema2) LayerInfos() []LayerInfo {\n\tblobs := make([]LayerInfo, 0, len(m.LayersDescriptors))\n\tfor _, layer := range m.LayersDescriptors {\n\t\tblobs = append(blobs, LayerInfo{\n\t\t\tBlobInfo:   BlobInfoFromSchema2Descriptor(layer),\n\t\t\tEmptyLayer: false,\n\t\t})\n\t}\n\treturn blobs\n}\n\nvar schema2CompressionMIMETypeSets = []compressionMIMETypeSet{\n\t{\n\t\tmtsUncompressed:                    DockerV2Schema2ForeignLayerMediaType,\n\t\tcompressiontypes.GzipAlgorithmName: DockerV2Schema2ForeignLayerMediaTypeGzip,\n\t\tcompressiontypes.ZstdAlgorithmName: mtsUnsupportedMIMEType,\n\t},\n\t{\n\t\tmtsUncompressed:                    DockerV2SchemaLayerMediaTypeUncompressed,\n\t\tcompressiontypes.GzipAlgorithmName: DockerV2Schema2LayerMediaType,\n\t\tcompressiontypes.ZstdAlgorithmName: mtsUnsupportedMIMEType,\n\t},\n}\n\n// UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers)\n// The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError if any of the layerInfos includes a combination of CompressionOperation and\n// CompressionAlgorithm that would result in anything other than gzip compression.\nfunc (m *Schema2) UpdateLayerInfos(layerInfos []types.BlobInfo) error {\n\tif len(m.LayersDescriptors) != len(layerInfos) {\n\t\treturn fmt.Errorf(\"Error preparing updated manifest: layer count changed from %d to %d\", len(m.LayersDescriptors), len(layerInfos))\n\t}\n\toriginal := m.LayersDescriptors\n\tm.LayersDescriptors = make([]Schema2Descriptor, len(layerInfos))\n\tfor i, info := range layerInfos {\n\t\tmimeType := original[i].MediaType\n\t\t// First make sure we support the media type of the original layer.\n\t\tif err := SupportedSchema2MediaType(mimeType); err != nil {\n\t\t\treturn fmt.Errorf(\"Error preparing updated manifest: unknown media type of original layer %q: %q\", info.Digest, mimeType)\n\t\t}\n\t\tmimeType, err := updatedMIMEType(schema2CompressionMIMETypeSets, mimeType, info)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"preparing updated manifest, layer %q: %w\", info.Digest, err)\n\t\t}\n\t\tm.LayersDescriptors[i].MediaType = mimeType\n\t\tm.LayersDescriptors[i].Digest = info.Digest\n\t\tm.LayersDescriptors[i].Size = info.Size\n\t\tm.LayersDescriptors[i].URLs = info.URLs\n\t\tif info.CryptoOperation != types.PreserveOriginalCrypto {\n\t\t\treturn fmt.Errorf(\"encryption change (for layer %q) is not supported in schema2 manifests\", info.Digest)\n\t\t}\n\t}\n\treturn nil\n}\n\n// Serialize returns the manifest in a blob format.\n// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\nfunc (m *Schema2) Serialize() ([]byte, error) {\n\treturn json.Marshal(*m)\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *Schema2) Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error) {\n\tconfig, err := configGetter(m.ConfigInfo())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts2 := &Schema2Image{}\n\tif err := json.Unmarshal(config, s2); err != nil {\n\t\treturn nil, err\n\t}\n\tlayerInfos := m.LayerInfos()\n\ti := &types.ImageInspectInfo{\n\t\tTag:           \"\",\n\t\tCreated:       &s2.Created,\n\t\tDockerVersion: s2.DockerVersion,\n\t\tArchitecture:  s2.Architecture,\n\t\tVariant:       s2.Variant,\n\t\tOs:            s2.OS,\n\t\tLayers:        layerInfosToStrings(layerInfos),\n\t\tLayersData:    imgInspectLayersFromLayerInfos(layerInfos),\n\t\tAuthor:        s2.Author,\n\t}\n\tif s2.Config != nil {\n\t\ti.Labels = s2.Config.Labels\n\t\ti.Env = s2.Config.Env\n\t}\n\treturn i, nil\n}\n\n// ImageID computes an ID which can uniquely identify this image by its contents.\nfunc (m *Schema2) ImageID([]digest.Digest) (string, error) {\n\tif err := m.ConfigDescriptor.Digest.Validate(); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn m.ConfigDescriptor.Digest.Encoded(), nil\n}\n\n// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n// (and the code can handle that).\n// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n// algorithms depends not on the current format, but possibly on the target of a conversion.\nfunc (m *Schema2) CanChangeLayerCompression(mimeType string) bool {\n\treturn compressionVariantsRecognizeMIMEType(schema2CompressionMIMETypeSets, mimeType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/docker_schema2_list.go",
    "content": "package manifest\n\nimport (\n\t\"go.podman.io/image/v5/internal/manifest\"\n)\n\n// Schema2PlatformSpec describes the platform which a particular manifest is\n// specialized for.\ntype Schema2PlatformSpec = manifest.Schema2PlatformSpec\n\n// Schema2ManifestDescriptor references a platform-specific manifest.\ntype Schema2ManifestDescriptor = manifest.Schema2ManifestDescriptor\n\n// Schema2List is a list of platform-specific manifests.\ntype Schema2List = manifest.Schema2ListPublic\n\n// Schema2ListFromComponents creates a Schema2 manifest list instance from the\n// supplied data.\nfunc Schema2ListFromComponents(components []Schema2ManifestDescriptor) *Schema2List {\n\treturn manifest.Schema2ListPublicFromComponents(components)\n}\n\n// Schema2ListClone creates a deep copy of the passed-in list.\nfunc Schema2ListClone(list *Schema2List) *Schema2List {\n\treturn manifest.Schema2ListPublicClone(list)\n}\n\n// Schema2ListFromManifest creates a Schema2 manifest list instance from marshalled\n// JSON, presumably generated by encoding a Schema2 manifest list.\nfunc Schema2ListFromManifest(manifestBlob []byte) (*Schema2List, error) {\n\treturn manifest.Schema2ListPublicFromManifest(manifestBlob)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/list.go",
    "content": "package manifest\n\nimport (\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n)\n\n// SupportedListMIMETypes is a list of the manifest list types that we know how to\n// read/manipulate/write.\nvar SupportedListMIMETypes = []string{\n\tDockerV2ListMediaType,\n\timgspecv1.MediaTypeImageIndex,\n}\n\n// List is an interface for parsing, modifying lists of image manifests.\n// Callers can either use this abstract interface without understanding the details of the formats,\n// or instantiate a specific implementation (e.g. manifest.OCI1Index) and access the public members\n// directly.\ntype List = manifest.ListPublic\n\n// ListUpdate includes the fields which a List's UpdateInstances() method will modify.\ntype ListUpdate = manifest.ListUpdate\n\n// ListFromBlob parses a list of manifests.\nfunc ListFromBlob(manifestBlob []byte, manifestMIMEType string) (List, error) {\n\treturn manifest.ListPublicFromBlob(manifestBlob, manifestMIMEType)\n}\n\n// ConvertListToMIMEType converts the passed-in manifest list to a manifest\n// list of the specified type.\nfunc ConvertListToMIMEType(list List, manifestMIMEType string) (List, error) {\n\treturn list.ConvertToMIMEType(manifestMIMEType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/manifest.go",
    "content": "package manifest\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/containers/libtrust\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// FIXME: Should we just use docker/distribution and docker/docker implementations directly?\n\n// FIXME(runcom, mitr): should we have a mediatype pkg??\nconst (\n\t// DockerV2Schema1MediaType MIME type represents Docker manifest schema 1\n\tDockerV2Schema1MediaType = manifest.DockerV2Schema1MediaType\n\t// DockerV2Schema1SignedMediaType MIME type represents Docker manifest schema 1 with a JWS signature\n\tDockerV2Schema1SignedMediaType = manifest.DockerV2Schema1SignedMediaType\n\t// DockerV2Schema2MediaType MIME type represents Docker manifest schema 2\n\tDockerV2Schema2MediaType = manifest.DockerV2Schema2MediaType\n\t// DockerV2Schema2ConfigMediaType is the MIME type used for schema 2 config blobs.\n\tDockerV2Schema2ConfigMediaType = manifest.DockerV2Schema2ConfigMediaType\n\t// DockerV2Schema2LayerMediaType is the MIME type used for schema 2 layers.\n\tDockerV2Schema2LayerMediaType = manifest.DockerV2Schema2LayerMediaType\n\t// DockerV2SchemaLayerMediaTypeUncompressed is the mediaType used for uncompressed layers.\n\tDockerV2SchemaLayerMediaTypeUncompressed = manifest.DockerV2SchemaLayerMediaTypeUncompressed\n\t// DockerV2SchemaLayerMediaTypeZstd is the mediaType used for zstd layers.\n\t// Warning: This mediaType is not officially supported in https://github.com/distribution/distribution/blob/main/docs/content/spec/manifest-v2-2.md but some images may exhibit it. Support is partial.\n\tDockerV2SchemaLayerMediaTypeZstd = manifest.DockerV2SchemaLayerMediaTypeZstd\n\t// DockerV2ListMediaType MIME type represents Docker manifest schema 2 list\n\tDockerV2ListMediaType = manifest.DockerV2ListMediaType\n\t// DockerV2Schema2ForeignLayerMediaType is the MIME type used for schema 2 foreign layers.\n\tDockerV2Schema2ForeignLayerMediaType = manifest.DockerV2Schema2ForeignLayerMediaType\n\t// DockerV2Schema2ForeignLayerMediaTypeGzip is the MIME type used for gzipped schema 2 foreign layers.\n\tDockerV2Schema2ForeignLayerMediaTypeGzip = manifest.DockerV2Schema2ForeignLayerMediaTypeGzip\n)\n\n// NonImageArtifactError (detected via errors.As) is used when asking for an image-specific operation\n// on an object which is not a “container image” in the standard sense (e.g. an OCI artifact)\ntype NonImageArtifactError = manifest.NonImageArtifactError\n\n// SupportedSchema2MediaType checks if the specified string is a supported Docker v2s2 media type.\nfunc SupportedSchema2MediaType(m string) error {\n\tswitch m {\n\tcase DockerV2ListMediaType, DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType, DockerV2Schema2ConfigMediaType, DockerV2Schema2ForeignLayerMediaType, DockerV2Schema2ForeignLayerMediaTypeGzip, DockerV2Schema2LayerMediaType, DockerV2Schema2MediaType, DockerV2SchemaLayerMediaTypeUncompressed, DockerV2SchemaLayerMediaTypeZstd:\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported docker v2s2 media type: %q\", m)\n\t}\n}\n\n// DefaultRequestedManifestMIMETypes is a list of MIME types a types.ImageSource\n// should request from the backend unless directed otherwise.\nvar DefaultRequestedManifestMIMETypes = []string{\n\timgspecv1.MediaTypeImageManifest,\n\tDockerV2Schema2MediaType,\n\tDockerV2Schema1SignedMediaType,\n\tDockerV2Schema1MediaType,\n\tDockerV2ListMediaType,\n\timgspecv1.MediaTypeImageIndex,\n}\n\n// Manifest is an interface for parsing, modifying image manifests in isolation.\n// Callers can either use this abstract interface without understanding the details of the formats,\n// or instantiate a specific implementation (e.g. manifest.OCI1) and access the public members\n// directly.\n//\n// See types.Image for functionality not limited to manifests, including format conversions and config parsing.\n// This interface is similar to, but not strictly equivalent to, the equivalent methods in types.Image.\ntype Manifest interface {\n\t// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n\tConfigInfo() types.BlobInfo\n\t// LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n\t// The Digest field is guaranteed to be provided; Size may be -1.\n\t// WARNING: The list may contain duplicates, and they are semantically relevant.\n\tLayerInfos() []LayerInfo\n\t// UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls), in order (the root layer first, and then successive layered layers)\n\tUpdateLayerInfos(layerInfos []types.BlobInfo) error\n\n\t// ImageID computes an ID which can uniquely identify this image by its contents, irrespective\n\t// of which (of possibly more than one simultaneously valid) reference was used to locate the\n\t// image, and unchanged by whether or how the layers are compressed.  The result takes the form\n\t// of the hexadecimal portion of a digest.Digest.\n\tImageID(diffIDs []digest.Digest) (string, error)\n\n\t// Inspect returns various information for (skopeo inspect) parsed from the manifest,\n\t// incorporating information from a configuration blob returned by configGetter, if\n\t// the underlying image format is expected to include a configuration blob.\n\tInspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error)\n\n\t// Serialize returns the manifest in a blob format.\n\t// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\n\tSerialize() ([]byte, error)\n}\n\n// LayerInfo is an extended version of types.BlobInfo for low-level users of Manifest.LayerInfos.\ntype LayerInfo struct {\n\ttypes.BlobInfo\n\tEmptyLayer bool // The layer is an “empty”/“throwaway” one, and may or may not be physically represented in various transport / storage systems.  false if the manifest type does not have the concept.\n}\n\n// GuessMIMEType guesses MIME type of a manifest and returns it _if it is recognized_, or \"\" if unknown or unrecognized.\n// FIXME? We should, in general, prefer out-of-band MIME type instead of blindly parsing the manifest,\n// but we may not have such metadata available (e.g. when the manifest is a local file).\nfunc GuessMIMEType(manifestBlob []byte) string {\n\treturn manifest.GuessMIMEType(manifestBlob)\n}\n\n// Digest returns the a digest of a docker manifest, with any necessary implied transformations like stripping v1s1 signatures.\nfunc Digest(manifestBlob []byte) (digest.Digest, error) {\n\treturn manifest.Digest(manifestBlob)\n}\n\n// DigestWithAlgorithm returns the digest of a docker manifest using the specified algorithm,\n// with any necessary implied transformations like stripping v1s1 signatures.\nfunc DigestWithAlgorithm(manifestBlob []byte, algo digest.Algorithm) (digest.Digest, error) {\n\treturn manifest.DigestWithAlgorithm(manifestBlob, algo)\n}\n\n// MatchesDigest returns true iff the manifest matches expectedDigest.\n// Error may be set if this returns false.\n// Note that this is not doing ConstantTimeCompare; by the time we get here, the cryptographic signature must already have been verified,\n// or we are not using a cryptographic channel and the attacker can modify the digest along with the manifest blob.\nfunc MatchesDigest(manifestBlob []byte, expectedDigest digest.Digest) (bool, error) {\n\treturn manifest.MatchesDigest(manifestBlob, expectedDigest)\n}\n\n// AddDummyV2S1Signature adds an JWS signature with a temporary key (i.e. useless) to a v2s1 manifest.\n// This is useful to make the manifest acceptable to a docker/distribution registry (even though nothing needs or wants the JWS signature).\nfunc AddDummyV2S1Signature(manifest []byte) ([]byte, error) {\n\tkey, err := libtrust.GenerateECP256PrivateKey()\n\tif err != nil {\n\t\treturn nil, err // Coverage: This can fail only if rand.Reader fails.\n\t}\n\n\tjs, err := libtrust.NewJSONSignature(manifest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := js.Sign(key); err != nil { // Coverage: This can fail basically only if rand.Reader fails.\n\t\treturn nil, err\n\t}\n\treturn js.PrettySignature(\"signatures\")\n}\n\n// MIMETypeIsMultiImage returns true if mimeType is a list of images\nfunc MIMETypeIsMultiImage(mimeType string) bool {\n\treturn mimeType == DockerV2ListMediaType || mimeType == imgspecv1.MediaTypeImageIndex\n}\n\n// MIMETypeSupportsEncryption returns true if the mimeType supports encryption\nfunc MIMETypeSupportsEncryption(mimeType string) bool {\n\treturn mimeType == imgspecv1.MediaTypeImageManifest\n}\n\n// NormalizedMIMEType returns the effective MIME type of a manifest MIME type returned by a server,\n// centralizing various workarounds.\nfunc NormalizedMIMEType(input string) string {\n\treturn manifest.NormalizedMIMEType(input)\n}\n\n// FromBlob returns a Manifest instance for the specified manifest blob and the corresponding MIME type\nfunc FromBlob(manblob []byte, mt string) (Manifest, error) {\n\tnmt := NormalizedMIMEType(mt)\n\tswitch nmt {\n\tcase DockerV2Schema1MediaType, DockerV2Schema1SignedMediaType:\n\t\treturn Schema1FromManifest(manblob)\n\tcase imgspecv1.MediaTypeImageManifest:\n\t\treturn OCI1FromManifest(manblob)\n\tcase DockerV2Schema2MediaType:\n\t\treturn Schema2FromManifest(manblob)\n\tcase DockerV2ListMediaType, imgspecv1.MediaTypeImageIndex:\n\t\treturn nil, fmt.Errorf(\"Treating manifest lists as individual manifests is not implemented\")\n\t}\n\t// Note that this may not be reachable, NormalizedMIMEType has a default for unknown values.\n\treturn nil, fmt.Errorf(\"Unimplemented manifest MIME type %q (normalized as %q)\", mt, nmt)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/oci.go",
    "content": "package manifest\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\n\tociencspec \"github.com/containers/ocicrypt/spec\"\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\tcompressiontypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// BlobInfoFromOCI1Descriptor returns a types.BlobInfo based on the input OCI1 descriptor.\nfunc BlobInfoFromOCI1Descriptor(desc imgspecv1.Descriptor) types.BlobInfo {\n\treturn types.BlobInfo{\n\t\tDigest:      desc.Digest,\n\t\tSize:        desc.Size,\n\t\tURLs:        desc.URLs,\n\t\tAnnotations: desc.Annotations,\n\t\tMediaType:   desc.MediaType,\n\t}\n}\n\n// OCI1 is a manifest.Manifest implementation for OCI images.\n// The underlying data from imgspecv1.Manifest is also available.\ntype OCI1 struct {\n\timgspecv1.Manifest\n}\n\n// SupportedOCI1MediaType checks if the specified string is a supported OCI1\n// media type.\n//\n// Deprecated: blindly rejecting unknown MIME types when the consumer does not\n// need to process the input just reduces interoperability (and violates the\n// standard) with no benefit, and that this function does not check that the\n// media type is appropriate for any specific purpose, so it’s not all that\n// useful for validation anyway.\nfunc SupportedOCI1MediaType(m string) error {\n\tswitch m {\n\tcase imgspecv1.MediaTypeDescriptor, imgspecv1.MediaTypeImageConfig,\n\t\timgspecv1.MediaTypeImageLayer, imgspecv1.MediaTypeImageLayerGzip, imgspecv1.MediaTypeImageLayerZstd,\n\t\timgspecv1.MediaTypeImageLayerNonDistributable, imgspecv1.MediaTypeImageLayerNonDistributableGzip, imgspecv1.MediaTypeImageLayerNonDistributableZstd, //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\timgspecv1.MediaTypeImageManifest,\n\t\timgspecv1.MediaTypeLayoutHeader,\n\t\tociencspec.MediaTypeLayerEnc, ociencspec.MediaTypeLayerGzipEnc:\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported OCIv1 media type: %q\", m)\n\t}\n}\n\n// OCI1FromManifest creates an OCI1 manifest instance from a manifest blob.\nfunc OCI1FromManifest(manifestBlob []byte) (*OCI1, error) {\n\toci1 := OCI1{}\n\tif err := json.Unmarshal(manifestBlob, &oci1); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := manifest.ValidateUnambiguousManifestFormat(manifestBlob, imgspecv1.MediaTypeImageManifest,\n\t\tmanifest.AllowedFieldConfig|manifest.AllowedFieldLayers); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &oci1, nil\n}\n\n// OCI1FromComponents creates an OCI1 manifest instance from the supplied data.\nfunc OCI1FromComponents(config imgspecv1.Descriptor, layers []imgspecv1.Descriptor) *OCI1 {\n\treturn &OCI1{\n\t\timgspecv1.Manifest{\n\t\t\tVersioned: specs.Versioned{SchemaVersion: 2},\n\t\t\tMediaType: imgspecv1.MediaTypeImageManifest,\n\t\t\tConfig:    config,\n\t\t\tLayers:    layers,\n\t\t},\n\t}\n}\n\n// OCI1Clone creates a copy of the supplied OCI1 manifest.\nfunc OCI1Clone(src *OCI1) *OCI1 {\n\treturn &OCI1{\n\t\tManifest: src.Manifest,\n\t}\n}\n\n// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\nfunc (m *OCI1) ConfigInfo() types.BlobInfo {\n\treturn BlobInfoFromOCI1Descriptor(m.Config)\n}\n\n// LayerInfos returns a list of LayerInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (m *OCI1) LayerInfos() []LayerInfo {\n\tblobs := make([]LayerInfo, 0, len(m.Layers))\n\tfor _, layer := range m.Layers {\n\t\tblobs = append(blobs, LayerInfo{\n\t\t\tBlobInfo:   BlobInfoFromOCI1Descriptor(layer),\n\t\t\tEmptyLayer: false,\n\t\t})\n\t}\n\treturn blobs\n}\n\nvar oci1CompressionMIMETypeSets = []compressionMIMETypeSet{\n\t{\n\t\tmtsUncompressed:                    imgspecv1.MediaTypeImageLayerNonDistributable,     //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\tcompressiontypes.GzipAlgorithmName: imgspecv1.MediaTypeImageLayerNonDistributableGzip, //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\tcompressiontypes.ZstdAlgorithmName: imgspecv1.MediaTypeImageLayerNonDistributableZstd, //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t},\n\t{\n\t\tmtsUncompressed:                    imgspecv1.MediaTypeImageLayer,\n\t\tcompressiontypes.GzipAlgorithmName: imgspecv1.MediaTypeImageLayerGzip,\n\t\tcompressiontypes.ZstdAlgorithmName: imgspecv1.MediaTypeImageLayerZstd,\n\t},\n}\n\n// UpdateLayerInfos replaces the original layers with the specified BlobInfos (size+digest+urls+mediatype), in order (the root layer first, and then successive layered layers)\n// The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError if any of the layerInfos includes a combination of CompressionOperation and\n// CompressionAlgorithm that isn't supported by OCI.\n//\n// It’s generally the caller’s responsibility to determine whether a particular edit is acceptable, rather than relying on\n// failures of this function, because the layer is typically created _before_ UpdateLayerInfos is called, because UpdateLayerInfos needs\n// to know the final digest). See OCI1.CanChangeLayerCompression for some help in determining this; other aspects like compression\n// algorithms that might not be supported by a format, or the limited set of MIME types accepted for encryption, are not currently\n// handled — that logic should eventually also be provided as OCI1 methods, not hard-coded in callers.\nfunc (m *OCI1) UpdateLayerInfos(layerInfos []types.BlobInfo) error {\n\tif len(m.Layers) != len(layerInfos) {\n\t\treturn fmt.Errorf(\"Error preparing updated manifest: layer count changed from %d to %d\", len(m.Layers), len(layerInfos))\n\t}\n\toriginal := m.Layers\n\tm.Layers = make([]imgspecv1.Descriptor, len(layerInfos))\n\tfor i, info := range layerInfos {\n\t\tmimeType := original[i].MediaType\n\t\tif info.CryptoOperation == types.Decrypt {\n\t\t\tdecMimeType, err := getDecryptedMediaType(mimeType)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error preparing updated manifest: decryption specified but original mediatype is not encrypted: %q\", mimeType)\n\t\t\t}\n\t\t\tmimeType = decMimeType\n\t\t}\n\t\tmimeType, err := updatedMIMEType(oci1CompressionMIMETypeSets, mimeType, info)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"preparing updated manifest, layer %q: %w\", info.Digest, err)\n\t\t}\n\t\tif info.CryptoOperation == types.Encrypt {\n\t\t\tencMediaType, err := getEncryptedMediaType(mimeType)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error preparing updated manifest: encryption specified but no counterpart for mediatype: %q\", mimeType)\n\t\t\t}\n\t\t\tmimeType = encMediaType\n\t\t}\n\n\t\tm.Layers[i].MediaType = mimeType\n\t\tm.Layers[i].Digest = info.Digest\n\t\tm.Layers[i].Size = info.Size\n\t\tm.Layers[i].Annotations = info.Annotations\n\t\tm.Layers[i].URLs = info.URLs\n\t}\n\treturn nil\n}\n\n// getEncryptedMediaType will return the mediatype to its encrypted counterpart and return\n// an error if the mediatype does not support encryption\nfunc getEncryptedMediaType(mediatype string) (string, error) {\n\tparts := strings.Split(mediatype, \"+\")\n\tif slices.Contains(parts[1:], \"encrypted\") {\n\t\treturn \"\", fmt.Errorf(\"unsupported mediaType: %q already encrypted\", mediatype)\n\t}\n\tunsuffixedMediatype := parts[0]\n\tswitch unsuffixedMediatype {\n\tcase DockerV2Schema2LayerMediaType, imgspecv1.MediaTypeImageLayer,\n\t\timgspecv1.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // NonDistributable layers are deprecated, but we want to continue to support manipulating pre-existing images.\n\t\treturn mediatype + \"+encrypted\", nil\n\t}\n\n\treturn \"\", fmt.Errorf(\"unsupported mediaType to encrypt: %q\", mediatype)\n}\n\n// getDecryptedMediaType will return the mediatype to its encrypted counterpart and return\n// an error if the mediatype does not support decryption\nfunc getDecryptedMediaType(mediatype string) (string, error) {\n\tres, ok := strings.CutSuffix(mediatype, \"+encrypted\")\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"unsupported mediaType to decrypt: %q\", mediatype)\n\t}\n\n\treturn res, nil\n}\n\n// Serialize returns the manifest in a blob format.\n// NOTE: Serialize() does not in general reproduce the original blob if this object was loaded from one, even if no modifications were made!\nfunc (m *OCI1) Serialize() ([]byte, error) {\n\treturn json.Marshal(*m)\n}\n\n// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\nfunc (m *OCI1) Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error) {\n\tif m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\t// We could return at least the layers, but that’s already available in a better format via types.Image.LayerInfos.\n\t\t// Most software calling this without human intervention is going to expect the values to be realistic and relevant,\n\t\t// and is probably better served by failing; we can always re-visit that later if we fail now, but\n\t\t// if we started returning some data for OCI artifacts now, we couldn’t start failing in this function later.\n\t\treturn nil, manifest.NewNonImageArtifactError(&m.Manifest)\n\t}\n\n\tconfig, err := configGetter(m.ConfigInfo())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv1 := &imgspecv1.Image{}\n\tif err := json.Unmarshal(config, v1); err != nil {\n\t\treturn nil, err\n\t}\n\td1 := &Schema2V1Image{}\n\tif err := json.Unmarshal(config, d1); err != nil {\n\t\treturn nil, err\n\t}\n\tlayerInfos := m.LayerInfos()\n\ti := &types.ImageInspectInfo{\n\t\tTag:           \"\",\n\t\tCreated:       v1.Created,\n\t\tDockerVersion: d1.DockerVersion,\n\t\tLabels:        v1.Config.Labels,\n\t\tArchitecture:  v1.Architecture,\n\t\tVariant:       v1.Variant,\n\t\tOs:            v1.OS,\n\t\tLayers:        layerInfosToStrings(layerInfos),\n\t\tLayersData:    imgInspectLayersFromLayerInfos(layerInfos),\n\t\tEnv:           v1.Config.Env,\n\t\tAuthor:        v1.Author,\n\t}\n\treturn i, nil\n}\n\n// ImageID computes an ID which can uniquely identify this image by its contents.\nfunc (m *OCI1) ImageID(diffIDs []digest.Digest) (string, error) {\n\t// The way m.Config.Digest “uniquely identifies” an image is\n\t// by containing RootFS.DiffIDs, which identify the layers of the image.\n\t// For non-image artifacts, the we can’t expect the config to change\n\t// any time the other layers (semantically) change, so this approach of\n\t// distinguishing objects only by m.Config.Digest doesn’t work in general.\n\t//\n\t// Any caller of this method presumably wants to disambiguate the same\n\t// images with a different representation, but doesn’t want to disambiguate\n\t// representations (by using a manifest digest).  So, submitting a non-image\n\t// artifact to such a caller indicates an expectation mismatch.\n\t// So, we just fail here instead of inventing some other ID value (e.g.\n\t// by combining the config and blob layer digests).  That still\n\t// gives us the option to not fail, and return some value, in the future,\n\t// without committing to that approach now.\n\t// (The only known caller of ImageID is storage/storageImageDestination.computeID,\n\t// which can’t work with non-image artifacts.)\n\tif m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\treturn \"\", manifest.NewNonImageArtifactError(&m.Manifest)\n\t}\n\n\tif err := m.Config.Digest.Validate(); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn m.Config.Digest.Encoded(), nil\n}\n\n// CanChangeLayerCompression returns true if we can compress/decompress layers with mimeType in the current image\n// (and the code can handle that).\n// NOTE: Even if this returns true, the relevant format might not accept all compression algorithms; the set of accepted\n// algorithms depends not on the current format, but possibly on the target of a conversion.\nfunc (m *OCI1) CanChangeLayerCompression(mimeType string) bool {\n\tif m.Config.MediaType != imgspecv1.MediaTypeImageConfig {\n\t\treturn false\n\t}\n\treturn compressionVariantsRecognizeMIMEType(oci1CompressionMIMETypeSets, mimeType)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/manifest/oci_index.go",
    "content": "package manifest\n\nimport (\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n)\n\n// OCI1Index is just an alias for the OCI index type, but one which we can\n// provide methods for.\ntype OCI1Index = manifest.OCI1IndexPublic\n\n// OCI1IndexFromComponents creates an OCI1 image index instance from the\n// supplied data.\nfunc OCI1IndexFromComponents(components []imgspecv1.Descriptor, annotations map[string]string) *OCI1Index {\n\treturn manifest.OCI1IndexPublicFromComponents(components, annotations)\n}\n\n// OCI1IndexClone creates a deep copy of the passed-in index.\nfunc OCI1IndexClone(index *OCI1Index) *OCI1Index {\n\treturn manifest.OCI1IndexPublicClone(index)\n}\n\n// OCI1IndexFromManifest creates an OCI1 manifest index instance from marshalled\n// JSON, presumably generated by encoding a OCI1 manifest index.\nfunc OCI1IndexFromManifest(manifestBlob []byte) (*OCI1Index, error) {\n\treturn manifest.OCI1IndexPublicFromManifest(manifestBlob)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/archive/oci_dest.go",
    "content": "package archive\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/imagedestination\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\ntype ociArchiveImageDestination struct {\n\timpl.Compat\n\n\tref          ociArchiveReference\n\tunpackedDest private.ImageDestination\n\ttempDirRef   tempDirOCIRef\n}\n\n// newImageDestination returns an ImageDestination for writing to an existing directory.\nfunc newImageDestination(ctx context.Context, sys *types.SystemContext, ref ociArchiveReference) (private.ImageDestination, error) {\n\ttempDirRef, err := createOCIRef(sys, ref.image)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating oci reference: %w\", err)\n\t}\n\tunpackedDest, err := tempDirRef.ociRefExtracted.NewImageDestination(ctx, sys)\n\tif err != nil {\n\t\tif err := tempDirRef.deleteTempDir(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"deleting temp directory %q: %w\", tempDirRef.tempDirectory, err)\n\t\t}\n\t\treturn nil, err\n\t}\n\td := &ociArchiveImageDestination{\n\t\tref:          ref,\n\t\tunpackedDest: imagedestination.FromPublic(unpackedDest),\n\t\ttempDirRef:   tempDirRef,\n\t}\n\td.Compat = impl.AddCompat(d)\n\treturn d, nil\n}\n\n// Reference returns the reference used to set up this destination.\nfunc (d *ociArchiveImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any\n// Close deletes the temp directory of the oci-archive image\nfunc (d *ociArchiveImageDestination) Close() error {\n\tdefer func() {\n\t\terr := d.tempDirRef.deleteTempDir()\n\t\tlogrus.Debugf(\"Error deleting temporary directory: %v\", err)\n\t}()\n\treturn d.unpackedDest.Close()\n}\n\nfunc (d *ociArchiveImageDestination) SupportedManifestMIMETypes() []string {\n\treturn d.unpackedDest.SupportedManifestMIMETypes()\n}\n\n// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures\nfunc (d *ociArchiveImageDestination) SupportsSignatures(ctx context.Context) error {\n\treturn d.unpackedDest.SupportsSignatures(ctx)\n}\n\nfunc (d *ociArchiveImageDestination) DesiredLayerCompression() types.LayerCompression {\n\treturn d.unpackedDest.DesiredLayerCompression()\n}\n\n// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually\n// uploaded to the image destination, true otherwise.\nfunc (d *ociArchiveImageDestination) AcceptsForeignLayerURLs() bool {\n\treturn d.unpackedDest.AcceptsForeignLayerURLs()\n}\n\n// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime architecture and OS. False otherwise\nfunc (d *ociArchiveImageDestination) MustMatchRuntimeOS() bool {\n\treturn d.unpackedDest.MustMatchRuntimeOS()\n}\n\n// IgnoresEmbeddedDockerReference returns true iff the destination does not care about Image.EmbeddedDockerReferenceConflicts(),\n// and would prefer to receive an unmodified manifest instead of one modified for the destination.\n// Does not make a difference if Reference().DockerReference() is nil.\nfunc (d *ociArchiveImageDestination) IgnoresEmbeddedDockerReference() bool {\n\treturn d.unpackedDest.IgnoresEmbeddedDockerReference()\n}\n\n// HasThreadSafePutBlob indicates whether PutBlob can be executed concurrently.\nfunc (d *ociArchiveImageDestination) HasThreadSafePutBlob() bool {\n\treturn false\n}\n\n// SupportsPutBlobPartial returns true if PutBlobPartial is supported.\nfunc (d *ociArchiveImageDestination) SupportsPutBlobPartial() bool {\n\treturn d.unpackedDest.SupportsPutBlobPartial()\n}\n\n// NoteOriginalOCIConfig provides the config of the image, as it exists on the source, BUT converted to OCI format,\n// or an error obtaining that value (e.g. if the image is an artifact and not a container image).\n// The destination can use it in its TryReusingBlob/PutBlob implementations\n// (otherwise it only obtains the final config after all layers are written).\nfunc (d *ociArchiveImageDestination) NoteOriginalOCIConfig(ociConfig *imgspecv1.Image, configErr error) error {\n\treturn d.unpackedDest.NoteOriginalOCIConfig(ociConfig, configErr)\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *ociArchiveImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\treturn d.unpackedDest.PutBlobWithOptions(ctx, stream, inputInfo, options)\n}\n\n// PutBlobPartial attempts to create a blob using the data that is already present\n// at the destination. chunkAccessor is accessed in a non-sequential way to retrieve the missing chunks.\n// It is available only if SupportsPutBlobPartial().\n// Even if SupportsPutBlobPartial() returns true, the call can fail.\n// If the call fails with ErrFallbackToOrdinaryLayerDownload, the caller can fall back to PutBlobWithOptions.\n// The fallback _must not_ be done otherwise.\nfunc (d *ociArchiveImageDestination) PutBlobPartial(ctx context.Context, chunkAccessor private.BlobChunkAccessor, srcInfo types.BlobInfo, options private.PutBlobPartialOptions) (private.UploadedBlob, error) {\n\treturn d.unpackedDest.PutBlobPartial(ctx, chunkAccessor, srcInfo, options)\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *ociArchiveImageDestination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\treturn d.unpackedDest.TryReusingBlobWithOptions(ctx, info, options)\n}\n\n// PutManifest writes the manifest to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to overwrite the manifest for (when\n// the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// It is expected but not enforced that the instanceDigest, when specified, matches the digest of `manifest` as generated\n// by `manifest.Digest()`.\nfunc (d *ociArchiveImageDestination) PutManifest(ctx context.Context, m []byte, instanceDigest *digest.Digest) error {\n\treturn d.unpackedDest.PutManifest(ctx, m, instanceDigest)\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (d *ociArchiveImageDestination) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\treturn d.unpackedDest.PutSignaturesWithFormat(ctx, signatures, instanceDigest)\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *ociArchiveImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\tif err := d.unpackedDest.CommitWithOptions(ctx, options); err != nil {\n\t\treturn fmt.Errorf(\"storing image %q: %w\", d.ref.image, err)\n\t}\n\n\t// path of directory to tar up\n\tsrc := d.tempDirRef.tempDirectory\n\t// path to save tarred up file\n\tdst := d.ref.resolvedFile\n\treturn tarDirectory(src, dst, options.Timestamp)\n}\n\n// tar converts the directory at src and saves it to dst\n// if contentModTimes is non-nil, tar header entries times are set to this\nfunc tarDirectory(src, dst string, contentModTimes *time.Time) (retErr error) {\n\t// input is a stream of bytes from the archive of the directory at path\n\tinput, err := archive.TarWithOptions(src, &archive.TarOptions{\n\t\tCompression: archive.Uncompressed,\n\t\t// Don’t include the data about the user account this code is running under.\n\t\tChownOpts: &idtools.IDPair{UID: 0, GID: 0},\n\t\t// override tar header timestamps\n\t\tTimestamp: contentModTimes,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"retrieving stream of bytes from %q: %w\", src, err)\n\t}\n\tdefer input.Close()\n\n\t// creates the tar file\n\toutFile, err := os.Create(dst)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"creating tar file %q: %w\", dst, err)\n\t}\n\n\t// since we are writing to this file, make sure we handle errors\n\tdefer func() {\n\t\tcloseErr := outFile.Close()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\t// copies the contents of the directory to the tar file\n\t// TODO: This can take quite some time, and should ideally be cancellable using a context.Context.\n\t_, err = io.Copy(outFile, input)\n\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/archive/oci_src.go",
    "content": "package archive\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/imagesource\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\tocilayout \"go.podman.io/image/v5/oci/layout\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// ImageNotFoundError is used when the OCI structure, in principle, exists and seems valid enough,\n// but nothing matches the “image” part of the provided reference.\ntype ImageNotFoundError struct {\n\tref ociArchiveReference\n\t// We may make members public, or add methods, in the future.\n}\n\nfunc (e ImageNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"no descriptor found for reference %q\", e.ref.image)\n}\n\n// ArchiveFileNotFoundError occurs when the archive file does not exist.\ntype ArchiveFileNotFoundError struct {\n\t// ref is the image reference\n\tref ociArchiveReference\n\t// path is the file path that was not present\n\tpath string\n}\n\nfunc (e ArchiveFileNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"archive file not found: %q\", e.path)\n}\n\ntype ociArchiveImageSource struct {\n\timpl.Compat\n\n\tref         ociArchiveReference\n\tunpackedSrc private.ImageSource\n\ttempDirRef  tempDirOCIRef\n}\n\n// newImageSource returns an ImageSource for reading from an existing directory.\n// newImageSource untars the file and saves it in a temp directory\nfunc newImageSource(ctx context.Context, sys *types.SystemContext, ref ociArchiveReference) (private.ImageSource, error) {\n\ttempDirRef, err := createUntarTempDir(sys, ref)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating temp directory: %w\", err)\n\t}\n\n\tunpackedSrc, err := tempDirRef.ociRefExtracted.NewImageSource(ctx, sys)\n\tif err != nil {\n\t\tvar notFound ocilayout.ImageNotFoundError\n\t\tif errors.As(err, &notFound) {\n\t\t\terr = ImageNotFoundError{ref: ref}\n\t\t}\n\t\tif err := tempDirRef.deleteTempDir(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"deleting temp directory %q: %w\", tempDirRef.tempDirectory, err)\n\t\t}\n\t\treturn nil, err\n\t}\n\ts := &ociArchiveImageSource{\n\t\tref:         ref,\n\t\tunpackedSrc: imagesource.FromPublic(unpackedSrc),\n\t\ttempDirRef:  tempDirRef,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s, nil\n}\n\n// LoadManifestDescriptor loads the manifest\n//\n// Deprecated: use LoadManifestDescriptorWithContext instead\nfunc LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, error) {\n\treturn LoadManifestDescriptorWithContext(nil, imgRef)\n}\n\n// LoadManifestDescriptorWithContext loads the manifest\nfunc LoadManifestDescriptorWithContext(sys *types.SystemContext, imgRef types.ImageReference) (imgspecv1.Descriptor, error) {\n\tociArchRef, ok := imgRef.(ociArchiveReference)\n\tif !ok {\n\t\treturn imgspecv1.Descriptor{}, errors.New(\"error typecasting, need type ociArchiveReference\")\n\t}\n\ttempDirRef, err := createUntarTempDir(sys, ociArchRef)\n\tif err != nil {\n\t\treturn imgspecv1.Descriptor{}, fmt.Errorf(\"creating temp directory: %w\", err)\n\t}\n\tdefer func() {\n\t\terr := tempDirRef.deleteTempDir()\n\t\tlogrus.Debugf(\"Error deleting temporary directory: %v\", err)\n\t}()\n\n\tdescriptor, err := ocilayout.LoadManifestDescriptor(tempDirRef.ociRefExtracted)\n\tif err != nil {\n\t\treturn imgspecv1.Descriptor{}, fmt.Errorf(\"loading index: %w\", err)\n\t}\n\treturn descriptor, nil\n}\n\n// Reference returns the reference used to set up this source.\nfunc (s *ociArchiveImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\n// Close deletes the temporary directory at dst\nfunc (s *ociArchiveImageSource) Close() error {\n\tdefer func() {\n\t\terr := s.tempDirRef.deleteTempDir()\n\t\tlogrus.Debugf(\"error deleting tmp dir: %v\", err)\n\t}()\n\treturn s.unpackedSrc.Close()\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *ociArchiveImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\treturn s.unpackedSrc.GetManifest(ctx, instanceDigest)\n}\n\n// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.\nfunc (s *ociArchiveImageSource) HasThreadSafeGetBlob() bool {\n\treturn false\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *ociArchiveImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\treturn s.unpackedSrc.GetBlob(ctx, info, cache)\n}\n\n// SupportsGetBlobAt() returns true if GetBlobAt (BlobChunkAccessor) is supported.\nfunc (s *ociArchiveImageSource) SupportsGetBlobAt() bool {\n\treturn s.unpackedSrc.SupportsGetBlobAt()\n}\n\n// GetBlobAt returns a sequential channel of readers that contain data for the requested\n// blob chunks, and a channel that might get a single error value.\n// The specified chunks must be not overlapping and sorted by their offset.\n// The readers must be fully consumed, in the order they are returned, before blocking\n// to read the next chunk.\n// If the Length for the last chunk is set to math.MaxUint64, then it\n// fully fetches the remaining data from the offset to the end of the blob.\nfunc (s *ociArchiveImageSource) GetBlobAt(ctx context.Context, info types.BlobInfo, chunks []private.ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\treturn s.unpackedSrc.GetBlobAt(ctx, info, chunks)\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (s *ociArchiveImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\treturn s.unpackedSrc.GetSignaturesWithFormat(ctx, instanceDigest)\n}\n\n// LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer\n// blobsums that are listed in the image's manifest.  If values are returned, they should be used when using GetBlob()\n// to read the image's layers.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve BlobInfos for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\n// The Digest field is guaranteed to be provided; Size may be -1.\n// WARNING: The list may contain duplicates, and they are semantically relevant.\nfunc (s *ociArchiveImageSource) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error) {\n\treturn s.unpackedSrc.LayerInfosForCopy(ctx, instanceDigest)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/archive/oci_transport.go",
    "content": "package archive\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/directory/explicitfilepath\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/oci/internal\"\n\tocilayout \"go.podman.io/image/v5/oci/layout\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for OCI archive\n// it creates an oci-archive tar file by calling into the OCI transport\n// tarring the directory created by oci and deleting the directory\nvar Transport = ociArchiveTransport{}\n\ntype ociArchiveTransport struct{}\n\n// ociArchiveReference is an ImageReference for OCI Archive paths\ntype ociArchiveReference struct {\n\tfile         string\n\tresolvedFile string\n\timage        string\n}\n\nfunc (t ociArchiveTransport) Name() string {\n\treturn \"oci-archive\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix\n// into an ImageReference.\nfunc (t ociArchiveTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\nfunc (t ociArchiveTransport) ValidatePolicyConfigurationScope(scope string) error {\n\treturn internal.ValidateScope(scope)\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an OCI archive ImageReference.\nfunc ParseReference(reference string) (types.ImageReference, error) {\n\tfile, image := internal.SplitPathAndImage(reference)\n\treturn NewReference(file, image)\n}\n\n// NewReference returns an OCI archive reference for a file and an optional image name annotation (if not \"\").\nfunc NewReference(file, image string) (types.ImageReference, error) {\n\tresolved, err := explicitfilepath.ResolvePathToFullyExplicit(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := internal.ValidateOCIPath(file); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := internal.ValidateImageName(image); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ociArchiveReference{file: file, resolvedFile: resolved, image: image}, nil\n}\n\nfunc (ref ociArchiveReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\nfunc (ref ociArchiveReference) StringWithinTransport() string {\n\treturn fmt.Sprintf(\"%s:%s\", ref.file, ref.image)\n}\n\n// DockerReference returns a Docker reference associated with this reference\nfunc (ref ociArchiveReference) DockerReference() reference.Named {\n\treturn nil\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\nfunc (ref ociArchiveReference) PolicyConfigurationIdentity() string {\n\t// NOTE: ref.image is not a part of the image identity, because \"$dir:$someimage\" and \"$dir:\" may mean the\n\t// same image and the two can’t be statically disambiguated.  Using at least the repository directory is\n\t// less granular but hopefully still useful.\n\treturn ref.resolvedFile\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set\nfunc (ref ociArchiveReference) PolicyConfigurationNamespaces() []string {\n\tres := []string{}\n\tpath := ref.resolvedFile\n\tfor {\n\t\tlastSlash := strings.LastIndex(path, \"/\")\n\t\t// Note that we do not include \"/\"; it is redundant with the default \"\" global default,\n\t\t// and rejected by ociTransport.ValidatePolicyConfigurationScope above.\n\t\tif lastSlash == -1 || path == \"/\" {\n\t\t\tbreak\n\t\t}\n\t\tres = append(res, path)\n\t\tpath = path[:lastSlash]\n\t}\n\treturn res\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref ociArchiveReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref ociArchiveReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(ctx, sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref ociArchiveReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(ctx, sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref ociArchiveReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\treturn errors.New(\"Deleting images not implemented for oci: images\")\n}\n\n// struct to store the ociReference and temporary directory returned by createOCIRef\ntype tempDirOCIRef struct {\n\ttempDirectory   string\n\tociRefExtracted types.ImageReference\n}\n\n// deletes the temporary directory created\nfunc (t *tempDirOCIRef) deleteTempDir() error {\n\treturn os.RemoveAll(t.tempDirectory)\n}\n\n// createOCIRef creates the oci reference of the image\n// If SystemContext.BigFilesTemporaryDir not \"\", overrides the temporary directory to use for storing big files\nfunc createOCIRef(sys *types.SystemContext, image string) (tempDirOCIRef, error) {\n\tdir, err := tmpdir.MkDirBigFileTemp(sys, \"oci\")\n\tif err != nil {\n\t\treturn tempDirOCIRef{}, fmt.Errorf(\"creating temp directory: %w\", err)\n\t}\n\tociRef, err := ocilayout.NewReference(dir, image)\n\tif err != nil {\n\t\treturn tempDirOCIRef{}, err\n\t}\n\n\ttempDirRef := tempDirOCIRef{tempDirectory: dir, ociRefExtracted: ociRef}\n\treturn tempDirRef, nil\n}\n\n// creates the temporary directory and copies the tarred content to it\nfunc createUntarTempDir(sys *types.SystemContext, ref ociArchiveReference) (tempDirOCIRef, error) {\n\tsrc := ref.resolvedFile\n\tarch, err := os.Open(src)\n\tif err != nil {\n\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\treturn tempDirOCIRef{}, ArchiveFileNotFoundError{ref: ref, path: src}\n\t\t} else {\n\t\t\treturn tempDirOCIRef{}, err\n\t\t}\n\t}\n\tdefer arch.Close()\n\n\ttempDirRef, err := createOCIRef(sys, ref.image)\n\tif err != nil {\n\t\treturn tempDirOCIRef{}, fmt.Errorf(\"creating oci reference: %w\", err)\n\t}\n\tdst := tempDirRef.tempDirectory\n\n\t// TODO: This can take quite some time, and should ideally be cancellable using a context.Context.\n\tif err := archive.NewDefaultArchiver().Untar(arch, dst, &archive.TarOptions{NoLchown: true}); err != nil {\n\t\tif err := tempDirRef.deleteTempDir(); err != nil {\n\t\t\treturn tempDirOCIRef{}, fmt.Errorf(\"deleting temp directory %q: %w\", tempDirRef.tempDirectory, err)\n\t\t}\n\t\treturn tempDirOCIRef{}, fmt.Errorf(\"untarring file %q: %w\", tempDirRef.tempDirectory, err)\n\t}\n\treturn tempDirRef, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/internal/oci_util.go",
    "content": "package internal\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// annotation spex from https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys\nconst (\n\tseparator = `(?:[-._:@+]|--)`\n\talphanum  = `(?:[A-Za-z0-9]+)`\n\tcomponent = `(?:` + alphanum + `(?:` + separator + alphanum + `)*)`\n)\n\nvar (\n\trefRegexp        = regexp.MustCompile(`^` + component + `(?:/` + component + `)*$`)\n\twindowsRefRegexp = regexp.MustCompile(`^([a-zA-Z]:\\\\.+?):(.*)$`)\n)\n\n// ValidateImageName returns nil if the image name is empty or matches the open-containers image name specs.\n// In any other case an error is returned.\nfunc ValidateImageName(image string) error {\n\tif len(image) == 0 {\n\t\treturn nil\n\t}\n\n\tvar err error\n\tif !refRegexp.MatchString(image) {\n\t\terr = fmt.Errorf(\"Invalid image %s\", image)\n\t}\n\treturn err\n}\n\n// SplitPathAndImage tries to split the provided OCI reference into the OCI path and image.\n// Neither path nor image parts are validated at this stage.\nfunc SplitPathAndImage(reference string) (string, string) {\n\tif runtime.GOOS == \"windows\" {\n\t\treturn splitPathAndImageWindows(reference)\n\t}\n\treturn splitPathAndImageNonWindows(reference)\n}\n\nfunc splitPathAndImageWindows(reference string) (string, string) {\n\tgroups := windowsRefRegexp.FindStringSubmatch(reference)\n\t// nil group means no match\n\tif groups == nil {\n\t\treturn reference, \"\"\n\t}\n\n\t// we expect three elements. First one full match, second the capture group for the path and\n\t// the third the capture group for the image\n\tif len(groups) != 3 {\n\t\treturn reference, \"\"\n\t}\n\treturn groups[1], groups[2]\n}\n\nfunc splitPathAndImageNonWindows(reference string) (string, string) {\n\tpath, image, _ := strings.Cut(reference, \":\") // image is set to \"\" if there is no \":\"\n\treturn path, image\n}\n\n// ValidateOCIPath takes the OCI path and validates it.\nfunc ValidateOCIPath(path string) error {\n\tif runtime.GOOS == \"windows\" {\n\t\t// On Windows we must allow for a ':' as part of the path\n\t\tif strings.Count(path, \":\") > 1 {\n\t\t\treturn fmt.Errorf(\"Invalid OCI reference: path %s contains more than one colon\", path)\n\t\t}\n\t} else {\n\t\tif strings.Contains(path, \":\") {\n\t\t\treturn fmt.Errorf(\"Invalid OCI reference: path %s contains a colon\", path)\n\t\t}\n\t}\n\treturn nil\n}\n\n// ValidateScope validates a policy configuration scope for an OCI transport.\nfunc ValidateScope(scope string) error {\n\tvar err error\n\tif runtime.GOOS == \"windows\" {\n\t\terr = validateScopeWindows(scope)\n\t} else {\n\t\terr = validateScopeNonWindows(scope)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcleaned := filepath.Clean(scope)\n\tif cleaned != scope {\n\t\treturn fmt.Errorf(`Invalid scope %s: Uses non-canonical path format, perhaps try with path %s`, scope, cleaned)\n\t}\n\n\treturn nil\n}\n\nfunc validateScopeWindows(scope string) error {\n\tmatched, _ := regexp.MatchString(`^[a-zA-Z]:\\\\`, scope)\n\tif !matched {\n\t\treturn fmt.Errorf(\"Invalid scope '%s'. Must be an absolute path\", scope)\n\t}\n\n\treturn nil\n}\n\nfunc validateScopeNonWindows(scope string) error {\n\tif !strings.HasPrefix(scope, \"/\") {\n\t\treturn fmt.Errorf(\"Invalid scope %s: must be an absolute path\", scope)\n\t}\n\n\t// Refuse also \"/\", otherwise \"/\" and \"\" would have the same semantics,\n\t// and \"\" could be unexpectedly shadowed by the \"/\" entry.\n\tif scope == \"/\" {\n\t\treturn errors.New(`Invalid scope \"/\": Use the generic default scope \"\"`)\n\t}\n\n\treturn nil\n}\n\n// parseOCIReferenceName parses the image from the oci reference.\nfunc parseOCIReferenceName(image string) (img string, index int, err error) {\n\tindex = -1\n\tif strings.HasPrefix(image, \"@\") {\n\t\tidx, err := strconv.Atoi(image[1:])\n\t\tif err != nil {\n\t\t\treturn \"\", index, fmt.Errorf(\"Invalid source index @%s: not an integer: %w\", image[1:], err)\n\t\t}\n\t\tif idx < 0 {\n\t\t\treturn \"\", index, fmt.Errorf(\"Invalid source index @%d: must not be negative\", idx)\n\t\t}\n\t\tindex = idx\n\t} else {\n\t\timg = image\n\t}\n\treturn img, index, nil\n}\n\n// ParseReferenceIntoElements splits the oci reference into location, image name and source index if exists\nfunc ParseReferenceIntoElements(reference string) (string, string, int, error) {\n\tdir, image := SplitPathAndImage(reference)\n\timage, index, err := parseOCIReferenceName(image)\n\tif err != nil {\n\t\treturn \"\", \"\", -1, err\n\t}\n\treturn dir, image, index, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/layout/oci_delete.go",
    "content": "package layout\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"slices\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// DeleteImage deletes the named image from the directory, if supported.\nfunc (ref ociReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\tsharedBlobsDir := \"\"\n\tif sys != nil && sys.OCISharedBlobDirPath != \"\" {\n\t\tsharedBlobsDir = sys.OCISharedBlobDirPath\n\t}\n\n\tdescriptor, descriptorIndex, err := ref.getManifestDescriptor()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tblobsUsedByImage := make(map[digest.Digest]int)\n\tif err := ref.countBlobsForDescriptor(blobsUsedByImage, &descriptor, sharedBlobsDir); err != nil {\n\t\treturn err\n\t}\n\n\tblobsToDelete, err := ref.getBlobsToDelete(blobsUsedByImage, sharedBlobsDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = ref.deleteBlobs(blobsToDelete)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn ref.deleteReferenceFromIndex(descriptorIndex)\n}\n\n// countBlobsForDescriptor updates dest with usage counts of blobs required for descriptor, INCLUDING descriptor itself.\nfunc (ref ociReference) countBlobsForDescriptor(dest map[digest.Digest]int, descriptor *imgspecv1.Descriptor, sharedBlobsDir string) error {\n\tblobPath, err := ref.blobPath(descriptor.Digest, sharedBlobsDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdest[descriptor.Digest]++\n\tswitch descriptor.MediaType {\n\tcase imgspecv1.MediaTypeImageManifest:\n\t\tmanifest, err := parseJSON[imgspecv1.Manifest](blobPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdest[manifest.Config.Digest]++\n\t\tfor _, layer := range manifest.Layers {\n\t\t\tdest[layer.Digest]++\n\t\t}\n\tcase imgspecv1.MediaTypeImageIndex:\n\t\tindex, err := parseIndex(blobPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := ref.countBlobsReferencedByIndex(dest, index, sharedBlobsDir); err != nil {\n\t\t\treturn err\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported mediaType in index: %q\", descriptor.MediaType)\n\t}\n\treturn nil\n}\n\n// countBlobsReferencedByIndex updates dest with usage counts of blobs required for index, EXCLUDING the index itself.\nfunc (ref ociReference) countBlobsReferencedByIndex(destination map[digest.Digest]int, index *imgspecv1.Index, sharedBlobsDir string) error {\n\tfor _, descriptor := range index.Manifests {\n\t\tif err := ref.countBlobsForDescriptor(destination, &descriptor, sharedBlobsDir); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// This takes in a map of the digest and their usage count in the manifest to be deleted\n// It will compare it to the digest usage in the root index, and return a set of the blobs that can be safely deleted\nfunc (ref ociReference) getBlobsToDelete(blobsUsedByDescriptorToDelete map[digest.Digest]int, sharedBlobsDir string) (*set.Set[digest.Digest], error) {\n\trootIndex, err := ref.getIndex()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tblobsUsedInRootIndex := make(map[digest.Digest]int)\n\terr = ref.countBlobsReferencedByIndex(blobsUsedInRootIndex, rootIndex, sharedBlobsDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tblobsToDelete := set.New[digest.Digest]()\n\n\tfor digest, count := range blobsUsedInRootIndex {\n\t\tif count-blobsUsedByDescriptorToDelete[digest] == 0 {\n\t\t\tblobsToDelete.Add(digest)\n\t\t}\n\t}\n\n\treturn blobsToDelete, nil\n}\n\n// This transport never generates layouts where blobs for an image are both in the local blobs directory\n// and the shared one; it’s either one or the other, depending on how OCISharedBlobDirPath is set.\n//\n// But we can’t correctly compute use counts for OCISharedBlobDirPath (because we don't know what\n// the other layouts sharing that directory are, and we might not even have permission to read them),\n// so we can’t really delete any blobs in that case.\n// Checking the _local_ blobs directory, and deleting blobs from there, doesn't really hurt,\n// in case the layout was created using some other tool or without OCISharedBlobDirPath set, so let's silently\n// check for local blobs (but we should make no noise if the blobs are actually in the shared directory).\n//\n// So, NOTE: the blobPath() call below hard-codes \"\" even in calls where OCISharedBlobDirPath is set\nfunc (ref ociReference) deleteBlobs(blobsToDelete *set.Set[digest.Digest]) error {\n\tfor digest := range blobsToDelete.All() {\n\t\tblobPath, err := ref.blobPath(digest, \"\") // Only delete in the local directory, see comment above\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = deleteBlob(blobPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc deleteBlob(blobPath string) error {\n\tlogrus.Debug(fmt.Sprintf(\"Deleting blob at %q\", blobPath))\n\n\terr := os.Remove(blobPath)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t} else {\n\t\treturn nil\n\t}\n}\n\nfunc (ref ociReference) deleteReferenceFromIndex(referenceIndex int) error {\n\tindex, err := ref.getIndex()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tindex.Manifests = slices.Delete(index.Manifests, referenceIndex, referenceIndex+1)\n\n\treturn saveJSON(ref.indexPath(), index)\n}\n\nfunc saveJSON(path string, content any) (retErr error) {\n\t// If the file already exists, get its mode to preserve it\n\tvar mode fs.FileMode\n\texistingfi, err := os.Stat(path)\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn err\n\t\t} else { // File does not exist, use default mode\n\t\t\tmode = 0o644\n\t\t}\n\t} else {\n\t\tmode = existingfi.Mode()\n\t}\n\n\tfile, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, mode)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// since we are writing to this file, make sure we handle errors\n\tdefer func() {\n\t\tcloseErr := file.Close()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\treturn json.NewEncoder(file).Encode(content)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/layout/oci_dest.go",
    "content": "package layout\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slices\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspec \"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/putblobdigest\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n)\n\ntype ociImageDestination struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.IgnoresOriginalOCIConfig\n\tstubs.NoPutBlobPartialInitialize\n\tstubs.NoSignaturesInitialize\n\n\tref           ociReference\n\tindex         imgspecv1.Index\n\tsharedBlobDir string\n}\n\n// newImageDestination returns an ImageDestination for writing to an existing directory.\nfunc newImageDestination(sys *types.SystemContext, ref ociReference) (private.ImageDestination, error) {\n\tif ref.sourceIndex != -1 {\n\t\treturn nil, fmt.Errorf(\"Destination reference must not contain a manifest index @%d\", ref.sourceIndex)\n\t}\n\tvar index *imgspecv1.Index\n\tif indexExists(ref) {\n\t\tvar err error\n\t\tindex, err = ref.getIndex()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tindex = &imgspecv1.Index{\n\t\t\tVersioned:   imgspec.Versioned{SchemaVersion: 2},\n\t\t\tMediaType:   imgspecv1.MediaTypeImageIndex,\n\t\t\tAnnotations: make(map[string]string),\n\t\t}\n\t}\n\n\tdesiredLayerCompression := types.Compress\n\tif sys != nil && sys.OCIAcceptUncompressedLayers {\n\t\tdesiredLayerCompression = types.PreserveOriginal\n\t}\n\n\td := &ociImageDestination{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tSupportedManifestMIMETypes: []string{\n\t\t\t\timgspecv1.MediaTypeImageManifest,\n\t\t\t\timgspecv1.MediaTypeImageIndex,\n\t\t\t},\n\t\t\tDesiredLayerCompression:        desiredLayerCompression,\n\t\t\tAcceptsForeignLayerURLs:        true,\n\t\t\tMustMatchRuntimeOS:             false,\n\t\t\tIgnoresEmbeddedDockerReference: false, // N/A, DockerReference() returns nil.\n\t\t\tHasThreadSafePutBlob:           true,\n\t\t}),\n\t\tNoPutBlobPartialInitialize: stubs.NoPutBlobPartial(ref),\n\t\tNoSignaturesInitialize:     stubs.NoSignatures(\"Pushing signatures for OCI images is not supported\"),\n\n\t\tref:   ref,\n\t\tindex: *index,\n\t}\n\td.Compat = impl.AddCompat(d)\n\tif sys != nil {\n\t\td.sharedBlobDir = sys.OCISharedBlobDirPath\n\t}\n\n\tif err := ensureDirectoryExists(d.ref.dir); err != nil {\n\t\treturn nil, err\n\t}\n\t// Per the OCI image specification, layouts MUST have a \"blobs\" subdirectory,\n\t// but it MAY be empty (e.g. if we never end up calling PutBlob)\n\t// https://github.com/opencontainers/image-spec/blame/7c889fafd04a893f5c5f50b7ab9963d5d64e5242/image-layout.md#L19\n\tif err := ensureDirectoryExists(filepath.Join(d.ref.dir, imgspecv1.ImageBlobsDir)); err != nil {\n\t\treturn nil, err\n\t}\n\treturn d, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (d *ociImageDestination) Reference() types.ImageReference {\n\treturn d.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *ociImageDestination) Close() error {\n\treturn nil\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *ociImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (_ private.UploadedBlob, retErr error) {\n\tblobFile, err := os.CreateTemp(d.ref.dir, \"oci-put-blob\")\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tsucceeded := false\n\texplicitClosed := false\n\tdefer func() {\n\t\tif !explicitClosed {\n\t\t\tcloseErr := blobFile.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}\n\t\tif !succeeded {\n\t\t\tos.Remove(blobFile.Name())\n\t\t}\n\t}()\n\n\tdigester, stream := putblobdigest.DigestIfCanonicalUnknown(stream, inputInfo)\n\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\tsize, err := io.Copy(blobFile, stream)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tblobDigest := digester.Digest()\n\tif inputInfo.Size != -1 && size != inputInfo.Size {\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"Size mismatch when copying %s, expected %d, got %d\", blobDigest, inputInfo.Size, size)\n\t}\n\n\tif err := d.blobFileSyncAndRename(blobFile, blobDigest, &explicitClosed); err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tsucceeded = true\n\treturn private.UploadedBlob{Digest: blobDigest, Size: size}, nil\n}\n\n// blobFileSyncAndRename syncs the specified blobFile on the filesystem and renames it to the\n// specific blob path determined by the blobDigest. The closed pointer indicates to the caller\n// whether blobFile has been closed or not.\nfunc (d *ociImageDestination) blobFileSyncAndRename(blobFile *os.File, blobDigest digest.Digest, closed *bool) error {\n\tif err := blobFile.Sync(); err != nil {\n\t\treturn err\n\t}\n\n\t// On POSIX systems, blobFile was created with mode 0600, so we need to make it readable.\n\t// On Windows, the “permissions of newly created files” argument to syscall.Open is\n\t// ignored and the file is already readable; besides, blobFile.Chmod, i.e. syscall.Fchmod,\n\t// always fails on Windows.\n\tif runtime.GOOS != \"windows\" {\n\t\tif err := blobFile.Chmod(0o644); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tblobPath, err := d.ref.blobPath(blobDigest, d.sharedBlobDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := ensureParentDirectoryExists(blobPath); err != nil {\n\t\treturn err\n\t}\n\n\t// need to explicitly close the file, since a rename won't otherwise work on Windows\n\terr = blobFile.Close()\n\tif err != nil {\n\t\treturn err\n\t}\n\t*closed = true\n\n\tif err := os.Rename(blobFile.Name(), blobPath); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *ociImageDestination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif !impl.OriginalCandidateMatchesTryReusingBlobOptions(options) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\tif info.Digest == \"\" {\n\t\treturn false, private.ReusedBlob{}, errors.New(\"Can not check for a blob with unknown digest\")\n\t}\n\tblobPath, err := d.ref.blobPath(info.Digest, d.sharedBlobDir)\n\tif err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\tfinfo, err := os.Stat(blobPath)\n\tif err != nil && os.IsNotExist(err) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\tif err != nil {\n\t\treturn false, private.ReusedBlob{}, err\n\t}\n\n\treturn true, private.ReusedBlob{Digest: info.Digest, Size: finfo.Size()}, nil\n}\n\n// PutManifest writes a manifest to the destination.  Per our list of supported manifest MIME types,\n// this should be either an OCI manifest (possibly converted to this format by the caller) or index,\n// neither of which we'll need to modify further.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to overwrite the manifest for (when\n// the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// It is expected but not enforced that the instanceDigest, when specified, matches the digest of `manifest` as generated\n// by `manifest.Digest()`.\n// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\nfunc (d *ociImageDestination) PutManifest(ctx context.Context, m []byte, instanceDigest *digest.Digest) error {\n\tvar digest digest.Digest\n\tvar err error\n\tif instanceDigest != nil {\n\t\tdigest = *instanceDigest\n\t} else {\n\t\tdigest, err = manifest.Digest(m)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tblobPath, err := d.ref.blobPath(digest, d.sharedBlobDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := ensureParentDirectoryExists(blobPath); err != nil {\n\t\treturn err\n\t}\n\tif err := os.WriteFile(blobPath, m, 0o644); err != nil {\n\t\treturn err\n\t}\n\n\tif instanceDigest != nil {\n\t\treturn nil\n\t}\n\n\t// If we had platform information, we'd build an imgspecv1.Platform structure here.\n\n\t// Start filling out the descriptor for this entry\n\tdesc := imgspecv1.Descriptor{}\n\tdesc.Digest = digest\n\tdesc.Size = int64(len(m))\n\tif d.ref.image != \"\" {\n\t\tdesc.Annotations = make(map[string]string)\n\t\tdesc.Annotations[imgspecv1.AnnotationRefName] = d.ref.image\n\t}\n\n\t// If we knew the MIME type, we wouldn't have to guess here.\n\tdesc.MediaType = manifest.GuessMIMEType(m)\n\n\td.addManifest(&desc)\n\n\treturn nil\n}\n\nfunc (d *ociImageDestination) addManifest(desc *imgspecv1.Descriptor) {\n\t// If the new entry has a name, remove any conflicting names which we already have.\n\tif desc.Annotations != nil && desc.Annotations[imgspecv1.AnnotationRefName] != \"\" {\n\t\t// The name is being set on a new entry, so remove any older ones that had the same name.\n\t\t// We might be storing an index and all of its component images, and we'll want to attach\n\t\t// the name to the last one, which is the index.\n\t\tfor i, manifest := range d.index.Manifests {\n\t\t\tif manifest.Annotations[imgspecv1.AnnotationRefName] == desc.Annotations[imgspecv1.AnnotationRefName] {\n\t\t\t\tdelete(d.index.Manifests[i].Annotations, imgspecv1.AnnotationRefName)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\t// If it has the same digest as another entry in the index, we already overwrote the file,\n\t// so just pick up the other information.\n\tfor i, manifest := range d.index.Manifests {\n\t\tif manifest.Digest == desc.Digest && manifest.Annotations[imgspecv1.AnnotationRefName] == \"\" {\n\t\t\t// Replace it completely.\n\t\t\td.index.Manifests[i] = *desc\n\t\t\treturn\n\t\t}\n\t}\n\t// It's a new entry to be added to the index. Use slices.Clone() to avoid a remote dependency on how d.index was created.\n\td.index.Manifests = append(slices.Clone(d.index.Manifests), *desc)\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *ociImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\tlayoutBytes, err := json.Marshal(imgspecv1.ImageLayout{\n\t\tVersion: imgspecv1.ImageLayoutVersion,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := os.WriteFile(d.ref.ociLayoutPath(), layoutBytes, 0o644); err != nil {\n\t\treturn err\n\t}\n\tindexJSON, err := json.Marshal(d.index)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn os.WriteFile(d.ref.indexPath(), indexJSON, 0o644)\n}\n\n// PutBlobFromLocalFileOption is unused but may receive functionality in the future.\ntype PutBlobFromLocalFileOption struct{}\n\n// PutBlobFromLocalFile arranges the data from path to be used as blob with digest.\n// It computes, and returns, the digest and size of the used file.\n//\n// This function can be used instead of dest.PutBlob() where the ImageDestination requires PutBlob() to be called.\nfunc PutBlobFromLocalFile(ctx context.Context, dest types.ImageDestination, file string, options ...PutBlobFromLocalFileOption) (_ digest.Digest, _ int64, retErr error) {\n\td, ok := dest.(*ociImageDestination)\n\tif !ok {\n\t\treturn \"\", -1, errors.New(\"caller error: PutBlobFromLocalFile called with a non-oci: destination\")\n\t}\n\n\tsucceeded := false\n\tblobFileClosed := false\n\tblobFile, err := os.CreateTemp(d.ref.dir, \"oci-put-blob\")\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\tdefer func() {\n\t\tif !blobFileClosed {\n\t\t\tcloseErr := blobFile.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}\n\t\tif !succeeded {\n\t\t\tos.Remove(blobFile.Name())\n\t\t}\n\t}()\n\n\tsrcFile, err := os.Open(file)\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\tdefer srcFile.Close()\n\n\terr = fileutils.ReflinkOrCopy(srcFile, blobFile)\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\n\t_, err = blobFile.Seek(0, io.SeekStart)\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\tblobDigest, err := digest.FromReader(blobFile)\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\n\tfileInfo, err := blobFile.Stat()\n\tif err != nil {\n\t\treturn \"\", -1, err\n\t}\n\n\tif err := d.blobFileSyncAndRename(blobFile, blobDigest, &blobFileClosed); err != nil {\n\t\treturn \"\", -1, err\n\t}\n\n\tsucceeded = true\n\treturn blobDigest, fileInfo.Size(), nil\n}\n\nfunc ensureDirectoryExists(path string) error {\n\tif err := fileutils.Exists(path); err != nil && errors.Is(err, fs.ErrNotExist) {\n\t\tif err := os.MkdirAll(path, 0o755); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ensureParentDirectoryExists ensures the parent of the supplied path exists.\nfunc ensureParentDirectoryExists(path string) error {\n\treturn ensureDirectoryExists(filepath.Dir(path))\n}\n\n// indexExists checks whether the index location specified in the OCI reference exists.\n// The implementation is opinionated, since in case of unexpected errors false is returned\nfunc indexExists(ref ociReference) bool {\n\terr := fileutils.Exists(ref.indexPath())\n\tif err == nil {\n\t\treturn true\n\t}\n\tif os.IsNotExist(err) {\n\t\treturn false\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/layout/oci_src.go",
    "content": "package layout\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/docker/go-connections/tlsconfig\"\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/pkg/tlsclientconfig\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n)\n\n// ImageNotFoundError is used when the OCI structure, in principle, exists and seems valid enough,\n// but nothing matches the “image” part of the provided reference.\ntype ImageNotFoundError struct {\n\tref ociReference\n\t// We may make members public, or add methods, in the future.\n}\n\nfunc (e ImageNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"no descriptor found for reference %q\", e.ref.image)\n}\n\ntype ociImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.NoSignatures\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.NoGetBlobAtInitialize\n\n\tref           ociReference\n\tindex         *imgspecv1.Index\n\tdescriptor    imgspecv1.Descriptor\n\tclient        *http.Client\n\tsharedBlobDir string\n}\n\n// newImageSource returns an ImageSource for reading from an existing directory.\nfunc newImageSource(sys *types.SystemContext, ref ociReference) (private.ImageSource, error) {\n\ttr := tlsclientconfig.NewTransport()\n\tif sys != nil && sys.BaseTLSConfig != nil {\n\t\ttr.TLSClientConfig = sys.BaseTLSConfig.Clone()\n\t} else {\n\t\ttr.TLSClientConfig = &tls.Config{\n\t\t\t// As of 2025-08, tlsconfig.ClientDefault() differs from Go 1.23 defaults only in CipherSuites;\n\t\t\t// so, limit us to only using that value. If go-connections/tlsconfig changes its policy, we\n\t\t\t// will want to consider that and make a decision whether to follow suit.\n\t\t\t// There is some chance that eventually the Go default will be to require TLS 1.3, and that point\n\t\t\t// we might want to drop the dependency on go-connections entirely.\n\t\t\tCipherSuites: tlsconfig.ClientDefault().CipherSuites,\n\t\t}\n\t}\n\n\tif sys != nil && sys.OCICertPath != \"\" {\n\t\tif err := tlsclientconfig.SetupCertificates(sys.OCICertPath, tr.TLSClientConfig); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttr.TLSClientConfig.InsecureSkipVerify = sys.OCIInsecureSkipTLSVerify\n\t}\n\n\tclient := &http.Client{}\n\tclient.Transport = tr\n\tdescriptor, _, err := ref.getManifestDescriptor()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tindex, err := ref.getIndex()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts := &ociImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: false,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),\n\n\t\tref:        ref,\n\t\tindex:      index,\n\t\tdescriptor: descriptor,\n\t\tclient:     client,\n\t}\n\tif sys != nil {\n\t\t// TODO(jonboulle): check dir existence?\n\t\ts.sharedBlobDir = sys.OCISharedBlobDirPath\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s, nil\n}\n\n// Reference returns the reference used to set up this source.\nfunc (s *ociImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\nfunc (s *ociImageSource) Close() error {\n\ts.client.CloseIdleConnections()\n\treturn nil\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *ociImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tvar dig digest.Digest\n\tvar mimeType string\n\tvar err error\n\n\tif instanceDigest == nil {\n\t\tdig = s.descriptor.Digest\n\t\tmimeType = s.descriptor.MediaType\n\t} else {\n\t\tdig = *instanceDigest\n\t\tfor _, md := range s.index.Manifests {\n\t\t\tif md.Digest == dig {\n\t\t\t\tmimeType = md.MediaType\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tmanifestPath, err := s.ref.blobPath(dig, s.sharedBlobDir)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tm, err := os.ReadFile(manifestPath)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif mimeType == \"\" {\n\t\tmimeType = manifest.GuessMIMEType(m)\n\t}\n\n\treturn m, mimeType, nil\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *ociImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tif len(info.URLs) != 0 {\n\t\tr, s, err := s.getExternalBlob(ctx, info.URLs)\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t} else if r != nil {\n\t\t\treturn r, s, nil\n\t\t}\n\t}\n\n\tpath, err := s.ref.blobPath(info.Digest, s.sharedBlobDir)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tr, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\tfi, err := r.Stat()\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\treturn r, fi.Size(), nil\n}\n\n// getExternalBlob returns the reader of the first available blob URL from urls, which must not be empty.\n// This function can return nil reader when no url is supported by this function. In this case, the caller\n// should fallback to fetch the non-external blob (i.e. pull from the registry).\nfunc (s *ociImageSource) getExternalBlob(ctx context.Context, urls []string) (io.ReadCloser, int64, error) {\n\tif len(urls) == 0 {\n\t\treturn nil, 0, errors.New(\"internal error: getExternalBlob called with no URLs\")\n\t}\n\n\terrWrap := errors.New(\"failed fetching external blob from all urls\")\n\thasSupportedURL := false\n\tfor _, u := range urls {\n\t\tif u, err := url.Parse(u); err != nil || (u.Scheme != \"http\" && u.Scheme != \"https\") {\n\t\t\tcontinue // unsupported url. skip this url.\n\t\t}\n\t\thasSupportedURL = true\n\t\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil)\n\t\tif err != nil {\n\t\t\terrWrap = fmt.Errorf(\"fetching %q failed %s: %w\", u, err.Error(), errWrap)\n\t\t\tcontinue\n\t\t}\n\n\t\tresp, err := s.client.Do(req)\n\t\tif err != nil {\n\t\t\terrWrap = fmt.Errorf(\"fetching %q failed %s: %w\", u, err.Error(), errWrap)\n\t\t\tcontinue\n\t\t}\n\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\tresp.Body.Close()\n\t\t\terrWrap = fmt.Errorf(\"fetching %q failed, response code not 200: %w\", u, errWrap)\n\t\t\tcontinue\n\t\t}\n\n\t\treturn resp.Body, getBlobSize(resp), nil\n\t}\n\tif !hasSupportedURL {\n\t\treturn nil, 0, nil // fallback to non-external blob\n\t}\n\n\treturn nil, 0, errWrap\n}\n\nfunc getBlobSize(resp *http.Response) int64 {\n\tsize, err := strconv.ParseInt(resp.Header.Get(\"Content-Length\"), 10, 64)\n\tif err != nil {\n\t\tsize = -1\n\t}\n\treturn size\n}\n\n// GetLocalBlobPath returns the local path to the blob file with the given digest.\n// The returned path is checked for existence so when a non existing digest is\n// given an error will be returned.\n//\n// Important: The returned path must be treated as read only, writing the file will\n// corrupt the oci layout as the digest no longer matches.\nfunc GetLocalBlobPath(ctx context.Context, src types.ImageSource, digest digest.Digest) (string, error) {\n\ts, ok := src.(*ociImageSource)\n\tif !ok {\n\t\treturn \"\", errors.New(\"caller error: GetLocalBlobPath called with a non-oci: source\")\n\t}\n\n\tpath, err := s.ref.blobPath(digest, s.sharedBlobDir)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif err := fileutils.Exists(path); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn path, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/layout/oci_transport.go",
    "content": "package layout\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/directory/explicitfilepath\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/oci/internal\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\nvar (\n\t// Transport is an ImageTransport for OCI directories.\n\tTransport = ociTransport{}\n\n\t// ErrMoreThanOneImage is an error returned when the manifest includes\n\t// more than one image and the user should choose which one to use.\n\tErrMoreThanOneImage = errors.New(\"more than one image in oci, choose an image\")\n)\n\ntype ociTransport struct{}\n\nfunc (t ociTransport) Name() string {\n\treturn \"oci\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t ociTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t ociTransport) ValidatePolicyConfigurationScope(scope string) error {\n\treturn internal.ValidateScope(scope)\n}\n\n// ociReference is an ImageReference for OCI directory paths.\ntype ociReference struct {\n\t// Note that the interpretation of paths below depends on the underlying filesystem state, which may change under us at any time!\n\t// Either of the paths may point to a different, or no, inode over time.  resolvedDir may contain symbolic links, and so on.\n\n\t// Generally we follow the intent of the user, and use the \"dir\" member for filesystem operations (e.g. the user can use a relative path to avoid\n\t// being exposed to symlinks and renames in the parent directories to the working directory).\n\t// (But in general, we make no attempt to be completely safe against concurrent hostile filesystem modifications.)\n\tdir         string // As specified by the user. May be relative, contain symlinks, etc.\n\tresolvedDir string // Absolute path with no symlinks, at least at the time of its creation. Primarily used for policy namespaces.\n\t// If image==\"\" && sourceIndex==-1, it means the \"only image\" in the index.json is used in the case it is a source\n\t// for destinations, the image name annotation \"image.ref.name\" is not added to the index.json.\n\t//\n\t// Must not be set if sourceIndex is set (the value is not -1).\n\timage string\n\t// If not -1, a zero-based index of an image in the manifest index. Valid only for sources.\n\t// Must not be set if image is set.\n\tsourceIndex int\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an OCI ImageReference.\nfunc ParseReference(reference string) (types.ImageReference, error) {\n\tdir, image, index, err := internal.ParseReferenceIntoElements(reference)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn newReference(dir, image, index)\n}\n\n// newReference returns an OCI reference for a directory, and an image name annotation or sourceIndex.\n//\n// If sourceIndex==-1, the index will not be valid to point out the source image, only image will be used.\n// We do not expose an API supplying the resolvedDir; we could, but recomputing it\n// is generally cheap enough that we prefer being confident about the properties of resolvedDir.\nfunc newReference(dir, image string, sourceIndex int) (types.ImageReference, error) {\n\tresolved, err := explicitfilepath.ResolvePathToFullyExplicit(dir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := internal.ValidateOCIPath(dir); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err = internal.ValidateImageName(image); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif sourceIndex != -1 && sourceIndex < 0 {\n\t\treturn nil, fmt.Errorf(\"Invalid oci: layout reference: index @%d must not be negative\", sourceIndex)\n\t}\n\tif sourceIndex != -1 && image != \"\" {\n\t\treturn nil, fmt.Errorf(\"Invalid oci: layout reference: cannot use both an image %s and a source index @%d\", image, sourceIndex)\n\t}\n\treturn ociReference{dir: dir, resolvedDir: resolved, image: image, sourceIndex: sourceIndex}, nil\n}\n\n// NewIndexReference returns an OCI reference for a path and a zero-based source manifest index.\nfunc NewIndexReference(dir string, sourceIndex int) (types.ImageReference, error) {\n\tif sourceIndex < 0 {\n\t\treturn nil, fmt.Errorf(\"invalid call to NewIndexReference with negative index %d\", sourceIndex)\n\t}\n\treturn newReference(dir, \"\", sourceIndex)\n}\n\n// NewReference returns an OCI reference for a directory and an optional image name annotation (if not \"\").\nfunc NewReference(dir, image string) (types.ImageReference, error) {\n\treturn newReference(dir, image, -1)\n}\n\nfunc (ref ociReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix.\nfunc (ref ociReference) StringWithinTransport() string {\n\tif ref.sourceIndex == -1 {\n\t\treturn fmt.Sprintf(\"%s:%s\", ref.dir, ref.image)\n\t}\n\treturn fmt.Sprintf(\"%s:@%d\", ref.dir, ref.sourceIndex)\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref ociReference) DockerReference() reference.Named {\n\treturn nil\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref ociReference) PolicyConfigurationIdentity() string {\n\t// NOTE: ref.image is not a part of the image identity, because \"$dir:$someimage\" and \"$dir:\" may mean the\n\t// same image and the two can’t be statically disambiguated.  Using at least the repository directory is\n\t// less granular but hopefully still useful.\n\treturn ref.resolvedDir\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref ociReference) PolicyConfigurationNamespaces() []string {\n\tres := []string{}\n\tpath := ref.resolvedDir\n\tfor {\n\t\tlastSlash := strings.LastIndex(path, \"/\")\n\t\t// Note that we do not include \"/\"; it is redundant with the default \"\" global default,\n\t\t// and rejected by ociTransport.ValidatePolicyConfigurationScope above.\n\t\tif lastSlash == -1 || path == \"/\" {\n\t\t\tbreak\n\t\t}\n\t\tres = append(res, path)\n\t\tpath = path[:lastSlash]\n\t}\n\treturn res\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref ociReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, ref)\n}\n\n// getIndex returns a pointer to the index references by this ociReference. If an error occurs opening an index nil is returned together\n// with an error.\nfunc (ref ociReference) getIndex() (*imgspecv1.Index, error) {\n\treturn parseIndex(ref.indexPath())\n}\n\nfunc parseIndex(path string) (*imgspecv1.Index, error) {\n\treturn parseJSON[imgspecv1.Index](path)\n}\n\nfunc parseJSON[T any](path string) (*T, error) {\n\tcontent, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer content.Close()\n\n\tobj := new(T)\n\tif err := json.NewDecoder(content).Decode(obj); err != nil {\n\t\treturn nil, err\n\t}\n\treturn obj, nil\n}\n\nfunc (ref ociReference) getManifestDescriptor() (imgspecv1.Descriptor, int, error) {\n\tindex, err := ref.getIndex()\n\tif err != nil {\n\t\treturn imgspecv1.Descriptor{}, -1, err\n\t}\n\n\tswitch {\n\tcase ref.image != \"\" && ref.sourceIndex != -1: // Coverage: newReference refuses to create such references.\n\t\treturn imgspecv1.Descriptor{}, -1, fmt.Errorf(\"Internal error: Cannot have both ref %s and source index @%d\",\n\t\t\tref.image, ref.sourceIndex)\n\n\tcase ref.sourceIndex != -1:\n\t\tif ref.sourceIndex >= len(index.Manifests) {\n\t\t\treturn imgspecv1.Descriptor{}, -1, fmt.Errorf(\"index %d is too large, only %d entries available\", ref.sourceIndex, len(index.Manifests))\n\t\t}\n\t\treturn index.Manifests[ref.sourceIndex], ref.sourceIndex, nil\n\n\tcase ref.image != \"\":\n\t\t// if image specified, look through all manifests for a match\n\t\tvar unsupportedMIMETypes []string\n\t\tfor i, md := range index.Manifests {\n\t\t\tif refName, ok := md.Annotations[imgspecv1.AnnotationRefName]; ok && refName == ref.image {\n\t\t\t\tif md.MediaType == imgspecv1.MediaTypeImageManifest || md.MediaType == imgspecv1.MediaTypeImageIndex || md.MediaType == manifest.DockerV2Schema2MediaType || md.MediaType == manifest.DockerV2ListMediaType {\n\t\t\t\t\treturn md, i, nil\n\t\t\t\t}\n\t\t\t\tunsupportedMIMETypes = append(unsupportedMIMETypes, md.MediaType)\n\t\t\t}\n\t\t}\n\t\tif len(unsupportedMIMETypes) != 0 {\n\t\t\treturn imgspecv1.Descriptor{}, -1, fmt.Errorf(\"reference %q matches unsupported manifest MIME types %q\", ref.image, unsupportedMIMETypes)\n\t\t}\n\t\treturn imgspecv1.Descriptor{}, -1, ImageNotFoundError{ref}\n\n\tdefault:\n\t\t// return manifest if only one image is in the oci directory\n\t\tif len(index.Manifests) != 1 {\n\t\t\t// ask user to choose image when more than one image in the oci directory\n\t\t\treturn imgspecv1.Descriptor{}, -1, ErrMoreThanOneImage\n\t\t}\n\t\treturn index.Manifests[0], 0, nil\n\t}\n}\n\n// LoadManifestDescriptor loads the manifest descriptor to be used to retrieve the image name\n// when pulling an image\nfunc LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, error) {\n\tociRef, ok := imgRef.(ociReference)\n\tif !ok {\n\t\treturn imgspecv1.Descriptor{}, errors.New(\"error typecasting, need type ociRef\")\n\t}\n\tmd, _, err := ociRef.getManifestDescriptor()\n\treturn md, err\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref ociReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref ociReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(sys, ref)\n}\n\n// ociLayoutPath returns a path for the oci-layout within a directory using OCI conventions.\nfunc (ref ociReference) ociLayoutPath() string {\n\treturn filepath.Join(ref.dir, imgspecv1.ImageLayoutFile)\n}\n\n// indexPath returns a path for the index.json within a directory using OCI conventions.\nfunc (ref ociReference) indexPath() string {\n\treturn filepath.Join(ref.dir, imgspecv1.ImageIndexFile)\n}\n\n// blobPath returns a path for a blob within a directory using OCI image-layout conventions.\nfunc (ref ociReference) blobPath(digest digest.Digest, sharedBlobDir string) (string, error) {\n\tif err := digest.Validate(); err != nil {\n\t\treturn \"\", fmt.Errorf(\"unexpected digest reference %s: %w\", digest, err)\n\t}\n\tvar blobDir string\n\tif sharedBlobDir != \"\" {\n\t\tblobDir = sharedBlobDir\n\t} else {\n\t\tblobDir = filepath.Join(ref.dir, imgspecv1.ImageBlobsDir)\n\t}\n\treturn filepath.Join(blobDir, digest.Algorithm().String(), digest.Encoded()), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/oci/layout/reader.go",
    "content": "package layout\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// This file is named reader.go for consistency with other transports’\n// handling of “image containers”, but we don’t actually need a stateful reader object.\n\n// ListResult wraps the image reference and the manifest for loading\ntype ListResult struct {\n\tReference          types.ImageReference\n\tManifestDescriptor imgspecv1.Descriptor\n}\n\n// List returns a slice of manifests included in the archive\nfunc List(dir string) ([]ListResult, error) {\n\tvar res []ListResult\n\n\tindexJSON, err := os.ReadFile(filepath.Join(dir, imgspecv1.ImageIndexFile))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar index imgspecv1.Index\n\tif err := json.Unmarshal(indexJSON, &index); err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor manifestIndex, md := range index.Manifests {\n\t\trefName := md.Annotations[imgspecv1.AnnotationRefName]\n\t\tindex := -1\n\t\tif refName == \"\" {\n\t\t\tindex = manifestIndex\n\t\t}\n\t\tref, err := newReference(dir, refName, index)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error creating image reference: %w\", err)\n\t\t}\n\t\treference := ListResult{\n\t\t\tReference:          ref,\n\t\t\tManifestDescriptor: md,\n\t\t}\n\t\tres = append(res, reference)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/openshift/openshift-copies.go",
    "content": "package openshift\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/netip\"\n\t\"net/url\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"dario.cat/mergo\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// restTLSClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/restclient.TLSClientConfig.\n// restTLSClientConfig contains settings to enable transport layer security\ntype restTLSClientConfig struct {\n\t// Server requires TLS client certificate authentication\n\tCertFile string\n\t// Server requires TLS client certificate authentication\n\tKeyFile string\n\t// Trusted root certificates for server\n\tCAFile string\n\n\t// CertData holds PEM-encoded bytes (typically read from a client certificate file).\n\t// CertData takes precedence over CertFile\n\tCertData []byte\n\t// KeyData holds PEM-encoded bytes (typically read from a client certificate key file).\n\t// KeyData takes precedence over KeyFile\n\tKeyData []byte\n\t// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).\n\t// CAData takes precedence over CAFile\n\tCAData []byte\n}\n\n// restConfig is a modified copy of k8s.io/kubernetes/pkg/client/restclient.Config.\n// Config holds the common attributes that can be passed to a Kubernetes client on\n// initialization.\ntype restConfig struct {\n\t// Host must be a host string, a host:port pair, or a URL to the base of the apiserver.\n\t// If a URL is given then the (optional) Path of that URL represents a prefix that must\n\t// be appended to all request URIs used to access the apiserver. This allows a frontend\n\t// proxy to easily relocate all of the apiserver endpoints.\n\tHost string\n\n\t// Server requires Basic authentication\n\tUsername string\n\tPassword string\n\n\t// Server requires Bearer authentication. This client will not attempt to use\n\t// refresh tokens for an OAuth2 flow.\n\t// TODO: demonstrate an OAuth2 compatible client.\n\tBearerToken string\n\n\t// TLSClientConfig contains settings to enable transport layer security\n\tTLSClientConfig restTLSClientConfig\n\n\t// Server should be accessed without verifying the TLS\n\t// certificate. For testing only.\n\tInsecure bool\n}\n\n// ClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfig.\n// ClientConfig is used to make it easy to get an api server client\ntype clientConfig interface {\n\t// ClientConfig returns a complete client config\n\tClientConfig() (*restConfig, error)\n}\n\n// defaultClientConfig is a modified copy of openshift/origin/pkg/cmd/util/clientcmd.DefaultClientConfig.\nfunc defaultClientConfig() clientConfig {\n\tloadingRules := newOpenShiftClientConfigLoadingRules()\n\t// REMOVED: Allowing command-line overriding of loadingRules\n\t// REMOVED: clientcmd.ConfigOverrides\n\n\tclientConfig := newNonInteractiveDeferredLoadingClientConfig(loadingRules)\n\n\treturn clientConfig\n}\n\nvar recommendedHomeFile = path.Join(homedir.Get(), \".kube/config\")\n\n// newOpenShiftClientConfigLoadingRules is a modified copy of openshift/origin/pkg/cmd/cli/config.NewOpenShiftClientConfigLoadingRules.\n// NewOpenShiftClientConfigLoadingRules returns file priority loading rules for OpenShift.\n// 1. --config value\n// 2. if KUBECONFIG env var has a value, use it. Otherwise, ~/.kube/config file\nfunc newOpenShiftClientConfigLoadingRules() *clientConfigLoadingRules {\n\tchain := []string{}\n\n\tenvVarFile := os.Getenv(\"KUBECONFIG\")\n\tif len(envVarFile) != 0 {\n\t\tchain = append(chain, filepath.SplitList(envVarFile)...)\n\t} else {\n\t\tchain = append(chain, recommendedHomeFile)\n\t}\n\n\treturn &clientConfigLoadingRules{\n\t\tPrecedence: chain,\n\t\t// REMOVED: Migration support; run (oc login) to trigger migration\n\t}\n}\n\n// deferredLoadingClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DeferredLoadingClientConfig.\n// DeferredLoadingClientConfig is a ClientConfig interface that is backed by a set of loading rules\n// It is used in cases where the loading rules may change after you've instantiated them and you want to be sure that\n// the most recent rules are used.  This is useful in cases where you bind flags to loading rule parameters before\n// the parse happens and you want your calling code to be ignorant of how the values are being mutated to avoid\n// passing extraneous information down a call stack\ntype deferredLoadingClientConfig struct {\n\tloadingRules *clientConfigLoadingRules\n\n\tclientConfig clientConfig\n}\n\n// NewNonInteractiveDeferredLoadingClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.NewNonInteractiveDeferredLoadingClientConfig.\n// NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name\nfunc newNonInteractiveDeferredLoadingClientConfig(loadingRules *clientConfigLoadingRules) clientConfig {\n\treturn &deferredLoadingClientConfig{loadingRules: loadingRules}\n}\n\nfunc (config *deferredLoadingClientConfig) createClientConfig() (clientConfig, error) {\n\tif config.clientConfig == nil {\n\t\t// REMOVED: Support for concurrent use in multiple threads.\n\t\tmergedConfig, err := config.loadingRules.Load()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// REMOVED: Interactive fallback support.\n\t\tmergedClientConfig := newNonInteractiveClientConfig(*mergedConfig)\n\n\t\tconfig.clientConfig = mergedClientConfig\n\t}\n\n\treturn config.clientConfig, nil\n}\n\n// ClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DeferredLoadingClientConfig.ClientConfig.\n// ClientConfig implements ClientConfig\nfunc (config *deferredLoadingClientConfig) ClientConfig() (*restConfig, error) {\n\tmergedClientConfig, err := config.createClientConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmergedConfig, err := mergedClientConfig.ClientConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// REMOVED: In-cluster service account configuration use.\n\n\treturn mergedConfig, nil\n}\n\nvar (\n\t// DefaultCluster is the cluster config used when no other config is specified\n\t// TODO: eventually apiserver should start on 443 and be secure by default\n\tdefaultCluster = clientcmdCluster{Server: \"http://localhost:8080\"}\n\n\t// EnvVarCluster allows overriding the DefaultCluster using an envvar for the server name\n\tenvVarCluster = clientcmdCluster{Server: os.Getenv(\"KUBERNETES_MASTER\")}\n)\n\n// directClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.\n// DirectClientConfig is a ClientConfig interface that is backed by a clientcmdapi.Config, options overrides, and an optional fallbackReader for auth information\ntype directClientConfig struct {\n\tconfig clientcmdConfig\n}\n\n// newNonInteractiveClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.NewNonInteractiveClientConfig.\n// NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information\nfunc newNonInteractiveClientConfig(config clientcmdConfig) clientConfig {\n\treturn &directClientConfig{config}\n}\n\n// ClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.ClientConfig.\n// ClientConfig implements ClientConfig\nfunc (config *directClientConfig) ClientConfig() (*restConfig, error) {\n\tif err := config.ConfirmUsable(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfigAuthInfo := config.getAuthInfo()\n\tconfigClusterInfo := config.getCluster()\n\n\tclientConfig := &restConfig{}\n\tclientConfig.Host = configClusterInfo.Server\n\tif u, err := url.ParseRequestURI(clientConfig.Host); err == nil && u.Opaque == \"\" && len(u.Path) > 1 {\n\t\tu.RawQuery = \"\"\n\t\tu.Fragment = \"\"\n\t\tclientConfig.Host = u.String()\n\t}\n\n\t// only try to read the auth information if we are secure\n\tif isConfigTransportTLS(*clientConfig) {\n\t\tvar err error\n\t\t// REMOVED: Support for interactive fallback.\n\t\tuserAuthPartialConfig := getUserIdentificationPartialConfig(configAuthInfo)\n\t\tif err = mergo.MergeWithOverwrite(clientConfig, userAuthPartialConfig); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tserverAuthPartialConfig, err := getServerIdentificationPartialConfig(configClusterInfo)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err = mergo.MergeWithOverwrite(clientConfig, serverAuthPartialConfig); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn clientConfig, nil\n}\n\n// getServerIdentificationPartialConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.getServerIdentificationPartialConfig.\n// clientauth.Info object contain both user identification and server identification.  We want different precedence orders for\n// both, so we have to split the objects and merge them separately\n// we want this order of precedence for the server identification\n// 1.  configClusterInfo (the final result of command line flags and merged .kubeconfig files)\n// 2.  configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)\n// 3.  load the ~/.kubernetes_auth file as a default\nfunc getServerIdentificationPartialConfig(configClusterInfo clientcmdCluster) (*restConfig, error) {\n\tmergedConfig := &restConfig{}\n\n\t// configClusterInfo holds the information identify the server provided by .kubeconfig\n\tconfigClientConfig := &restConfig{}\n\tconfigClientConfig.TLSClientConfig.CAFile = configClusterInfo.CertificateAuthority\n\tconfigClientConfig.TLSClientConfig.CAData = configClusterInfo.CertificateAuthorityData\n\tconfigClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify\n\tif err := mergo.MergeWithOverwrite(mergedConfig, configClientConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn mergedConfig, nil\n}\n\n// getUserIdentificationPartialConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.getUserIdentificationPartialConfig.\n// clientauth.Info object contain both user identification and server identification.  We want different precedence orders for\n// both, so we have to split the objects and merge them separately\n// we want this order of precedence for user identification\n// 1.  configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files)\n// 2.  configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)\n// 3.  if there is not enough information to identify the user, load try the ~/.kubernetes_auth file\n// 4.  if there is not enough information to identify the user, prompt if possible\nfunc getUserIdentificationPartialConfig(configAuthInfo clientcmdAuthInfo) *restConfig {\n\tmergedConfig := &restConfig{}\n\n\t// blindly overwrite existing values based on precedence\n\tif len(configAuthInfo.Token) > 0 {\n\t\tmergedConfig.BearerToken = configAuthInfo.Token\n\t}\n\tif len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 {\n\t\tmergedConfig.TLSClientConfig.CertFile = configAuthInfo.ClientCertificate\n\t\tmergedConfig.TLSClientConfig.CertData = configAuthInfo.ClientCertificateData\n\t\tmergedConfig.TLSClientConfig.KeyFile = configAuthInfo.ClientKey\n\t\tmergedConfig.TLSClientConfig.KeyData = configAuthInfo.ClientKeyData\n\t}\n\tif len(configAuthInfo.Username) > 0 || len(configAuthInfo.Password) > 0 {\n\t\tmergedConfig.Username = configAuthInfo.Username\n\t\tmergedConfig.Password = configAuthInfo.Password\n\t}\n\n\t// REMOVED: prompting for missing information.\n\treturn mergedConfig\n}\n\n// ConfirmUsable is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.ConfirmUsable.\n// ConfirmUsable looks a particular context and determines if that particular part of the config is usable.  There might still be errors in the config,\n// but no errors in the sections requested or referenced.  It does not return early so that it can find as many errors as possible.\nfunc (config *directClientConfig) ConfirmUsable() error {\n\tvar validationErrors []error\n\tvalidationErrors = append(validationErrors, validateAuthInfo(config.getAuthInfoName(), config.getAuthInfo())...)\n\tvalidationErrors = append(validationErrors, validateClusterInfo(config.getClusterName(), config.getCluster())...)\n\t// when direct client config is specified, and our only error is that no server is defined, we should\n\t// return a standard \"no config\" error\n\tif len(validationErrors) == 1 && validationErrors[0] == errEmptyCluster {\n\t\treturn newErrConfigurationInvalid([]error{errEmptyConfig})\n\t}\n\treturn newErrConfigurationInvalid(validationErrors)\n}\n\n// getContextName is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getContextName.\nfunc (config *directClientConfig) getContextName() string {\n\t// REMOVED: overrides support\n\treturn config.config.CurrentContext\n}\n\n// getAuthInfoName is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getAuthInfoName.\nfunc (config *directClientConfig) getAuthInfoName() string {\n\t// REMOVED: overrides support\n\treturn config.getContext().AuthInfo\n}\n\n// getClusterName is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getClusterName.\nfunc (config *directClientConfig) getClusterName() string {\n\t// REMOVED: overrides support\n\treturn config.getContext().Cluster\n}\n\n// getContext is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getContext.\nfunc (config *directClientConfig) getContext() clientcmdContext {\n\tcontexts := config.config.Contexts\n\tcontextName := config.getContextName()\n\n\tvar mergedContext clientcmdContext\n\tif configContext, exists := contexts[contextName]; exists {\n\t\tif err := mergo.MergeWithOverwrite(&mergedContext, configContext); err != nil {\n\t\t\tlogrus.Debugf(\"Can't merge configContext: %v\", err)\n\t\t}\n\t}\n\t// REMOVED: overrides support\n\n\treturn mergedContext\n}\n\nvar (\n\terrEmptyConfig = errors.New(\"no configuration has been provided\")\n\t// message is for consistency with old behavior\n\terrEmptyCluster = errors.New(\"cluster has no server defined\")\n)\n\n// helper for checking certificate/key/CA\nfunc validateFileIsReadable(name string) error {\n\tanswer, err := os.Open(name)\n\tdefer func() {\n\t\tif err := answer.Close(); err != nil {\n\t\t\tlogrus.Debugf(\"Error closing %v: %v\", name, err)\n\t\t}\n\t}()\n\treturn err\n}\n\n// validateClusterInfo is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.validateClusterInfo.\n// validateClusterInfo looks for conflicts and errors in the cluster info\nfunc validateClusterInfo(clusterName string, clusterInfo clientcmdCluster) []error {\n\tvar validationErrors []error\n\n\tif reflect.DeepEqual(clientcmdCluster{}, clusterInfo) {\n\t\treturn []error{errEmptyCluster}\n\t}\n\n\tif len(clusterInfo.Server) == 0 {\n\t\tif len(clusterName) == 0 {\n\t\t\tvalidationErrors = append(validationErrors, errors.New(\"default cluster has no server defined\"))\n\t\t} else {\n\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"no server found for cluster %q\", clusterName))\n\t\t}\n\t}\n\t// Make sure CA data and CA file aren't both specified\n\tif len(clusterInfo.CertificateAuthority) != 0 && len(clusterInfo.CertificateAuthorityData) != 0 {\n\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"certificate-authority-data and certificate-authority are both specified for %v. certificate-authority-data will override\", clusterName))\n\t}\n\tif len(clusterInfo.CertificateAuthority) != 0 {\n\t\terr := validateFileIsReadable(clusterInfo.CertificateAuthority)\n\t\tif err != nil {\n\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"unable to read certificate-authority %v for %v due to %w\", clusterInfo.CertificateAuthority, clusterName, err))\n\t\t}\n\t}\n\n\treturn validationErrors\n}\n\n// validateAuthInfo is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.validateAuthInfo.\n// validateAuthInfo looks for conflicts and errors in the auth info\nfunc validateAuthInfo(authInfoName string, authInfo clientcmdAuthInfo) []error {\n\tvar validationErrors []error\n\n\tusingAuthPath := false\n\tmethods := make([]string, 0, 3)\n\tif len(authInfo.Token) != 0 {\n\t\tmethods = append(methods, \"token\")\n\t}\n\tif len(authInfo.Username) != 0 || len(authInfo.Password) != 0 {\n\t\tmethods = append(methods, \"basicAuth\")\n\t}\n\n\tif len(authInfo.ClientCertificate) != 0 || len(authInfo.ClientCertificateData) != 0 {\n\t\t// Make sure cert data and file aren't both specified\n\t\tif len(authInfo.ClientCertificate) != 0 && len(authInfo.ClientCertificateData) != 0 {\n\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"client-cert-data and client-cert are both specified for %v. client-cert-data will override\", authInfoName))\n\t\t}\n\t\t// Make sure key data and file aren't both specified\n\t\tif len(authInfo.ClientKey) != 0 && len(authInfo.ClientKeyData) != 0 {\n\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"client-key-data and client-key are both specified for %v; client-key-data will override\", authInfoName))\n\t\t}\n\t\t// Make sure a key is specified\n\t\tif len(authInfo.ClientKey) == 0 && len(authInfo.ClientKeyData) == 0 {\n\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"client-key-data or client-key must be specified for %v to use the clientCert authentication method\", authInfoName))\n\t\t}\n\n\t\tif len(authInfo.ClientCertificate) != 0 {\n\t\t\terr := validateFileIsReadable(authInfo.ClientCertificate)\n\t\t\tif err != nil {\n\t\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"unable to read client-cert %v for %v due to %w\", authInfo.ClientCertificate, authInfoName, err))\n\t\t\t}\n\t\t}\n\t\tif len(authInfo.ClientKey) != 0 {\n\t\t\terr := validateFileIsReadable(authInfo.ClientKey)\n\t\t\tif err != nil {\n\t\t\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"unable to read client-key %v for %v due to %w\", authInfo.ClientKey, authInfoName, err))\n\t\t\t}\n\t\t}\n\t}\n\n\t// authPath also provides information for the client to identify the server, so allow multiple auth methods in that case\n\tif (len(methods) > 1) && (!usingAuthPath) {\n\t\tvalidationErrors = append(validationErrors, fmt.Errorf(\"more than one authentication method found for %v; found %v, only one is allowed\", authInfoName, methods))\n\t}\n\n\treturn validationErrors\n}\n\n// getAuthInfo is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getAuthInfo.\nfunc (config *directClientConfig) getAuthInfo() clientcmdAuthInfo {\n\tauthInfos := config.config.AuthInfos\n\tauthInfoName := config.getAuthInfoName()\n\n\tvar mergedAuthInfo clientcmdAuthInfo\n\tif configAuthInfo, exists := authInfos[authInfoName]; exists {\n\t\tif err := mergo.MergeWithOverwrite(&mergedAuthInfo, configAuthInfo); err != nil {\n\t\t\tlogrus.Debugf(\"Can't merge configAuthInfo: %v\", err)\n\t\t}\n\t}\n\t// REMOVED: overrides support\n\n\treturn mergedAuthInfo\n}\n\n// getCluster is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DirectClientConfig.getCluster.\nfunc (config *directClientConfig) getCluster() clientcmdCluster {\n\tclusterInfos := config.config.Clusters\n\tclusterInfoName := config.getClusterName()\n\n\tvar mergedClusterInfo clientcmdCluster\n\tif err := mergo.MergeWithOverwrite(&mergedClusterInfo, defaultCluster); err != nil {\n\t\tlogrus.Debugf(\"Can't merge defaultCluster: %v\", err)\n\t}\n\tif err := mergo.MergeWithOverwrite(&mergedClusterInfo, envVarCluster); err != nil {\n\t\tlogrus.Debugf(\"Can't merge envVarCluster: %v\", err)\n\t}\n\tif configClusterInfo, exists := clusterInfos[clusterInfoName]; exists {\n\t\tif err := mergo.MergeWithOverwrite(&mergedClusterInfo, configClusterInfo); err != nil {\n\t\t\tlogrus.Debugf(\"Can't merge configClusterInfo: %v\", err)\n\t\t}\n\t}\n\t// REMOVED: overrides support\n\n\treturn mergedClusterInfo\n}\n\n// newAggregate is a modified copy of k8s.io/apimachinery/pkg/util/errors.NewAggregate.\n// NewAggregate converts a slice of errors into an Aggregate interface, which\n// is itself an implementation of the error interface.  If the slice is empty,\n// this returns nil.\n// It will check if any of the element of input error list is nil, to avoid\n// nil pointer panic when call Error().\nfunc newAggregate(errlist []error) error {\n\tif len(errlist) == 0 {\n\t\treturn nil\n\t}\n\t// In case of input error list contains nil\n\tvar errs []error\n\tfor _, e := range errlist {\n\t\tif e != nil {\n\t\t\terrs = append(errs, e)\n\t\t}\n\t}\n\tif len(errs) == 0 {\n\t\treturn nil\n\t}\n\treturn multierr.Format(\"[\", \", \", \"]\", errs)\n}\n\n// errConfigurationInvalid is a modified? copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.errConfigurationInvalid.\n// errConfigurationInvalid is a set of errors indicating the configuration is invalid.\ntype errConfigurationInvalid []error\n\nvar _ error = errConfigurationInvalid{}\n\n// REMOVED: utilerrors.Aggregate implementation for errConfigurationInvalid.\n\n// newErrConfigurationInvalid is a modified? copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.newErrConfigurationInvalid.\nfunc newErrConfigurationInvalid(errs []error) error {\n\tswitch len(errs) {\n\tcase 0:\n\t\treturn nil\n\tdefault:\n\t\treturn errConfigurationInvalid(errs)\n\t}\n}\n\n// Error implements the error interface\nfunc (e errConfigurationInvalid) Error() string {\n\treturn fmt.Sprintf(\"invalid configuration: %v\", newAggregate(e).Error())\n}\n\n// clientConfigLoadingRules is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules\n// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config\n// Callers can put the chain together however they want, but we'd recommend:\n// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath\n// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if this file is not present\ntype clientConfigLoadingRules struct {\n\tPrecedence []string\n}\n\n// Load is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.Load\n// Load starts by running the MigrationRules and then\n// takes the loading rules and returns a Config object based on following rules.\n//\n//   - if the ExplicitPath, return the unmerged explicit file\n//   - Otherwise, return a merged config based on the Precedence slice\n//\n// A missing ExplicitPath file produces an error. Empty filenames or other missing files are ignored.\n// Read errors or files with non-deserializable content produce errors.\n// The first file to set a particular map key wins and map key's value is never changed.\n// BUT, if you set a struct value that is NOT contained inside of map, the value WILL be changed.\n// This results in some odd looking logic to merge in one direction, merge in the other, and then merge the two.\n// It also means that if two files specify a \"red-user\", only values from the first file's red-user are used.  Even\n// non-conflicting entries from the second file's \"red-user\" are discarded.\n// Relative paths inside of the .kubeconfig files are resolved against the .kubeconfig file's parent folder\n// and only absolute file paths are returned.\nfunc (rules *clientConfigLoadingRules) Load() (*clientcmdConfig, error) {\n\terrlist := []error{}\n\n\tkubeConfigFiles := []string{}\n\n\t// REMOVED: explicit path support\n\tkubeConfigFiles = append(kubeConfigFiles, rules.Precedence...)\n\n\tkubeconfigs := []*clientcmdConfig{}\n\t// read and cache the config files so that we only look at them once\n\tfor _, filename := range kubeConfigFiles {\n\t\tif len(filename) == 0 {\n\t\t\t// no work to do\n\t\t\tcontinue\n\t\t}\n\n\t\tconfig, err := loadFromFile(filename)\n\t\tif os.IsNotExist(err) {\n\t\t\t// skip missing files\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\terrlist = append(errlist, fmt.Errorf(\"loading config file %q: %w\", filename, err))\n\t\t\tcontinue\n\t\t}\n\n\t\tkubeconfigs = append(kubeconfigs, config)\n\t}\n\n\t// first merge all of our maps\n\tmapConfig := clientcmdNewConfig()\n\tfor _, kubeconfig := range kubeconfigs {\n\t\tif err := mergo.MergeWithOverwrite(mapConfig, kubeconfig); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// merge all of the struct values in the reverse order so that priority is given correctly\n\t// errors are not added to the list the second time\n\tnonMapConfig := clientcmdNewConfig()\n\tfor _, kubeconfig := range slices.Backward(kubeconfigs) {\n\t\tif err := mergo.MergeWithOverwrite(nonMapConfig, kubeconfig); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and\n\t// get the values we expect.\n\tconfig := clientcmdNewConfig()\n\tif err := mergo.MergeWithOverwrite(config, mapConfig); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := mergo.MergeWithOverwrite(config, nonMapConfig); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// REMOVED: Possibility to skip this.\n\tif err := resolveLocalPaths(config); err != nil {\n\t\terrlist = append(errlist, err)\n\t}\n\n\treturn config, newAggregate(errlist)\n}\n\n// loadFromFile is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.LoadFromFile\n// LoadFromFile takes a filename and deserializes the contents into Config object\nfunc loadFromFile(filename string) (*clientcmdConfig, error) {\n\tkubeconfigBytes, err := os.ReadFile(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tconfig, err := load(kubeconfigBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// set LocationOfOrigin on every Cluster, User, and Context\n\tfor key, obj := range config.AuthInfos {\n\t\tobj.LocationOfOrigin = filename\n\t\tconfig.AuthInfos[key] = obj\n\t}\n\tfor key, obj := range config.Clusters {\n\t\tobj.LocationOfOrigin = filename\n\t\tconfig.Clusters[key] = obj\n\t}\n\tfor key, obj := range config.Contexts {\n\t\tobj.LocationOfOrigin = filename\n\t\tconfig.Contexts[key] = obj\n\t}\n\n\tif config.AuthInfos == nil {\n\t\tconfig.AuthInfos = map[string]*clientcmdAuthInfo{}\n\t}\n\tif config.Clusters == nil {\n\t\tconfig.Clusters = map[string]*clientcmdCluster{}\n\t}\n\tif config.Contexts == nil {\n\t\tconfig.Contexts = map[string]*clientcmdContext{}\n\t}\n\n\treturn config, nil\n}\n\n// load is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.Load\n// Load takes a byte slice and deserializes the contents into Config object.\n// Encapsulates deserialization without assuming the source is a file.\nfunc load(data []byte) (*clientcmdConfig, error) {\n\tconfig := clientcmdNewConfig()\n\t// if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input)\n\tif len(data) == 0 {\n\t\treturn config, nil\n\t}\n\t// Note: This does absolutely no kind/version checking or conversions.\n\tif err := yaml.Unmarshal(data, config); err != nil {\n\t\treturn nil, err\n\t}\n\treturn config, nil\n}\n\n// resolveLocalPaths is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.resolveLocalPaths.\n// ResolveLocalPaths resolves all relative paths in the config object with respect to the stanza's LocationOfOrigin\n// this cannot be done directly inside of LoadFromFile because doing so there would make it impossible to load a file without\n// modification of its contents.\nfunc resolveLocalPaths(config *clientcmdConfig) error {\n\tfor _, cluster := range config.Clusters {\n\t\tif len(cluster.LocationOfOrigin) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tbase, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Could not determine the absolute path of config file %s: %w\", cluster.LocationOfOrigin, err)\n\t\t}\n\n\t\tif err := resolvePaths(getClusterFileReferences(cluster), base); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tfor _, authInfo := range config.AuthInfos {\n\t\tif len(authInfo.LocationOfOrigin) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tbase, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Could not determine the absolute path of config file %s: %w\", authInfo.LocationOfOrigin, err)\n\t\t}\n\n\t\tif err := resolvePaths(getAuthInfoFileReferences(authInfo), base); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// getClusterFileReferences is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.GetClusterFileReferences.\nfunc getClusterFileReferences(cluster *clientcmdCluster) []*string {\n\treturn []*string{&cluster.CertificateAuthority}\n}\n\n// getAuthInfoFileReferences is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.GetAuthInfoFileReferences.\nfunc getAuthInfoFileReferences(authInfo *clientcmdAuthInfo) []*string {\n\treturn []*string{&authInfo.ClientCertificate, &authInfo.ClientKey}\n}\n\n// resolvePaths is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.resolvePaths.\n// ResolvePaths updates the given refs to be absolute paths, relative to the given base directory\nfunc resolvePaths(refs []*string, base string) error {\n\tfor _, ref := range refs {\n\t\t// Don't resolve empty paths\n\t\tif len(*ref) > 0 {\n\t\t\t// Don't resolve absolute paths\n\t\t\tif !filepath.IsAbs(*ref) {\n\t\t\t\t*ref = filepath.Join(base, *ref)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// restClientFor is a modified copy of k8s.io/kubernetes/pkg/client/restclient.RESTClientFor.\n// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config\n// object. Note that a RESTClient may require fields that are optional when initializing a Client.\n// A RESTClient created by this method is generic - it expects to operate on an API that follows\n// the Kubernetes conventions, but may not be the Kubernetes API.\nfunc restClientFor(sys *types.SystemContext, config *restConfig) (*url.URL, *http.Client, error) {\n\t// REMOVED: Configurable GroupVersion, Codec\n\t// REMOVED: Configurable versionedAPIPath\n\tbaseURL, err := defaultServerURLFor(config)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\ttransport, err := transportFor(sys, config)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tvar httpClient *http.Client\n\tif transport != http.DefaultTransport {\n\t\thttpClient = &http.Client{Transport: transport}\n\t}\n\n\t// REMOVED: Configurable QPS, Burst, ContentConfig\n\t// REMOVED: Actually returning a RESTClient object.\n\treturn baseURL, httpClient, nil\n}\n\n// defaultServerURL is a modified copy of k8s.io/kubernetes/pkg/client/restclient.DefaultServerURL.\n// DefaultServerURL converts a host, host:port, or URL string to the default base server API path\n// to use with a Client at a given API version following the standard conventions for a\n// Kubernetes API.\nfunc defaultServerURL(host string, defaultTLS bool) (*url.URL, error) {\n\tif host == \"\" {\n\t\treturn nil, errors.New(\"host must be a URL or a host:port pair\")\n\t}\n\tbase := host\n\thostURL, err := url.Parse(base)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif hostURL.Scheme == \"\" {\n\t\tscheme := \"http://\"\n\t\tif defaultTLS {\n\t\t\tscheme = \"https://\"\n\t\t}\n\t\thostURL, err = url.Parse(scheme + base)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif hostURL.Path != \"\" && hostURL.Path != \"/\" {\n\t\t\treturn nil, fmt.Errorf(\"host must be a URL or a host:port pair: %q\", base)\n\t\t}\n\t}\n\n\t// REMOVED: versionedAPIPath computation.\n\treturn hostURL, nil\n}\n\n// defaultServerURLFor is a modified copy of k8s.io/kubernetes/pkg/client/restclient.defaultServerURLFor.\n// defaultServerUrlFor is shared between IsConfigTransportTLS and RESTClientFor. It\n// requires Host and Version to be set prior to being called.\nfunc defaultServerURLFor(config *restConfig) (*url.URL, error) {\n\t// TODO: move the default to secure when the apiserver supports TLS by default\n\t// config.Insecure is taken to mean \"I want HTTPS but don't bother checking the certs against a CA.\"\n\thasCA := len(config.TLSClientConfig.CAFile) != 0 || len(config.TLSClientConfig.CAData) != 0\n\thasCert := len(config.TLSClientConfig.CertFile) != 0 || len(config.TLSClientConfig.CertData) != 0\n\tdefaultTLS := hasCA || hasCert || config.Insecure\n\thost := config.Host\n\tif host == \"\" {\n\t\thost = \"localhost\"\n\t}\n\n\t// REMOVED: Configurable APIPath, GroupVersion\n\treturn defaultServerURL(host, defaultTLS)\n}\n\n// transportFor is a modified copy of k8s.io/kubernetes/pkg/client/restclient.transportFor.\n// TransportFor returns an http.RoundTripper that will provide the authentication\n// or transport level security defined by the provided Config. Will return the\n// default http.DefaultTransport if no special case behavior is needed.\nfunc transportFor(sys *types.SystemContext, config *restConfig) (http.RoundTripper, error) {\n\t// REMOVED: separation between restclient.Config and transport.Config, Transport, WrapTransport support\n\treturn transportNew(sys, config)\n}\n\n// isConfigTransportTLS is a modified copy of k8s.io/kubernetes/pkg/client/restclient.IsConfigTransportTLS.\n// IsConfigTransportTLS returns true if and only if the provided\n// config will result in a protected connection to the server when it\n// is passed to restclient.RESTClientFor().  Use to determine when to\n// send credentials over the wire.\n//\n// Note: the Insecure flag is ignored when testing for this value, so MITM attacks are\n// still possible.\nfunc isConfigTransportTLS(config restConfig) bool {\n\tbaseURL, err := defaultServerURLFor(&config)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn baseURL.Scheme == \"https\"\n}\n\n// transportNew is a modified copy of k8s.io/kubernetes/pkg/client/transport.New.\n// New returns an http.RoundTripper that will provide the authentication\n// or transport level security defined by the provided Config.\nfunc transportNew(sys *types.SystemContext, config *restConfig) (http.RoundTripper, error) {\n\t// REMOVED: custom config.Transport support.\n\t// Set transport level security\n\n\tvar (\n\t\trt  http.RoundTripper\n\t\terr error\n\t)\n\n\trt, err = tlsCacheGet(sys, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// REMOVED: HTTPWrappersForConfig(config, rt) in favor of the caller setting HTTP headers itself based on restConfig. Only this inlined check remains.\n\tif len(config.Username) != 0 && len(config.BearerToken) != 0 {\n\t\treturn nil, errors.New(\"username/password or bearer token may be set, but not both\")\n\t}\n\n\treturn rt, nil\n}\n\n// newProxierWithNoProxyCIDR is a modified copy of k8s.io/apimachinery/pkg/util/net.NewProxierWithNoProxyCIDR.\n// NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if\n// no matching CIDRs are found\nfunc newProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error)) func(req *http.Request) (*url.URL, error) {\n\t// we wrap the default method, so we only need to perform our check if the NO_PROXY envvar has a CIDR in it\n\tnoProxyEnv := os.Getenv(\"NO_PROXY\")\n\n\tcidrs := []netip.Prefix{}\n\tfor noProxyRule := range strings.SplitSeq(noProxyEnv, \",\") {\n\t\tprefix, err := netip.ParsePrefix(noProxyRule)\n\t\tif err == nil {\n\t\t\tcidrs = append(cidrs, prefix)\n\t\t}\n\t}\n\n\tif len(cidrs) == 0 {\n\t\treturn delegate\n\t}\n\n\treturn func(req *http.Request) (*url.URL, error) {\n\t\thost := req.URL.Host\n\t\t// for some urls, the Host is already the host, not the host:port\n\t\tif _, err := netip.ParseAddr(host); err != nil {\n\t\t\tvar err error\n\t\t\thost, _, err = net.SplitHostPort(req.URL.Host)\n\t\t\tif err != nil {\n\t\t\t\treturn delegate(req)\n\t\t\t}\n\t\t}\n\n\t\tip, err := netip.ParseAddr(host)\n\t\tif err != nil {\n\t\t\treturn delegate(req)\n\t\t}\n\n\t\tif slices.ContainsFunc(cidrs, func(cidr netip.Prefix) bool {\n\t\t\treturn cidr.Contains(ip)\n\t\t}) {\n\t\t\treturn nil, nil\n\t\t}\n\n\t\treturn delegate(req)\n\t}\n}\n\n// tlsCacheGet is a modified copy of k8s.io/kubernetes/pkg/client/transport.tlsTransportCache.get.\nfunc tlsCacheGet(sys *types.SystemContext, config *restConfig) (http.RoundTripper, error) {\n\t// REMOVED: any actual caching\n\n\t// Get the TLS options for this client config\n\ttlsConfig, err := tlsConfigFor(sys, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// The options didn't require a custom TLS config\n\tif tlsConfig == nil {\n\t\treturn http.DefaultTransport, nil\n\t}\n\n\t// REMOVED: Call to k8s.io/apimachinery/pkg/util/net.SetTransportDefaults; instead of the generic machinery and conditionals, hard-coded the result here.\n\tt := &http.Transport{\n\t\t// http.ProxyFromEnvironment doesn't respect CIDRs and that makes it impossible to exclude things like pod and service IPs from proxy settings\n\t\t// ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY\n\t\tProxy:               newProxierWithNoProxyCIDR(http.ProxyFromEnvironment),\n\t\tTLSHandshakeTimeout: 10 * time.Second,\n\t\tTLSClientConfig:     tlsConfig,\n\t\tDialContext: (&net.Dialer{\n\t\t\tTimeout:   30 * time.Second,\n\t\t\tKeepAlive: 30 * time.Second,\n\t\t}).DialContext,\n\t}\n\t// Allow clients to disable http2 if needed.\n\tif s := os.Getenv(\"DISABLE_HTTP2\"); len(s) == 0 {\n\t\tt.ForceAttemptHTTP2 = true\n\t}\n\treturn t, nil\n}\n\n// tlsConfigFor is a modified copy of k8s.io/kubernetes/pkg/client/transport.TLSConfigFor.\n// TLSConfigFor returns a tls.Config that will provide the transport level security defined\n// by the provided Config. Will return nil if no transport level security is requested.\nfunc tlsConfigFor(sys *types.SystemContext, c *restConfig) (*tls.Config, error) {\n\tif !c.HasCA() && !c.HasCertAuth() && !c.Insecure && (sys == nil || sys.BaseTLSConfig == nil) {\n\t\treturn nil, nil\n\t}\n\tif c.HasCA() && c.Insecure {\n\t\treturn nil, errors.New(\"specifying a root certificates file with the insecure flag is not allowed\")\n\t}\n\tif err := loadTLSFiles(c); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar tlsConfig *tls.Config\n\tif sys != nil && sys.BaseTLSConfig != nil {\n\t\ttlsConfig = sys.BaseTLSConfig.Clone()\n\t} else {\n\t\ttlsConfig = &tls.Config{}\n\t}\n\n\ttlsConfig.InsecureSkipVerify = c.Insecure\n\n\tif c.HasCA() {\n\t\ttlsConfig.RootCAs = rootCertPool(c.TLSClientConfig.CAData)\n\t}\n\n\tif c.HasCertAuth() {\n\t\tcert, err := tls.X509KeyPair(c.TLSClientConfig.CertData, c.TLSClientConfig.KeyData)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttlsConfig.Certificates = []tls.Certificate{cert}\n\t}\n\n\treturn tlsConfig, nil\n}\n\n// loadTLSFiles is a modified copy of k8s.io/kubernetes/pkg/client/transport.loadTLSFiles.\n// loadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData,\n// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are\n// either populated or were empty to start.\nfunc loadTLSFiles(c *restConfig) error {\n\tvar err error\n\tc.TLSClientConfig.CAData, err = dataFromSliceOrFile(c.TLSClientConfig.CAData, c.TLSClientConfig.CAFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.TLSClientConfig.CertData, err = dataFromSliceOrFile(c.TLSClientConfig.CertData, c.TLSClientConfig.CertFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.TLSClientConfig.KeyData, err = dataFromSliceOrFile(c.TLSClientConfig.KeyData, c.TLSClientConfig.KeyFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// dataFromSliceOrFile is a modified copy of k8s.io/kubernetes/pkg/client/transport.dataFromSliceOrFile.\n// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,\n// or an error if an error occurred reading the file\nfunc dataFromSliceOrFile(data []byte, file string) ([]byte, error) {\n\tif len(data) > 0 {\n\t\treturn data, nil\n\t}\n\tif len(file) > 0 {\n\t\tfileData, err := os.ReadFile(file)\n\t\tif err != nil {\n\t\t\treturn []byte{}, err\n\t\t}\n\t\treturn fileData, nil\n\t}\n\treturn nil, nil\n}\n\n// rootCertPool is a modified copy of k8s.io/kubernetes/pkg/client/transport.rootCertPool.\n// rootCertPool returns nil if caData is empty.  When passed along, this will mean \"use system CAs\".\n// When caData is not empty, it will be the ONLY information used in the CertPool.\nfunc rootCertPool(caData []byte) *x509.CertPool {\n\t// What we really want is a copy of x509.systemRootsPool, but that isn't exposed.  It's difficult to build (see the go\n\t// code for a look at the platform specific insanity), so we'll use the fact that RootCAs == nil gives us the system values\n\t// It doesn't allow trusting either/or, but hopefully that won't be an issue\n\tif len(caData) == 0 {\n\t\treturn nil\n\t}\n\n\t// if we have caData, use it\n\tcertPool := x509.NewCertPool()\n\tcertPool.AppendCertsFromPEM(caData)\n\treturn certPool\n}\n\n// HasCA is a modified copy of k8s.io/kubernetes/pkg/client/transport.Config.HasCA.\n// HasCA returns whether the configuration has a certificate authority or not.\nfunc (c *restConfig) HasCA() bool {\n\treturn len(c.TLSClientConfig.CAData) > 0 || len(c.TLSClientConfig.CAFile) > 0\n}\n\n// HasCertAuth is a modified copy of k8s.io/kubernetes/pkg/client/transport.Config.HasCertAuth.\n// HasCertAuth returns whether the configuration has certificate authentication or not.\nfunc (c *restConfig) HasCertAuth() bool {\n\treturn len(c.TLSClientConfig.CertData) != 0 || len(c.TLSClientConfig.CertFile) != 0\n}\n\n// clientcmdConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.Config.\n// Config holds the information needed to build connect to remote kubernetes clusters as a given user\n// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()\ntype clientcmdConfig struct {\n\t// Clusters is a map of referenceable names to cluster configs\n\tClusters clustersMap `yaml:\"clusters\"`\n\t// AuthInfos is a map of referenceable names to user configs\n\tAuthInfos authInfosMap `yaml:\"users\"`\n\t// Contexts is a map of referenceable names to context configs\n\tContexts contextsMap `yaml:\"contexts\"`\n\t// CurrentContext is the name of the context that you would like to use by default\n\tCurrentContext string `yaml:\"current-context\"`\n}\n\ntype clustersMap map[string]*clientcmdCluster\n\nfunc (m *clustersMap) UnmarshalYAML(value *yaml.Node) error {\n\tvar a []v1NamedCluster\n\tif err := value.Decode(&a); err != nil {\n\t\treturn err\n\t}\n\tfor _, e := range a {\n\t\tcluster := e.Cluster // Allocates a new instance in each iteration\n\t\t(*m)[e.Name] = &cluster\n\t}\n\treturn nil\n}\n\ntype authInfosMap map[string]*clientcmdAuthInfo\n\nfunc (m *authInfosMap) UnmarshalYAML(value *yaml.Node) error {\n\tvar a []v1NamedAuthInfo\n\tif err := value.Decode(&a); err != nil {\n\t\treturn err\n\t}\n\tfor _, e := range a {\n\t\tauthInfo := e.AuthInfo // Allocates a new instance in each iteration\n\t\t(*m)[e.Name] = &authInfo\n\t}\n\treturn nil\n}\n\ntype contextsMap map[string]*clientcmdContext\n\nfunc (m *contextsMap) UnmarshalYAML(value *yaml.Node) error {\n\tvar a []v1NamedContext\n\tif err := value.Decode(&a); err != nil {\n\t\treturn err\n\t}\n\tfor _, e := range a {\n\t\tcontext := e.Context // Allocates a new instance in each iteration\n\t\t(*m)[e.Name] = &context\n\t}\n\treturn nil\n}\n\n// clientcmdNewConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.NewConfig.\n// NewConfig is a convenience function that returns a new Config object with non-nil maps\nfunc clientcmdNewConfig() *clientcmdConfig {\n\treturn &clientcmdConfig{\n\t\tClusters:  make(map[string]*clientcmdCluster),\n\t\tAuthInfos: make(map[string]*clientcmdAuthInfo),\n\t\tContexts:  make(map[string]*clientcmdContext),\n\t}\n}\n\n// yamlBinaryAsBase64String is a []byte that can be stored in yaml as a !!str, not a !!binary\ntype yamlBinaryAsBase64String []byte\n\nfunc (bin *yamlBinaryAsBase64String) UnmarshalText(text []byte) error {\n\tres := make([]byte, base64.StdEncoding.DecodedLen(len(text)))\n\tn, err := base64.StdEncoding.Decode(res, text)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*bin = res[:n]\n\treturn nil\n}\n\n// clientcmdCluster is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.Cluster.\n// Cluster contains information about how to communicate with a kubernetes cluster\ntype clientcmdCluster struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// Server is the address of the kubernetes cluster (https://hostname:port).\n\tServer string `yaml:\"server\"`\n\t// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.\n\tInsecureSkipTLSVerify bool `yaml:\"insecure-skip-tls-verify,omitempty\"`\n\t// CertificateAuthority is the path to a cert file for the certificate authority.\n\tCertificateAuthority string `yaml:\"certificate-authority,omitempty\"`\n\t// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority\n\tCertificateAuthorityData yamlBinaryAsBase64String `yaml:\"certificate-authority-data,omitempty\"`\n}\n\n// clientcmdAuthInfo is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.AuthInfo.\n// AuthInfo contains information that describes identity information.  This is use to tell the kubernetes cluster who you are.\ntype clientcmdAuthInfo struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// ClientCertificate is the path to a client cert file for TLS.\n\tClientCertificate string `yaml:\"client-certificate,omitempty\"`\n\t// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate\n\tClientCertificateData yamlBinaryAsBase64String `yaml:\"client-certificate-data,omitempty\"`\n\t// ClientKey is the path to a client key file for TLS.\n\tClientKey string `yaml:\"client-key,omitempty\"`\n\t// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey\n\tClientKeyData yamlBinaryAsBase64String `yaml:\"client-key-data,omitempty\"`\n\t// Token is the bearer token for authentication to the kubernetes cluster.\n\tToken string `yaml:\"token,omitempty\"`\n\t// Username is the username for basic authentication to the kubernetes cluster.\n\tUsername string `yaml:\"username,omitempty\"`\n\t// Password is the password for basic authentication to the kubernetes cluster.\n\tPassword string `yaml:\"password,omitempty\"`\n}\n\n// clientcmdContext is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.Context.\n// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)\ntype clientcmdContext struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// Cluster is the name of the cluster for this context\n\tCluster string `yaml:\"cluster\"`\n\t// AuthInfo is the name of the authInfo for this context\n\tAuthInfo string `yaml:\"user\"`\n\t// Namespace is the default namespace to use on unspecified requests\n\tNamespace string `yaml:\"namespace,omitempty\"`\n}\n\n// v1NamedCluster is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.v1.NamedCluster.\n// NamedCluster relates nicknames to cluster information\ntype v1NamedCluster struct {\n\t// Name is the nickname for this Cluster\n\tName string `yaml:\"name\"`\n\t// Cluster holds the cluster information\n\tCluster clientcmdCluster `yaml:\"cluster\"`\n}\n\n// v1NamedContext is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.v1.NamedContext.\n// NamedContext relates nicknames to context information\ntype v1NamedContext struct {\n\t// Name is the nickname for this Context\n\tName string `yaml:\"name\"`\n\t// Context holds the context information\n\tContext clientcmdContext `yaml:\"context\"`\n}\n\n// v1NamedAuthInfo is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api.v1.NamedAuthInfo.\n// NamedAuthInfo relates nicknames to auth information\ntype v1NamedAuthInfo struct {\n\t// Name is the nickname for this AuthInfo\n\tName string `yaml:\"name\"`\n\t// AuthInfo holds the auth information\n\tAuthInfo clientcmdAuthInfo `yaml:\"user\"`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/openshift/openshift.go",
    "content": "package openshift\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/iolimits\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/image/v5/version\"\n)\n\n// openshiftClient is configuration for dealing with a single image stream, for reading or writing.\ntype openshiftClient struct {\n\tref     openshiftReference\n\tbaseURL *url.URL\n\t// Values from Kubernetes configuration\n\thttpClient  *http.Client\n\tbearerToken string // \"\" if not used\n\tusername    string // \"\" if not used\n\tpassword    string // if username != \"\"\n}\n\n// newOpenshiftClient creates a new openshiftClient for the specified reference.\nfunc newOpenshiftClient(sys *types.SystemContext, ref openshiftReference) (*openshiftClient, error) {\n\t// Overall, this is modelled on openshift/origin/pkg/cmd/util/clientcmd.New().ClientConfig() and openshift/origin/pkg/client.\n\tcmdConfig := defaultClientConfig()\n\tlogrus.Debugf(\"cmdConfig: %#v\", cmdConfig)\n\trestConfig, err := cmdConfig.ClientConfig()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// REMOVED: SetOpenShiftDefaults (values are not overridable in config files, so hard-coded these defaults.)\n\tlogrus.Debugf(\"restConfig: %#v\", restConfig)\n\tbaseURL, httpClient, err := restClientFor(sys, restConfig)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogrus.Debugf(\"URL: %#v\", *baseURL)\n\n\tif httpClient == nil {\n\t\thttpClient = http.DefaultClient\n\t}\n\n\treturn &openshiftClient{\n\t\tref:         ref,\n\t\tbaseURL:     baseURL,\n\t\thttpClient:  httpClient,\n\t\tbearerToken: restConfig.BearerToken,\n\t\tusername:    restConfig.Username,\n\t\tpassword:    restConfig.Password,\n\t}, nil\n}\n\nfunc (c *openshiftClient) close() {\n\tc.httpClient.CloseIdleConnections()\n}\n\n// doRequest performs a correctly authenticated request to a specified path, and returns response body or an error object.\nfunc (c *openshiftClient) doRequest(ctx context.Context, method, path string, requestBody []byte) ([]byte, error) {\n\trequestURL := *c.baseURL\n\trequestURL.Path = path\n\tvar requestBodyReader io.Reader\n\tif requestBody != nil {\n\t\tlogrus.Debugf(\"Will send body: %s\", requestBody)\n\t\trequestBodyReader = bytes.NewReader(requestBody)\n\t}\n\treq, err := http.NewRequestWithContext(ctx, method, requestURL.String(), requestBodyReader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(c.bearerToken) != 0 {\n\t\treq.Header.Set(\"Authorization\", \"Bearer \"+c.bearerToken)\n\t} else if len(c.username) != 0 {\n\t\treq.SetBasicAuth(c.username, c.password)\n\t}\n\treq.Header.Set(\"Accept\", \"application/json, */*\")\n\treq.Header.Set(\"User-Agent\", fmt.Sprintf(\"skopeo/%s\", version.Version))\n\tif requestBody != nil {\n\t\treq.Header.Set(\"Content-Type\", \"application/json\")\n\t}\n\n\tlogrus.Debugf(\"%s %s\", method, requestURL.Redacted())\n\tres, err := c.httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Body.Close()\n\tbody, err := iolimits.ReadAtMost(res.Body, iolimits.MaxOpenShiftStatusBody)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogrus.Debugf(\"Got body: %s\", body)\n\t// FIXME: Just throwing this useful information away only to try to guess later...\n\tlogrus.Debugf(\"Got content-type: %s\", res.Header.Get(\"Content-Type\"))\n\n\tvar status status\n\tstatusValid := false\n\tif err := json.Unmarshal(body, &status); err == nil && len(status.Status) > 0 {\n\t\tstatusValid = true\n\t}\n\n\tswitch {\n\tcase res.StatusCode == http.StatusSwitchingProtocols: // FIXME?! No idea why this weird case exists in k8s.io/kubernetes/pkg/client/restclient.\n\t\tif statusValid && status.Status != \"Success\" {\n\t\t\treturn nil, errors.New(status.Message)\n\t\t}\n\tcase res.StatusCode >= http.StatusOK && res.StatusCode <= http.StatusPartialContent:\n\t\t// OK.\n\tdefault:\n\t\tif statusValid {\n\t\t\treturn nil, errors.New(status.Message)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"HTTP error: status code: %d (%s), body: %s\", res.StatusCode, http.StatusText(res.StatusCode), string(body))\n\t}\n\n\treturn body, nil\n}\n\n// getImage loads the specified image object.\nfunc (c *openshiftClient) getImage(ctx context.Context, imageStreamImageName string) (*image, error) {\n\t// FIXME: validate components per validation.IsValidPathSegmentName?\n\tpath := fmt.Sprintf(\"/oapi/v1/namespaces/%s/imagestreamimages/%s@%s\", c.ref.namespace, c.ref.stream, imageStreamImageName)\n\tbody, err := c.doRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Note: This does absolutely no kind/version checking or conversions.\n\tvar isi imageStreamImage\n\tif err := json.Unmarshal(body, &isi); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &isi.Image, nil\n}\n\n// convertDockerImageReference takes an image API DockerImageReference value and returns a reference we can actually use;\n// currently OpenShift stores the cluster-internal service IPs here, which are unusable from the outside.\nfunc (c *openshiftClient) convertDockerImageReference(ref string) (string, error) {\n\t_, repo, gotRepo := strings.Cut(ref, \"/\")\n\tif !gotRepo {\n\t\treturn \"\", fmt.Errorf(\"Invalid format of docker reference %q: missing '/'\", ref)\n\t}\n\treturn reference.Domain(c.ref.dockerReference) + \"/\" + repo, nil\n}\n\n// These structs are subsets of github.com/openshift/origin/pkg/image/api/v1 and its dependencies.\ntype imageStream struct {\n\tStatus imageStreamStatus `json:\"status\"`\n}\ntype imageStreamStatus struct {\n\tDockerImageRepository string              `json:\"dockerImageRepository\"`\n\tTags                  []namedTagEventList `json:\"tags,omitempty\"`\n}\ntype namedTagEventList struct {\n\tTag   string     `json:\"tag\"`\n\tItems []tagEvent `json:\"items\"`\n}\ntype tagEvent struct {\n\tDockerImageReference string `json:\"dockerImageReference\"`\n\tImage                string `json:\"image\"`\n}\ntype imageStreamImage struct {\n\tImage image `json:\"image\"`\n}\ntype image struct {\n\tobjectMeta           `json:\"metadata\"`\n\tDockerImageReference string `json:\"dockerImageReference,omitempty\"`\n\t//\tDockerImageMetadata        runtime.RawExtension `json:\"dockerImageMetadata,omitempty\"`\n\tDockerImageMetadataVersion string `json:\"dockerImageMetadataVersion,omitempty\"`\n\tDockerImageManifest        string `json:\"dockerImageManifest,omitempty\"`\n\t//\tDockerImageLayers          []ImageLayer         `json:\"dockerImageLayers\"`\n\tSignatures []imageSignature `json:\"signatures,omitempty\"`\n}\n\nconst imageSignatureTypeAtomic string = \"atomic\"\n\ntype imageSignature struct {\n\ttypeMeta   `json:\",inline\"`\n\tobjectMeta `json:\"metadata\"`\n\tType       string `json:\"type\"`\n\tContent    []byte `json:\"content\"`\n\t// Conditions []SignatureCondition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"`\n\t// ImageIdentity string `json:\"imageIdentity,omitempty\"`\n\t// SignedClaims map[string]string `json:\"signedClaims,omitempty\"`\n\t// Created *unversioned.Time `json:\"created,omitempty\"`\n\t// IssuedBy SignatureIssuer `json:\"issuedBy,omitempty\"`\n\t// IssuedTo SignatureSubject `json:\"issuedTo,omitempty\"`\n}\ntype typeMeta struct {\n\tKind       string `json:\"kind,omitempty\"`\n\tAPIVersion string `json:\"apiVersion,omitempty\"`\n}\ntype objectMeta struct {\n\tName                       string            `json:\"name,omitempty\"`\n\tGenerateName               string            `json:\"generateName,omitempty\"`\n\tNamespace                  string            `json:\"namespace,omitempty\"`\n\tSelfLink                   string            `json:\"selfLink,omitempty\"`\n\tResourceVersion            string            `json:\"resourceVersion,omitempty\"`\n\tGeneration                 int64             `json:\"generation,omitempty\"`\n\tDeletionGracePeriodSeconds *int64            `json:\"deletionGracePeriodSeconds,omitempty\"`\n\tLabels                     map[string]string `json:\"labels,omitempty\"`\n\tAnnotations                map[string]string `json:\"annotations,omitempty\"`\n}\n\n// A subset of k8s.io/kubernetes/pkg/api/unversioned/Status\ntype status struct {\n\tStatus  string `json:\"status,omitempty\"`\n\tMessage string `json:\"message,omitempty\"`\n\t// Reason StatusReason `json:\"reason,omitempty\"`\n\t// Details *StatusDetails `json:\"details,omitempty\"`\n\tCode int32 `json:\"code,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/openshift/openshift_dest.go",
    "content": "package openshift\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"slices\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/imagedestination\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype openshiftImageDestination struct {\n\timpl.Compat\n\tstubs.AlwaysSupportsSignatures\n\n\tclient *openshiftClient\n\tdocker private.ImageDestination // The docker/distribution API endpoint\n\t// State\n\timageStreamImageName string // \"\" if not yet known\n}\n\n// newImageDestination creates a new ImageDestination for the specified reference.\nfunc newImageDestination(ctx context.Context, sys *types.SystemContext, ref openshiftReference) (private.ImageDestination, error) {\n\tclient, err := newOpenshiftClient(sys, ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// FIXME: Should this always use a digest, not a tag? Uploading to Docker by tag requires the tag _inside_ the manifest to match,\n\t// i.e. a single signed image cannot be available under multiple tags.  But with types.ImageDestination, we don't know\n\t// the manifest digest at this point.\n\tdockerRefString := fmt.Sprintf(\"//%s/%s/%s:%s\", reference.Domain(client.ref.dockerReference), client.ref.namespace, client.ref.stream, client.ref.dockerReference.Tag())\n\tdockerRef, err := docker.ParseReference(dockerRefString)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdocker, err := dockerRef.NewImageDestination(ctx, sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\td := &openshiftImageDestination{\n\t\tclient: client,\n\t\tdocker: imagedestination.FromPublic(docker),\n\t}\n\td.Compat = impl.AddCompat(d)\n\treturn d, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (d *openshiftImageDestination) Reference() types.ImageReference {\n\treturn d.client.ref\n}\n\n// Close removes resources associated with an initialized ImageDestination, if any.\nfunc (d *openshiftImageDestination) Close() error {\n\terr := d.docker.Close()\n\td.client.close()\n\treturn err\n}\n\nfunc (d *openshiftImageDestination) SupportedManifestMIMETypes() []string {\n\treturn d.docker.SupportedManifestMIMETypes()\n}\n\nfunc (d *openshiftImageDestination) DesiredLayerCompression() types.LayerCompression {\n\treturn types.Compress\n}\n\n// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually\n// uploaded to the image destination, true otherwise.\nfunc (d *openshiftImageDestination) AcceptsForeignLayerURLs() bool {\n\treturn true\n}\n\n// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime architecture and OS. False otherwise.\nfunc (d *openshiftImageDestination) MustMatchRuntimeOS() bool {\n\treturn false\n}\n\n// IgnoresEmbeddedDockerReference returns true iff the destination does not care about Image.EmbeddedDockerReferenceConflicts(),\n// and would prefer to receive an unmodified manifest instead of one modified for the destination.\n// Does not make a difference if Reference().DockerReference() is nil.\nfunc (d *openshiftImageDestination) IgnoresEmbeddedDockerReference() bool {\n\treturn d.docker.IgnoresEmbeddedDockerReference()\n}\n\n// HasThreadSafePutBlob indicates whether PutBlob can be executed concurrently.\nfunc (d *openshiftImageDestination) HasThreadSafePutBlob() bool {\n\treturn false\n}\n\n// SupportsPutBlobPartial returns true if PutBlobPartial is supported.\nfunc (d *openshiftImageDestination) SupportsPutBlobPartial() bool {\n\treturn d.docker.SupportsPutBlobPartial()\n}\n\n// NoteOriginalOCIConfig provides the config of the image, as it exists on the source, BUT converted to OCI format,\n// or an error obtaining that value (e.g. if the image is an artifact and not a container image).\n// The destination can use it in its TryReusingBlob/PutBlob implementations\n// (otherwise it only obtains the final config after all layers are written).\nfunc (d *openshiftImageDestination) NoteOriginalOCIConfig(ociConfig *imgspecv1.Image, configErr error) error {\n\treturn d.docker.NoteOriginalOCIConfig(ociConfig, configErr)\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlobWithOptions MUST 1) fail, and 2) delete any data stored so far.\nfunc (d *openshiftImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\treturn d.docker.PutBlobWithOptions(ctx, stream, inputInfo, options)\n}\n\n// PutBlobPartial attempts to create a blob using the data that is already present\n// at the destination. chunkAccessor is accessed in a non-sequential way to retrieve the missing chunks.\n// It is available only if SupportsPutBlobPartial().\n// Even if SupportsPutBlobPartial() returns true, the call can fail.\n// If the call fails with ErrFallbackToOrdinaryLayerDownload, the caller can fall back to PutBlobWithOptions.\n// The fallback _must not_ be done otherwise.\nfunc (d *openshiftImageDestination) PutBlobPartial(ctx context.Context, chunkAccessor private.BlobChunkAccessor, srcInfo types.BlobInfo, options private.PutBlobPartialOptions) (private.UploadedBlob, error) {\n\treturn d.docker.PutBlobPartial(ctx, chunkAccessor, srcInfo, options)\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (d *openshiftImageDestination) TryReusingBlobWithOptions(ctx context.Context, info types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\treturn d.docker.TryReusingBlobWithOptions(ctx, info, options)\n}\n\n// PutManifest writes manifest to the destination.\n// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\nfunc (d *openshiftImageDestination) PutManifest(ctx context.Context, m []byte, instanceDigest *digest.Digest) error {\n\tif instanceDigest == nil {\n\t\tmanifestDigest, err := manifest.Digest(m)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\td.imageStreamImageName = manifestDigest.String()\n\t}\n\treturn d.docker.PutManifest(ctx, m, instanceDigest)\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (d *openshiftImageDestination) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tvar imageStreamImageName string\n\tif instanceDigest == nil {\n\t\tif d.imageStreamImageName == \"\" {\n\t\t\treturn errors.New(\"Internal error: Unknown manifest digest, can't add signatures\")\n\t\t}\n\t\timageStreamImageName = d.imageStreamImageName\n\t} else {\n\t\timageStreamImageName = instanceDigest.String()\n\t}\n\n\t// Because image signatures are a shared resource in Atomic Registry, the default upload\n\t// always adds signatures.  Eventually we should also allow removing signatures.\n\n\tif len(signatures) == 0 {\n\t\treturn nil // No need to even read the old state.\n\t}\n\n\timage, err := d.client.getImage(ctx, imageStreamImageName)\n\tif err != nil {\n\t\treturn err\n\t}\n\texistingSigNames := set.New[string]()\n\tfor _, sig := range image.Signatures {\n\t\texistingSigNames.Add(sig.objectMeta.Name)\n\t}\n\n\tfor _, newSigWithFormat := range signatures {\n\t\tnewSigSimple, ok := newSigWithFormat.(signature.SimpleSigning)\n\t\tif !ok {\n\t\t\treturn signature.UnsupportedFormatError(newSigWithFormat)\n\t\t}\n\t\tnewSig := newSigSimple.UntrustedSignature()\n\n\t\tif slices.ContainsFunc(image.Signatures, func(existingSig imageSignature) bool {\n\t\t\treturn existingSig.Type == imageSignatureTypeAtomic && bytes.Equal(existingSig.Content, newSig)\n\t\t}) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// The API expect us to invent a new unique name. This is racy, but hopefully good enough.\n\t\tvar signatureName string\n\t\tfor {\n\t\t\trandBytes := make([]byte, 16)\n\t\t\tn, err := rand.Read(randBytes)\n\t\t\tif err != nil || n != 16 {\n\t\t\t\treturn fmt.Errorf(\"generating random signature len %d: %w\", n, err)\n\t\t\t}\n\t\t\tsignatureName = fmt.Sprintf(\"%s@%032x\", imageStreamImageName, randBytes)\n\t\t\tif !existingSigNames.Contains(signatureName) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Note: This does absolutely no kind/version checking or conversions.\n\t\tsig := imageSignature{\n\t\t\ttypeMeta: typeMeta{\n\t\t\t\tKind:       \"ImageSignature\",\n\t\t\t\tAPIVersion: \"v1\",\n\t\t\t},\n\t\t\tobjectMeta: objectMeta{Name: signatureName},\n\t\t\tType:       imageSignatureTypeAtomic,\n\t\t\tContent:    newSig,\n\t\t}\n\t\tbody, err := json.Marshal(sig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = d.client.doRequest(ctx, http.MethodPost, \"/oapi/v1/imagesignatures\", body)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (d *openshiftImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\treturn d.docker.CommitWithOptions(ctx, options)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/openshift/openshift_src.go",
    "content": "package openshift\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype openshiftImageSource struct {\n\timpl.Compat\n\timpl.DoesNotAffectLayerInfosForCopy\n\t// This is slightly suboptimal. We could forward GetBlobAt(), but we need to call ensureImageIsResolved in SupportsGetBlobAt(),\n\t// and that method doesn’t provide a context for timing out. That could actually be fixed (SupportsGetBlobAt is private and we\n\t// can change it), but this is a deprecated transport anyway, so for now we just punt.\n\tstubs.NoGetBlobAtInitialize\n\n\tclient *openshiftClient\n\t// Values specific to this image\n\tsys *types.SystemContext\n\t// State\n\tdocker               types.ImageSource // The docker/distribution API endpoint, or nil if not resolved yet\n\timageStreamImageName string            // Resolved image identifier, or \"\" if not known yet\n}\n\n// newImageSource creates a new ImageSource for the specified reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc newImageSource(sys *types.SystemContext, ref openshiftReference) (private.ImageSource, error) {\n\tclient, err := newOpenshiftClient(sys, ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ts := &openshiftImageSource{\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),\n\n\t\tclient: client,\n\t\tsys:    sys,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s, nil\n}\n\n// Reference returns the reference used to set up this source, _as specified by the user_\n// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\nfunc (s *openshiftImageSource) Reference() types.ImageReference {\n\treturn s.client.ref\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\nfunc (s *openshiftImageSource) Close() error {\n\tvar err error\n\tif s.docker != nil {\n\t\terr = s.docker.Close()\n\t\ts.docker = nil\n\t}\n\n\ts.client.close()\n\n\treturn err\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *openshiftImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tif err := s.ensureImageIsResolved(ctx); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn s.docker.GetManifest(ctx, instanceDigest)\n}\n\n// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.\nfunc (s *openshiftImageSource) HasThreadSafeGetBlob() bool {\n\treturn false\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *openshiftImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tif err := s.ensureImageIsResolved(ctx); err != nil {\n\t\treturn nil, 0, err\n\t}\n\treturn s.docker.GetBlob(ctx, info, cache)\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (s *openshiftImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\tvar imageStreamImageName string\n\tif instanceDigest == nil {\n\t\tif err := s.ensureImageIsResolved(ctx); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\timageStreamImageName = s.imageStreamImageName\n\t} else {\n\t\tif err := instanceDigest.Validate(); err != nil { // Make sure instanceDigest.String() does not contain any unexpected characters\n\t\t\treturn nil, err\n\t\t}\n\t\timageStreamImageName = instanceDigest.String()\n\t}\n\timage, err := s.client.getImage(ctx, imageStreamImageName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar sigs []signature.Signature\n\tfor _, sig := range image.Signatures {\n\t\tif sig.Type == imageSignatureTypeAtomic {\n\t\t\tsigs = append(sigs, signature.SimpleSigningFromBlob(sig.Content))\n\t\t}\n\t}\n\treturn sigs, nil\n}\n\n// ensureImageIsResolved sets up s.docker and s.imageStreamImageName\nfunc (s *openshiftImageSource) ensureImageIsResolved(ctx context.Context) error {\n\tif s.docker != nil {\n\t\treturn nil\n\t}\n\n\t// FIXME: validate components per validation.IsValidPathSegmentName?\n\tpath := fmt.Sprintf(\"/oapi/v1/namespaces/%s/imagestreams/%s\", s.client.ref.namespace, s.client.ref.stream)\n\tbody, err := s.client.doRequest(ctx, http.MethodGet, path, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Note: This does absolutely no kind/version checking or conversions.\n\tvar is imageStream\n\tif err := json.Unmarshal(body, &is); err != nil {\n\t\treturn err\n\t}\n\tvar te *tagEvent\n\tfor _, tag := range is.Status.Tags {\n\t\tif tag.Tag != s.client.ref.dockerReference.Tag() {\n\t\t\tcontinue\n\t\t}\n\t\tif len(tag.Items) > 0 {\n\t\t\tte = &tag.Items[0]\n\t\t\tbreak\n\t\t}\n\t}\n\tif te == nil {\n\t\treturn errors.New(\"No matching tag found\")\n\t}\n\tlogrus.Debugf(\"tag event %#v\", te)\n\tdockerRefString, err := s.client.convertDockerImageReference(te.DockerImageReference)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Resolved reference %#v\", dockerRefString)\n\tdockerRef, err := docker.ParseReference(\"//\" + dockerRefString)\n\tif err != nil {\n\t\treturn err\n\t}\n\td, err := dockerRef.NewImageSource(ctx, s.sys)\n\tif err != nil {\n\t\treturn err\n\t}\n\ts.docker = d\n\ts.imageStreamImageName = te.Image\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/openshift/openshift_transport.go",
    "content": "package openshift\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/policyconfiguration\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\tgenericImage \"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for OpenShift registry-hosted images.\nvar Transport = openshiftTransport{}\n\ntype openshiftTransport struct{}\n\nfunc (t openshiftTransport) Name() string {\n\treturn \"atomic\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t openshiftTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn ParseReference(reference)\n}\n\n// Note that imageNameRegexp is namespace/stream:tag, this\n// is HOSTNAME/namespace/stream:tag or parent prefixes.\n// Keep this in sync with imageNameRegexp!\nvar scopeRegexp = regexp.Delayed(\"^[^/]*(/[^:/]*(/[^:/]*(:[^:/]*)?)?)?$\")\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t openshiftTransport) ValidatePolicyConfigurationScope(scope string) error {\n\tif scopeRegexp.FindStringIndex(scope) == nil {\n\t\treturn fmt.Errorf(\"Invalid scope name %s\", scope)\n\t}\n\treturn nil\n}\n\n// openshiftReference is an ImageReference for OpenShift images.\ntype openshiftReference struct {\n\tdockerReference reference.NamedTagged\n\tnamespace       string // Computed from dockerReference in advance.\n\tstream          string // Computed from dockerReference in advance.\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an OpenShift ImageReference.\nfunc ParseReference(ref string) (types.ImageReference, error) {\n\tr, err := reference.ParseNormalizedNamed(ref)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse image reference %q: %w\", ref, err)\n\t}\n\ttagged, ok := r.(reference.NamedTagged)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"invalid image reference %s, expected format: 'hostname/namespace/stream:tag'\", ref)\n\t}\n\treturn NewReference(tagged)\n}\n\n// NewReference returns an OpenShift reference for a reference.NamedTagged\nfunc NewReference(dockerRef reference.NamedTagged) (types.ImageReference, error) {\n\tr := strings.SplitN(reference.Path(dockerRef), \"/\", 3)\n\tif len(r) != 2 {\n\t\treturn nil, fmt.Errorf(\"invalid image reference: %s, expected format: 'hostname/namespace/stream:tag'\",\n\t\t\treference.FamiliarString(dockerRef))\n\t}\n\treturn openshiftReference{\n\t\tnamespace:       r[0],\n\t\tstream:          r[1],\n\t\tdockerReference: dockerRef,\n\t}, nil\n}\n\nfunc (ref openshiftReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix.\nfunc (ref openshiftReference) StringWithinTransport() string {\n\treturn reference.FamiliarString(ref.dockerReference)\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref openshiftReference) DockerReference() reference.Named {\n\treturn ref.dockerReference\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref openshiftReference) PolicyConfigurationIdentity() string {\n\tres, err := policyconfiguration.DockerReferenceIdentity(ref.dockerReference)\n\tif res == \"\" || err != nil { // Coverage: Should never happen, NewReference constructs a valid tagged reference.\n\t\tpanic(fmt.Sprintf(\"Internal inconsistency: policyconfiguration.DockerReferenceIdentity returned %#v, %v\", res, err))\n\t}\n\treturn res\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref openshiftReference) PolicyConfigurationNamespaces() []string {\n\treturn policyconfiguration.DockerReferenceNamespaces(ref.dockerReference)\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref openshiftReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn genericImage.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref openshiftReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref openshiftReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(ctx, sys, ref)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref openshiftReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\treturn errors.New(\"Deleting images not implemented for atomic: images\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/blobinfocache/default.go",
    "content": "package blobinfocache\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/rootless\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/memory\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/sqlite\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\t// blobInfoCacheFilename is the file name used for blob info caches.\n\t// If the format changes in an incompatible way, increase the version number.\n\tblobInfoCacheFilename = \"blob-info-cache-v1.sqlite\"\n\t// systemBlobInfoCacheDir is the directory containing the blob info cache (in blobInfocacheFilename) for root-running processes.\n\tsystemBlobInfoCacheDir = \"/var/lib/containers/cache\"\n)\n\n// blobInfoCacheDir returns a path to a blob info cache appropriate for sys and euid.\n// euid is used so that (sudo …) does not write root-owned files into the unprivileged users’ home directory.\nfunc blobInfoCacheDir(sys *types.SystemContext, euid int) (string, error) {\n\tif sys != nil && sys.BlobInfoCacheDir != \"\" {\n\t\treturn sys.BlobInfoCacheDir, nil\n\t}\n\n\t// FIXME? On Windows, os.Geteuid() returns -1.  What should we do?  Right now we treat it as unprivileged\n\t// and fail (fall back to memory-only) if neither HOME nor XDG_DATA_HOME is set, which is, at least, safe.\n\tif euid == 0 {\n\t\tif sys != nil && sys.RootForImplicitAbsolutePaths != \"\" {\n\t\t\treturn filepath.Join(sys.RootForImplicitAbsolutePaths, systemBlobInfoCacheDir), nil\n\t\t}\n\t\treturn systemBlobInfoCacheDir, nil\n\t}\n\n\t// This is intended to mirror the GraphRoot determination in github.com/containers/libpod/pkg/util.GetRootlessStorageOpts.\n\tdataDir := os.Getenv(\"XDG_DATA_HOME\")\n\tif dataDir == \"\" {\n\t\thome := os.Getenv(\"HOME\")\n\t\tif home == \"\" {\n\t\t\treturn \"\", fmt.Errorf(\"neither XDG_DATA_HOME nor HOME was set non-empty\")\n\t\t}\n\t\tdataDir = filepath.Join(home, \".local\", \"share\")\n\t}\n\treturn filepath.Join(dataDir, \"containers\", \"cache\"), nil\n}\n\n// DefaultCache returns the default BlobInfoCache implementation appropriate for sys.\nfunc DefaultCache(sys *types.SystemContext) types.BlobInfoCache {\n\tdir, err := blobInfoCacheDir(sys, rootless.GetRootlessEUID())\n\tif err != nil {\n\t\tlogrus.Debugf(\"Error determining a location for %s, using a memory-only cache\", blobInfoCacheFilename)\n\t\treturn memory.New()\n\t}\n\tpath := filepath.Join(dir, blobInfoCacheFilename)\n\tif err := os.MkdirAll(dir, 0o700); err != nil {\n\t\tlogrus.Debugf(\"Error creating parent directories for %s, using a memory-only cache: %v\", path, err)\n\t\treturn memory.New()\n\t}\n\n\t// It might make sense to keep a single sqlite cache object, and a single initialized sqlite connection, open\n\t// as global singleton, for the vast majority of callers who don’t override thde cache location.\n\t// OTOH that would keep a file descriptor open forever, even for long-term callers who copy images rarely,\n\t// and the performance benefit to this over using an Open()/Close() pair for a single image copy is < 10%.\n\n\tcache, err := sqlite.New(path)\n\tif err != nil {\n\t\tlogrus.Debugf(\"Error creating a SQLite blob info cache at %s, using a memory-only cache: %v\", path, err)\n\t\treturn memory.New()\n\t}\n\tlogrus.Debugf(\"Using SQLite blob info cache at %s\", path)\n\treturn cache\n}\n\n// CleanupDefaultCache removes the blob info cache directory.\n// It deletes the cache directory but it does not affect any file or memory buffer currently\n// in use.\nfunc CleanupDefaultCache(sys *types.SystemContext) error {\n\tdir, err := blobInfoCacheDir(sys, rootless.GetRootlessEUID())\n\tif err != nil {\n\t\t// Mirror the DefaultCache behavior that does not fail in this case\n\t\treturn nil\n\t}\n\treturn os.RemoveAll(dir)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/blobinfocache/internal/prioritize/prioritize.go",
    "content": "// Package prioritize provides utilities for filtering and prioritizing locations in\n// types.BlobInfoCache.CandidateLocations.\npackage prioritize\n\nimport (\n\t\"cmp\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/manifest\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// replacementAttempts is the number of blob replacement candidates with known location returned by destructivelyPrioritizeReplacementCandidates,\n// and therefore ultimately by types.BlobInfoCache.CandidateLocations.\n// This is a heuristic/guess, and could well use a different value.\nconst replacementAttempts = 5\n\n// replacementUnknownLocationAttempts is the number of blob replacement candidates with unknown Location returned by destructivelyPrioritizeReplacementCandidates,\n// and therefore ultimately by blobinfocache.BlobInfoCache2.CandidateLocations2.\n// This is a heuristic/guess, and could well use a different value.\nconst replacementUnknownLocationAttempts = 2\n\n// CandidateTemplate is a subset of BICReplacementCandidate2 with data related to a specific digest,\n// which can be later combined with information about a location.\ntype CandidateTemplate struct {\n\tdigest                 digest.Digest\n\tcompressionOperation   types.LayerCompression // Either types.Decompress for uncompressed, or types.Compress for compressed\n\tcompressionAlgorithm   *compression.Algorithm // An algorithm when the candidate is compressed, or nil when it is uncompressed\n\tcompressionAnnotations map[string]string      // If necessary, annotations necessary to use compressionAlgorithm\n}\n\n// CandidateTemplateWithCompression returns a CandidateTemplate if a blob with data is acceptable\n// for a CandidateLocations* call with v2Options.\n//\n// v2Options can be set to nil if the call is CandidateLocations (i.e. compression is not required to be known);\n// if not nil, the call is assumed to be CandidateLocations2.\nfunc CandidateTemplateWithCompression(v2Options *blobinfocache.CandidateLocations2Options, digest digest.Digest, data blobinfocache.DigestCompressorData) *CandidateTemplate {\n\tif v2Options == nil {\n\t\treturn &CandidateTemplate{ // Anything goes. The compressionOperation, compressionAlgorithm and compressionAnnotations values are not used.\n\t\t\tdigest: digest,\n\t\t}\n\t}\n\n\trequiredCompression := \"nil\"\n\tif v2Options.RequiredCompression != nil {\n\t\trequiredCompression = v2Options.RequiredCompression.Name()\n\t}\n\tswitch data.BaseVariantCompressor {\n\tcase blobinfocache.Uncompressed:\n\t\tif !manifest.CandidateCompressionMatchesReuseConditions(manifest.ReuseConditions{\n\t\t\tPossibleManifestFormats: v2Options.PossibleManifestFormats,\n\t\t\tRequiredCompression:     v2Options.RequiredCompression,\n\t\t}, nil) {\n\t\t\tlogrus.Debugf(\"Ignoring BlobInfoCache record of digest %q, uncompressed format does not match required %s or MIME types %#v\",\n\t\t\t\tdigest.String(), requiredCompression, v2Options.PossibleManifestFormats)\n\t\t\treturn nil\n\t\t}\n\t\treturn &CandidateTemplate{\n\t\t\tdigest:                 digest,\n\t\t\tcompressionOperation:   types.Decompress,\n\t\t\tcompressionAlgorithm:   nil,\n\t\t\tcompressionAnnotations: nil,\n\t\t}\n\tcase blobinfocache.UnknownCompression:\n\t\tlogrus.Debugf(\"Ignoring BlobInfoCache record of digest %q with unknown compression\", digest.String())\n\t\treturn nil // Not allowed with CandidateLocations2\n\tdefault:\n\t\t// See if we can use the specific variant, first.\n\t\tif data.SpecificVariantCompressor != blobinfocache.UnknownCompression {\n\t\t\talgo, err := compression.AlgorithmByName(data.SpecificVariantCompressor)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Debugf(\"Not considering unrecognized specific compression variant %q for BlobInfoCache record of digest %q: %v\",\n\t\t\t\t\tdata.SpecificVariantCompressor, digest.String(), err)\n\t\t\t} else {\n\t\t\t\tif !manifest.CandidateCompressionMatchesReuseConditions(manifest.ReuseConditions{\n\t\t\t\t\tPossibleManifestFormats: v2Options.PossibleManifestFormats,\n\t\t\t\t\tRequiredCompression:     v2Options.RequiredCompression,\n\t\t\t\t}, &algo) {\n\t\t\t\t\tlogrus.Debugf(\"Ignoring specific compression variant %q for BlobInfoCache record of digest %q, it does not match required %s or MIME types %#v\",\n\t\t\t\t\t\tdata.SpecificVariantCompressor, digest.String(), requiredCompression, v2Options.PossibleManifestFormats)\n\t\t\t\t} else {\n\t\t\t\t\treturn &CandidateTemplate{\n\t\t\t\t\t\tdigest:                 digest,\n\t\t\t\t\t\tcompressionOperation:   types.Compress,\n\t\t\t\t\t\tcompressionAlgorithm:   &algo,\n\t\t\t\t\t\tcompressionAnnotations: data.SpecificVariantAnnotations,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Try the base variant.\n\t\talgo, err := compression.AlgorithmByName(data.BaseVariantCompressor)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Ignoring BlobInfoCache record of digest %q with unrecognized compression %q: %v\",\n\t\t\t\tdigest.String(), data.BaseVariantCompressor, err)\n\t\t\treturn nil // The BICReplacementCandidate2.CompressionAlgorithm field is required\n\t\t}\n\t\tif !manifest.CandidateCompressionMatchesReuseConditions(manifest.ReuseConditions{\n\t\t\tPossibleManifestFormats: v2Options.PossibleManifestFormats,\n\t\t\tRequiredCompression:     v2Options.RequiredCompression,\n\t\t}, &algo) {\n\t\t\tlogrus.Debugf(\"Ignoring BlobInfoCache record of digest %q, compression %q does not match required %s or MIME types %#v\",\n\t\t\t\tdigest.String(), data.BaseVariantCompressor, requiredCompression, v2Options.PossibleManifestFormats)\n\t\t\treturn nil\n\t\t}\n\t\treturn &CandidateTemplate{\n\t\t\tdigest:                 digest,\n\t\t\tcompressionOperation:   types.Compress,\n\t\t\tcompressionAlgorithm:   &algo,\n\t\t\tcompressionAnnotations: nil,\n\t\t}\n\t}\n}\n\n// CandidateWithTime is the input to types.BICReplacementCandidate prioritization.\ntype CandidateWithTime struct {\n\tcandidate blobinfocache.BICReplacementCandidate2 // The replacement candidate\n\tlastSeen  time.Time                              // Time the candidate was last known to exist (either read or written) (not set for Candidate.UnknownLocation)\n}\n\n// CandidateWithLocation returns a complete CandidateWithTime combining (template from CandidateTemplateWithCompression, location, lastSeen)\nfunc (template CandidateTemplate) CandidateWithLocation(location types.BICLocationReference, lastSeen time.Time) CandidateWithTime {\n\treturn CandidateWithTime{\n\t\tcandidate: blobinfocache.BICReplacementCandidate2{\n\t\t\tDigest:                 template.digest,\n\t\t\tCompressionOperation:   template.compressionOperation,\n\t\t\tCompressionAlgorithm:   template.compressionAlgorithm,\n\t\t\tCompressionAnnotations: template.compressionAnnotations,\n\t\t\tUnknownLocation:        false,\n\t\t\tLocation:               location,\n\t\t},\n\t\tlastSeen: lastSeen,\n\t}\n}\n\n// CandidateWithUnknownLocation returns a complete CandidateWithTime for a template from CandidateTemplateWithCompression and an unknown location.\nfunc (template CandidateTemplate) CandidateWithUnknownLocation() CandidateWithTime {\n\treturn CandidateWithTime{\n\t\tcandidate: blobinfocache.BICReplacementCandidate2{\n\t\t\tDigest:                 template.digest,\n\t\t\tCompressionOperation:   template.compressionOperation,\n\t\t\tCompressionAlgorithm:   template.compressionAlgorithm,\n\t\t\tCompressionAnnotations: template.compressionAnnotations,\n\t\t\tUnknownLocation:        true,\n\t\t\tLocation:               types.BICLocationReference{Opaque: \"\"},\n\t\t},\n\t\tlastSeen: time.Time{},\n\t}\n}\n\n// candidateSortState is a closure for a comparison used by slices.SortFunc on candidates to prioritize,\n// along with the specially-treated digest values relevant to the ordering.\ntype candidateSortState struct {\n\tprimaryDigest      digest.Digest // The digest the user actually asked for\n\tuncompressedDigest digest.Digest // The uncompressed digest corresponding to primaryDigest. May be \"\", or even equal to primaryDigest\n}\n\nfunc (css *candidateSortState) compare(xi, xj CandidateWithTime) int {\n\t// primaryDigest entries come first, more recent first.\n\t// uncompressedDigest entries, if uncompressedDigest is set and != primaryDigest, come last, more recent entry first.\n\t// Other digest values are primarily sorted by time (more recent first), secondarily by digest (to provide a deterministic order)\n\n\t// First, deal with the primaryDigest/uncompressedDigest cases:\n\tif xi.candidate.Digest != xj.candidate.Digest {\n\t\t// - The two digests are different, and one (or both) of the digests is primaryDigest or uncompressedDigest: time does not matter\n\t\tif xi.candidate.Digest == css.primaryDigest {\n\t\t\treturn -1\n\t\t}\n\t\tif xj.candidate.Digest == css.primaryDigest {\n\t\t\treturn 1\n\t\t}\n\t\tif css.uncompressedDigest != \"\" {\n\t\t\tif xi.candidate.Digest == css.uncompressedDigest {\n\t\t\t\treturn 1\n\t\t\t}\n\t\t\tif xj.candidate.Digest == css.uncompressedDigest {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t}\n\t} else { // xi.Candidate.Digest == xj.Candidate.Digest\n\t\t// The two digests are the same, and are either primaryDigest or uncompressedDigest: order by time\n\t\tif xi.candidate.Digest == css.primaryDigest || (css.uncompressedDigest != \"\" && xi.candidate.Digest == css.uncompressedDigest) {\n\t\t\treturn -xi.lastSeen.Compare(xj.lastSeen)\n\t\t}\n\t}\n\n\t// Neither of the digests are primaryDigest/uncompressedDigest:\n\tif cmp := xi.lastSeen.Compare(xj.lastSeen); cmp != 0 { // Order primarily by time\n\t\treturn -cmp\n\t}\n\t// Fall back to digest, if timestamps end up _exactly_ the same (how?!)\n\treturn cmp.Compare(xi.candidate.Digest, xj.candidate.Digest)\n}\n\n// destructivelyPrioritizeReplacementCandidatesWithMax is destructivelyPrioritizeReplacementCandidates with parameters for the\n// number of entries to limit for known and unknown location separately, only to make testing simpler.\nfunc destructivelyPrioritizeReplacementCandidatesWithMax(cs []CandidateWithTime, primaryDigest, uncompressedDigest digest.Digest, totalLimit int, noLocationLimit int) []blobinfocache.BICReplacementCandidate2 {\n\t// split unknown candidates and known candidates\n\t// and limit them separately.\n\tvar knownLocationCandidates []CandidateWithTime\n\tvar unknownLocationCandidates []CandidateWithTime\n\t// We don't need to use sort.Stable() because nanosecond timestamps are (presumably?) unique, so no two elements should\n\t// compare equal.\n\tslices.SortFunc(cs, (&candidateSortState{\n\t\tprimaryDigest:      primaryDigest,\n\t\tuncompressedDigest: uncompressedDigest,\n\t}).compare)\n\tfor _, candidate := range cs {\n\t\tif candidate.candidate.UnknownLocation {\n\t\t\tunknownLocationCandidates = append(unknownLocationCandidates, candidate)\n\t\t} else {\n\t\t\tknownLocationCandidates = append(knownLocationCandidates, candidate)\n\t\t}\n\t}\n\n\tknownLocationCandidatesUsed := min(len(knownLocationCandidates), totalLimit)\n\tremainingCapacity := totalLimit - knownLocationCandidatesUsed\n\tunknownLocationCandidatesUsed := min(noLocationLimit, remainingCapacity, len(unknownLocationCandidates))\n\tres := make([]blobinfocache.BICReplacementCandidate2, knownLocationCandidatesUsed)\n\tfor i := 0; i < knownLocationCandidatesUsed; i++ {\n\t\tres[i] = knownLocationCandidates[i].candidate\n\t}\n\t// If candidates with unknown location are found, lets add them to final list\n\tfor i := range unknownLocationCandidatesUsed {\n\t\tres = append(res, unknownLocationCandidates[i].candidate)\n\t}\n\treturn res\n}\n\n// DestructivelyPrioritizeReplacementCandidates consumes AND DESTROYS an array of possible replacement candidates with their last known existence times,\n// the primary digest the user actually asked for, the corresponding uncompressed digest (if known, possibly equal to the primary digest) returns an\n// appropriately prioritized and/or trimmed result suitable for a return value from types.BlobInfoCache.CandidateLocations.\n//\n// WARNING: The array of candidates is destructively modified. (The implementation of this function could of course\n// make a copy, but all CandidateLocations implementations build the slice of candidates only for the single purpose of calling this function anyway.)\nfunc DestructivelyPrioritizeReplacementCandidates(cs []CandidateWithTime, primaryDigest, uncompressedDigest digest.Digest) []blobinfocache.BICReplacementCandidate2 {\n\treturn destructivelyPrioritizeReplacementCandidatesWithMax(cs, primaryDigest, uncompressedDigest, replacementAttempts, replacementUnknownLocationAttempts)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/blobinfocache/memory/memory.go",
    "content": "// Package memory implements an in-memory BlobInfoCache.\npackage memory\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/internal/prioritize\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// locationKey only exists to make lookup in knownLocations easier.\ntype locationKey struct {\n\ttransport  string\n\tscope      types.BICTransportScope\n\tblobDigest digest.Digest\n}\n\n// cache implements an in-memory-only BlobInfoCache.\ntype cache struct {\n\tmutex sync.Mutex\n\t// The following fields can only be accessed with mutex held.\n\tuncompressedDigests      map[digest.Digest]digest.Digest\n\tuncompressedDigestsByTOC map[digest.Digest]digest.Digest\n\tdigestsByUncompressed    map[digest.Digest]*set.Set[digest.Digest]                // stores a set of digests for each uncompressed digest\n\tknownLocations           map[locationKey]map[types.BICLocationReference]time.Time // stores last known existence time for each location reference\n\tcompressors              map[digest.Digest]blobinfocache.DigestCompressorData     // stores compression data for each digest; BaseVariantCompressor != UnknownCompression\n}\n\n// New returns a BlobInfoCache implementation which is in-memory only.\n//\n// This is primarily intended for tests, but also used as a fallback\n// if blobinfocache.DefaultCache can’t determine, or set up, the\n// location for a persistent cache.  Most users should use\n// blobinfocache.DefaultCache. instead of calling this directly.\n// Manual users of types.{ImageSource,ImageDestination} might also use\n// this instead of a persistent cache.\nfunc New() types.BlobInfoCache {\n\treturn new2()\n}\n\nfunc new2() *cache {\n\treturn &cache{\n\t\tuncompressedDigests:      map[digest.Digest]digest.Digest{},\n\t\tuncompressedDigestsByTOC: map[digest.Digest]digest.Digest{},\n\t\tdigestsByUncompressed:    map[digest.Digest]*set.Set[digest.Digest]{},\n\t\tknownLocations:           map[locationKey]map[types.BICLocationReference]time.Time{},\n\t\tcompressors:              map[digest.Digest]blobinfocache.DigestCompressorData{},\n\t}\n}\n\n// Open() sets up the cache for future accesses, potentially acquiring costly state. Each Open() must be paired with a Close().\n// Note that public callers may call the types.BlobInfoCache operations without Open()/Close().\nfunc (mem *cache) Open() {\n}\n\n// Close destroys state created by Open().\nfunc (mem *cache) Close() {\n}\n\n// UncompressedDigest returns an uncompressed digest corresponding to anyDigest.\n// May return anyDigest if it is known to be uncompressed.\n// Returns \"\" if nothing is known about the digest (it may be compressed or uncompressed).\nfunc (mem *cache) UncompressedDigest(anyDigest digest.Digest) digest.Digest {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\treturn mem.uncompressedDigestLocked(anyDigest)\n}\n\n// uncompressedDigestLocked implements types.BlobInfoCache.UncompressedDigest, but must be called only with mem.mutex held.\nfunc (mem *cache) uncompressedDigestLocked(anyDigest digest.Digest) digest.Digest {\n\tif d, ok := mem.uncompressedDigests[anyDigest]; ok {\n\t\treturn d\n\t}\n\t// Presence in digestsByUncompressed implies that anyDigest must already refer to an uncompressed digest.\n\t// This way we don't have to waste storage space with trivial (uncompressed, uncompressed) mappings\n\t// when we already record a (compressed, uncompressed) pair.\n\tif s, ok := mem.digestsByUncompressed[anyDigest]; ok && !s.Empty() {\n\t\treturn anyDigest\n\t}\n\treturn \"\"\n}\n\n// RecordDigestUncompressedPair records that the uncompressed version of anyDigest is uncompressed.\n// It’s allowed for anyDigest == uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (mem *cache) RecordDigestUncompressedPair(anyDigest digest.Digest, uncompressed digest.Digest) {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tif previous, ok := mem.uncompressedDigests[anyDigest]; ok && previous != uncompressed {\n\t\tlogrus.Warnf(\"Uncompressed digest for blob %s previously recorded as %s, now %s\", anyDigest, previous, uncompressed)\n\t}\n\tmem.uncompressedDigests[anyDigest] = uncompressed\n\n\tanyDigestSet, ok := mem.digestsByUncompressed[uncompressed]\n\tif !ok {\n\t\tanyDigestSet = set.New[digest.Digest]()\n\t\tmem.digestsByUncompressed[uncompressed] = anyDigestSet\n\t}\n\tanyDigestSet.Add(anyDigest)\n}\n\n// UncompressedDigestForTOC returns an uncompressed digest corresponding to anyDigest.\n// Returns \"\" if the uncompressed digest is unknown.\nfunc (mem *cache) UncompressedDigestForTOC(tocDigest digest.Digest) digest.Digest {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tif d, ok := mem.uncompressedDigestsByTOC[tocDigest]; ok {\n\t\treturn d\n\t}\n\treturn \"\"\n}\n\n// RecordTOCUncompressedPair records that the tocDigest corresponds to uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (mem *cache) RecordTOCUncompressedPair(tocDigest digest.Digest, uncompressed digest.Digest) {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tif previous, ok := mem.uncompressedDigestsByTOC[tocDigest]; ok && previous != uncompressed {\n\t\tlogrus.Warnf(\"Uncompressed digest for blob with TOC %q previously recorded as %q, now %q\", tocDigest, previous, uncompressed)\n\t}\n\tmem.uncompressedDigestsByTOC[tocDigest] = uncompressed\n}\n\n// RecordKnownLocation records that a blob with the specified digest exists within the specified (transport, scope) scope,\n// and can be reused given the opaque location data.\nfunc (mem *cache) RecordKnownLocation(transport types.ImageTransport, scope types.BICTransportScope, blobDigest digest.Digest, location types.BICLocationReference) {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tkey := locationKey{transport: transport.Name(), scope: scope, blobDigest: blobDigest}\n\tlocationScope, ok := mem.knownLocations[key]\n\tif !ok {\n\t\tlocationScope = map[types.BICLocationReference]time.Time{}\n\t\tmem.knownLocations[key] = locationScope\n\t}\n\tlocationScope[location] = time.Now() // Possibly overwriting an older entry.\n}\n\n// RecordDigestCompressorData records data for the blob with the specified digest.\n// WARNING: Only call this with LOCALLY VERIFIED data:\n//   - don’t record a compressor for a digest just because some remote author claims so\n//     (e.g. because a manifest says so);\n//   - don’t record the non-base variant or annotations if we are not _sure_ that the base variant\n//     and the blob’s digest match the non-base variant’s annotations (e.g. because we saw them\n//     in a manifest)\n//\n// otherwise the cache could be poisoned and cause us to make incorrect edits to type\n// information in a manifest.\nfunc (mem *cache) RecordDigestCompressorData(anyDigest digest.Digest, data blobinfocache.DigestCompressorData) {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tif previous, ok := mem.compressors[anyDigest]; ok {\n\t\tif previous.BaseVariantCompressor != data.BaseVariantCompressor {\n\t\t\tlogrus.Warnf(\"Base compressor for blob with digest %s previously recorded as %s, now %s\", anyDigest, previous.BaseVariantCompressor, data.BaseVariantCompressor)\n\t\t} else if previous.SpecificVariantCompressor != blobinfocache.UnknownCompression && data.SpecificVariantCompressor != blobinfocache.UnknownCompression &&\n\t\t\tprevious.SpecificVariantCompressor != data.SpecificVariantCompressor {\n\t\t\tlogrus.Warnf(\"Specific compressor for blob with digest %s previously recorded as %s, now %s\", anyDigest, previous.SpecificVariantCompressor, data.SpecificVariantCompressor)\n\t\t}\n\t\t// We don’t check SpecificVariantAnnotations for equality, it’s possible that their generation is not deterministic.\n\n\t\t// Preserve specific variant information if the incoming data does not have it.\n\t\tif data.BaseVariantCompressor != blobinfocache.UnknownCompression && data.SpecificVariantCompressor == blobinfocache.UnknownCompression &&\n\t\t\tprevious.SpecificVariantCompressor != blobinfocache.UnknownCompression {\n\t\t\tdata.SpecificVariantCompressor = previous.SpecificVariantCompressor\n\t\t\tdata.SpecificVariantAnnotations = previous.SpecificVariantAnnotations\n\t\t}\n\t}\n\tif data.BaseVariantCompressor == blobinfocache.UnknownCompression {\n\t\tdelete(mem.compressors, anyDigest)\n\t\treturn\n\t}\n\tmem.compressors[anyDigest] = data\n}\n\n// appendReplacementCandidates creates prioritize.CandidateWithTime values for digest in memory\n// with corresponding compression info from mem.compressors, and returns the result of appending\n// them to candidates.\n// v2Options is not nil if the caller is CandidateLocations2: this allows including candidates with unknown location, and filters out candidates\n// with unknown compression.\nfunc (mem *cache) appendReplacementCandidates(candidates []prioritize.CandidateWithTime, transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest,\n\tv2Options *blobinfocache.CandidateLocations2Options,\n) []prioritize.CandidateWithTime {\n\tcompressionData := blobinfocache.DigestCompressorData{\n\t\tBaseVariantCompressor:      blobinfocache.UnknownCompression,\n\t\tSpecificVariantCompressor:  blobinfocache.UnknownCompression,\n\t\tSpecificVariantAnnotations: nil,\n\t}\n\tif v, ok := mem.compressors[digest]; ok {\n\t\tcompressionData = v\n\t}\n\ttemplate := prioritize.CandidateTemplateWithCompression(v2Options, digest, compressionData)\n\tif template == nil {\n\t\treturn candidates\n\t}\n\tlocations := mem.knownLocations[locationKey{transport: transport.Name(), scope: scope, blobDigest: digest}] // nil if not present\n\tif len(locations) > 0 {\n\t\tfor l, t := range locations {\n\t\t\tcandidates = append(candidates, template.CandidateWithLocation(l, t))\n\t\t}\n\t} else if v2Options != nil {\n\t\tcandidates = append(candidates, template.CandidateWithUnknownLocation())\n\t}\n\treturn candidates\n}\n\n// CandidateLocations returns a prioritized, limited, number of blobs and their locations that could possibly be reused\n// within the specified (transport scope) (if they still exist, which is not guaranteed).\n//\n// If !canSubstitute, the returned candidates will match the submitted digest exactly; if canSubstitute,\n// data from previous RecordDigestUncompressedPair calls is used to also look up variants of the blob which have the same\n// uncompressed digest.\nfunc (mem *cache) CandidateLocations(transport types.ImageTransport, scope types.BICTransportScope, primaryDigest digest.Digest, canSubstitute bool) []types.BICReplacementCandidate {\n\treturn blobinfocache.CandidateLocationsFromV2(mem.candidateLocations(transport, scope, primaryDigest, canSubstitute, nil))\n}\n\n// CandidateLocations2 returns a prioritized, limited, number of blobs and their locations (if known)\n// that could possibly be reused within the specified (transport scope) (if they still\n// exist, which is not guaranteed).\nfunc (mem *cache) CandidateLocations2(transport types.ImageTransport, scope types.BICTransportScope, primaryDigest digest.Digest, options blobinfocache.CandidateLocations2Options) []blobinfocache.BICReplacementCandidate2 {\n\treturn mem.candidateLocations(transport, scope, primaryDigest, options.CanSubstitute, &options)\n}\n\n// candidateLocations implements CandidateLocations / CandidateLocations2.\n// v2Options is not nil if the caller is CandidateLocations2.\nfunc (mem *cache) candidateLocations(transport types.ImageTransport, scope types.BICTransportScope, primaryDigest digest.Digest, canSubstitute bool,\n\tv2Options *blobinfocache.CandidateLocations2Options,\n) []blobinfocache.BICReplacementCandidate2 {\n\tmem.mutex.Lock()\n\tdefer mem.mutex.Unlock()\n\tres := []prioritize.CandidateWithTime{}\n\tres = mem.appendReplacementCandidates(res, transport, scope, primaryDigest, v2Options)\n\tvar uncompressedDigest digest.Digest // = \"\"\n\tif canSubstitute {\n\t\tif uncompressedDigest = mem.uncompressedDigestLocked(primaryDigest); uncompressedDigest != \"\" {\n\t\t\totherDigests := mem.digestsByUncompressed[uncompressedDigest] // nil if not present in the map\n\t\t\tif otherDigests != nil {\n\t\t\t\tfor d := range otherDigests.All() {\n\t\t\t\t\tif d != primaryDigest && d != uncompressedDigest {\n\t\t\t\t\t\tres = mem.appendReplacementCandidates(res, transport, scope, d, v2Options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uncompressedDigest != primaryDigest {\n\t\t\t\tres = mem.appendReplacementCandidates(res, transport, scope, uncompressedDigest, v2Options)\n\t\t\t}\n\t\t}\n\t}\n\treturn prioritize.DestructivelyPrioritizeReplacementCandidates(res, primaryDigest, uncompressedDigest)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/blobinfocache/none/none.go",
    "content": "// Package none implements a dummy BlobInfoCache which records no data.\npackage none\n\nimport (\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// noCache implements a dummy BlobInfoCache which records no data.\ntype noCache struct{}\n\n// NoCache implements BlobInfoCache by not recording any data.\n//\n// This exists primarily for implementations of configGetter for\n// Manifest.Inspect, because configs only have one representation.\n// Any use of BlobInfoCache with blobs should usually use at least a\n// short-lived cache, ideally blobinfocache.DefaultCache.\nvar NoCache blobinfocache.BlobInfoCache2 = blobinfocache.FromBlobInfoCache(&noCache{})\n\n// UncompressedDigest returns an uncompressed digest corresponding to anyDigest.\n// May return anyDigest if it is known to be uncompressed.\n// Returns \"\" if nothing is known about the digest (it may be compressed or uncompressed).\nfunc (noCache) UncompressedDigest(anyDigest digest.Digest) digest.Digest {\n\treturn \"\"\n}\n\n// RecordDigestUncompressedPair records that the uncompressed version of anyDigest is uncompressed.\n// It’s allowed for anyDigest == uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (noCache) RecordDigestUncompressedPair(anyDigest digest.Digest, uncompressed digest.Digest) {\n}\n\n// UncompressedDigestForTOC returns an uncompressed digest corresponding to anyDigest.\n// Returns \"\" if the uncompressed digest is unknown.\nfunc (noCache) UncompressedDigestForTOC(tocDigest digest.Digest) digest.Digest {\n\treturn \"\"\n}\n\n// RecordTOCUncompressedPair records that the tocDigest corresponds to uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (noCache) RecordTOCUncompressedPair(tocDigest digest.Digest, uncompressed digest.Digest) {\n}\n\n// RecordKnownLocation records that a blob with the specified digest exists within the specified (transport, scope) scope,\n// and can be reused given the opaque location data.\nfunc (noCache) RecordKnownLocation(transport types.ImageTransport, scope types.BICTransportScope, blobDigest digest.Digest, location types.BICLocationReference) {\n}\n\n// CandidateLocations returns a prioritized, limited, number of blobs and their locations that could possibly be reused\n// within the specified (transport scope) (if they still exist, which is not guaranteed).\n//\n// If !canSubstitute, the returned candidates will match the submitted digest exactly; if canSubstitute,\n// data from previous RecordDigestUncompressedPair calls is used to also look up variants of the blob which have the same\n// uncompressed digest.\nfunc (noCache) CandidateLocations(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, canSubstitute bool) []types.BICReplacementCandidate {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/blobinfocache/sqlite/sqlite.go",
    "content": "// Package boltdb implements a BlobInfoCache backed by SQLite.\npackage sqlite\n\nimport (\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t_ \"github.com/mattn/go-sqlite3\" // Registers the \"sqlite3\" backend backend for database/sql\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/blobinfocache\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/internal/prioritize\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\t// NOTE: There is no versioning data inside the file; this is a “cache”, so on an incompatible format upgrade\n\t// we can simply start over with a different filename; update blobInfoCacheFilename.\n\t// That also means we don’t have to worry about co-existing readers/writers which know different versions of the schema\n\t// (which would require compatibility in both directions).\n\n\t// Assembled sqlite options used when opening the database.\n\tsqliteOptions = \"?\" +\n\t\t// Deal with timezone automatically.\n\t\t// go-sqlite3 always _records_ timestamps as a text: time in local time + a time zone offset.\n\t\t// _loc affects how the values are _parsed_: (which timezone is assumed for numeric timestamps or for text which does not specify an offset, or)\n\t\t// if the time zone offset matches the specified time zone, the timestamp is assumed to be in that time zone / location;\n\t\t// (otherwise an unnamed time zone carrying just a hard-coded offset, but no location / DST rules is used).\n\t\t\"_loc=auto\" +\n\t\t// Force an fsync after each transaction (https://www.sqlite.org/pragma.html#pragma_synchronous).\n\t\t\"&_sync=FULL\" +\n\t\t// Allow foreign keys (https://www.sqlite.org/pragma.html#pragma_foreign_keys).\n\t\t// We don’t currently use any foreign keys, but this is a good choice long-term (not default in SQLite only for historical reasons).\n\t\t\"&_foreign_keys=1\" +\n\t\t// Use BEGIN EXCLUSIVE (https://www.sqlite.org/lang_transaction.html);\n\t\t// i.e. obtain a write lock for _all_ transactions at the transaction start (never use a read lock,\n\t\t// never upgrade from a read to a write lock - that can fail if multiple read lock owners try to do that simultaneously).\n\t\t//\n\t\t// This, together with go-sqlite3’s default for _busy_timeout=5000, means that we should never see a “database is locked” error,\n\t\t// the database should block on the exclusive lock when starting a transaction, and the problematic case of two simultaneous\n\t\t// holders of a read lock trying to upgrade to a write lock (and one necessarily failing) is prevented.\n\t\t// Compare https://github.com/mattn/go-sqlite3/issues/274 .\n\t\t//\n\t\t// Ideally the BEGIN / BEGIN EXCLUSIVE decision could be made per-transaction, compare https://github.com/mattn/go-sqlite3/pull/1167\n\t\t// or https://github.com/mattn/go-sqlite3/issues/400 .\n\t\t// The currently-proposed  workaround is to create two different SQL “databases” (= connection pools) with different _txlock settings,\n\t\t// which seems rather wasteful.\n\t\t\"&_txlock=exclusive\"\n)\n\n// cache is a BlobInfoCache implementation which uses a SQLite file at the specified path.\ntype cache struct {\n\tpath string\n\n\t// The database/sql package says “It is rarely necessary to close a DB.”, and steers towards a long-term *sql.DB connection pool.\n\t// That’s probably very applicable for database-backed services, where the database is the primary data store. That’s not necessarily\n\t// the case for callers of c/image, where image operations might be a small proportion of the total runtime, and the cache is fairly\n\t// incidental even to the image operations. It’s also hard for us to use that model, because the public BlobInfoCache object doesn’t have\n\t// a Close method, so creating a lot of single-use caches could leak data.\n\t//\n\t// Instead, the private BlobInfoCache2 interface provides Open/Close methods, and they are called by c/image/copy.Image.\n\t// This amortizes the cost of opening/closing the SQLite state over a single image copy, while keeping no long-term resources open.\n\t// Some rough benchmarks in https://github.com/containers/image/pull/2092 suggest relative costs on the order of \"25\" for a single\n\t// *sql.DB left open long-term, \"27\" for a *sql.DB open for a single image copy, and \"40\" for opening/closing a *sql.DB for every\n\t// single transaction; so the Open/Close per image copy seems a reasonable compromise (especially compared to the previous implementation,\n\t// somewhere around \"700\").\n\n\tlock sync.Mutex\n\t// The following fields can only be accessed with lock held.\n\trefCount int     // number of outstanding Open() calls\n\tdb       *sql.DB // nil if not set (may happen even if refCount > 0 on errors)\n}\n\n// New returns BlobInfoCache implementation which uses a SQLite file at path.\n//\n// Most users should call blobinfocache.DefaultCache instead.\nfunc New(path string) (types.BlobInfoCache, error) {\n\treturn new2(path)\n}\n\nfunc new2(path string) (*cache, error) {\n\tdb, err := rawOpen(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing blob info cache at %q: %w\", path, err)\n\t}\n\terr = func() (retErr error) { // A scope for defer\n\t\tdefer func() {\n\t\t\tcloseErr := db.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}()\n\t\t// We don’t check the schema before every operation, because that would be costly\n\t\t// and because we assume schema changes will be handled by using a different path.\n\t\treturn ensureDBHasCurrentSchema(db)\n\t}()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &cache{\n\t\tpath:     path,\n\t\trefCount: 0,\n\t\tdb:       nil,\n\t}, nil\n}\n\n// rawOpen returns a new *sql.DB for path.\n// The caller should arrange for it to be .Close()d.\nfunc rawOpen(path string) (*sql.DB, error) {\n\t// This exists to centralize the use of sqliteOptions.\n\treturn sql.Open(\"sqlite3\", path+sqliteOptions)\n}\n\n// Open() sets up the cache for future accesses, potentially acquiring costly state. Each Open() must be paired with a Close().\n// Note that public callers may call the types.BlobInfoCache operations without Open()/Close().\nfunc (sqc *cache) Open() {\n\tsqc.lock.Lock()\n\tdefer sqc.lock.Unlock()\n\n\tif sqc.refCount == 0 {\n\t\tdb, err := rawOpen(sqc.path)\n\t\tif err != nil {\n\t\t\tlogrus.Warnf(\"Error opening (previously-successfully-opened) blob info cache at %q: %v\", sqc.path, err)\n\t\t\tdb = nil // But still increase sqc.refCount, because a .Close() will happen\n\t\t}\n\t\tsqc.db = db\n\t}\n\tsqc.refCount++\n}\n\n// Close destroys state created by Open().\nfunc (sqc *cache) Close() {\n\tsqc.lock.Lock()\n\tdefer sqc.lock.Unlock()\n\n\tswitch sqc.refCount {\n\tcase 0:\n\t\tlogrus.Errorf(\"internal error using pkg/blobinfocache/sqlite.cache: Close() without a matching Open()\")\n\t\treturn\n\tcase 1:\n\t\tif sqc.db != nil {\n\t\t\tsqc.db.Close()\n\t\t\tsqc.db = nil\n\t\t}\n\t}\n\tsqc.refCount--\n}\n\ntype void struct{} // So that we don’t have to write struct{}{} all over the place\n\n// transaction calls fn within a read-write transaction in sqc.\nfunc transaction[T any](sqc *cache, fn func(tx *sql.Tx) (T, error)) (_ T, retErr error) {\n\tdb, closeDB, err := func() (*sql.DB, func() error, error) { // A scope for defer\n\t\tsqc.lock.Lock()\n\t\tdefer sqc.lock.Unlock()\n\n\t\tif sqc.db != nil {\n\t\t\treturn sqc.db, func() error { return nil }, nil\n\t\t}\n\t\tdb, err := rawOpen(sqc.path)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"opening blob info cache at %q: %w\", sqc.path, err)\n\t\t}\n\t\treturn db, db.Close, nil\n\t}()\n\tif err != nil {\n\t\tvar zeroRes T // A zero value of T\n\t\treturn zeroRes, err\n\t}\n\tdefer func() {\n\t\tcloseErr := closeDB()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\treturn dbTransaction(db, fn)\n}\n\n// dbTransaction calls fn within a read-write transaction in db.\nfunc dbTransaction[T any](db *sql.DB, fn func(tx *sql.Tx) (T, error)) (T, error) {\n\t// Ideally we should be able to distinguish between read-only and read-write transactions, see the _txlock=exclusive discussion.\n\n\tvar zeroRes T // A zero value of T\n\n\ttx, err := db.Begin()\n\tif err != nil {\n\t\treturn zeroRes, fmt.Errorf(\"beginning transaction: %w\", err)\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tif err := tx.Rollback(); err != nil {\n\t\t\t\tlogrus.Errorf(\"Rolling back transaction: %v\", err)\n\t\t\t}\n\t\t}\n\t}()\n\n\tres, err := fn(tx)\n\tif err != nil {\n\t\treturn zeroRes, err\n\t}\n\tif err := tx.Commit(); err != nil {\n\t\treturn zeroRes, fmt.Errorf(\"committing transaction: %w\", err)\n\t}\n\n\tsucceeded = true\n\treturn res, nil\n}\n\n// querySingleValue executes a SELECT which is expected to return at most one row with a single column.\n// It returns (value, true, nil) on success, or (value, false, nil) if no row was returned.\nfunc querySingleValue[T any](tx *sql.Tx, query string, params ...any) (T, bool, error) {\n\tvar value T\n\tif err := tx.QueryRow(query, params...).Scan(&value); err != nil {\n\t\tvar zeroValue T // A zero value of T\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn zeroValue, false, nil\n\t\t}\n\t\treturn zeroValue, false, err\n\t}\n\treturn value, true, nil\n}\n\n// ensureDBHasCurrentSchema adds the necessary tables and indices to a database.\n// This is typically used when creating a previously-nonexistent database.\n// We don’t really anticipate schema migrations; with c/image usually vendored, not using\n// shared libraries, migrating a schema on an existing database would affect old-version users.\n// Instead, schema changes are likely to be implemented by using a different cache file name,\n// and leaving existing caches around for old users.\nfunc ensureDBHasCurrentSchema(db *sql.DB) error {\n\t// Considered schema design alternatives:\n\t//\n\t// (Overall, considering the overall network latency and disk I/O costs of many-megabyte layer pulls which are happening while referring\n\t// to the blob info cache, it seems reasonable to prioritize readability over microoptimization of this database.)\n\t//\n\t// * This schema uses the text representation of digests.\n\t//\n\t//   We use the fairly wasteful text with hexadecimal digits because digest.Digest does not define a binary representation;\n\t//   and the way digest.Digest.Hex() is deprecated in favor of digest.Digest.Encoded(), and the way digest.Algorithm\n\t//   is documented to “define the string encoding” suggests that assuming a hexadecimal representation and turning that\n\t//   into binary ourselves is not a good idea in general; we would have to special-case the currently-known algorithm\n\t//   — and that would require us to implement two code paths, one of them basically never exercised / never tested.\n\t//\n\t// * There are two separate items for recording the uncompressed digest and digest compressors.\n\t//   Alternatively, we could have a single \"digest facts\" table with NULLable columns.\n\t//\n\t//   The way the BlobInfoCache API works, we are only going to write one value at a time, so\n\t//   sharing a table would not be any more efficient for writes (same number of lookups, larger row tuples).\n\t//   Reads in candidateLocations would not be more efficient either, the searches in DigestCompressors and DigestUncompressedPairs\n\t//   do not coincide (we want a compressor for every candidate, but the uncompressed digest only for the primary digest; and then\n\t//   we search in DigestUncompressedPairs by uncompressed digest, not by the primary key).\n\t//\n\t//   Also, using separate items allows the single-item writes to be done using a simple INSERT OR REPLACE, instead of having to\n\t//   do a more verbose ON CONFLICT(…) DO UPDATE SET … = ….\n\t//\n\t// * Joins (the two that exist in appendReplacementCandidates) are based on the text representation of digests.\n\t//\n\t//   Using integer primary keys might make the joins themselves a bit more efficient, but then we would need to involve an extra\n\t//   join to translate from/to the user-provided digests anyway. If anything, that extra join (potentially more btree lookups)\n\t//   is probably costlier than comparing a few more bytes of data.\n\t//\n\t//   Perhaps more importantly, storing digest texts directly makes the database dumps much easier to read for humans without\n\t//   having to do extra steps to decode the integers into digest values (either by running sqlite commands with joins, or mentally).\n\t//\n\titems := []struct{ itemName, command string }{\n\t\t{\n\t\t\t\"DigestUncompressedPairs\",\n\t\t\t`CREATE TABLE IF NOT EXISTS DigestUncompressedPairs(` +\n\t\t\t\t// index implied by PRIMARY KEY\n\t\t\t\t`anyDigest\t\t\tTEXT PRIMARY KEY NOT NULL,` +\n\t\t\t\t// DigestUncompressedPairs_index_uncompressedDigest\n\t\t\t\t`uncompressedDigest\tTEXT NOT NULL\n\t\t\t)`,\n\t\t},\n\t\t{\n\t\t\t\"DigestUncompressedPairs_index_uncompressedDigest\",\n\t\t\t`CREATE INDEX IF NOT EXISTS DigestUncompressedPairs_index_uncompressedDigest ON DigestUncompressedPairs(uncompressedDigest)`,\n\t\t},\n\t\t{\n\t\t\t\"DigestCompressors\",\n\t\t\t`CREATE TABLE IF NOT EXISTS DigestCompressors(` +\n\t\t\t\t// index implied by PRIMARY KEY\n\t\t\t\t`digest\t\tTEXT PRIMARY KEY NOT NULL,` +\n\t\t\t\t// May include blobinfocache.Uncompressed (not blobinfocache.UnknownCompression).\n\t\t\t\t`compressor\tTEXT NOT NULL\n\t\t\t)`,\n\t\t},\n\t\t{\n\t\t\t\"KnownLocations\",\n\t\t\t`CREATE TABLE IF NOT EXISTS KnownLocations(\n\t\t\t\ttransport\tTEXT NOT NULL,\n\t\t\t\tscope \t\tTEXT NOT NULL,\n\t\t\t\tdigest\t\tTEXT NOT NULL,\n\t\t\t\tlocation\tTEXT NOT NULL,` +\n\t\t\t\t// TIMESTAMP is parsed by SQLITE as a NUMERIC affinity, but go-sqlite3 stores text in the (Go formatting semantics)\n\t\t\t\t// format \"2006-01-02 15:04:05.999999999-07:00\".\n\t\t\t\t// See also the _loc option in the sql.Open data source name.\n\t\t\t\t`time\t\tTIMESTAMP NOT NULL,` +\n\t\t\t\t// Implies an index.\n\t\t\t\t// We also search by (transport, scope, digest), that doesn’t need an extra index\n\t\t\t\t// because it is a prefix of the implied primary-key index.\n\t\t\t\t`PRIMARY KEY (transport, scope, digest, location)\n\t\t\t)`,\n\t\t},\n\t\t{\n\t\t\t\"DigestTOCUncompressedPairs\",\n\t\t\t`CREATE TABLE IF NOT EXISTS DigestTOCUncompressedPairs(` +\n\t\t\t\t// index implied by PRIMARY KEY\n\t\t\t\t`tocDigest\t\t\tTEXT PRIMARY KEY NOT NULL,` +\n\t\t\t\t`uncompressedDigest\tTEXT NOT NULL\n\t\t\t)`,\n\t\t},\n\t\t{\n\t\t\t\"DigestSpecificVariantCompressors\", // If changing the schema incompatibly, merge this with DigestCompressors.\n\t\t\t`CREATE TABLE IF NOT EXISTS DigestSpecificVariantCompressors(` +\n\t\t\t\t// index implied by PRIMARY KEY\n\t\t\t\t`digest\t\tTEXT PRIMARY KEY NOT NULL,` +\n\t\t\t\t// The compressor is not `UnknownCompression`.\n\t\t\t\t`specificVariantCompressor\tTEXT NOT NULL,\n\t\t\t\tspecificVariantAnnotations\tBLOB NOT NULL\n\t\t\t)`,\n\t\t},\n\t}\n\n\t_, err := dbTransaction(db, func(tx *sql.Tx) (void, error) {\n\t\t// If the the last-created item exists, assume nothing needs to be done.\n\t\tlastItemName := items[len(items)-1].itemName\n\t\t_, found, err := querySingleValue[int](tx, \"SELECT 1 FROM sqlite_schema WHERE name=?\", lastItemName)\n\t\tif err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"checking if SQLite schema item %q exists: %w\", lastItemName, err)\n\t\t}\n\t\tif !found {\n\t\t\t// Item does not exist, assuming a fresh database.\n\t\t\tfor _, i := range items {\n\t\t\t\tif _, err := tx.Exec(i.command); err != nil {\n\t\t\t\t\treturn void{}, fmt.Errorf(\"creating item %s: %w\", i.itemName, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn void{}, nil\n\t})\n\treturn err\n}\n\n// uncompressedDigest implements types.BlobInfoCache.UncompressedDigest within a transaction.\nfunc (sqc *cache) uncompressedDigest(tx *sql.Tx, anyDigest digest.Digest) (digest.Digest, error) {\n\tuncompressedString, found, err := querySingleValue[string](tx, \"SELECT uncompressedDigest FROM DigestUncompressedPairs WHERE anyDigest = ?\", anyDigest.String())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif found {\n\t\td, err := digest.Parse(uncompressedString)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn d, nil\n\n\t}\n\t// A record as uncompressedDigest implies that anyDigest must already refer to an uncompressed digest.\n\t// This way we don't have to waste storage space with trivial (uncompressed, uncompressed) mappings\n\t// when we already record a (compressed, uncompressed) pair.\n\t_, found, err = querySingleValue[int](tx, \"SELECT 1 FROM DigestUncompressedPairs WHERE uncompressedDigest = ?\", anyDigest.String())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif found {\n\t\treturn anyDigest, nil\n\t}\n\treturn \"\", nil\n}\n\n// UncompressedDigest returns an uncompressed digest corresponding to anyDigest.\n// May return anyDigest if it is known to be uncompressed.\n// Returns \"\" if nothing is known about the digest (it may be compressed or uncompressed).\nfunc (sqc *cache) UncompressedDigest(anyDigest digest.Digest) digest.Digest {\n\tres, err := transaction(sqc, func(tx *sql.Tx) (digest.Digest, error) {\n\t\treturn sqc.uncompressedDigest(tx, anyDigest)\n\t})\n\tif err != nil {\n\t\treturn \"\" // FIXME? Log err (but throttle the log volume on repeated accesses)?\n\t}\n\treturn res\n}\n\n// RecordDigestUncompressedPair records that the uncompressed version of anyDigest is uncompressed.\n// It’s allowed for anyDigest == uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (sqc *cache) RecordDigestUncompressedPair(anyDigest digest.Digest, uncompressed digest.Digest) {\n\t_, _ = transaction(sqc, func(tx *sql.Tx) (void, error) {\n\t\tpreviousString, gotPrevious, err := querySingleValue[string](tx, \"SELECT uncompressedDigest FROM DigestUncompressedPairs WHERE anyDigest = ?\", anyDigest.String())\n\t\tif err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"looking for uncompressed digest for %q\", anyDigest)\n\t\t}\n\t\tif gotPrevious {\n\t\t\tprevious, err := digest.Parse(previousString)\n\t\t\tif err != nil {\n\t\t\t\treturn void{}, err\n\t\t\t}\n\t\t\tif previous != uncompressed {\n\t\t\t\tlogrus.Warnf(\"Uncompressed digest for blob %s previously recorded as %s, now %s\", anyDigest, previous, uncompressed)\n\t\t\t}\n\t\t}\n\t\tif _, err := tx.Exec(\"INSERT OR REPLACE INTO DigestUncompressedPairs(anyDigest, uncompressedDigest) VALUES (?, ?)\",\n\t\t\tanyDigest.String(), uncompressed.String()); err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"recording uncompressed digest %q for %q: %w\", uncompressed, anyDigest, err)\n\t\t}\n\t\treturn void{}, nil\n\t}) // FIXME? Log error (but throttle the log volume on repeated accesses)?\n}\n\n// UncompressedDigestForTOC returns an uncompressed digest corresponding to anyDigest.\n// Returns \"\" if the uncompressed digest is unknown.\nfunc (sqc *cache) UncompressedDigestForTOC(tocDigest digest.Digest) digest.Digest {\n\tres, err := transaction(sqc, func(tx *sql.Tx) (digest.Digest, error) {\n\t\tuncompressedString, found, err := querySingleValue[string](tx, \"SELECT uncompressedDigest FROM DigestTOCUncompressedPairs WHERE tocDigest = ?\", tocDigest.String())\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif found {\n\t\t\td, err := digest.Parse(uncompressedString)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\treturn d, nil\n\n\t\t}\n\t\treturn \"\", nil\n\t})\n\tif err != nil {\n\t\treturn \"\" // FIXME? Log err (but throttle the log volume on repeated accesses)?\n\t}\n\treturn res\n}\n\n// RecordTOCUncompressedPair records that the tocDigest corresponds to uncompressed.\n// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\nfunc (sqc *cache) RecordTOCUncompressedPair(tocDigest digest.Digest, uncompressed digest.Digest) {\n\t_, _ = transaction(sqc, func(tx *sql.Tx) (void, error) {\n\t\tpreviousString, gotPrevious, err := querySingleValue[string](tx, \"SELECT uncompressedDigest FROM DigestTOCUncompressedPairs WHERE tocDigest = ?\", tocDigest.String())\n\t\tif err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"looking for uncompressed digest for blob with TOC %q\", tocDigest)\n\t\t}\n\t\tif gotPrevious {\n\t\t\tprevious, err := digest.Parse(previousString)\n\t\t\tif err != nil {\n\t\t\t\treturn void{}, err\n\t\t\t}\n\t\t\tif previous != uncompressed {\n\t\t\t\tlogrus.Warnf(\"Uncompressed digest for blob with TOC %q previously recorded as %q, now %q\", tocDigest, previous, uncompressed)\n\t\t\t}\n\t\t}\n\t\tif _, err := tx.Exec(\"INSERT OR REPLACE INTO DigestTOCUncompressedPairs(tocDigest, uncompressedDigest) VALUES (?, ?)\",\n\t\t\ttocDigest.String(), uncompressed.String()); err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"recording uncompressed digest %q for blob with TOC %q: %w\", uncompressed, tocDigest, err)\n\t\t}\n\t\treturn void{}, nil\n\t}) // FIXME? Log error (but throttle the log volume on repeated accesses)?\n}\n\n// RecordKnownLocation records that a blob with the specified digest exists within the specified (transport, scope) scope,\n// and can be reused given the opaque location data.\nfunc (sqc *cache) RecordKnownLocation(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, location types.BICLocationReference) {\n\t_, _ = transaction(sqc, func(tx *sql.Tx) (void, error) {\n\t\tif _, err := tx.Exec(\"INSERT OR REPLACE INTO KnownLocations(transport, scope, digest, location, time) VALUES (?, ?, ?, ?, ?)\",\n\t\t\ttransport.Name(), scope.Opaque, digest.String(), location.Opaque, time.Now()); err != nil { // Possibly overwriting an older entry.\n\t\t\treturn void{}, fmt.Errorf(\"recording known location %q for (%q, %q, %q): %w\",\n\t\t\t\tlocation.Opaque, transport.Name(), scope.Opaque, digest.String(), err)\n\t\t}\n\t\treturn void{}, nil\n\t}) // FIXME? Log error (but throttle the log volume on repeated accesses)?\n}\n\n// RecordDigestCompressorData records data for the blob with the specified digest.\n// WARNING: Only call this with LOCALLY VERIFIED data:\n//   - don’t record a compressor for a digest just because some remote author claims so\n//     (e.g. because a manifest says so);\n//   - don’t record the non-base variant or annotations if we are not _sure_ that the base variant\n//     and the blob’s digest match the non-base variant’s annotations (e.g. because we saw them\n//     in a manifest)\n//\n// otherwise the cache could be poisoned and cause us to make incorrect edits to type\n// information in a manifest.\nfunc (sqc *cache) RecordDigestCompressorData(anyDigest digest.Digest, data blobinfocache.DigestCompressorData) {\n\t_, _ = transaction(sqc, func(tx *sql.Tx) (void, error) {\n\t\tprevious, gotPrevious, err := querySingleValue[string](tx, \"SELECT compressor FROM DigestCompressors WHERE digest = ?\", anyDigest.String())\n\t\tif err != nil {\n\t\t\treturn void{}, fmt.Errorf(\"looking for compressor of %q\", anyDigest)\n\t\t}\n\t\twarned := false\n\t\tif gotPrevious && previous != data.BaseVariantCompressor {\n\t\t\tlogrus.Warnf(\"Compressor for blob with digest %s previously recorded as %s, now %s\", anyDigest, previous, data.BaseVariantCompressor)\n\t\t\twarned = true\n\t\t}\n\t\tif data.BaseVariantCompressor == blobinfocache.UnknownCompression {\n\t\t\tif _, err := tx.Exec(\"DELETE FROM DigestCompressors WHERE digest = ?\", anyDigest.String()); err != nil {\n\t\t\t\treturn void{}, fmt.Errorf(\"deleting compressor for digest %q: %w\", anyDigest, err)\n\t\t\t}\n\t\t\tif _, err := tx.Exec(\"DELETE FROM DigestSpecificVariantCompressors WHERE digest = ?\", anyDigest.String()); err != nil {\n\t\t\t\treturn void{}, fmt.Errorf(\"deleting specific variant compressor for digest %q: %w\", anyDigest, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif _, err := tx.Exec(\"INSERT OR REPLACE INTO DigestCompressors(digest, compressor) VALUES (?, ?)\",\n\t\t\t\tanyDigest.String(), data.BaseVariantCompressor); err != nil {\n\t\t\t\treturn void{}, fmt.Errorf(\"recording compressor %q for %q: %w\", data.BaseVariantCompressor, anyDigest, err)\n\t\t\t}\n\t\t}\n\n\t\tif data.SpecificVariantCompressor != blobinfocache.UnknownCompression {\n\t\t\tif !warned { // Don’t warn twice about the same digest\n\t\t\t\tprevSVC, found, err := querySingleValue[string](tx, \"SELECT specificVariantCompressor FROM DigestSpecificVariantCompressors WHERE digest = ?\", anyDigest.String())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn void{}, fmt.Errorf(\"looking for specific variant compressor of %q\", anyDigest)\n\t\t\t\t}\n\t\t\t\tif found && data.SpecificVariantCompressor != prevSVC {\n\t\t\t\t\tlogrus.Warnf(\"Specific compressor for blob with digest %s previously recorded as %s, now %s\", anyDigest, prevSVC, data.SpecificVariantCompressor)\n\t\t\t\t}\n\t\t\t}\n\t\t\tannotations, err := json.Marshal(data.SpecificVariantAnnotations)\n\t\t\tif err != nil {\n\t\t\t\treturn void{}, err\n\t\t\t}\n\t\t\tif _, err := tx.Exec(\"INSERT OR REPLACE INTO DigestSpecificVariantCompressors(digest, specificVariantCompressor, specificVariantAnnotations) VALUES (?, ?, ?)\",\n\t\t\t\tanyDigest.String(), data.SpecificVariantCompressor, annotations); err != nil {\n\t\t\t\treturn void{}, fmt.Errorf(\"recording specific variant compressor %q/%q for %q: %w\", data.SpecificVariantCompressor, annotations, anyDigest, err)\n\t\t\t}\n\t\t}\n\t\treturn void{}, nil\n\t}) // FIXME? Log error (but throttle the log volume on repeated accesses)?\n}\n\n// appendReplacementCandidates creates prioritize.CandidateWithTime values for (transport, scope, digest),\n// and returns the result of appending them to candidates.\n// v2Options is not nil if the caller is CandidateLocations2: this allows including candidates with unknown location, and filters out candidates\n// with unknown compression.\nfunc (sqc *cache) appendReplacementCandidates(candidates []prioritize.CandidateWithTime, tx *sql.Tx, transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest,\n\tv2Options *blobinfocache.CandidateLocations2Options,\n) ([]prioritize.CandidateWithTime, error) {\n\tcompressionData := blobinfocache.DigestCompressorData{\n\t\tBaseVariantCompressor:      blobinfocache.UnknownCompression,\n\t\tSpecificVariantCompressor:  blobinfocache.UnknownCompression,\n\t\tSpecificVariantAnnotations: nil,\n\t}\n\tif v2Options != nil {\n\t\tvar baseVariantCompressor string\n\t\tvar specificVariantCompressor sql.NullString\n\t\tvar annotationBytes []byte\n\t\tswitch err := tx.QueryRow(\"SELECT compressor, specificVariantCompressor, specificVariantAnnotations \"+\n\t\t\t\"FROM DigestCompressors LEFT JOIN DigestSpecificVariantCompressors USING (digest) WHERE digest = ?\", digest.String()).\n\t\t\tScan(&baseVariantCompressor, &specificVariantCompressor, &annotationBytes); {\n\t\tcase errors.Is(err, sql.ErrNoRows): // Do nothing\n\t\tcase err != nil:\n\t\t\treturn nil, fmt.Errorf(\"scanning compressor data: %w\", err)\n\t\tdefault:\n\t\t\tcompressionData.BaseVariantCompressor = baseVariantCompressor\n\t\t\tif specificVariantCompressor.Valid && annotationBytes != nil {\n\t\t\t\tcompressionData.SpecificVariantCompressor = specificVariantCompressor.String\n\t\t\t\tif err := json.Unmarshal(annotationBytes, &compressionData.SpecificVariantAnnotations); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttemplate := prioritize.CandidateTemplateWithCompression(v2Options, digest, compressionData)\n\tif template == nil {\n\t\treturn candidates, nil\n\t}\n\n\trows, err := tx.Query(\"SELECT location, time FROM KnownLocations \"+\n\t\t\"WHERE transport = ? AND scope = ? AND KnownLocations.digest = ?\",\n\t\ttransport.Name(), scope.Opaque, digest.String())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"looking up candidate locations: %w\", err)\n\t}\n\tdefer rows.Close()\n\n\trowAdded := false\n\tfor rows.Next() {\n\t\tvar location string\n\t\tvar time time.Time\n\t\tif err := rows.Scan(&location, &time); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"scanning candidate: %w\", err)\n\t\t}\n\t\tcandidates = append(candidates, template.CandidateWithLocation(types.BICLocationReference{Opaque: location}, time))\n\t\trowAdded = true\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"iterating through locations: %w\", err)\n\t}\n\n\tif !rowAdded && v2Options != nil {\n\t\tcandidates = append(candidates, template.CandidateWithUnknownLocation())\n\t}\n\treturn candidates, nil\n}\n\n// CandidateLocations2 returns a prioritized, limited, number of blobs and their locations (if known)\n// that could possibly be reused within the specified (transport scope) (if they still\n// exist, which is not guaranteed).\nfunc (sqc *cache) CandidateLocations2(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, options blobinfocache.CandidateLocations2Options) []blobinfocache.BICReplacementCandidate2 {\n\treturn sqc.candidateLocations(transport, scope, digest, options.CanSubstitute, &options)\n}\n\n// candidateLocations implements CandidateLocations / CandidateLocations2.\n// v2Options is not nil if the caller is CandidateLocations2.\nfunc (sqc *cache) candidateLocations(transport types.ImageTransport, scope types.BICTransportScope, primaryDigest digest.Digest, canSubstitute bool,\n\tv2Options *blobinfocache.CandidateLocations2Options,\n) []blobinfocache.BICReplacementCandidate2 {\n\tvar uncompressedDigest digest.Digest // = \"\"\n\tres, err := transaction(sqc, func(tx *sql.Tx) ([]prioritize.CandidateWithTime, error) {\n\t\tres := []prioritize.CandidateWithTime{}\n\t\tres, err := sqc.appendReplacementCandidates(res, tx, transport, scope, primaryDigest, v2Options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif canSubstitute {\n\t\t\tuncompressedDigest, err = sqc.uncompressedDigest(tx, primaryDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif uncompressedDigest != \"\" {\n\t\t\t\t// FIXME? We could integrate this with appendReplacementCandidates into a single join instead of N+1 queries.\n\t\t\t\t// (In the extreme, we could turn _everything_ this function does into a single query.\n\t\t\t\t// And going even further, even DestructivelyPrioritizeReplacementCandidates could be turned into SQL.)\n\t\t\t\t// For now, we prioritize simplicity, and sharing both code and implementation structure with the other cache implementations.\n\t\t\t\trows, err := tx.Query(\"SELECT anyDigest FROM DigestUncompressedPairs WHERE uncompressedDigest = ?\", uncompressedDigest.String())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"querying for other digests: %w\", err)\n\t\t\t\t}\n\t\t\t\tdefer rows.Close()\n\t\t\t\tfor rows.Next() {\n\t\t\t\t\tvar otherDigestString string\n\t\t\t\t\tif err := rows.Scan(&otherDigestString); err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"scanning other digest: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t\totherDigest, err := digest.Parse(otherDigestString)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tif otherDigest != primaryDigest && otherDigest != uncompressedDigest {\n\t\t\t\t\t\tres, err = sqc.appendReplacementCandidates(res, tx, transport, scope, otherDigest, v2Options)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif err := rows.Err(); err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"iterating through other digests: %w\", err)\n\t\t\t\t}\n\n\t\t\t\tif uncompressedDigest != primaryDigest {\n\t\t\t\t\tres, err = sqc.appendReplacementCandidates(res, tx, transport, scope, uncompressedDigest, v2Options)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res, nil\n\t})\n\tif err != nil {\n\t\treturn []blobinfocache.BICReplacementCandidate2{} // FIXME? Log err (but throttle the log volume on repeated accesses)?\n\t}\n\treturn prioritize.DestructivelyPrioritizeReplacementCandidates(res, primaryDigest, uncompressedDigest)\n}\n\n// CandidateLocations returns a prioritized, limited, number of blobs and their locations that could possibly be reused\n// within the specified (transport scope) (if they still exist, which is not guaranteed).\n//\n// If !canSubstitute, the returned candidates will match the submitted digest exactly; if canSubstitute,\n// data from previous RecordDigestUncompressedPair calls is used to also look up variants of the blob which have the same\n// uncompressed digest.\nfunc (sqc *cache) CandidateLocations(transport types.ImageTransport, scope types.BICTransportScope, digest digest.Digest, canSubstitute bool) []types.BICReplacementCandidate {\n\treturn blobinfocache.CandidateLocationsFromV2(sqc.candidateLocations(transport, scope, digest, canSubstitute, nil))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/cli/basetls/basetls.go",
    "content": "// Package basetls encapsulates a set of base TLS settings (not keys/certificates)\n// configured via containers-tls-details.yaml(5).\n//\n// CLI integration should generally be done using c/image/pkg/cli/basetls/tlsdetails instead\n// of using the TLSDetailsFile directly.\npackage basetls\n\nimport (\n\t\"bytes\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n)\n\n// Config encapsulates user’s choices about base TLS settings, typically\n// configured via containers-tls-details.yaml(5).\n//\n// Most codebases should pass around the resulting *tls.Config, without depending on this subpackage;\n// this primarily exists as a separate type to allow passing the configuration around within (version-matched) RPC systems,\n// using the MarshalText/UnmarshalText methods.\ntype Config struct {\n\t// We keep the text representation because we start with it, and this way we don't have\n\t// to implement formatting back to text. This is an internal detail, so we can change that later.\n\ttext   TLSDetailsFile\n\tconfig *tls.Config // Parsed from .text, both match\n}\n\n// TLSDetailsFile contains a set of TLS options.\n//\n// To consume such a file, most callers should use c/image/pkg/cli/basetls/tlsdetails instead\n// of dealing with this type explicitly.\n//\n// This type is exported primarily to allow creating parameter files programmatically\n// (and eventually the tlsdetails subpackage should provide an API to convert this type into\n// the appropriate file contents, so that callers don't need to do that manually).\ntype TLSDetailsFile struct {\n\t// Keep this in sync with docs/containers-tls-details.yaml.5.md !\n\n\tMinVersion   string   `yaml:\"minVersion,omitempty\"`   // If set, minimum version to use throughout the program.\n\tCipherSuites []string `yaml:\"cipherSuites,omitempty\"` // If set, allowed TLS cipher suites to use throughout the program.\n\tNamedGroups  []string `yaml:\"namedGroups,omitempty\"`  // If set, allowed TLS named groups to use throughout the program.\n}\n\n// NewFromTLSDetails creates a Config from a TLSDetailsFile.\nfunc NewFromTLSDetails(details *TLSDetailsFile) (*Config, error) {\n\tres := Config{\n\t\ttext:   TLSDetailsFile{},\n\t\tconfig: &tls.Config{},\n\t}\n\tconfigChanged := false\n\tfor _, fn := range []func(input *TLSDetailsFile) (bool, error){\n\t\tres.parseMinVersion,\n\t\tres.parseCipherSuites,\n\t\tres.parseNamedGroups,\n\t} {\n\t\tchanged, err := fn(details)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif changed {\n\t\t\tconfigChanged = true\n\t\t}\n\t}\n\n\tif !configChanged {\n\t\tres.config = nil\n\t}\n\treturn &res, nil\n}\n\n// tlsVersions maps TLS version strings to their crypto/tls constants.\n// We could use the `tls.VersionName` names, but those are verbose and contain spaces;\n// similarly the OpenShift enum values (“VersionTLS11”) are unergonomic.\nvar tlsVersions = map[string]uint16{\n\t\"1.0\": tls.VersionTLS10,\n\t\"1.1\": tls.VersionTLS11,\n\t\"1.2\": tls.VersionTLS12,\n\t\"1.3\": tls.VersionTLS13,\n}\n\nfunc (c *Config) parseMinVersion(input *TLSDetailsFile) (bool, error) {\n\tif input.MinVersion == \"\" {\n\t\treturn false, nil\n\t}\n\tv, ok := tlsVersions[input.MinVersion]\n\tif !ok {\n\t\treturn false, fmt.Errorf(\"unrecognized TLS minimum version %q\", input.MinVersion)\n\t}\n\tc.text.MinVersion = input.MinVersion\n\tc.config.MinVersion = v\n\treturn true, nil\n}\n\n// cipherSuitesByName returns a map from cipher suite name to its ID.\nfunc cipherSuitesByName() map[string]uint16 {\n\t// The Go standard library uses IANA names and already contains the mapping (for relevant values)\n\t// sadly we still need to turn it into a lookup map.\n\tsuites := make(map[string]uint16)\n\tfor _, cs := range tls.CipherSuites() {\n\t\tsuites[cs.Name] = cs.ID\n\t}\n\tfor _, cs := range tls.InsecureCipherSuites() {\n\t\tsuites[cs.Name] = cs.ID\n\t}\n\treturn suites\n}\n\nfunc (c *Config) parseCipherSuites(input *TLSDetailsFile) (bool, error) {\n\tif input.CipherSuites == nil {\n\t\treturn false, nil\n\t}\n\tsuitesByName := cipherSuitesByName()\n\tids := []uint16{}\n\tfor _, name := range input.CipherSuites {\n\t\tid, ok := suitesByName[name]\n\t\tif !ok {\n\t\t\treturn false, fmt.Errorf(\"unrecognized TLS cipher suite %q\", name)\n\t\t}\n\t\tids = append(ids, id)\n\t}\n\tc.text.CipherSuites = slices.Clone(input.CipherSuites)\n\tc.config.CipherSuites = ids\n\treturn true, nil\n}\n\n// groupsByName maps curve/group names to their tls.CurveID.\n// The names match IANA TLS Supported Groups registry.\n//\n// Yes, the x25519 names differ in capitalization.\n// Go’s tls.CurveID has a .String() method, but it\n// uses the Go names.\nvar groupsByName = map[string]tls.CurveID{\n\t\"secp256r1\":      tls.CurveP256,\n\t\"secp384r1\":      tls.CurveP384,\n\t\"secp521r1\":      tls.CurveP521,\n\t\"x25519\":         tls.X25519,\n\t\"X25519MLKEM768\": tls.X25519MLKEM768,\n}\n\nfunc (c *Config) parseNamedGroups(input *TLSDetailsFile) (bool, error) {\n\tif input.NamedGroups == nil {\n\t\treturn false, nil\n\t}\n\tids := []tls.CurveID{}\n\tfor _, name := range input.NamedGroups {\n\t\tid, ok := groupsByName[name]\n\t\tif !ok {\n\t\t\treturn false, fmt.Errorf(\"unrecognized TLS named group %q\", name)\n\t\t}\n\t\tids = append(ids, id)\n\t}\n\tc.text.NamedGroups = slices.Clone(input.NamedGroups)\n\tc.config.CurvePreferences = ids\n\treturn true, nil\n}\n\n// TLSConfig returns a *tls.Config matching the provided settings.\n// If c contains no settings, it returns nil.\n// Otherwise, the returned *tls.Config is freshly allocated and the caller can modify it as needed.\nfunc (c *Config) TLSConfig() *tls.Config {\n\tif c.config == nil {\n\t\treturn nil\n\t}\n\treturn c.config.Clone()\n}\n\n// marshaledSerialization is the data we use in MarshalText/UnmarshalText,\n// marshaled using JSON.\n//\n// Note that the file format is using YAML, but we use JSON, to minimize dependencies\n// in backend code where we don't need comments and the brackets are not annoying users.\ntype marshaledSerialization struct {\n\tVersion int\n\tData    TLSDetailsFile\n}\n\nconst marshaledSerializationVersion1 = 1\n\n// MarshalText serializes c to a text representation.\n//\n// The representation is intended to be reasonably stable across updates to c/image,\n// but the consumer must not be older than the producer.\nfunc (c Config) MarshalText() ([]byte, error) {\n\tdata := marshaledSerialization{\n\t\tVersion: marshaledSerializationVersion1,\n\t\tData:    c.text,\n\t}\n\treturn json.Marshal(data)\n}\n\n// UnmarshalText parses the output of MarshalText.\n//\n// The format is otherwise undocumented and we do not promise ongoing compatibility with producers external to this package.\nfunc (c *Config) UnmarshalText(text []byte) error {\n\tvar data marshaledSerialization\n\n\t// In the future, this should be an even stricter parser, e.g. refusing duplicate fields\n\t// and requiring a case-sensitive field name match.\n\tdecoder := json.NewDecoder(bytes.NewReader(text))\n\tdecoder.DisallowUnknownFields()\n\tif err := decoder.Decode(&data); err != nil {\n\t\treturn err\n\t}\n\tif decoder.More() {\n\t\treturn errors.New(\"unexpected extra data after a JSON object\")\n\t}\n\n\tif data.Version != marshaledSerializationVersion1 {\n\t\treturn fmt.Errorf(\"unsupported version %d\", data.Version)\n\t}\n\tv, err := NewFromTLSDetails(&data.Data)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*c = *v\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/cli/basetls/tlsdetails/tlsdetails.go",
    "content": "// Package tlsdetails implements the containers-tls-details.yaml(5) file format.\n//\n// Recommended CLI integration is by a --tls-details flag parsed using BaseTLSFromOptionalFile, with the following documentation:\n//\n//\t--tls-details is a path to a containers-tls-details.yaml(5) file, affecting TLS behavior throughout the program.\n//\n//\tIf not set, defaults to a reasonable default that may change over time (depending on system’s global policy,\n//\tversion of the program, version of the Go language, and the like).\n//\n//\tUsers should generally not use this option unless they have a process to ensure that the configuration will be kept up to date.\npackage tlsdetails\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"go.podman.io/image/v5/pkg/cli/basetls\"\n\t\"gopkg.in/yaml.v3\"\n)\n\n// BaseTLSFromOptionalFile returns a basetls.Config matching a containers-tls-details.yaml file at the specified path.\n// If path is \"\", it returns a valid basetls.Config with no settings (where config.TLSConfig() will return nil).\nfunc BaseTLSFromOptionalFile(path string) (*basetls.Config, error) {\n\tif path == \"\" {\n\t\treturn basetls.NewFromTLSDetails(&basetls.TLSDetailsFile{})\n\t}\n\treturn BaseTLSFromFile(path)\n}\n\n// BaseTLSFromFile returns a basetls.Config matching a containers-tls-details.yaml file at the specified path.\nfunc BaseTLSFromFile(path string) (*basetls.Config, error) {\n\tdetails, err := ParseFile(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := basetls.NewFromTLSDetails(details)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing TLS details %q: %w\", path, err)\n\t}\n\treturn res, nil\n}\n\n// ParseFile parses a basetls.TLSDetailsFile at the specified path.\n//\n// Most consumers of the parameter file should use BaseTLSFromFile or BaseTLSFromOptionalFile instead.\nfunc ParseFile(path string) (*basetls.TLSDetailsFile, error) {\n\tvar res basetls.TLSDetailsFile\n\tsource, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading %q: %w\", path, err)\n\t}\n\tdec := yaml.NewDecoder(bytes.NewReader(source))\n\tdec.KnownFields(true)\n\tif err = dec.Decode(&res); err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing %q: %w\", path, err)\n\t}\n\treturn &res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/cli/passphrase.go",
    "content": "package cli\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// ReadPassphraseFile returns the first line of the specified path.\n// For convenience, an empty string is returned if the path is empty.\nfunc ReadPassphraseFile(path string) (string, error) {\n\tif path == \"\" {\n\t\treturn \"\", nil\n\t}\n\n\tlogrus.Debugf(\"Reading user-specified passphrase for signing from %s\", path)\n\n\tppf, err := os.Open(path)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer ppf.Close()\n\n\t// Read the *first* line in the passphrase file, just as gpg(1) does.\n\tbuf, err := bufio.NewReader(ppf).ReadBytes('\\n')\n\tif err != nil && !errors.Is(err, io.EOF) {\n\t\treturn \"\", fmt.Errorf(\"reading passphrase file: %w\", err)\n\t}\n\n\treturn strings.TrimSuffix(string(buf), \"\\n\"), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/cli/sigstore/params/sigstore.go",
    "content": "package params\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"gopkg.in/yaml.v3\"\n)\n\n// SigningParameterFile collects parameters used for creating sigstore signatures.\n//\n// To consume such a file, most callers should use c/image/pkg/cli/sigstore instead\n// of dealing with this type explicitly using ParseFile.\n//\n// This type is exported primarily to allow creating parameter files programmatically\n// (and eventually this subpackage should provide an API to convert this type into\n// the appropriate file contents, so that callers don’t need to do that manually).\ntype SigningParameterFile struct {\n\t// Keep this in sync with docs/containers-sigstore-signing-params.yaml.5.md !\n\n\tPrivateKeyFile           string `yaml:\"privateKeyFile,omitempty\"`           // If set, sign using a private key stored in this file.\n\tPrivateKeyPassphraseFile string `yaml:\"privateKeyPassphraseFile,omitempty\"` // A file that contains the passprase required for PrivateKeyFile.\n\n\tFulcio *SigningParameterFileFulcio `yaml:\"fulcio,omitempty\"` // If set, sign using a short-lived key and a Fulcio-issued certificate.\n\n\tRekorURL string `yaml:\"rekorURL,omitempty\"` // If set, upload the signature to the specified Rekor server, and include a log inclusion proof in the signature.\n}\n\n// SigningParameterFileFulcio is a subset of SigningParameterFile dedicated to Fulcio parameters.\ntype SigningParameterFileFulcio struct {\n\t// Keep this in sync with docs/containers-sigstore-signing-params.yaml.5.md !\n\n\tFulcioURL string `yaml:\"fulcioURL,omitempty\"` // URL of the Fulcio server. Required.\n\n\t// How to obtain the OIDC ID token required by Fulcio. Required.\n\tOIDCMode OIDCMode `yaml:\"oidcMode,omitempty\"`\n\n\t// oidcMode = staticToken\n\tOIDCIDToken string `yaml:\"oidcIDToken,omitempty\"`\n\n\t// oidcMode = deviceGrant || interactive\n\tOIDCIssuerURL    string `yaml:\"oidcIssuerURL,omitempty\"` //\n\tOIDCClientID     string `yaml:\"oidcClientID,omitempty\"`\n\tOIDCClientSecret string `yaml:\"oidcClientSecret,omitempty\"`\n}\n\ntype OIDCMode string\n\nconst (\n\t// OIDCModeStaticToken means the parameter file contains an user-provided OIDC ID token value.\n\tOIDCModeStaticToken OIDCMode = \"staticToken\"\n\t// OIDCModeDeviceGrant specifies the OIDC ID token should be obtained using a device authorization grant (RFC 8628).\n\tOIDCModeDeviceGrant OIDCMode = \"deviceGrant\"\n\t// OIDCModeInteractive specifies the OIDC ID token should be obtained interactively (automatically opening a browser,\n\t// or interactively prompting the user.)\n\tOIDCModeInteractive OIDCMode = \"interactive\"\n)\n\n// ParseFile parses a SigningParameterFile at the specified path.\n//\n// Most consumers of the parameter file should use c/image/pkg/cli/sigstore to obtain a *signer.Signer instead.\nfunc ParseFile(path string) (*SigningParameterFile, error) {\n\tvar res SigningParameterFile\n\tsource, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading %q: %w\", path, err)\n\t}\n\tdec := yaml.NewDecoder(bytes.NewReader(source))\n\tdec.KnownFields(true)\n\tif err = dec.Decode(&res); err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing %q: %w\", path, err)\n\t}\n\treturn &res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/cli/sigstore/sigstore.go",
    "content": "package sigstore\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\n\t\"go.podman.io/image/v5/pkg/cli\"\n\t\"go.podman.io/image/v5/pkg/cli/sigstore/params\"\n\t\"go.podman.io/image/v5/signature/signer\"\n\t\"go.podman.io/image/v5/signature/sigstore\"\n\t\"go.podman.io/image/v5/signature/sigstore/fulcio\"\n\t\"go.podman.io/image/v5/signature/sigstore/rekor\"\n)\n\n// Options collects data that the caller should provide to NewSignerFromParameterFile.\n// The caller should set all fields unless documented otherwise.\ntype Options struct {\n\tPrivateKeyPassphrasePrompt func(keyFile string) (string, error) // A function to call to interactively prompt for a passphrase\n\tStdin                      io.Reader\n\tStdout                     io.Writer\n}\n\n// NewSignerFromParameterFile returns a signature.Signer which creates sigstore signatures based a parameter file at the specified path.\n//\n// The caller must call Close() on the returned Signer.\nfunc NewSignerFromParameterFile(path string, options *Options) (*signer.Signer, error) {\n\tparams, err := params.ParseFile(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"setting up signing using parameter file %q: %w\", path, err)\n\t}\n\treturn newSignerFromParameterData(params, options)\n}\n\n// newSignerFromParameterData returns a signature.Signer which creates sigstore signatures based on parameter file contents.\n//\n// The caller must call Close() on the returned Signer.\nfunc newSignerFromParameterData(params *params.SigningParameterFile, options *Options) (*signer.Signer, error) {\n\topts := []sigstore.Option{}\n\tif params.PrivateKeyFile != \"\" {\n\t\tvar getPassphrase func(keyFile string) (string, error)\n\t\tswitch {\n\t\tcase params.PrivateKeyPassphraseFile != \"\":\n\t\t\tgetPassphrase = func(_ string) (string, error) {\n\t\t\t\treturn cli.ReadPassphraseFile(params.PrivateKeyPassphraseFile)\n\t\t\t}\n\t\tcase options.PrivateKeyPassphrasePrompt != nil:\n\t\t\tgetPassphrase = options.PrivateKeyPassphrasePrompt\n\t\tdefault: // This shouldn’t happen, the caller is expected to set options.PrivateKeyPassphrasePrompt\n\t\t\treturn nil, fmt.Errorf(\"private key %s specified, but no way to get a passphrase\", params.PrivateKeyFile)\n\t\t}\n\t\tpassphrase, err := getPassphrase(params.PrivateKeyFile)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\topts = append(opts, sigstore.WithPrivateKeyFile(params.PrivateKeyFile, []byte(passphrase)))\n\t}\n\n\tif params.Fulcio != nil {\n\t\tfulcioOpt, err := fulcioOption(params.Fulcio, options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\topts = append(opts, fulcioOpt)\n\t}\n\n\tif params.RekorURL != \"\" {\n\t\trekorURL, err := url.Parse(params.RekorURL)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing rekorURL %q: %w\", params.RekorURL, err)\n\t\t}\n\t\topts = append(opts, rekor.WithRekor(rekorURL))\n\t}\n\n\treturn sigstore.NewSigner(opts...)\n}\n\n// fulcioOption returns a sigstore.Option for Fulcio use based on f.\nfunc fulcioOption(f *params.SigningParameterFileFulcio, options *Options) (sigstore.Option, error) {\n\tif f.FulcioURL == \"\" {\n\t\treturn nil, errors.New(\"missing fulcioURL\")\n\t}\n\tfulcioURL, err := url.Parse(f.FulcioURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing fulcioURL %q: %w\", f.FulcioURL, err)\n\t}\n\n\tif f.OIDCMode == params.OIDCModeStaticToken {\n\t\tif f.OIDCIDToken == \"\" {\n\t\t\treturn nil, errors.New(\"missing oidcToken\")\n\t\t}\n\t\treturn fulcio.WithFulcioAndPreexistingOIDCIDToken(fulcioURL, f.OIDCIDToken), nil\n\t}\n\n\tif f.OIDCIssuerURL == \"\" {\n\t\treturn nil, errors.New(\"missing oidcIssuerURL\")\n\t}\n\toidcIssuerURL, err := url.Parse(f.OIDCIssuerURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing oidcIssuerURL %q: %w\", f.OIDCIssuerURL, err)\n\t}\n\tswitch f.OIDCMode {\n\tcase params.OIDCModeDeviceGrant:\n\t\treturn fulcio.WithFulcioAndDeviceAuthorizationGrantOIDC(fulcioURL, oidcIssuerURL, f.OIDCClientID, f.OIDCClientSecret,\n\t\t\toptions.Stdout), nil\n\tcase params.OIDCModeInteractive:\n\t\treturn fulcio.WithFulcioAndInteractiveOIDC(fulcioURL, oidcIssuerURL, f.OIDCClientID, f.OIDCClientSecret,\n\t\t\toptions.Stdin, options.Stdout), nil\n\tcase \"\":\n\t\treturn nil, errors.New(\"missing oidcMode\")\n\tcase params.OIDCModeStaticToken:\n\t\treturn nil, errors.New(\"internal inconsistency: SigningParameterFileOIDCModeStaticToken was supposed to already be handled\")\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown oidcMode value %q\", f.OIDCMode)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/compression/compression.go",
    "content": "package compression\n\nimport (\n\t\"bytes\"\n\t\"compress/bzip2\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/klauspost/pgzip\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/ulikunitz/xz\"\n\t\"go.podman.io/image/v5/pkg/compression/internal\"\n\t\"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/storage/pkg/chunked/compressor\"\n)\n\n// Algorithm is a compression algorithm that can be used for CompressStream.\ntype Algorithm = types.Algorithm\n\nvar (\n\t// Gzip compression.\n\tGzip = internal.NewAlgorithm(types.GzipAlgorithmName, \"\",\n\t\t[]byte{0x1F, 0x8B, 0x08}, GzipDecompressor, gzipCompressor)\n\t// Bzip2 compression.\n\tBzip2 = internal.NewAlgorithm(types.Bzip2AlgorithmName, \"\",\n\t\t[]byte{0x42, 0x5A, 0x68}, Bzip2Decompressor, bzip2Compressor)\n\t// Xz compression.\n\tXz = internal.NewAlgorithm(types.XzAlgorithmName, \"\",\n\t\t[]byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00}, XzDecompressor, xzCompressor)\n\t// Zstd compression.\n\tZstd = internal.NewAlgorithm(types.ZstdAlgorithmName, \"\",\n\t\t[]byte{0x28, 0xb5, 0x2f, 0xfd}, ZstdDecompressor, zstdCompressor)\n\t// ZstdChunked is a Zstd compression with chunk metadata which allows random access to individual files.\n\tZstdChunked = internal.NewAlgorithm(types.ZstdChunkedAlgorithmName, types.ZstdAlgorithmName,\n\t\tnil, ZstdDecompressor, compressor.ZstdCompressor)\n\n\tcompressionAlgorithms = map[string]Algorithm{\n\t\tGzip.Name():        Gzip,\n\t\tBzip2.Name():       Bzip2,\n\t\tXz.Name():          Xz,\n\t\tZstd.Name():        Zstd,\n\t\tZstdChunked.Name(): ZstdChunked,\n\t}\n)\n\n// AlgorithmByName returns the compressor by its name\nfunc AlgorithmByName(name string) (Algorithm, error) {\n\talgorithm, ok := compressionAlgorithms[name]\n\tif ok {\n\t\treturn algorithm, nil\n\t}\n\treturn Algorithm{}, fmt.Errorf(\"cannot find compressor for %q\", name)\n}\n\n// DecompressorFunc returns the decompressed stream, given a compressed stream.\n// The caller must call Close() on the decompressed stream (even if the compressed input stream does not need closing!).\ntype DecompressorFunc = internal.DecompressorFunc\n\n// GzipDecompressor is a DecompressorFunc for the gzip compression algorithm.\nfunc GzipDecompressor(r io.Reader) (io.ReadCloser, error) {\n\treturn pgzip.NewReader(r)\n}\n\n// Bzip2Decompressor is a DecompressorFunc for the bzip2 compression algorithm.\nfunc Bzip2Decompressor(r io.Reader) (io.ReadCloser, error) {\n\treturn io.NopCloser(bzip2.NewReader(r)), nil\n}\n\n// XzDecompressor is a DecompressorFunc for the xz compression algorithm.\nfunc XzDecompressor(r io.Reader) (io.ReadCloser, error) {\n\tr, err := xz.NewReader(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn io.NopCloser(r), nil\n}\n\n// gzipCompressor is a CompressorFunc for the gzip compression algorithm.\nfunc gzipCompressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\tif level != nil {\n\t\treturn pgzip.NewWriterLevel(r, *level)\n\t}\n\treturn pgzip.NewWriter(r), nil\n}\n\n// bzip2Compressor is a CompressorFunc for the bzip2 compression algorithm.\nfunc bzip2Compressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\treturn nil, fmt.Errorf(\"bzip2 compression not supported\")\n}\n\n// xzCompressor is a CompressorFunc for the xz compression algorithm.\nfunc xzCompressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\treturn xz.NewWriter(r)\n}\n\n// CompressStream returns the compressor by its name\nfunc CompressStream(dest io.Writer, algo Algorithm, level *int) (io.WriteCloser, error) {\n\tm := map[string]string{}\n\treturn internal.AlgorithmCompressor(algo)(dest, m, level)\n}\n\n// CompressStreamWithMetadata returns the compressor by its name.\n//\n// Compressing a stream may create integrity data that allows consuming the compressed byte stream\n// while only using subsets of the compressed data (if the compressed data is seekable and most\n// of the uncompressed data is already present via other means), while still protecting integrity\n// of the compressed stream against unwanted modification. (In OCI container images, this metadata\n// is usually carried in manifest annotations.)\n//\n// Such a partial decompression is not implemented by this package; it is consumed e.g. by\n// github.com/containers/storage/pkg/chunked .\n//\n// If the compression generates such metadata, it is written to the provided metadata map.\nfunc CompressStreamWithMetadata(dest io.Writer, metadata map[string]string, algo Algorithm, level *int) (io.WriteCloser, error) {\n\treturn internal.AlgorithmCompressor(algo)(dest, metadata, level)\n}\n\n// DetectCompressionFormat returns an Algorithm and DecompressorFunc if the input is recognized as a compressed format, an invalid\n// value and nil otherwise.\n// Because it consumes the start of input, other consumers must use the returned io.Reader instead to also read from the beginning.\nfunc DetectCompressionFormat(input io.Reader) (Algorithm, DecompressorFunc, io.Reader, error) {\n\tbuffer := [8]byte{}\n\n\tn, err := io.ReadAtLeast(input, buffer[:], len(buffer))\n\tif err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {\n\t\t// This is a “real” error. We could just ignore it this time, process the data we have, and hope that the source will report the same error again.\n\t\t// Instead, fail immediately with the original error cause instead of a possibly secondary/misleading error returned later.\n\t\treturn Algorithm{}, nil, nil, err\n\t}\n\n\tvar retAlgo Algorithm\n\tvar decompressor DecompressorFunc\n\tfor _, algo := range compressionAlgorithms {\n\t\tprefix := internal.AlgorithmPrefix(algo)\n\t\tif len(prefix) > 0 && bytes.HasPrefix(buffer[:n], prefix) {\n\t\t\tlogrus.Debugf(\"Detected compression format %s\", algo.Name())\n\t\t\tretAlgo = algo\n\t\t\tdecompressor = internal.AlgorithmDecompressor(algo)\n\t\t\tbreak\n\t\t}\n\t}\n\tif decompressor == nil {\n\t\tlogrus.Debugf(\"No compression detected\")\n\t}\n\n\treturn retAlgo, decompressor, io.MultiReader(bytes.NewReader(buffer[:n]), input), nil\n}\n\n// DetectCompression returns a DecompressorFunc if the input is recognized as a compressed format, nil otherwise.\n// Because it consumes the start of input, other consumers must use the returned io.Reader instead to also read from the beginning.\nfunc DetectCompression(input io.Reader) (DecompressorFunc, io.Reader, error) {\n\t_, d, r, e := DetectCompressionFormat(input)\n\treturn d, r, e\n}\n\n// AutoDecompress takes a stream and returns an uncompressed version of the\n// same stream.\n// The caller must call Close() on the returned stream (even if the input does not need,\n// or does not even support, closing!).\nfunc AutoDecompress(stream io.Reader) (io.ReadCloser, bool, error) {\n\tdecompressor, stream, err := DetectCompression(stream)\n\tif err != nil {\n\t\treturn nil, false, fmt.Errorf(\"detecting compression: %w\", err)\n\t}\n\tvar res io.ReadCloser\n\tif decompressor != nil {\n\t\tres, err = decompressor(stream)\n\t\tif err != nil {\n\t\t\treturn nil, false, fmt.Errorf(\"initializing decompression: %w\", err)\n\t\t}\n\t} else {\n\t\tres = io.NopCloser(stream)\n\t}\n\treturn res, decompressor != nil, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/compression/internal/types.go",
    "content": "package internal\n\nimport \"io\"\n\n// CompressorFunc writes the compressed stream to the given writer using the specified compression level.\n//\n// Compressing a stream may create integrity data that allows consuming the compressed byte stream\n// while only using subsets of the compressed data (if the compressed data is seekable and most\n// of the uncompressed data is already present via other means), while still protecting integrity\n// of the compressed stream against unwanted modification. (In OCI container images, this metadata\n// is usually carried in manifest annotations.)\n//\n// If the compression generates such metadata, it is written to the provided metadata map.\n//\n// The caller must call Close() on the stream (even if the input stream does not need closing!).\ntype CompressorFunc func(io.Writer, map[string]string, *int) (io.WriteCloser, error)\n\n// DecompressorFunc returns the decompressed stream, given a compressed stream.\n// The caller must call Close() on the decompressed stream (even if the compressed input stream does not need closing!).\ntype DecompressorFunc func(io.Reader) (io.ReadCloser, error)\n\n// Algorithm is a compression algorithm that can be used for CompressStream.\ntype Algorithm struct {\n\tname            string\n\tbaseVariantName string\n\tprefix          []byte // Initial bytes of a stream compressed using this algorithm, or empty to disable detection.\n\tdecompressor    DecompressorFunc\n\tcompressor      CompressorFunc\n}\n\n// NewAlgorithm creates an Algorithm instance.\n// nontrivialBaseVariantName is typically \"\".\n// This function exists so that Algorithm instances can only be created by code that\n// is allowed to import this internal subpackage.\nfunc NewAlgorithm(name, nontrivialBaseVariantName string, prefix []byte, decompressor DecompressorFunc, compressor CompressorFunc) Algorithm {\n\tbaseVariantName := name\n\tif nontrivialBaseVariantName != \"\" {\n\t\tbaseVariantName = nontrivialBaseVariantName\n\t}\n\treturn Algorithm{\n\t\tname:            name,\n\t\tbaseVariantName: baseVariantName,\n\t\tprefix:          prefix,\n\t\tdecompressor:    decompressor,\n\t\tcompressor:      compressor,\n\t}\n}\n\n// Name returns the name for the compression algorithm.\nfunc (c Algorithm) Name() string {\n\treturn c.name\n}\n\n// BaseVariantName returns the name of the “base variant” of the compression algorithm.\n// It is either equal to Name() of the same algorithm, or equal to Name() of some other Algorithm (the “base variant”).\n// This supports a single level of “is-a” relationship between compression algorithms, e.g. where \"zstd:chunked\" data is valid \"zstd\" data.\nfunc (c Algorithm) BaseVariantName() string {\n\treturn c.baseVariantName\n}\n\n// AlgorithmCompressor returns the compressor field of algo.\n// This is a function instead of a public method so that it is only callable by code\n// that is allowed to import this internal subpackage.\nfunc AlgorithmCompressor(algo Algorithm) CompressorFunc {\n\treturn algo.compressor\n}\n\n// AlgorithmDecompressor returns the decompressor field of algo.\n// This is a function instead of a public method so that it is only callable by code\n// that is allowed to import this internal subpackage.\nfunc AlgorithmDecompressor(algo Algorithm) DecompressorFunc {\n\treturn algo.decompressor\n}\n\n// AlgorithmPrefix returns the prefix field of algo.\n// This is a function instead of a public method so that it is only callable by code\n// that is allowed to import this internal subpackage.\nfunc AlgorithmPrefix(algo Algorithm) []byte {\n\treturn algo.prefix\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/compression/types/types.go",
    "content": "package types\n\nimport (\n\t\"go.podman.io/image/v5/pkg/compression/internal\"\n)\n\n// DecompressorFunc returns the decompressed stream, given a compressed stream.\n// The caller must call Close() on the decompressed stream (even if the compressed input stream does not need closing!).\ntype DecompressorFunc = internal.DecompressorFunc\n\n// Algorithm is a compression algorithm provided and supported by pkg/compression.\n// It can’t be supplied from the outside.\ntype Algorithm = internal.Algorithm\n\nconst (\n\t// GzipAlgorithmName is the name used by pkg/compression.Gzip.\n\t// NOTE: Importing only this /types package does not inherently guarantee a Gzip algorithm\n\t// will actually be available. (In fact it is intended for this types package not to depend\n\t// on any of the implementations.)\n\tGzipAlgorithmName = \"gzip\"\n\t// Bzip2AlgorithmName is the name used by pkg/compression.Bzip2.\n\t// NOTE: Importing only this /types package does not inherently guarantee a Bzip2 algorithm\n\t// will actually be available. (In fact it is intended for this types package not to depend\n\t// on any of the implementations.)\n\tBzip2AlgorithmName = \"bzip2\"\n\t// XzAlgorithmName is the name used by pkg/compression.Xz.\n\t// NOTE: Importing only this /types package does not inherently guarantee a Xz algorithm\n\t// will actually be available. (In fact it is intended for this types package not to depend\n\t// on any of the implementations.)\n\tXzAlgorithmName = \"Xz\"\n\t// ZstdAlgorithmName is the name used by pkg/compression.Zstd.\n\t// NOTE: Importing only this /types package does not inherently guarantee a Zstd algorithm\n\t// will actually be available. (In fact it is intended for this types package not to depend\n\t// on any of the implementations.)\n\tZstdAlgorithmName = \"zstd\"\n\t// ZstdChunkedAlgorithmName is the name used by pkg/compression.ZstdChunked.\n\t// NOTE: Importing only this /types package does not inherently guarantee a ZstdChunked algorithm\n\t// will actually be available. (In fact it is intended for this types package not to depend\n\t// on any of the implementations.)\n\tZstdChunkedAlgorithmName = \"zstd:chunked\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/compression/zstd.go",
    "content": "package compression\n\nimport (\n\t\"io\"\n\n\t\"github.com/klauspost/compress/zstd\"\n)\n\ntype wrapperZstdDecoder struct {\n\tdecoder *zstd.Decoder\n}\n\nfunc (w *wrapperZstdDecoder) Close() error {\n\tw.decoder.Close()\n\treturn nil\n}\n\nfunc (w *wrapperZstdDecoder) DecodeAll(input, dst []byte) ([]byte, error) {\n\treturn w.decoder.DecodeAll(input, dst)\n}\n\nfunc (w *wrapperZstdDecoder) Read(p []byte) (int, error) {\n\treturn w.decoder.Read(p)\n}\n\nfunc (w *wrapperZstdDecoder) Reset(r io.Reader) error {\n\treturn w.decoder.Reset(r)\n}\n\nfunc (w *wrapperZstdDecoder) WriteTo(wr io.Writer) (int64, error) {\n\treturn w.decoder.WriteTo(wr)\n}\n\nfunc zstdReader(buf io.Reader) (io.ReadCloser, error) {\n\tdecoder, err := zstd.NewReader(buf)\n\treturn &wrapperZstdDecoder{decoder: decoder}, err\n}\n\nfunc zstdWriter(dest io.Writer) (io.WriteCloser, error) {\n\treturn zstd.NewWriter(dest)\n}\n\nfunc zstdWriterWithLevel(dest io.Writer, level int) (*zstd.Encoder, error) {\n\tel := zstd.EncoderLevelFromZstd(level)\n\treturn zstd.NewWriter(dest, zstd.WithEncoderLevel(el))\n}\n\n// zstdCompressor is a CompressorFunc for the zstd compression algorithm.\nfunc zstdCompressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\tif level == nil {\n\t\treturn zstdWriter(r)\n\t}\n\treturn zstdWriterWithLevel(r, *level)\n}\n\n// ZstdDecompressor is a DecompressorFunc for the zstd compression algorithm.\nfunc ZstdDecompressor(r io.Reader) (io.ReadCloser, error) {\n\treturn zstdReader(r)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/docker/config/config.go",
    "content": "package config\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"iter\"\n\t\"maps\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\thelperclient \"github.com/docker/docker-credential-helpers/client\"\n\t\"github.com/docker/docker-credential-helpers/credentials\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/pkg/sysregistriesv2\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n)\n\ntype dockerAuthConfig struct {\n\tAuth          string `json:\"auth,omitempty\"`\n\tIdentityToken string `json:\"identitytoken,omitempty\"`\n}\n\ntype dockerConfigFile struct {\n\tAuthConfigs map[string]dockerAuthConfig `json:\"auths\"`\n\tCredHelpers map[string]string           `json:\"credHelpers,omitempty\"`\n}\n\nvar (\n\tdefaultPerUIDPathFormat = filepath.FromSlash(\"/run/containers/%d/auth.json\")\n\txdgConfigHomePath       = filepath.FromSlash(\"containers/auth.json\")\n\txdgRuntimeDirPath       = filepath.FromSlash(\"containers/auth.json\")\n\tdockerHomePath          = filepath.FromSlash(\".docker/config.json\")\n\tdockerLegacyHomePath    = \".dockercfg\"\n\tnonLinuxAuthFilePath    = filepath.FromSlash(\".config/containers/auth.json\")\n\n\t// ErrNotLoggedIn is returned for users not logged into a registry\n\t// that they are trying to logout of\n\tErrNotLoggedIn = errors.New(\"not logged in\")\n\t// ErrNotSupported is returned for unsupported methods\n\tErrNotSupported = errors.New(\"not supported\")\n)\n\n// authPath combines a path to a file with container registry credentials,\n// along with expected properties of that path (currently just whether it's\n// legacy format or not).\ntype authPath struct {\n\tpath         string\n\tlegacyFormat bool\n}\n\n// newAuthPathDefault constructs an authPath in non-legacy format.\nfunc newAuthPathDefault(path string) authPath {\n\treturn authPath{path: path, legacyFormat: false}\n}\n\n// GetAllCredentials returns the registry credentials for all registries stored\n// in any of the configured credential helpers.\nfunc GetAllCredentials(sys *types.SystemContext) (map[string]types.DockerAuthConfig, error) {\n\t// To keep things simple, let's first extract all registries from all\n\t// possible sources, and then call `GetCredentials` on them.  That\n\t// prevents us from having to reverse engineer the logic in\n\t// `GetCredentials`.\n\tallKeys := set.New[string]()\n\n\t// To use GetCredentials, we must at least convert the URL forms into host names.\n\t// While we're at it, we’ll also canonicalize docker.io to the standard format.\n\tnormalizedDockerIORegistry := normalizeRegistry(\"docker.io\")\n\n\thelpers, err := sysregistriesv2.CredentialHelpers(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, helper := range helpers {\n\t\tswitch helper {\n\t\t// Special-case the built-in helper for auth files.\n\t\tcase sysregistriesv2.AuthenticationFileHelper:\n\t\t\tfor _, path := range getAuthFilePaths(sys, homedir.Get()) {\n\t\t\t\t// parse returns an empty map in case the path doesn't exist.\n\t\t\t\tfileContents, err := path.parse()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"reading JSON file %q: %w\", path.path, err)\n\t\t\t\t}\n\t\t\t\t// Credential helpers in the auth file have a\n\t\t\t\t// direct mapping to a registry, so we can just\n\t\t\t\t// walk the map.\n\t\t\t\tallKeys.AddSeq(maps.Keys(fileContents.CredHelpers))\n\t\t\t\tfor key := range fileContents.AuthConfigs {\n\t\t\t\t\tkey := normalizeAuthFileKey(key, path.legacyFormat)\n\t\t\t\t\tif key == normalizedDockerIORegistry {\n\t\t\t\t\t\tkey = \"docker.io\"\n\t\t\t\t\t}\n\t\t\t\t\tallKeys.Add(key)\n\t\t\t\t}\n\t\t\t}\n\t\t// External helpers.\n\t\tdefault:\n\t\t\tcreds, err := listCredsInCredHelper(helper)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Debugf(\"Error listing credentials stored in credential helper %s: %v\", helper, err)\n\t\t\t\tif errors.Is(err, exec.ErrNotFound) {\n\t\t\t\t\tcreds = nil // It's okay if the helper doesn't exist.\n\t\t\t\t} else {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tallKeys.AddSeq(maps.Keys(creds))\n\t\t}\n\t}\n\n\t// Now use `GetCredentials` to the specific auth configs for each\n\t// previously listed registry.\n\tallCreds := make(map[string]types.DockerAuthConfig)\n\tfor key := range allKeys.All() {\n\t\tcreds, err := GetCredentials(sys, key)\n\t\tif err != nil {\n\t\t\t// Note: we rely on the logging in `GetCredentials`.\n\t\t\treturn nil, err\n\t\t}\n\t\tif creds != (types.DockerAuthConfig{}) {\n\t\t\tallCreds[key] = creds\n\t\t}\n\t}\n\n\treturn allCreds, nil\n}\n\n// getAuthFilePaths returns a slice of authPaths based on the system context\n// in the order they should be searched. Note that some paths may not exist.\n// The homeDir parameter should always be homedir.Get(), and is only intended to be overridden\n// by tests.\nfunc getAuthFilePaths(sys *types.SystemContext, homeDir string) []authPath {\n\tpaths := []authPath{}\n\tpathToAuth, userSpecifiedPath, err := getPathToAuth(sys)\n\tif err == nil {\n\t\tpaths = append(paths, pathToAuth)\n\t} else {\n\t\t// Error means that the path set for XDG_RUNTIME_DIR does not exist\n\t\t// but we don't want to completely fail in the case that the user is pulling a public image\n\t\t// Logging the error as a warning instead and moving on to pulling the image\n\t\tlogrus.Warnf(\"%v: Trying to pull image in the event that it is a public image.\", err)\n\t}\n\tif !userSpecifiedPath {\n\t\txdgCfgHome := os.Getenv(\"XDG_CONFIG_HOME\")\n\t\tif xdgCfgHome == \"\" {\n\t\t\txdgCfgHome = filepath.Join(homeDir, \".config\")\n\t\t}\n\t\tpaths = append(paths, newAuthPathDefault(filepath.Join(xdgCfgHome, xdgConfigHomePath)))\n\t\tif dockerConfig := os.Getenv(\"DOCKER_CONFIG\"); dockerConfig != \"\" {\n\t\t\tpaths = append(paths, newAuthPathDefault(filepath.Join(dockerConfig, \"config.json\")))\n\t\t} else {\n\t\t\tpaths = append(paths,\n\t\t\t\tnewAuthPathDefault(filepath.Join(homeDir, dockerHomePath)),\n\t\t\t)\n\t\t}\n\t\tpaths = append(paths,\n\t\t\tauthPath{path: filepath.Join(homeDir, dockerLegacyHomePath), legacyFormat: true},\n\t\t)\n\t}\n\treturn paths\n}\n\n// GetCredentials returns the registry credentials matching key, appropriate for\n// sys and the users’ configuration.\n// If an entry is not found, an empty struct is returned.\n// A valid key is a repository, a namespace within a registry, or a registry hostname.\n//\n// GetCredentialsForRef should almost always be used in favor of this API.\nfunc GetCredentials(sys *types.SystemContext, key string) (types.DockerAuthConfig, error) {\n\treturn getCredentialsWithHomeDir(sys, key, homedir.Get())\n}\n\n// GetCredentialsForRef returns the registry credentials necessary for\n// accessing ref on the registry ref points to,\n// appropriate for sys and the users’ configuration.\n// If an entry is not found, an empty struct is returned.\nfunc GetCredentialsForRef(sys *types.SystemContext, ref reference.Named) (types.DockerAuthConfig, error) {\n\treturn getCredentialsWithHomeDir(sys, ref.Name(), homedir.Get())\n}\n\n// getCredentialsWithHomeDir is an internal implementation detail of\n// GetCredentialsForRef and GetCredentials. It exists only to allow testing it\n// with an artificial home directory.\nfunc getCredentialsWithHomeDir(sys *types.SystemContext, key, homeDir string) (types.DockerAuthConfig, error) {\n\t_, err := validateKey(key)\n\tif err != nil {\n\t\treturn types.DockerAuthConfig{}, err\n\t}\n\n\tif sys != nil && sys.DockerAuthConfig != nil {\n\t\tlogrus.Debugf(\"Returning credentials for %s from DockerAuthConfig\", key)\n\t\treturn *sys.DockerAuthConfig, nil\n\t}\n\n\tvar registry string // We compute this once because it is used in several places.\n\tif firstSlash := strings.IndexRune(key, '/'); firstSlash != -1 {\n\t\tregistry = key[:firstSlash]\n\t} else {\n\t\tregistry = key\n\t}\n\n\t// Anonymous function to query credentials from auth files.\n\tgetCredentialsFromAuthFiles := func() (types.DockerAuthConfig, string, error) {\n\t\tfor _, path := range getAuthFilePaths(sys, homeDir) {\n\t\t\tcreds, err := findCredentialsInFile(key, registry, path)\n\t\t\tif err != nil {\n\t\t\t\treturn types.DockerAuthConfig{}, \"\", err\n\t\t\t}\n\n\t\t\tif creds != (types.DockerAuthConfig{}) {\n\t\t\t\treturn creds, path.path, nil\n\t\t\t}\n\t\t}\n\t\treturn types.DockerAuthConfig{}, \"\", nil\n\t}\n\n\thelpers, err := sysregistriesv2.CredentialHelpers(sys)\n\tif err != nil {\n\t\treturn types.DockerAuthConfig{}, err\n\t}\n\n\tvar multiErr []error\n\tfor _, helper := range helpers {\n\t\tvar (\n\t\t\tcreds          types.DockerAuthConfig\n\t\t\thelperKey      string\n\t\t\tcredHelperPath string\n\t\t\terr            error\n\t\t)\n\t\tswitch helper {\n\t\t// Special-case the built-in helper for auth files.\n\t\tcase sysregistriesv2.AuthenticationFileHelper:\n\t\t\thelperKey = key\n\t\t\tcreds, credHelperPath, err = getCredentialsFromAuthFiles()\n\t\t// External helpers.\n\t\tdefault:\n\t\t\t// This intentionally uses \"registry\", not \"key\"; we don't support namespaced\n\t\t\t// credentials in helpers, but a \"registry\" is a valid parent of \"key\".\n\t\t\thelperKey = registry\n\t\t\tcreds, err = getCredsFromCredHelper(helper, registry)\n\t\t}\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Error looking up credentials for %s in credential helper %s: %v\", helperKey, helper, err)\n\t\t\tmultiErr = append(multiErr, err)\n\t\t\tcontinue\n\t\t}\n\t\tif creds != (types.DockerAuthConfig{}) {\n\t\t\tmsg := fmt.Sprintf(\"Found credentials for %s in credential helper %s\", helperKey, helper)\n\t\t\tif credHelperPath != \"\" {\n\t\t\t\tmsg = fmt.Sprintf(\"%s in file %s\", msg, credHelperPath)\n\t\t\t}\n\t\t\tlogrus.Debug(msg)\n\t\t\treturn creds, nil\n\t\t}\n\t}\n\tif multiErr != nil {\n\t\treturn types.DockerAuthConfig{}, multierr.Format(\"errors looking up credentials:\\n\\t* \", \"\\nt* \", \"\\n\", multiErr)\n\t}\n\n\tlogrus.Debugf(\"No credentials for %s found\", key)\n\treturn types.DockerAuthConfig{}, nil\n}\n\n// GetAuthentication returns the registry credentials matching key, appropriate for\n// sys and the users’ configuration.\n// If an entry is not found, an empty struct is returned.\n// A valid key is a repository, a namespace within a registry, or a registry hostname.\n//\n// Deprecated: This API only has support for username and password. To get the\n// support for oauth2 in container registry authentication, we added the new\n// GetCredentialsForRef and GetCredentials API. The new API should be used and this API is kept to\n// maintain backward compatibility.\nfunc GetAuthentication(sys *types.SystemContext, key string) (string, string, error) {\n\treturn getAuthenticationWithHomeDir(sys, key, homedir.Get())\n}\n\n// getAuthenticationWithHomeDir is an internal implementation detail of GetAuthentication,\n// it exists only to allow testing it with an artificial home directory.\nfunc getAuthenticationWithHomeDir(sys *types.SystemContext, key, homeDir string) (string, string, error) {\n\tcreds, err := getCredentialsWithHomeDir(sys, key, homeDir)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\tif creds.IdentityToken != \"\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"non-empty identity token found and this API doesn't support it: %w\", ErrNotSupported)\n\t}\n\treturn creds.Username, creds.Password, nil\n}\n\n// SetCredentials stores the username and password in a location\n// appropriate for sys and the users’ configuration.\n// A valid key is a repository, a namespace within a registry, or a registry hostname;\n// using forms other than just a registry may fail depending on configuration.\n// Returns a human-readable description of the location that was updated.\n// NOTE: The return value is only intended to be read by humans; its form is not an API,\n// it may change (or new forms can be added) any time.\nfunc SetCredentials(sys *types.SystemContext, key, username, password string) (string, error) {\n\thelpers, jsonEditor, key, isNamespaced, err := prepareForEdit(sys, key, true)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Make sure to collect all errors.\n\tvar multiErr []error\n\tfor _, helper := range helpers {\n\t\tvar desc string\n\t\tvar err error\n\t\tswitch helper {\n\t\t// Special-case the built-in helpers for auth files.\n\t\tcase sysregistriesv2.AuthenticationFileHelper:\n\t\t\tdesc, err = jsonEditor(sys, func(fileContents *dockerConfigFile) (bool, string, error) {\n\t\t\t\tif ch, exists := fileContents.CredHelpers[key]; exists {\n\t\t\t\t\tif isNamespaced {\n\t\t\t\t\t\treturn false, \"\", unsupportedNamespaceErr(ch)\n\t\t\t\t\t}\n\t\t\t\t\tdesc, err := setCredsInCredHelper(ch, key, username, password)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn false, \"\", err\n\t\t\t\t\t}\n\t\t\t\t\treturn false, desc, nil\n\t\t\t\t}\n\t\t\t\tcreds := base64.StdEncoding.EncodeToString([]byte(username + \":\" + password))\n\t\t\t\tnewCreds := dockerAuthConfig{Auth: creds}\n\t\t\t\tfileContents.AuthConfigs[key] = newCreds\n\t\t\t\treturn true, \"\", nil\n\t\t\t})\n\t\t// External helpers.\n\t\tdefault:\n\t\t\tif isNamespaced {\n\t\t\t\terr = unsupportedNamespaceErr(helper)\n\t\t\t} else {\n\t\t\t\tdesc, err = setCredsInCredHelper(helper, key, username, password)\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tmultiErr = append(multiErr, err)\n\t\t\tlogrus.Debugf(\"Error storing credentials for %s in credential helper %s: %v\", key, helper, err)\n\t\t\tcontinue\n\t\t}\n\t\tlogrus.Debugf(\"Stored credentials for %s in credential helper %s\", key, helper)\n\t\treturn desc, nil\n\t}\n\treturn \"\", multierr.Format(\"Errors storing credentials\\n\\t* \", \"\\n\\t* \", \"\\n\", multiErr)\n}\n\nfunc unsupportedNamespaceErr(helper string) error {\n\treturn fmt.Errorf(\"namespaced key is not supported for credential helper %s\", helper)\n}\n\n// SetAuthentication stores the username and password in the credential helper or file\n// See the documentation of SetCredentials for format of \"key\"\nfunc SetAuthentication(sys *types.SystemContext, key, username, password string) error {\n\t_, err := SetCredentials(sys, key, username, password)\n\treturn err\n}\n\n// RemoveAuthentication removes credentials for `key` from all possible\n// sources such as credential helpers and auth files.\n// A valid key is a repository, a namespace within a registry, or a registry hostname;\n// using forms other than just a registry may fail depending on configuration.\nfunc RemoveAuthentication(sys *types.SystemContext, key string) error {\n\thelpers, jsonEditor, key, isNamespaced, err := prepareForEdit(sys, key, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tisLoggedIn := false\n\n\tremoveFromCredHelper := func(helper string) error {\n\t\tif isNamespaced {\n\t\t\tlogrus.Debugf(\"Not removing credentials because namespaced keys are not supported for the credential helper: %s\", helper)\n\t\t\treturn nil\n\t\t}\n\t\terr := deleteCredsFromCredHelper(helper, key)\n\t\tif err == nil {\n\t\t\tlogrus.Debugf(\"Credentials for %q were deleted from credential helper %s\", key, helper)\n\t\t\tisLoggedIn = true\n\t\t\treturn nil\n\t\t}\n\t\tif credentials.IsErrCredentialsNotFoundMessage(err.Error()) {\n\t\t\tlogrus.Debugf(\"Not logged in to %s with credential helper %s\", key, helper)\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"removing credentials for %s from credential helper %s: %w\", key, helper, err)\n\t}\n\n\tvar multiErr []error\n\tfor _, helper := range helpers {\n\t\tvar err error\n\t\tswitch helper {\n\t\t// Special-case the built-in helper for auth files.\n\t\tcase sysregistriesv2.AuthenticationFileHelper:\n\t\t\t_, err = jsonEditor(sys, func(fileContents *dockerConfigFile) (bool, string, error) {\n\t\t\t\tvar helperErr error\n\t\t\t\tif innerHelper, exists := fileContents.CredHelpers[key]; exists {\n\t\t\t\t\thelperErr = removeFromCredHelper(innerHelper)\n\t\t\t\t}\n\t\t\t\tif _, ok := fileContents.AuthConfigs[key]; ok {\n\t\t\t\t\tisLoggedIn = true\n\t\t\t\t\tdelete(fileContents.AuthConfigs, key)\n\t\t\t\t}\n\t\t\t\treturn true, \"\", helperErr\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\tmultiErr = append(multiErr, err)\n\t\t\t}\n\t\t// External helpers.\n\t\tdefault:\n\t\t\tif err := removeFromCredHelper(helper); err != nil {\n\t\t\t\tmultiErr = append(multiErr, err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif multiErr != nil {\n\t\treturn multierr.Format(\"errors removing credentials\\n\\t* \", \"\\n\\t*\", \"\\n\", multiErr)\n\t}\n\tif !isLoggedIn {\n\t\treturn ErrNotLoggedIn\n\t}\n\n\treturn nil\n}\n\n// RemoveAllAuthentication deletes all the credentials stored in credential\n// helpers and auth files.\nfunc RemoveAllAuthentication(sys *types.SystemContext) error {\n\thelpers, jsonEditor, _, _, err := prepareForEdit(sys, \"\", false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar multiErr []error\n\tfor _, helper := range helpers {\n\t\tvar err error\n\t\tswitch helper {\n\t\t// Special-case the built-in helper for auth files.\n\t\tcase sysregistriesv2.AuthenticationFileHelper:\n\t\t\t_, err = jsonEditor(sys, func(fileContents *dockerConfigFile) (bool, string, error) {\n\t\t\t\tfor registry, helper := range fileContents.CredHelpers {\n\t\t\t\t\t// Helpers in auth files are expected\n\t\t\t\t\t// to exist, so no special treatment\n\t\t\t\t\t// for them.\n\t\t\t\t\tif err := deleteCredsFromCredHelper(helper, registry); err != nil {\n\t\t\t\t\t\treturn false, \"\", err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfileContents.CredHelpers = make(map[string]string)\n\t\t\t\tfileContents.AuthConfigs = make(map[string]dockerAuthConfig)\n\t\t\t\treturn true, \"\", nil\n\t\t\t})\n\t\t// External helpers.\n\t\tdefault:\n\t\t\tvar creds map[string]string\n\t\t\tcreds, err = listCredsInCredHelper(helper)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, exec.ErrNotFound) {\n\t\t\t\t\t// It's okay if the helper doesn't exist.\n\t\t\t\t\tcontinue\n\t\t\t\t} else {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor registry := range creds {\n\t\t\t\terr = deleteCredsFromCredHelper(helper, registry)\n\t\t\t\tif err != nil {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Error removing credentials from credential helper %s: %v\", helper, err)\n\t\t\tmultiErr = append(multiErr, err)\n\t\t\tcontinue\n\t\t}\n\t\tlogrus.Debugf(\"All credentials removed from credential helper %s\", helper)\n\t}\n\n\tif multiErr != nil {\n\t\treturn multierr.Format(\"errors removing all credentials:\\n\\t* \", \"\\n\\t* \", \"\\n\", multiErr)\n\t}\n\treturn nil\n}\n\n// prepareForEdit processes sys and key (if keyRelevant) to return:\n// - a list of credential helpers\n// - a function which can be used to edit the JSON file\n// - the key value to actually use in credential helpers / JSON\n// - a boolean which is true if key is namespaced (and should not be used with credential helpers).\nfunc prepareForEdit(sys *types.SystemContext, key string, keyRelevant bool) ([]string, func(*types.SystemContext, func(*dockerConfigFile) (bool, string, error)) (string, error), string, bool, error) {\n\tvar isNamespaced bool\n\tif keyRelevant {\n\t\tns, err := validateKey(key)\n\t\tif err != nil {\n\t\t\treturn nil, nil, \"\", false, err\n\t\t}\n\t\tisNamespaced = ns\n\t}\n\n\tif sys != nil && sys.DockerCompatAuthFilePath != \"\" {\n\t\tif sys.AuthFilePath != \"\" {\n\t\t\treturn nil, nil, \"\", false, errors.New(\"AuthFilePath and DockerCompatAuthFilePath can not be set simultaneously\")\n\t\t}\n\t\tif keyRelevant {\n\t\t\tif isNamespaced {\n\t\t\t\treturn nil, nil, \"\", false, fmt.Errorf(\"Credentials cannot be recorded in Docker-compatible format with namespaced key %q\", key)\n\t\t\t}\n\t\t\tif key == \"docker.io\" {\n\t\t\t\tkey = \"https://index.docker.io/v1/\"\n\t\t\t}\n\t\t}\n\n\t\t// Do not use helpers defined in sysregistriesv2 because Docker isn’t aware of them.\n\t\treturn []string{sysregistriesv2.AuthenticationFileHelper}, modifyDockerConfigJSON, key, false, nil\n\t}\n\n\thelpers, err := sysregistriesv2.CredentialHelpers(sys)\n\tif err != nil {\n\t\treturn nil, nil, \"\", false, err\n\t}\n\n\treturn helpers, modifyJSON, key, isNamespaced, nil\n}\n\nfunc listCredsInCredHelper(credHelper string) (map[string]string, error) {\n\thelperName := fmt.Sprintf(\"docker-credential-%s\", credHelper)\n\tp := helperclient.NewShellProgramFunc(helperName)\n\treturn helperclient.List(p)\n}\n\n// getPathToAuth gets the path of the auth.json file used for reading and writing credentials,\n// and a boolean indicating whether the return value came from an explicit user choice (i.e. not defaults)\nfunc getPathToAuth(sys *types.SystemContext) (authPath, bool, error) {\n\treturn getPathToAuthWithOS(sys, runtime.GOOS)\n}\n\n// getPathToAuthWithOS is an internal implementation detail of getPathToAuth,\n// it exists only to allow testing it with an artificial runtime.GOOS.\nfunc getPathToAuthWithOS(sys *types.SystemContext, goOS string) (authPath, bool, error) {\n\tif sys != nil {\n\t\tif sys.AuthFilePath != \"\" && sys.DockerCompatAuthFilePath != \"\" {\n\t\t\treturn authPath{}, false, errors.New(\"AuthFilePath and DockerCompatAuthFilePath can not be set simultaneously\")\n\t\t}\n\t\tif sys.AuthFilePath != \"\" {\n\t\t\treturn newAuthPathDefault(sys.AuthFilePath), true, nil\n\t\t}\n\t\t// When reading, we can process auth.json and Docker’s config.json with the same code.\n\t\t// When writing, prepareForEdit chooses an appropriate jsonEditor implementation.\n\t\tif sys.DockerCompatAuthFilePath != \"\" {\n\t\t\treturn newAuthPathDefault(sys.DockerCompatAuthFilePath), true, nil\n\t\t}\n\t\tif sys.LegacyFormatAuthFilePath != \"\" {\n\t\t\treturn authPath{path: sys.LegacyFormatAuthFilePath, legacyFormat: true}, true, nil\n\t\t}\n\t\t// Note: RootForImplicitAbsolutePaths should not affect paths starting with $HOME\n\t\tif sys.RootForImplicitAbsolutePaths != \"\" && goOS == \"linux\" {\n\t\t\treturn newAuthPathDefault(filepath.Join(sys.RootForImplicitAbsolutePaths, fmt.Sprintf(defaultPerUIDPathFormat, os.Getuid()))), false, nil\n\t\t}\n\t}\n\tif goOS != \"linux\" {\n\t\treturn newAuthPathDefault(filepath.Join(homedir.Get(), nonLinuxAuthFilePath)), false, nil\n\t}\n\n\truntimeDir := os.Getenv(\"XDG_RUNTIME_DIR\")\n\tif runtimeDir != \"\" {\n\t\t// This function does not in general need to separately check that the returned path exists; that’s racy, and callers will fail accessing the file anyway.\n\t\t// We are checking for fs.ErrNotExist here only to give the user better guidance what to do in this special case.\n\t\terr := fileutils.Exists(runtimeDir)\n\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t// This means the user set the XDG_RUNTIME_DIR variable and either forgot to create the directory\n\t\t\t// or made a typo while setting the environment variable,\n\t\t\t// so return an error referring to $XDG_RUNTIME_DIR instead of xdgRuntimeDirPath inside.\n\t\t\treturn authPath{}, false, fmt.Errorf(\"%q directory set by $XDG_RUNTIME_DIR does not exist. Either create the directory or unset $XDG_RUNTIME_DIR.: %w\", runtimeDir, err)\n\t\t} // else ignore err and let the caller fail accessing xdgRuntimeDirPath.\n\t\treturn newAuthPathDefault(filepath.Join(runtimeDir, xdgRuntimeDirPath)), false, nil\n\t}\n\treturn newAuthPathDefault(fmt.Sprintf(defaultPerUIDPathFormat, os.Getuid())), false, nil\n}\n\n// parse unmarshals the credentials stored in the auth.json file and returns it\n// or returns an empty dockerConfigFile data structure if auth.json does not exist\n// if the file exists and is empty, this function returns an error.\nfunc (path authPath) parse() (dockerConfigFile, error) {\n\tvar fileContents dockerConfigFile\n\n\traw, err := os.ReadFile(path.path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tfileContents.AuthConfigs = map[string]dockerAuthConfig{}\n\t\t\treturn fileContents, nil\n\t\t}\n\t\treturn dockerConfigFile{}, err\n\t}\n\n\tif path.legacyFormat {\n\t\tif err = json.Unmarshal(raw, &fileContents.AuthConfigs); err != nil {\n\t\t\treturn dockerConfigFile{}, fmt.Errorf(\"unmarshaling JSON at %q: %w\", path.path, err)\n\t\t}\n\t\treturn fileContents, nil\n\t}\n\n\tif err = json.Unmarshal(raw, &fileContents); err != nil {\n\t\treturn dockerConfigFile{}, fmt.Errorf(\"unmarshaling JSON at %q: %w\", path.path, err)\n\t}\n\n\tif fileContents.AuthConfigs == nil {\n\t\tfileContents.AuthConfigs = map[string]dockerAuthConfig{}\n\t}\n\tif fileContents.CredHelpers == nil {\n\t\tfileContents.CredHelpers = make(map[string]string)\n\t}\n\n\treturn fileContents, nil\n}\n\n// modifyJSON finds an auth.json file, calls editor on the contents, and\n// writes it back if editor returns true.\n// Returns a human-readable description of the file, to be returned by SetCredentials.\n//\n// The editor may also return a human-readable description of the updated location; if it is \"\",\n// the file itself is used.\nfunc modifyJSON(sys *types.SystemContext, editor func(fileContents *dockerConfigFile) (bool, string, error)) (string, error) {\n\tpath, _, err := getPathToAuth(sys)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif path.legacyFormat {\n\t\treturn \"\", fmt.Errorf(\"writes to %s using legacy format are not supported\", path.path)\n\t}\n\n\tdir := filepath.Dir(path.path)\n\tif err = os.MkdirAll(dir, 0o700); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfileContents, err := path.parse()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"reading JSON file %q: %w\", path.path, err)\n\t}\n\n\tupdated, description, err := editor(&fileContents)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"updating %q: %w\", path.path, err)\n\t}\n\tif updated {\n\t\tnewData, err := json.MarshalIndent(fileContents, \"\", \"\\t\")\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"marshaling JSON %q: %w\", path.path, err)\n\t\t}\n\n\t\tif err = ioutils.AtomicWriteFile(path.path, newData, 0o600); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"writing to file %q: %w\", path.path, err)\n\t\t}\n\t}\n\n\tif description == \"\" {\n\t\tdescription = path.path\n\t}\n\treturn description, nil\n}\n\n// modifyDockerConfigJSON finds a docker config.json file, calls editor on the contents, and\n// writes it back if editor returns true.\n// Returns a human-readable description of the file, to be returned by SetCredentials.\n//\n// The editor may also return a human-readable description of the updated location; if it is \"\",\n// the file itself is used.\nfunc modifyDockerConfigJSON(sys *types.SystemContext, editor func(fileContents *dockerConfigFile) (bool, string, error)) (string, error) {\n\tif sys == nil || sys.DockerCompatAuthFilePath == \"\" {\n\t\treturn \"\", errors.New(\"internal error: modifyDockerConfigJSON called with DockerCompatAuthFilePath not set\")\n\t}\n\tpath := sys.DockerCompatAuthFilePath\n\n\tdir := filepath.Dir(path)\n\tif err := os.MkdirAll(dir, 0o700); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Try hard not to clobber fields we don’t understand, even fields which may be added in future Docker versions.\n\tvar rawContents map[string]json.RawMessage\n\toriginalBytes, err := os.ReadFile(path)\n\tswitch {\n\tcase err == nil:\n\t\tif err := json.Unmarshal(originalBytes, &rawContents); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"unmarshaling JSON at %q: %w\", path, err)\n\t\t}\n\tcase errors.Is(err, fs.ErrNotExist):\n\t\trawContents = map[string]json.RawMessage{}\n\tdefault: // err != nil\n\t\treturn \"\", err\n\t}\n\n\tsyntheticContents := dockerConfigFile{\n\t\tAuthConfigs: map[string]dockerAuthConfig{},\n\t\tCredHelpers: map[string]string{},\n\t}\n\t// json.Unmarshal also falls back to case-insensitive field matching; this code does not do that. Presumably\n\t// config.json is mostly maintained by machines doing `docker login`, so the files should, hopefully, not contain field names with\n\t// unexpected case.\n\tif rawAuths, ok := rawContents[\"auths\"]; ok {\n\t\t// This conversion will lose fields we don’t know about; when updating an entry, we can’t tell whether an unknown field\n\t\t// should be preserved or discarded (because it is made obsolete/unwanted with the new credentials).\n\t\t// It might make sense to track which entries of \"auths\" we actually modified, and to not touch any others.\n\t\tif err := json.Unmarshal(rawAuths, &syntheticContents.AuthConfigs); err != nil {\n\t\t\treturn \"\", fmt.Errorf(`unmarshaling \"auths\" in JSON at %q: %w`, path, err)\n\t\t}\n\t}\n\tif rawCH, ok := rawContents[\"credHelpers\"]; ok {\n\t\tif err := json.Unmarshal(rawCH, &syntheticContents.CredHelpers); err != nil {\n\t\t\treturn \"\", fmt.Errorf(`unmarshaling \"credHelpers\" in JSON at %q: %w`, path, err)\n\t\t}\n\t}\n\n\tupdated, description, err := editor(&syntheticContents)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"updating %q: %w\", path, err)\n\t}\n\tif updated {\n\t\trawAuths, err := json.MarshalIndent(syntheticContents.AuthConfigs, \"\", \"\\t\")\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"marshaling JSON %q: %w\", path, err)\n\t\t}\n\t\trawContents[\"auths\"] = rawAuths\n\t\t// We never modify syntheticContents.CredHelpers, so we don’t need to update it.\n\t\tnewData, err := json.MarshalIndent(rawContents, \"\", \"\\t\")\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"marshaling JSON %q: %w\", path, err)\n\t\t}\n\n\t\tif err = ioutils.AtomicWriteFile(path, newData, 0o600); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"writing to file %q: %w\", path, err)\n\t\t}\n\t}\n\n\tif description == \"\" {\n\t\tdescription = path\n\t}\n\treturn description, nil\n}\n\nfunc getCredsFromCredHelper(credHelper, registry string) (types.DockerAuthConfig, error) {\n\thelperName := fmt.Sprintf(\"docker-credential-%s\", credHelper)\n\tp := helperclient.NewShellProgramFunc(helperName)\n\tcreds, err := helperclient.Get(p, registry)\n\tif err != nil {\n\t\tif credentials.IsErrCredentialsNotFoundMessage(err.Error()) {\n\t\t\tlogrus.Debugf(\"Not logged in to %s with credential helper %s\", registry, credHelper)\n\t\t\terr = nil\n\t\t}\n\t\treturn types.DockerAuthConfig{}, err\n\t}\n\n\tswitch creds.Username {\n\tcase \"<token>\":\n\t\treturn types.DockerAuthConfig{\n\t\t\tIdentityToken: creds.Secret,\n\t\t}, nil\n\tdefault:\n\t\treturn types.DockerAuthConfig{\n\t\t\tUsername: creds.Username,\n\t\t\tPassword: creds.Secret,\n\t\t}, nil\n\t}\n}\n\n// setCredsInCredHelper stores (username, password) for registry in credHelper.\n// Returns a human-readable description of the destination, to be returned by SetCredentials.\nfunc setCredsInCredHelper(credHelper, registry, username, password string) (string, error) {\n\thelperName := fmt.Sprintf(\"docker-credential-%s\", credHelper)\n\tp := helperclient.NewShellProgramFunc(helperName)\n\tcreds := &credentials.Credentials{\n\t\tServerURL: registry,\n\t\tUsername:  username,\n\t\tSecret:    password,\n\t}\n\tif err := helperclient.Store(p, creds); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn fmt.Sprintf(\"credential helper: %s\", credHelper), nil\n}\n\nfunc deleteCredsFromCredHelper(credHelper, registry string) error {\n\thelperName := fmt.Sprintf(\"docker-credential-%s\", credHelper)\n\tp := helperclient.NewShellProgramFunc(helperName)\n\treturn helperclient.Erase(p, registry)\n}\n\n// findCredentialsInFile looks for credentials matching \"key\"\n// (which is \"registry\" or a namespace in \"registry\") in \"path\".\nfunc findCredentialsInFile(key, registry string, path authPath) (types.DockerAuthConfig, error) {\n\tfileContents, err := path.parse()\n\tif err != nil {\n\t\treturn types.DockerAuthConfig{}, fmt.Errorf(\"reading JSON file %q: %w\", path.path, err)\n\t}\n\n\t// First try cred helpers. They should always be normalized.\n\t// This intentionally uses \"registry\", not \"key\"; we don't support namespaced\n\t// credentials in helpers.\n\tif ch, exists := fileContents.CredHelpers[registry]; exists {\n\t\tlogrus.Debugf(\"Looking up in credential helper %s based on credHelpers entry in %s\", ch, path.path)\n\t\treturn getCredsFromCredHelper(ch, registry)\n\t}\n\n\t// Support sub-registry namespaces in auth.\n\t// (This is not a feature of ~/.docker/config.json; we support it even for\n\t// those files as an extension.)\n\t//\n\t// Repo or namespace keys are only supported as exact matches. For registry\n\t// keys we prefer exact matches as well.\n\tfor key := range authKeyLookupOrder(key, registry, path.legacyFormat) {\n\t\tif val, exists := fileContents.AuthConfigs[key]; exists {\n\t\t\treturn decodeDockerAuth(path.path, key, val)\n\t\t}\n\t}\n\n\t// bad luck; let's normalize the entries first\n\t// This primarily happens for legacyFormat, which for a time used API URLs\n\t// (http[s:]//…/v1/) as keys.\n\t// Secondarily, (docker login) accepted URLs with no normalization for\n\t// several years, and matched registry hostnames against that, so support\n\t// those entries even in non-legacyFormat ~/.docker/config.json.\n\t// The docker.io registry still uses the /v1/ key with a special host name,\n\t// so account for that as well.\n\tregistry = normalizeRegistry(registry)\n\tfor k, v := range fileContents.AuthConfigs {\n\t\tif normalizeAuthFileKey(k, path.legacyFormat) == registry {\n\t\t\treturn decodeDockerAuth(path.path, k, v)\n\t\t}\n\t}\n\n\t// Only log this if we found nothing; getCredentialsWithHomeDir logs the\n\t// source of found data.\n\tlogrus.Debugf(\"No credentials matching %s found in %s\", key, path.path)\n\treturn types.DockerAuthConfig{}, nil\n}\n\n// authKeyLookupOrder returns a sequence for lookup keys matching (key or registry)\n// in file with legacyFormat, in order from the best match to worst.\n// For example, in a non-legacy file,\n// when given a repository key \"quay.io/repo/ns/image\", it returns\n// - quay.io/repo/ns/image\n// - quay.io/repo/ns\n// - quay.io/repo\n// - quay.io\nfunc authKeyLookupOrder(key, registry string, legacyFormat bool) iter.Seq[string] {\n\treturn func(yield func(string) bool) {\n\t\tif legacyFormat {\n\t\t\t_ = yield(registry) // We stop in any case\n\t\t\treturn\n\t\t}\n\n\t\tfor {\n\t\t\tif !yield(key) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tlastSlash := strings.LastIndex(key, \"/\")\n\t\t\tif lastSlash == -1 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tkey = key[:lastSlash]\n\t\t}\n\t}\n}\n\n// decodeDockerAuth decodes the username and password from conf,\n// which is entry key in path.\nfunc decodeDockerAuth(path, key string, conf dockerAuthConfig) (types.DockerAuthConfig, error) {\n\tdecoded, err := base64.StdEncoding.DecodeString(conf.Auth)\n\tif err != nil {\n\t\treturn types.DockerAuthConfig{}, err\n\t}\n\n\tuser, passwordPart, valid := strings.Cut(string(decoded), \":\")\n\tif !valid {\n\t\t// if it's invalid just skip, as docker does\n\t\tif len(decoded) > 0 { // Docker writes \"auths\": { \"$host\": {} } entries if a credential helper is used, don’t warn about those\n\t\t\tlogrus.Warnf(`Error parsing the \"auth\" field of a credential entry %q in %q, missing semicolon`, key, path) // Don’t include the text of decoded, because that might put secrets into a log.\n\t\t} else {\n\t\t\tlogrus.Debugf(\"Found an empty credential entry %q in %q (an unhandled credential helper marker?), moving on\", key, path)\n\t\t}\n\t\treturn types.DockerAuthConfig{}, nil\n\t}\n\n\tpassword := strings.Trim(passwordPart, \"\\x00\")\n\treturn types.DockerAuthConfig{\n\t\tUsername:      user,\n\t\tPassword:      password,\n\t\tIdentityToken: conf.IdentityToken,\n\t}, nil\n}\n\n// normalizeAuthFileKey takes a key, converts it to a host name and normalizes\n// the resulting registry.\nfunc normalizeAuthFileKey(key string, legacyFormat bool) string {\n\tstripped := strings.TrimPrefix(key, \"http://\")\n\tstripped = strings.TrimPrefix(stripped, \"https://\")\n\n\tif legacyFormat || stripped != key {\n\t\tstripped, _, _ = strings.Cut(stripped, \"/\")\n\t}\n\n\treturn normalizeRegistry(stripped)\n}\n\n// normalizeRegistry converts the provided registry if a known docker.io host\n// is provided.\nfunc normalizeRegistry(registry string) string {\n\tswitch registry {\n\tcase \"registry-1.docker.io\", \"docker.io\":\n\t\treturn \"index.docker.io\"\n\t}\n\treturn registry\n}\n\n// validateKey verifies that the input key does not have a prefix that is not\n// allowed and returns an indicator if the key is namespaced.\nfunc validateKey(key string) (bool, error) {\n\tif strings.HasPrefix(key, \"http://\") || strings.HasPrefix(key, \"https://\") {\n\t\treturn false, fmt.Errorf(\"key %s contains http[s]:// prefix\", key)\n\t}\n\n\t// Ideally this should only accept explicitly valid keys, compare\n\t// validateIdentityRemappingPrefix. For now, just reject values that look\n\t// like tagged or digested values.\n\tif strings.ContainsRune(key, '@') {\n\t\treturn false, fmt.Errorf(`key %s contains a '@' character`, key)\n\t}\n\n\tfirstSlash := strings.IndexRune(key, '/')\n\tisNamespaced := firstSlash != -1\n\t// Reject host/repo:tag, but allow localhost:5000 and localhost:5000/foo.\n\tif isNamespaced && strings.ContainsRune(key[firstSlash+1:], ':') {\n\t\treturn false, fmt.Errorf(`key %s contains a ':' character after host[:port]`, key)\n\t}\n\t// check if the provided key contains one or more subpaths.\n\treturn isNamespaced, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/strslice/README.md",
    "content": "This package was replicated from [github.com/docker/docker v17.04.0-ce](https://github.com/docker/docker/tree/v17.04.0-ce/api/types/strslice).\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/strslice/strslice.go",
    "content": "package strslice\n\nimport \"encoding/json\"\n\n// StrSlice represents a string or an array of strings.\n// We need to override the json decoder to accept both options.\ntype StrSlice []string\n\n// UnmarshalJSON decodes the byte slice whether it's a string or an array of\n// strings. This method is needed to implement json.Unmarshaler.\nfunc (e *StrSlice) UnmarshalJSON(b []byte) error {\n\tif len(b) == 0 {\n\t\t// With no input, we preserve the existing value by returning nil and\n\t\t// leaving the target alone. This allows defining default values for\n\t\t// the type.\n\t\treturn nil\n\t}\n\n\tp := make([]string, 0, 1)\n\tif err := json.Unmarshal(b, &p); err != nil {\n\t\tvar s string\n\t\tif err := json.Unmarshal(b, &s); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp = append(p, s)\n\t}\n\n\t*e = p\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/sysregistriesv2/paths_common.go",
    "content": "//go:build !freebsd\n\npackage sysregistriesv2\n\n// builtinRegistriesConfPath is the path to the registry configuration file.\n// DO NOT change this, instead see systemRegistriesConfPath above.\nconst builtinRegistriesConfPath = \"/etc/containers/registries.conf\"\n\n// builtinRegistriesConfDirPath is the path to the registry configuration directory.\n// DO NOT change this, instead see systemRegistriesConfDirectoryPath above.\nconst builtinRegistriesConfDirPath = \"/etc/containers/registries.conf.d\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/sysregistriesv2/paths_freebsd.go",
    "content": "//go:build freebsd\n\npackage sysregistriesv2\n\n// builtinRegistriesConfPath is the path to the registry configuration file.\n// DO NOT change this, instead see systemRegistriesConfPath above.\nconst builtinRegistriesConfPath = \"/usr/local/etc/containers/registries.conf\"\n\n// builtinRegistriesConfDirPath is the path to the registry configuration directory.\n// DO NOT change this, instead see systemRegistriesConfDirectoryPath above.\nconst builtinRegistriesConfDirPath = \"/usr/local/etc/containers/registries.conf.d\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/sysregistriesv2/shortnames.go",
    "content": "package sysregistriesv2\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.com/BurntSushi/toml\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/internal/rootless\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"go.podman.io/storage/pkg/lockfile\"\n)\n\n// defaultShortNameMode is the default mode of registries.conf files if the\n// corresponding field is left empty.\nconst defaultShortNameMode = types.ShortNameModePermissive\n\n// userShortNamesFile is the user-specific config file to store aliases.\nvar userShortNamesFile = filepath.FromSlash(\"containers/short-name-aliases.conf\")\n\n// shortNameAliasesConfPath returns the path to the machine-generated\n// short-name-aliases.conf file.\nfunc shortNameAliasesConfPath(ctx *types.SystemContext) (string, error) {\n\tif ctx != nil && len(ctx.UserShortNameAliasConfPath) > 0 {\n\t\treturn ctx.UserShortNameAliasConfPath, nil\n\t}\n\n\tif rootless.GetRootlessEUID() == 0 {\n\t\t// Root user or in a non-conforming user NS\n\t\treturn filepath.Join(\"/var/cache\", userShortNamesFile), nil\n\t}\n\n\t// Rootless user\n\tcacheRoot, err := homedir.GetCacheHome()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn filepath.Join(cacheRoot, userShortNamesFile), nil\n}\n\n// shortNameAliasConf is a subset of the `V2RegistriesConf` format.  It's used in the\n// software-maintained `userShortNamesFile`.\ntype shortNameAliasConf struct {\n\t// A map for aliasing short names to their fully-qualified image\n\t// reference counter parts.\n\t// Note that Aliases is niled after being loaded from a file.\n\tAliases map[string]string `toml:\"aliases\"`\n\n\t// If you add any field, make sure to update nonempty() below.\n}\n\n// nonempty returns true if config contains at least one configuration entry.\nfunc (c *shortNameAliasConf) nonempty() bool {\n\tcopy := *c // A shallow copy\n\tif copy.Aliases != nil && len(copy.Aliases) == 0 {\n\t\tcopy.Aliases = nil\n\t}\n\treturn !reflect.DeepEqual(copy, shortNameAliasConf{})\n}\n\n// alias combines the parsed value of an alias with the config file it has been\n// specified in.  The config file is crucial for an improved user experience\n// such that users are able to resolve potential pull errors.\ntype alias struct {\n\t// The parsed value of an alias.  May be nil if set to \"\" in a config.\n\tvalue reference.Named\n\t// The config file the alias originates from.\n\tconfigOrigin string\n}\n\n// shortNameAliasCache is the result of parsing shortNameAliasConf,\n// pre-processed for faster usage.\ntype shortNameAliasCache struct {\n\t// Note that an alias value may be nil iff it's set as an empty string\n\t// in the config.\n\tnamedAliases map[string]alias\n}\n\n// ResolveShortNameAlias performs an alias resolution of the specified name.\n// The user-specific short-name-aliases.conf has precedence over aliases in the\n// assembled registries.conf.  It returns the possibly resolved alias or nil, a\n// human-readable description of the config where the alias is specified, and\n// an error. The origin of the config file is crucial for an improved user\n// experience such that users are able to resolve potential pull errors.\n// Almost all callers should use pkg/shortnames instead.\n//\n// Note that it’s the caller’s responsibility to pass only a repository\n// (reference.IsNameOnly) as the short name.\nfunc ResolveShortNameAlias(ctx *types.SystemContext, name string) (reference.Named, string, error) {\n\tif err := validateShortName(name); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tconfPath, lock, err := shortNameAliasesConfPathAndLock(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\t// Acquire the lock as a reader to allow for multiple routines in the\n\t// same process space to read simultaneously.\n\tlock.RLock()\n\tdefer lock.Unlock()\n\n\t_, aliasCache, err := loadShortNameAliasConf(confPath)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\t// First look up the short-name-aliases.conf.  Note that a value may be\n\t// nil iff it's set as an empty string in the config.\n\talias, resolved := aliasCache.namedAliases[name]\n\tif resolved {\n\t\treturn alias.value, alias.configOrigin, nil\n\t}\n\n\tconfig, err := getConfig(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\talias, resolved = config.aliasCache.namedAliases[name]\n\tif resolved {\n\t\treturn alias.value, alias.configOrigin, nil\n\t}\n\treturn nil, \"\", nil\n}\n\n// editShortNameAlias loads the aliases.conf file and changes it. If value is\n// set, it adds the name-value pair as a new alias. Otherwise, it will remove\n// name from the config.\nfunc editShortNameAlias(ctx *types.SystemContext, name string, value *string) (retErr error) {\n\tif err := validateShortName(name); err != nil {\n\t\treturn err\n\t}\n\tif value != nil {\n\t\tif _, err := parseShortNameValue(*value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tconfPath, lock, err := shortNameAliasesConfPathAndLock(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Acquire the lock as a writer to prevent data corruption.\n\tlock.Lock()\n\tdefer lock.Unlock()\n\n\t// Load the short-name-alias.conf, add the specified name-value pair,\n\t// and write it back to the file.\n\tconf, _, err := loadShortNameAliasConf(confPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif conf.Aliases == nil { // Ensure we have a map to update.\n\t\tconf.Aliases = make(map[string]string)\n\t}\n\tif value != nil {\n\t\tconf.Aliases[name] = *value\n\t} else {\n\t\t// If the name does not exist, throw an error.\n\t\tif _, exists := conf.Aliases[name]; !exists {\n\t\t\treturn fmt.Errorf(\"short-name alias %q not found in %q: please check registries.conf files\", name, confPath)\n\t\t}\n\n\t\tdelete(conf.Aliases, name)\n\t}\n\n\tf, err := os.OpenFile(confPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// since we are writing to this file, make sure we handle err on Close()\n\tdefer func() {\n\t\tcloseErr := f.Close()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\tencoder := toml.NewEncoder(f)\n\treturn encoder.Encode(conf)\n}\n\n// AddShortNameAlias adds the specified name-value pair as a new alias to the\n// user-specific aliases.conf.  It may override an existing alias for `name`.\n//\n// Note that it’s the caller’s responsibility to pass only a repository\n// (reference.IsNameOnly) as the short name.\nfunc AddShortNameAlias(ctx *types.SystemContext, name string, value string) error {\n\treturn editShortNameAlias(ctx, name, &value)\n}\n\n// RemoveShortNameAlias clears the alias for the specified name.  It throws an\n// error in case name does not exist in the machine-generated\n// short-name-alias.conf.  In such case, the alias must be specified in one of\n// the registries.conf files, which is the users' responsibility.\n//\n// Note that it’s the caller’s responsibility to pass only a repository\n// (reference.IsNameOnly) as the short name.\nfunc RemoveShortNameAlias(ctx *types.SystemContext, name string) error {\n\treturn editShortNameAlias(ctx, name, nil)\n}\n\n// parseShortNameValue parses the specified alias into a reference.Named.  The alias is\n// expected to not be tagged or carry a digest and *must* include a\n// domain/registry.\n//\n// Note that the returned reference is always normalized.\nfunc parseShortNameValue(alias string) (reference.Named, error) {\n\tref, err := reference.Parse(alias)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing alias %q: %w\", alias, err)\n\t}\n\n\tif _, ok := ref.(reference.Digested); ok {\n\t\treturn nil, fmt.Errorf(\"invalid alias %q: must not contain digest\", alias)\n\t}\n\n\tif _, ok := ref.(reference.Tagged); ok {\n\t\treturn nil, fmt.Errorf(\"invalid alias %q: must not contain tag\", alias)\n\t}\n\n\tnamed, ok := ref.(reference.Named)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"invalid alias %q: must contain registry and repository\", alias)\n\t}\n\n\tregistry := reference.Domain(named)\n\tif !strings.ContainsAny(registry, \".:\") && registry != \"localhost\" {\n\t\treturn nil, fmt.Errorf(\"invalid alias %q: must contain registry and repository\", alias)\n\t}\n\n\t// A final parse to make sure that docker.io references are correctly\n\t// normalized (e.g., docker.io/alpine to docker.io/library/alpine.\n\tnamed, err = reference.ParseNormalizedNamed(alias)\n\treturn named, err\n}\n\n// validateShortName parses the specified `name` of an alias (i.e., the left-hand\n// side) and checks if it's a short name and does not include a tag or digest.\nfunc validateShortName(name string) error {\n\trepo, err := reference.Parse(name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot parse short name: %q: %w\", name, err)\n\t}\n\n\tif _, ok := repo.(reference.Digested); ok {\n\t\treturn fmt.Errorf(\"invalid short name %q: must not contain digest\", name)\n\t}\n\n\tif _, ok := repo.(reference.Tagged); ok {\n\t\treturn fmt.Errorf(\"invalid short name %q: must not contain tag\", name)\n\t}\n\n\tnamed, ok := repo.(reference.Named)\n\tif !ok {\n\t\treturn fmt.Errorf(\"invalid short name %q: no name\", name)\n\t}\n\n\tregistry := reference.Domain(named)\n\tif strings.ContainsAny(registry, \".:\") || registry == \"localhost\" {\n\t\treturn fmt.Errorf(\"invalid short name %q: must not contain registry\", name)\n\t}\n\treturn nil\n}\n\n// newShortNameAliasCache parses shortNameAliasConf and returns the corresponding internal\n// representation.\nfunc newShortNameAliasCache(path string, conf *shortNameAliasConf) (*shortNameAliasCache, error) {\n\tres := shortNameAliasCache{\n\t\tnamedAliases: make(map[string]alias),\n\t}\n\terrs := []error{}\n\tfor name, value := range conf.Aliases {\n\t\tif err := validateShortName(name); err != nil {\n\t\t\terrs = append(errs, err)\n\t\t}\n\n\t\t// Empty right-hand side values in config files allow to reset\n\t\t// an alias in a previously loaded config. This way, drop-in\n\t\t// config files from registries.conf.d can reset potentially\n\t\t// malconfigured aliases.\n\t\tif value == \"\" {\n\t\t\tres.namedAliases[name] = alias{nil, path}\n\t\t\tcontinue\n\t\t}\n\n\t\tnamed, err := parseShortNameValue(value)\n\t\tif err != nil {\n\t\t\t// We want to report *all* malformed entries to avoid a\n\t\t\t// whack-a-mole for the user.\n\t\t\terrs = append(errs, err)\n\t\t} else {\n\t\t\tres.namedAliases[name] = alias{named, path}\n\t\t}\n\t}\n\tif len(errs) > 0 {\n\t\treturn nil, multierr.Format(\"\", \"\\n\", \"\", errs)\n\t}\n\treturn &res, nil\n}\n\n// updateWithConfigurationFrom updates c with configuration from updates.\n// In case of conflict, updates is preferred.\nfunc (c *shortNameAliasCache) updateWithConfigurationFrom(updates *shortNameAliasCache) {\n\tmaps.Copy(c.namedAliases, updates.namedAliases)\n}\n\nfunc loadShortNameAliasConf(confPath string) (*shortNameAliasConf, *shortNameAliasCache, error) {\n\tconf := shortNameAliasConf{}\n\n\tmeta, err := toml.DecodeFile(confPath, &conf)\n\tif err != nil && !os.IsNotExist(err) {\n\t\t// It's okay if the config doesn't exist.  Other errors are not.\n\t\treturn nil, nil, fmt.Errorf(\"loading short-name aliases config file %q: %w\", confPath, err)\n\t}\n\tif keys := meta.Undecoded(); len(keys) > 0 {\n\t\tlogrus.Debugf(\"Failed to decode keys %q from %q\", keys, confPath)\n\t}\n\n\t// Even if we don’t always need the cache, doing so validates the machine-generated config.  The\n\t// file could still be corrupted by another process or user.\n\tcache, err := newShortNameAliasCache(confPath, &conf)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"loading short-name aliases config file %q: %w\", confPath, err)\n\t}\n\n\treturn &conf, cache, nil\n}\n\nfunc shortNameAliasesConfPathAndLock(ctx *types.SystemContext) (string, *lockfile.LockFile, error) {\n\tshortNameAliasesConfPath, err := shortNameAliasesConfPath(ctx)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\t// Make sure the path to file exists.\n\tif err := os.MkdirAll(filepath.Dir(shortNameAliasesConfPath), 0o700); err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\tlockPath := shortNameAliasesConfPath + \".lock\"\n\tlocker, err := lockfile.GetLockFile(lockPath)\n\treturn shortNameAliasesConfPath, locker, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/sysregistriesv2/system_registries_v2.go",
    "content": "package sysregistriesv2\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/BurntSushi/toml\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// systemRegistriesConfPath is the path to the system-wide registry\n// configuration file and is used to add/subtract potential registries for\n// obtaining images.  You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/sysregistries.systemRegistriesConfPath=$your_path'\nvar systemRegistriesConfPath = builtinRegistriesConfPath\n\n// systemRegistriesConfDirPath is the path to the system-wide registry\n// configuration directory and is used to add/subtract potential registries for\n// obtaining images.  You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/sysregistries.systemRegistriesConfDirectoryPath=$your_path'\nvar systemRegistriesConfDirPath = builtinRegistriesConfDirPath\n\n// AuthenticationFileHelper is a special key for credential helpers indicating\n// the usage of consulting containers-auth.json files instead of a credential\n// helper.\nconst AuthenticationFileHelper = \"containers-auth.json\"\n\nconst (\n\t// configuration values for \"pull-from-mirror\"\n\t// mirrors will be used for both digest pulls and tag pulls\n\tMirrorAll = \"all\"\n\t// mirrors will only be used for digest pulls\n\tMirrorByDigestOnly = \"digest-only\"\n\t// mirrors will only be used for tag pulls\n\tMirrorByTagOnly = \"tag-only\"\n)\n\n// Endpoint describes a remote location of a registry.\ntype Endpoint struct {\n\t// The endpoint's remote location. Can be empty iff Prefix contains\n\t// wildcard in the format: \"*.example.com\" for subdomain matching.\n\t// Please refer to FindRegistry / PullSourcesFromReference instead\n\t// of accessing/interpreting `Location` directly.\n\tLocation string `toml:\"location,omitempty\"`\n\t// If true, certs verification will be skipped and HTTP (non-TLS)\n\t// connections will be allowed.\n\tInsecure bool `toml:\"insecure,omitempty\"`\n\t// PullFromMirror is used for adding restrictions to image pull through the mirror.\n\t// Set to \"all\", \"digest-only\", or \"tag-only\".\n\t// If \"digest-only\"， mirrors will only be used for digest pulls. Pulling images by\n\t// tag can potentially yield different images, depending on which endpoint\n\t// we pull from.  Restricting mirrors to pulls by digest avoids that issue.\n\t// If \"tag-only\", mirrors will only be used for tag pulls.  For a more up-to-date and expensive mirror\n\t// that it is less likely to be out of sync if tags move, it should not be unnecessarily\n\t// used for digest references.\n\t// Default is \"all\" (or left empty), mirrors will be used for both digest pulls and tag pulls unless the mirror-by-digest-only is set for the primary registry.\n\t// This can only be set in a registry's Mirror field, not in the registry's primary Endpoint.\n\t// This per-mirror setting is allowed only when mirror-by-digest-only is not configured for the primary registry.\n\tPullFromMirror string `toml:\"pull-from-mirror,omitempty\"`\n}\n\n// userRegistriesFile is the path to the per user registry configuration file.\nvar userRegistriesFile = filepath.FromSlash(\".config/containers/registries.conf\")\n\n// userRegistriesDir is the path to the per user registry configuration file.\nvar userRegistriesDir = filepath.FromSlash(\".config/containers/registries.conf.d\")\n\n// rewriteReference will substitute the provided reference `prefix` to the\n// endpoints `location` from the `ref` and creates a new named reference from it.\n// The function errors if the newly created reference is not parsable.\nfunc (e *Endpoint) rewriteReference(ref reference.Named, prefix string) (reference.Named, error) {\n\trefString := ref.String()\n\tvar newNamedRef string\n\t// refMatchingPrefix returns the length of the match. Everything that\n\t// follows the match gets appended to registries location.\n\tprefixLen := refMatchingPrefix(refString, prefix)\n\tif prefixLen == -1 {\n\t\treturn nil, fmt.Errorf(\"invalid prefix '%v' for reference '%v'\", prefix, refString)\n\t}\n\t// In the case of an empty `location` field, simply return the original\n\t// input ref as-is.\n\t//\n\t// FIXME: already validated in postProcessRegistries, so check can probably\n\t// be dropped.\n\t// https://github.com/containers/image/pull/1191#discussion_r610621608\n\tif e.Location == \"\" {\n\t\tif !strings.HasPrefix(prefix, \"*.\") {\n\t\t\treturn nil, fmt.Errorf(\"invalid prefix '%v' for empty location, should be in the format: *.example.com\", prefix)\n\t\t}\n\t\treturn ref, nil\n\t}\n\tnewNamedRef = e.Location + refString[prefixLen:]\n\tnewParsedRef, err := reference.ParseNamed(newNamedRef)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"rewriting reference: %w\", err)\n\t}\n\n\treturn newParsedRef, nil\n}\n\n// Registry represents a registry.\ntype Registry struct {\n\t// Prefix is used for matching images, and to translate one namespace to\n\t// another.  If `Prefix=\"example.com/bar\"`, `location=\"example.com/foo/bar\"`\n\t// and we pull from \"example.com/bar/myimage:latest\", the image will\n\t// effectively be pulled from \"example.com/foo/bar/myimage:latest\".\n\t// If no Prefix is specified, it defaults to the specified location.\n\t// Prefix can also be in the format: \"*.example.com\" for matching\n\t// subdomains. The wildcard should only be in the beginning and should also\n\t// not contain any namespaces or special characters: \"/\", \"@\" or \":\".\n\t// Please refer to FindRegistry / PullSourcesFromReference instead\n\t// of accessing/interpreting `Prefix` directly.\n\tPrefix string `toml:\"prefix\"`\n\t// A registry is an Endpoint too\n\tEndpoint\n\t// The registry's mirrors.\n\tMirrors []Endpoint `toml:\"mirror,omitempty\"`\n\t// If true, pulling from the registry will be blocked.\n\tBlocked bool `toml:\"blocked,omitempty\"`\n\t// If true, mirrors will only be used for digest pulls. Pulling images by\n\t// tag can potentially yield different images, depending on which endpoint\n\t// we pull from.  Restricting mirrors to pulls by digest avoids that issue.\n\tMirrorByDigestOnly bool `toml:\"mirror-by-digest-only,omitempty\"`\n}\n\n// PullSource consists of an Endpoint and a Reference. Note that the reference is\n// rewritten according to the registries prefix and the Endpoint's location.\ntype PullSource struct {\n\tEndpoint  Endpoint\n\tReference reference.Named\n}\n\n// PullSourcesFromReference returns a slice of PullSource's based on the passed\n// reference.\nfunc (r *Registry) PullSourcesFromReference(ref reference.Named) ([]PullSource, error) {\n\tvar endpoints []Endpoint\n\t_, isDigested := ref.(reference.Canonical)\n\tif r.MirrorByDigestOnly {\n\t\t// Only use mirrors when the reference is a digested one.\n\t\tif isDigested {\n\t\t\tendpoints = append(endpoints, r.Mirrors...)\n\t\t}\n\t} else {\n\t\tfor _, mirror := range r.Mirrors {\n\t\t\t// skip the mirror if per mirror setting exists but reference does not match the restriction\n\t\t\tswitch mirror.PullFromMirror {\n\t\t\tcase MirrorByDigestOnly:\n\t\t\t\tif !isDigested {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\tcase MirrorByTagOnly:\n\t\t\t\tif isDigested {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tendpoints = append(endpoints, mirror)\n\t\t}\n\t}\n\tendpoints = append(endpoints, r.Endpoint)\n\n\tsources := []PullSource{}\n\tfor _, ep := range endpoints {\n\t\trewritten, err := ep.rewriteReference(ref, r.Prefix)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsources = append(sources, PullSource{Endpoint: ep, Reference: rewritten})\n\t}\n\n\treturn sources, nil\n}\n\n// V1TOMLregistries is for backwards compatibility to sysregistries v1\ntype V1TOMLregistries struct {\n\tRegistries []string `toml:\"registries\"`\n}\n\n// V1TOMLConfig is for backwards compatibility to sysregistries v1\ntype V1TOMLConfig struct {\n\tSearch   V1TOMLregistries `toml:\"search\"`\n\tInsecure V1TOMLregistries `toml:\"insecure\"`\n\tBlock    V1TOMLregistries `toml:\"block\"`\n}\n\n// V1RegistriesConf is the sysregistries v1 configuration format.\ntype V1RegistriesConf struct {\n\tV1TOMLConfig `toml:\"registries\"`\n}\n\n// Nonempty returns true if config contains at least one configuration entry.\n// Empty arrays are treated as missing entries.\nfunc (config *V1RegistriesConf) Nonempty() bool {\n\tcopy := *config // A shallow copy\n\tif copy.V1TOMLConfig.Search.Registries != nil && len(copy.V1TOMLConfig.Search.Registries) == 0 {\n\t\tcopy.V1TOMLConfig.Search.Registries = nil\n\t}\n\tif copy.V1TOMLConfig.Insecure.Registries != nil && len(copy.V1TOMLConfig.Insecure.Registries) == 0 {\n\t\tcopy.V1TOMLConfig.Insecure.Registries = nil\n\t}\n\tif copy.V1TOMLConfig.Block.Registries != nil && len(copy.V1TOMLConfig.Block.Registries) == 0 {\n\t\tcopy.V1TOMLConfig.Block.Registries = nil\n\t}\n\treturn copy.hasSetField()\n}\n\n// hasSetField returns true if config contains at least one configuration entry.\n// This is useful because of a subtlety of the behavior of the TOML decoder, where a missing array field\n// is not modified while unmarshaling (in our case remains to nil), while an [] is unmarshaled\n// as a non-nil []string{}.\nfunc (config *V1RegistriesConf) hasSetField() bool {\n\treturn !reflect.DeepEqual(*config, V1RegistriesConf{})\n}\n\n// V2RegistriesConf is the sysregistries v2 configuration format.\ntype V2RegistriesConf struct {\n\tRegistries []Registry `toml:\"registry\"`\n\t// An array of host[:port] (not prefix!) entries to use for resolving unqualified image references\n\tUnqualifiedSearchRegistries []string `toml:\"unqualified-search-registries\"`\n\t// An array of global credential helpers to use for authentication\n\t// (e.g., [\"pass\", \"secretservice\"]).  The helpers are consulted in the\n\t// specified order.  Note that \"containers-auth.json\" is a reserved\n\t// value for consulting auth files as specified in\n\t// containers-auth.json(5).\n\t//\n\t// If empty, CredentialHelpers defaults to  [\"containers-auth.json\"].\n\tCredentialHelpers []string `toml:\"credential-helpers\"`\n\n\t// ShortNameMode defines how short-name resolution should be handled by\n\t// _consumers_ of this package.  Depending on the mode, the user should\n\t// be prompted with a choice of using one of the unqualified-search\n\t// registries when referring to a short name.\n\t//\n\t// Valid modes are: * \"prompt\": prompt if stdout is a TTY, otherwise\n\t// use all unqualified-search registries * \"enforcing\": always prompt\n\t// and error if stdout is not a TTY * \"disabled\": do not prompt and\n\t// potentially use all unqualified-search registries\n\tShortNameMode string `toml:\"short-name-mode\"`\n\n\t// AdditionalLayerStoreAuthHelper is a helper binary that receives\n\t// registry credentials pass them to Additional Layer Store for\n\t// registry authentication. These credentials are only collected when pulling (not pushing).\n\tAdditionalLayerStoreAuthHelper string `toml:\"additional-layer-store-auth-helper\"`\n\n\tshortNameAliasConf\n\n\t// If you add any field, make sure to update Nonempty() below.\n}\n\n// Nonempty returns true if config contains at least one configuration entry.\nfunc (config *V2RegistriesConf) Nonempty() bool {\n\tcopy := *config // A shallow copy\n\tif copy.Registries != nil && len(copy.Registries) == 0 {\n\t\tcopy.Registries = nil\n\t}\n\tif copy.UnqualifiedSearchRegistries != nil && len(copy.UnqualifiedSearchRegistries) == 0 {\n\t\tcopy.UnqualifiedSearchRegistries = nil\n\t}\n\tif copy.CredentialHelpers != nil && len(copy.CredentialHelpers) == 0 {\n\t\tcopy.CredentialHelpers = nil\n\t}\n\tif !copy.shortNameAliasConf.nonempty() {\n\t\tcopy.shortNameAliasConf = shortNameAliasConf{}\n\t}\n\treturn copy.hasSetField()\n}\n\n// hasSetField returns true if config contains at least one configuration entry.\n// This is useful because of a subtlety of the behavior of the TOML decoder, where a missing array field\n// is not modified while unmarshaling (in our case remains to nil), while an [] is unmarshaled\n// as a non-nil []string{}.\nfunc (config *V2RegistriesConf) hasSetField() bool {\n\treturn !reflect.DeepEqual(*config, V2RegistriesConf{})\n}\n\n// parsedConfig is the result of parsing, and possibly merging, configuration files;\n// it is the boundary between the process of reading+ingesting the files, and\n// later interpreting the configuration based on caller’s requests.\ntype parsedConfig struct {\n\t// NOTE: Update also parsedConfig.updateWithConfigurationFrom!\n\n\t// partialV2 must continue to exist to maintain the return value of TryUpdatingCache\n\t// for compatibility with existing callers.\n\t// We store the authoritative Registries and UnqualifiedSearchRegistries values there as well.\n\tpartialV2 V2RegistriesConf\n\t// Absolute path to the configuration file that set the UnqualifiedSearchRegistries.\n\tunqualifiedSearchRegistriesOrigin string\n\t// Result of parsing of partialV2.ShortNameMode.\n\t// NOTE: May be ShortNameModeInvalid to represent ShortNameMode == \"\" in intermediate values;\n\t// the full configuration in configCache / getConfig() always contains a valid value.\n\tshortNameMode types.ShortNameMode\n\taliasCache    *shortNameAliasCache\n}\n\n// InvalidRegistries represents an invalid registry configurations.  An example\n// is when \"registry.com\" is defined multiple times in the configuration but\n// with conflicting security settings.\ntype InvalidRegistries struct {\n\ts string\n}\n\n// Error returns the error string.\nfunc (e *InvalidRegistries) Error() string {\n\treturn e.s\n}\n\n// parseLocation parses the input string, performs some sanity checks and returns\n// the sanitized input string.  An error is returned if the input string is\n// empty or if contains an \"http{s,}://\" prefix.\nfunc parseLocation(input string) (string, error) {\n\ttrimmed := strings.TrimRight(input, \"/\")\n\n\t// FIXME: This check needs to exist but fails for empty Location field with\n\t// wildcarded prefix. Removal of this check \"only\" allows invalid input in,\n\t// and does not prevent correct operation.\n\t// https://github.com/containers/image/pull/1191#discussion_r610122617\n\t//\n\t//\tif trimmed == \"\" {\n\t//\t\treturn \"\", &InvalidRegistries{s: \"invalid location: cannot be empty\"}\n\t//\t}\n\t//\n\n\tif strings.HasPrefix(trimmed, \"http://\") || strings.HasPrefix(trimmed, \"https://\") {\n\t\tmsg := fmt.Sprintf(\"invalid location '%s': URI schemes are not supported\", input)\n\t\treturn \"\", &InvalidRegistries{s: msg}\n\t}\n\n\treturn trimmed, nil\n}\n\n// ConvertToV2 returns a v2 config corresponding to a v1 one.\nfunc (config *V1RegistriesConf) ConvertToV2() (*V2RegistriesConf, error) {\n\tregMap := make(map[string]*Registry)\n\t// The order of the registries is not really important, but make it deterministic (the same for the same config file)\n\t// to minimize behavior inconsistency and not contribute to difficult-to-reproduce situations.\n\tregistryOrder := []string{}\n\n\tgetRegistry := func(location string) (*Registry, error) { // Note: _pointer_ to a long-lived object\n\t\tvar err error\n\t\tlocation, err = parseLocation(location)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treg, exists := regMap[location]\n\t\tif !exists {\n\t\t\treg = &Registry{\n\t\t\t\tEndpoint: Endpoint{Location: location},\n\t\t\t\tMirrors:  []Endpoint{},\n\t\t\t\tPrefix:   location,\n\t\t\t}\n\t\t\tregMap[location] = reg\n\t\t\tregistryOrder = append(registryOrder, location)\n\t\t}\n\t\treturn reg, nil\n\t}\n\n\tfor _, blocked := range config.V1TOMLConfig.Block.Registries {\n\t\treg, err := getRegistry(blocked)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treg.Blocked = true\n\t}\n\tfor _, insecure := range config.V1TOMLConfig.Insecure.Registries {\n\t\treg, err := getRegistry(insecure)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treg.Insecure = true\n\t}\n\n\tres := &V2RegistriesConf{\n\t\tUnqualifiedSearchRegistries: config.V1TOMLConfig.Search.Registries,\n\t}\n\tfor _, location := range registryOrder {\n\t\treg := regMap[location]\n\t\tres.Registries = append(res.Registries, *reg)\n\t}\n\treturn res, nil\n}\n\n// anchoredDomainRegexp is an internal implementation detail of postProcess, defining the valid values of elements of UnqualifiedSearchRegistries.\nvar anchoredDomainRegexp = regexp.Delayed(\"^\" + reference.DomainRegexp.String() + \"$\")\n\n// postProcess checks the consistency of all the configuration, looks for conflicts,\n// and normalizes the configuration (e.g., sets the Prefix to Location if not set).\nfunc (config *V2RegistriesConf) postProcessRegistries() error {\n\tregMap := make(map[string][]*Registry)\n\n\tfor i := range config.Registries {\n\t\treg := &config.Registries[i]\n\t\t// make sure Location and Prefix are valid\n\t\tvar err error\n\t\treg.Location, err = parseLocation(reg.Location)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif reg.Prefix == \"\" {\n\t\t\tif reg.Location == \"\" {\n\t\t\t\treturn &InvalidRegistries{s: \"invalid condition: both location and prefix are unset\"}\n\t\t\t}\n\t\t\treg.Prefix = reg.Location\n\t\t} else {\n\t\t\treg.Prefix, err = parseLocation(reg.Prefix)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// FIXME: allow config authors to always use Prefix.\n\t\t\t// https://github.com/containers/image/pull/1191#discussion_r610622495\n\t\t\tif !strings.HasPrefix(reg.Prefix, \"*.\") && reg.Location == \"\" {\n\t\t\t\treturn &InvalidRegistries{s: \"invalid condition: location is unset and prefix is not in the format: *.example.com\"}\n\t\t\t}\n\t\t}\n\n\t\t// validate the mirror usage settings does not apply to primary registry\n\t\tif reg.PullFromMirror != \"\" {\n\t\t\treturn fmt.Errorf(\"pull-from-mirror must not be set for a non-mirror registry %q\", reg.Prefix)\n\t\t}\n\t\t// make sure mirrors are valid\n\t\tfor j := range reg.Mirrors {\n\t\t\tmir := &reg.Mirrors[j]\n\t\t\tmir.Location, err = parseLocation(mir.Location)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\t// FIXME: unqualifiedSearchRegistries now also accepts empty values\n\t\t\t// and shouldn't\n\t\t\t// https://github.com/containers/image/pull/1191#discussion_r610623216\n\t\t\tif mir.Location == \"\" {\n\t\t\t\treturn &InvalidRegistries{s: \"invalid condition: mirror location is unset\"}\n\t\t\t}\n\n\t\t\tif reg.MirrorByDigestOnly && mir.PullFromMirror != \"\" {\n\t\t\t\treturn &InvalidRegistries{s: fmt.Sprintf(\"cannot set mirror usage mirror-by-digest-only for the registry (%q) and pull-from-mirror for per-mirror (%q) at the same time\", reg.Prefix, mir.Location)}\n\t\t\t}\n\t\t\tif mir.PullFromMirror != \"\" && mir.PullFromMirror != MirrorAll &&\n\t\t\t\tmir.PullFromMirror != MirrorByDigestOnly && mir.PullFromMirror != MirrorByTagOnly {\n\t\t\t\treturn &InvalidRegistries{s: fmt.Sprintf(\"unsupported pull-from-mirror value %q for mirror %q\", mir.PullFromMirror, mir.Location)}\n\t\t\t}\n\t\t}\n\t\tif reg.Location == \"\" {\n\t\t\tregMap[reg.Prefix] = append(regMap[reg.Prefix], reg)\n\t\t} else {\n\t\t\tregMap[reg.Location] = append(regMap[reg.Location], reg)\n\t\t}\n\t}\n\n\t// Given a registry can be mentioned multiple times (e.g., to have\n\t// multiple prefixes backed by different mirrors), we need to make sure\n\t// there are no conflicts among them.\n\t//\n\t// Note: we need to iterate over the registries array to ensure a\n\t// deterministic behavior which is not guaranteed by maps.\n\tfor _, reg := range config.Registries {\n\t\tvar others []*Registry\n\t\tvar ok bool\n\t\tif reg.Location == \"\" {\n\t\t\tothers, ok = regMap[reg.Prefix]\n\t\t} else {\n\t\t\tothers, ok = regMap[reg.Location]\n\t\t}\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"Internal error in V2RegistriesConf.PostProcess: entry in regMap is missing\")\n\t\t}\n\t\tfor _, other := range others {\n\t\t\tif reg.Insecure != other.Insecure {\n\t\t\t\tmsg := fmt.Sprintf(\"registry '%s' is defined multiple times with conflicting 'insecure' setting\", reg.Location)\n\t\t\t\treturn &InvalidRegistries{s: msg}\n\t\t\t}\n\n\t\t\tif reg.Blocked != other.Blocked {\n\t\t\t\tmsg := fmt.Sprintf(\"registry '%s' is defined multiple times with conflicting 'blocked' setting\", reg.Location)\n\t\t\t\treturn &InvalidRegistries{s: msg}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor i := range config.UnqualifiedSearchRegistries {\n\t\tregistry, err := parseLocation(config.UnqualifiedSearchRegistries[i])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !anchoredDomainRegexp.MatchString(registry) {\n\t\t\treturn &InvalidRegistries{fmt.Sprintf(\"Invalid unqualified-search-registries entry %#v\", registry)}\n\t\t}\n\t\tconfig.UnqualifiedSearchRegistries[i] = registry\n\t}\n\n\t// Registries are ordered and the first longest prefix always wins,\n\t// rendering later items with the same prefix non-existent. We cannot error\n\t// out anymore as this might break existing users, so let's just ignore them\n\t// to guarantee that the same prefix exists only once.\n\t//\n\t// As a side effect of parsedConfig.updateWithConfigurationFrom, the Registries slice\n\t// is always sorted. To be consistent in situations where it is not called (no drop-ins),\n\t// sort it here as well.\n\tprefixes := []string{}\n\tuniqueRegistries := make(map[string]Registry)\n\tfor i := range config.Registries {\n\t\t// TODO: should we warn if we see the same prefix being used multiple times?\n\t\tprefix := config.Registries[i].Prefix\n\t\tif _, exists := uniqueRegistries[prefix]; !exists {\n\t\t\tuniqueRegistries[prefix] = config.Registries[i]\n\t\t\tprefixes = append(prefixes, prefix)\n\t\t}\n\t}\n\tsort.Strings(prefixes)\n\tconfig.Registries = []Registry{}\n\tfor _, prefix := range prefixes {\n\t\tconfig.Registries = append(config.Registries, uniqueRegistries[prefix])\n\t}\n\n\treturn nil\n}\n\n// ConfigPath returns the path to the system-wide registry configuration file.\n//\n// Deprecated: This API implies configuration is read from files, and that there is only one.\n// Please use ConfigurationSourceDescription to obtain a string usable for error messages.\nfunc ConfigPath(ctx *types.SystemContext) string {\n\treturn newConfigWrapper(ctx).configPath\n}\n\n// ConfigDirPath returns the path to the directory for drop-in\n// registry configuration files.\n//\n// Deprecated: This API implies configuration is read from directories, and that there is only one.\n// Please use ConfigurationSourceDescription to obtain a string usable for error messages.\nfunc ConfigDirPath(ctx *types.SystemContext) string {\n\tconfigWrapper := newConfigWrapper(ctx)\n\tif configWrapper.userConfigDirPath != \"\" {\n\t\treturn configWrapper.userConfigDirPath\n\t}\n\treturn configWrapper.configDirPath\n}\n\n// configWrapper is used to store the paths from ConfigPath and ConfigDirPath\n// and acts as a key to the internal cache.\ntype configWrapper struct {\n\t// path to the registries.conf file\n\tconfigPath string\n\t// path to system-wide registries.conf.d directory, or \"\" if not used\n\tconfigDirPath string\n\t// path to user specified registries.conf.d directory, or \"\" if not used\n\tuserConfigDirPath string\n}\n\n// newConfigWrapper returns a configWrapper for the specified SystemContext.\nfunc newConfigWrapper(ctx *types.SystemContext) configWrapper {\n\treturn newConfigWrapperWithHomeDir(ctx, homedir.Get())\n}\n\n// newConfigWrapperWithHomeDir is an internal implementation detail of newConfigWrapper,\n// it exists only to allow testing it with an artificial home directory.\nfunc newConfigWrapperWithHomeDir(ctx *types.SystemContext, homeDir string) configWrapper {\n\tvar wrapper configWrapper\n\tuserRegistriesFilePath := filepath.Join(homeDir, userRegistriesFile)\n\tuserRegistriesDirPath := filepath.Join(homeDir, userRegistriesDir)\n\n\t// decide configPath using per-user path or system file\n\tif ctx != nil && ctx.SystemRegistriesConfPath != \"\" {\n\t\twrapper.configPath = ctx.SystemRegistriesConfPath\n\t} else if err := fileutils.Exists(userRegistriesFilePath); err == nil {\n\t\t// per-user registries.conf exists, not reading system dir\n\t\t// return config dirs from ctx or per-user one\n\t\twrapper.configPath = userRegistriesFilePath\n\t\tif ctx != nil && ctx.SystemRegistriesConfDirPath != \"\" {\n\t\t\twrapper.configDirPath = ctx.SystemRegistriesConfDirPath\n\t\t} else {\n\t\t\twrapper.userConfigDirPath = userRegistriesDirPath\n\t\t}\n\n\t\treturn wrapper\n\t} else if ctx != nil && ctx.RootForImplicitAbsolutePaths != \"\" {\n\t\twrapper.configPath = filepath.Join(ctx.RootForImplicitAbsolutePaths, systemRegistriesConfPath)\n\t} else {\n\t\twrapper.configPath = systemRegistriesConfPath\n\t}\n\n\t// potentially use both system and per-user dirs if not using per-user config file\n\tif ctx != nil && ctx.SystemRegistriesConfDirPath != \"\" {\n\t\t// dir explicitly chosen: use only that one\n\t\twrapper.configDirPath = ctx.SystemRegistriesConfDirPath\n\t} else if ctx != nil && ctx.RootForImplicitAbsolutePaths != \"\" {\n\t\twrapper.configDirPath = filepath.Join(ctx.RootForImplicitAbsolutePaths, systemRegistriesConfDirPath)\n\t\twrapper.userConfigDirPath = userRegistriesDirPath\n\t} else {\n\t\twrapper.configDirPath = systemRegistriesConfDirPath\n\t\twrapper.userConfigDirPath = userRegistriesDirPath\n\t}\n\n\treturn wrapper\n}\n\n// ConfigurationSourceDescription returns a string containers paths of registries.conf and registries.conf.d\nfunc ConfigurationSourceDescription(ctx *types.SystemContext) string {\n\twrapper := newConfigWrapper(ctx)\n\tconfigSources := []string{wrapper.configPath}\n\tif wrapper.configDirPath != \"\" {\n\t\tconfigSources = append(configSources, wrapper.configDirPath)\n\t}\n\tif wrapper.userConfigDirPath != \"\" {\n\t\tconfigSources = append(configSources, wrapper.userConfigDirPath)\n\t}\n\treturn strings.Join(configSources, \", \")\n}\n\n// configMutex is used to synchronize concurrent accesses to configCache.\nvar configMutex = sync.Mutex{}\n\n// configCache caches already loaded configs with config paths as keys and is\n// used to avoid redundantly parsing configs. Concurrent accesses to the cache\n// are synchronized via configMutex.\nvar configCache = make(map[configWrapper]*parsedConfig)\n\n// InvalidateCache invalidates the registry cache.  This function is meant to be\n// used for long-running processes that need to reload potential changes made to\n// the cached registry config files.\nfunc InvalidateCache() {\n\tconfigMutex.Lock()\n\tdefer configMutex.Unlock()\n\tconfigCache = make(map[configWrapper]*parsedConfig)\n}\n\n// getConfig returns the config object corresponding to ctx, loading it if it is not yet cached.\nfunc getConfig(ctx *types.SystemContext) (*parsedConfig, error) {\n\twrapper := newConfigWrapper(ctx)\n\tconfigMutex.Lock()\n\tif config, inCache := configCache[wrapper]; inCache {\n\t\tconfigMutex.Unlock()\n\t\treturn config, nil\n\t}\n\tconfigMutex.Unlock()\n\n\treturn tryUpdatingCache(ctx, wrapper)\n}\n\n// dropInConfigs returns a slice of drop-in-configs from the registries.conf.d\n// directory.\nfunc dropInConfigs(wrapper configWrapper) ([]string, error) {\n\tvar (\n\t\tconfigs  []string\n\t\tdirPaths []string\n\t)\n\tif wrapper.configDirPath != \"\" {\n\t\tdirPaths = append(dirPaths, wrapper.configDirPath)\n\t}\n\tif wrapper.userConfigDirPath != \"\" {\n\t\tdirPaths = append(dirPaths, wrapper.userConfigDirPath)\n\t}\n\tfor _, dirPath := range dirPaths {\n\t\terr := filepath.WalkDir(dirPath,\n\t\t\t// WalkFunc to read additional configs\n\t\t\tfunc(path string, d fs.DirEntry, err error) error {\n\t\t\t\tswitch {\n\t\t\t\tcase err != nil:\n\t\t\t\t\t// return error (could be a permission problem)\n\t\t\t\t\treturn err\n\t\t\t\tcase d == nil:\n\t\t\t\t\t// this should only happen when err != nil but let's be sure\n\t\t\t\t\treturn nil\n\t\t\t\tcase d.IsDir():\n\t\t\t\t\tif path != dirPath {\n\t\t\t\t\t\t// make sure to not recurse into sub-directories\n\t\t\t\t\t\treturn filepath.SkipDir\n\t\t\t\t\t}\n\t\t\t\t\t// ignore directories\n\t\t\t\t\treturn nil\n\t\t\t\tdefault:\n\t\t\t\t\t// only add *.conf files\n\t\t\t\t\tif strings.HasSuffix(path, \".conf\") {\n\t\t\t\t\t\tconfigs = append(configs, path)\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t},\n\t\t)\n\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\t// Ignore IsNotExist errors: most systems won't have a registries.conf.d\n\t\t\t// directory.\n\t\t\treturn nil, fmt.Errorf(\"reading registries.conf.d: %w\", err)\n\t\t}\n\t}\n\n\treturn configs, nil\n}\n\n// TryUpdatingCache loads the configuration from the provided `SystemContext`\n// without using the internal cache. On success, the loaded configuration will\n// be added into the internal registry cache.\n// It returns the resulting configuration; this is DEPRECATED and may not correctly\n// reflect any future data handled by this package.\nfunc TryUpdatingCache(ctx *types.SystemContext) (*V2RegistriesConf, error) {\n\tconfig, err := tryUpdatingCache(ctx, newConfigWrapper(ctx))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &config.partialV2, err\n}\n\n// tryUpdatingCache implements TryUpdatingCache with an additional configWrapper\n// argument to avoid redundantly calculating the config paths.\nfunc tryUpdatingCache(ctx *types.SystemContext, wrapper configWrapper) (*parsedConfig, error) {\n\tconfigMutex.Lock()\n\tdefer configMutex.Unlock()\n\n\t// load the config\n\tconfig, err := loadConfigFile(wrapper.configPath, false)\n\tif err != nil {\n\t\t// Continue with an empty []Registry if we use the default config, which\n\t\t// implies that the config path of the SystemContext isn't set.\n\t\t//\n\t\t// Note: if ctx.SystemRegistriesConfPath points to the default config,\n\t\t// we will still return an error.\n\t\tif os.IsNotExist(err) && (ctx == nil || ctx.SystemRegistriesConfPath == \"\") {\n\t\t\tconfig = &parsedConfig{}\n\t\t\tconfig.partialV2 = V2RegistriesConf{Registries: []Registry{}}\n\t\t\tconfig.aliasCache, err = newShortNameAliasCache(\"\", &shortNameAliasConf{})\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err // Should never happen\n\t\t\t}\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"loading registries configuration %q: %w\", wrapper.configPath, err)\n\t\t}\n\t}\n\n\t// Load the configs from the conf directory path.\n\tdinConfigs, err := dropInConfigs(wrapper)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, path := range dinConfigs {\n\t\t// Enforce v2 format for drop-in-configs.\n\t\tdropIn, err := loadConfigFile(path, true)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t\t// file must have been removed between the directory listing\n\t\t\t\t// and the open call, ignore that as it is a expected race\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"loading drop-in registries configuration %q: %w\", path, err)\n\t\t}\n\t\tconfig.updateWithConfigurationFrom(dropIn)\n\t}\n\n\tif config.shortNameMode == types.ShortNameModeInvalid {\n\t\tconfig.shortNameMode = defaultShortNameMode\n\t}\n\n\tif len(config.partialV2.CredentialHelpers) == 0 {\n\t\tconfig.partialV2.CredentialHelpers = []string{AuthenticationFileHelper}\n\t}\n\n\t// populate the cache\n\tconfigCache[wrapper] = config\n\treturn config, nil\n}\n\n// GetRegistries has been deprecated. Use FindRegistry instead.\n//\n// GetRegistries loads and returns the registries specified in the config.\n// Note the parsed content of registry config files is cached.  For reloading,\n// use `InvalidateCache` and re-call `GetRegistries`.\nfunc GetRegistries(ctx *types.SystemContext) ([]Registry, error) {\n\tconfig, err := getConfig(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn config.partialV2.Registries, nil\n}\n\n// UnqualifiedSearchRegistries returns a list of host[:port] entries to try\n// for unqualified image search, in the returned order)\nfunc UnqualifiedSearchRegistries(ctx *types.SystemContext) ([]string, error) {\n\tregistries, _, err := UnqualifiedSearchRegistriesWithOrigin(ctx)\n\treturn registries, err\n}\n\n// UnqualifiedSearchRegistriesWithOrigin returns a list of host[:port] entries\n// to try for unqualified image search, in the returned order.  It also returns\n// a human-readable description of where these entries are specified (e.g., a\n// registries.conf file).\nfunc UnqualifiedSearchRegistriesWithOrigin(ctx *types.SystemContext) ([]string, string, error) {\n\tconfig, err := getConfig(ctx)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn config.partialV2.UnqualifiedSearchRegistries, config.unqualifiedSearchRegistriesOrigin, nil\n}\n\n// parseShortNameMode translates the string into well-typed\n// types.ShortNameMode.\nfunc parseShortNameMode(mode string) (types.ShortNameMode, error) {\n\tswitch mode {\n\tcase \"disabled\":\n\t\treturn types.ShortNameModeDisabled, nil\n\tcase \"enforcing\":\n\t\treturn types.ShortNameModeEnforcing, nil\n\tcase \"permissive\":\n\t\treturn types.ShortNameModePermissive, nil\n\tdefault:\n\t\treturn types.ShortNameModeInvalid, fmt.Errorf(\"invalid short-name mode: %q\", mode)\n\t}\n}\n\n// GetShortNameMode returns the configured types.ShortNameMode.\nfunc GetShortNameMode(ctx *types.SystemContext) (types.ShortNameMode, error) {\n\tif ctx != nil && ctx.ShortNameMode != nil {\n\t\treturn *ctx.ShortNameMode, nil\n\t}\n\tconfig, err := getConfig(ctx)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\treturn config.shortNameMode, err\n}\n\n// CredentialHelpers returns the global top-level credential helpers.\nfunc CredentialHelpers(sys *types.SystemContext) ([]string, error) {\n\tconfig, err := getConfig(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn config.partialV2.CredentialHelpers, nil\n}\n\n// AdditionalLayerStoreAuthHelper returns the helper for passing registry\n// credentials to Additional Layer Store.\nfunc AdditionalLayerStoreAuthHelper(sys *types.SystemContext) (string, error) {\n\tconfig, err := getConfig(sys)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn config.partialV2.AdditionalLayerStoreAuthHelper, nil\n}\n\n// refMatchingSubdomainPrefix returns the length of ref\n// iff ref, which is a registry, repository namespace, repository or image reference (as formatted by\n// reference.Domain(), reference.Named.Name() or reference.Reference.String()\n// — note that this requires the name to start with an explicit hostname!),\n// matches a Registry.Prefix value containing wildcarded subdomains in the\n// format: *.example.com. Wildcards are only accepted at the beginning, so\n// other formats like example.*.com will not work. Wildcarded prefixes also\n// cannot contain port numbers or namespaces in them.\nfunc refMatchingSubdomainPrefix(ref, prefix string) int {\n\tindex := strings.Index(ref, prefix[1:])\n\tif index == -1 {\n\t\treturn -1\n\t}\n\tif strings.Contains(ref[:index], \"/\") {\n\t\treturn -1\n\t}\n\tindex += len(prefix[1:])\n\tif index == len(ref) {\n\t\treturn index\n\t}\n\tswitch ref[index] {\n\tcase ':', '/', '@':\n\t\treturn index\n\tdefault:\n\t\treturn -1\n\t}\n}\n\n// refMatchingPrefix returns the length of the prefix iff ref,\n// which is a registry, repository namespace, repository or image reference (as formatted by\n// reference.Domain(), reference.Named.Name() or reference.Reference.String()\n// — note that this requires the name to start with an explicit hostname!),\n// matches a Registry.Prefix value.\n// (This is split from the caller primarily to make testing easier.)\nfunc refMatchingPrefix(ref, prefix string) int {\n\tswitch {\n\tcase strings.HasPrefix(prefix, \"*.\"):\n\t\treturn refMatchingSubdomainPrefix(ref, prefix)\n\tcase len(ref) < len(prefix):\n\t\treturn -1\n\tcase len(ref) == len(prefix):\n\t\tif ref == prefix {\n\t\t\treturn len(prefix)\n\t\t}\n\t\treturn -1\n\tcase len(ref) > len(prefix):\n\t\tif !strings.HasPrefix(ref, prefix) {\n\t\t\treturn -1\n\t\t}\n\t\tc := ref[len(prefix)]\n\t\t// This allows \"example.com:5000\" to match \"example.com\",\n\t\t// which is unintended; that will get fixed eventually, DON'T RELY\n\t\t// ON THE CURRENT BEHAVIOR.\n\t\tif c == ':' || c == '/' || c == '@' {\n\t\t\treturn len(prefix)\n\t\t}\n\t\treturn -1\n\tdefault:\n\t\tpanic(\"Internal error: impossible comparison outcome\")\n\t}\n}\n\n// FindRegistry returns the Registry with the longest prefix for ref,\n// which is a registry, repository namespace repository or image reference (as formatted by\n// reference.Domain(), reference.Named.Name() or reference.Reference.String()\n// — note that this requires the name to start with an explicit hostname!).\n// If no Registry prefixes the image, nil is returned.\nfunc FindRegistry(ctx *types.SystemContext, ref string) (*Registry, error) {\n\tconfig, err := getConfig(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn findRegistryWithParsedConfig(config, ref)\n}\n\n// findRegistryWithParsedConfig implements `FindRegistry` with a pre-loaded\n// parseConfig.\nfunc findRegistryWithParsedConfig(config *parsedConfig, ref string) (*Registry, error) {\n\treg := Registry{}\n\tprefixLen := 0\n\tfor _, r := range config.partialV2.Registries {\n\t\tif refMatchingPrefix(ref, r.Prefix) != -1 {\n\t\t\tlength := len(r.Prefix)\n\t\t\tif length > prefixLen {\n\t\t\t\treg = r\n\t\t\t\tprefixLen = length\n\t\t\t}\n\t\t}\n\t}\n\tif prefixLen != 0 {\n\t\treturn &reg, nil\n\t}\n\treturn nil, nil\n}\n\n// loadConfigFile loads and unmarshals a single config file.\n// Use forceV2 if the config must in the v2 format.\nfunc loadConfigFile(path string, forceV2 bool) (*parsedConfig, error) {\n\tlogrus.Debugf(\"Loading registries configuration %q\", path)\n\n\t// tomlConfig allows us to unmarshal either V1 or V2 simultaneously.\n\ttype tomlConfig struct {\n\t\tV2RegistriesConf\n\t\tV1RegistriesConf // for backwards compatibility with sysregistries v1\n\t}\n\n\t// Load the tomlConfig. Note that `DecodeFile` will overwrite set fields.\n\tvar combinedTOML tomlConfig\n\tmeta, err := toml.DecodeFile(path, &combinedTOML)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif keys := meta.Undecoded(); len(keys) > 0 {\n\t\tlogrus.Debugf(\"Failed to decode keys %q from %q\", keys, path)\n\t}\n\n\tif combinedTOML.V1RegistriesConf.hasSetField() {\n\t\t// Enforce the v2 format if requested.\n\t\tif forceV2 {\n\t\t\treturn nil, &InvalidRegistries{s: \"registry must be in v2 format but is in v1\"}\n\t\t}\n\n\t\t// Convert a v1 config into a v2 config.\n\t\tif combinedTOML.V2RegistriesConf.hasSetField() {\n\t\t\treturn nil, &InvalidRegistries{s: fmt.Sprintf(\"mixing sysregistry v1/v2 is not supported: %#v\", combinedTOML)}\n\t\t}\n\t\tconverted, err := combinedTOML.V1RegistriesConf.ConvertToV2()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcombinedTOML.V1RegistriesConf = V1RegistriesConf{}\n\t\tcombinedTOML.V2RegistriesConf = *converted\n\t}\n\n\tres := parsedConfig{partialV2: combinedTOML.V2RegistriesConf}\n\n\t// Post process registries, set the correct prefixes, sanity checks, etc.\n\tif err := res.partialV2.postProcessRegistries(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tres.unqualifiedSearchRegistriesOrigin = path\n\n\tif len(res.partialV2.ShortNameMode) > 0 {\n\t\tmode, err := parseShortNameMode(res.partialV2.ShortNameMode)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.shortNameMode = mode\n\t} else {\n\t\tres.shortNameMode = types.ShortNameModeInvalid\n\t}\n\n\t// Valid wildcarded prefixes must be in the format: *.example.com\n\t// FIXME: Move to postProcessRegistries\n\t// https://github.com/containers/image/pull/1191#discussion_r610623829\n\tfor i := range res.partialV2.Registries {\n\t\tprefix := res.partialV2.Registries[i].Prefix\n\t\tif strings.HasPrefix(prefix, \"*.\") && strings.ContainsAny(prefix, \"/@:\") {\n\t\t\tmsg := fmt.Sprintf(\"Wildcarded prefix should be in the format: *.example.com. Current prefix %q is incorrectly formatted\", prefix)\n\t\t\treturn nil, &InvalidRegistries{s: msg}\n\t\t}\n\t}\n\n\t// Parse and validate short-name aliases.\n\tcache, err := newShortNameAliasCache(path, &res.partialV2.shortNameAliasConf)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"validating short-name aliases: %w\", err)\n\t}\n\tres.aliasCache = cache\n\t// Clear conf.partialV2.shortNameAliasConf to make it available for garbage collection and\n\t// reduce memory consumption.  We're consulting aliasCache for lookups.\n\tres.partialV2.shortNameAliasConf = shortNameAliasConf{}\n\n\treturn &res, nil\n}\n\n// updateWithConfigurationFrom updates c with configuration from updates.\n//\n// Fields present in updates will typically replace already set fields in c.\n// The [[registry]] and alias tables are merged.\nfunc (c *parsedConfig) updateWithConfigurationFrom(updates *parsedConfig) {\n\t// == Merge Registries:\n\tregistryMap := make(map[string]Registry)\n\tfor i := range c.partialV2.Registries {\n\t\tregistryMap[c.partialV2.Registries[i].Prefix] = c.partialV2.Registries[i]\n\t}\n\t// Merge the freshly loaded registries.\n\tfor i := range updates.partialV2.Registries {\n\t\tregistryMap[updates.partialV2.Registries[i].Prefix] = updates.partialV2.Registries[i]\n\t}\n\n\t// Go maps have a non-deterministic order when iterating the keys, so\n\t// we sort the keys to enforce some order in Registries slice.\n\t// Some consumers of c/image (e.g., CRI-O) log the configuration\n\t// and a non-deterministic order could easily cause confusion.\n\tprefixes := slices.Sorted(maps.Keys(registryMap))\n\n\tc.partialV2.Registries = []Registry{}\n\tfor _, prefix := range prefixes {\n\t\tc.partialV2.Registries = append(c.partialV2.Registries, registryMap[prefix])\n\t}\n\n\t// == Merge UnqualifiedSearchRegistries:\n\t// This depends on an subtlety of the behavior of the TOML decoder, where a missing array field\n\t// is not modified while unmarshaling (in our case remains to nil), while an [] is unmarshaled\n\t// as a non-nil []string{}.\n\tif updates.partialV2.UnqualifiedSearchRegistries != nil {\n\t\tc.partialV2.UnqualifiedSearchRegistries = updates.partialV2.UnqualifiedSearchRegistries\n\t\tc.unqualifiedSearchRegistriesOrigin = updates.unqualifiedSearchRegistriesOrigin\n\t}\n\n\t// == Merge credential helpers:\n\tif updates.partialV2.CredentialHelpers != nil {\n\t\tc.partialV2.CredentialHelpers = updates.partialV2.CredentialHelpers\n\t}\n\n\t// == Merge shortNameMode:\n\t// We don’t maintain c.partialV2.ShortNameMode.\n\tif updates.shortNameMode != types.ShortNameModeInvalid {\n\t\tc.shortNameMode = updates.shortNameMode\n\t}\n\n\t// == Merge AdditionalLayerStoreAuthHelper:\n\tif updates.partialV2.AdditionalLayerStoreAuthHelper != \"\" {\n\t\tc.partialV2.AdditionalLayerStoreAuthHelper = updates.partialV2.AdditionalLayerStoreAuthHelper\n\t}\n\n\t// == Merge aliasCache:\n\t// We don’t maintain (in fact we actively clear) c.partialV2.shortNameAliasConf.\n\tc.aliasCache.updateWithConfigurationFrom(updates.aliasCache)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/pkg/tlsclientconfig/tlsclientconfig.go",
    "content": "package tlsclientconfig\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// SetupCertificates opens all .crt, .cert, and .key files in dir and appends / loads certs and key pairs as appropriate to tlsc\nfunc SetupCertificates(dir string, tlsc *tls.Config) error {\n\tlogrus.Debugf(\"Looking for TLS certificates and private keys in %s\", dir)\n\tfs, err := os.ReadDir(dir)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn nil\n\t\t}\n\t\tif os.IsPermission(err) {\n\t\t\tlogrus.Debugf(\"Skipping scan of %s due to permission error: %v\", dir, err)\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\n\tfor _, f := range fs {\n\t\tfullPath := filepath.Join(dir, f.Name())\n\t\tif strings.HasSuffix(f.Name(), \".crt\") {\n\t\t\tlogrus.Debugf(\" crt: %s\", fullPath)\n\t\t\tdata, err := os.ReadFile(fullPath)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\t\t// file must have been removed between the directory listing\n\t\t\t\t\t// and the open call, ignore that as it is a expected race\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif tlsc.RootCAs == nil {\n\t\t\t\tsystemPool, err := x509.SystemCertPool()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"unable to get system cert pool: %w\", err)\n\t\t\t\t}\n\t\t\t\ttlsc.RootCAs = systemPool\n\t\t\t}\n\t\t\ttlsc.RootCAs.AppendCertsFromPEM(data)\n\t\t}\n\t\tif base, ok := strings.CutSuffix(f.Name(), \".cert\"); ok {\n\t\t\tcertName := f.Name()\n\t\t\tkeyName := base + \".key\"\n\t\t\tlogrus.Debugf(\" cert: %s\", fullPath)\n\t\t\tif !hasFile(fs, keyName) {\n\t\t\t\treturn fmt.Errorf(\"missing key %s for client certificate %s. Note that CA certificates should use the extension .crt\", keyName, certName)\n\t\t\t}\n\t\t\tcert, err := tls.LoadX509KeyPair(filepath.Join(dir, certName), filepath.Join(dir, keyName))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ttlsc.Certificates = append(slices.Clone(tlsc.Certificates), cert)\n\t\t}\n\t\tif base, ok := strings.CutSuffix(f.Name(), \".key\"); ok {\n\t\t\tkeyName := f.Name()\n\t\t\tcertName := base + \".cert\"\n\t\t\tlogrus.Debugf(\" key: %s\", fullPath)\n\t\t\tif !hasFile(fs, certName) {\n\t\t\t\treturn fmt.Errorf(\"missing client certificate %s for key %s\", certName, keyName)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc hasFile(files []os.DirEntry, name string) bool {\n\treturn slices.ContainsFunc(files, func(f os.DirEntry) bool {\n\t\treturn f.Name() == name\n\t})\n}\n\n// NewTransport Creates a default transport\nfunc NewTransport() *http.Transport {\n\tdirect := &net.Dialer{\n\t\tTimeout:   30 * time.Second,\n\t\tKeepAlive: 30 * time.Second,\n\t}\n\ttr := &http.Transport{\n\t\tProxy:               http.ProxyFromEnvironment,\n\t\tDialContext:         direct.DialContext,\n\t\tTLSHandshakeTimeout: 10 * time.Second,\n\t\tIdleConnTimeout:     90 * time.Second,\n\t\tMaxIdleConns:        100,\n\t}\n\treturn tr\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/sif/load.go",
    "content": "package sif\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/sylabs/sif/v2/pkg/sif\"\n)\n\n// injectedScriptTargetPath is the path injectedScript should be written to in the created image.\nconst injectedScriptTargetPath = \"/podman/runscript\"\n\n// parseDefFile parses a SIF definition file from reader,\n// and returns non-trivial contents of the %environment and %runscript sections.\nfunc parseDefFile(reader io.Reader) ([]string, []string, error) {\n\ttype parserState int\n\tconst (\n\t\tparsingOther parserState = iota\n\t\tparsingEnvironment\n\t\tparsingRunscript\n\t)\n\n\tenvironment := []string{}\n\trunscript := []string{}\n\n\tstate := parsingOther\n\tscanner := bufio.NewScanner(reader)\n\tfor scanner.Scan() {\n\t\ts := strings.TrimSpace(scanner.Text())\n\t\tswitch {\n\t\tcase s == `%environment`:\n\t\t\tstate = parsingEnvironment\n\t\tcase s == `%runscript`:\n\t\t\tstate = parsingRunscript\n\t\tcase strings.HasPrefix(s, \"%\"):\n\t\t\tstate = parsingOther\n\t\tcase state == parsingEnvironment:\n\t\t\tif s != \"\" && !strings.HasPrefix(s, \"#\") {\n\t\t\t\tenvironment = append(environment, s)\n\t\t\t}\n\t\tcase state == parsingRunscript:\n\t\t\trunscript = append(runscript, s)\n\t\tdefault: // parsingOther: ignore the line\n\t\t}\n\t}\n\tif err := scanner.Err(); err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"reading lines from SIF definition file object: %w\", err)\n\t}\n\treturn environment, runscript, nil\n}\n\n// generateInjectedScript generates a shell script based on\n// SIF definition file %environment and %runscript data, and returns it.\nfunc generateInjectedScript(environment []string, runscript []string) []byte {\n\tscript := fmt.Sprintf(\"#!/bin/bash\\n\"+\n\t\t\"%s\\n\"+\n\t\t\"%s\\n\", strings.Join(environment, \"\\n\"), strings.Join(runscript, \"\\n\"))\n\treturn []byte(script)\n}\n\n// processDefFile finds sif.DataDeffile in sifImage, if any,\n// and returns:\n// - the command to run\n// - contents of a script to inject as injectedScriptTargetPath, or nil\nfunc processDefFile(sifImage *sif.FileImage) (string, []byte, error) {\n\tvar environment, runscript []string\n\n\tdesc, err := sifImage.GetDescriptor(sif.WithDataType(sif.DataDeffile))\n\tif err == nil {\n\t\tenvironment, runscript, err = parseDefFile(desc.GetReader())\n\t\tif err != nil {\n\t\t\treturn \"\", nil, err\n\t\t}\n\t}\n\n\tvar command string\n\tvar injectedScript []byte\n\tif len(environment) == 0 && len(runscript) == 0 {\n\t\tcommand = \"bash\"\n\t\tinjectedScript = nil\n\t} else {\n\t\tinjectedScript = generateInjectedScript(environment, runscript)\n\t\tcommand = injectedScriptTargetPath\n\t}\n\n\treturn command, injectedScript, nil\n}\n\nfunc writeInjectedScript(extractedRootPath string, injectedScript []byte) error {\n\tif injectedScript == nil {\n\t\treturn nil\n\t}\n\tfilePath := filepath.Join(extractedRootPath, injectedScriptTargetPath)\n\tparentDirPath := filepath.Dir(filePath)\n\tif err := os.MkdirAll(parentDirPath, 0o755); err != nil {\n\t\treturn fmt.Errorf(\"creating %s: %w\", parentDirPath, err)\n\t}\n\tif err := os.WriteFile(filePath, injectedScript, 0o755); err != nil {\n\t\treturn fmt.Errorf(\"writing %s to %s: %w\", injectedScriptTargetPath, filePath, err)\n\t}\n\treturn nil\n}\n\n// createTarFromSIFInputs creates a tar file at tarPath, using a squashfs image at squashFSPath.\n// It can also use extractedRootPath and scriptPath, which are allocated for its exclusive use,\n// if necessary.\nfunc createTarFromSIFInputs(ctx context.Context, tarPath, squashFSPath string, injectedScript []byte, extractedRootPath, scriptPath string) error {\n\t// It's safe for the Remove calls to happen even before we create the files, because tempDir is exclusive\n\t// for our use.\n\tdefer os.RemoveAll(extractedRootPath)\n\n\t// Almost everything in extractedRootPath comes from squashFSPath.\n\tconversionCommand := fmt.Sprintf(\"unsquashfs -d %s -f %s && tar --acls --xattrs -C %s -cpf %s ./\",\n\t\textractedRootPath, squashFSPath, extractedRootPath, tarPath)\n\tscript := \"#!/bin/sh\\n\" + conversionCommand + \"\\n\"\n\tif err := os.WriteFile(scriptPath, []byte(script), 0o755); err != nil {\n\t\treturn err\n\t}\n\tdefer os.Remove(scriptPath)\n\n\t// On top of squashFSPath, we only add injectedScript, if necessary.\n\tif err := writeInjectedScript(extractedRootPath, injectedScript); err != nil {\n\t\treturn err\n\t}\n\n\tlogrus.Debugf(\"Converting squashfs to tar, command: %s ...\", conversionCommand)\n\tcmd := exec.CommandContext(ctx, \"fakeroot\", \"--\", scriptPath)\n\toutput, err := cmd.CombinedOutput()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"converting image: %w, output: %s\", err, string(output))\n\t}\n\tlogrus.Debugf(\"... finished converting squashfs to tar\")\n\treturn nil\n}\n\n// convertSIFToElements processes sifImage and creates/returns\n// the relevant elements for constructing an OCI-like image:\n// - A path to a tar file containing a root filesystem,\n// - A command to run.\n// The returned tar file path is inside tempDir, which can be assumed to be empty\n// at start, and is exclusively used by the current process (i.e. it is safe\n// to use hard-coded relative paths within it).\nfunc convertSIFToElements(ctx context.Context, sifImage *sif.FileImage, tempDir string) (string, []string, error) {\n\t// We could allocate unique names for all of these using os.{CreateTemp,MkdirTemp}, but tempDir is exclusive,\n\t// so we can just hard-code a set of unique values here.\n\t// We create and/or manage cleanup of these two paths.\n\tsquashFSPath := filepath.Join(tempDir, \"rootfs.squashfs\")\n\ttarPath := filepath.Join(tempDir, \"rootfs.tar\")\n\t// We only allocate these paths, the user is responsible for cleaning them up.\n\textractedRootPath := filepath.Join(tempDir, \"rootfs\")\n\tscriptPath := filepath.Join(tempDir, \"script\")\n\n\tsucceeded := false\n\t// It's safe for the Remove calls to happen even before we create the files, because tempDir is exclusive\n\t// for our use.\n\t// Ideally we would remove squashFSPath immediately after creating extractedRootPath, but we need\n\t// to run both creation and consumption of extractedRootPath in the same fakeroot context.\n\t// So, overall, this process requires at least 2 compressed copies (SIF and squashFSPath) and 2\n\t// uncompressed copies (extractedRootPath and tarPath) of the data, all using up space at the same time.\n\t// That's rather unsatisfactory, ideally we would be streaming the data directly from a squashfs parser\n\t// reading from the SIF file to a tarball, for 1 compressed and 1 uncompressed copy.\n\tdefer os.Remove(squashFSPath)\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tos.Remove(tarPath)\n\t\t}\n\t}()\n\n\tcommand, injectedScript, err := processDefFile(sifImage)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\trootFS, err := sifImage.GetDescriptor(sif.WithPartitionType(sif.PartPrimSys))\n\tif err != nil {\n\t\treturn \"\", nil, fmt.Errorf(\"looking up rootfs from SIF file: %w\", err)\n\t}\n\t// TODO: We'd prefer not to make a full copy of the file here; unsquashfs ≥ 4.4\n\t// has an -o option that allows extracting a squashfs from the SIF file directly,\n\t// but that version is not currently available in RHEL 8.\n\tlogrus.Debugf(\"Creating a temporary squashfs image %s ...\", squashFSPath)\n\tif err := func() (retErr error) { // A scope for defer\n\t\tf, err := os.Create(squashFSPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// since we are writing to this file, make sure we handle err on Close()\n\t\tdefer func() {\n\t\t\tcloseErr := f.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}()\n\t\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\t\tif _, err := io.CopyN(f, rootFS.GetReader(), rootFS.Size()); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tlogrus.Debugf(\"... finished creating a temporary squashfs image\")\n\n\tif err := createTarFromSIFInputs(ctx, tarPath, squashFSPath, injectedScript, extractedRootPath, scriptPath); err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tsucceeded = true\n\treturn tarPath, []string{command}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/sif/src.go",
    "content": "package sif\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/opencontainers/go-digest\"\n\timgspecs \"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/sylabs/sif/v2/pkg/sif\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype sifImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.NoSignatures\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.NoGetBlobAtInitialize\n\n\tref          sifReference\n\tworkDir      string\n\tlayerDigest  digest.Digest\n\tlayerSize    int64\n\tlayerFile    string\n\tconfig       []byte\n\tconfigDigest digest.Digest\n\tmanifest     []byte\n}\n\n// getBlobInfo returns the digest,  and size of the provided file.\nfunc getBlobInfo(path string) (digest.Digest, int64, error) {\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn \"\", -1, fmt.Errorf(\"opening %q for reading: %w\", path, err)\n\t}\n\tdefer f.Close()\n\n\t// TODO: Instead of writing the tar file to disk, and reading\n\t// it here again, stream the tar file to a pipe and\n\t// compute the digest while writing it to disk.\n\tlogrus.Debugf(\"Computing a digest of the SIF conversion output...\")\n\tdigester := digest.Canonical.Digester()\n\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\tsize, err := io.Copy(digester.Hash(), f)\n\tif err != nil {\n\t\treturn \"\", -1, fmt.Errorf(\"reading %q: %w\", path, err)\n\t}\n\tdigest := digester.Digest()\n\tlogrus.Debugf(\"... finished computing the digest of the SIF conversion output\")\n\n\treturn digest, size, nil\n}\n\n// newImageSource returns an ImageSource for reading from an existing directory.\n// newImageSource extracts SIF objects and saves them in a temp directory.\nfunc newImageSource(ctx context.Context, sys *types.SystemContext, ref sifReference) (private.ImageSource, error) {\n\tsifImg, err := sif.LoadContainerFromPath(ref.file, sif.OptLoadWithFlag(os.O_RDONLY))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading SIF file: %w\", err)\n\t}\n\tdefer func() {\n\t\t_ = sifImg.UnloadContainer()\n\t}()\n\n\tworkDir, err := tmpdir.MkDirBigFileTemp(sys, \"sif\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating temp directory: %w\", err)\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tos.RemoveAll(workDir)\n\t\t}\n\t}()\n\n\tlayerPath, commandLine, err := convertSIFToElements(ctx, sifImg, workDir)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"converting rootfs from SquashFS to Tarball: %w\", err)\n\t}\n\n\tlayerDigest, layerSize, err := getBlobInfo(layerPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"gathering blob information: %w\", err)\n\t}\n\n\tcreated := sifImg.ModifiedAt()\n\tconfig := imgspecv1.Image{\n\t\tCreated: &created,\n\t\tPlatform: imgspecv1.Platform{\n\t\t\tArchitecture: sifImg.PrimaryArch(),\n\t\t\tOS:           \"linux\",\n\t\t},\n\t\tConfig: imgspecv1.ImageConfig{\n\t\t\tCmd: commandLine,\n\t\t},\n\t\tRootFS: imgspecv1.RootFS{\n\t\t\tType:    \"layers\",\n\t\t\tDiffIDs: []digest.Digest{layerDigest},\n\t\t},\n\t\tHistory: []imgspecv1.History{\n\t\t\t{\n\t\t\t\tCreated:   &created,\n\t\t\t\tCreatedBy: fmt.Sprintf(\"/bin/sh -c #(nop) ADD file:%s in %c\", layerDigest.Encoded(), os.PathSeparator),\n\t\t\t\tComment:   \"imported from SIF, uuid: \" + sifImg.ID(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tCreated:    &created,\n\t\t\t\tCreatedBy:  \"/bin/sh -c #(nop) CMD [\\\"bash\\\"]\",\n\t\t\t\tEmptyLayer: true,\n\t\t\t},\n\t\t},\n\t}\n\tconfigBytes, err := json.Marshal(&config)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"generating configuration blob for %q: %w\", ref.resolvedFile, err)\n\t}\n\tconfigDigest := digest.Canonical.FromBytes(configBytes)\n\n\tmanifest := imgspecv1.Manifest{\n\t\tVersioned: imgspecs.Versioned{SchemaVersion: 2},\n\t\tMediaType: imgspecv1.MediaTypeImageManifest,\n\t\tConfig: imgspecv1.Descriptor{\n\t\t\tDigest:    configDigest,\n\t\t\tSize:      int64(len(configBytes)),\n\t\t\tMediaType: imgspecv1.MediaTypeImageConfig,\n\t\t},\n\t\tLayers: []imgspecv1.Descriptor{{\n\t\t\tDigest:    layerDigest,\n\t\t\tSize:      layerSize,\n\t\t\tMediaType: imgspecv1.MediaTypeImageLayer,\n\t\t}},\n\t}\n\tmanifestBytes, err := json.Marshal(&manifest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"generating manifest for %q: %w\", ref.resolvedFile, err)\n\t}\n\n\tsucceeded = true\n\ts := &sifImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: true,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),\n\n\t\tref:          ref,\n\t\tworkDir:      workDir,\n\t\tlayerDigest:  layerDigest,\n\t\tlayerSize:    layerSize,\n\t\tlayerFile:    layerPath,\n\t\tconfig:       configBytes,\n\t\tconfigDigest: configDigest,\n\t\tmanifest:     manifestBytes,\n\t}\n\ts.Compat = impl.AddCompat(s)\n\treturn s, nil\n}\n\n// Reference returns the reference used to set up this source.\nfunc (s *sifImageSource) Reference() types.ImageReference {\n\treturn s.ref\n}\n\n// Close removes resources associated with an initialized ImageSource, if any.\nfunc (s *sifImageSource) Close() error {\n\treturn os.RemoveAll(s.workDir)\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *sifImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tswitch info.Digest {\n\tcase s.configDigest:\n\t\treturn io.NopCloser(bytes.NewReader(s.config)), int64(len(s.config)), nil\n\tcase s.layerDigest:\n\t\treader, err := os.Open(s.layerFile)\n\t\tif err != nil {\n\t\t\treturn nil, -1, fmt.Errorf(\"opening %q: %w\", s.layerFile, err)\n\t\t}\n\t\treturn reader, s.layerSize, nil\n\tdefault:\n\t\treturn nil, -1, fmt.Errorf(\"no blob with digest %q found\", info.Digest.String())\n\t}\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (s *sifImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tif instanceDigest != nil {\n\t\treturn nil, \"\", errors.New(\"manifest lists are not supported by the sif transport\")\n\t}\n\treturn s.manifest, imgspecv1.MediaTypeImageManifest, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/sif/transport.go",
    "content": "package sif\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/directory/explicitfilepath\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\n// Transport is an ImageTransport for SIF images.\nvar Transport = sifTransport{}\n\ntype sifTransport struct{}\n\nfunc (t sifTransport) Name() string {\n\treturn \"sif\"\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (t sifTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn NewReference(reference)\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (t sifTransport) ValidatePolicyConfigurationScope(scope string) error {\n\tif !strings.HasPrefix(scope, \"/\") {\n\t\treturn fmt.Errorf(\"Invalid scope %s: Must be an absolute path\", scope)\n\t}\n\t// Refuse also \"/\", otherwise \"/\" and \"\" would have the same semantics,\n\t// and \"\" could be unexpectedly shadowed by the \"/\" entry.\n\tif scope == \"/\" {\n\t\treturn errors.New(`Invalid scope \"/\": Use the generic default scope \"\"`)\n\t}\n\tcleaned := filepath.Clean(scope)\n\tif cleaned != scope {\n\t\treturn fmt.Errorf(`Invalid scope %s: Uses non-canonical format, perhaps try %s`, scope, cleaned)\n\t}\n\treturn nil\n}\n\n// sifReference is an ImageReference for SIF images.\ntype sifReference struct {\n\t// Note that the interpretation of paths below depends on the underlying filesystem state, which may change under us at any time!\n\t// Either of the paths may point to a different, or no, inode over time.  resolvedFile may contain symbolic links, and so on.\n\n\t// Generally we follow the intent of the user, and use the \"file\" member for filesystem operations (e.g. the user can use a relative path to avoid\n\t// being exposed to symlinks and renames in the parent directories to the working directory).\n\t// (But in general, we make no attempt to be completely safe against concurrent hostile filesystem modifications.)\n\tfile         string // As specified by the user. May be relative, contain symlinks, etc.\n\tresolvedFile string // Absolute file path with no symlinks, at least at the time of its creation. Primarily used for policy namespaces.\n}\n\n// There is no sif.ParseReference because it is rather pointless.\n// Callers who need a transport-independent interface will go through\n// sifTransport.ParseReference; callers who intentionally deal with SIF files\n// can use sif.NewReference.\n\n// NewReference returns an image file reference for a specified path.\nfunc NewReference(file string) (types.ImageReference, error) {\n\t// We do not expose an API supplying the resolvedFile; we could, but recomputing it\n\t// is generally cheap enough that we prefer being confident about the properties of resolvedFile.\n\tresolved, err := explicitfilepath.ResolvePathToFullyExplicit(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn sifReference{file: file, resolvedFile: resolved}, nil\n}\n\nfunc (ref sifReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\n// StringWithinTransport returns a string representation of the reference, which MUST be such that\n// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix;\n// instead, see transports.ImageName().\nfunc (ref sifReference) StringWithinTransport() string {\n\treturn ref.file\n}\n\n// DockerReference returns a Docker reference associated with this reference\n// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\nfunc (ref sifReference) DockerReference() reference.Named {\n\treturn nil\n}\n\n// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n// (i.e. various references with exactly the same semantics should return the same configuration identity)\n// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n// Returns \"\" if configuration identities for these references are not supported.\nfunc (ref sifReference) PolicyConfigurationIdentity() string {\n\treturn ref.resolvedFile\n}\n\n// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n// and each following element to be a prefix of the element preceding it.\nfunc (ref sifReference) PolicyConfigurationNamespaces() []string {\n\tres := []string{}\n\tpath := ref.resolvedFile\n\tfor {\n\t\tlastSlash := strings.LastIndex(path, \"/\")\n\t\tif lastSlash == -1 || lastSlash == 0 {\n\t\t\tbreak\n\t\t}\n\t\tpath = path[:lastSlash]\n\t\tres = append(res, path)\n\t}\n\t// Note that we do not include \"/\"; it is redundant with the default \"\" global default,\n\t// and rejected by sifTransport.ValidatePolicyConfigurationScope above.\n\treturn res\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (ref sifReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, ref)\n}\n\n// NewImageSource returns a types.ImageSource for this reference.\n// The caller must call .Close() on the returned ImageSource.\nfunc (ref sifReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(ctx, sys, ref)\n}\n\n// NewImageDestination returns a types.ImageDestination for this reference.\n// The caller must call .Close() on the returned ImageDestination.\nfunc (ref sifReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn nil, errors.New(`\"sif:\" locations can only be read from, not written to`)\n}\n\n// DeleteImage deletes the named image from the registry, if supported.\nfunc (ref sifReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\treturn errors.New(\"Deleting images not implemented for sif: images\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/docker.go",
    "content": "// Note: Consider the API unstable until the code supports at least three different image formats or transports.\n\npackage signature\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\n// SignOptions includes optional parameters for signing container images.\ntype SignOptions struct {\n\t// Passphare to use when signing with the key identity.\n\tPassphrase string\n}\n\n// SignDockerManifest returns a signature for manifest as the specified dockerReference,\n// using mech and keyIdentity, and the specified options.\nfunc SignDockerManifestWithOptions(m []byte, dockerReference string, mech SigningMechanism, keyIdentity string, options *SignOptions) ([]byte, error) {\n\tmanifestDigest, err := manifest.Digest(m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsig := newUntrustedSignature(manifestDigest, dockerReference)\n\n\tvar passphrase string\n\tif options != nil {\n\t\tpassphrase = options.Passphrase\n\t\t// The gpgme implementation can’t use passphrase with \\n; reject it here for consistent behavior.\n\t\tif strings.Contains(passphrase, \"\\n\") {\n\t\t\treturn nil, errors.New(\"invalid passphrase: must not contain a line break\")\n\t\t}\n\t}\n\n\treturn sig.sign(mech, keyIdentity, passphrase)\n}\n\n// SignDockerManifest returns a signature for manifest as the specified dockerReference,\n// using mech and keyIdentity.\nfunc SignDockerManifest(m []byte, dockerReference string, mech SigningMechanism, keyIdentity string) ([]byte, error) {\n\treturn SignDockerManifestWithOptions(m, dockerReference, mech, keyIdentity, nil)\n}\n\n// VerifyDockerManifestSignature checks that unverifiedSignature uses expectedKeyIdentity to sign unverifiedManifest as expectedDockerReference,\n// using mech.\nfunc VerifyDockerManifestSignature(unverifiedSignature, unverifiedManifest []byte,\n\texpectedDockerReference string, mech SigningMechanism, expectedKeyIdentity string,\n) (*Signature, error) {\n\tsig, _, err := VerifyImageManifestSignatureUsingKeyIdentityList(unverifiedSignature, unverifiedManifest, expectedDockerReference, mech, []string{expectedKeyIdentity})\n\treturn sig, err\n}\n\n// VerifyImageManifestSignatureUsingKeyIdentityList checks that unverifiedSignature uses one of the expectedKeyIdentities\n// to sign unverifiedManifest as expectedDockerReference, using mech. Returns the verified signature and the key identity that\n// was used to verify it.\nfunc VerifyImageManifestSignatureUsingKeyIdentityList(unverifiedSignature, unverifiedManifest []byte,\n\texpectedDockerReference string, mech SigningMechanism, expectedKeyIdentities []string,\n) (*Signature, string, error) {\n\texpectedRef, err := reference.ParseNormalizedNamed(expectedDockerReference)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tsig, matchedKeyIdentity, err := verifyAndExtractSignature(mech, unverifiedSignature, signatureAcceptanceRules{\n\t\tacceptedKeyIdentities: expectedKeyIdentities,\n\t\tvalidateSignedDockerReference: func(signedDockerReference string) error {\n\t\t\tsignedRef, err := reference.ParseNormalizedNamed(signedDockerReference)\n\t\t\tif err != nil {\n\t\t\t\treturn internal.NewInvalidSignatureError(fmt.Sprintf(\"Invalid docker reference %q in signature\", signedDockerReference))\n\t\t\t}\n\t\t\tif signedRef.String() != expectedRef.String() {\n\t\t\t\treturn internal.NewInvalidSignatureError(fmt.Sprintf(\"Docker reference %q does not match %q\",\n\t\t\t\t\tsignedDockerReference, expectedDockerReference))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tvalidateSignedDockerManifestDigest: func(signedDockerManifestDigest digest.Digest) error {\n\t\t\tmatches, err := manifest.MatchesDigest(unverifiedManifest, signedDockerManifestDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\treturn internal.NewInvalidSignatureError(fmt.Sprintf(\"Signature for docker digest %q does not match\", signedDockerManifestDigest))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\treturn sig, matchedKeyIdentity, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/fulcio_cert.go",
    "content": "package signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/x509\"\n\t\"encoding/asn1\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com/sigstore/fulcio/pkg/certificate\"\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\n// fulcioTrustRoot contains policy allow validating Fulcio-issued certificates.\n// Users should call validate() on the policy before using it.\ntype fulcioTrustRoot struct {\n\tcaCertificates *x509.CertPool\n\toidcIssuer     string\n\tsubjectEmail   string\n}\n\nfunc (f *fulcioTrustRoot) validate() error {\n\tif f.oidcIssuer == \"\" {\n\t\treturn errors.New(\"Internal inconsistency: Fulcio use set up without OIDC issuer\")\n\t}\n\tif f.subjectEmail == \"\" {\n\t\treturn errors.New(\"Internal inconsistency: Fulcio use set up without subject email\")\n\t}\n\treturn nil\n}\n\n// fulcioIssuerInCertificate returns the OIDC issuer recorded by Fulcio in unutrustedCertificate;\n// it fails if the extension is not present in the certificate, or on any inconsistency.\nfunc fulcioIssuerInCertificate(untrustedCertificate *x509.Certificate) (string, error) {\n\t// == Validate the recorded OIDC issuer\n\tgotOIDCIssuer1 := false\n\tgotOIDCIssuer2 := false\n\tvar oidcIssuer1, oidcIssuer2 string\n\t// certificate.ParseExtensions doesn’t reject duplicate extensions, and doesn’t detect inconsistencies\n\t// between certificate.OIDIssuer and certificate.OIDIssuerV2.\n\t// Go 1.19 rejects duplicate extensions universally; but until we can require Go 1.19,\n\t// reject duplicates manually.\n\tfor _, untrustedExt := range untrustedCertificate.Extensions {\n\t\tif untrustedExt.Id.Equal(certificate.OIDIssuer) { //nolint:staticcheck // This is deprecated, but we must continue to accept it.\n\t\t\tif gotOIDCIssuer1 {\n\t\t\t\t// Coverage: This is unreachable in Go ≥1.19, which rejects certificates with duplicate extensions\n\t\t\t\t// already in ParseCertificate.\n\t\t\t\treturn \"\", internal.NewInvalidSignatureError(\"Fulcio certificate has a duplicate OIDC issuer v1 extension\")\n\t\t\t}\n\t\t\toidcIssuer1 = string(untrustedExt.Value)\n\t\t\tgotOIDCIssuer1 = true\n\t\t} else if untrustedExt.Id.Equal(certificate.OIDIssuerV2) {\n\t\t\tif gotOIDCIssuer2 {\n\t\t\t\t// Coverage: This is unreachable in Go ≥1.19, which rejects certificates with duplicate extensions\n\t\t\t\t// already in ParseCertificate.\n\t\t\t\treturn \"\", internal.NewInvalidSignatureError(\"Fulcio certificate has a duplicate OIDC issuer v2 extension\")\n\t\t\t}\n\t\t\trest, err := asn1.Unmarshal(untrustedExt.Value, &oidcIssuer2)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"invalid ASN.1 in OIDC issuer v2 extension: %v\", err))\n\t\t\t}\n\t\t\tif len(rest) != 0 {\n\t\t\t\treturn \"\", internal.NewInvalidSignatureError(\"invalid ASN.1 in OIDC issuer v2 extension, trailing data\")\n\t\t\t}\n\t\t\tgotOIDCIssuer2 = true\n\t\t}\n\t}\n\tswitch {\n\tcase gotOIDCIssuer1 && gotOIDCIssuer2:\n\t\tif oidcIssuer1 != oidcIssuer2 {\n\t\t\treturn \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"inconsistent OIDC issuer extension values: v1 %#v, v2 %#v\",\n\t\t\t\toidcIssuer1, oidcIssuer2))\n\t\t}\n\t\treturn oidcIssuer1, nil\n\tcase gotOIDCIssuer1:\n\t\treturn oidcIssuer1, nil\n\tcase gotOIDCIssuer2:\n\t\treturn oidcIssuer2, nil\n\tdefault:\n\t\treturn \"\", internal.NewInvalidSignatureError(\"Fulcio certificate is missing the issuer extension\")\n\t}\n}\n\nfunc (f *fulcioTrustRoot) verifyFulcioCertificateAtTime(relevantTime time.Time, untrustedCertificateBytes []byte, untrustedIntermediateChainBytes []byte) (crypto.PublicKey, error) {\n\t// == Verify the certificate is correctly signed\n\tvar untrustedIntermediatePool *x509.CertPool // = nil\n\t// untrustedCertificateChainPool.AppendCertsFromPEM does something broadly similar,\n\t// but it seems to optimize for memory usage at the cost of larger CPU usage (i.e. to load\n\t// the hundreds of trusted CAs). Golang’s TLS code similarly calls individual AddCert\n\t// for intermediate certificates.\n\tif len(untrustedIntermediateChainBytes) > 0 {\n\t\tuntrustedIntermediateChain, err := cryptoutils.UnmarshalCertificatesFromPEM(untrustedIntermediateChainBytes)\n\t\tif err != nil {\n\t\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"loading certificate chain: %v\", err))\n\t\t}\n\t\tuntrustedIntermediatePool = x509.NewCertPool()\n\t\tif len(untrustedIntermediateChain) > 1 {\n\t\t\tfor _, untrustedIntermediateCert := range untrustedIntermediateChain[:len(untrustedIntermediateChain)-1] {\n\t\t\t\tuntrustedIntermediatePool.AddCert(untrustedIntermediateCert)\n\t\t\t}\n\t\t}\n\t}\n\n\tuntrustedCertificate, err := parseLeafCertFromPEM(untrustedCertificateBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Go rejects Subject Alternative Name that has no DNSNames, EmailAddresses, IPAddresses and URIs;\n\t// we match SAN ourselves, so override that.\n\tif len(untrustedCertificate.UnhandledCriticalExtensions) > 0 {\n\t\tvar remaining []asn1.ObjectIdentifier\n\t\tfor _, oid := range untrustedCertificate.UnhandledCriticalExtensions {\n\t\t\tif !oid.Equal(cryptoutils.SANOID) {\n\t\t\t\tremaining = append(remaining, oid)\n\t\t\t}\n\t\t}\n\t\tuntrustedCertificate.UnhandledCriticalExtensions = remaining\n\t}\n\n\tif _, err := untrustedCertificate.Verify(x509.VerifyOptions{\n\t\tIntermediates: untrustedIntermediatePool,\n\t\tRoots:         f.caCertificates,\n\t\t// NOTE: Cosign uses untrustedCertificate.NotBefore here (i.e. uses _that_ time for intermediate certificate validation),\n\t\t// and validates the leaf certificate against relevantTime manually.\n\t\t// We verify the full certificate chain against relevantTime instead.\n\t\t// Assuming the certificate is fulcio-generated and very short-lived, that should make little difference.\n\t\tCurrentTime: relevantTime,\n\t\tKeyUsages:   []x509.ExtKeyUsage{x509.ExtKeyUsageCodeSigning},\n\t}); err != nil {\n\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"veryfing leaf certificate failed: %v\", err))\n\t}\n\n\t// Cosign verifies a SCT of the certificate (either embedded, or even, probably irrelevant, externally-supplied).\n\t//\n\t// We don’t currently do that.\n\t//\n\t// At the very least, with Fulcio we require Rekor SETs to prove Rekor contains a log of the signature, and that\n\t// already contains the full certificate; so a SCT of the certificate is superfluous (assuming Rekor allowed searching by\n\t// certificate subject, which, well…). That argument might go away if we add support for RFC 3161 timestamps instead of Rekor.\n\t//\n\t// Secondarily, assuming a trusted Fulcio server (which, to be fair, might not be the case for the public one) SCT is not clearly\n\t// better than the Fulcio server maintaining an audit log; a SCT can only reveal a misissuance if there is some other authoritative\n\t// log of approved Fulcio invocations, and it’s not clear where that would come from, especially human users manually\n\t// logging in using OpenID are not going to maintain a record of those actions.\n\t//\n\t// Also, the SCT does not help reveal _what_ was maliciously signed, nor does it protect against malicious signatures\n\t// by correctly-issued certificates.\n\t//\n\t// So, pragmatically, the ideal design seem to be to only do signatures from a trusted build system (which is, by definition,\n\t// the arbiter of desired vs. malicious signatures) that maintains an audit log of performed signature operations; and that seems to\n\t// make the SCT (and all of Rekor apart from the trusted timestamp) unnecessary.\n\n\t// == Validate the recorded OIDC issuer\n\toidcIssuer, err := fulcioIssuerInCertificate(untrustedCertificate)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif oidcIssuer != f.oidcIssuer {\n\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"Unexpected Fulcio OIDC issuer %q\", oidcIssuer))\n\t}\n\n\t// == Validate the OIDC subject\n\tif !slices.Contains(untrustedCertificate.EmailAddresses, f.subjectEmail) {\n\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"Required email %q not found (got %q)\",\n\t\t\tf.subjectEmail,\n\t\t\tuntrustedCertificate.EmailAddresses))\n\t}\n\t// FIXME: Match more subject types? Cosign does:\n\t// - .DNSNames (can’t be issued by Fulcio)\n\t// - .IPAddresses (can’t be issued by Fulcio)\n\t// - .URIs (CAN be issued by Fulcio)\n\t// - OtherName values in SAN (CAN be issued by Fulcio)\n\t// - Various values about GitHub workflows (CAN be issued by Fulcio)\n\t// What does it… mean to get an OAuth2 identity for an IP address?\n\t// FIXME: How far into Turing-completeness for the issuer/subject do we need to get? Simultaneously accepted alternatives, for\n\t// issuers and/or subjects and/or combinations? Regexps? More?\n\n\treturn untrustedCertificate.PublicKey, nil\n}\n\nfunc parseLeafCertFromPEM(untrustedCertificateBytes []byte) (*x509.Certificate, error) {\n\tuntrustedLeafCerts, err := cryptoutils.UnmarshalCertificatesFromPEM(untrustedCertificateBytes)\n\tif err != nil {\n\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"parsing leaf certificate: %v\", err))\n\t}\n\tswitch len(untrustedLeafCerts) {\n\tcase 0:\n\t\treturn nil, internal.NewInvalidSignatureError(\"no certificate found in signature certificate data\")\n\tcase 1: // OK\n\t\treturn untrustedLeafCerts[0], nil\n\tdefault:\n\t\treturn nil, internal.NewInvalidSignatureError(\"unexpected multiple certificates present in signature certificate data\")\n\t}\n}\n\nfunc verifyRekorFulcio(rekorPublicKeys []*ecdsa.PublicKey, fulcioTrustRoot *fulcioTrustRoot, untrustedRekorSET []byte,\n\tuntrustedCertificateBytes []byte, untrustedIntermediateChainBytes []byte, untrustedBase64Signature string,\n\tuntrustedPayloadBytes []byte,\n) (crypto.PublicKey, error) {\n\trekorSETTime, err := internal.VerifyRekorSET(rekorPublicKeys, untrustedRekorSET, untrustedCertificateBytes,\n\t\tuntrustedBase64Signature, untrustedPayloadBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fulcioTrustRoot.verifyFulcioCertificateAtTime(rekorSETTime, untrustedCertificateBytes, untrustedIntermediateChainBytes)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/errors.go",
    "content": "package internal\n\n// InvalidSignatureError is returned when parsing an invalid signature.\n// This is publicly visible as signature.InvalidSignatureError\ntype InvalidSignatureError struct {\n\tmsg string\n}\n\nfunc (err InvalidSignatureError) Error() string {\n\treturn err.msg\n}\n\nfunc NewInvalidSignatureError(msg string) InvalidSignatureError {\n\treturn InvalidSignatureError{msg: msg}\n}\n\n// JSONFormatToInvalidSignatureError converts JSONFormatError to InvalidSignatureError.\n// All other errors are returned as is.\nfunc JSONFormatToInvalidSignatureError(err error) error {\n\tif formatErr, ok := err.(JSONFormatError); ok {\n\t\terr = NewInvalidSignatureError(formatErr.Error())\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/json.go",
    "content": "package internal\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"go.podman.io/image/v5/internal/set\"\n)\n\n// JSONFormatError is returned when JSON does not match expected format.\ntype JSONFormatError string\n\nfunc (err JSONFormatError) Error() string {\n\treturn string(err)\n}\n\n// ParanoidUnmarshalJSONObject unmarshals data as a JSON object, but failing on the slightest unexpected aspect\n// (including duplicated keys, unrecognized keys, and non-matching types). Uses fieldResolver to\n// determine the destination for a field value, which should return a pointer to the destination if valid, or nil if the key is rejected.\n//\n// The fieldResolver approach is useful for decoding the Policy.Transports map; using it for structs is a bit lazy,\n// we could use reflection to automate this. Later?\nfunc ParanoidUnmarshalJSONObject(data []byte, fieldResolver func(string) any) error {\n\tseenKeys := set.New[string]()\n\n\tdec := json.NewDecoder(bytes.NewReader(data))\n\tt, err := dec.Token()\n\tif err != nil {\n\t\treturn JSONFormatError(err.Error())\n\t}\n\tif t != json.Delim('{') {\n\t\treturn JSONFormatError(fmt.Sprintf(\"JSON object expected, got %#v\", t))\n\t}\n\tfor {\n\t\tt, err := dec.Token()\n\t\tif err != nil {\n\t\t\treturn JSONFormatError(err.Error())\n\t\t}\n\t\tif t == json.Delim('}') {\n\t\t\tbreak\n\t\t}\n\n\t\tkey, ok := t.(string)\n\t\tif !ok {\n\t\t\t// Coverage: This should never happen, dec.Token() rejects non-string-literals in this state.\n\t\t\treturn JSONFormatError(fmt.Sprintf(\"Key string literal expected, got %#v\", t))\n\t\t}\n\t\tif seenKeys.Contains(key) {\n\t\t\treturn JSONFormatError(fmt.Sprintf(\"Duplicate key %q\", key))\n\t\t}\n\t\tseenKeys.Add(key)\n\n\t\tvaluePtr := fieldResolver(key)\n\t\tif valuePtr == nil {\n\t\t\treturn JSONFormatError(fmt.Sprintf(\"Unknown key %q\", key))\n\t\t}\n\t\t// This works like json.Unmarshal, in particular it allows us to implement UnmarshalJSON to implement strict parsing of the field value.\n\t\tif err := dec.Decode(valuePtr); err != nil {\n\t\t\treturn JSONFormatError(err.Error())\n\t\t}\n\t}\n\tif _, err := dec.Token(); err != io.EOF {\n\t\treturn JSONFormatError(\"Unexpected data after JSON object\")\n\t}\n\treturn nil\n}\n\n// ParanoidUnmarshalJSONObjectExactFields unmarshals data as a JSON object, but failing on the slightest unexpected aspect\n// (including duplicated keys, unrecognized keys, and non-matching types). Each of the fields in exactFields\n// must be present exactly once, and none other fields are accepted.\nfunc ParanoidUnmarshalJSONObjectExactFields(data []byte, exactFields map[string]any) error {\n\tseenKeys := set.New[string]()\n\tif err := ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tif valuePtr, ok := exactFields[key]; ok {\n\t\t\tseenKeys.Add(key)\n\t\t\treturn valuePtr\n\t\t}\n\t\treturn nil\n\t}); err != nil {\n\t\treturn err\n\t}\n\tfor key := range exactFields {\n\t\tif !seenKeys.Contains(key) {\n\t\t\treturn JSONFormatError(fmt.Sprintf(`Key %q missing in a JSON object`, key))\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/rekor_api_types.go",
    "content": "package internal\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\nconst rekorHashedrekordKind = \"hashedrekord\"\n\ntype RekorHashedrekord struct {\n\tAPIVersion *string         `json:\"apiVersion\"`\n\tSpec       json.RawMessage `json:\"spec\"`\n}\n\nfunc (m *RekorHashedrekord) Kind() string {\n\treturn rekorHashedrekordKind\n}\n\nfunc (m *RekorHashedrekord) SetKind(val string) {\n}\n\nfunc (m *RekorHashedrekord) UnmarshalJSON(raw []byte) error {\n\tvar base struct {\n\t\tKind string `json:\"kind\"`\n\t}\n\tdec := json.NewDecoder(bytes.NewReader(raw))\n\tdec.UseNumber()\n\tif err := dec.Decode(&base); err != nil {\n\t\treturn err\n\t}\n\n\tswitch base.Kind {\n\tcase rekorHashedrekordKind:\n\t\tvar data struct { // We can’t use RekorHashedRekord directly, because that would be an infinite recursion.\n\t\t\tAPIVersion *string         `json:\"apiVersion\"`\n\t\t\tSpec       json.RawMessage `json:\"spec\"`\n\t\t}\n\t\tdec = json.NewDecoder(bytes.NewReader(raw))\n\t\tdec.UseNumber()\n\t\tif err := dec.Decode(&data); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tres := RekorHashedrekord{\n\t\t\tAPIVersion: data.APIVersion,\n\t\t\tSpec:       data.Spec,\n\t\t}\n\t\t*m = res\n\t\treturn nil\n\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid kind value: %q\", base.Kind)\n\t}\n}\n\nfunc (m RekorHashedrekord) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(struct {\n\t\tKind       string          `json:\"kind\"`\n\t\tAPIVersion *string         `json:\"apiVersion\"`\n\t\tSpec       json.RawMessage `json:\"spec\"`\n\t}{\n\t\tKind:       m.Kind(),\n\t\tAPIVersion: m.APIVersion,\n\t\tSpec:       m.Spec,\n\t})\n}\n\ntype RekorHashedrekordV001Schema struct {\n\tData      *RekorHashedrekordV001SchemaData      `json:\"data\"`\n\tSignature *RekorHashedrekordV001SchemaSignature `json:\"signature\"`\n}\n\ntype RekorHashedrekordV001SchemaData struct {\n\tHash *RekorHashedrekordV001SchemaDataHash `json:\"hash,omitempty\"`\n}\n\ntype RekorHashedrekordV001SchemaDataHash struct {\n\tAlgorithm *string `json:\"algorithm\"`\n\tValue     *string `json:\"value\"`\n}\n\nconst (\n\tRekorHashedrekordV001SchemaDataHashAlgorithmSha256 string = \"sha256\"\n\tRekorHashedrekordV001SchemaDataHashAlgorithmSha384 string = \"sha384\"\n\tRekorHashedrekordV001SchemaDataHashAlgorithmSha512 string = \"sha512\"\n)\n\ntype RekorHashedrekordV001SchemaSignature struct {\n\tContent   []byte                                         `json:\"content,omitempty\"`\n\tPublicKey *RekorHashedrekordV001SchemaSignaturePublicKey `json:\"publicKey,omitempty\"`\n}\n\ntype RekorHashedrekordV001SchemaSignaturePublicKey struct {\n\tContent []byte `json:\"content,omitempty\"`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/rekor_set.go",
    "content": "package internal\n\nimport (\n\t\"bytes\"\n\t\"crypto/ecdsa\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer\"\n)\n\n// This is the github.com/sigstore/rekor/pkg/generated/models.Hashedrekord.APIVersion for github.com/sigstore/rekor/pkg/generated/models.HashedrekordV001Schema.\n// We could alternatively use github.com/sigstore/rekor/pkg/types/hashedrekord.APIVERSION, but that subpackage adds too many dependencies.\nconst RekorHashedRekordV001APIVersion = \"0.0.1\"\n\n// UntrustedRekorSET is a parsed content of the sigstore-signature Rekor SET\n// (note that this a signature-specific format, not a format directly used by the Rekor API).\n// This corresponds to github.com/sigstore/cosign/bundle.RekorBundle, but we impose a stricter decoder.\ntype UntrustedRekorSET struct {\n\tUntrustedSignedEntryTimestamp []byte // A signature over some canonical JSON form of UntrustedPayload\n\tUntrustedPayload              json.RawMessage\n}\n\ntype UntrustedRekorPayload struct {\n\tBody           []byte // In cosign, this is an any, but only a string works\n\tIntegratedTime int64\n\tLogIndex       int64\n\tLogID          string\n}\n\n// A compile-time check that UntrustedRekorSET implements json.Unmarshaler\nvar _ json.Unmarshaler = (*UntrustedRekorSET)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (s *UntrustedRekorSET) UnmarshalJSON(data []byte) error {\n\treturn JSONFormatToInvalidSignatureError(s.strictUnmarshalJSON(data))\n}\n\n// strictUnmarshalJSON is UnmarshalJSON, except that it may return the internal JSONFormatError error type.\n// Splitting it into a separate function allows us to do the JSONFormatError → InvalidSignatureError in a single place, the caller.\nfunc (s *UntrustedRekorSET) strictUnmarshalJSON(data []byte) error {\n\treturn ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"SignedEntryTimestamp\": &s.UntrustedSignedEntryTimestamp,\n\t\t\"Payload\":              &s.UntrustedPayload,\n\t})\n}\n\n// A compile-time check that UntrustedRekorSET and *UntrustedRekorSET implements json.Marshaler\nvar (\n\t_ json.Marshaler = UntrustedRekorSET{}\n\t_ json.Marshaler = (*UntrustedRekorSET)(nil)\n)\n\n// MarshalJSON implements the json.Marshaler interface.\nfunc (s UntrustedRekorSET) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(map[string]any{\n\t\t\"SignedEntryTimestamp\": s.UntrustedSignedEntryTimestamp,\n\t\t\"Payload\":              s.UntrustedPayload,\n\t})\n}\n\n// A compile-time check that UntrustedRekorPayload implements json.Unmarshaler\nvar _ json.Unmarshaler = (*UntrustedRekorPayload)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (p *UntrustedRekorPayload) UnmarshalJSON(data []byte) error {\n\treturn JSONFormatToInvalidSignatureError(p.strictUnmarshalJSON(data))\n}\n\n// strictUnmarshalJSON is UnmarshalJSON, except that it may return the internal JSONFormatError error type.\n// Splitting it into a separate function allows us to do the JSONFormatError → InvalidSignatureError in a single place, the caller.\nfunc (p *UntrustedRekorPayload) strictUnmarshalJSON(data []byte) error {\n\treturn ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"body\":           &p.Body,\n\t\t\"integratedTime\": &p.IntegratedTime,\n\t\t\"logIndex\":       &p.LogIndex,\n\t\t\"logID\":          &p.LogID,\n\t})\n}\n\n// A compile-time check that UntrustedRekorPayload and *UntrustedRekorPayload implements json.Marshaler\nvar (\n\t_ json.Marshaler = UntrustedRekorPayload{}\n\t_ json.Marshaler = (*UntrustedRekorPayload)(nil)\n)\n\n// MarshalJSON implements the json.Marshaler interface.\nfunc (p UntrustedRekorPayload) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(map[string]any{\n\t\t\"body\":           p.Body,\n\t\t\"integratedTime\": p.IntegratedTime,\n\t\t\"logIndex\":       p.LogIndex,\n\t\t\"logID\":          p.LogID,\n\t})\n}\n\n// VerifyRekorSET verifies that unverifiedRekorSET is correctly signed by publicKey and matches the rest of the data.\n// Returns bundle upload time on success.\nfunc VerifyRekorSET(publicKeys []*ecdsa.PublicKey, unverifiedRekorSET []byte, unverifiedKeyOrCertBytes []byte, unverifiedBase64Signature string, unverifiedPayloadBytes []byte) (time.Time, error) {\n\t// FIXME: Should the publicKey parameter hard-code ecdsa?\n\n\t// == Parse SET bytes\n\tvar untrustedSET UntrustedRekorSET\n\t// Sadly. we need to parse and transform untrusted data before verifying a cryptographic signature...\n\tif err := json.Unmarshal(unverifiedRekorSET, &untrustedSET); err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(err.Error())\n\t}\n\t// == Verify SET signature\n\t// Cosign unmarshals and re-marshals UntrustedPayload; that seems unnecessary,\n\t// assuming jsoncanonicalizer is designed to operate on untrusted data.\n\tuntrustedSETPayloadCanonicalBytes, err := jsoncanonicalizer.Transform(untrustedSET.UntrustedPayload)\n\tif err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"canonicalizing Rekor SET JSON: %v\", err))\n\t}\n\tuntrustedSETPayloadHash := sha256.Sum256(untrustedSETPayloadCanonicalBytes)\n\tpublicKeymatched := false\n\tfor _, pk := range publicKeys {\n\t\tif ecdsa.VerifyASN1(pk, untrustedSETPayloadHash[:], untrustedSET.UntrustedSignedEntryTimestamp) {\n\t\t\tpublicKeymatched = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !publicKeymatched {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"cryptographic signature verification of Rekor SET failed\")\n\t}\n\n\t// == Parse SET payload\n\t// Parse the cryptographically-verified canonicalized variant, NOT the originally-delivered representation,\n\t// to decrease risk of exploiting the JSON parser. Note that if there were an arbitrary execution vulnerability, the attacker\n\t// could have exploited the parsing of unverifiedRekorSET above already; so this, at best, ensures more consistent processing\n\t// of the SET payload.\n\tvar rekorPayload UntrustedRekorPayload\n\tif err := json.Unmarshal(untrustedSETPayloadCanonicalBytes, &rekorPayload); err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"parsing Rekor SET payload: %v\", err.Error()))\n\t}\n\t// FIXME: Consider being much more strict about decoding JSON.\n\tvar hashedRekord RekorHashedrekord\n\tif err := json.Unmarshal(rekorPayload.Body, &hashedRekord); err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"decoding the body of a Rekor SET payload: %v\", err))\n\t}\n\t// The decode of HashedRekord validates the \"kind\": \"hashedrecord\" field, which is otherwise invisible to us.\n\tif hashedRekord.APIVersion == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"missing Rekor SET Payload API version\")\n\t}\n\tif *hashedRekord.APIVersion != RekorHashedRekordV001APIVersion {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"unsupported Rekor SET Payload hashedrekord version %#v\", hashedRekord.APIVersion))\n\t}\n\tvar hashedRekordV001 RekorHashedrekordV001Schema\n\tif err := json.Unmarshal(hashedRekord.Spec, &hashedRekordV001); err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"decoding hashedrekod spec: %v\", err))\n\t}\n\n\t// == Match unverifiedKeyOrCertBytes\n\tif hashedRekordV001.Signature == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"signature\" field in hashedrekord`)\n\t}\n\tif hashedRekordV001.Signature.PublicKey == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"signature.publicKey\" field in hashedrekord`)\n\t}\n\trekorKeyOrCertPEM, rest := pem.Decode(hashedRekordV001.Signature.PublicKey.Content)\n\tif rekorKeyOrCertPEM == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"publicKey in Rekor SET is not in PEM format\")\n\t}\n\tif len(rest) != 0 {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"publicKey in Rekor SET has trailing data\")\n\t}\n\t// FIXME: For public keys, let the caller provide the DER-formatted blob instead\n\t// of round-tripping through PEM.\n\tunverifiedKeyOrCertPEM, rest := pem.Decode(unverifiedKeyOrCertBytes)\n\tif unverifiedKeyOrCertPEM == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"public key or cert to be matched against publicKey in Rekor SET is not in PEM format\")\n\t}\n\tif len(rest) != 0 {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"public key or cert to be matched against publicKey in Rekor SET has trailing data\")\n\t}\n\t// NOTE: This compares the PEM payload, but not the object type or headers.\n\tif !bytes.Equal(rekorKeyOrCertPEM.Bytes, unverifiedKeyOrCertPEM.Bytes) {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"publicKey in Rekor SET does not match\")\n\t}\n\t// == Match unverifiedSignatureBytes\n\tunverifiedSignatureBytes, err := base64.StdEncoding.DecodeString(unverifiedBase64Signature)\n\tif err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"decoding signature base64: %v\", err))\n\t}\n\tif !bytes.Equal(hashedRekordV001.Signature.Content, unverifiedSignatureBytes) {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(\"signature in Rekor SET does not match: %#v vs. %#v\",\n\t\t\tstring(hashedRekordV001.Signature.Content), string(unverifiedSignatureBytes)))\n\t}\n\n\t// == Match unverifiedPayloadBytes\n\tif hashedRekordV001.Data == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"data\" field in hashedrekord`)\n\t}\n\tif hashedRekordV001.Data.Hash == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"data.hash\" field in hashedrekord`)\n\t}\n\tif hashedRekordV001.Data.Hash.Algorithm == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"data.hash.algorithm\" field in hashedrekord`)\n\t}\n\t// FIXME: Rekor 1.3.5 has added SHA-386 and SHA-512 as recognized values.\n\t// Eventually we should support them as well.\n\t// Short-term, Cosign (as of 2024-02 and Cosign 2.2.3) only produces and accepts SHA-256, so right now that’s not a compatibility\n\t// issue.\n\tif *hashedRekordV001.Data.Hash.Algorithm != RekorHashedrekordV001SchemaDataHashAlgorithmSha256 {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(`Unexpected \"data.hash.algorithm\" value %#v`, *hashedRekordV001.Data.Hash.Algorithm))\n\t}\n\tif hashedRekordV001.Data.Hash.Value == nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(`Missing \"data.hash.value\" field in hashedrekord`)\n\t}\n\trekorPayloadHash, err := hex.DecodeString(*hashedRekordV001.Data.Hash.Value)\n\tif err != nil {\n\t\treturn time.Time{}, NewInvalidSignatureError(fmt.Sprintf(`Invalid \"data.hash.value\" field in hashedrekord: %v`, err))\n\t}\n\tunverifiedPayloadHash := sha256.Sum256(unverifiedPayloadBytes)\n\tif !bytes.Equal(rekorPayloadHash, unverifiedPayloadHash[:]) {\n\t\treturn time.Time{}, NewInvalidSignatureError(\"payload in Rekor SET does not match\")\n\t}\n\n\t// == All OK; return the relevant time.\n\treturn time.Unix(rekorPayload.IntegratedTime, 0), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sequoia/gosequoia.c",
    "content": "/*\n * SPDX-License-Identifier: Apache-2.0 OR FSFAP\n * SPDX-FileCopyrightText: 2025 Daiki Ueno\n *\n * You can redistribute and/or modify this file under the terms of either\n * Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html), or\n * FSF All Permissive License\n * (https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html),\n * or both in parallel, as here.\n */\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"gosequoia.h\"\n\n#if defined(GO_SEQUOIA_ENABLE_DLOPEN) && GO_SEQUOIA_ENABLE_DLOPEN\n\n#include <assert.h>\n#include <dlfcn.h>\n#include <errno.h>\n#include <stdlib.h>\n\n/* If SEQUOIA_SONAME is defined, dlopen handle can be automatically\n * set; otherwise, the caller needs to call\n * go_sequoia_ensure_library with soname determined at run time.\n */\n#ifdef SEQUOIA_SONAME\n\nstatic void\nensure_library (void)\n{\n  if (go_sequoia_ensure_library (SEQUOIA_SONAME, RTLD_LAZY | RTLD_LOCAL) < 0)\n    abort ();\n}\n\n#if defined(GO_SEQUOIA_ENABLE_PTHREAD) && GO_SEQUOIA_ENABLE_PTHREAD\n#include <pthread.h>\n\nstatic pthread_once_t dlopen_once = PTHREAD_ONCE_INIT;\n\n#define ENSURE_LIBRARY pthread_once(&dlopen_once, ensure_library)\n\n#else /* GO_SEQUOIA_ENABLE_PTHREAD */\n\n#define ENSURE_LIBRARY do {\t    \\\n    if (!go_sequoia_dlhandle) \\\n      ensure_library();\t\t    \\\n  } while (0)\n\n#endif /* !GO_SEQUOIA_ENABLE_PTHREAD */\n\n#else /* SEQUOIA_SONAME */\n\n#define ENSURE_LIBRARY do {} while (0)\n\n#endif /* !SEQUOIA_SONAME */\n\nstatic void *go_sequoia_dlhandle;\n\n/* Define redirection symbols */\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-macros\"\n\n#if (2 <= __GNUC__ || (4 <= __clang_major__))\n#define FUNC(ret, name, args, cargs)\t\t\t\\\n  static __typeof__(name)(*go_sequoia_sym_##name);\n#else\n#define FUNC(ret, name, args, cargs)\t\t\\\n  static ret(*go_sequoia_sym_##name)args;\n#endif\n#define VOID_FUNC FUNC\n#include \"gosequoiafuncs.h\"\n#undef VOID_FUNC\n#undef FUNC\n\n#pragma GCC diagnostic pop\n\n/* Define redirection wrapper functions */\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-macros\"\n\n#define FUNC(ret, name, args, cargs)        \\\nret go_##name args           \\\n{\t\t\t\t\t    \\\n  ENSURE_LIBRARY;\t\t\t    \\\n  assert (go_sequoia_sym_##name);\t    \\\n  return go_sequoia_sym_##name cargs;\t    \\\n}\n#define VOID_FUNC(ret, name, args, cargs)   \\\nret go_##name args           \\\n{\t\t\t\t\t    \\\n  ENSURE_LIBRARY;\t\t\t    \\\n  assert (go_sequoia_sym_##name);\t    \\\n  go_sequoia_sym_##name cargs;\t\t    \\\n}\n#include \"gosequoiafuncs.h\"\n#undef VOID_FUNC\n#undef FUNC\n\n#pragma GCC diagnostic pop\n\nstatic int\nensure_symbol (const char *name, void **symp)\n{\n  if (!*symp)\n    {\n      void *sym = dlsym (go_sequoia_dlhandle, name);\n      if (!sym)\n\treturn -EINVAL;\n      *symp = sym;\n    }\n  return 0;\n}\n\nint\ngo_sequoia_ensure_library (const char *soname, int flags)\n{\n  int err;\n\n  if (!go_sequoia_dlhandle)\n    {\n      go_sequoia_dlhandle = dlopen (soname, flags);\n      if (!go_sequoia_dlhandle)\n\treturn -EINVAL;\n    }\n\n#define ENSURE_SYMBOL(name)\t\t\t\t\t\\\n  ensure_symbol(#name, (void **)&go_sequoia_sym_##name)\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-macros\"\n\n#define FUNC(ret, name, args, cargs)\t\t\\\n  err = ENSURE_SYMBOL(name);\t\t\t\\\n  if (err < 0)\t\t\t\t\t\\\n    {\t\t\t\t\t\t\\\n      dlclose (go_sequoia_dlhandle);\t\\\n      go_sequoia_dlhandle = NULL;\t\t\\\n      return err;\t\t\t\t\\\n    }\n#define VOID_FUNC FUNC\n#include \"gosequoiafuncs.h\"\n#undef VOID_FUNC\n#undef FUNC\n\n#pragma GCC diagnostic pop\n\n#undef ENSURE_SYMBOL\n  return 0;\n}\n\nvoid\ngo_sequoia_unload_library (void)\n{\n  if (go_sequoia_dlhandle)\n    {\n      dlclose (go_sequoia_dlhandle);\n      go_sequoia_dlhandle = NULL;\n    }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-macros\"\n\n#define FUNC(ret, name, args, cargs)\t\t\\\n  go_sequoia_sym_##name = NULL;\n#define VOID_FUNC FUNC\n#include \"gosequoiafuncs.h\"\n#undef VOID_FUNC\n#undef FUNC\n\n#pragma GCC diagnostic pop\n}\n\nunsigned\ngo_sequoia_is_usable (void)\n{\n  return go_sequoia_dlhandle != NULL;\n}\n\n#else /* GO_SEQUOIA_ENABLE_DLOPEN */\n\nint\ngo_sequoia_ensure_library (const char *soname, int flags)\n{\n  (void) soname;\n  (void) flags;\n  return 0;\n}\n\nvoid\ngo_sequoia_unload_library (void)\n{\n}\n\nunsigned\ngo_sequoia_is_usable (void)\n{\n  /* The library is linked at build time, thus always usable */\n  return 1;\n}\n\n#endif /* !GO_SEQUOIA_ENABLE_DLOPEN */\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sequoia/gosequoia.h",
    "content": "/*\n * SPDX-License-Identifier: Apache-2.0 OR FSFAP\n * SPDX-FileCopyrightText: 2025 Daiki Ueno\n *\n * You can redistribute and/or modify this file under the terms of either\n * Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html), or\n * FSF All Permissive License\n * (https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html),\n * or both in parallel, as here.\n */\n\n#ifndef GO_SEQUOIA_H_\n#define GO_SEQUOIA_H_\n\n#include <sequoia.h>\n\n#if defined(GO_SEQUOIA_ENABLE_DLOPEN) && GO_SEQUOIA_ENABLE_DLOPEN\n\n#define FUNC(ret, name, args, cargs)\t\t\\\n  ret go_##name args;\n#define VOID_FUNC FUNC\n#include \"gosequoiafuncs.h\"\n#undef VOID_FUNC\n#undef FUNC\n\n#define GO_SEQUOIA_FUNC(name) go_##name\n\n#else\n\n#define GO_SEQUOIA_FUNC(name) name\n\n#endif /* GO_SEQUOIA_ENABLE_DLOPEN */\n\n/* Ensure SONAME to be loaded with dlopen FLAGS, and all the necessary\n * symbols are resolved.\n *\n * Returns 0 on success; negative error code otherwise.\n *\n * Note that this function is NOT thread-safe; when calling it from\n * multi-threaded programs, protect it with a locking mechanism.\n */\nint go_sequoia_ensure_library (const char *soname, int flags);\n\n/* Unload library and reset symbols.\n *\n * Note that this function is NOT thread-safe; when calling it from\n * multi-threaded programs, protect it with a locking mechanism.\n */\nvoid go_sequoia_unload_library (void);\n\n/* Return 1 if the library is loaded and usable.\n *\n * Note that this function is NOT thread-safe; when calling it from\n * multi-threaded programs, protect it with a locking mechanism.\n */\nunsigned go_sequoia_is_usable (void);\n\n#endif /* GO_SEQUOIA_H_ */\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sequoia/gosequoiafuncs.h",
    "content": "/*\n * This file was automatically generated from sequoia.h,\n * which is covered by the following license:\n * SPDX-License-Identifier: Apache-2.0\n */\nVOID_FUNC(void, sequoia_error_free, (struct SequoiaError *err_ptr), (err_ptr))\nFUNC(struct SequoiaMechanism *, sequoia_mechanism_new_from_directory, (const char *dir_ptr, struct SequoiaError **err_ptr), (dir_ptr, err_ptr))\nFUNC(struct SequoiaMechanism *, sequoia_mechanism_new_ephemeral, (struct SequoiaError **err_ptr), (err_ptr))\nVOID_FUNC(void, sequoia_mechanism_free, (struct SequoiaMechanism *mechanism_ptr), (mechanism_ptr))\nVOID_FUNC(void, sequoia_signature_free, (struct SequoiaSignature *signature_ptr), (signature_ptr))\nFUNC(const uint8_t *, sequoia_signature_get_data, (const struct SequoiaSignature *signature_ptr, size_t *data_len), (signature_ptr, data_len))\nVOID_FUNC(void, sequoia_verification_result_free, (struct SequoiaVerificationResult *result_ptr), (result_ptr))\nFUNC(const uint8_t *, sequoia_verification_result_get_content, (const struct SequoiaVerificationResult *result_ptr, size_t *data_len), (result_ptr, data_len))\nFUNC(const char *, sequoia_verification_result_get_signer, (const struct SequoiaVerificationResult *result_ptr), (result_ptr))\nFUNC(struct SequoiaSignature *, sequoia_sign, (struct SequoiaMechanism *mechanism_ptr, const char *key_handle_ptr, const char *password_ptr, const uint8_t *data_ptr, size_t data_len, struct SequoiaError **err_ptr), (mechanism_ptr, key_handle_ptr, password_ptr, data_ptr, data_len, err_ptr))\nFUNC(struct SequoiaVerificationResult *, sequoia_verify, (struct SequoiaMechanism *mechanism_ptr, const uint8_t *signature_ptr, size_t signature_len, struct SequoiaError **err_ptr), (mechanism_ptr, signature_ptr, signature_len, err_ptr))\nVOID_FUNC(void, sequoia_import_result_free, (struct SequoiaImportResult *result_ptr), (result_ptr))\nFUNC(size_t, sequoia_import_result_get_count, (const struct SequoiaImportResult *result_ptr), (result_ptr))\nFUNC(const char *, sequoia_import_result_get_content, (const struct SequoiaImportResult *result_ptr, size_t index, struct SequoiaError **err_ptr), (result_ptr, index, err_ptr))\nFUNC(struct SequoiaImportResult *, sequoia_import_keys, (struct SequoiaMechanism *mechanism_ptr, const uint8_t *blob_ptr, size_t blob_len, struct SequoiaError **err_ptr), (mechanism_ptr, blob_ptr, blob_len, err_ptr))\nFUNC(int, sequoia_set_logger_consumer, (void (*consumer)(enum SequoiaLogLevel, const char *), struct SequoiaError **err_ptr), (consumer, err_ptr))\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sequoia/sequoia.go",
    "content": "//go:build containers_image_sequoia\n\npackage sequoia\n\n// #cgo CFLAGS: -I. -DGO_SEQUOIA_ENABLE_DLOPEN=1\n// #include \"gosequoia.h\"\n// #include <dlfcn.h>\n// #include <limits.h>\n// typedef void (*sequoia_logger_consumer_t) (enum SequoiaLogLevel level, char *message);\n// extern void sequoia_logrus_logger (enum SequoiaLogLevel level, char *message);\nimport \"C\"\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"sync\"\n\t\"unsafe\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// sequoiaLibraryDir is the path to the directory where libpodman_sequoia is installed,\n// if it is not in the platform’s default library path.\n// You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/signature/sequoia.sequoiaLibraryDir=$your_path'\nvar sequoiaLibraryDir = \"\"\n\ntype SigningMechanism struct {\n\tmechanism *C.SequoiaMechanism\n}\n\n// NewMechanismFromDirectory initializes a mechanism using (user-managed) Sequoia state\n// in dir, which can be \"\" to indicate the default (using $SEQUOIA_HOME or the default home directory location).\nfunc NewMechanismFromDirectory(\n\tdir string,\n) (*SigningMechanism, error) {\n\tvar cerr *C.SequoiaError\n\tvar cDir *C.char\n\tif dir != \"\" {\n\t\tcDir = C.CString(dir)\n\t\tdefer C.free(unsafe.Pointer(cDir))\n\t}\n\tcMechanism := C.go_sequoia_mechanism_new_from_directory(cDir, &cerr)\n\tif cMechanism == nil {\n\t\tdefer C.go_sequoia_error_free(cerr)\n\t\treturn nil, errors.New(C.GoString(cerr.message))\n\t}\n\treturn &SigningMechanism{\n\t\tmechanism: cMechanism,\n\t}, nil\n}\n\nfunc NewEphemeralMechanism() (*SigningMechanism, error) {\n\tvar cerr *C.SequoiaError\n\tcMechanism := C.go_sequoia_mechanism_new_ephemeral(&cerr)\n\tif cMechanism == nil {\n\t\tdefer C.go_sequoia_error_free(cerr)\n\t\treturn nil, errors.New(C.GoString(cerr.message))\n\t}\n\treturn &SigningMechanism{\n\t\tmechanism: cMechanism,\n\t}, nil\n}\n\nfunc (m *SigningMechanism) SignWithPassphrase(\n\tinput []byte,\n\tkeyIdentity string,\n\tpassphrase string,\n) ([]byte, error) {\n\tvar cerr *C.SequoiaError\n\tvar cPassphrase *C.char\n\tif passphrase == \"\" {\n\t\tcPassphrase = nil\n\t} else {\n\t\tcPassphrase = C.CString(passphrase)\n\t\tdefer C.free(unsafe.Pointer(cPassphrase))\n\t}\n\tcKeyIdentity := C.CString(keyIdentity)\n\tdefer C.free(unsafe.Pointer(cKeyIdentity))\n\tsig := C.go_sequoia_sign(\n\t\tm.mechanism,\n\t\tcKeyIdentity,\n\t\tcPassphrase,\n\t\t(*C.uchar)(unsafe.Pointer(unsafe.SliceData(input))),\n\t\tC.size_t(len(input)),\n\t\t&cerr,\n\t)\n\tif sig == nil {\n\t\tdefer C.go_sequoia_error_free(cerr)\n\t\treturn nil, errors.New(C.GoString(cerr.message))\n\t}\n\tdefer C.go_sequoia_signature_free(sig)\n\tvar size C.size_t\n\tcData := C.go_sequoia_signature_get_data(sig, &size)\n\tif size > C.size_t(C.INT_MAX) {\n\t\treturn nil, errors.New(\"overflow\") // Coverage: This should not reasonably happen, and we don’t want to generate gigabytes of input to test this.\n\t}\n\treturn C.GoBytes(unsafe.Pointer(cData), C.int(size)), nil\n}\n\nfunc (m *SigningMechanism) Sign(\n\tinput []byte,\n\tkeyIdentity string,\n) ([]byte, error) {\n\treturn m.SignWithPassphrase(input, keyIdentity, \"\")\n}\n\nfunc (m *SigningMechanism) Verify(\n\tunverifiedSignature []byte,\n) (contents []byte, keyIdentity string, err error) {\n\tvar cerr *C.SequoiaError\n\tresult := C.go_sequoia_verify(\n\t\tm.mechanism,\n\t\t(*C.uchar)(unsafe.Pointer(unsafe.SliceData(unverifiedSignature))),\n\t\tC.size_t(len(unverifiedSignature)),\n\t\t&cerr,\n\t)\n\tif result == nil {\n\t\tdefer C.go_sequoia_error_free(cerr)\n\t\treturn nil, \"\", errors.New(C.GoString(cerr.message))\n\t}\n\tdefer C.go_sequoia_verification_result_free(result)\n\tvar size C.size_t\n\tcContent := C.go_sequoia_verification_result_get_content(result, &size)\n\tif size > C.size_t(C.INT_MAX) {\n\t\treturn nil, \"\", errors.New(\"overflow\") // Coverage: This should not reasonably happen, and we don’t want to generate gigabytes of input to test this.\n\t}\n\tcontents = C.GoBytes(unsafe.Pointer(cContent), C.int(size))\n\tcSigner := C.go_sequoia_verification_result_get_signer(result)\n\tkeyIdentity = C.GoString(cSigner)\n\treturn contents, keyIdentity, nil\n}\n\nfunc (m *SigningMechanism) ImportKeys(blob []byte) ([]string, error) {\n\tvar cerr *C.SequoiaError\n\tresult := C.go_sequoia_import_keys(\n\t\tm.mechanism,\n\t\t(*C.uchar)(unsafe.Pointer(unsafe.SliceData(blob))),\n\t\tC.size_t(len(blob)),\n\t\t&cerr,\n\t)\n\tif result == nil {\n\t\tdefer C.go_sequoia_error_free(cerr)\n\t\treturn nil, errors.New(C.GoString(cerr.message))\n\t}\n\tdefer C.go_sequoia_import_result_free(result)\n\n\tkeyIdentities := []string{}\n\tcount := C.go_sequoia_import_result_get_count(result)\n\tfor i := C.size_t(0); i < count; i++ {\n\t\tvar cerr *C.SequoiaError\n\t\tcKeyIdentity := C.go_sequoia_import_result_get_content(result, i, &cerr)\n\t\tif cerr != nil {\n\t\t\tdefer C.go_sequoia_error_free(cerr) // Coverage: this can fail only if i is out of range.\n\t\t\treturn nil, errors.New(C.GoString(cerr.message))\n\t\t}\n\t\tkeyIdentities = append(keyIdentities, C.GoString(cKeyIdentity))\n\t}\n\n\treturn keyIdentities, nil\n}\n\nfunc (m *SigningMechanism) Close() error {\n\tC.go_sequoia_mechanism_free(m.mechanism)\n\treturn nil\n}\n\n//export sequoia_logrus_logger\nfunc sequoia_logrus_logger(level C.enum_SequoiaLogLevel, message *C.char) {\n\tvar logrusLevel logrus.Level\n\tswitch level { // Coverage: We are not in control of whether / how the Rust code chooses to log things.\n\tcase C.SEQUOIA_LOG_LEVEL_ERROR:\n\t\tlogrusLevel = logrus.ErrorLevel\n\tcase C.SEQUOIA_LOG_LEVEL_WARN:\n\t\tlogrusLevel = logrus.WarnLevel\n\tcase C.SEQUOIA_LOG_LEVEL_INFO:\n\t\tlogrusLevel = logrus.InfoLevel\n\tcase C.SEQUOIA_LOG_LEVEL_DEBUG:\n\t\tlogrusLevel = logrus.DebugLevel\n\tcase C.SEQUOIA_LOG_LEVEL_TRACE:\n\t\tlogrusLevel = logrus.TraceLevel\n\tcase C.SEQUOIA_LOG_LEVEL_UNKNOWN:\n\t\tfallthrough\n\tdefault:\n\t\tlogrusLevel = logrus.ErrorLevel // Should never happen\n\t}\n\tlogrus.StandardLogger().Log(logrusLevel, C.GoString(message))\n}\n\n// initOnce should only be called by Init.\nfunc initOnce() error {\n\tvar soName string\n\tswitch runtime.GOOS {\n\tcase \"linux\":\n\t\tsoName = \"libpodman_sequoia.so.0\"\n\tcase \"darwin\":\n\t\tsoName = \"libpodman_sequoia.dylib\"\n\tdefault:\n\t\treturn fmt.Errorf(\"Unhandled OS %q in sequoia initialization\", runtime.GOOS) // Coverage: This is ~by definition not reached in tests.\n\t}\n\tif sequoiaLibraryDir != \"\" {\n\t\tsoName = filepath.Join(sequoiaLibraryDir, soName)\n\t}\n\tcSOName := C.CString(soName)\n\tdefer C.free(unsafe.Pointer(cSOName))\n\tif C.go_sequoia_ensure_library(cSOName,\n\t\tC.RTLD_NOW|C.RTLD_GLOBAL) < 0 {\n\t\treturn fmt.Errorf(\"unable to load %q\", soName) // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.\n\t}\n\n\tvar cerr *C.SequoiaError\n\tif C.go_sequoia_set_logger_consumer(C.sequoia_logger_consumer_t(C.sequoia_logrus_logger), &cerr) != 0 {\n\t\tdefer C.go_sequoia_error_free(cerr) // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.\n\t\treturn fmt.Errorf(\"initializing logging: %s\", C.GoString(cerr.message))\n\t}\n\treturn nil\n}\n\n// Init ensures the libpodman_sequoia library is available.\n// It is safe to call from arbitrary goroutines.\nvar Init = sync.OnceValue(initOnce)\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sequoia/sequoia.h",
    "content": "// SPDX-License-Identifier: Apache-2.0\n\n#pragma once\n\n#include <stdarg.h>\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdlib.h>\n\ntypedef enum SequoiaErrorKind {\n  SEQUOIA_ERROR_KIND_UNKNOWN,\n  SEQUOIA_ERROR_KIND_INVALID_ARGUMENT,\n  SEQUOIA_ERROR_KIND_IO_ERROR,\n} SequoiaErrorKind;\n\ntypedef enum SequoiaLogLevel {\n  SEQUOIA_LOG_LEVEL_UNKNOWN,\n  SEQUOIA_LOG_LEVEL_ERROR,\n  SEQUOIA_LOG_LEVEL_WARN,\n  SEQUOIA_LOG_LEVEL_INFO,\n  SEQUOIA_LOG_LEVEL_DEBUG,\n  SEQUOIA_LOG_LEVEL_TRACE,\n} SequoiaLogLevel;\n\ntypedef struct SequoiaImportResult SequoiaImportResult;\n\ntypedef struct SequoiaMechanism SequoiaMechanism;\n\ntypedef struct SequoiaSignature SequoiaSignature;\n\ntypedef struct SequoiaVerificationResult SequoiaVerificationResult;\n\ntypedef struct SequoiaError {\n  enum SequoiaErrorKind kind;\n  char *message;\n} SequoiaError;\n\nvoid sequoia_error_free(struct SequoiaError *err_ptr);\n\nstruct SequoiaMechanism *sequoia_mechanism_new_from_directory(const char *dir_ptr,\n                                                              struct SequoiaError **err_ptr);\n\nstruct SequoiaMechanism *sequoia_mechanism_new_ephemeral(struct SequoiaError **err_ptr);\n\nvoid sequoia_mechanism_free(struct SequoiaMechanism *mechanism_ptr);\n\nvoid sequoia_signature_free(struct SequoiaSignature *signature_ptr);\n\nconst uint8_t *sequoia_signature_get_data(const struct SequoiaSignature *signature_ptr,\n                                          size_t *data_len);\n\nvoid sequoia_verification_result_free(struct SequoiaVerificationResult *result_ptr);\n\nconst uint8_t *sequoia_verification_result_get_content(const struct SequoiaVerificationResult *result_ptr,\n                                                       size_t *data_len);\n\nconst char *sequoia_verification_result_get_signer(const struct SequoiaVerificationResult *result_ptr);\n\nstruct SequoiaSignature *sequoia_sign(struct SequoiaMechanism *mechanism_ptr,\n                                      const char *key_handle_ptr,\n                                      const char *password_ptr,\n                                      const uint8_t *data_ptr,\n                                      size_t data_len,\n                                      struct SequoiaError **err_ptr);\n\nstruct SequoiaVerificationResult *sequoia_verify(struct SequoiaMechanism *mechanism_ptr,\n                                                 const uint8_t *signature_ptr,\n                                                 size_t signature_len,\n                                                 struct SequoiaError **err_ptr);\n\nvoid sequoia_import_result_free(struct SequoiaImportResult *result_ptr);\n\nsize_t sequoia_import_result_get_count(const struct SequoiaImportResult *result_ptr);\n\nconst char *sequoia_import_result_get_content(const struct SequoiaImportResult *result_ptr,\n                                              size_t index,\n                                              struct SequoiaError **err_ptr);\n\nstruct SequoiaImportResult *sequoia_import_keys(struct SequoiaMechanism *mechanism_ptr,\n                                                const uint8_t *blob_ptr,\n                                                size_t blob_len,\n                                                struct SequoiaError **err_ptr);\n\nint sequoia_set_logger_consumer(void (*consumer)(enum SequoiaLogLevel level, const char *message),\n                                struct SequoiaError **err_ptr);\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/internal/sigstore_payload.go",
    "content": "package internal\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\tsigstoreSignature \"github.com/sigstore/sigstore/pkg/signature\"\n\t\"go.podman.io/image/v5/version\"\n)\n\nconst (\n\tsigstoreSignatureType         = \"cosign container image signature\"\n\tsigstoreHarcodedHashAlgorithm = crypto.SHA256\n)\n\n// UntrustedSigstorePayload is a parsed content of a sigstore signature payload (not the full signature)\ntype UntrustedSigstorePayload struct {\n\tuntrustedDockerManifestDigest digest.Digest\n\tuntrustedDockerReference      string // FIXME: more precise type?\n\tuntrustedCreatorID            *string\n\t// This is intentionally an int64; the native JSON float64 type would allow to represent _some_ sub-second precision,\n\t// but not nearly enough (with current timestamp values, a single unit in the last place is on the order of hundreds of nanoseconds).\n\t// So, this is explicitly an int64, and we reject fractional values. If we did need more precise timestamps eventually,\n\t// we would add another field, UntrustedTimestampNS int64.\n\tuntrustedTimestamp *int64\n}\n\n// NewUntrustedSigstorePayload returns an UntrustedSigstorePayload object with\n// the specified primary contents and appropriate metadata.\nfunc NewUntrustedSigstorePayload(dockerManifestDigest digest.Digest, dockerReference string) UntrustedSigstorePayload {\n\t// Use intermediate variables for these values so that we can take their addresses.\n\t// Golang guarantees that they will have a new address on every execution.\n\tcreatorID := \"containers/image \" + version.Version\n\ttimestamp := time.Now().Unix()\n\treturn UntrustedSigstorePayload{\n\t\tuntrustedDockerManifestDigest: dockerManifestDigest,\n\t\tuntrustedDockerReference:      dockerReference,\n\t\tuntrustedCreatorID:            &creatorID,\n\t\tuntrustedTimestamp:            &timestamp,\n\t}\n}\n\n// A compile-time check that UntrustedSigstorePayload and *UntrustedSigstorePayload implements json.Marshaler\nvar (\n\t_ json.Marshaler = UntrustedSigstorePayload{}\n\t_ json.Marshaler = (*UntrustedSigstorePayload)(nil)\n)\n\n// MarshalJSON implements the json.Marshaler interface.\nfunc (s UntrustedSigstorePayload) MarshalJSON() ([]byte, error) {\n\tif s.untrustedDockerManifestDigest == \"\" || s.untrustedDockerReference == \"\" {\n\t\treturn nil, errors.New(\"Unexpected empty signature content\")\n\t}\n\tcritical := map[string]any{\n\t\t\"type\":     sigstoreSignatureType,\n\t\t\"image\":    map[string]string{\"docker-manifest-digest\": s.untrustedDockerManifestDigest.String()},\n\t\t\"identity\": map[string]string{\"docker-reference\": s.untrustedDockerReference},\n\t}\n\toptional := map[string]any{}\n\tif s.untrustedCreatorID != nil {\n\t\toptional[\"creator\"] = *s.untrustedCreatorID\n\t}\n\tif s.untrustedTimestamp != nil {\n\t\toptional[\"timestamp\"] = *s.untrustedTimestamp\n\t}\n\tsignature := map[string]any{\n\t\t\"critical\": critical,\n\t\t\"optional\": optional,\n\t}\n\treturn json.Marshal(signature)\n}\n\n// Compile-time check that UntrustedSigstorePayload implements json.Unmarshaler\nvar _ json.Unmarshaler = (*UntrustedSigstorePayload)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (s *UntrustedSigstorePayload) UnmarshalJSON(data []byte) error {\n\treturn JSONFormatToInvalidSignatureError(s.strictUnmarshalJSON(data))\n}\n\n// strictUnmarshalJSON is UnmarshalJSON, except that it may return the internal JSONFormatError error type.\n// Splitting it into a separate function allows us to do the JSONFormatError → InvalidSignatureError in a single place, the caller.\nfunc (s *UntrustedSigstorePayload) strictUnmarshalJSON(data []byte) error {\n\tvar critical, optional json.RawMessage\n\tif err := ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"critical\": &critical,\n\t\t\"optional\": &optional,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tvar creatorID string\n\tvar timestamp float64\n\tgotCreatorID, gotTimestamp := false, false\n\t// /usr/bin/cosign generates \"optional\": null if there are no user-specified annotations.\n\tif !bytes.Equal(optional, []byte(\"null\")) {\n\t\tif err := ParanoidUnmarshalJSONObject(optional, func(key string) any {\n\t\t\tswitch key {\n\t\t\tcase \"creator\":\n\t\t\t\tgotCreatorID = true\n\t\t\t\treturn &creatorID\n\t\t\tcase \"timestamp\":\n\t\t\t\tgotTimestamp = true\n\t\t\t\treturn &timestamp\n\t\t\tdefault:\n\t\t\t\tvar ignore any\n\t\t\t\treturn &ignore\n\t\t\t}\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif gotCreatorID {\n\t\ts.untrustedCreatorID = &creatorID\n\t}\n\tif gotTimestamp {\n\t\tintTimestamp := int64(timestamp)\n\t\tif float64(intTimestamp) != timestamp {\n\t\t\treturn NewInvalidSignatureError(\"Field optional.timestamp is not an integer\")\n\t\t}\n\t\ts.untrustedTimestamp = &intTimestamp\n\t}\n\n\tvar t string\n\tvar image, identity json.RawMessage\n\tif err := ParanoidUnmarshalJSONObjectExactFields(critical, map[string]any{\n\t\t\"type\":     &t,\n\t\t\"image\":    &image,\n\t\t\"identity\": &identity,\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif t != sigstoreSignatureType {\n\t\treturn NewInvalidSignatureError(fmt.Sprintf(\"Unrecognized signature type %s\", t))\n\t}\n\n\tvar digestString string\n\tif err := ParanoidUnmarshalJSONObjectExactFields(image, map[string]any{\n\t\t\"docker-manifest-digest\": &digestString,\n\t}); err != nil {\n\t\treturn err\n\t}\n\tdigestValue, err := digest.Parse(digestString)\n\tif err != nil {\n\t\treturn NewInvalidSignatureError(fmt.Sprintf(`invalid docker-manifest-digest value %q: %v`, digestString, err))\n\t}\n\ts.untrustedDockerManifestDigest = digestValue\n\n\treturn ParanoidUnmarshalJSONObjectExactFields(identity, map[string]any{\n\t\t\"docker-reference\": &s.untrustedDockerReference,\n\t})\n}\n\n// SigstorePayloadAcceptanceRules specifies how to decide whether an untrusted payload is acceptable.\n// We centralize the actual parsing and data extraction in VerifySigstorePayload; this supplies\n// the policy.  We use an object instead of supplying func parameters to verifyAndExtractSignature\n// because the functions have the same or similar types, so there is a risk of exchanging the functions;\n// named members of this struct are more explicit.\ntype SigstorePayloadAcceptanceRules struct {\n\tValidateSignedDockerReference      func(string) error\n\tValidateSignedDockerManifestDigest func(digest.Digest) error\n}\n\n// verifySigstorePayloadBlobSignature verifies unverifiedSignature of unverifiedPayload was correctly created\n// by any of the public keys in publicKeys.\n//\n// This is an internal implementation detail of VerifySigstorePayload and should have no other callers.\n// It is INSUFFICIENT alone to consider the signature acceptable.\nfunc verifySigstorePayloadBlobSignature(publicKeys []crypto.PublicKey, unverifiedPayload, unverifiedSignature []byte) error {\n\tif len(publicKeys) == 0 {\n\t\treturn errors.New(\"Need at least one public key to verify the sigstore payload, but got 0\")\n\t}\n\n\tverifiers := make([]sigstoreSignature.Verifier, 0, len(publicKeys))\n\tfor _, key := range publicKeys {\n\t\t// Failing to load a verifier indicates that something is really, really\n\t\t// invalid about the public key; prefer to fail even if the signature might be\n\t\t// valid with other keys, so that users fix their fallback keys before they need them.\n\t\t// For that reason, we even initialize all verifiers before trying to validate the signature\n\t\t// with any key.\n\t\tverifier, err := sigstoreSignature.LoadVerifier(key, sigstoreHarcodedHashAlgorithm)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverifiers = append(verifiers, verifier)\n\t}\n\n\tvar failures []string\n\tfor _, verifier := range verifiers {\n\t\t// github.com/sigstore/cosign/pkg/cosign.verifyOCISignature uses signatureoptions.WithContext(),\n\t\t// which seems to be not used by anything. So we don’t bother.\n\t\terr := verifier.VerifySignature(bytes.NewReader(unverifiedSignature), bytes.NewReader(unverifiedPayload))\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\n\t\tfailures = append(failures, err.Error())\n\t}\n\n\tif len(failures) == 0 {\n\t\t// Coverage: We have checked there is at least one public key, any success causes an early return,\n\t\t// and any failure adds an entry to failures => there must be at least one error.\n\t\treturn fmt.Errorf(\"Internal error: signature verification failed but no errors have been recorded\")\n\t}\n\treturn NewInvalidSignatureError(\"cryptographic signature verification failed: \" + strings.Join(failures, \", \"))\n}\n\n// VerifySigstorePayload verifies unverifiedBase64Signature of unverifiedPayload was correctly created by any of the public keys in publicKeys, and that its principal components\n// match expected values, both as specified by rules, and returns it.\n// We return an *UntrustedSigstorePayload, although nothing actually uses it,\n// just to double-check against stupid typos.\nfunc VerifySigstorePayload(publicKeys []crypto.PublicKey, unverifiedPayload []byte, unverifiedBase64Signature string, rules SigstorePayloadAcceptanceRules) (*UntrustedSigstorePayload, error) {\n\tunverifiedSignature, err := base64.StdEncoding.DecodeString(unverifiedBase64Signature)\n\tif err != nil {\n\t\treturn nil, NewInvalidSignatureError(fmt.Sprintf(\"base64 decoding: %v\", err))\n\t}\n\n\tif err := verifySigstorePayloadBlobSignature(publicKeys, unverifiedPayload, unverifiedSignature); err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar unmatchedPayload UntrustedSigstorePayload\n\tif err := json.Unmarshal(unverifiedPayload, &unmatchedPayload); err != nil {\n\t\treturn nil, NewInvalidSignatureError(err.Error())\n\t}\n\tif err := rules.ValidateSignedDockerManifestDigest(unmatchedPayload.untrustedDockerManifestDigest); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := rules.ValidateSignedDockerReference(unmatchedPayload.untrustedDockerReference); err != nil {\n\t\treturn nil, err\n\t}\n\t// SigstorePayloadAcceptanceRules have accepted this value.\n\treturn &unmatchedPayload, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/mechanism.go",
    "content": "// Note: Consider the API unstable until the code supports at least three different image formats or transports.\n\npackage signature\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t// This code is used only to parse the data in an explicitly-untrusted\n\t// code path, where cryptography is not relevant. For now, continue to\n\t// use this frozen deprecated implementation. When mechanism_openpgp.go\n\t// migrates to another implementation, this should migrate as well.\n\t//lint:ignore SA1019 See above\n\t\"golang.org/x/crypto/openpgp\" //nolint:staticcheck\n)\n\n// SigningMechanism abstracts a way to sign binary blobs and verify their signatures.\n// Each mechanism should eventually be closed by calling Close().\ntype SigningMechanism interface {\n\t// Close removes resources associated with the mechanism, if any.\n\tClose() error\n\t// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.\n\tSupportsSigning() error\n\t// Sign creates a (non-detached) signature of input using keyIdentity.\n\t// Fails with a SigningNotSupportedError if the mechanism does not support signing.\n\tSign(input []byte, keyIdentity string) ([]byte, error)\n\t// Verify parses unverifiedSignature and returns the content and the signer's identity.\n\t// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity\n\t// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,\n\t// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.\n\tVerify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error)\n\t// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n\t// along with a short identifier of the key used for signing.\n\t// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n\t// is NOT the same as a \"key identity\" used in other calls to this interface, and\n\t// the values may have no recognizable relationship if the public key is not available.\n\tUntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error)\n}\n\n// signingMechanismWithPassphrase is an internal extension of SigningMechanism.\ntype signingMechanismWithPassphrase interface {\n\tSigningMechanism\n\n\t// Sign creates a (non-detached) signature of input using keyIdentity and passphrase.\n\t// Fails with a SigningNotSupportedError if the mechanism does not support signing.\n\tSignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error)\n}\n\n// signingMechanismWithVerificationIdentityLookup is an internal extension of SigningMechanism.\ntype signingMechanismWithVerificationIdentityLookup interface {\n\tSigningMechanism\n\t// keyIdentityForVerificationKeyIdentity re-checks the key identity returned by Verify\n\t// if it doesn't match an identity returned by NewEphemeralGPGSigningMechanism, trying to match it.\n\t// (To be more specific, for mechanisms which return a subkey fingerprint from Verify,\n\t// this converts the subkey fingerprint into the corresponding primary key fingerprint.)\n\tkeyIdentityForVerificationKeyIdentity(keyIdentity string) (string, error)\n}\n\n// SigningNotSupportedError is returned when trying to sign using a mechanism which does not support that.\ntype SigningNotSupportedError string\n\nfunc (err SigningNotSupportedError) Error() string {\n\treturn string(err)\n}\n\n// NewGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism for the user’s default\n// GPG configuration ($GNUPGHOME / ~/.gnupg)\n// The caller must call .Close() on the returned SigningMechanism.\nfunc NewGPGSigningMechanism() (SigningMechanism, error) {\n\treturn newGPGSigningMechanismInDirectory(\"\")\n}\n\n// NewEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which\n// recognizes _only_ public keys from the supplied blob, and returns the identities\n// of these keys.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc NewEphemeralGPGSigningMechanism(blob []byte) (SigningMechanism, []string, error) {\n\treturn newEphemeralGPGSigningMechanism([][]byte{blob})\n}\n\n// gpgUntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n// along with a short identifier of the key used for signing.\n// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n// is NOT the same as a \"key identity\" used in other calls to this interface, and\n// the values may have no recognizable relationship if the public key is not available.\nfunc gpgUntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {\n\t// This uses the Golang-native OpenPGP implementation instead of gpgme because we are not doing any cryptography.\n\tmd, err := openpgp.ReadMessage(bytes.NewReader(untrustedSignature), openpgp.EntityList{}, nil, nil)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif !md.IsSigned {\n\t\treturn nil, \"\", errors.New(\"The input is not a signature\")\n\t}\n\tcontent, err := io.ReadAll(md.UnverifiedBody)\n\tif err != nil {\n\t\t// Coverage: An error during reading the body can happen only if\n\t\t// 1) the message is encrypted, which is not our case (and we don’t give ReadMessage the key\n\t\t// to decrypt the contents anyway), or\n\t\t// 2) the message is signed AND we give ReadMessage a corresponding public key, which we don’t.\n\t\treturn nil, \"\", err\n\t}\n\n\t// Uppercase the key ID for minimal consistency with the gpgme-returned fingerprints\n\t// (but note that key ID is a suffix of the fingerprint only for V4 keys, not V3)!\n\treturn content, strings.ToUpper(fmt.Sprintf(\"%016X\", md.SignedByKeyId)), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/mechanism_gpgme.go",
    "content": "//go:build !containers_image_openpgp\n\npackage signature\n\n// This is shared by mechanism_gpgme_only.go and mechanism_sequoia.go; in both situations\n// newGPGSigningMechanismInDirectory is implemented using GPGME.\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/proglottis/gpgme\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\n// A GPG/OpenPGP signing mechanism, implemented using gpgme.\ntype gpgmeSigningMechanism struct {\n\tctx          *gpgme.Context\n\tephemeralDir string // If not \"\", a directory to be removed on Close()\n}\n\n// newGPGMESigningMechanism returns a new GPG/OpenPGP signing mechanism for ctx.\n// The caller must call .Close() on the returned SigningMechanism; if ephemeralDir is set,\n// the .Close() call will remove its contents.\nfunc newGPGMESigningMechanism(ctx *gpgme.Context, ephemeralDir string) signingMechanismWithPassphrase {\n\treturn &gpgmeSigningMechanism{\n\t\tctx:          ctx,\n\t\tephemeralDir: ephemeralDir,\n\t}\n}\n\n// newGPGSigningMechanismInDirectory returns a new GPG/OpenPGP signing mechanism, using optionalDir if not empty.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc newGPGSigningMechanismInDirectory(optionalDir string) (signingMechanismWithPassphrase, error) {\n\tctx, err := newGPGMEContext(optionalDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn newGPGMESigningMechanism(ctx, \"\"), nil\n}\n\n// newGPGMEContext returns a new *gpgme.Context, using optionalDir if not empty.\nfunc newGPGMEContext(optionalDir string) (*gpgme.Context, error) {\n\tctx, err := gpgme.New()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err = ctx.SetProtocol(gpgme.ProtocolOpenPGP); err != nil {\n\t\treturn nil, err\n\t}\n\tif optionalDir != \"\" {\n\t\terr := ctx.SetEngineInfo(gpgme.ProtocolOpenPGP, \"\", optionalDir)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tctx.SetArmor(false)\n\tctx.SetTextMode(false)\n\treturn ctx, nil\n}\n\nfunc (m *gpgmeSigningMechanism) Close() error {\n\tif m.ephemeralDir != \"\" {\n\t\tos.RemoveAll(m.ephemeralDir) // Ignore an error, if any\n\t}\n\treturn nil\n}\n\n// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.\nfunc (m *gpgmeSigningMechanism) SupportsSigning() error {\n\treturn nil\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity and passphrase.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *gpgmeSigningMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {\n\tkey, err := m.ctx.GetKey(keyIdentity, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tinputData, err := gpgme.NewDataBytes(input)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar sigBuffer bytes.Buffer\n\tsigData, err := gpgme.NewDataWriter(&sigBuffer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif passphrase != \"\" {\n\t\t// Callback to write the passphrase to the specified file descriptor.\n\t\tcallback := func(uidHint string, prevWasBad bool, gpgmeFD *os.File) error {\n\t\t\tif prevWasBad {\n\t\t\t\treturn errors.New(\"bad passphrase\")\n\t\t\t}\n\t\t\t_, err := gpgmeFD.WriteString(passphrase + \"\\n\")\n\t\t\treturn err\n\t\t}\n\t\tif err := m.ctx.SetCallback(callback); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"setting gpgme passphrase callback: %w\", err)\n\t\t}\n\n\t\t// Loopback mode will use the callback instead of prompting the user.\n\t\tif err := m.ctx.SetPinEntryMode(gpgme.PinEntryLoopback); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"setting gpgme pinentry mode: %w\", err)\n\t\t}\n\t}\n\n\tif err = m.ctx.Sign([]*gpgme.Key{key}, inputData, sigData, gpgme.SigModeNormal); err != nil {\n\t\treturn nil, err\n\t}\n\treturn sigBuffer.Bytes(), nil\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *gpgmeSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {\n\treturn m.SignWithPassphrase(input, keyIdentity, \"\")\n}\n\n// Verify parses unverifiedSignature and returns the content and the signer's identity.\n// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity\n// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,\n// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.\nfunc (m *gpgmeSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {\n\tsignedBuffer := bytes.Buffer{}\n\tsignedData, err := gpgme.NewDataWriter(&signedBuffer)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tunverifiedSignatureData, err := gpgme.NewDataBytes(unverifiedSignature)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\t_, sigs, err := m.ctx.Verify(unverifiedSignatureData, nil, signedData)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif len(sigs) != 1 {\n\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"Unexpected GPG signature count %d\", len(sigs)))\n\t}\n\tsig := sigs[0]\n\t// This is sig.Summary == gpgme.SigSumValid except for key trust, which we handle ourselves\n\tif sig.Status != nil || sig.Validity == gpgme.ValidityNever || sig.ValidityReason != nil || sig.WrongKeyUsage {\n\t\t// FIXME: Better error reporting eventually\n\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"Invalid GPG signature: %#v\", sig))\n\t}\n\treturn signedBuffer.Bytes(), sig.Fingerprint, nil\n}\n\n// keyIdentityForVerificationKeyIdentity re-checks the key identity returned by Verify\n// if it doesn't match an identity returned by NewEphemeralGPGSigningMechanism, trying to match it.\n// (To be more specific, for mechanisms which return a subkey fingerprint from Verify,\n// this converts the subkey fingerprint into the corresponding primary key fingerprint.)\nfunc (m *gpgmeSigningMechanism) keyIdentityForVerificationKeyIdentity(keyIdentity string) (string, error) {\n\t// In theory, if keyIdentity refers to a subkey, the same subkey could be attached to different primary keys;\n\t// in that case, GetKey fails with “ambiguous name”.\n\t// We _could_ handle that, by using KeyList* (GetKey is internally just a helper for KeyList*), but sharing\n\t// a subkey that way is very unexpected, so, for now, prefer the much simpler implementation.\n\tkey, err := m.ctx.GetKey(keyIdentity, false)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t// In theory this value could be nil if (gpg --list-keys --with-colons) misses a \"pub:\" line\n\t// or a \"fpr:\" line, but gpg (in recent enough versions) prints that unconditionally. // codespell:ignore fpr\n\treturn key.Fingerprint(), nil\n}\n\n// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n// along with a short identifier of the key used for signing.\n// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n// is NOT the same as a \"key identity\" used in other calls to this interface, and\n// the values may have no recognizable relationship if the public key is not available.\nfunc (m *gpgmeSigningMechanism) UntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {\n\treturn gpgUntrustedSignatureContents(untrustedSignature)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/mechanism_gpgme_only.go",
    "content": "//go:build !containers_image_openpgp && !containers_image_sequoia\n\npackage signature\n\nimport (\n\t\"os\"\n\n\t\"github.com/proglottis/gpgme\"\n)\n\n// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which\n// recognizes _only_ public keys from the supplied blobs, and returns the identities\n// of these keys.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {\n\tdir, err := os.MkdirTemp(\"\", \"containers-ephemeral-gpg-\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tremoveDir := true\n\tdefer func() {\n\t\tif removeDir {\n\t\t\tos.RemoveAll(dir)\n\t\t}\n\t}()\n\tctx, err := newGPGMEContext(dir)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tkeyIdentities := []string{}\n\tfor _, blob := range blobs {\n\t\tki, err := importKeysFromBytes(ctx, blob)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tkeyIdentities = append(keyIdentities, ki...)\n\t}\n\n\tmech := newGPGMESigningMechanism(ctx, dir)\n\tremoveDir = false\n\treturn mech, keyIdentities, nil\n}\n\n// importKeysFromBytes imports public keys from the supplied blob and returns their identities.\n// The blob is assumed to have an appropriate format (the caller is expected to know which one).\n// NOTE: This may modify long-term state (e.g. key storage in a directory underlying the mechanism);\n// but we do not make this public, it can only be used through newEphemeralGPGSigningMechanism.\nfunc importKeysFromBytes(ctx *gpgme.Context, blob []byte) ([]string, error) {\n\tinputData, err := gpgme.NewDataBytes(blob)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := ctx.Import(inputData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tkeyIdentities := []string{}\n\tfor _, i := range res.Imports {\n\t\tif i.Result == nil {\n\t\t\tkeyIdentities = append(keyIdentities, i.Fingerprint)\n\t\t}\n\t}\n\treturn keyIdentities, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/mechanism_openpgp.go",
    "content": "//go:build containers_image_openpgp\n\npackage signature\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"strings\"\n\t\"time\"\n\n\t\"go.podman.io/image/v5/signature/internal\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\n\t// This is a fallback code; the primary recommendation is to use the gpgme mechanism\n\t// implementation, which is out-of-process and more appropriate for handling long-term private key material\n\t// than any Go implementation.\n\t// For this verify-only fallback, we haven't reviewed any of the\n\t// existing alternatives to choose; so, for now, continue to\n\t// use this frozen deprecated implementation.\n\t//lint:ignore SA1019 See above\n\t\"golang.org/x/crypto/openpgp\" //nolint:staticcheck\n)\n\n// A GPG/OpenPGP signing mechanism, implemented using x/crypto/openpgp.\ntype openpgpSigningMechanism struct {\n\tkeyring openpgp.EntityList\n}\n\n// newGPGSigningMechanismInDirectory returns a new GPG/OpenPGP signing mechanism, using optionalDir if not empty.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc newGPGSigningMechanismInDirectory(optionalDir string) (signingMechanismWithPassphrase, error) {\n\tm := &openpgpSigningMechanism{\n\t\tkeyring: openpgp.EntityList{},\n\t}\n\n\tgpgHome := optionalDir\n\tif gpgHome == \"\" {\n\t\tgpgHome = os.Getenv(\"GNUPGHOME\")\n\t\tif gpgHome == \"\" {\n\t\t\tgpgHome = path.Join(homedir.Get(), \".gnupg\")\n\t\t}\n\t}\n\n\tpubring, err := os.ReadFile(path.Join(gpgHome, \"pubring.gpg\"))\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\t_, err := m.importKeysFromBytes(pubring)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn m, nil\n}\n\n// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which\n// recognizes _only_ public keys from the supplied blob, and returns the identities\n// of these keys.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {\n\tm := &openpgpSigningMechanism{\n\t\tkeyring: openpgp.EntityList{},\n\t}\n\tkeyIdentities := []string{}\n\tfor _, blob := range blobs {\n\t\tki, err := m.importKeysFromBytes(blob)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tkeyIdentities = append(keyIdentities, ki...)\n\t}\n\n\treturn m, keyIdentities, nil\n}\n\nfunc (m *openpgpSigningMechanism) Close() error {\n\treturn nil\n}\n\n// importKeysFromBytes imports public keys from the supplied blob and returns their identities.\n// The blob is assumed to have an appropriate format (the caller is expected to know which one).\nfunc (m *openpgpSigningMechanism) importKeysFromBytes(blob []byte) ([]string, error) {\n\tkeyring, err := openpgp.ReadKeyRing(bytes.NewReader(blob))\n\tif err != nil {\n\t\tk, e2 := openpgp.ReadArmoredKeyRing(bytes.NewReader(blob))\n\t\tif e2 != nil {\n\t\t\treturn nil, err // The original error  -- FIXME: is this better?\n\t\t}\n\t\tkeyring = k\n\t}\n\n\tkeyIdentities := []string{}\n\tfor _, entity := range keyring {\n\t\tif entity.PrimaryKey == nil {\n\t\t\t// Coverage: This should never happen, openpgp.ReadEntity fails with a\n\t\t\t// openpgp.errors.StructuralError instead of returning an entity with this\n\t\t\t// field set to nil.\n\t\t\tcontinue\n\t\t}\n\t\t// Uppercase the fingerprint to be compatible with gpgme\n\t\tkeyIdentities = append(keyIdentities, strings.ToUpper(fmt.Sprintf(\"%x\", entity.PrimaryKey.Fingerprint)))\n\t\tm.keyring = append(m.keyring, entity)\n\t}\n\treturn keyIdentities, nil\n}\n\n// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.\nfunc (m *openpgpSigningMechanism) SupportsSigning() error {\n\treturn SigningNotSupportedError(\"signing is not supported in go.podman.io/image built with the containers_image_openpgp build tag\")\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *openpgpSigningMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {\n\treturn nil, SigningNotSupportedError(\"signing is not supported in go.podman.io/image built with the containers_image_openpgp build tag\")\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *openpgpSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {\n\treturn m.SignWithPassphrase(input, keyIdentity, \"\")\n}\n\n// Verify parses unverifiedSignature and returns the content and the signer's identity.\n// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity\n// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,\n// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.\nfunc (m *openpgpSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {\n\tmd, err := openpgp.ReadMessage(bytes.NewReader(unverifiedSignature), m.keyring, nil, nil)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif !md.IsSigned {\n\t\treturn nil, \"\", errors.New(\"not signed\")\n\t}\n\tcontent, err := io.ReadAll(md.UnverifiedBody)\n\tif err != nil {\n\t\t// Coverage: md.UnverifiedBody.Read only fails if the body is encrypted\n\t\t// (and possibly also signed, but it _must_ be encrypted) and the signing\n\t\t// “modification detection code” detects a mismatch. But in that case,\n\t\t// we would expect the signature verification to fail as well, and that is checked\n\t\t// first.  Besides, we are not supplying any decryption keys, so we really\n\t\t// can never reach this “encrypted data MDC mismatch” path.\n\t\treturn nil, \"\", err\n\t}\n\tif md.SignatureError != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"signature error: %v\", md.SignatureError)\n\t}\n\tif md.SignedBy == nil {\n\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"Key not found for key ID %x in signature\", md.SignedByKeyId))\n\t}\n\tif md.Signature != nil {\n\t\tif md.Signature.SigLifetimeSecs != nil {\n\t\t\texpiry := md.Signature.CreationTime.Add(time.Duration(*md.Signature.SigLifetimeSecs) * time.Second)\n\t\t\tif time.Now().After(expiry) {\n\t\t\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"Signature expired on %s\", expiry))\n\t\t\t}\n\t\t}\n\t} else if md.SignatureV3 == nil {\n\t\t// Coverage: If md.SignedBy != nil, the final md.UnverifiedBody.Read() either sets one of md.Signature or md.SignatureV3,\n\t\t// or sets md.SignatureError.\n\t\treturn nil, \"\", internal.NewInvalidSignatureError(\"Unexpected openpgp.MessageDetails: neither Signature nor SignatureV3 is set\")\n\t}\n\n\t// Uppercase the fingerprint to be compatible with gpgme\n\treturn content, strings.ToUpper(fmt.Sprintf(\"%x\", md.SignedBy.Entity.PrimaryKey.Fingerprint)), nil\n}\n\n// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n// along with a short identifier of the key used for signing.\n// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n// is NOT the same as a \"key identity\" used in other calls to this interface, and\n// the values may have no recognizable relationship if the public key is not available.\nfunc (m *openpgpSigningMechanism) UntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {\n\treturn gpgUntrustedSignatureContents(untrustedSignature)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/mechanism_sequoia.go",
    "content": "//go:build containers_image_sequoia\n\npackage signature\n\nimport (\n\t\"go.podman.io/image/v5/signature/internal/sequoia\"\n)\n\n// A GPG/OpenPGP signing mechanism, implemented using Sequoia and only supporting verification.\n// Legacy users who reach newGPGSigningMechanismInDirectory will use GPGME.\n// Signing using Sequoia is preferable, but should happen via signature/simplesequoia.NewSigner, not using\n// the legacy mechanism API.\ntype sequoiaEphemeralSigningMechanism struct {\n\tinner *sequoia.SigningMechanism\n}\n\n// newEphemeralGPGSigningMechanism returns a new GPG/OpenPGP signing mechanism which\n// recognizes _only_ public keys from the supplied blobs, and returns the identities\n// of these keys.\n// The caller must call .Close() on the returned SigningMechanism.\nfunc newEphemeralGPGSigningMechanism(blobs [][]byte) (signingMechanismWithPassphrase, []string, error) {\n\tif err := sequoia.Init(); err != nil {\n\t\treturn nil, nil, err // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.\n\t}\n\n\tmech, err := sequoia.NewEphemeralMechanism()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tkeyIdentities := []string{}\n\tfor _, blob := range blobs {\n\t\tki, err := mech.ImportKeys(blob)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tkeyIdentities = append(keyIdentities, ki...)\n\t}\n\n\treturn &sequoiaEphemeralSigningMechanism{\n\t\tinner: mech,\n\t}, keyIdentities, nil\n}\n\nfunc (m *sequoiaEphemeralSigningMechanism) Close() error {\n\treturn m.inner.Close()\n}\n\n// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.\nfunc (m *sequoiaEphemeralSigningMechanism) SupportsSigning() error {\n\t// This code is externally reachable via NewEphemeralGPGSigningMechanism(), but that API provides no way to\n\t// import or generate a key.\n\treturn SigningNotSupportedError(\"caller error: Attempt to sign using a mechanism created via NewEphemeralGPGSigningMechanism().\")\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity and passphrase.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *sequoiaEphemeralSigningMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {\n\t// This code is externally reachable via NewEphemeralGPGSigningMechanism(), but that API provides no way to\n\t// import or generate a key.\n\treturn nil, SigningNotSupportedError(\"caller error: Attempt to sign using a mechanism created via NewEphemeralGPGSigningMechanism().\")\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *sequoiaEphemeralSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {\n\treturn m.SignWithPassphrase(input, keyIdentity, \"\")\n}\n\n// Verify parses unverifiedSignature and returns the content and the signer's identity.\n// For mechanisms created using NewEphemeralGPGSigningMechanism, the returned key identity\n// is expected to be one of the values returned by NewEphemeralGPGSigningMechanism,\n// or the mechanism should implement signingMechanismWithVerificationIdentityLookup.\nfunc (m *sequoiaEphemeralSigningMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {\n\treturn m.inner.Verify(unverifiedSignature)\n}\n\n// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n// along with a short identifier of the key used for signing.\n// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n// is NOT the same as a \"key identity\" used in other calls to this interface, and\n// the values may have no recognizable relationship if the public key is not available.\nfunc (m *sequoiaEphemeralSigningMechanism) UntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {\n\treturn gpgUntrustedSignatureContents(untrustedSignature)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/pki_cert.go",
    "content": "package signature\n\nimport (\n\t\"crypto\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\ntype pkiTrustRoot struct {\n\tcaRootsCertificates        *x509.CertPool\n\tcaIntermediateCertificates *x509.CertPool\n\tsubjectEmail               string\n\tsubjectHostname            string\n}\n\nfunc (p *pkiTrustRoot) validate() error {\n\tif p.subjectEmail == \"\" && p.subjectHostname == \"\" {\n\t\treturn errors.New(\"Internal inconsistency: PKI use set up without subject email or subject hostname\")\n\t}\n\treturn nil\n}\n\nfunc verifyPKI(pkiTrustRoot *pkiTrustRoot, untrustedCertificateBytes []byte, untrustedIntermediateChainBytes []byte) (crypto.PublicKey, error) {\n\tvar untrustedIntermediatePool *x509.CertPool\n\tif pkiTrustRoot.caIntermediateCertificates != nil {\n\t\tuntrustedIntermediatePool = pkiTrustRoot.caIntermediateCertificates.Clone()\n\t} else {\n\t\tuntrustedIntermediatePool = x509.NewCertPool()\n\t}\n\tif len(untrustedIntermediateChainBytes) > 0 {\n\t\tuntrustedIntermediateChain, err := cryptoutils.UnmarshalCertificatesFromPEM(untrustedIntermediateChainBytes)\n\t\tif err != nil {\n\t\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"loading certificate chain: %v\", err))\n\t\t}\n\t\tif len(untrustedIntermediateChain) > 1 {\n\t\t\tfor _, untrustedIntermediateCert := range untrustedIntermediateChain[:len(untrustedIntermediateChain)-1] {\n\t\t\t\tuntrustedIntermediatePool.AddCert(untrustedIntermediateCert)\n\t\t\t}\n\t\t}\n\t}\n\n\tuntrustedCertificate, err := parseLeafCertFromPEM(untrustedCertificateBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, err := untrustedCertificate.Verify(x509.VerifyOptions{\n\t\tIntermediates: untrustedIntermediatePool,\n\t\tRoots:         pkiTrustRoot.caRootsCertificates,\n\t\tKeyUsages:     []x509.ExtKeyUsage{x509.ExtKeyUsageCodeSigning},\n\t}); err != nil {\n\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"veryfing leaf certificate failed: %v\", err))\n\t}\n\n\tif pkiTrustRoot.subjectEmail != \"\" {\n\t\tif !slices.Contains(untrustedCertificate.EmailAddresses, pkiTrustRoot.subjectEmail) {\n\t\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"Required email %q not found (got %q)\",\n\t\t\t\tpkiTrustRoot.subjectEmail,\n\t\t\t\tuntrustedCertificate.EmailAddresses))\n\t\t}\n\t}\n\tif pkiTrustRoot.subjectHostname != \"\" {\n\t\tif err = untrustedCertificate.VerifyHostname(pkiTrustRoot.subjectHostname); err != nil {\n\t\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"Unexpected subject hostname: %v\", err))\n\t\t}\n\t}\n\n\treturn untrustedCertificate.PublicKey, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_config.go",
    "content": "// policy_config.go handles creation of policy objects, either by parsing JSON\n// or by programs building them programmatically.\n\n// The New* constructors are intended to be a stable API. FIXME: after an independent review.\n\n// Do not invoke the internals of the JSON marshaling/unmarshaling directly.\n\n// We can't just blindly call json.Unmarshal because that would silently ignore\n// typos, and that would just not do for security policy.\n\n// FIXME? This is by no means an user-friendly parser: No location information in error messages, no other context.\n// But at least it is not worse than blind json.Unmarshal()…\n\npackage signature\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/signature/internal\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// systemDefaultPolicyPath is the policy path used for DefaultPolicy().\n// You can override this at build time with\n// -ldflags '-X go.podman.io/image/v5/signature.systemDefaultPolicyPath=$your_path'\nvar systemDefaultPolicyPath = builtinDefaultPolicyPath\n\n// userPolicyFile is the path to the per user policy path.\nvar userPolicyFile = filepath.FromSlash(\".config/containers/policy.json\")\n\n// InvalidPolicyFormatError is returned when parsing an invalid policy configuration.\ntype InvalidPolicyFormatError string\n\nfunc (err InvalidPolicyFormatError) Error() string {\n\treturn string(err)\n}\n\n// DefaultPolicy returns the default policy of the system.\n// Most applications should be using this method to get the policy configured\n// by the system administrator.\n// sys should usually be nil, can be set to override the default.\n// NOTE: When this function returns an error, report it to the user and abort.\n// DO NOT hard-code fallback policies in your application.\nfunc DefaultPolicy(sys *types.SystemContext) (*Policy, error) {\n\tpolicyPath, err := defaultPolicyPath(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewPolicyFromFile(policyPath)\n}\n\n// defaultPolicyPath returns a path to the relevant policy of the system, or an error if the policy is missing.\nfunc defaultPolicyPath(sys *types.SystemContext) (string, error) {\n\tpolicyFilePath, err := defaultPolicyPathWithHomeDir(sys, homedir.Get(), systemDefaultPolicyPath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn policyFilePath, nil\n}\n\n// defaultPolicyPathWithHomeDir is an internal implementation detail of defaultPolicyPath,\n// it exists only to allow testing it with artificial paths.\nfunc defaultPolicyPathWithHomeDir(sys *types.SystemContext, homeDir string, systemPolicyPath string) (string, error) {\n\tif sys != nil && sys.SignaturePolicyPath != \"\" {\n\t\treturn sys.SignaturePolicyPath, nil\n\t}\n\tuserPolicyFilePath := filepath.Join(homeDir, userPolicyFile)\n\tif err := fileutils.Exists(userPolicyFilePath); err == nil {\n\t\treturn userPolicyFilePath, nil\n\t}\n\tif sys != nil && sys.RootForImplicitAbsolutePaths != \"\" {\n\t\treturn filepath.Join(sys.RootForImplicitAbsolutePaths, systemPolicyPath), nil\n\t}\n\tif err := fileutils.Exists(systemPolicyPath); err == nil {\n\t\treturn systemPolicyPath, nil\n\t}\n\treturn \"\", fmt.Errorf(\"no policy.json file found at any of the following: %q, %q\", userPolicyFilePath, systemPolicyPath)\n}\n\n// NewPolicyFromFile returns a policy configured in the specified file.\nfunc NewPolicyFromFile(fileName string) (*Policy, error) {\n\tcontents, err := os.ReadFile(fileName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpolicy, err := NewPolicyFromBytes(contents)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid policy in %q: %w\", fileName, err)\n\t}\n\treturn policy, nil\n}\n\n// NewPolicyFromBytes returns a policy parsed from the specified blob.\n// Use this function instead of calling json.Unmarshal directly.\nfunc NewPolicyFromBytes(data []byte) (*Policy, error) {\n\tp := Policy{}\n\tif err := json.Unmarshal(data, &p); err != nil {\n\t\treturn nil, InvalidPolicyFormatError(err.Error())\n\t}\n\treturn &p, nil\n}\n\n// Compile-time check that Policy implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*Policy)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (p *Policy) UnmarshalJSON(data []byte) error {\n\t*p = Policy{}\n\ttransports := policyTransportsMap{}\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tswitch key {\n\t\tcase \"default\":\n\t\t\treturn &p.Default\n\t\tcase \"transports\":\n\t\t\treturn &transports\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif p.Default == nil {\n\t\treturn InvalidPolicyFormatError(\"Default policy is missing\")\n\t}\n\tp.Transports = map[string]PolicyTransportScopes(transports)\n\treturn nil\n}\n\n// policyTransportsMap is a specialization of this map type for the strict JSON parsing semantics appropriate for the Policy.Transports member.\ntype policyTransportsMap map[string]PolicyTransportScopes\n\n// Compile-time check that policyTransportsMap implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*policyTransportsMap)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (m *policyTransportsMap) UnmarshalJSON(data []byte) error {\n\t// We can't unmarshal directly into map values because it is not possible to take an address of a map value.\n\t// So, use a temporary map of pointers-to-slices and convert.\n\ttmpMap := map[string]*PolicyTransportScopes{}\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\t// transport can be nil\n\t\ttransport := transports.Get(key)\n\t\t// internal.ParanoidUnmarshalJSONObject detects key duplication for us, check just to be safe.\n\t\tif _, ok := tmpMap[key]; ok {\n\t\t\treturn nil\n\t\t}\n\t\tptsWithTransport := policyTransportScopesWithTransport{\n\t\t\ttransport: transport,\n\t\t\tdest:      &PolicyTransportScopes{}, // This allocates a new instance on each call.\n\t\t}\n\t\ttmpMap[key] = ptsWithTransport.dest\n\t\treturn &ptsWithTransport\n\t}); err != nil {\n\t\treturn err\n\t}\n\tfor key, ptr := range tmpMap {\n\t\t(*m)[key] = *ptr\n\t}\n\treturn nil\n}\n\n// Compile-time check that PolicyTransportScopes \"implements\"\" json.Unmarshaler.\n// we want to only use policyTransportScopesWithTransport\nvar _ json.Unmarshaler = (*PolicyTransportScopes)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (m *PolicyTransportScopes) UnmarshalJSON(data []byte) error {\n\treturn errors.New(\"Do not try to unmarshal PolicyTransportScopes directly\")\n}\n\n// policyTransportScopesWithTransport is a way to unmarshal a PolicyTransportScopes\n// while validating using a specific ImageTransport if not nil.\ntype policyTransportScopesWithTransport struct {\n\ttransport types.ImageTransport\n\tdest      *PolicyTransportScopes\n}\n\n// Compile-time check that policyTransportScopesWithTransport implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*policyTransportScopesWithTransport)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (m *policyTransportScopesWithTransport) UnmarshalJSON(data []byte) error {\n\t// We can't unmarshal directly into map values because it is not possible to take an address of a map value.\n\t// So, use a temporary map of pointers-to-slices and convert.\n\ttmpMap := map[string]*PolicyRequirements{}\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\t// internal.ParanoidUnmarshalJSONObject detects key duplication for us, check just to be safe.\n\t\tif _, ok := tmpMap[key]; ok {\n\t\t\treturn nil\n\t\t}\n\t\tif key != \"\" && m.transport != nil {\n\t\t\tif err := m.transport.ValidatePolicyConfigurationScope(key); err != nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tptr := &PolicyRequirements{} // This allocates a new instance on each call.\n\t\ttmpMap[key] = ptr\n\t\treturn ptr\n\t}); err != nil {\n\t\treturn err\n\t}\n\tfor key, ptr := range tmpMap {\n\t\t(*m.dest)[key] = *ptr\n\t}\n\treturn nil\n}\n\n// Compile-time check that PolicyRequirements implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*PolicyRequirements)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (m *PolicyRequirements) UnmarshalJSON(data []byte) error {\n\treqJSONs := []json.RawMessage{}\n\tif err := json.Unmarshal(data, &reqJSONs); err != nil {\n\t\treturn err\n\t}\n\tif len(reqJSONs) == 0 {\n\t\treturn InvalidPolicyFormatError(\"List of verification policy requirements must not be empty\")\n\t}\n\tres := make([]PolicyRequirement, len(reqJSONs))\n\tfor i, reqJSON := range reqJSONs {\n\t\treq, err := newPolicyRequirementFromJSON(reqJSON)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tres[i] = req\n\t}\n\t*m = res\n\treturn nil\n}\n\n// newPolicyRequirementFromJSON parses JSON data into a PolicyRequirement implementation.\nfunc newPolicyRequirementFromJSON(data []byte) (PolicyRequirement, error) {\n\tvar typeField prCommon\n\tif err := json.Unmarshal(data, &typeField); err != nil {\n\t\treturn nil, err\n\t}\n\tvar res PolicyRequirement\n\tswitch typeField.Type {\n\tcase prTypeInsecureAcceptAnything:\n\t\tres = &prInsecureAcceptAnything{}\n\tcase prTypeReject:\n\t\tres = &prReject{}\n\tcase prTypeSignedBy:\n\t\tres = &prSignedBy{}\n\tcase prTypeSignedBaseLayer:\n\t\tres = &prSignedBaseLayer{}\n\tcase prTypeSigstoreSigned:\n\t\tres = &prSigstoreSigned{}\n\tdefault:\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"Unknown policy requirement type %q\", typeField.Type))\n\t}\n\tif err := json.Unmarshal(data, &res); err != nil {\n\t\treturn nil, err\n\t}\n\treturn res, nil\n}\n\n// newPRInsecureAcceptAnything is NewPRInsecureAcceptAnything, except it returns the private type.\nfunc newPRInsecureAcceptAnything() *prInsecureAcceptAnything {\n\treturn &prInsecureAcceptAnything{prCommon{Type: prTypeInsecureAcceptAnything}}\n}\n\n// NewPRInsecureAcceptAnything returns a new \"insecureAcceptAnything\" PolicyRequirement.\nfunc NewPRInsecureAcceptAnything() PolicyRequirement {\n\treturn newPRInsecureAcceptAnything()\n}\n\n// Compile-time check that prInsecureAcceptAnything implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prInsecureAcceptAnything)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (pr *prInsecureAcceptAnything) UnmarshalJSON(data []byte) error {\n\t*pr = prInsecureAcceptAnything{}\n\tvar tmp prInsecureAcceptAnything\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\": &tmp.Type,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prTypeInsecureAcceptAnything {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\t*pr = *newPRInsecureAcceptAnything()\n\treturn nil\n}\n\n// newPRReject is NewPRReject, except it returns the private type.\nfunc newPRReject() *prReject {\n\treturn &prReject{prCommon{Type: prTypeReject}}\n}\n\n// NewPRReject returns a new \"reject\" PolicyRequirement.\nfunc NewPRReject() PolicyRequirement {\n\treturn newPRReject()\n}\n\n// Compile-time check that prReject implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prReject)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (pr *prReject) UnmarshalJSON(data []byte) error {\n\t*pr = prReject{}\n\tvar tmp prReject\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\": &tmp.Type,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prTypeReject {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\t*pr = *newPRReject()\n\treturn nil\n}\n\n// newPRSignedBy returns a new prSignedBy if parameters are valid.\nfunc newPRSignedBy(keyType sbKeyType, keyPath string, keyPaths []string, keyData []byte, signedIdentity PolicyReferenceMatch) (*prSignedBy, error) {\n\tif !keyType.IsValid() {\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"invalid keyType %q\", keyType))\n\t}\n\tkeySources := 0\n\tif keyPath != \"\" {\n\t\tkeySources++\n\t}\n\tif keyPaths != nil {\n\t\tkeySources++\n\t}\n\tif keyData != nil {\n\t\tkeySources++\n\t}\n\tif keySources != 1 {\n\t\treturn nil, InvalidPolicyFormatError(\"exactly one of keyPath, keyPaths and keyData must be specified\")\n\t}\n\tif signedIdentity == nil {\n\t\treturn nil, InvalidPolicyFormatError(\"signedIdentity not specified\")\n\t}\n\treturn &prSignedBy{\n\t\tprCommon:       prCommon{Type: prTypeSignedBy},\n\t\tKeyType:        keyType,\n\t\tKeyPath:        keyPath,\n\t\tKeyPaths:       keyPaths,\n\t\tKeyData:        keyData,\n\t\tSignedIdentity: signedIdentity,\n\t}, nil\n}\n\n// newPRSignedByKeyPath is NewPRSignedByKeyPath, except it returns the private type.\nfunc newPRSignedByKeyPath(keyType sbKeyType, keyPath string, signedIdentity PolicyReferenceMatch) (*prSignedBy, error) {\n\treturn newPRSignedBy(keyType, keyPath, nil, nil, signedIdentity)\n}\n\n// NewPRSignedByKeyPath returns a new \"signedBy\" PolicyRequirement using a KeyPath\nfunc NewPRSignedByKeyPath(keyType sbKeyType, keyPath string, signedIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn newPRSignedByKeyPath(keyType, keyPath, signedIdentity)\n}\n\n// newPRSignedByKeyPaths is NewPRSignedByKeyPaths, except it returns the private type.\nfunc newPRSignedByKeyPaths(keyType sbKeyType, keyPaths []string, signedIdentity PolicyReferenceMatch) (*prSignedBy, error) {\n\treturn newPRSignedBy(keyType, \"\", keyPaths, nil, signedIdentity)\n}\n\n// NewPRSignedByKeyPaths returns a new \"signedBy\" PolicyRequirement using KeyPaths\nfunc NewPRSignedByKeyPaths(keyType sbKeyType, keyPaths []string, signedIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn newPRSignedByKeyPaths(keyType, keyPaths, signedIdentity)\n}\n\n// newPRSignedByKeyData is NewPRSignedByKeyData, except it returns the private type.\nfunc newPRSignedByKeyData(keyType sbKeyType, keyData []byte, signedIdentity PolicyReferenceMatch) (*prSignedBy, error) {\n\treturn newPRSignedBy(keyType, \"\", nil, keyData, signedIdentity)\n}\n\n// NewPRSignedByKeyData returns a new \"signedBy\" PolicyRequirement using a KeyData\nfunc NewPRSignedByKeyData(keyType sbKeyType, keyData []byte, signedIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn newPRSignedByKeyData(keyType, keyData, signedIdentity)\n}\n\n// Compile-time check that prSignedBy implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prSignedBy)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (pr *prSignedBy) UnmarshalJSON(data []byte) error {\n\t*pr = prSignedBy{}\n\tvar tmp prSignedBy\n\tgotKeyPath, gotKeyPaths, gotKeyData := false, false, false\n\tvar signedIdentity json.RawMessage\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tswitch key {\n\t\tcase \"type\":\n\t\t\treturn &tmp.Type\n\t\tcase \"keyType\":\n\t\t\treturn &tmp.KeyType\n\t\tcase \"keyPath\":\n\t\t\tgotKeyPath = true\n\t\t\treturn &tmp.KeyPath\n\t\tcase \"keyPaths\":\n\t\t\tgotKeyPaths = true\n\t\t\treturn &tmp.KeyPaths\n\t\tcase \"keyData\":\n\t\t\tgotKeyData = true\n\t\t\treturn &tmp.KeyData\n\t\tcase \"signedIdentity\":\n\t\t\treturn &signedIdentity\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prTypeSignedBy {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\tif signedIdentity == nil {\n\t\ttmp.SignedIdentity = NewPRMMatchRepoDigestOrExact()\n\t} else {\n\t\tsi, err := newPolicyReferenceMatchFromJSON(signedIdentity)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmp.SignedIdentity = si\n\t}\n\n\tvar res *prSignedBy\n\tvar err error\n\tswitch {\n\tcase gotKeyPath && !gotKeyPaths && !gotKeyData:\n\t\tres, err = newPRSignedByKeyPath(tmp.KeyType, tmp.KeyPath, tmp.SignedIdentity)\n\tcase !gotKeyPath && gotKeyPaths && !gotKeyData:\n\t\tres, err = newPRSignedByKeyPaths(tmp.KeyType, tmp.KeyPaths, tmp.SignedIdentity)\n\tcase !gotKeyPath && !gotKeyPaths && gotKeyData:\n\t\tres, err = newPRSignedByKeyData(tmp.KeyType, tmp.KeyData, tmp.SignedIdentity)\n\tcase !gotKeyPath && !gotKeyPaths && !gotKeyData:\n\t\treturn InvalidPolicyFormatError(\"Exactly one of keyPath, keyPaths and keyData must be specified, none of them present\")\n\tdefault:\n\t\treturn fmt.Errorf(\"Exactly one of keyPath, keyPaths and keyData must be specified, more than one present\")\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\t*pr = *res\n\n\treturn nil\n}\n\n// IsValid returns true iff kt is a recognized value\nfunc (kt sbKeyType) IsValid() bool {\n\tswitch kt {\n\tcase SBKeyTypeGPGKeys, SBKeyTypeSignedByGPGKeys,\n\t\tSBKeyTypeX509Certificates, SBKeyTypeSignedByX509CAs:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// Compile-time check that sbKeyType implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*sbKeyType)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (kt *sbKeyType) UnmarshalJSON(data []byte) error {\n\t*kt = sbKeyType(\"\")\n\tvar s string\n\tif err := json.Unmarshal(data, &s); err != nil {\n\t\treturn err\n\t}\n\tif !sbKeyType(s).IsValid() {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unrecognized keyType value %q\", s))\n\t}\n\t*kt = sbKeyType(s)\n\treturn nil\n}\n\n// newPRSignedBaseLayer is NewPRSignedBaseLayer, except it returns the private type.\nfunc newPRSignedBaseLayer(baseLayerIdentity PolicyReferenceMatch) (*prSignedBaseLayer, error) {\n\tif baseLayerIdentity == nil {\n\t\treturn nil, InvalidPolicyFormatError(\"baseLayerIdentity not specified\")\n\t}\n\treturn &prSignedBaseLayer{\n\t\tprCommon:          prCommon{Type: prTypeSignedBaseLayer},\n\t\tBaseLayerIdentity: baseLayerIdentity,\n\t}, nil\n}\n\n// NewPRSignedBaseLayer returns a new \"signedBaseLayer\" PolicyRequirement.\nfunc NewPRSignedBaseLayer(baseLayerIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn newPRSignedBaseLayer(baseLayerIdentity)\n}\n\n// Compile-time check that prSignedBaseLayer implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prSignedBaseLayer)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (pr *prSignedBaseLayer) UnmarshalJSON(data []byte) error {\n\t*pr = prSignedBaseLayer{}\n\tvar tmp prSignedBaseLayer\n\tvar baseLayerIdentity json.RawMessage\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\":              &tmp.Type,\n\t\t\"baseLayerIdentity\": &baseLayerIdentity,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prTypeSignedBaseLayer {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\tbli, err := newPolicyReferenceMatchFromJSON(baseLayerIdentity)\n\tif err != nil {\n\t\treturn err\n\t}\n\tres, err := newPRSignedBaseLayer(bli)\n\tif err != nil {\n\t\t// Coverage: This should never happen, newPolicyReferenceMatchFromJSON has ensured bli is valid.\n\t\treturn err\n\t}\n\t*pr = *res\n\treturn nil\n}\n\n// newPolicyReferenceMatchFromJSON parses JSON data into a PolicyReferenceMatch implementation.\nfunc newPolicyReferenceMatchFromJSON(data []byte) (PolicyReferenceMatch, error) {\n\tvar typeField prmCommon\n\tif err := json.Unmarshal(data, &typeField); err != nil {\n\t\treturn nil, err\n\t}\n\tvar res PolicyReferenceMatch\n\tswitch typeField.Type {\n\tcase prmTypeMatchExact:\n\t\tres = &prmMatchExact{}\n\tcase prmTypeMatchRepoDigestOrExact:\n\t\tres = &prmMatchRepoDigestOrExact{}\n\tcase prmTypeMatchRepository:\n\t\tres = &prmMatchRepository{}\n\tcase prmTypeExactReference:\n\t\tres = &prmExactReference{}\n\tcase prmTypeExactRepository:\n\t\tres = &prmExactRepository{}\n\tcase prmTypeRemapIdentity:\n\t\tres = &prmRemapIdentity{}\n\tdefault:\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"Unknown policy reference match type %q\", typeField.Type))\n\t}\n\tif err := json.Unmarshal(data, &res); err != nil {\n\t\treturn nil, err\n\t}\n\treturn res, nil\n}\n\n// newPRMMatchExact is NewPRMMatchExact, except it returns the private type.\nfunc newPRMMatchExact() *prmMatchExact {\n\treturn &prmMatchExact{prmCommon{Type: prmTypeMatchExact}}\n}\n\n// NewPRMMatchExact returns a new \"matchExact\" PolicyReferenceMatch.\nfunc NewPRMMatchExact() PolicyReferenceMatch {\n\treturn newPRMMatchExact()\n}\n\n// Compile-time check that prmMatchExact implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmMatchExact)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmMatchExact) UnmarshalJSON(data []byte) error {\n\t*prm = prmMatchExact{}\n\tvar tmp prmMatchExact\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\": &tmp.Type,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeMatchExact {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\t*prm = *newPRMMatchExact()\n\treturn nil\n}\n\n// newPRMMatchRepoDigestOrExact is NewPRMMatchRepoDigestOrExact, except it returns the private type.\nfunc newPRMMatchRepoDigestOrExact() *prmMatchRepoDigestOrExact {\n\treturn &prmMatchRepoDigestOrExact{prmCommon{Type: prmTypeMatchRepoDigestOrExact}}\n}\n\n// NewPRMMatchRepoDigestOrExact returns a new \"matchRepoDigestOrExact\" PolicyReferenceMatch.\nfunc NewPRMMatchRepoDigestOrExact() PolicyReferenceMatch {\n\treturn newPRMMatchRepoDigestOrExact()\n}\n\n// Compile-time check that prmMatchRepoDigestOrExact implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmMatchRepoDigestOrExact)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmMatchRepoDigestOrExact) UnmarshalJSON(data []byte) error {\n\t*prm = prmMatchRepoDigestOrExact{}\n\tvar tmp prmMatchRepoDigestOrExact\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\": &tmp.Type,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeMatchRepoDigestOrExact {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\t*prm = *newPRMMatchRepoDigestOrExact()\n\treturn nil\n}\n\n// newPRMMatchRepository is NewPRMMatchRepository, except it returns the private type.\nfunc newPRMMatchRepository() *prmMatchRepository {\n\treturn &prmMatchRepository{prmCommon{Type: prmTypeMatchRepository}}\n}\n\n// NewPRMMatchRepository returns a new \"matchRepository\" PolicyReferenceMatch.\nfunc NewPRMMatchRepository() PolicyReferenceMatch {\n\treturn newPRMMatchRepository()\n}\n\n// Compile-time check that prmMatchRepository implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmMatchRepository)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmMatchRepository) UnmarshalJSON(data []byte) error {\n\t*prm = prmMatchRepository{}\n\tvar tmp prmMatchRepository\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\": &tmp.Type,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeMatchRepository {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\t*prm = *newPRMMatchRepository()\n\treturn nil\n}\n\n// newPRMExactReference is NewPRMExactReference, except it returns the private type.\nfunc newPRMExactReference(dockerReference string) (*prmExactReference, error) {\n\tref, err := reference.ParseNormalizedNamed(dockerReference)\n\tif err != nil {\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"Invalid format of dockerReference %q: %s\", dockerReference, err.Error()))\n\t}\n\tif reference.IsNameOnly(ref) {\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"dockerReference %q contains neither a tag nor digest\", dockerReference))\n\t}\n\treturn &prmExactReference{\n\t\tprmCommon:       prmCommon{Type: prmTypeExactReference},\n\t\tDockerReference: dockerReference,\n\t}, nil\n}\n\n// NewPRMExactReference returns a new \"exactReference\" PolicyReferenceMatch.\nfunc NewPRMExactReference(dockerReference string) (PolicyReferenceMatch, error) {\n\treturn newPRMExactReference(dockerReference)\n}\n\n// Compile-time check that prmExactReference implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmExactReference)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmExactReference) UnmarshalJSON(data []byte) error {\n\t*prm = prmExactReference{}\n\tvar tmp prmExactReference\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\":            &tmp.Type,\n\t\t\"dockerReference\": &tmp.DockerReference,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeExactReference {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\n\tres, err := newPRMExactReference(tmp.DockerReference)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*prm = *res\n\treturn nil\n}\n\n// newPRMExactRepository is NewPRMExactRepository, except it returns the private type.\nfunc newPRMExactRepository(dockerRepository string) (*prmExactRepository, error) {\n\tif _, err := reference.ParseNormalizedNamed(dockerRepository); err != nil {\n\t\treturn nil, InvalidPolicyFormatError(fmt.Sprintf(\"Invalid format of dockerRepository %q: %s\", dockerRepository, err.Error()))\n\t}\n\treturn &prmExactRepository{\n\t\tprmCommon:        prmCommon{Type: prmTypeExactRepository},\n\t\tDockerRepository: dockerRepository,\n\t}, nil\n}\n\n// NewPRMExactRepository returns a new \"exactRepository\" PolicyRepositoryMatch.\nfunc NewPRMExactRepository(dockerRepository string) (PolicyReferenceMatch, error) {\n\treturn newPRMExactRepository(dockerRepository)\n}\n\n// Compile-time check that prmExactRepository implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmExactRepository)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmExactRepository) UnmarshalJSON(data []byte) error {\n\t*prm = prmExactRepository{}\n\tvar tmp prmExactRepository\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\":             &tmp.Type,\n\t\t\"dockerRepository\": &tmp.DockerRepository,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeExactRepository {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\n\tres, err := newPRMExactRepository(tmp.DockerRepository)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*prm = *res\n\treturn nil\n}\n\n// Private objects for validateIdentityRemappingPrefix\nvar (\n\t// remapIdentityDomainRegexp matches exactly a reference domain (name[:port])\n\tremapIdentityDomainRegexp = regexp.Delayed(\"^\" + reference.DomainRegexp.String() + \"$\")\n\t// remapIdentityDomainPrefixRegexp matches a reference that starts with a domain;\n\t// we need this because reference.NameRegexp accepts short names with docker.io implied.\n\tremapIdentityDomainPrefixRegexp = regexp.Delayed(\"^\" + reference.DomainRegexp.String() + \"/\")\n\t// remapIdentityNameRegexp matches exactly a reference.Named name (possibly unnormalized)\n\tremapIdentityNameRegexp = regexp.Delayed(\"^\" + reference.NameRegexp.String() + \"$\")\n)\n\n// validateIdentityRemappingPrefix returns an InvalidPolicyFormatError if s is detected to be invalid\n// for the Prefix or SignedPrefix values of prmRemapIdentity.\n// Note that it may not recognize _all_ invalid values.\nfunc validateIdentityRemappingPrefix(s string) error {\n\tif remapIdentityDomainRegexp.MatchString(s) ||\n\t\t(remapIdentityNameRegexp.MatchString(s) && remapIdentityDomainPrefixRegexp.MatchString(s)) {\n\t\t// FIXME? This does not reject \"shortname\" nor \"ns/shortname\", because docker/reference\n\t\t// does not provide an API for the short vs. long name logic.\n\t\t// It will either not match, or fail in the ParseNamed call of\n\t\t// prmRemapIdentity.remapReferencePrefix when trying to use such a prefix.\n\t\treturn nil\n\t}\n\treturn InvalidPolicyFormatError(fmt.Sprintf(\"prefix %q is not valid\", s))\n}\n\n// newPRMRemapIdentity is NewPRMRemapIdentity, except it returns the private type.\nfunc newPRMRemapIdentity(prefix, signedPrefix string) (*prmRemapIdentity, error) {\n\tif err := validateIdentityRemappingPrefix(prefix); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := validateIdentityRemappingPrefix(signedPrefix); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &prmRemapIdentity{\n\t\tprmCommon:    prmCommon{Type: prmTypeRemapIdentity},\n\t\tPrefix:       prefix,\n\t\tSignedPrefix: signedPrefix,\n\t}, nil\n}\n\n// NewPRMRemapIdentity returns a new \"remapIdentity\" PolicyRepositoryMatch.\nfunc NewPRMRemapIdentity(prefix, signedPrefix string) (PolicyReferenceMatch, error) {\n\treturn newPRMRemapIdentity(prefix, signedPrefix)\n}\n\n// Compile-time check that prmRemapIdentity implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prmRemapIdentity)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (prm *prmRemapIdentity) UnmarshalJSON(data []byte) error {\n\t*prm = prmRemapIdentity{}\n\tvar tmp prmRemapIdentity\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"type\":         &tmp.Type,\n\t\t\"prefix\":       &tmp.Prefix,\n\t\t\"signedPrefix\": &tmp.SignedPrefix,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prmTypeRemapIdentity {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\n\tres, err := newPRMRemapIdentity(tmp.Prefix, tmp.SignedPrefix)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*prm = *res\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_config_sigstore.go",
    "content": "package signature\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\n// PRSigstoreSignedOption is way to pass values to NewPRSigstoreSigned\ntype PRSigstoreSignedOption func(*prSigstoreSigned) error\n\n// PRSigstoreSignedWithKeyPath specifies a value for the \"keyPath\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithKeyPath(keyPath string) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.KeyPath != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"keyPath\" already specified`)\n\t\t}\n\t\tpr.KeyPath = keyPath\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithKeyPaths specifies a value for the \"keyPaths\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithKeyPaths(keyPaths []string) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.KeyPaths != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"keyPaths\" already specified`)\n\t\t}\n\t\tif len(keyPaths) == 0 {\n\t\t\treturn InvalidPolicyFormatError(`\"keyPaths\" contains no entries`)\n\t\t}\n\t\tpr.KeyPaths = keyPaths\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithKeyData specifies a value for the \"keyData\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithKeyData(keyData []byte) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.KeyData != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"keyData\" already specified`)\n\t\t}\n\t\tpr.KeyData = keyData\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithKeyDatas specifies a value for the \"keyDatas\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithKeyDatas(keyDatas [][]byte) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.KeyDatas != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"keyDatas\" already specified`)\n\t\t}\n\t\tif len(keyDatas) == 0 {\n\t\t\treturn InvalidPolicyFormatError(`\"keyDatas\" contains no entries`)\n\t\t}\n\t\tpr.KeyDatas = keyDatas\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithFulcio specifies a value for the \"fulcio\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithFulcio(fulcio PRSigstoreSignedFulcio) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.Fulcio != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"fulcio\" already specified`)\n\t\t}\n\t\tpr.Fulcio = fulcio\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithPKI specifies a value for the \"pki\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithPKI(p PRSigstoreSignedPKI) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.PKI != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"pki\" already specified`)\n\t\t}\n\t\tpr.PKI = p\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithRekorPublicKeyPath specifies a value for the \"rekorPublicKeyPath\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithRekorPublicKeyPath(rekorPublicKeyPath string) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.RekorPublicKeyPath != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublicKeyPath\" already specified`)\n\t\t}\n\t\tpr.RekorPublicKeyPath = rekorPublicKeyPath\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithRekorPublicKeyPaths specifies a value for the rRekorPublickeyPaths\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithRekorPublicKeyPaths(rekorPublickeyPaths []string) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.RekorPublicKeyPaths != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublickeyPaths\" already specified`)\n\t\t}\n\t\tif len(rekorPublickeyPaths) == 0 {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublickeyPaths\" contains no entries`)\n\t\t}\n\t\tpr.RekorPublicKeyPaths = rekorPublickeyPaths\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithRekorPublicKeyData specifies a value for the \"rekorPublicKeyData\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithRekorPublicKeyData(rekorPublicKeyData []byte) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.RekorPublicKeyData != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublicKeyData\" already specified`)\n\t\t}\n\t\tpr.RekorPublicKeyData = rekorPublicKeyData\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithRekorPublicKeyDatas specifies a value for the \"rekorPublickeyDatas\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithRekorPublicKeyDatas(rekorPublickeyDatas [][]byte) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.RekorPublicKeyDatas != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublickeyDatas\" already specified`)\n\t\t}\n\t\tif len(rekorPublickeyDatas) == 0 {\n\t\t\treturn InvalidPolicyFormatError(`\"rekorPublickeyDatas\" contains no entries`)\n\t\t}\n\t\tpr.RekorPublicKeyDatas = rekorPublickeyDatas\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedWithSignedIdentity specifies a value for the \"signedIdentity\" field when calling NewPRSigstoreSigned.\nfunc PRSigstoreSignedWithSignedIdentity(signedIdentity PolicyReferenceMatch) PRSigstoreSignedOption {\n\treturn func(pr *prSigstoreSigned) error {\n\t\tif pr.SignedIdentity != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"signedIdentity\" already specified`)\n\t\t}\n\t\tpr.SignedIdentity = signedIdentity\n\t\treturn nil\n\t}\n}\n\n// newPRSigstoreSigned is NewPRSigstoreSigned, except it returns the private type.\nfunc newPRSigstoreSigned(options ...PRSigstoreSignedOption) (*prSigstoreSigned, error) {\n\tres := prSigstoreSigned{\n\t\tprCommon: prCommon{Type: prTypeSigstoreSigned},\n\t}\n\tfor _, o := range options {\n\t\tif err := o(&res); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tkeySources := 0\n\tif res.KeyPath != \"\" {\n\t\tkeySources++\n\t}\n\tif res.KeyPaths != nil {\n\t\tkeySources++\n\t}\n\tif res.KeyData != nil {\n\t\tkeySources++\n\t}\n\tif res.KeyDatas != nil {\n\t\tkeySources++\n\t}\n\tif res.Fulcio != nil {\n\t\tkeySources++\n\t}\n\tif res.PKI != nil {\n\t\tkeySources++\n\t}\n\tif keySources != 1 {\n\t\treturn nil, InvalidPolicyFormatError(\"exactly one of keyPath, keyPaths, keyData, keyDatas, fulcio, and pki must be specified\")\n\t}\n\n\trekorSources := 0\n\tif res.RekorPublicKeyPath != \"\" {\n\t\trekorSources++\n\t}\n\tif res.RekorPublicKeyPaths != nil {\n\t\trekorSources++\n\t}\n\tif res.RekorPublicKeyData != nil {\n\t\trekorSources++\n\t}\n\tif res.RekorPublicKeyDatas != nil {\n\t\trekorSources++\n\t}\n\tif rekorSources > 1 {\n\t\treturn nil, InvalidPolicyFormatError(\"at most one of rekorPublickeyPath, rekorPublicKeyPaths, rekorPublickeyData and rekorPublicKeyDatas can be used simultaneously\")\n\t}\n\tif res.Fulcio != nil && rekorSources == 0 {\n\t\treturn nil, InvalidPolicyFormatError(\"At least one of rekorPublickeyPath, rekorPublicKeyPaths, rekorPublickeyData and rekorPublicKeyDatas must be specified if fulcio is used\")\n\t}\n\tif res.PKI != nil && rekorSources > 0 {\n\t\treturn nil, InvalidPolicyFormatError(\"rekorPublickeyPath, rekorPublicKeyPaths, rekorPublickeyData and rekorPublicKeyDatas are not supported for pki\")\n\t}\n\n\tif res.SignedIdentity == nil {\n\t\treturn nil, InvalidPolicyFormatError(\"signedIdentity not specified\")\n\t}\n\n\treturn &res, nil\n}\n\n// NewPRSigstoreSigned returns a new \"sigstoreSigned\" PolicyRequirement based on options.\nfunc NewPRSigstoreSigned(options ...PRSigstoreSignedOption) (PolicyRequirement, error) {\n\treturn newPRSigstoreSigned(options...)\n}\n\n// NewPRSigstoreSignedKeyPath returns a new \"sigstoreSigned\" PolicyRequirement using a KeyPath\nfunc NewPRSigstoreSignedKeyPath(keyPath string, signedIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn NewPRSigstoreSigned(\n\t\tPRSigstoreSignedWithKeyPath(keyPath),\n\t\tPRSigstoreSignedWithSignedIdentity(signedIdentity),\n\t)\n}\n\n// NewPRSigstoreSignedKeyData returns a new \"sigstoreSigned\" PolicyRequirement using a KeyData\nfunc NewPRSigstoreSignedKeyData(keyData []byte, signedIdentity PolicyReferenceMatch) (PolicyRequirement, error) {\n\treturn NewPRSigstoreSigned(\n\t\tPRSigstoreSignedWithKeyData(keyData),\n\t\tPRSigstoreSignedWithSignedIdentity(signedIdentity),\n\t)\n}\n\n// Compile-time check that prSigstoreSigned implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prSigstoreSigned)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\nfunc (pr *prSigstoreSigned) UnmarshalJSON(data []byte) error {\n\t*pr = prSigstoreSigned{}\n\tvar tmp prSigstoreSigned\n\tvar gotKeyPath, gotKeyPaths, gotKeyData, gotKeyDatas, gotFulcio, gotPKI bool\n\tvar gotRekorPublicKeyPath, gotRekorPublicKeyPaths, gotRekorPublicKeyData, gotRekorPublicKeyDatas bool\n\tvar fulcio prSigstoreSignedFulcio\n\tvar pki prSigstoreSignedPKI\n\tvar signedIdentity json.RawMessage\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tswitch key {\n\t\tcase \"type\":\n\t\t\treturn &tmp.Type\n\t\tcase \"keyPath\":\n\t\t\tgotKeyPath = true\n\t\t\treturn &tmp.KeyPath\n\t\tcase \"keyPaths\":\n\t\t\tgotKeyPaths = true\n\t\t\treturn &tmp.KeyPaths\n\t\tcase \"keyData\":\n\t\t\tgotKeyData = true\n\t\t\treturn &tmp.KeyData\n\t\tcase \"keyDatas\":\n\t\t\tgotKeyDatas = true\n\t\t\treturn &tmp.KeyDatas\n\t\tcase \"fulcio\":\n\t\t\tgotFulcio = true\n\t\t\treturn &fulcio\n\t\tcase \"rekorPublicKeyPath\":\n\t\t\tgotRekorPublicKeyPath = true\n\t\t\treturn &tmp.RekorPublicKeyPath\n\t\tcase \"rekorPublicKeyPaths\":\n\t\t\tgotRekorPublicKeyPaths = true\n\t\t\treturn &tmp.RekorPublicKeyPaths\n\t\tcase \"rekorPublicKeyData\":\n\t\t\tgotRekorPublicKeyData = true\n\t\t\treturn &tmp.RekorPublicKeyData\n\t\tcase \"rekorPublicKeyDatas\":\n\t\t\tgotRekorPublicKeyDatas = true\n\t\t\treturn &tmp.RekorPublicKeyDatas\n\t\tcase \"pki\":\n\t\t\tgotPKI = true\n\t\t\treturn &pki\n\t\tcase \"signedIdentity\":\n\t\t\treturn &signedIdentity\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tif tmp.Type != prTypeSigstoreSigned {\n\t\treturn InvalidPolicyFormatError(fmt.Sprintf(\"Unexpected policy requirement type %q\", tmp.Type))\n\t}\n\tif signedIdentity == nil {\n\t\ttmp.SignedIdentity = NewPRMMatchRepoDigestOrExact()\n\t} else {\n\t\tsi, err := newPolicyReferenceMatchFromJSON(signedIdentity)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmp.SignedIdentity = si\n\t}\n\n\tvar opts []PRSigstoreSignedOption\n\tif gotKeyPath {\n\t\topts = append(opts, PRSigstoreSignedWithKeyPath(tmp.KeyPath))\n\t}\n\tif gotKeyPaths {\n\t\topts = append(opts, PRSigstoreSignedWithKeyPaths(tmp.KeyPaths))\n\t}\n\tif gotKeyData {\n\t\topts = append(opts, PRSigstoreSignedWithKeyData(tmp.KeyData))\n\t}\n\tif gotKeyDatas {\n\t\topts = append(opts, PRSigstoreSignedWithKeyDatas(tmp.KeyDatas))\n\t}\n\tif gotFulcio {\n\t\topts = append(opts, PRSigstoreSignedWithFulcio(&fulcio))\n\t}\n\tif gotRekorPublicKeyPath {\n\t\topts = append(opts, PRSigstoreSignedWithRekorPublicKeyPath(tmp.RekorPublicKeyPath))\n\t}\n\tif gotRekorPublicKeyPaths {\n\t\topts = append(opts, PRSigstoreSignedWithRekorPublicKeyPaths(tmp.RekorPublicKeyPaths))\n\t}\n\tif gotRekorPublicKeyData {\n\t\topts = append(opts, PRSigstoreSignedWithRekorPublicKeyData(tmp.RekorPublicKeyData))\n\t}\n\tif gotRekorPublicKeyDatas {\n\t\topts = append(opts, PRSigstoreSignedWithRekorPublicKeyDatas(tmp.RekorPublicKeyDatas))\n\t}\n\tif gotPKI {\n\t\topts = append(opts, PRSigstoreSignedWithPKI(&pki))\n\t}\n\topts = append(opts, PRSigstoreSignedWithSignedIdentity(tmp.SignedIdentity))\n\n\tres, err := newPRSigstoreSigned(opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*pr = *res\n\treturn nil\n}\n\n// PRSigstoreSignedFulcioOption is a way to pass values to NewPRSigstoreSignedFulcio\ntype PRSigstoreSignedFulcioOption func(*prSigstoreSignedFulcio) error\n\n// PRSigstoreSignedFulcioWithCAPath specifies a value for the \"caPath\" field when calling NewPRSigstoreSignedFulcio\nfunc PRSigstoreSignedFulcioWithCAPath(caPath string) PRSigstoreSignedFulcioOption {\n\treturn func(f *prSigstoreSignedFulcio) error {\n\t\tif f.CAPath != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"caPath\" already specified`)\n\t\t}\n\t\tf.CAPath = caPath\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedFulcioWithCAData specifies a value for the \"caData\" field when calling NewPRSigstoreSignedFulcio\nfunc PRSigstoreSignedFulcioWithCAData(caData []byte) PRSigstoreSignedFulcioOption {\n\treturn func(f *prSigstoreSignedFulcio) error {\n\t\tif f.CAData != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"caData\" already specified`)\n\t\t}\n\t\tf.CAData = caData\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedFulcioWithOIDCIssuer specifies a value for the \"oidcIssuer\" field when calling NewPRSigstoreSignedFulcio\nfunc PRSigstoreSignedFulcioWithOIDCIssuer(oidcIssuer string) PRSigstoreSignedFulcioOption {\n\treturn func(f *prSigstoreSignedFulcio) error {\n\t\tif f.OIDCIssuer != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"oidcIssuer\" already specified`)\n\t\t}\n\t\tf.OIDCIssuer = oidcIssuer\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedFulcioWithSubjectEmail specifies a value for the \"subjectEmail\" field when calling NewPRSigstoreSignedFulcio\nfunc PRSigstoreSignedFulcioWithSubjectEmail(subjectEmail string) PRSigstoreSignedFulcioOption {\n\treturn func(f *prSigstoreSignedFulcio) error {\n\t\tif f.SubjectEmail != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"subjectEmail\" already specified`)\n\t\t}\n\t\tf.SubjectEmail = subjectEmail\n\t\treturn nil\n\t}\n}\n\n// newPRSigstoreSignedFulcio is NewPRSigstoreSignedFulcio, except it returns the private type\nfunc newPRSigstoreSignedFulcio(options ...PRSigstoreSignedFulcioOption) (*prSigstoreSignedFulcio, error) {\n\tres := prSigstoreSignedFulcio{}\n\tfor _, o := range options {\n\t\tif err := o(&res); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif res.CAPath != \"\" && res.CAData != nil {\n\t\treturn nil, InvalidPolicyFormatError(\"caPath and caData cannot be used simultaneously\")\n\t}\n\tif res.CAPath == \"\" && res.CAData == nil {\n\t\treturn nil, InvalidPolicyFormatError(\"At least one of caPath and caData must be specified\")\n\t}\n\tif res.OIDCIssuer == \"\" {\n\t\treturn nil, InvalidPolicyFormatError(\"oidcIssuer not specified\")\n\t}\n\tif res.SubjectEmail == \"\" {\n\t\treturn nil, InvalidPolicyFormatError(\"subjectEmail not specified\")\n\t}\n\n\treturn &res, nil\n}\n\n// NewPRSigstoreSignedFulcio returns a PRSigstoreSignedFulcio based on options.\nfunc NewPRSigstoreSignedFulcio(options ...PRSigstoreSignedFulcioOption) (PRSigstoreSignedFulcio, error) {\n\treturn newPRSigstoreSignedFulcio(options...)\n}\n\n// Compile-time check that prSigstoreSignedFulcio implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prSigstoreSignedFulcio)(nil)\n\nfunc (f *prSigstoreSignedFulcio) UnmarshalJSON(data []byte) error {\n\t*f = prSigstoreSignedFulcio{}\n\tvar tmp prSigstoreSignedFulcio\n\tvar gotCAPath, gotCAData, gotOIDCIssuer, gotSubjectEmail bool // = false...\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tswitch key {\n\t\tcase \"caPath\":\n\t\t\tgotCAPath = true\n\t\t\treturn &tmp.CAPath\n\t\tcase \"caData\":\n\t\t\tgotCAData = true\n\t\t\treturn &tmp.CAData\n\t\tcase \"oidcIssuer\":\n\t\t\tgotOIDCIssuer = true\n\t\t\treturn &tmp.OIDCIssuer\n\t\tcase \"subjectEmail\":\n\t\t\tgotSubjectEmail = true\n\t\t\treturn &tmp.SubjectEmail\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tvar opts []PRSigstoreSignedFulcioOption\n\tif gotCAPath {\n\t\topts = append(opts, PRSigstoreSignedFulcioWithCAPath(tmp.CAPath))\n\t}\n\tif gotCAData {\n\t\topts = append(opts, PRSigstoreSignedFulcioWithCAData(tmp.CAData))\n\t}\n\tif gotOIDCIssuer {\n\t\topts = append(opts, PRSigstoreSignedFulcioWithOIDCIssuer(tmp.OIDCIssuer))\n\t}\n\tif gotSubjectEmail {\n\t\topts = append(opts, PRSigstoreSignedFulcioWithSubjectEmail(tmp.SubjectEmail))\n\t}\n\n\tres, err := newPRSigstoreSignedFulcio(opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*f = *res\n\treturn nil\n}\n\n// PRSigstoreSignedPKIOption is a way to pass values to NewPRSigstoreSignedPKI\ntype PRSigstoreSignedPKIOption func(*prSigstoreSignedPKI) error\n\n// PRSigstoreSignedPKIWithCARootsPath specifies a value for the \"caRootsPath\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithCARootsPath(caRootsPath string) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.CARootsPath != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"caRootsPath\" already specified`)\n\t\t}\n\t\tp.CARootsPath = caRootsPath\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedPKIWithCARootsData specifies a value for the \"caRootsData\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithCARootsData(caRootsData []byte) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.CARootsData != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"caRootsData\" already specified`)\n\t\t}\n\t\tp.CARootsData = caRootsData\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedPKIWithCAIntermediatesPath specifies a value for the \"caIntermediatesPath\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithCAIntermediatesPath(caIntermediatesPath string) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.CAIntermediatesPath != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"caIntermediatesPath\" already specified`)\n\t\t}\n\t\tp.CAIntermediatesPath = caIntermediatesPath\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedPKIWithCAIntermediatesData specifies a value for the \"caIntermediatesData\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithCAIntermediatesData(caIntermediatesData []byte) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.CAIntermediatesData != nil {\n\t\t\treturn InvalidPolicyFormatError(`\"caIntermediatesData\" already specified`)\n\t\t}\n\t\tp.CAIntermediatesData = caIntermediatesData\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedPKIWithSubjectEmail specifies a value for the \"subjectEmail\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithSubjectEmail(subjectEmail string) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.SubjectEmail != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"subjectEmail\" already specified`)\n\t\t}\n\t\tp.SubjectEmail = subjectEmail\n\t\treturn nil\n\t}\n}\n\n// PRSigstoreSignedPKIWithSubjectHostname specifies a value for the \"subjectHostname\" field when calling NewPRSigstoreSignedPKI\nfunc PRSigstoreSignedPKIWithSubjectHostname(subjectHostname string) PRSigstoreSignedPKIOption {\n\treturn func(p *prSigstoreSignedPKI) error {\n\t\tif p.SubjectHostname != \"\" {\n\t\t\treturn InvalidPolicyFormatError(`\"subjectHostname\" already specified`)\n\t\t}\n\t\tp.SubjectHostname = subjectHostname\n\t\treturn nil\n\t}\n}\n\n// newPRSigstoreSignedPKI is NewPRSigstoreSignedPKI, except it returns the private type\nfunc newPRSigstoreSignedPKI(options ...PRSigstoreSignedPKIOption) (*prSigstoreSignedPKI, error) {\n\tres := prSigstoreSignedPKI{}\n\tfor _, o := range options {\n\t\tif err := o(&res); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif res.CARootsPath != \"\" && res.CARootsData != nil {\n\t\treturn nil, InvalidPolicyFormatError(\"caRootsPath and caRootsData cannot be used simultaneously\")\n\t}\n\tif res.CARootsPath == \"\" && res.CARootsData == nil {\n\t\treturn nil, InvalidPolicyFormatError(\"At least one of caRootsPath and caRootsData must be specified\")\n\t}\n\n\tif res.CAIntermediatesPath != \"\" && res.CAIntermediatesData != nil {\n\t\treturn nil, InvalidPolicyFormatError(\"caIntermediatesPath and caIntermediatesData cannot be used simultaneously\")\n\t}\n\n\tif res.SubjectEmail == \"\" && res.SubjectHostname == \"\" {\n\t\treturn nil, InvalidPolicyFormatError(\"At least one of subjectEmail, subjectHostname must be specified\")\n\t}\n\n\treturn &res, nil\n}\n\n// NewPRSigstoreSignedPKI returns a PRSigstoreSignedPKI based on options.\nfunc NewPRSigstoreSignedPKI(options ...PRSigstoreSignedPKIOption) (PRSigstoreSignedPKI, error) {\n\treturn newPRSigstoreSignedPKI(options...)\n}\n\n// Compile-time check that prSigstoreSignedPKI implements json.Unmarshaler.\nvar _ json.Unmarshaler = (*prSigstoreSignedPKI)(nil)\n\nfunc (p *prSigstoreSignedPKI) UnmarshalJSON(data []byte) error {\n\t*p = prSigstoreSignedPKI{}\n\tvar tmp prSigstoreSignedPKI\n\tvar gotCARootsPath, gotCARootsData, gotCAIntermediatesPath, gotCAIntermediatesData, gotSubjectEmail, gotSubjectHostname bool\n\tif err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any {\n\t\tswitch key {\n\t\tcase \"caRootsPath\":\n\t\t\tgotCARootsPath = true\n\t\t\treturn &tmp.CARootsPath\n\t\tcase \"caRootsData\":\n\t\t\tgotCARootsData = true\n\t\t\treturn &tmp.CARootsData\n\t\tcase \"caIntermediatesPath\":\n\t\t\tgotCAIntermediatesPath = true\n\t\t\treturn &tmp.CAIntermediatesPath\n\t\tcase \"caIntermediatesData\":\n\t\t\tgotCAIntermediatesData = true\n\t\t\treturn &tmp.CAIntermediatesData\n\t\tcase \"subjectEmail\":\n\t\t\tgotSubjectEmail = true\n\t\t\treturn &tmp.SubjectEmail\n\t\tcase \"subjectHostname\":\n\t\t\tgotSubjectHostname = true\n\t\t\treturn &tmp.SubjectHostname\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tvar opts []PRSigstoreSignedPKIOption\n\tif gotCARootsPath {\n\t\topts = append(opts, PRSigstoreSignedPKIWithCARootsPath(tmp.CARootsPath))\n\t}\n\tif gotCARootsData {\n\t\topts = append(opts, PRSigstoreSignedPKIWithCARootsData(tmp.CARootsData))\n\t}\n\tif gotCAIntermediatesPath {\n\t\topts = append(opts, PRSigstoreSignedPKIWithCAIntermediatesPath(tmp.CAIntermediatesPath))\n\t}\n\tif gotCAIntermediatesData {\n\t\topts = append(opts, PRSigstoreSignedPKIWithCAIntermediatesData(tmp.CAIntermediatesData))\n\t}\n\tif gotSubjectEmail {\n\t\topts = append(opts, PRSigstoreSignedPKIWithSubjectEmail(tmp.SubjectEmail))\n\t}\n\tif gotSubjectHostname {\n\t\topts = append(opts, PRSigstoreSignedPKIWithSubjectHostname(tmp.SubjectHostname))\n\t}\n\n\tres, err := newPRSigstoreSignedPKI(opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*p = *res\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_eval.go",
    "content": "// This defines the top-level policy evaluation API.\n// To the extent possible, the interface of the functions provided\n// here is intended to be completely unambiguous, and stable for users\n// to rely on.\n\npackage signature\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/unparsedimage\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// PolicyRequirementError is an explanatory text for rejecting a signature or an image.\ntype PolicyRequirementError string\n\nfunc (err PolicyRequirementError) Error() string {\n\treturn string(err)\n}\n\n// signatureAcceptanceResult is the principal value returned by isSignatureAuthorAccepted.\ntype signatureAcceptanceResult string\n\nconst (\n\tsarAccepted signatureAcceptanceResult = \"sarAccepted\"\n\tsarRejected signatureAcceptanceResult = \"sarRejected\"\n\tsarUnknown  signatureAcceptanceResult = \"sarUnknown\"\n)\n\n// PolicyRequirement is a rule which must be satisfied by at least one of the signatures of an image.\n// The type is public, but its definition is private.\ntype PolicyRequirement interface {\n\t// FIXME: For speed, we should support creating per-context state (not stored in the PolicyRequirement), to cache\n\t// costly initialization like creating temporary GPG home directories and reading files.\n\t// Setup() (someState, error)\n\t// Then, the operations below would be done on the someState object, not directly on a PolicyRequirement.\n\n\t// isSignatureAuthorAccepted, given an image and a signature blob, returns:\n\t// - sarAccepted if the signature has been verified against the appropriate public key\n\t//   (where \"appropriate public key\" may depend on the contents of the signature);\n\t//   in that case a parsed Signature should be returned.\n\t// - sarRejected if the signature has not been verified;\n\t//   in that case error must be non-nil, and should be an PolicyRequirementError if evaluation\n\t//   succeeded but the result was rejection.\n\t// - sarUnknown if this PolicyRequirement does not deal with signatures.\n\t//   NOTE: sarUnknown should not be returned if this PolicyRequirement should make a decision but something failed.\n\t//   Returning sarUnknown and a non-nil error value is invalid.\n\t// WARNING: This makes the signature contents acceptable for further processing,\n\t// but it does not necessarily mean that the contents of the signature are\n\t// consistent with local policy.\n\t// For example:\n\t// - Do not use a true value to determine whether to run\n\t//   a container based on this image; use IsRunningImageAllowed instead.\n\t// - Just because a signature is accepted does not automatically mean the contents of the\n\t//   signature are authorized to run code as root, or to affect system or cluster configuration.\n\tisSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error)\n\n\t// isRunningImageAllowed returns true if the requirement allows running an image.\n\t// If it returns false, err must be non-nil, and should be an PolicyRequirementError if evaluation\n\t// succeeded but the result was rejection.\n\t// WARNING: This validates signatures and the manifest, but does not download or validate the\n\t// layers. Users must validate that the layers match their expected digests.\n\tisRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error)\n\n\t// verifiesSignatures returns true if and only if the requirement performs cryptographic\n\t// signature verification on the entire contents of the image before allowing it.\n\tverifiesSignatures() bool\n}\n\n// PolicyReferenceMatch specifies a set of image identities accepted in PolicyRequirement.\n// The type is public, but its implementation is private.\ntype PolicyReferenceMatch interface {\n\t// matchesDockerReference decides whether a specific image identity is accepted for an image\n\t// (or, usually, for the image's Reference().DockerReference()).  Note that\n\t// image.Reference().DockerReference() may be nil.\n\tmatchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool\n}\n\n// PolicyContext encapsulates a policy and possible cached state\n// for speeding up its evaluation.\ntype PolicyContext struct {\n\tPolicy        *Policy\n\tstate         policyContextState // Internal consistency checking\n\trequireSigned bool\n}\n\n// policyContextState is used internally to verify the users are not misusing a PolicyContext.\ntype policyContextState string\n\nconst (\n\tpcInitializing policyContextState = \"Initializing\"\n\tpcReady        policyContextState = \"Ready\"\n\tpcInUse        policyContextState = \"InUse\"\n\tpcDestroying   policyContextState = \"Destroying\"\n\tpcDestroyed    policyContextState = \"Destroyed\"\n)\n\n// changeState changes pc.state, or fails if the state is unexpected\nfunc (pc *PolicyContext) changeState(expected, new policyContextState) error {\n\tif pc.state != expected {\n\t\treturn fmt.Errorf(`Invalid PolicyContext state, expected %q, found %q`, expected, pc.state)\n\t}\n\tpc.state = new\n\treturn nil\n}\n\n// NewPolicyContext sets up and initializes a context for the specified policy.\n// The policy must not be modified while the context exists. FIXME: make a deep copy?\n// If this function succeeds, the caller should call PolicyContext.Destroy() when done.\nfunc NewPolicyContext(policy *Policy) (*PolicyContext, error) {\n\tpc := &PolicyContext{Policy: policy, state: pcInitializing}\n\t// FIXME: initialize\n\tif err := pc.changeState(pcInitializing, pcReady); err != nil {\n\t\t// Huh?! This should never fail, we didn't give the pointer to anybody.\n\t\t// Just give up and leave unclean state around.\n\t\treturn nil, err\n\t}\n\treturn pc, nil\n}\n\n// Destroy should be called when the user of the context is done with it.\nfunc (pc *PolicyContext) Destroy() error {\n\tif err := pc.changeState(pcReady, pcDestroying); err != nil {\n\t\treturn err\n\t}\n\t// FIXME: destroy\n\treturn pc.changeState(pcDestroying, pcDestroyed)\n}\n\n// policyIdentityLogName returns a string description of the image identity for policy purposes.\n// ONLY use this for log messages, not for any decisions!\nfunc policyIdentityLogName(ref types.ImageReference) string {\n\treturn ref.Transport().Name() + \":\" + ref.PolicyConfigurationIdentity()\n}\n\n// RequireSignatureVerification modifies policy requirement handling. If passed\n// `true`, at least one policy requirement which performs signature verification\n// on the entire image contents must be present.\nfunc (pc *PolicyContext) RequireSignatureVerification(val bool) {\n\tpc.requireSigned = val\n}\n\n// requirementsForImageRef selects the appropriate requirements for ref.\nfunc (pc *PolicyContext) requirementsForImageRef(ref types.ImageReference) PolicyRequirements {\n\t// Do we have a PolicyTransportScopes for this transport?\n\ttransportName := ref.Transport().Name()\n\tif transportScopes, ok := pc.Policy.Transports[transportName]; ok {\n\t\t// Look for a full match.\n\t\tidentity := ref.PolicyConfigurationIdentity()\n\t\tif req, ok := transportScopes[identity]; ok {\n\t\t\tlogrus.Debugf(` Using transport %q policy section %q`, transportName, identity)\n\t\t\treturn req\n\t\t}\n\n\t\t// Look for a match of the possible parent namespaces.\n\t\tfor _, name := range ref.PolicyConfigurationNamespaces() {\n\t\t\tif req, ok := transportScopes[name]; ok {\n\t\t\t\tlogrus.Debugf(` Using transport %q specific policy section %q`, transportName, name)\n\t\t\t\treturn req\n\t\t\t}\n\t\t}\n\n\t\t// Look for a default match for the transport.\n\t\tif req, ok := transportScopes[\"\"]; ok {\n\t\t\tlogrus.Debugf(` Using transport %q policy section \"\"`, transportName)\n\t\t\treturn req\n\t\t}\n\t}\n\n\tlogrus.Debugf(\" Using default policy section\")\n\treturn pc.Policy.Default\n}\n\n// GetSignaturesWithAcceptedAuthor returns those signatures from an image\n// for which the policy accepts the author (and which have been successfully\n// verified).\n// NOTE: This may legitimately return an empty list and no error, if the image\n// has no signatures or only invalid signatures.\n// WARNING: This makes the signature contents acceptable for further processing,\n// but it does not necessarily mean that the contents of the signature are\n// consistent with local policy.\n// For example:\n//   - Do not use a an existence of an accepted signature to determine whether to run\n//     a container based on this image; use IsRunningImageAllowed instead.\n//   - Just because a signature is accepted does not automatically mean the contents of the\n//     signature are authorized to run code as root, or to affect system or cluster configuration.\nfunc (pc *PolicyContext) GetSignaturesWithAcceptedAuthor(ctx context.Context, publicImage types.UnparsedImage) (sigs []*Signature, finalErr error) {\n\tif err := pc.changeState(pcReady, pcInUse); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tif err := pc.changeState(pcInUse, pcReady); err != nil {\n\t\t\tsigs = nil\n\t\t\tfinalErr = err\n\t\t}\n\t}()\n\n\timage := unparsedimage.FromPublic(publicImage)\n\n\tlogrus.Debugf(\"GetSignaturesWithAcceptedAuthor for image %s\", policyIdentityLogName(image.Reference()))\n\treqs := pc.requirementsForImageRef(image.Reference())\n\n\t// FIXME: Use image.UntrustedSignatures, use that to improve error messages (needs tests!)\n\tunverifiedSignatures, err := image.Signatures(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tres := make([]*Signature, 0, len(unverifiedSignatures))\n\tfor sigNumber, sig := range unverifiedSignatures {\n\t\tvar acceptedSig *Signature // non-nil if accepted\n\t\trejected := false\n\t\t// FIXME? Say more about the contents of the signature, i.e. parse it even before verification?!\n\t\tlogrus.Debugf(\"Evaluating signature %d:\", sigNumber)\n\tinterpretingReqs:\n\t\tfor reqNumber, req := range reqs {\n\t\t\t// FIXME: Log the requirement itself? For now, we use just the number.\n\t\t\t// FIXME: supply state\n\t\t\tswitch res, as, err := req.isSignatureAuthorAccepted(ctx, image, sig); res {\n\t\t\tcase sarAccepted:\n\t\t\t\tif as == nil { // Coverage: this should never happen\n\t\t\t\t\tlogrus.Debugf(\" Requirement %d: internal inconsistency: sarAccepted but no parsed contents\", reqNumber)\n\t\t\t\t\trejected = true\n\t\t\t\t\tbreak interpretingReqs\n\t\t\t\t}\n\t\t\t\tlogrus.Debugf(\" Requirement %d: signature accepted\", reqNumber)\n\t\t\t\tif acceptedSig == nil {\n\t\t\t\t\tacceptedSig = as\n\t\t\t\t} else if *as != *acceptedSig { // Coverage: this should never happen\n\t\t\t\t\t// Huh?! Two ways of verifying the same signature blob resulted in two different parses of its already accepted contents?\n\t\t\t\t\tlogrus.Debugf(\" Requirement %d: internal inconsistency: sarAccepted but different parsed contents\", reqNumber)\n\t\t\t\t\trejected = true\n\t\t\t\t\tacceptedSig = nil\n\t\t\t\t\tbreak interpretingReqs\n\t\t\t\t}\n\t\t\tcase sarRejected:\n\t\t\t\tlogrus.Debugf(\" Requirement %d: signature rejected: %s\", reqNumber, err.Error())\n\t\t\t\trejected = true\n\t\t\t\tbreak interpretingReqs\n\t\t\tcase sarUnknown:\n\t\t\t\tif err != nil { // Coverage: this should never happen\n\t\t\t\t\tlogrus.Debugf(\" Requirement %d: internal inconsistency: sarUnknown but an error message %s\", reqNumber, err.Error())\n\t\t\t\t\trejected = true\n\t\t\t\t\tbreak interpretingReqs\n\t\t\t\t}\n\t\t\t\tlogrus.Debugf(\" Requirement %d: signature state unknown, continuing\", reqNumber)\n\t\t\tdefault: // Coverage: this should never happen\n\t\t\t\tlogrus.Debugf(\" Requirement %d: internal inconsistency: unknown result %#v\", reqNumber, string(res))\n\t\t\t\trejected = true\n\t\t\t\tbreak interpretingReqs\n\t\t\t}\n\t\t}\n\t\t// This also handles the (invalid) case of empty reqs, by rejecting the signature.\n\t\tif acceptedSig != nil && !rejected {\n\t\t\tlogrus.Debugf(\" Overall: OK, signature accepted\")\n\t\t\tres = append(res, acceptedSig)\n\t\t} else {\n\t\t\tlogrus.Debugf(\" Overall: Signature not accepted\")\n\t\t}\n\t}\n\treturn res, nil\n}\n\n// IsRunningImageAllowed returns true iff the policy allows running the image.\n// If it returns false, err must be non-nil, and should be an PolicyRequirementError if evaluation\n// succeeded but the result was rejection.\n// WARNING: This validates signatures and the manifest, but does not download or validate the\n// layers. Users must validate that the layers match their expected digests.\nfunc (pc *PolicyContext) IsRunningImageAllowed(ctx context.Context, publicImage types.UnparsedImage) (res bool, finalErr error) {\n\tif err := pc.changeState(pcReady, pcInUse); err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\tif err := pc.changeState(pcInUse, pcReady); err != nil {\n\t\t\tres = false\n\t\t\tfinalErr = err\n\t\t}\n\t}()\n\n\timage := unparsedimage.FromPublic(publicImage)\n\n\tlogrus.Debugf(\"IsRunningImageAllowed for image %s\", policyIdentityLogName(image.Reference()))\n\treqs := pc.requirementsForImageRef(image.Reference())\n\n\tif len(reqs) == 0 {\n\t\treturn false, PolicyRequirementError(\"List of verification policy requirements must not be empty\")\n\t}\n\n\twasSignatureVerified := false\n\tfor reqNumber, req := range reqs {\n\t\t// FIXME: supply state\n\t\tallowed, err := req.isRunningImageAllowed(ctx, image)\n\t\tif !allowed {\n\t\t\tlogrus.Debugf(\"Requirement %d: denied, done\", reqNumber)\n\t\t\treturn false, err\n\t\t}\n\t\tlogrus.Debugf(\" Requirement %d: allowed\", reqNumber)\n\t\tif req.verifiesSignatures() {\n\t\t\twasSignatureVerified = true\n\t\t}\n\t}\n\n\tif pc.requireSigned && !wasSignatureVerified {\n\t\treturn false, PolicyRequirementError(fmt.Sprintf(\"No signature verification policy found for image %s\", policyIdentityLogName(image.Reference())))\n\t}\n\n\t// We have tested that len(reqs) != 0, so at least one req must have explicitly allowed this image.\n\tlogrus.Debugf(\"Overall: allowed\")\n\treturn true, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_eval_baselayer.go",
    "content": "// Policy evaluation for prSignedBaseLayer.\n\npackage signature\n\nimport (\n\t\"context\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/private\"\n)\n\nfunc (pr *prSignedBaseLayer) isSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error) {\n\treturn sarUnknown, nil, nil\n}\n\nfunc (pr *prSignedBaseLayer) isRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error) {\n\t// FIXME? Reject this at policy parsing time already?\n\tlogrus.Errorf(\"signedBaseLayer not implemented yet!\")\n\treturn false, PolicyRequirementError(\"signedBaseLayer not implemented yet!\")\n}\n\nfunc (pr *prSignedBaseLayer) verifiesSignatures() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_eval_signedby.go",
    "content": "// Policy evaluation for prSignedBy.\n\npackage signature\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/manifest\"\n)\n\nfunc (pr *prSignedBy) isSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error) {\n\tswitch pr.KeyType {\n\tcase SBKeyTypeGPGKeys:\n\tcase SBKeyTypeSignedByGPGKeys, SBKeyTypeX509Certificates, SBKeyTypeSignedByX509CAs:\n\t\t// FIXME? Reject this at policy parsing time already?\n\t\treturn sarRejected, nil, fmt.Errorf(`Unimplemented \"keyType\" value %q`, string(pr.KeyType))\n\tdefault:\n\t\t// This should never happen, newPRSignedBy ensures KeyType.IsValid()\n\t\treturn sarRejected, nil, fmt.Errorf(`Unknown \"keyType\" value %q`, string(pr.KeyType))\n\t}\n\n\t// FIXME: move this to per-context initialization\n\tconst notOneSourceErrorText = `Internal inconsistency: not exactly one of \"keyPath\", \"keyPaths\" and \"keyData\" specified`\n\tdata, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: notOneSourceErrorText,\n\t\tpath:                      pr.KeyPath,\n\t\tpaths:                     pr.KeyPaths,\n\t\tdata:                      pr.KeyData,\n\t})\n\tif err != nil {\n\t\treturn sarRejected, nil, err\n\t}\n\tif data == nil {\n\t\treturn sarRejected, nil, errors.New(notOneSourceErrorText)\n\t}\n\n\t// FIXME: move this to per-context initialization\n\tmech, trustedIdentities, err := newEphemeralGPGSigningMechanism(data)\n\tif err != nil {\n\t\treturn sarRejected, nil, err\n\t}\n\tdefer mech.Close()\n\tif len(trustedIdentities) == 0 {\n\t\treturn sarRejected, nil, PolicyRequirementError(\"No public keys imported\")\n\t}\n\n\tsignature, _, err := verifyAndExtractSignature(mech, sig, signatureAcceptanceRules{\n\t\tacceptedKeyIdentities: trustedIdentities,\n\t\tvalidateSignedDockerReference: func(ref string) error {\n\t\t\tif !pr.SignedIdentity.matchesDockerReference(image, ref) {\n\t\t\t\treturn PolicyRequirementError(fmt.Sprintf(\"Signature for identity %q is not accepted\", ref))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tvalidateSignedDockerManifestDigest: func(digest digest.Digest) error {\n\t\t\tm, _, err := image.Manifest(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdigestMatches, err := manifest.MatchesDigest(m, digest)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !digestMatches {\n\t\t\t\treturn PolicyRequirementError(fmt.Sprintf(\"Signature for digest %s does not match\", digest))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn sarRejected, nil, err\n\t}\n\n\treturn sarAccepted, signature, nil\n}\n\nfunc (pr *prSignedBy) isRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error) {\n\t// FIXME: Use image.UntrustedSignatures, use that to improve error messages\n\t// (needs tests!)\n\tsigs, err := image.Signatures(ctx)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tvar rejections []error\n\tfor _, s := range sigs {\n\t\tvar reason error\n\t\tswitch res, _, err := pr.isSignatureAuthorAccepted(ctx, image, s); res {\n\t\tcase sarAccepted:\n\t\t\t// One accepted signature is enough.\n\t\t\treturn true, nil\n\t\tcase sarRejected:\n\t\t\treason = err\n\t\tcase sarUnknown:\n\t\t\t// Huh?! This should not happen at all; treat it as any other invalid value.\n\t\t\tfallthrough\n\t\tdefault:\n\t\t\treason = fmt.Errorf(`Internal error: Unexpected signature verification result %q`, string(res))\n\t\t}\n\t\trejections = append(rejections, reason)\n\t}\n\tvar summary error\n\tswitch len(rejections) {\n\tcase 0:\n\t\tsummary = PolicyRequirementError(\"A signature was required, but no signature exists\")\n\tcase 1:\n\t\tsummary = rejections[0]\n\tdefault:\n\t\tsummary = PolicyRequirementError(multierr.Format(\"None of the signatures were accepted, reasons: \", \"; \", \"\", rejections).Error())\n\t}\n\treturn false, summary\n}\n\nfunc (pr *prSignedBy) verifiesSignatures() bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_eval_sigstore.go",
    "content": "// Policy evaluation for prSigstoreSigned.\n\npackage signature\n\nimport (\n\t\"context\"\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"go.podman.io/image/v5/internal/multierr\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\n// configBytesSources contains configuration fields which may result in one or more []byte values\ntype configBytesSources struct {\n\tinconsistencyErrorMessage string   // Error to return if more than one source is set\n\tpath                      string   // …Path: a path to a file containing the data, or \"\"\n\tpaths                     []string // …Paths: paths to files containing the data, or nil\n\tdata                      []byte   // …Data: a single instance ofhe raw data, or nil\n\tdatas                     [][]byte // …Datas: the raw data, or nil // codespell:ignore datas\n}\n\n// loadBytesFromConfigSources ensures at most one of the sources in src is set,\n// and returns the referenced data, or nil if neither is set.\nfunc loadBytesFromConfigSources(src configBytesSources) ([][]byte, error) {\n\tsources := 0\n\tvar data [][]byte // = nil\n\tif src.path != \"\" {\n\t\tsources++\n\t\td, err := os.ReadFile(src.path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata = [][]byte{d}\n\t}\n\tif src.paths != nil {\n\t\tsources++\n\t\tdata = [][]byte{}\n\t\tfor _, path := range src.paths {\n\t\t\td, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdata = append(data, d)\n\t\t}\n\t}\n\tif src.data != nil {\n\t\tsources++\n\t\tdata = [][]byte{src.data}\n\t}\n\tif src.datas != nil { // codespell:ignore datas\n\t\tsources++\n\t\tdata = src.datas // codespell:ignore datas\n\t}\n\tif sources > 1 {\n\t\treturn nil, errors.New(src.inconsistencyErrorMessage)\n\t}\n\treturn data, nil\n}\n\n// prepareTrustRoot creates a fulcioTrustRoot from the input data.\n// (This also prevents external implementations of this interface, ensuring that prSigstoreSignedFulcio is the only one.)\nfunc (f *prSigstoreSignedFulcio) prepareTrustRoot() (*fulcioTrustRoot, error) {\n\tcaCertPEMs, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: `Internal inconsistency: both \"caPath\" and \"caData\" specified`,\n\t\tpath:                      f.CAPath,\n\t\tdata:                      f.CAData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(caCertPEMs) != 1 {\n\t\treturn nil, errors.New(`Internal inconsistency: Fulcio specified with not exactly one of \"caPath\" nor \"caData\"`)\n\t}\n\tcerts := x509.NewCertPool()\n\tif ok := certs.AppendCertsFromPEM(caCertPEMs[0]); !ok {\n\t\treturn nil, errors.New(\"error loading Fulcio CA certificates\")\n\t}\n\tfulcio := fulcioTrustRoot{\n\t\tcaCertificates: certs,\n\t\toidcIssuer:     f.OIDCIssuer,\n\t\tsubjectEmail:   f.SubjectEmail,\n\t}\n\tif err := fulcio.validate(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &fulcio, nil\n}\n\n// prepareTrustRoot creates a pkiTrustRoot from the input data.\n// (This also prevents external implementations of this interface, ensuring that prSigstoreSignedPKI is the only one.)\nfunc (p *prSigstoreSignedPKI) prepareTrustRoot() (*pkiTrustRoot, error) {\n\tcaRootsCertPEMs, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: `Internal inconsistency: both \"caRootsPath\" and \"caRootsData\" specified`,\n\t\tpath:                      p.CARootsPath,\n\t\tdata:                      p.CARootsData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(caRootsCertPEMs) != 1 {\n\t\treturn nil, errors.New(`Internal inconsistency: PKI specified with not exactly one of \"caRootsPath\" nor \"caRootsData\"`)\n\t}\n\trootsCerts := x509.NewCertPool()\n\tif ok := rootsCerts.AppendCertsFromPEM(caRootsCertPEMs[0]); !ok {\n\t\treturn nil, errors.New(\"error loading PKI CA Roots certificates\")\n\t}\n\tpki := pkiTrustRoot{\n\t\tcaRootsCertificates: rootsCerts,\n\t\tsubjectEmail:        p.SubjectEmail,\n\t\tsubjectHostname:     p.SubjectHostname,\n\t}\n\tcaIntermediateCertPEMs, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: `Internal inconsistency: both \"caIntermediatesPath\" and \"caIntermediatesData\" specified`,\n\t\tpath:                      p.CAIntermediatesPath,\n\t\tdata:                      p.CAIntermediatesData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif caIntermediateCertPEMs != nil {\n\t\tif len(caIntermediateCertPEMs) != 1 {\n\t\t\treturn nil, errors.New(`Internal inconsistency: PKI specified with invalid value from \"caIntermediatesPath\" or \"caIntermediatesData\"`)\n\t\t}\n\t\tintermediatePool := x509.NewCertPool()\n\t\ttrustedIntermediates, err := cryptoutils.UnmarshalCertificatesFromPEM(caIntermediateCertPEMs[0])\n\t\tif err != nil {\n\t\t\treturn nil, internal.NewInvalidSignatureError(fmt.Sprintf(\"loading trusted intermediate certificates: %v\", err))\n\t\t}\n\t\tfor _, trustedIntermediateCert := range trustedIntermediates {\n\t\t\tintermediatePool.AddCert(trustedIntermediateCert)\n\t\t}\n\t\tpki.caIntermediateCertificates = intermediatePool\n\t}\n\n\tif err := pki.validate(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &pki, nil\n}\n\n// sigstoreSignedTrustRoot contains an already parsed version of the prSigstoreSigned policy\ntype sigstoreSignedTrustRoot struct {\n\tpublicKeys      []crypto.PublicKey\n\tfulcio          *fulcioTrustRoot\n\trekorPublicKeys []*ecdsa.PublicKey\n\tpki             *pkiTrustRoot\n}\n\nfunc (pr *prSigstoreSigned) prepareTrustRoot() (*sigstoreSignedTrustRoot, error) {\n\tres := sigstoreSignedTrustRoot{}\n\n\tpublicKeyPEMs, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: `Internal inconsistency: more than one of \"keyPath\", \"keyPaths\", \"keyData\", \"keyDatas\" specified`,\n\t\tpath:                      pr.KeyPath,\n\t\tpaths:                     pr.KeyPaths,\n\t\tdata:                      pr.KeyData,\n\t\tdatas:                     pr.KeyDatas, // codespell:ignore datas\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif publicKeyPEMs != nil {\n\t\tfor index, keyData := range publicKeyPEMs {\n\t\t\tpk, err := cryptoutils.UnmarshalPEMToPublicKey(keyData)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing public key %d: %w\", index+1, err)\n\t\t\t}\n\t\t\tres.publicKeys = append(res.publicKeys, pk)\n\t\t}\n\t\tif len(res.publicKeys) == 0 {\n\t\t\treturn nil, errors.New(`Internal inconsistency: \"keyPath\", \"keyPaths\", \"keyData\" and \"keyDatas\" produced no public keys`)\n\t\t}\n\t}\n\n\tif pr.Fulcio != nil {\n\t\tf, err := pr.Fulcio.prepareTrustRoot()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.fulcio = f\n\t}\n\n\trekorPublicKeyPEMs, err := loadBytesFromConfigSources(configBytesSources{\n\t\tinconsistencyErrorMessage: `Internal inconsistency: both \"rekorPublicKeyPath\" and \"rekorPublicKeyData\" specified`,\n\t\tpath:                      pr.RekorPublicKeyPath,\n\t\tpaths:                     pr.RekorPublicKeyPaths,\n\t\tdata:                      pr.RekorPublicKeyData,\n\t\tdatas:                     pr.RekorPublicKeyDatas, // codespell:ignore datas\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rekorPublicKeyPEMs != nil {\n\t\tfor index, pem := range rekorPublicKeyPEMs {\n\t\t\tpk, err := cryptoutils.UnmarshalPEMToPublicKey(pem)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing Rekor public key %d: %w\", index+1, err)\n\t\t\t}\n\t\t\tpkECDSA, ok := pk.(*ecdsa.PublicKey)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"Rekor public key %d is not using ECDSA\", index+1)\n\t\t\t}\n\t\t\tres.rekorPublicKeys = append(res.rekorPublicKeys, pkECDSA)\n\t\t}\n\t\tif len(res.rekorPublicKeys) == 0 {\n\t\t\treturn nil, errors.New(`Internal inconsistency: \"rekorPublicKeyPath\", \"rekorPublicKeyPaths\", \"rekorPublicKeyData\" and \"rekorPublicKeyDatas\" produced no public keys`)\n\t\t}\n\t}\n\n\tif pr.PKI != nil {\n\t\tp, err := pr.PKI.prepareTrustRoot()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tres.pki = p\n\t}\n\n\treturn &res, nil\n}\n\nfunc (pr *prSigstoreSigned) isSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error) {\n\t// We don’t know of a single user of this API, and we might return unexpected values in Signature.\n\t// For now, just punt.\n\treturn sarRejected, nil, errors.New(\"isSignatureAuthorAccepted is not implemented for sigstore\")\n}\n\nfunc (pr *prSigstoreSigned) isSignatureAccepted(ctx context.Context, image private.UnparsedImage, sig signature.Sigstore) (signatureAcceptanceResult, error) {\n\t// FIXME: move this to per-context initialization\n\ttrustRoot, err := pr.prepareTrustRoot()\n\tif err != nil {\n\t\treturn sarRejected, err\n\t}\n\n\tuntrustedAnnotations := sig.UntrustedAnnotations()\n\tuntrustedBase64Signature, ok := untrustedAnnotations[signature.SigstoreSignatureAnnotationKey]\n\tif !ok {\n\t\treturn sarRejected, fmt.Errorf(\"missing %s annotation\", signature.SigstoreSignatureAnnotationKey)\n\t}\n\tuntrustedPayload := sig.UntrustedPayload()\n\n\tkeySources := 0\n\tif trustRoot.publicKeys != nil {\n\t\tkeySources++\n\t}\n\tif trustRoot.fulcio != nil {\n\t\tkeySources++\n\t}\n\tif trustRoot.pki != nil {\n\t\tkeySources++\n\t}\n\n\tvar publicKeys []crypto.PublicKey\n\tswitch {\n\tcase keySources > 1: // newPRSigstoreSigned rejects more than one key sources.\n\t\treturn sarRejected, errors.New(\"Internal inconsistency: More than one of public key, Fulcio, or PKI specified\")\n\tcase keySources == 0: // newPRSigstoreSigned rejects empty key sources.\n\t\treturn sarRejected, errors.New(\"Internal inconsistency: A public key, Fulcio, or PKI must be specified.\")\n\tcase trustRoot.publicKeys != nil:\n\t\tif trustRoot.rekorPublicKeys != nil {\n\t\t\tuntrustedSET, ok := untrustedAnnotations[signature.SigstoreSETAnnotationKey]\n\t\t\tif !ok { // For user convenience; passing an empty []byte to VerifyRekorSet should work.\n\t\t\t\treturn sarRejected, fmt.Errorf(\"missing %s annotation\", signature.SigstoreSETAnnotationKey)\n\t\t\t}\n\n\t\t\tvar rekorFailures []string\n\t\t\tfor _, candidatePublicKey := range trustRoot.publicKeys {\n\t\t\t\t// We could use publicKeyPEM directly, but let’s re-marshal to avoid inconsistencies.\n\t\t\t\t// FIXME: We could just generate DER instead of the full PEM text\n\t\t\t\trecreatedPublicKeyPEM, err := cryptoutils.MarshalPublicKeyToPEM(candidatePublicKey)\n\t\t\t\tif err != nil {\n\t\t\t\t\t// Coverage: The key was loaded from a PEM format, so it’s unclear how this could fail.\n\t\t\t\t\t// (PEM is not essential, MarshalPublicKeyToPEM can only fail if marshaling to ASN1.DER fails.)\n\t\t\t\t\treturn sarRejected, fmt.Errorf(\"re-marshaling public key to PEM: %w\", err)\n\t\t\t\t}\n\t\t\t\t// We don’t care about the Rekor timestamp, just about log presence.\n\t\t\t\t_, err = internal.VerifyRekorSET(trustRoot.rekorPublicKeys, []byte(untrustedSET), recreatedPublicKeyPEM, untrustedBase64Signature, untrustedPayload)\n\t\t\t\tif err == nil {\n\t\t\t\t\tpublicKeys = append(publicKeys, candidatePublicKey)\n\t\t\t\t\tbreak // The SET can only accept one public key entry, so if we found one, the rest either doesn’t match or is a duplicate\n\t\t\t\t}\n\t\t\t\trekorFailures = append(rekorFailures, err.Error())\n\t\t\t}\n\t\t\tif len(publicKeys) == 0 {\n\t\t\t\tif len(rekorFailures) == 0 {\n\t\t\t\t\t// Coverage: We have ensured that len(trustRoot.publicKeys) != 0, when nothing succeeds, there must be at least one failure.\n\t\t\t\t\treturn sarRejected, errors.New(`Internal inconsistency: Rekor SET did not match any key but we have no failures.`)\n\t\t\t\t}\n\t\t\t\treturn sarRejected, internal.NewInvalidSignatureError(fmt.Sprintf(\"No public key verified against the RekorSET: %s\", strings.Join(rekorFailures, \", \")))\n\t\t\t}\n\t\t} else {\n\t\t\tpublicKeys = trustRoot.publicKeys\n\t\t}\n\n\tcase trustRoot.fulcio != nil:\n\t\tif trustRoot.rekorPublicKeys == nil { // newPRSigstoreSigned rejects such combinations.\n\t\t\treturn sarRejected, errors.New(\"Internal inconsistency: Fulcio CA specified without a Rekor public key\")\n\t\t}\n\t\tuntrustedSET, ok := untrustedAnnotations[signature.SigstoreSETAnnotationKey]\n\t\tif !ok { // For user convenience; passing an empty []byte to VerifyRekorSet should correctly reject it anyway.\n\t\t\treturn sarRejected, fmt.Errorf(\"missing %s annotation\", signature.SigstoreSETAnnotationKey)\n\t\t}\n\t\tuntrustedCert, ok := untrustedAnnotations[signature.SigstoreCertificateAnnotationKey]\n\t\tif !ok { // For user convenience; passing an empty []byte to VerifyRekorSet should correctly reject it anyway.\n\t\t\treturn sarRejected, fmt.Errorf(\"missing %s annotation\", signature.SigstoreCertificateAnnotationKey)\n\t\t}\n\t\tvar untrustedIntermediateChainBytes []byte\n\t\tif untrustedIntermediateChain, ok := untrustedAnnotations[signature.SigstoreIntermediateCertificateChainAnnotationKey]; ok {\n\t\t\tuntrustedIntermediateChainBytes = []byte(untrustedIntermediateChain)\n\t\t}\n\t\tpk, err := verifyRekorFulcio(trustRoot.rekorPublicKeys, trustRoot.fulcio,\n\t\t\t[]byte(untrustedSET), []byte(untrustedCert), untrustedIntermediateChainBytes, untrustedBase64Signature, untrustedPayload)\n\t\tif err != nil {\n\t\t\treturn sarRejected, err\n\t\t}\n\t\tpublicKeys = []crypto.PublicKey{pk}\n\n\tcase trustRoot.pki != nil:\n\t\tif trustRoot.rekorPublicKeys != nil { // newPRSigstoreSigned rejects such combinations.\n\t\t\treturn sarRejected, errors.New(\"Internal inconsistency: PKI specified with a Rekor public key\")\n\t\t}\n\t\tuntrustedCert, ok := untrustedAnnotations[signature.SigstoreCertificateAnnotationKey]\n\t\tif !ok {\n\t\t\treturn sarRejected, fmt.Errorf(\"missing %s annotation\", signature.SigstoreCertificateAnnotationKey)\n\t\t}\n\t\tvar untrustedIntermediateChainBytes []byte\n\t\tif untrustedIntermediateChain, ok := untrustedAnnotations[signature.SigstoreIntermediateCertificateChainAnnotationKey]; ok {\n\t\t\tuntrustedIntermediateChainBytes = []byte(untrustedIntermediateChain)\n\t\t}\n\t\tpk, err := verifyPKI(trustRoot.pki, []byte(untrustedCert), untrustedIntermediateChainBytes)\n\t\tif err != nil {\n\t\t\treturn sarRejected, err\n\t\t}\n\t\tpublicKeys = []crypto.PublicKey{pk}\n\t}\n\n\tif len(publicKeys) == 0 {\n\t\t// Coverage: This should never happen, we ensured that trustRoot.publicKeys is non-empty if set,\n\t\t// and we have already excluded the possibility in the switch above.\n\t\treturn sarRejected, fmt.Errorf(\"Internal inconsistency: publicKey not set before verifying sigstore payload\")\n\t}\n\tsignature, err := internal.VerifySigstorePayload(publicKeys, untrustedPayload, untrustedBase64Signature, internal.SigstorePayloadAcceptanceRules{\n\t\tValidateSignedDockerReference: func(ref string) error {\n\t\t\tif !pr.SignedIdentity.matchesDockerReference(image, ref) {\n\t\t\t\treturn PolicyRequirementError(fmt.Sprintf(\"Signature for identity %q is not accepted\", ref))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tValidateSignedDockerManifestDigest: func(digest digest.Digest) error {\n\t\t\tm, _, err := image.Manifest(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdigestMatches, err := manifest.MatchesDigest(m, digest)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !digestMatches {\n\t\t\t\treturn PolicyRequirementError(fmt.Sprintf(\"Signature for digest %s does not match\", digest))\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn sarRejected, err\n\t}\n\tif signature == nil { // A paranoid sanity check that VerifySigstorePayload has returned consistent values\n\t\treturn sarRejected, errors.New(\"internal error: VerifySigstorePayload succeeded but returned no data\") // Coverage: This should never happen.\n\t}\n\n\treturn sarAccepted, nil\n}\n\nfunc (pr *prSigstoreSigned) isRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error) {\n\tsigs, err := image.UntrustedSignatures(ctx)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tvar rejections []error\n\tfoundNonSigstoreSignatures := 0\n\tfoundSigstoreNonAttachments := 0\n\tfor _, s := range sigs {\n\t\tsigstoreSig, ok := s.(signature.Sigstore)\n\t\tif !ok {\n\t\t\tfoundNonSigstoreSignatures++\n\t\t\tcontinue\n\t\t}\n\t\tif sigstoreSig.UntrustedMIMEType() != signature.SigstoreSignatureMIMEType {\n\t\t\tfoundSigstoreNonAttachments++\n\t\t\tcontinue\n\t\t}\n\n\t\tvar reason error\n\t\tswitch res, err := pr.isSignatureAccepted(ctx, image, sigstoreSig); res {\n\t\tcase sarAccepted:\n\t\t\t// One accepted signature is enough.\n\t\t\treturn true, nil\n\t\tcase sarRejected:\n\t\t\treason = err\n\t\tcase sarUnknown:\n\t\t\t// Huh?! This should not happen at all; treat it as any other invalid value.\n\t\t\tfallthrough\n\t\tdefault:\n\t\t\treason = fmt.Errorf(`Internal error: Unexpected signature verification result %q`, string(res))\n\t\t}\n\t\trejections = append(rejections, reason)\n\t}\n\tvar summary error\n\tswitch len(rejections) {\n\tcase 0:\n\t\tif foundNonSigstoreSignatures == 0 && foundSigstoreNonAttachments == 0 {\n\t\t\t// A nice message for the most common case.\n\t\t\tsummary = PolicyRequirementError(\"A signature was required, but no signature exists\")\n\t\t} else {\n\t\t\tsummary = PolicyRequirementError(fmt.Sprintf(\"A signature was required, but no signature exists (%d non-sigstore signatures, %d sigstore non-signature attachments)\",\n\t\t\t\tfoundNonSigstoreSignatures, foundSigstoreNonAttachments))\n\t\t}\n\tcase 1:\n\t\tsummary = rejections[0]\n\tdefault:\n\t\tsummary = PolicyRequirementError(multierr.Format(\"None of the signatures were accepted, reasons: \", \"; \", \"\", rejections).Error())\n\t}\n\treturn false, summary\n}\n\nfunc (pr *prSigstoreSigned) verifiesSignatures() bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_eval_simple.go",
    "content": "// Policy evaluation for the various simple PolicyRequirement types.\n\npackage signature\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/transports\"\n)\n\nfunc (pr *prInsecureAcceptAnything) isSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error) {\n\t// prInsecureAcceptAnything semantics: Every image is allowed to run,\n\t// but this does not consider the signature as verified.\n\treturn sarUnknown, nil, nil\n}\n\nfunc (pr *prInsecureAcceptAnything) isRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error) {\n\treturn true, nil\n}\n\nfunc (pr *prInsecureAcceptAnything) verifiesSignatures() bool {\n\treturn false\n}\n\nfunc (pr *prReject) isSignatureAuthorAccepted(ctx context.Context, image private.UnparsedImage, sig []byte) (signatureAcceptanceResult, *Signature, error) {\n\treturn sarRejected, nil, PolicyRequirementError(fmt.Sprintf(\"Any signatures for image %s are rejected by policy.\", transports.ImageName(image.Reference())))\n}\n\nfunc (pr *prReject) isRunningImageAllowed(ctx context.Context, image private.UnparsedImage) (bool, error) {\n\treturn false, PolicyRequirementError(fmt.Sprintf(\"Running image %s is rejected by policy.\", transports.ImageName(image.Reference())))\n}\n\nfunc (pr *prReject) verifiesSignatures() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_paths_common.go",
    "content": "//go:build !freebsd\n\npackage signature\n\n// builtinDefaultPolicyPath is the policy path used for DefaultPolicy().\n// DO NOT change this, instead see systemDefaultPolicyPath above.\nconst builtinDefaultPolicyPath = \"/etc/containers/policy.json\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_paths_freebsd.go",
    "content": "//go:build freebsd\n\npackage signature\n\n// builtinDefaultPolicyPath is the policy path used for DefaultPolicy().\n// DO NOT change this, instead see systemDefaultPolicyPath above.\nconst builtinDefaultPolicyPath = \"/usr/local/etc/containers/policy.json\"\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_reference_match.go",
    "content": "// PolicyReferenceMatch implementations.\n\npackage signature\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/transports\"\n)\n\n// parseImageAndDockerReference converts an image and a reference string into two parsed entities, failing on any error and handling unidentified images.\nfunc parseImageAndDockerReference(image private.UnparsedImage, s2 string) (reference.Named, reference.Named, error) {\n\tr1 := image.Reference().DockerReference()\n\tif r1 == nil {\n\t\treturn nil, nil, PolicyRequirementError(fmt.Sprintf(\"Docker reference match attempted on image %s with no known Docker reference identity\",\n\t\t\ttransports.ImageName(image.Reference())))\n\t}\n\tr2, err := reference.ParseNormalizedNamed(s2)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn r1, r2, nil\n}\n\nfunc (prm *prmMatchExact) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseImageAndDockerReference(image, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\t// Do not add default tags: image.Reference().DockerReference() should contain it already, and signatureDockerReference should be exact; so, verify that now.\n\tif reference.IsNameOnly(intended) || reference.IsNameOnly(signature) {\n\t\treturn false\n\t}\n\treturn signature.String() == intended.String()\n}\n\n// matchRepoDigestOrExactReferenceValues implements prmMatchRepoDigestOrExact.matchesDockerReference\n// using reference.Named values.\nfunc matchRepoDigestOrExactReferenceValues(intended, signature reference.Named) bool {\n\t// Do not add default tags: image.Reference().DockerReference() should contain it already, and signatureDockerReference should be exact; so, verify that now.\n\tif reference.IsNameOnly(signature) {\n\t\treturn false\n\t}\n\tswitch intended.(type) {\n\tcase reference.NamedTagged: // Includes the case when intended has both a tag and a digest.\n\t\treturn signature.String() == intended.String()\n\tcase reference.Canonical:\n\t\t// We don’t actually compare the manifest digest against the signature here; that happens prSignedBy.in UnparsedImage.Manifest.\n\t\t// Because UnparsedImage.Manifest verifies the intended.Digest() against the manifest, and prSignedBy verifies the signature digest against the manifest,\n\t\t// we know that signature digest matches intended.Digest() (but intended.Digest() and signature digest may use different algorithms)\n\t\treturn signature.Name() == intended.Name()\n\tdefault: // !reference.IsNameOnly(intended)\n\t\treturn false\n\t}\n}\n\nfunc (prm *prmMatchRepoDigestOrExact) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseImageAndDockerReference(image, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn matchRepoDigestOrExactReferenceValues(intended, signature)\n}\n\nfunc (prm *prmMatchRepository) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseImageAndDockerReference(image, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn signature.Name() == intended.Name()\n}\n\n// parseDockerReferences converts two reference strings into parsed entities, failing on any error\nfunc parseDockerReferences(s1, s2 string) (reference.Named, reference.Named, error) {\n\tr1, err := reference.ParseNormalizedNamed(s1)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tr2, err := reference.ParseNormalizedNamed(s2)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn r1, r2, nil\n}\n\nfunc (prm *prmExactReference) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseDockerReferences(prm.DockerReference, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\t// prm.DockerReference and signatureDockerReference should be exact; so, verify that now.\n\tif reference.IsNameOnly(intended) || reference.IsNameOnly(signature) {\n\t\treturn false\n\t}\n\treturn signature.String() == intended.String()\n}\n\nfunc (prm *prmExactRepository) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseDockerReferences(prm.DockerRepository, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn signature.Name() == intended.Name()\n}\n\n// refMatchesPrefix returns true if ref matches prm.Prefix.\nfunc (prm *prmRemapIdentity) refMatchesPrefix(ref reference.Named) bool {\n\tname := ref.Name()\n\tswitch {\n\tcase len(name) < len(prm.Prefix):\n\t\treturn false\n\tcase len(name) == len(prm.Prefix):\n\t\treturn name == prm.Prefix\n\tcase len(name) > len(prm.Prefix):\n\t\t// We are matching only ref.Name(), not ref.String(), so the only separator we are\n\t\t// expecting is '/':\n\t\t// - '@' is only valid to separate a digest, i.e. not a part of ref.Name()\n\t\t// - similarly ':' to mark a tag would not be a part of ref.Name(); it can be a part of a\n\t\t//   host:port domain syntax, but we don't treat that specially and require an exact match\n\t\t//   of the domain.\n\t\treturn strings.HasPrefix(name, prm.Prefix) && name[len(prm.Prefix)] == '/'\n\tdefault:\n\t\tpanic(\"Internal error: impossible comparison outcome\")\n\t}\n}\n\n// remapReferencePrefix returns the result of remapping ref, if it matches prm.Prefix\n// or the original ref if it does not.\nfunc (prm *prmRemapIdentity) remapReferencePrefix(ref reference.Named) (reference.Named, error) {\n\tif !prm.refMatchesPrefix(ref) {\n\t\treturn ref, nil\n\t}\n\trefString := ref.String()\n\tnewNamedRef := strings.Replace(refString, prm.Prefix, prm.SignedPrefix, 1)\n\tnewParsedRef, err := reference.ParseNamed(newNamedRef)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(`error rewriting reference from %q to %q: %w`, refString, newNamedRef, err)\n\t}\n\treturn newParsedRef, nil\n}\n\nfunc (prm *prmRemapIdentity) matchesDockerReference(image private.UnparsedImage, signatureDockerReference string) bool {\n\tintended, signature, err := parseImageAndDockerReference(image, signatureDockerReference)\n\tif err != nil {\n\t\treturn false\n\t}\n\tintended, err = prm.remapReferencePrefix(intended)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn matchRepoDigestOrExactReferenceValues(intended, signature)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/policy_types.go",
    "content": "// Note: Consider the API unstable until the code supports at least three different image formats or transports.\n\n// This defines types used to represent a signature verification policy in memory.\n// Do not use the private types directly; either parse a configuration file, or construct a Policy from PolicyRequirements\n// built using the constructor functions provided in policy_config.go.\n\npackage signature\n\n// NOTE: Keep this in sync with docs/containers-policy.json.5.md!\n\n// Policy defines requirements for considering a signature, or an image, valid.\ntype Policy struct {\n\t// Default applies to any image which does not have a matching policy in Transports.\n\t// Note that this can happen even if a matching PolicyTransportScopes exists in Transports\n\t// if the image matches none of the scopes.\n\tDefault    PolicyRequirements               `json:\"default\"`\n\tTransports map[string]PolicyTransportScopes `json:\"transports\"`\n}\n\n// PolicyTransportScopes defines policies for images for a specific transport,\n// for various scopes, the map keys.\n// Scopes are defined by the transport (types.ImageReference.PolicyConfigurationIdentity etc.);\n// there is one scope precisely matching to a single image, and namespace scopes as prefixes\n// of the single-image scope. (e.g. hostname[/zero[/or[/more[/namespaces[/individualimage]]]]])\n// The empty scope, if exists, is considered a parent namespace of all other scopes.\n// Most specific scope wins, duplication is prohibited (hard failure).\ntype PolicyTransportScopes map[string]PolicyRequirements\n\n// PolicyRequirements is a set of requirements applying to a set of images; each of them must be satisfied (though perhaps each by a different signature).\n// Must not be empty, frequently will only contain a single element.\ntype PolicyRequirements []PolicyRequirement\n\n// PolicyRequirement is a rule which must be satisfied by at least one of the signatures of an image.\n// The type is public, but its definition is private.\n\n// prCommon is the common type field in a JSON encoding of PolicyRequirement.\ntype prCommon struct {\n\tType prTypeIdentifier `json:\"type\"`\n}\n\n// prTypeIdentifier is string designating a kind of a PolicyRequirement.\ntype prTypeIdentifier string\n\nconst (\n\tprTypeInsecureAcceptAnything prTypeIdentifier = \"insecureAcceptAnything\"\n\tprTypeReject                 prTypeIdentifier = \"reject\"\n\tprTypeSignedBy               prTypeIdentifier = \"signedBy\"\n\tprTypeSignedBaseLayer        prTypeIdentifier = \"signedBaseLayer\"\n\tprTypeSigstoreSigned         prTypeIdentifier = \"sigstoreSigned\"\n)\n\n// prInsecureAcceptAnything is a PolicyRequirement with type = prTypeInsecureAcceptAnything:\n// every image is allowed to run.\n// Note that because PolicyRequirements are implicitly ANDed, this is necessary only if it is the only rule (to make the list non-empty and the policy explicit).\n// NOTE: This allows the image to run; it DOES NOT consider the signature verified (per IsSignatureAuthorAccepted).\n// FIXME? Better name?\ntype prInsecureAcceptAnything struct {\n\tprCommon\n}\n\n// prReject is a PolicyRequirement with type = prTypeReject: every image is rejected.\ntype prReject struct {\n\tprCommon\n}\n\n// prSignedBy is a PolicyRequirement with type = prTypeSignedBy: the image is signed by trusted keys for a specified identity\ntype prSignedBy struct {\n\tprCommon\n\n\t// KeyType specifies what kind of key reference KeyPath/KeyPaths/KeyData is.\n\t// Acceptable values are “GPGKeys” | “signedByGPGKeys” “X.509Certificates” | “signedByX.509CAs”\n\t// FIXME: eventually also support GPGTOFU, X.509TOFU, with KeyPath only\n\tKeyType sbKeyType `json:\"keyType\"`\n\n\t// KeyPath is a pathname to a local file containing the trusted key(s). Exactly one of KeyPath, KeyPaths and KeyData must be specified.\n\tKeyPath string `json:\"keyPath,omitempty\"`\n\t// KeyPaths is a set of pathnames to local files containing the trusted key(s). Exactly one of KeyPath, KeyPaths and KeyData must be specified.\n\tKeyPaths []string `json:\"keyPaths,omitempty\"`\n\t// KeyData contains the trusted key(s), base64-encoded. Exactly one of KeyPath, KeyPaths and KeyData must be specified.\n\tKeyData []byte `json:\"keyData,omitempty\"`\n\n\t// SignedIdentity specifies what image identity the signature must be claiming about the image.\n\t// Defaults to \"matchRepoDigestOrExact\" if not specified.\n\tSignedIdentity PolicyReferenceMatch `json:\"signedIdentity\"`\n}\n\n// sbKeyType are the allowed values for prSignedBy.KeyType\ntype sbKeyType string\n\nconst (\n\t// SBKeyTypeGPGKeys refers to keys contained in a GPG keyring\n\tSBKeyTypeGPGKeys sbKeyType = \"GPGKeys\"\n\t// SBKeyTypeSignedByGPGKeys refers to keys signed by keys in a GPG keyring\n\tSBKeyTypeSignedByGPGKeys sbKeyType = \"signedByGPGKeys\"\n\t// SBKeyTypeX509Certificates refers to keys in a set of X.509 certificates\n\t// FIXME: PEM, DER?\n\tSBKeyTypeX509Certificates sbKeyType = \"X509Certificates\"\n\t// SBKeyTypeSignedByX509CAs refers to keys signed by one of the X.509 CAs\n\t// FIXME: PEM, DER?\n\tSBKeyTypeSignedByX509CAs sbKeyType = \"signedByX509CAs\"\n)\n\n// prSignedBaseLayer is a PolicyRequirement with type = prSignedBaseLayer: the image has a specified, correctly signed, base image.\ntype prSignedBaseLayer struct {\n\tprCommon\n\t// BaseLayerIdentity specifies the base image to look for. \"match-exact\" is rejected, \"match-repository\" is unlikely to be useful.\n\tBaseLayerIdentity PolicyReferenceMatch `json:\"baseLayerIdentity\"`\n}\n\n// prSigstoreSigned is a PolicyRequirement with type = prTypeSigstoreSigned: the image is signed by trusted keys for a specified identity\ntype prSigstoreSigned struct {\n\tprCommon\n\n\t// KeyPath is a pathname to a local file containing the trusted key. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\tKeyPath string `json:\"keyPath,omitempty\"`\n\t// KeyPaths is a set of pathnames to local files containing the trusted key(s). Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\tKeyPaths []string `json:\"keyPaths,omitempty\"`\n\t// KeyData contains the trusted key, base64-encoded. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\tKeyData []byte `json:\"keyData,omitempty\"`\n\t// KeyDatas is a set of trusted keys, base64-encoded. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\tKeyDatas [][]byte `json:\"keyDatas,omitempty\"`\n\n\t// Fulcio specifies which Fulcio-generated certificates are accepted. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\t// If Fulcio is specified, one of RekorPublicKeyPath or RekorPublicKeyData must be specified as well.\n\tFulcio PRSigstoreSignedFulcio `json:\"fulcio,omitempty\"`\n\n\t// RekorPublicKeyPath is a pathname to local file containing a public key of a Rekor server which must record acceptable signatures.\n\t// If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well;\n\t// otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified).\n\tRekorPublicKeyPath string `json:\"rekorPublicKeyPath,omitempty\"`\n\t// RekorPublicKeyPaths is a set of pathnames to local files, each containing a public key of a Rekor server. One of the keys must record acceptable signatures.\n\t// If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well;\n\t// otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified).\n\tRekorPublicKeyPaths []string `json:\"rekorPublicKeyPaths,omitempty\"`\n\t// RekorPublicKeyPath contain a base64-encoded public key of a Rekor server which must record acceptable signatures.\n\t// If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well;\n\t// otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified).\n\tRekorPublicKeyData []byte `json:\"rekorPublicKeyData,omitempty\"`\n\t// RekorPublicKeyDatas each contain a base64-encoded public key of a Rekor server. One of the keys must record acceptable signatures.\n\t// If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well;\n\t// otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified).\n\tRekorPublicKeyDatas [][]byte `json:\"rekorPublicKeyDatas,omitempty\"`\n\n\t// PKI specifies which PKI-generated certificates are accepted. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas, Fulcio, and PKI must be specified.\n\tPKI PRSigstoreSignedPKI `json:\"pki,omitempty\"`\n\n\t// SignedIdentity specifies what image identity the signature must be claiming about the image.\n\t// Defaults to \"matchRepoDigestOrExact\" if not specified.\n\t// Note that /usr/bin/cosign interoperability might require using repo-only matching.\n\tSignedIdentity PolicyReferenceMatch `json:\"signedIdentity\"`\n}\n\n// PRSigstoreSignedFulcio contains Fulcio configuration options for a \"sigstoreSigned\" PolicyRequirement.\n// This is a public type with a single private implementation.\ntype PRSigstoreSignedFulcio interface {\n\t// toFulcioTrustRoot creates a fulcioTrustRoot from the input data.\n\t// (This also prevents external implementations of this interface, ensuring that prSigstoreSignedFulcio is the only one.)\n\tprepareTrustRoot() (*fulcioTrustRoot, error)\n}\n\n// prSigstoreSignedFulcio collects Fulcio configuration options for prSigstoreSigned\ntype prSigstoreSignedFulcio struct {\n\t// CAPath a path to a file containing accepted CA root certificates, in PEM format. Exactly one of CAPath and CAData must be specified.\n\tCAPath string `json:\"caPath,omitempty\"`\n\t// CAData contains accepted CA root certificates in PEM format, all of that base64-encoded. Exactly one of CAPath and CAData must be specified.\n\tCAData []byte `json:\"caData,omitempty\"`\n\t// OIDCIssuer specifies the expected OIDC issuer, recorded by Fulcio into the generated certificates.\n\tOIDCIssuer string `json:\"oidcIssuer,omitempty\"`\n\t// SubjectEmail specifies the expected email address of the authenticated OIDC identity, recorded by Fulcio into the generated certificates.\n\tSubjectEmail string `json:\"subjectEmail,omitempty\"`\n}\n\n// PRSigstoreSignedPKI contains PKI configuration options for a \"sigstoreSigned\" PolicyRequirement.\ntype PRSigstoreSignedPKI interface {\n\t// prepareTrustRoot creates a pkiTrustRoot from the input data.\n\t// (This also prevents external implementations of this interface, ensuring that prSigstoreSignedPKI is the only one.)\n\tprepareTrustRoot() (*pkiTrustRoot, error)\n}\n\n// prSigstoreSignedPKI contains non-fulcio certificate PKI configuration options for prSigstoreSigned\ntype prSigstoreSignedPKI struct {\n\t// CARootsPath a path to a file containing accepted CA root certificates, in PEM format. Exactly one of CARootsPath and CARootsData must be specified.\n\tCARootsPath string `json:\"caRootsPath,omitempty\"`\n\t// CARootsData contains accepted CA root certificates in PEM format, all of that base64-encoded. Exactly one of CARootsPath and CARootsData must be specified.\n\tCARootsData []byte `json:\"caRootsData,omitempty\"`\n\t// CAIntermediatesPath a path to a file containing accepted CA intermediate certificates, in PEM format. Only one of CAIntermediatesPath or CAIntermediatesData can be specified, not both.\n\tCAIntermediatesPath string `json:\"caIntermediatesPath,omitempty\"`\n\t// CAIntermediatesData contains accepted CA intermediate certificates in PEM format, all of that base64-encoded. Only one of CAIntermediatesPath or CAIntermediatesData can be specified, not both.\n\tCAIntermediatesData []byte `json:\"caIntermediatesData,omitempty\"`\n\n\t// SubjectEmail specifies the expected email address imposed on the subject to which the certificate was issued. At least one of SubjectEmail and SubjectHostname must be specified.\n\tSubjectEmail string `json:\"subjectEmail,omitempty\"`\n\t// SubjectHostname specifies the expected hostname imposed on the subject to which the certificate was issued. At least one of SubjectEmail and SubjectHostname must be specified.\n\tSubjectHostname string `json:\"subjectHostname,omitempty\"`\n}\n\n// PolicyReferenceMatch specifies a set of image identities accepted in PolicyRequirement.\n// The type is public, but its implementation is private.\n\n// prmCommon is the common type field in a JSON encoding of PolicyReferenceMatch.\ntype prmCommon struct {\n\tType prmTypeIdentifier `json:\"type\"`\n}\n\n// prmTypeIdentifier is string designating a kind of a PolicyReferenceMatch.\ntype prmTypeIdentifier string\n\nconst (\n\tprmTypeMatchExact             prmTypeIdentifier = \"matchExact\"\n\tprmTypeMatchRepoDigestOrExact prmTypeIdentifier = \"matchRepoDigestOrExact\"\n\tprmTypeMatchRepository        prmTypeIdentifier = \"matchRepository\"\n\tprmTypeExactReference         prmTypeIdentifier = \"exactReference\"\n\tprmTypeExactRepository        prmTypeIdentifier = \"exactRepository\"\n\tprmTypeRemapIdentity          prmTypeIdentifier = \"remapIdentity\"\n)\n\n// prmMatchExact is a PolicyReferenceMatch with type = prmMatchExact: the two references must match exactly.\ntype prmMatchExact struct {\n\tprmCommon\n}\n\n// prmMatchRepoDigestOrExact is a PolicyReferenceMatch with type = prmMatchExactOrDigest: the two references must match exactly,\n// except that digest references are also accepted if the repository name matches (regardless of tag/digest) and the signature applies to the referenced digest\ntype prmMatchRepoDigestOrExact struct {\n\tprmCommon\n}\n\n// prmMatchRepository is a PolicyReferenceMatch with type = prmMatchRepository: the two references must use the same repository, may differ in the tag.\ntype prmMatchRepository struct {\n\tprmCommon\n}\n\n// prmExactReference is a PolicyReferenceMatch with type = prmExactReference: matches a specified reference exactly.\ntype prmExactReference struct {\n\tprmCommon\n\tDockerReference string `json:\"dockerReference\"`\n}\n\n// prmExactRepository is a PolicyReferenceMatch with type = prmExactRepository: matches a specified repository, with any tag.\ntype prmExactRepository struct {\n\tprmCommon\n\tDockerRepository string `json:\"dockerRepository\"`\n}\n\n// prmRemapIdentity is a PolicyReferenceMatch with type = prmRemapIdentity: like prmMatchRepoDigestOrExact,\n// except that a namespace (at least a host:port, at most a single repository) is substituted before matching the two references.\ntype prmRemapIdentity struct {\n\tprmCommon\n\tPrefix       string `json:\"prefix\"`\n\tSignedPrefix string `json:\"signedPrefix\"`\n\t// Possibly let the users make a choice for tag/digest matching behavior\n\t// similar to prmMatchExact/prmMatchRepository?\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/signer/signer.go",
    "content": "package signer\n\nimport \"go.podman.io/image/v5/internal/signer\"\n\n// Signer is an object, possibly carrying state, that can be used by copy.Image to sign one or more container images.\n// It can only be created from within the containers/image package; it can’t be implemented externally.\n//\n// The owner of a Signer must call Close() when done.\ntype Signer = signer.Signer\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/copied.go",
    "content": "package sigstore\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/ed25519\"\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/secure-systems-lab/go-securesystemslib/encrypted\"\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\t\"github.com/sigstore/sigstore/pkg/signature\"\n)\n\n// The following code was copied from github.com/sigstore.\n// FIXME: Eliminate that duplication.\n\n// Copyright 2021 The Sigstore Authors.\n\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n\n//     http://www.apache.org/licenses/LICENSE-2.0\n\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nconst (\n\t// from sigstore/cosign/pkg/cosign.CosignPrivateKeyPemType.\n\tcosignPrivateKeyPemType = \"ENCRYPTED COSIGN PRIVATE KEY\"\n\t// from sigstore/cosign/pkg/cosign.SigstorePrivateKeyPemType.\n\tsigstorePrivateKeyPemType = \"ENCRYPTED SIGSTORE PRIVATE KEY\"\n)\n\n// from sigstore/cosign/pkg/cosign.loadPrivateKey\n// FIXME: Do we need all of these key formats?\nfunc loadPrivateKey(key []byte, pass []byte) (signature.SignerVerifier, error) {\n\t// Decrypt first\n\tp, _ := pem.Decode(key)\n\tif p == nil {\n\t\treturn nil, errors.New(\"invalid pem block\")\n\t}\n\tif p.Type != sigstorePrivateKeyPemType && p.Type != cosignPrivateKeyPemType {\n\t\treturn nil, fmt.Errorf(\"unsupported pem type: %s\", p.Type)\n\t}\n\n\tx509Encoded, err := encrypted.Decrypt(p.Bytes, pass)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decrypt: %w\", err)\n\t}\n\n\tpk, err := x509.ParsePKCS8PrivateKey(x509Encoded)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing private key: %w\", err)\n\t}\n\tswitch pk := pk.(type) {\n\tcase *rsa.PrivateKey:\n\t\treturn signature.LoadRSAPKCS1v15SignerVerifier(pk, crypto.SHA256)\n\tcase *ecdsa.PrivateKey:\n\t\treturn signature.LoadECDSASignerVerifier(pk, crypto.SHA256)\n\tcase ed25519.PrivateKey:\n\t\treturn signature.LoadED25519SignerVerifier(pk)\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported key type\")\n\t}\n}\n\n// simplified from sigstore/cosign/pkg/cosign.marshalKeyPair\n// loadPrivateKey always requires a encryption, so this always requires a passphrase.\nfunc marshalKeyPair(privateKey crypto.PrivateKey, publicKey crypto.PublicKey, password []byte) (_privateKey []byte, _publicKey []byte, err error) {\n\tx509Encoded, err := x509.MarshalPKCS8PrivateKey(privateKey)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"x509 encoding private key: %w\", err)\n\t}\n\n\tencBytes, err := encrypted.Encrypt(x509Encoded, password)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// store in PEM format\n\tprivBytes := pem.EncodeToMemory(&pem.Block{\n\t\tBytes: encBytes,\n\t\t// Use the older “COSIGN” type name; as of 2023-03-30 cosign’s main branch generates “SIGSTORE” types,\n\t\t// but a version of cosign that can accept them has not yet been released.\n\t\tType: cosignPrivateKeyPemType,\n\t})\n\n\t// Now do the public key\n\tpubBytes, err := cryptoutils.MarshalPublicKeyToPEM(publicKey)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn privBytes, pubBytes, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/fulcio/fulcio.go",
    "content": "package fulcio\n\nimport (\n\t\"crypto\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"crypto/x509\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/url\"\n\n\t\"github.com/sigstore/fulcio/pkg/api\"\n\t\"github.com/sigstore/sigstore/pkg/oauth\"\n\t\"github.com/sigstore/sigstore/pkg/oauthflow\"\n\tsigstoreSignature \"github.com/sigstore/sigstore/pkg/signature\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/internal/useragent\"\n\t\"go.podman.io/image/v5/signature/sigstore/internal\"\n\t\"golang.org/x/oauth2\"\n)\n\n// setupSignerWithFulcio updates s with a certificate generated by fulcioURL based on oidcIDToken\nfunc setupSignerWithFulcio(s *internal.SigstoreSigner, fulcioURL *url.URL, oidcIDToken *oauthflow.OIDCIDToken) error {\n\t// ECDSA-P256 is the only interoperable algorithm per\n\t// https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md#signature-schemes .\n\tprivateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"generating short-term private key: %w\", err)\n\t}\n\tkeyAlgorithm := \"ecdsa\"\n\t// SHA-256 is opencontainers/go-digest.Canonical, thus the algorithm to use here as well per\n\t// https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md#hashing-algorithms\n\tsigner, err := sigstoreSignature.LoadECDSASigner(privateKey, crypto.SHA256)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"initializing short-term private key: %w\", err)\n\t}\n\ts.PrivateKey = signer\n\n\tlogrus.Debugf(\"Requesting a certificate from Fulcio at %s\", fulcioURL.Redacted())\n\tfulcioClient := api.NewClient(fulcioURL, api.WithUserAgent(useragent.DefaultUserAgent))\n\t// Sign the email address as part of the request\n\th := sha256.Sum256([]byte(oidcIDToken.Subject))\n\tkeyOwnershipProof, err := ecdsa.SignASN1(rand.Reader, privateKey, h[:])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error signing key ownership proof: %w\", err)\n\t}\n\tpublicKeyBytes, err := x509.MarshalPKIXPublicKey(&privateKey.PublicKey)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"converting public key to ASN.1: %w\", err)\n\t}\n\t// Note that unlike most OAuth2 uses, this passes the ID token, not an access token.\n\t// This is only secure if every Fulcio server has an individual client ID value\n\t// = fulcioOIDCClientID, distinct from other Fulcio servers,\n\t// that is embedded into the ID token’s \"aud\" field.\n\tresp, err := fulcioClient.SigningCert(api.CertificateRequest{\n\t\tPublicKey: api.Key{\n\t\t\tContent:   publicKeyBytes,\n\t\t\tAlgorithm: keyAlgorithm,\n\t\t},\n\t\tSignedEmailAddress: keyOwnershipProof,\n\t}, oidcIDToken.RawString)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"obtaining certificate from Fulcio: %w\", err)\n\t}\n\ts.FulcioGeneratedCertificate = resp.CertPEM\n\ts.FulcioGeneratedCertificateChain = resp.ChainPEM\n\t// Cosign goes through an unmarshal/marshal roundtrip for Fulcio-generated certificates, let’s not do that.\n\ts.SigningKeyOrCert = resp.CertPEM\n\treturn nil\n}\n\n// WithFulcioAndPreexistingOIDCIDToken sets up signing to use a short-lived key and a Fulcio-issued certificate\n// based on a caller-provided OIDC ID token.\nfunc WithFulcioAndPreexistingOIDCIDToken(fulcioURL *url.URL, oidcIDToken string) internal.Option {\n\treturn func(s *internal.SigstoreSigner) error {\n\t\tif s.PrivateKey != nil {\n\t\t\treturn fmt.Errorf(\"multiple private key sources specified when preparing to create sigstore signatures\")\n\t\t}\n\n\t\t// This adds dependencies even just to parse the token. We could possibly reimplement that, and split this variant\n\t\t// into a subpackage without the OIDC dependencies… but really, is this going to be used in significantly different situations\n\t\t// than the two interactive OIDC authentication workflows?\n\t\t//\n\t\t// Are there any widely used tools to manually obtain an ID token? Why would there be?\n\t\t// For long-term usage, users provisioning a static OIDC credential might just as well provision an already-generated certificate\n\t\t// or something like that.\n\t\tlogrus.Debugf(\"Using a statically-provided OIDC token\")\n\t\tstaticTokenGetter := oauthflow.StaticTokenGetter{RawToken: oidcIDToken}\n\t\toidcIDToken, err := staticTokenGetter.GetIDToken(nil, oauth2.Config{})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"parsing OIDC token: %w\", err)\n\t\t}\n\n\t\treturn setupSignerWithFulcio(s, fulcioURL, oidcIDToken)\n\t}\n}\n\n// WithFulcioAndDeviceAuthorizationGrantOIDC sets up signing to use a short-lived key and a Fulcio-issued certificate\n// based on an OIDC ID token obtained using a device authorization grant (RFC 8628).\n//\n// interactiveOutput must be directly accessible to a human user in real time (i.e. not be just a log file).\nfunc WithFulcioAndDeviceAuthorizationGrantOIDC(fulcioURL *url.URL, oidcIssuerURL *url.URL, oidcClientID, oidcClientSecret string,\n\tinteractiveOutput io.Writer,\n) internal.Option {\n\treturn func(s *internal.SigstoreSigner) error {\n\t\tif s.PrivateKey != nil {\n\t\t\treturn fmt.Errorf(\"multiple private key sources specified when preparing to create sigstore signatures\")\n\t\t}\n\n\t\tlogrus.Debugf(\"Starting OIDC device flow for issuer %s\", oidcIssuerURL.Redacted())\n\t\ttokenGetter := oauthflow.NewDeviceFlowTokenGetterForIssuer(oidcIssuerURL.String())\n\t\ttokenGetter.MessagePrinter = func(s string) {\n\t\t\tfmt.Fprintln(interactiveOutput, s)\n\t\t}\n\t\toidcIDToken, err := oauthflow.OIDConnect(oidcIssuerURL.String(), oidcClientID, oidcClientSecret, \"\", tokenGetter)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error authenticating with OIDC: %w\", err)\n\t\t}\n\n\t\treturn setupSignerWithFulcio(s, fulcioURL, oidcIDToken)\n\t}\n}\n\n// WithFulcioAndInterativeOIDC sets up signing to use a short-lived key and a Fulcio-issued certificate\n// based on an interactively-obtained OIDC ID token.\n// The token is obtained\n//   - directly using a browser, listening on localhost, automatically opening a browser to the OIDC issuer,\n//     to be redirected on localhost. (I.e. the current environment must allow launching a browser that connect back to the current process;\n//     either or both may be impossible in a container or a remote VM).\n//   - or by instructing the user to manually open a browser, obtain the OIDC code, and interactively input it as text.\n//\n// interactiveInput and interactiveOutput must both be directly operable by a human user in real time (i.e. not be just a log file).\nfunc WithFulcioAndInteractiveOIDC(fulcioURL *url.URL, oidcIssuerURL *url.URL, oidcClientID, oidcClientSecret string,\n\tinteractiveInput io.Reader, interactiveOutput io.Writer,\n) internal.Option {\n\treturn func(s *internal.SigstoreSigner) error {\n\t\tif s.PrivateKey != nil {\n\t\t\treturn fmt.Errorf(\"multiple private key sources specified when preparing to create sigstore signatures\")\n\t\t}\n\n\t\tlogrus.Debugf(\"Starting interactive OIDC authentication for issuer %s\", oidcIssuerURL.Redacted())\n\t\t// This is intended to match oauthflow.DefaultIDTokenGetter (incl. the update in init()), overriding only input/output\n\t\thtmlPage, err := oauth.GetInteractiveSuccessHTML(false, 10)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"formatting HTML content: %w\", err)\n\t\t}\n\t\ttokenGetter := &oauthflow.InteractiveIDTokenGetter{\n\t\t\tHTMLPage: htmlPage,\n\t\t\tInput:    interactiveInput,\n\t\t\tOutput:   interactiveOutput,\n\t\t}\n\t\toidcIDToken, err := oauthflow.OIDConnect(oidcIssuerURL.String(), oidcClientID, oidcClientSecret, \"\", tokenGetter)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error authenticating with OIDC: %w\", err)\n\t\t}\n\n\t\treturn setupSignerWithFulcio(s, fulcioURL, oidcIDToken)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/generate.go",
    "content": "package sigstore\n\nimport (\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rand\"\n)\n\n// GenerateKeyPairResult is a struct to ensure the private and public parts can not be confused by the caller.\ntype GenerateKeyPairResult struct {\n\tPublicKey  []byte\n\tPrivateKey []byte\n}\n\n// GenerateKeyPair generates a public/private key pair usable for signing images using the sigstore format,\n// and returns key representations suitable for storing in long-term files (with the private key encrypted using the provided passphrase).\n// The specific key kind (e.g. algorithm, size), as well as the file format, are unspecified by this API,\n// and can change with best practices over time.\nfunc GenerateKeyPair(passphrase []byte) (*GenerateKeyPairResult, error) {\n\t// https://github.com/sigstore/cosign/blob/main/specs/SIGNATURE_SPEC.md#signature-schemes\n\t// only requires ECDSA-P256 to be supported, so that’s what we must use.\n\trawKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)\n\tif err != nil {\n\t\t// Coverage: This can fail only if the randomness source fails\n\t\treturn nil, err\n\t}\n\tprivate, public, err := marshalKeyPair(rawKey, rawKey.Public(), passphrase)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &GenerateKeyPairResult{\n\t\tPublicKey:  public,\n\t\tPrivateKey: private,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/internal/signer.go",
    "content": "package internal\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\n\tsigstoreSignature \"github.com/sigstore/sigstore/pkg/signature\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/signature/internal\"\n)\n\ntype Option func(*SigstoreSigner) error\n\n// SigstoreSigner is a signer.SignerImplementation implementation for sigstore signatures.\n// It is initialized using various closures that implement Option, sadly over several subpackages, to decrease the\n// dependency impact.\ntype SigstoreSigner struct {\n\tPrivateKey       sigstoreSignature.Signer // May be nil during initialization\n\tSigningKeyOrCert []byte                   // For possible Rekor upload; always initialized together with PrivateKey\n\n\t// Fulcio results to include\n\tFulcioGeneratedCertificate      []byte // Or nil\n\tFulcioGeneratedCertificateChain []byte // Or nil\n\n\t// Rekor state\n\tRekorUploader func(ctx context.Context, keyOrCertBytes []byte, signatureBytes []byte, payloadBytes []byte) ([]byte, error) // Or nil\n}\n\n// ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature.\nfunc (s *SigstoreSigner) ProgressMessage() string {\n\treturn \"Signing image using a sigstore signature\"\n}\n\n// SignImageManifest creates a new signature for manifest m as dockerReference.\nfunc (s *SigstoreSigner) SignImageManifest(ctx context.Context, m []byte, dockerReference reference.Named) (signature.Signature, error) {\n\tif s.PrivateKey == nil {\n\t\treturn nil, errors.New(\"internal error: nothing to sign with, should have been detected in NewSigner\")\n\t}\n\n\tif reference.IsNameOnly(dockerReference) {\n\t\treturn nil, fmt.Errorf(\"reference %s can’t be signed, it has neither a tag nor a digest\", dockerReference.String())\n\t}\n\tmanifestDigest, err := manifest.Digest(m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// sigstore/cosign completely ignores dockerReference for actual policy decisions.\n\t// They record the repo (but NOT THE TAG) in the value; without the tag we can’t detect version rollbacks.\n\t// So, just do what simple signing does, and cosign won’t mind.\n\tpayloadData := internal.NewUntrustedSigstorePayload(manifestDigest, dockerReference.String())\n\tpayloadBytes, err := json.Marshal(payloadData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// github.com/sigstore/cosign/internal/pkg/cosign.payloadSigner uses signatureoptions.WithContext(),\n\t// which seems to be not used by anything. So we don’t bother.\n\tsignatureBytes, err := s.PrivateKey.SignMessage(bytes.NewReader(payloadBytes))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating signature: %w\", err)\n\t}\n\tbase64Signature := base64.StdEncoding.EncodeToString(signatureBytes)\n\tvar rekorSETBytes []byte // = nil\n\tif s.RekorUploader != nil {\n\t\tset, err := s.RekorUploader(ctx, s.SigningKeyOrCert, signatureBytes, payloadBytes)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trekorSETBytes = set\n\t}\n\n\tannotations := map[string]string{\n\t\tsignature.SigstoreSignatureAnnotationKey: base64Signature,\n\t}\n\tif s.FulcioGeneratedCertificate != nil {\n\t\tannotations[signature.SigstoreCertificateAnnotationKey] = string(s.FulcioGeneratedCertificate)\n\t}\n\tif s.FulcioGeneratedCertificateChain != nil {\n\t\tannotations[signature.SigstoreIntermediateCertificateChainAnnotationKey] = string(s.FulcioGeneratedCertificateChain)\n\t}\n\tif rekorSETBytes != nil {\n\t\tannotations[signature.SigstoreSETAnnotationKey] = string(rekorSETBytes)\n\t}\n\treturn signature.SigstoreFromComponents(signature.SigstoreSignatureMIMEType, payloadBytes, annotations), nil\n}\n\nfunc (s *SigstoreSigner) Close() error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/rekor/leveled_logger.go",
    "content": "package rekor\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/hashicorp/go-retryablehttp\"\n\t\"github.com/sirupsen/logrus\"\n)\n\n// leveledLogger adapts our use of logrus to the expected go-retryablehttp.LeveledLogger interface.\ntype leveledLogger struct {\n\tlogger *logrus.Logger\n}\n\nfunc leveledLoggerForLogrus(logger *logrus.Logger) retryablehttp.LeveledLogger {\n\treturn &leveledLogger{logger: logger}\n}\n\n// log is the actual conversion implementation\nfunc (l *leveledLogger) log(level logrus.Level, msg string, keysAndValues []any) {\n\tfields := logrus.Fields{}\n\tfor i := 0; i < len(keysAndValues)-1; i += 2 {\n\t\tkey := keysAndValues[i]\n\t\tkeyString, isString := key.(string)\n\t\tif !isString {\n\t\t\t// It seems attractive to panic() here, but we might already be in a failure state, so let’s not make it worse\n\t\t\tkeyString = fmt.Sprintf(\"[Invalid LeveledLogger key %#v]\", key)\n\t\t}\n\t\tfields[keyString] = keysAndValues[i+1]\n\t}\n\tl.logger.WithFields(fields).Log(level, msg)\n}\n\n// Debug implements retryablehttp.LeveledLogger\nfunc (l *leveledLogger) Debug(msg string, keysAndValues ...any) {\n\tl.log(logrus.DebugLevel, msg, keysAndValues)\n}\n\n// Error implements retryablehttp.LeveledLogger\nfunc (l *leveledLogger) Error(msg string, keysAndValues ...any) {\n\tl.log(logrus.ErrorLevel, msg, keysAndValues)\n}\n\n// Info implements retryablehttp.LeveledLogger\nfunc (l *leveledLogger) Info(msg string, keysAndValues ...any) {\n\tl.log(logrus.InfoLevel, msg, keysAndValues)\n}\n\n// Warn implements retryablehttp.LeveledLogger\nfunc (l *leveledLogger) Warn(msg string, keysAndValues ...any) {\n\tl.log(logrus.WarnLevel, msg, keysAndValues)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/rekor/openapi_infra.go",
    "content": "package rekor\n\n// The following code is the essence of the relevant code paths from github.com/go-openapi/runtime,\n// heavily modified since.\n\n// Copyright 2015 go-swagger maintainers\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS 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 (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"path\"\n)\n\n// makeRequest makes a http request to the requested requestPath, and returns the received response.\nfunc (r *rekorClient) makeRequest(ctx context.Context, method, requestPath string, bodyContent any) (*http.Response, error) {\n\tvar body io.Reader\n\theaders := http.Header{}\n\n\theaders.Set(\"Accept\", \"application/json\")\n\tif bodyContent != nil {\n\t\tbuf := bytes.NewBuffer(nil)\n\t\tbody = buf\n\t\theaders.Set(\"Content-Type\", \"application/json\")\n\t\tenc := json.NewEncoder(buf)\n\t\tenc.SetEscapeHTML(false)\n\t\tif err := enc.Encode(bodyContent); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treq, err := http.NewRequestWithContext(ctx, method, path.Join(r.basePath, requestPath), body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Only Scheme and Host are used from rekorURL.\n\t// Really this should probabbly use r.rekorURL.JoinPath(requestPath) (which, notably, correctly deals with path escaping),\n\t// and pass that to NewRequestWithContext, but this use of path.Join is consistent with go-openapi/runtime v0.24.1 .\n\treq.URL.Scheme = r.rekorURL.Scheme\n\treq.URL.Host = r.rekorURL.Host\n\treq.Header = headers\n\n\tres, err := r.httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Note that we don’t care to even read the Content-Type: header; we blindly assume the format is the requested JSON.\n\treturn res, nil\n}\n\n// decodeHTTPResponseBodyAsJSON decodes the body of a HTTP response in a manner compatible with github.com/go-openapi/runtime.\nfunc decodeHTTPResponseBodyAsJSON(res *http.Response, data any) error {\n\tdec := json.NewDecoder(res.Body)\n\tdec.UseNumber()\n\terr := dec.Decode(data)\n\tif err == io.EOF {\n\t\t// This seems unwanted at a first glance; go-swagger added it in https://github.com/go-swagger/go-swagger/issues/192 , it’s unclear\n\t\t// whether it’s correct or still necessary.\n\t\terr = nil\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/rekor/rekor.go",
    "content": "package rekor\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"crypto/tls\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/hashicorp/go-cleanhttp\"\n\t\"github.com/hashicorp/go-retryablehttp\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/signature/internal\"\n\tsignerInternal \"go.podman.io/image/v5/signature/sigstore/internal\"\n)\n\nconst (\n\t// defaultRetryCount is the default number of retries\n\tdefaultRetryCount = 3\n)\n\n// WithRekor asks the generated signature to be uploaded to the specified Rekor server,\n// and to include a log inclusion proof in the signature.\nfunc WithRekor(rekorURL *url.URL) signerInternal.Option {\n\treturn func(s *signerInternal.SigstoreSigner) error {\n\t\tlogrus.Debugf(\"Using Rekor server at %s\", rekorURL.Redacted())\n\t\tbaseTLSConfig := (*tls.Config)(nil) // FIXME: decide on an API — should it be shared with Fulcio?\n\t\tclient := newRekorClient(rekorURL, baseTLSConfig)\n\t\ts.RekorUploader = client.uploadKeyOrCert\n\t\treturn nil\n\t}\n}\n\n// rekorClient allows uploading entries to Rekor.\ntype rekorClient struct {\n\trekorURL   *url.URL // Only Scheme and Host is actually used, consistent with github.com/sigstore/rekor/pkg/client.\n\tbasePath   string\n\thttpClient *http.Client\n}\n\n// newRekorClient creates a rekorClient for rekorURL.\n// If baseTLSConfig is not nil, it may contain TLS _algorithm_ options (e.g. TLS version, cipher suites, “curves”, etc.).\nfunc newRekorClient(rekorURL *url.URL, baseTLSConfig *tls.Config) *rekorClient {\n\tretryableClient := retryablehttp.NewClient()\n\ttransport := cleanhttp.DefaultTransport()\n\tif baseTLSConfig != nil {\n\t\ttransport.TLSClientConfig = baseTLSConfig.Clone()\n\t}\n\tretryableClient.HTTPClient = &http.Client{Transport: transport}\n\tretryableClient.RetryMax = defaultRetryCount\n\tretryableClient.Logger = leveledLoggerForLogrus(logrus.StandardLogger())\n\tbasePath := rekorURL.Path\n\tif !strings.HasPrefix(basePath, \"/\") { // Includes basePath == \"\", i.e. URL just a https://hostname\n\t\tbasePath = \"/\" + basePath\n\t}\n\treturn &rekorClient{\n\t\trekorURL:   rekorURL,\n\t\tbasePath:   basePath,\n\t\thttpClient: retryableClient.StandardClient(),\n\t}\n}\n\n// rekorEntryToSET converts a Rekor log entry into a sigstore “signed entry timestamp”.\nfunc rekorEntryToSET(entry *rekorLogEntryAnon) (internal.UntrustedRekorSET, error) {\n\t// We could plausibly call entry.Validate() here; that mostly just uses unnecessary reflection instead of direct == nil checks.\n\t// Right now the only extra validation .Validate() does is *entry.LogIndex >= 0 and a regex check on *entry.LogID;\n\t// we don’t particularly care about either of these (notably signature verification only uses the Body value).\n\tif entry.Verification == nil || entry.IntegratedTime == nil || entry.LogIndex == nil || entry.LogID == nil {\n\t\treturn internal.UntrustedRekorSET{}, fmt.Errorf(\"invalid Rekor entry (missing data): %#v\", *entry)\n\t}\n\tbodyBase64, ok := entry.Body.(string)\n\tif !ok {\n\t\treturn internal.UntrustedRekorSET{}, fmt.Errorf(\"unexpected Rekor entry body type: %#v\", entry.Body)\n\t}\n\tbody, err := base64.StdEncoding.DecodeString(bodyBase64)\n\tif err != nil {\n\t\treturn internal.UntrustedRekorSET{}, fmt.Errorf(\"error parsing Rekor entry body: %w\", err)\n\t}\n\tpayloadJSON, err := internal.UntrustedRekorPayload{\n\t\tBody:           body,\n\t\tIntegratedTime: *entry.IntegratedTime,\n\t\tLogIndex:       *entry.LogIndex,\n\t\tLogID:          *entry.LogID,\n\t}.MarshalJSON()\n\tif err != nil {\n\t\treturn internal.UntrustedRekorSET{}, err\n\t}\n\n\treturn internal.UntrustedRekorSET{\n\t\tUntrustedSignedEntryTimestamp: entry.Verification.SignedEntryTimestamp,\n\t\tUntrustedPayload:              payloadJSON,\n\t}, nil\n}\n\n// uploadEntry ensures proposedEntry exists in Rekor (usually uploading it), and returns the resulting log entry.\nfunc (r *rekorClient) uploadEntry(ctx context.Context, proposedEntry rekorProposedEntry) (rekorLogEntry, error) {\n\tlogrus.Debugf(\"Calling Rekor's CreateLogEntry\")\n\tresp, err := r.createLogEntry(ctx, proposedEntry)\n\tif err != nil {\n\t\t// In ordinary operation, we should not get duplicate entries, because our payload contains a timestamp,\n\t\t// so it is supposed to be unique; and the default key format, ECDSA p256, also contains a nonce.\n\t\t// But conflicts can fairly easily happen during debugging and experimentation, so it pays to handle this.\n\t\tvar conflictErr *createLogEntryConflictError\n\t\tif errors.As(err, &conflictErr) && conflictErr.location != \"\" {\n\t\t\tlocation := conflictErr.location\n\t\t\tlogrus.Debugf(\"CreateLogEntry reported a conflict, location = %s\", location)\n\t\t\t// We might be able to just GET the returned Location, but let’s use the formal API method.\n\t\t\t// OTOH that requires us to hard-code the URI structure…\n\t\t\tuuidDelimiter := strings.LastIndexByte(location, '/')\n\t\t\tif uuidDelimiter != -1 { // Otherwise the URI is unexpected, and fall through to the bottom\n\t\t\t\tuuid := location[uuidDelimiter+1:]\n\t\t\t\tlogrus.Debugf(\"Calling Rekor's NewGetLogEntryByUUIDParamsWithContext\")\n\t\t\t\tresp2, err := r.getLogEntryByUUID(ctx, uuid)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"Error re-loading previously-created log entry with UUID %s: %w\", uuid, err)\n\t\t\t\t}\n\t\t\t\treturn resp2, nil\n\t\t\t}\n\t\t}\n\t\treturn nil, fmt.Errorf(\"Error uploading a log entry: %w\", err)\n\t}\n\treturn resp, nil\n}\n\n// stringPointer is a helper to create *string fields in JSON data.\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n\n// uploadKeyOrCert integrates this code into sigstore/internal.Signer.\n// Given components of the created signature, it returns a SET that should be added to the signature.\nfunc (r *rekorClient) uploadKeyOrCert(ctx context.Context, keyOrCertBytes []byte, signatureBytes []byte, payloadBytes []byte) ([]byte, error) {\n\tpayloadHash := sha256.Sum256(payloadBytes) // Consistent with cosign.\n\thashedRekordSpec, err := json.Marshal(internal.RekorHashedrekordV001Schema{\n\t\tData: &internal.RekorHashedrekordV001SchemaData{\n\t\t\tHash: &internal.RekorHashedrekordV001SchemaDataHash{\n\t\t\t\tAlgorithm: stringPointer(internal.RekorHashedrekordV001SchemaDataHashAlgorithmSha256),\n\t\t\t\tValue:     stringPointer(hex.EncodeToString(payloadHash[:])),\n\t\t\t},\n\t\t},\n\t\tSignature: &internal.RekorHashedrekordV001SchemaSignature{\n\t\t\tContent: signatureBytes,\n\t\t\tPublicKey: &internal.RekorHashedrekordV001SchemaSignaturePublicKey{\n\t\t\t\tContent: keyOrCertBytes,\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tproposedEntry := internal.RekorHashedrekord{\n\t\tAPIVersion: stringPointer(internal.RekorHashedRekordV001APIVersion),\n\t\tSpec:       hashedRekordSpec,\n\t}\n\n\tuploadedPayload, err := r.uploadEntry(ctx, &proposedEntry)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(uploadedPayload) != 1 {\n\t\treturn nil, fmt.Errorf(\"expected 1 Rekor entry, got %d\", len(uploadedPayload))\n\t}\n\tvar storedEntry *rekorLogEntryAnon\n\t// This “loop” extracts the single value from the uploadedPayload map.\n\tfor _, p := range uploadedPayload {\n\t\tstoredEntry = &p\n\t\tbreak\n\t}\n\n\trekorBundle, err := rekorEntryToSET(storedEntry)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trekorSETBytes, err := json.Marshal(rekorBundle)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn rekorSETBytes, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/rekor/rekor_api.go",
    "content": "package rekor\n\n// The following code is the essence of the relevant code paths from github.com/sigstore/rekor/pkg/generated/client/...,\n// heavily modified since.\n\n// Copyright 2021 The Sigstore Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n)\n\n// createLogEntryConflictError describes a response with status code 409:\n// The request conflicts with the current state of the transparency log.\n// This typically happens when trying to upload an existing entry again.\ntype createLogEntryConflictError struct {\n\tlocation string\n\terr      string\n}\n\nfunc (o *createLogEntryConflictError) Error() string {\n\treturn o.err\n}\n\n// createLogEntry creates an entry in the transparency log\n//\n// Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified.\nfunc (r *rekorClient) createLogEntry(ctx context.Context, proposedEntry rekorProposedEntry) (rekorLogEntry, error) {\n\tres, err := r.makeRequest(ctx, http.MethodPost, \"/api/v1/log/entries\", proposedEntry)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Body.Close()\n\n\tswitch res.StatusCode {\n\tcase http.StatusCreated:\n\t\tresult := rekorLogEntry{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn result, nil\n\n\tcase http.StatusBadRequest:\n\t\tresult := rekorError{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, fmt.Errorf(\"Rekor /api/v1/log/entries failed: bad request (%d), %+v\", res.StatusCode, result)\n\n\tcase http.StatusConflict:\n\t\tresult := rekorError{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, &createLogEntryConflictError{\n\t\t\tlocation: res.Header.Get(\"Location\"),\n\t\t\terr:      fmt.Sprintf(\"Rekor /api/v1/log/entries failed with a conflict (%d), %+v\", res.StatusCode, result),\n\t\t}\n\n\tdefault:\n\t\tresult := rekorError{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, fmt.Errorf(\"Rekor /api/v1/log/entries failed with unexpected status %d: %+v\", res.StatusCode, result)\n\t}\n}\n\n// getLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log\n//\n// Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log\nfunc (r *rekorClient) getLogEntryByUUID(ctx context.Context, entryUUID string) (rekorLogEntry, error) {\n\tres, err := r.makeRequest(ctx, http.MethodGet, \"/api/v1/log/entries/\"+url.PathEscape(entryUUID), nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Body.Close()\n\n\tswitch res.StatusCode {\n\tcase http.StatusOK:\n\t\tresult := rekorLogEntry{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn result, nil\n\n\tcase http.StatusNotFound: // We don’t care to define a separate error type; we don’t need it ourselves.\n\t\treturn nil, fmt.Errorf(\"Rekor /api/v1/log/entries/{entryUUID}: entry not found (%d)\", res.StatusCode)\n\n\tdefault:\n\t\tresult := rekorError{}\n\t\tif err := decodeHTTPResponseBodyAsJSON(res, &result); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, fmt.Errorf(\"Rekor /api/v1/log/entries/{entryUUID} failed with unexpected status %d: %+v\", res.StatusCode, result)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/rekor/rekor_api_types.go",
    "content": "package rekor\n\ntype rekorError struct {\n\tCode    int64  `json:\"code,omitempty\"`\n\tMessage string `json:\"message,omitempty\"`\n}\n\ntype rekorProposedEntry interface {\n\t// Actually the code, currently, accepts anything that can be marshaled into JSON; use at least the Kind marker from\n\t// shared between RekorHashedrekord / and other accepted formats for minimal sanity checking (but without hard-coding\n\t// RekorHashedRekord in particular).\n\n\tKind() string\n\tSetKind(string)\n}\n\ntype rekorLogEntryAnon struct {\n\tAttestation    *rekorLogEntryAnonAttestation  `json:\"attestation,omitempty\"`\n\tBody           any                            `json:\"body\"`\n\tIntegratedTime *int64                         `json:\"integratedTime\"`\n\tLogID          *string                        `json:\"logID\"`\n\tLogIndex       *int64                         `json:\"logIndex\"`\n\tVerification   *rekorLogEntryAnonVerification `json:\"verification,omitempty\"`\n}\n\ntype rekorLogEntryAnonAttestation struct {\n\tData []byte `json:\"data,omitempty\"`\n}\n\ntype rekorLogEntryAnonVerification struct {\n\tInclusionProof       *rekorInclusionProof `json:\"inclusionProof,omitempty\"`\n\tSignedEntryTimestamp []byte               `json:\"signedEntryTimestamp,omitempty\"`\n}\n\ntype rekorLogEntry map[string]rekorLogEntryAnon\n\ntype rekorInclusionProof struct {\n\tCheckpoint *string  `json:\"checkpoint\"`\n\tHashes     []string `json:\"hashes\"`\n\tLogIndex   *int64   `json:\"logIndex\"`\n\tRootHash   *string  `json:\"rootHash\"`\n\tTreeSize   *int64   `json:\"treeSize\"`\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/sigstore/signer.go",
    "content": "package sigstore\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/sigstore/sigstore/pkg/cryptoutils\"\n\tinternalSigner \"go.podman.io/image/v5/internal/signer\"\n\t\"go.podman.io/image/v5/signature/signer\"\n\t\"go.podman.io/image/v5/signature/sigstore/internal\"\n)\n\ntype Option = internal.Option\n\nfunc WithPrivateKeyFile(file string, passphrase []byte) Option {\n\treturn func(s *internal.SigstoreSigner) error {\n\t\tif s.PrivateKey != nil {\n\t\t\treturn fmt.Errorf(\"multiple private key sources specified when preparing to create sigstore signatures\")\n\t\t}\n\n\t\tif passphrase == nil {\n\t\t\treturn errors.New(\"private key passphrase not provided\")\n\t\t}\n\n\t\tprivateKeyPEM, err := os.ReadFile(file)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"reading private key from %s: %w\", file, err)\n\t\t}\n\t\tsignerVerifier, err := loadPrivateKey(privateKeyPEM, passphrase)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"initializing private key: %w\", err)\n\t\t}\n\t\tpublicKey, err := signerVerifier.PublicKey()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"getting public key from private key: %w\", err)\n\t\t}\n\t\tpublicKeyPEM, err := cryptoutils.MarshalPublicKeyToPEM(publicKey)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"converting public key to PEM: %w\", err)\n\t\t}\n\t\ts.PrivateKey = signerVerifier\n\t\ts.SigningKeyOrCert = publicKeyPEM\n\t\treturn nil\n\t}\n}\n\nfunc NewSigner(opts ...Option) (*signer.Signer, error) {\n\ts := internal.SigstoreSigner{}\n\tfor _, o := range opts {\n\t\tif err := o(&s); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif s.PrivateKey == nil {\n\t\treturn nil, errors.New(\"no private key source provided (neither a private key nor Fulcio) when preparing to create sigstore signatures\")\n\t}\n\n\treturn internalSigner.NewSigner(&s), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simple.go",
    "content": "// Note: Consider the API unstable until the code supports at least three different image formats or transports.\n\n// NOTE: Keep this in sync with docs/atomic-signature.md and docs/atomic-signature-embedded.json!\n\npackage signature\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/signature/internal\"\n\t\"go.podman.io/image/v5/version\"\n)\n\nconst (\n\tsignatureType = \"atomic container signature\"\n)\n\n// InvalidSignatureError is returned when parsing an invalid signature.\ntype InvalidSignatureError = internal.InvalidSignatureError\n\n// Signature is a parsed content of a signature.\n// The only way to get this structure from a blob should be as a return value from a successful call to verifyAndExtractSignature below.\ntype Signature struct {\n\tDockerManifestDigest digest.Digest\n\tDockerReference      string // FIXME: more precise type?\n}\n\n// untrustedSignature is a parsed content of a signature.\ntype untrustedSignature struct {\n\tuntrustedDockerManifestDigest digest.Digest\n\tuntrustedDockerReference      string // FIXME: more precise type?\n\tuntrustedCreatorID            *string\n\t// This is intentionally an int64; the native JSON float64 type would allow to represent _some_ sub-second precision,\n\t// but not nearly enough (with current timestamp values, a single unit in the last place is on the order of hundreds of nanoseconds).\n\t// So, this is explicitly an int64, and we reject fractional values. If we did need more precise timestamps eventually,\n\t// we would add another field, UntrustedTimestampNS int64.\n\tuntrustedTimestamp *int64\n}\n\n// UntrustedSignatureInformation is information available in an untrusted signature.\n// This may be useful when debugging signature verification failures,\n// or when managing a set of signatures on a single image.\n//\n// WARNING: Do not use the contents of this for ANY security decisions,\n// and be VERY CAREFUL about showing this information to humans in any way which suggest that these values “are probably” reliable.\n// There is NO REASON to expect the values to be correct, or not intentionally misleading\n// (including things like “✅ Verified by $authority”)\ntype UntrustedSignatureInformation struct {\n\tUntrustedDockerManifestDigest digest.Digest\n\tUntrustedDockerReference      string // FIXME: more precise type?\n\tUntrustedCreatorID            *string\n\tUntrustedTimestamp            *time.Time\n\tUntrustedShortKeyIdentifier   string\n}\n\n// newUntrustedSignature returns an untrustedSignature object with\n// the specified primary contents and appropriate metadata.\nfunc newUntrustedSignature(dockerManifestDigest digest.Digest, dockerReference string) untrustedSignature {\n\t// Use intermediate variables for these values so that we can take their addresses.\n\t// Golang guarantees that they will have a new address on every execution.\n\tcreatorID := \"atomic \" + version.Version\n\ttimestamp := time.Now().Unix()\n\treturn untrustedSignature{\n\t\tuntrustedDockerManifestDigest: dockerManifestDigest,\n\t\tuntrustedDockerReference:      dockerReference,\n\t\tuntrustedCreatorID:            &creatorID,\n\t\tuntrustedTimestamp:            &timestamp,\n\t}\n}\n\n// A compile-time check that untrustedSignature  and *untrustedSignature implements json.Marshaler\nvar (\n\t_ json.Marshaler = untrustedSignature{}\n\t_ json.Marshaler = (*untrustedSignature)(nil)\n)\n\n// MarshalJSON implements the json.Marshaler interface.\nfunc (s untrustedSignature) MarshalJSON() ([]byte, error) {\n\tif s.untrustedDockerManifestDigest == \"\" || s.untrustedDockerReference == \"\" {\n\t\treturn nil, errors.New(\"Unexpected empty signature content\")\n\t}\n\tcritical := map[string]any{\n\t\t\"type\":     signatureType,\n\t\t\"image\":    map[string]string{\"docker-manifest-digest\": s.untrustedDockerManifestDigest.String()},\n\t\t\"identity\": map[string]string{\"docker-reference\": s.untrustedDockerReference},\n\t}\n\toptional := map[string]any{}\n\tif s.untrustedCreatorID != nil {\n\t\toptional[\"creator\"] = *s.untrustedCreatorID\n\t}\n\tif s.untrustedTimestamp != nil {\n\t\toptional[\"timestamp\"] = *s.untrustedTimestamp\n\t}\n\tsignature := map[string]any{\n\t\t\"critical\": critical,\n\t\t\"optional\": optional,\n\t}\n\treturn json.Marshal(signature)\n}\n\n// Compile-time check that untrustedSignature implements json.Unmarshaler\nvar _ json.Unmarshaler = (*untrustedSignature)(nil)\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (s *untrustedSignature) UnmarshalJSON(data []byte) error {\n\treturn internal.JSONFormatToInvalidSignatureError(s.strictUnmarshalJSON(data))\n}\n\n// strictUnmarshalJSON is UnmarshalJSON, except that it may return the internal.JSONFormatError error type.\n// Splitting it into a separate function allows us to do the internal.JSONFormatError → InvalidSignatureError in a single place, the caller.\nfunc (s *untrustedSignature) strictUnmarshalJSON(data []byte) error {\n\tvar critical, optional json.RawMessage\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(data, map[string]any{\n\t\t\"critical\": &critical,\n\t\t\"optional\": &optional,\n\t}); err != nil {\n\t\treturn err\n\t}\n\n\tvar creatorID string\n\tvar timestamp float64\n\tgotCreatorID, gotTimestamp := false, false\n\tif err := internal.ParanoidUnmarshalJSONObject(optional, func(key string) any {\n\t\tswitch key {\n\t\tcase \"creator\":\n\t\t\tgotCreatorID = true\n\t\t\treturn &creatorID\n\t\tcase \"timestamp\":\n\t\t\tgotTimestamp = true\n\t\t\treturn &timestamp\n\t\tdefault:\n\t\t\tvar ignore any\n\t\t\treturn &ignore\n\t\t}\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif gotCreatorID {\n\t\ts.untrustedCreatorID = &creatorID\n\t}\n\tif gotTimestamp {\n\t\tintTimestamp := int64(timestamp)\n\t\tif float64(intTimestamp) != timestamp {\n\t\t\treturn internal.NewInvalidSignatureError(\"Field optional.timestamp is not an integer\")\n\t\t}\n\t\ts.untrustedTimestamp = &intTimestamp\n\t}\n\n\tvar t string\n\tvar image, identity json.RawMessage\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(critical, map[string]any{\n\t\t\"type\":     &t,\n\t\t\"image\":    &image,\n\t\t\"identity\": &identity,\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif t != signatureType {\n\t\treturn internal.NewInvalidSignatureError(fmt.Sprintf(\"Unrecognized signature type %s\", t))\n\t}\n\n\tvar digestString string\n\tif err := internal.ParanoidUnmarshalJSONObjectExactFields(image, map[string]any{\n\t\t\"docker-manifest-digest\": &digestString,\n\t}); err != nil {\n\t\treturn err\n\t}\n\tdigestValue, err := digest.Parse(digestString)\n\tif err != nil {\n\t\treturn internal.NewInvalidSignatureError(fmt.Sprintf(`invalid docker-manifest-digest value %q: %v`, digestString, err))\n\t}\n\ts.untrustedDockerManifestDigest = digestValue\n\n\treturn internal.ParanoidUnmarshalJSONObjectExactFields(identity, map[string]any{\n\t\t\"docker-reference\": &s.untrustedDockerReference,\n\t})\n}\n\n// Sign formats the signature and returns a blob signed using mech and keyIdentity\n// (If it seems surprising that this is a method on untrustedSignature, note that there\n// isn’t a good reason to think that a key used by the user is trusted by any component\n// of the system just because it is a private key — actually the presence of a private key\n// on the system increases the likelihood of an a successful attack on that private key\n// on that particular system.)\nfunc (s untrustedSignature) sign(mech SigningMechanism, keyIdentity string, passphrase string) ([]byte, error) {\n\tjson, err := json.Marshal(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif newMech, ok := mech.(signingMechanismWithPassphrase); ok {\n\t\treturn newMech.SignWithPassphrase(json, keyIdentity, passphrase)\n\t}\n\n\tif passphrase != \"\" {\n\t\treturn nil, errors.New(\"signing mechanism does not support passphrases\")\n\t}\n\n\treturn mech.Sign(json, keyIdentity)\n}\n\n// signatureAcceptanceRules specifies how to decide whether an untrusted signature is acceptable.\n// We centralize the actual parsing and data extraction in verifyAndExtractSignature; this supplies\n// the policy.  We use an object instead of supplying func parameters to verifyAndExtractSignature\n// because the functions have the same or similar types, so there is a risk of exchanging the functions;\n// named members of this struct are more explicit.\ntype signatureAcceptanceRules struct {\n\tacceptedKeyIdentities              []string\n\tvalidateSignedDockerReference      func(string) error\n\tvalidateSignedDockerManifestDigest func(digest.Digest) error\n}\n\n// verifyAndExtractSignature verifies that unverifiedSignature has been signed, and that its principal components\n// match expected values, both as specified by rules.\n// Returns the signature, and an identity of the key that signed it.\nfunc verifyAndExtractSignature(mech SigningMechanism, unverifiedSignature []byte, rules signatureAcceptanceRules) (*Signature, string, error) {\n\tsigned, keyIdentity, err := mech.Verify(unverifiedSignature)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif !slices.Contains(rules.acceptedKeyIdentities, keyIdentity) {\n\t\twithLookup, ok := mech.(signingMechanismWithVerificationIdentityLookup)\n\t\tif !ok {\n\t\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"signature by key %s is not accepted\", keyIdentity))\n\t\t}\n\n\t\tprimaryKey, err := withLookup.keyIdentityForVerificationKeyIdentity(keyIdentity)\n\t\tif err != nil {\n\t\t\t// Coverage: This only fails if lookup by keyIdentity fails, but we just found and used that key.\n\t\t\t// Or maybe on some unexpected I/O error.\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tif !slices.Contains(rules.acceptedKeyIdentities, primaryKey) {\n\t\t\treturn nil, \"\", internal.NewInvalidSignatureError(fmt.Sprintf(\"signature by key %s of %s is not accepted\", keyIdentity, primaryKey))\n\t\t}\n\t\tkeyIdentity = primaryKey\n\t}\n\n\tvar unmatchedSignature untrustedSignature\n\tif err := json.Unmarshal(signed, &unmatchedSignature); err != nil {\n\t\treturn nil, \"\", internal.NewInvalidSignatureError(err.Error())\n\t}\n\tif err := rules.validateSignedDockerManifestDigest(unmatchedSignature.untrustedDockerManifestDigest); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\tif err := rules.validateSignedDockerReference(unmatchedSignature.untrustedDockerReference); err != nil {\n\t\treturn nil, \"\", err\n\t}\n\t// signatureAcceptanceRules have accepted this value.\n\treturn &Signature{\n\t\tDockerManifestDigest: unmatchedSignature.untrustedDockerManifestDigest,\n\t\tDockerReference:      unmatchedSignature.untrustedDockerReference,\n\t}, keyIdentity, nil\n}\n\n// GetUntrustedSignatureInformationWithoutVerifying extracts information available in an untrusted signature,\n// WITHOUT doing any cryptographic verification.\n// This may be useful when debugging signature verification failures,\n// or when managing a set of signatures on a single image.\n//\n// WARNING: Do not use the contents of this for ANY security decisions,\n// and be VERY CAREFUL about showing this information to humans in any way which suggest that these values “are probably” reliable.\n// There is NO REASON to expect the values to be correct, or not intentionally misleading\n// (including things like “✅ Verified by $authority”)\nfunc GetUntrustedSignatureInformationWithoutVerifying(untrustedSignatureBytes []byte) (*UntrustedSignatureInformation, error) {\n\t// NOTE: This should eventually do format autodetection.\n\tmech, _, err := NewEphemeralGPGSigningMechanism([]byte{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer mech.Close()\n\n\tuntrustedContents, shortKeyIdentifier, err := mech.UntrustedSignatureContents(untrustedSignatureBytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar untrustedDecodedContents untrustedSignature\n\tif err := json.Unmarshal(untrustedContents, &untrustedDecodedContents); err != nil {\n\t\treturn nil, internal.NewInvalidSignatureError(err.Error())\n\t}\n\n\tvar timestamp *time.Time // = nil\n\tif untrustedDecodedContents.untrustedTimestamp != nil {\n\t\tts := time.Unix(*untrustedDecodedContents.untrustedTimestamp, 0)\n\t\ttimestamp = &ts\n\t}\n\treturn &UntrustedSignatureInformation{\n\t\tUntrustedDockerManifestDigest: untrustedDecodedContents.untrustedDockerManifestDigest,\n\t\tUntrustedDockerReference:      untrustedDecodedContents.untrustedDockerReference,\n\t\tUntrustedCreatorID:            untrustedDecodedContents.untrustedCreatorID,\n\t\tUntrustedTimestamp:            timestamp,\n\t\tUntrustedShortKeyIdentifier:   shortKeyIdentifier,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simplesequoia/mechanism.go",
    "content": "//go:build containers_image_sequoia\n\npackage simplesequoia\n\n// This implements a signature.signingMechanismWithPassphrase that only supports signing.\n//\n// FIXME: Consider restructuring the simple signing signature creation code path\n// not to require this indirection and all those unimplemented methods.\n\nimport (\n\t\"go.podman.io/image/v5/signature/internal/sequoia\"\n)\n\n// A GPG/OpenPGP signing mechanism, implemented using Sequoia.\ntype sequoiaSigningOnlyMechanism struct {\n\tinner *sequoia.SigningMechanism\n}\n\nfunc (m *sequoiaSigningOnlyMechanism) Close() error {\n\tpanic(\"Should never be called\")\n}\n\n// SupportsSigning returns nil if the mechanism supports signing, or a SigningNotSupportedError.\nfunc (m *sequoiaSigningOnlyMechanism) SupportsSigning() error {\n\tpanic(\"Should never be called\")\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity and passphrase.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *sequoiaSigningOnlyMechanism) SignWithPassphrase(input []byte, keyIdentity string, passphrase string) ([]byte, error) {\n\treturn m.inner.SignWithPassphrase(input, keyIdentity, passphrase)\n}\n\n// Sign creates a (non-detached) signature of input using keyIdentity.\n// Fails with a SigningNotSupportedError if the mechanism does not support signing.\nfunc (m *sequoiaSigningOnlyMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {\n\tpanic(\"Should never be called\")\n}\n\n// Verify parses unverifiedSignature and returns the content and the signer's identity\nfunc (m *sequoiaSigningOnlyMechanism) Verify(unverifiedSignature []byte) (contents []byte, keyIdentity string, err error) {\n\tpanic(\"Should never be called\")\n}\n\n// UntrustedSignatureContents returns UNTRUSTED contents of the signature WITHOUT ANY VERIFICATION,\n// along with a short identifier of the key used for signing.\n// WARNING: The short key identifier (which corresponds to \"Key ID\" for OpenPGP keys)\n// is NOT the same as a \"key identity\" used in other calls to this interface, and\n// the values may have no recognizable relationship if the public key is not available.\nfunc (m *sequoiaSigningOnlyMechanism) UntrustedSignatureContents(untrustedSignature []byte) (untrustedContents []byte, shortKeyIdentifier string, err error) {\n\tpanic(\"Should never be called\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simplesequoia/options.go",
    "content": "package simplesequoia\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\ntype Option func(*simpleSequoiaSigner) error\n\n// WithSequoiaHome returns an Option for NewSigner, specifying a Sequoia home directory to use.\nfunc WithSequoiaHome(sequoiaHome string) Option {\n\treturn func(s *simpleSequoiaSigner) error {\n\t\ts.sequoiaHome = sequoiaHome\n\t\treturn nil\n\t}\n}\n\n// WithKeyFingerprint returns an Option for NewSigner, specifying a key to sign with, using the provided Sequoia-PGP key fingerprint.\nfunc WithKeyFingerprint(keyFingerprint string) Option {\n\treturn func(s *simpleSequoiaSigner) error {\n\t\ts.keyFingerprint = keyFingerprint\n\t\treturn nil\n\t}\n}\n\n// WithPassphrase returns an Option for NewSigner, specifying a passphrase for the private key.\nfunc WithPassphrase(passphrase string) Option {\n\treturn func(s *simpleSequoiaSigner) error {\n\t\t// The gpgme implementation can’t use passphrase with \\n; reject it here for consistent behavior.\n\t\t// FIXME: We don’t need it in this API at all, but the \"\\n\" check exists in the current call stack. That should go away.\n\t\tif strings.Contains(passphrase, \"\\n\") {\n\t\t\treturn errors.New(\"invalid passphrase: must not contain a line break\")\n\t\t}\n\t\ts.passphrase = passphrase\n\t\treturn nil\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simplesequoia/signer.go",
    "content": "//go:build containers_image_sequoia\n\npackage simplesequoia\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\tinternalSig \"go.podman.io/image/v5/internal/signature\"\n\tinternalSigner \"go.podman.io/image/v5/internal/signer\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/signature/internal/sequoia\"\n\t\"go.podman.io/image/v5/signature/signer\"\n)\n\n// simpleSequoiaSigner is a signer.SignerImplementation implementation for simple signing signatures using Sequoia.\ntype simpleSequoiaSigner struct {\n\tmech           *sequoia.SigningMechanism\n\tsequoiaHome    string // \"\" if using the system’s default\n\tkeyFingerprint string\n\tpassphrase     string // \"\" if not provided.\n}\n\n// NewSigner returns a signature.Signer which creates “simple signing” signatures using the user’s default\n// Sequoia PGP configuration.\n//\n// The set of options must identify a key to sign with, probably using a WithKeyFingerprint.\n//\n// The caller must call Close() on the returned Signer.\nfunc NewSigner(opts ...Option) (*signer.Signer, error) {\n\ts := simpleSequoiaSigner{}\n\tfor _, o := range opts {\n\t\tif err := o(&s); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif s.keyFingerprint == \"\" {\n\t\treturn nil, errors.New(\"no key identity provided for simple signing\")\n\t}\n\n\tif err := sequoia.Init(); err != nil {\n\t\treturn nil, err // Coverage: This is impractical to test in-process, with the static go_sequoia_dlhandle.\n\t}\n\tmech, err := sequoia.NewMechanismFromDirectory(s.sequoiaHome)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing Sequoia: %w\", err)\n\t}\n\ts.mech = mech\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\ts.mech.Close() // Coverage: This is currently unreachable.\n\t\t}\n\t}()\n\n\t// Ideally, we should look up (and unlock?) the key at this point already. FIXME: is that possible? Anyway, low-priority.\n\n\tsucceeded = true\n\treturn internalSigner.NewSigner(&s), nil\n}\n\n// ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature.\nfunc (s *simpleSequoiaSigner) ProgressMessage() string {\n\treturn \"Signing image using Sequoia-PGP simple signing\"\n}\n\n// SignImageManifest creates a new signature for manifest m as dockerReference.\nfunc (s *simpleSequoiaSigner) SignImageManifest(ctx context.Context, m []byte, dockerReference reference.Named) (internalSig.Signature, error) {\n\tif reference.IsNameOnly(dockerReference) {\n\t\treturn nil, fmt.Errorf(\"reference %s can’t be signed, it has neither a tag nor a digest\", dockerReference.String())\n\t}\n\twrapped := sequoiaSigningOnlyMechanism{\n\t\tinner: s.mech,\n\t}\n\tsimpleSig, err := signature.SignDockerManifestWithOptions(m, dockerReference.String(), &wrapped, s.keyFingerprint, &signature.SignOptions{\n\t\tPassphrase: s.passphrase,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn internalSig.SimpleSigningFromBlob(simpleSig), nil\n}\n\nfunc (s *simpleSequoiaSigner) Close() error {\n\treturn s.mech.Close()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simplesequoia/signer_stub.go",
    "content": "//go:build !containers_image_sequoia\n\npackage simplesequoia\n\nimport (\n\t\"errors\"\n\n\t\"go.podman.io/image/v5/signature/signer\"\n)\n\n// simpleSequoiaSigner is a signer.SignerImplementation implementation for simple signing signatures using Sequoia.\ntype simpleSequoiaSigner struct {\n\t// This is not really used, we just keep the struct fields so that the With… Option functions can be compiled.\n\n\tsequoiaHome    string // \"\" if using the system's default\n\tkeyFingerprint string\n\tpassphrase     string // \"\" if not provided.\n}\n\n// NewSigner returns a signature.Signer which creates \"simple signing\" signatures using the user's default\n// Sequoia PGP configuration.\n//\n// The set of options must identify a key to sign with, probably using a WithKeyFingerprint.\n//\n// The caller must call Close() on the returned Signer.\nfunc NewSigner(opts ...Option) (*signer.Signer, error) {\n\treturn nil, errors.New(\"Sequoia-PGP support is not enabled in this build\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/signature/simplesigning/signer.go",
    "content": "package simplesigning\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/docker/reference\"\n\tinternalSig \"go.podman.io/image/v5/internal/signature\"\n\tinternalSigner \"go.podman.io/image/v5/internal/signer\"\n\t\"go.podman.io/image/v5/signature\"\n\t\"go.podman.io/image/v5/signature/signer\"\n)\n\n// simpleSigner is a signer.SignerImplementation implementation for simple signing signatures.\ntype simpleSigner struct {\n\tmech           signature.SigningMechanism\n\tkeyFingerprint string\n\tpassphrase     string // \"\" if not provided.\n}\n\ntype Option func(*simpleSigner) error\n\n// WithKeyFingerprint returns an Option for NewSigner, specifying a key to sign with, using the provided GPG key fingerprint.\nfunc WithKeyFingerprint(keyFingerprint string) Option {\n\treturn func(s *simpleSigner) error {\n\t\ts.keyFingerprint = keyFingerprint\n\t\treturn nil\n\t}\n}\n\n// WithPassphrase returns an Option for NewSigner, specifying a passphrase for the private key.\n// If this is not specified, the system may interactively prompt using a gpg-agent / pinentry.\nfunc WithPassphrase(passphrase string) Option {\n\treturn func(s *simpleSigner) error {\n\t\t// The gpgme implementation can’t use passphrase with \\n; reject it here for consistent behavior.\n\t\tif strings.Contains(passphrase, \"\\n\") {\n\t\t\treturn errors.New(\"invalid passphrase: must not contain a line break\")\n\t\t}\n\t\ts.passphrase = passphrase\n\t\treturn nil\n\t}\n}\n\n// NewSigner returns a signature.Signer which creates “simple signing” signatures using the user’s default\n// GPG configuration ($GNUPGHOME / ~/.gnupg).\n//\n// The set of options must identify a key to sign with, probably using a WithKeyFingerprint.\n//\n// The caller must call Close() on the returned Signer.\nfunc NewSigner(opts ...Option) (*signer.Signer, error) {\n\tmech, err := signature.NewGPGSigningMechanism()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"initializing GPG: %w\", err)\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tmech.Close()\n\t\t}\n\t}()\n\tif err := mech.SupportsSigning(); err != nil {\n\t\treturn nil, fmt.Errorf(\"Signing not supported: %w\", err)\n\t}\n\n\ts := simpleSigner{\n\t\tmech: mech,\n\t}\n\tfor _, o := range opts {\n\t\tif err := o(&s); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif s.keyFingerprint == \"\" {\n\t\treturn nil, errors.New(\"no key identity provided for simple signing\")\n\t}\n\t// Ideally, we should look up (and unlock?) the key at this point already, but our current SigningMechanism API does not allow that.\n\n\tsucceeded = true\n\treturn internalSigner.NewSigner(&s), nil\n}\n\n// ProgressMessage returns a human-readable sentence that makes sense to write before starting to create a single signature.\nfunc (s *simpleSigner) ProgressMessage() string {\n\treturn \"Signing image using simple signing\"\n}\n\n// SignImageManifest creates a new signature for manifest m as dockerReference.\nfunc (s *simpleSigner) SignImageManifest(ctx context.Context, m []byte, dockerReference reference.Named) (internalSig.Signature, error) {\n\tif reference.IsNameOnly(dockerReference) {\n\t\treturn nil, fmt.Errorf(\"reference %s can’t be signed, it has neither a tag nor a digest\", dockerReference.String())\n\t}\n\tsimpleSig, err := signature.SignDockerManifestWithOptions(m, dockerReference.String(), s.mech, s.keyFingerprint, &signature.SignOptions{\n\t\tPassphrase: s.passphrase,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn internalSig.SimpleSigningFromBlob(simpleSig), nil\n}\n\nfunc (s *simpleSigner) Close() error {\n\treturn s.mech.Close()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/storage/storage_dest.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage storage\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/imagedestination/impl\"\n\t\"go.podman.io/image/v5/internal/imagedestination/stubs\"\n\tsrcImpl \"go.podman.io/image/v5/internal/imagesource/impl\"\n\tsrcStubs \"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/private\"\n\t\"go.podman.io/image/v5/internal/putblobdigest\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/pkg/blobinfocache/none\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chunked\"\n\t\"go.podman.io/storage/pkg/chunked/toc\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n)\n\nvar (\n\t// ErrBlobDigestMismatch could potentially be returned when PutBlob() is given a blob\n\t// with a digest-based name that doesn't match its contents.\n\t// Deprecated: PutBlob() doesn't do this any more (it just accepts the caller’s value),\n\t// and there is no known user of this error.\n\tErrBlobDigestMismatch = errors.New(\"blob digest mismatch\")\n\t// ErrBlobSizeMismatch is returned when PutBlob() is given a blob\n\t// with an expected size that doesn't match the reader.\n\tErrBlobSizeMismatch = errors.New(\"blob size mismatch\")\n)\n\ntype storageImageDestination struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.ImplementsPutBlobPartial\n\tstubs.AlwaysSupportsSignatures\n\n\timageRef              storageReference\n\tdirectory             string                   // Temporary directory where we store blobs until Commit() time\n\tnextTempFileID        atomic.Int32             // A counter that we use for computing filenames to assign to blobs\n\tmanifest              []byte                   // (Per-instance) manifest contents, or nil if not yet known.\n\tmanifestMIMEType      string                   // Valid if manifest != nil\n\tmanifestDigest        digest.Digest            // Valid if manifest != nil\n\tuntrustedDiffIDValues []digest.Digest          // From config’s RootFS.DiffIDs (not even validated to be valid digest.Digest!); or nil if not read yet\n\tsignatures            []byte                   // Signature contents, temporary\n\tsignatureses          map[digest.Digest][]byte // Instance signature contents, temporary\n\tmetadata              storageImageMetadata     // Metadata contents being built\n\n\t// Mapping from layer (by index) to the associated ID in the storage.\n\t// It's protected *implicitly* since `commitLayer()`, at any given\n\t// time, can only be executed by *one* goroutine.  Please refer to\n\t// `queueOrCommit()` for further details on how the single-caller\n\t// guarantee is implemented.\n\tindexToStorageID map[int]string\n\n\t// A storage destination may be used concurrently, due to HasThreadSafePutBlob.\n\tlock          sync.Mutex // Protects lockProtected\n\tlockProtected storageImageDestinationLockProtected\n}\n\n// storageImageDestinationLockProtected contains storageImageDestination data which might be\n// accessed concurrently, due to HasThreadSafePutBlob.\n// _During the concurrent TryReusingBlob/PutBlob/* calls_ (but not necessarily during the final Commit)\n// uses must hold storageImageDestination.lock.\ntype storageImageDestinationLockProtected struct {\n\tcurrentIndex          int                    // The index of the layer to be committed (i.e., lower indices have already been committed)\n\tindexToAddedLayerInfo map[int]addedLayerInfo // Mapping from layer (by index) to blob to add to the image\n\n\t// Externally, a layer is identified either by (compressed) digest, or by TOC digest\n\t// (and we assume the TOC digest also uniquely identifies the contents, i.e. there aren’t two\n\t// different formats/ways to parse a single TOC); internally, we use uncompressed digest (“DiffID”) or a TOC digest.\n\t// We may or may not know the relationships between these three values.\n\t//\n\t// When creating a layer, the c/storage layer metadata and image IDs must _only_ be based on trusted values\n\t// we have computed ourselves. (Layer reuse can then look up against such trusted values, but it might not\n\t// recompute those values for incoming layers — the point of the reuse is that we don’t need to consume the incoming layer.)\n\t//\n\t// Layer identification: For a layer, at least one of (indexToDiffID, indexToTOCDigest, blobDiffIDs) must be available\n\t// before commitLayer is called.\n\t// The layer is identified by the first of the three fields which exists, in that order (and the value must be trusted).\n\t//\n\t// WARNING: All values in indexToDiffID, indexToTOCDigest, and blobDiffIDs are _individually_ trusted, but blobDiffIDs is more subtle.\n\t// The values in indexTo* are all consistent, because the code writing them processed them all at once, and consistently.\n\t// But it is possible for a layer’s indexToDiffID an indexToTOCDigest to be based on a TOC, without setting blobDiffIDs\n\t// for the compressed digest of that index, and for blobDiffIDs[compressedDigest] to be set _separately_ while processing some\n\t// other layer entry. In particular it is possible for indexToDiffID[index] and blobDiffIDs[compressedDigestAtIndex]] to refer\n\t// to mismatching contents.\n\t// Users of these fields should use trustedLayerIdentityDataLocked, which centralizes the validity logic,\n\t// instead of interpreting these fields, especially blobDiffIDs, directly.\n\t//\n\t// Ideally we wouldn’t have blobDiffIDs, and we would just keep records by index, but the public API does not require the caller\n\t// to provide layer indices; and configs don’t have layer indices. blobDiffIDs needs to exist for those cases.\n\tindexToDiffID map[int]digest.Digest // Mapping from layer index to DiffID\n\t// Mapping from layer index to a TOC Digest.\n\t// If this is set, then either c/storage/pkg/chunked/toc.GetTOCDigest must have returned a value, or indexToDiffID must be set as well.\n\tindexToTOCDigest map[int]digest.Digest\n\tblobDiffIDs      map[digest.Digest]digest.Digest // Mapping from layer blobsums to their corresponding DiffIDs. CAREFUL: See the WARNING above.\n\n\t// Layer data: Before commitLayer is called, either at least one of (diffOutputs, indexToAdditionalLayer, filenames)\n\t// should be available; or indexToDiffID/indexToTOCDigest/blobDiffIDs should be enough to locate an existing c/storage layer.\n\t// They are looked up in the order they are mentioned above.\n\tdiffOutputs            map[int]*graphdriver.DriverWithDifferOutput // Mapping from layer index to a partially-pulled layer intermediate data\n\tindexToAdditionalLayer map[int]storage.AdditionalLayer             // Mapping from layer index to their corresponding additional layer\n\t// Mapping from layer blobsums to names of files we used to hold them. If set, fileSizes and blobDiffIDs must also be set.\n\tfilenames map[digest.Digest]string\n\t// Mapping from layer blobsums to their sizes. If set, filenames and blobDiffIDs must also be set.\n\tfileSizes map[digest.Digest]int64\n\n\t// Config\n\tconfigDigest digest.Digest // \"\" if N/A or not known yet.\n}\n\n// addedLayerInfo records data about a layer to use in this image.\ntype addedLayerInfo struct {\n\tdigest     digest.Digest // Mandatory, the digest of the layer.\n\temptyLayer bool          // The layer is an “empty”/“throwaway” one, and may or may not be physically represented in various transport / storage systems.  false if the manifest type does not have the concept.\n}\n\n// newImageDestination sets us up to write a new image, caching blobs in a temporary directory until\n// it's time to Commit() the image\nfunc newImageDestination(sys *types.SystemContext, imageRef storageReference) (*storageImageDestination, error) {\n\tdirectory, err := tmpdir.MkDirBigFileTemp(sys, \"storage\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating a temporary directory: %w\", err)\n\t}\n\tdest := &storageImageDestination{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tSupportedManifestMIMETypes: []string{\n\t\t\t\timgspecv1.MediaTypeImageManifest,\n\t\t\t\tmanifest.DockerV2Schema2MediaType,\n\t\t\t\tmanifest.DockerV2Schema1SignedMediaType,\n\t\t\t\tmanifest.DockerV2Schema1MediaType,\n\t\t\t},\n\t\t\t// We ultimately have to decompress layers to populate trees on disk\n\t\t\t// and need to explicitly ask for it here, so that the layers' MIME\n\t\t\t// types can be set accordingly.\n\t\t\tDesiredLayerCompression:        types.PreserveOriginal,\n\t\t\tAcceptsForeignLayerURLs:        false,\n\t\t\tMustMatchRuntimeOS:             true,\n\t\t\tIgnoresEmbeddedDockerReference: true, // Yes, we want the unmodified manifest\n\t\t\tHasThreadSafePutBlob:           true,\n\t\t}),\n\n\t\timageRef:     imageRef,\n\t\tdirectory:    directory,\n\t\tsignatureses: make(map[digest.Digest][]byte),\n\t\tmetadata: storageImageMetadata{\n\t\t\tSignatureSizes:  []int{},\n\t\t\tSignaturesSizes: make(map[digest.Digest][]int),\n\t\t},\n\t\tindexToStorageID: make(map[int]string),\n\t\tlockProtected: storageImageDestinationLockProtected{\n\t\t\tindexToAddedLayerInfo: make(map[int]addedLayerInfo),\n\n\t\t\tindexToDiffID:    make(map[int]digest.Digest),\n\t\t\tindexToTOCDigest: make(map[int]digest.Digest),\n\t\t\tblobDiffIDs:      make(map[digest.Digest]digest.Digest),\n\n\t\t\tdiffOutputs:            make(map[int]*graphdriver.DriverWithDifferOutput),\n\t\t\tindexToAdditionalLayer: make(map[int]storage.AdditionalLayer),\n\t\t\tfilenames:              make(map[digest.Digest]string),\n\t\t\tfileSizes:              make(map[digest.Digest]int64),\n\t\t},\n\t}\n\tdest.Compat = impl.AddCompat(dest)\n\treturn dest, nil\n}\n\n// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\nfunc (s *storageImageDestination) Reference() types.ImageReference {\n\treturn s.imageRef\n}\n\n// Close cleans up the temporary directory and additional layer store handlers.\nfunc (s *storageImageDestination) Close() error {\n\t// This is outside of the scope of HasThreadSafePutBlob, so we don’t need to hold s.lock.\n\tfor _, al := range s.lockProtected.indexToAdditionalLayer {\n\t\tal.Release()\n\t}\n\tfor _, v := range s.lockProtected.diffOutputs {\n\t\t_ = s.imageRef.transport.store.CleanupStagedLayer(v)\n\t}\n\treturn os.RemoveAll(s.directory)\n}\n\nfunc (s *storageImageDestination) computeNextBlobCacheFile() string {\n\treturn filepath.Join(s.directory, fmt.Sprintf(\"%d\", s.nextTempFileID.Add(1)))\n}\n\n// NoteOriginalOCIConfig provides the config of the image, as it exists on the source, BUT converted to OCI format,\n// or an error obtaining that value (e.g. if the image is an artifact and not a container image).\n// The destination can use it in its TryReusingBlob/PutBlob implementations\n// (otherwise it only obtains the final config after all layers are written).\nfunc (s *storageImageDestination) NoteOriginalOCIConfig(ociConfig *imgspecv1.Image, configErr error) error {\n\tif configErr != nil {\n\t\treturn fmt.Errorf(\"writing to c/storage without a valid image config: %w\", configErr)\n\t}\n\ts.setUntrustedDiffIDValuesFromOCIConfig(ociConfig)\n\treturn nil\n}\n\n// PutBlobWithOptions writes contents of stream and returns data representing the result.\n// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n// inputInfo.Size is the expected length of stream, if known.\n// inputInfo.MediaType describes the blob format, if known.\n// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n// to any other readers for download using the supplied digest.\n// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.\nfunc (s *storageImageDestination) PutBlobWithOptions(ctx context.Context, stream io.Reader, blobinfo types.BlobInfo, options private.PutBlobOptions) (private.UploadedBlob, error) {\n\tinfo, err := s.putBlobToPendingFile(stream, blobinfo, &options)\n\tif err != nil {\n\t\treturn info, err\n\t}\n\n\tif options.IsConfig {\n\t\ts.lock.Lock()\n\t\tdefer s.lock.Unlock()\n\t\tif s.lockProtected.configDigest != \"\" {\n\t\t\treturn private.UploadedBlob{}, fmt.Errorf(\"after config %q, refusing to record another config %q\",\n\t\t\t\ts.lockProtected.configDigest.String(), info.Digest.String())\n\t\t}\n\t\ts.lockProtected.configDigest = info.Digest\n\t\treturn info, nil\n\t}\n\tif options.LayerIndex == nil {\n\t\treturn info, nil\n\t}\n\n\treturn info, s.queueOrCommit(*options.LayerIndex, addedLayerInfo{\n\t\tdigest:     info.Digest,\n\t\temptyLayer: options.EmptyLayer,\n\t})\n}\n\n// putBlobToPendingFile implements ImageDestination.PutBlobWithOptions, storing stream into an on-disk file.\n// The caller must arrange the blob to be eventually committed using s.commitLayer().\nfunc (s *storageImageDestination) putBlobToPendingFile(stream io.Reader, blobinfo types.BlobInfo, options *private.PutBlobOptions) (private.UploadedBlob, error) {\n\t// Stores a layer or data blob in our temporary directory, checking that any information\n\t// in the blobinfo matches the incoming data.\n\tif blobinfo.Digest != \"\" {\n\t\tif err := blobinfo.Digest.Validate(); err != nil {\n\t\t\treturn private.UploadedBlob{}, fmt.Errorf(\"invalid digest %#v: %w\", blobinfo.Digest.String(), err)\n\t\t}\n\t}\n\n\t// Set up to digest the blob if necessary, and count its size while saving it to a file.\n\tfilename := s.computeNextBlobCacheFile()\n\tfile, err := os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY|os.O_EXCL, 0o600)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"creating temporary file %q: %w\", filename, err)\n\t}\n\tblobDigest, diffID, count, err := func() (_, _ digest.Digest, _ int64, retErr error) { // A scope for defer\n\t\t// since we are writing to this file, make sure we handle err on Close()\n\t\tdefer func() {\n\t\t\tcloseErr := file.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}()\n\t\tcounter := ioutils.NewWriteCounter(file)\n\t\tstream = io.TeeReader(stream, counter)\n\t\tdigester, stream := putblobdigest.DigestIfUnknown(stream, blobinfo)\n\t\tdecompressed, err := archive.DecompressStream(stream)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"setting up to decompress blob: %w\", err)\n\t\t}\n\t\tdefer decompressed.Close()\n\n\t\tdiffID := digest.Canonical.Digester()\n\t\t// Copy the data to the file.\n\t\t// TODO: This can take quite some time, and should ideally be cancellable using context.Context.\n\t\t_, err = io.Copy(diffID.Hash(), decompressed)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"storing blob to file %q: %w\", filename, err)\n\t\t}\n\n\t\treturn digester.Digest(), diffID.Digest(), counter.Count, nil\n\t}()\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\n\t// Determine blob properties, and fail if information that we were given about the blob\n\t// is known to be incorrect.\n\tblobSize := blobinfo.Size\n\tif blobSize < 0 {\n\t\tblobSize = count\n\t} else if blobinfo.Size != count {\n\t\treturn private.UploadedBlob{}, ErrBlobSizeMismatch\n\t}\n\n\t// Record information about the blob.\n\ts.lock.Lock()\n\ts.lockProtected.blobDiffIDs[blobDigest] = diffID\n\ts.lockProtected.fileSizes[blobDigest] = count\n\ts.lockProtected.filenames[blobDigest] = filename\n\ts.lock.Unlock()\n\t// This is safe because we have just computed diffID, and blobDigest was either computed\n\t// by us, or validated by the caller (usually copy.digestingReader).\n\toptions.Cache.RecordDigestUncompressedPair(blobDigest, diffID)\n\treturn private.UploadedBlob{\n\t\tDigest: blobDigest,\n\t\tSize:   blobSize,\n\t}, nil\n}\n\ntype zstdFetcher struct {\n\tchunkAccessor private.BlobChunkAccessor\n\tctx           context.Context\n\tblobInfo      types.BlobInfo\n}\n\n// GetBlobAt converts from chunked.GetBlobAt to BlobChunkAccessor.GetBlobAt.\nfunc (f *zstdFetcher) GetBlobAt(chunks []chunked.ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\tnewChunks := make([]private.ImageSourceChunk, 0, len(chunks))\n\tfor _, v := range chunks {\n\t\ti := private.ImageSourceChunk{\n\t\t\tOffset: v.Offset,\n\t\t\tLength: v.Length,\n\t\t}\n\t\tnewChunks = append(newChunks, i)\n\t}\n\trc, errs, err := f.chunkAccessor.GetBlobAt(f.ctx, f.blobInfo, newChunks)\n\tif _, ok := err.(private.BadPartialRequestError); ok {\n\t\terr = chunked.ErrBadRequest{}\n\t}\n\treturn rc, errs, err\n}\n\n// PutBlobPartial attempts to create a blob using the data that is already present\n// at the destination. chunkAccessor is accessed in a non-sequential way to retrieve the missing chunks.\n// It is available only if SupportsPutBlobPartial().\n// Even if SupportsPutBlobPartial() returns true, the call can fail.\n// If the call fails with ErrFallbackToOrdinaryLayerDownload, the caller can fall back to PutBlobWithOptions.\n// The fallback _must not_ be done otherwise.\nfunc (s *storageImageDestination) PutBlobPartial(ctx context.Context, chunkAccessor private.BlobChunkAccessor, srcInfo types.BlobInfo, options private.PutBlobPartialOptions) (_ private.UploadedBlob, retErr error) {\n\tinputTOCDigest, err := toc.GetTOCDigest(srcInfo.Annotations)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\n\t// The identity of partially-pulled layers is, as long as we keep compatibility with tar-like consumers,\n\t// unfixably ambiguous: there are two possible “views” of the same file (same compressed digest),\n\t// the traditional “view” that decompresses the primary stream and consumes a tar file,\n\t// and the partial-pull “view” that starts with the TOC.\n\t// The two “views” have two separate metadata sets and may refer to different parts of the blob for file contents;\n\t// the direct way to ensure they are consistent would be to read the full primary stream (and authenticate it against\n\t// the compressed digest), and ensure the metadata and layer contents exactly match the partially-pulled contents -\n\t// making the partial pull completely pointless.\n\t//\n\t// Instead, for partial-pull-capable layers (with inputTOCDigest set), we require the image to “commit”\n\t// to uncompressed layer digest values via the config's RootFS.DiffIDs array:\n\t// they are already naturally computed for traditionally-pulled layers, and for partially-pulled layers we\n\t// do the optimal partial pull, and then reconstruct the uncompressed tar stream just to (expensively) compute this digest.\n\t//\n\t// Layers which don’t support partial pulls (inputTOCDigest == \"\", incl. all schema1 layers) can be let through:\n\t// the partial pull code will either not engage, or consume the full layer; and the rules of indexToTOCDigest / layerIdentifiedByTOC\n\t// ensure the layer is identified by DiffID, i.e. using the traditional “view”.\n\t//\n\t// But if inputTOCDigest is set and the input image doesn't have RootFS.DiffIDs (the config is invalid for schema2/OCI),\n\t// don't allow a partial pull, and fall back to PutBlobWithOptions.\n\t//\n\t// (The user can opt out of the DiffID commitment checking by a c/storage option, giving up security for performance,\n\t// but we will still trigger the fall back here, and we will still enforce a DiffID match, so that the set of accepted images\n\t// is the same in both cases, and so that users are not tempted to set the c/storage option to allow accepting some invalid images.)\n\tvar untrustedDiffID digest.Digest // \"\" if unknown\n\tudid, err := s.untrustedLayerDiffID(options.LayerIndex)\n\tif err != nil {\n\t\tvar diffIDUnknownErr untrustedLayerDiffIDUnknownError\n\t\tswitch {\n\t\tcase errors.Is(err, errUntrustedLayerDiffIDNotYetAvailable):\n\t\t\t// PutBlobPartial is a private API, so all callers are within c/image, and should have called\n\t\t\t// NoteOriginalOCIConfig first.\n\t\t\treturn private.UploadedBlob{}, fmt.Errorf(\"internal error: in PutBlobPartial, untrustedLayerDiffID returned errUntrustedLayerDiffIDNotYetAvailable\")\n\t\tcase errors.As(err, &diffIDUnknownErr):\n\t\t\tif inputTOCDigest != nil {\n\t\t\t\treturn private.UploadedBlob{}, private.NewErrFallbackToOrdinaryLayerDownload(err)\n\t\t\t}\n\t\t\tuntrustedDiffID = \"\" // A schema1 image or a non-TOC layer with no ambiguity, let it through\n\t\tdefault:\n\t\t\treturn private.UploadedBlob{}, err\n\t\t}\n\t} else {\n\t\tuntrustedDiffID = udid\n\t}\n\n\tfetcher := zstdFetcher{\n\t\tchunkAccessor: chunkAccessor,\n\t\tctx:           ctx,\n\t\tblobInfo:      srcInfo,\n\t}\n\n\tdefer func() {\n\t\tvar perr chunked.ErrFallbackToOrdinaryLayerDownload\n\t\tif errors.As(retErr, &perr) {\n\t\t\tretErr = private.NewErrFallbackToOrdinaryLayerDownload(retErr)\n\t\t}\n\t}()\n\n\tdiffer, err := chunked.NewDiffer(ctx, s.imageRef.transport.store, srcInfo.Digest, srcInfo.Size, srcInfo.Annotations, &fetcher)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\tdefer differ.Close()\n\n\tout, err := s.imageRef.transport.store.PrepareStagedLayer(nil, differ)\n\tif err != nil {\n\t\treturn private.UploadedBlob{}, fmt.Errorf(\"staging a partially-pulled layer: %w\", err)\n\t}\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\t_ = s.imageRef.transport.store.CleanupStagedLayer(out)\n\t\t}\n\t}()\n\n\tif out.TOCDigest == \"\" && out.UncompressedDigest == \"\" {\n\t\treturn private.UploadedBlob{}, errors.New(\"internal error: PrepareStagedLayer succeeded with neither TOCDigest nor UncompressedDigest set\")\n\t}\n\n\tblobDigest := srcInfo.Digest\n\n\ts.lock.Lock()\n\tif err := func() error { // A scope for defer\n\t\tdefer s.lock.Unlock()\n\n\t\t// For true partial pulls, c/storage decides whether to compute the uncompressed digest based on an option in storage.conf\n\t\t// (defaults to true, to avoid ambiguity.)\n\t\t// c/storage can also be configured, to consume a layer not prepared for partial pulls (primarily to allow composefs conversion),\n\t\t// and in that case it always consumes the full blob and always computes the uncompressed digest.\n\t\tif out.UncompressedDigest != \"\" {\n\t\t\t// This is centrally enforced later, in commitLayer, but because we have the value available,\n\t\t\t// we might just as well check immediately.\n\t\t\tif untrustedDiffID != \"\" && out.UncompressedDigest != untrustedDiffID {\n\t\t\t\treturn fmt.Errorf(\"uncompressed digest of layer %q is %q, config claims %q\", srcInfo.Digest.String(),\n\t\t\t\t\tout.UncompressedDigest.String(), untrustedDiffID.String())\n\t\t\t}\n\n\t\t\ts.lockProtected.indexToDiffID[options.LayerIndex] = out.UncompressedDigest\n\t\t\tif out.TOCDigest != \"\" {\n\t\t\t\ts.lockProtected.indexToTOCDigest[options.LayerIndex] = out.TOCDigest\n\t\t\t\toptions.Cache.RecordTOCUncompressedPair(out.TOCDigest, out.UncompressedDigest)\n\t\t\t}\n\n\t\t\t// If the whole layer has been consumed, chunked.GetDiffer is responsible for ensuring blobDigest has been validated.\n\t\t\tif out.CompressedDigest != \"\" {\n\t\t\t\tif out.CompressedDigest != blobDigest {\n\t\t\t\t\treturn fmt.Errorf(\"internal error: PrepareStagedLayer returned CompressedDigest %q not matching expected %q\",\n\t\t\t\t\t\tout.CompressedDigest, blobDigest)\n\t\t\t\t}\n\t\t\t\t// So, record also information about blobDigest, that might benefit reuse.\n\t\t\t\t// We trust PrepareStagedLayer to validate or create both values correctly.\n\t\t\t\ts.lockProtected.blobDiffIDs[blobDigest] = out.UncompressedDigest\n\t\t\t\toptions.Cache.RecordDigestUncompressedPair(out.CompressedDigest, out.UncompressedDigest)\n\t\t\t}\n\t\t} else {\n\t\t\t// Sanity-check the defined rules for indexToTOCDigest.\n\t\t\tif inputTOCDigest == nil {\n\t\t\t\treturn fmt.Errorf(\"internal error: PrepareStagedLayer returned a TOC-only identity for layer %q with no TOC digest\", srcInfo.Digest.String())\n\t\t\t}\n\n\t\t\t// Use diffID for layer identity if it is known.\n\t\t\tif uncompressedDigest := options.Cache.UncompressedDigestForTOC(out.TOCDigest); uncompressedDigest != \"\" {\n\t\t\t\ts.lockProtected.indexToDiffID[options.LayerIndex] = uncompressedDigest\n\t\t\t}\n\t\t\ts.lockProtected.indexToTOCDigest[options.LayerIndex] = out.TOCDigest\n\t\t}\n\t\ts.lockProtected.diffOutputs[options.LayerIndex] = out\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn private.UploadedBlob{}, err\n\t}\n\n\tsucceeded = true\n\treturn private.UploadedBlob{\n\t\t\tDigest: blobDigest,\n\t\t\tSize:   srcInfo.Size,\n\t\t}, s.queueOrCommit(options.LayerIndex, addedLayerInfo{\n\t\t\tdigest:     blobDigest,\n\t\t\temptyLayer: options.EmptyLayer,\n\t\t})\n}\n\n// TryReusingBlobWithOptions checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n// info.Digest must not be empty.\n// If the blob has been successfully reused, returns (true, info, nil).\n// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\nfunc (s *storageImageDestination) TryReusingBlobWithOptions(ctx context.Context, blobinfo types.BlobInfo, options private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif !impl.OriginalCandidateMatchesTryReusingBlobOptions(options) {\n\t\treturn false, private.ReusedBlob{}, nil\n\t}\n\treused, info, err := s.tryReusingBlobAsPending(blobinfo.Digest, blobinfo.Size, &options)\n\tif err != nil || !reused || options.LayerIndex == nil {\n\t\treturn reused, info, err\n\t}\n\n\treturn reused, info, s.queueOrCommit(*options.LayerIndex, addedLayerInfo{\n\t\tdigest:     info.Digest,\n\t\temptyLayer: options.EmptyLayer,\n\t})\n}\n\n// tryReusingBlobAsPending implements TryReusingBlobWithOptions for (blobDigest, size or -1), filling s.blobDiffIDs and other metadata.\n// The caller must arrange the blob to be eventually committed using s.commitLayer().\nfunc (s *storageImageDestination) tryReusingBlobAsPending(blobDigest digest.Digest, size int64, options *private.TryReusingBlobOptions) (bool, private.ReusedBlob, error) {\n\tif blobDigest == \"\" {\n\t\treturn false, private.ReusedBlob{}, errors.New(`Can not check for a blob with unknown digest`)\n\t}\n\tif err := blobDigest.Validate(); err != nil {\n\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"Can not check for a blob with invalid digest: %w\", err)\n\t}\n\tuseTOCDigest := false // If set, (options.TOCDigest != \"\" && options.LayerIndex != nil) AND we can use options.TOCDigest safely.\n\tif options.TOCDigest != \"\" && options.LayerIndex != nil {\n\t\tif err := options.TOCDigest.Validate(); err != nil {\n\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"Can not check for a blob with invalid digest: %w\", err)\n\t\t}\n\t\t// Only consider using TOCDigest if we can avoid ambiguous image “views”, see the detailed comment in PutBlobPartial.\n\t\t_, err := s.untrustedLayerDiffID(*options.LayerIndex)\n\t\tif err != nil {\n\t\t\tvar diffIDUnknownErr untrustedLayerDiffIDUnknownError\n\t\t\tswitch {\n\t\t\tcase errors.Is(err, errUntrustedLayerDiffIDNotYetAvailable):\n\t\t\t\t// options.TOCDigest is a private API, so all callers are within c/image, and should have called\n\t\t\t\t// NoteOriginalOCIConfig first.\n\t\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"internal error: in TryReusingBlobWithOptions, untrustedLayerDiffID returned errUntrustedLayerDiffIDNotYetAvailable\")\n\t\t\tcase errors.As(err, &diffIDUnknownErr):\n\t\t\t\tlogrus.Debugf(\"Not using TOC %q to look for layer reuse: %v\", options.TOCDigest, err)\n\t\t\t\t// But don’t abort entirely, keep useTOCDigest = false, try a blobDigest match.\n\t\t\tdefault:\n\t\t\t\treturn false, private.ReusedBlob{}, err\n\t\t\t}\n\t\t} else {\n\t\t\tuseTOCDigest = true\n\t\t}\n\t}\n\n\t// lock the entire method as it executes fairly quickly\n\ts.lock.Lock()\n\tdefer s.lock.Unlock()\n\n\tif options.SrcRef != nil && useTOCDigest {\n\t\t// Check if we have the layer in the underlying additional layer store.\n\t\taLayer, err := s.imageRef.transport.store.LookupAdditionalLayer(options.TOCDigest, options.SrcRef.String())\n\t\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for compressed layers with digest %q and labels: %w`, blobDigest, err)\n\t\t} else if err == nil {\n\t\t\t// Compare the long comment in PutBlobPartial. We assume that the Additional Layer Store will, somehow,\n\t\t\t// avoid layer “view” ambiguity.\n\t\t\talsTOCDigest := aLayer.TOCDigest()\n\t\t\tif alsTOCDigest != options.TOCDigest {\n\t\t\t\t// FIXME: If alsTOCDigest is \"\", the Additional Layer Store FUSE server is probably just too old, and we could\n\t\t\t\t// probably go on reading the layer from other sources.\n\t\t\t\t//\n\t\t\t\t// Currently it should not be possible for alsTOCDigest to be set and not the expected value, but there’s\n\t\t\t\t// not that much benefit to checking for equality — we trust the FUSE server to validate the digest either way.\n\t\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"additional layer for TOCDigest %q reports unexpected TOCDigest %q\",\n\t\t\t\t\toptions.TOCDigest, alsTOCDigest)\n\t\t\t}\n\t\t\ts.lockProtected.indexToTOCDigest[*options.LayerIndex] = options.TOCDigest\n\t\t\ts.lockProtected.indexToAdditionalLayer[*options.LayerIndex] = aLayer\n\t\t\treturn true, private.ReusedBlob{\n\t\t\t\tDigest: blobDigest,\n\t\t\t\tSize:   aLayer.CompressedSize(),\n\t\t\t}, nil\n\t\t}\n\t}\n\n\t// Check if we have a wasn't-compressed layer in storage that's based on that blob.\n\n\t// Check if we've already cached it in a file.\n\tif size, ok := s.lockProtected.fileSizes[blobDigest]; ok {\n\t\t// s.lockProtected.blobDiffIDs is set either by putBlobToPendingFile or in createNewLayer when creating the\n\t\t// filenames/fileSizes entry.\n\t\treturn true, private.ReusedBlob{\n\t\t\tDigest: blobDigest,\n\t\t\tSize:   size,\n\t\t}, nil\n\t}\n\n\tlayers, err := s.imageRef.transport.store.LayersByUncompressedDigest(blobDigest)\n\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for layers with digest %q: %w`, blobDigest, err)\n\t}\n\tif len(layers) > 0 {\n\t\ts.lockProtected.blobDiffIDs[blobDigest] = blobDigest\n\t\treturn true, private.ReusedBlob{\n\t\t\tDigest: blobDigest,\n\t\t\tSize:   layers[0].UncompressedSize,\n\t\t}, nil\n\t}\n\n\t// Check if we have a was-compressed layer in storage that's based on that blob.\n\tlayers, err = s.imageRef.transport.store.LayersByCompressedDigest(blobDigest)\n\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for compressed layers with digest %q: %w`, blobDigest, err)\n\t}\n\tif len(layers) > 0 {\n\t\t// LayersByCompressedDigest only finds layers which were created from a full layer blob, and extracting that\n\t\t// always sets UncompressedDigest.\n\t\tdiffID := layers[0].UncompressedDigest\n\t\tif diffID == \"\" {\n\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(\"internal error: compressed layer %q (for compressed digest %q) does not have an uncompressed digest\", layers[0].ID, blobDigest.String())\n\t\t}\n\t\ts.lockProtected.blobDiffIDs[blobDigest] = diffID\n\t\treturn true, private.ReusedBlob{\n\t\t\tDigest: blobDigest,\n\t\t\tSize:   layers[0].CompressedSize,\n\t\t}, nil\n\t}\n\n\t// Does the blob correspond to a known DiffID which we already have available?\n\t// Because we must return the size, which is unknown for unavailable compressed blobs, the returned BlobInfo refers to the\n\t// uncompressed layer, and that can happen only if options.CanSubstitute, or if the incoming manifest already specifies the size.\n\tif options.CanSubstitute || size != -1 {\n\t\tif uncompressedDigest := options.Cache.UncompressedDigest(blobDigest); uncompressedDigest != \"\" && uncompressedDigest != blobDigest {\n\t\t\tlayers, err := s.imageRef.transport.store.LayersByUncompressedDigest(uncompressedDigest)\n\t\t\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for layers with digest %q: %w`, uncompressedDigest, err)\n\t\t\t}\n\t\t\tif found, reused := reusedBlobFromLayerLookup(layers, blobDigest, size, options); found {\n\t\t\t\ts.lockProtected.blobDiffIDs[reused.Digest] = uncompressedDigest\n\t\t\t\treturn true, reused, nil\n\t\t\t}\n\t\t}\n\t}\n\n\tif useTOCDigest {\n\t\t// Check if we know which which UncompressedDigest the TOC digest resolves to, and we have a match for that.\n\t\t// Prefer this over LayersByTOCDigest because we can identify the layer using UncompressedDigest, maximizing reuse.\n\t\tuncompressedDigest := options.Cache.UncompressedDigestForTOC(options.TOCDigest)\n\t\tif uncompressedDigest != \"\" {\n\t\t\tlayers, err = s.imageRef.transport.store.LayersByUncompressedDigest(uncompressedDigest)\n\t\t\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for layers with digest %q: %w`, uncompressedDigest, err)\n\t\t\t}\n\t\t\tif found, reused := reusedBlobFromLayerLookup(layers, blobDigest, size, options); found {\n\t\t\t\ts.lockProtected.indexToDiffID[*options.LayerIndex] = uncompressedDigest\n\t\t\t\treused.MatchedByTOCDigest = true\n\t\t\t\treturn true, reused, nil\n\t\t\t}\n\t\t}\n\t\t// Check if we have a chunked layer in storage with the same TOC digest.\n\t\tlayers, err := s.imageRef.transport.store.LayersByTOCDigest(options.TOCDigest)\n\t\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\t\treturn false, private.ReusedBlob{}, fmt.Errorf(`looking for layers with TOC digest %q: %w`, options.TOCDigest, err)\n\t\t}\n\t\tif found, reused := reusedBlobFromLayerLookup(layers, blobDigest, size, options); found {\n\t\t\tif uncompressedDigest == \"\" && layers[0].UncompressedDigest != \"\" {\n\t\t\t\t// Determine an uncompressed digest if at all possible, to use a traditional image ID\n\t\t\t\t// and to maximize image reuse.\n\t\t\t\tuncompressedDigest = layers[0].UncompressedDigest\n\t\t\t}\n\t\t\tif uncompressedDigest != \"\" {\n\t\t\t\ts.lockProtected.indexToDiffID[*options.LayerIndex] = uncompressedDigest\n\t\t\t}\n\t\t\ts.lockProtected.indexToTOCDigest[*options.LayerIndex] = options.TOCDigest\n\t\t\treused.MatchedByTOCDigest = true\n\t\t\treturn true, reused, nil\n\t\t}\n\t}\n\n\t// Nope, we don't have it.\n\treturn false, private.ReusedBlob{}, nil\n}\n\n// reusedBlobFromLayerLookup returns (true, ReusedBlob) if layers contain a usable match; or (false, ...) if not.\n// The caller is still responsible for setting the layer identification fields, to allow the layer to be found again.\nfunc reusedBlobFromLayerLookup(layers []storage.Layer, blobDigest digest.Digest, blobSize int64, options *private.TryReusingBlobOptions) (bool, private.ReusedBlob) {\n\tif len(layers) > 0 {\n\t\tif blobSize != -1 {\n\t\t\treturn true, private.ReusedBlob{\n\t\t\t\tDigest: blobDigest,\n\t\t\t\tSize:   blobSize,\n\t\t\t}\n\t\t} else if options.CanSubstitute && layers[0].UncompressedDigest != \"\" {\n\t\t\treturn true, private.ReusedBlob{\n\t\t\t\tDigest:               layers[0].UncompressedDigest,\n\t\t\t\tSize:                 layers[0].UncompressedSize,\n\t\t\t\tCompressionOperation: types.Decompress,\n\t\t\t\tCompressionAlgorithm: nil,\n\t\t\t}\n\t\t}\n\t}\n\treturn false, private.ReusedBlob{}\n}\n\n// trustedLayerIdentityData is a _consistent_ set of information known about a single layer.\ntype trustedLayerIdentityData struct {\n\t// true if we decided the layer should be identified by tocDigest, false if by diffID\n\t// This can only be true if c/storage/pkg/chunked/toc.GetTOCDigest returns a value.\n\tlayerIdentifiedByTOC bool\n\n\tdiffID     digest.Digest // A digest of the uncompressed full contents of the layer, or \"\" if unknown; must be set if !layerIdentifiedByTOC\n\ttocDigest  digest.Digest // A digest of the TOC digest, or \"\" if unknown; must be set if layerIdentifiedByTOC\n\tblobDigest digest.Digest // A digest of the (possibly-compressed) layer as presented, or \"\" if unknown/untrusted.\n}\n\n// logString() prints a representation of trusted suitable identifying a layer in logs and errors.\n// The string is already quoted to expose malicious input and does not need to be quoted again.\n// Note that it does not include _all_ of the contents.\nfunc (trusted trustedLayerIdentityData) logString() string {\n\treturn fmt.Sprintf(\"%q/%q/%q\", trusted.blobDigest, trusted.tocDigest, trusted.diffID)\n}\n\n// trustedLayerIdentityDataLocked returns a _consistent_ set of information for a layer with (layerIndex, blobDigest).\n// blobDigest is the (possibly-compressed) layer digest referenced in the manifest.\n// It returns (trusted, true) if the layer was found, or (_, false) if insufficient data is available.\n//\n// The caller must hold s.lock.\nfunc (s *storageImageDestination) trustedLayerIdentityDataLocked(layerIndex int, blobDigest digest.Digest) (trustedLayerIdentityData, bool) {\n\t// The decision about layerIdentifiedByTOC must be _stable_ once the data for layerIndex is set,\n\t// even if s.lockProtected.blobDiffIDs changes later and we can subsequently find an entry that wasn’t originally available.\n\t//\n\t// If we previously didn't have a blobDigest match and decided to use the TOC, but _later_ we happen to find\n\t// a blobDigest match, we might in principle want to reconsider, set layerIdentifiedByTOC to false, and use the file:\n\t// but the layer in question, and possibly child layers, might already have been committed to storage.\n\t// A late-arriving addition to s.lockProtected.blobDiffIDs would mean that we would want to set\n\t// new layer IDs for potentially the whole parent chain = throw away the just-created layers and create them all again.\n\t//\n\t// Such a within-image layer reuse is expected to be pretty rare; instead, ignore the unexpected file match\n\t// and proceed to the originally-planned TOC match.\n\n\tres := trustedLayerIdentityData{}\n\tdiffID, layerIdentifiedByDiffID := s.lockProtected.indexToDiffID[layerIndex]\n\tif layerIdentifiedByDiffID {\n\t\tres.layerIdentifiedByTOC = false\n\t\tres.diffID = diffID\n\t}\n\tif tocDigest, ok := s.lockProtected.indexToTOCDigest[layerIndex]; ok {\n\t\tres.tocDigest = tocDigest\n\t\tif !layerIdentifiedByDiffID {\n\t\t\tres.layerIdentifiedByTOC = true\n\t\t}\n\t}\n\tif otherDiffID, ok := s.lockProtected.blobDiffIDs[blobDigest]; ok {\n\t\tif !layerIdentifiedByDiffID && !res.layerIdentifiedByTOC {\n\t\t\t// This is the only data we have, so it is clearly self-consistent.\n\t\t\tres.layerIdentifiedByTOC = false\n\t\t\tres.diffID = otherDiffID\n\t\t\tres.blobDigest = blobDigest\n\t\t\tlayerIdentifiedByDiffID = true\n\t\t} else {\n\t\t\t// We have set up the layer identity without referring to blobDigest:\n\t\t\t// an attacker might have used a manifest with non-matching tocDigest and blobDigest.\n\t\t\t// But, if we know a trusted diffID value from other sources, and it matches the one for blobDigest,\n\t\t\t// we know blobDigest is fine as well.\n\t\t\tif res.diffID != \"\" && otherDiffID == res.diffID {\n\t\t\t\tres.blobDigest = blobDigest\n\t\t\t}\n\t\t}\n\t}\n\tif !layerIdentifiedByDiffID && !res.layerIdentifiedByTOC {\n\t\treturn trustedLayerIdentityData{}, false // We found nothing at all\n\t}\n\treturn res, true\n}\n\n// computeID computes a recommended image ID based on information we have so far.  If\n// the manifest is not of a type that we recognize, we return an empty value, indicating\n// that since we don't have a recommendation, a random ID should be used if one needs\n// to be allocated.\nfunc (s *storageImageDestination) computeID(m manifest.Manifest) (string, error) {\n\t// This is outside of the scope of HasThreadSafePutBlob, so we don’t need to hold s.lock.\n\n\tlayerInfos := m.LayerInfos()\n\n\t// Build the diffID list.  We need the decompressed sums that we've been calculating to\n\t// fill in the DiffIDs.  It's expected (but not enforced by us) that the number of\n\t// diffIDs corresponds to the number of non-EmptyLayer entries in the history.\n\tvar diffIDs []digest.Digest\n\tswitch m.(type) {\n\tcase *manifest.Schema1:\n\t\t// Build a list of the diffIDs we've generated for the non-throwaway FS layers\n\t\tfor i, li := range layerInfos {\n\t\t\tif li.EmptyLayer {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttrusted, ok := s.trustedLayerIdentityDataLocked(i, li.Digest)\n\t\t\tif !ok { // We have already committed all layers if we get to this point, so the data must have been available.\n\t\t\t\treturn \"\", fmt.Errorf(\"internal inconsistency: layer (%d, %q) not found\", i, li.Digest)\n\t\t\t}\n\t\t\tif trusted.diffID == \"\" {\n\t\t\t\tif trusted.layerIdentifiedByTOC {\n\t\t\t\t\tlogrus.Infof(\"v2s1 image uses a layer identified by TOC with unknown diffID; choosing a random image ID\")\n\t\t\t\t\treturn \"\", nil\n\t\t\t\t}\n\t\t\t\treturn \"\", fmt.Errorf(\"internal inconsistency: layer (%d, %q) is not identified by TOC and has no diffID\", i, li.Digest)\n\t\t\t}\n\t\t\tdiffIDs = append(diffIDs, trusted.diffID)\n\t\t}\n\tcase *manifest.Schema2, *manifest.OCI1:\n\t\t// We know the ID calculation doesn't actually use the diffIDs, so we don't need to populate\n\t\t// the diffID list.\n\tdefault:\n\t\treturn \"\", nil\n\t}\n\n\t// We want to use the same ID for “the same” images, but without risking unwanted sharing / malicious image corruption.\n\t//\n\t// Traditionally that means the same ~config digest, as computed by m.ImageID;\n\t// but if we identify a layer by TOC, we verify the layer against neither the (compressed) blob digest in the manifest,\n\t// nor against the config’s RootFS.DiffIDs. We don’t really want to do either, to allow partial layer pulls where we never see\n\t// most of the data.\n\t//\n\t// So, if a layer is identified by TOC (and we do validate against the TOC), the fact that we used the TOC, and the value of the TOC,\n\t// must enter into the image ID computation.\n\t// But for images where no TOC was used, continue to use IDs computed the traditional way, to maximize image reuse on upgrades,\n\t// and to introduce the changed behavior only when partial pulls are used.\n\t//\n\t// Note that it’s not 100% guaranteed that an image pulled by TOC uses an OCI manifest; consider\n\t// (skopeo copy --format v2s2 docker://…/zstd-chunked-image containers-storage:… ). So this is not happening only in the OCI case above.\n\tordinaryImageID, err := m.ImageID(diffIDs)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar tocIDInput strings.Builder\n\t// ordinaryImageID is a digest of a config, which is a JSON value.\n\t// To avoid the risk of collisions, start the input with @ so that the input is not a valid JSON.\n\ttocIDInput.WriteString(\"@With TOC:\")\n\thasLayerPulledByTOC := false\n\tfor i, li := range layerInfos {\n\t\ttrusted, ok := s.trustedLayerIdentityDataLocked(i, li.Digest)\n\t\tif !ok { // We have already committed all layers if we get to this point, so the data must have been available.\n\t\t\treturn \"\", fmt.Errorf(\"internal inconsistency: layer (%d, %q) not found\", i, li.Digest)\n\t\t}\n\t\tlayerValue := \"\" // An empty string is not a valid digest, so this is unambiguous with the TOC case.\n\t\tif trusted.layerIdentifiedByTOC {\n\t\t\thasLayerPulledByTOC = true\n\t\t\tlayerValue = trusted.tocDigest.String()\n\t\t}\n\t\ttocIDInput.WriteString(layerValue)\n\t\ttocIDInput.WriteByte('|') // \"|\" can not be present in a TOC digest, so this is an unambiguous separator.\n\t}\n\n\tif !hasLayerPulledByTOC {\n\t\treturn ordinaryImageID, nil\n\t}\n\ttocImageID := digest.FromString(tocIDInput.String()).Encoded()\n\tlogrus.Debugf(\"Ordinary storage image ID %s; a layer was looked up by TOC, so using image ID %s\", ordinaryImageID, tocImageID)\n\treturn tocImageID, nil\n}\n\n// getConfigBlob exists only to let us retrieve the configuration blob so that the manifest package can dig\n// information out of it for Inspect().\nfunc (s *storageImageDestination) getConfigBlob(info types.BlobInfo) ([]byte, error) {\n\tif info.Digest == \"\" {\n\t\treturn nil, errors.New(`no digest supplied when reading blob`)\n\t}\n\tif err := info.Digest.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid digest supplied when reading blob: %w\", err)\n\t}\n\t// Assume it's a file, since we're only calling this from a place that expects to read files.\n\tif filename, ok := s.lockProtected.filenames[info.Digest]; ok {\n\t\tcontents, err2 := os.ReadFile(filename)\n\t\tif err2 != nil {\n\t\t\treturn nil, fmt.Errorf(`reading blob from file %q: %w`, filename, err2)\n\t\t}\n\t\treturn contents, nil\n\t}\n\t// If it's not a file, it's a bug, because we're not expecting to be asked for a layer.\n\treturn nil, errors.New(\"blob not found\")\n}\n\n// queueOrCommit queues the specified layer to be committed to the storage.\n// If no other goroutine is already committing layers, the layer and all\n// subsequent layers (if already queued) will be committed to the storage.\nfunc (s *storageImageDestination) queueOrCommit(index int, info addedLayerInfo) error {\n\t// NOTE: whenever the code below is touched, make sure that all code\n\t// paths unlock the lock and to unlock it exactly once.\n\t//\n\t// Conceptually, the code is divided in two stages:\n\t//\n\t// 1) Queue in work by marking the layer as ready to be committed.\n\t//    If at least one previous/parent layer with a lower index has\n\t//    not yet been committed, return early.\n\t//\n\t// 2) Process the queued-in work by committing the \"ready\" layers\n\t//    in sequence.  Make sure that more items can be queued-in\n\t//    during the comparatively I/O expensive task of committing a\n\t//    layer.\n\t//\n\t// The conceptual benefit of this design is that caller can continue\n\t// pulling layers after an early return.  At any given time, only one\n\t// caller is the \"worker\" routine committing layers.  All other routines\n\t// can continue pulling and queuing in layers.\n\ts.lock.Lock()\n\ts.lockProtected.indexToAddedLayerInfo[index] = info\n\n\t// We're still waiting for at least one previous/parent layer to be\n\t// committed, so there's nothing to do.\n\tif index != s.lockProtected.currentIndex {\n\t\ts.lock.Unlock()\n\t\treturn nil\n\t}\n\n\tfor {\n\t\tinfo, ok := s.lockProtected.indexToAddedLayerInfo[index]\n\t\tif !ok {\n\t\t\tbreak\n\t\t}\n\t\ts.lock.Unlock()\n\t\t// Note: commitLayer locks on-demand.\n\t\tif stopQueue, err := s.commitLayer(index, info, -1); stopQueue || err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts.lock.Lock()\n\t\tindex++\n\t}\n\n\t// Set the index at the very end to make sure that only one routine\n\t// enters stage 2).\n\ts.lockProtected.currentIndex = index\n\ts.lock.Unlock()\n\treturn nil\n}\n\n// commitLayer commits the specified layer with the given index to the storage.\n// size can usually be -1; it can be provided if the layer is not known to be already present in blobDiffIDs.\n//\n// If the layer cannot be committed yet, the function returns (true, nil).\n//\n// Note that the previous layer is expected to already be committed.\n//\n// Caution: this function must be called without holding `s.lock`.  Callers\n// must guarantee that, at any given time, at most one goroutine may execute\n// `commitLayer()`.\nfunc (s *storageImageDestination) commitLayer(index int, info addedLayerInfo, size int64) (bool, error) {\n\tif _, alreadyCommitted := s.indexToStorageID[index]; alreadyCommitted {\n\t\treturn false, nil\n\t}\n\n\tvar parentLayer string // \"\" if no parent\n\tif index != 0 {\n\t\t// s.indexToStorageID can only be written by this function, and our caller\n\t\t// is responsible for ensuring it can be only be called by *one* goroutine at any\n\t\t// given time. Hence, we don't need to lock accesses.\n\t\tprev, ok := s.indexToStorageID[index-1]\n\t\tif !ok {\n\t\t\treturn false, fmt.Errorf(\"Internal error: commitLayer called with previous layer %d not committed yet\", index-1)\n\t\t}\n\t\tparentLayer = prev\n\t}\n\n\tif info.emptyLayer {\n\t\ts.indexToStorageID[index] = parentLayer\n\t\treturn false, nil\n\t}\n\n\t// Collect trusted parameters of the layer.\n\ts.lock.Lock()\n\ttrusted, ok := s.trustedLayerIdentityDataLocked(index, info.digest)\n\ts.lock.Unlock()\n\tif !ok {\n\t\t// Check if the layer exists already and the caller just (incorrectly) forgot to pass it to us in a PutBlob() / TryReusingBlob() / …\n\t\t//\n\t\t// Use none.NoCache to avoid a repeated DiffID lookup in the BlobInfoCache: a caller\n\t\t// that relies on using a blob digest that has never been seen by the store had better call\n\t\t// TryReusingBlob; not calling PutBlob already violates the documented API, so there’s only\n\t\t// so far we are going to accommodate that (if we should be doing that at all).\n\t\t//\n\t\t// We are also ignoring lookups by TOC, and other non-trivial situations.\n\t\t// Those can only happen using the c/image/internal/private API,\n\t\t// so those internal callers should be fixed to follow the API instead of expanding this fallback.\n\t\tlogrus.Debugf(\"looking for diffID for blob=%+v\", info.digest)\n\n\t\t// Use tryReusingBlobAsPending, not the top-level TryReusingBlobWithOptions, to prevent recursion via queueOrCommit.\n\t\thas, _, err := s.tryReusingBlobAsPending(info.digest, size, &private.TryReusingBlobOptions{\n\t\t\tCache:         none.NoCache,\n\t\t\tCanSubstitute: false,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"checking for a layer based on blob %q: %w\", info.digest.String(), err)\n\t\t}\n\t\tif !has {\n\t\t\treturn false, fmt.Errorf(\"error determining uncompressed digest for blob %q\", info.digest.String())\n\t\t}\n\n\t\ts.lock.Lock()\n\t\ttrusted, ok = s.trustedLayerIdentityDataLocked(index, info.digest)\n\t\ts.lock.Unlock()\n\t\tif !ok {\n\t\t\treturn false, fmt.Errorf(\"we have blob %q, but don't know its layer ID\", info.digest.String())\n\t\t}\n\t}\n\n\t// Ensure that we always see the same “view” of a layer, as identified by the layer’s uncompressed digest,\n\t// unless the user has explicitly opted out of this in storage.conf: see the more detailed explanation in PutBlobPartial.\n\tif trusted.diffID != \"\" {\n\t\tuntrustedDiffID, err := s.untrustedLayerDiffID(index)\n\t\tif err != nil {\n\t\t\tvar diffIDUnknownErr untrustedLayerDiffIDUnknownError\n\t\t\tswitch {\n\t\t\tcase errors.Is(err, errUntrustedLayerDiffIDNotYetAvailable):\n\t\t\t\tlogrus.Debugf(\"Skipping commit for layer %q, manifest not yet available for DiffID check\", index)\n\t\t\t\treturn true, nil\n\t\t\tcase errors.As(err, &diffIDUnknownErr):\n\t\t\t\t// If untrustedLayerDiffIDUnknownError, the input image is schema1, has no TOC annotations,\n\t\t\t\t// so we could not have reused a TOC-identified layer nor have done a TOC-identified partial pull,\n\t\t\t\t// i.e. there is no other “view” to worry about.  Sanity-check that we really see the only expected view.\n\t\t\t\t//\n\t\t\t\t// Or, maybe, the input image is OCI, and has invalid/missing DiffID values in config. In that case\n\t\t\t\t// we _must_ fail if we used a TOC-identified layer - but PutBlobPartial should have already\n\t\t\t\t// refused to do a partial pull, so we are in an inconsistent state.\n\t\t\t\tif trusted.layerIdentifiedByTOC {\n\t\t\t\t\treturn false, fmt.Errorf(\"internal error: layer %d for blob %s was identified by TOC, but we don't have a DiffID in config\",\n\t\t\t\t\t\tindex, trusted.logString())\n\t\t\t\t}\n\t\t\t\t// else a schema1 image or a non-TOC layer with no ambiguity, let it through\n\t\t\tdefault:\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t} else if trusted.diffID != untrustedDiffID {\n\t\t\treturn false, fmt.Errorf(\"layer %d (blob %s) does not match config's DiffID %q\", index, trusted.logString(), untrustedDiffID)\n\t\t}\n\t}\n\n\tid := layerID(parentLayer, trusted)\n\n\tif layer, err2 := s.imageRef.transport.store.Layer(id); layer != nil && err2 == nil {\n\t\t// There's already a layer that should have the right contents, just reuse it.\n\t\ts.indexToStorageID[index] = layer.ID\n\t\treturn false, nil\n\t}\n\n\tlayer, err := s.createNewLayer(index, trusted, parentLayer, id)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif layer == nil {\n\t\treturn true, nil\n\t}\n\ts.indexToStorageID[index] = layer.ID\n\treturn false, nil\n}\n\n// layerID computes a layer (“chain”) ID for (a possibly-empty parentID, trusted)\nfunc layerID(parentID string, trusted trustedLayerIdentityData) string {\n\tvar component string\n\tmustHash := false\n\tif trusted.layerIdentifiedByTOC {\n\t\t// \"@\" is not a valid start of a digest.Digest.Encoded(), so this is unambiguous with the !layerIdentifiedByTOC case.\n\t\t// But we _must_ hash this below to get a Digest.Encoded()-formatted value.\n\t\tcomponent = \"@TOC=\" + trusted.tocDigest.Encoded()\n\t\tmustHash = true\n\t} else {\n\t\tcomponent = trusted.diffID.Encoded() // This looks like chain IDs, and it uses the traditional value.\n\t}\n\n\tif parentID == \"\" && !mustHash {\n\t\treturn component\n\t}\n\treturn digest.Canonical.FromString(parentID + \"+\" + component).Encoded()\n}\n\n// createNewLayer creates a new layer newLayerID for (index, trusted) on top of parentLayer (which may be \"\").\n// If the layer cannot be committed yet, the function returns (nil, nil).\nfunc (s *storageImageDestination) createNewLayer(index int, trusted trustedLayerIdentityData, parentLayer, newLayerID string) (*storage.Layer, error) {\n\ts.lock.Lock()\n\tdiffOutput, ok := s.lockProtected.diffOutputs[index]\n\ts.lock.Unlock()\n\tif ok {\n\t\t// Typically, we compute a trusted DiffID value to authenticate the layer contents, see the detailed explanation\n\t\t// in PutBlobPartial.  If the user has opted out of that, but we know a trusted DiffID value\n\t\t// (e.g. from a BlobInfoCache), set it in diffOutput.\n\t\t// That way it will be persisted in storage even if the cache is deleted; also\n\t\t// we can use the value below to avoid the untrustedUncompressedDigest logic.\n\t\tif diffOutput.UncompressedDigest == \"\" && trusted.diffID != \"\" {\n\t\t\tdiffOutput.UncompressedDigest = trusted.diffID\n\t\t}\n\n\t\tvar untrustedUncompressedDigest digest.Digest\n\t\tif diffOutput.UncompressedDigest == \"\" {\n\t\t\td, err := s.untrustedLayerDiffID(index)\n\t\t\tif err != nil {\n\t\t\t\tvar diffIDUnknownErr untrustedLayerDiffIDUnknownError\n\t\t\t\tswitch {\n\t\t\t\tcase errors.Is(err, errUntrustedLayerDiffIDNotYetAvailable):\n\t\t\t\t\tlogrus.Debugf(\"Skipping commit for layer %q, manifest not yet available\", newLayerID)\n\t\t\t\t\treturn nil, nil\n\t\t\t\tcase errors.As(err, &diffIDUnknownErr):\n\t\t\t\t\t// If untrustedLayerDiffIDUnknownError, the input image is schema1, has no TOC annotations,\n\t\t\t\t\t// so we should have !trusted.layerIdentifiedByTOC, i.e. we should have set\n\t\t\t\t\t// diffOutput.UncompressedDigest above in this function, at the very latest.\n\t\t\t\t\t//\n\t\t\t\t\t// Or, maybe, the input image is OCI, and has invalid/missing DiffID values in config. In that case\n\t\t\t\t\t// commitLayer should have already refused this image when dealing with the “view” ambiguity.\n\t\t\t\t\treturn nil, fmt.Errorf(\"internal error: layer %d for blob %s was partially-pulled with unknown UncompressedDigest, but we don't have a DiffID in config\",\n\t\t\t\t\t\tindex, trusted.logString())\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tuntrustedUncompressedDigest = d\n\t\t\t// While the contents of the digest are untrusted, make sure at least the _format_ is valid,\n\t\t\t// because we are going to write it to durable storage in expectedLayerDiffIDFlag .\n\t\t\tif err := untrustedUncompressedDigest.Validate(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tflags := make(map[string]any)\n\t\tif untrustedUncompressedDigest != \"\" {\n\t\t\tflags[expectedLayerDiffIDFlag] = untrustedUncompressedDigest.String()\n\t\t\tlogrus.Debugf(\"Setting uncompressed digest to %q for layer %q\", untrustedUncompressedDigest, newLayerID)\n\t\t}\n\n\t\targs := storage.ApplyStagedLayerOptions{\n\t\t\tID:          newLayerID,\n\t\t\tParentLayer: parentLayer,\n\n\t\t\tDiffOutput: diffOutput,\n\t\t\tDiffOptions: &graphdriver.ApplyDiffWithDifferOpts{\n\t\t\t\tFlags: flags,\n\t\t\t},\n\t\t}\n\t\tlayer, err := s.imageRef.transport.store.ApplyStagedLayer(args)\n\t\tif err != nil && !errors.Is(err, storage.ErrDuplicateID) {\n\t\t\treturn nil, fmt.Errorf(\"failed to put layer using a partial pull: %w\", err)\n\t\t}\n\t\treturn layer, nil\n\t}\n\n\ts.lock.Lock()\n\tal, ok := s.lockProtected.indexToAdditionalLayer[index]\n\ts.lock.Unlock()\n\tif ok {\n\t\tlayer, err := al.PutAs(newLayerID, parentLayer, nil)\n\t\tif err != nil && !errors.Is(err, storage.ErrDuplicateID) {\n\t\t\treturn nil, fmt.Errorf(\"failed to put layer from digest and labels: %w\", err)\n\t\t}\n\t\treturn layer, nil\n\t}\n\n\t// Check if we previously cached a file with that blob's contents.  If we didn't,\n\t// then we need to read the desired contents from a layer.\n\tvar filename string\n\tvar gotFilename bool\n\tif trusted.blobDigest != \"\" {\n\t\ts.lock.Lock()\n\t\tfilename, gotFilename = s.lockProtected.filenames[trusted.blobDigest]\n\t\ts.lock.Unlock()\n\t}\n\tvar trustedOriginalDigest digest.Digest // For storage.LayerOptions\n\tvar trustedOriginalSize *int64\n\tif gotFilename {\n\t\t// The code setting .filenames[trusted.blobDigest] is responsible for ensuring that the file contents match trusted.blobDigest.\n\t\ttrustedOriginalDigest = trusted.blobDigest\n\t\ttrustedOriginalSize = nil // It’s s.lockProtected.fileSizes[trusted.blobDigest], but we don’t hold the lock now, and the consumer can compute it at trivial cost.\n\t} else {\n\t\t// Try to find the layer with contents matching the data we use.\n\t\tvar layer *storage.Layer // = nil\n\t\tif trusted.diffID != \"\" {\n\t\t\tif layers, err2 := s.imageRef.transport.store.LayersByUncompressedDigest(trusted.diffID); err2 == nil && len(layers) > 0 {\n\t\t\t\tlayer = &layers[0]\n\t\t\t}\n\t\t}\n\t\tif layer == nil && trusted.tocDigest != \"\" {\n\t\t\tif layers, err2 := s.imageRef.transport.store.LayersByTOCDigest(trusted.tocDigest); err2 == nil && len(layers) > 0 {\n\t\t\t\tlayer = &layers[0]\n\t\t\t}\n\t\t}\n\t\tif layer == nil && trusted.blobDigest != \"\" {\n\t\t\tif layers, err2 := s.imageRef.transport.store.LayersByCompressedDigest(trusted.blobDigest); err2 == nil && len(layers) > 0 {\n\t\t\t\tlayer = &layers[0]\n\t\t\t}\n\t\t}\n\t\tif layer == nil {\n\t\t\treturn nil, fmt.Errorf(\"layer for blob %s not found\", trusted.logString())\n\t\t}\n\n\t\t// Read the layer's contents.\n\t\tnoCompression := archive.Uncompressed\n\t\tdiffOptions := &storage.DiffOptions{\n\t\t\tCompression: &noCompression,\n\t\t}\n\t\tdiff, err2 := s.imageRef.transport.store.Diff(\"\", layer.ID, diffOptions)\n\t\tif err2 != nil {\n\t\t\treturn nil, fmt.Errorf(\"reading layer %q for blob %s: %w\", layer.ID, trusted.logString(), err2)\n\t\t}\n\t\t// Copy the layer diff to a file.  Diff() takes a lock that it holds\n\t\t// until the ReadCloser that it returns is closed, and PutLayer() wants\n\t\t// the same lock, so the diff can't just be directly streamed from one\n\t\t// to the other.\n\t\tfilename = s.computeNextBlobCacheFile()\n\t\tfile, err := os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY|os.O_EXCL, 0o600)\n\t\tif err != nil {\n\t\t\tdiff.Close()\n\t\t\treturn nil, fmt.Errorf(\"creating temporary file %q: %w\", filename, err)\n\t\t}\n\t\t// Copy the data to the file.\n\t\t// TODO: This can take quite some time, and should ideally be cancellable using\n\t\t// ctx.Done().\n\t\tfileSize, err := io.Copy(file, diff)\n\t\tdiff.Close()\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"storing blob to file %q: %w\", filename, err)\n\t\t}\n\n\t\tif trusted.diffID == \"\" && layer.UncompressedDigest != \"\" {\n\t\t\ttrusted.diffID = layer.UncompressedDigest // This data might have been unavailable in tryReusingBlobAsPending, and is only known now.\n\t\t}\n\n\t\t// Set the layer’s CompressedDigest/CompressedSize to relevant values if known, to allow more layer reuse.\n\t\t// But we don’t want to just use the size from the manifest if we never saw the compressed blob,\n\t\t// so that we don’t propagate mistakes / attacks.\n\t\t//\n\t\t// s.lockProtected.fileSizes[trusted.blobDigest] is not set, otherwise we would have found gotFilename.\n\t\t// So, check if the layer we found contains that metadata. (If that layer continues to exist, there’s no benefit\n\t\t// to us propagating the metadata; but that layer could be removed, and in that case propagating the metadata to\n\t\t// this new layer copy can help.)\n\t\tif trusted.blobDigest != \"\" && layer.CompressedDigest == trusted.blobDigest && layer.CompressedSize > 0 {\n\t\t\ttrustedOriginalDigest = trusted.blobDigest\n\t\t\tsizeCopy := layer.CompressedSize\n\t\t\ttrustedOriginalSize = &sizeCopy\n\t\t} else {\n\t\t\t// The stream we have is uncompressed, and it matches trusted.diffID (if known).\n\t\t\t//\n\t\t\t// We can legitimately set storage.LayerOptions.OriginalDigest to \"\",\n\t\t\t// but that would just result in PutLayer computing the digest of the input stream == trusted.diffID.\n\t\t\t// So, instead, set .OriginalDigest to the value we know already, to avoid that digest computation.\n\t\t\ttrustedOriginalDigest = trusted.diffID\n\t\t\ttrustedOriginalSize = nil // Probably layer.UncompressedSize, but the consumer can compute it at trivial cost.\n\t\t}\n\n\t\t// Allow using the already-collected layer contents without extracting the layer again.\n\t\t//\n\t\t// This only matches against the uncompressed digest.\n\t\t// If we have trustedOriginalDigest == trusted.blobDigest, we could arrange to reuse the\n\t\t// same uncompressed stream for future calls of createNewLayer; but for the non-layer blobs (primarily the config),\n\t\t// we assume that the file at filenames[someDigest] matches someDigest _exactly_; we would need to differentiate\n\t\t// between “original files” and “possibly uncompressed files”.\n\t\t// Within-image layer reuse is probably very rare, for now we prefer to avoid that complexity.\n\t\tif trusted.diffID != \"\" {\n\t\t\ts.lock.Lock()\n\t\t\ts.lockProtected.blobDiffIDs[trusted.diffID] = trusted.diffID\n\t\t\ts.lockProtected.filenames[trusted.diffID] = filename\n\t\t\ts.lockProtected.fileSizes[trusted.diffID] = fileSize\n\t\t\ts.lock.Unlock()\n\t\t}\n\t}\n\t// Read the cached blob and use it as a diff.\n\tfile, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"opening file %q: %w\", filename, err)\n\t}\n\tdefer file.Close()\n\t// Build the new layer using the diff, regardless of where it came from.\n\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\tlayer, _, err := s.imageRef.transport.store.PutLayer(newLayerID, parentLayer, nil, \"\", false, &storage.LayerOptions{\n\t\tOriginalDigest: trustedOriginalDigest,\n\t\tOriginalSize:   trustedOriginalSize, // nil in many cases\n\t\t// This might be \"\" if trusted.layerIdentifiedByTOC; in that case PutLayer will compute the value from the stream.\n\t\tUncompressedDigest: trusted.diffID,\n\t}, file)\n\tif err != nil && !errors.Is(err, storage.ErrDuplicateID) {\n\t\treturn nil, fmt.Errorf(\"adding layer with blob %s: %w\", trusted.logString(), err)\n\t}\n\treturn layer, nil\n}\n\n// uncommittedImageSource allows accessing an image’s metadata (not layers) before it has been committed,\n// to allow using image.FromUnparsedImage.\ntype uncommittedImageSource struct {\n\tsrcImpl.Compat\n\tsrcImpl.PropertyMethodsInitialize\n\tsrcImpl.NoSignatures\n\tsrcImpl.DoesNotAffectLayerInfosForCopy\n\tsrcStubs.NoGetBlobAtInitialize\n\n\td *storageImageDestination\n}\n\nfunc newUncommittedImageSource(d *storageImageDestination) *uncommittedImageSource {\n\ts := &uncommittedImageSource{\n\t\tPropertyMethodsInitialize: srcImpl.PropertyMethods(srcImpl.Properties{\n\t\t\tHasThreadSafeGetBlob: true,\n\t\t}),\n\t\tNoGetBlobAtInitialize: srcStubs.NoGetBlobAt(d.Reference()),\n\n\t\td: d,\n\t}\n\ts.Compat = srcImpl.AddCompat(s)\n\treturn s\n}\n\nfunc (u *uncommittedImageSource) Reference() types.ImageReference {\n\treturn u.d.Reference()\n}\n\nfunc (u *uncommittedImageSource) Close() error {\n\treturn nil\n}\n\nfunc (u *uncommittedImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\treturn u.d.manifest, u.d.manifestMIMEType, nil\n}\n\nfunc (u *uncommittedImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tblob, err := u.d.getConfigBlob(info)\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\treturn io.NopCloser(bytes.NewReader(blob)), int64(len(blob)), nil\n}\n\n// errUntrustedLayerDiffIDNotYetAvailable is returned by untrustedLayerDiffID\n// if the value is not yet available (but it can be available after s.manifests is set).\n// This should only happen for external callers of the transport, not for c/image/copy.\n//\n// Callers of untrustedLayerDiffID before PutManifest must handle this error specially;\n// callers after PutManifest can use the default, reporting an internal error.\nvar errUntrustedLayerDiffIDNotYetAvailable = errors.New(\"internal error: untrustedLayerDiffID has no value available and fallback was not implemented\")\n\n// untrustedLayerDiffIDUnknownError is returned by untrustedLayerDiffID\n// if the image’s format does not provide DiffIDs.\ntype untrustedLayerDiffIDUnknownError struct {\n\tlayerIndex int\n}\n\nfunc (e untrustedLayerDiffIDUnknownError) Error() string {\n\treturn fmt.Sprintf(\"DiffID value for layer %d is unknown or explicitly empty\", e.layerIndex)\n}\n\n// untrustedLayerDiffID returns a DiffID value for layerIndex from the image’s config.\n// It may return two special errors, errUntrustedLayerDiffIDNotYetAvailable or untrustedLayerDiffIDUnknownError.\n//\n// WARNING: This function does not even validate that the returned digest has a valid format.\n// WARNING: We don’t _always_ validate this DiffID value against the layer contents; it must not be used for any deduplication.\nfunc (s *storageImageDestination) untrustedLayerDiffID(layerIndex int) (digest.Digest, error) {\n\t// At this point, we are either inside the multi-threaded scope of HasThreadSafePutBlob,\n\t// nothing is writing to s.manifest yet, and s.untrustedDiffIDValues might have been set\n\t// by NoteOriginalOCIConfig and are not being updated any more;\n\t// or PutManifest has been called and s.manifest != nil.\n\t// Either way this function does not need the protection of s.lock.\n\n\tif s.untrustedDiffIDValues == nil {\n\t\t// Typically, we expect untrustedDiffIDValues to be set by the generic copy code\n\t\t// via NoteOriginalOCIConfig; this is a compatibility fallback for external callers\n\t\t// of the public types.ImageDestination.\n\t\tif s.manifest == nil {\n\t\t\treturn \"\", errUntrustedLayerDiffIDNotYetAvailable\n\t\t}\n\n\t\tctx := context.Background() // This is all happening in memory, no need to worry about cancellation.\n\t\tunparsed := image.UnparsedInstance(newUncommittedImageSource(s), nil)\n\t\tsourced, err := image.FromUnparsedImage(ctx, nil, unparsed)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"parsing image to be committed: %w\", err)\n\t\t}\n\t\tconfigOCI, err := sourced.OCIConfig(ctx)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"obtaining config of image to be committed: %w\", err)\n\t\t}\n\n\t\ts.setUntrustedDiffIDValuesFromOCIConfig(configOCI)\n\t}\n\n\t// Let entirely empty / missing diffIDs through; but if the array does exist, expect it to contain an entry for every layer,\n\t// and fail hard on missing entries. This tries to account for completely naive image producers who just don’t fill DiffID,\n\t// while still detecting incorrectly-built / confused images.\n\t//\n\t// schema1 images don’t have DiffID values in the config.\n\t// Our schema1.OCIConfig code produces non-empty DiffID arrays of empty values, so treat arrays of all-empty\n\t// values as “DiffID unknown”.\n\t// For schema 1, it is important to exit here, before the layerIndex >= len(s.untrustedDiffIDValues)\n\t// check, because the format conversion from schema1 to OCI used to compute untrustedDiffIDValues\n\t// changes the number of layres (drops items with Schema1V1Compatibility.ThrowAway).\n\tif !slices.ContainsFunc(s.untrustedDiffIDValues, func(d digest.Digest) bool {\n\t\treturn d != \"\"\n\t}) {\n\t\treturn \"\", untrustedLayerDiffIDUnknownError{\n\t\t\tlayerIndex: layerIndex,\n\t\t}\n\t}\n\tif layerIndex >= len(s.untrustedDiffIDValues) {\n\t\treturn \"\", fmt.Errorf(\"image config has only %d DiffID values, but a layer with index %d exists\", len(s.untrustedDiffIDValues), layerIndex)\n\t}\n\treturn s.untrustedDiffIDValues[layerIndex], nil\n}\n\n// setUntrustedDiffIDValuesFromOCIConfig updates s.untrustedDiffIDvalues from config.\n// The caller must ensure s.lock does not need to be held.\nfunc (s *storageImageDestination) setUntrustedDiffIDValuesFromOCIConfig(config *imgspecv1.Image) {\n\ts.untrustedDiffIDValues = slices.Clone(config.RootFS.DiffIDs)\n\tif s.untrustedDiffIDValues == nil { // Unlikely but possible in theory…\n\t\ts.untrustedDiffIDValues = []digest.Digest{}\n\t}\n}\n\n// CommitWithOptions marks the process of storing the image as successful and asks for the image to be persisted.\n// WARNING: This does not have any transactional semantics:\n// - Uploaded data MAY be visible to others before CommitWithOptions() is called\n// - Uploaded data MAY be removed or MAY remain around if Close() is called without CommitWithOptions() (i.e. rollback is allowed but not guaranteed)\nfunc (s *storageImageDestination) CommitWithOptions(ctx context.Context, options private.CommitOptions) error {\n\t// This function is outside of the scope of HasThreadSafePutBlob, so we don’t need to hold s.lock.\n\n\tif s.manifest == nil {\n\t\treturn errors.New(\"Internal error: storageImageDestination.CommitWithOptions() called without PutManifest()\")\n\t}\n\ttoplevelManifest, _, err := options.UnparsedToplevel.Manifest(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"retrieving top-level manifest: %w\", err)\n\t}\n\t// If the name we're saving to includes a digest, then check that the\n\t// manifests that we're about to save all either match the one from the\n\t// options.UnparsedToplevel, or match the digest in the name that we're using.\n\tif s.imageRef.named != nil {\n\t\tif digested, ok := s.imageRef.named.(reference.Digested); ok {\n\t\t\tmatches, err := manifest.MatchesDigest(s.manifest, digested.Digest())\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\tmatches, err = manifest.MatchesDigest(toplevelManifest, digested.Digest())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !matches {\n\t\t\t\treturn fmt.Errorf(\"Manifest to be saved does not match expected digest %s\", digested.Digest())\n\t\t\t}\n\t\t}\n\t}\n\t// Find the list of layer blobs.\n\tman, err := manifest.FromBlob(s.manifest, s.manifestMIMEType)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"parsing manifest: %w\", err)\n\t}\n\tlayerBlobs := man.LayerInfos()\n\n\t// Extract, commit, or find the layers.\n\tfor i, blob := range layerBlobs {\n\t\tif stopQueue, err := s.commitLayer(i, addedLayerInfo{\n\t\t\tdigest:     blob.Digest,\n\t\t\temptyLayer: blob.EmptyLayer,\n\t\t}, blob.Size); err != nil {\n\t\t\treturn err\n\t\t} else if stopQueue {\n\t\t\treturn fmt.Errorf(\"Internal error: storageImageDestination.CommitWithOptions(): commitLayer() not ready to commit for layer %q\", blob.Digest)\n\t\t}\n\t}\n\tvar lastLayer string\n\tif len(layerBlobs) > 0 { // Zero-layer images rarely make sense, but it is technically possible, and may happen for non-image artifacts.\n\t\tprev, ok := s.indexToStorageID[len(layerBlobs)-1]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"Internal error: storageImageDestination.CommitWithOptions(): previous layer %d hasn't been committed (lastLayer == nil)\", len(layerBlobs)-1)\n\t\t}\n\t\tlastLayer = prev\n\t}\n\n\t// If one of those blobs was a configuration blob, then we can try to dig out the date when the image\n\t// was originally created, in case we're just copying it.  If not, no harm done.\n\timgOptions := &storage.ImageOptions{}\n\tif inspect, err := man.Inspect(s.getConfigBlob); err == nil && inspect.Created != nil {\n\t\tlogrus.Debugf(\"setting image creation date to %s\", inspect.Created)\n\t\timgOptions.CreationDate = *inspect.Created\n\t}\n\n\t// Set up to save the config as a data item.  Since we only share layers, the config should be in a file.\n\tif s.lockProtected.configDigest != \"\" {\n\t\tv, err := os.ReadFile(s.lockProtected.filenames[s.lockProtected.configDigest])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"copying config blob %q to image: %w\", s.lockProtected.configDigest, err)\n\t\t}\n\t\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\t\tKey:    s.lockProtected.configDigest.String(),\n\t\t\tData:   v,\n\t\t\tDigest: digest.Canonical.FromBytes(v),\n\t\t})\n\t}\n\t// Set up to save the options.UnparsedToplevel's manifest if it differs from\n\t// the per-platform one, which is saved below.\n\tif !bytes.Equal(toplevelManifest, s.manifest) {\n\t\tmanifestDigest, err := manifest.Digest(toplevelManifest)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"digesting top-level manifest: %w\", err)\n\t\t}\n\t\tkey, err := manifestBigDataKey(manifestDigest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\t\tKey:    key,\n\t\t\tData:   toplevelManifest,\n\t\t\tDigest: manifestDigest,\n\t\t})\n\t}\n\t// Set up to save the image's manifest.  Allow looking it up by digest by using the key convention defined by the Store.\n\t// Record the manifest twice: using a digest-specific key to allow references to that specific digest instance,\n\t// and using storage.ImageDigestBigDataKey for future users that don’t specify any digest and for compatibility with older readers.\n\tkey, err := manifestBigDataKey(s.manifestDigest)\n\tif err != nil {\n\t\treturn err\n\t}\n\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\tKey:    key,\n\t\tData:   s.manifest,\n\t\tDigest: s.manifestDigest,\n\t})\n\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\tKey:    storage.ImageDigestBigDataKey,\n\t\tData:   s.manifest,\n\t\tDigest: s.manifestDigest,\n\t})\n\t// Set up to save the signatures, if we have any.\n\tif len(s.signatures) > 0 {\n\t\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\t\tKey:    \"signatures\",\n\t\t\tData:   s.signatures,\n\t\t\tDigest: digest.Canonical.FromBytes(s.signatures),\n\t\t})\n\t}\n\tfor instanceDigest, signatures := range s.signatureses {\n\t\tkey, err := signatureBigDataKey(instanceDigest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timgOptions.BigData = append(imgOptions.BigData, storage.ImageBigDataOption{\n\t\t\tKey:    key,\n\t\t\tData:   signatures,\n\t\t\tDigest: digest.Canonical.FromBytes(signatures),\n\t\t})\n\t}\n\n\t// Set up to save our metadata.\n\tmetadata, err := json.Marshal(s.metadata)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"encoding metadata for image: %w\", err)\n\t}\n\tif len(metadata) != 0 {\n\t\timgOptions.Metadata = string(metadata)\n\t}\n\n\t// Create the image record, pointing to the most-recently added layer.\n\tintendedID := s.imageRef.id\n\tif intendedID == \"\" {\n\t\tintendedID, err = s.computeID(man)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\toldNames := []string{}\n\timg, err := s.imageRef.transport.store.CreateImage(intendedID, nil, lastLayer, \"\", imgOptions)\n\tif err != nil {\n\t\tif !errors.Is(err, storage.ErrDuplicateID) {\n\t\t\tlogrus.Debugf(\"error creating image: %q\", err)\n\t\t\treturn fmt.Errorf(\"creating image %q: %w\", intendedID, err)\n\t\t}\n\t\timg, err = s.imageRef.transport.store.Image(intendedID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"reading image %q: %w\", intendedID, err)\n\t\t}\n\t\tif img.TopLayer != lastLayer {\n\t\t\tlogrus.Debugf(\"error creating image: image with ID %q exists, but uses different layers\", intendedID)\n\t\t\treturn fmt.Errorf(\"image with ID %q already exists, but uses a different top layer: %w\", intendedID, storage.ErrDuplicateID)\n\t\t}\n\t\tlogrus.Debugf(\"reusing image ID %q\", img.ID)\n\t\toldNames = append(oldNames, img.Names...)\n\t\t// set the data items and metadata on the already-present image\n\t\t// FIXME: this _replaces_ any \"signatures\" blobs and their\n\t\t// sizes (tracked in the metadata) which might have already\n\t\t// been present with new values, when ideally we'd find a way\n\t\t// to merge them since they all apply to the same image\n\t\tfor _, data := range imgOptions.BigData {\n\t\t\tif err := s.imageRef.transport.store.SetImageBigData(img.ID, data.Key, data.Data, manifest.Digest); err != nil {\n\t\t\t\tlogrus.Debugf(\"error saving big data %q for image %q: %v\", data.Key, img.ID, err)\n\t\t\t\treturn fmt.Errorf(\"saving big data %q for image %q: %w\", data.Key, img.ID, err)\n\t\t\t}\n\t\t}\n\t\tif imgOptions.Metadata != \"\" {\n\t\t\tif err := s.imageRef.transport.store.SetMetadata(img.ID, imgOptions.Metadata); err != nil {\n\t\t\t\tlogrus.Debugf(\"error saving metadata for image %q: %v\", img.ID, err)\n\t\t\t\treturn fmt.Errorf(\"saving metadata for image %q: %w\", img.ID, err)\n\t\t\t}\n\t\t\tlogrus.Debugf(\"saved image metadata %q\", imgOptions.Metadata)\n\t\t}\n\t} else {\n\t\tlogrus.Debugf(\"created new image ID %q with metadata %q\", img.ID, imgOptions.Metadata)\n\t}\n\n\t// Clean up the unfinished image on any error.\n\t// (Is this the right thing to do if the image has existed before?)\n\tcommitSucceeded := false\n\tdefer func() {\n\t\tif !commitSucceeded {\n\t\t\tlogrus.Errorf(\"Updating image %q (old names %v) failed, deleting it\", img.ID, oldNames)\n\t\t\tif _, err := s.imageRef.transport.store.DeleteImage(img.ID, true); err != nil {\n\t\t\t\tlogrus.Errorf(\"Error deleting incomplete image %q: %v\", img.ID, err)\n\t\t\t}\n\t\t}\n\t}()\n\n\t// Add the reference's name on the image.  We don't need to worry about avoiding duplicate\n\t// values because AddNames() will deduplicate the list that we pass to it.\n\tif name := s.imageRef.DockerReference(); name != nil {\n\t\tif err := s.imageRef.transport.store.AddNames(img.ID, []string{name.String()}); err != nil {\n\t\t\treturn fmt.Errorf(\"adding names %v to image %q: %w\", name, img.ID, err)\n\t\t}\n\t\tlogrus.Debugf(\"added name %q to image %q\", name, img.ID)\n\t}\n\tif options.ReportResolvedReference != nil {\n\t\t// FIXME? This is using nil for the named reference.\n\t\t// It would be better to also  use s.imageRef.named, because that allows us to resolve to the right\n\t\t// digest / manifest (and corresponding signatures).\n\t\t// The problem with that is that resolving such a reference fails if the s.imageRef.named name is moved to a different image\n\t\t// (because it is a tag that moved, or because we have pulled “the same” image for a different architecture).\n\t\t// Right now (2024-11), ReportResolvedReference is only used in c/common/libimage, where the caller only extracts the image ID,\n\t\t// so the name does not matter; to give us options, copy.Options.ReportResolvedReference is explicitly refusing to document\n\t\t// whether the value contains a name.\n\t\tresolved, err := newReference(s.imageRef.transport, nil, intendedID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating a resolved reference for (%s, %s): %w\", s.imageRef.StringWithinTransport(), intendedID, err)\n\t\t}\n\t\t*options.ReportResolvedReference = resolved\n\t}\n\n\tcommitSucceeded = true\n\treturn nil\n}\n\n// PutManifest writes the manifest to the destination.\nfunc (s *storageImageDestination) PutManifest(ctx context.Context, manifestBlob []byte, instanceDigest *digest.Digest) error {\n\tdigest, err := manifest.Digest(manifestBlob)\n\tif err != nil {\n\t\treturn err\n\t}\n\ts.manifest = bytes.Clone(manifestBlob)\n\tif s.manifest == nil { // Make sure PutManifest can never succeed with s.manifest == nil\n\t\ts.manifest = []byte{}\n\t}\n\ts.manifestMIMEType = manifest.GuessMIMEType(s.manifest)\n\ts.manifestDigest = digest\n\treturn nil\n}\n\n// PutSignaturesWithFormat writes a set of signatures to the destination.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n// MUST be called after PutManifest (signatures may reference manifest contents).\nfunc (s *storageImageDestination) PutSignaturesWithFormat(ctx context.Context, signatures []signature.Signature, instanceDigest *digest.Digest) error {\n\tsizes := []int{}\n\tsigblob := []byte{}\n\tfor _, sigWithFormat := range signatures {\n\t\tsig, err := signature.Blob(sigWithFormat)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsizes = append(sizes, len(sig))\n\t\tsigblob = append(sigblob, sig...)\n\t}\n\tif instanceDigest == nil {\n\t\ts.signatures = sigblob\n\t\ts.metadata.SignatureSizes = sizes\n\t\tif s.manifest != nil {\n\t\t\tmanifestDigest := s.manifestDigest\n\t\t\tinstanceDigest = &manifestDigest\n\t\t}\n\t}\n\tif instanceDigest != nil {\n\t\ts.signatureses[*instanceDigest] = sigblob\n\t\ts.metadata.SignaturesSizes[*instanceDigest] = sizes\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/storage/storage_image.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage storage\n\nimport (\n\t\"context\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage\"\n)\n\n// ErrNoSuchImage is returned when we attempt to access an image which\n// doesn't exist in the storage area.\nvar ErrNoSuchImage = storage.ErrNotAnImage\n\n// manifestBigDataKey returns a key suitable for recording a manifest with the specified digest using storage.Store.ImageBigData and related functions.\n// If a specific manifest digest is explicitly requested by the user, the key returned by this function should be used preferably;\n// for compatibility, if a manifest is not available under this key, check also storage.ImageDigestBigDataKey\nfunc manifestBigDataKey(digest digest.Digest) (string, error) {\n\tif err := digest.Validate(); err != nil { // Make sure info.Digest.String() uses the expected format and does not collide with other BigData keys.\n\t\treturn \"\", err\n\t}\n\treturn storage.ImageDigestManifestBigDataNamePrefix + \"-\" + digest.String(), nil\n}\n\n// signatureBigDataKey returns a key suitable for recording the signatures associated with the manifest with the specified digest using storage.Store.ImageBigData and related functions.\n// If a specific manifest digest is explicitly requested by the user, the key returned by this function should be used preferably;\nfunc signatureBigDataKey(digest digest.Digest) (string, error) {\n\tif err := digest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, so validate explicitly.\n\t\treturn \"\", err\n\t}\n\treturn \"signature-\" + digest.Encoded(), nil\n}\n\n// storageImageMetadata is stored, as JSON, in storage.Image.Metadata\ntype storageImageMetadata struct {\n\tSignatureSizes  []int                   `json:\"signature-sizes,omitempty\"`  // List of sizes of each signature slice\n\tSignaturesSizes map[digest.Digest][]int `json:\"signatures-sizes,omitempty\"` // Sizes of each manifest's signature slice\n}\n\ntype storageImageCloser struct {\n\ttypes.ImageCloser\n\tsize int64\n}\n\n// Size() returns the previously-computed size of the image, with no error.\nfunc (s *storageImageCloser) Size() (int64, error) {\n\treturn s.size, nil\n}\n\n// newImage creates an image that also knows its size\nfunc newImage(ctx context.Context, sys *types.SystemContext, s storageReference) (types.ImageCloser, error) {\n\tsrc, err := newImageSource(sys, s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\timg, err := image.FromSource(ctx, sys, src)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsize, err := src.getSize()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &storageImageCloser{ImageCloser: img, size: size}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/storage/storage_reference.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage storage\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage\"\n)\n\n// A storageReference holds an arbitrary name and/or an ID, which is a 32-byte\n// value hex-encoded into a 64-character string, and a reference to a Store\n// where an image is, or would be, kept.\n// Either \"named\" or \"id\" must be set.\ntype storageReference struct {\n\ttransport storageTransport\n\tnamed     reference.Named // may include a tag and/or a digest\n\tid        string\n}\n\nfunc newReference(transport storageTransport, named reference.Named, id string) (*storageReference, error) {\n\tif named == nil && id == \"\" {\n\t\treturn nil, ErrInvalidReference\n\t}\n\tif named != nil && reference.IsNameOnly(named) {\n\t\treturn nil, fmt.Errorf(\"reference %s has neither a tag nor a digest: %w\", named.String(), ErrInvalidReference)\n\t}\n\tif id != \"\" {\n\t\tif err := validateImageID(id); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid ID value %q: %v: %w\", id, err.Error(), ErrInvalidReference)\n\t\t}\n\t}\n\t// We take a copy of the transport, which contains a pointer to the\n\t// store that it used for resolving this reference, so that the\n\t// transport that we'll return from Transport() won't be affected by\n\t// further calls to the original transport's SetStore() method.\n\treturn &storageReference{\n\t\ttransport: transport,\n\t\tnamed:     named,\n\t\tid:        id,\n\t}, nil\n}\n\n// imageMatchesRepo returns true iff image.Names contains an element with the same repo as ref\nfunc imageMatchesRepo(image *storage.Image, ref reference.Named) bool {\n\trepo := ref.Name()\n\treturn slices.ContainsFunc(image.Names, func(name string) bool {\n\t\tif named, err := reference.ParseNormalizedNamed(name); err == nil && named.Name() == repo {\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t})\n}\n\n// multiArchImageMatchesSystemContext returns true if the passed-in image both contains a\n// multi-arch manifest that matches the passed-in digest, and the image is the per-platform\n// image instance that matches sys.\n//\n// See the comment in storageReference.ResolveImage explaining why\n// this check is necessary.\nfunc multiArchImageMatchesSystemContext(store storage.Store, img *storage.Image, manifestDigest digest.Digest, sys *types.SystemContext) bool {\n\t// Load the manifest that matches the specified digest.\n\t// We don't need to care about storage.ImageDigestBigDataKey because\n\t// manifests lists are only stored into storage by c/image versions\n\t// that know about manifestBigDataKey, and only using that key.\n\tkey, err := manifestBigDataKey(manifestDigest)\n\tif err != nil {\n\t\treturn false // This should never happen, manifestDigest comes from a reference.Digested, and that validates the format.\n\t}\n\tmanifestBytes, err := store.ImageBigData(img.ID, key)\n\tif err != nil {\n\t\treturn false\n\t}\n\t// The manifest is either a list, or not a list.  If it's a list, find\n\t// the digest of the instance that matches the current system, and try\n\t// to load that manifest from the image record, and use it.\n\tmanifestType := manifest.GuessMIMEType(manifestBytes)\n\tif !manifest.MIMETypeIsMultiImage(manifestType) {\n\t\t// manifestDigest directly specifies a per-platform image, so we aren't\n\t\t// choosing among different variants.\n\t\treturn false\n\t}\n\tlist, err := manifest.ListFromBlob(manifestBytes, manifestType)\n\tif err != nil {\n\t\treturn false\n\t}\n\tchosenInstance, err := list.ChooseInstance(sys)\n\tif err != nil {\n\t\treturn false\n\t}\n\tkey, err = manifestBigDataKey(chosenInstance)\n\tif err != nil {\n\t\treturn false\n\t}\n\t_, err = store.ImageBigData(img.ID, key)\n\treturn err == nil // true if img.ID is based on chosenInstance.\n}\n\n// Resolve the reference's name to an image ID in the store, if there's already\n// one present with the same name or ID, and return the image.\n//\n// Returns an error matching ErrNoSuchImage if an image matching ref was not found.\nfunc (s *storageReference) resolveImage(sys *types.SystemContext) (*storage.Image, error) {\n\tvar loadedImage *storage.Image\n\tif s.id == \"\" && s.named != nil {\n\t\t// Look for an image that has the expanded reference name as an explicit Name value.\n\t\timage, err := s.transport.store.Image(s.named.String())\n\t\tif image != nil && err == nil {\n\t\t\tloadedImage = image\n\t\t\ts.id = image.ID\n\t\t}\n\t}\n\tif s.id == \"\" && s.named != nil {\n\t\tif digested, ok := s.named.(reference.Digested); ok {\n\t\t\t// Look for an image with the specified digest that has the same name,\n\t\t\t// though possibly with a different tag or digest, as a Name value, so\n\t\t\t// that the canonical reference can be implicitly resolved to the image.\n\t\t\t//\n\t\t\t// Typically there should be at most one such image, because the same\n\t\t\t// manifest digest implies the same config, and we choose the storage ID\n\t\t\t// based on the config (deduplicating images), except:\n\t\t\t// - the user can explicitly specify an ID when creating the image.\n\t\t\t//   In this case we don't have a preference among the alternatives.\n\t\t\t// - when pulling an image from a multi-platform manifest list, we also\n\t\t\t//   store the manifest list in the image; this allows referencing a\n\t\t\t//   per-platform image using the manifest list digest, but that also\n\t\t\t//   means that we can have multiple genuinely different images in the\n\t\t\t//   storage matching the same manifest list digest (if pulled using different\n\t\t\t//   SystemContext.{OS,Architecture,Variant}Choice to the same storage).\n\t\t\t//   In this case we prefer the image matching the current SystemContext.\n\t\t\timages, err := s.transport.store.ImagesByDigest(digested.Digest())\n\t\t\tif err == nil && len(images) > 0 {\n\t\t\t\tfor _, image := range images {\n\t\t\t\t\tif imageMatchesRepo(image, s.named) {\n\t\t\t\t\t\tif loadedImage == nil || multiArchImageMatchesSystemContext(s.transport.store, image, digested.Digest(), sys) {\n\t\t\t\t\t\t\tloadedImage = image\n\t\t\t\t\t\t\ts.id = image.ID\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif s.id == \"\" {\n\t\tlogrus.Debugf(\"reference %q does not resolve to an image ID\", s.StringWithinTransport())\n\t\t// %.0w makes the error visible to error.Unwrap() without including any text.\n\t\t// ErrNoSuchImage ultimately is “identifier is not an image”, which is not helpful for identifying the root cause.\n\t\treturn nil, fmt.Errorf(\"reference %q does not resolve to an image ID%.0w\", s.StringWithinTransport(), ErrNoSuchImage)\n\t}\n\tif loadedImage == nil {\n\t\timg, err := s.transport.store.Image(s.id)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"reading image %q: %w\", s.id, err)\n\t\t}\n\t\tloadedImage = img\n\t}\n\tif s.named != nil {\n\t\tif !imageMatchesRepo(loadedImage, s.named) {\n\t\t\tlogrus.Errorf(\"no image matching reference %q found\", s.StringWithinTransport())\n\t\t\treturn nil, ErrNoSuchImage\n\t\t}\n\t}\n\t// Default to having the image digest that we hand back match the most recently\n\t// added manifest...\n\tif digest, ok := loadedImage.BigDataDigests[storage.ImageDigestBigDataKey]; ok {\n\t\tloadedImage.Digest = digest\n\t}\n\t// ... unless the named reference says otherwise, and it matches one of the digests\n\t// in the image.  For those cases, set the Digest field to that value, for the\n\t// sake of older consumers that don't know there's a whole list in there now.\n\tif s.named != nil {\n\t\tif digested, ok := s.named.(reference.Digested); ok {\n\t\t\tdigest := digested.Digest()\n\t\t\tif slices.Contains(loadedImage.Digests, digest) {\n\t\t\t\tloadedImage.Digest = digest\n\t\t\t}\n\t\t}\n\t}\n\treturn loadedImage, nil\n}\n\n// Return a Transport object that defaults to using the same store that we used\n// to build this reference object.\nfunc (s storageReference) Transport() types.ImageTransport {\n\treturn &storageTransport{\n\t\tstore:         s.transport.store,\n\t\tdefaultUIDMap: s.transport.defaultUIDMap,\n\t\tdefaultGIDMap: s.transport.defaultGIDMap,\n\t}\n}\n\n// Return a name with a tag or digest, if we have either, else return it bare.\nfunc (s storageReference) DockerReference() reference.Named {\n\treturn s.named\n}\n\n// Return a name with a tag, prefixed with the graph root and driver name, to\n// disambiguate between images which may be present in multiple stores and\n// share only their names.\nfunc (s storageReference) StringWithinTransport() string {\n\toptionsList := \"\"\n\toptions := s.transport.store.GraphOptions()\n\tif len(options) > 0 {\n\t\toptionsList = \":\" + strings.Join(options, \",\")\n\t}\n\tres := \"[\" + s.transport.store.GraphDriverName() + \"@\" + s.transport.store.GraphRoot() + \"+\" + s.transport.store.RunRoot() + optionsList + \"]\"\n\tif s.named != nil {\n\t\tres += s.named.String()\n\t}\n\tif s.id != \"\" {\n\t\tres += \"@\" + s.id\n\t}\n\treturn res\n}\n\nfunc (s storageReference) PolicyConfigurationIdentity() string {\n\tres := \"[\" + s.transport.store.GraphDriverName() + \"@\" + s.transport.store.GraphRoot() + \"]\"\n\tif s.named != nil {\n\t\tres += s.named.String()\n\t}\n\tif s.id != \"\" {\n\t\tres += \"@\" + s.id\n\t}\n\treturn res\n}\n\n// Also accept policy that's tied to the combination of the graph root and\n// driver name, to apply to all images stored in the Store, and to just the\n// graph root, in case we're using multiple drivers in the same directory for\n// some reason.\nfunc (s storageReference) PolicyConfigurationNamespaces() []string {\n\tstoreSpec := \"[\" + s.transport.store.GraphDriverName() + \"@\" + s.transport.store.GraphRoot() + \"]\"\n\tdriverlessStoreSpec := \"[\" + s.transport.store.GraphRoot() + \"]\"\n\tnamespaces := []string{}\n\tif s.named != nil {\n\t\tif s.id != \"\" {\n\t\t\t// The reference without the ID is also a valid namespace.\n\t\t\tnamespaces = append(namespaces, storeSpec+s.named.String())\n\t\t}\n\t\ttagged, isTagged := s.named.(reference.Tagged)\n\t\t_, isDigested := s.named.(reference.Digested)\n\t\tif isTagged && isDigested { // s.named is \"name:tag@digest\"; add a \"name:tag\" parent namespace.\n\t\t\tnamespaces = append(namespaces, storeSpec+s.named.Name()+\":\"+tagged.Tag())\n\t\t}\n\t\tcomponents := strings.Split(s.named.Name(), \"/\")\n\t\tfor len(components) > 0 {\n\t\t\tnamespaces = append(namespaces, storeSpec+strings.Join(components, \"/\"))\n\t\t\tcomponents = components[:len(components)-1]\n\t\t}\n\t}\n\tnamespaces = append(namespaces, storeSpec)\n\tnamespaces = append(namespaces, driverlessStoreSpec)\n\treturn namespaces\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (s storageReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn newImage(ctx, sys, s)\n}\n\nfunc (s storageReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\timg, err := s.resolveImage(sys)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlayers, err := s.transport.store.DeleteImage(img.ID, true)\n\tif err == nil {\n\t\tlogrus.Debugf(\"deleted image %q\", img.ID)\n\t\tfor _, layer := range layers {\n\t\t\tlogrus.Debugf(\"deleted layer %q\", layer)\n\t\t}\n\t}\n\treturn err\n}\n\nfunc (s storageReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\treturn newImageSource(sys, s)\n}\n\nfunc (s storageReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn newImageDestination(sys, s)\n}\n\n// ResolveReference finds the underlying storage image for a storage.Transport reference.\n// It returns that image, and an updated reference which can be used to refer back to the _same_\n// image again.\n//\n// This matters if the input reference contains a tagged name; the destination of the tag can\n// move in local storage. The updated reference returned by this function contains the resolved\n// image ID, so later uses of that updated reference will either continue to refer to the same\n// image, or fail.\n//\n// Note that it _is_ possible for the later uses to fail, either because the image was removed\n// completely, or because the name used in the reference was untaged (even if the underlying image\n// ID still exists in local storage).\n//\n// Returns an error matching ErrNoSuchImage if an image matching ref was not found.\nfunc ResolveReference(ref types.ImageReference) (types.ImageReference, *storage.Image, error) {\n\tsref, ok := ref.(*storageReference)\n\tif !ok {\n\t\treturn nil, nil, fmt.Errorf(\"trying to resolve a non-%s: reference %q\", Transport.Name(),\n\t\t\ttransports.ImageName(ref))\n\t}\n\tclone := *sref // A shallow copy we can update\n\timg, err := clone.resolveImage(nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn clone, img, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/storage/storage_src.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage storage\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"os\"\n\t\"slices\"\n\t\"sync\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/internal/signature\"\n\t\"go.podman.io/image/v5/internal/tmpdir\"\n\t\"go.podman.io/image/v5/manifest\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chunked/toc\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n)\n\ntype storageImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\tstubs.NoGetBlobAtInitialize\n\n\timageRef               storageReference\n\timage                  *storage.Image\n\tsystemContext          *types.SystemContext // SystemContext used in GetBlob() to create temporary files\n\tmetadata               storageImageMetadata\n\tcachedManifest         []byte     // A cached copy of the manifest, if already known, or nil\n\tcachedManifestMIMEType string     // Valid if cachedManifest != nil\n\tgetBlobMutex           sync.Mutex // Mutex to sync state for parallel GetBlob executions\n\tgetBlobMutexProtected  getBlobMutexProtected\n}\n\n// getBlobMutexProtected contains storageImageSource data protected by getBlobMutex.\ntype getBlobMutexProtected struct {\n\t// digestToLayerID is a lookup map from a possibly-untrusted uncompressed layer digest (as returned by LayerInfosForCopy) to the\n\t// layer ID in the store.\n\tdigestToLayerID map[digest.Digest]string\n\n\t// layerPosition stores where we are in reading a blob's layers\n\tlayerPosition map[digest.Digest]int\n}\n\n// expectedLayerDiffIDFlag is a per-layer flag containing an UNTRUSTED uncompressed digest of the layer.\n// It is set when pulling a layer by TOC; later, this value is used with digestToLayerID\n// to allow identifying the layer — and the consumer is expected to verify the blob returned by GetBlob against the digest.\nconst expectedLayerDiffIDFlag = \"expected-layer-diffid\"\n\n// newImageSource sets up an image for reading.\nfunc newImageSource(sys *types.SystemContext, imageRef storageReference) (*storageImageSource, error) {\n\t// First, locate the image.\n\timg, err := imageRef.resolveImage(sys)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Build the reader object.\n\timage := &storageImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: true,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(imageRef),\n\n\t\timageRef:      imageRef,\n\t\tsystemContext: sys,\n\t\timage:         img,\n\t\tmetadata: storageImageMetadata{\n\t\t\tSignatureSizes:  []int{},\n\t\t\tSignaturesSizes: make(map[digest.Digest][]int),\n\t\t},\n\t\tgetBlobMutexProtected: getBlobMutexProtected{\n\t\t\tdigestToLayerID: make(map[digest.Digest]string),\n\t\t\tlayerPosition:   make(map[digest.Digest]int),\n\t\t},\n\t}\n\timage.Compat = impl.AddCompat(image)\n\tif img.Metadata != \"\" {\n\t\tif err := json.Unmarshal([]byte(img.Metadata), &image.metadata); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"decoding metadata for source image: %w\", err)\n\t\t}\n\t}\n\treturn image, nil\n}\n\n// Reference returns the image reference that we used to find this image.\nfunc (s *storageImageSource) Reference() types.ImageReference {\n\treturn s.imageRef\n}\n\n// Close cleans up any resources we tied up while reading the image.\nfunc (s *storageImageSource) Close() error {\n\treturn nil\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (s *storageImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\t// We need a valid digest value.\n\tdigest := info.Digest\n\n\tif err := digest.Validate(); err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tif digest == image.GzippedEmptyLayerDigest {\n\t\treturn io.NopCloser(bytes.NewReader(image.GzippedEmptyLayer)), int64(len(image.GzippedEmptyLayer)), nil\n\t}\n\n\tvar layers []storage.Layer\n\n\t// This lookup path is strictly necessary for layers identified by TOC digest\n\t// (where LayersByUncompressedDigest might not find our layer);\n\t// for other layers it is an optimization to avoid the cost of the LayersByUncompressedDigest call.\n\ts.getBlobMutex.Lock()\n\tlayerID, found := s.getBlobMutexProtected.digestToLayerID[digest]\n\ts.getBlobMutex.Unlock()\n\n\tif found {\n\t\tif layer, err := s.imageRef.transport.store.Layer(layerID); err == nil {\n\t\t\tlayers = []storage.Layer{*layer}\n\t\t}\n\t} else {\n\t\t// Check if the blob corresponds to a diff that was used to initialize any layers.  Our\n\t\t// callers should try to retrieve layers using their uncompressed digests, so no need to\n\t\t// check if they're using one of the compressed digests, which we can't reproduce anyway.\n\t\tlayers, _ = s.imageRef.transport.store.LayersByUncompressedDigest(digest)\n\t}\n\n\t// If it's not a layer, then it must be a data item.\n\tif len(layers) == 0 {\n\t\tb, err := s.imageRef.transport.store.ImageBigData(s.image.ID, digest.String())\n\t\tif err != nil {\n\t\t\treturn nil, 0, err\n\t\t}\n\t\tr := bytes.NewReader(b)\n\t\tlogrus.Debugf(\"exporting opaque data as blob %q\", digest.String())\n\t\treturn io.NopCloser(r), int64(r.Len()), nil\n\t}\n\n\t// NOTE: the blob is first written to a temporary file and subsequently\n\t// closed.  The intention is to keep the time we own the storage lock\n\t// as short as possible to allow other processes to access the storage.\n\trc, n, _, err := s.getBlobAndLayerID(digest, layers)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\tdefer rc.Close()\n\n\ttmpFile, err := tmpdir.CreateBigFileTemp(s.systemContext, \"\")\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\tsuccess := false\n\ttmpFileRemovePending := true\n\tdefer func() {\n\t\tif !success {\n\t\t\ttmpFile.Close()\n\t\t\tif tmpFileRemovePending {\n\t\t\t\tos.Remove(tmpFile.Name())\n\t\t\t}\n\t\t}\n\t}()\n\t// On Unix and modern Windows (2022 at least) we can eagerly unlink the file to ensure it's automatically\n\t// cleaned up on process termination (or if the caller forgets to invoke Close())\n\t// On older versions of Windows we will have to fallback to relying on the caller to invoke Close()\n\tif err := os.Remove(tmpFile.Name()); err == nil {\n\t\ttmpFileRemovePending = false\n\t}\n\n\tif _, err := io.Copy(tmpFile, rc); err != nil {\n\t\treturn nil, 0, err\n\t}\n\tif _, err := tmpFile.Seek(0, io.SeekStart); err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tsuccess = true\n\n\tif tmpFileRemovePending {\n\t\treturn ioutils.NewReadCloserWrapper(tmpFile, func() error {\n\t\t\ttmpFile.Close()\n\t\t\treturn os.Remove(tmpFile.Name())\n\t\t}), n, nil\n\t}\n\n\treturn tmpFile, n, nil\n}\n\n// getBlobAndLayer reads the data blob or filesystem layer which matches the digest and size, if given.\nfunc (s *storageImageSource) getBlobAndLayerID(digest digest.Digest, layers []storage.Layer) (rc io.ReadCloser, n int64, layerID string, err error) {\n\tvar layer storage.Layer\n\tvar diffOptions *storage.DiffOptions\n\n\t// Step through the list of matching layers.  Tests may want to verify that if we have multiple layers\n\t// which claim to have the same contents, that we actually do have multiple layers, otherwise we could\n\t// just go ahead and use the first one every time.\n\ts.getBlobMutex.Lock()\n\ti := s.getBlobMutexProtected.layerPosition[digest]\n\ts.getBlobMutexProtected.layerPosition[digest] = i + 1\n\ts.getBlobMutex.Unlock()\n\tif len(layers) > 0 {\n\t\tlayer = layers[i%len(layers)]\n\t}\n\t// Force the storage layer to not try to match any compression that was used when the layer was first\n\t// handed to it.\n\tnoCompression := archive.Uncompressed\n\tdiffOptions = &storage.DiffOptions{\n\t\tCompression: &noCompression,\n\t}\n\tif layer.UncompressedSize < 0 {\n\t\tn = -1\n\t} else {\n\t\tn = layer.UncompressedSize\n\t}\n\tlogrus.Debugf(\"exporting filesystem layer %q without compression for blob %q\", layer.ID, digest)\n\trc, err = s.imageRef.transport.store.Diff(\"\", layer.ID, diffOptions)\n\tif err != nil {\n\t\treturn nil, -1, \"\", err\n\t}\n\treturn rc, n, layer.ID, err\n}\n\n// GetManifest() reads the image's manifest.\nfunc (s *storageImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) (manifestBlob []byte, mimeType string, err error) {\n\tif instanceDigest != nil {\n\t\tkey, err := manifestBigDataKey(*instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tblob, err := s.imageRef.transport.store.ImageBigData(s.image.ID, key)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", fmt.Errorf(\"reading manifest for image instance %q: %w\", *instanceDigest, err)\n\t\t}\n\t\treturn blob, manifest.GuessMIMEType(blob), err\n\t}\n\tif s.cachedManifest == nil {\n\t\t// The manifest is stored as a big data item.\n\t\t// Prefer the manifest corresponding to the user-specified digest, if available.\n\t\tif s.imageRef.named != nil {\n\t\t\tif digested, ok := s.imageRef.named.(reference.Digested); ok {\n\t\t\t\tkey, err := manifestBigDataKey(digested.Digest())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, \"\", err\n\t\t\t\t}\n\t\t\t\tblob, err := s.imageRef.transport.store.ImageBigData(s.image.ID, key)\n\t\t\t\tif err != nil && !os.IsNotExist(err) { // os.IsNotExist is true if the image exists but there is no data corresponding to key\n\t\t\t\t\treturn nil, \"\", err\n\t\t\t\t}\n\t\t\t\tif err == nil {\n\t\t\t\t\ts.cachedManifest = blob\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// If the user did not specify a digest, or this is an old image stored before manifestBigDataKey was introduced, use the default manifest.\n\t\t// Note that the manifest may not match the expected digest, and that is likely to fail eventually, e.g. in c/image/image/UnparsedImage.Manifest().\n\t\tif s.cachedManifest == nil {\n\t\t\tcachedBlob, err := s.imageRef.transport.store.ImageBigData(s.image.ID, storage.ImageDigestBigDataKey)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, \"\", err\n\t\t\t}\n\t\t\ts.cachedManifest = cachedBlob\n\t\t}\n\t\ts.cachedManifestMIMEType = manifest.GuessMIMEType(s.cachedManifest)\n\t}\n\treturn s.cachedManifest, s.cachedManifestMIMEType, err\n}\n\n// LayerInfosForCopy() returns the list of layer blobs that make up the root filesystem of\n// the image, after they've been decompressed.\nfunc (s *storageImageSource) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error) {\n\tmanifestBlob, manifestType, err := s.GetManifest(ctx, instanceDigest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading image manifest for %q: %w\", s.image.ID, err)\n\t}\n\tif manifest.MIMETypeIsMultiImage(manifestType) {\n\t\treturn nil, errors.New(\"can't copy layers for a manifest list (shouldn't be attempted)\")\n\t}\n\tman, err := manifest.FromBlob(manifestBlob, manifestType)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing image manifest for %q: %w\", s.image.ID, err)\n\t}\n\n\tuncompressedLayerType := \"\"\n\tgzipCompressedLayerType := \"\"\n\tswitch manifestType {\n\tcase imgspecv1.MediaTypeImageManifest:\n\t\tuncompressedLayerType = imgspecv1.MediaTypeImageLayer\n\t\tgzipCompressedLayerType = imgspecv1.MediaTypeImageLayerGzip\n\tcase manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema2MediaType:\n\t\tuncompressedLayerType = manifest.DockerV2SchemaLayerMediaTypeUncompressed\n\t\tgzipCompressedLayerType = manifest.DockerV2Schema2LayerMediaType\n\t}\n\n\tphysicalBlobInfos := []layerForCopy{} // Built reversed\n\tlayerID := s.image.TopLayer\n\tfor layerID != \"\" {\n\t\tlayer, err := s.imageRef.transport.store.Layer(layerID)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"reading layer %q in image %q: %w\", layerID, s.image.ID, err)\n\t\t}\n\n\t\tblobDigest := layer.UncompressedDigest\n\t\tif blobDigest == \"\" {\n\t\t\tif layer.TOCDigest == \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"uncompressed digest and TOC digest for layer %q is unknown\", layerID)\n\t\t\t}\n\t\t\tif layer.Flags == nil || layer.Flags[expectedLayerDiffIDFlag] == nil {\n\t\t\t\treturn nil, fmt.Errorf(\"TOC digest %q for layer %q is present but %q flag is not set\", layer.TOCDigest, layerID, expectedLayerDiffIDFlag)\n\t\t\t}\n\t\t\texpectedDigest, ok := layer.Flags[expectedLayerDiffIDFlag].(string)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"TOC digest %q for layer %q is present but %q flag is not a string\", layer.TOCDigest, layerID, expectedLayerDiffIDFlag)\n\t\t\t}\n\t\t\t// If the layer is stored by its TOC, report the expected diffID as the layer Digest;\n\t\t\t// the generic code is responsible for validating the digest.\n\t\t\t// We can locate the layer without further c/storage help using s.getBlobMutexProtected.digestToLayerID.\n\t\t\tblobDigest, err = digest.Parse(expectedDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parsing expected diffID %q for layer %q: %w\", expectedDigest, layerID, err)\n\t\t\t}\n\t\t}\n\t\tsize := layer.UncompressedSize\n\t\tif size < 0 {\n\t\t\tsize = -1\n\t\t}\n\t\ts.getBlobMutex.Lock()\n\t\ts.getBlobMutexProtected.digestToLayerID[blobDigest] = layer.ID\n\t\ts.getBlobMutex.Unlock()\n\t\tlayerInfo := layerForCopy{\n\t\t\tdigest:    blobDigest,\n\t\t\tsize:      size,\n\t\t\tmediaType: uncompressedLayerType,\n\t\t}\n\t\tphysicalBlobInfos = append(physicalBlobInfos, layerInfo)\n\t\tlayerID = layer.Parent\n\t}\n\tslices.Reverse(physicalBlobInfos)\n\n\tres, err := buildLayerInfosForCopy(man.LayerInfos(), physicalBlobInfos, gzipCompressedLayerType)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating LayerInfosForCopy of image %q: %w\", s.image.ID, err)\n\t}\n\treturn res, nil\n}\n\n// layerForCopy is information about a physical layer, an edit to be made by buildLayerInfosForCopy.\ntype layerForCopy struct {\n\tdigest    digest.Digest\n\tsize      int64\n\tmediaType string\n}\n\n// buildLayerInfosForCopy builds a LayerInfosForCopy return value based on manifestInfos from the original manifest,\n// but using layer data which we can actually produce — physicalInfos for non-empty layers,\n// and image.GzippedEmptyLayer with gzipCompressedLayerType for empty ones.\n// (This is split basically only to allow easily unit-testing the part that has no dependencies on the external environment.)\nfunc buildLayerInfosForCopy(manifestInfos []manifest.LayerInfo, physicalInfos []layerForCopy, gzipCompressedLayerType string) ([]types.BlobInfo, error) {\n\tnextPhysical := 0\n\tres := make([]types.BlobInfo, len(manifestInfos))\n\tfor i, mi := range manifestInfos {\n\t\tif mi.EmptyLayer {\n\t\t\tres[i] = types.BlobInfo{\n\t\t\t\tDigest:      image.GzippedEmptyLayerDigest,\n\t\t\t\tSize:        int64(len(image.GzippedEmptyLayer)),\n\t\t\t\tURLs:        mi.URLs,\n\t\t\t\tAnnotations: mi.Annotations,\n\t\t\t\tMediaType:   gzipCompressedLayerType,\n\t\t\t}\n\t\t} else {\n\t\t\tif nextPhysical >= len(physicalInfos) {\n\t\t\t\treturn nil, fmt.Errorf(\"expected more than %d physical layers to exist\", len(physicalInfos))\n\t\t\t}\n\t\t\tres[i] = types.BlobInfo{\n\t\t\t\tDigest:      physicalInfos[nextPhysical].digest,\n\t\t\t\tSize:        physicalInfos[nextPhysical].size,\n\t\t\t\tURLs:        mi.URLs,\n\t\t\t\tAnnotations: mi.Annotations,\n\t\t\t\tMediaType:   physicalInfos[nextPhysical].mediaType,\n\t\t\t}\n\t\t\tnextPhysical++\n\t\t}\n\t\t// We have changed the compression format, so strip compression-related annotations.\n\t\tif res[i].Annotations != nil {\n\t\t\tmaps.DeleteFunc(res[i].Annotations, func(key string, _ string) bool {\n\t\t\t\t_, ok := toc.ChunkedAnnotations[key]\n\t\t\t\treturn ok\n\t\t\t})\n\t\t\tif len(res[i].Annotations) == 0 {\n\t\t\t\tres[i].Annotations = nil\n\t\t\t}\n\t\t}\n\t}\n\tif nextPhysical != len(physicalInfos) {\n\t\treturn nil, fmt.Errorf(\"used only %d out of %d physical layers\", nextPhysical, len(physicalInfos))\n\t}\n\treturn res, nil\n}\n\n// GetSignaturesWithFormat returns the image's signatures.  It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n// (e.g. if the source never returns manifest lists).\nfunc (s *storageImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error) {\n\tvar offset int\n\tsignatureBlobs := []byte{}\n\tsignatureSizes := s.metadata.SignatureSizes\n\tkey := \"signatures\"\n\tinstance := \"default instance\"\n\tif instanceDigest != nil {\n\t\tsignatureSizes = s.metadata.SignaturesSizes[*instanceDigest]\n\t\tk, err := signatureBigDataKey(*instanceDigest)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkey = k\n\t\tif err := instanceDigest.Validate(); err != nil { // digest.Digest.Encoded() panics on failure, so validate explicitly.\n\t\t\treturn nil, err\n\t\t}\n\t\tinstance = instanceDigest.Encoded()\n\t}\n\tif len(signatureSizes) > 0 {\n\t\tdata, err := s.imageRef.transport.store.ImageBigData(s.image.ID, key)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"looking up signatures data for image %q (%s): %w\", s.image.ID, instance, err)\n\t\t}\n\t\tsignatureBlobs = data\n\t}\n\tres := []signature.Signature{}\n\tfor _, length := range signatureSizes {\n\t\tif offset+length > len(signatureBlobs) {\n\t\t\treturn nil, fmt.Errorf(\"looking up signatures data for image %q (%s): expected at least %d bytes, only found %d\", s.image.ID, instance, len(signatureBlobs), offset+length)\n\t\t}\n\t\tsig, err := signature.FromBlob(signatureBlobs[offset : offset+length])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing signature at (%d, %d): %w\", offset, length, err)\n\t\t}\n\t\tres = append(res, sig)\n\t\toffset += length\n\t}\n\tif offset != len(signatureBlobs) {\n\t\treturn nil, fmt.Errorf(\"signatures data (%s) contained %d extra bytes\", instance, len(signatureBlobs)-offset)\n\t}\n\treturn res, nil\n}\n\n// getSize() adds up the sizes of the image's data blobs (which includes the configuration blob), the\n// signatures, and the uncompressed sizes of all of the image's layers.\nfunc (s *storageImageSource) getSize() (int64, error) {\n\tvar sum int64\n\t// Size up the data blobs.\n\tdataNames, err := s.imageRef.transport.store.ListImageBigData(s.image.ID)\n\tif err != nil {\n\t\treturn -1, fmt.Errorf(\"reading image %q: %w\", s.image.ID, err)\n\t}\n\tfor _, dataName := range dataNames {\n\t\tbigSize, err := s.imageRef.transport.store.ImageBigDataSize(s.image.ID, dataName)\n\t\tif err != nil {\n\t\t\treturn -1, fmt.Errorf(\"reading data blob size %q for %q: %w\", dataName, s.image.ID, err)\n\t\t}\n\t\tsum += bigSize\n\t}\n\t// Add the signature sizes.\n\tfor _, sigSize := range s.metadata.SignatureSizes {\n\t\tsum += int64(sigSize)\n\t}\n\t// Walk the layer list.\n\tlayerID := s.image.TopLayer\n\tfor layerID != \"\" {\n\t\tlayer, err := s.imageRef.transport.store.Layer(layerID)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tif (layer.TOCDigest == \"\" && layer.UncompressedDigest == \"\") || (layer.TOCDigest == \"\" && layer.UncompressedSize < 0) {\n\t\t\treturn -1, fmt.Errorf(\"size for layer %q is unknown, failing getSize()\", layerID)\n\t\t}\n\t\t// FIXME: We allow layer.UncompressedSize < 0 above, because currently images in an Additional Layer Store don’t provide that value.\n\t\t// Right now, various callers in Podman (and, also, newImage in this package) don’t expect the size computation to fail.\n\t\t// Should we update the callers, or do we need to continue returning inaccurate information here? Or should we pay the cost\n\t\t// to compute the size from the diff?\n\t\tif layer.UncompressedSize >= 0 {\n\t\t\tsum += layer.UncompressedSize\n\t\t}\n\t\tif layer.Parent == \"\" {\n\t\t\tbreak\n\t\t}\n\t\tlayerID = layer.Parent\n\t}\n\treturn sum, nil\n}\n\n// Size() adds up the sizes of the image's data blobs (which includes the configuration blob), the\n// signatures, and the uncompressed sizes of all of the image's layers.\nfunc (s *storageImageSource) Size() (int64, error) {\n\treturn s.getSize()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/storage/storage_transport.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage storage\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\t\"go.podman.io/storage\"\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\nconst (\n\tminimumTruncatedIDLength = 3\n)\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n\nvar (\n\t// Transport is an ImageTransport that uses either a default\n\t// storage.Store or one that's it's explicitly told to use.\n\tTransport StoreTransport = &storageTransport{}\n\t// ErrInvalidReference is returned when ParseReference() is passed an\n\t// empty reference.\n\tErrInvalidReference = errors.New(\"invalid reference\")\n\t// ErrPathNotAbsolute is returned when a graph root is not an absolute\n\t// path name.\n\tErrPathNotAbsolute = errors.New(\"path name is not absolute\")\n)\n\n// StoreTransport is an ImageTransport that uses a storage.Store to parse\n// references, either its own default or one that it's told to use.\ntype StoreTransport interface {\n\ttypes.ImageTransport\n\t// SetStore sets the default store for this transport.\n\tSetStore(storage.Store)\n\t// GetStoreIfSet returns the default store for this transport, or nil if not set/determined yet.\n\tGetStoreIfSet() storage.Store\n\t// GetImage retrieves the image from the transport's store that's named\n\t// by the reference.\n\t// Deprecated: Surprisingly, with a StoreTransport reference which contains an ID,\n\t// this ignores that ID; and repeated calls of GetStoreImage with the same named reference\n\t// can return different images, with no way for the caller to \"freeze\" the storage.Image identity\n\t// without discarding the name entirely.\n\t//\n\t// Use storage.ResolveReference instead; note that if the image is not found, ResolveReference returns\n\t// c/image/v5/storage.ErrNoSuchImage, not c/storage.ErrImageUnknown.\n\tGetImage(types.ImageReference) (*storage.Image, error)\n\t// GetStoreImage retrieves the image from a specified store that's named\n\t// by the reference.\n\t//\n\t// Deprecated: Surprisingly, with a StoreTransport reference which contains an ID,\n\t// this ignores that ID; and repeated calls of GetStoreImage with the same named reference\n\t// can return different images, with no way for the caller to \"freeze\" the storage.Image identity\n\t// without discarding the name entirely.\n\t//\n\t// Also, a StoreTransport reference already contains a store, so providing another one is redundant.\n\t//\n\t// Use storage.ResolveReference instead; note that if the image is not found, ResolveReference returns\n\t// c/image/v5/storage.ErrNoSuchImage, not c/storage.ErrImageUnknown.\n\tGetStoreImage(storage.Store, types.ImageReference) (*storage.Image, error)\n\t// ParseStoreReference parses a reference, overriding any store\n\t// specification that it may contain.\n\tParseStoreReference(store storage.Store, reference string) (*storageReference, error)\n\t// NewStoreReference creates a reference for (named@ID) in store.\n\t// either of name or ID can be unset; named must not be a reference.IsNameOnly.\n\tNewStoreReference(store storage.Store, named reference.Named, id string) (*storageReference, error)\n\t// SetDefaultUIDMap sets the default UID map to use when opening stores.\n\tSetDefaultUIDMap(idmap []idtools.IDMap)\n\t// SetDefaultGIDMap sets the default GID map to use when opening stores.\n\tSetDefaultGIDMap(idmap []idtools.IDMap)\n\t// DefaultUIDMap returns the default UID map used when opening stores.\n\tDefaultUIDMap() []idtools.IDMap\n\t// DefaultGIDMap returns the default GID map used when opening stores.\n\tDefaultGIDMap() []idtools.IDMap\n}\n\ntype storageTransport struct {\n\tstore         storage.Store\n\tdefaultUIDMap []idtools.IDMap\n\tdefaultGIDMap []idtools.IDMap\n}\n\nfunc (s *storageTransport) Name() string {\n\t// Still haven't really settled on a name.\n\treturn \"containers-storage\"\n}\n\n// SetStore sets the Store object which the Transport will use for parsing\n// references when information about a Store is not directly specified as part\n// of the reference.  If one is not set, the library will attempt to initialize\n// one with default settings when a reference needs to be parsed.  Calling\n// SetStore does not affect previously parsed references.\nfunc (s *storageTransport) SetStore(store storage.Store) {\n\ts.store = store\n}\n\n// GetStoreIfSet returns the default store for this transport, as set using SetStore() or initialized by default, or nil if not set/determined yet.\nfunc (s *storageTransport) GetStoreIfSet() storage.Store {\n\treturn s.store\n}\n\n// SetDefaultUIDMap sets the default UID map to use when opening stores.\nfunc (s *storageTransport) SetDefaultUIDMap(idmap []idtools.IDMap) {\n\ts.defaultUIDMap = idmap\n}\n\n// SetDefaultGIDMap sets the default GID map to use when opening stores.\nfunc (s *storageTransport) SetDefaultGIDMap(idmap []idtools.IDMap) {\n\ts.defaultGIDMap = idmap\n}\n\n// DefaultUIDMap returns the default UID map used when opening stores.\nfunc (s *storageTransport) DefaultUIDMap() []idtools.IDMap {\n\treturn s.defaultUIDMap\n}\n\n// DefaultGIDMap returns the default GID map used when opening stores.\nfunc (s *storageTransport) DefaultGIDMap() []idtools.IDMap {\n\treturn s.defaultGIDMap\n}\n\n// ParseStoreReference takes a name or an ID, tries to figure out which it is\n// relative to the given store, and returns it in a reference object.\nfunc (s storageTransport) ParseStoreReference(store storage.Store, ref string) (*storageReference, error) {\n\tif ref == \"\" {\n\t\treturn nil, fmt.Errorf(\"%q is an empty reference: %w\", ref, ErrInvalidReference)\n\t}\n\tif ref[0] == '[' {\n\t\t// Ignore the store specifier.\n\t\tcloseIndex := strings.IndexRune(ref, ']')\n\t\tif closeIndex < 1 {\n\t\t\treturn nil, fmt.Errorf(\"store specifier in %q did not end: %w\", ref, ErrInvalidReference)\n\t\t}\n\t\tref = ref[closeIndex+1:]\n\t}\n\n\t// The reference may end with an image ID.  Image IDs and digests use the same \"@\" separator;\n\t// here we only peel away an image ID, and leave digests alone.\n\tsplit := strings.LastIndex(ref, \"@\")\n\tid := \"\"\n\tif split != -1 {\n\t\tpossibleID := ref[split+1:]\n\t\tif possibleID == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"empty trailing digest or ID in %q: %w\", ref, ErrInvalidReference)\n\t\t}\n\t\t// If it looks like a digest, leave it alone for now.\n\t\tif _, err := digest.Parse(possibleID); err != nil {\n\t\t\t// Otherwise…\n\t\t\tif err := validateImageID(possibleID); err == nil {\n\t\t\t\tid = possibleID // … it is a full ID\n\t\t\t} else if img, err := store.Image(possibleID); err == nil && img != nil && len(possibleID) >= minimumTruncatedIDLength && strings.HasPrefix(img.ID, possibleID) {\n\t\t\t\t// … it is a truncated version of the ID of an image that's present in local storage,\n\t\t\t\t// so we might as well use the expanded value.\n\t\t\t\tid = img.ID\n\t\t\t} else {\n\t\t\t\treturn nil, fmt.Errorf(\"%q does not look like an image ID or digest: %w\", possibleID, ErrInvalidReference)\n\t\t\t}\n\t\t\t// We have recognized an image ID; peel it off.\n\t\t\tref = ref[:split]\n\t\t}\n\t}\n\n\t// If we only have one @-delimited portion, then _maybe_ it's a truncated image ID.  Only check on that if it's\n\t// at least of what we guess is a reasonable minimum length, because we don't want a really short value\n\t// like \"a\" matching an image by ID prefix when the input was actually meant to specify an image name.\n\tif id == \"\" && len(ref) >= minimumTruncatedIDLength && !strings.ContainsAny(ref, \"@:\") {\n\t\tif img, err := store.Image(ref); err == nil && img != nil && strings.HasPrefix(img.ID, ref) {\n\t\t\t// It's a truncated version of the ID of an image that's present in local storage;\n\t\t\t// we need to expand it.\n\t\t\tid = img.ID\n\t\t\tref = \"\"\n\t\t}\n\t}\n\n\tvar named reference.Named\n\t// Unless we have an un-named \"ID\" or \"@ID\" reference (where ID might only have been a prefix), which has been\n\t// completely parsed above, the initial portion should be a name, possibly with a tag and/or a digest..\n\tif ref != \"\" {\n\t\tvar err error\n\t\tnamed, err = reference.ParseNormalizedNamed(ref)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing named reference %q: %w\", ref, err)\n\t\t}\n\t\tnamed = reference.TagNameOnly(named)\n\t}\n\n\tresult, err := s.NewStoreReference(store, named, id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogrus.Debugf(\"parsed reference into %q\", result.StringWithinTransport())\n\treturn result, nil\n}\n\n// NewStoreReference creates a reference for (named@ID) in store.\n// either of name or ID can be unset; named must not be a reference.IsNameOnly.\nfunc (s *storageTransport) NewStoreReference(store storage.Store, named reference.Named, id string) (*storageReference, error) {\n\treturn newReference(storageTransport{store: store, defaultUIDMap: s.defaultUIDMap, defaultGIDMap: s.defaultGIDMap}, named, id)\n}\n\nfunc (s *storageTransport) GetStore() (storage.Store, error) {\n\t// Return the transport's previously-set store.  If we don't have one\n\t// of those, initialize one now.\n\tif s.store == nil {\n\t\toptions, err := storage.DefaultStoreOptions()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\toptions.UIDMap = s.defaultUIDMap\n\t\toptions.GIDMap = s.defaultGIDMap\n\t\tstore, err := storage.GetStore(options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ts.store = store\n\t}\n\treturn s.store, nil\n}\n\n// ParseReference takes a name and a tag or digest and/or ID\n// (\"_name_\"/\"@_id_\"/\"_name_:_tag_\"/\"_name_:_tag_@_id_\"/\"_name_@_digest_\"/\"_name_@_digest_@_id_\"/\"_name_:_tag_@_digest_\"/\"_name_:_tag_@_digest_@_id_\"),\n// possibly prefixed with a store specifier in the form \"[_graphroot_]\" or\n// \"[_driver_@_graphroot_]\" or \"[_driver_@_graphroot_+_runroot_]\" or\n// \"[_driver_@_graphroot_:_options_]\" or \"[_driver_@_graphroot_+_runroot_:_options_]\",\n// tries to figure out which it is, and returns it in a reference object.\n// If _id_ is the ID of an image that's present in local storage, it can be truncated, and\n// even be specified as if it were a _name_, value.\nfunc (s *storageTransport) ParseReference(reference string) (types.ImageReference, error) {\n\tvar store storage.Store\n\t// Check if there's a store location prefix.  If there is, then it\n\t// needs to match a store that was previously initialized using\n\t// storage.GetStore(), or be enough to let the storage library fill out\n\t// the rest using knowledge that it has from elsewhere.\n\tif len(reference) > 0 && reference[0] == '[' {\n\t\tcloseIndex := strings.IndexRune(reference, ']')\n\t\tif closeIndex < 1 {\n\t\t\treturn nil, ErrInvalidReference\n\t\t}\n\t\tstoreSpec := reference[1:closeIndex]\n\t\treference = reference[closeIndex+1:]\n\t\t// Peel off a \"driver@\" from the start.\n\t\tdriverInfo := \"\"\n\t\tdriverPart1, driverPart2, gotDriver := strings.Cut(storeSpec, \"@\")\n\t\tif !gotDriver {\n\t\t\tstoreSpec = driverPart1\n\t\t\tif storeSpec == \"\" {\n\t\t\t\treturn nil, ErrInvalidReference\n\t\t\t}\n\t\t} else {\n\t\t\tdriverInfo = driverPart1\n\t\t\tif driverInfo == \"\" {\n\t\t\t\treturn nil, ErrInvalidReference\n\t\t\t}\n\t\t\tstoreSpec = driverPart2\n\t\t\tif storeSpec == \"\" {\n\t\t\t\treturn nil, ErrInvalidReference\n\t\t\t}\n\t\t}\n\t\t// Peel off a \":options\" from the end.\n\t\tvar options []string\n\t\tstoreSpec, optionsPart, gotOptions := strings.Cut(storeSpec, \":\")\n\t\tif gotOptions {\n\t\t\toptions = strings.Split(optionsPart, \",\")\n\t\t}\n\t\t// Peel off a \"+runroot\" from the new end.\n\t\tstoreSpec, runRootInfo, _ := strings.Cut(storeSpec, \"+\") // runRootInfo is \"\" if there is no \"+\"\n\t\t// The rest is our graph root.\n\t\trootInfo := storeSpec\n\t\t// Check that any paths are absolute paths.\n\t\tif rootInfo != \"\" && !filepath.IsAbs(rootInfo) {\n\t\t\treturn nil, ErrPathNotAbsolute\n\t\t}\n\t\tif runRootInfo != \"\" && !filepath.IsAbs(runRootInfo) {\n\t\t\treturn nil, ErrPathNotAbsolute\n\t\t}\n\t\tstore2, err := storage.GetStore(storage.StoreOptions{\n\t\t\tGraphDriverName:    driverInfo,\n\t\t\tGraphRoot:          rootInfo,\n\t\t\tRunRoot:            runRootInfo,\n\t\t\tGraphDriverOptions: options,\n\t\t\tUIDMap:             s.defaultUIDMap,\n\t\t\tGIDMap:             s.defaultGIDMap,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstore = store2\n\t} else {\n\t\t// We didn't have a store spec, so use the default.\n\t\tstore2, err := s.GetStore()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tstore = store2\n\t}\n\treturn s.ParseStoreReference(store, reference)\n}\n\n// Deprecated: Surprisingly, with a StoreTransport reference which contains an ID,\n// this ignores that ID; and repeated calls of GetStoreImage with the same named reference\n// can return different images, with no way for the caller to \"freeze\" the storage.Image identity\n// without discarding the name entirely.\n//\n// Also, a StoreTransport reference already contains a store, so providing another one is redundant.\n//\n// Use storage.ResolveReference instead; note that if the image is not found, ResolveReference returns\n// c/image/v5/storage.ErrNoSuchImage, not c/storage.ErrImageUnknown.\nfunc (s storageTransport) GetStoreImage(store storage.Store, ref types.ImageReference) (*storage.Image, error) {\n\tdref := ref.DockerReference()\n\tif dref != nil {\n\t\tif img, err := store.Image(dref.String()); err == nil {\n\t\t\treturn img, nil\n\t\t}\n\t}\n\tif sref, ok := ref.(*storageReference); ok {\n\t\ttmpRef := *sref\n\t\tif img, err := tmpRef.resolveImage(nil); err == nil {\n\t\t\treturn img, nil\n\t\t}\n\t}\n\treturn nil, storage.ErrImageUnknown\n}\n\n// Deprecated: Surprisingly, with a StoreTransport reference which contains an ID,\n// this ignores that ID; and repeated calls of GetStoreImage with the same named reference\n// can return different images, with no way for the caller to \"freeze\" the storage.Image identity\n// without discarding the name entirely.\n//\n// Use storage.ResolveReference instead; note that if the image is not found, ResolveReference returns\n// c/image/v5/storage.ErrNoSuchImage, not c/storage.ErrImageUnknown.\nfunc (s *storageTransport) GetImage(ref types.ImageReference) (*storage.Image, error) {\n\tstore, err := s.GetStore()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn s.GetStoreImage(store, ref)\n}\n\nfunc (s storageTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// Check that there's a store location prefix.  Values we're passed are\n\t// expected to come from PolicyConfigurationIdentity or\n\t// PolicyConfigurationNamespaces, so if there's no store location,\n\t// something's wrong.\n\tif scope[0] != '[' {\n\t\treturn ErrInvalidReference\n\t}\n\t// Parse the store location prefix.\n\tcloseIndex := strings.IndexRune(scope, ']')\n\tif closeIndex < 1 {\n\t\treturn ErrInvalidReference\n\t}\n\tstoreSpec := scope[1:closeIndex]\n\tscope = scope[closeIndex+1:]\n\tif a, b, ok := strings.Cut(storeSpec, \"@\"); ok && a != \"\" && b != \"\" {\n\t\t// Two components: the driver type and the graph root.\n\t\tif !filepath.IsAbs(b) {\n\t\t\treturn ErrPathNotAbsolute\n\t\t}\n\t} else if !ok && a != \"\" {\n\t\t// One component: the graph root.\n\t\tif !filepath.IsAbs(storeSpec) {\n\t\t\treturn ErrPathNotAbsolute\n\t\t}\n\t} else {\n\t\t// Anything else: scope specified in a form we don't\n\t\t// recognize.\n\t\treturn ErrInvalidReference\n\t}\n\t// That might be all of it, and that's okay.\n\tif scope == \"\" {\n\t\treturn nil\n\t}\n\n\tfields := strings.SplitN(scope, \"@\", 3)\n\tswitch len(fields) {\n\tcase 1: // name only\n\tcase 2: // name:tag@ID or name[:tag]@digest\n\t\tif idErr := validateImageID(fields[1]); idErr != nil {\n\t\t\tif _, digestErr := digest.Parse(fields[1]); digestErr != nil {\n\t\t\t\treturn fmt.Errorf(\"%v is neither a valid digest(%s) nor a valid ID(%s)\", fields[1], digestErr.Error(), idErr.Error())\n\t\t\t}\n\t\t}\n\tcase 3: // name[:tag]@digest@ID\n\t\tif _, err := digest.Parse(fields[1]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := validateImageID(fields[2]); err != nil {\n\t\t\treturn err\n\t\t}\n\tdefault: // Coverage: This should never happen\n\t\treturn errors.New(\"Internal error: unexpected number of fields form strings.SplitN\")\n\t}\n\t// As for field[0], if it is non-empty at all:\n\t// FIXME? We could be verifying the various character set and length restrictions\n\t// from docker/distribution/reference.regexp.go, but other than that there\n\t// are few semantically invalid strings.\n\treturn nil\n}\n\n// validateImageID returns nil if id is a valid (full) image ID, or an error\nfunc validateImageID(id string) error {\n\t_, err := digest.Parse(\"sha256:\" + id)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/tarball/doc.go",
    "content": "// Package tarball provides a way to generate images using one or more layer\n// tarballs and an optional template configuration.\n//\n// An example:\n//\n//\tpackage main\n//\n//\timport (\n//\t\t\"context\"\n//\n//\t\tcp \"go.podman.io/image/v5/copy\"\n//\t\t\"go.podman.io/image/v5/signature\"\n//\t\t\"go.podman.io/image/v5/tarball\"\n//\t\t\"go.podman.io/image/v5/transports/alltransports\"\n//\t\t\"go.podman.io/image/v5/types\"\n//\t\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n//\t)\n//\n//\tfunc imageFromTarball() {\n//\t\tsrc, err := alltransports.ParseImageName(\"tarball:/var/cache/mock/fedora-26-x86_64/root_cache/cache.tar.gz\")\n//\t\t// - or -\n//\t\t// src, err := tarball.Transport.ParseReference(\"/var/cache/mock/fedora-26-x86_64/root_cache/cache.tar.gz\")\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\t\tupdater, ok := src.(tarball.ConfigUpdater)\n//\t\tif !ok {\n//\t\t\tpanic(\"unexpected: a tarball reference should implement tarball.ConfigUpdater\")\n//\t\t}\n//\t\tconfig := imgspecv1.Image{\n//\t\t\tConfig: imgspecv1.ImageConfig{\n//\t\t\t\tCmd: []string{\"/bin/bash\"},\n//\t\t\t},\n//\t\t}\n//\t\tannotations := make(map[string]string)\n//\t\tannotations[imgspecv1.AnnotationDescription] = \"test image built from a mock root cache\"\n//\t\terr = updater.ConfigUpdate(config, annotations)\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\t\tdest, err := alltransports.ParseImageName(\"docker-daemon:mock:latest\")\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\n//\t\tpolicy, err := signature.DefaultPolicy(nil)\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\n//\t\tpc, err := signature.NewPolicyContext(policy)\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\t\tdefer pc.Destroy()\n//\t\t_, err = cp.Image(context.TODO(), pc, dest, src, nil)\n//\t\tif err != nil {\n//\t\t\tpanic(err)\n//\t\t}\n//\t}\npackage tarball\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/tarball/tarball_reference.go",
    "content": "package tarball\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"strings\"\n\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\t\"go.podman.io/image/v5/internal/image\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// ConfigUpdater is an interface that ImageReferences for \"tarball\" images also\n// implement.  It can be used to set values for a configuration, and to set\n// image annotations which will be present in the images returned by the\n// reference's NewImage() or NewImageSource() methods.\ntype ConfigUpdater interface {\n\tConfigUpdate(config imgspecv1.Image, annotations map[string]string) error\n}\n\ntype tarballReference struct {\n\tconfig      imgspecv1.Image\n\tannotations map[string]string\n\tfilenames   []string\n\tstdin       []byte\n}\n\n// ConfigUpdate updates the image's default configuration and adds annotations\n// which will be visible in source images created using this reference.\nfunc (r *tarballReference) ConfigUpdate(config imgspecv1.Image, annotations map[string]string) error {\n\tr.config = config\n\tif r.annotations == nil {\n\t\tr.annotations = make(map[string]string)\n\t}\n\tmaps.Copy(r.annotations, annotations)\n\treturn nil\n}\n\nfunc (r *tarballReference) Transport() types.ImageTransport {\n\treturn Transport\n}\n\nfunc (r *tarballReference) StringWithinTransport() string {\n\treturn strings.Join(r.filenames, \":\")\n}\n\nfunc (r *tarballReference) DockerReference() reference.Named {\n\treturn nil\n}\n\nfunc (r *tarballReference) PolicyConfigurationIdentity() string {\n\treturn \"\"\n}\n\nfunc (r *tarballReference) PolicyConfigurationNamespaces() []string {\n\treturn nil\n}\n\n// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n// The caller must call .Close() on the returned ImageCloser.\n// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\nfunc (r *tarballReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {\n\treturn image.FromReference(ctx, sys, r)\n}\n\nfunc (r *tarballReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {\n\tfor _, filename := range r.filenames {\n\t\tif err := os.Remove(filename); err != nil && !os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"error removing %q: %w\", filename, err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (r *tarballReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {\n\treturn nil, fmt.Errorf(`\"tarball:\" locations can only be read from, not written to`)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/tarball/tarball_src.go",
    "content": "package tarball\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\timgspecs \"github.com/opencontainers/image-spec/specs-go\"\n\timgspecv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/internal/imagesource/impl\"\n\t\"go.podman.io/image/v5/internal/imagesource/stubs\"\n\t\"go.podman.io/image/v5/pkg/compression\"\n\tcompressionTypes \"go.podman.io/image/v5/pkg/compression/types\"\n\t\"go.podman.io/image/v5/types\"\n)\n\ntype tarballImageSource struct {\n\timpl.Compat\n\timpl.PropertyMethodsInitialize\n\timpl.NoSignatures\n\timpl.DoesNotAffectLayerInfosForCopy\n\tstubs.NoGetBlobAtInitialize\n\n\treference tarballReference\n\tblobs     map[digest.Digest]tarballBlob\n\tmanifest  []byte\n}\n\n// tarballBlob is a blob that tarballImagSource can return by GetBlob.\ntype tarballBlob struct {\n\tcontents []byte // or nil to read from filename below\n\tfilename string // valid if contents == nil\n\tsize     int64\n}\n\nfunc (r *tarballReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {\n\t// Pick up the layer comment from the configuration's history list, if one is set.\n\tcomment := \"imported from tarball\"\n\tif len(r.config.History) > 0 && r.config.History[0].Comment != \"\" {\n\t\tcomment = r.config.History[0].Comment\n\t}\n\n\t// Gather up the digests, sizes, and history information for all of the files.\n\tblobs := map[digest.Digest]tarballBlob{}\n\tdiffIDs := []digest.Digest{}\n\tcreated := time.Time{}\n\thistory := []imgspecv1.History{}\n\tlayerDescriptors := []imgspecv1.Descriptor{}\n\tfor _, filename := range r.filenames {\n\t\tvar reader io.Reader\n\t\tvar blobTime time.Time\n\t\tvar blob tarballBlob\n\t\tif filename == \"-\" {\n\t\t\treader = bytes.NewReader(r.stdin)\n\t\t\tblobTime = time.Now()\n\t\t\tblob = tarballBlob{\n\t\t\t\tcontents: r.stdin,\n\t\t\t\tsize:     int64(len(r.stdin)),\n\t\t\t}\n\t\t} else {\n\t\t\tfile, err := os.Open(filename)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdefer file.Close()\n\t\t\treader = file\n\t\t\tfileinfo, err := file.Stat()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error reading size of %q: %w\", filename, err)\n\t\t\t}\n\t\t\tblobTime = fileinfo.ModTime()\n\t\t\tblob = tarballBlob{\n\t\t\t\tfilename: filename,\n\t\t\t\tsize:     fileinfo.Size(),\n\t\t\t}\n\t\t}\n\n\t\t// Set up to digest the file as it is.\n\t\tblobIDdigester := digest.Canonical.Digester()\n\t\treader = io.TeeReader(reader, blobIDdigester.Hash())\n\n\t\tvar layerType string\n\t\tvar diffIDdigester digest.Digester\n\t\t// If necessary, digest the file after we decompress it.\n\t\tif err := func() error { // A scope for defer\n\t\t\tformat, decompressor, reader, err := compression.DetectCompressionFormat(reader)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif decompressor != nil {\n\t\t\t\tuncompressed, err := decompressor(reader)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tdefer uncompressed.Close()\n\t\t\t\t// It is compressed, so the diffID is the digest of the uncompressed version\n\t\t\t\tdiffIDdigester = digest.Canonical.Digester()\n\t\t\t\treader = io.TeeReader(uncompressed, diffIDdigester.Hash())\n\t\t\t\tswitch format.Name() {\n\t\t\t\tcase compressionTypes.GzipAlgorithmName:\n\t\t\t\t\tlayerType = imgspecv1.MediaTypeImageLayerGzip\n\t\t\t\tcase compressionTypes.ZstdAlgorithmName:\n\t\t\t\t\tlayerType = imgspecv1.MediaTypeImageLayerZstd\n\t\t\t\tdefault: // This is incorrect, but we have no good options, and it is what this transport was historically doing.\n\t\t\t\t\tlayerType = imgspecv1.MediaTypeImageLayerGzip\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// It is not compressed, so the diffID and the blobID are going to be the same\n\t\t\t\tdiffIDdigester = blobIDdigester\n\t\t\t\tlayerType = imgspecv1.MediaTypeImageLayer\n\t\t\t}\n\t\t\t// TODO: This can take quite some time, and should ideally be cancellable using ctx.Done().\n\t\t\tif _, err := io.Copy(io.Discard, reader); err != nil {\n\t\t\t\treturn fmt.Errorf(\"error reading %q: %w\", filename, err)\n\t\t\t}\n\t\t\treturn nil\n\t\t}(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Grab our uncompressed and possibly-compressed digests and sizes.\n\t\tdiffID := diffIDdigester.Digest()\n\t\tblobID := blobIDdigester.Digest()\n\t\tdiffIDs = append(diffIDs, diffID)\n\t\tblobs[blobID] = blob\n\n\t\thistory = append(history, imgspecv1.History{\n\t\t\tCreated:   &blobTime,\n\t\t\tCreatedBy: fmt.Sprintf(\"/bin/sh -c #(nop) ADD file:%s in %c\", diffID.Encoded(), os.PathSeparator),\n\t\t\tComment:   comment,\n\t\t})\n\t\t// Use the mtime of the most recently modified file as the image's creation time.\n\t\tif created.Before(blobTime) {\n\t\t\tcreated = blobTime\n\t\t}\n\n\t\tlayerDescriptors = append(layerDescriptors, imgspecv1.Descriptor{\n\t\t\tDigest:    blobID,\n\t\t\tSize:      blob.size,\n\t\t\tMediaType: layerType,\n\t\t})\n\t}\n\n\t// Pick up other defaults from the config in the reference.\n\tconfig := r.config\n\tif config.Created == nil {\n\t\tconfig.Created = &created\n\t}\n\tif config.Architecture == \"\" {\n\t\tconfig.Architecture = runtime.GOARCH\n\t}\n\tif config.OS == \"\" {\n\t\tconfig.OS = runtime.GOOS\n\t}\n\tconfig.RootFS = imgspecv1.RootFS{\n\t\tType:    \"layers\",\n\t\tDiffIDs: diffIDs,\n\t}\n\tconfig.History = history\n\n\t// Encode and digest the image configuration blob.\n\tconfigBytes, err := json.Marshal(&config)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating configuration blob for %q: %w\", strings.Join(r.filenames, separator), err)\n\t}\n\tconfigID := digest.Canonical.FromBytes(configBytes)\n\tblobs[configID] = tarballBlob{\n\t\tcontents: configBytes,\n\t\tsize:     int64(len(configBytes)),\n\t}\n\n\t// Populate a manifest with the configuration blob and the layers.\n\tmanifest := imgspecv1.Manifest{\n\t\tVersioned: imgspecs.Versioned{SchemaVersion: 2},\n\t\tMediaType: imgspecv1.MediaTypeImageManifest,\n\t\tConfig: imgspecv1.Descriptor{\n\t\t\tDigest:    configID,\n\t\t\tSize:      int64(len(configBytes)),\n\t\t\tMediaType: imgspecv1.MediaTypeImageConfig,\n\t\t},\n\t\tLayers:      layerDescriptors,\n\t\tAnnotations: maps.Clone(r.annotations),\n\t}\n\n\t// Encode the manifest.\n\tmanifestBytes, err := json.Marshal(&manifest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error generating manifest for %q: %w\", strings.Join(r.filenames, separator), err)\n\t}\n\n\t// Return the image.\n\tsrc := &tarballImageSource{\n\t\tPropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{\n\t\t\tHasThreadSafeGetBlob: false,\n\t\t}),\n\t\tNoGetBlobAtInitialize: stubs.NoGetBlobAt(r),\n\n\t\treference: *r,\n\t\tblobs:     blobs,\n\t\tmanifest:  manifestBytes,\n\t}\n\tsrc.Compat = impl.AddCompat(src)\n\n\treturn src, nil\n}\n\nfunc (is *tarballImageSource) Close() error {\n\treturn nil\n}\n\n// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\nfunc (is *tarballImageSource) GetBlob(ctx context.Context, blobinfo types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {\n\tblob, ok := is.blobs[blobinfo.Digest]\n\tif !ok {\n\t\treturn nil, -1, fmt.Errorf(\"no blob with digest %q found\", blobinfo.Digest.String())\n\t}\n\tif blob.contents != nil {\n\t\treturn io.NopCloser(bytes.NewReader(blob.contents)), int64(len(blob.contents)), nil\n\t}\n\treader, err := os.Open(blob.filename)\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\treturn reader, blob.size, nil\n}\n\n// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n// It may use a remote (= slow) service.\n// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\nfunc (is *tarballImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {\n\tif instanceDigest != nil {\n\t\treturn nil, \"\", fmt.Errorf(\"manifest lists are not supported by the %q transport\", transportName)\n\t}\n\treturn is.manifest, imgspecv1.MediaTypeImageManifest, nil\n}\n\nfunc (is *tarballImageSource) Reference() types.ImageReference {\n\treturn &is.reference\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/tarball/tarball_transport.go",
    "content": "package tarball\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n)\n\nconst (\n\ttransportName = \"tarball\"\n\tseparator     = \":\"\n)\n\n// Transport implements the types.ImageTransport interface for \"tarball:\" images,\n// which are makeshift images constructed using one or more possibly-compressed tar\n// archives.\nvar Transport = &tarballTransport{}\n\ntype tarballTransport struct{}\n\nfunc (t *tarballTransport) Name() string {\n\treturn transportName\n}\n\nfunc (t *tarballTransport) ParseReference(reference string) (types.ImageReference, error) {\n\tvar stdin []byte\n\tvar err error\n\tfilenames := strings.Split(reference, separator)\n\tfor _, filename := range filenames {\n\t\tif filename == \"-\" {\n\t\t\tstdin, err = io.ReadAll(os.Stdin)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error buffering stdin: %w\", err)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tf, err := os.Open(filename)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error opening %q: %w\", filename, err)\n\t\t}\n\t\tf.Close()\n\t}\n\treturn NewReference(filenames, stdin)\n}\n\n// NewReference creates a new \"tarball:\" reference for the listed fileNames.\n// If any of the fileNames is \"-\", the contents of stdin are used instead.\nfunc NewReference(fileNames []string, stdin []byte) (types.ImageReference, error) {\n\tfor _, path := range fileNames {\n\t\tif strings.Contains(path, separator) {\n\t\t\treturn nil, fmt.Errorf(\"Invalid path %q: paths including the separator %q are not supported\", path, separator)\n\t\t}\n\t}\n\treturn &tarballReference{\n\t\tfilenames: fileNames,\n\t\tstdin:     stdin,\n\t}, nil\n}\n\nfunc (t *tarballTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// See the explanation in daemonReference.PolicyConfigurationIdentity.\n\treturn errors.New(`tarball: does not support any scopes except the default \"\" one`)\n}\n\nfunc init() {\n\ttransports.Register(Transport)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/alltransports/alltransports.go",
    "content": "package alltransports\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"go.podman.io/image/v5/transports\"\n\t\"go.podman.io/image/v5/types\"\n\n\t// Register all known transports.\n\t// NOTE: Make sure docs/containers-transports.5.md and docs/containers-policy.json.5.md are updated when adding or updating\n\t// a transport.\n\t_ \"go.podman.io/image/v5/directory\"\n\t_ \"go.podman.io/image/v5/docker\"\n\t_ \"go.podman.io/image/v5/docker/archive\"\n\t_ \"go.podman.io/image/v5/oci/archive\"\n\t_ \"go.podman.io/image/v5/oci/layout\"\n\t_ \"go.podman.io/image/v5/openshift\"\n\t_ \"go.podman.io/image/v5/sif\"\n\t_ \"go.podman.io/image/v5/tarball\"\n\t// The docker-daemon transport is registeredy by docker_daemon*.go\n\t// The storage transport is registered by storage*.go\n)\n\nfunc init() {\n\ttransports.Register(transports.NewStubTransport(\"ostree\")) // This transport was completely removed.\n}\n\n// ParseImageName converts a URL-like image name to a types.ImageReference.\nfunc ParseImageName(imgName string) (types.ImageReference, error) {\n\t// Keep this in sync with TransportFromImageName!\n\ttransportName, withinTransport, valid := strings.Cut(imgName, \":\")\n\tif !valid {\n\t\treturn nil, fmt.Errorf(`Invalid image name %q, expected colon-separated transport:reference`, imgName)\n\t}\n\ttransport := transports.Get(transportName)\n\tif transport == nil {\n\t\treturn nil, fmt.Errorf(`Invalid image name %q, unknown transport %q`, imgName, transportName)\n\t}\n\treturn transport.ParseReference(withinTransport)\n}\n\n// TransportFromImageName converts an URL-like name to a types.ImageTransport or nil when\n// the transport is unknown or when the input is invalid.\nfunc TransportFromImageName(imageName string) types.ImageTransport {\n\t// Keep this in sync with ParseImageName!\n\ttransportName, _, valid := strings.Cut(imageName, \":\")\n\tif valid {\n\t\treturn transports.Get(transportName)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/alltransports/docker_daemon.go",
    "content": "//go:build !containers_image_docker_daemon_stub\n\npackage alltransports\n\nimport (\n\t// Register the docker-daemon transport\n\t_ \"go.podman.io/image/v5/docker/daemon\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/alltransports/docker_daemon_stub.go",
    "content": "//go:build containers_image_docker_daemon_stub\n\npackage alltransports\n\nimport \"go.podman.io/image/v5/transports\"\n\nfunc init() {\n\ttransports.Register(transports.NewStubTransport(\"docker-daemon\"))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/alltransports/storage.go",
    "content": "//go:build !containers_image_storage_stub\n\npackage alltransports\n\nimport (\n\t// Register the storage transport\n\t_ \"go.podman.io/image/v5/storage\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/alltransports/storage_stub.go",
    "content": "//go:build containers_image_storage_stub\n\npackage alltransports\n\nimport \"go.podman.io/image/v5/transports\"\n\nfunc init() {\n\ttransports.Register(transports.NewStubTransport(\"containers-storage\"))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/stub.go",
    "content": "package transports\n\nimport (\n\t\"fmt\"\n\n\t\"go.podman.io/image/v5/types\"\n)\n\n// stubTransport is an implementation of types.ImageTransport which has a name, but rejects any references with “the transport $name: is not supported in this build”.\ntype stubTransport string\n\n// NewStubTransport returns an implementation of types.ImageTransport which has a name, but rejects any references with “the transport $name: is not supported in this build”.\nfunc NewStubTransport(name string) types.ImageTransport {\n\treturn stubTransport(name)\n}\n\n// Name returns the name of the transport, which must be unique among other transports.\nfunc (s stubTransport) Name() string {\n\treturn string(s)\n}\n\n// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\nfunc (s stubTransport) ParseReference(reference string) (types.ImageReference, error) {\n\treturn nil, fmt.Errorf(`The transport \"%s:\" is not supported in this build`, string(s))\n}\n\n// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n// scope passed to this function will not be \"\", that value is always allowed.\nfunc (s stubTransport) ValidatePolicyConfigurationScope(scope string) error {\n\t// Allowing any reference in here allows tools with some transports stubbed-out to still\n\t// use signature verification policies which refer to these stubbed-out transports.\n\t// See also the treatment of unknown transports in policyTransportScopesWithTransport.UnmarshalJSON .\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/transports/transports.go",
    "content": "package transports\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"sync\"\n\n\t\"go.podman.io/image/v5/internal/set\"\n\t\"go.podman.io/image/v5/types\"\n)\n\n// knownTransports is a registry of known ImageTransport instances.\ntype knownTransports struct {\n\ttransports map[string]types.ImageTransport\n\tmu         sync.Mutex\n}\n\nfunc (kt *knownTransports) Get(k string) types.ImageTransport {\n\tkt.mu.Lock()\n\tt := kt.transports[k]\n\tkt.mu.Unlock()\n\treturn t\n}\n\nfunc (kt *knownTransports) Remove(k string) {\n\tkt.mu.Lock()\n\tdelete(kt.transports, k)\n\tkt.mu.Unlock()\n}\n\nfunc (kt *knownTransports) Add(t types.ImageTransport) {\n\tkt.mu.Lock()\n\tdefer kt.mu.Unlock()\n\tname := t.Name()\n\tif t := kt.transports[name]; t != nil {\n\t\tpanic(fmt.Sprintf(\"Duplicate image transport name %s\", name))\n\t}\n\tkt.transports[name] = t\n}\n\nvar kt *knownTransports\n\nfunc init() {\n\tkt = &knownTransports{\n\t\ttransports: make(map[string]types.ImageTransport),\n\t}\n}\n\n// Get returns the transport specified by name or nil when unavailable.\nfunc Get(name string) types.ImageTransport {\n\treturn kt.Get(name)\n}\n\n// Delete deletes a transport from the registered transports.\nfunc Delete(name string) {\n\tkt.Remove(name)\n}\n\n// Register registers a transport.\nfunc Register(t types.ImageTransport) {\n\tkt.Add(t)\n}\n\n// ImageName converts a types.ImageReference into an URL-like image name, which MUST be such that\n// ParseImageName(ImageName(reference)) returns an equivalent reference.\n//\n// This is the generally recommended way to refer to images in the UI.\n//\n// NOTE: The returned string is not promised to be equal to the original input to ParseImageName;\n// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\nfunc ImageName(ref types.ImageReference) string {\n\treturn ref.Transport().Name() + \":\" + ref.StringWithinTransport()\n}\n\nvar deprecatedTransports = set.NewWithValues(\"atomic\", \"ostree\")\n\n// ListNames returns a list of non deprecated transport names.\n// Deprecated transports can be used, but are not presented to users.\nfunc ListNames() []string {\n\tkt.mu.Lock()\n\tdefer kt.mu.Unlock()\n\tvar names []string\n\tfor _, transport := range kt.transports {\n\t\tif !deprecatedTransports.Contains(transport.Name()) {\n\t\t\tnames = append(names, transport.Name())\n\t\t}\n\t}\n\tsort.Strings(names)\n\treturn names\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/types/types.go",
    "content": "package types\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"io\"\n\t\"net/url\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\tv1 \"github.com/opencontainers/image-spec/specs-go/v1\"\n\t\"go.podman.io/image/v5/docker/reference\"\n\tcompression \"go.podman.io/image/v5/pkg/compression/types\"\n)\n\n// ImageTransport is a top-level namespace for ways to store/load an image.\n// It should generally correspond to ImageSource/ImageDestination implementations.\n//\n// Note that ImageTransport is based on \"ways the users refer to image storage\", not necessarily on the underlying physical transport.\n// For example, all Docker References would be used within a single \"docker\" transport, regardless of whether the images are pulled over HTTP or HTTPS\n// (or, even, IPv4 or IPv6).\n//\n// OTOH all images using the same transport should (apart from versions of the image format), be interoperable.\n// For example, several different ImageTransport implementations may be based on local filesystem paths,\n// but using completely different formats for the contents of that path (a single tar file, a directory containing tarballs, a fully expanded container filesystem, ...)\n//\n// See also transports.KnownTransports.\ntype ImageTransport interface {\n\t// Name returns the name of the transport, which must be unique among other transports.\n\tName() string\n\t// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.\n\tParseReference(reference string) (ImageReference, error)\n\t// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys\n\t// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).\n\t// It is acceptable to allow an invalid value which will never be matched, it can \"only\" cause user confusion.\n\t// scope passed to this function will not be \"\", that value is always allowed.\n\tValidatePolicyConfigurationScope(scope string) error\n}\n\n// ImageReference is an abstracted way to refer to an image location, namespaced within an ImageTransport.\n//\n// The object should preferably be immutable after creation, with any parsing/state-dependent resolving happening\n// within an ImageTransport.ParseReference() or equivalent API creating the reference object.\n// That's also why the various identification/formatting methods of this type do not support returning errors.\n//\n// WARNING: While this design freezes the content of the reference within this process, it can not freeze the outside\n// world: paths may be replaced by symlinks elsewhere, HTTP APIs may start returning different results, and so on.\ntype ImageReference interface {\n\tTransport() ImageTransport\n\t// StringWithinTransport returns a string representation of the reference, which MUST be such that\n\t// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.\n\t// NOTE: The returned string is not promised to be equal to the original input to ParseReference;\n\t// e.g. default attribute values omitted by the user may be filled in the return value, or vice versa.\n\t// WARNING: Do not use the return value in the UI to describe an image, it does not contain the Transport().Name() prefix;\n\t// instead, see transports.ImageName().\n\tStringWithinTransport() string\n\n\t// DockerReference returns a Docker reference associated with this reference\n\t// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,\n\t// not e.g. after redirect or alias processing), or nil if unknown/not applicable.\n\tDockerReference() reference.Named\n\n\t// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.\n\t// This MUST reflect user intent, not e.g. after processing of third-party redirects or aliases;\n\t// The value SHOULD be fully explicit about its semantics, with no hidden defaults, AND canonical\n\t// (i.e. various references with exactly the same semantics should return the same configuration identity)\n\t// It is fine for the return value to be equal to StringWithinTransport(), and it is desirable but\n\t// not required/guaranteed that it will be a valid input to Transport().ParseReference().\n\t// Returns \"\" if configuration identities for these references are not supported.\n\tPolicyConfigurationIdentity() string\n\n\t// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search\n\t// for if explicit configuration for PolicyConfigurationIdentity() is not set.  The list will be processed\n\t// in order, terminating on first match, and an implicit \"\" is always checked at the end.\n\t// It is STRONGLY recommended for the first element, if any, to be a prefix of PolicyConfigurationIdentity(),\n\t// and each following element to be a prefix of the element preceding it.\n\tPolicyConfigurationNamespaces() []string\n\n\t// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.\n\t// The caller must call .Close() on the returned ImageCloser.\n\t// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,\n\t// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.\n\t// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.\n\tNewImage(ctx context.Context, sys *SystemContext) (ImageCloser, error)\n\t// NewImageSource returns a types.ImageSource for this reference.\n\t// The caller must call .Close() on the returned ImageSource.\n\tNewImageSource(ctx context.Context, sys *SystemContext) (ImageSource, error)\n\t// NewImageDestination returns a types.ImageDestination for this reference.\n\t// The caller must call .Close() on the returned ImageDestination.\n\tNewImageDestination(ctx context.Context, sys *SystemContext) (ImageDestination, error)\n\n\t// DeleteImage deletes the named image from the registry, if supported.\n\tDeleteImage(ctx context.Context, sys *SystemContext) error\n}\n\n// LayerCompression indicates if layers must be compressed, decompressed or preserved\ntype LayerCompression int\n\nconst (\n\t// PreserveOriginal indicates the layer must be preserved, ie\n\t// no compression or decompression.\n\tPreserveOriginal LayerCompression = iota\n\t// Decompress indicates the layer must be decompressed\n\tDecompress\n\t// Compress indicates the layer must be compressed\n\tCompress\n)\n\n// LayerCrypto indicates if layers have been encrypted or decrypted or none\ntype LayerCrypto int\n\nconst (\n\t// PreserveOriginalCrypto indicates the layer must be preserved, ie\n\t// no encryption/decryption\n\tPreserveOriginalCrypto LayerCrypto = iota\n\t// Encrypt indicates the layer is encrypted\n\tEncrypt\n\t// Decrypt indicates the layer is decrypted\n\tDecrypt\n)\n\n// BlobInfo collects known information about a blob (layer/config).\n// In some situations, some fields may be unknown, in others they may be mandatory; documenting an “unknown” value here does not override that.\ntype BlobInfo struct {\n\tDigest      digest.Digest // \"\" if unknown.\n\tSize        int64         // -1 if unknown\n\tURLs        []string\n\tAnnotations map[string]string\n\tMediaType   string\n\n\t// NOTE: The following fields contain desired _edits_ to blob infos.\n\t// Conceptually then don't belong in the BlobInfo object at all;\n\t// the edits should be provided specifically as parameters to the edit implementation.\n\t// We can’t remove the fields without breaking compatibility, but don’t\n\t// add any more.\n\n\t// CompressionOperation is used in Image.UpdateLayerInfos to instruct\n\t// whether the original layer's \"compressed or not\" should be preserved,\n\t// possibly while changing the compression algorithm from one to another,\n\t// or if it should be changed to compressed or decompressed.\n\t// The field defaults to preserve the original layer's compressedness.\n\t// TODO: To remove together with CryptoOperation in re-design to remove\n\t// field out of BlobInfo.\n\tCompressionOperation LayerCompression\n\t// CompressionAlgorithm is used in Image.UpdateLayerInfos to set the correct\n\t// MIME type for compressed layers (e.g., gzip or zstd). This field MUST be\n\t// set when `CompressionOperation == Compress` and MAY be set when\n\t// `CompressionOperation == PreserveOriginal` and the compression type is\n\t// being changed for an already-compressed layer.\n\tCompressionAlgorithm *compression.Algorithm\n\t// CryptoOperation is used in Image.UpdateLayerInfos to instruct\n\t// whether the original layer was encrypted/decrypted\n\t// TODO: To remove together with CompressionOperation in re-design to\n\t// remove field out of BlobInfo.\n\tCryptoOperation LayerCrypto\n\t// Before adding any fields to this struct, read the NOTE above.\n}\n\n// BICTransportScope encapsulates transport-dependent representation of a “scope” where blobs are or are not present.\n// BlobInfocache.RecordKnownLocations / BlobInfocache.CandidateLocations record data about blobs keyed by (scope, digest).\n// The scope will typically be similar to an ImageReference, or a superset of it within which blobs are reusable.\n//\n// NOTE: The contents of this structure may be recorded in a persistent file, possibly shared across different\n// tools which use different versions of the transport.  Allow for reasonable backward/forward compatibility,\n// at least by not failing hard when encountering unknown data.\ntype BICTransportScope struct {\n\tOpaque string\n}\n\n// BICLocationReference encapsulates transport-dependent representation of a blob location within a BICTransportScope.\n// Each transport can store arbitrary data using BlobInfoCache.RecordKnownLocation, and ImageDestination.TryReusingBlob\n// can look it up using BlobInfoCache.CandidateLocations.\n//\n// NOTE: The contents of this structure may be recorded in a persistent file, possibly shared across different\n// tools which use different versions of the transport.  Allow for reasonable backward/forward compatibility,\n// at least by not failing hard when encountering unknown data.\ntype BICLocationReference struct {\n\tOpaque string\n}\n\n// BICReplacementCandidate is an item returned by BlobInfoCache.CandidateLocations.\ntype BICReplacementCandidate struct {\n\tDigest   digest.Digest\n\tLocation BICLocationReference\n}\n\n// BlobInfoCache records data useful for reusing blobs, or substituting equivalent ones, to avoid unnecessary blob copies.\n//\n// It records two kinds of data:\n//\n//   - Sets of corresponding digest vs. uncompressed digest (\"DiffID\") pairs:\n//     One of the two digests is known to be uncompressed, and a single uncompressed digest may correspond to more than one compressed digest.\n//     This allows matching compressed layer blobs to existing local uncompressed layers (to avoid unnecessary download and decompression),\n//     or uncompressed layer blobs to existing remote compressed layers (to avoid unnecessary compression and upload)/\n//\n//     It is allowed to record an (uncompressed digest, the same uncompressed digest) correspondence, to express that the digest is known\n//     to be uncompressed (i.e. that a conversion from schema1 does not have to decompress the blob to compute a DiffID value).\n//\n//     This mapping is primarily maintained in generic copy.Image code, but transports may want to contribute more data points if they independently\n//     compress/decompress blobs for their own purposes.\n//\n//   - Known blob locations, managed by individual transports:\n//     The transports call RecordKnownLocation when encountering a blob that could possibly be reused (typically in GetBlob/PutBlob/TryReusingBlob),\n//     recording transport-specific information that allows the transport to reuse the blob in the future;\n//     then, TryReusingBlob implementations can call CandidateLocations to look up previously recorded blob locations that could be reused.\n//\n//     Each transport defines its own “scopes” within which blob reuse is possible (e.g. in, the docker/distribution case, blobs\n//     can be directly reused within a registry, or mounted across registries within a registry server.)\n//\n// None of the methods return an error indication: errors when neither reading from, nor writing to, the cache, should be fatal;\n// users of the cache should just fall back to copying the blobs the usual way.\n//\n// The BlobInfoCache interface is deprecated.  Consumers of this library should use one of the implementations provided by\n// subpackages of the library's \"pkg/blobinfocache\" package in preference to implementing the interface on their own.\ntype BlobInfoCache interface {\n\t// UncompressedDigest returns an uncompressed digest corresponding to anyDigest.\n\t// May return anyDigest if it is known to be uncompressed.\n\t// Returns \"\" if nothing is known about the digest (it may be compressed or uncompressed).\n\tUncompressedDigest(anyDigest digest.Digest) digest.Digest\n\t// RecordDigestUncompressedPair records that the uncompressed version of anyDigest is uncompressed.\n\t// It’s allowed for anyDigest == uncompressed.\n\t// WARNING: Only call this for LOCALLY VERIFIED data; don’t record a digest pair just because some remote author claims so (e.g.\n\t// because a manifest/config pair exists); otherwise the cache could be poisoned and allow substituting unexpected blobs.\n\t// (Eventually, the DiffIDs in image config could detect the substitution, but that may be too late, and not all image formats contain that data.)\n\tRecordDigestUncompressedPair(anyDigest digest.Digest, uncompressed digest.Digest)\n\n\t// RecordKnownLocation records that a blob with the specified digest exists within the specified (transport, scope) scope,\n\t// and can be reused given the opaque location data.\n\tRecordKnownLocation(transport ImageTransport, scope BICTransportScope, digest digest.Digest, location BICLocationReference)\n\t// CandidateLocations returns a prioritized, limited, number of blobs and their locations that could possibly be reused\n\t// within the specified (transport scope) (if they still exist, which is not guaranteed).\n\t//\n\t// If !canSubstitute, the returned candidates will match the submitted digest exactly; if canSubstitute,\n\t// data from previous RecordDigestUncompressedPair calls is used to also look up variants of the blob which have the same\n\t// uncompressed digest.\n\tCandidateLocations(transport ImageTransport, scope BICTransportScope, digest digest.Digest, canSubstitute bool) []BICReplacementCandidate\n}\n\n// ImageSource is a service, possibly remote (= slow), to download components of a single image or a named image set (manifest list).\n// This is primarily useful for copying images around; for examining their properties, Image (below)\n// is usually more useful.\n// Each ImageSource should eventually be closed by calling Close().\n//\n// WARNING: Various methods which return an object identified by digest generally do not\n// validate that the returned data actually matches that digest; this is the caller’s responsibility.\n// See the individual methods’ documentation for potentially more details.\ntype ImageSource interface {\n\t// Reference returns the reference used to set up this source, _as specified by the user_\n\t// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\n\tReference() ImageReference\n\t// Close removes resources associated with an initialized ImageSource, if any.\n\tClose() error\n\t// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).\n\t// It may use a remote (= slow) service.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);\n\t// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).\n\t//\n\t// WARNING: This is a raw access to the data as provided by the source; if the reference contains a digest, or instanceDigest is set,\n\t// callers must enforce the digest match themselves, typically by using image.UnparsedInstance to access the manifest instead\n\t// of calling this directly. (Compare the generic warning applicable to all of the [ImageSource] interface.)\n\tGetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error)\n\t// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).\n\t// The Digest field in BlobInfo is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n\t// May update BlobInfoCache, preferably after it knows for certain that a blob truly exists at a specific location.\n\t//\n\t// WARNING: This is a raw access to the data as provided by the source; callers must validate the contents\n\t// against the blob’s digest themselves. (Compare the generic warning applicable to all of the [ImageSource] interface.)\n\tGetBlob(context.Context, BlobInfo, BlobInfoCache) (io.ReadCloser, int64, error)\n\t// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.\n\tHasThreadSafeGetBlob() bool\n\t// GetSignatures returns the image's signatures.  It may use a remote (= slow) service.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for\n\t// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n\t// (e.g. if the source never returns manifest lists).\n\tGetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error)\n\t// LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer\n\t// blobsums that are listed in the image's manifest.  If values are returned, they should be used when using GetBlob()\n\t// to read the image's layers.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve BlobInfos for\n\t// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list\n\t// (e.g. if the source never returns manifest lists).\n\t// The Digest field is guaranteed to be provided; Size may be -1.\n\t// WARNING: The list may contain duplicates, and they are semantically relevant.\n\tLayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]BlobInfo, error)\n}\n\n// ImageDestination is a service, possibly remote (= slow), to store components of a single image.\n//\n// There is a specific required order for some of the calls:\n// TryReusingBlob/PutBlob on the various blobs, if any, MUST be called before PutManifest (manifest references blobs, which may be created or compressed only at push time)\n// PutSignatures, if called, MUST be called after PutManifest (signatures reference manifest contents)\n// Finally, Commit MUST be called if the caller wants the image, as formed by the components saved above, to persist.\n//\n// Each ImageDestination should eventually be closed by calling Close().\ntype ImageDestination interface {\n\t// Reference returns the reference used to set up this destination.  Note that this should directly correspond to user's intent,\n\t// e.g. it should use the public hostname instead of the result of resolving CNAMEs or following redirects.\n\tReference() ImageReference\n\t// Close removes resources associated with an initialized ImageDestination, if any.\n\tClose() error\n\n\t// SupportedManifestMIMETypes tells which manifest mime types the destination supports\n\t// If an empty slice or nil it's returned, then any mime type can be tried to upload\n\tSupportedManifestMIMETypes() []string\n\t// SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures.\n\t// Note: It is still possible for PutSignatures to fail if SupportsSignatures returns nil.\n\tSupportsSignatures(ctx context.Context) error\n\t// DesiredLayerCompression indicates the kind of compression to apply on layers\n\tDesiredLayerCompression() LayerCompression\n\t// AcceptsForeignLayerURLs returns false iff foreign layers in manifest should be actually\n\t// uploaded to the image destination, true otherwise.\n\tAcceptsForeignLayerURLs() bool\n\t// MustMatchRuntimeOS returns true iff the destination can store only images targeted for the current runtime architecture and OS. False otherwise.\n\tMustMatchRuntimeOS() bool\n\t// IgnoresEmbeddedDockerReference() returns true iff the destination does not care about Image.EmbeddedDockerReferenceConflicts(),\n\t// and would prefer to receive an unmodified manifest instead of one modified for the destination.\n\t// Does not make a difference if Reference().DockerReference() is nil.\n\tIgnoresEmbeddedDockerReference() bool\n\n\t// PutBlob writes contents of stream and returns data representing the result.\n\t// inputInfo.Digest can be optionally provided if known; if provided, and stream is read to the end without error, the digest MUST match the stream contents.\n\t// inputInfo.Size is the expected length of stream, if known.\n\t// inputInfo.MediaType describes the blob format, if known.\n\t// May update cache.\n\t// WARNING: The contents of stream are being verified on the fly.  Until stream.Read() returns io.EOF, the contents of the data SHOULD NOT be available\n\t// to any other readers for download using the supplied digest.\n\t// If stream.Read() at any time, ESPECIALLY at end of input, returns an error, PutBlob MUST 1) fail, and 2) delete any data stored so far.\n\tPutBlob(ctx context.Context, stream io.Reader, inputInfo BlobInfo, cache BlobInfoCache, isConfig bool) (BlobInfo, error)\n\t// HasThreadSafePutBlob indicates whether PutBlob can be executed concurrently.\n\tHasThreadSafePutBlob() bool\n\t// TryReusingBlob checks whether the transport already contains, or can efficiently reuse, a blob, and if so, applies it to the current destination\n\t// (e.g. if the blob is a filesystem layer, this signifies that the changes it describes need to be applied again when composing a filesystem tree).\n\t// info.Digest must not be empty.\n\t// If canSubstitute, TryReusingBlob can use an equivalent equivalent of the desired blob; in that case the returned info may not match the input.\n\t// If the blob has been successfully reused, returns (true, info, nil); info must contain at least a digest and size, and may\n\t// include CompressionOperation and CompressionAlgorithm fields to indicate that a change to the compression type should be\n\t// reflected in the manifest that will be written.\n\t// If the transport can not reuse the requested blob, TryReusingBlob returns (false, {}, nil); it returns a non-nil error only on an unexpected failure.\n\t// May use and/or update cache.\n\tTryReusingBlob(ctx context.Context, info BlobInfo, cache BlobInfoCache, canSubstitute bool) (bool, BlobInfo, error)\n\t// PutManifest writes manifest to the destination.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write the manifest for\n\t// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n\t// It is expected but not enforced that the instanceDigest, when specified, matches the digest of `manifest` as generated\n\t// by `manifest.Digest()`.\n\t// FIXME? This should also receive a MIME type if known, to differentiate between schema versions.\n\t// If the destination is in principle available, refuses this manifest type (e.g. it does not recognize the schema),\n\t// but may accept a different manifest type, the returned error must be an ManifestTypeRejectedError.\n\tPutManifest(ctx context.Context, manifest []byte, instanceDigest *digest.Digest) error\n\t// PutSignatures writes a set of signatures to the destination.\n\t// If instanceDigest is not nil, it contains a digest of the specific manifest instance to write or overwrite the signatures for\n\t// (when the primary manifest is a manifest list); this should always be nil if the primary manifest is not a manifest list.\n\t// MUST be called after PutManifest (signatures may reference manifest contents).\n\tPutSignatures(ctx context.Context, signatures [][]byte, instanceDigest *digest.Digest) error\n\t// Commit marks the process of storing the image as successful and asks for the image to be persisted.\n\t// unparsedToplevel contains data about the top-level manifest of the source (which may be a single-arch image or a manifest list\n\t// if PutManifest was only called for the single-arch image with instanceDigest == nil), primarily to allow lookups by the\n\t// original manifest list digest, if desired.\n\t// WARNING: This does not have any transactional semantics:\n\t// - Uploaded data MAY be visible to others before Commit() is called\n\t// - Uploaded data MAY be removed or MAY remain around if Close() is called without Commit() (i.e. rollback is allowed but not guaranteed)\n\tCommit(ctx context.Context, unparsedToplevel UnparsedImage) error\n}\n\n// ManifestTypeRejectedError is returned by ImageDestination.PutManifest if the destination is in principle available,\n// refuses specifically this manifest type, but may accept a different manifest type.\ntype ManifestTypeRejectedError struct { // We only use a struct to allow a type assertion, without limiting the contents of the error otherwise.\n\tErr error\n}\n\nfunc (e ManifestTypeRejectedError) Error() string {\n\treturn e.Err.Error()\n}\n\n// UnparsedImage is an Image-to-be; until it is verified and accepted, it only caries its identity and caches manifest and signature blobs.\n// Thus, an UnparsedImage can be created from an ImageSource simply by fetching blobs without interpreting them,\n// allowing cryptographic signature verification to happen first, before even fetching the manifest, or parsing anything else.\n// This also makes the UnparsedImage→Image conversion an explicitly visible step.\n//\n// An UnparsedImage is a pair of (ImageSource, instance digest); it can represent either a manifest list or a single image instance.\n//\n// The UnparsedImage must not be used after the underlying ImageSource is Close()d.\ntype UnparsedImage interface {\n\t// Reference returns the reference used to set up this source, _as specified by the user_\n\t// (not as the image itself, or its underlying storage, claims).  This can be used e.g. to determine which public keys are trusted for this image.\n\tReference() ImageReference\n\t// Manifest is like ImageSource.GetManifest, but the result is cached; it is OK to call this however often you need.\n\tManifest(ctx context.Context) ([]byte, string, error)\n\t// Signatures is like ImageSource.GetSignatures, but the result is cached; it is OK to call this however often you need.\n\tSignatures(ctx context.Context) ([][]byte, error)\n}\n\n// Image is the primary API for inspecting properties of images.\n// An Image is based on a pair of (ImageSource, instance digest); it can represent either a manifest list or a single image instance.\n//\n// The Image must not be used after the underlying ImageSource is Close()d.\ntype Image interface {\n\t// Note that Reference may return nil in the return value of UpdatedImage!\n\tUnparsedImage\n\t// ConfigInfo returns a complete BlobInfo for the separate config object, or a BlobInfo{Digest:\"\"} if there isn't a separate object.\n\t// Note that the config object may not exist in the underlying storage in the return value of UpdatedImage! Use ConfigBlob() below.\n\tConfigInfo() BlobInfo\n\t// ConfigBlob returns the blob described by ConfigInfo, if ConfigInfo().Digest != \"\"; nil otherwise.\n\t// The result is cached; it is OK to call this however often you need.\n\tConfigBlob(context.Context) ([]byte, error)\n\t// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about\n\t// layers in the resulting configuration isn't guaranteed to be returned to due how\n\t// old image manifests work (docker v2s1 especially).\n\tOCIConfig(context.Context) (*v1.Image, error)\n\t// LayerInfos returns a list of BlobInfos of layers referenced by this image, in order (the root layer first, and then successive layered layers).\n\t// The Digest field is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n\t// WARNING: The list may contain duplicates, and they are semantically relevant.\n\tLayerInfos() []BlobInfo\n\t// LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer blobsums that are listed in the image's manifest.\n\t// The Digest field is guaranteed to be provided, Size may be -1 and MediaType may be optionally provided.\n\t// WARNING: The list may contain duplicates, and they are semantically relevant.\n\tLayerInfosForCopy(context.Context) ([]BlobInfo, error)\n\t// EmbeddedDockerReferenceConflicts whether a Docker reference embedded in the manifest, if any, conflicts with destination ref.\n\t// It returns false if the manifest does not embed a Docker reference.\n\t// (This embedding unfortunately happens for Docker schema1, please do not add support for this in any new formats.)\n\tEmbeddedDockerReferenceConflicts(ref reference.Named) bool\n\t// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.\n\tInspect(context.Context) (*ImageInspectInfo, error)\n\t// UpdatedImageNeedsLayerDiffIDs returns true iff UpdatedImage(options) needs InformationOnly.LayerDiffIDs.\n\t// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute\n\t// (most importantly it forces us to download the full layers even if they are already present at the destination).\n\tUpdatedImageNeedsLayerDiffIDs(options ManifestUpdateOptions) bool\n\t// UpdatedImage returns a types.Image modified according to options.\n\t// Everything in options.InformationOnly should be provided, other fields should be set only if a modification is desired.\n\t// This does not change the state of the original Image object.\n\t// The returned error will be a manifest.ManifestLayerCompressionIncompatibilityError if\n\t// manifests of type options.ManifestMIMEType can not include layers that are compressed\n\t// in accordance with the CompressionOperation and CompressionAlgorithm specified in one\n\t// or more options.LayerInfos items, though retrying with a different\n\t// options.ManifestMIMEType or with different CompressionOperation+CompressionAlgorithm\n\t// values might succeed.\n\tUpdatedImage(ctx context.Context, options ManifestUpdateOptions) (Image, error)\n\t// SupportsEncryption returns an indicator that the image supports encryption\n\t//\n\t// Deprecated: Initially used to determine if a manifest can be copied from a source manifest type since\n\t// the process of updating a manifest between different manifest types was to update then convert.\n\t// This resulted in some fields in the update being lost. This has been fixed by: https://github.com/containers/image/pull/836\n\tSupportsEncryption(ctx context.Context) bool\n\t// Size returns an approximation of the amount of disk space which is consumed by the image in its current\n\t// location.  If the size is not known, -1 will be returned.\n\tSize() (int64, error)\n}\n\n// ImageCloser is an Image with a Close() method which must be called by the user.\n// This is returned by ImageReference.NewImage, which transparently instantiates a types.ImageSource,\n// to ensure that the ImageSource is closed.\ntype ImageCloser interface {\n\tImage\n\t// Close removes resources associated with an initialized ImageCloser.\n\tClose() error\n}\n\n// ManifestUpdateOptions is a way to pass named optional arguments to Image.UpdatedImage\ntype ManifestUpdateOptions struct {\n\tLayerInfos              []BlobInfo // Complete BlobInfos (size+digest+urls+annotations) which should replace the originals, in order (the root layer first, and then successive layered layers). BlobInfos' MediaType fields are ignored.\n\tEmbeddedDockerReference reference.Named\n\tManifestMIMEType        string\n\t// The values below are NOT requests to modify the image; they provide optional context which may or may not be used.\n\tInformationOnly ManifestUpdateInformation\n}\n\n// ManifestUpdateInformation is a component of ManifestUpdateOptions, named here\n// only to make writing struct literals possible.\ntype ManifestUpdateInformation struct {\n\tDestination  ImageDestination // and yes, UpdatedImage may write to Destination (see the schema2 → schema1 conversion logic in image/docker_schema2.go)\n\tLayerInfos   []BlobInfo       // Complete BlobInfos (size+digest) which have been uploaded, in order (the root layer first, and then successive layered layers)\n\tLayerDiffIDs []digest.Digest  // Digest values for the _uncompressed_ contents of the blobs which have been uploaded, in the same order.\n}\n\n// ImageInspectInfo is a set of metadata describing Docker images, primarily their manifest and configuration.\n// The Tag field is a legacy field which is here just for the Docker v2s1 manifest. It won't be supported\n// for other manifest types.\ntype ImageInspectInfo struct {\n\tTag           string\n\tCreated       *time.Time\n\tDockerVersion string\n\tLabels        map[string]string\n\tArchitecture  string\n\tVariant       string\n\tOs            string\n\tLayers        []string\n\tLayersData    []ImageInspectLayer\n\tEnv           []string\n\tAuthor        string\n}\n\n// ImageInspectLayer is a set of metadata describing an image layers' detail\ntype ImageInspectLayer struct {\n\tMIMEType    string // \"\" if unknown.\n\tDigest      digest.Digest\n\tSize        int64 // -1 if unknown.\n\tAnnotations map[string]string\n}\n\n// DockerAuthConfig contains authorization information for connecting to a registry.\n// the value of Username and Password can be empty for accessing the registry anonymously\ntype DockerAuthConfig struct {\n\tUsername string\n\tPassword string\n\t// IdentityToken can be used as an refresh_token in place of username and\n\t// password to obtain the bearer/access token in oauth2 flow. If identity\n\t// token is set, password should not be set.\n\t// Ref: https://docs.docker.com/registry/spec/auth/oauth/\n\tIdentityToken string\n}\n\n// OptionalBool is a boolean with an additional undefined value, which is meant\n// to be used in the context of user input to distinguish between a\n// user-specified value and a default value.\ntype OptionalBool byte\n\nconst (\n\t// OptionalBoolUndefined indicates that the OptionalBoolean hasn't been written.\n\tOptionalBoolUndefined OptionalBool = iota\n\t// OptionalBoolTrue represents the boolean true.\n\tOptionalBoolTrue\n\t// OptionalBoolFalse represents the boolean false.\n\tOptionalBoolFalse\n)\n\n// NewOptionalBool converts the input bool into either OptionalBoolTrue or\n// OptionalBoolFalse.  The function is meant to avoid boilerplate code of users.\nfunc NewOptionalBool(b bool) OptionalBool {\n\to := OptionalBoolFalse\n\tif b {\n\t\to = OptionalBoolTrue\n\t}\n\treturn o\n}\n\n// ShortNameMode defines the mode of short-name resolution.\n//\n// The use of unqualified-search registries entails an ambiguity as it's\n// unclear from which registry a given image, referenced by a short name, may\n// be pulled from.\n//\n// The ShortNameMode type defines how short names should resolve.\ntype ShortNameMode int\n\nconst (\n\tShortNameModeInvalid ShortNameMode = iota\n\t// Use all configured unqualified-search registries without prompting\n\t// the user.\n\tShortNameModeDisabled\n\t// If stdout and stdin are a TTY, prompt the user to select a configured\n\t// unqualified-search registry. Otherwise, use all configured\n\t// unqualified-search registries.\n\t//\n\t// Note that if only one unqualified-search registry is set, it will be\n\t// used without prompting.\n\tShortNameModePermissive\n\t// Always prompt the user to select a configured unqualified-search\n\t// registry.  Throw an error if stdout or stdin is not a TTY as\n\t// prompting isn't possible.\n\t//\n\t// Note that if only one unqualified-search registry is set, it will be\n\t// used without prompting.\n\tShortNameModeEnforcing\n)\n\n// SystemContext allows parameterizing access to implicitly-accessed resources,\n// like configuration files in /etc and users' login state in their home directory.\n// Various components can share the same field only if their semantics is exactly\n// the same; if in doubt, add a new field.\n// It is always OK to pass nil instead of a SystemContext.\ntype SystemContext struct {\n\t// If not \"\", prefixed to any absolute paths used by default by the library (e.g. in /etc/).\n\t// Not used for any of the more specific path overrides available in this struct.\n\t// Not used for any paths specified by users in config files (even if the location of the config file _was_ affected by it).\n\t// NOTE: If this is set, environment-variable overrides of paths are ignored (to keep the semantics simple: to create an /etc replacement, just set RootForImplicitAbsolutePaths .\n\t// and there is no need to worry about the environment.)\n\t// NOTE: This does NOT affect paths starting by $HOME.\n\tRootForImplicitAbsolutePaths string\n\n\t// === Global configuration overrides ===\n\t// If not \"\", overrides the system's default path for signature.Policy configuration.\n\tSignaturePolicyPath string\n\t// If not \"\", overrides the system's default path for registries.d (Docker signature storage configuration)\n\tRegistriesDirPath string\n\t// Path to the system-wide registries configuration file\n\tSystemRegistriesConfPath string\n\t// Path to the system-wide registries configuration directory\n\tSystemRegistriesConfDirPath string\n\t// Path to the user-specific short-names configuration file\n\tUserShortNameAliasConfPath string\n\t// If set, short-name resolution in pkg/shortnames must follow the specified mode\n\tShortNameMode *ShortNameMode\n\t// If set, short names will resolve in pkg/shortnames to docker.io only, and unqualified-search registries and\n\t// short-name aliases in registries.conf are ignored.  Note that this field is only intended to help enforce\n\t// resolving to Docker Hub in the Docker-compatible REST API of Podman; it should never be used outside this\n\t// specific context.\n\tPodmanOnlyShortNamesIgnoreRegistriesConfAndForceDockerHub bool\n\t// If not \"\", overrides the default path for the registry authentication file, but only new format files\n\tAuthFilePath string\n\t// if not \"\", overrides the default path for the registry authentication file, but with the legacy format;\n\t// the code currently will by default look for legacy format files like .dockercfg in the $HOME dir;\n\t// but in addition to the home dir, openshift may mount .dockercfg files (via secret mount)\n\t// in locations other than the home dir; openshift components should then set this field in those cases;\n\t// this field is ignored if `AuthFilePath` is set (we favor the newer format);\n\t// only reading of this data is supported;\n\tLegacyFormatAuthFilePath string\n\t// If set, a path to a Docker-compatible \"config.json\" file containing credentials; and no other files are processed.\n\t// This must not be set if AuthFilePath is set.\n\t// Only credentials and credential helpers in this file apre processed, not any other configuration in this file.\n\tDockerCompatAuthFilePath string\n\t// If not \"\", overrides the use of platform.GOARCH when choosing an image or verifying architecture match.\n\tArchitectureChoice string\n\t// If not \"\", overrides the use of platform.GOOS when choosing an image or verifying OS match.\n\tOSChoice string\n\t// If not \"\", overrides the use of detected ARM platform variant when choosing an image or verifying variant match.\n\tVariantChoice string\n\t// If not \"\", overrides the system's default directory containing a blob info cache.\n\tBlobInfoCacheDir string\n\t// Additional tags when creating or copying a docker-archive.\n\tDockerArchiveAdditionalTags []reference.NamedTagged\n\t// If not \"\", overrides the temporary directory to use for storing big files\n\tBigFilesTemporaryDir string\n\t// If not nil, may contain TLS _algorithm_ options (e.g. TLS version, cipher suites, “curves”, etc.)\n\t// The effect of setting any other options (cryptographic keys, InsecureSkipTLSVerify, callbacks, etc.) is UNDEFINED,\n\t// may be inconsistent in various use cases, and may change over time.\n\t// Consumers of this value are expected to .Clone() the config and then apply other options.\n\tBaseTLSConfig *tls.Config\n\n\t// === OCI.Transport overrides ===\n\t// If not \"\", a directory containing a CA certificate (ending with \".crt\"),\n\t// a client certificate (ending with \".cert\") and a client certificate key\n\t// (ending with \".key\") used when downloading OCI image layers.\n\tOCICertPath string\n\t// Allow downloading OCI image layers over HTTP, or HTTPS with failed TLS verification. Note that this does not affect other TLS connections.\n\tOCIInsecureSkipTLSVerify bool\n\t// If not \"\", use a shared directory for storing blobs rather than within OCI layouts\n\tOCISharedBlobDirPath string\n\t// Allow UnCompress image layer for OCI image layer\n\tOCIAcceptUncompressedLayers bool\n\n\t// === docker.Transport overrides ===\n\t// If not \"\", a directory containing a CA certificate (ending with \".crt\"),\n\t// a client certificate (ending with \".cert\") and a client certificate key\n\t// (ending with \".key\") used when talking to a container registry.\n\tDockerCertPath string\n\t// If not \"\", overrides the system’s default path for a directory containing host[:port] subdirectories with the same structure as DockerCertPath above.\n\t// Ignored if DockerCertPath is non-empty.\n\tDockerPerHostCertDirPath string\n\t// Allow contacting container registries over HTTP, or HTTPS with failed TLS verification. Note that this does not affect other TLS connections.\n\tDockerInsecureSkipTLSVerify OptionalBool\n\t// if nil, the library tries to parse ~/.docker/config.json to retrieve credentials\n\t// Ignored if DockerBearerRegistryToken is non-empty.\n\tDockerAuthConfig *DockerAuthConfig\n\t// if not \"\", the library uses this registry token to authenticate to the registry\n\tDockerBearerRegistryToken string\n\t// if not \"\", an User-Agent header is added to each request when contacting a registry.\n\tDockerRegistryUserAgent string\n\t// if true, a V1 ping attempt isn't done to give users a better error. Default is false.\n\t// Note that this field is used mainly to integrate containers/image into projectatomic/docker\n\t// in order to not break any existing docker's integration tests.\n\t//\n\t// Deprecated: The V1 container registry detection is no longer performed, so setting this flag has no effect.\n\tDockerDisableV1Ping bool\n\t// If true, dockerImageDestination.SupportedManifestMIMETypes will omit the Schema1 media types from the supported list\n\tDockerDisableDestSchema1MIMETypes bool\n\t// If true, the physical pull source of docker transport images logged as info level\n\tDockerLogMirrorChoice bool\n\t// Directory to use for OSTree temporary files\n\t//\n\t// Deprecated: The OSTree transport has been removed.\n\tOSTreeTmpDirPath string\n\t// If true, all blobs will have precomputed digests to ensure layers are not uploaded that already exist on the registry.\n\t// Note that this requires writing blobs to temporary files, and takes more time than the default behavior,\n\t// when the digest for a blob is unknown.\n\tDockerRegistryPushPrecomputeDigests bool\n\t// DockerProxyURL specifies proxy configuration schema (like socks5://username:password@ip:port)\n\tDockerProxyURL *url.URL\n\t// DockerProxy is a function that determines the proxy URL for a given request URL.\n\t// If set, this takes precedence over DockerProxyURL. The function should return the proxy URL to use,\n\t// or nil if no proxy should be used for the given request.\n\tDockerProxy func(reqURL *url.URL) (*url.URL, error)\n\n\t// === docker/daemon.Transport overrides ===\n\t// A directory containing a CA certificate (ending with \".crt\"),\n\t// a client certificate (ending with \".cert\") and a client certificate key\n\t// (ending with \".key\") used when talking to a Docker daemon.\n\tDockerDaemonCertPath string\n\t// The hostname or IP to the Docker daemon. If not set (aka \"\"), client.DefaultDockerHost is assumed.\n\tDockerDaemonHost string\n\t// Used to skip TLS verification, off by default. To take effect DockerDaemonCertPath needs to be specified as well.\n\tDockerDaemonInsecureSkipTLSVerify bool\n\n\t// === dir.Transport overrides ===\n\t// DirForceCompress compresses the image layers if set to true\n\tDirForceCompress bool\n\t// DirForceDecompress decompresses the image layers if set to true\n\tDirForceDecompress bool\n\n\t// CompressionFormat is the format to use for the compression of the blobs\n\tCompressionFormat *compression.Algorithm\n\t// CompressionLevel specifies what compression level is used\n\tCompressionLevel *int\n}\n\n// ProgressEvent is the type of events a progress reader can produce\n// Warning: new event types may be added any time.\ntype ProgressEvent uint\n\nconst (\n\t// ProgressEventNewArtifact will be fired on progress reader setup\n\tProgressEventNewArtifact ProgressEvent = iota\n\n\t// ProgressEventRead indicates that the artifact download is currently in\n\t// progress\n\tProgressEventRead\n\n\t// ProgressEventDone is fired when the data transfer has been finished for\n\t// the specific artifact\n\tProgressEventDone\n\n\t// ProgressEventSkipped is fired when the artifact has been skipped because\n\t// its already available at the destination\n\tProgressEventSkipped\n)\n\n// ProgressProperties is used to pass information from the copy code to a monitor which\n// can use the real-time information to produce output or react to changes.\ntype ProgressProperties struct {\n\t// The event indicating what\n\tEvent ProgressEvent\n\n\t// The artifact which has been updated in this interval\n\tArtifact BlobInfo\n\n\t// The currently downloaded size in bytes\n\t// Increases from 0 to the final Artifact size\n\tOffset uint64\n\n\t// The additional offset which has been downloaded inside the last update\n\t// interval. Will be reset after each ProgressEventRead event.\n\tOffsetUpdate uint64\n}\n"
  },
  {
    "path": "vendor/go.podman.io/image/v5/version/version.go",
    "content": "package version\n\nimport \"fmt\"\n\nconst (\n\t// VersionMajor is for an API incompatible changes\n\tVersionMajor = 5\n\t// VersionMinor is for functionality in a backwards-compatible manner\n\tVersionMinor = 40\n\t// VersionPatch is for backwards-compatible bug fixes\n\tVersionPatch = 0\n\n\t// VersionDev indicates development branch. Releases will be empty string.\n\tVersionDev = \"-dev\"\n)\n\n// Version is the specification version that the package types support.\nvar Version = fmt.Sprintf(\"%d.%d.%d%s\", VersionMajor, VersionMinor, VersionPatch, VersionDev)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/.dockerignore",
    "content": "bundles\n.gopath\nvendor/pkg\n"
  },
  {
    "path": "vendor/go.podman.io/storage/.gitignore",
    "content": "# containers/storage project generated files to ignore\n#  if you want to ignore files created by your editor/tools,\n#  please consider a global .gitignore https://help.github.com/articles/ignoring-files\n*.1\n*.5\n*.exe\n*~\n*.orig\n*.test\n.*.swp\n.DS_Store\n.idea*\n# a .bashrc may be added to customize the build environment\n.bashrc\n.gopath/\ndocs/AWS_S3_BUCKET\ndocs/GITCOMMIT\ndocs/GIT_BRANCH\ndocs/VERSION\ndocs/_build\ndocs/_static\ndocs/_templates\ndocs/changed-files\n# generated by man/md2man-all.sh\nman/man1\nman/man5\nman/man8\ntests/tools/build\nvendor/pkg/\n.vagrant\n/containers-storage\n/containers-storage.*\n"
  },
  {
    "path": "vendor/go.podman.io/storage/.golangci.yml",
    "content": "version: \"2\"\n\nformatters:\n  enable:\n    - gofumpt\n\nlinters:\n  enable:\n    - nolintlint\n    - unconvert\n  exclusions:\n    presets:\n      - comments\n      - std-error-handling\n  settings:\n    staticcheck:\n      checks:\n        - all\n        - -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier.\n        - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.\n\nissues:\n  max-issues-per-linter: 0\n  max-same-issues: 0\n"
  },
  {
    "path": "vendor/go.podman.io/storage/.mailmap",
    "content": "# Generate AUTHORS: hack/generate-authors.sh\n\n# Tip for finding duplicates (besides scanning the output of AUTHORS for name\n# duplicates that aren't also email duplicates): scan the output of:\n#   git log --format='%aE - %aN' | sort -uf\n#\n# For explanation on this file format: man git-shortlog\n\nPatrick Stapleton <github@gdi2290.com>\nShishir Mahajan <shishir.mahajan@redhat.com> <smahajan@redhat.com>\nErwin van der Koogh <info@erronis.nl>\nAhmed Kamal <email.ahmedkamal@googlemail.com>\nTejesh Mehta <tejesh.mehta@gmail.com> <tj@init.me>\nCristian Staretu <cristian.staretu@gmail.com>\nCristian Staretu <cristian.staretu@gmail.com> <unclejacksons@gmail.com>\nCristian Staretu <cristian.staretu@gmail.com> <unclejack@users.noreply.github.com>\nMarcus Linke <marcus.linke@gmx.de>\nAleksandrs Fadins <aleks@s-ko.net>\nChristopher Latham <sudosurootdev@gmail.com>\nHu Keping <hukeping@huawei.com>\nWayne Chang <wayne@neverfear.org>\nChen Chao <cc272309126@gmail.com>\nDaehyeok Mun <daehyeok@gmail.com>\n<daehyeok@gmail.com> <daehyeok@daehyeokui-MacBook-Air.local>\n<jt@yadutaf.fr> <admin@jtlebi.fr>\n<jeff@docker.com> <jefferya@programmerq.net>\n<charles.hooper@dotcloud.com> <chooper@plumata.com>\n<daniel.mizyrycki@dotcloud.com> <daniel@dotcloud.com>\n<daniel.mizyrycki@dotcloud.com> <mzdaniel@glidelink.net>\nGuillaume J. Charmes <guillaume.charmes@docker.com> <charmes.guillaume@gmail.com>\n<guillaume.charmes@docker.com> <guillaume@dotcloud.com>\n<guillaume.charmes@docker.com> <guillaume@docker.com>\n<guillaume.charmes@docker.com> <guillaume.charmes@dotcloud.com>\n<guillaume.charmes@docker.com> <guillaume@charmes.net>\n<kencochrane@gmail.com> <KenCochrane@gmail.com>\nThatcher Peskens <thatcher@docker.com>\nThatcher Peskens <thatcher@docker.com> <thatcher@dotcloud.com>\nThatcher Peskens <thatcher@docker.com> dhrp <thatcher@gmx.net>\nJérôme Petazzoni <jerome.petazzoni@dotcloud.com> jpetazzo <jerome.petazzoni@dotcloud.com>\nJérôme Petazzoni <jerome.petazzoni@dotcloud.com> <jp@enix.org>\nJoffrey F <joffrey@docker.com>\nJoffrey F <joffrey@docker.com> <joffrey@dotcloud.com>\nJoffrey F <joffrey@docker.com> <f.joffrey@gmail.com>\nTim Terhorst <mynamewastaken+git@gmail.com>\nAndy Smith <github@anarkystic.com>\n<kalessin@kalessin.fr> <louis@dotcloud.com>\n<victor.vieux@docker.com> <victor.vieux@dotcloud.com>\n<victor.vieux@docker.com> <victor@dotcloud.com>\n<victor.vieux@docker.com> <dev@vvieux.com>\n<victor.vieux@docker.com> <victor@docker.com>\n<victor.vieux@docker.com> <vieux@docker.com>\n<victor.vieux@docker.com> <victorvieux@gmail.com>\n<dominik@honnef.co> <dominikh@fork-bomb.org>\n<ehanchrow@ine.com> <eric.hanchrow@gmail.com>\nWalter Stanish <walter@pratyeka.org>\n<daniel@gasienica.ch> <dgasienica@zynga.com>\nRoberto Hashioka <roberto_hashioka@hotmail.com>\nKonstantin Pelykh <kpelykh@zettaset.com>\nDavid Sissitka <me@dsissitka.com>\nNolan Darilek <nolan@thewordnerd.info>\n<mastahyeti@gmail.com> <mastahyeti@users.noreply.github.com>\nBenoit Chesneau <bchesneau@gmail.com>\nJordan Arentsen <blissdev@gmail.com>\nDaniel Garcia <daniel@danielgarcia.info>\nMiguel Angel Fernández <elmendalerenda@gmail.com>\nBhiraj Butala <abhiraj.butala@gmail.com>\nFaiz Khan <faizkhan00@gmail.com>\nVictor Lyuboslavsky <victor@victoreda.com>\nJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>\nMatthew Mueller <mattmuelle@gmail.com>\n<mosoni@ebay.com> <mohitsoni1989@gmail.com>\nShih-Yuan Lee <fourdollars@gmail.com>\nDaniel Mizyrycki <daniel.mizyrycki@dotcloud.com> root <root@vagrant-ubuntu-12.10.vagrantup.com>\nJean-Baptiste Dalido <jeanbaptiste@appgratis.com>\n<proppy@google.com> <proppy@aminche.com>\n<michael@docker.com> <michael@crosbymichael.com>\n<michael@docker.com> <crosby.michael@gmail.com>\n<michael@docker.com> <crosbymichael@gmail.com>\n<github@developersupport.net> <github@metaliveblog.com>\n<brandon@ifup.org> <brandon@ifup.co>\n<dano@spotify.com> <daniel.norberg@gmail.com>\n<danny@codeaholics.org> <Danny.Yates@mailonline.co.uk>\n<gurjeet@singh.im> <singh.gurjeet@gmail.com>\n<shawn@churchofgit.com> <shawnlandden@gmail.com>\n<sjoerd-github@linuxonly.nl> <sjoerd@byte.nl>\n<solomon@docker.com> <solomon.hykes@dotcloud.com>\n<solomon@docker.com> <solomon@dotcloud.com>\n<solomon@docker.com> <s@docker.com>\nSven Dowideit <SvenDowideit@home.org.au>\nSven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@fosiki.com>\nSven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@docker.com>\nSven Dowideit <SvenDowideit@home.org.au> <¨SvenDowideit@home.org.au¨>\nSven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@home.org.au>\nSven Dowideit <SvenDowideit@home.org.au> <SvenDowideit@users.noreply.github.com>\nSven Dowideit <SvenDowideit@home.org.au> <sven@t440s.home.gateway>\n<alexl@redhat.com> <alexander.larsson@gmail.com>\nAlexander Morozov <lk4d4@docker.com> <lk4d4math@gmail.com>\nAlexander Morozov <lk4d4@docker.com>\n<git.nivoc@neverbox.com> <kuehnle@online.de>\nO.S. Tezer <ostezer@gmail.com>\n<ostezer@gmail.com> <ostezer@users.noreply.github.com>\nRoberto G. Hashioka <roberto.hashioka@docker.com> <roberto_hashioka@hotmail.com>\n<justin.p.simonelis@gmail.com> <justin.simonelis@PTS-JSIMON2.toronto.exclamation.com>\n<taim@bosboot.org> <maztaim@users.noreply.github.com>\n<viktor.vojnovski@amadeus.com> <vojnovski@gmail.com>\n<vbatts@redhat.com> <vbatts@hashbangbash.com>\n<altsysrq@gmail.com> <iamironbob@gmail.com>\nSridhar Ratnakumar <sridharr@activestate.com>\nSridhar Ratnakumar <sridharr@activestate.com> <github@srid.name>\nLiang-Chi Hsieh <viirya@gmail.com>\nAleksa Sarai <asarai@suse.de>\nAleksa Sarai <asarai@suse.de> <asarai@suse.com>\nAleksa Sarai <asarai@suse.de> <cyphar@cyphar.com>\nWill Weaver <monkey@buildingbananas.com>\nTimothy Hobbs <timothyhobbs@seznam.cz>\nNathan LeClaire <nathan.leclaire@docker.com> <nathan.leclaire@gmail.com>\nNathan LeClaire <nathan.leclaire@docker.com> <nathanleclaire@gmail.com>\n<github@hollensbe.org> <erik+github@hollensbe.org>\n<github@albersweb.de> <albers@users.noreply.github.com>\n<lsm5@fedoraproject.org> <lsm5@redhat.com>\n<marc@marc-abramowitz.com> <msabramo@gmail.com>\nMatthew Heon <mheon@redhat.com> <mheon@mheonlaptop.redhat.com>\n<bernat@luffy.cx> <vincent@bernat.im>\n<bernat@luffy.cx> <Vincent.Bernat@exoscale.ch>\n<p@pwaller.net> <peter@scraperwiki.com>\n<andrew.weiss@outlook.com> <andrew.weiss@microsoft.com>\nFrancisco Carriedo <fcarriedo@gmail.com>\n<julienbordellier@gmail.com> <git@julienbordellier.com>\n<ahmetb@microsoft.com> <ahmetalpbalkan@gmail.com>\n<arnaud.porterie@docker.com> <icecrime@gmail.com>\n<baloo@gandi.net> <superbaloo+registrations.github@superbaloo.net>\nBrian Goff <cpuguy83@gmail.com>\n<cpuguy83@gmail.com> <bgoff@cpuguy83-mbp.home>\n<eric@windisch.us> <ewindisch@docker.com>\n<frank.rosquin+github@gmail.com> <frank.rosquin@gmail.com>\nHollie Teal <hollie@docker.com>\n<hollie@docker.com> <hollie.teal@docker.com>\n<hollie@docker.com> <hollietealok@users.noreply.github.com>\n<huu@prismskylabs.com> <whoshuu@gmail.com>\nJessica Frazelle <jess@mesosphere.com>\nJessica Frazelle <jess@mesosphere.com> <jfrazelle@users.noreply.github.com>\nJessica Frazelle <jess@mesosphere.com> <acidburn@docker.com>\nJessica Frazelle <jess@mesosphere.com> <jess@docker.com>\nJessica Frazelle <jess@mesosphere.com> <princess@docker.com>\n<konrad.wilhelm.kleine@gmail.com> <kwk@users.noreply.github.com>\n<tintypemolly@gmail.com> <tintypemolly@Ohui-MacBook-Pro.local>\n<estesp@linux.vnet.ibm.com> <estesp@gmail.com>\n<github@gone.nl> <thaJeztah@users.noreply.github.com>\nThomas LEVEIL <thomasleveil@gmail.com> Thomas LÉVEIL <thomasleveil@users.noreply.github.com>\n<oi@truffles.me.uk> <timruffles@googlemail.com>\n<Vincent.Bernat@exoscale.ch> <bernat@luffy.cx>\nAntonio Murdaca <antonio.murdaca@gmail.com> <amurdaca@redhat.com>\nAntonio Murdaca <antonio.murdaca@gmail.com> <runcom@redhat.com>\nAntonio Murdaca <antonio.murdaca@gmail.com> <me@runcom.ninja>\nAntonio Murdaca <antonio.murdaca@gmail.com> <runcom@linux.com>\nAntonio Murdaca <antonio.murdaca@gmail.com> <runcom@users.noreply.github.com>\nDarren Shepherd <darren.s.shepherd@gmail.com> <darren@rancher.com>\nDeshi Xiao <dxiao@redhat.com> <dsxiao@dataman-inc.com>\nDeshi Xiao <dxiao@redhat.com> <xiaods@gmail.com>\nDoug Davis <dug@us.ibm.com> <duglin@users.noreply.github.com>\nJacob Atzen <jacob@jacobatzen.dk> <jatzen@gmail.com>\nJeff Nickoloff <jeff.nickoloff@gmail.com> <jeff@allingeek.com>\nJohn Howard (VM) <John.Howard@microsoft.com> <jhowardmsft@users.noreply.github.com>\nJohn Howard (VM) <John.Howard@microsoft.com>\nJohn Howard (VM) <John.Howard@microsoft.com> <john.howard@microsoft.com>\nJohn Howard (VM) <John.Howard@microsoft.com> <jhoward@microsoft.com>\nMadhu Venugopal <madhu@socketplane.io> <madhu@docker.com>\nMary Anthony <mary.anthony@docker.com> <mary@docker.com>\nMary Anthony <mary.anthony@docker.com> moxiegirl <mary@docker.com>\nMary Anthony <mary.anthony@docker.com> <moxieandmore@gmail.com>\nmattyw <mattyw@me.com> <gh@mattyw.net>\nresouer <resouer@163.com> <resouer@gmail.com>\nAJ Bowen <aj@gandi.net> soulshake <amy@gandi.net> \nAJ Bowen <aj@gandi.net> soulshake <aj@gandi.net>\nTibor Vass <teabee89@gmail.com> <tibor@docker.com>\nTibor Vass <teabee89@gmail.com> <tiborvass@users.noreply.github.com>\nVincent Bernat <bernat@luffy.cx> <Vincent.Bernat@exoscale.ch>\nYestin Sun <sunyi0804@gmail.com> <yestin.sun@polyera.com>\nbin liu <liubin0329@users.noreply.github.com> <liubin0329@gmail.com>\nJohn Howard (VM) <John.Howard@microsoft.com> jhowardmsft <jhoward@microsoft.com>\nAnkush Agarwal <ankushagarwal11@gmail.com> <ankushagarwal@users.noreply.github.com>\nTangi COLIN <tangicolin@gmail.com> tangicolin <tangicolin@gmail.com>\nAllen Sun <allen.sun@daocloud.io>\nAdrien Gallouët <adrien@gallouet.fr> <angt@users.noreply.github.com>\n<aanm90@gmail.com> <martins@noironetworks.com>\nAnuj Bahuguna <anujbahuguna.dev@gmail.com>\nAnusha Ragunathan <anusha.ragunathan@docker.com> <anusha@docker.com>\nAvi Miller <avi.miller@oracle.com> <avi.miller@gmail.com>\nBrent Salisbury <brent.salisbury@docker.com> <brent@docker.com>\nChander G <chandergovind@gmail.com>\nChun Chen <ramichen@tencent.com> <chenchun.feed@gmail.com>\nYing Li <cyli@twistedmatrix.com>\nDaehyeok Mun <daehyeok@gmail.com> <daehyeok@daehyeok-ui-MacBook-Air.local>\n<dqminh@cloudflare.com> <dqminh89@gmail.com>\nDaniel, Dao Quang Minh <dqminh@cloudflare.com>\nDaniel Nephin <dnephin@docker.com> <dnephin@gmail.com>\nDave Tucker <dt@docker.com> <dave@dtucker.co.uk>\nDoug Tangren <d.tangren@gmail.com>\nFrederick F. Kautz IV <fkautz@redhat.com> <fkautz@alumni.cmu.edu>\nBen Golub <ben.golub@dotcloud.com>\nHarold Cooper <hrldcpr@gmail.com>\nhsinko <21551195@zju.edu.cn> <hsinko@users.noreply.github.com>\nJosh Hawn <josh.hawn@docker.com> <jlhawn@berkeley.edu>\nJustin Cormack <justin.cormack@docker.com>\n<justin.cormack@docker.com> <justin.cormack@unikernel.com>\n<justin.cormack@docker.com> <justin@specialbusservice.com>\nKamil Domański <kamil@domanski.co>\nLei Jitang <leijitang@huawei.com>\n<leijitang@huawei.com> <leijitang@gmail.com>\nLinus Heckemann <lheckemann@twig-world.com>\n<lheckemann@twig-world.com> <anonymouse2048@gmail.com>\nLynda O'Leary <lyndaoleary29@gmail.com>\n<lyndaoleary29@gmail.com> <lyndaoleary@hotmail.com>\nMarianna Tessel <mtesselh@gmail.com>\nMichael Huettermann <michael@huettermann.net>\nMoysés Borges <moysesb@gmail.com>\n<moysesb@gmail.com> <moyses.furtado@wplex.com.br>\nNigel Poulton <nigelpoulton@hotmail.com>\nQiang Huang <h.huangqiang@huawei.com>\n<h.huangqiang@huawei.com> <qhuang@10.0.2.15>\nBoaz Shuster <ripcurld.github@gmail.com>\nShuwei Hao <haosw@cn.ibm.com>\n<haosw@cn.ibm.com> <haoshuwei24@gmail.com>\nSoshi Katsuta <soshi.katsuta@gmail.com>\n<soshi.katsuta@gmail.com> <katsuta_soshi@cyberagent.co.jp>\nStefan Berger <stefanb@linux.vnet.ibm.com>\n<stefanb@linux.vnet.ibm.com> <stefanb@us.ibm.com>\nStephen Day <stephen.day@docker.com>\n<stephen.day@docker.com> <stevvooe@users.noreply.github.com>\nToli Kuznets <toli@docker.com>\nTristan Carel <tristan@cogniteev.com>\n<tristan@cogniteev.com> <tristan.carel@gmail.com>\nVincent Demeester <vincent@sbr.pm>\n<vincent@sbr.pm> <vincent+github@demeester.fr>\nVishnu Kannan <vishnuk@google.com>\nxlgao-zju <xlgao@zju.edu.cn> xlgao <xlgao@zju.edu.cn>\nyuchangchun <yuchangchun1@huawei.com> y00277921 <yuchangchun1@huawei.com> \n<zij@case.edu> <zjaffee@us.ibm.com>\n<anujbahuguna.dev@gmail.com> <abahuguna@fiberlink.com>\n<eungjun.yi@navercorp.com> <semtlenori@gmail.com>\n<haosw@cn.ibm.com> <haoshuwei1989@163.com>\nHao Shu Wei <haosw@cn.ibm.com>\n<matt.bentley@docker.com> <mbentley@mbentley.net>\n<MihaiBorob@gmail.com> <MihaiBorobocea@gmail.com>\n<redmond.martin@gmail.com> <xgithub@redmond5.com>\n<redmond.martin@gmail.com> <martin@tinychat.com>\n<srbrahma@us.ibm.com> <sbrahma@us.ibm.com>\n<suda.akihiro@lab.ntt.co.jp> <suda.kyoto@gmail.com>\n<thomas@gazagnaire.org> <thomas@gazagnaire.com>\nShengbo Song <thomassong@tencent.com> mYmNeo <mymneo@163.com>\nShengbo Song <thomassong@tencent.com>\n<sylvain@ascribe.io> <sylvain.bellemare@ezeep.com>\nSylvain Bellemare <sylvain@ascribe.io>\n\n"
  },
  {
    "path": "vendor/go.podman.io/storage/AUTHORS",
    "content": "# This file lists all individuals having contributed content to the repository.\n# For how it is generated, see `hack/generate-authors.sh`.\n\nAanand Prasad <aanand.prasad@gmail.com>\nAaron Davidson <aaron@databricks.com>\nAaron Feng <aaron.feng@gmail.com>\nAaron Huslage <huslage@gmail.com>\nAaron Lehmann <aaron.lehmann@docker.com>\nAaron Welch <welch@packet.net>\nAbel Muiño <amuino@gmail.com>\nAbhijeet Kasurde <akasurde@redhat.com>\nAbhinav Ajgaonkar <abhinav316@gmail.com>\nAbhishek Chanda <abhishek.becs@gmail.com>\nAbin Shahab <ashahab@altiscale.com>\nAdam Miller <admiller@redhat.com>\nAdam Singer <financeCoding@gmail.com>\nAditi Rajagopal <arajagopal@us.ibm.com>\nAditya <aditya@netroy.in>\nAdria Casas <adriacasas88@gmail.com>\nAdrian Mouat <adrian.mouat@gmail.com>\nAdrian Oprea <adrian@codesi.nz>\nAdrien Folie <folie.adrien@gmail.com>\nAdrien Gallouët <adrien@gallouet.fr>\nAhmed Kamal <email.ahmedkamal@googlemail.com>\nAhmet Alp Balkan <ahmetb@microsoft.com>\nAidan Feldman <aidan.feldman@gmail.com>\nAidan Hobson Sayers <aidanhs@cantab.net>\nAJ Bowen <aj@gandi.net>\nAjey Charantimath <ajey.charantimath@gmail.com>\najneu <ajneu@users.noreply.github.com>\nAkihiro Suda <suda.akihiro@lab.ntt.co.jp>\nAl Tobey <al@ooyala.com>\nalambike <alambike@gmail.com>\nAlan Scherger <flyinprogrammer@gmail.com>\nAlan Thompson <cloojure@gmail.com>\nAlbert Callarisa <shark234@gmail.com>\nAlbert Zhang <zhgwenming@gmail.com>\nAleksa Sarai <asarai@suse.de>\nAleksandrs Fadins <aleks@s-ko.net>\nAlena Prokharchyk <alena@rancher.com>\nAlessandro Boch <aboch@docker.com>\nAlessio Biancalana <dottorblaster@gmail.com>\nAlex Chan <alex@alexwlchan.net>\nAlex Crawford <alex.crawford@coreos.com>\nAlex Ellis <alexellis2@gmail.com>\nAlex Gaynor <alex.gaynor@gmail.com>\nAlex Samorukov <samm@os2.kiev.ua>\nAlex Warhawk <ax.warhawk@gmail.com>\nAlexander Artemenko <svetlyak.40wt@gmail.com>\nAlexander Boyd <alex@opengroove.org>\nAlexander Larsson <alexl@redhat.com>\nAlexander Morozov <lk4d4@docker.com>\nAlexander Shopov <ash@kambanaria.org>\nAlexandre Beslic <abronan@docker.com>\nAlexandre González <agonzalezro@gmail.com>\nAlexandru Sfirlogea <alexandru.sfirlogea@gmail.com>\nAlexey Guskov <lexag@mail.ru>\nAlexey Kotlyarov <alexey@infoxchange.net.au>\nAlexey Shamrin <shamrin@gmail.com>\nAlexis THOMAS <fr.alexisthomas@gmail.com>\nAli Dehghani <ali.dehghani.g@gmail.com>\nAllen Madsen <blatyo@gmail.com>\nAllen Sun <allen.sun@daocloud.io>\nalmoehi <almoehi@users.noreply.github.com>\nAlvin Richards <alvin.richards@docker.com>\namangoel <amangoel@gmail.com>\nAmen Belayneh <amenbelayneh@gmail.com>\nAmit Bakshi <ambakshi@gmail.com>\nAmit Krishnan <amit.krishnan@oracle.com>\nAmy Lindburg <amy.lindburg@docker.com>\nAnand Patil <anand.prabhakar.patil@gmail.com>\nAnandkumarPatel <anandkumarpatel@gmail.com>\nAnatoly Borodin <anatoly.borodin@gmail.com>\nAnchal Agrawal <aagrawa4@illinois.edu>\nAnders Janmyr <anders@janmyr.com>\nAndre Dublin <81dublin@gmail.com>\nAndre Granovsky <robotciti@live.com>\nAndrea Luzzardi <aluzzardi@gmail.com>\nAndrea Turli <andrea.turli@gmail.com>\nAndreas Köhler <andi5.py@gmx.net>\nAndreas Savvides <andreas@editd.com>\nAndreas Tiefenthaler <at@an-ti.eu>\nAndrew C. Bodine <acbodine@us.ibm.com>\nAndrew Clay Shafer <andrewcshafer@gmail.com>\nAndrew Duckworth <grillopress@gmail.com>\nAndrew France <andrew@avito.co.uk>\nAndrew Gerrand <adg@golang.org>\nAndrew Guenther <guenther.andrew.j@gmail.com>\nAndrew Kuklewicz <kookster@gmail.com>\nAndrew Macgregor <andrew.macgregor@agworld.com.au>\nAndrew Macpherson <hopscotch23@gmail.com>\nAndrew Martin <sublimino@gmail.com>\nAndrew Munsell <andrew@wizardapps.net>\nAndrew Weiss <andrew.weiss@outlook.com>\nAndrew Williams <williams.andrew@gmail.com>\nAndrews Medina <andrewsmedina@gmail.com>\nAndrey Petrov <andrey.petrov@shazow.net>\nAndrey Stolbovsky <andrey.stolbovsky@gmail.com>\nAndré Martins <aanm90@gmail.com>\nandy <ztao@tibco-support.com>\nAndy Chambers <anchambers@paypal.com>\nandy diller <dillera@gmail.com>\nAndy Goldstein <agoldste@redhat.com>\nAndy Kipp <andy@rstudio.com>\nAndy Rothfusz <github@developersupport.net>\nAndy Smith <github@anarkystic.com>\nAndy Wilson <wilson.andrew.j+github@gmail.com>\nAnes Hasicic <anes.hasicic@gmail.com>\nAnil Belur <askb23@gmail.com>\nAnkush Agarwal <ankushagarwal11@gmail.com>\nAnonmily <michelle@michelleliu.io>\nAnthon van der Neut <anthon@mnt.org>\nAnthony Baire <Anthony.Baire@irisa.fr>\nAnthony Bishopric <git@anthonybishopric.com>\nAnthony Dahanne <anthony.dahanne@gmail.com>\nAnton Löfgren <anton.lofgren@gmail.com>\nAnton Nikitin <anton.k.nikitin@gmail.com>\nAnton Polonskiy <anton.polonskiy@gmail.com>\nAnton Tiurin <noxiouz@yandex.ru>\nAntonio Murdaca <antonio.murdaca@gmail.com>\nAntony Messerli <amesserl@rackspace.com>\nAnuj Bahuguna <anujbahuguna.dev@gmail.com>\nAnusha Ragunathan <anusha.ragunathan@docker.com>\napocas <petermdias@gmail.com>\nArikaChen <eaglesora@gmail.com>\nArnaud Porterie <arnaud.porterie@docker.com>\nArthur Barr <arthur.barr@uk.ibm.com>\nArthur Gautier <baloo@gandi.net>\nArtur Meyster <arthurfbi@yahoo.com>\nArun Gupta <arun.gupta@gmail.com>\nAsbjørn Enge <asbjorn@hanafjedle.net>\naveragehuman <averagehuman@users.noreply.github.com>\nAvi Das <andas222@gmail.com>\nAvi Miller <avi.miller@oracle.com>\nayoshitake <airandfingers@gmail.com>\nAzat Khuyiyakhmetov <shadow_uz@mail.ru>\nBardia Keyoumarsi <bkeyouma@ucsc.edu>\nBarnaby Gray <barnaby@pickle.me.uk>\nBarry Allard <barry.allard@gmail.com>\nBartłomiej Piotrowski <b@bpiotrowski.pl>\nBastiaan Bakker <bbakker@xebia.com>\nbdevloed <boris.de.vloed@gmail.com>\nBen Firshman <ben@firshman.co.uk>\nBen Golub <ben.golub@dotcloud.com>\nBen Hall <ben@benhall.me.uk>\nBen Sargent <ben@brokendigits.com>\nBen Severson <BenSeverson@users.noreply.github.com>\nBen Toews <mastahyeti@gmail.com>\nBen Wiklund <ben@daisyowl.com>\nBenjamin Atkin <ben@benatkin.com>\nBenoit Chesneau <bchesneau@gmail.com>\nBernerd Schaefer <bj.schaefer@gmail.com>\nBert Goethals <bert@bertg.be>\nBharath Thiruveedula <bharath_ves@hotmail.com>\nBhiraj Butala <abhiraj.butala@gmail.com>\nBill W <SydOps@users.noreply.github.com>\nbin liu <liubin0329@users.noreply.github.com>\nBlake Geno <blakegeno@gmail.com>\nBoaz Shuster <ripcurld.github@gmail.com>\nbobby abbott <ttobbaybbob@gmail.com>\nboucher <rboucher@gmail.com>\nBouke Haarsma <bouke@webatoom.nl>\nBoyd Hemphill <boyd@feedmagnet.com>\nboynux <boynux@gmail.com>\nBradley Cicenas <bradley.cicenas@gmail.com>\nBradley Wright <brad@intranation.com>\nBrandon Liu <bdon@bdon.org>\nBrandon Philips <brandon@ifup.org>\nBrandon Rhodes <brandon@rhodesmill.org>\nBrendan Dixon <brendand@microsoft.com>\nBrent Salisbury <brent.salisbury@docker.com>\nBrett Higgins <brhiggins@arbor.net>\nBrett Kochendorfer <brett.kochendorfer@gmail.com>\nBrian (bex) Exelbierd <bexelbie@redhat.com>\nBrian Bland <brian.bland@docker.com>\nBrian DeHamer <brian@dehamer.com>\nBrian Dorsey <brian@dorseys.org>\nBrian Flad <bflad417@gmail.com>\nBrian Goff <cpuguy83@gmail.com>\nBrian McCallister <brianm@skife.org>\nBrian Olsen <brian@maven-group.org>\nBrian Shumate <brian@couchbase.com>\nBrian Torres-Gil <brian@dralth.com>\nBrian Trump <btrump@yelp.com>\nBrice Jaglin <bjaglin@teads.tv>\nBriehan Lombaard <briehan.lombaard@gmail.com>\nBruno Bigras <bigras.bruno@gmail.com>\nBruno Binet <bruno.binet@gmail.com>\nBruno Gazzera <bgazzera@paginar.com>\nBruno Renié <brutasse@gmail.com>\nBryan Bess <squarejaw@bsbess.com>\nBryan Boreham <bjboreham@gmail.com>\nBryan Matsuo <bryan.matsuo@gmail.com>\nBryan Murphy <bmurphy1976@gmail.com>\nbuddhamagnet <buddhamagnet@gmail.com>\nBurke Libbey <burke@libbey.me>\nByung Kang <byung.kang.ctr@amrdec.army.mil>\nCaleb Spare <cespare@gmail.com>\nCalen Pennington <cale@edx.org>\nCameron Boehmer <cameron.boehmer@gmail.com>\nCameron Spear <cameronspear@gmail.com>\nCampbell Allen <campbell.allen@gmail.com>\nCandid Dauth <cdauth@cdauth.eu>\nCarl Henrik Lunde <chlunde@ping.uio.no>\nCarl X. Su <bcbcarl@gmail.com>\nCarlos Alexandro Becker <caarlos0@gmail.com>\nCarlos Sanchez <carlos@apache.org>\nCarol Fager-Higgins <carol.fager-higgins@docker.com>\nCary <caryhartline@users.noreply.github.com>\nCasey Bisson <casey.bisson@joyent.com>\nCedric Davies <cedricda@microsoft.com>\nCezar Sa Espinola <cezarsa@gmail.com>\nChad Swenson <chadswen@gmail.com>\nChance Zibolski <chance.zibolski@gmail.com>\nChander G <chandergovind@gmail.com>\nCharles Chan <charleswhchan@users.noreply.github.com>\nCharles Hooper <charles.hooper@dotcloud.com>\nCharles Law <claw@conduce.com>\nCharles Lindsay <chaz@chazomatic.us>\nCharles Merriam <charles.merriam@gmail.com>\nCharles Sarrazin <charles@sarraz.in>\nCharlie Lewis <charliel@lab41.org>\nChase Bolt <chase.bolt@gmail.com>\nChaYoung You <yousbe@gmail.com>\nChen Chao <cc272309126@gmail.com>\nChen Hanxiao <chenhanxiao@cn.fujitsu.com>\ncheney90 <cheney-90@hotmail.com>\nChewey <prosto-chewey@users.noreply.github.com>\nChia-liang Kao <clkao@clkao.org>\nchli <chli@freewheel.tv>\nCholerae Hu <choleraehyq@gmail.com>\nChris Alfonso <calfonso@redhat.com>\nChris Armstrong <chris@opdemand.com>\nChris Dituri <csdituri@gmail.com>\nChris Fordham <chris@fordham-nagy.id.au>\nChris Khoo <chris.khoo@gmail.com>\nChris McKinnel <chrismckinnel@gmail.com>\nChris Seto <chriskseto@gmail.com>\nChris Snow <chsnow123@gmail.com>\nChris St. Pierre <chris.a.st.pierre@gmail.com>\nChris Stivers <chris@stivers.us>\nChris Swan <chris.swan@iee.org>\nChris Wahl <github@wahlnetwork.com>\nChris Weyl <cweyl@alumni.drew.edu>\nchrismckinnel <chris.mckinnel@tangentlabs.co.uk>\nChristian Berendt <berendt@b1-systems.de>\nChristian Böhme <developement@boehme3d.de>\nChristian Persson <saser@live.se>\nChristian Rotzoll <ch.rotzoll@gmail.com>\nChristian Simon <simon@swine.de>\nChristian Stefanescu <st.chris@gmail.com>\nChristoperBiscardi <biscarch@sketcht.com>\nChristophe Mehay <cmehay@online.net>\nChristophe Troestler <christophe.Troestler@umons.ac.be>\nChristopher Currie <codemonkey+github@gmail.com>\nChristopher Jones <tophj@linux.vnet.ibm.com>\nChristopher Latham <sudosurootdev@gmail.com>\nChristopher Rigor <crigor@gmail.com>\nChristy Perez <christy@linux.vnet.ibm.com>\nChun Chen <ramichen@tencent.com>\nCiro S. Costa <ciro.costa@usp.br>\nClayton Coleman <ccoleman@redhat.com>\nClinton Kitson <clintonskitson@gmail.com>\nCoenraad Loubser <coenraad@wish.org.za>\nColin Dunklau <colin.dunklau@gmail.com>\nColin Rice <colin@daedrum.net>\nColin Walters <walters@verbum.org>\nCollin Guarino <collin.guarino@gmail.com>\nColm Hally <colmhally@gmail.com>\ncompanycy <companycy@gmail.com>\nCory Forsyth <cory.forsyth@gmail.com>\ncressie176 <github@stephen-cresswell.net>\nCristian Staretu <cristian.staretu@gmail.com>\ncristiano balducci <cristiano.balducci@gmail.com>\nCruceru Calin-Cristian <crucerucalincristian@gmail.com>\nCyril F <cyrilf7x@gmail.com>\nDaan van Berkel <daan.v.berkel.1980@gmail.com>\nDaehyeok Mun <daehyeok@gmail.com>\nDafydd Crosby <dtcrsby@gmail.com>\ndalanlan <dalanlan925@gmail.com>\nDamien Nadé <github@livna.org>\nDamien Nozay <damien.nozay@gmail.com>\nDamjan Georgievski <gdamjan@gmail.com>\nDan Anolik <dan@anolik.net>\nDan Buch <d.buch@modcloth.com>\nDan Cotora <dan@bluevision.ro>\nDan Griffin <dgriffin@peer1.com>\nDan Hirsch <thequux@upstandinghackers.com>\nDan Keder <dan.keder@gmail.com>\nDan Levy <dan@danlevy.net>\nDan McPherson <dmcphers@redhat.com>\nDan Stine <sw@stinemail.com>\nDan Walsh <dwalsh@redhat.com>\nDan Williams <me@deedubs.com>\nDaniel Antlinger <d.antlinger@gmx.at>\nDaniel Exner <dex@dragonslave.de>\nDaniel Farrell <dfarrell@redhat.com>\nDaniel Garcia <daniel@danielgarcia.info>\nDaniel Gasienica <daniel@gasienica.ch>\nDaniel Hiltgen <daniel.hiltgen@docker.com>\nDaniel Menet <membership@sontags.ch>\nDaniel Mizyrycki <daniel.mizyrycki@dotcloud.com>\nDaniel Nephin <dnephin@docker.com>\nDaniel Norberg <dano@spotify.com>\nDaniel Nordberg <dnordberg@gmail.com>\nDaniel Robinson <gottagetmac@gmail.com>\nDaniel S <dan.streby@gmail.com>\nDaniel Von Fange <daniel@leancoder.com>\nDaniel YC Lin <dlin.tw@gmail.com>\nDaniel Zhang <jmzwcn@gmail.com>\nDaniel, Dao Quang Minh <dqminh@cloudflare.com>\nDanny Berger <dpb587@gmail.com>\nDanny Yates <danny@codeaholics.org>\nDarren Coxall <darren@darrencoxall.com>\nDarren Shepherd <darren.s.shepherd@gmail.com>\nDarren Stahl <darst@microsoft.com>\nDave Barboza <dbarboza@datto.com>\nDave Henderson <Dave.Henderson@ca.ibm.com>\nDave MacDonald <mindlapse@gmail.com>\nDave Tucker <dt@docker.com>\nDavid Anderson <dave@natulte.net>\nDavid Calavera <david.calavera@gmail.com>\nDavid Corking <dmc-source@dcorking.com>\nDavid Cramer <davcrame@cisco.com>\nDavid Currie <david_currie@uk.ibm.com>\nDavid Davis <daviddavis@redhat.com>\nDavid Gageot <david@gageot.net>\nDavid Gebler <davidgebler@gmail.com>\nDavid Lawrence <david.lawrence@docker.com>\nDavid Mackey <tdmackey@booleanhaiku.com>\nDavid Mat <david@davidmat.com>\nDavid Mcanulty <github@hellspark.com>\nDavid Pelaez <pelaez89@gmail.com>\nDavid R. Jenni <david.r.jenni@gmail.com>\nDavid Röthlisberger <david@rothlis.net>\nDavid Sheets <sheets@alum.mit.edu>\nDavid Sissitka <me@dsissitka.com>\nDavid Xia <dxia@spotify.com>\nDavid Young <yangboh@cn.ibm.com>\nDavide Ceretti <davide.ceretti@hogarthww.com>\nDawn Chen <dawnchen@google.com>\ndcylabs <dcylabs@gmail.com>\ndecadent <decadent@users.noreply.github.com>\ndeed02392 <georgehafiz@gmail.com>\nDeng Guangxing <dengguangxing@huawei.com>\nDeni Bertovic <deni@kset.org>\nDenis Gladkikh <denis@gladkikh.email>\nDenis Ollier <larchunix@users.noreply.github.com>\nDennis Docter <dennis@d23.nl>\nDerek <crq@kernel.org>\nDerek <crquan@gmail.com>\nDerek Ch <denc716@gmail.com>\nDerek McGowan <derek@mcgstyle.net>\nDeric Crago <deric.crago@gmail.com>\nDeshi Xiao <dxiao@redhat.com>\ndevmeyster <arthurfbi@yahoo.com>\nDevvyn Murphy <devvyn@devvyn.com>\nDharmit Shah <shahdharmit@gmail.com>\nDieter Reuter <dieter.reuter@me.com>\nDima Stopel <dima@twistlock.com>\nDimitri John Ledkov <dimitri.j.ledkov@intel.com>\nDimitry Andric <d.andric@activevideo.com>\nDinesh Subhraveti <dineshs@altiscale.com>\nDiogo Monica <diogo@docker.com>\nDiuDiugirl <sophia.wang@pku.edu.cn>\nDjibril Koné <kone.djibril@gmail.com>\ndkumor <daniel@dkumor.com>\nDmitri Logvinenko <dmitri.logvinenko@gmail.com>\nDmitry Demeshchuk <demeshchuk@gmail.com>\nDmitry Gusev <dmitry.gusev@gmail.com>\nDmitry V. Krivenok <krivenok.dmitry@gmail.com>\nDmitry Vorobev <dimahabr@gmail.com>\nDolph Mathews <dolph.mathews@gmail.com>\nDominik Finkbeiner <finkes93@gmail.com>\nDominik Honnef <dominik@honnef.co>\nDon Kirkby <donkirkby@users.noreply.github.com>\nDon Kjer <don.kjer@gmail.com>\nDon Spaulding <donspauldingii@gmail.com>\nDonald Huang <don.hcd@gmail.com>\nDong Chen <dongluo.chen@docker.com>\nDonovan Jones <git@gamma.net.nz>\nDoug Davis <dug@us.ibm.com>\nDoug MacEachern <dougm@vmware.com>\nDoug Tangren <d.tangren@gmail.com>\nDr Nic Williams <drnicwilliams@gmail.com>\ndragon788 <dragon788@users.noreply.github.com>\nDražen Lučanin <kermit666@gmail.com>\nDustin Sallings <dustin@spy.net>\nEd Costello <epc@epcostello.com>\nEdmund Wagner <edmund-wagner@web.de>\nEiichi Tsukata <devel@etsukata.com>\nEike Herzbach <eike@herzbach.net>\nEivind Uggedal <eivind@uggedal.com>\nElan Ruusamäe <glen@delfi.ee>\nElias Probst <mail@eliasprobst.eu>\nElijah Zupancic <elijah@zupancic.name>\neluck <mail@eluck.me>\nElvir Kuric <elvirkuric@gmail.com>\nEmil Hernvall <emil@quench.at>\nEmily Maier <emily@emilymaier.net>\nEmily Rose <emily@contactvibe.com>\nEmir Ozer <emirozer@yandex.com>\nEnguerran <engcolson@gmail.com>\nEohyung Lee <liquidnuker@gmail.com>\nEric Hanchrow <ehanchrow@ine.com>\nEric Lee <thenorthsecedes@gmail.com>\nEric Myhre <hash@exultant.us>\nEric Paris <eparis@redhat.com>\nEric Rafaloff <erafaloff@gmail.com>\nEric Rosenberg <ehaydenr@users.noreply.github.com>\nEric Sage <eric.david.sage@gmail.com>\nEric Windisch <eric@windisch.us>\nEric Yang <windfarer@gmail.com>\nEric-Olivier Lamey <eo@lamey.me>\nErik Bray <erik.m.bray@gmail.com>\nErik Dubbelboer <erik@dubbelboer.com>\nErik Hollensbe <github@hollensbe.org>\nErik Inge Bolsø <knan@redpill-linpro.com>\nErik Kristensen <erik@erikkristensen.com>\nErik Weathers <erikdw@gmail.com>\nErno Hopearuoho <erno.hopearuoho@gmail.com>\nErwin van der Koogh <info@erronis.nl>\nEuan <euank@amazon.com>\nEugene Yakubovich <eugene.yakubovich@coreos.com>\neugenkrizo <eugen.krizo@gmail.com>\nevalle <shmarnev@gmail.com>\nEvan Allrich <evan@unguku.com>\nEvan Carmi <carmi@users.noreply.github.com>\nEvan Hazlett <ejhazlett@gmail.com>\nEvan Krall <krall@yelp.com>\nEvan Phoenix <evan@fallingsnow.net>\nEvan Wies <evan@neomantra.net>\nEvgeny Vereshchagin <evvers@ya.ru>\nEwa Czechowska <ewa@ai-traders.com>\nEystein Måløy Stenberg <eystein.maloy.stenberg@cfengine.com>\nezbercih <cem.ezberci@gmail.com>\nFabiano Rosas <farosas@br.ibm.com>\nFabio Falci <fabiofalci@gmail.com>\nFabio Rehm <fgrehm@gmail.com>\nFabrizio Regini <freegenie@gmail.com>\nFabrizio Soppelsa <fsoppelsa@mirantis.com>\nFaiz Khan <faizkhan00@gmail.com>\nfalmp <chico.lopes@gmail.com>\nFangyuan Gao <21551127@zju.edu.cn>\nFareed Dudhia <fareeddudhia@googlemail.com>\nFathi Boudra <fathi.boudra@linaro.org>\nFederico Gimenez <fgimenez@coit.es>\nFelix Geisendörfer <felix@debuggable.com>\nFelix Hupfeld <quofelix@users.noreply.github.com>\nFelix Rabe <felix@rabe.io>\nFelix Schindler <fschindler@weluse.de>\nFerenc Szabo <pragmaticfrank@gmail.com>\nFernando <fermayo@gmail.com>\nFero Volar <alian@alian.info>\nFilipe Brandenburger <filbranden@google.com>\nFilipe Oliveira <contato@fmoliveira.com.br>\nfl0yd <fl0yd@me.com>\nFlavio Castelli <fcastelli@suse.com>\nFLGMwt <ryan.stelly@live.com>\nFlorian <FWirtz@users.noreply.github.com>\nFlorian Klein <florian.klein@free.fr>\nFlorian Maier <marsmensch@users.noreply.github.com>\nFlorian Weingarten <flo@hackvalue.de>\nFlorin Asavoaie <florin.asavoaie@gmail.com>\nFrancesc Campoy <campoy@google.com>\nFrancisco Carriedo <fcarriedo@gmail.com>\nFrancisco Souza <f@souza.cc>\nFrank Groeneveld <frank@ivaldi.nl>\nFrank Herrmann <fgh@4gh.tv>\nFrank Macreery <frank@macreery.com>\nFrank Rosquin <frank.rosquin+github@gmail.com>\nFred Lifton <fred.lifton@docker.com>\nFrederick F. Kautz IV <fkautz@redhat.com>\nFrederik Loeffert <frederik@zitrusmedia.de>\nFrederik Nordahl Jul Sabroe <frederikns@gmail.com>\nFreek Kalter <freek@kalteronline.org>\nfy2462 <fy2462@gmail.com>\nFélix Baylac-Jacqué <baylac.felix@gmail.com>\nFélix Cantournet <felix.cantournet@cloudwatt.com>\nGabe Rosenhouse <gabe@missionst.com>\nGabor Nagy <mail@aigeruth.hu>\nGabriel Monroy <gabriel@opdemand.com>\nGabrielNicolasAvellaneda <avellaneda.gabriel@gmail.com>\nGalen Sampson <galen.sampson@gmail.com>\nGareth Rushgrove <gareth@morethanseven.net>\nGarrett Barboza <garrett@garrettbarboza.com>\nGaurav <gaurav.gosec@gmail.com>\ngautam, prasanna <prasannagautam@gmail.com>\nGennadySpb <lipenkov@gmail.com>\nGeoffrey Bachelet <grosfrais@gmail.com>\nGeorge MacRorie <gmacr31@gmail.com>\nGeorge Xie <georgexsh@gmail.com>\nGeorgi Hristozov <georgi@forkbomb.nl>\nGereon Frey <gereon.frey@dynport.de>\nGerman DZ <germ@ndz.com.ar>\nGert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl>\nGianluca Borello <g.borello@gmail.com>\nGildas Cuisinier <gildas.cuisinier@gcuisinier.net>\ngissehel <public-devgit-dantus@gissehel.org>\nGiuseppe Mazzotta <gdm85@users.noreply.github.com>\nGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>\nGleb M Borisov <borisov.gleb@gmail.com>\nGlyn Normington <gnormington@gopivotal.com>\nGoBella <caili_welcome@163.com>\nGoffert van Gool <goffert@phusion.nl>\nGosuke Miyashita <gosukenator@gmail.com>\nGou Rao <gourao@users.noreply.github.com>\nGovinda Fichtner <govinda.fichtner@googlemail.com>\nGrant Reaber <grant.reaber@gmail.com>\nGraydon Hoare <graydon@pobox.com>\nGreg Fausak <greg@tacodata.com>\nGreg Thornton <xdissent@me.com>\ngrossws <grossws@gmail.com>\ngrunny <mwgrunny@gmail.com>\ngs11 <gustav.sinder@gmail.com>\nGuilhem Lettron <guilhem+github@lettron.fr>\nGuilherme Salgado <gsalgado@gmail.com>\nGuillaume Dufour <gdufour.prestataire@voyages-sncf.com>\nGuillaume J. Charmes <guillaume.charmes@docker.com>\nguoxiuyan <guoxiuyan@huawei.com>\nGurjeet Singh <gurjeet@singh.im>\nGuruprasad <lgp171188@gmail.com>\ngwx296173 <gaojing3@huawei.com>\nGünter Zöchbauer <guenter@gzoechbauer.com>\nHans Kristian Flaatten <hans@starefossen.com>\nHans Rødtang <hansrodtang@gmail.com>\nHao Shu Wei <haosw@cn.ibm.com>\nHao Zhang <21521210@zju.edu.cn>\nHarald Albers <github@albersweb.de>\nHarley Laue <losinggeneration@gmail.com>\nHarold Cooper <hrldcpr@gmail.com>\nHarry Zhang <harryzhang@zju.edu.cn>\nHe Simei <hesimei@zju.edu.cn>\nheartlock <21521209@zju.edu.cn>\nHector Castro <hectcastro@gmail.com>\nHenning Sprang <henning.sprang@gmail.com>\nHobofan <goisser94@gmail.com>\nHollie Teal <hollie@docker.com>\nHong Xu <hong@topbug.net>\nhsinko <21551195@zju.edu.cn>\nHu Keping <hukeping@huawei.com>\nHu Tao <hutao@cn.fujitsu.com>\nHuanzhong Zhang <zhanghuanzhong90@gmail.com>\nHuayi Zhang <irachex@gmail.com>\nHugo Duncan <hugo@hugoduncan.org>\nHugo Marisco <0x6875676f@gmail.com>\nHunter Blanks <hunter@twilio.com>\nhuqun <huqun@zju.edu.cn>\nHuu Nguyen <huu@prismskylabs.com>\nhyeongkyu.lee <hyeongkyu.lee@navercorp.com>\nhyp3rdino <markus.kortlang@lhsystems.com>\nHyzhou <1187766782@qq.com>\nIan Babrou <ibobrik@gmail.com>\nIan Bishop <ianbishop@pace7.com>\nIan Bull <irbull@gmail.com>\nIan Calvert <ianjcalvert@gmail.com>\nIan Lee <IanLee1521@gmail.com>\nIan Main <imain@redhat.com>\nIan Truslove <ian.truslove@gmail.com>\nIavael <iavaelooeyt@gmail.com>\nIcaro Seara <icaro.seara@gmail.com>\nIgor Dolzhikov <bluesriverz@gmail.com>\nIlkka Laukkanen <ilkka@ilkka.io>\nIlya Dmitrichenko <errordeveloper@gmail.com>\nIlya Gusev <mail@igusev.ru>\nILYA Khlopotov <ilya.khlopotov@gmail.com>\nimre Fitos <imre.fitos+github@gmail.com>\ninglesp <peter.inglesby@gmail.com>\nIngo Gottwald <in.gottwald@gmail.com>\nIsaac Dupree <antispam@idupree.com>\nIsabel Jimenez <contact.isabeljimenez@gmail.com>\nIsao Jonas <isao.jonas@gmail.com>\nIvan Babrou <ibobrik@gmail.com>\nIvan Fraixedes <ifcdev@gmail.com>\nIvan Grcic <igrcic@gmail.com>\nJ Bruni <joaohbruni@yahoo.com.br>\nJ. Nunn <jbnunn@gmail.com>\nJack Danger Canty <jackdanger@squareup.com>\nJacob Atzen <jacob@jacobatzen.dk>\nJacob Edelman <edelman.jd@gmail.com>\nJake Champlin <jake.champlin.27@gmail.com>\nJake Moshenko <jake@devtable.com>\njakedt <jake@devtable.com>\nJames Allen <jamesallen0108@gmail.com>\nJames Carey <jecarey@us.ibm.com>\nJames Carr <james.r.carr@gmail.com>\nJames DeFelice <james.defelice@ishisystems.com>\nJames Harrison Fisher <jameshfisher@gmail.com>\nJames Kyburz <james.kyburz@gmail.com>\nJames Kyle <james@jameskyle.org>\nJames Lal <james@lightsofapollo.com>\nJames Mills <prologic@shortcircuit.net.au>\nJames Nugent <james@jen20.com>\nJames Turnbull <james@lovedthanlost.net>\nJamie Hannaford <jamie.hannaford@rackspace.com>\nJamshid Afshar <jafshar@yahoo.com>\nJan Keromnes <janx@linux.com>\nJan Koprowski <jan.koprowski@gmail.com>\nJan Pazdziora <jpazdziora@redhat.com>\nJan Toebes <jan@toebes.info>\nJan-Gerd Tenberge <janten@gmail.com>\nJan-Jaap Driessen <janjaapdriessen@gmail.com>\nJana Radhakrishnan <mrjana@docker.com>\nJanuar Wayong <januar@gmail.com>\nJared Biel <jared.biel@bolderthinking.com>\nJared Hocutt <jaredh@netapp.com>\nJaroslaw Zabiello <hipertracker@gmail.com>\njaseg <jaseg@jaseg.net>\nJasmine Hegman <jasmine@jhegman.com>\nJason Divock <jdivock@gmail.com>\nJason Giedymin <jasong@apache.org>\nJason Green <Jason.Green@AverInformatics.Com>\nJason Hall <imjasonh@gmail.com>\nJason Heiss <jheiss@aput.net>\nJason Livesay <ithkuil@gmail.com>\nJason McVetta <jason.mcvetta@gmail.com>\nJason Plum <jplum@devonit.com>\nJason Shepherd <jason@jasonshepherd.net>\nJason Smith <jasonrichardsmith@gmail.com>\nJason Sommer <jsdirv@gmail.com>\nJason Stangroome <jason@codeassassin.com>\njaxgeller <jacksongeller@gmail.com>\nJay <imjching@hotmail.com>\nJay <teguhwpurwanto@gmail.com>\nJay Kamat <github@jgkamat.33mail.com>\nJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>\nJean-Baptiste Dalido <jeanbaptiste@appgratis.com>\nJean-Paul Calderone <exarkun@twistedmatrix.com>\nJean-Tiare Le Bigot <jt@yadutaf.fr>\nJeff Anderson <jeff@docker.com>\nJeff Johnston <jeff.johnston.mn@gmail.com>\nJeff Lindsay <progrium@gmail.com>\nJeff Mickey <j@codemac.net>\nJeff Minard <jeff@creditkarma.com>\nJeff Nickoloff <jeff.nickoloff@gmail.com>\nJeff Welch <whatthejeff@gmail.com>\nJeffrey Bolle <jeffreybolle@gmail.com>\nJeffrey Morgan <jmorganca@gmail.com>\nJeffrey van Gogh <jvg@google.com>\nJenny Gebske <jennifer@gebske.de>\nJeremy Grosser <jeremy@synack.me>\nJeremy Price <jprice.rhit@gmail.com>\nJeremy Qian <vanpire110@163.com>\nJeremy Unruh <jeremybunruh@gmail.com>\nJeroen Jacobs <github@jeroenj.be>\nJesse Dearing <jesse.dearing@gmail.com>\nJesse Dubay <jesse@thefortytwo.net>\nJessica Frazelle <jess@mesosphere.com>\nJezeniel Zapanta <jpzapanta22@gmail.com>\njgeiger <jgeiger@gmail.com>\nJhon Honce <jhonce@redhat.com>\nJian Zhang <zhangjian.fnst@cn.fujitsu.com>\njianbosun <wonderflow.sun@gmail.com>\nJilles Oldenbeuving <ojilles@gmail.com>\nJim Alateras <jima@comware.com.au>\nJim Perrin <jperrin@centos.org>\nJimmy Cuadra <jimmy@jimmycuadra.com>\nJimmy Puckett <jimmy.puckett@spinen.com>\njimmyxian <jimmyxian2004@yahoo.com.cn>\nJinsoo Park <cellpjs@gmail.com>\nJiri Popelka <jpopelka@redhat.com>\nJiří Župka <jzupka@redhat.com>\njjy <jiangjinyang@outlook.com>\njmzwcn <jmzwcn@gmail.com>\nJoe Beda <joe.github@bedafamily.com>\nJoe Doliner <jdoliner@pachyderm.io>\nJoe Ferguson <joe@infosiftr.com>\nJoe Gordon <joe.gordon0@gmail.com>\nJoe Shaw <joe@joeshaw.org>\nJoe Van Dyk <joe@tanga.com>\nJoel Friedly <joelfriedly@gmail.com>\nJoel Handwell <joelhandwell@gmail.com>\nJoel Hansson <joel.hansson@ecraft.com>\nJoel Wurtz <jwurtz@jolicode.com>\nJoey Geiger <jgeiger@users.noreply.github.com>\nJoey Gibson <joey@joeygibson.com>\nJoffrey F <joffrey@docker.com>\nJohan Euphrosine <proppy@google.com>\nJohan Rydberg <johan.rydberg@gmail.com>\nJohannes 'fish' Ziemke <github@freigeist.org>\nJohn Costa <john.costa@gmail.com>\nJohn Feminella <jxf@jxf.me>\nJohn Gardiner Myers <jgmyers@proofpoint.com>\nJohn Gossman <johngos@microsoft.com>\nJohn Howard (VM) <John.Howard@microsoft.com>\nJohn OBrien III <jobrieniii@yahoo.com>\nJohn Starks <jostarks@microsoft.com>\nJohn Tims <john.k.tims@gmail.com>\nJohn Warwick <jwarwick@gmail.com>\nJohn Willis <john.willis@docker.com>\nJon Wedaman <jweede@gmail.com>\nJonas Pfenniger <jonas@pfenniger.name>\nJonathan A. Sternberg <jonathansternberg@gmail.com>\nJonathan Boulle <jonathanboulle@gmail.com>\nJonathan Camp <jonathan@irondojo.com>\nJonathan Dowland <jon+github@alcopop.org>\nJonathan Lebon <jlebon@redhat.com>\nJonathan McCrohan <jmccrohan@gmail.com>\nJonathan Mueller <j.mueller@apoveda.ch>\nJonathan Pares <jonathanpa@users.noreply.github.com>\nJonathan Rudenberg <jonathan@titanous.com>\nJoost Cassee <joost@cassee.net>\nJordan <jjn2009@users.noreply.github.com>\nJordan Arentsen <blissdev@gmail.com>\nJordan Sissel <jls@semicomplete.com>\nJordan Williams <jordan@jwillikers.com>\nJose Diaz-Gonzalez <josegonzalez@users.noreply.github.com>\nJoseph Anthony Pasquale Holsten <joseph@josephholsten.com>\nJoseph Hager <ajhager@gmail.com>\nJoseph Kern <jkern@semafour.net>\nJosh <jokajak@gmail.com>\nJosh Hawn <josh.hawn@docker.com>\nJosh Poimboeuf <jpoimboe@redhat.com>\nJosiah Kiehl <jkiehl@riotgames.com>\nJosé Tomás Albornoz <jojo@eljojo.net>\nJP <jpellerin@leapfrogonline.com>\njrabbit <jackjrabbit@gmail.com>\nJulian Taylor <jtaylor.debian@googlemail.com>\nJulien Barbier <write0@gmail.com>\nJulien Bisconti <veggiemonk@users.noreply.github.com>\nJulien Bordellier <julienbordellier@gmail.com>\nJulien Dubois <julien.dubois@gmail.com>\nJulien Pervillé <julien.perville@perfect-memory.com>\nJulio Montes <imc.coder@gmail.com>\nJun-Ru Chang <jrjang@gmail.com>\nJussi Nummelin <jussi.nummelin@gmail.com>\nJustas Brazauskas <brazauskasjustas@gmail.com>\nJustin Cormack <justin.cormack@docker.com>\nJustin Force <justin.force@gmail.com>\nJustin Plock <jplock@users.noreply.github.com>\nJustin Simonelis <justin.p.simonelis@gmail.com>\nJustin Terry <juterry@microsoft.com>\nJyrki Puttonen <jyrkiput@gmail.com>\nJérôme Petazzoni <jerome.petazzoni@dotcloud.com>\nJörg Thalheim <joerg@higgsboson.tk>\nKai Blin <kai@samba.org>\nKai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>\nKamil Domański <kamil@domanski.co>\nkamjar gerami <kami.gerami@gmail.com>\nKanstantsin Shautsou <kanstantsin.sha@gmail.com>\nKaran Lyons <karan@karanlyons.com>\nKareem Khazem <karkhaz@karkhaz.com>\nkargakis <kargakis@users.noreply.github.com>\nKarl Grzeszczak <karlgrz@gmail.com>\nKarol Duleba <mr.fuxi@gmail.com>\nKatie McLaughlin <katie@glasnt.com>\nKato Kazuyoshi <kato.kazuyoshi@gmail.com>\nKatrina Owen <katrina.owen@gmail.com>\nKawsar Saiyeed <kawsar.saiyeed@projiris.com>\nkayrus <kay.diam@gmail.com>\nKe Xu <leonhartx.k@gmail.com>\nKeli Hu <dev@keli.hu>\nKen Cochrane <kencochrane@gmail.com>\nKen ICHIKAWA <ichikawa.ken@jp.fujitsu.com>\nKenfe-Mickael Laventure <mickael.laventure@gmail.com>\nKenjiro Nakayama <nakayamakenjiro@gmail.com>\nKent Johnson <kentoj@gmail.com>\nKevin \"qwazerty\" Houdebert <kevin.houdebert@gmail.com>\nKevin Clark <kevin.clark@gmail.com>\nKevin J. Lynagh <kevin@keminglabs.com>\nKevin Menard <kevin@nirvdrum.com>\nKevin P. Kucharczyk <kevinkucharczyk@gmail.com>\nKevin Shi <kshi@andrew.cmu.edu>\nKevin Wallace <kevin@pentabarf.net>\nKevin Yap <me@kevinyap.ca>\nkevinmeredith <kevin.m.meredith@gmail.com>\nKeyvan Fatehi <keyvanfatehi@gmail.com>\nkies <lleelm@gmail.com>\nKim BKC Carlbacker <kim.carlbacker@gmail.com>\nKim Eik <kim@heldig.org>\nKimbro Staken <kstaken@kstaken.com>\nKir Kolyshkin <kir@openvz.org>\nKiran Gangadharan <kiran.daredevil@gmail.com>\nKirill SIbirev <l0kix2@gmail.com>\nknappe <tyler.knappe@gmail.com>\nKohei Tsuruta <coheyxyz@gmail.com>\nKoichi Shiraishi <k@zchee.io>\nKonrad Kleine <konrad.wilhelm.kleine@gmail.com>\nKonstantin Pelykh <kpelykh@zettaset.com>\nKrasimir Georgiev <support@vip-consult.co.uk>\nKristian Haugene <kristian.haugene@capgemini.com>\nKristina Zabunova <triara.xiii@gmail.com>\nkrrg <krrgithub@gmail.com>\nKun Zhang <zkazure@gmail.com>\nKunal Kushwaha <kunal.kushwaha@gmail.com>\nKyle Conroy <kyle.j.conroy@gmail.com>\nkyu <leehk1227@gmail.com>\nLachlan Coote <lcoote@vmware.com>\nLai Jiangshan <jiangshanlai@gmail.com>\nLajos Papp <lajos.papp@sequenceiq.com>\nLakshan Perera <lakshan@laktek.com>\nLalatendu Mohanty <lmohanty@redhat.com>\nlalyos <lalyos@yahoo.com>\nLance Chen <cyen0312@gmail.com>\nLance Kinley <lkinley@loyaltymethods.com>\nLars Butler <Lars.Butler@gmail.com>\nLars Kellogg-Stedman <lars@redhat.com>\nLars R. Damerow <lars@pixar.com>\nLaszlo Meszaros <lacienator@gmail.com>\nLaurent Erignoux <lerignoux@gmail.com>\nLaurie Voss <github@seldo.com>\nLeandro Siqueira <leandro.siqueira@gmail.com>\nLee, Meng-Han <sunrisedm4@gmail.com>\nleeplay <hyeongkyu.lee@navercorp.com>\nLei Jitang <leijitang@huawei.com>\nLen Weincier <len@cloudafrica.net>\nLennie <github@consolejunkie.net>\nLeszek Kowalski <github@leszekkowalski.pl>\nLevi Blackstone <levi.blackstone@rackspace.com>\nLevi Gross <levi@levigross.com>\nLewis Marshall <lewis@lmars.net>\nLewis Peckover <lew+github@lew.io>\nLiana Lo <liana.lixia@gmail.com>\nLiang Mingqiang <mqliang.zju@gmail.com>\nLiang-Chi Hsieh <viirya@gmail.com>\nliaoqingwei <liaoqingwei@huawei.com>\nlimsy <seongyeol37@gmail.com>\nLin Lu <doraalin@163.com>\nLingFaKe <lingfake@huawei.com>\nLinus Heckemann <lheckemann@twig-world.com>\nLiran Tal <liran.tal@gmail.com>\nLiron Levin <liron@twistlock.com>\nLiu Bo <bo.li.liu@oracle.com>\nLiu Hua <sdu.liu@huawei.com>\nLIZAO LI <lzlarryli@gmail.com>\nLloyd Dewolf <foolswisdom@gmail.com>\nLokesh Mandvekar <lsm5@fedoraproject.org>\nlongliqiang88 <394564827@qq.com>\nLorenz Leutgeb <lorenz.leutgeb@gmail.com>\nLorenzo Fontana <fontanalorenzo@me.com>\nLouis Opter <kalessin@kalessin.fr>\nLuca Marturana <lucamarturana@gmail.com>\nLuca Orlandi <luca.orlandi@gmail.com>\nLuca-Bogdan Grigorescu <Luca-Bogdan Grigorescu>\nLucas Chan <lucas-github@lucaschan.com>\nLuis Martínez de Bartolomé Izquierdo <lmartinez@biicode.com>\nLukas Waslowski <cr7pt0gr4ph7@gmail.com>\nlukaspustina <lukas.pustina@centerdevice.com>\nLukasz Zajaczkowski <Lukasz.Zajaczkowski@ts.fujitsu.com>\nlukemarsden <luke@digital-crocus.com>\nLynda O'Leary <lyndaoleary29@gmail.com>\nLénaïc Huard <lhuard@amadeus.com>\nMa Shimiao <mashimiao.fnst@cn.fujitsu.com>\nMabin <bin.ma@huawei.com>\nMadhav Puri <madhav.puri@gmail.com>\nMadhu Venugopal <madhu@socketplane.io>\nMageee <21521230.zju.edu.cn>\nMahesh Tiyyagura <tmahesh@gmail.com>\nmalnick <malnick@gmail..com>\nMalte Janduda <mail@janduda.net>\nmanchoz <giampaolo@trampolineup.com>\nManfred Touron <m@42.am>\nManfred Zabarauskas <manfredas@zabarauskas.com>\nmansinahar <mansinahar@users.noreply.github.com>\nManuel Meurer <manuel@krautcomputing.com>\nManuel Woelker <github@manuel.woelker.org>\nmapk0y <mapk0y@gmail.com>\nMarc Abramowitz <marc@marc-abramowitz.com>\nMarc Kuo <kuomarc2@gmail.com>\nMarc Tamsky <mtamsky@gmail.com>\nMarcelo Salazar <chelosalazar@gmail.com>\nMarco Hennings <marco.hennings@freiheit.com>\nMarcus Farkas <toothlessgear@finitebox.com>\nMarcus Linke <marcus.linke@gmx.de>\nMarcus Ramberg <marcus@nordaaker.com>\nMarek Goldmann <marek.goldmann@gmail.com>\nMarian Marinov <mm@yuhu.biz>\nMarianna Tessel <mtesselh@gmail.com>\nMario Loriedo <mario.loriedo@gmail.com>\nMarius Gundersen <me@mariusgundersen.net>\nMarius Sturm <marius@graylog.com>\nMarius Voila <marius.voila@gmail.com>\nMark Allen <mrallen1@yahoo.com>\nMark McGranaghan <mmcgrana@gmail.com>\nMark McKinstry <mmckinst@umich.edu>\nMark West <markewest@gmail.com>\nMarko Mikulicic <mmikulicic@gmail.com>\nMarko Tibold <marko@tibold.nl>\nMarkus Fix <lispmeister@gmail.com>\nMartijn Dwars <ikben@martijndwars.nl>\nMartijn van Oosterhout <kleptog@svana.org>\nMartin Honermeyer <maze@strahlungsfrei.de>\nMartin Kelly <martin@surround.io>\nMartin Mosegaard Amdisen <martin.amdisen@praqma.com>\nMartin Redmond <redmond.martin@gmail.com>\nMary Anthony <mary.anthony@docker.com>\nMasahito Zembutsu <zembutsu@users.noreply.github.com>\nMason Malone <mason.malone@gmail.com>\nMateusz Sulima <sulima.mateusz@gmail.com>\nMathias Monnerville <mathias@monnerville.com>\nMathieu Le Marec - Pasquet <kiorky@cryptelium.net>\nMatt Apperson <me@mattapperson.com>\nMatt Bachmann <bachmann.matt@gmail.com>\nMatt Bentley <matt.bentley@docker.com>\nMatt Haggard <haggardii@gmail.com>\nMatt McCormick <matt.mccormick@kitware.com>\nMatt Moore <mattmoor@google.com>\nMatt Robenolt <matt@ydekproductions.com>\nMatthew Heon <mheon@redhat.com>\nMatthew Mayer <matthewkmayer@gmail.com>\nMatthew Mueller <mattmuelle@gmail.com>\nMatthew Riley <mattdr@google.com>\nMatthias Klumpp <matthias@tenstral.net>\nMatthias Kühnle <git.nivoc@neverbox.com>\nMatthias Rampke <mr@soundcloud.com>\nMatthieu Hauglustaine <matt.hauglustaine@gmail.com>\nmattymo <raytrac3r@gmail.com>\nmattyw <mattyw@me.com>\nMauricio Garavaglia <mauriciogaravaglia@gmail.com>\nmauriyouth <mauriyouth@gmail.com>\nMax Shytikov <mshytikov@gmail.com>\nMaxim Ivanov <ivanov.maxim@gmail.com>\nMaxim Kulkin <mkulkin@mirantis.com>\nMaxim Treskin <zerthurd@gmail.com>\nMaxime Petazzoni <max@signalfuse.com>\nMeaglith Ma <genedna@gmail.com>\nmeejah <meejah@meejah.ca>\nMegan Kostick <mkostick@us.ibm.com>\nMehul Kar <mehul.kar@gmail.com>\nMengdi Gao <usrgdd@gmail.com>\nMert Yazıcıoğlu <merty@users.noreply.github.com>\nMicah Zoltu <micah@newrelic.com>\nMichael A. Smith <michael@smith-li.com>\nMichael Bridgen <mikeb@squaremobius.net>\nMichael Brown <michael@netdirect.ca>\nMichael Chiang <mchiang@docker.com>\nMichael Crosby <michael@docker.com>\nMichael Currie <mcurrie@bruceforceresearch.com>\nMichael Friis <friism@gmail.com>\nMichael Gorsuch <gorsuch@github.com>\nMichael Grauer <michael.grauer@kitware.com>\nMichael Holzheu <holzheu@linux.vnet.ibm.com>\nMichael Hudson-Doyle <michael.hudson@linaro.org>\nMichael Huettermann <michael@huettermann.net>\nMichael Käufl <docker@c.michael-kaeufl.de>\nMichael Neale <michael.neale@gmail.com>\nMichael Prokop <github@michael-prokop.at>\nMichael Scharf <github@scharf.gr>\nMichael Stapelberg <michael+gh@stapelberg.de>\nMichael Steinert <mike.steinert@gmail.com>\nMichael Thies <michaelthies78@gmail.com>\nMichael West <mwest@mdsol.com>\nMichal Fojtik <mfojtik@redhat.com>\nMichal Gebauer <mishak@mishak.net>\nMichal Jemala <michal.jemala@gmail.com>\nMichal Minar <miminar@redhat.com>\nMichaël Pailloncy <mpapo.dev@gmail.com>\nMichał Czeraszkiewicz <czerasz@gmail.com>\nMichiel@unhosted <michiel@unhosted.org>\nMiguel Angel Fernández <elmendalerenda@gmail.com>\nMiguel Morales <mimoralea@gmail.com>\nMihai Borobocea <MihaiBorob@gmail.com>\nMihuleacc Sergiu <mihuleac.sergiu@gmail.com>\nMike Brown <brownwm@us.ibm.com>\nMike Chelen <michael.chelen@gmail.com>\nMike Danese <mikedanese@google.com>\nMike Dillon <mike@embody.org>\nMike Dougherty <mike.dougherty@docker.com>\nMike Gaffney <mike@uberu.com>\nMike Goelzer <mgoelzer@docker.com>\nMike Leone <mleone896@gmail.com>\nMike MacCana <mike.maccana@gmail.com>\nMike Naberezny <mike@naberezny.com>\nMike Snitzer <snitzer@redhat.com>\nmikelinjie <294893458@qq.com>\nMikhail Sobolev <mss@mawhrin.net>\nMiloslav Trmač <mitr@redhat.com>\nmingqing <limingqing@cyou-inc.com>\nMingzhen Feng <fmzhen@zju.edu.cn>\nMitch Capper <mitch.capper@gmail.com>\nmlarcher <github@ringabell.org>\nMohammad Banikazemi <mb@us.ibm.com>\nMohammed Aaqib Ansari <maaquib@gmail.com>\nMohit Soni <mosoni@ebay.com>\nMorgan Bauer <mbauer@us.ibm.com>\nMorgante Pell <morgante.pell@morgante.net>\nMorgy93 <thomas@ulfertsprygoda.de>\nMorten Siebuhr <sbhr@sbhr.dk>\nMorton Fox <github@qslw.com>\nMoysés Borges <moysesb@gmail.com>\nmqliang <mqliang.zju@gmail.com>\nMrunal Patel <mrunalp@gmail.com>\nmsabansal <sabansal@microsoft.com>\nmschurenko <matt.schurenko@gmail.com>\nmuge <stevezhang2014@gmail.com>\nMustafa Akın <mustafa91@gmail.com>\nMuthukumar R <muthur@gmail.com>\nMáximo Cuadros <mcuadros@gmail.com>\nMédi-Rémi Hashim <medimatrix@users.noreply.github.com>\nNahum Shalman <nshalman@omniti.com>\nNakul Pathak <nakulpathak3@hotmail.com>\nNalin Dahyabhai <nalin@redhat.com>\nNan Monnand Deng <monnand@gmail.com>\nNaoki Orii <norii@cs.cmu.edu>\nNatalie Parker <nparker@omnifone.com>\nNatanael Copa <natanael.copa@docker.com>\nNate Brennand <nate.brennand@clever.com>\nNate Eagleson <nate@nateeag.com>\nNate Jones <nate@endot.org>\nNathan Hsieh <hsieh.nathan@gmail.com>\nNathan Kleyn <nathan@nathankleyn.com>\nNathan LeClaire <nathan.leclaire@docker.com>\nNathan McCauley <nathan.mccauley@docker.com>\nNathan Williams <nathan@teamtreehouse.com>\nNeal McBurnett <neal@mcburnett.org>\nNelson Chen <crazysim@gmail.com>\nNghia Tran <nghia@google.com>\nNiall O'Higgins <niallo@unworkable.org>\nNicholas E. Rabenau <nerab@gmx.at>\nNick Irvine <nfirvine@nfirvine.com>\nNick Parker <nikaios@gmail.com>\nNick Payne <nick@kurai.co.uk>\nNick Stenning <nick.stenning@digital.cabinet-office.gov.uk>\nNick Stinemates <nick@stinemates.org>\nNicolas Borboën <ponsfrilus@users.noreply.github.com>\nNicolas De loof <nicolas.deloof@gmail.com>\nNicolas Dudebout <nicolas.dudebout@gatech.edu>\nNicolas Goy <kuon@goyman.com>\nNicolas Kaiser <nikai@nikai.net>\nNicolás Hock Isaza <nhocki@gmail.com>\nNigel Poulton <nigelpoulton@hotmail.com>\nNikolaMandic <mn080202@gmail.com>\nnikolas <nnyby@columbia.edu>\nNirmal Mehta <nirmalkmehta@gmail.com>\nNishant Totla <nishanttotla@gmail.com>\nNIWA Hideyuki <niwa.niwa@nifty.ne.jp>\nnoducks <onemannoducks@gmail.com>\nNolan Darilek <nolan@thewordnerd.info>\nnponeccop <andy.melnikov@gmail.com>\nNuutti Kotivuori <naked@iki.fi>\nnzwsch <hi@nzwsch.com>\nO.S. Tezer <ostezer@gmail.com>\nobjectified <objectified@gmail.com>\nOddBloke <daniel@daniel-watkins.co.uk>\nodk- <github@odkurzacz.org>\nOguz Bilgic <fisyonet@gmail.com>\nOh Jinkyun <tintypemolly@gmail.com>\nOhad Schneider <ohadschn@users.noreply.github.com>\nOle Reifschneider <mail@ole-reifschneider.de>\nOliver Neal <ItsVeryWindy@users.noreply.github.com>\nOlivier Gambier <dmp42@users.noreply.github.com>\nOlle Jonsson <olle.jonsson@gmail.com>\nOriol Francès <oriolfa@gmail.com>\nOtto Kekäläinen <otto@seravo.fi>\noyld <oyld0210@163.com>\nozlerhakan <hakan.ozler@kodcu.com>\npaetling <paetling@gmail.com>\npandrew <letters@paulnotcom.se>\npanticz <mail@konczalski.de>\nPaolo G. Giarrusso <p.giarrusso@gmail.com>\nPascal Borreli <pascal@borreli.com>\nPascal Hartig <phartig@rdrei.net>\nPatrick Devine <patrick.devine@docker.com>\nPatrick Hemmer <patrick.hemmer@gmail.com>\nPatrick Stapleton <github@gdi2290.com>\npattichen <craftsbear@gmail.com>\nPaul <paul9869@gmail.com>\npaul <paul@inkling.com>\nPaul Annesley <paul@annesley.cc>\nPaul Bellamy <paul.a.bellamy@gmail.com>\nPaul Bowsher <pbowsher@globalpersonals.co.uk>\nPaul Hammond <paul@paulhammond.org>\nPaul Jimenez <pj@place.org>\nPaul Lietar <paul@lietar.net>\nPaul Liljenberg <liljenberg.paul@gmail.com>\nPaul Morie <pmorie@gmail.com>\nPaul Nasrat <pnasrat@gmail.com>\nPaul Weaver <pauweave@cisco.com>\nPavel Lobashov <ShockwaveNN@gmail.com>\nPavel Pospisil <pospispa@gmail.com>\nPavel Sutyrin <pavel.sutyrin@gmail.com>\nPavel Tikhomirov <ptikhomirov@parallels.com>\nPavlos Ratis <dastergon@gentoo.org>\nPeeyush Gupta <gpeeyush@linux.vnet.ibm.com>\nPeggy Li <peggyli.224@gmail.com>\nPei Su <sillyousu@gmail.com>\nPenghan Wang <ph.wang@daocloud.io>\nperhapszzy@sina.com <perhapszzy@sina.com>\nPeter Bourgon <peter@bourgon.org>\nPeter Braden <peterbraden@peterbraden.co.uk>\nPeter Choi <reikani@Peters-MacBook-Pro.local>\nPeter Dave Hello <PeterDaveHello@users.noreply.github.com>\nPeter Edge <peter.edge@gmail.com>\nPeter Ericson <pdericson@gmail.com>\nPeter Esbensen <pkesbensen@gmail.com>\nPeter Malmgren <ptmalmgren@gmail.com>\nPeter Salvatore <peter@psftw.com>\nPeter Volpe <petervo@redhat.com>\nPeter Waller <p@pwaller.net>\nPhil <underscorephil@gmail.com>\nPhil Estes <estesp@linux.vnet.ibm.com>\nPhil Spitler <pspitler@gmail.com>\nPhilip Monroe <phil@philmonroe.com>\nPhilipp Wahala <philipp.wahala@gmail.com>\nPhilipp Weissensteiner <mail@philippweissensteiner.com>\nPhillip Alexander <git@phillipalexander.io>\npidster <pid@pidster.com>\nPiergiuliano Bossi <pgbossi@gmail.com>\nPierre <py@poujade.org>\nPierre Carrier <pierre@meteor.com>\nPierre Wacrenier <pierre.wacrenier@gmail.com>\nPierre-Alain RIVIERE <pariviere@ippon.fr>\nPiotr Bogdan <ppbogdan@gmail.com>\npixelistik <pixelistik@users.noreply.github.com>\nPorjo <porjo38@yahoo.com.au>\nPoul Kjeldager Sørensen <pks@s-innovations.net>\nPradeep Chhetri <pradeep@indix.com>\nPrasanna Gautam <prasannagautam@gmail.com>\nPrayag Verma <prayag.verma@gmail.com>\nPrzemek Hejman <przemyslaw.hejman@gmail.com>\npysqz <randomq@126.com>\nqg <1373319223@qq.com>\nqhuang <h.huangqiang@huawei.com>\nQiang Huang <h.huangqiang@huawei.com>\nqq690388648 <690388648@qq.com>\nQuentin Brossard <qbrossard@gmail.com>\nQuentin Perez <qperez@ocs.online.net>\nQuentin Tayssier <qtayssier@gmail.com>\nr0n22 <cameron.regan@gmail.com>\nRafal Jeczalik <rjeczalik@gmail.com>\nRafe Colton <rafael.colton@gmail.com>\nRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>\nRaghuram Devarakonda <draghuram@gmail.com>\nRajat Pandit <rp@rajatpandit.com>\nRajdeep Dua <dua_rajdeep@yahoo.com>\nRalle <spam@rasmusa.net>\nRalph Bean <rbean@redhat.com>\nRamkumar Ramachandra <artagnon@gmail.com>\nRamon van Alteren <ramon@vanalteren.nl>\nRay Tsang <saturnism@users.noreply.github.com>\nReadmeCritic <frankensteinbot@gmail.com>\nRecursive Madman <recursive.madman@gmx.de>\nRegan McCooey <rmccooey27@aol.com>\nRemi Rampin <remirampin@gmail.com>\nRenato Riccieri Santos Zannon <renato.riccieri@gmail.com>\nresouer <resouer@163.com>\nrgstephens <greg@udon.org>\nRhys Hiltner <rhys@twitch.tv>\nRich Seymour <rseymour@gmail.com>\nRichard <richard.scothern@gmail.com>\nRichard Burnison <rburnison@ebay.com>\nRichard Harvey <richard@squarecows.com>\nRichard Metzler <richard@paadee.com>\nRichard Scothern <richard.scothern@gmail.com>\nRicho Healey <richo@psych0tik.net>\nRick Bradley <rick@users.noreply.github.com>\nRick van de Loo <rickvandeloo@gmail.com>\nRick Wieman <git@rickw.nl>\nRik Nijessen <rik@keefo.nl>\nRiku Voipio <riku.voipio@linaro.org>\nRiley Guerin <rileytg.dev@gmail.com>\nRitesh H Shukla <sritesh@vmware.com>\nRiyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>\nRob Vesse <rvesse@dotnetrdf.org>\nRobert Bachmann <rb@robertbachmann.at>\nRobert Bittle <guywithnose@gmail.com>\nRobert Obryk <robryk@gmail.com>\nRobert Stern <lexandro2000@gmail.com>\nRobert Wallis <smilingrob@gmail.com>\nRoberto G. Hashioka <roberto.hashioka@docker.com>\nRobin Naundorf <r.naundorf@fh-muenster.de>\nRobin Schneider <ypid@riseup.net>\nRobin Speekenbrink <robin@kingsquare.nl>\nrobpc <rpcann@gmail.com>\nRodolfo Carvalho <rhcarvalho@gmail.com>\nRodrigo Vaz <rodrigo.vaz@gmail.com>\nRoel Van Nyen <roel.vannyen@gmail.com>\nRoger Peppe <rogpeppe@gmail.com>\nRohit Jnagal <jnagal@google.com>\nRohit Kadam <rohit.d.kadam@gmail.com>\nRoland Huß <roland@jolokia.org>\nRoland Kammerer <roland.kammerer@linbit.com>\nRoland Moriz <rmoriz@users.noreply.github.com>\nRoma Sokolov <sokolov.r.v@gmail.com>\nRoman Strashkin <roman.strashkin@gmail.com>\nRon Smits <ron.smits@gmail.com>\nroot <docker-dummy@example.com>\nroot <root@localhost>\nroot <root@ubuntu-14.04-amd64-vbox>\nroot <root@webm215.cluster016.ha.ovh.net>\nRory Hunter <roryhunter2@gmail.com>\nRory McCune <raesene@gmail.com>\nRoss Boucher <rboucher@gmail.com>\nRovanion Luckey <rovanion.luckey@gmail.com>\nRozhnov Alexandr <nox73@ya.ru>\nrsmoorthy <rsmoorthy@users.noreply.github.com>\nRudolph Gottesheim <r.gottesheim@loot.at>\nRui Lopes <rgl@ruilopes.com>\nRyan Anderson <anderson.ryanc@gmail.com>\nRyan Aslett <github@mixologic.com>\nRyan Belgrave <rmb1993@gmail.com>\nRyan Detzel <ryan.detzel@gmail.com>\nRyan Fowler <rwfowler@gmail.com>\nRyan McLaughlin <rmclaughlin@insidesales.com>\nRyan O'Donnell <odonnellryanc@gmail.com>\nRyan Seto <ryanseto@yak.net>\nRyan Thomas <rthomas@atlassian.com>\nRyan Trauntvein <rtrauntvein@novacoast.com>\nRyan Wallner <ryan.wallner@clusterhq.com>\nRyanDeng <sheldon.d1018@gmail.com>\nRémy Greinhofer <remy.greinhofer@livelovely.com>\ns. rannou <mxs@sbrk.org>\ns00318865 <sunyuan3@huawei.com>\nSabin Basyal <sabin.basyal@gmail.com>\nSachin Joshi <sachin_jayant_joshi@hotmail.com>\nSagar Hani <sagarhani33@gmail.com>\nSainath Grandhi <sainath.grandhi@intel.com>\nSally O'Malley <somalley@redhat.com>\nSam Abed <sam.abed@gmail.com>\nSam Alba <sam.alba@gmail.com>\nSam Bailey <cyprix@cyprix.com.au>\nSam J Sharpe <sam.sharpe@digital.cabinet-office.gov.uk>\nSam Neirinck <sam@samneirinck.com>\nSam Reis <sreis@atlassian.com>\nSam Rijs <srijs@airpost.net>\nSambuddha Basu <sambuddhabasu1@gmail.com>\nSami Wagiaalla <swagiaal@redhat.com>\nSamuel Andaya <samuel@andaya.net>\nSamuel Dion-Girardeau <samuel.diongirardeau@gmail.com>\nSamuel Karp <skarp@amazon.com>\nSamuel PHAN <samuel-phan@users.noreply.github.com>\nSankar சங்கர் <sankar.curiosity@gmail.com>\nSanket Saurav <sanketsaurav@gmail.com>\nSanthosh Manohar <santhosh@docker.com>\nsapphiredev <se.imas.kr@gmail.com>\nSatnam Singh <satnam@raintown.org>\nsatoru <satorulogic@gmail.com>\nSatoshi Amemiya <satoshi_amemiya@voyagegroup.com>\nscaleoutsean <scaleoutsean@users.noreply.github.com>\nScott Bessler <scottbessler@gmail.com>\nScott Collier <emailscottcollier@gmail.com>\nScott Johnston <scott@docker.com>\nScott Stamp <scottstamp851@gmail.com>\nScott Walls <sawalls@umich.edu>\nsdreyesg <sdreyesg@gmail.com>\nSean Christopherson <sean.j.christopherson@intel.com>\nSean Cronin <seancron@gmail.com>\nSean OMeara <sean@chef.io>\nSean P. Kane <skane@newrelic.com>\nSebastiaan van Steenis <mail@superseb.nl>\nSebastiaan van Stijn <github@gone.nl>\nSenthil Kumar Selvaraj <senthil.thecoder@gmail.com>\nSenthil Kumaran <senthil@uthcode.com>\nSeongJae Park <sj38.park@gmail.com>\nSeongyeol Lim <seongyeol37@gmail.com>\nSerge Hallyn <serge.hallyn@ubuntu.com>\nSergey Alekseev <sergey.alekseev.minsk@gmail.com>\nSergey Evstifeev <sergey.evstifeev@gmail.com>\nSevki Hasirci <s@sevki.org>\nShane Canon <scanon@lbl.gov>\nShane da Silva <shane@dasilva.io>\nshaunol <shaunol@gmail.com>\nShawn Landden <shawn@churchofgit.com>\nShawn Siefkas <shawn.siefkas@meredith.com>\nShekhar Gulati <shekhargulati84@gmail.com>\nSheng Yang <sheng@yasker.org>\nShengbo Song <thomassong@tencent.com>\nShih-Yuan Lee <fourdollars@gmail.com>\nShijiang Wei <mountkin@gmail.com>\nShishir Mahajan <shishir.mahajan@redhat.com>\nshuai-z <zs.broccoli@gmail.com>\nShuwei Hao <haosw@cn.ibm.com>\nSian Lerk Lau <kiawin@gmail.com>\nsidharthamani <sid@rancher.com>\nSilas Sewell <silas@sewell.org>\nSimei He <hesimei@zju.edu.cn>\nSimon Eskildsen <sirup@sirupsen.com>\nSimon Leinen <simon.leinen@gmail.com>\nSimon Taranto <simon.taranto@gmail.com>\nSindhu S <sindhus@live.in>\nSjoerd Langkemper <sjoerd-github@linuxonly.nl>\nSolganik Alexander <solganik@gmail.com>\nSolomon Hykes <solomon@docker.com>\nSong Gao <song@gao.io>\nSoshi Katsuta <soshi.katsuta@gmail.com>\nSoulou <leo@unbekandt.eu>\nSpencer Brown <spencer@spencerbrown.org>\nSpencer Smith <robertspencersmith@gmail.com>\nSridatta Thatipamala <sthatipamala@gmail.com>\nSridhar Ratnakumar <sridharr@activestate.com>\nSrini Brahmaroutu <srbrahma@us.ibm.com>\nsrinsriv <srinsriv@users.noreply.github.com>\nSteeve Morin <steeve.morin@gmail.com>\nStefan Berger <stefanb@linux.vnet.ibm.com>\nStefan J. Wernli <swernli@microsoft.com>\nStefan Praszalowicz <stefan@greplin.com>\nStefan Scherer <scherer_stefan@icloud.com>\nStefan Staudenmeyer <doerte@instana.com>\nStefan Weil <sw@weilnetz.de>\nStephen Crosby <stevecrozz@gmail.com>\nStephen Day <stephen.day@docker.com>\nStephen Rust <srust@blockbridge.com>\nSteve Durrheimer <s.durrheimer@gmail.com>\nSteve Francia <steve.francia@gmail.com>\nSteve Koch <stevekochscience@gmail.com>\nSteven Burgess <steven.a.burgess@hotmail.com>\nSteven Iveson <sjiveson@outlook.com>\nSteven Merrill <steven.merrill@gmail.com>\nSteven Richards <steven@axiomzen.co>\nSteven Taylor <steven.taylor@me.com>\nSubhajit Ghosh <isubuz.g@gmail.com>\nSujith Haridasan <sujith.h@gmail.com>\nSuryakumar Sudar <surya.trunks@gmail.com>\nSven Dowideit <SvenDowideit@home.org.au>\nSwapnil Daingade <swapnil.daingade@gmail.com>\nSylvain Baubeau <sbaubeau@redhat.com>\nSylvain Bellemare <sylvain@ascribe.io>\nSébastien <sebastien@yoozio.com>\nSébastien Luttringer <seblu@seblu.net>\nSébastien Stormacq <sebsto@users.noreply.github.com>\nTAGOMORI Satoshi <tagomoris@gmail.com>\ntang0th <tang0th@gmx.com>\nTangi COLIN <tangicolin@gmail.com>\nTatsuki Sugiura <sugi@nemui.org>\nTatsushi Inagaki <e29253@jp.ibm.com>\nTaylor Jones <monitorjbl@gmail.com>\ntbonza <tylers.pile@gmail.com>\nTed M. Young <tedyoung@gmail.com>\nTehmasp Chaudhri <tehmasp@gmail.com>\nTejesh Mehta <tejesh.mehta@gmail.com>\nterryding77 <550147740@qq.com>\ntgic <farmer1992@gmail.com>\nThatcher Peskens <thatcher@docker.com>\ntheadactyl <thea.lamkin@gmail.com>\nThell 'Bo' Fowler <thell@tbfowler.name>\nThermionix <bond711@gmail.com>\nThijs Terlouw <thijsterlouw@gmail.com>\nThomas Bikeev <thomas.bikeev@mac.com>\nThomas Frössman <thomasf@jossystem.se>\nThomas Gazagnaire <thomas@gazagnaire.org>\nThomas Grainger <tagrain@gmail.com>\nThomas Hansen <thomas.hansen@gmail.com>\nThomas Leonard <thomas.leonard@docker.com>\nThomas LEVEIL <thomasleveil@gmail.com>\nThomas Orozco <thomas@orozco.fr>\nThomas Riccardi <riccardi@systran.fr>\nThomas Schroeter <thomas@cliqz.com>\nThomas Sjögren <konstruktoid@users.noreply.github.com>\nThomas Swift <tgs242@gmail.com>\nThomas Tanaka <thomas.tanaka@oracle.com>\nThomas Texier <sharkone@en-mousse.org>\nTianon Gravi <admwiggin@gmail.com>\nTibor Vass <teabee89@gmail.com>\nTiffany Low <tiffany@box.com>\nTim Bosse <taim@bosboot.org>\nTim Dettrick <t.dettrick@uq.edu.au>\nTim Düsterhus <tim@bastelstu.be>\nTim Hockin <thockin@google.com>\nTim Ruffles <oi@truffles.me.uk>\nTim Smith <timbot@google.com>\nTim Terhorst <mynamewastaken+git@gmail.com>\nTim Wang <timwangdev@gmail.com>\nTim Waugh <twaugh@redhat.com>\nTim Wraight <tim.wraight@tangentlabs.co.uk>\nTimothy Hobbs <timothyhobbs@seznam.cz>\ntjwebb123 <tjwebb123@users.noreply.github.com>\ntobe <tobegit3hub@gmail.com>\nTobias Bieniek <Tobias.Bieniek@gmx.de>\nTobias Bradtke <webwurst@gmail.com>\nTobias Gesellchen <tobias@gesellix.de>\nTobias Klauser <tklauser@distanz.ch>\nTobias Schmidt <ts@soundcloud.com>\nTobias Schwab <tobias.schwab@dynport.de>\nTodd Crane <todd@toddcrane.com>\nTodd Lunter <tlunter@gmail.com>\nTodd Whiteman <todd.whiteman@joyent.com>\nToli Kuznets <toli@docker.com>\nTom Barlow <tomwbarlow@gmail.com>\nTom Denham <tom@tomdee.co.uk>\nTom Fotherby <tom+github@peopleperhour.com>\nTom Howe <tom.howe@enstratius.com>\nTom Hulihan <hulihan.tom159@gmail.com>\nTom Maaswinkel <tom.maaswinkel@12wiki.eu>\nTom X. Tobin <tomxtobin@tomxtobin.com>\nTomas Tomecek <ttomecek@redhat.com>\nTomasz Kopczynski <tomek@kopczynski.net.pl>\nTomasz Lipinski <tlipinski@users.noreply.github.com>\nTomasz Nurkiewicz <nurkiewicz@gmail.com>\nTommaso Visconti <tommaso.visconti@gmail.com>\nTomáš Hrčka <thrcka@redhat.com>\nTonis Tiigi <tonistiigi@gmail.com>\nTonny Xu <tonny.xu@gmail.com>\nTony Daws <tony@daws.ca>\nTony Miller <mcfiredrill@gmail.com>\ntoogley <toogley@mailbox.org>\nTorstein Husebø <torstein@huseboe.net>\ntpng <benny.tpng@gmail.com>\ntracylihui <793912329@qq.com>\nTravis Cline <travis.cline@gmail.com>\nTravis Thieman <travis.thieman@gmail.com>\nTrent Ogren <tedwardo2@gmail.com>\nTrevor <trevinwoodstock@gmail.com>\nTrevor Pounds <trevor.pounds@gmail.com>\ntrishnaguha <trishnaguha17@gmail.com>\nTristan Carel <tristan@cogniteev.com>\nTroy Denton <trdenton@gmail.com>\nTyler Brock <tyler.brock@gmail.com>\nTzu-Jung Lee <roylee17@gmail.com>\nTõnis Tiigi <tonistiigi@gmail.com>\nUlysse Carion <ulyssecarion@gmail.com>\nunknown <sebastiaan@ws-key-sebas3.dpi1.dpi>\nvagrant <vagrant@ubuntu-14.04-amd64-vbox>\nVaidas Jablonskis <jablonskis@gmail.com>\nVeres Lajos <vlajos@gmail.com>\nvgeta <gopikannan.venugopalsamy@gmail.com>\nVictor Coisne <victor.coisne@dotcloud.com>\nVictor Costan <costan@gmail.com>\nVictor I. Wood <viw@t2am.com>\nVictor Lyuboslavsky <victor@victoreda.com>\nVictor Marmol <vmarmol@google.com>\nVictor Palma <palma.victor@gmail.com>\nVictor Vieux <victor.vieux@docker.com>\nVictoria Bialas <victoria.bialas@docker.com>\nVijaya Kumar K <vijayak@caviumnetworks.com>\nViktor Stanchev <me@viktorstanchev.com>\nViktor Vojnovski <viktor.vojnovski@amadeus.com>\nVinayRaghavanKS <raghavan.vinay@gmail.com>\nVincent Batts <vbatts@redhat.com>\nVincent Bernat <bernat@luffy.cx>\nVincent Bernat <Vincent.Bernat@exoscale.ch>\nVincent Demeester <vincent@sbr.pm>\nVincent Giersch <vincent.giersch@ovh.net>\nVincent Mayers <vincent.mayers@inbloom.org>\nVincent Woo <me@vincentwoo.com>\nVinod Kulkarni <vinod.kulkarni@gmail.com>\nVishal Doshi <vishal.doshi@gmail.com>\nVishnu Kannan <vishnuk@google.com>\nVitor Monteiro <vmrmonteiro@gmail.com>\nVivek Agarwal <me@vivek.im>\nVivek Dasgupta <vdasgupt@redhat.com>\nVivek Goyal <vgoyal@redhat.com>\nVladimir Bulyga <xx@ccxx.cc>\nVladimir Kirillov <proger@wilab.org.ua>\nVladimir Rutsky <altsysrq@gmail.com>\nVladimir Varankin <nek.narqo+git@gmail.com>\nVladimirAus <v_roudakov@yahoo.com>\nVojtech Vitek (V-Teq) <vvitek@redhat.com>\nwaitingkuo <waitingkuo0527@gmail.com>\nWalter Leibbrandt <github@wrl.co.za>\nWalter Stanish <walter@pratyeka.org>\nWANG Chao <wcwxyz@gmail.com>\nWang Xing <hzwangxing@corp.netease.com>\nWard Vandewege <ward@jhvc.com>\nWarheadsSE <max@warheads.net>\nWayne Chang <wayne@neverfear.org>\nWei-Ting Kuo <waitingkuo0527@gmail.com>\nweiyan <weiyan3@huawei.com>\nWeiyang Zhu <cnresonant@gmail.com>\nWen Cheng Ma <wenchma@cn.ibm.com>\nWendel Fleming <wfleming@usc.edu>\nWenxuan Zhao <viz@linux.com>\nWenyu You <21551128@zju.edu.cn>\nWes Morgan <cap10morgan@gmail.com>\nWill Dietz <w@wdtz.org>\nWill Rouesnel <w.rouesnel@gmail.com>\nWill Weaver <monkey@buildingbananas.com>\nwillhf <willhf@gmail.com>\nWilliam Delanoue <william.delanoue@gmail.com>\nWilliam Henry <whenry@redhat.com>\nWilliam Hubbs <w.d.hubbs@gmail.com>\nWilliam Riancho <wr.wllm@gmail.com>\nWilliam Thurston <thurstw@amazon.com>\nWiseTrem <shepelyov.g@gmail.com>\nwlan0 <sidharthamn@gmail.com>\nWolfgang Powisch <powo@powo.priv.at>\nwonderflow <wonderflow.sun@gmail.com>\nxamyzhao <x.amy.zhao@gmail.com>\nXiaoBing Jiang <s7v7nislands@gmail.com>\nXiaoxu Chen <chenxiaoxu14@otcaix.iscas.ac.cn>\nxiekeyang <xiekeyang@huawei.com>\nXinzi Zhou <imdreamrunner@gmail.com>\nXiuming Chen <cc@cxm.cc>\nxlgao-zju <xlgao@zju.edu.cn>\nxuzhaokui <cynicholas@gmail.com>\nYahya <ya7yaz@gmail.com>\nYAMADA Tsuyoshi <tyamada@minimum2scp.org>\nYan Feng <yanfeng2@huawei.com>\nYang Bai <hamo.by@gmail.com>\nyangshukui <yangshukui@huawei.com>\nYasunori Mahata <nori@mahata.net>\nYestin Sun <sunyi0804@gmail.com>\nYi EungJun <eungjun.yi@navercorp.com>\nYibai Zhang <xm1994@gmail.com>\nYihang Ho <hoyihang5@gmail.com>\nYing Li <cyli@twistedmatrix.com>\nYohei Ueda <yohei@jp.ibm.com>\nYong Tang <yong.tang.github@outlook.com>\nYongzhi Pan <panyongzhi@gmail.com>\nyorkie <yorkiefixer@gmail.com>\nYoucef YEKHLEF <yyekhlef@gmail.com>\nYuan Sun <sunyuan3@huawei.com>\nyuchangchun <yuchangchun1@huawei.com>\nyuchengxia <yuchengxia@huawei.com>\nYurii Rashkovskii <yrashk@gmail.com>\nyuzou <zouyu7@huawei.com>\nZac Dover <zdover@redhat.com>\nZach Borboa <zachborboa@gmail.com>\nZachary Jaffee <zij@case.edu>\nZain Memon <zain@inzain.net>\nZaiste! <oh@zaiste.net>\nZane DeGraffenried <zane.deg@gmail.com>\nZefan Li <lizefan@huawei.com>\nZen Lin(Zhinan Lin) <linzhinan@huawei.com>\nZhang Kun <zkazure@gmail.com>\nZhang Wei <zhangwei555@huawei.com>\nZhang Wentao <zhangwentao234@huawei.com>\nZhenan Ye <21551168@zju.edu.cn>\nZhu Guihua <zhugh.fnst@cn.fujitsu.com>\nZhuoyun Wei <wzyboy@wzyboy.org>\nZilin Du <zilin.du@gmail.com>\nzimbatm <zimbatm@zimbatm.com>\nZiming Dong <bnudzm@foxmail.com>\nZJUshuaizhou <21551191@zju.edu.cn>\nzmarouf <zeid.marouf@gmail.com>\nZoltan Tombol <zoltan.tombol@gmail.com>\nzqh <zqhxuyuan@gmail.com>\nZuhayr Elahi <elahi.zuhayr@gmail.com>\nZunayed Ali <zunayed@gmail.com>\nÁlex González <agonzalezro@gmail.com>\nÁlvaro Lázaro <alvaro.lazaro.g@gmail.com>\nÁtila Camurça Alves <camurca.home@gmail.com>\n尹吉峰 <jifeng.yin@gmail.com>\n搏通 <yufeng.pyf@alibaba-inc.com>\n"
  },
  {
    "path": "vendor/go.podman.io/storage/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        https://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   Copyright 2013-2016 Docker, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS 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": "vendor/go.podman.io/storage/Makefile",
    "content": ".PHONY: \\\n\tall \\\n\tbinary \\\n\tclean \\\n\tcontainers-storage \\\n\tcross \\\n\tdefault \\\n\tdocs \\\n\tgccgo \\\n\thelp \\\n\tinstall \\\n\tinstall.docs \\\n\tlint \\\n\tlocal-binary \\\n\tlocal-cross \\\n\tlocal-gccgo \\\n\tlocal-test \\\n\tlocal-test-integration \\\n\tlocal-test-unit \\\n\ttest-integration \\\n\ttest-unit\n\nNATIVETAGS :=\nAUTOTAGS := $(shell ./hack/btrfs_tag.sh) $(shell ./hack/libsubid_tag.sh)\nBUILDFLAGS := -tags \"$(AUTOTAGS) $(TAGS)\" $(FLAGS)\nGO ?= go\nTESTFLAGS := $(shell $(GO) test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race)\n\ndefault all: local-binary docs local-cross ## build and cross-build\\nbinaries and docs\n\nclean: ## remove all built files\n\t$(RM) -f containers-storage containers-storage.* docs/*.1 docs/*.5\n\ncontainers-storage: ## build using gc on the host\n\t$(GO) build -compiler gc $(BUILDFLAGS) ./cmd/containers-storage\n\nbinary local-binary: containers-storage\n\nlocal-gccgo gccgo: ## build using gccgo on the host\n\tGCCGO=$(PWD)/hack/gccgo-wrapper.sh $(GO) build -compiler gccgo $(BUILDFLAGS) -o containers-storage.gccgo ./cmd/containers-storage\n\nlocal-cross cross: ## cross build the binaries for arm, darwin, and freebsd\n\t@for target in linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64 linux/ppc64le linux/riscv64 linux/s390x linux/mips linux/mipsle linux/mips64 linux/mips64le darwin/amd64 windows/amd64 freebsd/amd64 freebsd/arm64 ; do \\\n\t\tos=`echo $${target} | cut -f1 -d/` ; \\\n\t\tarch=`echo $${target} | cut -f2 -d/` ; \\\n\t\tsuffix=$${os}.$${arch} ; \\\n\t\techo env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $(GO) build -compiler gc -tags \\\"$(NATIVETAGS) $(TAGS)\\\" $(FLAGS) ./... ; \\\n\t\tenv CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $(GO) build -compiler gc -tags \"$(NATIVETAGS) $(TAGS)\" $(FLAGS) ./... || exit 1 ; \\\n\t\techo env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $(GO) build -compiler gc -tags \\\"$(NATIVETAGS) $(TAGS)\\\" $(FLAGS) -o containers-storage.$${suffix} ./cmd/containers-storage ; \\\n\t\tenv CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $(GO) build -compiler gc -tags \"$(NATIVETAGS) $(TAGS)\" $(FLAGS) -o containers-storage.$${suffix} ./cmd/containers-storage || exit 1 ; \\\n\tdone\n\ndocs: ## build the docs on the host\n\t$(MAKE) -C docs docs\n\nlocal-test: local-binary local-test-unit local-test-integration ## build the binaries and run the tests\n\nlocal-test-unit test-unit: local-binary ## run the unit tests on the host (requires\\nsuperuser privileges)\n\t@$(GO) test -count 1 $(BUILDFLAGS) $(TESTFLAGS) ./...\n\nlocal-test-integration test-integration: local-binary ## run the integration tests on the host (requires\\nsuperuser privileges)\n\t@cd tests; ./test_runner.bash\n\ninstall.docs: docs\n\t$(MAKE) -C docs install\n\ninstall: install.docs\n\nlint:\n\tgolangci-lint run --build-tags=\"$(AUTOTAGS) $(TAGS)\"\n\n.PHONY: fmt\nfmt:\n\tgolangci-lint fmt\n\nhelp: ## this help\n\t@awk 'BEGIN {FS = \":.*?## \"} /^[a-z A-Z_-]+:.*?## / {gsub(\" \",\",\",$$1);gsub(\"\\\\\\\\n\",sprintf(\"\\n%22c\",\" \"), $$2);printf \"\\033[36m%-21s\\033[0m %s\\n\", $$1, $$2}' $(MAKEFILE_LIST)\n\n.PHONY: tidy-in-container\ntidy-in-container:\n\tpodman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy\n\n.PHONY: tidy\ntidy:\n\t$(GO) mod tidy\n\t$(GO) mod verify\n\t$(GO) mod edit -toolchain none\n"
  },
  {
    "path": "vendor/go.podman.io/storage/NOTICE",
    "content": "Docker\nCopyright 2012-2016 Docker, Inc.\n\nThis product includes software developed at Docker, Inc. (https://www.docker.com).\n\nThis product contains software (https://github.com/kr/pty) developed\nby Keith Rarick, licensed under the MIT License.\n\nThe following is courtesy of our legal counsel:\n\n\nUse and transfer of Docker may be subject to certain restrictions by the\nUnited States and other governments.\nIt is your responsibility to ensure that your use and/or transfer does not\nviolate applicable laws.\n\nFor more information, please see https://www.bis.doc.gov\n\nSee also https://www.apache.org/dev/crypto.html and/or seek legal counsel.\n"
  },
  {
    "path": "vendor/go.podman.io/storage/OWNERS",
    "content": "approvers:\n  - giuseppe\n  - kolyshkin\n  - mtrmac\n  - nalind\n  - rhatdan\n  - vrothberg\nreviewers:\n  - Honny1\n  - TomSweeneyRedHat\n  - flouthoc\n  - kolyshkin\n  - mrunalp\n  - vrothberg\n"
  },
  {
    "path": "vendor/go.podman.io/storage/README.md",
    "content": "`storage` is a Go library which aims to provide methods for storing filesystem\nlayers, container images, and containers.  A `containers-storage` CLI wrapper\nis also included for manual and scripting use.\n\nTo build the CLI wrapper, use 'make binary'.\n\nOperations which use VMs expect to launch them using 'vagrant', defaulting to\nusing its 'libvirt' provider.  The boxes used are also available for the\n'virtualbox' provider, and can be selected by setting $VAGRANT_PROVIDER to\n'virtualbox' before kicking off the build.\n\nThe library manages three types of items: layers, images, and containers.\n\nA *layer* is a copy-on-write filesystem which is notionally stored as a set of\nchanges relative to its *parent* layer, if it has one.  A given layer can only\nhave one parent, but any layer can be the parent of multiple layers.  Layers\nwhich are parents of other layers should be treated as read-only.\n\nAn *image* is a reference to a particular layer (its _top_ layer), along with\nother information which the library can manage for the convenience of its\ncaller.  This information typically includes configuration templates for\nrunning a binary contained within the image's layers, and may include\ncryptographic signatures.  Multiple images can reference the same layer, as the\ndifferences between two images may not be in their layer contents.\n\nA *container* is a read-write layer which is a child of an image's top layer,\nalong with information which the library can manage for the convenience of its\ncaller.  This information typically includes configuration information for\nrunning the specific container.  Multiple containers can be derived from a\nsingle image.\n\nLayers, images, and containers are represented primarily by 32 character\nhexadecimal IDs, but items of each kind can also have one or more arbitrary\nnames attached to them, which the library will automatically resolve to IDs\nwhen they are passed in to API calls which expect IDs.\n\nThe library can store what it calls *metadata* for each of these types of\nitems.  This is expected to be a small piece of data, since it is cached in\nmemory and stored along with the library's own bookkeeping information.\n\nAdditionally, the library can store one or more of what it calls *big data* for\nimages and containers.  This is a named chunk of larger data, which is only in\nmemory when it is being read from or being written to its own disk file.\n\n**[Contributing](../CONTRIBUTING.md)**\nInformation about contributing to this project.\n"
  },
  {
    "path": "vendor/go.podman.io/storage/VERSION",
    "content": "1.63.0-dev\n"
  },
  {
    "path": "vendor/go.podman.io/storage/check.go",
    "content": "package storage\n\nimport (\n\t\"archive/tar\"\n\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n\tdrivers \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/types\"\n)\n\nvar (\n\t// ErrLayerUnaccounted describes a layer that is present in the lower-level storage driver,\n\t// but which is not known to or managed by the higher-level driver-agnostic logic.\n\tErrLayerUnaccounted = types.ErrLayerUnaccounted\n\t// ErrLayerUnreferenced describes a layer which is not used by any image or container.\n\tErrLayerUnreferenced = types.ErrLayerUnreferenced\n\t// ErrLayerIncorrectContentDigest describes a layer for which the contents of one or more\n\t// files which were added in the layer appear to have changed.  It may instead look like an\n\t// unnamed \"file integrity checksum failed\" error.\n\tErrLayerIncorrectContentDigest = types.ErrLayerIncorrectContentDigest\n\t// ErrLayerIncorrectContentSize describes a layer for which regenerating the diff that was\n\t// used to populate the layer produced a diff of a different size.  We check the digest\n\t// first, so it's highly unlikely you'll ever see this error.\n\tErrLayerIncorrectContentSize = types.ErrLayerIncorrectContentSize\n\t// ErrLayerContentModified describes a layer which contains contents which should not be\n\t// there, or for which ownership/permissions/dates have been changed.\n\tErrLayerContentModified = types.ErrLayerContentModified\n\t// ErrLayerDataMissing describes a layer which is missing a big data item.\n\tErrLayerDataMissing = types.ErrLayerDataMissing\n\t// ErrLayerMissing describes a layer which is the missing parent of a layer.\n\tErrLayerMissing = types.ErrLayerMissing\n\t// ErrImageLayerMissing describes an image which claims to have a layer that we don't know\n\t// about.\n\tErrImageLayerMissing = types.ErrImageLayerMissing\n\t// ErrImageDataMissing describes an image which is missing a big data item.\n\tErrImageDataMissing = types.ErrImageDataMissing\n\t// ErrImageDataIncorrectSize describes an image which has a big data item which looks like\n\t// its size has changed, likely because it's been modified somehow.\n\tErrImageDataIncorrectSize = types.ErrImageDataIncorrectSize\n\t// ErrContainerImageMissing describes a container which claims to be based on an image that\n\t// we don't know about.\n\tErrContainerImageMissing = types.ErrContainerImageMissing\n\t// ErrContainerDataMissing describes a container which is missing a big data item.\n\tErrContainerDataMissing = types.ErrContainerDataMissing\n\t// ErrContainerDataIncorrectSize describes a container which has a big data item which looks\n\t// like its size has changed, likely because it's been modified somehow.\n\tErrContainerDataIncorrectSize = types.ErrContainerDataIncorrectSize\n)\n\nconst (\n\tdefaultMaximumUnreferencedLayerAge = 24 * time.Hour\n)\n\n// CheckOptions is the set of options for Check(), specifying which tests to perform.\ntype CheckOptions struct {\n\tLayerUnreferencedMaximumAge *time.Duration // maximum allowed age of unreferenced layers\n\tLayerDigests                bool           // check that contents of image layer diffs can still be reconstructed\n\tLayerMountable              bool           // check that layers are mountable\n\tLayerContents               bool           // check that contents of image layers match their diffs, with no unexpected changes, requires LayerMountable\n\tLayerData                   bool           // check that associated \"big\" data items are present and can be read\n\tImageData                   bool           // check that associated \"big\" data items are present, can be read, and match the recorded size\n\tContainerData               bool           // check that associated \"big\" data items are present and can be read\n}\n\n// checkIgnore is used to tell functions that compare the contents of a mounted\n// layer to the contents that we'd expect it to have to ignore certain\n// discrepancies\ntype checkIgnore struct {\n\townership, timestamps, permissions, filetype bool\n}\n\n// CheckMost returns a CheckOptions with mostly just \"quick\" checks enabled.\nfunc CheckMost() *CheckOptions {\n\treturn &CheckOptions{\n\t\tLayerDigests:   true,\n\t\tLayerMountable: true,\n\t\tLayerContents:  false,\n\t\tLayerData:      true,\n\t\tImageData:      true,\n\t\tContainerData:  true,\n\t}\n}\n\n// CheckEverything returns a CheckOptions with every check enabled.\nfunc CheckEverything() *CheckOptions {\n\treturn &CheckOptions{\n\t\tLayerDigests:   true,\n\t\tLayerMountable: true,\n\t\tLayerContents:  true,\n\t\tLayerData:      true,\n\t\tImageData:      true,\n\t\tContainerData:  true,\n\t}\n}\n\n// CheckReport is a list of detected problems.\ntype CheckReport struct {\n\tLayers                map[string][]error // damaged read-write layers\n\tROLayers              map[string][]error // damaged read-only layers\n\tlayerParentsByLayerID map[string]string\n\tlayerOrder            map[string]int\n\tImages                map[string][]error // damaged read-write images (including those with damaged layers)\n\tROImages              map[string][]error // damaged read-only images (including those with damaged layers)\n\tContainers            map[string][]error // damaged containers (including those based on damaged images)\n}\n\n// RepairOptions is the set of options for Repair().\ntype RepairOptions struct {\n\tRemoveContainers bool // Remove damaged containers\n}\n\n// RepairEverything returns a RepairOptions with every optional remediation\n// enabled.\nfunc RepairEverything() *RepairOptions {\n\treturn &RepairOptions{\n\t\tRemoveContainers: true,\n\t}\n}\n\n// Check returns a list of problems with what's in the store, as a whole.  It can be very expensive\n// to call.\nfunc (s *store) Check(options *CheckOptions) (CheckReport, error) {\n\tvar ignore checkIgnore\n\tfor _, o := range s.graphOptions {\n\t\tif strings.Contains(o, \"ignore_chown_errors=true\") {\n\t\t\tignore.ownership = true\n\t\t}\n\t\tif strings.Contains(o, \"force_mask=\") {\n\t\t\tignore.ownership = true\n\t\t\tignore.permissions = true\n\t\t\tignore.filetype = true\n\t\t}\n\t}\n\tfor o := range s.pullOptions {\n\t\tif strings.Contains(o, \"use_hard_links\") {\n\t\t\tif s.pullOptions[o] == \"true\" {\n\t\t\t\tignore.timestamps = true\n\t\t\t}\n\t\t}\n\t}\n\n\tif options == nil {\n\t\toptions = CheckMost()\n\t}\n\n\treport := CheckReport{\n\t\tLayers:                make(map[string][]error),\n\t\tROLayers:              make(map[string][]error),\n\t\tlayerParentsByLayerID: make(map[string]string), // layers ID -> their parent's ID, if there is one\n\t\tlayerOrder:            make(map[string]int),    // layers ID -> order for removal, if we needed to remove them all\n\t\tImages:                make(map[string][]error),\n\t\tROImages:              make(map[string][]error),\n\t\tContainers:            make(map[string][]error),\n\t}\n\n\t// This map will track known layer IDs.  If we have multiple stores, read-only ones can\n\t// contain copies of layers that are in the read-write store, but we'll only ever be\n\t// mounting or extracting contents from the read-write versions, since we always search it\n\t// first.  The boolean will track if the layer is referenced by at least one image or\n\t// container.\n\treferencedLayers := make(map[string]bool)\n\treferencedROLayers := make(map[string]bool)\n\n\t// This map caches the headers for items included in layer diffs.\n\tdiffHeadersByLayer := make(map[string][]*tar.Header)\n\tvar diffHeadersByLayerMutex sync.Mutex\n\n\t// Walk the list of layer stores, looking at each layer that we didn't see in a\n\t// previously-visited store.\n\tif _, _, err := readOrWriteAllLayerStores(s, func(store roLayerStore) (struct{}, bool, error) {\n\t\tlayers, err := store.Layers()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tisReadWrite := roLayerStoreIsReallyReadWrite(store)\n\t\treadWriteDesc := \"\"\n\t\tif !isReadWrite {\n\t\t\treadWriteDesc = \"read-only \"\n\t\t}\n\t\t// Examine each layer in turn.\n\t\tfor i := range layers {\n\t\t\tlayer := layers[i]\n\t\t\tid := layer.ID\n\t\t\t// If we've already seen a layer with this ID, no need to process it again.\n\t\t\tif _, checked := referencedLayers[id]; checked {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif _, checked := referencedROLayers[id]; checked {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Note the parent of this layer, and add it to the map of known layers so\n\t\t\t// that we know that we've visited it, but we haven't confirmed that it's\n\t\t\t// used by anything.\n\t\t\treport.layerParentsByLayerID[id] = layer.Parent\n\t\t\tif isReadWrite {\n\t\t\t\treferencedLayers[id] = false\n\t\t\t} else {\n\t\t\t\treferencedROLayers[id] = false\n\t\t\t}\n\t\t\tlogrus.Debugf(\"checking %slayer %s\", readWriteDesc, id)\n\t\t\t// Check that all of the big data items are present and can be read.  We\n\t\t\t// have no digest or size information to compare the contents to (grumble),\n\t\t\t// so we can't verify that the contents haven't been changed since they\n\t\t\t// were stored.\n\t\t\tif options.LayerData {\n\t\t\t\tfor _, name := range layer.BigDataNames {\n\t\t\t\t\tfunc() {\n\t\t\t\t\t\trc, err := store.BigData(id, name)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: data item %q: %w\", readWriteDesc, id, name, ErrLayerDataMissing)\n\t\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terr = fmt.Errorf(\"%slayer %s: data item %q: %w\", readWriteDesc, id, name, err)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefer rc.Close()\n\t\t\t\t\t\tif _, err = io.Copy(io.Discard, rc); err != nil {\n\t\t\t\t\t\t\terr = fmt.Errorf(\"%slayer %s: data item %q: %w\", readWriteDesc, id, name, err)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}()\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check that the content we get back when extracting the layer's contents\n\t\t\t// match the recorded digest and size.  A layer for which they're not given\n\t\t\t// isn't a part of an image, and is likely the read-write layer for a\n\t\t\t// container, and we can't vouch for the integrity of its contents.\n\t\t\t// For each layer with known contents, record the headers for the layer's\n\t\t\t// diff, which we can use to reconstruct the expected contents for the tree\n\t\t\t// we see when the layer is mounted.\n\t\t\tif options.LayerDigests && layer.UncompressedDigest != \"\" {\n\t\t\t\tfunc() {\n\t\t\t\t\texpectedDigest := layer.UncompressedDigest\n\t\t\t\t\t// Double-check that the digest isn't invalid somehow.\n\t\t\t\t\tif err := layer.UncompressedDigest.Validate(); err != nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// Extract the diff.\n\t\t\t\t\tuncompressed := archive.Uncompressed\n\t\t\t\t\tdiffOptions := DiffOptions{\n\t\t\t\t\t\tCompression: &uncompressed,\n\t\t\t\t\t}\n\t\t\t\t\tdiff, err := store.Diff(\"\", id, &diffOptions)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// Digest and count the length of the diff.\n\t\t\t\t\tdigester := expectedDigest.Algorithm().Digester()\n\t\t\t\t\tcounter := ioutils.NewWriteCounter(digester.Hash())\n\t\t\t\t\treader := io.TeeReader(diff, counter)\n\t\t\t\t\tvar wg sync.WaitGroup\n\t\t\t\t\tvar archiveErr error\n\t\t\t\t\twg.Go(func() {\n\t\t\t\t\t\t// Read the diff, one item at a time.\n\t\t\t\t\t\ttr := tar.NewReader(reader)\n\t\t\t\t\t\thdr, err := tr.Next()\n\t\t\t\t\t\tfor err == nil {\n\t\t\t\t\t\t\tdiffHeadersByLayerMutex.Lock()\n\t\t\t\t\t\t\tdiffHeadersByLayer[id] = append(diffHeadersByLayer[id], hdr)\n\t\t\t\t\t\t\tdiffHeadersByLayerMutex.Unlock()\n\t\t\t\t\t\t\thdr, err = tr.Next()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif !errors.Is(err, io.EOF) {\n\t\t\t\t\t\t\tarchiveErr = err\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// consume any trailer after the EOF marker\n\t\t\t\t\t\tif _, err := io.Copy(io.Discard, reader); err != nil {\n\t\t\t\t\t\t\terr = fmt.Errorf(\"layer %s: consume any trailer after the EOF marker: %w\", id, err)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\twg.Wait()\n\t\t\t\t\tdiff.Close()\n\t\t\t\t\tif archiveErr != nil {\n\t\t\t\t\t\t// Reading the diff didn't end as expected\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Lock()\n\t\t\t\t\t\tdelete(diffHeadersByLayer, id)\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Unlock()\n\t\t\t\t\t\tarchiveErr = fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, archiveErr)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], archiveErr)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], archiveErr)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tif digester.Digest() != layer.UncompressedDigest {\n\t\t\t\t\t\t// The diff digest didn't match.\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Lock()\n\t\t\t\t\t\tdelete(diffHeadersByLayer, id)\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Unlock()\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, ErrLayerIncorrectContentDigest)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif layer.UncompressedSize != -1 && counter.Count != layer.UncompressedSize {\n\t\t\t\t\t\t// We expected the diff to have a specific size, and\n\t\t\t\t\t\t// it didn't match.\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Lock()\n\t\t\t\t\t\tdelete(diffHeadersByLayer, id)\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Unlock()\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: read %d bytes instead of %d bytes: %w\", readWriteDesc, id, counter.Count, layer.UncompressedSize, ErrLayerIncorrectContentSize)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}()\n\t\t\t}\n\t\t}\n\t\t// At this point we're out of things that we can be sure will work in read-only\n\t\t// stores, so skip the rest for any stores that aren't also read-write stores.\n\t\tif !isReadWrite {\n\t\t\treturn struct{}{}, false, nil\n\t\t}\n\t\t// Content and mount checks are also things that we can only be sure will work in\n\t\t// read-write stores.\n\t\tfor i := range layers {\n\t\t\tlayer := layers[i]\n\t\t\tid := layer.ID\n\t\t\t// Compare to what we see when we mount the layer and walk the tree, and\n\t\t\t// flag cases where content is in the layer that shouldn't be there.  The\n\t\t\t// tar-split implementation of Diff() won't catch this problem by itself.\n\t\t\tif options.LayerMountable {\n\t\t\t\tfunc() {\n\t\t\t\t\t// Mount the layer.\n\t\t\t\t\tmountPoint, err := s.graphDriver.Get(id, drivers.MountOpts{MountLabel: layer.MountLabel, Options: []string{\"ro\"}})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// Unmount the layer when we're done in here.\n\t\t\t\t\tdefer func() {\n\t\t\t\t\t\tif err := s.graphDriver.Put(id); err != nil {\n\t\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}()\n\t\t\t\t\t// If we're not looking at layer contents, or we didn't\n\t\t\t\t\t// look at the diff for this layer, we're done here.\n\t\t\t\t\tif !options.LayerDigests || layer.UncompressedDigest == \"\" || !options.LayerContents {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// Build a list of all of the changes in all of the layers\n\t\t\t\t\t// that make up the tree we're looking at.\n\t\t\t\t\tdiffHeaderSet := [][]*tar.Header{}\n\t\t\t\t\t// If we don't know _all_ of the changes that produced this\n\t\t\t\t\t// layer, it's not part of an image, so we're done here.\n\t\t\t\t\tfor layerID := id; layerID != \"\"; layerID = report.layerParentsByLayerID[layerID] {\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Lock()\n\t\t\t\t\t\tlayerChanges, haveChanges := diffHeadersByLayer[layerID]\n\t\t\t\t\t\tdiffHeadersByLayerMutex.Unlock()\n\t\t\t\t\t\tif !haveChanges {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// The diff headers for this layer go _before_ those of\n\t\t\t\t\t\t// layers that inherited some of its contents.\n\t\t\t\t\t\tdiffHeaderSet = append([][]*tar.Header{layerChanges}, diffHeaderSet...)\n\t\t\t\t\t}\n\t\t\t\t\texpectedCheckDirectory := newCheckDirectoryDefaults()\n\t\t\t\t\tfor _, diffHeaders := range diffHeaderSet {\n\t\t\t\t\t\texpectedCheckDirectory.headers(diffHeaders)\n\t\t\t\t\t}\n\t\t\t\t\t// Scan the directory tree under the mount point.\n\t\t\t\t\tvar idmap *idtools.IDMappings\n\t\t\t\t\tif !s.canUseShifting(layer.UIDMap, layer.GIDMap) {\n\t\t\t\t\t\t// we would have had to chown() layer contents to match ID maps\n\t\t\t\t\t\tidmap = idtools.NewIDMappingsFromMaps(layer.UIDMap, layer.GIDMap)\n\t\t\t\t\t}\n\t\t\t\t\tactualCheckDirectory, err := newCheckDirectoryFromDirectory(mountPoint)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"scanning contents of %slayer %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\t// Every departure from our expectations is an error.\n\t\t\t\t\tdiffs := compareCheckDirectory(expectedCheckDirectory, actualCheckDirectory, idmap, ignore)\n\t\t\t\t\tfor _, diff := range diffs {\n\t\t\t\t\t\terr := fmt.Errorf(\"%slayer %s: %s, %w\", readWriteDesc, id, diff, ErrLayerContentModified)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROLayers[id] = append(report.ROLayers[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}()\n\t\t\t}\n\t\t}\n\t\t// Check that we don't have any dangling parent layer references.\n\t\tfor id, parent := range report.layerParentsByLayerID {\n\t\t\t// If this layer doesn't have a parent, no problem.\n\t\t\tif parent == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// If we've already seen a layer with this parent ID, skip it.\n\t\t\tif _, checked := referencedLayers[parent]; checked {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif _, checked := referencedROLayers[parent]; checked {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// We haven't seen a layer with the ID that this layer's record\n\t\t\t// says is its parent's ID.\n\t\t\terr := fmt.Errorf(\"%slayer %s: %w\", readWriteDesc, parent, ErrLayerMissing)\n\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t}\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn CheckReport{}, err\n\t}\n\n\t// This map will track examined images.  If we have multiple stores, read-only ones can\n\t// contain copies of images that are also in the read-write store, or the read-write store\n\t// may contain a duplicate entry that refers to layers in the read-only stores, but when\n\t// trying to export them, we only look at the first copy of the image.\n\texaminedImages := make(map[string]struct{})\n\n\t// Walk the list of image stores, looking at each image that we didn't see in a\n\t// previously-visited store.\n\tif _, _, err := readAllImageStores(s, func(store roImageStore) (struct{}, bool, error) {\n\t\timages, err := store.Images()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tisReadWrite := roImageStoreIsReallyReadWrite(store)\n\t\treadWriteDesc := \"\"\n\t\tif !isReadWrite {\n\t\t\treadWriteDesc = \"read-only \"\n\t\t}\n\t\t// Examine each image in turn.\n\t\tfor i := range images {\n\t\t\timage := images[i]\n\t\t\tid := image.ID\n\t\t\t// If we've already seen an image with this ID, skip it.\n\t\t\tif _, checked := examinedImages[id]; checked {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\texaminedImages[id] = struct{}{}\n\t\t\tlogrus.Debugf(\"checking %simage %s\", readWriteDesc, id)\n\t\t\tif options.ImageData {\n\t\t\t\t// Check that all of the big data items are present and reading them\n\t\t\t\t// back gives us the right amount of data.  Even though we record\n\t\t\t\t// digests that can be used to look them up, we don't know how they\n\t\t\t\t// were calculated (they're only used as lookup keys), so do not try\n\t\t\t\t// to check them.\n\t\t\t\tfor _, key := range image.BigDataNames {\n\t\t\t\t\tfunc() {\n\t\t\t\t\t\tdata, err := store.BigData(id, key)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\t\t\t\t\terr = fmt.Errorf(\"%simage %s: data item %q: %w\", readWriteDesc, id, key, ErrImageDataMissing)\n\t\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], err)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], err)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terr = fmt.Errorf(\"%simage %s: data item %q: %w\", readWriteDesc, id, key, err)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif int64(len(data)) != image.BigDataSizes[key] {\n\t\t\t\t\t\t\terr = fmt.Errorf(\"%simage %s: data item %q: %w\", readWriteDesc, id, key, ErrImageDataIncorrectSize)\n\t\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], err)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}()\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Walk the layers list for the image.  For every layer that the image uses\n\t\t\t// that has errors, the layer's errors are also the image's errors.\n\t\t\texaminedImageLayers := make(map[string]struct{})\n\t\t\tfor _, topLayer := range append([]string{image.TopLayer}, image.MappedTopLayers...) {\n\t\t\t\tif topLayer == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif _, checked := examinedImageLayers[topLayer]; checked {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\texaminedImageLayers[topLayer] = struct{}{}\n\t\t\t\tfor layer := topLayer; layer != \"\"; layer = report.layerParentsByLayerID[layer] {\n\t\t\t\t\t// The referenced layer should have a corresponding entry in\n\t\t\t\t\t// one map or the other.\n\t\t\t\t\t_, checked := referencedLayers[layer]\n\t\t\t\t\t_, checkedRO := referencedROLayers[layer]\n\t\t\t\t\tif !checked && !checkedRO {\n\t\t\t\t\t\terr := fmt.Errorf(\"layer %s: %w\", layer, ErrImageLayerMissing)\n\t\t\t\t\t\terr = fmt.Errorf(\"%simage %s: %w\", readWriteDesc, id, err)\n\t\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], err)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], err)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Count this layer as referenced.  Whether by the\n\t\t\t\t\t\t// image or one of its child layers doesn't matter\n\t\t\t\t\t\t// at this point.\n\t\t\t\t\t\tif _, ok := referencedLayers[layer]; ok {\n\t\t\t\t\t\t\treferencedLayers[layer] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif _, ok := referencedROLayers[layer]; ok {\n\t\t\t\t\t\t\treferencedROLayers[layer] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif isReadWrite {\n\t\t\t\t\t\tif len(report.Layers[layer]) > 0 {\n\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], report.Layers[layer]...)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif len(report.ROLayers[layer]) > 0 {\n\t\t\t\t\t\t\treport.Images[id] = append(report.Images[id], report.ROLayers[layer]...)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif len(report.Layers[layer]) > 0 {\n\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], report.Layers[layer]...)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif len(report.ROLayers[layer]) > 0 {\n\t\t\t\t\t\t\treport.ROImages[id] = append(report.ROImages[id], report.ROLayers[layer]...)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn CheckReport{}, err\n\t}\n\n\t// Iterate over each container in turn.\n\tif _, _, err := readContainerStore(s, func() (struct{}, bool, error) {\n\t\tcontainers, err := s.containerStore.Containers()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tfor i := range containers {\n\t\t\tcontainer := containers[i]\n\t\t\tid := container.ID\n\t\t\tlogrus.Debugf(\"checking container %s\", id)\n\t\t\tif options.ContainerData {\n\t\t\t\t// Check that all of the big data items are present and reading them\n\t\t\t\t// back gives us the right amount of data.\n\t\t\t\tfor _, key := range container.BigDataNames {\n\t\t\t\t\tfunc() {\n\t\t\t\t\t\tdata, err := s.containerStore.BigData(id, key)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\t\t\t\t\terr = fmt.Errorf(\"container %s: data item %q: %w\", id, key, ErrContainerDataMissing)\n\t\t\t\t\t\t\t\treport.Containers[id] = append(report.Containers[id], err)\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terr = fmt.Errorf(\"container %s: data item %q: %w\", id, key, err)\n\t\t\t\t\t\t\treport.Containers[id] = append(report.Containers[id], err)\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif int64(len(data)) != container.BigDataSizes[key] {\n\t\t\t\t\t\t\terr = fmt.Errorf(\"container %s: data item %q: %w\", id, key, ErrContainerDataIncorrectSize)\n\t\t\t\t\t\t\treport.Containers[id] = append(report.Containers[id], err)\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t}()\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Look at the container's base image.  If the image has errors, the image's errors\n\t\t\t// are the container's errors.\n\t\t\tif container.ImageID != \"\" {\n\t\t\t\tif _, checked := examinedImages[container.ImageID]; !checked {\n\t\t\t\t\terr := fmt.Errorf(\"image %s: %w\", container.ImageID, ErrContainerImageMissing)\n\t\t\t\t\treport.Containers[id] = append(report.Containers[id], err)\n\t\t\t\t}\n\t\t\t\tif len(report.Images[container.ImageID]) > 0 {\n\t\t\t\t\treport.Containers[id] = append(report.Containers[id], report.Images[container.ImageID]...)\n\t\t\t\t}\n\t\t\t\tif len(report.ROImages[container.ImageID]) > 0 {\n\t\t\t\t\treport.Containers[id] = append(report.Containers[id], report.ROImages[container.ImageID]...)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Count the container's layer as referenced.\n\t\t\tif container.LayerID != \"\" {\n\t\t\t\treferencedLayers[container.LayerID] = true\n\t\t\t}\n\t\t}\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn CheckReport{}, err\n\t}\n\n\t// Now go back through all of the layer stores, and flag any layers which don't belong\n\t// to an image or a container, and has been around longer than we can reasonably expect\n\t// such a layer to be present before a corresponding image record is added.\n\tif _, _, err := readAllLayerStores(s, func(store roLayerStore) (struct{}, bool, error) {\n\t\tif isReadWrite := roLayerStoreIsReallyReadWrite(store); !isReadWrite {\n\t\t\treturn struct{}{}, false, nil\n\t\t}\n\t\tlayers, err := store.Layers()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tfor _, layer := range layers {\n\t\t\tmaximumAge := defaultMaximumUnreferencedLayerAge\n\t\t\tif options.LayerUnreferencedMaximumAge != nil {\n\t\t\t\tmaximumAge = *options.LayerUnreferencedMaximumAge\n\t\t\t}\n\t\t\tif referenced := referencedLayers[layer.ID]; !referenced {\n\t\t\t\tif layer.Created.IsZero() || layer.Created.Add(maximumAge).Before(time.Now()) {\n\t\t\t\t\t// Either we don't (and never will) know when this layer was\n\t\t\t\t\t// created, or it was created far enough in the past that we're\n\t\t\t\t\t// reasonably sure it's not part of an image that's being written\n\t\t\t\t\t// right now.\n\t\t\t\t\terr := fmt.Errorf(\"layer %s: %w\", layer.ID, ErrLayerUnreferenced)\n\t\t\t\t\treport.Layers[layer.ID] = append(report.Layers[layer.ID], err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn CheckReport{}, err\n\t}\n\n\t// If the driver can tell us about which layers it knows about, we should have previously\n\t// examined all of them.  Any that we didn't are probably just wasted space.\n\t// Note: if the driver doesn't support enumerating layers, it returns ErrNotSupported.\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn CheckReport{}, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\tlayerList, err := s.graphDriver.ListLayers()\n\tif err != nil && !errors.Is(err, drivers.ErrNotSupported) {\n\t\treturn CheckReport{}, err\n\t}\n\tif !errors.Is(err, drivers.ErrNotSupported) {\n\t\tfor i, id := range layerList {\n\t\t\tif _, known := referencedLayers[id]; !known {\n\t\t\t\terr := fmt.Errorf(\"layer %s: %w\", id, ErrLayerUnaccounted)\n\t\t\t\treport.Layers[id] = append(report.Layers[id], err)\n\t\t\t}\n\t\t\treport.layerOrder[id] = i + 1\n\t\t}\n\t}\n\n\treturn report, nil\n}\n\nfunc roLayerStoreIsReallyReadWrite(store roLayerStore) bool {\n\treturn store.(*layerStore).lockfile.IsReadWrite()\n}\n\nfunc roImageStoreIsReallyReadWrite(store roImageStore) bool {\n\treturn store.(*imageStore).lockfile.IsReadWrite()\n}\n\n// Repair removes items which are themselves damaged, or which depend on items which are damaged.\n// Errors are returned if an attempt to delete an item fails.\nfunc (s *store) Repair(report CheckReport, options *RepairOptions) []error {\n\tif options == nil {\n\t\toptions = RepairEverything()\n\t}\n\tvar errs []error\n\t// Just delete damaged containers.\n\tif options.RemoveContainers {\n\t\tfor id := range report.Containers {\n\t\t\terr := s.DeleteContainer(id)\n\t\t\tif err != nil && !errors.Is(err, ErrContainerUnknown) {\n\t\t\t\terr := fmt.Errorf(\"deleting container %s: %w\", id, err)\n\t\t\t\terrs = append(errs, err)\n\t\t\t}\n\t\t}\n\t}\n\t// Now delete damaged images.  Note which layers were removed as part of removing those images.\n\tdeletedLayers := make(map[string]struct{})\n\tfor id := range report.Images {\n\t\tlayers, err := s.DeleteImage(id, true)\n\t\tif err != nil {\n\t\t\tif !errors.Is(err, ErrImageUnknown) && !errors.Is(err, ErrLayerUnknown) {\n\t\t\t\terr := fmt.Errorf(\"deleting image %s: %w\", id, err)\n\t\t\t\terrs = append(errs, err)\n\t\t\t}\n\t\t} else {\n\t\t\tfor _, layer := range layers {\n\t\t\t\tlogrus.Debugf(\"deleted layer %s\", layer)\n\t\t\t\tdeletedLayers[layer] = struct{}{}\n\t\t\t}\n\t\t\tlogrus.Debugf(\"deleted image %s\", id)\n\t\t}\n\t}\n\t// Build a list of the layers that we need to remove, sorted with parents of layers before\n\t// layers that they are parents of.\n\tlayersToDelete := make([]string, 0, len(report.Layers))\n\tfor id := range report.Layers {\n\t\tlayersToDelete = append(layersToDelete, id)\n\t}\n\tdepth := func(id string) int {\n\t\td := 0\n\t\tparent := report.layerParentsByLayerID[id]\n\t\tfor parent != \"\" {\n\t\t\td++\n\t\t\tparent = report.layerParentsByLayerID[parent]\n\t\t}\n\t\treturn d\n\t}\n\tisUnaccounted := func(errs []error) bool {\n\t\treturn slices.ContainsFunc(errs, func(err error) bool {\n\t\t\treturn errors.Is(err, ErrLayerUnaccounted)\n\t\t})\n\t}\n\tslices.SortFunc(layersToDelete, func(a, b string) int {\n\t\t// we've not heard of either of them, so remove them in the order the driver suggested\n\t\tif isUnaccounted(report.Layers[a]) && isUnaccounted(report.Layers[b]) &&\n\t\t\treport.layerOrder[a] != 0 && report.layerOrder[b] != 0 {\n\t\t\treturn cmp.Compare(report.layerOrder[a], report.layerOrder[b])\n\t\t}\n\t\t// always delete the one we've heard of first\n\t\tif isUnaccounted(report.Layers[a]) && !isUnaccounted(report.Layers[b]) {\n\t\t\treturn 1\n\t\t}\n\t\t// always delete the one we've heard of first\n\t\tif !isUnaccounted(report.Layers[a]) && isUnaccounted(report.Layers[b]) {\n\t\t\treturn -1\n\t\t}\n\t\t// we've heard of both of them; the one that's on the end of a longer chain goes first\n\t\treturn -cmp.Compare(depth(a), depth(b)) // closer-to-a-notional-base layers get removed later\n\t})\n\t// Now delete the layers that haven't been removed along with images.\n\tfor _, id := range layersToDelete {\n\t\tif _, ok := deletedLayers[id]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, reportedErr := range report.Layers[id] {\n\t\t\tvar err error\n\t\t\t// If a layer was unaccounted for, remove it at the storage driver level.\n\t\t\t// Otherwise, remove it at the higher level and let the higher level\n\t\t\t// logic worry about telling the storage driver to delete the layer.\n\t\t\tif errors.Is(reportedErr, ErrLayerUnaccounted) {\n\t\t\t\tif err = s.graphDriver.Remove(id); err != nil {\n\t\t\t\t\terr = fmt.Errorf(\"deleting storage layer %s: %v\", id, err)\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Debugf(\"deleted storage layer %s\", id)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar stillMounted bool\n\t\t\t\tif stillMounted, err = s.Unmount(id, true); err == nil && !stillMounted {\n\t\t\t\t\tlogrus.Debugf(\"unmounted layer %s\", id)\n\t\t\t\t} else if err != nil {\n\t\t\t\t\tlogrus.Debugf(\"unmounting layer %s: %v\", id, err)\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Debugf(\"layer %s still mounted\", id)\n\t\t\t\t}\n\t\t\t\tif err = s.DeleteLayer(id); err != nil {\n\t\t\t\t\terr = fmt.Errorf(\"deleting layer %s: %w\", id, err)\n\t\t\t\t\tlogrus.Debugf(\"deleted layer %s\", id)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif err != nil && !errors.Is(err, ErrLayerUnknown) && !errors.Is(err, ErrNotALayer) && !errors.Is(err, os.ErrNotExist) {\n\t\t\t\terrs = append(errs, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn errs\n}\n\n// compareFileInfo returns a string summarizing what's different between the two checkFileInfos\nfunc compareFileInfo(a, b checkFileInfo, idmap *idtools.IDMappings, ignore checkIgnore) string {\n\tvar comparison []string\n\tif a.typeflag != b.typeflag && !ignore.filetype {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"filetype:%v￫%v\", a.typeflag, b.typeflag))\n\t}\n\tif idmap != nil && !idmap.Empty() {\n\t\tmappedUID, mappedGID, err := idmap.ToContainer(idtools.IDPair{UID: b.uid, GID: b.gid})\n\t\tif err != nil {\n\t\t\treturn err.Error()\n\t\t}\n\t\tb.uid, b.gid = mappedUID, mappedGID\n\t}\n\tif a.uid != b.uid && !ignore.ownership {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"uid:%d￫%d\", a.uid, b.uid))\n\t}\n\tif a.gid != b.gid && !ignore.ownership {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"gid:%d￫%d\", a.gid, b.gid))\n\t}\n\tif a.size != b.size {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"size:%d￫%d\", a.size, b.size))\n\t}\n\tif (os.ModeType|os.ModePerm)&a.mode != (os.ModeType|os.ModePerm)&b.mode && !ignore.permissions {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"mode:%04o￫%04o\", a.mode, b.mode))\n\t}\n\tif a.mtime != b.mtime && !ignore.timestamps {\n\t\tcomparison = append(comparison, fmt.Sprintf(\"mtime:0x%x￫0x%x\", a.mtime, b.mtime))\n\t}\n\treturn strings.Join(comparison, \",\")\n}\n\n// checkFileInfo is what we care about for files\ntype checkFileInfo struct {\n\ttypeflag byte\n\tuid, gid int\n\tsize     int64\n\tmode     os.FileMode\n\tmtime    int64 // unix-style whole seconds\n}\n\n// checkDirectory is a node in a filesystem record, possibly the top\ntype checkDirectory struct {\n\tdirectory map[string]*checkDirectory // subdirectories\n\tfile      map[string]checkFileInfo   // non-directories\n\tcheckFileInfo\n}\n\n// newCheckDirectory creates an empty checkDirectory\nfunc newCheckDirectory(uid, gid int, size int64, mode os.FileMode, mtime int64) *checkDirectory {\n\treturn &checkDirectory{\n\t\tdirectory: make(map[string]*checkDirectory),\n\t\tfile:      make(map[string]checkFileInfo),\n\t\tcheckFileInfo: checkFileInfo{\n\t\t\ttypeflag: tar.TypeDir,\n\t\t\tuid:      uid,\n\t\t\tgid:      gid,\n\t\t\tsize:     size,\n\t\t\tmode:     mode,\n\t\t\tmtime:    mtime,\n\t\t},\n\t}\n}\n\n// newCheckDirectoryDefaults creates an empty checkDirectory with hardwired defaults for the UID\n// (0), GID (0), size (0) and permissions (0o555)\nfunc newCheckDirectoryDefaults() *checkDirectory {\n\treturn newCheckDirectory(0, 0, 0, 0o555, time.Now().Unix())\n}\n\n// newCheckDirectoryFromDirectory creates a checkDirectory for an on-disk directory tree\nfunc newCheckDirectoryFromDirectory(dir string) (*checkDirectory, error) {\n\tcd := newCheckDirectoryDefaults()\n\terr := filepath.Walk(dir, func(walkpath string, info os.FileInfo, err error) error {\n\t\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\t\treturn err\n\t\t}\n\t\trel, err := filepath.Rel(dir, walkpath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thdr, err := tar.FileInfoHeader(info, \"\") // we don't record link targets, so don't bother looking it up\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thdr.Name = filepath.ToSlash(rel)\n\t\tcd.header(hdr)\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn cd, nil\n}\n\n// add adds an item to a checkDirectory\nfunc (c *checkDirectory) add(path string, typeflag byte, uid, gid int, size int64, mode os.FileMode, mtime int64) {\n\tcomponents := strings.Split(path, \"/\")\n\tif components[len(components)-1] == \"\" {\n\t\tcomponents = components[:len(components)-1]\n\t}\n\tif components[0] == \".\" {\n\t\tcomponents = components[1:]\n\t}\n\tif typeflag != tar.TypeReg {\n\t\tsize = 0\n\t}\n\tswitch len(components) {\n\tcase 0:\n\t\tc.uid = uid\n\t\tc.gid = gid\n\t\tc.mode = mode\n\t\tc.mtime = mtime\n\t\treturn\n\tcase 1:\n\t\tswitch typeflag {\n\t\tcase tar.TypeDir:\n\t\t\tdelete(c.file, components[0])\n\t\t\t// directory entries are mergers, not replacements\n\t\t\tif _, present := c.directory[components[0]]; !present {\n\t\t\t\tc.directory[components[0]] = newCheckDirectory(uid, gid, size, mode, mtime)\n\t\t\t} else {\n\t\t\t\tc.directory[components[0]].checkFileInfo = checkFileInfo{\n\t\t\t\t\ttypeflag: tar.TypeDir,\n\t\t\t\t\tuid:      uid,\n\t\t\t\t\tgid:      gid,\n\t\t\t\t\tsize:     size,\n\t\t\t\t\tmode:     mode,\n\t\t\t\t\tmtime:    mtime,\n\t\t\t\t}\n\t\t\t}\n\t\tcase tar.TypeXGlobalHeader:\n\t\t\t// ignore, since even though it looks like a valid pathname, it doesn't end\n\t\t\t// up on the filesystem\n\t\tdefault:\n\t\t\t// treat these as TypeReg items\n\t\t\tdelete(c.directory, components[0])\n\t\t\tc.file[components[0]] = checkFileInfo{\n\t\t\t\ttypeflag: typeflag,\n\t\t\t\tuid:      uid,\n\t\t\t\tgid:      gid,\n\t\t\t\tsize:     size,\n\t\t\t\tmode:     mode,\n\t\t\t\tmtime:    mtime,\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\tsubdirectory := c.directory[components[0]]\n\tif subdirectory == nil {\n\t\tsubdirectory = newCheckDirectory(uid, gid, size, mode, mtime)\n\t\tc.directory[components[0]] = subdirectory\n\t}\n\tsubdirectory.add(strings.Join(components[1:], \"/\"), typeflag, uid, gid, size, mode, mtime)\n}\n\n// remove removes an item from a checkDirectory\nfunc (c *checkDirectory) remove(path string) {\n\tparent, rest, ok := strings.Cut(path, \"/\")\n\tif !ok {\n\t\tdelete(c.directory, parent)\n\t\tdelete(c.file, parent)\n\t\treturn\n\t}\n\tsubdirectory := c.directory[parent]\n\tif subdirectory != nil {\n\t\tsubdirectory.remove(rest)\n\t}\n}\n\n// header updates a checkDirectory using information from the passed-in header\nfunc (c *checkDirectory) header(hdr *tar.Header) {\n\tname := path.Clean(hdr.Name)\n\tdir, base := path.Split(name)\n\tif file, ok := strings.CutPrefix(base, archive.WhiteoutPrefix); ok {\n\t\tif base == archive.WhiteoutOpaqueDir {\n\t\t\tc.remove(path.Clean(dir))\n\t\t\tc.add(path.Clean(dir), tar.TypeDir, hdr.Uid, hdr.Gid, hdr.Size, os.FileMode(hdr.Mode), hdr.ModTime.Unix())\n\t\t} else {\n\t\t\tc.remove(path.Join(dir, file))\n\t\t}\n\t} else {\n\t\tif hdr.Typeflag == tar.TypeLink {\n\t\t\t// look up the attributes of the target of the hard link\n\t\t\t// n.b. by convention, Linkname is always relative to the\n\t\t\t// root directory of the archive, which is not always the\n\t\t\t// same as being relative to hdr.Name\n\t\t\tdirectory := c\n\t\t\tfor component := range strings.SplitSeq(path.Clean(hdr.Linkname), \"/\") {\n\t\t\t\tif component == \".\" || component == \"..\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif subdir, ok := directory.directory[component]; ok {\n\t\t\t\t\tdirectory = subdir\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif file, ok := directory.file[component]; ok {\n\t\t\t\t\thdr.Typeflag = file.typeflag\n\t\t\t\t\thdr.Uid = file.uid\n\t\t\t\t\thdr.Gid = file.gid\n\t\t\t\t\thdr.Size = file.size\n\t\t\t\t\thdr.Mode = int64(file.mode)\n\t\t\t\t\thdr.ModTime = time.Unix(file.mtime, 0)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tc.add(name, hdr.Typeflag, hdr.Uid, hdr.Gid, hdr.Size, os.FileMode(hdr.Mode), hdr.ModTime.Unix())\n\t}\n}\n\n// headers updates a checkDirectory using information from the passed-in header slice\nfunc (c *checkDirectory) headers(hdrs []*tar.Header) {\n\thdrs = slices.Clone(hdrs)\n\t// sort the headers from the diff to ensure that whiteouts appear\n\t// before content when they both appear in the same directory, per\n\t// https://github.com/opencontainers/image-spec/blob/main/layer.md#whiteouts\n\t// and that hard links appear after other types of entries\n\tslices.SortStableFunc(hdrs, func(a, b *tar.Header) int {\n\t\tif a.Typeflag != tar.TypeLink && b.Typeflag == tar.TypeLink {\n\t\t\treturn -1\n\t\t}\n\t\tif a.Typeflag == tar.TypeLink && b.Typeflag != tar.TypeLink {\n\t\t\treturn 1\n\t\t}\n\t\tadir, afile := path.Split(a.Name)\n\t\tbdir, bfile := path.Split(b.Name)\n\t\tif adir != bdir {\n\t\t\treturn cmp.Compare(a.Name, b.Name)\n\t\t}\n\t\tif afile == archive.WhiteoutOpaqueDir {\n\t\t\treturn -1\n\t\t}\n\t\tif strings.HasPrefix(afile, archive.WhiteoutPrefix) && !strings.HasPrefix(bfile, archive.WhiteoutPrefix) {\n\t\t\treturn -1\n\t\t}\n\t\treturn 0\n\t})\n\tfor _, hdr := range hdrs {\n\t\tc.header(hdr)\n\t}\n}\n\n// names provides a sorted list of the path names in the directory tree\nfunc (c *checkDirectory) names() []string {\n\tnames := make([]string, 0, len(c.file)+len(c.directory))\n\tfor name := range c.file {\n\t\tnames = append(names, name)\n\t}\n\tfor name, subdirectory := range c.directory {\n\t\tnames = append(names, name+\"/\")\n\t\tfor _, subname := range subdirectory.names() {\n\t\t\tnames = append(names, name+\"/\"+subname)\n\t\t}\n\t}\n\treturn names\n}\n\n// compareCheckSubdirectory walks two subdirectory trees and returns a list of differences\nfunc compareCheckSubdirectory(path string, a, b *checkDirectory, idmap *idtools.IDMappings, ignore checkIgnore) []string {\n\tvar diff []string\n\tif a == nil {\n\t\ta = newCheckDirectoryDefaults()\n\t}\n\tif b == nil {\n\t\tb = newCheckDirectoryDefaults()\n\t}\n\tfor aname, adir := range a.directory {\n\t\tif bdir, present := b.directory[aname]; !present {\n\t\t\t// directory was removed\n\t\t\tdiff = append(diff, \"-\"+path+\"/\"+aname+\"/\")\n\t\t\tdiff = append(diff, compareCheckSubdirectory(path+\"/\"+aname, adir, nil, idmap, ignore)...)\n\t\t} else {\n\t\t\t// directory is in both trees; descend\n\t\t\tif attributes := compareFileInfo(adir.checkFileInfo, bdir.checkFileInfo, idmap, ignore); attributes != \"\" {\n\t\t\t\tdiff = append(diff, path+\"/\"+aname+\"(\"+attributes+\")\")\n\t\t\t}\n\t\t\tdiff = append(diff, compareCheckSubdirectory(path+\"/\"+aname, adir, bdir, idmap, ignore)...)\n\t\t}\n\t}\n\tfor bname, bdir := range b.directory {\n\t\tif _, present := a.directory[bname]; !present {\n\t\t\t// directory added\n\t\t\tdiff = append(diff, \"+\"+path+\"/\"+bname+\"/\")\n\t\t\tdiff = append(diff, compareCheckSubdirectory(path+\"/\"+bname, nil, bdir, idmap, ignore)...)\n\t\t}\n\t}\n\tfor aname, afile := range a.file {\n\t\tif bfile, present := b.file[aname]; !present {\n\t\t\t// non-directory removed or replaced\n\t\t\tdiff = append(diff, \"-\"+path+\"/\"+aname)\n\t\t} else {\n\t\t\t// item is in both trees; compare\n\t\t\tif attributes := compareFileInfo(afile, bfile, idmap, ignore); attributes != \"\" {\n\t\t\t\tdiff = append(diff, path+\"/\"+aname+\"(\"+attributes+\")\")\n\t\t\t}\n\t\t}\n\t}\n\tfor bname := range b.file {\n\t\tfiletype, present := a.file[bname]\n\t\tif !present {\n\t\t\t// non-directory added or replaced with something else\n\t\t\tdiff = append(diff, \"+\"+path+\"/\"+bname)\n\t\t\tcontinue\n\t\t}\n\t\tif attributes := compareFileInfo(filetype, b.file[bname], idmap, ignore); attributes != \"\" {\n\t\t\t// non-directory replaced with non-directory\n\t\t\tdiff = append(diff, \"+\"+path+\"/\"+bname+\"(\"+attributes+\")\")\n\t\t}\n\t}\n\treturn diff\n}\n\n// compareCheckDirectory walks two directory trees and returns a sorted list of differences\nfunc compareCheckDirectory(a, b *checkDirectory, idmap *idtools.IDMappings, ignore checkIgnore) []string {\n\tdiff := compareCheckSubdirectory(\"\", a, b, idmap, ignore)\n\tslices.SortFunc(diff, func(a, b string) int {\n\t\tif a[1:] < b[1:] {\n\t\t\treturn -1\n\t\t}\n\t\tif a[0] == '-' {\n\t\t\treturn -1\n\t\t}\n\t\treturn 1\n\t})\n\treturn diff\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/containers.go",
    "content": "package storage\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"sync\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/lockfile\"\n\t\"go.podman.io/storage/pkg/stringid\"\n\t\"go.podman.io/storage/pkg/truncindex\"\n)\n\ntype containerLocations uint8\n\n// The backing store is split in two json files, one (the volatile)\n// that is written without fsync() meaning it isn't as robust to\n// unclean shutdown\nconst (\n\tstableContainerLocation containerLocations = 1 << iota\n\tvolatileContainerLocation\n\n\tnumContainerLocationIndex = iota\n)\n\nfunc containerLocationFromIndex(index int) containerLocations {\n\treturn 1 << index\n}\n\n// A Container is a reference to a read-write layer with metadata.\ntype Container struct {\n\t// ID is either one which was specified at create-time, or a random\n\t// value which was generated by the library.\n\tID string `json:\"id\"`\n\n\t// Names is an optional set of user-defined convenience values.  The\n\t// container can be referred to by its ID or any of its names.  Names\n\t// are unique among containers.\n\tNames []string `json:\"names,omitempty\"`\n\n\t// ImageID is the ID of the image which was used to create the container.\n\tImageID string `json:\"image\"`\n\n\t// LayerID is the ID of the read-write layer for the container itself.\n\t// It is assumed that the image's top layer is the parent of the container's\n\t// read-write layer.\n\tLayerID string `json:\"layer\"`\n\n\t// Metadata is data we keep for the convenience of the caller.  It is not\n\t// expected to be large, since it is kept in memory.\n\tMetadata string `json:\"metadata,omitempty\"`\n\n\t// BigDataNames is a list of names of data items that we keep for the\n\t// convenience of the caller.  They can be large, and are only in\n\t// memory when being read from or written to disk.\n\tBigDataNames []string `json:\"big-data-names,omitempty\"`\n\n\t// BigDataSizes maps the names in BigDataNames to the sizes of the data\n\t// that has been stored, if they're known.\n\tBigDataSizes map[string]int64 `json:\"big-data-sizes,omitempty\"`\n\n\t// BigDataDigests maps the names in BigDataNames to the digests of the\n\t// data that has been stored, if they're known.\n\tBigDataDigests map[string]digest.Digest `json:\"big-data-digests,omitempty\"`\n\n\t// Created is the datestamp for when this container was created.  Older\n\t// versions of the library did not track this information, so callers\n\t// will likely want to use the IsZero() method to verify that a value\n\t// is set before using it.\n\tCreated time.Time `json:\"created\"`\n\n\t// UIDMap and GIDMap are used for setting up a container's root\n\t// filesystem for use inside of a user namespace where UID mapping is\n\t// being used.\n\tUIDMap []idtools.IDMap `json:\"uidmap,omitempty\"`\n\tGIDMap []idtools.IDMap `json:\"gidmap,omitempty\"`\n\n\tFlags map[string]any `json:\"flags,omitempty\"`\n\n\t// volatileStore is true if the container is from the volatile json file\n\tvolatileStore bool `json:\"-\"`\n}\n\n// rwContainerStore provides bookkeeping for information about Containers.\ntype rwContainerStore interface {\n\tmetadataStore\n\tcontainerBigDataStore\n\tflaggableStore\n\n\t// startWriting makes sure the store is fresh, and locks it for writing.\n\t// If this succeeds, the caller MUST call stopWriting().\n\tstartWriting() error\n\n\t// stopWriting releases locks obtained by startWriting.\n\tstopWriting()\n\n\t// startReading makes sure the store is fresh, and locks it for reading.\n\t// If this succeeds, the caller MUST call stopReading().\n\tstartReading() error\n\n\t// stopReading releases locks obtained by startReading.\n\tstopReading()\n\n\t// create creates a container that has a specified ID (or generates a\n\t// random one if an empty value is supplied) and optional names,\n\t// based on the specified image, using the specified layer as its\n\t// read-write layer.\n\t// The maps in the container's options structure are recorded for the\n\t// convenience of the caller, nothing more.\n\tcreate(id string, names []string, image, layer string, options *ContainerOptions) (*Container, error)\n\n\t// updateNames modifies names associated with a  container based on (op, names).\n\tupdateNames(id string, names []string, op updateNameOperation) error\n\n\t// Get retrieves information about a container given an ID or name.\n\tGet(id string) (*Container, error)\n\n\t// Exists checks if there is a container with the given ID or name.\n\tExists(id string) bool\n\n\t// Delete removes the record of the container.\n\tDelete(id string) error\n\n\t// Wipe removes records of all containers.\n\tWipe() error\n\n\t// Lookup attempts to translate a name to an ID.  Most methods do this\n\t// implicitly.\n\tLookup(name string) (string, error)\n\n\t// Containers returns a slice enumerating the known containers.\n\tContainers() ([]Container, error)\n\n\t// Clean up unreferenced datadirs\n\tGarbageCollect() error\n}\n\ntype containerStore struct {\n\t// The following fields are only set when constructing containerStore, and must never be modified afterwards.\n\t// They are safe to access without any other locking.\n\tlockfile *lockfile.LockFile // Synchronizes readers vs. writers of the _filesystem data_, both cross-process and in-process.\n\tdir      string\n\tjsonPath [numContainerLocationIndex]string\n\n\tinProcessLock sync.RWMutex // Can _only_ be obtained with lockfile held.\n\t// The following fields can only be read/written with read/write ownership of inProcessLock, respectively.\n\t// Almost all users should use startReading() or startWriting().\n\tlastWrite  lockfile.LastWrite\n\tcontainers []*Container\n\tidindex    *truncindex.TruncIndex\n\tbyid       map[string]*Container\n\tbylayer    map[string]*Container\n\tbyname     map[string]*Container\n}\n\nfunc copyContainer(c *Container) *Container {\n\treturn &Container{\n\t\tID:             c.ID,\n\t\tNames:          copySlicePreferringNil(c.Names),\n\t\tImageID:        c.ImageID,\n\t\tLayerID:        c.LayerID,\n\t\tMetadata:       c.Metadata,\n\t\tBigDataNames:   copySlicePreferringNil(c.BigDataNames),\n\t\tBigDataSizes:   copyMapPreferringNil(c.BigDataSizes),\n\t\tBigDataDigests: copyMapPreferringNil(c.BigDataDigests),\n\t\tCreated:        c.Created,\n\t\tUIDMap:         copySlicePreferringNil(c.UIDMap),\n\t\tGIDMap:         copySlicePreferringNil(c.GIDMap),\n\t\tFlags:          copyMapPreferringNil(c.Flags),\n\t\tvolatileStore:  c.volatileStore,\n\t}\n}\n\nfunc (c *Container) MountLabel() string {\n\tif label, ok := c.Flags[mountLabelFlag].(string); ok {\n\t\treturn label\n\t}\n\treturn \"\"\n}\n\nfunc (c *Container) ProcessLabel() string {\n\tif label, ok := c.Flags[processLabelFlag].(string); ok {\n\t\treturn label\n\t}\n\treturn \"\"\n}\n\nfunc (c *Container) MountOpts() []string {\n\tswitch value := c.Flags[mountOptsFlag].(type) {\n\tcase []string:\n\t\treturn value\n\tcase []any:\n\t\tvar mountOpts []string\n\t\tfor _, v := range value {\n\t\t\tif flag, ok := v.(string); ok {\n\t\t\t\tmountOpts = append(mountOpts, flag)\n\t\t\t}\n\t\t}\n\t\treturn mountOpts\n\tdefault:\n\t\treturn nil\n\t}\n}\n\n// The caller must hold r.inProcessLock for reading.\nfunc containerLocation(c *Container) containerLocations {\n\tif c.volatileStore {\n\t\treturn volatileContainerLocation\n\t}\n\treturn stableContainerLocation\n}\n\n// startWritingWithReload makes sure the store is fresh if canReload, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\n//\n// This is an internal implementation detail of containerStore construction, every other caller\n// should use startWriting() instead.\nfunc (r *containerStore) startWritingWithReload(canReload bool) error {\n\tr.lockfile.Lock()\n\tr.inProcessLock.Lock()\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tr.inProcessLock.Unlock()\n\t\t\tr.lockfile.Unlock()\n\t\t}\n\t}()\n\n\tif canReload {\n\t\tif _, err := r.reloadIfChanged(true); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tsucceeded = true\n\treturn nil\n}\n\n// startWriting makes sure the store is fresh, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\nfunc (r *containerStore) startWriting() error {\n\treturn r.startWritingWithReload(true)\n}\n\n// stopWriting releases locks obtained by startWriting.\nfunc (r *containerStore) stopWriting() {\n\tr.inProcessLock.Unlock()\n\tr.lockfile.Unlock()\n}\n\n// startReading makes sure the store is fresh, and locks it for reading.\n// If this succeeds, the caller MUST call stopReading().\nfunc (r *containerStore) startReading() error {\n\t// inProcessLocked calls the nested function with r.inProcessLock held for writing.\n\tinProcessLocked := func(fn func() error) error {\n\t\tr.inProcessLock.Lock()\n\t\tdefer r.inProcessLock.Unlock()\n\t\treturn fn()\n\t}\n\n\tr.lockfile.RLock()\n\tunlockFn := r.lockfile.Unlock // A function to call to clean up, or nil.\n\tdefer func() {\n\t\tif unlockFn != nil {\n\t\t\tunlockFn()\n\t\t}\n\t}()\n\tr.inProcessLock.RLock()\n\tunlockFn = r.stopReading\n\n\t// If we are lucky, we can just hold the read locks, check that we are fresh, and continue.\n\t_, modified, err := r.modified()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif modified {\n\t\t// We are unlucky, and need to reload.\n\t\t// NOTE: Multiple goroutines can get to this place approximately simultaneously.\n\t\tr.inProcessLock.RUnlock()\n\t\tunlockFn = r.lockfile.Unlock\n\n\t\t// r.lastWrite can change at this point if another goroutine reloads the store before us. That’s why we don’t unconditionally\n\t\t// trigger a load below; we (lock and) reloadIfChanged() again.\n\n\t\t// First try reloading with r.lockfile held for reading.\n\t\t// r.inProcessLock will serialize all goroutines that got here;\n\t\t// each will re-check on-disk state vs. r.lastWrite, and the first one will actually reload the data.\n\t\tvar tryLockedForWriting bool\n\t\tif err := inProcessLocked(func() error {\n\t\t\t// We could optimize this further: The r.lockfile.GetLastWrite() value shouldn’t change as long as we hold r.lockfile,\n\t\t\t// so if r.lastWrite was already updated, we don’t need to actually read the on-filesystem lock.\n\t\t\tvar err error\n\t\t\ttryLockedForWriting, err = r.reloadIfChanged(false)\n\t\t\treturn err\n\t\t}); err != nil {\n\t\t\tif !tryLockedForWriting {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// Not good enough, we need r.lockfile held for writing. So, let’s do that.\n\t\t\tunlockFn()\n\t\t\tunlockFn = nil\n\n\t\t\tr.lockfile.Lock()\n\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t_, err := r.reloadIfChanged(true)\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tunlockFn()\n\t\t\tunlockFn = nil\n\n\t\t\tr.lockfile.RLock()\n\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\t// We need to check for a reload once more because the on-disk state could have been modified\n\t\t\t// after we released the lock.\n\t\t\t// If that, _again_, finds inconsistent state, just give up.\n\t\t\t// We could, plausibly, retry a few times, but that inconsistent state (duplicate container names)\n\t\t\t// shouldn’t be saved (by correct implementations) in the first place.\n\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t_, err := r.reloadIfChanged(false)\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\treturn fmt.Errorf(\"(even after successfully cleaning up once:) %w\", err)\n\t\t\t}\n\t\t}\n\n\t\t// NOTE that we hold neither a read nor write inProcessLock at this point. That’s fine in ordinary operation, because\n\t\t// the on-filesystem r.lockfile should protect us against (cooperating) writers, and any use of r.inProcessLock\n\t\t// protects us against in-process writers modifying data.\n\t\t// In presence of non-cooperating writers, we just ensure that 1) the in-memory data is not clearly out-of-date\n\t\t// and 2) access to the in-memory data is not racy;\n\t\t// but we can’t protect against those out-of-process writers modifying _files_ while we are assuming they are in a consistent state.\n\n\t\tr.inProcessLock.RLock()\n\t}\n\tunlockFn = nil\n\treturn nil\n}\n\n// stopReading releases locks obtained by startReading.\nfunc (r *containerStore) stopReading() {\n\tr.inProcessLock.RUnlock()\n\tr.lockfile.Unlock()\n}\n\n// modified returns true if the on-disk state has changed (i.e. if reloadIfChanged may need to modify the store),\n// and a lockfile.LastWrite value for that update.\n//\n// The caller must hold r.lockfile for reading _or_ writing.\n// The caller must hold r.inProcessLock for reading or writing.\nfunc (r *containerStore) modified() (lockfile.LastWrite, bool, error) {\n\treturn r.lockfile.ModifiedSince(r.lastWrite)\n}\n\n// reloadIfChanged reloads the contents of the store from disk if it is changed.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n//\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// reloadIfChanged() with lockedForWriting could succeed.\nfunc (r *containerStore) reloadIfChanged(lockedForWriting bool) (bool, error) {\n\tlastWrite, modified, err := r.modified()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\t// We require callers to always hold r.inProcessLock for WRITING, even if they might not end up calling r.load()\n\t// and modify no fields, to ensure they see fresh data:\n\t// r.lockfile.Modified() only returns true once per change.  Without an exclusive lock,\n\t// one goroutine might see r.lockfile.Modified() == true and decide to load, and in the meanwhile another one could\n\t// see r.lockfile.Modified() == false and proceed to use in-memory data without noticing it is stale.\n\tif modified {\n\t\tif tryLockedForWriting, err := r.load(lockedForWriting); err != nil {\n\t\t\treturn tryLockedForWriting, err // r.lastWrite is unchanged, so we will load the next time again.\n\t\t}\n\t\tr.lastWrite = lastWrite\n\t}\n\treturn false, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) Containers() ([]Container, error) {\n\tcontainers := make([]Container, len(r.containers))\n\tfor i := range r.containers {\n\t\tcontainers[i] = *copyContainer(r.containers[i])\n\t}\n\treturn containers, nil\n}\n\n// This looks for datadirs in the store directory that are not referenced\n// by the json file and removes it. These can happen in the case of unclean\n// shutdowns or regular restarts in transient store mode.\n// Requires startReading.\nfunc (r *containerStore) GarbageCollect() error {\n\tentries, err := os.ReadDir(r.dir)\n\tif err != nil {\n\t\t// Unexpected, don't try any GC\n\t\treturn err\n\t}\n\n\tfor _, entry := range entries {\n\t\tid := entry.Name()\n\t\t// Does it look like a datadir directory?\n\t\tif !entry.IsDir() || stringid.ValidateID(id) != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Should the id be there?\n\t\tif r.byid[id] != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Otherwise remove datadir\n\t\tlogrus.Debugf(\"removing %q\", filepath.Join(r.dir, id))\n\t\tmoreErr := os.RemoveAll(filepath.Join(r.dir, id))\n\t\t// Propagate first error\n\t\tif moreErr != nil && err == nil {\n\t\t\terr = moreErr\n\t\t}\n\t}\n\n\treturn err\n}\n\nfunc (r *containerStore) datadir(id string) string {\n\treturn filepath.Join(r.dir, id)\n}\n\nfunc (r *containerStore) datapath(id, key string) string {\n\treturn filepath.Join(r.datadir(id), makeBigDataBaseName(key))\n}\n\n// load reloads the contents of the store from disk.\n//\n// Most callers should call reloadIfChanged() instead, to avoid overhead and to correctly\n// manage r.lastWrite.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// retrying with lockedForWriting could succeed.\nfunc (r *containerStore) load(lockedForWriting bool) (bool, error) {\n\tvar modifiedLocations containerLocations\n\tcontainers := []*Container{}\n\n\tids := make(map[string]*Container)\n\n\tfor locationIndex := range numContainerLocationIndex {\n\t\tlocation := containerLocationFromIndex(locationIndex)\n\t\trpath := r.jsonPath[locationIndex]\n\n\t\tdata, err := os.ReadFile(rpath)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\n\t\tlocationContainers := []*Container{}\n\t\tif len(data) != 0 {\n\t\t\tif err := json.Unmarshal(data, &locationContainers); err != nil {\n\t\t\t\treturn false, fmt.Errorf(\"loading %q: %w\", rpath, err)\n\t\t\t}\n\t\t}\n\n\t\tfor _, container := range locationContainers {\n\t\t\t// There should be no duplicated ids between json files, but lets check to be sure\n\t\t\tif ids[container.ID] != nil {\n\t\t\t\tcontinue // skip invalid duplicated container\n\t\t\t}\n\t\t\t// Remember where the container came from\n\t\t\tif location == volatileContainerLocation {\n\t\t\t\tcontainer.volatileStore = true\n\t\t\t}\n\t\t\tcontainers = append(containers, container)\n\t\t\tids[container.ID] = container\n\t\t}\n\t}\n\n\tidlist := make([]string, 0, len(containers))\n\tlayers := make(map[string]*Container)\n\tnames := make(map[string]*Container)\n\tvar errorToResolveBySaving error // == nil\n\tfor n, container := range containers {\n\t\tidlist = append(idlist, container.ID)\n\t\tlayers[container.LayerID] = containers[n]\n\t\tfor _, name := range container.Names {\n\t\t\tif conflict, ok := names[name]; ok {\n\t\t\t\tr.removeName(conflict, name)\n\t\t\t\terrorToResolveBySaving = errors.New(\"container store is inconsistent and the current caller does not hold a write lock\")\n\t\t\t\tmodifiedLocations |= containerLocation(container)\n\t\t\t}\n\t\t\tnames[name] = containers[n]\n\t\t}\n\t}\n\n\tr.containers = containers\n\tr.idindex = truncindex.NewTruncIndex(idlist) // Invalid values in idlist are ignored: they are not a reason to refuse processing the whole store.\n\tr.byid = ids\n\tr.bylayer = layers\n\tr.byname = names\n\tif errorToResolveBySaving != nil {\n\t\tif !lockedForWriting {\n\t\t\treturn true, errorToResolveBySaving\n\t\t}\n\t\treturn false, r.save(modifiedLocations)\n\t}\n\treturn false, nil\n}\n\n// save saves the contents of the store to disk.\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for reading (but usually holds it for writing in order to make the desired changes).\nfunc (r *containerStore) save(saveLocations containerLocations) error {\n\tr.lockfile.AssertLockedForWriting()\n\t// This must be done before we write the file, because the process could be terminated\n\t// after the file is written but before the lock file is updated.\n\tlw, err := r.lockfile.RecordWrite()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.lastWrite = lw\n\tfor locationIndex := range numContainerLocationIndex {\n\t\tlocation := containerLocationFromIndex(locationIndex)\n\t\tif location&saveLocations == 0 {\n\t\t\tcontinue\n\t\t}\n\t\trpath := r.jsonPath[locationIndex]\n\t\tif err := os.MkdirAll(filepath.Dir(rpath), 0o700); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsubsetContainers := make([]*Container, 0, len(r.containers))\n\t\tfor _, container := range r.containers {\n\t\t\tif containerLocation(container) == location {\n\t\t\t\tsubsetContainers = append(subsetContainers, container)\n\t\t\t}\n\t\t}\n\n\t\tjdata, err := json.Marshal(&subsetContainers)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvar opts *ioutils.AtomicFileWriterOptions\n\t\tif location == volatileContainerLocation {\n\t\t\topts = &ioutils.AtomicFileWriterOptions{\n\t\t\t\tNoSync: true,\n\t\t\t}\n\t\t}\n\t\tif err := ioutils.AtomicWriteFileWithOpts(rpath, jdata, 0o600, opts); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// saveFor saves the contents of the store relevant for modifiedContainer to disk.\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for reading (but usually holds it for writing in order to make the desired changes).\nfunc (r *containerStore) saveFor(modifiedContainer *Container) error {\n\treturn r.save(containerLocation(modifiedContainer))\n}\n\nfunc newContainerStore(dir string, runDir string, transient bool) (rwContainerStore, error) {\n\tif err := os.MkdirAll(dir, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tvolatileDir := dir\n\tif transient {\n\t\tif err := os.MkdirAll(runDir, 0o700); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvolatileDir = runDir\n\t}\n\tlockfile, err := lockfile.GetLockFile(filepath.Join(volatileDir, \"containers.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcstore := containerStore{\n\t\tlockfile: lockfile,\n\t\tdir:      dir,\n\t\tjsonPath: [numContainerLocationIndex]string{\n\t\t\tfilepath.Join(dir, \"containers.json\"),\n\t\t\tfilepath.Join(volatileDir, \"volatile-containers.json\"),\n\t\t},\n\n\t\tcontainers: []*Container{},\n\t\tbyid:       make(map[string]*Container),\n\t\tbylayer:    make(map[string]*Container),\n\t\tbyname:     make(map[string]*Container),\n\t}\n\n\tif err := cstore.startWritingWithReload(false); err != nil {\n\t\treturn nil, err\n\t}\n\tcstore.lastWrite, err = cstore.lockfile.GetLastWrite()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer cstore.stopWriting()\n\tif _, err := cstore.load(true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &cstore, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) lookup(id string) (*Container, bool) {\n\tif container, ok := r.byid[id]; ok {\n\t\treturn container, ok\n\t} else if container, ok := r.byname[id]; ok {\n\t\treturn container, ok\n\t} else if container, ok := r.bylayer[id]; ok {\n\t\treturn container, ok\n\t} else if longid, err := r.idindex.Get(id); err == nil {\n\t\tif container, ok := r.byid[longid]; ok {\n\t\t\treturn container, ok\n\t\t}\n\t}\n\treturn nil, false\n}\n\n// Requires startWriting.\nfunc (r *containerStore) ClearFlag(id string, flag string) error {\n\tcontainer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrContainerUnknown\n\t}\n\tdelete(container.Flags, flag)\n\treturn r.saveFor(container)\n}\n\n// Requires startWriting.\nfunc (r *containerStore) SetFlag(id string, flag string, value any) error {\n\tcontainer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrContainerUnknown\n\t}\n\tif container.Flags == nil {\n\t\tcontainer.Flags = make(map[string]any)\n\t}\n\tcontainer.Flags[flag] = value\n\treturn r.saveFor(container)\n}\n\n// Requires startWriting.\nfunc (r *containerStore) create(id string, names []string, image, layer string, options *ContainerOptions) (container *Container, err error) {\n\tif options == nil {\n\t\toptions = &ContainerOptions{}\n\t}\n\tif id == \"\" {\n\t\tid = stringid.GenerateRandomID()\n\t\t_, idInUse := r.byid[id]\n\t\tfor idInUse {\n\t\t\tid = stringid.GenerateRandomID()\n\t\t\t_, idInUse = r.byid[id]\n\t\t}\n\t}\n\tif _, idInUse := r.byid[id]; idInUse {\n\t\treturn nil, ErrDuplicateID\n\t}\n\tnames = dedupeStrings(names)\n\tfor _, name := range names {\n\t\tif _, nameInUse := r.byname[name]; nameInUse {\n\t\t\treturn nil, fmt.Errorf(\"the container name %q is already in use by %s. You have to remove that container to be able to reuse that name: %w\", name, r.byname[name].ID, ErrDuplicateName)\n\t\t}\n\t}\n\tif err := hasOverlappingRanges(options.UIDMap); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := hasOverlappingRanges(options.GIDMap); err != nil {\n\t\treturn nil, err\n\t}\n\tcontainer = &Container{\n\t\tID:             id,\n\t\tNames:          names,\n\t\tImageID:        image,\n\t\tLayerID:        layer,\n\t\tMetadata:       options.Metadata,\n\t\tBigDataNames:   []string{},\n\t\tBigDataSizes:   make(map[string]int64),\n\t\tBigDataDigests: make(map[string]digest.Digest),\n\t\tCreated:        time.Now().UTC(),\n\t\tFlags:          newMapFrom(options.Flags),\n\t\tUIDMap:         copySlicePreferringNil(options.UIDMap),\n\t\tGIDMap:         copySlicePreferringNil(options.GIDMap),\n\t\tvolatileStore:  options.Volatile,\n\t}\n\tif options.MountOpts != nil {\n\t\tcontainer.Flags[mountOptsFlag] = slices.Clone(options.MountOpts)\n\t}\n\tif options.Volatile {\n\t\tcontainer.Flags[volatileFlag] = true\n\t}\n\tr.containers = append(r.containers, container)\n\t// This can only fail on duplicate IDs, which shouldn’t happen — and in\n\t// that case the index is already in the desired state anyway.\n\t// Implementing recovery from an unlikely and unimportant failure here\n\t// would be too risky.\n\t_ = r.idindex.Add(id)\n\tr.byid[id] = container\n\tr.bylayer[layer] = container\n\tfor _, name := range names {\n\t\tr.byname[name] = container\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t// now that the in-memory structures know about the new\n\t\t\t// record, we can use regular Delete() to clean up if\n\t\t\t// anything breaks from here on out\n\t\t\tif e := r.Delete(id); e != nil {\n\t\t\t\tlogrus.Debugf(\"while cleaning up partially-created container %q we failed to create: %v\", id, e)\n\t\t\t}\n\t\t}\n\t}()\n\terr = r.saveFor(container)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range options.BigData {\n\t\tif err = r.SetBigData(id, item.Key, item.Data); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tcontainer = copyContainer(container)\n\treturn container, err\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) Metadata(id string) (string, error) {\n\tif container, ok := r.lookup(id); ok {\n\t\treturn container.Metadata, nil\n\t}\n\treturn \"\", ErrContainerUnknown\n}\n\n// Requires startWriting.\nfunc (r *containerStore) SetMetadata(id, metadata string) error {\n\tif container, ok := r.lookup(id); ok {\n\t\tcontainer.Metadata = metadata\n\t\treturn r.saveFor(container)\n\t}\n\treturn ErrContainerUnknown\n}\n\n// The caller must hold r.inProcessLock for writing.\nfunc (r *containerStore) removeName(container *Container, name string) {\n\tcontainer.Names = stringSliceWithoutValue(container.Names, name)\n}\n\n// Requires startWriting.\nfunc (r *containerStore) updateNames(id string, names []string, op updateNameOperation) error {\n\tcontainer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrContainerUnknown\n\t}\n\toldNames := container.Names\n\tnames, err := applyNameOperation(oldNames, names, op)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, name := range oldNames {\n\t\tdelete(r.byname, name)\n\t}\n\tfor _, name := range names {\n\t\tif otherContainer, ok := r.byname[name]; ok {\n\t\t\tr.removeName(otherContainer, name)\n\t\t}\n\t\tr.byname[name] = container\n\t}\n\tcontainer.Names = names\n\treturn r.saveFor(container)\n}\n\n// Requires startWriting.\nfunc (r *containerStore) Delete(id string) error {\n\tcontainer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrContainerUnknown\n\t}\n\tid = container.ID\n\tdelete(r.byid, id)\n\t// This can only fail if the ID is already missing, which shouldn’t happen — and in that case the index is already in the desired state anyway.\n\t// The store’s Delete method is used on various paths to recover from failures, so this should be robust against partially missing data.\n\t_ = r.idindex.Delete(id)\n\tdelete(r.bylayer, container.LayerID)\n\tfor _, name := range container.Names {\n\t\tdelete(r.byname, name)\n\t}\n\tr.containers = slices.DeleteFunc(r.containers, func(candidate *Container) bool {\n\t\treturn candidate.ID == id\n\t})\n\tif err := r.saveFor(container); err != nil {\n\t\treturn err\n\t}\n\tif err := os.RemoveAll(r.datadir(id)); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) Get(id string) (*Container, error) {\n\tif container, ok := r.lookup(id); ok {\n\t\treturn copyContainer(container), nil\n\t}\n\treturn nil, ErrContainerUnknown\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) Lookup(name string) (id string, err error) {\n\tif container, ok := r.lookup(name); ok {\n\t\treturn container.ID, nil\n\t}\n\treturn \"\", ErrContainerUnknown\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) Exists(id string) bool {\n\t_, ok := r.lookup(id)\n\treturn ok\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) BigData(id, key string) ([]byte, error) {\n\tif key == \"\" {\n\t\treturn nil, fmt.Errorf(\"can't retrieve container big data value for empty name: %w\", ErrInvalidBigDataName)\n\t}\n\tc, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, ErrContainerUnknown\n\t}\n\treturn os.ReadFile(r.datapath(c.ID, key))\n}\n\n// Requires startWriting. Yes, really, WRITING (see SetBigData).\nfunc (r *containerStore) BigDataSize(id, key string) (int64, error) {\n\tif key == \"\" {\n\t\treturn -1, fmt.Errorf(\"can't retrieve size of container big data with empty name: %w\", ErrInvalidBigDataName)\n\t}\n\tc, ok := r.lookup(id)\n\tif !ok {\n\t\treturn -1, ErrContainerUnknown\n\t}\n\tif size, ok := c.BigDataSizes[key]; ok { // This is valid, and returns ok == false, for BigDataSizes == nil.\n\t\treturn size, nil\n\t}\n\tif data, err := r.BigData(id, key); err == nil && data != nil {\n\t\tif err = r.SetBigData(id, key, data); err == nil {\n\t\t\tc, ok := r.lookup(id)\n\t\t\tif !ok {\n\t\t\t\treturn -1, ErrContainerUnknown\n\t\t\t}\n\t\t\tif size, ok := c.BigDataSizes[key]; ok {\n\t\t\t\treturn size, nil\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1, err\n\t\t}\n\t}\n\treturn -1, ErrSizeUnknown\n}\n\n// Requires startWriting. Yes, really, WRITING (see SetBigData).\nfunc (r *containerStore) BigDataDigest(id, key string) (digest.Digest, error) {\n\tif key == \"\" {\n\t\treturn \"\", fmt.Errorf(\"can't retrieve digest of container big data value with empty name: %w\", ErrInvalidBigDataName)\n\t}\n\tc, ok := r.lookup(id)\n\tif !ok {\n\t\treturn \"\", ErrContainerUnknown\n\t}\n\tif d, ok := c.BigDataDigests[key]; ok { // This is valid, and returns ok == false, for BigDataSizes == nil.\n\t\treturn d, nil\n\t}\n\tif data, err := r.BigData(id, key); err == nil && data != nil {\n\t\tif err = r.SetBigData(id, key, data); err == nil {\n\t\t\tc, ok := r.lookup(id)\n\t\t\tif !ok {\n\t\t\t\treturn \"\", ErrContainerUnknown\n\t\t\t}\n\t\t\tif d, ok := c.BigDataDigests[key]; ok {\n\t\t\t\treturn d, nil\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\treturn \"\", ErrDigestUnknown\n}\n\n// Requires startReading or startWriting.\nfunc (r *containerStore) BigDataNames(id string) ([]string, error) {\n\tc, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, ErrContainerUnknown\n\t}\n\treturn copySlicePreferringNil(c.BigDataNames), nil\n}\n\n// Requires startWriting.\nfunc (r *containerStore) SetBigData(id, key string, data []byte) error {\n\tif key == \"\" {\n\t\treturn fmt.Errorf(\"can't set empty name for container big data item: %w\", ErrInvalidBigDataName)\n\t}\n\tc, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrContainerUnknown\n\t}\n\tif err := os.MkdirAll(r.datadir(c.ID), 0o700); err != nil {\n\t\treturn err\n\t}\n\terr := ioutils.AtomicWriteFile(r.datapath(c.ID, key), data, 0o600)\n\tif err == nil {\n\t\tsave := false\n\t\tif c.BigDataSizes == nil {\n\t\t\tc.BigDataSizes = make(map[string]int64)\n\t\t}\n\t\toldSize, sizeOk := c.BigDataSizes[key]\n\t\tc.BigDataSizes[key] = int64(len(data))\n\t\tif c.BigDataDigests == nil {\n\t\t\tc.BigDataDigests = make(map[string]digest.Digest)\n\t\t}\n\t\toldDigest, digestOk := c.BigDataDigests[key]\n\t\tnewDigest := digest.Canonical.FromBytes(data)\n\t\tc.BigDataDigests[key] = newDigest\n\t\tif !sizeOk || oldSize != c.BigDataSizes[key] || !digestOk || oldDigest != newDigest {\n\t\t\tsave = true\n\t\t}\n\t\tif !slices.Contains(c.BigDataNames, key) {\n\t\t\tc.BigDataNames = append(c.BigDataNames, key)\n\t\t\tsave = true\n\t\t}\n\t\tif save {\n\t\t\terr = r.saveFor(c)\n\t\t}\n\t}\n\treturn err\n}\n\n// Requires startWriting.\nfunc (r *containerStore) Wipe() error {\n\tids := make([]string, 0, len(r.byid))\n\tfor id := range r.byid {\n\t\tids = append(ids, id)\n\t}\n\tfor _, id := range ids {\n\t\tif err := r.Delete(id); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/deprecated.go",
    "content": "package storage\n\nimport (\n\t\"io\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\tdrivers \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\n// The type definitions in this file exist ONLY to maintain formal API compatibility.\n// DO NOT ADD ANY NEW METHODS TO THESE INTERFACES.\n\n// ROFileBasedStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROFileBasedStore interface {\n\tLocker\n\tLoad() error\n\tReloadIfChanged() error\n}\n\n// RWFileBasedStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype RWFileBasedStore interface {\n\tSave() error\n}\n\n// FileBasedStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype FileBasedStore interface {\n\tROFileBasedStore\n\tRWFileBasedStore\n}\n\n// ROMetadataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROMetadataStore interface {\n\tMetadata(id string) (string, error)\n}\n\n// RWMetadataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype RWMetadataStore interface {\n\tSetMetadata(id, metadata string) error\n}\n\n// MetadataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype MetadataStore interface {\n\tROMetadataStore\n\tRWMetadataStore\n}\n\n// ROBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROBigDataStore interface {\n\tBigData(id, key string) ([]byte, error)\n\tBigDataSize(id, key string) (int64, error)\n\tBigDataDigest(id, key string) (digest.Digest, error)\n\tBigDataNames(id string) ([]string, error)\n}\n\n// RWImageBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype RWImageBigDataStore interface {\n\tSetBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error\n}\n\n// ContainerBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ContainerBigDataStore interface {\n\tROBigDataStore\n\tSetBigData(id, key string, data []byte) error\n}\n\n// ROLayerBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROLayerBigDataStore interface {\n\tBigData(id, key string) (io.ReadCloser, error)\n\tBigDataNames(id string) ([]string, error)\n}\n\n// RWLayerBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype RWLayerBigDataStore interface {\n\tSetBigData(id, key string, data io.Reader) error\n}\n\n// LayerBigDataStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype LayerBigDataStore interface {\n\tROLayerBigDataStore\n\tRWLayerBigDataStore\n}\n\n// FlaggableStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype FlaggableStore interface {\n\tClearFlag(id string, flag string) error\n\tSetFlag(id string, flag string, value any) error\n}\n\n// ContainerStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ContainerStore interface {\n\tFileBasedStore\n\tMetadataStore\n\tContainerBigDataStore\n\tFlaggableStore\n\tCreate(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error)\n\tSetNames(id string, names []string) error\n\tAddNames(id string, names []string) error\n\tRemoveNames(id string, names []string) error\n\tGet(id string) (*Container, error)\n\tExists(id string) bool\n\tDelete(id string) error\n\tWipe() error\n\tLookup(name string) (string, error)\n\tContainers() ([]Container, error)\n}\n\n// ROImageStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROImageStore interface {\n\tROFileBasedStore\n\tROMetadataStore\n\tROBigDataStore\n\tExists(id string) bool\n\tGet(id string) (*Image, error)\n\tLookup(name string) (string, error)\n\tImages() ([]Image, error)\n\tByDigest(d digest.Digest) ([]*Image, error)\n}\n\n// ImageStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ImageStore interface {\n\tROImageStore\n\tRWFileBasedStore\n\tRWMetadataStore\n\tRWImageBigDataStore\n\tFlaggableStore\n\tCreate(id string, names []string, layer, metadata string, created time.Time, searchableDigest digest.Digest) (*Image, error)\n\tSetNames(id string, names []string) error\n\tAddNames(id string, names []string) error\n\tRemoveNames(id string, names []string) error\n\tDelete(id string) error\n\tWipe() error\n}\n\n// ROLayerStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype ROLayerStore interface {\n\tROFileBasedStore\n\tROMetadataStore\n\tROLayerBigDataStore\n\tExists(id string) bool\n\tGet(id string) (*Layer, error)\n\tStatus() ([][2]string, error)\n\tChanges(from, to string) ([]archive.Change, error)\n\tDiff(from, to string, options *DiffOptions) (io.ReadCloser, error)\n\tDiffSize(from, to string) (int64, error)\n\tSize(name string) (int64, error)\n\tLookup(name string) (string, error)\n\tLayersByCompressedDigest(d digest.Digest) ([]Layer, error)\n\tLayersByUncompressedDigest(d digest.Digest) ([]Layer, error)\n\tLayers() ([]Layer, error)\n}\n\n// LayerStore is a deprecated interface with no documented way to use it from callers outside of c/storage.\n//\n// Deprecated: There is no way to use this from any external user of c/storage to invoke c/storage functionality.\ntype LayerStore interface {\n\tROLayerStore\n\tRWFileBasedStore\n\tRWMetadataStore\n\tFlaggableStore\n\tRWLayerBigDataStore\n\tCreate(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool) (*Layer, error)\n\tCreateWithFlags(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]any) (layer *Layer, err error)\n\tPut(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]any, diff io.Reader) (*Layer, int64, error)\n\tSetNames(id string, names []string) error\n\tAddNames(id string, names []string) error\n\tRemoveNames(id string, names []string) error\n\tDelete(id string) error\n\tWipe() error\n\tMount(id string, options drivers.MountOpts) (string, error)\n\tUnmount(id string, force bool) (bool, error)\n\tMounted(id string) (int, error)\n\tParentOwners(id string) (uids, gids []int, err error)\n\tApplyDiff(to string, diff io.Reader) (int64, error)\n\tDifferTarget(id string) (string, error)\n\tLoadLocked() error\n\tPutAdditionalLayer(id string, parentLayer *Layer, names []string, aLayer drivers.AdditionalLayer) (layer *Layer, err error)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/btrfs/btrfs.go",
    "content": "//go:build linux && cgo\n\npackage btrfs\n\n/*\n#include <stdlib.h>\n#include <dirent.h>\n\n// keep struct field name compatible with btrfs-progs < 6.1.\n#define max_referenced max_rfer\n#include <btrfs/ioctl.h>\n#include <btrfs/ctree.h>\n\nstatic void set_name_btrfs_ioctl_vol_args_v2(struct btrfs_ioctl_vol_args_v2* btrfs_struct, const char* value) {\n    snprintf(btrfs_struct->name, BTRFS_SUBVOL_NAME_MAX, \"%s\", value);\n}\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"io/fs\"\n\t\"math\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"unsafe\"\n\n\t\"github.com/docker/go-units\"\n\t\"github.com/opencontainers/selinux/go-selinux/label\"\n\t\"github.com/sirupsen/logrus\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"go.podman.io/storage/pkg/parsers\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst defaultPerms = os.FileMode(0o555)\n\nfunc init() {\n\tgraphdriver.MustRegister(\"btrfs\", Init)\n}\n\ntype btrfsOptions struct {\n\tminSpace uint64\n\tsize     uint64\n}\n\n// Init returns a new BTRFS driver.\n// An error is returned if BTRFS is not supported.\nfunc Init(home string, options graphdriver.Options) (graphdriver.Driver, error) {\n\tfsMagic, err := graphdriver.GetFSMagic(home)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif fsMagic != graphdriver.FsMagicBtrfs {\n\t\treturn nil, fmt.Errorf(\"%q is not on a btrfs filesystem: %w\", home, graphdriver.ErrPrerequisites)\n\t}\n\n\tif err := os.MkdirAll(filepath.Join(home, \"subvolumes\"), 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := mount.MakePrivate(home); err != nil {\n\t\treturn nil, err\n\t}\n\n\topt, userDiskQuota, err := parseOptions(options.DriverOptions)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdriver := &Driver{\n\t\thome:    home,\n\t\toptions: opt,\n\t}\n\n\tif userDiskQuota {\n\t\tif err := driver.enableQuota(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn graphdriver.NewNaiveDiffDriver(driver, graphdriver.NewNaiveLayerIDMapUpdater(driver)), nil\n}\n\nfunc parseOptions(opt []string) (btrfsOptions, bool, error) {\n\tvar options btrfsOptions\n\tuserDiskQuota := false\n\tfor _, option := range opt {\n\t\tkey, val, err := parsers.ParseKeyValueOpt(option)\n\t\tif err != nil {\n\t\t\treturn options, userDiskQuota, err\n\t\t}\n\t\tkey = strings.ToLower(key)\n\t\tswitch key {\n\t\tcase \"btrfs.min_space\":\n\t\t\tminSpace, err := units.RAMInBytes(val)\n\t\t\tif err != nil {\n\t\t\t\treturn options, userDiskQuota, err\n\t\t\t}\n\t\t\tuserDiskQuota = true\n\t\t\toptions.minSpace = uint64(minSpace)\n\t\tcase \"btrfs.mountopt\":\n\t\t\treturn options, userDiskQuota, fmt.Errorf(\"btrfs driver does not support mount options\")\n\t\tdefault:\n\t\t\treturn options, userDiskQuota, fmt.Errorf(\"unknown option %s (%q)\", key, option)\n\t\t}\n\t}\n\treturn options, userDiskQuota, nil\n}\n\n// Driver contains information about the filesystem mounted.\ntype Driver struct {\n\t// root of the file system\n\thome         string\n\toptions      btrfsOptions\n\tquotaEnabled bool\n\tonce         sync.Once\n}\n\n// String prints the name of the driver (btrfs).\nfunc (d *Driver) String() string {\n\treturn \"btrfs\"\n}\n\n// Status returns current driver information in a two dimensional string array.\n// Output contains \"Build Version\" and \"Library Version\" of the btrfs libraries used.\n// Version information can be used to check compatibility with your kernel.\nfunc (d *Driver) Status() [][2]string {\n\tstatus := [][2]string{}\n\tif bv := btrfsBuildVersion(); bv != \"-\" {\n\t\tstatus = append(status, [2]string{\"Build Version\", bv})\n\t}\n\tif lv := btrfsLibVersion(); lv != -1 {\n\t\tstatus = append(status, [2]string{\"Library Version\", fmt.Sprintf(\"%d\", lv)})\n\t}\n\treturn status\n}\n\n// Metadata returns empty metadata for this driver.\nfunc (d *Driver) Metadata(id string) (map[string]string, error) {\n\treturn nil, nil //nolint: nilnil\n}\n\n// Cleanup unmounts the home directory.\nfunc (d *Driver) Cleanup() error {\n\treturn mount.Unmount(d.home)\n}\n\nfunc free(p *C.char) {\n\tC.free(unsafe.Pointer(p))\n}\n\nfunc openDir(path string) (*C.DIR, error) {\n\tCpath := C.CString(path)\n\tdefer free(Cpath)\n\n\tdir := C.opendir(Cpath)\n\tif dir == nil {\n\t\treturn nil, fmt.Errorf(\"can't open dir %s\", path)\n\t}\n\treturn dir, nil\n}\n\nfunc closeDir(dir *C.DIR) {\n\tif dir != nil {\n\t\tC.closedir(dir)\n\t}\n}\n\nfunc getDirFd(dir *C.DIR) uintptr {\n\treturn uintptr(C.dirfd(dir))\n}\n\nfunc subvolCreate(path, name string) error {\n\tdir, err := openDir(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_vol_args\n\tfor i, c := range []byte(name) {\n\t\targs.name[i] = C.char(c)\n\t}\n\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_SUBVOL_CREATE,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to create btrfs subvolume: %w\", errno)\n\t}\n\treturn nil\n}\n\nfunc subvolSnapshot(src, dest, name string) error {\n\tsrcDir, err := openDir(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(srcDir)\n\n\tdestDir, err := openDir(dest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(destDir)\n\n\tvar args C.struct_btrfs_ioctl_vol_args_v2\n\targs.fd = C.__s64(getDirFd(srcDir))\n\n\tcs := C.CString(name)\n\tC.set_name_btrfs_ioctl_vol_args_v2(&args, cs)\n\tC.free(unsafe.Pointer(cs))\n\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(destDir), C.BTRFS_IOC_SNAP_CREATE_V2,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to create btrfs snapshot: %w\", errno)\n\t}\n\treturn nil\n}\n\nfunc isSubvolume(p string) (bool, error) {\n\tvar bufStat unix.Stat_t\n\tif err := unix.Lstat(p, &bufStat); err != nil {\n\t\treturn false, err\n\t}\n\n\t// return true if it is a btrfs subvolume\n\treturn bufStat.Ino == C.BTRFS_FIRST_FREE_OBJECTID, nil\n}\n\nfunc subvolDelete(dirpath, name string, quotaEnabled bool) error {\n\tdir, err := openDir(dirpath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\tfullPath := path.Join(dirpath, name)\n\n\tvar args C.struct_btrfs_ioctl_vol_args\n\n\t// walk the btrfs subvolumes\n\twalkSubvolumes := func(p string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) && p != fullPath {\n\t\t\t\t// missing most likely because the path was a subvolume that got removed in the previous iteration\n\t\t\t\t// since it's gone anyway, we don't care\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"walking subvolumes: %w\", err)\n\t\t}\n\t\t// we want to check children only so skip itself\n\t\t// it will be removed after the filepath walk anyways\n\t\tif d.IsDir() && p != fullPath {\n\t\t\tsv, err := isSubvolume(p)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to test if %s is a btrfs subvolume: %w\", p, err)\n\t\t\t}\n\t\t\tif sv {\n\t\t\t\tif err := subvolDelete(path.Dir(p), d.Name(), quotaEnabled); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to destroy btrfs child subvolume (%s) of parent (%s): %w\", p, dirpath, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\tif err := filepath.WalkDir(path.Join(dirpath, name), walkSubvolumes); err != nil {\n\t\treturn fmt.Errorf(\"recursively walking subvolumes for %s failed: %w\", dirpath, err)\n\t}\n\n\tif quotaEnabled {\n\t\tif qgroupid, err := subvolLookupQgroup(fullPath); err == nil {\n\t\t\tvar args C.struct_btrfs_ioctl_qgroup_create_args\n\t\t\targs.qgroupid = C.__u64(qgroupid)\n\n\t\t\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_CREATE,\n\t\t\t\tuintptr(unsafe.Pointer(&args)))\n\t\t\tif errno != 0 {\n\t\t\t\tlogrus.Errorf(\"Failed to delete btrfs qgroup %v for %s: %v\", qgroupid, fullPath, errno.Error())\n\t\t\t}\n\t\t} else {\n\t\t\tlogrus.Errorf(\"Failed to lookup btrfs qgroup for %s: %v\", fullPath, err.Error())\n\t\t}\n\t}\n\n\t// all subvolumes have been removed\n\t// now remove the one originally passed in\n\tfor i, c := range []byte(name) {\n\t\targs.name[i] = C.char(c)\n\t}\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_SNAP_DESTROY,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to destroy btrfs snapshot %s for %s: %w\", dirpath, name, errno)\n\t}\n\treturn nil\n}\n\nfunc (d *Driver) updateQuotaStatus() {\n\td.once.Do(func() {\n\t\tif !d.quotaEnabled {\n\t\t\t// In case quotaEnabled is not set, check qgroup and update quotaEnabled as needed\n\t\t\tif err := qgroupStatus(d.home); err != nil {\n\t\t\t\t// quota is still not enabled\n\t\t\t\treturn\n\t\t\t}\n\t\t\td.quotaEnabled = true\n\t\t}\n\t})\n}\n\nfunc (d *Driver) enableQuota() error {\n\td.updateQuotaStatus()\n\n\tif d.quotaEnabled {\n\t\treturn nil\n\t}\n\n\tdir, err := openDir(d.home)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_quota_ctl_args\n\targs.cmd = C.BTRFS_QUOTA_CTL_ENABLE\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QUOTA_CTL,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to enable btrfs quota for %s: %w\", dir, errno)\n\t}\n\n\td.quotaEnabled = true\n\n\treturn nil\n}\n\nfunc (d *Driver) subvolRescanQuota() error {\n\td.updateQuotaStatus()\n\n\tif !d.quotaEnabled {\n\t\treturn nil\n\t}\n\n\tdir, err := openDir(d.home)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_quota_rescan_args\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QUOTA_RESCAN_WAIT,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to rescan btrfs quota for %s: %w\", dir, errno)\n\t}\n\n\treturn nil\n}\n\nfunc subvolLimitQgroup(path string, size uint64) error {\n\tdir, err := openDir(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_qgroup_limit_args\n\targs.lim.max_rfer = C.__u64(size)\n\targs.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to limit qgroup for %s: %w\", dir, errno)\n\t}\n\n\treturn nil\n}\n\n// qgroupStatus performs a BTRFS_IOC_TREE_SEARCH on the root path\n// with search key of BTRFS_QGROUP_STATUS_KEY.\n// In case qgroup is enabled, the returned key type will match BTRFS_QGROUP_STATUS_KEY.\n// For more details please see https://github.com/kdave/btrfs-progs/blob/v4.9/qgroup.c#L1035\nfunc qgroupStatus(path string) error {\n\tdir, err := openDir(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_search_args\n\targs.key.tree_id = C.BTRFS_QUOTA_TREE_OBJECTID\n\targs.key.min_type = C.BTRFS_QGROUP_STATUS_KEY\n\targs.key.max_type = C.BTRFS_QGROUP_STATUS_KEY\n\targs.key.max_objectid = C.__u64(math.MaxUint64)\n\targs.key.max_offset = C.__u64(math.MaxUint64)\n\targs.key.max_transid = C.__u64(math.MaxUint64)\n\targs.key.nr_items = 4096\n\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_TREE_SEARCH,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to search qgroup for %s: %w\", path, errno)\n\t}\n\tsh := (*C.struct_btrfs_ioctl_search_header)(unsafe.Pointer(&args.buf))\n\tif sh._type != C.BTRFS_QGROUP_STATUS_KEY {\n\t\treturn fmt.Errorf(\"invalid qgroup search header type for %s: %v\", path, sh._type)\n\t}\n\treturn nil\n}\n\nfunc subvolLookupQgroup(path string) (uint64, error) {\n\tdir, err := openDir(path)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer closeDir(dir)\n\n\tvar args C.struct_btrfs_ioctl_ino_lookup_args\n\targs.objectid = C.BTRFS_FIRST_FREE_OBJECTID\n\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_INO_LOOKUP,\n\t\tuintptr(unsafe.Pointer(&args)))\n\tif errno != 0 {\n\t\treturn 0, fmt.Errorf(\"failed to lookup qgroup for %s: %w\", dir, errno)\n\t}\n\tif args.treeid == 0 {\n\t\treturn 0, fmt.Errorf(\"invalid qgroup id for %s: 0\", dir)\n\t}\n\n\treturn uint64(args.treeid), nil\n}\n\nfunc (d *Driver) subvolumesDir() string {\n\treturn path.Join(d.home, \"subvolumes\")\n}\n\nfunc (d *Driver) subvolumesDirID(id string) string {\n\treturn path.Join(d.subvolumesDir(), id)\n}\n\nfunc (d *Driver) quotasDir() string {\n\treturn path.Join(d.home, \"quotas\")\n}\n\nfunc (d *Driver) quotasDirID(id string) string {\n\treturn path.Join(d.quotasDir(), id)\n}\n\n// CreateFromTemplate creates a layer with the same contents and parent as another layer.\nfunc (d *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error {\n\treturn d.Create(id, template, opts)\n}\n\n// CreateReadWrite creates a layer that is writable for use as a container\n// file system.\nfunc (d *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts) error {\n\treturn d.Create(id, parent, opts)\n}\n\n// Create the filesystem with given id.\nfunc (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {\n\tquotas := d.quotasDir()\n\tsubvolumes := d.subvolumesDir()\n\tif err := os.MkdirAll(subvolumes, 0o700); err != nil {\n\t\treturn err\n\t}\n\tif parent == \"\" {\n\t\tif err := subvolCreate(subvolumes, id); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := os.Chmod(path.Join(subvolumes, id), defaultPerms); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tparentDir := d.subvolumesDirID(parent)\n\t\tst, err := os.Stat(parentDir)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !st.IsDir() {\n\t\t\treturn fmt.Errorf(\"%s: not a directory\", parentDir)\n\t\t}\n\t\tif err := subvolSnapshot(parentDir, subvolumes, id); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvar storageOpt map[string]string\n\tif opts != nil {\n\t\tstorageOpt = opts.StorageOpt\n\t}\n\n\tif _, ok := storageOpt[\"size\"]; ok {\n\t\tdriver := &Driver{}\n\t\tif err := d.parseStorageOpt(storageOpt, driver); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := d.setStorageSize(path.Join(subvolumes, id), driver); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := os.MkdirAll(quotas, 0o700); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := os.WriteFile(path.Join(quotas, id), []byte(fmt.Sprint(driver.options.size)), 0o644); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tmountLabel := \"\"\n\tif opts != nil {\n\t\tmountLabel = opts.MountLabel\n\t}\n\n\treturn label.Relabel(path.Join(subvolumes, id), mountLabel, false)\n}\n\n// Parse btrfs storage options\nfunc (d *Driver) parseStorageOpt(storageOpt map[string]string, driver *Driver) error {\n\t// Read size to change the subvolume disk quota per container\n\tfor key, val := range storageOpt {\n\t\tkey := strings.ToLower(key)\n\t\tswitch key {\n\t\tcase \"size\":\n\t\t\tsize, err := units.RAMInBytes(val)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdriver.options.size = uint64(size)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unknown option %s (%q)\", key, storageOpt)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Set btrfs storage size\nfunc (d *Driver) setStorageSize(dir string, driver *Driver) error {\n\tif driver.options.size <= 0 {\n\t\treturn fmt.Errorf(\"btrfs: invalid storage size: %s\", units.HumanSize(float64(driver.options.size)))\n\t}\n\tif d.options.minSpace > 0 && driver.options.size < d.options.minSpace {\n\t\treturn fmt.Errorf(\"btrfs: storage size cannot be less than %s\", units.HumanSize(float64(d.options.minSpace)))\n\t}\n\n\tif err := d.enableQuota(); err != nil {\n\t\treturn err\n\t}\n\n\tif err := subvolLimitQgroup(dir, driver.options.size); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// Remove the filesystem with given id.\nfunc (d *Driver) Remove(id string) error {\n\tdir := d.subvolumesDirID(id)\n\tif err := fileutils.Exists(dir); err != nil {\n\t\treturn err\n\t}\n\tquotasDir := d.quotasDirID(id)\n\tif err := fileutils.Exists(quotasDir); err == nil {\n\t\tif err := os.Remove(quotasDir); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\n\t// Call updateQuotaStatus() to invoke status update\n\td.updateQuotaStatus()\n\n\tif err := subvolDelete(d.subvolumesDir(), id, d.quotaEnabled); err != nil {\n\t\tif d.quotaEnabled {\n\t\t\treturn err\n\t\t}\n\t\t// If quota is not enabled, fallback to rmdir syscall to delete subvolumes.\n\t\t// This would allow unprivileged user to delete their owned subvolumes\n\t\t// in kernel >= 4.18 without user_subvol_rm_alowed mount option.\n\t}\n\tif err := system.EnsureRemoveAll(dir); err != nil {\n\t\treturn err\n\t}\n\tif err := d.subvolRescanQuota(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Get the requested filesystem id.\nfunc (d *Driver) Get(id string, options graphdriver.MountOpts) (string, error) {\n\tdir := d.subvolumesDirID(id)\n\tst, err := os.Stat(dir)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfor _, opt := range options.Options {\n\t\tif opt == \"ro\" {\n\t\t\t// ignore \"ro\" option\n\t\t\tcontinue\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"btrfs driver does not support mount options\")\n\t}\n\tif !st.IsDir() {\n\t\treturn \"\", fmt.Errorf(\"%s: not a directory\", dir)\n\t}\n\n\tif quota, err := os.ReadFile(d.quotasDirID(id)); err == nil {\n\t\tif size, err := strconv.ParseUint(string(quota), 10, 64); err == nil && size >= d.options.minSpace {\n\t\t\tif err := d.enableQuota(); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tif err := subvolLimitQgroup(dir, size); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dir, nil\n}\n\n// Put is not implemented for BTRFS as there is no cleanup required for the id.\nfunc (d *Driver) Put(id string) error {\n\t// Get() creates no runtime resources (like e.g. mounts)\n\t// so this doesn't need to do anything.\n\treturn nil\n}\n\n// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.\n// For BTRFS, it queries the subvolumes path for this ID.\nfunc (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {\n\treturn directory.Usage(d.subvolumesDirID(id))\n}\n\n// Exists checks if the id exists in the filesystem.\nfunc (d *Driver) Exists(id string) bool {\n\tdir := d.subvolumesDirID(id)\n\terr := fileutils.Exists(dir)\n\treturn err == nil\n}\n\n// List all of the layers known to the driver.\nfunc (d *Driver) ListLayers() ([]string, error) {\n\tentries, err := os.ReadDir(d.subvolumesDir())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresults := make([]string, 0, len(entries))\n\tfor _, entry := range entries {\n\t\tif !entry.IsDir() {\n\t\t\tcontinue\n\t\t}\n\t\tresults = append(results, entry.Name())\n\t}\n\treturn results, nil\n}\n\n// AdditionalImageStores returns additional image stores supported by the driver\nfunc (d *Driver) AdditionalImageStores() []string {\n\treturn nil\n}\n\n// Dedup performs deduplication of the driver's storage.\nfunc (d *Driver) Dedup(req graphdriver.DedupArgs) (graphdriver.DedupResult, error) {\n\treturn graphdriver.DedupResult{}, nil\n}\n\n// DeferredRemove is not implemented.\n// It calls Remove directly.\nfunc (d *Driver) DeferredRemove(id string) (tempdir.CleanupTempDirFunc, error) {\n\treturn nil, d.Remove(id)\n}\n\n// GetTempDirRootDirs is not implemented.\nfunc (d *Driver) GetTempDirRootDirs() []string {\n\treturn []string{}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/btrfs/dummy_unsupported.go",
    "content": "//go:build !linux || !cgo\n\npackage btrfs\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/btrfs/version.go",
    "content": "//go:build linux && cgo\n\npackage btrfs\n\n/*\n#include <btrfs/version.h>\n\n// around version 3.16, they did not define lib version yet\n#ifndef BTRFS_LIB_VERSION\n#define BTRFS_LIB_VERSION -1\n#endif\n\n// upstream had removed it, but now it will be coming back\n#ifndef BTRFS_BUILD_VERSION\n#define BTRFS_BUILD_VERSION \"-\"\n#endif\n*/\nimport \"C\"\n\nfunc btrfsBuildVersion() string {\n\treturn string(C.BTRFS_BUILD_VERSION)\n}\n\nfunc btrfsLibVersion() int {\n\treturn int(C.BTRFS_LIB_VERSION)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chown.go",
    "content": "package graphdriver\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\n\t\"github.com/opencontainers/selinux/pkg/pwalkdir\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\nconst (\n\tchownByMapsCmd = \"storage-chown-by-maps\"\n)\n\nfunc init() {\n\treexec.Register(chownByMapsCmd, chownByMapsMain)\n}\n\nfunc chownByMapsMain() {\n\tif len(os.Args) < 2 {\n\t\tfmt.Fprintf(os.Stderr, \"requires mapping configuration on stdin and directory path\")\n\t\tos.Exit(1)\n\t}\n\t// Read and decode our configuration.\n\tdiscreteMaps := [4][]idtools.IDMap{}\n\tconfig := bytes.Buffer{}\n\tif _, err := config.ReadFrom(os.Stdin); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"error reading configuration: %v\", err)\n\t\tos.Exit(1)\n\t}\n\tif err := json.Unmarshal(config.Bytes(), &discreteMaps); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"error decoding configuration: %v\", err)\n\t\tos.Exit(1)\n\t}\n\t// Try to chroot.  This may not be possible, and on some systems that\n\t// means we just Chdir() to the directory, so from here on we should be\n\t// using relative paths.\n\tif err := chrootOrChdir(os.Args[1]); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"error chrooting to %q: %v\", os.Args[1], err)\n\t\tos.Exit(1)\n\t}\n\t// Build the mapping objects.\n\ttoContainer := idtools.NewIDMappingsFromMaps(discreteMaps[0], discreteMaps[1])\n\tif len(toContainer.UIDs()) == 0 && len(toContainer.GIDs()) == 0 {\n\t\ttoContainer = nil\n\t}\n\ttoHost := idtools.NewIDMappingsFromMaps(discreteMaps[2], discreteMaps[3])\n\tif len(toHost.UIDs()) == 0 && len(toHost.GIDs()) == 0 {\n\t\ttoHost = nil\n\t}\n\n\tchowner := newLChowner()\n\n\tvar chown fs.WalkDirFunc = func(path string, d fs.DirEntry, _ error) error {\n\t\tinfo, err := d.Info()\n\t\tif path == \".\" || err != nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn chowner.LChown(path, info, toHost, toContainer)\n\t}\n\tif err := pwalkdir.Walk(\".\", chown); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"error during chown: %v\", err)\n\t\tos.Exit(1)\n\t}\n\tos.Exit(0)\n}\n\n// ChownPathByMaps walks the filesystem tree, changing the ownership\n// information using the toContainer and toHost mappings, using them to replace\n// on-disk owner UIDs and GIDs which are \"host\" values in the first map with\n// UIDs and GIDs for \"host\" values from the second map which correspond to the\n// same \"container\" IDs.\nfunc ChownPathByMaps(path string, toContainer, toHost *idtools.IDMappings) error {\n\tif toContainer == nil {\n\t\ttoContainer = &idtools.IDMappings{}\n\t}\n\tif toHost == nil {\n\t\ttoHost = &idtools.IDMappings{}\n\t}\n\n\tconfig, err := json.Marshal([4][]idtools.IDMap{toContainer.UIDs(), toContainer.GIDs(), toHost.UIDs(), toHost.GIDs()})\n\tif err != nil {\n\t\treturn err\n\t}\n\tcmd := reexec.Command(chownByMapsCmd, path)\n\tcmd.Stdin = bytes.NewReader(config)\n\toutput, err := cmd.CombinedOutput()\n\tif len(output) > 0 && err != nil {\n\t\treturn fmt.Errorf(\"%s: %w\", string(output), err)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(output) > 0 {\n\t\treturn errors.New(string(output))\n\t}\n\n\treturn nil\n}\n\ntype naiveLayerIDMapUpdater struct {\n\tProtoDriver\n}\n\n// NewNaiveLayerIDMapUpdater wraps the ProtoDriver in a LayerIDMapUpdater that\n// uses ChownPathByMaps to update the ownerships in a layer's filesystem tree.\nfunc NewNaiveLayerIDMapUpdater(driver ProtoDriver) LayerIDMapUpdater {\n\treturn &naiveLayerIDMapUpdater{ProtoDriver: driver}\n}\n\n// UpdateLayerIDMap walks the layer's filesystem tree, changing the ownership\n// information using the toContainer and toHost mappings, using them to replace\n// on-disk owner UIDs and GIDs which are \"host\" values in the first map with\n// UIDs and GIDs for \"host\" values from the second map which correspond to the\n// same \"container\" IDs.\nfunc (n *naiveLayerIDMapUpdater) UpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) (retErr error) {\n\tdriver := n.ProtoDriver\n\toptions := MountOpts{\n\t\tMountLabel: mountLabel,\n\t}\n\tlayerFs, err := driver.Get(id, options)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer driverPut(driver, id, &retErr)\n\n\treturn ChownPathByMaps(layerFs, toContainer, toHost)\n}\n\n// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs to the provided mapping in an userNS\nfunc (n *naiveLayerIDMapUpdater) SupportsShifting(uidmap, gidmap []idtools.IDMap) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chown_darwin.go",
    "content": "//go:build darwin\n\npackage graphdriver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\ntype inode struct {\n\tDev uint64\n\tIno uint64\n}\n\ntype platformChowner struct {\n\tmutex  sync.Mutex\n\tinodes map[inode]bool\n}\n\nfunc newLChowner() *platformChowner {\n\treturn &platformChowner{\n\t\tinodes: make(map[inode]bool),\n\t}\n}\n\nfunc (c *platformChowner) LChown(path string, info os.FileInfo, toHost, toContainer *idtools.IDMappings) error {\n\tst, ok := info.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\ti := inode{\n\t\tDev: uint64(st.Dev),\n\t\tIno: st.Ino,\n\t}\n\tc.mutex.Lock()\n\t_, found := c.inodes[i]\n\tif !found {\n\t\tc.inodes[i] = true\n\t}\n\tc.mutex.Unlock()\n\n\tif found {\n\t\treturn nil\n\t}\n\n\t// Map an on-disk UID/GID pair from host to container\n\t// using the first map, then back to the host using the\n\t// second map.  Skip that first step if they're 0, to\n\t// compensate for cases where a parent layer should\n\t// have had a mapped value, but didn't.\n\tuid, gid := int(st.Uid), int(st.Gid)\n\tif toContainer != nil {\n\t\tpair := idtools.IDPair{\n\t\t\tUID: uid,\n\t\t\tGID: gid,\n\t\t}\n\t\tmappedUID, mappedGID, err := toContainer.ToContainer(pair)\n\t\tif err != nil {\n\t\t\tif (uid != 0) || (gid != 0) {\n\t\t\t\treturn fmt.Errorf(\"mapping host ID pair %#v for %q to container: %w\", pair, path, err)\n\t\t\t}\n\t\t\tmappedUID, mappedGID = uid, gid\n\t\t}\n\t\tuid, gid = mappedUID, mappedGID\n\t}\n\tif toHost != nil {\n\t\tpair := idtools.IDPair{\n\t\t\tUID: uid,\n\t\t\tGID: gid,\n\t\t}\n\t\tmappedPair, err := toHost.ToHostOverflow(pair)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"mapping container ID pair %#v for %q to host: %w\", pair, path, err)\n\t\t}\n\t\tuid, gid = mappedPair.UID, mappedPair.GID\n\t}\n\tif uid != int(st.Uid) || gid != int(st.Gid) {\n\t\tcapability, err := system.Lgetxattr(path, \"security.capability\")\n\t\tif err != nil && !errors.Is(err, system.ENOTSUP) && err != system.ErrNotSupportedPlatform {\n\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t}\n\n\t\t// Make the change.\n\t\tif err := system.Lchown(path, uid, gid); err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t}\n\t\t// Restore the SUID and SGID bits if they were originally set.\n\t\tif (info.Mode()&os.ModeSymlink == 0) && info.Mode()&(os.ModeSetuid|os.ModeSetgid) != 0 {\n\t\t\tif err := system.Chmod(path, info.Mode()); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t\t}\n\t\t}\n\t\tif capability != nil {\n\t\t\tif err := system.Lsetxattr(path, \"security.capability\", capability, 0); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t\t}\n\t\t}\n\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chown_unix.go",
    "content": "//go:build !windows && !darwin\n\npackage graphdriver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\ntype inode struct {\n\tDev uint64\n\tIno uint64\n}\n\ntype platformChowner struct {\n\tmutex  sync.Mutex\n\tinodes map[inode]string\n}\n\nfunc newLChowner() *platformChowner {\n\treturn &platformChowner{\n\t\tinodes: make(map[inode]string),\n\t}\n}\n\nfunc (c *platformChowner) LChown(path string, info os.FileInfo, toHost, toContainer *idtools.IDMappings) error {\n\tst, ok := info.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\ti := inode{\n\t\tDev: uint64(st.Dev), //nolint:unconvert\n\t\tIno: st.Ino,\n\t}\n\n\tc.mutex.Lock()\n\n\toldTarget, found := c.inodes[i]\n\tif !found {\n\t\tc.inodes[i] = path\n\t}\n\n\t// If we are dealing with a file with multiple links then keep the lock until the file is\n\t// chowned to avoid a race where we link to the old version if the file is copied up.\n\tif found || st.Nlink > 1 {\n\t\tdefer c.mutex.Unlock()\n\t} else {\n\t\tc.mutex.Unlock()\n\t}\n\n\tif found {\n\t\t// If the dev/inode was already chowned then create a link to the old target instead\n\t\t// of chowning it again.  This is necessary when the underlying file system breaks\n\t\t// inodes on copy-up (as it is with overlay with index=off) to maintain the original\n\t\t// link and correct file ownership.\n\n\t\t// The target already exists so remove it before creating the link to the new target.\n\t\tif err := os.Remove(path); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn os.Link(oldTarget, path)\n\t}\n\n\t// Map an on-disk UID/GID pair from host to container\n\t// using the first map, then back to the host using the\n\t// second map.  Skip that first step if they're 0, to\n\t// compensate for cases where a parent layer should\n\t// have had a mapped value, but didn't.\n\tuid, gid := int(st.Uid), int(st.Gid)\n\tif toContainer != nil {\n\t\tpair := idtools.IDPair{\n\t\t\tUID: uid,\n\t\t\tGID: gid,\n\t\t}\n\t\tmappedUID, mappedGID, err := toContainer.ToContainer(pair)\n\t\tif err != nil {\n\t\t\tif (uid != 0) || (gid != 0) {\n\t\t\t\treturn fmt.Errorf(\"mapping host ID pair %#v for %q to container: %w\", pair, path, err)\n\t\t\t}\n\t\t\tmappedUID, mappedGID = uid, gid\n\t\t}\n\t\tuid, gid = mappedUID, mappedGID\n\t}\n\tif toHost != nil {\n\t\tpair := idtools.IDPair{\n\t\t\tUID: uid,\n\t\t\tGID: gid,\n\t\t}\n\t\tmappedPair, err := toHost.ToHostOverflow(pair)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"mapping container ID pair %#v for %q to host: %w\", pair, path, err)\n\t\t}\n\t\tuid, gid = mappedPair.UID, mappedPair.GID\n\t}\n\tif uid != int(st.Uid) || gid != int(st.Gid) {\n\t\tcap, err := system.Lgetxattr(path, \"security.capability\")\n\t\tif err != nil && !errors.Is(err, system.ENOTSUP) && !errors.Is(err, system.EOVERFLOW) && err != system.ErrNotSupportedPlatform {\n\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t}\n\n\t\t// Make the change.\n\t\tif err := system.Lchown(path, uid, gid); err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t}\n\t\t// Restore the SUID and SGID bits if they were originally set.\n\t\tif (info.Mode()&os.ModeSymlink == 0) && info.Mode()&(os.ModeSetuid|os.ModeSetgid) != 0 {\n\t\t\tif err := system.Chmod(path, info.Mode()); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t\t}\n\t\t}\n\t\tif cap != nil {\n\t\t\tif err := system.Lsetxattr(path, \"security.capability\", cap, 0); err != nil {\n\t\t\t\treturn fmt.Errorf(\"%s: %w\", os.Args[0], err)\n\t\t\t}\n\t\t}\n\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chown_windows.go",
    "content": "//go:build windows\n\npackage graphdriver\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\ntype platformChowner struct{}\n\nfunc newLChowner() *platformChowner {\n\treturn &platformChowner{}\n}\n\nfunc (c *platformChowner) LChown(path string, info os.FileInfo, toHost, toContainer *idtools.IDMappings) error {\n\treturn &os.PathError{Op: \"lchown\", Path: path, Err: syscall.EWINDOWS}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chroot_unix.go",
    "content": "//go:build !windows\n\npackage graphdriver\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"syscall\"\n)\n\n// chrootOrChdir() is either a chdir() to the specified path, or a chroot() to the\n// specified path followed by chdir() to the new root directory\nfunc chrootOrChdir(path string) error {\n\tif err := syscall.Chroot(path); err != nil {\n\t\treturn fmt.Errorf(\"chrooting to %q: %w\", path, err)\n\t}\n\tif err := syscall.Chdir(string(os.PathSeparator)); err != nil {\n\t\treturn fmt.Errorf(\"changing to %q: %w\", path, err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/chroot_windows.go",
    "content": "package graphdriver\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n)\n\n// chrootOrChdir() is either a chdir() to the specified path, or a chroot() to the\n// specified path followed by chdir() to the new root directory\nfunc chrootOrChdir(path string) error {\n\tif err := syscall.Chdir(path); err != nil {\n\t\treturn fmt.Errorf(\"changing to %q: %w\", path, err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/copy/copy_linux.go",
    "content": "//go:build cgo\n\npackage copy\n\n/*\n#include <linux/fs.h>\n\n#ifndef FICLONE\n#define FICLONE\t\t_IOW(0x94, 9, int)\n#endif\n*/\nimport \"C\"\n\nimport (\n\t\"container/list\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/pools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/unshare\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// Mode indicates whether to use hardlink or copy content\ntype Mode int\n\nconst (\n\t// Content creates a new file, and copies the content of the file\n\tContent Mode = iota\n\t// Hardlink creates a new hardlink to the existing file\n\tHardlink\n)\n\n// CopyRegularToFile copies the content of a file to another\nfunc CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint: revive\n\tsrcFile, err := os.Open(srcPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer srcFile.Close()\n\n\tif *copyWithFileClone {\n\t\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, dstFile.Fd(), C.FICLONE, srcFile.Fd())\n\t\tif errno == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\t*copyWithFileClone = false\n\t\tif errno == unix.EXDEV {\n\t\t\t*copyWithFileRange = false\n\t\t}\n\t}\n\tif *copyWithFileRange {\n\t\terr = doCopyWithFileRange(srcFile, dstFile, fileinfo)\n\t\t// Trying the file_clone may not have caught the exdev case\n\t\t// as the ioctl may not have been available (therefore EINVAL)\n\t\tif err == unix.EXDEV || err == unix.ENOSYS {\n\t\t\t*copyWithFileRange = false\n\t\t} else {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn legacyCopy(srcFile, dstFile)\n}\n\n// CopyRegular copies the content of a file to another\nfunc CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint: revive\n\t// If the destination file already exists, we shouldn't blow it away\n\tdstFile, err := os.OpenFile(dstPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, fileinfo.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer dstFile.Close()\n\n\treturn CopyRegularToFile(srcPath, dstFile, fileinfo, copyWithFileRange, copyWithFileClone)\n}\n\nfunc doCopyWithFileRange(srcFile, dstFile *os.File, fileinfo os.FileInfo) error {\n\tamountLeftToCopy := fileinfo.Size()\n\n\tfor amountLeftToCopy > 0 {\n\t\tn, err := unix.CopyFileRange(int(srcFile.Fd()), nil, int(dstFile.Fd()), nil, int(amountLeftToCopy), 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tamountLeftToCopy = amountLeftToCopy - int64(n)\n\t}\n\n\treturn nil\n}\n\nfunc legacyCopy(srcFile io.Reader, dstFile io.Writer) error {\n\t_, err := pools.Copy(dstFile, srcFile)\n\n\treturn err\n}\n\nfunc copyXattr(srcPath, dstPath, attr string) error {\n\tdata, err := system.Lgetxattr(srcPath, attr)\n\tif err != nil && !errors.Is(err, system.ENOTSUP) {\n\t\treturn err\n\t}\n\tif data != nil {\n\t\tif err := system.Lsetxattr(dstPath, attr, data, 0); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\ntype fileID struct {\n\tdev uint64\n\tino uint64\n}\n\ntype dirMtimeInfo struct {\n\tdstPath *string\n\tstat    *syscall.Stat_t\n}\n\n// DirCopy copies or hardlinks the contents of one directory to another,\n// properly handling xattrs, and soft links\n//\n// Copying xattrs can be opted out of by passing false for copyXattrs.\nfunc DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error {\n\tcopyWithFileRange := true\n\tcopyWithFileClone := true\n\n\t// This is a map of source file inodes to dst file paths\n\tcopiedFiles := make(map[fileID]string)\n\n\tdirsToSetMtimes := list.New()\n\terr := filepath.Walk(srcDir, func(srcPath string, f os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Rebase path\n\t\trelPath, err := filepath.Rel(srcDir, srcPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tdstPath := filepath.Join(dstDir, relPath)\n\t\tstat, ok := f.Sys().(*syscall.Stat_t)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"unable to get raw syscall.Stat_t data for %s\", srcPath)\n\t\t}\n\n\t\tisHardlink := false\n\n\t\tswitch mode := f.Mode(); {\n\t\tcase mode.IsRegular():\n\t\t\tid := fileID{\n\t\t\t\tdev: uint64(stat.Dev), //nolint:unconvert\n\t\t\t\tino: stat.Ino,\n\t\t\t}\n\t\t\tif copyMode == Hardlink {\n\t\t\t\tisHardlink = true\n\t\t\t\tif err2 := os.Link(srcPath, dstPath); err2 != nil {\n\t\t\t\t\treturn err2\n\t\t\t\t}\n\t\t\t} else if hardLinkDstPath, ok := copiedFiles[id]; ok {\n\t\t\t\tif err2 := os.Link(hardLinkDstPath, dstPath); err2 != nil {\n\t\t\t\t\treturn err2\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif err2 := CopyRegular(srcPath, dstPath, f, &copyWithFileRange, &copyWithFileClone); err2 != nil {\n\t\t\t\t\treturn err2\n\t\t\t\t}\n\t\t\t\tcopiedFiles[id] = dstPath\n\t\t\t}\n\n\t\tcase mode.IsDir():\n\t\t\tif err := os.Mkdir(dstPath, f.Mode()); err != nil && !os.IsExist(err) {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase mode&os.ModeSymlink != 0:\n\t\t\tlink, err := os.Readlink(srcPath)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err := os.Symlink(link, dstPath); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase mode&os.ModeNamedPipe != 0:\n\t\t\tif err := unix.Mkfifo(dstPath, stat.Mode); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase mode&os.ModeSocket != 0:\n\t\t\tif err := unix.Mknod(dstPath, stat.Mode, int(stat.Rdev)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase mode&os.ModeDevice != 0:\n\t\t\tif unshare.IsRootless() {\n\t\t\t\t// cannot create a device if running in user namespace\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif err := unix.Mknod(dstPath, stat.Mode, int(stat.Rdev)); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unknown file type with mode %v for %s\", mode, srcPath)\n\t\t}\n\n\t\t// Everything below is copying metadata from src to dst. All this metadata\n\t\t// already shares an inode for hardlinks.\n\t\tif isHardlink {\n\t\t\treturn nil\n\t\t}\n\n\t\tif err := idtools.SafeLchown(dstPath, int(stat.Uid), int(stat.Gid)); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif copyXattrs {\n\t\t\tif err := doCopyXattrs(srcPath, dstPath); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tisSymlink := f.Mode()&os.ModeSymlink != 0\n\n\t\t// There is no LChmod, so ignore mode for symlink. Also, this\n\t\t// must happen after chown, as that can modify the file mode\n\t\tif !isSymlink {\n\t\t\tif err := os.Chmod(dstPath, f.Mode()); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\t// system.Chtimes doesn't support a NOFOLLOW flag atm\n\t\tif f.IsDir() {\n\t\t\tdirsToSetMtimes.PushFront(&dirMtimeInfo{dstPath: &dstPath, stat: stat})\n\t\t} else if !isSymlink {\n\t\t\taTime := time.Unix(stat.Atim.Unix())\n\t\t\tmTime := time.Unix(stat.Mtim.Unix())\n\t\t\tif err := system.Chtimes(dstPath, aTime, mTime); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tts := []syscall.Timespec{stat.Atim, stat.Mtim}\n\t\t\tif err := system.LUtimesNano(dstPath, ts); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor e := dirsToSetMtimes.Front(); e != nil; e = e.Next() {\n\t\tmtimeInfo := e.Value.(*dirMtimeInfo)\n\t\tts := []syscall.Timespec{mtimeInfo.stat.Atim, mtimeInfo.stat.Mtim}\n\t\tif err := system.LUtimesNano(*mtimeInfo.dstPath, ts); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc doCopyXattrs(srcPath, dstPath string) error {\n\tif err := copyXattr(srcPath, dstPath, \"security.capability\"); err != nil {\n\t\treturn err\n\t}\n\n\txattrs, err := system.Llistxattr(srcPath)\n\tif err != nil && !errors.Is(err, system.ENOTSUP) {\n\t\treturn err\n\t}\n\n\tfor _, key := range xattrs {\n\t\tif strings.HasPrefix(key, \"user.\") {\n\t\t\tif err := copyXattr(srcPath, dstPath, key); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif unshare.IsRootless() {\n\t\treturn nil\n\t}\n\n\t// We need to copy this attribute if it appears in an overlay upper layer, as\n\t// this function is used to copy those. It is set by overlay if a directory\n\t// is removed and then re-created and should not inherit anything from the\n\t// same dir in the lower dir.\n\treturn copyXattr(srcPath, dstPath, \"trusted.overlay.opaque\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/copy/copy_unsupported.go",
    "content": "//go:build !linux || !cgo\n\npackage copy //nolint: predeclared\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"go.podman.io/storage/pkg/chrootarchive\"\n)\n\n// Mode indicates whether to use hardlink or copy content\ntype Mode int\n\nconst (\n\t// Content creates a new file, and copies the content of the file\n\tContent Mode = iota\n)\n\n// DirCopy copies or hardlinks the contents of one directory to another,\n// properly handling soft links\nfunc DirCopy(srcDir, dstDir string, _ Mode, _ bool) error {\n\treturn chrootarchive.NewArchiver(nil).CopyWithTar(srcDir, dstDir)\n}\n\n// CopyRegularToFile copies the content of a file to another\nfunc CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint: revive // \"func name will be used as copy.CopyRegularToFile by other packages, and that stutters\"\n\tf, err := os.Open(srcPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\t_, err = io.Copy(dstFile, f)\n\treturn err\n}\n\n// CopyRegular copies the content of a file to another\nfunc CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint:revive // \"func name will be used as copy.CopyRegular by other packages, and that stutters\"\n\treturn chrootarchive.NewArchiver(nil).CopyWithTar(srcPath, dstPath)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/counter.go",
    "content": "package graphdriver\n\nimport \"sync\"\n\ntype minfo struct {\n\tcheck bool\n\tcount int\n}\n\n// RefCounter is a generic counter for use by graphdriver Get/Put calls\ntype RefCounter struct {\n\tcounts  map[string]*minfo\n\tmu      sync.Mutex\n\tchecker Checker\n}\n\n// NewRefCounter returns a new RefCounter\nfunc NewRefCounter(c Checker) *RefCounter {\n\treturn &RefCounter{\n\t\tchecker: c,\n\t\tcounts:  make(map[string]*minfo),\n\t}\n}\n\n// Increment increases the ref count for the given id and returns the current count\nfunc (c *RefCounter) Increment(path string) int {\n\treturn c.incdec(path, func(minfo *minfo) {\n\t\tminfo.count++\n\t})\n}\n\n// Decrement decreases the ref count for the given id and returns the current count\nfunc (c *RefCounter) Decrement(path string) int {\n\treturn c.incdec(path, func(minfo *minfo) {\n\t\tminfo.count--\n\t})\n}\n\nfunc (c *RefCounter) incdec(path string, infoOp func(minfo *minfo)) int {\n\tc.mu.Lock()\n\tm := c.counts[path]\n\tif m == nil {\n\t\tm = &minfo{}\n\t\tc.counts[path] = m\n\t}\n\t// if we are checking this path for the first time check to make sure\n\t// if it was already mounted on the system and make sure we have a correct ref\n\t// count if it is mounted as it is in use.\n\tif !m.check {\n\t\tm.check = true\n\t\tif c.checker.IsMounted(path) {\n\t\t\tm.count++\n\t\t}\n\t} else if !c.checker.IsMounted(path) {\n\t\t// if the unmount was performed outside of this process (e.g. conmon cleanup)\n\t\t// the ref counter would lose track of it.  Check if it is still mounted.\n\t\tm.count = 0\n\t}\n\tinfoOp(m)\n\tcount := m.count\n\tif count <= 0 {\n\t\t// If the mounted path has been decremented enough have no references,\n\t\t// then its entry can be removed.\n\t\tdelete(c.counts, path)\n\t}\n\tc.mu.Unlock()\n\treturn count\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver.go",
    "content": "package graphdriver\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n\t\"go.podman.io/storage/internal/dedup\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\n// FsMagic unsigned id of the filesystem in use.\ntype FsMagic uint32\n\nconst (\n\t// FsMagicUnsupported is a predefined constant value other than a valid filesystem id.\n\tFsMagicUnsupported = FsMagic(0x00000000)\n)\n\nvar (\n\t// All registered drivers\n\tdrivers map[string]InitFunc\n\n\t// ErrNotSupported returned when driver is not supported.\n\tErrNotSupported = errors.New(\"driver not supported\")\n\t// ErrPrerequisites returned when driver does not meet prerequisites.\n\tErrPrerequisites = errors.New(\"prerequisites for driver not satisfied (wrong filesystem?)\")\n\t// ErrIncompatibleFS returned when file system is not supported.\n\tErrIncompatibleFS = errors.New(\"backing file system is unsupported for this graph driver\")\n\t// ErrLayerUnknown returned when the specified layer is unknown by the driver.\n\tErrLayerUnknown = errors.New(\"unknown layer\")\n)\n\n// CreateOpts contains optional arguments for Create() and CreateReadWrite()\n// methods.\ntype CreateOpts struct {\n\tMountLabel string\n\tStorageOpt map[string]string\n\t*idtools.IDMappings\n}\n\n// MountOpts contains optional arguments for Driver.Get() methods.\ntype MountOpts struct {\n\t// Mount label is the MAC Labels to assign to mount point (SELINUX)\n\tMountLabel string\n\t// UidMaps & GidMaps are the User Namespace mappings to be assigned to content in the mount point\n\tUidMaps []idtools.IDMap //nolint: revive\n\tGidMaps []idtools.IDMap //nolint: revive\n\tOptions []string\n\n\t// Volatile specifies whether the container storage can be optimized\n\t// at the cost of not syncing all the dirty files in memory.\n\tVolatile bool\n\n\t// DisableShifting forces the driver to not do any ID shifting at runtime.\n\tDisableShifting bool\n}\n\n// ApplyDiffOpts contains optional arguments for ApplyDiff methods.\ntype ApplyDiffOpts struct {\n\tDiff              io.Reader\n\tMappings          *idtools.IDMappings\n\tMountLabel        string\n\tIgnoreChownErrors bool\n\tForceMask         *os.FileMode\n}\n\n// ApplyDiffWithDifferOpts contains optional arguments for ApplyDiffWithDiffer methods.\ntype ApplyDiffWithDifferOpts struct {\n\tApplyDiffOpts\n\n\tFlags map[string]any\n}\n\n// DedupArgs contains the information to perform storage deduplication.\ntype DedupArgs struct {\n\t// Layers is the list of layers to deduplicate.\n\tLayers []string\n\n\t// Options that are passed directly to the pkg/dedup.DedupDirs function.\n\tOptions dedup.DedupOptions\n}\n\n// DedupResult contains the result of the Dedup() call.\ntype DedupResult struct {\n\t// Deduped represents the total number of bytes saved by deduplication.\n\t// This value accounts also for all previously deduplicated data, not only the savings\n\t// from the last run.\n\tDeduped uint64\n}\n\n// InitFunc initializes the storage driver.\ntype InitFunc func(homedir string, options Options) (Driver, error)\n\n// ProtoDriver defines the basic capabilities of a driver.\n// This interface exists solely to be a minimum set of methods\n// for client code which choose not to implement the entire Driver\n// interface and use the NaiveDiffDriver wrapper constructor.\n//\n// Use of ProtoDriver directly by client code is not recommended.\ntype ProtoDriver interface {\n\t// String returns a string representation of this driver.\n\tString() string\n\t// CreateReadWrite creates a new, empty filesystem layer that is ready\n\t// to be used as the storage for a container. Additional options can\n\t// be passed in opts. parent may be \"\" and opts may be nil.\n\tCreateReadWrite(id, parent string, opts *CreateOpts) error\n\t// Create creates a new, empty, filesystem layer with the\n\t// specified id and parent and options passed in opts. Parent\n\t// may be \"\" and opts may be nil.\n\tCreate(id, parent string, opts *CreateOpts) error\n\t// CreateFromTemplate creates a new filesystem layer with the specified id\n\t// and parent, with contents identical to the specified template layer.\n\tCreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *CreateOpts, readWrite bool) error\n\t// Remove attempts to remove the filesystem layer with this id.\n\t// This is soft-deprecated and should not get any new callers; use DeferredRemove.\n\tRemove(id string) error\n\t// DeferredRemove is used to remove the filesystem layer with this id.\n\t// This removal happen immediately (the layer is no longer usable),\n\t// but physically deleting the files may be deferred.\n\t// Caller MUST call returned Cleanup function EVEN IF the function returns an error.\n\tDeferredRemove(id string) (tempdir.CleanupTempDirFunc, error)\n\t// GetTempDirRootDirs returns the root directories for temporary directories.\n\t// Multiple directories may be returned when drivers support different filesystems\n\t// for layers (e.g., overlay with imageStore vs home directory).\n\tGetTempDirRootDirs() []string\n\t// Get returns the mountpoint for the layered filesystem referred\n\t// to by this id. You can optionally specify a mountLabel or \"\".\n\t// Optionally it gets the mappings used to create the layer.\n\t// Returns the absolute path to the mounted layered filesystem.\n\tGet(id string, options MountOpts) (dir string, err error)\n\t// Put releases the system resources for the specified id,\n\t// e.g, unmounting layered filesystem.\n\tPut(id string) error\n\t// Exists returns whether a filesystem layer with the specified\n\t// ID exists on this driver.\n\tExists(id string) bool\n\t// Returns a list of layer ids that exist on this driver (does not include\n\t// additional storage layers). Not supported by all backends.\n\t// If the driver requires that layers be removed in a particular order,\n\t// usually due to parent-child relationships that it cares about, The\n\t// list should be sorted well enough so that if all layers need to be\n\t// removed, they can be removed in the order in which they're returned.\n\tListLayers() ([]string, error)\n\t// Status returns a set of key-value pairs which give low\n\t// level diagnostic status about this driver.\n\tStatus() [][2]string\n\t// Returns a set of key-value pairs which give low level information\n\t// about the image/container driver is managing.\n\tMetadata(id string) (map[string]string, error)\n\t// ReadWriteDiskUsage returns the disk usage of the writable directory for the specified ID.\n\tReadWriteDiskUsage(id string) (*directory.DiskUsage, error)\n\t// Cleanup performs necessary tasks to release resources\n\t// held by the driver, e.g., unmounting all layered filesystems\n\t// known to this driver.\n\tCleanup() error\n\t// AdditionalImageStores returns additional image stores supported by the driver\n\t// This API is experimental and can be changed without bumping the major version number.\n\tAdditionalImageStores() []string\n\t// Dedup performs deduplication of the driver's storage.\n\tDedup(DedupArgs) (DedupResult, error)\n}\n\n// DiffDriver is the interface to use to implement graph diffs\ntype DiffDriver interface {\n\t// Diff produces an archive of the changes between the specified\n\t// layer and its parent layer which may be \"\".\n\tDiff(id string, idMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, mountLabel string) (io.ReadCloser, error)\n\t// Changes produces a list of changes between the specified layer\n\t// and its parent layer. If parent is \"\", then all changes will be ADD changes.\n\tChanges(id string, idMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, mountLabel string) ([]archive.Change, error)\n\t// ApplyDiff extracts the changeset from the given diff into the\n\t// layer with the specified id and parent, returning the size of the\n\t// new layer in bytes.\n\t// The io.Reader must be an uncompressed stream.\n\tApplyDiff(id string, options ApplyDiffOpts) (size int64, err error)\n\t// DiffSize calculates the changes between the specified id\n\t// and its parent and returns the size in bytes of the changes\n\t// relative to its base filesystem directory.\n\tDiffSize(id string, idMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, mountLabel string) (size int64, err error)\n}\n\n// LayerIDMapUpdater is the interface that implements ID map changes for layers.\ntype LayerIDMapUpdater interface {\n\t// UpdateLayerIDMap walks the layer's filesystem tree, changing the ownership\n\t// information using the toContainer and toHost mappings, using them to replace\n\t// on-disk owner UIDs and GIDs which are \"host\" values in the first map with\n\t// UIDs and GIDs for \"host\" values from the second map which correspond to the\n\t// same \"container\" IDs.  This method should only be called after a layer is\n\t// first created and populated, and before it is mounted, as other changes made\n\t// relative to a parent layer, but before this method is called, may be discarded\n\t// by Diff().\n\tUpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) error\n\n\t// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs in a\n\t// image to the provided mapping and it is not required to Chown the files when running in\n\t// an user namespace.\n\tSupportsShifting(uidmap, gidmap []idtools.IDMap) bool\n}\n\n// Driver is the interface for layered/snapshot file system drivers.\ntype Driver interface {\n\tProtoDriver\n\tDiffDriver\n\tLayerIDMapUpdater\n}\n\n// DriverWithDifferOutput is the result of ApplyDiffWithDiffer\n// This API is experimental and can be changed without bumping the major version number.\ntype DriverWithDifferOutput struct {\n\tDiffer             Differ\n\tTarget             string\n\tSize               int64 // Size of the uncompressed layer, -1 if unknown. Must be known if UncompressedDigest is set.\n\tUIDs               []uint32\n\tGIDs               []uint32\n\tUncompressedDigest digest.Digest\n\tCompressedDigest   digest.Digest\n\tMetadata           string\n\tBigData            map[string][]byte\n\t// TarSplit is owned by the [DriverWithDifferOutput], and must be closed by calling one of\n\t// [Store.ApplyStagedLayer]/[Store.CleanupStagedLayer].  It is nil if not available.\n\tTarSplit  *os.File\n\tTOCDigest digest.Digest\n\t// RootDirMode is the mode of the root directory of the layer, if specified.\n\tRootDirMode *os.FileMode\n\t// Artifacts is a collection of additional artifacts\n\t// generated by the differ that the storage driver can use.\n\tArtifacts map[string]any\n}\n\ntype DifferOutputFormat int\n\nconst (\n\t// DifferOutputFormatDir means the output is a directory and it will\n\t// keep the original layout.\n\tDifferOutputFormatDir = iota\n\t// DifferOutputFormatFlat will store the files by their checksum, per\n\t// pkg/chunked/internal/composefs.RegularFilePathForValidatedDigest.\n\tDifferOutputFormatFlat\n)\n\n// DifferFsVerity is a part of the experimental Differ interface and should not be used from outside of c/storage.\n// It configures the fsverity requirement.\ntype DifferFsVerity int\n\nconst (\n\t// DifferFsVerityDisabled means no fs-verity is used\n\tDifferFsVerityDisabled = iota\n\n\t// DifferFsVerityIfAvailable means fs-verity is used when supported by\n\t// the underlying kernel and filesystem.\n\tDifferFsVerityIfAvailable\n\n\t// DifferFsVerityRequired means fs-verity is required.  Note this is not\n\t// currently set or exposed by the overlay driver.\n\tDifferFsVerityRequired\n)\n\n// DifferOptions is a part of the experimental Differ interface and should not be used from outside of c/storage.\n// It overrides how the differ works.\ntype DifferOptions struct {\n\t// Format defines the destination directory layout format\n\tFormat DifferOutputFormat\n\n\t// UseFsVerity defines whether fs-verity is used\n\tUseFsVerity DifferFsVerity\n}\n\n// Differ defines the interface for using a custom differ.\n// This API is experimental and can be changed without bumping the major version number.\ntype Differ interface {\n\tApplyDiff(dest string, options *archive.TarOptions, differOpts *DifferOptions) (DriverWithDifferOutput, error)\n\tClose() error\n}\n\n// DriverWithDiffer is the interface for direct diff access.\n// This API is experimental and can be changed without bumping the major version number.\ntype DriverWithDiffer interface {\n\tDriver\n\t// ApplyDiffWithDiffer applies the changes using the callback function.\n\t// The staging directory created by this function is guaranteed to be usable with ApplyDiffFromStagingDirectory.\n\tApplyDiffWithDiffer(options *ApplyDiffWithDifferOpts, differ Differ) (output DriverWithDifferOutput, err error)\n\t// ApplyDiffFromStagingDirectory applies the changes using the diffOutput target directory.\n\tApplyDiffFromStagingDirectory(id, parent string, diffOutput *DriverWithDifferOutput, options *ApplyDiffWithDifferOpts) error\n\t// CleanupStagingDirectory cleanups the staging directory.  It can be used to cleanup the staging directory on errors\n\tCleanupStagingDirectory(stagingDirectory string) error\n\t// DifferTarget gets the location where files are stored for the layer.\n\tDifferTarget(id string) (string, error)\n}\n\n// ApplyDiffStaging is an interface for driver who can apply the diff without holding the main storage lock.\n// This API is experimental and can be changed without bumping the major version number.\ntype ApplyDiffStaging interface {\n\t// StartStagingDiffToApply applies the new layer into a temporary directory.\n\t// It returns a CleanupTempDirFunc which can be nil or set regardless if the function return an error or not.\n\t// StagedAddition is only set when there is no error returned and the int64 value returns the size of the layer.\n\t// This can be done without holding the storage lock, if a parent is given the caller must check for existence\n\t// beforehand while holding a lock.\n\tStartStagingDiffToApply(parent string, options ApplyDiffOpts) (tempdir.CleanupTempDirFunc, *tempdir.StagedAddition, int64, error)\n\t// CommitStagedLayer commits the staged layer from StartStagingDiffToApply(). This must be done while holding the storage lock.\n\tCommitStagedLayer(id string, commit *tempdir.StagedAddition) error\n}\n\n// Capabilities defines a list of capabilities a driver may implement.\n// These capabilities are not required; however, they do determine how a\n// graphdriver can be used.\ntype Capabilities struct {\n\t// Flags that this driver is capable of reproducing exactly equivalent\n\t// diffs for read-only layers. If set, clients can rely on the driver\n\t// for consistent tar streams, and avoid extra processing to account\n\t// for potential differences (eg: the layer store's use of tar-split).\n\tReproducesExactDiffs bool\n}\n\n// CapabilityDriver is the interface for layered file system drivers that\n// can report on their Capabilities.\ntype CapabilityDriver interface {\n\tCapabilities() Capabilities\n}\n\n// AdditionalLayer represents a layer that is stored in the additional layer store\n// This API is experimental and can be changed without bumping the major version number.\ntype AdditionalLayer interface {\n\t// CreateAs creates a new layer from this additional layer\n\tCreateAs(id, parent string) error\n\n\t// Info returns arbitrary information stored along with this layer (i.e. `info` file)\n\tInfo() (io.ReadCloser, error)\n\n\t// Blob returns a reader of the raw contents of this layer.\n\tBlob() (io.ReadCloser, error)\n\n\t// Release tells the additional layer store that we don't use this handler.\n\tRelease()\n}\n\n// AdditionalLayerStoreDriver is the interface for driver that supports\n// additional layer store functionality.\n// This API is experimental and can be changed without bumping the major version number.\ntype AdditionalLayerStoreDriver interface {\n\tDriver\n\n\t// LookupAdditionalLayer looks up additional layer store by the specified\n\t// TOC digest and ref and returns an object representing that layer.\n\tLookupAdditionalLayer(tocDigest digest.Digest, ref string) (AdditionalLayer, error)\n\n\t// LookupAdditionalLayer looks up additional layer store by the specified\n\t// ID and returns an object representing that layer.\n\tLookupAdditionalLayerByID(id string) (AdditionalLayer, error)\n}\n\n// DiffGetterDriver is the interface for layered file system drivers that\n// provide a specialized function for getting file contents for tar-split.\ntype DiffGetterDriver interface {\n\tDriver\n\t// DiffGetter returns an interface to efficiently retrieve the contents\n\t// of files in a layer.\n\tDiffGetter(id string) (FileGetCloser, error)\n}\n\n// FileGetCloser extends the storage.FileGetter interface with a Close method\n// for cleaning up.\ntype FileGetCloser interface {\n\tstorage.FileGetter\n\t// Close cleans up any resources associated with the FileGetCloser.\n\tClose() error\n}\n\n// Checker makes checks on specified filesystems.\ntype Checker interface {\n\t// IsMounted returns true if the provided path is mounted for the specific checker\n\tIsMounted(path string) bool\n}\n\nfunc init() {\n\tdrivers = make(map[string]InitFunc)\n}\n\n// MustRegister registers an InitFunc for the driver, or panics.\n// It is suitable for package’s init() sections.\nfunc MustRegister(name string, initFunc InitFunc) {\n\tif err := Register(name, initFunc); err != nil {\n\t\tpanic(fmt.Sprintf(\"failed to register containers/storage graph driver %q: %v\", name, err))\n\t}\n}\n\n// Register registers an InitFunc for the driver.\nfunc Register(name string, initFunc InitFunc) error {\n\tif _, exists := drivers[name]; exists {\n\t\treturn fmt.Errorf(\"name already registered %s\", name)\n\t}\n\tdrivers[name] = initFunc\n\n\treturn nil\n}\n\n// GetDriver initializes and returns the registered driver\nfunc GetDriver(name string, config Options) (Driver, error) {\n\tif initFunc, exists := drivers[name]; exists {\n\t\treturn initFunc(filepath.Join(config.Root, name), config)\n\t}\n\n\tlogrus.Errorf(\"Failed to GetDriver graph %s %s\", name, config.Root)\n\treturn nil, fmt.Errorf(\"failed to GetDriver graph %s %s: %w\", name, config.Root, ErrNotSupported)\n}\n\n// getBuiltinDriver initializes and returns the registered driver, but does not try to load from plugins\nfunc getBuiltinDriver(name, home string, options Options) (Driver, error) {\n\tif initFunc, exists := drivers[name]; exists {\n\t\treturn initFunc(filepath.Join(home, name), options)\n\t}\n\tlogrus.Errorf(\"Failed to built-in GetDriver graph %s %s\", name, home)\n\treturn nil, fmt.Errorf(\"failed to built-in GetDriver graph %s %s: %w\", name, home, ErrNotSupported)\n}\n\n// Options is used to initialize a graphdriver\ntype Options struct {\n\tRoot                string\n\tRunRoot             string\n\tImageStore          string\n\tDriverPriority      []string\n\tDriverOptions       []string\n\tExperimentalEnabled bool\n}\n\n// New creates the driver and initializes it at the specified root.\nfunc New(name string, config Options) (Driver, error) {\n\tif name != \"\" {\n\t\tlogrus.Debugf(\"[graphdriver] trying provided driver %q\", name) // so the logs show specified driver\n\t\treturn GetDriver(name, config)\n\t}\n\n\t// Guess for prior driver\n\tdriversMap := ScanPriorDrivers(config.Root)\n\n\t// use the supplied priority list unless it is empty\n\tprioList := config.DriverPriority\n\tif len(prioList) == 0 {\n\t\tprioList = Priority\n\t}\n\n\tfor _, name := range prioList {\n\t\tif name == \"vfs\" && len(config.DriverPriority) == 0 {\n\t\t\t// don't use vfs even if there is state present and vfs\n\t\t\t// has not been explicitly added to the override driver\n\t\t\t// priority list\n\t\t\tcontinue\n\t\t}\n\t\tif _, prior := driversMap[name]; prior {\n\t\t\t// of the state found from prior drivers, check in order of our priority\n\t\t\t// which we would prefer\n\t\t\tdriver, err := getBuiltinDriver(name, config.Root, config)\n\t\t\tif err != nil {\n\t\t\t\t// unlike below, we will return error here, because there is prior\n\t\t\t\t// state, and now it is no longer supported/prereq/compatible, so\n\t\t\t\t// something changed and needs attention. Otherwise the daemon's\n\t\t\t\t// images would just \"disappear\".\n\t\t\t\tlogrus.Errorf(\"[graphdriver] prior storage driver %s failed: %s\", name, err)\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// abort starting when there are other prior configured drivers\n\t\t\t// to ensure the user explicitly selects the driver to load\n\t\t\tif len(driversMap)-1 > 0 {\n\t\t\t\tvar driversSlice []string\n\t\t\t\tfor name := range driversMap {\n\t\t\t\t\tdriversSlice = append(driversSlice, name)\n\t\t\t\t}\n\n\t\t\t\treturn nil, fmt.Errorf(\"%s contains several valid graphdrivers: %s; Please cleanup or explicitly choose storage driver (-s <DRIVER>)\", config.Root, strings.Join(driversSlice, \", \"))\n\t\t\t}\n\n\t\t\tlogrus.Infof(\"[graphdriver] using prior storage driver: %s\", name)\n\t\t\treturn driver, nil\n\t\t}\n\t}\n\n\t// Check for priority drivers first\n\tfor _, name := range prioList {\n\t\tdriver, err := getBuiltinDriver(name, config.Root, config)\n\t\tif err != nil {\n\t\t\tif isDriverNotSupported(err) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\treturn driver, nil\n\t}\n\n\t// Check all registered drivers if no priority driver is found\n\tfor name, initFunc := range drivers {\n\t\tdriver, err := initFunc(filepath.Join(config.Root, name), config)\n\t\tif err != nil {\n\t\t\tif isDriverNotSupported(err) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\treturn driver, nil\n\t}\n\treturn nil, fmt.Errorf(\"no supported storage backend found\")\n}\n\n// isDriverNotSupported returns true if the error initializing\n// the graph driver is a non-supported error.\nfunc isDriverNotSupported(err error) bool {\n\treturn errors.Is(err, ErrNotSupported) || errors.Is(err, ErrPrerequisites) || errors.Is(err, ErrIncompatibleFS)\n}\n\n// scanPriorDrivers returns an un-ordered scan of directories of prior storage drivers\nfunc ScanPriorDrivers(root string) map[string]bool {\n\tdriversMap := make(map[string]bool)\n\n\tfor driver := range drivers {\n\t\tp := filepath.Join(root, driver)\n\t\tif err := fileutils.Exists(p); err == nil {\n\t\t\tdriversMap[driver] = true\n\t\t}\n\t}\n\treturn driversMap\n}\n\n// driverPut is driver.Put, but errors are handled either by updating mainErr or just logging.\n// Typical usage:\n//\n//\tfunc …(…) (err error) {\n//\t\t…\n//\t\tdefer driverPut(driver, id, &err)\n//\t}\nfunc driverPut(driver ProtoDriver, id string, mainErr *error) {\n\tif err := driver.Put(id); err != nil {\n\t\terr = fmt.Errorf(\"unmounting layer %s: %w\", id, err)\n\t\tif *mainErr == nil {\n\t\t\t*mainErr = err\n\t\t} else {\n\t\t\tlogrus.Error(err)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver_darwin.go",
    "content": "package graphdriver\n\n// Slice of drivers that should be used in order\nvar Priority = []string{\n\t\"vfs\",\n}\n\n// GetFSMagic returns the filesystem id given the path.\nfunc GetFSMagic(rootpath string) (FsMagic, error) {\n\t// Note it is OK to return FsMagicUnsupported on Windows.\n\treturn FsMagicUnsupported, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver_freebsd.go",
    "content": "package graphdriver\n\nimport (\n\t\"golang.org/x/sys/unix\"\n\n\t\"go.podman.io/storage/pkg/mount\"\n)\n\nconst (\n\t// FsMagicZfs filesystem id for Zfs\n\tFsMagicZfs = FsMagic(0x2fc12fc1)\n)\n\nvar (\n\t// Slice of drivers that should be used in an order\n\tPriority = []string{\n\t\t\"zfs\",\n\t\t\"vfs\",\n\t}\n\n\t// FsNames maps filesystem id to name of the filesystem.\n\tFsNames = map[FsMagic]string{\n\t\tFsMagicZfs: \"zfs\",\n\t}\n)\n\n// NewDefaultChecker returns a check that parses /proc/mountinfo to check\n// if the specified path is mounted.\n// No-op on FreeBSD.\nfunc NewDefaultChecker() Checker {\n\treturn &defaultChecker{}\n}\n\ntype defaultChecker struct{}\n\nfunc (c *defaultChecker) IsMounted(path string) bool {\n\tm, _ := mount.Mounted(path)\n\treturn m\n}\n\n// Mounted checks if the given path is mounted as the fs type\nfunc Mounted(fsType FsMagic, mountPath string) (bool, error) {\n\tvar buf unix.Statfs_t\n\tif err := unix.Statfs(mountPath, &buf); err != nil {\n\t\treturn false, err\n\t}\n\treturn FsMagic(buf.Type) == fsType, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver_linux.go",
    "content": "//go:build linux\n\npackage graphdriver\n\nimport (\n\t\"path/filepath\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// FsMagicAufs filesystem id for Aufs\n\tFsMagicAufs = FsMagic(0x61756673)\n\t// FsMagicBtrfs filesystem id for Btrfs\n\tFsMagicBtrfs = FsMagic(0x9123683E)\n\t// FsMagicCramfs filesystem id for Cramfs\n\tFsMagicCramfs = FsMagic(0x28cd3d45)\n\t// FsMagicEcryptfs filesystem id for eCryptfs\n\tFsMagicEcryptfs = FsMagic(0xf15f)\n\t// FsMagicExtfs filesystem id for Extfs\n\tFsMagicExtfs = FsMagic(0x0000EF53)\n\t// FsMagicF2fs filesystem id for F2fs\n\tFsMagicF2fs = FsMagic(0xF2F52010)\n\t// FsMagicGPFS filesystem id for GPFS\n\tFsMagicGPFS = FsMagic(0x47504653)\n\t// FsMagicJffs2Fs filesystem if for Jffs2Fs\n\tFsMagicJffs2Fs = FsMagic(0x000072b6)\n\t// FsMagicJfs filesystem id for Jfs\n\tFsMagicJfs = FsMagic(0x3153464a)\n\t// FsMagicNfsFs filesystem id for NfsFs\n\tFsMagicNfsFs = FsMagic(0x00006969)\n\t// FsMagicRAMFs filesystem id for RamFs\n\tFsMagicRAMFs = FsMagic(0x858458f6)\n\t// FsMagicReiserFs filesystem id for ReiserFs\n\tFsMagicReiserFs = FsMagic(0x52654973)\n\t// FsMagicSmbFs filesystem id for SmbFs\n\tFsMagicSmbFs = FsMagic(0x0000517B)\n\t// FsMagicSquashFs filesystem id for SquashFs\n\tFsMagicSquashFs = FsMagic(0x73717368)\n\t// FsMagicTmpFs filesystem id for TmpFs\n\tFsMagicTmpFs = FsMagic(0x01021994)\n\t// FsMagicVxFS filesystem id for VxFs\n\tFsMagicVxFS = FsMagic(0xa501fcf5)\n\t// FsMagicXfs filesystem id for Xfs\n\tFsMagicXfs = FsMagic(0x58465342)\n\t// FsMagicZfs filesystem id for Zfs\n\tFsMagicZfs = FsMagic(0x2fc12fc1)\n\t// FsMagicOverlay filesystem id for overlay\n\tFsMagicOverlay = FsMagic(0x794C7630)\n\t// FsMagicFUSE filesystem id for FUSE\n\tFsMagicFUSE = FsMagic(0x65735546)\n\t// FsMagicAcfs filesystem id for Acfs\n\tFsMagicAcfs = FsMagic(0x61636673)\n\t// FsMagicAfs filesystem id for Afs\n\tFsMagicAfs = FsMagic(0x5346414f)\n\t// FsMagicCephFs filesystem id for Ceph\n\tFsMagicCephFs = FsMagic(0x00C36400)\n\t// FsMagicCIFS filesystem id for CIFS\n\tFsMagicCIFS = FsMagic(0xFF534D42)\n\t// FsMagicEROFS filesystem id for EROFS\n\tFsMagicEROFS = FsMagic(0xE0F5E1E2)\n\t// FsMagicFHGFS filesystem id for FHGFS\n\tFsMagicFHGFSFs = FsMagic(0x19830326)\n\t// FsMagicIBRIX filesystem id for IBRIX\n\tFsMagicIBRIX = FsMagic(0x013111A8)\n\t// FsMagicKAFS filesystem id for KAFS\n\tFsMagicKAFS = FsMagic(0x6B414653)\n\t// FsMagicLUSTRE filesystem id for LUSTRE\n\tFsMagicLUSTRE = FsMagic(0x0BD00BD0)\n\t// FsMagicNCP filesystem id for NCP\n\tFsMagicNCP = FsMagic(0x564C)\n\t// FsMagicNFSD filesystem id for NFSD\n\tFsMagicNFSD = FsMagic(0x6E667364)\n\t// FsMagicOCFS2 filesystem id for OCFS2\n\tFsMagicOCFS2 = FsMagic(0x7461636F)\n\t// FsMagicPANFS filesystem id for PANFS\n\tFsMagicPANFS = FsMagic(0xAAD7AAEA)\n\t// FsMagicPRLFS filesystem id for PRLFS\n\tFsMagicPRLFS = FsMagic(0x7C7C6673)\n\t// FsMagicSMB2 filesystem id for SMB2\n\tFsMagicSMB2 = FsMagic(0xFE534D42)\n\t// FsMagicSNFS filesystem id for SNFS\n\tFsMagicSNFS = FsMagic(0xBEEFDEAD)\n\t// FsMagicVBOXSF filesystem id for VBOXSF\n\tFsMagicVBOXSF = FsMagic(0x786F4256)\n\t// FsMagicVXFS filesystem id for VXFS\n\tFsMagicVXFS = FsMagic(0xA501FCF5)\n)\n\nvar (\n\t// Slice of drivers that should be used in an order\n\tPriority = []string{\n\t\t\"overlay\",\n\t\t\"btrfs\",\n\t\t\"zfs\",\n\t\t\"vfs\",\n\t}\n\n\t// FsNames maps filesystem id to name of the filesystem.\n\tFsNames = map[FsMagic]string{\n\t\tFsMagicAufs:        \"aufs\",\n\t\tFsMagicBtrfs:       \"btrfs\",\n\t\tFsMagicCramfs:      \"cramfs\",\n\t\tFsMagicEcryptfs:    \"ecryptfs\",\n\t\tFsMagicEROFS:       \"erofs\",\n\t\tFsMagicExtfs:       \"extfs\",\n\t\tFsMagicF2fs:        \"f2fs\",\n\t\tFsMagicGPFS:        \"gpfs\",\n\t\tFsMagicJffs2Fs:     \"jffs2\",\n\t\tFsMagicJfs:         \"jfs\",\n\t\tFsMagicNfsFs:       \"nfs\",\n\t\tFsMagicOverlay:     \"overlayfs\",\n\t\tFsMagicRAMFs:       \"ramfs\",\n\t\tFsMagicReiserFs:    \"reiserfs\",\n\t\tFsMagicSmbFs:       \"smb\",\n\t\tFsMagicSquashFs:    \"squashfs\",\n\t\tFsMagicTmpFs:       \"tmpfs\",\n\t\tFsMagicUnsupported: \"unsupported\",\n\t\tFsMagicVxFS:        \"vxfs\",\n\t\tFsMagicXfs:         \"xfs\",\n\t\tFsMagicZfs:         \"zfs\",\n\t}\n)\n\n// GetFSMagic returns the filesystem id given the path.\nfunc GetFSMagic(rootpath string) (FsMagic, error) {\n\tvar buf unix.Statfs_t\n\tpath := filepath.Dir(rootpath)\n\tif err := unix.Statfs(path, &buf); err != nil {\n\t\treturn 0, err\n\t}\n\n\tif _, ok := FsNames[FsMagic(buf.Type)]; !ok {\n\t\tlogrus.Debugf(\"Unknown filesystem type %#x reported for %s\", buf.Type, path)\n\t}\n\treturn FsMagic(buf.Type), nil\n}\n\n// NewFsChecker returns a checker configured for the provided FsMagic\nfunc NewFsChecker(t FsMagic) Checker {\n\treturn &fsChecker{\n\t\tt: t,\n\t}\n}\n\ntype fsChecker struct {\n\tt FsMagic\n}\n\nfunc (c *fsChecker) IsMounted(path string) bool {\n\tm, _ := Mounted(c.t, path)\n\treturn m\n}\n\n// NewDefaultChecker returns a check that parses /proc/mountinfo to check\n// if the specified path is mounted.\nfunc NewDefaultChecker() Checker {\n\treturn &defaultChecker{}\n}\n\ntype defaultChecker struct{}\n\nfunc (c *defaultChecker) IsMounted(path string) bool {\n\tm, _ := mount.Mounted(path)\n\treturn m\n}\n\n// isMountPoint checks that the given path is a mount point\nfunc isMountPoint(mountPath string) (bool, error) {\n\t// it is already the root\n\tif mountPath == \"/\" {\n\t\treturn true, nil\n\t}\n\n\tvar s1, s2 unix.Stat_t\n\tif err := unix.Stat(mountPath, &s1); err != nil {\n\t\treturn true, err\n\t}\n\tif err := unix.Stat(filepath.Dir(mountPath), &s2); err != nil {\n\t\treturn true, err\n\t}\n\treturn s1.Dev != s2.Dev, nil\n}\n\n// Mounted checks if the given path is mounted as the fs type\nfunc Mounted(fsType FsMagic, mountPath string) (bool, error) {\n\tvar buf unix.Statfs_t\n\n\tif err := unix.Statfs(mountPath, &buf); err != nil {\n\t\treturn false, err\n\t}\n\tif FsMagic(buf.Type) != fsType {\n\t\treturn false, nil\n\t}\n\treturn isMountPoint(mountPath)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver_solaris.go",
    "content": "//go:build solaris && cgo\n\npackage graphdriver\n\n/*\n#include <sys/statvfs.h>\n#include <stdlib.h>\n\nstatic inline struct statvfs *getstatfs(char *s) {\n        struct statvfs *buf;\n        int err;\n        buf = (struct statvfs *)malloc(sizeof(struct statvfs));\n        err = statvfs(s, buf);\n        return buf;\n}\n*/\nimport \"C\"\n\nimport (\n\t\"path/filepath\"\n\t\"unsafe\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/mount\"\n)\n\nconst (\n\t// FsMagicZfs filesystem id for Zfs\n\tFsMagicZfs = FsMagic(0x2fc12fc1)\n)\n\nvar (\n\t// Slice of drivers that should be used in an order\n\tPriority = []string{\n\t\t\"zfs\",\n\t}\n\n\t// FsNames maps filesystem id to name of the filesystem.\n\tFsNames = map[FsMagic]string{\n\t\tFsMagicZfs: \"zfs\",\n\t}\n)\n\n// GetFSMagic returns the filesystem id given the path.\nfunc GetFSMagic(rootpath string) (FsMagic, error) {\n\treturn 0, nil\n}\n\ntype fsChecker struct {\n\tt FsMagic\n}\n\nfunc (c *fsChecker) IsMounted(path string) bool {\n\tm, _ := Mounted(c.t, path)\n\treturn m\n}\n\n// NewFsChecker returns a checker configured for the provided FsMagic\nfunc NewFsChecker(t FsMagic) Checker {\n\treturn &fsChecker{\n\t\tt: t,\n\t}\n}\n\n// NewDefaultChecker returns a check that parses /proc/mountinfo to check\n// if the specified path is mounted.\n// No-op on Solaris.\nfunc NewDefaultChecker() Checker {\n\treturn &defaultChecker{}\n}\n\ntype defaultChecker struct{}\n\nfunc (c *defaultChecker) IsMounted(path string) bool {\n\tm, _ := mount.Mounted(path)\n\treturn m\n}\n\n// Mounted checks if the given path is mounted as the fs type\n// Solaris supports only ZFS for now\nfunc Mounted(fsType FsMagic, mountPath string) (bool, error) {\n\tcs := C.CString(filepath.Dir(mountPath))\n\tdefer C.free(unsafe.Pointer(cs))\n\tbuf := C.getstatfs(cs)\n\tdefer C.free(unsafe.Pointer(buf))\n\n\t// on Solaris buf.f_basetype contains ['z', 'f', 's', 0 ... ]\n\tif (buf.f_basetype[0] != 122) || (buf.f_basetype[1] != 102) || (buf.f_basetype[2] != 115) ||\n\t\t(buf.f_basetype[3] != 0) {\n\t\tlogrus.Debugf(\"[zfs] no zfs dataset found for rootdir '%s'\", mountPath)\n\t\treturn false, ErrPrerequisites\n\t}\n\n\treturn true, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/driver_unsupported.go",
    "content": "//go:build !linux && !freebsd && !solaris && !darwin\n\npackage graphdriver\n\n// Slice of drivers that should be used in an order\nvar Priority = []string{\n\t\"unsupported\",\n}\n\n// GetFSMagic returns the filesystem id given the path.\nfunc GetFSMagic(rootpath string) (FsMagic, error) {\n\treturn FsMagicUnsupported, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/fsdiff.go",
    "content": "package graphdriver\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chrootarchive\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\n// ApplyUncompressedLayer defines the unpack method used by the graph\n// driver.\nvar ApplyUncompressedLayer = chrootarchive.ApplyUncompressedLayer\n\n// NaiveDiffDriver takes a ProtoDriver and adds the\n// capability of the Diffing methods which it may or may not\n// support on its own. See the comment on the exported\n// NewNaiveDiffDriver function below.\ntype NaiveDiffDriver struct {\n\tProtoDriver\n\tLayerIDMapUpdater\n}\n\n// NewNaiveDiffDriver returns a fully functional driver that wraps the\n// given ProtoDriver and adds the capability of the following methods which\n// it may or may not support on its own:\n//\n//\tDiff(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (io.ReadCloser, error)\n//\tChanges(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) ([]archive.Change, error)\n//\tApplyDiff(id, parent string, options ApplyDiffOpts) (size int64, err error)\n//\tDiffSize(id string, idMappings *idtools.IDMappings, parent, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error)\nfunc NewNaiveDiffDriver(driver ProtoDriver, updater LayerIDMapUpdater) Driver {\n\treturn &NaiveDiffDriver{ProtoDriver: driver, LayerIDMapUpdater: updater}\n}\n\n// Diff produces an archive of the changes between the specified\n// layer and its parent layer which may be \"\".\nfunc (gdw *NaiveDiffDriver) Diff(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (arch io.ReadCloser, err error) {\n\tstartTime := time.Now()\n\tdriver := gdw.ProtoDriver\n\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\tif parentMappings == nil {\n\t\tparentMappings = &idtools.IDMappings{}\n\t}\n\n\toptions := MountOpts{\n\t\tMountLabel: mountLabel,\n\t\tOptions:    []string{\"ro\"},\n\t}\n\tlayerFs, err := driver.Get(id, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tdriverPut(driver, id, &err)\n\t\t}\n\t}()\n\n\tif parent == \"\" {\n\t\tarchive, err := archive.TarWithOptions(layerFs, &archive.TarOptions{\n\t\t\tCompression: archive.Uncompressed,\n\t\t\tUIDMaps:     idMappings.UIDs(),\n\t\t\tGIDMaps:     idMappings.GIDs(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn ioutils.NewReadCloserWrapper(archive, func() error {\n\t\t\terr := archive.Close()\n\t\t\tdriverPut(driver, id, &err)\n\t\t\treturn err\n\t\t}), nil\n\t}\n\n\toptions.Options = append(options.Options, \"ro\")\n\tparentFs, err := driver.Get(parent, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer driverPut(driver, parent, &err)\n\n\tchanges, err := archive.ChangesDirs(layerFs, idMappings, parentFs, parentMappings)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tarchive, err := archive.ExportChanges(layerFs, changes, idMappings.UIDs(), idMappings.GIDs())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ioutils.NewReadCloserWrapper(archive, func() error {\n\t\terr := archive.Close()\n\t\tdriverPut(driver, id, &err)\n\n\t\t// NaiveDiffDriver compares file metadata with parent layers. Parent layers\n\t\t// are extracted from tar's with full second precision on modified time.\n\t\t// We need this hack here to make sure calls within same second receive\n\t\t// correct result.\n\t\ttime.Sleep(time.Until(startTime.Truncate(time.Second).Add(time.Second)))\n\t\treturn err\n\t}), nil\n}\n\n// Changes produces a list of changes between the specified layer\n// and its parent layer. If parent is \"\", then all changes will be ADD changes.\nfunc (gdw *NaiveDiffDriver) Changes(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (_ []archive.Change, retErr error) {\n\tdriver := gdw.ProtoDriver\n\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\tif parentMappings == nil {\n\t\tparentMappings = &idtools.IDMappings{}\n\t}\n\n\toptions := MountOpts{\n\t\tMountLabel: mountLabel,\n\t\tOptions:    []string{\"ro\"},\n\t}\n\tlayerFs, err := driver.Get(id, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer driverPut(driver, id, &retErr)\n\n\tparentFs := \"\"\n\n\tif parent != \"\" {\n\t\tparentFs, err = driver.Get(parent, options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer driverPut(driver, parent, &retErr)\n\t}\n\n\treturn archive.ChangesDirs(layerFs, idMappings, parentFs, parentMappings)\n}\n\n// ApplyDiff extracts the changeset from the given diff into the\n// layer with the specified id and parent, returning the size of the\n// new layer in bytes.\nfunc (gdw *NaiveDiffDriver) ApplyDiff(id string, options ApplyDiffOpts) (int64, error) {\n\tdriver := gdw.ProtoDriver\n\n\tif options.Mappings == nil {\n\t\toptions.Mappings = &idtools.IDMappings{}\n\t}\n\n\t// Mount the root filesystem so we can apply the diff/layer.\n\tmountOpts := MountOpts{\n\t\tMountLabel: options.MountLabel,\n\t}\n\tlayerFs, err := driver.Get(id, mountOpts)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tdefer driverPut(driver, id, &err)\n\n\tdefaultForceMask := os.FileMode(0o700)\n\tvar forceMask *os.FileMode // = nil\n\tif runtime.GOOS == \"darwin\" {\n\t\tforceMask = &defaultForceMask\n\t}\n\n\ttarOptions := &archive.TarOptions{\n\t\tInUserNS:          unshare.IsRootless(),\n\t\tIgnoreChownErrors: options.IgnoreChownErrors,\n\t\tForceMask:         forceMask,\n\t}\n\tif options.Mappings != nil {\n\t\ttarOptions.UIDMaps = options.Mappings.UIDs()\n\t\ttarOptions.GIDMaps = options.Mappings.GIDs()\n\t}\n\tstart := time.Now().UTC()\n\tlogrus.Debug(\"Start untar layer\")\n\tsize, err := ApplyUncompressedLayer(layerFs, options.Diff, tarOptions)\n\tif err != nil {\n\t\tlogrus.Errorf(\"While applying layer: %s\", err)\n\t\treturn -1, err\n\t}\n\tlogrus.Debugf(\"Untar time: %vs\", time.Now().UTC().Sub(start).Seconds())\n\n\treturn size, nil\n}\n\n// DiffSize calculates the changes between the specified layer\n// and its parent and returns the size in bytes of the changes\n// relative to its base filesystem directory.\nfunc (gdw *NaiveDiffDriver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (int64, error) {\n\tdriver := gdw.ProtoDriver\n\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\tif parentMappings == nil {\n\t\tparentMappings = &idtools.IDMappings{}\n\t}\n\n\tchanges, err := gdw.Changes(id, idMappings, parent, parentMappings, mountLabel)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\toptions := MountOpts{\n\t\tMountLabel: mountLabel,\n\t}\n\tlayerFs, err := driver.Get(id, options)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer driverPut(driver, id, &err)\n\n\treturn archive.ChangesSize(layerFs, changes), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/jsoniter.go",
    "content": "package graphdriver\n\nimport jsoniter \"github.com/json-iterator/go\"\n\nvar json = jsoniter.ConfigCompatibleWithStandardLibrary\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/check.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/idmap\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/unshare\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// doesSupportNativeDiff checks whether the filesystem has a bug\n// which copies up the opaque flag when copying up an opaque\n// directory or the kernel enable CONFIG_OVERLAY_FS_REDIRECT_DIR.\n// When these exist naive diff should be used.\nfunc doesSupportNativeDiff(d, mountOpts string) error {\n\ttd, err := os.MkdirTemp(d, \"opaque-bug-check\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err := os.RemoveAll(td); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to remove check directory %v: %v\", td, err)\n\t\t}\n\t}()\n\n\t// Make directories l1/d, l1/d1, l2/d, l3, work, merged\n\tif err := os.MkdirAll(filepath.Join(td, \"l1\", \"d\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\tif err := os.MkdirAll(filepath.Join(td, \"l1\", \"d1\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\tif err := os.MkdirAll(filepath.Join(td, \"l2\", \"d\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"l3\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"work\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"merged\"), 0o755); err != nil {\n\t\treturn err\n\t}\n\n\t// Mark l2/d as opaque\n\tif err := system.Lsetxattr(filepath.Join(td, \"l2\", \"d\"), archive.GetOverlayXattrName(\"opaque\"), []byte(\"y\"), 0); err != nil {\n\t\treturn fmt.Errorf(\"failed to set opaque flag on middle layer: %w\", err)\n\t}\n\n\tmountFlags := \"lowerdir=%s:%s,upperdir=%s,workdir=%s\"\n\tif unshare.IsRootless() {\n\t\tmountFlags = mountFlags + \",userxattr\"\n\t}\n\n\topts := fmt.Sprintf(mountFlags, path.Join(td, \"l2\"), path.Join(td, \"l1\"), path.Join(td, \"l3\"), path.Join(td, \"work\"))\n\tflags, data := mount.ParseOptions(mountOpts)\n\tif data != \"\" {\n\t\topts = fmt.Sprintf(\"%s,%s\", opts, data)\n\t}\n\tif err := unix.Mount(\"overlay\", filepath.Join(td, \"merged\"), \"overlay\", uintptr(flags), opts); err != nil {\n\t\treturn fmt.Errorf(\"failed to mount overlay: %w\", err)\n\t}\n\tdefer func() {\n\t\tif err := unix.Unmount(filepath.Join(td, \"merged\"), 0); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to unmount check directory %v: %v\", filepath.Join(td, \"merged\"), err)\n\t\t}\n\t}()\n\n\t// Touch file in d to force copy up of opaque directory \"d\" from \"l2\" to \"l3\"\n\tif err := os.WriteFile(filepath.Join(td, \"merged\", \"d\", \"f\"), []byte{}, 0o644); err != nil {\n\t\treturn fmt.Errorf(\"failed to write to merged directory: %w\", err)\n\t}\n\n\t// Check l3/d does not have opaque flag\n\txattrOpaque, err := system.Lgetxattr(filepath.Join(td, \"l3\", \"d\"), archive.GetOverlayXattrName(\"opaque\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to read opaque flag on upper layer: %w\", err)\n\t}\n\tif string(xattrOpaque) == \"y\" {\n\t\treturn errors.New(\"opaque flag erroneously copied up, consider update to kernel 4.8 or later to fix\")\n\t}\n\n\t// rename \"d1\" to \"d2\"\n\tif err := os.Rename(filepath.Join(td, \"merged\", \"d1\"), filepath.Join(td, \"merged\", \"d2\")); err != nil {\n\t\t// if rename failed with syscall.EXDEV, the kernel doesn't have CONFIG_OVERLAY_FS_REDIRECT_DIR enabled\n\t\tif err.(*os.LinkError).Err == syscall.EXDEV {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"failed to rename dir in merged directory: %w\", err)\n\t}\n\t// get the xattr of \"d2\"\n\txattrRedirect, err := system.Lgetxattr(filepath.Join(td, \"l3\", \"d2\"), archive.GetOverlayXattrName(\"redirect\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to read redirect flag on upper layer: %w\", err)\n\t}\n\n\tif string(xattrRedirect) == \"d1\" {\n\t\treturn errors.New(\"kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled\")\n\t}\n\n\treturn nil\n}\n\n// doesMetacopy checks if the filesystem is going to optimize changes to\n// metadata by using nodes marked with an \"overlay.metacopy\" attribute to avoid\n// copying up a file from a lower layer unless/until its contents are being\n// modified\nfunc doesMetacopy(d, mountOpts string) (bool, error) {\n\ttd, err := os.MkdirTemp(d, \"metacopy-check\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\tif err := os.RemoveAll(td); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to remove check directory %v: %v\", td, err)\n\t\t}\n\t}()\n\n\t// Make directories l1, l2, work, merged\n\tif err := os.MkdirAll(filepath.Join(td, \"l1\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := ioutils.AtomicWriteFile(filepath.Join(td, \"l1\", \"f\"), []byte{0xff}, 0o700); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.MkdirAll(filepath.Join(td, \"l2\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"work\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"merged\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\t// Mount using the mandatory options and configured options\n\topts := fmt.Sprintf(\"lowerdir=%s,upperdir=%s,workdir=%s\", path.Join(td, \"l1\"), path.Join(td, \"l2\"), path.Join(td, \"work\"))\n\tif unshare.IsRootless() {\n\t\topts = fmt.Sprintf(\"%s,userxattr\", opts)\n\t}\n\tflags, data := mount.ParseOptions(mountOpts)\n\tif data != \"\" {\n\t\topts = fmt.Sprintf(\"%s,%s\", opts, data)\n\t}\n\tif err := unix.Mount(\"overlay\", filepath.Join(td, \"merged\"), \"overlay\", uintptr(flags), opts); err != nil {\n\t\tif errors.Is(err, unix.EINVAL) {\n\t\t\tlogrus.Infof(\"overlay: metacopy option not supported on this kernel, checked using options %q\", mountOpts)\n\t\t\treturn false, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"failed to mount overlay for metacopy check with %q options: %w\", mountOpts, err)\n\t}\n\tdefer func() {\n\t\tif err := unix.Unmount(filepath.Join(td, \"merged\"), 0); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to unmount check directory %v: %v\", filepath.Join(td, \"merged\"), err)\n\t\t}\n\t}()\n\t// Make a change that only impacts the inode, and check if the pulled-up copy is marked\n\t// as a metadata-only copy\n\tif err := os.Chmod(filepath.Join(td, \"merged\", \"f\"), 0o600); err != nil {\n\t\treturn false, fmt.Errorf(\"changing permissions on file for metacopy check: %w\", err)\n\t}\n\tmetacopy, err := system.Lgetxattr(filepath.Join(td, \"l2\", \"f\"), archive.GetOverlayXattrName(\"metacopy\"))\n\tif err != nil {\n\t\tif errors.Is(err, unix.ENOTSUP) {\n\t\t\tlogrus.Info(\"metacopy option not supported\")\n\t\t\treturn false, nil\n\t\t}\n\t\treturn false, fmt.Errorf(\"metacopy flag was not set on file in upper layer: %w\", err)\n\t}\n\treturn metacopy != nil, nil\n}\n\n// doesVolatile checks if the filesystem supports the \"volatile\" mount option\nfunc doesVolatile(d string) (bool, error) {\n\ttd, err := os.MkdirTemp(d, \"volatile-check\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\tif err := os.RemoveAll(td); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to remove check directory %v: %v\", td, err)\n\t\t}\n\t}()\n\n\tif err := os.MkdirAll(filepath.Join(td, \"lower\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.MkdirAll(filepath.Join(td, \"upper\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"work\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\tif err := os.Mkdir(filepath.Join(td, \"merged\"), 0o755); err != nil {\n\t\treturn false, err\n\t}\n\t// Mount using the mandatory options and configured options\n\topts := fmt.Sprintf(\"volatile,lowerdir=%s,upperdir=%s,workdir=%s\", path.Join(td, \"lower\"), path.Join(td, \"upper\"), path.Join(td, \"work\"))\n\tif unshare.IsRootless() {\n\t\topts = fmt.Sprintf(\"%s,userxattr\", opts)\n\t}\n\tif err := unix.Mount(\"overlay\", filepath.Join(td, \"merged\"), \"overlay\", 0, opts); err != nil {\n\t\treturn false, fmt.Errorf(\"failed to mount overlay for volatile check: %w\", err)\n\t}\n\tdefer func() {\n\t\tif err := unix.Unmount(filepath.Join(td, \"merged\"), 0); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to unmount check directory %v: %v\", filepath.Join(td, \"merged\"), err)\n\t\t}\n\t}()\n\treturn true, nil\n}\n\n// supportsIdmappedLowerLayers checks if the kernel supports mounting overlay on top of\n// a idmapped lower layer.\nfunc supportsIdmappedLowerLayers(home string) (bool, error) {\n\tlayerDir, err := os.MkdirTemp(home, \"compat\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\t_ = os.RemoveAll(layerDir)\n\t}()\n\n\tmergedDir := filepath.Join(layerDir, \"merged\")\n\tlowerDir := filepath.Join(layerDir, \"lower\")\n\tlowerMappedDir := filepath.Join(layerDir, \"lower-mapped\")\n\tupperDir := filepath.Join(layerDir, \"upper\")\n\tworkDir := filepath.Join(layerDir, \"work\")\n\n\tidPair := idtools.IDPair{UID: 0, GID: 0}\n\t_ = idtools.MkdirAndChown(mergedDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(lowerDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(lowerMappedDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(upperDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(workDir, 0o700, idPair)\n\n\tmapping := []idtools.IDMap{\n\t\t{\n\t\t\tContainerID: 0,\n\t\t\tHostID:      0,\n\t\t\tSize:        1,\n\t\t},\n\t}\n\tpid, cleanupFunc, err := idmap.CreateUsernsProcess(mapping, mapping)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer cleanupFunc()\n\n\tif err := idmap.CreateIDMappedMount(lowerDir, lowerMappedDir, pid); err != nil {\n\t\treturn false, fmt.Errorf(\"create mapped mount: %w\", err)\n\t}\n\tdefer func() {\n\t\tif err := unix.Unmount(lowerMappedDir, unix.MNT_DETACH); err != nil {\n\t\t\tlogrus.Warnf(\"Unmount %q: %v\", lowerMappedDir, err)\n\t\t}\n\t}()\n\n\topts := fmt.Sprintf(\"lowerdir=%s,upperdir=%s,workdir=%s\", lowerMappedDir, upperDir, workDir)\n\tflags := uintptr(0)\n\tif err := unix.Mount(\"overlay\", mergedDir, \"overlay\", flags, opts); err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\t_ = unix.Unmount(mergedDir, unix.MNT_DETACH)\n\t}()\n\treturn true, nil\n}\n\n// supportsDataOnlyLayers checks if the kernel supports mounting a overlay file system\n// that uses data-only layers.\nfunc supportsDataOnlyLayers(home string) (bool, error) {\n\tlayerDir, err := os.MkdirTemp(home, \"compat\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer func() {\n\t\t_ = os.RemoveAll(layerDir)\n\t}()\n\n\tmergedDir := filepath.Join(layerDir, \"merged\")\n\tlowerDir := filepath.Join(layerDir, \"lower\")\n\tlowerDirDataOnly := filepath.Join(layerDir, \"lower-data\")\n\tupperDir := filepath.Join(layerDir, \"upper\")\n\tworkDir := filepath.Join(layerDir, \"work\")\n\n\tidPair := idtools.IDPair{UID: 0, GID: 0}\n\t_ = idtools.MkdirAndChown(mergedDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(lowerDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(lowerDirDataOnly, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(upperDir, 0o700, idPair)\n\t_ = idtools.MkdirAndChown(workDir, 0o700, idPair)\n\n\topts := fmt.Sprintf(\"lowerdir=%s::%s,upperdir=%s,workdir=%s,metacopy=on\", lowerDir, lowerDirDataOnly, upperDir, workDir)\n\tflags := uintptr(0)\n\tif err := unix.Mount(\"overlay\", mergedDir, \"overlay\", flags, opts); err != nil {\n\t\treturn false, err\n\t}\n\t_ = unix.Unmount(mergedDir, unix.MNT_DETACH)\n\n\treturn true, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/check_116.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"errors\"\n\t\"io/fs\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nfunc scanForMountProgramIndicators(home string) (detected bool, err error) {\n\terr = filepath.WalkDir(home, func(path string, d fs.DirEntry, err error) error {\n\t\tif detected {\n\t\t\treturn fs.SkipDir\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbasename := filepath.Base(path)\n\t\tif strings.HasPrefix(basename, archive.WhiteoutPrefix) {\n\t\t\tdetected = true\n\t\t\treturn fs.SkipDir\n\t\t}\n\t\tif d.IsDir() {\n\t\t\txattrs, err := system.Llistxattr(path)\n\t\t\tif err != nil && !errors.Is(err, system.ENOTSUP) {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfor _, xattr := range xattrs {\n\t\t\t\tif strings.HasPrefix(xattr, \"user.fuseoverlayfs.\") || strings.HasPrefix(xattr, \"user.containers.\") {\n\t\t\t\t\tdetected = true\n\t\t\t\t\treturn fs.SkipDir\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n\treturn detected, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/composefs.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/chunked/dump\"\n\t\"go.podman.io/storage/pkg/fsverity\"\n\t\"go.podman.io/storage/pkg/loopback\"\n\t\"golang.org/x/sys/unix\"\n)\n\nvar (\n\tcomposeFsHelperOnce sync.Once\n\tcomposeFsHelperPath string\n\tcomposeFsHelperErr  error\n\n\t// skipMountViaFile is used to avoid trying to mount EROFS directly via the file if we already know the current kernel\n\t// does not support it.  Mounting directly via a file is supported from Linux 6.12.\n\tskipMountViaFile atomic.Bool\n)\n\nfunc getComposeFsHelper() (string, error) {\n\tcomposeFsHelperOnce.Do(func() {\n\t\tcomposeFsHelperPath, composeFsHelperErr = exec.LookPath(\"mkcomposefs\")\n\t})\n\treturn composeFsHelperPath, composeFsHelperErr\n}\n\nfunc getComposefsBlob(dataDir string) string {\n\treturn filepath.Join(dataDir, \"composefs.blob\")\n}\n\nfunc generateComposeFsBlob(verityDigests map[string]string, toc any, composefsDir string) error {\n\tif err := os.MkdirAll(composefsDir, 0o700); err != nil {\n\t\treturn err\n\t}\n\n\tdumpReader, err := dump.GenerateDump(toc, verityDigests)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdestFile := getComposefsBlob(composefsDir)\n\twriterJSON, err := getComposeFsHelper()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to find mkcomposefs: %w\", err)\n\t}\n\n\toutFile, err := os.OpenFile(destFile, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o644)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\troFile, err := os.Open(fmt.Sprintf(\"/proc/self/fd/%d\", outFile.Fd()))\n\tif err != nil {\n\t\toutFile.Close()\n\t\treturn fmt.Errorf(\"failed to reopen %s as read-only: %w\", destFile, err)\n\t}\n\n\terr = func() error {\n\t\t// a scope to close outFile before setting fsverity on the read-only fd.\n\t\tdefer outFile.Close()\n\n\t\terrBuf := &bytes.Buffer{}\n\t\tcmd := exec.Command(writerJSON, \"--from-file\", \"-\", \"-\")\n\t\tcmd.Stderr = errBuf\n\t\tcmd.Stdin = dumpReader\n\t\tcmd.Stdout = outFile\n\t\tif err := cmd.Run(); err != nil {\n\t\t\trErr := fmt.Errorf(\"failed to convert json to erofs: %w\", err)\n\t\t\texitErr := &exec.ExitError{}\n\t\t\tif errors.As(err, &exitErr) {\n\t\t\t\treturn fmt.Errorf(\"%w: %s\", rErr, strings.TrimSpace(errBuf.String()))\n\t\t\t}\n\t\t\treturn rErr\n\t\t}\n\t\treturn nil\n\t}()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := fsverity.EnableVerity(\"manifest file\", int(roFile.Fd())); err != nil && !errors.Is(err, unix.ENOTSUP) && !errors.Is(err, unix.ENOTTY) {\n\t\tlogrus.Warningf(\"%s\", err)\n\t}\n\n\treturn nil\n}\n\n/*\ntypedef enum {\n\tLCFS_EROFS_FLAGS_HAS_ACL = (1 << 0),\n} lcfs_erofs_flag_t;\n\nstruct lcfs_erofs_header_s {\n\tuint32_t magic;\n\tuint32_t version;\n\tuint32_t flags;\n\tuint32_t unused[5];\n} __attribute__((__packed__));\n*/\n\n// hasACL returns true if the erofs blob has ACLs enabled\nfunc hasACL(path string) (bool, error) {\n\tconst (\n\t\tLCFS_EROFS_FLAGS_HAS_ACL = (1 << 0)\n\t\tversionNumberSize        = 4\n\t\tmagicNumberSize          = 4\n\t\tflagsSize                = 4\n\t)\n\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer file.Close()\n\n\t// do not worry about checking the magic number, if the file is invalid\n\t// we will fail to mount it anyway\n\tbuffer := make([]byte, versionNumberSize+magicNumberSize+flagsSize)\n\tnread, err := file.Read(buffer)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif nread != len(buffer) {\n\t\treturn false, fmt.Errorf(\"failed to read flags from %q\", path)\n\t}\n\tflags := buffer[versionNumberSize+magicNumberSize:]\n\treturn binary.LittleEndian.Uint32(flags)&LCFS_EROFS_FLAGS_HAS_ACL != 0, nil\n}\n\nfunc openBlobFile(blobFile string, hasACL, useLoopDevice bool) (int, error) {\n\tif useLoopDevice {\n\t\tloop, err := loopback.AttachLoopDeviceRO(blobFile)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer loop.Close()\n\n\t\tblobFile = loop.Name()\n\t}\n\n\tfsfd, err := unix.Fsopen(\"erofs\", 0)\n\tif err != nil {\n\t\treturn -1, fmt.Errorf(\"failed to open erofs filesystem: %w\", err)\n\t}\n\tdefer unix.Close(fsfd)\n\n\tif err := unix.FsconfigSetString(fsfd, \"source\", blobFile); err != nil {\n\t\treturn -1, fmt.Errorf(\"failed to set source for erofs filesystem: %w\", err)\n\t}\n\n\tif err := unix.FsconfigSetFlag(fsfd, \"ro\"); err != nil {\n\t\treturn -1, fmt.Errorf(\"failed to set erofs filesystem read-only: %w\", err)\n\t}\n\n\tif !hasACL {\n\t\tif err := unix.FsconfigSetFlag(fsfd, \"noacl\"); err != nil {\n\t\t\treturn -1, fmt.Errorf(\"failed to set noacl for erofs filesystem: %w\", err)\n\t\t}\n\t}\n\n\tif err := unix.FsconfigCreate(fsfd); err != nil {\n\t\tbuffer := make([]byte, 4096)\n\t\tif n, _ := unix.Read(fsfd, buffer); n > 0 {\n\t\t\treturn -1, fmt.Errorf(\"failed to create erofs filesystem: %s: %w\", strings.TrimSuffix(string(buffer[:n]), \"\\n\"), err)\n\t\t}\n\t\treturn -1, fmt.Errorf(\"failed to create erofs filesystem: %w\", err)\n\t}\n\n\tmfd, err := unix.Fsmount(fsfd, 0, unix.MOUNT_ATTR_RDONLY)\n\tif err != nil {\n\t\tbuffer := make([]byte, 4096)\n\t\tif n, _ := unix.Read(fsfd, buffer); n > 0 {\n\t\t\treturn -1, fmt.Errorf(\"failed to mount erofs filesystem: %s: %w\", string(buffer[:n]), err)\n\t\t}\n\t\treturn -1, fmt.Errorf(\"failed to mount erofs filesystem: %w\", err)\n\t}\n\treturn mfd, nil\n}\n\nfunc openComposefsMount(dataDir string) (int, error) {\n\tblobFile := getComposefsBlob(dataDir)\n\n\thasACL, err := hasACL(blobFile)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\tif !skipMountViaFile.Load() {\n\t\tfd, err := openBlobFile(blobFile, hasACL, false)\n\t\tif err == nil || !errors.Is(err, unix.ENOTBLK) {\n\t\t\treturn fd, err\n\t\t}\n\t\tlogrus.Debugf(\"The current kernel doesn't support mounting EROFS directly from a file, fallback to a loopback device\")\n\t\tskipMountViaFile.Store(true)\n\t}\n\n\treturn openBlobFile(blobFile, hasACL, true)\n}\n\nfunc mountComposefsBlob(dataDir, mountPoint string) error {\n\tmfd, err := openComposefsMount(dataDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer unix.Close(mfd)\n\n\tif err := unix.MoveMount(mfd, \"\", unix.AT_FDCWD, mountPoint, unix.MOVE_MOUNT_F_EMPTY_PATH); err != nil {\n\t\treturn fmt.Errorf(\"failed to move mount to %q: %w\", mountPoint, err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/jsoniter.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport jsoniter \"github.com/json-iterator/go\"\n\nvar json = jsoniter.ConfigCompatibleWithStandardLibrary\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/mount.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"go.podman.io/storage/pkg/reexec\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc init() {\n\treexec.Register(\"storage-mountfrom\", mountOverlayFromMain)\n}\n\nfunc fatal(err error) {\n\tfmt.Fprint(os.Stderr, err)\n\tos.Exit(1)\n}\n\ntype mountOptions struct {\n\tDevice string\n\tTarget string\n\tType   string\n\tLabel  string\n\tFlag   uint32\n}\n\nfunc mountOverlayFrom(dir, device, target, mType string, flags uintptr, label string) error {\n\toptions := &mountOptions{\n\t\tDevice: device,\n\t\tTarget: target,\n\t\tType:   mType,\n\t\tFlag:   uint32(flags),\n\t\tLabel:  label,\n\t}\n\n\tcmd := reexec.Command(\"storage-mountfrom\", dir)\n\tw, err := cmd.StdinPipe()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"mountfrom error on pipe creation: %w\", err)\n\t}\n\n\toutput := bytes.NewBuffer(nil)\n\tcmd.Stdout = output\n\tcmd.Stderr = output\n\tif err := cmd.Start(); err != nil {\n\t\tw.Close()\n\t\treturn fmt.Errorf(\"mountfrom error on re-exec cmd: %w\", err)\n\t}\n\t// write the options to the pipe for the untar exec to read\n\tif err := json.NewEncoder(w).Encode(options); err != nil {\n\t\tw.Close()\n\t\treturn fmt.Errorf(\"mountfrom json encode to pipe failed: %w\", err)\n\t}\n\tw.Close()\n\n\tif err := cmd.Wait(); err != nil {\n\t\treturn fmt.Errorf(\"mountfrom re-exec output: %s: error: %w\", output, err)\n\t}\n\treturn nil\n}\n\n// mountfromMain is the entry-point for storage-mountfrom on re-exec.\nfunc mountOverlayFromMain() {\n\truntime.LockOSThread()\n\tflag.Parse()\n\n\tvar options *mountOptions\n\n\tif err := json.NewDecoder(os.Stdin).Decode(&options); err != nil {\n\t\tfatal(err)\n\t}\n\n\t// Mount the arguments passed from the specified directory. Some of the\n\t// paths mentioned in the values we pass to the kernel are relative to\n\t// the specified directory.\n\thomedir := flag.Arg(0)\n\tif err := os.Chdir(homedir); err != nil {\n\t\tfatal(err)\n\t}\n\n\tpageSize := unix.Getpagesize()\n\tif len(options.Label) < pageSize {\n\t\tif err := unix.Mount(options.Device, options.Target, options.Type, uintptr(options.Flag), options.Label); err != nil {\n\t\t\tfatal(err)\n\t\t}\n\t\tos.Exit(0)\n\t}\n\n\t// Those arguments still took up too much space.  Open the diff\n\t// directories and use their descriptor numbers as lowers, using\n\t// /proc/self/fd as the current directory.\n\n\t// Split out the various options, since we need to manipulate the\n\t// paths, but we don't want to mess with other options.\n\tvar upperk, upperv, workk, workv, lowerk, lowerv, labelk, labelv, others string\n\tfor arg := range strings.SplitSeq(options.Label, \",\") {\n\t\tkey, val, _ := strings.Cut(arg, \"=\")\n\t\tswitch key {\n\t\tcase \"upperdir\":\n\t\t\tupperk = \"upperdir=\"\n\t\t\tupperv = val\n\t\tcase \"workdir\":\n\t\t\tworkk = \"workdir=\"\n\t\t\tworkv = val\n\t\tcase \"lowerdir\":\n\t\t\tlowerk = \"lowerdir=\"\n\t\t\tlowerv = val\n\t\tcase \"label\":\n\t\t\tlabelk = \"label=\"\n\t\t\tlabelv = val\n\t\tdefault:\n\t\t\tif others == \"\" {\n\t\t\t\tothers = arg\n\t\t\t} else {\n\t\t\t\tothers = others + \",\" + arg\n\t\t\t}\n\t\t}\n\t}\n\n\t// Make sure upperdir, workdir, and the target are absolute paths.\n\tif upperv != \"\" && !filepath.IsAbs(upperv) {\n\t\tupperv = filepath.Join(homedir, upperv)\n\t}\n\tif workv != \"\" && !filepath.IsAbs(workv) {\n\t\tworkv = filepath.Join(homedir, workv)\n\t}\n\tif !filepath.IsAbs(options.Target) {\n\t\toptions.Target = filepath.Join(homedir, options.Target)\n\t}\n\n\t// Get a descriptor for each lower, and use that descriptor's name as\n\t// the new value for the list of lowers, because it's shorter.\n\tif lowerv != \"\" {\n\t\tvar newLowers []string\n\t\tdataOnly := false\n\t\tfor lowerPath := range strings.SplitSeq(lowerv, \":\") {\n\t\t\tif lowerPath == \"\" {\n\t\t\t\tdataOnly = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlowerFd, err := unix.Open(lowerPath, unix.O_RDONLY, 0)\n\t\t\tif err != nil {\n\t\t\t\tfatal(err)\n\t\t\t}\n\t\t\tvar lower string\n\t\t\tif dataOnly {\n\t\t\t\tlower = fmt.Sprintf(\":%d\", lowerFd)\n\t\t\t\tdataOnly = false\n\t\t\t} else {\n\t\t\t\tlower = fmt.Sprintf(\"%d\", lowerFd)\n\t\t\t}\n\t\t\tnewLowers = append(newLowers, lower)\n\t\t}\n\t\tlowerv = strings.Join(newLowers, \":\")\n\t}\n\n\t// Reconstruct the Label field.\n\toptions.Label = upperk + upperv + \",\" + workk + workv + \",\" + lowerk + lowerv + \",\" + labelk + labelv + \",\" + others\n\toptions.Label = strings.ReplaceAll(options.Label, \",,\", \",\")\n\n\t// Okay, try this, if we managed to make the arguments fit.\n\tvar err error\n\tif len(options.Label) < pageSize {\n\t\tif err := os.Chdir(\"/proc/self/fd\"); err != nil {\n\t\t\tfatal(err)\n\t\t}\n\t\terr = unix.Mount(options.Device, options.Target, options.Type, uintptr(options.Flag), options.Label)\n\t} else {\n\t\terr = fmt.Errorf(\"cannot mount layer, mount data %q too large %d >= page size %d\", options.Label, len(options.Label), pageSize)\n\t}\n\n\t// Clean up.\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"creating overlay mount to %s, mount_data=%q\\n\", options.Target, options.Label)\n\t\tfatal(err)\n\t}\n\n\tos.Exit(0)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/overlay.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\tunits \"github.com/docker/go-units\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/opencontainers/selinux/go-selinux\"\n\t\"github.com/opencontainers/selinux/go-selinux/label\"\n\t\"github.com/sirupsen/logrus\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/drivers/overlayutils\"\n\t\"go.podman.io/storage/drivers/quota\"\n\t\"go.podman.io/storage/internal/dedup\"\n\t\"go.podman.io/storage/internal/staging_lockfile\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chrootarchive\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/fsutils\"\n\t\"go.podman.io/storage/pkg/idmap\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"go.podman.io/storage/pkg/parsers\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/unshare\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// untar defines the untar method\nvar untar = chrootarchive.UntarUncompressed\n\nconst (\n\tdefaultPerms         = os.FileMode(0o555)\n\tmountProgramFlagFile = \".has-mount-program\"\n)\n\n// This backend uses the overlay union filesystem for containers\n// with diff directories for each layer.\n\n// This version of the overlay driver requires at least kernel\n// 4.0.0 in order to support mounting multiple diff directories.\n\n// Each container/image has at least a \"diff\" directory and \"link\" file.\n// If there is also a \"lower\" file when there are diff layers\n// below as well as \"merged\" and \"work\" directories. The \"diff\" directory\n// has the upper layer of the overlay and is used to capture any\n// changes to the layer. The \"lower\" file contains all the lower layer\n// mounts separated by \":\" and ordered from uppermost to lowermost\n// layers. The overlay itself is mounted in the \"merged\" directory,\n// and the \"work\" dir is needed for overlay to work.\n\n// The \"link\" file for each layer contains a unique string for the layer.\n// Under the \"l\" directory at the root there will be a symbolic link\n// with that unique string pointing the \"diff\" directory for the layer.\n// The symbolic links are used to reference lower layers in the \"lower\"\n// file and on mount. The links are used to shorten the total length\n// of a layer reference without requiring changes to the layer identifier\n// or root directory. Mounts are always done relative to root and\n// referencing the symbolic links in order to ensure the number of\n// lower directories can fit in a single page for making the mount\n// syscall. A hard upper limit of 500 lower layers is enforced to ensure\n// that mounts do not fail due to length.\n\nconst (\n\tlinkDir     = \"l\"\n\tstagingDir  = \"staging\"\n\ttempDirName = \"tempdirs\"\n\tlowerFile   = \"lower\"\n\tmaxDepth    = 500\n\n\tstagingLockFile = \"staging.lock\"\n\n\ttocArtifact             = \"toc\"\n\tfsVerityDigestsArtifact = \"fs-verity-digests\"\n\n\t// idLength represents the number of random characters\n\t// which can be used to create the unique link identifier\n\t// for every layer. If this value is too long then the\n\t// page size limit for the mount command may be exceeded.\n\t// The idLength should be selected such that following equation\n\t// is true (512 is a buffer for label metadata, 128 is the\n\t// number of lowers we want to be able to use without having\n\t// to use bind mounts to get all the way to the kernel limit).\n\t// ((idLength + len(linkDir) + 1) * 128) <= (pageSize - 512)\n\tidLength = 26\n)\n\ntype overlayOptions struct {\n\timageStores       []string\n\tlayerStores       []additionalLayerStore\n\tquota             quota.Quota\n\tmountProgram      string\n\tskipMountHome     bool\n\tmountOptions      string\n\tignoreChownErrors bool\n\tforceMask         *os.FileMode\n\tuseComposefs      bool\n}\n\n// Driver contains information about the home directory and the list of active mounts that are created using this driver.\ntype Driver struct {\n\tname             string\n\thome             string\n\trunhome          string\n\timageStore       string\n\tctr              *graphdriver.RefCounter\n\tquotaCtl         *quota.Control\n\toptions          overlayOptions\n\tnaiveDiff        graphdriver.DiffDriver\n\tsupportsDType    bool\n\tsupportsVolatile *bool\n\tsupportsDataOnly *bool\n\tusingMetacopy    bool\n\tusingComposefs   bool\n\n\tstagingDirsLocksMutex sync.Mutex\n\t// stagingDirsLocks access is not thread safe, it is required that callers take\n\t// stagingDirsLocksMutex on each access to guard against concurrent map writes.\n\tstagingDirsLocks map[string]*staging_lockfile.StagingLockFile\n\n\tsupportsIDMappedMounts *bool\n}\n\ntype additionalLayerStore struct {\n\t// path is the directory where this store is available on the host.\n\tpath string\n\n\t// withReference is true when the store contains image reference information (base64-encoded)\n\t// in its layer search path so the path to the diff will be\n\t//  <path>/base64(reference)/<layerdigest>/\n\twithReference bool\n}\n\nvar (\n\tbackingFs             = \"<unknown>\"\n\tprojectQuotaSupported = false\n\n\tuseNaiveDiffLock sync.Once\n\tuseNaiveDiffOnly bool\n)\n\nfunc init() {\n\tgraphdriver.MustRegister(\"overlay\", Init)\n\tgraphdriver.MustRegister(\"overlay2\", Init)\n}\n\nfunc hasMetacopyOption(opts []string) bool {\n\treturn slices.Contains(opts, \"metacopy=on\")\n}\n\nfunc getMountProgramFlagFile(path string) string {\n\treturn filepath.Join(path, mountProgramFlagFile)\n}\n\nfunc checkSupportVolatile(home, runhome string) (bool, error) {\n\tconst feature = \"volatile\"\n\tvolatileCacheResult, _, err := cachedFeatureCheck(runhome, feature)\n\tvar usingVolatile bool\n\tif err == nil {\n\t\tif volatileCacheResult {\n\t\t\tlogrus.Debugf(\"Cached value indicated that volatile is being used\")\n\t\t} else {\n\t\t\tlogrus.Debugf(\"Cached value indicated that volatile is not being used\")\n\t\t}\n\t\tusingVolatile = volatileCacheResult\n\t} else {\n\t\tusingVolatile, err = doesVolatile(home)\n\t\tif err == nil {\n\t\t\tif usingVolatile {\n\t\t\t\tlogrus.Debugf(\"overlay: test mount indicated that volatile is being used\")\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"overlay: test mount indicated that volatile is not being used\")\n\t\t\t}\n\t\t\tif err = cachedFeatureRecord(runhome, feature, usingVolatile, \"\"); err != nil {\n\t\t\t\treturn false, fmt.Errorf(\"recording volatile-being-used status: %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tusingVolatile = false\n\t\t}\n\t}\n\treturn usingVolatile, nil\n}\n\n// checkAndRecordIDMappedSupport checks and stores if the kernel supports mounting overlay on top of a\n// idmapped lower layer.\nfunc checkAndRecordIDMappedSupport(home, runhome string) (bool, error) {\n\tif os.Geteuid() != 0 {\n\t\treturn false, nil\n\t}\n\n\tfeature := \"idmapped-lower-dir\"\n\toverlayCacheResult, overlayCacheText, err := cachedFeatureCheck(runhome, feature)\n\tif err == nil {\n\t\tif overlayCacheResult {\n\t\t\tlogrus.Debugf(\"Cached value indicated that idmapped mounts for overlay are supported\")\n\t\t\treturn true, nil\n\t\t}\n\t\tlogrus.Debugf(\"Cached value indicated that idmapped mounts for overlay are not supported\")\n\t\treturn false, errors.New(overlayCacheText)\n\t}\n\tsupportsIDMappedMounts, err := supportsIdmappedLowerLayers(home)\n\tif err2 := cachedFeatureRecord(runhome, feature, supportsIDMappedMounts, \"\"); err2 != nil {\n\t\treturn false, fmt.Errorf(\"recording overlay idmapped mounts support status: %w\", err2)\n\t}\n\treturn supportsIDMappedMounts, err\n}\n\nfunc checkAndRecordOverlaySupport(home, runhome string) (bool, error) {\n\tvar supportsDType bool\n\n\tif os.Geteuid() != 0 {\n\t\treturn false, nil\n\t}\n\n\tfeature := \"overlay\"\n\toverlayCacheResult, overlayCacheText, err := cachedFeatureCheck(runhome, feature)\n\tif err == nil {\n\t\tif overlayCacheResult {\n\t\t\tlogrus.Debugf(\"Cached value indicated that overlay is supported\")\n\t\t} else {\n\t\t\tlogrus.Debugf(\"Cached value indicated that overlay is not supported\")\n\t\t}\n\t\tsupportsDType = overlayCacheResult\n\t\tif !supportsDType {\n\t\t\treturn false, errors.New(overlayCacheText)\n\t\t}\n\t} else {\n\t\tsupportsDType, err = supportsOverlay(home, idtools.IDPair{UID: 0, GID: 0})\n\t\tif err != nil {\n\t\t\tos.Remove(filepath.Join(home, linkDir))\n\t\t\tos.Remove(home)\n\t\t\tpatherr, ok := err.(*os.PathError)\n\t\t\tif ok && patherr.Err == syscall.ENOSPC {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\terr = fmt.Errorf(\"kernel does not support overlay fs: %w\", err)\n\t\t\tif err2 := cachedFeatureRecord(runhome, feature, false, err.Error()); err2 != nil {\n\t\t\t\treturn false, fmt.Errorf(\"recording overlay not being supported (%v): %w\", err, err2)\n\t\t\t}\n\t\t\treturn false, err\n\t\t}\n\t\tif err = cachedFeatureRecord(runhome, feature, supportsDType, \"\"); err != nil {\n\t\t\treturn false, fmt.Errorf(\"recording overlay support status: %w\", err)\n\t\t}\n\t}\n\treturn supportsDType, nil\n}\n\nfunc (d *Driver) getSupportsVolatile() (bool, error) {\n\tif d.supportsVolatile != nil {\n\t\treturn *d.supportsVolatile, nil\n\t}\n\tsupportsVolatile, err := checkSupportVolatile(d.home, d.runhome)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\td.supportsVolatile = &supportsVolatile\n\treturn supportsVolatile, nil\n}\n\nfunc (d *Driver) getSupportsDataOnly() (bool, error) {\n\tif d.supportsDataOnly != nil {\n\t\treturn *d.supportsDataOnly, nil\n\t}\n\tsupportsDataOnly, err := supportsDataOnlyLayersCached(d.home, d.runhome)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\td.supportsDataOnly = &supportsDataOnly\n\treturn supportsDataOnly, nil\n}\n\n// isNetworkFileSystem checks if the specified file system is supported by native overlay\n// as backing store when running in a user namespace.\nfunc isNetworkFileSystem(fsMagic graphdriver.FsMagic) bool {\n\tswitch fsMagic {\n\t// a bunch of network file systems...\n\tcase graphdriver.FsMagicNfsFs, graphdriver.FsMagicSmbFs, graphdriver.FsMagicAcfs,\n\t\tgraphdriver.FsMagicAfs, graphdriver.FsMagicCephFs, graphdriver.FsMagicCIFS,\n\t\tgraphdriver.FsMagicGPFS, graphdriver.FsMagicIBRIX,\n\t\tgraphdriver.FsMagicKAFS, graphdriver.FsMagicLUSTRE, graphdriver.FsMagicNCP,\n\t\tgraphdriver.FsMagicNFSD, graphdriver.FsMagicOCFS2, graphdriver.FsMagicPANFS,\n\t\tgraphdriver.FsMagicPRLFS, graphdriver.FsMagicSMB2, graphdriver.FsMagicSNFS,\n\t\tgraphdriver.FsMagicVBOXSF, graphdriver.FsMagicVXFS:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// Init returns the a native diff driver for overlay filesystem.\n// If overlay filesystem is not supported on the host, a wrapped graphdriver.ErrNotSupported is returned as error.\n// If an overlay filesystem is not supported over an existing filesystem then a wrapped graphdriver.ErrIncompatibleFS is returned.\nfunc Init(home string, options graphdriver.Options) (graphdriver.Driver, error) {\n\topts, err := parseOptions(options.DriverOptions)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfsMagic, err := graphdriver.GetFSMagic(home)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfsName, ok := graphdriver.FsNames[fsMagic]\n\tif !ok {\n\t\tfsName = \"<unknown>\"\n\t}\n\tbackingFs = fsName\n\n\trunhome := filepath.Join(options.RunRoot, filepath.Base(home))\n\n\t// Create the driver home dir\n\tif err := os.MkdirAll(path.Join(home, linkDir), 0o755); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif options.ImageStore != \"\" {\n\t\tif err := idtools.MkdirAllAndChown(path.Join(options.ImageStore, linkDir), 0o755, idtools.IDPair{UID: 0, GID: 0}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif err := os.MkdirAll(runhome, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif opts.mountProgram == \"\" {\n\t\tif supported, err := SupportsNativeOverlay(home, runhome); err != nil {\n\t\t\treturn nil, err\n\t\t} else if !supported {\n\t\t\tif path, err := exec.LookPath(\"fuse-overlayfs\"); err == nil {\n\t\t\t\topts.mountProgram = path\n\t\t\t}\n\t\t}\n\t}\n\n\tif opts.mountProgram != \"\" {\n\t\tif unshare.IsRootless() && isNetworkFileSystem(fsMagic) && opts.forceMask == nil {\n\t\t\tm := os.FileMode(0o700)\n\t\t\topts.forceMask = &m\n\t\t\tlogrus.Warnf(\"Network file system detected as backing store.  Enforcing overlay option `force_mask=\\\"%o\\\"`.  Add it to storage.conf to silence this warning\", m)\n\t\t}\n\n\t\tif err := os.WriteFile(getMountProgramFlagFile(home), []byte(\"true\"), 0o600); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\t// check if they are running over btrfs, aufs, overlay, or ecryptfs\n\t\tswitch fsMagic {\n\t\tcase graphdriver.FsMagicAufs, graphdriver.FsMagicOverlay, graphdriver.FsMagicEcryptfs:\n\t\t\treturn nil, fmt.Errorf(\"'overlay' is not supported over %s, a mount_program is required: %w\", backingFs, graphdriver.ErrIncompatibleFS)\n\t\t}\n\t\tif unshare.IsRootless() && isNetworkFileSystem(fsMagic) {\n\t\t\treturn nil, fmt.Errorf(\"a network file system with user namespaces is not supported.  Please use a mount_program: %w\", graphdriver.ErrIncompatibleFS)\n\t\t}\n\t}\n\n\tif opts.useComposefs {\n\t\tif unshare.IsRootless() {\n\t\t\treturn nil, fmt.Errorf(\"composefs is not supported in user namespaces\")\n\t\t}\n\t\tif _, err := getComposeFsHelper(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"composefs helper program not found: %w\", err)\n\t\t}\n\t}\n\n\tvar usingMetacopy bool\n\tvar supportsDType bool\n\tvar supportsVolatile *bool\n\tif opts.mountProgram != \"\" {\n\t\tsupportsDType = true\n\t\tt := true\n\t\tsupportsVolatile = &t\n\t} else {\n\t\tsupportsDType, err = checkAndRecordOverlaySupport(home, runhome)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfeature := fmt.Sprintf(\"metacopy(%s)\", opts.mountOptions)\n\t\tmetacopyCacheResult, _, err := cachedFeatureCheck(runhome, feature)\n\t\tif err == nil {\n\t\t\tif metacopyCacheResult {\n\t\t\t\tlogrus.Debugf(\"Cached value indicated that metacopy is being used\")\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Cached value indicated that metacopy is not being used\")\n\t\t\t}\n\t\t\tusingMetacopy = metacopyCacheResult\n\t\t} else {\n\t\t\tusingMetacopy, err = doesMetacopy(home, opts.mountOptions)\n\t\t\tif err == nil {\n\t\t\t\tif usingMetacopy {\n\t\t\t\t\tlogrus.Debugf(\"overlay: test mount indicated that metacopy is being used\")\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Debugf(\"overlay: test mount indicated that metacopy is not being used\")\n\t\t\t\t}\n\t\t\t\tif err = cachedFeatureRecord(runhome, feature, usingMetacopy, \"\"); err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"recording metacopy-being-used status: %w\", err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogrus.Infof(\"overlay: test mount did not indicate whether or not metacopy is being used: %v\", err)\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t}\n\n\tif !opts.skipMountHome {\n\t\tif err := mount.MakePrivate(home); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"overlay: failed to make mount private: %w\", err)\n\t\t}\n\t}\n\n\tfileSystemType := graphdriver.FsMagicOverlay\n\tif opts.mountProgram != \"\" {\n\t\tfileSystemType = graphdriver.FsMagicFUSE\n\t}\n\n\td := &Driver{\n\t\tname:                  \"overlay\",\n\t\thome:                  home,\n\t\timageStore:            options.ImageStore,\n\t\trunhome:               runhome,\n\t\tctr:                   graphdriver.NewRefCounter(graphdriver.NewFsChecker(fileSystemType)),\n\t\tsupportsDType:         supportsDType,\n\t\tusingMetacopy:         usingMetacopy,\n\t\tsupportsVolatile:      supportsVolatile,\n\t\tusingComposefs:        opts.useComposefs,\n\t\toptions:               *opts,\n\t\tstagingDirsLocksMutex: sync.Mutex{},\n\t\tstagingDirsLocks:      make(map[string]*staging_lockfile.StagingLockFile),\n\t}\n\n\td.naiveDiff = graphdriver.NewNaiveDiffDriver(d, graphdriver.NewNaiveLayerIDMapUpdater(d))\n\tif backingFs == \"xfs\" {\n\t\t// Try to enable project quota support over xfs.\n\t\tif d.quotaCtl, err = quota.NewControl(home); err == nil {\n\t\t\tprojectQuotaSupported = true\n\t\t} else if opts.quota.Size > 0 || opts.quota.Inodes > 0 {\n\t\t\treturn nil, fmt.Errorf(\"storage options overlay.size and overlay.inodes not supported. Filesystem does not support Project Quota: %w\", err)\n\t\t}\n\t} else if opts.quota.Size > 0 || opts.quota.Inodes > 0 {\n\t\t// if xfs is not the backing fs then error out if the storage-opt overlay.size is used.\n\t\treturn nil, fmt.Errorf(\"storage option overlay.size and overlay.inodes only supported for backingFS XFS. Found %v\", backingFs)\n\t}\n\n\tlogrus.Debugf(\"backingFs=%s, projectQuotaSupported=%v, useNativeDiff=%v, usingMetacopy=%v\", backingFs, projectQuotaSupported, !d.useNaiveDiff(), d.usingMetacopy)\n\n\treturn d, nil\n}\n\nfunc parseOptions(options []string) (*overlayOptions, error) {\n\to := &overlayOptions{}\n\tfor _, option := range options {\n\t\tkey, val, err := parsers.ParseKeyValueOpt(option)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttrimkey := strings.ToLower(key)\n\t\ttrimkey = strings.TrimPrefix(trimkey, \"overlay.\")\n\t\ttrimkey = strings.TrimPrefix(trimkey, \"overlay2.\")\n\t\ttrimkey = strings.TrimPrefix(trimkey, \".\")\n\t\tswitch trimkey {\n\t\tcase \"override_kernel_check\":\n\t\t\tlogrus.Debugf(\"overlay: override_kernel_check option was specified, but is no longer necessary\")\n\t\tcase \"mountopt\":\n\t\t\to.mountOptions = val\n\t\tcase \"size\":\n\t\t\tlogrus.Debugf(\"overlay: size=%s\", val)\n\t\t\tsize, err := units.RAMInBytes(val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\to.quota.Size = uint64(size)\n\t\tcase \"inodes\":\n\t\t\tlogrus.Debugf(\"overlay: inodes=%s\", val)\n\t\t\tinodes, err := strconv.ParseUint(val, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\to.quota.Inodes = inodes\n\t\tcase \"imagestore\", \"additionalimagestore\":\n\t\t\tlogrus.Debugf(\"overlay: imagestore=%s\", val)\n\t\t\t// Additional read only image stores to use for lower paths\n\t\t\tif val == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor store := range strings.SplitSeq(val, \",\") {\n\t\t\t\tstore = filepath.Clean(store)\n\t\t\t\tif !filepath.IsAbs(store) {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: image path %q is not absolute.  Can not be relative\", store)\n\t\t\t\t}\n\t\t\t\tst, err := os.Stat(store)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: can't stat imageStore dir %s: %w\", store, err)\n\t\t\t\t}\n\t\t\t\tif !st.IsDir() {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: image path %q must be a directory\", store)\n\t\t\t\t}\n\t\t\t\to.imageStores = append(o.imageStores, store)\n\t\t\t}\n\t\tcase \"additionallayerstore\":\n\t\t\tlogrus.Debugf(\"overlay: additionallayerstore=%s\", val)\n\t\t\t// Additional read only layer stores to use for lower paths\n\t\t\tif val == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor lstore := range strings.SplitSeq(val, \",\") {\n\t\t\t\telems := strings.Split(lstore, \":\")\n\t\t\t\tlstore = filepath.Clean(elems[0])\n\t\t\t\tif !filepath.IsAbs(lstore) {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: additionallayerstore path %q is not absolute.  Can not be relative\", lstore)\n\t\t\t\t}\n\t\t\t\tst, err := os.Stat(lstore)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: can't stat additionallayerstore dir: %w\", err)\n\t\t\t\t}\n\t\t\t\tif !st.IsDir() {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: additionallayerstore path %q must be a directory\", lstore)\n\t\t\t\t}\n\t\t\t\tvar withReference bool\n\t\t\t\tfor _, e := range elems[1:] {\n\t\t\t\t\tswitch e {\n\t\t\t\t\tcase \"ref\":\n\t\t\t\t\t\tif withReference {\n\t\t\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: additionallayerstore config of %q contains %q option twice\", lstore, e)\n\t\t\t\t\t\t}\n\t\t\t\t\t\twithReference = true\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: additionallayerstore config %q contains unknown option %q\", lstore, e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\to.layerStores = append(o.layerStores, additionalLayerStore{\n\t\t\t\t\tpath:          lstore,\n\t\t\t\t\twithReference: withReference,\n\t\t\t\t})\n\t\t\t}\n\t\tcase \"use_composefs\":\n\t\t\tlogrus.Debugf(\"overlay: use_composefs=%s\", val)\n\t\t\to.useComposefs, err = strconv.ParseBool(val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase \"mount_program\":\n\t\t\tlogrus.Debugf(\"overlay: mount_program=%s\", val)\n\t\t\tif val != \"\" {\n\t\t\t\terr := fileutils.Exists(val)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"overlay: can't stat program %q: %w\", val, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\to.mountProgram = val\n\t\tcase \"skip_mount_home\":\n\t\t\tlogrus.Debugf(\"overlay: skip_mount_home=%s\", val)\n\t\t\to.skipMountHome, err = strconv.ParseBool(val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase \"ignore_chown_errors\":\n\t\t\tlogrus.Debugf(\"overlay: ignore_chown_errors=%s\", val)\n\t\t\to.ignoreChownErrors, err = strconv.ParseBool(val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase \"force_mask\":\n\t\t\tlogrus.Debugf(\"overlay: force_mask=%s\", val)\n\t\t\tvar mask int64\n\t\t\tswitch val {\n\t\t\tcase \"shared\":\n\t\t\t\tmask = 0o755\n\t\t\tcase \"private\":\n\t\t\t\tmask = 0o700\n\t\t\tdefault:\n\t\t\t\tmask, err = strconv.ParseInt(val, 8, 32)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tm := os.FileMode(mask)\n\t\t\to.forceMask = &m\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"overlay: unknown option %s\", key)\n\t\t}\n\t}\n\treturn o, nil\n}\n\nfunc cachedFeatureSet(feature string, set bool) string {\n\tif set {\n\t\treturn fmt.Sprintf(\"%s-true\", feature)\n\t}\n\treturn fmt.Sprintf(\"%s-false\", feature)\n}\n\nfunc cachedFeatureCheck(runhome, feature string) (supported bool, text string, err error) {\n\tcontent, err := os.ReadFile(filepath.Join(runhome, cachedFeatureSet(feature, true)))\n\tif err == nil {\n\t\treturn true, string(content), nil\n\t}\n\tcontent, err = os.ReadFile(filepath.Join(runhome, cachedFeatureSet(feature, false)))\n\tif err == nil {\n\t\treturn false, string(content), nil\n\t}\n\treturn false, \"\", err\n}\n\nfunc cachedFeatureRecord(runhome, feature string, supported bool, text string) (err error) {\n\tf, err := os.Create(filepath.Join(runhome, cachedFeatureSet(feature, supported)))\n\tif f != nil {\n\t\tif text != \"\" {\n\t\t\tfmt.Fprintf(f, \"%s\", text)\n\t\t}\n\t\tf.Close()\n\t}\n\treturn err\n}\n\nfunc SupportsNativeOverlay(home, runhome string) (bool, error) {\n\tif os.Geteuid() != 0 || home == \"\" || runhome == \"\" {\n\t\treturn false, nil\n\t}\n\n\tvar contents string\n\tflagContent, err := os.ReadFile(getMountProgramFlagFile(home))\n\tif err == nil {\n\t\tcontents = strings.TrimSpace(string(flagContent))\n\t}\n\tswitch contents {\n\tcase \"true\":\n\t\tlogrus.Debugf(\"overlay: storage already configured with a mount-program\")\n\t\treturn false, nil\n\tcase \"false\":\n\t\t// Do nothing.\n\tdefault:\n\t\tneedsMountProgram, err := scanForMountProgramIndicators(home)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\t\tif err := os.WriteFile(getMountProgramFlagFile(home), []byte(fmt.Sprintf(\"%t\", needsMountProgram)), 0o600); err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\t\tif needsMountProgram {\n\t\t\treturn false, nil\n\t\t}\n\t\t// fall through to check if we find ourselves needing to use a\n\t\t// mount program now\n\t}\n\n\tfor _, dir := range []string{home, runhome} {\n\t\tif err := fileutils.Exists(dir); err != nil {\n\t\t\t_ = idtools.MkdirAllAndChown(dir, 0o700, idtools.IDPair{UID: 0, GID: 0})\n\t\t}\n\t}\n\n\tsupportsDType, _ := checkAndRecordOverlaySupport(home, runhome)\n\treturn supportsDType, nil\n}\n\nfunc supportsOverlay(home string, rootIDPair idtools.IDPair) (supportsDType bool, err error) {\n\tselinuxLabelTest := selinux.PrivContainerMountLabel()\n\n\tlogLevel := logrus.ErrorLevel\n\tif unshare.IsRootless() {\n\t\tlogLevel = logrus.DebugLevel\n\t}\n\n\tlayerDir, err := os.MkdirTemp(home, \"compat\")\n\tif err != nil {\n\t\tpatherr, ok := err.(*os.PathError)\n\t\tif ok && patherr.Err == syscall.ENOSPC {\n\t\t\treturn false, err\n\t\t}\n\t}\n\tif err == nil {\n\t\t// Check if reading the directory's contents populates the d_type field, which is required\n\t\t// for proper operation of the overlay filesystem.\n\t\tsupportsDType, err = fsutils.SupportsDType(layerDir)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif !supportsDType {\n\t\t\treturn false, overlayutils.ErrDTypeNotSupported(\"overlay\", backingFs)\n\t\t}\n\n\t\t// Try a test mount in the specific location we're looking at using.\n\t\tmergedDir := filepath.Join(layerDir, \"merged\")\n\t\tmergedSubdir := filepath.Join(mergedDir, \"subdir\")\n\t\tlower1Dir := filepath.Join(layerDir, \"lower1\")\n\t\tlower2Dir := filepath.Join(layerDir, \"lower2\")\n\t\tlower2Subdir := filepath.Join(lower2Dir, \"subdir\")\n\t\tlower2SubdirFile := filepath.Join(lower2Subdir, \"file\")\n\t\tupperDir := filepath.Join(layerDir, \"upper\")\n\t\tworkDir := filepath.Join(layerDir, \"work\")\n\t\tdefer func() {\n\t\t\t// Permitted to fail, since the various subdirectories\n\t\t\t// can be empty or not even there, and the home might\n\t\t\t// legitimately be not empty\n\t\t\t_ = unix.Unmount(mergedDir, unix.MNT_DETACH)\n\t\t\t_ = os.RemoveAll(layerDir)\n\t\t\t_ = os.Remove(home)\n\t\t}()\n\t\t_ = idtools.MkdirAndChown(mergedDir, 0o700, rootIDPair)\n\t\t_ = idtools.MkdirAndChown(lower1Dir, 0o700, rootIDPair)\n\t\t_ = idtools.MkdirAndChown(lower2Dir, 0o700, rootIDPair)\n\t\t_ = idtools.MkdirAndChown(lower2Subdir, 0o700, rootIDPair)\n\t\t_ = idtools.MkdirAndChown(upperDir, 0o700, rootIDPair)\n\t\t_ = idtools.MkdirAndChown(workDir, 0o700, rootIDPair)\n\t\tf, err := os.Create(lower2SubdirFile)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Unable to create test file: %v\", err)\n\t\t\treturn supportsDType, fmt.Errorf(\"unable to create test file: %w\", err)\n\t\t}\n\t\tf.Close()\n\t\tflags := fmt.Sprintf(\"lowerdir=%s:%s,upperdir=%s,workdir=%s\", lower1Dir, lower2Dir, upperDir, workDir)\n\t\tif selinux.GetEnabled() &&\n\t\t\tselinux.SecurityCheckContext(selinuxLabelTest) == nil {\n\t\t\t// Linux 5.11 introduced unprivileged overlay mounts but it has an issue\n\t\t\t// when used together with selinux labels.\n\t\t\t// Check that overlay supports selinux labels as well.\n\t\t\tflags = label.FormatMountLabel(flags, selinuxLabelTest)\n\t\t}\n\t\tif unshare.IsRootless() {\n\t\t\tflags = fmt.Sprintf(\"%s,userxattr\", flags)\n\t\t}\n\t\tif err := syscall.Mknod(filepath.Join(upperDir, \"whiteout\"), syscall.S_IFCHR|0o600, int(unix.Mkdev(0, 0))); err != nil {\n\t\t\tlogrus.Debugf(\"Unable to create kernel-style whiteout: %v\", err)\n\t\t\treturn supportsDType, fmt.Errorf(\"unable to create kernel-style whiteout: %w\", err)\n\t\t}\n\n\t\tif len(flags) < unix.Getpagesize() {\n\t\t\terr := unix.Mount(\"overlay\", mergedDir, \"overlay\", 0, flags)\n\t\t\tif err == nil {\n\t\t\t\tif err = os.RemoveAll(mergedSubdir); err != nil {\n\t\t\t\t\tlogrus.StandardLogger().Logf(logLevel, \"overlay: removing an item from the merged directory failed: %v\", err)\n\t\t\t\t\treturn supportsDType, fmt.Errorf(\"kernel returned %v when we tried to delete an item in the merged directory: %w\", err, graphdriver.ErrNotSupported)\n\t\t\t\t}\n\t\t\t\tlogrus.Debugf(\"overlay: test mount with multiple lowers succeeded\")\n\t\t\t\treturn supportsDType, nil\n\t\t\t}\n\t\t\tlogrus.Debugf(\"overlay: test mount with multiple lowers failed: %v\", err)\n\t\t}\n\t\tflags = fmt.Sprintf(\"lowerdir=%s,upperdir=%s,workdir=%s\", lower1Dir, upperDir, workDir)\n\t\tif selinux.GetEnabled() {\n\t\t\tflags = label.FormatMountLabel(flags, selinuxLabelTest)\n\t\t}\n\t\tif len(flags) < unix.Getpagesize() {\n\t\t\terr := unix.Mount(\"overlay\", mergedDir, \"overlay\", 0, flags)\n\t\t\tif err == nil {\n\t\t\t\tlogrus.StandardLogger().Logf(logLevel, \"overlay: test mount with multiple lowers failed, but succeeded with a single lower\")\n\t\t\t\treturn supportsDType, fmt.Errorf(\"kernel too old to provide multiple lowers feature for overlay: %w\", graphdriver.ErrNotSupported)\n\t\t\t}\n\t\t\tlogrus.Debugf(\"overlay: test mount with a single lower failed: %v\", err)\n\t\t}\n\t\tlogrus.StandardLogger().Logf(logLevel, \"'overlay' is not supported over %s at %q\", backingFs, home)\n\t\treturn supportsDType, fmt.Errorf(\"'overlay' is not supported over %s at %q: %w\", backingFs, home, graphdriver.ErrIncompatibleFS)\n\t}\n\n\tlogrus.StandardLogger().Logf(logLevel, \"'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.\")\n\treturn supportsDType, fmt.Errorf(\"'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.: %w\", graphdriver.ErrNotSupported)\n}\n\nfunc (d *Driver) useNaiveDiff() bool {\n\tif d.usingComposefs {\n\t\treturn true\n\t}\n\n\tuseNaiveDiffLock.Do(func() {\n\t\tif d.options.mountProgram != \"\" {\n\t\t\tuseNaiveDiffOnly = true\n\t\t\treturn\n\t\t}\n\t\tfeature := fmt.Sprintf(\"native-diff(%s)\", d.options.mountOptions)\n\t\tnativeDiffCacheResult, nativeDiffCacheText, err := cachedFeatureCheck(d.runhome, feature)\n\t\tif err == nil {\n\t\t\tif nativeDiffCacheResult {\n\t\t\t\tlogrus.Debugf(\"Cached value indicated that native-diff is usable\")\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Cached value indicated that native-diff is not being used\")\n\t\t\t\tlogrus.Info(nativeDiffCacheText)\n\t\t\t}\n\t\t\tuseNaiveDiffOnly = !nativeDiffCacheResult\n\t\t\treturn\n\t\t}\n\t\tif err := doesSupportNativeDiff(d.home, d.options.mountOptions); err != nil {\n\t\t\tnativeDiffCacheText = fmt.Sprintf(\"Not using native diff for overlay, this may cause degraded performance for building images: %v\", err)\n\t\t\tlogrus.Info(nativeDiffCacheText)\n\t\t\tuseNaiveDiffOnly = true\n\t\t}\n\t\tif err := cachedFeatureRecord(d.runhome, feature, !useNaiveDiffOnly, nativeDiffCacheText); err != nil {\n\t\t\tlogrus.Warnf(\"Recording overlay native-diff support status: %v\", err)\n\t\t}\n\t})\n\treturn useNaiveDiffOnly\n}\n\nfunc (d *Driver) String() string {\n\treturn d.name\n}\n\n// Status returns current driver information in a two dimensional string array.\n// Output contains \"Backing Filesystem\" used in this implementation.\nfunc (d *Driver) Status() [][2]string {\n\tsupportsVolatile, err := d.getSupportsVolatile()\n\tif err != nil {\n\t\tsupportsVolatile = false\n\t}\n\treturn [][2]string{\n\t\t{\"Backing Filesystem\", backingFs},\n\t\t{\"Supports d_type\", strconv.FormatBool(d.supportsDType)},\n\t\t{\"Native Overlay Diff\", strconv.FormatBool(!d.useNaiveDiff())},\n\t\t{\"Using metacopy\", strconv.FormatBool(d.usingMetacopy)},\n\t\t{\"Supports shifting\", strconv.FormatBool(d.SupportsShifting(nil, nil))},\n\t\t{\"Supports volatile\", strconv.FormatBool(supportsVolatile)},\n\t}\n}\n\n// Metadata returns meta data about the overlay driver such as\n// LowerDir, UpperDir, WorkDir and MergeDir used to store data.\nfunc (d *Driver) Metadata(id string) (map[string]string, error) {\n\tdir, _, inAdditionalStore := d.dir2(id, false)\n\tif err := fileutils.Exists(dir); err != nil {\n\t\treturn nil, err\n\t}\n\n\tmetadata := map[string]string{\n\t\t\"WorkDir\":   path.Join(dir, \"work\"),\n\t\t\"MergedDir\": d.getMergedDir(id, dir, inAdditionalStore),\n\t\t\"UpperDir\":  path.Join(dir, \"diff\"),\n\t}\n\n\tlowerDirs, err := d.getLowerDirs(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(lowerDirs) > 0 {\n\t\tmetadata[\"LowerDir\"] = strings.Join(lowerDirs, \":\")\n\t}\n\n\treturn metadata, nil\n}\n\n// Cleanup any state created by overlay which should be cleaned when\n// the storage is being shutdown.  The only state created by the driver\n// is the bind mount on the home directory.\nfunc (d *Driver) Cleanup() error {\n\tanyPresent := d.pruneStagingDirectories()\n\tif anyPresent {\n\t\treturn nil\n\t}\n\treturn mount.Unmount(d.home)\n}\n\n// pruneStagingDirectories cleans up any staging directory that was leaked.\n// It returns whether any staging directory is still present.\nfunc (d *Driver) pruneStagingDirectories() bool {\n\td.stagingDirsLocksMutex.Lock()\n\tfor _, lock := range d.stagingDirsLocks {\n\t\tif err := lock.UnlockAndDelete(); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to unlock and delete staging lock file: %v\", err)\n\t\t}\n\t}\n\tclear(d.stagingDirsLocks)\n\td.stagingDirsLocksMutex.Unlock()\n\n\tanyPresent := false\n\n\tstagingDirBase := filepath.Join(d.homeDirForImageStore(), stagingDir)\n\tdirs, err := os.ReadDir(stagingDirBase)\n\tif err == nil {\n\t\tfor _, dir := range dirs {\n\t\t\tstagingDirToRemove := filepath.Join(stagingDirBase, dir.Name())\n\t\t\tlock, err := staging_lockfile.TryLockPath(filepath.Join(stagingDirToRemove, stagingLockFile))\n\t\t\tif err != nil {\n\t\t\t\tanyPresent = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t_ = os.RemoveAll(stagingDirToRemove)\n\t\t\tif err := lock.UnlockAndDelete(); err != nil {\n\t\t\t\tlogrus.Warnf(\"Failed to unlock and delete staging lock file: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\treturn anyPresent\n}\n\n// LookupAdditionalLayer looks up additional layer store by the specified\n// TOC digest and ref and returns an object representing that layer.\n// This API is experimental and can be changed without bumping the major version number.\n// TODO: to remove the comment once it's no longer experimental.\nfunc (d *Driver) LookupAdditionalLayer(tocDigest digest.Digest, ref string) (graphdriver.AdditionalLayer, error) {\n\tl, err := d.getAdditionalLayerPath(tocDigest, ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Tell the additional layer store that we use this layer.\n\t// This will increase reference counter on the store's side.\n\t// This will be decreased on Release() method.\n\tnotifyUseAdditionalLayer(l)\n\treturn &additionalLayer{\n\t\tpath: l,\n\t\td:    d,\n\t}, nil\n}\n\n// LookupAdditionalLayerByID looks up additional layer store by the specified\n// ID and returns an object representing that layer.\n// This API is experimental and can be changed without bumping the major version number.\n// TODO: to remove the comment once it's no longer experimental.\nfunc (d *Driver) LookupAdditionalLayerByID(id string) (graphdriver.AdditionalLayer, error) {\n\tl, err := d.getAdditionalLayerPathByID(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Tell the additional layer store that we use this layer.\n\t// This will increase reference counter on the store's side.\n\t// This will be decreased on Release() method.\n\tnotifyUseAdditionalLayer(l)\n\treturn &additionalLayer{\n\t\tpath: l,\n\t\td:    d,\n\t}, nil\n}\n\n// CreateFromTemplate creates a layer with the same contents and parent as another layer.\nfunc (d *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error {\n\tif readWrite {\n\t\treturn d.CreateReadWrite(id, template, opts)\n\t}\n\treturn d.Create(id, template, opts)\n}\n\n// CreateReadWrite creates a layer that is writable for use as a container\n// file system.\nfunc (d *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts) error {\n\tif opts != nil && len(opts.StorageOpt) != 0 && !projectQuotaSupported {\n\t\treturn fmt.Errorf(\"--storage-opt is supported only for overlay over xfs with 'pquota' mount option\")\n\t}\n\n\tif opts == nil {\n\t\topts = &graphdriver.CreateOpts{\n\t\t\tStorageOpt: map[string]string{},\n\t\t}\n\t}\n\n\tif d.options.forceMask != nil && d.options.mountProgram == \"\" {\n\t\treturn fmt.Errorf(\"overlay: force_mask option for writeable layers is only supported with a mount_program\")\n\t}\n\n\tif _, ok := opts.StorageOpt[\"size\"]; !ok {\n\t\tif opts.StorageOpt == nil {\n\t\t\topts.StorageOpt = map[string]string{}\n\t\t}\n\t\topts.StorageOpt[\"size\"] = strconv.FormatUint(d.options.quota.Size, 10)\n\t}\n\n\tif _, ok := opts.StorageOpt[\"inodes\"]; !ok {\n\t\tif opts.StorageOpt == nil {\n\t\t\topts.StorageOpt = map[string]string{}\n\t\t}\n\t\topts.StorageOpt[\"inodes\"] = strconv.FormatUint(d.options.quota.Inodes, 10)\n\t}\n\n\treturn d.create(id, parent, opts, false)\n}\n\n// Create is used to create the upper, lower, and merge directories required for overlay fs for a given id.\n// The parent filesystem is used to configure these directories for the overlay.\nfunc (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) (retErr error) {\n\tif opts != nil && len(opts.StorageOpt) != 0 {\n\t\tif _, ok := opts.StorageOpt[\"size\"]; ok {\n\t\t\treturn fmt.Errorf(\"--storage-opt size is only supported for ReadWrite Layers\")\n\t\t}\n\n\t\tif _, ok := opts.StorageOpt[\"inodes\"]; ok {\n\t\t\treturn fmt.Errorf(\"--storage-opt inodes is only supported for ReadWrite Layers\")\n\t\t}\n\t}\n\n\treturn d.create(id, parent, opts, true)\n}\n\n// getLayerPermissions returns the base permissions to use for the layer directories.\n// The first return value is the idPair to create the possible parent directories with.\n// The second return value is the mode how it should be stored on disk.\n// The third return value is the mode the layer expects to have which may be stored\n// in an xattr when using forceMask, without forceMask both values are the same.\nfunc (d *Driver) getLayerPermissions(parent string, uidMaps, gidMaps []idtools.IDMap) (idtools.IDPair, idtools.Stat, idtools.Stat, error) {\n\trootUID, rootGID, err := idtools.GetRootUIDGID(uidMaps, gidMaps)\n\tif err != nil {\n\t\treturn idtools.IDPair{}, idtools.Stat{}, idtools.Stat{}, err\n\t}\n\n\tidPair := idtools.IDPair{\n\t\tUID: rootUID,\n\t\tGID: rootGID,\n\t}\n\n\tst := idtools.Stat{IDs: idPair, Mode: defaultPerms}\n\n\tif parent != \"\" {\n\t\tparentBase := d.dir(parent)\n\t\tparentDiff := filepath.Join(parentBase, \"diff\")\n\t\tif xSt, err := idtools.GetContainersOverrideXattr(parentDiff); err == nil {\n\t\t\tst = xSt\n\t\t} else {\n\t\t\tsystemSt, err := system.Stat(parentDiff)\n\t\t\tif err != nil {\n\t\t\t\treturn idtools.IDPair{}, idtools.Stat{}, idtools.Stat{}, err\n\t\t\t}\n\t\t\tst.IDs.UID = int(systemSt.UID())\n\t\t\tst.IDs.GID = int(systemSt.GID())\n\t\t\tst.Mode = os.FileMode(systemSt.Mode())\n\t\t}\n\t}\n\n\tforcedSt := st\n\tif d.options.forceMask != nil {\n\t\tforcedSt.IDs = idPair\n\t\tforcedSt.Mode = *d.options.forceMask\n\t}\n\n\treturn idPair, forcedSt, st, nil\n}\n\nfunc (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts, readOnly bool) (retErr error) {\n\tdir, homedir, _ := d.dir2(id, readOnly)\n\n\tdisableQuota := readOnly\n\n\tvar uidMaps []idtools.IDMap\n\tvar gidMaps []idtools.IDMap\n\n\tif opts != nil && opts.IDMappings != nil {\n\t\tuidMaps = opts.IDMappings.UIDs()\n\t\tgidMaps = opts.IDMappings.GIDs()\n\t}\n\n\t// Make the link directory if it does not exist\n\tif err := idtools.MkdirAllAndChown(path.Join(homedir, linkDir), 0o755, idtools.IDPair{UID: 0, GID: 0}); err != nil {\n\t\treturn err\n\t}\n\n\tidPair, forcedSt, st, err := d.getLayerPermissions(parent, uidMaps, gidMaps)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := idtools.MkdirAllAndChownNew(path.Dir(dir), 0o755, idPair); err != nil {\n\t\treturn err\n\t}\n\n\tif err := fileutils.Lexists(dir); err == nil {\n\t\tlogrus.Warnf(\"Trying to create a layer %#v while directory %q already exists; removing it first\", id, dir)\n\t\t// Don’t just os.RemoveAll(dir) here; d.Remove also removes the link in linkDir,\n\t\t// so that we can’t end up with two symlinks in linkDir pointing to the same layer.\n\t\tif err := d.Remove(id); err != nil {\n\t\t\treturn fmt.Errorf(\"removing a pre-existing layer directory %q: %w\", dir, err)\n\t\t}\n\t}\n\n\tif err := idtools.MkdirAllAndChownNew(dir, 0o700, idPair); err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\t// Clean up on failure\n\t\tif retErr != nil {\n\t\t\tif err2 := os.RemoveAll(dir); err2 != nil {\n\t\t\t\tlogrus.Errorf(\"While recovering from a failure creating a layer, error deleting %#v: %v\", dir, err2)\n\t\t\t}\n\t\t}\n\t}()\n\n\tif d.quotaCtl != nil && !disableQuota {\n\t\tquota := quota.Quota{}\n\t\tif opts != nil && len(opts.StorageOpt) > 0 {\n\t\t\tdriver := &Driver{}\n\t\t\tif err := d.parseStorageOpt(opts.StorageOpt, driver); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif driver.options.quota.Size > 0 {\n\t\t\t\tquota.Size = driver.options.quota.Size\n\t\t\t}\n\t\t\tif driver.options.quota.Inodes > 0 {\n\t\t\t\tquota.Inodes = driver.options.quota.Inodes\n\t\t\t}\n\t\t}\n\t\t// Set container disk quota limit\n\t\t// If it is set to 0, we will track the disk usage, but not enforce a limit\n\t\tif err := d.quotaCtl.SetQuota(dir, quota); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tdiff := path.Join(dir, \"diff\")\n\tif err := idtools.MkdirAndChown(diff, forcedSt.Mode, forcedSt.IDs); err != nil {\n\t\treturn err\n\t}\n\n\tif d.options.forceMask != nil {\n\t\tst.Mode |= os.ModeDir\n\t\tif err := idtools.SetContainersOverrideXattr(diff, st); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tlid := generateID(idLength)\n\n\tlinkBase := path.Join(\"..\", id, \"diff\")\n\tif err := os.Symlink(linkBase, path.Join(homedir, linkDir, lid)); err != nil {\n\t\treturn err\n\t}\n\n\t// Write link id to link file\n\tif err := os.WriteFile(path.Join(dir, \"link\"), []byte(lid), 0o644); err != nil {\n\t\treturn err\n\t}\n\n\tif err := idtools.MkdirAndChown(path.Join(dir, \"work\"), 0o700, forcedSt.IDs); err != nil {\n\t\treturn err\n\t}\n\tif err := idtools.MkdirAndChown(path.Join(dir, \"merged\"), 0o700, forcedSt.IDs); err != nil {\n\t\treturn err\n\t}\n\n\t// if no parent directory, create a dummy lower directory and skip writing a \"lowers\" file\n\tif parent == \"\" {\n\t\treturn idtools.MkdirAndChown(path.Join(dir, \"empty\"), 0o700, forcedSt.IDs)\n\t}\n\n\tlower, err := d.getLower(parent)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif lower != \"\" {\n\t\tif err := os.WriteFile(path.Join(dir, lowerFile), []byte(lower), 0o666); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Parse overlay storage options\nfunc (d *Driver) parseStorageOpt(storageOpt map[string]string, driver *Driver) error {\n\t// Read size to set the disk project quota per container\n\tfor key, val := range storageOpt {\n\t\tkey := strings.ToLower(key)\n\t\tswitch key {\n\t\tcase \"size\":\n\t\t\tsize, err := units.RAMInBytes(val)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdriver.options.quota.Size = uint64(size)\n\t\tcase \"inodes\":\n\t\t\tinodes, err := strconv.ParseUint(val, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdriver.options.quota.Inodes = inodes\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unknown option %s\", key)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (d *Driver) getLower(parent string) (string, error) {\n\tparentDir := d.dir(parent)\n\n\t// Ensure parent exists\n\tif err := fileutils.Lexists(parentDir); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Read Parent link fileA\n\tparentLink, err := os.ReadFile(path.Join(parentDir, \"link\"))\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn \"\", err\n\t\t}\n\t\tlogrus.Warnf(\"Can't read parent link %q because it does not exist. Going through storage to recreate the missing links.\", path.Join(parentDir, \"link\"))\n\t\tif err := d.recreateSymlinks(); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"recreating the links: %w\", err)\n\t\t}\n\t\tparentLink, err = os.ReadFile(path.Join(parentDir, \"link\"))\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\tlowers := []string{path.Join(linkDir, string(parentLink))}\n\n\tparentLower, err := os.ReadFile(path.Join(parentDir, lowerFile))\n\tif err == nil {\n\t\tparentLowers := strings.SplitSeq(string(parentLower), \":\")\n\t\tlowers = slices.AppendSeq(lowers, parentLowers)\n\t}\n\treturn strings.Join(lowers, \":\"), nil\n}\n\nfunc (d *Driver) dir(id string) string {\n\tp, _, _ := d.dir2(id, false)\n\treturn p\n}\n\nfunc (d *Driver) getAllImageStores() []string {\n\tadditionalImageStores := d.AdditionalImageStores()\n\tif d.imageStore != \"\" {\n\t\tadditionalImageStores = append([]string{d.imageStore}, additionalImageStores...)\n\t}\n\treturn additionalImageStores\n}\n\n// homeDirForImageStore returns the home directory to use when an image store is configured\nfunc (d *Driver) homeDirForImageStore() string {\n\tif d.imageStore != \"\" {\n\t\treturn path.Join(d.imageStore, d.name)\n\t}\n\t// If there is not an image store configured, use the same\n\t// store\n\treturn d.home\n}\n\nfunc (d *Driver) dir2(id string, useImageStore bool) (string, string, bool) {\n\thomedir := d.home\n\tif useImageStore {\n\t\thomedir = d.homeDirForImageStore()\n\t}\n\tnewpath := path.Join(homedir, id)\n\tif err := fileutils.Exists(newpath); err != nil {\n\t\tfor _, p := range d.getAllImageStores() {\n\t\t\tl := path.Join(p, d.name, id)\n\t\t\terr = fileutils.Exists(l)\n\t\t\tif err == nil {\n\t\t\t\treturn l, homedir, true\n\t\t\t}\n\t\t}\n\t}\n\treturn newpath, homedir, false\n}\n\nfunc (d *Driver) getLowerDirs(id string) ([]string, error) {\n\tvar lowersArray []string\n\tlowers, err := os.ReadFile(path.Join(d.dir(id), lowerFile))\n\tif err == nil {\n\t\tfor s := range strings.SplitSeq(string(lowers), \":\") {\n\t\t\tlower := d.dir(s)\n\t\t\tlp, err := os.Readlink(lower)\n\t\t\t// if the link does not exist, we lost the symlinks during a sudden reboot.\n\t\t\t// Let's go ahead and recreate those symlinks.\n\t\t\tif err != nil {\n\t\t\t\tif os.IsNotExist(err) {\n\t\t\t\t\tlogrus.Warnf(\"Can't read link %q because it does not exist. A storage corruption might have occurred, attempting to recreate the missing symlinks. It might be best wipe the storage to avoid further errors due to storage corruption.\", lower)\n\t\t\t\t\tif err := d.recreateSymlinks(); err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"recreating the missing symlinks: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t\t// let's call Readlink on lower again now that we have recreated the missing symlinks\n\t\t\t\t\tlp, err = os.Readlink(lower)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t\tlowersArray = append(lowersArray, path.Clean(d.dir(path.Join(\"link\", lp))))\n\t\t}\n\t} else if !os.IsNotExist(err) {\n\t\treturn nil, err\n\t}\n\treturn lowersArray, nil\n}\n\nfunc (d *Driver) optsAppendMappings(opts string, uidMaps, gidMaps []idtools.IDMap) string {\n\tif uidMaps != nil {\n\t\tvar uids, gids bytes.Buffer\n\t\tif len(uidMaps) == 1 && uidMaps[0].Size == 1 {\n\t\t\tfmt.Fprintf(&uids, \"squash_to_uid=%d\", uidMaps[0].HostID)\n\t\t} else {\n\t\t\tuids.WriteString(\"uidmapping=\")\n\t\t\tfor _, i := range uidMaps {\n\t\t\t\tif uids.Len() > 0 {\n\t\t\t\t\tuids.WriteString(\":\")\n\t\t\t\t}\n\t\t\t\tfmt.Fprintf(&uids, \"%d:%d:%d\", i.ContainerID, i.HostID, i.Size)\n\t\t\t}\n\t\t}\n\t\tif len(gidMaps) == 1 && gidMaps[0].Size == 1 {\n\t\t\tfmt.Fprintf(&gids, \"squash_to_gid=%d\", gidMaps[0].HostID)\n\t\t} else {\n\t\t\tgids.WriteString(\"gidmapping=\")\n\t\t\tfor _, i := range gidMaps {\n\t\t\t\tif gids.Len() > 0 {\n\t\t\t\t\tgids.WriteString(\":\")\n\t\t\t\t}\n\t\t\t\tfmt.Fprintf(&gids, \"%d:%d:%d\", i.ContainerID, i.HostID, i.Size)\n\t\t\t}\n\t\t}\n\t\treturn fmt.Sprintf(\"%s,%s,%s\", opts, uids.String(), gids.String())\n\t}\n\treturn opts\n}\n\n// Remove cleans the directories that are created for this id.\nfunc (d *Driver) Remove(id string) error {\n\treturn d.removeCommon(id, system.EnsureRemoveAll)\n}\n\nfunc (d *Driver) removeCommon(id string, cleanup func(string) error) error {\n\tdir := d.dir(id)\n\tlid, err := os.ReadFile(path.Join(dir, \"link\"))\n\tif err == nil {\n\t\tlinkPath := path.Join(d.home, linkDir, string(lid))\n\t\tif err := cleanup(linkPath); err != nil {\n\t\t\tlogrus.Debugf(\"Failed to remove link: %v\", err)\n\t\t}\n\t}\n\n\td.releaseAdditionalLayerByID(id)\n\n\tif err := cleanup(dir); err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\tif d.quotaCtl != nil {\n\t\td.quotaCtl.ClearQuota(dir)\n\t\tif d.imageStore != \"\" {\n\t\t\td.quotaCtl.ClearQuota(d.imageStore)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (d *Driver) GetTempDirRootDirs() []string {\n\ttempDirs := []string{filepath.Join(d.home, tempDirName)}\n\t// Include imageStore temp directory if it's configured\n\t// Writable layers can only be in d.home or d.imageStore, not in additional image stores\n\tif d.imageStore != \"\" {\n\t\ttempDirs = append(tempDirs, filepath.Join(d.imageStore, d.name, tempDirName))\n\t}\n\treturn tempDirs\n}\n\n// Determine the correct temp directory root based on where the layer actually exists.\nfunc (d *Driver) getTempDirRoot(id string) string {\n\tlayerDir := d.dir(id)\n\tif d.imageStore != \"\" {\n\t\texpectedLayerDir := path.Join(d.imageStore, d.name, id)\n\t\tif layerDir == expectedLayerDir {\n\t\t\treturn filepath.Join(d.imageStore, d.name, tempDirName)\n\t\t}\n\t}\n\treturn filepath.Join(d.home, tempDirName)\n}\n\n// getTempDirRootForNewLayer returns the correct temp directory root based on where\n// the layer should be created.\n//\n// This must be kept in sync with GetTempDirRootDirs().\nfunc (d *Driver) getTempDirRootForNewLayer() string {\n\treturn filepath.Join(d.homeDirForImageStore(), tempDirName)\n}\n\nfunc (d *Driver) DeferredRemove(id string) (tempdir.CleanupTempDirFunc, error) {\n\ttempDirRoot := d.getTempDirRoot(id)\n\tt, err := tempdir.NewTempDir(tempDirRoot)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := d.removeCommon(id, t.StageDeletion); err != nil {\n\t\treturn t.Cleanup, fmt.Errorf(\"failed to add to stage directory: %w\", err)\n\t}\n\treturn t.Cleanup, nil\n}\n\n// recreateSymlinks goes through the driver's home directory and checks if the diff directory\n// under each layer has a symlink created for it under the linkDir. If the symlink does not\n// exist, it creates them\nfunc (d *Driver) recreateSymlinks() error {\n\t// We have at most 3 corrective actions per layer, so 10 iterations is plenty.\n\tconst maxIterations = 10\n\n\t// List all the directories under the home directory\n\tdirs, err := os.ReadDir(d.home)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"reading driver home directory %q: %w\", d.home, err)\n\t}\n\t// This makes the link directory if it doesn't exist\n\tif err := idtools.MkdirAllAndChown(path.Join(d.home, linkDir), 0o755, idtools.IDPair{UID: 0, GID: 0}); err != nil {\n\t\treturn err\n\t}\n\t// Keep looping as long as we take some corrective action in each iteration\n\tvar errs error\n\tmadeProgress := true\n\titerations := 0\n\tfor madeProgress {\n\t\terrs = nil\n\t\tmadeProgress = false\n\t\t// Check that for each layer, there's a link in \"l\" with the name in\n\t\t// the layer's \"link\" file that points to the layer's \"diff\" directory.\n\t\tfor _, dir := range dirs {\n\t\t\t// Skip over the linkDir, stagingDir, tempDirName and anything that is not a directory\n\t\t\tif dir.Name() == linkDir || dir.Name() == stagingDir || dir.Name() == tempDirName || !dir.IsDir() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Read the \"link\" file under each layer to get the name of the symlink\n\t\t\tdata, err := os.ReadFile(path.Join(d.dir(dir.Name()), \"link\"))\n\t\t\tif err != nil {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"reading name of symlink for %q: %w\", dir.Name(), err))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlinkPath := path.Join(d.home, linkDir, strings.Trim(string(data), \"\\n\"))\n\t\t\t// Check if the symlink exists, and if it doesn't, create it again with the\n\t\t\t// name we got from the \"link\" file\n\t\t\terr = fileutils.Lexists(linkPath)\n\t\t\tif err != nil && os.IsNotExist(err) {\n\t\t\t\tif err := os.Symlink(path.Join(\"..\", dir.Name(), \"diff\"), linkPath); err != nil {\n\t\t\t\t\terrs = errors.Join(errs, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tmadeProgress = true\n\t\t\t} else if err != nil {\n\t\t\t\terrs = errors.Join(errs, err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// linkDirFullPath is the full path to the linkDir\n\t\tlinkDirFullPath := filepath.Join(d.home, \"l\")\n\t\t// Now check if we somehow lost a \"link\" file, by making sure\n\t\t// that each symlink we have corresponds to one.\n\t\tlinks, err := os.ReadDir(linkDirFullPath)\n\t\tif err != nil {\n\t\t\terrs = errors.Join(errs, err)\n\t\t\tcontinue\n\t\t}\n\t\t// Go through all of the symlinks in the \"l\" directory\n\t\tfor _, link := range links {\n\t\t\t// Read the symlink's target, which should be \"../$layer/diff\"\n\t\t\ttarget, err := os.Readlink(filepath.Join(linkDirFullPath, link.Name()))\n\t\t\tif err != nil {\n\t\t\t\terrs = errors.Join(errs, err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttargetComponents := strings.Split(target, string(os.PathSeparator))\n\t\t\tif len(targetComponents) != 3 || targetComponents[0] != \"..\" || targetComponents[2] != \"diff\" {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"link target of %q looks weird: %q\", link, target))\n\t\t\t\t// force the link to be recreated on the next pass\n\t\t\t\tif err := os.Remove(filepath.Join(linkDirFullPath, link.Name())); err != nil {\n\t\t\t\t\tif !os.IsNotExist(err) {\n\t\t\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"removing link %q: %w\", link, err))\n\t\t\t\t\t} // else don’t report any error, but also don’t set madeProgress.\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tmadeProgress = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Reconstruct the name of the target's link file and check that\n\t\t\t// it has the basename of our symlink in it.\n\t\t\ttargetID := targetComponents[1]\n\t\t\tlinkFile := filepath.Join(d.dir(targetID), \"link\")\n\t\t\tdata, err := os.ReadFile(linkFile)\n\t\t\tif err != nil || string(data) != link.Name() {\n\t\t\t\t// NOTE: If two or more links point to the same target, we will update linkFile\n\t\t\t\t// with every value of link.Name(), and set madeProgress = true every time.\n\t\t\t\tif err := os.WriteFile(linkFile, []byte(link.Name()), 0o644); err != nil {\n\t\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"correcting link for layer %s: %w\", targetID, err))\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tmadeProgress = true\n\t\t\t}\n\t\t}\n\t\titerations++\n\t\tif iterations >= maxIterations {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"reached %d iterations in overlay graph driver’s recreateSymlink, giving up\", iterations))\n\t\t\tbreak\n\t\t}\n\t}\n\treturn errs\n}\n\n// Get creates and mounts the required file system for the given id and returns the mount path.\nfunc (d *Driver) Get(id string, options graphdriver.MountOpts) (string, error) {\n\treturn d.get(id, false, options)\n}\n\nfunc (d *Driver) get(id string, disableShifting bool, options graphdriver.MountOpts) (_ string, retErr error) {\n\tdir, _, inAdditionalStore := d.dir2(id, false)\n\tif err := fileutils.Exists(dir); err != nil {\n\t\treturn \"\", err\n\t}\n\tif _, err := redirectDiffIfAdditionalLayer(path.Join(dir, \"diff\"), true); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// user namespace requires this to move a directory from lower to upper.\n\trootUID, rootGID, err := idtools.GetRootUIDGID(options.UidMaps, options.GidMaps)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\trootIDs := idtools.IDPair{UID: rootUID, GID: rootGID}\n\n\tmergedDir := d.getMergedDir(id, dir, inAdditionalStore)\n\t// Attempt to create the merged dir if it doesn't exist, but don't chown an already existing directory (it might be in an additional store)\n\tif err := idtools.MkdirAllAndChownNew(mergedDir, 0o700, rootIDs); err != nil && !os.IsExist(err) {\n\t\treturn \"\", err\n\t}\n\n\tif count := d.ctr.Increment(mergedDir); count > 1 {\n\t\treturn mergedDir, nil\n\t}\n\tdefer func() {\n\t\tif retErr != nil {\n\t\t\tif c := d.ctr.Decrement(mergedDir); c <= 0 {\n\t\t\t\tif mntErr := unix.Unmount(mergedDir, 0); mntErr != nil {\n\t\t\t\t\t// Ignore EINVAL, it means the directory is not a mount point and it can happen\n\t\t\t\t\t// if the current function fails before the mount point is created.\n\t\t\t\t\tif !errors.Is(mntErr, unix.EINVAL) {\n\t\t\t\t\t\tlogrus.Errorf(\"Unmounting %v: %v\", mergedDir, mntErr)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}()\n\n\treadWrite := !inAdditionalStore\n\n\tif !d.SupportsShifting(options.UidMaps, options.GidMaps) || options.DisableShifting {\n\t\tdisableShifting = true\n\t}\n\n\tlogLevel := logrus.WarnLevel\n\tif unshare.IsRootless() {\n\t\tlogLevel = logrus.DebugLevel\n\t}\n\toptsList := options.Options\n\n\tneedsIDMapping := !disableShifting && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 && d.options.mountProgram == \"\"\n\n\tif len(optsList) == 0 {\n\t\tif d.options.mountOptions != \"\" {\n\t\t\toptsList = strings.Split(d.options.mountOptions, \",\")\n\t\t}\n\t} else {\n\t\t// If metacopy=on is present in d.options.mountOptions it must be present in the mount\n\t\t// options otherwise the kernel refuses to follow the metacopy xattr.\n\t\tif hasMetacopyOption(strings.Split(d.options.mountOptions, \",\")) && !hasMetacopyOption(options.Options) {\n\t\t\tif d.usingMetacopy {\n\t\t\t\tlogrus.StandardLogger().Logf(logrus.DebugLevel, \"Adding metacopy option, configured globally\")\n\t\t\t\toptsList = append(optsList, \"metacopy=on\")\n\t\t\t}\n\t\t}\n\t}\n\tif !d.usingMetacopy {\n\t\tif hasMetacopyOption(optsList) {\n\t\t\tif d.options.mountProgram == \"\" {\n\t\t\t\trelease := \"\"\n\t\t\t\tvar uts unix.Utsname\n\t\t\t\tif err := unix.Uname(&uts); err == nil {\n\t\t\t\t\trelease = \" \" + string(uts.Release[:]) + \" \" + string(uts.Version[:])\n\t\t\t\t}\n\t\t\t\tlogrus.StandardLogger().Logf(logLevel, \"Ignoring global metacopy option, not supported with booted kernel %s\", release)\n\t\t\t} else {\n\t\t\t\tlogrus.Debugf(\"Ignoring global metacopy option, the mount program doesn't support it\")\n\t\t\t}\n\t\t}\n\t\toptsList = slices.DeleteFunc(optsList, func(opt string) bool {\n\t\t\treturn opt == \"metacopy=on\"\n\t\t})\n\t}\n\n\tif slices.Contains(optsList, \"ro\") {\n\t\treadWrite = false\n\t}\n\n\tlowers, err := os.ReadFile(path.Join(dir, lowerFile))\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn \"\", err\n\t}\n\tsplitLowers := strings.Split(string(lowers), \":\")\n\tif len(splitLowers) > maxDepth {\n\t\treturn \"\", errors.New(\"max depth exceeded\")\n\t}\n\n\t// absLowers is the list of lowers as absolute paths.\n\tabsLowers := []string{}\n\n\tdiffN := 1\n\tperms := defaultPerms\n\tif d.options.forceMask != nil {\n\t\tperms = *d.options.forceMask\n\t}\n\tpermsKnown := false\n\tst, err := os.Stat(filepath.Join(dir, nameWithSuffix(\"diff\", diffN)))\n\tif err == nil {\n\t\tperms = st.Mode()\n\t\tpermsKnown = true\n\t}\n\tfor err == nil {\n\t\tabsLowers = append(absLowers, filepath.Join(dir, nameWithSuffix(\"diff\", diffN)))\n\t\tdiffN++\n\t\terr = fileutils.Exists(filepath.Join(dir, nameWithSuffix(\"diff\", diffN)))\n\t}\n\n\tidmappedMountProcessPid := -1\n\tif needsIDMapping {\n\t\tpid, cleanupFunc, err := idmap.CreateUsernsProcess(options.UidMaps, options.GidMaps)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tidmappedMountProcessPid = pid\n\t\tdefer cleanupFunc()\n\t}\n\n\tskipIDMappingLayers := make(map[string]string)\n\n\tcomposefsMounts := []string{}\n\tdefer func() {\n\t\tfor _, m := range composefsMounts {\n\t\t\tdefer func(m string) {\n\t\t\t\tif err := unix.Unmount(m, unix.MNT_DETACH); err != nil {\n\t\t\t\t\tlogrus.Warnf(\"Unmount %q: %v\", m, err)\n\t\t\t\t}\n\t\t\t}(m)\n\t\t}\n\t}()\n\n\tcomposeFsLayers := []string{}\n\tmaybeAddComposefsMount := func(lowerID string, i int, readWrite bool) (string, error) {\n\t\tcomposefsBlob := d.getComposefsData(lowerID)\n\t\tif err := fileutils.Exists(composefsBlob); err != nil {\n\t\t\tif os.IsNotExist(err) {\n\t\t\t\treturn \"\", nil\n\t\t\t}\n\t\t\treturn \"\", err\n\t\t}\n\t\tlogrus.Debugf(\"overlay: using composefs blob %s for lower %s\", composefsBlob, lowerID)\n\n\t\tif readWrite && i == 0 {\n\t\t\treturn \"\", fmt.Errorf(\"cannot mount a composefs layer as writeable\")\n\t\t}\n\n\t\tdest := d.getStorePrivateDirectory(id, dir, fmt.Sprintf(\"composefs-layers/%d\", i), inAdditionalStore)\n\t\tif err := os.MkdirAll(dest, 0o700); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\tif err := mountComposefsBlob(composefsBlob, dest); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tcomposefsMounts = append(composefsMounts, dest)\n\t\tcomposeFsPath, err := d.getDiffPath(lowerID)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tcomposeFsLayers = append(composeFsLayers, composeFsPath)\n\t\tskipIDMappingLayers[composeFsPath] = composeFsPath\n\t\treturn dest, nil\n\t}\n\n\tdiffDir := path.Join(dir, \"diff\")\n\n\tif dest, err := maybeAddComposefsMount(id, 0, readWrite); err != nil {\n\t\treturn \"\", err\n\t} else if dest != \"\" {\n\t\tdiffDir = dest\n\t}\n\n\t// For each lower, resolve its path, and append it and any additional diffN\n\t// directories to the lowers list.\n\tfor i, l := range splitLowers {\n\t\tif l == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tlower := \"\"\n\t\tnewpath := path.Join(d.home, l)\n\t\tif st, err := os.Stat(newpath); err != nil {\n\t\t\tfor _, p := range d.getAllImageStores() {\n\t\t\t\tlower = path.Join(p, d.name, l)\n\t\t\t\tif st2, err2 := os.Stat(lower); err2 == nil {\n\t\t\t\t\tif !permsKnown {\n\t\t\t\t\t\tperms = st2.Mode()\n\t\t\t\t\t\tpermsKnown = true\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tlower = \"\"\n\t\t\t}\n\t\t\t// if it is a \"not found\" error, that means the symlinks were lost in a sudden reboot\n\t\t\t// so call the recreateSymlinks function to go through all the layer dirs and recreate\n\t\t\t// the symlinks with the name from their respective \"link\" files\n\t\t\tif lower == \"\" && os.IsNotExist(err) {\n\t\t\t\tlogrus.Warnf(\"Can't stat lower layer %q because it does not exist. Going through storage to recreate the missing symlinks.\", newpath)\n\t\t\t\tif err := d.recreateSymlinks(); err != nil {\n\t\t\t\t\treturn \"\", fmt.Errorf(\"recreating the missing symlinks: %w\", err)\n\t\t\t\t}\n\t\t\t\tlower = newpath\n\t\t\t} else if lower == \"\" {\n\t\t\t\treturn \"\", fmt.Errorf(\"can't stat lower layer %q: %w\", newpath, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif !permsKnown {\n\t\t\t\tperms = st.Mode()\n\t\t\t\tpermsKnown = true\n\t\t\t}\n\t\t\tlower = newpath\n\t\t}\n\n\t\tlinkContent, err := os.Readlink(lower)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tlowerID := filepath.Base(filepath.Dir(linkContent))\n\t\tcomposefsMount, err := maybeAddComposefsMount(lowerID, i+1, readWrite)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif composefsMount != \"\" {\n\t\t\tif needsIDMapping {\n\t\t\t\tif err := idmap.CreateIDMappedMount(composefsMount, composefsMount, idmappedMountProcessPid); err != nil {\n\t\t\t\t\treturn \"\", fmt.Errorf(\"create mapped mount for %q: %w\", composefsMount, err)\n\t\t\t\t}\n\t\t\t\tskipIDMappingLayers[composefsMount] = composefsMount\n\t\t\t\t// overlay takes a reference on the mount, so it is safe to unmount\n\t\t\t\t// the mapped idmounts as soon as the final overlay file system is mounted.\n\t\t\t\tdefer func() {\n\t\t\t\t\tif err := unix.Unmount(composefsMount, unix.MNT_DETACH); err != nil {\n\t\t\t\t\t\tlogrus.Warnf(\"Unmount %q: %v\", composefsMount, err)\n\t\t\t\t\t}\n\t\t\t\t}()\n\t\t\t}\n\t\t\tabsLowers = append(absLowers, composefsMount)\n\t\t\tcontinue\n\t\t}\n\n\t\tabsLowers = append(absLowers, lower)\n\t\tdiffN = 1\n\t\terr = fileutils.Exists(dumbJoin(lower, \"..\", nameWithSuffix(\"diff\", diffN)))\n\t\tfor err == nil {\n\t\t\tabsLowers = append(absLowers, dumbJoin(lower, \"..\", nameWithSuffix(\"diff\", diffN)))\n\t\t\tdiffN++\n\t\t\terr = fileutils.Exists(dumbJoin(lower, \"..\", nameWithSuffix(\"diff\", diffN)))\n\t\t}\n\t}\n\n\tif len(composeFsLayers) > 0 {\n\t\toptsList = append(optsList, \"metacopy=on\", \"redirect_dir=on\")\n\t}\n\n\tif len(absLowers) == 0 {\n\t\tabsLowers = append(absLowers, path.Join(dir, \"empty\"))\n\t}\n\n\tif err := idtools.MkdirAllAndChown(diffDir, perms, rootIDs); err != nil {\n\t\tif !inAdditionalStore {\n\t\t\treturn \"\", err\n\t\t}\n\t\t// if it is in an additional store, do not fail if the directory already exists\n\t\tif err2 := fileutils.Exists(diffDir); err2 != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\n\tworkdir := path.Join(dir, \"work\")\n\n\tif d.options.mountProgram == \"\" && unshare.IsRootless() {\n\t\toptsList = append(optsList, \"userxattr\")\n\t}\n\n\tif options.Volatile && !slices.Contains(optsList, \"volatile\") {\n\t\tsupported, err := d.getSupportsVolatile()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\t// If \"volatile\" is not supported by the file system, just ignore the request\n\t\tif supported {\n\t\t\toptsList = append(optsList, \"volatile\")\n\t\t}\n\t}\n\n\tif needsIDMapping {\n\t\tvar newAbsDir []string\n\t\tidMappedMounts := make(map[string]string)\n\n\t\tmappedRoot := filepath.Join(d.home, id, \"mapped\")\n\t\tif err := os.MkdirAll(mappedRoot, 0o700); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// rewrite the lower dirs to their idmapped mount.\n\t\tc := 0\n\t\tfor _, absLower := range absLowers {\n\t\t\tmappedMountSrc := getMappedMountRoot(absLower)\n\n\t\t\tif _, ok := skipIDMappingLayers[absLower]; ok {\n\t\t\t\tnewAbsDir = append(newAbsDir, absLower)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\troot, found := idMappedMounts[mappedMountSrc]\n\t\t\tif !found {\n\t\t\t\troot = filepath.Join(mappedRoot, fmt.Sprintf(\"%d\", c))\n\t\t\t\tc++\n\t\t\t\tif err := idmap.CreateIDMappedMount(mappedMountSrc, root, idmappedMountProcessPid); err != nil {\n\t\t\t\t\treturn \"\", fmt.Errorf(\"create mapped mount for %q on %q: %w\", mappedMountSrc, root, err)\n\t\t\t\t}\n\t\t\t\tidMappedMounts[mappedMountSrc] = root\n\n\t\t\t\t// overlay takes a reference on the mount, so it is safe to unmount\n\t\t\t\t// the mapped idmounts as soon as the final overlay file system is mounted.\n\t\t\t\tdefer func() {\n\t\t\t\t\tif err := unix.Unmount(root, unix.MNT_DETACH); err != nil {\n\t\t\t\t\t\tlogrus.Warnf(\"Unmount %q: %v\", root, err)\n\t\t\t\t\t}\n\t\t\t\t}()\n\t\t\t}\n\n\t\t\t// relative path to the layer through the id mapped mount\n\t\t\trel, err := filepath.Rel(mappedMountSrc, absLower)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\n\t\t\tnewAbsDir = append(newAbsDir, filepath.Join(root, rel))\n\t\t}\n\t\tabsLowers = newAbsDir\n\t}\n\n\tlowerDirs := strings.Join(absLowers, \":\")\n\tif len(composeFsLayers) > 0 {\n\t\tsep := \"::\"\n\t\tsupportsDataOnly, err := d.getSupportsDataOnly()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif !supportsDataOnly {\n\t\t\tsep = \":\"\n\t\t}\n\t\tcomposeFsLayersLowerDirs := strings.Join(composeFsLayers, sep)\n\t\tlowerDirs = lowerDirs + sep + composeFsLayersLowerDirs\n\t}\n\t// absLowers is not valid anymore now as we have added composeFsLayers to it, so prevent\n\t// its usage.\n\tabsLowers = nil //nolint:ineffassign\n\n\tvar opts string\n\tif readWrite {\n\t\topts = fmt.Sprintf(\"lowerdir=%s,upperdir=%s,workdir=%s\", lowerDirs, diffDir, workdir)\n\t} else {\n\t\topts = fmt.Sprintf(\"lowerdir=%s:%s\", diffDir, lowerDirs)\n\t}\n\tif len(optsList) > 0 {\n\t\topts = fmt.Sprintf(\"%s,%s\", opts, strings.Join(optsList, \",\"))\n\t}\n\n\tmountData := label.FormatMountLabel(opts, options.MountLabel)\n\tmountFunc := unix.Mount\n\tmountTarget := mergedDir\n\n\tpageSize := unix.Getpagesize()\n\n\tif d.options.mountProgram != \"\" {\n\t\tmountFunc = func(source string, target string, mType string, flags uintptr, label string) error {\n\t\t\tif !disableShifting {\n\t\t\t\tlabel = d.optsAppendMappings(label, options.UidMaps, options.GidMaps)\n\t\t\t}\n\n\t\t\t// if forceMask is in place, tell fuse-overlayfs to write the permissions mask to an unprivileged xattr as well.\n\t\t\tif d.options.forceMask != nil {\n\t\t\t\tlabel = label + \",xattr_permissions=2\"\n\t\t\t}\n\n\t\t\tmountProgram := exec.Command(d.options.mountProgram, \"-o\", label, target)\n\t\t\tmountProgram.Dir = d.home\n\t\t\tvar b bytes.Buffer\n\t\t\tmountProgram.Stderr = &b\n\t\t\terr := mountProgram.Run()\n\t\t\tif err != nil {\n\t\t\t\toutput := b.String()\n\t\t\t\tif output == \"\" {\n\t\t\t\t\toutput = \"<stderr empty>\"\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"using mount program %s: %s: %w\", d.options.mountProgram, output, err)\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t} else if len(mountData) >= pageSize {\n\t\t// Use mountFrom when the mount data has exceeded the page size. The mount syscall fails if\n\t\t// the mount data cannot fit within a page and relative links make the mount data much\n\t\t// smaller at the expense of requiring a fork exec to chdir().\n\t\tif readWrite {\n\t\t\tdiffDir := path.Join(id, \"diff\")\n\t\t\tworkDir := path.Join(id, \"work\")\n\t\t\topts = fmt.Sprintf(\"lowerdir=%s,upperdir=%s,workdir=%s\", lowerDirs, diffDir, workDir)\n\t\t} else {\n\t\t\topts = fmt.Sprintf(\"lowerdir=%s:%s\", diffDir, lowerDirs)\n\t\t}\n\t\tif len(optsList) > 0 {\n\t\t\topts = strings.Join(append([]string{opts}, optsList...), \",\")\n\t\t}\n\t\tmountData = label.FormatMountLabel(opts, options.MountLabel)\n\t\tmountFunc = func(source string, target string, mType string, flags uintptr, label string) error {\n\t\t\treturn mountOverlayFrom(d.home, source, target, mType, flags, label)\n\t\t}\n\t\tif !inAdditionalStore {\n\t\t\tmountTarget = path.Join(id, \"merged\")\n\t\t}\n\t}\n\n\t// overlay has a check in place to prevent mounting the same file system twice\n\t// if volatile was already specified. Yes, the kernel repeats the \"work\" component.\n\terr = os.RemoveAll(filepath.Join(workdir, \"work\", \"incompat\", \"volatile\"))\n\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn \"\", err\n\t}\n\n\tflags, data := mount.ParseOptions(mountData)\n\tlogrus.Debugf(\"overlay: mount_data=%s\", mountData)\n\tif err := mountFunc(\"overlay\", mountTarget, \"overlay\", uintptr(flags), data); err != nil {\n\t\treturn \"\", fmt.Errorf(\"creating overlay mount to %s, mount_data=%q: %w\", mountTarget, mountData, err)\n\t}\n\n\treturn mergedDir, nil\n}\n\n// getStorePrivateDirectory returns a directory path for storing data that requires exclusive access.\n// If 'inAdditionalStore' is true, the path will be under the rundir, otherwise it will be placed in\n// the primary store.\nfunc (d *Driver) getStorePrivateDirectory(id, layerDir, subdir string, inAdditionalStore bool) string {\n\tif inAdditionalStore {\n\t\treturn path.Join(d.runhome, id, subdir)\n\t}\n\treturn path.Join(layerDir, subdir)\n}\n\n// getMergedDir returns the directory path that should be used as the mount point for the overlayfs.\nfunc (d *Driver) getMergedDir(id, dir string, inAdditionalStore bool) string {\n\t// Ordinarily, .Get() (layer mounting) callers are supposed to guarantee exclusion.\n\t//\n\t// But additional stores are initialized with RO locks and don’t support a write\n\t// lock operation at all; and naiveDiff operations cause mounts/unmounts, so they might\n\t// happen on code paths where we might only holding a RO lock for the additional store.\n\t// To prevent races with other processes mounting or unmounting the layer,\n\t// use a private directory under the main store rundir, not the \"merged\" directory inside the\n\t// original layer store holding the layer data.\n\t//\n\t// To support this, contrary to the _general_ locking rules for .Diff / .Changes (which allow a RO lock),\n\t// the top-level Store implementation uses an exclusive lock for the primary layer store;\n\t// and since the rundir cannot be shared for different stores, it is safe to assume the\n\t// current process has exclusive access to it.\n\t//\n\t// TO DO: LOCKING BUG: the .DiffSize operation does not currently hold an exclusive lock on the primary store.\n\t// (_Some_ of the callers might be better ported to use a metadata-only size computation instead of DiffSize,\n\t// but DiffSize probably needs to remain for computing sizes of container’s RW layers.)\n\treturn d.getStorePrivateDirectory(id, dir, \"merged\", inAdditionalStore)\n}\n\n// Put unmounts the mount path created for the give id.\nfunc (d *Driver) Put(id string) error {\n\tdir, _, inAdditionalStore := d.dir2(id, false)\n\tif err := fileutils.Exists(dir); err != nil {\n\t\treturn err\n\t}\n\tmountpoint := d.getMergedDir(id, dir, inAdditionalStore)\n\n\tif count := d.ctr.Decrement(mountpoint); count > 0 {\n\t\treturn nil\n\t}\n\tif err := fileutils.Exists(path.Join(dir, lowerFile)); err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\n\tunmounted := false\n\n\tmappedRoot := filepath.Join(d.home, id, \"mapped\")\n\t// It should not happen, but cleanup any mapped mount if it was leaked.\n\tif err := fileutils.Exists(mappedRoot); err == nil {\n\t\tmounts, err := os.ReadDir(mappedRoot)\n\t\tif err == nil {\n\t\t\t// Go through all of the mapped mounts.\n\t\t\tfor _, m := range mounts {\n\t\t\t\t_ = unix.Unmount(filepath.Join(mappedRoot, m.Name()), unix.MNT_DETACH)\n\t\t\t}\n\t\t}\n\t}\n\n\tif d.options.mountProgram != \"\" {\n\t\t// Attempt to unmount the FUSE mount using either fusermount or fusermount3.\n\t\t// If they fail, fallback to unix.Unmount\n\t\tfor _, v := range []string{\"fusermount3\", \"fusermount\"} {\n\t\t\terr := exec.Command(v, \"-u\", mountpoint).Run()\n\t\t\tif err != nil && !errors.Is(err, exec.ErrNotFound) {\n\t\t\t\tlogrus.Debugf(\"Error unmounting %s with %s - %v\", mountpoint, v, err)\n\t\t\t}\n\t\t\tif err == nil {\n\t\t\t\tunmounted = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// If fusermount|fusermount3 failed to unmount the FUSE file system, make sure all\n\t\t// pending changes are propagated to the file system\n\t\tif !unmounted {\n\t\t\tfd, err := unix.Open(mountpoint, unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\t\t\tif err == nil {\n\t\t\t\tif err := unix.Syncfs(fd); err != nil {\n\t\t\t\t\tlogrus.Debugf(\"Error Syncfs(%s) - %v\", mountpoint, err)\n\t\t\t\t}\n\t\t\t\tunix.Close(fd)\n\t\t\t}\n\t\t}\n\t}\n\n\tif !unmounted {\n\t\tif err := unix.Unmount(mountpoint, unix.MNT_DETACH); err != nil && !os.IsNotExist(err) {\n\t\t\tlogrus.Debugf(\"Failed to unmount %s overlay: %s - %v\", id, mountpoint, err)\n\t\t\tif !errors.Is(err, unix.EINVAL) {\n\t\t\t\treturn fmt.Errorf(\"unmounting %q: %w\", mountpoint, err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif inAdditionalStore {\n\t\t// check the base name for extra safety\n\t\tif strings.HasPrefix(mountpoint, d.runhome) && filepath.Base(mountpoint) == \"merged\" {\n\t\t\terr := os.RemoveAll(filepath.Dir(mountpoint))\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Warningf(\"Failed to remove mountpoint %s overlay: %s: %v\", id, mountpoint, err)\n\t\t\t}\n\t\t}\n\t} else {\n\t\tidPair := idtools.IDPair{UID: 0, GID: 0}\n\t\tfi, err := os.Stat(mountpoint)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif stat, ok := fi.Sys().(*syscall.Stat_t); ok {\n\t\t\tidPair = idtools.IDPair{UID: int(stat.Uid), GID: int(stat.Gid)}\n\t\t}\n\n\t\ttmpMountpoint := path.Join(dir, \"merged.1\")\n\t\tif err := idtools.MkdirAndChown(tmpMountpoint, 0o700, idPair); err != nil && !errors.Is(err, os.ErrExist) {\n\t\t\treturn err\n\t\t}\n\t\t// rename(2) can be used on an empty directory, as it is the mountpoint after umount, and it retains\n\t\t// its atomic semantic.  In this way the \"merged\" directory is never removed.\n\t\tif err := unix.Rename(tmpMountpoint, mountpoint); err != nil {\n\t\t\tlogrus.Debugf(\"Failed to replace mountpoint %s overlay: %s: %v\", id, mountpoint, err)\n\t\t\treturn fmt.Errorf(\"replacing mount point %q: %w\", mountpoint, err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// Exists checks to see if the id is already mounted.\nfunc (d *Driver) Exists(id string) bool {\n\terr := fileutils.Exists(d.dir(id))\n\treturn err == nil\n}\n\n// List layers (not including additional image stores)\nfunc (d *Driver) ListLayers() ([]string, error) {\n\tentries, err := os.ReadDir(d.home)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlayers := make([]string, 0)\n\n\tfor _, entry := range entries {\n\t\tid := entry.Name()\n\t\tswitch id {\n\t\tcase linkDir, stagingDir, tempDirName, quota.BackingFsBlockDeviceLink, mountProgramFlagFile:\n\t\t\t// expected, but not a layer. skip it\n\t\t\tcontinue\n\t\tdefault:\n\t\t\t// Does it look like a datadir directory?\n\t\t\tif !entry.IsDir() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlayers = append(layers, id)\n\t\t}\n\t}\n\treturn layers, nil\n}\n\n// isParent returns if the passed in parent is the direct parent of the passed in layer\nfunc (d *Driver) isParent(id, parent string) bool {\n\tlowers, err := d.getLowerDirs(id)\n\tif err != nil {\n\t\treturn false\n\t}\n\tif parent == \"\" && len(lowers) > 0 {\n\t\treturn false\n\t}\n\n\tparentDir := d.dir(parent)\n\tvar ld string\n\tif len(lowers) > 0 {\n\t\tld = filepath.Dir(lowers[0])\n\t}\n\tif ld == \"\" && parent == \"\" {\n\t\treturn true\n\t}\n\treturn ld == parentDir\n}\n\nfunc (d *Driver) getWhiteoutFormat() archive.WhiteoutFormat {\n\twhiteoutFormat := archive.OverlayWhiteoutFormat\n\tif d.options.mountProgram != \"\" {\n\t\t// If we are using a mount program, we are most likely running\n\t\t// as an unprivileged user that cannot use mknod, so fallback to the\n\t\t// AUFS whiteout format.\n\t\twhiteoutFormat = archive.AUFSWhiteoutFormat\n\t}\n\treturn whiteoutFormat\n}\n\ntype overlayFileGetter struct {\n\tdiffDirs        []string\n\tcomposefsMounts map[string]*os.File // map from diff dir to the directory with the composefs blob mounted\n}\n\nfunc (g *overlayFileGetter) Get(path string) (io.ReadCloser, error) {\n\tbuf := make([]byte, unix.PathMax)\n\tfor _, d := range g.diffDirs {\n\t\tif f, found := g.composefsMounts[d]; found {\n\t\t\t// there is no *at equivalent for getxattr, but it can be emulated by opening the file under /proc/self/fd/$FD/$PATH\n\t\t\tlen, err := unix.Getxattr(fmt.Sprintf(\"/proc/self/fd/%d/%s\", int(f.Fd()), path), \"trusted.overlay.redirect\", buf)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, unix.ENODATA) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn nil, &fs.PathError{Op: \"getxattr\", Path: path, Err: err}\n\t\t\t}\n\n\t\t\t// the xattr value is the path to the file in the composefs layer diff directory\n\t\t\treturn os.Open(filepath.Join(d, string(buf[:len])))\n\t\t}\n\n\t\tf, err := os.Open(filepath.Join(d, path))\n\t\tif err == nil {\n\t\t\treturn f, nil\n\t\t}\n\t}\n\tif len(g.diffDirs) > 0 {\n\t\treturn os.Open(filepath.Join(g.diffDirs[0], path))\n\t}\n\treturn nil, fmt.Errorf(\"%s: %w\", path, os.ErrNotExist)\n}\n\nfunc (g *overlayFileGetter) Close() (errs error) {\n\tfor _, f := range g.composefsMounts {\n\t\tif err := f.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, err)\n\t\t}\n\t\tif err := unix.Rmdir(f.Name()); err != nil {\n\t\t\terrs = errors.Join(errs, err)\n\t\t}\n\t}\n\treturn errs\n}\n\n// newStagingDir creates a new staging directory and returns the path to it.\nfunc (d *Driver) newStagingDir() (string, error) {\n\tstagingDirBase := filepath.Join(d.homeDirForImageStore(), stagingDir)\n\terr := os.MkdirAll(stagingDirBase, 0o700)\n\tif err != nil && !os.IsExist(err) {\n\t\treturn \"\", err\n\t}\n\treturn os.MkdirTemp(stagingDirBase, \"\")\n}\n\n// DiffGetter returns a FileGetCloser that can read files from the directory that\n// contains files for the layer differences, either for this layer, or one of our\n// lowers if we're just a template directory. Used for direct access for tar-split.\nfunc (d *Driver) DiffGetter(id string) (_ graphdriver.FileGetCloser, Err error) {\n\tp, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpaths, err := d.getLowerDiffPaths(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// map from diff dir to the directory with the composefs blob mounted\n\tcomposefsMounts := make(map[string]*os.File)\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\tfor _, f := range composefsMounts {\n\t\t\t\tf.Close()\n\t\t\t\tif err := unix.Rmdir(f.Name()); err != nil && !os.IsNotExist(err) {\n\t\t\t\t\tlogrus.Warnf(\"Failed to remove %s: %v\", f.Name(), err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}()\n\tdiffDirs := append([]string{p}, paths...)\n\tfor _, diffDir := range diffDirs {\n\t\t// diffDir has the form $GRAPH_ROOT/overlay/$ID/diff, so grab the $ID from the parent directory\n\t\tid := path.Base(path.Dir(diffDir))\n\t\tcomposefsData := d.getComposefsData(id)\n\t\tif fileutils.Exists(composefsData) != nil {\n\t\t\t// not a composefs layer, ignore it\n\t\t\tcontinue\n\t\t}\n\t\tfd, err := openComposefsMount(composefsData)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcomposefsMounts[diffDir] = os.NewFile(uintptr(fd), composefsData)\n\t}\n\treturn &overlayFileGetter{diffDirs: diffDirs, composefsMounts: composefsMounts}, nil\n}\n\n// CleanupStagingDirectory cleanups the staging directory.\nfunc (d *Driver) CleanupStagingDirectory(stagingDirectory string) error {\n\tparentStagingDir := filepath.Dir(stagingDirectory)\n\n\td.stagingDirsLocksMutex.Lock()\n\tif lock, ok := d.stagingDirsLocks[parentStagingDir]; ok {\n\t\tdelete(d.stagingDirsLocks, parentStagingDir)\n\t\tif err := lock.UnlockAndDelete(); err != nil {\n\t\t\td.stagingDirsLocksMutex.Unlock()\n\t\t\treturn err\n\t\t}\n\t}\n\td.stagingDirsLocksMutex.Unlock()\n\n\treturn os.RemoveAll(parentStagingDir)\n}\n\nfunc supportsDataOnlyLayersCached(home, runhome string) (bool, error) {\n\tfeature := \"dataonly-layers\"\n\toverlayCacheResult, _, err := cachedFeatureCheck(runhome, feature)\n\tif err == nil {\n\t\tif overlayCacheResult {\n\t\t\tlogrus.Debugf(\"Cached value indicated that data-only layers for overlay are supported\")\n\t\t\treturn true, nil\n\t\t}\n\t\tlogrus.Debugf(\"Cached value indicated that data-only layers for overlay are not supported\")\n\t\treturn false, nil\n\t}\n\tsupportsDataOnly, err := supportsDataOnlyLayers(home)\n\tif err2 := cachedFeatureRecord(runhome, feature, supportsDataOnly, \"\"); err2 != nil {\n\t\treturn false, fmt.Errorf(\"recording overlay data-only layers support status: %w\", err2)\n\t}\n\treturn supportsDataOnly, err\n}\n\n// ApplyDiffWithDiffer applies the changes in the new layer using the specified function\nfunc (d *Driver) ApplyDiffWithDiffer(options *graphdriver.ApplyDiffWithDifferOpts, differ graphdriver.Differ) (output graphdriver.DriverWithDifferOutput, errRet error) {\n\tvar idMappings *idtools.IDMappings\n\tvar forceMask *os.FileMode\n\n\tif options != nil {\n\t\tidMappings = options.Mappings\n\t\tforceMask = options.ForceMask\n\t}\n\tif d.options.forceMask != nil {\n\t\tforceMask = d.options.forceMask\n\t}\n\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\n\tlayerDir, err := d.newStagingDir()\n\tif err != nil {\n\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t}\n\tperms := defaultPerms\n\tif forceMask != nil {\n\t\tperms = *forceMask\n\t}\n\tapplyDir := filepath.Join(layerDir, \"dir\")\n\tif err := os.Mkdir(applyDir, perms); err != nil {\n\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t}\n\n\tlock, err := staging_lockfile.TryLockPath(filepath.Join(layerDir, stagingLockFile))\n\tif err != nil {\n\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t}\n\tdefer func() {\n\t\tif errRet != nil {\n\t\t\td.stagingDirsLocksMutex.Lock()\n\t\t\tdelete(d.stagingDirsLocks, layerDir)\n\t\t\td.stagingDirsLocksMutex.Unlock()\n\t\t\tif err := lock.UnlockAndDelete(); err != nil {\n\t\t\t\terrRet = errors.Join(errRet, err)\n\t\t\t}\n\t\t}\n\t}()\n\td.stagingDirsLocksMutex.Lock()\n\td.stagingDirsLocks[layerDir] = lock\n\td.stagingDirsLocksMutex.Unlock()\n\n\tlogrus.Debugf(\"Applying differ in %s\", applyDir)\n\n\tdifferOptions := graphdriver.DifferOptions{\n\t\tFormat: graphdriver.DifferOutputFormatDir,\n\t}\n\tif d.usingComposefs {\n\t\tdifferOptions.Format = graphdriver.DifferOutputFormatFlat\n\t\tdifferOptions.UseFsVerity = graphdriver.DifferFsVerityIfAvailable\n\t}\n\tout, err := differ.ApplyDiff(applyDir, &archive.TarOptions{\n\t\tUIDMaps:           idMappings.UIDs(),\n\t\tGIDMaps:           idMappings.GIDs(),\n\t\tIgnoreChownErrors: d.options.ignoreChownErrors,\n\t\tWhiteoutFormat:    d.getWhiteoutFormat(),\n\t\tInUserNS:          unshare.IsRootless(),\n\t\tForceMask:         forceMask,\n\t}, &differOptions)\n\n\tout.Target = applyDir\n\n\treturn out, err\n}\n\n// ApplyDiffFromStagingDirectory applies the changes using the specified staging directory.\nfunc (d *Driver) ApplyDiffFromStagingDirectory(id, parent string, diffOutput *graphdriver.DriverWithDifferOutput, options *graphdriver.ApplyDiffWithDifferOpts) (errRet error) {\n\tstagingDirectory := diffOutput.Target\n\tparentStagingDir := filepath.Dir(stagingDirectory)\n\n\tdefer func() {\n\t\td.stagingDirsLocksMutex.Lock()\n\t\tif lock, ok := d.stagingDirsLocks[parentStagingDir]; ok {\n\t\t\tdelete(d.stagingDirsLocks, parentStagingDir)\n\t\t\tif err := lock.UnlockAndDelete(); err != nil {\n\t\t\t\terrRet = errors.Join(errRet, err)\n\t\t\t}\n\t\t}\n\t\td.stagingDirsLocksMutex.Unlock()\n\t}()\n\n\tdiffPath, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If the current layer doesn't set the mode for the parent, override it with the parent layer's mode.\n\tif d.options.forceMask == nil && diffOutput.RootDirMode == nil && parent != \"\" {\n\t\tparentDiffPath, err := d.getDiffPath(parent)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparentSt, err := os.Stat(parentDiffPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := os.Chmod(stagingDirectory, parentSt.Mode()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif d.usingComposefs {\n\t\ttoc := diffOutput.Artifacts[tocArtifact]\n\t\tverityDigests := diffOutput.Artifacts[fsVerityDigestsArtifact].(map[string]string)\n\t\tif err := generateComposeFsBlob(verityDigests, toc, d.getComposefsData(id)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif err := os.RemoveAll(diffPath); err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\n\treturn os.Rename(stagingDirectory, diffPath)\n}\n\n// DifferTarget gets the location where files are stored for the layer.\nfunc (d *Driver) DifferTarget(id string) (string, error) {\n\treturn d.getDiffPath(id)\n}\n\n// StartStagingDiffToApply applies the new layer into a temporary directory.\n// It returns a CleanupTempDirFunc which can be nil or set regardless if the function return an error or not.\n// StagedAddition is only set when there is no error returned and the int64 value returns the size of the layer.\n// This can be done without holding the storage lock, if a parent is given the caller must check for existence\n// beforehand while holding a lock.\n//\n// This API is experimental and can be changed without bumping the major version number.\nfunc (d *Driver) StartStagingDiffToApply(parent string, options graphdriver.ApplyDiffOpts) (tempdir.CleanupTempDirFunc, *tempdir.StagedAddition, int64, error) {\n\ttempDirRoot := d.getTempDirRootForNewLayer()\n\tt, err := tempdir.NewTempDir(tempDirRoot)\n\tif err != nil {\n\t\treturn nil, nil, -1, err\n\t}\n\n\tsa, err := t.StageAddition()\n\tif err != nil {\n\t\treturn t.Cleanup, nil, -1, err\n\t}\n\n\t_, forcedSt, st, err := d.getLayerPermissions(parent, options.Mappings.UIDs(), options.Mappings.GIDs())\n\tif err != nil {\n\t\t// If we have a ENOENT it means the parent was removed which can happen as we are unlocked here.\n\t\t// In this case also wrap ErrLayerUnknown which some callers can handle to retry after recreating the parent.\n\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\terr = fmt.Errorf(\"parent layer %q: %w: %w\", parent, graphdriver.ErrLayerUnknown, err)\n\t\t}\n\t\treturn t.Cleanup, nil, -1, err\n\t}\n\n\tif err := idtools.MkdirAndChown(sa.Path, forcedSt.Mode, forcedSt.IDs); err != nil {\n\t\treturn t.Cleanup, nil, -1, err\n\t}\n\n\tif d.options.forceMask != nil {\n\t\tst.Mode |= os.ModeDir\n\t\tif err := idtools.SetContainersOverrideXattr(sa.Path, st); err != nil {\n\t\t\treturn t.Cleanup, nil, -1, err\n\t\t}\n\t}\n\n\tsize, err := d.applyDiff(sa.Path, options)\n\tif err != nil {\n\t\treturn t.Cleanup, nil, -1, err\n\t}\n\n\treturn t.Cleanup, sa, size, nil\n}\n\n// CommitStagedLayer that was created with StartStagingDiffToApply().\n//\n// This API is experimental and can be changed without bumping the major version number.\nfunc (d *Driver) CommitStagedLayer(id string, sa *tempdir.StagedAddition) error {\n\tapplyDir, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// The os.Rename() function used by CommitFunc errors when the target directory already\n\t// exists, as such delete the dir. The create() function creates it and it would be more\n\t// complicated to code in a way that it didn't create it.\n\tif err := os.Remove(applyDir); err != nil {\n\t\treturn err\n\t}\n\n\treturn sa.Commit(applyDir)\n}\n\n// ApplyDiff applies the new layer into a root\nfunc (d *Driver) ApplyDiff(id string, options graphdriver.ApplyDiffOpts) (size int64, err error) {\n\tapplyDir, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn d.applyDiff(applyDir, options)\n}\n\n// ApplyDiff applies the new layer into a root.\n// This can run concurrently with any other driver operations, as such it is the\n// callers responsibility to ensure the target path passed is safe to use if that is the case.\nfunc (d *Driver) applyDiff(target string, options graphdriver.ApplyDiffOpts) (size int64, err error) {\n\tidMappings := options.Mappings\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\n\tlogrus.Debugf(\"Applying tar in %s\", target)\n\t// Overlay doesn't need the parent id to apply the diff\n\tif err := untar(options.Diff, target, &archive.TarOptions{\n\t\tUIDMaps:           idMappings.UIDs(),\n\t\tGIDMaps:           idMappings.GIDs(),\n\t\tIgnoreChownErrors: d.options.ignoreChownErrors,\n\t\tForceMask:         d.options.forceMask,\n\t\tWhiteoutFormat:    d.getWhiteoutFormat(),\n\t\tInUserNS:          unshare.IsRootless(),\n\t}); err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn directory.Size(target)\n}\n\nfunc (d *Driver) getComposefsData(id string) string {\n\tdir := d.dir(id)\n\treturn path.Join(dir, \"composefs-data\")\n}\n\nfunc (d *Driver) getDiffPath(id string) (string, error) {\n\tdir := d.dir(id)\n\treturn redirectDiffIfAdditionalLayer(path.Join(dir, \"diff\"), false)\n}\n\nfunc (d *Driver) getLowerDiffPaths(id string) ([]string, error) {\n\tlayers, err := d.getLowerDirs(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor i, l := range layers {\n\t\tlayers[i], err = redirectDiffIfAdditionalLayer(l, false)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn layers, nil\n}\n\n// DiffSize calculates the changes between the specified id\n// and its parent and returns the size in bytes of the changes\n// relative to its base filesystem directory.\nfunc (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error) {\n\tif !d.isParent(id, parent) {\n\t\treturn d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)\n\t}\n\n\tp, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn directory.Size(p)\n}\n\n// Diff produces an archive of the changes between the specified\n// layer and its parent layer which may be \"\".\nfunc (d *Driver) Diff(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (io.ReadCloser, error) {\n\tif d.useNaiveDiff() || !d.isParent(id, parent) {\n\t\treturn d.naiveDiff.Diff(id, idMappings, parent, parentMappings, mountLabel)\n\t}\n\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\n\tlowerDirs, err := d.getLowerDiffPaths(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdiffPath, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlogrus.Debugf(\"Tar with options on %s\", diffPath)\n\treturn archive.TarWithOptions(diffPath, &archive.TarOptions{\n\t\tCompression:    archive.Uncompressed,\n\t\tUIDMaps:        idMappings.UIDs(),\n\t\tGIDMaps:        idMappings.GIDs(),\n\t\tWhiteoutFormat: d.getWhiteoutFormat(),\n\t\tWhiteoutData:   lowerDirs,\n\t})\n}\n\n// Changes produces a list of changes between the specified layer\n// and its parent layer. If parent is \"\", then all changes will be ADD changes.\nfunc (d *Driver) Changes(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) ([]archive.Change, error) {\n\tif d.useNaiveDiff() || !d.isParent(id, parent) {\n\t\treturn d.naiveDiff.Changes(id, idMappings, parent, parentMappings, mountLabel)\n\t}\n\t// Overlay doesn't have snapshots, so we need to get changes from all parent\n\t// layers.\n\tdiffPath, err := d.getDiffPath(id)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get diff path: %w\", err)\n\t}\n\tlayers, err := d.getLowerDiffPaths(id)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get lower diff path: %w\", err)\n\t}\n\n\tc, err := archive.OverlayChanges(layers, diffPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"computing changes: %w\", err)\n\t}\n\treturn c, nil\n}\n\n// AdditionalImageStores returns additional image stores supported by the driver\nfunc (d *Driver) AdditionalImageStores() []string {\n\treturn d.options.imageStores\n}\n\n// UpdateLayerIDMap updates ID mappings in a from matching the ones specified\n// by toContainer to those specified by toHost.\nfunc (d *Driver) UpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) error {\n\tvar err error\n\tdir := d.dir(id)\n\tdiffDir := filepath.Join(dir, \"diff\")\n\n\trootIDs := idtools.IDPair{UID: 0, GID: 0}\n\tif toHost != nil {\n\t\trootUID, rootGID, err := idtools.GetRootUIDGID(toHost.UIDs(), toHost.GIDs())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\trootIDs = idtools.IDPair{UID: rootUID, GID: rootGID}\n\t}\n\n\t// Mount the new layer and handle ownership changes and possible copy_ups in it.\n\toptions := graphdriver.MountOpts{\n\t\tMountLabel: mountLabel,\n\t\tOptions:    strings.Split(d.options.mountOptions, \",\"),\n\t}\n\tlayerFs, err := d.get(id, true, options)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = graphdriver.ChownPathByMaps(layerFs, toContainer, toHost)\n\tif err != nil {\n\t\tif err2 := d.Put(id); err2 != nil {\n\t\t\tlogrus.Errorf(\"%v; unmounting %v: %v\", err, id, err2)\n\t\t}\n\t\treturn err\n\t}\n\tif err = d.Put(id); err != nil {\n\t\treturn err\n\t}\n\n\t// Rotate the diff directories.\n\ti := 0\n\tperms := defaultPerms\n\tst, err := os.Stat(nameWithSuffix(diffDir, i))\n\tif d.options.forceMask != nil {\n\t\tperms = *d.options.forceMask\n\t} else {\n\t\tif err == nil {\n\t\t\tperms = st.Mode()\n\t\t}\n\t}\n\tfor err == nil {\n\t\ti++\n\t\terr = fileutils.Exists(nameWithSuffix(diffDir, i))\n\t}\n\n\tfor i > 0 {\n\t\terr = os.Rename(nameWithSuffix(diffDir, i-1), nameWithSuffix(diffDir, i))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ti--\n\t}\n\n\t// We need to re-create the work directory as it might keep a reference\n\t// to the old upper layer in the index.\n\tworkDir := filepath.Join(dir, \"work\")\n\tif err := os.RemoveAll(workDir); err == nil {\n\t\tif err := idtools.MkdirAndChown(workDir, defaultPerms, rootIDs); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Re-create the directory that we're going to use as the upper layer.\n\tif err := idtools.MkdirAndChown(diffDir, perms, rootIDs); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// supportsIDmappedMounts returns whether the kernel supports using idmapped mounts with\n// overlay lower layers.\nfunc (d *Driver) supportsIDmappedMounts() bool {\n\tif d.supportsIDMappedMounts != nil {\n\t\treturn *d.supportsIDMappedMounts\n\t}\n\n\tsupportsIDMappedMounts, err := checkAndRecordIDMappedSupport(d.home, d.runhome)\n\td.supportsIDMappedMounts = &supportsIDMappedMounts\n\tif err == nil {\n\t\treturn supportsIDMappedMounts\n\t}\n\tlogrus.Debugf(\"Check for idmapped mounts support %v\", err)\n\treturn false\n}\n\n// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs to the provided mapping in an userNS\nfunc (d *Driver) SupportsShifting(uidmap, gidmap []idtools.IDMap) bool {\n\tif os.Getenv(\"_CONTAINERS_OVERLAY_DISABLE_IDMAP\") == \"yes\" {\n\t\treturn false\n\t}\n\tif d.options.mountProgram != \"\" {\n\t\t// fuse-overlayfs supports only contiguous mappings, since it performs the mapping on the\n\t\t// upper layer too, to avoid https://github.com/containers/podman/issues/10272\n\t\tif !idtools.IsContiguous(uidmap) {\n\t\t\treturn false\n\t\t}\n\t\tif !idtools.IsContiguous(gidmap) {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\treturn d.supportsIDmappedMounts()\n}\n\n// dumbJoin is more or less a dumber version of filepath.Join, but one which\n// won't Clean() the path, allowing us to append \"..\" as a component and trust\n// pathname resolution to do some non-obvious work.\nfunc dumbJoin(names ...string) string {\n\tif len(names) == 0 {\n\t\treturn string(os.PathSeparator)\n\t}\n\treturn strings.Join(names, string(os.PathSeparator))\n}\n\nfunc nameWithSuffix(name string, number int) string {\n\tif number == 0 {\n\t\treturn name\n\t}\n\treturn fmt.Sprintf(\"%s%d\", name, number)\n}\n\nfunc validateOneAdditionalLayerPath(target string) error {\n\tfor _, p := range []string{\n\t\tfilepath.Join(target, \"diff\"),\n\t\tfilepath.Join(target, \"info\"),\n\t\tfilepath.Join(target, \"blob\"),\n\t} {\n\t\tif err := fileutils.Exists(p); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (d *Driver) getAdditionalLayerPath(tocDigest digest.Digest, ref string) (string, error) {\n\trefElem := base64.StdEncoding.EncodeToString([]byte(ref))\n\tfor _, ls := range d.options.layerStores {\n\t\tref := \"\"\n\t\tif ls.withReference {\n\t\t\tref = refElem\n\t\t}\n\t\ttarget := path.Join(ls.path, ref, tocDigest.String())\n\t\terr := validateOneAdditionalLayerPath(target)\n\t\tif err == nil {\n\t\t\treturn target, nil\n\t\t}\n\t\tlogrus.Debugf(\"additional Layer Store %v failed to stat additional layer: %v\", ls, err)\n\t}\n\n\treturn \"\", fmt.Errorf(\"additional layer (%q, %q) not found: %w\", tocDigest, ref, graphdriver.ErrLayerUnknown)\n}\n\nfunc (d *Driver) releaseAdditionalLayerByID(id string) {\n\tif al, err := d.getAdditionalLayerPathByID(id); err == nil {\n\t\tnotifyReleaseAdditionalLayer(al)\n\t} else if !os.IsNotExist(err) {\n\t\tlogrus.Warnf(\"Unexpected error on reading Additional Layer Store pointer %v\", err)\n\t}\n}\n\n// additionalLayer represents a layer in Additional Layer Store.\ntype additionalLayer struct {\n\tpath        string\n\td           *Driver\n\treleaseOnce sync.Once\n}\n\n// Info returns arbitrary information stored along with this layer (i.e. `info` file).\n// This API is experimental and can be changed without bumping the major version number.\n// TODO: to remove the comment once it's no longer experimental.\nfunc (al *additionalLayer) Info() (io.ReadCloser, error) {\n\treturn os.Open(filepath.Join(al.path, \"info\"))\n}\n\n// Blob returns a reader of the raw contents of this layer.\nfunc (al *additionalLayer) Blob() (io.ReadCloser, error) {\n\treturn os.Open(filepath.Join(al.path, \"blob\"))\n}\n\n// CreateAs creates a new layer from this additional layer.\n// This API is experimental and can be changed without bumping the major version number.\n// TODO: to remove the comment once it's no longer experimental.\nfunc (al *additionalLayer) CreateAs(id, parent string) error {\n\t// TODO: support opts\n\tif err := al.d.Create(id, parent, nil); err != nil {\n\t\treturn err\n\t}\n\tdir := al.d.dir(id)\n\tdiffDir := path.Join(dir, \"diff\")\n\tif err := os.RemoveAll(diffDir); err != nil {\n\t\treturn err\n\t}\n\t// tell the additional layer store that we use this layer.\n\t// mark this layer as \"additional layer\"\n\tif err := os.WriteFile(path.Join(dir, \"additionallayer\"), []byte(al.path), 0o644); err != nil {\n\t\treturn err\n\t}\n\tnotifyUseAdditionalLayer(al.path)\n\treturn os.Symlink(filepath.Join(al.path, \"diff\"), diffDir)\n}\n\nfunc (d *Driver) getAdditionalLayerPathByID(id string) (string, error) {\n\tal, err := os.ReadFile(path.Join(d.dir(id), \"additionallayer\"))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn string(al), nil\n}\n\n// Release tells the additional layer store that we don't use this handler.\n// This API is experimental and can be changed without bumping the major version number.\n// TODO: to remove the comment once it's no longer experimental.\nfunc (al *additionalLayer) Release() {\n\t// Tell the additional layer store that we don't use this layer handler.\n\t// This will decrease the reference counter on the store's side, which was\n\t// increased in LookupAdditionalLayer (so this must be called only once).\n\tal.releaseOnce.Do(func() {\n\t\tnotifyReleaseAdditionalLayer(al.path)\n\t})\n}\n\n// notifyUseAdditionalLayer notifies Additional Layer Store that we use the specified layer.\n// This is done by creating \"use\" file in the layer directory. This is useful for\n// Additional Layer Store to consider when to perform GC. Notification-aware Additional\n// Layer Store must return ENOENT.\nfunc notifyUseAdditionalLayer(al string) {\n\tif !path.IsAbs(al) {\n\t\tlogrus.Warnf(\"additionallayer must be absolute (got: %v)\", al)\n\t\treturn\n\t}\n\tuseFile := path.Join(al, \"use\")\n\tf, err := os.Create(useFile)\n\tif os.IsNotExist(err) {\n\t\treturn\n\t} else if err == nil {\n\t\tf.Close()\n\t\tif err := os.Remove(useFile); err != nil {\n\t\t\tlogrus.Warnf(\"Failed to remove use file\")\n\t\t}\n\t}\n\tlogrus.Warnf(\"Unexpected error by Additional Layer Store %v during use; GC doesn't seem to be supported\", err)\n}\n\n// notifyReleaseAdditionalLayer notifies Additional Layer Store that we don't use the specified\n// layer anymore. This is done by rmdir-ing the layer directory. This is useful for\n// Additional Layer Store to consider when to perform GC. Notification-aware Additional\n// Layer Store must return ENOENT.\nfunc notifyReleaseAdditionalLayer(al string) {\n\tif !path.IsAbs(al) {\n\t\tlogrus.Warnf(\"additionallayer must be absolute (got: %v)\", al)\n\t\treturn\n\t}\n\t// tell the additional layer store that we don't use this layer anymore.\n\terr := unix.Rmdir(al)\n\tif os.IsNotExist(err) {\n\t\treturn\n\t}\n\tlogrus.Warnf(\"Unexpected error by Additional Layer Store %v during release; GC doesn't seem to be supported\", err)\n}\n\n// redirectDiffIfAdditionalLayer checks if the passed diff path is Additional Layer and\n// returns the redirected path. If the passed diff is not the one in Additional Layer\n// Store, it returns the original path without changes.\nfunc redirectDiffIfAdditionalLayer(diffPath string, checkExistence bool) (string, error) {\n\tif ld, err := os.Readlink(diffPath); err == nil {\n\t\t// diff is the link to Additional Layer Store\n\t\tif !path.IsAbs(ld) {\n\t\t\treturn \"\", fmt.Errorf(\"linkpath must be absolute (got: %q)\", ld)\n\t\t}\n\t\tif checkExistence {\n\t\t\tif err := fileutils.Exists(ld); err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"failed to access to the linked additional layer: %w\", err)\n\t\t\t}\n\t\t}\n\t\tdiffPath = ld\n\t} else if err.(*os.PathError).Err != syscall.EINVAL {\n\t\treturn \"\", err\n\t}\n\treturn diffPath, nil\n}\n\n// getMappedMountRoot is a heuristic that calculates the parent directory where\n// the idmapped mount should be applied.\n// It is useful to minimize the number of idmapped mounts and at the same time use\n// a common path as long as possible to reduce the length of the mount data argument.\nfunc getMappedMountRoot(path string) string {\n\tdirName := filepath.Dir(path)\n\tif filepath.Base(dirName) == linkDir {\n\t\treturn filepath.Dir(dirName)\n\t}\n\treturn dirName\n}\n\n// Dedup performs deduplication of the driver's storage.\nfunc (d *Driver) Dedup(req graphdriver.DedupArgs) (graphdriver.DedupResult, error) {\n\tvar dirs []string\n\tfor _, layer := range req.Layers {\n\t\tdir, _, inAdditionalStore := d.dir2(layer, false)\n\t\tif inAdditionalStore {\n\t\t\tcontinue\n\t\t}\n\t\tif err := fileutils.Exists(dir); err == nil {\n\t\t\tdirs = append(dirs, filepath.Join(dir, \"diff\"))\n\t\t}\n\t}\n\tr, err := dedup.DedupDirs(dirs, req.Options)\n\tif err != nil {\n\t\treturn graphdriver.DedupResult{}, err\n\t}\n\treturn graphdriver.DedupResult{Deduped: r.Deduped}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/overlay_disk_quota.go",
    "content": "//go:build linux && cgo && !exclude_disk_quota\n\npackage overlay\n\nimport (\n\t\"path\"\n\n\t\"go.podman.io/storage/pkg/directory\"\n)\n\n// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.\n// For Overlay, it attempts to check the XFS quota for size, and falls back to\n// finding the size of the \"diff\" directory.\nfunc (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {\n\tusage := &directory.DiskUsage{}\n\tif d.quotaCtl != nil {\n\t\terr := d.quotaCtl.GetDiskUsage(d.dir(id), usage)\n\t\treturn usage, err\n\t}\n\treturn directory.Usage(path.Join(d.dir(id), \"diff\"))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/overlay_disk_quota_unsupported.go",
    "content": "//go:build linux && (!cgo || exclude_disk_quota)\n\npackage overlay\n\nimport (\n\t\"path\"\n\n\t\"go.podman.io/storage/pkg/directory\"\n)\n\n// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.\n// For Overlay, it attempts to check the XFS quota for size, and falls back to\n// finding the size of the \"diff\" directory.\nfunc (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {\n\treturn directory.Usage(path.Join(d.dir(id), \"diff\"))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/overlay_unsupported.go",
    "content": "//go:build !linux\n\npackage overlay\n\nfunc SupportsNativeOverlay(graphroot, rundir string) (bool, error) {\n\treturn false, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlay/randomid.go",
    "content": "//go:build linux\n\npackage overlay\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/base32\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// generateID creates a new random string identifier with the given length\nfunc generateID(l int) string {\n\tconst (\n\t\t// ensures we backoff for less than 450ms total. Use the following to\n\t\t// select new value, in units of 10ms:\n\t\t// \tn*(n+1)/2 = d -> n^2 + n - 2d -> n = (sqrt(8d + 1) - 1)/2\n\t\tmaxretries = 9\n\t\tbackoff    = time.Millisecond * 10\n\t)\n\n\tvar (\n\t\ttotalBackoff time.Duration\n\t\tcount        int\n\t\tretries      int\n\t\tsize         = (l*5 + 7) / 8\n\t\tu            = make([]byte, size)\n\t)\n\t// TODO: Include time component, counter component, random component\n\n\tfor {\n\t\t// This should never block but the read may fail. Because of this,\n\t\t// we just try to read the random number generator until we get\n\t\t// something. This is a very rare condition but may happen.\n\t\tb := time.Duration(retries) * backoff\n\t\ttime.Sleep(b)\n\t\ttotalBackoff += b\n\n\t\tn, err := io.ReadFull(rand.Reader, u[count:])\n\t\tif err != nil {\n\t\t\tif retryOnError(err) && retries < maxretries {\n\t\t\t\tcount += n\n\t\t\t\tretries++\n\t\t\t\tlogrus.Errorf(\"Generating version 4 uuid, retrying: %v\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Any other errors represent a system problem. What did someone\n\t\t\t// do to /dev/urandom?\n\t\t\tpanic(fmt.Errorf(\"reading random number generator, retried for %v: %w\", totalBackoff.String(), err))\n\t\t}\n\n\t\tbreak\n\t}\n\n\ts := base32.StdEncoding.EncodeToString(u)\n\n\treturn s[:l]\n}\n\n// retryOnError tries to detect whether or not retrying would be fruitful.\nfunc retryOnError(err error) bool {\n\tswitch err := err.(type) {\n\tcase *os.PathError:\n\t\treturn retryOnError(err.Err) // unpack the target error\n\tcase syscall.Errno:\n\t\tif err == unix.EPERM {\n\t\t\t// EPERM represents an entropy pool exhaustion, a condition under\n\t\t\t// which we backoff and retry.\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/overlayutils/overlayutils.go",
    "content": "//go:build linux\n\npackage overlayutils\n\nimport (\n\t\"fmt\"\n\n\tgraphdriver \"go.podman.io/storage/drivers\"\n)\n\n// ErrDTypeNotSupported denotes that the backing filesystem doesn't support d_type.\nfunc ErrDTypeNotSupported(driver, backingFs string) error {\n\tmsg := fmt.Sprintf(\"%s: the backing %s filesystem is formatted without d_type support, which leads to incorrect behavior.\", driver, backingFs)\n\tif backingFs == \"xfs\" {\n\t\tmsg += \" Reformat the filesystem with ftype=1 to enable d_type support.\"\n\t}\n\tmsg += \" Running without d_type is not supported.\"\n\treturn fmt.Errorf(\"%s: %w\", msg, graphdriver.ErrNotSupported)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/quota/projectquota.go",
    "content": "package quota\n\n// BackingFsBlockDeviceLink is the name of a file that we place in\n// the home directory of a driver that uses this package.\nconst BackingFsBlockDeviceLink = \"backingFsBlockDev\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/quota/projectquota_supported.go",
    "content": "//go:build linux && !exclude_disk_quota && cgo\n\n//\n// projectquota.go - implements XFS project quota controls\n// for setting quota limits on a newly created directory.\n// It currently supports the legacy XFS specific ioctls.\n//\n// TODO: use generic quota control ioctl FS_IOC_FS{GET,SET}XATTR\n//       for both xfs/ext4 for kernel version >= v4.5\n//\n\npackage quota\n\n/*\n#include <stdlib.h>\n#include <dirent.h>\n#include <linux/fs.h>\n#include <linux/quota.h>\n#include <linux/dqblk_xfs.h>\n\n#ifndef FS_XFLAG_PROJINHERIT\nstruct fsxattr {\n\t__u32\t\tfsx_xflags;\n\t__u32\t\tfsx_extsize;\n\t__u32\t\tfsx_nextents;\n\t__u32\t\tfsx_projid;\n\tunsigned char\tfsx_pad[12];\n};\n#define FS_XFLAG_PROJINHERIT\t0x00000200\n#endif\n#ifndef FS_IOC_FSGETXATTR\n#define FS_IOC_FSGETXATTR\t\t_IOR ('X', 31, struct fsxattr)\n#endif\n#ifndef FS_IOC_FSSETXATTR\n#define FS_IOC_FSSETXATTR\t\t_IOW ('X', 32, struct fsxattr)\n#endif\n\n#ifndef PRJQUOTA\n#define PRJQUOTA\t2\n#endif\n#ifndef FS_PROJ_QUOTA\n#define FS_PROJ_QUOTA\t2\n#endif\n#ifndef Q_XSETPQLIM\n#define Q_XSETPQLIM QCMD(Q_XSETQLIM, PRJQUOTA)\n#endif\n#ifndef Q_XGETPQUOTA\n#define Q_XGETPQUOTA QCMD(Q_XGETQUOTA, PRJQUOTA)\n#endif\n*/\nimport \"C\"\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst projectIDsAllocatedPerQuotaHome = 10000\n\n// Quota limit params - currently we only control blocks hard limit and inodes\ntype Quota struct {\n\tSize   uint64\n\tInodes uint64\n}\n\n// Control - Context to be used by storage driver (e.g. overlay)\n// who wants to apply project quotas to container dirs\ntype Control struct {\n\tbackingFsBlockDev string\n\tnextProjectID     uint32\n\tquotas            *sync.Map\n\tbasePath          string\n}\n\n// Attempt to generate a unigue projectid.  Multiple directories\n// per file system can have quota and they need a group of unique\n// ids. This function attempts to allocate at least projectIDsAllocatedPerQuotaHome(10000)\n// unique projectids, based on the inode of the basepath.\nfunc generateUniqueProjectID(path string) (uint32, error) {\n\tfileinfo, err := os.Stat(path)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tstat, ok := fileinfo.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"not a syscall.Stat_t %s\", path)\n\t}\n\tprojectID := projectIDsAllocatedPerQuotaHome + (stat.Ino*projectIDsAllocatedPerQuotaHome)%(math.MaxUint32-projectIDsAllocatedPerQuotaHome)\n\treturn uint32(projectID), nil\n}\n\n// NewControl - initialize project quota support.\n// Test to make sure that quota can be set on a test dir and find\n// the first project id to be used for the next container create.\n//\n// Returns nil (and error) if project quota is not supported.\n//\n// First get the project id of the basePath directory.\n// This test will fail if the backing fs is not xfs.\n//\n// xfs_quota tool can be used to assign a project id to the driver home directory, e.g.:\n//    echo 100000:/var/lib/containers/storage/overlay >> /etc/projects\n//    echo 200000:/var/lib/containers/storage/volumes >> /etc/projects\n//    echo storage:100000 >> /etc/projid\n//    echo volumes:200000 >> /etc/projid\n//    xfs_quota -x -c 'project -s storage volumes' /<xfs mount point>\n//\n// In the example above, the storage directory project id will be used as a\n// \"start offset\" and all containers will be assigned larger project ids\n// (e.g. >= 100000). Then the volumes directory project id will be used as a\n// \"start offset\" and all volumes will be assigned larger project ids\n// (e.g. >= 200000).\n// This is a way to prevent xfs_quota management from conflicting with\n// containers/storage.\n\n// Then try to create a test directory with the next project id and set a quota\n// on it. If that works, continue to scan existing containers to map allocated\n// project ids.\nfunc NewControl(basePath string) (*Control, error) {\n\t//\n\t// Get project id of parent dir as minimal id to be used by driver\n\t//\n\tminProjectID, err := getProjectID(basePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif minProjectID == 0 {\n\t\t// Indicates the storage was never initialized\n\t\t// Generate a unique range of Projectids for this basepath\n\t\tminProjectID, err = generateUniqueProjectID(basePath)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\t//\n\t// create backing filesystem device node\n\t//\n\tbackingFsBlockDev, err := makeBackingFsDev(basePath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t//\n\t// Test if filesystem supports project quotas by trying to set\n\t// a quota on the first available project id\n\t//\n\tquota := Quota{\n\t\tSize:   0,\n\t\tInodes: 0,\n\t}\n\n\tq := Control{\n\t\tbackingFsBlockDev: backingFsBlockDev,\n\t\tnextProjectID:     minProjectID + 1,\n\t\tquotas:            &sync.Map{},\n\t\tbasePath:          basePath,\n\t}\n\n\tif err := q.setProjectQuota(minProjectID, quota); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Clear inherit flag from top-level directory if necessary.\n\tif err := stripProjectInherit(basePath); err != nil {\n\t\treturn nil, err\n\t}\n\n\t//\n\t// get first project id to be used for next container\n\t//\n\terr = q.findNextProjectID()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlogrus.Debugf(\"NewControl(%s): nextProjectID = %d\", basePath, q.nextProjectID)\n\treturn &q, nil\n}\n\n// SetQuota - assign a unique project id to directory and set the quota limits\n// for that project id.\n// targetPath must exist, must be a directory, and must be empty.\nfunc (q *Control) SetQuota(targetPath string, quota Quota) error {\n\tvar projectID uint32\n\tvalue, ok := q.quotas.Load(targetPath)\n\tif ok {\n\t\tprojectID, ok = value.(uint32)\n\t}\n\tif !ok {\n\t\tprojectID = q.nextProjectID\n\n\t\t// The directory we are setting an ID on must be empty, as\n\t\t// the ID will not be propagated to pre-existing subdirectories.\n\t\tdents, err := os.ReadDir(targetPath)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"reading directory %s: %w\", targetPath, err)\n\t\t}\n\t\tif len(dents) > 0 {\n\t\t\treturn fmt.Errorf(\"can only set project ID on empty directories, %s is not empty\", targetPath)\n\t\t}\n\n\t\t//\n\t\t// assign project id to new container directory\n\t\t//\n\t\terr = setProjectID(targetPath, projectID)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tq.quotas.Store(targetPath, projectID)\n\t\tq.nextProjectID++\n\t}\n\n\t//\n\t// set the quota limit for the container's project id\n\t//\n\tlogrus.Debugf(\"SetQuota path=%s, size=%d, inodes=%d, projectID=%d\", targetPath, quota.Size, quota.Inodes, projectID)\n\treturn q.setProjectQuota(projectID, quota)\n}\n\n// ClearQuota removes the map entry in the quotas map for targetPath.\n// It does so to prevent the map leaking entries as directories are deleted.\nfunc (q *Control) ClearQuota(targetPath string) {\n\tq.quotas.Delete(targetPath)\n}\n\n// setProjectQuota - set the quota for project id on xfs block device\nfunc (q *Control) setProjectQuota(projectID uint32, quota Quota) error {\n\tvar d C.fs_disk_quota_t\n\td.d_version = C.FS_DQUOT_VERSION\n\td.d_id = C.__u32(projectID)\n\td.d_flags = C.FS_PROJ_QUOTA\n\n\tif quota.Size > 0 {\n\t\td.d_fieldmask = d.d_fieldmask | C.FS_DQ_BHARD | C.FS_DQ_BSOFT\n\t\td.d_blk_hardlimit = C.__u64(quota.Size / 512)\n\t\td.d_blk_softlimit = d.d_blk_hardlimit\n\t}\n\tif quota.Inodes > 0 {\n\t\td.d_fieldmask = d.d_fieldmask | C.FS_DQ_IHARD | C.FS_DQ_ISOFT\n\t\td.d_ino_hardlimit = C.__u64(quota.Inodes)\n\t\td.d_ino_softlimit = d.d_ino_hardlimit\n\t}\n\n\tcs := C.CString(q.backingFsBlockDev)\n\tdefer C.free(unsafe.Pointer(cs))\n\n\trunQuotactl := func() syscall.Errno {\n\t\t_, _, errno := unix.Syscall6(unix.SYS_QUOTACTL, C.Q_XSETPQLIM,\n\t\t\tuintptr(unsafe.Pointer(cs)), uintptr(d.d_id),\n\t\t\tuintptr(unsafe.Pointer(&d)), 0, 0)\n\t\treturn errno\n\t}\n\n\terrno := runQuotactl()\n\n\t// If the backingFsBlockDev does not exist any more then try to recreate it.\n\tif errors.Is(errno, unix.ENOENT) {\n\t\tif _, err := makeBackingFsDev(q.basePath); err != nil {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"failed to recreate missing backingFsBlockDev %s for projid %d: %w\",\n\t\t\t\tq.backingFsBlockDev, projectID, err,\n\t\t\t)\n\t\t}\n\n\t\tif errno := runQuotactl(); errno != 0 {\n\t\t\treturn fmt.Errorf(\"failed to set quota limit for projid %d on %s after backingFsBlockDev recreation: %w\",\n\t\t\t\tprojectID, q.backingFsBlockDev, errno)\n\t\t}\n\n\t} else if errno != 0 {\n\t\treturn fmt.Errorf(\"failed to set quota limit for projid %d on %s: %w\",\n\t\t\tprojectID, q.backingFsBlockDev, errno)\n\t}\n\n\treturn nil\n}\n\n// GetQuota - get the quota limits of a directory that was configured with SetQuota\nfunc (q *Control) GetQuota(targetPath string, quota *Quota) error {\n\td, err := q.fsDiskQuotaFromPath(targetPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tquota.Size = uint64(d.d_blk_hardlimit) * 512\n\tquota.Inodes = uint64(d.d_ino_hardlimit)\n\treturn nil\n}\n\n// GetDiskUsage - get the current disk usage of a directory that was configured with SetQuota\nfunc (q *Control) GetDiskUsage(targetPath string, usage *directory.DiskUsage) error {\n\td, err := q.fsDiskQuotaFromPath(targetPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tusage.Size = int64(d.d_bcount) * 512\n\tusage.InodeCount = int64(d.d_icount)\n\n\treturn nil\n}\n\nfunc (q *Control) fsDiskQuotaFromPath(targetPath string) (C.fs_disk_quota_t, error) {\n\tvar d C.fs_disk_quota_t\n\tvar projectID uint32\n\tvalue, ok := q.quotas.Load(targetPath)\n\tif ok {\n\t\tprojectID, ok = value.(uint32)\n\t}\n\tif !ok {\n\t\treturn d, fmt.Errorf(\"quota not found for path : %s\", targetPath)\n\t}\n\n\t//\n\t// get the quota limit for the container's project id\n\t//\n\tcs := C.CString(q.backingFsBlockDev)\n\tdefer C.free(unsafe.Pointer(cs))\n\n\t_, _, errno := unix.Syscall6(unix.SYS_QUOTACTL, C.Q_XGETPQUOTA,\n\t\tuintptr(unsafe.Pointer(cs)), uintptr(C.__u32(projectID)),\n\t\tuintptr(unsafe.Pointer(&d)), 0, 0)\n\tif errno != 0 {\n\t\treturn d, fmt.Errorf(\"failed to get quota limit for projid %d on %s: %w\",\n\t\t\tprojectID, q.backingFsBlockDev, errno)\n\t}\n\n\treturn d, nil\n}\n\n// getProjectID - get the project id of path on xfs\nfunc getProjectID(targetPath string) (uint32, error) {\n\tdir, err := openDir(targetPath)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer closeDir(dir)\n\n\tvar fsx C.struct_fsxattr\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.FS_IOC_FSGETXATTR,\n\t\tuintptr(unsafe.Pointer(&fsx)))\n\tif errno != 0 {\n\t\treturn 0, fmt.Errorf(\"failed to get projid for %s: %w\", targetPath, errno)\n\t}\n\n\treturn uint32(fsx.fsx_projid), nil\n}\n\n// setProjectID - set the project id of path on xfs\nfunc setProjectID(targetPath string, projectID uint32) error {\n\tdir, err := openDir(targetPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tlogrus.Debugf(\"Setting quota project ID %d on %s\", projectID, targetPath)\n\n\tvar fsx C.struct_fsxattr\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.FS_IOC_FSGETXATTR,\n\t\tuintptr(unsafe.Pointer(&fsx)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to get projid for %s: %w\", targetPath, errno)\n\t}\n\tfsx.fsx_projid = C.__u32(projectID)\n\tfsx.fsx_xflags |= C.FS_XFLAG_PROJINHERIT\n\t_, _, errno = unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.FS_IOC_FSSETXATTR,\n\t\tuintptr(unsafe.Pointer(&fsx)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to set projid for %s: %w\", targetPath, errno)\n\t}\n\n\treturn nil\n}\n\n// stripProjectInherit strips the project inherit flag from a directory.\n// Used on the top-level directory to ensure project IDs are only inherited for\n// files in directories we set quotas on - not the directories we want to set\n// the quotas on, as that would make everything use the same project ID.\nfunc stripProjectInherit(targetPath string) error {\n\tdir, err := openDir(targetPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer closeDir(dir)\n\n\tvar fsx C.struct_fsxattr\n\t_, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.FS_IOC_FSGETXATTR,\n\t\tuintptr(unsafe.Pointer(&fsx)))\n\tif errno != 0 {\n\t\treturn fmt.Errorf(\"failed to get xfs attrs for %s: %w\", targetPath, errno)\n\t}\n\tif fsx.fsx_xflags&C.FS_XFLAG_PROJINHERIT != 0 {\n\t\t// Flag is set, need to clear it.\n\t\tlogrus.Debugf(\"Clearing PROJINHERIT flag from directory %s\", targetPath)\n\t\tfsx.fsx_xflags = fsx.fsx_xflags &^ C.FS_XFLAG_PROJINHERIT\n\t\t_, _, errno = unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.FS_IOC_FSSETXATTR,\n\t\t\tuintptr(unsafe.Pointer(&fsx)))\n\t\tif errno != 0 {\n\t\t\treturn fmt.Errorf(\"failed to clear PROJINHERIT for %s: %w\", targetPath, errno)\n\t\t}\n\t}\n\treturn nil\n}\n\n// findNextProjectID - find the next project id to be used for containers\n// by scanning driver home directory to find used project ids\nfunc (q *Control) findNextProjectID() error {\n\tfiles, err := os.ReadDir(q.basePath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"read directory failed : %s\", q.basePath)\n\t}\n\tfor _, file := range files {\n\t\tif !file.IsDir() {\n\t\t\tcontinue\n\t\t}\n\t\tpath := filepath.Join(q.basePath, file.Name())\n\t\tprojid, err := getProjectID(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif projid > 0 {\n\t\t\tq.quotas.Store(path, projid)\n\t\t}\n\t\tif q.nextProjectID <= projid {\n\t\t\tq.nextProjectID = projid + 1\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc free(p *C.char) {\n\tC.free(unsafe.Pointer(p))\n}\n\nfunc openDir(path string) (*C.DIR, error) {\n\tCpath := C.CString(path)\n\tdefer free(Cpath)\n\n\tdir, errno := C.opendir(Cpath)\n\tif dir == nil {\n\t\treturn nil, fmt.Errorf(\"can't open dir %v: %w\", Cpath, errno)\n\t}\n\treturn dir, nil\n}\n\nfunc closeDir(dir *C.DIR) {\n\tif dir != nil {\n\t\tC.closedir(dir)\n\t}\n}\n\nfunc getDirFd(dir *C.DIR) uintptr {\n\treturn uintptr(C.dirfd(dir))\n}\n\n// Get the backing block device of the driver home directory\n// and create a block device node under the home directory\n// to be used by quotactl commands\nfunc makeBackingFsDev(home string) (string, error) {\n\tvar stat unix.Stat_t\n\tif err := unix.Stat(home, &stat); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tbackingFsBlockDev := path.Join(home, BackingFsBlockDeviceLink)\n\tbackingFsBlockDevTmp := backingFsBlockDev + \".tmp\"\n\t// Re-create just in case someone copied the home directory over to a new device\n\tif err := unix.Mknod(backingFsBlockDevTmp, unix.S_IFBLK|0o600, int(stat.Dev)); err != nil {\n\t\tif !errors.Is(err, unix.EEXIST) {\n\t\t\treturn \"\", fmt.Errorf(\"failed to mknod %s: %w\", backingFsBlockDevTmp, err)\n\t\t}\n\t\t// On EEXIST, try again after unlinking any potential leftover.\n\t\t_ = unix.Unlink(backingFsBlockDevTmp)\n\t\tif err := unix.Mknod(backingFsBlockDevTmp, unix.S_IFBLK|0o600, int(stat.Dev)); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"failed to mknod %s: %w\", backingFsBlockDevTmp, err)\n\t\t}\n\t}\n\tif err := unix.Rename(backingFsBlockDevTmp, backingFsBlockDev); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to rename %s to %s: %w\", backingFsBlockDevTmp, backingFsBlockDev, err)\n\t}\n\n\treturn backingFsBlockDev, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/quota/projectquota_unsupported.go",
    "content": "//go:build !linux || exclude_disk_quota || !cgo\n\npackage quota\n\nimport (\n\t\"errors\"\n)\n\n// Quota limit params - currently we only control blocks hard limit\ntype Quota struct {\n\tSize   uint64\n\tInodes uint64\n}\n\n// Control - Context to be used by storage driver (e.g. overlay)\n// who wants to apply project quotas to container dirs\ntype Control struct{}\n\nfunc NewControl(basePath string) (*Control, error) {\n\treturn nil, errors.New(\"filesystem does not support, or has not enabled quotas\")\n}\n\n// SetQuota - assign a unique project id to directory and set the quota limits\n// for that project id\nfunc (q *Control) SetQuota(targetPath string, quota Quota) error {\n\treturn errors.New(\"filesystem does not support, or has not enabled quotas\")\n}\n\n// GetQuota - get the quota limits of a directory that was configured with SetQuota\nfunc (q *Control) GetQuota(targetPath string, quota *Quota) error {\n\treturn errors.New(\"filesystem does not support, or has not enabled quotas\")\n}\n\n// ClearQuota removes the map entry in the quotas map for targetPath.\n// It does so to prevent the map leaking entries as directories are deleted.\nfunc (q *Control) ClearQuota(targetPath string) {}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/register/register_btrfs.go",
    "content": "//go:build !exclude_graphdriver_btrfs && linux\n\npackage register\n\nimport (\n\t// register the btrfs graphdriver\n\t_ \"go.podman.io/storage/drivers/btrfs\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/register/register_overlay.go",
    "content": "//go:build !exclude_graphdriver_overlay && linux\n\npackage register\n\nimport (\n\t// register the overlay graphdriver\n\t_ \"go.podman.io/storage/drivers/overlay\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/register/register_vfs.go",
    "content": "package register\n\nimport (\n\t// register vfs\n\t_ \"go.podman.io/storage/drivers/vfs\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/register/register_zfs.go",
    "content": "//go:build (!exclude_graphdriver_zfs && linux) || (!exclude_graphdriver_zfs && freebsd) || solaris\n\npackage register\n\nimport (\n\t// register the zfs driver\n\t_ \"go.podman.io/storage/drivers/zfs\"\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/vfs/copy_linux.go",
    "content": "package vfs\n\nimport \"go.podman.io/storage/drivers/copy\"\n\nfunc dirCopy(srcDir, dstDir string) error {\n\treturn copy.DirCopy(srcDir, dstDir, copy.Content, true)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/vfs/copy_unsupported.go",
    "content": "//go:build !linux\n\npackage vfs // import \"go.podman.io/storage/drivers/vfs\"\n\nimport \"go.podman.io/storage/pkg/chrootarchive\"\n\nfunc dirCopy(srcDir, dstDir string) error {\n\treturn chrootarchive.NewArchiver(nil).CopyWithTar(srcDir, dstDir)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/vfs/driver.go",
    "content": "package vfs\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/opencontainers/selinux/go-selinux/label\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/internal/dedup\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/parsers\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nconst (\n\tdefaultPerms = os.FileMode(0o555)\n\ttempDirName  = \"tempdirs\"\n)\n\nfunc init() {\n\tgraphdriver.MustRegister(\"vfs\", Init)\n}\n\n// Init returns a new VFS driver.\n// This sets the home directory for the driver and returns NaiveDiffDriver.\nfunc Init(home string, options graphdriver.Options) (graphdriver.Driver, error) {\n\td := &Driver{\n\t\tname:       \"vfs\",\n\t\thome:       home,\n\t\timageStore: options.ImageStore,\n\t}\n\n\tif err := os.MkdirAll(filepath.Join(home, \"dir\"), 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, option := range options.DriverOptions {\n\t\tkey, val, err := parsers.ParseKeyValueOpt(option)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkey = strings.ToLower(key)\n\t\tswitch key {\n\t\tcase \"vfs.imagestore\", \".imagestore\":\n\t\t\td.additionalHomes = slices.AppendSeq(d.additionalHomes, strings.SplitSeq(val, \",\"))\n\t\t\tcontinue\n\t\tcase \"vfs.mountopt\":\n\t\t\treturn nil, fmt.Errorf(\"vfs driver does not support mount options\")\n\t\tcase \".ignore_chown_errors\", \"vfs.ignore_chown_errors\":\n\t\t\tlogrus.Debugf(\"vfs: ignore_chown_errors=%s\", val)\n\t\t\tvar err error\n\t\t\td.ignoreChownErrors, err = strconv.ParseBool(val)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"vfs driver does not support %s options\", key)\n\t\t}\n\t}\n\n\td.updater = graphdriver.NewNaiveLayerIDMapUpdater(d)\n\td.naiveDiff = graphdriver.NewNaiveDiffDriver(d, d.updater)\n\n\treturn d, nil\n}\n\n// Driver holds information about the driver, home directory of the driver.\n// Driver implements graphdriver.ProtoDriver. It uses only basic vfs operations.\n// In order to support layering, files are copied from the parent layer into the new layer. There is no copy-on-write support.\n// Driver must be wrapped in NaiveDiffDriver to be used as a graphdriver.Driver\ntype Driver struct {\n\tname              string\n\thome              string\n\tadditionalHomes   []string\n\tignoreChownErrors bool\n\tnaiveDiff         graphdriver.DiffDriver\n\tupdater           graphdriver.LayerIDMapUpdater\n\timageStore        string\n}\n\nfunc (d *Driver) String() string {\n\treturn \"vfs\"\n}\n\n// Status is used for implementing the graphdriver.ProtoDriver interface. VFS does not currently have any status information.\nfunc (d *Driver) Status() [][2]string {\n\treturn nil\n}\n\n// Metadata is used for implementing the graphdriver.ProtoDriver interface. VFS does not currently have any meta data.\nfunc (d *Driver) Metadata(id string) (map[string]string, error) {\n\treturn nil, nil //nolint: nilnil\n}\n\n// Cleanup is used to implement graphdriver.ProtoDriver. There is no cleanup required for this driver.\nfunc (d *Driver) Cleanup() error {\n\treturn nil\n}\n\ntype fileGetNilCloser struct {\n\tstorage.FileGetter\n}\n\nfunc (f fileGetNilCloser) Close() error {\n\treturn nil\n}\n\n// DiffGetter returns a FileGetCloser that can read files from the directory that\n// contains files for the layer differences. Used for direct access for tar-split.\nfunc (d *Driver) DiffGetter(id string) (graphdriver.FileGetCloser, error) {\n\tp := d.dir(id)\n\treturn fileGetNilCloser{storage.NewPathFileGetter(p)}, nil\n}\n\n// CreateFromTemplate creates a layer with the same contents and parent as another layer.\nfunc (d *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error {\n\tif readWrite {\n\t\treturn d.CreateReadWrite(id, template, opts)\n\t}\n\treturn d.Create(id, template, opts)\n}\n\n// ApplyDiff applies the new layer into a root\nfunc (d *Driver) ApplyDiff(id string, options graphdriver.ApplyDiffOpts) (size int64, err error) {\n\tif d.ignoreChownErrors {\n\t\toptions.IgnoreChownErrors = d.ignoreChownErrors\n\t}\n\treturn d.naiveDiff.ApplyDiff(id, options)\n}\n\n// CreateReadWrite creates a layer that is writable for use as a container\n// file system.\nfunc (d *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts) error {\n\treturn d.create(id, parent, opts, false)\n}\n\n// Create prepares the filesystem for the VFS driver and copies the directory for the given id under the parent.\nfunc (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {\n\treturn d.create(id, parent, opts, true)\n}\n\nfunc (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts, ro bool) (retErr error) {\n\tif opts != nil && len(opts.StorageOpt) != 0 {\n\t\treturn fmt.Errorf(\"--storage-opt is not supported for vfs\")\n\t}\n\n\tvar uidMaps []idtools.IDMap\n\tvar gidMaps []idtools.IDMap\n\n\tif opts != nil && opts.IDMappings != nil {\n\t\tuidMaps = opts.IDMappings.UIDs()\n\t\tgidMaps = opts.IDMappings.GIDs()\n\t}\n\n\trootUID, rootGID, err := idtools.GetRootUIDGID(uidMaps, gidMaps)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdir := d.dir2(id, ro)\n\tif err := os.MkdirAll(filepath.Dir(dir), 0o700); err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\tif retErr != nil {\n\t\t\tos.RemoveAll(dir)\n\t\t}\n\t}()\n\n\trootPerms := defaultPerms\n\tif runtime.GOOS == \"darwin\" {\n\t\trootPerms = os.FileMode(0o700)\n\t}\n\n\tidPair := idtools.IDPair{UID: rootUID, GID: rootGID}\n\tif parent != \"\" {\n\t\tst, err := system.Stat(d.dir(parent))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\trootPerms = os.FileMode(st.Mode())\n\t\tidPair.UID = int(st.UID())\n\t\tidPair.GID = int(st.GID())\n\t}\n\tif err := idtools.MkdirAllAndChownNew(dir, rootPerms, idPair); err != nil {\n\t\treturn err\n\t}\n\tlabelOpts := []string{\"level:s0\"}\n\tif _, mountLabel, err := label.InitLabels(labelOpts); err == nil {\n\t\tif err := label.SetFileLabel(dir, mountLabel); err != nil {\n\t\t\tlogrus.Debugf(\"Set %s label to %q file ended with error: %v\", mountLabel, dir, err)\n\t\t}\n\t}\n\tif parent != \"\" {\n\t\tparentDir, err := d.Get(parent, graphdriver.MountOpts{})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", parent, err)\n\t\t}\n\t\tif err := dirCopy(parentDir, dir); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (d *Driver) dir2(id string, useImageStore bool) string {\n\tvar homedir string\n\n\tif useImageStore && d.imageStore != \"\" {\n\t\thomedir = filepath.Join(d.imageStore, d.String(), \"dir\", filepath.Base(id))\n\t} else {\n\t\thomedir = filepath.Join(d.home, \"dir\", filepath.Base(id))\n\t}\n\tif err := fileutils.Exists(homedir); err != nil {\n\t\tadditionalHomes := d.additionalHomes\n\t\tif d.imageStore != \"\" {\n\t\t\tadditionalHomes = append(additionalHomes, d.imageStore)\n\t\t}\n\t\tfor _, home := range additionalHomes {\n\t\t\tcandidate := filepath.Join(home, d.String(), \"dir\", filepath.Base(id))\n\t\t\tfi, err := os.Stat(candidate)\n\t\t\tif err == nil && fi.IsDir() {\n\t\t\t\treturn candidate\n\t\t\t}\n\t\t}\n\t}\n\treturn homedir\n}\n\nfunc (d *Driver) dir(id string) string {\n\treturn d.dir2(id, false)\n}\n\n// Remove deletes the content from the directory for a given id.\nfunc (d *Driver) Remove(id string) error {\n\treturn system.EnsureRemoveAll(d.dir(id))\n}\n\nfunc (d *Driver) GetTempDirRootDirs() []string {\n\ttempDirs := []string{filepath.Join(d.home, tempDirName)}\n\t// Include imageStore temp directory if it's configured\n\t// Writable layers can only be in d.home or d.imageStore, not in additionalHomes (which are read-only)\n\tif d.imageStore != \"\" {\n\t\ttempDirs = append(tempDirs, filepath.Join(d.imageStore, d.String(), tempDirName))\n\t}\n\treturn tempDirs\n}\n\n// Determine the correct temp directory root based on where the layer actually exists.\nfunc (d *Driver) getTempDirRoot(id string) string {\n\tlayerDir := d.dir(id)\n\tif d.imageStore != \"\" {\n\t\texpectedLayerDir := filepath.Join(d.imageStore, d.String(), \"dir\", filepath.Base(id))\n\t\tif layerDir == expectedLayerDir {\n\t\t\treturn filepath.Join(d.imageStore, d.String(), tempDirName)\n\t\t}\n\t}\n\treturn filepath.Join(d.home, tempDirName)\n}\n\nfunc (d *Driver) DeferredRemove(id string) (tempdir.CleanupTempDirFunc, error) {\n\ttempDirRoot := d.getTempDirRoot(id)\n\tt, err := tempdir.NewTempDir(tempDirRoot)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlayerDir := d.dir(id)\n\tif err := t.StageDeletion(layerDir); err != nil {\n\t\treturn t.Cleanup, err\n\t}\n\treturn t.Cleanup, nil\n}\n\n// Get returns the directory for the given id.\nfunc (d *Driver) Get(id string, options graphdriver.MountOpts) (_ string, retErr error) {\n\tdir := d.dir(id)\n\n\tfor _, opt := range options.Options {\n\t\tif opt == \"ro\" {\n\t\t\t// ignore \"ro\" option\n\t\t\tcontinue\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"vfs driver does not support mount options\")\n\t}\n\tif st, err := os.Stat(dir); err != nil {\n\t\treturn \"\", err\n\t} else if !st.IsDir() {\n\t\treturn \"\", fmt.Errorf(\"%s: not a directory\", dir)\n\t}\n\treturn dir, nil\n}\n\n// Put is a noop for vfs that return nil for the error, since this driver has no runtime resources to clean up.\nfunc (d *Driver) Put(id string) error {\n\t// The vfs driver has no runtime resources (e.g. mounts)\n\t// to clean up, so we don't need anything here\n\treturn nil\n}\n\n// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.\n// For VFS, it queries the directory for this ID.\nfunc (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {\n\treturn directory.Usage(d.dir(id))\n}\n\n// Exists checks to see if the directory exists for the given id.\nfunc (d *Driver) Exists(id string) bool {\n\terr := fileutils.Exists(d.dir(id))\n\treturn err == nil\n}\n\n// List layers (not including additional image stores)\nfunc (d *Driver) ListLayers() ([]string, error) {\n\tentries, err := os.ReadDir(filepath.Join(d.home, \"dir\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlayers := make([]string, 0)\n\n\tfor _, entry := range entries {\n\t\tid := entry.Name()\n\t\t// Does it look like a datadir directory?\n\t\tif !entry.IsDir() {\n\t\t\tcontinue\n\t\t}\n\n\t\tlayers = append(layers, id)\n\t}\n\n\treturn layers, err\n}\n\n// AdditionalImageStores returns additional image stores supported by the driver\nfunc (d *Driver) AdditionalImageStores() []string {\n\tif len(d.additionalHomes) > 0 {\n\t\treturn d.additionalHomes\n\t}\n\treturn nil\n}\n\n// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs to the provided mapping in an userNS\nfunc (d *Driver) SupportsShifting(uidmap, gidmap []idtools.IDMap) bool {\n\treturn d.updater.SupportsShifting(uidmap, gidmap)\n}\n\n// UpdateLayerIDMap updates ID mappings in a from matching the ones specified\n// by toContainer to those specified by toHost.\nfunc (d *Driver) UpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) error {\n\tif err := d.updater.UpdateLayerIDMap(id, toContainer, toHost, mountLabel); err != nil {\n\t\treturn err\n\t}\n\tdir := d.dir(id)\n\trootIDs, err := toHost.ToHost(idtools.IDPair{UID: 0, GID: 0})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn os.Chown(dir, rootIDs.UID, rootIDs.GID)\n}\n\n// Changes produces a list of changes between the specified layer\n// and its parent layer. If parent is \"\", then all changes will be ADD changes.\nfunc (d *Driver) Changes(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) ([]archive.Change, error) {\n\treturn d.naiveDiff.Changes(id, idMappings, parent, parentMappings, mountLabel)\n}\n\n// Diff produces an archive of the changes between the specified\n// layer and its parent layer which may be \"\".\nfunc (d *Driver) Diff(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (io.ReadCloser, error) {\n\treturn d.naiveDiff.Diff(id, idMappings, parent, parentMappings, mountLabel)\n}\n\n// DiffSize calculates the changes between the specified id\n// and its parent and returns the size in bytes of the changes\n// relative to its base filesystem directory.\nfunc (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error) {\n\treturn d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)\n}\n\n// Dedup performs deduplication of the driver's storage.\nfunc (d *Driver) Dedup(req graphdriver.DedupArgs) (graphdriver.DedupResult, error) {\n\tvar dirs []string\n\tfor _, layer := range req.Layers {\n\t\tdir := d.dir2(layer, false)\n\t\tif err := fileutils.Exists(dir); err == nil {\n\t\t\tdirs = append(dirs, dir)\n\t\t}\n\t}\n\tr, err := dedup.DedupDirs(dirs, req.Options)\n\tif err != nil {\n\t\treturn graphdriver.DedupResult{}, err\n\t}\n\treturn graphdriver.DedupResult{Deduped: r.Deduped}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/zfs/MAINTAINERS",
    "content": "Jörg Thalheim <joerg@higgsboson.tk> (@Mic92)\nArthur Gautier <baloo@gandi.net> (@baloose)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/zfs/zfs.go",
    "content": "//go:build linux || freebsd\n\npackage zfs\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tzfs \"github.com/mistifyio/go-zfs/v4\"\n\t\"github.com/opencontainers/selinux/go-selinux/label\"\n\t\"github.com/sirupsen/logrus\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"go.podman.io/storage/pkg/parsers\"\n\t\"golang.org/x/sys/unix\"\n)\n\ntype zfsOptions struct {\n\tfsName       string\n\tmountPath    string\n\tmountOptions string\n}\n\nconst defaultPerms = os.FileMode(0o555)\n\nfunc init() {\n\tgraphdriver.MustRegister(\"zfs\", Init)\n}\n\n// Logger returns a zfs logger implementation.\ntype Logger struct{}\n\n// Log wraps log message from ZFS driver with a prefix '[zfs]'.\nfunc (*Logger) Log(cmd []string) {\n\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(\"%s\", strings.Join(cmd, \" \"))\n}\n\n// Init returns a new ZFS driver.\n// It takes base mount path and an array of options which are represented as key value pairs.\n// Each option is in the for key=value. 'zfs.fsname' is expected to be a valid key in the options.\nfunc Init(base string, opt graphdriver.Options) (graphdriver.Driver, error) {\n\tvar err error\n\n\tlogger := logrus.WithField(\"storage-driver\", \"zfs\")\n\n\tif _, err := exec.LookPath(\"zfs\"); err != nil {\n\t\tlogger.Debugf(\"zfs command is not available: %v\", err)\n\t\treturn nil, fmt.Errorf(\"the 'zfs' command is not available: %w\", graphdriver.ErrPrerequisites)\n\t}\n\n\tfile, err := unix.Open(\"/dev/zfs\", unix.O_RDWR, 0o600)\n\tif err != nil {\n\t\tlogger.Debugf(\"cannot open /dev/zfs: %v\", err)\n\t\treturn nil, fmt.Errorf(\"could not open /dev/zfs: %v: %w\", err, graphdriver.ErrPrerequisites)\n\t}\n\tdefer unix.Close(file)\n\n\toptions, err := parseOptions(opt.DriverOptions)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\toptions.mountPath = base\n\n\trootdir := path.Dir(base)\n\n\tif options.fsName == \"\" {\n\t\terr = checkRootdirFs(rootdir)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif options.fsName == \"\" {\n\t\toptions.fsName, err = lookupZfsDataset(rootdir)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tzfs.SetLogger(new(Logger))\n\n\tfilesystems, err := zfs.Filesystems(options.fsName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"cannot find root filesystem %s: %w\", options.fsName, err)\n\t}\n\n\tfilesystemsCache := make(map[string]bool, len(filesystems))\n\tvar rootDataset *zfs.Dataset\n\tfor _, fs := range filesystems {\n\t\tif fs.Name == options.fsName {\n\t\t\trootDataset = fs\n\t\t}\n\t\tfilesystemsCache[fs.Name] = true\n\t}\n\n\tif rootDataset == nil {\n\t\treturn nil, fmt.Errorf(\"zfs get all -t filesystem -rHp '%s' should contain '%s'\", options.fsName, options.fsName)\n\t}\n\n\tif err := os.MkdirAll(base, 0o700); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create '%s': %w\", base, err)\n\t}\n\n\td := &Driver{\n\t\tdataset:          rootDataset,\n\t\toptions:          options,\n\t\tfilesystemsCache: filesystemsCache,\n\t\tctr:              graphdriver.NewRefCounter(graphdriver.NewDefaultChecker()),\n\t}\n\treturn graphdriver.NewNaiveDiffDriver(d, graphdriver.NewNaiveLayerIDMapUpdater(d)), nil\n}\n\nfunc parseOptions(opt []string) (zfsOptions, error) {\n\tvar options zfsOptions\n\toptions.fsName = \"\"\n\tfor _, option := range opt {\n\t\tkey, val, err := parsers.ParseKeyValueOpt(option)\n\t\tif err != nil {\n\t\t\treturn options, err\n\t\t}\n\t\tkey = strings.ToLower(key)\n\t\tswitch key {\n\t\tcase \"zfs.fsname\":\n\t\t\toptions.fsName = val\n\t\tcase \"zfs.mountopt\":\n\t\t\toptions.mountOptions = val\n\t\tdefault:\n\t\t\treturn options, fmt.Errorf(\"unknown option %s\", key)\n\t\t}\n\t}\n\treturn options, nil\n}\n\nfunc lookupZfsDataset(rootdir string) (string, error) {\n\tvar stat unix.Stat_t\n\tif err := unix.Stat(rootdir, &stat); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to access '%s': %w\", rootdir, err)\n\t}\n\twantedDev := stat.Dev\n\n\tmounts, err := mount.GetMounts()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfor _, m := range mounts {\n\t\tif err := unix.Stat(m.Mountpoint, &stat); err != nil {\n\t\t\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(\"failed to stat '%s' while scanning for zfs mount: %v\", m.Mountpoint, err)\n\t\t\tcontinue // may fail on fuse file systems\n\t\t}\n\n\t\tif stat.Dev == wantedDev && m.FSType == \"zfs\" {\n\t\t\treturn m.Source, nil\n\t\t}\n\t}\n\n\treturn \"\", fmt.Errorf(\"failed to find zfs dataset mounted on '%s' in /proc/mounts\", rootdir)\n}\n\n// Driver holds information about the driver, such as zfs dataset, options and cache.\ntype Driver struct {\n\tdataset          *zfs.Dataset\n\toptions          zfsOptions\n\tsync.Mutex       // protects filesystem cache against concurrent access\n\tfilesystemsCache map[string]bool\n\tctr              *graphdriver.RefCounter\n}\n\nfunc (d *Driver) String() string {\n\treturn \"zfs\"\n}\n\n// Cleanup is called on when program exits, it is a no-op for ZFS.\nfunc (d *Driver) Cleanup() error {\n\treturn nil\n}\n\n// Status returns information about the ZFS filesystem. It returns a two dimensional array of information\n// such as pool name, dataset name, disk usage, parent quota and compression used.\n// Currently it return 'Zpool', 'Zpool Health', 'Parent Dataset', 'Space Used By Parent',\n// 'Space Available', 'Parent Quota' and 'Compression'.\nfunc (d *Driver) Status() [][2]string {\n\tfsName, _, _ := strings.Cut(d.dataset.Name, \"/\")\n\tpool, err := zfs.GetZpool(fsName)\n\n\tvar poolName, poolHealth string\n\tif err == nil {\n\t\tpoolName = pool.Name\n\t\tpoolHealth = pool.Health\n\t} else {\n\t\tpoolName = fmt.Sprintf(\"error while getting pool information %v\", err)\n\t\tpoolHealth = \"not available\"\n\t}\n\n\tquota := \"no\"\n\tif d.dataset.Quota != 0 {\n\t\tquota = strconv.FormatUint(d.dataset.Quota, 10)\n\t}\n\n\treturn [][2]string{\n\t\t{\"Zpool\", poolName},\n\t\t{\"Zpool Health\", poolHealth},\n\t\t{\"Parent Dataset\", d.dataset.Name},\n\t\t{\"Space Used By Parent\", strconv.FormatUint(d.dataset.Used, 10)},\n\t\t{\"Space Available\", strconv.FormatUint(d.dataset.Avail, 10)},\n\t\t{\"Parent Quota\", quota},\n\t\t{\"Compression\", d.dataset.Compression},\n\t}\n}\n\n// Metadata returns image/container metadata related to graph driver\nfunc (d *Driver) Metadata(id string) (map[string]string, error) {\n\treturn map[string]string{\n\t\t\"Mountpoint\": d.mountPath(id),\n\t\t\"Dataset\":    d.zfsPath(id),\n\t}, nil\n}\n\nfunc (d *Driver) cloneFilesystem(name, parentName string) error {\n\tsnapshotName := fmt.Sprintf(\"%d\", time.Now().Nanosecond())\n\tparentDataset := zfs.Dataset{Name: parentName}\n\tsnapshot, err := parentDataset.Snapshot(snapshotName /*recursive */, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = snapshot.Clone(name, map[string]string{\"mountpoint\": \"legacy\"})\n\tif err == nil {\n\t\td.Lock()\n\t\td.filesystemsCache[name] = true\n\t\td.Unlock()\n\t}\n\n\tif err != nil {\n\t\tif err1 := snapshot.Destroy(zfs.DestroyDeferDeletion); err1 != nil {\n\t\t\tlogrus.Warnf(\"Destroy zfs.DestroyDeferDeletion: %v\", err1)\n\t\t}\n\t\treturn err\n\t}\n\treturn snapshot.Destroy(zfs.DestroyDeferDeletion)\n}\n\nfunc (d *Driver) zfsPath(id string) string {\n\treturn d.options.fsName + \"/\" + id\n}\n\nfunc (d *Driver) mountPath(id string) string {\n\treturn path.Join(d.options.mountPath, \"graph\", getMountpoint(id))\n}\n\n// CreateFromTemplate creates a layer with the same contents and parent as another layer.\nfunc (d *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error {\n\treturn d.Create(id, template, opts)\n}\n\n// CreateReadWrite creates a layer that is writable for use as a container\n// file system.\nfunc (d *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts) error {\n\treturn d.Create(id, parent, opts)\n}\n\n// Create prepares the dataset and filesystem for the ZFS driver for the given id under the parent.\nfunc (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {\n\terr := d.create(id, parent, opts)\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif zfsError, ok := err.(*zfs.Error); ok {\n\t\tif !strings.HasSuffix(zfsError.Stderr, \"dataset already exists\\n\") {\n\t\t\treturn err\n\t\t}\n\t\t// aborted build -> cleanup\n\t} else {\n\t\treturn err\n\t}\n\n\tdataset := zfs.Dataset{Name: d.zfsPath(id)}\n\tif err := dataset.Destroy(zfs.DestroyRecursiveClones); err != nil {\n\t\treturn err\n\t}\n\n\t// retry\n\treturn d.create(id, parent, opts)\n}\n\nfunc (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts) error {\n\tvar storageOpt map[string]string\n\tif opts != nil {\n\t\tstorageOpt = opts.StorageOpt\n\t}\n\n\tname := d.zfsPath(id)\n\tmountpoint := d.mountPath(id)\n\tquota, err := parseStorageOpt(storageOpt)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif parent == \"\" {\n\t\trootIDs := idtools.IDPair{UID: 0, GID: 0}\n\t\tvar mountLabel string\n\t\tif opts != nil {\n\t\t\trootUID, rootGID, err := idtools.GetRootUIDGID(opts.UIDs(), opts.GIDs())\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to get root uid/gid: %w\", err)\n\t\t\t}\n\t\t\trootIDs = idtools.IDPair{UID: rootUID, GID: rootGID}\n\t\t\tmountLabel = opts.MountLabel\n\t\t}\n\t\tmountoptions := map[string]string{\"mountpoint\": \"legacy\"}\n\t\tfs, err := zfs.CreateFilesystem(name, mountoptions)\n\t\tif err == nil {\n\t\t\terr = setQuota(name, quota)\n\t\t\tif err == nil {\n\t\t\t\td.Lock()\n\t\t\t\td.filesystemsCache[fs.Name] = true\n\t\t\t\td.Unlock()\n\t\t\t}\n\n\t\t\tif err := idtools.MkdirAllAndChown(mountpoint, defaultPerms, rootIDs); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer func() {\n\t\t\t\tif err := unix.Rmdir(mountpoint); err != nil && !os.IsNotExist(err) {\n\t\t\t\t\tlogrus.Debugf(\"Failed to remove %s mount point %s: %v\", id, mountpoint, err)\n\t\t\t\t}\n\t\t\t}()\n\n\t\t\tmountOpts := label.FormatMountLabel(d.options.mountOptions, mountLabel)\n\n\t\t\tif err := mount.Mount(name, mountpoint, \"zfs\", mountOpts); err != nil {\n\t\t\t\treturn fmt.Errorf(\"creating zfs mount: %w\", err)\n\t\t\t}\n\t\t\tdefer func() {\n\t\t\t\tif err := detachUnmount(mountpoint); err != nil {\n\t\t\t\t\tlogrus.Warnf(\"failed to unmount %s mount %s: %v\", id, mountpoint, err)\n\t\t\t\t}\n\t\t\t}()\n\n\t\t\tif err := os.Chmod(mountpoint, defaultPerms); err != nil {\n\t\t\t\treturn fmt.Errorf(\"setting permissions on zfs mount: %w\", err)\n\t\t\t}\n\n\t\t\t// this is our first mount after creation of the filesystem, and the root dir may still have root\n\t\t\t// permissions instead of the remapped root uid:gid (if user namespaces are enabled):\n\t\t\tif err := os.Chown(mountpoint, rootIDs.UID, rootIDs.GID); err != nil {\n\t\t\t\treturn fmt.Errorf(\"modifying zfs mountpoint (%s) ownership: %w\", mountpoint, err)\n\t\t\t}\n\n\t\t}\n\t\treturn err\n\t}\n\terr = d.cloneFilesystem(name, d.zfsPath(parent))\n\tif err == nil {\n\t\terr = setQuota(name, quota)\n\t}\n\treturn err\n}\n\nfunc parseStorageOpt(storageOpt map[string]string) (string, error) {\n\t// Read size to change the disk quota per container\n\tfor k, v := range storageOpt {\n\t\tkey := strings.ToLower(k)\n\t\tswitch key {\n\t\tcase \"size\":\n\t\t\treturn v, nil\n\t\tdefault:\n\t\t\treturn \"0\", fmt.Errorf(\"unknown option %s\", key)\n\t\t}\n\t}\n\treturn \"0\", nil\n}\n\nfunc setQuota(name string, quota string) error {\n\tif quota == \"0\" {\n\t\treturn nil\n\t}\n\tfs, err := zfs.GetDataset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn fs.SetProperty(\"quota\", quota)\n}\n\n// Remove deletes the dataset, filesystem and the cache for the given id.\nfunc (d *Driver) Remove(id string) error {\n\tname := d.zfsPath(id)\n\tdataset := zfs.Dataset{Name: name}\n\terr := dataset.Destroy(zfs.DestroyRecursive)\n\tif err != nil {\n\t\t// We must be tolerant in case the image has already been removed,\n\t\t// for example, accidentally by hand.\n\t\tif _, err1 := zfs.GetDataset(name); err1 == nil {\n\t\t\treturn err\n\t\t}\n\t\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(\"Layer %s has already been removed; ignore it and continue to delete the cache\", id)\n\t}\n\td.Lock()\n\tdelete(d.filesystemsCache, name)\n\td.Unlock()\n\treturn nil\n}\n\n// DeferredRemove is not implemented.\n// It calls Remove directly.\nfunc (d *Driver) DeferredRemove(id string) (tempdir.CleanupTempDirFunc, error) {\n\treturn nil, d.Remove(id)\n}\n\n// Get returns the mountpoint for the given id after creating the target directories if necessary.\nfunc (d *Driver) Get(id string, options graphdriver.MountOpts) (_ string, retErr error) {\n\tmountpoint := d.mountPath(id)\n\tif count := d.ctr.Increment(mountpoint); count > 1 {\n\t\treturn mountpoint, nil\n\t}\n\tdefer func() {\n\t\tif retErr != nil {\n\t\t\tif c := d.ctr.Decrement(mountpoint); c <= 0 {\n\t\t\t\tif mntErr := unix.Unmount(mountpoint, 0); mntErr != nil {\n\t\t\t\t\tlogrus.WithField(\"storage-driver\", \"zfs\").Errorf(\"Error unmounting %v: %v\", mountpoint, mntErr)\n\t\t\t\t}\n\t\t\t\tif rmErr := unix.Rmdir(mountpoint); rmErr != nil && !os.IsNotExist(rmErr) {\n\t\t\t\t\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(\"Failed to remove %s: %v\", id, rmErr)\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}()\n\n\t// In the case of a read-only mount we first mount read-write so we can set the\n\t// correct permissions on the mount point and remount read-only afterwards.\n\tremountReadOnly := false\n\tmountOptions := d.options.mountOptions\n\tif len(options.Options) > 0 {\n\t\tvar newOptions []string\n\t\tfor _, option := range options.Options {\n\t\t\tif option == \"ro\" {\n\t\t\t\t// Filter out read-only mount option but remember for later remounting.\n\t\t\t\tremountReadOnly = true\n\t\t\t} else {\n\t\t\t\tnewOptions = append(newOptions, option)\n\t\t\t}\n\t\t}\n\t\tmountOptions = strings.Join(newOptions, \",\")\n\t}\n\n\tfilesystem := d.zfsPath(id)\n\topts := label.FormatMountLabel(mountOptions, options.MountLabel)\n\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(`mount(\"%s\", \"%s\", \"%s\")`, filesystem, mountpoint, opts)\n\n\t// Create the target directories if they don't exist\n\tif err := os.MkdirAll(mountpoint, 0o755); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif err := mount.Mount(filesystem, mountpoint, \"zfs\", opts); err != nil {\n\t\treturn \"\", fmt.Errorf(\"creating zfs mount: %w\", err)\n\t}\n\n\tif remountReadOnly {\n\t\topts = label.FormatMountLabel(\"remount,ro\", options.MountLabel)\n\t\tif err := mount.Mount(filesystem, mountpoint, \"zfs\", opts); err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"remounting zfs mount read-only: %w\", err)\n\t\t}\n\t}\n\n\treturn mountpoint, nil\n}\n\n// Put removes the existing mountpoint for the given id if it exists.\nfunc (d *Driver) Put(id string) error {\n\tmountpoint := d.mountPath(id)\n\tif count := d.ctr.Decrement(mountpoint); count > 0 {\n\t\treturn nil\n\t}\n\n\tlogger := logrus.WithField(\"storage-driver\", \"zfs\")\n\n\tlogger.Debugf(`unmount(\"%s\")`, mountpoint)\n\n\tif err := detachUnmount(mountpoint); err != nil {\n\t\tlogger.Warnf(\"Failed to unmount %s mount %s: %v\", id, mountpoint, err)\n\t}\n\tif err := unix.Rmdir(mountpoint); err != nil && !os.IsNotExist(err) {\n\t\tlogger.Debugf(\"Failed to remove %s mount point %s: %v\", id, mountpoint, err)\n\t}\n\n\treturn nil\n}\n\n// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.\n// For ZFS, it queries the full mount path for this ID.\nfunc (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {\n\treturn directory.Usage(d.mountPath(id))\n}\n\n// Exists checks to see if the cache entry exists for the given id.\nfunc (d *Driver) Exists(id string) bool {\n\td.Lock()\n\tdefer d.Unlock()\n\treturn d.filesystemsCache[d.zfsPath(id)]\n}\n\n// List layers (not including additional image stores).  Our layers aren't all\n// dependent on a single well-known dataset, so we can't reliably tell which\n// datasets are ours and which ones just look like they could be ours.\nfunc (d *Driver) ListLayers() ([]string, error) {\n\treturn nil, graphdriver.ErrNotSupported\n}\n\n// AdditionalImageStores returns additional image stores supported by the driver\nfunc (d *Driver) AdditionalImageStores() []string {\n\treturn nil\n}\n\n// Dedup performs deduplication of the driver's storage.\nfunc (d *Driver) Dedup(req graphdriver.DedupArgs) (graphdriver.DedupResult, error) {\n\treturn graphdriver.DedupResult{}, nil\n}\n\n// GetTempDirRootDirs is not implemented.\nfunc (d *Driver) GetTempDirRootDirs() []string {\n\treturn []string{}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/zfs/zfs_freebsd.go",
    "content": "package zfs\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/sirupsen/logrus\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc checkRootdirFs(rootdir string) error {\n\tvar buf unix.Statfs_t\n\tif err := unix.Statfs(rootdir, &buf); err != nil {\n\t\treturn fmt.Errorf(\"failed to access '%s': %s\", rootdir, err)\n\t}\n\n\t// on FreeBSD buf.Fstypename contains ['z', 'f', 's', 0 ... ]\n\tif (buf.Fstypename[0] != 122) || (buf.Fstypename[1] != 102) || (buf.Fstypename[2] != 115) || (buf.Fstypename[3] != 0) {\n\t\tlogrus.WithField(\"storage-driver\", \"zfs\").Debugf(\"no zfs dataset found for rootdir '%s'\", rootdir)\n\t\treturn fmt.Errorf(\"no zfs dataset found for rootdir '%s': %w\", rootdir, graphdriver.ErrPrerequisites)\n\t}\n\n\treturn nil\n}\n\nfunc getMountpoint(id string) string {\n\treturn id\n}\n\nfunc detachUnmount(mountpoint string) error {\n\t// FreeBSD's MNT_FORCE is roughly equivalent to MNT_DETACH\n\treturn unix.Unmount(mountpoint, unix.MNT_FORCE)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/zfs/zfs_linux.go",
    "content": "package zfs\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/sirupsen/logrus\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc checkRootdirFs(rootDir string) error {\n\tfsMagic, err := graphdriver.GetFSMagic(rootDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbackingFS := \"unknown\"\n\tif fsName, ok := graphdriver.FsNames[fsMagic]; ok {\n\t\tbackingFS = fsName\n\t}\n\n\tif fsMagic != graphdriver.FsMagicZfs {\n\t\tlogrus.WithField(\"root\", rootDir).WithField(\"backingFS\", backingFS).WithField(\"storage-driver\", \"zfs\").Error(\"No zfs dataset found for root\")\n\t\treturn fmt.Errorf(\"no zfs dataset found for rootdir '%s': %w\", rootDir, graphdriver.ErrPrerequisites)\n\t}\n\n\treturn nil\n}\n\nfunc getMountpoint(id string) string {\n\treturn id\n}\n\nfunc detachUnmount(mountpoint string) error {\n\treturn unix.Unmount(mountpoint, unix.MNT_DETACH)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/drivers/zfs/zfs_unsupported.go",
    "content": "//go:build !linux && !freebsd\n\npackage zfs\n"
  },
  {
    "path": "vendor/go.podman.io/storage/errors.go",
    "content": "package storage\n\nimport (\n\t\"errors\"\n\n\t\"go.podman.io/storage/types\"\n)\n\nvar (\n\t// ErrContainerUnknown indicates that there was no container with the specified name or ID.\n\tErrContainerUnknown = types.ErrContainerUnknown\n\t// ErrDigestUnknown indicates that we were unable to compute the digest of a specified item.\n\tErrDigestUnknown = types.ErrDigestUnknown\n\t// ErrDuplicateID indicates that an ID which is to be assigned to a new item is already being used.\n\tErrDuplicateID = types.ErrDuplicateID\n\t// ErrDuplicateImageNames indicates that the read-only store uses the same name for multiple images.\n\tErrDuplicateImageNames = types.ErrDuplicateImageNames\n\t// ErrDuplicateLayerNames indicates that the read-only store uses the same name for multiple layers.\n\tErrDuplicateLayerNames = types.ErrDuplicateLayerNames\n\t// ErrDuplicateName indicates that a name which is to be assigned to a new item is already being used.\n\tErrDuplicateName = types.ErrDuplicateName\n\t// ErrImageUnknown indicates that there was no image with the specified name or ID.\n\tErrImageUnknown = types.ErrImageUnknown\n\t// ErrImageUsedByContainer is returned when the caller attempts to delete an image that is a container's image.\n\tErrImageUsedByContainer = types.ErrImageUsedByContainer\n\t// ErrIncompleteOptions is returned when the caller attempts to initialize a Store without providing required information.\n\tErrIncompleteOptions = types.ErrIncompleteOptions\n\t// ErrInvalidBigDataName indicates that the name for a big data item is not acceptable; it may be empty.\n\tErrInvalidBigDataName = types.ErrInvalidBigDataName\n\t// ErrLayerHasChildren is returned when the caller attempts to delete a layer that has children.\n\tErrLayerHasChildren = types.ErrLayerHasChildren\n\t// ErrLayerNotMounted is returned when the requested information can only be computed for a mounted layer, and the layer is not mounted.\n\tErrLayerNotMounted = types.ErrLayerNotMounted\n\t// ErrLayerUnknown indicates that there was no layer with the specified name or ID.\n\tErrLayerUnknown = types.ErrLayerUnknown\n\t// ErrLayerUsedByContainer is returned when the caller attempts to delete a layer that is a container's layer.\n\tErrLayerUsedByContainer = types.ErrLayerUsedByContainer\n\t// ErrLayerUsedByImage is returned when the caller attempts to delete a layer that is an image's top layer.\n\tErrLayerUsedByImage = types.ErrLayerUsedByImage\n\t// ErrLoadError indicates that there was an initialization error.\n\tErrLoadError = types.ErrLoadError\n\t// ErrNotAContainer is returned when the caller attempts to delete a container that isn't a container.\n\tErrNotAContainer = types.ErrNotAContainer\n\t// ErrNotALayer is returned when the caller attempts to delete a layer that isn't a layer.\n\tErrNotALayer = types.ErrNotALayer\n\t// ErrNotAnID is returned when the caller attempts to read or write metadata from an item that doesn't exist.\n\tErrNotAnID = types.ErrNotAnID\n\t// ErrNotAnImage is returned when the caller attempts to delete an image that isn't an image.\n\tErrNotAnImage = types.ErrNotAnImage\n\t// ErrParentIsContainer is returned when a caller attempts to create a layer as a child of a container's layer.\n\tErrParentIsContainer = types.ErrParentIsContainer\n\t// ErrParentUnknown indicates that we didn't record the ID of the parent of the specified layer.\n\tErrParentUnknown = types.ErrParentUnknown\n\t// ErrSizeUnknown is returned when the caller asks for the size of a big data item, but the Store couldn't determine the answer.\n\tErrSizeUnknown = types.ErrSizeUnknown\n\t// ErrStoreIsReadOnly is returned when the caller makes a call to a read-only store that would require modifying its contents.\n\tErrStoreIsReadOnly = types.ErrStoreIsReadOnly\n\t// ErrNotSupported is returned when the requested functionality is not supported.\n\tErrNotSupported = types.ErrNotSupported\n\t// ErrInvalidMappings is returned when the specified mappings are invalid.\n\tErrInvalidMappings = types.ErrInvalidMappings\n\t// ErrInvalidNameOperation is returned when updateName is called with invalid operation.\n\t// Internal error\n\terrInvalidUpdateNameOperation = errors.New(\"invalid update name operation\")\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/idset.go",
    "content": "package storage\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/google/go-intervals/intervalset\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/types\"\n)\n\n// idSet represents a set of integer IDs. It is stored as an ordered set of intervals.\ntype idSet struct {\n\tset *intervalset.ImmutableSet\n}\n\nfunc newIDSet(intervals []interval) *idSet {\n\ts := intervalset.Empty()\n\tfor _, i := range intervals {\n\t\ts.Add(intervalset.NewSet([]intervalset.Interval{i}))\n\t}\n\treturn &idSet{set: s.ImmutableSet()}\n}\n\n// getHostIDs returns all the host ids in the id map.\nfunc getHostIDs(idMaps []idtools.IDMap) *idSet {\n\tvar intervals []interval\n\tfor _, m := range idMaps {\n\t\tintervals = append(intervals, interval{start: m.HostID, end: m.HostID + m.Size})\n\t}\n\treturn newIDSet(intervals)\n}\n\n// getContainerIDs returns all the container ids in the id map.\nfunc getContainerIDs(idMaps []idtools.IDMap) *idSet {\n\tvar intervals []interval\n\tfor _, m := range idMaps {\n\t\tintervals = append(intervals, interval{start: m.ContainerID, end: m.ContainerID + m.Size})\n\t}\n\treturn newIDSet(intervals)\n}\n\n// subtract returns the subtraction of `s` and `t`. `s` and `t` are unchanged.\nfunc (s *idSet) subtract(t *idSet) *idSet {\n\tif s == nil || t == nil {\n\t\treturn s\n\t}\n\treturn &idSet{set: s.set.Sub(t.set)}\n}\n\n// union returns the union of `s` and `t`. `s` and `t` are unchanged.\nfunc (s *idSet) union(t *idSet) *idSet {\n\tif s == nil {\n\t\treturn t\n\t} else if t == nil {\n\t\treturn s\n\t}\n\treturn &idSet{set: s.set.Union(t.set)}\n}\n\n// Methods to iterate over the intervals of the idSet. intervalset doesn't provide one :-(\n\n// iterator to idSet. Returns nil if iteration finishes.\ntype iteratorFn func() *interval\n\n// cancelFn must be called exactly once unless iteratorFn returns nil, otherwise go routine might\n// leak.\ntype cancelFn func()\n\nfunc (s *idSet) iterator() (iteratorFn, cancelFn) {\n\tif s == nil {\n\t\treturn func() *interval { return nil }, func() {}\n\t}\n\tcancelCh := make(chan byte)\n\tdataCh := make(chan interval)\n\tgo func() {\n\t\ts.set.Intervals(func(ii intervalset.Interval) bool {\n\t\t\tselect {\n\t\t\tcase <-cancelCh:\n\t\t\t\treturn false\n\t\t\tcase dataCh <- ii.(interval):\n\t\t\t\treturn true\n\t\t\t}\n\t\t})\n\t\tclose(dataCh)\n\t}()\n\titerator := func() *interval {\n\t\ti, ok := <-dataCh\n\t\tif !ok {\n\t\t\treturn nil\n\t\t}\n\t\treturn &i\n\t}\n\treturn iterator, func() { close(cancelCh) }\n}\n\n// size returns the total number of ids in the ID set.\nfunc (s *idSet) size() int {\n\tvar size int\n\titerator, cancel := s.iterator()\n\tdefer cancel()\n\tfor i := iterator(); i != nil; i = iterator() {\n\t\tsize += i.length()\n\t}\n\treturn size\n}\n\n// findAvailable finds the `n` ids from `s`.\nfunc (s *idSet) findAvailable(n int) (*idSet, error) {\n\tvar intervals []intervalset.Interval\n\titerator, cancel := s.iterator()\n\tdefer cancel()\n\tfor i := iterator(); n > 0 && i != nil; i = iterator() {\n\t\ti.end = min(i.end, i.start+n)\n\t\tintervals = append(intervals, *i)\n\t\tn -= i.length()\n\t}\n\tif n > 0 {\n\t\treturn nil, types.ErrNoAvailableIDs\n\t}\n\treturn &idSet{set: intervalset.NewImmutableSet(intervals)}, nil\n}\n\n// zip creates an id map from `s` (host ids) and container ids.\nfunc (s *idSet) zip(container *idSet) []idtools.IDMap {\n\thostIterator, hostCancel := s.iterator()\n\tdefer hostCancel()\n\tcontainerIterator, containerCancel := container.iterator()\n\tdefer containerCancel()\n\tvar out []idtools.IDMap\n\tfor h, c := hostIterator(), containerIterator(); h != nil && c != nil; {\n\t\tif n := min(h.length(), c.length()); n > 0 {\n\t\t\tout = append(out, idtools.IDMap{\n\t\t\t\tContainerID: c.start,\n\t\t\t\tHostID:      h.start,\n\t\t\t\tSize:        n,\n\t\t\t})\n\t\t\th.start += n\n\t\t\tc.start += n\n\t\t}\n\t\tif h.IsZero() {\n\t\t\th = hostIterator()\n\t\t}\n\t\tif c.IsZero() {\n\t\t\tc = containerIterator()\n\t\t}\n\t}\n\treturn out\n}\n\n// interval represents an interval of integers [start, end). Note it is allowed to have\n// start >= end, in which case it is treated as an empty interval. It implements interface\n// intervalset.Interval.\ntype interval struct {\n\t// Start of the interval (inclusive).\n\tstart int\n\t// End of the interval (exclusive).\n\tend int\n}\n\nfunc (i interval) length() int {\n\treturn max(0, i.end-i.start)\n}\n\nfunc (i interval) Intersect(other intervalset.Interval) intervalset.Interval {\n\tj := other.(interval)\n\treturn interval{start: max(i.start, j.start), end: min(i.end, j.end)}\n}\n\nfunc (i interval) Before(other intervalset.Interval) bool {\n\tj := other.(interval)\n\treturn !i.IsZero() && !j.IsZero() && i.end < j.start\n}\n\nfunc (i interval) IsZero() bool {\n\treturn i.length() <= 0\n}\n\nfunc (i interval) Bisect(other intervalset.Interval) (intervalset.Interval, intervalset.Interval) {\n\tj := other.(interval)\n\tif j.IsZero() {\n\t\treturn i, interval{}\n\t}\n\t// Subtracting [j.start, j.end) is equivalent to the union of intersecting (-inf, j.start) and\n\t// [j.end, +inf).\n\tleft := interval{start: i.start, end: min(i.end, j.start)}\n\tright := interval{start: max(i.start, j.end), end: i.end}\n\treturn left, right\n}\n\nfunc (i interval) Adjoin(other intervalset.Interval) intervalset.Interval {\n\tj := other.(interval)\n\tif !i.IsZero() && !j.IsZero() && (i.end == j.start || j.end == i.start) {\n\t\treturn interval{start: min(i.start, j.start), end: max(i.end, j.end)}\n\t}\n\treturn interval{}\n}\n\nfunc (i interval) Encompass(other intervalset.Interval) intervalset.Interval {\n\tj := other.(interval)\n\tswitch {\n\tcase i.IsZero():\n\t\treturn j\n\tcase j.IsZero():\n\t\treturn i\n\tdefault:\n\t\treturn interval{start: min(i.start, j.start), end: max(i.end, j.end)}\n\t}\n}\n\nfunc hasOverlappingRanges(mappings []idtools.IDMap) error {\n\thostIntervals := intervalset.Empty()\n\tcontainerIntervals := intervalset.Empty()\n\n\tvar conflicts []string\n\n\tfor _, m := range mappings {\n\t\tc := interval{start: m.ContainerID, end: m.ContainerID + m.Size}\n\t\th := interval{start: m.HostID, end: m.HostID + m.Size}\n\n\t\tadded := false\n\t\toverlaps := false\n\n\t\tcontainerIntervals.IntervalsBetween(c, func(x intervalset.Interval) bool {\n\t\t\toverlaps = true\n\t\t\treturn false\n\t\t})\n\t\tif overlaps {\n\t\t\tconflicts = append(conflicts, fmt.Sprintf(\"%v:%v:%v\", m.ContainerID, m.HostID, m.Size))\n\t\t\tadded = true\n\t\t}\n\t\tcontainerIntervals.Add(intervalset.NewSet([]intervalset.Interval{c}))\n\n\t\thostIntervals.IntervalsBetween(h, func(x intervalset.Interval) bool {\n\t\t\toverlaps = true\n\t\t\treturn false\n\t\t})\n\t\tif overlaps && !added {\n\t\t\tconflicts = append(conflicts, fmt.Sprintf(\"%v:%v:%v\", m.ContainerID, m.HostID, m.Size))\n\t\t}\n\t\thostIntervals.Add(intervalset.NewSet([]intervalset.Interval{h}))\n\t}\n\n\tif conflicts != nil {\n\t\tif len(conflicts) == 1 {\n\t\t\treturn fmt.Errorf(\"the specified UID and/or GID mapping %s conflicts with other mappings: %w\", conflicts[0], ErrInvalidMappings)\n\t\t}\n\t\treturn fmt.Errorf(\"the specified UID and/or GID mappings %s conflict with other mappings: %w\", strings.Join(conflicts, \", \"), ErrInvalidMappings)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/images.go",
    "content": "package storage\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/lockfile\"\n\t\"go.podman.io/storage/pkg/stringid\"\n\t\"go.podman.io/storage/pkg/stringutils\"\n\t\"go.podman.io/storage/pkg/truncindex\"\n)\n\nconst (\n\t// ImageDigestManifestBigDataNamePrefix is a prefix of big data item\n\t// names which we consider to be manifests, used for computing a\n\t// \"digest\" value for the image as a whole, by which we can locate the\n\t// image later.\n\tImageDigestManifestBigDataNamePrefix = \"manifest\"\n\t// ImageDigestBigDataKey is provided for compatibility with older\n\t// versions of the image library.  It will be removed in the future.\n\tImageDigestBigDataKey = \"manifest\"\n)\n\n// An Image is a reference to a layer and an associated metadata string.\ntype Image struct {\n\t// ID is either one which was specified at create-time, or a random\n\t// value which was generated by the library.\n\tID string `json:\"id\"`\n\n\t// Digest is a digest value that we can use to locate the image, if one\n\t// was specified at creation-time.\n\tDigest digest.Digest `json:\"digest,omitempty\"`\n\n\t// Digests is a list of digest values of the image's manifests, and\n\t// possibly a manually-specified value, that we can use to locate the\n\t// image.  If Digest is set, its value is also in this list.\n\tDigests []digest.Digest `json:\"-\"`\n\n\t// Names is an optional set of user-defined convenience values.  The\n\t// image can be referred to by its ID or any of its names.  Names are\n\t// unique among images, and are often the text representation of tagged\n\t// or canonical references.\n\tNames []string `json:\"names,omitempty\"`\n\n\t// NamesHistory is an optional set of Names the image had in the past. The\n\t// contained names are free from any duplicates, whereas the newest entry\n\t// is the first one.\n\tNamesHistory []string `json:\"names-history,omitempty\"`\n\n\t// TopLayer is the ID of the topmost layer of the image itself, if the\n\t// image contains one or more layers.  Multiple images can refer to the\n\t// same top layer.\n\tTopLayer string `json:\"layer,omitempty\"`\n\n\t// MappedTopLayers are the IDs of alternate versions of the top layer\n\t// which have the same contents and parent, and which differ from\n\t// TopLayer only in which ID mappings they use.  When the image is\n\t// to be removed, they should be removed before the TopLayer, as the\n\t// graph driver may depend on that.\n\tMappedTopLayers []string `json:\"mapped-layers,omitempty\"`\n\n\t// Metadata is data we keep for the convenience of the caller.  It is not\n\t// expected to be large, since it is kept in memory.\n\tMetadata string `json:\"metadata,omitempty\"`\n\n\t// BigDataNames is a list of names of data items that we keep for the\n\t// convenience of the caller.  They can be large, and are only in\n\t// memory when being read from or written to disk.\n\tBigDataNames []string `json:\"big-data-names,omitempty\"`\n\n\t// BigDataSizes maps the names in BigDataNames to the sizes of the data\n\t// that has been stored, if they're known.\n\tBigDataSizes map[string]int64 `json:\"big-data-sizes,omitempty\"`\n\n\t// BigDataDigests maps the names in BigDataNames to the digests of the\n\t// data that has been stored, if they're known.\n\tBigDataDigests map[string]digest.Digest `json:\"big-data-digests,omitempty\"`\n\n\t// Created is the datestamp for when this image was created.  Older\n\t// versions of the library did not track this information, so callers\n\t// will likely want to use the IsZero() method to verify that a value\n\t// is set before using it.\n\tCreated time.Time `json:\"created\"`\n\n\t// ReadOnly is true if this image resides in a read-only layer store.\n\tReadOnly bool `json:\"-\"`\n\n\tFlags map[string]any `json:\"flags,omitempty\"`\n}\n\n// roImageStore provides bookkeeping for information about Images.\ntype roImageStore interface {\n\troMetadataStore\n\troBigDataStore\n\n\t// startReading makes sure the store is fresh, and locks it for reading.\n\t// If this succeeds, the caller MUST call stopReading().\n\tstartReading() error\n\n\t// stopReading releases locks obtained by startReading.\n\tstopReading()\n\n\t// Exists checks if there is an image with the given ID or name.\n\tExists(id string) bool\n\n\t// Get retrieves information about an image given an ID or name.\n\tGet(id string) (*Image, error)\n\n\t// Images returns a slice enumerating the known images.\n\tImages() ([]Image, error)\n\n\t// ByDigest returns a slice enumerating the images which have either an\n\t// explicitly-set digest, or a big data item with a name that starts\n\t// with ImageDigestManifestBigDataNamePrefix, which matches the\n\t// specified digest.\n\tByDigest(d digest.Digest) ([]*Image, error)\n}\n\n// rwImageStore provides bookkeeping for information about Images.\ntype rwImageStore interface {\n\troImageStore\n\trwMetadataStore\n\trwImageBigDataStore\n\tflaggableStore\n\n\t// startWriting makes sure the store is fresh, and locks it for writing.\n\t// If this succeeds, the caller MUST call stopWriting().\n\tstartWriting() error\n\n\t// stopWriting releases locks obtained by startWriting.\n\tstopWriting()\n\n\t// create creates an image that has a specified ID (or a random one) and\n\t// optional names, using the specified layer as its topmost (hopefully\n\t// read-only) layer.  That layer can be referenced by multiple images.\n\tcreate(id string, names []string, layer string, options ImageOptions) (*Image, error)\n\n\t// updateNames modifies names associated with an image based on (op, names).\n\t// The values are expected to be valid normalized\n\t// named image references.\n\tupdateNames(id string, names []string, op updateNameOperation) error\n\n\t// Delete removes the record of the image.\n\tDelete(id string) error\n\n\taddMappedTopLayer(id, layer string) error\n\tremoveMappedTopLayer(id, layer string) error\n\n\t// Clean up unreferenced per-image data.\n\tGarbageCollect() error\n\n\t// Wipe removes records of all images.\n\tWipe() error\n}\n\ntype imageStore struct {\n\t// The following fields are only set when constructing imageStore, and must never be modified afterwards.\n\t// They are safe to access without any other locking.\n\tlockfile *lockfile.LockFile // lockfile.IsReadWrite can be used to distinguish between read-write and read-only image stores.\n\tdir      string\n\n\tinProcessLock sync.RWMutex // Can _only_ be obtained with lockfile held.\n\t// The following fields can only be read/written with read/write ownership of inProcessLock, respectively.\n\t// Almost all users should use startReading() or startWriting().\n\tlastWrite lockfile.LastWrite\n\timages    []*Image\n\tidindex   *truncindex.TruncIndex\n\tbyid      map[string]*Image\n\tbyname    map[string]*Image\n\tbydigest  map[digest.Digest][]*Image\n}\n\nfunc copyImage(i *Image) *Image {\n\treturn &Image{\n\t\tID:              i.ID,\n\t\tDigest:          i.Digest,\n\t\tDigests:         copySlicePreferringNil(i.Digests),\n\t\tNames:           copySlicePreferringNil(i.Names),\n\t\tNamesHistory:    copySlicePreferringNil(i.NamesHistory),\n\t\tTopLayer:        i.TopLayer,\n\t\tMappedTopLayers: copySlicePreferringNil(i.MappedTopLayers),\n\t\tMetadata:        i.Metadata,\n\t\tBigDataNames:    copySlicePreferringNil(i.BigDataNames),\n\t\tBigDataSizes:    copyMapPreferringNil(i.BigDataSizes),\n\t\tBigDataDigests:  copyMapPreferringNil(i.BigDataDigests),\n\t\tCreated:         i.Created,\n\t\tReadOnly:        i.ReadOnly,\n\t\tFlags:           copyMapPreferringNil(i.Flags),\n\t}\n}\n\nfunc copyImageSlice(slice []*Image) []*Image {\n\tif len(slice) > 0 {\n\t\tcp := make([]*Image, len(slice))\n\t\tfor i := range slice {\n\t\t\tcp[i] = copyImage(slice[i])\n\t\t}\n\t\treturn cp\n\t}\n\treturn nil\n}\n\n// startWritingWithReload makes sure the store is fresh if canReload, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\n//\n// This is an internal implementation detail of imageStore construction, every other caller\n// should use startReading() instead.\nfunc (r *imageStore) startWritingWithReload(canReload bool) error {\n\tr.lockfile.Lock()\n\tr.inProcessLock.Lock()\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tr.inProcessLock.Unlock()\n\t\t\tr.lockfile.Unlock()\n\t\t}\n\t}()\n\n\tif canReload {\n\t\tif _, err := r.reloadIfChanged(true); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tsucceeded = true\n\treturn nil\n}\n\n// startWriting makes sure the store is fresh, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\nfunc (r *imageStore) startWriting() error {\n\treturn r.startWritingWithReload(true)\n}\n\n// stopWriting releases locks obtained by startWriting.\nfunc (r *imageStore) stopWriting() {\n\tr.inProcessLock.Unlock()\n\tr.lockfile.Unlock()\n}\n\n// startReadingWithReload makes sure the store is fresh if canReload, and locks it for reading.\n// If this succeeds, the caller MUST call stopReading().\n//\n// This is an internal implementation detail of imageStore construction, every other caller\n// should use startReading() instead.\nfunc (r *imageStore) startReadingWithReload(canReload bool) error {\n\t// inProcessLocked calls the nested function with r.inProcessLock held for writing.\n\tinProcessLocked := func(fn func() error) error {\n\t\tr.inProcessLock.Lock()\n\t\tdefer r.inProcessLock.Unlock()\n\t\treturn fn()\n\t}\n\n\tr.lockfile.RLock()\n\tunlockFn := r.lockfile.Unlock // A function to call to clean up, or nil\n\tdefer func() {\n\t\tif unlockFn != nil {\n\t\t\tunlockFn()\n\t\t}\n\t}()\n\tr.inProcessLock.RLock()\n\tunlockFn = r.stopReading\n\n\tif canReload {\n\t\t// If we are lucky, we can just hold the read locks, check that we are fresh, and continue.\n\t\t_, modified, err := r.modified()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif modified {\n\t\t\t// We are unlucky, and need to reload.\n\t\t\t// NOTE: Multiple goroutines can get to this place approximately simultaneously.\n\t\t\tr.inProcessLock.RUnlock()\n\t\t\tunlockFn = r.lockfile.Unlock\n\n\t\t\t// r.lastWrite can change at this point if another goroutine reloads the store before us. That’s why we don’t unconditionally\n\t\t\t// trigger a load below; we (lock and) reloadIfChanged() again.\n\n\t\t\t// First try reloading with r.lockfile held for reading.\n\t\t\t// r.inProcessLock will serialize all goroutines that got here;\n\t\t\t// each will re-check on-disk state vs. r.lastWrite, and the first one will actually reload the data.\n\t\t\tvar tryLockedForWriting bool\n\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t// We could optimize this further: The r.lockfile.GetLastWrite() value shouldn’t change as long as we hold r.lockfile,\n\t\t\t\t// so if r.lastWrite was already updated, we don’t need to actually read the on-filesystem lock.\n\t\t\t\tvar err error\n\t\t\t\ttryLockedForWriting, err = r.reloadIfChanged(false)\n\t\t\t\treturn err\n\t\t\t}); err != nil {\n\t\t\t\tif !tryLockedForWriting {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\t// Not good enough, we need r.lockfile held for writing. So, let’s do that.\n\t\t\t\tunlockFn()\n\t\t\t\tunlockFn = nil\n\n\t\t\t\tr.lockfile.Lock()\n\t\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t\t_, err := r.reloadIfChanged(true)\n\t\t\t\t\treturn err\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tunlockFn()\n\t\t\t\tunlockFn = nil\n\n\t\t\t\tr.lockfile.RLock()\n\t\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\t\t// We need to check for a reload once more because the on-disk state could have been modified\n\t\t\t\t// after we released the lock.\n\t\t\t\t// If that, _again_, finds inconsistent state, just give up.\n\t\t\t\t// We could, plausibly, retry a few times, but that inconsistent state (duplicate image names)\n\t\t\t\t// shouldn’t be saved (by correct implementations) in the first place.\n\t\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t\t_, err := r.reloadIfChanged(false)\n\t\t\t\t\treturn err\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"(even after successfully cleaning up once:) %w\", err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// NOTE that we hold neither a read nor write inProcessLock at this point. That’s fine in ordinary operation, because\n\t\t\t// the on-filesystem r.lockfile should protect us against (cooperating) writers, and any use of r.inProcessLock\n\t\t\t// protects us against in-process writers modifying data.\n\t\t\t// In presence of non-cooperating writers, we just ensure that 1) the in-memory data is not clearly out-of-date\n\t\t\t// and 2) access to the in-memory data is not racy;\n\t\t\t// but we can’t protect against those out-of-process writers modifying _files_ while we are assuming they are in a consistent state.\n\n\t\t\tr.inProcessLock.RLock()\n\t\t}\n\t}\n\n\tunlockFn = nil\n\treturn nil\n}\n\n// startReading makes sure the store is fresh, and locks it for reading.\n// If this succeeds, the caller MUST call stopReading().\nfunc (r *imageStore) startReading() error {\n\treturn r.startReadingWithReload(true)\n}\n\n// stopReading releases locks obtained by startReading.\nfunc (r *imageStore) stopReading() {\n\tr.inProcessLock.RUnlock()\n\tr.lockfile.Unlock()\n}\n\n// modified returns true if the on-disk state has changed (i.e. if reloadIfChanged may need to modify the store),\n// and a lockfile.LastWrite value for that update.\n//\n// The caller must hold r.lockfile for reading _or_ writing.\n// The caller must hold r.inProcessLock for reading or writing.\nfunc (r *imageStore) modified() (lockfile.LastWrite, bool, error) {\n\treturn r.lockfile.ModifiedSince(r.lastWrite)\n}\n\n// reloadIfChanged reloads the contents of the store from disk if it is changed.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n//\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// reloadIfChanged() with lockedForWriting could succeed.\nfunc (r *imageStore) reloadIfChanged(lockedForWriting bool) (bool, error) {\n\tlastWrite, modified, err := r.modified()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\t// We require callers to always hold r.inProcessLock for WRITING, even if they might not end up calling r.load()\n\t// and modify no fields, to ensure they see fresh data:\n\t// r.lockfile.Modified() only returns true once per change.  Without an exclusive lock,\n\t// one goroutine might see r.lockfile.Modified() == true and decide to load, and in the meanwhile another one could\n\t// see r.lockfile.Modified() == false and proceed to use in-memory data without noticing it is stale.\n\tif modified {\n\t\tif tryLockedForWriting, err := r.load(lockedForWriting); err != nil {\n\t\t\treturn tryLockedForWriting, err // r.lastWrite is unchanged, so we will load the next time again.\n\t\t}\n\t\tr.lastWrite = lastWrite\n\t}\n\treturn false, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) Images() ([]Image, error) {\n\timages := make([]Image, len(r.images))\n\tfor i := range r.images {\n\t\timages[i] = *copyImage(r.images[i])\n\t}\n\treturn images, nil\n}\n\n// This looks for datadirs in the store directory that are not referenced\n// by the json file and removes it. These can happen in the case of unclean\n// shutdowns.\n// Requires startReading or startWriting.\nfunc (r *imageStore) GarbageCollect() error {\n\tentries, err := os.ReadDir(r.dir)\n\tif err != nil {\n\t\t// Unexpected, don't try any GC\n\t\treturn err\n\t}\n\n\tfor _, entry := range entries {\n\t\tid := entry.Name()\n\t\t// Does it look like a datadir directory?\n\t\tif !entry.IsDir() || stringid.ValidateID(id) != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Should the id be there?\n\t\tif r.byid[id] != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Otherwise remove datadir\n\t\tlogrus.Debugf(\"removing %q\", filepath.Join(r.dir, id))\n\t\tmoreErr := os.RemoveAll(filepath.Join(r.dir, id))\n\t\t// Propagate first error\n\t\tif moreErr != nil && err == nil {\n\t\t\terr = moreErr\n\t\t}\n\t}\n\n\treturn err\n}\n\nfunc (r *imageStore) imagespath() string {\n\treturn filepath.Join(r.dir, \"images.json\")\n}\n\nfunc (r *imageStore) datadir(id string) string {\n\treturn filepath.Join(r.dir, id)\n}\n\nfunc (r *imageStore) datapath(id, key string) string {\n\treturn filepath.Join(r.datadir(id), makeBigDataBaseName(key))\n}\n\n// bigDataNameIsManifest determines if a big data item with the specified name\n// is considered to be representative of the image, in that its digest can be\n// said to also be the image's digest.  Currently, if its name is, or begins\n// with, \"manifest\", we say that it is.\nfunc bigDataNameIsManifest(name string) bool {\n\treturn strings.HasPrefix(name, ImageDigestManifestBigDataNamePrefix)\n}\n\n// recomputeDigests takes a fixed digest and a name-to-digest map and builds a\n// list of the unique values that would identify the image.\n// The caller must hold r.inProcessLock for writing.\nfunc (i *Image) recomputeDigests() error {\n\tvalidDigests := make([]digest.Digest, 0, len(i.BigDataDigests)+1)\n\tdigests := make(map[digest.Digest]struct{})\n\tif i.Digest != \"\" {\n\t\tif err := i.Digest.Validate(); err != nil {\n\t\t\treturn fmt.Errorf(\"validating image digest %q: %w\", string(i.Digest), err)\n\t\t}\n\t\tdigests[i.Digest] = struct{}{}\n\t\tvalidDigests = append(validDigests, i.Digest)\n\t}\n\tfor name, digest := range i.BigDataDigests {\n\t\tif !bigDataNameIsManifest(name) {\n\t\t\tcontinue\n\t\t}\n\t\tif err := digest.Validate(); err != nil {\n\t\t\treturn fmt.Errorf(\"validating digest %q for big data item %q: %w\", string(digest), name, err)\n\t\t}\n\t\t// Deduplicate the digest values.\n\t\tif _, known := digests[digest]; !known {\n\t\t\tdigests[digest] = struct{}{}\n\t\t\tvalidDigests = append(validDigests, digest)\n\t\t}\n\t}\n\tif i.Digest == \"\" && len(validDigests) > 0 {\n\t\ti.Digest = validDigests[0]\n\t}\n\ti.Digests = validDigests\n\treturn nil\n}\n\n// load reloads the contents of the store from disk.\n//\n// Most callers should call reloadIfChanged() instead, to avoid overhead and to correctly\n// manage r.lastWrite.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// retrying with lockedForWriting could succeed.\nfunc (r *imageStore) load(lockedForWriting bool) (bool, error) {\n\trpath := r.imagespath()\n\tdata, err := os.ReadFile(rpath)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn false, err\n\t}\n\n\timages := []*Image{}\n\tif len(data) != 0 {\n\t\tif err := json.Unmarshal(data, &images); err != nil {\n\t\t\treturn false, fmt.Errorf(\"loading %q: %w\", rpath, err)\n\t\t}\n\t}\n\tidlist := make([]string, 0, len(images))\n\tids := make(map[string]*Image)\n\tnames := make(map[string]*Image)\n\tdigests := make(map[digest.Digest][]*Image)\n\tvar errorToResolveBySaving error // == nil\n\tfor n, image := range images {\n\t\tids[image.ID] = images[n]\n\t\tidlist = append(idlist, image.ID)\n\t\tfor _, name := range image.Names {\n\t\t\tif conflict, ok := names[name]; ok {\n\t\t\t\tr.removeName(conflict, name)\n\t\t\t\terrorToResolveBySaving = ErrDuplicateImageNames\n\t\t\t}\n\t\t}\n\t\t// Compute the digest list.\n\t\tif err := image.recomputeDigests(); err != nil {\n\t\t\treturn false, fmt.Errorf(\"computing digests for image with ID %q (%v): %w\", image.ID, image.Names, err)\n\t\t}\n\t\tfor _, name := range image.Names {\n\t\t\tnames[name] = image\n\t\t}\n\t\tfor _, digest := range image.Digests {\n\t\t\tlist := digests[digest]\n\t\t\tdigests[digest] = append(list, image)\n\t\t}\n\t\timage.ReadOnly = !r.lockfile.IsReadWrite()\n\t}\n\n\tif errorToResolveBySaving != nil {\n\t\tif !r.lockfile.IsReadWrite() {\n\t\t\treturn false, errorToResolveBySaving\n\t\t}\n\t\tif !lockedForWriting {\n\t\t\treturn true, errorToResolveBySaving\n\t\t}\n\t}\n\tr.images = images\n\tr.idindex = truncindex.NewTruncIndex(idlist) // Invalid values in idlist are ignored: they are not a reason to refuse processing the whole store.\n\tr.byid = ids\n\tr.byname = names\n\tr.bydigest = digests\n\tif errorToResolveBySaving != nil {\n\t\treturn false, r.Save()\n\t}\n\treturn false, nil\n}\n\n// Save saves the contents of the store to disk.\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for reading (but usually holds it for writing in order to make the desired changes).\nfunc (r *imageStore) Save() error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to modify the image store at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\tr.lockfile.AssertLockedForWriting()\n\trpath := r.imagespath()\n\tif err := os.MkdirAll(filepath.Dir(rpath), 0o700); err != nil {\n\t\treturn err\n\t}\n\tjdata, err := json.Marshal(&r.images)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// This must be done before we write the file, because the process could be terminated\n\t// after the file is written but before the lock file is updated.\n\tlw, err := r.lockfile.RecordWrite()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.lastWrite = lw\n\tif err := ioutils.AtomicWriteFile(rpath, jdata, 0o600); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc newImageStore(dir string) (rwImageStore, error) {\n\tif err := os.MkdirAll(dir, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tlockfile, err := lockfile.GetLockFile(filepath.Join(dir, \"images.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tistore := imageStore{\n\t\tlockfile: lockfile,\n\t\tdir:      dir,\n\n\t\timages:   []*Image{},\n\t\tbyid:     make(map[string]*Image),\n\t\tbyname:   make(map[string]*Image),\n\t\tbydigest: make(map[digest.Digest][]*Image),\n\t}\n\tif err := istore.startWritingWithReload(false); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer istore.stopWriting()\n\tistore.lastWrite, err = istore.lockfile.GetLastWrite()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := istore.load(true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &istore, nil\n}\n\nfunc newROImageStore(dir string) (roImageStore, error) {\n\tlockfile, err := lockfile.GetROLockFile(filepath.Join(dir, \"images.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tistore := imageStore{\n\t\tlockfile: lockfile,\n\t\tdir:      dir,\n\n\t\timages:   []*Image{},\n\t\tbyid:     make(map[string]*Image),\n\t\tbyname:   make(map[string]*Image),\n\t\tbydigest: make(map[digest.Digest][]*Image),\n\t}\n\tif err := istore.startReadingWithReload(false); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer istore.stopReading()\n\tistore.lastWrite, err = istore.lockfile.GetLastWrite()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := istore.load(false); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &istore, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) lookup(id string) (*Image, bool) {\n\tif image, ok := r.byid[id]; ok {\n\t\treturn image, ok\n\t} else if image, ok := r.byname[id]; ok {\n\t\treturn image, ok\n\t} else if longid, err := r.idindex.Get(id); err == nil {\n\t\timage, ok := r.byid[longid]\n\t\treturn image, ok\n\t}\n\treturn nil, false\n}\n\n// Requires startWriting.\nfunc (r *imageStore) ClearFlag(id string, flag string) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to clear flags on images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tdelete(image.Flags, flag)\n\treturn r.Save()\n}\n\n// Requires startWriting.\nfunc (r *imageStore) SetFlag(id string, flag string, value any) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to set flags on images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tif image.Flags == nil {\n\t\timage.Flags = make(map[string]any)\n\t}\n\timage.Flags[flag] = value\n\treturn r.Save()\n}\n\n// Requires startWriting.\nfunc (r *imageStore) create(id string, names []string, layer string, options ImageOptions) (image *Image, err error) {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn nil, fmt.Errorf(\"not allowed to create new images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\tif id == \"\" {\n\t\tid = stringid.GenerateRandomID()\n\t\t_, idInUse := r.byid[id]\n\t\tfor idInUse {\n\t\t\tid = stringid.GenerateRandomID()\n\t\t\t_, idInUse = r.byid[id]\n\t\t}\n\t}\n\tif _, idInUse := r.byid[id]; idInUse {\n\t\treturn nil, fmt.Errorf(\"an image with ID %q already exists: %w\", id, ErrDuplicateID)\n\t}\n\tnames = dedupeStrings(names)\n\tfor _, name := range names {\n\t\tif image, nameInUse := r.byname[name]; nameInUse {\n\t\t\treturn nil, fmt.Errorf(\"image name %q is already associated with image %q: %w\", name, image.ID, ErrDuplicateName)\n\t\t}\n\t}\n\timage = &Image{\n\t\tID:             id,\n\t\tDigest:         options.Digest,\n\t\tDigests:        dedupeDigests(options.Digests),\n\t\tNames:          names,\n\t\tNamesHistory:   copySlicePreferringNil(options.NamesHistory),\n\t\tTopLayer:       layer,\n\t\tMetadata:       options.Metadata,\n\t\tBigDataNames:   []string{},\n\t\tBigDataSizes:   make(map[string]int64),\n\t\tBigDataDigests: make(map[string]digest.Digest),\n\t\tCreated:        options.CreationDate,\n\t\tFlags:          newMapFrom(options.Flags),\n\t}\n\tif image.Created.IsZero() {\n\t\timage.Created = time.Now().UTC()\n\t}\n\terr = image.recomputeDigests()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"validating digests for new image: %w\", err)\n\t}\n\tr.images = append(r.images, image)\n\t// This can only fail on duplicate IDs, which shouldn’t happen — and in\n\t// that case the index is already in the desired state anyway.\n\t// Implementing recovery from an unlikely and unimportant failure here\n\t// would be too risky.\n\t_ = r.idindex.Add(id)\n\tr.byid[id] = image\n\tfor _, name := range names {\n\t\tr.byname[name] = image\n\t}\n\tfor _, digest := range image.Digests {\n\t\tlist := r.bydigest[digest]\n\t\tr.bydigest[digest] = append(list, image)\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t// now that the in-memory structures know about the new\n\t\t\t// record, we can use regular Delete() to clean up if\n\t\t\t// anything breaks from here on out\n\t\t\tif e := r.Delete(id); e != nil {\n\t\t\t\tlogrus.Debugf(\"while cleaning up partially-created image %q we failed to create: %v\", id, e)\n\t\t\t}\n\t\t}\n\t}()\n\terr = r.Save()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range options.BigData {\n\t\tif item.Digest == \"\" {\n\t\t\titem.Digest = digest.Canonical.FromBytes(item.Data)\n\t\t}\n\t\tif err = r.setBigData(image, item.Key, item.Data, item.Digest); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\timage = copyImage(image)\n\treturn image, err\n}\n\n// Requires startWriting.\nfunc (r *imageStore) addMappedTopLayer(id, layer string) error {\n\tif image, ok := r.lookup(id); ok {\n\t\timage.MappedTopLayers = append(image.MappedTopLayers, layer)\n\t\treturn r.Save()\n\t}\n\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// Requires startWriting.\nfunc (r *imageStore) removeMappedTopLayer(id, layer string) error {\n\tif image, ok := r.lookup(id); ok {\n\t\tinitialLen := len(image.MappedTopLayers)\n\t\timage.MappedTopLayers = stringutils.RemoveFromSlice(image.MappedTopLayers, layer)\n\t\t// No layer was removed.  No need to save.\n\t\tif initialLen == len(image.MappedTopLayers) {\n\t\t\treturn nil\n\t\t}\n\t\treturn r.Save()\n\t}\n\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) Metadata(id string) (string, error) {\n\tif image, ok := r.lookup(id); ok {\n\t\treturn image.Metadata, nil\n\t}\n\treturn \"\", fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// Requires startWriting.\nfunc (r *imageStore) SetMetadata(id, metadata string) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to modify image metadata at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\tif image, ok := r.lookup(id); ok {\n\t\timage.Metadata = metadata\n\t\treturn r.Save()\n\t}\n\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// The caller must hold r.inProcessLock for writing.\nfunc (r *imageStore) removeName(image *Image, name string) {\n\timage.Names = stringSliceWithoutValue(image.Names, name)\n}\n\n// The caller must hold r.inProcessLock for writing.\nfunc (i *Image) addNameToHistory(name string) {\n\ti.NamesHistory = dedupeStrings(append([]string{name}, i.NamesHistory...))\n}\n\n// Requires startWriting.\nfunc (r *imageStore) updateNames(id string, names []string, op updateNameOperation) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to change image name assignments at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\toldNames := image.Names\n\tnames, err := applyNameOperation(oldNames, names, op)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, name := range oldNames {\n\t\tdelete(r.byname, name)\n\t}\n\tfor _, name := range names {\n\t\tif otherImage, ok := r.byname[name]; ok {\n\t\t\tr.removeName(otherImage, name)\n\t\t}\n\t\tr.byname[name] = image\n\t\timage.addNameToHistory(name)\n\t}\n\timage.Names = names\n\treturn r.Save()\n}\n\n// Requires startWriting.\nfunc (r *imageStore) Delete(id string) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to delete images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tid = image.ID\n\tdelete(r.byid, id)\n\t// This can only fail if the ID is already missing, which shouldn’t happen — and in that case the index is already in the desired state anyway.\n\t// The store’s Delete method is used on various paths to recover from failures, so this should be robust against partially missing data.\n\t_ = r.idindex.Delete(id)\n\tfor _, name := range image.Names {\n\t\tdelete(r.byname, name)\n\t}\n\tfor _, digest := range image.Digests {\n\t\tprunedList := slices.DeleteFunc(r.bydigest[digest], func(i *Image) bool {\n\t\t\treturn i == image\n\t\t})\n\t\tif len(prunedList) == 0 {\n\t\t\tdelete(r.bydigest, digest)\n\t\t} else {\n\t\t\tr.bydigest[digest] = prunedList\n\t\t}\n\t}\n\tr.images = slices.DeleteFunc(r.images, func(candidate *Image) bool {\n\t\treturn candidate.ID == id\n\t})\n\tif err := r.Save(); err != nil {\n\t\treturn err\n\t}\n\tif err := os.RemoveAll(r.datadir(id)); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) Get(id string) (*Image, error) {\n\tif image, ok := r.lookup(id); ok {\n\t\treturn copyImage(image), nil\n\t}\n\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) Exists(id string) bool {\n\t_, ok := r.lookup(id)\n\treturn ok\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) ByDigest(d digest.Digest) ([]*Image, error) {\n\tif images, ok := r.bydigest[d]; ok {\n\t\treturn copyImageSlice(images), nil\n\t}\n\treturn nil, fmt.Errorf(\"locating image with digest %q: %w\", d, ErrImageUnknown)\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) BigData(id, key string) ([]byte, error) {\n\tif key == \"\" {\n\t\treturn nil, fmt.Errorf(\"can't retrieve image big data value for empty name: %w\", ErrInvalidBigDataName)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\treturn os.ReadFile(r.datapath(image.ID, key))\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) BigDataSize(id, key string) (int64, error) {\n\tif key == \"\" {\n\t\treturn -1, fmt.Errorf(\"can't retrieve size of image big data with empty name: %w\", ErrInvalidBigDataName)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn -1, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tif size, ok := image.BigDataSizes[key]; ok { // This is valid, and returns ok == false, for BigDataSizes == nil.\n\t\treturn size, nil\n\t}\n\tif data, err := r.BigData(id, key); err == nil && data != nil {\n\t\treturn int64(len(data)), nil\n\t}\n\treturn -1, ErrSizeUnknown\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) BigDataDigest(id, key string) (digest.Digest, error) {\n\tif key == \"\" {\n\t\treturn \"\", fmt.Errorf(\"can't retrieve digest of image big data value with empty name: %w\", ErrInvalidBigDataName)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tif d, ok := image.BigDataDigests[key]; ok { // This is valid, and returns ok == false, for BigDataDigests == nil.\n\t\treturn d, nil\n\t}\n\treturn \"\", ErrDigestUnknown\n}\n\n// Requires startReading or startWriting.\nfunc (r *imageStore) BigDataNames(id string) ([]string, error) {\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\treturn copySlicePreferringNil(image.BigDataNames), nil\n}\n\n// Requires startWriting.\nfunc (r *imageStore) SetBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to save data items associated with images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\timage, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\tvar err error\n\tvar newDigest digest.Digest\n\tif bigDataNameIsManifest(key) {\n\t\tif digestManifest == nil {\n\t\t\treturn fmt.Errorf(\"digesting manifest: no manifest digest callback provided: %w\", ErrDigestUnknown)\n\t\t}\n\t\tif newDigest, err = digestManifest(data); err != nil {\n\t\t\treturn fmt.Errorf(\"digesting manifest: %w\", err)\n\t\t}\n\t} else {\n\t\tnewDigest = digest.Canonical.FromBytes(data)\n\t}\n\treturn r.setBigData(image, key, data, newDigest)\n}\n\n// Requires startWriting.\nfunc (r *imageStore) setBigData(image *Image, key string, data []byte, newDigest digest.Digest) error {\n\tif key == \"\" {\n\t\treturn fmt.Errorf(\"can't set empty name for image big data item: %w\", ErrInvalidBigDataName)\n\t}\n\terr := os.MkdirAll(r.datadir(image.ID), 0o700)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutils.AtomicWriteFile(r.datapath(image.ID, key), data, 0o600)\n\tif err == nil {\n\t\tsave := false\n\t\tif image.BigDataSizes == nil {\n\t\t\timage.BigDataSizes = make(map[string]int64)\n\t\t}\n\t\toldSize, sizeOk := image.BigDataSizes[key]\n\t\timage.BigDataSizes[key] = int64(len(data))\n\t\tif image.BigDataDigests == nil {\n\t\t\timage.BigDataDigests = make(map[string]digest.Digest)\n\t\t}\n\t\toldDigest, digestOk := image.BigDataDigests[key]\n\t\timage.BigDataDigests[key] = newDigest\n\t\tif !sizeOk || oldSize != image.BigDataSizes[key] || !digestOk || oldDigest != newDigest {\n\t\t\tsave = true\n\t\t}\n\t\tif !slices.Contains(image.BigDataNames, key) {\n\t\t\timage.BigDataNames = append(image.BigDataNames, key)\n\t\t\tsave = true\n\t\t}\n\t\tfor _, oldDigest := range image.Digests {\n\t\t\t// remove the image from the list of images in the digest-based index\n\t\t\tif list, ok := r.bydigest[oldDigest]; ok {\n\t\t\t\tprunedList := slices.DeleteFunc(list, func(i *Image) bool {\n\t\t\t\t\treturn i == image\n\t\t\t\t})\n\t\t\t\tif len(prunedList) == 0 {\n\t\t\t\t\tdelete(r.bydigest, oldDigest)\n\t\t\t\t} else {\n\t\t\t\t\tr.bydigest[oldDigest] = prunedList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif err = image.recomputeDigests(); err != nil {\n\t\t\treturn fmt.Errorf(\"loading recomputing image digest information for %s: %w\", image.ID, err)\n\t\t}\n\t\tfor _, newDigest := range image.Digests {\n\t\t\t// add the image to the list of images in the digest-based index which\n\t\t\t// corresponds to the new digest for this item, unless it's already there\n\t\t\tlist := r.bydigest[newDigest]\n\t\t\tif !slices.Contains(list, image) {\n\t\t\t\tr.bydigest[newDigest] = append(list, image)\n\t\t\t}\n\t\t}\n\t\tif save {\n\t\t\terr = r.Save()\n\t\t}\n\t}\n\treturn err\n}\n\n// Requires startWriting.\nfunc (r *imageStore) Wipe() error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to delete images at %q: %w\", r.imagespath(), ErrStoreIsReadOnly)\n\t}\n\tids := make([]string, 0, len(r.byid))\n\tfor id := range r.byid {\n\t\tids = append(ids, id)\n\t}\n\tfor _, id := range ids {\n\t\tif err := r.Delete(id); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/dedup/dedup.go",
    "content": "package dedup\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash/crc64\"\n\t\"io/fs\"\n\t\"sync\"\n\n\t\"github.com/opencontainers/selinux/pkg/pwalkdir\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nvar errNotSupported = errors.New(\"reflinks are not supported on this platform\")\n\nconst (\n\tDedupHashInvalid DedupHashMethod = iota\n\tDedupHashCRC\n\tDedupHashFileSize\n\tDedupHashSHA256\n)\n\ntype DedupHashMethod int\n\ntype DedupOptions struct {\n\t// HashMethod is the hash function to use to find identical files\n\tHashMethod DedupHashMethod\n}\n\ntype DedupResult struct {\n\t// Deduped represents the total number of bytes saved by deduplication.\n\t// This value accounts also for all previously deduplicated data, not only the savings\n\t// from the last run.\n\tDeduped uint64\n}\n\nfunc getFileChecksum(hashMethod DedupHashMethod, path string, info fs.FileInfo) (string, error) {\n\tswitch hashMethod {\n\tcase DedupHashInvalid:\n\t\treturn \"\", fmt.Errorf(\"invalid hash method: %v\", hashMethod)\n\tcase DedupHashFileSize:\n\t\treturn fmt.Sprintf(\"%v\", info.Size()), nil\n\tcase DedupHashSHA256:\n\t\treturn readAllFile(path, info, func(buf []byte) (string, error) {\n\t\t\th := sha256.New()\n\t\t\tif _, err := h.Write(buf); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\treturn string(h.Sum(nil)), nil\n\t\t})\n\tcase DedupHashCRC:\n\t\treturn readAllFile(path, info, func(buf []byte) (string, error) {\n\t\t\tc := crc64.New(crc64.MakeTable(crc64.ECMA))\n\t\t\tif _, err := c.Write(buf); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tbufRet := make([]byte, 8)\n\t\t\tbinary.BigEndian.PutUint64(bufRet, c.Sum64())\n\t\t\treturn string(bufRet), nil\n\t\t})\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unknown hash method: %v\", hashMethod)\n\t}\n}\n\ntype pathsLocked struct {\n\tpaths []string\n\tlock  sync.Mutex\n}\n\nfunc DedupDirs(dirs []string, options DedupOptions) (DedupResult, error) {\n\tres := DedupResult{}\n\thashToPaths := make(map[string]*pathsLocked)\n\tlock := sync.Mutex{} // protects `hashToPaths` and `res`\n\n\tdedup, err := newDedupFiles()\n\tif err != nil {\n\t\treturn res, err\n\t}\n\n\tfor _, dir := range dirs {\n\t\tlogrus.Debugf(\"Deduping directory %s\", dir)\n\t\tif err := pwalkdir.Walk(dir, func(path string, d fs.DirEntry, err error) error {\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !d.Type().IsRegular() {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tinfo, err := d.Info()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tsize := uint64(info.Size())\n\t\t\tif size == 0 {\n\t\t\t\t// do not bother with empty files\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// the file was already deduplicated\n\t\t\tif visited, err := dedup.isFirstVisitOf(info); err != nil {\n\t\t\t\treturn err\n\t\t\t} else if visited {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\th, err := getFileChecksum(options.HashMethod, path, info)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tlock.Lock()\n\t\t\titem, foundItem := hashToPaths[h]\n\t\t\tif !foundItem {\n\t\t\t\titem = &pathsLocked{paths: []string{path}}\n\t\t\t\thashToPaths[h] = item\n\t\t\t\tlock.Unlock()\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\titem.lock.Lock()\n\t\t\tlock.Unlock()\n\n\t\t\tdedupBytes, err := func() (uint64, error) { // function to have a scope for the defer statement\n\t\t\t\tdefer item.lock.Unlock()\n\n\t\t\t\tvar dedupBytes uint64\n\t\t\t\tfor _, src := range item.paths {\n\t\t\t\t\tdeduped, err := dedup.dedup(src, path, info)\n\t\t\t\t\tif err == nil && deduped > 0 {\n\t\t\t\t\t\tlogrus.Debugf(\"Deduped %q -> %q (%d bytes)\", src, path, deduped)\n\t\t\t\t\t\tdedupBytes += deduped\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tlogrus.Debugf(\"Failed to deduplicate: %v\", err)\n\t\t\t\t\tif errors.Is(err, errNotSupported) {\n\t\t\t\t\t\treturn dedupBytes, err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif dedupBytes == 0 {\n\t\t\t\t\titem.paths = append(item.paths, path)\n\t\t\t\t}\n\t\t\t\treturn dedupBytes, nil\n\t\t\t}()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tlock.Lock()\n\t\t\tres.Deduped += dedupBytes\n\t\t\tlock.Unlock()\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\t// if reflinks are not supported, return immediately without errors\n\t\t\tif errors.Is(err, errNotSupported) {\n\t\t\t\treturn res, nil\n\t\t\t}\n\t\t\treturn res, err\n\t\t}\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/dedup/dedup_linux.go",
    "content": "package dedup\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\ntype deviceInodePair struct {\n\tdev uint64\n\tino uint64\n}\n\ntype dedupFiles struct {\n\tlock          sync.Mutex\n\tvisitedInodes map[deviceInodePair]struct{}\n}\n\nfunc newDedupFiles() (*dedupFiles, error) {\n\treturn &dedupFiles{\n\t\tvisitedInodes: make(map[deviceInodePair]struct{}),\n\t}, nil\n}\n\nfunc (d *dedupFiles) recordInode(dev, ino uint64) (bool, error) {\n\td.lock.Lock()\n\tdefer d.lock.Unlock()\n\n\tdi := deviceInodePair{\n\t\tdev: dev,\n\t\tino: ino,\n\t}\n\n\t_, visited := d.visitedInodes[di]\n\td.visitedInodes[di] = struct{}{}\n\treturn visited, nil\n}\n\n// isFirstVisitOf records that the file is being processed.  Returns true if the file was already visited.\nfunc (d *dedupFiles) isFirstVisitOf(fi fs.FileInfo) (bool, error) {\n\tst, ok := fi.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn false, fmt.Errorf(\"unable to get raw syscall.Stat_t data\")\n\t}\n\treturn d.recordInode(uint64(st.Dev), st.Ino) //nolint:unconvert\n}\n\n// dedup deduplicates the file at src path to dst path\nfunc (d *dedupFiles) dedup(src, dst string, fiDst fs.FileInfo) (uint64, error) {\n\tsrcFile, err := os.OpenFile(src, os.O_RDONLY, 0)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to open source file: %w\", err)\n\t}\n\tdefer srcFile.Close()\n\n\tdstFile, err := os.OpenFile(dst, os.O_WRONLY, 0)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to open destination file: %w\", err)\n\t}\n\tdefer dstFile.Close()\n\n\tstSrc, err := srcFile.Stat()\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to stat source file: %w\", err)\n\t}\n\tsSrc, ok := stSrc.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"unable to get raw syscall.Stat_t data\")\n\t}\n\tsDest, ok := fiDst.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"unable to get raw syscall.Stat_t data\")\n\t}\n\tif sSrc.Dev == sDest.Dev && sSrc.Ino == sDest.Ino {\n\t\t// same inode, we are dealing with a hard link, no need to deduplicate\n\t\treturn 0, nil\n\t}\n\n\tvalue := unix.FileDedupeRange{\n\t\tSrc_offset: 0,\n\t\tSrc_length: uint64(stSrc.Size()),\n\t\tInfo: []unix.FileDedupeRangeInfo{\n\t\t\t{\n\t\t\t\tDest_fd:     int64(dstFile.Fd()),\n\t\t\t\tDest_offset: 0,\n\t\t\t},\n\t\t},\n\t}\n\terr = unix.IoctlFileDedupeRange(int(srcFile.Fd()), &value)\n\tif err == nil {\n\t\treturn value.Info[0].Bytes_deduped, nil\n\t}\n\n\tif errors.Is(err, unix.ENOTSUP) {\n\t\treturn 0, errNotSupported\n\t}\n\treturn 0, fmt.Errorf(\"failed to clone file %q: %w\", src, err)\n}\n\nfunc readAllFile(path string, info fs.FileInfo, fn func([]byte) (string, error)) (string, error) {\n\tsize := info.Size()\n\tif size == 0 {\n\t\treturn fn(nil)\n\t}\n\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer file.Close()\n\n\tif size < 4096 {\n\t\t// small file, read it all\n\t\tdata := make([]byte, size)\n\t\t_, err = io.ReadFull(file, data)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn fn(data)\n\t}\n\n\tmmap, err := unix.Mmap(int(file.Fd()), 0, int(size), unix.PROT_READ, unix.MAP_PRIVATE)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to mmap file: %w\", err)\n\t}\n\tdefer func() {\n\t\t_ = unix.Munmap(mmap)\n\t}()\n\n\t_ = unix.Madvise(mmap, unix.MADV_SEQUENTIAL)\n\n\treturn fn(mmap)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/dedup/dedup_unsupported.go",
    "content": "//go:build !linux\n\npackage dedup\n\nimport (\n\t\"io/fs\"\n)\n\ntype dedupFiles struct{}\n\nfunc newDedupFiles() (*dedupFiles, error) {\n\treturn nil, errNotSupported\n}\n\n// isFirstVisitOf records that the file is being processed.  Returns true if the file was already visited.\nfunc (d *dedupFiles) isFirstVisitOf(fi fs.FileInfo) (bool, error) {\n\treturn false, errNotSupported\n}\n\n// dedup deduplicates the file at src path to dst path\nfunc (d *dedupFiles) dedup(src, dst string, fiDst fs.FileInfo) (uint64, error) {\n\treturn 0, errNotSupported\n}\n\nfunc readAllFile(path string, info fs.FileInfo, fn func([]byte) (string, error)) (string, error) {\n\treturn \"\", errNotSupported\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/rawfilelock/rawfilelock.go",
    "content": "package rawfilelock\n\nimport (\n\t\"os\"\n)\n\ntype LockType byte\n\nconst (\n\tReadLock LockType = iota\n\tWriteLock\n)\n\ntype FileHandle = fileHandle\n\n// OpenLock opens a file for locking\n// WARNING: This is the underlying file locking primitive of the OS;\n// because closing FileHandle releases the lock, it is not suitable for use\n// if there is any chance of two concurrent goroutines attempting to use the same lock.\n// Most users should use the higher-level operations from internal/staging_lockfile or pkg/lockfile.\nfunc OpenLock(path string, readOnly bool) (FileHandle, error) {\n\tflags := os.O_CREATE\n\tif readOnly {\n\t\tflags |= os.O_RDONLY\n\t} else {\n\t\tflags |= os.O_RDWR\n\t}\n\n\tfd, err := openHandle(path, flags)\n\tif err == nil {\n\t\treturn fd, nil\n\t}\n\n\treturn fd, &os.PathError{Op: \"open\", Path: path, Err: err}\n}\n\n// TryLockFile attempts to lock a file handle\nfunc TryLockFile(fd FileHandle, lockType LockType) error {\n\treturn lockHandle(fd, lockType, true)\n}\n\n// LockFile locks a file handle\nfunc LockFile(fd FileHandle, lockType LockType) error {\n\treturn lockHandle(fd, lockType, false)\n}\n\n// UnlockAndClose unlocks and closes a file handle\nfunc UnlockAndCloseHandle(fd FileHandle) {\n\tunlockAndCloseHandle(fd)\n}\n\n// CloseHandle closes a file handle without unlocking\n//\n// WARNING: This is a last-resort function for error handling only!\n// On Unix systems, closing a file descriptor automatically releases any locks,\n// so \"closing without unlocking\" is impossible. This function will release\n// the lock as a side effect of closing the file.\n//\n// This function should only be used in error paths where the lock state\n// is already corrupted or when giving up on lock management entirely.\n// Normal code should use UnlockAndCloseHandle instead.\nfunc CloseHandle(fd FileHandle) {\n\tcloseHandle(fd)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/rawfilelock/rawfilelock_unix.go",
    "content": "//go:build !windows\n\npackage rawfilelock\n\nimport (\n\t\"time\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\ntype fileHandle uintptr\n\nfunc openHandle(path string, mode int) (fileHandle, error) {\n\tmode |= unix.O_CLOEXEC\n\tfd, err := unix.Open(path, mode, 0o644)\n\treturn fileHandle(fd), err\n}\n\nfunc lockHandle(fd fileHandle, lType LockType, nonblocking bool) error {\n\tfType := unix.F_RDLCK\n\tif lType != ReadLock {\n\t\tfType = unix.F_WRLCK\n\t}\n\tlk := unix.Flock_t{\n\t\tType:   int16(fType),\n\t\tWhence: int16(unix.SEEK_SET),\n\t\tStart:  0,\n\t\tLen:    0,\n\t}\n\tcmd := unix.F_SETLKW\n\tif nonblocking {\n\t\tcmd = unix.F_SETLK\n\t}\n\tfor {\n\t\terr := unix.FcntlFlock(uintptr(fd), cmd, &lk)\n\t\tif err == nil || nonblocking {\n\t\t\treturn err\n\t\t}\n\t\ttime.Sleep(10 * time.Millisecond)\n\t}\n}\n\nfunc unlockAndCloseHandle(fd fileHandle) {\n\tunix.Close(int(fd))\n}\n\nfunc closeHandle(fd fileHandle) {\n\tunix.Close(int(fd))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/rawfilelock/rawfilelock_windows.go",
    "content": "//go:build windows\n\npackage rawfilelock\n\nimport (\n\t\"golang.org/x/sys/windows\"\n)\n\nconst (\n\treserved = 0\n\tallBytes = ^uint32(0)\n)\n\ntype fileHandle windows.Handle\n\nfunc openHandle(path string, mode int) (fileHandle, error) {\n\tmode |= windows.O_CLOEXEC\n\tfd, err := windows.Open(path, mode, windows.S_IWRITE)\n\treturn fileHandle(fd), err\n}\n\nfunc lockHandle(fd fileHandle, lType LockType, nonblocking bool) error {\n\tflags := 0\n\tif lType != ReadLock {\n\t\tflags = windows.LOCKFILE_EXCLUSIVE_LOCK\n\t}\n\tif nonblocking {\n\t\tflags |= windows.LOCKFILE_FAIL_IMMEDIATELY\n\t}\n\tol := new(windows.Overlapped)\n\tif err := windows.LockFileEx(windows.Handle(fd), uint32(flags), reserved, allBytes, allBytes, ol); err != nil {\n\t\tif nonblocking {\n\t\t\treturn err\n\t\t}\n\t\tpanic(err)\n\t}\n\treturn nil\n}\n\nfunc unlockAndCloseHandle(fd fileHandle) {\n\tol := new(windows.Overlapped)\n\twindows.UnlockFileEx(windows.Handle(fd), reserved, allBytes, allBytes, ol)\n\tcloseHandle(fd)\n}\n\nfunc closeHandle(fd fileHandle) {\n\twindows.Close(windows.Handle(fd))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/staging_lockfile/staging_lockfile.go",
    "content": "package staging_lockfile\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\n\t\"go.podman.io/storage/internal/rawfilelock\"\n)\n\n// StagingLockFile represents a file lock used to coordinate access to staging areas.\n// Typical usage is via CreateAndLock or TryLockPath, both of which return a StagingLockFile\n// that must eventually be released with UnlockAndDelete. This ensures that access\n// to the staging file is properly synchronized both within and across processes.\n//\n// WARNING: This struct MUST NOT be created manually. Use the provided helper functions instead.\ntype StagingLockFile struct {\n\t// Locking invariant: If stagingLockFileLock is not locked, a StagingLockFile for a particular\n\t// path exists if the current process currently owns the lock for that file, and it is recorded in stagingLockFiles.\n\t//\n\t// The following fields can only be accessed by the goroutine owning the lock.\n\t//\n\t// An empty string in the file field means that the lock has been released and the StagingLockFile is no longer valid.\n\tfile string // Also the key in stagingLockFiles\n\tfd   rawfilelock.FileHandle\n}\n\nconst maxRetries = 1000\n\nvar (\n\tstagingLockFiles    map[string]*StagingLockFile\n\tstagingLockFileLock sync.Mutex\n)\n\n// tryAcquireLockForFile attempts to acquire a lock for the specified file path.\nfunc tryAcquireLockForFile(path string) (*StagingLockFile, error) {\n\tcleanPath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"ensuring that path %q is an absolute path: %w\", path, err)\n\t}\n\n\tstagingLockFileLock.Lock()\n\tdefer stagingLockFileLock.Unlock()\n\n\tif stagingLockFiles == nil {\n\t\tstagingLockFiles = make(map[string]*StagingLockFile)\n\t}\n\n\tif _, ok := stagingLockFiles[cleanPath]; ok {\n\t\treturn nil, fmt.Errorf(\"lock %q is used already with other thread\", cleanPath)\n\t}\n\n\tfd, err := rawfilelock.OpenLock(cleanPath, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err = rawfilelock.TryLockFile(fd, rawfilelock.WriteLock); err != nil {\n\t\t// Lock acquisition failed, but holding stagingLockFileLock ensures\n\t\t// no other goroutine in this process could have obtained a lock for this file,\n\t\t// so closing it is still safe.\n\t\trawfilelock.CloseHandle(fd)\n\t\treturn nil, fmt.Errorf(\"failed to acquire lock on %q: %w\", cleanPath, err)\n\t}\n\n\tlockFile := &StagingLockFile{\n\t\tfile: cleanPath,\n\t\tfd:   fd,\n\t}\n\n\tstagingLockFiles[cleanPath] = lockFile\n\treturn lockFile, nil\n}\n\n// UnlockAndDelete releases the lock, removes the associated file from the filesystem.\n//\n// WARNING: After this operation, the StagingLockFile becomes invalid for further use.\nfunc (l *StagingLockFile) UnlockAndDelete() error {\n\tstagingLockFileLock.Lock()\n\tdefer stagingLockFileLock.Unlock()\n\n\tif l.file == \"\" {\n\t\t// Panic when unlocking an unlocked lock. That's a violation\n\t\t// of the lock semantics and will reveal such.\n\t\tpanic(\"calling Unlock on unlocked lock\")\n\t}\n\n\tdefer func() {\n\t\t// It’s important that this happens while we are still holding stagingLockFileLock, to ensure\n\t\t// that no other goroutine has l.file open = that this close is not unlocking the lock under any\n\t\t// other goroutine. (defer ordering is LIFO, so this will happen before we release the stagingLockFileLock)\n\t\trawfilelock.UnlockAndCloseHandle(l.fd)\n\t\tdelete(stagingLockFiles, l.file)\n\t\tl.file = \"\"\n\t}()\n\tif err := os.Remove(l.file); err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// CreateAndLock creates a new temporary file in the specified directory with the given pattern,\n// then creates and locks a StagingLockFile for it. The file is created using os.CreateTemp.\n// Typically, the caller would use the returned lock file path to derive a path to the lock-controlled resource\n// (e.g. by replacing the \"pattern\" part of the returned file name with a different prefix)\n// Caller MUST call UnlockAndDelete() on the returned StagingLockFile to release the lock and delete the file.\n//\n// Returns:\n//   - The locked StagingLockFile\n//   - The name of created lock file\n//   - Any error that occurred during the process\n//\n// If the file cannot be locked, this function will retry up to maxRetries times before failing.\nfunc CreateAndLock(dir string, pattern string) (*StagingLockFile, string, error) {\n\tfor try := 0; ; try++ {\n\t\tfile, err := os.CreateTemp(dir, pattern)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tfile.Close()\n\n\t\tpath := file.Name()\n\t\tl, err := tryAcquireLockForFile(path)\n\t\tif err != nil {\n\t\t\tif try < maxRetries {\n\t\t\t\tcontinue // Retry if the lock cannot be acquired\n\t\t\t}\n\t\t\treturn nil, \"\", fmt.Errorf(\n\t\t\t\t\"failed to allocate lock in %q after %d attempts; last failure on %q: %w\",\n\t\t\t\tdir, try, filepath.Base(path), err,\n\t\t\t)\n\t\t}\n\n\t\treturn l, filepath.Base(path), nil\n\t}\n}\n\n// TryLockPath attempts to acquire a lock on an specific path. If the file does not exist,\n// it will be created.\n//\n// Warning: If acquiring a lock is successful, it returns a new StagingLockFile\n// instance for the file. Caller MUST call UnlockAndDelete() on the returned StagingLockFile\n// to release the lock and delete the file.\nfunc TryLockPath(path string) (*StagingLockFile, error) {\n\treturn tryAcquireLockForFile(path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/internal/tempdir/tempdir.go",
    "content": "package tempdir\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/internal/staging_lockfile\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\n/*\nLocking rules and invariants for TempDir and its recovery mechanism:\n\n1. TempDir Instance Locks:\n  - Path: 'RootDir/lock-XYZ' (in the root directory)\n  - Each TempDir instance creates and holds an exclusive lock on this file immediately\n    during NewTempDir() initialization.\n  - This lock signifies that the temporary directory is in active use by the\n    process/goroutine that holds the TempDir object.\n\n2. Stale Directory Recovery (separate operation):\n  - RecoverStaleDirs() can be called independently to identify and clean up stale\n    temporary directories.\n  - For each potential stale directory (found by listPotentialStaleDirs), it\n    attempts to TryLockPath() its instance lock file.\n  - If TryLockPath() succeeds: The directory is considered stale, and both the\n    directory and lock file are removed.\n  - If TryLockPath() fails: The directory is considered in active use by another\n    process/goroutine, and it's skipped.\n\n3. TempDir Usage:\n  - NewTempDir() immediately creates both the instance lock and the temporary directory.\n  - TempDir.StageDeletion() moves files into the existing temporary directory with counter-based naming.\n  - Files moved into the temporary directory are renamed with a counter-based prefix\n    to ensure uniqueness (e.g., \"0-filename\", \"1-filename\").\n  - Once cleaned up, the TempDir instance cannot be reused - StageDeletion() will return an error.\n\n4. Cleanup Process:\n  - TempDir.Cleanup() removes both the temporary directory and its lock file.\n  - The instance lock is unlocked and deleted after cleanup operations are complete.\n  - The TempDir instance becomes inactive after cleanup (internal fields are reset).\n  - The TempDir instance cannot be reused after Cleanup() - StageDeletion() will fail.\n\n5. TempDir Lifetime:\n  - NewTempDir() creates both the TempDir manager and the actual temporary directory immediately.\n  - The temporary directory is created eagerly during NewTempDir().\n  - During its lifetime, the temporary directory is protected by its instance lock.\n  - The temporary directory exists until Cleanup() is called, which removes both\n    the directory and its lock file.\n  - Multiple TempDir instances can coexist in the same RootDir, each with its own\n    unique subdirectory and lock.\n  - After cleanup, the TempDir instance cannot be reused.\n\n6. Example Directory Structure:\n\n\tRootDir/\n\t    lock-ABC           (instance lock for temp-dir-ABC)\n\t    temp-dir-ABC/\n\t        0-file1\n\t        1-file3\n\t    lock-XYZ           (instance lock for temp-dir-XYZ)\n\t    temp-dir-XYZ/\n\t        0-file2\n*/\nconst (\n\t// tempDirPrefix is the prefix used for creating temporary directories.\n\ttempDirPrefix = \"temp-dir-\"\n\t// tempdirLockPrefix is the prefix used for creating lock files for temporary directories.\n\ttempdirLockPrefix = \"lock-\"\n)\n\n// TempDir represents a temporary directory that is created in a specified root directory.\n// It manages the lifecycle of the temporary directory, including creation, locking, and cleanup.\n// Each TempDir instance is associated with a unique subdirectory in the root directory.\n// Warning: The TempDir instance should be used in a single goroutine.\ntype TempDir struct {\n\tRootDir string\n\n\ttempDirPath string\n\t// tempDirLock is a lock file (e.g., RootDir/lock-XYZ) specific to this\n\t// TempDir instance, indicating it's in active use.\n\ttempDirLock     *staging_lockfile.StagingLockFile\n\ttempDirLockPath string\n\n\t// counter is used to generate unique filenames for added files.\n\tcounter uint64\n}\n\n// StagedAddition is a temporary object which holds the information of where to\n// put the data into and then use Commit() to move the data into the final location.\ntype StagedAddition struct {\n\t// Path is the temporary path. The path is not created so caller must create\n\t// a file or directory on it in order to use Commit(). The path is only valid\n\t// until Commit() is called or until the TempDir instance Cleanup() method is used.\n\tPath string\n}\n\n// Commit the staged content into its final destination by using os.Rename().\n// That means the dest must be on the same on the same fs as the root directory\n// that was given to NewTempDir() and the dest must not exist yet.\n// Commit must only be called once per instance returned from the\n// StagedAddition() call.\nfunc (s *StagedAddition) Commit(destination string) error {\n\terr := os.Rename(s.Path, destination)\n\ts.Path = \"\" // invalidate Path to avoid reuse\n\treturn err\n}\n\n// CleanupTempDirFunc is a function type that can be returned by operations\n// which need to perform cleanup actions later.\ntype CleanupTempDirFunc func() error\n\n// listPotentialStaleDirs scans the RootDir for directories that might be stale temporary directories.\n// It identifies directories with the tempDirPrefix and their corresponding lock files with the tempdirLockPrefix.\n// The function returns a map of IDs that correspond to both directories and lock files found.\n// These IDs are extracted from the filenames by removing their respective prefixes.\nfunc listPotentialStaleDirs(rootDir string) (map[string]struct{}, error) {\n\tids := make(map[string]struct{})\n\n\tdirContent, err := os.ReadDir(rootDir)\n\tif err != nil {\n\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"error reading temp dir: %w\", err)\n\t}\n\n\tfor _, entry := range dirContent {\n\t\tif id, ok := strings.CutPrefix(entry.Name(), tempDirPrefix); ok {\n\t\t\tids[id] = struct{}{}\n\t\t\tcontinue\n\t\t}\n\n\t\tif id, ok := strings.CutPrefix(entry.Name(), tempdirLockPrefix); ok {\n\t\t\tids[id] = struct{}{}\n\t\t}\n\t}\n\treturn ids, nil\n}\n\n// RecoverStaleDirs identifies and removes stale temporary directories in the root directory.\n// A directory is considered stale if its lock file can be acquired (indicating no active use).\n// The function attempts to remove both the directory and its lock file.\n// If a directory's lock cannot be acquired, it is considered in use and is skipped.\nfunc RecoverStaleDirs(rootDir string) error {\n\tpotentialStaleDirs, err := listPotentialStaleDirs(rootDir)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error listing potential stale temp dirs: %w\", err)\n\t}\n\n\tif len(potentialStaleDirs) == 0 {\n\t\treturn nil\n\t}\n\n\tvar recoveryErrors []error\n\n\tfor id := range potentialStaleDirs {\n\t\tlockPath := filepath.Join(rootDir, tempdirLockPrefix+id)\n\t\ttempDirPath := filepath.Join(rootDir, tempDirPrefix+id)\n\n\t\t// Try to lock the lock file. If it can be locked, the directory is stale.\n\t\tinstanceLock, err := staging_lockfile.TryLockPath(lockPath)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif rmErr := system.EnsureRemoveAll(tempDirPath); rmErr != nil {\n\t\t\trecoveryErrors = append(recoveryErrors, fmt.Errorf(\"error removing stale temp dir: %w\", rmErr))\n\t\t}\n\t\tif unlockErr := instanceLock.UnlockAndDelete(); unlockErr != nil {\n\t\t\trecoveryErrors = append(recoveryErrors, fmt.Errorf(\"error unlocking and deleting stale lock file: %w\", unlockErr))\n\t\t}\n\t}\n\n\treturn errors.Join(recoveryErrors...)\n}\n\n// NewTempDir creates a TempDir and immediately creates both the temporary directory\n// and its corresponding lock file in the specified RootDir.\n// The RootDir itself will be created if it doesn't exist.\n// Note: The caller MUST ensure that returned TempDir instance is cleaned up with .Cleanup().\nfunc NewTempDir(rootDir string) (*TempDir, error) {\n\tif err := os.MkdirAll(rootDir, 0o700); err != nil {\n\t\treturn nil, fmt.Errorf(\"creating root temp directory failed: %w\", err)\n\t}\n\n\ttd := &TempDir{\n\t\tRootDir: rootDir,\n\t}\n\ttempDirLock, tempDirLockFileName, err := staging_lockfile.CreateAndLock(td.RootDir, tempdirLockPrefix)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating and locking temp dir instance lock failed: %w\", err)\n\t}\n\ttd.tempDirLock = tempDirLock\n\ttd.tempDirLockPath = filepath.Join(td.RootDir, tempDirLockFileName)\n\n\t// Create the temporary directory that corresponds to the lock file\n\tid := strings.TrimPrefix(tempDirLockFileName, tempdirLockPrefix)\n\tactualTempDirPath := filepath.Join(td.RootDir, tempDirPrefix+id)\n\tif err := os.MkdirAll(actualTempDirPath, 0o700); err != nil {\n\t\treturn nil, fmt.Errorf(\"creating temp directory failed: %w\", err)\n\t}\n\ttd.tempDirPath = actualTempDirPath\n\ttd.counter = 0\n\treturn td, nil\n}\n\n// StageAddition creates a new temporary path that is returned as field in the StagedAddition\n// struct. The returned type StagedAddition has a Commit() function to move the content from\n// the temporary location to the final one.\n//\n// The caller MUST call Commit() before Cleanup() is called on the TempDir, otherwise the\n// staged content will be deleted and the Commit() will fail.\n// If the TempDir has been cleaned up already, this method will return an error.\nfunc (td *TempDir) StageAddition() (*StagedAddition, error) {\n\tif td.tempDirLock == nil {\n\t\treturn nil, fmt.Errorf(\"temp dir instance not initialized or already cleaned up\")\n\t}\n\tfileName := strconv.FormatUint(td.counter, 10) + \"-addition\"\n\ttmpAddPath := filepath.Join(td.tempDirPath, fileName)\n\ttd.counter++\n\treturn &StagedAddition{Path: tmpAddPath}, nil\n}\n\n// StageDeletion moves the specified file into the instance's temporary directory.\n// The temporary directory must already exist (created during NewTempDir).\n// Files are renamed with a counter-based prefix (e.g., \"0-filename\", \"1-filename\") to ensure uniqueness.\n// Note: 'path' must be on the same filesystem as the TempDir for os.Rename to work.\n// The caller MUST ensure .Cleanup() is called.\n// If the TempDir has been cleaned up, this method will return an error.\nfunc (td *TempDir) StageDeletion(path string) error {\n\tif td.tempDirLock == nil {\n\t\treturn fmt.Errorf(\"temp dir instance not initialized or already cleaned up\")\n\t}\n\tfileName := fmt.Sprintf(\"%d-\", td.counter) + filepath.Base(path)\n\tdestPath := filepath.Join(td.tempDirPath, fileName)\n\ttd.counter++\n\treturn os.Rename(path, destPath)\n}\n\n// Cleanup removes the temporary directory and releases its instance lock.\n// After cleanup, the TempDir instance becomes inactive and cannot be reused.\n// Subsequent calls to StageDeletion() will fail.\n// Multiple calls to Cleanup() are safe and will not return an error.\n// Callers should typically defer Cleanup() to run after any application-level\n// global locks are released to avoid holding those locks during potentially\n// slow disk I/O.\nfunc (td *TempDir) Cleanup() error {\n\tif td.tempDirLock == nil {\n\t\tlogrus.Debug(\"Temp dir already cleaned up\")\n\t\treturn nil\n\t}\n\n\tif err := system.EnsureRemoveAll(td.tempDirPath); err != nil {\n\t\treturn fmt.Errorf(\"removing temp dir failed: %w\", err)\n\t}\n\n\tlock := td.tempDirLock\n\ttd.tempDirPath = \"\"\n\ttd.tempDirLock = nil\n\ttd.tempDirLockPath = \"\"\n\treturn lock.UnlockAndDelete()\n}\n\n// CleanupTemporaryDirectories cleans up multiple temporary directories by calling their cleanup functions.\nfunc CleanupTemporaryDirectories(cleanFuncs ...CleanupTempDirFunc) error {\n\tvar cleanupErrors []error\n\tfor _, cleanupFunc := range cleanFuncs {\n\t\tif cleanupFunc == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif err := cleanupFunc(); err != nil {\n\t\t\tcleanupErrors = append(cleanupErrors, err)\n\t\t}\n\t}\n\treturn errors.Join(cleanupErrors...)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/jsoniter.go",
    "content": "package storage\n\nimport jsoniter \"github.com/json-iterator/go\"\n\nvar json = jsoniter.ConfigCompatibleWithStandardLibrary\n"
  },
  {
    "path": "vendor/go.podman.io/storage/layers.go",
    "content": "package storage\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"math/bits\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/klauspost/pgzip\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/opencontainers/selinux/go-selinux\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/asm\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n\tdrivers \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/lockfile\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"go.podman.io/storage/pkg/pools\"\n\t\"go.podman.io/storage/pkg/stringid\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/tarlog\"\n\t\"go.podman.io/storage/pkg/truncindex\"\n)\n\nconst (\n\ttarSplitSuffix = \".tar-split.gz\"\n\t// tempDirPath is the subdirectory name used for storing temporary directories during layer deletion\n\ttempDirPath    = \"tmp\"\n\tincompleteFlag = \"incomplete\"\n\t// maxLayerStoreCleanupIterations is the number of times we try to clean up inconsistent layer store state\n\t// in readers (which, for implementation reasons, gives other writers the opportunity to create more inconsistent state)\n\t// until we just give up.\n\tmaxLayerStoreCleanupIterations = 3\n)\n\ntype layerLocations uint8\n\n// The backing store is split in three json files.\n// The volatile store is written without fsync() meaning it isn't as robust to unclean shutdown.\n// Optionally, an image store can be configured to store RO layers.\n// The stable store is used for the remaining layers that don't go into the other stores.\nconst (\n\tstableLayerLocation layerLocations = 1 << iota\n\timageStoreLayerLocation\n\tvolatileLayerLocation\n\n\tnumLayerLocationIndex = iota\n)\n\nfunc layerLocationFromIndex(index int) layerLocations {\n\treturn 1 << index\n}\n\nfunc indexFromLayerLocation(location layerLocations) int {\n\treturn bits.TrailingZeros(uint(location))\n}\n\n// A Layer is a record of a copy-on-write layer that's stored by the lower\n// level graph driver.\ntype Layer struct {\n\t// ID is either one which was specified at create-time, or a random\n\t// value which was generated by the library.\n\tID string `json:\"id\"`\n\n\t// Names is an optional set of user-defined convenience values.  The\n\t// layer can be referred to by its ID or any of its names.  Names are\n\t// unique among layers.\n\tNames []string `json:\"names,omitempty\"`\n\n\t// Parent is the ID of a layer from which this layer inherits data.\n\tParent string `json:\"parent,omitempty\"`\n\n\t// Metadata is data we keep for the convenience of the caller.  It is not\n\t// expected to be large, since it is kept in memory.\n\tMetadata string `json:\"metadata,omitempty\"`\n\n\t// MountLabel is an SELinux label which should be used when attempting to mount\n\t// the layer.\n\tMountLabel string `json:\"mountlabel,omitempty\"`\n\n\t// MountPoint is the path where the layer is mounted, or where it was most\n\t// recently mounted.\n\t//\n\t// WARNING: This field is a snapshot in time: (except for users inside c/storage that\n\t// hold the mount lock) the true value can change between subsequent\n\t// calls to c/storage API.\n\t//\n\t// Users that need to handle concurrent mount/unmount attempts should not access this\n\t// field at all, and should only use the path returned by .Mount() (and that’s only\n\t// assuming no other user will concurrently decide to unmount that mount point).\n\tMountPoint string `json:\"-\"`\n\n\t// MountCount is used as a reference count for the container's layer being\n\t// mounted at the mount point.\n\t//\n\t// WARNING: This field is a snapshot in time; (except for users inside c/storage that\n\t// hold the mount lock) the true value can change between subsequent\n\t// calls to c/storage API.\n\t//\n\t// In situations where concurrent mount/unmount attempts can happen, this field\n\t// should not be used for any decisions, maybe apart from heuristic user warnings.\n\tMountCount int `json:\"-\"`\n\n\t// Created is the datestamp for when this layer was created.  Older\n\t// versions of the library did not track this information, so callers\n\t// will likely want to use the IsZero() method to verify that a value\n\t// is set before using it.\n\tCreated time.Time `json:\"created\"`\n\n\t// CompressedDigest is the digest of the blob that was last passed to\n\t// ApplyDiff() or create(), as it was presented to us.\n\tCompressedDigest digest.Digest `json:\"compressed-diff-digest,omitempty\"`\n\n\t// CompressedSize is the length of the blob that was last passed to\n\t// ApplyDiff() or create(), as it was presented to us.  If\n\t// CompressedDigest is not set, this should be treated as if it were an\n\t// uninitialized value.\n\tCompressedSize int64 `json:\"compressed-size,omitempty\"`\n\n\t// UncompressedDigest is the digest of the blob that was last passed to\n\t// ApplyDiff() or create(), after we decompressed it.  Often referred to\n\t// as a DiffID.\n\tUncompressedDigest digest.Digest `json:\"diff-digest,omitempty\"`\n\n\t// TOCDigest represents the digest of the Table of Contents (TOC) of the blob.\n\t// This digest is utilized when the UncompressedDigest is not\n\t// validated during the partial image pull process, but the\n\t// TOC itself is validated.\n\t// It serves as an alternative reference under these specific conditions.\n\tTOCDigest digest.Digest `json:\"toc-digest,omitempty\"`\n\n\t// UncompressedSize is the length of the blob that was last passed to\n\t// ApplyDiff() or create(), after we decompressed it.\n\t//\n\t//   - If UncompressedDigest is set, this must be set to a valid value.\n\t//   - Otherwise, if TOCDigest is set, this is either valid or -1.\n\t//   - If neither of this digests is set, this should be treated as if it were\n\t//     an uninitialized value.\n\tUncompressedSize int64 `json:\"diff-size,omitempty\"`\n\n\t// CompressionType is the type of compression which we detected on the blob\n\t// that was last passed to ApplyDiff() or create().\n\tCompressionType archive.Compression `json:\"compression,omitempty\"`\n\n\t// UIDs and GIDs are lists of UIDs and GIDs used in the layer.  This\n\t// field is only populated (i.e., will only contain one or more\n\t// entries) if the layer was created using ApplyDiff() or create().\n\tUIDs []uint32 `json:\"uidset,omitempty\"`\n\tGIDs []uint32 `json:\"gidset,omitempty\"`\n\n\t// Flags is arbitrary data about the layer.\n\tFlags map[string]any `json:\"flags,omitempty\"`\n\n\t// UIDMap and GIDMap are used for setting up a layer's contents\n\t// for use inside of a user namespace where UID mapping is being used.\n\tUIDMap []idtools.IDMap `json:\"uidmap,omitempty\"`\n\tGIDMap []idtools.IDMap `json:\"gidmap,omitempty\"`\n\n\t// ReadOnly is true if this layer resides in a read-only layer store.\n\tReadOnly bool `json:\"-\"`\n\n\t// location is the location of the store where the layer is present.\n\tlocation layerLocations `json:\"-\"`\n\n\t// BigDataNames is a list of names of data items that we keep for the\n\t// convenience of the caller.  They can be large, and are only in\n\t// memory when being read from or written to disk.\n\tBigDataNames []string `json:\"big-data-names,omitempty\"`\n}\n\ntype layerMountPoint struct {\n\tID         string `json:\"id\"`\n\tMountPoint string `json:\"path\"`\n\tMountCount int    `json:\"count\"`\n}\n\n// DiffOptions override the default behavior of Diff() methods.\ntype DiffOptions struct {\n\t// Compression, if set overrides the default compressor when generating a diff.\n\tCompression *archive.Compression\n}\n\n// layerCreationContents are the options passed to .create to populate a staged\n// layer\ntype layerCreationContents struct {\n\t// These are used via the zstd:chunked pull paths\n\tDiffOutput  *drivers.DriverWithDifferOutput\n\tDiffOptions *drivers.ApplyDiffWithDifferOpts\n\n\t// stagedLayerExtraction is used by the normal tar layer extraction.\n\tstagedLayerExtraction *maybeStagedLayerExtraction\n}\n\n// maybeStagedLayerExtraction is a helper to encapsulate details around extracting\n// a layer potentially before we even take a look if the driver implements the\n// ApplyDiffStaging interface.\n// This should be initialized with layerStore.newMaybeStagedLayerExtraction()\ntype maybeStagedLayerExtraction struct {\n\t// diff contains the tar archive, can be compressed, must be non nil, but can be at EOF when the content was already staged\n\tdiff io.Reader\n\t// staging interface of the storage driver, set when the driver supports staging and nil otherwise\n\tstaging drivers.ApplyDiffStaging\n\t// result is a placeholder for the applyDiff() result so we can pass that down the stack easily.\n\t// If result is not nil the layer was staged successfully, if this is set stagedTarSplit and\n\t// stagedLayer must be set as well.\n\tresult *applyDiffResult\n\n\t// stagedTarSplit is the temp file where we staged the tar split file\n\tstagedTarSplit *tempdir.StagedAddition\n\t// stagedLayer is the temp directory where we staged the extracted layer content\n\tstagedLayer *tempdir.StagedAddition\n\n\t// cleanupFuncs contains the set of tempdir cleanup function that get executed in cleanup()\n\tcleanupFuncs []tempdir.CleanupTempDirFunc\n}\n\ntype applyDiffResult struct {\n\tcompressedDigest   digest.Digest\n\tcompressedSize     int64\n\tcompressionType    archive.Compression\n\tuncompressedDigest digest.Digest\n\tuncompressedSize   int64\n\t// size of the data, including the full size of sparse files, and excluding all metadata\n\t// It is neither compressedSize nor uncompressedSize.\n\t// The use case for this seems unclear, it gets returned in PutLayer() but in the Podman\n\t// stack at least that value is never used so maybe we can look into removing this.\n\tsize int64\n\tuids []uint32\n\tgids []uint32\n}\n\n// roLayerStore wraps a graph driver, adding the ability to refer to layers by\n// name, and keeping track of parent-child relationships, along with a list of\n// all known layers.\ntype roLayerStore interface {\n\troMetadataStore\n\troLayerBigDataStore\n\n\t// startReading makes sure the store is fresh, and locks it for reading.\n\t// If this succeeds, the caller MUST call stopReading().\n\tstartReading() error\n\n\t// stopReading releases locks obtained by startReading.\n\tstopReading()\n\n\t// checkIdOrNameConflict checks if the id or names are already in use and returns an\n\t// error in that case. As Special case if the layer already exists it returns it as\n\t// well together with the error.\n\tcheckIdOrNameConflict(id string, names []string) (*Layer, error)\n\n\t// Exists checks if a layer with the specified name or ID is known.\n\tExists(id string) bool\n\n\t// Get retrieves information about a layer given an ID or name.\n\tGet(id string) (*Layer, error)\n\n\t// Status returns an slice of key-value pairs, suitable for human consumption,\n\t// relaying whatever status information the underlying driver can share.\n\tStatus() ([][2]string, error)\n\n\t// Changes returns a slice of Change structures, which contain a pathname\n\t// (Path) and a description of what sort of change (Kind) was made by the\n\t// layer (either ChangeModify, ChangeAdd, or ChangeDelete), relative to a\n\t// specified layer.  By default, the layer's parent is used as a reference.\n\tChanges(from, to string) ([]archive.Change, error)\n\n\t// Diff produces a tarstream which can be applied to a layer with the contents\n\t// of the first layer to produce a layer with the contents of the second layer.\n\t// By default, the parent of the second layer is used as the first\n\t// layer, so it need not be specified.  Options can be used to override\n\t// default behavior, but are also not required.\n\tDiff(from, to string, options *DiffOptions) (io.ReadCloser, error)\n\n\t// DiffSize produces an estimate of the length of the tarstream which would be\n\t// produced by Diff.\n\tDiffSize(from, to string) (int64, error)\n\n\t// Size produces a cached value for the uncompressed size of the layer,\n\t// if one is known, or -1 if it is not known.  If the layer can not be\n\t// found, it returns an error.\n\tSize(name string) (int64, error)\n\n\t// LayersByCompressedDigest returns a slice of the layers with the\n\t// specified compressed digest value recorded for them.\n\tLayersByCompressedDigest(d digest.Digest) ([]Layer, error)\n\n\t// LayersByUncompressedDigest returns a slice of the layers with the\n\t// specified uncompressed digest value recorded for them.\n\tLayersByUncompressedDigest(d digest.Digest) ([]Layer, error)\n\n\t// LayersByTOCDigest returns a slice of the layers with the\n\t// specified uncompressed digest value recorded for them.\n\tLayersByTOCDigest(d digest.Digest) ([]Layer, error)\n\n\t// Layers returns a slice of the known layers.\n\tLayers() ([]Layer, error)\n}\n\n// rwLayerStore wraps a graph driver, adding the ability to refer to layers by\n// name, and keeping track of parent-child relationships, along with a list of\n// all known layers.\ntype rwLayerStore interface {\n\troLayerStore\n\trwMetadataStore\n\tflaggableStore\n\trwLayerBigDataStore\n\n\t// startWriting makes sure the store is fresh, and locks it for writing.\n\t// If this succeeds, the caller MUST call stopWriting().\n\tstartWriting() error\n\n\t// stopWriting releases locks obtained by startWriting.\n\tstopWriting()\n\n\t// create creates a new layer, optionally giving it a specified ID rather than\n\t// a randomly-generated one, either inheriting data from another specified\n\t// layer or the empty base layer.  The new layer can optionally be given names\n\t// and have an SELinux label specified for use when mounting it.  Some\n\t// underlying drivers can accept a \"size\" option.  At this time, most\n\t// underlying drivers do not themselves distinguish between writeable\n\t// and read-only layers.  Returns the new layer structure and the size of the\n\t// diff which was applied to its parent to initialize its contents.\n\tcreate(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, contents *layerCreationContents) (*Layer, int64, error)\n\n\t// updateNames modifies names associated with a layer based on (op, names).\n\tupdateNames(id string, names []string, op updateNameOperation) error\n\n\t// deleteWhileHoldingLock deletes a layer with the specified name or ID.\n\tdeleteWhileHoldingLock(id string) error\n\n\t// deferredDelete deletes a layer with the specified name or ID.\n\t// This removal happen immediately (the layer is no longer usable),\n\t// but physically deleting the files may be deferred.\n\t// Caller MUST call all returned cleanup functions outside of the locks.\n\tdeferredDelete(id string) ([]tempdir.CleanupTempDirFunc, error)\n\n\t// Wipe deletes all layers.\n\tWipe() error\n\n\t// Mount mounts a layer for use.  If the specified layer is the parent of other\n\t// layers, it should not be written to.  An SELinux label to be applied to the\n\t// mount can be specified to override the one configured for the layer.\n\t// The mappings used by the container can be specified.\n\tMount(id string, options drivers.MountOpts) (string, error)\n\n\t// unmount unmounts a layer when it is no longer in use.\n\t// If conditional is set, it will fail with ErrLayerNotMounted if the layer is not mounted (without conditional, the caller is\n\t// making a promise that the layer is actually mounted).\n\t// If force is set, it will physically try to unmount it even if it is mounted multiple times, or even if (!conditional and)\n\t// there are no records of it being mounted in the first place.\n\t// It returns whether the layer was still mounted at the time this function returned.\n\t// WARNING: The return value may already be obsolete by the time it is available\n\t// to the caller, so it can be used for heuristic sanity checks at best. It should almost always be ignored.\n\tunmount(id string, force bool, conditional bool) (bool, error)\n\n\t// Mounted returns number of times the layer has been mounted.\n\tMounted(id string) (int, error)\n\n\t// ParentOwners returns the UIDs and GIDs of parents of the layer's mountpoint\n\t// for which the layer's UID and GID maps don't contain corresponding entries.\n\tParentOwners(id string) (uids, gids []int, err error)\n\n\t// ApplyDiff reads a tarstream which was created by a previous call to Diff and\n\t// applies its changes to a specified layer.\n\tApplyDiff(to string, diff io.Reader) (int64, error)\n\n\t// applyDiffWithDifferNoLock applies the changes through the differ callback function.\n\tapplyDiffWithDifferNoLock(options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error)\n\n\t// CleanupStagingDirectory cleanups the staging directory.  It can be used to cleanup the staging directory on errors\n\tCleanupStagingDirectory(stagingDirectory string) error\n\n\t// applyDiffFromStagingDirectory uses diffOutput.Target to create the diff.\n\tapplyDiffFromStagingDirectory(id string, diffOutput *drivers.DriverWithDifferOutput, options *drivers.ApplyDiffWithDifferOpts) error\n\n\t// DifferTarget gets the location where files are stored for the layer.\n\tDifferTarget(id string) (string, error)\n\n\t// PutAdditionalLayer creates a layer using the diff contained in the additional layer\n\t// store.\n\t// This API is experimental and can be changed without bumping the major version number.\n\tPutAdditionalLayer(id string, parentLayer *Layer, names []string, aLayer drivers.AdditionalLayer) (layer *Layer, err error)\n\n\t// Clean up unreferenced layers\n\tGarbageCollect() error\n\n\t// Dedup deduplicates layers in the store.\n\tdedup(drivers.DedupArgs) (drivers.DedupResult, error)\n\n\t// newMaybeStagedLayerExtraction initializes a new maybeStagedLayerExtraction. The caller\n\t// must call maybeStagedLayerExtraction.cleanup() to remove any temporary files.\n\tnewMaybeStagedLayerExtraction(diff io.Reader) *maybeStagedLayerExtraction\n\n\t// stageWithUnlockedStore stages the layer content without needing the store locked.\n\t// If the driver does not support stage addition then this is a NOP and does nothing.\n\tstageWithUnlockedStore(m *maybeStagedLayerExtraction, parent string, options *LayerOptions) error\n}\n\ntype multipleLockFile struct {\n\tlockfiles []*lockfile.LockFile\n}\n\nfunc (l multipleLockFile) Lock() {\n\tfor _, lock := range l.lockfiles {\n\t\tlock.Lock()\n\t}\n}\n\nfunc (l multipleLockFile) RLock() {\n\tfor _, lock := range l.lockfiles {\n\t\tlock.RLock()\n\t}\n}\n\nfunc (l multipleLockFile) Unlock() {\n\tfor _, lock := range l.lockfiles {\n\t\tlock.Unlock()\n\t}\n}\n\nfunc (l multipleLockFile) ModifiedSince(lastWrite lockfile.LastWrite) (lockfile.LastWrite, bool, error) {\n\t// Look up only the first lockfile, since this is the value returned by RecordWrite().\n\treturn l.lockfiles[0].ModifiedSince(lastWrite)\n}\n\nfunc (l multipleLockFile) AssertLockedForWriting() {\n\tfor _, lock := range l.lockfiles {\n\t\tlock.AssertLockedForWriting()\n\t}\n}\n\nfunc (l multipleLockFile) GetLastWrite() (lockfile.LastWrite, error) {\n\treturn l.lockfiles[0].GetLastWrite()\n}\n\nfunc (l multipleLockFile) RecordWrite() (lockfile.LastWrite, error) {\n\tvar lastWrite *lockfile.LastWrite\n\tfor _, lock := range l.lockfiles {\n\t\tlw, err := lock.RecordWrite()\n\t\tif err != nil {\n\t\t\treturn lw, err\n\t\t}\n\t\t// Return the first value we get so we know that\n\t\t// all the locks have a write time >= to this one.\n\t\tif lastWrite == nil {\n\t\t\tlastWrite = &lw\n\t\t}\n\t}\n\treturn *lastWrite, nil\n}\n\nfunc (l multipleLockFile) IsReadWrite() bool {\n\treturn l.lockfiles[0].IsReadWrite()\n}\n\nfunc newMultipleLockFile(l ...*lockfile.LockFile) *multipleLockFile {\n\treturn &multipleLockFile{lockfiles: l}\n}\n\ntype layerStore struct {\n\t// The following fields are only set when constructing layerStore, and must never be modified afterwards.\n\t// They are safe to access without any other locking.\n\tlockfile       *multipleLockFile  // lockfile.IsReadWrite can be used to distinguish between read-write and read-only layer stores.\n\tmountsLockfile *lockfile.LockFile // Can _only_ be obtained with inProcessLock held.\n\trundir         string\n\tjsonPath       [numLayerLocationIndex]string\n\tlayerdir       string\n\n\tinProcessLock sync.RWMutex // Can _only_ be obtained with lockfile held.\n\t// The following fields can only be read/written with read/write ownership of inProcessLock, respectively.\n\t// Almost all users should use startReading() or startWriting().\n\tlastWrite           lockfile.LastWrite\n\tmountsLastWrite     lockfile.LastWrite // Only valid if lockfile.IsReadWrite()\n\tlayers              []*Layer\n\tidindex             *truncindex.TruncIndex\n\tbyid                map[string]*Layer\n\tbyname              map[string]*Layer\n\tbymount             map[string]*Layer\n\tbycompressedsum     map[digest.Digest][]string\n\tbyuncompressedsum   map[digest.Digest][]string\n\tbytocsum            map[digest.Digest][]string\n\tlayerspathsModified [numLayerLocationIndex]time.Time\n\n\t// FIXME: This field is only set when constructing layerStore, but locking rules of the driver\n\t// interface itself are not documented here.\n\tdriver drivers.Driver\n}\n\nfunc copyLayer(l *Layer) *Layer {\n\treturn &Layer{\n\t\tID:                 l.ID,\n\t\tNames:              copySlicePreferringNil(l.Names),\n\t\tParent:             l.Parent,\n\t\tMetadata:           l.Metadata,\n\t\tMountLabel:         l.MountLabel,\n\t\tMountPoint:         l.MountPoint,\n\t\tMountCount:         l.MountCount,\n\t\tCreated:            l.Created,\n\t\tCompressedDigest:   l.CompressedDigest,\n\t\tCompressedSize:     l.CompressedSize,\n\t\tUncompressedDigest: l.UncompressedDigest,\n\t\tUncompressedSize:   l.UncompressedSize,\n\t\tTOCDigest:          l.TOCDigest,\n\t\tCompressionType:    l.CompressionType,\n\t\tReadOnly:           l.ReadOnly,\n\t\tlocation:           l.location,\n\t\tBigDataNames:       copySlicePreferringNil(l.BigDataNames),\n\t\tFlags:              copyMapPreferringNil(l.Flags),\n\t\tUIDMap:             copySlicePreferringNil(l.UIDMap),\n\t\tGIDMap:             copySlicePreferringNil(l.GIDMap),\n\t\tUIDs:               copySlicePreferringNil(l.UIDs),\n\t\tGIDs:               copySlicePreferringNil(l.GIDs),\n\t}\n}\n\n// startWritingWithReload makes sure the store is fresh if canReload, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\n//\n// This is an internal implementation detail of layerStore construction, every other caller\n// should use startWriting() instead.\nfunc (r *layerStore) startWritingWithReload(canReload bool) error {\n\tr.lockfile.Lock()\n\tr.inProcessLock.Lock()\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\tr.inProcessLock.Unlock()\n\t\t\tr.lockfile.Unlock()\n\t\t}\n\t}()\n\n\tif canReload {\n\t\tif _, err := r.reloadIfChanged(true); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tsucceeded = true\n\treturn nil\n}\n\n// startWriting makes sure the store is fresh, and locks it for writing.\n// If this succeeds, the caller MUST call stopWriting().\nfunc (r *layerStore) startWriting() error {\n\treturn r.startWritingWithReload(true)\n}\n\n// stopWriting releases locks obtained by startWriting.\nfunc (r *layerStore) stopWriting() {\n\tr.inProcessLock.Unlock()\n\tr.lockfile.Unlock()\n}\n\n// startReadingWithReload makes sure the store is fresh if canReload, and locks it for reading.\n// If this succeeds, the caller MUST call stopReading().\n//\n// This is an internal implementation detail of layerStore construction, every other caller\n// should use startReading() instead.\nfunc (r *layerStore) startReadingWithReload(canReload bool) error {\n\t// inProcessLocked calls the nested function with r.inProcessLock held for writing.\n\tinProcessLocked := func(fn func() error) error {\n\t\tr.inProcessLock.Lock()\n\t\tdefer r.inProcessLock.Unlock()\n\t\treturn fn()\n\t}\n\n\tr.lockfile.RLock()\n\tunlockFn := r.lockfile.Unlock // A function to call to clean up, or nil\n\tdefer func() {\n\t\tif unlockFn != nil {\n\t\t\tunlockFn()\n\t\t}\n\t}()\n\tr.inProcessLock.RLock()\n\tunlockFn = r.stopReading\n\n\tif canReload {\n\t\t// If we are lucky, we can just hold the read locks, check that we are fresh, and continue.\n\t\tmodified, err := r.modified()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif modified {\n\t\t\t// We are unlucky, and need to reload.\n\t\t\t// NOTE: Multiple goroutines can get to this place approximately simultaneously.\n\t\t\tr.inProcessLock.RUnlock()\n\t\t\tunlockFn = r.lockfile.Unlock\n\n\t\t\tcleanupsDone := 0\n\t\t\tfor {\n\t\t\t\t// First try reloading with r.lockfile held for reading.\n\t\t\t\t// r.inProcessLock will serialize all goroutines that got here;\n\t\t\t\t// each will re-check on-disk state vs. r.lastWrite, and the first one will actually reload the data.\n\t\t\t\tvar tryLockedForWriting bool\n\t\t\t\terr := inProcessLocked(func() error {\n\t\t\t\t\tvar err error\n\t\t\t\t\ttryLockedForWriting, err = r.reloadIfChanged(false)\n\t\t\t\t\treturn err\n\t\t\t\t})\n\t\t\t\tif err == nil {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif !tryLockedForWriting {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif cleanupsDone >= maxLayerStoreCleanupIterations {\n\t\t\t\t\treturn fmt.Errorf(\"(even after %d cleanup attempts:) %w\", cleanupsDone, err)\n\t\t\t\t}\n\t\t\t\t// Not good enough, we need r.lockfile held for writing. So, let’s do that.\n\t\t\t\tunlockFn()\n\t\t\t\tunlockFn = nil\n\n\t\t\t\tr.lockfile.Lock()\n\t\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\t\tif err := inProcessLocked(func() error {\n\t\t\t\t\t_, err := r.reloadIfChanged(true)\n\t\t\t\t\treturn err\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tunlockFn()\n\t\t\t\tunlockFn = nil\n\n\t\t\t\tr.lockfile.RLock()\n\t\t\t\tunlockFn = r.lockfile.Unlock\n\t\t\t\t// We need to check for a reload again because the on-disk state could have been modified\n\t\t\t\t// after we released the lock.\n\t\t\t\tcleanupsDone++\n\t\t\t}\n\n\t\t\t// NOTE that we hold neither a read nor write inProcessLock at this point. That’s fine in ordinary operation, because\n\t\t\t// the on-filesystem r.lockfile should protect us against (cooperating) writers, and any use of r.inProcessLock\n\t\t\t// protects us against in-process writers modifying data.\n\t\t\t// In presence of non-cooperating writers, we just ensure that 1) the in-memory data is not clearly out-of-date\n\t\t\t// and 2) access to the in-memory data is not racy;\n\t\t\t// but we can’t protect against those out-of-process writers modifying _files_ while we are assuming they are in a consistent state.\n\n\t\t\tr.inProcessLock.RLock()\n\t\t}\n\t}\n\n\tunlockFn = nil\n\treturn nil\n}\n\n// startReading makes sure the store is fresh, and locks it for reading.\n// If this succeeds, the caller MUST call stopReading().\nfunc (r *layerStore) startReading() error {\n\treturn r.startReadingWithReload(true)\n}\n\n// stopReading releases locks obtained by startReading.\nfunc (r *layerStore) stopReading() {\n\tr.inProcessLock.RUnlock()\n\tr.lockfile.Unlock()\n}\n\n// modified returns true if the on-disk state (of layers or mounts) has changed (ie if reloadIcHanged may need to modify the store)\n//\n// Note that unlike containerStore.modified and imageStore.modified, this function is not directly used in layerStore.reloadIfChanged();\n// it exists only to help the reader ensure it has fresh enough state.\n//\n// The caller must hold r.lockfile for reading _or_ writing.\n// The caller must hold r.inProcessLock for reading or writing.\nfunc (r *layerStore) modified() (bool, error) {\n\t_, m, err := r.layersModified()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif m {\n\t\treturn true, nil\n\t}\n\tif r.lockfile.IsReadWrite() {\n\t\t// This means we get, release, and re-obtain, r.mountsLockfile if we actually need to do any kind of reload.\n\t\t// That’s a bit expensive, but hopefully most callers will be read-only and see no changes.\n\t\t// We can’t eliminate these mountsLockfile accesses given the current assumption that Layer objects have _some_ not-very-obsolete\n\t\t// mount data. Maybe we can segregate the mount-dependent and mount-independent operations better...\n\t\tr.mountsLockfile.RLock()\n\t\tdefer r.mountsLockfile.Unlock()\n\t\t_, m, err := r.mountsModified()\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif m {\n\t\t\treturn true, nil\n\t\t}\n\t}\n\treturn false, nil\n}\n\n// layersModified() checks if the most recent writer to r.jsonPath[] was a party other than the\n// last recorded writer. If so, it returns a lockfile.LastWrite value to record on a successful\n// reload.\n// It should only be called with the lock held.\n// The caller must hold r.inProcessLock for reading.\nfunc (r *layerStore) layersModified() (lockfile.LastWrite, bool, error) {\n\tlastWrite, modified, err := r.lockfile.ModifiedSince(r.lastWrite)\n\tif err != nil {\n\t\treturn lockfile.LastWrite{}, modified, err\n\t}\n\tif modified {\n\t\treturn lastWrite, true, nil\n\t}\n\n\t// If the layers.json file or container-layers.json has been\n\t// modified manually, then we have to reload the storage in\n\t// any case.\n\tfor locationIndex := range numLayerLocationIndex {\n\t\trpath := r.jsonPath[locationIndex]\n\t\tif rpath == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tinfo, err := os.Stat(rpath)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn lockfile.LastWrite{}, false, fmt.Errorf(\"stat layers file: %w\", err)\n\t\t}\n\t\tif info != nil && info.ModTime() != r.layerspathsModified[locationIndex] {\n\t\t\t// In this case the LastWrite value is equal to r.lastWrite; writing it back doesn’t hurt.\n\t\t\treturn lastWrite, true, nil\n\t\t}\n\t}\n\n\treturn lockfile.LastWrite{}, false, nil\n}\n\n// reloadIfChanged reloads the contents of the store from disk if it is changed.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n//\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// reloadIfChanged() with lockedForWriting could succeed.\nfunc (r *layerStore) reloadIfChanged(lockedForWriting bool) (bool, error) {\n\tlastWrite, layersModified, err := r.layersModified()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif layersModified {\n\t\t// r.load also reloads mounts data; so, on this path, we don’t need to call reloadMountsIfChanged.\n\t\tif tryLockedForWriting, err := r.load(lockedForWriting); err != nil {\n\t\t\treturn tryLockedForWriting, err // r.lastWrite is unchanged, so we will load the next time again.\n\t\t}\n\t\tr.lastWrite = lastWrite\n\t\treturn false, nil\n\t}\n\tif r.lockfile.IsReadWrite() {\n\t\tr.mountsLockfile.RLock()\n\t\tdefer r.mountsLockfile.Unlock()\n\t\tif err := r.reloadMountsIfChanged(); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t}\n\treturn false, nil\n}\n\n// mountsModified returns true if the on-disk mount state has changed (i.e. if reloadMountsIfChanged may need to modify the store),\n// and a lockfile.LastWrite value for that update.\n//\n// The caller must hold r.mountsLockfile for reading _or_ writing.\n// The caller must hold r.inProcessLock for reading or writing.\nfunc (r *layerStore) mountsModified() (lockfile.LastWrite, bool, error) {\n\treturn r.mountsLockfile.ModifiedSince(r.mountsLastWrite)\n}\n\n// reloadMountsIfChanged reloads the contents of mountsPath from disk if it is changed.\n//\n// The caller must hold r.mountsLockFile for reading or writing.\nfunc (r *layerStore) reloadMountsIfChanged() error {\n\tlastWrite, modified, err := r.mountsModified()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif modified {\n\t\tif err = r.loadMounts(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tr.mountsLastWrite = lastWrite\n\t}\n\treturn nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Layers() ([]Layer, error) {\n\tlayers := make([]Layer, len(r.layers))\n\tfor i := range r.layers {\n\t\tlayers[i] = *copyLayer(r.layers[i])\n\t}\n\treturn layers, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) GarbageCollect() error {\n\tlayers, err := r.driver.ListLayers()\n\tif err != nil {\n\t\tif errors.Is(err, drivers.ErrNotSupported) {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\n\tfor _, id := range layers {\n\t\t// Is the id still referenced\n\t\tif r.byid[id] != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Remove layer and any related data of unreferenced id\n\t\tif err := r.driver.Remove(id); err != nil {\n\t\t\tlogrus.Debugf(\"removing driver layer %q\", id)\n\t\t\treturn err\n\t\t}\n\n\t\tlogrus.Debugf(\"removing %q\", r.tspath(id))\n\t\tos.Remove(r.tspath(id))\n\t\tlogrus.Debugf(\"removing %q\", r.datadir(id))\n\t\tos.RemoveAll(r.datadir(id))\n\t}\n\treturn nil\n}\n\nfunc (r *layerStore) mountspath() string {\n\treturn filepath.Join(r.rundir, \"mountpoints.json\")\n}\n\n// load reloads the contents of the store from disk.\n//\n// Most callers should call reloadIfChanged() instead, to avoid overhead and to correctly\n// manage r.lastWrite.\n//\n// As a side effect, this sets r.mountsLastWrite.\n//\n// The caller must hold r.lockfile for reading _or_ writing; lockedForWriting is true\n// if it is held for writing.\n// The caller must hold r.inProcessLock for WRITING.\n//\n// If !lockedForWriting and this function fails, the return value indicates whether\n// retrying with lockedForWriting could succeed.\nfunc (r *layerStore) load(lockedForWriting bool) (bool, error) {\n\tvar modifiedLocations layerLocations\n\n\tlayers := []*Layer{}\n\tids := make(map[string]*Layer)\n\n\tif r.lockfile.IsReadWrite() {\n\t\tif err := tempdir.RecoverStaleDirs(filepath.Join(r.layerdir, tempDirPath)); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tfor _, driverTempDirPath := range r.driver.GetTempDirRootDirs() {\n\t\t\tif err := tempdir.RecoverStaleDirs(driverTempDirPath); err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t}\n\t}\n\n\tfor locationIndex := range numLayerLocationIndex {\n\t\tlocation := layerLocationFromIndex(locationIndex)\n\t\trpath := r.jsonPath[locationIndex]\n\t\tif rpath == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tinfo, err := os.Stat(rpath)\n\t\tif err != nil {\n\t\t\tif !os.IsNotExist(err) {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t} else {\n\t\t\tr.layerspathsModified[locationIndex] = info.ModTime()\n\t\t}\n\t\tdata, err := os.ReadFile(rpath)\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\treturn false, err\n\t\t}\n\n\t\tlocationLayers := []*Layer{}\n\t\tif len(data) != 0 {\n\t\t\tif err := json.Unmarshal(data, &locationLayers); err != nil {\n\t\t\t\treturn false, fmt.Errorf(\"loading %q: %w\", rpath, err)\n\t\t\t}\n\t\t}\n\n\t\tfor _, layer := range locationLayers {\n\t\t\t// There should be no duplicated ids between json files, but lets check to be sure\n\t\t\tif ids[layer.ID] != nil {\n\t\t\t\tcontinue // skip invalid duplicated layer\n\t\t\t}\n\t\t\t// Remember where the layer came from\n\t\t\tlayer.location = location\n\t\t\tlayers = append(layers, layer)\n\t\t\tids[layer.ID] = layer\n\t\t}\n\t}\n\n\tidlist := make([]string, 0, len(layers))\n\tnames := make(map[string]*Layer)\n\tcompressedsums := make(map[digest.Digest][]string)\n\tuncompressedsums := make(map[digest.Digest][]string)\n\ttocsums := make(map[digest.Digest][]string)\n\tvar errorToResolveBySaving error // == nil; if there are multiple errors, this is one of them.\n\tif r.lockfile.IsReadWrite() {\n\t\tselinux.ClearLabels()\n\t}\n\tfor n, layer := range layers {\n\t\tidlist = append(idlist, layer.ID)\n\t\tfor _, name := range layer.Names {\n\t\t\tif conflict, ok := names[name]; ok {\n\t\t\t\tr.removeName(conflict, name)\n\t\t\t\terrorToResolveBySaving = ErrDuplicateLayerNames\n\t\t\t\tmodifiedLocations |= conflict.location\n\t\t\t}\n\t\t\tnames[name] = layers[n]\n\t\t}\n\t\tif layer.CompressedDigest != \"\" {\n\t\t\tcompressedsums[layer.CompressedDigest] = append(compressedsums[layer.CompressedDigest], layer.ID)\n\t\t}\n\t\tif layer.UncompressedDigest != \"\" {\n\t\t\tuncompressedsums[layer.UncompressedDigest] = append(uncompressedsums[layer.UncompressedDigest], layer.ID)\n\t\t}\n\t\tif layer.TOCDigest != \"\" {\n\t\t\ttocsums[layer.TOCDigest] = append(tocsums[layer.TOCDigest], layer.ID)\n\t\t}\n\t\tif layer.MountLabel != \"\" {\n\t\t\tselinux.ReserveLabel(layer.MountLabel)\n\t\t}\n\t\tlayer.ReadOnly = !r.lockfile.IsReadWrite()\n\t\t// The r.lockfile.IsReadWrite() condition maintains past practice:\n\t\t// Incomplete layers in a read-only store are not treated as a reason to refuse to use other layers from that store\n\t\t// (OTOH creating child layers on top would probably lead to problems?).\n\t\t// We do remove incomplete layers in read-write stores so that we don’t build on top of them.\n\t\tif layerHasIncompleteFlag(layer) && r.lockfile.IsReadWrite() {\n\t\t\terrorToResolveBySaving = errors.New(\"an incomplete layer exists and can't be cleaned up\")\n\t\t}\n\t}\n\n\tif errorToResolveBySaving != nil {\n\t\tif !r.lockfile.IsReadWrite() {\n\t\t\treturn false, errorToResolveBySaving\n\t\t}\n\t\tif !lockedForWriting {\n\t\t\treturn true, errorToResolveBySaving\n\t\t}\n\t}\n\tr.layers = layers\n\tr.idindex = truncindex.NewTruncIndex(idlist) // Invalid values in idlist are ignored: they are not a reason to refuse processing the whole store.\n\tr.byid = ids\n\tr.byname = names\n\tr.bycompressedsum = compressedsums\n\tr.byuncompressedsum = uncompressedsums\n\tr.bytocsum = tocsums\n\n\t// Load and merge information about which layers are mounted, and where.\n\tif r.lockfile.IsReadWrite() {\n\t\tr.mountsLockfile.RLock()\n\t\tdefer r.mountsLockfile.Unlock()\n\t\t// We need to reload mounts unconditionally, becuause by creating r.layers from scratch, we have discarded the previous\n\t\t// information, if any. So, obtain a fresh mountsLastWrite value so that we don’t unnecessarily reload the data\n\t\t// afterwards.\n\t\tmountsLastWrite, err := r.mountsLockfile.GetLastWrite()\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif err := r.loadMounts(); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tr.mountsLastWrite = mountsLastWrite\n\t\t// NOTE: We will release mountsLockfile when this function returns, so unlike most of the layer data, the\n\t\t// r.layers[].MountPoint, r.layers[].MountCount, and r.bymount values might not reflect\n\t\t// true on-filesystem state already by the time this function returns.\n\t\t// Code that needs the state to be accurate must lock r.mountsLockfile again,\n\t\t// and possibly loadMounts() again.\n\t}\n\n\tif errorToResolveBySaving != nil {\n\t\tif !r.lockfile.IsReadWrite() {\n\t\t\treturn false, fmt.Errorf(\"internal error: layerStore.load has shouldSave but !r.lockfile.IsReadWrite\")\n\t\t}\n\t\t// Last step: try to remove anything that a previous\n\t\t// user of this storage area marked for deletion but didn't manage to\n\t\t// actually delete.\n\t\tvar incompleteDeletionErrors error // = nil\n\t\tvar layersToDelete []*Layer\n\t\tfor _, layer := range r.layers {\n\t\t\tif layer.Flags == nil {\n\t\t\t\tlayer.Flags = make(map[string]any)\n\t\t\t}\n\t\t\tif layerHasIncompleteFlag(layer) {\n\t\t\t\t// Important: Do not call r.deleteInternal() here. It modifies r.layers\n\t\t\t\t// which causes unexpected side effects while iterating over r.layers here.\n\t\t\t\t// The range loop has no idea that the underlying elements where shifted\n\t\t\t\t// around.\n\t\t\t\tlayersToDelete = append(layersToDelete, layer)\n\t\t\t}\n\t\t}\n\t\t// Now actually delete the layers\n\t\tfor _, layer := range layersToDelete {\n\t\t\tlogrus.Warnf(\"Found incomplete layer %q, deleting it\", layer.ID)\n\t\t\tcleanFunctions, err := r.internalDelete(layer.ID)\n\t\t\tdefer func() {\n\t\t\t\tif err := tempdir.CleanupTemporaryDirectories(cleanFunctions...); err != nil {\n\t\t\t\t\tlogrus.Errorf(\"Error cleaning up temporary directories: %v\", err)\n\t\t\t\t}\n\t\t\t}()\n\t\t\tif err != nil {\n\t\t\t\t// Don't return the error immediately, because deleteInternal does not saveLayers();\n\t\t\t\t// Even if deleting one incomplete layer fails, call saveLayers() so that other possible successfully\n\t\t\t\t// deleted incomplete layers have their metadata correctly removed.\n\t\t\t\tincompleteDeletionErrors = errors.Join(incompleteDeletionErrors,\n\t\t\t\t\tfmt.Errorf(\"deleting layer %#v: %w\", layer.ID, err))\n\t\t\t}\n\t\t\tmodifiedLocations |= layer.location\n\t\t}\n\t\tif err := r.saveLayers(modifiedLocations); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif incompleteDeletionErrors != nil {\n\t\t\treturn false, incompleteDeletionErrors\n\t\t}\n\t}\n\treturn false, nil\n}\n\n// The caller must hold r.mountsLockfile for reading or writing.\n// The caller must hold r.inProcessLock for WRITING.\nfunc (r *layerStore) loadMounts() error {\n\tmounts := make(map[string]*Layer)\n\tmpath := r.mountspath()\n\tdata, err := os.ReadFile(mpath)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn err\n\t}\n\tlayerMounts := []layerMountPoint{}\n\tif len(data) != 0 {\n\t\tif err := json.Unmarshal(data, &layerMounts); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// Clear all of our mount information.  If another process\n\t// unmounted something, it (along with its zero count) won't\n\t// have been encoded into the version of mountpoints.json that\n\t// we're loading, so our count could fall out of sync with it\n\t// if we don't, and if we subsequently change something else,\n\t// we'd pass that error along to other process that reloaded\n\t// the data after we saved it.\n\tfor _, layer := range r.layers {\n\t\tlayer.MountPoint = \"\"\n\t\tlayer.MountCount = 0\n\t}\n\t// All of the non-zero count values will have been encoded, so\n\t// we reset the still-mounted ones based on the contents.\n\tfor _, mount := range layerMounts {\n\t\tif mount.MountPoint != \"\" {\n\t\t\tif layer, ok := r.lookup(mount.ID); ok {\n\t\t\t\tmounts[mount.MountPoint] = layer\n\t\t\t\tlayer.MountPoint = mount.MountPoint\n\t\t\t\tlayer.MountCount = mount.MountCount\n\t\t\t}\n\t\t}\n\t}\n\tr.bymount = mounts\n\treturn nil\n}\n\n// save saves the contents of the store to disk.\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for WRITING.\nfunc (r *layerStore) save(saveLocations layerLocations) error {\n\tr.mountsLockfile.Lock()\n\tdefer r.mountsLockfile.Unlock()\n\tif err := r.saveLayers(saveLocations); err != nil {\n\t\treturn err\n\t}\n\treturn r.saveMounts()\n}\n\n// saveFor saves the contents of the store relevant for modifiedLayer to disk.\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for WRITING.\nfunc (r *layerStore) saveFor(modifiedLayer *Layer) error {\n\treturn r.save(modifiedLayer.location)\n}\n\n// The caller must hold r.lockfile locked for writing.\n// The caller must hold r.inProcessLock for WRITING.\nfunc (r *layerStore) saveLayers(saveLocations layerLocations) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to modify the layer store at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tr.lockfile.AssertLockedForWriting()\n\n\t// This must be done before we write the file, because the process could be terminated\n\t// after the file is written but before the lock file is updated.\n\tlw, err := r.lockfile.RecordWrite()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.lastWrite = lw\n\n\tfor locationIndex := range numLayerLocationIndex {\n\t\tlocation := layerLocationFromIndex(locationIndex)\n\t\tif location&saveLocations == 0 {\n\t\t\tcontinue\n\t\t}\n\t\trpath := r.jsonPath[locationIndex]\n\t\tif rpath == \"\" {\n\t\t\treturn fmt.Errorf(\"internal error: no path for location %v\", location)\n\t\t}\n\t\tif err := os.MkdirAll(filepath.Dir(rpath), 0o700); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsubsetLayers := make([]*Layer, 0, len(r.layers))\n\t\tfor _, layer := range r.layers {\n\t\t\tif layer.location == location {\n\t\t\t\tsubsetLayers = append(subsetLayers, layer)\n\t\t\t}\n\t\t}\n\n\t\tjldata, err := json.Marshal(&subsetLayers)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\topts := ioutils.AtomicFileWriterOptions{}\n\t\tif location == volatileLayerLocation {\n\t\t\topts.NoSync = true\n\t\t}\n\t\tif err := ioutils.AtomicWriteFileWithOpts(rpath, jldata, 0o600, &opts); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tr.layerspathsModified[locationIndex] = opts.ModTime\n\t}\n\treturn nil\n}\n\n// The caller must hold r.mountsLockfile for writing.\n// The caller must hold r.inProcessLock for WRITING.\nfunc (r *layerStore) saveMounts() error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to modify the layer store at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tr.mountsLockfile.AssertLockedForWriting()\n\tmpath := r.mountspath()\n\tif err := os.MkdirAll(filepath.Dir(mpath), 0o700); err != nil {\n\t\treturn err\n\t}\n\tmounts := make([]layerMountPoint, 0, len(r.layers))\n\tfor _, layer := range r.layers {\n\t\tif layer.MountPoint != \"\" && layer.MountCount > 0 {\n\t\t\tmounts = append(mounts, layerMountPoint{\n\t\t\t\tID:         layer.ID,\n\t\t\t\tMountPoint: layer.MountPoint,\n\t\t\t\tMountCount: layer.MountCount,\n\t\t\t})\n\t\t}\n\t}\n\tjmdata, err := json.Marshal(&mounts)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// This must be done before we write the file, because the process could be terminated\n\t// after the file is written but before the lock file is updated.\n\tlw, err := r.mountsLockfile.RecordWrite()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr.mountsLastWrite = lw\n\n\tif err = ioutils.AtomicWriteFile(mpath, jmdata, 0o600); err != nil {\n\t\treturn err\n\t}\n\treturn r.loadMounts()\n}\n\nfunc (s *store) newLayerStore(rundir, layerdir, imagedir string, driver drivers.Driver, transient bool) (rwLayerStore, error) {\n\tif err := os.MkdirAll(rundir, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := os.MkdirAll(layerdir, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tif imagedir != \"\" {\n\t\tif err := os.MkdirAll(imagedir, 0o700); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// Note: While the containers.lock file is in rundir for transient stores\n\t// we don't want to do this here, because the non-transient layers in\n\t// layers.json might be used externally as a read-only layer (using e.g.\n\t// additionalimagestores), and that would look for the lockfile in the\n\t// same directory\n\tvar lockFiles []*lockfile.LockFile\n\tlockFile, err := lockfile.GetLockFile(filepath.Join(layerdir, \"layers.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlockFiles = append(lockFiles, lockFile)\n\tif imagedir != \"\" {\n\t\tlockFile, err := lockfile.GetLockFile(filepath.Join(imagedir, \"layers.lock\"))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tlockFiles = append(lockFiles, lockFile)\n\t}\n\n\tmountsLockfile, err := lockfile.GetLockFile(filepath.Join(rundir, \"mountpoints.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvolatileDir := layerdir\n\tif transient {\n\t\tvolatileDir = rundir\n\t}\n\tlayersImageDir := \"\"\n\tif imagedir != \"\" {\n\t\tlayersImageDir = filepath.Join(imagedir, \"layers.json\")\n\t}\n\trlstore := layerStore{\n\t\tlockfile:       newMultipleLockFile(lockFiles...),\n\t\tmountsLockfile: mountsLockfile,\n\t\trundir:         rundir,\n\t\tjsonPath: [numLayerLocationIndex]string{\n\t\t\tfilepath.Join(layerdir, \"layers.json\"),\n\t\t\tlayersImageDir,\n\t\t\tfilepath.Join(volatileDir, \"volatile-layers.json\"),\n\t\t},\n\t\tlayerdir: layerdir,\n\n\t\tbyid:    make(map[string]*Layer),\n\t\tbyname:  make(map[string]*Layer),\n\t\tbymount: make(map[string]*Layer),\n\n\t\tdriver: driver,\n\t}\n\tif err := rlstore.startWritingWithReload(false); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rlstore.stopWriting()\n\tlw, err := rlstore.lockfile.GetLastWrite()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trlstore.lastWrite = lw\n\t// rlstore.mountsLastWrite is initialized inside rlstore.load().\n\tif _, err := rlstore.load(true); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &rlstore, nil\n}\n\nfunc newROLayerStore(rundir string, layerdir string, driver drivers.Driver) (roLayerStore, error) {\n\tlockfile, err := lockfile.GetROLockFile(filepath.Join(layerdir, \"layers.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trlstore := layerStore{\n\t\tlockfile:       newMultipleLockFile(lockfile),\n\t\tmountsLockfile: nil,\n\t\trundir:         rundir,\n\t\tjsonPath: [numLayerLocationIndex]string{\n\t\t\tfilepath.Join(layerdir, \"layers.json\"),\n\t\t\t\"\",\n\t\t\tfilepath.Join(layerdir, \"volatile-layers.json\"),\n\t\t},\n\t\tlayerdir: layerdir,\n\n\t\tbyid:    make(map[string]*Layer),\n\t\tbyname:  make(map[string]*Layer),\n\t\tbymount: make(map[string]*Layer),\n\n\t\tdriver: driver,\n\t}\n\tif err := rlstore.startReadingWithReload(false); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rlstore.stopReading()\n\tlw, err := rlstore.lockfile.GetLastWrite()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trlstore.lastWrite = lw\n\tif _, err := rlstore.load(false); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &rlstore, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) lookup(id string) (*Layer, bool) {\n\tif layer, ok := r.byid[id]; ok {\n\t\treturn layer, ok\n\t} else if layer, ok := r.byname[id]; ok {\n\t\treturn layer, ok\n\t} else if longid, err := r.idindex.Get(id); err == nil {\n\t\tlayer, ok := r.byid[longid]\n\t\treturn layer, ok\n\t}\n\treturn nil, false\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Size(name string) (int64, error) {\n\tlayer, ok := r.lookup(name)\n\tif !ok {\n\t\treturn -1, ErrLayerUnknown\n\t}\n\t// We use the presence of a non-empty digest as an indicator that the size value was intentionally set, and that\n\t// a zero value is not just present because it was never set to anything else (which can happen if the layer was\n\t// created by a version of this library that didn't keep track of digest and size information).\n\tif layer.UncompressedDigest != \"\" || layer.TOCDigest != \"\" {\n\t\treturn layer.UncompressedSize, nil // This may return -1 if only TOCDigest is set\n\t}\n\treturn -1, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) ClearFlag(id string, flag string) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to clear flags on layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrLayerUnknown\n\t}\n\tdelete(layer.Flags, flag)\n\treturn r.saveFor(layer)\n}\n\n// Requires startWriting.\nfunc (r *layerStore) SetFlag(id string, flag string, value any) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to set flags on layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrLayerUnknown\n\t}\n\tif layer.Flags == nil {\n\t\tlayer.Flags = make(map[string]any)\n\t}\n\tlayer.Flags[flag] = value\n\treturn r.saveFor(layer)\n}\n\nfunc (r *layerStore) Status() ([][2]string, error) {\n\treturn r.driver.Status(), nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) PutAdditionalLayer(id string, parentLayer *Layer, names []string, aLayer drivers.AdditionalLayer) (layer *Layer, err error) {\n\tif layer, err := r.checkIdOrNameConflict(id, names); err != nil {\n\t\treturn layer, err\n\t}\n\n\tparent := \"\"\n\tif parentLayer != nil {\n\t\tparent = parentLayer.ID\n\t}\n\n\tinfo, err := aLayer.Info()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer info.Close()\n\tlayer = &Layer{}\n\tif err := json.NewDecoder(info).Decode(layer); err != nil {\n\t\treturn nil, err\n\t}\n\tlayer.ID = id\n\tlayer.Parent = parent\n\tlayer.Created = time.Now().UTC()\n\n\tif err := aLayer.CreateAs(id, parent); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// TODO: check if necessary fields are filled\n\tr.layers = append(r.layers, layer)\n\t// This can only fail on duplicate IDs, which shouldn’t happen — and in\n\t// that case the index is already in the desired state anyway.\n\t// Implementing recovery from an unlikely and unimportant failure here\n\t// would be too risky.\n\t_ = r.idindex.Add(id)\n\tr.byid[id] = layer\n\tfor _, name := range names { // names got from the additional layer store won't be used\n\t\tr.byname[name] = layer\n\t}\n\tif layer.CompressedDigest != \"\" {\n\t\tr.bycompressedsum[layer.CompressedDigest] = append(r.bycompressedsum[layer.CompressedDigest], layer.ID)\n\t}\n\tif layer.UncompressedDigest != \"\" {\n\t\tr.byuncompressedsum[layer.UncompressedDigest] = append(r.byuncompressedsum[layer.UncompressedDigest], layer.ID)\n\t}\n\tif layer.TOCDigest != \"\" {\n\t\tr.bytocsum[layer.TOCDigest] = append(r.bytocsum[layer.TOCDigest], layer.ID)\n\t}\n\tif err := r.saveFor(layer); err != nil {\n\t\tif e := r.deleteWhileHoldingLock(layer.ID); e != nil {\n\t\t\tlogrus.Errorf(\"While recovering from a failure to save layers, error deleting layer %#v: %v\", id, e)\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn copyLayer(layer), nil\n}\n\nfunc (r *layerStore) pickStoreLocation(volatile, writeable bool) layerLocations {\n\tswitch {\n\tcase volatile:\n\t\treturn volatileLayerLocation\n\tcase !writeable && r.jsonPath[indexFromLayerLocation(imageStoreLayerLocation)] != \"\":\n\t\treturn imageStoreLayerLocation\n\tdefault:\n\t\treturn stableLayerLocation\n\t}\n}\n\n// checkIdOrNameConflict checks if the id or names are already in use and returns an\n// error in that case. As Special case if the layer already exists it returns it as\n// well together with the error.\n//\n// Requires startReading or startWriting.\nfunc (r *layerStore) checkIdOrNameConflict(id string, names []string) (*Layer, error) {\n\tif duplicateLayer, idInUse := r.byid[id]; idInUse {\n\t\treturn duplicateLayer, ErrDuplicateID\n\t}\n\tfor _, name := range names {\n\t\tif _, nameInUse := r.byname[name]; nameInUse {\n\t\t\treturn nil, ErrDuplicateName\n\t\t}\n\t}\n\treturn nil, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) create(id string, parentLayer *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, contents *layerCreationContents) (layer *Layer, size int64, err error) {\n\tif moreOptions == nil {\n\t\tmoreOptions = &LayerOptions{}\n\t}\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn nil, -1, fmt.Errorf(\"not allowed to create new layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tif err := os.MkdirAll(r.rundir, 0o700); err != nil {\n\t\treturn nil, -1, err\n\t}\n\tif err := os.MkdirAll(r.layerdir, 0o700); err != nil {\n\t\treturn nil, -1, err\n\t}\n\tif id == \"\" {\n\t\tid = stringid.GenerateRandomID()\n\t\t_, idInUse := r.byid[id]\n\t\tfor idInUse {\n\t\t\tid = stringid.GenerateRandomID()\n\t\t\t_, idInUse = r.byid[id]\n\t\t}\n\t}\n\tif layer, err := r.checkIdOrNameConflict(id, names); err != nil {\n\t\treturn layer, -1, err\n\t}\n\tparent := \"\"\n\tif parentLayer != nil {\n\t\tparent = parentLayer.ID\n\t}\n\tvar (\n\t\ttemplateIDMappings         *idtools.IDMappings\n\t\ttemplateMetadata           string\n\t\ttemplateCompressedDigest   digest.Digest\n\t\ttemplateCompressedSize     int64\n\t\ttemplateUncompressedDigest digest.Digest\n\t\ttemplateTOCDigest          digest.Digest\n\t\ttemplateUncompressedSize   int64\n\t\ttemplateCompressionType    archive.Compression\n\t\ttemplateUIDs, templateGIDs []uint32\n\t\ttemplateTSdata             []byte\n\t)\n\tif moreOptions.TemplateLayer != \"\" {\n\t\ttemplateLayer, ok := r.lookup(moreOptions.TemplateLayer)\n\t\tif !ok {\n\t\t\treturn nil, -1, ErrLayerUnknown\n\t\t}\n\t\ttemplateMetadata = templateLayer.Metadata\n\t\ttemplateIDMappings = idtools.NewIDMappingsFromMaps(templateLayer.UIDMap, templateLayer.GIDMap)\n\t\ttemplateTOCDigest = templateLayer.TOCDigest\n\t\ttemplateCompressedDigest, templateCompressedSize = templateLayer.CompressedDigest, templateLayer.CompressedSize\n\t\ttemplateUncompressedDigest, templateUncompressedSize = templateLayer.UncompressedDigest, templateLayer.UncompressedSize\n\t\ttemplateCompressionType = templateLayer.CompressionType\n\t\ttemplateUIDs, templateGIDs = slices.Clone(templateLayer.UIDs), slices.Clone(templateLayer.GIDs)\n\t\ttemplateTSdata, err = os.ReadFile(r.tspath(templateLayer.ID))\n\t\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\t\treturn nil, -1, err\n\t\t}\n\t} else {\n\t\ttemplateIDMappings = &idtools.IDMappings{}\n\t}\n\tif mountLabel != \"\" {\n\t\tselinux.ReserveLabel(mountLabel)\n\t}\n\n\t// Before actually creating the layer, make a persistent record of it\n\t// with the incomplete flag set, so that future processes have a chance\n\t// to clean up after it.\n\tlayer = &Layer{\n\t\tID:                 id,\n\t\tParent:             parent,\n\t\tNames:              names,\n\t\tMountLabel:         mountLabel,\n\t\tMetadata:           templateMetadata,\n\t\tCreated:            time.Now().UTC(),\n\t\tCompressedDigest:   templateCompressedDigest,\n\t\tCompressedSize:     templateCompressedSize,\n\t\tUncompressedDigest: templateUncompressedDigest,\n\t\tTOCDigest:          templateTOCDigest,\n\t\tUncompressedSize:   templateUncompressedSize,\n\t\tCompressionType:    templateCompressionType,\n\t\tUIDs:               templateUIDs,\n\t\tGIDs:               templateGIDs,\n\t\tFlags:              newMapFrom(moreOptions.Flags),\n\t\tUIDMap:             copySlicePreferringNil(moreOptions.UIDMap),\n\t\tGIDMap:             copySlicePreferringNil(moreOptions.GIDMap),\n\t\tBigDataNames:       []string{},\n\t\tlocation:           r.pickStoreLocation(moreOptions.Volatile, writeable),\n\t}\n\tlayer.Flags[incompleteFlag] = true\n\n\tr.layers = append(r.layers, layer)\n\t// This can only fail if the ID is already missing, which shouldn’t\n\t// happen — and in that case the index is already in the desired state\n\t// anyway.  This is on various paths to recover from failures, so this\n\t// should be robust against partially missing data.\n\t_ = r.idindex.Add(id)\n\tr.byid[id] = layer\n\tfor _, name := range names {\n\t\tr.byname[name] = layer\n\t}\n\n\tcleanupFailureContext := \"\"\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t// now that the in-memory structures know about the new\n\t\t\t// record, we can use regular Delete() to clean up if\n\t\t\t// anything breaks from here on out\n\t\t\tif cleanupFailureContext == \"\" {\n\t\t\t\tcleanupFailureContext = \"unknown: cleanupFailureContext not set at the failure site\"\n\t\t\t}\n\t\t\tif e := r.deleteWhileHoldingLock(id); e != nil {\n\t\t\t\tlogrus.Errorf(\"While recovering from a failure (%s), error deleting layer %#v: %v\", cleanupFailureContext, id, e)\n\t\t\t}\n\t\t}\n\t}()\n\n\tif err = r.saveFor(layer); err != nil {\n\t\tcleanupFailureContext = \"saving incomplete layer metadata\"\n\t\treturn nil, -1, err\n\t}\n\n\tfor _, item := range moreOptions.BigData {\n\t\tif err = r.setBigData(layer, item.Key, item.Data); err != nil {\n\t\t\tcleanupFailureContext = fmt.Sprintf(\"saving big data item %q\", item.Key)\n\t\t\treturn nil, -1, err\n\t\t}\n\t}\n\n\tidMappings := idtools.NewIDMappingsFromMaps(moreOptions.UIDMap, moreOptions.GIDMap)\n\topts := drivers.CreateOpts{\n\t\tMountLabel: mountLabel,\n\t\tStorageOpt: options,\n\t\tIDMappings: idMappings,\n\t}\n\n\tvar parentMappings, oldMappings *idtools.IDMappings\n\tif parentLayer != nil {\n\t\tparentMappings = idtools.NewIDMappingsFromMaps(parentLayer.UIDMap, parentLayer.GIDMap)\n\t} else {\n\t\tparentMappings = &idtools.IDMappings{}\n\t}\n\tif moreOptions.TemplateLayer != \"\" {\n\t\tif err = r.driver.CreateFromTemplate(id, moreOptions.TemplateLayer, templateIDMappings, parent, parentMappings, &opts, writeable); err != nil {\n\t\t\tcleanupFailureContext = fmt.Sprintf(\"creating a layer from template layer %q\", moreOptions.TemplateLayer)\n\t\t\treturn nil, -1, fmt.Errorf(\"creating copy of template layer %q with ID %q: %w\", moreOptions.TemplateLayer, id, err)\n\t\t}\n\t\toldMappings = templateIDMappings\n\t} else {\n\t\tif writeable {\n\t\t\tif err = r.driver.CreateReadWrite(id, parent, &opts); err != nil {\n\t\t\t\tcleanupFailureContext = \"creating a read-write layer\"\n\t\t\t\treturn nil, -1, fmt.Errorf(\"creating read-write layer with ID %q: %w\", id, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err = r.driver.Create(id, parent, &opts); err != nil {\n\t\t\t\tcleanupFailureContext = \"creating a read-only layer\"\n\t\t\t\treturn nil, -1, fmt.Errorf(\"creating read-only layer with ID %q: %w\", id, err)\n\t\t\t}\n\t\t}\n\t\tif parentLayer != nil {\n\t\t\toldMappings = parentMappings\n\t\t}\n\t}\n\n\tif oldMappings != nil &&\n\t\t(!reflect.DeepEqual(oldMappings.UIDs(), idMappings.UIDs()) || !reflect.DeepEqual(oldMappings.GIDs(), idMappings.GIDs())) {\n\t\tif err = r.driver.UpdateLayerIDMap(id, oldMappings, idMappings, mountLabel); err != nil {\n\t\t\tcleanupFailureContext = \"in UpdateLayerIDMap\"\n\t\t\treturn nil, -1, err\n\t\t}\n\t}\n\n\tif len(templateTSdata) > 0 {\n\t\tif err = os.MkdirAll(filepath.Dir(r.tspath(id)), 0o700); err != nil {\n\t\t\tcleanupFailureContext = \"creating tar-split parent directory for a copy from template\"\n\t\t\treturn nil, -1, err\n\t\t}\n\t\tif err = ioutils.AtomicWriteFile(r.tspath(id), templateTSdata, 0o600); err != nil {\n\t\t\tcleanupFailureContext = \"creating a tar-split copy from template\"\n\t\t\treturn nil, -1, err\n\t\t}\n\t}\n\n\tsize = -1\n\tif contents != nil {\n\t\tif contents.stagedLayerExtraction != nil {\n\t\t\tif contents.stagedLayerExtraction.result != nil {\n\t\t\t\t// The layer is staged, just commit it and update the metadata.\n\t\t\t\tif err := contents.stagedLayerExtraction.commitLayer(r, layer.ID); err != nil {\n\t\t\t\t\tcleanupFailureContext = \"committing staged layer diff\"\n\t\t\t\t\treturn nil, -1, err\n\t\t\t\t}\n\t\t\t\tr.applyDiffResultToLayer(layer, contents.stagedLayerExtraction.result)\n\t\t\t} else {\n\t\t\t\t// The diff was not staged, apply it now here instead.\n\t\t\t\tif size, err = r.applyDiffWithOptions(layer.ID, moreOptions, contents.stagedLayerExtraction.diff); err != nil {\n\t\t\t\t\tcleanupFailureContext = \"applying layer diff\"\n\t\t\t\t\treturn nil, -1, err\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// staging logic for the chunked pull path\n\t\t\tif err := r.applyDiffFromStagingDirectory(layer.ID, contents.DiffOutput, contents.DiffOptions); err != nil {\n\t\t\t\tcleanupFailureContext = \"applying staged directory diff\"\n\t\t\t\treturn nil, -1, err\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// The layer creation content above would have updated r.bycompressedsum\n\t\t// and r.byuncompressedsum for us, but if we used a template\n\t\t// layer, we didn't call it, so add the new layer as candidates\n\t\t// for searches for layers by checksum\n\t\tif layer.CompressedDigest != \"\" {\n\t\t\tr.bycompressedsum[layer.CompressedDigest] = append(r.bycompressedsum[layer.CompressedDigest], layer.ID)\n\t\t}\n\t\tif layer.UncompressedDigest != \"\" {\n\t\t\tr.byuncompressedsum[layer.UncompressedDigest] = append(r.byuncompressedsum[layer.UncompressedDigest], layer.ID)\n\t\t}\n\t\tif layer.TOCDigest != \"\" {\n\t\t\tr.bytocsum[layer.TOCDigest] = append(r.bytocsum[layer.TOCDigest], layer.ID)\n\t\t}\n\t}\n\n\tdelete(layer.Flags, incompleteFlag)\n\tif err = r.saveFor(layer); err != nil {\n\t\tcleanupFailureContext = \"saving finished layer metadata\"\n\t\treturn nil, -1, err\n\t}\n\n\tlayer = copyLayer(layer)\n\treturn layer, size, err\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Mounted(id string) (int, error) {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn 0, fmt.Errorf(\"no mount information for layers at %q: %w\", r.mountspath(), ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn 0, ErrLayerUnknown\n\t}\n\t// NOTE: The caller of this function is not holding (currently cannot hold) r.mountsLockfile,\n\t// so the data is necessarily obsolete by the time this function returns. So, we don’t even\n\t// try to reload it in this function, we just rely on r.load() that happened during\n\t// r.startReading() or r.startWriting().\n\treturn layer.MountCount, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) Mount(id string, options drivers.MountOpts) (string, error) {\n\t// LOCKING BUG: This is reachable via store.Diff → layerStore.Diff → layerStore.newFileGetter\n\t// (with btrfs and zfs graph drivers) holding layerStore only locked for reading, while it modifies\n\t// - r.layers[].MountCount (directly and via loadMounts / saveMounts)\n\t// - r.layers[].MountPoint (directly and via loadMounts / saveMounts)\n\t// - r.bymount (via loadMounts / saveMounts)\n\n\t// You are not allowed to mount layers from readonly stores if they\n\t// are not mounted read/only.\n\tif !r.lockfile.IsReadWrite() && !slices.Contains(options.Options, \"ro\") {\n\t\treturn \"\", fmt.Errorf(\"not allowed to update mount locations for layers at %q: %w\", r.mountspath(), ErrStoreIsReadOnly)\n\t}\n\tr.mountsLockfile.Lock()\n\tdefer r.mountsLockfile.Unlock()\n\tif err := r.reloadMountsIfChanged(); err != nil {\n\t\treturn \"\", err\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn \"\", ErrLayerUnknown\n\t}\n\tif layer.MountCount > 0 {\n\t\tmounted, err := mount.Mounted(layer.MountPoint)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\t// If the container is not mounted then we have a condition\n\t\t// where the kernel umounted the mount point. This means\n\t\t// that the mount count never got decremented.\n\t\tif mounted {\n\t\t\tlayer.MountCount++\n\t\t\treturn layer.MountPoint, r.saveMounts()\n\t\t}\n\t}\n\tif options.MountLabel == \"\" {\n\t\toptions.MountLabel = layer.MountLabel\n\t}\n\n\tif (options.UidMaps != nil || options.GidMaps != nil) && !r.driver.SupportsShifting(options.UidMaps, options.GidMaps) {\n\t\tif !reflect.DeepEqual(options.UidMaps, layer.UIDMap) || !reflect.DeepEqual(options.GidMaps, layer.GIDMap) {\n\t\t\treturn \"\", fmt.Errorf(\"cannot mount layer %v: shifting not enabled\", layer.ID)\n\t\t}\n\t}\n\tmountpoint, err := r.driver.Get(id, options)\n\tif mountpoint != \"\" && err == nil {\n\t\tif layer.MountPoint != \"\" {\n\t\t\tdelete(r.bymount, layer.MountPoint)\n\t\t}\n\t\tlayer.MountPoint = filepath.Clean(mountpoint)\n\t\tlayer.MountCount++\n\t\tr.bymount[layer.MountPoint] = layer\n\t\terr = r.saveMounts()\n\t}\n\treturn mountpoint, err\n}\n\n// Requires startWriting.\nfunc (r *layerStore) unmount(id string, force bool, conditional bool) (bool, error) {\n\t// LOCKING BUG: This is reachable via store.Diff → layerStore.Diff → layerStore.newFileGetter → simpleGetCloser.Close()\n\t// (with btrfs and zfs graph drivers) holding layerStore only locked for reading, while it modifies\n\t// - r.layers[].MountCount (directly and via loadMounts / saveMounts)\n\t// - r.layers[].MountPoint (directly and via loadMounts / saveMounts)\n\t// - r.bymount (via loadMounts / saveMounts)\n\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn false, fmt.Errorf(\"not allowed to update mount locations for layers at %q: %w\", r.mountspath(), ErrStoreIsReadOnly)\n\t}\n\tr.mountsLockfile.Lock()\n\tdefer r.mountsLockfile.Unlock()\n\tif err := r.reloadMountsIfChanged(); err != nil {\n\t\treturn false, err\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\tlayerByMount, ok := r.bymount[filepath.Clean(id)]\n\t\tif !ok {\n\t\t\treturn false, ErrLayerUnknown\n\t\t}\n\t\tlayer = layerByMount\n\t}\n\tif conditional && layer.MountCount == 0 {\n\t\treturn false, ErrLayerNotMounted\n\t}\n\tif force {\n\t\tlayer.MountCount = 1\n\t}\n\tif layer.MountCount > 1 {\n\t\tlayer.MountCount--\n\t\treturn true, r.saveMounts()\n\t}\n\terr := r.driver.Put(id)\n\tif err == nil || os.IsNotExist(err) {\n\t\tif layer.MountPoint != \"\" {\n\t\t\tdelete(r.bymount, layer.MountPoint)\n\t\t}\n\t\tlayer.MountCount--\n\t\tlayer.MountPoint = \"\"\n\t\treturn false, r.saveMounts()\n\t}\n\treturn true, err\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) ParentOwners(id string) (uids, gids []int, err error) {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn nil, nil, fmt.Errorf(\"no mount information for layers at %q: %w\", r.mountspath(), ErrStoreIsReadOnly)\n\t}\n\tr.mountsLockfile.RLock()\n\tdefer r.mountsLockfile.Unlock()\n\t// We are not checking r.mountsLockfile.Modified() and calling r.loadMounts here because the store\n\t// is only locked for reading = we are not allowed to modify layer data.\n\t// Holding r.mountsLockfile protects us against concurrent mount/unmount operations.\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, nil, ErrLayerUnknown\n\t}\n\tif len(layer.UIDMap) == 0 && len(layer.GIDMap) == 0 {\n\t\t// We're not using any mappings, so there aren't any unmapped IDs on parent directories.\n\t\treturn nil, nil, nil\n\t}\n\tif layer.MountPoint == \"\" {\n\t\t// We don't know which directories to examine.\n\t\treturn nil, nil, ErrLayerNotMounted\n\t}\n\t// Holding r.mountsLockfile protects us against concurrent mount/unmount operations, but we didn’t\n\t// hold it continuously since the time we loaded the mount data; so it’s possible the layer\n\t// was unmounted in the meantime, or mounted elsewhere. Treat that as if we were run after the unmount,\n\t// = a missing mount, not a filesystem error.\n\tif _, err := system.Lstat(layer.MountPoint); errors.Is(err, os.ErrNotExist) {\n\t\treturn nil, nil, ErrLayerNotMounted\n\t}\n\trootuid, rootgid, err := idtools.GetRootUIDGID(layer.UIDMap, layer.GIDMap)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"reading root ID values for layer %q: %w\", layer.ID, err)\n\t}\n\tm := idtools.NewIDMappingsFromMaps(layer.UIDMap, layer.GIDMap)\n\tfsuids := make(map[int]struct{})\n\tfsgids := make(map[int]struct{})\n\tfor dir := filepath.Dir(layer.MountPoint); dir != \"\" && dir != string(os.PathSeparator); dir = filepath.Dir(dir) {\n\t\tst, err := system.Stat(dir)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"read directory ownership: %w\", err)\n\t\t}\n\t\tlst, err := system.Lstat(dir)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tfsuid := int(st.UID())\n\t\tfsgid := int(st.GID())\n\t\tif _, _, err := m.ToContainer(idtools.IDPair{UID: fsuid, GID: rootgid}); err != nil {\n\t\t\tfsuids[fsuid] = struct{}{}\n\t\t}\n\t\tif _, _, err := m.ToContainer(idtools.IDPair{UID: rootuid, GID: fsgid}); err != nil {\n\t\t\tfsgids[fsgid] = struct{}{}\n\t\t}\n\t\tfsuid = int(lst.UID())\n\t\tfsgid = int(lst.GID())\n\t\tif _, _, err := m.ToContainer(idtools.IDPair{UID: fsuid, GID: rootgid}); err != nil {\n\t\t\tfsuids[fsuid] = struct{}{}\n\t\t}\n\t\tif _, _, err := m.ToContainer(idtools.IDPair{UID: rootuid, GID: fsgid}); err != nil {\n\t\t\tfsgids[fsgid] = struct{}{}\n\t\t}\n\t}\n\tfor uid := range fsuids {\n\t\tuids = append(uids, uid)\n\t}\n\tfor gid := range fsgids {\n\t\tgids = append(gids, gid)\n\t}\n\tif len(uids) > 1 {\n\t\tsort.Ints(uids)\n\t}\n\tif len(gids) > 1 {\n\t\tsort.Ints(gids)\n\t}\n\treturn uids, gids, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) removeName(layer *Layer, name string) {\n\tlayer.Names = stringSliceWithoutValue(layer.Names, name)\n}\n\n// Requires startWriting.\nfunc (r *layerStore) updateNames(id string, names []string, op updateNameOperation) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to change layer name assignments at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrLayerUnknown\n\t}\n\toldNames := layer.Names\n\tnames, err := applyNameOperation(oldNames, names, op)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, name := range oldNames {\n\t\tdelete(r.byname, name)\n\t}\n\tfor _, name := range names {\n\t\tif otherLayer, ok := r.byname[name]; ok {\n\t\t\tr.removeName(otherLayer, name)\n\t\t}\n\t\tr.byname[name] = layer\n\t}\n\tlayer.Names = names\n\treturn r.saveFor(layer)\n}\n\nfunc (r *layerStore) datadir(id string) string {\n\treturn filepath.Join(r.layerdir, id)\n}\n\nfunc (r *layerStore) datapath(id, key string) string {\n\treturn filepath.Join(r.datadir(id), makeBigDataBaseName(key))\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) BigData(id, key string) (io.ReadCloser, error) {\n\tif key == \"\" {\n\t\treturn nil, fmt.Errorf(\"can't retrieve layer big data value for empty name: %w\", ErrInvalidBigDataName)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"locating layer with ID %q: %w\", id, ErrLayerUnknown)\n\t}\n\treturn os.Open(r.datapath(layer.ID, key))\n}\n\n// Requires startWriting.\nfunc (r *layerStore) SetBigData(id, key string, data io.Reader) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to save data items associated with layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn fmt.Errorf(\"locating layer with ID %q to write bigdata: %w\", id, ErrLayerUnknown)\n\t}\n\treturn r.setBigData(layer, key, data)\n}\n\nfunc (r *layerStore) setBigData(layer *Layer, key string, data io.Reader) error {\n\tif key == \"\" {\n\t\treturn fmt.Errorf(\"can't set empty name for layer big data item: %w\", ErrInvalidBigDataName)\n\t}\n\terr := os.MkdirAll(r.datadir(layer.ID), 0o700)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// NewAtomicFileWriter doesn't overwrite/truncate the existing inode.\n\t// BigData() relies on this behaviour when opening the file for read\n\t// so that it is either accessing the old data or the new one.\n\twriter, err := ioutils.NewAtomicFileWriter(r.datapath(layer.ID, key), 0o600)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"opening bigdata file: %w\", err)\n\t}\n\n\tif _, err := io.Copy(writer, data); err != nil {\n\t\twriter.Close()\n\t\treturn fmt.Errorf(\"copying bigdata for the layer: %w\", err)\n\n\t}\n\tif err := writer.Close(); err != nil {\n\t\treturn fmt.Errorf(\"closing bigdata file for the layer: %w\", err)\n\t}\n\n\tif !slices.Contains(layer.BigDataNames, key) {\n\t\tlayer.BigDataNames = append(layer.BigDataNames, key)\n\t\treturn r.saveFor(layer)\n\t}\n\treturn nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) BigDataNames(id string) ([]string, error) {\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"locating layer with ID %q to retrieve bigdata names: %w\", id, ErrImageUnknown)\n\t}\n\treturn copySlicePreferringNil(layer.BigDataNames), nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Metadata(id string) (string, error) {\n\tif layer, ok := r.lookup(id); ok {\n\t\treturn layer.Metadata, nil\n\t}\n\treturn \"\", ErrLayerUnknown\n}\n\n// Requires startWriting.\nfunc (r *layerStore) SetMetadata(id, metadata string) error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to modify layer metadata at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tif layer, ok := r.lookup(id); ok {\n\t\tlayer.Metadata = metadata\n\t\treturn r.saveFor(layer)\n\t}\n\treturn ErrLayerUnknown\n}\n\nfunc (r *layerStore) tspath(id string) string {\n\treturn filepath.Join(r.layerdir, id+tarSplitSuffix)\n}\n\n// layerHasIncompleteFlag returns true if layer.Flags contains an incompleteFlag set to true\n// The caller must hold r.inProcessLock for reading.\nfunc layerHasIncompleteFlag(layer *Layer) bool {\n\tif layer.Flags == nil {\n\t\treturn false\n\t}\n\tif flagValue, ok := layer.Flags[incompleteFlag]; ok {\n\t\tif b, ok := flagValue.(bool); ok && b {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// Requires startWriting.\n// Caller MUST run all returned cleanup functions after this, EVEN IF the function returns an error.\n// Ideally outside of the startWriting.\nfunc (r *layerStore) internalDelete(id string) ([]tempdir.CleanupTempDirFunc, error) {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn nil, fmt.Errorf(\"not allowed to delete layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\t// Ensure that if we are interrupted, the layer will be cleaned up.\n\tif !layerHasIncompleteFlag(layer) {\n\t\tif layer.Flags == nil {\n\t\t\tlayer.Flags = make(map[string]any)\n\t\t}\n\t\tlayer.Flags[incompleteFlag] = true\n\t\tif err := r.saveFor(layer); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// We never unset incompleteFlag; below, we remove the entire object from r.layers.\n\ttempDirectory, err := tempdir.NewTempDir(filepath.Join(r.layerdir, tempDirPath))\n\tcleanFunctions := []tempdir.CleanupTempDirFunc{}\n\tcleanFunctions = append(cleanFunctions, tempDirectory.Cleanup)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tid = layer.ID\n\tcleanFunc, err := r.driver.DeferredRemove(id)\n\tcleanFunctions = append(cleanFunctions, cleanFunc)\n\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn cleanFunctions, err\n\t}\n\n\tcleanFunctions = append(cleanFunctions, tempDirectory.Cleanup)\n\tif err := tempDirectory.StageDeletion(r.tspath(id)); err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn cleanFunctions, err\n\t}\n\tif err := tempDirectory.StageDeletion(r.datadir(id)); err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn cleanFunctions, err\n\t}\n\tdelete(r.byid, id)\n\tfor _, name := range layer.Names {\n\t\tdelete(r.byname, name)\n\t}\n\t// This can only fail if the ID is already missing, which shouldn’t\n\t// happen — and in that case the index is already in the desired state\n\t// anyway.  The store’s Delete method is used on various paths to\n\t// recover from failures, so this should be robust against partially\n\t// missing data.\n\t_ = r.idindex.Delete(id)\n\tmountLabel := layer.MountLabel\n\tif layer.MountPoint != \"\" {\n\t\tdelete(r.bymount, layer.MountPoint)\n\t}\n\tr.deleteInDigestMap(id)\n\tr.layers = slices.DeleteFunc(r.layers, func(candidate *Layer) bool {\n\t\treturn candidate.ID == id\n\t})\n\tif mountLabel != \"\" && !slices.ContainsFunc(r.layers, func(candidate *Layer) bool {\n\t\treturn candidate.MountLabel == mountLabel\n\t}) {\n\t\tselinux.ReleaseLabel(mountLabel)\n\t}\n\treturn cleanFunctions, nil\n}\n\n// Requires startWriting.\nfunc (r *layerStore) deleteInDigestMap(id string) {\n\tfor digest, layers := range r.bycompressedsum {\n\t\tif i := slices.Index(layers, id); i != -1 {\n\t\t\tlayers = slices.Delete(layers, i, i+1)\n\t\t\tr.bycompressedsum[digest] = layers\n\t\t}\n\t}\n\tfor digest, layers := range r.byuncompressedsum {\n\t\tif i := slices.Index(layers, id); i != -1 {\n\t\t\tlayers = slices.Delete(layers, i, i+1)\n\t\t\tr.byuncompressedsum[digest] = layers\n\t\t}\n\t}\n}\n\n// Requires startWriting.\n// This is soft-deprecated and should not have any new callers; use deferredDelete instead.\nfunc (r *layerStore) deleteWhileHoldingLock(id string) error {\n\tcleanupFunctions, deferErr := r.deferredDelete(id)\n\tcleanupErr := tempdir.CleanupTemporaryDirectories(cleanupFunctions...)\n\treturn errors.Join(deferErr, cleanupErr)\n}\n\n// Requires startWriting.\n// Caller MUST run all returned cleanup functions after this, EVEN IF the function returns an error.\n// Ideally outside of the startWriting.\nfunc (r *layerStore) deferredDelete(id string) ([]tempdir.CleanupTempDirFunc, error) {\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\tid = layer.ID\n\t// The layer may already have been explicitly unmounted, but if not, we\n\t// should try to clean that up before we start deleting anything at the\n\t// driver level.\n\tfor {\n\t\t_, err := r.unmount(id, false, true)\n\t\tif err == ErrLayerNotMounted {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tcleanFunctions, err := r.internalDelete(id)\n\tif err != nil {\n\t\treturn cleanFunctions, err\n\t}\n\treturn cleanFunctions, r.saveFor(layer)\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Exists(id string) bool {\n\t_, ok := r.lookup(id)\n\treturn ok\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) Get(id string) (*Layer, error) {\n\tif layer, ok := r.lookup(id); ok {\n\t\treturn copyLayer(layer), nil\n\t}\n\treturn nil, ErrLayerUnknown\n}\n\n// Requires startWriting.\nfunc (r *layerStore) Wipe() error {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn fmt.Errorf(\"not allowed to delete layers at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\tids := make([]string, 0, len(r.byid))\n\tfor id := range r.byid {\n\t\tids = append(ids, id)\n\t}\n\tslices.SortFunc(ids, func(a, b string) int {\n\t\treturn -r.byid[a].Created.Compare(r.byid[b].Created)\n\t})\n\tfor _, id := range ids {\n\t\tif err := r.deleteWhileHoldingLock(id); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tids, err := r.driver.ListLayers()\n\tif err != nil {\n\t\tif !errors.Is(err, drivers.ErrNotSupported) {\n\t\t\treturn err\n\t\t}\n\t\tids = nil\n\t}\n\tfor _, id := range ids {\n\t\tif err := r.driver.Remove(id); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) findParentAndLayer(from, to string) (fromID string, toID string, fromLayer, toLayer *Layer, err error) {\n\tvar ok bool\n\ttoLayer, ok = r.lookup(to)\n\tif !ok {\n\t\treturn \"\", \"\", nil, nil, ErrLayerUnknown\n\t}\n\tto = toLayer.ID\n\tif from == \"\" {\n\t\tfrom = toLayer.Parent\n\t}\n\tif from != \"\" {\n\t\tfromLayer, ok = r.lookup(from)\n\t\tif ok {\n\t\t\tfrom = fromLayer.ID\n\t\t} else {\n\t\t\tfromLayer, ok = r.lookup(toLayer.Parent)\n\t\t\tif ok {\n\t\t\t\tfrom = fromLayer.ID\n\t\t\t}\n\t\t}\n\t}\n\treturn from, to, fromLayer, toLayer, nil\n}\n\n// The caller must hold r.inProcessLock for reading.\nfunc (r *layerStore) layerMappings(layer *Layer) *idtools.IDMappings {\n\tif layer == nil {\n\t\treturn &idtools.IDMappings{}\n\t}\n\treturn idtools.NewIDMappingsFromMaps(layer.UIDMap, layer.GIDMap)\n}\n\n// Requires startReading or startWriting.\n//\n// NOTE: Overlay’s implementation assumes use of an exclusive lock over the primary layer store,\n// see drivers/overlay.Driver.getMergedDir.\nfunc (r *layerStore) Changes(from, to string) ([]archive.Change, error) {\n\tfrom, to, fromLayer, toLayer, err := r.findParentAndLayer(from, to)\n\tif err != nil {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\treturn r.driver.Changes(to, r.layerMappings(toLayer), from, r.layerMappings(fromLayer), toLayer.MountLabel)\n}\n\ntype simpleGetCloser struct {\n\tr    *layerStore\n\tpath string\n\tid   string\n}\n\nfunc (s *simpleGetCloser) Get(path string) (io.ReadCloser, error) {\n\treturn os.Open(filepath.Join(s.path, path))\n}\n\n// LOCKING BUG: See the comments in layerStore.Diff\nfunc (s *simpleGetCloser) Close() error {\n\t_, err := s.r.unmount(s.id, false, false)\n\treturn err\n}\n\n// LOCKING BUG: See the comments in layerStore.Diff\nfunc (r *layerStore) newFileGetter(id string) (drivers.FileGetCloser, error) {\n\tif getter, ok := r.driver.(drivers.DiffGetterDriver); ok {\n\t\tfgc, err := getter.DiffGetter(id)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif fgc != nil {\n\t\t\treturn fgc, nil\n\t\t}\n\t}\n\n\tpath, err := r.Mount(id, drivers.MountOpts{Options: []string{\"ro\"}})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &simpleGetCloser{\n\t\tr:    r,\n\t\tpath: path,\n\t\tid:   id,\n\t}, nil\n}\n\n// writeCompressedData copies data from source to compressor, which is on top of pwriter.\nfunc writeCompressedData(compressor io.WriteCloser, source io.ReadCloser) error {\n\tdefer compressor.Close()\n\tdefer source.Close()\n\t_, err := io.Copy(compressor, source)\n\treturn err\n}\n\n// writeCompressedDataGoroutine copies data from source to compressor, which is on top of pwriter.\n// All error must be reported by updating pwriter.\nfunc writeCompressedDataGoroutine(pwriter *io.PipeWriter, compressor io.WriteCloser, source io.ReadCloser) {\n\terr := errors.New(\"internal error: unexpected panic in writeCompressedDataGoroutine\")\n\tdefer func() { // Note that this is not the same as {defer dest.CloseWithError(err)}; we need err to be evaluated lazily.\n\t\t_ = pwriter.CloseWithError(err) // CloseWithError(nil) is equivalent to Close(), always returns nil\n\t}()\n\terr = writeCompressedData(compressor, source)\n}\n\n// Requires startReading or startWriting.\n//\n// NOTE: Overlay’s implementation assumes use of an exclusive lock over the primary layer store,\n// see drivers/overlay.Driver.getMergedDir.\nfunc (r *layerStore) Diff(from, to string, options *DiffOptions) (io.ReadCloser, error) {\n\tvar metadata storage.Unpacker\n\n\tfrom, to, fromLayer, toLayer, err := r.findParentAndLayer(from, to)\n\tif err != nil {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\t// Default to applying the type of compression that we noted was used\n\t// for the layerdiff when it was applied.\n\tcompression := toLayer.CompressionType\n\t// If a particular compression type (or no compression) was selected,\n\t// use that instead.\n\tif options != nil && options.Compression != nil {\n\t\tcompression = *options.Compression\n\t}\n\tmaybeCompressReadCloser := func(rc io.ReadCloser) (io.ReadCloser, error) {\n\t\t// Depending on whether or not compression is desired, return either the\n\t\t// passed-in ReadCloser, or a new one that provides its readers with a\n\t\t// compressed version of the data that the original would have provided\n\t\t// to its readers.\n\t\tif compression == archive.Uncompressed {\n\t\t\treturn rc, nil\n\t\t}\n\t\tpreader, pwriter := io.Pipe()\n\t\tcompressor, err := archive.CompressStream(pwriter, compression)\n\t\tif err != nil {\n\t\t\trc.Close()\n\t\t\tpwriter.Close()\n\t\t\tpreader.Close()\n\t\t\treturn nil, err\n\t\t}\n\t\tgo writeCompressedDataGoroutine(pwriter, compressor, rc)\n\t\treturn preader, nil\n\t}\n\n\tif from != toLayer.Parent {\n\t\tdiff, err := r.driver.Diff(to, r.layerMappings(toLayer), from, r.layerMappings(fromLayer), toLayer.MountLabel)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn maybeCompressReadCloser(diff)\n\t}\n\n\tif ad, ok := r.driver.(drivers.AdditionalLayerStoreDriver); ok {\n\t\tif aLayer, err := ad.LookupAdditionalLayerByID(to); err == nil {\n\t\t\t// This is an additional layer. We leverage blob API for acquiring the reproduced raw blob.\n\t\t\tinfo, err := aLayer.Info()\n\t\t\tif err != nil {\n\t\t\t\taLayer.Release()\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdefer info.Close()\n\t\t\tlayer := &Layer{}\n\t\t\tif err := json.NewDecoder(info).Decode(layer); err != nil {\n\t\t\t\taLayer.Release()\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tblob, err := aLayer.Blob()\n\t\t\tif err != nil {\n\t\t\t\taLayer.Release()\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\t// If layer compression type is different from the expected one, decompress and convert it.\n\t\t\tif compression != layer.CompressionType {\n\t\t\t\tdiff, err := archive.DecompressStream(blob)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif err2 := blob.Close(); err2 != nil {\n\t\t\t\t\t\terr = fmt.Errorf(\"failed to close blob file: %v: %w\", err2, err)\n\t\t\t\t\t}\n\t\t\t\t\taLayer.Release()\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\trc, err := maybeCompressReadCloser(diff)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif err2 := closeAll(blob.Close, diff.Close); err2 != nil {\n\t\t\t\t\t\terr = fmt.Errorf(\"failed to cleanup: %v: %w\", err2, err)\n\t\t\t\t\t}\n\t\t\t\t\taLayer.Release()\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn ioutils.NewReadCloserWrapper(rc, func() error {\n\t\t\t\t\tdefer aLayer.Release()\n\t\t\t\t\treturn closeAll(blob.Close, rc.Close)\n\t\t\t\t}), nil\n\t\t\t}\n\t\t\treturn ioutils.NewReadCloserWrapper(blob, func() error { defer aLayer.Release(); return blob.Close() }), nil\n\t\t}\n\t}\n\n\ttsfile, err := os.Open(r.tspath(to))\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, err\n\t\t}\n\t\tdiff, err := r.driver.Diff(to, r.layerMappings(toLayer), from, r.layerMappings(fromLayer), toLayer.MountLabel)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn maybeCompressReadCloser(diff)\n\t}\n\n\tdecompressor, err := pgzip.NewReader(tsfile)\n\tif err != nil {\n\t\tif e := tsfile.Close(); e != nil {\n\t\t\tlogrus.Debug(e)\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tmetadata = storage.NewJSONUnpacker(decompressor)\n\n\t// LOCKING BUG: With btrfs and zfs graph drivers), this uses r.Mount() and r.unmount() holding layerStore only locked for reading\n\t// but they modify in-memory state.\n\tfgetter, err := r.newFileGetter(to)\n\tif err != nil {\n\t\terrs := fmt.Errorf(\"creating file-getter: %w\", err)\n\t\tif err := decompressor.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing decompressor: %w\", err))\n\t\t}\n\t\tif err := tsfile.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing tarstream headers: %w\", err))\n\t\t}\n\t\treturn nil, errs\n\t}\n\n\ttarstream := asm.NewOutputTarStream(fgetter, metadata)\n\trc := ioutils.NewReadCloserWrapper(tarstream, func() error {\n\t\tvar errs error\n\t\tif err := decompressor.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing decompressor: %w\", err))\n\t\t}\n\t\tif err := tsfile.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing tarstream headers: %w\", err))\n\t\t}\n\t\tif err := tarstream.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing reconstructed tarstream: %w\", err))\n\t\t}\n\t\tif err := fgetter.Close(); err != nil {\n\t\t\terrs = errors.Join(errs, fmt.Errorf(\"closing file-getter: %w\", err))\n\t\t}\n\t\tif errs != nil {\n\t\t\treturn errs\n\t\t}\n\t\treturn nil\n\t})\n\treturn maybeCompressReadCloser(rc)\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) DiffSize(from, to string) (size int64, err error) {\n\tvar fromLayer, toLayer *Layer\n\tfrom, to, fromLayer, toLayer, err = r.findParentAndLayer(from, to)\n\tif err != nil {\n\t\treturn -1, ErrLayerUnknown\n\t}\n\treturn r.driver.DiffSize(to, r.layerMappings(toLayer), from, r.layerMappings(fromLayer), toLayer.MountLabel)\n}\n\nfunc updateDigestMap(m *map[digest.Digest][]string, oldvalue, newvalue digest.Digest, id string) {\n\tvar newList []string\n\tif oldvalue != \"\" {\n\t\tfor _, value := range (*m)[oldvalue] {\n\t\t\tif value != id {\n\t\t\t\tnewList = append(newList, value)\n\t\t\t}\n\t\t}\n\t\tif len(newList) > 0 {\n\t\t\t(*m)[oldvalue] = newList\n\t\t} else {\n\t\t\tdelete(*m, oldvalue)\n\t\t}\n\t}\n\tif newvalue != \"\" {\n\t\t(*m)[newvalue] = append((*m)[newvalue], id)\n\t}\n}\n\n// Requires startWriting.\nfunc (r *layerStore) ApplyDiff(to string, diff io.Reader) (size int64, err error) {\n\treturn r.applyDiffWithOptions(to, nil, diff)\n}\n\nfunc createTarSplitFile(r *layerStore, layerID string) (*os.File, error) {\n\tif err := os.MkdirAll(filepath.Dir(r.tspath(layerID)), 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\treturn os.OpenFile(r.tspath(layerID), os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)\n}\n\n// newMaybeStagedLayerExtraction initializes a new maybeStagedLayerExtraction. The caller\n// must call maybeStagedLayerExtraction.cleanup() to remove any temporary files.\nfunc (r *layerStore) newMaybeStagedLayerExtraction(diff io.Reader) *maybeStagedLayerExtraction {\n\tm := &maybeStagedLayerExtraction{\n\t\tdiff: diff,\n\t}\n\tif d, ok := r.driver.(drivers.ApplyDiffStaging); ok {\n\t\tm.staging = d\n\t}\n\treturn m\n}\n\nfunc (sl *maybeStagedLayerExtraction) cleanup() error {\n\treturn tempdir.CleanupTemporaryDirectories(sl.cleanupFuncs...)\n}\n\n// stageWithUnlockedStore stages the layer content without needing the store locked.\n// If the driver does not support stage addition then this is a NOP and does nothing.\n// This should be done without holding the storage lock, if a parent is given the caller\n// must check for existence beforehand while holding a lock.\nfunc (r *layerStore) stageWithUnlockedStore(sl *maybeStagedLayerExtraction, parent string, layerOptions *LayerOptions) (retErr error) {\n\tif sl.staging == nil {\n\t\treturn nil\n\t}\n\ttd, err := tempdir.NewTempDir(filepath.Join(r.layerdir, tempDirPath))\n\tif err != nil {\n\t\treturn err\n\t}\n\tsl.cleanupFuncs = append(sl.cleanupFuncs, td.Cleanup)\n\n\tstagedTarSplit, err := td.StageAddition()\n\tif err != nil {\n\t\treturn err\n\t}\n\tsl.stagedTarSplit = stagedTarSplit\n\n\tf, err := os.OpenFile(stagedTarSplit.Path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// make sure to check for errors on close and return that one.\n\tdefer func() {\n\t\tcloseErr := f.Close()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\tresult, err := applyDiff(layerOptions, sl.diff, f, func(payload io.Reader) (int64, error) {\n\t\tcleanup, stagedLayer, size, err := sl.staging.StartStagingDiffToApply(parent, drivers.ApplyDiffOpts{\n\t\t\tDiff:     payload,\n\t\t\tMappings: idtools.NewIDMappingsFromMaps(layerOptions.UIDMap, layerOptions.GIDMap),\n\t\t\t// MountLabel is not supported for the unlocked extraction, see the comment in (*store).PutLayer()\n\t\t\tMountLabel: \"\",\n\t\t})\n\t\tsl.cleanupFuncs = append(sl.cleanupFuncs, cleanup)\n\t\tsl.stagedLayer = stagedLayer\n\t\treturn size, err\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := f.Sync(); err != nil {\n\t\treturn fmt.Errorf(\"sync staged tar-split file: %w\", err)\n\t}\n\n\tsl.result = result\n\treturn nil\n}\n\n// commitLayer() commits the content that was staged in stageWithUnlockedStore()\n//\n// Requires startWriting.\nfunc (sl *maybeStagedLayerExtraction) commitLayer(r *layerStore, layerID string) error {\n\terr := sl.stagedTarSplit.Commit(r.tspath(layerID))\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn sl.staging.CommitStagedLayer(layerID, sl.stagedLayer)\n}\n\n// applyDiff can be called without holding any store locks so if the supplied\n// applyDriverFunc requires locking the caller must ensure proper locking.\nfunc applyDiff(layerOptions *LayerOptions, diff io.Reader, tarSplitFile *os.File, applyDriverFunc func(io.Reader) (int64, error)) (*applyDiffResult, error) {\n\theader := make([]byte, 10240)\n\tn, err := diff.Read(header)\n\tif err != nil && err != io.EOF {\n\t\treturn nil, err\n\t}\n\tcompression := archive.DetectCompression(header[:n])\n\tdefragmented := io.MultiReader(bytes.NewReader(header[:n]), diff)\n\n\tresult := applyDiffResult{}\n\n\tvar compressedDigester, uncompressedDigester digest.Digester // = nil\n\tif layerOptions != nil && layerOptions.OriginalDigest != \"\" &&\n\t\tlayerOptions.OriginalDigest.Algorithm() == digest.Canonical {\n\t\tresult.compressedDigest = layerOptions.OriginalDigest\n\t} else {\n\t\tcompressedDigester = digest.Canonical.Digester()\n\t}\n\tif layerOptions != nil && layerOptions.UncompressedDigest != \"\" &&\n\t\tlayerOptions.UncompressedDigest.Algorithm() == digest.Canonical {\n\t\tresult.uncompressedDigest = layerOptions.UncompressedDigest\n\t} else if compression != archive.Uncompressed {\n\t\tuncompressedDigester = digest.Canonical.Digester()\n\t}\n\n\tvar compressedWriter io.Writer\n\tif compressedDigester != nil {\n\t\tcompressedWriter = compressedDigester.Hash()\n\t} else {\n\t\tcompressedWriter = io.Discard\n\t}\n\tcompressedCounter := ioutils.NewWriteCounter(compressedWriter)\n\tdefragmented = io.TeeReader(defragmented, compressedCounter)\n\n\ttarSplitWriter := pools.BufioWriter32KPool.Get(tarSplitFile)\n\tdefer pools.BufioWriter32KPool.Put(tarSplitWriter)\n\n\tuidLog := make(map[uint32]struct{})\n\tgidLog := make(map[uint32]struct{})\n\tvar uncompressedCounter *ioutils.WriteCounter\n\n\tsize, err := func() (int64, error) { // A scope for defer\n\t\tcompressor, err := pgzip.NewWriterLevel(tarSplitWriter, pgzip.BestSpeed)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer compressor.Close()                                        // This must happen before tsdata is consumed.\n\t\tif err := compressor.SetConcurrency(1024*1024, 1); err != nil { // 1024*1024 is the hard-coded default; we're not changing that\n\t\t\tlogrus.Infof(\"setting compression concurrency threads to 1: %v; ignoring\", err)\n\t\t}\n\t\tmetadata := storage.NewJSONPacker(compressor)\n\t\tuncompressed, err := archive.DecompressStream(defragmented)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer uncompressed.Close()\n\t\tidLogger, err := tarlog.NewLogger(func(h *tar.Header) {\n\t\t\tif !strings.HasPrefix(path.Base(h.Name), archive.WhiteoutPrefix) {\n\t\t\t\tuidLog[uint32(h.Uid)] = struct{}{}\n\t\t\t\tgidLog[uint32(h.Gid)] = struct{}{}\n\t\t\t}\n\t\t})\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer idLogger.Close() // This must happen before uidLog and gidLog is consumed.\n\t\tuncompressedCounter = ioutils.NewWriteCounter(idLogger)\n\t\tuncompressedWriter := (io.Writer)(uncompressedCounter)\n\t\tif uncompressedDigester != nil {\n\t\t\tuncompressedWriter = io.MultiWriter(uncompressedWriter, uncompressedDigester.Hash())\n\t\t}\n\t\tpayload, err := asm.NewInputTarStream(io.TeeReader(uncompressed, uncompressedWriter), metadata, storage.NewDiscardFilePutter())\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\n\t\tsize, err := applyDriverFunc(payload)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\t// Fully consume the payload; it may contain trailing zero padding, and we need all of that\n\t\t// recorded in tar-split (which happens when the data passes through NewInputTarStream).\n\t\tif _, err := io.Copy(io.Discard, payload); err != nil {\n\t\t\treturn -1, err\n\t\t}\n\n\t\treturn size, nil\n\t}()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := tarSplitWriter.Flush(); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to flush tar-split writer buffer: %w\", err)\n\t}\n\n\tif compressedDigester != nil {\n\t\tresult.compressedDigest = compressedDigester.Digest()\n\t}\n\tif uncompressedDigester != nil {\n\t\tresult.uncompressedDigest = uncompressedDigester.Digest()\n\t}\n\tif result.uncompressedDigest == \"\" && compression == archive.Uncompressed {\n\t\tresult.uncompressedDigest = result.compressedDigest\n\t}\n\n\tif layerOptions != nil && layerOptions.OriginalDigest != \"\" && layerOptions.OriginalSize != nil {\n\t\tresult.compressedSize = *layerOptions.OriginalSize\n\t} else {\n\t\tresult.compressedSize = compressedCounter.Count\n\t}\n\tresult.uncompressedSize = uncompressedCounter.Count\n\tresult.compressionType = compression\n\n\tresult.uids = make([]uint32, 0, len(uidLog))\n\tfor uid := range uidLog {\n\t\tresult.uids = append(result.uids, uid)\n\t}\n\tslices.Sort(result.uids)\n\tresult.gids = make([]uint32, 0, len(gidLog))\n\tfor gid := range gidLog {\n\t\tresult.gids = append(result.gids, gid)\n\t}\n\tslices.Sort(result.gids)\n\n\tresult.size = size\n\n\treturn &result, err\n}\n\n// Requires startWriting.\nfunc (r *layerStore) applyDiffWithOptions(to string, layerOptions *LayerOptions, diff io.Reader) (_ int64, retErr error) {\n\tif !r.lockfile.IsReadWrite() {\n\t\treturn -1, fmt.Errorf(\"not allowed to modify layer contents at %q: %w\", r.layerdir, ErrStoreIsReadOnly)\n\t}\n\n\tlayer, ok := r.lookup(to)\n\tif !ok {\n\t\treturn -1, ErrLayerUnknown\n\t}\n\n\ttarSplitFile, err := createTarSplitFile(r, layer.ID)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\t// make sure to check for errors on close and return that one.\n\tdefer func() {\n\t\tcloseErr := tarSplitFile.Close()\n\t\tif retErr == nil {\n\t\t\tretErr = closeErr\n\t\t}\n\t}()\n\n\tresult, err := applyDiff(layerOptions, diff, tarSplitFile, func(payload io.Reader) (int64, error) {\n\t\toptions := drivers.ApplyDiffOpts{\n\t\t\tDiff:       payload,\n\t\t\tMappings:   r.layerMappings(layer),\n\t\t\tMountLabel: layer.MountLabel,\n\t\t}\n\t\treturn r.driver.ApplyDiff(layer.ID, options)\n\t})\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\tif err := tarSplitFile.Sync(); err != nil {\n\t\treturn -1, fmt.Errorf(\"sync tar-split file: %w\", err)\n\t}\n\n\tr.applyDiffResultToLayer(layer, result)\n\n\terr = r.saveFor(layer)\n\n\treturn result.size, err\n}\n\n// Requires startWriting.\nfunc (r *layerStore) applyDiffResultToLayer(layer *Layer, result *applyDiffResult) {\n\tupdateDigestMap(&r.bycompressedsum, layer.CompressedDigest, result.compressedDigest, layer.ID)\n\tlayer.CompressedDigest = result.compressedDigest\n\tlayer.CompressedSize = result.compressedSize\n\tupdateDigestMap(&r.byuncompressedsum, layer.UncompressedDigest, result.uncompressedDigest, layer.ID)\n\tlayer.UncompressedDigest = result.uncompressedDigest\n\tlayer.UncompressedSize = result.uncompressedSize\n\tlayer.CompressionType = result.compressionType\n\tlayer.UIDs = result.uids\n\tlayer.GIDs = result.gids\n}\n\n// Requires (startReading or?) startWriting.\nfunc (r *layerStore) DifferTarget(id string) (string, error) {\n\tddriver, ok := r.driver.(drivers.DriverWithDiffer)\n\tif !ok {\n\t\treturn \"\", ErrNotSupported\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn \"\", ErrLayerUnknown\n\t}\n\treturn ddriver.DifferTarget(layer.ID)\n}\n\n// Requires startWriting.\nfunc (r *layerStore) applyDiffFromStagingDirectory(id string, diffOutput *drivers.DriverWithDifferOutput, options *drivers.ApplyDiffWithDifferOpts) (retErr error) {\n\tddriver, ok := r.driver.(drivers.DriverWithDiffer)\n\tif !ok {\n\t\treturn ErrNotSupported\n\t}\n\tlayer, ok := r.lookup(id)\n\tif !ok {\n\t\treturn ErrLayerUnknown\n\t}\n\tif options == nil {\n\t\toptions = &drivers.ApplyDiffWithDifferOpts{\n\t\t\tApplyDiffOpts: drivers.ApplyDiffOpts{\n\t\t\t\tMappings:   r.layerMappings(layer),\n\t\t\t\tMountLabel: layer.MountLabel,\n\t\t\t},\n\t\t\tFlags: nil,\n\t\t}\n\t}\n\n\terr := ddriver.ApplyDiffFromStagingDirectory(layer.ID, layer.Parent, diffOutput, options)\n\tif err != nil {\n\t\treturn err\n\t}\n\tlayer.UIDs = diffOutput.UIDs\n\tlayer.GIDs = diffOutput.GIDs\n\tupdateDigestMap(&r.byuncompressedsum, layer.UncompressedDigest, diffOutput.UncompressedDigest, layer.ID)\n\tlayer.UncompressedDigest = diffOutput.UncompressedDigest\n\tupdateDigestMap(&r.bycompressedsum, layer.CompressedDigest, diffOutput.CompressedDigest, layer.ID)\n\tlayer.CompressedDigest = diffOutput.CompressedDigest\n\tupdateDigestMap(&r.bytocsum, layer.TOCDigest, diffOutput.TOCDigest, layer.ID)\n\tlayer.TOCDigest = diffOutput.TOCDigest\n\tlayer.UncompressedSize = diffOutput.Size\n\tlayer.Metadata = diffOutput.Metadata\n\tif options != nil && options.Flags != nil {\n\t\tif layer.Flags == nil {\n\t\t\tlayer.Flags = make(map[string]any)\n\t\t}\n\t\tmaps.Copy(layer.Flags, options.Flags)\n\t}\n\tif err = r.saveFor(layer); err != nil {\n\t\treturn err\n\t}\n\n\tif diffOutput.TarSplit != nil {\n\t\ttarSplitFile, err := createTarSplitFile(r, layer.ID)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// make sure to check for errors on close and return that one.\n\t\tdefer func() {\n\t\t\tcloseErr := tarSplitFile.Close()\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = closeErr\n\t\t\t}\n\t\t}()\n\t\ttarSplitWriter := pools.BufioWriter32KPool.Get(tarSplitFile)\n\t\tdefer pools.BufioWriter32KPool.Put(tarSplitWriter)\n\n\t\tcompressor, err := pgzip.NewWriterLevel(tarSplitWriter, pgzip.BestSpeed)\n\t\tif err != nil {\n\t\t\tcompressor = pgzip.NewWriter(tarSplitWriter)\n\t\t}\n\t\tif _, err := diffOutput.TarSplit.Seek(0, io.SeekStart); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := compressor.SetConcurrency(1024*1024, 1); err != nil { // 1024*1024 is the hard-coded default; we're not changing that\n\t\t\tlogrus.Infof(\"setting compression concurrency threads to 1: %v; ignoring\", err)\n\t\t}\n\t\tif _, err := diffOutput.TarSplit.WriteTo(compressor); err != nil {\n\t\t\tcompressor.Close()\n\t\t\treturn err\n\t\t}\n\t\tcompressor.Close()\n\n\t\tif err := tarSplitWriter.Flush(); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to flush tar-split writer buffer: %w\", err)\n\t\t}\n\t\tif err := tarSplitFile.Sync(); err != nil {\n\t\t\treturn fmt.Errorf(\"sync tar-split file: %w\", err)\n\t\t}\n\t}\n\tfor k, v := range diffOutput.BigData {\n\t\tif err := r.SetBigData(id, k, bytes.NewReader(v)); err != nil {\n\t\t\tif err2 := r.deleteWhileHoldingLock(id); err2 != nil {\n\t\t\t\tlogrus.Errorf(\"While recovering from a failure to set big data, error deleting layer %#v: %v\", id, err2)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\treturn err\n}\n\n// It must be called without any c/storage locks held to allow differ to make c/storage calls.\nfunc (r *layerStore) applyDiffWithDifferNoLock(options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error) {\n\tddriver, ok := r.driver.(drivers.DriverWithDiffer)\n\tif !ok {\n\t\treturn nil, ErrNotSupported\n\t}\n\n\toutput, err := ddriver.ApplyDiffWithDiffer(options, differ)\n\treturn &output, err\n}\n\nfunc (r *layerStore) CleanupStagingDirectory(stagingDirectory string) error {\n\tddriver, ok := r.driver.(drivers.DriverWithDiffer)\n\tif !ok {\n\t\treturn ErrNotSupported\n\t}\n\treturn ddriver.CleanupStagingDirectory(stagingDirectory)\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) layersByDigestMap(m map[digest.Digest][]string, d digest.Digest) ([]Layer, error) {\n\tvar layers []Layer\n\tfor _, layerID := range m[d] {\n\t\tlayer, ok := r.lookup(layerID)\n\t\tif !ok {\n\t\t\treturn nil, ErrLayerUnknown\n\t\t}\n\t\tlayers = append(layers, *copyLayer(layer))\n\t}\n\treturn layers, nil\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) LayersByCompressedDigest(d digest.Digest) ([]Layer, error) {\n\treturn r.layersByDigestMap(r.bycompressedsum, d)\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) LayersByUncompressedDigest(d digest.Digest) ([]Layer, error) {\n\treturn r.layersByDigestMap(r.byuncompressedsum, d)\n}\n\n// Requires startReading or startWriting.\nfunc (r *layerStore) LayersByTOCDigest(d digest.Digest) ([]Layer, error) {\n\treturn r.layersByDigestMap(r.bytocsum, d)\n}\n\n// Requires startWriting.\nfunc (r *layerStore) dedup(req drivers.DedupArgs) (drivers.DedupResult, error) {\n\treturn r.driver.Dedup(req)\n}\n\nfunc closeAll(closes ...func() error) (rErr error) {\n\tfor _, f := range closes {\n\t\tif err := f(); err != nil {\n\t\t\tif rErr == nil {\n\t\t\t\trErr = fmt.Errorf(\"close error: %w\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\trErr = fmt.Errorf(\"%v: %w\", err, rErr)\n\t\t}\n\t}\n\treturn rErr\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/lockfile_compat.go",
    "content": "package storage\n\nimport (\n\t\"go.podman.io/storage/pkg/lockfile\"\n)\n\n// Deprecated: Use lockfile.*LockFile.\ntype Locker = lockfile.Locker //nolint:staticcheck // SA1019 lockfile.Locker is deprecated\n\n// Deprecated: Use lockfile.GetLockFile.\nfunc GetLockfile(path string) (lockfile.Locker, error) {\n\treturn lockfile.GetLockfile(path)\n}\n\n// Deprecated: Use lockfile.GetROLockFile.\nfunc GetROLockfile(path string) (lockfile.Locker, error) {\n\treturn lockfile.GetROLockfile(path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/README.md",
    "content": "This code provides helper functions for dealing with archive files.\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"bufio\"\n\t\"bytes\"\n\t\"compress/bzip2\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n\n\tgzip \"github.com/klauspost/pgzip\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/ulikunitz/xz\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/pools\"\n\t\"go.podman.io/storage/pkg/promise\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\ntype (\n\t// Compression is the state represents if compressed or not.\n\tCompression int\n\t// WhiteoutFormat is the format of whiteouts unpacked\n\tWhiteoutFormat int\n\n\t// TarOptions wraps the tar options.\n\tTarOptions struct {\n\t\tIncludeFiles      []string\n\t\tExcludePatterns   []string\n\t\tCompression       Compression\n\t\tNoLchown          bool\n\t\tUIDMaps           []idtools.IDMap\n\t\tGIDMaps           []idtools.IDMap\n\t\tIgnoreChownErrors bool\n\t\tChownOpts         *idtools.IDPair\n\t\tIncludeSourceDir  bool\n\t\t// WhiteoutFormat is the expected on disk format for whiteout files.\n\t\t// This format will be converted to the standard format on pack\n\t\t// and from the standard format on unpack.\n\t\tWhiteoutFormat WhiteoutFormat\n\t\t// This is additional data to be used by the converter.  It will\n\t\t// not survive a round trip through JSON, so it's primarily\n\t\t// intended for generating archives (i.e., converting writes).\n\t\tWhiteoutData any\n\t\t// When unpacking, specifies whether overwriting a directory with a\n\t\t// non-directory is allowed and vice versa.\n\t\tNoOverwriteDirNonDir bool\n\t\t// For each include when creating an archive, the included name will be\n\t\t// replaced with the matching name from this map.\n\t\tRebaseNames map[string]string\n\t\tInUserNS    bool\n\t\t// CopyPass indicates that the contents of any archive we're creating\n\t\t// will instantly be extracted and written to disk, so we can deviate\n\t\t// from the traditional behavior/format to get features like subsecond\n\t\t// precision in timestamps.\n\t\tCopyPass bool\n\t\t// ForceMask, if set, indicates the permission mask used for created files.\n\t\tForceMask *os.FileMode\n\t\t// Timestamp, if set, will be set in each header as create/mod/access time\n\t\tTimestamp *time.Time\n\t}\n)\n\nconst PaxSchilyXattr = \"SCHILY.xattr.\"\n\nconst (\n\ttarExt  = \"tar\"\n\twindows = \"windows\"\n\tdarwin  = \"darwin\"\n)\n\nvar xattrsToIgnore = map[string]any{\n\t\"security.selinux\": true,\n}\n\n// Archiver allows the reuse of most utility functions of this package with a\n// pluggable Untar function.  To facilitate the passing of specific id mappings\n// for untar, an archiver can be created with maps which will then be passed to\n// Untar operations.  If ChownOpts is set, its values are mapped using\n// UntarIDMappings before being used to create files and directories on disk.\ntype Archiver struct {\n\tUntar           func(io.Reader, string, *TarOptions) error\n\tTarIDMappings   *idtools.IDMappings\n\tChownOpts       *idtools.IDPair\n\tUntarIDMappings *idtools.IDMappings\n}\n\n// NewDefaultArchiver returns a new Archiver without any IDMappings\nfunc NewDefaultArchiver() *Archiver {\n\treturn &Archiver{Untar: Untar, TarIDMappings: &idtools.IDMappings{}, UntarIDMappings: &idtools.IDMappings{}}\n}\n\n// breakoutError is used to differentiate errors related to breaking out\n// When testing archive breakout in the unit tests, this error is expected\n// in order for the test to pass.\ntype breakoutError error\n\n// overwriteError is used to differentiate errors related to attempting to\n// overwrite a directory with a non-directory or vice-versa.  When testing\n// copying a file over a directory, this error is expected in order for the\n// test to pass.\ntype overwriteError error\n\nconst (\n\t// Uncompressed represents the uncompressed.\n\tUncompressed Compression = iota\n\t// Bzip2 is bzip2 compression algorithm.\n\tBzip2\n\t// Gzip is gzip compression algorithm.\n\tGzip\n\t// Xz is xz compression algorithm.\n\tXz\n\t// Zstd is zstd compression algorithm.\n\tZstd\n)\n\nconst (\n\t// AUFSWhiteoutFormat is the default format for whiteouts\n\tAUFSWhiteoutFormat WhiteoutFormat = iota\n\t// OverlayWhiteoutFormat formats whiteout according to the overlay\n\t// standard.\n\tOverlayWhiteoutFormat\n)\n\n// IsArchivePath checks if the (possibly compressed) file at the given path\n// starts with a tar file header.\nfunc IsArchivePath(path string) bool {\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\treturn false\n\t}\n\tdefer file.Close()\n\trdr, err := DecompressStream(file)\n\tif err != nil {\n\t\treturn false\n\t}\n\tdefer rdr.Close()\n\tr := tar.NewReader(rdr)\n\t_, err = r.Next()\n\treturn err == nil\n}\n\n// DetectCompression detects the compression algorithm of the source.\nfunc DetectCompression(source []byte) Compression {\n\tfor compression, m := range map[Compression][]byte{\n\t\tBzip2: {0x42, 0x5A, 0x68},\n\t\tGzip:  {0x1F, 0x8B, 0x08},\n\t\tXz:    {0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00},\n\t\tZstd:  {0x28, 0xb5, 0x2f, 0xfd},\n\t} {\n\t\tif len(source) < len(m) {\n\t\t\tlogrus.Debug(\"Len too short\")\n\t\t\tcontinue\n\t\t}\n\t\tif bytes.Equal(m, source[:len(m)]) {\n\t\t\treturn compression\n\t\t}\n\t}\n\treturn Uncompressed\n}\n\n// DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive.\nfunc DecompressStream(archive io.Reader) (_ io.ReadCloser, Err error) {\n\tp := pools.BufioReader32KPool\n\tbuf := p.Get(archive)\n\tbs, err := buf.Peek(10)\n\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\t// In the normal case, the buffer is embedded in the ReadCloser return.\n\t\t\tp.Put(buf)\n\t\t}\n\t}()\n\n\tif err != nil && err != io.EOF {\n\t\t// Note: we'll ignore any io.EOF error because there are some odd\n\t\t// cases where the layer.tar file will be empty (zero bytes) and\n\t\t// that results in an io.EOF from the Peek() call. So, in those\n\t\t// cases we'll just treat it as a non-compressed stream and\n\t\t// that means just create an empty layer.\n\t\t// See Issue 18170\n\t\treturn nil, err\n\t}\n\n\tcompression := DetectCompression(bs)\n\tswitch compression {\n\tcase Uncompressed:\n\t\treadBufWrapper := p.NewReadCloserWrapper(buf, buf)\n\t\treturn readBufWrapper, nil\n\tcase Gzip:\n\t\tcleanup := func() {\n\t\t\tp.Put(buf)\n\t\t}\n\t\tif rc, canUse := tryProcFilter([]string{\"pigz\", \"-d\"}, buf, cleanup); canUse {\n\t\t\treturn rc, nil\n\t\t}\n\t\tgzReader, err := gzip.NewReader(buf)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treadBufWrapper := p.NewReadCloserWrapper(buf, gzReader)\n\t\treturn readBufWrapper, nil\n\tcase Bzip2:\n\t\tbz2Reader := bzip2.NewReader(buf)\n\t\treadBufWrapper := p.NewReadCloserWrapper(buf, bz2Reader)\n\t\treturn readBufWrapper, nil\n\tcase Xz:\n\t\txzReader, err := xz.NewReader(buf)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treadBufWrapper := p.NewReadCloserWrapper(buf, xzReader)\n\t\treturn readBufWrapper, nil\n\tcase Zstd:\n\t\tcleanup := func() {\n\t\t\tp.Put(buf)\n\t\t}\n\t\tif rc, canUse := tryProcFilter([]string{\"zstd\", \"-d\"}, buf, cleanup); canUse {\n\t\t\treturn rc, nil\n\t\t}\n\t\treturn zstdReader(buf)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported compression format %s\", (&compression).Extension())\n\t}\n}\n\n// CompressStream compresses the dest with specified compression algorithm.\nfunc CompressStream(dest io.Writer, compression Compression) (_ io.WriteCloser, Err error) {\n\tp := pools.BufioWriter32KPool\n\tbuf := p.Get(dest)\n\n\tdefer func() {\n\t\tif Err != nil {\n\t\t\tp.Put(buf)\n\t\t}\n\t}()\n\n\tswitch compression {\n\tcase Uncompressed:\n\t\twriteBufWrapper := p.NewWriteCloserWrapper(buf, buf)\n\t\treturn writeBufWrapper, nil\n\tcase Gzip:\n\t\tgzWriter := gzip.NewWriter(dest)\n\t\twriteBufWrapper := p.NewWriteCloserWrapper(buf, gzWriter)\n\t\treturn writeBufWrapper, nil\n\tcase Zstd:\n\t\treturn zstdWriter(dest)\n\tcase Bzip2, Xz:\n\t\t// archive/bzip2 does not support writing, and there is no xz support at all\n\t\t// However, this is not a problem as docker only currently generates gzipped tars\n\t\treturn nil, fmt.Errorf(\"unsupported compression format %s\", (&compression).Extension())\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported compression format %s\", (&compression).Extension())\n\t}\n}\n\n// TarModifierFunc is a function that can be passed to ReplaceFileTarWrapper to\n// modify the contents or header of an entry in the archive. If the file already\n// exists in the archive the TarModifierFunc will be called with the Header and\n// a reader which will return the files content. If the file does not exist both\n// header and content will be nil.\ntype TarModifierFunc func(path string, header *tar.Header, content io.Reader) (*tar.Header, []byte, error)\n\n// ReplaceFileTarWrapper converts inputTarStream to a new tar stream. Files in the\n// tar stream are modified if they match any of the keys in mods.\nfunc ReplaceFileTarWrapper(inputTarStream io.ReadCloser, mods map[string]TarModifierFunc) io.ReadCloser {\n\tpipeReader, pipeWriter := io.Pipe()\n\n\tgo func() {\n\t\ttarReader := tar.NewReader(inputTarStream)\n\t\ttarWriter := tar.NewWriter(pipeWriter)\n\t\tdefer inputTarStream.Close()\n\t\tdefer tarWriter.Close()\n\n\t\tmodify := func(name string, original *tar.Header, modifier TarModifierFunc, tarReader io.Reader) error {\n\t\t\theader, data, err := modifier(name, original, tarReader)\n\t\t\tswitch {\n\t\t\tcase err != nil:\n\t\t\t\treturn err\n\t\t\tcase header == nil:\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\theader.Name = name\n\t\t\theader.Size = int64(len(data))\n\t\t\tif err := tarWriter.WriteHeader(header); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif len(data) != 0 {\n\t\t\t\tif _, err := tarWriter.Write(data); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\n\t\tvar err error\n\t\tvar originalHeader *tar.Header\n\t\tfor {\n\t\t\toriginalHeader, err = tarReader.Next()\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tpipeWriter.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tmodifier, ok := mods[originalHeader.Name]\n\t\t\tif !ok {\n\t\t\t\t// No modifiers for this file, copy the header and data\n\t\t\t\tif err := tarWriter.WriteHeader(originalHeader); err != nil {\n\t\t\t\t\tpipeWriter.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif _, err := pools.Copy(tarWriter, tarReader); err != nil {\n\t\t\t\t\tpipeWriter.CloseWithError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdelete(mods, originalHeader.Name)\n\n\t\t\tif err := modify(originalHeader.Name, originalHeader, modifier, tarReader); err != nil {\n\t\t\t\tpipeWriter.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// Apply the modifiers that haven't matched any files in the archive\n\t\tfor name, modifier := range mods {\n\t\t\tif err := modify(name, nil, modifier, nil); err != nil {\n\t\t\t\tpipeWriter.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tpipeWriter.Close()\n\t}()\n\treturn pipeReader\n}\n\n// Extension returns the extension of a file that uses the specified compression algorithm.\nfunc (compression *Compression) Extension() string {\n\tswitch *compression {\n\tcase Uncompressed:\n\t\treturn tarExt\n\tcase Bzip2:\n\t\treturn tarExt + \".bz2\"\n\tcase Gzip:\n\t\treturn tarExt + \".gz\"\n\tcase Xz:\n\t\treturn tarExt + \".xz\"\n\tcase Zstd:\n\t\treturn tarExt + \".zst\"\n\t}\n\treturn \"\"\n}\n\n// nosysFileInfo hides the system-dependent info of the wrapped FileInfo to\n// prevent tar.FileInfoHeader from introspecting it and potentially calling into\n// glibc.\ntype nosysFileInfo struct {\n\tos.FileInfo\n}\n\nfunc (fi nosysFileInfo) Sys() any {\n\t// A Sys value of type *tar.Header is safe as it is system-independent.\n\t// The tar.FileInfoHeader function copies the fields into the returned\n\t// header without performing any OS lookups.\n\tif sys, ok := fi.FileInfo.Sys().(*tar.Header); ok {\n\t\treturn sys\n\t}\n\treturn nil\n}\n\n// sysStatOverride, if non-nil, populates hdr from system-dependent fields of fi.\nvar sysStatOverride func(fi os.FileInfo, hdr *tar.Header) error\n\nfunc fileInfoHeaderNoLookups(fi os.FileInfo, link string) (*tar.Header, error) {\n\tif sysStatOverride == nil {\n\t\treturn tar.FileInfoHeader(fi, link)\n\t}\n\thdr, err := tar.FileInfoHeader(nosysFileInfo{fi}, link)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn hdr, sysStatOverride(fi, hdr)\n}\n\n// FileInfoHeader creates a populated Header from fi.\n// Compared to archive pkg this function fills in more information.\n// Also, regardless of Go version, this function fills file type bits (e.g. hdr.Mode |= modeISDIR),\n// which have been deleted since Go 1.9 archive/tar.\nfunc FileInfoHeader(name string, fi os.FileInfo, link string) (*tar.Header, error) {\n\thdr, err := fileInfoHeaderNoLookups(fi, link)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode)))\n\tname, err = canonicalTarName(name, fi.IsDir())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"tar: cannot canonicalize path: %w\", err)\n\t}\n\thdr.Name = name\n\tsetHeaderForSpecialDevice(hdr, fi.Sys())\n\treturn hdr, nil\n}\n\n// readSecurityXattrToTarHeader reads security.capability, security,image\n// xattrs from filesystem to a tar header\nfunc readSecurityXattrToTarHeader(path string, hdr *tar.Header) error {\n\tif hdr.PAXRecords == nil {\n\t\thdr.PAXRecords = make(map[string]string)\n\t}\n\tfor _, xattr := range []string{\"security.capability\", \"security.ima\"} {\n\t\tcapability, err := system.Lgetxattr(path, xattr)\n\t\tif err != nil && !errors.Is(err, system.ENOTSUP) && err != system.ErrNotSupportedPlatform {\n\t\t\treturn fmt.Errorf(\"failed to read %q attribute from %q: %w\", xattr, path, err)\n\t\t}\n\t\tif capability != nil {\n\t\t\thdr.PAXRecords[PaxSchilyXattr+xattr] = string(capability)\n\t\t}\n\t}\n\treturn nil\n}\n\n// readUserXattrToTarHeader reads user.* xattr from filesystem to a tar header\nfunc readUserXattrToTarHeader(path string, hdr *tar.Header) error {\n\txattrs, err := system.Llistxattr(path)\n\tif err != nil && !errors.Is(err, system.ENOTSUP) && err != system.ErrNotSupportedPlatform {\n\t\treturn err\n\t}\n\tfor _, key := range xattrs {\n\t\tif strings.HasPrefix(key, \"user.\") && !strings.HasPrefix(key, \"user.overlay.\") {\n\t\t\tvalue, err := system.Lgetxattr(path, key)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, system.E2BIG) {\n\t\t\t\t\tlogrus.Errorf(\"archive: Skipping xattr for file %s since value is too big: %s\", path, key)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif hdr.PAXRecords == nil {\n\t\t\t\thdr.PAXRecords = make(map[string]string)\n\t\t\t}\n\t\t\thdr.PAXRecords[PaxSchilyXattr+key] = string(value)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype TarWhiteoutHandler interface {\n\tSetxattr(path, name string, value []byte) error\n\tMknod(path string, mode uint32, dev int) error\n\tChown(path string, uid, gid int) error\n}\n\ntype TarWhiteoutConverter interface {\n\tConvertWrite(*tar.Header, string, os.FileInfo) (*tar.Header, error)\n\tConvertRead(*tar.Header, string) (bool, error)\n\tConvertReadWithHandler(*tar.Header, string, TarWhiteoutHandler) (bool, error)\n}\n\ntype tarWriter struct {\n\tTarWriter *tar.Writer\n\tBuffer    *bufio.Writer\n\n\t// for hardlink mapping\n\tSeenFiles  map[uint64]string\n\tIDMappings *idtools.IDMappings\n\tChownOpts  *idtools.IDPair\n\n\t// For packing and unpacking whiteout files in the\n\t// non standard format. The whiteout files defined\n\t// by the AUFS standard are used as the tar whiteout\n\t// standard.\n\tWhiteoutConverter TarWhiteoutConverter\n\t// CopyPass indicates that the contents of any archive we're creating\n\t// will instantly be extracted and written to disk, so we can deviate\n\t// from the traditional behavior/format to get features like subsecond\n\t// precision in timestamps.\n\tCopyPass bool\n\n\t// Timestamp, if set, will be set in each header as create/mod/access time\n\tTimestamp *time.Time\n}\n\nfunc newTarWriter(idMapping *idtools.IDMappings, writer io.Writer, chownOpts *idtools.IDPair, timestamp *time.Time) *tarWriter {\n\treturn &tarWriter{\n\t\tSeenFiles:  make(map[uint64]string),\n\t\tTarWriter:  tar.NewWriter(writer),\n\t\tBuffer:     pools.BufioWriter32KPool.Get(nil),\n\t\tIDMappings: idMapping,\n\t\tChownOpts:  chownOpts,\n\t\tTimestamp:  timestamp,\n\t}\n}\n\n// canonicalTarName provides a platform-independent and consistent posix-style\n// path for files and directories to be archived regardless of the platform.\nfunc canonicalTarName(name string, isDir bool) (string, error) {\n\tname, err := CanonicalTarNameForPath(name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// suffix with '/' for directories\n\tif isDir && !strings.HasSuffix(name, \"/\") {\n\t\tname += \"/\"\n\t}\n\treturn name, nil\n}\n\ntype addFileData struct {\n\t// The path from which to read contents.\n\tpath string\n\n\t// os.Stat for the above.\n\tfi os.FileInfo\n\n\t// The file header of the above.\n\thdr *tar.Header\n\n\t// if present, an extra whiteout entry to write after the header.\n\textraWhiteout *tar.Header\n}\n\n// prepareAddFile generates the tar file header(s) for adding a file\n// from path as name to the tar archive, without writing to the\n// tar stream. Thus, any error may be ignored without corrupting the\n// tar file. A (nil, nil) return means that the file should be\n// ignored for non-error reasons.\nfunc (ta *tarWriter) prepareAddFile(path, name string) (*addFileData, error) {\n\tfi, err := os.Lstat(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar link string\n\tif fi.Mode()&os.ModeSymlink != 0 {\n\t\tvar err error\n\t\tlink, err = os.Readlink(path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif fi.Mode()&os.ModeSocket != 0 {\n\t\tlogrus.Infof(\"archive: skipping %q since it is a socket\", path)\n\t\treturn nil, nil\n\t}\n\n\thdr, err := FileInfoHeader(name, fi, link)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := readSecurityXattrToTarHeader(path, hdr); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := readUserXattrToTarHeader(path, hdr); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := ReadFileFlagsToTarHeader(path, hdr); err != nil {\n\t\treturn nil, err\n\t}\n\tif ta.CopyPass {\n\t\tcopyPassHeader(hdr)\n\t}\n\n\t// if it's not a directory and has more than 1 link,\n\t// it's hard linked, so set the type flag accordingly\n\tif !fi.IsDir() && hasHardlinks(fi) {\n\t\tinode := getInodeFromStat(fi.Sys())\n\t\t// a link should have a name that it links too\n\t\t// and that linked name should be first in the tar archive\n\t\tif oldpath, ok := ta.SeenFiles[inode]; ok {\n\t\t\thdr.Typeflag = tar.TypeLink\n\t\t\thdr.Linkname = oldpath\n\t\t\thdr.Size = 0 // This must be here for the writer math to add up!\n\t\t}\n\t}\n\n\t// handle re-mapping container ID mappings back to host ID mappings before\n\t// writing tar headers/files. We skip whiteout files because they were written\n\t// by the kernel and already have proper ownership relative to the host\n\tif !strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) && !ta.IDMappings.Empty() {\n\t\tfileIDPair, err := getFileUIDGID(fi.Sys())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\thdr.Uid, hdr.Gid, err = ta.IDMappings.ToContainer(fileIDPair)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// explicitly override with ChownOpts\n\tif ta.ChownOpts != nil {\n\t\thdr.Uid = ta.ChownOpts.UID\n\t\thdr.Gid = ta.ChownOpts.GID\n\t\t// Don’t expose the user names from the local system; they probably don’t match the ta.ChownOpts value anyway,\n\t\t// and they unnecessarily give recipients of the tar file potentially private data.\n\t\thdr.Uname = \"\"\n\t\thdr.Gname = \"\"\n\t}\n\n\t// if override timestamp set, replace all times with this\n\tif ta.Timestamp != nil {\n\t\thdr.ModTime = *ta.Timestamp\n\t\thdr.AccessTime = *ta.Timestamp\n\t\thdr.ChangeTime = *ta.Timestamp\n\t}\n\n\tmaybeTruncateHeaderModTime(hdr)\n\n\tresult := &addFileData{\n\t\tpath: path,\n\t\thdr:  hdr,\n\t\tfi:   fi,\n\t}\n\tif ta.WhiteoutConverter != nil {\n\t\t// The WhiteoutConverter suggests a generic mechanism,\n\t\t// but this code is only used to convert between\n\t\t// overlayfs (on-disk) and AUFS (in the tar file)\n\t\t// whiteouts, and is initiated because the overlayfs\n\t\t// storage driver returns OverlayWhiteoutFormat from\n\t\t// Driver.getWhiteoutFormat().\n\t\t//\n\t\t// For AUFS, a directory with all its contents deleted\n\t\t// should be represented as a directory containing a\n\t\t// magic whiteout empty regular file, hence the\n\t\t// extraWhiteout header returned here.\n\t\tresult.extraWhiteout, err = ta.WhiteoutConverter.ConvertWrite(hdr, path, fi)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn result, nil\n}\n\n// addFile performs the write. An error here corrupts the tar file.\nfunc (ta *tarWriter) addFile(headers *addFileData) error {\n\thdr := headers.hdr\n\tif headers.extraWhiteout != nil {\n\t\tif hdr.Typeflag == tar.TypeReg && hdr.Size > 0 {\n\t\t\t// If we write hdr with hdr.Size > 0, we have\n\t\t\t// to write the body before we can write the\n\t\t\t// extraWhiteout header. This can only happen\n\t\t\t// if the contract for WhiteoutConverter is\n\t\t\t// not honored, so bail out.\n\t\t\treturn fmt.Errorf(\"tar: cannot use extra whiteout with non-empty file %s\", hdr.Name)\n\t\t}\n\t\tif err := ta.TarWriter.WriteHeader(hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\t\thdr = headers.extraWhiteout\n\t}\n\n\tif err := ta.TarWriter.WriteHeader(hdr); err != nil {\n\t\treturn err\n\t}\n\n\tif hdr.Typeflag == tar.TypeReg && hdr.Size > 0 {\n\t\tfile, err := os.Open(headers.path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tta.Buffer.Reset(ta.TarWriter)\n\t\tdefer ta.Buffer.Reset(nil)\n\t\t_, err = io.Copy(ta.Buffer, file)\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = ta.Buffer.Flush()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif !headers.fi.IsDir() && hasHardlinks(headers.fi) {\n\t\tino := getInodeFromStat(headers.fi.Sys())\n\t\tif _, seen := ta.SeenFiles[ino]; !seen {\n\t\t\tta.SeenFiles[ino] = headers.hdr.Name\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc extractTarFileEntry(path, extractDir string, hdr *tar.Header, reader io.Reader, Lchown bool, chownOpts *idtools.IDPair, inUserns, ignoreChownErrors bool, forceMask *os.FileMode, buffer []byte) error {\n\t// hdr.Mode is in linux format, which we can use for sycalls,\n\t// but for os.Foo() calls we need the mode converted to os.FileMode,\n\t// so use hdrInfo.Mode() (they differ for e.g. setuid bits)\n\thdrInfo := hdr.FileInfo()\n\n\ttypeFlag := hdr.Typeflag\n\tmask := hdrInfo.Mode()\n\n\t// update also the implementation of ForceMask in pkg/chunked\n\tif forceMask != nil {\n\t\tmask = *forceMask\n\t\t// If we have a forceMask, force the real type to either be a directory,\n\t\t// a link, or a regular file.\n\t\tif typeFlag != tar.TypeDir && typeFlag != tar.TypeSymlink && typeFlag != tar.TypeLink {\n\t\t\ttypeFlag = tar.TypeReg\n\t\t}\n\t}\n\n\tswitch typeFlag {\n\tcase tar.TypeDir:\n\t\t// Create directory unless it exists as a directory already.\n\t\t// In that case we just want to merge the two\n\t\tif fi, err := os.Lstat(path); err != nil || !fi.IsDir() {\n\t\t\tif err := os.Mkdir(path, mask); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\tcase tar.TypeReg:\n\t\t// Source is regular file. We use system.OpenFileSequential to use sequential\n\t\t// file access to avoid depleting the standby list on Windows.\n\t\t// On Linux, this equates to a regular os.OpenFile\n\t\tfile, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, mask)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err := io.CopyBuffer(file, reader, buffer); err != nil {\n\t\t\tfile.Close()\n\t\t\treturn err\n\t\t}\n\t\tif err := file.Close(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase tar.TypeBlock, tar.TypeChar:\n\t\tif inUserns { // cannot create devices in a userns\n\t\t\tlogrus.Debugf(\"Tar: Can't create device %v while running in user namespace\", path)\n\t\t\treturn nil\n\t\t}\n\t\tfallthrough\n\tcase tar.TypeFifo:\n\t\t// Handle this is an OS-specific way\n\t\tif err := handleTarTypeBlockCharFifo(hdr, path); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase tar.TypeLink:\n\t\ttargetPath := filepath.Join(extractDir, hdr.Linkname)\n\t\t// check for hardlink breakout\n\t\tif !strings.HasPrefix(targetPath, extractDir) {\n\t\t\treturn breakoutError(fmt.Errorf(\"invalid hardlink %q -> %q\", targetPath, hdr.Linkname))\n\t\t}\n\t\tif err := handleLLink(targetPath, path); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase tar.TypeSymlink:\n\t\t// \tpath \t\t\t\t-> hdr.Linkname = targetPath\n\t\t// e.g. /extractDir/path/to/symlink \t-> ../2/file\t= /extractDir/path/2/file\n\t\ttargetPath := filepath.Join(filepath.Dir(path), hdr.Linkname)\n\n\t\t// the reason we don't need to check symlinks in the path (with FollowSymlinkInScope) is because\n\t\t// that symlink would first have to be created, which would be caught earlier, at this very check:\n\t\tif !strings.HasPrefix(targetPath, extractDir) {\n\t\t\treturn breakoutError(fmt.Errorf(\"invalid symlink %q -> %q\", path, hdr.Linkname))\n\t\t}\n\t\tif err := os.Symlink(hdr.Linkname, path); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase tar.TypeXGlobalHeader:\n\t\tlogrus.Debug(\"PAX Global Extended Headers found and ignored\")\n\t\treturn nil\n\n\tdefault:\n\t\treturn fmt.Errorf(\"unhandled tar header type %d\", hdr.Typeflag)\n\t}\n\n\t// Lchown is not supported on Windows.\n\tif Lchown && runtime.GOOS != windows {\n\t\tif chownOpts == nil {\n\t\t\tchownOpts = &idtools.IDPair{UID: hdr.Uid, GID: hdr.Gid}\n\t\t}\n\t\terr := idtools.SafeLchown(path, chownOpts.UID, chownOpts.GID)\n\t\tif err != nil {\n\t\t\tif ignoreChownErrors {\n\t\t\t\tfmt.Fprintf(os.Stderr, \"Chown error detected. Ignoring due to ignoreChownErrors flag: %v\\n\", err)\n\t\t\t} else {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\t// There is no LChmod, so ignore mode for symlink. Also, this\n\t// must happen after chown, as that can modify the file mode\n\tif err := handleLChmod(hdr, path, hdrInfo, forceMask); err != nil {\n\t\treturn err\n\t}\n\n\taTime := hdr.AccessTime\n\tif aTime.Before(hdr.ModTime) {\n\t\t// Last access time should never be before last modified time.\n\t\taTime = hdr.ModTime\n\t}\n\n\t// system.Chtimes doesn't support a NOFOLLOW flag atm\n\tif hdr.Typeflag == tar.TypeLink {\n\t\tif fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) {\n\t\t\tif err := system.Chtimes(path, aTime, hdr.ModTime); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else if hdr.Typeflag != tar.TypeSymlink {\n\t\tif err := system.Chtimes(path, aTime, hdr.ModTime); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tts := []syscall.Timespec{timeToTimespec(aTime), timeToTimespec(hdr.ModTime)}\n\t\tif err := system.LUtimesNano(path, ts); err != nil && err != system.ErrNotSupportedPlatform {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvar errs []string\n\tfor key, value := range hdr.PAXRecords {\n\t\txattrKey, ok := strings.CutPrefix(key, PaxSchilyXattr)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tif _, found := xattrsToIgnore[xattrKey]; found {\n\t\t\tcontinue\n\t\t}\n\t\tif err := system.Lsetxattr(path, xattrKey, []byte(value), 0); err != nil {\n\t\t\tif errors.Is(err, system.ENOTSUP) || (inUserns && errors.Is(err, syscall.EPERM)) {\n\t\t\t\t// Ignore specific error cases:\n\t\t\t\t// - ENOTSUP: Expected for graphdrivers lacking extended attribute support:\n\t\t\t\t//   - Legacy AUFS versions\n\t\t\t\t//   - FreeBSD with unsupported namespaces (trusted, security)\n\t\t\t\t// - EPERM: Expected when operating within a user namespace\n\t\t\t\t// All other errors will cause a failure.\n\t\t\t\terrs = append(errs, err.Error())\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif forceMask != nil && (typeFlag == tar.TypeReg || typeFlag == tar.TypeDir || runtime.GOOS == \"darwin\") {\n\t\tvalue := idtools.Stat{\n\t\t\tIDs:   idtools.IDPair{UID: hdr.Uid, GID: hdr.Gid},\n\t\t\tMode:  hdrInfo.Mode(),\n\t\t\tMajor: int(hdr.Devmajor),\n\t\t\tMinor: int(hdr.Devminor),\n\t\t}\n\t\tif err := idtools.SetContainersOverrideXattr(path, value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// We defer setting flags on directories until the end of\n\t// Unpack or UnpackLayer in case setting them makes the\n\t// directory immutable.\n\tif hdr.Typeflag != tar.TypeDir {\n\t\tif err := WriteFileFlagsFromTarHeader(path, hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif len(errs) > 0 {\n\t\tlogrus.WithFields(logrus.Fields{\n\t\t\t\"errors\": errs,\n\t\t}).Warn(\"ignored xattrs in archive: underlying filesystem doesn't support them\")\n\t}\n\n\treturn nil\n}\n\n// Tar creates an archive from the directory at `path`, and returns it as a\n// stream of bytes. This is a convenience wrapper for [TarWithOptions].\nfunc Tar(path string, compression Compression) (io.ReadCloser, error) {\n\treturn TarWithOptions(path, &TarOptions{Compression: compression})\n}\n\nfunc tarWithOptionsTo(dest io.WriteCloser, srcPath string, options *TarOptions) (result error) {\n\t// Fix the source path to work with long path names. This is a no-op\n\t// on platforms other than Windows.\n\tsrcPath = fixVolumePathPrefix(srcPath)\n\tdefer func() {\n\t\tif err := dest.Close(); err != nil && result == nil {\n\t\t\tresult = err\n\t\t}\n\t}()\n\n\tpm, err := fileutils.NewPatternMatcher(options.ExcludePatterns)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcompressWriter, err := CompressStream(dest, options.Compression)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tta := newTarWriter(\n\t\tidtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps),\n\t\tcompressWriter,\n\t\toptions.ChownOpts,\n\t\toptions.Timestamp,\n\t)\n\tta.WhiteoutConverter = GetWhiteoutConverter(options.WhiteoutFormat, options.WhiteoutData)\n\tta.CopyPass = options.CopyPass\n\n\tincludeFiles := options.IncludeFiles\n\tdefer func() {\n\t\tif err := compressWriter.Close(); err != nil && result == nil {\n\t\t\tresult = err\n\t\t}\n\t}()\n\n\t// this buffer is needed for the duration of this piped stream\n\tdefer pools.BufioWriter32KPool.Put(ta.Buffer)\n\n\t// In general we log errors here but ignore them because\n\t// during e.g. a diff operation the container can continue\n\t// mutating the filesystem and we can see transient errors\n\t// from this\n\n\tstat, err := os.Lstat(srcPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !stat.IsDir() {\n\t\t// We can't later join a non-dir with any includes because the\n\t\t// 'walk' will error if \"file/.\" is stat-ed and \"file\" is not a\n\t\t// directory. So, we must split the source path and use the\n\t\t// basename as the include.\n\t\tif len(includeFiles) > 0 {\n\t\t\tlogrus.Warn(\"Tar: Can't archive a file with includes\")\n\t\t}\n\n\t\tdir, base := SplitPathDirEntry(srcPath)\n\t\tsrcPath = dir\n\t\tincludeFiles = []string{base}\n\t}\n\n\tif len(includeFiles) == 0 {\n\t\tincludeFiles = []string{\".\"}\n\t}\n\n\tseen := make(map[string]bool)\n\n\tfor _, include := range includeFiles {\n\t\trebaseName := options.RebaseNames[include]\n\n\t\twalkRoot := getWalkRoot(srcPath, include)\n\t\tif err := filepath.WalkDir(walkRoot, func(filePath string, d fs.DirEntry, err error) error {\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Errorf(\"Tar: Can't stat file %s to tar: %s\", srcPath, err)\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\trelFilePath, err := filepath.Rel(srcPath, filePath)\n\t\t\tif err != nil || (!options.IncludeSourceDir && relFilePath == \".\" && d.IsDir()) {\n\t\t\t\t// Error getting relative path OR we are looking\n\t\t\t\t// at the source directory path. Skip in both situations.\n\t\t\t\treturn nil //nolint: nilerr\n\t\t\t}\n\n\t\t\tif options.IncludeSourceDir && include == \".\" && relFilePath != \".\" {\n\t\t\t\trelFilePath = strings.Join([]string{\".\", relFilePath}, string(filepath.Separator))\n\t\t\t}\n\n\t\t\tskip := false\n\n\t\t\t// If \"include\" is an exact match for the current file\n\t\t\t// then even if there's an \"excludePatterns\" pattern that\n\t\t\t// matches it, don't skip it. IOW, assume an explicit 'include'\n\t\t\t// is asking for that file no matter what - which is true\n\t\t\t// for some files, like .dockerignore and Dockerfile (sometimes)\n\t\t\tif include != relFilePath {\n\t\t\t\tmatches, err := pm.IsMatch(relFilePath)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"matching %s: %w\", relFilePath, err)\n\t\t\t\t}\n\t\t\t\tskip = matches\n\t\t\t}\n\n\t\t\tif skip {\n\t\t\t\t// If we want to skip this file and its a directory\n\t\t\t\t// then we should first check to see if there's an\n\t\t\t\t// excludes pattern (e.g. !dir/file) that starts with this\n\t\t\t\t// dir. If so then we can't skip this dir.\n\n\t\t\t\t// Its not a dir then so we can just return/skip.\n\t\t\t\tif !d.IsDir() {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\n\t\t\t\t// No exceptions (!...) in patterns so just skip dir\n\t\t\t\tif !pm.Exclusions() {\n\t\t\t\t\treturn filepath.SkipDir\n\t\t\t\t}\n\n\t\t\t\tdirSlash := relFilePath + string(filepath.Separator)\n\n\t\t\t\tfor _, pat := range pm.Patterns() {\n\t\t\t\t\tif !pat.Exclusion() {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif strings.HasPrefix(pat.String()+string(filepath.Separator), dirSlash) {\n\t\t\t\t\t\t// found a match - so can't skip this dir\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// No matching exclusion dir so just skip dir\n\t\t\t\treturn filepath.SkipDir\n\t\t\t}\n\n\t\t\tif seen[relFilePath] {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tseen[relFilePath] = true\n\n\t\t\t// Rename the base resource.\n\t\t\tif rebaseName != \"\" {\n\t\t\t\tvar replacement string\n\t\t\t\tif rebaseName != string(filepath.Separator) {\n\t\t\t\t\t// Special case the root directory to replace with an\n\t\t\t\t\t// empty string instead so that we don't end up with\n\t\t\t\t\t// double slashes in the paths.\n\t\t\t\t\treplacement = rebaseName\n\t\t\t\t}\n\n\t\t\t\trelFilePath = strings.Replace(relFilePath, include, replacement, 1)\n\t\t\t}\n\n\t\t\theaders, err := ta.prepareAddFile(filePath, relFilePath)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Errorf(\"Can't add file %s to tar: %s; skipping\", filePath, err)\n\t\t\t} else if headers != nil {\n\t\t\t\tif err := ta.addFile(headers); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn ta.TarWriter.Close()\n}\n\n// TarWithOptions creates an archive from the directory at `path`, only including files whose relative\n// paths are included in `options.IncludeFiles` (if non-nil) or not in `options.ExcludePatterns`.\n//\n// If used on a file system being modified concurrently,\n// TarWithOptions will create a valid tar archive, but may leave out\n// some files.\nfunc TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error) {\n\tpipeReader, pipeWriter := io.Pipe()\n\tgo func() {\n\t\terr := tarWithOptionsTo(pipeWriter, srcPath, options)\n\t\tif pipeErr := pipeWriter.CloseWithError(err); pipeErr != nil {\n\t\t\tlogrus.Errorf(\"Can't close pipe writer: %s\", pipeErr)\n\t\t}\n\t}()\n\n\treturn pipeReader, nil\n}\n\n// Unpack unpacks the decompressedArchive to dest with options.\nfunc Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) error {\n\ttr := tar.NewReader(decompressedArchive)\n\ttrBuf := pools.BufioReader32KPool.Get(nil)\n\tdefer pools.BufioReader32KPool.Put(trBuf)\n\n\tvar dirs []*tar.Header\n\tidMappings := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)\n\trootIDs := idMappings.RootPair()\n\twhiteoutConverter := GetWhiteoutConverter(options.WhiteoutFormat, options.WhiteoutData)\n\tbuffer := make([]byte, 1<<20)\n\n\tdoChown := !options.NoLchown\n\tif options.ForceMask != nil {\n\t\t// if ForceMask is in place, make sure lchown is disabled.\n\t\tdoChown = false\n\t}\n\tvar rootHdr *tar.Header\n\n\t// Iterate through the files in the archive.\nloop:\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tif err == io.EOF {\n\t\t\t// end of tar archive\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Normalize name, for safety and for a simple is-root check\n\t\t// This keeps \"../\" as-is, but normalizes \"/../\" to \"/\". Or Windows:\n\t\t// This keeps \"..\\\" as-is, but normalizes \"\\..\\\" to \"\\\".\n\t\thdr.Name = filepath.Clean(hdr.Name)\n\n\t\tfor _, exclude := range options.ExcludePatterns {\n\t\t\tif strings.HasPrefix(hdr.Name, exclude) {\n\t\t\t\tcontinue loop\n\t\t\t}\n\t\t}\n\n\t\t// After calling filepath.Clean(hdr.Name) above, hdr.Name will now be in\n\t\t// the filepath format for the OS on which the daemon is running. Hence\n\t\t// the check for a slash-suffix MUST be done in an OS-agnostic way.\n\t\tif !strings.HasSuffix(hdr.Name, string(os.PathSeparator)) {\n\t\t\t// Not the root directory, ensure that the parent directory exists\n\t\t\tparent := filepath.Dir(hdr.Name)\n\t\t\tparentPath := filepath.Join(dest, parent)\n\t\t\tif err := fileutils.Lexists(parentPath); err != nil && os.IsNotExist(err) {\n\t\t\t\terr = idtools.MkdirAllAndChownNew(parentPath, 0o777, rootIDs)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpath := filepath.Join(dest, hdr.Name)\n\t\trel, err := filepath.Rel(dest, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif rel == \".\" {\n\t\t\trootHdr = hdr\n\t\t}\n\t\tif strings.HasPrefix(rel, \"..\"+string(os.PathSeparator)) {\n\t\t\treturn breakoutError(fmt.Errorf(\"%q is outside of %q\", hdr.Name, dest))\n\t\t}\n\n\t\t// If path exits we almost always just want to remove and replace it\n\t\t// The only exception is when it is a directory *and* the file from\n\t\t// the layer is also a directory. Then we want to merge them (i.e.\n\t\t// just apply the metadata from the layer).\n\t\tif fi, err := os.Lstat(path); err == nil {\n\t\t\tif options.NoOverwriteDirNonDir && fi.IsDir() && hdr.Typeflag != tar.TypeDir {\n\t\t\t\t// If NoOverwriteDirNonDir is true then we cannot replace\n\t\t\t\t// an existing directory with a non-directory from the archive.\n\t\t\t\treturn overwriteError(fmt.Errorf(\"cannot overwrite directory %q with non-directory %q\", path, dest))\n\t\t\t}\n\n\t\t\tif options.NoOverwriteDirNonDir && !fi.IsDir() && hdr.Typeflag == tar.TypeDir {\n\t\t\t\t// If NoOverwriteDirNonDir is true then we cannot replace\n\t\t\t\t// an existing non-directory with a directory from the archive.\n\t\t\t\treturn overwriteError(fmt.Errorf(\"cannot overwrite non-directory %q with directory %q\", path, dest))\n\t\t\t}\n\n\t\t\tif fi.IsDir() && hdr.Name == \".\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif !fi.IsDir() || hdr.Typeflag != tar.TypeDir {\n\t\t\t\tif err := os.RemoveAll(path); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttrBuf.Reset(tr)\n\n\t\tchownOpts := options.ChownOpts\n\t\tif err := remapIDs(nil, idMappings, chownOpts, hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif whiteoutConverter != nil {\n\t\t\twriteFile, err := whiteoutConverter.ConvertRead(hdr, path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !writeFile {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tif chownOpts != nil {\n\t\t\tchownOpts = &idtools.IDPair{UID: hdr.Uid, GID: hdr.Gid}\n\t\t}\n\n\t\tif err = extractTarFileEntry(path, dest, hdr, trBuf, doChown, chownOpts, options.InUserNS, options.IgnoreChownErrors, options.ForceMask, buffer); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Directory mtimes must be handled at the end to avoid further\n\t\t// file creation in them to modify the directory mtime\n\t\tif hdr.Typeflag == tar.TypeDir {\n\t\t\tdirs = append(dirs, hdr)\n\t\t}\n\t}\n\n\tfor _, hdr := range dirs {\n\t\tpath := filepath.Join(dest, hdr.Name)\n\n\t\tif err := system.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := WriteFileFlagsFromTarHeader(path, hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif options.ForceMask != nil {\n\t\tvalue := idtools.Stat{Mode: os.ModeDir | os.FileMode(0o755)}\n\t\tif rootHdr != nil {\n\t\t\tvalue.IDs.UID = rootHdr.Uid\n\t\t\tvalue.IDs.GID = rootHdr.Gid\n\t\t\tvalue.Mode = os.ModeDir | os.FileMode(rootHdr.Mode)\n\t\t}\n\t\tif err := idtools.SetContainersOverrideXattr(dest, value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Untar reads a stream of bytes from `archive`, parses it as a tar archive,\n// and unpacks it into the directory at `dest`.\n// The archive may be compressed with one of the following algorithms:\n//\n//\tidentity (uncompressed), gzip, bzip2, xz.\n//\n// FIXME: specify behavior when target path exists vs. doesn't exist.\nfunc Untar(tarArchive io.Reader, dest string, options *TarOptions) error {\n\treturn untarHandler(tarArchive, dest, options, true)\n}\n\n// UntarUncompressed reads a stream of bytes from `archive`, parses it as a tar archive,\n// and unpacks it into the directory at `dest`.\n// The archive must be an uncompressed stream.\nfunc UntarUncompressed(tarArchive io.Reader, dest string, options *TarOptions) error {\n\treturn untarHandler(tarArchive, dest, options, false)\n}\n\n// Handler for teasing out the automatic decompression\nfunc untarHandler(tarArchive io.Reader, dest string, options *TarOptions, decompress bool) error {\n\tif tarArchive == nil {\n\t\treturn fmt.Errorf(\"empty archive\")\n\t}\n\tdest = filepath.Clean(dest)\n\tif options == nil {\n\t\toptions = &TarOptions{}\n\t}\n\n\tr := tarArchive\n\tif decompress {\n\t\tdecompressedArchive, err := DecompressStream(tarArchive)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer decompressedArchive.Close()\n\t\tr = decompressedArchive\n\t}\n\n\treturn Unpack(r, dest, options)\n}\n\n// TarUntar is a convenience function which calls Tar and Untar, with the output of one piped into the other.\n// If either Tar or Untar fails, TarUntar aborts and returns the error.\nfunc (archiver *Archiver) TarUntar(src, dst string) error {\n\tlogrus.Debugf(\"TarUntar(%s %s)\", src, dst)\n\ttarMappings := archiver.TarIDMappings\n\tif tarMappings == nil {\n\t\ttarMappings = &idtools.IDMappings{}\n\t}\n\toptions := &TarOptions{\n\t\tUIDMaps:     tarMappings.UIDs(),\n\t\tGIDMaps:     tarMappings.GIDs(),\n\t\tCompression: Uncompressed,\n\t\tCopyPass:    true,\n\t\tInUserNS:    unshare.IsRootless(),\n\t}\n\tarchive, err := TarWithOptions(src, options)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer archive.Close()\n\tuntarMappings := archiver.UntarIDMappings\n\tif untarMappings == nil {\n\t\tuntarMappings = &idtools.IDMappings{}\n\t}\n\toptions = &TarOptions{\n\t\tUIDMaps:   untarMappings.UIDs(),\n\t\tGIDMaps:   untarMappings.GIDs(),\n\t\tChownOpts: archiver.ChownOpts,\n\t\tInUserNS:  unshare.IsRootless(),\n\t}\n\treturn archiver.Untar(archive, dst, options)\n}\n\n// UntarPath untar a file from path to a destination, src is the source tar file path.\nfunc (archiver *Archiver) UntarPath(src, dst string) error {\n\tarchive, err := os.Open(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer archive.Close()\n\tuntarMappings := archiver.UntarIDMappings\n\tif untarMappings == nil {\n\t\tuntarMappings = &idtools.IDMappings{}\n\t}\n\toptions := &TarOptions{\n\t\tUIDMaps:   untarMappings.UIDs(),\n\t\tGIDMaps:   untarMappings.GIDs(),\n\t\tChownOpts: archiver.ChownOpts,\n\t\tInUserNS:  unshare.IsRootless(),\n\t}\n\treturn archiver.Untar(archive, dst, options)\n}\n\n// CopyWithTar creates a tar archive of filesystem path `src`, and\n// unpacks it at filesystem path `dst`.\n// The archive is streamed directly with fixed buffering and no\n// intermediary disk IO.\nfunc (archiver *Archiver) CopyWithTar(src, dst string) error {\n\tsrcSt, err := os.Stat(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !srcSt.IsDir() {\n\t\treturn archiver.CopyFileWithTar(src, dst)\n\t}\n\n\t// if this archiver is set up with ID mapping we need to create\n\t// the new destination directory with the remapped root UID/GID pair\n\t// as owner\n\trootIDs := archiver.UntarIDMappings.RootPair()\n\tif archiver.ChownOpts != nil {\n\t\trootIDs = *archiver.ChownOpts\n\t}\n\t// Create dst, copy src's content into it\n\tlogrus.Debugf(\"Creating dest directory: %s\", dst)\n\tif err := idtools.MkdirAllAndChownNew(dst, 0o755, rootIDs); err != nil {\n\t\treturn err\n\t}\n\tlogrus.Debugf(\"Calling TarUntar(%s, %s)\", src, dst)\n\treturn archiver.TarUntar(src, dst)\n}\n\n// CopyFileWithTar emulates the behavior of the 'cp' command-line\n// for a single file. It copies a regular file from path `src` to\n// path `dst`, and preserves all its metadata.\nfunc (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {\n\tlogrus.Debugf(\"CopyFileWithTar(%s, %s)\", src, dst)\n\tsrcSt, err := os.Stat(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif srcSt.IsDir() {\n\t\treturn fmt.Errorf(\"can't copy a directory\")\n\t}\n\n\t// Clean up the trailing slash. This must be done in an operating\n\t// system specific manner.\n\tif dst[len(dst)-1] == os.PathSeparator {\n\t\tdst = filepath.Join(dst, filepath.Base(src))\n\t}\n\t// Create the holding directory if necessary\n\tif err := os.MkdirAll(filepath.Dir(dst), 0o700); err != nil {\n\t\treturn err\n\t}\n\n\tr, w := io.Pipe()\n\terrC := promise.Go(func() error {\n\t\tdefer w.Close()\n\n\t\tsrcF, err := os.Open(src)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer srcF.Close()\n\n\t\thdr, err := tar.FileInfoHeader(srcSt, \"\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thdr.Name = filepath.Base(dst)\n\t\thdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode)))\n\t\tcopyPassHeader(hdr)\n\n\t\tif err := remapIDs(archiver.TarIDMappings, nil, archiver.ChownOpts, hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\ttw := tar.NewWriter(w)\n\t\tdefer tw.Close()\n\t\tif err := tw.WriteHeader(hdr); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err := io.Copy(tw, srcF); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n\tdefer func() {\n\t\tif er := <-errC; err == nil && er != nil {\n\t\t\terr = er\n\t\t}\n\t}()\n\n\toptions := &TarOptions{\n\t\tUIDMaps:              archiver.UntarIDMappings.UIDs(),\n\t\tGIDMaps:              archiver.UntarIDMappings.GIDs(),\n\t\tChownOpts:            archiver.ChownOpts,\n\t\tInUserNS:             unshare.IsRootless(),\n\t\tNoOverwriteDirNonDir: true,\n\t}\n\terr = archiver.Untar(r, filepath.Dir(dst), options)\n\tif err != nil {\n\t\tr.CloseWithError(err)\n\t}\n\treturn err\n}\n\nfunc remapIDs(readIDMappings, writeIDMappings *idtools.IDMappings, chownOpts *idtools.IDPair, hdr *tar.Header) (err error) {\n\tvar uid, gid int\n\tif chownOpts != nil {\n\t\tuid, gid = chownOpts.UID, chownOpts.GID\n\t} else {\n\t\tif readIDMappings != nil && !readIDMappings.Empty() {\n\t\t\tuid, gid, err = readIDMappings.ToContainer(idtools.IDPair{UID: hdr.Uid, GID: hdr.Gid})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else if runtime.GOOS == darwin {\n\t\t\tuid, gid = hdr.Uid, hdr.Gid\n\t\t\tif xstat, ok := hdr.PAXRecords[PaxSchilyXattr+idtools.ContainersOverrideXattr]; ok {\n\t\t\t\tattrs := strings.Split(xstat, \":\")\n\t\t\t\tif len(attrs) >= 3 {\n\t\t\t\t\tval, err := strconv.ParseUint(attrs[0], 10, 32)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tuid = int(val)\n\t\t\t\t\t}\n\t\t\t\t\tval, err = strconv.ParseUint(attrs[1], 10, 32)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tgid = int(val)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tuid, gid = hdr.Uid, hdr.Gid\n\t\t}\n\t}\n\tids := idtools.IDPair{UID: uid, GID: gid}\n\tif writeIDMappings != nil && !writeIDMappings.Empty() {\n\t\tids, err = writeIDMappings.ToHost(ids)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\thdr.Uid, hdr.Gid = ids.UID, ids.GID\n\treturn nil\n}\n\n// NewTempArchive reads the content of src into a temporary file, and returns the contents\n// of that file as an archive. The archive can only be read once - as soon as reading completes,\n// the file will be deleted.\nfunc NewTempArchive(src io.Reader, dir string) (*TempArchive, error) {\n\tf, err := os.CreateTemp(dir, \"\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := io.Copy(f, src); err != nil {\n\t\treturn nil, err\n\t}\n\tif _, err := f.Seek(0, io.SeekStart); err != nil {\n\t\treturn nil, err\n\t}\n\tst, err := f.Stat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsize := st.Size()\n\treturn &TempArchive{File: f, Size: size}, nil\n}\n\n// TempArchive is a temporary archive. The archive can only be read once - as soon as reading completes,\n// the file will be deleted.\ntype TempArchive struct {\n\t*os.File\n\tSize   int64 // Pre-computed from Stat().Size() as a convenience\n\tread   int64\n\tclosed bool\n}\n\n// Close closes the underlying file if it's still open, or does a no-op\n// to allow callers to try to close the TempArchive multiple times safely.\nfunc (archive *TempArchive) Close() error {\n\tif archive.closed {\n\t\treturn nil\n\t}\n\n\tarchive.closed = true\n\n\treturn archive.File.Close()\n}\n\nfunc (archive *TempArchive) Read(data []byte) (int, error) {\n\tn, err := archive.File.Read(data)\n\tarchive.read += int64(n)\n\tif err != nil || archive.read == archive.Size {\n\t\tarchive.Close()\n\t\tos.Remove(archive.File.Name())\n\t}\n\treturn n, err\n}\n\n// IsArchive checks for the magic bytes of a tar or any supported compression\n// algorithm.\nfunc IsArchive(header []byte) bool {\n\tcompression := DetectCompression(header)\n\tif compression != Uncompressed {\n\t\treturn true\n\t}\n\tr := tar.NewReader(bytes.NewReader(header))\n\t_, err := r.Next()\n\treturn err == nil\n}\n\n// UntarPath is a convenience function which looks for an archive\n// at filesystem path `src`, and unpacks it at `dst`.\nfunc UntarPath(src, dst string) error {\n\treturn NewDefaultArchiver().UntarPath(src, dst)\n}\n\nconst (\n\t// HeaderSize is the size in bytes of a tar header\n\tHeaderSize = 512\n)\n\n// NewArchiver returns a new Archiver\nfunc NewArchiver(idMappings *idtools.IDMappings) *Archiver {\n\tif idMappings == nil {\n\t\tidMappings = &idtools.IDMappings{}\n\t}\n\treturn &Archiver{Untar: Untar, TarIDMappings: idMappings, UntarIDMappings: idMappings}\n}\n\n// NewArchiverWithChown returns a new Archiver which uses Untar and the provided ID mapping configuration on both ends\nfunc NewArchiverWithChown(tarIDMappings *idtools.IDMappings, chownOpts *idtools.IDPair, untarIDMappings *idtools.IDMappings) *Archiver {\n\tif tarIDMappings == nil {\n\t\ttarIDMappings = &idtools.IDMappings{}\n\t}\n\tif untarIDMappings == nil {\n\t\tuntarIDMappings = &idtools.IDMappings{}\n\t}\n\treturn &Archiver{Untar: Untar, TarIDMappings: tarIDMappings, ChownOpts: chownOpts, UntarIDMappings: untarIDMappings}\n}\n\n// CopyFileWithTarAndChown returns a function which copies a single file from outside\n// of any container into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc CopyFileWithTarAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *TarOptions) error {\n\t\t\tcontentReader, contentWriter, err := os.Pipe()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"creating pipe extract data to %q: %w\", dest, err)\n\t\t\t}\n\t\t\tdefer contentReader.Close()\n\t\t\tdefer contentWriter.Close()\n\t\t\tvar hashError error\n\t\t\tvar hashWorker sync.WaitGroup\n\t\t\thashWorker.Go(func() {\n\t\t\t\tt := tar.NewReader(contentReader)\n\t\t\t\t_, err := t.Next()\n\t\t\t\tif err != nil {\n\t\t\t\t\thashError = err\n\t\t\t\t}\n\t\t\t\tif _, err = io.Copy(hasher, t); err != nil && err != io.EOF {\n\t\t\t\t\thashError = err\n\t\t\t\t}\n\t\t\t})\n\t\t\tif err = originalUntar(io.TeeReader(tarArchive, contentWriter), dest, options); err != nil {\n\t\t\t\terr = fmt.Errorf(\"extracting data to %q while copying: %w\", dest, err)\n\t\t\t}\n\t\t\thashWorker.Wait()\n\t\t\tif err == nil && hashError != nil {\n\t\t\t\terr = fmt.Errorf(\"calculating digest of data for %q while copying: %w\", dest, hashError)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\treturn archiver.CopyFileWithTar\n}\n\n// CopyWithTarAndChown returns a function which copies a directory tree from outside of\n// any container into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc CopyWithTarAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *TarOptions) error {\n\t\t\treturn originalUntar(io.TeeReader(tarArchive, hasher), dest, options)\n\t\t}\n\t}\n\treturn archiver.CopyWithTar\n}\n\n// UntarPathAndChown returns a function which extracts an archive in a specified\n// location into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc UntarPathAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *TarOptions) error {\n\t\t\treturn originalUntar(io.TeeReader(tarArchive, hasher), dest, options)\n\t\t}\n\t}\n\treturn archiver.UntarPath\n}\n\n// TarPath returns a function which creates an archive of a specified\n// location in the container's filesystem, mapping permissions using the\n// container's ID maps\nfunc TarPath(uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(path string) (io.ReadCloser, error) {\n\ttarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\treturn func(path string) (io.ReadCloser, error) {\n\t\treturn TarWithOptions(path, &TarOptions{\n\t\t\tCompression: Uncompressed,\n\t\t\tUIDMaps:     tarMappings.UIDs(),\n\t\t\tGIDMaps:     tarMappings.GIDs(),\n\t\t})\n\t}\n}\n\n// GetOverlayXattrName returns the xattr used by the overlay driver with the\n// given name.\n// It uses the trusted.overlay prefix when running as root, and user.overlay\n// in rootless mode.\nfunc GetOverlayXattrName(name string) string {\n\tif unshare.IsRootless() {\n\t\treturn fmt.Sprintf(\"user.overlay.%s\", name)\n\t}\n\treturn fmt.Sprintf(\"trusted.overlay.%s\", name)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_110.go",
    "content": "//go:build go1.10\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"time\"\n)\n\nfunc copyPassHeader(hdr *tar.Header) {\n\thdr.Format = tar.FormatPAX\n}\n\nfunc maybeTruncateHeaderModTime(hdr *tar.Header) {\n\tif hdr.Format == tar.FormatUnknown {\n\t\t// one of the first things archive/tar does is round this\n\t\t// value, possibly up, if the format isn't specified, while we\n\t\t// are much better equipped to handle truncation when scanning\n\t\t// for changes between source and an extracted copy of this\n\t\thdr.ModTime = hdr.ModTime.Truncate(time.Second)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_19.go",
    "content": "//go:build !go1.10\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n)\n\nfunc copyPassHeader(hdr *tar.Header) {\n}\n\nfunc maybeTruncateHeaderModTime(hdr *tar.Header) {\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_bsd.go",
    "content": "//go:build netbsd || freebsd || darwin\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc handleLChmod(_ *tar.Header, path string, hdrInfo os.FileInfo, forceMask *os.FileMode) error {\n\tpermissionsMask := hdrInfo.Mode()\n\tif forceMask != nil {\n\t\tpermissionsMask = *forceMask\n\t}\n\treturn unix.Fchmodat(unix.AT_FDCWD, path, uint32(permissionsMask), unix.AT_SYMLINK_NOFOLLOW)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_linux.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc getOverlayOpaqueXattrName() string {\n\treturn GetOverlayXattrName(\"opaque\")\n}\n\nfunc GetWhiteoutConverter(format WhiteoutFormat, data any) TarWhiteoutConverter {\n\tif format == OverlayWhiteoutFormat {\n\t\tif rolayers, ok := data.([]string); ok && len(rolayers) > 0 {\n\t\t\treturn overlayWhiteoutConverter{rolayers: rolayers}\n\t\t}\n\t\treturn overlayWhiteoutConverter{rolayers: nil}\n\t}\n\treturn nil\n}\n\ntype overlayWhiteoutConverter struct {\n\trolayers []string\n}\n\nfunc (o overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi os.FileInfo) (*tar.Header, error) {\n\t// convert whiteouts to AUFS format\n\tif fi.Mode()&os.ModeCharDevice != 0 && hdr.Devmajor == 0 && hdr.Devminor == 0 {\n\t\t// we just rename the file and make it normal\n\t\tdir, filename := filepath.Split(hdr.Name)\n\t\thdr.Name = filepath.Join(dir, WhiteoutPrefix+filename)\n\t\thdr.Mode = 0\n\t\thdr.Typeflag = tar.TypeReg\n\t\thdr.Size = 0\n\t}\n\n\tif fi.Mode()&os.ModeDir != 0 {\n\t\t// convert opaque dirs to AUFS format by writing an empty file with the whiteout prefix\n\t\topaque, err := system.Lgetxattr(path, getOverlayOpaqueXattrName())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif len(opaque) == 1 && opaque[0] == 'y' {\n\t\t\tif hdr.PAXRecords != nil {\n\t\t\t\tdelete(hdr.PAXRecords, PaxSchilyXattr+getOverlayOpaqueXattrName())\n\t\t\t}\n\t\t\t// If there are no lower layers, then it can't have been deleted in this layer.\n\t\t\tif len(o.rolayers) == 0 {\n\t\t\t\treturn nil, nil //nolint: nilnil\n\t\t\t}\n\t\t\t// At this point, we have a directory that's opaque.  If it appears in one of the lower\n\t\t\t// layers, then it was newly-created here, so it wasn't also deleted here.\n\t\t\tfor _, rolayer := range o.rolayers {\n\t\t\t\tstat, statErr := os.Stat(filepath.Join(rolayer, hdr.Name))\n\t\t\t\tif statErr != nil && !os.IsNotExist(statErr) && !isENOTDIR(statErr) {\n\t\t\t\t\t// Not sure what happened here.\n\t\t\t\t\treturn nil, statErr\n\t\t\t\t}\n\t\t\t\tif statErr == nil {\n\t\t\t\t\tif stat.Mode()&os.ModeCharDevice != 0 {\n\t\t\t\t\t\tif isWhiteOut(stat) {\n\t\t\t\t\t\t\treturn nil, nil //nolint: nilnil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// It's not whiteout, so it was there in the older layer, so we need to\n\t\t\t\t\t// add a whiteout for this item in this layer.\n\t\t\t\t\t// create a header for the whiteout file\n\t\t\t\t\t// it should inherit some properties from the parent, but be a regular file\n\t\t\t\t\two := &tar.Header{\n\t\t\t\t\t\tTypeflag:   tar.TypeReg,\n\t\t\t\t\t\tMode:       hdr.Mode & int64(os.ModePerm),\n\t\t\t\t\t\tName:       filepath.Join(hdr.Name, WhiteoutOpaqueDir),\n\t\t\t\t\t\tSize:       0,\n\t\t\t\t\t\tUid:        hdr.Uid,\n\t\t\t\t\t\tUname:      hdr.Uname,\n\t\t\t\t\t\tGid:        hdr.Gid,\n\t\t\t\t\t\tGname:      hdr.Gname,\n\t\t\t\t\t\tAccessTime: hdr.AccessTime,\n\t\t\t\t\t\tChangeTime: hdr.ChangeTime,\n\t\t\t\t\t}\n\t\t\t\t\treturn wo, nil\n\t\t\t\t}\n\t\t\t\tfor dir := filepath.Dir(hdr.Name); dir != \"\" && dir != \".\" && dir != string(os.PathSeparator); dir = filepath.Dir(dir) {\n\t\t\t\t\t// Check for whiteout for a parent directory in a parent layer.\n\t\t\t\t\tstat, statErr := os.Stat(filepath.Join(rolayer, dir))\n\t\t\t\t\tif statErr != nil && !os.IsNotExist(statErr) && !isENOTDIR(statErr) {\n\t\t\t\t\t\t// Not sure what happened here.\n\t\t\t\t\t\treturn nil, statErr\n\t\t\t\t\t}\n\t\t\t\t\tif statErr == nil {\n\t\t\t\t\t\tif stat.Mode()&os.ModeCharDevice != 0 {\n\t\t\t\t\t\t\t// If it's whiteout for a parent directory, then the\n\t\t\t\t\t\t\t// original directory wasn't inherited into this layer,\n\t\t\t\t\t\t\t// so we don't need to emit whiteout for it.\n\t\t\t\t\t\t\tif isWhiteOut(stat) {\n\t\t\t\t\t\t\t\treturn nil, nil //nolint: nilnil\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, nil\n}\n\nfunc (overlayWhiteoutConverter) ConvertReadWithHandler(hdr *tar.Header, path string, handler TarWhiteoutHandler) (bool, error) {\n\tbase := filepath.Base(path)\n\tdir := filepath.Dir(path)\n\n\t// if a directory is marked as opaque by the AUFS special file, we need to translate that to overlay\n\tif base == WhiteoutOpaqueDir {\n\t\terr := handler.Setxattr(dir, getOverlayOpaqueXattrName(), []byte{'y'})\n\t\t// don't write the file itself\n\t\treturn false, err\n\t}\n\n\t// if a file was deleted and we are using overlay, we need to create a character device\n\tif originalBase, ok := strings.CutPrefix(base, WhiteoutPrefix); ok {\n\t\toriginalPath := filepath.Join(dir, originalBase)\n\n\t\tif err := handler.Mknod(originalPath, unix.S_IFCHR, 0); err != nil {\n\t\t\t// If someone does:\n\t\t\t//     rm -rf /foo/bar\n\t\t\t// in an image, some tools will generate a layer with:\n\t\t\t//     /.wh.foo\n\t\t\t//     /foo/.wh.bar\n\t\t\t// and when doing the second mknod(), we will fail with\n\t\t\t// ENOTDIR, since the previous /foo was mknod()'d as a\n\t\t\t// character device node and not a directory.\n\t\t\tif isENOTDIR(err) {\n\t\t\t\treturn false, nil\n\t\t\t}\n\t\t\treturn false, err\n\t\t}\n\t\tif err := handler.Chown(originalPath, hdr.Uid, hdr.Gid); err != nil {\n\t\t\treturn false, err\n\t\t}\n\n\t\t// don't write the file itself\n\t\treturn false, nil\n\t}\n\n\treturn true, nil\n}\n\ntype directHandler struct{}\n\nfunc (d directHandler) Setxattr(path, name string, value []byte) error {\n\treturn unix.Setxattr(path, name, value, 0)\n}\n\nfunc (d directHandler) Mknod(path string, mode uint32, dev int) error {\n\treturn unix.Mknod(path, mode, dev)\n}\n\nfunc (d directHandler) Chown(path string, uid, gid int) error {\n\treturn idtools.SafeChown(path, uid, gid)\n}\n\nfunc (o overlayWhiteoutConverter) ConvertRead(hdr *tar.Header, path string) (bool, error) {\n\tvar handler directHandler\n\treturn o.ConvertReadWithHandler(hdr, path, handler)\n}\n\nfunc isWhiteOut(stat os.FileInfo) bool {\n\ts := stat.Sys().(*syscall.Stat_t)\n\treturn major(uint64(s.Rdev)) == 0 && minor(uint64(s.Rdev)) == 0 //nolint:unconvert\n}\n\nfunc GetFileOwner(path string) (uint32, uint32, uint32, error) {\n\tf, err := os.Stat(path)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\ts, ok := f.Sys().(*syscall.Stat_t)\n\tif ok {\n\t\treturn s.Uid, s.Gid, s.Mode & 0o7777, nil\n\t}\n\treturn 0, 0, uint32(f.Mode()), nil\n}\n\nfunc handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo, forceMask *os.FileMode) error {\n\tpermissionsMask := hdrInfo.Mode()\n\tif forceMask != nil {\n\t\tpermissionsMask = *forceMask\n\t}\n\tif hdr.Typeflag == tar.TypeLink {\n\t\tif fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) {\n\t\t\tif err := os.Chmod(path, permissionsMask); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else if hdr.Typeflag != tar.TypeSymlink {\n\t\tif err := os.Chmod(path, permissionsMask); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_other.go",
    "content": "//go:build !linux\n\npackage archive\n\nfunc GetWhiteoutConverter(_ WhiteoutFormat, _ any) TarWhiteoutConverter {\n\treturn nil\n}\n\nfunc GetFileOwner(path string) (uint32, uint32, uint32, error) {\n\treturn 0, 0, 0, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_unix.go",
    "content": "//go:build !windows\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc init() {\n\tsysStatOverride = statUnix\n}\n\n// statUnix populates hdr from system-dependent fields of fi without performing\n// any OS lookups.\n// Adapted from Moby.\nfunc statUnix(fi os.FileInfo, hdr *tar.Header) error {\n\ts, ok := fi.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\thdr.Uid = int(s.Uid)\n\thdr.Gid = int(s.Gid)\n\n\tif s.Mode&unix.S_IFBLK != 0 ||\n\t\ts.Mode&unix.S_IFCHR != 0 {\n\t\t// _nolint_: Whether this conversion is required is hardware- and OS-dependent: the value might be uint64 on Linux, int32 on macOS.\n\t\t// So, this might trigger either \"uncovert\" (if the conversion is unnecessary) or \"nolintlint\" (if it is required)\n\t\thdr.Devmajor = int64(unix.Major(uint64(s.Rdev))) //nolint:unconvert,nolintlint\n\t\thdr.Devminor = int64(unix.Minor(uint64(s.Rdev))) //nolint:unconvert,nolintlint\n\t}\n\n\treturn nil\n}\n\n// fixVolumePathPrefix does platform specific processing to ensure that if\n// the path being passed in is not in a volume path format, convert it to one.\nfunc fixVolumePathPrefix(srcPath string) string {\n\treturn srcPath\n}\n\n// getWalkRoot calculates the root path when performing a TarWithOptions.\n// We use a separate function as this is platform specific. On Linux, we\n// can't use filepath.Join(srcPath,include) because this will clean away\n// a trailing \".\" or \"/\" which may be important.\nfunc getWalkRoot(srcPath string, include string) string {\n\treturn srcPath + string(filepath.Separator) + include\n}\n\n// CanonicalTarNameForPath returns platform-specific filepath\n// to canonical posix-style path for tar archival. p is relative\n// path.\nfunc CanonicalTarNameForPath(p string) (string, error) {\n\treturn p, nil // already unix-style\n}\n\n// chmodTarEntry is used to adjust the file permissions used in tar header based\n// on the platform the archival is done.\n\nfunc chmodTarEntry(perm os.FileMode) os.FileMode {\n\treturn perm // noop for unix as golang APIs provide perm bits correctly\n}\n\nfunc setHeaderForSpecialDevice(hdr *tar.Header, stat any) {\n\ts, ok := stat.(*syscall.Stat_t)\n\n\tif ok {\n\t\t// Currently go does not fill in the major/minors\n\t\tif s.Mode&unix.S_IFBLK != 0 ||\n\t\t\ts.Mode&unix.S_IFCHR != 0 {\n\t\t\t// _nolint_: Whether this conversion is required is hardware- and OS-dependent: the value might be uint64 on Linux, int32 on macOS.\n\t\t\t// So, this might trigger either \"uncovert\" (if the conversion is unnecessary) or \"nolintlint\" (if it is required)\n\t\t\thdr.Devmajor = int64(major(uint64(s.Rdev))) //nolint: unconvert,nolintlint\n\t\t\thdr.Devminor = int64(minor(uint64(s.Rdev))) //nolint: unconvert,nolintlint\n\t\t}\n\t}\n}\n\nfunc getInodeFromStat(stat any) (inode uint64) {\n\ts, ok := stat.(*syscall.Stat_t)\n\n\tif ok {\n\t\tinode = s.Ino\n\t}\n\n\treturn inode\n}\n\nfunc getFileUIDGID(stat any) (idtools.IDPair, error) {\n\ts, ok := stat.(*syscall.Stat_t)\n\n\tif !ok {\n\t\treturn idtools.IDPair{}, errors.New(\"cannot convert stat value to syscall.Stat_t\")\n\t}\n\treturn idtools.IDPair{UID: int(s.Uid), GID: int(s.Gid)}, nil\n}\n\nfunc major(device uint64) uint64 {\n\treturn (device >> 8) & 0xfff\n}\n\nfunc minor(device uint64) uint64 {\n\treturn (device & 0xff) | ((device >> 12) & 0xfff00)\n}\n\n// handleTarTypeBlockCharFifo is an OS-specific helper function used by\n// createTarFile to handle the following types of header: Block; Char; Fifo\nfunc handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {\n\tmode := uint32(hdr.Mode & 0o7777)\n\tswitch hdr.Typeflag {\n\tcase tar.TypeBlock:\n\t\tmode |= unix.S_IFBLK\n\tcase tar.TypeChar:\n\t\tmode |= unix.S_IFCHR\n\tcase tar.TypeFifo:\n\t\tmode |= unix.S_IFIFO\n\t}\n\n\treturn system.Mknod(path, mode, system.Mkdev(hdr.Devmajor, hdr.Devminor))\n}\n\n// Hardlink without symlinks\nfunc handleLLink(targetPath, path string) error {\n\t// Note: on Linux, the link syscall will not follow symlinks.\n\t// This behavior is implementation-dependent since\n\t// POSIX.1-2008 so to make it clear that we need non-symlink\n\t// following here we use the linkat syscall which has a flags\n\t// field to select symlink following or not.\n\treturn unix.Linkat(unix.AT_FDCWD, targetPath, unix.AT_FDCWD, path, 0)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_windows.go",
    "content": "//go:build windows\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/longpath\"\n)\n\n// fixVolumePathPrefix does platform specific processing to ensure that if\n// the path being passed in is not in a volume path format, convert it to one.\nfunc fixVolumePathPrefix(srcPath string) string {\n\treturn longpath.AddPrefix(srcPath)\n}\n\n// getWalkRoot calculates the root path when performing a TarWithOptions.\n// We use a separate function as this is platform specific.\nfunc getWalkRoot(srcPath string, include string) string {\n\treturn filepath.Join(srcPath, include)\n}\n\n// CanonicalTarNameForPath returns platform-specific filepath\n// to canonical posix-style path for tar archival. p is relative\n// path.\nfunc CanonicalTarNameForPath(p string) (string, error) {\n\t// windows: convert windows style relative path with backslashes\n\t// into forward slashes. Since windows does not allow '/' or '\\'\n\t// in file names, it is mostly safe to replace however we must\n\t// check just in case\n\tif strings.Contains(p, \"/\") {\n\t\treturn \"\", fmt.Errorf(\"windows path contains forward slash: %s\", p)\n\t}\n\treturn strings.Replace(p, string(os.PathSeparator), \"/\", -1), nil\n}\n\n// chmodTarEntry is used to adjust the file permissions used in tar header based\n// on the platform the archival is done.\nfunc chmodTarEntry(perm os.FileMode) os.FileMode {\n\t// perm &= 0755 // this 0-ed out tar flags (like link, regular file, directory marker etc.)\n\tpermPart := perm & os.ModePerm\n\tnoPermPart := perm &^ os.ModePerm\n\t// Add the x bit: make everything +x from windows\n\tpermPart |= 0o111\n\tpermPart &= 0o755\n\n\treturn noPermPart | permPart\n}\n\nfunc setHeaderForSpecialDevice(hdr *tar.Header, stat any) {\n\t// do nothing. no notion of Rdev, Nlink in stat on Windows\n}\n\nfunc getInodeFromStat(_ any) uint64 {\n\t// do nothing. no notion of Inode in stat on Windows\n\treturn 0\n}\n\n// handleTarTypeBlockCharFifo is an OS-specific helper function used by\n// createTarFile to handle the following types of header: Block; Char; Fifo\nfunc handleTarTypeBlockCharFifo(_ *tar.Header, _ string) error {\n\treturn nil\n}\n\nfunc handleLChmod(_ *tar.Header, _ string, _ os.FileInfo, _ *os.FileMode) error {\n\treturn nil\n}\n\nfunc getFileUIDGID(_ any) (idtools.IDPair, error) {\n\t// no notion of file ownership mapping yet on Windows\n\treturn idtools.IDPair{UID: 0, GID: 0}, nil\n}\n\n// Hardlink without following symlinks\nfunc handleLLink(targetPath string, path string) error {\n\treturn os.Link(targetPath, path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/archive_zstd.go",
    "content": "package archive\n\nimport (\n\t\"io\"\n\n\t\"github.com/klauspost/compress/zstd\"\n)\n\ntype wrapperZstdDecoder struct {\n\tdecoder *zstd.Decoder\n}\n\nfunc (w *wrapperZstdDecoder) Close() error {\n\tw.decoder.Close()\n\treturn nil\n}\n\nfunc (w *wrapperZstdDecoder) DecodeAll(input, dst []byte) ([]byte, error) {\n\treturn w.decoder.DecodeAll(input, dst)\n}\n\nfunc (w *wrapperZstdDecoder) Read(p []byte) (int, error) {\n\treturn w.decoder.Read(p)\n}\n\nfunc (w *wrapperZstdDecoder) Reset(r io.Reader) error {\n\treturn w.decoder.Reset(r)\n}\n\nfunc (w *wrapperZstdDecoder) WriteTo(wr io.Writer) (int64, error) {\n\treturn w.decoder.WriteTo(wr)\n}\n\nfunc zstdReader(buf io.Reader) (io.ReadCloser, error) {\n\tdecoder, err := zstd.NewReader(buf)\n\treturn &wrapperZstdDecoder{decoder: decoder}, err\n}\n\nfunc zstdWriter(dest io.Writer) (io.WriteCloser, error) {\n\treturn zstd.NewWriter(dest)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/changes.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"cmp\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/pools\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\n// ChangeType represents the change type.\ntype ChangeType int\n\nconst (\n\t// ChangeModify represents the modify operation.\n\tChangeModify = iota\n\t// ChangeAdd represents the add operation.\n\tChangeAdd\n\t// ChangeDelete represents the delete operation.\n\tChangeDelete\n)\n\nfunc (c ChangeType) String() string {\n\tswitch c {\n\tcase ChangeModify:\n\t\treturn \"C\"\n\tcase ChangeAdd:\n\t\treturn \"A\"\n\tcase ChangeDelete:\n\t\treturn \"D\"\n\t}\n\treturn \"\"\n}\n\n// Change represents a change, it wraps the change type and path.\n// It describes changes of the files in the path respect to the\n// parent layers. The change could be modify, add, delete.\n// This is used for layer diff.\ntype Change struct {\n\tPath string\n\tKind ChangeType\n}\n\nfunc (change *Change) String() string {\n\treturn fmt.Sprintf(\"%s %s\", change.Kind, change.Path)\n}\n\nfunc compareChangesByPath(a, b Change) int {\n\treturn cmp.Compare(a.Path, b.Path)\n}\n\n// Gnu tar and the go tar writer don't have sub-second mtime\n// precision, which is problematic when we apply changes via tar\n// files, we handle this by comparing for exact times, *or* same\n// second count and either a or b having exactly 0 nanoseconds\nfunc sameFsTime(a, b time.Time) bool {\n\treturn a.Equal(b) ||\n\t\t(a.Unix() == b.Unix() &&\n\t\t\t(a.Nanosecond() == 0 || b.Nanosecond() == 0))\n}\n\nfunc sameFsTimeSpec(a, b syscall.Timespec) bool {\n\treturn a.Sec == b.Sec &&\n\t\t(a.Nsec == b.Nsec || a.Nsec == 0 || b.Nsec == 0)\n}\n\n// Changes walks the path rw and determines changes for the files in the path,\n// with respect to the parent layers\nfunc Changes(layers []string, rw string) ([]Change, error) {\n\treturn changes(layers, rw, aufsDeletedFile, aufsMetadataSkip, aufsWhiteoutPresent)\n}\n\nfunc aufsMetadataSkip(path string) (bool, error) {\n\tskip, err := filepath.Match(string(os.PathSeparator)+WhiteoutMetaPrefix+\"*\", path)\n\tif err != nil {\n\t\tskip = true\n\t}\n\treturn skip, err\n}\n\nfunc aufsDeletedFile(root, path string, fi os.FileInfo) (string, error) {\n\tf := filepath.Base(path)\n\n\t// If there is a whiteout, then the file was removed\n\tif originalFile, ok := strings.CutPrefix(f, WhiteoutPrefix); ok {\n\t\treturn filepath.Join(filepath.Dir(path), originalFile), nil\n\t}\n\n\treturn \"\", nil\n}\n\nfunc aufsWhiteoutPresent(root, path string) (bool, error) {\n\tf := filepath.Join(filepath.Dir(path), WhiteoutPrefix+filepath.Base(path))\n\terr := fileutils.Exists(filepath.Join(root, f))\n\tif err == nil {\n\t\treturn true, nil\n\t}\n\tif os.IsNotExist(err) || isENOTDIR(err) {\n\t\treturn false, nil\n\t}\n\treturn false, err\n}\n\nfunc isENOTDIR(err error) bool {\n\tif err == nil {\n\t\treturn false\n\t}\n\tif err == syscall.ENOTDIR {\n\t\treturn true\n\t}\n\tif perror, ok := err.(*os.PathError); ok {\n\t\tif errno, ok := perror.Err.(syscall.Errno); ok {\n\t\t\treturn errno == syscall.ENOTDIR\n\t\t}\n\t}\n\treturn false\n}\n\ntype (\n\tskipChange     func(string) (bool, error)\n\tdeleteChange   func(string, string, os.FileInfo) (string, error)\n\twhiteoutChange func(string, string) (bool, error)\n)\n\nfunc changes(layers []string, rw string, dc deleteChange, sc skipChange, wc whiteoutChange) ([]Change, error) {\n\tvar (\n\t\tchanges     []Change\n\t\tchangedDirs = make(map[string]struct{})\n\t)\n\n\terr := filepath.Walk(rw, func(path string, f os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Rebase path\n\t\tpath, err = filepath.Rel(rw, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// As this runs on the daemon side, file paths are OS specific.\n\t\tpath = filepath.Join(string(os.PathSeparator), path)\n\n\t\t// Skip root\n\t\tif path == string(os.PathSeparator) {\n\t\t\treturn nil\n\t\t}\n\n\t\tif sc != nil {\n\t\t\tif skip, err := sc(path); skip {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tchange := Change{\n\t\t\tPath: path,\n\t\t}\n\n\t\tdeletedFile, err := dc(rw, path, f)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Find out what kind of modification happened\n\t\tif deletedFile != \"\" {\n\t\t\tchange.Path = deletedFile\n\t\t\tchange.Kind = ChangeDelete\n\t\t} else {\n\t\t\t// Otherwise, the file was added\n\t\t\tchange.Kind = ChangeAdd\n\n\t\t\t// ...Unless it already existed in a top layer, in which case, it's a modification\n\t\tlayerScan:\n\t\t\tfor _, layer := range layers {\n\t\t\t\tif wc != nil {\n\t\t\t\t\t// ...Unless a lower layer also had whiteout for this directory or one of its parents,\n\t\t\t\t\t// in which case, it's new\n\t\t\t\t\tignore, err := wc(layer, path)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tif ignore {\n\t\t\t\t\t\tbreak layerScan\n\t\t\t\t\t}\n\t\t\t\t\tfor dir := filepath.Dir(path); dir != \"\" && dir != string(os.PathSeparator); dir = filepath.Dir(dir) {\n\t\t\t\t\t\tignore, err = wc(layer, dir)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ignore {\n\t\t\t\t\t\t\tbreak layerScan\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstat, err := os.Stat(filepath.Join(layer, path))\n\t\t\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err == nil {\n\t\t\t\t\t// The file existed in the top layer, so that's a modification\n\n\t\t\t\t\t// However, if it's a directory, maybe it wasn't actually modified.\n\t\t\t\t\t// If you modify /foo/bar/baz, then /foo will be part of the changed files only because it's the parent of bar\n\t\t\t\t\tif stat.IsDir() && f.IsDir() {\n\t\t\t\t\t\tif f.Size() == stat.Size() && f.Mode() == stat.Mode() && sameFsTime(f.ModTime(), stat.ModTime()) {\n\t\t\t\t\t\t\t// Both directories are the same, don't record the change\n\t\t\t\t\t\t\treturn nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchange.Kind = ChangeModify\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If /foo/bar/file.txt is modified, then /foo/bar must be part of the changed files.\n\t\t// This block is here to ensure the change is recorded even if the\n\t\t// modify time, mode and size of the parent directory in the rw and ro layers are all equal.\n\t\t// Check https://github.com/docker/docker/pull/13590 for details.\n\t\tif f.IsDir() {\n\t\t\tchangedDirs[path] = struct{}{}\n\t\t}\n\t\tif change.Kind == ChangeAdd || change.Kind == ChangeDelete {\n\t\t\tparent := filepath.Dir(path)\n\t\t\ttail := []Change{}\n\t\t\tfor parent != \"/\" {\n\t\t\t\tif _, ok := changedDirs[parent]; !ok && parent != \"/\" {\n\t\t\t\t\ttail = append([]Change{{Path: parent, Kind: ChangeModify}}, tail...)\n\t\t\t\t\tchangedDirs[parent] = struct{}{}\n\t\t\t\t}\n\t\t\t\tparent = filepath.Dir(parent)\n\t\t\t}\n\t\t\tchanges = append(changes, tail...)\n\t\t}\n\n\t\t// Record change\n\t\tchanges = append(changes, change)\n\t\treturn nil\n\t})\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn nil, err\n\t}\n\treturn changes, nil\n}\n\n// FileInfo describes the information of a file.\ntype FileInfo struct {\n\tparent     *FileInfo\n\tidMappings *idtools.IDMappings\n\tname       string\n\tstat       *system.StatT\n\tchildren   map[string]*FileInfo\n\tcapability []byte\n\tadded      bool\n\txattrs     map[string]string\n\ttarget     string\n}\n\n// LookUp looks up the file information of a file.\nfunc (info *FileInfo) LookUp(path string) *FileInfo {\n\t// As this runs on the daemon side, file paths are OS specific.\n\tparent := info\n\tif path == string(os.PathSeparator) {\n\t\treturn info\n\t}\n\n\tfor elem := range strings.SplitSeq(path, string(os.PathSeparator)) {\n\t\tif elem != \"\" {\n\t\t\tchild := parent.children[elem]\n\t\t\tif child == nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tparent = child\n\t\t}\n\t}\n\treturn parent\n}\n\nfunc (info *FileInfo) path() string {\n\tif info.parent == nil {\n\t\t// As this runs on the daemon side, file paths are OS specific.\n\t\treturn string(os.PathSeparator)\n\t}\n\treturn filepath.Join(info.parent.path(), info.name)\n}\n\nfunc (info *FileInfo) addChanges(oldInfo *FileInfo, changes *[]Change) {\n\tsizeAtEntry := len(*changes)\n\n\tif oldInfo == nil {\n\t\t// add\n\t\tchange := Change{\n\t\t\tPath: info.path(),\n\t\t\tKind: ChangeAdd,\n\t\t}\n\t\t*changes = append(*changes, change)\n\t\tinfo.added = true\n\t}\n\n\t// We make a copy so we can modify it to detect additions\n\t// also, we only recurse on the old dir if the new info is a directory\n\t// otherwise any previous delete/change is considered recursive\n\toldChildren := make(map[string]*FileInfo)\n\tif oldInfo != nil && info.isDir() {\n\t\tmaps.Copy(oldChildren, oldInfo.children)\n\t}\n\n\tfor name, newChild := range info.children {\n\t\toldChild := oldChildren[name]\n\t\tif oldChild != nil {\n\t\t\t// change?\n\t\t\toldStat := oldChild.stat\n\t\t\tnewStat := newChild.stat\n\t\t\t// Note: We can't compare inode or ctime or blocksize here, because these change\n\t\t\t// when copying a file into a container. However, that is not generally a problem\n\t\t\t// because any content change will change mtime, and any status change should\n\t\t\t// be visible when actually comparing the stat fields. The only time this\n\t\t\t// breaks down is if some code intentionally hides a change by setting\n\t\t\t// back mtime\n\t\t\tif statDifferent(oldStat, oldInfo, newStat, info) ||\n\t\t\t\t!bytes.Equal(oldChild.capability, newChild.capability) ||\n\t\t\t\toldChild.target != newChild.target ||\n\t\t\t\t!maps.Equal(oldChild.xattrs, newChild.xattrs) {\n\t\t\t\tchange := Change{\n\t\t\t\t\tPath: newChild.path(),\n\t\t\t\t\tKind: ChangeModify,\n\t\t\t\t}\n\t\t\t\t*changes = append(*changes, change)\n\t\t\t\tnewChild.added = true\n\t\t\t}\n\n\t\t\t// Remove from copy so we can detect deletions\n\t\t\tdelete(oldChildren, name)\n\t\t}\n\n\t\tnewChild.addChanges(oldChild, changes)\n\t}\n\tfor _, oldChild := range oldChildren {\n\t\t// delete\n\t\tchange := Change{\n\t\t\tPath: oldChild.path(),\n\t\t\tKind: ChangeDelete,\n\t\t}\n\t\t*changes = append(*changes, change)\n\t}\n\n\t// If there were changes inside this directory, we need to add it, even if the directory\n\t// itself wasn't changed. This is needed to properly save and restore filesystem permissions.\n\t// As this runs on the daemon side, file paths are OS specific.\n\tif len(*changes) > sizeAtEntry && info.isDir() && !info.added && info.path() != string(os.PathSeparator) {\n\t\tchange := Change{\n\t\t\tPath: info.path(),\n\t\t\tKind: ChangeModify,\n\t\t}\n\t\t// Let's insert the directory entry before the recently added entries located inside this dir\n\t\t*changes = append(*changes, change) // just to resize the slice, will be overwritten\n\t\tcopy((*changes)[sizeAtEntry+1:], (*changes)[sizeAtEntry:])\n\t\t(*changes)[sizeAtEntry] = change\n\t}\n}\n\n// Changes add changes to file information.\nfunc (info *FileInfo) Changes(oldInfo *FileInfo) []Change {\n\tvar changes []Change\n\n\tinfo.addChanges(oldInfo, &changes)\n\n\treturn changes\n}\n\nfunc newRootFileInfo(idMappings *idtools.IDMappings) *FileInfo {\n\t// As this runs on the daemon side, file paths are OS specific.\n\troot := &FileInfo{\n\t\tname:       string(os.PathSeparator),\n\t\tidMappings: idMappings,\n\t\tchildren:   make(map[string]*FileInfo),\n\t\ttarget:     \"\",\n\t}\n\treturn root\n}\n\n// ChangesDirs compares two directories and generates an array of Change objects describing the changes.\n// If oldDir is \"\", then all files in newDir will be Add-Changes.\nfunc ChangesDirs(newDir string, newMappings *idtools.IDMappings, oldDir string, oldMappings *idtools.IDMappings) ([]Change, error) {\n\tvar oldRoot, newRoot *FileInfo\n\tif oldDir == \"\" {\n\t\temptyDir, err := os.MkdirTemp(\"\", \"empty\")\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer os.Remove(emptyDir)\n\t\toldDir = emptyDir\n\t}\n\toldRoot, newRoot, err := collectFileInfoForChanges(oldDir, newDir, oldMappings, newMappings)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn newRoot.Changes(oldRoot), nil\n}\n\n// ChangesSize calculates the size in bytes of the provided changes, based on newDir.\nfunc ChangesSize(newDir string, changes []Change) int64 {\n\tvar (\n\t\tsize int64\n\t\tsf   = make(map[uint64]struct{})\n\t)\n\tfor _, change := range changes {\n\t\tif change.Kind == ChangeModify || change.Kind == ChangeAdd {\n\t\t\tfile := filepath.Join(newDir, change.Path)\n\t\t\tfileInfo, err := os.Lstat(file)\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Errorf(\"Can not stat %q: %s\", file, err)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif fileInfo != nil && !fileInfo.IsDir() {\n\t\t\t\tif hasHardlinks(fileInfo) {\n\t\t\t\t\tinode := getIno(fileInfo)\n\t\t\t\t\tif _, ok := sf[inode]; !ok {\n\t\t\t\t\t\tsize += fileInfo.Size()\n\t\t\t\t\t\tsf[inode] = struct{}{}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsize += fileInfo.Size()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn size\n}\n\n// ExportChanges produces an Archive from the provided changes, relative to dir.\nfunc ExportChanges(dir string, changes []Change, uidMaps, gidMaps []idtools.IDMap) (io.ReadCloser, error) {\n\treader, writer := io.Pipe()\n\tgo func() {\n\t\tta := newTarWriter(idtools.NewIDMappingsFromMaps(uidMaps, gidMaps), writer, nil, nil)\n\n\t\t// this buffer is needed for the duration of this piped stream\n\t\tdefer pools.BufioWriter32KPool.Put(ta.Buffer)\n\n\t\tslices.SortFunc(changes, compareChangesByPath)\n\n\t\t// In general we log errors here but ignore them because\n\t\t// during e.g. a diff operation the container can continue\n\t\t// mutating the filesystem and we can see transient errors\n\t\t// from this\n\t\tfor _, change := range changes {\n\t\t\tif change.Kind == ChangeDelete {\n\t\t\t\twhiteOutDir := filepath.Dir(change.Path)\n\t\t\t\twhiteOutBase := filepath.Base(change.Path)\n\t\t\t\twhiteOut := filepath.Join(whiteOutDir, WhiteoutPrefix+whiteOutBase)\n\t\t\t\ttimestamp := time.Now()\n\t\t\t\thdr := &tar.Header{\n\t\t\t\t\tName:       whiteOut[1:],\n\t\t\t\t\tSize:       0,\n\t\t\t\t\tModTime:    timestamp,\n\t\t\t\t\tAccessTime: timestamp,\n\t\t\t\t\tChangeTime: timestamp,\n\t\t\t\t}\n\t\t\t\tif err := ta.TarWriter.WriteHeader(hdr); err != nil {\n\t\t\t\t\tlogrus.Debugf(\"Can't write whiteout header: %s\", err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpath := filepath.Join(dir, change.Path)\n\t\t\t\theaders, err := ta.prepareAddFile(path, change.Path[1:])\n\t\t\t\tif err != nil {\n\t\t\t\t\tlogrus.Debugf(\"Can't add file %s to tar: %s\", path, err)\n\t\t\t\t} else if headers != nil {\n\t\t\t\t\tif err := ta.addFile(headers); err != nil {\n\t\t\t\t\t\twriter.CloseWithError(err)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Make sure to check the error on Close.\n\t\tif err := ta.TarWriter.Close(); err != nil {\n\t\t\tlogrus.Debugf(\"Can't close layer: %s\", err)\n\t\t}\n\t\tif err := writer.Close(); err != nil {\n\t\t\tlogrus.Debugf(\"failed close Changes writer: %s\", err)\n\t\t}\n\t}()\n\treturn reader, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/changes_linux.go",
    "content": "package archive\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// walker is used to implement collectFileInfoForChanges on linux. Where this\n// method in general returns the entire contents of two directory trees, we\n// optimize some FS calls out on linux. In particular, we take advantage of the\n// fact that getdents(2) returns the inode of each file in the directory being\n// walked, which, when walking two trees in parallel to generate a list of\n// changes, can be used to prune subtrees without ever having to lstat(2) them\n// directly. Eliminating stat calls in this way can save up to seconds on large\n// images.\ntype walker struct {\n\tdir1   string\n\tdir2   string\n\troot1  *FileInfo\n\troot2  *FileInfo\n\tidmap1 *idtools.IDMappings //nolint:unused\n\tidmap2 *idtools.IDMappings //nolint:unused\n}\n\n// collectFileInfoForChanges returns a complete representation of the trees\n// rooted at dir1 and dir2, with one important exception: any subtree or\n// leaf where the inode and device numbers are an exact match between dir1\n// and dir2 will be pruned from the results. This method is *only* to be used\n// to generating a list of changes between the two directories, as it does not\n// reflect the full contents.\nfunc collectFileInfoForChanges(dir1, dir2 string, idmap1, idmap2 *idtools.IDMappings) (*FileInfo, *FileInfo, error) {\n\tw := &walker{\n\t\tdir1:  dir1,\n\t\tdir2:  dir2,\n\t\troot1: newRootFileInfo(idmap1),\n\t\troot2: newRootFileInfo(idmap2),\n\t}\n\n\ti1, err := os.Lstat(w.dir1)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\ti2, err := os.Lstat(w.dir2)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif err := w.walk(\"/\", i1, i2); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn w.root1, w.root2, nil\n}\n\n// Given a FileInfo, its path info, and a reference to the root of the tree\n// being constructed, register this file with the tree.\nfunc walkchunk(path string, fi os.FileInfo, dir string, root *FileInfo) error {\n\tif fi == nil {\n\t\treturn nil\n\t}\n\tparent := root.LookUp(filepath.Dir(path))\n\tif parent == nil {\n\t\treturn fmt.Errorf(\"walkchunk: Unexpectedly no parent for %s\", path)\n\t}\n\tinfo := &FileInfo{\n\t\tname:       filepath.Base(path),\n\t\tchildren:   make(map[string]*FileInfo),\n\t\tparent:     parent,\n\t\tidMappings: root.idMappings,\n\t\ttarget:     \"\",\n\t}\n\tcpath := filepath.Join(dir, path)\n\tstat, err := system.FromStatT(fi.Sys().(*syscall.Stat_t))\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo.stat = stat\n\tinfo.capability, err = system.Lgetxattr(cpath, \"security.capability\") // lgetxattr(2): fs access\n\tif err != nil && !errors.Is(err, system.ENOTSUP) {\n\t\treturn err\n\t}\n\txattrs, err := system.Llistxattr(cpath)\n\tif err != nil && !errors.Is(err, system.ENOTSUP) {\n\t\treturn err\n\t}\n\tfor _, key := range xattrs {\n\t\tif strings.HasPrefix(key, \"user.\") {\n\t\t\tvalue, err := system.Lgetxattr(cpath, key)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, system.E2BIG) {\n\t\t\t\t\tlogrus.Errorf(\"archive: Skipping xattr for file %s since value is too big: %s\", cpath, key)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif info.xattrs == nil {\n\t\t\t\tinfo.xattrs = make(map[string]string)\n\t\t\t}\n\t\t\tinfo.xattrs[key] = string(value)\n\t\t}\n\t}\n\tif fi.Mode()&os.ModeSymlink != 0 {\n\t\tinfo.target, err = os.Readlink(cpath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tparent.children[info.name] = info\n\treturn nil\n}\n\n// Walk a subtree rooted at the same path in both trees being iterated. For\n// example, /docker/overlay/1234/a/b/c/d and /docker/overlay/8888/a/b/c/d\nfunc (w *walker) walk(path string, i1, i2 os.FileInfo) (err error) {\n\t// Register these nodes with the return trees, unless we're still at the\n\t// (already-created) roots:\n\tif path != \"/\" {\n\t\tif err := walkchunk(path, i1, w.dir1, w.root1); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := walkchunk(path, i2, w.dir2, w.root2); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tis1Dir := i1 != nil && i1.IsDir()\n\tis2Dir := i2 != nil && i2.IsDir()\n\n\tsameDevice := false\n\tif i1 != nil && i2 != nil {\n\t\tsi1 := i1.Sys().(*syscall.Stat_t)\n\t\tsi2 := i2.Sys().(*syscall.Stat_t)\n\t\tif si1.Dev == si2.Dev {\n\t\t\tsameDevice = true\n\t\t}\n\t}\n\n\t// If these files are both non-existent, or leaves (non-dirs), we are done.\n\tif !is1Dir && !is2Dir {\n\t\treturn nil\n\t}\n\n\t// Fetch the names of all the files contained in both directories being walked:\n\tvar names1, names2 []nameIno\n\tif is1Dir {\n\t\tnames1, err = readdirnames(filepath.Join(w.dir1, path)) // getdents(2): fs access\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif is2Dir {\n\t\tnames2, err = readdirnames(filepath.Join(w.dir2, path)) // getdents(2): fs access\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// We have lists of the files contained in both parallel directories, sorted\n\t// in the same order. Walk them in parallel, generating a unique merged list\n\t// of all items present in either or both directories.\n\tvar names []string\n\tix1 := 0\n\tix2 := 0\n\n\tfor ix1 < len(names1) && ix2 < len(names2) {\n\t\tni1 := names1[ix1]\n\t\tni2 := names2[ix2]\n\n\t\tswitch bytes.Compare([]byte(ni1.name), []byte(ni2.name)) {\n\t\tcase -1: // ni1 < ni2 -- advance ni1\n\t\t\t// we will not encounter ni1 in names2\n\t\t\tnames = append(names, ni1.name)\n\t\t\tix1++\n\t\tcase 0: // ni1 == ni2\n\t\t\tif ni1.ino != ni2.ino || !sameDevice {\n\t\t\t\tnames = append(names, ni1.name)\n\t\t\t}\n\t\t\tix1++\n\t\t\tix2++\n\t\tcase 1: // ni1 > ni2 -- advance ni2\n\t\t\t// we will not encounter ni2 in names1\n\t\t\tnames = append(names, ni2.name)\n\t\t\tix2++\n\t\t}\n\t}\n\tfor ix1 < len(names1) {\n\t\tnames = append(names, names1[ix1].name)\n\t\tix1++\n\t}\n\tfor ix2 < len(names2) {\n\t\tnames = append(names, names2[ix2].name)\n\t\tix2++\n\t}\n\n\t// For each of the names present in either or both of the directories being\n\t// iterated, stat the name under each root, and recurse the pair of them:\n\tfor _, name := range names {\n\t\tfname := filepath.Join(path, name)\n\t\tvar cInfo1, cInfo2 os.FileInfo\n\t\tif is1Dir {\n\t\t\tcInfo1, err = os.Lstat(filepath.Join(w.dir1, fname)) // lstat(2): fs access\n\t\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif is2Dir {\n\t\t\tcInfo2, err = os.Lstat(filepath.Join(w.dir2, fname)) // lstat(2): fs access\n\t\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err = w.walk(fname, cInfo1, cInfo2); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// {name,inode} pairs used to support the early-pruning logic of the walker type\ntype nameIno struct {\n\tname string\n\tino  uint64\n}\n\n// readdirnames is a hacked-apart version of the Go stdlib code, exposing inode\n// numbers further up the stack when reading directory contents. Unlike\n// os.Readdirnames, which returns a list of filenames, this function returns a\n// list of {filename,inode} pairs.\nfunc readdirnames(dirname string) (names []nameIno, err error) {\n\tvar (\n\t\tsize = 100\n\t\tbuf  = make([]byte, 4096)\n\t\tnbuf int\n\t\tbufp int\n\t\tnb   int\n\t)\n\n\tf, err := os.Open(dirname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\n\tnames = make([]nameIno, 0, size) // Empty with room to grow.\n\tfor {\n\t\t// Refill the buffer if necessary\n\t\tif bufp >= nbuf {\n\t\t\tbufp = 0\n\t\t\tnbuf, err = unix.ReadDirent(int(f.Fd()), buf) // getdents on linux\n\t\t\tif nbuf < 0 {\n\t\t\t\tnbuf = 0\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn nil, os.NewSyscallError(\"readdirent\", err)\n\t\t\t}\n\t\t\tif nbuf <= 0 {\n\t\t\t\tbreak // EOF\n\t\t\t}\n\t\t}\n\n\t\t// Drain the buffer\n\t\tnb, names = parseDirent(buf[bufp:nbuf], names)\n\t\tbufp += nb\n\t}\n\n\tslices.SortFunc(names, func(a, b nameIno) int {\n\t\treturn cmp.Compare(a.name, b.name)\n\t})\n\treturn names, nil\n}\n\n// parseDirent is a minor modification of unix.ParseDirent (linux version)\n// which returns {name,inode} pairs instead of just names.\nfunc parseDirent(buf []byte, names []nameIno) (consumed int, newnames []nameIno) {\n\toriglen := len(buf)\n\tfor len(buf) > 0 {\n\t\tdirent := (*unix.Dirent)(unsafe.Pointer(&buf[0]))\n\t\tbuf = buf[dirent.Reclen:]\n\t\tif dirent.Ino == 0 { // File absent in directory.\n\t\t\tcontinue\n\t\t}\n\t\tbuilder := make([]byte, 0, dirent.Reclen)\n\t\tfor i := range len(dirent.Name) {\n\t\t\tif dirent.Name[i] == 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tbuilder = append(builder, byte(dirent.Name[i]))\n\t\t}\n\t\tname := string(builder)\n\t\tif name == \".\" || name == \"..\" { // Useless names\n\t\t\tcontinue\n\t\t}\n\t\tnames = append(names, nameIno{name, dirent.Ino})\n\t}\n\treturn origlen - len(buf), names\n}\n\n// OverlayChanges walks the path rw and determines changes for the files in the path,\n// with respect to the parent layers\nfunc OverlayChanges(layers []string, rw string) ([]Change, error) {\n\tdc := func(root, path string, fi os.FileInfo) (string, error) {\n\t\tr, err := overlayDeletedFile(layers, root, path, fi)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"overlay deleted file query: %w\", err)\n\t\t}\n\t\treturn r, nil\n\t}\n\treturn changes(layers, rw, dc, nil, overlayLowerContainsWhiteout)\n}\n\nfunc overlayLowerContainsWhiteout(root, path string) (bool, error) {\n\t// Whiteout for a file or directory has the same name, but is for a character\n\t// device with major/minor of 0/0.\n\tstat, err := os.Stat(filepath.Join(root, path))\n\tif err != nil && !os.IsNotExist(err) && !isENOTDIR(err) {\n\t\t// Not sure what happened here.\n\t\treturn false, err\n\t}\n\tif err == nil && stat.Mode()&os.ModeCharDevice != 0 {\n\t\tif isWhiteOut(stat) {\n\t\t\treturn true, nil\n\t\t}\n\t}\n\treturn false, nil\n}\n\nfunc overlayDeletedFile(layers []string, root, path string, fi os.FileInfo) (string, error) {\n\t// If it's a whiteout item, then a file or directory with that name is removed by this layer.\n\tif fi.Mode()&os.ModeCharDevice != 0 {\n\t\tif isWhiteOut(fi) {\n\t\t\treturn path, nil\n\t\t}\n\t}\n\t// After this we only need to pay attention to directories.\n\tif !fi.IsDir() {\n\t\treturn \"\", nil\n\t}\n\t// If the directory isn't marked as opaque, then it's just a normal directory.\n\topaque, err := system.Lgetxattr(filepath.Join(root, path), getOverlayOpaqueXattrName())\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed querying overlay opaque xattr: %w\", err)\n\t}\n\tif len(opaque) != 1 || opaque[0] != 'y' {\n\t\treturn \"\", err\n\t}\n\t// If there are no lower layers, then it can't have been deleted and recreated in this layer.\n\tif len(layers) == 0 {\n\t\treturn \"\", err\n\t}\n\t// At this point, we have a directory that's opaque.  If it appears in one of the lower\n\t// layers, then it was newly-created here, so it wasn't also deleted here.\n\tfor _, layer := range layers {\n\t\tstat, err := os.Stat(filepath.Join(layer, path))\n\t\tif err != nil && !os.IsNotExist(err) && !isENOTDIR(err) {\n\t\t\t// Not sure what happened here.\n\t\t\treturn \"\", err\n\t\t}\n\t\tif err == nil {\n\t\t\tif stat.Mode()&os.ModeCharDevice != 0 {\n\t\t\t\tif isWhiteOut(stat) {\n\t\t\t\t\treturn \"\", nil\n\t\t\t\t}\n\t\t\t}\n\t\t\t// It's not whiteout, so it was there in the older layer, so it has to be\n\t\t\t// marked as deleted in this layer.\n\t\t\treturn path, nil\n\t\t}\n\t\tfor dir := filepath.Dir(path); dir != \"\" && dir != string(os.PathSeparator); dir = filepath.Dir(dir) {\n\t\t\t// Check for whiteout for a parent directory.\n\t\t\tstat, err := os.Stat(filepath.Join(layer, dir))\n\t\t\tif err != nil && !os.IsNotExist(err) && !isENOTDIR(err) {\n\t\t\t\t// Not sure what happened here.\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tif err == nil {\n\t\t\t\tif stat.Mode()&os.ModeCharDevice != 0 {\n\t\t\t\t\tif isWhiteOut(stat) {\n\t\t\t\t\t\treturn \"\", nil\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// We didn't find the same path in any older layers, so it was new in this one.\n\treturn \"\", nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/changes_other.go",
    "content": "//go:build !linux\n\npackage archive\n\nimport (\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nfunc collectFileInfoForChanges(oldDir, newDir string, oldIDMap, newIDMap *idtools.IDMappings) (*FileInfo, *FileInfo, error) {\n\tvar (\n\t\toldRoot, newRoot *FileInfo\n\t\terr1, err2       error\n\t\terrs             = make(chan error, 2)\n\t)\n\tgo func() {\n\t\toldRoot, err1 = collectFileInfo(oldDir, oldIDMap)\n\t\terrs <- err1\n\t}()\n\tgo func() {\n\t\tnewRoot, err2 = collectFileInfo(newDir, newIDMap)\n\t\terrs <- err2\n\t}()\n\n\t// block until both routines have returned\n\tfor range 2 {\n\t\tif err := <-errs; err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\treturn oldRoot, newRoot, nil\n}\n\nfunc collectFileInfo(sourceDir string, idMappings *idtools.IDMappings) (*FileInfo, error) {\n\troot := newRootFileInfo(idMappings)\n\n\tsourceStat, err := system.Lstat(sourceDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = filepath.WalkDir(sourceDir, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Rebase path\n\t\trelPath, err := filepath.Rel(sourceDir, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// As this runs on the daemon side, file paths are OS specific.\n\t\trelPath = filepath.Join(string(os.PathSeparator), relPath)\n\n\t\t// See https://github.com/golang/go/issues/9168 - bug in filepath.Join.\n\t\t// Temporary workaround. If the returned path starts with two backslashes,\n\t\t// trim it down to a single backslash. Only relevant on Windows.\n\t\tif runtime.GOOS == \"windows\" {\n\t\t\tif strings.HasPrefix(relPath, `\\\\`) {\n\t\t\t\trelPath = relPath[1:]\n\t\t\t}\n\t\t}\n\n\t\tif relPath == string(os.PathSeparator) {\n\t\t\treturn nil\n\t\t}\n\n\t\tparent := root.LookUp(filepath.Dir(relPath))\n\t\tif parent == nil {\n\t\t\treturn fmt.Errorf(\"collectFileInfo: Unexpectedly no parent for %s\", relPath)\n\t\t}\n\n\t\tinfo := &FileInfo{\n\t\t\tname:       filepath.Base(relPath),\n\t\t\tchildren:   make(map[string]*FileInfo),\n\t\t\tparent:     parent,\n\t\t\tidMappings: idMappings,\n\t\t}\n\n\t\ts, err := system.Lstat(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Don't cross mount points. This ignores file mounts to avoid\n\t\t// generating a diff which deletes all files following the\n\t\t// mount.\n\t\tif s.Dev() != sourceStat.Dev() && s.IsDir() {\n\t\t\treturn filepath.SkipDir\n\t\t}\n\n\t\tinfo.stat = s\n\t\tinfo.capability, _ = system.Lgetxattr(path, \"security.capability\")\n\n\t\tparent.children[info.name] = info\n\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn root, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/changes_unix.go",
    "content": "//go:build !windows\n\npackage archive\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc statDifferent(oldStat *system.StatT, oldInfo *FileInfo, newStat *system.StatT, newInfo *FileInfo) bool {\n\t// Don't look at size for dirs, its not a good measure of change\n\toldUID, oldGID := oldStat.UID(), oldStat.GID()\n\tuid, gid := newStat.UID(), newStat.GID()\n\tif cuid, cgid, err := newInfo.idMappings.ToContainer(idtools.IDPair{UID: int(uid), GID: int(gid)}); err == nil {\n\t\tuid = uint32(cuid)\n\t\tgid = uint32(cgid)\n\t\tif oldInfo != nil {\n\t\t\tif oldcuid, oldcgid, err := oldInfo.idMappings.ToContainer(idtools.IDPair{UID: int(oldUID), GID: int(oldGID)}); err == nil {\n\t\t\t\toldUID = uint32(oldcuid)\n\t\t\t\toldGID = uint32(oldcgid)\n\t\t\t}\n\t\t}\n\t}\n\townerChanged := uid != oldUID || gid != oldGID\n\tif oldStat.Mode() != newStat.Mode() ||\n\t\townerChanged ||\n\t\toldStat.Rdev() != newStat.Rdev() ||\n\t\toldStat.Flags() != newStat.Flags() ||\n\t\t!sameFsTimeSpec(oldStat.Mtim(), newStat.Mtim()) ||\n\t\t// Don't look at size for dirs, its not a good measure of change\n\t\t((oldStat.Mode()&unix.S_IFDIR != unix.S_IFDIR) && (oldStat.Size() != newStat.Size())) {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (info *FileInfo) isDir() bool {\n\treturn info.parent == nil || info.stat.Mode()&unix.S_IFDIR != 0\n}\n\nfunc getIno(fi os.FileInfo) uint64 {\n\treturn fi.Sys().(*syscall.Stat_t).Ino\n}\n\nfunc hasHardlinks(fi os.FileInfo) bool {\n\treturn fi.Sys().(*syscall.Stat_t).Nlink > 1\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/changes_windows.go",
    "content": "package archive\n\nimport (\n\t\"os\"\n\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nfunc statDifferent(oldStat *system.StatT, _ *FileInfo, newStat *system.StatT, _ *FileInfo) bool {\n\t// Don't look at size for dirs, its not a good measure of change\n\tif oldStat.Mtim() != newStat.Mtim() ||\n\t\toldStat.Mode() != newStat.Mode() ||\n\t\toldStat.Size() != newStat.Size() && !oldStat.Mode().IsDir() {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (info *FileInfo) isDir() bool {\n\treturn info.parent == nil || info.stat.Mode().IsDir()\n}\n\nfunc getIno(_ os.FileInfo) uint64 {\n\treturn 0\n}\n\nfunc hasHardlinks(_ os.FileInfo) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/copy.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n)\n\n// Errors used or returned by this file.\nvar (\n\tErrNotDirectory      = errors.New(\"not a directory\")\n\tErrDirNotExists      = errors.New(\"no such directory\")\n\tErrCannotCopyDir     = errors.New(\"cannot copy directory\")\n\tErrInvalidCopySource = errors.New(\"invalid copy source content\")\n)\n\n// PreserveTrailingDotOrSeparator returns the given cleaned path (after\n// processing using any utility functions from the path or filepath stdlib\n// packages) and appends a trailing `/.` or `/` if its corresponding  original\n// path (from before being processed by utility functions from the path or\n// filepath stdlib packages) ends with a trailing `/.` or `/`. If the cleaned\n// path already ends in a `.` path segment, then another is not added. If the\n// clean path already ends in a path separator, then another is not added.\nfunc PreserveTrailingDotOrSeparator(cleanedPath, originalPath string) string {\n\t// Ensure paths are in platform semantics\n\tcleanedPath = normalizePath(cleanedPath)\n\toriginalPath = normalizePath(originalPath)\n\n\tif !specifiesCurrentDir(cleanedPath) && specifiesCurrentDir(originalPath) {\n\t\tif !hasTrailingPathSeparator(cleanedPath) {\n\t\t\t// Add a separator if it doesn't already end with one (a cleaned\n\t\t\t// path would only end in a separator if it is the root).\n\t\t\tcleanedPath += string(filepath.Separator)\n\t\t}\n\t\tcleanedPath += \".\"\n\t}\n\n\tif !hasTrailingPathSeparator(cleanedPath) && hasTrailingPathSeparator(originalPath) {\n\t\tcleanedPath += string(filepath.Separator)\n\t}\n\n\treturn cleanedPath\n}\n\n// assertsDirectory returns whether the given path is\n// asserted to be a directory, i.e., the path ends with\n// a trailing '/' or `/.`, assuming a path separator of `/`.\nfunc assertsDirectory(path string) bool {\n\treturn hasTrailingPathSeparator(path) || specifiesCurrentDir(path)\n}\n\n// hasTrailingPathSeparator returns whether the given\n// path ends with the system's path separator character.\nfunc hasTrailingPathSeparator(path string) bool {\n\treturn len(path) > 0 && os.IsPathSeparator(path[len(path)-1])\n}\n\n// specifiesCurrentDir returns whether the given path specifies\n// a \"current directory\", i.e., the last path segment is `.`.\nfunc specifiesCurrentDir(path string) bool {\n\treturn filepath.Base(path) == \".\"\n}\n\n// SplitPathDirEntry splits the given path between its directory name and its\n// basename by first cleaning the path but preserves a trailing \".\" if the\n// original path specified the current directory.\nfunc SplitPathDirEntry(path string) (dir, base string) {\n\tcleanedPath := filepath.Clean(normalizePath(path))\n\n\tif specifiesCurrentDir(path) {\n\t\tcleanedPath += string(filepath.Separator) + \".\"\n\t}\n\n\treturn filepath.Dir(cleanedPath), filepath.Base(cleanedPath)\n}\n\n// TarResource archives the resource described by the given CopyInfo to a Tar\n// archive. A non-nil error is returned if sourcePath does not exist or is\n// asserted to be a directory but exists as another type of file.\n//\n// This function acts as a convenient wrapper around TarWithOptions, which\n// requires a directory as the source path. TarResource accepts either a\n// directory or a file path and correctly sets the Tar options.\nfunc TarResource(sourceInfo CopyInfo) (content io.ReadCloser, err error) {\n\treturn TarResourceRebase(sourceInfo.Path, sourceInfo.RebaseName)\n}\n\n// TarResourceRebase is like TarResource but renames the first path element of\n// items in the resulting tar archive to match the given rebaseName if not \"\".\nfunc TarResourceRebase(sourcePath, rebaseName string) (io.ReadCloser, error) {\n\tsourcePath = normalizePath(sourcePath)\n\tif err := fileutils.Lexists(sourcePath); err != nil {\n\t\t// Catches the case where the source does not exist or is not a\n\t\t// directory if asserted to be a directory, as this also causes an\n\t\t// error.\n\t\treturn nil, err\n\t}\n\n\t// Separate the source path between its directory and\n\t// the entry in that directory which we are archiving.\n\tsourceDir, sourceBase := SplitPathDirEntry(sourcePath)\n\n\tfilter := []string{sourceBase}\n\n\tlogrus.Debugf(\"copying %q from %q\", sourceBase, sourceDir)\n\n\treturn TarWithOptions(sourceDir, &TarOptions{\n\t\tCompression:      Uncompressed,\n\t\tIncludeFiles:     filter,\n\t\tIncludeSourceDir: true,\n\t\tRebaseNames: map[string]string{\n\t\t\tsourceBase: rebaseName,\n\t\t},\n\t})\n}\n\n// CopyInfo holds basic info about the source\n// or destination path of a copy operation.\ntype CopyInfo struct {\n\tPath       string\n\tExists     bool\n\tIsDir      bool\n\tRebaseName string\n}\n\n// CopyInfoSourcePath stats the given path to create a CopyInfo\n// struct representing that resource for the source of an archive copy\n// operation. The given path should be an absolute local path. A source path\n// has all symlinks evaluated that appear before the last path separator (\"/\"\n// on Unix). As it is to be a copy source, the path must exist.\nfunc CopyInfoSourcePath(path string, followLink bool) (CopyInfo, error) {\n\t// normalize the file path and then evaluate the symbol link\n\t// we will use the target file instead of the symbol link if\n\t// followLink is set\n\tpath = normalizePath(path)\n\n\tresolvedPath, rebaseName, err := ResolveHostSourcePath(path, followLink)\n\tif err != nil {\n\t\treturn CopyInfo{}, err\n\t}\n\n\tstat, err := os.Lstat(resolvedPath)\n\tif err != nil {\n\t\treturn CopyInfo{}, err\n\t}\n\n\treturn CopyInfo{\n\t\tPath:       resolvedPath,\n\t\tExists:     true,\n\t\tIsDir:      stat.IsDir(),\n\t\tRebaseName: rebaseName,\n\t}, nil\n}\n\n// CopyInfoDestinationPath stats the given path to create a CopyInfo\n// struct representing that resource for the destination of an archive copy\n// operation. The given path should be an absolute local path.\nfunc CopyInfoDestinationPath(path string) (info CopyInfo, err error) {\n\tmaxSymlinkIter := 10 // filepath.EvalSymlinks uses 255, but 10 already seems like a lot.\n\tpath = normalizePath(path)\n\toriginalPath := path\n\n\tstat, err := os.Lstat(path)\n\n\tif err == nil && stat.Mode()&os.ModeSymlink == 0 {\n\t\t// The path exists and is not a symlink.\n\t\treturn CopyInfo{\n\t\t\tPath:   path,\n\t\t\tExists: true,\n\t\t\tIsDir:  stat.IsDir(),\n\t\t}, nil\n\t}\n\n\t// While the path is a symlink.\n\tfor n := 0; err == nil && stat.Mode()&os.ModeSymlink != 0; n++ {\n\t\tif n > maxSymlinkIter {\n\t\t\t// Don't follow symlinks more than this arbitrary number of times.\n\t\t\treturn CopyInfo{}, errors.New(\"too many symlinks in \" + originalPath)\n\t\t}\n\n\t\t// The path is a symbolic link. We need to evaluate it so that the\n\t\t// destination of the copy operation is the link target and not the\n\t\t// link itself. This is notably different than CopyInfoSourcePath which\n\t\t// only evaluates symlinks before the last appearing path separator.\n\t\t// Also note that it is okay if the last path element is a broken\n\t\t// symlink as the copy operation should create the target.\n\t\tvar linkTarget string\n\n\t\tlinkTarget, err = os.Readlink(path)\n\t\tif err != nil {\n\t\t\treturn CopyInfo{}, err\n\t\t}\n\n\t\tif !filepath.IsAbs(linkTarget) {\n\t\t\t// Join with the parent directory.\n\t\t\tdstParent, _ := SplitPathDirEntry(path)\n\t\t\tlinkTarget = filepath.Join(dstParent, linkTarget)\n\t\t}\n\n\t\tpath = linkTarget\n\t\tstat, err = os.Lstat(path)\n\t}\n\n\tif err != nil {\n\t\t// It's okay if the destination path doesn't exist. We can still\n\t\t// continue the copy operation if the parent directory exists.\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn CopyInfo{}, err\n\t\t}\n\n\t\t// Ensure destination parent dir exists.\n\t\tdstParent, _ := SplitPathDirEntry(path)\n\n\t\tparentDirStat, err := os.Lstat(dstParent)\n\t\tif err != nil {\n\t\t\treturn CopyInfo{}, err\n\t\t}\n\t\tif !parentDirStat.IsDir() {\n\t\t\treturn CopyInfo{}, ErrNotDirectory\n\t\t}\n\n\t\treturn CopyInfo{Path: path}, nil\n\t}\n\n\t// The path exists after resolving symlinks.\n\treturn CopyInfo{\n\t\tPath:   path,\n\t\tExists: true,\n\t\tIsDir:  stat.IsDir(),\n\t}, nil\n}\n\n// PrepareArchiveCopy prepares the given srcContent archive, which should\n// contain the archived resource described by srcInfo, to the destination\n// described by dstInfo. Returns the possibly modified content archive along\n// with the path to the destination directory which it should be extracted to.\nfunc PrepareArchiveCopy(srcContent io.Reader, srcInfo, dstInfo CopyInfo) (dstDir string, content io.ReadCloser, err error) {\n\t// Ensure in platform semantics\n\tsrcInfo.Path = normalizePath(srcInfo.Path)\n\tdstInfo.Path = normalizePath(dstInfo.Path)\n\n\t// Separate the destination path between its directory and base\n\t// components in case the source archive contents need to be rebased.\n\tdstDir, dstBase := SplitPathDirEntry(dstInfo.Path)\n\t_, srcBase := SplitPathDirEntry(srcInfo.Path)\n\n\tswitch {\n\tcase dstInfo.Exists && dstInfo.IsDir:\n\t\t// The destination exists as a directory. No alteration\n\t\t// to srcContent is needed as its contents can be\n\t\t// simply extracted to the destination directory.\n\t\treturn dstInfo.Path, io.NopCloser(srcContent), nil\n\tcase dstInfo.Exists && srcInfo.IsDir:\n\t\t// The destination exists as some type of file and the source\n\t\t// content is a directory. This is an error condition since\n\t\t// you cannot copy a directory to an existing file location.\n\t\treturn \"\", nil, ErrCannotCopyDir\n\tcase dstInfo.Exists:\n\t\t// The destination exists as some type of file and the source content\n\t\t// is also a file. The source content entry will have to be renamed to\n\t\t// have a basename which matches the destination path's basename.\n\t\tif len(srcInfo.RebaseName) != 0 {\n\t\t\tsrcBase = srcInfo.RebaseName\n\t\t}\n\t\treturn dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil\n\tcase srcInfo.IsDir:\n\t\t// The destination does not exist and the source content is an archive\n\t\t// of a directory. The archive should be extracted to the parent of\n\t\t// the destination path instead, and when it is, the directory that is\n\t\t// created as a result should take the name of the destination path.\n\t\t// The source content entries will have to be renamed to have a\n\t\t// basename which matches the destination path's basename.\n\t\tif len(srcInfo.RebaseName) != 0 {\n\t\t\tsrcBase = srcInfo.RebaseName\n\t\t}\n\t\treturn dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil\n\tcase assertsDirectory(dstInfo.Path):\n\t\t// The destination does not exist and is asserted to be created as a\n\t\t// directory, but the source content is not a directory. This is an\n\t\t// error condition since you cannot create a directory from a file\n\t\t// source.\n\t\treturn \"\", nil, ErrDirNotExists\n\tdefault:\n\t\t// The last remaining case is when the destination does not exist, is\n\t\t// not asserted to be a directory, and the source content is not an\n\t\t// archive of a directory. It this case, the destination file will need\n\t\t// to be created when the archive is extracted and the source content\n\t\t// entry will have to be renamed to have a basename which matches the\n\t\t// destination path's basename.\n\t\tif len(srcInfo.RebaseName) != 0 {\n\t\t\tsrcBase = srcInfo.RebaseName\n\t\t}\n\t\treturn dstDir, RebaseArchiveEntries(srcContent, srcBase, dstBase), nil\n\t}\n}\n\n// RebaseArchiveEntries rewrites the given srcContent archive replacing\n// an occurrence of oldBase with newBase at the beginning of entry names.\nfunc RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.ReadCloser {\n\tif oldBase == string(os.PathSeparator) {\n\t\t// If oldBase specifies the root directory, use an empty string as\n\t\t// oldBase instead so that newBase doesn't replace the path separator\n\t\t// that all paths will start with.\n\t\toldBase = \"\"\n\t}\n\n\trebased, w := io.Pipe()\n\n\tgo func() {\n\t\tsrcTar := tar.NewReader(srcContent)\n\t\trebasedTar := tar.NewWriter(w)\n\n\t\tfor {\n\t\t\thdr, err := srcTar.Next()\n\t\t\tif err == io.EOF {\n\t\t\t\t// Signals end of archive.\n\t\t\t\trebasedTar.Close()\n\t\t\t\tw.Close()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tw.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\thdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1)\n\t\t\tif hdr.Typeflag == tar.TypeLink {\n\t\t\t\thdr.Linkname = strings.Replace(hdr.Linkname, oldBase, newBase, 1)\n\t\t\t}\n\n\t\t\tif err = rebasedTar.WriteHeader(hdr); err != nil {\n\t\t\t\tw.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif _, err = io.Copy(rebasedTar, srcTar); err != nil {\n\t\t\t\tw.CloseWithError(err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\n\treturn rebased\n}\n\n// CopyResource performs an archive copy from the given source path to the\n// given destination path. The source path MUST exist and the destination\n// path's parent directory must exist.\nfunc CopyResource(srcPath, dstPath string, followLink bool) error {\n\tvar (\n\t\tsrcInfo CopyInfo\n\t\terr     error\n\t)\n\n\t// Ensure in platform semantics\n\tsrcPath = normalizePath(srcPath)\n\tdstPath = normalizePath(dstPath)\n\n\t// Clean the source and destination paths.\n\tsrcPath = PreserveTrailingDotOrSeparator(filepath.Clean(srcPath), srcPath)\n\tdstPath = PreserveTrailingDotOrSeparator(filepath.Clean(dstPath), dstPath)\n\n\tif srcInfo, err = CopyInfoSourcePath(srcPath, followLink); err != nil {\n\t\treturn err\n\t}\n\n\tcontent, err := TarResource(srcInfo)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer content.Close()\n\n\treturn CopyTo(content, srcInfo, dstPath)\n}\n\n// CopyTo handles extracting the given content whose\n// entries should be sourced from srcInfo to dstPath.\nfunc CopyTo(content io.Reader, srcInfo CopyInfo, dstPath string) error {\n\t// The destination path need not exist, but CopyInfoDestinationPath will\n\t// ensure that at least the parent directory exists.\n\tdstInfo, err := CopyInfoDestinationPath(normalizePath(dstPath))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdstDir, copyArchive, err := PrepareArchiveCopy(content, srcInfo, dstInfo)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer copyArchive.Close()\n\n\toptions := &TarOptions{\n\t\tNoLchown:             true,\n\t\tNoOverwriteDirNonDir: true,\n\t}\n\n\treturn Untar(copyArchive, dstDir, options)\n}\n\n// ResolveHostSourcePath decides real path need to be copied with parameters such as\n// whether to follow symbol link or not, if followLink is true, resolvedPath will return\n// link target of any symbol link file, else it will only resolve symlink of directory\n// but return symbol link file itself without resolving.\nfunc ResolveHostSourcePath(path string, followLink bool) (resolvedPath, rebaseName string, err error) {\n\tif followLink {\n\t\tresolvedPath, err = filepath.EvalSymlinks(path)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", err\n\t\t}\n\n\t\tresolvedPath, rebaseName = GetRebaseName(path, resolvedPath)\n\t} else {\n\t\tdirPath, basePath := filepath.Split(path)\n\n\t\t// if not follow symbol link, then resolve symbol link of parent dir\n\t\tvar resolvedDirPath string\n\t\tresolvedDirPath, err = filepath.EvalSymlinks(dirPath)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", err\n\t\t}\n\t\t// resolvedDirPath will have been cleaned (no trailing path separators) so\n\t\t// we can manually join it with the base path element.\n\t\tresolvedPath = resolvedDirPath + string(filepath.Separator) + basePath\n\t\tif hasTrailingPathSeparator(path) && filepath.Base(path) != filepath.Base(resolvedPath) {\n\t\t\trebaseName = filepath.Base(path)\n\t\t}\n\t}\n\treturn resolvedPath, rebaseName, nil\n}\n\n// GetRebaseName normalizes and compares path and resolvedPath,\n// return completed resolved path and rebased file name\nfunc GetRebaseName(path, resolvedPath string) (string, string) {\n\t// linkTarget will have been cleaned (no trailing path separators and dot) so\n\t// we can manually join it with them\n\tvar rebaseName string\n\tif specifiesCurrentDir(path) && !specifiesCurrentDir(resolvedPath) {\n\t\tresolvedPath += string(filepath.Separator) + \".\"\n\t}\n\n\tif hasTrailingPathSeparator(path) && !hasTrailingPathSeparator(resolvedPath) {\n\t\tresolvedPath += string(filepath.Separator)\n\t}\n\n\tif filepath.Base(path) != filepath.Base(resolvedPath) {\n\t\t// In the case where the path had a trailing separator and a symlink\n\t\t// evaluation has changed the last path component, we will need to\n\t\t// rebase the name in the archive that is being copied to match the\n\t\t// originally requested name.\n\t\trebaseName = filepath.Base(path)\n\t}\n\treturn resolvedPath, rebaseName\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/copy_unix.go",
    "content": "//go:build !windows\n\npackage archive\n\nimport (\n\t\"path/filepath\"\n)\n\nfunc normalizePath(path string) string {\n\treturn filepath.ToSlash(path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/copy_windows.go",
    "content": "package archive\n\nimport (\n\t\"path/filepath\"\n)\n\nfunc normalizePath(path string) string {\n\treturn filepath.FromSlash(path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/diff.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/pools\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\n// UnpackLayer unpack `layer` to a `dest`. The stream `layer` can be\n// compressed or uncompressed.\n// Returns the size in bytes of the contents of the layer.\nfunc UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64, err error) {\n\ttr := tar.NewReader(layer)\n\ttrBuf := pools.BufioReader32KPool.Get(tr)\n\tdefer pools.BufioReader32KPool.Put(trBuf)\n\n\tvar dirs []*tar.Header\n\tunpackedPaths := make(map[string]struct{})\n\n\tif options == nil {\n\t\toptions = &TarOptions{}\n\t}\n\tidMappings := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)\n\n\taufsTempdir := \"\"\n\taufsHardlinks := make(map[string]*tar.Header)\n\tbuffer := make([]byte, 1<<20)\n\n\t// Iterate through the files in the archive.\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tif err == io.EOF {\n\t\t\t// end of tar archive\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\n\t\tsize += hdr.Size\n\n\t\t// Normalize name, for safety and for a simple is-root check\n\t\thdr.Name = filepath.Clean(hdr.Name)\n\n\t\t// Windows does not support filenames with colons in them. Ignore\n\t\t// these files. This is not a problem though (although it might\n\t\t// appear that it is). Let's suppose a client is running docker pull.\n\t\t// The daemon it points to is Windows. Would it make sense for the\n\t\t// client to be doing a docker pull Ubuntu for example (which has files\n\t\t// with colons in the name under /usr/share/man/man3)? No, absolutely\n\t\t// not as it would really only make sense that they were pulling a\n\t\t// Windows image. However, for development, it is necessary to be able\n\t\t// to pull Linux images which are in the repository.\n\t\t//\n\t\t// TODO Windows. Once the registry is aware of what images are Windows-\n\t\t// specific or Linux-specific, this warning should be changed to an error\n\t\t// to cater for the situation where someone does manage to upload a Linux\n\t\t// image but have it tagged as Windows inadvertently.\n\t\tif runtime.GOOS == windows {\n\t\t\tif strings.Contains(hdr.Name, \":\") {\n\t\t\t\tlogrus.Warnf(\"Windows: Ignoring %s (is this a Linux image?)\", hdr.Name)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// Note as these operations are platform specific, so must the slash be.\n\t\tif !strings.HasSuffix(hdr.Name, string(os.PathSeparator)) {\n\t\t\t// Not the root directory, ensure that the parent directory exists.\n\t\t\t// This happened in some tests where an image had a tarfile without any\n\t\t\t// parent directories.\n\t\t\tparent := filepath.Dir(hdr.Name)\n\t\t\tparentPath := filepath.Join(dest, parent)\n\n\t\t\tif err := fileutils.Lexists(parentPath); err != nil && os.IsNotExist(err) {\n\t\t\t\terr = os.MkdirAll(parentPath, 0o755)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Skip AUFS metadata dirs\n\t\tif strings.HasPrefix(hdr.Name, WhiteoutMetaPrefix) {\n\t\t\t// Regular files inside /.wh..wh.plnk can be used as hardlink targets\n\t\t\t// We don't want this directory, but we need the files in them so that\n\t\t\t// such hardlinks can be resolved.\n\t\t\tif strings.HasPrefix(hdr.Name, WhiteoutLinkDir) && hdr.Typeflag == tar.TypeReg {\n\t\t\t\tbasename := filepath.Base(hdr.Name)\n\t\t\t\taufsHardlinks[basename] = hdr\n\t\t\t\tif aufsTempdir == \"\" {\n\t\t\t\t\tif aufsTempdir, err = os.MkdirTemp(\"\", \"storageplnk\"); err != nil {\n\t\t\t\t\t\treturn 0, err\n\t\t\t\t\t}\n\t\t\t\t\tdefer os.RemoveAll(aufsTempdir)\n\t\t\t\t}\n\t\t\t\tif err := extractTarFileEntry(filepath.Join(aufsTempdir, basename), dest, hdr, tr, true, nil, options.InUserNS, options.IgnoreChownErrors, options.ForceMask, buffer); err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif hdr.Name != WhiteoutOpaqueDir {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tpath := filepath.Join(dest, hdr.Name)\n\t\trel, err := filepath.Rel(dest, path)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\n\t\t// Note as these operations are platform specific, so must the slash be.\n\t\tif strings.HasPrefix(rel, \"..\"+string(os.PathSeparator)) {\n\t\t\treturn 0, breakoutError(fmt.Errorf(\"%q is outside of %q\", hdr.Name, dest))\n\t\t}\n\t\tbase := filepath.Base(path)\n\n\t\tif strings.HasPrefix(base, WhiteoutPrefix) {\n\t\t\tdir := filepath.Dir(path)\n\t\t\tif base == WhiteoutOpaqueDir {\n\t\t\t\terr := fileutils.Lexists(dir)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t\terr = filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tif os.IsNotExist(err) {\n\t\t\t\t\t\t\terr = nil // parent was deleted\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tif path == dir {\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\t\t\t\t\tif _, exists := unpackedPaths[path]; !exists {\n\t\t\t\t\t\tif err := resetImmutable(path, nil); err != nil {\n\t\t\t\t\t\t\treturn err\n\t\t\t\t\t\t}\n\t\t\t\t\t\terr := os.RemoveAll(path)\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toriginalBase := base[len(WhiteoutPrefix):]\n\t\t\t\toriginalPath := filepath.Join(dir, originalBase)\n\t\t\t\tif err := resetImmutable(originalPath, nil); err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t\tif err := os.RemoveAll(originalPath); err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// If path exits we almost always just want to remove and replace it.\n\t\t\t// The only exception is when it is a directory *and* the file from\n\t\t\t// the layer is also a directory. Then we want to merge them (i.e.\n\t\t\t// just apply the metadata from the layer).\n\t\t\t//\n\t\t\t// We always reset the immutable flag (if present) to allow metadata\n\t\t\t// changes and to allow directory modification. The flag will be\n\t\t\t// re-applied based on the contents of hdr either at the end for\n\t\t\t// directories or in extractTarFileEntry otherwise.\n\t\t\tif fi, err := os.Lstat(path); err == nil {\n\t\t\t\tif err := resetImmutable(path, &fi); err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t\tif !fi.IsDir() || hdr.Typeflag != tar.TypeDir {\n\t\t\t\t\tif err := os.RemoveAll(path); err != nil {\n\t\t\t\t\t\treturn 0, err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttrBuf.Reset(tr)\n\t\t\tsrcData := io.Reader(trBuf)\n\t\t\tsrcHdr := hdr\n\n\t\t\t// Hard links into /.wh..wh.plnk don't work, as we don't extract that directory, so\n\t\t\t// we manually retarget these into the temporary files we extracted them into\n\t\t\tif hdr.Typeflag == tar.TypeLink && strings.HasPrefix(filepath.Clean(hdr.Linkname), WhiteoutLinkDir) {\n\t\t\t\tlinkBasename := filepath.Base(hdr.Linkname)\n\t\t\t\tsrcHdr = aufsHardlinks[linkBasename]\n\t\t\t\tif srcHdr == nil {\n\t\t\t\t\treturn 0, fmt.Errorf(\"invalid aufs hardlink\")\n\t\t\t\t}\n\t\t\t\ttmpFile, err := os.Open(filepath.Join(aufsTempdir, linkBasename))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\t\tdefer tmpFile.Close()\n\t\t\t\tsrcData = tmpFile\n\t\t\t}\n\n\t\t\tif err := remapIDs(nil, idMappings, options.ChownOpts, srcHdr); err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\n\t\t\tif err := extractTarFileEntry(path, dest, srcHdr, srcData, true, nil, options.InUserNS, options.IgnoreChownErrors, options.ForceMask, buffer); err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\n\t\t\t// Directory mtimes must be handled at the end to avoid further\n\t\t\t// file creation in them to modify the directory mtime\n\t\t\tif hdr.Typeflag == tar.TypeDir {\n\t\t\t\tdirs = append(dirs, hdr)\n\t\t\t}\n\t\t\tunpackedPaths[path] = struct{}{}\n\t\t}\n\t}\n\n\tfor _, hdr := range dirs {\n\t\tpath := filepath.Join(dest, hdr.Name)\n\t\tif err := system.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif err := WriteFileFlagsFromTarHeader(path, hdr); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\treturn size, nil\n}\n\n// ApplyLayer parses a diff in the standard layer format from `layer`,\n// and applies it to the directory `dest`. The stream `layer` can be\n// compressed or uncompressed.\n// Returns the size in bytes of the contents of the layer.\nfunc ApplyLayer(dest string, layer io.Reader) (int64, error) {\n\treturn applyLayerHandler(dest, layer, &TarOptions{}, true)\n}\n\n// ApplyUncompressedLayer parses a diff in the standard layer format from\n// `layer`, and applies it to the directory `dest`. The stream `layer`\n// can only be uncompressed.\n// Returns the size in bytes of the contents of the layer.\nfunc ApplyUncompressedLayer(dest string, layer io.Reader, options *TarOptions) (int64, error) {\n\treturn applyLayerHandler(dest, layer, options, false)\n}\n\n// do the bulk load of ApplyLayer, but allow for not calling DecompressStream\nfunc applyLayerHandler(dest string, layer io.Reader, options *TarOptions, decompress bool) (int64, error) {\n\tdest = filepath.Clean(dest)\n\n\t// We need to be able to set any perms\n\toldmask, err := system.Umask(0)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer func() {\n\t\t_, _ = system.Umask(oldmask) // Ignore err. This can only fail with ErrNotSupportedPlatform, in which case we would have failed above.\n\t}()\n\n\tif decompress {\n\t\tlayer, err = DecompressStream(layer)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\treturn UnpackLayer(dest, layer, options)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/fflags_bsd.go",
    "content": "//go:build freebsd\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"fmt\"\n\t\"math/bits\"\n\t\"os\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nconst (\n\tpaxSCHILYFflags = \"SCHILY.fflags\"\n)\n\nvar (\n\tflagNameToValue = map[string]uint32{\n\t\t\"sappnd\":     system.SF_APPEND,\n\t\t\"sappend\":    system.SF_APPEND,\n\t\t\"arch\":       system.SF_ARCHIVED,\n\t\t\"archived\":   system.SF_ARCHIVED,\n\t\t\"schg\":       system.SF_IMMUTABLE,\n\t\t\"schange\":    system.SF_IMMUTABLE,\n\t\t\"simmutable\": system.SF_IMMUTABLE,\n\t\t\"sunlnk\":     system.SF_NOUNLINK,\n\t\t\"sunlink\":    system.SF_NOUNLINK,\n\t\t\"snapshot\":   system.SF_SNAPSHOT,\n\t\t\"uappnd\":     system.UF_APPEND,\n\t\t\"uappend\":    system.UF_APPEND,\n\t\t\"uarch\":      system.UF_ARCHIVE,\n\t\t\"uarchive\":   system.UF_ARCHIVE,\n\t\t\"hidden\":     system.UF_HIDDEN,\n\t\t\"uhidden\":    system.UF_HIDDEN,\n\t\t\"uchg\":       system.UF_IMMUTABLE,\n\t\t\"uchange\":    system.UF_IMMUTABLE,\n\t\t\"uimmutable\": system.UF_IMMUTABLE,\n\t\t\"uunlnk\":     system.UF_NOUNLINK,\n\t\t\"uunlink\":    system.UF_NOUNLINK,\n\t\t\"offline\":    system.UF_OFFLINE,\n\t\t\"uoffline\":   system.UF_OFFLINE,\n\t\t\"opaque\":     system.UF_OPAQUE,\n\t\t\"rdonly\":     system.UF_READONLY,\n\t\t\"urdonly\":    system.UF_READONLY,\n\t\t\"readonly\":   system.UF_READONLY,\n\t\t\"ureadonly\":  system.UF_READONLY,\n\t\t\"reparse\":    system.UF_REPARSE,\n\t\t\"ureparse\":   system.UF_REPARSE,\n\t\t\"sparse\":     system.UF_SPARSE,\n\t\t\"usparse\":    system.UF_SPARSE,\n\t\t\"system\":     system.UF_SYSTEM,\n\t\t\"usystem\":    system.UF_SYSTEM,\n\t}\n\t// Only include the short names for the reverse map\n\tflagValueToName = map[uint32]string{\n\t\tsystem.SF_APPEND:    \"sappnd\",\n\t\tsystem.SF_ARCHIVED:  \"arch\",\n\t\tsystem.SF_IMMUTABLE: \"schg\",\n\t\tsystem.SF_NOUNLINK:  \"sunlnk\",\n\t\tsystem.SF_SNAPSHOT:  \"snapshot\",\n\t\tsystem.UF_APPEND:    \"uappnd\",\n\t\tsystem.UF_ARCHIVE:   \"uarch\",\n\t\tsystem.UF_HIDDEN:    \"hidden\",\n\t\tsystem.UF_IMMUTABLE: \"uchg\",\n\t\tsystem.UF_NOUNLINK:  \"uunlnk\",\n\t\tsystem.UF_OFFLINE:   \"offline\",\n\t\tsystem.UF_OPAQUE:    \"opaque\",\n\t\tsystem.UF_READONLY:  \"rdonly\",\n\t\tsystem.UF_REPARSE:   \"reparse\",\n\t\tsystem.UF_SPARSE:    \"sparse\",\n\t\tsystem.UF_SYSTEM:    \"system\",\n\t}\n)\n\nfunc parseFileFlags(fflags string) (uint32, uint32, error) {\n\tvar set, clear uint32 = 0, 0\n\tfor fflag := range strings.SplitSeq(fflags, \",\") {\n\t\tisClear := false\n\t\tif clean, ok := strings.CutPrefix(fflag, \"no\"); ok {\n\t\t\tisClear = true\n\t\t\tfflag = clean\n\t\t}\n\t\tif value, ok := flagNameToValue[fflag]; ok {\n\t\t\tif isClear {\n\t\t\t\tclear |= value\n\t\t\t} else {\n\t\t\t\tset |= value\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0, 0, fmt.Errorf(\"parsing file flags, unrecognised token: %s\", fflag)\n\t\t}\n\t}\n\treturn set, clear, nil\n}\n\nfunc formatFileFlags(fflags uint32) (string, error) {\n\tres := []string{}\n\tfor fflags != 0 {\n\t\t// Extract lowest set bit\n\t\tfflag := uint32(1) << bits.TrailingZeros32(fflags)\n\t\tif name, ok := flagValueToName[fflag]; ok {\n\t\t\tres = append(res, name)\n\t\t} else {\n\t\t\treturn \"\", fmt.Errorf(\"formatting file flags, unrecognised flag: %x\", fflag)\n\t\t}\n\t\tfflags &= ^fflag\n\t}\n\treturn strings.Join(res, \",\"), nil\n}\n\nfunc ReadFileFlagsToTarHeader(path string, hdr *tar.Header) error {\n\tst, err := system.Lstat(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfflags, err := formatFileFlags(st.Flags())\n\tif err != nil {\n\t\treturn err\n\t}\n\tif fflags != \"\" {\n\t\tif hdr.PAXRecords == nil {\n\t\t\thdr.PAXRecords = map[string]string{}\n\t\t}\n\t\thdr.PAXRecords[paxSCHILYFflags] = fflags\n\t}\n\treturn nil\n}\n\nfunc WriteFileFlagsFromTarHeader(path string, hdr *tar.Header) error {\n\tif fflags, ok := hdr.PAXRecords[paxSCHILYFflags]; ok {\n\t\tvar set, clear uint32\n\t\tset, clear, err := parseFileFlags(fflags)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Apply the delta to the existing file flags\n\t\tst, err := system.Lstat(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn system.Lchflags(path, (st.Flags() & ^clear)|set)\n\t}\n\treturn nil\n}\n\nfunc resetImmutable(path string, fi *os.FileInfo) error {\n\tvar flags uint32\n\tif fi != nil {\n\t\tflags = (*fi).Sys().(*syscall.Stat_t).Flags\n\t} else {\n\t\tst, err := system.Lstat(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tflags = st.Flags()\n\t}\n\tif flags&(system.SF_IMMUTABLE|system.UF_IMMUTABLE) != 0 {\n\t\tflags &= ^(system.SF_IMMUTABLE | system.UF_IMMUTABLE)\n\t\treturn system.Lchflags(path, flags)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/fflags_unsupported.go",
    "content": "//go:build !freebsd\n\npackage archive\n\nimport (\n\t\"archive/tar\"\n\t\"os\"\n)\n\nfunc ReadFileFlagsToTarHeader(path string, hdr *tar.Header) error {\n\treturn nil\n}\n\nfunc WriteFileFlagsFromTarHeader(path string, hdr *tar.Header) error {\n\treturn nil\n}\n\nfunc resetImmutable(_ string, _ *os.FileInfo) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/filter.go",
    "content": "package archive\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"sync\"\n)\n\nvar filterPath sync.Map\n\nfunc getFilterPath(name string) string {\n\tpath, ok := filterPath.Load(name)\n\tif ok {\n\t\treturn path.(string)\n\t}\n\n\tpath, err := exec.LookPath(name)\n\tif err != nil {\n\t\tpath = \"\"\n\t}\n\n\tfilterPath.Store(name, path)\n\treturn path.(string)\n}\n\ntype errorRecordingReader struct {\n\tr   io.Reader\n\terr error\n}\n\nfunc (r *errorRecordingReader) Read(p []byte) (int, error) {\n\tn, err := r.r.Read(p)\n\tif r.err == nil && err != io.EOF {\n\t\tr.err = err\n\t}\n\treturn n, err\n}\n\n// tryProcFilter tries to run the command specified in args, passing input to its stdin and returning its stdout.\n// cleanup() is a caller provided function that will be called when the command finishes running, regardless of\n// whether it succeeds or fails.\n// If the command is not found, it returns (nil, false) and the cleanup function is not called.\nfunc tryProcFilter(args []string, input io.Reader, cleanup func()) (io.ReadCloser, bool) {\n\tpath := getFilterPath(args[0])\n\tif path == \"\" {\n\t\treturn nil, false\n\t}\n\n\tvar stderrBuf bytes.Buffer\n\n\tinputWithError := &errorRecordingReader{r: input}\n\n\tr, w := io.Pipe()\n\tcmd := exec.Command(path, args[1:]...)\n\tcmd.Stdin = inputWithError\n\tcmd.Stdout = w\n\tcmd.Stderr = &stderrBuf\n\tgo func() {\n\t\terr := cmd.Run()\n\t\t// if there is an error reading from input, prefer to return that error\n\t\tif inputWithError.err != nil {\n\t\t\terr = inputWithError.err\n\t\t} else if err != nil && stderrBuf.Len() > 0 {\n\t\t\terr = fmt.Errorf(\"%s: %w\", strings.TrimRight(stderrBuf.String(), \"\\n\"), err)\n\t\t}\n\t\tw.CloseWithError(err) // CloseWithErr(nil) == Close()\n\t\tcleanup()\n\t}()\n\treturn r, true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/time_linux.go",
    "content": "package archive\n\nimport (\n\t\"syscall\"\n\t\"time\"\n)\n\nfunc timeToTimespec(time time.Time) (ts syscall.Timespec) {\n\tif time.IsZero() {\n\t\t// Return UTIME_OMIT special value\n\t\tts.Sec = 0\n\t\tts.Nsec = ((1 << 30) - 2)\n\t\treturn ts\n\t}\n\treturn syscall.NsecToTimespec(time.UnixNano())\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/time_unsupported.go",
    "content": "//go:build !linux\n\npackage archive\n\nimport (\n\t\"syscall\"\n\t\"time\"\n)\n\nfunc timeToTimespec(time time.Time) (ts syscall.Timespec) {\n\tnsec := int64(0)\n\tif !time.IsZero() {\n\t\tnsec = time.UnixNano()\n\t}\n\treturn syscall.NsecToTimespec(nsec)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/whiteouts.go",
    "content": "package archive\n\n// Whiteouts are files with a special meaning for the layered filesystem.\n// Docker uses AUFS whiteout files inside exported archives. In other\n// filesystems these files are generated/handled on tar creation/extraction.\n\n// WhiteoutPrefix prefix means file is a whiteout. If this is followed by a\n// filename this means that file has been removed from the base layer.\nconst WhiteoutPrefix = \".wh.\"\n\n// WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not\n// for removing an actual file. Normally these files are excluded from exported\n// archives.\nconst WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix\n\n// WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other\n// layers. Normally these should not go into exported archives and all changed\n// hardlinks should be copied to the top layer.\nconst WhiteoutLinkDir = WhiteoutMetaPrefix + \"plnk\"\n\n// WhiteoutOpaqueDir file means directory has been made opaque - meaning\n// readdir calls to this directory do not follow to lower layers.\nconst WhiteoutOpaqueDir = WhiteoutMetaPrefix + \".opq\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/archive/wrap.go",
    "content": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"io\"\n)\n\n// Generate generates a new archive from the content provided\n// as input.\n//\n// `files` is a sequence of path/content pairs. A new file is\n// added to the archive for each pair.\n// If the last pair is incomplete, the file is created with an\n// empty content. For example:\n//\n// Generate(\"foo.txt\", \"hello world\", \"emptyfile\")\n//\n// The above call will return an archive with 2 files:\n//   - ./foo.txt with content \"hello world\"\n//   - ./empty with empty content\n//\n// FIXME: stream content instead of buffering\n// FIXME: specify permissions and other archive metadata\nfunc Generate(input ...string) (io.Reader, error) {\n\tfiles := parseStringPairs(input...)\n\tbuf := new(bytes.Buffer)\n\ttw := tar.NewWriter(buf)\n\tfor _, file := range files {\n\t\tname, content := file[0], file[1]\n\t\thdr := &tar.Header{\n\t\t\tName: name,\n\t\t\tSize: int64(len(content)),\n\t\t}\n\t\tif err := tw.WriteHeader(hdr); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif _, err := tw.Write([]byte(content)); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif err := tw.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf, nil\n}\n\nfunc parseStringPairs(input ...string) [][2]string {\n\toutput := make([][2]string, 0, len(input)/2+1)\n\tfor i := 0; i < len(input); i += 2 {\n\t\tvar pair [2]string\n\t\tpair[0] = input[i]\n\t\tif i+1 < len(input) {\n\t\t\tpair[1] = input[i+1]\n\t\t}\n\t\toutput = append(output, pair)\n\t}\n\treturn output\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/archive.go",
    "content": "package chrootarchive\n\nimport (\n\tstdtar \"archive/tar\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\n// NewArchiver returns a new Archiver which uses chrootarchive.Untar\nfunc NewArchiver(idMappings *idtools.IDMappings) *archive.Archiver {\n\tarchiver := archive.NewArchiver(idMappings)\n\tarchiver.Untar = Untar\n\treturn archiver\n}\n\n// NewArchiverWithChown returns a new Archiver which uses chrootarchive.Untar and the provided ID mapping configuration on both ends\nfunc NewArchiverWithChown(tarIDMappings *idtools.IDMappings, chownOpts *idtools.IDPair, untarIDMappings *idtools.IDMappings) *archive.Archiver {\n\tarchiver := archive.NewArchiverWithChown(tarIDMappings, chownOpts, untarIDMappings)\n\tarchiver.Untar = Untar\n\treturn archiver\n}\n\n// Untar reads a stream of bytes from `archive`, parses it as a tar archive,\n// and unpacks it into the directory at `dest`.\n// The archive may be compressed with one of the following algorithms:\n//\n//\tidentity (uncompressed), gzip, bzip2, xz.\nfunc Untar(tarArchive io.Reader, dest string, options *archive.TarOptions) error {\n\treturn untarHandler(tarArchive, dest, options, true, dest)\n}\n\n// UntarWithRoot is the same as `Untar`, but allows you to pass in a root directory\n// The root directory is the directory that will be chrooted to.\n// `dest` must be a path within `root`, if it is not an error will be returned.\n//\n// `root` should set to a directory which is not controlled by any potentially\n// malicious process.\n//\n// This should be used to prevent a potential attacker from manipulating `dest`\n// such that it would provide access to files outside of `dest` through things\n// like symlinks. Normally `ResolveSymlinksInScope` would handle this, however\n// sanitizing symlinks in this manner is inherently racey:\n// ref: CVE-2018-15664\nfunc UntarWithRoot(tarArchive io.Reader, dest string, options *archive.TarOptions, root string) error {\n\treturn untarHandler(tarArchive, dest, options, true, root)\n}\n\n// UntarUncompressed reads a stream of bytes from `archive`, parses it as a tar archive,\n// and unpacks it into the directory at `dest`.\n// The archive must be an uncompressed stream.\nfunc UntarUncompressed(tarArchive io.Reader, dest string, options *archive.TarOptions) error {\n\treturn untarHandler(tarArchive, dest, options, false, dest)\n}\n\n// Handler for teasing out the automatic decompression\nfunc untarHandler(tarArchive io.Reader, dest string, options *archive.TarOptions, decompress bool, root string) error {\n\tif tarArchive == nil {\n\t\treturn fmt.Errorf(\"empty archive\")\n\t}\n\tif options == nil {\n\t\toptions = &archive.TarOptions{}\n\t\toptions.InUserNS = unshare.IsRootless()\n\t}\n\n\tidMappings := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)\n\trootIDs := idMappings.RootPair()\n\n\tdest = filepath.Clean(dest)\n\tif err := fileutils.Exists(dest); os.IsNotExist(err) {\n\t\tif err := idtools.MkdirAllAndChownNew(dest, 0o755, rootIDs); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tdestVal, err := newUnpackDestination(root, dest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer destVal.Close()\n\n\tr := tarArchive\n\tif decompress {\n\t\tdecompressedArchive, err := archive.DecompressStream(tarArchive)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer decompressedArchive.Close()\n\t\tr = decompressedArchive\n\t}\n\n\treturn invokeUnpack(r, destVal, options)\n}\n\n// Tar tars the requested path while chrooted to the specified root.\nfunc Tar(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {\n\tif options == nil {\n\t\toptions = &archive.TarOptions{}\n\t}\n\treturn invokePack(srcPath, options, root)\n}\n\n// CopyFileWithTarAndChown returns a function which copies a single file from outside\n// of any container into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc CopyFileWithTarAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *archive.TarOptions) error {\n\t\t\tcontentReader, contentWriter, err := os.Pipe()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"creating pipe extract data to %q: %w\", dest, err)\n\t\t\t}\n\t\t\tdefer contentReader.Close()\n\t\t\tdefer contentWriter.Close()\n\t\t\tvar hashError error\n\t\t\tvar hashWorker sync.WaitGroup\n\t\t\thashWorker.Go(func() {\n\t\t\t\tt := stdtar.NewReader(contentReader)\n\t\t\t\t_, err := t.Next()\n\t\t\t\tif err != nil {\n\t\t\t\t\thashError = err\n\t\t\t\t}\n\t\t\t\tif _, err = io.Copy(hasher, t); err != nil && err != io.EOF {\n\t\t\t\t\thashError = err\n\t\t\t\t}\n\t\t\t})\n\t\t\tif err = originalUntar(io.TeeReader(tarArchive, contentWriter), dest, options); err != nil {\n\t\t\t\terr = fmt.Errorf(\"extracting data to %q while copying: %w\", dest, err)\n\t\t\t}\n\t\t\thashWorker.Wait()\n\t\t\tif err == nil && hashError != nil {\n\t\t\t\terr = fmt.Errorf(\"calculating digest of data for %q while copying: %w\", dest, hashError)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\treturn archiver.CopyFileWithTar\n}\n\n// CopyWithTarAndChown returns a function which copies a directory tree from outside of\n// any container into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc CopyWithTarAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *archive.TarOptions) error {\n\t\t\treturn originalUntar(io.TeeReader(tarArchive, hasher), dest, options)\n\t\t}\n\t}\n\treturn archiver.CopyWithTar\n}\n\n// UntarPathAndChown returns a function which extracts an archive in a specified\n// location into our working container, mapping permissions using the\n// container's ID maps, possibly overridden using the passed-in chownOpts\nfunc UntarPathAndChown(chownOpts *idtools.IDPair, hasher io.Writer, uidmap []idtools.IDMap, gidmap []idtools.IDMap) func(src, dest string) error {\n\tuntarMappings := idtools.NewIDMappingsFromMaps(uidmap, gidmap)\n\tarchiver := NewArchiverWithChown(nil, chownOpts, untarMappings)\n\tif hasher != nil {\n\t\toriginalUntar := archiver.Untar\n\t\tarchiver.Untar = func(tarArchive io.Reader, dest string, options *archive.TarOptions) error {\n\t\t\treturn originalUntar(io.TeeReader(tarArchive, hasher), dest, options)\n\t\t}\n\t}\n\treturn archiver.UntarPath\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/archive_darwin.go",
    "content": "package chrootarchive\n\nimport (\n\t\"io\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\ntype unpackDestination struct {\n\tdest string\n}\n\nfunc (dst *unpackDestination) Close() error {\n\treturn nil\n}\n\n// newUnpackDestination is a no-op on this platform\nfunc newUnpackDestination(root, dest string) (*unpackDestination, error) {\n\treturn &unpackDestination{\n\t\tdest: dest,\n\t}, nil\n}\n\nfunc invokeUnpack(decompressedArchive io.Reader,\n\tdest *unpackDestination,\n\toptions *archive.TarOptions,\n) error {\n\treturn archive.Unpack(decompressedArchive, dest.dest, options)\n}\n\nfunc invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {\n\t_ = root // Restricting the operation to this root is not implemented on macOS\n\treturn archive.TarWithOptions(srcPath, options)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/archive_unix.go",
    "content": "//go:build !windows && !darwin\n\npackage chrootarchive\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\ntype unpackDestination struct {\n\troot *os.File\n\tdest string\n}\n\nfunc (dst *unpackDestination) Close() error {\n\treturn dst.root.Close()\n}\n\n// tarOptionsDescriptor is passed as an extra file\nconst tarOptionsDescriptor = 3\n\n// rootFileDescriptor is passed as an extra file\nconst rootFileDescriptor = 4\n\n// procPathForFd gives us a string for a descriptor.\n// Note that while Linux supports actually *reading* this\n// path, FreeBSD and other platforms don't; but in this codebase\n// we only compare strings.\nfunc procPathForFd(fd int) string {\n\treturn fmt.Sprintf(\"/proc/self/fd/%d\", fd)\n}\n\n// untar is the entry-point for storage-untar on re-exec. This is not used on\n// Windows as it does not support chroot, hence no point sandboxing through\n// chroot and rexec.\nfunc untar() {\n\truntime.LockOSThread()\n\tflag.Parse()\n\n\tvar options archive.TarOptions\n\n\t// read the options from the pipe \"ExtraFiles\"\n\tif err := json.NewDecoder(os.NewFile(tarOptionsDescriptor, \"options\")).Decode(&options); err != nil {\n\t\tfatal(err)\n\t}\n\n\tdst := flag.Arg(0)\n\tvar root string\n\tif len(flag.Args()) > 1 {\n\t\troot = flag.Arg(1)\n\t}\n\n\t// FreeBSD doesn't have proc/self, but we can handle it here\n\tif root == procPathForFd(rootFileDescriptor) {\n\t\t// Take ownership to ensure it's closed; no need to leak\n\t\t// this afterwards.\n\t\trootFd := os.NewFile(rootFileDescriptor, \"tar-root\")\n\t\tdefer rootFd.Close()\n\t\tif err := unix.Fchdir(int(rootFd.Fd())); err != nil {\n\t\t\tfatal(err)\n\t\t}\n\t\troot = \".\"\n\t} else if root == \"\" {\n\t\troot = dst\n\t}\n\n\tif err := chroot(root); err != nil {\n\t\tfatal(err)\n\t}\n\n\tif err := archive.Unpack(os.Stdin, dst, &options); err != nil {\n\t\tfatal(err)\n\t}\n\t// fully consume stdin in case it is zero padded\n\tif _, err := flush(os.Stdin); err != nil {\n\t\tfatal(err)\n\t}\n\n\tos.Exit(0)\n}\n\n// newUnpackDestination takes a root directory and a destination which\n// must be underneath it, and returns an object that can unpack\n// in the target root using a file descriptor.\nfunc newUnpackDestination(root, dest string) (*unpackDestination, error) {\n\tif root == \"\" {\n\t\treturn nil, errors.New(\"must specify a root to chroot to\")\n\t}\n\trelDest, err := filepath.Rel(root, dest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif relDest == \".\" {\n\t\trelDest = \"/\"\n\t}\n\tif relDest[0] != '/' {\n\t\trelDest = \"/\" + relDest\n\t}\n\n\trootfdRaw, err := unix.Open(root, unix.O_RDONLY|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, &fs.PathError{Op: \"open\", Path: root, Err: err}\n\t}\n\treturn &unpackDestination{\n\t\troot: os.NewFile(uintptr(rootfdRaw), \"rootfs\"),\n\t\tdest: relDest,\n\t}, nil\n}\n\nfunc invokeUnpack(decompressedArchive io.Reader, dest *unpackDestination, options *archive.TarOptions) error {\n\t// We can't pass a potentially large exclude list directly via cmd line\n\t// because we easily overrun the kernel's max argument/environment size\n\t// when the full image list is passed (e.g. when this is used by\n\t// `docker load`). We will marshall the options via a pipe to the\n\t// child\n\tr, w, err := os.Pipe()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"untar pipe failure: %w\", err)\n\t}\n\n\tcmd := reexec.Command(\"storage-untar\", dest.dest, procPathForFd(rootFileDescriptor))\n\tcmd.Stdin = decompressedArchive\n\n\t// If you change this, change tarOptionsDescriptor above\n\tcmd.ExtraFiles = append(cmd.ExtraFiles, r) // fd 3\n\t// If you change this, change rootFileDescriptor above too\n\tcmd.ExtraFiles = append(cmd.ExtraFiles, dest.root) // fd 4\n\toutput := bytes.NewBuffer(nil)\n\tcmd.Stdout = output\n\tcmd.Stderr = output\n\n\tif err := cmd.Start(); err != nil {\n\t\tw.Close()\n\t\treturn fmt.Errorf(\"untar error on re-exec cmd: %w\", err)\n\t}\n\n\t// write the options to the pipe for the untar exec to read\n\tif err := json.NewEncoder(w).Encode(options); err != nil {\n\t\tw.Close()\n\t\treturn fmt.Errorf(\"untar json encode to pipe failed: %w\", err)\n\t}\n\tw.Close()\n\n\tif err := cmd.Wait(); err != nil {\n\t\terrorOut := fmt.Errorf(\"unpacking failed (error: %w; output: %s)\", err, output)\n\t\t// when `xz -d -c -q | storage-untar ...` failed on storage-untar side,\n\t\t// we need to exhaust `xz`'s output, otherwise the `xz` side will be\n\t\t// pending on write pipe forever\n\t\tif _, err := io.Copy(io.Discard, decompressedArchive); err != nil {\n\t\t\treturn fmt.Errorf(\"%w\\nexhausting input failed (error: %w)\", errorOut, err)\n\t\t}\n\n\t\treturn errorOut\n\t}\n\treturn nil\n}\n\nfunc tar() {\n\truntime.LockOSThread()\n\tflag.Parse()\n\n\tsrc := flag.Arg(0)\n\tvar root string\n\tif len(flag.Args()) > 1 {\n\t\troot = flag.Arg(1)\n\t}\n\n\tif root == \"\" {\n\t\troot = src\n\t}\n\n\tif err := realChroot(root); err != nil {\n\t\tfatal(err)\n\t}\n\n\tvar options archive.TarOptions\n\tif err := json.NewDecoder(os.Stdin).Decode(&options); err != nil {\n\t\tfatal(err)\n\t}\n\n\trdr, err := archive.TarWithOptions(src, &options)\n\tif err != nil {\n\t\tfatal(err)\n\t}\n\tdefer rdr.Close()\n\n\tif _, err := io.Copy(os.Stdout, rdr); err != nil {\n\t\tfatal(err)\n\t}\n\n\tos.Exit(0)\n}\n\nfunc invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {\n\tif root == \"\" {\n\t\treturn nil, errors.New(\"root path must not be empty\")\n\t}\n\n\trelSrc, err := filepath.Rel(root, srcPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif relSrc == \".\" {\n\t\trelSrc = \"/\"\n\t}\n\tif relSrc[0] != '/' {\n\t\trelSrc = \"/\" + relSrc\n\t}\n\n\t// make sure we didn't trim a trailing slash with the call to `Rel`\n\tif strings.HasSuffix(srcPath, \"/\") && !strings.HasSuffix(relSrc, \"/\") {\n\t\trelSrc += \"/\"\n\t}\n\n\tcmd := reexec.Command(\"storage-tar\", relSrc, root)\n\n\terrBuff := bytes.NewBuffer(nil)\n\tcmd.Stderr = errBuff\n\n\ttarR, tarW := io.Pipe()\n\tcmd.Stdout = tarW\n\n\tstdin, err := cmd.StdinPipe()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting options pipe for tar process: %w\", err)\n\t}\n\n\tif err := cmd.Start(); err != nil {\n\t\treturn nil, fmt.Errorf(\"tar error on re-exec cmd: %w\", err)\n\t}\n\n\tgo func() {\n\t\terr := cmd.Wait()\n\t\tif err != nil {\n\t\t\terr = fmt.Errorf(\"processing tar file(%s): %w\", errBuff, err)\n\t\t}\n\t\ttarW.CloseWithError(err)\n\t}()\n\n\tif err := json.NewEncoder(stdin).Encode(options); err != nil {\n\t\tstdin.Close()\n\t\treturn nil, fmt.Errorf(\"tar json encode to pipe failed: %w\", err)\n\t}\n\tstdin.Close()\n\n\treturn tarR, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/archive_windows.go",
    "content": "package chrootarchive\n\nimport (\n\t\"io\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/longpath\"\n)\n\ntype unpackDestination struct {\n\tdest string\n}\n\nfunc (dst *unpackDestination) Close() error {\n\treturn nil\n}\n\n// newUnpackDestination is a no-op on this platform\nfunc newUnpackDestination(root, dest string) (*unpackDestination, error) {\n\treturn &unpackDestination{\n\t\tdest: dest,\n\t}, nil\n}\n\n// chroot is not supported by Windows\nfunc chroot(path string) error {\n\treturn nil\n}\n\nfunc invokeUnpack(decompressedArchive io.Reader,\n\tdest *unpackDestination,\n\toptions *archive.TarOptions,\n) error {\n\t// Windows is different to Linux here because Windows does not support\n\t// chroot. Hence there is no point sandboxing a chrooted process to\n\t// do the unpack. We call inline instead within the daemon process.\n\treturn archive.Unpack(decompressedArchive, longpath.AddPrefix(dest.dest), options)\n}\n\nfunc invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {\n\t// Windows is different to Linux here because Windows does not support\n\t// chroot. Hence there is no point sandboxing a chrooted process to\n\t// do the pack. We call inline instead within the daemon process.\n\treturn archive.TarWithOptions(srcPath, options)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/chroot_linux.go",
    "content": "package chrootarchive\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n\n\t\"github.com/moby/sys/capability\"\n\t\"go.podman.io/storage/pkg/mount\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// chroot on linux uses pivot_root instead of chroot\n// pivot_root takes a new root and an old root.\n// Old root must be a sub-dir of new root, it is where the current rootfs will reside after the call to pivot_root.\n// New root is where the new rootfs is set to.\n// Old root is removed after the call to pivot_root so it is no longer available under the new root.\n// This is similar to how libcontainer sets up a container's rootfs\nfunc chroot(path string) (err error) {\n\tcaps, err := capability.NewPid2(0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := caps.Load(); err != nil {\n\t\treturn err\n\t}\n\n\t// initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host\n\t// environment not in the chroot from untrusted files.\n\t_, _ = user.Lookup(\"storage\")\n\t_, _ = net.LookupHost(\"localhost\")\n\n\t// if the process doesn't have CAP_SYS_ADMIN, but does have CAP_SYS_CHROOT, we need to use the actual chroot\n\tif !caps.Get(capability.EFFECTIVE, capability.CAP_SYS_ADMIN) && caps.Get(capability.EFFECTIVE, capability.CAP_SYS_CHROOT) {\n\t\treturn realChroot(path)\n\t}\n\n\tif err := unix.Unshare(unix.CLONE_NEWNS); err != nil {\n\t\treturn fmt.Errorf(\"creating mount namespace before pivot: %w\", err)\n\t}\n\n\t// make everything in new ns private\n\tif err := mount.MakeRPrivate(\"/\"); err != nil {\n\t\treturn err\n\t}\n\n\tif mounted, _ := mount.Mounted(path); !mounted {\n\t\tif err := mount.Mount(path, path, \"bind\", \"rbind,rw\"); err != nil {\n\t\t\treturn realChroot(path)\n\t\t}\n\t}\n\n\t// setup oldRoot for pivot_root\n\tpivotDir, err := os.MkdirTemp(path, \".pivot_root\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"setting up pivot dir: %w\", err)\n\t}\n\n\tvar mounted bool\n\tdefer func() {\n\t\tif mounted {\n\t\t\t// make sure pivotDir is not mounted before we try to remove it\n\t\t\tif errCleanup := unix.Unmount(pivotDir, unix.MNT_DETACH); errCleanup != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = errCleanup\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\terrCleanup := os.Remove(pivotDir)\n\t\t// pivotDir doesn't exist if pivot_root failed and chroot+chdir was successful\n\t\t// because we already cleaned it up on failed pivot_root\n\t\tif errCleanup != nil && !os.IsNotExist(errCleanup) {\n\t\t\terrCleanup = fmt.Errorf(\"cleaning up after pivot: %w\", errCleanup)\n\t\t\tif err == nil {\n\t\t\t\terr = errCleanup\n\t\t\t}\n\t\t}\n\t}()\n\n\tif err := unix.PivotRoot(path, pivotDir); err != nil {\n\t\t// If pivot fails, fall back to the normal chroot after cleaning up temp dir\n\t\tif err := os.Remove(pivotDir); err != nil {\n\t\t\treturn fmt.Errorf(\"cleaning up after failed pivot: %w\", err)\n\t\t}\n\t\treturn realChroot(path)\n\t}\n\tmounted = true\n\n\t// This is the new path for where the old root (prior to the pivot) has been moved to\n\t// This dir contains the rootfs of the caller, which we need to remove so it is not visible during extraction\n\tpivotDir = filepath.Join(\"/\", filepath.Base(pivotDir))\n\n\tif err := unix.Chdir(\"/\"); err != nil {\n\t\treturn fmt.Errorf(\"changing to new root: %w\", err)\n\t}\n\n\t// Make the pivotDir (where the old root lives) private so it can be unmounted without propagating to the host\n\tif err := unix.Mount(\"\", pivotDir, \"\", unix.MS_PRIVATE|unix.MS_REC, \"\"); err != nil {\n\t\treturn fmt.Errorf(\"making old root private after pivot: %w\", err)\n\t}\n\n\t// Now unmount the old root so it's no longer visible from the new root\n\tif err := unix.Unmount(pivotDir, unix.MNT_DETACH); err != nil {\n\t\treturn fmt.Errorf(\"while unmounting old root after pivot: %w\", err)\n\t}\n\tmounted = false\n\n\treturn nil\n}\n\nfunc realChroot(path string) error {\n\tif err := unix.Chroot(path); err != nil {\n\t\treturn fmt.Errorf(\"after fallback to chroot: %w\", err)\n\t}\n\tif err := unix.Chdir(\"/\"); err != nil {\n\t\treturn fmt.Errorf(\"changing to new root after chroot: %w\", err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/chroot_unix.go",
    "content": "//go:build !windows && !linux && !darwin\n\npackage chrootarchive\n\nimport \"golang.org/x/sys/unix\"\n\nfunc realChroot(path string) error {\n\tif err := unix.Chroot(path); err != nil {\n\t\treturn err\n\t}\n\treturn unix.Chdir(\"/\")\n}\n\nfunc chroot(path string) error {\n\treturn realChroot(path)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/diff.go",
    "content": "package chrootarchive\n\nimport (\n\t\"io\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\n// ApplyLayer parses a diff in the standard layer format from `layer`,\n// and applies it to the directory `dest`. The stream `layer` can only be\n// uncompressed.\n// Returns the size in bytes of the contents of the layer.\nfunc ApplyLayer(dest string, layer io.Reader) (size int64, err error) {\n\treturn applyLayerHandler(dest, layer, &archive.TarOptions{}, true)\n}\n\n// ApplyUncompressedLayer parses a diff in the standard layer format from\n// `layer`, and applies it to the directory `dest`. The stream `layer`\n// can only be uncompressed.\n// Returns the size in bytes of the contents of the layer.\nfunc ApplyUncompressedLayer(dest string, layer io.Reader, options *archive.TarOptions) (int64, error) {\n\treturn applyLayerHandler(dest, layer, options, false)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/diff_darwin.go",
    "content": "package chrootarchive\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\n// applyLayerHandler parses a diff in the standard layer format from `layer`, and\n// applies it to the directory `dest`. Returns the size in bytes of the\n// contents of the layer.\nfunc applyLayerHandler(dest string, layer io.Reader, options *archive.TarOptions, decompress bool) (size int64, err error) {\n\tdest = filepath.Clean(dest)\n\n\tif decompress {\n\t\tdecompressed, err := archive.DecompressStream(layer)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tdefer decompressed.Close()\n\n\t\tlayer = decompressed\n\t}\n\n\ttmpDir, err := os.MkdirTemp(os.Getenv(\"temp\"), \"temp-storage-extract\")\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer failed to create temp-storage-extract under %s: %w\", dest, err)\n\t}\n\n\ts, err := archive.UnpackLayer(dest, layer, options)\n\tos.RemoveAll(tmpDir)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer %s failed UnpackLayer to %s: %w\", layer, dest, err)\n\t}\n\n\treturn s, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/diff_unix.go",
    "content": "//go:build !windows && !darwin\n\npackage chrootarchive\n\nimport (\n\t\"bytes\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/reexec\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\ntype applyLayerResponse struct {\n\tLayerSize int64 `json:\"layerSize\"`\n}\n\n// applyLayer is the entry-point for storage-applylayer on re-exec. This is not\n// used on Windows as it does not support chroot, hence no point sandboxing\n// through chroot and rexec.\nfunc applyLayer() {\n\tvar (\n\t\ttmpDir  string\n\t\terr     error\n\t\toptions *archive.TarOptions\n\t)\n\truntime.LockOSThread()\n\tflag.Parse()\n\n\tinUserns := unshare.IsRootless()\n\tif err := chroot(flag.Arg(0)); err != nil {\n\t\tfatal(err)\n\t}\n\n\t// We need to be able to set any perms\n\toldMask, err := system.Umask(0)\n\tif err != nil {\n\t\tfatal(err)\n\t}\n\tdefer func() {\n\t\t_, _ = system.Umask(oldMask) // Ignore err. This can only fail with ErrNotSupportedPlatform, in which case we would have failed above.\n\t}()\n\n\tif err := json.Unmarshal([]byte(os.Getenv(\"OPT\")), &options); err != nil {\n\t\tfatal(err)\n\t}\n\n\tif inUserns {\n\t\toptions.InUserNS = true\n\t}\n\n\tif tmpDir, err = os.MkdirTemp(\"/\", \"temp-storage-extract\"); err != nil {\n\t\tfatal(err)\n\t}\n\n\tos.Setenv(\"TMPDIR\", tmpDir)\n\tsize, err := archive.UnpackLayer(\"/\", os.Stdin, options)\n\tos.RemoveAll(tmpDir)\n\tif err != nil {\n\t\tfatal(err)\n\t}\n\n\tencoder := json.NewEncoder(os.Stdout)\n\tif err := encoder.Encode(applyLayerResponse{size}); err != nil {\n\t\tfatal(fmt.Errorf(\"unable to encode layerSize JSON: %w\", err))\n\t}\n\n\tif _, err := flush(os.Stdin); err != nil {\n\t\tfatal(err)\n\t}\n\n\tos.Exit(0)\n}\n\n// applyLayerHandler parses a diff in the standard layer format from `layer`, and\n// applies it to the directory `dest`. Returns the size in bytes of the\n// contents of the layer.\nfunc applyLayerHandler(dest string, layer io.Reader, options *archive.TarOptions, decompress bool) (size int64, err error) {\n\tdest = filepath.Clean(dest)\n\tif decompress {\n\t\tdecompressed, err := archive.DecompressStream(layer)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tdefer decompressed.Close()\n\n\t\tlayer = decompressed\n\t}\n\tif options == nil {\n\t\toptions = &archive.TarOptions{}\n\t\tif unshare.IsRootless() {\n\t\t\toptions.InUserNS = true\n\t\t}\n\t}\n\n\tdata, err := json.Marshal(options)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer json encode: %w\", err)\n\t}\n\n\tcmd := reexec.Command(\"storage-applyLayer\", dest)\n\tcmd.Stdin = layer\n\tcmd.Env = append(os.Environ(), fmt.Sprintf(\"OPT=%s\", data))\n\n\toutBuf, errBuf := new(bytes.Buffer), new(bytes.Buffer)\n\tcmd.Stdout, cmd.Stderr = outBuf, errBuf\n\n\tif err = cmd.Run(); err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer stdout: %s stderr: %s %w\", outBuf, errBuf, err)\n\t}\n\n\t// Stdout should be a valid JSON struct representing an applyLayerResponse.\n\tresponse := applyLayerResponse{}\n\tdecoder := json.NewDecoder(outBuf)\n\tif err = decoder.Decode(&response); err != nil {\n\t\treturn 0, fmt.Errorf(\"unable to decode ApplyLayer JSON response: %w\", err)\n\t}\n\n\treturn response.LayerSize, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/diff_windows.go",
    "content": "package chrootarchive\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/longpath\"\n)\n\n// applyLayerHandler parses a diff in the standard layer format from `layer`, and\n// applies it to the directory `dest`. Returns the size in bytes of the\n// contents of the layer.\nfunc applyLayerHandler(dest string, layer io.Reader, options *archive.TarOptions, decompress bool) (size int64, err error) {\n\tdest = filepath.Clean(dest)\n\n\t// Ensure it is a Windows-style volume path\n\tdest = longpath.AddPrefix(dest)\n\n\tif decompress {\n\t\tdecompressed, err := archive.DecompressStream(layer)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tdefer decompressed.Close()\n\n\t\tlayer = decompressed\n\t}\n\n\ttmpDir, err := os.MkdirTemp(os.Getenv(\"temp\"), \"temp-storage-extract\")\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer failed to create temp-storage-extract under %s. %s\", dest, err)\n\t}\n\n\ts, err := archive.UnpackLayer(dest, layer, nil)\n\tos.RemoveAll(tmpDir)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"ApplyLayer %s failed UnpackLayer to %s: %s\", layer, dest, err)\n\t}\n\n\treturn s, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/init_unix.go",
    "content": "//go:build !windows && !darwin\n\npackage chrootarchive\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\nfunc init() {\n\treexec.Register(\"storage-applyLayer\", applyLayer)\n\treexec.Register(\"storage-untar\", untar)\n\treexec.Register(\"storage-tar\", tar)\n}\n\nfunc fatal(err error) {\n\tfmt.Fprint(os.Stderr, err)\n\tos.Exit(1)\n}\n\n// flush consumes all the bytes from the reader discarding\n// any errors\nfunc flush(r io.Reader) (bytes int64, err error) {\n\treturn io.Copy(io.Discard, r)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chrootarchive/jsoniter.go",
    "content": "//go:build !windows && !darwin\n\npackage chrootarchive\n\nimport jsoniter \"github.com/json-iterator/go\"\n\nvar json = jsoniter.ConfigCompatibleWithStandardLibrary\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/bloom_filter_linux.go",
    "content": "package chunked\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"io\"\n\n\t\"github.com/docker/go-units\"\n)\n\nconst bloomFilterMaxLength = 100 * units.MB // max size for bloom filter\n\ntype bloomFilter struct {\n\tbitArray []uint64\n\tk        uint32\n}\n\nfunc newBloomFilter(size int, k uint32) *bloomFilter {\n\tnumElements := (size + 63) / 64\n\tif numElements == 0 {\n\t\tnumElements = 1\n\t}\n\treturn &bloomFilter{\n\t\tbitArray: make([]uint64, numElements),\n\t\tk:        k,\n\t}\n}\n\nfunc newBloomFilterFromArray(bitArray []uint64, k uint32) *bloomFilter {\n\treturn &bloomFilter{\n\t\tbitArray: bitArray,\n\t\tk:        k,\n\t}\n}\n\nfunc (bf *bloomFilter) hashFn(item []byte, seed uint32) (uint64, uint64) {\n\tif len(item) == 0 {\n\t\treturn 0, 1\n\t}\n\tmod := uint32(len(bf.bitArray) * 64)\n\tseedSplit := seed % uint32(len(item))\n\thash := (crc32.ChecksumIEEE(item[:seedSplit]) ^ crc32.ChecksumIEEE(item[seedSplit:])) % mod\n\treturn uint64(hash / 64), uint64(1 << (hash % 64))\n}\n\nfunc (bf *bloomFilter) add(item []byte) {\n\tfor i := uint32(0); i < bf.k; i++ {\n\t\tindex, mask := bf.hashFn(item, i)\n\t\tbf.bitArray[index] |= mask\n\t}\n}\n\nfunc (bf *bloomFilter) maybeContains(item []byte) bool {\n\tfor i := uint32(0); i < bf.k; i++ {\n\t\tindex, mask := bf.hashFn(item, i)\n\t\tif bf.bitArray[index]&mask == 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc (bf *bloomFilter) writeTo(writer io.Writer) error {\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(len(bf.bitArray))); err != nil {\n\t\treturn err\n\t}\n\tif err := binary.Write(writer, binary.LittleEndian, bf.k); err != nil {\n\t\treturn err\n\t}\n\tif err := binary.Write(writer, binary.LittleEndian, bf.bitArray); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc readBloomFilter(reader io.Reader) (*bloomFilter, error) {\n\tvar bloomFilterLen uint64\n\tvar k uint32\n\n\tif err := binary.Read(reader, binary.LittleEndian, &bloomFilterLen); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := binary.Read(reader, binary.LittleEndian, &k); err != nil {\n\t\treturn nil, err\n\t}\n\t// sanity check\n\tif bloomFilterLen > bloomFilterMaxLength {\n\t\treturn nil, fmt.Errorf(\"bloom filter length %d exceeds max length %d\", bloomFilterLen, bloomFilterMaxLength)\n\t}\n\tbloomFilterArray := make([]uint64, bloomFilterLen)\n\tif err := binary.Read(reader, binary.LittleEndian, &bloomFilterArray); err != nil {\n\t\treturn nil, err\n\t}\n\treturn newBloomFilterFromArray(bloomFilterArray, k), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/cache_linux.go",
    "content": "package chunked\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"runtime\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/docker/go-units\"\n\tjsoniter \"github.com/json-iterator/go\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\tstorage \"go.podman.io/storage\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tcacheKey     = \"chunked-manifest-cache\"\n\tcacheVersion = 3\n\n\tdigestSha256Empty = \"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n\n\t// Using 3 hashes functions and n/m = 10 gives a false positive rate of ~1.7%:\n\t// https://pages.cs.wisc.edu/~cao/papers/summary-cache/node8.html\n\tbloomFilterScale  = 10 // how much bigger is the bloom filter than the number of entries\n\tbloomFilterHashes = 3  // number of hash functions for the bloom filter\n\n\tmaxTagsLen = 100 * units.MB // max size for tags len\n)\n\ntype cacheFile struct {\n\ttagLen      int\n\tdigestLen   int\n\tfnamesLen   int\n\ttags        []byte\n\tvdata       []byte\n\tfnames      []byte\n\tbloomFilter *bloomFilter\n}\n\ntype layer struct {\n\tid        string\n\tcacheFile *cacheFile\n\ttarget    string\n\t// mmapBuffer is nil when the cache file is fully loaded in memory.\n\t// Otherwise it points to a mmap'ed buffer that is referenced by cacheFile.vdata.\n\tmmapBuffer []byte\n\n\t// reloadWithMmap is set when the current process generates the cache file,\n\t// and cacheFile reuses the memory buffer used by the generation function.\n\t// Next time the layer cache is used, attempt to reload the file using\n\t// mmap.\n\treloadWithMmap bool\n}\n\ntype layersCache struct {\n\tlayers []*layer\n\trefs   int\n\tstore  storage.Store\n\tmutex  sync.RWMutex\n}\n\nvar (\n\tcacheMutex sync.Mutex\n\tcache      *layersCache\n)\n\nfunc (c *layer) release() {\n\truntime.SetFinalizer(c, nil)\n\tif c.mmapBuffer != nil {\n\t\tif err := unix.Munmap(c.mmapBuffer); err != nil {\n\t\t\tlogrus.Warnf(\"Error Munmap: layer %q: %v\", c.id, err)\n\t\t}\n\t\tc.mmapBuffer = nil\n\t}\n}\n\nfunc layerFinalizer(c *layer) {\n\tc.release()\n}\n\nfunc (c *layersCache) release() {\n\tcacheMutex.Lock()\n\tdefer cacheMutex.Unlock()\n\n\tc.refs--\n\tif c.refs != 0 {\n\t\treturn\n\t}\n\tfor _, l := range c.layers {\n\t\tl.release()\n\t}\n\tcache = nil\n}\n\nfunc getLayersCacheRef(store storage.Store) *layersCache {\n\tcacheMutex.Lock()\n\tdefer cacheMutex.Unlock()\n\tif cache != nil && cache.store == store {\n\t\tcache.refs++\n\t\treturn cache\n\t}\n\tcache = &layersCache{\n\t\tstore: store,\n\t\trefs:  1,\n\t}\n\treturn cache\n}\n\nfunc getLayersCache(store storage.Store) (*layersCache, error) {\n\tc := getLayersCacheRef(store)\n\n\tif err := c.load(); err != nil {\n\t\tc.release()\n\t\treturn nil, err\n\t}\n\treturn c, nil\n}\n\n// loadLayerBigData attempts to load the specified cacheKey from a file and mmap its content.\n// If the cache is not backed by a file, then it loads the entire content in memory.\n// Returns the cache content, and if mmap'ed, the mmap buffer to Munmap.\nfunc (c *layersCache) loadLayerBigData(layerID, bigDataKey string) ([]byte, []byte, error) {\n\tinputFile, err := c.store.LayerBigData(layerID, bigDataKey)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer inputFile.Close()\n\n\t// if the cache is backed by a file, attempt to mmap it.\n\tif osFile, ok := inputFile.(*os.File); ok {\n\t\tst, err := osFile.Stat()\n\t\tif err != nil {\n\t\t\tlogrus.Warningf(\"Error stat'ing cache file for layer %q: %v\", layerID, err)\n\t\t\tgoto fallback\n\t\t}\n\t\tsize := st.Size()\n\t\tif size == 0 {\n\t\t\tlogrus.Warningf(\"Cache file size is zero for layer %q: %v\", layerID, err)\n\t\t\tgoto fallback\n\t\t}\n\t\tbuf, err := unix.Mmap(int(osFile.Fd()), 0, int(size), unix.PROT_READ, unix.MAP_SHARED)\n\t\tif err != nil {\n\t\t\tlogrus.Warningf(\"Error mmap'ing cache file for layer %q: %v\", layerID, err)\n\t\t\tgoto fallback\n\t\t}\n\t\t// best effort advise to the kernel.\n\t\t_ = unix.Madvise(buf, unix.MADV_RANDOM)\n\n\t\treturn buf, buf, nil\n\t}\nfallback:\n\tbuf, err := io.ReadAll(inputFile)\n\treturn buf, nil, err\n}\n\nfunc makeBinaryDigest(stringDigest string) ([]byte, error) {\n\td, err := digest.Parse(stringDigest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdigestBytes, err := hex.DecodeString(d.Encoded())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\talgo := []byte(d.Algorithm())\n\tbuf := make([]byte, 0, len(algo)+1+len(digestBytes))\n\tbuf = append(buf, algo...)\n\tbuf = append(buf, ':')\n\tbuf = append(buf, digestBytes...)\n\treturn buf, nil\n}\n\n// loadLayerCache attempts to load the cache file for the specified layer.\n// If the cache file is not present or it it using a different cache file version, then\n// the function returns (nil, nil).\nfunc (c *layersCache) loadLayerCache(layerID string) (_ *layer, errRet error) {\n\tbuffer, mmapBuffer, err := c.loadLayerBigData(layerID, cacheKey)\n\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn nil, err\n\t}\n\t// there is no existing cache to load\n\tif err != nil || buffer == nil {\n\t\treturn nil, nil\n\t}\n\tdefer func() {\n\t\tif errRet != nil && mmapBuffer != nil {\n\t\t\tif err := unix.Munmap(mmapBuffer); err != nil {\n\t\t\t\tlogrus.Warnf(\"Error Munmap: layer %q: %v\", layerID, err)\n\t\t\t}\n\t\t}\n\t}()\n\tcacheFile, err := readCacheFileFromMemory(buffer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif cacheFile == nil {\n\t\treturn nil, nil\n\t}\n\treturn c.createLayer(layerID, cacheFile, mmapBuffer)\n}\n\n// createCacheFileFromTOC attempts to create a cache file for the specified layer.\n// If a TOC is not available, the cache won't be created and nil is returned.\nfunc (c *layersCache) createCacheFileFromTOC(layerID string) (*layer, error) {\n\tclFile, err := c.store.LayerBigData(layerID, chunkedLayerDataKey)\n\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\treturn nil, err\n\t}\n\tvar lcd chunkedLayerData\n\tif err == nil && clFile != nil {\n\t\tdefer clFile.Close()\n\t\tcl, err := io.ReadAll(clFile)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"open manifest file: %w\", err)\n\t\t}\n\t\tjson := jsoniter.ConfigCompatibleWithStandardLibrary\n\n\t\tif err := json.Unmarshal(cl, &lcd); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tmanifestReader, err := c.store.LayerBigData(layerID, bigDataKey)\n\tif err != nil {\n\t\t// the cache file is not needed since there is no manifest file.\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, err\n\t}\n\tdefer manifestReader.Close()\n\n\tmanifest, err := io.ReadAll(manifestReader)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"read manifest file: %w\", err)\n\t}\n\n\tcacheFile, err := writeCache(manifest, lcd.Format, layerID, c.store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tl, err := c.createLayer(layerID, cacheFile, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tl.reloadWithMmap = true\n\treturn l, nil\n}\n\nfunc (c *layersCache) load() error {\n\tc.mutex.Lock()\n\tdefer c.mutex.Unlock()\n\n\tloadedLayers := make(map[string]*layer)\n\tfor _, r := range c.layers {\n\t\tloadedLayers[r.id] = r\n\t}\n\tallLayers, err := c.store.Layers()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar newLayers []*layer\n\tfor _, r := range allLayers {\n\t\t// The layer is present in the store and it is already loaded.  Attempt to\n\t\t// reuse it if mmap'ed.\n\t\tif l, found := loadedLayers[r.ID]; found {\n\t\t\t// If the layer is not marked for re-load, move it to newLayers.\n\t\t\tif !l.reloadWithMmap {\n\t\t\t\tdelete(loadedLayers, r.ID)\n\t\t\t\tnewLayers = append(newLayers, l)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\t// try to read the existing cache file.\n\t\tl, err := c.loadLayerCache(r.ID)\n\t\tif err != nil {\n\t\t\tlogrus.Infof(\"Error loading cache file for layer %q: %v\", r.ID, err)\n\t\t}\n\t\tif l != nil {\n\t\t\tnewLayers = append(newLayers, l)\n\t\t\tcontinue\n\t\t}\n\n\t\tif r.ReadOnly {\n\t\t\t// If the layer is coming from a read-only store, do not attempt\n\t\t\t// to write to it.\n\t\t\t// Therefore, we won’t find any matches in read-only-store layers,\n\t\t\t// unless the read-only store layer comes prepopulated with cacheKey data.\n\t\t\tcontinue\n\t\t}\n\n\t\t// the cache file is either not present or broken.  Try to generate it from the TOC.\n\t\tl, err = c.createCacheFileFromTOC(r.ID)\n\t\tif err != nil && !errors.Is(err, storage.ErrLayerUnknown) {\n\t\t\tlogrus.Warningf(\"Error creating cache file for layer %q: %v\", r.ID, err)\n\t\t}\n\t\tif l != nil {\n\t\t\tnewLayers = append(newLayers, l)\n\t\t}\n\t}\n\t// The layers that are still in loadedLayers are either stale or fully loaded in memory.  Clean them up.\n\tfor _, l := range loadedLayers {\n\t\tl.release()\n\t}\n\tc.layers = newLayers\n\treturn nil\n}\n\n// calculateHardLinkFingerprint calculates a hash that can be used to verify if a file\n// is usable for deduplication with hardlinks.\n// To calculate the digest, it uses the file payload digest, UID, GID, mode and xattrs.\nfunc calculateHardLinkFingerprint(f *fileMetadata) (string, error) {\n\tdigester := digest.Canonical.Digester()\n\n\tmodeString := fmt.Sprintf(\"%d:%d:%o\", f.UID, f.GID, f.Mode)\n\thash := digester.Hash()\n\n\tif _, err := hash.Write([]byte(f.Digest)); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif _, err := hash.Write([]byte(modeString)); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif len(f.Xattrs) > 0 {\n\t\tkeys := make([]string, 0, len(f.Xattrs))\n\t\tfor k := range f.Xattrs {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t\tsort.Strings(keys)\n\n\t\tfor _, k := range keys {\n\t\t\tif _, err := hash.Write([]byte(k)); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tif _, err := hash.Write([]byte(f.Xattrs[k])); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t}\n\t}\n\treturn string(digester.Digest()), nil\n}\n\n// generateFileLocation generates a file location in the form $OFFSET$LEN$PATH_POS\nfunc generateFileLocation(pathPos int, offset, len uint64) []byte {\n\tvar buf []byte\n\n\tbuf = binary.AppendUvarint(buf, uint64(pathPos))\n\tbuf = binary.AppendUvarint(buf, offset)\n\tbuf = binary.AppendUvarint(buf, len)\n\n\treturn buf\n}\n\n// parseFileLocation reads what was written by generateFileLocation.\nfunc parseFileLocation(locationData []byte) (int, uint64, uint64, error) {\n\treader := bytes.NewReader(locationData)\n\n\tpathPos, err := binary.ReadUvarint(reader)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\n\toffset, err := binary.ReadUvarint(reader)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\n\tlen, err := binary.ReadUvarint(reader)\n\tif err != nil {\n\t\treturn 0, 0, 0, err\n\t}\n\n\treturn int(pathPos), offset, len, nil\n}\n\n// appendTag appends the $OFFSET$LEN information to the provided $DIGEST.\n// The [OFFSET; LEN] points to the variable length data where the file locations\n// are stored.  $DIGEST has length digestLen stored in the cache file file header.\nfunc appendTag(digest []byte, offset, len uint64) ([]byte, error) {\n\tdigest = binary.LittleEndian.AppendUint64(digest, offset)\n\tdigest = binary.LittleEndian.AppendUint64(digest, len)\n\treturn digest, nil\n}\n\ntype setBigData interface {\n\t// SetLayerBigData stores a (possibly large) chunk of named data\n\tSetLayerBigData(id, key string, data io.Reader) error\n}\n\nfunc bloomFilterFromTags(tags [][]byte, digestLen int) *bloomFilter {\n\tbloomFilter := newBloomFilter(len(tags)*bloomFilterScale, bloomFilterHashes)\n\tfor _, t := range tags {\n\t\tbloomFilter.add(t[:digestLen])\n\t}\n\treturn bloomFilter\n}\n\nfunc writeCacheFileToWriter(writer io.Writer, bloomFilter *bloomFilter, tags [][]byte, tagLen, digestLen int, vdata, fnames bytes.Buffer, tagsBuffer *bytes.Buffer) error {\n\tslices.SortFunc(tags, bytes.Compare)\n\tfor _, t := range tags {\n\t\tif _, err := tagsBuffer.Write(t); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// version\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(cacheVersion)); err != nil {\n\t\treturn err\n\t}\n\n\t// len of a tag\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(tagLen)); err != nil {\n\t\treturn err\n\t}\n\n\t// len of a digest\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(digestLen)); err != nil {\n\t\treturn err\n\t}\n\n\t// bloom filter\n\tif err := bloomFilter.writeTo(writer); err != nil {\n\t\treturn err\n\t}\n\n\t// tags length\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(tagsBuffer.Len())); err != nil {\n\t\treturn err\n\t}\n\n\t// vdata length\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(vdata.Len())); err != nil {\n\t\treturn err\n\t}\n\n\t// fnames length\n\tif err := binary.Write(writer, binary.LittleEndian, uint64(fnames.Len())); err != nil {\n\t\treturn err\n\t}\n\n\t// tags\n\tif _, err := writer.Write(tagsBuffer.Bytes()); err != nil {\n\t\treturn err\n\t}\n\n\t// variable length data\n\tif _, err := writer.Write(vdata.Bytes()); err != nil {\n\t\treturn err\n\t}\n\n\t// file names\n\tif _, err := writer.Write(fnames.Bytes()); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// writeCache write a cache for the layer ID.\n// It generates a sorted list of digests with their offset to the path location and offset.\n// The same cache is used to lookup files, chunks and candidates for deduplication with hard links.\n// There are 3 kind of digests stored:\n// - digest(file.payload))\n// - digest(digest(file.payload) + file.UID + file.GID + file.mode + file.xattrs)\n// - digest(i) for each i in chunks(file payload)\nfunc writeCache(manifest []byte, format graphdriver.DifferOutputFormat, id string, dest setBigData) (*cacheFile, error) {\n\tvar vdata, tagsBuffer, fnames bytes.Buffer\n\ttagLen := 0\n\tdigestLen := 0\n\n\ttoc, err := prepareCacheFile(manifest, format)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfnamesMap := make(map[string]int)\n\tgetFileNamePosition := func(name string) (int, error) {\n\t\tif pos, found := fnamesMap[name]; found {\n\t\t\treturn pos, nil\n\t\t}\n\t\tpos := fnames.Len()\n\t\tfnamesMap[name] = pos\n\n\t\tif err := binary.Write(&fnames, binary.LittleEndian, uint32(len(name))); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif _, err := fnames.WriteString(name); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\treturn pos, nil\n\t}\n\n\tvar tags [][]byte\n\tfor _, k := range toc {\n\t\tif k.Digest != \"\" {\n\t\t\tdigest, err := makeBinaryDigest(k.Digest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tfileNamePos, err := getFileNamePosition(k.Name)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tlocation := generateFileLocation(fileNamePos, 0, uint64(k.Size))\n\t\t\toff := uint64(vdata.Len())\n\t\t\tl := uint64(len(location))\n\n\t\t\ttag, err := appendTag(digest, off, l)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif tagLen == 0 {\n\t\t\t\ttagLen = len(tag)\n\t\t\t}\n\t\t\tif tagLen != len(tag) {\n\t\t\t\treturn nil, errors.New(\"digest with different length found\")\n\t\t\t}\n\t\t\ttags = append(tags, tag)\n\n\t\t\tfp, err := calculateHardLinkFingerprint(k)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdigestHardLink, err := makeBinaryDigest(fp)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\ttag, err = appendTag(digestHardLink, off, l)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif tagLen != len(tag) {\n\t\t\t\treturn nil, errors.New(\"digest with different length found\")\n\t\t\t}\n\t\t\ttags = append(tags, tag)\n\n\t\t\tif _, err := vdata.Write(location); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdigestLen = len(digestHardLink)\n\t\t}\n\t\tif k.ChunkDigest != \"\" {\n\t\t\tfileNamePos, err := getFileNamePosition(k.Name)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tlocation := generateFileLocation(fileNamePos, uint64(k.ChunkOffset), uint64(k.ChunkSize))\n\t\t\toff := uint64(vdata.Len())\n\t\t\tl := uint64(len(location))\n\n\t\t\tdigest, err := makeBinaryDigest(k.ChunkDigest)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\td, err := appendTag(digest, off, l)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif tagLen == 0 {\n\t\t\t\ttagLen = len(d)\n\t\t\t}\n\t\t\tif tagLen != len(d) {\n\t\t\t\treturn nil, errors.New(\"digest with different length found\")\n\t\t\t}\n\t\t\ttags = append(tags, d)\n\n\t\t\tif _, err := vdata.Write(location); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdigestLen = len(digest)\n\t\t}\n\t}\n\n\tbloomFilter := bloomFilterFromTags(tags, digestLen)\n\n\tpipeReader, pipeWriter := io.Pipe()\n\terrChan := make(chan error, 1)\n\tgo func() {\n\t\tdefer pipeWriter.Close()\n\t\tdefer close(errChan)\n\n\t\terrChan <- writeCacheFileToWriter(pipeWriter, bloomFilter, tags, tagLen, digestLen, vdata, fnames, &tagsBuffer)\n\t}()\n\tdefer pipeReader.Close()\n\n\tcounter := ioutils.NewWriteCounter(io.Discard)\n\n\tr := io.TeeReader(pipeReader, counter)\n\n\tif err := dest.SetLayerBigData(id, cacheKey, r); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := <-errChan; err != nil {\n\t\treturn nil, err\n\t}\n\n\tlogrus.Debugf(\"Written lookaside cache for layer %q with length %v\", id, counter.Count)\n\n\treturn &cacheFile{\n\t\tdigestLen:   digestLen,\n\t\ttagLen:      tagLen,\n\t\ttags:        tagsBuffer.Bytes(),\n\t\tvdata:       vdata.Bytes(),\n\t\tfnames:      fnames.Bytes(),\n\t\tfnamesLen:   len(fnames.Bytes()),\n\t\tbloomFilter: bloomFilter,\n\t}, nil\n}\n\n// readCacheFileFromMemory reads a cache file from a buffer.\n// It can return (nil, nil) if the cache file uses a different file version that the one currently supported.\nfunc readCacheFileFromMemory(bigDataBuffer []byte) (*cacheFile, error) {\n\tbigData := bytes.NewReader(bigDataBuffer)\n\n\tvar version, tagLen, digestLen, tagsLen, fnamesLen, vdataLen uint64\n\tif err := binary.Read(bigData, binary.LittleEndian, &version); err != nil {\n\t\treturn nil, err\n\t}\n\tif version != cacheVersion {\n\t\treturn nil, nil //nolint: nilnil\n\t}\n\tif err := binary.Read(bigData, binary.LittleEndian, &tagLen); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := binary.Read(bigData, binary.LittleEndian, &digestLen); err != nil {\n\t\treturn nil, err\n\t}\n\n\tbloomFilter, err := readBloomFilter(bigData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := binary.Read(bigData, binary.LittleEndian, &tagsLen); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := binary.Read(bigData, binary.LittleEndian, &vdataLen); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := binary.Read(bigData, binary.LittleEndian, &fnamesLen); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif tagsLen > maxTagsLen {\n\t\treturn nil, fmt.Errorf(\"tags len %d exceeds the maximum allowed size %d\", tagsLen, maxTagsLen)\n\t}\n\tif digestLen > tagLen {\n\t\treturn nil, fmt.Errorf(\"digest len %d exceeds the tag len %d\", digestLen, tagLen)\n\t}\n\n\ttags := make([]byte, tagsLen)\n\tif _, err := bigData.Read(tags); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// retrieve the unread part of the buffer.\n\tremaining := bigDataBuffer[len(bigDataBuffer)-bigData.Len():]\n\n\tif vdataLen >= uint64(len(remaining)) {\n\t\treturn nil, fmt.Errorf(\"vdata len %d exceeds the remaining buffer size %d\", vdataLen, len(remaining))\n\t}\n\n\tvdata := remaining[:vdataLen]\n\tfnames := remaining[vdataLen:]\n\n\treturn &cacheFile{\n\t\tbloomFilter: bloomFilter,\n\t\tdigestLen:   int(digestLen),\n\t\tfnames:      fnames,\n\t\tfnamesLen:   int(fnamesLen),\n\t\ttagLen:      int(tagLen),\n\t\ttags:        tags,\n\t\tvdata:       vdata,\n\t}, nil\n}\n\nfunc prepareCacheFile(manifest []byte, format graphdriver.DifferOutputFormat) ([]*fileMetadata, error) {\n\ttoc, err := unmarshalToc(manifest)\n\tif err != nil {\n\t\t// ignore errors here.  They might be caused by a different manifest format.\n\t\tlogrus.Debugf(\"could not unmarshal manifest: %v\", err)\n\t\treturn nil, nil //nolint: nilnil\n\t}\n\n\tvar entries []fileMetadata\n\tfor i := range toc.Entries {\n\t\tentries = append(entries, fileMetadata{\n\t\t\tFileMetadata: toc.Entries[i],\n\t\t})\n\t}\n\n\tswitch format {\n\tcase graphdriver.DifferOutputFormatDir:\n\tcase graphdriver.DifferOutputFormatFlat:\n\t\tentries, err = makeEntriesFlat(entries, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown format %q\", format)\n\t}\n\n\tvar r []*fileMetadata\n\tchunkSeen := make(map[string]bool)\n\tfor i := range entries {\n\t\td := entries[i].Digest\n\t\tif d != \"\" {\n\t\t\tr = append(r, &entries[i])\n\t\t\tcontinue\n\t\t}\n\n\t\t// chunks do not use hard link dedup so keeping just one candidate is enough\n\t\tcd := toc.Entries[i].ChunkDigest\n\t\tif cd != \"\" && !chunkSeen[cd] {\n\t\t\tr = append(r, &entries[i])\n\t\t\tchunkSeen[cd] = true\n\t\t}\n\t}\n\n\treturn r, nil\n}\n\nfunc (c *layersCache) createLayer(id string, cacheFile *cacheFile, mmapBuffer []byte) (*layer, error) {\n\ttarget, err := c.store.DifferTarget(id)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"get checkout directory layer %q: %w\", id, err)\n\t}\n\tl := &layer{\n\t\tid:         id,\n\t\tcacheFile:  cacheFile,\n\t\ttarget:     target,\n\t\tmmapBuffer: mmapBuffer,\n\t}\n\tif mmapBuffer != nil {\n\t\truntime.SetFinalizer(l, layerFinalizer)\n\t}\n\treturn l, nil\n}\n\nfunc findBinaryTag(binaryDigest []byte, cacheFile *cacheFile) (bool, uint64, uint64) {\n\tnElements := len(cacheFile.tags) / cacheFile.tagLen\n\n\ti := sort.Search(nElements, func(i int) bool {\n\t\td := cacheFile.tags[i*cacheFile.tagLen : i*cacheFile.tagLen+cacheFile.digestLen]\n\t\treturn bytes.Compare(d, binaryDigest) >= 0\n\t})\n\tif i < nElements {\n\t\td := cacheFile.tags[i*cacheFile.tagLen : i*cacheFile.tagLen+cacheFile.digestLen]\n\t\tif bytes.Equal(binaryDigest, d) {\n\t\t\tstartOff := i*cacheFile.tagLen + cacheFile.digestLen\n\n\t\t\t// check for corrupted data, there must be 2 u64 (off and len) after the digest.\n\t\t\tif cacheFile.tagLen < cacheFile.digestLen+16 {\n\t\t\t\treturn false, 0, 0\n\t\t\t}\n\n\t\t\toffsetAndLen := cacheFile.tags[startOff : (i+1)*cacheFile.tagLen]\n\n\t\t\toff := binary.LittleEndian.Uint64(offsetAndLen[:8])\n\t\t\tlen := binary.LittleEndian.Uint64(offsetAndLen[8:16])\n\n\t\t\treturn true, off, len\n\t\t}\n\t}\n\treturn false, 0, 0\n}\n\nfunc (c *layersCache) findDigestInternal(digest string) (string, string, int64, error) {\n\tif digest == \"\" {\n\t\treturn \"\", \"\", -1, nil\n\t}\n\n\tc.mutex.RLock()\n\tdefer c.mutex.RUnlock()\n\n\tbinaryDigest, err := makeBinaryDigest(digest)\n\tif err != nil {\n\t\treturn \"\", \"\", 0, err\n\t}\n\n\tfor _, layer := range c.layers {\n\t\tif !layer.cacheFile.bloomFilter.maybeContains(binaryDigest) {\n\t\t\tcontinue\n\t\t}\n\t\tfound, off, tagLen := findBinaryTag(binaryDigest, layer.cacheFile)\n\t\tif found {\n\t\t\tif uint64(len(layer.cacheFile.vdata)) < off+tagLen {\n\t\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"corrupted cache file for layer %q\", layer.id)\n\t\t\t}\n\t\t\tfileLocationData := layer.cacheFile.vdata[off : off+tagLen]\n\n\t\t\tfnamePosition, offFile, _, err := parseFileLocation(fileLocationData)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"corrupted cache file for layer %q\", layer.id)\n\t\t\t}\n\n\t\t\tif len(layer.cacheFile.fnames) < fnamePosition+4 {\n\t\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"corrupted cache file for layer %q\", layer.id)\n\t\t\t}\n\t\t\tlenPath := int(binary.LittleEndian.Uint32(layer.cacheFile.fnames[fnamePosition : fnamePosition+4]))\n\n\t\t\tif len(layer.cacheFile.fnames) < fnamePosition+lenPath+4 {\n\t\t\t\treturn \"\", \"\", 0, fmt.Errorf(\"corrupted cache file for layer %q\", layer.id)\n\t\t\t}\n\t\t\tpath := string(layer.cacheFile.fnames[fnamePosition+4 : fnamePosition+lenPath+4])\n\n\t\t\t// parts[1] is the chunk length, currently unused.\n\t\t\treturn layer.target, path, int64(offFile), nil\n\t\t}\n\t}\n\n\treturn \"\", \"\", -1, nil\n}\n\n// findFileInOtherLayers finds the specified file in other layers.\n// file is the file to look for.\nfunc (c *layersCache) findFileInOtherLayers(file *fileMetadata, useHardLinks bool) (string, string, error) {\n\tdigest := file.Digest\n\tif useHardLinks {\n\t\tvar err error\n\t\tdigest, err = calculateHardLinkFingerprint(file)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", err\n\t\t}\n\t}\n\ttarget, name, off, err := c.findDigestInternal(digest)\n\tif off == 0 {\n\t\treturn target, name, err\n\t}\n\treturn \"\", \"\", nil\n}\n\nfunc (c *layersCache) findChunkInOtherLayers(chunk *minimal.FileMetadata) (string, string, int64, error) {\n\treturn c.findDigestInternal(chunk.ChunkDigest)\n}\n\nfunc unmarshalToc(manifest []byte) (*minimal.TOC, error) {\n\tvar toc minimal.TOC\n\n\titer := jsoniter.ParseBytes(jsoniter.ConfigFastest, manifest)\n\n\tfor field := iter.ReadObject(); field != \"\"; field = iter.ReadObject() {\n\t\tswitch strings.ToLower(field) {\n\t\tcase \"version\":\n\t\t\ttoc.Version = iter.ReadInt()\n\n\t\tcase \"entries\":\n\t\t\tfor iter.ReadArray() {\n\t\t\t\tvar m minimal.FileMetadata\n\t\t\t\tfor field := iter.ReadObject(); field != \"\"; field = iter.ReadObject() {\n\t\t\t\t\tswitch strings.ToLower(field) {\n\t\t\t\t\tcase \"type\":\n\t\t\t\t\t\tm.Type = iter.ReadString()\n\t\t\t\t\tcase \"name\":\n\t\t\t\t\t\tm.Name = iter.ReadString()\n\t\t\t\t\tcase \"linkname\":\n\t\t\t\t\t\tm.Linkname = iter.ReadString()\n\t\t\t\t\tcase \"mode\":\n\t\t\t\t\t\tm.Mode = iter.ReadInt64()\n\t\t\t\t\tcase \"size\":\n\t\t\t\t\t\tm.Size = iter.ReadInt64()\n\t\t\t\t\tcase \"uid\":\n\t\t\t\t\t\tm.UID = iter.ReadInt()\n\t\t\t\t\tcase \"gid\":\n\t\t\t\t\t\tm.GID = iter.ReadInt()\n\t\t\t\t\tcase \"modtime\":\n\t\t\t\t\t\ttime, err := time.Parse(time.RFC3339, iter.ReadString())\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tm.ModTime = &time\n\t\t\t\t\tcase \"accesstime\":\n\t\t\t\t\t\ttime, err := time.Parse(time.RFC3339, iter.ReadString())\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tm.AccessTime = &time\n\t\t\t\t\tcase \"changetime\":\n\t\t\t\t\t\ttime, err := time.Parse(time.RFC3339, iter.ReadString())\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tm.ChangeTime = &time\n\t\t\t\t\tcase \"devmajor\":\n\t\t\t\t\t\tm.Devmajor = iter.ReadInt64()\n\t\t\t\t\tcase \"devminor\":\n\t\t\t\t\t\tm.Devminor = iter.ReadInt64()\n\t\t\t\t\tcase \"digest\":\n\t\t\t\t\t\tm.Digest = iter.ReadString()\n\t\t\t\t\tcase \"offset\":\n\t\t\t\t\t\tm.Offset = iter.ReadInt64()\n\t\t\t\t\tcase \"endoffset\":\n\t\t\t\t\t\tm.EndOffset = iter.ReadInt64()\n\t\t\t\t\tcase \"chunksize\":\n\t\t\t\t\t\tm.ChunkSize = iter.ReadInt64()\n\t\t\t\t\tcase \"chunkoffset\":\n\t\t\t\t\t\tm.ChunkOffset = iter.ReadInt64()\n\t\t\t\t\tcase \"chunkdigest\":\n\t\t\t\t\t\tm.ChunkDigest = iter.ReadString()\n\t\t\t\t\tcase \"chunktype\":\n\t\t\t\t\t\tm.ChunkType = iter.ReadString()\n\t\t\t\t\tcase \"xattrs\":\n\t\t\t\t\t\tm.Xattrs = make(map[string]string)\n\t\t\t\t\t\tfor key := iter.ReadObject(); key != \"\"; key = iter.ReadObject() {\n\t\t\t\t\t\t\tm.Xattrs[key] = iter.ReadString()\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\titer.Skip()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif m.Type == TypeReg && m.Size == 0 && m.Digest == \"\" {\n\t\t\t\t\tm.Digest = digestSha256Empty\n\t\t\t\t}\n\t\t\t\ttoc.Entries = append(toc.Entries, m)\n\t\t\t}\n\n\t\tcase \"tarsplitdigest\": // strings.ToLower(\"tarSplitDigest\")\n\t\t\ts := iter.ReadString()\n\t\t\td, err := digest.Parse(s)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid tarSplitDigest %q: %w\", s, err)\n\t\t\t}\n\t\t\ttoc.TarSplitDigest = d\n\n\t\tdefault:\n\t\t\titer.Skip()\n\t\t}\n\t}\n\n\t// validate there is no extra data in the provided input.  This is a security measure to avoid\n\t// that the digest we calculate for the TOC refers to the entire document.\n\tif iter.Error != nil && iter.Error != io.EOF {\n\t\treturn nil, iter.Error\n\t}\n\tif iter.WhatIsNext() != jsoniter.InvalidValue || !errors.Is(iter.Error, io.EOF) {\n\t\treturn nil, fmt.Errorf(\"unexpected data after manifest\")\n\t}\n\n\treturn &toc, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/compression.go",
    "content": "package chunked\n\nimport (\n\t\"io\"\n\n\t\"go.podman.io/storage/pkg/chunked/compressor\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n)\n\nconst (\n\tTypeReg     = minimal.TypeReg\n\tTypeChunk   = minimal.TypeChunk\n\tTypeLink    = minimal.TypeLink\n\tTypeChar    = minimal.TypeChar\n\tTypeBlock   = minimal.TypeBlock\n\tTypeDir     = minimal.TypeDir\n\tTypeFifo    = minimal.TypeFifo\n\tTypeSymlink = minimal.TypeSymlink\n)\n\n// ZstdCompressor is a CompressorFunc for the zstd compression algorithm.\n// Deprecated: Use pkg/chunked/compressor.ZstdCompressor.\nfunc ZstdCompressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\treturn compressor.ZstdCompressor(r, metadata, level)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/compression_linux.go",
    "content": "package chunked\n\nimport (\n\tarchivetar \"archive/tar\"\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"os\"\n\t\"slices\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/klauspost/compress/zstd\"\n\t\"github.com/klauspost/pgzip\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/asm\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// maxTocSize is the maximum size of a blob that we will attempt to process.\n\t// It is used to prevent DoS attacks from layers that embed a very large TOC file.\n\tmaxTocSize = (1 << 20) * 150\n)\n\nvar typesToTar = map[string]byte{\n\tTypeReg:     tar.TypeReg,\n\tTypeLink:    tar.TypeLink,\n\tTypeChar:    tar.TypeChar,\n\tTypeBlock:   tar.TypeBlock,\n\tTypeDir:     tar.TypeDir,\n\tTypeFifo:    tar.TypeFifo,\n\tTypeSymlink: tar.TypeSymlink,\n}\n\nfunc typeToTarType(t string) (byte, error) {\n\tr, found := typesToTar[t]\n\tif !found {\n\t\treturn 0, fmt.Errorf(\"unknown type: %v\", t)\n\t}\n\treturn r, nil\n}\n\n// readEstargzChunkedManifest reads the estargz manifest from the seekable stream blobStream.\n// It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert.\nfunc readEstargzChunkedManifest(blobStream ImageSourceSeekable, blobSize int64, tocDigest digest.Digest) ([]byte, int64, error) {\n\t// information on the format here https://github.com/containerd/stargz-snapshotter/blob/main/docs/stargz-estargz.md\n\tfooterSize := int64(51)\n\tif blobSize <= footerSize {\n\t\treturn nil, 0, errors.New(\"blob too small\")\n\t}\n\n\tfooter := make([]byte, footerSize)\n\tstreamsOrErrors, err := getBlobAt(blobStream, ImageSourceChunk{Offset: uint64(blobSize - footerSize), Length: uint64(footerSize)})\n\tif err != nil {\n\t\tvar badRequestErr ErrBadRequest\n\t\tif errors.As(err, &badRequestErr) {\n\t\t\terr = errFallbackCanConvert{newErrFallbackToOrdinaryLayerDownload(err)}\n\t\t}\n\t\treturn nil, 0, err\n\t}\n\n\tfor soe := range streamsOrErrors {\n\t\tif soe.stream != nil {\n\t\t\t_, err = io.ReadFull(soe.stream, footer)\n\t\t\t_ = soe.stream.Close()\n\t\t}\n\t\tif soe.err != nil && err == nil {\n\t\t\terr = soe.err\n\t\t}\n\t}\n\n\t/* Read the ToC offset:\n\t   - 10 bytes  gzip header\n\t   - 2  bytes  XLEN (length of Extra field) = 26 (4 bytes header + 16 hex digits + len(\"STARGZ\"))\n\t   - 2  bytes  Extra: SI1 = 'S', SI2 = 'G'\n\t   - 2  bytes  Extra: LEN = 22 (16 hex digits + len(\"STARGZ\"))\n\t   - 22 bytes  Extra: subfield = fmt.Sprintf(\"%016xSTARGZ\", offsetOfTOC)\n\t   - 5  bytes  flate header: BFINAL = 1(last block), BTYPE = 0(non-compressed block), LEN = 0\n\t   - 8  bytes  gzip footer\n\t*/\n\ttocOffset, err := strconv.ParseInt(string(footer[16:16+22-6]), 16, 64)\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"parse ToC offset: %w\", err)\n\t}\n\n\tsize := blobSize - footerSize - tocOffset\n\t// set a reasonable limit\n\tif size > maxTocSize {\n\t\t// Not errFallbackCanConvert: we would still use too much memory.\n\t\treturn nil, 0, newErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"estargz manifest too big to process in memory (%d bytes)\", size))\n\t}\n\n\tstreamsOrErrors, err = getBlobAt(blobStream, ImageSourceChunk{Offset: uint64(tocOffset), Length: uint64(size)})\n\tif err != nil {\n\t\tvar badRequestErr ErrBadRequest\n\t\tif errors.As(err, &badRequestErr) {\n\t\t\terr = errFallbackCanConvert{newErrFallbackToOrdinaryLayerDownload(err)}\n\t\t}\n\t\treturn nil, 0, err\n\t}\n\n\tvar manifestUncompressed []byte\n\n\tfor soe := range streamsOrErrors {\n\t\tif soe.stream != nil {\n\t\t\terr1 := func() error {\n\t\t\t\tdefer soe.stream.Close()\n\n\t\t\t\tr, err := pgzip.NewReader(soe.stream)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tdefer r.Close()\n\n\t\t\t\taTar := archivetar.NewReader(r)\n\n\t\t\t\theader, err := aTar.Next()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\t// set a reasonable limit\n\t\t\t\tif header.Size > maxTocSize {\n\t\t\t\t\treturn errors.New(\"manifest too big\")\n\t\t\t\t}\n\n\t\t\t\tmanifestUncompressed = make([]byte, header.Size)\n\t\t\t\tif _, err := io.ReadFull(aTar, manifestUncompressed); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}()\n\t\t\tif err == nil {\n\t\t\t\terr = err1\n\t\t\t}\n\t\t} else if err == nil {\n\t\t\terr = soe.err\n\t\t}\n\t}\n\tif manifestUncompressed == nil {\n\t\treturn nil, 0, errors.New(\"manifest not found\")\n\t}\n\n\tmanifestDigester := digest.Canonical.Digester()\n\tmanifestChecksum := manifestDigester.Hash()\n\tif _, err := manifestChecksum.Write(manifestUncompressed); err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tif manifestDigester.Digest() != tocDigest {\n\t\treturn nil, 0, errors.New(\"invalid manifest checksum\")\n\t}\n\n\treturn manifestUncompressed, tocOffset, nil\n}\n\nfunc openTmpFile(tmpDir string) (*os.File, error) {\n\tfile, err := os.OpenFile(tmpDir, unix.O_TMPFILE|unix.O_RDWR|unix.O_CLOEXEC|unix.O_EXCL, 0o600)\n\tif err == nil {\n\t\treturn file, nil\n\t}\n\treturn openTmpFileNoTmpFile(tmpDir)\n}\n\n// openTmpFileNoTmpFile is a fallback used by openTmpFile when the underlying file system does not\n// support O_TMPFILE.\nfunc openTmpFileNoTmpFile(tmpDir string) (*os.File, error) {\n\tfile, err := os.CreateTemp(tmpDir, \".tmpfile\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// Unlink the file immediately so that only the open fd refers to it.\n\t_ = os.Remove(file.Name())\n\treturn file, nil\n}\n\n// readZstdChunkedManifest reads the zstd:chunked manifest from the seekable stream blobStream.\n// tmpDir is a directory where the tar-split temporary file is written to.  The file is opened with\n// O_TMPFILE so that it is automatically removed when it is closed.\n// Returns (manifest blob, parsed manifest, tar-split file or nil, manifest offset).\n// The opened tar-split file’s position is unspecified.\n// It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert.\n// The compressed parameter indicates whether the manifest and tar-split data are zstd-compressed\n// (true) or stored uncompressed (false).  Uncompressed data is used only for an optimization to convert\n// a regular OCI layer to zstd:chunked when convert_images is set, and it is not used for distributed images.\nfunc readZstdChunkedManifest(tmpDir string, blobStream ImageSourceSeekable, tocDigest digest.Digest, annotations map[string]string, compressed bool) (_ []byte, _ *minimal.TOC, _ *os.File, _ int64, retErr error) {\n\toffsetMetadata := annotations[minimal.ManifestInfoKey]\n\tif offsetMetadata == \"\" {\n\t\treturn nil, nil, nil, 0, fmt.Errorf(\"%q annotation missing\", minimal.ManifestInfoKey)\n\t}\n\tvar manifestChunk ImageSourceChunk\n\tvar manifestLengthUncompressed, manifestType uint64\n\tif _, err := fmt.Sscanf(offsetMetadata, \"%d:%d:%d:%d\", &manifestChunk.Offset, &manifestChunk.Length, &manifestLengthUncompressed, &manifestType); err != nil {\n\t\treturn nil, nil, nil, 0, err\n\t}\n\t// The tarSplit… values are valid if tarSplitChunk.Offset > 0\n\tvar tarSplitChunk ImageSourceChunk\n\tvar tarSplitLengthUncompressed uint64\n\tif tarSplitInfoKeyAnnotation, found := annotations[minimal.TarSplitInfoKey]; found {\n\t\tif _, err := fmt.Sscanf(tarSplitInfoKeyAnnotation, \"%d:%d:%d\", &tarSplitChunk.Offset, &tarSplitChunk.Length, &tarSplitLengthUncompressed); err != nil {\n\t\t\treturn nil, nil, nil, 0, err\n\t\t}\n\t}\n\n\tif manifestType != minimal.ManifestTypeCRFS {\n\t\treturn nil, nil, nil, 0, errors.New(\"invalid manifest type\")\n\t}\n\n\t// set a reasonable limit\n\tif manifestChunk.Length > maxTocSize {\n\t\t// Not errFallbackCanConvert: we would still use too much memory.\n\t\treturn nil, nil, nil, 0, newErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"zstd:chunked manifest too big to process in memory (%d bytes compressed)\", manifestChunk.Length))\n\t}\n\tif manifestLengthUncompressed > maxTocSize {\n\t\t// Not errFallbackCanConvert: we would still use too much memory.\n\t\treturn nil, nil, nil, 0, newErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"zstd:chunked manifest too big to process in memory (%d bytes uncompressed)\", manifestLengthUncompressed))\n\t}\n\n\tchunks := []ImageSourceChunk{manifestChunk}\n\tif tarSplitChunk.Offset > 0 {\n\t\tchunks = append(chunks, tarSplitChunk)\n\t}\n\n\tstreamsOrErrors, err := getBlobAt(blobStream, chunks...)\n\tif err != nil {\n\t\tvar badRequestErr ErrBadRequest\n\t\tif errors.As(err, &badRequestErr) {\n\t\t\terr = errFallbackCanConvert{newErrFallbackToOrdinaryLayerDownload(err)}\n\t\t}\n\t\treturn nil, nil, nil, 0, err\n\t}\n\n\tdefer func() {\n\t\terr := ensureAllBlobsDone(streamsOrErrors)\n\t\tif retErr == nil {\n\t\t\tretErr = err\n\t\t}\n\t}()\n\n\treadBlob := func(len uint64) ([]byte, error) {\n\t\tsoe, ok := <-streamsOrErrors\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"stream closed\")\n\t\t}\n\t\tif soe.err != nil {\n\t\t\treturn nil, soe.err\n\t\t}\n\t\tdefer soe.stream.Close()\n\n\t\tblob := make([]byte, len)\n\t\tif _, err := io.ReadFull(soe.stream, blob); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn blob, nil\n\t}\n\n\tmanifest, err := readBlob(manifestChunk.Length)\n\tif err != nil {\n\t\treturn nil, nil, nil, 0, err\n\t}\n\n\tdecodedBlob, err := decodeAndValidateBlob(manifest, manifestLengthUncompressed, tocDigest.String(), compressed)\n\tif err != nil {\n\t\treturn nil, nil, nil, 0, fmt.Errorf(\"validating and decompressing TOC: %w\", err)\n\t}\n\ttoc, err := unmarshalToc(decodedBlob)\n\tif err != nil {\n\t\treturn nil, nil, nil, 0, fmt.Errorf(\"unmarshaling TOC: %w\", err)\n\t}\n\n\tvar decodedTarSplit *os.File\n\tif toc.TarSplitDigest != \"\" {\n\t\tif tarSplitChunk.Offset <= 0 {\n\t\t\treturn nil, nil, nil, 0, fmt.Errorf(\"TOC requires a tar-split, but the %s annotation does not describe a position\", minimal.TarSplitInfoKey)\n\t\t}\n\t\ttarSplit, err := readBlob(tarSplitChunk.Length)\n\t\tif err != nil {\n\t\t\treturn nil, nil, nil, 0, err\n\t\t}\n\t\tdecodedTarSplit, err = openTmpFile(tmpDir)\n\t\tif err != nil {\n\t\t\treturn nil, nil, nil, 0, err\n\t\t}\n\t\tdefer func() {\n\t\t\tif retErr != nil {\n\t\t\t\tdecodedTarSplit.Close()\n\t\t\t}\n\t\t}()\n\t\tif err := decodeAndValidateBlobToStream(tarSplit, decodedTarSplit, toc.TarSplitDigest.String(), compressed); err != nil {\n\t\t\treturn nil, nil, nil, 0, fmt.Errorf(\"validating and decompressing tar-split: %w\", err)\n\t\t}\n\t\t// We use the TOC for creating on-disk files, but the tar-split for creating metadata\n\t\t// when exporting the layer contents. Ensure the two match, otherwise local inspection of a container\n\t\t// might be misleading about the exported contents.\n\t\tif err := ensureTOCMatchesTarSplit(toc, decodedTarSplit); err != nil {\n\t\t\treturn nil, nil, nil, 0, fmt.Errorf(\"tar-split and TOC data is inconsistent: %w\", err)\n\t\t}\n\t} else if tarSplitChunk.Offset > 0 {\n\t\t// We must ignore the tar-split when the digest is not present in the TOC, because we can’t authenticate it.\n\t\t//\n\t\t// But if we asked for the chunk, now we must consume the data to not block the producer.\n\t\t// Ideally the GetBlobAt API should be changed so that this is not necessary.\n\t\t_, err := readBlob(tarSplitChunk.Length)\n\t\tif err != nil {\n\t\t\treturn nil, nil, nil, 0, err\n\t\t}\n\t}\n\treturn decodedBlob, toc, decodedTarSplit, int64(manifestChunk.Offset), nil\n}\n\n// ensureTOCMatchesTarSplit validates that toc and tarSplit contain _exactly_ the same entries.\nfunc ensureTOCMatchesTarSplit(toc *minimal.TOC, tarSplit *os.File) error {\n\tpendingFiles := map[string]*minimal.FileMetadata{} // Name -> an entry in toc.Entries\n\tfor i := range toc.Entries {\n\t\te := &toc.Entries[i]\n\t\tif e.Type != minimal.TypeChunk {\n\t\t\tif _, ok := pendingFiles[e.Name]; ok {\n\t\t\t\treturn fmt.Errorf(\"TOC contains duplicate entries for path %q\", e.Name)\n\t\t\t}\n\t\t\tpendingFiles[e.Name] = e\n\t\t}\n\t}\n\n\tif _, err := tarSplit.Seek(0, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\n\tunpacker := storage.NewJSONUnpacker(tarSplit)\n\tif err := asm.IterateHeaders(unpacker, func(hdr *tar.Header) error {\n\t\te, ok := pendingFiles[hdr.Name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"tar-split contains an entry for %q missing in TOC\", hdr.Name)\n\t\t}\n\t\tdelete(pendingFiles, hdr.Name)\n\t\texpected, err := minimal.NewFileMetadata(hdr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"determining expected metadata for %q: %w\", hdr.Name, err)\n\t\t}\n\t\tif err := ensureFileMetadataAttributesMatch(e, &expected); err != nil {\n\t\t\treturn fmt.Errorf(\"TOC and tar-split metadata doesn’t match: %w\", err)\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif len(pendingFiles) != 0 {\n\t\tremaining := slices.Collect(maps.Keys(pendingFiles))\n\t\tif len(remaining) > 5 {\n\t\t\tremaining = remaining[:5] // Just to limit the size of the output.\n\t\t}\n\t\treturn fmt.Errorf(\"TOC contains entries not present in tar-split, incl. %q\", remaining)\n\t}\n\treturn nil\n}\n\n// tarSizeFromTarSplit computes the total tarball size, using only the tarSplit metadata\nfunc tarSizeFromTarSplit(tarSplit io.Reader) (int64, error) {\n\tvar res int64 = 0\n\n\tunpacker := storage.NewJSONUnpacker(tarSplit)\n\tfor {\n\t\tentry, err := unpacker.Next()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn -1, fmt.Errorf(\"reading tar-split entries: %w\", err)\n\t\t}\n\t\tswitch entry.Type {\n\t\tcase storage.SegmentType:\n\t\t\tres += int64(len(entry.Payload))\n\t\tcase storage.FileType:\n\t\t\t// entry.Size is the “logical size”, which might not be the physical size for sparse entries;\n\t\t\t// but the way tar-split/tar/asm.WriteOutputTarStream combines FileType entries and returned files contents,\n\t\t\t// sparse files are not supported.\n\t\t\t// Also https://github.com/opencontainers/image-spec/blob/main/layer.md says\n\t\t\t// > Sparse files SHOULD NOT be used because they lack consistent support across tar implementations.\n\t\t\tres += entry.Size\n\t\tdefault:\n\t\t\treturn -1, fmt.Errorf(\"unexpected tar-split entry type %q\", entry.Type)\n\t\t}\n\t}\n\treturn res, nil\n}\n\n// ensureTimePointersMatch ensures that a and b are equal\nfunc ensureTimePointersMatch(a, b *time.Time) error {\n\t// We didn’t always use “timeIfNotZero” when creating the TOC, so treat time.IsZero the same as nil.\n\t// The archive/tar code turns time.IsZero() timestamps into an Unix timestamp of 0 when writing, but turns an Unix timestamp of 0\n\t// when writing into a (local-timezone) Jan 1 1970, which is not IsZero(). So, treat that the same as IsZero as well.\n\tunixZero := time.Unix(0, 0)\n\tif a != nil && (a.IsZero() || a.Equal(unixZero)) {\n\t\ta = nil\n\t}\n\tif b != nil && (b.IsZero() || b.Equal(unixZero)) {\n\t\tb = nil\n\t}\n\tswitch {\n\tcase a == nil && b == nil:\n\t\treturn nil\n\tcase a == nil:\n\t\treturn fmt.Errorf(\"nil != %v\", *b)\n\tcase b == nil:\n\t\treturn fmt.Errorf(\"%v != nil\", *a)\n\tdefault:\n\t\tif a.Equal(*b) {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"%v != %v\", *a, *b)\n\t}\n}\n\n// ensureFileMetadataAttributesMatch ensures that a and b match in file attributes (it ignores entries relevant to locating data\n// in the tar stream or matching contents)\nfunc ensureFileMetadataAttributesMatch(a, b *minimal.FileMetadata) error {\n\t// Keep this in sync with minimal.FileMetadata!\n\n\tif a.Type != b.Type {\n\t\treturn fmt.Errorf(\"mismatch of Type: %q != %q\", a.Type, b.Type)\n\t}\n\tif a.Name != b.Name {\n\t\treturn fmt.Errorf(\"mismatch of Name: %q != %q\", a.Name, b.Name)\n\t}\n\tif a.Linkname != b.Linkname {\n\t\treturn fmt.Errorf(\"mismatch of Linkname: %q != %q\", a.Linkname, b.Linkname)\n\t}\n\tif a.Mode != b.Mode {\n\t\treturn fmt.Errorf(\"mismatch of Mode: %q != %q\", a.Mode, b.Mode)\n\t}\n\tif a.Size != b.Size {\n\t\treturn fmt.Errorf(\"mismatch of Size: %q != %q\", a.Size, b.Size)\n\t}\n\tif a.UID != b.UID {\n\t\treturn fmt.Errorf(\"mismatch of UID: %q != %q\", a.UID, b.UID)\n\t}\n\tif a.GID != b.GID {\n\t\treturn fmt.Errorf(\"mismatch of GID: %q != %q\", a.GID, b.GID)\n\t}\n\n\tif err := ensureTimePointersMatch(a.ModTime, b.ModTime); err != nil {\n\t\treturn fmt.Errorf(\"mismatch of ModTime: %w\", err)\n\t}\n\tif err := ensureTimePointersMatch(a.AccessTime, b.AccessTime); err != nil {\n\t\treturn fmt.Errorf(\"mismatch of AccessTime: %w\", err)\n\t}\n\tif err := ensureTimePointersMatch(a.ChangeTime, b.ChangeTime); err != nil {\n\t\treturn fmt.Errorf(\"mismatch of ChangeTime: %w\", err)\n\t}\n\tif a.Devmajor != b.Devmajor {\n\t\treturn fmt.Errorf(\"mismatch of Devmajor: %q != %q\", a.Devmajor, b.Devmajor)\n\t}\n\tif a.Devminor != b.Devminor {\n\t\treturn fmt.Errorf(\"mismatch of Devminor: %q != %q\", a.Devminor, b.Devminor)\n\t}\n\tif !maps.Equal(a.Xattrs, b.Xattrs) {\n\t\treturn fmt.Errorf(\"mismatch of Xattrs: %q != %q\", a.Xattrs, b.Xattrs)\n\t}\n\n\t// Digest is not compared\n\t// Offset is not compared\n\t// EndOffset is not compared\n\n\t// ChunkSize is not compared\n\t// ChunkOffset is not compared\n\t// ChunkDigest is not compared\n\t// ChunkType is not compared\n\treturn nil\n}\n\nfunc validateBlob(blob []byte, expectedCompressedChecksum string) error {\n\td, err := digest.Parse(expectedCompressedChecksum)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid digest %q: %w\", expectedCompressedChecksum, err)\n\t}\n\n\tblobDigester := d.Algorithm().Digester()\n\tblobChecksum := blobDigester.Hash()\n\tif _, err := blobChecksum.Write(blob); err != nil {\n\t\treturn err\n\t}\n\tif blobDigester.Digest() != d {\n\t\treturn fmt.Errorf(\"invalid blob checksum, expected checksum %s, got %s\", d, blobDigester.Digest())\n\t}\n\treturn nil\n}\n\nfunc decodeAndValidateBlob(blob []byte, lengthUncompressed uint64, expectedCompressedChecksum string, compressed bool) ([]byte, error) {\n\tif err := validateBlob(blob, expectedCompressedChecksum); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !compressed {\n\t\treturn blob, nil\n\t}\n\n\tdecoder, err := zstd.NewReader(nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer decoder.Close()\n\n\tb := make([]byte, 0, lengthUncompressed)\n\treturn decoder.DecodeAll(blob, b)\n}\n\nfunc decodeAndValidateBlobToStream(blob []byte, w *os.File, expectedCompressedChecksum string, compressed bool) error {\n\tif err := validateBlob(blob, expectedCompressedChecksum); err != nil {\n\t\treturn err\n\t}\n\n\tif !compressed {\n\t\t_, err := w.Write(blob)\n\t\treturn err\n\t}\n\n\tdecoder, err := zstd.NewReader(bytes.NewReader(blob))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer decoder.Close()\n\n\t_, err = decoder.WriteTo(w)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/compressor/compressor.go",
    "content": "package compressor\n\n// NOTE: This is used from github.com/containers/image by callers that\n// don't otherwise use containers/storage, so don't make this depend on any\n// larger software like the graph drivers.\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"io\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/asm\"\n\t\"github.com/vbatts/tar-split/tar/storage\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n)\n\nconst (\n\tRollsumBits    = 16\n\tholesThreshold = int64(1 << 10)\n)\n\ntype holesFinder struct {\n\treader    *bufio.Reader\n\tzeros     int64\n\tthreshold int64\n\n\tstate int\n}\n\nconst (\n\tholesFinderStateRead = iota\n\tholesFinderStateAccumulate\n\tholesFinderStateFound\n\tholesFinderStateEOF\n)\n\n// readByte reads a single byte from the underlying reader.\n// If a single byte is read, the return value is (0, RAW-BYTE-VALUE, nil).\n// If there are at least f.THRESHOLD consecutive zeros, then the\n// return value is (N_CONSECUTIVE_ZEROS, '\\x00').\nfunc (f *holesFinder) readByte() (int64, byte, error) {\n\tfor {\n\t\tswitch f.state {\n\t\t// reading the file stream\n\t\tcase holesFinderStateRead:\n\t\t\tif f.zeros > 0 {\n\t\t\t\tf.zeros--\n\t\t\t\treturn 0, 0, nil\n\t\t\t}\n\t\t\tb, err := f.reader.ReadByte()\n\t\t\tif err != nil {\n\t\t\t\treturn 0, b, err\n\t\t\t}\n\n\t\t\tif b != 0 {\n\t\t\t\treturn 0, b, err\n\t\t\t}\n\n\t\t\tf.zeros = 1\n\t\t\tif f.zeros == f.threshold {\n\t\t\t\tf.state = holesFinderStateFound\n\t\t\t} else {\n\t\t\t\tf.state = holesFinderStateAccumulate\n\t\t\t}\n\t\t// accumulating zeros, but still didn't reach the threshold\n\t\tcase holesFinderStateAccumulate:\n\t\t\tb, err := f.reader.ReadByte()\n\t\t\tif err != nil {\n\t\t\t\tif err == io.EOF {\n\t\t\t\t\tf.state = holesFinderStateEOF\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn 0, b, err\n\t\t\t}\n\n\t\t\tif b == 0 {\n\t\t\t\tf.zeros++\n\t\t\t\tif f.zeros == f.threshold {\n\t\t\t\t\tf.state = holesFinderStateFound\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif err := f.reader.UnreadByte(); err != nil {\n\t\t\t\t\treturn 0, 0, err\n\t\t\t\t}\n\t\t\t\tf.state = holesFinderStateRead\n\t\t\t}\n\t\t// found a hole.  Number of zeros >= threshold\n\t\tcase holesFinderStateFound:\n\t\t\tb, err := f.reader.ReadByte()\n\t\t\tif err != nil {\n\t\t\t\tif err == io.EOF {\n\t\t\t\t\tf.state = holesFinderStateEOF\n\t\t\t\t}\n\t\t\t\tholeLen := f.zeros\n\t\t\t\tf.zeros = 0\n\t\t\t\treturn holeLen, 0, nil\n\t\t\t}\n\t\t\tif b != 0 {\n\t\t\t\tif err := f.reader.UnreadByte(); err != nil {\n\t\t\t\t\treturn 0, 0, err\n\t\t\t\t}\n\t\t\t\tf.state = holesFinderStateRead\n\n\t\t\t\tholeLen := f.zeros\n\t\t\t\tf.zeros = 0\n\t\t\t\treturn holeLen, 0, nil\n\t\t\t}\n\t\t\tf.zeros++\n\t\t// reached EOF.  Flush pending zeros if any.\n\t\tcase holesFinderStateEOF:\n\t\t\tif f.zeros > 0 {\n\t\t\t\tf.zeros--\n\t\t\t\treturn 0, 0, nil\n\t\t\t}\n\t\t\treturn 0, 0, io.EOF\n\t\t}\n\t}\n}\n\ntype rollingChecksumReader struct {\n\treader      *holesFinder\n\tclosed      bool\n\trollsum     *RollSum\n\tpendingHole int64\n\n\t// WrittenOut is the total number of bytes read from\n\t// the stream.\n\tWrittenOut int64\n\n\t// IsLastChunkZeros tells whether the last generated\n\t// chunk is a hole (made of consecutive zeros).  If it\n\t// is false, then the last chunk is a data chunk\n\t// generated by the rolling checksum.\n\tIsLastChunkZeros bool\n}\n\nfunc (rc *rollingChecksumReader) Read(b []byte) (bool, int, error) {\n\trc.IsLastChunkZeros = false\n\n\tif rc.pendingHole > 0 {\n\t\ttoCopy := min(rc.pendingHole, int64(len(b)))\n\t\trc.pendingHole -= toCopy\n\t\tfor i := range b[:toCopy] {\n\t\t\tb[i] = 0\n\t\t}\n\n\t\trc.WrittenOut += toCopy\n\n\t\trc.IsLastChunkZeros = true\n\n\t\t// if there are no other zeros left, terminate the chunk\n\t\treturn rc.pendingHole == 0, int(toCopy), nil\n\t}\n\n\tif rc.closed {\n\t\treturn false, 0, io.EOF\n\t}\n\n\tfor i := range b {\n\t\tholeLen, n, err := rc.reader.readByte()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\trc.closed = true\n\t\t\t\tif i == 0 {\n\t\t\t\t\treturn false, 0, err\n\t\t\t\t}\n\t\t\t\treturn false, i, nil\n\t\t\t}\n\t\t\t// Report any other error type\n\t\t\treturn false, -1, err\n\t\t}\n\t\tif holeLen > 0 {\n\t\t\tfor range holeLen {\n\t\t\t\trc.rollsum.Roll(0)\n\t\t\t}\n\t\t\trc.pendingHole = holeLen\n\t\t\treturn true, i, nil\n\t\t}\n\t\tb[i] = n\n\t\trc.WrittenOut++\n\t\trc.rollsum.Roll(n)\n\t\tif rc.rollsum.OnSplitWithBits(RollsumBits) {\n\t\t\treturn true, i + 1, nil\n\t\t}\n\t}\n\treturn false, len(b), nil\n}\n\ntype chunk struct {\n\tChunkOffset int64\n\tOffset      int64\n\tChecksum    string\n\tChunkSize   int64\n\tChunkType   string\n}\n\ntype tarSplitData struct {\n\tcompressed          *bytes.Buffer\n\tdigester            digest.Digester\n\tuncompressedCounter *ioutils.WriteCounter\n\tzstd                minimal.ZstdWriter\n\tpacker              storage.Packer\n}\n\nfunc newTarSplitData(createZstdWriter minimal.CreateZstdWriterFunc) (*tarSplitData, error) {\n\tcompressed := bytes.NewBuffer(nil)\n\tdigester := digest.Canonical.Digester()\n\n\tzstdWriter, err := createZstdWriter(io.MultiWriter(compressed, digester.Hash()))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tuncompressedCounter := ioutils.NewWriteCounter(zstdWriter)\n\tmetaPacker := storage.NewJSONPacker(uncompressedCounter)\n\n\treturn &tarSplitData{\n\t\tcompressed:          compressed,\n\t\tdigester:            digester,\n\t\tuncompressedCounter: uncompressedCounter,\n\t\tzstd:                zstdWriter,\n\t\tpacker:              metaPacker,\n\t}, nil\n}\n\nfunc writeZstdChunkedStream(destFile io.Writer, outMetadata map[string]string, reader io.Reader, createZstdWriter minimal.CreateZstdWriterFunc) error {\n\t// total written so far.  Used to retrieve partial offsets in the file\n\tdest := ioutils.NewWriteCounter(destFile)\n\n\ttarSplitData, err := newTarSplitData(createZstdWriter)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif tarSplitData.zstd != nil {\n\t\t\ttarSplitData.zstd.Close()\n\t\t}\n\t}()\n\n\tits, err := asm.NewInputTarStream(reader, tarSplitData.packer, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttr := tar.NewReader(its)\n\ttr.RawAccounting = true\n\n\tbuf := make([]byte, 4096)\n\n\tzstdWriter, err := createZstdWriter(dest)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif zstdWriter != nil {\n\t\t\tzstdWriter.Close()\n\t\t}\n\t}()\n\n\trestartCompression := func() (int64, error) {\n\t\tvar offset int64\n\t\tif zstdWriter != nil {\n\t\t\tif err := zstdWriter.Close(); err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\toffset = dest.Count\n\t\t\tzstdWriter.Reset(dest)\n\t\t}\n\t\treturn offset, nil\n\t}\n\n\tvar metadata []minimal.FileMetadata\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tif err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\trawBytes := tr.RawBytes()\n\t\tif _, err := zstdWriter.Write(rawBytes); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tpayloadDigester := digest.Canonical.Digester()\n\t\tchunkDigester := digest.Canonical.Digester()\n\n\t\t// Now handle the payload, if any\n\t\tstartOffset := int64(0)\n\t\tlastOffset := int64(0)\n\t\tlastChunkOffset := int64(0)\n\n\t\tchecksum := \"\"\n\n\t\tchunks := []chunk{}\n\n\t\thf := &holesFinder{\n\t\t\tthreshold: holesThreshold,\n\t\t\treader:    bufio.NewReader(tr),\n\t\t}\n\n\t\trcReader := &rollingChecksumReader{\n\t\t\treader:  hf,\n\t\t\trollsum: NewRollSum(),\n\t\t}\n\n\t\tpayloadDest := io.MultiWriter(payloadDigester.Hash(), chunkDigester.Hash(), zstdWriter)\n\t\tfor {\n\t\t\tmustSplit, read, errRead := rcReader.Read(buf)\n\t\t\tif errRead != nil && errRead != io.EOF {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// restart the compression only if there is a payload.\n\t\t\tif read > 0 {\n\t\t\t\tif startOffset == 0 {\n\t\t\t\t\tstartOffset, err = restartCompression()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tlastOffset = startOffset\n\t\t\t\t}\n\n\t\t\t\tif _, err := payloadDest.Write(buf[:read]); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (mustSplit || errRead == io.EOF) && startOffset > 0 {\n\t\t\t\toff, err := restartCompression()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tchunkSize := rcReader.WrittenOut - lastChunkOffset\n\t\t\t\tif chunkSize > 0 {\n\t\t\t\t\tchunkType := minimal.ChunkTypeData\n\t\t\t\t\tif rcReader.IsLastChunkZeros {\n\t\t\t\t\t\tchunkType = minimal.ChunkTypeZeros\n\t\t\t\t\t}\n\n\t\t\t\t\tchunks = append(chunks, chunk{\n\t\t\t\t\t\tChunkOffset: lastChunkOffset,\n\t\t\t\t\t\tOffset:      lastOffset,\n\t\t\t\t\t\tChecksum:    chunkDigester.Digest().String(),\n\t\t\t\t\t\tChunkSize:   chunkSize,\n\t\t\t\t\t\tChunkType:   chunkType,\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tlastOffset = off\n\t\t\t\tlastChunkOffset = rcReader.WrittenOut\n\t\t\t\tchunkDigester = digest.Canonical.Digester()\n\t\t\t\tpayloadDest = io.MultiWriter(payloadDigester.Hash(), chunkDigester.Hash(), zstdWriter)\n\t\t\t}\n\t\t\tif errRead == io.EOF {\n\t\t\t\tif startOffset > 0 {\n\t\t\t\t\tchecksum = payloadDigester.Digest().String()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tmainEntry, err := minimal.NewFileMetadata(hdr)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmainEntry.Digest = checksum\n\t\tmainEntry.Offset = startOffset\n\t\tmainEntry.EndOffset = lastOffset\n\t\tentries := []minimal.FileMetadata{mainEntry}\n\t\tfor i := 1; i < len(chunks); i++ {\n\t\t\tentries = append(entries, minimal.FileMetadata{\n\t\t\t\tType:        minimal.TypeChunk,\n\t\t\t\tName:        hdr.Name,\n\t\t\t\tChunkOffset: chunks[i].ChunkOffset,\n\t\t\t})\n\t\t}\n\t\tif len(chunks) > 1 {\n\t\t\tfor i := range chunks {\n\t\t\t\tentries[i].ChunkSize = chunks[i].ChunkSize\n\t\t\t\tentries[i].Offset = chunks[i].Offset\n\t\t\t\tentries[i].ChunkDigest = chunks[i].Checksum\n\t\t\t\tentries[i].ChunkType = chunks[i].ChunkType\n\t\t\t}\n\t\t}\n\t\tmetadata = append(metadata, entries...)\n\t}\n\n\trawBytes := tr.RawBytes()\n\tif _, err := zstdWriter.Write(rawBytes); err != nil {\n\t\tzstdWriter.Close()\n\t\treturn err\n\t}\n\n\t// make sure the entire tarball is flushed to the output as it might contain\n\t// some trailing zeros that affect the checksum.\n\tif _, err := io.Copy(zstdWriter, its); err != nil {\n\t\tzstdWriter.Close()\n\t\treturn err\n\t}\n\n\tif err := zstdWriter.Close(); err != nil {\n\t\treturn err\n\t}\n\tzstdWriter = nil\n\n\tif err := tarSplitData.zstd.Close(); err != nil {\n\t\treturn err\n\t}\n\ttarSplitData.zstd = nil\n\n\tts := minimal.TarSplitData{\n\t\tData:             tarSplitData.compressed.Bytes(),\n\t\tDigest:           tarSplitData.digester.Digest(),\n\t\tUncompressedSize: tarSplitData.uncompressedCounter.Count,\n\t}\n\n\treturn minimal.WriteZstdChunkedManifest(dest, outMetadata, uint64(dest.Count), &ts, metadata, createZstdWriter)\n}\n\ntype zstdChunkedWriter struct {\n\ttarSplitOut *io.PipeWriter\n\ttarSplitErr chan error\n}\n\nfunc (w zstdChunkedWriter) Close() error {\n\terrClose := w.tarSplitOut.Close()\n\n\tif err := <-w.tarSplitErr; err != nil && err != io.EOF {\n\t\treturn err\n\t}\n\treturn errClose\n}\n\nfunc (w zstdChunkedWriter) Write(p []byte) (int, error) {\n\tselect {\n\tcase err := <-w.tarSplitErr:\n\t\tw.tarSplitOut.Close()\n\t\treturn 0, err\n\tdefault:\n\t\treturn w.tarSplitOut.Write(p)\n\t}\n}\n\n// makeZstdChunkedWriter writes a zstd compressed tarball where each file is\n// compressed separately so it can be addressed separately.  Idea based on CRFS:\n// https://github.com/google/crfs\n// The difference with CRFS is that the zstd compression is used instead of gzip.\n// The reason for it is that zstd supports embedding metadata ignored by the decoder\n// as part of the compressed stream.\n// A manifest json file with all the metadata is appended at the end of the tarball\n// stream, using zstd skippable frames.\n// The final file will look like:\n// [FILE_1][FILE_2]..[FILE_N][SKIPPABLE FRAME 1][SKIPPABLE FRAME 2]\n// Where:\n// [FILE_N]: [ZSTD HEADER][TAR HEADER][PAYLOAD FILE_N][ZSTD FOOTER]\n// [SKIPPABLE FRAME 1]: [ZSTD SKIPPABLE FRAME, SIZE=MANIFEST LENGTH][MANIFEST]\n// [SKIPPABLE FRAME 2]: [ZSTD SKIPPABLE FRAME, SIZE=16][MANIFEST_OFFSET][MANIFEST_LENGTH][MANIFEST_LENGTH_UNCOMPRESSED][MANIFEST_TYPE][CHUNKED_ZSTD_MAGIC_NUMBER]\n// MANIFEST_OFFSET, MANIFEST_LENGTH, MANIFEST_LENGTH_UNCOMPRESSED and CHUNKED_ZSTD_MAGIC_NUMBER are 64 bits unsigned in little endian format.\nfunc makeZstdChunkedWriter(out io.Writer, metadata map[string]string, createZstdWriter minimal.CreateZstdWriterFunc) (io.WriteCloser, error) {\n\tch := make(chan error, 1)\n\tr, w := io.Pipe()\n\n\tgo func() {\n\t\tch <- writeZstdChunkedStream(out, metadata, r, createZstdWriter)\n\t\t_, _ = io.Copy(io.Discard, r) // Ordinarily writeZstdChunkedStream consumes all of r. If it fails, ensure the write end never blocks and eventually terminates.\n\t\tr.Close()\n\t\tclose(ch)\n\t}()\n\n\treturn zstdChunkedWriter{\n\t\ttarSplitOut: w,\n\t\ttarSplitErr: ch,\n\t}, nil\n}\n\n// ZstdCompressor is a CompressorFunc for the zstd compression algorithm.\nfunc ZstdCompressor(r io.Writer, metadata map[string]string, level *int) (io.WriteCloser, error) {\n\tif level == nil {\n\t\tl := 10\n\t\tlevel = &l\n\t}\n\n\tcreateZstdWriter := func(dest io.Writer) (minimal.ZstdWriter, error) {\n\t\treturn minimal.ZstdWriterWithLevel(dest, *level)\n\t}\n\n\treturn makeZstdChunkedWriter(r, metadata, createZstdWriter)\n}\n\ntype noCompression struct {\n\tdest io.Writer\n}\n\nfunc (n *noCompression) Write(p []byte) (int, error) {\n\treturn n.dest.Write(p)\n}\n\nfunc (n *noCompression) Close() error {\n\treturn nil\n}\n\nfunc (n *noCompression) Flush() error {\n\treturn nil\n}\n\nfunc (n *noCompression) Reset(dest io.Writer) {\n\tn.dest = dest\n}\n\n// NoCompression writes directly to the output file without any compression\n//\n// Such an output does not follow the zstd:chunked spec and cannot be generally consumed; this function\n// only exists for internal purposes and should not be called from outside c/storage.\nfunc NoCompression(r io.Writer, metadata map[string]string) (io.WriteCloser, error) {\n\tcreateZstdWriter := func(dest io.Writer) (minimal.ZstdWriter, error) {\n\t\treturn &noCompression{dest: dest}, nil\n\t}\n\treturn makeZstdChunkedWriter(r, metadata, createZstdWriter)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/compressor/rollsum.go",
    "content": "/*\nCopyright 2011 The Perkeep Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Package rollsum implements rolling checksums similar to apenwarr's bup, which\n// is similar to librsync.\n//\n// The bup project is at https://github.com/apenwarr/bup and its splitting in\n// particular is at https://github.com/apenwarr/bup/blob/master/lib/bup/bupsplit.c\npackage compressor\n\nimport (\n\t\"math/bits\"\n)\n\nconst (\n\twindowSize = 64 // Roll assumes windowSize is a power of 2\n\tcharOffset = 31\n)\n\nconst (\n\tblobBits = 13\n\tblobSize = 1 << blobBits // 8k\n)\n\ntype RollSum struct {\n\ts1, s2 uint32\n\twindow [windowSize]uint8\n\twofs   int\n}\n\nfunc NewRollSum() *RollSum {\n\treturn &RollSum{\n\t\ts1: windowSize * charOffset,\n\t\ts2: windowSize * (windowSize - 1) * charOffset,\n\t}\n}\n\nfunc (rs *RollSum) add(drop, add uint32) {\n\ts1 := rs.s1 + add - drop\n\trs.s1 = s1\n\trs.s2 += s1 - uint32(windowSize)*(drop+charOffset)\n}\n\n// Roll adds ch to the rolling sum.\nfunc (rs *RollSum) Roll(ch byte) {\n\twp := &rs.window[rs.wofs]\n\trs.add(uint32(*wp), uint32(ch))\n\t*wp = ch\n\trs.wofs = (rs.wofs + 1) & (windowSize - 1)\n}\n\n// OnSplit reports whether at least 13 consecutive trailing bits of\n// the current checksum are set the same way.\nfunc (rs *RollSum) OnSplit() bool {\n\treturn (rs.s2 & (blobSize - 1)) == ((^0) & (blobSize - 1))\n}\n\n// OnSplitWithBits reports whether at least n consecutive trailing bits\n// of the current checksum are set the same way.\nfunc (rs *RollSum) OnSplitWithBits(n uint32) bool {\n\tmask := (uint32(1) << n) - 1\n\treturn rs.s2&mask == (^uint32(0))&mask\n}\n\nfunc (rs *RollSum) Bits() int {\n\trsum := rs.Digest() >> (blobBits + 1)\n\treturn blobBits + bits.TrailingZeros32(^rsum)\n}\n\nfunc (rs *RollSum) Digest() uint32 {\n\treturn (rs.s1 << 16) | (rs.s2 & 0xffff)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/dump/dump.go",
    "content": "//go:build unix\n\npackage dump\n\nimport (\n\t\"bufio\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\tstoragePath \"go.podman.io/storage/pkg/chunked/internal/path\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tESCAPE_STANDARD = 0\n\tNOESCAPE_SPACE  = 1 << iota\n\tESCAPE_EQUAL\n\tESCAPE_LONE_DASH\n)\n\nfunc escaped(val []byte, escape int) string {\n\tnoescapeSpace := escape&NOESCAPE_SPACE != 0\n\tescapeEqual := escape&ESCAPE_EQUAL != 0\n\tescapeLoneDash := escape&ESCAPE_LONE_DASH != 0\n\n\tif escapeLoneDash && len(val) == 1 && val[0] == '-' {\n\t\treturn fmt.Sprintf(\"\\\\x%.2x\", val[0])\n\t}\n\n\t// This is intended to match the C isprint API with LC_CTYPE=C\n\tisprint := func(c byte) bool {\n\t\treturn c >= 32 && c < 127\n\t}\n\t// This is intended to match the C isgraph API with LC_CTYPE=C\n\tisgraph := func(c byte) bool {\n\t\treturn c > 32 && c < 127\n\t}\n\n\tvar result strings.Builder\n\tfor _, c := range val {\n\t\thexEscape := false\n\t\tvar special string\n\n\t\tswitch c {\n\t\tcase '\\\\':\n\t\t\tspecial = \"\\\\\\\\\"\n\t\tcase '\\n':\n\t\t\tspecial = \"\\\\n\"\n\t\tcase '\\r':\n\t\t\tspecial = \"\\\\r\"\n\t\tcase '\\t':\n\t\t\tspecial = \"\\\\t\"\n\t\tcase '=':\n\t\t\thexEscape = escapeEqual\n\t\tdefault:\n\t\t\tif noescapeSpace {\n\t\t\t\thexEscape = !isprint(c)\n\t\t\t} else {\n\t\t\t\thexEscape = !isgraph(c)\n\t\t\t}\n\t\t}\n\n\t\tif special != \"\" {\n\t\t\tresult.WriteString(special)\n\t\t} else if hexEscape {\n\t\t\tfmt.Fprintf(&result, \"\\\\x%.2x\", c)\n\t\t} else {\n\t\t\tresult.WriteString(string(c))\n\t\t}\n\t}\n\treturn result.String()\n}\n\nfunc escapedOptional(val []byte, escape int) string {\n\tif len(val) == 0 {\n\t\treturn \"-\"\n\t}\n\treturn escaped(val, escape)\n}\n\nfunc getStMode(mode uint32, typ string) (uint32, error) {\n\tswitch typ {\n\tcase minimal.TypeReg, minimal.TypeLink:\n\t\tmode |= unix.S_IFREG\n\tcase minimal.TypeChar:\n\t\tmode |= unix.S_IFCHR\n\tcase minimal.TypeBlock:\n\t\tmode |= unix.S_IFBLK\n\tcase minimal.TypeDir:\n\t\tmode |= unix.S_IFDIR\n\tcase minimal.TypeFifo:\n\t\tmode |= unix.S_IFIFO\n\tcase minimal.TypeSymlink:\n\t\tmode |= unix.S_IFLNK\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"unknown type %s\", typ)\n\t}\n\treturn mode, nil\n}\n\nfunc dumpNode(out io.Writer, added map[string]*minimal.FileMetadata, links map[string]int, verityDigests map[string]string, entry *minimal.FileMetadata) error {\n\tpath := storagePath.CleanAbsPath(entry.Name)\n\n\tparent := filepath.Dir(path)\n\tif _, found := added[parent]; !found && path != \"/\" {\n\t\tparentEntry := &minimal.FileMetadata{\n\t\t\tName: parent,\n\t\t\tType: minimal.TypeDir,\n\t\t\tMode: 0o755,\n\t\t}\n\t\tif err := dumpNode(out, added, links, verityDigests, parentEntry); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t}\n\tif e, found := added[path]; found {\n\t\t// if the entry was already added, make sure it has the same data\n\t\tif !reflect.DeepEqual(*e, *entry) {\n\t\t\treturn fmt.Errorf(\"entry %q already added with different data\", path)\n\t\t}\n\t\treturn nil\n\t}\n\tadded[path] = entry\n\n\tif _, err := fmt.Fprint(out, escaped([]byte(path), ESCAPE_STANDARD)); err != nil {\n\t\treturn err\n\t}\n\n\tnlinks := links[entry.Name] + links[entry.Linkname] + 1\n\tlink := \"\"\n\tif entry.Type == minimal.TypeLink {\n\t\tlink = \"@\"\n\t}\n\n\trdev := unix.Mkdev(uint32(entry.Devmajor), uint32(entry.Devminor))\n\n\tentryTime := entry.ModTime\n\tif entryTime == nil {\n\t\tt := time.Unix(0, 0)\n\t\tentryTime = &t\n\t}\n\n\tmode, err := getStMode(uint32(entry.Mode), entry.Type)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif _, err := fmt.Fprintf(out, \" %d %s%o %d %d %d %d %d.%d \", entry.Size,\n\t\tlink, mode,\n\t\tnlinks, entry.UID, entry.GID, rdev,\n\t\tentryTime.Unix(), entryTime.Nanosecond()); err != nil {\n\t\treturn err\n\t}\n\n\tvar payload string\n\tif entry.Linkname != \"\" {\n\t\tif entry.Type == minimal.TypeSymlink {\n\t\t\tpayload = entry.Linkname\n\t\t} else {\n\t\t\tpayload = storagePath.CleanAbsPath(entry.Linkname)\n\t\t}\n\t} else if entry.Digest != \"\" {\n\t\td, err := digest.Parse(entry.Digest)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid digest %q for %q: %w\", entry.Digest, entry.Name, err)\n\t\t}\n\t\tpath, err := storagePath.RegularFilePathForValidatedDigest(d)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"determining physical file path for %q: %w\", entry.Name, err)\n\t\t}\n\t\tpayload = path\n\t}\n\n\tif _, err := fmt.Fprint(out, escapedOptional([]byte(payload), ESCAPE_LONE_DASH)); err != nil {\n\t\treturn err\n\t}\n\n\t/* inline content.  */\n\tif _, err := fmt.Fprint(out, \" -\"); err != nil {\n\t\treturn err\n\t}\n\n\t/* store the digest.  */\n\tif _, err := fmt.Fprint(out, \" \"); err != nil {\n\t\treturn err\n\t}\n\tdigest := verityDigests[payload]\n\tif _, err := fmt.Fprint(out, escapedOptional([]byte(digest), ESCAPE_LONE_DASH)); err != nil {\n\t\treturn err\n\t}\n\n\tfor k, vEncoded := range entry.Xattrs {\n\t\tv, err := base64.StdEncoding.DecodeString(vEncoded)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"decode xattr %q: %w\", k, err)\n\t\t}\n\t\tname := escaped([]byte(k), ESCAPE_EQUAL)\n\n\t\tvalue := escaped(v, ESCAPE_EQUAL)\n\t\tif _, err := fmt.Fprintf(out, \" %s=%s\", name, value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif _, err := fmt.Fprint(out, \"\\n\"); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// GenerateDump generates a dump of the TOC in the same format as `composefs-info dump`\nfunc GenerateDump(tocI any, verityDigests map[string]string) (io.Reader, error) {\n\ttoc, ok := tocI.(*minimal.TOC)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"invalid TOC type\")\n\t}\n\tpipeR, pipeW := io.Pipe()\n\tgo func() {\n\t\tclosed := false\n\t\tw := bufio.NewWriter(pipeW)\n\t\tdefer func() {\n\t\t\tif !closed {\n\t\t\t\tw.Flush()\n\t\t\t\tpipeW.Close()\n\t\t\t}\n\t\t}()\n\n\t\tlinks := make(map[string]int)\n\t\tadded := make(map[string]*minimal.FileMetadata)\n\t\tfor _, e := range toc.Entries {\n\t\t\tif e.Linkname == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif e.Type == minimal.TypeSymlink {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlinks[e.Linkname] = links[e.Linkname] + 1\n\t\t}\n\n\t\tif len(toc.Entries) == 0 {\n\t\t\troot := &minimal.FileMetadata{\n\t\t\t\tName: \"/\",\n\t\t\t\tType: minimal.TypeDir,\n\t\t\t\tMode: 0o755,\n\t\t\t}\n\n\t\t\tif err := dumpNode(w, added, links, verityDigests, root); err != nil {\n\t\t\t\tpipeW.CloseWithError(err)\n\t\t\t\tclosed = true\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tfor _, e := range toc.Entries {\n\t\t\tif e.Type == minimal.TypeChunk {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif err := dumpNode(w, added, links, verityDigests, &e); err != nil {\n\t\t\t\tpipeW.CloseWithError(err)\n\t\t\t\tclosed = true\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\treturn pipeR, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/filesystem_linux.go",
    "content": "package chunked\n\nimport (\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync/atomic\"\n\t\"syscall\"\n\t\"time\"\n\n\tsecurejoin \"github.com/cyphar/filepath-securejoin\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\tdriversCopy \"go.podman.io/storage/drivers/copy\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\tstoragePath \"go.podman.io/storage/pkg/chunked/internal/path\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// procPathForFile returns an absolute path in /proc which\n// refers to the file; see procPathForFd.\nfunc procPathForFile(f *os.File) string {\n\treturn procPathForFd(int(f.Fd()))\n}\n\n// procPathForFd returns an absolute path in /proc which\n// refers to the file; this allows passing a file descriptor\n// in places that don't accept a file descriptor.\nfunc procPathForFd(fd int) string {\n\treturn fmt.Sprintf(\"/proc/self/fd/%d\", fd)\n}\n\n// fileMetadata is a wrapper around minimal.FileMetadata with additional private fields that\n// are not part of the TOC document.\n// Type: TypeChunk entries are stored in Chunks, the primary [fileMetadata] entries never use TypeChunk.\ntype fileMetadata struct {\n\tminimal.FileMetadata\n\n\t// chunks stores the TypeChunk entries relevant to this entry when FileMetadata.Type == TypeReg.\n\tchunks []*minimal.FileMetadata\n\n\t// skipSetAttrs is set when the file attributes must not be\n\t// modified, e.g. it is a hard link from a different source,\n\t// or a composefs file.\n\tskipSetAttrs bool\n}\n\n// splitPath takes a file path as input and returns two components: dir and base.\n// Differently than filepath.Split(), this function handles some edge cases.\n// If the path refers to a file in the root directory, the returned dir is \"/\".\n// The returned base value is never empty, it never contains any slash and the\n// value \"..\".\nfunc splitPath(path string) (string, string, error) {\n\tpath = storagePath.CleanAbsPath(path)\n\tdir, base := filepath.Split(path)\n\tif base == \"\" {\n\t\tbase = \".\"\n\t}\n\t// Remove trailing slashes from dir, but make sure that \"/\" is preserved.\n\tdir = strings.TrimSuffix(dir, \"/\")\n\tif dir == \"\" {\n\t\tdir = \"/\"\n\t}\n\n\tif strings.Contains(base, \"/\") {\n\t\t// This should never happen, but be safe as the base is passed to *at syscalls.\n\t\treturn \"\", \"\", fmt.Errorf(\"internal error: splitPath(%q) contains a slash\", path)\n\t}\n\treturn dir, base, nil\n}\n\nfunc doHardLink(dirfd, srcFd int, destFile string) error {\n\tdestDir, destBase, err := splitPath(destFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdestDirFd := dirfd\n\tif destDir != \"/\" {\n\t\tf, err := openOrCreateDirUnderRoot(dirfd, destDir, 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer f.Close()\n\t\tdestDirFd = int(f.Fd())\n\t}\n\n\tdoLink := func() error {\n\t\t// Using unix.AT_EMPTY_PATH requires CAP_DAC_READ_SEARCH while this variant that uses\n\t\t// /proc/self/fd doesn't and can be used with rootless.\n\t\tsrcPath := procPathForFd(srcFd)\n\t\terr := unix.Linkat(unix.AT_FDCWD, srcPath, destDirFd, destBase, unix.AT_SYMLINK_FOLLOW)\n\t\tif err != nil {\n\t\t\treturn &fs.PathError{Op: \"linkat\", Path: destFile, Err: err}\n\t\t}\n\t\treturn nil\n\t}\n\n\terr = doLink()\n\n\t// if the destination exists, unlink it first and try again\n\tif err != nil && os.IsExist(err) {\n\t\tif err := unix.Unlinkat(destDirFd, destBase, 0); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn doLink()\n\t}\n\treturn err\n}\n\nfunc copyFileContent(srcFd int, fileMetadata *fileMetadata, dirfd int, mode os.FileMode, useHardLinks bool) (*os.File, int64, error) {\n\tdestFile := fileMetadata.Name\n\tsrc := procPathForFd(srcFd)\n\tst, err := os.Stat(src)\n\tif err != nil {\n\t\treturn nil, -1, fmt.Errorf(\"copy file content for %q: %w\", destFile, err)\n\t}\n\n\tcopyWithFileRange, copyWithFileClone := true, true\n\n\tif useHardLinks {\n\t\terr := doHardLink(dirfd, srcFd, destFile)\n\t\tif err == nil {\n\t\t\t// if the file was deduplicated with a hard link, skip overriding file metadata.\n\t\t\tfileMetadata.skipSetAttrs = true\n\t\t\treturn nil, st.Size(), nil\n\t\t}\n\t}\n\n\t// If the destination file already exists, we shouldn't blow it away\n\tdstFile, err := openFileUnderRoot(dirfd, destFile, newFileFlags, mode)\n\tif err != nil {\n\t\treturn nil, -1, fmt.Errorf(\"open file %q under rootfs for copy: %w\", destFile, err)\n\t}\n\n\terr = driversCopy.CopyRegularToFile(src, dstFile, st, &copyWithFileRange, &copyWithFileClone)\n\tif err != nil {\n\t\tdstFile.Close()\n\t\treturn nil, -1, fmt.Errorf(\"copy to file %q under rootfs: %w\", destFile, err)\n\t}\n\treturn dstFile, st.Size(), nil\n}\n\nfunc timeToTimespec(time *time.Time) (ts unix.Timespec) {\n\tif time == nil || time.IsZero() {\n\t\t// Return UTIME_OMIT special value\n\t\tts.Sec = 0\n\t\tts.Nsec = ((1 << 30) - 2)\n\t\treturn ts\n\t}\n\treturn unix.NsecToTimespec(time.UnixNano())\n}\n\n// chown changes the owner and group of the file at the specified path under the directory\n// pointed by dirfd.\n// If nofollow is true, the function will not follow symlinks.\n// If path is empty, the function will change the owner and group of the file descriptor.\n// absolutePath is the absolute path of the file, used only for error messages.\nfunc chown(dirfd int, path string, uid, gid int, nofollow bool, absolutePath string) error {\n\tvar err error\n\tflags := 0\n\tif nofollow {\n\t\tflags |= unix.AT_SYMLINK_NOFOLLOW\n\t} else if path == \"\" {\n\t\tflags |= unix.AT_EMPTY_PATH\n\t}\n\terr = unix.Fchownat(dirfd, path, uid, gid, flags)\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif errors.Is(err, syscall.EINVAL) {\n\t\treturn fmt.Errorf(`potentially insufficient UIDs or GIDs available in the user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid if configured locally and run \"podman system migrate\": %w`, uid, gid, path, err)\n\t}\n\treturn &fs.PathError{Op: \"fchownat\", Path: absolutePath, Err: err}\n}\n\n// setFileAttrs sets the file attributes for file given metadata\nfunc setFileAttrs(dirfd int, file *os.File, mode os.FileMode, metadata *fileMetadata, options *archive.TarOptions, usePath bool) error {\n\tif metadata.skipSetAttrs {\n\t\treturn nil\n\t}\n\tif file == nil {\n\t\treturn errors.New(\"invalid file\")\n\t}\n\tfd := int(file.Fd())\n\n\tt, err := typeToTarType(metadata.Type)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If it is a symlink, force to use the path\n\tif t == tar.TypeSymlink {\n\t\tusePath = true\n\t}\n\n\tbaseName := \"\"\n\tif usePath {\n\t\tdirName := filepath.Dir(metadata.Name)\n\t\tif dirName != \"\" {\n\t\t\tparentFd, err := openFileUnderRoot(dirfd, dirName, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer parentFd.Close()\n\n\t\t\tdirfd = int(parentFd.Fd())\n\t\t}\n\t\tbaseName = filepath.Base(metadata.Name)\n\t}\n\n\tdoChown := func() error {\n\t\tvar err error\n\t\tif usePath {\n\t\t\terr = chown(dirfd, baseName, metadata.UID, metadata.GID, true, metadata.Name)\n\t\t} else {\n\t\t\terr = chown(fd, \"\", metadata.UID, metadata.GID, false, metadata.Name)\n\t\t}\n\t\tif options.IgnoreChownErrors {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\n\tdoSetXattr := func(k string, v []byte) error {\n\t\terr := unix.Fsetxattr(fd, k, v, 0)\n\t\tif err != nil {\n\t\t\treturn &fs.PathError{Op: \"fsetxattr\", Path: metadata.Name, Err: err}\n\t\t}\n\t\treturn nil\n\t}\n\n\tdoUtimes := func() error {\n\t\tts := []unix.Timespec{timeToTimespec(metadata.AccessTime), timeToTimespec(metadata.ModTime)}\n\t\tvar err error\n\t\tif usePath {\n\t\t\terr = unix.UtimesNanoAt(dirfd, baseName, ts, unix.AT_SYMLINK_NOFOLLOW)\n\t\t} else {\n\t\t\terr = unix.UtimesNanoAt(unix.AT_FDCWD, procPathForFd(fd), ts, 0)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn &fs.PathError{Op: \"utimensat\", Path: metadata.Name, Err: err}\n\t\t}\n\t\treturn nil\n\t}\n\n\tdoChmod := func() error {\n\t\tvar err error\n\t\top := \"\"\n\t\tif usePath {\n\t\t\terr = unix.Fchmodat(dirfd, baseName, uint32(mode), unix.AT_SYMLINK_NOFOLLOW)\n\t\t\top = \"fchmodat\"\n\t\t} else {\n\t\t\terr = unix.Fchmod(fd, uint32(mode))\n\t\t\top = \"fchmod\"\n\t\t}\n\t\tif err != nil {\n\t\t\treturn &fs.PathError{Op: op, Path: metadata.Name, Err: err}\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := doChown(); err != nil {\n\t\treturn err\n\t}\n\n\tcanIgnore := func(err error) bool {\n\t\treturn err == nil || errors.Is(err, unix.ENOSYS) || errors.Is(err, unix.ENOTSUP)\n\t}\n\n\tfor k, v := range metadata.Xattrs {\n\t\tif _, found := xattrsToIgnore[k]; found {\n\t\t\tcontinue\n\t\t}\n\t\tdata, err := base64.StdEncoding.DecodeString(v)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"decode xattr %q: %w\", v, err)\n\t\t}\n\t\tif err := doSetXattr(k, data); !canIgnore(err) {\n\t\t\treturn fmt.Errorf(\"set xattr %s=%q for %q: %w\", k, data, metadata.Name, err)\n\t\t}\n\t}\n\n\tif err := doUtimes(); !canIgnore(err) {\n\t\treturn err\n\t}\n\n\tif err := doChmod(); !canIgnore(err) {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc openFileUnderRootFallback(dirfd int, name string, flags uint64, mode os.FileMode) (int, error) {\n\troot := procPathForFd(dirfd)\n\n\ttargetRoot, err := os.Readlink(root)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\thasNoFollow := (flags & unix.O_NOFOLLOW) != 0\n\n\tvar fd int\n\t// If O_NOFOLLOW is specified in the flags, then resolve only the parent directory and use the\n\t// last component as the path to openat().\n\tif hasNoFollow {\n\t\tdirName, baseName, err := splitPath(name)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tif dirName != \"/\" {\n\t\t\tnewRoot, err := securejoin.SecureJoin(root, dirName)\n\t\t\tif err != nil {\n\t\t\t\treturn -1, err\n\t\t\t}\n\t\t\troot = newRoot\n\t\t}\n\n\t\tparentDirfd, err := unix.Open(root, unix.O_PATH|unix.O_CLOEXEC, 0)\n\t\tif err != nil {\n\t\t\treturn -1, &fs.PathError{Op: \"open\", Path: root, Err: err}\n\t\t}\n\t\tdefer unix.Close(parentDirfd)\n\n\t\tfd, err = unix.Openat(parentDirfd, baseName, int(flags), uint32(mode))\n\t\tif err != nil {\n\t\t\treturn -1, &fs.PathError{Op: \"openat\", Path: name, Err: err}\n\t\t}\n\t} else {\n\t\tnewPath, err := securejoin.SecureJoin(root, name)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tfd, err = unix.Openat(dirfd, newPath, int(flags), uint32(mode))\n\t\tif err != nil {\n\t\t\treturn -1, &fs.PathError{Op: \"openat\", Path: newPath, Err: err}\n\t\t}\n\t}\n\n\ttarget, err := os.Readlink(procPathForFd(fd))\n\tif err != nil {\n\t\tunix.Close(fd)\n\t\treturn -1, err\n\t}\n\n\t// Add an additional check to make sure the opened fd is inside the rootfs\n\tif !strings.HasPrefix(target, targetRoot) {\n\t\tunix.Close(fd)\n\t\treturn -1, fmt.Errorf(\"while resolving %q.  It resolves outside the root directory\", name)\n\t}\n\n\treturn fd, err\n}\n\nfunc openFileUnderRootOpenat2(dirfd int, name string, flags uint64, mode os.FileMode) (int, error) {\n\thow := unix.OpenHow{\n\t\tFlags:   flags,\n\t\tMode:    uint64(mode & 0o7777),\n\t\tResolve: unix.RESOLVE_IN_ROOT,\n\t}\n\tfd, err := unix.Openat2(dirfd, name, &how)\n\tif err != nil {\n\t\treturn -1, &fs.PathError{Op: \"openat2\", Path: name, Err: err}\n\t}\n\treturn fd, nil\n}\n\n// skipOpenat2 is set when openat2 is not supported by the underlying kernel and avoid\n// using it again.\nvar skipOpenat2 int32\n\n// openFileUnderRootRaw tries to open a file using openat2 and if it is not supported fallbacks to a\n// userspace lookup.\nfunc openFileUnderRootRaw(dirfd int, name string, flags uint64, mode os.FileMode) (int, error) {\n\tvar fd int\n\tvar err error\n\tif name == \"\" {\n\t\tfd, err := unix.Dup(dirfd)\n\t\tif err != nil {\n\t\t\treturn -1, fmt.Errorf(\"failed to duplicate file descriptor %d: %w\", dirfd, err)\n\t\t}\n\t\treturn fd, nil\n\t}\n\tif atomic.LoadInt32(&skipOpenat2) > 0 {\n\t\tfd, err = openFileUnderRootFallback(dirfd, name, flags, mode)\n\t} else {\n\t\tfd, err = openFileUnderRootOpenat2(dirfd, name, flags, mode)\n\t\t// If the function failed with ENOSYS, switch off the support for openat2\n\t\t// and fallback to using safejoin.\n\t\tif err != nil && errors.Is(err, unix.ENOSYS) {\n\t\t\tatomic.StoreInt32(&skipOpenat2, 1)\n\t\t\tfd, err = openFileUnderRootFallback(dirfd, name, flags, mode)\n\t\t}\n\t}\n\treturn fd, err\n}\n\n// openFileUnderRoot safely opens a file under the specified root directory using openat2\n// dirfd is an open file descriptor to the target checkout directory.\n// name is the path to open relative to dirfd.\n// flags are the flags to pass to the open syscall.\n// mode specifies the mode to use for newly created files.\nfunc openFileUnderRoot(dirfd int, name string, flags uint64, mode os.FileMode) (*os.File, error) {\n\tfd, err := openFileUnderRootRaw(dirfd, name, flags, mode)\n\tif err == nil {\n\t\treturn os.NewFile(uintptr(fd), name), nil\n\t}\n\n\thasCreate := (flags & unix.O_CREAT) != 0\n\tif errors.Is(err, unix.ENOENT) && hasCreate {\n\t\tparent := filepath.Dir(name)\n\t\tif parent != \"\" {\n\t\t\tnewDirfd, err2 := openOrCreateDirUnderRoot(dirfd, parent, 0)\n\t\t\tif err2 == nil {\n\t\t\t\tdefer newDirfd.Close()\n\t\t\t\tfd, err := openFileUnderRootRaw(int(newDirfd.Fd()), filepath.Base(name), flags, mode)\n\t\t\t\tif err == nil {\n\t\t\t\t\treturn os.NewFile(uintptr(fd), name), nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"open %q under the rootfs: %w\", name, err)\n}\n\n// openOrCreateDirUnderRoot safely opens a directory or create it if it is missing.\n// dirfd is an open file descriptor to the target checkout directory.\n// name is the path to open relative to dirfd.\n// mode specifies the mode to use for newly created files.\nfunc openOrCreateDirUnderRoot(dirfd int, name string, mode os.FileMode) (*os.File, error) {\n\tfd, err := openFileUnderRootRaw(dirfd, name, unix.O_DIRECTORY|unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err == nil {\n\t\treturn os.NewFile(uintptr(fd), name), nil\n\t}\n\n\tif errors.Is(err, unix.ENOENT) {\n\t\tparent := filepath.Dir(name)\n\t\t// do not create the root directory, it should always exist\n\t\tif parent != name {\n\t\t\tpDir, err2 := openOrCreateDirUnderRoot(dirfd, parent, mode)\n\t\t\tif err2 != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdefer pDir.Close()\n\n\t\t\tbaseName := filepath.Base(name)\n\n\t\t\tif err2 := unix.Mkdirat(int(pDir.Fd()), baseName, uint32(mode)); err2 != nil {\n\t\t\t\treturn nil, &fs.PathError{Op: \"mkdirat\", Path: name, Err: err2}\n\t\t\t}\n\n\t\t\tfd, err = openFileUnderRootRaw(int(pDir.Fd()), baseName, unix.O_DIRECTORY|unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\t\t\tif err == nil {\n\t\t\t\treturn os.NewFile(uintptr(fd), name), nil\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, err\n}\n\n// appendHole creates a hole with the specified size at the open fd.\n// fd is the open file descriptor.\n// name is the path to use for error messages.\n// size is the size of the hole to create.\nfunc appendHole(fd int, name string, size int64) error {\n\toff, err := unix.Seek(fd, size, unix.SEEK_CUR)\n\tif err != nil {\n\t\treturn &fs.PathError{Op: \"seek\", Path: name, Err: err}\n\t}\n\t// Make sure the file size is changed.  It might be the last hole and no other data written afterwards.\n\tif err := unix.Ftruncate(fd, off); err != nil {\n\t\treturn &fs.PathError{Op: \"ftruncate\", Path: name, Err: err}\n\t}\n\treturn nil\n}\n\nfunc safeMkdir(dirfd int, mode os.FileMode, name string, metadata *fileMetadata, options *archive.TarOptions) error {\n\tparent, base, err := splitPath(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tparentFd := dirfd\n\tif parent != \"/\" {\n\t\tparentFile, err := openOrCreateDirUnderRoot(dirfd, parent, 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer parentFile.Close()\n\t\tparentFd = int(parentFile.Fd())\n\t}\n\n\tif err := unix.Mkdirat(parentFd, base, uint32(mode)); err != nil {\n\t\tif !os.IsExist(err) {\n\t\t\treturn &fs.PathError{Op: \"mkdirat\", Path: name, Err: err}\n\t\t}\n\t}\n\n\tfile, err := openFileUnderRoot(parentFd, base, unix.O_DIRECTORY|unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\treturn setFileAttrs(dirfd, file, mode, metadata, options, false)\n}\n\nfunc safeLink(dirfd int, mode os.FileMode, metadata *fileMetadata, options *archive.TarOptions) error {\n\tsourceFile, err := openFileUnderRoot(dirfd, metadata.Linkname, unix.O_PATH|unix.O_RDONLY|unix.O_NOFOLLOW|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer sourceFile.Close()\n\n\terr = doHardLink(dirfd, int(sourceFile.Fd()), metadata.Name)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tnewFile, err := openFileUnderRoot(dirfd, metadata.Name, unix.O_WRONLY|unix.O_NOFOLLOW, 0)\n\tif err != nil {\n\t\t// If the target is a symlink, open the file with O_PATH.\n\t\tif errors.Is(err, unix.ELOOP) {\n\t\t\tnewFile, err := openFileUnderRoot(dirfd, metadata.Name, unix.O_PATH|unix.O_NOFOLLOW, 0)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdefer newFile.Close()\n\n\t\t\treturn setFileAttrs(dirfd, newFile, mode, metadata, options, true)\n\t\t}\n\t\treturn err\n\t}\n\tdefer newFile.Close()\n\n\treturn setFileAttrs(dirfd, newFile, mode, metadata, options, false)\n}\n\nfunc safeSymlink(dirfd int, metadata *fileMetadata) error {\n\tdestDir, destBase, err := splitPath(metadata.Name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdestDirFd := dirfd\n\tif destDir != \"/\" {\n\t\tf, err := openOrCreateDirUnderRoot(dirfd, destDir, 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer f.Close()\n\t\tdestDirFd = int(f.Fd())\n\t}\n\n\tif err := unix.Symlinkat(metadata.Linkname, destDirFd, destBase); err != nil {\n\t\treturn &fs.PathError{Op: \"symlinkat\", Path: metadata.Name, Err: err}\n\t}\n\treturn nil\n}\n\ntype whiteoutHandler struct {\n\tDirfd int\n\tRoot  string\n}\n\nfunc (d whiteoutHandler) Setxattr(path, name string, value []byte) error {\n\tfile, err := openOrCreateDirUnderRoot(d.Dirfd, path, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\tif err := unix.Fsetxattr(int(file.Fd()), name, value, 0); err != nil {\n\t\treturn &fs.PathError{Op: \"fsetxattr\", Path: path, Err: err}\n\t}\n\treturn nil\n}\n\nfunc (d whiteoutHandler) Mknod(path string, mode uint32, dev int) error {\n\tdir, base, err := splitPath(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdirfd := d.Dirfd\n\tif dir != \"/\" {\n\t\tdir, err := openOrCreateDirUnderRoot(d.Dirfd, dir, 0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer dir.Close()\n\n\t\tdirfd = int(dir.Fd())\n\t}\n\n\tif err := unix.Mknodat(dirfd, base, mode, dev); err != nil {\n\t\treturn &fs.PathError{Op: \"mknodat\", Path: path, Err: err}\n\t}\n\n\treturn nil\n}\n\nfunc (d whiteoutHandler) Chown(path string, uid, gid int) error {\n\tfile, err := openFileUnderRoot(d.Dirfd, path, unix.O_PATH, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\treturn chown(int(file.Fd()), \"\", uid, gid, false, path)\n}\n\ntype readerAtCloser interface {\n\tio.ReaderAt\n\tio.Closer\n}\n\n// seekableFile is a struct that wraps an *os.File to provide an ImageSourceSeekable.\ntype seekableFile struct {\n\treader readerAtCloser\n}\n\nfunc (f *seekableFile) Close() error {\n\treturn f.reader.Close()\n}\n\nfunc (f *seekableFile) GetBlobAt(chunks []ImageSourceChunk) (chan io.ReadCloser, chan error, error) {\n\tstreams := make(chan io.ReadCloser)\n\terrs := make(chan error)\n\n\tgo func() {\n\t\tfor _, chunk := range chunks {\n\t\t\tstreams <- io.NopCloser(io.NewSectionReader(f.reader, int64(chunk.Offset), int64(chunk.Length)))\n\t\t}\n\t\tclose(streams)\n\t\tclose(errs)\n\t}()\n\n\treturn streams, errs, nil\n}\n\nfunc newSeekableFile(reader readerAtCloser) *seekableFile {\n\treturn &seekableFile{reader: reader}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/internal/minimal/compression.go",
    "content": "package minimal\n\n// NOTE: This is used from github.com/containers/image by callers that\n// don't otherwise use containers/storage, so don't make this depend on any\n// larger software like the graph drivers.\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\t\"time\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/klauspost/compress/zstd\"\n\t\"github.com/opencontainers/go-digest\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"go.podman.io/storage/pkg/archive\"\n)\n\n// ZstdWriter is an interface that wraps standard io.WriteCloser and Reset() to reuse the compressor with a new writer.\ntype ZstdWriter interface {\n\tio.WriteCloser\n\tReset(dest io.Writer)\n}\n\n// CreateZstdWriterFunc is a function that creates a ZstdWriter for the provided destination writer.\ntype CreateZstdWriterFunc func(dest io.Writer) (ZstdWriter, error)\n\n// TOC is short for Table of Contents and is used by the zstd:chunked\n// file format to effectively add an overall index into the contents\n// of a tarball; it also includes file metadata.\ntype TOC struct {\n\t// Version is currently expected to be 1\n\tVersion int `json:\"version\"`\n\t// Entries is the list of file metadata in this TOC.\n\t// The ordering in this array currently defaults to being the same\n\t// as that of the tar stream; however, this should not be relied on.\n\tEntries []FileMetadata `json:\"entries\"`\n\t// TarSplitDigest is the checksum of the \"tar-split\" data which\n\t// is included as a distinct skippable zstd frame before the TOC.\n\tTarSplitDigest digest.Digest `json:\"tarSplitDigest,omitempty\"`\n}\n\n// FileMetadata is an entry in the TOC that includes both generic file metadata\n// that duplicates what can found in the tar header (and should match), but\n// also special/custom content (see below).\n//\n// Regular files may optionally be represented as a sequence of “chunks”,\n// which may be ChunkTypeData or ChunkTypeZeros (and ChunkTypeData boundaries\n// are heuristically determined to increase chance of chunk matching / reuse\n// similar to rsync). In that case, the regular file is represented\n// as an initial TypeReg entry (with all metadata for the file as a whole)\n// immediately followed by zero or more TypeChunk entries (containing only Type,\n// Name and Chunk* fields); if there is at least one TypeChunk entry, the Chunk*\n// fields are relevant in all of these entries, including the initial\n// TypeReg one.\n//\n// Note that the metadata here, when fetched by a zstd:chunked aware client,\n// is used instead of that in the tar stream.  The contents of the tar stream\n// are not used in this scenario.\ntype FileMetadata struct {\n\t// If you add any fields, update ensureFileMetadataMatches as well!\n\n\t// The metadata below largely duplicates that in the tar headers.\n\tType       string            `json:\"type\"`\n\tName       string            `json:\"name\"`\n\tLinkname   string            `json:\"linkName,omitempty\"`\n\tMode       int64             `json:\"mode,omitempty\"`\n\tSize       int64             `json:\"size,omitempty\"`\n\tUID        int               `json:\"uid,omitempty\"`\n\tGID        int               `json:\"gid,omitempty\"`\n\tModTime    *time.Time        `json:\"modtime,omitempty\"`\n\tAccessTime *time.Time        `json:\"accesstime,omitempty\"`\n\tChangeTime *time.Time        `json:\"changetime,omitempty\"`\n\tDevmajor   int64             `json:\"devMajor,omitempty\"`\n\tDevminor   int64             `json:\"devMinor,omitempty\"`\n\tXattrs     map[string]string `json:\"xattrs,omitempty\"`\n\t// Digest is a hexadecimal sha256 checksum of the file contents; it\n\t// is empty for empty files\n\tDigest    string `json:\"digest,omitempty\"`\n\tOffset    int64  `json:\"offset,omitempty\"`\n\tEndOffset int64  `json:\"endOffset,omitempty\"`\n\n\tChunkSize   int64  `json:\"chunkSize,omitempty\"`\n\tChunkOffset int64  `json:\"chunkOffset,omitempty\"`\n\tChunkDigest string `json:\"chunkDigest,omitempty\"`\n\tChunkType   string `json:\"chunkType,omitempty\"`\n}\n\nconst (\n\tChunkTypeData  = \"\"\n\tChunkTypeZeros = \"zeros\"\n)\n\nconst (\n\t// The following types correspond to regular types of entries that can\n\t// appear in a tar archive.\n\tTypeReg     = \"reg\"\n\tTypeLink    = \"hardlink\"\n\tTypeChar    = \"char\"\n\tTypeBlock   = \"block\"\n\tTypeDir     = \"dir\"\n\tTypeFifo    = \"fifo\"\n\tTypeSymlink = \"symlink\"\n\t// TypeChunk is special; in zstd:chunked not only are files individually\n\t// compressed and indexable, there is a \"rolling checksum\" used to compute\n\t// \"chunks\" of individual file contents, that are also added to the TOC\n\tTypeChunk = \"chunk\"\n)\n\nvar TarTypes = map[byte]string{\n\ttar.TypeReg:     TypeReg,\n\ttar.TypeLink:    TypeLink,\n\ttar.TypeChar:    TypeChar,\n\ttar.TypeBlock:   TypeBlock,\n\ttar.TypeDir:     TypeDir,\n\ttar.TypeFifo:    TypeFifo,\n\ttar.TypeSymlink: TypeSymlink,\n}\n\nfunc GetType(t byte) (string, error) {\n\tr, found := TarTypes[t]\n\tif !found {\n\t\treturn \"\", fmt.Errorf(\"unknown tarball type: %v\", t)\n\t}\n\treturn r, nil\n}\n\nconst (\n\t// ManifestChecksumKey is a hexadecimal sha256 digest of the compressed manifest digest.\n\tManifestChecksumKey = \"io.github.containers.zstd-chunked.manifest-checksum\"\n\t// ManifestInfoKey is an annotation that signals the start of the TOC (manifest)\n\t// contents which are embedded as a skippable zstd frame.  It has a format of\n\t// four decimal integers separated by `:` as follows:\n\t// <offset>:<length>:<uncompressed length>:<type>\n\t// The <type> is ManifestTypeCRFS which should have the value `1`.\n\tManifestInfoKey = \"io.github.containers.zstd-chunked.manifest-position\"\n\t// TarSplitInfoKey is an annotation that signals the start of the \"tar-split\" metadata\n\t// contents which are embedded as a skippable zstd frame.  It has a format of\n\t// three decimal integers separated by `:` as follows:\n\t// <offset>:<length>:<uncompressed length>\n\tTarSplitInfoKey = \"io.github.containers.zstd-chunked.tarsplit-position\"\n\n\t// TarSplitChecksumKey is no longer used and is replaced by the TOC.TarSplitDigest field instead.\n\t// The value is retained here as a constant as a historical reference for older zstd:chunked images.\n\t//\n\t// Deprecated: This field should never be relied on - use the digest in the TOC instead.\n\tTarSplitChecksumKey = \"io.github.containers.zstd-chunked.tarsplit-checksum\"\n\n\t// ManifestTypeCRFS is a manifest file compatible with the CRFS TOC file.\n\tManifestTypeCRFS = 1\n\n\t// FooterSizeSupported is the footer size supported by this implementation.\n\t// Newer versions of the image format might increase this value, so reject\n\t// any version that is not supported.\n\tFooterSizeSupported = 64\n)\n\nvar (\n\t// when the zstd decoder encounters a skippable frame + 1 byte for the size, it\n\t// will ignore it.\n\t// https://tools.ietf.org/html/rfc8478#section-3.1.2\n\tskippableFrameMagic = []byte{0x50, 0x2a, 0x4d, 0x18}\n\n\tZstdChunkedFrameMagic = []byte{0x47, 0x4e, 0x55, 0x6c, 0x49, 0x6e, 0x55, 0x78}\n)\n\nfunc appendZstdSkippableFrame(dest io.Writer, data []byte) error {\n\tif _, err := dest.Write(skippableFrameMagic); err != nil {\n\t\treturn err\n\t}\n\n\tsize := make([]byte, 4)\n\tbinary.LittleEndian.PutUint32(size, uint32(len(data)))\n\tif _, err := dest.Write(size); err != nil {\n\t\treturn err\n\t}\n\tif _, err := dest.Write(data); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\ntype TarSplitData struct {\n\tData             []byte\n\tDigest           digest.Digest\n\tUncompressedSize int64\n}\n\nfunc WriteZstdChunkedManifest(dest io.Writer, outMetadata map[string]string, offset uint64, tarSplitData *TarSplitData, metadata []FileMetadata, createZstdWriter CreateZstdWriterFunc) error {\n\t// 8 is the size of the zstd skippable frame header + the frame size\n\tconst zstdSkippableFrameHeader = 8\n\tmanifestOffset := offset + zstdSkippableFrameHeader\n\n\ttoc := TOC{\n\t\tVersion:        1,\n\t\tEntries:        metadata,\n\t\tTarSplitDigest: tarSplitData.Digest,\n\t}\n\n\tjson := jsoniter.ConfigCompatibleWithStandardLibrary\n\t// Generate the manifest\n\tmanifest, err := json.Marshal(toc)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar compressedBuffer bytes.Buffer\n\tzstdWriter, err := createZstdWriter(&compressedBuffer)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := zstdWriter.Write(manifest); err != nil {\n\t\tzstdWriter.Close()\n\t\treturn err\n\t}\n\tif err := zstdWriter.Close(); err != nil {\n\t\treturn err\n\t}\n\tcompressedManifest := compressedBuffer.Bytes()\n\n\tmanifestDigester := digest.Canonical.Digester()\n\tmanifestChecksum := manifestDigester.Hash()\n\tif _, err := manifestChecksum.Write(compressedManifest); err != nil {\n\t\treturn err\n\t}\n\n\toutMetadata[ManifestChecksumKey] = manifestDigester.Digest().String()\n\toutMetadata[ManifestInfoKey] = fmt.Sprintf(\"%d:%d:%d:%d\", manifestOffset, len(compressedManifest), len(manifest), ManifestTypeCRFS)\n\tif err := appendZstdSkippableFrame(dest, compressedManifest); err != nil {\n\t\treturn err\n\t}\n\n\ttarSplitOffset := manifestOffset + uint64(len(compressedManifest)) + zstdSkippableFrameHeader\n\toutMetadata[TarSplitInfoKey] = fmt.Sprintf(\"%d:%d:%d\", tarSplitOffset, len(tarSplitData.Data), tarSplitData.UncompressedSize)\n\tif err := appendZstdSkippableFrame(dest, tarSplitData.Data); err != nil {\n\t\treturn err\n\t}\n\n\tfooter := ZstdChunkedFooterData{\n\t\tManifestType:               uint64(ManifestTypeCRFS),\n\t\tOffset:                     manifestOffset,\n\t\tLengthCompressed:           uint64(len(compressedManifest)),\n\t\tLengthUncompressed:         uint64(len(manifest)),\n\t\tOffsetTarSplit:             tarSplitOffset,\n\t\tLengthCompressedTarSplit:   uint64(len(tarSplitData.Data)),\n\t\tLengthUncompressedTarSplit: uint64(tarSplitData.UncompressedSize),\n\t}\n\n\tmanifestDataLE := footerDataToBlob(footer)\n\n\treturn appendZstdSkippableFrame(dest, manifestDataLE)\n}\n\nfunc ZstdWriterWithLevel(dest io.Writer, level int) (ZstdWriter, error) {\n\tel := zstd.EncoderLevelFromZstd(level)\n\treturn zstd.NewWriter(dest, zstd.WithEncoderLevel(el))\n}\n\n// ZstdChunkedFooterData contains all the data stored in the zstd:chunked footer.\n// This footer exists to make the blobs self-describing, our implementation\n// never reads it:\n// Partial pull security hinges on the TOC digest, and that exists as a layer annotation;\n// so we are relying on the layer annotations anyway, and doing so means we can avoid\n// a round-trip to fetch this binary footer.\ntype ZstdChunkedFooterData struct {\n\tManifestType uint64\n\n\tOffset             uint64\n\tLengthCompressed   uint64\n\tLengthUncompressed uint64\n\n\tOffsetTarSplit             uint64\n\tLengthCompressedTarSplit   uint64\n\tLengthUncompressedTarSplit uint64\n\tChecksumAnnotationTarSplit string // Deprecated: This field is not a part of the footer and not used for any purpose.\n}\n\nfunc footerDataToBlob(footer ZstdChunkedFooterData) []byte {\n\t// Store the offset to the manifest and its size in LE order\n\tmanifestDataLE := make([]byte, FooterSizeSupported)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*0:], footer.Offset)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*1:], footer.LengthCompressed)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*2:], footer.LengthUncompressed)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*3:], footer.ManifestType)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*4:], footer.OffsetTarSplit)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*5:], footer.LengthCompressedTarSplit)\n\tbinary.LittleEndian.PutUint64(manifestDataLE[8*6:], footer.LengthUncompressedTarSplit)\n\tcopy(manifestDataLE[8*7:], ZstdChunkedFrameMagic)\n\n\treturn manifestDataLE\n}\n\n// timeIfNotZero returns a pointer to the time.Time if it is not zero, otherwise it returns nil.\nfunc timeIfNotZero(t *time.Time) *time.Time {\n\tif t == nil || t.IsZero() {\n\t\treturn nil\n\t}\n\treturn t\n}\n\n// NewFileMetadata creates a basic FileMetadata entry for hdr.\n// The caller must set DigestOffset/EndOffset, and the Chunk* values, separately.\nfunc NewFileMetadata(hdr *tar.Header) (FileMetadata, error) {\n\ttyp, err := GetType(hdr.Typeflag)\n\tif err != nil {\n\t\treturn FileMetadata{}, err\n\t}\n\txattrs := make(map[string]string)\n\tfor k, v := range hdr.PAXRecords {\n\t\txattrKey, ok := strings.CutPrefix(k, archive.PaxSchilyXattr)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\txattrs[xattrKey] = base64.StdEncoding.EncodeToString([]byte(v))\n\t}\n\treturn FileMetadata{\n\t\tType:       typ,\n\t\tName:       hdr.Name,\n\t\tLinkname:   hdr.Linkname,\n\t\tMode:       hdr.Mode,\n\t\tSize:       hdr.Size,\n\t\tUID:        hdr.Uid,\n\t\tGID:        hdr.Gid,\n\t\tModTime:    timeIfNotZero(&hdr.ModTime),\n\t\tAccessTime: timeIfNotZero(&hdr.AccessTime),\n\t\tChangeTime: timeIfNotZero(&hdr.ChangeTime),\n\t\tDevmajor:   hdr.Devmajor,\n\t\tDevminor:   hdr.Devminor,\n\t\tXattrs:     xattrs,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/internal/path/path.go",
    "content": "package path\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\n\t\"github.com/opencontainers/go-digest\"\n)\n\n// CleanAbsPath removes any \"..\" and \".\" from the path\n// and ensures it starts with a \"/\".  If the path refers to the root\n// directory, it returns \"/\".\nfunc CleanAbsPath(path string) string {\n\treturn filepath.Clean(\"/\" + path)\n}\n\n// RegularFilePath returns the path used in the composefs backing store for a\n// regular file with the provided content digest.\n//\n// The caller MUST ensure d is a valid digest (in particular, that it contains no path separators or .. entries)\nfunc RegularFilePathForValidatedDigest(d digest.Digest) (string, error) {\n\tif algo := d.Algorithm(); algo != digest.SHA256 {\n\t\treturn \"\", fmt.Errorf(\"unexpected digest algorithm %q\", algo)\n\t}\n\te := d.Encoded()\n\treturn e[0:2] + \"/\" + e[2:], nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/storage.go",
    "content": "package chunked\n\nimport (\n\t\"io\"\n)\n\n// ImageSourceChunk is a portion of a blob.\ntype ImageSourceChunk struct {\n\tOffset uint64\n\tLength uint64\n}\n\n// ImageSourceSeekable is an image source that permits to fetch chunks of the entire blob.\ntype ImageSourceSeekable interface {\n\t// GetBlobAt returns a stream for the specified blob.\n\tGetBlobAt([]ImageSourceChunk) (chan io.ReadCloser, chan error, error)\n}\n\n// ErrBadRequest is returned when the request is not valid\ntype ErrBadRequest struct { //nolint: errname\n}\n\nfunc (e ErrBadRequest) Error() string {\n\treturn \"bad request\"\n}\n\n// ErrFallbackToOrdinaryLayerDownload is a custom error type that\n// suggests to the caller that a fallback mechanism can be used\n// instead of a hard failure.\ntype ErrFallbackToOrdinaryLayerDownload struct {\n\tErr error\n}\n\nfunc (c ErrFallbackToOrdinaryLayerDownload) Error() string {\n\treturn c.Err.Error()\n}\n\nfunc (c ErrFallbackToOrdinaryLayerDownload) Unwrap() error {\n\treturn c.Err\n}\n\nfunc newErrFallbackToOrdinaryLayerDownload(err error) error {\n\treturn ErrFallbackToOrdinaryLayerDownload{Err: err}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/storage_linux.go",
    "content": "package chunked\n\nimport (\n\tarchivetar \"archive/tar\"\n\t\"cmp\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"io/fs\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/containerd/stargz-snapshotter/estargz\"\n\t\"github.com/cyphar/filepath-securejoin/pathrs-lite\"\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/klauspost/compress/zstd\"\n\t\"github.com/klauspost/pgzip\"\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n\t\"github.com/vbatts/tar-split/tar/asm\"\n\ttsStorage \"github.com/vbatts/tar-split/tar/storage\"\n\tstorage \"go.podman.io/storage\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/chunked/compressor\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n\tpath \"go.podman.io/storage/pkg/chunked/internal/path\"\n\t\"go.podman.io/storage/pkg/chunked/toc\"\n\t\"go.podman.io/storage/pkg/fsverity\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tmaxNumberMissingChunks  = 1024\n\tautoMergePartsThreshold = 1024 // if the gap between two ranges is below this threshold, automatically merge them.\n\tnewFileFlags            = (unix.O_CREAT | unix.O_TRUNC | unix.O_EXCL | unix.O_WRONLY)\n\tbigDataKey              = \"zstd-chunked-manifest\"\n\tchunkedData             = \"zstd-chunked-data\"\n\tchunkedLayerDataKey     = \"zstd-chunked-layer-data\"\n\ttocKey                  = \"toc\"\n\tfsVerityDigestsKey      = \"fs-verity-digests\"\n\n\tfileTypeZstdChunked = iota\n\tfileTypeEstargz\n\tfileTypeNoCompression\n\tfileTypeHole\n\n\tcopyGoRoutines = 32\n)\n\ntype compressedFileType int\n\ntype chunkedDiffer struct {\n\t// Initial parameters, used throughout and never modified\n\t// ==========\n\tpullOptions pullOptions\n\tstream      ImageSourceSeekable\n\t// blobDigest is the digest of the whole compressed layer.  It is used if\n\t// convertToZstdChunked to validate a layer when it is converted since there\n\t// is no TOC referenced by the manifest.\n\tblobDigest digest.Digest\n\tblobSize   int64\n\n\t// Input format\n\t// ==========\n\tfileType compressedFileType\n\t// convertedToZstdChunked is set to true if the layer needs to\n\t// be converted to the zstd:chunked format before it can be\n\t// handled.\n\tconvertToZstdChunked bool\n\n\t// Chunked metadata\n\t// This is usually set in NewDiffer, but if convertToZstdChunked, it is only computed in chunkedDiffer.ApplyDiff\n\t// ==========\n\t// tocDigest is the digest of the TOC document when the layer\n\t// is partially pulled, or \"\" if not relevant to consumers.\n\ttocDigest           digest.Digest\n\ttocOffset           int64\n\tmanifest            []byte\n\ttoc                 *minimal.TOC // The parsed contents of manifest, or nil if not yet available\n\ttarSplit            *os.File\n\tuncompressedTarSize int64 // -1 if unknown\n\t// skipValidation is set to true if the individual files in\n\t// the layer are trusted and should not be validated.\n\tskipValidation bool\n\n\t// Long-term caches\n\t// This is set in NewDiffer, when the caller must not hold any storage locks, and later consumed in .ApplyDiff()\n\t// ==========\n\tlayersCache     *layersCache\n\tcopyBuffer      []byte\n\tfsVerityMutex   sync.Mutex // protects fsVerityDigests\n\tfsVerityDigests map[string]string\n\n\t// Private state of .ApplyDiff\n\t// ==========\n\tgzipReader  *pgzip.Reader\n\tzstdReader  *zstd.Decoder\n\trawReader   io.Reader\n\tuseFsVerity graphdriver.DifferFsVerity\n\tused        bool // the differ object was already used and cannot be used again for .ApplyDiff\n}\n\nvar xattrsToIgnore = map[string]any{\n\t\"security.selinux\": true,\n}\n\n// chunkedLayerData is used to store additional information about the layer\ntype chunkedLayerData struct {\n\tFormat graphdriver.DifferOutputFormat `json:\"format\"`\n}\n\n// pullOptions contains parsed data from storage.Store.PullOptions.\n// TO DO: ideally this should be parsed along with the rest of the config file into StoreOptions directly\n// (and then storage.Store.PullOptions would need to be somehow simulated).\ntype pullOptions struct {\n\tenablePartialImages                     bool     // enable_partial_images\n\tconvertImages                           bool     // convert_images\n\tuseHardLinks                            bool     // use_hard_links\n\tinsecureAllowUnpredictableImageContents bool     // insecure_allow_unpredictable_image_contents\n\tostreeRepos                             []string // ostree_repos\n}\n\nfunc parsePullOptions(store storage.Store) pullOptions {\n\toptions := store.PullOptions()\n\n\tres := pullOptions{}\n\tfor _, e := range []struct {\n\t\tdest         *bool\n\t\tname         string\n\t\tdefaultValue bool\n\t}{\n\t\t{&res.enablePartialImages, \"enable_partial_images\", false},\n\t\t{&res.convertImages, \"convert_images\", false},\n\t\t{&res.useHardLinks, \"use_hard_links\", false},\n\t\t{&res.insecureAllowUnpredictableImageContents, \"insecure_allow_unpredictable_image_contents\", false},\n\t} {\n\t\tif value, ok := options[e.name]; ok {\n\t\t\t*e.dest = strings.ToLower(value) == \"true\"\n\t\t} else {\n\t\t\t*e.dest = e.defaultValue\n\t\t}\n\t}\n\tres.ostreeRepos = strings.Split(options[\"ostree_repos\"], \":\")\n\n\treturn res\n}\n\nfunc (c *chunkedDiffer) convertTarToZstdChunked(destDirectory string, payload *os.File) (int64, *seekableFile, digest.Digest, map[string]string, error) {\n\tdiff, err := archive.DecompressStream(payload)\n\tif err != nil {\n\t\treturn 0, nil, \"\", nil, err\n\t}\n\n\tdefer diff.Close()\n\n\tf, err := openTmpFile(destDirectory)\n\tif err != nil {\n\t\treturn 0, nil, \"\", nil, err\n\t}\n\n\tnewAnnotations := make(map[string]string)\n\tchunked, err := compressor.NoCompression(f, newAnnotations)\n\tif err != nil {\n\t\tf.Close()\n\t\treturn 0, nil, \"\", nil, err\n\t}\n\n\tconvertedOutputDigester := digest.Canonical.Digester()\n\tcopied, err := io.CopyBuffer(io.MultiWriter(chunked, convertedOutputDigester.Hash()), diff, c.copyBuffer)\n\tif err != nil {\n\t\tf.Close()\n\t\treturn 0, nil, \"\", nil, err\n\t}\n\tif err := chunked.Close(); err != nil {\n\t\tf.Close()\n\t\treturn 0, nil, \"\", nil, err\n\t}\n\n\treturn copied, newSeekableFile(f), convertedOutputDigester.Digest(), newAnnotations, nil\n}\n\nfunc (c *chunkedDiffer) Close() error {\n\tif c.tarSplit != nil {\n\t\terr := c.tarSplit.Close()\n\t\tc.tarSplit = nil\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// NewDiffer returns a differ than can be used with [Store.PrepareStagedLayer].\n// If it returns an error that matches ErrFallbackToOrdinaryLayerDownload, the caller can\n// retry the operation with a different method.\n// The caller must call Close() on the returned Differ.\nfunc NewDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (graphdriver.Differ, error) {\n\tpullOptions := parsePullOptions(store)\n\n\tif !pullOptions.enablePartialImages {\n\t\t// If pullOptions.convertImages is set, the two options disagree whether fallback is permissible.\n\t\t// Right now, we enable it, but that’s not a promise; rather, such a configuration should ideally be rejected.\n\t\treturn nil, newErrFallbackToOrdinaryLayerDownload(errors.New(\"partial images are disabled\"))\n\t}\n\t// pullOptions.convertImages also serves as a “must not fallback to non-partial pull” option (?!)\n\n\tgraphDriver, err := store.GraphDriver()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif _, partialSupported := graphDriver.(graphdriver.DriverWithDiffer); !partialSupported {\n\t\tif pullOptions.convertImages {\n\t\t\treturn nil, fmt.Errorf(\"graph driver %s does not support partial pull but convert_images requires that\", graphDriver.String())\n\t\t}\n\t\treturn nil, newErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"graph driver %s does not support partial pull\", graphDriver.String()))\n\t}\n\n\tdiffer, err := getProperDiffer(store, blobDigest, blobSize, annotations, iss, pullOptions)\n\tif err != nil {\n\t\tvar fallbackErr ErrFallbackToOrdinaryLayerDownload\n\t\tif !errors.As(err, &fallbackErr) {\n\t\t\treturn nil, err\n\t\t}\n\t\t// If convert_images is enabled, always attempt to convert it instead of returning an error or falling back to a different method.\n\t\tif !pullOptions.convertImages {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar canConvertErr errFallbackCanConvert\n\t\tif !errors.As(err, &canConvertErr) {\n\t\t\t// We are supposed to use makeConvertFromRawDiffer, but that would not work.\n\t\t\t// Fail, and make sure the error does _not_ match ErrFallbackToOrdinaryLayerDownload: use only the error text,\n\t\t\t// discard all type information.\n\t\t\treturn nil, fmt.Errorf(\"neither a partial pull nor convert_images is possible: %s\", err.Error())\n\t\t}\n\t\tlogrus.Debugf(\"Created differ to convert blob %q\", blobDigest)\n\t\treturn makeConvertFromRawDiffer(store, blobDigest, blobSize, iss, pullOptions)\n\t}\n\n\treturn differ, nil\n}\n\n// errFallbackCanConvert is an an error type _accompanying_ ErrFallbackToOrdinaryLayerDownload\n// within getProperDiffer, to mark that using makeConvertFromRawDiffer makes sense.\n// This is used to distinguish between cases where the environment does not support partial pulls\n// (e.g. a registry does not support range requests) and convert_images is still possible,\n// from cases where the image content is unacceptable for partial pulls (e.g. exceeds memory limits)\n// and convert_images would not help.\ntype errFallbackCanConvert struct {\n\terr error\n}\n\nfunc (e errFallbackCanConvert) Error() string {\n\treturn e.err.Error()\n}\n\nfunc (e errFallbackCanConvert) Unwrap() error {\n\treturn e.err\n}\n\n// getProperDiffer is an implementation detail of NewDiffer.\n// It returns a “proper” differ (not a convert_images one) if possible.\n// May return an error matching ErrFallbackToOrdinaryLayerDownload if a fallback to an alternative\n// (either makeConvertFromRawDiffer, or a non-partial pull) is permissible.\nfunc getProperDiffer(store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable, pullOptions pullOptions) (graphdriver.Differ, error) {\n\tzstdChunkedTOCDigestString, hasZstdChunkedTOC := annotations[minimal.ManifestChecksumKey]\n\testargzTOCDigestString, hasEstargzTOC := annotations[estargz.TOCJSONDigestAnnotation]\n\n\tswitch {\n\tcase hasZstdChunkedTOC && hasEstargzTOC:\n\t\treturn nil, errors.New(\"both zstd:chunked and eStargz TOC found\")\n\n\tcase hasZstdChunkedTOC:\n\t\tzstdChunkedTOCDigest, err := digest.Parse(zstdChunkedTOCDigestString)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdiffer, err := makeZstdChunkedDiffer(store, blobSize, zstdChunkedTOCDigest, annotations, iss, pullOptions)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Could not create zstd:chunked differ for blob %q: %v\", blobDigest, err)\n\t\t\treturn nil, err\n\t\t}\n\t\tlogrus.Debugf(\"Created zstd:chunked differ for blob %q\", blobDigest)\n\t\treturn differ, nil\n\n\tcase hasEstargzTOC:\n\t\testargzTOCDigest, err := digest.Parse(estargzTOCDigestString)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdiffer, err := makeEstargzChunkedDiffer(store, blobSize, estargzTOCDigest, iss, pullOptions)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Could not create estargz differ for blob %q: %v\", blobDigest, err)\n\t\t\treturn nil, err\n\t\t}\n\t\tlogrus.Debugf(\"Created eStargz differ for blob %q\", blobDigest)\n\t\treturn differ, nil\n\n\tdefault: // no TOC\n\t\tmessage := \"no TOC found\"\n\t\tif !pullOptions.convertImages {\n\t\t\tmessage = \"no TOC found and convert_images is not configured\"\n\t\t}\n\t\treturn nil, errFallbackCanConvert{\n\t\t\tnewErrFallbackToOrdinaryLayerDownload(errors.New(message)),\n\t\t}\n\t}\n}\n\nfunc makeConvertFromRawDiffer(store storage.Store, blobDigest digest.Digest, blobSize int64, iss ImageSourceSeekable, pullOptions pullOptions) (*chunkedDiffer, error) {\n\tlayersCache, err := getLayersCache(store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &chunkedDiffer{\n\t\tpullOptions: pullOptions,\n\t\tstream:      iss,\n\t\tblobDigest:  blobDigest,\n\t\tblobSize:    blobSize,\n\n\t\tconvertToZstdChunked: true,\n\n\t\tuncompressedTarSize: -1, // Will be computed later\n\n\t\tlayersCache:     layersCache,\n\t\tcopyBuffer:      makeCopyBuffer(),\n\t\tfsVerityDigests: make(map[string]string),\n\t}, nil\n}\n\n// makeZstdChunkedDiffer sets up a chunkedDiffer for a zstd:chunked layer.\n// It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert.\nfunc makeZstdChunkedDiffer(store storage.Store, blobSize int64, tocDigest digest.Digest, annotations map[string]string, iss ImageSourceSeekable, pullOptions pullOptions) (_ *chunkedDiffer, retErr error) {\n\tmanifest, toc, tarSplit, tocOffset, err := readZstdChunkedManifest(store.RunRoot(), iss, tocDigest, annotations, true)\n\tif err != nil { // May be ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert\n\t\treturn nil, fmt.Errorf(\"read zstd:chunked manifest: %w\", err)\n\t}\n\tdefer func() {\n\t\tif tarSplit != nil && retErr != nil {\n\t\t\ttarSplit.Close()\n\t\t}\n\t}()\n\n\tvar uncompressedTarSize int64 = -1\n\tif tarSplit != nil {\n\t\tif _, err := tarSplit.Seek(0, io.SeekStart); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tuncompressedTarSize, err = tarSizeFromTarSplit(tarSplit)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"computing size from tar-split: %w\", err)\n\t\t}\n\t} else if !pullOptions.insecureAllowUnpredictableImageContents { // With no tar-split, we can't compute the traditional UncompressedDigest.\n\t\treturn nil, errFallbackCanConvert{\n\t\t\tnewErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"zstd:chunked layers without tar-split data don't support partial pulls with guaranteed consistency with non-partial pulls\")),\n\t\t}\n\t}\n\n\tlayersCache, err := getLayersCache(store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &chunkedDiffer{\n\t\tpullOptions: pullOptions,\n\t\tstream:      iss,\n\t\tblobSize:    blobSize,\n\n\t\tfileType: fileTypeZstdChunked,\n\n\t\ttocDigest:           tocDigest,\n\t\ttocOffset:           tocOffset,\n\t\tmanifest:            manifest,\n\t\ttoc:                 toc,\n\t\ttarSplit:            tarSplit,\n\t\tuncompressedTarSize: uncompressedTarSize,\n\n\t\tlayersCache:     layersCache,\n\t\tcopyBuffer:      makeCopyBuffer(),\n\t\tfsVerityDigests: make(map[string]string),\n\t}, nil\n}\n\n// makeEstargzChunkedDiffer sets up a chunkedDiffer for an estargz layer.\n// It may return an error matching ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert.\nfunc makeEstargzChunkedDiffer(store storage.Store, blobSize int64, tocDigest digest.Digest, iss ImageSourceSeekable, pullOptions pullOptions) (*chunkedDiffer, error) {\n\tif !pullOptions.insecureAllowUnpredictableImageContents { // With no tar-split, we can't compute the traditional UncompressedDigest.\n\t\treturn nil, errFallbackCanConvert{\n\t\t\tnewErrFallbackToOrdinaryLayerDownload(fmt.Errorf(\"estargz layers don't support partial pulls with guaranteed consistency with non-partial pulls\")),\n\t\t}\n\t}\n\n\tmanifest, tocOffset, err := readEstargzChunkedManifest(iss, blobSize, tocDigest)\n\tif err != nil { // May be ErrFallbackToOrdinaryLayerDownload / errFallbackCanConvert\n\t\treturn nil, fmt.Errorf(\"read zstd:chunked manifest: %w\", err)\n\t}\n\tlayersCache, err := getLayersCache(store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &chunkedDiffer{\n\t\tpullOptions: pullOptions,\n\t\tstream:      iss,\n\t\tblobSize:    blobSize,\n\n\t\tfileType: fileTypeEstargz,\n\n\t\ttocDigest:           tocDigest,\n\t\ttocOffset:           tocOffset,\n\t\tmanifest:            manifest,\n\t\tuncompressedTarSize: -1, // We would have to read and decompress the whole layer\n\n\t\tlayersCache:     layersCache,\n\t\tcopyBuffer:      makeCopyBuffer(),\n\t\tfsVerityDigests: make(map[string]string),\n\t}, nil\n}\n\nfunc makeCopyBuffer() []byte {\n\treturn make([]byte, 2<<20)\n}\n\n// copyFileFromOtherLayer copies a file from another layer\n// file is the file to look for.\n// source is the path to the source layer checkout.\n// name is the path to the file to copy in source.\n// dirfd is an open file descriptor to the destination root directory.\n// useHardLinks defines whether the deduplication can be performed using hard links.\nfunc copyFileFromOtherLayer(file *fileMetadata, source string, name string, dirfd int, useHardLinks bool) (bool, *os.File, int64, error) {\n\tsrcDirfd, err := unix.Open(source, unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn false, nil, 0, &fs.PathError{Op: \"open\", Path: source, Err: err}\n\t}\n\tdefer unix.Close(srcDirfd)\n\n\tsrcFile, err := openFileUnderRoot(srcDirfd, name, unix.O_RDONLY|syscall.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn false, nil, 0, err\n\t}\n\tdefer srcFile.Close()\n\n\tdstFile, written, err := copyFileContent(int(srcFile.Fd()), file, dirfd, 0, useHardLinks)\n\tif err != nil {\n\t\treturn false, nil, 0, fmt.Errorf(\"copy content to %q: %w\", file.Name, err)\n\t}\n\treturn true, dstFile, written, nil\n}\n\n// canDedupMetadataWithHardLink says whether it is possible to deduplicate file with otherFile.\n// It checks that the two files have the same UID, GID, file mode and xattrs.\nfunc canDedupMetadataWithHardLink(file *fileMetadata, otherFile *fileMetadata) bool {\n\tif file.UID != otherFile.UID {\n\t\treturn false\n\t}\n\tif file.GID != otherFile.GID {\n\t\treturn false\n\t}\n\tif file.Mode != otherFile.Mode {\n\t\treturn false\n\t}\n\tif !reflect.DeepEqual(file.Xattrs, otherFile.Xattrs) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// canDedupFileWithHardLink checks if the specified file can be deduplicated by an\n// open file, given its descriptor and stat data.\nfunc canDedupFileWithHardLink(file *fileMetadata, fd int, s os.FileInfo) bool {\n\tst, ok := s.Sys().(*syscall.Stat_t)\n\tif !ok {\n\t\treturn false\n\t}\n\n\tpath := procPathForFd(fd)\n\n\tlistXattrs, err := system.Llistxattr(path)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\txattrs := make(map[string]string)\n\tfor _, x := range listXattrs {\n\t\tv, err := system.Lgetxattr(path, x)\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\n\t\tif _, found := xattrsToIgnore[x]; found {\n\t\t\tcontinue\n\t\t}\n\t\txattrs[x] = string(v)\n\t}\n\t// fill only the attributes used by canDedupMetadataWithHardLink.\n\totherFile := fileMetadata{\n\t\tFileMetadata: minimal.FileMetadata{\n\t\t\tUID:    int(st.Uid),\n\t\t\tGID:    int(st.Gid),\n\t\t\tMode:   int64(st.Mode),\n\t\t\tXattrs: xattrs,\n\t\t},\n\t}\n\treturn canDedupMetadataWithHardLink(file, &otherFile)\n}\n\n// findFileInOSTreeRepos checks whether the requested file already exist in one of the OSTree repo and copies the file content from there if possible.\n// file is the file to look for.\n// ostreeRepos is a list of OSTree repos.\n// dirfd is an open fd to the destination checkout.\n// useHardLinks defines whether the deduplication can be performed using hard links.\nfunc findFileInOSTreeRepos(file *fileMetadata, ostreeRepos []string, dirfd int, useHardLinks bool) (bool, *os.File, int64, error) {\n\tdigest, err := digest.Parse(file.Digest)\n\tif err != nil {\n\t\tlogrus.Debugf(\"could not parse digest: %v\", err)\n\t\treturn false, nil, 0, nil\n\t}\n\tpayloadLink := digest.Encoded() + \".payload-link\"\n\tif len(payloadLink) < 2 {\n\t\treturn false, nil, 0, nil\n\t}\n\n\tfor _, repo := range ostreeRepos {\n\t\tsourceFile := filepath.Join(repo, \"objects\", payloadLink[:2], payloadLink[2:])\n\t\tst, err := os.Stat(sourceFile)\n\t\tif err != nil || !st.Mode().IsRegular() {\n\t\t\tcontinue\n\t\t}\n\t\tif st.Size() != file.Size {\n\t\t\tcontinue\n\t\t}\n\t\tfd, err := unix.Open(sourceFile, unix.O_RDONLY|unix.O_NONBLOCK|unix.O_CLOEXEC, 0)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"could not open sourceFile %s: %v\", sourceFile, err)\n\t\t\treturn false, nil, 0, nil\n\t\t}\n\t\tf := os.NewFile(uintptr(fd), \"fd\")\n\t\tdefer f.Close()\n\n\t\t// check if the open file can be deduplicated with hard links\n\t\tif useHardLinks && !canDedupFileWithHardLink(file, fd, st) {\n\t\t\tcontinue\n\t\t}\n\n\t\tdstFile, written, err := copyFileContent(fd, file, dirfd, 0, useHardLinks)\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"could not copyFileContent: %v\", err)\n\t\t\treturn false, nil, 0, nil\n\t\t}\n\t\treturn true, dstFile, written, nil\n\t}\n\t// If hard links deduplication was used and it has failed, try again without hard links.\n\tif useHardLinks {\n\t\treturn findFileInOSTreeRepos(file, ostreeRepos, dirfd, false)\n\t}\n\n\treturn false, nil, 0, nil\n}\n\n// findFileInOtherLayers finds the specified file in other layers.\n// cache is the layers cache to use.\n// file is the file to look for.\n// dirfd is an open file descriptor to the checkout root directory.\n// useHardLinks defines whether the deduplication can be performed using hard links.\nfunc findFileInOtherLayers(cache *layersCache, file *fileMetadata, dirfd int, useHardLinks bool) (bool, *os.File, int64, error) {\n\ttarget, name, err := cache.findFileInOtherLayers(file, useHardLinks)\n\tif err != nil || name == \"\" {\n\t\treturn false, nil, 0, err\n\t}\n\treturn copyFileFromOtherLayer(file, target, name, dirfd, useHardLinks)\n}\n\nfunc maybeDoIDRemap(manifest []fileMetadata, options *archive.TarOptions) error {\n\tif options.ChownOpts == nil && len(options.UIDMaps) == 0 || len(options.GIDMaps) == 0 {\n\t\treturn nil\n\t}\n\n\tidMappings := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)\n\n\tfor i := range manifest {\n\t\tif options.ChownOpts != nil {\n\t\t\tmanifest[i].UID = options.ChownOpts.UID\n\t\t\tmanifest[i].GID = options.ChownOpts.GID\n\t\t} else {\n\t\t\tpair := idtools.IDPair{\n\t\t\t\tUID: manifest[i].UID,\n\t\t\t\tGID: manifest[i].GID,\n\t\t\t}\n\t\t\tvar err error\n\t\t\tmanifest[i].UID, manifest[i].GID, err = idMappings.ToContainer(pair)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc mapToSlice(inputMap map[uint32]struct{}) []uint32 {\n\treturn slices.Collect(maps.Keys(inputMap))\n}\n\nfunc collectIDs(entries []fileMetadata) ([]uint32, []uint32) {\n\tuids := make(map[uint32]struct{})\n\tgids := make(map[uint32]struct{})\n\tfor _, entry := range entries {\n\t\tuids[uint32(entry.UID)] = struct{}{}\n\t\tgids[uint32(entry.GID)] = struct{}{}\n\t}\n\treturn mapToSlice(uids), mapToSlice(gids)\n}\n\ntype originFile struct {\n\tRoot   string\n\tPath   string\n\tOffset int64\n}\n\ntype missingFileChunk struct {\n\tGap  int64\n\tHole bool\n\n\tFile *fileMetadata\n\n\tCompressedSize   int64\n\tUncompressedSize int64\n}\n\ntype missingPart struct {\n\tHole        bool\n\tSourceChunk *ImageSourceChunk\n\tOriginFile  *originFile\n\tChunks      []missingFileChunk\n}\n\nfunc (o *originFile) OpenFile() (io.ReadCloser, error) {\n\tsrcDirfd, err := unix.Open(o.Root, unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, &fs.PathError{Op: \"open\", Path: o.Root, Err: err}\n\t}\n\tdefer unix.Close(srcDirfd)\n\n\tsrcFile, err := openFileUnderRoot(srcDirfd, o.Path, unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, err := srcFile.Seek(o.Offset, io.SeekStart); err != nil {\n\t\tsrcFile.Close()\n\t\treturn nil, err\n\t}\n\treturn srcFile, nil\n}\n\nfunc (c *chunkedDiffer) prepareCompressedStreamToFile(partCompression compressedFileType, mf *missingFileChunk) (compressedFileType, error) {\n\tswitch {\n\tcase partCompression == fileTypeHole:\n\t\t// The entire part is a hole.  Do not need to read from a file.\n\t\treturn fileTypeHole, nil\n\tcase mf.Hole:\n\t\t// Only the missing chunk in the requested part refers to a hole.\n\t\t// The received data must be discarded.\n\t\t_, err := io.CopyBuffer(io.Discard, c.rawReader, c.copyBuffer)\n\t\treturn fileTypeHole, err\n\tcase partCompression == fileTypeZstdChunked:\n\t\tif c.zstdReader == nil {\n\t\t\tr, err := zstd.NewReader(c.rawReader)\n\t\t\tif err != nil {\n\t\t\t\treturn partCompression, err\n\t\t\t}\n\t\t\tc.zstdReader = r\n\t\t} else {\n\t\t\tif err := c.zstdReader.Reset(c.rawReader); err != nil {\n\t\t\t\treturn partCompression, err\n\t\t\t}\n\t\t}\n\tcase partCompression == fileTypeEstargz:\n\t\tif c.gzipReader == nil {\n\t\t\tr, err := pgzip.NewReader(c.rawReader)\n\t\t\tif err != nil {\n\t\t\t\treturn partCompression, err\n\t\t\t}\n\t\t\tc.gzipReader = r\n\t\t} else {\n\t\t\tif err := c.gzipReader.Reset(c.rawReader); err != nil {\n\t\t\t\treturn partCompression, err\n\t\t\t}\n\t\t}\n\tcase partCompression == fileTypeNoCompression:\n\t\treturn fileTypeNoCompression, nil\n\tdefault:\n\t\treturn partCompression, fmt.Errorf(\"unknown file type %q\", c.fileType)\n\t}\n\treturn partCompression, nil\n}\n\n// hashHole writes SIZE zeros to the specified hasher\nfunc hashHole(h hash.Hash, size int64, copyBuffer []byte) error {\n\tcount := min(size, int64(len(copyBuffer)))\n\tfor i := int64(0); i < count; i++ {\n\t\tcopyBuffer[i] = 0\n\t}\n\tfor size > 0 {\n\t\tcount = min(size, int64(len(copyBuffer)))\n\t\tif _, err := h.Write(copyBuffer[:count]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsize -= count\n\t}\n\treturn nil\n}\n\nfunc (c *chunkedDiffer) appendCompressedStreamToFile(compression compressedFileType, destFile *destinationFile, size int64) error {\n\tswitch compression {\n\tcase fileTypeZstdChunked:\n\t\tdefer func() {\n\t\t\tif err := c.zstdReader.Reset(nil); err != nil {\n\t\t\t\tlogrus.Warnf(\"release of references to the previous zstd reader failed: %v\", err)\n\t\t\t}\n\t\t}()\n\t\tif _, err := io.CopyBuffer(destFile.to, io.LimitReader(c.zstdReader, size), c.copyBuffer); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase fileTypeEstargz:\n\t\tdefer c.gzipReader.Close()\n\t\tif _, err := io.CopyBuffer(destFile.to, io.LimitReader(c.gzipReader, size), c.copyBuffer); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase fileTypeNoCompression:\n\t\tif _, err := io.CopyBuffer(destFile.to, io.LimitReader(c.rawReader, size), c.copyBuffer); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase fileTypeHole:\n\t\tif err := appendHole(int(destFile.file.Fd()), destFile.metadata.Name, size); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif destFile.hash != nil {\n\t\t\tif err := hashHole(destFile.hash, size, c.copyBuffer); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown file type %q\", c.fileType)\n\t}\n\treturn nil\n}\n\ntype recordFsVerityFunc func(string, *os.File) error\n\ntype destinationFile struct {\n\tdigester       digest.Digester\n\tdirfd          int\n\tfile           *os.File\n\thash           hash.Hash\n\tmetadata       *fileMetadata\n\toptions        *archive.TarOptions\n\tskipValidation bool\n\tto             io.Writer\n\trecordFsVerity recordFsVerityFunc\n}\n\nfunc openDestinationFile(dirfd int, metadata *fileMetadata, options *archive.TarOptions, skipValidation bool, recordFsVerity recordFsVerityFunc) (*destinationFile, error) {\n\tfile, err := openFileUnderRoot(dirfd, metadata.Name, newFileFlags, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar digester digest.Digester\n\tvar hash hash.Hash\n\tvar to io.Writer\n\n\tif skipValidation {\n\t\tto = file\n\t} else {\n\t\tdigester = digest.Canonical.Digester()\n\t\thash = digester.Hash()\n\t\tto = io.MultiWriter(file, hash)\n\t}\n\n\treturn &destinationFile{\n\t\tfile:           file,\n\t\tdigester:       digester,\n\t\thash:           hash,\n\t\tto:             to,\n\t\tmetadata:       metadata,\n\t\toptions:        options,\n\t\tdirfd:          dirfd,\n\t\tskipValidation: skipValidation,\n\t\trecordFsVerity: recordFsVerity,\n\t}, nil\n}\n\nfunc (d *destinationFile) Close() (Err error) {\n\tdefer func() {\n\t\tvar roFile *os.File\n\t\tvar err error\n\n\t\tif d.recordFsVerity != nil {\n\t\t\troFile, err = reopenFileReadOnly(d.file)\n\t\t\tif err == nil {\n\t\t\t\tdefer roFile.Close()\n\t\t\t} else if Err == nil {\n\t\t\t\tErr = err\n\t\t\t}\n\t\t}\n\n\t\terr = d.file.Close()\n\t\tif Err == nil {\n\t\t\tErr = err\n\t\t}\n\n\t\tif Err == nil && roFile != nil {\n\t\t\tErr = d.recordFsVerity(d.metadata.Name, roFile)\n\t\t}\n\t}()\n\n\tif !d.skipValidation {\n\t\tmanifestChecksum, err := digest.Parse(d.metadata.Digest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif d.digester.Digest() != manifestChecksum {\n\t\t\treturn fmt.Errorf(\"checksum mismatch for %q (got %q instead of %q)\", d.file.Name(), d.digester.Digest(), manifestChecksum)\n\t\t}\n\t}\n\n\tmode := os.FileMode(d.metadata.Mode)\n\tif d.options.ForceMask != nil {\n\t\tmode = *d.options.ForceMask\n\t}\n\n\treturn setFileAttrs(d.dirfd, d.file, mode, d.metadata, d.options, false)\n}\n\nfunc closeDestinationFiles(files chan *destinationFile, errors chan error) {\n\tfor f := range files {\n\t\terrors <- f.Close()\n\t}\n\tclose(errors)\n}\n\nfunc (c *chunkedDiffer) recordFsVerity(path string, roFile *os.File) error {\n\tif c.useFsVerity == graphdriver.DifferFsVerityDisabled {\n\t\treturn nil\n\t}\n\t// fsverity.EnableVerity doesn't return an error if fs-verity was already\n\t// enabled on the file.\n\terr := fsverity.EnableVerity(path, int(roFile.Fd()))\n\tif err != nil {\n\t\tif c.useFsVerity == graphdriver.DifferFsVerityRequired {\n\t\t\treturn err\n\t\t}\n\n\t\t// If it is not required, ignore the error if the filesystem does not support it.\n\t\tif errors.Is(err, unix.ENOTSUP) || errors.Is(err, unix.ENOTTY) {\n\t\t\treturn nil\n\t\t}\n\t}\n\tverity, err := fsverity.MeasureVerity(path, int(roFile.Fd()))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.fsVerityMutex.Lock()\n\tc.fsVerityDigests[path] = verity\n\tc.fsVerityMutex.Unlock()\n\n\treturn nil\n}\n\nfunc (c *chunkedDiffer) storeMissingFiles(streams chan io.ReadCloser, errs chan error, dirfd int, missingParts []missingPart, options *archive.TarOptions) (Err error) {\n\tvar destFile *destinationFile\n\n\tfilesToClose := make(chan *destinationFile, 3)\n\tcloseFilesErrors := make(chan error, 2)\n\n\tgo closeDestinationFiles(filesToClose, closeFilesErrors)\n\tdefer func() {\n\t\tclose(filesToClose)\n\t\tfor e := range closeFilesErrors {\n\t\t\tif e != nil && Err == nil {\n\t\t\t\tErr = e\n\t\t\t}\n\t\t}\n\t}()\n\n\tfor _, missingPart := range missingParts {\n\t\tvar part io.ReadCloser\n\t\tpartCompression := c.fileType\n\t\treadingFromLocalFile := false\n\t\tswitch {\n\t\tcase missingPart.Hole:\n\t\t\tpartCompression = fileTypeHole\n\t\tcase missingPart.OriginFile != nil:\n\t\t\tvar err error\n\t\t\tpart, err = missingPart.OriginFile.OpenFile()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tpartCompression = fileTypeNoCompression\n\t\t\treadingFromLocalFile = true\n\t\tcase missingPart.SourceChunk != nil:\n\t\t\tselect {\n\t\t\tcase p := <-streams:\n\t\t\t\tpart = p\n\t\t\tcase err := <-errs:\n\t\t\t\tif err == nil {\n\t\t\t\t\treturn errors.New(\"not enough data returned from the server\")\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif part == nil {\n\t\t\t\treturn errors.New(\"invalid stream returned\")\n\t\t\t}\n\t\tdefault:\n\t\t\treturn errors.New(\"internal error: missing part misses both local and remote data stream\")\n\t\t}\n\n\t\tfor _, mf := range missingPart.Chunks {\n\t\t\tif mf.Gap > 0 {\n\t\t\t\tlimitReader := io.LimitReader(part, mf.Gap)\n\t\t\t\t_, err := io.CopyBuffer(io.Discard, limitReader, c.copyBuffer)\n\t\t\t\tif err != nil {\n\t\t\t\t\tErr = err\n\t\t\t\t\tgoto exit\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif mf.File.Name == \"\" {\n\t\t\t\tErr = errors.New(\"file name empty\")\n\t\t\t\tgoto exit\n\t\t\t}\n\n\t\t\tc.rawReader = nil\n\t\t\tif part != nil {\n\t\t\t\tlimit := mf.CompressedSize\n\t\t\t\t// If we are reading from a source file, use the uncompressed size to limit the reader, because\n\t\t\t\t// the compressed size refers to the original layer stream.\n\t\t\t\tif readingFromLocalFile {\n\t\t\t\t\tlimit = mf.UncompressedSize\n\t\t\t\t}\n\t\t\t\tc.rawReader = io.LimitReader(part, limit)\n\t\t\t}\n\n\t\t\tcompression, err := c.prepareCompressedStreamToFile(partCompression, &mf)\n\t\t\tif err != nil {\n\t\t\t\tErr = err\n\t\t\t\tgoto exit\n\t\t\t}\n\n\t\t\t// Open the new file if it is different that what is already\n\t\t\t// opened\n\t\t\tif destFile == nil || destFile.metadata.Name != mf.File.Name {\n\t\t\t\tvar err error\n\t\t\t\tif destFile != nil {\n\t\t\t\tcleanup:\n\t\t\t\t\tfor {\n\t\t\t\t\t\tselect {\n\t\t\t\t\t\tcase err = <-closeFilesErrors:\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tErr = err\n\t\t\t\t\t\t\t\tgoto exit\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak cleanup\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesToClose <- destFile\n\t\t\t\t}\n\t\t\t\trecordFsVerity := c.recordFsVerity\n\t\t\t\tif c.useFsVerity == graphdriver.DifferFsVerityDisabled {\n\t\t\t\t\trecordFsVerity = nil\n\t\t\t\t}\n\t\t\t\tdestFile, err = openDestinationFile(dirfd, mf.File, options, c.skipValidation, recordFsVerity)\n\t\t\t\tif err != nil {\n\t\t\t\t\tErr = err\n\t\t\t\t\tgoto exit\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif err := c.appendCompressedStreamToFile(compression, destFile, mf.UncompressedSize); err != nil {\n\t\t\t\tErr = err\n\t\t\t\tgoto exit\n\t\t\t}\n\t\t\tif c.rawReader != nil {\n\t\t\t\tif _, err := io.CopyBuffer(io.Discard, c.rawReader, c.copyBuffer); err != nil {\n\t\t\t\t\tErr = err\n\t\t\t\t\tgoto exit\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\texit:\n\t\tif part != nil {\n\t\t\tpart.Close()\n\t\t\tif Err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif destFile != nil {\n\t\treturn destFile.Close()\n\t}\n\n\treturn nil\n}\n\nfunc mergeMissingChunks(missingParts []missingPart, target int) []missingPart {\n\tgetGap := func(missingParts []missingPart, i int) uint64 {\n\t\tprev := missingParts[i-1].SourceChunk.Offset + missingParts[i-1].SourceChunk.Length\n\t\treturn missingParts[i].SourceChunk.Offset - prev\n\t}\n\n\t// simple case: merge chunks from the same file.  Useful to reduce the number of parts to work with later.\n\tnewMissingParts := missingParts[0:1]\n\tprevIndex := 0\n\tfor i := 1; i < len(missingParts); i++ {\n\t\tgap := getGap(missingParts, i)\n\t\tif gap == 0 && missingParts[prevIndex].OriginFile == nil &&\n\t\t\tmissingParts[i].OriginFile == nil &&\n\t\t\t!missingParts[prevIndex].Hole && !missingParts[i].Hole &&\n\t\t\tlen(missingParts[prevIndex].Chunks) == 1 && len(missingParts[i].Chunks) == 1 &&\n\t\t\tmissingParts[prevIndex].Chunks[0].File.Name == missingParts[i].Chunks[0].File.Name {\n\t\t\tmissingParts[prevIndex].SourceChunk.Length += gap + missingParts[i].SourceChunk.Length\n\t\t\tmissingParts[prevIndex].Chunks[0].CompressedSize += missingParts[i].Chunks[0].CompressedSize\n\t\t\tmissingParts[prevIndex].Chunks[0].UncompressedSize += missingParts[i].Chunks[0].UncompressedSize\n\t\t} else {\n\t\t\tnewMissingParts = append(newMissingParts, missingParts[i])\n\t\t\tprevIndex++\n\t\t}\n\t}\n\tmissingParts = newMissingParts\n\n\ttype gap struct {\n\t\tfrom int\n\t\tto   int\n\t\tcost uint64\n\t}\n\tvar requestGaps []gap\n\tlastOffset := int(-1)\n\tnumberSourceChunks := 0\n\tfor i, c := range missingParts {\n\t\tif c.OriginFile != nil || c.Hole {\n\t\t\t// it does not require a network request\n\t\t\tcontinue\n\t\t}\n\t\tnumberSourceChunks++\n\t\tif lastOffset >= 0 {\n\t\t\tprevEnd := missingParts[lastOffset].SourceChunk.Offset + missingParts[lastOffset].SourceChunk.Length\n\t\t\tcost := c.SourceChunk.Offset - prevEnd\n\t\t\tg := gap{\n\t\t\t\tfrom: lastOffset,\n\t\t\t\tto:   i,\n\t\t\t\tcost: cost,\n\t\t\t}\n\t\t\trequestGaps = append(requestGaps, g)\n\t\t}\n\t\tlastOffset = i\n\t}\n\tslices.SortFunc(requestGaps, func(a, b gap) int {\n\t\treturn cmp.Compare(a.cost, b.cost)\n\t})\n\ttoMergeMap := make([]bool, len(missingParts))\n\tremainingToMerge := numberSourceChunks - target\n\tfor _, g := range requestGaps {\n\t\tif remainingToMerge < 0 && g.cost > autoMergePartsThreshold {\n\t\t\tcontinue\n\t\t}\n\t\tfor i := g.from + 1; i <= g.to; i++ {\n\t\t\ttoMergeMap[i] = true\n\t\t}\n\t\tremainingToMerge--\n\t}\n\n\tnewMissingParts = missingParts[0:1]\n\tfor i := 1; i < len(missingParts); i++ {\n\t\tif !toMergeMap[i] {\n\t\t\tnewMissingParts = append(newMissingParts, missingParts[i])\n\t\t} else {\n\t\t\tgap := getGap(missingParts, i)\n\t\t\tprev := &newMissingParts[len(newMissingParts)-1]\n\t\t\tprev.SourceChunk.Length += gap + missingParts[i].SourceChunk.Length\n\t\t\tprev.Hole = false\n\t\t\tprev.OriginFile = nil\n\t\t\tif gap > 0 {\n\t\t\t\tgapFile := missingFileChunk{\n\t\t\t\t\tGap: int64(gap),\n\t\t\t\t}\n\t\t\t\tprev.Chunks = append(prev.Chunks, gapFile)\n\t\t\t}\n\t\t\tprev.Chunks = append(prev.Chunks, missingParts[i].Chunks...)\n\t\t}\n\t}\n\treturn newMissingParts\n}\n\nfunc (c *chunkedDiffer) retrieveMissingFiles(stream ImageSourceSeekable, dirfd int, missingParts []missingPart, options *archive.TarOptions) error {\n\tvar chunksToRequest []ImageSourceChunk\n\n\tcalculateChunksToRequest := func() {\n\t\tchunksToRequest = []ImageSourceChunk{}\n\t\tfor _, c := range missingParts {\n\t\t\tif c.OriginFile == nil && !c.Hole {\n\t\t\t\tchunksToRequest = append(chunksToRequest, *c.SourceChunk)\n\t\t\t}\n\t\t}\n\t}\n\n\tmissingParts = mergeMissingChunks(missingParts, maxNumberMissingChunks)\n\tcalculateChunksToRequest()\n\n\t// There are some missing files.  Prepare a multirange request for the missing chunks.\n\tvar streams chan io.ReadCloser\n\tvar err error\n\tvar errs chan error\n\tfor {\n\t\tstreams, errs, err = stream.GetBlobAt(chunksToRequest)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\n\t\tif _, ok := err.(ErrBadRequest); ok {\n\t\t\tif len(chunksToRequest) == 1 {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// Merge more chunks to request\n\t\t\tmissingParts = mergeMissingChunks(missingParts, len(chunksToRequest)/2)\n\t\t\tcalculateChunksToRequest()\n\t\t\tcontinue\n\t\t}\n\t\treturn err\n\t}\n\n\tif err := c.storeMissingFiles(streams, errs, dirfd, missingParts, options); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\ntype hardLinkToCreate struct {\n\tdest     string\n\tdirfd    int\n\tmode     os.FileMode\n\tmetadata *fileMetadata\n}\n\ntype findAndCopyFileOptions struct {\n\tuseHardLinks bool\n\tostreeRepos  []string\n\toptions      *archive.TarOptions\n}\n\nfunc reopenFileReadOnly(f *os.File) (*os.File, error) {\n\tpath := procPathForFile(f)\n\tfd, err := unix.Open(path, unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn nil, &fs.PathError{Op: \"open\", Path: path, Err: err}\n\t}\n\treturn os.NewFile(uintptr(fd), f.Name()), nil\n}\n\nfunc (c *chunkedDiffer) findAndCopyFile(dirfd int, r *fileMetadata, copyOptions *findAndCopyFileOptions, mode os.FileMode) (bool, error) {\n\tfinalizeFile := func(dstFile *os.File) error {\n\t\tif dstFile == nil {\n\t\t\treturn nil\n\t\t}\n\t\terr := setFileAttrs(dirfd, dstFile, mode, r, copyOptions.options, false)\n\t\tif err != nil {\n\t\t\tdstFile.Close()\n\t\t\treturn err\n\t\t}\n\t\tvar roFile *os.File\n\t\tif c.useFsVerity != graphdriver.DifferFsVerityDisabled {\n\t\t\troFile, err = reopenFileReadOnly(dstFile)\n\t\t}\n\t\tdstFile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif roFile == nil {\n\t\t\treturn nil\n\t\t}\n\n\t\tdefer roFile.Close()\n\t\treturn c.recordFsVerity(r.Name, roFile)\n\t}\n\n\tfound, dstFile, _, err := findFileInOtherLayers(c.layersCache, r, dirfd, copyOptions.useHardLinks)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif found {\n\t\tif err := finalizeFile(dstFile); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\treturn true, nil\n\t}\n\n\tfound, dstFile, _, err = findFileInOSTreeRepos(r, copyOptions.ostreeRepos, dirfd, copyOptions.useHardLinks)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif found {\n\t\tif err := finalizeFile(dstFile); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\treturn true, nil\n\t}\n\n\treturn false, nil\n}\n\n// makeEntriesFlat collects regular-file entries from mergedEntries, and produces a new list\n// where each file content is only represented once, and uses composefs.RegularFilePathForValidatedDigest for its name.\n// If flatPathNameMap is not nil, this function writes to it a mapping from filepath.Clean(originalName) to the composefs name.\nfunc makeEntriesFlat(mergedEntries []fileMetadata, flatPathNameMap map[string]string) ([]fileMetadata, error) {\n\tvar new []fileMetadata\n\n\tknownFlatPaths := make(map[string]struct{})\n\tfor i := range mergedEntries {\n\t\tif mergedEntries[i].Type != TypeReg {\n\t\t\tcontinue\n\t\t}\n\t\tif mergedEntries[i].Digest == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"missing digest for %q\", mergedEntries[i].Name)\n\t\t}\n\t\tdigest, err := digest.Parse(mergedEntries[i].Digest)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid digest %q for %q: %w\", mergedEntries[i].Digest, mergedEntries[i].Name, err)\n\t\t}\n\t\tpath, err := path.RegularFilePathForValidatedDigest(digest)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"determining physical file path for %q: %w\", mergedEntries[i].Name, err)\n\t\t}\n\t\tif flatPathNameMap != nil {\n\t\t\tflatPathNameMap[filepath.Clean(mergedEntries[i].Name)] = path\n\t\t}\n\n\t\tif _, known := knownFlatPaths[path]; known {\n\t\t\tcontinue\n\t\t}\n\t\tknownFlatPaths[path] = struct{}{}\n\n\t\tmergedEntries[i].Name = path\n\t\tmergedEntries[i].skipSetAttrs = true\n\n\t\tnew = append(new, mergedEntries[i])\n\t}\n\treturn new, nil\n}\n\ntype streamOrErr struct {\n\tstream io.ReadCloser\n\terr    error\n}\n\n// ensureAllBlobsDone ensures that all blobs are closed and returns the first error encountered.\nfunc ensureAllBlobsDone(streamsOrErrors chan streamOrErr) (retErr error) {\n\tfor soe := range streamsOrErrors {\n\t\tif soe.stream != nil {\n\t\t\t_ = soe.stream.Close()\n\t\t} else if retErr == nil {\n\t\t\tretErr = soe.err\n\t\t}\n\t}\n\treturn retErr\n}\n\n// getBlobAtConverterGoroutine reads from the streams and errs channels, then sends\n// either a stream or an error to the stream channel.  The streams channel is closed when\n// there are no more streams and errors to read.\n// It ensures that no more than maxStreams streams are returned, and that every item from the\n// streams and errs channels is consumed.\nfunc getBlobAtConverterGoroutine(stream chan streamOrErr, streams chan io.ReadCloser, errs chan error, maxStreams int) {\n\ttooManyStreams := false\n\tstreamsSoFar := 0\n\n\terr := errors.New(\"unexpected error in getBlobAtGoroutine\")\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tstream <- streamOrErr{err: err}\n\t\t}\n\t\tclose(stream)\n\t}()\n\nloop:\n\tfor {\n\t\tselect {\n\t\tcase p, ok := <-streams:\n\t\t\tif !ok {\n\t\t\t\tstreams = nil\n\t\t\t\tbreak loop\n\t\t\t}\n\t\t\tif streamsSoFar >= maxStreams {\n\t\t\t\ttooManyStreams = true\n\t\t\t\t_ = p.Close()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tstreamsSoFar++\n\t\t\tstream <- streamOrErr{stream: p}\n\t\tcase err, ok := <-errs:\n\t\t\tif !ok {\n\t\t\t\terrs = nil\n\t\t\t\tbreak loop\n\t\t\t}\n\t\t\tstream <- streamOrErr{err: err}\n\t\t}\n\t}\n\tif streams != nil {\n\t\tfor p := range streams {\n\t\t\tif streamsSoFar >= maxStreams {\n\t\t\t\ttooManyStreams = true\n\t\t\t\t_ = p.Close()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tstreamsSoFar++\n\t\t\tstream <- streamOrErr{stream: p}\n\t\t}\n\t}\n\tif errs != nil {\n\t\tfor err := range errs {\n\t\t\tstream <- streamOrErr{err: err}\n\t\t}\n\t}\n\tif tooManyStreams {\n\t\tstream <- streamOrErr{err: fmt.Errorf(\"too many streams returned, got more than %d\", maxStreams)}\n\t}\n\terr = nil\n}\n\n// getBlobAt provides a much more convenient way to consume data returned by ImageSourceSeekable.GetBlobAt.\n// GetBlobAt returns two channels, forcing a caller to `select` on both of them — and in Go, reading a closed channel\n// always succeeds in select.\n// Instead, getBlobAt provides a single channel with all events, which can be consumed conveniently using `range`.\nfunc getBlobAt(is ImageSourceSeekable, chunksToRequest ...ImageSourceChunk) (chan streamOrErr, error) {\n\tstreams, errs, err := is.GetBlobAt(chunksToRequest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstream := make(chan streamOrErr)\n\tgo getBlobAtConverterGoroutine(stream, streams, errs, len(chunksToRequest))\n\treturn stream, nil\n}\n\nfunc (c *chunkedDiffer) copyAllBlobToFile(destination *os.File) (digest.Digest, error) {\n\tstreamsOrErrors, err := getBlobAt(c.stream, ImageSourceChunk{Offset: 0, Length: uint64(c.blobSize)})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\toriginalRawDigester := digest.Canonical.Digester()\n\tfor soe := range streamsOrErrors {\n\t\tif soe.stream != nil {\n\t\t\tr := io.TeeReader(soe.stream, originalRawDigester.Hash())\n\n\t\t\t// copy the entire tarball and compute its digest\n\t\t\t_, err = io.CopyBuffer(destination, r, c.copyBuffer)\n\t\t\t_ = soe.stream.Close()\n\t\t}\n\t\tif soe.err != nil && err == nil {\n\t\t\terr = soe.err\n\t\t}\n\t}\n\treturn originalRawDigester.Digest(), err\n}\n\nfunc typeToOsMode(typ string) (os.FileMode, error) {\n\tswitch typ {\n\tcase TypeReg, TypeLink:\n\t\treturn 0, nil\n\tcase TypeSymlink:\n\t\treturn os.ModeSymlink, nil\n\tcase TypeDir:\n\t\treturn os.ModeDir, nil\n\tcase TypeChar:\n\t\treturn os.ModeDevice | os.ModeCharDevice, nil\n\tcase TypeBlock:\n\t\treturn os.ModeDevice, nil\n\tcase TypeFifo:\n\t\treturn os.ModeNamedPipe, nil\n\t}\n\treturn 0, fmt.Errorf(\"unknown file type %q\", typ)\n}\n\nfunc (c *chunkedDiffer) ApplyDiff(dest string, options *archive.TarOptions, differOpts *graphdriver.DifferOptions) (graphdriver.DriverWithDifferOutput, error) {\n\tif c.used {\n\t\treturn graphdriver.DriverWithDifferOutput{}, fmt.Errorf(\"internal error: chunked differ already used\")\n\t}\n\tc.used = true\n\n\tdefer c.layersCache.release()\n\tdefer func() {\n\t\tif c.zstdReader != nil {\n\t\t\tc.zstdReader.Close()\n\t\t}\n\t}()\n\n\tc.useFsVerity = differOpts.UseFsVerity\n\n\t// stream to use for reading the zstd:chunked or Estargz file.\n\tstream := c.stream\n\n\tvar compressedDigest digest.Digest\n\tvar uncompressedDigest digest.Digest\n\n\tif c.convertToZstdChunked {\n\t\tfd, err := unix.Open(dest, unix.O_TMPFILE|unix.O_RDWR|unix.O_CLOEXEC, 0o600)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, &fs.PathError{Op: \"open\", Path: dest, Err: err}\n\t\t}\n\t\tblobFile := os.NewFile(uintptr(fd), \"blob-file\")\n\t\tdefer func() {\n\t\t\tif blobFile != nil {\n\t\t\t\tblobFile.Close()\n\t\t\t}\n\t\t}()\n\n\t\t// calculate the checksum before accessing the file.\n\t\tcompressedDigest, err = c.copyAllBlobToFile(blobFile)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t\t}\n\n\t\tif compressedDigest != c.blobDigest {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, fmt.Errorf(\"invalid digest to convert: expected %q, got %q\", c.blobDigest, compressedDigest)\n\t\t}\n\n\t\tif _, err := blobFile.Seek(0, io.SeekStart); err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t\t}\n\n\t\ttarSize, fileSource, diffID, annotations, err := c.convertTarToZstdChunked(dest, blobFile)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t\t}\n\n\t\tc.uncompressedTarSize = tarSize\n\n\t\t// fileSource is a O_TMPFILE file descriptor, so we\n\t\t// need to keep it open until the entire file is processed.\n\t\tdefer fileSource.Close()\n\n\t\t// Close the file so that the file descriptor is released and the file is deleted.\n\t\tblobFile.Close()\n\t\tblobFile = nil\n\n\t\ttocDigest, err := toc.GetTOCDigest(annotations)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, fmt.Errorf(\"internal error: parsing just-created zstd:chunked TOC digest: %w\", err)\n\t\t}\n\t\tif tocDigest == nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, fmt.Errorf(\"internal error: just-created zstd:chunked missing TOC digest\")\n\t\t}\n\t\tmanifest, toc, tarSplit, tocOffset, err := readZstdChunkedManifest(dest, fileSource, *tocDigest, annotations, false)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, fmt.Errorf(\"read zstd:chunked manifest: %w\", err)\n\t\t}\n\n\t\t// Use the new file for accessing the zstd:chunked file.\n\t\tstream = fileSource\n\n\t\t// fill the chunkedDiffer with the data we just read.\n\t\tc.fileType = fileTypeNoCompression\n\t\tc.manifest = manifest\n\t\tc.toc = toc\n\t\tc.tarSplit = tarSplit\n\t\tc.tocOffset = tocOffset\n\n\t\t// the file was generated by us and the digest for each file was already computed, no need to validate it again.\n\t\tc.skipValidation = true\n\t\t// since we retrieved the whole file and it was validated, set the uncompressed digest.\n\t\tuncompressedDigest = diffID\n\t}\n\n\tlcd := chunkedLayerData{\n\t\tFormat: differOpts.Format,\n\t}\n\n\tjson := jsoniter.ConfigCompatibleWithStandardLibrary\n\tlcdBigData, err := json.Marshal(lcd)\n\tif err != nil {\n\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t}\n\n\t// Generate the manifest\n\ttoc := c.toc\n\tif toc == nil {\n\t\ttoc_, err := unmarshalToc(c.manifest)\n\t\tif err != nil {\n\t\t\treturn graphdriver.DriverWithDifferOutput{}, err\n\t\t}\n\t\ttoc = toc_\n\t}\n\n\toutput := graphdriver.DriverWithDifferOutput{\n\t\tDiffer:   c,\n\t\tTarSplit: c.tarSplit,\n\t\tBigData: map[string][]byte{\n\t\t\tbigDataKey:          c.manifest,\n\t\t\tchunkedLayerDataKey: lcdBigData,\n\t\t},\n\t\tArtifacts: map[string]any{\n\t\t\ttocKey: toc,\n\t\t},\n\t\tTOCDigest:          c.tocDigest,\n\t\tUncompressedDigest: uncompressedDigest,\n\t\tCompressedDigest:   compressedDigest,\n\t\tSize:               c.uncompressedTarSize,\n\t}\n\n\twhiteoutConverter := archive.GetWhiteoutConverter(options.WhiteoutFormat, options.WhiteoutData)\n\n\tvar missingParts []missingPart\n\n\tmergedEntries, err := c.mergeTocEntries(c.fileType, toc.Entries)\n\tif err != nil {\n\t\treturn output, err\n\t}\n\n\toutput.UIDs, output.GIDs = collectIDs(mergedEntries)\n\n\tif err := maybeDoIDRemap(mergedEntries, options); err != nil {\n\t\treturn output, err\n\t}\n\n\tif options.ForceMask != nil {\n\t\tuid, gid, mode, err := archive.GetFileOwner(dest)\n\t\tif err == nil {\n\t\t\tvalue := idtools.Stat{\n\t\t\t\tIDs:  idtools.IDPair{UID: int(uid), GID: int(gid)},\n\t\t\t\tMode: os.ModeDir | os.FileMode(mode),\n\t\t\t}\n\t\t\tif err := idtools.SetContainersOverrideXattr(dest, value); err != nil {\n\t\t\t\treturn output, err\n\t\t\t}\n\t\t}\n\t}\n\n\tdirfd, err := unix.Open(dest, unix.O_RDONLY|unix.O_PATH|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn output, &fs.PathError{Op: \"open\", Path: dest, Err: err}\n\t}\n\tdirFile := os.NewFile(uintptr(dirfd), dest)\n\tdefer dirFile.Close()\n\n\tvar flatPathNameMap map[string]string // = nil\n\tif differOpts != nil && differOpts.Format == graphdriver.DifferOutputFormatFlat {\n\t\tflatPathNameMap = map[string]string{}\n\t\tmergedEntries, err = makeEntriesFlat(mergedEntries, flatPathNameMap)\n\t\tif err != nil {\n\t\t\treturn output, err\n\t\t}\n\t\tcreatedDirs := make(map[string]struct{})\n\t\tfor _, e := range mergedEntries {\n\t\t\t// This hard-codes an assumption that RegularFilePathForValidatedDigest creates paths with exactly one directory component.\n\t\t\td := filepath.Dir(e.Name)\n\t\t\tif _, found := createdDirs[d]; !found {\n\t\t\t\tif err := unix.Mkdirat(dirfd, d, 0o755); err != nil {\n\t\t\t\t\treturn output, &fs.PathError{Op: \"mkdirat\", Path: d, Err: err}\n\t\t\t\t}\n\t\t\t\tcreatedDirs[d] = struct{}{}\n\t\t\t}\n\t\t}\n\t}\n\n\t// hardlinks can point to missing files.  So create them after all files\n\t// are retrieved\n\tvar hardLinks []hardLinkToCreate\n\n\tmissingPartsSize, totalChunksSize := int64(0), int64(0)\n\n\tcopyOptions := findAndCopyFileOptions{\n\t\t// When the hard links deduplication is used, file attributes are ignored because setting them\n\t\t// modifies the source file as well.\n\t\tuseHardLinks: c.pullOptions.useHardLinks,\n\t\tostreeRepos:  c.pullOptions.ostreeRepos, // List of OSTree repositories to use for deduplication\n\t\toptions:      options,\n\t}\n\n\ttype copyFileJob struct {\n\t\tnjob     int\n\t\tindex    int\n\t\tmode     os.FileMode\n\t\tmetadata *fileMetadata\n\n\t\tfound bool\n\t\terr   error\n\t}\n\n\tvar wg sync.WaitGroup\n\n\tcopyResults := make([]copyFileJob, len(mergedEntries))\n\n\tcopyFileJobs := make(chan copyFileJob)\n\tdefer func() {\n\t\tif copyFileJobs != nil {\n\t\t\tclose(copyFileJobs)\n\t\t}\n\t\twg.Wait()\n\t}()\n\n\tfor range copyGoRoutines {\n\t\tjobs := copyFileJobs\n\t\twg.Go(func() {\n\t\t\tfor job := range jobs {\n\t\t\t\tfound, err := c.findAndCopyFile(dirfd, job.metadata, &copyOptions, job.mode)\n\t\t\t\tjob.err = err\n\t\t\t\tjob.found = found\n\t\t\t\tcopyResults[job.njob] = job\n\t\t\t}\n\t\t})\n\t}\n\n\tfilesToWaitFor := 0\n\tfor i := range mergedEntries {\n\t\tr := &mergedEntries[i]\n\n\t\tmode := os.FileMode(r.Mode)\n\n\t\tt, err := typeToTarType(r.Type)\n\t\tif err != nil {\n\t\t\treturn output, err\n\t\t}\n\n\t\tsize := r.Size\n\n\t\t// update also the implementation of ForceMask in pkg/archive\n\t\tif options.ForceMask != nil {\n\t\t\tmode = *options.ForceMask\n\n\t\t\t// special files will be stored as regular files\n\t\t\tif t != tar.TypeDir && t != tar.TypeSymlink && t != tar.TypeReg && t != tar.TypeLink {\n\t\t\t\tt = tar.TypeReg\n\t\t\t\tsize = 0\n\t\t\t}\n\n\t\t\t// if the entry will be stored as a directory or a regular file, store in a xattr the original\n\t\t\t// owner and mode.\n\t\t\tif t == tar.TypeDir || t == tar.TypeReg {\n\t\t\t\ttypeMode, err := typeToOsMode(r.Type)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn output, err\n\t\t\t\t}\n\t\t\t\tvalue := idtools.FormatContainersOverrideXattrDevice(r.UID, r.GID, typeMode|fs.FileMode(r.Mode), int(r.Devmajor), int(r.Devminor))\n\t\t\t\tif r.Xattrs == nil {\n\t\t\t\t\tr.Xattrs = make(map[string]string)\n\t\t\t\t}\n\t\t\t\tr.Xattrs[idtools.ContainersOverrideXattr] = base64.StdEncoding.EncodeToString([]byte(value))\n\t\t\t}\n\t\t}\n\n\t\tr.Name = path.CleanAbsPath(r.Name)\n\t\t// do not modify the value of symlinks\n\t\tif r.Linkname != \"\" && t != tar.TypeSymlink {\n\t\t\tr.Linkname = path.CleanAbsPath(r.Linkname)\n\t\t}\n\n\t\tif whiteoutConverter != nil {\n\t\t\thdr := archivetar.Header{\n\t\t\t\tTypeflag: t,\n\t\t\t\tName:     r.Name,\n\t\t\t\tLinkname: r.Linkname,\n\t\t\t\tSize:     size,\n\t\t\t\tMode:     int64(mode),\n\t\t\t\tUid:      r.UID,\n\t\t\t\tGid:      r.GID,\n\t\t\t}\n\t\t\thandler := whiteoutHandler{\n\t\t\t\tDirfd: dirfd,\n\t\t\t\tRoot:  dest,\n\t\t\t}\n\t\t\twriteFile, err := whiteoutConverter.ConvertReadWithHandler(&hdr, r.Name, &handler)\n\t\t\tif err != nil {\n\t\t\t\treturn output, err\n\t\t\t}\n\t\t\tif !writeFile {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tswitch t {\n\t\tcase tar.TypeReg:\n\t\t\t// Create directly empty files.\n\t\t\tif size == 0 {\n\t\t\t\t// Used to have a scope for cleanup.\n\t\t\t\tcreateEmptyFile := func() error {\n\t\t\t\t\tfile, err := openFileUnderRoot(dirfd, r.Name, newFileFlags, 0)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tdefer file.Close()\n\t\t\t\t\tif err := setFileAttrs(dirfd, file, mode, r, options, false); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tif err := createEmptyFile(); err != nil {\n\t\t\t\t\treturn output, err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\tcase tar.TypeDir:\n\t\t\tif r.Name == \"/\" {\n\t\t\t\toutput.RootDirMode = &mode\n\t\t\t}\n\t\t\tif err := safeMkdir(dirfd, mode, r.Name, r, options); err != nil {\n\t\t\t\treturn output, err\n\t\t\t}\n\t\t\tcontinue\n\n\t\tcase tar.TypeLink:\n\t\t\tdest := dest\n\t\t\tdirfd := dirfd\n\t\t\tmode := mode\n\t\t\tr := r\n\t\t\thardLinks = append(hardLinks, hardLinkToCreate{\n\t\t\t\tdest:     dest,\n\t\t\t\tdirfd:    dirfd,\n\t\t\t\tmode:     mode,\n\t\t\t\tmetadata: r,\n\t\t\t})\n\t\t\tcontinue\n\n\t\tcase tar.TypeSymlink:\n\t\t\tif err := safeSymlink(dirfd, r); err != nil {\n\t\t\t\treturn output, err\n\t\t\t}\n\t\t\tcontinue\n\n\t\tcase tar.TypeChar:\n\t\tcase tar.TypeBlock:\n\t\tcase tar.TypeFifo:\n\t\t\t/* Ignore.  */\n\t\tdefault:\n\t\t\treturn output, fmt.Errorf(\"invalid type %q\", t)\n\t\t}\n\n\t\ttotalChunksSize += size\n\n\t\tif t == tar.TypeReg {\n\t\t\tindex := i\n\t\t\tnjob := filesToWaitFor\n\t\t\tjob := copyFileJob{\n\t\t\t\tmode:     mode,\n\t\t\t\tmetadata: &mergedEntries[index],\n\t\t\t\tindex:    index,\n\t\t\t\tnjob:     njob,\n\t\t\t}\n\t\t\tcopyFileJobs <- job\n\t\t\tfilesToWaitFor++\n\t\t}\n\t}\n\n\tclose(copyFileJobs)\n\tcopyFileJobs = nil\n\n\twg.Wait()\n\n\tfor _, res := range copyResults[:filesToWaitFor] {\n\t\tr := &mergedEntries[res.index]\n\n\t\tif res.err != nil {\n\t\t\treturn output, res.err\n\t\t}\n\t\t// the file was already copied to its destination\n\t\t// so nothing left to do.\n\t\tif res.found {\n\t\t\tcontinue\n\t\t}\n\n\t\tmissingPartsSize += r.Size\n\n\t\tremainingSize := r.Size\n\n\t\t// the file is missing, attempt to find individual chunks.\n\t\tfor _, chunk := range r.chunks {\n\t\t\tcompressedSize := chunk.EndOffset - chunk.Offset\n\t\t\tsize := remainingSize\n\t\t\tif chunk.ChunkSize > 0 {\n\t\t\t\tsize = chunk.ChunkSize\n\t\t\t}\n\t\t\tremainingSize = remainingSize - size\n\n\t\t\trawChunk := ImageSourceChunk{\n\t\t\t\tOffset: uint64(chunk.Offset),\n\t\t\t\tLength: uint64(compressedSize),\n\t\t\t}\n\t\t\tfile := missingFileChunk{\n\t\t\t\tFile:             &mergedEntries[res.index],\n\t\t\t\tCompressedSize:   compressedSize,\n\t\t\t\tUncompressedSize: size,\n\t\t\t}\n\t\t\tmp := missingPart{\n\t\t\t\tSourceChunk: &rawChunk,\n\t\t\t\tChunks: []missingFileChunk{\n\t\t\t\t\tfile,\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tswitch chunk.ChunkType {\n\t\t\tcase minimal.ChunkTypeData:\n\t\t\t\troot, path, offset, err := c.layersCache.findChunkInOtherLayers(chunk)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn output, err\n\t\t\t\t}\n\t\t\t\tif offset >= 0 && validateChunkChecksum(chunk, root, path, offset, c.copyBuffer) {\n\t\t\t\t\tmissingPartsSize -= size\n\t\t\t\t\tmp.OriginFile = &originFile{\n\t\t\t\t\t\tRoot:   root,\n\t\t\t\t\t\tPath:   path,\n\t\t\t\t\t\tOffset: offset,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase minimal.ChunkTypeZeros:\n\t\t\t\tmissingPartsSize -= size\n\t\t\t\tmp.Hole = true\n\t\t\t\t// Mark all chunks belonging to the missing part as holes\n\t\t\t\tfor i := range mp.Chunks {\n\t\t\t\t\tmp.Chunks[i].Hole = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tmissingParts = append(missingParts, mp)\n\t\t}\n\t}\n\t// There are some missing files.  Prepare a multirange request for the missing chunks.\n\tif len(missingParts) > 0 {\n\t\tif err := c.retrieveMissingFiles(stream, dirfd, missingParts, options); err != nil {\n\t\t\treturn output, err\n\t\t}\n\t}\n\n\tfor _, m := range hardLinks {\n\t\tif err := safeLink(m.dirfd, m.mode, m.metadata, options); err != nil {\n\t\t\treturn output, err\n\t\t}\n\t}\n\n\t// To ensure that consumers of the layer who decompress and read the full tar stream,\n\t// and consumers who consume the data via the TOC, both see exactly the same data and metadata,\n\t// compute the UncompressedDigest.\n\t// c/image will then ensure that this value matches the value in the image config’s RootFS.DiffID, i.e. the image must commit\n\t// to one UncompressedDigest value for each layer, and that will avoid the ambiguity (in consumers who validate layers against DiffID).\n\t//\n\t// c/image also uses the UncompressedDigest as a layer ID, allowing it to use the traditional layer and image IDs.\n\t//\n\t// This is, sadly, quite costly: Up to now we might have only have had to write, and digest, only the new/modified files.\n\t// Here we need to read, and digest, the whole layer, even if almost all of it was already present locally previously.\n\t// So, really specialized (EXTREMELY RARE) users can opt out of this check using insecureAllowUnpredictableImageContents .\n\t//\n\t// Layers without a tar-split (estargz layers and old zstd:chunked layers) can't produce an UncompressedDigest that\n\t// matches the expected RootFS.DiffID; we always fall back to full pulls, again unless the user opts out\n\t// via insecureAllowUnpredictableImageContents .\n\tif output.UncompressedDigest == \"\" {\n\t\tswitch {\n\t\tcase c.pullOptions.insecureAllowUnpredictableImageContents:\n\t\t\t// Oh well.  Skip the costly digest computation.\n\t\tcase output.TarSplit != nil:\n\t\t\tif _, err := output.TarSplit.Seek(0, io.SeekStart); err != nil {\n\t\t\t\treturn output, err\n\t\t\t}\n\t\t\tmetadata := tsStorage.NewJSONUnpacker(output.TarSplit)\n\t\t\tfg := newStagedFileGetter(dirFile, flatPathNameMap)\n\t\t\tdigester := digest.Canonical.Digester()\n\t\t\tif err := asm.WriteOutputTarStream(fg, metadata, digester.Hash()); err != nil {\n\t\t\t\treturn output, fmt.Errorf(\"digesting staged uncompressed stream: %w\", err)\n\t\t\t}\n\t\t\toutput.UncompressedDigest = digester.Digest()\n\t\tdefault:\n\t\t\t// We are checking for this earlier in NewDiffer, so this should not be reachable.\n\t\t\treturn output, fmt.Errorf(`internal error: layer's UncompressedDigest is unknown and \"insecure_allow_unpredictable_image_contents\" is not set`)\n\t\t}\n\t}\n\n\tif totalChunksSize > 0 {\n\t\tlogrus.Debugf(\"Missing %d bytes out of %d (%.2f %%)\", missingPartsSize, totalChunksSize, float32(missingPartsSize*100.0)/float32(totalChunksSize))\n\t}\n\n\toutput.Artifacts[fsVerityDigestsKey] = c.fsVerityDigests\n\n\t// on success steal the reference to the tarSplit file\n\tc.tarSplit = nil\n\n\treturn output, nil\n}\n\nfunc mustSkipFile(fileType compressedFileType, e minimal.FileMetadata) bool {\n\t// ignore the metadata files for the estargz format.\n\tif fileType != fileTypeEstargz {\n\t\treturn false\n\t}\n\tswitch e.Name {\n\t// ignore the metadata files for the estargz format.\n\tcase estargz.PrefetchLandmark, estargz.NoPrefetchLandmark, estargz.TOCTarName:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (c *chunkedDiffer) mergeTocEntries(fileType compressedFileType, entries []minimal.FileMetadata) ([]fileMetadata, error) {\n\tcountNextChunks := func(start int) int {\n\t\tcount := 0\n\t\tfor _, e := range entries[start:] {\n\t\t\tif e.Type != TypeChunk {\n\t\t\t\treturn count\n\t\t\t}\n\t\t\tcount++\n\t\t}\n\t\treturn count\n\t}\n\n\tsize := 0\n\tfor _, entry := range entries {\n\t\tif mustSkipFile(fileType, entry) {\n\t\t\tcontinue\n\t\t}\n\t\tif entry.Type != TypeChunk {\n\t\t\tsize++\n\t\t}\n\t}\n\n\tmergedEntries := make([]fileMetadata, size)\n\tm := 0\n\tfor i := 0; i < len(entries); i++ {\n\t\te := fileMetadata{FileMetadata: entries[i]}\n\t\tif mustSkipFile(fileType, entries[i]) {\n\t\t\tcontinue\n\t\t}\n\n\t\tif e.Type == TypeChunk {\n\t\t\treturn nil, fmt.Errorf(\"chunk type without a regular file\")\n\t\t}\n\n\t\tif e.Type == TypeReg {\n\t\t\tnChunks := countNextChunks(i + 1)\n\n\t\t\te.chunks = make([]*minimal.FileMetadata, nChunks+1)\n\t\t\tfor j := 0; j <= nChunks; j++ {\n\t\t\t\t// we need a copy here, otherwise we override the\n\t\t\t\t// .Size later\n\t\t\t\tcopy := entries[i+j]\n\t\t\t\te.chunks[j] = &copy\n\t\t\t\te.EndOffset = entries[i+j].EndOffset\n\t\t\t}\n\t\t\ti += nChunks\n\t\t}\n\t\tmergedEntries[m] = e\n\t\tm++\n\t}\n\t// stargz/estargz doesn't store EndOffset so let's calculate it here\n\tlastOffset := c.tocOffset\n\tfor i := len(mergedEntries) - 1; i >= 0; i-- {\n\t\tif mergedEntries[i].EndOffset == 0 {\n\t\t\tmergedEntries[i].EndOffset = lastOffset\n\t\t}\n\t\tif mergedEntries[i].Offset != 0 {\n\t\t\tlastOffset = mergedEntries[i].Offset\n\t\t}\n\n\t\tlastChunkOffset := mergedEntries[i].EndOffset\n\t\tfor j := len(mergedEntries[i].chunks) - 1; j >= 0; j-- {\n\t\t\tmergedEntries[i].chunks[j].EndOffset = lastChunkOffset\n\t\t\tmergedEntries[i].chunks[j].Size = mergedEntries[i].chunks[j].EndOffset - mergedEntries[i].chunks[j].Offset\n\t\t\tlastChunkOffset = mergedEntries[i].chunks[j].Offset\n\t\t}\n\t}\n\treturn mergedEntries, nil\n}\n\n// validateChunkChecksum checks if the file at $root/$path[offset:chunk.ChunkSize] has the\n// same digest as chunk.ChunkDigest\nfunc validateChunkChecksum(chunk *minimal.FileMetadata, root, path string, offset int64, copyBuffer []byte) bool {\n\tparentDirfd, err := unix.Open(root, unix.O_PATH|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn false\n\t}\n\tdefer unix.Close(parentDirfd)\n\n\tfd, err := openFileUnderRoot(parentDirfd, path, unix.O_RDONLY|unix.O_CLOEXEC, 0)\n\tif err != nil {\n\t\treturn false\n\t}\n\tdefer fd.Close()\n\n\tif _, err := fd.Seek(offset, io.SeekStart); err != nil {\n\t\treturn false\n\t}\n\n\tr := io.LimitReader(fd, chunk.ChunkSize)\n\tdigester := digest.Canonical.Digester()\n\n\tif _, err := io.CopyBuffer(digester.Hash(), r, copyBuffer); err != nil {\n\t\treturn false\n\t}\n\n\tdigest, err := digest.Parse(chunk.ChunkDigest)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn digester.Digest() == digest\n}\n\n// newStagedFileGetter returns an object usable as storage.FileGetter for rootDir.\n// if flatPathNameMap is not nil, it must be used to map logical file names into the backing file paths.\nfunc newStagedFileGetter(rootDir *os.File, flatPathNameMap map[string]string) *stagedFileGetter {\n\treturn &stagedFileGetter{\n\t\trootDir:         rootDir,\n\t\tflatPathNameMap: flatPathNameMap,\n\t}\n}\n\ntype stagedFileGetter struct {\n\trootDir         *os.File\n\tflatPathNameMap map[string]string // nil, or a map from filepath.Clean()ed tar file names to expected on-filesystem names\n}\n\nfunc (fg *stagedFileGetter) Get(filename string) (io.ReadCloser, error) {\n\tif fg.flatPathNameMap != nil {\n\t\tpath, ok := fg.flatPathNameMap[filepath.Clean(filename)]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"no path mapping exists for tar entry %q\", filename)\n\t\t}\n\t\tfilename = path\n\t}\n\tpathFD, err := pathrs.OpenatInRoot(fg.rootDir, filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer pathFD.Close()\n\treturn pathrs.Reopen(pathFD, unix.O_RDONLY)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/storage_unsupported.go",
    "content": "//go:build !linux\n\npackage chunked\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\tstorage \"go.podman.io/storage\"\n\tgraphdriver \"go.podman.io/storage/drivers\"\n)\n\n// NewDiffer returns a differ than can be used with [Store.PrepareStagedLayer].\n// The caller must call Close() on the returned Differ.\nfunc NewDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (graphdriver.Differ, error) {\n\treturn nil, newErrFallbackToOrdinaryLayerDownload(errors.New(\"format not supported on this system\"))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/chunked/toc/toc.go",
    "content": "package toc\n\nimport (\n\t\"errors\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"go.podman.io/storage/pkg/chunked/internal/minimal\"\n)\n\n// ChunkedAnnotations contains various annotations that might be set or used by the pkg/chunked-supported\n// compression formats.\n//\n// This set does not define their semantics in detail as a public API.\n// The _only_ intended use of this set is: code that _changes_ layer compression to a format\n// which is not chunked can/should remove these annotations.\nvar ChunkedAnnotations = map[string]struct{}{\n\tminimal.ManifestChecksumKey: {},\n\tminimal.ManifestInfoKey:     {},\n\tminimal.TarSplitInfoKey:     {},\n\tminimal.TarSplitChecksumKey: {}, //nolint:staticcheck // The field is deprecated, so removing it when changing compressionn is all the more desirable.\n\ttocJSONDigestAnnotation:     {},\n}\n\n// tocJSONDigestAnnotation is the annotation key for the digest of the estargz\n// TOC JSON.\n// It is defined in github.com/containerd/stargz-snapshotter/estargz as TOCJSONDigestAnnotation\n// Duplicate it here to avoid a dependency on the package.\nconst tocJSONDigestAnnotation = \"containerd.io/snapshot/stargz/toc.digest\"\n\n// GetTOCDigest returns the digest of the TOC as recorded in the annotations.\n// This function retrieves a digest that represents the content of a\n// table of contents (TOC) from the image's annotations.\n// This is an experimental feature and may be changed/removed in the future.\nfunc GetTOCDigest(annotations map[string]string) (*digest.Digest, error) {\n\td1, ok1 := annotations[tocJSONDigestAnnotation]\n\td2, ok2 := annotations[minimal.ManifestChecksumKey]\n\tswitch {\n\tcase ok1 && ok2:\n\t\treturn nil, errors.New(\"both zstd:chunked and eStargz TOC found\")\n\tcase ok1:\n\t\td, err := digest.Parse(d1)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &d, nil\n\tcase ok2:\n\t\td, err := digest.Parse(d2)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn &d, nil\n\tdefault:\n\t\treturn nil, nil\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/config/config.go",
    "content": "package config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\ntype BtrfsOptionsConfig struct {\n\t// MinSpace is the minimal spaces allocated to the device\n\tMinSpace string `toml:\"min_space,omitempty\"`\n\t// Size\n\tSize string `toml:\"size,omitempty\"`\n}\n\ntype OverlayOptionsConfig struct {\n\t// IgnoreChownErrors is a flag for whether chown errors should be\n\t// ignored when building an image.\n\tIgnoreChownErrors string `toml:\"ignore_chown_errors,omitempty\"`\n\t// MountOpt specifies extra mount options used when mounting\n\tMountOpt string `toml:\"mountopt,omitempty\"`\n\t// Alternative program to use for the mount of the file system\n\tMountProgram string `toml:\"mount_program,omitempty\"`\n\t// Size\n\tSize string `toml:\"size,omitempty\"`\n\t// Inodes is used to set a maximum inodes of the container image.\n\tInodes string `toml:\"inodes,omitempty\"`\n\t// Do not create a bind mount on the storage home\n\tSkipMountHome string `toml:\"skip_mount_home,omitempty\"`\n\t// Specify whether composefs must be used to mount the data layers\n\tUseComposefs string `toml:\"use_composefs,omitempty\"`\n\t// ForceMask indicates the permissions mask (e.g. \"0755\") to use for new\n\t// files and directories\n\tForceMask string `toml:\"force_mask,omitempty\"`\n}\n\ntype VfsOptionsConfig struct {\n\t// IgnoreChownErrors is a flag for whether chown errors should be\n\t// ignored when building an image.\n\tIgnoreChownErrors string `toml:\"ignore_chown_errors,omitempty\"`\n}\n\ntype ZfsOptionsConfig struct {\n\t// MountOpt specifies extra mount options used when mounting\n\tMountOpt string `toml:\"mountopt,omitempty\"`\n\t// Name is the File System name of the ZFS File system\n\tName string `toml:\"fsname,omitempty\"`\n\t// Size\n\tSize string `toml:\"size,omitempty\"`\n}\n\n// OptionsConfig represents the \"storage.options\" TOML config table.\ntype OptionsConfig struct {\n\t// AdditionalImagesStores is the location of additional read/only\n\t// Image stores.  Usually used to access Networked File System\n\t// for shared image content\n\tAdditionalImageStores []string `toml:\"additionalimagestores,omitempty\"`\n\n\t// ImageStore is the location of image store which is separated from the\n\t// container store. Usually this is not recommended unless users wants\n\t// separate store for image and containers.\n\tImageStore string `toml:\"imagestore,omitempty\"`\n\n\t// AdditionalLayerStores is the location of additional read/only\n\t// Layer stores.  Usually used to access Networked File System\n\t// for shared image content\n\t// This API is experimental and can be changed without bumping the\n\t// major version number.\n\tAdditionalLayerStores []string `toml:\"additionallayerstores,omitempty\"`\n\n\t// Size\n\tSize string `toml:\"size,omitempty\"`\n\n\t// IgnoreChownErrors is a flag for whether chown errors should be\n\t// ignored when building an image.\n\tIgnoreChownErrors string `toml:\"ignore_chown_errors,omitempty\"`\n\n\t// Specify whether composefs must be used to mount the data layers\n\tUseComposefs string `toml:\"use_composefs,omitempty\"`\n\n\t// ForceMask indicates the permissions mask (e.g. \"0755\") to use for new\n\t// files and directories.\n\tForceMask os.FileMode `toml:\"force_mask,omitempty\"`\n\n\t// RootAutoUsernsUser is the name of one or more entries in /etc/subuid and\n\t// /etc/subgid which should be used to set up automatically a userns.\n\tRootAutoUsernsUser string `toml:\"root-auto-userns-user,omitempty\"`\n\n\t// AutoUsernsMinSize is the minimum size for a user namespace that is\n\t// created automatically.\n\tAutoUsernsMinSize uint32 `toml:\"auto-userns-min-size,omitempty\"`\n\n\t// AutoUsernsMaxSize is the maximum size for a user namespace that is\n\t// created automatically.\n\tAutoUsernsMaxSize uint32 `toml:\"auto-userns-max-size,omitempty\"`\n\n\t// Btrfs container options to be handed to btrfs drivers\n\tBtrfs struct{ BtrfsOptionsConfig } `toml:\"btrfs,omitempty\"`\n\n\t// Thinpool container options to be handed to thinpool drivers (NOP)\n\tThinpool struct{} `toml:\"thinpool,omitempty\"`\n\n\t// Overlay container options to be handed to overlay drivers\n\tOverlay struct{ OverlayOptionsConfig } `toml:\"overlay,omitempty\"`\n\n\t// Vfs container options to be handed to VFS drivers\n\tVfs struct{ VfsOptionsConfig } `toml:\"vfs,omitempty\"`\n\n\t// Zfs container options to be handed to ZFS drivers\n\tZfs struct{ ZfsOptionsConfig } `toml:\"zfs,omitempty\"`\n\n\t// Do not create a bind mount on the storage home\n\tSkipMountHome string `toml:\"skip_mount_home,omitempty\"`\n\n\t// Alternative program to use for the mount of the file system\n\tMountProgram string `toml:\"mount_program,omitempty\"`\n\n\t// MountOpt specifies extra mount options used when mounting\n\tMountOpt string `toml:\"mountopt,omitempty\"`\n\n\t// PullOptions specifies options to be handed to pull managers\n\t// This API is experimental and can be changed without bumping the major version number.\n\tPullOptions map[string]string `toml:\"pull_options,omitempty\"`\n\n\t// DisableVolatile doesn't allow volatile mounts when it is set.\n\tDisableVolatile bool `toml:\"disable-volatile,omitempty\"`\n}\n\n// GetGraphDriverOptions returns the driver specific options\nfunc GetGraphDriverOptions(driverName string, options OptionsConfig) []string {\n\tvar doptions []string\n\tswitch driverName {\n\tcase \"btrfs\":\n\t\tif options.Btrfs.MinSpace != \"\" {\n\t\t\treturn append(doptions, fmt.Sprintf(\"%s.min_space=%s\", driverName, options.Btrfs.MinSpace))\n\t\t}\n\t\tif options.Btrfs.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Btrfs.Size))\n\t\t} else if options.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Size))\n\t\t}\n\n\tcase \"overlay\", \"overlay2\":\n\t\t// Specify whether composefs must be used to mount the data layers\n\t\tif options.Overlay.IgnoreChownErrors != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.ignore_chown_errors=%s\", driverName, options.Overlay.IgnoreChownErrors))\n\t\t} else if options.IgnoreChownErrors != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.ignore_chown_errors=%s\", driverName, options.IgnoreChownErrors))\n\t\t}\n\t\tif options.Overlay.MountProgram != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mount_program=%s\", driverName, options.Overlay.MountProgram))\n\t\t} else if options.MountProgram != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mount_program=%s\", driverName, options.MountProgram))\n\t\t}\n\t\tif options.Overlay.MountOpt != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mountopt=%s\", driverName, options.Overlay.MountOpt))\n\t\t} else if options.MountOpt != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mountopt=%s\", driverName, options.MountOpt))\n\t\t}\n\t\tif options.Overlay.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Overlay.Size))\n\t\t} else if options.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Size))\n\t\t}\n\t\tif options.Overlay.Inodes != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.inodes=%s\", driverName, options.Overlay.Inodes))\n\t\t}\n\t\tif options.Overlay.SkipMountHome != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.skip_mount_home=%s\", driverName, options.Overlay.SkipMountHome))\n\t\t} else if options.SkipMountHome != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.skip_mount_home=%s\", driverName, options.SkipMountHome))\n\t\t}\n\t\tif options.Overlay.ForceMask != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.force_mask=%s\", driverName, options.Overlay.ForceMask))\n\t\t} else if options.ForceMask != 0 {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.force_mask=%s\", driverName, options.ForceMask))\n\t\t}\n\t\tif options.Overlay.UseComposefs != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.use_composefs=%s\", driverName, options.Overlay.UseComposefs))\n\t\t}\n\tcase \"vfs\":\n\t\tif options.Vfs.IgnoreChownErrors != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.ignore_chown_errors=%s\", driverName, options.Vfs.IgnoreChownErrors))\n\t\t} else if options.IgnoreChownErrors != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.ignore_chown_errors=%s\", driverName, options.IgnoreChownErrors))\n\t\t}\n\n\tcase \"zfs\":\n\t\tif options.Zfs.Name != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.fsname=%s\", driverName, options.Zfs.Name))\n\t\t}\n\t\tif options.Zfs.MountOpt != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mountopt=%s\", driverName, options.Zfs.MountOpt))\n\t\t} else if options.MountOpt != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.mountopt=%s\", driverName, options.MountOpt))\n\t\t}\n\t\tif options.Zfs.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Zfs.Size))\n\t\t} else if options.Size != \"\" {\n\t\t\tdoptions = append(doptions, fmt.Sprintf(\"%s.size=%s\", driverName, options.Size))\n\t\t}\n\t}\n\treturn doptions\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/directory/directory.go",
    "content": "package directory\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// DiskUsage is a structure that describes the disk usage (size and inode count)\n// of a particular directory.\ntype DiskUsage struct {\n\tSize       int64\n\tInodeCount int64\n}\n\n// MoveToSubdir moves all contents of a directory to a subdirectory underneath the original path\nfunc MoveToSubdir(oldpath, subdir string) error {\n\tinfos, err := os.ReadDir(oldpath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, info := range infos {\n\t\tif info.Name() != subdir {\n\t\t\toldName := filepath.Join(oldpath, info.Name())\n\t\t\tnewName := filepath.Join(oldpath, subdir, info.Name())\n\t\t\tif err := os.Rename(oldName, newName); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/directory/directory_unix.go",
    "content": "//go:build !windows\n\npackage directory\n\nimport (\n\t\"errors\"\n\t\"io/fs\"\n\t\"path/filepath\"\n\t\"syscall\"\n)\n\n// Size walks a directory tree and returns its total size in bytes.\nfunc Size(dir string) (size int64, err error) {\n\tusage, err := Usage(dir)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn usage.Size, nil\n}\n\n// Usage walks a directory tree and returns its total size in bytes and the number of inodes.\nfunc Usage(dir string) (*DiskUsage, error) {\n\tusage := &DiskUsage{}\n\tdata := make(map[uint64]struct{})\n\terr := filepath.WalkDir(dir, func(d string, entry fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\t// if dir does not exist, Usage() returns the error.\n\t\t\t// if dir/x disappeared while walking, Usage() ignores dir/x.\n\t\t\tif errors.Is(err, fs.ErrNotExist) && d != dir {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tfileInfo, err := entry.Info()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\t// Check inode to only count the sizes of files with multiple hard links once.\n\t\tinode := fileInfo.Sys().(*syscall.Stat_t).Ino\n\t\tif _, exists := data[inode]; exists {\n\t\t\treturn nil\n\t\t}\n\n\t\tdata[inode] = struct{}{}\n\t\t// Ignore directory sizes\n\t\tif entry.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\tusage.Size += fileInfo.Size()\n\n\t\treturn nil\n\t})\n\t// inode count is the number of unique inode numbers we saw\n\tusage.InodeCount = int64(len(data))\n\treturn usage, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/directory/directory_windows.go",
    "content": "//go:build windows\n\npackage directory\n\nimport (\n\t\"errors\"\n\t\"io/fs\"\n\t\"path/filepath\"\n)\n\n// Size walks a directory tree and returns its total size in bytes\nfunc Size(dir string) (size int64, err error) {\n\tusage, err := Usage(dir)\n\tif err != nil {\n\t\treturn 0, nil\n\t}\n\treturn usage.Size, nil\n}\n\n// Usage walks a directory tree and returns its total size in bytes and the number of inodes.\nfunc Usage(dir string) (*DiskUsage, error) {\n\tusage := &DiskUsage{}\n\terr := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\t// if dir does not exist, Size() returns the error.\n\t\t\t// if dir/x disappeared while walking, Size() ignores dir/x.\n\t\t\tif errors.Is(err, fs.ErrNotExist) && path != dir {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tusage.InodeCount++\n\n\t\t// Ignore directory sizes\n\t\tif d.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\tfileInfo, err := d.Info()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, fs.ErrNotExist) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tusage.Size += fileInfo.Size()\n\n\t\treturn nil\n\t})\n\treturn usage, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/exists_freebsd.go",
    "content": "package fileutils\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Exists checks whether a file or directory exists at the given path.\n// If the path is a symlink, the symlink is followed.\nfunc Exists(path string) error {\n\t// It uses unix.Faccessat which is a faster operation compared to os.Stat for\n\t// simply checking the existence of a file.\n\terr := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, 0)\n\tif err != nil {\n\t\treturn &os.PathError{Op: \"faccessat\", Path: path, Err: err}\n\t}\n\treturn nil\n}\n\n// Lexists checks whether a file or directory exists at the given path.\n// If the path is a symlink, the symlink itself is checked.\nfunc Lexists(path string) error {\n\t// FreeBSD before 15.0 does not support the AT_SYMLINK_NOFOLLOW flag for\n\t// faccessat. In this case, the call to faccessat will return EINVAL and\n\t// we fall back to using Lstat.\n\terr := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW)\n\tif err != nil {\n\t\tif errors.Is(err, syscall.EINVAL) {\n\t\t\t_, err = os.Lstat(path)\n\t\t\treturn err\n\t\t}\n\t\treturn &os.PathError{Op: \"faccessat\", Path: path, Err: err}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/exists_unix.go",
    "content": "//go:build !windows && !freebsd\n\npackage fileutils\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Exists checks whether a file or directory exists at the given path.\n// If the path is a symlink, the symlink is followed.\nfunc Exists(path string) error {\n\t// It uses unix.Faccessat which is a faster operation compared to os.Stat for\n\t// simply checking the existence of a file.\n\terr := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, unix.AT_EACCESS)\n\tif err != nil {\n\t\treturn &os.PathError{Op: \"faccessat\", Path: path, Err: err}\n\t}\n\treturn nil\n}\n\n// Lexists checks whether a file or directory exists at the given path.\n// If the path is a symlink, the symlink itself is checked.\nfunc Lexists(path string) error {\n\t// It uses unix.Faccessat which is a faster operation compared to os.Stat for\n\t// simply checking the existence of a file.\n\terr := unix.Faccessat(unix.AT_FDCWD, path, unix.F_OK, unix.AT_SYMLINK_NOFOLLOW|unix.AT_EACCESS)\n\tif err != nil {\n\t\treturn &os.PathError{Op: \"faccessat\", Path: path, Err: err}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/exists_windows.go",
    "content": "package fileutils\n\nimport (\n\t\"os\"\n)\n\n// Exists checks whether a file or directory exists at the given path.\nfunc Exists(path string) error {\n\t_, err := os.Stat(path)\n\treturn err\n}\n\n// Lexists checks whether a file or directory exists at the given path, without\n// resolving symlinks\nfunc Lexists(path string) error {\n\t_, err := os.Lstat(path)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/fileutils.go",
    "content": "package fileutils\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"text/scanner\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// PatternMatcher allows checking paths against a list of patterns\ntype PatternMatcher struct {\n\tpatterns   []*Pattern\n\texclusions bool\n}\n\n// NewPatternMatcher creates a new matcher object for specific patterns that can\n// be used later to match against patterns against paths\nfunc NewPatternMatcher(patterns []string) (*PatternMatcher, error) {\n\tpm := &PatternMatcher{\n\t\tpatterns: make([]*Pattern, 0, len(patterns)),\n\t}\n\tfor _, p := range patterns {\n\t\t// Eliminate leading and trailing whitespace.\n\t\tp = strings.TrimSpace(p)\n\t\tif p == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tp = filepath.Clean(p)\n\t\tnewp := &Pattern{}\n\t\tif p[0] == '!' {\n\t\t\tif len(p) == 1 {\n\t\t\t\treturn nil, errors.New(\"illegal exclusion pattern: \\\"!\\\"\")\n\t\t\t}\n\t\t\tnewp.exclusion = true\n\t\t\tp = strings.TrimPrefix(filepath.Clean(p[1:]), \"/\")\n\t\t\tpm.exclusions = true\n\t\t}\n\t\t// Do some syntax checking on the pattern.\n\t\t// filepath's Match() has some really weird rules that are inconsistent\n\t\t// so instead of trying to dup their logic, just call Match() for its\n\t\t// error state and if there is an error in the pattern return it.\n\t\t// If this becomes an issue we can remove this since its really only\n\t\t// needed in the error (syntax) case - which isn't really critical.\n\t\tif _, err := filepath.Match(p, \".\"); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnewp.cleanedPattern = p\n\t\tpm.patterns = append(pm.patterns, newp)\n\t}\n\treturn pm, nil\n}\n\n// Deprecated: Please use the `MatchesResult` method instead.\n// Matches matches path against all the patterns. Matches is not safe to be\n// called concurrently\nfunc (pm *PatternMatcher) Matches(file string) (bool, error) {\n\tmatched := false\n\tfile = filepath.FromSlash(file)\n\n\tfor _, pattern := range pm.patterns {\n\t\tnegative := false\n\n\t\tif pattern.exclusion {\n\t\t\tnegative = true\n\t\t}\n\n\t\tmatch, err := pattern.match(file)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\n\t\tif match {\n\t\t\tmatched = !negative\n\t\t}\n\t}\n\n\tif matched {\n\t\tlogrus.Debugf(\"Skipping excluded path: %s\", file)\n\t}\n\n\treturn matched, nil\n}\n\ntype MatchResult struct {\n\tisMatched         bool\n\tmatches, excludes uint\n}\n\n// Excludes returns true if the overall result is matched\nfunc (m *MatchResult) IsMatched() bool {\n\treturn m.isMatched\n}\n\n// Excludes returns the amount of matches of an MatchResult\nfunc (m *MatchResult) Matches() uint {\n\treturn m.matches\n}\n\n// Excludes returns the amount of excludes of an MatchResult\nfunc (m *MatchResult) Excludes() uint {\n\treturn m.excludes\n}\n\n// MatchesResult verifies the provided filepath against all patterns.\n// It returns the `*MatchResult` result for the patterns on success, otherwise\n// an error. This method is not safe to be called concurrently.\nfunc (pm *PatternMatcher) MatchesResult(file string) (res *MatchResult, err error) {\n\tfile = filepath.FromSlash(file)\n\tres = &MatchResult{false, 0, 0}\n\n\tfor _, pattern := range pm.patterns {\n\t\tnegative := false\n\n\t\tif pattern.exclusion {\n\t\t\tnegative = true\n\t\t}\n\n\t\tmatch, err := pattern.match(file)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tif match {\n\t\t\tres.isMatched = !negative\n\t\t\tif negative {\n\t\t\t\tres.excludes++\n\t\t\t} else {\n\t\t\t\tres.matches++\n\t\t\t}\n\t\t}\n\t}\n\n\tif res.matches > 0 {\n\t\tlogrus.Debugf(\"Skipping excluded path: %s\", file)\n\t}\n\n\treturn res, nil\n}\n\n// IsMatch verifies the provided filepath against all patterns and returns true\n// if it matches. A match is valid if the last match is a positive one.\n// It returns an error on failure and is not safe to be called concurrently.\nfunc (pm *PatternMatcher) IsMatch(file string) (matched bool, err error) {\n\tres, err := pm.MatchesResult(file)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn res.isMatched, nil\n}\n\n// Exclusions returns true if any of the patterns define exclusions\nfunc (pm *PatternMatcher) Exclusions() bool {\n\treturn pm.exclusions\n}\n\n// Patterns returns array of active patterns\nfunc (pm *PatternMatcher) Patterns() []*Pattern {\n\treturn pm.patterns\n}\n\n// Pattern defines a single regexp used to filter file paths.\ntype Pattern struct {\n\tcleanedPattern string\n\tregexp         *regexp.Regexp\n\texclusion      bool\n}\n\nfunc (p *Pattern) String() string {\n\treturn p.cleanedPattern\n}\n\n// Exclusion returns true if this pattern defines exclusion\nfunc (p *Pattern) Exclusion() bool {\n\treturn p.exclusion\n}\n\nfunc (p *Pattern) match(path string) (bool, error) {\n\tif p.regexp == nil {\n\t\tif err := p.compile(); err != nil {\n\t\t\treturn false, filepath.ErrBadPattern\n\t\t}\n\t}\n\n\tb := p.regexp.MatchString(path)\n\n\treturn b, nil\n}\n\nfunc (p *Pattern) compile() error {\n\tvar regStrBuilder strings.Builder\n\tregStrBuilder.WriteString(\"^\")\n\n\tpattern := p.cleanedPattern\n\t// Go through the pattern and convert it to a regexp.\n\t// We use a scanner so we can support utf-8 chars.\n\tvar scan scanner.Scanner\n\tscan.Init(strings.NewReader(pattern))\n\n\tsl := string(os.PathSeparator)\n\tescSL := sl\n\tconst bs = `\\`\n\tif sl == bs {\n\t\tescSL += bs\n\t}\n\n\tfor scan.Peek() != scanner.EOF {\n\t\tch := scan.Next()\n\n\t\tif ch == '*' {\n\t\t\tif scan.Peek() == '*' {\n\t\t\t\t// is some flavor of \"**\"\n\t\t\t\tscan.Next()\n\n\t\t\t\t// Treat **/ as ** so eat the \"/\"\n\t\t\t\tif string(scan.Peek()) == sl {\n\t\t\t\t\tscan.Next()\n\t\t\t\t}\n\n\t\t\t\tif scan.Peek() == scanner.EOF {\n\t\t\t\t\t// is \"**EOF\" - to align with .gitignore just accept all\n\t\t\t\t\tregStrBuilder.WriteString(\".*\")\n\t\t\t\t} else {\n\t\t\t\t\t// is \"**\"\n\t\t\t\t\t// Note that this allows for any # of /'s (even 0) because\n\t\t\t\t\t// the .* will eat everything, even /'s\n\t\t\t\t\tregStrBuilder.WriteString(\"(.*\")\n\t\t\t\t\tregStrBuilder.WriteString(escSL)\n\t\t\t\t\tregStrBuilder.WriteString(\")?\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// is \"*\" so map it to anything but \"/\"\n\t\t\t\tregStrBuilder.WriteString(\"[^\")\n\t\t\t\tregStrBuilder.WriteString(escSL)\n\t\t\t\tregStrBuilder.WriteString(\"]*\")\n\t\t\t}\n\t\t} else if ch == '?' {\n\t\t\t// \"?\" is any char except \"/\"\n\t\t\tregStrBuilder.WriteString(\"[^\")\n\t\t\tregStrBuilder.WriteString(escSL)\n\t\t\tregStrBuilder.WriteString(\"]\")\n\t\t} else if ch == '.' || ch == '$' {\n\t\t\t// Escape some regexp special chars that have no meaning\n\t\t\t// in golang's filepath.Match\n\t\t\tregStrBuilder.WriteString(bs)\n\t\t\tregStrBuilder.WriteRune(ch)\n\t\t} else if ch == '\\\\' {\n\t\t\t// escape next char.\n\t\t\tif sl == bs {\n\t\t\t\t// On windows map \"\\\" to \"\\\\\", meaning an escaped backslash,\n\t\t\t\t// and then just continue because filepath.Match on\n\t\t\t\t// Windows doesn't allow escaping at all\n\t\t\t\tregStrBuilder.WriteString(escSL)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif scan.Peek() != scanner.EOF {\n\t\t\t\tregStrBuilder.WriteString(bs)\n\t\t\t\tregStrBuilder.WriteRune(scan.Next())\n\t\t\t} else {\n\t\t\t\treturn filepath.ErrBadPattern\n\t\t\t}\n\t\t} else {\n\t\t\tregStrBuilder.WriteRune(ch)\n\t\t}\n\t}\n\n\tregStrBuilder.WriteString(\"(\")\n\tregStrBuilder.WriteString(escSL)\n\tregStrBuilder.WriteString(\".*)?$\")\n\n\tre, err := regexp.Compile(regStrBuilder.String())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tp.regexp = re\n\treturn nil\n}\n\n// Matches returns true if file matches any of the patterns\n// and isn't excluded by any of the subsequent patterns.\nfunc Matches(file string, patterns []string) (bool, error) {\n\tpm, err := NewPatternMatcher(patterns)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tfile = filepath.Clean(file)\n\n\tif file == \".\" {\n\t\t// Don't let them exclude everything, kind of silly.\n\t\treturn false, nil\n\t}\n\n\treturn pm.IsMatch(file)\n}\n\n// CopyFile copies from src to dst until either EOF is reached\n// on src or an error occurs. It verifies src exists and removes\n// the dst if it exists.\nfunc CopyFile(src, dst string) (int64, error) {\n\tcleanSrc := filepath.Clean(src)\n\tcleanDst := filepath.Clean(dst)\n\tif cleanSrc == cleanDst {\n\t\treturn 0, nil\n\t}\n\tsf, err := os.Open(cleanSrc)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer sf.Close()\n\tif err := os.Remove(cleanDst); err != nil && !os.IsNotExist(err) {\n\t\treturn 0, err\n\t}\n\tdf, err := os.Create(cleanDst)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer df.Close()\n\treturn io.Copy(df, sf)\n}\n\n// ReadSymlinkedDirectory returns the target directory of a symlink.\n// The target of the symbolic link may not be a file.\nfunc ReadSymlinkedDirectory(path string) (string, error) {\n\tvar realPath string\n\tvar err error\n\tif realPath, err = filepath.Abs(path); err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to get absolute path for %s: %w\", path, err)\n\t}\n\tif realPath, err = filepath.EvalSymlinks(realPath); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to canonicalise path for %s: %w\", path, err)\n\t}\n\trealPathInfo, err := os.Stat(realPath)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to stat target '%s' of '%s': %w\", realPath, path, err)\n\t}\n\tif !realPathInfo.Mode().IsDir() {\n\t\treturn \"\", fmt.Errorf(\"canonical path points to a file '%s'\", realPath)\n\t}\n\treturn realPath, nil\n}\n\n// ReadSymlinkedPath returns the target directory of a symlink.\n// The target of the symbolic link can be a file and a directory.\nfunc ReadSymlinkedPath(path string) (realPath string, err error) {\n\tif realPath, err = filepath.Abs(path); err != nil {\n\t\treturn \"\", fmt.Errorf(\"unable to get absolute path for %q: %w\", path, err)\n\t}\n\tif realPath, err = filepath.EvalSymlinks(realPath); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to canonicalise path for %q: %w\", path, err)\n\t}\n\tif err := Exists(realPath); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to stat target %q of %q: %w\", realPath, path, err)\n\t}\n\treturn realPath, nil\n}\n\n// CreateIfNotExists creates a file or a directory only if it does not already exist.\nfunc CreateIfNotExists(path string, isDir bool) error {\n\tif err := Exists(path); err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tif isDir {\n\t\t\t\treturn os.MkdirAll(path, 0o755)\n\t\t\t}\n\t\t\tif err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tf, err := os.OpenFile(path, os.O_CREATE, 0o755)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tf.Close()\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/fileutils_darwin.go",
    "content": "package fileutils\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// GetTotalUsedFds returns the number of used File Descriptors by\n// executing `lsof -p PID`\nfunc GetTotalUsedFds() int {\n\tpid := os.Getpid()\n\n\tcmd := exec.Command(\"lsof\", \"-p\", strconv.Itoa(pid))\n\n\toutput, err := cmd.CombinedOutput()\n\tif err != nil {\n\t\treturn -1\n\t}\n\n\toutputStr := strings.TrimSpace(string(output))\n\n\tfds := strings.Split(outputStr, \"\\n\")\n\n\treturn len(fds) - 1\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/fileutils_solaris.go",
    "content": "package fileutils\n\n// GetTotalUsedFds Returns the number of used File Descriptors.\n// On Solaris these limits are per process and not systemwide\nfunc GetTotalUsedFds() int {\n\treturn -1\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/fileutils_unix.go",
    "content": "//go:build linux || freebsd\n\npackage fileutils\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\n// GetTotalUsedFds Returns the number of used File Descriptors by\n// reading it via /proc filesystem.\nfunc GetTotalUsedFds() int {\n\tif fds, err := os.ReadDir(fmt.Sprintf(\"/proc/%d/fd\", os.Getpid())); err != nil {\n\t\tlogrus.Errorf(\"%v\", err)\n\t} else {\n\t\treturn len(fds)\n\t}\n\treturn -1\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/fileutils_windows.go",
    "content": "package fileutils\n\n// GetTotalUsedFds Returns the number of used File Descriptors. Not supported\n// on Windows.\nfunc GetTotalUsedFds() int {\n\treturn -1\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/reflink_linux.go",
    "content": "package fileutils\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// ReflinkOrCopy attempts to reflink the source to the destination fd.\n// If reflinking fails or is unsupported, it falls back to io.Copy().\nfunc ReflinkOrCopy(src, dst *os.File) error {\n\terr := unix.IoctlFileClone(int(dst.Fd()), int(src.Fd()))\n\tif err == nil {\n\t\treturn nil\n\t}\n\n\t_, err = io.Copy(dst, src)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fileutils/reflink_unsupported.go",
    "content": "//go:build !linux\n\npackage fileutils\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\n// ReflinkOrCopy attempts to reflink the source to the destination fd.\n// If reflinking fails or is unsupported, it falls back to io.Copy().\nfunc ReflinkOrCopy(src, dst *os.File) error {\n\t_, err := io.Copy(dst, src)\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fsutils/fsutils_linux.go",
    "content": "//go:build linux\n\npackage fsutils\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc locateDummyIfEmpty(path string) (string, error) {\n\tchildren, err := os.ReadDir(path)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif len(children) != 0 {\n\t\treturn \"\", nil\n\t}\n\tdummyFile, err := os.CreateTemp(path, \"fsutils-dummy\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tname := dummyFile.Name()\n\terr = dummyFile.Close()\n\treturn name, err\n}\n\n// SupportsDType returns whether the filesystem mounted on path supports d_type\nfunc SupportsDType(path string) (bool, error) {\n\t// locate dummy so that we have at least one dirent\n\tdummy, err := locateDummyIfEmpty(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif dummy != \"\" {\n\t\tdefer os.Remove(dummy)\n\t}\n\n\tvisited := 0\n\tsupportsDType := true\n\tfn := func(ent *unix.Dirent) bool {\n\t\tvisited++\n\t\tif ent.Type == unix.DT_UNKNOWN {\n\t\t\tsupportsDType = false\n\t\t\t// stop iteration\n\t\t\treturn true\n\t\t}\n\t\t// continue iteration\n\t\treturn false\n\t}\n\tif err = iterateReadDir(path, fn); err != nil {\n\t\treturn false, err\n\t}\n\tif visited == 0 {\n\t\treturn false, fmt.Errorf(\"did not hit any dirent during iteration %s\", path)\n\t}\n\treturn supportsDType, nil\n}\n\nfunc iterateReadDir(path string, fn func(*unix.Dirent) bool) error {\n\td, err := os.Open(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer d.Close()\n\tfd := int(d.Fd())\n\tbuf := make([]byte, 4096)\n\tfor {\n\t\tnbytes, err := unix.ReadDirent(fd, buf)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif nbytes == 0 {\n\t\t\tbreak\n\t\t}\n\t\tfor off := 0; off < nbytes; {\n\t\t\tent := (*unix.Dirent)(unsafe.Pointer(&buf[off]))\n\t\t\tif stop := fn(ent); stop {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\toff += int(ent.Reclen)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fsverity/fsverity_linux.go",
    "content": "package fsverity\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// verityDigest struct represents the digest used for verifying the integrity of a file.\ntype verityDigest struct {\n\tFsv unix.FsverityDigest\n\tBuf [64]byte\n}\n\n// EnableVerity enables the verity feature on a file represented by the file descriptor 'fd'.  The file must be opened\n// in read-only mode.\n// The 'description' parameter is a human-readable description of the file.\nfunc EnableVerity(description string, fd int) error {\n\tenableArg := unix.FsverityEnableArg{\n\t\tVersion:        1,\n\t\tHash_algorithm: unix.FS_VERITY_HASH_ALG_SHA256,\n\t\tBlock_size:     4096,\n\t}\n\n\t_, _, e1 := syscall.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(unix.FS_IOC_ENABLE_VERITY), uintptr(unsafe.Pointer(&enableArg)))\n\tif e1 != 0 && !errors.Is(e1, unix.EEXIST) {\n\t\treturn fmt.Errorf(\"failed to enable verity for %q: %w\", description, e1)\n\t}\n\treturn nil\n}\n\n// MeasureVerity measures and returns the verity digest for the file represented by 'fd'.\n// The 'description' parameter is a human-readable description of the file.\nfunc MeasureVerity(description string, fd int) (string, error) {\n\tvar digest verityDigest\n\tdigest.Fsv.Size = 64\n\t_, _, e1 := syscall.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(unix.FS_IOC_MEASURE_VERITY), uintptr(unsafe.Pointer(&digest)))\n\tif e1 != 0 {\n\t\treturn \"\", fmt.Errorf(\"failed to measure verity for %q: %w\", description, e1)\n\t}\n\treturn fmt.Sprintf(\"%x\", digest.Buf[:digest.Fsv.Size]), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/fsverity/fsverity_unsupported.go",
    "content": "//go:build !linux\n\npackage fsverity\n\nimport (\n\t\"fmt\"\n)\n\n// EnableVerity enables the verity feature on a file represented by the file descriptor 'fd'.  The file must be opened\n// in read-only mode.\n// The 'description' parameter is a human-readable description of the file.\nfunc EnableVerity(description string, fd int) error {\n\treturn fmt.Errorf(\"fs-verity is not supported on this platform\")\n}\n\n// MeasureVerity measures and returns the verity digest for the file represented by 'fd'.\n// The 'description' parameter is a human-readable description of the file.\nfunc MeasureVerity(description string, fd int) (string, error) {\n\treturn \"\", fmt.Errorf(\"fs-verity is not supported on this platform\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/homedir/homedir.go",
    "content": "package homedir\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// GetDataHome returns XDG_DATA_HOME.\n// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc GetDataHome() (string, error) {\n\tif xdgDataHome := os.Getenv(\"XDG_DATA_HOME\"); xdgDataHome != \"\" {\n\t\treturn xdgDataHome, nil\n\t}\n\thome := Get()\n\tif home == \"\" {\n\t\treturn \"\", errors.New(\"could not get either XDG_DATA_HOME or HOME\")\n\t}\n\treturn filepath.Join(home, \".local\", \"share\"), nil\n}\n\n// GetCacheHome returns XDG_CACHE_HOME.\n// GetCacheHome returns $HOME/.cache and nil error if XDG_CACHE_HOME is not set.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc GetCacheHome() (string, error) {\n\tif xdgCacheHome := os.Getenv(\"XDG_CACHE_HOME\"); xdgCacheHome != \"\" {\n\t\treturn xdgCacheHome, nil\n\t}\n\thome := Get()\n\tif home == \"\" {\n\t\treturn \"\", errors.New(\"could not get either XDG_CACHE_HOME or HOME\")\n\t}\n\treturn filepath.Join(home, \".cache\"), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/homedir/homedir_unix.go",
    "content": "//go:build !windows\n\npackage homedir\n\n// Copyright 2013-2018 Docker, Inc.\n// NOTE: this package has originally been copied from github.com/docker/docker.\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\n// Key returns the env var name for the user's home dir based on\n// the platform being run on\nfunc Key() string {\n\treturn \"HOME\"\n}\n\n// Get returns the home directory of the current user with the help of\n// environment variables depending on the target operating system.\n// Returned path should be used with \"path/filepath\" to form new paths.\n//\n// If linking statically with cgo enabled against glibc, ensure the\n// osusergo build tag is used.\n//\n// If needing to do nss lookups, do not disable cgo or set osusergo.\nfunc Get() string {\n\thomedir, _ := unshare.HomeDir()\n\treturn homedir\n}\n\n// GetShortcutString returns the string that is shortcut to user's home directory\n// in the native shell of the platform running on.\nfunc GetShortcutString() string {\n\treturn \"~\"\n}\n\n// StickRuntimeDirContents sets the sticky bit on files that are under\n// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system.\n//\n// StickyRuntimeDir returns slice of sticked files.\n// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc StickRuntimeDirContents(files []string) ([]string, error) {\n\truntimeDir, err := GetRuntimeDir()\n\tif err != nil {\n\t\t// ignore error if runtimeDir is empty\n\t\treturn nil, nil //nolint: nilerr\n\t}\n\truntimeDir, err = filepath.Abs(runtimeDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar sticked []string\n\tfor _, f := range files {\n\t\tf, err = filepath.Abs(f)\n\t\tif err != nil {\n\t\t\treturn sticked, err\n\t\t}\n\t\tif strings.HasPrefix(f, runtimeDir+\"/\") {\n\t\t\tif err = stick(f); err != nil {\n\t\t\t\treturn sticked, err\n\t\t\t}\n\t\t\tsticked = append(sticked, f)\n\t\t}\n\t}\n\treturn sticked, nil\n}\n\nfunc stick(f string) error {\n\tst, err := os.Stat(f)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm := st.Mode()\n\tm |= os.ModeSticky\n\treturn os.Chmod(f, m)\n}\n\nvar (\n\trootlessConfigHomeDirError error\n\trootlessConfigHomeDirOnce  sync.Once\n\trootlessConfigHomeDir      string\n\trootlessRuntimeDirOnce     sync.Once\n\trootlessRuntimeDir         string\n)\n\n// isWriteableOnlyByOwner checks that the specified permission mask allows write\n// access only to the owner.\nfunc isWriteableOnlyByOwner(perm os.FileMode) bool {\n\treturn (perm & 0o722) == 0o700\n}\n\n// GetConfigHome returns XDG_CONFIG_HOME.\n// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc GetConfigHome() (string, error) {\n\trootlessConfigHomeDirOnce.Do(func() {\n\t\tcfgHomeDir := os.Getenv(\"XDG_CONFIG_HOME\")\n\t\tif cfgHomeDir == \"\" {\n\t\t\thome := Get()\n\t\t\tresolvedHome, err := filepath.EvalSymlinks(home)\n\t\t\tif err != nil {\n\t\t\t\trootlessConfigHomeDirError = fmt.Errorf(\"cannot resolve %s: %w\", home, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttmpDir := filepath.Join(resolvedHome, \".config\")\n\t\t\t_ = os.MkdirAll(tmpDir, 0o700)\n\t\t\tst, err := os.Stat(tmpDir)\n\t\t\tif err != nil {\n\t\t\t\trootlessConfigHomeDirError = err\n\t\t\t\treturn\n\t\t\t} else if int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() {\n\t\t\t\tcfgHomeDir = tmpDir\n\t\t\t} else {\n\t\t\t\trootlessConfigHomeDirError = fmt.Errorf(\"path %q exists and it is not owned by the current user\", tmpDir)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\trootlessConfigHomeDir = cfgHomeDir\n\t})\n\n\treturn rootlessConfigHomeDir, rootlessConfigHomeDirError\n}\n\n// GetRuntimeDir returns a directory suitable to store runtime files.\n// The function will try to use the XDG_RUNTIME_DIR env variable if it is set.\n// XDG_RUNTIME_DIR is typically configured via pam_systemd.\n// If XDG_RUNTIME_DIR is not set, GetRuntimeDir will try to find a suitable\n// directory for the current user.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc GetRuntimeDir() (string, error) {\n\tvar rootlessRuntimeDirError error\n\n\trootlessRuntimeDirOnce.Do(func() {\n\t\truntimeDir := os.Getenv(\"XDG_RUNTIME_DIR\")\n\n\t\tif runtimeDir != \"\" {\n\t\t\trootlessRuntimeDir, rootlessRuntimeDirError = filepath.EvalSymlinks(runtimeDir)\n\t\t\treturn\n\t\t}\n\n\t\tuid := strconv.Itoa(unshare.GetRootlessUID())\n\t\tif runtimeDir == \"\" {\n\t\t\ttmpDir := filepath.Join(\"/run\", \"user\", uid)\n\t\t\tif err := os.MkdirAll(tmpDir, 0o700); err != nil {\n\t\t\t\tlogrus.Debug(err)\n\t\t\t}\n\t\t\tst, err := os.Lstat(tmpDir)\n\t\t\tif err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && isWriteableOnlyByOwner(st.Mode().Perm()) {\n\t\t\t\truntimeDir = tmpDir\n\t\t\t}\n\t\t}\n\t\tif runtimeDir == \"\" {\n\t\t\ttmpDir := filepath.Join(os.TempDir(), fmt.Sprintf(\"storage-run-%s\", uid))\n\t\t\tif err := os.MkdirAll(tmpDir, 0o700); err != nil {\n\t\t\t\tlogrus.Debug(err)\n\t\t\t}\n\t\t\tst, err := os.Lstat(tmpDir)\n\t\t\tif err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && isWriteableOnlyByOwner(st.Mode().Perm()) {\n\t\t\t\truntimeDir = tmpDir\n\t\t\t} else {\n\t\t\t\trootlessRuntimeDirError = fmt.Errorf(\"path %q exists and it is not writeable only by the current user\", tmpDir)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\trootlessRuntimeDir = runtimeDir\n\t})\n\n\treturn rootlessRuntimeDir, rootlessRuntimeDirError\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/homedir/homedir_windows.go",
    "content": "package homedir\n\n// Copyright 2013-2018 Docker, Inc.\n// NOTE: this package has originally been copied from github.com/docker/docker.\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// Key returns the env var name for the user's home dir based on\n// the platform being run on\nfunc Key() string {\n\treturn \"USERPROFILE\"\n}\n\n// Get returns the home directory of the current user with the help of\n// environment variables depending on the target operating system.\n// Returned path should be used with \"path/filepath\" to form new paths.\nfunc Get() string {\n\thome := os.Getenv(Key())\n\tif home != \"\" {\n\t\treturn home\n\t}\n\thome, _ = os.UserHomeDir()\n\treturn home\n}\n\n// GetConfigHome returns the home directory of the current user with the help of\n// environment variables depending on the target operating system.\n// Returned path should be used with \"path/filepath\" to form new paths.\nfunc GetConfigHome() (string, error) {\n\treturn filepath.Join(Get(), \".config\"), nil\n}\n\n// GetShortcutString returns the string that is shortcut to user's home directory\n// in the native shell of the platform running on.\nfunc GetShortcutString() string {\n\treturn \"%USERPROFILE%\" // be careful while using in format functions\n}\n\n// StickRuntimeDirContents is a no-op on Windows\nfunc StickRuntimeDirContents(files []string) ([]string, error) {\n\treturn nil, nil\n}\n\n// GetRuntimeDir returns a directory suitable to store runtime files.\n// The function will try to use the XDG_RUNTIME_DIR env variable if it is set.\n// XDG_RUNTIME_DIR is typically configured via pam_systemd.\n// If XDG_RUNTIME_DIR is not set, GetRuntimeDir will try to find a suitable\n// directory for the current user.\n//\n// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html\nfunc GetRuntimeDir() (string, error) {\n\tdata, err := GetDataHome()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\truntimeDir := filepath.Join(data, \"containers\", \"storage\")\n\treturn runtimeDir, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idmap/idmapped_utils.go",
    "content": "//go:build linux\n\npackage idmap\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"runtime\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// CreateIDMappedMount creates a IDMapped bind mount from SOURCE to TARGET using the user namespace\n// for the PID process.\nfunc CreateIDMappedMount(source, target string, pid int) error {\n\tpath := fmt.Sprintf(\"/proc/%d/ns/user\", pid)\n\tuserNsFile, err := os.Open(path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to get user ns file descriptor for %q: %w\", path, err)\n\t}\n\tdefer userNsFile.Close()\n\n\ttargetDirFd, err := unix.OpenTree(unix.AT_FDCWD, source, unix.OPEN_TREE_CLONE)\n\tif err != nil {\n\t\treturn &os.PathError{Op: \"open_tree\", Path: source, Err: err}\n\t}\n\tdefer unix.Close(targetDirFd)\n\n\tif err := unix.MountSetattr(targetDirFd, \"\", unix.AT_EMPTY_PATH|unix.AT_RECURSIVE,\n\t\t&unix.MountAttr{\n\t\t\tAttr_set:    unix.MOUNT_ATTR_IDMAP,\n\t\t\tUserns_fd:   uint64(userNsFile.Fd()),\n\t\t\tPropagation: unix.MS_PRIVATE,\n\t\t}); err != nil {\n\t\treturn &os.PathError{Op: \"mount_setattr\", Path: source, Err: err}\n\t}\n\tif err := os.Mkdir(target, 0o700); err != nil && !errors.Is(err, fs.ErrExist) {\n\t\treturn err\n\t}\n\n\tif err := unix.MoveMount(targetDirFd, \"\", 0, target, unix.MOVE_MOUNT_F_EMPTY_PATH); err != nil {\n\t\treturn &os.PathError{Op: \"move_mount\", Path: target, Err: err}\n\t}\n\treturn nil\n}\n\n// CreateUsernsProcess forks the current process and creates a user namespace using the specified\n// mappings.  It returns the pid of the new process.\nfunc CreateUsernsProcess(uidMaps []idtools.IDMap, gidMaps []idtools.IDMap) (int, func(), error) {\n\tvar pid uintptr\n\tvar err syscall.Errno\n\n\tif runtime.GOARCH == \"s390x\" {\n\t\tpid, _, err = syscall.Syscall6(uintptr(unix.SYS_CLONE), 0, unix.CLONE_NEWUSER|uintptr(unix.SIGCHLD), 0, 0, 0, 0)\n\t} else {\n\t\tpid, _, err = syscall.Syscall6(uintptr(unix.SYS_CLONE), unix.CLONE_NEWUSER|uintptr(unix.SIGCHLD), 0, 0, 0, 0, 0)\n\t}\n\tif err != 0 {\n\t\treturn -1, nil, err\n\t}\n\tif pid == 0 {\n\t\t_ = unix.Prctl(unix.PR_SET_PDEATHSIG, uintptr(unix.SIGKILL), 0, 0, 0)\n\t\t// just wait for the SIGKILL\n\t\tfor {\n\t\t\t_ = syscall.Pause()\n\t\t}\n\t}\n\tcleanupFunc := func() {\n\t\terr1 := unix.Kill(int(pid), unix.SIGKILL)\n\t\tif err1 != nil && err1 != syscall.ESRCH {\n\t\t\tlogrus.Warnf(\"kill process pid: %d with SIGKILL ended with error: %v\", int(pid), err1)\n\t\t}\n\t\tif err1 != nil {\n\t\t\treturn\n\t\t}\n\t\tif _, err := unix.Wait4(int(pid), nil, 0, nil); err != nil {\n\t\t\tlogrus.Warnf(\"wait4 pid: %d ended with error: %v\", int(pid), err)\n\t\t}\n\t}\n\twriteMappings := func(fname string, idmap []idtools.IDMap) error {\n\t\tmappings := \"\"\n\t\tfor _, m := range idmap {\n\t\t\tmappings = mappings + fmt.Sprintf(\"%d %d %d\\n\", m.ContainerID, m.HostID, m.Size)\n\t\t}\n\t\treturn os.WriteFile(fmt.Sprintf(\"/proc/%d/%s\", pid, fname), []byte(mappings), 0o600)\n\t}\n\tif err := writeMappings(\"uid_map\", uidMaps); err != nil {\n\t\tcleanupFunc()\n\t\treturn -1, nil, err\n\t}\n\tif err := writeMappings(\"gid_map\", gidMaps); err != nil {\n\t\tcleanupFunc()\n\t\treturn -1, nil, err\n\t}\n\n\treturn int(pid), cleanupFunc, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idmap/idmapped_utils_unsupported.go",
    "content": "//go:build !linux\n\npackage idmap\n\nimport (\n\t\"fmt\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\n// CreateIDMappedMount creates a IDMapped bind mount from SOURCE to TARGET using the user namespace\n// for the PID process.\nfunc CreateIDMappedMount(source, target string, pid int) error {\n\treturn fmt.Errorf(\"IDMapped mounts are not supported\")\n}\n\n// CreateUsernsProcess forks the current process and creates a user namespace using the specified\n// mappings.  It returns the pid of the new process.\nfunc CreateUsernsProcess(uidMaps []idtools.IDMap, gidMaps []idtools.IDMap) (int, func(), error) {\n\treturn -1, nil, fmt.Errorf(\"IDMapped mounts are not supported\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/idtools.go",
    "content": "package idtools\n\nimport (\n\t\"bufio\"\n\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/user\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\n// IDMap contains a single entry for user namespace range remapping. An array\n// of IDMap entries represents the structure that will be provided to the Linux\n// kernel for creating a user namespace.\ntype IDMap struct {\n\tContainerID int `json:\"container_id\"`\n\tHostID      int `json:\"host_id\"`\n\tSize        int `json:\"size\"`\n}\n\ntype subIDRange struct {\n\tStart  int\n\tLength int\n}\n\nfunc compareRanges(a, b subIDRange) int {\n\treturn cmp.Compare(a.Start, b.Start)\n}\n\nconst (\n\tsubuidFileName          string = \"/etc/subuid\"\n\tsubgidFileName          string = \"/etc/subgid\"\n\tContainersOverrideXattr        = \"user.containers.override_stat\"\n)\n\n// MkdirAllAs creates a directory (include any along the path) and then modifies\n// ownership to the requested uid/gid.  If the directory already exists, this\n// function will still change ownership to the requested uid/gid pair.\n//\n// Deprecated: Use MkdirAllAndChown\nfunc MkdirAllAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {\n\treturn MkdirAllAndChown(path, mode, IDPair{UID: ownerUID, GID: ownerGID})\n}\n\n// MkdirAs creates a directory and then modifies ownership to the requested uid/gid.\n// If the directory already exists, this function still changes ownership\n//\n// Deprecated: Use MkdirAndChown with a IDPair\nfunc MkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int) error {\n\treturn MkdirAndChown(path, mode, IDPair{UID: ownerUID, GID: ownerGID})\n}\n\n// MkdirAllAndChown creates a directory (include any along the path) and then modifies\n// ownership to the requested uid/gid.  If the directory already exists, this\n// function will still change ownership to the requested uid/gid pair.\nfunc MkdirAllAndChown(path string, mode os.FileMode, ids IDPair) error {\n\treturn mkdirAs(path, mode, ids.UID, ids.GID, true, true)\n}\n\n// MkdirAndChown creates a directory and then modifies ownership to the requested uid/gid.\n// If the directory already exists, this function still changes ownership\nfunc MkdirAndChown(path string, mode os.FileMode, ids IDPair) error {\n\treturn mkdirAs(path, mode, ids.UID, ids.GID, false, true)\n}\n\n// MkdirAllAndChownNew creates a directory (include any along the path) and then modifies\n// ownership ONLY of newly created directories to the requested uid/gid. If the\n// directories along the path exist, no change of ownership will be performed\nfunc MkdirAllAndChownNew(path string, mode os.FileMode, ids IDPair) error {\n\treturn mkdirAs(path, mode, ids.UID, ids.GID, true, false)\n}\n\n// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.\n// If the maps are empty, then the root uid/gid will default to \"real\" 0/0\nfunc GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {\n\tvar uid, gid int\n\tvar err error\n\tif len(uidMap) == 1 && uidMap[0].Size == 1 {\n\t\tuid = uidMap[0].HostID\n\t} else {\n\t\tuid, err = RawToHost(0, uidMap)\n\t\tif err != nil {\n\t\t\treturn -1, -1, err\n\t\t}\n\t}\n\tif len(gidMap) == 1 && gidMap[0].Size == 1 {\n\t\tgid = gidMap[0].HostID\n\t} else {\n\t\tgid, err = RawToHost(0, gidMap)\n\t\tif err != nil {\n\t\t\treturn -1, -1, err\n\t\t}\n\t}\n\treturn uid, gid, nil\n}\n\n// RawToContainer takes an id mapping, and uses it to translate a host ID to\n// the remapped ID. If no map is provided, then the translation assumes a\n// 1-to-1 mapping and returns the passed in id.\n//\n// If you wish to map a (uid,gid) combination you should use the corresponding\n// IDMappings methods, which ensure that you are mapping the correct ID against\n// the correct mapping.\nfunc RawToContainer(hostID int, idMap []IDMap) (int, error) {\n\tif idMap == nil {\n\t\treturn hostID, nil\n\t}\n\tfor _, m := range idMap {\n\t\tif (hostID >= m.HostID) && (hostID <= (m.HostID + m.Size - 1)) {\n\t\t\tcontID := m.ContainerID + (hostID - m.HostID)\n\t\t\treturn contID, nil\n\t\t}\n\t}\n\treturn -1, fmt.Errorf(\"host ID %d cannot be mapped to a container ID\", hostID)\n}\n\n// RawToHost takes an id mapping and a remapped ID, and translates the ID to\n// the mapped host ID. If no map is provided, then the translation assumes a\n// 1-to-1 mapping and returns the passed in id.\n//\n// If you wish to map a (uid,gid) combination you should use the corresponding\n// IDMappings methods, which ensure that you are mapping the correct ID against\n// the correct mapping.\nfunc RawToHost(contID int, idMap []IDMap) (int, error) {\n\tif idMap == nil {\n\t\treturn contID, nil\n\t}\n\tfor _, m := range idMap {\n\t\tif (contID >= m.ContainerID) && (contID <= (m.ContainerID + m.Size - 1)) {\n\t\t\thostID := m.HostID + (contID - m.ContainerID)\n\t\t\treturn hostID, nil\n\t\t}\n\t}\n\treturn -1, fmt.Errorf(\"container ID %d cannot be mapped to a host ID\", contID)\n}\n\n// IDPair is a UID and GID pair\ntype IDPair struct {\n\tUID int\n\tGID int\n}\n\n// IDMappings contains a mappings of UIDs and GIDs\ntype IDMappings struct {\n\tuids []IDMap\n\tgids []IDMap\n}\n\n// NewIDMappings takes a requested user and group name and\n// using the data from /etc/sub{uid,gid} ranges, creates the\n// proper uid and gid remapping ranges for that user/group pair\nfunc NewIDMappings(username, groupname string) (*IDMappings, error) {\n\tsubuidRanges, err := readSubuid(username)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsubgidRanges, err := readSubgid(groupname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(subuidRanges) == 0 {\n\t\treturn nil, fmt.Errorf(\"no subuid ranges found for user %q in %s\", username, subuidFileName)\n\t}\n\tif len(subgidRanges) == 0 {\n\t\treturn nil, fmt.Errorf(\"no subgid ranges found for group %q in %s\", groupname, subgidFileName)\n\t}\n\n\treturn &IDMappings{\n\t\tuids: createIDMap(subuidRanges),\n\t\tgids: createIDMap(subgidRanges),\n\t}, nil\n}\n\n// NewIDMappingsFromMaps creates a new mapping from two slices\n// Deprecated: this is a temporary shim while transitioning to IDMapping\nfunc NewIDMappingsFromMaps(uids []IDMap, gids []IDMap) *IDMappings {\n\treturn &IDMappings{uids: uids, gids: gids}\n}\n\n// RootPair returns a uid and gid pair for the root user. The error is ignored\n// because a root user always exists, and the defaults are correct when the uid\n// and gid maps are empty.\nfunc (i *IDMappings) RootPair() IDPair {\n\tuid, gid, _ := GetRootUIDGID(i.uids, i.gids)\n\treturn IDPair{UID: uid, GID: gid}\n}\n\n// ToHost returns the host UID and GID for the container uid, gid.\nfunc (i *IDMappings) ToHost(pair IDPair) (IDPair, error) {\n\tvar err error\n\tvar target IDPair\n\n\ttarget.UID, err = RawToHost(pair.UID, i.uids)\n\tif err != nil {\n\t\treturn target, err\n\t}\n\n\ttarget.GID, err = RawToHost(pair.GID, i.gids)\n\treturn target, err\n}\n\nvar (\n\toverflowUIDOnce sync.Once\n\toverflowGIDOnce sync.Once\n\toverflowUID     int\n\toverflowGID     int\n)\n\n// getOverflowUID returns the UID mapped to the overflow user\nfunc getOverflowUID() int {\n\toverflowUIDOnce.Do(func() {\n\t\t// 65534 is the value on older kernels where /proc/sys/kernel/overflowuid is not present\n\t\toverflowUID = 65534\n\t\tif content, err := os.ReadFile(\"/proc/sys/kernel/overflowuid\"); err == nil {\n\t\t\tif tmp, err := strconv.Atoi(string(content)); err == nil {\n\t\t\t\toverflowUID = tmp\n\t\t\t}\n\t\t}\n\t})\n\treturn overflowUID\n}\n\n// getOverflowGID returns the GID mapped to the overflow user\nfunc getOverflowGID() int {\n\toverflowGIDOnce.Do(func() {\n\t\t// 65534 is the value on older kernels where /proc/sys/kernel/overflowgid is not present\n\t\toverflowGID = 65534\n\t\tif content, err := os.ReadFile(\"/proc/sys/kernel/overflowgid\"); err == nil {\n\t\t\tif tmp, err := strconv.Atoi(string(content)); err == nil {\n\t\t\t\toverflowGID = tmp\n\t\t\t}\n\t\t}\n\t})\n\treturn overflowGID\n}\n\n// ToHost returns the host UID and GID for the container uid, gid.\n// Remapping is only performed if the ids aren't already the remapped root ids\n// If the mapping is not possible because the target ID is not mapped into\n// the namespace, then the overflow ID is used.\nfunc (i *IDMappings) ToHostOverflow(pair IDPair) (IDPair, error) {\n\tvar err error\n\ttarget := i.RootPair()\n\n\tif pair.UID != target.UID {\n\t\ttarget.UID, err = RawToHost(pair.UID, i.uids)\n\t\tif err != nil {\n\t\t\ttarget.UID = getOverflowUID()\n\t\t\tlogrus.Debugf(\"Failed to map UID %v to the target mapping, using the overflow ID %v\", pair.UID, target.UID)\n\t\t}\n\t}\n\n\tif pair.GID != target.GID {\n\t\ttarget.GID, err = RawToHost(pair.GID, i.gids)\n\t\tif err != nil {\n\t\t\ttarget.GID = getOverflowGID()\n\t\t\tlogrus.Debugf(\"Failed to map GID %v to the target mapping, using the overflow ID %v\", pair.GID, target.GID)\n\t\t}\n\t}\n\treturn target, nil\n}\n\n// ToContainer returns the container UID and GID for the host uid and gid\nfunc (i *IDMappings) ToContainer(pair IDPair) (int, int, error) {\n\tuid, err := RawToContainer(pair.UID, i.uids)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\tgid, err := RawToContainer(pair.GID, i.gids)\n\treturn uid, gid, err\n}\n\n// Empty returns true if there are no id mappings\nfunc (i *IDMappings) Empty() bool {\n\treturn len(i.uids) == 0 && len(i.gids) == 0\n}\n\n// UIDs return the UID mapping\n// TODO: remove this once everything has been refactored to use pairs\nfunc (i *IDMappings) UIDs() []IDMap {\n\treturn i.uids\n}\n\n// GIDs return the UID mapping\n// TODO: remove this once everything has been refactored to use pairs\nfunc (i *IDMappings) GIDs() []IDMap {\n\treturn i.gids\n}\n\nfunc createIDMap(subidRanges []subIDRange) []IDMap {\n\tidMap := []IDMap{}\n\n\t// sort the ranges by lowest ID first\n\tslices.SortFunc(subidRanges, compareRanges)\n\tcontainerID := 0\n\tfor _, idrange := range subidRanges {\n\t\tidMap = append(idMap, IDMap{\n\t\t\tContainerID: containerID,\n\t\t\tHostID:      idrange.Start,\n\t\t\tSize:        idrange.Length,\n\t\t})\n\t\tcontainerID = containerID + idrange.Length\n\t}\n\treturn idMap\n}\n\n// parseSubidFile will read the appropriate file (/etc/subuid or /etc/subgid)\n// and return all found ranges for a specified username. If the special value\n// \"ALL\" is supplied for username, then all ranges in the file will be returned\nfunc parseSubidFile(path, username string) ([]subIDRange, error) {\n\tvar (\n\t\trangeList []subIDRange\n\t\tuidstr    string\n\t)\n\tif u, err := user.Lookup(username); err == nil {\n\t\tuidstr = u.Uid\n\t}\n\n\tsubidFile, err := os.Open(path)\n\tif err != nil {\n\t\treturn rangeList, err\n\t}\n\tdefer subidFile.Close()\n\n\ts := bufio.NewScanner(subidFile)\n\tfor s.Scan() {\n\t\tif err := s.Err(); err != nil {\n\t\t\treturn rangeList, err\n\t\t}\n\n\t\ttext := strings.TrimSpace(s.Text())\n\t\tif text == \"\" || strings.HasPrefix(text, \"#\") {\n\t\t\tcontinue\n\t\t}\n\t\tparts := strings.Split(text, \":\")\n\t\tif len(parts) != 3 {\n\t\t\treturn rangeList, fmt.Errorf(\"cannot parse subuid/gid information: Format not correct for %s file\", path)\n\t\t}\n\t\tif parts[0] == username || username == \"ALL\" || (parts[0] == uidstr && parts[0] != \"\") {\n\t\t\tstartid, err := strconv.Atoi(parts[1])\n\t\t\tif err != nil {\n\t\t\t\treturn rangeList, fmt.Errorf(\"string to int conversion failed during subuid/gid parsing of %s: %w\", path, err)\n\t\t\t}\n\t\t\tlength, err := strconv.Atoi(parts[2])\n\t\t\tif err != nil {\n\t\t\t\treturn rangeList, fmt.Errorf(\"string to int conversion failed during subuid/gid parsing of %s: %w\", path, err)\n\t\t\t}\n\t\t\trangeList = append(rangeList, subIDRange{startid, length})\n\t\t}\n\t}\n\treturn rangeList, nil\n}\n\nfunc checkChownErr(err error, name string, uid, gid int) error {\n\tvar e *os.PathError\n\tif errors.As(err, &e) && e.Err == syscall.EINVAL {\n\t\treturn fmt.Errorf(`potentially insufficient UIDs or GIDs available in user namespace (requested %d:%d for %s): Check /etc/subuid and /etc/subgid if configured locally and run \"podman system migrate\": %w`, uid, gid, name, err)\n\t}\n\treturn err\n}\n\n// Stat contains file states that can be overridden with ContainersOverrideXattr.\ntype Stat struct {\n\tIDs   IDPair\n\tMode  os.FileMode\n\tMajor int\n\tMinor int\n}\n\n// FormatContainersOverrideXattr will format the given uid, gid, and mode into a string\n// that can be used as the value for the ContainersOverrideXattr xattr.\nfunc FormatContainersOverrideXattr(uid, gid, mode int) string {\n\treturn FormatContainersOverrideXattrDevice(uid, gid, fs.FileMode(mode), 0, 0)\n}\n\n// FormatContainersOverrideXattrDevice will format the given uid, gid, and mode into a string\n// that can be used as the value for the ContainersOverrideXattr xattr.  For devices, it also\n// needs the major and minor numbers.\nfunc FormatContainersOverrideXattrDevice(uid, gid int, mode fs.FileMode, major, minor int) string {\n\ttyp := \"\"\n\tswitch mode & os.ModeType {\n\tcase os.ModeDir:\n\t\ttyp = \"dir\"\n\tcase os.ModeSymlink:\n\t\ttyp = \"symlink\"\n\tcase os.ModeNamedPipe:\n\t\ttyp = \"pipe\"\n\tcase os.ModeSocket:\n\t\ttyp = \"socket\"\n\tcase os.ModeDevice:\n\t\ttyp = fmt.Sprintf(\"block-%d-%d\", major, minor)\n\tcase os.ModeDevice | os.ModeCharDevice:\n\t\ttyp = fmt.Sprintf(\"char-%d-%d\", major, minor)\n\tdefault:\n\t\ttyp = \"file\"\n\t}\n\tunixMode := mode & os.ModePerm\n\tif mode&os.ModeSetuid != 0 {\n\t\tunixMode |= 0o4000\n\t}\n\tif mode&os.ModeSetgid != 0 {\n\t\tunixMode |= 0o2000\n\t}\n\tif mode&os.ModeSticky != 0 {\n\t\tunixMode |= 0o1000\n\t}\n\treturn fmt.Sprintf(\"%d:%d:%04o:%s\", uid, gid, unixMode, typ)\n}\n\n// GetContainersOverrideXattr will get and decode ContainersOverrideXattr.\nfunc GetContainersOverrideXattr(path string) (Stat, error) {\n\txstat, err := system.Lgetxattr(path, ContainersOverrideXattr)\n\tif err != nil {\n\t\treturn Stat{}, err\n\t}\n\treturn parseOverrideXattr(xstat) // This will fail if (xstat, err) == (nil, nil), i.e. the xattr does not exist.\n}\n\nfunc parseOverrideXattr(xstat []byte) (Stat, error) {\n\tvar stat Stat\n\tattrs := strings.Split(string(xstat), \":\")\n\tif len(attrs) < 3 {\n\t\treturn stat, fmt.Errorf(\"the number of parts in %s is less than 3\",\n\t\t\tContainersOverrideXattr)\n\t}\n\n\tvalue, err := strconv.ParseUint(attrs[0], 10, 32)\n\tif err != nil {\n\t\treturn stat, fmt.Errorf(\"failed to parse UID: %w\", err)\n\t}\n\tstat.IDs.UID = int(value)\n\n\tvalue, err = strconv.ParseUint(attrs[1], 10, 32)\n\tif err != nil {\n\t\treturn stat, fmt.Errorf(\"failed to parse GID: %w\", err)\n\t}\n\tstat.IDs.GID = int(value)\n\n\tvalue, err = strconv.ParseUint(attrs[2], 8, 32)\n\tif err != nil {\n\t\treturn stat, fmt.Errorf(\"failed to parse mode: %w\", err)\n\t}\n\tstat.Mode = os.FileMode(value) & os.ModePerm\n\tif value&0o1000 != 0 {\n\t\tstat.Mode |= os.ModeSticky\n\t}\n\tif value&0o2000 != 0 {\n\t\tstat.Mode |= os.ModeSetgid\n\t}\n\tif value&0o4000 != 0 {\n\t\tstat.Mode |= os.ModeSetuid\n\t}\n\n\tif len(attrs) > 3 {\n\t\ttyp := attrs[3]\n\t\tif strings.HasPrefix(typ, \"file\") {\n\t\t} else if strings.HasPrefix(typ, \"dir\") {\n\t\t\tstat.Mode |= os.ModeDir\n\t\t} else if strings.HasPrefix(typ, \"symlink\") {\n\t\t\tstat.Mode |= os.ModeSymlink\n\t\t} else if strings.HasPrefix(typ, \"pipe\") {\n\t\t\tstat.Mode |= os.ModeNamedPipe\n\t\t} else if strings.HasPrefix(typ, \"socket\") {\n\t\t\tstat.Mode |= os.ModeSocket\n\t\t} else if strings.HasPrefix(typ, \"block\") {\n\t\t\tstat.Mode |= os.ModeDevice\n\t\t\tstat.Major, stat.Minor, err = parseDevice(typ)\n\t\t\tif err != nil {\n\t\t\t\treturn stat, err\n\t\t\t}\n\t\t} else if strings.HasPrefix(typ, \"char\") {\n\t\t\tstat.Mode |= os.ModeDevice | os.ModeCharDevice\n\t\t\tstat.Major, stat.Minor, err = parseDevice(typ)\n\t\t\tif err != nil {\n\t\t\t\treturn stat, err\n\t\t\t}\n\t\t} else {\n\t\t\treturn stat, fmt.Errorf(\"invalid file type %s\", typ)\n\t\t}\n\t}\n\treturn stat, nil\n}\n\nfunc parseDevice(typ string) (int, int, error) {\n\tparts := strings.Split(typ, \"-\")\n\t// If there are more than 3 parts, just ignore them to be forward compatible\n\tif len(parts) < 3 {\n\t\treturn 0, 0, fmt.Errorf(\"invalid device type %s\", typ)\n\t}\n\tif parts[0] != \"block\" && parts[0] != \"char\" {\n\t\treturn 0, 0, fmt.Errorf(\"invalid device type %s\", typ)\n\t}\n\tmajor, err := strconv.Atoi(parts[1])\n\tif err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"failed to parse major number: %w\", err)\n\t}\n\tminor, err := strconv.Atoi(parts[2])\n\tif err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"failed to parse minor number: %w\", err)\n\t}\n\treturn major, minor, nil\n}\n\n// SetContainersOverrideXattr will encode and set ContainersOverrideXattr.\nfunc SetContainersOverrideXattr(path string, stat Stat) error {\n\tvalue := FormatContainersOverrideXattrDevice(stat.IDs.UID, stat.IDs.GID, stat.Mode, stat.Major, stat.Minor)\n\treturn system.Lsetxattr(path, ContainersOverrideXattr, []byte(value), 0)\n}\n\nfunc SafeChown(name string, uid, gid int) error {\n\tif runtime.GOOS == \"darwin\" {\n\t\tstat := Stat{\n\t\t\tMode: os.FileMode(0o0700),\n\t\t}\n\t\txstat, err := system.Lgetxattr(name, ContainersOverrideXattr)\n\t\tif err == nil && xstat != nil {\n\t\t\tstat, err = parseOverrideXattr(xstat)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tst, err := os.Stat(name) // Ideally we would share this with system.Stat below, but then we would need to convert Mode.\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tstat.Mode = st.Mode()\n\t\t}\n\t\tstat.IDs = IDPair{UID: uid, GID: gid}\n\t\tif err = SetContainersOverrideXattr(name, stat); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tuid = os.Getuid()\n\t\tgid = os.Getgid()\n\t}\n\tif stat, statErr := system.Stat(name); statErr == nil {\n\t\tif stat.UID() == uint32(uid) && stat.GID() == uint32(gid) {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn checkChownErr(os.Chown(name, uid, gid), name, uid, gid)\n}\n\nfunc SafeLchown(name string, uid, gid int) error {\n\tif runtime.GOOS == \"darwin\" {\n\t\tstat := Stat{\n\t\t\tMode: os.FileMode(0o0700),\n\t\t}\n\t\txstat, err := system.Lgetxattr(name, ContainersOverrideXattr)\n\t\tif err == nil && xstat != nil {\n\t\t\tstat, err = parseOverrideXattr(xstat)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tst, err := os.Lstat(name) // Ideally we would share this with system.Stat below, but then we would need to convert Mode.\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tstat.Mode = st.Mode()\n\t\t}\n\t\tstat.IDs = IDPair{UID: uid, GID: gid}\n\t\tif err = SetContainersOverrideXattr(name, stat); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tuid = os.Getuid()\n\t\tgid = os.Getgid()\n\t}\n\tif stat, statErr := system.Lstat(name); statErr == nil {\n\t\tif stat.UID() == uint32(uid) && stat.GID() == uint32(gid) {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn checkChownErr(os.Lchown(name, uid, gid), name, uid, gid)\n}\n\n// IsContiguous checks if the specified mapping is contiguous and doesn't\n// have any hole.\nfunc IsContiguous(mappings []IDMap) bool {\n\tif len(mappings) < 2 {\n\t\treturn true\n\t}\n\n\tslices.SortFunc(mappings, func(a, b IDMap) int {\n\t\treturn cmp.Compare(a.HostID, b.HostID)\n\t})\n\tfor i := 1; i < len(mappings); i++ {\n\t\tif mappings[i].HostID != mappings[i-1].HostID+mappings[i-1].Size {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tslices.SortFunc(mappings, func(a, b IDMap) int {\n\t\treturn cmp.Compare(a.ContainerID, b.ContainerID)\n\t})\n\tfor i := 1; i < len(mappings); i++ {\n\t\tif mappings[i].ContainerID != mappings[i-1].ContainerID+mappings[i-1].Size {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/idtools_supported.go",
    "content": "//go:build linux && cgo && libsubid\n\npackage idtools\n\nimport (\n\t\"errors\"\n\t\"os/user\"\n\t\"sync\"\n\t\"unsafe\"\n)\n\n/*\n#cgo LDFLAGS: -l subid\n#include <shadow/subid.h>\n#include <stdlib.h>\n#include <stdio.h>\n\nstruct subid_range get_range(struct subid_range *ranges, int i)\n{\n    return ranges[i];\n}\n\n// helper for stderr to avoid referencing C.stderr from Go code,\n// which breaks cgo on musl due to stderr being declared as FILE *const\nstatic FILE *subid_stderr(void) {\n    return stderr;\n}\n\n#if !defined(SUBID_ABI_MAJOR) || (SUBID_ABI_MAJOR < 4)\n# define subid_init libsubid_init\n# define subid_get_uid_ranges get_subuid_ranges\n# define subid_get_gid_ranges get_subgid_ranges\n#endif\n\n*/\nimport \"C\"\n\nvar onceInit sync.Once\n\nfunc readSubid(username string, isUser bool) ([]subIDRange, error) {\n\tvar ret []subIDRange\n\tuidstr := \"\"\n\n\tif username == \"ALL\" {\n\t\treturn nil, errors.New(\"username ALL not supported\")\n\t}\n\n\tif u, err := user.Lookup(username); err == nil {\n\t\tuidstr = u.Uid\n\t}\n\n\tonceInit.Do(func() {\n\t\tC.subid_init(C.CString(\"storage\"), C.subid_stderr())\n\t})\n\n\tcUsername := C.CString(username)\n\tdefer C.free(unsafe.Pointer(cUsername))\n\n\tcuidstr := C.CString(uidstr)\n\tdefer C.free(unsafe.Pointer(cuidstr))\n\n\tvar nRanges C.int\n\tvar cRanges *C.struct_subid_range\n\tif isUser {\n\t\tnRanges = C.subid_get_uid_ranges(cUsername, &cRanges)\n\t\tif nRanges <= 0 {\n\t\t\tnRanges = C.subid_get_uid_ranges(cuidstr, &cRanges)\n\t\t}\n\t} else {\n\t\tnRanges = C.subid_get_gid_ranges(cUsername, &cRanges)\n\t\tif nRanges <= 0 {\n\t\t\tnRanges = C.subid_get_gid_ranges(cuidstr, &cRanges)\n\t\t}\n\t}\n\tif nRanges < 0 {\n\t\treturn nil, errors.New(\"cannot read subids\")\n\t}\n\tdefer C.free(unsafe.Pointer(cRanges))\n\n\tfor i := 0; i < int(nRanges); i++ {\n\t\tr := C.get_range(cRanges, C.int(i))\n\t\tnewRange := subIDRange{\n\t\t\tStart:  int(r.start),\n\t\t\tLength: int(r.count),\n\t\t}\n\t\tret = append(ret, newRange)\n\t}\n\treturn ret, nil\n}\n\nfunc readSubuid(username string) ([]subIDRange, error) {\n\treturn readSubid(username, true)\n}\n\nfunc readSubgid(username string) ([]subIDRange, error) {\n\treturn readSubid(username, false)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/idtools_unix.go",
    "content": "//go:build !windows\n\npackage idtools\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/moby/sys/user\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/system\"\n)\n\nvar (\n\tentOnce   sync.Once\n\tgetentCmd string\n)\n\nfunc mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {\n\t// make an array containing the original path asked for, plus (for mkAll == true)\n\t// all path components leading up to the complete path that don't exist before we MkdirAll\n\t// so that we can chown all of them properly at the end.  If chownExisting is false, we won't\n\t// chown the full directory path if it exists\n\tvar paths []string\n\tst, err := os.Stat(path)\n\tif err != nil && os.IsNotExist(err) {\n\t\tpaths = []string{path}\n\t} else if err == nil {\n\t\tif !st.IsDir() {\n\t\t\treturn &os.PathError{Op: \"mkdir\", Path: path, Err: syscall.ENOTDIR}\n\t\t}\n\t\tif chownExisting {\n\t\t\t// short-circuit--we were called with an existing directory and chown was requested\n\t\t\treturn SafeChown(path, ownerUID, ownerGID)\n\t\t}\n\t\t// nothing to do; directory exists and chown was NOT requested\n\t\treturn nil\n\t}\n\n\tif mkAll {\n\t\t// walk back to \"/\" looking for directories which do not exist\n\t\t// and add them to the paths array for chown after creation\n\t\tdirPath := path\n\t\tif !filepath.IsAbs(dirPath) {\n\t\t\treturn fmt.Errorf(\"path: %s should be absolute\", dirPath)\n\t\t}\n\t\tfor {\n\t\t\tdirPath = filepath.Dir(dirPath)\n\t\t\tif dirPath == \"/\" {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err := fileutils.Exists(dirPath); err != nil && os.IsNotExist(err) {\n\t\t\t\tpaths = append(paths, dirPath)\n\t\t\t}\n\t\t}\n\t\tif err := os.MkdirAll(path, mode); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tif err := os.Mkdir(path, mode); err != nil && !os.IsExist(err) {\n\t\t\treturn err\n\t\t}\n\t}\n\t// even if it existed, we will chown the requested path + any subpaths that\n\t// didn't exist when we called MkdirAll\n\tfor _, pathComponent := range paths {\n\t\tif err := SafeChown(pathComponent, ownerUID, ownerGID); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// CanAccess takes a valid (existing) directory and a uid, gid pair and determines\n// if that uid, gid pair has access (execute bit) to the directory\nfunc CanAccess(path string, pair IDPair) bool {\n\tstatInfo, err := system.Stat(path)\n\tif err != nil {\n\t\treturn false\n\t}\n\tfileMode := os.FileMode(statInfo.Mode())\n\tpermBits := fileMode.Perm()\n\treturn accessible(statInfo.UID() == uint32(pair.UID),\n\t\tstatInfo.GID() == uint32(pair.GID), permBits)\n}\n\nfunc accessible(isOwner, isGroup bool, perms os.FileMode) bool {\n\tif isOwner && (perms&0o100 == 0o100) {\n\t\treturn true\n\t}\n\tif isGroup && (perms&0o010 == 0o010) {\n\t\treturn true\n\t}\n\tif perms&0o001 == 0o001 {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// LookupUser uses traditional local system files lookup (from libcontainer/user) on a username,\n// followed by a call to `getent` for supporting host configured non-files passwd and group dbs\nfunc LookupUser(username string) (user.User, error) {\n\t// first try a local system files lookup using existing capabilities\n\tusr, err := user.LookupUser(username)\n\tif err == nil {\n\t\treturn usr, nil\n\t}\n\t// local files lookup failed; attempt to call `getent` to query configured passwd dbs\n\tusr, err = getentUser(username)\n\tif err != nil {\n\t\treturn user.User{}, err\n\t}\n\treturn usr, nil\n}\n\n// LookupUID uses traditional local system files lookup (from libcontainer/user) on a uid,\n// followed by a call to `getent` for supporting host configured non-files passwd and group dbs\nfunc LookupUID(uid int) (user.User, error) {\n\t// first try a local system files lookup using existing capabilities\n\tusr, err := user.LookupUid(uid)\n\tif err == nil {\n\t\treturn usr, nil\n\t}\n\t// local files lookup failed; attempt to call `getent` to query configured passwd dbs\n\treturn getentUser(fmt.Sprintf(\"%d\", uid))\n}\n\nfunc getentUser(key string) (user.User, error) {\n\treader, err := callGetent(\"passwd\", key)\n\tif err != nil {\n\t\treturn user.User{}, err\n\t}\n\tusers, err := user.ParsePasswd(reader)\n\tif err != nil {\n\t\treturn user.User{}, err\n\t}\n\tif len(users) == 0 {\n\t\treturn user.User{}, fmt.Errorf(\"getent failed to find passwd entry for %q\", key)\n\t}\n\treturn users[0], nil\n}\n\n// LookupGroup uses traditional local system files lookup (from libcontainer/user) on a group name,\n// followed by a call to `getent` for supporting host configured non-files passwd and group dbs\nfunc LookupGroup(groupname string) (user.Group, error) {\n\t// first try a local system files lookup using existing capabilities\n\tgroup, err := user.LookupGroup(groupname)\n\tif err == nil {\n\t\treturn group, nil\n\t}\n\t// local files lookup failed; attempt to call `getent` to query configured group dbs\n\treturn getentGroup(groupname)\n}\n\n// LookupGID uses traditional local system files lookup (from libcontainer/user) on a group ID,\n// followed by a call to `getent` for supporting host configured non-files passwd and group dbs\nfunc LookupGID(gid int) (user.Group, error) {\n\t// first try a local system files lookup using existing capabilities\n\tgroup, err := user.LookupGid(gid)\n\tif err == nil {\n\t\treturn group, nil\n\t}\n\t// local files lookup failed; attempt to call `getent` to query configured group dbs\n\treturn getentGroup(fmt.Sprintf(\"%d\", gid))\n}\n\nfunc getentGroup(key string) (user.Group, error) {\n\treader, err := callGetent(\"group\", key)\n\tif err != nil {\n\t\treturn user.Group{}, err\n\t}\n\tgroups, err := user.ParseGroup(reader)\n\tif err != nil {\n\t\treturn user.Group{}, err\n\t}\n\tif len(groups) == 0 {\n\t\treturn user.Group{}, fmt.Errorf(\"getent failed to find groups entry for %q\", key)\n\t}\n\treturn groups[0], nil\n}\n\nfunc callGetent(db, key string) (io.Reader, error) {\n\tentOnce.Do(func() { getentCmd, _ = resolveBinary(\"getent\") })\n\t// if no `getent` command on host, can't do anything else\n\tif getentCmd == \"\" {\n\t\treturn nil, fmt.Errorf(\"\")\n\t}\n\tout, err := execCmd(getentCmd, db, key)\n\tif err != nil {\n\t\texitCode, errC := system.GetExitCode(err)\n\t\tif errC != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch exitCode {\n\t\tcase 1:\n\t\t\treturn nil, fmt.Errorf(\"getent reported invalid parameters/database unknown\")\n\t\tcase 2:\n\t\t\treturn nil, fmt.Errorf(\"getent unable to find entry %q in %s database\", key, db)\n\t\tcase 3:\n\t\t\treturn nil, fmt.Errorf(\"getent database doesn't support enumeration\")\n\t\tdefault:\n\t\t\treturn nil, err\n\t\t}\n\n\t}\n\treturn bytes.NewReader(out), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/idtools_unsupported.go",
    "content": "//go:build !linux || !libsubid || !cgo\n\npackage idtools\n\nfunc readSubuid(username string) ([]subIDRange, error) {\n\treturn parseSubidFile(subuidFileName, username)\n}\n\nfunc readSubgid(username string) ([]subIDRange, error) {\n\treturn parseSubidFile(subgidFileName, username)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/idtools_windows.go",
    "content": "//go:build windows\n\npackage idtools\n\nimport (\n\t\"os\"\n)\n\n// Platforms such as Windows do not support the UID/GID concept. So make this\n// just a wrapper around system.MkdirAll.\nfunc mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {\n\tif err := os.MkdirAll(path, mode); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// CanAccess takes a valid (existing) directory and a uid, gid pair and determines\n// if that uid, gid pair has access (execute bit) to the directory\n// Windows does not require/support this function, so always return true\nfunc CanAccess(path string, pair IDPair) bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/parser.go",
    "content": "package idtools\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"math/bits\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc parseTriple(spec []string) (container, host, size uint32, err error) {\n\tcid, err := strconv.ParseUint(spec[0], 10, 32)\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"parsing id map value %q: %w\", spec[0], err)\n\t}\n\thid, err := strconv.ParseUint(spec[1], 10, 32)\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"parsing id map value %q: %w\", spec[1], err)\n\t}\n\tsz, err := strconv.ParseUint(spec[2], 10, 32)\n\tif err != nil {\n\t\treturn 0, 0, 0, fmt.Errorf(\"parsing id map value %q: %w\", spec[2], err)\n\t}\n\treturn uint32(cid), uint32(hid), uint32(sz), nil\n}\n\n// ParseIDMap parses idmap triples from string.\nfunc ParseIDMap(mapSpec []string, mapSetting string) (idmap []IDMap, err error) {\n\tstdErr := fmt.Errorf(\"initializing ID mappings: %s setting is malformed expected [\\\"uint32:uint32:uint32\\\"]: %q\", mapSetting, mapSpec)\n\tfor _, idMapSpec := range mapSpec {\n\t\tif idMapSpec == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tidSpec := strings.Split(idMapSpec, \":\")\n\t\tif len(idSpec)%3 != 0 {\n\t\t\treturn nil, stdErr\n\t\t}\n\t\tfor i := range idSpec {\n\t\t\tif i%3 != 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcid, hid, size, err := parseTriple(idSpec[i : i+3])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, stdErr\n\t\t\t}\n\t\t\t// Avoid possible integer overflow on 32bit builds\n\t\t\tif bits.UintSize == 32 && (cid > math.MaxInt32 || hid > math.MaxInt32 || size > math.MaxInt32) {\n\t\t\t\treturn nil, stdErr\n\t\t\t}\n\t\t\tmapping := IDMap{\n\t\t\t\tContainerID: int(cid),\n\t\t\t\tHostID:      int(hid),\n\t\t\t\tSize:        int(size),\n\t\t\t}\n\t\t\tidmap = append(idmap, mapping)\n\t\t}\n\t}\n\treturn idmap, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/usergroupadd_linux.go",
    "content": "package idtools\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\n// add a user and/or group to Linux /etc/passwd, /etc/group using standard\n// Linux distribution commands:\n// adduser --system --shell /bin/false --disabled-login --disabled-password --no-create-home --group <username>\n// useradd -r -s /bin/false <username>\n\nvar (\n\tonce        sync.Once\n\tuserCommand []string // command, args…, to be finished by adding an user name\n\n\tidOutRegexp = regexp.Delayed(`uid=([0-9]+).*gid=([0-9]+)`)\n\t// default length for a UID/GID subordinate range\n\tdefaultRangeLen   = 65536\n\tdefaultRangeStart = 100000\n)\n\n// AddNamespaceRangesUser takes a username and uses the standard system\n// utility to create a system user/group pair used to hold the\n// /etc/sub{uid,gid} ranges which will be used for user namespace\n// mapping ranges in containers.\nfunc AddNamespaceRangesUser(name string) (int, int, error) {\n\tif err := addUser(name); err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"adding user %q: %w\", name, err)\n\t}\n\n\t// Query the system for the created uid and gid pair\n\tout, err := execCmd(\"id\", name)\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"trying to find uid/gid for new user %q: %w\", name, err)\n\t}\n\tmatches := idOutRegexp.FindStringSubmatch(strings.TrimSpace(string(out)))\n\tif len(matches) != 3 {\n\t\treturn -1, -1, fmt.Errorf(\"can't find uid, gid from `id` output: %q\", string(out))\n\t}\n\tuid, err := strconv.Atoi(matches[1])\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"can't convert found uid (%s) to int: %w\", matches[1], err)\n\t}\n\tgid, err := strconv.Atoi(matches[2])\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"can't convert found gid (%s) to int: %w\", matches[2], err)\n\t}\n\n\t// Now we need to create the subuid/subgid ranges for our new user/group (system users\n\t// do not get auto-created ranges in subuid/subgid)\n\n\tif err := createSubordinateRanges(name); err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"couldn't create subordinate ID ranges: %w\", err)\n\t}\n\treturn uid, gid, nil\n}\n\nfunc addUser(userName string) error {\n\tonce.Do(func() {\n\t\t// set up which commands are used for adding users/groups dependent on distro\n\t\tif _, err := resolveBinary(\"adduser\"); err == nil {\n\t\t\tuserCommand = []string{\"adduser\", \"--system\", \"--shell\", \"/bin/false\", \"--no-create-home\", \"--disabled-login\", \"--disabled-password\", \"--group\"}\n\t\t} else if _, err := resolveBinary(\"useradd\"); err == nil {\n\t\t\tuserCommand = []string{\"useradd\", \"-r\", \"-s\", \"/bin/false\"}\n\t\t}\n\t})\n\tif userCommand == nil {\n\t\treturn fmt.Errorf(\"cannot add user; no useradd/adduser binary found\")\n\t}\n\targs := append(slices.Clone(userCommand), userName)\n\tout, err := execCmd(args[0], args[1:]...)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to add user with error: %w; output: %q\", err, string(out))\n\t}\n\treturn nil\n}\n\nfunc createSubordinateRanges(name string) error {\n\t// first, we should verify that ranges weren't automatically created\n\t// by the distro tooling\n\tranges, err := readSubuid(name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"while looking for subuid ranges for user %q: %w\", name, err)\n\t}\n\tif len(ranges) == 0 {\n\t\t// no UID ranges; let's create one\n\t\tstartID, err := findNextUIDRange()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"can't find available subuid range: %w\", err)\n\t\t}\n\t\tout, err := execCmd(\"usermod\", \"-v\", fmt.Sprintf(\"%d-%d\", startID, startID+defaultRangeLen-1), name)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to add subuid range to user: %q; output: %s, err: %w\", name, out, err)\n\t\t}\n\t}\n\n\tranges, err = readSubgid(name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"while looking for subgid ranges for user %q: %w\", name, err)\n\t}\n\tif len(ranges) == 0 {\n\t\t// no GID ranges; let's create one\n\t\tstartID, err := findNextGIDRange()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"can't find available subgid range: %w\", err)\n\t\t}\n\t\tout, err := execCmd(\"usermod\", \"-w\", fmt.Sprintf(\"%d-%d\", startID, startID+defaultRangeLen-1), name)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to add subgid range to user: %q; output: %s, err: %w\", name, out, err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc findNextUIDRange() (int, error) {\n\tranges, err := readSubuid(\"ALL\")\n\tif err != nil {\n\t\treturn -1, fmt.Errorf(\"couldn't parse all ranges in /etc/subuid file: %w\", err)\n\t}\n\tslices.SortFunc(ranges, compareRanges)\n\treturn findNextRangeStart(ranges)\n}\n\nfunc findNextGIDRange() (int, error) {\n\tranges, err := readSubgid(\"ALL\")\n\tif err != nil {\n\t\treturn -1, fmt.Errorf(\"couldn't parse all ranges in /etc/subgid file: %w\", err)\n\t}\n\tslices.SortFunc(ranges, compareRanges)\n\treturn findNextRangeStart(ranges)\n}\n\nfunc findNextRangeStart(rangeList []subIDRange) (int, error) {\n\tstartID := defaultRangeStart\n\tfor _, arange := range rangeList {\n\t\tif wouldOverlap(arange, startID) {\n\t\t\tstartID = arange.Start + arange.Length\n\t\t}\n\t}\n\treturn startID, nil\n}\n\nfunc wouldOverlap(arange subIDRange, ID int) bool {\n\tlow := ID\n\thigh := ID + defaultRangeLen\n\tif (low >= arange.Start && low <= arange.Start+arange.Length) ||\n\t\t(high <= arange.Start+arange.Length && high >= arange.Start) {\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/usergroupadd_unsupported.go",
    "content": "//go:build !linux\n\npackage idtools\n\nimport \"fmt\"\n\n// AddNamespaceRangesUser takes a name and finds an unused uid, gid pair\n// and calls the appropriate helper function to add the group and then\n// the user to the group in /etc/group and /etc/passwd respectively.\nfunc AddNamespaceRangesUser(name string) (int, int, error) {\n\treturn -1, -1, fmt.Errorf(\"no support for adding users or groups on this OS\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/idtools/utils_unix.go",
    "content": "//go:build !windows\n\npackage idtools\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\nfunc resolveBinary(binname string) (string, error) {\n\tbinaryPath, err := exec.LookPath(binname)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tresolvedPath, err := filepath.EvalSymlinks(binaryPath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t// only return no error if the final resolved binary basename\n\t// matches what was searched for\n\tif filepath.Base(resolvedPath) == binname {\n\t\treturn resolvedPath, nil\n\t}\n\treturn \"\", fmt.Errorf(\"binary %q does not resolve to a binary of that name in $PATH (%q)\", binname, resolvedPath)\n}\n\nfunc execCmd(cmd string, args ...string) ([]byte, error) {\n\texecCmd := exec.Command(cmd, args...)\n\treturn execCmd.CombinedOutput()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/buffer.go",
    "content": "package ioutils\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\nvar errBufferFull = errors.New(\"buffer is full\")\n\ntype fixedBuffer struct {\n\tbuf      []byte\n\tpos      int\n\tlastRead int\n}\n\nfunc (b *fixedBuffer) Write(p []byte) (int, error) {\n\tn := copy(b.buf[b.pos:cap(b.buf)], p)\n\tb.pos += n\n\n\tif n < len(p) {\n\t\tif b.pos == cap(b.buf) {\n\t\t\treturn n, errBufferFull\n\t\t}\n\t\treturn n, io.ErrShortWrite\n\t}\n\treturn n, nil\n}\n\nfunc (b *fixedBuffer) Read(p []byte) (int, error) {\n\tn := copy(p, b.buf[b.lastRead:b.pos])\n\tb.lastRead += n\n\treturn n, nil\n}\n\nfunc (b *fixedBuffer) Len() int {\n\treturn b.pos - b.lastRead\n}\n\nfunc (b *fixedBuffer) Cap() int {\n\treturn cap(b.buf)\n}\n\nfunc (b *fixedBuffer) Reset() {\n\tb.pos = 0\n\tb.lastRead = 0\n\tb.buf = b.buf[:0]\n}\n\nfunc (b *fixedBuffer) String() string {\n\treturn string(b.buf[b.lastRead:b.pos])\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/bytespipe.go",
    "content": "package ioutils\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"sync\"\n)\n\n// maxCap is the highest capacity to use in byte slices that buffer data.\nconst maxCap = 1e6\n\n// minCap is the lowest capacity to use in byte slices that buffer data\nconst minCap = 64\n\n// blockThreshold is the minimum number of bytes in the buffer which will cause\n// a write to BytesPipe to block when allocating a new slice.\nconst blockThreshold = 1e6\n\nvar (\n\t// ErrClosed is returned when Write is called on a closed BytesPipe.\n\tErrClosed = errors.New(\"write to closed BytesPipe\")\n\n\tbufPools     = make(map[int]*sync.Pool)\n\tbufPoolsLock sync.Mutex\n)\n\n// BytesPipe is io.ReadWriteCloser which works similarly to pipe(queue).\n// All written data may be read at most once. Also, BytesPipe allocates\n// and releases new byte slices to adjust to current needs, so the buffer\n// won't be overgrown after peak loads.\ntype BytesPipe struct {\n\tmu       sync.Mutex\n\twait     *sync.Cond\n\tbuf      []*fixedBuffer\n\tbufLen   int\n\tcloseErr error // error to return from next Read. set to nil if not closed.\n}\n\n// NewBytesPipe creates new BytesPipe, initialized by specified slice.\n// If buf is nil, then it will be initialized with slice which cap is 64.\n// buf will be adjusted in a way that len(buf) == 0, cap(buf) == cap(buf).\nfunc NewBytesPipe() *BytesPipe {\n\tbp := &BytesPipe{}\n\tbp.buf = append(bp.buf, getBuffer(minCap))\n\tbp.wait = sync.NewCond(&bp.mu)\n\treturn bp\n}\n\n// Write writes p to BytesPipe.\n// It can allocate new []byte slices in a process of writing.\nfunc (bp *BytesPipe) Write(p []byte) (int, error) {\n\tbp.mu.Lock()\n\n\twritten := 0\nloop0:\n\tfor {\n\t\tif bp.closeErr != nil {\n\t\t\tbp.mu.Unlock()\n\t\t\treturn written, ErrClosed\n\t\t}\n\n\t\tif len(bp.buf) == 0 {\n\t\t\tbp.buf = append(bp.buf, getBuffer(64))\n\t\t}\n\t\t// get the last buffer\n\t\tb := bp.buf[len(bp.buf)-1]\n\n\t\tn, err := b.Write(p)\n\t\twritten += n\n\t\tbp.bufLen += n\n\n\t\t// errBufferFull is an error we expect to get if the buffer is full\n\t\tif err != nil && err != errBufferFull {\n\t\t\tbp.wait.Broadcast()\n\t\t\tbp.mu.Unlock()\n\t\t\treturn written, err\n\t\t}\n\n\t\t// if there was enough room to write all then break\n\t\tif len(p) == n {\n\t\t\tbreak\n\t\t}\n\n\t\t// more data: write to the next slice\n\t\tp = p[n:]\n\n\t\t// make sure the buffer doesn't grow too big from this write\n\t\tfor bp.bufLen >= blockThreshold {\n\t\t\tbp.wait.Wait()\n\t\t\tif bp.closeErr != nil {\n\t\t\t\tcontinue loop0\n\t\t\t}\n\t\t}\n\n\t\t// add new byte slice to the buffers slice and continue writing\n\t\tnextCap := min(b.Cap()*2, maxCap)\n\t\tbp.buf = append(bp.buf, getBuffer(nextCap))\n\t}\n\tbp.wait.Broadcast()\n\tbp.mu.Unlock()\n\treturn written, nil\n}\n\n// CloseWithError causes further reads from a BytesPipe to return immediately.\nfunc (bp *BytesPipe) CloseWithError(err error) error {\n\tbp.mu.Lock()\n\tif err != nil {\n\t\tbp.closeErr = err\n\t} else {\n\t\tbp.closeErr = io.EOF\n\t}\n\tbp.wait.Broadcast()\n\tbp.mu.Unlock()\n\treturn nil\n}\n\n// Close causes further reads from a BytesPipe to return immediately.\nfunc (bp *BytesPipe) Close() error {\n\treturn bp.CloseWithError(nil)\n}\n\n// Read reads bytes from BytesPipe.\n// Data could be read only once.\nfunc (bp *BytesPipe) Read(p []byte) (int, error) {\n\tvar n int\n\tbp.mu.Lock()\n\tif bp.bufLen == 0 {\n\t\tif bp.closeErr != nil {\n\t\t\tbp.mu.Unlock()\n\t\t\treturn 0, bp.closeErr\n\t\t}\n\t\tbp.wait.Wait()\n\t\tif bp.bufLen == 0 && bp.closeErr != nil {\n\t\t\terr := bp.closeErr\n\t\t\tbp.mu.Unlock()\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tfor bp.bufLen > 0 {\n\t\tb := bp.buf[0]\n\t\tread, _ := b.Read(p) // ignore error since fixedBuffer doesn't really return an error\n\t\tn += read\n\t\tbp.bufLen -= read\n\n\t\tif b.Len() == 0 {\n\t\t\t// it's empty so return it to the pool and move to the next one\n\t\t\treturnBuffer(b)\n\t\t\tbp.buf[0] = nil\n\t\t\tbp.buf = bp.buf[1:]\n\t\t}\n\n\t\tif len(p) == read {\n\t\t\tbreak\n\t\t}\n\n\t\tp = p[read:]\n\t}\n\n\tbp.wait.Broadcast()\n\tbp.mu.Unlock()\n\treturn n, nil\n}\n\nfunc returnBuffer(b *fixedBuffer) {\n\tb.Reset()\n\tbufPoolsLock.Lock()\n\tpool := bufPools[b.Cap()]\n\tbufPoolsLock.Unlock()\n\tif pool != nil {\n\t\tpool.Put(b)\n\t}\n}\n\nfunc getBuffer(size int) *fixedBuffer {\n\tbufPoolsLock.Lock()\n\tpool, ok := bufPools[size]\n\tif !ok {\n\t\tpool = &sync.Pool{New: func() any { return &fixedBuffer{buf: make([]byte, 0, size)} }}\n\t\tbufPools[size] = pool\n\t}\n\tbufPoolsLock.Unlock()\n\treturn pool.Get().(*fixedBuffer)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/fswriters.go",
    "content": "package ioutils\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n)\n\n// AtomicFileWriterOptions specifies options for creating the atomic file writer.\ntype AtomicFileWriterOptions struct {\n\t// NoSync specifies whether the sync call must be skipped for the file.\n\t// If NoSync is not specified, the file is synced to the\n\t// storage after it has been written and before it is moved to\n\t// the specified path.\n\tNoSync bool\n\t// On successful return from Close() this is set to the mtime of the\n\t// newly written file.\n\tModTime time.Time\n\t// Specifies whether Commit() must be explicitly called to write state\n\t// to the destination. This allows an application to preserve the original\n\t// file when an error occurs during processing (and not just during write)\n\t// The default is false, which will auto-commit on Close\n\tExplicitCommit bool\n}\n\ntype CommittableWriter interface {\n\tio.WriteCloser\n\n\t// Commit closes the temporary file associated with this writer, and\n\t// provided no errors (during commit or previously during write operations),\n\t// will publish the completed file under the intended destination.\n\tCommit() error\n}\n\nvar defaultWriterOptions = AtomicFileWriterOptions{}\n\n// SetDefaultOptions overrides the default options used when creating an\n// atomic file writer.\nfunc SetDefaultOptions(opts AtomicFileWriterOptions) {\n\tdefaultWriterOptions = opts\n}\n\n// NewAtomicFileWriterWithOpts returns a CommittableWriter so that writing to it\n// writes to a temporary file, which can later be committed to a destination path,\n// either by Closing in the case of auto-commit, or manually calling commit if the\n// ExplicitCommit option is enabled. Writing and closing concurrently is not\n// allowed.\nfunc NewAtomicFileWriterWithOpts(filename string, perm os.FileMode, opts *AtomicFileWriterOptions) (CommittableWriter, error) {\n\treturn newAtomicFileWriter(filename, perm, opts)\n}\n\n// newAtomicFileWriter returns a CommittableWriter so that writing to it writes to\n// a temporary file, which can later be committed to a destination path, either by\n// Closing in the case of auto-commit, or manually calling commit if the\n// ExplicitCommit option is enabled. Writing and closing concurrently is not allowed.\nfunc newAtomicFileWriter(filename string, perm os.FileMode, opts *AtomicFileWriterOptions) (*atomicFileWriter, error) {\n\tf, err := os.CreateTemp(filepath.Dir(filename), \".tmp-\"+filepath.Base(filename))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif opts == nil {\n\t\topts = &defaultWriterOptions\n\t}\n\tabspath, err := filepath.Abs(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &atomicFileWriter{\n\t\tf:              f,\n\t\tfn:             abspath,\n\t\tperm:           perm,\n\t\tnoSync:         opts.NoSync,\n\t\texplicitCommit: opts.ExplicitCommit,\n\t}, nil\n}\n\n// NewAtomicFileWriterWithOpts returns a CommittableWriter, with auto-commit enabled.\n// Writing to it writes to a temporary file and closing it atomically changes the\n// temporary file to destination path. Writing and closing concurrently is not allowed.\nfunc NewAtomicFileWriter(filename string, perm os.FileMode) (CommittableWriter, error) {\n\treturn NewAtomicFileWriterWithOpts(filename, perm, nil)\n}\n\n// AtomicWriteFile atomically writes data to a file named by filename.\nfunc AtomicWriteFileWithOpts(filename string, data []byte, perm os.FileMode, opts *AtomicFileWriterOptions) error {\n\tf, err := newAtomicFileWriter(filename, perm, opts)\n\tif err != nil {\n\t\treturn err\n\t}\n\tn, err := f.Write(data)\n\tif err == nil && n < len(data) {\n\t\terr = io.ErrShortWrite\n\t\tf.writeErr = err\n\t}\n\tif err1 := f.Close(); err == nil {\n\t\terr = err1\n\t}\n\n\tif opts != nil {\n\t\topts.ModTime = f.modTime\n\t}\n\n\treturn err\n}\n\nfunc AtomicWriteFile(filename string, data []byte, perm os.FileMode) error {\n\treturn AtomicWriteFileWithOpts(filename, data, perm, nil)\n}\n\ntype atomicFileWriter struct {\n\tf              *os.File\n\tfn             string\n\twriteErr       error\n\tperm           os.FileMode\n\tnoSync         bool\n\tmodTime        time.Time\n\tclosed         bool\n\texplicitCommit bool\n}\n\nfunc (w *atomicFileWriter) Write(dt []byte) (int, error) {\n\tn, err := w.f.Write(dt)\n\tif err != nil {\n\t\tw.writeErr = err\n\t}\n\treturn n, err\n}\n\nfunc (w *atomicFileWriter) closeTempFile() error {\n\tif w.closed {\n\t\treturn nil\n\t}\n\n\tw.closed = true\n\treturn w.f.Close()\n}\n\nfunc (w *atomicFileWriter) Close() error {\n\treturn w.complete(!w.explicitCommit)\n}\n\nfunc (w *atomicFileWriter) Commit() error {\n\treturn w.complete(true)\n}\n\nfunc (w *atomicFileWriter) complete(commit bool) (retErr error) {\n\tif w == nil || w.closed {\n\t\treturn nil\n\t}\n\n\tdefer func() {\n\t\terr := w.closeTempFile()\n\t\tif retErr != nil || w.writeErr != nil {\n\t\t\tos.Remove(w.f.Name())\n\t\t}\n\t\tif retErr == nil {\n\t\t\tretErr = err\n\t\t}\n\t}()\n\n\tif commit {\n\t\treturn w.commitState()\n\t}\n\n\treturn nil\n}\n\nfunc (w *atomicFileWriter) commitState() error {\n\t// Perform a data only sync (fdatasync()) if supported\n\tif err := w.postDataWrittenSync(); err != nil {\n\t\treturn err\n\t}\n\n\t// Capture fstat before closing the fd\n\tinfo, err := w.f.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\tw.modTime = info.ModTime()\n\n\tif err := w.f.Chmod(w.perm); err != nil {\n\t\treturn err\n\t}\n\n\t// Perform full sync on platforms that need it\n\tif err := w.preRenameSync(); err != nil {\n\t\treturn err\n\t}\n\n\t// Some platforms require closing before rename (Windows)\n\tif err := w.closeTempFile(); err != nil {\n\t\treturn err\n\t}\n\n\tif w.writeErr == nil {\n\t\treturn os.Rename(w.f.Name(), w.fn)\n\t}\n\n\treturn nil\n}\n\n// AtomicWriteSet is used to atomically write a set\n// of files and ensure they are visible at the same time.\n// Must be committed to a new directory.\ntype AtomicWriteSet struct {\n\troot string\n}\n\n// NewAtomicWriteSet creates a new atomic write set to\n// atomically create a set of files. The given directory\n// is used as the base directory for storing files before\n// commit. If no temporary directory is given the system\n// default is used.\nfunc NewAtomicWriteSet(tmpDir string) (*AtomicWriteSet, error) {\n\ttd, err := os.MkdirTemp(tmpDir, \"write-set-\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &AtomicWriteSet{\n\t\troot: td,\n\t}, nil\n}\n\n// WriteFile writes a file to the set, guaranteeing the file\n// has been synced.\nfunc (ws *AtomicWriteSet) WriteFile(filename string, data []byte, perm os.FileMode) error {\n\tf, err := ws.FileWriter(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)\n\tif err != nil {\n\t\treturn err\n\t}\n\tn, err := f.Write(data)\n\tif err == nil && n < len(data) {\n\t\terr = io.ErrShortWrite\n\t}\n\tif err1 := f.Close(); err == nil {\n\t\terr = err1\n\t}\n\treturn err\n}\n\ntype syncFileCloser struct {\n\t*os.File\n}\n\nfunc (w syncFileCloser) Close() error {\n\tif !defaultWriterOptions.NoSync {\n\t\treturn w.File.Close()\n\t}\n\terr := dataOrFullSync(w.File)\n\tif err1 := w.File.Close(); err == nil {\n\t\terr = err1\n\t}\n\treturn err\n}\n\n// FileWriter opens a file writer inside the set. The file\n// should be synced and closed before calling commit.\nfunc (ws *AtomicWriteSet) FileWriter(name string, flag int, perm os.FileMode) (io.WriteCloser, error) {\n\tf, err := os.OpenFile(filepath.Join(ws.root, name), flag, perm)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn syncFileCloser{f}, nil\n}\n\n// Cancel cancels the set and removes all temporary data\n// created in the set.\nfunc (ws *AtomicWriteSet) Cancel() error {\n\treturn os.RemoveAll(ws.root)\n}\n\n// Commit moves all created files to the target directory. The\n// target directory must not exist and the parent of the target\n// directory must exist.\nfunc (ws *AtomicWriteSet) Commit(target string) error {\n\treturn os.Rename(ws.root, target)\n}\n\n// String returns the location the set is writing to.\nfunc (ws *AtomicWriteSet) String() string {\n\treturn ws.root\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/fswriters_linux.go",
    "content": "package ioutils\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc dataOrFullSync(f *os.File) error {\n\treturn unix.Fdatasync(int(f.Fd()))\n}\n\nfunc (w *atomicFileWriter) postDataWrittenSync() error {\n\tif w.noSync {\n\t\treturn nil\n\t}\n\treturn unix.Fdatasync(int(w.f.Fd()))\n}\n\nfunc (w *atomicFileWriter) preRenameSync() error {\n\t// On Linux data can be reliably flushed to media without metadata, so defer\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/fswriters_other.go",
    "content": "//go:build !linux\n\npackage ioutils\n\nimport (\n\t\"os\"\n)\n\nfunc dataOrFullSync(f *os.File) error {\n\treturn f.Sync()\n}\n\nfunc (w *atomicFileWriter) postDataWrittenSync() error {\n\t// many platforms (Mac, Windows) require a full sync to reliably flush to media\n\treturn nil\n}\n\nfunc (w *atomicFileWriter) preRenameSync() error {\n\tif w.noSync {\n\t\treturn nil\n\t}\n\n\t// fsync() on Non-linux Unix, FlushFileBuffers (Windows), F_FULLFSYNC (Mac)\n\treturn w.f.Sync()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/readers.go",
    "content": "package ioutils\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"io\"\n)\n\ntype readCloserWrapper struct {\n\tio.Reader\n\tcloser func() error\n}\n\nfunc (r *readCloserWrapper) Close() error {\n\treturn r.closer()\n}\n\ntype readWriteToCloserWrapper struct {\n\tio.Reader\n\tio.WriterTo\n\tcloser func() error\n}\n\nfunc (r *readWriteToCloserWrapper) Close() error {\n\treturn r.closer()\n}\n\n// NewReadCloserWrapper returns a new io.ReadCloser.\nfunc NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser {\n\tif wt, ok := r.(io.WriterTo); ok {\n\t\treturn &readWriteToCloserWrapper{\n\t\t\tReader:   r,\n\t\t\tWriterTo: wt,\n\t\t\tcloser:   closer,\n\t\t}\n\t}\n\treturn &readCloserWrapper{\n\t\tReader: r,\n\t\tcloser: closer,\n\t}\n}\n\ntype readerErrWrapper struct {\n\treader io.Reader\n\tcloser func()\n}\n\nfunc (r *readerErrWrapper) Read(p []byte) (int, error) {\n\tn, err := r.reader.Read(p)\n\tif err != nil {\n\t\tr.closer()\n\t}\n\treturn n, err\n}\n\n// NewReaderErrWrapper returns a new io.Reader.\nfunc NewReaderErrWrapper(r io.Reader, closer func()) io.Reader {\n\treturn &readerErrWrapper{\n\t\treader: r,\n\t\tcloser: closer,\n\t}\n}\n\n// HashData returns the sha256 sum of src.\nfunc HashData(src io.Reader) (string, error) {\n\th := sha256.New()\n\tif _, err := io.Copy(h, src); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn \"sha256:\" + hex.EncodeToString(h.Sum(nil)), nil\n}\n\n// OnEOFReader wraps an io.ReadCloser and a function\n// the function will run at the end of file or close the file.\ntype OnEOFReader struct {\n\tRc io.ReadCloser\n\tFn func()\n}\n\nfunc (r *OnEOFReader) Read(p []byte) (n int, err error) {\n\tn, err = r.Rc.Read(p)\n\tif err == io.EOF {\n\t\tr.runFunc()\n\t}\n\treturn n, err\n}\n\n// Close closes the file and run the function.\nfunc (r *OnEOFReader) Close() error {\n\terr := r.Rc.Close()\n\tr.runFunc()\n\treturn err\n}\n\nfunc (r *OnEOFReader) runFunc() {\n\tif fn := r.Fn; fn != nil {\n\t\tfn()\n\t\tr.Fn = nil\n\t}\n}\n\n// cancelReadCloser wraps an io.ReadCloser with a context for cancelling read\n// operations.\ntype cancelReadCloser struct {\n\tcancel func()\n\tpR     *io.PipeReader // Stream to read from\n\tpW     *io.PipeWriter\n}\n\n// NewCancelReadCloser creates a wrapper that closes the ReadCloser when the\n// context is cancelled. The returned io.ReadCloser must be closed when it is\n// no longer needed.\nfunc NewCancelReadCloser(ctx context.Context, in io.ReadCloser) io.ReadCloser {\n\tpR, pW := io.Pipe()\n\n\t// Create a context used to signal when the pipe is closed\n\tdoneCtx, cancel := context.WithCancel(context.Background())\n\n\tp := &cancelReadCloser{\n\t\tcancel: cancel,\n\t\tpR:     pR,\n\t\tpW:     pW,\n\t}\n\n\tgo func() {\n\t\t_, err := io.Copy(pW, in)\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\t// If the context was closed, p.closeWithError\n\t\t\t// was already called. Calling it again would\n\t\t\t// change the error that Read returns.\n\t\tdefault:\n\t\t\tp.closeWithError(err)\n\t\t}\n\t\tin.Close()\n\t}()\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\tp.closeWithError(ctx.Err())\n\t\t\tcase <-doneCtx.Done():\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\n\treturn p\n}\n\n// Read wraps the Read method of the pipe that provides data from the wrapped\n// ReadCloser.\nfunc (p *cancelReadCloser) Read(buf []byte) (n int, err error) {\n\treturn p.pR.Read(buf)\n}\n\n// closeWithError closes the wrapper and its underlying reader. It will\n// cause future calls to Read to return err.\nfunc (p *cancelReadCloser) closeWithError(err error) {\n\tp.pW.CloseWithError(err)\n\tp.cancel()\n}\n\n// Close closes the wrapper its underlying reader. It will cause\n// future calls to Read to return io.EOF.\nfunc (p *cancelReadCloser) Close() error {\n\tp.closeWithError(io.EOF)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/temp_unix.go",
    "content": "//go:build !windows\n\npackage ioutils\n\nimport \"os\"\n\n// TempDir on Unix systems is equivalent to os.MkdirTemp.\nfunc TempDir(dir, prefix string) (string, error) {\n\treturn os.MkdirTemp(dir, prefix)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/temp_windows.go",
    "content": "//go:build windows\n\npackage ioutils\n\nimport (\n\t\"os\"\n\n\t\"go.podman.io/storage/pkg/longpath\"\n)\n\n// TempDir is the equivalent of os.MkdirTemp, except that the result is in Windows longpath format.\nfunc TempDir(dir, prefix string) (string, error) {\n\ttempDir, err := os.MkdirTemp(dir, prefix)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn longpath.AddPrefix(tempDir), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/writeflusher.go",
    "content": "package ioutils\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\n// WriteFlusher wraps the Write and Flush operation ensuring that every write\n// is a flush. In addition, the Close method can be called to intercept\n// Read/Write calls if the targets lifecycle has already ended.\ntype WriteFlusher struct {\n\tw           io.Writer\n\tflusher     flusher\n\tflushed     chan struct{}\n\tflushedOnce sync.Once\n\tclosed      chan struct{}\n\tcloseLock   sync.Mutex\n}\n\ntype flusher interface {\n\tFlush()\n}\n\nvar errWriteFlusherClosed = io.EOF\n\nfunc (wf *WriteFlusher) Write(b []byte) (n int, err error) {\n\tselect {\n\tcase <-wf.closed:\n\t\treturn 0, errWriteFlusherClosed\n\tdefault:\n\t}\n\n\tn, err = wf.w.Write(b)\n\twf.Flush() // every write is a flush.\n\treturn n, err\n}\n\n// Flush the stream immediately.\nfunc (wf *WriteFlusher) Flush() {\n\tselect {\n\tcase <-wf.closed:\n\t\treturn\n\tdefault:\n\t}\n\n\twf.flushedOnce.Do(func() {\n\t\tclose(wf.flushed)\n\t})\n\twf.flusher.Flush()\n}\n\n// Flushed returns the state of flushed.\n// If it's flushed, return true, or else it return false.\nfunc (wf *WriteFlusher) Flushed() bool {\n\t// BUG(stevvooe): Remove this method. Its use is inherently racy. Seems to\n\t// be used to detect whether or a response code has been issued or not.\n\t// Another hook should be used instead.\n\tvar flushed bool\n\tselect {\n\tcase <-wf.flushed:\n\t\tflushed = true\n\tdefault:\n\t}\n\treturn flushed\n}\n\n// Close closes the write flusher, disallowing any further writes to the\n// target. After the flusher is closed, all calls to write or flush will\n// result in an error.\nfunc (wf *WriteFlusher) Close() error {\n\twf.closeLock.Lock()\n\tdefer wf.closeLock.Unlock()\n\n\tselect {\n\tcase <-wf.closed:\n\t\treturn errWriteFlusherClosed\n\tdefault:\n\t\tclose(wf.closed)\n\t}\n\treturn nil\n}\n\n// NewWriteFlusher returns a new WriteFlusher.\nfunc NewWriteFlusher(w io.Writer) *WriteFlusher {\n\tvar fl flusher\n\tif f, ok := w.(flusher); ok {\n\t\tfl = f\n\t} else {\n\t\tfl = &NopFlusher{}\n\t}\n\treturn &WriteFlusher{w: w, flusher: fl, closed: make(chan struct{}), flushed: make(chan struct{})}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/ioutils/writers.go",
    "content": "package ioutils\n\nimport \"io\"\n\n// NopWriter represents a type which write operation is nop.\ntype NopWriter struct{}\n\nfunc (*NopWriter) Write(buf []byte) (int, error) {\n\treturn len(buf), nil\n}\n\ntype nopWriteCloser struct {\n\tio.Writer\n}\n\nfunc (w *nopWriteCloser) Close() error { return nil }\n\n// NopWriteCloser returns a nopWriteCloser.\nfunc NopWriteCloser(w io.Writer) io.WriteCloser {\n\treturn &nopWriteCloser{w}\n}\n\n// NopFlusher represents a type which flush operation is nop.\ntype NopFlusher struct{}\n\n// Flush is a nop operation.\nfunc (f *NopFlusher) Flush() {}\n\ntype writeCloserWrapper struct {\n\tio.Writer\n\tcloser func() error\n}\n\nfunc (r *writeCloserWrapper) Close() error {\n\treturn r.closer()\n}\n\n// NewWriteCloserWrapper returns a new io.WriteCloser.\nfunc NewWriteCloserWrapper(w io.Writer, closer func() error) io.WriteCloser {\n\treturn &writeCloserWrapper{\n\t\tWriter: w,\n\t\tcloser: closer,\n\t}\n}\n\n// WriteCounter wraps a concrete io.Writer and hold a count of the number\n// of bytes written to the writer during a \"session\".\n// This can be convenient when write return is masked\n// (e.g., json.Encoder.Encode())\ntype WriteCounter struct {\n\tCount  int64\n\tWriter io.Writer\n}\n\n// NewWriteCounter returns a new WriteCounter.\nfunc NewWriteCounter(w io.Writer) *WriteCounter {\n\treturn &WriteCounter{\n\t\tWriter: w,\n\t}\n}\n\nfunc (wc *WriteCounter) Write(p []byte) (int, error) {\n\tcount, err := wc.Writer.Write(p)\n\twc.Count += int64(count)\n\treturn count, err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/lockfile/lastwrite.go",
    "content": "package lockfile\n\nimport (\n\t\"bytes\"\n\tcryptorand \"crypto/rand\"\n\t\"encoding/binary\"\n\t\"os\"\n\t\"sync/atomic\"\n\t\"time\"\n)\n\n// LastWrite is an opaque identifier of the last write to some *LockFile.\n// It can be used by users of a *LockFile to determine if the lock indicates changes\n// since the last check.\n//\n// Never construct a LastWrite manually; only accept it from *LockFile methods, and pass it back.\ntype LastWrite struct {\n\t// Never modify fields of a LastWrite object; it has value semantics.\n\tstate []byte // Contents of the lock file.\n}\n\nvar lastWriterIDCounter uint64 // Private state for newLastWriterID\n\nconst lastWriterIDSize = 64 // This must be the same as len(stringid.GenerateRandomID)\n// newLastWrite returns a new \"last write\" ID.\n// The value must be different on every call, and also differ from values\n// generated by other processes.\nfunc newLastWrite() LastWrite {\n\t// The ID is (PID, time, per-process counter, random)\n\t// PID + time represents both a unique process across reboots,\n\t// and a specific time within the process; the per-process counter\n\t// is an extra safeguard for in-process concurrency.\n\t// The random part disambiguates across process namespaces\n\t// (where PID values might collide), serves as a general-purpose\n\t// extra safety, _and_ is used to pad the output to lastWriterIDSize,\n\t// because other versions of this code exist and they don't work\n\t// efficiently if the size of the value changes.\n\tpid := os.Getpid()\n\ttm := time.Now().UnixNano()\n\tcounter := atomic.AddUint64(&lastWriterIDCounter, 1)\n\n\tres := make([]byte, lastWriterIDSize)\n\tbinary.LittleEndian.PutUint64(res[0:8], uint64(tm))\n\tbinary.LittleEndian.PutUint64(res[8:16], counter)\n\tbinary.LittleEndian.PutUint32(res[16:20], uint32(pid))\n\tif n, err := cryptorand.Read(res[20:lastWriterIDSize]); err != nil || n != lastWriterIDSize-20 {\n\t\tpanic(err) // This shouldn't happen\n\t}\n\n\treturn LastWrite{\n\t\tstate: res,\n\t}\n}\n\n// serialize returns bytes to write to the lock file to represent the specified write.\nfunc (lw LastWrite) serialize() []byte {\n\tif lw.state == nil {\n\t\tpanic(\"LastWrite.serialize on an uninitialized object\")\n\t}\n\treturn lw.state\n}\n\n// Equals returns true if lw matches other\nfunc (lw LastWrite) equals(other LastWrite) bool {\n\tif lw.state == nil {\n\t\tpanic(\"LastWrite.equals on an uninitialized object\")\n\t}\n\tif other.state == nil {\n\t\tpanic(\"LastWrite.equals with an uninitialized counterparty\")\n\t}\n\treturn bytes.Equal(lw.state, other.state)\n}\n\n// newLastWriteFromData returns a LastWrite corresponding to data that came from a previous LastWrite.serialize\nfunc newLastWriteFromData(serialized []byte) LastWrite {\n\tif serialized == nil {\n\t\tpanic(\"newLastWriteFromData with nil data\")\n\t}\n\treturn LastWrite{\n\t\tstate: serialized,\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/lockfile/lockfile.go",
    "content": "package lockfile\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"time\"\n\n\t\"go.podman.io/storage/internal/rawfilelock\"\n)\n\n// A Locker represents a file lock where the file is used to cache an\n// identifier of the last party that made changes to whatever's being protected\n// by the lock.\n//\n// Deprecated: Refer directly to *LockFile, the provided implementation, instead.\ntype Locker interface {\n\t// Acquire a writer lock.\n\t// The default unix implementation panics if:\n\t// - opening the lockfile failed\n\t// - tried to lock a read-only lock-file\n\tLock()\n\n\t// Unlock the lock.\n\t// The default unix implementation panics if:\n\t// - unlocking an unlocked lock\n\t// - if the lock counter is corrupted\n\tUnlock()\n\n\t// Acquire a reader lock.\n\tRLock()\n\n\t// Touch records, for others sharing the lock, that the caller was the\n\t// last writer.  It should only be called with the lock held.\n\t//\n\t// Deprecated: Use *LockFile.RecordWrite.\n\tTouch() error\n\n\t// Modified() checks if the most recent writer was a party other than the\n\t// last recorded writer.  It should only be called with the lock held.\n\t// Deprecated: Use *LockFile.ModifiedSince.\n\tModified() (bool, error)\n\n\t// TouchedSince() checks if the most recent writer modified the file (likely using Touch()) after the specified time.\n\tTouchedSince(when time.Time) bool\n\n\t// IsReadWrite() checks if the lock file is read-write\n\tIsReadWrite() bool\n\n\t// AssertLocked() can be used by callers that _know_ that they hold the lock (for reading or writing), for sanity checking.\n\t// It might do nothing at all, or it may panic if the caller is not the owner of this lock.\n\tAssertLocked()\n\n\t// AssertLockedForWriting() can be used by callers that _know_ that they hold the lock locked for writing, for sanity checking.\n\t// It might do nothing at all, or it may panic if the caller is not the owner of this lock for writing.\n\tAssertLockedForWriting()\n}\n\n// LockFile represents a file lock where the file is used to cache an\n// identifier of the last party that made changes to whatever's being protected\n// by the lock.\n//\n// It MUST NOT be created manually. Use GetLockFile or GetROLockFile instead.\ntype LockFile struct {\n\t// The following fields are only set when constructing *LockFile, and must never be modified afterwards.\n\t// They are safe to access without any other locking.\n\tfile string\n\tro   bool\n\n\t// rwMutex serializes concurrent reader-writer acquisitions in the same process space\n\trwMutex *sync.RWMutex\n\t// stateMutex is used to synchronize concurrent accesses to the state below\n\tstateMutex *sync.Mutex\n\tcounter    int64\n\tlw         LastWrite // A global value valid as of the last .Touch() or .Modified()\n\tlockType   rawfilelock.LockType\n\tlocked     bool\n\t// The following fields are only modified on transitions between counter == 0 / counter != 0.\n\t// Thus, they can be safely accessed by users _that currently hold the LockFile_ without locking.\n\t// In other cases, they need to be protected using stateMutex.\n\tfd rawfilelock.FileHandle\n}\n\nvar (\n\tlockFiles     map[string]*LockFile\n\tlockFilesLock sync.Mutex\n)\n\n// GetLockFile opens a read-write lock file, creating it if necessary.  The\n// *LockFile object may already be locked if the path has already been requested\n// by the current process.\nfunc GetLockFile(path string) (*LockFile, error) {\n\treturn getLockfile(path, false)\n}\n\n// GetLockfile opens a read-write lock file, creating it if necessary.  The\n// Locker object may already be locked if the path has already been requested\n// by the current process.\n//\n// Deprecated: Use GetLockFile\nfunc GetLockfile(path string) (Locker, error) {\n\treturn GetLockFile(path)\n}\n\n// GetROLockFile opens a read-only lock file, creating it if necessary.  The\n// *LockFile object may already be locked if the path has already been requested\n// by the current process.\nfunc GetROLockFile(path string) (*LockFile, error) {\n\treturn getLockfile(path, true)\n}\n\n// GetROLockfile opens a read-only lock file, creating it if necessary.  The\n// Locker object may already be locked if the path has already been requested\n// by the current process.\n//\n// Deprecated: Use GetROLockFile\nfunc GetROLockfile(path string) (Locker, error) {\n\treturn GetROLockFile(path)\n}\n\n// Lock locks the lockfile as a writer.  Panic if the lock is a read-only one.\nfunc (l *LockFile) Lock() {\n\tif l.ro {\n\t\tpanic(\"can't take write lock on read-only lock file\")\n\t}\n\tl.lock(rawfilelock.WriteLock)\n}\n\n// RLock locks the lockfile as a reader.\nfunc (l *LockFile) RLock() {\n\tl.lock(rawfilelock.ReadLock)\n}\n\n// TryLock attempts to lock the lockfile as a writer.  Panic if the lock is a read-only one.\nfunc (l *LockFile) TryLock() error {\n\tif l.ro {\n\t\tpanic(\"can't take write lock on read-only lock file\")\n\t}\n\treturn l.tryLock(rawfilelock.WriteLock)\n}\n\n// TryRLock attempts to lock the lockfile as a reader.\nfunc (l *LockFile) TryRLock() error {\n\treturn l.tryLock(rawfilelock.ReadLock)\n}\n\n// Unlock unlocks the lockfile.\nfunc (l *LockFile) Unlock() {\n\tl.stateMutex.Lock()\n\tif !l.locked {\n\t\t// Panic when unlocking an unlocked lock.  That's a violation\n\t\t// of the lock semantics and will reveal such.\n\t\tpanic(\"calling Unlock on unlocked lock\")\n\t}\n\tl.counter--\n\tif l.counter < 0 {\n\t\t// Panic when the counter is negative.  There is no way we can\n\t\t// recover from a corrupted lock and we need to protect the\n\t\t// storage from corruption.\n\t\tpanic(fmt.Sprintf(\"lock %q has been unlocked too often\", l.file))\n\t}\n\tif l.counter == 0 {\n\t\t// We should only release the lock when the counter is 0 to\n\t\t// avoid releasing read-locks too early; a given process may\n\t\t// acquire a read lock multiple times.\n\t\tl.locked = false\n\t\t// Close the file descriptor on the last unlock, releasing the\n\t\t// file lock.\n\t\trawfilelock.UnlockAndCloseHandle(l.fd)\n\t}\n\tif l.lockType == rawfilelock.ReadLock {\n\t\tl.rwMutex.RUnlock()\n\t} else {\n\t\tl.rwMutex.Unlock()\n\t}\n\tl.stateMutex.Unlock()\n}\n\nfunc (l *LockFile) AssertLocked() {\n\t// DO NOT provide a variant that returns the value of l.locked.\n\t//\n\t// If the caller does not hold the lock, l.locked might nevertheless be true because another goroutine does hold it, and\n\t// we can’t tell the difference.\n\t//\n\t// Hence, this “AssertLocked” method, which exists only for sanity checks.\n\n\t// Don’t even bother with l.stateMutex: The caller is expected to hold the lock, and in that case l.locked is constant true\n\t// with no possible writers.\n\t// If the caller does not hold the lock, we are violating the locking/memory model anyway, and accessing the data\n\t// without the lock is more efficient for callers, and potentially more visible to lock analysers for incorrect callers.\n\tif !l.locked {\n\t\tpanic(\"internal error: lock is not held by the expected owner\")\n\t}\n}\n\nfunc (l *LockFile) AssertLockedForWriting() {\n\t// DO NOT provide a variant that returns the current lock state.\n\t//\n\t// The same caveats as for AssertLocked apply equally.\n\n\tl.AssertLocked()\n\t// Like AssertLocked, don’t even bother with l.stateMutex.\n\tif l.lockType == rawfilelock.ReadLock {\n\t\tpanic(\"internal error: lock is not held for writing\")\n\t}\n}\n\n// ModifiedSince checks if the lock has been changed since a provided LastWrite value,\n// and returns the one to record instead.\n//\n// If ModifiedSince reports no modification, the previous LastWrite value\n// is still valid and can continue to be used.\n//\n// If this function fails, the LastWriter value of the lock is indeterminate;\n// the caller should fail and keep using the previously-recorded LastWrite value,\n// so that it continues failing until the situation is resolved. Similarly,\n// it should only update the recorded LastWrite value after processing the update:\n//\n//\tlw2, modified, err := state.lock.ModifiedSince(state.lastWrite)\n//\tif err != nil { /* fail */ }\n//\tstate.lastWrite = lw2\n//\tif modified {\n//\t\tif err := reload(); err != nil { /* fail */ }\n//\t\tstate.lastWrite = lw2\n//\t}\n//\n// The caller must hold the lock (for reading or writing).\nfunc (l *LockFile) ModifiedSince(previous LastWrite) (LastWrite, bool, error) {\n\tl.AssertLocked()\n\tcurrentLW, err := l.GetLastWrite()\n\tif err != nil {\n\t\treturn LastWrite{}, false, err\n\t}\n\tmodified := !previous.equals(currentLW)\n\treturn currentLW, modified, nil\n}\n\n// Modified indicates if the lockfile has been updated since the last time it\n// was loaded.\n// NOTE: Unlike ModifiedSince, this returns true the first time it is called on a *LockFile.\n// Callers cannot, in general, rely on this, because that might have happened for some other\n// owner of the same *LockFile who created it previously.\n//\n// Deprecated: Use *LockFile.ModifiedSince.\nfunc (l *LockFile) Modified() (bool, error) {\n\tl.stateMutex.Lock()\n\tif !l.locked {\n\t\tpanic(\"attempted to check last-writer in lockfile without locking it first\")\n\t}\n\tdefer l.stateMutex.Unlock()\n\toldLW := l.lw\n\t// Note that this is called with stateMutex held; that’s fine because ModifiedSince doesn’t need to lock it.\n\tcurrentLW, modified, err := l.ModifiedSince(oldLW)\n\tif err != nil {\n\t\treturn true, err\n\t}\n\tl.lw = currentLW\n\treturn modified, nil\n}\n\n// Touch updates the lock file with to record that the current lock holder has modified the lock-protected data.\n//\n// Deprecated: Use *LockFile.RecordWrite.\nfunc (l *LockFile) Touch() error {\n\tlw, err := l.RecordWrite()\n\tif err != nil {\n\t\treturn err\n\t}\n\tl.stateMutex.Lock()\n\tif !l.locked || (l.lockType == rawfilelock.ReadLock) {\n\t\tpanic(\"attempted to update last-writer in lockfile without the write lock\")\n\t}\n\tdefer l.stateMutex.Unlock()\n\tl.lw = lw\n\treturn nil\n}\n\n// IsReadWrite indicates if the lock file is a read-write lock.\nfunc (l *LockFile) IsReadWrite() bool {\n\treturn !l.ro\n}\n\n// getLockFile returns a *LockFile object, possibly (depending on the platform)\n// working inter-process, and associated with the specified path.\n//\n// If ro, the lock is a read-write lock and the returned *LockFile should correspond to the\n// “lock for reading” (shared) operation; otherwise, the lock is either an exclusive lock,\n// or a read-write lock and *LockFile should correspond to the “lock for writing” (exclusive) operation.\n//\n// WARNING:\n// - The lock may or MAY NOT be inter-process.\n// - There may or MAY NOT be an actual object on the filesystem created for the specified path.\n// - Even if ro, the lock MAY be exclusive.\nfunc getLockfile(path string, ro bool) (*LockFile, error) {\n\tlockFilesLock.Lock()\n\tdefer lockFilesLock.Unlock()\n\tif lockFiles == nil {\n\t\tlockFiles = make(map[string]*LockFile)\n\t}\n\tcleanPath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"ensuring that path %q is an absolute path: %w\", path, err)\n\t}\n\tif lockFile, ok := lockFiles[cleanPath]; ok {\n\t\tif ro && lockFile.IsReadWrite() {\n\t\t\treturn nil, fmt.Errorf(\"lock %q is not a read-only lock\", cleanPath)\n\t\t}\n\t\tif !ro && !lockFile.IsReadWrite() {\n\t\t\treturn nil, fmt.Errorf(\"lock %q is not a read-write lock\", cleanPath)\n\t\t}\n\t\treturn lockFile, nil\n\t}\n\tlockFile, err := createLockFileForPath(cleanPath, ro) // platform-dependent LockFile\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlockFiles[cleanPath] = lockFile\n\treturn lockFile, nil\n}\n\n// openLock opens a lock file at the specified path, creating the parent directory if it does not exist.\nfunc openLock(path string, readOnly bool) (rawfilelock.FileHandle, error) {\n\tfd, err := rawfilelock.OpenLock(path, readOnly)\n\tif err == nil {\n\t\treturn fd, nil\n\t}\n\n\t// the directory of the lockfile seems to be removed, try to create it\n\tif os.IsNotExist(err) {\n\t\tif err := os.MkdirAll(filepath.Dir(path), 0o700); err != nil {\n\t\t\treturn fd, fmt.Errorf(\"creating lock file directory: %w\", err)\n\t\t}\n\n\t\treturn openLock(path, readOnly)\n\t}\n\treturn fd, &os.PathError{Op: \"open\", Path: path, Err: err}\n}\n\n// createLockFileForPath returns new *LockFile object, possibly (depending on the platform)\n// working inter-process and associated with the specified path.\n//\n// This function will be called at most once for each path value within a single process.\n//\n// If ro, the lock is a read-write lock and the returned *LockFile should correspond to the\n// “lock for reading” (shared) operation; otherwise, the lock is either an exclusive lock,\n// or a read-write lock and *LockFile should correspond to the “lock for writing” (exclusive) operation.\n//\n// WARNING:\n// - The lock may or MAY NOT be inter-process.\n// - There may or MAY NOT be an actual object on the filesystem created for the specified path.\n// - Even if ro, the lock MAY be exclusive.\nfunc createLockFileForPath(path string, ro bool) (*LockFile, error) {\n\t// Check if we can open the lock.\n\tfd, err := openLock(path, ro)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trawfilelock.UnlockAndCloseHandle(fd)\n\n\tlType := rawfilelock.WriteLock\n\tif ro {\n\t\tlType = rawfilelock.ReadLock\n\t}\n\n\treturn &LockFile{\n\t\tfile: path,\n\t\tro:   ro,\n\n\t\trwMutex:    &sync.RWMutex{},\n\t\tstateMutex: &sync.Mutex{},\n\t\tlw:         newLastWrite(), // For compatibility, the first call of .Modified() will always report a change.\n\t\tlockType:   lType,\n\t\tlocked:     false,\n\t}, nil\n}\n\n// lock locks the lockfile via syscall based on the specified type and\n// command.\nfunc (l *LockFile) lock(lType rawfilelock.LockType) {\n\tif lType == rawfilelock.ReadLock {\n\t\tl.rwMutex.RLock()\n\t} else {\n\t\tl.rwMutex.Lock()\n\t}\n\tl.stateMutex.Lock()\n\tdefer l.stateMutex.Unlock()\n\tif l.counter == 0 {\n\t\t// If we're the first reference on the lock, we need to open the file again.\n\t\tfd, err := openLock(l.file, l.ro)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tl.fd = fd\n\n\t\t// Optimization: only use the (expensive) syscall when\n\t\t// the counter is 0.  In this case, we're either the first\n\t\t// reader lock or a writer lock.\n\t\tif err := rawfilelock.LockFile(l.fd, lType); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tl.lockType = lType\n\t\tl.locked = true\n\t}\n\tl.counter++\n}\n\n// lock locks the lockfile via syscall based on the specified type and\n// command.\nfunc (l *LockFile) tryLock(lType rawfilelock.LockType) error {\n\tvar success bool\n\tvar rwMutexUnlocker func()\n\tif lType == rawfilelock.ReadLock {\n\t\tsuccess = l.rwMutex.TryRLock()\n\t\trwMutexUnlocker = l.rwMutex.RUnlock\n\t} else {\n\t\tsuccess = l.rwMutex.TryLock()\n\t\trwMutexUnlocker = l.rwMutex.Unlock\n\t}\n\tif !success {\n\t\treturn fmt.Errorf(\"resource temporarily unavailable\")\n\t}\n\tif !l.stateMutex.TryLock() {\n\t\trwMutexUnlocker()\n\t\treturn fmt.Errorf(\"resource temporarily unavailable\")\n\t}\n\tdefer l.stateMutex.Unlock()\n\tif l.counter == 0 {\n\t\t// If we're the first reference on the lock, we need to open the file again.\n\t\tfd, err := openLock(l.file, l.ro)\n\t\tif err != nil {\n\t\t\trwMutexUnlocker()\n\t\t\treturn err\n\t\t}\n\t\tl.fd = fd\n\n\t\t// Optimization: only use the (expensive) syscall when\n\t\t// the counter is 0.  In this case, we're either the first\n\t\t// reader lock or a writer lock.\n\t\tif err = rawfilelock.TryLockFile(l.fd, lType); err != nil {\n\t\t\trawfilelock.CloseHandle(fd)\n\t\t\trwMutexUnlocker()\n\t\t\treturn err\n\t\t}\n\t\tl.lockType = lType\n\t\tl.locked = true\n\t}\n\tl.counter++\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/lockfile/lockfile_unix.go",
    "content": "//go:build !windows\n\npackage lockfile\n\nimport (\n\t\"time\"\n\n\t\"go.podman.io/storage/pkg/system\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// GetLastWrite returns a LastWrite value corresponding to current state of the lock.\n// This is typically called before (_not after_) loading the state when initializing a consumer\n// of the data protected by the lock.\n// During the lifetime of the consumer, the consumer should usually call ModifiedSince instead.\n//\n// The caller must hold the lock (for reading or writing).\nfunc (l *LockFile) GetLastWrite() (LastWrite, error) {\n\tl.AssertLocked()\n\tcontents := make([]byte, lastWriterIDSize)\n\tn, err := unix.Pread(int(l.fd), contents, 0)\n\tif err != nil {\n\t\treturn LastWrite{}, err\n\t}\n\t// It is important to handle the partial read case, because\n\t// the initial size of the lock file is zero, which is a valid\n\t// state (no writes yet)\n\tcontents = contents[:n]\n\treturn newLastWriteFromData(contents), nil\n}\n\n// RecordWrite updates the lock with a new LastWrite value, and returns the new value.\n//\n// If this function fails, the LastWriter value of the lock is indeterminate;\n// the caller should keep using the previously-recorded LastWrite value,\n// and possibly detecting its own modification as an external one:\n//\n//\tlw, err := state.lock.RecordWrite()\n//\tif err != nil { /* fail */ }\n//\tstate.lastWrite = lw\n//\n// The caller must hold the lock for writing.\nfunc (l *LockFile) RecordWrite() (LastWrite, error) {\n\tl.AssertLockedForWriting()\n\tlw := newLastWrite()\n\tlockContents := lw.serialize()\n\tn, err := unix.Pwrite(int(l.fd), lockContents, 0)\n\tif err != nil {\n\t\treturn LastWrite{}, err\n\t}\n\tif n != len(lockContents) {\n\t\treturn LastWrite{}, unix.ENOSPC\n\t}\n\treturn lw, nil\n}\n\n// TouchedSince indicates if the lock file has been touched since the specified time\nfunc (l *LockFile) TouchedSince(when time.Time) bool {\n\tst, err := system.Fstat(int(l.fd))\n\tif err != nil {\n\t\treturn true\n\t}\n\tmtim := st.Mtim()\n\ttouched := time.Unix(mtim.Unix())\n\treturn when.Before(touched)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/lockfile/lockfile_windows.go",
    "content": "//go:build windows\n\npackage lockfile\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nconst (\n\treserved = 0\n\tallBytes = ^uint32(0)\n)\n\n// GetLastWrite returns a LastWrite value corresponding to current state of the lock.\n// This is typically called before (_not after_) loading the state when initializing a consumer\n// of the data protected by the lock.\n// During the lifetime of the consumer, the consumer should usually call ModifiedSince instead.\n//\n// The caller must hold the lock (for reading or writing) before this function is called.\nfunc (l *LockFile) GetLastWrite() (LastWrite, error) {\n\tl.AssertLocked()\n\tcontents := make([]byte, lastWriterIDSize)\n\tol := new(windows.Overlapped)\n\tvar n uint32\n\terr := windows.ReadFile(windows.Handle(l.fd), contents, &n, ol)\n\tif err != nil && err != windows.ERROR_HANDLE_EOF {\n\t\treturn LastWrite{}, err\n\t}\n\t// It is important to handle the partial read case, because\n\t// the initial size of the lock file is zero, which is a valid\n\t// state (no writes yet)\n\tcontents = contents[:n]\n\treturn newLastWriteFromData(contents), nil\n}\n\n// RecordWrite updates the lock with a new LastWrite value, and returns the new value.\n//\n// If this function fails, the LastWriter value of the lock is indeterminate;\n// the caller should keep using the previously-recorded LastWrite value,\n// and possibly detecting its own modification as an external one:\n//\n//\tlw, err := state.lock.RecordWrite()\n//\tif err != nil { /* fail */ }\n//\tstate.lastWrite = lw\n//\n// The caller must hold the lock for writing.\nfunc (l *LockFile) RecordWrite() (LastWrite, error) {\n\tl.AssertLockedForWriting()\n\tlw := newLastWrite()\n\tlockContents := lw.serialize()\n\tol := new(windows.Overlapped)\n\tvar n uint32\n\terr := windows.WriteFile(windows.Handle(l.fd), lockContents, &n, ol)\n\tif err != nil {\n\t\treturn LastWrite{}, err\n\t}\n\tif int(n) != len(lockContents) {\n\t\treturn LastWrite{}, windows.ERROR_DISK_FULL\n\t}\n\treturn lw, nil\n}\n\n// TouchedSince indicates if the lock file has been touched since the specified time\nfunc (l *LockFile) TouchedSince(when time.Time) bool {\n\tstat, err := os.Stat(l.file)\n\tif err != nil {\n\t\treturn true\n\t}\n\treturn when.Before(stat.ModTime())\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/longpath/longpath.go",
    "content": "// longpath introduces some constants and helper functions for handling long paths\n// in Windows, which are expected to be prepended with `\\\\?\\` and followed by either\n// a drive letter, a UNC server\\share, or a volume identifier.\n\npackage longpath\n\nimport (\n\t\"strings\"\n)\n\n// Prefix is the longpath prefix for Windows file paths.\nconst Prefix = `\\\\?\\`\n\n// AddPrefix will add the Windows long path prefix to the path provided if\n// it does not already have it.\nfunc AddPrefix(path string) string {\n\tif !strings.HasPrefix(path, Prefix) {\n\t\tif strings.HasPrefix(path, `\\\\`) {\n\t\t\t// This is a UNC path, so we need to add 'UNC' to the path as well.\n\t\t\tpath = Prefix + `UNC` + path[1:]\n\t\t} else {\n\t\t\tpath = Prefix + path\n\t\t}\n\t}\n\treturn path\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/loopback/attach_loopback.go",
    "content": "//go:build linux\n\npackage loopback\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// Loopback related errors\nvar (\n\tErrAttachLoopbackDevice   = errors.New(\"loopback attach failed\")\n\tErrGetLoopbackBackingFile = errors.New(\"unable to get loopback backing file\")\n\tErrSetCapacity            = errors.New(\"unable set loopback capacity\")\n)\n\nfunc stringToLoopName(src string) [LoNameSize]uint8 {\n\tvar dst [LoNameSize]uint8\n\tcopy(dst[:], src[:])\n\treturn dst\n}\n\nfunc getNextFreeLoopbackIndex() (int, error) {\n\tf, err := os.OpenFile(\"/dev/loop-control\", os.O_RDONLY, 0o644)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer f.Close()\n\n\tindex, err := ioctlLoopCtlGetFree(f.Fd())\n\tif index < 0 {\n\t\tindex = 0\n\t}\n\treturn index, err\n}\n\nfunc openNextAvailableLoopback(sparseName string, sparseFile *os.File) (*os.File, error) {\n\t// Read information about the loopback file.\n\tvar st syscall.Stat_t\n\tif err := syscall.Fstat(int(sparseFile.Fd()), &st); err != nil {\n\t\tlogrus.Errorf(\"Reading information about loopback file %s: %v\", sparseName, err)\n\t\treturn nil, ErrAttachLoopbackDevice\n\t}\n\n\t// upper bound to avoid infinite loop\n\tremaining := 1000\n\n\t// Start looking for a free /dev/loop\n\tfor {\n\t\tif remaining == 0 {\n\t\t\tlogrus.Errorf(\"No free loopback devices available\")\n\t\t\treturn nil, ErrAttachLoopbackDevice\n\t\t}\n\t\tremaining--\n\n\t\tindex, err := getNextFreeLoopbackIndex()\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"Error retrieving the next available loopback: %s\", err)\n\t\t\treturn nil, err\n\t\t}\n\n\t\ttarget := fmt.Sprintf(\"/dev/loop%d\", index)\n\n\t\t// OpenFile adds O_CLOEXEC\n\t\tloopFile, err := os.OpenFile(target, os.O_RDWR, 0o644)\n\t\tif err != nil {\n\t\t\t// The kernel returns ENXIO when opening a device that is in the \"deleting\" or \"rundown\" state, so\n\t\t\t// just treat ENXIO as if the device does not exist.\n\t\t\tif errors.Is(err, fs.ErrNotExist) || errors.Is(err, unix.ENXIO) {\n\t\t\t\t// Another process could have taken the loopback device in the meantime.  So repeat\n\t\t\t\t// the process with the next loopback device.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlogrus.Errorf(\"Opening loopback device: %s\", err)\n\t\t\treturn nil, ErrAttachLoopbackDevice\n\t\t}\n\n\t\tfi, err := loopFile.Stat()\n\t\tif err != nil {\n\t\t\tloopFile.Close()\n\t\t\tlogrus.Errorf(\"Stat loopback device: %s\", err)\n\t\t\treturn nil, ErrAttachLoopbackDevice\n\t\t}\n\t\tif fi.Mode()&os.ModeDevice != os.ModeDevice {\n\t\t\tloopFile.Close()\n\t\t\tlogrus.Errorf(\"Loopback device %s is not a block device.\", target)\n\t\t\tcontinue\n\t\t}\n\n\t\t// Try to attach to the loop file\n\t\tif err := ioctlLoopSetFd(loopFile.Fd(), sparseFile.Fd()); err != nil {\n\t\t\tloopFile.Close()\n\n\t\t\t// If the error is EBUSY, then try the next loopback\n\t\t\tif err == syscall.EBUSY {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tlogrus.Errorf(\"Cannot set up loopback device %s: %s\", target, err)\n\t\t\treturn nil, ErrAttachLoopbackDevice\n\t\t}\n\n\t\t// Check if the loopback driver and underlying filesystem agree on the loopback file's\n\t\t// device and inode numbers.\n\t\tdev, ino, err := getLoopbackBackingFile(loopFile)\n\t\tif err != nil {\n\t\t\tlogrus.Errorf(\"Getting loopback backing file: %s\", err)\n\t\t\treturn nil, ErrGetLoopbackBackingFile\n\t\t}\n\t\tif dev != uint64(st.Dev) || ino != st.Ino { //nolint:unconvert\n\t\t\tlogrus.Errorf(\"Loopback device and filesystem disagree on device/inode for %q: %#x(%d):%#x(%d) vs %#x(%d):%#x(%d)\", sparseName, dev, dev, ino, ino, st.Dev, st.Dev, st.Ino, st.Ino)\n\t\t}\n\t\treturn loopFile, nil\n\t}\n}\n\n// AttachLoopDevice attaches the given sparse file to the next\n// available loopback device. It returns an opened *os.File.\nfunc AttachLoopDevice(sparseName string) (loop *os.File, err error) {\n\treturn attachLoopDevice(sparseName, false)\n}\n\n// AttachLoopDeviceRO attaches the given sparse file opened read-only to\n// the next available loopback device. It returns an opened *os.File.\nfunc AttachLoopDeviceRO(sparseName string) (loop *os.File, err error) {\n\treturn attachLoopDevice(sparseName, true)\n}\n\nfunc attachLoopDevice(sparseName string, readonly bool) (loop *os.File, err error) {\n\tvar sparseFile *os.File\n\n\t// OpenFile adds O_CLOEXEC\n\tif readonly {\n\t\tsparseFile, err = os.OpenFile(sparseName, os.O_RDONLY, 0o644)\n\t} else {\n\t\tsparseFile, err = os.OpenFile(sparseName, os.O_RDWR, 0o644)\n\t}\n\tif err != nil {\n\t\tlogrus.Errorf(\"Opening sparse file: %v\", err)\n\t\treturn nil, ErrAttachLoopbackDevice\n\t}\n\tdefer sparseFile.Close()\n\n\tloopFile, err := openNextAvailableLoopback(sparseName, sparseFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Set the status of the loopback device\n\tloopInfo := &loopInfo64{\n\t\tloFileName: stringToLoopName(loopFile.Name()),\n\t\tloOffset:   0,\n\t\tloFlags:    LoFlagsAutoClear,\n\t}\n\n\tif err := ioctlLoopSetStatus64(loopFile.Fd(), loopInfo); err != nil {\n\t\tlogrus.Errorf(\"Cannot set up loopback device info: %s\", err)\n\n\t\t// If the call failed, then free the loopback device\n\t\tif err := ioctlLoopClrFd(loopFile.Fd()); err != nil {\n\t\t\tlogrus.Error(\"While cleaning up the loopback device\")\n\t\t}\n\t\tloopFile.Close()\n\t\treturn nil, ErrAttachLoopbackDevice\n\t}\n\n\treturn loopFile, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/loopback/ioctl.go",
    "content": "//go:build linux\n\npackage loopback\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc ioctlLoopCtlGetFree(fd uintptr) (int, error) {\n\tindex, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, LoopCtlGetFree, 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(index), nil\n}\n\nfunc ioctlLoopSetFd(loopFd, sparseFd uintptr) error {\n\tif _, _, err := syscall.Syscall(syscall.SYS_IOCTL, loopFd, LoopSetFd, sparseFd); err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc ioctlLoopSetStatus64(loopFd uintptr, loopInfo *loopInfo64) error {\n\tif _, _, err := syscall.Syscall(syscall.SYS_IOCTL, loopFd, LoopSetStatus64, uintptr(unsafe.Pointer(loopInfo))); err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc ioctlLoopClrFd(loopFd uintptr) error {\n\tif _, _, err := syscall.Syscall(syscall.SYS_IOCTL, loopFd, LoopClrFd, 0); err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc ioctlLoopGetStatus64(loopFd uintptr) (*loopInfo64, error) {\n\tloopInfo := &loopInfo64{}\n\n\tif _, _, err := syscall.Syscall(syscall.SYS_IOCTL, loopFd, LoopGetStatus64, uintptr(unsafe.Pointer(loopInfo))); err != 0 {\n\t\treturn nil, err\n\t}\n\treturn loopInfo, nil\n}\n\nfunc ioctlLoopSetCapacity(loopFd uintptr, value int) error {\n\tif _, _, err := syscall.Syscall(syscall.SYS_IOCTL, loopFd, LoopSetCapacity, uintptr(value)); err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/loopback/loop_wrapper.go",
    "content": "//go:build linux\n\npackage loopback\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\ntype loopInfo64 struct {\n\tloDevice         uint64 /* ioctl r/o */\n\tloInode          uint64 /* ioctl r/o */\n\tloRdevice        uint64 /* ioctl r/o */\n\tloOffset         uint64\n\tloSizelimit      uint64 /* bytes, 0 == max available */\n\tloNumber         uint32 /* ioctl r/o */\n\tloEncryptType    uint32\n\tloEncryptKeySize uint32 /* ioctl w/o */\n\tloFlags          uint32 /* ioctl r/o */\n\tloFileName       [LoNameSize]uint8\n\tloCryptName      [LoNameSize]uint8\n\tloEncryptKey     [LoKeySize]uint8 /* ioctl w/o */\n\tloInit           [2]uint64\n}\n\n// IOCTL consts\nconst (\n\tLoopSetFd       = unix.LOOP_SET_FD\n\tLoopCtlGetFree  = unix.LOOP_CTL_GET_FREE\n\tLoopGetStatus64 = unix.LOOP_GET_STATUS64\n\tLoopSetStatus64 = unix.LOOP_SET_STATUS64\n\tLoopClrFd       = unix.LOOP_CLR_FD\n\tLoopSetCapacity = unix.LOOP_SET_CAPACITY\n)\n\n// LOOP consts.\nconst (\n\tLoFlagsAutoClear = unix.LO_FLAGS_AUTOCLEAR\n\tLoFlagsReadOnly  = unix.LO_FLAGS_READ_ONLY\n\tLoFlagsPartScan  = unix.LO_FLAGS_PARTSCAN\n\tLoKeySize        = unix.LO_KEY_SIZE\n\tLoNameSize       = unix.LO_NAME_SIZE\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/loopback/loopback.go",
    "content": "//go:build linux\n\npackage loopback\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n)\n\nfunc getLoopbackBackingFile(file *os.File) (uint64, uint64, error) {\n\tloopInfo, err := ioctlLoopGetStatus64(file.Fd())\n\tif err != nil {\n\t\tlogrus.Errorf(\"Get loopback backing file: %v\", err)\n\t\treturn 0, 0, ErrGetLoopbackBackingFile\n\t}\n\treturn loopInfo.loDevice, loopInfo.loInode, nil\n}\n\n// SetCapacity reloads the size for the loopback device.\nfunc SetCapacity(file *os.File) error {\n\tif err := ioctlLoopSetCapacity(file.Fd(), 0); err != nil {\n\t\tlogrus.Errorf(\"loopbackSetCapacity: %s\", err)\n\t\treturn ErrSetCapacity\n\t}\n\treturn nil\n}\n\n// FindLoopDeviceFor returns a loopback device file for the specified file which\n// is backing file of a loop back device.\nfunc FindLoopDeviceFor(file *os.File) *os.File {\n\tstat, err := file.Stat()\n\tif err != nil {\n\t\treturn nil\n\t}\n\ttargetInode := stat.Sys().(*syscall.Stat_t).Ino\n\ttargetDevice := uint64(stat.Sys().(*syscall.Stat_t).Dev) //nolint:unconvert\n\n\tfor i := 0; true; i++ {\n\t\tpath := fmt.Sprintf(\"/dev/loop%d\", i)\n\n\t\tfile, err := os.OpenFile(path, os.O_RDWR, 0)\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// Ignore all errors until the first not-exist\n\t\t\t// we want to continue looking for the file\n\t\t\tcontinue\n\t\t}\n\n\t\tdev, inode, err := getLoopbackBackingFile(file)\n\t\tif err == nil && dev == targetDevice && inode == targetInode {\n\t\t\treturn file\n\t\t}\n\t\tfile.Close()\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/loopback/loopback_unsupported.go",
    "content": "package loopback\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/flags.go",
    "content": "package mount\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nvar flags = map[string]struct {\n\tclear bool\n\tflag  int\n}{\n\t\"defaults\":      {false, 0},\n\t\"ro\":            {false, RDONLY},\n\t\"rw\":            {true, RDONLY},\n\t\"suid\":          {true, NOSUID},\n\t\"nosuid\":        {false, NOSUID},\n\t\"dev\":           {true, NODEV},\n\t\"nodev\":         {false, NODEV},\n\t\"exec\":          {true, NOEXEC},\n\t\"noexec\":        {false, NOEXEC},\n\t\"sync\":          {false, SYNCHRONOUS},\n\t\"async\":         {true, SYNCHRONOUS},\n\t\"dirsync\":       {false, DIRSYNC},\n\t\"remount\":       {false, REMOUNT},\n\t\"mand\":          {false, MANDLOCK},\n\t\"nomand\":        {true, MANDLOCK},\n\t\"atime\":         {true, NOATIME},\n\t\"noatime\":       {false, NOATIME},\n\t\"diratime\":      {true, NODIRATIME},\n\t\"nodiratime\":    {false, NODIRATIME},\n\t\"bind\":          {false, BIND},\n\t\"rbind\":         {false, RBIND},\n\t\"unbindable\":    {false, UNBINDABLE},\n\t\"runbindable\":   {false, RUNBINDABLE},\n\t\"private\":       {false, PRIVATE},\n\t\"rprivate\":      {false, RPRIVATE},\n\t\"shared\":        {false, SHARED},\n\t\"rshared\":       {false, RSHARED},\n\t\"slave\":         {false, SLAVE},\n\t\"rslave\":        {false, RSLAVE},\n\t\"relatime\":      {false, RELATIME},\n\t\"norelatime\":    {true, RELATIME},\n\t\"strictatime\":   {false, STRICTATIME},\n\t\"nostrictatime\": {true, STRICTATIME},\n}\n\nvar validFlags = map[string]bool{\n\t\"\":          true,\n\t\"size\":      true,\n\t\"mode\":      true,\n\t\"uid\":       true,\n\t\"gid\":       true,\n\t\"nr_inodes\": true,\n\t\"nr_blocks\": true,\n\t\"mpol\":      true,\n}\n\nvar propagationFlags = map[string]bool{\n\t\"bind\":        true,\n\t\"rbind\":       true,\n\t\"unbindable\":  true,\n\t\"runbindable\": true,\n\t\"private\":     true,\n\t\"rprivate\":    true,\n\t\"shared\":      true,\n\t\"rshared\":     true,\n\t\"slave\":       true,\n\t\"rslave\":      true,\n}\n\n// MergeTmpfsOptions merge mount options to make sure there is no duplicate.\nfunc MergeTmpfsOptions(options []string) ([]string, error) {\n\t// We use collisions maps to remove duplicates.\n\t// For flag, the key is the flag value (the key for propagation flag is -1)\n\t// For data=value, the key is the data\n\tflagCollisions := map[int]bool{}\n\tdataCollisions := map[string]bool{}\n\n\tvar newOptions []string\n\t// We process in reverse order\n\tfor i := len(options) - 1; i >= 0; i-- {\n\t\toption := options[i]\n\t\tif option == \"defaults\" {\n\t\t\tcontinue\n\t\t}\n\t\tif f, ok := flags[option]; ok && f.flag != 0 {\n\t\t\t// There is only one propagation mode\n\t\t\tkey := f.flag\n\t\t\tif propagationFlags[option] {\n\t\t\t\tkey = -1\n\t\t\t}\n\t\t\t// Check to see if there is collision for flag\n\t\t\tif !flagCollisions[key] {\n\t\t\t\t// We prepend the option and add to collision map\n\t\t\t\tnewOptions = append([]string{option}, newOptions...)\n\t\t\t\tflagCollisions[key] = true\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\topt, _, ok := strings.Cut(option, \"=\")\n\t\tif !ok || !validFlags[opt] {\n\t\t\treturn nil, fmt.Errorf(\"invalid tmpfs option %q\", opt)\n\t\t}\n\t\tif !dataCollisions[opt] {\n\t\t\t// We prepend the option and add to collision map\n\t\t\tnewOptions = append([]string{option}, newOptions...)\n\t\t\tdataCollisions[opt] = true\n\t\t}\n\t}\n\n\treturn newOptions, nil\n}\n\n// ParseOptions parses fstab type mount options into mount() flags\n// and device specific data\nfunc ParseOptions(options string) (int, string) {\n\tvar (\n\t\tflag int\n\t\tdata []string\n\t)\n\n\tfor o := range strings.SplitSeq(options, \",\") {\n\t\t// If the option does not exist in the flags table or the flag\n\t\t// is not supported on the platform,\n\t\t// then it is a data value for a specific fs type\n\t\tif f, exists := flags[o]; exists && f.flag != 0 {\n\t\t\tif f.clear {\n\t\t\t\tflag &= ^f.flag\n\t\t\t} else {\n\t\t\t\tflag |= f.flag\n\t\t\t}\n\t\t} else {\n\t\t\tdata = append(data, o)\n\t\t}\n\t}\n\treturn flag, strings.Join(data, \",\")\n}\n\n// ParseTmpfsOptions parse fstab type mount options into flags and data\nfunc ParseTmpfsOptions(options string) (int, string, error) {\n\tflags, data := ParseOptions(options)\n\tfor o := range strings.SplitSeq(data, \",\") {\n\t\topt, _, _ := strings.Cut(o, \"=\")\n\t\tif !validFlags[opt] {\n\t\t\treturn 0, \"\", fmt.Errorf(\"invalid tmpfs option %q\", opt)\n\t\t}\n\t}\n\treturn flags, data, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/flags_freebsd.go",
    "content": "package mount\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// RDONLY will mount the file system read-only.\n\tRDONLY = unix.MNT_RDONLY\n\n\t// NOSUID will not allow set-user-identifier or set-group-identifier bits to\n\t// take effect.\n\tNOSUID = unix.MNT_NOSUID\n\n\t// NOEXEC will not allow execution of any binaries on the mounted file system.\n\tNOEXEC = unix.MNT_NOEXEC\n\n\t// SYNCHRONOUS will allow I/O to the file system to be done synchronously.\n\tSYNCHRONOUS = unix.MNT_SYNCHRONOUS\n\n\t// REMOUNT will attempt to remount an already-mounted file system. This is\n\t// commonly used to change the mount flags for a file system, especially to\n\t// make a readonly file system writeable. It does not change device or mount\n\t// point.\n\tREMOUNT = unix.MNT_UPDATE\n\n\t// NOATIME will not update the file access time when reading from a file.\n\tNOATIME = unix.MNT_NOATIME\n\n\tmntDetach = unix.MNT_FORCE\n\n\tNODIRATIME  = 0\n\tNODEV       = 0\n\tDIRSYNC     = 0\n\tMANDLOCK    = 0\n\tBIND        = 0\n\tRBIND       = 0\n\tUNBINDABLE  = 0\n\tRUNBINDABLE = 0\n\tPRIVATE     = 0\n\tRPRIVATE    = 0\n\tSLAVE       = 0\n\tRSLAVE      = 0\n\tSHARED      = 0\n\tRSHARED     = 0\n\tRELATIME    = 0\n\tSTRICTATIME = 0\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/flags_linux.go",
    "content": "package mount\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// RDONLY will mount the file system read-only.\n\tRDONLY = unix.MS_RDONLY\n\n\t// NOSUID will not allow set-user-identifier or set-group-identifier bits to\n\t// take effect.\n\tNOSUID = unix.MS_NOSUID\n\n\t// NODEV will not interpret character or block special devices on the file\n\t// system.\n\tNODEV = unix.MS_NODEV\n\n\t// NOEXEC will not allow execution of any binaries on the mounted file system.\n\tNOEXEC = unix.MS_NOEXEC\n\n\t// SYNCHRONOUS will allow I/O to the file system to be done synchronously.\n\tSYNCHRONOUS = unix.MS_SYNCHRONOUS\n\n\t// DIRSYNC will force all directory updates within the file system to be done\n\t// synchronously. This affects the following system calls: create, link,\n\t// unlink, symlink, mkdir, rmdir, mknod and rename.\n\tDIRSYNC = unix.MS_DIRSYNC\n\n\t// REMOUNT will attempt to remount an already-mounted file system. This is\n\t// commonly used to change the mount flags for a file system, especially to\n\t// make a readonly file system writeable. It does not change device or mount\n\t// point.\n\tREMOUNT = unix.MS_REMOUNT\n\n\t// MANDLOCK will force mandatory locks on a filesystem.\n\tMANDLOCK = unix.MS_MANDLOCK\n\n\t// NOATIME will not update the file access time when reading from a file.\n\tNOATIME = unix.MS_NOATIME\n\n\t// NODIRATIME will not update the directory access time.\n\tNODIRATIME = unix.MS_NODIRATIME\n\n\t// BIND remounts a subtree somewhere else.\n\tBIND = unix.MS_BIND\n\n\t// RBIND remounts a subtree and all possible submounts somewhere else.\n\tRBIND = unix.MS_BIND | unix.MS_REC\n\n\t// UNBINDABLE creates a mount which cannot be cloned through a bind operation.\n\tUNBINDABLE = unix.MS_UNBINDABLE\n\n\t// RUNBINDABLE marks the entire mount tree as UNBINDABLE.\n\tRUNBINDABLE = unix.MS_UNBINDABLE | unix.MS_REC\n\n\t// PRIVATE creates a mount which carries no propagation abilities.\n\tPRIVATE = unix.MS_PRIVATE\n\n\t// RPRIVATE marks the entire mount tree as PRIVATE.\n\tRPRIVATE = unix.MS_PRIVATE | unix.MS_REC\n\n\t// SLAVE creates a mount which receives propagation from its master, but not\n\t// vice versa.\n\tSLAVE = unix.MS_SLAVE\n\n\t// RSLAVE marks the entire mount tree as SLAVE.\n\tRSLAVE = unix.MS_SLAVE | unix.MS_REC\n\n\t// SHARED creates a mount which provides the ability to create mirrors of\n\t// that mount such that mounts and unmounts within any of the mirrors\n\t// propagate to the other mirrors.\n\tSHARED = unix.MS_SHARED\n\n\t// RSHARED marks the entire mount tree as SHARED.\n\tRSHARED = unix.MS_SHARED | unix.MS_REC\n\n\t// RELATIME updates inode access times relative to modify or change time.\n\tRELATIME = unix.MS_RELATIME\n\n\t// STRICTATIME allows to explicitly request full atime updates.  This makes\n\t// it possible for the kernel to default to relatime or noatime but still\n\t// allow userspace to override it.\n\tSTRICTATIME = unix.MS_STRICTATIME\n\n\tmntDetach = unix.MNT_DETACH\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/flags_unsupported.go",
    "content": "//go:build !linux && !freebsd\n\npackage mount\n\n// These flags are unsupported.\nconst (\n\tBIND        = 0\n\tDIRSYNC     = 0\n\tMANDLOCK    = 0\n\tNOATIME     = 0\n\tNODEV       = 0\n\tNODIRATIME  = 0\n\tNOEXEC      = 0\n\tNOSUID      = 0\n\tUNBINDABLE  = 0\n\tRUNBINDABLE = 0\n\tPRIVATE     = 0\n\tRPRIVATE    = 0\n\tSHARED      = 0\n\tRSHARED     = 0\n\tSLAVE       = 0\n\tRSLAVE      = 0\n\tRBIND       = 0\n\tRELATIME    = 0\n\tRELATIVE    = 0\n\tREMOUNT     = 0\n\tSTRICTATIME = 0\n\tSYNCHRONOUS = 0\n\tRDONLY      = 0\n\tmntDetach   = 0\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mount.go",
    "content": "package mount\n\nimport (\n\t\"cmp\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// mountError holds an error from a mount or unmount operation\ntype mountError struct {\n\top             string\n\tsource, target string\n\tflags          uintptr\n\tdata           string\n\terr            error\n}\n\n// Error returns a string representation of mountError\nfunc (e *mountError) Error() string {\n\tout := e.op + \" \"\n\n\tif e.source != \"\" {\n\t\tout += e.source + \":\" + e.target\n\t} else {\n\t\tout += e.target\n\t}\n\n\tif e.flags != uintptr(0) {\n\t\tout += \", flags: 0x\" + strconv.FormatUint(uint64(e.flags), 16)\n\t}\n\tif e.data != \"\" {\n\t\tout += \", data: \" + e.data\n\t}\n\n\tout += \": \" + e.err.Error()\n\treturn out\n}\n\n// Cause returns the underlying cause of the error\nfunc (e *mountError) Cause() error {\n\treturn e.err\n}\n\n// Unwrap returns the underlying cause of the error\nfunc (e *mountError) Unwrap() error {\n\treturn e.err\n}\n\n// Mount will mount filesystem according to the specified configuration, on the\n// condition that the target path is *not* already mounted. Options must be\n// specified like the mount or fstab unix commands: \"opt1=val1,opt2=val2\". See\n// flags.go for supported option flags.\nfunc Mount(device, target, mType, options string) error {\n\tflag, data := ParseOptions(options)\n\tif flag&REMOUNT != REMOUNT {\n\t\tif mounted, err := Mounted(target); err != nil || mounted {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn mount(device, target, mType, uintptr(flag), data)\n}\n\n// ForceMount will mount a filesystem according to the specified configuration,\n// *regardless* if the target path is not already mounted. Options must be\n// specified like the mount or fstab unix commands: \"opt1=val1,opt2=val2\". See\n// flags.go for supported option flags.\nfunc ForceMount(device, target, mType, options string) error {\n\tflag, data := ParseOptions(options)\n\treturn mount(device, target, mType, uintptr(flag), data)\n}\n\n// Unmount lazily unmounts a filesystem on supported platforms, otherwise\n// does a normal unmount.\nfunc Unmount(target string) error {\n\treturn unmount(target, mntDetach)\n}\n\n// RecursiveUnmount unmounts the target and all mounts underneath, starting with\n// the deepest mount first.\nfunc RecursiveUnmount(target string) error {\n\tmounts, err := GetMounts()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Make the deepest mount be first\n\tslices.SortFunc(mounts, func(a, b *Info) int {\n\t\treturn -cmp.Compare(len(a.Mountpoint), len(b.Mountpoint))\n\t})\n\n\tfor i, m := range mounts {\n\t\tif !strings.HasPrefix(m.Mountpoint, target) {\n\t\t\tcontinue\n\t\t}\n\t\tif err := Unmount(m.Mountpoint); err != nil && i == len(mounts)-1 {\n\t\t\treturn err\n\t\t\t// Ignore errors for submounts and continue trying to unmount others\n\t\t\t// The final unmount should fail if there are any submounts remaining\n\t\t}\n\t}\n\treturn nil\n}\n\n// ForceUnmount lazily unmounts a filesystem on supported platforms,\n// otherwise does a normal unmount.\n//\n// Deprecated: please use Unmount instead, it is identical.\nfunc ForceUnmount(target string) error {\n\treturn unmount(target, mntDetach)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mounter_freebsd.go",
    "content": "//go:build freebsd && cgo\n\npackage mount\n\n/*\n#include <errno.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/_iovec.h>\n#include <sys/mount.h>\n#include <sys/param.h>\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"unsafe\"\n)\n\nfunc allocateIOVecs(options []string) []C.struct_iovec {\n\tout := make([]C.struct_iovec, len(options))\n\tfor i, option := range options {\n\t\tout[i].iov_base = unsafe.Pointer(C.CString(option))\n\t\tout[i].iov_len = C.size_t(len(option) + 1)\n\t}\n\treturn out\n}\n\nfunc mount(device, target, mType string, flag uintptr, data string) error {\n\tisNullFS := false\n\n\toptions := []string{\"fspath\", target}\n\n\tif data != \"\" {\n\t\tfor x := range strings.SplitSeq(data, \",\") {\n\t\t\tif x == \"bind\" {\n\t\t\t\tisNullFS = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tname, val, _ := strings.Cut(x, \"=\")\n\t\t\toptions = append(options, name)\n\t\t\toptions = append(options, val)\n\t\t}\n\t}\n\n\tif isNullFS {\n\t\toptions = append(options, \"fstype\", \"nullfs\", \"target\", device)\n\t} else {\n\t\toptions = append(options, \"fstype\", mType, \"from\", device)\n\t}\n\trawOptions := allocateIOVecs(options)\n\tfor _, rawOption := range rawOptions {\n\t\tdefer C.free(rawOption.iov_base)\n\t}\n\n\tif errno := C.nmount(&rawOptions[0], C.uint(len(options)), C.int(flag)); errno != 0 {\n\t\treason := C.GoString(C.strerror(*C.__error()))\n\t\treturn fmt.Errorf(\"failed to call nmount: %s\", reason)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mounter_linux.go",
    "content": "package mount\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// ptypes is the set propagation types.\n\tptypes = unix.MS_SHARED | unix.MS_PRIVATE | unix.MS_SLAVE | unix.MS_UNBINDABLE\n\n\t// pflags is the full set valid flags for a change propagation call.\n\tpflags = ptypes | unix.MS_REC | unix.MS_SILENT\n\n\t// broflags is the combination of bind and read only\n\tbroflags = unix.MS_BIND | unix.MS_RDONLY\n\n\tnone = \"none\"\n)\n\n// isremount returns true if either device name or flags identify a remount request, false otherwise.\nfunc isremount(device string, flags uintptr) bool {\n\tswitch {\n\t// We treat device \"\" and \"none\" as a remount request to provide compatibility with\n\t// requests that don't explicitly set MS_REMOUNT such as those manipulating bind mounts.\n\tcase flags&unix.MS_REMOUNT != 0, device == \"\", device == none:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc mount(device, target, mType string, flags uintptr, data string) error {\n\toflags := flags &^ ptypes\n\tif !isremount(device, flags) || data != \"\" {\n\t\t// Initial call applying all non-propagation flags for mount\n\t\t// or remount with changed data\n\t\tif err := unix.Mount(device, target, mType, oflags, data); err != nil {\n\t\t\treturn &mountError{\n\t\t\t\top:     \"mount\",\n\t\t\t\tsource: device,\n\t\t\t\ttarget: target,\n\t\t\t\tflags:  oflags,\n\t\t\t\tdata:   data,\n\t\t\t\terr:    err,\n\t\t\t}\n\t\t}\n\t}\n\n\tif flags&ptypes != 0 {\n\t\t// Change the propagation type.\n\t\tif err := unix.Mount(\"\", target, \"\", flags&pflags, \"\"); err != nil {\n\t\t\treturn &mountError{\n\t\t\t\top:     \"remount\",\n\t\t\t\ttarget: target,\n\t\t\t\tflags:  flags & pflags,\n\t\t\t\terr:    err,\n\t\t\t}\n\t\t}\n\t}\n\n\tif oflags&broflags == broflags {\n\t\t// Remount the bind to apply read only.\n\t\tif err := unix.Mount(\"\", target, \"\", oflags|unix.MS_REMOUNT, \"\"); err != nil {\n\t\t\treturn &mountError{\n\t\t\t\top:     \"remount-ro\",\n\t\t\t\ttarget: target,\n\t\t\t\tflags:  oflags | unix.MS_REMOUNT,\n\t\t\t\terr:    err,\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mounter_unsupported.go",
    "content": "//go:build !linux && !(freebsd && cgo)\n\npackage mount\n\nfunc mount(device, target, mType string, flag uintptr, data string) error {\n\tpanic(\"Not implemented\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mountinfo.go",
    "content": "package mount\n\nimport (\n\t\"github.com/moby/sys/mountinfo\"\n)\n\ntype Info = mountinfo.Info\n\nvar Mounted = mountinfo.Mounted\n\nfunc GetMounts() ([]*Info, error) {\n\treturn mountinfo.GetMounts(nil)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/mountinfo_linux.go",
    "content": "package mount\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/moby/sys/mountinfo\"\n)\n\nfunc PidMountInfo(pid int) ([]*Info, error) {\n\tf, err := os.Open(fmt.Sprintf(\"/proc/%d/mountinfo\", pid))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\n\treturn mountinfo.GetMountsFromReader(f, nil)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/sharedsubtree_linux.go",
    "content": "package mount\n\n// MakeShared ensures a mounted filesystem has the SHARED mount option enabled.\n// See the supported options in flags.go for further reference.\nfunc MakeShared(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, SHARED)\n}\n\n// MakeRShared ensures a mounted filesystem has the RSHARED mount option enabled.\n// See the supported options in flags.go for further reference.\nfunc MakeRShared(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, RSHARED)\n}\n\n// MakePrivate ensures a mounted filesystem has the PRIVATE mount option enabled.\n// See the supported options in flags.go for further reference.\nfunc MakePrivate(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, PRIVATE)\n}\n\n// MakeRPrivate ensures a mounted filesystem has the RPRIVATE mount option\n// enabled. See the supported options in flags.go for further reference.\nfunc MakeRPrivate(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, RPRIVATE)\n}\n\n// MakeSlave ensures a mounted filesystem has the SLAVE mount option enabled.\n// See the supported options in flags.go for further reference.\nfunc MakeSlave(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, SLAVE)\n}\n\n// MakeRSlave ensures a mounted filesystem has the RSLAVE mount option enabled.\n// See the supported options in flags.go for further reference.\nfunc MakeRSlave(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, RSLAVE)\n}\n\n// MakeUnbindable ensures a mounted filesystem has the UNBINDABLE mount option\n// enabled. See the supported options in flags.go for further reference.\nfunc MakeUnbindable(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, UNBINDABLE)\n}\n\n// MakeRUnbindable ensures a mounted filesystem has the RUNBINDABLE mount\n// option enabled. See the supported options in flags.go for further reference.\nfunc MakeRUnbindable(mountPoint string) error {\n\treturn ensureMountedAs(mountPoint, RUNBINDABLE)\n}\n\nfunc ensureMountedAs(mnt string, flags int) error {\n\tmounted, err := Mounted(mnt)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !mounted {\n\t\tif err := mount(mnt, mnt, \"none\", uintptr(BIND), \"\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn mount(\"\", mnt, \"none\", uintptr(flags), \"\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/unmount_unix.go",
    "content": "//go:build !windows\n\npackage mount\n\nimport (\n\t\"time\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc unmount(target string, flags int) error {\n\tvar err error\n\tfor range 50 {\n\t\terr = unix.Unmount(target, flags)\n\t\tswitch err {\n\t\tcase unix.EBUSY:\n\t\t\ttime.Sleep(50 * time.Millisecond)\n\t\t\tcontinue\n\t\tcase unix.EINVAL, nil:\n\t\t\t// Ignore \"not mounted\" error here. Note the same error\n\t\t\t// can be returned if flags are invalid, so this code\n\t\t\t// assumes that the flags value is always correct.\n\t\t\treturn nil\n\t\t}\n\t\tbreak\n\t}\n\n\treturn &mountError{\n\t\top:     \"umount\",\n\t\ttarget: target,\n\t\tflags:  uintptr(flags),\n\t\terr:    err,\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/mount/unmount_unsupported.go",
    "content": "//go:build windows\n\npackage mount\n\nfunc unmount(target string, flag int) error {\n\tpanic(\"Not implemented\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/parsers/parsers.go",
    "content": "// Package parsers provides helper functions to parse and validate different type\n// of string. It can be hosts, unix addresses, tcp addresses, filters, kernel\n// operating system versions.\npackage parsers\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// ParseKeyValueOpt parses and validates the specified string as a key/value pair (key=value)\nfunc ParseKeyValueOpt(opt string) (string, string, error) {\n\tk, v, ok := strings.Cut(opt, \"=\")\n\tif !ok {\n\t\treturn \"\", \"\", fmt.Errorf(\"unable to parse key/value option: %s\", opt)\n\t}\n\treturn strings.TrimSpace(k), strings.TrimSpace(v), nil\n}\n\n// ParseUintList parses and validates the specified string as the value\n// found in some cgroup file (e.g. `cpuset.cpus`, `cpuset.mems`), which could be\n// one of the formats below. Note that duplicates are actually allowed in the\n// input string. It returns a `map[int]bool` with available elements from `val`\n// set to `true`.\n// Supported formats:\n//\n//\t7\n//\t1-6\n//\t0,3-4,7,8-10\n//\t0-0,0,1-7\n//\t03,1-3      <- this is gonna get parsed as [1,2,3]\n//\t3,2,1\n//\t0-2,3,1\nfunc ParseUintList(val string) (map[int]bool, error) {\n\tif val == \"\" {\n\t\treturn map[int]bool{}, nil\n\t}\n\n\tavailableInts := make(map[int]bool)\n\terrInvalidFormat := fmt.Errorf(\"invalid format: %s\", val)\n\n\tfor r := range strings.SplitSeq(val, \",\") {\n\t\tminS, maxS, ok := strings.Cut(r, \"-\")\n\t\tif !ok {\n\t\t\tv, err := strconv.Atoi(r)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errInvalidFormat\n\t\t\t}\n\t\t\tavailableInts[v] = true\n\t\t} else {\n\t\t\tmin, err := strconv.Atoi(minS)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errInvalidFormat\n\t\t\t}\n\t\t\tmax, err := strconv.Atoi(maxS)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errInvalidFormat\n\t\t\t}\n\t\t\tif max < min {\n\t\t\t\treturn nil, errInvalidFormat\n\t\t\t}\n\t\t\tfor i := min; i <= max; i++ {\n\t\t\t\tavailableInts[i] = true\n\t\t\t}\n\t\t}\n\t}\n\treturn availableInts, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/pools/pools.go",
    "content": "// Package pools provides a collection of pools which provide various\n// data types with buffers. These can be used to lower the number of\n// memory allocations and reuse buffers.\n//\n// New pools should be added to this package to allow them to be\n// shared across packages.\n//\n// Utility functions which operate on pools should be added to this\n// package to allow them to be reused.\npackage pools\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"sync\"\n\n\t\"go.podman.io/storage/pkg/ioutils\"\n)\n\nvar (\n\t// BufioReader32KPool is a pool which returns bufio.Reader with a 32K buffer.\n\tBufioReader32KPool *BufioReaderPool\n\t// BufioWriter32KPool is a pool which returns bufio.Writer with a 32K buffer.\n\tBufioWriter32KPool *BufioWriterPool\n)\n\nconst buffer32K = 32 * 1024\n\n// BufioReaderPool is a bufio reader that uses sync.Pool.\ntype BufioReaderPool struct {\n\tpool *sync.Pool\n}\n\nfunc init() {\n\tBufioReader32KPool = newBufioReaderPoolWithSize(buffer32K)\n\tBufioWriter32KPool = newBufioWriterPoolWithSize(buffer32K)\n}\n\n// newBufioReaderPoolWithSize is unexported because new pools should be\n// added here to be shared where required.\nfunc newBufioReaderPoolWithSize(size int) *BufioReaderPool {\n\tpool := &sync.Pool{\n\t\tNew: func() any { return bufio.NewReaderSize(nil, size) },\n\t}\n\treturn &BufioReaderPool{pool: pool}\n}\n\n// Get returns a bufio.Reader which reads from r. The buffer size is that of the pool.\nfunc (bufPool *BufioReaderPool) Get(r io.Reader) *bufio.Reader {\n\tbuf := bufPool.pool.Get().(*bufio.Reader)\n\tbuf.Reset(r)\n\treturn buf\n}\n\n// Put puts the bufio.Reader back into the pool.\nfunc (bufPool *BufioReaderPool) Put(b *bufio.Reader) {\n\tb.Reset(nil)\n\tbufPool.pool.Put(b)\n}\n\n// Copy is a convenience wrapper which uses a buffer to avoid allocation in io.Copy.\nfunc Copy(dst io.Writer, src io.Reader) (int64, error) {\n\tbuf := BufioReader32KPool.Get(src)\n\twritten, err := io.Copy(dst, buf)\n\tBufioReader32KPool.Put(buf)\n\treturn written, err\n}\n\n// NewReadCloserWrapper returns a wrapper which puts the bufio.Reader back\n// into the pool and closes the reader if it's an io.ReadCloser.\nfunc (bufPool *BufioReaderPool) NewReadCloserWrapper(buf *bufio.Reader, r io.Reader) io.ReadCloser {\n\treturn ioutils.NewReadCloserWrapper(r, func() error {\n\t\tif readCloser, ok := r.(io.ReadCloser); ok {\n\t\t\treadCloser.Close()\n\t\t}\n\t\tbufPool.Put(buf)\n\t\treturn nil\n\t})\n}\n\n// BufioWriterPool is a bufio writer that uses sync.Pool.\ntype BufioWriterPool struct {\n\tpool *sync.Pool\n}\n\n// newBufioWriterPoolWithSize is unexported because new pools should be\n// added here to be shared where required.\nfunc newBufioWriterPoolWithSize(size int) *BufioWriterPool {\n\tpool := &sync.Pool{\n\t\tNew: func() any { return bufio.NewWriterSize(nil, size) },\n\t}\n\treturn &BufioWriterPool{pool: pool}\n}\n\n// Get returns a bufio.Writer which writes to w. The buffer size is that of the pool.\nfunc (bufPool *BufioWriterPool) Get(w io.Writer) *bufio.Writer {\n\tbuf := bufPool.pool.Get().(*bufio.Writer)\n\tbuf.Reset(w)\n\treturn buf\n}\n\n// Put puts the bufio.Writer back into the pool.\nfunc (bufPool *BufioWriterPool) Put(b *bufio.Writer) {\n\tb.Reset(nil)\n\tbufPool.pool.Put(b)\n}\n\n// NewWriteCloserWrapper returns a wrapper which puts the bufio.Writer back\n// into the pool and closes the writer if it's an io.Writecloser.\nfunc (bufPool *BufioWriterPool) NewWriteCloserWrapper(buf *bufio.Writer, w io.Writer) io.WriteCloser {\n\treturn ioutils.NewWriteCloserWrapper(w, func() error {\n\t\tbuf.Flush()\n\t\tif writeCloser, ok := w.(io.WriteCloser); ok {\n\t\t\twriteCloser.Close()\n\t\t}\n\t\tbufPool.Put(buf)\n\t\treturn nil\n\t})\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/promise/promise.go",
    "content": "package promise\n\n// Go is a basic promise implementation: it wraps calls a function in a goroutine,\n// and returns a channel which will later return the function's return value.\nfunc Go(f func() error) chan error {\n\tch := make(chan error, 1)\n\tgo func() {\n\t\tch <- f()\n\t}()\n\treturn ch\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/README.md",
    "content": "# reexec\n\nThe `reexec` package facilitates the busybox style reexec of the docker binary that we require because \nof the forking limitations of using Go.  Handlers can be registered with a name and the argv 0 of \nthe exec of the binary will be used to find and execute custom init paths.\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/command_freebsd.go",
    "content": "//go:build freebsd\n\npackage reexec\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"os/exec\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Self returns the path to the current process's binary.\n// Uses sysctl.\nfunc Self() string {\n\tpath, err := unix.SysctlArgs(\"kern.proc.pathname\", -1)\n\tif err == nil {\n\t\treturn path\n\t}\n\treturn os.Args[0]\n}\n\n// Command returns *exec.Cmd which has Path as current binary.\n// For example if current binary is \"docker\" at \"/usr/bin/\", then cmd.Path will\n// be set to \"/usr/bin/docker\".\nfunc Command(args ...string) *exec.Cmd {\n\tcmd := exec.Command(Self())\n\tcmd.Args = args\n\treturn cmd\n}\n\n// CommandContext returns *exec.Cmd which has Path as current binary.\nfunc CommandContext(ctx context.Context, args ...string) *exec.Cmd {\n\tcmd := exec.CommandContext(ctx, Self())\n\tcmd.Args = args\n\treturn cmd\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/command_linux.go",
    "content": "//go:build linux\n\npackage reexec\n\nimport (\n\t\"context\"\n\t\"os/exec\"\n)\n\n// Self returns the path to the current process's binary.\n// Returns \"/proc/self/exe\".\nfunc Self() string {\n\treturn \"/proc/self/exe\"\n}\n\n// Command returns *exec.Cmd which has Path as current binary.\n// This will use the in-memory version (/proc/self/exe) of the current binary,\n// it is thus safe to delete or replace the on-disk binary (os.Args[0]).\nfunc Command(args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.Command(Self())\n\tcmd.Args = args\n\treturn cmd\n}\n\n// CommandContext returns *exec.Cmd which has Path as current binary.\n// This will use the in-memory version (/proc/self/exe) of the current binary,\n// it is thus safe to delete or replace the on-disk binary (os.Args[0]).\nfunc CommandContext(ctx context.Context, args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.CommandContext(ctx, Self())\n\tcmd.Args = args\n\treturn cmd\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/command_unix.go",
    "content": "//go:build solaris || darwin\n\npackage reexec\n\nimport (\n\t\"context\"\n\t\"os/exec\"\n)\n\n// Self returns the path to the current process's binary.\n// Uses os.Args[0].\nfunc Self() string {\n\treturn naiveSelf()\n}\n\n// Command returns *exec.Cmd which has Path as current binary.\n// For example if current binary is \"docker\" at \"/usr/bin/\", then cmd.Path will\n// be set to \"/usr/bin/docker\".\nfunc Command(args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.Command(Self())\n\tcmd.Args = args\n\treturn cmd\n}\n\n// CommandContext returns *exec.Cmd which has Path as current binary.\nfunc CommandContext(ctx context.Context, args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.CommandContext(ctx, Self())\n\tcmd.Args = args\n\treturn cmd\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/command_unsupported.go",
    "content": "//go:build !linux && !windows && !freebsd && !solaris && !darwin\n\npackage reexec\n\nimport (\n\t\"context\"\n\t\"os/exec\"\n)\n\n// Command is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin.\nfunc Command(args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\treturn nil\n}\n\n// CommandContext is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin.\nfunc CommandContext(ctx context.Context, args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/command_windows.go",
    "content": "//go:build windows\n\npackage reexec\n\nimport (\n\t\"context\"\n\t\"os/exec\"\n)\n\n// Self returns the path to the current process's binary.\n// Uses os.Args[0].\nfunc Self() string {\n\treturn naiveSelf()\n}\n\n// Command returns *exec.Cmd which has Path as current binary.\n// For example if current binary is \"docker.exe\" at \"C:\\\", then cmd.Path will\n// be set to \"C:\\docker.exe\".\nfunc Command(args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.Command(Self())\n\tcmd.Args = args\n\treturn cmd\n}\n\n// Command returns *exec.Cmd which has Path as current binary.\n// For example if current binary is \"docker.exe\" at \"C:\\\", then cmd.Path will\n// be set to \"C:\\docker.exe\".\nfunc CommandContext(ctx context.Context, args ...string) *exec.Cmd {\n\tpanicIfNotInitialized()\n\tcmd := exec.CommandContext(ctx, Self())\n\tcmd.Args = args\n\treturn cmd\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/reexec/reexec.go",
    "content": "package reexec\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\nvar (\n\tregisteredInitializers = make(map[string]func())\n\tinitWasCalled          = false\n)\n\n// Register adds an initialization func under the specified name\nfunc Register(name string, initializer func()) {\n\tif _, exists := registeredInitializers[name]; exists {\n\t\tpanic(fmt.Sprintf(\"reexec func already registered under name %q\", name))\n\t}\n\n\tregisteredInitializers[name] = initializer\n}\n\n// Init is called as the first part of the exec process and returns true if an\n// initialization function was called.\nfunc Init() bool {\n\tinitializer, exists := registeredInitializers[os.Args[0]]\n\tinitWasCalled = true\n\tif exists {\n\t\tinitializer()\n\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc panicIfNotInitialized() {\n\tif !initWasCalled {\n\t\t// The reexec package is used to run subroutines in\n\t\t// subprocesses which would otherwise have unacceptable side\n\t\t// effects on the main thread.  If you found this error, then\n\t\t// your program uses a package which needs to do this.  In\n\t\t// order for that to work, main() should start with this\n\t\t// boilerplate, or an equivalent:\n\t\t//     if reexec.Init() {\n\t\t//         return\n\t\t//     }\n\t\tpanic(\"a library subroutine needed to run a subprocess, but reexec.Init() was not called in main()\")\n\t}\n}\n\nfunc naiveSelf() string {\n\tname := os.Args[0]\n\tif filepath.Base(name) == name {\n\t\tif lp, err := exec.LookPath(name); err == nil {\n\t\t\treturn lp\n\t\t}\n\t}\n\t// handle conversion of relative paths to absolute\n\tif absName, err := filepath.Abs(name); err == nil {\n\t\treturn absName\n\t}\n\t// if we couldn't get absolute name, return original\n\t// (NOTE: Go only errors on Abs() if os.Getwd fails)\n\treturn name\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/regexp/regexp.go",
    "content": "package regexp\n\nimport (\n\t\"io\"\n\t\"regexp\"\n\t\"sync\"\n)\n\n// Regexp is a wrapper struct used for wrapping MustCompile regex expressions\n// used as global variables. Using this structure helps speed the startup time\n// of apps that want to use global regex variables. This library initializes them on\n// first use as opposed to the start of the executable.\ntype Regexp struct {\n\t*regexpStruct\n}\n\ntype regexpStruct struct {\n\t_      noCopy\n\tonce   sync.Once\n\tregexp *regexp.Regexp\n\tval    string\n}\n\nfunc Delayed(val string) Regexp {\n\tre := &regexpStruct{\n\t\tval: val,\n\t}\n\tif precompile {\n\t\tre.regexp = regexp.MustCompile(re.val)\n\t}\n\treturn Regexp{re}\n}\n\nfunc (re *regexpStruct) compile() {\n\tif precompile {\n\t\treturn\n\t}\n\tre.once.Do(func() {\n\t\tre.regexp = regexp.MustCompile(re.val)\n\t})\n}\n\nfunc (re *regexpStruct) Expand(dst []byte, template []byte, src []byte, match []int) []byte {\n\tre.compile()\n\treturn re.regexp.Expand(dst, template, src, match)\n}\n\nfunc (re *regexpStruct) ExpandString(dst []byte, template string, src string, match []int) []byte {\n\tre.compile()\n\treturn re.regexp.ExpandString(dst, template, src, match)\n}\n\nfunc (re *regexpStruct) Find(b []byte) []byte {\n\tre.compile()\n\treturn re.regexp.Find(b)\n}\n\nfunc (re *regexpStruct) FindAll(b []byte, n int) [][]byte {\n\tre.compile()\n\treturn re.regexp.FindAll(b, n)\n}\n\nfunc (re *regexpStruct) FindAllIndex(b []byte, n int) [][]int {\n\tre.compile()\n\treturn re.regexp.FindAllIndex(b, n)\n}\n\nfunc (re *regexpStruct) FindAllString(s string, n int) []string {\n\tre.compile()\n\treturn re.regexp.FindAllString(s, n)\n}\n\nfunc (re *regexpStruct) FindAllStringIndex(s string, n int) [][]int {\n\tre.compile()\n\treturn re.regexp.FindAllStringIndex(s, n)\n}\n\nfunc (re *regexpStruct) FindAllStringSubmatch(s string, n int) [][]string {\n\tre.compile()\n\treturn re.regexp.FindAllStringSubmatch(s, n)\n}\n\nfunc (re *regexpStruct) FindAllStringSubmatchIndex(s string, n int) [][]int {\n\tre.compile()\n\treturn re.regexp.FindAllStringSubmatchIndex(s, n)\n}\n\nfunc (re *regexpStruct) FindAllSubmatch(b []byte, n int) [][][]byte {\n\tre.compile()\n\treturn re.regexp.FindAllSubmatch(b, n)\n}\n\nfunc (re *regexpStruct) FindAllSubmatchIndex(b []byte, n int) [][]int {\n\tre.compile()\n\treturn re.regexp.FindAllSubmatchIndex(b, n)\n}\n\nfunc (re *regexpStruct) FindIndex(b []byte) (loc []int) {\n\tre.compile()\n\treturn re.regexp.FindIndex(b)\n}\n\nfunc (re *regexpStruct) FindReaderIndex(r io.RuneReader) (loc []int) {\n\tre.compile()\n\treturn re.regexp.FindReaderIndex(r)\n}\n\nfunc (re *regexpStruct) FindReaderSubmatchIndex(r io.RuneReader) []int {\n\tre.compile()\n\treturn re.regexp.FindReaderSubmatchIndex(r)\n}\n\nfunc (re *regexpStruct) FindString(s string) string {\n\tre.compile()\n\treturn re.regexp.FindString(s)\n}\n\nfunc (re *regexpStruct) FindStringIndex(s string) (loc []int) {\n\tre.compile()\n\treturn re.regexp.FindStringIndex(s)\n}\n\nfunc (re *regexpStruct) FindStringSubmatch(s string) []string {\n\tre.compile()\n\treturn re.regexp.FindStringSubmatch(s)\n}\n\nfunc (re *regexpStruct) FindStringSubmatchIndex(s string) []int {\n\tre.compile()\n\treturn re.regexp.FindStringSubmatchIndex(s)\n}\n\nfunc (re *regexpStruct) FindSubmatch(b []byte) [][]byte {\n\tre.compile()\n\treturn re.regexp.FindSubmatch(b)\n}\n\nfunc (re *regexpStruct) FindSubmatchIndex(b []byte) []int {\n\tre.compile()\n\treturn re.regexp.FindSubmatchIndex(b)\n}\n\nfunc (re *regexpStruct) LiteralPrefix() (prefix string, complete bool) {\n\tre.compile()\n\treturn re.regexp.LiteralPrefix()\n}\n\nfunc (re *regexpStruct) Longest() {\n\tre.compile()\n\tre.regexp.Longest()\n}\n\nfunc (re *regexpStruct) Match(b []byte) bool {\n\tre.compile()\n\treturn re.regexp.Match(b)\n}\n\nfunc (re *regexpStruct) MatchReader(r io.RuneReader) bool {\n\tre.compile()\n\treturn re.regexp.MatchReader(r)\n}\n\nfunc (re *regexpStruct) MatchString(s string) bool {\n\tre.compile()\n\treturn re.regexp.MatchString(s)\n}\n\nfunc (re *regexpStruct) NumSubexp() int {\n\tre.compile()\n\treturn re.regexp.NumSubexp()\n}\n\nfunc (re *regexpStruct) ReplaceAll(src, repl []byte) []byte {\n\tre.compile()\n\treturn re.regexp.ReplaceAll(src, repl)\n}\n\nfunc (re *regexpStruct) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte {\n\tre.compile()\n\treturn re.regexp.ReplaceAllFunc(src, repl)\n}\n\nfunc (re *regexpStruct) ReplaceAllLiteral(src, repl []byte) []byte {\n\tre.compile()\n\treturn re.regexp.ReplaceAllLiteral(src, repl)\n}\n\nfunc (re *regexpStruct) ReplaceAllLiteralString(src, repl string) string {\n\tre.compile()\n\treturn re.regexp.ReplaceAllLiteralString(src, repl)\n}\n\nfunc (re *regexpStruct) ReplaceAllString(src, repl string) string {\n\tre.compile()\n\treturn re.regexp.ReplaceAllString(src, repl)\n}\n\nfunc (re *regexpStruct) ReplaceAllStringFunc(src string, repl func(string) string) string {\n\tre.compile()\n\treturn re.regexp.ReplaceAllStringFunc(src, repl)\n}\n\nfunc (re *regexpStruct) Split(s string, n int) []string {\n\tre.compile()\n\treturn re.regexp.Split(s, n)\n}\n\nfunc (re *regexpStruct) String() string {\n\tre.compile()\n\treturn re.regexp.String()\n}\n\nfunc (re *regexpStruct) SubexpIndex(name string) int {\n\tre.compile()\n\treturn re.regexp.SubexpIndex(name)\n}\n\nfunc (re *regexpStruct) SubexpNames() []string {\n\tre.compile()\n\treturn re.regexp.SubexpNames()\n}\n\n// noCopy may be added to structs which must not be copied\n// after the first use.\n//\n// See https://golang.org/issues/8005#issuecomment-190753527\n// for details.\n//\n// Note that it must not be embedded, due to the Lock and Unlock methods.\ntype noCopy struct{}\n\n// Lock is a no-op used by -copylocks checker from `go vet`.\nfunc (*noCopy) Lock()   {}\nfunc (*noCopy) Unlock() {}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/regexp/regexp_dontprecompile.go",
    "content": "//go:build !regexp_precompile\n\npackage regexp\n\nconst precompile = false\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/regexp/regexp_precompile.go",
    "content": "//go:build regexp_precompile\n\npackage regexp\n\nconst precompile = true\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/stringid/README.md",
    "content": "This package provides helper functions for dealing with string identifiers\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/stringid/stringid.go",
    "content": "// Package stringid provides helper functions for dealing with string identifiers\npackage stringid\n\nimport (\n\tcryptorand \"crypto/rand\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"math/big\"\n\t\"math/rand\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"go.podman.io/storage/pkg/regexp\"\n)\n\nconst shortLen = 12\n\nvar (\n\tvalidShortID = regexp.Delayed(\"^[a-f0-9]{12}$\")\n\tvalidHex     = regexp.Delayed(`^[a-f0-9]{64}$`)\n\n\trngLock sync.Mutex\n\trng     *rand.Rand // A RNG with seeding properties we control. It can only be accessed with randLock held.\n)\n\n// IsShortID determines if an arbitrary string *looks like* a short ID.\nfunc IsShortID(id string) bool {\n\treturn validShortID.MatchString(id)\n}\n\n// TruncateID returns a shorthand version of a string identifier for convenience.\n// A collision with other shorthands is very unlikely, but possible.\n// In case of a collision a lookup with TruncIndex.Get() will fail, and the caller\n// will need to use a longer prefix, or the full-length Id.\nfunc TruncateID(id string) string {\n\tif i := strings.IndexRune(id, ':'); i >= 0 {\n\t\tid = id[i+1:]\n\t}\n\tif len(id) > shortLen {\n\t\tid = id[:shortLen]\n\t}\n\treturn id\n}\n\nfunc generateID(r io.Reader) string {\n\tb := make([]byte, 32)\n\tfor {\n\t\tif _, err := io.ReadFull(r, b); err != nil {\n\t\t\tpanic(err) // This shouldn't happen\n\t\t}\n\t\tid := hex.EncodeToString(b)\n\t\t// if we try to parse the truncated for as an int and we don't have\n\t\t// an error then the value is all numeric and causes issues when\n\t\t// used as a hostname. ref #3869\n\t\tif _, err := strconv.ParseInt(TruncateID(id), 10, 64); err == nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn id\n\t}\n}\n\n// GenerateRandomID returns a pseudorandom 64-character hex string.\nfunc GenerateRandomID() string {\n\treturn generateID(cryptorand.Reader)\n}\n\n// GenerateNonCryptoID generates unique id without using cryptographically\n// secure sources of random.\n// It helps you to save entropy.\nfunc GenerateNonCryptoID() string {\n\trngLock.Lock()\n\tdefer rngLock.Unlock()\n\treturn generateID(readerFunc(rng.Read))\n}\n\n// ValidateID checks whether an ID string is a valid image ID.\nfunc ValidateID(id string) error {\n\tif ok := validHex.MatchString(id); !ok {\n\t\treturn fmt.Errorf(\"image ID %q is invalid\", id)\n\t}\n\treturn nil\n}\n\nfunc init() {\n\t// Initialize a private RNG so we generate random ids. Tries to use a\n\t// crypto seed before falling back to time.\n\tvar seed int64\n\tif cryptoseed, err := cryptorand.Int(cryptorand.Reader, big.NewInt(math.MaxInt64)); err != nil {\n\t\t// This should not happen, but worst-case fallback to time-based seed.\n\t\tseed = time.Now().UnixNano()\n\t} else {\n\t\tseed = cryptoseed.Int64()\n\t}\n\n\trng = rand.New(rand.NewSource(seed))\n}\n\ntype readerFunc func(p []byte) (int, error)\n\nfunc (fn readerFunc) Read(p []byte) (int, error) {\n\treturn fn(p)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/stringutils/README.md",
    "content": "This package provides helper functions for dealing with strings\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/stringutils/stringutils.go",
    "content": "// Package stringutils provides helper functions for dealing with strings.\npackage stringutils\n\nimport (\n\t\"bytes\"\n\t\"math/rand/v2\"\n\t\"strings\"\n)\n\n// GenerateRandomAlphaOnlyString generates an alphabetical random string with length n.\nfunc GenerateRandomAlphaOnlyString(n int) string {\n\t// make a really long string\n\tletters := []byte(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")\n\tb := make([]byte, n)\n\tfor i := range b {\n\t\tb[i] = letters[rand.IntN(len(letters))]\n\t}\n\treturn string(b)\n}\n\n// GenerateRandomASCIIString generates an ASCII random string with length n.\nfunc GenerateRandomASCIIString(n int) string {\n\tchars := \"abcdefghijklmnopqrstuvwxyz\" +\n\t\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" +\n\t\t\"~!@#$%^&*()-_+={}[]\\\\|<,>.?/\\\"';:` \"\n\tres := make([]byte, n)\n\tfor i := range n {\n\t\tres[i] = chars[rand.IntN(len(chars))]\n\t}\n\treturn string(res)\n}\n\n// Ellipsis truncates a string to fit within maxlen, and appends ellipsis (...).\n// For maxlen of 3 and lower, no ellipsis is appended.\nfunc Ellipsis(s string, maxlen int) string {\n\tr := []rune(s)\n\tif len(r) <= maxlen {\n\t\treturn s\n\t}\n\tif maxlen <= 3 {\n\t\treturn string(r[:maxlen])\n\t}\n\treturn string(r[:maxlen-3]) + \"...\"\n}\n\n// Truncate truncates a string to maxlen.\nfunc Truncate(s string, maxlen int) string {\n\tr := []rune(s)\n\tif len(r) <= maxlen {\n\t\treturn s\n\t}\n\treturn string(r[:maxlen])\n}\n\n// InSlice tests whether a string is contained in a slice of strings or not.\n// Comparison is case insensitive\nfunc InSlice(slice []string, s string) bool {\n\tfor _, ss := range slice {\n\t\tif strings.EqualFold(s, ss) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// RemoveFromSlice removes a string from a slice.  The string can be present\n// multiple times.  The entire slice is iterated.\nfunc RemoveFromSlice(slice []string, s string) (ret []string) {\n\tfor _, ss := range slice {\n\t\tif !strings.EqualFold(s, ss) {\n\t\t\tret = append(ret, ss)\n\t\t}\n\t}\n\treturn ret\n}\n\nfunc quote(word string, buf *bytes.Buffer) {\n\t// Bail out early for \"simple\" strings\n\tif word != \"\" && !strings.ContainsAny(word, \"\\\\'\\\"`${[|&;<>()~*?! \\t\\n\") {\n\t\tbuf.WriteString(word)\n\t\treturn\n\t}\n\n\tbuf.WriteString(\"'\")\n\n\tfor i := range len(word) {\n\t\tb := word[i]\n\t\tif b == '\\'' {\n\t\t\t// Replace literal ' with a close ', a \\', and an open '\n\t\t\tbuf.WriteString(\"'\\\\''\")\n\t\t} else {\n\t\t\tbuf.WriteByte(b)\n\t\t}\n\t}\n\n\tbuf.WriteString(\"'\")\n}\n\n// ShellQuoteArguments takes a list of strings and escapes them so they will be\n// handled right when passed as arguments to a program via a shell\nfunc ShellQuoteArguments(args []string) string {\n\tvar buf bytes.Buffer\n\tfor i, arg := range args {\n\t\tif i != 0 {\n\t\t\tbuf.WriteByte(' ')\n\t\t}\n\t\tquote(arg, &buf)\n\t}\n\treturn buf.String()\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/chmod.go",
    "content": "package system\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc Chmod(name string, mode os.FileMode) error {\n\terr := os.Chmod(name, mode)\n\n\tfor err != nil && errors.Is(err, syscall.EINTR) {\n\t\terr = os.Chmod(name, mode)\n\t}\n\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/chtimes.go",
    "content": "package system\n\nimport (\n\t\"os\"\n\t\"time\"\n)\n\n// Chtimes changes the access time and modified time of a file at the given path\nfunc Chtimes(name string, atime time.Time, mtime time.Time) error {\n\tunixMinTime := time.Unix(0, 0)\n\tunixMaxTime := maxTime\n\n\t// If the modified time is prior to the Unix Epoch, or after the\n\t// end of Unix Time, os.Chtimes has undefined behavior\n\t// default to Unix Epoch in this case, just in case\n\n\tif atime.Before(unixMinTime) || atime.After(unixMaxTime) {\n\t\tatime = unixMinTime\n\t}\n\n\tif mtime.Before(unixMinTime) || mtime.After(unixMaxTime) {\n\t\tmtime = unixMinTime\n\t}\n\n\tif err := os.Chtimes(name, atime, mtime); err != nil {\n\t\treturn err\n\t}\n\n\t// Take platform specific action for setting create time.\n\tif err := setCTime(name, mtime); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/chtimes_unix.go",
    "content": "//go:build !windows\n\npackage system\n\nimport (\n\t\"time\"\n)\n\n// setCTime will set the create time on a file. On Unix, the create\n// time is updated as a side effect of setting the modified time, so\n// no action is required.\nfunc setCTime(_ string, _ time.Time) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/chtimes_windows.go",
    "content": "//go:build windows\n\npackage system\n\nimport (\n\t\"time\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n// setCTime will set the create time on a file. On Windows, this requires\n// calling SetFileTime and explicitly including the create time.\nfunc setCTime(path string, ctime time.Time) error {\n\tctimespec := windows.NsecToTimespec(ctime.UnixNano())\n\tpathp, e := windows.UTF16PtrFromString(path)\n\tif e != nil {\n\t\treturn e\n\t}\n\th, e := windows.CreateFile(pathp,\n\t\twindows.FILE_WRITE_ATTRIBUTES, windows.FILE_SHARE_WRITE, nil,\n\t\twindows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0)\n\tif e != nil {\n\t\treturn e\n\t}\n\tdefer windows.Close(h)\n\tc := windows.NsecToFiletime(windows.TimespecToNsec(ctimespec))\n\treturn windows.SetFileTime(h, &c, nil, nil)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/errors.go",
    "content": "package system\n\nimport (\n\t\"errors\"\n)\n\n// ErrNotSupportedPlatform means the platform is not supported.\nvar ErrNotSupportedPlatform = errors.New(\"platform and architecture is not supported\")\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/exitcode.go",
    "content": "package system\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"syscall\"\n)\n\n// GetExitCode returns the ExitStatus of the specified error if its type is\n// exec.ExitError, returns 0 and an error otherwise.\nfunc GetExitCode(err error) (int, error) {\n\texitCode := 0\n\tif exiterr, ok := err.(*exec.ExitError); ok {\n\t\tif procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {\n\t\t\treturn procExit.ExitStatus(), nil\n\t\t}\n\t}\n\treturn exitCode, fmt.Errorf(\"failed to get exit code\")\n}\n\n// ProcessExitCode process the specified error and returns the exit status code\n// if the error was of type exec.ExitError, returns nothing otherwise.\nfunc ProcessExitCode(err error) (exitCode int) {\n\tif err != nil {\n\t\tvar exiterr error\n\t\tif exitCode, exiterr = GetExitCode(err); exiterr != nil {\n\t\t\t// TODO: Fix this so we check the error's text.\n\t\t\t// we've failed to retrieve exit code, so we set it to 127\n\t\t\texitCode = 127\n\t\t}\n\t}\n\treturn exitCode\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/extattr_freebsd.go",
    "content": "//go:build freebsd\n\npackage system\n\nimport (\n\t\"os\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tEXTATTR_NAMESPACE_EMPTY  = unix.EXTATTR_NAMESPACE_EMPTY\n\tEXTATTR_NAMESPACE_USER   = unix.EXTATTR_NAMESPACE_USER\n\tEXTATTR_NAMESPACE_SYSTEM = unix.EXTATTR_NAMESPACE_SYSTEM\n)\n\n// ExtattrGetLink retrieves the value of the extended attribute identified by attrname\n// in the given namespace and associated with the given path in the file system.\n// If the path is a symbolic link, the extended attribute is retrieved from the link itself.\n// Returns a []byte slice if the extattr is set and nil otherwise.\nfunc ExtattrGetLink(path string, attrnamespace int, attrname string) ([]byte, error) {\n\tsize, errno := unix.ExtattrGetLink(path, attrnamespace, attrname,\n\t\tuintptr(unsafe.Pointer(nil)), 0)\n\tif errno != nil {\n\t\tif errno == unix.ENOATTR {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, &os.PathError{Op: \"extattr_get_link\", Path: path, Err: errno}\n\t}\n\tif size == 0 {\n\t\treturn []byte{}, nil\n\t}\n\n\tdest := make([]byte, size)\n\tsize, errno = unix.ExtattrGetLink(path, attrnamespace, attrname,\n\t\tuintptr(unsafe.Pointer(&dest[0])), size)\n\tif errno != nil {\n\t\treturn nil, &os.PathError{Op: \"extattr_get_link\", Path: path, Err: errno}\n\t}\n\n\treturn dest[:size], nil\n}\n\n// ExtattrSetLink sets the value of extended attribute identified by attrname\n// in the given namespace and associated with the given path in the file system.\n// If the path is a symbolic link, the extended attribute is set on the link itself.\nfunc ExtattrSetLink(path string, attrnamespace int, attrname string, data []byte) error {\n\tif len(data) == 0 {\n\t\tdata = []byte{} // ensure non-nil for empty data\n\t}\n\tif _, errno := unix.ExtattrSetLink(path, attrnamespace, attrname,\n\t\tuintptr(unsafe.Pointer(&data[0])), len(data)); errno != nil {\n\t\treturn &os.PathError{Op: \"extattr_set_link\", Path: path, Err: errno}\n\t}\n\n\treturn nil\n}\n\n// ExtattrListLink lists extended attributes associated with the given path\n// in the specified namespace. If the path is a symbolic link, the attributes\n// are listed from the link itself.\nfunc ExtattrListLink(path string, attrnamespace int) ([]string, error) {\n\tsize, errno := unix.ExtattrListLink(path, attrnamespace,\n\t\tuintptr(unsafe.Pointer(nil)), 0)\n\tif errno != nil {\n\t\treturn nil, &os.PathError{Op: \"extattr_list_link\", Path: path, Err: errno}\n\t}\n\tif size == 0 {\n\t\treturn []string{}, nil\n\t}\n\n\tdest := make([]byte, size)\n\tsize, errno = unix.ExtattrListLink(path, attrnamespace,\n\t\tuintptr(unsafe.Pointer(&dest[0])), size)\n\tif errno != nil {\n\t\treturn nil, &os.PathError{Op: \"extattr_list_link\", Path: path, Err: errno}\n\t}\n\n\tvar attrs []string\n\tfor i := 0; i < size; {\n\t\t// Each attribute is preceded by a single byte length\n\t\tlength := int(dest[i])\n\t\ti++\n\t\tif i+length > size {\n\t\t\tbreak\n\t\t}\n\t\tattrs = append(attrs, string(dest[i:i+length]))\n\t\ti += length\n\t}\n\n\treturn attrs, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/extattr_unsupported.go",
    "content": "//go:build !freebsd\n\npackage system\n\nconst (\n\tEXTATTR_NAMESPACE_EMPTY  = 0\n\tEXTATTR_NAMESPACE_USER   = 0\n\tEXTATTR_NAMESPACE_SYSTEM = 0\n)\n\n// ExtattrGetLink is not supported on platforms other than FreeBSD.\nfunc ExtattrGetLink(path string, attrnamespace int, attrname string) ([]byte, error) {\n\treturn nil, ErrNotSupportedPlatform\n}\n\n// ExtattrSetLink is not supported on platforms other than FreeBSD.\nfunc ExtattrSetLink(path string, attrnamespace int, attrname string, data []byte) error {\n\treturn ErrNotSupportedPlatform\n}\n\n// ExtattrListLink is not supported on platforms other than FreeBSD.\nfunc ExtattrListLink(path string, attrnamespace int) ([]string, error) {\n\treturn nil, ErrNotSupportedPlatform\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/init.go",
    "content": "package system\n\nimport (\n\t\"syscall\"\n\t\"time\"\n\t\"unsafe\"\n)\n\n// maxTime is used by chtimes.\nvar maxTime time.Time\n\nfunc init() {\n\t// chtimes initialization\n\tif unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 {\n\t\t// This is a 64 bit timespec\n\t\t// os.Chtimes limits time to the following\n\t\tmaxTime = time.Unix(0, 1<<63-1)\n\t} else {\n\t\t// This is a 32 bit timespec\n\t\tmaxTime = time.Unix(1<<31-1, 0)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/init_windows.go",
    "content": "package system\n\nimport \"os\"\n\n// LCOWSupported determines if Linux Containers on Windows are supported.\n// Note: This feature is in development (06/17) and enabled through an\n// environment variable. At a future time, it will be enabled based\n// on build number. @jhowardmsft\nvar lcowSupported = false\n\nfunc init() {\n\t// LCOW initialization\n\tif os.Getenv(\"LCOW_SUPPORTED\") != \"\" {\n\t\tlcowSupported = true\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lchflags_bsd.go",
    "content": "//go:build freebsd\n\npackage system\n\nimport (\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Flag values from <sys/stat.h>\nconst (\n\t/*\n\t * Definitions of flags stored in file flags word.\n\t *\n\t * Super-user and owner changeable flags.\n\t */\n\tUF_SETTABLE  uint32 = 0x0000ffff /* mask of owner changeable flags */\n\tUF_NODUMP    uint32 = 0x00000001 /* do not dump file */\n\tUF_IMMUTABLE uint32 = 0x00000002 /* file may not be changed */\n\tUF_APPEND    uint32 = 0x00000004 /* writes to file may only append */\n\tUF_OPAQUE    uint32 = 0x00000008 /* directory is opaque wrt. union */\n\tUF_NOUNLINK  uint32 = 0x00000010 /* file may not be removed or renamed */\n\n\tUF_SYSTEM   uint32 = 0x00000080 /* Windows system file bit */\n\tUF_SPARSE   uint32 = 0x00000100 /* sparse file */\n\tUF_OFFLINE  uint32 = 0x00000200 /* file is offline */\n\tUF_REPARSE  uint32 = 0x00000400 /* Windows reparse point file bit */\n\tUF_ARCHIVE  uint32 = 0x00000800 /* file needs to be archived */\n\tUF_READONLY uint32 = 0x00001000 /* Windows readonly file bit */\n\t/* This is the same as the MacOS X definition of UF_HIDDEN. */\n\tUF_HIDDEN uint32 = 0x00008000 /* file is hidden */\n\n\t/*\n\t * Super-user changeable flags.\n\t */\n\tSF_SETTABLE  uint32 = 0xffff0000 /* mask of superuser changeable flags */\n\tSF_ARCHIVED  uint32 = 0x00010000 /* file is archived */\n\tSF_IMMUTABLE uint32 = 0x00020000 /* file may not be changed */\n\tSF_APPEND    uint32 = 0x00040000 /* writes to file may only append */\n\tSF_NOUNLINK  uint32 = 0x00100000 /* file may not be removed or renamed */\n\tSF_SNAPSHOT  uint32 = 0x00200000 /* snapshot inode */\n)\n\nfunc Lchflags(path string, flags uint32) error {\n\tp, err := unix.BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e1 := unix.Syscall(unix.SYS_LCHFLAGS, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\treturn e1\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lchown.go",
    "content": "package system\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc Lchown(name string, uid, gid int) error {\n\terr := syscall.Lchown(name, uid, gid)\n\n\tfor err == syscall.EINTR {\n\t\terr = syscall.Lchown(name, uid, gid)\n\t}\n\n\tif err != nil {\n\t\treturn &os.PathError{Op: \"lchown\", Path: name, Err: err}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lcow_unix.go",
    "content": "//go:build !windows\n\npackage system\n\n// LCOWSupported returns true if Linux containers on Windows are supported.\nfunc LCOWSupported() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lcow_windows.go",
    "content": "package system\n\n// LCOWSupported returns true if Linux containers on Windows are supported.\nfunc LCOWSupported() bool {\n\treturn lcowSupported\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lstat_unix.go",
    "content": "//go:build !windows\n\npackage system\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\n// Lstat takes a path to a file and returns\n// a system.StatT type pertaining to that file.\n//\n// Throws an error if the file does not exist\nfunc Lstat(path string) (*StatT, error) {\n\ts := &syscall.Stat_t{}\n\tif err := syscall.Lstat(path, s); err != nil {\n\t\treturn nil, &os.PathError{Op: \"Lstat\", Path: path, Err: err}\n\t}\n\treturn fromStatT(s)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/lstat_windows.go",
    "content": "package system\n\nimport \"os\"\n\n// Lstat calls os.Lstat to get a fileinfo interface back.\n// This is then copied into our own locally defined structure.\nfunc Lstat(path string) (*StatT, error) {\n\tfi, err := os.Lstat(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn fromStatT(&fi)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo.go",
    "content": "package system\n\n// MemInfo contains memory statistics of the host system.\ntype MemInfo struct {\n\t// Total usable RAM (i.e. physical RAM minus a few reserved bits and the\n\t// kernel binary code).\n\tMemTotal int64\n\n\t// Amount of free memory.\n\tMemFree int64\n\n\t// Total amount of swap space available.\n\tSwapTotal int64\n\n\t// Amount of swap space that is currently unused.\n\tSwapFree int64\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo_freebsd.go",
    "content": "//go:build freebsd && cgo\n\npackage system\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// #include <unistd.h>\n// #include <sys/vmmeter.h>\n// #include <sys/sysctl.h>\n// #include <vm/vm_param.h>\nimport \"C\"\n\nfunc getMemInfo() (int64, int64, error) {\n\tdata, err := unix.SysctlRaw(\"vm.vmtotal\")\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"can't get kernel info: %w\", err)\n\t}\n\tif len(data) != C.sizeof_struct_vmtotal {\n\t\treturn -1, -1, fmt.Errorf(\"unexpected vmtotal size %d\", len(data))\n\t}\n\n\ttotal := (*C.struct_vmtotal)(unsafe.Pointer(&data[0]))\n\n\tpagesize := int64(C.sysconf(C._SC_PAGESIZE))\n\tnpages := int64(C.sysconf(C._SC_PHYS_PAGES))\n\treturn pagesize * npages, pagesize * int64(total.t_free), nil\n}\n\nfunc getSwapInfo() (int64, int64, error) {\n\tvar (\n\t\ttotal int64 = 0\n\t\tused  int64 = 0\n\t)\n\tswapCount, err := unix.SysctlUint32(\"vm.nswapdev\")\n\tif err != nil {\n\t\treturn -1, -1, fmt.Errorf(\"reading vm.nswapdev: %w\", err)\n\t}\n\tfor i := 0; i < int(swapCount); i++ {\n\t\tdata, err := unix.SysctlRaw(\"vm.swap_info\", i)\n\t\tif err != nil {\n\t\t\treturn -1, -1, fmt.Errorf(\"reading vm.swap_info.%d: %w\", i, err)\n\t\t}\n\t\tif len(data) != C.sizeof_struct_xswdev {\n\t\t\treturn -1, -1, fmt.Errorf(\"unexpected swap_info size %d\", len(data))\n\t\t}\n\t\txsw := (*C.struct_xswdev)(unsafe.Pointer(&data[0]))\n\t\ttotal += int64(xsw.xsw_nblks)\n\t\tused += int64(xsw.xsw_used)\n\t}\n\tpagesize := int64(C.sysconf(C._SC_PAGESIZE))\n\treturn pagesize * total, pagesize * (total - used), nil\n}\n\n// ReadMemInfo retrieves memory statistics of the host system and returns a\n//\n//\tMemInfo type.\nfunc ReadMemInfo() (*MemInfo, error) {\n\tMemTotal, MemFree, err := getMemInfo()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting memory totals %w\", err)\n\t}\n\tSwapTotal, SwapFree, err := getSwapInfo()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting swap totals %w\", err)\n\t}\n\n\tif MemTotal < 0 || MemFree < 0 || SwapTotal < 0 || SwapFree < 0 {\n\t\treturn nil, errors.New(\"getting system memory info\")\n\t}\n\n\tmeminfo := &MemInfo{}\n\t// Total memory is total physical memory less than memory locked by kernel\n\tmeminfo.MemTotal = MemTotal\n\tmeminfo.MemFree = MemFree\n\tmeminfo.SwapTotal = SwapTotal\n\tmeminfo.SwapFree = SwapFree\n\n\treturn meminfo, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo_linux.go",
    "content": "package system\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/docker/go-units\"\n)\n\n// ReadMemInfo retrieves memory statistics of the host system and returns a\n// MemInfo type.\nfunc ReadMemInfo() (*MemInfo, error) {\n\tfile, err := os.Open(\"/proc/meminfo\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\treturn parseMemInfo(file)\n}\n\n// parseMemInfo parses the /proc/meminfo file into\n// a MemInfo object given an io.Reader to the file.\n// Throws error if there are problems reading from the file\nfunc parseMemInfo(reader io.Reader) (*MemInfo, error) {\n\tmeminfo := &MemInfo{}\n\tscanner := bufio.NewScanner(reader)\n\tfor scanner.Scan() {\n\t\t// Expected format: [\"MemTotal:\", \"1234\", \"kB\"]\n\t\tparts := strings.Fields(scanner.Text())\n\n\t\t// Sanity checks: Skip malformed entries.\n\t\tif len(parts) < 3 || parts[2] != \"kB\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Convert to bytes.\n\t\tsize, err := strconv.Atoi(parts[1])\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tbytes := int64(size) * units.KiB\n\n\t\tswitch parts[0] {\n\t\tcase \"MemTotal:\":\n\t\t\tmeminfo.MemTotal = bytes\n\t\tcase \"MemFree:\":\n\t\t\tmeminfo.MemFree = bytes\n\t\tcase \"SwapTotal:\":\n\t\t\tmeminfo.SwapTotal = bytes\n\t\tcase \"SwapFree:\":\n\t\t\tmeminfo.SwapFree = bytes\n\t\t}\n\n\t}\n\n\t// Handle errors that may have occurred during the reading of the file.\n\tif err := scanner.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn meminfo, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo_solaris.go",
    "content": "//go:build solaris && cgo\n\npackage system\n\nimport (\n\t\"fmt\"\n\t\"unsafe\"\n)\n\n// #cgo CFLAGS: -std=c99\n// #cgo LDFLAGS: -lkstat\n// #include <unistd.h>\n// #include <stdlib.h>\n// #include <stdio.h>\n// #include <kstat.h>\n// #include <sys/swap.h>\n// #include <sys/param.h>\n// struct swaptable *allocSwaptable(int num) {\n//\tstruct swaptable *st;\n//\tstruct swapent *swapent;\n// \tst = (struct swaptable *)malloc(num * sizeof(swapent_t) + sizeof (int));\n//\tswapent = st->swt_ent;\n//\tfor (int i = 0; i < num; i++,swapent++) {\n//\t\tswapent->ste_path = (char *)malloc(MAXPATHLEN * sizeof (char));\n//\t}\n//\tst->swt_n = num;\n//\treturn st;\n//}\n// void freeSwaptable (struct swaptable *st) {\n//\tstruct swapent *swapent = st->swt_ent;\n//\tfor (int i = 0; i < st->swt_n; i++,swapent++) {\n//\t\tfree(swapent->ste_path);\n//\t}\n//\tfree(st);\n// }\n// swapent_t getSwapEnt(swapent_t *ent, int i) {\n//\treturn ent[i];\n// }\n// int64_t getPpKernel() {\n//\tint64_t pp_kernel = 0;\n//\tkstat_ctl_t *ksc;\n//\tkstat_t *ks;\n//\tkstat_named_t *knp;\n//\tkid_t kid;\n//\n//\tif ((ksc = kstat_open()) == NULL) {\n//\t\treturn -1;\n//\t}\n//\tif ((ks = kstat_lookup(ksc, \"unix\", 0, \"system_pages\")) == NULL) {\n//\t\treturn -1;\n//\t}\n//\tif (((kid = kstat_read(ksc, ks, NULL)) == -1) ||\n//\t    ((knp = kstat_data_lookup(ks, \"pp_kernel\")) == NULL)) {\n//\t\treturn -1;\n//\t}\n//\tswitch (knp->data_type) {\n//\tcase KSTAT_DATA_UINT64:\n//\t\tpp_kernel = knp->value.ui64;\n//\t\tbreak;\n//\tcase KSTAT_DATA_UINT32:\n//\t\tpp_kernel = knp->value.ui32;\n//\t\tbreak;\n//\t}\n//\tpp_kernel *= sysconf(_SC_PAGESIZE);\n//\treturn (pp_kernel > 0 ? pp_kernel : -1);\n// }\nimport \"C\"\n\n// Get the system memory info using sysconf same as prtconf\nfunc getTotalMem() int64 {\n\tpagesize := C.sysconf(C._SC_PAGESIZE)\n\tnpages := C.sysconf(C._SC_PHYS_PAGES)\n\treturn int64(pagesize * npages)\n}\n\nfunc getFreeMem() int64 {\n\tpagesize := C.sysconf(C._SC_PAGESIZE)\n\tnpages := C.sysconf(C._SC_AVPHYS_PAGES)\n\treturn int64(pagesize * npages)\n}\n\n// ReadMemInfo retrieves memory statistics of the host system and returns a\n//\n//\tMemInfo type.\nfunc ReadMemInfo() (*MemInfo, error) {\n\tppKernel := C.getPpKernel()\n\tMemTotal := getTotalMem()\n\tMemFree := getFreeMem()\n\tSwapTotal, SwapFree, err := getSysSwap()\n\n\tif ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 ||\n\t\tSwapFree < 0 {\n\t\treturn nil, fmt.Errorf(\"getting system memory info %w\", err)\n\t}\n\n\tmeminfo := &MemInfo{}\n\t// Total memory is total physical memory less than memory locked by kernel\n\tmeminfo.MemTotal = MemTotal - int64(ppKernel)\n\tmeminfo.MemFree = MemFree\n\tmeminfo.SwapTotal = SwapTotal\n\tmeminfo.SwapFree = SwapFree\n\n\treturn meminfo, nil\n}\n\nfunc getSysSwap() (int64, int64, error) {\n\tvar tSwap int64\n\tvar fSwap int64\n\tvar diskblksPerPage int64\n\tnum, err := C.swapctl(C.SC_GETNSWP, nil)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\tst := C.allocSwaptable(num)\n\t_, err = C.swapctl(C.SC_LIST, unsafe.Pointer(st))\n\tif err != nil {\n\t\tC.freeSwaptable(st)\n\t\treturn -1, -1, err\n\t}\n\n\tdiskblksPerPage = int64(C.sysconf(C._SC_PAGESIZE) >> C.DEV_BSHIFT)\n\tfor i := 0; i < int(num); i++ {\n\t\tswapent := C.getSwapEnt(&st.swt_ent[0], C.int(i))\n\t\ttSwap += int64(swapent.ste_pages) * diskblksPerPage\n\t\tfSwap += int64(swapent.ste_free) * diskblksPerPage\n\t}\n\tC.freeSwaptable(st)\n\treturn tSwap, fSwap, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo_unsupported.go",
    "content": "//go:build !linux && !windows && !solaris && !(freebsd && cgo)\n\npackage system\n\n// ReadMemInfo is not supported on platforms other than linux and windows.\nfunc ReadMemInfo() (*MemInfo, error) {\n\treturn nil, ErrNotSupportedPlatform\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/meminfo_windows.go",
    "content": "package system\n\nimport (\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nvar (\n\tmodkernel32 = windows.NewLazySystemDLL(\"kernel32.dll\")\n\n\tprocGlobalMemoryStatusEx = modkernel32.NewProc(\"GlobalMemoryStatusEx\")\n)\n\n// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366589(v=vs.85).aspx\n// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx\ntype memorystatusex struct {\n\tdwLength                uint32\n\tdwMemoryLoad            uint32\n\tullTotalPhys            uint64\n\tullAvailPhys            uint64\n\tullTotalPageFile        uint64\n\tullAvailPageFile        uint64\n\tullTotalVirtual         uint64\n\tullAvailVirtual         uint64\n\tullAvailExtendedVirtual uint64\n}\n\n// ReadMemInfo retrieves memory statistics of the host system and returns a\n//\n//\tMemInfo type.\nfunc ReadMemInfo() (*MemInfo, error) {\n\tmsi := &memorystatusex{\n\t\tdwLength: 64,\n\t}\n\tr1, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(msi)))\n\tif r1 == 0 {\n\t\treturn &MemInfo{}, nil\n\t}\n\treturn &MemInfo{\n\t\tMemTotal:  int64(msi.ullTotalPhys),\n\t\tMemFree:   int64(msi.ullAvailPhys),\n\t\tSwapTotal: int64(msi.ullTotalPageFile),\n\t\tSwapFree:  int64(msi.ullAvailPageFile),\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/mknod.go",
    "content": "//go:build !windows && !freebsd\n\npackage system\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\n// Mknod creates a filesystem node (file, device special file or named pipe) named path\n// with attributes specified by mode and dev.\nfunc Mknod(path string, mode uint32, dev uint32) error {\n\treturn unix.Mknod(path, mode, int(dev))\n}\n\n// Mkdev is used to build the value of linux devices (in /dev/) which specifies major\n// and minor number of the newly created device special file.\n// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.\n// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,\n// then the top 12 bits of the minor.\nfunc Mkdev(major int64, minor int64) uint32 {\n\treturn uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/mknod_freebsd.go",
    "content": "//go:build freebsd\n\npackage system\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\n// Mknod creates a filesystem node (file, device special file or named pipe) named path\n// with attributes specified by mode and dev.\nfunc Mknod(path string, mode uint32, dev uint64) error {\n\treturn unix.Mknod(path, mode, dev)\n}\n\n// Mkdev is used to build the value of linux devices (in /dev/) which specifies major\n// and minor number of the newly created device special file.\n// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.\n// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,\n// then the top 12 bits of the minor.\nfunc Mkdev(major int64, minor int64) uint64 {\n\treturn uint64(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/mknod_windows.go",
    "content": "//go:build windows\n\npackage system\n\n// Mknod is not implemented on Windows.\nfunc Mknod(path string, mode uint32, dev int) error {\n\treturn ErrNotSupportedPlatform\n}\n\n// Mkdev is not implemented on Windows.\nfunc Mkdev(major int64, minor int64) uint32 {\n\tpanic(\"Mkdev not implemented on Windows.\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/path.go",
    "content": "package system\n\nimport \"runtime\"\n\nconst defaultUnixPathEnv = \"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\n\n// DefaultPathEnv is unix style list of directories to search for\n// executables. Each directory is separated from the next by a colon\n// ':' character .\nfunc DefaultPathEnv(platform string) string {\n\tif runtime.GOOS == \"windows\" {\n\t\tif platform != runtime.GOOS && LCOWSupported() {\n\t\t\treturn defaultUnixPathEnv\n\t\t}\n\t\t// Deliberately empty on Windows containers on Windows as the default path will be set by\n\t\t// the container. Docker has no context of what the default path should be.\n\t\treturn \"\"\n\t}\n\treturn defaultUnixPathEnv\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/path_unix.go",
    "content": "//go:build !windows\n\npackage system\n\n// CheckSystemDriveAndRemoveDriveLetter verifies that a path, if it includes a drive letter,\n// is the system drive. This is a no-op on Linux.\nfunc CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {\n\treturn path, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/path_windows.go",
    "content": "//go:build windows\n\npackage system\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\n// CheckSystemDriveAndRemoveDriveLetter verifies and manipulates a Windows path.\n// This is used, for example, when validating a user provided path in docker cp.\n// If a drive letter is supplied, it must be the system drive. The drive letter\n// is always removed. Also, it translates it to OS semantics (IOW / to \\). We\n// need the path in this syntax so that it can ultimately be concatenated with\n// a Windows long-path which doesn't support drive-letters. Examples:\n// C:\t\t\t--> Fail\n// C:\\\t\t\t--> \\\n// a\t\t\t--> a\n// /a\t\t\t--> \\a\n// d:\\\t\t\t--> Fail\nfunc CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {\n\tif len(path) == 2 && string(path[1]) == \":\" {\n\t\treturn \"\", fmt.Errorf(\"relative path not specified in %q\", path)\n\t}\n\tif !filepath.IsAbs(path) || len(path) < 2 {\n\t\treturn filepath.FromSlash(path), nil\n\t}\n\tif string(path[1]) == \":\" && !strings.EqualFold(string(path[0]), \"c\") {\n\t\treturn \"\", fmt.Errorf(\"specified path is not on the system drive (C:)\")\n\t}\n\treturn filepath.FromSlash(path[2:]), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/process_unix.go",
    "content": "//go:build linux || freebsd || solaris || darwin\n\npackage system\n\nimport (\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// IsProcessAlive returns true if process with a given pid is running.\nfunc IsProcessAlive(pid int) bool {\n\terr := unix.Kill(pid, syscall.Signal(0))\n\tif err == nil || err == unix.EPERM {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// KillProcess force-stops a process.\nfunc KillProcess(pid int) {\n\t_ = unix.Kill(pid, unix.SIGKILL)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/rm.go",
    "content": "package system\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/mount\"\n)\n\n// EnsureRemoveAll wraps `os.RemoveAll` to check for specific errors that can\n// often be remedied.\n// Only use `EnsureRemoveAll` if you really want to make every effort to remove\n// a directory.\n//\n// Because of the way `os.Remove` (and by extension `os.RemoveAll`) works, there\n// can be a race between reading directory entries and then actually attempting\n// to remove everything in the directory.\n// These types of errors do not need to be returned since it's ok for the dir to\n// be gone we can just retry the remove operation.\n//\n// This should not return a `os.ErrNotExist` kind of error under any circumstances\nfunc EnsureRemoveAll(dir string) error {\n\tnotExistErr := make(map[string]bool)\n\n\t// track retries\n\texitOnErr := make(map[string]int)\n\tmaxRetry := 1000\n\n\t// Attempt a simple remove all first, this avoids the more expensive\n\t// RecursiveUnmount call if not needed.\n\tif err := os.RemoveAll(dir); err == nil {\n\t\treturn nil\n\t}\n\n\t// Attempt to unmount anything beneath this dir first\n\tif err := mount.RecursiveUnmount(dir); err != nil {\n\t\tlogrus.Debugf(\"RecursiveUnmount on %s failed: %v\", dir, err)\n\t}\n\n\tfor {\n\t\terr := os.RemoveAll(dir)\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\n\t\t// If the RemoveAll fails with a permission error, we\n\t\t// may have immutable files so try to remove the\n\t\t// immutable flag and redo the RemoveAll.\n\t\tif errors.Is(err, syscall.EPERM) {\n\t\t\tif err = resetFileFlags(dir); err != nil {\n\t\t\t\treturn fmt.Errorf(\"resetting file flags: %w\", err)\n\t\t\t}\n\t\t\terr = os.RemoveAll(dir)\n\t\t\tif err == nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\n\t\tpe, ok := err.(*os.PathError)\n\t\tif !ok {\n\t\t\treturn err\n\t\t}\n\n\t\tif os.IsNotExist(err) {\n\t\t\tif notExistErr[pe.Path] {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tnotExistErr[pe.Path] = true\n\n\t\t\t// There is a race where some subdir can be removed but after the parent\n\t\t\t//   dir entries have been read.\n\t\t\t// So the path could be from `os.Remove(subdir)`\n\t\t\t// If the reported non-existent path is not the passed in `dir` we\n\t\t\t// should just retry, but otherwise return with no error.\n\t\t\tif pe.Path == dir {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif !IsEBUSY(pe.Err) {\n\t\t\treturn err\n\t\t}\n\n\t\tif e := mount.Unmount(pe.Path); e != nil {\n\t\t\treturn fmt.Errorf(\"while removing %s: %w\", dir, e)\n\t\t}\n\n\t\tif exitOnErr[pe.Path] == maxRetry {\n\t\t\treturn err\n\t\t}\n\t\texitOnErr[pe.Path]++\n\t\ttime.Sleep(10 * time.Millisecond)\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/rm_common.go",
    "content": "//go:build !freebsd\n\npackage system\n\n// Reset file flags in a directory tree. This allows EnsureRemoveAll\n// to delete trees which have the immutable flag set.\nfunc resetFileFlags(_ string) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/rm_freebsd.go",
    "content": "package system\n\nimport (\n\t\"io/fs\"\n\t\"path/filepath\"\n)\n\n// Reset file flags in a directory tree. This allows EnsureRemoveAll\n// to delete trees which have the immutable flag set.\nfunc resetFileFlags(dir string) error {\n\treturn filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {\n\t\tif err := Lchflags(path, 0); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_common.go",
    "content": "//go:build !freebsd\n\npackage system\n\ntype platformStatT struct{}\n\n// Flags return file flags if supported or zero otherwise\nfunc (s StatT) Flags() uint32 {\n\t_ = s.platformStatT // Silence warnings that StatT.platformStatT is unused (on these platforms)\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_darwin.go",
    "content": "package system\n\nimport \"syscall\"\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: s.Size,\n\t\tmode: uint32(s.Mode),\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev),\n\t\tmtim: s.Mtimespec,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_freebsd.go",
    "content": "package system\n\nimport \"syscall\"\n\ntype platformStatT struct {\n\tflags uint32\n}\n\n// Flags return file flags if supported or zero otherwise\nfunc (s StatT) Flags() uint32 {\n\treturn s.flags\n}\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\tst := &StatT{\n\t\tsize: s.Size,\n\t\tmode: uint32(s.Mode),\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev),\n\t\tmtim: s.Mtimespec,\n\t\tdev:  s.Dev,\n\t}\n\tst.flags = s.Flags\n\tst.dev = s.Dev\n\treturn st, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_linux.go",
    "content": "package system\n\nimport \"syscall\"\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: s.Size,\n\t\tmode: s.Mode,\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev), //nolint:unconvert\n\t\tmtim: s.Mtim,\n\t\tdev:  uint64(s.Dev), //nolint:unconvert\n\t}, nil\n}\n\n// FromStatT converts a syscall.Stat_t type to a system.Stat_t type\n// This is exposed on Linux as pkg/archive/changes uses it.\nfunc FromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn fromStatT(s)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_netbsd.go",
    "content": "package system\n\nimport \"syscall\"\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: s.Size,\n\t\tmode: uint32(s.Mode),\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev),\n\t\tmtim: s.Mtimespec,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_openbsd.go",
    "content": "package system\n\nimport \"syscall\"\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: s.Size,\n\t\tmode: uint32(s.Mode),\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev),\n\t\tmtim: s.Mtim,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_solaris.go",
    "content": "package system\n\nimport \"syscall\"\n\n// fromStatT converts a syscall.Stat_t type to a system.Stat_t type\nfunc fromStatT(s *syscall.Stat_t) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: s.Size,\n\t\tmode: uint32(s.Mode),\n\t\tuid:  s.Uid,\n\t\tgid:  s.Gid,\n\t\trdev: uint64(s.Rdev),\n\t\tmtim: s.Mtim,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_unix.go",
    "content": "//go:build !windows\n\npackage system\n\nimport (\n\t\"os\"\n\t\"strconv\"\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// StatT type contains status of a file. It contains metadata\n// like permission, owner, group, size, etc about a file.\ntype StatT struct {\n\tmode uint32\n\tuid  uint32\n\tgid  uint32\n\trdev uint64\n\tsize int64\n\tmtim syscall.Timespec\n\tdev  uint64\n\tplatformStatT\n}\n\n// Mode returns file's permission mode.\nfunc (s StatT) Mode() uint32 {\n\treturn s.mode\n}\n\n// UID returns file's user id of owner.\nfunc (s StatT) UID() uint32 {\n\treturn s.uid\n}\n\n// GID returns file's group id of owner.\nfunc (s StatT) GID() uint32 {\n\treturn s.gid\n}\n\n// Rdev returns file's device ID (if it's special file).\nfunc (s StatT) Rdev() uint64 {\n\treturn s.rdev\n}\n\n// Size returns file's size.\nfunc (s StatT) Size() int64 {\n\treturn s.size\n}\n\n// Mtim returns file's last modification time.\nfunc (s StatT) Mtim() syscall.Timespec {\n\treturn s.mtim\n}\n\n// Dev returns a unique identifier for owning filesystem\nfunc (s StatT) Dev() uint64 {\n\treturn s.dev\n}\n\nfunc (s StatT) IsDir() bool {\n\treturn (s.mode & unix.S_IFDIR) != 0\n}\n\n// Stat takes a path to a file and returns\n// a system.StatT type pertaining to that file.\n//\n// Throws an error if the file does not exist\nfunc Stat(path string) (*StatT, error) {\n\ts := &syscall.Stat_t{}\n\tif err := syscall.Stat(path, s); err != nil {\n\t\treturn nil, &os.PathError{Op: \"Stat\", Path: path, Err: err}\n\t}\n\treturn fromStatT(s)\n}\n\n// Fstat takes an open file descriptor and returns\n// a system.StatT type pertaining to that file.\n//\n// Throws an error if the file descriptor is invalid\nfunc Fstat(fd int) (*StatT, error) {\n\ts := &syscall.Stat_t{}\n\tif err := syscall.Fstat(fd, s); err != nil {\n\t\treturn nil, &os.PathError{Op: \"Fstat\", Path: strconv.Itoa(fd), Err: err}\n\t}\n\treturn fromStatT(s)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/stat_windows.go",
    "content": "package system\n\nimport (\n\t\"os\"\n\t\"time\"\n)\n\n// StatT type contains status of a file. It contains metadata\n// like permission, size, etc about a file.\ntype StatT struct {\n\tmode os.FileMode\n\tsize int64\n\tmtim time.Time\n\tplatformStatT\n}\n\n// Size returns file's size.\nfunc (s StatT) Size() int64 {\n\treturn s.size\n}\n\n// Mode returns file's permission mode.\nfunc (s StatT) Mode() os.FileMode {\n\treturn os.FileMode(s.mode)\n}\n\n// Mtim returns file's last modification time.\nfunc (s StatT) Mtim() time.Time {\n\treturn time.Time(s.mtim)\n}\n\n// UID returns file's user id of owner.\n//\n// on windows this is always 0 because there is no concept of UID\nfunc (s StatT) UID() uint32 {\n\treturn 0\n}\n\n// GID returns file's group id of owner.\n//\n// on windows this is always 0 because there is no concept of GID\nfunc (s StatT) GID() uint32 {\n\treturn 0\n}\n\n// Dev returns a unique identifier for owning filesystem\nfunc (s StatT) Dev() uint64 {\n\treturn 0\n}\n\nfunc (s StatT) IsDir() bool {\n\treturn s.Mode().IsDir()\n}\n\n// Stat takes a path to a file and returns\n// a system.StatT type pertaining to that file.\n//\n// Throws an error if the file does not exist\nfunc Stat(path string) (*StatT, error) {\n\tfi, err := os.Stat(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fromStatT(&fi)\n}\n\n// fromStatT converts a os.FileInfo type to a system.StatT type\nfunc fromStatT(fi *os.FileInfo) (*StatT, error) {\n\treturn &StatT{\n\t\tsize: (*fi).Size(),\n\t\tmode: (*fi).Mode(),\n\t\tmtim: (*fi).ModTime(),\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/syscall_unix.go",
    "content": "//go:build !windows\n\npackage system\n\nimport (\n\t\"errors\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Unmount is a platform-specific helper function to call\n// the unmount syscall.\nfunc Unmount(dest string) error {\n\treturn unix.Unmount(dest, 0)\n}\n\n// CommandLineToArgv should not be used on Unix.\n// It simply returns commandLine in the only element in the returned array.\nfunc CommandLineToArgv(commandLine string) ([]string, error) {\n\treturn []string{commandLine}, nil\n}\n\n// IsEBUSY checks if the specified error is EBUSY.\nfunc IsEBUSY(err error) bool {\n\treturn errors.Is(err, unix.EBUSY)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/syscall_windows.go",
    "content": "package system\n\nimport (\n\t\"unsafe\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"golang.org/x/sys/windows\"\n)\n\nvar (\n\tntuserApiset       = windows.NewLazyDLL(\"ext-ms-win-ntuser-window-l1-1-0\")\n\tprocGetVersionExW  = modkernel32.NewProc(\"GetVersionExW\")\n\tprocGetProductInfo = modkernel32.NewProc(\"GetProductInfo\")\n)\n\n// OSVersion is a wrapper for Windows version information\n// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx\ntype OSVersion struct {\n\tVersion      uint32\n\tMajorVersion uint8\n\tMinorVersion uint8\n\tBuild        uint16\n}\n\n// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx\ntype osVersionInfoEx struct {\n\tOSVersionInfoSize uint32\n\tMajorVersion      uint32\n\tMinorVersion      uint32\n\tBuildNumber       uint32\n\tPlatformID        uint32\n\tCSDVersion        [128]uint16\n\tServicePackMajor  uint16\n\tServicePackMinor  uint16\n\tSuiteMask         uint16\n\tProductType       byte\n\tReserve           byte\n}\n\n// GetOSVersion gets the operating system version on Windows. Note that\n// docker.exe must be manifested to get the correct version information.\nfunc GetOSVersion() OSVersion {\n\tvar err error\n\tosv := OSVersion{}\n\tosv.Version, err = windows.GetVersion()\n\tif err != nil {\n\t\t// GetVersion never fails.\n\t\tpanic(err)\n\t}\n\tosv.MajorVersion = uint8(osv.Version & 0xFF)\n\tosv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)\n\tosv.Build = uint16(osv.Version >> 16)\n\treturn osv\n}\n\n// IsWindowsClient returns true if the SKU is client\n// @engine maintainers - this function should not be removed or modified as it\n// is used to enforce licensing restrictions on Windows.\nfunc IsWindowsClient() bool {\n\tosviex := &osVersionInfoEx{OSVersionInfoSize: 284}\n\tr1, _, err := procGetVersionExW.Call(uintptr(unsafe.Pointer(osviex)))\n\tif r1 == 0 {\n\t\tlogrus.Warnf(\"GetVersionExW failed - assuming server SKU: %v\", err)\n\t\treturn false\n\t}\n\tconst verNTWorkstation = 0x00000001\n\treturn osviex.ProductType == verNTWorkstation\n}\n\n// IsIoTCore returns true if the currently running image is based off of\n// Windows 10 IoT Core.\n// @engine maintainers - this function should not be removed or modified as it\n// is used to enforce licensing restrictions on Windows.\nfunc IsIoTCore() bool {\n\tvar returnedProductType uint32\n\tr1, _, err := procGetProductInfo.Call(6, 1, 0, 0, uintptr(unsafe.Pointer(&returnedProductType)))\n\tif r1 == 0 {\n\t\tlogrus.Warnf(\"GetProductInfo failed - assuming this is not IoT: %v\", err)\n\t\treturn false\n\t}\n\tconst productIoTUAP = 0x0000007B\n\tconst productIoTUAPCommercial = 0x00000083\n\treturn returnedProductType == productIoTUAP || returnedProductType == productIoTUAPCommercial\n}\n\n// Unmount is a platform-specific helper function to call\n// the unmount syscall. Not supported on Windows\nfunc Unmount(dest string) error {\n\treturn nil\n}\n\n// CommandLineToArgv wraps the Windows syscall to turn a commandline into an argument array.\nfunc CommandLineToArgv(commandLine string) ([]string, error) {\n\tvar argc int32\n\n\targsPtr, err := windows.UTF16PtrFromString(commandLine)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\targv, err := windows.CommandLineToArgv(argsPtr, &argc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer windows.LocalFree(windows.Handle(uintptr(unsafe.Pointer(argv))))\n\n\tnewArgs := make([]string, argc)\n\tfor i, v := range (*argv)[:argc] {\n\t\tnewArgs[i] = string(windows.UTF16ToString((*v)[:]))\n\t}\n\n\treturn newArgs, nil\n}\n\n// HasWin32KSupport determines whether containers that depend on win32k can\n// run on this machine. Win32k is the driver used to implement windowing.\nfunc HasWin32KSupport() bool {\n\t// For now, check for ntuser API support on the host. In the future, a host\n\t// may support win32k in containers even if the host does not support ntuser\n\t// APIs.\n\treturn ntuserApiset.Load() == nil\n}\n\n// IsEBUSY checks if the specified error is EBUSY.\nfunc IsEBUSY(err error) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/umask.go",
    "content": "//go:build !windows\n\npackage system\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\n// Umask sets current process's file mode creation mask to newmask\n// and returns oldmask.\nfunc Umask(newmask int) (oldmask int, err error) {\n\treturn unix.Umask(newmask), nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/umask_windows.go",
    "content": "//go:build windows\n\npackage system\n\n// Umask is not supported on the windows platform.\nfunc Umask(newmask int) (oldmask int, err error) {\n\t// should not be called on cli code path\n\treturn 0, ErrNotSupportedPlatform\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/utimes_freebsd.go",
    "content": "package system\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// LUtimesNano is used to change access and modification time of the specified path.\n// It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm.\nfunc LUtimesNano(path string, ts []syscall.Timespec) error {\n\tatFdCwd := unix.AT_FDCWD\n\n\tvar _path *byte\n\t_path, err := unix.BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), unix.AT_SYMLINK_NOFOLLOW, 0, 0); err != 0 && err != unix.ENOSYS {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/utimes_linux.go",
    "content": "package system\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// LUtimesNano is used to change access and modification time of the specified path.\n// It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm.\nfunc LUtimesNano(path string, ts []syscall.Timespec) error {\n\tatFdCwd := unix.AT_FDCWD\n\n\tvar _path *byte\n\t_path, err := unix.BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), unix.AT_SYMLINK_NOFOLLOW, 0, 0); err != 0 && err != unix.ENOSYS {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/utimes_unsupported.go",
    "content": "//go:build !linux && !freebsd\n\npackage system\n\nimport \"syscall\"\n\n// LUtimesNano is only supported on linux and freebsd.\nfunc LUtimesNano(path string, ts []syscall.Timespec) error {\n\treturn ErrNotSupportedPlatform\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/xattrs_darwin.go",
    "content": "package system\n\nimport (\n\t\"bytes\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// Value is larger than the maximum size allowed\n\tE2BIG unix.Errno = unix.E2BIG\n\n\t// Operation not supported\n\tENOTSUP unix.Errno = unix.ENOTSUP\n)\n\n// Lgetxattr retrieves the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\n// Returns a []byte slice if the xattr is set and nil otherwise.\nfunc Lgetxattr(path string, attr string) ([]byte, error) {\n\t// Start with a 128 length byte array\n\tdest := make([]byte, 128)\n\tsz, errno := unix.Lgetxattr(path, attr, dest)\n\n\tfor errno == unix.ERANGE {\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = unix.Lgetxattr(path, attr, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, &os.PathError{Op: \"lgetxattr\", Path: path, Err: errno}\n\t\t}\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = unix.Lgetxattr(path, attr, dest)\n\t}\n\n\tswitch {\n\tcase errno == unix.ENOATTR:\n\t\treturn nil, nil\n\tcase errno != nil:\n\t\treturn nil, &os.PathError{Op: \"lgetxattr\", Path: path, Err: errno}\n\t}\n\n\treturn dest[:sz], nil\n}\n\n// Lsetxattr sets the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\nfunc Lsetxattr(path string, attr string, data []byte, flags int) error {\n\tif err := unix.Lsetxattr(path, attr, data, flags); err != nil {\n\t\treturn &os.PathError{Op: \"lsetxattr\", Path: path, Err: err}\n\t}\n\n\treturn nil\n}\n\n// Llistxattr lists extended attributes associated with the given path\n// in the file system.\nfunc Llistxattr(path string) ([]string, error) {\n\tdest := make([]byte, 128)\n\tsz, errno := unix.Llistxattr(path, dest)\n\n\tfor errno == unix.ERANGE {\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = unix.Llistxattr(path, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, &os.PathError{Op: \"llistxattr\", Path: path, Err: errno}\n\t\t}\n\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = unix.Llistxattr(path, dest)\n\t}\n\tif errno != nil {\n\t\treturn nil, &os.PathError{Op: \"llistxattr\", Path: path, Err: errno}\n\t}\n\n\tvar attrs []string\n\tfor token := range bytes.SplitSeq(dest[:sz], []byte{0}) {\n\t\tif len(token) > 0 {\n\t\t\tattrs = append(attrs, string(token))\n\t\t}\n\t}\n\n\treturn attrs, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/xattrs_freebsd.go",
    "content": "package system\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// Value is larger than the maximum size allowed\n\tE2BIG unix.Errno = unix.E2BIG\n\n\t// Operation not supported\n\tENOTSUP unix.Errno = unix.ENOTSUP\n\n\t// Value is too small or too large for maximum size allowed\n\tEOVERFLOW unix.Errno = unix.EOVERFLOW\n)\n\nvar namespaceMap = map[string]int{\n\t\"user\":   EXTATTR_NAMESPACE_USER,\n\t\"system\": EXTATTR_NAMESPACE_SYSTEM,\n}\n\nfunc xattrToExtattr(xattr string) (namespace int, extattr string, err error) {\n\tnamespaceName, extattr, found := strings.Cut(xattr, \".\")\n\tif !found {\n\t\treturn -1, \"\", ENOTSUP\n\t}\n\n\tnamespace, ok := namespaceMap[namespaceName]\n\tif !ok {\n\t\treturn -1, \"\", ENOTSUP\n\t}\n\treturn namespace, extattr, nil\n}\n\n// Lgetxattr retrieves the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\n// Returns a []byte slice if the xattr is set and nil otherwise.\nfunc Lgetxattr(path string, attr string) ([]byte, error) {\n\tnamespace, extattr, err := xattrToExtattr(attr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn ExtattrGetLink(path, namespace, extattr)\n}\n\n// Lsetxattr sets the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\nfunc Lsetxattr(path string, attr string, value []byte, flags int) error {\n\tif flags != 0 {\n\t\t// FIXME: Flags are not supported on FreeBSD, but we can implement\n\t\t// them mimicking the behavior of the Linux implementation.\n\t\t// See lsetxattr(2) on Linux for more information.\n\t\treturn ENOTSUP\n\t}\n\n\tnamespace, extattr, err := xattrToExtattr(attr)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn ExtattrSetLink(path, namespace, extattr, value)\n}\n\n// Llistxattr lists extended attributes associated with the given path\n// in the file system.\nfunc Llistxattr(path string) ([]string, error) {\n\tattrs := []string{}\n\n\tfor namespaceName, namespace := range namespaceMap {\n\t\tnamespaceAttrs, err := ExtattrListLink(path, namespace)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfor _, attr := range namespaceAttrs {\n\t\t\tattrs = append(attrs, namespaceName+\".\"+attr)\n\t\t}\n\t}\n\n\treturn attrs, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/xattrs_linux.go",
    "content": "package system\n\nimport (\n\t\"bytes\"\n\t\"os\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// Value is larger than the maximum size allowed\n\tE2BIG unix.Errno = unix.E2BIG\n\n\t// Operation not supported\n\tENOTSUP unix.Errno = unix.ENOTSUP\n\n\t// Value is too small or too large for maximum size allowed\n\tEOVERFLOW unix.Errno = unix.EOVERFLOW\n)\n\n// Lgetxattr retrieves the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\n// Returns a []byte slice if the xattr is set and nil otherwise.\nfunc Lgetxattr(path string, attr string) ([]byte, error) {\n\t// Start with a 128 length byte array\n\tdest := make([]byte, 128)\n\tsz, errno := unix.Lgetxattr(path, attr, dest)\n\n\tfor errno == unix.ERANGE {\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = unix.Lgetxattr(path, attr, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, &os.PathError{Op: \"lgetxattr\", Path: path, Err: errno}\n\t\t}\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = unix.Lgetxattr(path, attr, dest)\n\t}\n\n\tswitch {\n\tcase errno == unix.ENODATA:\n\t\treturn nil, nil\n\tcase errno != nil:\n\t\treturn nil, &os.PathError{Op: \"lgetxattr\", Path: path, Err: errno}\n\t}\n\n\treturn dest[:sz], nil\n}\n\n// Lsetxattr sets the value of the extended attribute identified by attr\n// and associated with the given path in the file system.\nfunc Lsetxattr(path string, attr string, data []byte, flags int) error {\n\tif err := unix.Lsetxattr(path, attr, data, flags); err != nil {\n\t\treturn &os.PathError{Op: \"lsetxattr\", Path: path, Err: err}\n\t}\n\n\treturn nil\n}\n\n// Llistxattr lists extended attributes associated with the given path\n// in the file system.\nfunc Llistxattr(path string) ([]string, error) {\n\tdest := make([]byte, 128)\n\tsz, errno := unix.Llistxattr(path, dest)\n\n\tfor errno == unix.ERANGE {\n\t\t// Buffer too small, use zero-sized buffer to get the actual size\n\t\tsz, errno = unix.Llistxattr(path, []byte{})\n\t\tif errno != nil {\n\t\t\treturn nil, &os.PathError{Op: \"llistxattr\", Path: path, Err: errno}\n\t\t}\n\n\t\tdest = make([]byte, sz)\n\t\tsz, errno = unix.Llistxattr(path, dest)\n\t}\n\tif errno != nil {\n\t\treturn nil, &os.PathError{Op: \"llistxattr\", Path: path, Err: errno}\n\t}\n\n\tvar attrs []string\n\tfor token := range bytes.SplitSeq(dest[:sz], []byte{0}) {\n\t\tif len(token) > 0 {\n\t\t\tattrs = append(attrs, string(token))\n\t\t}\n\t}\n\n\treturn attrs, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/system/xattrs_unsupported.go",
    "content": "//go:build !linux && !darwin && !freebsd\n\npackage system\n\nimport \"syscall\"\n\nconst (\n\t// Value is larger than the maximum size allowed\n\tE2BIG syscall.Errno = syscall.Errno(0)\n\n\t// Operation not supported\n\tENOTSUP syscall.Errno = syscall.Errno(0)\n\n\t// Value is too small or too large for maximum size allowed\n\tEOVERFLOW syscall.Errno = syscall.Errno(0)\n)\n\n// Lgetxattr is not supported on platforms other than linux.\nfunc Lgetxattr(path string, attr string) ([]byte, error) {\n\treturn nil, ErrNotSupportedPlatform\n}\n\n// Lsetxattr is not supported on platforms other than linux.\nfunc Lsetxattr(path string, attr string, data []byte, flags int) error {\n\treturn ErrNotSupportedPlatform\n}\n\n// Llistxattr is not supported on platforms other than linux.\nfunc Llistxattr(path string) ([]string, error) {\n\treturn nil, ErrNotSupportedPlatform\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/tarlog/tarlogger.go",
    "content": "package tarlog\n\nimport (\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/vbatts/tar-split/archive/tar\"\n)\n\ntype tarLogger struct {\n\twriter     *io.PipeWriter\n\tcloseMutex *sync.Mutex\n\tclosed     bool\n}\n\n// NewLogger returns a writer that, when a tar archive is written to it, calls\n// `logger` for each file header it encounters in the archive.\nfunc NewLogger(logger func(*tar.Header)) (io.WriteCloser, error) {\n\treader, writer := io.Pipe()\n\tt := &tarLogger{\n\t\twriter:     writer,\n\t\tcloseMutex: new(sync.Mutex),\n\t\tclosed:     false,\n\t}\n\ttr := tar.NewReader(reader)\n\tt.closeMutex.Lock()\n\tgo func() {\n\t\thdr, err := tr.Next()\n\t\tfor err == nil {\n\t\t\tlogger(hdr)\n\t\t\thdr, err = tr.Next()\n\n\t\t}\n\t\t// Make sure to avoid writes after the reader has been closed.\n\t\tif err := reader.Close(); err != nil {\n\t\t\tlogrus.Errorf(\"Closing tarlogger reader: %v\", err)\n\t\t}\n\t\t// Unblock the Close().\n\t\tt.closeMutex.Unlock()\n\t}()\n\treturn t, nil\n}\n\nfunc (t *tarLogger) Write(b []byte) (int, error) {\n\tif t.closed {\n\t\t// We cannot use os.Pipe() as this alters the tar's digest. Using\n\t\t// io.Pipe() requires this workaround as it does not allow for writes\n\t\t// after close.\n\t\treturn len(b), nil\n\t}\n\tn, err := t.writer.Write(b)\n\tif err == io.ErrClosedPipe {\n\t\t// The pipe got closed.  Track it and avoid to call Write in future.\n\t\tt.closed = true\n\t\treturn len(b), nil\n\t}\n\treturn n, err\n}\n\nfunc (t *tarLogger) Close() error {\n\terr := t.writer.Close()\n\t// Wait for the reader to finish.\n\tt.closeMutex.Lock()\n\treturn err\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/truncindex/truncindex.go",
    "content": "// Package truncindex provides a general 'index tree', used by Docker\n// in order to be able to reference containers by only a few unambiguous\n// characters of their id.\npackage truncindex\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/tchap/go-patricia/v2/patricia\"\n)\n\nvar (\n\t// ErrEmptyPrefix is an error returned if the prefix was empty.\n\tErrEmptyPrefix = errors.New(\"prefix can't be empty\")\n\n\t// ErrIllegalChar is returned when a space is in the ID\n\tErrIllegalChar = errors.New(\"illegal character: ' '\")\n\n\t// ErrNotExist is returned when ID or its prefix not found in index.\n\tErrNotExist = errors.New(\"ID does not exist\")\n)\n\n// ErrAmbiguousPrefix is returned if the prefix was ambiguous\n// (multiple ids for the prefix).\ntype ErrAmbiguousPrefix struct { //nolint: errname\n\tprefix string\n}\n\nfunc (e ErrAmbiguousPrefix) Error() string {\n\treturn fmt.Sprintf(\"Multiple IDs found with provided prefix: %s\", e.prefix)\n}\n\n// TruncIndex allows the retrieval of string identifiers by any of their unique prefixes.\n// This is used to retrieve image and container IDs by more convenient shorthand prefixes.\ntype TruncIndex struct {\n\tsync.RWMutex\n\ttrie *patricia.Trie\n\tids  map[string]struct{}\n}\n\n// NewTruncIndex creates a new TruncIndex and initializes with a list of IDs.\n// Invalid IDs are _silently_ ignored.\nfunc NewTruncIndex(ids []string) *TruncIndex {\n\tidx := &TruncIndex{\n\t\tids: make(map[string]struct{}),\n\n\t\t// Change patricia max prefix per node length,\n\t\t// because our len(ID) always 64\n\t\ttrie: patricia.NewTrie(patricia.MaxPrefixPerNode(64)),\n\t}\n\tfor _, id := range ids {\n\t\t_ = idx.addID(id) // Ignore invalid IDs. Duplicate IDs are not a problem.\n\t}\n\treturn idx\n}\n\nfunc (idx *TruncIndex) addID(id string) error {\n\tif strings.Contains(id, \" \") {\n\t\treturn ErrIllegalChar\n\t}\n\tif id == \"\" {\n\t\treturn ErrEmptyPrefix\n\t}\n\tif _, exists := idx.ids[id]; exists {\n\t\treturn fmt.Errorf(\"id already exists: '%s'\", id)\n\t}\n\tidx.ids[id] = struct{}{}\n\tif inserted := idx.trie.Insert(patricia.Prefix(id), struct{}{}); !inserted {\n\t\treturn fmt.Errorf(\"failed to insert id: %s\", id)\n\t}\n\treturn nil\n}\n\n// Add adds a new ID to the TruncIndex.\nfunc (idx *TruncIndex) Add(id string) error {\n\tidx.Lock()\n\tdefer idx.Unlock()\n\treturn idx.addID(id)\n}\n\n// Delete removes an ID from the TruncIndex. If there are multiple IDs\n// with the given prefix, an error is thrown.\nfunc (idx *TruncIndex) Delete(id string) error {\n\tidx.Lock()\n\tdefer idx.Unlock()\n\tif _, exists := idx.ids[id]; !exists || id == \"\" {\n\t\treturn fmt.Errorf(\"no such id: '%s'\", id)\n\t}\n\tdelete(idx.ids, id)\n\tif deleted := idx.trie.Delete(patricia.Prefix(id)); !deleted {\n\t\treturn fmt.Errorf(\"no such id: '%s'\", id)\n\t}\n\treturn nil\n}\n\n// Get retrieves an ID from the TruncIndex. If there are multiple IDs\n// with the given prefix, an error is thrown.\nfunc (idx *TruncIndex) Get(s string) (string, error) {\n\tif s == \"\" {\n\t\treturn \"\", ErrEmptyPrefix\n\t}\n\tvar id string\n\tsubTreeVisitFunc := func(prefix patricia.Prefix, item patricia.Item) error {\n\t\tif id != \"\" {\n\t\t\t// we haven't found the ID if there are two or more IDs\n\t\t\tid = \"\"\n\t\t\treturn ErrAmbiguousPrefix{prefix: string(prefix)}\n\t\t}\n\t\tid = string(prefix)\n\t\treturn nil\n\t}\n\n\tidx.RLock()\n\tdefer idx.RUnlock()\n\tif err := idx.trie.VisitSubtree(patricia.Prefix(s), subTreeVisitFunc); err != nil {\n\t\treturn \"\", err\n\t}\n\tif id != \"\" {\n\t\treturn id, nil\n\t}\n\treturn \"\", ErrNotExist\n}\n\n// Iterate iterates over all stored IDs and passes each of them to the given\n// handler. Take care that the handler method does not call any public\n// method on truncindex as the internal locking is not reentrant/recursive\n// and will result in deadlock.\nfunc (idx *TruncIndex) Iterate(handler func(id string)) {\n\tidx.Lock()\n\tdefer idx.Unlock()\n\t// Ignore the error from Visit: it can only fail if the provided visitor fails, and ours never does.\n\t_ = idx.trie.Visit(func(prefix patricia.Prefix, item patricia.Item) error {\n\t\thandler(string(prefix))\n\t\treturn nil\n\t})\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/getenv_linux_cgo.go",
    "content": "//go:build linux && cgo\n\npackage unshare\n\nimport (\n\t\"unsafe\"\n)\n\n/*\n#cgo remoteclient CFLAGS: -Wall -Werror\n#include <stdlib.h>\n*/\nimport \"C\"\n\nfunc getenv(name string) string {\n\tcName := C.CString(name)\n\tdefer C.free(unsafe.Pointer(cName))\n\n\tvalue := C.GoString(C.getenv(cName))\n\n\treturn value\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/getenv_linux_nocgo.go",
    "content": "//go:build linux && !cgo\n\npackage unshare\n\nimport (\n\t\"os\"\n)\n\nfunc getenv(name string) string {\n\treturn os.Getenv(name)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare.c",
    "content": "#if !defined(UNSHARE_NO_CODE_AT_ALL) && defined(__linux__)\n\n#define _GNU_SOURCE\n#include <sys/types.h>\n#include <sys/ioctl.h>\n#include <sys/stat.h>\n#include <sys/syscall.h>\n#include <sys/mman.h>\n#include <fcntl.h>\n#include <grp.h>\n#include <sched.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <termios.h>\n#include <errno.h>\n#include <unistd.h>\n#include <libgen.h>\n#include <sys/vfs.h>\n#include <sys/mount.h>\n#include <linux/limits.h>\n\n/* Open Source projects like conda-forge, want to package podman and are based\n   off of centos:6, Conda-force has minimal libc requirements and is lacking\n   the memfd.h file, so we use mmam.h\n*/\n#ifndef MFD_ALLOW_SEALING\n#define MFD_ALLOW_SEALING 2U\n#endif\n#ifndef MFD_CLOEXEC\n#define MFD_CLOEXEC 1U\n#endif\n\n#ifndef F_LINUX_SPECIFIC_BASE\n#define F_LINUX_SPECIFIC_BASE 1024\n#endif\n#ifndef F_ADD_SEALS\n#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)\n#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)\n#endif\n#ifndef F_SEAL_SEAL\n#define F_SEAL_SEAL   0x0001LU\n#endif\n#ifndef F_SEAL_SHRINK\n#define F_SEAL_SHRINK 0x0002LU\n#endif\n#ifndef F_SEAL_GROW\n#define F_SEAL_GROW   0x0004LU\n#endif\n#ifndef F_SEAL_WRITE\n#define F_SEAL_WRITE  0x0008LU\n#endif\n\n#define BUFSTEP 1024\n\nstatic const char *_max_user_namespaces = \"/proc/sys/user/max_user_namespaces\";\nstatic const char *_unprivileged_user_namespaces = \"/proc/sys/kernel/unprivileged_userns_clone\";\n\nstatic int _containers_unshare_parse_envint(const char *envname) {\n\tchar *p, *q;\n\tlong l;\n\n\tp = getenv(envname);\n\tif (p == NULL) {\n\t\treturn -1;\n\t}\n\tq = NULL;\n\tl = strtol(p, &q, 10);\n\tif ((q == NULL) || (*q != '\\0')) {\n\t\tfprintf(stderr, \"Error parsing \\\"%s\\\"=\\\"%s\\\"!\\n\", envname, p);\n\t\t_exit(1);\n\t}\n\tunsetenv(envname);\n\treturn l;\n}\n\nstatic void _check_proc_sys_file(const char *path)\n{\n\tFILE *fp;\n\tchar buf[32];\n\tsize_t n_read;\n\tlong r;\n\n\tfp = fopen(path, \"r\");\n\tif (fp == NULL) {\n\t\tif (errno != ENOENT)\n\t\t\tfprintf(stderr, \"Error reading %s: %m\\n\", _max_user_namespaces);\n\t} else {\n\t\tmemset(buf, 0, sizeof(buf));\n\t\tn_read = fread(buf, 1, sizeof(buf) - 1, fp);\n\t\tif (n_read > 0) {\n\t\t\tr = atoi(buf);\n\t\t\tif (r == 0) {\n\t\t\t\tfprintf(stderr, \"User namespaces are not enabled in %s.\\n\", path);\n\t\t\t}\n\t\t} else {\n\t\t\tfprintf(stderr, \"Error reading %s: no contents, should contain a number greater than 0.\\n\", path);\n\t\t}\n\t\tfclose(fp);\n\t}\n}\n\nstatic char **parse_proc_stringlist(const char *list) {\n\tint fd, n, i, n_strings;\n\tchar *buf, *new_buf, **ret;\n\tsize_t size, new_size, used;\n\n\tfd = open(list, O_RDONLY);\n\tif (fd == -1) {\n\t\treturn NULL;\n\t}\n\tbuf = NULL;\n\tsize = 0;\n\tused = 0;\n\tfor (;;) {\n\t\tnew_size = used + BUFSTEP;\n\t\tnew_buf = realloc(buf, new_size);\n\t\tif (new_buf == NULL) {\n\t\t\tfree(buf);\n\t\t\tfprintf(stderr, \"realloc(%ld): out of memory\\n\", (long)(size + BUFSTEP));\n\t\t\treturn NULL;\n\t\t}\n\t\tbuf = new_buf;\n\t\tsize = new_size;\n\t\tmemset(buf + used, '\\0', size - used);\n\t\tn = read(fd, buf + used, size - used - 1);\n\t\tif (n < 0) {\n\t\t\tfprintf(stderr, \"read(): %m\\n\");\n\t\t\treturn NULL;\n\t\t}\n\t\tif (n == 0) {\n\t\t\tbreak;\n\t\t}\n\t\tused += n;\n\t}\n\tclose(fd);\n\tn_strings = 0;\n\tfor (n = 0; n < used; n++) {\n\t\tif ((n == 0) || (buf[n-1] == '\\0')) {\n\t\t\tn_strings++;\n\t\t}\n\t}\n\tret = calloc(n_strings + 1, sizeof(char *));\n\tif (ret == NULL) {\n\t\tfprintf(stderr, \"calloc(): out of memory\\n\");\n\t\treturn NULL;\n\t}\n\ti = 0;\n\tfor (n = 0; n < used; n++) {\n\t\tif ((n == 0) || (buf[n-1] == '\\0')) {\n\t\t\tret[i++] = &buf[n];\n\t\t}\n\t}\n\tret[i] = NULL;\n\treturn ret;\n}\n\n/*\n * Taken from the runc cloned_binary.c file\n * Copyright (C) 2019 Aleksa Sarai <cyphar@cyphar.com>\n * Copyright (C) 2019 SUSE LLC\n *\n * This work is dual licensed under the following licenses. You may use,\n * redistribute, and/or modify the work under the conditions of either (or\n * both) licenses.\n *\n * === Apache-2.0 ===\n */\nstatic int try_bindfd(void)\n{\n\tint fd, ret = -1;\n\tchar src[PATH_MAX] = {0};\n\tchar template[64] = {0};\n\n\tstrncpy(template, \"/tmp/containers.XXXXXX\", sizeof(template) - 1);\n\n\t/*\n\t * We need somewhere to mount it, mounting anything over /proc/self is a\n\t * BAD idea on the host -- even if we do it temporarily.\n\t */\n\tfd = mkstemp(template);\n\tif (fd < 0)\n\t\treturn ret;\n\tclose(fd);\n\n\tret = -EPERM;\n\n\tif (readlink(\"/proc/self/exe\", src, sizeof (src) - 1) < 0)\n\t\tgoto out;\n\n\tif (mount(src, template, NULL, MS_BIND, NULL) < 0)\n\t\tgoto out;\n\tif (mount(NULL, template, NULL, MS_REMOUNT | MS_BIND | MS_RDONLY, NULL) < 0)\n\t\tgoto out_umount;\n\n\t/* Get read-only handle that we're sure can't be made read-write. */\n\tret = open(template, O_PATH | O_CLOEXEC);\n\nout_umount:\n\t/*\n\t * Make sure the MNT_DETACH works, otherwise we could get remounted\n\t * read-write and that would be quite bad (the fd would be made read-write\n\t * too, invalidating the protection).\n\t */\n\tif (umount2(template, MNT_DETACH) < 0) {\n\t\tif (ret >= 0)\n\t\t\tclose(ret);\n\t\tret = -ENOTRECOVERABLE;\n\t}\n\nout:\n\t/*\n\t * We don't care about unlink errors, the worst that happens is that\n\t * there's an empty file left around in STATEDIR.\n\t */\n\tunlink(template);\n\treturn ret;\n}\n\nstatic int copy_self_proc_exe(char **argv) {\n\tchar *exename;\n\tint fd, mmfd, n_read, n_written;\n\tstruct stat st;\n\tchar buf[2048];\n\n\tfd = open(\"/proc/self/exe\", O_RDONLY | O_CLOEXEC);\n\tif (fd == -1) {\n\t\tfprintf(stderr, \"open(\\\"/proc/self/exe\\\"): %m\\n\");\n\t\treturn -1;\n\t}\n\tif (fstat(fd, &st) == -1) {\n\t\tfprintf(stderr, \"fstat(\\\"/proc/self/exe\\\"): %m\\n\");\n\t\tclose(fd);\n\t\treturn -1;\n\t}\n\texename = basename(argv[0]);\n\tmmfd = syscall(SYS_memfd_create, exename, (long) MFD_ALLOW_SEALING | MFD_CLOEXEC);\n\tif (mmfd == -1) {\n\t\tfprintf(stderr, \"memfd_create(): %m\\n\");\n\t\tgoto close_fd;\n\t}\n\tfor (;;) {\n\t\tn_read = read(fd, buf, sizeof(buf));\n\t\tif (n_read < 0) {\n\t\t\tfprintf(stderr, \"read(\\\"/proc/self/exe\\\"): %m\\n\");\n\t\t\treturn -1;\n\t\t}\n\t\tif (n_read == 0) {\n\t\t\tbreak;\n\t\t}\n\t\tn_written = write(mmfd, buf, n_read);\n\t\tif (n_written < 0) {\n\t\t\tfprintf(stderr, \"write(anonfd): %m\\n\");\n\t\t\tgoto close_fd;\n\t\t}\n\t\tif (n_written != n_read) {\n\t\t\tfprintf(stderr, \"write(anonfd): short write (%d != %d)\\n\", n_written, n_read);\n\t\t\tgoto close_fd;\n\t\t}\n\t}\n\tclose(fd);\n\tif (fcntl(mmfd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE | F_SEAL_SEAL) == -1) {\n\t\tfprintf(stderr, \"Close_Fd sealing memfd copy: %m\\n\");\n\t\tgoto close_mmfd;\n\t}\n\n\treturn mmfd;\n\nclose_fd:\n\tclose(fd);\nclose_mmfd:\n\tclose(mmfd);\n\treturn -1;\n}\nstatic int containers_reexec(int flags) {\n\tchar **argv;\n\tint fd = -1;\n\n\targv = parse_proc_stringlist(\"/proc/self/cmdline\");\n\tif (argv == NULL) {\n\t\treturn -1;\n\t}\n\n\tif (flags & CLONE_NEWNS)\n\t\tfd = try_bindfd();\n\tif (fd < 0)\n\t\tfd = copy_self_proc_exe(argv);\n\tif (fd < 0)\n\t\treturn fd;\n\n\tif (fexecve(fd, argv, environ) == -1) {\n\t\tclose(fd);\n\t\tfprintf(stderr, \"Error during reexec(...): %m\\n\");\n\t\treturn -1;\n\t}\n\tclose(fd);\n\treturn 0;\n}\n\nvoid _containers_unshare(void)\n{\n\tint flags, pidfd, continuefd, n, pgrp, sid, ctty;\n\tchar buf[2048];\n\n\tflags = _containers_unshare_parse_envint(\"_Containers-unshare\");\n\tif (flags == -1) {\n\t\treturn;\n\t}\n\tif ((flags & CLONE_NEWUSER) != 0) {\n\t\tif (unshare(CLONE_NEWUSER) == -1) {\n\t\t\tfprintf(stderr, \"Error during unshare(CLONE_NEWUSER): %m\\n\");\n                        _check_proc_sys_file (_max_user_namespaces);\n                        _check_proc_sys_file (_unprivileged_user_namespaces);\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tpidfd = _containers_unshare_parse_envint(\"_Containers-pid-pipe\");\n\tif (pidfd != -1) {\n\t\tsnprintf(buf, sizeof(buf), \"%llu\", (unsigned long long) getpid());\n\t\tsize_t size = write(pidfd, buf, strlen(buf));\n\t\tif (size != strlen(buf)) {\n\t\t\tfprintf(stderr, \"Error writing PID to pipe on fd %d: %m\\n\", pidfd);\n\t\t\t_exit(1);\n\t\t}\n\t\tclose(pidfd);\n\t}\n\tcontinuefd = _containers_unshare_parse_envint(\"_Containers-continue-pipe\");\n\tif (continuefd != -1) {\n\t\tn = read(continuefd, buf, sizeof(buf));\n\t\tif (n > 0) {\n\t\t\tfprintf(stderr, \"Error: %.*s\\n\", n, buf);\n\t\t\t_exit(1);\n\t\t}\n\t\tclose(continuefd);\n\t}\n\tsid = _containers_unshare_parse_envint(\"_Containers-setsid\");\n\tif (sid == 1) {\n\t\tif (setsid() == -1) {\n\t\t\tfprintf(stderr, \"Error during setsid: %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tpgrp = _containers_unshare_parse_envint(\"_Containers-setpgrp\");\n\tif (pgrp == 1) {\n\t\tif (setpgrp() == -1) {\n\t\t\tfprintf(stderr, \"Error during setpgrp: %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tctty = _containers_unshare_parse_envint(\"_Containers-ctty\");\n\tif (ctty != -1) {\n\t\tif (ioctl(ctty, TIOCSCTTY, 0) == -1) {\n\t\t\tfprintf(stderr, \"Error while setting controlling terminal to %d: %m\\n\", ctty);\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tif ((flags & CLONE_NEWUSER) != 0) {\n\t\tif (setresgid(0, 0, 0) != 0) {\n\t\t\tfprintf(stderr, \"Error during setresgid(0): %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t\tif (setresuid(0, 0, 0) != 0) {\n\t\t\tfprintf(stderr, \"Error during setresuid(0): %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tif ((flags & ~CLONE_NEWUSER) != 0) {\n\t\tif (unshare(flags & ~CLONE_NEWUSER) == -1) {\n\t\t\tfprintf(stderr, \"Error during unshare(...): %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tif (containers_reexec(flags) != 0) {\n\t\t_exit(1);\n\t}\n\treturn;\n}\n\n#endif // !UNSHARE_NO_CODE_AT_ALL\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare.go",
    "content": "package unshare\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/user\"\n\t\"sync\"\n)\n\nvar (\n\thomeDirOnce sync.Once\n\thomeDirErr  error\n\thomeDir     string\n)\n\n// HomeDir returns the home directory for the current user.\nfunc HomeDir() (string, error) {\n\thomeDirOnce.Do(func() {\n\t\thome := os.Getenv(\"HOME\")\n\t\tif home == \"\" {\n\t\t\tusr, err := user.LookupId(fmt.Sprintf(\"%d\", GetRootlessUID()))\n\t\t\tif err != nil {\n\t\t\t\thomeDir, homeDirErr = \"\", fmt.Errorf(\"unable to resolve HOME directory: %w\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\thomeDir, homeDirErr = usr.HomeDir, nil\n\t\t\treturn\n\t\t}\n\t\thomeDir, homeDirErr = home, nil\n\t})\n\treturn homeDir, homeDirErr\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_cgo.go",
    "content": "//go:build (linux && cgo && !gccgo) || (freebsd && cgo)\n\npackage unshare\n\n// #cgo CFLAGS: -Wall\n// extern void _containers_unshare(void);\n// static void __attribute__((constructor)) init(void) {\n//   _containers_unshare();\n// }\nimport \"C\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_darwin.go",
    "content": "//go:build darwin\n\npackage unshare\n\nimport (\n\t\"os\"\n\n\t\"github.com/opencontainers/runtime-spec/specs-go\"\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\nconst (\n\t// UsernsEnvName is the environment variable, if set indicates in rootless mode\n\tUsernsEnvName = \"_CONTAINERS_USERNS_CONFIGURED\"\n)\n\n// IsRootless tells us if we are running in rootless mode\nfunc IsRootless() bool {\n\treturn true\n}\n\n// GetRootlessUID returns the UID of the user in the parent userNS\nfunc GetRootlessUID() int {\n\treturn os.Getuid()\n}\n\n// GetRootlessGID returns the GID of the user in the parent userNS\nfunc GetRootlessGID() int {\n\treturn os.Getgid()\n}\n\n// RootlessEnv returns the environment settings for the rootless containers\nfunc RootlessEnv() []string {\n\treturn append(os.Environ(), UsernsEnvName+\"=\")\n}\n\n// MaybeReexecUsingUserNamespace re-exec the process in a new namespace\nfunc MaybeReexecUsingUserNamespace(evenForRoot bool) {\n}\n\n// GetHostIDMappings reads mappings for the specified process (or the current\n// process if pid is \"self\" or an empty string) from the kernel.\nfunc GetHostIDMappings(pid string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error) {\n\treturn nil, nil, nil\n}\n\n// ParseIDMappings parses mapping triples.\nfunc ParseIDMappings(uidmap, gidmap []string) ([]idtools.IDMap, []idtools.IDMap, error) {\n\tuid, err := idtools.ParseIDMap(uidmap, \"userns-uid-map\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tgid, err := idtools.ParseIDMap(gidmap, \"userns-gid-map\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn uid, gid, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_freebsd.c",
    "content": "#if !defined(UNSHARE_NO_CODE_AT_ALL) && defined(__FreeBSD__)\n\n\n#include <sys/types.h>\n#include <sys/ioctl.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <unistd.h>\n\nstatic int _containers_unshare_parse_envint(const char *envname) {\n\tchar *p, *q;\n\tlong l;\n\n\tp = getenv(envname);\n\tif (p == NULL) {\n\t\treturn -1;\n\t}\n\tq = NULL;\n\tl = strtol(p, &q, 10);\n\tif ((q == NULL) || (*q != '\\0')) {\n\t\tfprintf(stderr, \"Error parsing \\\"%s\\\"=\\\"%s\\\"!\\n\", envname, p);\n\t\t_exit(1);\n\t}\n\tunsetenv(envname);\n\treturn l;\n}\n\nvoid _containers_unshare(void)\n{\n\tint pidfd, continuefd, n, pgrp, sid, ctty;\n\tchar buf[2048];\n\n\tpidfd = _containers_unshare_parse_envint(\"_Containers-pid-pipe\");\n\tif (pidfd != -1) {\n\t\tsnprintf(buf, sizeof(buf), \"%llu\", (unsigned long long) getpid());\n\t\tsize_t size = write(pidfd, buf, strlen(buf));\n\t\tif (size != strlen(buf)) {\n\t\t\tfprintf(stderr, \"Error writing PID to pipe on fd %d: %m\\n\", pidfd);\n\t\t\t_exit(1);\n\t\t}\n\t\tclose(pidfd);\n\t}\n\tcontinuefd = _containers_unshare_parse_envint(\"_Containers-continue-pipe\");\n\tif (continuefd != -1) {\n\t\tn = read(continuefd, buf, sizeof(buf));\n\t\tif (n > 0) {\n\t\t\tfprintf(stderr, \"Error: %.*s\\n\", n, buf);\n\t\t\t_exit(1);\n\t\t}\n\t\tclose(continuefd);\n\t}\n\tsid = _containers_unshare_parse_envint(\"_Containers-setsid\");\n\tif (sid == 1) {\n\t\tif (setsid() == -1) {\n\t\t\tfprintf(stderr, \"Error during setsid: %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tpgrp = _containers_unshare_parse_envint(\"_Containers-setpgrp\");\n\tif (pgrp == 1) {\n                if (setpgrp(0, 0) == -1) {\n\t\t\tfprintf(stderr, \"Error during setpgrp: %m\\n\");\n\t\t\t_exit(1);\n\t\t}\n\t}\n\tctty = _containers_unshare_parse_envint(\"_Containers-ctty\");\n\tif (ctty != -1) {\n\t\tif (ioctl(ctty, TIOCSCTTY, 0) == -1) {\n\t\t\tfprintf(stderr, \"Error while setting controlling terminal to %d: %m\\n\", ctty);\n\t\t\t_exit(1);\n\t\t}\n\t}\n}\n\n#endif\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_freebsd.go",
    "content": "//go:build freebsd\n\npackage unshare\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"syscall\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\n// Cmd wraps an exec.Cmd created by the reexec package in unshare(),\n// and one day might handle setting ID maps and other related setting*s\n// by triggering initialization code in the child.\ntype Cmd struct {\n\t*exec.Cmd\n\tSetsid  bool\n\tSetpgrp bool\n\tCtty    *os.File\n\tHook    func(pid int) error\n}\n\n// Command creates a new Cmd which can be customized.\nfunc Command(args ...string) *Cmd {\n\tcmd := reexec.Command(args...)\n\treturn &Cmd{\n\t\tCmd: cmd,\n\t}\n}\n\nfunc (c *Cmd) Start() error {\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\n\t// Set environment variables to tell the child to synchronize its startup.\n\tif c.Env == nil {\n\t\tc.Env = os.Environ()\n\t}\n\n\t// Create the pipe for reading the child's PID.\n\tpidRead, pidWrite, err := os.Pipe()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"creating pid pipe: %w\", err)\n\t}\n\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-pid-pipe=%d\", len(c.ExtraFiles)+3))\n\tc.ExtraFiles = append(c.ExtraFiles, pidWrite)\n\n\t// Create the pipe for letting the child know to proceed.\n\tcontinueRead, continueWrite, err := os.Pipe()\n\tif err != nil {\n\t\tpidRead.Close()\n\t\tpidWrite.Close()\n\t\treturn fmt.Errorf(\"creating continue read/write pipe: %w\", err)\n\t}\n\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-continue-pipe=%d\", len(c.ExtraFiles)+3))\n\tc.ExtraFiles = append(c.ExtraFiles, continueRead)\n\n\t// Pass along other instructions.\n\tif c.Setsid {\n\t\tc.Env = append(c.Env, \"_Containers-setsid=1\")\n\t}\n\tif c.Setpgrp {\n\t\tc.Env = append(c.Env, \"_Containers-setpgrp=1\")\n\t}\n\tif c.Ctty != nil {\n\t\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-ctty=%d\", len(c.ExtraFiles)+3))\n\t\tc.ExtraFiles = append(c.ExtraFiles, c.Ctty)\n\t}\n\n\t// Make sure we clean up our pipes.\n\tdefer func() {\n\t\tif pidRead != nil {\n\t\t\tpidRead.Close()\n\t\t}\n\t\tif pidWrite != nil {\n\t\t\tpidWrite.Close()\n\t\t}\n\t\tif continueRead != nil {\n\t\t\tcontinueRead.Close()\n\t\t}\n\t\tif continueWrite != nil {\n\t\t\tcontinueWrite.Close()\n\t\t}\n\t}()\n\n\t// Start the new process.\n\terr = c.Cmd.Start()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Close the ends of the pipes that the parent doesn't need.\n\tcontinueRead.Close()\n\tcontinueRead = nil\n\tpidWrite.Close()\n\tpidWrite = nil\n\n\t// Read the child's PID from the pipe.\n\tpidString := \"\"\n\tb := new(bytes.Buffer)\n\tif _, err := io.Copy(b, pidRead); err != nil {\n\t\treturn fmt.Errorf(\"reading child PID: %w\", err)\n\t}\n\tpidString = b.String()\n\tpid, err := strconv.Atoi(pidString)\n\tif err != nil {\n\t\tfmt.Fprintf(continueWrite, \"error parsing PID %q: %v\", pidString, err)\n\t\treturn fmt.Errorf(\"parsing PID %q: %w\", pidString, err)\n\t}\n\n\t// Run any additional setup that we want to do before the child starts running proper.\n\tif c.Hook != nil {\n\t\tif err = c.Hook(pid); err != nil {\n\t\t\tfmt.Fprintf(continueWrite, \"hook error: %v\", err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *Cmd) Run() error {\n\tif err := c.Start(); err != nil {\n\t\treturn err\n\t}\n\treturn c.Wait()\n}\n\nfunc (c *Cmd) CombinedOutput() ([]byte, error) {\n\treturn nil, errors.New(\"unshare: CombinedOutput() not implemented\")\n}\n\nfunc (c *Cmd) Output() ([]byte, error) {\n\treturn nil, errors.New(\"unshare: Output() not implemented\")\n}\n\ntype Runnable interface {\n\tRun() error\n}\n\n// ExecRunnable runs the specified unshare command, captures its exit status,\n// and exits with the same status.\nfunc ExecRunnable(cmd Runnable, cleanup func()) {\n\texit := func(status int) {\n\t\tif cleanup != nil {\n\t\t\tcleanup()\n\t\t}\n\t\tos.Exit(status)\n\t}\n\tif err := cmd.Run(); err != nil {\n\t\tif exitError, ok := err.(*exec.ExitError); ok {\n\t\t\tif exitError.ProcessState.Exited() {\n\t\t\t\tif waitStatus, ok := exitError.ProcessState.Sys().(syscall.WaitStatus); ok {\n\t\t\t\t\tif waitStatus.Exited() {\n\t\t\t\t\t\tlogrus.Debugf(\"%v\", exitError)\n\t\t\t\t\t\texit(waitStatus.ExitStatus())\n\t\t\t\t\t}\n\t\t\t\t\tif waitStatus.Signaled() {\n\t\t\t\t\t\tlogrus.Debugf(\"%v\", exitError)\n\t\t\t\t\t\texit(int(waitStatus.Signal()) + 128)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogrus.Errorf(\"%v\", err)\n\t\tlogrus.Errorf(\"(Unable to determine exit status)\")\n\t\texit(1)\n\t}\n\texit(0)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_gccgo.go",
    "content": "//go:build linux && cgo && gccgo\n\npackage unshare\n\n// #cgo CFLAGS: -Wall -Wextra\n// extern void _containers_unshare(void);\n// static void __attribute__((constructor)) init(void) {\n//   _containers_unshare();\n// }\nimport \"C\"\n\n// This next bit is straight out of libcontainer.\n\n// AlwaysFalse is here to stay false\n// (and be exported so the compiler doesn't optimize out its reference)\nvar AlwaysFalse bool\n\nfunc init() {\n\tif AlwaysFalse {\n\t\t// by referencing this C init() in a noop test, it will ensure the compiler\n\t\t// links in the C function.\n\t\t// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134\n\t\tC.init()\n\t}\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_linux.go",
    "content": "//go:build linux\n\npackage unshare\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"os/user\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/moby/sys/capability\"\n\t\"github.com/opencontainers/runtime-spec/specs-go\"\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/reexec\"\n)\n\n// Cmd wraps an exec.Cmd created by the reexec package in unshare(), and\n// handles setting ID maps and other related settings by triggering\n// initialization code in the child.\ntype Cmd struct {\n\t*exec.Cmd\n\tUnshareFlags               int\n\tUseNewuidmap               bool\n\tUidMappings                []specs.LinuxIDMapping //nolint: revive\n\tUseNewgidmap               bool\n\tGidMappings                []specs.LinuxIDMapping //nolint: revive\n\tGidMappingsEnableSetgroups bool\n\tSetsid                     bool\n\tSetpgrp                    bool\n\tCtty                       *os.File\n\tOOMScoreAdj                *int\n\tHook                       func(pid int) error\n}\n\n// Command creates a new Cmd which can be customized.\nfunc Command(args ...string) *Cmd {\n\tcmd := reexec.Command(args...)\n\treturn &Cmd{\n\t\tCmd: cmd,\n\t}\n}\n\nfunc getRootlessUID() int {\n\tuidEnv := getenv(\"_CONTAINERS_ROOTLESS_UID\")\n\tif uidEnv != \"\" {\n\t\tu, _ := strconv.Atoi(uidEnv)\n\t\treturn u\n\t}\n\treturn os.Geteuid()\n}\n\nfunc getRootlessGID() int {\n\tgidEnv := getenv(\"_CONTAINERS_ROOTLESS_GID\")\n\tif gidEnv != \"\" {\n\t\tu, _ := strconv.Atoi(gidEnv)\n\t\treturn u\n\t}\n\n\t/* If the _CONTAINERS_ROOTLESS_UID is set, assume the gid==uid.  */\n\tuidEnv := os.Getenv(\"_CONTAINERS_ROOTLESS_UID\")\n\tif uidEnv != \"\" {\n\t\tu, _ := strconv.Atoi(uidEnv)\n\t\treturn u\n\t}\n\treturn os.Getegid()\n}\n\n// IsSetID checks if specified path has correct FileMode (Setuid|SETGID) or the\n// matching file capability\nfunc IsSetID(path string, modeid os.FileMode, capid capability.Cap) (bool, error) {\n\tinfo, err := os.Stat(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tmode := info.Mode()\n\tif mode&modeid == modeid {\n\t\treturn true, nil\n\t}\n\tcap, err := capability.NewFile2(path)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tif err := cap.Load(); err != nil {\n\t\treturn false, err\n\t}\n\treturn cap.Get(capability.EFFECTIVE, capid), nil\n}\n\nfunc (c *Cmd) Start() (retErr error) {\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\n\t// Set an environment variable to tell the child to synchronize its startup.\n\tif c.Env == nil {\n\t\tc.Env = os.Environ()\n\t}\n\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-unshare=%d\", c.UnshareFlags))\n\n\t// Please the libpod \"rootless\" package to find the expected env variables.\n\tif IsRootless() {\n\t\tc.Env = append(c.Env, \"_CONTAINERS_USERNS_CONFIGURED=done\")\n\t\tc.Env = append(c.Env, fmt.Sprintf(\"_CONTAINERS_ROOTLESS_UID=%d\", getRootlessUID()))\n\t\tc.Env = append(c.Env, fmt.Sprintf(\"_CONTAINERS_ROOTLESS_GID=%d\", getRootlessGID()))\n\t}\n\n\t// Create the pipe for reading the child's PID.\n\tpidRead, pidWrite, err := os.Pipe()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"creating pid pipe: %w\", err)\n\t}\n\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-pid-pipe=%d\", len(c.ExtraFiles)+3))\n\tc.ExtraFiles = append(c.ExtraFiles, pidWrite)\n\n\t// Create the pipe for letting the child know to proceed.\n\tcontinueRead, continueWrite, err := os.Pipe()\n\tif err != nil {\n\t\tpidRead.Close()\n\t\tpidWrite.Close()\n\t\treturn fmt.Errorf(\"creating continue read/write pipe: %w\", err)\n\t}\n\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-continue-pipe=%d\", len(c.ExtraFiles)+3))\n\tc.ExtraFiles = append(c.ExtraFiles, continueRead)\n\n\t// Pass along other instructions.\n\tif c.Setsid {\n\t\tc.Env = append(c.Env, \"_Containers-setsid=1\")\n\t}\n\tif c.Setpgrp {\n\t\tc.Env = append(c.Env, \"_Containers-setpgrp=1\")\n\t}\n\tif c.Ctty != nil {\n\t\tc.Env = append(c.Env, fmt.Sprintf(\"_Containers-ctty=%d\", len(c.ExtraFiles)+3))\n\t\tc.ExtraFiles = append(c.ExtraFiles, c.Ctty)\n\t}\n\n\t// Make sure we clean up our pipes.\n\tdefer func() {\n\t\tif pidRead != nil {\n\t\t\tpidRead.Close()\n\t\t}\n\t\tif pidWrite != nil {\n\t\t\tpidWrite.Close()\n\t\t}\n\t\tif continueRead != nil {\n\t\t\tcontinueRead.Close()\n\t\t}\n\t\tif continueWrite != nil {\n\t\t\tcontinueWrite.Close()\n\t\t}\n\t}()\n\n\t// Start the new process.\n\terr = c.Cmd.Start()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If the function fails from here, we need to make sure the\n\t// child process is killed and properly cleaned up.\n\tdefer func() {\n\t\tif retErr != nil {\n\t\t\t_ = c.Cmd.Process.Kill()\n\t\t\t_ = c.Cmd.Wait()\n\t\t}\n\t}()\n\n\t// Close the ends of the pipes that the parent doesn't need.\n\tcontinueRead.Close()\n\tcontinueRead = nil\n\tpidWrite.Close()\n\tpidWrite = nil\n\n\t// Read the child's PID from the pipe.\n\tb := new(bytes.Buffer)\n\tif _, err := io.Copy(b, pidRead); err != nil {\n\t\treturn fmt.Errorf(\"reading child PID: %w\", err)\n\t}\n\tpidString := b.String()\n\tpid, err := strconv.Atoi(pidString)\n\tif err != nil {\n\t\tfmt.Fprintf(continueWrite, \"error parsing PID %q: %v\", pidString, err)\n\t\treturn fmt.Errorf(\"parsing PID %q: %w\", pidString, err)\n\t}\n\tpidString = fmt.Sprintf(\"%d\", pid)\n\n\t// If we created a new user namespace, set any specified mappings.\n\tif c.UnshareFlags&syscall.CLONE_NEWUSER != 0 {\n\t\t// Always set \"setgroups\".\n\t\tsetgroups, err := os.OpenFile(fmt.Sprintf(\"/proc/%s/setgroups\", pidString), os.O_TRUNC|os.O_WRONLY, 0)\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(continueWrite, \"error opening setgroups: %v\", err)\n\t\t\treturn fmt.Errorf(\"opening /proc/%s/setgroups: %w\", pidString, err)\n\t\t}\n\t\tdefer setgroups.Close()\n\t\tif c.GidMappingsEnableSetgroups {\n\t\t\tif _, err := fmt.Fprintf(setgroups, \"allow\"); err != nil {\n\t\t\t\tfmt.Fprintf(continueWrite, \"error writing \\\"allow\\\" to setgroups: %v\", err)\n\t\t\t\treturn fmt.Errorf(\"opening \\\"allow\\\" to /proc/%s/setgroups: %w\", pidString, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif _, err := fmt.Fprintf(setgroups, \"deny\"); err != nil {\n\t\t\t\tfmt.Fprintf(continueWrite, \"error writing \\\"deny\\\" to setgroups: %v\", err)\n\t\t\t\treturn fmt.Errorf(\"writing \\\"deny\\\" to /proc/%s/setgroups: %w\", pidString, err)\n\t\t\t}\n\t\t}\n\n\t\tif len(c.UidMappings) == 0 || len(c.GidMappings) == 0 {\n\t\t\tuidmap, gidmap, err := GetHostIDMappings(\"\")\n\t\t\tif err != nil {\n\t\t\t\tfmt.Fprintf(continueWrite, \"error reading ID mappings in parent: %v\", err)\n\t\t\t\treturn fmt.Errorf(\"reading ID mappings in parent: %w\", err)\n\t\t\t}\n\t\t\tif len(c.UidMappings) == 0 {\n\t\t\t\tc.UidMappings = uidmap\n\t\t\t\tfor i := range c.UidMappings {\n\t\t\t\t\tc.UidMappings[i].HostID = c.UidMappings[i].ContainerID\n\t\t\t\t}\n\t\t\t}\n\t\t\tif len(c.GidMappings) == 0 {\n\t\t\t\tc.GidMappings = gidmap\n\t\t\t\tfor i := range c.GidMappings {\n\t\t\t\t\tc.GidMappings[i].HostID = c.GidMappings[i].ContainerID\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif len(c.GidMappings) > 0 {\n\t\t\t// Build the GID map, since writing to the proc file has to be done all at once.\n\t\t\tg := new(bytes.Buffer)\n\t\t\tfor _, m := range c.GidMappings {\n\t\t\t\tfmt.Fprintf(g, \"%d %d %d\\n\", m.ContainerID, m.HostID, m.Size)\n\t\t\t}\n\t\t\tgidmapSet := false\n\t\t\t// Set the GID map.\n\t\t\tif c.UseNewgidmap {\n\t\t\t\tpath, err := exec.LookPath(\"newgidmap\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"finding newgidmap: %w\", err)\n\t\t\t\t}\n\t\t\t\tcmd := exec.Command(path, append([]string{pidString}, strings.Fields(g.String())...)...)\n\t\t\t\tg.Reset()\n\t\t\t\tcmd.Stdout = g\n\t\t\t\tcmd.Stderr = g\n\t\t\t\tif err := cmd.Run(); err == nil {\n\t\t\t\t\tgidmapSet = true\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Warnf(\"running newgidmap: %v: %s\", err, g.String())\n\t\t\t\t\tisSetgid, err := IsSetID(path, os.ModeSetgid, capability.CAP_SETGID)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tlogrus.Warnf(\"Failed to check for setgid on %s: %v\", path, err)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif !isSetgid {\n\t\t\t\t\t\t\tlogrus.Warnf(\"%s should be setgid or have filecaps setgid\", path)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlogrus.Warnf(\"Falling back to single mapping\")\n\t\t\t\t\tg.Reset()\n\t\t\t\t\tfmt.Fprintf(g, \"0 %d 1\\n\", os.Getegid())\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !gidmapSet {\n\t\t\t\tif c.UseNewgidmap {\n\t\t\t\t\tsetgroups, err := os.OpenFile(fmt.Sprintf(\"/proc/%s/setgroups\", pidString), os.O_TRUNC|os.O_WRONLY, 0)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tfmt.Fprintf(continueWrite, \"error opening /proc/%s/setgroups: %v\", pidString, err)\n\t\t\t\t\t\treturn fmt.Errorf(\"opening /proc/%s/setgroups: %w\", pidString, err)\n\t\t\t\t\t}\n\t\t\t\t\tdefer setgroups.Close()\n\t\t\t\t\tif _, err := fmt.Fprintf(setgroups, \"deny\"); err != nil {\n\t\t\t\t\t\tfmt.Fprintf(continueWrite, \"error writing 'deny' to /proc/%s/setgroups: %v\", pidString, err)\n\t\t\t\t\t\treturn fmt.Errorf(\"writing 'deny' to /proc/%s/setgroups: %w\", pidString, err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgidmap, err := os.OpenFile(fmt.Sprintf(\"/proc/%s/gid_map\", pidString), os.O_TRUNC|os.O_WRONLY, 0)\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Fprintf(continueWrite, \"opening /proc/%s/gid_map: %v\", pidString, err)\n\t\t\t\t\treturn fmt.Errorf(\"opening /proc/%s/gid_map: %w\", pidString, err)\n\t\t\t\t}\n\t\t\t\tdefer gidmap.Close()\n\t\t\t\tif _, err := fmt.Fprintf(gidmap, \"%s\", g.String()); err != nil {\n\t\t\t\t\tfmt.Fprintf(continueWrite, \"writing %q to /proc/%s/gid_map: %v\", g.String(), pidString, err)\n\t\t\t\t\treturn fmt.Errorf(\"writing %q to /proc/%s/gid_map: %w\", g.String(), pidString, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif len(c.UidMappings) > 0 {\n\t\t\t// Build the UID map, since writing to the proc file has to be done all at once.\n\t\t\tu := new(bytes.Buffer)\n\t\t\tfor _, m := range c.UidMappings {\n\t\t\t\tfmt.Fprintf(u, \"%d %d %d\\n\", m.ContainerID, m.HostID, m.Size)\n\t\t\t}\n\t\t\tuidmapSet := false\n\t\t\t// Set the UID map.\n\t\t\tif c.UseNewuidmap {\n\t\t\t\tpath, err := exec.LookPath(\"newuidmap\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"finding newuidmap: %w\", err)\n\t\t\t\t}\n\t\t\t\tcmd := exec.Command(path, append([]string{pidString}, strings.Fields(u.String())...)...)\n\t\t\t\tu.Reset()\n\t\t\t\tcmd.Stdout = u\n\t\t\t\tcmd.Stderr = u\n\t\t\t\tif err := cmd.Run(); err == nil {\n\t\t\t\t\tuidmapSet = true\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Warnf(\"Error running newuidmap: %v: %s\", err, u.String())\n\t\t\t\t\tisSetuid, err := IsSetID(path, os.ModeSetuid, capability.CAP_SETUID)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tlogrus.Warnf(\"Failed to check for setuid on %s: %v\", path, err)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif !isSetuid {\n\t\t\t\t\t\t\tlogrus.Warnf(\"%s should be setuid or have filecaps setuid\", path)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlogrus.Warnf(\"Falling back to single mapping\")\n\t\t\t\t\tu.Reset()\n\t\t\t\t\tfmt.Fprintf(u, \"0 %d 1\\n\", os.Geteuid())\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !uidmapSet {\n\t\t\t\tuidmap, err := os.OpenFile(fmt.Sprintf(\"/proc/%s/uid_map\", pidString), os.O_TRUNC|os.O_WRONLY, 0)\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Fprintf(continueWrite, \"error opening /proc/%s/uid_map: %v\", pidString, err)\n\t\t\t\t\treturn fmt.Errorf(\"opening /proc/%s/uid_map: %w\", pidString, err)\n\t\t\t\t}\n\t\t\t\tdefer uidmap.Close()\n\t\t\t\tif _, err := fmt.Fprintf(uidmap, \"%s\", u.String()); err != nil {\n\t\t\t\t\tfmt.Fprintf(continueWrite, \"error writing %q to /proc/%s/uid_map: %v\", u.String(), pidString, err)\n\t\t\t\t\treturn fmt.Errorf(\"writing %q to /proc/%s/uid_map: %w\", u.String(), pidString, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif c.OOMScoreAdj != nil {\n\t\toomScoreAdj, err := os.OpenFile(fmt.Sprintf(\"/proc/%s/oom_score_adj\", pidString), os.O_TRUNC|os.O_WRONLY, 0)\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(continueWrite, \"error opening oom_score_adj: %v\", err)\n\t\t\treturn fmt.Errorf(\"opening /proc/%s/oom_score_adj: %w\", pidString, err)\n\t\t}\n\t\tdefer oomScoreAdj.Close()\n\t\tif _, err := fmt.Fprintf(oomScoreAdj, \"%d\\n\", *c.OOMScoreAdj); err != nil {\n\t\t\tfmt.Fprintf(continueWrite, \"error writing \\\"%d\\\" to oom_score_adj: %v\", c.OOMScoreAdj, err)\n\t\t\treturn fmt.Errorf(\"writing \\\"%d\\\" to /proc/%s/oom_score_adj: %w\", c.OOMScoreAdj, pidString, err)\n\t\t}\n\t}\n\t// Run any additional setup that we want to do before the child starts running proper.\n\tif c.Hook != nil {\n\t\tif err = c.Hook(pid); err != nil {\n\t\t\tfmt.Fprintf(continueWrite, \"hook error: %v\", err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *Cmd) Run() error {\n\tif err := c.Start(); err != nil {\n\t\treturn err\n\t}\n\treturn c.Wait()\n}\n\nfunc (c *Cmd) CombinedOutput() ([]byte, error) {\n\treturn nil, errors.New(\"unshare: CombinedOutput() not implemented\")\n}\n\nfunc (c *Cmd) Output() ([]byte, error) {\n\treturn nil, errors.New(\"unshare: Output() not implemented\")\n}\n\nvar (\n\tisRootlessOnce sync.Once\n\tisRootless     bool\n)\n\nconst (\n\t// UsernsEnvName is the environment variable, if set indicates in rootless mode\n\tUsernsEnvName = \"_CONTAINERS_USERNS_CONFIGURED\"\n)\n\n// hasFullUsersMappings checks whether the current user namespace has all the IDs mapped.\nfunc hasFullUsersMappings() (bool, error) {\n\tcontent, err := os.ReadFile(\"/proc/self/uid_map\")\n\tif err != nil {\n\t\treturn false, err\n\t}\n\t// The kernel rejects attempts to create mappings where either starting\n\t// point is (u32)-1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c?id=af3e9579ecfb#n1006 .\n\t// So, if the uid_map contains 4294967295, the entire IDs space is available in the\n\t// user namespace, so it is likely the initial user namespace.\n\treturn bytes.Contains(content, []byte(\"4294967295\")), nil\n}\n\nvar (\n\thasCapSysAdminOnce sync.Once\n\thasCapSysAdminRet  bool\n\thasCapSysAdminErr  error\n)\n\n// IsRootless tells us if we are running in rootless mode\nfunc IsRootless() bool {\n\tisRootlessOnce.Do(func() {\n\t\tisRootless = getRootlessUID() != 0 || getenv(UsernsEnvName) != \"\"\n\t\tif !isRootless {\n\t\t\thasCapSysAdmin, err := HasCapSysAdmin()\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Warnf(\"Failed to read CAP_SYS_ADMIN presence for the current process\")\n\t\t\t}\n\t\t\tif err == nil && !hasCapSysAdmin {\n\t\t\t\tisRootless = true\n\t\t\t}\n\t\t}\n\t\tif !isRootless {\n\t\t\thasMappings, err := hasFullUsersMappings()\n\t\t\tif err != nil {\n\t\t\t\tlogrus.Warnf(\"Failed to read current user namespace mappings\")\n\t\t\t}\n\t\t\tif err == nil && !hasMappings {\n\t\t\t\tisRootless = true\n\t\t\t}\n\t\t}\n\t})\n\treturn isRootless\n}\n\n// GetRootlessUID returns the UID of the user in the parent userNS\nfunc GetRootlessUID() int {\n\tuidEnv := getenv(\"_CONTAINERS_ROOTLESS_UID\")\n\tif uidEnv != \"\" {\n\t\tu, _ := strconv.Atoi(uidEnv)\n\t\treturn u\n\t}\n\treturn os.Getuid()\n}\n\n// GetRootlessGID returns the GID of the user in the parent userNS\nfunc GetRootlessGID() int {\n\tgidEnv := getenv(\"_CONTAINERS_ROOTLESS_GID\")\n\tif gidEnv != \"\" {\n\t\tu, _ := strconv.Atoi(gidEnv)\n\t\treturn u\n\t}\n\treturn os.Getgid()\n}\n\n// RootlessEnv returns the environment settings for the rootless containers\nfunc RootlessEnv() []string {\n\treturn append(os.Environ(), UsernsEnvName+\"=done\")\n}\n\ntype Runnable interface {\n\tRun() error\n}\n\nfunc bailOnError(err error, format string, a ...any) { //nolint:revive,goprintffuncname\n\tif err != nil {\n\t\tif format != \"\" {\n\t\t\tlogrus.Errorf(\"%s: %v\", fmt.Sprintf(format, a...), err)\n\t\t} else {\n\t\t\tlogrus.Errorf(\"%v\", err)\n\t\t}\n\t\tos.Exit(1)\n\t}\n}\n\n// MaybeReexecUsingUserNamespace re-exec the process in a new namespace\nfunc MaybeReexecUsingUserNamespace(evenForRoot bool) {\n\t// If we've already been through this once, no need to try again.\n\tif os.Geteuid() == 0 && GetRootlessUID() > 0 {\n\t\treturn\n\t}\n\n\tvar uidNum, gidNum uint64\n\t// Figure out who we are.\n\tme, err := user.Current()\n\tif !os.IsNotExist(err) {\n\t\tbailOnError(err, \"error determining current user\")\n\t\tuidNum, err = strconv.ParseUint(me.Uid, 10, 32)\n\t\tbailOnError(err, \"error parsing current UID %s\", me.Uid)\n\t\tgidNum, err = strconv.ParseUint(me.Gid, 10, 32)\n\t\tbailOnError(err, \"error parsing current GID %s\", me.Gid)\n\t}\n\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\n\t// ID mappings to use to reexec ourselves.\n\tvar uidmap, gidmap []specs.LinuxIDMapping\n\tif uidNum != 0 || evenForRoot {\n\t\t// Read the set of ID mappings that we're allowed to use.  Each\n\t\t// range in /etc/subuid and /etc/subgid file is a starting host\n\t\t// ID and a range size.\n\t\tuidmap, gidmap, err = GetSubIDMappings(me.Username, me.Username)\n\t\tif err != nil {\n\t\t\tlogrus.Warnf(\"Reading allowed ID mappings: %v\", err)\n\t\t}\n\t\tif len(uidmap) == 0 {\n\t\t\tlogrus.Warnf(\"Found no UID ranges set aside for user %q in /etc/subuid.\", me.Username)\n\t\t}\n\t\tif len(gidmap) == 0 {\n\t\t\tlogrus.Warnf(\"Found no GID ranges set aside for user %q in /etc/subgid.\", me.Username)\n\t\t}\n\t\t// Map our UID and GID, then the subuid and subgid ranges,\n\t\t// consecutively, starting at 0, to get the mappings to use for\n\t\t// a copy of ourselves.\n\t\tuidmap = append([]specs.LinuxIDMapping{{HostID: uint32(uidNum), ContainerID: 0, Size: 1}}, uidmap...)\n\t\tgidmap = append([]specs.LinuxIDMapping{{HostID: uint32(gidNum), ContainerID: 0, Size: 1}}, gidmap...)\n\t\tvar rangeStart uint32\n\t\tfor i := range uidmap {\n\t\t\tuidmap[i].ContainerID = rangeStart\n\t\t\trangeStart += uidmap[i].Size\n\t\t}\n\t\trangeStart = 0\n\t\tfor i := range gidmap {\n\t\t\tgidmap[i].ContainerID = rangeStart\n\t\t\trangeStart += gidmap[i].Size\n\t\t}\n\t} else {\n\t\t// If we have CAP_SYS_ADMIN, then we don't need to create a new namespace in order to be able\n\t\t// to use unshare(), so don't bother creating a new user namespace at this point.\n\t\tcapabilities, err := capability.NewPid2(0)\n\t\tbailOnError(err, \"Initializing a new Capabilities object of pid 0\")\n\t\terr = capabilities.Load()\n\t\tbailOnError(err, \"Reading the current capabilities sets\")\n\n\t\tif capabilities.Get(capability.EFFECTIVE, capability.CAP_SYS_ADMIN) {\n\t\t\treturn\n\t\t}\n\t\t// Read the set of ID mappings that we're currently using.\n\t\tuidmap, gidmap, err = GetHostIDMappings(\"\")\n\t\tbailOnError(err, \"Reading current ID mappings\")\n\t\t// Just reuse them.\n\t\tfor i := range uidmap {\n\t\t\tuidmap[i].HostID = uidmap[i].ContainerID\n\t\t}\n\t\tfor i := range gidmap {\n\t\t\tgidmap[i].HostID = gidmap[i].ContainerID\n\t\t}\n\t}\n\n\t// Unlike most uses of reexec or unshare, we're using a name that\n\t// _won't_ be recognized as a registered reexec handler, since we\n\t// _want_ to fall through reexec.Init() to the normal main().\n\tcmd := Command(append([]string{fmt.Sprintf(\"%s-in-a-user-namespace\", os.Args[0])}, os.Args[1:]...)...)\n\n\t// If, somehow, we don't become UID 0 in our child, indicate that the child shouldn't try again.\n\terr = os.Setenv(UsernsEnvName, \"1\")\n\tbailOnError(err, \"error setting %s=1 in environment\", UsernsEnvName)\n\n\t// Set the default isolation type to use the \"rootless\" method.\n\tif _, present := os.LookupEnv(\"BUILDAH_ISOLATION\"); !present {\n\t\tif err = os.Setenv(\"BUILDAH_ISOLATION\", \"rootless\"); err != nil {\n\t\t\tif err := os.Setenv(\"BUILDAH_ISOLATION\", \"rootless\"); err != nil {\n\t\t\t\tlogrus.Errorf(\"Setting BUILDAH_ISOLATION=rootless in environment: %v\", err)\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reuse our stdio.\n\tcmd.Stdin = os.Stdin\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\n\t// Set up a new user namespace with the ID mapping.\n\tcmd.UnshareFlags = syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS\n\tcmd.UseNewuidmap = uidNum != 0\n\tcmd.UidMappings = uidmap\n\tcmd.UseNewgidmap = uidNum != 0\n\tcmd.GidMappings = gidmap\n\tcmd.GidMappingsEnableSetgroups = true\n\n\t// Finish up.\n\tlogrus.Debugf(\"Running %+v with environment %+v, UID map %+v, and GID map %+v\", cmd.Cmd.Args, os.Environ(), cmd.UidMappings, cmd.GidMappings)\n\n\t// Forward SIGHUP, SIGINT, and SIGTERM to our child process.\n\tinterrupted := make(chan os.Signal, 100)\n\tdefer func() {\n\t\tsignal.Stop(interrupted)\n\t\tclose(interrupted)\n\t}()\n\tcmd.Hook = func(int) error {\n\t\tgo func() {\n\t\t\tfor receivedSignal := range interrupted {\n\t\t\t\tif err := cmd.Cmd.Process.Signal(receivedSignal); err != nil {\n\t\t\t\t\tlogrus.Warnf(\n\t\t\t\t\t\t\"Failed to send a signal '%d' to the Process (PID: %d): %v\",\n\t\t\t\t\t\treceivedSignal, cmd.Cmd.Process.Pid, err,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}()\n\t\treturn nil\n\t}\n\tsignal.Notify(interrupted, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM)\n\n\t// Make sure our child process gets SIGKILLed if we exit, for whatever\n\t// reason, before it does.\n\tif cmd.Cmd.SysProcAttr == nil {\n\t\tcmd.Cmd.SysProcAttr = &syscall.SysProcAttr{}\n\t}\n\tcmd.Cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL\n\n\tExecRunnable(cmd, nil)\n}\n\n// ExecRunnable runs the specified unshare command, captures its exit status,\n// and exits with the same status.\nfunc ExecRunnable(cmd Runnable, cleanup func()) {\n\texit := func(status int) {\n\t\tif cleanup != nil {\n\t\t\tcleanup()\n\t\t}\n\t\tos.Exit(status)\n\t}\n\tif err := cmd.Run(); err != nil {\n\t\tif exitError, ok := err.(*exec.ExitError); ok {\n\t\t\tif exitError.ProcessState.Exited() {\n\t\t\t\tif waitStatus, ok := exitError.ProcessState.Sys().(syscall.WaitStatus); ok {\n\t\t\t\t\tif waitStatus.Exited() {\n\t\t\t\t\t\tlogrus.Debugf(\"%v\", exitError)\n\t\t\t\t\t\texit(waitStatus.ExitStatus())\n\t\t\t\t\t}\n\t\t\t\t\tif waitStatus.Signaled() {\n\t\t\t\t\t\tlogrus.Debugf(\"%v\", exitError)\n\t\t\t\t\t\texit(int(waitStatus.Signal()) + 128)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogrus.Errorf(\"%v\", err)\n\t\tlogrus.Errorf(\"(Unable to determine exit status)\")\n\t\texit(1)\n\t}\n\texit(0)\n}\n\n// getHostIDMappings reads mappings from the named node under /proc.\nfunc getHostIDMappings(path string) ([]specs.LinuxIDMapping, error) {\n\tvar mappings []specs.LinuxIDMapping\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading ID mappings from %q: %w\", path, err)\n\t}\n\tdefer f.Close()\n\tscanner := bufio.NewScanner(f)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tfields := strings.Fields(line)\n\t\tif len(fields) != 3 {\n\t\t\treturn nil, fmt.Errorf(\"line %q from %q has %d fields, not 3\", line, path, len(fields))\n\t\t}\n\t\tcid, err := strconv.ParseUint(fields[0], 10, 32)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing container ID value %q from line %q in %q: %w\", fields[0], line, path, err)\n\t\t}\n\t\thid, err := strconv.ParseUint(fields[1], 10, 32)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing host ID value %q from line %q in %q: %w\", fields[1], line, path, err)\n\t\t}\n\t\tsize, err := strconv.ParseUint(fields[2], 10, 32)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing size value %q from line %q in %q: %w\", fields[2], line, path, err)\n\t\t}\n\t\tmappings = append(mappings, specs.LinuxIDMapping{ContainerID: uint32(cid), HostID: uint32(hid), Size: uint32(size)})\n\t}\n\treturn mappings, nil\n}\n\n// GetHostIDMappings reads mappings for the specified process (or the current\n// process if pid is \"self\" or an empty string) from the kernel.\nfunc GetHostIDMappings(pid string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error) {\n\tif pid == \"\" {\n\t\tpid = \"self\"\n\t}\n\tuidmap, err := getHostIDMappings(fmt.Sprintf(\"/proc/%s/uid_map\", pid))\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tgidmap, err := getHostIDMappings(fmt.Sprintf(\"/proc/%s/gid_map\", pid))\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn uidmap, gidmap, nil\n}\n\n// GetSubIDMappings reads mappings from /etc/subuid and /etc/subgid.\nfunc GetSubIDMappings(user, group string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error) {\n\tmappings, err := idtools.NewIDMappings(user, group)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"reading subuid mappings for user %q and subgid mappings for group %q: %w\", user, group, err)\n\t}\n\tvar uidmap, gidmap []specs.LinuxIDMapping\n\tfor _, m := range mappings.UIDs() {\n\t\tuidmap = append(uidmap, specs.LinuxIDMapping{\n\t\t\tContainerID: uint32(m.ContainerID),\n\t\t\tHostID:      uint32(m.HostID),\n\t\t\tSize:        uint32(m.Size),\n\t\t})\n\t}\n\tfor _, m := range mappings.GIDs() {\n\t\tgidmap = append(gidmap, specs.LinuxIDMapping{\n\t\t\tContainerID: uint32(m.ContainerID),\n\t\t\tHostID:      uint32(m.HostID),\n\t\t\tSize:        uint32(m.Size),\n\t\t})\n\t}\n\treturn uidmap, gidmap, nil\n}\n\n// ParseIDMappings parses mapping triples.\nfunc ParseIDMappings(uidmap, gidmap []string) ([]idtools.IDMap, []idtools.IDMap, error) {\n\tuid, err := idtools.ParseIDMap(uidmap, \"userns-uid-map\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tgid, err := idtools.ParseIDMap(gidmap, \"userns-gid-map\")\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn uid, gid, nil\n}\n\n// HasCapSysAdmin returns whether the current process has CAP_SYS_ADMIN.\nfunc HasCapSysAdmin() (bool, error) {\n\thasCapSysAdminOnce.Do(func() {\n\t\tcurrentCaps, err := capability.NewPid2(0)\n\t\tif err != nil {\n\t\t\thasCapSysAdminErr = err\n\t\t\treturn\n\t\t}\n\t\tif err = currentCaps.Load(); err != nil {\n\t\t\thasCapSysAdminErr = err\n\t\t\treturn\n\t\t}\n\t\thasCapSysAdminRet = currentCaps.Get(capability.EFFECTIVE, capability.CAP_SYS_ADMIN)\n\t})\n\treturn hasCapSysAdminRet, hasCapSysAdminErr\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_unsupported.go",
    "content": "//go:build !linux && !darwin\n\npackage unshare\n\nimport (\n\t\"os\"\n\n\t\"github.com/opencontainers/runtime-spec/specs-go\"\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\nconst (\n\t// UsernsEnvName is the environment variable, if set indicates in rootless mode\n\tUsernsEnvName = \"_CONTAINERS_USERNS_CONFIGURED\"\n)\n\n// IsRootless tells us if we are running in rootless mode\nfunc IsRootless() bool {\n\treturn os.Getuid() != 0\n}\n\n// GetRootlessUID returns the UID of the user in the parent userNS\nfunc GetRootlessUID() int {\n\treturn os.Getuid()\n}\n\n// GetRootlessGID returns the GID of the user in the parent userNS\nfunc GetRootlessGID() int {\n\treturn os.Getgid()\n}\n\n// RootlessEnv returns the environment settings for the rootless containers\nfunc RootlessEnv() []string {\n\treturn append(os.Environ(), UsernsEnvName+\"=\")\n}\n\n// MaybeReexecUsingUserNamespace re-exec the process in a new namespace\nfunc MaybeReexecUsingUserNamespace(evenForRoot bool) {\n}\n\n// GetHostIDMappings reads mappings for the specified process (or the current\n// process if pid is \"self\" or an empty string) from the kernel.\nfunc GetHostIDMappings(pid string) ([]specs.LinuxIDMapping, []specs.LinuxIDMapping, error) {\n\treturn nil, nil, nil\n}\n\n// ParseIDMappings parses mapping triples.\nfunc ParseIDMappings(uidmap, gidmap []string) ([]idtools.IDMap, []idtools.IDMap, error) {\n\treturn nil, nil, nil\n}\n\n// HasCapSysAdmin returns whether the current process has CAP_SYS_ADMIN.\nfunc HasCapSysAdmin() (bool, error) {\n\treturn os.Geteuid() == 0, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/pkg/unshare/unshare_unsupported_cgo.go",
    "content": "//go:build cgo && !(linux || freebsd)\n\npackage unshare\n\n// Go refuses to compile a subpackage with CGO_ENABLED=1 if there is a *.c file but no 'import \"C\"'.\n// OTOH if we did have an 'import \"C\"', the Linux-only code would fail to compile.\n// So, satisfy the Go compiler by using import \"C\" but #ifdef-ing out all of the code.\n\n// #cgo CPPFLAGS: -DUNSHARE_NO_CODE_AT_ALL\nimport \"C\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/storage.conf",
    "content": "# This file is the configuration file for all tools\n# that use the containers/storage library. The storage.conf file\n# overrides all other storage.conf files. Container engines using the\n# container/storage library do not inherit fields from other storage.conf\n# files.\n#\n#  Note: The storage.conf file overrides other storage.conf files based on this precedence:\n#      /usr/containers/storage.conf\n#      /etc/containers/storage.conf\n#      $HOME/.config/containers/storage.conf\n#      $XDG_CONFIG_HOME/containers/storage.conf (if XDG_CONFIG_HOME is set)\n# See man 5 containers-storage.conf for more information\n# The \"storage\" table contains all of the server options.\n[storage]\n\n# Default storage driver, must be set for proper operation.\ndriver = \"overlay\"\n\n# Temporary storage location\nrunroot = \"/run/containers/storage\"\n\n# Priority list for the storage drivers that will be tested one\n# after the other to pick the storage driver if it is not defined.\n# driver_priority = [\"overlay\", \"btrfs\"]\n\n# Primary Read/Write location of container storage\n# When changing the graphroot location on an SELinux system, you must\n# ensure the labeling matches the default location's labels with the\n# following commands:\n# semanage fcontext -a -e /var/lib/containers/storage /NEWSTORAGEPATH\n# restorecon -R -v /NEWSTORAGEPATH\ngraphroot = \"/var/lib/containers/storage\"\n\n# Optional alternate location of image store if a location separate from the\n# container store is required. If set, it must be different than graphroot.\n# imagestore = \"\"\n\n\n# Storage path for rootless users\n#\n# rootless_storage_path = \"$HOME/.local/share/containers/storage\"\n\n# Transient store mode makes all container metadata be saved in temporary storage\n# (i.e. runroot above). This is faster, but doesn't persist across reboots.\n# Additional garbage collection must also be performed at boot-time, so this\n# option should remain disabled in most configurations.\n# transient_store = true\n\n[storage.options]\n# Storage options to be passed to underlying storage drivers\n\n# AdditionalImageStores is used to pass paths to additional Read/Only image stores\n# Must be comma separated list.\nadditionalimagestores = [\n]\n\n# Options controlling how storage is populated when pulling images.\n[storage.options.pull_options]\n# Enable the \"zstd:chunked\" feature, which allows partial pulls, reusing\n# content that already exists on the system. This is disabled by default,\n# and must be explicitly enabled to be used. For more on zstd:chunked, see\n# https://github.com/containers/storage/blob/main/docs/containers-storage-zstd-chunked.md\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n# enable_partial_images = \"false\"\n\n# Tells containers/storage to use hard links rather then create new files in\n# the image, if an identical file already existed in storage.\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n# use_hard_links = \"false\"\n\n# Path to an ostree repository that might have\n# previously pulled content which can be used when attempting to avoid\n# pulling content from the container registry.\n# ostree_repos=\"\"\n\n# If set to \"true\", containers/storage will convert images that are\n# not already in zstd:chunked format to that format before processing\n# in order to take advantage of local deduplication and hard linking.\n# It is an expensive operation so it is not enabled by default.\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n# convert_images = \"false\"\n\n# This should ALMOST NEVER be set.\n# It allows partial pulls of images without guaranteeing that \"partial\n# pulls\" and non-partial pulls both result in consistent image contents.\n# This allows pulling estargz images and early versions of zstd:chunked images;\n# otherwise, these layers always use the traditional non-partial pull path.\n#\n# This option should be enabled EXTREMELY rarely, only if ALL images that could\n# EVER be conceivably pulled on this system are GUARANTEED (e.g. using a signature policy)\n# to come from a build system trusted to never attack image integrity.\n#\n# If this consistency enforcement were disabled, malicious images could be built\n# in a way designed to evade other audit mechanisms, so presence of most other audit\n# mechanisms is not a replacement for the above-mentioned need for all images to come\n# from a trusted build system.\n#\n# As a side effect, enabling this option will also make image IDs unpredictable\n# (usually not equal to the traditional value matching the config digest).\n# insecure_allow_unpredictable_image_contents = \"false\"\n\n# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID\n# ranges in the /etc/subuid and /etc/subgid file.  These ranges will be partitioned\n# to containers configured to create automatically a user namespace.  Containers\n# configured to automatically create a user namespace can still overlap with containers\n# having an explicit mapping set.\n# This setting is ignored when running as rootless.\n# root-auto-userns-user = \"storage\"\n#\n# Auto-userns-min-size is the minimum size for a user namespace created automatically.\n# auto-userns-min-size=1024\n#\n# Auto-userns-max-size is the maximum size for a user namespace created automatically.\n# auto-userns-max-size=65536\n\n[storage.options.overlay]\n# ignore_chown_errors can be set to allow a non privileged user running with\n# a single UID within a user namespace to run containers. The user can pull\n# and use any image even those with multiple uids.  Note multiple UIDs will be\n# squashed down to the default uid in the container.  These images will have no\n# separation between the users in the container. Only supported for the overlay\n# and vfs drivers.\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n#ignore_chown_errors = \"false\"\n\n# Inodes is used to set a maximum inodes of the container image.\n# inodes = \"\"\n\n# Path to an helper program to use for mounting the file system instead of mounting it\n# directly.\n#mount_program = \"/usr/bin/fuse-overlayfs\"\n\n# mountopt specifies comma separated list of extra mount options\nmountopt = \"nodev\"\n\n# Set to skip a PRIVATE bind mount on the storage home directory.\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n# skip_mount_home = \"false\"\n\n# Set to use composefs to mount data layers with overlay.\n# This is a \"string bool\": \"false\" | \"true\" (cannot be native TOML boolean)\n# use_composefs = \"false\"\n\n# Size is used to set a maximum size of the container image.\n# size = \"\"\n\n# ForceMask specifies the permissions mask that is used for new files and\n# directories.\n#\n# The values \"shared\" and \"private\" are accepted.\n# Octal permission masks are also accepted.\n#\n#  \"\": No value specified.\n#     All files/directories, get set with the permissions identified within the\n#     image.\n#  \"private\": it is equivalent to 0700.\n#     All files/directories get set with 0700 permissions.  The owner has rwx\n#     access to the files. No other users on the system can access the files.\n#     This setting could be used with networked based homedirs.\n#  \"shared\": it is equivalent to 0755.\n#     The owner has rwx access to the files and everyone else can read, access\n#     and execute them. This setting is useful for sharing containers storage\n#     with other users.  For instance have a storage owned by root but shared\n#     to rootless users as an additional store.\n#     NOTE:  All files within the image are made readable and executable by any\n#     user on the system. Even /etc/shadow within your image is now readable by\n#     any user.\n#\n#   OCTAL: Users can experiment with other OCTAL Permissions.\n#\n#  Note: The force_mask Flag is an experimental feature, it could change in the\n#  future.  When \"force_mask\" is set the original permission mask is stored in\n#  the \"user.containers.override_stat\" xattr and the \"mount_program\" option must\n#  be specified. Mount programs like \"/usr/bin/fuse-overlayfs\" present the\n#  extended attribute permissions to processes within containers rather than the\n#  \"force_mask\"  permissions.\n#\n# force_mask = \"\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/storage.conf-freebsd",
    "content": "# This file is is the configuration file for all tools\n# that use the containers/storage library. The storage.conf file\n# overrides all other storage.conf files. Container engines using the\n# container/storage library do not inherit fields from other storage.conf\n# files.\n#\n#  Note: The storage.conf file overrides other storage.conf files based on this precedence:\n#      /usr/local/share/containers/storage.conf\n#      /usr/local/etc/containers/storage.conf\n#      $HOME/.config/containers/storage.conf\n#      $XDG_CONFIG_HOME/containers/storage.conf (If XDG_CONFIG_HOME is set)\n# See man 5 containers-storage.conf for more information\n# The \"container storage\" table contains all of the server options.\n[storage]\n\n# Default Storage Driver, Must be set for proper operation.\ndriver = \"zfs\"\n\n# Temporary storage location\nrunroot = \"/var/run/containers/storage\"\n\n# Primary Read/Write location of container storage\ngraphroot = \"/var/db/containers/storage\"\n\n# Optional value for image storage location\n# If set, it must be different than graphroot.\n\n# imagestore = \"\"\n\n# Storage path for rootless users\n#\n# rootless_storage_path = \"$HOME/.local/share/containers/storage\"\n\n[storage.options]\n# Storage options to be passed to underlying storage drivers\n\n# AdditionalImageStores is used to pass paths to additional Read/Only image stores\n# Must be comma separated list.\nadditionalimagestores = [\n]\n\n# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID\n# ranges in the /etc/subuid and /etc/subgid file.  These ranges will be partitioned\n# to containers configured to create automatically a user namespace.  Containers\n# configured to automatically create a user namespace can still overlap with containers\n# having an explicit mapping set.\n# This setting is ignored when running as rootless.\n# root-auto-userns-user = \"storage\"\n#\n# Auto-userns-min-size is the minimum size for a user namespace created automatically.\n# auto-userns-min-size=1024\n#\n# Auto-userns-max-size is the maximum size for a user namespace created automatically.\n# auto-userns-max-size=65536\n\n[storage.options.overlay]\n# ignore_chown_errors can be set to allow a non privileged user running with\n# a single UID within a user namespace to run containers. The user can pull\n# and use any image even those with multiple uids.  Note multiple UIDs will be\n# squashed down to the default uid in the container.  These images will have no\n# separation between the users in the container. Only supported for the overlay\n# and vfs drivers.\n#ignore_chown_errors = \"false\"\n\n# Inodes is used to set a maximum inodes of the container image.\n# inodes = \"\"\n\n# Path to an helper program to use for mounting the file system instead of mounting it\n# directly.\n#mount_program = \"/usr/bin/fuse-overlayfs\"\n\n# mountopt specifies comma separated list of extra mount options\nmountopt = \"nodev\"\n\n# Set to skip a PRIVATE bind mount on the storage home directory.\n# skip_mount_home = \"false\"\n\n# Set to use composefs to mount data layers with overlay.\n# use_composefs = \"false\"\n\n# Size is used to set a maximum size of the container image.\n# size = \"\"\n\n# ForceMask specifies the permissions mask that is used for new files and\n# directories.\n#\n# The values \"shared\" and \"private\" are accepted.\n# Octal permission masks are also accepted.\n#\n#  \"\": No value specified.\n#     All files/directories, get set with the permissions identified within the\n#     image.\n#  \"private\": it is equivalent to 0700.\n#     All files/directories get set with 0700 permissions.  The owner has rwx\n#     access to the files. No other users on the system can access the files.\n#     This setting could be used with networked based homedirs.\n#  \"shared\": it is equivalent to 0755.\n#     The owner has rwx access to the files and everyone else can read, access\n#     and execute them. This setting is useful for sharing containers storage\n#     with other users.  For instance have a storage owned by root but shared\n#     to rootless users as an additional store.\n#     NOTE:  All files within the image are made readable and executable by any\n#     user on the system. Even /etc/shadow within your image is now readable by\n#     any user.\n#\n#   OCTAL: Users can experiment with other OCTAL Permissions.\n#\n#  Note: The force_mask Flag is an experimental feature, it could change in the\n#  future.  When \"force_mask\" is set the original permission mask is stored in\n#  the \"user.containers.override_stat\" xattr and the \"mount_program\" option must\n#  be specified. Mount programs like \"/usr/bin/fuse-overlayfs\" present the\n#  extended attribute permissions to processes within containers rather then the\n#  \"force_mask\"  permissions.\n#\n# force_mask = \"\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/store.go",
    "content": "package storage\n\nimport (\n\t_ \"embed\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n\n\t// register all of the built-in drivers\n\t_ \"go.podman.io/storage/drivers/register\"\n\t\"golang.org/x/sync/errgroup\"\n\n\tdigest \"github.com/opencontainers/go-digest\"\n\t\"github.com/opencontainers/selinux/go-selinux/label\"\n\t\"github.com/sirupsen/logrus\"\n\tdrivers \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/internal/dedup\"\n\t\"go.podman.io/storage/internal/tempdir\"\n\t\"go.podman.io/storage/pkg/archive\"\n\t\"go.podman.io/storage/pkg/directory\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/ioutils\"\n\t\"go.podman.io/storage/pkg/lockfile\"\n\t\"go.podman.io/storage/pkg/parsers\"\n\t\"go.podman.io/storage/pkg/stringutils\"\n\t\"go.podman.io/storage/pkg/system\"\n\t\"go.podman.io/storage/types\"\n)\n\ntype updateNameOperation int\n\nconst (\n\tsetNames updateNameOperation = iota\n\taddNames\n\tremoveNames\n)\n\nconst (\n\tvolatileFlag     = \"Volatile\"\n\tmountLabelFlag   = \"MountLabel\"\n\tprocessLabelFlag = \"ProcessLabel\"\n\tmountOptsFlag    = \"MountOpts\"\n)\n\nvar (\n\tstores     []*store\n\tstoresLock sync.Mutex\n)\n\n// roMetadataStore wraps a method for reading metadata associated with an ID.\ntype roMetadataStore interface {\n\t// Metadata reads metadata associated with an item with the specified ID.\n\tMetadata(id string) (string, error)\n}\n\n// rwMetadataStore wraps a method for setting metadata associated with an ID.\ntype rwMetadataStore interface {\n\t// SetMetadata updates the metadata associated with the item with the specified ID.\n\tSetMetadata(id, metadata string) error\n}\n\n// metadataStore wraps up methods for getting and setting metadata associated with IDs.\ntype metadataStore interface {\n\troMetadataStore\n\trwMetadataStore\n}\n\n// ApplyStagedLayerOptions contains options to pass to ApplyStagedLayer\ntype ApplyStagedLayerOptions struct {\n\tID           string        // Mandatory\n\tParentLayer  string        // Optional\n\tNames        []string      // Optional\n\tMountLabel   string        // Optional\n\tWriteable    bool          // Optional\n\tLayerOptions *LayerOptions // Optional\n\n\tDiffOutput  *drivers.DriverWithDifferOutput  // Mandatory\n\tDiffOptions *drivers.ApplyDiffWithDifferOpts // Mandatory\n}\n\n// MultiListOptions contains options to pass to MultiList\ntype MultiListOptions struct {\n\tImages     bool // if true, Images will be listed in the result\n\tLayers     bool // if true, layers will be listed in the result\n\tContainers bool // if true, containers will be listed in the result\n}\n\n// MultiListResult contains slices of Images, Layers or Containers listed by MultiList method\ntype MultiListResult struct {\n\tImages     []Image\n\tLayers     []Layer\n\tContainers []Container\n}\n\n// An roBigDataStore wraps up the read-only big-data related methods of the\n// various types of file-based lookaside stores that we implement.\ntype roBigDataStore interface {\n\t// BigData retrieves a (potentially large) piece of data associated with\n\t// this ID, if it has previously been set.\n\tBigData(id, key string) ([]byte, error)\n\n\t// BigDataSize retrieves the size of a (potentially large) piece of\n\t// data associated with this ID, if it has previously been set.\n\tBigDataSize(id, key string) (int64, error)\n\n\t// BigDataDigest retrieves the digest of a (potentially large) piece of\n\t// data associated with this ID, if it has previously been set.\n\tBigDataDigest(id, key string) (digest.Digest, error)\n\n\t// BigDataNames() returns a list of the names of previously-stored pieces of\n\t// data.\n\tBigDataNames(id string) ([]string, error)\n}\n\n// A rwImageBigDataStore wraps up how we store big-data associated with images.\ntype rwImageBigDataStore interface {\n\t// SetBigData stores a (potentially large) piece of data associated\n\t// with this ID.\n\t// Pass github.com/containers/image/manifest.Digest as digestManifest\n\t// to allow ByDigest to find images by their correct digests.\n\tSetBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error\n}\n\n// A containerBigDataStore wraps up how we store big-data associated with containers.\ntype containerBigDataStore interface {\n\troBigDataStore\n\t// SetBigData stores a (potentially large) piece of data associated\n\t// with this ID.\n\tSetBigData(id, key string, data []byte) error\n}\n\n// A roLayerBigDataStore wraps up how we store RO big-data associated with layers.\ntype roLayerBigDataStore interface {\n\t// SetBigData stores a (potentially large) piece of data associated\n\t// with this ID.\n\tBigData(id, key string) (io.ReadCloser, error)\n\n\t// BigDataNames() returns a list of the names of previously-stored pieces of\n\t// data.\n\tBigDataNames(id string) ([]string, error)\n}\n\n// A rwLayerBigDataStore wraps up how we store big-data associated with layers.\ntype rwLayerBigDataStore interface {\n\t// SetBigData stores a (potentially large) piece of data associated\n\t// with this ID.\n\tSetBigData(id, key string, data io.Reader) error\n}\n\n// A flaggableStore can have flags set and cleared on items which it manages.\ntype flaggableStore interface {\n\t// ClearFlag removes a named flag from an item in the store.\n\tClearFlag(id string, flag string) error\n\n\t// SetFlag sets a named flag and its value on an item in the store.\n\tSetFlag(id string, flag string, value any) error\n}\n\ntype StoreOptions = types.StoreOptions\n\ntype DedupHashMethod = dedup.DedupHashMethod\n\nconst (\n\tDedupHashInvalid  = dedup.DedupHashInvalid\n\tDedupHashCRC      = dedup.DedupHashCRC\n\tDedupHashFileSize = dedup.DedupHashFileSize\n\tDedupHashSHA256   = dedup.DedupHashSHA256\n)\n\ntype (\n\tDedupOptions = dedup.DedupOptions\n\tDedupResult  = dedup.DedupResult\n)\n\n// DedupArgs is used to pass arguments to the Dedup command.\ntype DedupArgs struct {\n\t// Options that are passed directly to the internal/dedup.DedupDirs function.\n\tOptions DedupOptions\n}\n\n// Store wraps up the various types of file-based stores that we use into a\n// singleton object that initializes and manages them all together.\ntype Store interface {\n\t// RunRoot, GraphRoot, GraphDriverName, and GraphOptions retrieve\n\t// settings that were passed to GetStore() when the object was created.\n\tRunRoot() string\n\tGraphRoot() string\n\tImageStore() string\n\tTransientStore() bool\n\tGraphDriverName() string\n\tGraphOptions() []string\n\tPullOptions() map[string]string\n\tUIDMap() []idtools.IDMap\n\tGIDMap() []idtools.IDMap\n\n\t// GraphDriver obtains and returns a handle to the graph Driver object used\n\t// by the Store.\n\tGraphDriver() (drivers.Driver, error)\n\n\t// CreateLayer creates a new layer in the underlying storage driver,\n\t// optionally having the specified ID (one will be assigned if none is\n\t// specified), with the specified layer (or no layer) as its parent,\n\t// and with optional names.  (The writeable flag is ignored.)\n\tCreateLayer(id, parent string, names []string, mountLabel string, writeable bool, options *LayerOptions) (*Layer, error)\n\n\t// PutLayer combines the functions of CreateLayer and ApplyDiff,\n\t// marking the layer for automatic removal if applying the diff fails\n\t// for any reason.\n\t//\n\t// Note that we do some of this work in a child process.  The calling\n\t// process's main() function needs to import our pkg/reexec package and\n\t// should begin with something like this in order to allow us to\n\t// properly start that child process:\n\t//   if reexec.Init() {\n\t//       return\n\t//   }\n\tPutLayer(id, parent string, names []string, mountLabel string, writeable bool, options *LayerOptions, diff io.Reader) (*Layer, int64, error)\n\n\t// CreateImage creates a new image, optionally with the specified ID\n\t// (one will be assigned if none is specified), with optional names,\n\t// referring to a specified image, and with optional metadata.  An\n\t// image is a record which associates the ID of a layer with a\n\t// additional bookkeeping information which the library stores for the\n\t// convenience of its caller.\n\tCreateImage(id string, names []string, layer, metadata string, options *ImageOptions) (*Image, error)\n\n\t// CreateContainer creates a new container, optionally with the\n\t// specified ID (one will be assigned if none is specified), with\n\t// optional names, using the specified image's top layer as the basis\n\t// for the container's layer, and assigning the specified ID to that\n\t// layer (one will be created if none is specified).  A container is a\n\t// layer which is associated with additional bookkeeping information\n\t// which the library stores for the convenience of its caller.\n\tCreateContainer(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error)\n\n\t// Metadata retrieves the metadata which is associated with a layer,\n\t// image, or container (whichever the passed-in ID refers to).\n\tMetadata(id string) (string, error)\n\n\t// SetMetadata updates the metadata which is associated with a layer,\n\t// image, or container (whichever the passed-in ID refers to) to match\n\t// the specified value.  The metadata value can be retrieved at any\n\t// time using Metadata, or using Layer, Image, or Container and reading\n\t// the object directly.\n\tSetMetadata(id, metadata string) error\n\n\t// Exists checks if there is a layer, image, or container which has the\n\t// passed-in ID or name.\n\tExists(id string) bool\n\n\t// Status asks for a status report, in the form of key-value pairs,\n\t// from the underlying storage driver.  The contents vary from driver\n\t// to driver.\n\tStatus() ([][2]string, error)\n\n\t// Delete removes the layer, image, or container which has the\n\t// passed-in ID or name.  Note that no safety checks are performed, so\n\t// this can leave images with references to layers which do not exist,\n\t// and layers with references to parents which no longer exist.\n\tDelete(id string) error\n\n\t// DeleteLayer attempts to remove the specified layer.  If the layer is the\n\t// parent of any other layer, or is referred to by any images, it will return\n\t// an error.\n\tDeleteLayer(id string) error\n\n\t// DeleteImage removes the specified image if it is not referred to by\n\t// any containers.  If its top layer is then no longer referred to by\n\t// any other images and is not the parent of any other layers, its top\n\t// layer will be removed.  If that layer's parent is no longer referred\n\t// to by any other images and is not the parent of any other layers,\n\t// then it, too, will be removed.  This procedure will be repeated\n\t// until a layer which should not be removed, or the base layer, is\n\t// reached, at which point the list of removed layers is returned.  If\n\t// the commit argument is false, the image and layers are not removed,\n\t// but the list of layers which would be removed is still returned.\n\tDeleteImage(id string, commit bool) (layers []string, err error)\n\n\t// DeleteContainer removes the specified container and its layer.  If\n\t// there is no matching container, or if the container exists but its\n\t// layer does not, an error will be returned.\n\tDeleteContainer(id string) error\n\n\t// Wipe removes all known layers, images, and containers.\n\tWipe() error\n\n\t// MountImage mounts an image to temp directory and returns the mount point.\n\t// MountImage allows caller to mount an image. Images will always\n\t// be mounted read/only\n\tMountImage(id string, mountOptions []string, mountLabel string) (string, error)\n\n\t// Unmount attempts to unmount an image, given an ID.\n\t// Returns whether or not the layer is still mounted.\n\t// WARNING: The return value may already be obsolete by the time it is available\n\t// to the caller, so it can be used for heuristic sanity checks at best. It should almost always be ignored.\n\tUnmountImage(id string, force bool) (bool, error)\n\n\t// Mount attempts to mount a layer, image, or container for access, and\n\t// returns the pathname if it succeeds.\n\t// Note if the mountLabel == \"\", the default label for the container\n\t// will be used.\n\t//\n\t// Note that we do some of this work in a child process.  The calling\n\t// process's main() function needs to import our pkg/reexec package and\n\t// should begin with something like this in order to allow us to\n\t// properly start that child process:\n\t//   if reexec.Init() {\n\t//       return\n\t//   }\n\tMount(id, mountLabel string) (string, error)\n\n\t// Unmount attempts to unmount a layer, image, or container, given an ID, a\n\t// name, or a mount path. Returns whether or not the layer is still mounted.\n\t// WARNING: The return value may already be obsolete by the time it is available\n\t// to the caller, so it can be used for heuristic sanity checks at best. It should almost always be ignored.\n\tUnmount(id string, force bool) (bool, error)\n\n\t// Mounted returns number of times the layer has been mounted.\n\t//\n\t// WARNING: This value might already be obsolete by the time it is returned;\n\t// In situations where concurrent mount/unmount attempts can happen, this field\n\t// should not be used for any decisions, maybe apart from heuristic user warnings.\n\tMounted(id string) (int, error)\n\n\t// Changes returns a summary of the changes which would need to be made\n\t// to one layer to make its contents the same as a second layer.  If\n\t// the first layer is not specified, the second layer's parent is\n\t// assumed.  Each Change structure contains a Path relative to the\n\t// layer's root directory, and a Kind which is either ChangeAdd,\n\t// ChangeModify, or ChangeDelete.\n\tChanges(from, to string) ([]archive.Change, error)\n\n\t// DiffSize returns a count of the size of the tarstream which would\n\t// specify the changes returned by Changes.\n\tDiffSize(from, to string) (int64, error)\n\n\t// Diff returns the tarstream which would specify the changes returned\n\t// by Changes.  If options are passed in, they can override default\n\t// behaviors.\n\tDiff(from, to string, options *DiffOptions) (io.ReadCloser, error)\n\n\t// ApplyDiff applies a tarstream to a layer.  Information about the\n\t// tarstream is cached with the layer.  Typically, a layer which is\n\t// populated using a tarstream will be expected to not be modified in\n\t// any other way, either before or after the diff is applied.\n\t//\n\t// Note that we do some of this work in a child process.  The calling\n\t// process's main() function needs to import our pkg/reexec package and\n\t// should begin with something like this in order to allow us to\n\t// properly start that child process:\n\t//   if reexec.Init() {\n\t//       return\n\t//   }\n\tApplyDiff(to string, diff io.Reader) (int64, error)\n\n\t// PrepareStagedLayer applies a diff to a layer.\n\t// It is the caller responsibility to clean the staging directory if it is not\n\t// successfully applied with ApplyStagedLayer.\n\t// The caller must ensure [Store.ApplyStagedLayer] or [Store.CleanupStagedLayer] is called eventually\n\t// with the returned [drivers.DriverWithDifferOutput] object.\n\tPrepareStagedLayer(options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error)\n\n\t// ApplyStagedLayer combines the functions of creating a layer and using the staging\n\t// directory to populate it.\n\t// It marks the layer for automatic removal if applying the diff fails for any reason.\n\tApplyStagedLayer(args ApplyStagedLayerOptions) (*Layer, error)\n\n\t// CleanupStagedLayer cleanups the staging directory.  It can be used to cleanup the staging directory on errors\n\tCleanupStagedLayer(diffOutput *drivers.DriverWithDifferOutput) error\n\n\t// DifferTarget gets the path to the differ target.\n\tDifferTarget(id string) (string, error)\n\n\t// LayersByCompressedDigest returns a slice of the layers with the\n\t// specified compressed digest value recorded for them.\n\tLayersByCompressedDigest(d digest.Digest) ([]Layer, error)\n\n\t// LayersByUncompressedDigest returns a slice of the layers with the\n\t// specified uncompressed digest value recorded for them.\n\tLayersByUncompressedDigest(d digest.Digest) ([]Layer, error)\n\n\t// LayersByTOCDigest returns a slice of the layers with the\n\t// specified TOC digest value recorded for them.\n\tLayersByTOCDigest(d digest.Digest) ([]Layer, error)\n\n\t// LayerSize returns a cached approximation of the layer's size, or -1\n\t// if we don't have a value on hand.\n\tLayerSize(id string) (int64, error)\n\n\t// LayerParentOwners returns the UIDs and GIDs of owners of parents of\n\t// the layer's mountpoint for which the layer's UID and GID maps (if\n\t// any are defined) don't contain corresponding IDs.\n\tLayerParentOwners(id string) ([]int, []int, error)\n\n\t// Layers returns a list of the currently known layers.\n\tLayers() ([]Layer, error)\n\n\t// Images returns a list of the currently known images.\n\tImages() ([]Image, error)\n\n\t// Containers returns a list of the currently known containers.\n\tContainers() ([]Container, error)\n\n\t// Names returns the list of names for a layer, image, or container.\n\tNames(id string) ([]string, error)\n\n\t// Free removes the store from the list of stores\n\tFree()\n\n\t// SetNames changes the list of names for a layer, image, or container.\n\t// Duplicate names are removed from the list automatically.\n\t// Deprecated: Prone to race conditions, suggested alternatives are `AddNames` and `RemoveNames`.\n\tSetNames(id string, names []string) error\n\n\t// AddNames adds the list of names for a layer, image, or container.\n\t// Duplicate names are removed from the list automatically.\n\tAddNames(id string, names []string) error\n\n\t// RemoveNames removes the list of names for a layer, image, or container.\n\t// Duplicate names are removed from the list automatically.\n\tRemoveNames(id string, names []string) error\n\n\t// ListImageBigData retrieves a list of the (possibly large) chunks of\n\t// named data associated with an image.\n\tListImageBigData(id string) ([]string, error)\n\n\t// ImageBigData retrieves a (possibly large) chunk of named data\n\t// associated with an image.\n\tImageBigData(id, key string) ([]byte, error)\n\n\t// ImageBigDataSize retrieves the size of a (possibly large) chunk\n\t// of named data associated with an image.\n\tImageBigDataSize(id, key string) (int64, error)\n\n\t// ImageBigDataDigest retrieves the digest of a (possibly large) chunk\n\t// of named data associated with an image.\n\tImageBigDataDigest(id, key string) (digest.Digest, error)\n\n\t// SetImageBigData stores a (possibly large) chunk of named data\n\t// associated with an image.  Pass\n\t// github.com/containers/image/manifest.Digest as digestManifest to\n\t// allow ImagesByDigest to find images by their correct digests.\n\tSetImageBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error\n\n\t// ImageDirectory returns a path of a directory which the caller can\n\t// use to store data, specific to the image, which the library does not\n\t// directly manage.  The directory will be deleted when the image is\n\t// deleted.\n\tImageDirectory(id string) (string, error)\n\n\t// ImageRunDirectory returns a path of a directory which the caller can\n\t// use to store data, specific to the image, which the library does not\n\t// directly manage.  The directory will be deleted when the host system\n\t// is restarted.\n\tImageRunDirectory(id string) (string, error)\n\n\t// ListLayerBigData retrieves a list of the (possibly large) chunks of\n\t// named data associated with a layer.\n\tListLayerBigData(id string) ([]string, error)\n\n\t// LayerBigData retrieves a (possibly large) chunk of named data\n\t// associated with a layer.\n\tLayerBigData(id, key string) (io.ReadCloser, error)\n\n\t// SetLayerBigData stores a (possibly large) chunk of named data\n\t// associated with a layer.\n\tSetLayerBigData(id, key string, data io.Reader) error\n\n\t// ImageSize computes the size of the image's layers and ancillary data.\n\tImageSize(id string) (int64, error)\n\n\t// ListContainerBigData retrieves a list of the (possibly large) chunks of\n\t// named data associated with a container.\n\tListContainerBigData(id string) ([]string, error)\n\n\t// ContainerBigData retrieves a (possibly large) chunk of named data\n\t// associated with a container.\n\tContainerBigData(id, key string) ([]byte, error)\n\n\t// ContainerBigDataSize retrieves the size of a (possibly large)\n\t// chunk of named data associated with a container.\n\tContainerBigDataSize(id, key string) (int64, error)\n\n\t// ContainerBigDataDigest retrieves the digest of a (possibly large)\n\t// chunk of named data associated with a container.\n\tContainerBigDataDigest(id, key string) (digest.Digest, error)\n\n\t// SetContainerBigData stores a (possibly large) chunk of named data\n\t// associated with a container.\n\tSetContainerBigData(id, key string, data []byte) error\n\n\t// ContainerSize computes the size of the container's layer and ancillary\n\t// data.  Warning:  this is a potentially expensive operation.\n\tContainerSize(id string) (int64, error)\n\n\t// Layer returns a specific layer.\n\tLayer(id string) (*Layer, error)\n\n\t// Image returns a specific image.\n\tImage(id string) (*Image, error)\n\n\t// ImagesByTopLayer returns a list of images which reference the specified\n\t// layer as their top layer.  They will have different IDs and names\n\t// and may have different metadata, big data items, and flags.\n\tImagesByTopLayer(id string) ([]*Image, error)\n\n\t// ImagesByDigest returns a list of images which contain a big data item\n\t// named ImageDigestBigDataKey whose contents have the specified digest.\n\tImagesByDigest(d digest.Digest) ([]*Image, error)\n\n\t// Container returns a specific container.\n\tContainer(id string) (*Container, error)\n\n\t// ContainerByLayer returns a specific container based on its layer ID or\n\t// name.\n\tContainerByLayer(id string) (*Container, error)\n\n\t// ContainerDirectory returns a path of a directory which the caller\n\t// can use to store data, specific to the container, which the library\n\t// does not directly manage.  The directory will be deleted when the\n\t// container is deleted.\n\tContainerDirectory(id string) (string, error)\n\n\t// SetContainerDirectoryFile is a convenience function which stores\n\t// a piece of data in the specified file relative to the container's\n\t// directory.\n\tSetContainerDirectoryFile(id, file string, data []byte) error\n\n\t// FromContainerDirectory is a convenience function which reads\n\t// the contents of the specified file relative to the container's\n\t// directory.\n\tFromContainerDirectory(id, file string) ([]byte, error)\n\n\t// ContainerRunDirectory returns a path of a directory which the\n\t// caller can use to store data, specific to the container, which the\n\t// library does not directly manage.  The directory will be deleted\n\t// when the host system is restarted.\n\tContainerRunDirectory(id string) (string, error)\n\n\t// SetContainerRunDirectoryFile is a convenience function which stores\n\t// a piece of data in the specified file relative to the container's\n\t// run directory.\n\tSetContainerRunDirectoryFile(id, file string, data []byte) error\n\n\t// FromContainerRunDirectory is a convenience function which reads\n\t// the contents of the specified file relative to the container's run\n\t// directory.\n\tFromContainerRunDirectory(id, file string) ([]byte, error)\n\n\t// ContainerParentOwners returns the UIDs and GIDs of owners of parents\n\t// of the container's layer's mountpoint for which the layer's UID and\n\t// GID maps (if any are defined) don't contain corresponding IDs.\n\tContainerParentOwners(id string) ([]int, []int, error)\n\n\t// Lookup returns the ID of a layer, image, or container with the specified\n\t// name or ID.\n\tLookup(name string) (string, error)\n\n\t// Shutdown attempts to free any kernel resources which are being used\n\t// by the underlying driver.  If \"force\" is true, any mounted (i.e., in\n\t// use) layers are unmounted beforehand.  If \"force\" is not true, then\n\t// layers being in use is considered to be an error condition.  A list\n\t// of still-mounted layers is returned along with possible errors.\n\tShutdown(force bool) (layers []string, err error)\n\n\t// Version returns version information, in the form of key-value pairs, from\n\t// the storage package.\n\tVersion() ([][2]string, error)\n\n\t// GetDigestLock returns digest-specific Locker.\n\tGetDigestLock(digest.Digest) (Locker, error)\n\n\t// LayerFromAdditionalLayerStore searches the additional layer store and returns an object\n\t// which can create a layer with the specified TOC digest associated with the specified image\n\t// reference. Note that this hasn't been stored to this store yet: the actual creation of\n\t// a usable layer is done by calling the returned object's PutAs() method.  After creating\n\t// a layer, the caller must then call the object's Release() method to free any temporary\n\t// resources which were allocated for the object by this method or the object's PutAs()\n\t// method.\n\t// This API is experimental and can be changed without bumping the major version number.\n\tLookupAdditionalLayer(tocDigest digest.Digest, imageref string) (AdditionalLayer, error)\n\n\t// Tries to clean up remainders of previous containers or layers that are not\n\t// references in the json files. These can happen in the case of unclean\n\t// shutdowns or regular restarts in transient store mode.\n\tGarbageCollect() error\n\n\t// Check returns a report of things that look wrong in the store.\n\tCheck(options *CheckOptions) (CheckReport, error)\n\t// Repair attempts to remediate problems mentioned in the CheckReport,\n\t// usually by deleting layers and images which are damaged.  If the\n\t// right options are set, it will remove containers as well.\n\tRepair(report CheckReport, options *RepairOptions) []error\n\n\t// MultiList returns a MultiListResult structure that contains layer, image, or container\n\t// extracts according to the values in MultiListOptions.\n\t// MultiList returns consistent values as of a single point in time.\n\t// WARNING: The values may already be out of date by the time they are returned to the caller.\n\tMultiList(MultiListOptions) (MultiListResult, error)\n\n\t// Dedup deduplicates layers in the store.\n\tDedup(DedupArgs) (drivers.DedupResult, error)\n}\n\n// AdditionalLayer represents a layer that is contained in the additional layer store\n// This API is experimental and can be changed without bumping the major version number.\ntype AdditionalLayer interface {\n\t// PutAs creates layer based on this handler, using diff contents from the additional\n\t// layer store.\n\tPutAs(id, parent string, names []string) (*Layer, error)\n\n\t// TOCDigest returns the digest of TOC of this layer. Returns \"\" if unknown.\n\tTOCDigest() digest.Digest\n\n\t// CompressedSize returns the compressed size of this layer\n\tCompressedSize() int64\n\n\t// Release tells the additional layer store that we don't use this handler.\n\tRelease()\n}\n\ntype AutoUserNsOptions = types.AutoUserNsOptions\n\ntype IDMappingOptions = types.IDMappingOptions\n\n// LayerOptions is used for passing options to a Store's CreateLayer() and PutLayer() methods.\ntype LayerOptions struct {\n\t// IDMappingOptions specifies the type of ID mapping which should be\n\t// used for this layer.  If nothing is specified, the layer will\n\t// inherit settings from its parent layer or, if it has no parent\n\t// layer, the Store object.\n\ttypes.IDMappingOptions\n\t// TemplateLayer is the ID of a layer whose contents will be used to\n\t// initialize this layer.  If set, it should be a child of the layer\n\t// which we want to use as the parent of the new layer.\n\tTemplateLayer string\n\t// OriginalDigest specifies a digest of the (possibly-compressed) tarstream (diff), if one is\n\t// provided along with these LayerOptions, and reliably known by the caller.\n\t// The digest might not be exactly the digest of the provided tarstream\n\t// (e.g. the digest might be of a compressed representation, while providing\n\t// an uncompressed one); in that case the caller is responsible for the two matching.\n\t// Use the default \"\" if this fields is not applicable or the value is not known.\n\tOriginalDigest digest.Digest\n\t// OriginalSize specifies a size of the (possibly-compressed) tarstream corresponding\n\t// to OriginalDigest.\n\t// If the digest does not match the provided tarstream, OriginalSize must match OriginalDigest,\n\t// not the tarstream.\n\t// Use nil if not applicable or not known.\n\tOriginalSize *int64\n\t// UncompressedDigest specifies a digest of the uncompressed version (“DiffID”)\n\t// of the tarstream (diff), if one is provided along with these LayerOptions,\n\t// and reliably known by the caller.\n\t// Use the default \"\" if this fields is not applicable or the value is not known.\n\tUncompressedDigest digest.Digest\n\t// True is the layer info can be treated as volatile\n\tVolatile bool\n\t// BigData is a set of items which should be stored with the layer.\n\tBigData []LayerBigDataOption\n\t// Flags is a set of named flags and their values to store with the layer.\n\t// Currently these can only be set when the layer record is created, but that\n\t// could change in the future.\n\tFlags map[string]any\n}\n\ntype LayerBigDataOption struct {\n\tKey  string\n\tData io.Reader\n}\n\n// ImageOptions is used for passing options to a Store's CreateImage() method.\ntype ImageOptions struct {\n\t// CreationDate, if not zero, will override the default behavior of marking the image as having been\n\t// created when CreateImage() was called, recording CreationDate instead.\n\tCreationDate time.Time\n\t// Digest is a hard-coded digest value that we can use to look up the image.  It is optional.\n\tDigest digest.Digest\n\t// Digests is a list of digest values of the image's manifests, and\n\t// possibly a manually-specified value, that we can use to locate the\n\t// image.  If Digest is set, its value is also in this list.\n\tDigests []digest.Digest\n\t// Metadata is caller-specified metadata associated with the layer.\n\tMetadata string\n\t// BigData is a set of items which should be stored with the image.\n\tBigData []ImageBigDataOption\n\t// NamesHistory is used for guessing for what this image was named when a container was created based\n\t// on it, but it no longer has any names.\n\tNamesHistory []string\n\t// Flags is a set of named flags and their values to store with the image.  Currently these can only\n\t// be set when the image record is created, but that could change in the future.\n\tFlags map[string]any\n}\n\ntype ImageBigDataOption struct {\n\tKey    string\n\tData   []byte\n\tDigest digest.Digest\n}\n\n// ContainerOptions is used for passing options to a Store's CreateContainer() method.\ntype ContainerOptions struct {\n\t// IDMappingOptions specifies the type of ID mapping which should be\n\t// used for this container's layer.  If nothing is specified, the\n\t// container's layer will inherit settings from the image's top layer\n\t// or, if it is not being created based on an image, the Store object.\n\ttypes.IDMappingOptions\n\tLabelOpts []string\n\t// Flags is a set of named flags and their values to store with the container.\n\t// Currently these can only be set when the container record is created, but that\n\t// could change in the future.\n\tFlags      map[string]any\n\tMountOpts  []string\n\tVolatile   bool\n\tStorageOpt map[string]string\n\t// Metadata is caller-specified metadata associated with the container.\n\tMetadata string\n\t// BigData is a set of items which should be stored for the container.\n\tBigData []ContainerBigDataOption\n}\n\ntype ContainerBigDataOption struct {\n\tKey  string\n\tData []byte\n}\n\ntype store struct {\n\t// # Locking hierarchy:\n\t// These locks do not all need to be held simultaneously, but if some code does need to lock more than one, it MUST do so in this order:\n\t// - graphLock\n\t// - layerStore.start{Reading,Writing}\n\t// - roLayerStores[].startReading (in the order of the items of the roLayerStores array)\n\t// - imageStore.start{Reading,Writing}\n\t// - roImageStores[].startReading (in the order of the items of the roImageStores array)\n\t// - containerStore.start{Reading,Writing}\n\n\t// The following fields are only set when constructing store, and must never be modified afterwards.\n\t// They are safe to access without any other locking.\n\trunRoot             string\n\tgraphDriverName     string // Initially set to the user-requested value, possibly \"\"; updated during store construction, and does not change afterwards.\n\tgraphDriverPriority []string\n\t// graphLock:\n\t// - Ensures that we always reload graphDriver, and the primary layer store, after any process does store.Shutdown. This is necessary\n\t//   because (??) the Shutdown may forcibly unmount and clean up, affecting graph driver state in a way only a graph driver\n\t//   and layer store reinitialization can notice.\n\t// - Ensures that store.Shutdown is exclusive with mount operations. This is necessary at because some\n\t//   graph drivers call mount.MakePrivate() during initialization, the mount operations require that, and the driver’s Cleanup() method\n\t//   may undo that. So, holding graphLock is required throughout the duration of Shutdown(), and the duration of any mount\n\t//   (but not unmount) calls.\n\t// - Within this store object, protects access to some related in-memory state.\n\tgraphLock       *lockfile.LockFile\n\tusernsLock      *lockfile.LockFile\n\tgraphRoot       string\n\tgraphOptions    []string\n\timageStoreDir   string\n\tpullOptions     map[string]string\n\tuidMap          []idtools.IDMap\n\tgidMap          []idtools.IDMap\n\tautoUsernsUser  string\n\tautoNsMinSize   uint32\n\tautoNsMaxSize   uint32\n\timageStore      rwImageStore\n\trwImageStores   []rwImageStore\n\troImageStores   []roImageStore\n\tcontainerStore  rwContainerStore\n\tdigestLockRoot  string\n\tdisableVolatile bool\n\ttransientStore  bool\n\n\t// The following fields can only be accessed with graphLock held.\n\tgraphLockLastWrite lockfile.LastWrite\n\t// FIXME: This field is only set when holding graphLock, but locking rules of the driver\n\t// interface itself are not documented here. It is extensively used without holding graphLock.\n\tgraphDriver             drivers.Driver\n\tlayerStoreUseGetters    rwLayerStore   // Almost all users should use the provided accessors instead of accessing this field directly.\n\troLayerStoresUseGetters []roLayerStore // Almost all users should use the provided accessors instead of accessing this field directly.\n\n\t// FIXME: The following fields need locking, and don’t have it.\n\tadditionalUIDs *idSet // Set by getAvailableIDs()\n\tadditionalGIDs *idSet // Set by getAvailableIDs()\n}\n\n// GetStore attempts to find an already-created Store object matching the\n// specified location and graph driver, and if it can't, it creates and\n// initializes a new Store object, and the underlying storage that it controls.\n//\n// If StoreOptions `options` haven't been fully populated, then DefaultStoreOptions are used.\n//\n// These defaults observe environment variables:\n//   - `STORAGE_DRIVER` for the name of the storage driver to attempt to use\n//   - `STORAGE_OPTS` for the string of options to pass to the driver\n//\n// Note that we do some of this work in a child process.  The calling process's\n// main() function needs to import our pkg/reexec package and should begin with\n// something like this in order to allow us to properly start that child\n// process:\n//\n//\tif reexec.Init() {\n//\t    return\n//\t}\nfunc GetStore(options types.StoreOptions) (Store, error) {\n\tdefaultOpts, err := types.Options()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif options.RunRoot == \"\" && options.GraphRoot == \"\" && options.GraphDriverName == \"\" && len(options.GraphDriverOptions) == 0 {\n\t\toptions = defaultOpts\n\t}\n\n\tif options.GraphRoot != \"\" {\n\t\tdir, err := filepath.Abs(options.GraphRoot)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\toptions.GraphRoot = dir\n\t}\n\tif options.RunRoot != \"\" {\n\t\tdir, err := filepath.Abs(options.RunRoot)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\toptions.RunRoot = dir\n\t}\n\n\tstoresLock.Lock()\n\tdefer storesLock.Unlock()\n\n\t// return if BOTH run and graph root are matched, otherwise our run-root can be overridden if the graph is found first\n\tfor _, s := range stores {\n\t\tif (s.graphRoot == options.GraphRoot) && (s.runRoot == options.RunRoot) && (options.GraphDriverName == \"\" || s.graphDriverName == options.GraphDriverName) {\n\t\t\treturn s, nil\n\t\t}\n\t}\n\n\t// if passed a run-root or graph-root alone, the other should be defaulted only error if we have neither.\n\tswitch {\n\tcase options.RunRoot == \"\" && options.GraphRoot == \"\":\n\t\treturn nil, fmt.Errorf(\"no storage runroot or graphroot specified: %w\", ErrIncompleteOptions)\n\tcase options.GraphRoot == \"\":\n\t\toptions.GraphRoot = defaultOpts.GraphRoot\n\tcase options.RunRoot == \"\":\n\t\toptions.RunRoot = defaultOpts.RunRoot\n\t}\n\n\tif err := os.MkdirAll(options.RunRoot, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := os.MkdirAll(options.GraphRoot, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tif options.ImageStore != \"\" {\n\t\tif err := os.MkdirAll(options.ImageStore, 0o700); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif err := os.MkdirAll(filepath.Join(options.GraphRoot, options.GraphDriverName), 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tif options.ImageStore != \"\" {\n\t\tif err := os.MkdirAll(filepath.Join(options.ImageStore, options.GraphDriverName), 0o700); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tgraphLock, err := lockfile.GetLockFile(filepath.Join(options.GraphRoot, \"storage.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tusernsLock, err := lockfile.GetLockFile(filepath.Join(options.GraphRoot, \"userns.lock\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tautoNsMinSize := options.AutoNsMinSize\n\tautoNsMaxSize := options.AutoNsMaxSize\n\tif autoNsMinSize == 0 {\n\t\tautoNsMinSize = AutoUserNsMinSize\n\t}\n\tif autoNsMaxSize == 0 {\n\t\tautoNsMaxSize = AutoUserNsMaxSize\n\t}\n\ts := &store{\n\t\trunRoot:             options.RunRoot,\n\t\tgraphDriverName:     options.GraphDriverName,\n\t\tgraphDriverPriority: options.GraphDriverPriority,\n\t\tgraphLock:           graphLock,\n\t\tusernsLock:          usernsLock,\n\t\tgraphRoot:           options.GraphRoot,\n\t\tgraphOptions:        options.GraphDriverOptions,\n\t\timageStoreDir:       options.ImageStore,\n\t\tpullOptions:         options.PullOptions,\n\t\tuidMap:              copySlicePreferringNil(options.UIDMap),\n\t\tgidMap:              copySlicePreferringNil(options.GIDMap),\n\t\tautoUsernsUser:      options.RootAutoNsUser,\n\t\tautoNsMinSize:       autoNsMinSize,\n\t\tautoNsMaxSize:       autoNsMaxSize,\n\t\tdisableVolatile:     options.DisableVolatile,\n\t\ttransientStore:      options.TransientStore,\n\n\t\tadditionalUIDs: nil,\n\t\tadditionalGIDs: nil,\n\t}\n\tif err := s.load(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tstores = append(stores, s)\n\n\treturn s, nil\n}\n\nfunc (s *store) RunRoot() string {\n\treturn s.runRoot\n}\n\nfunc (s *store) GraphDriverName() string {\n\treturn s.graphDriverName\n}\n\nfunc (s *store) GraphRoot() string {\n\treturn s.graphRoot\n}\n\nfunc (s *store) ImageStore() string {\n\treturn s.imageStoreDir\n}\n\nfunc (s *store) TransientStore() bool {\n\treturn s.transientStore\n}\n\nfunc (s *store) GraphOptions() []string {\n\treturn s.graphOptions\n}\n\nfunc (s *store) PullOptions() map[string]string {\n\tcp := make(map[string]string, len(s.pullOptions))\n\tmaps.Copy(cp, s.pullOptions)\n\treturn cp\n}\n\nfunc (s *store) UIDMap() []idtools.IDMap {\n\treturn copySlicePreferringNil(s.uidMap)\n}\n\nfunc (s *store) GIDMap() []idtools.IDMap {\n\treturn copySlicePreferringNil(s.gidMap)\n}\n\n// This must only be called when constructing store; it writes to fields that are assumed to be constant after construction.\nfunc (s *store) load() error {\n\tvar driver drivers.Driver\n\tif err := func() error { // A scope for defer\n\t\ts.graphLock.Lock()\n\t\tdefer s.graphLock.Unlock()\n\t\tlastWrite, err := s.graphLock.GetLastWrite()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts.graphLockLastWrite = lastWrite\n\t\tdriver, err = s.createGraphDriverLocked()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts.graphDriver = driver\n\t\ts.graphDriverName = driver.String()\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn err\n\t}\n\tdriverPrefix := s.graphDriverName + \"-\"\n\n\timgStoreRoot := s.imageStoreDir\n\tif imgStoreRoot == \"\" {\n\t\timgStoreRoot = s.graphRoot\n\t}\n\tgipath := filepath.Join(imgStoreRoot, driverPrefix+\"images\")\n\tif err := os.MkdirAll(gipath, 0o700); err != nil {\n\t\treturn err\n\t}\n\timageStore, err := newImageStore(gipath)\n\tif err != nil {\n\t\treturn err\n\t}\n\ts.imageStore = imageStore\n\n\ts.rwImageStores = []rwImageStore{imageStore}\n\n\tgcpath := filepath.Join(s.graphRoot, driverPrefix+\"containers\")\n\tif err := os.MkdirAll(gcpath, 0o700); err != nil {\n\t\treturn err\n\t}\n\trcpath := filepath.Join(s.runRoot, driverPrefix+\"containers\")\n\tif err := os.MkdirAll(rcpath, 0o700); err != nil {\n\t\treturn err\n\t}\n\n\trcs, err := newContainerStore(gcpath, rcpath, s.transientStore)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.containerStore = rcs\n\n\tadditionalImageStores := s.graphDriver.AdditionalImageStores()\n\tif s.imageStoreDir != \"\" {\n\t\tadditionalImageStores = append([]string{s.graphRoot}, additionalImageStores...)\n\t}\n\n\tfor _, store := range additionalImageStores {\n\t\tgipath := filepath.Join(store, driverPrefix+\"images\")\n\t\tvar ris roImageStore\n\t\t// both the graphdriver and the imagestore must be used read-write.\n\t\tif store == s.imageStoreDir || store == s.graphRoot {\n\t\t\timageStore, err := newImageStore(gipath)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ts.rwImageStores = append(s.rwImageStores, imageStore)\n\t\t\tris = imageStore\n\t\t} else {\n\t\t\tris, err = newROImageStore(gipath)\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, syscall.EROFS) {\n\t\t\t\t\tlogrus.Debugf(\"Ignoring creation of lockfiles on read-only file systems %q, %v\", gipath, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\ts.roImageStores = append(s.roImageStores, ris)\n\t}\n\n\ts.digestLockRoot = filepath.Join(s.runRoot, driverPrefix+\"locks\")\n\tif err := os.MkdirAll(s.digestLockRoot, 0o700); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// GetDigestLock returns a digest-specific Locker.\nfunc (s *store) GetDigestLock(d digest.Digest) (Locker, error) {\n\treturn lockfile.GetLockFile(filepath.Join(s.digestLockRoot, d.String()))\n}\n\n// startUsingGraphDriver obtains s.graphLock and ensures that s.graphDriver is set and fresh.\n// It only intended to be used on a fully-constructed store.\n// If this succeeds, the caller MUST call stopUsingGraphDriver().\nfunc (s *store) startUsingGraphDriver() error {\n\ts.graphLock.Lock()\n\tsucceeded := false\n\tdefer func() {\n\t\tif !succeeded {\n\t\t\ts.graphLock.Unlock()\n\t\t}\n\t}()\n\n\tlastWrite, modified, err := s.graphLock.ModifiedSince(s.graphLockLastWrite)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif modified {\n\t\tdriver, err := s.createGraphDriverLocked()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Our concurrency design requires s.graphDriverName not to be modified after\n\t\t// store is constructed.\n\t\t// It’s fine for driver.String() not to match the requested graph driver name\n\t\t// (e.g. if the user asks for overlay2 and gets overlay), but it must be an idempotent\n\t\t// mapping:\n\t\t//\tdriver1 := drivers.New(userInput, config)\n\t\t//\tname1 := driver1.String()\n\t\t//\tname2 := drivers.New(name1, config).String()\n\t\t//\tassert(name1 == name2)\n\t\tif s.graphDriverName != driver.String() {\n\t\t\treturn fmt.Errorf(\"graph driver name changed from %q to %q during reload\",\n\t\t\t\ts.graphDriverName, driver.String())\n\t\t}\n\t\ts.graphDriver = driver\n\t\ts.layerStoreUseGetters = nil\n\t\ts.graphLockLastWrite = lastWrite\n\t}\n\n\tsucceeded = true\n\treturn nil\n}\n\n// stopUsingGraphDriver releases graphLock obtained by startUsingGraphDriver.\nfunc (s *store) stopUsingGraphDriver() {\n\ts.graphLock.Unlock()\n}\n\n// createGraphDriverLocked creates a new instance of graph driver for s, and returns it.\n// Almost all users should use startUsingGraphDriver instead.\n// The caller must hold s.graphLock.\nfunc (s *store) createGraphDriverLocked() (drivers.Driver, error) {\n\tconfig := drivers.Options{\n\t\tRoot:           s.graphRoot,\n\t\tImageStore:     s.imageStoreDir,\n\t\tRunRoot:        s.runRoot,\n\t\tDriverPriority: s.graphDriverPriority,\n\t\tDriverOptions:  s.graphOptions,\n\t}\n\treturn drivers.New(s.graphDriverName, config)\n}\n\nfunc (s *store) GraphDriver() (drivers.Driver, error) {\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\treturn s.graphDriver, nil\n}\n\n// getLayerStoreLocked obtains and returns a handle to the writeable layer store object\n// used by the Store.\n// It must be called with s.graphLock held.\nfunc (s *store) getLayerStoreLocked() (rwLayerStore, error) {\n\tif s.layerStoreUseGetters != nil {\n\t\treturn s.layerStoreUseGetters, nil\n\t}\n\tdriverPrefix := s.graphDriverName + \"-\"\n\trlpath := filepath.Join(s.runRoot, driverPrefix+\"layers\")\n\tif err := os.MkdirAll(rlpath, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tglpath := filepath.Join(s.graphRoot, driverPrefix+\"layers\")\n\tif err := os.MkdirAll(glpath, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\tilpath := \"\"\n\tif s.imageStoreDir != \"\" {\n\t\tilpath = filepath.Join(s.imageStoreDir, driverPrefix+\"layers\")\n\t}\n\trls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts.layerStoreUseGetters = rls\n\treturn s.layerStoreUseGetters, nil\n}\n\n// getLayerStore obtains and returns a handle to the writeable layer store object\n// used by the store.\n// It must be called WITHOUT s.graphLock held.\nfunc (s *store) getLayerStore() (rwLayerStore, error) {\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\treturn s.getLayerStoreLocked()\n}\n\n// getROLayerStoresLocked obtains additional read/only layer store objects used by the\n// Store.\n// It must be called with s.graphLock held.\nfunc (s *store) getROLayerStoresLocked() ([]roLayerStore, error) {\n\tif s.roLayerStoresUseGetters != nil {\n\t\treturn s.roLayerStoresUseGetters, nil\n\t}\n\tdriverPrefix := s.graphDriverName + \"-\"\n\trlpath := filepath.Join(s.runRoot, driverPrefix+\"layers\")\n\tif err := os.MkdirAll(rlpath, 0o700); err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, store := range s.graphDriver.AdditionalImageStores() {\n\t\tglpath := filepath.Join(store, driverPrefix+\"layers\")\n\n\t\trls, err := newROLayerStore(rlpath, glpath, s.graphDriver)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ts.roLayerStoresUseGetters = append(s.roLayerStoresUseGetters, rls)\n\t}\n\treturn s.roLayerStoresUseGetters, nil\n}\n\n// bothLayerStoreKindsLocked returns the primary, and additional read-only, layer store objects used by the store.\n// It must be called with s.graphLock held.\nfunc (s *store) bothLayerStoreKindsLocked() (rwLayerStore, []roLayerStore, error) {\n\tprimary, err := s.getLayerStoreLocked()\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"loading primary layer store data: %w\", err)\n\t}\n\tadditional, err := s.getROLayerStoresLocked()\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"loading additional layer stores: %w\", err)\n\t}\n\treturn primary, additional, nil\n}\n\n// bothLayerStoreKinds returns the primary, and additional read-only, layer store objects used by the store.\n// It must be called WITHOUT s.graphLock held.\nfunc (s *store) bothLayerStoreKinds() (rwLayerStore, []roLayerStore, error) {\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\treturn s.bothLayerStoreKindsLocked()\n}\n\n// allLayerStores returns a list of all layer store objects used by the Store.\n// This is a convenience method for read-only users of the Store.\n// It must be called with s.graphLock held.\nfunc (s *store) allLayerStoresLocked() ([]roLayerStore, error) {\n\tprimary, additional, err := s.bothLayerStoreKindsLocked()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn append([]roLayerStore{primary}, additional...), nil\n}\n\n// allLayerStores returns a list of all layer store objects used by the Store.\n// This is a convenience method for read-only users of the Store.\n// It must be called WITHOUT s.graphLock held.\nfunc (s *store) allLayerStores() ([]roLayerStore, error) {\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\treturn s.allLayerStoresLocked()\n}\n\n// readAllLayerStores processes allLayerStores() in order:\n// It locks the store for reading, checks for updates, and calls\n//\n//\t(data, done, err) := fn(store)\n//\n// until the callback returns done == true, and returns the data from the callback.\n//\n// If reading any layer store fails, it immediately returns ({}, true, err).\n//\n// If all layer stores are processed without setting done == true, it returns ({}, false, nil).\n//\n// Typical usage:\n//\n//\tif res, done, err := s.readAllLayerStores(store, func(…) {\n//\t\t…\n//\t}; done {\n//\t\treturn res, err\n//\t}\nfunc readAllLayerStores[T any](s *store, fn func(store roLayerStore) (T, bool, error)) (T, bool, error) {\n\tvar zeroRes T // A zero value of T\n\n\tlayerStores, err := s.allLayerStores()\n\tif err != nil {\n\t\treturn zeroRes, true, err\n\t}\n\tfor _, s := range layerStores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn zeroRes, true, err\n\t\t}\n\t\tdefer store.stopReading()\n\t\tif res, done, err := fn(store); done {\n\t\t\treturn res, true, err\n\t\t}\n\t}\n\treturn zeroRes, false, nil\n}\n\n// writeToLayerStore is a helper for working with store.getLayerStore():\n// It locks the store for writing, checks for updates, and calls fn()\n// It returns the return value of fn, or its own error initializing the store.\nfunc writeToLayerStore[T any](s *store, fn func(store rwLayerStore) (T, error)) (T, error) {\n\tvar zeroRes T // A zero value of T\n\n\tstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn zeroRes, err\n\t}\n\n\tif err := store.startWriting(); err != nil {\n\t\treturn zeroRes, err\n\t}\n\tdefer store.stopWriting()\n\treturn fn(store)\n}\n\n// readOrWriteAllLayerStores processes allLayerStores() in order:\n// It locks the writeable store for writing and all others for reading, checks\n// for updates, and calls\n//\n//\t(data, done, err) := fn(store)\n//\n// until the callback returns done == true, and returns the data from the callback.\n//\n// If reading or writing any layer store fails, it immediately returns ({}, true, err).\n//\n// If all layer stores are processed without setting done == true, it returns ({}, false, nil).\n//\n// Typical usage:\n//\n//\tif res, done, err := s.readOrWriteAllLayerStores(store, func(…) {\n//\t\t…\n//\t}; done {\n//\t\treturn res, err\n//\t}\nfunc readOrWriteAllLayerStores[T any](s *store, fn func(store roLayerStore) (T, bool, error)) (T, bool, error) {\n\tvar zeroRes T // A zero value of T\n\n\trwLayerStore, roLayerStores, err := s.bothLayerStoreKinds()\n\tif err != nil {\n\t\treturn zeroRes, true, err\n\t}\n\n\tif err := rwLayerStore.startWriting(); err != nil {\n\t\treturn zeroRes, true, err\n\t}\n\tdefer rwLayerStore.stopWriting()\n\tif res, done, err := fn(rwLayerStore); done {\n\t\treturn res, true, err\n\t}\n\n\tfor _, s := range roLayerStores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn zeroRes, true, err\n\t\t}\n\t\tdefer store.stopReading()\n\t\tif res, done, err := fn(store); done {\n\t\t\treturn res, true, err\n\t\t}\n\t}\n\treturn zeroRes, false, nil\n}\n\n// allImageStores returns a list of all image store objects used by the Store.\n// This is a convenience method for read-only users of the Store.\nfunc (s *store) allImageStores() []roImageStore {\n\treturn append([]roImageStore{s.imageStore}, s.roImageStores...)\n}\n\n// readAllImageStores processes allImageStores() in order:\n// It locks the store for reading, checks for updates, and calls\n//\n//\t(data, done, err) := fn(store)\n//\n// until the callback returns done == true, and returns the data from the callback.\n//\n// If reading any Image store fails, it immediately returns ({}, true, err).\n//\n// If all Image stores are processed without setting done == true, it returns ({}, false, nil).\n//\n// Typical usage:\n//\n//\tif res, done, err := readAllImageStores(store, func(…) {\n//\t\t…\n//\t}; done {\n//\t\treturn res, err\n//\t}\nfunc readAllImageStores[T any](s *store, fn func(store roImageStore) (T, bool, error)) (T, bool, error) {\n\tvar zeroRes T // A zero value of T\n\n\tfor _, s := range s.allImageStores() {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn zeroRes, true, err\n\t\t}\n\t\tdefer store.stopReading()\n\t\tif res, done, err := fn(store); done {\n\t\t\treturn res, true, err\n\t\t}\n\t}\n\treturn zeroRes, false, nil\n}\n\n// writeToImageStore is a convenience helper for working with store.imageStore:\n// It locks the store for writing, checks for updates, and calls fn(), which can then access store.imageStore.\n// It returns the return value of fn, or its own error initializing the store.\nfunc writeToImageStore[T any](s *store, fn func() (T, error)) (T, error) {\n\tif err := s.imageStore.startWriting(); err != nil {\n\t\tvar zeroRes T // A zero value of T\n\t\treturn zeroRes, err\n\t}\n\tdefer s.imageStore.stopWriting()\n\treturn fn()\n}\n\n// readContainerStore is a convenience helper for working with store.containerStore:\n// It locks the store for reading, checks for updates, and calls fn(), which can then access store.containerStore.\n// If reading the container store fails, it returns ({}, true, err).\n// Returns the return value of fn on success.\nfunc readContainerStore[T any](s *store, fn func() (T, bool, error)) (T, bool, error) {\n\tif err := s.containerStore.startReading(); err != nil {\n\t\tvar zeroRes T // A zero value of T\n\t\treturn zeroRes, true, err\n\t}\n\tdefer s.containerStore.stopReading()\n\treturn fn()\n}\n\n// writeToContainerStore is a convenience helper for working with store.containerStore:\n// It locks the store for writing, checks for updates, and calls fn(), which can then access store.containerStore.\n// It returns the return value of fn, or its own error initializing the store.\nfunc writeToContainerStore[T any](s *store, fn func() (T, error)) (T, error) {\n\tif err := s.containerStore.startWriting(); err != nil {\n\t\tvar zeroRes T // A zero value of T\n\t\treturn zeroRes, err\n\t}\n\tdefer s.containerStore.stopWriting()\n\treturn fn()\n}\n\n// writeToAllStores is a convenience helper for writing to all three stores:\n// It locks the stores for writing, checks for updates, and calls fn(), which can then access the provided layer store,\n// s.imageStore and s.containerStore.\n// It returns the return value of fn, or its own error initializing the stores.\nfunc (s *store) writeToAllStores(fn func(rlstore rwLayerStore) error) error {\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn err\n\t}\n\tdefer rlstore.stopWriting()\n\tif err := s.imageStore.startWriting(); err != nil {\n\t\treturn err\n\t}\n\tdefer s.imageStore.stopWriting()\n\tif err := s.containerStore.startWriting(); err != nil {\n\t\treturn err\n\t}\n\tdefer s.containerStore.stopWriting()\n\n\treturn fn(rlstore)\n}\n\n// canUseShifting returns true if we can use mount-time arguments (shifting) to\n// avoid having to create a mapped top layer for a base image when we want to\n// use it to create a container using ID mappings.\n// On entry:\n// - rlstore must be locked for writing\nfunc (s *store) canUseShifting(uidmap, gidmap []idtools.IDMap) bool {\n\treturn s.graphDriver.SupportsShifting(uidmap, gidmap)\n}\n\n// On entry:\n// - rlstore must be locked for reading or writing\n// - rlstores MUST NOT be locked\n// Returns an extra unlock function to unlock any potentially read locked rlstores by this function.\n// The unlock function is always set and thus must always be called.\nfunc getParentLayer(rlstore roLayerStore, rlstores []roLayerStore, parent string) (*Layer, func(), error) {\n\t// function we return to the caller so the caller gets the right stores locked and can unlock at the proper time themselves\n\tvar lockedLayerStores []roLayerStore\n\tunlock := func() {\n\t\tfor _, i := range lockedLayerStores {\n\t\t\ti.stopReading()\n\t\t}\n\t}\n\tfor _, l := range append([]roLayerStore{rlstore}, rlstores...) {\n\t\tlstore := l\n\t\tif lstore != rlstore {\n\t\t\tif err := lstore.startReading(); err != nil {\n\t\t\t\treturn nil, unlock, err\n\t\t\t}\n\t\t\tlockedLayerStores = append(lockedLayerStores, lstore)\n\t\t}\n\t\tif l, err := lstore.Get(parent); err == nil && l != nil {\n\t\t\treturn l, unlock, nil\n\t\t}\n\t}\n\n\treturn nil, unlock, ErrLayerUnknown\n}\n\n// On entry:\n// - rlstore must be locked for writing\n// - rlstores MUST NOT be locked\n//\n// Returns the new copied LayerOptions with mappings set, the parent Layer and\n// an extra unlock function to unlock any potentially read locked rlstores by this function.\n// The unlock function is always set and thus must always be called.\nfunc populateLayerOptions(s *store, rlstore rwLayerStore, rlstores []roLayerStore, parent string, lOptions *LayerOptions) (*LayerOptions, *Layer, func(), error) {\n\t// WARNING: Update also the freshLayer checks in store.PutLayer if adding more logic here.\n\tvar parentLayer *Layer\n\tvar options LayerOptions\n\t// make sure we always return a valid func instead of nil so the caller can call it without checking\n\tunlock := func() {}\n\tif lOptions != nil {\n\t\toptions = *lOptions\n\t\toptions.BigData = slices.Clone(lOptions.BigData)\n\t\toptions.Flags = copyMapPreferringNil(lOptions.Flags)\n\t}\n\tif options.HostUIDMapping {\n\t\toptions.UIDMap = nil\n\t}\n\tif options.HostGIDMapping {\n\t\toptions.GIDMap = nil\n\t}\n\tuidMap := options.UIDMap\n\tgidMap := options.GIDMap\n\tif parent != \"\" {\n\t\tvar err error\n\t\tparentLayer, unlock, err = getParentLayer(rlstore, rlstores, parent)\n\t\tif err != nil {\n\t\t\treturn nil, nil, unlock, err\n\t\t}\n\n\t\tif err := s.containerStore.startWriting(); err != nil {\n\t\t\treturn nil, nil, unlock, err\n\t\t}\n\t\tdefer s.containerStore.stopWriting()\n\t\tcontainers, err := s.containerStore.Containers()\n\t\tif err != nil {\n\t\t\treturn nil, nil, unlock, err\n\t\t}\n\t\tfor _, container := range containers {\n\t\t\tif container.LayerID == parent {\n\t\t\t\treturn nil, nil, unlock, ErrParentIsContainer\n\t\t\t}\n\t\t}\n\t\tif !options.HostUIDMapping && len(options.UIDMap) == 0 {\n\t\t\tuidMap = parentLayer.UIDMap\n\t\t}\n\t\tif !options.HostGIDMapping && len(options.GIDMap) == 0 {\n\t\t\tgidMap = parentLayer.GIDMap\n\t\t}\n\t} else {\n\t\tif !options.HostUIDMapping && len(options.UIDMap) == 0 {\n\t\t\tuidMap = s.uidMap\n\t\t}\n\t\tif !options.HostGIDMapping && len(options.GIDMap) == 0 {\n\t\t\tgidMap = s.gidMap\n\t\t}\n\t}\n\tif s.canUseShifting(uidMap, gidMap) {\n\t\toptions.IDMappingOptions = types.IDMappingOptions{HostUIDMapping: true, HostGIDMapping: true, UIDMap: nil, GIDMap: nil}\n\t} else {\n\t\toptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: options.HostUIDMapping,\n\t\t\tHostGIDMapping: options.HostGIDMapping,\n\t\t\tUIDMap:         copySlicePreferringNil(uidMap),\n\t\t\tGIDMap:         copySlicePreferringNil(gidMap),\n\t\t}\n\t}\n\treturn &options, parentLayer, unlock, nil\n}\n\nfunc (s *store) PutLayer(id, parent string, names []string, mountLabel string, writeable bool, lOptions *LayerOptions, diff io.Reader) (*Layer, int64, error) {\n\trlstore, rlstores, err := s.bothLayerStoreKinds()\n\tif err != nil {\n\t\treturn nil, -1, err\n\t}\n\n\tvar (\n\t\tcontents    *layerCreationContents\n\t\toptions     *LayerOptions\n\t\tparentLayer *Layer\n\t)\n\n\tif diff != nil {\n\t\tm := rlstore.newMaybeStagedLayerExtraction(diff)\n\t\tdefer func() {\n\t\t\tif err := m.cleanup(); err != nil {\n\t\t\t\tlogrus.Errorf(\"Error cleaning up temporary directories: %v\", err)\n\t\t\t}\n\t\t}()\n\t\t// driver can do unlocked staging so do that without holding the layer lock\n\t\t// Special case we only support it when no mount label is used. c/image doesn't set it for layers\n\t\t// and the overlay driver doesn't use it for extract today so it would be safe even when set but\n\t\t// that is not exactly obvious and if someone would implement the ApplyDiffStaging interface for\n\t\t// another driver that may be no longer true. So for now simply fall back to the locked extract path\n\t\t// to ensure we don't cause any weird issues here.\n\t\tif m.staging != nil && mountLabel == \"\" {\n\t\t\t// func so we have a scope for defer, we don't want to hold the lock for stageWithUnlockedStore()\n\t\t\tlayer, err := func() (*Layer, error) {\n\t\t\t\tif err := rlstore.startWriting(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer rlstore.stopWriting()\n\n\t\t\t\tif layer, err := rlstore.checkIdOrNameConflict(id, names); err != nil {\n\t\t\t\t\treturn layer, err\n\t\t\t\t}\n\n\t\t\t\tvar unlockLayerStores func()\n\t\t\t\toptions, parentLayer, unlockLayerStores, err = populateLayerOptions(s, rlstore, rlstores, parent, lOptions)\n\t\t\t\tunlockLayerStores()\n\t\t\t\treturn nil, err\n\t\t\t}()\n\t\t\tif err != nil {\n\t\t\t\treturn layer, -1, err\n\t\t\t}\n\n\t\t\t// make sure to use the resolved full ID if there is a parent\n\t\t\tif parentLayer != nil {\n\t\t\t\tparent = parentLayer.ID\n\t\t\t}\n\n\t\t\tif err := rlstore.stageWithUnlockedStore(m, parent, options); err != nil {\n\t\t\t\treturn nil, -1, err\n\t\t\t}\n\t\t}\n\n\t\tcontents = &layerCreationContents{\n\t\t\tstagedLayerExtraction: m,\n\t\t}\n\t}\n\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, -1, err\n\t}\n\tdefer rlstore.stopWriting()\n\n\tif options == nil {\n\t\tvar unlockLayerStores func()\n\t\toptions, parentLayer, unlockLayerStores, err = populateLayerOptions(s, rlstore, rlstores, parent, lOptions)\n\t\tdefer unlockLayerStores()\n\t\tif err != nil {\n\t\t\treturn nil, -1, err\n\t\t}\n\t} else if parent != \"\" {\n\t\t// We used the staged extraction without holding the lock.\n\t\t// Check again that the parent layer is still valid and exists.\n\t\tfreshLayer, unlockLayerStores, err := getParentLayer(rlstore, rlstores, parent)\n\t\tdefer unlockLayerStores()\n\t\tif err != nil {\n\t\t\treturn nil, -1, err\n\t\t}\n\t\t// In populateLayerOptions() we get the ID mappings in order to extract correctly, ensure the freshly\n\t\t// looked up parent Layer still has the same mappings to prevent silent UID/GID corruption.\n\t\tif !slices.Equal(freshLayer.UIDMap, parentLayer.UIDMap) || !slices.Equal(freshLayer.GIDMap, parentLayer.GIDMap) {\n\t\t\t// Fatal problem. Mappings changed so the parent must be considered different now.\n\t\t\t// Since we consumed the diff there is no we to recover, return error to caller. The caller would need to retry.\n\t\t\t// How likely is that and would need to return a special error so c/image could do the retries?\n\t\t\treturn nil, -1, fmt.Errorf(\"error during staged layer apply, parent layer %q changed id mappings while the content was extracted, must retry layer creation\", parent)\n\t\t}\n\t}\n\treturn rlstore.create(id, parentLayer, names, mountLabel, nil, options, writeable, contents)\n}\n\nfunc (s *store) CreateLayer(id, parent string, names []string, mountLabel string, writeable bool, options *LayerOptions) (*Layer, error) {\n\tlayer, _, err := s.PutLayer(id, parent, names, mountLabel, writeable, options, nil)\n\treturn layer, err\n}\n\nfunc (s *store) CreateImage(id string, names []string, layer, metadata string, iOptions *ImageOptions) (*Image, error) {\n\tif layer != \"\" {\n\t\tlayerStores, err := s.allLayerStores()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar ilayer *Layer\n\t\tfor _, s := range layerStores {\n\t\t\tstore := s\n\t\t\tif err := store.startReading(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdefer store.stopReading()\n\t\t\tilayer, err = store.Get(layer)\n\t\t\tif err == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif ilayer == nil {\n\t\t\treturn nil, ErrLayerUnknown\n\t\t}\n\t\tlayer = ilayer.ID\n\t}\n\n\treturn writeToImageStore(s, func() (*Image, error) {\n\t\tvar options ImageOptions\n\t\tvar namesToAddAfterCreating []string\n\n\t\t// Check if the ID refers to an image in a read-only store -- we want\n\t\t// to allow images in read-only stores to have their names changed, so\n\t\t// if we find one, merge the new values in with what we know about the\n\t\t// image that's already there.\n\t\tif id != \"\" {\n\t\t\tfor _, is := range s.roImageStores {\n\t\t\t\tstore := is\n\t\t\t\tif err := store.startReading(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer store.stopReading()\n\t\t\t\tif i, err := store.Get(id); err == nil {\n\t\t\t\t\t// set information about this image in \"options\"\n\t\t\t\t\toptions = ImageOptions{\n\t\t\t\t\t\tMetadata:     i.Metadata,\n\t\t\t\t\t\tCreationDate: i.Created,\n\t\t\t\t\t\tDigest:       i.Digest,\n\t\t\t\t\t\tDigests:      copySlicePreferringNil(i.Digests),\n\t\t\t\t\t\tNamesHistory: copySlicePreferringNil(i.NamesHistory),\n\t\t\t\t\t}\n\t\t\t\t\tfor _, key := range i.BigDataNames {\n\t\t\t\t\t\tdata, err := store.BigData(id, key)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdataDigest, err := store.BigDataDigest(id, key)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions.BigData = append(options.BigData, ImageBigDataOption{\n\t\t\t\t\t\t\tKey:    key,\n\t\t\t\t\t\t\tData:   data,\n\t\t\t\t\t\t\tDigest: dataDigest,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tnamesToAddAfterCreating = dedupeStrings(slices.Concat(i.Names, names))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// merge any passed-in options into \"options\" as best we can\n\t\tif iOptions != nil {\n\t\t\tif !iOptions.CreationDate.IsZero() {\n\t\t\t\toptions.CreationDate = iOptions.CreationDate\n\t\t\t}\n\t\t\tif iOptions.Digest != \"\" {\n\t\t\t\toptions.Digest = iOptions.Digest\n\t\t\t}\n\t\t\toptions.Digests = append(options.Digests, iOptions.Digests...)\n\t\t\tif iOptions.Metadata != \"\" {\n\t\t\t\toptions.Metadata = iOptions.Metadata\n\t\t\t}\n\t\t\toptions.BigData = append(options.BigData, copyImageBigDataOptionSlice(iOptions.BigData)...)\n\t\t\toptions.NamesHistory = append(options.NamesHistory, iOptions.NamesHistory...)\n\t\t\tif options.Flags == nil {\n\t\t\t\toptions.Flags = make(map[string]any)\n\t\t\t}\n\t\t\tmaps.Copy(options.Flags, iOptions.Flags)\n\t\t}\n\n\t\tif options.CreationDate.IsZero() {\n\t\t\toptions.CreationDate = time.Now().UTC()\n\t\t}\n\t\tif metadata != \"\" {\n\t\t\toptions.Metadata = metadata\n\t\t}\n\n\t\tres, err := s.imageStore.create(id, names, layer, options)\n\t\tif err == nil && len(namesToAddAfterCreating) > 0 {\n\t\t\t// set any names we pulled up from an additional image store, now that we won't be\n\t\t\t// triggering a duplicate names error\n\t\t\terr = s.imageStore.updateNames(res.ID, namesToAddAfterCreating, addNames)\n\t\t}\n\t\treturn res, err\n\t})\n}\n\n// imageTopLayerForMapping locates the layer that can take the place of the\n// image's top layer as the shared parent layer for a one or more containers\n// which are using ID mappings.\n// On entry:\n// - ristore must be locked EITHER for reading or writing\n// - s.imageStore must be locked for writing; it might be identical to ristore.\n// - rlstore must be locked for writing\n// - lstores must all be locked for reading\nfunc (s *store) imageTopLayerForMapping(image *Image, ristore roImageStore, rlstore rwLayerStore, lstores []roLayerStore, options types.IDMappingOptions) (*Layer, error) {\n\tlayerMatchesMappingOptions := func(layer *Layer, options types.IDMappingOptions) bool {\n\t\t// If the driver supports shifting and the layer has no mappings, we can use it.\n\t\tif s.canUseShifting(options.UIDMap, options.GIDMap) && len(layer.UIDMap) == 0 && len(layer.GIDMap) == 0 {\n\t\t\treturn true\n\t\t}\n\t\t// If we want host mapping, and the layer uses mappings, it's not the best match.\n\t\tif options.HostUIDMapping && len(layer.UIDMap) != 0 {\n\t\t\treturn false\n\t\t}\n\t\tif options.HostGIDMapping && len(layer.GIDMap) != 0 {\n\t\t\treturn false\n\t\t}\n\t\t// Compare the maps.\n\t\treturn reflect.DeepEqual(layer.UIDMap, options.UIDMap) && reflect.DeepEqual(layer.GIDMap, options.GIDMap)\n\t}\n\tvar layer, parentLayer *Layer\n\tallStores := append([]roLayerStore{rlstore}, lstores...)\n\t// Locate the image's top layer and its parent, if it has one.\n\tcreateMappedLayer := ristore == s.imageStore\n\tfor _, s := range allStores {\n\t\tstore := s\n\t\t// Walk the top layer list.\n\t\tfor _, candidate := range append([]string{image.TopLayer}, image.MappedTopLayers...) {\n\t\t\tif cLayer, err := store.Get(candidate); err == nil {\n\t\t\t\t// We want the layer's parent, too, if it has one.\n\t\t\t\tvar cParentLayer *Layer\n\t\t\t\tif cLayer.Parent != \"\" {\n\t\t\t\t\t// Its parent should be in one of the stores, somewhere.\n\t\t\t\t\tfor _, ps := range allStores {\n\t\t\t\t\t\tif cParentLayer, err = ps.Get(cLayer.Parent); err == nil {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif cParentLayer == nil {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the layer matches the desired mappings, it's a perfect match,\n\t\t\t\t// so we're actually done here.\n\t\t\t\tif layerMatchesMappingOptions(cLayer, options) {\n\t\t\t\t\treturn cLayer, nil\n\t\t\t\t}\n\t\t\t\t// Record the first one that we found, even if it's not ideal, so that\n\t\t\t\t// we have a starting point.\n\t\t\t\tif layer == nil {\n\t\t\t\t\tlayer = cLayer\n\t\t\t\t\tparentLayer = cParentLayer\n\t\t\t\t\tif store != rlstore {\n\t\t\t\t\t\t// The layer is in another store, so we cannot\n\t\t\t\t\t\t// create a mapped version of it to the image.\n\t\t\t\t\t\tcreateMappedLayer = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif layer == nil {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\t// The top layer's mappings don't match the ones we want, but it's in a read-only\n\t// image store, so we can't create and add a mapped copy of the layer to the image.\n\t// We'll have to do the mapping for the container itself, elsewhere.\n\tif !createMappedLayer {\n\t\treturn layer, nil\n\t}\n\t// The top layer's mappings don't match the ones we want, and it's in an image store\n\t// that lets us edit image metadata, so create a duplicate of the layer with the desired\n\t// mappings, and register it as an alternate top layer in the image.\n\tvar layerOptions LayerOptions\n\tif s.canUseShifting(options.UIDMap, options.GIDMap) {\n\t\tlayerOptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: true,\n\t\t\tHostGIDMapping: true,\n\t\t\tUIDMap:         nil,\n\t\t\tGIDMap:         nil,\n\t\t}\n\t} else {\n\t\tlayerOptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: options.HostUIDMapping,\n\t\t\tHostGIDMapping: options.HostGIDMapping,\n\t\t\tUIDMap:         copySlicePreferringNil(options.UIDMap),\n\t\t\tGIDMap:         copySlicePreferringNil(options.GIDMap),\n\t\t}\n\t}\n\tlayerOptions.TemplateLayer = layer.ID\n\tmappedLayer, _, err := rlstore.create(\"\", parentLayer, nil, layer.MountLabel, nil, &layerOptions, false, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating an ID-mapped copy of layer %q: %w\", layer.ID, err)\n\t}\n\t// By construction, createMappedLayer can only be true if ristore == s.imageStore.\n\tif err = s.imageStore.addMappedTopLayer(image.ID, mappedLayer.ID); err != nil {\n\t\tif err2 := rlstore.deleteWhileHoldingLock(mappedLayer.ID); err2 != nil {\n\t\t\terr = fmt.Errorf(\"deleting layer %q: %v: %w\", mappedLayer.ID, err2, err)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"registering ID-mapped layer with image %q: %w\", image.ID, err)\n\t}\n\treturn mappedLayer, nil\n}\n\nfunc (s *store) CreateContainer(id string, names []string, image, layer, metadata string, cOptions *ContainerOptions) (*Container, error) {\n\tvar options ContainerOptions\n\tif cOptions != nil {\n\t\toptions = *cOptions\n\t\toptions.IDMappingOptions.UIDMap = copySlicePreferringNil(cOptions.IDMappingOptions.UIDMap)\n\t\toptions.IDMappingOptions.GIDMap = copySlicePreferringNil(cOptions.IDMappingOptions.GIDMap)\n\t\toptions.LabelOpts = copySlicePreferringNil(cOptions.LabelOpts)\n\t\toptions.Flags = copyMapPreferringNil(cOptions.Flags)\n\t\toptions.MountOpts = copySlicePreferringNil(cOptions.MountOpts)\n\t\toptions.StorageOpt = copyMapPreferringNil(cOptions.StorageOpt)\n\t\toptions.BigData = copyContainerBigDataOptionSlice(cOptions.BigData)\n\t}\n\tif options.HostUIDMapping {\n\t\toptions.UIDMap = nil\n\t}\n\tif options.HostGIDMapping {\n\t\toptions.GIDMap = nil\n\t}\n\toptions.Metadata = metadata\n\trlstore, lstores, err := s.bothLayerStoreKinds() // lstores will be locked read-only if image != \"\"\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar imageTopLayer *Layer\n\timageID := \"\"\n\n\tif options.AutoUserNs || options.UIDMap != nil || options.GIDMap != nil {\n\t\t// Prevent multiple instances to retrieve the same range when AutoUserNs\n\t\t// are used.\n\t\t// It doesn't prevent containers that specify an explicit mapping to overlap\n\t\t// with AutoUserNs.\n\t\ts.usernsLock.Lock()\n\t\tdefer s.usernsLock.Unlock()\n\t}\n\n\tvar imageHomeStore roImageStore // Set if image != \"\"\n\t// s.imageStore is locked read-write, if image != \"\"\n\t// s.roImageStores are NOT NECESSARILY ALL locked read-only if image != \"\"\n\tvar cimage *Image // Set if image != \"\"\n\tif image != \"\" {\n\t\tif err := rlstore.startWriting(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer rlstore.stopWriting()\n\t\tfor _, s := range lstores {\n\t\t\tstore := s\n\t\t\tif err := store.startReading(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdefer store.stopReading()\n\t\t}\n\t\tif err := s.imageStore.startWriting(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer s.imageStore.stopWriting()\n\t\tcimage, err = s.imageStore.Get(image)\n\t\tif err == nil {\n\t\t\timageHomeStore = s.imageStore\n\t\t} else {\n\t\t\tfor _, s := range s.roImageStores {\n\t\t\t\tstore := s\n\t\t\t\tif err := store.startReading(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer store.stopReading()\n\t\t\t\tcimage, err = store.Get(image)\n\t\t\t\tif err == nil {\n\t\t\t\t\timageHomeStore = store\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif cimage == nil {\n\t\t\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", image, ErrImageUnknown)\n\t\t}\n\t\timageID = cimage.ID\n\t}\n\n\tif options.AutoUserNs {\n\t\tvar err error\n\t\toptions.UIDMap, options.GIDMap, err = s.getAutoUserNS(&options.AutoUserNsOpts, cimage, rlstore, lstores)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tuidMap := options.UIDMap\n\tgidMap := options.GIDMap\n\n\tidMappingsOptions := options.IDMappingOptions\n\tif image != \"\" {\n\t\tif cimage.TopLayer != \"\" {\n\t\t\tilayer, err := s.imageTopLayerForMapping(cimage, imageHomeStore, rlstore, lstores, idMappingsOptions)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\timageTopLayer = ilayer\n\n\t\t\tif !options.HostUIDMapping && len(options.UIDMap) == 0 {\n\t\t\t\tuidMap = ilayer.UIDMap\n\t\t\t}\n\t\t\tif !options.HostGIDMapping && len(options.GIDMap) == 0 {\n\t\t\t\tgidMap = ilayer.GIDMap\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif err := rlstore.startWriting(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer rlstore.stopWriting()\n\t\tif !options.HostUIDMapping && len(options.UIDMap) == 0 {\n\t\t\tuidMap = s.uidMap\n\t\t}\n\t\tif !options.HostGIDMapping && len(options.GIDMap) == 0 {\n\t\t\tgidMap = s.gidMap\n\t\t}\n\t}\n\tlayerOptions := &LayerOptions{\n\t\t// Normally layers for containers are volatile only if the container is.\n\t\t// But in transient store mode, all container layers are volatile.\n\t\tVolatile: options.Volatile || s.transientStore,\n\t}\n\tif s.canUseShifting(uidMap, gidMap) {\n\t\tlayerOptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: true,\n\t\t\tHostGIDMapping: true,\n\t\t\tUIDMap:         nil,\n\t\t\tGIDMap:         nil,\n\t\t}\n\t} else {\n\t\tlayerOptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: idMappingsOptions.HostUIDMapping,\n\t\t\tHostGIDMapping: idMappingsOptions.HostGIDMapping,\n\t\t\tUIDMap:         copySlicePreferringNil(uidMap),\n\t\t\tGIDMap:         copySlicePreferringNil(gidMap),\n\t\t}\n\t}\n\tif options.Flags == nil {\n\t\toptions.Flags = make(map[string]any)\n\t}\n\tplabel, _ := options.Flags[processLabelFlag].(string)\n\tmlabel, _ := options.Flags[mountLabelFlag].(string)\n\tif (plabel == \"\" && mlabel != \"\") || (plabel != \"\" && mlabel == \"\") {\n\t\treturn nil, errors.New(\"ProcessLabel and Mountlabel must either not be specified or both specified\")\n\t}\n\n\tif plabel == \"\" {\n\t\tprocessLabel, mountLabel, err := label.InitLabels(options.LabelOpts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmlabel = mountLabel\n\t\toptions.Flags[processLabelFlag] = processLabel\n\t\toptions.Flags[mountLabelFlag] = mountLabel\n\t}\n\n\tclayer, _, err := rlstore.create(layer, imageTopLayer, nil, mlabel, options.StorageOpt, layerOptions, true, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlayer = clayer.ID\n\n\t// Normally only `--rm` containers are volatile, but in transient store mode all containers are volatile\n\tif s.transientStore {\n\t\toptions.Volatile = true\n\t}\n\n\treturn writeToContainerStore(s, func() (*Container, error) {\n\t\toptions.IDMappingOptions = types.IDMappingOptions{\n\t\t\tHostUIDMapping: len(options.UIDMap) == 0,\n\t\t\tHostGIDMapping: len(options.GIDMap) == 0,\n\t\t\tUIDMap:         copySlicePreferringNil(options.UIDMap),\n\t\t\tGIDMap:         copySlicePreferringNil(options.GIDMap),\n\t\t}\n\t\tcontainer, err := s.containerStore.create(id, names, imageID, layer, &options)\n\t\tif err != nil || container == nil {\n\t\t\tif err2 := rlstore.deleteWhileHoldingLock(layer); err2 != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = fmt.Errorf(\"deleting layer %#v: %w\", layer, err2)\n\t\t\t\t} else {\n\t\t\t\t\tlogrus.Errorf(\"While recovering from a failure to create a container, error deleting layer %#v: %v\", layer, err2)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn container, err\n\t})\n}\n\nfunc (s *store) SetMetadata(id, metadata string) error {\n\treturn s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\tif rlstore.Exists(id) {\n\t\t\treturn rlstore.SetMetadata(id, metadata)\n\t\t}\n\t\tif s.imageStore.Exists(id) {\n\t\t\treturn s.imageStore.SetMetadata(id, metadata)\n\t\t}\n\t\tif s.containerStore.Exists(id) {\n\t\t\treturn s.containerStore.SetMetadata(id, metadata)\n\t\t}\n\t\treturn ErrNotAnID\n\t})\n}\n\nfunc (s *store) Metadata(id string) (string, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (string, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\tres, err := store.Metadata(id)\n\t\t\treturn res, true, err\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (string, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\tres, err := store.Metadata(id)\n\t\t\treturn res, true, err\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readContainerStore(s, func() (string, bool, error) {\n\t\tif s.containerStore.Exists(id) {\n\t\t\tres, err := s.containerStore.Metadata(id)\n\t\t\treturn res, true, err\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\treturn \"\", ErrNotAnID\n}\n\nfunc (s *store) ListImageBigData(id string) ([]string, error) {\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) ([]string, bool, error) {\n\t\tbigDataNames, err := store.BigDataNames(id)\n\t\tif err == nil {\n\t\t\treturn bigDataNames, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\nfunc (s *store) ImageBigDataSize(id, key string) (int64, error) {\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (int64, bool, error) {\n\t\tsize, err := store.BigDataSize(id, key)\n\t\tif err == nil {\n\t\t\treturn size, true, nil\n\t\t}\n\t\treturn -1, false, nil\n\t}); done {\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\treturn res, nil\n\t}\n\treturn -1, ErrSizeUnknown\n}\n\nfunc (s *store) ImageBigDataDigest(id, key string) (digest.Digest, error) {\n\tif res, done, err := readAllImageStores(s, func(ristore roImageStore) (digest.Digest, bool, error) {\n\t\td, err := ristore.BigDataDigest(id, key)\n\t\tif err == nil && d.Validate() == nil {\n\t\t\treturn d, true, nil\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\treturn \"\", ErrDigestUnknown\n}\n\nfunc (s *store) ImageBigData(id, key string) ([]byte, error) {\n\tfoundImage := false\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) ([]byte, bool, error) {\n\t\tdata, err := store.BigData(id, key)\n\t\tif err == nil {\n\t\t\treturn data, true, nil\n\t\t}\n\t\tif store.Exists(id) {\n\t\t\tfoundImage = true\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\tif foundImage {\n\t\treturn nil, fmt.Errorf(\"locating item named %q for image with ID %q (consider removing the image to resolve the issue): %w\", key, id, os.ErrNotExist)\n\t}\n\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\n// ListLayerBigData retrieves a list of the (possibly large) chunks of\n// named data associated with an layer.\nfunc (s *store) ListLayerBigData(id string) ([]string, error) {\n\tfoundLayer := false\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) ([]string, bool, error) {\n\t\tdata, err := store.BigDataNames(id)\n\t\tif err == nil {\n\t\t\treturn data, true, nil\n\t\t}\n\t\tif store.Exists(id) {\n\t\t\tfoundLayer = true\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\tif foundLayer {\n\t\treturn nil, fmt.Errorf(\"locating big data for layer with ID %q: %w\", id, os.ErrNotExist)\n\t}\n\treturn nil, fmt.Errorf(\"locating layer with ID %q: %w\", id, ErrLayerUnknown)\n}\n\n// LayerBigData retrieves a (possibly large) chunk of named data\n// associated with a layer.\nfunc (s *store) LayerBigData(id, key string) (io.ReadCloser, error) {\n\tfoundLayer := false\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (io.ReadCloser, bool, error) {\n\t\tdata, err := store.BigData(id, key)\n\t\tif err == nil {\n\t\t\treturn data, true, nil\n\t\t}\n\t\tif store.Exists(id) {\n\t\t\tfoundLayer = true\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\tif foundLayer {\n\t\treturn nil, fmt.Errorf(\"locating item named %q for layer with ID %q: %w\", key, id, os.ErrNotExist)\n\t}\n\treturn nil, fmt.Errorf(\"locating layer with ID %q: %w\", id, ErrLayerUnknown)\n}\n\n// SetLayerBigData stores a (possibly large) chunk of named data\n// associated with a layer.\nfunc (s *store) SetLayerBigData(id, key string, data io.Reader) error {\n\t_, err := writeToLayerStore(s, func(store rwLayerStore) (struct{}, error) {\n\t\treturn struct{}{}, store.SetBigData(id, key, data)\n\t})\n\treturn err\n}\n\nfunc (s *store) SetImageBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error {\n\t_, err := writeToImageStore(s, func() (struct{}, error) {\n\t\treturn struct{}{}, s.imageStore.SetBigData(id, key, data, digestManifest)\n\t})\n\treturn err\n}\n\nfunc (s *store) ImageSize(id string) (int64, error) {\n\tlayerStores, err := s.allLayerStores()\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tfor _, s := range layerStores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer store.stopReading()\n\t}\n\n\t// Look for the image's record.\n\tvar imageStore roBigDataStore\n\tvar image *Image\n\tfor _, s := range s.allImageStores() {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer store.stopReading()\n\t\tif image, err = store.Get(id); err == nil {\n\t\t\timageStore = store\n\t\t\tbreak\n\t\t}\n\t}\n\tif image == nil {\n\t\treturn -1, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\n\t// Start with a list of the image's top layers, if it has any.\n\tqueue := make(map[string]struct{})\n\tfor _, layerID := range append([]string{image.TopLayer}, image.MappedTopLayers...) {\n\t\tif layerID != \"\" {\n\t\t\tqueue[layerID] = struct{}{}\n\t\t}\n\t}\n\tvisited := make(map[string]struct{})\n\t// Walk all of the layers.\n\tvar size int64\n\tfor len(visited) < len(queue) {\n\t\tfor layerID := range queue {\n\t\t\t// Visit each layer only once.\n\t\t\tif _, ok := visited[layerID]; ok {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvisited[layerID] = struct{}{}\n\t\t\t// Look for the layer and the store that knows about it.\n\t\t\tvar layerStore roLayerStore\n\t\t\tvar layer *Layer\n\t\t\tfor _, store := range layerStores {\n\t\t\t\tif layer, err = store.Get(layerID); err == nil {\n\t\t\t\t\tlayerStore = store\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif layer == nil {\n\t\t\t\treturn -1, fmt.Errorf(\"locating layer with ID %q: %w\", layerID, ErrLayerUnknown)\n\t\t\t}\n\t\t\t// The UncompressedSize is only valid if there's a digest to go with it.\n\t\t\tn := layer.UncompressedSize\n\t\t\tif layer.UncompressedDigest == \"\" || n == -1 {\n\t\t\t\t// Compute the size.\n\t\t\t\tn, err = layerStore.DiffSize(\"\", layer.ID)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn -1, fmt.Errorf(\"size/digest of layer with ID %q could not be calculated: %w\", layerID, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Count this layer.\n\t\t\tsize += n\n\t\t\t// Make a note to visit the layer's parent if we haven't already.\n\t\t\tif layer.Parent != \"\" {\n\t\t\t\tqueue[layer.Parent] = struct{}{}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Count big data items.\n\tnames, err := imageStore.BigDataNames(id)\n\tif err != nil {\n\t\treturn -1, fmt.Errorf(\"reading list of big data items for image %q: %w\", id, err)\n\t}\n\tfor _, name := range names {\n\t\tn, err := imageStore.BigDataSize(id, name)\n\t\tif err != nil {\n\t\t\treturn -1, fmt.Errorf(\"reading size of big data item %q for image %q: %w\", name, id, err)\n\t\t}\n\t\tsize += n\n\t}\n\n\treturn size, nil\n}\n\nfunc (s *store) ContainerSize(id string) (int64, error) {\n\tlayerStores, err := s.allLayerStores()\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tfor _, s := range layerStores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tdefer store.stopReading()\n\t}\n\n\t// Get the location of the container directory and container run directory.\n\t// Do it before we lock the container store because they do, too.\n\tcdir, err := s.ContainerDirectory(id)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\trdir, err := s.ContainerRunDirectory(id)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn writeToContainerStore(s, func() (int64, error) { // Yes, s.containerStore.BigDataSize requires a write lock.\n\t\t// Read the container record.\n\t\tcontainer, err := s.containerStore.Get(id)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\n\t\t// Read the container's layer's size.\n\t\tvar layer *Layer\n\t\tvar size int64\n\t\tfor _, store := range layerStores {\n\t\t\tif layer, err = store.Get(container.LayerID); err == nil {\n\t\t\t\tsize, err = store.DiffSize(\"\", layer.ID)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn -1, fmt.Errorf(\"determining size of layer with ID %q: %w\", layer.ID, err)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif layer == nil {\n\t\t\treturn -1, fmt.Errorf(\"locating layer with ID %q: %w\", container.LayerID, ErrLayerUnknown)\n\t\t}\n\n\t\t// Count big data items.\n\t\tnames, err := s.containerStore.BigDataNames(id)\n\t\tif err != nil {\n\t\t\treturn -1, fmt.Errorf(\"reading list of big data items for container %q: %w\", container.ID, err)\n\t\t}\n\t\tfor _, name := range names {\n\t\t\tn, err := s.containerStore.BigDataSize(id, name)\n\t\t\tif err != nil {\n\t\t\t\treturn -1, fmt.Errorf(\"reading size of big data item %q for container %q: %w\", name, id, err)\n\t\t\t}\n\t\t\tsize += n\n\t\t}\n\n\t\t// Count the size of our container directory and container run directory.\n\t\tn, err := directory.Size(cdir)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tsize += n\n\t\tn, err = directory.Size(rdir)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\tsize += n\n\n\t\treturn size, nil\n\t})\n}\n\nfunc (s *store) ListContainerBigData(id string) ([]string, error) {\n\tres, _, err := readContainerStore(s, func() ([]string, bool, error) {\n\t\tres, err := s.containerStore.BigDataNames(id)\n\t\treturn res, true, err\n\t})\n\treturn res, err\n}\n\nfunc (s *store) ContainerBigDataSize(id, key string) (int64, error) {\n\treturn writeToContainerStore(s, func() (int64, error) { // Yes, BigDataSize requires a write lock.\n\t\treturn s.containerStore.BigDataSize(id, key)\n\t})\n}\n\nfunc (s *store) ContainerBigDataDigest(id, key string) (digest.Digest, error) {\n\treturn writeToContainerStore(s, func() (digest.Digest, error) { // Yes, BigDataDigest requires a write lock.\n\t\treturn s.containerStore.BigDataDigest(id, key)\n\t})\n}\n\nfunc (s *store) ContainerBigData(id, key string) ([]byte, error) {\n\tres, _, err := readContainerStore(s, func() ([]byte, bool, error) {\n\t\tres, err := s.containerStore.BigData(id, key)\n\t\treturn res, true, err\n\t})\n\treturn res, err\n}\n\nfunc (s *store) SetContainerBigData(id, key string, data []byte) error {\n\t_, err := writeToContainerStore(s, func() (struct{}, error) {\n\t\treturn struct{}{}, s.containerStore.SetBigData(id, key, data)\n\t})\n\treturn err\n}\n\nfunc (s *store) Exists(id string) bool {\n\tfound, _, err := readAllLayerStores(s, func(store roLayerStore) (bool, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\treturn true, true, nil\n\t\t}\n\t\treturn false, false, nil\n\t})\n\tif err != nil {\n\t\treturn false\n\t}\n\tif found {\n\t\treturn true\n\t}\n\n\tfound, _, err = readAllImageStores(s, func(store roImageStore) (bool, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\treturn true, true, nil\n\t\t}\n\t\treturn false, false, nil\n\t})\n\tif err != nil {\n\t\treturn false\n\t}\n\tif found {\n\t\treturn true\n\t}\n\n\tfound, _, err = readContainerStore(s, func() (bool, bool, error) {\n\t\treturn s.containerStore.Exists(id), true, nil\n\t})\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn found\n}\n\nfunc dedupeStrings(names []string) []string {\n\tseen := make(map[string]struct{})\n\tdeduped := make([]string, 0, len(names))\n\tfor _, name := range names {\n\t\tif _, wasSeen := seen[name]; !wasSeen {\n\t\t\tseen[name] = struct{}{}\n\t\t\tdeduped = append(deduped, name)\n\t\t}\n\t}\n\treturn deduped\n}\n\nfunc dedupeDigests(digests []digest.Digest) []digest.Digest {\n\tseen := make(map[digest.Digest]struct{})\n\tdeduped := make([]digest.Digest, 0, len(digests))\n\tfor _, d := range digests {\n\t\tif _, wasSeen := seen[d]; !wasSeen {\n\t\t\tseen[d] = struct{}{}\n\t\t\tdeduped = append(deduped, d)\n\t\t}\n\t}\n\treturn deduped\n}\n\n// Deprecated: Prone to race conditions, suggested alternatives are `AddNames` and `RemoveNames`.\nfunc (s *store) SetNames(id string, names []string) error {\n\treturn s.updateNames(id, names, setNames)\n}\n\nfunc (s *store) AddNames(id string, names []string) error {\n\treturn s.updateNames(id, names, addNames)\n}\n\nfunc (s *store) RemoveNames(id string, names []string) error {\n\treturn s.updateNames(id, names, removeNames)\n}\n\nfunc (s *store) updateNames(id string, names []string, op updateNameOperation) error {\n\tdeduped := dedupeStrings(names)\n\n\tif found, err := writeToLayerStore(s, func(rlstore rwLayerStore) (bool, error) {\n\t\tif !rlstore.Exists(id) {\n\t\t\treturn false, nil\n\t\t}\n\t\treturn true, rlstore.updateNames(id, deduped, op)\n\t}); err != nil || found {\n\t\treturn err\n\t}\n\n\tif err := s.imageStore.startWriting(); err != nil {\n\t\treturn err\n\t}\n\tdefer s.imageStore.stopWriting()\n\tif s.imageStore.Exists(id) {\n\t\treturn s.imageStore.updateNames(id, deduped, op)\n\t}\n\n\t// Check if the id refers to a read-only image store -- we want to allow images in\n\t// read-only stores to have their names changed.\n\tfor _, is := range s.roImageStores {\n\t\tstore := is\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer store.stopReading()\n\t\tif i, err := store.Get(id); err == nil {\n\t\t\t// \"pull up\" the image so that we can change its names list\n\t\t\toptions := ImageOptions{\n\t\t\t\tCreationDate: i.Created,\n\t\t\t\tDigest:       i.Digest,\n\t\t\t\tDigests:      copySlicePreferringNil(i.Digests),\n\t\t\t\tMetadata:     i.Metadata,\n\t\t\t\tNamesHistory: copySlicePreferringNil(i.NamesHistory),\n\t\t\t\tFlags:        copyMapPreferringNil(i.Flags),\n\t\t\t}\n\t\t\tfor _, key := range i.BigDataNames {\n\t\t\t\tdata, err := store.BigData(id, key)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tdataDigest, err := store.BigDataDigest(id, key)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\toptions.BigData = append(options.BigData, ImageBigDataOption{\n\t\t\t\t\tKey:    key,\n\t\t\t\t\tData:   data,\n\t\t\t\t\tDigest: dataDigest,\n\t\t\t\t})\n\t\t\t}\n\t\t\t_, err = s.imageStore.create(id, i.Names, i.TopLayer, options)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// now make the changes to the writeable image record's names list\n\t\t\treturn s.imageStore.updateNames(id, deduped, op)\n\t\t}\n\t}\n\n\tif found, err := writeToContainerStore(s, func() (bool, error) {\n\t\tif !s.containerStore.Exists(id) {\n\t\t\treturn false, nil\n\t\t}\n\t\treturn true, s.containerStore.updateNames(id, deduped, op)\n\t}); err != nil || found {\n\t\treturn err\n\t}\n\n\treturn ErrLayerUnknown\n}\n\nfunc (s *store) Names(id string) ([]string, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) ([]string, bool, error) {\n\t\tif l, err := store.Get(id); l != nil && err == nil {\n\t\t\treturn l.Names, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) ([]string, bool, error) {\n\t\tif i, err := store.Get(id); i != nil && err == nil {\n\t\t\treturn i.Names, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readContainerStore(s, func() ([]string, bool, error) {\n\t\tif c, err := s.containerStore.Get(id); c != nil && err == nil {\n\t\t\treturn c.Names, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\treturn nil, ErrLayerUnknown\n}\n\nfunc (s *store) Lookup(name string) (string, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (string, bool, error) {\n\t\tif l, err := store.Get(name); l != nil && err == nil {\n\t\t\treturn l.ID, true, nil\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (string, bool, error) {\n\t\tif i, err := store.Get(name); i != nil && err == nil {\n\t\t\treturn i.ID, true, nil\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\tif res, done, err := readContainerStore(s, func() (string, bool, error) {\n\t\tif c, err := s.containerStore.Get(name); c != nil && err == nil {\n\t\t\treturn c.ID, true, nil\n\t\t}\n\t\treturn \"\", false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\n\treturn \"\", ErrLayerUnknown\n}\n\nfunc (s *store) DeleteLayer(id string) (retErr error) {\n\tcleanupFunctions := []tempdir.CleanupTempDirFunc{}\n\tdefer func() {\n\t\tif cleanupErr := tempdir.CleanupTemporaryDirectories(cleanupFunctions...); cleanupErr != nil {\n\t\t\tretErr = errors.Join(cleanupErr, retErr)\n\t\t}\n\t}()\n\treturn s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\tif rlstore.Exists(id) {\n\t\t\tif l, err := rlstore.Get(id); err != nil {\n\t\t\t\tid = l.ID\n\t\t\t}\n\t\t\tlayers, err := rlstore.Layers()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfor _, layer := range layers {\n\t\t\t\tif layer.Parent == id {\n\t\t\t\t\treturn fmt.Errorf(\"used by layer %v: %w\", layer.ID, ErrLayerHasChildren)\n\t\t\t\t}\n\t\t\t}\n\t\t\timages, err := s.imageStore.Images()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tfor _, image := range images {\n\t\t\t\tif image.TopLayer == id {\n\t\t\t\t\treturn fmt.Errorf(\"layer %v used by image %v: %w\", id, image.ID, ErrLayerUsedByImage)\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontainers, err := s.containerStore.Containers()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfor _, container := range containers {\n\t\t\t\tif container.LayerID == id {\n\t\t\t\t\treturn fmt.Errorf(\"layer %v used by container %v: %w\", id, container.ID, ErrLayerUsedByContainer)\n\t\t\t\t}\n\t\t\t}\n\t\t\tcf, err := rlstore.deferredDelete(id)\n\t\t\tcleanupFunctions = append(cleanupFunctions, cf...)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"delete layer %v: %w\", id, err)\n\t\t\t}\n\n\t\t\tfor _, image := range images {\n\t\t\t\tif stringutils.InSlice(image.MappedTopLayers, id) {\n\t\t\t\t\tif err = s.imageStore.removeMappedTopLayer(image.ID, id); err != nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"remove mapped top layer %v from image %v: %w\", id, image.ID, err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\treturn ErrNotALayer\n\t})\n}\n\nfunc (s *store) DeleteImage(id string, commit bool) (layers []string, retErr error) {\n\tlayersToRemove := []string{}\n\tcleanupFunctions := []tempdir.CleanupTempDirFunc{}\n\tdefer func() {\n\t\tif cleanupErr := tempdir.CleanupTemporaryDirectories(cleanupFunctions...); cleanupErr != nil {\n\t\t\tretErr = errors.Join(cleanupErr, retErr)\n\t\t}\n\t}()\n\tif err := s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\t// Delete image from all available imagestores configured to be used.\n\t\timageFound := false\n\t\tfor _, is := range s.rwImageStores {\n\t\t\tif is != s.imageStore {\n\t\t\t\t// This is an additional writeable image store\n\t\t\t\t// so we must perform lock\n\t\t\t\tif err := is.startWriting(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tdefer is.stopWriting()\n\t\t\t}\n\t\t\tif !is.Exists(id) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\timageFound = true\n\t\t\timage, err := is.Get(id)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tid = image.ID\n\t\t\tcontainers, err := s.containerStore.Containers()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\taContainerByImage := make(map[string]string)\n\t\t\tfor _, container := range containers {\n\t\t\t\taContainerByImage[container.ImageID] = container.ID\n\t\t\t}\n\t\t\tif container, ok := aContainerByImage[id]; ok {\n\t\t\t\treturn fmt.Errorf(\"image used by %v: %w\", container, ErrImageUsedByContainer)\n\t\t\t}\n\t\t\timages, err := is.Images()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tlayers, err := rlstore.Layers()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tchildrenByParent := make(map[string][]string)\n\t\t\tfor _, layer := range layers {\n\t\t\t\tchildrenByParent[layer.Parent] = append(childrenByParent[layer.Parent], layer.ID)\n\t\t\t}\n\t\t\totherImagesTopLayers := make(map[string]struct{})\n\t\t\tfor _, img := range images {\n\t\t\t\tif img.ID != id {\n\t\t\t\t\totherImagesTopLayers[img.TopLayer] = struct{}{}\n\t\t\t\t\tfor _, layerID := range img.MappedTopLayers {\n\t\t\t\t\t\totherImagesTopLayers[layerID] = struct{}{}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif commit {\n\t\t\t\tif err = is.Delete(id); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\tlayer := image.TopLayer\n\t\t\tlayersToRemoveMap := make(map[string]struct{})\n\t\t\tlayersToRemove = append(layersToRemove, image.MappedTopLayers...)\n\t\t\tfor _, mappedTopLayer := range image.MappedTopLayers {\n\t\t\t\tlayersToRemoveMap[mappedTopLayer] = struct{}{}\n\t\t\t}\n\t\t\tfor layer != \"\" {\n\t\t\t\tif s.containerStore.Exists(layer) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif _, used := otherImagesTopLayers[layer]; used {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tparent := \"\"\n\t\t\t\tif l, err := rlstore.Get(layer); err == nil {\n\t\t\t\t\tparent = l.Parent\n\t\t\t\t}\n\t\t\t\thasChildrenNotBeingRemoved := func() bool {\n\t\t\t\t\tlayersToCheck := []string{layer}\n\t\t\t\t\tif layer == image.TopLayer {\n\t\t\t\t\t\tlayersToCheck = append(layersToCheck, image.MappedTopLayers...)\n\t\t\t\t\t}\n\t\t\t\t\tfor _, layer := range layersToCheck {\n\t\t\t\t\t\tif childList := childrenByParent[layer]; len(childList) > 0 {\n\t\t\t\t\t\t\tfor _, child := range childList {\n\t\t\t\t\t\t\t\tif _, childIsSlatedForRemoval := layersToRemoveMap[child]; childIsSlatedForRemoval {\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif hasChildrenNotBeingRemoved() {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tlayersToRemove = append(layersToRemove, layer)\n\t\t\t\tlayersToRemoveMap[layer] = struct{}{}\n\t\t\t\tlayer = parent\n\t\t\t}\n\t\t}\n\t\tif !imageFound {\n\t\t\treturn ErrNotAnImage\n\t\t}\n\t\tif commit {\n\t\t\tfor _, layer := range layersToRemove {\n\t\t\t\tcf, err := rlstore.deferredDelete(layer)\n\t\t\t\tcleanupFunctions = append(cleanupFunctions, cf...)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\treturn layersToRemove, nil\n}\n\nfunc (s *store) DeleteContainer(id string) (retErr error) {\n\tcleanupFunctions := []tempdir.CleanupTempDirFunc{}\n\tdefer func() {\n\t\tif cleanupErr := tempdir.CleanupTemporaryDirectories(cleanupFunctions...); cleanupErr != nil {\n\t\t\tretErr = errors.Join(cleanupErr, retErr)\n\t\t}\n\t}()\n\treturn s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\tif !s.containerStore.Exists(id) {\n\t\t\treturn ErrNotAContainer\n\t\t}\n\n\t\tcontainer, err := s.containerStore.Get(id)\n\t\tif err != nil {\n\t\t\treturn ErrNotAContainer\n\t\t}\n\n\t\t// delete the layer first, separately, so that if we get an\n\t\t// error while trying to do so, we don't go ahead and delete\n\t\t// the container record that refers to it, effectively losing\n\t\t// track of it\n\t\tif rlstore.Exists(container.LayerID) {\n\t\t\tcf, err := rlstore.deferredDelete(container.LayerID)\n\t\t\tcleanupFunctions = append(cleanupFunctions, cf...)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tvar wg errgroup.Group\n\n\t\tmiddleDir := s.graphDriverName + \"-containers\"\n\n\t\twg.Go(func() error {\n\t\t\tgcpath := filepath.Join(s.GraphRoot(), middleDir, container.ID)\n\t\t\treturn system.EnsureRemoveAll(gcpath)\n\t\t})\n\n\t\twg.Go(func() error {\n\t\t\trcpath := filepath.Join(s.RunRoot(), middleDir, container.ID)\n\t\t\treturn system.EnsureRemoveAll(rcpath)\n\t\t})\n\n\t\tif multierr := wg.Wait(); multierr != nil {\n\t\t\treturn multierr\n\t\t}\n\t\treturn s.containerStore.Delete(id)\n\t})\n}\n\nfunc (s *store) Delete(id string) (retErr error) {\n\tcleanupFunctions := []tempdir.CleanupTempDirFunc{}\n\tdefer func() {\n\t\tif cleanupErr := tempdir.CleanupTemporaryDirectories(cleanupFunctions...); cleanupErr != nil {\n\t\t\tretErr = errors.Join(cleanupErr, retErr)\n\t\t}\n\t}()\n\treturn s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\tif s.containerStore.Exists(id) {\n\t\t\tif container, err := s.containerStore.Get(id); err == nil {\n\t\t\t\tif rlstore.Exists(container.LayerID) {\n\t\t\t\t\tcf, err := rlstore.deferredDelete(container.LayerID)\n\t\t\t\t\tcleanupFunctions = append(cleanupFunctions, cf...)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tif err = s.containerStore.Delete(id); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tmiddleDir := s.graphDriverName + \"-containers\"\n\t\t\t\t\tgcpath := filepath.Join(s.GraphRoot(), middleDir, container.ID, \"userdata\")\n\t\t\t\t\tif err = os.RemoveAll(gcpath); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\trcpath := filepath.Join(s.RunRoot(), middleDir, container.ID, \"userdata\")\n\t\t\t\t\tif err = os.RemoveAll(rcpath); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\treturn ErrNotALayer\n\t\t\t}\n\t\t}\n\t\tif s.imageStore.Exists(id) {\n\t\t\treturn s.imageStore.Delete(id)\n\t\t}\n\t\tif rlstore.Exists(id) {\n\t\t\tcf, err := rlstore.deferredDelete(id)\n\t\t\tcleanupFunctions = append(cleanupFunctions, cf...)\n\t\t\treturn err\n\t\t}\n\t\treturn ErrLayerUnknown\n\t})\n}\n\nfunc (s *store) Wipe() error {\n\treturn s.writeToAllStores(func(rlstore rwLayerStore) error {\n\t\tif err := s.containerStore.Wipe(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := s.imageStore.Wipe(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn rlstore.Wipe()\n\t})\n}\n\nfunc (s *store) Status() ([][2]string, error) {\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn rlstore.Status()\n}\n\n//go:embed VERSION\nvar storageVersion string\n\nfunc (s *store) Version() ([][2]string, error) {\n\tif trimmedVersion := strings.TrimSpace(storageVersion); trimmedVersion != \"\" {\n\t\treturn [][2]string{{\"Version\", trimmedVersion}}, nil\n\t}\n\treturn [][2]string{}, nil\n}\n\nfunc (s *store) MountImage(id string, mountOpts []string, mountLabel string) (string, error) {\n\tif err := validateMountOptions(mountOpts); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// We need to make sure the home mount is present when the Mount is done, which happens by possibly reinitializing the graph driver\n\t// in startUsingGraphDriver().\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\n\trlstore, lstores, err := s.bothLayerStoreKindsLocked()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar imageHomeStore roImageStore\n\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer rlstore.stopWriting()\n\tfor _, s := range lstores {\n\t\tif err := s.startReading(); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tdefer s.stopReading()\n\t}\n\tif err := s.imageStore.startWriting(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer s.imageStore.stopWriting()\n\n\tcimage, err := s.imageStore.Get(id)\n\tif err == nil {\n\t\timageHomeStore = s.imageStore\n\t} else {\n\t\tfor _, s := range s.roImageStores {\n\t\t\tif err := s.startReading(); err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tdefer s.stopReading()\n\t\t\tcimage, err = s.Get(id)\n\t\t\tif err == nil {\n\t\t\t\timageHomeStore = s\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif cimage == nil {\n\t\treturn \"\", fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n\t}\n\n\tidmappingsOpts := types.IDMappingOptions{\n\t\tHostUIDMapping: true,\n\t\tHostGIDMapping: true,\n\t}\n\tilayer, err := s.imageTopLayerForMapping(cimage, imageHomeStore, rlstore, lstores, idmappingsOpts)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif len(ilayer.UIDMap) > 0 || len(ilayer.GIDMap) > 0 {\n\t\treturn \"\", fmt.Errorf(\"cannot create an image with canonical UID/GID mappings in a read-only store\")\n\t}\n\n\toptions := drivers.MountOpts{\n\t\tMountLabel: mountLabel,\n\t\tOptions:    append(mountOpts, \"ro\"),\n\t}\n\treturn rlstore.Mount(ilayer.ID, options)\n}\n\nfunc (s *store) Mount(id, mountLabel string) (string, error) {\n\toptions := drivers.MountOpts{\n\t\tMountLabel: mountLabel,\n\t}\n\t// check if `id` is a container, then grab the LayerID, uidmap and gidmap, along with\n\t// otherwise we assume the id is a LayerID and attempt to mount it.\n\tif container, err := s.Container(id); err == nil {\n\t\tid = container.LayerID\n\t\toptions.UidMaps = container.UIDMap\n\t\toptions.GidMaps = container.GIDMap\n\t\toptions.Options = container.MountOpts()\n\t\tif !s.disableVolatile {\n\t\t\tif v, found := container.Flags[volatileFlag]; found {\n\t\t\t\tif b, ok := v.(bool); ok {\n\t\t\t\t\toptions.Volatile = b\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// We need to make sure the home mount is present when the Mount is done, which happens by possibly reinitializing the graph driver\n\t// in startUsingGraphDriver().\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\n\trlstore, lstores, err := s.bothLayerStoreKindsLocked()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif options.UidMaps != nil || options.GidMaps != nil {\n\t\toptions.DisableShifting = !s.canUseShifting(options.UidMaps, options.GidMaps)\n\t}\n\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer rlstore.stopWriting()\n\tif rlstore.Exists(id) {\n\t\treturn rlstore.Mount(id, options)\n\t}\n\n\t// check if the layer is in a read-only store, and return a better error message\n\tfor _, store := range lstores {\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\texists := store.Exists(id)\n\t\tstore.stopReading()\n\t\tif exists {\n\t\t\treturn \"\", fmt.Errorf(\"mounting read/only store images is not allowed: %w\", ErrStoreIsReadOnly)\n\t\t}\n\t}\n\n\treturn \"\", ErrLayerUnknown\n}\n\nfunc (s *store) Mounted(id string) (int, error) {\n\tif layerID, err := s.ContainerLayerID(id); err == nil {\n\t\tid = layerID\n\t}\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif err := rlstore.startReading(); err != nil {\n\t\treturn 0, err\n\t}\n\tdefer rlstore.stopReading()\n\n\treturn rlstore.Mounted(id)\n}\n\nfunc (s *store) UnmountImage(id string, force bool) (bool, error) {\n\timg, err := s.Image(id)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\treturn writeToLayerStore(s, func(lstore rwLayerStore) (bool, error) {\n\t\tfor _, layerID := range img.MappedTopLayers {\n\t\t\tl, err := lstore.Get(layerID)\n\t\t\tif err != nil {\n\t\t\t\tif err == ErrLayerUnknown {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\t// check if the layer with the canonical mapping is in the mapped top layers\n\t\t\tif len(l.UIDMap) == 0 && len(l.GIDMap) == 0 {\n\t\t\t\treturn lstore.unmount(l.ID, force, false)\n\t\t\t}\n\t\t}\n\t\treturn lstore.unmount(img.TopLayer, force, false)\n\t})\n}\n\nfunc (s *store) Unmount(id string, force bool) (bool, error) {\n\tif layerID, err := s.ContainerLayerID(id); err == nil {\n\t\tid = layerID\n\t}\n\treturn writeToLayerStore(s, func(rlstore rwLayerStore) (bool, error) {\n\t\tif rlstore.Exists(id) {\n\t\t\treturn rlstore.unmount(id, force, false)\n\t\t}\n\t\treturn false, ErrLayerUnknown\n\t})\n}\n\nfunc (s *store) Changes(from, to string) ([]archive.Change, error) {\n\t// NaiveDiff could cause mounts to happen without a lock, so be safe\n\t// and treat the .Diff operation as a Mount.\n\t// We need to make sure the home mount is present when the Mount is done, which happens by possibly reinitializing the graph driver\n\t// in startUsingGraphDriver().\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\n\trlstore, lstores, err := s.bothLayerStoreKindsLocked()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// While the general rules require the layer store to only be locked RO (apart from known LOCKING BUGs)\n\t// the overlay driver requires the primary layer store to be locked RW; see\n\t// drivers/overlay.Driver.getMergedDir.\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, err\n\t}\n\tif rlstore.Exists(to) {\n\t\tres, err := rlstore.Changes(from, to)\n\t\trlstore.stopWriting()\n\t\treturn res, err\n\t}\n\trlstore.stopWriting()\n\n\tfor _, s := range lstores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif store.Exists(to) {\n\t\t\tres, err := store.Changes(from, to)\n\t\t\tstore.stopReading()\n\t\t\treturn res, err\n\t\t}\n\t\tstore.stopReading()\n\t}\n\treturn nil, ErrLayerUnknown\n}\n\nfunc (s *store) DiffSize(from, to string) (int64, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (int64, bool, error) {\n\t\tif store.Exists(to) {\n\t\t\tres, err := store.DiffSize(from, to)\n\t\t\treturn res, true, err\n\t\t}\n\t\treturn -1, false, nil\n\t}); done {\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\treturn res, nil\n\t}\n\treturn -1, ErrLayerUnknown\n}\n\nfunc (s *store) Diff(from, to string, options *DiffOptions) (io.ReadCloser, error) {\n\t// NaiveDiff could cause mounts to happen without a lock, so be safe\n\t// and treat the .Diff operation as a Mount.\n\t// We need to make sure the home mount is present when the Mount is done, which happens by possibly reinitializing the graph driver\n\t// in startUsingGraphDriver().\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\n\trlstore, lstores, err := s.bothLayerStoreKindsLocked()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// While the general rules require the layer store to only be locked RO (apart from known LOCKING BUGs)\n\t// the overlay driver requires the primary layer store to be locked RW; see\n\t// drivers/overlay.Driver.getMergedDir.\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, err\n\t}\n\tif rlstore.Exists(to) {\n\t\trc, err := rlstore.Diff(from, to, options)\n\t\tif rc != nil && err == nil {\n\t\t\twrapped := ioutils.NewReadCloserWrapper(rc, func() error {\n\t\t\t\terr := rc.Close()\n\t\t\t\trlstore.stopWriting()\n\t\t\t\treturn err\n\t\t\t})\n\t\t\treturn wrapped, nil\n\t\t}\n\t\trlstore.stopWriting()\n\t\treturn rc, err\n\t}\n\trlstore.stopWriting()\n\n\tfor _, s := range lstores {\n\t\tstore := s\n\t\tif err := store.startReading(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif store.Exists(to) {\n\t\t\trc, err := store.Diff(from, to, options)\n\t\t\tif rc != nil && err == nil {\n\t\t\t\twrapped := ioutils.NewReadCloserWrapper(rc, func() error {\n\t\t\t\t\terr := rc.Close()\n\t\t\t\t\tstore.stopReading()\n\t\t\t\t\treturn err\n\t\t\t\t})\n\t\t\t\treturn wrapped, nil\n\t\t\t}\n\t\t\tstore.stopReading()\n\t\t\treturn rc, err\n\t\t}\n\t\tstore.stopReading()\n\t}\n\treturn nil, ErrLayerUnknown\n}\n\nfunc (s *store) ApplyStagedLayer(args ApplyStagedLayerOptions) (*Layer, error) {\n\tdefer func() {\n\t\tif args.DiffOutput.TarSplit != nil {\n\t\t\targs.DiffOutput.TarSplit.Close()\n\t\t\targs.DiffOutput.TarSplit = nil\n\t\t}\n\t}()\n\trlstore, rlstores, err := s.bothLayerStoreKinds()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rlstore.stopWriting()\n\n\tlayer, err := rlstore.Get(args.ID)\n\tif err != nil && !errors.Is(err, ErrLayerUnknown) {\n\t\treturn layer, err\n\t}\n\tif err == nil {\n\t\t// This code path exists only for cmd/containers/storage.applyDiffUsingStagingDirectory; we have tests that\n\t\t// assume layer creation and applying a staged layer are separate steps. Production pull code always uses the\n\t\t// other path, where layer creation is atomic.\n\t\treturn layer, rlstore.applyDiffFromStagingDirectory(args.ID, args.DiffOutput, args.DiffOptions)\n\t}\n\n\t// if the layer doesn't exist yet, try to create it.\n\n\tcontents := layerCreationContents{\n\t\tDiffOutput:  args.DiffOutput,\n\t\tDiffOptions: args.DiffOptions,\n\t}\n\toptions, parentLayer, unlockLayerStores, err := populateLayerOptions(s, rlstore, rlstores, args.ParentLayer, args.LayerOptions)\n\tdefer unlockLayerStores()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlayer, _, err = rlstore.create(args.ID, parentLayer, args.Names, args.MountLabel, nil, options, args.Writeable, &contents)\n\treturn layer, err\n}\n\nfunc (s *store) CleanupStagedLayer(diffOutput *drivers.DriverWithDifferOutput) error {\n\tif diffOutput.TarSplit != nil {\n\t\tdiffOutput.TarSplit.Close()\n\t\tdiffOutput.TarSplit = nil\n\t}\n\t_, err := writeToLayerStore(s, func(rlstore rwLayerStore) (struct{}, error) {\n\t\treturn struct{}{}, rlstore.CleanupStagingDirectory(diffOutput.Target)\n\t})\n\treturn err\n}\n\nfunc (s *store) PrepareStagedLayer(options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error) {\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn rlstore.applyDiffWithDifferNoLock(options, differ)\n}\n\nfunc (s *store) DifferTarget(id string) (string, error) {\n\treturn writeToLayerStore(s, func(rlstore rwLayerStore) (string, error) {\n\t\tif rlstore.Exists(id) {\n\t\t\treturn rlstore.DifferTarget(id)\n\t\t}\n\t\treturn \"\", ErrLayerUnknown\n\t})\n}\n\nfunc (s *store) ApplyDiff(to string, diff io.Reader) (int64, error) {\n\treturn writeToLayerStore(s, func(rlstore rwLayerStore) (int64, error) {\n\t\tif rlstore.Exists(to) {\n\t\t\treturn rlstore.ApplyDiff(to, diff)\n\t\t}\n\t\treturn -1, ErrLayerUnknown\n\t})\n}\n\nfunc (s *store) layersByMappedDigest(m func(roLayerStore, digest.Digest) ([]Layer, error), d digest.Digest) ([]Layer, error) {\n\tvar layers []Layer\n\tif _, _, err := readAllLayerStores(s, func(store roLayerStore) (struct{}, bool, error) {\n\t\tstoreLayers, err := m(store, d)\n\t\tif err != nil {\n\t\t\tif !errors.Is(err, ErrLayerUnknown) {\n\t\t\t\treturn struct{}{}, true, err\n\t\t\t}\n\t\t\treturn struct{}{}, false, nil\n\t\t}\n\t\tlayers = append(layers, storeLayers...)\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\tif len(layers) == 0 {\n\t\treturn nil, ErrLayerUnknown\n\t}\n\treturn layers, nil\n}\n\nfunc (s *store) LayersByCompressedDigest(d digest.Digest) ([]Layer, error) {\n\tif err := d.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"looking for compressed layers matching digest %q: %w\", d, err)\n\t}\n\treturn s.layersByMappedDigest(func(r roLayerStore, d digest.Digest) ([]Layer, error) { return r.LayersByCompressedDigest(d) }, d)\n}\n\nfunc (s *store) LayersByUncompressedDigest(d digest.Digest) ([]Layer, error) {\n\tif err := d.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"looking for layers matching digest %q: %w\", d, err)\n\t}\n\treturn s.layersByMappedDigest(func(r roLayerStore, d digest.Digest) ([]Layer, error) { return r.LayersByUncompressedDigest(d) }, d)\n}\n\nfunc (s *store) LayersByTOCDigest(d digest.Digest) ([]Layer, error) {\n\tif err := d.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"looking for TOC matching digest %q: %w\", d, err)\n\t}\n\treturn s.layersByMappedDigest(func(r roLayerStore, d digest.Digest) ([]Layer, error) { return r.LayersByTOCDigest(d) }, d)\n}\n\nfunc (s *store) LayerSize(id string) (int64, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (int64, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\tres, err := store.Size(id)\n\t\t\treturn res, true, err\n\t\t}\n\t\treturn -1, false, nil\n\t}); done {\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t\treturn res, nil\n\t}\n\treturn -1, ErrLayerUnknown\n}\n\nfunc (s *store) LayerParentOwners(id string) ([]int, []int, error) {\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif err := rlstore.startReading(); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer rlstore.stopReading()\n\tif rlstore.Exists(id) {\n\t\treturn rlstore.ParentOwners(id)\n\t}\n\treturn nil, nil, ErrLayerUnknown\n}\n\nfunc (s *store) ContainerParentOwners(id string) ([]int, []int, error) {\n\trlstore, err := s.getLayerStore()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif err := rlstore.startReading(); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer rlstore.stopReading()\n\tif err := s.containerStore.startReading(); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tdefer s.containerStore.stopReading()\n\tcontainer, err := s.containerStore.Get(id)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif rlstore.Exists(container.LayerID) {\n\t\treturn rlstore.ParentOwners(container.LayerID)\n\t}\n\treturn nil, nil, ErrLayerUnknown\n}\n\nfunc (s *store) Layers() ([]Layer, error) {\n\tvar layers []Layer\n\tif _, done, err := readAllLayerStores(s, func(store roLayerStore) (struct{}, bool, error) {\n\t\tstoreLayers, err := store.Layers()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tlayers = append(layers, storeLayers...)\n\t\treturn struct{}{}, false, nil\n\t}); done {\n\t\treturn nil, err\n\t}\n\treturn layers, nil\n}\n\nfunc (s *store) Images() ([]Image, error) {\n\tvar images []Image\n\tif _, _, err := readAllImageStores(s, func(store roImageStore) (struct{}, bool, error) {\n\t\tstoreImages, err := store.Images()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\timages = append(images, storeImages...)\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\treturn images, nil\n}\n\nfunc (s *store) Containers() ([]Container, error) {\n\tres, _, err := readContainerStore(s, func() ([]Container, bool, error) {\n\t\tres, err := s.containerStore.Containers()\n\t\treturn res, true, err\n\t})\n\treturn res, err\n}\n\nfunc (s *store) Layer(id string) (*Layer, error) {\n\tif res, done, err := readAllLayerStores(s, func(store roLayerStore) (*Layer, bool, error) {\n\t\tlayer, err := store.Get(id)\n\t\tif err == nil {\n\t\t\treturn layer, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\treturn nil, ErrLayerUnknown\n}\n\nfunc (s *store) LookupAdditionalLayer(tocDigest digest.Digest, imageref string) (AdditionalLayer, error) {\n\tvar adriver drivers.AdditionalLayerStoreDriver\n\tif err := func() error { // A scope for defer\n\t\tif err := s.startUsingGraphDriver(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer s.stopUsingGraphDriver()\n\t\ta, ok := s.graphDriver.(drivers.AdditionalLayerStoreDriver)\n\t\tif !ok {\n\t\t\treturn ErrLayerUnknown\n\t\t}\n\t\tadriver = a\n\t\treturn nil\n\t}(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tal, err := adriver.LookupAdditionalLayer(tocDigest, imageref)\n\tif err != nil {\n\t\tif errors.Is(err, drivers.ErrLayerUnknown) {\n\t\t\treturn nil, ErrLayerUnknown\n\t\t}\n\t\treturn nil, err\n\t}\n\tinfo, err := al.Info()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer info.Close()\n\tvar layer Layer\n\tif err := json.NewDecoder(info).Decode(&layer); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &additionalLayer{&layer, al, s}, nil\n}\n\ntype additionalLayer struct {\n\tlayer   *Layer\n\thandler drivers.AdditionalLayer\n\ts       *store\n}\n\nfunc (al *additionalLayer) TOCDigest() digest.Digest {\n\treturn al.layer.TOCDigest\n}\n\nfunc (al *additionalLayer) CompressedSize() int64 {\n\treturn al.layer.CompressedSize\n}\n\nfunc (al *additionalLayer) PutAs(id, parent string, names []string) (*Layer, error) {\n\trlstore, rlstores, err := al.s.bothLayerStoreKinds()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rlstore.stopWriting()\n\n\tvar parentLayer *Layer\n\tif parent != \"\" {\n\t\tfor _, lstore := range append([]roLayerStore{rlstore}, rlstores...) {\n\t\t\tif lstore != rlstore {\n\t\t\t\tif err := lstore.startReading(); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer lstore.stopReading()\n\t\t\t}\n\t\t\tparentLayer, err = lstore.Get(parent)\n\t\t\tif err == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif parentLayer == nil {\n\t\t\treturn nil, ErrLayerUnknown\n\t\t}\n\t}\n\n\treturn rlstore.PutAdditionalLayer(id, parentLayer, names, al.handler)\n}\n\nfunc (al *additionalLayer) Release() {\n\tal.handler.Release()\n}\n\nfunc (s *store) Image(id string) (*Image, error) {\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (*Image, bool, error) {\n\t\timage, err := store.Get(id)\n\t\tif err == nil {\n\t\t\tif store != s.imageStore {\n\t\t\t\t// found it in a read-only store - readAllImageStores() still has the writeable store locked for reading\n\t\t\t\tif _, localErr := s.imageStore.Get(image.ID); localErr == nil {\n\t\t\t\t\t// if the lookup key was a name, and we found the image in a read-only\n\t\t\t\t\t// store, but we have an entry with the same ID in the read-write store,\n\t\t\t\t\t// then the name was removed when we duplicated the image's\n\t\t\t\t\t// record into writable storage, so we should ignore this entry\n\t\t\t\t\treturn nil, false, nil\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn image, true, nil\n\t\t}\n\t\treturn nil, false, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\treturn nil, fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\nfunc (s *store) ImagesByTopLayer(id string) ([]*Image, error) {\n\tlayer, err := s.Layer(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\timages := []*Image{}\n\tif _, _, err := readAllImageStores(s, func(store roImageStore) (struct{}, bool, error) {\n\t\timageList, err := store.Images()\n\t\tif err != nil {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\tfor _, image := range imageList {\n\t\t\tif image.TopLayer == layer.ID || stringutils.InSlice(image.MappedTopLayers, layer.ID) {\n\t\t\t\timages = append(images, &image)\n\t\t\t}\n\t\t}\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\treturn images, nil\n}\n\nfunc (s *store) ImagesByDigest(d digest.Digest) ([]*Image, error) {\n\timages := []*Image{}\n\tif _, _, err := readAllImageStores(s, func(store roImageStore) (struct{}, bool, error) {\n\t\timageList, err := store.ByDigest(d)\n\t\tif err != nil && !errors.Is(err, ErrImageUnknown) {\n\t\t\treturn struct{}{}, true, err\n\t\t}\n\t\timages = append(images, imageList...)\n\t\treturn struct{}{}, false, nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\treturn images, nil\n}\n\nfunc (s *store) Container(id string) (*Container, error) {\n\tres, _, err := readContainerStore(s, func() (*Container, bool, error) {\n\t\tres, err := s.containerStore.Get(id)\n\t\treturn res, true, err\n\t})\n\treturn res, err\n}\n\nfunc (s *store) ContainerLayerID(id string) (string, error) {\n\tcontainer, _, err := readContainerStore(s, func() (*Container, bool, error) {\n\t\tres, err := s.containerStore.Get(id)\n\t\treturn res, true, err\n\t})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn container.LayerID, nil\n}\n\nfunc (s *store) ContainerByLayer(id string) (*Container, error) {\n\tlayer, err := s.Layer(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcontainerList, _, err := readContainerStore(s, func() ([]Container, bool, error) {\n\t\tres, err := s.containerStore.Containers()\n\t\treturn res, true, err\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, container := range containerList {\n\t\tif container.LayerID == layer.ID {\n\t\t\treturn &container, nil\n\t\t}\n\t}\n\n\treturn nil, ErrContainerUnknown\n}\n\nfunc (s *store) ImageDirectory(id string) (string, error) {\n\tfoundImage := false\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (string, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\tfoundImage = true\n\t\t}\n\t\tmiddleDir := s.graphDriverName + \"-images\"\n\t\tgipath := filepath.Join(s.GraphRoot(), middleDir, id, \"userdata\")\n\t\tif err := os.MkdirAll(gipath, 0o700); err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\t\treturn gipath, true, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\tif foundImage {\n\t\treturn \"\", fmt.Errorf(\"locating image with ID %q (consider removing the image to resolve the issue): %w\", id, os.ErrNotExist)\n\t}\n\treturn \"\", fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\nfunc (s *store) ContainerDirectory(id string) (string, error) {\n\tres, _, err := readContainerStore(s, func() (string, bool, error) {\n\t\tid, err := s.containerStore.Lookup(id)\n\t\tif err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\n\t\tmiddleDir := s.graphDriverName + \"-containers\"\n\t\tgcpath := filepath.Join(s.GraphRoot(), middleDir, id, \"userdata\")\n\t\tif err := os.MkdirAll(gcpath, 0o700); err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\t\treturn gcpath, true, nil\n\t})\n\treturn res, err\n}\n\nfunc (s *store) ImageRunDirectory(id string) (string, error) {\n\tfoundImage := false\n\tif res, done, err := readAllImageStores(s, func(store roImageStore) (string, bool, error) {\n\t\tif store.Exists(id) {\n\t\t\tfoundImage = true\n\t\t}\n\n\t\tmiddleDir := s.graphDriverName + \"-images\"\n\t\trcpath := filepath.Join(s.RunRoot(), middleDir, id, \"userdata\")\n\t\tif err := os.MkdirAll(rcpath, 0o700); err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\t\treturn rcpath, true, nil\n\t}); done {\n\t\treturn res, err\n\t}\n\tif foundImage {\n\t\treturn \"\", fmt.Errorf(\"locating image with ID %q (consider removing the image to resolve the issue): %w\", id, os.ErrNotExist)\n\t}\n\treturn \"\", fmt.Errorf(\"locating image with ID %q: %w\", id, ErrImageUnknown)\n}\n\nfunc (s *store) ContainerRunDirectory(id string) (string, error) {\n\tres, _, err := readContainerStore(s, func() (string, bool, error) {\n\t\tid, err := s.containerStore.Lookup(id)\n\t\tif err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\n\t\tmiddleDir := s.graphDriverName + \"-containers\"\n\t\trcpath := filepath.Join(s.RunRoot(), middleDir, id, \"userdata\")\n\t\tif err := os.MkdirAll(rcpath, 0o700); err != nil {\n\t\t\treturn \"\", true, err\n\t\t}\n\t\treturn rcpath, true, nil\n\t})\n\treturn res, err\n}\n\nfunc (s *store) SetContainerDirectoryFile(id, file string, data []byte) error {\n\tdir, err := s.ContainerDirectory(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(filepath.Dir(filepath.Join(dir, file)), 0o700)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn ioutils.AtomicWriteFile(filepath.Join(dir, file), data, 0o600)\n}\n\nfunc (s *store) FromContainerDirectory(id, file string) ([]byte, error) {\n\tdir, err := s.ContainerDirectory(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn os.ReadFile(filepath.Join(dir, file))\n}\n\nfunc (s *store) SetContainerRunDirectoryFile(id, file string, data []byte) error {\n\tdir, err := s.ContainerRunDirectory(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(filepath.Dir(filepath.Join(dir, file)), 0o700)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn ioutils.AtomicWriteFile(filepath.Join(dir, file), data, 0o600)\n}\n\nfunc (s *store) FromContainerRunDirectory(id, file string) ([]byte, error) {\n\tdir, err := s.ContainerRunDirectory(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn os.ReadFile(filepath.Join(dir, file))\n}\n\nfunc (s *store) Shutdown(force bool) ([]string, error) {\n\tmounted := []string{}\n\n\tif err := s.startUsingGraphDriver(); err != nil {\n\t\treturn mounted, err\n\t}\n\tdefer s.stopUsingGraphDriver()\n\n\trlstore, err := s.getLayerStoreLocked()\n\tif err != nil {\n\t\treturn mounted, err\n\t}\n\tif err := rlstore.startWriting(); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rlstore.stopWriting()\n\n\tlayers, err := rlstore.Layers()\n\tif err != nil {\n\t\treturn mounted, err\n\t}\n\tfor _, layer := range layers {\n\t\tif layer.MountCount == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tmounted = append(mounted, layer.ID)\n\t\tif force {\n\t\t\tfor {\n\t\t\t\t_, err2 := rlstore.unmount(layer.ID, force, true)\n\t\t\t\tif err2 == ErrLayerNotMounted {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif err2 != nil {\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\terr = err2\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif len(mounted) > 0 && err == nil {\n\t\terr = fmt.Errorf(\"a layer is mounted: %w\", ErrLayerUsedByContainer)\n\t}\n\tif err == nil {\n\t\t// We don’t retain the lastWrite value, and treat this update as if someone else did the .Cleanup(),\n\t\t// so that we reload after a .Shutdown() the same way other processes would.\n\t\t// Shutdown() is basically an error path, so reliability is more important than performance.\n\t\tif _, err2 := s.graphLock.RecordWrite(); err2 != nil {\n\t\t\terr = fmt.Errorf(\"graphLock.RecordWrite failed: %w\", err2)\n\t\t}\n\t\t// Do the Cleanup() only after we are sure that the change was recorded with RecordWrite(), so that\n\t\t// the next user picks it.\n\t\tif err == nil {\n\t\t\terr = s.graphDriver.Cleanup()\n\t\t}\n\t}\n\treturn mounted, err\n}\n\n// Convert a BigData key name into an acceptable file name.\nfunc makeBigDataBaseName(key string) string {\n\treader := strings.NewReader(key)\n\tfor reader.Len() > 0 {\n\t\tch, size, err := reader.ReadRune()\n\t\tif err != nil || size != 1 {\n\t\t\tbreak\n\t\t}\n\t\tif ch != '.' && (ch < '0' || ch > '9') && (ch < 'a' || ch > 'z') {\n\t\t\tbreak\n\t\t}\n\t}\n\tif reader.Len() > 0 {\n\t\treturn \"=\" + base64.StdEncoding.EncodeToString([]byte(key))\n\t}\n\treturn key\n}\n\nfunc stringSliceWithoutValue(slice []string, value string) []string {\n\treturn slices.DeleteFunc(slices.Clone(slice), func(v string) bool {\n\t\treturn v == value\n\t})\n}\n\n// copySlicePreferringNil returns a copy of the slice.\n// If s is empty, a nil is returned.\nfunc copySlicePreferringNil[S ~[]E, E any](s S) S {\n\tif len(s) == 0 {\n\t\treturn nil\n\t}\n\treturn slices.Clone(s)\n}\n\n// copyMapPreferringNil returns a shallow clone of map m.\n// If m is empty, a nil is returned.\n//\n// (As of, e.g., Go 1.23, maps.Clone preserves nil, but that’s not a documented promise;\n// and this function turns even non-nil empty maps into nil.)\nfunc copyMapPreferringNil[K comparable, V any](m map[K]V) map[K]V {\n\tif len(m) == 0 {\n\t\treturn nil\n\t}\n\treturn maps.Clone(m)\n}\n\n// newMapFrom returns a shallow clone of map m.\n// If m is empty, an empty map is allocated and returned.\nfunc newMapFrom[K comparable, V any](m map[K]V) map[K]V {\n\tif len(m) == 0 {\n\t\treturn make(map[K]V, 0)\n\t}\n\treturn maps.Clone(m)\n}\n\nfunc copyImageBigDataOptionSlice(slice []ImageBigDataOption) []ImageBigDataOption {\n\tret := make([]ImageBigDataOption, len(slice))\n\tfor i := range slice {\n\t\tret[i].Key = slice[i].Key\n\t\tret[i].Data = slices.Clone(slice[i].Data)\n\t\tret[i].Digest = slice[i].Digest\n\t}\n\treturn ret\n}\n\nfunc copyContainerBigDataOptionSlice(slice []ContainerBigDataOption) []ContainerBigDataOption {\n\tret := make([]ContainerBigDataOption, len(slice))\n\tfor i := range slice {\n\t\tret[i].Key = slice[i].Key\n\t\tret[i].Data = slices.Clone(slice[i].Data)\n\t}\n\treturn ret\n}\n\n// AutoUserNsMinSize is the minimum size for automatically created user namespaces\nconst AutoUserNsMinSize = 1024\n\n// AutoUserNsMaxSize is the maximum size for automatically created user namespaces\nconst AutoUserNsMaxSize = 65536\n\n// RootAutoUserNsUser is the default user used for root containers when automatically\n// creating a user namespace.\nconst RootAutoUserNsUser = \"containers\"\n\n// SetDefaultConfigFilePath sets the default configuration to the specified path, and loads the file.\n// Deprecated: Use types.SetDefaultConfigFilePath, which can return an error.\nfunc SetDefaultConfigFilePath(path string) {\n\t_ = types.SetDefaultConfigFilePath(path)\n}\n\n// DefaultConfigFile returns the path to the storage config file used\nfunc DefaultConfigFile() (string, error) {\n\treturn types.DefaultConfigFile()\n}\n\n// ReloadConfigurationFile parses the specified configuration file and overrides\n// the configuration in storeOptions.\n// Deprecated: Use types.ReloadConfigurationFile, which can return an error.\nfunc ReloadConfigurationFile(configFile string, storeOptions *types.StoreOptions) {\n\t_ = types.ReloadConfigurationFile(configFile, storeOptions)\n}\n\n// GetDefaultMountOptions returns the default mountoptions defined in container/storage\nfunc GetDefaultMountOptions() ([]string, error) {\n\tdefaultStoreOptions, err := types.Options()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn GetMountOptions(defaultStoreOptions.GraphDriverName, defaultStoreOptions.GraphDriverOptions)\n}\n\n// GetMountOptions returns the mountoptions for the specified driver and graphDriverOptions\nfunc GetMountOptions(driver string, graphDriverOptions []string) ([]string, error) {\n\tmountOpts := []string{\n\t\t\".mountopt\",\n\t\tfmt.Sprintf(\"%s.mountopt\", driver),\n\t}\n\tfor _, option := range graphDriverOptions {\n\t\tkey, val, err := parsers.ParseKeyValueOpt(option)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkey = strings.ToLower(key)\n\t\tif slices.Contains(mountOpts, key) {\n\t\t\treturn strings.Split(val, \",\"), nil\n\t\t}\n\t}\n\treturn nil, nil\n}\n\n// Free removes the store from the list of stores\nfunc (s *store) Free() {\n\tif i := slices.Index(stores, s); i != -1 {\n\t\tstores = slices.Delete(stores, i, i+1)\n\t}\n}\n\n// Tries to clean up old unreferenced container leftovers. returns the first error\n// but continues as far as it can\nfunc (s *store) GarbageCollect() error {\n\t_, firstErr := writeToContainerStore(s, func() (struct{}, error) {\n\t\treturn struct{}{}, s.containerStore.GarbageCollect()\n\t})\n\n\t_, moreErr := writeToImageStore(s, func() (struct{}, error) {\n\t\treturn struct{}{}, s.imageStore.GarbageCollect()\n\t})\n\tif firstErr == nil {\n\t\tfirstErr = moreErr\n\t}\n\n\t_, moreErr = writeToLayerStore(s, func(rlstore rwLayerStore) (struct{}, error) {\n\t\treturn struct{}{}, rlstore.GarbageCollect()\n\t})\n\tif firstErr == nil {\n\t\tfirstErr = moreErr\n\t}\n\n\treturn firstErr\n}\n\n// List returns a MultiListResult structure that contains layer, image, or container\n// extracts according to the values in MultiListOptions.\nfunc (s *store) MultiList(options MultiListOptions) (MultiListResult, error) {\n\t// TODO: Possible optimization: Deduplicate content from multiple stores.\n\tout := MultiListResult{}\n\n\tif options.Layers {\n\t\tlayerStores, err := s.allLayerStores()\n\t\tif err != nil {\n\t\t\treturn MultiListResult{}, err\n\t\t}\n\t\tfor _, roStore := range layerStores {\n\t\t\tif err := roStore.startReading(); err != nil {\n\t\t\t\treturn MultiListResult{}, err\n\t\t\t}\n\t\t\tdefer roStore.stopReading()\n\t\t\tlayers, err := roStore.Layers()\n\t\t\tif err != nil {\n\t\t\t\treturn MultiListResult{}, err\n\t\t\t}\n\t\t\tout.Layers = append(out.Layers, layers...)\n\t\t}\n\t}\n\n\tif options.Images {\n\t\tfor _, roStore := range s.allImageStores() {\n\t\t\tif err := roStore.startReading(); err != nil {\n\t\t\t\treturn MultiListResult{}, err\n\t\t\t}\n\t\t\tdefer roStore.stopReading()\n\n\t\t\timages, err := roStore.Images()\n\t\t\tif err != nil {\n\t\t\t\treturn MultiListResult{}, err\n\t\t\t}\n\t\t\tout.Images = append(out.Images, images...)\n\t\t}\n\t}\n\n\tif options.Containers {\n\t\tcontainers, _, err := readContainerStore(s, func() ([]Container, bool, error) {\n\t\t\tres, err := s.containerStore.Containers()\n\t\t\treturn res, true, err\n\t\t})\n\t\tif err != nil {\n\t\t\treturn MultiListResult{}, err\n\t\t}\n\t\tout.Containers = append(out.Containers, containers...)\n\t}\n\treturn out, nil\n}\n\n// Dedup deduplicates layers in the store.\nfunc (s *store) Dedup(req DedupArgs) (drivers.DedupResult, error) {\n\timgs, err := s.Images()\n\tif err != nil {\n\t\treturn drivers.DedupResult{}, err\n\t}\n\tvar topLayers []string\n\tfor _, i := range imgs {\n\t\ttopLayers = append(topLayers, i.TopLayer)\n\t\ttopLayers = append(topLayers, i.MappedTopLayers...)\n\t}\n\treturn writeToLayerStore(s, func(rlstore rwLayerStore) (drivers.DedupResult, error) {\n\t\tlayers := make(map[string]struct{})\n\t\tfor _, i := range topLayers {\n\t\t\tcur := i\n\t\t\tfor cur != \"\" {\n\t\t\t\tif _, visited := layers[cur]; visited {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tl, err := rlstore.Get(cur)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif err == ErrLayerUnknown {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\treturn drivers.DedupResult{}, err\n\t\t\t\t}\n\t\t\t\tlayers[cur] = struct{}{}\n\t\t\t\tcur = l.Parent\n\t\t\t}\n\t\t}\n\t\tr := drivers.DedupArgs{\n\t\t\tOptions: req.Options,\n\t\t}\n\t\tfor l := range layers {\n\t\t\tr.Layers = append(r.Layers, l)\n\t\t}\n\t\treturn rlstore.dedup(r)\n\t})\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/default_override_test.conf",
    "content": "[storage]\n\n# Default Storage Driver\ndriver = \"\"\n\n# Primary Read/Write location of container storage\ngraphroot = \"environment_override_graphroot\"\n\n# Storage path for rootless users\n#\nrootless_storage_path = \"environment_override_rootless_storage_path\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/errors.go",
    "content": "package types\n\nimport (\n\t\"errors\"\n)\n\nvar (\n\t// ErrContainerUnknown indicates that there was no container with the specified name or ID.\n\tErrContainerUnknown = errors.New(\"container not known\")\n\t// ErrDigestUnknown indicates that we were unable to compute the digest of a specified item.\n\tErrDigestUnknown = errors.New(\"could not compute digest of item\")\n\t// ErrDuplicateID indicates that an ID which is to be assigned to a new item is already being used.\n\tErrDuplicateID = errors.New(\"that ID is already in use\")\n\t// ErrDuplicateImageNames indicates that the read-only store uses the same name for multiple images.\n\tErrDuplicateImageNames = errors.New(\"read-only image store assigns the same name to multiple images\")\n\t// ErrDuplicateLayerNames indicates that the read-only store uses the same name for multiple layers.\n\tErrDuplicateLayerNames = errors.New(\"read-only layer store assigns the same name to multiple layers\")\n\t// ErrDuplicateName indicates that a name which is to be assigned to a new item is already being used.\n\tErrDuplicateName = errors.New(\"that name is already in use\")\n\t// ErrImageUnknown indicates that there was no image with the specified name or ID.\n\tErrImageUnknown = errors.New(\"image not known\")\n\t// ErrImageUsedByContainer is returned when the caller attempts to delete an image that is a container's image.\n\tErrImageUsedByContainer = errors.New(\"image is in use by a container\")\n\t// ErrIncompleteOptions is returned when the caller attempts to initialize a Store without providing required information.\n\tErrIncompleteOptions = errors.New(\"missing necessary StoreOptions\")\n\t// ErrInvalidBigDataName indicates that the name for a big data item is not acceptable; it may be empty.\n\tErrInvalidBigDataName = errors.New(\"not a valid name for a big data item\")\n\t// ErrLayerHasChildren is returned when the caller attempts to delete a layer that has children.\n\tErrLayerHasChildren = errors.New(\"layer has children\")\n\t// ErrLayerNotMounted is returned when the requested information can only be computed for a mounted layer, and the layer is not mounted.\n\tErrLayerNotMounted = errors.New(\"layer is not mounted\")\n\t// ErrLayerUnknown indicates that there was no layer with the specified name or ID.\n\tErrLayerUnknown = errors.New(\"layer not known\")\n\t// ErrLayerUsedByContainer is returned when the caller attempts to delete a layer that is a container's layer.\n\tErrLayerUsedByContainer = errors.New(\"layer is in use by a container\")\n\t// ErrLayerUsedByImage is returned when the caller attempts to delete a layer that is an image's top layer.\n\tErrLayerUsedByImage = errors.New(\"layer is in use by an image\")\n\t// ErrLoadError indicates that there was an initialization error.\n\tErrLoadError = errors.New(\"error loading storage metadata\")\n\t// ErrNotAContainer is returned when the caller attempts to delete a container that isn't a container.\n\tErrNotAContainer = errors.New(\"identifier is not a container\")\n\t// ErrNotALayer is returned when the caller attempts to delete a layer that isn't a layer.\n\tErrNotALayer = errors.New(\"identifier is not a layer\")\n\t// ErrNotAnID is returned when the caller attempts to read or write metadata from an item that doesn't exist.\n\tErrNotAnID = errors.New(\"identifier is not a layer, image, or container\")\n\t// ErrNotAnImage is returned when the caller attempts to delete an image that isn't an image.\n\tErrNotAnImage = errors.New(\"identifier is not an image\")\n\t// ErrParentIsContainer is returned when a caller attempts to create a layer as a child of a container's layer.\n\tErrParentIsContainer = errors.New(\"would-be parent layer is a container\")\n\t// ErrParentUnknown indicates that we didn't record the ID of the parent of the specified layer.\n\tErrParentUnknown = errors.New(\"parent of layer not known\")\n\t// ErrSizeUnknown is returned when the caller asks for the size of a big data item, but the Store couldn't determine the answer.\n\tErrSizeUnknown = errors.New(\"size is not known\")\n\t// ErrStoreIsReadOnly is returned when the caller makes a call to a read-only store that would require modifying its contents.\n\tErrStoreIsReadOnly = errors.New(\"called a write method on a read-only store\")\n\t// ErrNotSupported is returned when the requested functionality is not supported.\n\tErrNotSupported = errors.New(\"not supported\")\n\t// ErrInvalidMappings is returned when the specified mappings are invalid.\n\tErrInvalidMappings = errors.New(\"invalid mappings specified\")\n\t// ErrNoAvailableIDs is returned when there are not enough unused IDS within the user namespace.\n\tErrNoAvailableIDs = errors.New(\"not enough unused IDs in user namespace\")\n\n\t// ErrLayerUnaccounted describes a layer that is present in the lower-level storage driver,\n\t// but which is not known to or managed by the higher-level driver-agnostic logic.\n\tErrLayerUnaccounted = errors.New(\"layer in lower level storage driver not accounted for\")\n\t// ErrLayerUnreferenced describes a layer which is not used by any image or container.\n\tErrLayerUnreferenced = errors.New(\"layer not referenced by any images or containers\")\n\t// ErrLayerIncorrectContentDigest describes a layer for which the contents of one or more\n\t// files which were added in the layer appear to have changed.  It may instead look like an\n\t// unnamed \"file integrity checksum failed\" error.\n\tErrLayerIncorrectContentDigest = errors.New(\"layer content incorrect digest\")\n\t// ErrLayerIncorrectContentSize describes a layer for which regenerating the diff that was\n\t// used to populate the layer produced a diff of a different size.  We check the digest\n\t// first, so it's highly unlikely you'll ever see this error.\n\tErrLayerIncorrectContentSize = errors.New(\"layer content incorrect size\")\n\t// ErrLayerContentModified describes a layer which contains contents which should not be\n\t// there, or for which ownership/permissions/dates have been changed.\n\tErrLayerContentModified = errors.New(\"layer content modified\")\n\t// ErrLayerDataMissing describes a layer which is missing a big data item.\n\tErrLayerDataMissing = errors.New(\"layer data item is missing\")\n\t// ErrLayerMissing describes a layer which is the missing parent of a layer.\n\tErrLayerMissing = errors.New(\"layer is missing\")\n\t// ErrImageLayerMissing describes an image which claims to have a layer that we don't know\n\t// about.\n\tErrImageLayerMissing = errors.New(\"image layer is missing\")\n\t// ErrImageDataMissing describes an image which is missing a big data item.\n\tErrImageDataMissing = errors.New(\"image data item is missing\")\n\t// ErrImageDataIncorrectSize describes an image which has a big data item which looks like\n\t// its size has changed, likely because it's been modified somehow.\n\tErrImageDataIncorrectSize = errors.New(\"image data item has incorrect size\")\n\t// ErrContainerImageMissing describes a container which claims to be based on an image that\n\t// we don't know about.\n\tErrContainerImageMissing = errors.New(\"image missing\")\n\t// ErrContainerDataMissing describes a container which is missing a big data item.\n\tErrContainerDataMissing = errors.New(\"container data item is missing\")\n\t// ErrContainerDataIncorrectSize describes a container which has a big data item which looks\n\t// like its size has changed, likely because it's been modified somehow.\n\tErrContainerDataIncorrectSize = errors.New(\"container data item has incorrect size\")\n)\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/idmappings.go",
    "content": "package types\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n)\n\n// AutoUserNsOptions defines how to automatically create a user namespace.\ntype AutoUserNsOptions struct {\n\t// Size defines the size for the user namespace.  If it is set to a\n\t// value bigger than 0, the user namespace will have exactly this size.\n\t// If it is not set, some heuristics will be used to find its size.\n\tSize uint32\n\t// InitialSize defines the minimum size for the user namespace.\n\t// The created user namespace will have at least this size.\n\tInitialSize uint32\n\t// PasswdFile to use if the container uses a volume.\n\tPasswdFile string\n\t// GroupFile to use if the container uses a volume.\n\tGroupFile string\n\t// AdditionalUIDMappings specified additional UID mappings to include in\n\t// the generated user namespace.\n\tAdditionalUIDMappings []idtools.IDMap\n\t// AdditionalGIDMappings specified additional GID mappings to include in\n\t// the generated user namespace.\n\tAdditionalGIDMappings []idtools.IDMap\n}\n\n// IDMappingOptions are used for specifying how ID mapping should be set up for\n// a layer or container.\ntype IDMappingOptions struct {\n\t// UIDMap and GIDMap are used for setting up a layer's root filesystem\n\t// for use inside of a user namespace where ID mapping is being used.\n\t// If HostUIDMapping/HostGIDMapping is true, no mapping of the\n\t// respective type will be used.  Otherwise, if UIDMap and/or GIDMap\n\t// contain at least one mapping, one or both will be used.  By default,\n\t// if neither of those conditions apply, if the layer has a parent\n\t// layer, the parent layer's mapping will be used, and if it does not\n\t// have a parent layer, the mapping which was passed to the Store\n\t// object when it was initialized will be used.\n\tHostUIDMapping bool\n\tHostGIDMapping bool\n\tUIDMap         []idtools.IDMap\n\tGIDMap         []idtools.IDMap\n\tAutoUserNs     bool\n\tAutoUserNsOpts AutoUserNsOptions\n}\n\n// ParseIDMapping takes idmappings and subuid and subgid maps and returns a storage mapping\nfunc ParseIDMapping(UIDMapSlice, GIDMapSlice []string, subUIDMap, subGIDMap string) (*IDMappingOptions, error) {\n\toptions := IDMappingOptions{\n\t\tHostUIDMapping: true,\n\t\tHostGIDMapping: true,\n\t}\n\tif subGIDMap == \"\" && subUIDMap != \"\" {\n\t\tsubGIDMap = subUIDMap\n\t}\n\tif subUIDMap == \"\" && subGIDMap != \"\" {\n\t\tsubUIDMap = subGIDMap\n\t}\n\tif len(GIDMapSlice) == 0 && len(UIDMapSlice) != 0 {\n\t\tGIDMapSlice = UIDMapSlice\n\t}\n\tif len(UIDMapSlice) == 0 && len(GIDMapSlice) != 0 {\n\t\tUIDMapSlice = GIDMapSlice\n\t}\n\tif len(UIDMapSlice) == 0 && subUIDMap == \"\" && os.Getuid() != 0 {\n\t\tUIDMapSlice = []string{fmt.Sprintf(\"0:%d:1\", os.Getuid())}\n\t}\n\tif len(GIDMapSlice) == 0 && subGIDMap == \"\" && os.Getuid() != 0 {\n\t\tGIDMapSlice = []string{fmt.Sprintf(\"0:%d:1\", os.Getgid())}\n\t}\n\n\tif subUIDMap != \"\" && subGIDMap != \"\" {\n\t\tmappings, err := idtools.NewIDMappings(subUIDMap, subGIDMap)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to create NewIDMappings for uidmap=%s gidmap=%s: %w\", subUIDMap, subGIDMap, err)\n\t\t}\n\t\toptions.UIDMap = mappings.UIDs()\n\t\toptions.GIDMap = mappings.GIDs()\n\t}\n\tparsedUIDMap, err := idtools.ParseIDMap(UIDMapSlice, \"UID\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create ParseUIDMap UID=%s: %w\", UIDMapSlice, err)\n\t}\n\tparsedGIDMap, err := idtools.ParseIDMap(GIDMapSlice, \"GID\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create ParseGIDMap GID=%s: %w\", UIDMapSlice, err)\n\t}\n\toptions.UIDMap = append(options.UIDMap, parsedUIDMap...)\n\toptions.GIDMap = append(options.GIDMap, parsedGIDMap...)\n\tif len(options.UIDMap) > 0 {\n\t\toptions.HostUIDMapping = false\n\t}\n\tif len(options.GIDMap) > 0 {\n\t\toptions.HostGIDMapping = false\n\t}\n\treturn &options, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/options.go",
    "content": "package types\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/BurntSushi/toml\"\n\t\"github.com/sirupsen/logrus\"\n\tcfg \"go.podman.io/storage/pkg/config\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/unshare\"\n)\n\n// TOML-friendly explicit tables used for conversions.\ntype TomlConfig struct {\n\tStorage struct {\n\t\tDriver              string            `toml:\"driver,omitempty\"`\n\t\tDriverPriority      []string          `toml:\"driver_priority,omitempty\"`\n\t\tRunRoot             string            `toml:\"runroot,omitempty\"`\n\t\tImageStore          string            `toml:\"imagestore,omitempty\"`\n\t\tGraphRoot           string            `toml:\"graphroot,omitempty\"`\n\t\tRootlessStoragePath string            `toml:\"rootless_storage_path,omitempty\"`\n\t\tTransientStore      bool              `toml:\"transient_store,omitempty\"`\n\t\tOptions             cfg.OptionsConfig `toml:\"options,omitempty\"`\n\t} `toml:\"storage\"`\n}\n\nconst (\n\toverlayDriver  = \"overlay\"\n\toverlay2       = \"overlay2\"\n\tstorageConfEnv = \"CONTAINERS_STORAGE_CONF\"\n)\n\nvar (\n\tdefaultStoreOptionsOnce    sync.Once\n\tloadDefaultStoreOptionsErr error\n\tonce                       sync.Once\n\tstoreOptions               StoreOptions\n\tstoreError                 error\n\tdefaultConfigFileSet       bool\n\t// defaultConfigFile path to the system wide storage.conf file\n\tdefaultConfigFile = SystemConfigFile\n\t// DefaultStoreOptions is a reasonable default set of options.\n\tdefaultStoreOptions StoreOptions\n)\n\nfunc loadDefaultStoreOptions() {\n\tdefaultStoreOptions.GraphDriverName = \"\"\n\n\tsetDefaults := func() {\n\t\t// reload could set values to empty for run and graph root if config does not contains anything\n\t\tif defaultStoreOptions.RunRoot == \"\" {\n\t\t\tdefaultStoreOptions.RunRoot = defaultRunRoot\n\t\t}\n\t\tif defaultStoreOptions.GraphRoot == \"\" {\n\t\t\tdefaultStoreOptions.GraphRoot = defaultGraphRoot\n\t\t}\n\t}\n\tsetDefaults()\n\n\tif path, ok := os.LookupEnv(storageConfEnv); ok {\n\t\tdefaultOverrideConfigFile = path\n\t\tif err := ReloadConfigurationFileIfNeeded(path, &defaultStoreOptions); err != nil {\n\t\t\tloadDefaultStoreOptionsErr = err\n\t\t\treturn\n\t\t}\n\t\tsetDefaults()\n\t\treturn\n\t}\n\n\tif path, ok := os.LookupEnv(\"XDG_CONFIG_HOME\"); ok {\n\t\thomeConfigFile := filepath.Join(path, \"containers\", \"storage.conf\")\n\t\tif err := fileutils.Exists(homeConfigFile); err == nil {\n\t\t\t// user storage.conf in XDG_CONFIG_HOME if it exists\n\t\t\tdefaultOverrideConfigFile = homeConfigFile\n\t\t} else {\n\t\t\tif !os.IsNotExist(err) {\n\t\t\t\tloadDefaultStoreOptionsErr = err\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\terr := fileutils.Exists(defaultOverrideConfigFile)\n\tif err == nil {\n\t\t// The DefaultConfigFile() function returns the path\n\t\t// of the used storage.conf file, by returning defaultConfigFile\n\t\t// If override exists containers/storage uses it by default.\n\t\tdefaultConfigFile = defaultOverrideConfigFile\n\t\tif err := ReloadConfigurationFileIfNeeded(defaultOverrideConfigFile, &defaultStoreOptions); err != nil {\n\t\t\tloadDefaultStoreOptionsErr = err\n\t\t\treturn\n\t\t}\n\t\tsetDefaults()\n\t\treturn\n\t}\n\n\tif !os.IsNotExist(err) {\n\t\tlogrus.Warningf(\"Attempting to use %s, %v\", defaultConfigFile, err)\n\t}\n\tif err := ReloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions); err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\tloadDefaultStoreOptionsErr = err\n\t\treturn\n\t}\n\tsetDefaults()\n}\n\n// loadStoreOptions returns the default storage ops for containers\nfunc loadStoreOptions() (StoreOptions, error) {\n\tstorageConf, err := DefaultConfigFile()\n\tif err != nil {\n\t\treturn defaultStoreOptions, err\n\t}\n\treturn loadStoreOptionsFromConfFile(storageConf)\n}\n\n// usePerUserStorage returns whether the user private storage must be used.\n// We cannot simply use the unshare.IsRootless() condition, because\n// that checks only if the current process needs a user namespace to\n// work and it would break cases where the process is already created\n// in a user namespace (e.g. nested Podman/Buildah) and the desired\n// behavior is to use system paths instead of user private paths.\nfunc usePerUserStorage() bool {\n\treturn unshare.IsRootless() && unshare.GetRootlessUID() != 0\n}\n\n// loadStoreOptionsFromConfFile is an internal implementation detail of DefaultStoreOptions to allow testing.\n// Everyone but the tests this is intended for should only call loadStoreOptions, never this function.\nfunc loadStoreOptionsFromConfFile(storageConf string) (StoreOptions, error) {\n\tvar (\n\t\tdefaultRootlessRunRoot   string\n\t\tdefaultRootlessGraphRoot string\n\t\terr                      error\n\t)\n\n\tdefaultStoreOptionsOnce.Do(loadDefaultStoreOptions)\n\tif loadDefaultStoreOptionsErr != nil {\n\t\treturn StoreOptions{}, loadDefaultStoreOptionsErr\n\t}\n\tstorageOpts := defaultStoreOptions\n\tif usePerUserStorage() {\n\t\tstorageOpts, err = getRootlessStorageOpts(storageOpts)\n\t\tif err != nil {\n\t\t\treturn storageOpts, err\n\t\t}\n\t}\n\terr = fileutils.Exists(storageConf)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn storageOpts, err\n\t}\n\tif err == nil && !defaultConfigFileSet {\n\t\tdefaultRootlessRunRoot = storageOpts.RunRoot\n\t\tdefaultRootlessGraphRoot = storageOpts.GraphRoot\n\t\tstorageOpts = StoreOptions{}\n\t\treloadConfigurationFileIfNeeded(storageConf, &storageOpts)\n\t\t// If the file did not specify a graphroot or runroot,\n\t\t// set sane defaults so we don't try and use root-owned\n\t\t// directories\n\t\tif storageOpts.RunRoot == \"\" {\n\t\t\tstorageOpts.RunRoot = defaultRootlessRunRoot\n\t\t}\n\t\tif storageOpts.GraphRoot == \"\" {\n\t\t\tif storageOpts.RootlessStoragePath != \"\" {\n\t\t\t\tstorageOpts.GraphRoot = storageOpts.RootlessStoragePath\n\t\t\t} else {\n\t\t\t\tstorageOpts.GraphRoot = defaultRootlessGraphRoot\n\t\t\t}\n\t\t}\n\t}\n\tif storageOpts.RunRoot == \"\" {\n\t\treturn storageOpts, fmt.Errorf(\"runroot must be set\")\n\t}\n\trootlessUID := unshare.GetRootlessUID()\n\trunRoot, err := expandEnvPath(storageOpts.RunRoot, rootlessUID)\n\tif err != nil {\n\t\treturn storageOpts, err\n\t}\n\tstorageOpts.RunRoot = runRoot\n\n\tif storageOpts.GraphRoot == \"\" {\n\t\treturn storageOpts, fmt.Errorf(\"graphroot must be set\")\n\t}\n\tgraphRoot, err := expandEnvPath(storageOpts.GraphRoot, rootlessUID)\n\tif err != nil {\n\t\treturn storageOpts, err\n\t}\n\tstorageOpts.GraphRoot = graphRoot\n\n\tif storageOpts.RootlessStoragePath != \"\" {\n\t\tstoragePath, err := expandEnvPath(storageOpts.RootlessStoragePath, rootlessUID)\n\t\tif err != nil {\n\t\t\treturn storageOpts, err\n\t\t}\n\t\tstorageOpts.RootlessStoragePath = storagePath\n\t}\n\n\tif storageOpts.ImageStore != \"\" && storageOpts.ImageStore == storageOpts.GraphRoot {\n\t\treturn storageOpts, fmt.Errorf(\"imagestore %s must either be not set or be a different than graphroot\", storageOpts.ImageStore)\n\t}\n\n\treturn storageOpts, nil\n}\n\n// UpdateOptions should be called iff container engine received a SIGHUP,\n// otherwise use DefaultStoreOptions\nfunc UpdateStoreOptions() (StoreOptions, error) {\n\tstoreOptions, storeError = loadStoreOptions()\n\treturn storeOptions, storeError\n}\n\n// DefaultStoreOptions returns the default storage ops for containers\nfunc DefaultStoreOptions() (StoreOptions, error) {\n\tonce.Do(func() {\n\t\tstoreOptions, storeError = loadStoreOptions()\n\t})\n\treturn storeOptions, storeError\n}\n\n// StoreOptions is used for passing initialization options to GetStore(), for\n// initializing a Store object and the underlying storage that it controls.\ntype StoreOptions struct {\n\t// RunRoot is the filesystem path under which we can store run-time\n\t// information, such as the locations of active mount points, that we\n\t// want to lose if the host is rebooted.\n\tRunRoot string `json:\"runroot,omitempty\"`\n\t// GraphRoot is the filesystem path under which we will store the\n\t// contents of layers, images, and containers.\n\tGraphRoot string `json:\"root,omitempty\"`\n\t// Image Store is the alternate location of image store if a location\n\t// separate from the container store is required.\n\tImageStore string `json:\"imagestore,omitempty\"`\n\t// RootlessStoragePath is the storage path for rootless users\n\t// default $HOME/.local/share/containers/storage\n\tRootlessStoragePath string `toml:\"rootless_storage_path\"`\n\t// If the driver is not specified, the best suited driver will be picked\n\t// either from GraphDriverPriority, if specified, or from the platform\n\t// dependent priority list (in that order).\n\tGraphDriverName string `json:\"driver,omitempty\"`\n\t// GraphDriverPriority is a list of storage drivers that will be tried\n\t// to initialize the Store for a given RunRoot and GraphRoot unless a\n\t// GraphDriverName is set.\n\t// This list can be used to define a custom order in which the drivers\n\t// will be tried.\n\tGraphDriverPriority []string `json:\"driver-priority,omitempty\"`\n\t// GraphDriverOptions are driver-specific options.\n\tGraphDriverOptions []string `json:\"driver-options,omitempty\"`\n\t// UIDMap and GIDMap are used for setting up a container's root filesystem\n\t// for use inside of a user namespace where UID mapping is being used.\n\tUIDMap []idtools.IDMap `json:\"uidmap,omitempty\"`\n\tGIDMap []idtools.IDMap `json:\"gidmap,omitempty\"`\n\t// RootAutoNsUser is the user used to pick a subrange when automatically setting\n\t// a user namespace for the root user.\n\tRootAutoNsUser string `json:\"root_auto_ns_user,omitempty\"`\n\t// AutoNsMinSize is the minimum size for an automatic user namespace.\n\tAutoNsMinSize uint32 `json:\"auto_userns_min_size,omitempty\"`\n\t// AutoNsMaxSize is the maximum size for an automatic user namespace.\n\tAutoNsMaxSize uint32 `json:\"auto_userns_max_size,omitempty\"`\n\t// PullOptions specifies options to be handed to pull managers\n\t// This API is experimental and can be changed without bumping the major version number.\n\tPullOptions map[string]string `toml:\"pull_options\"`\n\t// DisableVolatile doesn't allow volatile mounts when it is set.\n\tDisableVolatile bool `json:\"disable-volatile,omitempty\"`\n\t// If transient, don't persist containers over boot (stores db in runroot)\n\tTransientStore bool `json:\"transient_store,omitempty\"`\n}\n\n// isRootlessDriver returns true if the given storage driver is valid for containers running as non root\nfunc isRootlessDriver(driver string) bool {\n\tvalidDrivers := map[string]bool{\n\t\t\"btrfs\":    true,\n\t\t\"overlay\":  true,\n\t\t\"overlay2\": true,\n\t\t\"vfs\":      true,\n\t}\n\treturn validDrivers[driver]\n}\n\n// getRootlessStorageOpts returns the storage opts for containers running as non root\nfunc getRootlessStorageOpts(systemOpts StoreOptions) (StoreOptions, error) {\n\tvar opts StoreOptions\n\n\trootlessUID := unshare.GetRootlessUID()\n\n\tdataDir, err := homedir.GetDataHome()\n\tif err != nil {\n\t\treturn opts, err\n\t}\n\n\trootlessRuntime, err := homedir.GetRuntimeDir()\n\tif err != nil {\n\t\treturn opts, err\n\t}\n\n\topts.RunRoot = filepath.Join(rootlessRuntime, \"containers\")\n\tif err := os.MkdirAll(opts.RunRoot, 0o700); err != nil {\n\t\treturn opts, fmt.Errorf(\"unable to make rootless runtime: %w\", err)\n\t}\n\n\topts.PullOptions = systemOpts.PullOptions\n\tif systemOpts.RootlessStoragePath != \"\" {\n\t\topts.GraphRoot, err = expandEnvPath(systemOpts.RootlessStoragePath, rootlessUID)\n\t\tif err != nil {\n\t\t\treturn opts, err\n\t\t}\n\t} else {\n\t\topts.GraphRoot = filepath.Join(dataDir, \"containers\", \"storage\")\n\t}\n\n\tif driver := systemOpts.GraphDriverName; isRootlessDriver(driver) {\n\t\topts.GraphDriverName = driver\n\t}\n\tif driver := os.Getenv(\"STORAGE_DRIVER\"); driver != \"\" {\n\t\topts.GraphDriverName = driver\n\t}\n\tif opts.GraphDriverName == overlay2 {\n\t\tlogrus.Warnf(\"Switching default driver from overlay2 to the equivalent overlay driver\")\n\t\topts.GraphDriverName = overlayDriver\n\t}\n\n\t// If the configuration file was explicitly set, then copy all the options\n\t// present.\n\tif defaultConfigFileSet {\n\t\topts.GraphDriverOptions = systemOpts.GraphDriverOptions\n\t\topts.ImageStore = systemOpts.ImageStore\n\t} else if opts.GraphDriverName == overlayDriver {\n\t\tfor _, o := range systemOpts.GraphDriverOptions {\n\t\t\tif strings.Contains(o, \"ignore_chown_errors\") {\n\t\t\t\topts.GraphDriverOptions = append(opts.GraphDriverOptions, o)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif opts.GraphDriverName == \"\" {\n\t\tif len(systemOpts.GraphDriverPriority) == 0 {\n\t\t\tdirEntries, err := os.ReadDir(opts.GraphRoot)\n\t\t\tif err == nil {\n\t\t\t\tfor _, entry := range dirEntries {\n\t\t\t\t\tif name, ok := strings.CutSuffix(entry.Name(), \"-images\"); ok {\n\t\t\t\t\t\topts.GraphDriverName = name\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif opts.GraphDriverName == \"\" {\n\t\t\t\tif canUseRootlessOverlay() {\n\t\t\t\t\topts.GraphDriverName = overlayDriver\n\t\t\t\t} else {\n\t\t\t\t\topts.GraphDriverName = \"vfs\"\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\topts.GraphDriverPriority = systemOpts.GraphDriverPriority\n\t\t}\n\t}\n\n\tif os.Getenv(\"STORAGE_OPTS\") != \"\" {\n\t\topts.GraphDriverOptions = slices.AppendSeq(opts.GraphDriverOptions, strings.SplitSeq(os.Getenv(\"STORAGE_OPTS\"), \",\"))\n\t}\n\n\treturn opts, nil\n}\n\nvar prevReloadConfig = struct {\n\tstoreOptions *StoreOptions\n\tmod          time.Time\n\tmutex        sync.Mutex\n\tconfigFile   string\n}{}\n\n// SetDefaultConfigFilePath sets the default configuration to the specified path\nfunc SetDefaultConfigFilePath(path string) error {\n\tdefaultConfigFile = path\n\tdefaultConfigFileSet = true\n\treturn ReloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions)\n}\n\nfunc ReloadConfigurationFileIfNeeded(configFile string, storeOptions *StoreOptions) error {\n\tprevReloadConfig.mutex.Lock()\n\tdefer prevReloadConfig.mutex.Unlock()\n\n\tfi, err := os.Stat(configFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmtime := fi.ModTime()\n\tif prevReloadConfig.storeOptions != nil && mtime.Equal(prevReloadConfig.mod) && prevReloadConfig.configFile == configFile {\n\t\t*storeOptions = *prevReloadConfig.storeOptions\n\t\treturn nil\n\t}\n\n\tif err := ReloadConfigurationFile(configFile, storeOptions); err != nil {\n\t\treturn err\n\t}\n\n\tcOptions := *storeOptions\n\tprevReloadConfig.storeOptions = &cOptions\n\tprevReloadConfig.mod = mtime\n\tprevReloadConfig.configFile = configFile\n\treturn nil\n}\n\n// ReloadConfigurationFile parses the specified configuration file and overrides\n// the configuration in storeOptions.\nfunc ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) error {\n\tconfig := new(TomlConfig)\n\n\tmeta, err := toml.DecodeFile(configFile, &config)\n\tif err == nil {\n\t\tkeys := meta.Undecoded()\n\t\tif len(keys) > 0 {\n\t\t\tlogrus.Warningf(\"Failed to decode the keys %q from %q\", keys, configFile)\n\t\t}\n\t} else {\n\t\tif !os.IsNotExist(err) {\n\t\t\tlogrus.Warningf(\"Failed to read %s %v\\n\", configFile, err.Error())\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Clear storeOptions of previous settings\n\t*storeOptions = StoreOptions{}\n\tif config.Storage.Driver != \"\" {\n\t\tstoreOptions.GraphDriverName = config.Storage.Driver\n\t}\n\tif os.Getenv(\"STORAGE_DRIVER\") != \"\" {\n\t\tconfig.Storage.Driver = os.Getenv(\"STORAGE_DRIVER\")\n\t\tstoreOptions.GraphDriverName = config.Storage.Driver\n\t}\n\tif storeOptions.GraphDriverName == overlay2 {\n\t\tlogrus.Warnf(\"Switching default driver from overlay2 to the equivalent overlay driver\")\n\t\tstoreOptions.GraphDriverName = overlayDriver\n\t}\n\tstoreOptions.GraphDriverPriority = config.Storage.DriverPriority\n\tif storeOptions.GraphDriverName == \"\" && len(storeOptions.GraphDriverPriority) == 0 {\n\t\tlogrus.Warnf(\"The storage 'driver' option should be set in %s. A driver was picked automatically.\", configFile)\n\t}\n\tif config.Storage.RunRoot != \"\" {\n\t\tstoreOptions.RunRoot = config.Storage.RunRoot\n\t}\n\tif config.Storage.GraphRoot != \"\" {\n\t\tstoreOptions.GraphRoot = config.Storage.GraphRoot\n\t}\n\tif config.Storage.ImageStore != \"\" {\n\t\tstoreOptions.ImageStore = config.Storage.ImageStore\n\t}\n\tif config.Storage.RootlessStoragePath != \"\" {\n\t\tstoreOptions.RootlessStoragePath = config.Storage.RootlessStoragePath\n\t}\n\tfor _, s := range config.Storage.Options.AdditionalImageStores {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.imagestore=%s\", config.Storage.Driver, s))\n\t}\n\tfor _, s := range config.Storage.Options.AdditionalLayerStores {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.additionallayerstore=%s\", config.Storage.Driver, s))\n\t}\n\tif config.Storage.Options.Size != \"\" {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.size=%s\", config.Storage.Driver, config.Storage.Options.Size))\n\t}\n\tif config.Storage.Options.MountProgram != \"\" {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.mount_program=%s\", config.Storage.Driver, config.Storage.Options.MountProgram))\n\t}\n\tif config.Storage.Options.SkipMountHome != \"\" {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.skip_mount_home=%s\", config.Storage.Driver, config.Storage.Options.SkipMountHome))\n\t}\n\tif config.Storage.Options.IgnoreChownErrors != \"\" {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.ignore_chown_errors=%s\", config.Storage.Driver, config.Storage.Options.IgnoreChownErrors))\n\t}\n\tif config.Storage.Options.ForceMask != 0 {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.force_mask=%o\", config.Storage.Driver, config.Storage.Options.ForceMask))\n\t}\n\tif config.Storage.Options.MountOpt != \"\" {\n\t\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, fmt.Sprintf(\"%s.mountopt=%s\", config.Storage.Driver, config.Storage.Options.MountOpt))\n\t}\n\tstoreOptions.RootAutoNsUser = config.Storage.Options.RootAutoUsernsUser\n\tif config.Storage.Options.AutoUsernsMinSize > 0 {\n\t\tstoreOptions.AutoNsMinSize = config.Storage.Options.AutoUsernsMinSize\n\t}\n\tif config.Storage.Options.AutoUsernsMaxSize > 0 {\n\t\tstoreOptions.AutoNsMaxSize = config.Storage.Options.AutoUsernsMaxSize\n\t}\n\tif config.Storage.Options.PullOptions != nil {\n\t\tstoreOptions.PullOptions = config.Storage.Options.PullOptions\n\t}\n\n\tstoreOptions.DisableVolatile = config.Storage.Options.DisableVolatile\n\tstoreOptions.TransientStore = config.Storage.TransientStore\n\n\tstoreOptions.GraphDriverOptions = append(storeOptions.GraphDriverOptions, cfg.GetGraphDriverOptions(storeOptions.GraphDriverName, config.Storage.Options)...)\n\n\tif opts, ok := os.LookupEnv(\"STORAGE_OPTS\"); ok {\n\t\tstoreOptions.GraphDriverOptions = strings.Split(opts, \",\")\n\t}\n\tif len(storeOptions.GraphDriverOptions) == 1 && storeOptions.GraphDriverOptions[0] == \"\" {\n\t\tstoreOptions.GraphDriverOptions = nil\n\t}\n\treturn nil\n}\n\nfunc Options() (StoreOptions, error) {\n\tdefaultStoreOptionsOnce.Do(loadDefaultStoreOptions)\n\treturn defaultStoreOptions, loadDefaultStoreOptionsErr\n}\n\n// Save overwrites the tomlConfig in storage.conf with the given conf\nfunc Save(conf TomlConfig) error {\n\tconfigFile, err := DefaultConfigFile()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif err = os.Remove(configFile); !os.IsNotExist(err) && err != nil {\n\t\treturn err\n\t}\n\n\tf, err := os.Create(configFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn toml.NewEncoder(f).Encode(conf)\n}\n\n// StorageConfig is used to retrieve the storage.conf toml in order to overwrite it\nfunc StorageConfig() (*TomlConfig, error) {\n\tconfig := new(TomlConfig)\n\n\tconfigFile, err := DefaultConfigFile()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t_, err = toml.DecodeFile(configFile, &config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn config, nil\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/options_bsd.go",
    "content": "//go:build freebsd || netbsd\n\npackage types\n\nconst (\n\t// these are default path for run and graph root for rootful users\n\t// for rootless path is constructed via getRootlessStorageOpts\n\tdefaultRunRoot   string = \"/var/run/containers/storage\"\n\tdefaultGraphRoot string = \"/var/db/containers/storage\"\n\tSystemConfigFile        = \"/usr/local/share/containers/storage.conf\"\n)\n\n// defaultConfigFile path to the system wide storage.conf file\nvar (\n\tdefaultOverrideConfigFile = \"/usr/local/etc/containers/storage.conf\"\n)\n\n// canUseRootlessOverlay returns true if the overlay driver can be used for rootless containers\nfunc canUseRootlessOverlay() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/options_darwin.go",
    "content": "package types\n\nconst (\n\t// these are default path for run and graph root for rootful users\n\t// for rootless path is constructed via getRootlessStorageOpts\n\tdefaultRunRoot   string = \"/run/containers/storage\"\n\tdefaultGraphRoot string = \"/var/lib/containers/storage\"\n\tSystemConfigFile        = \"/usr/share/containers/storage.conf\"\n)\n\nvar defaultOverrideConfigFile = \"/etc/containers/storage.conf\"\n\n// canUseRootlessOverlay returns true if the overlay driver can be used for rootless containers\nfunc canUseRootlessOverlay() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/options_linux.go",
    "content": "package types\n\nimport (\n\t\"os/exec\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// these are default path for run and graph root for rootful users\n\t// for rootless path is constructed via getRootlessStorageOpts\n\tdefaultRunRoot   string = \"/run/containers/storage\"\n\tdefaultGraphRoot string = \"/var/lib/containers/storage\"\n\tSystemConfigFile        = \"/usr/share/containers/storage.conf\"\n)\n\n// defaultConfigFile path to the system wide storage.conf file\nvar (\n\tdefaultOverrideConfigFile = \"/etc/containers/storage.conf\"\n)\n\n// canUseRootlessOverlay returns true if the overlay driver can be used for rootless containers\nfunc canUseRootlessOverlay() bool {\n\t// we check first for fuse-overlayfs since it is cheaper.\n\tif path, _ := exec.LookPath(\"fuse-overlayfs\"); path != \"\" {\n\t\treturn true\n\t}\n\n\t// We cannot use overlay.SupportsNativeOverlay since canUseRootlessOverlay is called by Podman\n\t// before we enter the user namespace and the driver we pick here is written in the podman database.\n\t// Checking the kernel version is usually not a good idea since the feature could be back-ported, e.g. RHEL\n\t// but this is just an heuristic and on RHEL we always install the storage.conf file.\n\t// native overlay for rootless was added upstream in 5.13 (at least the first version that we support), so check\n\t// that the kernel is >= 5.13.\n\tvar uts unix.Utsname\n\tif err := unix.Uname(&uts); err == nil {\n\t\tparts := strings.Split(string(uts.Release[:]), \".\")\n\t\tmajor, _ := strconv.Atoi(parts[0])\n\t\tif major >= 6 {\n\t\t\treturn true\n\t\t}\n\t\tif major == 5 && len(parts) > 1 {\n\t\t\tminor, _ := strconv.Atoi(parts[1])\n\t\t\tif minor >= 13 {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/options_windows.go",
    "content": "package types\n\nconst (\n\t// these are default path for run and graph root for rootful users\n\t// for rootless path is constructed via getRootlessStorageOpts\n\tdefaultRunRoot   string = \"/run/containers/storage\"\n\tdefaultGraphRoot string = \"/var/lib/containers/storage\"\n\tSystemConfigFile        = \"/usr/share/containers/storage.conf\"\n)\n\n// defaultConfigFile path to the system wide storage.conf file\nvar (\n\tdefaultOverrideConfigFile = \"/etc/containers/storage.conf\"\n)\n\n// canUseRootlessOverlay returns true if the overlay driver can be used for rootless containers\nfunc canUseRootlessOverlay() bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/storage_broken.conf",
    "content": "# This file is is a TEST configuration file for all tools\n# that use the containers/storage library.\n# See man 5 containers-storage.conf for more information\n# The \"container storage\" table contains all of the server options.\nfoo = \"bar\"\n\n[storage]\n\n# Default Storage Driver\ndriver = \"\"\n\n# Temporary storage location\nrunroot = \"/run/containers/test\"\n\n[storage.options]\n# Primary Read/Write location of container storage\ngraphroot = \"/var/lib/containers/storage\"\n\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/storage_test.conf",
    "content": "# This file is is a TEST configuration file for all tools\n# that use the containers/storage library.\n# See man 5 containers-storage.conf for more information\n# The \"container storage\" table contains all of the server options.\n[storage]\n\n# Default Storage Driver\ndriver = \"\"\n\n# Temporary storage location\nrunroot = \"$HOME/$UID/containers/storage\"\n\n# Primary Read/Write location of container storage\ngraphroot = \"$HOME/$UID/containers/storage\"\n\n# Storage path for rootless users\n#\nrootless_storage_path = \"$HOME/$UID/containers/storage\"\n\n[storage.options]\n# Storage options to be passed to underlying storage drivers\n\n# AdditionalImageStores is used to pass paths to additional Read/Only image stores\n# Must be comma separated list.\nadditionalimagestores = [\n]\n\n[storage.options.overlay]\n\n# mountopt specifies comma separated list of extra mount options\nmountopt = \"nodev\"\n"
  },
  {
    "path": "vendor/go.podman.io/storage/types/utils.go",
    "content": "package types\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/sirupsen/logrus\"\n\t\"go.podman.io/storage/pkg/fileutils\"\n\t\"go.podman.io/storage/pkg/homedir\"\n)\n\nfunc expandEnvPath(path string, rootlessUID int) (string, error) {\n\tvar err error\n\tpath = strings.ReplaceAll(path, \"$UID\", strconv.Itoa(rootlessUID))\n\tpath = os.ExpandEnv(path)\n\tnewpath, err := filepath.EvalSymlinks(path)\n\tif err != nil {\n\t\tnewpath = filepath.Clean(path)\n\t}\n\treturn newpath, nil\n}\n\nfunc DefaultConfigFile() (string, error) {\n\tif defaultConfigFileSet {\n\t\treturn defaultConfigFile, nil\n\t}\n\n\tif path, ok := os.LookupEnv(storageConfEnv); ok {\n\t\treturn path, nil\n\t}\n\tif !usePerUserStorage() {\n\t\tif err := fileutils.Exists(defaultOverrideConfigFile); err == nil {\n\t\t\treturn defaultOverrideConfigFile, nil\n\t\t}\n\t\treturn defaultConfigFile, nil\n\t}\n\n\tif configHome := os.Getenv(\"XDG_CONFIG_HOME\"); configHome != \"\" {\n\t\treturn filepath.Join(configHome, \"containers/storage.conf\"), nil\n\t}\n\thome := homedir.Get()\n\tif home == \"\" {\n\t\treturn \"\", errors.New(\"cannot determine user's homedir\")\n\t}\n\treturn filepath.Join(home, \".config/containers/storage.conf\"), nil\n}\n\nfunc reloadConfigurationFileIfNeeded(configFile string, storeOptions *StoreOptions) {\n\tprevReloadConfig.mutex.Lock()\n\tdefer prevReloadConfig.mutex.Unlock()\n\n\tfi, err := os.Stat(configFile)\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\tlogrus.Warningf(\"Failed to read %s %v\\n\", configFile, err.Error())\n\t\t}\n\t\treturn\n\t}\n\n\tmtime := fi.ModTime()\n\tif prevReloadConfig.storeOptions != nil && mtime.Equal(prevReloadConfig.mod) && prevReloadConfig.configFile == configFile {\n\t\t*storeOptions = *prevReloadConfig.storeOptions\n\t\treturn\n\t}\n\n\tif err := ReloadConfigurationFile(configFile, storeOptions); err != nil {\n\t\tlogrus.Warningf(\"Failed to reload %q %v\\n\", configFile, err)\n\t\treturn\n\t}\n\n\tprevReloadConfig.storeOptions = storeOptions\n\tprevReloadConfig.mod = mtime\n\tprevReloadConfig.configFile = configFile\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/userns.go",
    "content": "//go:build linux\n\npackage storage\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/user\"\n\t\"strconv\"\n\n\tpathrs \"github.com/cyphar/filepath-securejoin/pathrs-lite\"\n\tlibcontainerUser \"github.com/moby/sys/user\"\n\t\"github.com/sirupsen/logrus\"\n\tdrivers \"go.podman.io/storage/drivers\"\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/pkg/unshare\"\n\t\"go.podman.io/storage/types\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// getAdditionalSubIDs looks up the additional IDs configured for\n// the specified user.\n// The argument USERNAME is ignored for rootless users, as it is not\n// possible to use an arbitrary entry in /etc/sub*id.\n// Differently, if the username is not specified for root users, a\n// default name is used.\nfunc getAdditionalSubIDs(username string) (*idSet, *idSet, error) {\n\tvar uids, gids *idSet\n\n\tif unshare.IsRootless() {\n\t\tusername = os.Getenv(\"USER\")\n\t\tif username == \"\" {\n\t\t\tvar id string\n\t\t\tif os.Geteuid() == 0 {\n\t\t\t\tid = strconv.Itoa(unshare.GetRootlessUID())\n\t\t\t} else {\n\t\t\t\tid = strconv.Itoa(os.Geteuid())\n\t\t\t}\n\t\t\tuserID, err := user.LookupId(id)\n\t\t\tif err == nil {\n\t\t\t\tusername = userID.Username\n\t\t\t}\n\t\t}\n\t} else if username == \"\" {\n\t\tusername = RootAutoUserNsUser\n\t}\n\tmappings, err := idtools.NewIDMappings(username, username)\n\tif err != nil {\n\t\tlogrus.Errorf(\"Cannot find mappings for user %q: %v\", username, err)\n\t} else {\n\t\tuids = getHostIDs(mappings.UIDs())\n\t\tgids = getHostIDs(mappings.GIDs())\n\t}\n\treturn uids, gids, nil\n}\n\n// getAvailableIDs returns the list of ranges that are usable by the current user.\n// When running as root, it looks up the additional IDs assigned to the specified user.\n// When running as rootless, the mappings assigned to the unprivileged user are converted\n// to the IDs inside of the initial rootless user namespace.\nfunc (s *store) getAvailableIDs() (*idSet, *idSet, error) {\n\tif s.additionalUIDs == nil {\n\t\tuids, gids, err := getAdditionalSubIDs(s.autoUsernsUser)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\t// Store the result so we don't need to look it up again next time\n\t\ts.additionalUIDs, s.additionalGIDs = uids, gids\n\t}\n\n\tif !unshare.IsRootless() {\n\t\t// No mapping to inner namespace needed\n\t\treturn s.additionalUIDs, s.additionalGIDs, nil\n\t}\n\n\t// We are already inside of the rootless user namespace.\n\t// We need to remap the configured mappings to what is available\n\t// inside of the rootless userns.\n\tu := newIDSet([]interval{{start: 1, end: s.additionalUIDs.size() + 1}})\n\tg := newIDSet([]interval{{start: 1, end: s.additionalGIDs.size() + 1}})\n\treturn u, g, nil\n}\n\n// nobodyUser returns the UID and GID of the \"nobody\" user.  Hardcode its value\n// for simplicity.\nconst nobodyUser = 65534\n\n// parseMountedFiles returns the maximum UID and GID found in the /etc/passwd and\n// /etc/group files.\nfunc parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {\n\tvar (\n\t\tpasswd *os.File\n\t\tgroup  *os.File\n\t\tsize   int\n\t\terr    error\n\t)\n\tif passwdFile == \"\" {\n\t\tpasswd, err = secureOpen(containerMount, \"/etc/passwd\")\n\t} else {\n\t\t// User-specified override from a volume. Will not be in\n\t\t// container root.\n\t\tpasswd, err = os.Open(passwdFile)\n\t}\n\tif err == nil {\n\t\tdefer passwd.Close()\n\n\t\tusers, err := libcontainerUser.ParsePasswd(passwd)\n\t\tif err == nil {\n\t\t\tfor _, u := range users {\n\t\t\t\t// Skip the \"nobody\" user otherwise we end up with 65536\n\t\t\t\t// ids with most images\n\t\t\t\tif u.Name == \"nobody\" || u.Name == \"nogroup\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif u.Uid > size && u.Uid != nobodyUser {\n\t\t\t\t\tsize = u.Uid + 1\n\t\t\t\t}\n\t\t\t\tif u.Gid > size && u.Gid != nobodyUser {\n\t\t\t\t\tsize = u.Gid + 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif groupFile == \"\" {\n\t\tgroup, err = secureOpen(containerMount, \"/etc/group\")\n\t} else {\n\t\t// User-specified override from a volume. Will not be in\n\t\t// container root.\n\t\tgroup, err = os.Open(groupFile)\n\t}\n\tif err == nil {\n\t\tdefer group.Close()\n\n\t\tgroups, err := libcontainerUser.ParseGroup(group)\n\t\tif err == nil {\n\t\t\tfor _, g := range groups {\n\t\t\t\tif g.Name == \"nobody\" || g.Name == \"nogroup\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif g.Gid > size && g.Gid != nobodyUser {\n\t\t\t\t\tsize = g.Gid + 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn uint32(size)\n}\n\n// getMaxSizeFromImage returns the maximum ID used by the specified image.\n// On entry, rlstore must be locked for writing, and lstores must be locked for reading.\nfunc (s *store) getMaxSizeFromImage(image *Image, rlstore rwLayerStore, lstores []roLayerStore, passwdFile, groupFile string) (_ uint32, retErr error) {\n\tlayerStores := append([]roLayerStore{rlstore}, lstores...)\n\n\tsize := uint32(0)\n\n\tvar topLayer *Layer\n\tlayerName := image.TopLayer\nouter:\n\tfor {\n\t\tfor _, ls := range layerStores {\n\t\t\tlayer, err := ls.Get(layerName)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif image.TopLayer == layerName {\n\t\t\t\ttopLayer = layer\n\t\t\t}\n\t\t\tfor _, uid := range layer.UIDs {\n\t\t\t\tif uid >= size {\n\t\t\t\t\tsize = uid + 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor _, gid := range layer.GIDs {\n\t\t\t\tif gid >= size {\n\t\t\t\t\tsize = gid + 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tlayerName = layer.Parent\n\t\t\tif layerName == \"\" {\n\t\t\t\tbreak outer\n\t\t\t}\n\t\t\tcontinue outer\n\t\t}\n\t\treturn 0, fmt.Errorf(\"cannot find layer %q\", layerName)\n\t}\n\n\tlayerOptions := &LayerOptions{\n\t\tIDMappingOptions: types.IDMappingOptions{\n\t\t\tHostUIDMapping: true,\n\t\t\tHostGIDMapping: true,\n\t\t\tUIDMap:         nil,\n\t\t\tGIDMap:         nil,\n\t\t},\n\t}\n\n\t// We need to create a temporary layer so we can mount it and lookup the\n\t// maximum IDs used.\n\tclayer, _, err := rlstore.create(\"\", topLayer, nil, \"\", nil, layerOptions, false, nil)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer func() {\n\t\tif err2 := rlstore.deleteWhileHoldingLock(clayer.ID); err2 != nil {\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = fmt.Errorf(\"deleting temporary layer %#v: %w\", clayer.ID, err2)\n\t\t\t} else {\n\t\t\t\tlogrus.Errorf(\"Error deleting temporary layer %#v: %v\", clayer.ID, err2)\n\t\t\t}\n\t\t}\n\t}()\n\n\tmountOptions := drivers.MountOpts{\n\t\tMountLabel: \"\",\n\t\tUidMaps:    nil,\n\t\tGidMaps:    nil,\n\t\tOptions:    nil,\n\t}\n\n\tmountpoint, err := rlstore.Mount(clayer.ID, mountOptions)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer func() {\n\t\tif _, err2 := rlstore.unmount(clayer.ID, true, false); err2 != nil {\n\t\t\tif retErr == nil {\n\t\t\t\tretErr = fmt.Errorf(\"unmounting temporary layer %#v: %w\", clayer.ID, err2)\n\t\t\t} else {\n\t\t\t\tlogrus.Errorf(\"Error unmounting temporary layer %#v: %v\", clayer.ID, err2)\n\t\t\t}\n\t\t}\n\t}()\n\n\tuserFilesSize := parseMountedFiles(mountpoint, passwdFile, groupFile)\n\tif userFilesSize > size {\n\t\tsize = userFilesSize\n\t}\n\n\treturn size, nil\n}\n\n// getAutoUserNS creates an automatic user namespace\n// If image != nil, On entry, rlstore must be locked for writing, and lstores must be locked for reading.\nfunc (s *store) getAutoUserNS(options *types.AutoUserNsOptions, image *Image, rlstore rwLayerStore, lstores []roLayerStore) ([]idtools.IDMap, []idtools.IDMap, error) {\n\trequestedSize := uint32(0)\n\tinitialSize := uint32(1)\n\tif options.Size > 0 {\n\t\trequestedSize = options.Size\n\t}\n\tif options.InitialSize > 0 {\n\t\tinitialSize = options.InitialSize\n\t}\n\n\tavailableUIDs, availableGIDs, err := s.getAvailableIDs()\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"cannot read mappings: %w\", err)\n\t}\n\n\t// Look at every container that is using a user namespace and store\n\t// the intervals that are already used.\n\tcontainers, err := s.Containers()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tvar usedUIDs, usedGIDs []idtools.IDMap\n\tfor _, c := range containers {\n\t\tusedUIDs = append(usedUIDs, c.UIDMap...)\n\t\tusedGIDs = append(usedGIDs, c.GIDMap...)\n\t}\n\n\tsize := requestedSize\n\n\t// If there is no requestedSize, lookup the maximum used IDs in the layers\n\t// metadata.  Make sure the size is at least s.autoNsMinSize and it is not\n\t// bigger than s.autoNsMaxSize.\n\t// This is a best effort heuristic.\n\tif requestedSize == 0 {\n\t\tsize = max(s.autoNsMinSize, initialSize)\n\t\tif image != nil {\n\t\t\tsizeFromImage, err := s.getMaxSizeFromImage(image, rlstore, lstores, options.PasswdFile, options.GroupFile)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\tif sizeFromImage > size {\n\t\t\t\tsize = sizeFromImage\n\t\t\t}\n\t\t}\n\t\tif s.autoNsMaxSize > 0 && size > s.autoNsMaxSize {\n\t\t\treturn nil, nil, fmt.Errorf(\"the container needs a user namespace with size %v that is bigger than the maximum value allowed with userns=auto %v\", size, s.autoNsMaxSize)\n\t\t}\n\t}\n\n\treturn getAutoUserNSIDMappings(\n\t\tint(size),\n\t\tavailableUIDs, availableGIDs,\n\t\tusedUIDs, usedGIDs,\n\t\toptions.AdditionalUIDMappings, options.AdditionalGIDMappings,\n\t)\n}\n\n// getAutoUserNSIDMappings computes the user/group id mappings for the automatic user namespace.\nfunc getAutoUserNSIDMappings(\n\tsize int,\n\tavailableUIDs, availableGIDs *idSet,\n\tusedUIDMappings, usedGIDMappings, additionalUIDMappings, additionalGIDMappings []idtools.IDMap,\n) ([]idtools.IDMap, []idtools.IDMap, error) {\n\tusedUIDs := getHostIDs(append(usedUIDMappings, additionalUIDMappings...))\n\tusedGIDs := getHostIDs(append(usedGIDMappings, additionalGIDMappings...))\n\n\t// Exclude additional uids and gids from requested range.\n\ttargetIDs := newIDSet([]interval{{start: 0, end: size}})\n\trequestedContainerUIDs := targetIDs.subtract(getContainerIDs(additionalUIDMappings))\n\trequestedContainerGIDs := targetIDs.subtract(getContainerIDs(additionalGIDMappings))\n\n\t// Make sure the specified additional IDs are not used as part of the automatic\n\t// mapping\n\tavailableUIDs, err := availableUIDs.subtract(usedUIDs).findAvailable(requestedContainerUIDs.size())\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tavailableGIDs, err = availableGIDs.subtract(usedGIDs).findAvailable(requestedContainerGIDs.size())\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tuidMap := append(availableUIDs.zip(requestedContainerUIDs), additionalUIDMappings...)\n\tgidMap := append(availableGIDs.zip(requestedContainerGIDs), additionalGIDMappings...)\n\treturn uidMap, gidMap, nil\n}\n\n// Securely open (read-only) a file in a container mount.\nfunc secureOpen(containerMount, file string) (*os.File, error) {\n\ttmpFile, err := pathrs.OpenInRoot(containerMount, file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer tmpFile.Close()\n\n\treturn pathrs.Reopen(tmpFile, unix.O_RDONLY)\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/userns_unsupported.go",
    "content": "//go:build !linux\n\npackage storage\n\nimport (\n\t\"errors\"\n\n\t\"go.podman.io/storage/pkg/idtools\"\n\t\"go.podman.io/storage/types\"\n)\n\nfunc (s *store) getAutoUserNS(_ *types.AutoUserNsOptions, _ *Image, _ rwLayerStore, _ []roLayerStore) ([]idtools.IDMap, []idtools.IDMap, error) {\n\treturn nil, nil, errors.New(\"user namespaces are not supported on this platform\")\n}\n"
  },
  {
    "path": "vendor/go.podman.io/storage/utils.go",
    "content": "package storage\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\n\t\"go.podman.io/storage/types\"\n)\n\n// ParseIDMapping takes idmappings and subuid and subgid maps and returns a storage mapping\nfunc ParseIDMapping(UIDMapSlice, GIDMapSlice []string, subUIDMap, subGIDMap string) (*types.IDMappingOptions, error) {\n\treturn types.ParseIDMapping(UIDMapSlice, GIDMapSlice, subUIDMap, subGIDMap)\n}\n\n// DefaultStoreOptions returns the default storage options for containers\nfunc DefaultStoreOptions() (types.StoreOptions, error) {\n\treturn types.DefaultStoreOptions()\n}\n\nfunc validateMountOptions(mountOptions []string) error {\n\tvar Empty struct{}\n\t// Add invalid options for ImageMount() here.\n\tinvalidOptions := map[string]struct{}{\n\t\t\"rw\": Empty,\n\t}\n\n\tfor _, opt := range mountOptions {\n\t\tif _, ok := invalidOptions[opt]; ok {\n\t\t\treturn fmt.Errorf(\" %q option not supported\", opt)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc applyNameOperation(oldNames []string, opParameters []string, op updateNameOperation) ([]string, error) {\n\tvar result []string\n\tswitch op {\n\tcase setNames:\n\t\t// ignore all old names and just return new names\n\t\tresult = opParameters\n\tcase removeNames:\n\t\t// remove given names from old names\n\t\tresult = make([]string, 0, len(oldNames))\n\t\tfor _, name := range oldNames {\n\t\t\tif !slices.Contains(opParameters, name) {\n\t\t\t\tresult = append(result, name)\n\t\t\t}\n\t\t}\n\tcase addNames:\n\t\tresult = slices.Concat(opParameters, oldNames)\n\tdefault:\n\t\treturn result, errInvalidUpdateNameOperation\n\t}\n\treturn dedupeStrings(result), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/cast5/cast5.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package cast5 implements CAST5, as defined in RFC 2144.\n//\n// CAST5 is a legacy cipher and its short block size makes it vulnerable to\n// birthday bound attacks (see https://sweet32.info). It should only be used\n// where compatibility with legacy systems, not security, is the goal.\n//\n// Deprecated: any new system should use AES (from crypto/aes, if necessary in\n// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from\n// golang.org/x/crypto/chacha20poly1305).\npackage cast5\n\nimport (\n\t\"errors\"\n\t\"math/bits\"\n)\n\nconst BlockSize = 8\nconst KeySize = 16\n\ntype Cipher struct {\n\tmasking [16]uint32\n\trotate  [16]uint8\n}\n\nfunc NewCipher(key []byte) (c *Cipher, err error) {\n\tif len(key) != KeySize {\n\t\treturn nil, errors.New(\"CAST5: keys must be 16 bytes\")\n\t}\n\n\tc = new(Cipher)\n\tc.keySchedule(key)\n\treturn\n}\n\nfunc (c *Cipher) BlockSize() int {\n\treturn BlockSize\n}\n\nfunc (c *Cipher) Encrypt(dst, src []byte) {\n\tl := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])\n\tr := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])\n\n\tl, r = r, l^f1(r, c.masking[0], c.rotate[0])\n\tl, r = r, l^f2(r, c.masking[1], c.rotate[1])\n\tl, r = r, l^f3(r, c.masking[2], c.rotate[2])\n\tl, r = r, l^f1(r, c.masking[3], c.rotate[3])\n\n\tl, r = r, l^f2(r, c.masking[4], c.rotate[4])\n\tl, r = r, l^f3(r, c.masking[5], c.rotate[5])\n\tl, r = r, l^f1(r, c.masking[6], c.rotate[6])\n\tl, r = r, l^f2(r, c.masking[7], c.rotate[7])\n\n\tl, r = r, l^f3(r, c.masking[8], c.rotate[8])\n\tl, r = r, l^f1(r, c.masking[9], c.rotate[9])\n\tl, r = r, l^f2(r, c.masking[10], c.rotate[10])\n\tl, r = r, l^f3(r, c.masking[11], c.rotate[11])\n\n\tl, r = r, l^f1(r, c.masking[12], c.rotate[12])\n\tl, r = r, l^f2(r, c.masking[13], c.rotate[13])\n\tl, r = r, l^f3(r, c.masking[14], c.rotate[14])\n\tl, r = r, l^f1(r, c.masking[15], c.rotate[15])\n\n\tdst[0] = uint8(r >> 24)\n\tdst[1] = uint8(r >> 16)\n\tdst[2] = uint8(r >> 8)\n\tdst[3] = uint8(r)\n\tdst[4] = uint8(l >> 24)\n\tdst[5] = uint8(l >> 16)\n\tdst[6] = uint8(l >> 8)\n\tdst[7] = uint8(l)\n}\n\nfunc (c *Cipher) Decrypt(dst, src []byte) {\n\tl := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])\n\tr := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])\n\n\tl, r = r, l^f1(r, c.masking[15], c.rotate[15])\n\tl, r = r, l^f3(r, c.masking[14], c.rotate[14])\n\tl, r = r, l^f2(r, c.masking[13], c.rotate[13])\n\tl, r = r, l^f1(r, c.masking[12], c.rotate[12])\n\n\tl, r = r, l^f3(r, c.masking[11], c.rotate[11])\n\tl, r = r, l^f2(r, c.masking[10], c.rotate[10])\n\tl, r = r, l^f1(r, c.masking[9], c.rotate[9])\n\tl, r = r, l^f3(r, c.masking[8], c.rotate[8])\n\n\tl, r = r, l^f2(r, c.masking[7], c.rotate[7])\n\tl, r = r, l^f1(r, c.masking[6], c.rotate[6])\n\tl, r = r, l^f3(r, c.masking[5], c.rotate[5])\n\tl, r = r, l^f2(r, c.masking[4], c.rotate[4])\n\n\tl, r = r, l^f1(r, c.masking[3], c.rotate[3])\n\tl, r = r, l^f3(r, c.masking[2], c.rotate[2])\n\tl, r = r, l^f2(r, c.masking[1], c.rotate[1])\n\tl, r = r, l^f1(r, c.masking[0], c.rotate[0])\n\n\tdst[0] = uint8(r >> 24)\n\tdst[1] = uint8(r >> 16)\n\tdst[2] = uint8(r >> 8)\n\tdst[3] = uint8(r)\n\tdst[4] = uint8(l >> 24)\n\tdst[5] = uint8(l >> 16)\n\tdst[6] = uint8(l >> 8)\n\tdst[7] = uint8(l)\n}\n\ntype keyScheduleA [4][7]uint8\ntype keyScheduleB [4][5]uint8\n\n// keyScheduleRound contains the magic values for a round of the key schedule.\n// The keyScheduleA deals with the lines like:\n//   z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8]\n// Conceptually, both x and z are in the same array, x first. The first\n// element describes which word of this array gets written to and the\n// second, which word gets read. So, for the line above, it's \"4, 0\", because\n// it's writing to the first word of z, which, being after x, is word 4, and\n// reading from the first word of x: word 0.\n//\n// Next are the indexes into the S-boxes. Now the array is treated as bytes. So\n// \"xD\" is 0xd. The first byte of z is written as \"16 + 0\", just to be clear\n// that it's z that we're indexing.\n//\n// keyScheduleB deals with lines like:\n//   K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2]\n// \"K1\" is ignored because key words are always written in order. So the five\n// elements are the S-box indexes. They use the same form as in keyScheduleA,\n// above.\n\ntype keyScheduleRound struct{}\ntype keySchedule []keyScheduleRound\n\nvar schedule = []struct {\n\ta keyScheduleA\n\tb keyScheduleB\n}{\n\t{\n\t\tkeyScheduleA{\n\t\t\t{4, 0, 0xd, 0xf, 0xc, 0xe, 0x8},\n\t\t\t{5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},\n\t\t\t{6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},\n\t\t\t{7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},\n\t\t},\n\t\tkeyScheduleB{\n\t\t\t{16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2},\n\t\t\t{16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6},\n\t\t\t{16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9},\n\t\t\t{16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc},\n\t\t},\n\t},\n\t{\n\t\tkeyScheduleA{\n\t\t\t{0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},\n\t\t\t{1, 4, 0, 2, 1, 3, 16 + 2},\n\t\t\t{2, 5, 7, 6, 5, 4, 16 + 1},\n\t\t\t{3, 7, 0xa, 9, 0xb, 8, 16 + 3},\n\t\t},\n\t\tkeyScheduleB{\n\t\t\t{3, 2, 0xc, 0xd, 8},\n\t\t\t{1, 0, 0xe, 0xf, 0xd},\n\t\t\t{7, 6, 8, 9, 3},\n\t\t\t{5, 4, 0xa, 0xb, 7},\n\t\t},\n\t},\n\t{\n\t\tkeyScheduleA{\n\t\t\t{4, 0, 0xd, 0xf, 0xc, 0xe, 8},\n\t\t\t{5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},\n\t\t\t{6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},\n\t\t\t{7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},\n\t\t},\n\t\tkeyScheduleB{\n\t\t\t{16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9},\n\t\t\t{16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc},\n\t\t\t{16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2},\n\t\t\t{16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6},\n\t\t},\n\t},\n\t{\n\t\tkeyScheduleA{\n\t\t\t{0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},\n\t\t\t{1, 4, 0, 2, 1, 3, 16 + 2},\n\t\t\t{2, 5, 7, 6, 5, 4, 16 + 1},\n\t\t\t{3, 7, 0xa, 9, 0xb, 8, 16 + 3},\n\t\t},\n\t\tkeyScheduleB{\n\t\t\t{8, 9, 7, 6, 3},\n\t\t\t{0xa, 0xb, 5, 4, 7},\n\t\t\t{0xc, 0xd, 3, 2, 8},\n\t\t\t{0xe, 0xf, 1, 0, 0xd},\n\t\t},\n\t},\n}\n\nfunc (c *Cipher) keySchedule(in []byte) {\n\tvar t [8]uint32\n\tvar k [32]uint32\n\n\tfor i := 0; i < 4; i++ {\n\t\tj := i * 4\n\t\tt[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3])\n\t}\n\n\tx := []byte{6, 7, 4, 5}\n\tki := 0\n\n\tfor half := 0; half < 2; half++ {\n\t\tfor _, round := range schedule {\n\t\t\tfor j := 0; j < 4; j++ {\n\t\t\t\tvar a [7]uint8\n\t\t\t\tcopy(a[:], round.a[j][:])\n\t\t\t\tw := t[a[1]]\n\t\t\t\tw ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff]\n\t\t\t\tw ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff]\n\t\t\t\tw ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff]\n\t\t\t\tw ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff]\n\t\t\t\tw ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff]\n\t\t\t\tt[a[0]] = w\n\t\t\t}\n\n\t\t\tfor j := 0; j < 4; j++ {\n\t\t\t\tvar b [5]uint8\n\t\t\t\tcopy(b[:], round.b[j][:])\n\t\t\t\tw := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff]\n\t\t\t\tw ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff]\n\t\t\t\tw ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff]\n\t\t\t\tw ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff]\n\t\t\t\tw ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff]\n\t\t\t\tk[ki] = w\n\t\t\t\tki++\n\t\t\t}\n\t\t}\n\t}\n\n\tfor i := 0; i < 16; i++ {\n\t\tc.masking[i] = k[i]\n\t\tc.rotate[i] = uint8(k[16+i] & 0x1f)\n\t}\n}\n\n// These are the three 'f' functions. See RFC 2144, section 2.2.\nfunc f1(d, m uint32, r uint8) uint32 {\n\tt := m + d\n\tI := bits.RotateLeft32(t, int(r))\n\treturn ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff]\n}\n\nfunc f2(d, m uint32, r uint8) uint32 {\n\tt := m ^ d\n\tI := bits.RotateLeft32(t, int(r))\n\treturn ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff]\n}\n\nfunc f3(d, m uint32, r uint8) uint32 {\n\tt := m - d\n\tI := bits.RotateLeft32(t, int(r))\n\treturn ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff]\n}\n\nvar sBox = [8][256]uint32{\n\t{\n\t\t0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,\n\t\t0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,\n\t\t0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,\n\t\t0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,\n\t\t0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,\n\t\t0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,\n\t\t0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,\n\t\t0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,\n\t\t0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,\n\t\t0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,\n\t\t0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,\n\t\t0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,\n\t\t0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,\n\t\t0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,\n\t\t0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,\n\t\t0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,\n\t\t0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,\n\t\t0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,\n\t\t0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,\n\t\t0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,\n\t\t0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,\n\t\t0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,\n\t\t0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,\n\t\t0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,\n\t\t0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,\n\t\t0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,\n\t\t0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,\n\t\t0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,\n\t\t0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,\n\t\t0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,\n\t\t0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,\n\t\t0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf,\n\t},\n\t{\n\t\t0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,\n\t\t0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,\n\t\t0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,\n\t\t0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,\n\t\t0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,\n\t\t0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,\n\t\t0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,\n\t\t0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,\n\t\t0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,\n\t\t0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,\n\t\t0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,\n\t\t0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,\n\t\t0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,\n\t\t0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,\n\t\t0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,\n\t\t0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,\n\t\t0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,\n\t\t0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,\n\t\t0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,\n\t\t0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,\n\t\t0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,\n\t\t0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,\n\t\t0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,\n\t\t0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,\n\t\t0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,\n\t\t0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,\n\t\t0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,\n\t\t0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,\n\t\t0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,\n\t\t0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,\n\t\t0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,\n\t\t0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1,\n\t},\n\t{\n\t\t0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,\n\t\t0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,\n\t\t0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,\n\t\t0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,\n\t\t0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,\n\t\t0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,\n\t\t0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,\n\t\t0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,\n\t\t0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,\n\t\t0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,\n\t\t0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,\n\t\t0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,\n\t\t0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,\n\t\t0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,\n\t\t0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,\n\t\t0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,\n\t\t0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,\n\t\t0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,\n\t\t0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,\n\t\t0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,\n\t\t0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,\n\t\t0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,\n\t\t0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,\n\t\t0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,\n\t\t0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,\n\t\t0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,\n\t\t0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,\n\t\t0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,\n\t\t0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,\n\t\t0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,\n\t\t0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,\n\t\t0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783,\n\t},\n\t{\n\t\t0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,\n\t\t0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,\n\t\t0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,\n\t\t0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,\n\t\t0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,\n\t\t0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,\n\t\t0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,\n\t\t0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,\n\t\t0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,\n\t\t0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,\n\t\t0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,\n\t\t0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,\n\t\t0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,\n\t\t0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,\n\t\t0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,\n\t\t0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,\n\t\t0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,\n\t\t0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,\n\t\t0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,\n\t\t0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,\n\t\t0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,\n\t\t0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,\n\t\t0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,\n\t\t0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,\n\t\t0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,\n\t\t0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,\n\t\t0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,\n\t\t0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,\n\t\t0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,\n\t\t0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,\n\t\t0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,\n\t\t0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2,\n\t},\n\t{\n\t\t0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,\n\t\t0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,\n\t\t0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,\n\t\t0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,\n\t\t0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,\n\t\t0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,\n\t\t0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,\n\t\t0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,\n\t\t0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,\n\t\t0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,\n\t\t0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,\n\t\t0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,\n\t\t0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,\n\t\t0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,\n\t\t0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,\n\t\t0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,\n\t\t0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,\n\t\t0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,\n\t\t0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,\n\t\t0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,\n\t\t0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,\n\t\t0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,\n\t\t0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,\n\t\t0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,\n\t\t0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,\n\t\t0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,\n\t\t0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,\n\t\t0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,\n\t\t0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,\n\t\t0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,\n\t\t0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,\n\t\t0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4,\n\t},\n\t{\n\t\t0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,\n\t\t0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,\n\t\t0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,\n\t\t0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,\n\t\t0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,\n\t\t0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,\n\t\t0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,\n\t\t0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,\n\t\t0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,\n\t\t0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,\n\t\t0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,\n\t\t0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,\n\t\t0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,\n\t\t0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,\n\t\t0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,\n\t\t0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,\n\t\t0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,\n\t\t0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,\n\t\t0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,\n\t\t0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,\n\t\t0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,\n\t\t0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,\n\t\t0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,\n\t\t0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,\n\t\t0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,\n\t\t0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,\n\t\t0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,\n\t\t0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,\n\t\t0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,\n\t\t0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,\n\t\t0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,\n\t\t0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f,\n\t},\n\t{\n\t\t0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,\n\t\t0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,\n\t\t0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,\n\t\t0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,\n\t\t0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,\n\t\t0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,\n\t\t0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,\n\t\t0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,\n\t\t0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,\n\t\t0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,\n\t\t0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,\n\t\t0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,\n\t\t0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,\n\t\t0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,\n\t\t0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,\n\t\t0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,\n\t\t0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,\n\t\t0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,\n\t\t0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,\n\t\t0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,\n\t\t0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,\n\t\t0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,\n\t\t0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,\n\t\t0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,\n\t\t0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,\n\t\t0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,\n\t\t0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,\n\t\t0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,\n\t\t0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,\n\t\t0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,\n\t\t0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,\n\t\t0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3,\n\t},\n\t{\n\t\t0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,\n\t\t0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,\n\t\t0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,\n\t\t0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,\n\t\t0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,\n\t\t0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,\n\t\t0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,\n\t\t0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,\n\t\t0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,\n\t\t0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,\n\t\t0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,\n\t\t0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,\n\t\t0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,\n\t\t0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,\n\t\t0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,\n\t\t0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,\n\t\t0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,\n\t\t0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,\n\t\t0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,\n\t\t0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,\n\t\t0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,\n\t\t0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,\n\t\t0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,\n\t\t0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,\n\t\t0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,\n\t\t0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,\n\t\t0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,\n\t\t0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,\n\t\t0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,\n\t\t0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,\n\t\t0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,\n\t\t0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e,\n\t},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package asn1 contains supporting types for parsing and building ASN.1\n// messages with the cryptobyte package.\npackage asn1\n\n// Tag represents an ASN.1 identifier octet, consisting of a tag number\n// (indicating a type) and class (such as context-specific or constructed).\n//\n// Methods in the cryptobyte package only support the low-tag-number form, i.e.\n// a single identifier octet with bits 7-8 encoding the class and bits 1-6\n// encoding the tag number.\ntype Tag uint8\n\nconst (\n\tclassConstructed     = 0x20\n\tclassContextSpecific = 0x80\n)\n\n// Constructed returns t with the constructed class bit set.\nfunc (t Tag) Constructed() Tag { return t | classConstructed }\n\n// ContextSpecific returns t with the context-specific class bit set.\nfunc (t Tag) ContextSpecific() Tag { return t | classContextSpecific }\n\n// The following is a list of standard tag and class combinations.\nconst (\n\tBOOLEAN           = Tag(1)\n\tINTEGER           = Tag(2)\n\tBIT_STRING        = Tag(3)\n\tOCTET_STRING      = Tag(4)\n\tNULL              = Tag(5)\n\tOBJECT_IDENTIFIER = Tag(6)\n\tENUM              = Tag(10)\n\tUTF8String        = Tag(12)\n\tSEQUENCE          = Tag(16 | classConstructed)\n\tSET               = Tag(17 | classConstructed)\n\tPrintableString   = Tag(19)\n\tT61String         = Tag(20)\n\tIA5String         = Tag(22)\n\tUTCTime           = Tag(23)\n\tGeneralizedTime   = Tag(24)\n\tGeneralString     = Tag(27)\n)\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/cryptobyte/asn1.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cryptobyte\n\nimport (\n\tencoding_asn1 \"encoding/asn1\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/cryptobyte/asn1\"\n)\n\n// This file contains ASN.1-related methods for String and Builder.\n\n// Builder\n\n// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER.\nfunc (b *Builder) AddASN1Int64(v int64) {\n\tb.addASN1Signed(asn1.INTEGER, v)\n}\n\n// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the\n// given tag.\nfunc (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) {\n\tb.addASN1Signed(tag, v)\n}\n\n// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.\nfunc (b *Builder) AddASN1Enum(v int64) {\n\tb.addASN1Signed(asn1.ENUM, v)\n}\n\nfunc (b *Builder) addASN1Signed(tag asn1.Tag, v int64) {\n\tb.AddASN1(tag, func(c *Builder) {\n\t\tlength := 1\n\t\tfor i := v; i >= 0x80 || i < -0x80; i >>= 8 {\n\t\t\tlength++\n\t\t}\n\n\t\tfor ; length > 0; length-- {\n\t\t\ti := v >> uint((length-1)*8) & 0xff\n\t\t\tc.AddUint8(uint8(i))\n\t\t}\n\t})\n}\n\n// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER.\nfunc (b *Builder) AddASN1Uint64(v uint64) {\n\tb.AddASN1(asn1.INTEGER, func(c *Builder) {\n\t\tlength := 1\n\t\tfor i := v; i >= 0x80; i >>= 8 {\n\t\t\tlength++\n\t\t}\n\n\t\tfor ; length > 0; length-- {\n\t\t\ti := v >> uint((length-1)*8) & 0xff\n\t\t\tc.AddUint8(uint8(i))\n\t\t}\n\t})\n}\n\n// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER.\nfunc (b *Builder) AddASN1BigInt(n *big.Int) {\n\tif b.err != nil {\n\t\treturn\n\t}\n\n\tb.AddASN1(asn1.INTEGER, func(c *Builder) {\n\t\tif n.Sign() < 0 {\n\t\t\t// A negative number has to be converted to two's-complement form. So we\n\t\t\t// invert and subtract 1. If the most-significant-bit isn't set then\n\t\t\t// we'll need to pad the beginning with 0xff in order to keep the number\n\t\t\t// negative.\n\t\t\tnMinus1 := new(big.Int).Neg(n)\n\t\t\tnMinus1.Sub(nMinus1, bigOne)\n\t\t\tbytes := nMinus1.Bytes()\n\t\t\tfor i := range bytes {\n\t\t\t\tbytes[i] ^= 0xff\n\t\t\t}\n\t\t\tif len(bytes) == 0 || bytes[0]&0x80 == 0 {\n\t\t\t\tc.add(0xff)\n\t\t\t}\n\t\t\tc.add(bytes...)\n\t\t} else if n.Sign() == 0 {\n\t\t\tc.add(0)\n\t\t} else {\n\t\t\tbytes := n.Bytes()\n\t\t\tif bytes[0]&0x80 != 0 {\n\t\t\t\tc.add(0)\n\t\t\t}\n\t\t\tc.add(bytes...)\n\t\t}\n\t})\n}\n\n// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING.\nfunc (b *Builder) AddASN1OctetString(bytes []byte) {\n\tb.AddASN1(asn1.OCTET_STRING, func(c *Builder) {\n\t\tc.AddBytes(bytes)\n\t})\n}\n\nconst generalizedTimeFormatStr = \"20060102150405Z0700\"\n\n// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME.\nfunc (b *Builder) AddASN1GeneralizedTime(t time.Time) {\n\tif t.Year() < 0 || t.Year() > 9999 {\n\t\tb.err = fmt.Errorf(\"cryptobyte: cannot represent %v as a GeneralizedTime\", t)\n\t\treturn\n\t}\n\tb.AddASN1(asn1.GeneralizedTime, func(c *Builder) {\n\t\tc.AddBytes([]byte(t.Format(generalizedTimeFormatStr)))\n\t})\n}\n\n// AddASN1UTCTime appends a DER-encoded ASN.1 UTCTime.\nfunc (b *Builder) AddASN1UTCTime(t time.Time) {\n\tb.AddASN1(asn1.UTCTime, func(c *Builder) {\n\t\t// As utilized by the X.509 profile, UTCTime can only\n\t\t// represent the years 1950 through 2049.\n\t\tif t.Year() < 1950 || t.Year() >= 2050 {\n\t\t\tb.err = fmt.Errorf(\"cryptobyte: cannot represent %v as a UTCTime\", t)\n\t\t\treturn\n\t\t}\n\t\tc.AddBytes([]byte(t.Format(defaultUTCTimeFormatStr)))\n\t})\n}\n\n// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not\n// support BIT STRINGs that are not a whole number of bytes.\nfunc (b *Builder) AddASN1BitString(data []byte) {\n\tb.AddASN1(asn1.BIT_STRING, func(b *Builder) {\n\t\tb.AddUint8(0)\n\t\tb.AddBytes(data)\n\t})\n}\n\nfunc (b *Builder) addBase128Int(n int64) {\n\tvar length int\n\tif n == 0 {\n\t\tlength = 1\n\t} else {\n\t\tfor i := n; i > 0; i >>= 7 {\n\t\t\tlength++\n\t\t}\n\t}\n\n\tfor i := length - 1; i >= 0; i-- {\n\t\to := byte(n >> uint(i*7))\n\t\to &= 0x7f\n\t\tif i != 0 {\n\t\t\to |= 0x80\n\t\t}\n\n\t\tb.add(o)\n\t}\n}\n\nfunc isValidOID(oid encoding_asn1.ObjectIdentifier) bool {\n\tif len(oid) < 2 {\n\t\treturn false\n\t}\n\n\tif oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) {\n\t\treturn false\n\t}\n\n\tfor _, v := range oid {\n\t\tif v < 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) {\n\tb.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) {\n\t\tif !isValidOID(oid) {\n\t\t\tb.err = fmt.Errorf(\"cryptobyte: invalid OID: %v\", oid)\n\t\t\treturn\n\t\t}\n\n\t\tb.addBase128Int(int64(oid[0])*40 + int64(oid[1]))\n\t\tfor _, v := range oid[2:] {\n\t\t\tb.addBase128Int(int64(v))\n\t\t}\n\t})\n}\n\nfunc (b *Builder) AddASN1Boolean(v bool) {\n\tb.AddASN1(asn1.BOOLEAN, func(b *Builder) {\n\t\tif v {\n\t\t\tb.AddUint8(0xff)\n\t\t} else {\n\t\t\tb.AddUint8(0)\n\t\t}\n\t})\n}\n\nfunc (b *Builder) AddASN1NULL() {\n\tb.add(uint8(asn1.NULL), 0)\n}\n\n// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if\n// successful or records an error if one occurred.\nfunc (b *Builder) MarshalASN1(v interface{}) {\n\t// NOTE(martinkr): This is somewhat of a hack to allow propagation of\n\t// encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a\n\t// value embedded into a struct, its tag information is lost.\n\tif b.err != nil {\n\t\treturn\n\t}\n\tbytes, err := encoding_asn1.Marshal(v)\n\tif err != nil {\n\t\tb.err = err\n\t\treturn\n\t}\n\tb.AddBytes(bytes)\n}\n\n// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag.\n// Tags greater than 30 are not supported and result in an error (i.e.\n// low-tag-number form only). The child builder passed to the\n// BuilderContinuation can be used to build the content of the ASN.1 object.\nfunc (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) {\n\tif b.err != nil {\n\t\treturn\n\t}\n\t// Identifiers with the low five bits set indicate high-tag-number format\n\t// (two or more octets), which we don't support.\n\tif tag&0x1f == 0x1f {\n\t\tb.err = fmt.Errorf(\"cryptobyte: high-tag number identifier octets not supported: 0x%x\", tag)\n\t\treturn\n\t}\n\tb.AddUint8(uint8(tag))\n\tb.addLengthPrefixed(1, true, f)\n}\n\n// String\n\n// ReadASN1Boolean decodes an ASN.1 BOOLEAN and converts it to a boolean\n// representation into out and advances. It reports whether the read\n// was successful.\nfunc (s *String) ReadASN1Boolean(out *bool) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.BOOLEAN) || len(bytes) != 1 {\n\t\treturn false\n\t}\n\n\tswitch bytes[0] {\n\tcase 0:\n\t\t*out = false\n\tcase 0xff:\n\t\t*out = true\n\tdefault:\n\t\treturn false\n\t}\n\n\treturn true\n}\n\n// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does\n// not point to an integer, to a big.Int, or to a []byte it panics. Only\n// positive and zero values can be decoded into []byte, and they are returned as\n// big-endian binary values that share memory with s. Positive values will have\n// no leading zeroes, and zero will be returned as a single zero byte.\n// ReadASN1Integer reports whether the read was successful.\nfunc (s *String) ReadASN1Integer(out interface{}) bool {\n\tswitch out := out.(type) {\n\tcase *int, *int8, *int16, *int32, *int64:\n\t\tvar i int64\n\t\tif !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) {\n\t\t\treturn false\n\t\t}\n\t\treflect.ValueOf(out).Elem().SetInt(i)\n\t\treturn true\n\tcase *uint, *uint8, *uint16, *uint32, *uint64:\n\t\tvar u uint64\n\t\tif !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) {\n\t\t\treturn false\n\t\t}\n\t\treflect.ValueOf(out).Elem().SetUint(u)\n\t\treturn true\n\tcase *big.Int:\n\t\treturn s.readASN1BigInt(out)\n\tcase *[]byte:\n\t\treturn s.readASN1Bytes(out)\n\tdefault:\n\t\tpanic(\"out does not point to an integer type\")\n\t}\n}\n\nfunc checkASN1Integer(bytes []byte) bool {\n\tif len(bytes) == 0 {\n\t\t// An INTEGER is encoded with at least one octet.\n\t\treturn false\n\t}\n\tif len(bytes) == 1 {\n\t\treturn true\n\t}\n\tif bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 {\n\t\t// Value is not minimally encoded.\n\t\treturn false\n\t}\n\treturn true\n}\n\nvar bigOne = big.NewInt(1)\n\nfunc (s *String) readASN1BigInt(out *big.Int) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {\n\t\treturn false\n\t}\n\tif bytes[0]&0x80 == 0x80 {\n\t\t// Negative number.\n\t\tneg := make([]byte, len(bytes))\n\t\tfor i, b := range bytes {\n\t\t\tneg[i] = ^b\n\t\t}\n\t\tout.SetBytes(neg)\n\t\tout.Add(out, bigOne)\n\t\tout.Neg(out)\n\t} else {\n\t\tout.SetBytes(bytes)\n\t}\n\treturn true\n}\n\nfunc (s *String) readASN1Bytes(out *[]byte) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {\n\t\treturn false\n\t}\n\tif bytes[0]&0x80 == 0x80 {\n\t\treturn false\n\t}\n\tfor len(bytes) > 1 && bytes[0] == 0 {\n\t\tbytes = bytes[1:]\n\t}\n\t*out = bytes\n\treturn true\n}\n\nfunc (s *String) readASN1Int64(out *int64) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc asn1Signed(out *int64, n []byte) bool {\n\tlength := len(n)\n\tif length > 8 {\n\t\treturn false\n\t}\n\tfor i := 0; i < length; i++ {\n\t\t*out <<= 8\n\t\t*out |= int64(n[i])\n\t}\n\t// Shift up and down in order to sign extend the result.\n\t*out <<= 64 - uint8(length)*8\n\t*out >>= 64 - uint8(length)*8\n\treturn true\n}\n\nfunc (s *String) readASN1Uint64(out *uint64) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc asn1Unsigned(out *uint64, n []byte) bool {\n\tlength := len(n)\n\tif length > 9 || length == 9 && n[0] != 0 {\n\t\t// Too large for uint64.\n\t\treturn false\n\t}\n\tif n[0]&0x80 != 0 {\n\t\t// Negative number.\n\t\treturn false\n\t}\n\tfor i := 0; i < length; i++ {\n\t\t*out <<= 8\n\t\t*out |= uint64(n[i])\n\t}\n\treturn true\n}\n\n// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out\n// and advances. It reports whether the read was successful and resulted in a\n// value that can be represented in an int64.\nfunc (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool {\n\tvar bytes String\n\treturn s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes)\n}\n\n// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports\n// whether the read was successful.\nfunc (s *String) ReadASN1Enum(out *int) bool {\n\tvar bytes String\n\tvar i int64\n\tif !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {\n\t\treturn false\n\t}\n\tif int64(int(i)) != i {\n\t\treturn false\n\t}\n\t*out = int(i)\n\treturn true\n}\n\nfunc (s *String) readBase128Int(out *int) bool {\n\tret := 0\n\tfor i := 0; len(*s) > 0; i++ {\n\t\tif i == 5 {\n\t\t\treturn false\n\t\t}\n\t\t// Avoid overflowing int on a 32-bit platform.\n\t\t// We don't want different behavior based on the architecture.\n\t\tif ret >= 1<<(31-7) {\n\t\t\treturn false\n\t\t}\n\t\tret <<= 7\n\t\tb := s.read(1)[0]\n\n\t\t// ITU-T X.690, section 8.19.2:\n\t\t// The subidentifier shall be encoded in the fewest possible octets,\n\t\t// that is, the leading octet of the subidentifier shall not have the value 0x80.\n\t\tif i == 0 && b == 0x80 {\n\t\t\treturn false\n\t\t}\n\n\t\tret |= int(b & 0x7f)\n\t\tif b&0x80 == 0 {\n\t\t\t*out = ret\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false // truncated\n}\n\n// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and\n// advances. It reports whether the read was successful.\nfunc (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 {\n\t\treturn false\n\t}\n\n\t// In the worst case, we get two elements from the first byte (which is\n\t// encoded differently) and then every varint is a single byte long.\n\tcomponents := make([]int, len(bytes)+1)\n\n\t// The first varint is 40*value1 + value2:\n\t// According to this packing, value1 can take the values 0, 1 and 2 only.\n\t// When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2,\n\t// then there are no restrictions on value2.\n\tvar v int\n\tif !bytes.readBase128Int(&v) {\n\t\treturn false\n\t}\n\tif v < 80 {\n\t\tcomponents[0] = v / 40\n\t\tcomponents[1] = v % 40\n\t} else {\n\t\tcomponents[0] = 2\n\t\tcomponents[1] = v - 80\n\t}\n\n\ti := 2\n\tfor ; len(bytes) > 0; i++ {\n\t\tif !bytes.readBase128Int(&v) {\n\t\t\treturn false\n\t\t}\n\t\tcomponents[i] = v\n\t}\n\t*out = components[:i]\n\treturn true\n}\n\n// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and\n// advances. It reports whether the read was successful.\nfunc (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.GeneralizedTime) {\n\t\treturn false\n\t}\n\tt := string(bytes)\n\tres, err := time.Parse(generalizedTimeFormatStr, t)\n\tif err != nil {\n\t\treturn false\n\t}\n\tif serialized := res.Format(generalizedTimeFormatStr); serialized != t {\n\t\treturn false\n\t}\n\t*out = res\n\treturn true\n}\n\nconst defaultUTCTimeFormatStr = \"060102150405Z0700\"\n\n// ReadASN1UTCTime decodes an ASN.1 UTCTime into out and advances.\n// It reports whether the read was successful.\nfunc (s *String) ReadASN1UTCTime(out *time.Time) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.UTCTime) {\n\t\treturn false\n\t}\n\tt := string(bytes)\n\n\tformatStr := defaultUTCTimeFormatStr\n\tvar err error\n\tres, err := time.Parse(formatStr, t)\n\tif err != nil {\n\t\t// Fallback to minute precision if we can't parse second\n\t\t// precision. If we are following X.509 or X.690 we shouldn't\n\t\t// support this, but we do.\n\t\tformatStr = \"0601021504Z0700\"\n\t\tres, err = time.Parse(formatStr, t)\n\t}\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tif serialized := res.Format(formatStr); serialized != t {\n\t\treturn false\n\t}\n\n\tif res.Year() >= 2050 {\n\t\t// UTCTime interprets the low order digits 50-99 as 1950-99.\n\t\t// This only applies to its use in the X.509 profile.\n\t\t// See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1\n\t\tres = res.AddDate(-100, 0, 0)\n\t}\n\t*out = res\n\treturn true\n}\n\n// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances.\n// It reports whether the read was successful.\nfunc (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 ||\n\t\tlen(bytes)*8/8 != len(bytes) {\n\t\treturn false\n\t}\n\n\tpaddingBits := bytes[0]\n\tbytes = bytes[1:]\n\tif paddingBits > 7 ||\n\t\tlen(bytes) == 0 && paddingBits != 0 ||\n\t\tlen(bytes) > 0 && bytes[len(bytes)-1]&(1<<paddingBits-1) != 0 {\n\t\treturn false\n\t}\n\n\tout.BitLength = len(bytes)*8 - int(paddingBits)\n\tout.Bytes = bytes\n\treturn true\n}\n\n// ReadASN1BitStringAsBytes decodes an ASN.1 BIT STRING into out and advances. It is\n// an error if the BIT STRING is not a whole number of bytes. It reports\n// whether the read was successful.\nfunc (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool {\n\tvar bytes String\n\tif !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {\n\t\treturn false\n\t}\n\n\tpaddingBits := bytes[0]\n\tif paddingBits != 0 {\n\t\treturn false\n\t}\n\t*out = bytes[1:]\n\treturn true\n}\n\n// ReadASN1Bytes reads the contents of a DER-encoded ASN.1 element (not including\n// tag and length bytes) into out, and advances. The element must match the\n// given tag. It reports whether the read was successful.\nfunc (s *String) ReadASN1Bytes(out *[]byte, tag asn1.Tag) bool {\n\treturn s.ReadASN1((*String)(out), tag)\n}\n\n// ReadASN1 reads the contents of a DER-encoded ASN.1 element (not including\n// tag and length bytes) into out, and advances. The element must match the\n// given tag. It reports whether the read was successful.\n//\n// Tags greater than 30 are not supported (i.e. low-tag-number format only).\nfunc (s *String) ReadASN1(out *String, tag asn1.Tag) bool {\n\tvar t asn1.Tag\n\tif !s.ReadAnyASN1(out, &t) || t != tag {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// ReadASN1Element reads the contents of a DER-encoded ASN.1 element (including\n// tag and length bytes) into out, and advances. The element must match the\n// given tag. It reports whether the read was successful.\n//\n// Tags greater than 30 are not supported (i.e. low-tag-number format only).\nfunc (s *String) ReadASN1Element(out *String, tag asn1.Tag) bool {\n\tvar t asn1.Tag\n\tif !s.ReadAnyASN1Element(out, &t) || t != tag {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// ReadAnyASN1 reads the contents of a DER-encoded ASN.1 element (not including\n// tag and length bytes) into out, sets outTag to its tag, and advances.\n// It reports whether the read was successful.\n//\n// Tags greater than 30 are not supported (i.e. low-tag-number format only).\nfunc (s *String) ReadAnyASN1(out *String, outTag *asn1.Tag) bool {\n\treturn s.readASN1(out, outTag, true /* skip header */)\n}\n\n// ReadAnyASN1Element reads the contents of a DER-encoded ASN.1 element\n// (including tag and length bytes) into out, sets outTag to is tag, and\n// advances. It reports whether the read was successful.\n//\n// Tags greater than 30 are not supported (i.e. low-tag-number format only).\nfunc (s *String) ReadAnyASN1Element(out *String, outTag *asn1.Tag) bool {\n\treturn s.readASN1(out, outTag, false /* include header */)\n}\n\n// PeekASN1Tag reports whether the next ASN.1 value on the string starts with\n// the given tag.\nfunc (s String) PeekASN1Tag(tag asn1.Tag) bool {\n\tif len(s) == 0 {\n\t\treturn false\n\t}\n\treturn asn1.Tag(s[0]) == tag\n}\n\n// SkipASN1 reads and discards an ASN.1 element with the given tag. It\n// reports whether the operation was successful.\nfunc (s *String) SkipASN1(tag asn1.Tag) bool {\n\tvar unused String\n\treturn s.ReadASN1(&unused, tag)\n}\n\n// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.1\n// element (not including tag and length bytes) tagged with the given tag into\n// out. It stores whether an element with the tag was found in outPresent,\n// unless outPresent is nil. It reports whether the read was successful.\nfunc (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) bool {\n\tpresent := s.PeekASN1Tag(tag)\n\tif outPresent != nil {\n\t\t*outPresent = present\n\t}\n\tif present && !s.ReadASN1(out, tag) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// SkipOptionalASN1 advances s over an ASN.1 element with the given tag, or\n// else leaves s unchanged. It reports whether the operation was successful.\nfunc (s *String) SkipOptionalASN1(tag asn1.Tag) bool {\n\tif !s.PeekASN1Tag(tag) {\n\t\treturn true\n\t}\n\tvar unused String\n\treturn s.ReadASN1(&unused, tag)\n}\n\n// ReadOptionalASN1Integer attempts to read an optional ASN.1 INTEGER explicitly\n// tagged with tag into out and advances. If no element with a matching tag is\n// present, it writes defaultValue into out instead. Otherwise, it behaves like\n// ReadASN1Integer.\nfunc (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultValue interface{}) bool {\n\tvar present bool\n\tvar i String\n\tif !s.ReadOptionalASN1(&i, &present, tag) {\n\t\treturn false\n\t}\n\tif !present {\n\t\tswitch out.(type) {\n\t\tcase *int, *int8, *int16, *int32, *int64,\n\t\t\t*uint, *uint8, *uint16, *uint32, *uint64, *[]byte:\n\t\t\treflect.ValueOf(out).Elem().Set(reflect.ValueOf(defaultValue))\n\t\tcase *big.Int:\n\t\t\tif defaultValue, ok := defaultValue.(*big.Int); ok {\n\t\t\t\tout.(*big.Int).Set(defaultValue)\n\t\t\t} else {\n\t\t\t\tpanic(\"out points to big.Int, but defaultValue does not\")\n\t\t\t}\n\t\tdefault:\n\t\t\tpanic(\"invalid integer type\")\n\t\t}\n\t\treturn true\n\t}\n\tif !i.ReadASN1Integer(out) || !i.Empty() {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// ReadOptionalASN1OctetString attempts to read an optional ASN.1 OCTET STRING\n// explicitly tagged with tag into out and advances. If no element with a\n// matching tag is present, it sets \"out\" to nil instead. It reports\n// whether the read was successful.\nfunc (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool {\n\tvar present bool\n\tvar child String\n\tif !s.ReadOptionalASN1(&child, &present, tag) {\n\t\treturn false\n\t}\n\tif outPresent != nil {\n\t\t*outPresent = present\n\t}\n\tif present {\n\t\tvar oct String\n\t\tif !child.ReadASN1(&oct, asn1.OCTET_STRING) || !child.Empty() {\n\t\t\treturn false\n\t\t}\n\t\t*out = oct\n\t} else {\n\t\t*out = nil\n\t}\n\treturn true\n}\n\n// ReadOptionalASN1Boolean attempts to read an optional ASN.1 BOOLEAN\n// explicitly tagged with tag into out and advances. If no element with a\n// matching tag is present, it sets \"out\" to defaultValue instead. It reports\n// whether the read was successful.\nfunc (s *String) ReadOptionalASN1Boolean(out *bool, tag asn1.Tag, defaultValue bool) bool {\n\tvar present bool\n\tvar child String\n\tif !s.ReadOptionalASN1(&child, &present, tag) {\n\t\treturn false\n\t}\n\n\tif !present {\n\t\t*out = defaultValue\n\t\treturn true\n\t}\n\n\treturn child.ReadASN1Boolean(out)\n}\n\nfunc (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {\n\tif len(*s) < 2 {\n\t\treturn false\n\t}\n\ttag, lenByte := (*s)[0], (*s)[1]\n\n\tif tag&0x1f == 0x1f {\n\t\t// ITU-T X.690 section 8.1.2\n\t\t//\n\t\t// An identifier octet with a tag part of 0x1f indicates a high-tag-number\n\t\t// form identifier with two or more octets. We only support tags less than\n\t\t// 31 (i.e. low-tag-number form, single octet identifier).\n\t\treturn false\n\t}\n\n\tif outTag != nil {\n\t\t*outTag = asn1.Tag(tag)\n\t}\n\n\t// ITU-T X.690 section 8.1.3\n\t//\n\t// Bit 8 of the first length byte indicates whether the length is short- or\n\t// long-form.\n\tvar length, headerLen uint32 // length includes headerLen\n\tif lenByte&0x80 == 0 {\n\t\t// Short-form length (section 8.1.3.4), encoded in bits 1-7.\n\t\tlength = uint32(lenByte) + 2\n\t\theaderLen = 2\n\t} else {\n\t\t// Long-form length (section 8.1.3.5). Bits 1-7 encode the number of octets\n\t\t// used to encode the length.\n\t\tlenLen := lenByte & 0x7f\n\t\tvar len32 uint32\n\n\t\tif lenLen == 0 || lenLen > 4 || len(*s) < int(2+lenLen) {\n\t\t\treturn false\n\t\t}\n\n\t\tlenBytes := String((*s)[2 : 2+lenLen])\n\t\tif !lenBytes.readUnsigned(&len32, int(lenLen)) {\n\t\t\treturn false\n\t\t}\n\n\t\t// ITU-T X.690 section 10.1 (DER length forms) requires encoding the length\n\t\t// with the minimum number of octets.\n\t\tif len32 < 128 {\n\t\t\t// Length should have used short-form encoding.\n\t\t\treturn false\n\t\t}\n\t\tif len32>>((lenLen-1)*8) == 0 {\n\t\t\t// Leading octet is 0. Length should have been at least one byte shorter.\n\t\t\treturn false\n\t\t}\n\n\t\theaderLen = 2 + uint32(lenLen)\n\t\tif headerLen+len32 < len32 {\n\t\t\t// Overflow.\n\t\t\treturn false\n\t\t}\n\t\tlength = headerLen + len32\n\t}\n\n\tif int(length) < 0 || !s.ReadBytes((*[]byte)(out), int(length)) {\n\t\treturn false\n\t}\n\tif skipHeader && !out.Skip(int(headerLen)) {\n\t\tpanic(\"cryptobyte: internal error\")\n\t}\n\n\treturn true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/cryptobyte/builder.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cryptobyte\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// A Builder builds byte strings from fixed-length and length-prefixed values.\n// Builders either allocate space as needed, or are ‘fixed’, which means that\n// they write into a given buffer and produce an error if it's exhausted.\n//\n// The zero value is a usable Builder that allocates space as needed.\n//\n// Simple values are marshaled and appended to a Builder using methods on the\n// Builder. Length-prefixed values are marshaled by providing a\n// BuilderContinuation, which is a function that writes the inner contents of\n// the value to a given Builder. See the documentation for BuilderContinuation\n// for details.\ntype Builder struct {\n\terr            error\n\tresult         []byte\n\tfixedSize      bool\n\tchild          *Builder\n\toffset         int\n\tpendingLenLen  int\n\tpendingIsASN1  bool\n\tinContinuation *bool\n}\n\n// NewBuilder creates a Builder that appends its output to the given buffer.\n// Like append(), the slice will be reallocated if its capacity is exceeded.\n// Use Bytes to get the final buffer.\nfunc NewBuilder(buffer []byte) *Builder {\n\treturn &Builder{\n\t\tresult: buffer,\n\t}\n}\n\n// NewFixedBuilder creates a Builder that appends its output into the given\n// buffer. This builder does not reallocate the output buffer. Writes that\n// would exceed the buffer's capacity are treated as an error.\nfunc NewFixedBuilder(buffer []byte) *Builder {\n\treturn &Builder{\n\t\tresult:    buffer,\n\t\tfixedSize: true,\n\t}\n}\n\n// SetError sets the value to be returned as the error from Bytes. Writes\n// performed after calling SetError are ignored.\nfunc (b *Builder) SetError(err error) {\n\tb.err = err\n}\n\n// Bytes returns the bytes written by the builder or an error if one has\n// occurred during building.\nfunc (b *Builder) Bytes() ([]byte, error) {\n\tif b.err != nil {\n\t\treturn nil, b.err\n\t}\n\treturn b.result[b.offset:], nil\n}\n\n// BytesOrPanic returns the bytes written by the builder or panics if an error\n// has occurred during building.\nfunc (b *Builder) BytesOrPanic() []byte {\n\tif b.err != nil {\n\t\tpanic(b.err)\n\t}\n\treturn b.result[b.offset:]\n}\n\n// AddUint8 appends an 8-bit value to the byte string.\nfunc (b *Builder) AddUint8(v uint8) {\n\tb.add(byte(v))\n}\n\n// AddUint16 appends a big-endian, 16-bit value to the byte string.\nfunc (b *Builder) AddUint16(v uint16) {\n\tb.add(byte(v>>8), byte(v))\n}\n\n// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest\n// byte of the 32-bit input value is silently truncated.\nfunc (b *Builder) AddUint24(v uint32) {\n\tb.add(byte(v>>16), byte(v>>8), byte(v))\n}\n\n// AddUint32 appends a big-endian, 32-bit value to the byte string.\nfunc (b *Builder) AddUint32(v uint32) {\n\tb.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))\n}\n\n// AddUint48 appends a big-endian, 48-bit value to the byte string.\nfunc (b *Builder) AddUint48(v uint64) {\n\tb.add(byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))\n}\n\n// AddUint64 appends a big-endian, 64-bit value to the byte string.\nfunc (b *Builder) AddUint64(v uint64) {\n\tb.add(byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))\n}\n\n// AddBytes appends a sequence of bytes to the byte string.\nfunc (b *Builder) AddBytes(v []byte) {\n\tb.add(v...)\n}\n\n// BuilderContinuation is a continuation-passing interface for building\n// length-prefixed byte sequences. Builder methods for length-prefixed\n// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation\n// supplied to them. The child builder passed to the continuation can be used\n// to build the content of the length-prefixed sequence. For example:\n//\n//\tparent := cryptobyte.NewBuilder()\n//\tparent.AddUint8LengthPrefixed(func (child *Builder) {\n//\t  child.AddUint8(42)\n//\t  child.AddUint8LengthPrefixed(func (grandchild *Builder) {\n//\t    grandchild.AddUint8(5)\n//\t  })\n//\t})\n//\n// It is an error to write more bytes to the child than allowed by the reserved\n// length prefix. After the continuation returns, the child must be considered\n// invalid, i.e. users must not store any copies or references of the child\n// that outlive the continuation.\n//\n// If the continuation panics with a value of type BuildError then the inner\n// error will be returned as the error from Bytes. If the child panics\n// otherwise then Bytes will repanic with the same value.\ntype BuilderContinuation func(child *Builder)\n\n// BuildError wraps an error. If a BuilderContinuation panics with this value,\n// the panic will be recovered and the inner error will be returned from\n// Builder.Bytes.\ntype BuildError struct {\n\tErr error\n}\n\n// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence.\nfunc (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) {\n\tb.addLengthPrefixed(1, false, f)\n}\n\n// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence.\nfunc (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) {\n\tb.addLengthPrefixed(2, false, f)\n}\n\n// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence.\nfunc (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) {\n\tb.addLengthPrefixed(3, false, f)\n}\n\n// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence.\nfunc (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) {\n\tb.addLengthPrefixed(4, false, f)\n}\n\nfunc (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) {\n\tif !*b.inContinuation {\n\t\t*b.inContinuation = true\n\n\t\tdefer func() {\n\t\t\t*b.inContinuation = false\n\n\t\t\tr := recover()\n\t\t\tif r == nil {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif buildError, ok := r.(BuildError); ok {\n\t\t\t\tb.err = buildError.Err\n\t\t\t} else {\n\t\t\t\tpanic(r)\n\t\t\t}\n\t\t}()\n\t}\n\n\tf(arg)\n}\n\nfunc (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) {\n\t// Subsequent writes can be ignored if the builder has encountered an error.\n\tif b.err != nil {\n\t\treturn\n\t}\n\n\toffset := len(b.result)\n\tb.add(make([]byte, lenLen)...)\n\n\tif b.inContinuation == nil {\n\t\tb.inContinuation = new(bool)\n\t}\n\n\tb.child = &Builder{\n\t\tresult:         b.result,\n\t\tfixedSize:      b.fixedSize,\n\t\toffset:         offset,\n\t\tpendingLenLen:  lenLen,\n\t\tpendingIsASN1:  isASN1,\n\t\tinContinuation: b.inContinuation,\n\t}\n\n\tb.callContinuation(f, b.child)\n\tb.flushChild()\n\tif b.child != nil {\n\t\tpanic(\"cryptobyte: internal error\")\n\t}\n}\n\nfunc (b *Builder) flushChild() {\n\tif b.child == nil {\n\t\treturn\n\t}\n\tb.child.flushChild()\n\tchild := b.child\n\tb.child = nil\n\n\tif child.err != nil {\n\t\tb.err = child.err\n\t\treturn\n\t}\n\n\tlength := len(child.result) - child.pendingLenLen - child.offset\n\n\tif length < 0 {\n\t\tpanic(\"cryptobyte: internal error\") // result unexpectedly shrunk\n\t}\n\n\tif child.pendingIsASN1 {\n\t\t// For ASN.1, we reserved a single byte for the length. If that turned out\n\t\t// to be incorrect, we have to move the contents along in order to make\n\t\t// space.\n\t\tif child.pendingLenLen != 1 {\n\t\t\tpanic(\"cryptobyte: internal error\")\n\t\t}\n\t\tvar lenLen, lenByte uint8\n\t\tif int64(length) > 0xfffffffe {\n\t\t\tb.err = errors.New(\"pending ASN.1 child too long\")\n\t\t\treturn\n\t\t} else if length > 0xffffff {\n\t\t\tlenLen = 5\n\t\t\tlenByte = 0x80 | 4\n\t\t} else if length > 0xffff {\n\t\t\tlenLen = 4\n\t\t\tlenByte = 0x80 | 3\n\t\t} else if length > 0xff {\n\t\t\tlenLen = 3\n\t\t\tlenByte = 0x80 | 2\n\t\t} else if length > 0x7f {\n\t\t\tlenLen = 2\n\t\t\tlenByte = 0x80 | 1\n\t\t} else {\n\t\t\tlenLen = 1\n\t\t\tlenByte = uint8(length)\n\t\t\tlength = 0\n\t\t}\n\n\t\t// Insert the initial length byte, make space for successive length bytes,\n\t\t// and adjust the offset.\n\t\tchild.result[child.offset] = lenByte\n\t\textraBytes := int(lenLen - 1)\n\t\tif extraBytes != 0 {\n\t\t\tchild.add(make([]byte, extraBytes)...)\n\t\t\tchildStart := child.offset + child.pendingLenLen\n\t\t\tcopy(child.result[childStart+extraBytes:], child.result[childStart:])\n\t\t}\n\t\tchild.offset++\n\t\tchild.pendingLenLen = extraBytes\n\t}\n\n\tl := length\n\tfor i := child.pendingLenLen - 1; i >= 0; i-- {\n\t\tchild.result[child.offset+i] = uint8(l)\n\t\tl >>= 8\n\t}\n\tif l != 0 {\n\t\tb.err = fmt.Errorf(\"cryptobyte: pending child length %d exceeds %d-byte length prefix\", length, child.pendingLenLen)\n\t\treturn\n\t}\n\n\tif b.fixedSize && &b.result[0] != &child.result[0] {\n\t\tpanic(\"cryptobyte: BuilderContinuation reallocated a fixed-size buffer\")\n\t}\n\n\tb.result = child.result\n}\n\nfunc (b *Builder) add(bytes ...byte) {\n\tif b.err != nil {\n\t\treturn\n\t}\n\tif b.child != nil {\n\t\tpanic(\"cryptobyte: attempted write while child is pending\")\n\t}\n\tif len(b.result)+len(bytes) < len(bytes) {\n\t\tb.err = errors.New(\"cryptobyte: length overflow\")\n\t}\n\tif b.fixedSize && len(b.result)+len(bytes) > cap(b.result) {\n\t\tb.err = errors.New(\"cryptobyte: Builder is exceeding its fixed-size buffer\")\n\t\treturn\n\t}\n\tb.result = append(b.result, bytes...)\n}\n\n// Unwrite rolls back non-negative n bytes written directly to the Builder.\n// An attempt by a child builder passed to a continuation to unwrite bytes\n// from its parent will panic.\nfunc (b *Builder) Unwrite(n int) {\n\tif b.err != nil {\n\t\treturn\n\t}\n\tif b.child != nil {\n\t\tpanic(\"cryptobyte: attempted unwrite while child is pending\")\n\t}\n\tlength := len(b.result) - b.pendingLenLen - b.offset\n\tif length < 0 {\n\t\tpanic(\"cryptobyte: internal error\")\n\t}\n\tif n < 0 {\n\t\tpanic(\"cryptobyte: attempted to unwrite negative number of bytes\")\n\t}\n\tif n > length {\n\t\tpanic(\"cryptobyte: attempted to unwrite more than was written\")\n\t}\n\tb.result = b.result[:len(b.result)-n]\n}\n\n// A MarshalingValue marshals itself into a Builder.\ntype MarshalingValue interface {\n\t// Marshal is called by Builder.AddValue. It receives a pointer to a builder\n\t// to marshal itself into. It may return an error that occurred during\n\t// marshaling, such as unset or invalid values.\n\tMarshal(b *Builder) error\n}\n\n// AddValue calls Marshal on v, passing a pointer to the builder to append to.\n// If Marshal returns an error, it is set on the Builder so that subsequent\n// appends don't have an effect.\nfunc (b *Builder) AddValue(v MarshalingValue) {\n\terr := v.Marshal(b)\n\tif err != nil {\n\t\tb.err = err\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/cryptobyte/string.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package cryptobyte contains types that help with parsing and constructing\n// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage\n// contains useful ASN.1 constants.)\n//\n// The String type is for parsing. It wraps a []byte slice and provides helper\n// functions for consuming structures, value by value.\n//\n// The Builder type is for constructing messages. It providers helper functions\n// for appending values and also for appending length-prefixed submessages –\n// without having to worry about calculating the length prefix ahead of time.\n//\n// See the documentation and examples for the Builder and String types to get\n// started.\npackage cryptobyte\n\n// String represents a string of bytes. It provides methods for parsing\n// fixed-length and length-prefixed values from it.\ntype String []byte\n\n// read advances a String by n bytes and returns them. If less than n bytes\n// remain, it returns nil.\nfunc (s *String) read(n int) []byte {\n\tif len(*s) < n || n < 0 {\n\t\treturn nil\n\t}\n\tv := (*s)[:n]\n\t*s = (*s)[n:]\n\treturn v\n}\n\n// Skip advances the String by n byte and reports whether it was successful.\nfunc (s *String) Skip(n int) bool {\n\treturn s.read(n) != nil\n}\n\n// ReadUint8 decodes an 8-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint8(out *uint8) bool {\n\tv := s.read(1)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint8(v[0])\n\treturn true\n}\n\n// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint16(out *uint16) bool {\n\tv := s.read(2)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint16(v[0])<<8 | uint16(v[1])\n\treturn true\n}\n\n// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint24(out *uint32) bool {\n\tv := s.read(3)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2])\n\treturn true\n}\n\n// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint32(out *uint32) bool {\n\tv := s.read(4)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3])\n\treturn true\n}\n\n// ReadUint48 decodes a big-endian, 48-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint48(out *uint64) bool {\n\tv := s.read(6)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint64(v[0])<<40 | uint64(v[1])<<32 | uint64(v[2])<<24 | uint64(v[3])<<16 | uint64(v[4])<<8 | uint64(v[5])\n\treturn true\n}\n\n// ReadUint64 decodes a big-endian, 64-bit value into out and advances over it.\n// It reports whether the read was successful.\nfunc (s *String) ReadUint64(out *uint64) bool {\n\tv := s.read(8)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = uint64(v[0])<<56 | uint64(v[1])<<48 | uint64(v[2])<<40 | uint64(v[3])<<32 | uint64(v[4])<<24 | uint64(v[5])<<16 | uint64(v[6])<<8 | uint64(v[7])\n\treturn true\n}\n\nfunc (s *String) readUnsigned(out *uint32, length int) bool {\n\tv := s.read(length)\n\tif v == nil {\n\t\treturn false\n\t}\n\tvar result uint32\n\tfor i := 0; i < length; i++ {\n\t\tresult <<= 8\n\t\tresult |= uint32(v[i])\n\t}\n\t*out = result\n\treturn true\n}\n\nfunc (s *String) readLengthPrefixed(lenLen int, outChild *String) bool {\n\tlenBytes := s.read(lenLen)\n\tif lenBytes == nil {\n\t\treturn false\n\t}\n\tvar length uint32\n\tfor _, b := range lenBytes {\n\t\tlength = length << 8\n\t\tlength = length | uint32(b)\n\t}\n\tv := s.read(int(length))\n\tif v == nil {\n\t\treturn false\n\t}\n\t*outChild = v\n\treturn true\n}\n\n// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value\n// into out and advances over it. It reports whether the read was successful.\nfunc (s *String) ReadUint8LengthPrefixed(out *String) bool {\n\treturn s.readLengthPrefixed(1, out)\n}\n\n// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit\n// length-prefixed value into out and advances over it. It reports whether the\n// read was successful.\nfunc (s *String) ReadUint16LengthPrefixed(out *String) bool {\n\treturn s.readLengthPrefixed(2, out)\n}\n\n// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit\n// length-prefixed value into out and advances over it. It reports whether\n// the read was successful.\nfunc (s *String) ReadUint24LengthPrefixed(out *String) bool {\n\treturn s.readLengthPrefixed(3, out)\n}\n\n// ReadBytes reads n bytes into out and advances over them. It reports\n// whether the read was successful.\nfunc (s *String) ReadBytes(out *[]byte, n int) bool {\n\tv := s.read(n)\n\tif v == nil {\n\t\treturn false\n\t}\n\t*out = v\n\treturn true\n}\n\n// CopyBytes copies len(out) bytes into out and advances over them. It reports\n// whether the copy operation was successful\nfunc (s *String) CopyBytes(out []byte) bool {\n\tn := len(out)\n\tv := s.read(n)\n\tif v == nil {\n\t\treturn false\n\t}\n\treturn copy(out, v) == n\n}\n\n// Empty reports whether the string does not contain any bytes.\nfunc (s String) Empty() bool {\n\treturn len(s) == 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/alias/alias.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !purego\n\n// Package alias implements memory aliasing tests.\npackage alias\n\nimport \"unsafe\"\n\n// AnyOverlap reports whether x and y share memory at any (not necessarily\n// corresponding) index. The memory beyond the slice length is ignored.\nfunc AnyOverlap(x, y []byte) bool {\n\treturn len(x) > 0 && len(y) > 0 &&\n\t\tuintptr(unsafe.Pointer(&x[0])) <= uintptr(unsafe.Pointer(&y[len(y)-1])) &&\n\t\tuintptr(unsafe.Pointer(&y[0])) <= uintptr(unsafe.Pointer(&x[len(x)-1]))\n}\n\n// InexactOverlap reports whether x and y share memory at any non-corresponding\n// index. The memory beyond the slice length is ignored. Note that x and y can\n// have different lengths and still not have any inexact overlap.\n//\n// InexactOverlap can be used to implement the requirements of the crypto/cipher\n// AEAD, Block, BlockMode and Stream interfaces.\nfunc InexactOverlap(x, y []byte) bool {\n\tif len(x) == 0 || len(y) == 0 || &x[0] == &y[0] {\n\t\treturn false\n\t}\n\treturn AnyOverlap(x, y)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/alias/alias_purego.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build purego\n\n// Package alias implements memory aliasing tests.\npackage alias\n\n// This is the Google App Engine standard variant based on reflect\n// because the unsafe package and cgo are disallowed.\n\nimport \"reflect\"\n\n// AnyOverlap reports whether x and y share memory at any (not necessarily\n// corresponding) index. The memory beyond the slice length is ignored.\nfunc AnyOverlap(x, y []byte) bool {\n\treturn len(x) > 0 && len(y) > 0 &&\n\t\treflect.ValueOf(&x[0]).Pointer() <= reflect.ValueOf(&y[len(y)-1]).Pointer() &&\n\t\treflect.ValueOf(&y[0]).Pointer() <= reflect.ValueOf(&x[len(x)-1]).Pointer()\n}\n\n// InexactOverlap reports whether x and y share memory at any non-corresponding\n// index. The memory beyond the slice length is ignored. Note that x and y can\n// have different lengths and still not have any inexact overlap.\n//\n// InexactOverlap can be used to implement the requirements of the crypto/cipher\n// AEAD, Block, BlockMode and Stream interfaces.\nfunc InexactOverlap(x, y []byte) bool {\n\tif len(x) == 0 || len(y) == 0 || &x[0] == &y[0] {\n\t\treturn false\n\t}\n\treturn AnyOverlap(x, y)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (!amd64 && !loong64 && !ppc64le && !ppc64 && !s390x) || !gc || purego\n\npackage poly1305\n\ntype mac struct{ macGeneric }\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/poly1305.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package poly1305 implements Poly1305 one-time message authentication code as\n// specified in https://cr.yp.to/mac/poly1305-20050329.pdf.\n//\n// Poly1305 is a fast, one-time authentication function. It is infeasible for an\n// attacker to generate an authenticator for a message without the key. However, a\n// key must only be used for a single message. Authenticating two different\n// messages with the same key allows an attacker to forge authenticators for other\n// messages with the same key.\n//\n// Poly1305 was originally coupled with AES in order to make Poly1305-AES. AES was\n// used with a fixed key in order to generate one-time keys from an nonce.\n// However, in this package AES isn't used and the one-time key is specified\n// directly.\npackage poly1305\n\nimport \"crypto/subtle\"\n\n// TagSize is the size, in bytes, of a poly1305 authenticator.\nconst TagSize = 16\n\n// Sum generates an authenticator for msg using a one-time key and puts the\n// 16-byte result into out. Authenticating two different messages with the same\n// key allows an attacker to forge messages at will.\nfunc Sum(out *[16]byte, m []byte, key *[32]byte) {\n\th := New(key)\n\th.Write(m)\n\th.Sum(out[:0])\n}\n\n// Verify returns true if mac is a valid authenticator for m with the given key.\nfunc Verify(mac *[16]byte, m []byte, key *[32]byte) bool {\n\tvar tmp [16]byte\n\tSum(&tmp, m, key)\n\treturn subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1\n}\n\n// New returns a new MAC computing an authentication\n// tag of all data written to it with the given key.\n// This allows writing the message progressively instead\n// of passing it as a single slice. Common users should use\n// the Sum function instead.\n//\n// The key must be unique for each message, as authenticating\n// two different messages with the same key allows an attacker\n// to forge messages at will.\nfunc New(key *[32]byte) *MAC {\n\tm := &MAC{}\n\tinitialize(key, &m.macState)\n\treturn m\n}\n\n// MAC is an io.Writer computing an authentication tag\n// of the data written to it.\n//\n// MAC cannot be used like common hash.Hash implementations,\n// because using a poly1305 key twice breaks its security.\n// Therefore writing data to a running MAC after calling\n// Sum or Verify causes it to panic.\ntype MAC struct {\n\tmac // platform-dependent implementation\n\n\tfinalized bool\n}\n\n// Size returns the number of bytes Sum will return.\nfunc (h *MAC) Size() int { return TagSize }\n\n// Write adds more data to the running message authentication code.\n// It never returns an error.\n//\n// It must not be called after the first call of Sum or Verify.\nfunc (h *MAC) Write(p []byte) (n int, err error) {\n\tif h.finalized {\n\t\tpanic(\"poly1305: write to MAC after Sum or Verify\")\n\t}\n\treturn h.mac.Write(p)\n}\n\n// Sum computes the authenticator of all data written to the\n// message authentication code.\nfunc (h *MAC) Sum(b []byte) []byte {\n\tvar mac [TagSize]byte\n\th.mac.Sum(&mac)\n\th.finalized = true\n\treturn append(b, mac[:]...)\n}\n\n// Verify returns whether the authenticator of all data written to\n// the message authentication code matches the expected value.\nfunc (h *MAC) Verify(expected []byte) bool {\n\tvar mac [TagSize]byte\n\th.mac.Sum(&mac)\n\th.finalized = true\n\treturn subtle.ConstantTimeCompare(expected, mac[:]) == 1\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s",
    "content": "// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT.\n\n//go:build gc && !purego\n\n// func update(state *macState, msg []byte)\nTEXT ·update(SB), $0-32\n\tMOVQ state+0(FP), DI\n\tMOVQ msg_base+8(FP), SI\n\tMOVQ msg_len+16(FP), R15\n\tMOVQ (DI), R8\n\tMOVQ 8(DI), R9\n\tMOVQ 16(DI), R10\n\tMOVQ 24(DI), R11\n\tMOVQ 32(DI), R12\n\tCMPQ R15, $0x10\n\tJB   bytes_between_0_and_15\n\nloop:\n\tADDQ (SI), R8\n\tADCQ 8(SI), R9\n\tADCQ $0x01, R10\n\tLEAQ 16(SI), SI\n\nmultiply:\n\tMOVQ  R11, AX\n\tMULQ  R8\n\tMOVQ  AX, BX\n\tMOVQ  DX, CX\n\tMOVQ  R11, AX\n\tMULQ  R9\n\tADDQ  AX, CX\n\tADCQ  $0x00, DX\n\tMOVQ  R11, R13\n\tIMULQ R10, R13\n\tADDQ  DX, R13\n\tMOVQ  R12, AX\n\tMULQ  R8\n\tADDQ  AX, CX\n\tADCQ  $0x00, DX\n\tMOVQ  DX, R8\n\tMOVQ  R12, R14\n\tIMULQ R10, R14\n\tMOVQ  R12, AX\n\tMULQ  R9\n\tADDQ  AX, R13\n\tADCQ  DX, R14\n\tADDQ  R8, R13\n\tADCQ  $0x00, R14\n\tMOVQ  BX, R8\n\tMOVQ  CX, R9\n\tMOVQ  R13, R10\n\tANDQ  $0x03, R10\n\tMOVQ  R13, BX\n\tANDQ  $-4, BX\n\tADDQ  BX, R8\n\tADCQ  R14, R9\n\tADCQ  $0x00, R10\n\tSHRQ  $0x02, R14, R13\n\tSHRQ  $0x02, R14\n\tADDQ  R13, R8\n\tADCQ  R14, R9\n\tADCQ  $0x00, R10\n\tSUBQ  $0x10, R15\n\tCMPQ  R15, $0x10\n\tJAE   loop\n\nbytes_between_0_and_15:\n\tTESTQ R15, R15\n\tJZ    done\n\tMOVQ  $0x00000001, BX\n\tXORQ  CX, CX\n\tXORQ  R13, R13\n\tADDQ  R15, SI\n\nflush_buffer:\n\tSHLQ $0x08, BX, CX\n\tSHLQ $0x08, BX\n\tMOVB -1(SI), R13\n\tXORQ R13, BX\n\tDECQ SI\n\tDECQ R15\n\tJNZ  flush_buffer\n\tADDQ BX, R8\n\tADCQ CX, R9\n\tADCQ $0x00, R10\n\tMOVQ $0x00000010, R15\n\tJMP  multiply\n\ndone:\n\tMOVQ R8, (DI)\n\tMOVQ R9, 8(DI)\n\tMOVQ R10, 16(DI)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_asm.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc && !purego && (amd64 || loong64 || ppc64 || ppc64le)\n\npackage poly1305\n\n//go:noescape\nfunc update(state *macState, msg []byte)\n\n// mac is a wrapper for macGeneric that redirects calls that would have gone to\n// updateGeneric to update.\n//\n// Its Write and Sum methods are otherwise identical to the macGeneric ones, but\n// using function pointers would carry a major performance cost.\ntype mac struct{ macGeneric }\n\nfunc (h *mac) Write(p []byte) (int, error) {\n\tnn := len(p)\n\tif h.offset > 0 {\n\t\tn := copy(h.buffer[h.offset:], p)\n\t\tif h.offset+n < TagSize {\n\t\t\th.offset += n\n\t\t\treturn nn, nil\n\t\t}\n\t\tp = p[n:]\n\t\th.offset = 0\n\t\tupdate(&h.macState, h.buffer[:])\n\t}\n\tif n := len(p) - (len(p) % TagSize); n > 0 {\n\t\tupdate(&h.macState, p[:n])\n\t\tp = p[n:]\n\t}\n\tif len(p) > 0 {\n\t\th.offset += copy(h.buffer[h.offset:], p)\n\t}\n\treturn nn, nil\n}\n\nfunc (h *mac) Sum(out *[16]byte) {\n\tstate := h.macState\n\tif h.offset > 0 {\n\t\tupdate(&state, h.buffer[:h.offset])\n\t}\n\tfinalize(out, &state.h, &state.s)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// This file provides the generic implementation of Sum and MAC. Other files\n// might provide optimized assembly implementations of some of this code.\n\npackage poly1305\n\nimport (\n\t\"encoding/binary\"\n\t\"math/bits\"\n)\n\n// Poly1305 [RFC 7539] is a relatively simple algorithm: the authentication tag\n// for a 64 bytes message is approximately\n//\n//     s + m[0:16] * r⁴ + m[16:32] * r³ + m[32:48] * r² + m[48:64] * r  mod  2¹³⁰ - 5\n//\n// for some secret r and s. It can be computed sequentially like\n//\n//     for len(msg) > 0:\n//         h += read(msg, 16)\n//         h *= r\n//         h %= 2¹³⁰ - 5\n//     return h + s\n//\n// All the complexity is about doing performant constant-time math on numbers\n// larger than any available numeric type.\n\nfunc sumGeneric(out *[TagSize]byte, msg []byte, key *[32]byte) {\n\th := newMACGeneric(key)\n\th.Write(msg)\n\th.Sum(out)\n}\n\nfunc newMACGeneric(key *[32]byte) macGeneric {\n\tm := macGeneric{}\n\tinitialize(key, &m.macState)\n\treturn m\n}\n\n// macState holds numbers in saturated 64-bit little-endian limbs. That is,\n// the value of [x0, x1, x2] is x[0] + x[1] * 2⁶⁴ + x[2] * 2¹²⁸.\ntype macState struct {\n\t// h is the main accumulator. It is to be interpreted modulo 2¹³⁰ - 5, but\n\t// can grow larger during and after rounds. It must, however, remain below\n\t// 2 * (2¹³⁰ - 5).\n\th [3]uint64\n\t// r and s are the private key components.\n\tr [2]uint64\n\ts [2]uint64\n}\n\ntype macGeneric struct {\n\tmacState\n\n\tbuffer [TagSize]byte\n\toffset int\n}\n\n// Write splits the incoming message into TagSize chunks, and passes them to\n// update. It buffers incomplete chunks.\nfunc (h *macGeneric) Write(p []byte) (int, error) {\n\tnn := len(p)\n\tif h.offset > 0 {\n\t\tn := copy(h.buffer[h.offset:], p)\n\t\tif h.offset+n < TagSize {\n\t\t\th.offset += n\n\t\t\treturn nn, nil\n\t\t}\n\t\tp = p[n:]\n\t\th.offset = 0\n\t\tupdateGeneric(&h.macState, h.buffer[:])\n\t}\n\tif n := len(p) - (len(p) % TagSize); n > 0 {\n\t\tupdateGeneric(&h.macState, p[:n])\n\t\tp = p[n:]\n\t}\n\tif len(p) > 0 {\n\t\th.offset += copy(h.buffer[h.offset:], p)\n\t}\n\treturn nn, nil\n}\n\n// Sum flushes the last incomplete chunk from the buffer, if any, and generates\n// the MAC output. It does not modify its state, in order to allow for multiple\n// calls to Sum, even if no Write is allowed after Sum.\nfunc (h *macGeneric) Sum(out *[TagSize]byte) {\n\tstate := h.macState\n\tif h.offset > 0 {\n\t\tupdateGeneric(&state, h.buffer[:h.offset])\n\t}\n\tfinalize(out, &state.h, &state.s)\n}\n\n// [rMask0, rMask1] is the specified Poly1305 clamping mask in little-endian. It\n// clears some bits of the secret coefficient to make it possible to implement\n// multiplication more efficiently.\nconst (\n\trMask0 = 0x0FFFFFFC0FFFFFFF\n\trMask1 = 0x0FFFFFFC0FFFFFFC\n)\n\n// initialize loads the 256-bit key into the two 128-bit secret values r and s.\nfunc initialize(key *[32]byte, m *macState) {\n\tm.r[0] = binary.LittleEndian.Uint64(key[0:8]) & rMask0\n\tm.r[1] = binary.LittleEndian.Uint64(key[8:16]) & rMask1\n\tm.s[0] = binary.LittleEndian.Uint64(key[16:24])\n\tm.s[1] = binary.LittleEndian.Uint64(key[24:32])\n}\n\n// uint128 holds a 128-bit number as two 64-bit limbs, for use with the\n// bits.Mul64 and bits.Add64 intrinsics.\ntype uint128 struct {\n\tlo, hi uint64\n}\n\nfunc mul64(a, b uint64) uint128 {\n\thi, lo := bits.Mul64(a, b)\n\treturn uint128{lo, hi}\n}\n\nfunc add128(a, b uint128) uint128 {\n\tlo, c := bits.Add64(a.lo, b.lo, 0)\n\thi, c := bits.Add64(a.hi, b.hi, c)\n\tif c != 0 {\n\t\tpanic(\"poly1305: unexpected overflow\")\n\t}\n\treturn uint128{lo, hi}\n}\n\nfunc shiftRightBy2(a uint128) uint128 {\n\ta.lo = a.lo>>2 | (a.hi&3)<<62\n\ta.hi = a.hi >> 2\n\treturn a\n}\n\n// updateGeneric absorbs msg into the state.h accumulator. For each chunk m of\n// 128 bits of message, it computes\n//\n//\th₊ = (h + m) * r  mod  2¹³⁰ - 5\n//\n// If the msg length is not a multiple of TagSize, it assumes the last\n// incomplete chunk is the final one.\nfunc updateGeneric(state *macState, msg []byte) {\n\th0, h1, h2 := state.h[0], state.h[1], state.h[2]\n\tr0, r1 := state.r[0], state.r[1]\n\n\tfor len(msg) > 0 {\n\t\tvar c uint64\n\n\t\t// For the first step, h + m, we use a chain of bits.Add64 intrinsics.\n\t\t// The resulting value of h might exceed 2¹³⁰ - 5, but will be partially\n\t\t// reduced at the end of the multiplication below.\n\t\t//\n\t\t// The spec requires us to set a bit just above the message size, not to\n\t\t// hide leading zeroes. For full chunks, that's 1 << 128, so we can just\n\t\t// add 1 to the most significant (2¹²⁸) limb, h2.\n\t\tif len(msg) >= TagSize {\n\t\t\th0, c = bits.Add64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0)\n\t\t\th1, c = bits.Add64(h1, binary.LittleEndian.Uint64(msg[8:16]), c)\n\t\t\th2 += c + 1\n\n\t\t\tmsg = msg[TagSize:]\n\t\t} else {\n\t\t\tvar buf [TagSize]byte\n\t\t\tcopy(buf[:], msg)\n\t\t\tbuf[len(msg)] = 1\n\n\t\t\th0, c = bits.Add64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0)\n\t\t\th1, c = bits.Add64(h1, binary.LittleEndian.Uint64(buf[8:16]), c)\n\t\t\th2 += c\n\n\t\t\tmsg = nil\n\t\t}\n\n\t\t// Multiplication of big number limbs is similar to elementary school\n\t\t// columnar multiplication. Instead of digits, there are 64-bit limbs.\n\t\t//\n\t\t// We are multiplying a 3 limbs number, h, by a 2 limbs number, r.\n\t\t//\n\t\t//                        h2    h1    h0  x\n\t\t//                              r1    r0  =\n\t\t//                       ----------------\n\t\t//                      h2r0  h1r0  h0r0     <-- individual 128-bit products\n\t\t//            +   h2r1  h1r1  h0r1\n\t\t//               ------------------------\n\t\t//                 m3    m2    m1    m0      <-- result in 128-bit overlapping limbs\n\t\t//               ------------------------\n\t\t//         m3.hi m2.hi m1.hi m0.hi           <-- carry propagation\n\t\t//     +         m3.lo m2.lo m1.lo m0.lo\n\t\t//        -------------------------------\n\t\t//           t4    t3    t2    t1    t0      <-- final result in 64-bit limbs\n\t\t//\n\t\t// The main difference from pen-and-paper multiplication is that we do\n\t\t// carry propagation in a separate step, as if we wrote two digit sums\n\t\t// at first (the 128-bit limbs), and then carried the tens all at once.\n\n\t\th0r0 := mul64(h0, r0)\n\t\th1r0 := mul64(h1, r0)\n\t\th2r0 := mul64(h2, r0)\n\t\th0r1 := mul64(h0, r1)\n\t\th1r1 := mul64(h1, r1)\n\t\th2r1 := mul64(h2, r1)\n\n\t\t// Since h2 is known to be at most 7 (5 + 1 + 1), and r0 and r1 have their\n\t\t// top 4 bits cleared by rMask{0,1}, we know that their product is not going\n\t\t// to overflow 64 bits, so we can ignore the high part of the products.\n\t\t//\n\t\t// This also means that the product doesn't have a fifth limb (t4).\n\t\tif h2r0.hi != 0 {\n\t\t\tpanic(\"poly1305: unexpected overflow\")\n\t\t}\n\t\tif h2r1.hi != 0 {\n\t\t\tpanic(\"poly1305: unexpected overflow\")\n\t\t}\n\n\t\tm0 := h0r0\n\t\tm1 := add128(h1r0, h0r1) // These two additions don't overflow thanks again\n\t\tm2 := add128(h2r0, h1r1) // to the 4 masked bits at the top of r0 and r1.\n\t\tm3 := h2r1\n\n\t\tt0 := m0.lo\n\t\tt1, c := bits.Add64(m1.lo, m0.hi, 0)\n\t\tt2, c := bits.Add64(m2.lo, m1.hi, c)\n\t\tt3, _ := bits.Add64(m3.lo, m2.hi, c)\n\n\t\t// Now we have the result as 4 64-bit limbs, and we need to reduce it\n\t\t// modulo 2¹³⁰ - 5. The special shape of this Crandall prime lets us do\n\t\t// a cheap partial reduction according to the reduction identity\n\t\t//\n\t\t//     c * 2¹³⁰ + n  =  c * 5 + n  mod  2¹³⁰ - 5\n\t\t//\n\t\t// because 2¹³⁰ = 5 mod 2¹³⁰ - 5. Partial reduction since the result is\n\t\t// likely to be larger than 2¹³⁰ - 5, but still small enough to fit the\n\t\t// assumptions we make about h in the rest of the code.\n\t\t//\n\t\t// See also https://speakerdeck.com/gtank/engineering-prime-numbers?slide=23\n\n\t\t// We split the final result at the 2¹³⁰ mark into h and cc, the carry.\n\t\t// Note that the carry bits are effectively shifted left by 2, in other\n\t\t// words, cc = c * 4 for the c in the reduction identity.\n\t\th0, h1, h2 = t0, t1, t2&maskLow2Bits\n\t\tcc := uint128{t2 & maskNotLow2Bits, t3}\n\n\t\t// To add c * 5 to h, we first add cc = c * 4, and then add (cc >> 2) = c.\n\n\t\th0, c = bits.Add64(h0, cc.lo, 0)\n\t\th1, c = bits.Add64(h1, cc.hi, c)\n\t\th2 += c\n\n\t\tcc = shiftRightBy2(cc)\n\n\t\th0, c = bits.Add64(h0, cc.lo, 0)\n\t\th1, c = bits.Add64(h1, cc.hi, c)\n\t\th2 += c\n\n\t\t// h2 is at most 3 + 1 + 1 = 5, making the whole of h at most\n\t\t//\n\t\t//     5 * 2¹²⁸ + (2¹²⁸ - 1) = 6 * 2¹²⁸ - 1\n\t}\n\n\tstate.h[0], state.h[1], state.h[2] = h0, h1, h2\n}\n\nconst (\n\tmaskLow2Bits    uint64 = 0x0000000000000003\n\tmaskNotLow2Bits uint64 = ^maskLow2Bits\n)\n\n// select64 returns x if v == 1 and y if v == 0, in constant time.\nfunc select64(v, x, y uint64) uint64 { return ^(v-1)&x | (v-1)&y }\n\n// [p0, p1, p2] is 2¹³⁰ - 5 in little endian order.\nconst (\n\tp0 = 0xFFFFFFFFFFFFFFFB\n\tp1 = 0xFFFFFFFFFFFFFFFF\n\tp2 = 0x0000000000000003\n)\n\n// finalize completes the modular reduction of h and computes\n//\n//\tout = h + s  mod  2¹²⁸\nfunc finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) {\n\th0, h1, h2 := h[0], h[1], h[2]\n\n\t// After the partial reduction in updateGeneric, h might be more than\n\t// 2¹³⁰ - 5, but will be less than 2 * (2¹³⁰ - 5). To complete the reduction\n\t// in constant time, we compute t = h - (2¹³⁰ - 5), and select h as the\n\t// result if the subtraction underflows, and t otherwise.\n\n\thMinusP0, b := bits.Sub64(h0, p0, 0)\n\thMinusP1, b := bits.Sub64(h1, p1, b)\n\t_, b = bits.Sub64(h2, p2, b)\n\n\t// h = h if h < p else h - p\n\th0 = select64(b, h0, hMinusP0)\n\th1 = select64(b, h1, hMinusP1)\n\n\t// Finally, we compute the last Poly1305 step\n\t//\n\t//     tag = h + s  mod  2¹²⁸\n\t//\n\t// by just doing a wide addition with the 128 low bits of h and discarding\n\t// the overflow.\n\th0, c := bits.Add64(h0, s[0], 0)\n\th1, _ = bits.Add64(h1, s[1], c)\n\n\tbinary.LittleEndian.PutUint64(out[0:8], h0)\n\tbinary.LittleEndian.PutUint64(out[8:16], h1)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_loong64.s",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc && !purego\n\n// func update(state *macState, msg []byte)\nTEXT ·update(SB), $0-32\n\tMOVV\tstate+0(FP), R4\n\tMOVV\tmsg_base+8(FP), R5\n\tMOVV\tmsg_len+16(FP), R6\n\n\tMOVV\t$0x10, R7\n\n\tMOVV\t(R4), R8\t// h0\n\tMOVV\t8(R4), R9\t// h1\n\tMOVV\t16(R4), R10\t// h2\n\tMOVV\t24(R4), R11\t// r0\n\tMOVV\t32(R4), R12\t// r1\n\n\tBLT\tR6, R7, bytes_between_0_and_15\n\nloop:\n\tMOVV\t(R5), R14\t// msg[0:8]\n\tMOVV\t8(R5), R16\t// msg[8:16]\n\tADDV\tR14, R8, R8\t// h0 (x1 + y1 = z1', if z1' < x1 then z1' overflow)\n\tADDV\tR16, R9, R27\n\tSGTU\tR14, R8, R24\t// h0.carry\n\tSGTU\tR9, R27, R28\n\tADDV\tR27, R24, R9\t// h1\n\tSGTU\tR27, R9, R24\n\tOR\tR24, R28, R24\t// h1.carry\n\tADDV\t$0x01, R24, R24\n\tADDV\tR10, R24, R10\t// h2\n\n\tADDV\t$16, R5, R5\t// msg = msg[16:]\n\nmultiply:\n\tMULV\tR8, R11, R14\t// h0r0.lo\n\tMULHVU\tR8, R11, R15\t// h0r0.hi\n\tMULV\tR9, R11, R13\t// h1r0.lo\n\tMULHVU\tR9, R11, R16\t// h1r0.hi\n\tADDV\tR13, R15, R15\n\tSGTU\tR13, R15, R24\n\tADDV\tR24, R16, R16\n\tMULV\tR10, R11, R25\n\tADDV\tR16, R25, R25\n\tMULV\tR8, R12, R13\t// h0r1.lo\n\tMULHVU\tR8, R12, R16\t// h0r1.hi\n\tADDV\tR13, R15, R15\n\tSGTU\tR13, R15, R24\n\tADDV\tR24, R16, R16\n\tMOVV\tR16, R8\n\tMULV\tR10, R12, R26\t// h2r1\n\tMULV\tR9, R12, R13\t// h1r1.lo\n\tMULHVU\tR9, R12, R16\t// h1r1.hi\n\tADDV\tR13, R25, R25\n\tADDV\tR16, R26, R27\n\tSGTU\tR13, R25, R24\n\tADDV\tR27, R24, R26\n\tADDV\tR8, R25, R25\n\tSGTU\tR8, R25, R24\n\tADDV\tR24, R26, R26\n\tAND\t$3, R25, R10\n\tAND\t$-4, R25, R17\n\tADDV\tR17, R14, R8\n\tADDV\tR26, R15, R27\n\tSGTU\tR17, R8, R24\n\tSGTU\tR26, R27, R28\n\tADDV\tR27, R24, R9\n\tSGTU\tR27, R9, R24\n\tOR\tR24, R28, R24\n\tADDV\tR24, R10, R10\n\tSLLV\t$62, R26, R27\n\tSRLV\t$2, R25, R28\n\tSRLV\t$2, R26, R26\n\tOR\tR27, R28, R25\n\tADDV\tR25, R8, R8\n\tADDV\tR26, R9, R27\n\tSGTU\tR25, R8, R24\n\tSGTU\tR26, R27, R28\n\tADDV\tR27, R24, R9\n\tSGTU\tR27, R9, R24\n\tOR\tR24, R28, R24\n\tADDV\tR24, R10, R10\n\n\tSUBV\t$16, R6, R6\n\tBGE\tR6, R7, loop\n\nbytes_between_0_and_15:\n\tBEQ\tR6, R0, done\n\tMOVV\t$1, R14\n\tXOR\tR15, R15\n\tADDV\tR6, R5, R5\n\nflush_buffer:\n\tMOVBU\t-1(R5), R25\n\tSRLV\t$56, R14, R24\n\tSLLV\t$8, R15, R28\n\tSLLV\t$8, R14, R14\n\tOR\tR24, R28, R15\n\tXOR\tR25, R14, R14\n\tSUBV\t$1, R6, R6\n\tSUBV\t$1, R5, R5\n\tBNE\tR6, R0, flush_buffer\n\n\tADDV\tR14, R8, R8\n\tSGTU\tR14, R8, R24\n\tADDV\tR15, R9, R27\n\tSGTU\tR15, R27, R28\n\tADDV\tR27, R24, R9\n\tSGTU\tR27, R9, R24\n\tOR\tR24, R28, R24\n\tADDV\tR10, R24, R10\n\n\tMOVV\t$16, R6\n\tJMP\tmultiply\n\ndone:\n\tMOVV\tR8, (R4)\n\tMOVV\tR9, 8(R4)\n\tMOVV\tR10, 16(R4)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc && !purego && (ppc64 || ppc64le)\n\n#include \"textflag.h\"\n\n// This was ported from the amd64 implementation.\n\n#ifdef GOARCH_ppc64le\n#define LE_MOVD MOVD\n#define LE_MOVWZ MOVWZ\n#define LE_MOVHZ MOVHZ\n#else\n#define LE_MOVD MOVDBR\n#define LE_MOVWZ MOVWBR\n#define LE_MOVHZ MOVHBR\n#endif\n\n#define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \\\n\tLE_MOVD (msg)( R0), t0; \\\n\tLE_MOVD (msg)(R24), t1; \\\n\tMOVD $1, t2;     \\\n\tADDC t0, h0, h0; \\\n\tADDE t1, h1, h1; \\\n\tADDE t2, h2;     \\\n\tADD  $16, msg\n\n#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3, t4, t5) \\\n\tMULLD  r0, h0, t0;  \\\n\tMULHDU r0, h0, t1;  \\\n\tMULLD  r0, h1, t4;  \\\n\tMULHDU r0, h1, t5;  \\\n\tADDC   t4, t1, t1;  \\\n\tMULLD  r0, h2, t2;  \\\n\tMULHDU r1, h0, t4;  \\\n\tMULLD  r1, h0, h0;  \\\n\tADDE   t5, t2, t2;  \\\n\tADDC   h0, t1, t1;  \\\n\tMULLD  h2, r1, t3;  \\\n\tADDZE  t4, h0;      \\\n\tMULHDU r1, h1, t5;  \\\n\tMULLD  r1, h1, t4;  \\\n\tADDC   t4, t2, t2;  \\\n\tADDE   t5, t3, t3;  \\\n\tADDC   h0, t2, t2;  \\\n\tMOVD   $-4, t4;     \\\n\tADDZE  t3;          \\\n\tRLDICL $0, t2, $62, h2; \\\n\tAND    t2, t4, h0;  \\\n\tADDC   t0, h0, h0;  \\\n\tADDE   t3, t1, h1;  \\\n\tSLD    $62, t3, t4; \\\n\tSRD    $2, t2;      \\\n\tADDZE  h2;          \\\n\tOR     t4, t2, t2;  \\\n\tSRD    $2, t3;      \\\n\tADDC   t2, h0, h0;  \\\n\tADDE   t3, h1, h1;  \\\n\tADDZE  h2\n\n// func update(state *[7]uint64, msg []byte)\nTEXT ·update(SB), $0-32\n\tMOVD state+0(FP), R3\n\tMOVD msg_base+8(FP), R4\n\tMOVD msg_len+16(FP), R5\n\n\tMOVD 0(R3), R8   // h0\n\tMOVD 8(R3), R9   // h1\n\tMOVD 16(R3), R10 // h2\n\tMOVD 24(R3), R11 // r0\n\tMOVD 32(R3), R12 // r1\n\n\tMOVD $8, R24\n\n\tCMP R5, $16\n\tBLT bytes_between_0_and_15\n\nloop:\n\tPOLY1305_ADD(R4, R8, R9, R10, R20, R21, R22)\n\n\tPCALIGN $16\nmultiply:\n\tPOLY1305_MUL(R8, R9, R10, R11, R12, R16, R17, R18, R14, R20, R21)\n\tADD $-16, R5\n\tCMP R5, $16\n\tBGE loop\n\nbytes_between_0_and_15:\n\tCMP  R5, $0\n\tBEQ  done\n\tMOVD $0, R16 // h0\n\tMOVD $0, R17 // h1\n\nflush_buffer:\n\tCMP R5, $8\n\tBLE just1\n\n\tMOVD $8, R21\n\tSUB  R21, R5, R21\n\n\t// Greater than 8 -- load the rightmost remaining bytes in msg\n\t// and put into R17 (h1)\n\tLE_MOVD (R4)(R21), R17\n\tMOVD $16, R22\n\n\t// Find the offset to those bytes\n\tSUB R5, R22, R22\n\tSLD $3, R22\n\n\t// Shift to get only the bytes in msg\n\tSRD R22, R17, R17\n\n\t// Put 1 at high end\n\tMOVD $1, R23\n\tSLD  $3, R21\n\tSLD  R21, R23, R23\n\tOR   R23, R17, R17\n\n\t// Remainder is 8\n\tMOVD $8, R5\n\njust1:\n\tCMP R5, $8\n\tBLT less8\n\n\t// Exactly 8\n\tLE_MOVD (R4), R16\n\n\tCMP R17, $0\n\n\t// Check if we've already set R17; if not\n\t// set 1 to indicate end of msg.\n\tBNE  carry\n\tMOVD $1, R17\n\tBR   carry\n\nless8:\n\tMOVD  $0, R16   // h0\n\tMOVD  $0, R22   // shift count\n\tCMP   R5, $4\n\tBLT   less4\n\tLE_MOVWZ (R4), R16\n\tADD   $4, R4\n\tADD   $-4, R5\n\tMOVD  $32, R22\n\nless4:\n\tCMP   R5, $2\n\tBLT   less2\n\tLE_MOVHZ (R4), R21\n\tSLD   R22, R21, R21\n\tOR    R16, R21, R16\n\tADD   $16, R22\n\tADD   $-2, R5\n\tADD   $2, R4\n\nless2:\n\tCMP   R5, $0\n\tBEQ   insert1\n\tMOVBZ (R4), R21\n\tSLD   R22, R21, R21\n\tOR    R16, R21, R16\n\tADD   $8, R22\n\ninsert1:\n\t// Insert 1 at end of msg\n\tMOVD $1, R21\n\tSLD  R22, R21, R21\n\tOR   R16, R21, R16\n\ncarry:\n\t// Add new values to h0, h1, h2\n\tADDC  R16, R8\n\tADDE  R17, R9\n\tADDZE R10, R10\n\tMOVD  $16, R5\n\tADD   R5, R4\n\tBR    multiply\n\ndone:\n\t// Save h0, h1, h2 in state\n\tMOVD R8, 0(R3)\n\tMOVD R9, 8(R3)\n\tMOVD R10, 16(R3)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc && !purego\n\npackage poly1305\n\nimport (\n\t\"golang.org/x/sys/cpu\"\n)\n\n// updateVX is an assembly implementation of Poly1305 that uses vector\n// instructions. It must only be called if the vector facility (vx) is\n// available.\n//\n//go:noescape\nfunc updateVX(state *macState, msg []byte)\n\n// mac is a replacement for macGeneric that uses a larger buffer and redirects\n// calls that would have gone to updateGeneric to updateVX if the vector\n// facility is installed.\n//\n// A larger buffer is required for good performance because the vector\n// implementation has a higher fixed cost per call than the generic\n// implementation.\ntype mac struct {\n\tmacState\n\n\tbuffer [16 * TagSize]byte // size must be a multiple of block size (16)\n\toffset int\n}\n\nfunc (h *mac) Write(p []byte) (int, error) {\n\tnn := len(p)\n\tif h.offset > 0 {\n\t\tn := copy(h.buffer[h.offset:], p)\n\t\tif h.offset+n < len(h.buffer) {\n\t\t\th.offset += n\n\t\t\treturn nn, nil\n\t\t}\n\t\tp = p[n:]\n\t\th.offset = 0\n\t\tif cpu.S390X.HasVX {\n\t\t\tupdateVX(&h.macState, h.buffer[:])\n\t\t} else {\n\t\t\tupdateGeneric(&h.macState, h.buffer[:])\n\t\t}\n\t}\n\n\ttail := len(p) % len(h.buffer) // number of bytes to copy into buffer\n\tbody := len(p) - tail          // number of bytes to process now\n\tif body > 0 {\n\t\tif cpu.S390X.HasVX {\n\t\t\tupdateVX(&h.macState, p[:body])\n\t\t} else {\n\t\t\tupdateGeneric(&h.macState, p[:body])\n\t\t}\n\t}\n\th.offset = copy(h.buffer[:], p[body:]) // copy tail bytes - can be 0\n\treturn nn, nil\n}\n\nfunc (h *mac) Sum(out *[TagSize]byte) {\n\tstate := h.macState\n\tremainder := h.buffer[:h.offset]\n\n\t// Use the generic implementation if we have 2 or fewer blocks left\n\t// to sum. The vector implementation has a higher startup time.\n\tif cpu.S390X.HasVX && len(remainder) > 2*TagSize {\n\t\tupdateVX(&state, remainder)\n\t} else if len(remainder) > 0 {\n\t\tupdateGeneric(&state, remainder)\n\t}\n\tfinalize(out, &state.h, &state.s)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc && !purego\n\n#include \"textflag.h\"\n\n// This implementation of Poly1305 uses the vector facility (vx)\n// to process up to 2 blocks (32 bytes) per iteration using an\n// algorithm based on the one described in:\n//\n// NEON crypto, Daniel J. Bernstein & Peter Schwabe\n// https://cryptojedi.org/papers/neoncrypto-20120320.pdf\n//\n// This algorithm uses 5 26-bit limbs to represent a 130-bit\n// value. These limbs are, for the most part, zero extended and\n// placed into 64-bit vector register elements. Each vector\n// register is 128-bits wide and so holds 2 of these elements.\n// Using 26-bit limbs allows us plenty of headroom to accommodate\n// accumulations before and after multiplication without\n// overflowing either 32-bits (before multiplication) or 64-bits\n// (after multiplication).\n//\n// In order to parallelise the operations required to calculate\n// the sum we use two separate accumulators and then sum those\n// in an extra final step. For compatibility with the generic\n// implementation we perform this summation at the end of every\n// updateVX call.\n//\n// To use two accumulators we must multiply the message blocks\n// by r² rather than r. Only the final message block should be\n// multiplied by r.\n//\n// Example:\n//\n// We want to calculate the sum (h) for a 64 byte message (m):\n//\n//   h = m[0:16]r⁴ + m[16:32]r³ + m[32:48]r² + m[48:64]r\n//\n// To do this we split the calculation into the even indices\n// and odd indices of the message. These form our SIMD 'lanes':\n//\n//   h = m[ 0:16]r⁴ + m[32:48]r² +   <- lane 0\n//       m[16:32]r³ + m[48:64]r      <- lane 1\n//\n// To calculate this iteratively we refactor so that both lanes\n// are written in terms of r² and r:\n//\n//   h = (m[ 0:16]r² + m[32:48])r² + <- lane 0\n//       (m[16:32]r² + m[48:64])r    <- lane 1\n//                ^             ^\n//                |             coefficients for second iteration\n//                coefficients for first iteration\n//\n// So in this case we would have two iterations. In the first\n// both lanes are multiplied by r². In the second only the\n// first lane is multiplied by r² and the second lane is\n// instead multiplied by r. This gives use the odd and even\n// powers of r that we need from the original equation.\n//\n// Notation:\n//\n//   h - accumulator\n//   r - key\n//   m - message\n//\n//   [a, b]       - SIMD register holding two 64-bit values\n//   [a, b, c, d] - SIMD register holding four 32-bit values\n//   xᵢ[n]        - limb n of variable x with bit width i\n//\n// Limbs are expressed in little endian order, so for 26-bit\n// limbs x₂₆[4] will be the most significant limb and x₂₆[0]\n// will be the least significant limb.\n\n// masking constants\n#define MOD24 V0 // [0x0000000000ffffff, 0x0000000000ffffff] - mask low 24-bits\n#define MOD26 V1 // [0x0000000003ffffff, 0x0000000003ffffff] - mask low 26-bits\n\n// expansion constants (see EXPAND macro)\n#define EX0 V2\n#define EX1 V3\n#define EX2 V4\n\n// key (r², r or 1 depending on context)\n#define R_0 V5\n#define R_1 V6\n#define R_2 V7\n#define R_3 V8\n#define R_4 V9\n\n// precalculated coefficients (5r², 5r or 0 depending on context)\n#define R5_1 V10\n#define R5_2 V11\n#define R5_3 V12\n#define R5_4 V13\n\n// message block (m)\n#define M_0 V14\n#define M_1 V15\n#define M_2 V16\n#define M_3 V17\n#define M_4 V18\n\n// accumulator (h)\n#define H_0 V19\n#define H_1 V20\n#define H_2 V21\n#define H_3 V22\n#define H_4 V23\n\n// temporary registers (for short-lived values)\n#define T_0 V24\n#define T_1 V25\n#define T_2 V26\n#define T_3 V27\n#define T_4 V28\n\nGLOBL ·constants<>(SB), RODATA, $0x30\n// EX0\nDATA ·constants<>+0x00(SB)/8, $0x0006050403020100\nDATA ·constants<>+0x08(SB)/8, $0x1016151413121110\n// EX1\nDATA ·constants<>+0x10(SB)/8, $0x060c0b0a09080706\nDATA ·constants<>+0x18(SB)/8, $0x161c1b1a19181716\n// EX2\nDATA ·constants<>+0x20(SB)/8, $0x0d0d0d0d0d0f0e0d\nDATA ·constants<>+0x28(SB)/8, $0x1d1d1d1d1d1f1e1d\n\n// MULTIPLY multiplies each lane of f and g, partially reduced\n// modulo 2¹³⁰ - 5. The result, h, consists of partial products\n// in each lane that need to be reduced further to produce the\n// final result.\n//\n//   h₁₃₀ = (f₁₃₀g₁₃₀) % 2¹³⁰ + (5f₁₃₀g₁₃₀) / 2¹³⁰\n//\n// Note that the multiplication by 5 of the high bits is\n// achieved by precalculating the multiplication of four of the\n// g coefficients by 5. These are g51-g54.\n#define MULTIPLY(f0, f1, f2, f3, f4, g0, g1, g2, g3, g4, g51, g52, g53, g54, h0, h1, h2, h3, h4) \\\n\tVMLOF  f0, g0, h0        \\\n\tVMLOF  f0, g3, h3        \\\n\tVMLOF  f0, g1, h1        \\\n\tVMLOF  f0, g4, h4        \\\n\tVMLOF  f0, g2, h2        \\\n\tVMLOF  f1, g54, T_0      \\\n\tVMLOF  f1, g2, T_3       \\\n\tVMLOF  f1, g0, T_1       \\\n\tVMLOF  f1, g3, T_4       \\\n\tVMLOF  f1, g1, T_2       \\\n\tVMALOF f2, g53, h0, h0   \\\n\tVMALOF f2, g1, h3, h3    \\\n\tVMALOF f2, g54, h1, h1   \\\n\tVMALOF f2, g2, h4, h4    \\\n\tVMALOF f2, g0, h2, h2    \\\n\tVMALOF f3, g52, T_0, T_0 \\\n\tVMALOF f3, g0, T_3, T_3  \\\n\tVMALOF f3, g53, T_1, T_1 \\\n\tVMALOF f3, g1, T_4, T_4  \\\n\tVMALOF f3, g54, T_2, T_2 \\\n\tVMALOF f4, g51, h0, h0   \\\n\tVMALOF f4, g54, h3, h3   \\\n\tVMALOF f4, g52, h1, h1   \\\n\tVMALOF f4, g0, h4, h4    \\\n\tVMALOF f4, g53, h2, h2   \\\n\tVAG    T_0, h0, h0       \\\n\tVAG    T_3, h3, h3       \\\n\tVAG    T_1, h1, h1       \\\n\tVAG    T_4, h4, h4       \\\n\tVAG    T_2, h2, h2\n\n// REDUCE performs the following carry operations in four\n// stages, as specified in Bernstein & Schwabe:\n//\n//   1: h₂₆[0]->h₂₆[1] h₂₆[3]->h₂₆[4]\n//   2: h₂₆[1]->h₂₆[2] h₂₆[4]->h₂₆[0]\n//   3: h₂₆[0]->h₂₆[1] h₂₆[2]->h₂₆[3]\n//   4: h₂₆[3]->h₂₆[4]\n//\n// The result is that all of the limbs are limited to 26-bits\n// except for h₂₆[1] and h₂₆[4] which are limited to 27-bits.\n//\n// Note that although each limb is aligned at 26-bit intervals\n// they may contain values that exceed 2²⁶ - 1, hence the need\n// to carry the excess bits in each limb.\n#define REDUCE(h0, h1, h2, h3, h4) \\\n\tVESRLG $26, h0, T_0  \\\n\tVESRLG $26, h3, T_1  \\\n\tVN     MOD26, h0, h0 \\\n\tVN     MOD26, h3, h3 \\\n\tVAG    T_0, h1, h1   \\\n\tVAG    T_1, h4, h4   \\\n\tVESRLG $26, h1, T_2  \\\n\tVESRLG $26, h4, T_3  \\\n\tVN     MOD26, h1, h1 \\\n\tVN     MOD26, h4, h4 \\\n\tVESLG  $2, T_3, T_4  \\\n\tVAG    T_3, T_4, T_4 \\\n\tVAG    T_2, h2, h2   \\\n\tVAG    T_4, h0, h0   \\\n\tVESRLG $26, h2, T_0  \\\n\tVESRLG $26, h0, T_1  \\\n\tVN     MOD26, h2, h2 \\\n\tVN     MOD26, h0, h0 \\\n\tVAG    T_0, h3, h3   \\\n\tVAG    T_1, h1, h1   \\\n\tVESRLG $26, h3, T_2  \\\n\tVN     MOD26, h3, h3 \\\n\tVAG    T_2, h4, h4\n\n// EXPAND splits the 128-bit little-endian values in0 and in1\n// into 26-bit big-endian limbs and places the results into\n// the first and second lane of d₂₆[0:4] respectively.\n//\n// The EX0, EX1 and EX2 constants are arrays of byte indices\n// for permutation. The permutation both reverses the bytes\n// in the input and ensures the bytes are copied into the\n// destination limb ready to be shifted into their final\n// position.\n#define EXPAND(in0, in1, d0, d1, d2, d3, d4) \\\n\tVPERM  in0, in1, EX0, d0 \\\n\tVPERM  in0, in1, EX1, d2 \\\n\tVPERM  in0, in1, EX2, d4 \\\n\tVESRLG $26, d0, d1       \\\n\tVESRLG $30, d2, d3       \\\n\tVESRLG $4, d2, d2        \\\n\tVN     MOD26, d0, d0     \\ // [in0₂₆[0], in1₂₆[0]]\n\tVN     MOD26, d3, d3     \\ // [in0₂₆[3], in1₂₆[3]]\n\tVN     MOD26, d1, d1     \\ // [in0₂₆[1], in1₂₆[1]]\n\tVN     MOD24, d4, d4     \\ // [in0₂₆[4], in1₂₆[4]]\n\tVN     MOD26, d2, d2     // [in0₂₆[2], in1₂₆[2]]\n\n// func updateVX(state *macState, msg []byte)\nTEXT ·updateVX(SB), NOSPLIT, $0\n\tMOVD state+0(FP), R1\n\tLMG  msg+8(FP), R2, R3 // R2=msg_base, R3=msg_len\n\n\t// load EX0, EX1 and EX2\n\tMOVD $·constants<>(SB), R5\n\tVLM  (R5), EX0, EX2\n\n\t// generate masks\n\tVGMG $(64-24), $63, MOD24 // [0x00ffffff, 0x00ffffff]\n\tVGMG $(64-26), $63, MOD26 // [0x03ffffff, 0x03ffffff]\n\n\t// load h (accumulator) and r (key) from state\n\tVZERO T_1               // [0, 0]\n\tVL    0(R1), T_0        // [h₆₄[0], h₆₄[1]]\n\tVLEG  $0, 16(R1), T_1   // [h₆₄[2], 0]\n\tVL    24(R1), T_2       // [r₆₄[0], r₆₄[1]]\n\tVPDI  $0, T_0, T_2, T_3 // [h₆₄[0], r₆₄[0]]\n\tVPDI  $5, T_0, T_2, T_4 // [h₆₄[1], r₆₄[1]]\n\n\t// unpack h and r into 26-bit limbs\n\t// note: h₆₄[2] may have the low 3 bits set, so h₂₆[4] is a 27-bit value\n\tVN     MOD26, T_3, H_0            // [h₂₆[0], r₂₆[0]]\n\tVZERO  H_1                        // [0, 0]\n\tVZERO  H_3                        // [0, 0]\n\tVGMG   $(64-12-14), $(63-12), T_0 // [0x03fff000, 0x03fff000] - 26-bit mask with low 12 bits masked out\n\tVESLG  $24, T_1, T_1              // [h₆₄[2]<<24, 0]\n\tVERIMG $-26&63, T_3, MOD26, H_1   // [h₂₆[1], r₂₆[1]]\n\tVESRLG $+52&63, T_3, H_2          // [h₂₆[2], r₂₆[2]] - low 12 bits only\n\tVERIMG $-14&63, T_4, MOD26, H_3   // [h₂₆[1], r₂₆[1]]\n\tVESRLG $40, T_4, H_4              // [h₂₆[4], r₂₆[4]] - low 24 bits only\n\tVERIMG $+12&63, T_4, T_0, H_2     // [h₂₆[2], r₂₆[2]] - complete\n\tVO     T_1, H_4, H_4              // [h₂₆[4], r₂₆[4]] - complete\n\n\t// replicate r across all 4 vector elements\n\tVREPF $3, H_0, R_0 // [r₂₆[0], r₂₆[0], r₂₆[0], r₂₆[0]]\n\tVREPF $3, H_1, R_1 // [r₂₆[1], r₂₆[1], r₂₆[1], r₂₆[1]]\n\tVREPF $3, H_2, R_2 // [r₂₆[2], r₂₆[2], r₂₆[2], r₂₆[2]]\n\tVREPF $3, H_3, R_3 // [r₂₆[3], r₂₆[3], r₂₆[3], r₂₆[3]]\n\tVREPF $3, H_4, R_4 // [r₂₆[4], r₂₆[4], r₂₆[4], r₂₆[4]]\n\n\t// zero out lane 1 of h\n\tVLEIG $1, $0, H_0 // [h₂₆[0], 0]\n\tVLEIG $1, $0, H_1 // [h₂₆[1], 0]\n\tVLEIG $1, $0, H_2 // [h₂₆[2], 0]\n\tVLEIG $1, $0, H_3 // [h₂₆[3], 0]\n\tVLEIG $1, $0, H_4 // [h₂₆[4], 0]\n\n\t// calculate 5r (ignore least significant limb)\n\tVREPIF $5, T_0\n\tVMLF   T_0, R_1, R5_1 // [5r₂₆[1], 5r₂₆[1], 5r₂₆[1], 5r₂₆[1]]\n\tVMLF   T_0, R_2, R5_2 // [5r₂₆[2], 5r₂₆[2], 5r₂₆[2], 5r₂₆[2]]\n\tVMLF   T_0, R_3, R5_3 // [5r₂₆[3], 5r₂₆[3], 5r₂₆[3], 5r₂₆[3]]\n\tVMLF   T_0, R_4, R5_4 // [5r₂₆[4], 5r₂₆[4], 5r₂₆[4], 5r₂₆[4]]\n\n\t// skip r² calculation if we are only calculating one block\n\tCMPBLE R3, $16, skip\n\n\t// calculate r²\n\tMULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, M_0, M_1, M_2, M_3, M_4)\n\tREDUCE(M_0, M_1, M_2, M_3, M_4)\n\tVGBM   $0x0f0f, T_0\n\tVERIMG $0, M_0, T_0, R_0 // [r₂₆[0], r²₂₆[0], r₂₆[0], r²₂₆[0]]\n\tVERIMG $0, M_1, T_0, R_1 // [r₂₆[1], r²₂₆[1], r₂₆[1], r²₂₆[1]]\n\tVERIMG $0, M_2, T_0, R_2 // [r₂₆[2], r²₂₆[2], r₂₆[2], r²₂₆[2]]\n\tVERIMG $0, M_3, T_0, R_3 // [r₂₆[3], r²₂₆[3], r₂₆[3], r²₂₆[3]]\n\tVERIMG $0, M_4, T_0, R_4 // [r₂₆[4], r²₂₆[4], r₂₆[4], r²₂₆[4]]\n\n\t// calculate 5r² (ignore least significant limb)\n\tVREPIF $5, T_0\n\tVMLF   T_0, R_1, R5_1 // [5r₂₆[1], 5r²₂₆[1], 5r₂₆[1], 5r²₂₆[1]]\n\tVMLF   T_0, R_2, R5_2 // [5r₂₆[2], 5r²₂₆[2], 5r₂₆[2], 5r²₂₆[2]]\n\tVMLF   T_0, R_3, R5_3 // [5r₂₆[3], 5r²₂₆[3], 5r₂₆[3], 5r²₂₆[3]]\n\tVMLF   T_0, R_4, R5_4 // [5r₂₆[4], 5r²₂₆[4], 5r₂₆[4], 5r²₂₆[4]]\n\nloop:\n\tCMPBLE R3, $32, b2 // 2 or fewer blocks remaining, need to change key coefficients\n\n\t// load next 2 blocks from message\n\tVLM (R2), T_0, T_1\n\n\t// update message slice\n\tSUB  $32, R3\n\tMOVD $32(R2), R2\n\n\t// unpack message blocks into 26-bit big-endian limbs\n\tEXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)\n\n\t// add 2¹²⁸ to each message block value\n\tVLEIB $4, $1, M_4\n\tVLEIB $12, $1, M_4\n\nmultiply:\n\t// accumulate the incoming message\n\tVAG H_0, M_0, M_0\n\tVAG H_3, M_3, M_3\n\tVAG H_1, M_1, M_1\n\tVAG H_4, M_4, M_4\n\tVAG H_2, M_2, M_2\n\n\t// multiply the accumulator by the key coefficient\n\tMULTIPLY(M_0, M_1, M_2, M_3, M_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4)\n\n\t// carry and partially reduce the partial products\n\tREDUCE(H_0, H_1, H_2, H_3, H_4)\n\n\tCMPBNE R3, $0, loop\n\nfinish:\n\t// sum lane 0 and lane 1 and put the result in lane 1\n\tVZERO  T_0\n\tVSUMQG H_0, T_0, H_0\n\tVSUMQG H_3, T_0, H_3\n\tVSUMQG H_1, T_0, H_1\n\tVSUMQG H_4, T_0, H_4\n\tVSUMQG H_2, T_0, H_2\n\n\t// reduce again after summation\n\t// TODO(mundaym): there might be a more efficient way to do this\n\t// now that we only have 1 active lane. For example, we could\n\t// simultaneously pack the values as we reduce them.\n\tREDUCE(H_0, H_1, H_2, H_3, H_4)\n\n\t// carry h[1] through to h[4] so that only h[4] can exceed 2²⁶ - 1\n\t// TODO(mundaym): in testing this final carry was unnecessary.\n\t// Needs a proof before it can be removed though.\n\tVESRLG $26, H_1, T_1\n\tVN     MOD26, H_1, H_1\n\tVAQ    T_1, H_2, H_2\n\tVESRLG $26, H_2, T_2\n\tVN     MOD26, H_2, H_2\n\tVAQ    T_2, H_3, H_3\n\tVESRLG $26, H_3, T_3\n\tVN     MOD26, H_3, H_3\n\tVAQ    T_3, H_4, H_4\n\n\t// h is now < 2(2¹³⁰ - 5)\n\t// Pack each lane in h₂₆[0:4] into h₁₂₈[0:1].\n\tVESLG $26, H_1, H_1\n\tVESLG $26, H_3, H_3\n\tVO    H_0, H_1, H_0\n\tVO    H_2, H_3, H_2\n\tVESLG $4, H_2, H_2\n\tVLEIB $7, $48, H_1\n\tVSLB  H_1, H_2, H_2\n\tVO    H_0, H_2, H_0\n\tVLEIB $7, $104, H_1\n\tVSLB  H_1, H_4, H_3\n\tVO    H_3, H_0, H_0\n\tVLEIB $7, $24, H_1\n\tVSRLB H_1, H_4, H_1\n\n\t// update state\n\tVSTEG $1, H_0, 0(R1)\n\tVSTEG $0, H_0, 8(R1)\n\tVSTEG $1, H_1, 16(R1)\n\tRET\n\nb2:  // 2 or fewer blocks remaining\n\tCMPBLE R3, $16, b1\n\n\t// Load the 2 remaining blocks (17-32 bytes remaining).\n\tMOVD $-17(R3), R0    // index of final byte to load modulo 16\n\tVL   (R2), T_0       // load full 16 byte block\n\tVLL  R0, 16(R2), T_1 // load final (possibly partial) block and pad with zeros to 16 bytes\n\n\t// The Poly1305 algorithm requires that a 1 bit be appended to\n\t// each message block. If the final block is less than 16 bytes\n\t// long then it is easiest to insert the 1 before the message\n\t// block is split into 26-bit limbs. If, on the other hand, the\n\t// final message block is 16 bytes long then we append the 1 bit\n\t// after expansion as normal.\n\tMOVBZ  $1, R0\n\tMOVD   $-16(R3), R3   // index of byte in last block to insert 1 at (could be 16)\n\tCMPBEQ R3, $16, 2(PC) // skip the insertion if the final block is 16 bytes long\n\tVLVGB  R3, R0, T_1    // insert 1 into the byte at index R3\n\n\t// Split both blocks into 26-bit limbs in the appropriate lanes.\n\tEXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)\n\n\t// Append a 1 byte to the end of the second to last block.\n\tVLEIB $4, $1, M_4\n\n\t// Append a 1 byte to the end of the last block only if it is a\n\t// full 16 byte block.\n\tCMPBNE R3, $16, 2(PC)\n\tVLEIB  $12, $1, M_4\n\n\t// Finally, set up the coefficients for the final multiplication.\n\t// We have previously saved r and 5r in the 32-bit even indexes\n\t// of the R_[0-4] and R5_[1-4] coefficient registers.\n\t//\n\t// We want lane 0 to be multiplied by r² so that can be kept the\n\t// same. We want lane 1 to be multiplied by r so we need to move\n\t// the saved r value into the 32-bit odd index in lane 1 by\n\t// rotating the 64-bit lane by 32.\n\tVGBM   $0x00ff, T_0         // [0, 0xffffffffffffffff] - mask lane 1 only\n\tVERIMG $32, R_0, T_0, R_0   // [_,  r²₂₆[0], _,  r₂₆[0]]\n\tVERIMG $32, R_1, T_0, R_1   // [_,  r²₂₆[1], _,  r₂₆[1]]\n\tVERIMG $32, R_2, T_0, R_2   // [_,  r²₂₆[2], _,  r₂₆[2]]\n\tVERIMG $32, R_3, T_0, R_3   // [_,  r²₂₆[3], _,  r₂₆[3]]\n\tVERIMG $32, R_4, T_0, R_4   // [_,  r²₂₆[4], _,  r₂₆[4]]\n\tVERIMG $32, R5_1, T_0, R5_1 // [_, 5r²₂₆[1], _, 5r₂₆[1]]\n\tVERIMG $32, R5_2, T_0, R5_2 // [_, 5r²₂₆[2], _, 5r₂₆[2]]\n\tVERIMG $32, R5_3, T_0, R5_3 // [_, 5r²₂₆[3], _, 5r₂₆[3]]\n\tVERIMG $32, R5_4, T_0, R5_4 // [_, 5r²₂₆[4], _, 5r₂₆[4]]\n\n\tMOVD $0, R3\n\tBR   multiply\n\nskip:\n\tCMPBEQ R3, $0, finish\n\nb1:  // 1 block remaining\n\n\t// Load the final block (1-16 bytes). This will be placed into\n\t// lane 0.\n\tMOVD $-1(R3), R0\n\tVLL  R0, (R2), T_0 // pad to 16 bytes with zeros\n\n\t// The Poly1305 algorithm requires that a 1 bit be appended to\n\t// each message block. If the final block is less than 16 bytes\n\t// long then it is easiest to insert the 1 before the message\n\t// block is split into 26-bit limbs. If, on the other hand, the\n\t// final message block is 16 bytes long then we append the 1 bit\n\t// after expansion as normal.\n\tMOVBZ  $1, R0\n\tCMPBEQ R3, $16, 2(PC)\n\tVLVGB  R3, R0, T_0\n\n\t// Set the message block in lane 1 to the value 0 so that it\n\t// can be accumulated without affecting the final result.\n\tVZERO T_1\n\n\t// Split the final message block into 26-bit limbs in lane 0.\n\t// Lane 1 will be contain 0.\n\tEXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)\n\n\t// Append a 1 byte to the end of the last block only if it is a\n\t// full 16 byte block.\n\tCMPBNE R3, $16, 2(PC)\n\tVLEIB  $4, $1, M_4\n\n\t// We have previously saved r and 5r in the 32-bit even indexes\n\t// of the R_[0-4] and R5_[1-4] coefficient registers.\n\t//\n\t// We want lane 0 to be multiplied by r so we need to move the\n\t// saved r value into the 32-bit odd index in lane 0. We want\n\t// lane 1 to be set to the value 1. This makes multiplication\n\t// a no-op. We do this by setting lane 1 in every register to 0\n\t// and then just setting the 32-bit index 3 in R_0 to 1.\n\tVZERO T_0\n\tMOVD  $0, R0\n\tMOVD  $0x10111213, R12\n\tVLVGP R12, R0, T_1         // [_, 0x10111213, _, 0x00000000]\n\tVPERM T_0, R_0, T_1, R_0   // [_,  r₂₆[0], _, 0]\n\tVPERM T_0, R_1, T_1, R_1   // [_,  r₂₆[1], _, 0]\n\tVPERM T_0, R_2, T_1, R_2   // [_,  r₂₆[2], _, 0]\n\tVPERM T_0, R_3, T_1, R_3   // [_,  r₂₆[3], _, 0]\n\tVPERM T_0, R_4, T_1, R_4   // [_,  r₂₆[4], _, 0]\n\tVPERM T_0, R5_1, T_1, R5_1 // [_, 5r₂₆[1], _, 0]\n\tVPERM T_0, R5_2, T_1, R5_2 // [_, 5r₂₆[2], _, 0]\n\tVPERM T_0, R5_3, T_1, R5_3 // [_, 5r₂₆[3], _, 0]\n\tVPERM T_0, R5_4, T_1, R5_4 // [_, 5r₂₆[4], _, 0]\n\n\t// Set the value of lane 1 to be 1.\n\tVLEIF $3, $1, R_0 // [_,  r₂₆[0], _, 1]\n\n\tMOVD $0, R3\n\tBR   multiply\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage secretbox encrypts and authenticates small messages.\n\nSecretbox uses XSalsa20 and Poly1305 to encrypt and authenticate messages with\nsecret-key cryptography. The length of messages is not hidden.\n\nIt is the caller's responsibility to ensure the uniqueness of nonces—for\nexample, by using nonce 1 for the first message, nonce 2 for the second\nmessage, etc. Nonces are long enough that randomly generated nonces have\nnegligible risk of collision.\n\nMessages should be small because:\n\n1. The whole message needs to be held in memory to be processed.\n\n2. Using large messages pressures implementations on small machines to decrypt\nand process plaintext before authenticating it. This is very dangerous, and\nthis API does not allow it, but a protocol that uses excessive message sizes\nmight present some implementations with no other choice.\n\n3. Fixed overheads will be sufficiently amortised by messages as small as 8KB.\n\n4. Performance may be improved by working with messages that fit into data caches.\n\nThus large amounts of data should be chunked so that each message is small.\n(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable\nchunk size.\n\nThis package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.\n*/\npackage secretbox\n\nimport (\n\t\"golang.org/x/crypto/internal/alias\"\n\t\"golang.org/x/crypto/internal/poly1305\"\n\t\"golang.org/x/crypto/salsa20/salsa\"\n)\n\n// Overhead is the number of bytes of overhead when boxing a message.\nconst Overhead = poly1305.TagSize\n\n// setup produces a sub-key and Salsa20 counter given a nonce and key.\nfunc setup(subKey *[32]byte, counter *[16]byte, nonce *[24]byte, key *[32]byte) {\n\t// We use XSalsa20 for encryption so first we need to generate a\n\t// key and nonce with HSalsa20.\n\tvar hNonce [16]byte\n\tcopy(hNonce[:], nonce[:])\n\tsalsa.HSalsa20(subKey, &hNonce, key, &salsa.Sigma)\n\n\t// The final 8 bytes of the original nonce form the new nonce.\n\tcopy(counter[:], nonce[16:])\n}\n\n// sliceForAppend takes a slice and a requested number of bytes. It returns a\n// slice with the contents of the given slice followed by that many bytes and a\n// second slice that aliases into it and contains only the extra bytes. If the\n// original slice has sufficient capacity then no allocation is performed.\nfunc sliceForAppend(in []byte, n int) (head, tail []byte) {\n\tif total := len(in) + n; cap(in) >= total {\n\t\thead = in[:total]\n\t} else {\n\t\thead = make([]byte, total)\n\t\tcopy(head, in)\n\t}\n\ttail = head[len(in):]\n\treturn\n}\n\n// Seal appends an encrypted and authenticated copy of message to out, which\n// must not overlap message. The key and nonce pair must be unique for each\n// distinct message and the output will be Overhead bytes longer than message.\nfunc Seal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte {\n\tvar subKey [32]byte\n\tvar counter [16]byte\n\tsetup(&subKey, &counter, nonce, key)\n\n\t// The Poly1305 key is generated by encrypting 32 bytes of zeros. Since\n\t// Salsa20 works with 64-byte blocks, we also generate 32 bytes of\n\t// keystream as a side effect.\n\tvar firstBlock [64]byte\n\tsalsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey)\n\n\tvar poly1305Key [32]byte\n\tcopy(poly1305Key[:], firstBlock[:])\n\n\tret, out := sliceForAppend(out, len(message)+poly1305.TagSize)\n\tif alias.AnyOverlap(out, message) {\n\t\tpanic(\"nacl: invalid buffer overlap\")\n\t}\n\n\t// We XOR up to 32 bytes of message with the keystream generated from\n\t// the first block.\n\tfirstMessageBlock := message\n\tif len(firstMessageBlock) > 32 {\n\t\tfirstMessageBlock = firstMessageBlock[:32]\n\t}\n\n\ttagOut := out\n\tout = out[poly1305.TagSize:]\n\tfor i, x := range firstMessageBlock {\n\t\tout[i] = firstBlock[32+i] ^ x\n\t}\n\tmessage = message[len(firstMessageBlock):]\n\tciphertext := out\n\tout = out[len(firstMessageBlock):]\n\n\t// Now encrypt the rest.\n\tcounter[8] = 1\n\tsalsa.XORKeyStream(out, message, &counter, &subKey)\n\n\tvar tag [poly1305.TagSize]byte\n\tpoly1305.Sum(&tag, ciphertext, &poly1305Key)\n\tcopy(tagOut, tag[:])\n\n\treturn ret\n}\n\n// Open authenticates and decrypts a box produced by Seal and appends the\n// message to out, which must not overlap box. The output will be Overhead\n// bytes smaller than box.\nfunc Open(out, box []byte, nonce *[24]byte, key *[32]byte) ([]byte, bool) {\n\tif len(box) < Overhead {\n\t\treturn nil, false\n\t}\n\n\tvar subKey [32]byte\n\tvar counter [16]byte\n\tsetup(&subKey, &counter, nonce, key)\n\n\t// The Poly1305 key is generated by encrypting 32 bytes of zeros. Since\n\t// Salsa20 works with 64-byte blocks, we also generate 32 bytes of\n\t// keystream as a side effect.\n\tvar firstBlock [64]byte\n\tsalsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey)\n\n\tvar poly1305Key [32]byte\n\tcopy(poly1305Key[:], firstBlock[:])\n\tvar tag [poly1305.TagSize]byte\n\tcopy(tag[:], box)\n\n\tif !poly1305.Verify(&tag, box[poly1305.TagSize:], &poly1305Key) {\n\t\treturn nil, false\n\t}\n\n\tret, out := sliceForAppend(out, len(box)-Overhead)\n\tif alias.AnyOverlap(out, box) {\n\t\tpanic(\"nacl: invalid buffer overlap\")\n\t}\n\n\t// We XOR up to 32 bytes of box with the keystream generated from\n\t// the first block.\n\tbox = box[Overhead:]\n\tfirstMessageBlock := box\n\tif len(firstMessageBlock) > 32 {\n\t\tfirstMessageBlock = firstMessageBlock[:32]\n\t}\n\tfor i, x := range firstMessageBlock {\n\t\tout[i] = firstBlock[32+i] ^ x\n\t}\n\n\tbox = box[len(firstMessageBlock):]\n\tout = out[len(firstMessageBlock):]\n\n\t// Now decrypt the rest.\n\tcounter[8] = 1\n\tsalsa.XORKeyStream(out, box, &counter, &subKey)\n\n\treturn ret, true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/armor/armor.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is\n// very similar to PEM except that it has an additional CRC checksum.\n//\n// Deprecated: this package is unmaintained except for security fixes. New\n// applications should consider a more focused, modern alternative to OpenPGP\n// for their specific task. If you are required to interoperate with OpenPGP\n// systems and need a maintained package, consider a community fork.\n// See https://golang.org/issue/44226.\npackage armor\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"io\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\n// A Block represents an OpenPGP armored structure.\n//\n// The encoded form is:\n//\n//\t-----BEGIN Type-----\n//\tHeaders\n//\n//\tbase64-encoded Bytes\n//\t'=' base64 encoded checksum\n//\t-----END Type-----\n//\n// where Headers is a possibly empty sequence of Key: Value lines.\n//\n// Since the armored data can be very large, this package presents a streaming\n// interface.\ntype Block struct {\n\tType    string            // The type, taken from the preamble (i.e. \"PGP SIGNATURE\").\n\tHeader  map[string]string // Optional headers.\n\tBody    io.Reader         // A Reader from which the contents can be read\n\tlReader lineReader\n\toReader openpgpReader\n}\n\nvar ArmorCorrupt error = errors.StructuralError(\"armor invalid\")\n\nconst crc24Init = 0xb704ce\nconst crc24Poly = 0x1864cfb\nconst crc24Mask = 0xffffff\n\n// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1\nfunc crc24(crc uint32, d []byte) uint32 {\n\tfor _, b := range d {\n\t\tcrc ^= uint32(b) << 16\n\t\tfor i := 0; i < 8; i++ {\n\t\t\tcrc <<= 1\n\t\t\tif crc&0x1000000 != 0 {\n\t\t\t\tcrc ^= crc24Poly\n\t\t\t}\n\t\t}\n\t}\n\treturn crc\n}\n\nvar armorStart = []byte(\"-----BEGIN \")\nvar armorEnd = []byte(\"-----END \")\nvar armorEndOfLine = []byte(\"-----\")\n\n// lineReader wraps a line based reader. It watches for the end of an armor\n// block and records the expected CRC value.\ntype lineReader struct {\n\tin     *bufio.Reader\n\tbuf    []byte\n\teof    bool\n\tcrc    uint32\n\tcrcSet bool\n}\n\nfunc (l *lineReader) Read(p []byte) (n int, err error) {\n\tif l.eof {\n\t\treturn 0, io.EOF\n\t}\n\n\tif len(l.buf) > 0 {\n\t\tn = copy(p, l.buf)\n\t\tl.buf = l.buf[n:]\n\t\treturn\n\t}\n\n\tline, isPrefix, err := l.in.ReadLine()\n\tif err != nil {\n\t\treturn\n\t}\n\tif isPrefix {\n\t\treturn 0, ArmorCorrupt\n\t}\n\n\tif bytes.HasPrefix(line, armorEnd) {\n\t\tl.eof = true\n\t\treturn 0, io.EOF\n\t}\n\n\tif len(line) == 5 && line[0] == '=' {\n\t\t// This is the checksum line\n\t\tvar expectedBytes [3]byte\n\t\tvar m int\n\t\tm, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:])\n\t\tif m != 3 || err != nil {\n\t\t\treturn\n\t\t}\n\t\tl.crc = uint32(expectedBytes[0])<<16 |\n\t\t\tuint32(expectedBytes[1])<<8 |\n\t\t\tuint32(expectedBytes[2])\n\n\t\tline, _, err = l.in.ReadLine()\n\t\tif err != nil && err != io.EOF {\n\t\t\treturn\n\t\t}\n\t\tif !bytes.HasPrefix(line, armorEnd) {\n\t\t\treturn 0, ArmorCorrupt\n\t\t}\n\n\t\tl.eof = true\n\t\tl.crcSet = true\n\t\treturn 0, io.EOF\n\t}\n\n\tif len(line) > 96 {\n\t\treturn 0, ArmorCorrupt\n\t}\n\n\tn = copy(p, line)\n\tbytesToSave := len(line) - n\n\tif bytesToSave > 0 {\n\t\tif cap(l.buf) < bytesToSave {\n\t\t\tl.buf = make([]byte, 0, bytesToSave)\n\t\t}\n\t\tl.buf = l.buf[0:bytesToSave]\n\t\tcopy(l.buf, line[n:])\n\t}\n\n\treturn\n}\n\n// openpgpReader passes Read calls to the underlying base64 decoder, but keeps\n// a running CRC of the resulting data and checks the CRC against the value\n// found by the lineReader at EOF.\ntype openpgpReader struct {\n\tlReader    *lineReader\n\tb64Reader  io.Reader\n\tcurrentCRC uint32\n}\n\nfunc (r *openpgpReader) Read(p []byte) (n int, err error) {\n\tn, err = r.b64Reader.Read(p)\n\tr.currentCRC = crc24(r.currentCRC, p[:n])\n\n\tif err == io.EOF && r.lReader.crcSet && r.lReader.crc != r.currentCRC&crc24Mask {\n\t\treturn 0, ArmorCorrupt\n\t}\n\n\treturn\n}\n\n// Decode reads a PGP armored block from the given Reader. It will ignore\n// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The\n// given Reader is not usable after calling this function: an arbitrary amount\n// of data may have been read past the end of the block.\nfunc Decode(in io.Reader) (p *Block, err error) {\n\tr := bufio.NewReaderSize(in, 100)\n\tvar line []byte\n\tignoreNext := false\n\nTryNextBlock:\n\tp = nil\n\n\t// Skip leading garbage\n\tfor {\n\t\tignoreThis := ignoreNext\n\t\tline, ignoreNext, err = r.ReadLine()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tif ignoreNext || ignoreThis {\n\t\t\tcontinue\n\t\t}\n\t\tline = bytes.TrimSpace(line)\n\t\tif len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tp = new(Block)\n\tp.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)])\n\tp.Header = make(map[string]string)\n\tnextIsContinuation := false\n\tvar lastKey string\n\n\t// Read headers\n\tfor {\n\t\tisContinuation := nextIsContinuation\n\t\tline, nextIsContinuation, err = r.ReadLine()\n\t\tif err != nil {\n\t\t\tp = nil\n\t\t\treturn\n\t\t}\n\t\tif isContinuation {\n\t\t\tp.Header[lastKey] += string(line)\n\t\t\tcontinue\n\t\t}\n\t\tline = bytes.TrimSpace(line)\n\t\tif len(line) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\ti := bytes.Index(line, []byte(\": \"))\n\t\tif i == -1 {\n\t\t\tgoto TryNextBlock\n\t\t}\n\t\tlastKey = string(line[:i])\n\t\tp.Header[lastKey] = string(line[i+2:])\n\t}\n\n\tp.lReader.in = r\n\tp.oReader.currentCRC = crc24Init\n\tp.oReader.lReader = &p.lReader\n\tp.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader)\n\tp.Body = &p.oReader\n\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/armor/encode.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage armor\n\nimport (\n\t\"encoding/base64\"\n\t\"io\"\n)\n\nvar armorHeaderSep = []byte(\": \")\nvar blockEnd = []byte(\"\\n=\")\nvar newline = []byte(\"\\n\")\nvar armorEndOfLineOut = []byte(\"-----\\n\")\n\n// writeSlices writes its arguments to the given Writer.\nfunc writeSlices(out io.Writer, slices ...[]byte) (err error) {\n\tfor _, s := range slices {\n\t\t_, err = out.Write(s)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn\n}\n\n// lineBreaker breaks data across several lines, all of the same byte length\n// (except possibly the last). Lines are broken with a single '\\n'.\ntype lineBreaker struct {\n\tlineLength  int\n\tline        []byte\n\tused        int\n\tout         io.Writer\n\thaveWritten bool\n}\n\nfunc newLineBreaker(out io.Writer, lineLength int) *lineBreaker {\n\treturn &lineBreaker{\n\t\tlineLength: lineLength,\n\t\tline:       make([]byte, lineLength),\n\t\tused:       0,\n\t\tout:        out,\n\t}\n}\n\nfunc (l *lineBreaker) Write(b []byte) (n int, err error) {\n\tn = len(b)\n\n\tif n == 0 {\n\t\treturn\n\t}\n\n\tif l.used == 0 && l.haveWritten {\n\t\t_, err = l.out.Write([]byte{'\\n'})\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tif l.used+len(b) < l.lineLength {\n\t\tl.used += copy(l.line[l.used:], b)\n\t\treturn\n\t}\n\n\tl.haveWritten = true\n\t_, err = l.out.Write(l.line[0:l.used])\n\tif err != nil {\n\t\treturn\n\t}\n\texcess := l.lineLength - l.used\n\tl.used = 0\n\n\t_, err = l.out.Write(b[0:excess])\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = l.Write(b[excess:])\n\treturn\n}\n\nfunc (l *lineBreaker) Close() (err error) {\n\tif l.used > 0 {\n\t\t_, err = l.out.Write(l.line[0:l.used])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\treturn\n}\n\n// encoding keeps track of a running CRC24 over the data which has been written\n// to it and outputs a OpenPGP checksum when closed, followed by an armor\n// trailer.\n//\n// It's built into a stack of io.Writers:\n//\n//\tencoding -> base64 encoder -> lineBreaker -> out\ntype encoding struct {\n\tout       io.Writer\n\tbreaker   *lineBreaker\n\tb64       io.WriteCloser\n\tcrc       uint32\n\tblockType []byte\n}\n\nfunc (e *encoding) Write(data []byte) (n int, err error) {\n\te.crc = crc24(e.crc, data)\n\treturn e.b64.Write(data)\n}\n\nfunc (e *encoding) Close() (err error) {\n\terr = e.b64.Close()\n\tif err != nil {\n\t\treturn\n\t}\n\te.breaker.Close()\n\n\tvar checksumBytes [3]byte\n\tchecksumBytes[0] = byte(e.crc >> 16)\n\tchecksumBytes[1] = byte(e.crc >> 8)\n\tchecksumBytes[2] = byte(e.crc)\n\n\tvar b64ChecksumBytes [4]byte\n\tbase64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:])\n\n\treturn writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine)\n}\n\n// Encode returns a WriteCloser which will encode the data written to it in\n// OpenPGP armor.\nfunc Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) {\n\tbType := []byte(blockType)\n\terr = writeSlices(out, armorStart, bType, armorEndOfLineOut)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor k, v := range headers {\n\t\terr = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\t_, err = out.Write(newline)\n\tif err != nil {\n\t\treturn\n\t}\n\n\te := &encoding{\n\t\tout:       out,\n\t\tbreaker:   newLineBreaker(out, 64),\n\t\tcrc:       crc24Init,\n\t\tblockType: bType,\n\t}\n\te.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker)\n\treturn e, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/canonical_text.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage openpgp\n\nimport \"hash\"\n\n// NewCanonicalTextHash reformats text written to it into the canonical\n// form and then applies the hash h.  See RFC 4880, section 5.2.1.\nfunc NewCanonicalTextHash(h hash.Hash) hash.Hash {\n\treturn &canonicalTextHash{h, 0}\n}\n\ntype canonicalTextHash struct {\n\th hash.Hash\n\ts int\n}\n\nvar newline = []byte{'\\r', '\\n'}\n\nfunc (cth *canonicalTextHash) Write(buf []byte) (int, error) {\n\tstart := 0\n\n\tfor i, c := range buf {\n\t\tswitch cth.s {\n\t\tcase 0:\n\t\t\tif c == '\\r' {\n\t\t\t\tcth.s = 1\n\t\t\t} else if c == '\\n' {\n\t\t\t\tcth.h.Write(buf[start:i])\n\t\t\t\tcth.h.Write(newline)\n\t\t\t\tstart = i + 1\n\t\t\t}\n\t\tcase 1:\n\t\t\tcth.s = 0\n\t\t}\n\t}\n\n\tcth.h.Write(buf[start:])\n\treturn len(buf), nil\n}\n\nfunc (cth *canonicalTextHash) Sum(in []byte) []byte {\n\treturn cth.h.Sum(in)\n}\n\nfunc (cth *canonicalTextHash) Reset() {\n\tcth.h.Reset()\n\tcth.s = 0\n}\n\nfunc (cth *canonicalTextHash) Size() int {\n\treturn cth.h.Size()\n}\n\nfunc (cth *canonicalTextHash) BlockSize() int {\n\treturn cth.h.BlockSize()\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package elgamal implements ElGamal encryption, suitable for OpenPGP,\n// as specified in \"A Public-Key Cryptosystem and a Signature Scheme Based on\n// Discrete Logarithms,\" IEEE Transactions on Information Theory, v. IT-31,\n// n. 4, 1985, pp. 469-472.\n//\n// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it\n// unsuitable for other protocols. RSA should be used in preference in any\n// case.\n//\n// Deprecated: this package was only provided to support ElGamal encryption in\n// OpenPGP. The golang.org/x/crypto/openpgp package is now deprecated (see\n// https://golang.org/issue/44226), and ElGamal in the OpenPGP ecosystem has\n// compatibility and security issues (see https://eprint.iacr.org/2021/923).\n// Moreover, this package doesn't protect against side-channel attacks.\npackage elgamal\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/subtle\"\n\t\"errors\"\n\t\"io\"\n\t\"math/big\"\n)\n\n// PublicKey represents an ElGamal public key.\ntype PublicKey struct {\n\tG, P, Y *big.Int\n}\n\n// PrivateKey represents an ElGamal private key.\ntype PrivateKey struct {\n\tPublicKey\n\tX *big.Int\n}\n\n// Encrypt encrypts the given message to the given public key. The result is a\n// pair of integers. Errors can result from reading random, or because msg is\n// too large to be encrypted to the public key.\nfunc Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) {\n\tpLen := (pub.P.BitLen() + 7) / 8\n\tif len(msg) > pLen-11 {\n\t\terr = errors.New(\"elgamal: message too long\")\n\t\treturn\n\t}\n\n\t// EM = 0x02 || PS || 0x00 || M\n\tem := make([]byte, pLen-1)\n\tem[0] = 2\n\tps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):]\n\terr = nonZeroRandomBytes(ps, random)\n\tif err != nil {\n\t\treturn\n\t}\n\tem[len(em)-len(msg)-1] = 0\n\tcopy(mm, msg)\n\n\tm := new(big.Int).SetBytes(em)\n\n\tk, err := rand.Int(random, pub.P)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tc1 = new(big.Int).Exp(pub.G, k, pub.P)\n\ts := new(big.Int).Exp(pub.Y, k, pub.P)\n\tc2 = s.Mul(s, m)\n\tc2.Mod(c2, pub.P)\n\n\treturn\n}\n\n// Decrypt takes two integers, resulting from an ElGamal encryption, and\n// returns the plaintext of the message. An error can result only if the\n// ciphertext is invalid. Users should keep in mind that this is a padding\n// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can\n// be used to break the cryptosystem.  See “Chosen Ciphertext Attacks\n// Against Protocols Based on the RSA Encryption Standard PKCS #1”, Daniel\n// Bleichenbacher, Advances in Cryptology (Crypto '98),\nfunc Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) {\n\ts := new(big.Int).Exp(c1, priv.X, priv.P)\n\tif s.ModInverse(s, priv.P) == nil {\n\t\treturn nil, errors.New(\"elgamal: invalid private key\")\n\t}\n\ts.Mul(s, c2)\n\ts.Mod(s, priv.P)\n\tem := s.Bytes()\n\n\tfirstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2)\n\n\t// The remainder of the plaintext must be a string of non-zero random\n\t// octets, followed by a 0, followed by the message.\n\t//   lookingForIndex: 1 iff we are still looking for the zero.\n\t//   index: the offset of the first zero byte.\n\tvar lookingForIndex, index int\n\tlookingForIndex = 1\n\n\tfor i := 1; i < len(em); i++ {\n\t\tequals0 := subtle.ConstantTimeByteEq(em[i], 0)\n\t\tindex = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index)\n\t\tlookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex)\n\t}\n\n\tif firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 {\n\t\treturn nil, errors.New(\"elgamal: decryption error\")\n\t}\n\treturn em[index+1:], nil\n}\n\n// nonZeroRandomBytes fills the given slice with non-zero random octets.\nfunc nonZeroRandomBytes(s []byte, rand io.Reader) (err error) {\n\t_, err = io.ReadFull(rand, s)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor i := 0; i < len(s); i++ {\n\t\tfor s[i] == 0 {\n\t\t\t_, err = io.ReadFull(rand, s[i:i+1])\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/errors/errors.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package errors contains common error types for the OpenPGP packages.\n//\n// Deprecated: this package is unmaintained except for security fixes. New\n// applications should consider a more focused, modern alternative to OpenPGP\n// for their specific task. If you are required to interoperate with OpenPGP\n// systems and need a maintained package, consider a community fork.\n// See https://golang.org/issue/44226.\npackage errors\n\nimport (\n\t\"strconv\"\n)\n\n// A StructuralError is returned when OpenPGP data is found to be syntactically\n// invalid.\ntype StructuralError string\n\nfunc (s StructuralError) Error() string {\n\treturn \"openpgp: invalid data: \" + string(s)\n}\n\n// UnsupportedError indicates that, although the OpenPGP data is valid, it\n// makes use of currently unimplemented features.\ntype UnsupportedError string\n\nfunc (s UnsupportedError) Error() string {\n\treturn \"openpgp: unsupported feature: \" + string(s)\n}\n\n// InvalidArgumentError indicates that the caller is in error and passed an\n// incorrect value.\ntype InvalidArgumentError string\n\nfunc (i InvalidArgumentError) Error() string {\n\treturn \"openpgp: invalid argument: \" + string(i)\n}\n\n// SignatureError indicates that a syntactically valid signature failed to\n// validate.\ntype SignatureError string\n\nfunc (b SignatureError) Error() string {\n\treturn \"openpgp: invalid signature: \" + string(b)\n}\n\ntype keyIncorrectError int\n\nfunc (ki keyIncorrectError) Error() string {\n\treturn \"openpgp: incorrect key\"\n}\n\nvar ErrKeyIncorrect error = keyIncorrectError(0)\n\ntype unknownIssuerError int\n\nfunc (unknownIssuerError) Error() string {\n\treturn \"openpgp: signature made by unknown entity\"\n}\n\nvar ErrUnknownIssuer error = unknownIssuerError(0)\n\ntype keyRevokedError int\n\nfunc (keyRevokedError) Error() string {\n\treturn \"openpgp: signature made by revoked key\"\n}\n\nvar ErrKeyRevoked error = keyRevokedError(0)\n\ntype UnknownPacketTypeError uint8\n\nfunc (upte UnknownPacketTypeError) Error() string {\n\treturn \"openpgp: unknown packet type: \" + strconv.Itoa(int(upte))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/keys.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage openpgp\n\nimport (\n\t\"crypto/rsa\"\n\t\"io\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/armor\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/packet\"\n)\n\n// PublicKeyType is the armor type for a PGP public key.\nvar PublicKeyType = \"PGP PUBLIC KEY BLOCK\"\n\n// PrivateKeyType is the armor type for a PGP private key.\nvar PrivateKeyType = \"PGP PRIVATE KEY BLOCK\"\n\n// An Entity represents the components of an OpenPGP key: a primary public key\n// (which must be a signing key), one or more identities claimed by that key,\n// and zero or more subkeys, which may be encryption keys.\ntype Entity struct {\n\tPrimaryKey  *packet.PublicKey\n\tPrivateKey  *packet.PrivateKey\n\tIdentities  map[string]*Identity // indexed by Identity.Name\n\tRevocations []*packet.Signature\n\tSubkeys     []Subkey\n}\n\n// An Identity represents an identity claimed by an Entity and zero or more\n// assertions by other entities about that claim.\ntype Identity struct {\n\tName          string // by convention, has the form \"Full Name (comment) <email@example.com>\"\n\tUserId        *packet.UserId\n\tSelfSignature *packet.Signature\n\tSignatures    []*packet.Signature\n}\n\n// A Subkey is an additional public key in an Entity. Subkeys can be used for\n// encryption.\ntype Subkey struct {\n\tPublicKey  *packet.PublicKey\n\tPrivateKey *packet.PrivateKey\n\tSig        *packet.Signature\n}\n\n// A Key identifies a specific public key in an Entity. This is either the\n// Entity's primary key or a subkey.\ntype Key struct {\n\tEntity        *Entity\n\tPublicKey     *packet.PublicKey\n\tPrivateKey    *packet.PrivateKey\n\tSelfSignature *packet.Signature\n}\n\n// A KeyRing provides access to public and private keys.\ntype KeyRing interface {\n\t// KeysById returns the set of keys that have the given key id.\n\tKeysById(id uint64) []Key\n\t// KeysByIdUsage returns the set of keys with the given id\n\t// that also meet the key usage given by requiredUsage.\n\t// The requiredUsage is expressed as the bitwise-OR of\n\t// packet.KeyFlag* values.\n\tKeysByIdUsage(id uint64, requiredUsage byte) []Key\n\t// DecryptionKeys returns all private keys that are valid for\n\t// decryption.\n\tDecryptionKeys() []Key\n}\n\n// primaryIdentity returns the Identity marked as primary or the first identity\n// if none are so marked.\nfunc (e *Entity) primaryIdentity() *Identity {\n\tvar firstIdentity *Identity\n\tfor _, ident := range e.Identities {\n\t\tif firstIdentity == nil {\n\t\t\tfirstIdentity = ident\n\t\t}\n\t\tif ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId {\n\t\t\treturn ident\n\t\t}\n\t}\n\treturn firstIdentity\n}\n\n// encryptionKey returns the best candidate Key for encrypting a message to the\n// given Entity.\nfunc (e *Entity) encryptionKey(now time.Time) (Key, bool) {\n\tcandidateSubkey := -1\n\n\t// Iterate the keys to find the newest key\n\tvar maxTime time.Time\n\tfor i, subkey := range e.Subkeys {\n\t\tif subkey.Sig.FlagsValid &&\n\t\t\tsubkey.Sig.FlagEncryptCommunications &&\n\t\t\tsubkey.PublicKey.PubKeyAlgo.CanEncrypt() &&\n\t\t\t!subkey.Sig.KeyExpired(now) &&\n\t\t\t(maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) {\n\t\t\tcandidateSubkey = i\n\t\t\tmaxTime = subkey.Sig.CreationTime\n\t\t}\n\t}\n\n\tif candidateSubkey != -1 {\n\t\tsubkey := e.Subkeys[candidateSubkey]\n\t\treturn Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true\n\t}\n\n\t// If we don't have any candidate subkeys for encryption and\n\t// the primary key doesn't have any usage metadata then we\n\t// assume that the primary key is ok. Or, if the primary key is\n\t// marked as ok to encrypt to, then we can obviously use it.\n\ti := e.primaryIdentity()\n\tif !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications &&\n\t\te.PrimaryKey.PubKeyAlgo.CanEncrypt() &&\n\t\t!i.SelfSignature.KeyExpired(now) {\n\t\treturn Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true\n\t}\n\n\t// This Entity appears to be signing only.\n\treturn Key{}, false\n}\n\n// signingKey return the best candidate Key for signing a message with this\n// Entity.\nfunc (e *Entity) signingKey(now time.Time) (Key, bool) {\n\tcandidateSubkey := -1\n\n\tfor i, subkey := range e.Subkeys {\n\t\tif subkey.Sig.FlagsValid &&\n\t\t\tsubkey.Sig.FlagSign &&\n\t\t\tsubkey.PublicKey.PubKeyAlgo.CanSign() &&\n\t\t\t!subkey.Sig.KeyExpired(now) {\n\t\t\tcandidateSubkey = i\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif candidateSubkey != -1 {\n\t\tsubkey := e.Subkeys[candidateSubkey]\n\t\treturn Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true\n\t}\n\n\t// If we have no candidate subkey then we assume that it's ok to sign\n\t// with the primary key.\n\ti := e.primaryIdentity()\n\tif !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign &&\n\t\t!i.SelfSignature.KeyExpired(now) {\n\t\treturn Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true\n\t}\n\n\treturn Key{}, false\n}\n\n// An EntityList contains one or more Entities.\ntype EntityList []*Entity\n\n// KeysById returns the set of keys that have the given key id.\nfunc (el EntityList) KeysById(id uint64) (keys []Key) {\n\tfor _, e := range el {\n\t\tif e.PrimaryKey.KeyId == id {\n\t\t\tvar selfSig *packet.Signature\n\t\t\tfor _, ident := range e.Identities {\n\t\t\t\tif selfSig == nil {\n\t\t\t\t\tselfSig = ident.SelfSignature\n\t\t\t\t} else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId {\n\t\t\t\t\tselfSig = ident.SelfSignature\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tkeys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig})\n\t\t}\n\n\t\tfor _, subKey := range e.Subkeys {\n\t\t\tif subKey.PublicKey.KeyId == id {\n\t\t\t\tkeys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig})\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// KeysByIdUsage returns the set of keys with the given id that also meet\n// the key usage given by requiredUsage.  The requiredUsage is expressed as\n// the bitwise-OR of packet.KeyFlag* values.\nfunc (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) {\n\tfor _, key := range el.KeysById(id) {\n\t\tif len(key.Entity.Revocations) > 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tif key.SelfSignature.RevocationReason != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif key.SelfSignature.FlagsValid && requiredUsage != 0 {\n\t\t\tvar usage byte\n\t\t\tif key.SelfSignature.FlagCertify {\n\t\t\t\tusage |= packet.KeyFlagCertify\n\t\t\t}\n\t\t\tif key.SelfSignature.FlagSign {\n\t\t\t\tusage |= packet.KeyFlagSign\n\t\t\t}\n\t\t\tif key.SelfSignature.FlagEncryptCommunications {\n\t\t\t\tusage |= packet.KeyFlagEncryptCommunications\n\t\t\t}\n\t\t\tif key.SelfSignature.FlagEncryptStorage {\n\t\t\t\tusage |= packet.KeyFlagEncryptStorage\n\t\t\t}\n\t\t\tif usage&requiredUsage != requiredUsage {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tkeys = append(keys, key)\n\t}\n\treturn\n}\n\n// DecryptionKeys returns all private keys that are valid for decryption.\nfunc (el EntityList) DecryptionKeys() (keys []Key) {\n\tfor _, e := range el {\n\t\tfor _, subKey := range e.Subkeys {\n\t\t\tif subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) {\n\t\t\t\tkeys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig})\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file.\nfunc ReadArmoredKeyRing(r io.Reader) (EntityList, error) {\n\tblock, err := armor.Decode(r)\n\tif err == io.EOF {\n\t\treturn nil, errors.InvalidArgumentError(\"no armored data found\")\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif block.Type != PublicKeyType && block.Type != PrivateKeyType {\n\t\treturn nil, errors.InvalidArgumentError(\"expected public or private key block, got: \" + block.Type)\n\t}\n\n\treturn ReadKeyRing(block.Body)\n}\n\n// ReadKeyRing reads one or more public/private keys. Unsupported keys are\n// ignored as long as at least a single valid key is found.\nfunc ReadKeyRing(r io.Reader) (el EntityList, err error) {\n\tpackets := packet.NewReader(r)\n\tvar lastUnsupportedError error\n\n\tfor {\n\t\tvar e *Entity\n\t\te, err = ReadEntity(packets)\n\t\tif err != nil {\n\t\t\t// TODO: warn about skipped unsupported/unreadable keys\n\t\t\tif _, ok := err.(errors.UnsupportedError); ok {\n\t\t\t\tlastUnsupportedError = err\n\t\t\t\terr = readToNextPublicKey(packets)\n\t\t\t} else if _, ok := err.(errors.StructuralError); ok {\n\t\t\t\t// Skip unreadable, badly-formatted keys\n\t\t\t\tlastUnsupportedError = err\n\t\t\t\terr = readToNextPublicKey(packets)\n\t\t\t}\n\t\t\tif err == io.EOF {\n\t\t\t\terr = nil\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tel = nil\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\tel = append(el, e)\n\t\t}\n\t}\n\n\tif len(el) == 0 && err == nil {\n\t\terr = lastUnsupportedError\n\t}\n\treturn\n}\n\n// readToNextPublicKey reads packets until the start of the entity and leaves\n// the first packet of the new entity in the Reader.\nfunc readToNextPublicKey(packets *packet.Reader) (err error) {\n\tvar p packet.Packet\n\tfor {\n\t\tp, err = packets.Next()\n\t\tif err == io.EOF {\n\t\t\treturn\n\t\t} else if err != nil {\n\t\t\tif _, ok := err.(errors.UnsupportedError); ok {\n\t\t\t\terr = nil\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tif pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {\n\t\t\tpackets.Unread(p)\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// ReadEntity reads an entity (public key, identities, subkeys etc) from the\n// given Reader.\nfunc ReadEntity(packets *packet.Reader) (*Entity, error) {\n\te := new(Entity)\n\te.Identities = make(map[string]*Identity)\n\n\tp, err := packets.Next()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar ok bool\n\tif e.PrimaryKey, ok = p.(*packet.PublicKey); !ok {\n\t\tif e.PrivateKey, ok = p.(*packet.PrivateKey); !ok {\n\t\t\tpackets.Unread(p)\n\t\t\treturn nil, errors.StructuralError(\"first packet was not a public/private key\")\n\t\t}\n\t\te.PrimaryKey = &e.PrivateKey.PublicKey\n\t}\n\n\tif !e.PrimaryKey.PubKeyAlgo.CanSign() {\n\t\treturn nil, errors.StructuralError(\"primary key cannot be used for signatures\")\n\t}\n\n\tvar revocations []*packet.Signature\nEachPacket:\n\tfor {\n\t\tp, err := packets.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t} else if err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch pkt := p.(type) {\n\t\tcase *packet.UserId:\n\t\t\tif err := addUserID(e, packets, pkt); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase *packet.Signature:\n\t\t\tif pkt.SigType == packet.SigTypeKeyRevocation {\n\t\t\t\trevocations = append(revocations, pkt)\n\t\t\t} else if pkt.SigType == packet.SigTypeDirectSignature {\n\t\t\t\t// TODO: RFC4880 5.2.1 permits signatures\n\t\t\t\t// directly on keys (eg. to bind additional\n\t\t\t\t// revocation keys).\n\t\t\t}\n\t\t\t// Else, ignoring the signature as it does not follow anything\n\t\t\t// we would know to attach it to.\n\t\tcase *packet.PrivateKey:\n\t\t\tif pkt.IsSubkey == false {\n\t\t\t\tpackets.Unread(p)\n\t\t\t\tbreak EachPacket\n\t\t\t}\n\t\t\terr = addSubkey(e, packets, &pkt.PublicKey, pkt)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase *packet.PublicKey:\n\t\t\tif pkt.IsSubkey == false {\n\t\t\t\tpackets.Unread(p)\n\t\t\t\tbreak EachPacket\n\t\t\t}\n\t\t\terr = addSubkey(e, packets, pkt, nil)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tdefault:\n\t\t\t// we ignore unknown packets\n\t\t}\n\t}\n\n\tif len(e.Identities) == 0 {\n\t\treturn nil, errors.StructuralError(\"entity without any identities\")\n\t}\n\n\tfor _, revocation := range revocations {\n\t\terr = e.PrimaryKey.VerifyRevocationSignature(revocation)\n\t\tif err == nil {\n\t\t\te.Revocations = append(e.Revocations, revocation)\n\t\t} else {\n\t\t\t// TODO: RFC 4880 5.2.3.15 defines revocation keys.\n\t\t\treturn nil, errors.StructuralError(\"revocation signature signed by alternate key\")\n\t\t}\n\t}\n\n\treturn e, nil\n}\n\nfunc addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error {\n\t// Make a new Identity object, that we might wind up throwing away.\n\t// We'll only add it if we get a valid self-signature over this\n\t// userID.\n\tidentity := new(Identity)\n\tidentity.Name = pkt.Id\n\tidentity.UserId = pkt\n\n\tfor {\n\t\tp, err := packets.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t} else if err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tsig, ok := p.(*packet.Signature)\n\t\tif !ok {\n\t\t\tpackets.Unread(p)\n\t\t\tbreak\n\t\t}\n\n\t\tif (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId {\n\t\t\tif err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil {\n\t\t\t\treturn errors.StructuralError(\"user ID self-signature invalid: \" + err.Error())\n\t\t\t}\n\t\t\tidentity.SelfSignature = sig\n\t\t\te.Identities[pkt.Id] = identity\n\t\t} else {\n\t\t\tidentity.Signatures = append(identity.Signatures, sig)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error {\n\tvar subKey Subkey\n\tsubKey.PublicKey = pub\n\tsubKey.PrivateKey = priv\n\n\tfor {\n\t\tp, err := packets.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t} else if err != nil {\n\t\t\treturn errors.StructuralError(\"subkey signature invalid: \" + err.Error())\n\t\t}\n\n\t\tsig, ok := p.(*packet.Signature)\n\t\tif !ok {\n\t\t\tpackets.Unread(p)\n\t\t\tbreak\n\t\t}\n\n\t\tif sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation {\n\t\t\treturn errors.StructuralError(\"subkey signature with wrong type\")\n\t\t}\n\n\t\tif err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil {\n\t\t\treturn errors.StructuralError(\"subkey signature invalid: \" + err.Error())\n\t\t}\n\n\t\tswitch sig.SigType {\n\t\tcase packet.SigTypeSubkeyRevocation:\n\t\t\tsubKey.Sig = sig\n\t\tcase packet.SigTypeSubkeyBinding:\n\n\t\t\tif shouldReplaceSubkeySig(subKey.Sig, sig) {\n\t\t\t\tsubKey.Sig = sig\n\t\t\t}\n\t\t}\n\t}\n\n\tif subKey.Sig == nil {\n\t\treturn errors.StructuralError(\"subkey packet not followed by signature\")\n\t}\n\n\te.Subkeys = append(e.Subkeys, subKey)\n\n\treturn nil\n}\n\nfunc shouldReplaceSubkeySig(existingSig, potentialNewSig *packet.Signature) bool {\n\tif potentialNewSig == nil {\n\t\treturn false\n\t}\n\n\tif existingSig == nil {\n\t\treturn true\n\t}\n\n\tif existingSig.SigType == packet.SigTypeSubkeyRevocation {\n\t\treturn false // never override a revocation signature\n\t}\n\n\treturn potentialNewSig.CreationTime.After(existingSig.CreationTime)\n}\n\nconst defaultRSAKeyBits = 2048\n\n// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a\n// single identity composed of the given full name, comment and email, any of\n// which may be empty but must not contain any of \"()<>\\x00\".\n// If config is nil, sensible defaults will be used.\nfunc NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) {\n\tcreationTime := config.Now()\n\n\tbits := defaultRSAKeyBits\n\tif config != nil && config.RSABits != 0 {\n\t\tbits = config.RSABits\n\t}\n\n\tuid := packet.NewUserId(name, comment, email)\n\tif uid == nil {\n\t\treturn nil, errors.InvalidArgumentError(\"user id field contained invalid characters\")\n\t}\n\tsigningPriv, err := rsa.GenerateKey(config.Random(), bits)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tencryptingPriv, err := rsa.GenerateKey(config.Random(), bits)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\te := &Entity{\n\t\tPrimaryKey: packet.NewRSAPublicKey(creationTime, &signingPriv.PublicKey),\n\t\tPrivateKey: packet.NewRSAPrivateKey(creationTime, signingPriv),\n\t\tIdentities: make(map[string]*Identity),\n\t}\n\tisPrimaryId := true\n\te.Identities[uid.Id] = &Identity{\n\t\tName:   uid.Id,\n\t\tUserId: uid,\n\t\tSelfSignature: &packet.Signature{\n\t\t\tCreationTime: creationTime,\n\t\t\tSigType:      packet.SigTypePositiveCert,\n\t\t\tPubKeyAlgo:   packet.PubKeyAlgoRSA,\n\t\t\tHash:         config.Hash(),\n\t\t\tIsPrimaryId:  &isPrimaryId,\n\t\t\tFlagsValid:   true,\n\t\t\tFlagSign:     true,\n\t\t\tFlagCertify:  true,\n\t\t\tIssuerKeyId:  &e.PrimaryKey.KeyId,\n\t\t},\n\t}\n\terr = e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e.PrimaryKey, e.PrivateKey, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// If the user passes in a DefaultHash via packet.Config,\n\t// set the PreferredHash for the SelfSignature.\n\tif config != nil && config.DefaultHash != 0 {\n\t\te.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)}\n\t}\n\n\t// Likewise for DefaultCipher.\n\tif config != nil && config.DefaultCipher != 0 {\n\t\te.Identities[uid.Id].SelfSignature.PreferredSymmetric = []uint8{uint8(config.DefaultCipher)}\n\t}\n\n\te.Subkeys = make([]Subkey, 1)\n\te.Subkeys[0] = Subkey{\n\t\tPublicKey:  packet.NewRSAPublicKey(creationTime, &encryptingPriv.PublicKey),\n\t\tPrivateKey: packet.NewRSAPrivateKey(creationTime, encryptingPriv),\n\t\tSig: &packet.Signature{\n\t\t\tCreationTime:              creationTime,\n\t\t\tSigType:                   packet.SigTypeSubkeyBinding,\n\t\t\tPubKeyAlgo:                packet.PubKeyAlgoRSA,\n\t\t\tHash:                      config.Hash(),\n\t\t\tFlagsValid:                true,\n\t\t\tFlagEncryptStorage:        true,\n\t\t\tFlagEncryptCommunications: true,\n\t\t\tIssuerKeyId:               &e.PrimaryKey.KeyId,\n\t\t},\n\t}\n\te.Subkeys[0].PublicKey.IsSubkey = true\n\te.Subkeys[0].PrivateKey.IsSubkey = true\n\terr = e.Subkeys[0].Sig.SignKey(e.Subkeys[0].PublicKey, e.PrivateKey, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn e, nil\n}\n\n// SerializePrivate serializes an Entity, including private key material, but\n// excluding signatures from other entities, to the given Writer.\n// Identities and subkeys are re-signed in case they changed since NewEntry.\n// If config is nil, sensible defaults will be used.\nfunc (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) {\n\terr = e.PrivateKey.Serialize(w)\n\tif err != nil {\n\t\treturn\n\t}\n\tfor _, ident := range e.Identities {\n\t\terr = ident.UserId.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\terr = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\terr = ident.SelfSignature.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tfor _, subkey := range e.Subkeys {\n\t\terr = subkey.PrivateKey.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\terr = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\terr = subkey.Sig.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn nil\n}\n\n// Serialize writes the public part of the given Entity to w, including\n// signatures from other entities. No private key material will be output.\nfunc (e *Entity) Serialize(w io.Writer) error {\n\terr := e.PrimaryKey.Serialize(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, ident := range e.Identities {\n\t\terr = ident.UserId.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = ident.SelfSignature.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, sig := range ident.Signatures {\n\t\t\terr = sig.Serialize(w)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tfor _, subkey := range e.Subkeys {\n\t\terr = subkey.PublicKey.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = subkey.Sig.Serialize(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// SignIdentity adds a signature to e, from signer, attesting that identity is\n// associated with e. The provided identity must already be an element of\n// e.Identities and the private key of signer must have been decrypted if\n// necessary.\n// If config is nil, sensible defaults will be used.\nfunc (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error {\n\tif signer.PrivateKey == nil {\n\t\treturn errors.InvalidArgumentError(\"signing Entity must have a private key\")\n\t}\n\tif signer.PrivateKey.Encrypted {\n\t\treturn errors.InvalidArgumentError(\"signing Entity's private key must be decrypted\")\n\t}\n\tident, ok := e.Identities[identity]\n\tif !ok {\n\t\treturn errors.InvalidArgumentError(\"given identity string not found in Entity\")\n\t}\n\n\tsig := &packet.Signature{\n\t\tSigType:      packet.SigTypeGenericCert,\n\t\tPubKeyAlgo:   signer.PrivateKey.PubKeyAlgo,\n\t\tHash:         config.Hash(),\n\t\tCreationTime: config.Now(),\n\t\tIssuerKeyId:  &signer.PrivateKey.KeyId,\n\t}\n\tif err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil {\n\t\treturn err\n\t}\n\tident.Signatures = append(ident.Signatures, sig)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/compressed.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"compress/bzip2\"\n\t\"compress/flate\"\n\t\"compress/zlib\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"io\"\n\t\"strconv\"\n)\n\n// Compressed represents a compressed OpenPGP packet. The decompressed contents\n// will contain more OpenPGP packets. See RFC 4880, section 5.6.\ntype Compressed struct {\n\tBody io.Reader\n}\n\nconst (\n\tNoCompression      = flate.NoCompression\n\tBestSpeed          = flate.BestSpeed\n\tBestCompression    = flate.BestCompression\n\tDefaultCompression = flate.DefaultCompression\n)\n\n// CompressionConfig contains compressor configuration settings.\ntype CompressionConfig struct {\n\t// Level is the compression level to use. It must be set to\n\t// between -1 and 9, with -1 causing the compressor to use the\n\t// default compression level, 0 causing the compressor to use\n\t// no compression and 1 to 9 representing increasing (better,\n\t// slower) compression levels. If Level is less than -1 or\n\t// more then 9, a non-nil error will be returned during\n\t// encryption. See the constants above for convenient common\n\t// settings for Level.\n\tLevel int\n}\n\nfunc (c *Compressed) parse(r io.Reader) error {\n\tvar buf [1]byte\n\t_, err := readFull(r, buf[:])\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch buf[0] {\n\tcase 1:\n\t\tc.Body = flate.NewReader(r)\n\tcase 2:\n\t\tc.Body, err = zlib.NewReader(r)\n\tcase 3:\n\t\tc.Body = bzip2.NewReader(r)\n\tdefault:\n\t\terr = errors.UnsupportedError(\"unknown compression algorithm: \" + strconv.Itoa(int(buf[0])))\n\t}\n\n\treturn err\n}\n\n// compressedWriteCloser represents the serialized compression stream\n// header and the compressor. Its Close() method ensures that both the\n// compressor and serialized stream header are closed. Its Write()\n// method writes to the compressor.\ntype compressedWriteCloser struct {\n\tsh io.Closer      // Stream Header\n\tc  io.WriteCloser // Compressor\n}\n\nfunc (cwc compressedWriteCloser) Write(p []byte) (int, error) {\n\treturn cwc.c.Write(p)\n}\n\nfunc (cwc compressedWriteCloser) Close() (err error) {\n\terr = cwc.c.Close()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn cwc.sh.Close()\n}\n\n// SerializeCompressed serializes a compressed data packet to w and\n// returns a WriteCloser to which the literal data packets themselves\n// can be written and which MUST be closed on completion. If cc is\n// nil, sensible defaults will be used to configure the compression\n// algorithm.\nfunc SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) {\n\tcompressed, err := serializeStreamHeader(w, packetTypeCompressed)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = compressed.Write([]byte{uint8(algo)})\n\tif err != nil {\n\t\treturn\n\t}\n\n\tlevel := DefaultCompression\n\tif cc != nil {\n\t\tlevel = cc.Level\n\t}\n\n\tvar compressor io.WriteCloser\n\tswitch algo {\n\tcase CompressionZIP:\n\t\tcompressor, err = flate.NewWriter(compressed, level)\n\tcase CompressionZLIB:\n\t\tcompressor, err = zlib.NewWriterLevel(compressed, level)\n\tdefault:\n\t\ts := strconv.Itoa(int(algo))\n\t\terr = errors.UnsupportedError(\"Unsupported compression algorithm: \" + s)\n\t}\n\tif err != nil {\n\t\treturn\n\t}\n\n\tliteraldata = compressedWriteCloser{compressed, compressor}\n\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/config.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto\"\n\t\"crypto/rand\"\n\t\"io\"\n\t\"time\"\n)\n\n// Config collects a number of parameters along with sensible defaults.\n// A nil *Config is valid and results in all default values.\ntype Config struct {\n\t// Rand provides the source of entropy.\n\t// If nil, the crypto/rand Reader is used.\n\tRand io.Reader\n\t// DefaultHash is the default hash function to be used.\n\t// If zero, SHA-256 is used.\n\tDefaultHash crypto.Hash\n\t// DefaultCipher is the cipher to be used.\n\t// If zero, AES-128 is used.\n\tDefaultCipher CipherFunction\n\t// Time returns the current time as the number of seconds since the\n\t// epoch. If Time is nil, time.Now is used.\n\tTime func() time.Time\n\t// DefaultCompressionAlgo is the compression algorithm to be\n\t// applied to the plaintext before encryption. If zero, no\n\t// compression is done.\n\tDefaultCompressionAlgo CompressionAlgo\n\t// CompressionConfig configures the compression settings.\n\tCompressionConfig *CompressionConfig\n\t// S2KCount is only used for symmetric encryption. It\n\t// determines the strength of the passphrase stretching when\n\t// the said passphrase is hashed to produce a key. S2KCount\n\t// should be between 1024 and 65011712, inclusive. If Config\n\t// is nil or S2KCount is 0, the value 65536 used. Not all\n\t// values in the above range can be represented. S2KCount will\n\t// be rounded up to the next representable value if it cannot\n\t// be encoded exactly. When set, it is strongly encrouraged to\n\t// use a value that is at least 65536. See RFC 4880 Section\n\t// 3.7.1.3.\n\tS2KCount int\n\t// RSABits is the number of bits in new RSA keys made with NewEntity.\n\t// If zero, then 2048 bit keys are created.\n\tRSABits int\n}\n\nfunc (c *Config) Random() io.Reader {\n\tif c == nil || c.Rand == nil {\n\t\treturn rand.Reader\n\t}\n\treturn c.Rand\n}\n\nfunc (c *Config) Hash() crypto.Hash {\n\tif c == nil || uint(c.DefaultHash) == 0 {\n\t\treturn crypto.SHA256\n\t}\n\treturn c.DefaultHash\n}\n\nfunc (c *Config) Cipher() CipherFunction {\n\tif c == nil || uint8(c.DefaultCipher) == 0 {\n\t\treturn CipherAES128\n\t}\n\treturn c.DefaultCipher\n}\n\nfunc (c *Config) Now() time.Time {\n\tif c == nil || c.Time == nil {\n\t\treturn time.Now()\n\t}\n\treturn c.Time()\n}\n\nfunc (c *Config) Compression() CompressionAlgo {\n\tif c == nil {\n\t\treturn CompressionNone\n\t}\n\treturn c.DefaultCompressionAlgo\n}\n\nfunc (c *Config) PasswordHashIterations() int {\n\tif c == nil || c.S2KCount == 0 {\n\t\treturn 0\n\t}\n\treturn c.S2KCount\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto\"\n\t\"crypto/rsa\"\n\t\"encoding/binary\"\n\t\"io\"\n\t\"math/big\"\n\t\"strconv\"\n\n\t\"golang.org/x/crypto/openpgp/elgamal\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\nconst encryptedKeyVersion = 3\n\n// EncryptedKey represents a public-key encrypted session key. See RFC 4880,\n// section 5.1.\ntype EncryptedKey struct {\n\tKeyId      uint64\n\tAlgo       PublicKeyAlgorithm\n\tCipherFunc CipherFunction // only valid after a successful Decrypt\n\tKey        []byte         // only valid after a successful Decrypt\n\n\tencryptedMPI1, encryptedMPI2 parsedMPI\n}\n\nfunc (e *EncryptedKey) parse(r io.Reader) (err error) {\n\tvar buf [10]byte\n\t_, err = readFull(r, buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tif buf[0] != encryptedKeyVersion {\n\t\treturn errors.UnsupportedError(\"unknown EncryptedKey version \" + strconv.Itoa(int(buf[0])))\n\t}\n\te.KeyId = binary.BigEndian.Uint64(buf[1:9])\n\te.Algo = PublicKeyAlgorithm(buf[9])\n\tswitch e.Algo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:\n\t\te.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\tcase PubKeyAlgoElGamal:\n\t\te.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\te.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\t_, err = consumeAll(r)\n\treturn\n}\n\nfunc checksumKeyMaterial(key []byte) uint16 {\n\tvar checksum uint16\n\tfor _, v := range key {\n\t\tchecksum += uint16(v)\n\t}\n\treturn checksum\n}\n\n// Decrypt decrypts an encrypted session key with the given private key. The\n// private key must have been decrypted first.\n// If config is nil, sensible defaults will be used.\nfunc (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error {\n\tvar err error\n\tvar b []byte\n\n\t// TODO(agl): use session key decryption routines here to avoid\n\t// padding oracle attacks.\n\tswitch priv.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:\n\t\t// Supports both *rsa.PrivateKey and crypto.Decrypter\n\t\tk := priv.PrivateKey.(crypto.Decrypter)\n\t\tb, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.bytes), nil)\n\tcase PubKeyAlgoElGamal:\n\t\tc1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes)\n\t\tc2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes)\n\t\tb, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2)\n\tdefault:\n\t\terr = errors.InvalidArgumentError(\"cannot decrypted encrypted session key with private key of type \" + strconv.Itoa(int(priv.PubKeyAlgo)))\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\te.CipherFunc = CipherFunction(b[0])\n\te.Key = b[1 : len(b)-2]\n\texpectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1])\n\tchecksum := checksumKeyMaterial(e.Key)\n\tif checksum != expectedChecksum {\n\t\treturn errors.StructuralError(\"EncryptedKey checksum incorrect\")\n\t}\n\n\treturn nil\n}\n\n// Serialize writes the encrypted key packet, e, to w.\nfunc (e *EncryptedKey) Serialize(w io.Writer) error {\n\tvar mpiLen int\n\tswitch e.Algo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:\n\t\tmpiLen = 2 + len(e.encryptedMPI1.bytes)\n\tcase PubKeyAlgoElGamal:\n\t\tmpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes)\n\tdefault:\n\t\treturn errors.InvalidArgumentError(\"don't know how to serialize encrypted key type \" + strconv.Itoa(int(e.Algo)))\n\t}\n\n\tserializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen)\n\n\tw.Write([]byte{encryptedKeyVersion})\n\tbinary.Write(w, binary.BigEndian, e.KeyId)\n\tw.Write([]byte{byte(e.Algo)})\n\n\tswitch e.Algo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:\n\t\twriteMPIs(w, e.encryptedMPI1)\n\tcase PubKeyAlgoElGamal:\n\t\twriteMPIs(w, e.encryptedMPI1, e.encryptedMPI2)\n\tdefault:\n\t\tpanic(\"internal error\")\n\t}\n\n\treturn nil\n}\n\n// SerializeEncryptedKey serializes an encrypted key packet to w that contains\n// key, encrypted to pub.\n// If config is nil, sensible defaults will be used.\nfunc SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error {\n\tvar buf [10]byte\n\tbuf[0] = encryptedKeyVersion\n\tbinary.BigEndian.PutUint64(buf[1:9], pub.KeyId)\n\tbuf[9] = byte(pub.PubKeyAlgo)\n\n\tkeyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */)\n\tkeyBlock[0] = byte(cipherFunc)\n\tcopy(keyBlock[1:], key)\n\tchecksum := checksumKeyMaterial(key)\n\tkeyBlock[1+len(key)] = byte(checksum >> 8)\n\tkeyBlock[1+len(key)+1] = byte(checksum)\n\n\tswitch pub.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:\n\t\treturn serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock)\n\tcase PubKeyAlgoElGamal:\n\t\treturn serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock)\n\tcase PubKeyAlgoDSA, PubKeyAlgoRSASignOnly:\n\t\treturn errors.InvalidArgumentError(\"cannot encrypt to public key of type \" + strconv.Itoa(int(pub.PubKeyAlgo)))\n\t}\n\n\treturn errors.UnsupportedError(\"encrypting a key to public key of type \" + strconv.Itoa(int(pub.PubKeyAlgo)))\n}\n\nfunc serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error {\n\tcipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock)\n\tif err != nil {\n\t\treturn errors.InvalidArgumentError(\"RSA encryption failed: \" + err.Error())\n\t}\n\n\tpacketLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText)\n\n\terr = serializeHeader(w, packetTypeEncryptedKey, packetLen)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = w.Write(header[:])\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn writeMPI(w, 8*uint16(len(cipherText)), cipherText)\n}\n\nfunc serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error {\n\tc1, c2, err := elgamal.Encrypt(rand, pub, keyBlock)\n\tif err != nil {\n\t\treturn errors.InvalidArgumentError(\"ElGamal encryption failed: \" + err.Error())\n\t}\n\n\tpacketLen := 10 /* header length */\n\tpacketLen += 2 /* mpi size */ + (c1.BitLen()+7)/8\n\tpacketLen += 2 /* mpi size */ + (c2.BitLen()+7)/8\n\n\terr = serializeHeader(w, packetTypeEncryptedKey, packetLen)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = w.Write(header[:])\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = writeBig(w, c1)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn writeBig(w, c2)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/literal.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"encoding/binary\"\n\t\"io\"\n)\n\n// LiteralData represents an encrypted file. See RFC 4880, section 5.9.\ntype LiteralData struct {\n\tIsBinary bool\n\tFileName string\n\tTime     uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined.\n\tBody     io.Reader\n}\n\n// ForEyesOnly returns whether the contents of the LiteralData have been marked\n// as especially sensitive.\nfunc (l *LiteralData) ForEyesOnly() bool {\n\treturn l.FileName == \"_CONSOLE\"\n}\n\nfunc (l *LiteralData) parse(r io.Reader) (err error) {\n\tvar buf [256]byte\n\n\t_, err = readFull(r, buf[:2])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tl.IsBinary = buf[0] == 'b'\n\tfileNameLen := int(buf[1])\n\n\t_, err = readFull(r, buf[:fileNameLen])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tl.FileName = string(buf[:fileNameLen])\n\n\t_, err = readFull(r, buf[:4])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tl.Time = binary.BigEndian.Uint32(buf[:4])\n\tl.Body = r\n\treturn\n}\n\n// SerializeLiteral serializes a literal data packet to w and returns a\n// WriteCloser to which the data itself can be written and which MUST be closed\n// on completion. The fileName is truncated to 255 bytes.\nfunc SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) {\n\tvar buf [4]byte\n\tbuf[0] = 't'\n\tif isBinary {\n\t\tbuf[0] = 'b'\n\t}\n\tif len(fileName) > 255 {\n\t\tfileName = fileName[:255]\n\t}\n\tbuf[1] = byte(len(fileName))\n\n\tinner, err := serializeStreamHeader(w, packetTypeLiteralData)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = inner.Write(buf[:2])\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = inner.Write([]byte(fileName))\n\tif err != nil {\n\t\treturn\n\t}\n\tbinary.BigEndian.PutUint32(buf[:], time)\n\t_, err = inner.Write(buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tplaintext = inner\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/ocfb.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9\n\npackage packet\n\nimport (\n\t\"crypto/cipher\"\n)\n\ntype ocfbEncrypter struct {\n\tb       cipher.Block\n\tfre     []byte\n\toutUsed int\n}\n\n// An OCFBResyncOption determines if the \"resynchronization step\" of OCFB is\n// performed.\ntype OCFBResyncOption bool\n\nconst (\n\tOCFBResync   OCFBResyncOption = true\n\tOCFBNoResync OCFBResyncOption = false\n)\n\n// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's\n// cipher feedback mode using the given cipher.Block, and an initial amount of\n// ciphertext.  randData must be random bytes and be the same length as the\n// cipher.Block's block size. Resync determines if the \"resynchronization step\"\n// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on\n// this point.\nfunc NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) {\n\tblockSize := block.BlockSize()\n\tif len(randData) != blockSize {\n\t\treturn nil, nil\n\t}\n\n\tx := &ocfbEncrypter{\n\t\tb:       block,\n\t\tfre:     make([]byte, blockSize),\n\t\toutUsed: 0,\n\t}\n\tprefix := make([]byte, blockSize+2)\n\n\tblock.Encrypt(x.fre, x.fre)\n\tfor i := 0; i < blockSize; i++ {\n\t\tprefix[i] = randData[i] ^ x.fre[i]\n\t}\n\n\tblock.Encrypt(x.fre, prefix[:blockSize])\n\tprefix[blockSize] = x.fre[0] ^ randData[blockSize-2]\n\tprefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1]\n\n\tif resync {\n\t\tblock.Encrypt(x.fre, prefix[2:])\n\t} else {\n\t\tx.fre[0] = prefix[blockSize]\n\t\tx.fre[1] = prefix[blockSize+1]\n\t\tx.outUsed = 2\n\t}\n\treturn x, prefix\n}\n\nfunc (x *ocfbEncrypter) XORKeyStream(dst, src []byte) {\n\tfor i := 0; i < len(src); i++ {\n\t\tif x.outUsed == len(x.fre) {\n\t\t\tx.b.Encrypt(x.fre, x.fre)\n\t\t\tx.outUsed = 0\n\t\t}\n\n\t\tx.fre[x.outUsed] ^= src[i]\n\t\tdst[i] = x.fre[x.outUsed]\n\t\tx.outUsed++\n\t}\n}\n\ntype ocfbDecrypter struct {\n\tb       cipher.Block\n\tfre     []byte\n\toutUsed int\n}\n\n// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's\n// cipher feedback mode using the given cipher.Block. Prefix must be the first\n// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's\n// block size. If an incorrect key is detected then nil is returned. On\n// successful exit, blockSize+2 bytes of decrypted data are written into\n// prefix. Resync determines if the \"resynchronization step\" from RFC 4880,\n// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.\nfunc NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream {\n\tblockSize := block.BlockSize()\n\tif len(prefix) != blockSize+2 {\n\t\treturn nil\n\t}\n\n\tx := &ocfbDecrypter{\n\t\tb:       block,\n\t\tfre:     make([]byte, blockSize),\n\t\toutUsed: 0,\n\t}\n\tprefixCopy := make([]byte, len(prefix))\n\tcopy(prefixCopy, prefix)\n\n\tblock.Encrypt(x.fre, x.fre)\n\tfor i := 0; i < blockSize; i++ {\n\t\tprefixCopy[i] ^= x.fre[i]\n\t}\n\n\tblock.Encrypt(x.fre, prefix[:blockSize])\n\tprefixCopy[blockSize] ^= x.fre[0]\n\tprefixCopy[blockSize+1] ^= x.fre[1]\n\n\tif prefixCopy[blockSize-2] != prefixCopy[blockSize] ||\n\t\tprefixCopy[blockSize-1] != prefixCopy[blockSize+1] {\n\t\treturn nil\n\t}\n\n\tif resync {\n\t\tblock.Encrypt(x.fre, prefix[2:])\n\t} else {\n\t\tx.fre[0] = prefix[blockSize]\n\t\tx.fre[1] = prefix[blockSize+1]\n\t\tx.outUsed = 2\n\t}\n\tcopy(prefix, prefixCopy)\n\treturn x\n}\n\nfunc (x *ocfbDecrypter) XORKeyStream(dst, src []byte) {\n\tfor i := 0; i < len(src); i++ {\n\t\tif x.outUsed == len(x.fre) {\n\t\t\tx.b.Encrypt(x.fre, x.fre)\n\t\t\tx.outUsed = 0\n\t\t}\n\n\t\tc := src[i]\n\t\tdst[i] = x.fre[x.outUsed] ^ src[i]\n\t\tx.fre[x.outUsed] = c\n\t\tx.outUsed++\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto\"\n\t\"encoding/binary\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n\t\"io\"\n\t\"strconv\"\n)\n\n// OnePassSignature represents a one-pass signature packet. See RFC 4880,\n// section 5.4.\ntype OnePassSignature struct {\n\tSigType    SignatureType\n\tHash       crypto.Hash\n\tPubKeyAlgo PublicKeyAlgorithm\n\tKeyId      uint64\n\tIsLast     bool\n}\n\nconst onePassSignatureVersion = 3\n\nfunc (ops *OnePassSignature) parse(r io.Reader) (err error) {\n\tvar buf [13]byte\n\n\t_, err = readFull(r, buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tif buf[0] != onePassSignatureVersion {\n\t\terr = errors.UnsupportedError(\"one-pass-signature packet version \" + strconv.Itoa(int(buf[0])))\n\t}\n\n\tvar ok bool\n\tops.Hash, ok = s2k.HashIdToHash(buf[2])\n\tif !ok {\n\t\treturn errors.UnsupportedError(\"hash function: \" + strconv.Itoa(int(buf[2])))\n\t}\n\n\tops.SigType = SignatureType(buf[1])\n\tops.PubKeyAlgo = PublicKeyAlgorithm(buf[3])\n\tops.KeyId = binary.BigEndian.Uint64(buf[4:12])\n\tops.IsLast = buf[12] != 0\n\treturn\n}\n\n// Serialize marshals the given OnePassSignature to w.\nfunc (ops *OnePassSignature) Serialize(w io.Writer) error {\n\tvar buf [13]byte\n\tbuf[0] = onePassSignatureVersion\n\tbuf[1] = uint8(ops.SigType)\n\tvar ok bool\n\tbuf[2], ok = s2k.HashToHashId(ops.Hash)\n\tif !ok {\n\t\treturn errors.UnsupportedError(\"hash type: \" + strconv.Itoa(int(ops.Hash)))\n\t}\n\tbuf[3] = uint8(ops.PubKeyAlgo)\n\tbinary.BigEndian.PutUint64(buf[4:12], ops.KeyId)\n\tif ops.IsLast {\n\t\tbuf[12] = 1\n\t}\n\n\tif err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil {\n\t\treturn err\n\t}\n\t_, err := w.Write(buf[:])\n\treturn err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/opaque.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\n// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is\n// useful for splitting and storing the original packet contents separately,\n// handling unsupported packet types or accessing parts of the packet not yet\n// implemented by this package.\ntype OpaquePacket struct {\n\t// Packet type\n\tTag uint8\n\t// Reason why the packet was parsed opaquely\n\tReason error\n\t// Binary contents of the packet data\n\tContents []byte\n}\n\nfunc (op *OpaquePacket) parse(r io.Reader) (err error) {\n\top.Contents, err = io.ReadAll(r)\n\treturn\n}\n\n// Serialize marshals the packet to a writer in its original form, including\n// the packet header.\nfunc (op *OpaquePacket) Serialize(w io.Writer) (err error) {\n\terr = serializeHeader(w, packetType(op.Tag), len(op.Contents))\n\tif err == nil {\n\t\t_, err = w.Write(op.Contents)\n\t}\n\treturn\n}\n\n// Parse attempts to parse the opaque contents into a structure supported by\n// this package. If the packet is not known then the result will be another\n// OpaquePacket.\nfunc (op *OpaquePacket) Parse() (p Packet, err error) {\n\thdr := bytes.NewBuffer(nil)\n\terr = serializeHeader(hdr, packetType(op.Tag), len(op.Contents))\n\tif err != nil {\n\t\top.Reason = err\n\t\treturn op, err\n\t}\n\tp, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents)))\n\tif err != nil {\n\t\top.Reason = err\n\t\tp = op\n\t}\n\treturn\n}\n\n// OpaqueReader reads OpaquePackets from an io.Reader.\ntype OpaqueReader struct {\n\tr io.Reader\n}\n\nfunc NewOpaqueReader(r io.Reader) *OpaqueReader {\n\treturn &OpaqueReader{r: r}\n}\n\n// Read the next OpaquePacket.\nfunc (or *OpaqueReader) Next() (op *OpaquePacket, err error) {\n\ttag, _, contents, err := readHeader(or.r)\n\tif err != nil {\n\t\treturn\n\t}\n\top = &OpaquePacket{Tag: uint8(tag), Reason: err}\n\terr = op.parse(contents)\n\tif err != nil {\n\t\tconsumeAll(contents)\n\t}\n\treturn\n}\n\n// OpaqueSubpacket represents an unparsed OpenPGP subpacket,\n// as found in signature and user attribute packets.\ntype OpaqueSubpacket struct {\n\tSubType  uint8\n\tContents []byte\n}\n\n// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from\n// their byte representation.\nfunc OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) {\n\tvar (\n\t\tsubHeaderLen int\n\t\tsubPacket    *OpaqueSubpacket\n\t)\n\tfor len(contents) > 0 {\n\t\tsubHeaderLen, subPacket, err = nextSubpacket(contents)\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tresult = append(result, subPacket)\n\t\tcontents = contents[subHeaderLen+len(subPacket.Contents):]\n\t}\n\treturn\n}\n\nfunc nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) {\n\t// RFC 4880, section 5.2.3.1\n\tvar subLen uint32\n\tif len(contents) < 1 {\n\t\tgoto Truncated\n\t}\n\tsubPacket = &OpaqueSubpacket{}\n\tswitch {\n\tcase contents[0] < 192:\n\t\tsubHeaderLen = 2 // 1 length byte, 1 subtype byte\n\t\tif len(contents) < subHeaderLen {\n\t\t\tgoto Truncated\n\t\t}\n\t\tsubLen = uint32(contents[0])\n\t\tcontents = contents[1:]\n\tcase contents[0] < 255:\n\t\tsubHeaderLen = 3 // 2 length bytes, 1 subtype\n\t\tif len(contents) < subHeaderLen {\n\t\t\tgoto Truncated\n\t\t}\n\t\tsubLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192\n\t\tcontents = contents[2:]\n\tdefault:\n\t\tsubHeaderLen = 6 // 5 length bytes, 1 subtype\n\t\tif len(contents) < subHeaderLen {\n\t\t\tgoto Truncated\n\t\t}\n\t\tsubLen = uint32(contents[1])<<24 |\n\t\t\tuint32(contents[2])<<16 |\n\t\t\tuint32(contents[3])<<8 |\n\t\t\tuint32(contents[4])\n\t\tcontents = contents[5:]\n\t}\n\tif subLen > uint32(len(contents)) || subLen == 0 {\n\t\tgoto Truncated\n\t}\n\tsubPacket.SubType = contents[0]\n\tsubPacket.Contents = contents[1:subLen]\n\treturn\nTruncated:\n\terr = errors.StructuralError(\"subpacket truncated\")\n\treturn\n}\n\nfunc (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) {\n\tbuf := make([]byte, 6)\n\tn := serializeSubpacketLength(buf, len(osp.Contents)+1)\n\tbuf[n] = osp.SubType\n\tif _, err = w.Write(buf[:n+1]); err != nil {\n\t\treturn\n\t}\n\t_, err = w.Write(osp.Contents)\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/packet.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package packet implements parsing and serialization of OpenPGP packets, as\n// specified in RFC 4880.\n//\n// Deprecated: this package is unmaintained except for security fixes. New\n// applications should consider a more focused, modern alternative to OpenPGP\n// for their specific task. If you are required to interoperate with OpenPGP\n// systems and need a maintained package, consider a community fork.\n// See https://golang.org/issue/44226.\npackage packet\n\nimport (\n\t\"bufio\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/des\"\n\t\"crypto/rsa\"\n\t\"io\"\n\t\"math/big\"\n\t\"math/bits\"\n\n\t\"golang.org/x/crypto/cast5\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\n// readFull is the same as io.ReadFull except that reading zero bytes returns\n// ErrUnexpectedEOF rather than EOF.\nfunc readFull(r io.Reader, buf []byte) (n int, err error) {\n\tn, err = io.ReadFull(r, buf)\n\tif err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn\n}\n\n// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2.\nfunc readLength(r io.Reader) (length int64, isPartial bool, err error) {\n\tvar buf [4]byte\n\t_, err = readFull(r, buf[:1])\n\tif err != nil {\n\t\treturn\n\t}\n\tswitch {\n\tcase buf[0] < 192:\n\t\tlength = int64(buf[0])\n\tcase buf[0] < 224:\n\t\tlength = int64(buf[0]-192) << 8\n\t\t_, err = readFull(r, buf[0:1])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tlength += int64(buf[0]) + 192\n\tcase buf[0] < 255:\n\t\tlength = int64(1) << (buf[0] & 0x1f)\n\t\tisPartial = true\n\tdefault:\n\t\t_, err = readFull(r, buf[0:4])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tlength = int64(buf[0])<<24 |\n\t\t\tint64(buf[1])<<16 |\n\t\t\tint64(buf[2])<<8 |\n\t\t\tint64(buf[3])\n\t}\n\treturn\n}\n\n// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths.\n// The continuation lengths are parsed and removed from the stream and EOF is\n// returned at the end of the packet. See RFC 4880, section 4.2.2.4.\ntype partialLengthReader struct {\n\tr         io.Reader\n\tremaining int64\n\tisPartial bool\n}\n\nfunc (r *partialLengthReader) Read(p []byte) (n int, err error) {\n\tfor r.remaining == 0 {\n\t\tif !r.isPartial {\n\t\t\treturn 0, io.EOF\n\t\t}\n\t\tr.remaining, r.isPartial, err = readLength(r.r)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\ttoRead := int64(len(p))\n\tif toRead > r.remaining {\n\t\ttoRead = r.remaining\n\t}\n\n\tn, err = r.r.Read(p[:int(toRead)])\n\tr.remaining -= int64(n)\n\tif n < int(toRead) && err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn\n}\n\n// partialLengthWriter writes a stream of data using OpenPGP partial lengths.\n// See RFC 4880, section 4.2.2.4.\ntype partialLengthWriter struct {\n\tw          io.WriteCloser\n\tlengthByte [1]byte\n\tsentFirst  bool\n\tbuf        []byte\n}\n\n// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long.\nconst minFirstPartialWrite = 512\n\nfunc (w *partialLengthWriter) Write(p []byte) (n int, err error) {\n\toff := 0\n\tif !w.sentFirst {\n\t\tif len(w.buf) > 0 || len(p) < minFirstPartialWrite {\n\t\t\toff = len(w.buf)\n\t\t\tw.buf = append(w.buf, p...)\n\t\t\tif len(w.buf) < minFirstPartialWrite {\n\t\t\t\treturn len(p), nil\n\t\t\t}\n\t\t\tp = w.buf\n\t\t\tw.buf = nil\n\t\t}\n\t\tw.sentFirst = true\n\t}\n\n\tpower := uint8(30)\n\tfor len(p) > 0 {\n\t\tl := 1 << power\n\t\tif len(p) < l {\n\t\t\tpower = uint8(bits.Len32(uint32(len(p)))) - 1\n\t\t\tl = 1 << power\n\t\t}\n\t\tw.lengthByte[0] = 224 + power\n\t\t_, err = w.w.Write(w.lengthByte[:])\n\t\tif err == nil {\n\t\t\tvar m int\n\t\t\tm, err = w.w.Write(p[:l])\n\t\t\tn += m\n\t\t}\n\t\tif err != nil {\n\t\t\tif n < off {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\treturn n - off, err\n\t\t}\n\t\tp = p[l:]\n\t}\n\treturn n - off, nil\n}\n\nfunc (w *partialLengthWriter) Close() error {\n\tif len(w.buf) > 0 {\n\t\t// In this case we can't send a 512 byte packet.\n\t\t// Just send what we have.\n\t\tp := w.buf\n\t\tw.sentFirst = true\n\t\tw.buf = nil\n\t\tif _, err := w.Write(p); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tw.lengthByte[0] = 0\n\t_, err := w.w.Write(w.lengthByte[:])\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn w.w.Close()\n}\n\n// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the\n// underlying Reader returns EOF before the limit has been reached.\ntype spanReader struct {\n\tr io.Reader\n\tn int64\n}\n\nfunc (l *spanReader) Read(p []byte) (n int, err error) {\n\tif l.n <= 0 {\n\t\treturn 0, io.EOF\n\t}\n\tif int64(len(p)) > l.n {\n\t\tp = p[0:l.n]\n\t}\n\tn, err = l.r.Read(p)\n\tl.n -= int64(n)\n\tif l.n > 0 && err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\treturn\n}\n\n// readHeader parses a packet header and returns an io.Reader which will return\n// the contents of the packet. See RFC 4880, section 4.2.\nfunc readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) {\n\tvar buf [4]byte\n\t_, err = io.ReadFull(r, buf[:1])\n\tif err != nil {\n\t\treturn\n\t}\n\tif buf[0]&0x80 == 0 {\n\t\terr = errors.StructuralError(\"tag byte does not have MSB set\")\n\t\treturn\n\t}\n\tif buf[0]&0x40 == 0 {\n\t\t// Old format packet\n\t\ttag = packetType((buf[0] & 0x3f) >> 2)\n\t\tlengthType := buf[0] & 3\n\t\tif lengthType == 3 {\n\t\t\tlength = -1\n\t\t\tcontents = r\n\t\t\treturn\n\t\t}\n\t\tlengthBytes := 1 << lengthType\n\t\t_, err = readFull(r, buf[0:lengthBytes])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tfor i := 0; i < lengthBytes; i++ {\n\t\t\tlength <<= 8\n\t\t\tlength |= int64(buf[i])\n\t\t}\n\t\tcontents = &spanReader{r, length}\n\t\treturn\n\t}\n\n\t// New format packet\n\ttag = packetType(buf[0] & 0x3f)\n\tlength, isPartial, err := readLength(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tif isPartial {\n\t\tcontents = &partialLengthReader{\n\t\t\tremaining: length,\n\t\t\tisPartial: true,\n\t\t\tr:         r,\n\t\t}\n\t\tlength = -1\n\t} else {\n\t\tcontents = &spanReader{r, length}\n\t}\n\treturn\n}\n\n// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section\n// 4.2.\nfunc serializeHeader(w io.Writer, ptype packetType, length int) (err error) {\n\tvar buf [6]byte\n\tvar n int\n\n\tbuf[0] = 0x80 | 0x40 | byte(ptype)\n\tif length < 192 {\n\t\tbuf[1] = byte(length)\n\t\tn = 2\n\t} else if length < 8384 {\n\t\tlength -= 192\n\t\tbuf[1] = 192 + byte(length>>8)\n\t\tbuf[2] = byte(length)\n\t\tn = 3\n\t} else {\n\t\tbuf[1] = 255\n\t\tbuf[2] = byte(length >> 24)\n\t\tbuf[3] = byte(length >> 16)\n\t\tbuf[4] = byte(length >> 8)\n\t\tbuf[5] = byte(length)\n\t\tn = 6\n\t}\n\n\t_, err = w.Write(buf[:n])\n\treturn\n}\n\n// serializeStreamHeader writes an OpenPGP packet header to w where the\n// length of the packet is unknown. It returns a io.WriteCloser which can be\n// used to write the contents of the packet. See RFC 4880, section 4.2.\nfunc serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) {\n\tvar buf [1]byte\n\tbuf[0] = 0x80 | 0x40 | byte(ptype)\n\t_, err = w.Write(buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tout = &partialLengthWriter{w: w}\n\treturn\n}\n\n// Packet represents an OpenPGP packet. Users are expected to try casting\n// instances of this interface to specific packet types.\ntype Packet interface {\n\tparse(io.Reader) error\n}\n\n// consumeAll reads from the given Reader until error, returning the number of\n// bytes read.\nfunc consumeAll(r io.Reader) (n int64, err error) {\n\tvar m int\n\tvar buf [1024]byte\n\n\tfor {\n\t\tm, err = r.Read(buf[:])\n\t\tn += int64(m)\n\t\tif err == io.EOF {\n\t\t\terr = nil\n\t\t\treturn\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// packetType represents the numeric ids of the different OpenPGP packet types. See\n// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2\ntype packetType uint8\n\nconst (\n\tpacketTypeEncryptedKey              packetType = 1\n\tpacketTypeSignature                 packetType = 2\n\tpacketTypeSymmetricKeyEncrypted     packetType = 3\n\tpacketTypeOnePassSignature          packetType = 4\n\tpacketTypePrivateKey                packetType = 5\n\tpacketTypePublicKey                 packetType = 6\n\tpacketTypePrivateSubkey             packetType = 7\n\tpacketTypeCompressed                packetType = 8\n\tpacketTypeSymmetricallyEncrypted    packetType = 9\n\tpacketTypeLiteralData               packetType = 11\n\tpacketTypeUserId                    packetType = 13\n\tpacketTypePublicSubkey              packetType = 14\n\tpacketTypeUserAttribute             packetType = 17\n\tpacketTypeSymmetricallyEncryptedMDC packetType = 18\n)\n\n// peekVersion detects the version of a public key packet about to\n// be read. A bufio.Reader at the original position of the io.Reader\n// is returned.\nfunc peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) {\n\tbufr = bufio.NewReader(r)\n\tvar verBuf []byte\n\tif verBuf, err = bufr.Peek(1); err != nil {\n\t\treturn\n\t}\n\tver = verBuf[0]\n\treturn\n}\n\n// Read reads a single OpenPGP packet from the given io.Reader. If there is an\n// error parsing a packet, the whole packet is consumed from the input.\nfunc Read(r io.Reader) (p Packet, err error) {\n\ttag, _, contents, err := readHeader(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tswitch tag {\n\tcase packetTypeEncryptedKey:\n\t\tp = new(EncryptedKey)\n\tcase packetTypeSignature:\n\t\tvar version byte\n\t\t// Detect signature version\n\t\tif contents, version, err = peekVersion(contents); err != nil {\n\t\t\treturn\n\t\t}\n\t\tif version < 4 {\n\t\t\tp = new(SignatureV3)\n\t\t} else {\n\t\t\tp = new(Signature)\n\t\t}\n\tcase packetTypeSymmetricKeyEncrypted:\n\t\tp = new(SymmetricKeyEncrypted)\n\tcase packetTypeOnePassSignature:\n\t\tp = new(OnePassSignature)\n\tcase packetTypePrivateKey, packetTypePrivateSubkey:\n\t\tpk := new(PrivateKey)\n\t\tif tag == packetTypePrivateSubkey {\n\t\t\tpk.IsSubkey = true\n\t\t}\n\t\tp = pk\n\tcase packetTypePublicKey, packetTypePublicSubkey:\n\t\tvar version byte\n\t\tif contents, version, err = peekVersion(contents); err != nil {\n\t\t\treturn\n\t\t}\n\t\tisSubkey := tag == packetTypePublicSubkey\n\t\tif version < 4 {\n\t\t\tp = &PublicKeyV3{IsSubkey: isSubkey}\n\t\t} else {\n\t\t\tp = &PublicKey{IsSubkey: isSubkey}\n\t\t}\n\tcase packetTypeCompressed:\n\t\tp = new(Compressed)\n\tcase packetTypeSymmetricallyEncrypted:\n\t\tp = new(SymmetricallyEncrypted)\n\tcase packetTypeLiteralData:\n\t\tp = new(LiteralData)\n\tcase packetTypeUserId:\n\t\tp = new(UserId)\n\tcase packetTypeUserAttribute:\n\t\tp = new(UserAttribute)\n\tcase packetTypeSymmetricallyEncryptedMDC:\n\t\tse := new(SymmetricallyEncrypted)\n\t\tse.MDC = true\n\t\tp = se\n\tdefault:\n\t\terr = errors.UnknownPacketTypeError(tag)\n\t}\n\tif p != nil {\n\t\terr = p.parse(contents)\n\t}\n\tif err != nil {\n\t\tconsumeAll(contents)\n\t}\n\treturn\n}\n\n// SignatureType represents the different semantic meanings of an OpenPGP\n// signature. See RFC 4880, section 5.2.1.\ntype SignatureType uint8\n\nconst (\n\tSigTypeBinary            SignatureType = 0\n\tSigTypeText                            = 1\n\tSigTypeGenericCert                     = 0x10\n\tSigTypePersonaCert                     = 0x11\n\tSigTypeCasualCert                      = 0x12\n\tSigTypePositiveCert                    = 0x13\n\tSigTypeSubkeyBinding                   = 0x18\n\tSigTypePrimaryKeyBinding               = 0x19\n\tSigTypeDirectSignature                 = 0x1F\n\tSigTypeKeyRevocation                   = 0x20\n\tSigTypeSubkeyRevocation                = 0x28\n)\n\n// PublicKeyAlgorithm represents the different public key system specified for\n// OpenPGP. See\n// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12\ntype PublicKeyAlgorithm uint8\n\nconst (\n\tPubKeyAlgoRSA     PublicKeyAlgorithm = 1\n\tPubKeyAlgoElGamal PublicKeyAlgorithm = 16\n\tPubKeyAlgoDSA     PublicKeyAlgorithm = 17\n\t// RFC 6637, Section 5.\n\tPubKeyAlgoECDH  PublicKeyAlgorithm = 18\n\tPubKeyAlgoECDSA PublicKeyAlgorithm = 19\n\n\t// Deprecated in RFC 4880, Section 13.5. Use key flags instead.\n\tPubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2\n\tPubKeyAlgoRSASignOnly    PublicKeyAlgorithm = 3\n)\n\n// CanEncrypt returns true if it's possible to encrypt a message to a public\n// key of the given type.\nfunc (pka PublicKeyAlgorithm) CanEncrypt() bool {\n\tswitch pka {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// CanSign returns true if it's possible for a public key of the given type to\n// sign a message.\nfunc (pka PublicKeyAlgorithm) CanSign() bool {\n\tswitch pka {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// CipherFunction represents the different block ciphers specified for OpenPGP. See\n// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13\ntype CipherFunction uint8\n\nconst (\n\tCipher3DES   CipherFunction = 2\n\tCipherCAST5  CipherFunction = 3\n\tCipherAES128 CipherFunction = 7\n\tCipherAES192 CipherFunction = 8\n\tCipherAES256 CipherFunction = 9\n)\n\n// KeySize returns the key size, in bytes, of cipher.\nfunc (cipher CipherFunction) KeySize() int {\n\tswitch cipher {\n\tcase Cipher3DES:\n\t\treturn 24\n\tcase CipherCAST5:\n\t\treturn cast5.KeySize\n\tcase CipherAES128:\n\t\treturn 16\n\tcase CipherAES192:\n\t\treturn 24\n\tcase CipherAES256:\n\t\treturn 32\n\t}\n\treturn 0\n}\n\n// blockSize returns the block size, in bytes, of cipher.\nfunc (cipher CipherFunction) blockSize() int {\n\tswitch cipher {\n\tcase Cipher3DES:\n\t\treturn des.BlockSize\n\tcase CipherCAST5:\n\t\treturn 8\n\tcase CipherAES128, CipherAES192, CipherAES256:\n\t\treturn 16\n\t}\n\treturn 0\n}\n\n// new returns a fresh instance of the given cipher.\nfunc (cipher CipherFunction) new(key []byte) (block cipher.Block) {\n\tswitch cipher {\n\tcase Cipher3DES:\n\t\tblock, _ = des.NewTripleDESCipher(key)\n\tcase CipherCAST5:\n\t\tblock, _ = cast5.NewCipher(key)\n\tcase CipherAES128, CipherAES192, CipherAES256:\n\t\tblock, _ = aes.NewCipher(key)\n\t}\n\treturn\n}\n\n// readMPI reads a big integer from r. The bit length returned is the bit\n// length that was specified in r. This is preserved so that the integer can be\n// reserialized exactly.\nfunc readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) {\n\tvar buf [2]byte\n\t_, err = readFull(r, buf[0:])\n\tif err != nil {\n\t\treturn\n\t}\n\tbitLength = uint16(buf[0])<<8 | uint16(buf[1])\n\tnumBytes := (int(bitLength) + 7) / 8\n\tmpi = make([]byte, numBytes)\n\t_, err = readFull(r, mpi)\n\t// According to RFC 4880 3.2. we should check that the MPI has no leading\n\t// zeroes (at least when not an encrypted MPI?), but this implementation\n\t// does generate leading zeroes, so we keep accepting them.\n\treturn\n}\n\n// writeMPI serializes a big integer to w.\nfunc writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) {\n\t// Note that we can produce leading zeroes, in violation of RFC 4880 3.2.\n\t// Implementations seem to be tolerant of them, and stripping them would\n\t// make it complex to guarantee matching re-serialization.\n\t_, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)})\n\tif err == nil {\n\t\t_, err = w.Write(mpiBytes)\n\t}\n\treturn\n}\n\n// writeBig serializes a *big.Int to w.\nfunc writeBig(w io.Writer, i *big.Int) error {\n\treturn writeMPI(w, uint16(i.BitLen()), i.Bytes())\n}\n\n// padToKeySize left-pads a MPI with zeroes to match the length of the\n// specified RSA public.\nfunc padToKeySize(pub *rsa.PublicKey, b []byte) []byte {\n\tk := (pub.N.BitLen() + 7) / 8\n\tif len(b) >= k {\n\t\treturn b\n\t}\n\tbb := make([]byte, k)\n\tcopy(bb[len(bb)-len(b):], b)\n\treturn bb\n}\n\n// CompressionAlgo Represents the different compression algorithms\n// supported by OpenPGP (except for BZIP2, which is not currently\n// supported). See Section 9.3 of RFC 4880.\ntype CompressionAlgo uint8\n\nconst (\n\tCompressionNone CompressionAlgo = 0\n\tCompressionZIP  CompressionAlgo = 1\n\tCompressionZLIB CompressionAlgo = 2\n)\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/private_key.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/cipher\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\"\n\t\"io\"\n\t\"math/big\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/elgamal\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n)\n\n// PrivateKey represents a possibly encrypted private key. See RFC 4880,\n// section 5.5.3.\ntype PrivateKey struct {\n\tPublicKey\n\tEncrypted     bool // if true then the private key is unavailable until Decrypt has been called.\n\tencryptedData []byte\n\tcipher        CipherFunction\n\ts2k           func(out, in []byte)\n\tPrivateKey    interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or crypto.Signer/crypto.Decrypter (Decryptor RSA only).\n\tsha1Checksum  bool\n\tiv            []byte\n}\n\nfunc NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey {\n\tpk := new(PrivateKey)\n\tpk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey)\n\tpk.PrivateKey = priv\n\treturn pk\n}\n\nfunc NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey {\n\tpk := new(PrivateKey)\n\tpk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey)\n\tpk.PrivateKey = priv\n\treturn pk\n}\n\nfunc NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey {\n\tpk := new(PrivateKey)\n\tpk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey)\n\tpk.PrivateKey = priv\n\treturn pk\n}\n\nfunc NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey {\n\tpk := new(PrivateKey)\n\tpk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey)\n\tpk.PrivateKey = priv\n\treturn pk\n}\n\n// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that\n// implements RSA or ECDSA.\nfunc NewSignerPrivateKey(creationTime time.Time, signer crypto.Signer) *PrivateKey {\n\tpk := new(PrivateKey)\n\t// In general, the public Keys should be used as pointers. We still\n\t// type-switch on the values, for backwards-compatibility.\n\tswitch pubkey := signer.Public().(type) {\n\tcase *rsa.PublicKey:\n\t\tpk.PublicKey = *NewRSAPublicKey(creationTime, pubkey)\n\tcase rsa.PublicKey:\n\t\tpk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey)\n\tcase *ecdsa.PublicKey:\n\t\tpk.PublicKey = *NewECDSAPublicKey(creationTime, pubkey)\n\tcase ecdsa.PublicKey:\n\t\tpk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey)\n\tdefault:\n\t\tpanic(\"openpgp: unknown crypto.Signer type in NewSignerPrivateKey\")\n\t}\n\tpk.PrivateKey = signer\n\treturn pk\n}\n\nfunc (pk *PrivateKey) parse(r io.Reader) (err error) {\n\terr = (&pk.PublicKey).parse(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar buf [1]byte\n\t_, err = readFull(r, buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\n\ts2kType := buf[0]\n\n\tswitch s2kType {\n\tcase 0:\n\t\tpk.s2k = nil\n\t\tpk.Encrypted = false\n\tcase 254, 255:\n\t\t_, err = readFull(r, buf[:])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tpk.cipher = CipherFunction(buf[0])\n\t\tpk.Encrypted = true\n\t\tpk.s2k, err = s2k.Parse(r)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tif s2kType == 254 {\n\t\t\tpk.sha1Checksum = true\n\t\t}\n\tdefault:\n\t\treturn errors.UnsupportedError(\"deprecated s2k function in private key\")\n\t}\n\n\tif pk.Encrypted {\n\t\tblockSize := pk.cipher.blockSize()\n\t\tif blockSize == 0 {\n\t\t\treturn errors.UnsupportedError(\"unsupported cipher in private key: \" + strconv.Itoa(int(pk.cipher)))\n\t\t}\n\t\tpk.iv = make([]byte, blockSize)\n\t\t_, err = readFull(r, pk.iv)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tpk.encryptedData, err = io.ReadAll(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif !pk.Encrypted {\n\t\treturn pk.parsePrivateKey(pk.encryptedData)\n\t}\n\n\treturn\n}\n\nfunc mod64kHash(d []byte) uint16 {\n\tvar h uint16\n\tfor _, b := range d {\n\t\th += uint16(b)\n\t}\n\treturn h\n}\n\nfunc (pk *PrivateKey) Serialize(w io.Writer) (err error) {\n\t// TODO(agl): support encrypted private keys\n\tbuf := bytes.NewBuffer(nil)\n\terr = pk.PublicKey.serializeWithoutHeaders(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\tbuf.WriteByte(0 /* no encryption */)\n\n\tprivateKeyBuf := bytes.NewBuffer(nil)\n\n\tswitch priv := pk.PrivateKey.(type) {\n\tcase *rsa.PrivateKey:\n\t\terr = serializeRSAPrivateKey(privateKeyBuf, priv)\n\tcase *dsa.PrivateKey:\n\t\terr = serializeDSAPrivateKey(privateKeyBuf, priv)\n\tcase *elgamal.PrivateKey:\n\t\terr = serializeElGamalPrivateKey(privateKeyBuf, priv)\n\tcase *ecdsa.PrivateKey:\n\t\terr = serializeECDSAPrivateKey(privateKeyBuf, priv)\n\tdefault:\n\t\terr = errors.InvalidArgumentError(\"unknown private key type\")\n\t}\n\tif err != nil {\n\t\treturn\n\t}\n\n\tptype := packetTypePrivateKey\n\tcontents := buf.Bytes()\n\tprivateKeyBytes := privateKeyBuf.Bytes()\n\tif pk.IsSubkey {\n\t\tptype = packetTypePrivateSubkey\n\t}\n\terr = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = w.Write(contents)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = w.Write(privateKeyBytes)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tchecksum := mod64kHash(privateKeyBytes)\n\tvar checksumBytes [2]byte\n\tchecksumBytes[0] = byte(checksum >> 8)\n\tchecksumBytes[1] = byte(checksum)\n\t_, err = w.Write(checksumBytes[:])\n\n\treturn\n}\n\nfunc serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error {\n\terr := writeBig(w, priv.D)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = writeBig(w, priv.Primes[1])\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = writeBig(w, priv.Primes[0])\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn writeBig(w, priv.Precomputed.Qinv)\n}\n\nfunc serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error {\n\treturn writeBig(w, priv.X)\n}\n\nfunc serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error {\n\treturn writeBig(w, priv.X)\n}\n\nfunc serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error {\n\treturn writeBig(w, priv.D)\n}\n\n// Decrypt decrypts an encrypted private key using a passphrase.\nfunc (pk *PrivateKey) Decrypt(passphrase []byte) error {\n\tif !pk.Encrypted {\n\t\treturn nil\n\t}\n\n\tkey := make([]byte, pk.cipher.KeySize())\n\tpk.s2k(key, passphrase)\n\tblock := pk.cipher.new(key)\n\tcfb := cipher.NewCFBDecrypter(block, pk.iv)\n\n\tdata := make([]byte, len(pk.encryptedData))\n\tcfb.XORKeyStream(data, pk.encryptedData)\n\n\tif pk.sha1Checksum {\n\t\tif len(data) < sha1.Size {\n\t\t\treturn errors.StructuralError(\"truncated private key data\")\n\t\t}\n\t\th := sha1.New()\n\t\th.Write(data[:len(data)-sha1.Size])\n\t\tsum := h.Sum(nil)\n\t\tif !bytes.Equal(sum, data[len(data)-sha1.Size:]) {\n\t\t\treturn errors.StructuralError(\"private key checksum failure\")\n\t\t}\n\t\tdata = data[:len(data)-sha1.Size]\n\t} else {\n\t\tif len(data) < 2 {\n\t\t\treturn errors.StructuralError(\"truncated private key data\")\n\t\t}\n\t\tvar sum uint16\n\t\tfor i := 0; i < len(data)-2; i++ {\n\t\t\tsum += uint16(data[i])\n\t\t}\n\t\tif data[len(data)-2] != uint8(sum>>8) ||\n\t\t\tdata[len(data)-1] != uint8(sum) {\n\t\t\treturn errors.StructuralError(\"private key checksum failure\")\n\t\t}\n\t\tdata = data[:len(data)-2]\n\t}\n\n\treturn pk.parsePrivateKey(data)\n}\n\nfunc (pk *PrivateKey) parsePrivateKey(data []byte) (err error) {\n\tswitch pk.PublicKey.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly:\n\t\treturn pk.parseRSAPrivateKey(data)\n\tcase PubKeyAlgoDSA:\n\t\treturn pk.parseDSAPrivateKey(data)\n\tcase PubKeyAlgoElGamal:\n\t\treturn pk.parseElGamalPrivateKey(data)\n\tcase PubKeyAlgoECDSA:\n\t\treturn pk.parseECDSAPrivateKey(data)\n\t}\n\tpanic(\"impossible\")\n}\n\nfunc (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) {\n\trsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey)\n\trsaPriv := new(rsa.PrivateKey)\n\trsaPriv.PublicKey = *rsaPub\n\n\tbuf := bytes.NewBuffer(data)\n\td, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\tp, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\tq, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\n\trsaPriv.D = new(big.Int).SetBytes(d)\n\trsaPriv.Primes = make([]*big.Int, 2)\n\trsaPriv.Primes[0] = new(big.Int).SetBytes(p)\n\trsaPriv.Primes[1] = new(big.Int).SetBytes(q)\n\tif err := rsaPriv.Validate(); err != nil {\n\t\treturn err\n\t}\n\trsaPriv.Precompute()\n\tpk.PrivateKey = rsaPriv\n\tpk.Encrypted = false\n\tpk.encryptedData = nil\n\n\treturn nil\n}\n\nfunc (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) {\n\tdsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey)\n\tdsaPriv := new(dsa.PrivateKey)\n\tdsaPriv.PublicKey = *dsaPub\n\n\tbuf := bytes.NewBuffer(data)\n\tx, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tdsaPriv.X = new(big.Int).SetBytes(x)\n\tpk.PrivateKey = dsaPriv\n\tpk.Encrypted = false\n\tpk.encryptedData = nil\n\n\treturn nil\n}\n\nfunc (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) {\n\tpub := pk.PublicKey.PublicKey.(*elgamal.PublicKey)\n\tpriv := new(elgamal.PrivateKey)\n\tpriv.PublicKey = *pub\n\n\tbuf := bytes.NewBuffer(data)\n\tx, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpriv.X = new(big.Int).SetBytes(x)\n\tpk.PrivateKey = priv\n\tpk.Encrypted = false\n\tpk.encryptedData = nil\n\n\treturn nil\n}\n\nfunc (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) {\n\tecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey)\n\n\tbuf := bytes.NewBuffer(data)\n\td, _, err := readMPI(buf)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpk.PrivateKey = &ecdsa.PrivateKey{\n\t\tPublicKey: *ecdsaPub,\n\t\tD:         new(big.Int).SetBytes(d),\n\t}\n\tpk.Encrypted = false\n\tpk.encryptedData = nil\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/public_key.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"crypto/elliptic\"\n\t\"crypto/rsa\"\n\t\"crypto/sha1\"\n\t_ \"crypto/sha256\"\n\t_ \"crypto/sha512\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"math/big\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/elgamal\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\nvar (\n\t// NIST curve P-256\n\toidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07}\n\t// NIST curve P-384\n\toidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22}\n\t// NIST curve P-521\n\toidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23}\n)\n\nconst maxOIDLength = 8\n\n// ecdsaKey stores the algorithm-specific fields for ECDSA keys.\n// as defined in RFC 6637, Section 9.\ntype ecdsaKey struct {\n\t// oid contains the OID byte sequence identifying the elliptic curve used\n\toid []byte\n\t// p contains the elliptic curve point that represents the public key\n\tp parsedMPI\n}\n\n// parseOID reads the OID for the curve as defined in RFC 6637, Section 9.\nfunc parseOID(r io.Reader) (oid []byte, err error) {\n\tbuf := make([]byte, maxOIDLength)\n\tif _, err = readFull(r, buf[:1]); err != nil {\n\t\treturn\n\t}\n\toidLen := buf[0]\n\tif int(oidLen) > len(buf) {\n\t\terr = errors.UnsupportedError(\"invalid oid length: \" + strconv.Itoa(int(oidLen)))\n\t\treturn\n\t}\n\toid = buf[:oidLen]\n\t_, err = readFull(r, oid)\n\treturn\n}\n\nfunc (f *ecdsaKey) parse(r io.Reader) (err error) {\n\tif f.oid, err = parseOID(r); err != nil {\n\t\treturn err\n\t}\n\tf.p.bytes, f.p.bitLength, err = readMPI(r)\n\treturn\n}\n\nfunc (f *ecdsaKey) serialize(w io.Writer) (err error) {\n\tbuf := make([]byte, maxOIDLength+1)\n\tbuf[0] = byte(len(f.oid))\n\tcopy(buf[1:], f.oid)\n\tif _, err = w.Write(buf[:len(f.oid)+1]); err != nil {\n\t\treturn\n\t}\n\treturn writeMPIs(w, f.p)\n}\n\nfunc (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) {\n\tvar c elliptic.Curve\n\tif bytes.Equal(f.oid, oidCurveP256) {\n\t\tc = elliptic.P256()\n\t} else if bytes.Equal(f.oid, oidCurveP384) {\n\t\tc = elliptic.P384()\n\t} else if bytes.Equal(f.oid, oidCurveP521) {\n\t\tc = elliptic.P521()\n\t} else {\n\t\treturn nil, errors.UnsupportedError(fmt.Sprintf(\"unsupported oid: %x\", f.oid))\n\t}\n\tx, y := elliptic.Unmarshal(c, f.p.bytes)\n\tif x == nil {\n\t\treturn nil, errors.UnsupportedError(\"failed to parse EC point\")\n\t}\n\treturn &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil\n}\n\nfunc (f *ecdsaKey) byteLen() int {\n\treturn 1 + len(f.oid) + 2 + len(f.p.bytes)\n}\n\ntype kdfHashFunction byte\ntype kdfAlgorithm byte\n\n// ecdhKdf stores key derivation function parameters\n// used for ECDH encryption. See RFC 6637, Section 9.\ntype ecdhKdf struct {\n\tKdfHash kdfHashFunction\n\tKdfAlgo kdfAlgorithm\n}\n\nfunc (f *ecdhKdf) parse(r io.Reader) (err error) {\n\tbuf := make([]byte, 1)\n\tif _, err = readFull(r, buf); err != nil {\n\t\treturn\n\t}\n\tkdfLen := int(buf[0])\n\tif kdfLen < 3 {\n\t\treturn errors.UnsupportedError(\"Unsupported ECDH KDF length: \" + strconv.Itoa(kdfLen))\n\t}\n\tbuf = make([]byte, kdfLen)\n\tif _, err = readFull(r, buf); err != nil {\n\t\treturn\n\t}\n\treserved := int(buf[0])\n\tf.KdfHash = kdfHashFunction(buf[1])\n\tf.KdfAlgo = kdfAlgorithm(buf[2])\n\tif reserved != 0x01 {\n\t\treturn errors.UnsupportedError(\"Unsupported KDF reserved field: \" + strconv.Itoa(reserved))\n\t}\n\treturn\n}\n\nfunc (f *ecdhKdf) serialize(w io.Writer) (err error) {\n\tbuf := make([]byte, 4)\n\t// See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys.\n\tbuf[0] = byte(0x03) // Length of the following fields\n\tbuf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now\n\tbuf[2] = byte(f.KdfHash)\n\tbuf[3] = byte(f.KdfAlgo)\n\t_, err = w.Write(buf[:])\n\treturn\n}\n\nfunc (f *ecdhKdf) byteLen() int {\n\treturn 4\n}\n\n// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2.\ntype PublicKey struct {\n\tCreationTime time.Time\n\tPubKeyAlgo   PublicKeyAlgorithm\n\tPublicKey    interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey\n\tFingerprint  [20]byte\n\tKeyId        uint64\n\tIsSubkey     bool\n\n\tn, e, p, q, g, y parsedMPI\n\n\t// RFC 6637 fields\n\tec   *ecdsaKey\n\tecdh *ecdhKdf\n}\n\n// signingKey provides a convenient abstraction over signature verification\n// for v3 and v4 public keys.\ntype signingKey interface {\n\tSerializeSignaturePrefix(io.Writer)\n\tserializeWithoutHeaders(io.Writer) error\n}\n\nfunc fromBig(n *big.Int) parsedMPI {\n\treturn parsedMPI{\n\t\tbytes:     n.Bytes(),\n\t\tbitLength: uint16(n.BitLen()),\n\t}\n}\n\n// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey.\nfunc NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey {\n\tpk := &PublicKey{\n\t\tCreationTime: creationTime,\n\t\tPubKeyAlgo:   PubKeyAlgoRSA,\n\t\tPublicKey:    pub,\n\t\tn:            fromBig(pub.N),\n\t\te:            fromBig(big.NewInt(int64(pub.E))),\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn pk\n}\n\n// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey.\nfunc NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey {\n\tpk := &PublicKey{\n\t\tCreationTime: creationTime,\n\t\tPubKeyAlgo:   PubKeyAlgoDSA,\n\t\tPublicKey:    pub,\n\t\tp:            fromBig(pub.P),\n\t\tq:            fromBig(pub.Q),\n\t\tg:            fromBig(pub.G),\n\t\ty:            fromBig(pub.Y),\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn pk\n}\n\n// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey.\nfunc NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey {\n\tpk := &PublicKey{\n\t\tCreationTime: creationTime,\n\t\tPubKeyAlgo:   PubKeyAlgoElGamal,\n\t\tPublicKey:    pub,\n\t\tp:            fromBig(pub.P),\n\t\tg:            fromBig(pub.G),\n\t\ty:            fromBig(pub.Y),\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn pk\n}\n\nfunc NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey {\n\tpk := &PublicKey{\n\t\tCreationTime: creationTime,\n\t\tPubKeyAlgo:   PubKeyAlgoECDSA,\n\t\tPublicKey:    pub,\n\t\tec:           new(ecdsaKey),\n\t}\n\n\tswitch pub.Curve {\n\tcase elliptic.P256():\n\t\tpk.ec.oid = oidCurveP256\n\tcase elliptic.P384():\n\t\tpk.ec.oid = oidCurveP384\n\tcase elliptic.P521():\n\t\tpk.ec.oid = oidCurveP521\n\tdefault:\n\t\tpanic(\"unknown elliptic curve\")\n\t}\n\n\tpk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y)\n\n\t// The bit length is 3 (for the 0x04 specifying an uncompressed key)\n\t// plus two field elements (for x and y), which are rounded up to the\n\t// nearest byte. See https://tools.ietf.org/html/rfc6637#section-6\n\tfieldBytes := (pub.Curve.Params().BitSize + 7) & ^7\n\tpk.ec.p.bitLength = uint16(3 + fieldBytes + fieldBytes)\n\n\tpk.setFingerPrintAndKeyId()\n\treturn pk\n}\n\nfunc (pk *PublicKey) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.5.2\n\tvar buf [6]byte\n\t_, err = readFull(r, buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tif buf[0] != 4 {\n\t\treturn errors.UnsupportedError(\"public key version\")\n\t}\n\tpk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)\n\tpk.PubKeyAlgo = PublicKeyAlgorithm(buf[5])\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\terr = pk.parseRSA(r)\n\tcase PubKeyAlgoDSA:\n\t\terr = pk.parseDSA(r)\n\tcase PubKeyAlgoElGamal:\n\t\terr = pk.parseElGamal(r)\n\tcase PubKeyAlgoECDSA:\n\t\tpk.ec = new(ecdsaKey)\n\t\tif err = pk.ec.parse(r); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpk.PublicKey, err = pk.ec.newECDSA()\n\tcase PubKeyAlgoECDH:\n\t\tpk.ec = new(ecdsaKey)\n\t\tif err = pk.ec.parse(r); err != nil {\n\t\t\treturn\n\t\t}\n\t\tpk.ecdh = new(ecdhKdf)\n\t\tif err = pk.ecdh.parse(r); err != nil {\n\t\t\treturn\n\t\t}\n\t\t// The ECDH key is stored in an ecdsa.PublicKey for convenience.\n\t\tpk.PublicKey, err = pk.ec.newECDSA()\n\tdefault:\n\t\terr = errors.UnsupportedError(\"public key type: \" + strconv.Itoa(int(pk.PubKeyAlgo)))\n\t}\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn\n}\n\nfunc (pk *PublicKey) setFingerPrintAndKeyId() {\n\t// RFC 4880, section 12.2\n\tfingerPrint := sha1.New()\n\tpk.SerializeSignaturePrefix(fingerPrint)\n\tpk.serializeWithoutHeaders(fingerPrint)\n\tcopy(pk.Fingerprint[:], fingerPrint.Sum(nil))\n\tpk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20])\n}\n\n// parseRSA parses RSA public key material from the given Reader. See RFC 4880,\n// section 5.5.2.\nfunc (pk *PublicKey) parseRSA(r io.Reader) (err error) {\n\tpk.n.bytes, pk.n.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.e.bytes, pk.e.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif len(pk.e.bytes) > 3 {\n\t\terr = errors.UnsupportedError(\"large public exponent\")\n\t\treturn\n\t}\n\trsa := &rsa.PublicKey{\n\t\tN: new(big.Int).SetBytes(pk.n.bytes),\n\t\tE: 0,\n\t}\n\tfor i := 0; i < len(pk.e.bytes); i++ {\n\t\trsa.E <<= 8\n\t\trsa.E |= int(pk.e.bytes[i])\n\t}\n\tpk.PublicKey = rsa\n\treturn\n}\n\n// parseDSA parses DSA public key material from the given Reader. See RFC 4880,\n// section 5.5.2.\nfunc (pk *PublicKey) parseDSA(r io.Reader) (err error) {\n\tpk.p.bytes, pk.p.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.q.bytes, pk.q.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.g.bytes, pk.g.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.y.bytes, pk.y.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tdsa := new(dsa.PublicKey)\n\tdsa.P = new(big.Int).SetBytes(pk.p.bytes)\n\tdsa.Q = new(big.Int).SetBytes(pk.q.bytes)\n\tdsa.G = new(big.Int).SetBytes(pk.g.bytes)\n\tdsa.Y = new(big.Int).SetBytes(pk.y.bytes)\n\tpk.PublicKey = dsa\n\treturn\n}\n\n// parseElGamal parses ElGamal public key material from the given Reader. See\n// RFC 4880, section 5.5.2.\nfunc (pk *PublicKey) parseElGamal(r io.Reader) (err error) {\n\tpk.p.bytes, pk.p.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.g.bytes, pk.g.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tpk.y.bytes, pk.y.bitLength, err = readMPI(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\telgamal := new(elgamal.PublicKey)\n\telgamal.P = new(big.Int).SetBytes(pk.p.bytes)\n\telgamal.G = new(big.Int).SetBytes(pk.g.bytes)\n\telgamal.Y = new(big.Int).SetBytes(pk.y.bytes)\n\tpk.PublicKey = elgamal\n\treturn\n}\n\n// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.\n// The prefix is used when calculating a signature over this public key. See\n// RFC 4880, section 5.2.4.\nfunc (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) {\n\tvar pLength uint16\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tpLength += 2 + uint16(len(pk.n.bytes))\n\t\tpLength += 2 + uint16(len(pk.e.bytes))\n\tcase PubKeyAlgoDSA:\n\t\tpLength += 2 + uint16(len(pk.p.bytes))\n\t\tpLength += 2 + uint16(len(pk.q.bytes))\n\t\tpLength += 2 + uint16(len(pk.g.bytes))\n\t\tpLength += 2 + uint16(len(pk.y.bytes))\n\tcase PubKeyAlgoElGamal:\n\t\tpLength += 2 + uint16(len(pk.p.bytes))\n\t\tpLength += 2 + uint16(len(pk.g.bytes))\n\t\tpLength += 2 + uint16(len(pk.y.bytes))\n\tcase PubKeyAlgoECDSA:\n\t\tpLength += uint16(pk.ec.byteLen())\n\tcase PubKeyAlgoECDH:\n\t\tpLength += uint16(pk.ec.byteLen())\n\t\tpLength += uint16(pk.ecdh.byteLen())\n\tdefault:\n\t\tpanic(\"unknown public key algorithm\")\n\t}\n\tpLength += 6\n\th.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)})\n\treturn\n}\n\nfunc (pk *PublicKey) Serialize(w io.Writer) (err error) {\n\tlength := 6 // 6 byte header\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tlength += 2 + len(pk.n.bytes)\n\t\tlength += 2 + len(pk.e.bytes)\n\tcase PubKeyAlgoDSA:\n\t\tlength += 2 + len(pk.p.bytes)\n\t\tlength += 2 + len(pk.q.bytes)\n\t\tlength += 2 + len(pk.g.bytes)\n\t\tlength += 2 + len(pk.y.bytes)\n\tcase PubKeyAlgoElGamal:\n\t\tlength += 2 + len(pk.p.bytes)\n\t\tlength += 2 + len(pk.g.bytes)\n\t\tlength += 2 + len(pk.y.bytes)\n\tcase PubKeyAlgoECDSA:\n\t\tlength += pk.ec.byteLen()\n\tcase PubKeyAlgoECDH:\n\t\tlength += pk.ec.byteLen()\n\t\tlength += pk.ecdh.byteLen()\n\tdefault:\n\t\tpanic(\"unknown public key algorithm\")\n\t}\n\n\tpacketType := packetTypePublicKey\n\tif pk.IsSubkey {\n\t\tpacketType = packetTypePublicSubkey\n\t}\n\terr = serializeHeader(w, packetType, length)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn pk.serializeWithoutHeaders(w)\n}\n\n// serializeWithoutHeaders marshals the PublicKey to w in the form of an\n// OpenPGP public key packet, not including the packet header.\nfunc (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) {\n\tvar buf [6]byte\n\tbuf[0] = 4\n\tt := uint32(pk.CreationTime.Unix())\n\tbuf[1] = byte(t >> 24)\n\tbuf[2] = byte(t >> 16)\n\tbuf[3] = byte(t >> 8)\n\tbuf[4] = byte(t)\n\tbuf[5] = byte(pk.PubKeyAlgo)\n\n\t_, err = w.Write(buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\treturn writeMPIs(w, pk.n, pk.e)\n\tcase PubKeyAlgoDSA:\n\t\treturn writeMPIs(w, pk.p, pk.q, pk.g, pk.y)\n\tcase PubKeyAlgoElGamal:\n\t\treturn writeMPIs(w, pk.p, pk.g, pk.y)\n\tcase PubKeyAlgoECDSA:\n\t\treturn pk.ec.serialize(w)\n\tcase PubKeyAlgoECDH:\n\t\tif err = pk.ec.serialize(w); err != nil {\n\t\t\treturn\n\t\t}\n\t\treturn pk.ecdh.serialize(w)\n\t}\n\treturn errors.InvalidArgumentError(\"bad public-key algorithm\")\n}\n\n// CanSign returns true iff this public key can generate signatures\nfunc (pk *PublicKey) CanSign() bool {\n\treturn pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal\n}\n\n// VerifySignature returns nil iff sig is a valid signature, made by this\n// public key, of the data hashed into signed. signed is mutated by this call.\nfunc (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {\n\tif !pk.CanSign() {\n\t\treturn errors.InvalidArgumentError(\"public key cannot generate signatures\")\n\t}\n\n\tsigned.Write(sig.HashSuffix)\n\thashBytes := signed.Sum(nil)\n\n\tif hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {\n\t\treturn errors.SignatureError(\"hash tag doesn't match\")\n\t}\n\n\tif pk.PubKeyAlgo != sig.PubKeyAlgo {\n\t\treturn errors.InvalidArgumentError(\"public key and signature use different algorithms\")\n\t}\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\trsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey)\n\t\terr = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes))\n\t\tif err != nil {\n\t\t\treturn errors.SignatureError(\"RSA verification failure\")\n\t\t}\n\t\treturn nil\n\tcase PubKeyAlgoDSA:\n\t\tdsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey)\n\t\t// Need to truncate hashBytes to match FIPS 186-3 section 4.6.\n\t\tsubgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8\n\t\tif len(hashBytes) > subgroupSize {\n\t\t\thashBytes = hashBytes[:subgroupSize]\n\t\t}\n\t\tif !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) {\n\t\t\treturn errors.SignatureError(\"DSA verification failure\")\n\t\t}\n\t\treturn nil\n\tcase PubKeyAlgoECDSA:\n\t\tecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey)\n\t\tif !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) {\n\t\t\treturn errors.SignatureError(\"ECDSA verification failure\")\n\t\t}\n\t\treturn nil\n\tdefault:\n\t\treturn errors.SignatureError(\"Unsupported public key algorithm used in signature\")\n\t}\n}\n\n// VerifySignatureV3 returns nil iff sig is a valid signature, made by this\n// public key, of the data hashed into signed. signed is mutated by this call.\nfunc (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) {\n\tif !pk.CanSign() {\n\t\treturn errors.InvalidArgumentError(\"public key cannot generate signatures\")\n\t}\n\n\tsuffix := make([]byte, 5)\n\tsuffix[0] = byte(sig.SigType)\n\tbinary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))\n\tsigned.Write(suffix)\n\thashBytes := signed.Sum(nil)\n\n\tif hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {\n\t\treturn errors.SignatureError(\"hash tag doesn't match\")\n\t}\n\n\tif pk.PubKeyAlgo != sig.PubKeyAlgo {\n\t\treturn errors.InvalidArgumentError(\"public key and signature use different algorithms\")\n\t}\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\trsaPublicKey := pk.PublicKey.(*rsa.PublicKey)\n\t\tif err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)); err != nil {\n\t\t\treturn errors.SignatureError(\"RSA verification failure\")\n\t\t}\n\t\treturn\n\tcase PubKeyAlgoDSA:\n\t\tdsaPublicKey := pk.PublicKey.(*dsa.PublicKey)\n\t\t// Need to truncate hashBytes to match FIPS 186-3 section 4.6.\n\t\tsubgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8\n\t\tif len(hashBytes) > subgroupSize {\n\t\t\thashBytes = hashBytes[:subgroupSize]\n\t\t}\n\t\tif !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) {\n\t\t\treturn errors.SignatureError(\"DSA verification failure\")\n\t\t}\n\t\treturn nil\n\tdefault:\n\t\tpanic(\"shouldn't happen\")\n\t}\n}\n\n// keySignatureHash returns a Hash of the message that needs to be signed for\n// pk to assert a subkey relationship to signed.\nfunc keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) {\n\tif !hashFunc.Available() {\n\t\treturn nil, errors.UnsupportedError(\"hash function\")\n\t}\n\th = hashFunc.New()\n\n\t// RFC 4880, section 5.2.4\n\tpk.SerializeSignaturePrefix(h)\n\tpk.serializeWithoutHeaders(h)\n\tsigned.SerializeSignaturePrefix(h)\n\tsigned.serializeWithoutHeaders(h)\n\treturn\n}\n\n// VerifyKeySignature returns nil iff sig is a valid signature, made by this\n// public key, of signed.\nfunc (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error {\n\th, err := keySignatureHash(pk, signed, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err = pk.VerifySignature(h, sig); err != nil {\n\t\treturn err\n\t}\n\n\tif sig.FlagSign {\n\t\t// Signing subkeys must be cross-signed. See\n\t\t// https://www.gnupg.org/faq/subkey-cross-certify.html.\n\t\tif sig.EmbeddedSignature == nil {\n\t\t\treturn errors.StructuralError(\"signing subkey is missing cross-signature\")\n\t\t}\n\t\t// Verify the cross-signature. This is calculated over the same\n\t\t// data as the main signature, so we cannot just recursively\n\t\t// call signed.VerifyKeySignature(...)\n\t\tif h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil {\n\t\t\treturn errors.StructuralError(\"error while hashing for cross-signature: \" + err.Error())\n\t\t}\n\t\tif err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil {\n\t\t\treturn errors.StructuralError(\"error while verifying cross-signature: \" + err.Error())\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) {\n\tif !hashFunc.Available() {\n\t\treturn nil, errors.UnsupportedError(\"hash function\")\n\t}\n\th = hashFunc.New()\n\n\t// RFC 4880, section 5.2.4\n\tpk.SerializeSignaturePrefix(h)\n\tpk.serializeWithoutHeaders(h)\n\n\treturn\n}\n\n// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this\n// public key.\nfunc (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {\n\th, err := keyRevocationHash(pk, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn pk.VerifySignature(h, sig)\n}\n\n// userIdSignatureHash returns a Hash of the message that needs to be signed\n// to assert that pk is a valid key for id.\nfunc userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) {\n\tif !hashFunc.Available() {\n\t\treturn nil, errors.UnsupportedError(\"hash function\")\n\t}\n\th = hashFunc.New()\n\n\t// RFC 4880, section 5.2.4\n\tpk.SerializeSignaturePrefix(h)\n\tpk.serializeWithoutHeaders(h)\n\n\tvar buf [5]byte\n\tbuf[0] = 0xb4\n\tbuf[1] = byte(len(id) >> 24)\n\tbuf[2] = byte(len(id) >> 16)\n\tbuf[3] = byte(len(id) >> 8)\n\tbuf[4] = byte(len(id))\n\th.Write(buf[:])\n\th.Write([]byte(id))\n\n\treturn\n}\n\n// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this\n// public key, that id is the identity of pub.\nfunc (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) {\n\th, err := userIdSignatureHash(id, pub, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn pk.VerifySignature(h, sig)\n}\n\n// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this\n// public key, that id is the identity of pub.\nfunc (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) {\n\th, err := userIdSignatureV3Hash(id, pub, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn pk.VerifySignatureV3(h, sig)\n}\n\n// KeyIdString returns the public key's fingerprint in capital hex\n// (e.g. \"6C7EE1B8621CC013\").\nfunc (pk *PublicKey) KeyIdString() string {\n\treturn fmt.Sprintf(\"%X\", pk.Fingerprint[12:20])\n}\n\n// KeyIdShortString returns the short form of public key's fingerprint\n// in capital hex, as shown by gpg --list-keys (e.g. \"621CC013\").\nfunc (pk *PublicKey) KeyIdShortString() string {\n\treturn fmt.Sprintf(\"%X\", pk.Fingerprint[16:20])\n}\n\n// A parsedMPI is used to store the contents of a big integer, along with the\n// bit length that was specified in the original input. This allows the MPI to\n// be reserialized exactly.\ntype parsedMPI struct {\n\tbytes     []byte\n\tbitLength uint16\n}\n\n// writeMPIs is a utility function for serializing several big integers to the\n// given Writer.\nfunc writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) {\n\tfor _, mpi := range mpis {\n\t\terr = writeMPI(w, mpi.bitLength, mpi.bytes)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\n// BitLength returns the bit length for the given public key.\nfunc (pk *PublicKey) BitLength() (bitLength uint16, err error) {\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tbitLength = pk.n.bitLength\n\tcase PubKeyAlgoDSA:\n\t\tbitLength = pk.p.bitLength\n\tcase PubKeyAlgoElGamal:\n\t\tbitLength = pk.p.bitLength\n\tdefault:\n\t\terr = errors.InvalidArgumentError(\"bad public-key algorithm\")\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto\"\n\t\"crypto/md5\"\n\t\"crypto/rsa\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"hash\"\n\t\"io\"\n\t\"math/big\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\n// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and\n// should not be used for signing or encrypting. They are supported here only for\n// parsing version 3 key material and validating signatures.\n// See RFC 4880, section 5.5.2.\ntype PublicKeyV3 struct {\n\tCreationTime time.Time\n\tDaysToExpire uint16\n\tPubKeyAlgo   PublicKeyAlgorithm\n\tPublicKey    *rsa.PublicKey\n\tFingerprint  [16]byte\n\tKeyId        uint64\n\tIsSubkey     bool\n\n\tn, e parsedMPI\n}\n\n// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey.\n// Included here for testing purposes only. RFC 4880, section 5.5.2:\n// \"an implementation MUST NOT generate a V3 key, but MAY accept it.\"\nfunc newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 {\n\tpk := &PublicKeyV3{\n\t\tCreationTime: creationTime,\n\t\tPublicKey:    pub,\n\t\tn:            fromBig(pub.N),\n\t\te:            fromBig(big.NewInt(int64(pub.E))),\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn pk\n}\n\nfunc (pk *PublicKeyV3) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.5.2\n\tvar buf [8]byte\n\tif _, err = readFull(r, buf[:]); err != nil {\n\t\treturn\n\t}\n\tif buf[0] < 2 || buf[0] > 3 {\n\t\treturn errors.UnsupportedError(\"public key version\")\n\t}\n\tpk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)\n\tpk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7])\n\tpk.PubKeyAlgo = PublicKeyAlgorithm(buf[7])\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\terr = pk.parseRSA(r)\n\tdefault:\n\t\terr = errors.UnsupportedError(\"public key type: \" + strconv.Itoa(int(pk.PubKeyAlgo)))\n\t}\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpk.setFingerPrintAndKeyId()\n\treturn\n}\n\nfunc (pk *PublicKeyV3) setFingerPrintAndKeyId() {\n\t// RFC 4880, section 12.2\n\tfingerPrint := md5.New()\n\tfingerPrint.Write(pk.n.bytes)\n\tfingerPrint.Write(pk.e.bytes)\n\tfingerPrint.Sum(pk.Fingerprint[:0])\n\tpk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:])\n}\n\n// parseRSA parses RSA public key material from the given Reader. See RFC 4880,\n// section 5.5.2.\nfunc (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) {\n\tif pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil {\n\t\treturn\n\t}\n\tif pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil {\n\t\treturn\n\t}\n\n\t// RFC 4880 Section 12.2 requires the low 8 bytes of the\n\t// modulus to form the key id.\n\tif len(pk.n.bytes) < 8 {\n\t\treturn errors.StructuralError(\"v3 public key modulus is too short\")\n\t}\n\tif len(pk.e.bytes) > 3 {\n\t\terr = errors.UnsupportedError(\"large public exponent\")\n\t\treturn\n\t}\n\trsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)}\n\tfor i := 0; i < len(pk.e.bytes); i++ {\n\t\trsa.E <<= 8\n\t\trsa.E |= int(pk.e.bytes[i])\n\t}\n\tpk.PublicKey = rsa\n\treturn\n}\n\n// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.\n// The prefix is used when calculating a signature over this public key. See\n// RFC 4880, section 5.2.4.\nfunc (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) {\n\tvar pLength uint16\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tpLength += 2 + uint16(len(pk.n.bytes))\n\t\tpLength += 2 + uint16(len(pk.e.bytes))\n\tdefault:\n\t\tpanic(\"unknown public key algorithm\")\n\t}\n\tpLength += 6\n\tw.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)})\n\treturn\n}\n\nfunc (pk *PublicKeyV3) Serialize(w io.Writer) (err error) {\n\tlength := 8 // 8 byte header\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tlength += 2 + len(pk.n.bytes)\n\t\tlength += 2 + len(pk.e.bytes)\n\tdefault:\n\t\tpanic(\"unknown public key algorithm\")\n\t}\n\n\tpacketType := packetTypePublicKey\n\tif pk.IsSubkey {\n\t\tpacketType = packetTypePublicSubkey\n\t}\n\tif err = serializeHeader(w, packetType, length); err != nil {\n\t\treturn\n\t}\n\treturn pk.serializeWithoutHeaders(w)\n}\n\n// serializeWithoutHeaders marshals the PublicKey to w in the form of an\n// OpenPGP public key packet, not including the packet header.\nfunc (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) {\n\tvar buf [8]byte\n\t// Version 3\n\tbuf[0] = 3\n\t// Creation time\n\tt := uint32(pk.CreationTime.Unix())\n\tbuf[1] = byte(t >> 24)\n\tbuf[2] = byte(t >> 16)\n\tbuf[3] = byte(t >> 8)\n\tbuf[4] = byte(t)\n\t// Days to expire\n\tbuf[5] = byte(pk.DaysToExpire >> 8)\n\tbuf[6] = byte(pk.DaysToExpire)\n\t// Public key algorithm\n\tbuf[7] = byte(pk.PubKeyAlgo)\n\n\tif _, err = w.Write(buf[:]); err != nil {\n\t\treturn\n\t}\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\treturn writeMPIs(w, pk.n, pk.e)\n\t}\n\treturn errors.InvalidArgumentError(\"bad public-key algorithm\")\n}\n\n// CanSign returns true iff this public key can generate signatures\nfunc (pk *PublicKeyV3) CanSign() bool {\n\treturn pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly\n}\n\n// VerifySignatureV3 returns nil iff sig is a valid signature, made by this\n// public key, of the data hashed into signed. signed is mutated by this call.\nfunc (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) {\n\tif !pk.CanSign() {\n\t\treturn errors.InvalidArgumentError(\"public key cannot generate signatures\")\n\t}\n\n\tsuffix := make([]byte, 5)\n\tsuffix[0] = byte(sig.SigType)\n\tbinary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))\n\tsigned.Write(suffix)\n\thashBytes := signed.Sum(nil)\n\n\tif hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {\n\t\treturn errors.SignatureError(\"hash tag doesn't match\")\n\t}\n\n\tif pk.PubKeyAlgo != sig.PubKeyAlgo {\n\t\treturn errors.InvalidArgumentError(\"public key and signature use different algorithms\")\n\t}\n\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\tif err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil {\n\t\t\treturn errors.SignatureError(\"RSA verification failure\")\n\t\t}\n\t\treturn\n\tdefault:\n\t\t// V3 public keys only support RSA.\n\t\tpanic(\"shouldn't happen\")\n\t}\n}\n\n// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this\n// public key, that id is the identity of pub.\nfunc (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) {\n\th, err := userIdSignatureV3Hash(id, pk, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn pk.VerifySignatureV3(h, sig)\n}\n\n// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this\n// public key, of signed.\nfunc (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) {\n\th, err := keySignatureHash(pk, signed, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn pk.VerifySignatureV3(h, sig)\n}\n\n// userIdSignatureV3Hash returns a Hash of the message that needs to be signed\n// to assert that pk is a valid key for id.\nfunc userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) {\n\tif !hfn.Available() {\n\t\treturn nil, errors.UnsupportedError(\"hash function\")\n\t}\n\th = hfn.New()\n\n\t// RFC 4880, section 5.2.4\n\tpk.SerializeSignaturePrefix(h)\n\tpk.serializeWithoutHeaders(h)\n\n\th.Write([]byte(id))\n\n\treturn\n}\n\n// KeyIdString returns the public key's fingerprint in capital hex\n// (e.g. \"6C7EE1B8621CC013\").\nfunc (pk *PublicKeyV3) KeyIdString() string {\n\treturn fmt.Sprintf(\"%X\", pk.KeyId)\n}\n\n// KeyIdShortString returns the short form of public key's fingerprint\n// in capital hex, as shown by gpg --list-keys (e.g. \"621CC013\").\nfunc (pk *PublicKeyV3) KeyIdShortString() string {\n\treturn fmt.Sprintf(\"%X\", pk.KeyId&0xFFFFFFFF)\n}\n\n// BitLength returns the bit length for the given public key.\nfunc (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) {\n\tswitch pk.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:\n\t\tbitLength = pk.n.bitLength\n\tdefault:\n\t\terr = errors.InvalidArgumentError(\"bad public-key algorithm\")\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/reader.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"io\"\n)\n\n// Reader reads packets from an io.Reader and allows packets to be 'unread' so\n// that they result from the next call to Next.\ntype Reader struct {\n\tq       []Packet\n\treaders []io.Reader\n}\n\n// New io.Readers are pushed when a compressed or encrypted packet is processed\n// and recursively treated as a new source of packets. However, a carefully\n// crafted packet can trigger an infinite recursive sequence of packets. See\n// http://mumble.net/~campbell/misc/pgp-quine\n// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402\n// This constant limits the number of recursive packets that may be pushed.\nconst maxReaders = 32\n\n// Next returns the most recently unread Packet, or reads another packet from\n// the top-most io.Reader. Unknown packet types are skipped.\nfunc (r *Reader) Next() (p Packet, err error) {\n\tif len(r.q) > 0 {\n\t\tp = r.q[len(r.q)-1]\n\t\tr.q = r.q[:len(r.q)-1]\n\t\treturn\n\t}\n\n\tfor len(r.readers) > 0 {\n\t\tp, err = Read(r.readers[len(r.readers)-1])\n\t\tif err == nil {\n\t\t\treturn\n\t\t}\n\t\tif err == io.EOF {\n\t\t\tr.readers = r.readers[:len(r.readers)-1]\n\t\t\tcontinue\n\t\t}\n\t\tif _, ok := err.(errors.UnknownPacketTypeError); !ok {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn nil, io.EOF\n}\n\n// Push causes the Reader to start reading from a new io.Reader. When an EOF\n// error is seen from the new io.Reader, it is popped and the Reader continues\n// to read from the next most recent io.Reader. Push returns a StructuralError\n// if pushing the reader would exceed the maximum recursion level, otherwise it\n// returns nil.\nfunc (r *Reader) Push(reader io.Reader) (err error) {\n\tif len(r.readers) >= maxReaders {\n\t\treturn errors.StructuralError(\"too many layers of packets\")\n\t}\n\tr.readers = append(r.readers, reader)\n\treturn nil\n}\n\n// Unread causes the given Packet to be returned from the next call to Next.\nfunc (r *Reader) Unread(p Packet) {\n\tr.q = append(r.q, p)\n}\n\nfunc NewReader(r io.Reader) *Reader {\n\treturn &Reader{\n\t\tq:       nil,\n\t\treaders: []io.Reader{r},\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/signature.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"crypto\"\n\t\"crypto/dsa\"\n\t\"crypto/ecdsa\"\n\t\"encoding/asn1\"\n\t\"encoding/binary\"\n\t\"hash\"\n\t\"io\"\n\t\"math/big\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n)\n\nconst (\n\t// See RFC 4880, section 5.2.3.21 for details.\n\tKeyFlagCertify = 1 << iota\n\tKeyFlagSign\n\tKeyFlagEncryptCommunications\n\tKeyFlagEncryptStorage\n)\n\n// Signature represents a signature. See RFC 4880, section 5.2.\ntype Signature struct {\n\tSigType    SignatureType\n\tPubKeyAlgo PublicKeyAlgorithm\n\tHash       crypto.Hash\n\n\t// HashSuffix is extra data that is hashed in after the signed data.\n\tHashSuffix []byte\n\t// HashTag contains the first two bytes of the hash for fast rejection\n\t// of bad signed data.\n\tHashTag      [2]byte\n\tCreationTime time.Time\n\n\tRSASignature         parsedMPI\n\tDSASigR, DSASigS     parsedMPI\n\tECDSASigR, ECDSASigS parsedMPI\n\n\t// rawSubpackets contains the unparsed subpackets, in order.\n\trawSubpackets []outputSubpacket\n\n\t// The following are optional so are nil when not included in the\n\t// signature.\n\n\tSigLifetimeSecs, KeyLifetimeSecs                        *uint32\n\tPreferredSymmetric, PreferredHash, PreferredCompression []uint8\n\tIssuerKeyId                                             *uint64\n\tIsPrimaryId                                             *bool\n\n\t// FlagsValid is set if any flags were given. See RFC 4880, section\n\t// 5.2.3.21 for details.\n\tFlagsValid                                                           bool\n\tFlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool\n\n\t// RevocationReason is set if this signature has been revoked.\n\t// See RFC 4880, section 5.2.3.23 for details.\n\tRevocationReason     *uint8\n\tRevocationReasonText string\n\n\t// MDC is set if this signature has a feature packet that indicates\n\t// support for MDC subpackets.\n\tMDC bool\n\n\t// EmbeddedSignature, if non-nil, is a signature of the parent key, by\n\t// this key. This prevents an attacker from claiming another's signing\n\t// subkey as their own.\n\tEmbeddedSignature *Signature\n\n\toutSubpackets []outputSubpacket\n}\n\nfunc (sig *Signature) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.2.3\n\tvar buf [5]byte\n\t_, err = readFull(r, buf[:1])\n\tif err != nil {\n\t\treturn\n\t}\n\tif buf[0] != 4 {\n\t\terr = errors.UnsupportedError(\"signature packet version \" + strconv.Itoa(int(buf[0])))\n\t\treturn\n\t}\n\n\t_, err = readFull(r, buf[:5])\n\tif err != nil {\n\t\treturn\n\t}\n\tsig.SigType = SignatureType(buf[0])\n\tsig.PubKeyAlgo = PublicKeyAlgorithm(buf[1])\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA:\n\tdefault:\n\t\terr = errors.UnsupportedError(\"public key algorithm \" + strconv.Itoa(int(sig.PubKeyAlgo)))\n\t\treturn\n\t}\n\n\tvar ok bool\n\tsig.Hash, ok = s2k.HashIdToHash(buf[2])\n\tif !ok {\n\t\treturn errors.UnsupportedError(\"hash function \" + strconv.Itoa(int(buf[2])))\n\t}\n\n\thashedSubpacketsLength := int(buf[3])<<8 | int(buf[4])\n\tl := 6 + hashedSubpacketsLength\n\tsig.HashSuffix = make([]byte, l+6)\n\tsig.HashSuffix[0] = 4\n\tcopy(sig.HashSuffix[1:], buf[:5])\n\thashedSubpackets := sig.HashSuffix[6:l]\n\t_, err = readFull(r, hashedSubpackets)\n\tif err != nil {\n\t\treturn\n\t}\n\t// See RFC 4880, section 5.2.4\n\ttrailer := sig.HashSuffix[l:]\n\ttrailer[0] = 4\n\ttrailer[1] = 0xff\n\ttrailer[2] = uint8(l >> 24)\n\ttrailer[3] = uint8(l >> 16)\n\ttrailer[4] = uint8(l >> 8)\n\ttrailer[5] = uint8(l)\n\n\terr = parseSignatureSubpackets(sig, hashedSubpackets, true)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = readFull(r, buf[:2])\n\tif err != nil {\n\t\treturn\n\t}\n\tunhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1])\n\tunhashedSubpackets := make([]byte, unhashedSubpacketsLength)\n\t_, err = readFull(r, unhashedSubpackets)\n\tif err != nil {\n\t\treturn\n\t}\n\terr = parseSignatureSubpackets(sig, unhashedSubpackets, false)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = readFull(r, sig.HashTag[:2])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\tsig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r)\n\tcase PubKeyAlgoDSA:\n\t\tsig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r)\n\t\tif err == nil {\n\t\t\tsig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r)\n\t\t}\n\tcase PubKeyAlgoECDSA:\n\t\tsig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r)\n\t\tif err == nil {\n\t\t\tsig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r)\n\t\t}\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n\treturn\n}\n\n// parseSignatureSubpackets parses subpackets of the main signature packet. See\n// RFC 4880, section 5.2.3.1.\nfunc parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) {\n\tfor len(subpackets) > 0 {\n\t\tsubpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tif sig.CreationTime.IsZero() {\n\t\terr = errors.StructuralError(\"no creation time in signature\")\n\t}\n\n\treturn\n}\n\ntype signatureSubpacketType uint8\n\nconst (\n\tcreationTimeSubpacket        signatureSubpacketType = 2\n\tsignatureExpirationSubpacket signatureSubpacketType = 3\n\tkeyExpirationSubpacket       signatureSubpacketType = 9\n\tprefSymmetricAlgosSubpacket  signatureSubpacketType = 11\n\tissuerSubpacket              signatureSubpacketType = 16\n\tprefHashAlgosSubpacket       signatureSubpacketType = 21\n\tprefCompressionSubpacket     signatureSubpacketType = 22\n\tprimaryUserIdSubpacket       signatureSubpacketType = 25\n\tkeyFlagsSubpacket            signatureSubpacketType = 27\n\treasonForRevocationSubpacket signatureSubpacketType = 29\n\tfeaturesSubpacket            signatureSubpacketType = 30\n\tembeddedSignatureSubpacket   signatureSubpacketType = 32\n)\n\n// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1.\nfunc parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) {\n\t// RFC 4880, section 5.2.3.1\n\tvar (\n\t\tlength     uint32\n\t\tpacketType signatureSubpacketType\n\t\tisCritical bool\n\t)\n\tswitch {\n\tcase subpacket[0] < 192:\n\t\tlength = uint32(subpacket[0])\n\t\tsubpacket = subpacket[1:]\n\tcase subpacket[0] < 255:\n\t\tif len(subpacket) < 2 {\n\t\t\tgoto Truncated\n\t\t}\n\t\tlength = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192\n\t\tsubpacket = subpacket[2:]\n\tdefault:\n\t\tif len(subpacket) < 5 {\n\t\t\tgoto Truncated\n\t\t}\n\t\tlength = uint32(subpacket[1])<<24 |\n\t\t\tuint32(subpacket[2])<<16 |\n\t\t\tuint32(subpacket[3])<<8 |\n\t\t\tuint32(subpacket[4])\n\t\tsubpacket = subpacket[5:]\n\t}\n\tif length > uint32(len(subpacket)) {\n\t\tgoto Truncated\n\t}\n\trest = subpacket[length:]\n\tsubpacket = subpacket[:length]\n\tif len(subpacket) == 0 {\n\t\terr = errors.StructuralError(\"zero length signature subpacket\")\n\t\treturn\n\t}\n\tpacketType = signatureSubpacketType(subpacket[0] & 0x7f)\n\tisCritical = subpacket[0]&0x80 == 0x80\n\tsubpacket = subpacket[1:]\n\tsig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket})\n\tswitch packetType {\n\tcase creationTimeSubpacket:\n\t\tif !isHashed {\n\t\t\terr = errors.StructuralError(\"signature creation time in non-hashed area\")\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) != 4 {\n\t\t\terr = errors.StructuralError(\"signature creation time not four bytes\")\n\t\t\treturn\n\t\t}\n\t\tt := binary.BigEndian.Uint32(subpacket)\n\t\tsig.CreationTime = time.Unix(int64(t), 0)\n\tcase signatureExpirationSubpacket:\n\t\t// Signature expiration time, section 5.2.3.10\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) != 4 {\n\t\t\terr = errors.StructuralError(\"expiration subpacket with bad length\")\n\t\t\treturn\n\t\t}\n\t\tsig.SigLifetimeSecs = new(uint32)\n\t\t*sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket)\n\tcase keyExpirationSubpacket:\n\t\t// Key expiration time, section 5.2.3.6\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) != 4 {\n\t\t\terr = errors.StructuralError(\"key expiration subpacket with bad length\")\n\t\t\treturn\n\t\t}\n\t\tsig.KeyLifetimeSecs = new(uint32)\n\t\t*sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket)\n\tcase prefSymmetricAlgosSubpacket:\n\t\t// Preferred symmetric algorithms, section 5.2.3.7\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tsig.PreferredSymmetric = make([]byte, len(subpacket))\n\t\tcopy(sig.PreferredSymmetric, subpacket)\n\tcase issuerSubpacket:\n\t\t// Issuer, section 5.2.3.5\n\t\tif len(subpacket) != 8 {\n\t\t\terr = errors.StructuralError(\"issuer subpacket with bad length\")\n\t\t\treturn\n\t\t}\n\t\tsig.IssuerKeyId = new(uint64)\n\t\t*sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket)\n\tcase prefHashAlgosSubpacket:\n\t\t// Preferred hash algorithms, section 5.2.3.8\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tsig.PreferredHash = make([]byte, len(subpacket))\n\t\tcopy(sig.PreferredHash, subpacket)\n\tcase prefCompressionSubpacket:\n\t\t// Preferred compression algorithms, section 5.2.3.9\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tsig.PreferredCompression = make([]byte, len(subpacket))\n\t\tcopy(sig.PreferredCompression, subpacket)\n\tcase primaryUserIdSubpacket:\n\t\t// Primary User ID, section 5.2.3.19\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) != 1 {\n\t\t\terr = errors.StructuralError(\"primary user id subpacket with bad length\")\n\t\t\treturn\n\t\t}\n\t\tsig.IsPrimaryId = new(bool)\n\t\tif subpacket[0] > 0 {\n\t\t\t*sig.IsPrimaryId = true\n\t\t}\n\tcase keyFlagsSubpacket:\n\t\t// Key flags, section 5.2.3.21\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) == 0 {\n\t\t\terr = errors.StructuralError(\"empty key flags subpacket\")\n\t\t\treturn\n\t\t}\n\t\tsig.FlagsValid = true\n\t\tif subpacket[0]&KeyFlagCertify != 0 {\n\t\t\tsig.FlagCertify = true\n\t\t}\n\t\tif subpacket[0]&KeyFlagSign != 0 {\n\t\t\tsig.FlagSign = true\n\t\t}\n\t\tif subpacket[0]&KeyFlagEncryptCommunications != 0 {\n\t\t\tsig.FlagEncryptCommunications = true\n\t\t}\n\t\tif subpacket[0]&KeyFlagEncryptStorage != 0 {\n\t\t\tsig.FlagEncryptStorage = true\n\t\t}\n\tcase reasonForRevocationSubpacket:\n\t\t// Reason For Revocation, section 5.2.3.23\n\t\tif !isHashed {\n\t\t\treturn\n\t\t}\n\t\tif len(subpacket) == 0 {\n\t\t\terr = errors.StructuralError(\"empty revocation reason subpacket\")\n\t\t\treturn\n\t\t}\n\t\tsig.RevocationReason = new(uint8)\n\t\t*sig.RevocationReason = subpacket[0]\n\t\tsig.RevocationReasonText = string(subpacket[1:])\n\tcase featuresSubpacket:\n\t\t// Features subpacket, section 5.2.3.24 specifies a very general\n\t\t// mechanism for OpenPGP implementations to signal support for new\n\t\t// features. In practice, the subpacket is used exclusively to\n\t\t// indicate support for MDC-protected encryption.\n\t\tsig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1\n\tcase embeddedSignatureSubpacket:\n\t\t// Only usage is in signatures that cross-certify\n\t\t// signing subkeys. section 5.2.3.26 describes the\n\t\t// format, with its usage described in section 11.1\n\t\tif sig.EmbeddedSignature != nil {\n\t\t\terr = errors.StructuralError(\"Cannot have multiple embedded signatures\")\n\t\t\treturn\n\t\t}\n\t\tsig.EmbeddedSignature = new(Signature)\n\t\t// Embedded signatures are required to be v4 signatures see\n\t\t// section 12.1. However, we only parse v4 signatures in this\n\t\t// file anyway.\n\t\tif err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding {\n\t\t\treturn nil, errors.StructuralError(\"cross-signature has unexpected type \" + strconv.Itoa(int(sigType)))\n\t\t}\n\tdefault:\n\t\tif isCritical {\n\t\t\terr = errors.UnsupportedError(\"unknown critical signature subpacket type \" + strconv.Itoa(int(packetType)))\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n\nTruncated:\n\terr = errors.StructuralError(\"signature subpacket truncated\")\n\treturn\n}\n\n// subpacketLengthLength returns the length, in bytes, of an encoded length value.\nfunc subpacketLengthLength(length int) int {\n\tif length < 192 {\n\t\treturn 1\n\t}\n\tif length < 16320 {\n\t\treturn 2\n\t}\n\treturn 5\n}\n\n// serializeSubpacketLength marshals the given length into to.\nfunc serializeSubpacketLength(to []byte, length int) int {\n\t// RFC 4880, Section 4.2.2.\n\tif length < 192 {\n\t\tto[0] = byte(length)\n\t\treturn 1\n\t}\n\tif length < 16320 {\n\t\tlength -= 192\n\t\tto[0] = byte((length >> 8) + 192)\n\t\tto[1] = byte(length)\n\t\treturn 2\n\t}\n\tto[0] = 255\n\tto[1] = byte(length >> 24)\n\tto[2] = byte(length >> 16)\n\tto[3] = byte(length >> 8)\n\tto[4] = byte(length)\n\treturn 5\n}\n\n// subpacketsLength returns the serialized length, in bytes, of the given\n// subpackets.\nfunc subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) {\n\tfor _, subpacket := range subpackets {\n\t\tif subpacket.hashed == hashed {\n\t\t\tlength += subpacketLengthLength(len(subpacket.contents) + 1)\n\t\t\tlength += 1 // type byte\n\t\t\tlength += len(subpacket.contents)\n\t\t}\n\t}\n\treturn\n}\n\n// serializeSubpackets marshals the given subpackets into to.\nfunc serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) {\n\tfor _, subpacket := range subpackets {\n\t\tif subpacket.hashed == hashed {\n\t\t\tn := serializeSubpacketLength(to, len(subpacket.contents)+1)\n\t\t\tto[n] = byte(subpacket.subpacketType)\n\t\t\tto = to[1+n:]\n\t\t\tn = copy(to, subpacket.contents)\n\t\t\tto = to[n:]\n\t\t}\n\t}\n\treturn\n}\n\n// KeyExpired returns whether sig is a self-signature of a key that has\n// expired.\nfunc (sig *Signature) KeyExpired(currentTime time.Time) bool {\n\tif sig.KeyLifetimeSecs == nil {\n\t\treturn false\n\t}\n\texpiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second)\n\treturn currentTime.After(expiry)\n}\n\n// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing.\nfunc (sig *Signature) buildHashSuffix() (err error) {\n\thashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)\n\n\tvar ok bool\n\tl := 6 + hashedSubpacketsLen\n\tsig.HashSuffix = make([]byte, l+6)\n\tsig.HashSuffix[0] = 4\n\tsig.HashSuffix[1] = uint8(sig.SigType)\n\tsig.HashSuffix[2] = uint8(sig.PubKeyAlgo)\n\tsig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash)\n\tif !ok {\n\t\tsig.HashSuffix = nil\n\t\treturn errors.InvalidArgumentError(\"hash cannot be represented in OpenPGP: \" + strconv.Itoa(int(sig.Hash)))\n\t}\n\tsig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8)\n\tsig.HashSuffix[5] = byte(hashedSubpacketsLen)\n\tserializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true)\n\ttrailer := sig.HashSuffix[l:]\n\ttrailer[0] = 4\n\ttrailer[1] = 0xff\n\ttrailer[2] = byte(l >> 24)\n\ttrailer[3] = byte(l >> 16)\n\ttrailer[4] = byte(l >> 8)\n\ttrailer[5] = byte(l)\n\treturn\n}\n\nfunc (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) {\n\terr = sig.buildHashSuffix()\n\tif err != nil {\n\t\treturn\n\t}\n\n\th.Write(sig.HashSuffix)\n\tdigest = h.Sum(nil)\n\tcopy(sig.HashTag[:], digest)\n\treturn\n}\n\n// Sign signs a message with a private key. The hash, h, must contain\n// the hash of the message to be signed and will be mutated by this function.\n// On success, the signature is stored in sig. Call Serialize to write it out.\n// If config is nil, sensible defaults will be used.\nfunc (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) {\n\tsig.outSubpackets = sig.buildSubpackets()\n\tdigest, err := sig.signPrepareHash(h)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tswitch priv.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\t// supports both *rsa.PrivateKey and crypto.Signer\n\t\tsig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)\n\t\tsig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes))\n\tcase PubKeyAlgoDSA:\n\t\tdsaPriv := priv.PrivateKey.(*dsa.PrivateKey)\n\n\t\t// Need to truncate hashBytes to match FIPS 186-3 section 4.6.\n\t\tsubgroupSize := (dsaPriv.Q.BitLen() + 7) / 8\n\t\tif len(digest) > subgroupSize {\n\t\t\tdigest = digest[:subgroupSize]\n\t\t}\n\t\tr, s, err := dsa.Sign(config.Random(), dsaPriv, digest)\n\t\tif err == nil {\n\t\t\tsig.DSASigR.bytes = r.Bytes()\n\t\t\tsig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes))\n\t\t\tsig.DSASigS.bytes = s.Bytes()\n\t\t\tsig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes))\n\t\t}\n\tcase PubKeyAlgoECDSA:\n\t\tvar r, s *big.Int\n\t\tif pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok {\n\t\t\t// direct support, avoid asn1 wrapping/unwrapping\n\t\t\tr, s, err = ecdsa.Sign(config.Random(), pk, digest)\n\t\t} else {\n\t\t\tvar b []byte\n\t\t\tb, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)\n\t\t\tif err == nil {\n\t\t\t\tr, s, err = unwrapECDSASig(b)\n\t\t\t}\n\t\t}\n\t\tif err == nil {\n\t\t\tsig.ECDSASigR = fromBig(r)\n\t\t\tsig.ECDSASigS = fromBig(s)\n\t\t}\n\tdefault:\n\t\terr = errors.UnsupportedError(\"public key algorithm: \" + strconv.Itoa(int(sig.PubKeyAlgo)))\n\t}\n\n\treturn\n}\n\n// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA\n// signature.\nfunc unwrapECDSASig(b []byte) (r, s *big.Int, err error) {\n\tvar ecsdaSig struct {\n\t\tR, S *big.Int\n\t}\n\t_, err = asn1.Unmarshal(b, &ecsdaSig)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn ecsdaSig.R, ecsdaSig.S, nil\n}\n\n// SignUserId computes a signature from priv, asserting that pub is a valid\n// key for the identity id.  On success, the signature is stored in sig. Call\n// Serialize to write it out.\n// If config is nil, sensible defaults will be used.\nfunc (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error {\n\th, err := userIdSignatureHash(id, pub, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn sig.Sign(h, priv, config)\n}\n\n// SignKey computes a signature from priv, asserting that pub is a subkey. On\n// success, the signature is stored in sig. Call Serialize to write it out.\n// If config is nil, sensible defaults will be used.\nfunc (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error {\n\th, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn sig.Sign(h, priv, config)\n}\n\n// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been\n// called first.\nfunc (sig *Signature) Serialize(w io.Writer) (err error) {\n\tif len(sig.outSubpackets) == 0 {\n\t\tsig.outSubpackets = sig.rawSubpackets\n\t}\n\tif sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil {\n\t\treturn errors.InvalidArgumentError(\"Signature: need to call Sign, SignUserId or SignKey before Serialize\")\n\t}\n\n\tsigLength := 0\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\tsigLength = 2 + len(sig.RSASignature.bytes)\n\tcase PubKeyAlgoDSA:\n\t\tsigLength = 2 + len(sig.DSASigR.bytes)\n\t\tsigLength += 2 + len(sig.DSASigS.bytes)\n\tcase PubKeyAlgoECDSA:\n\t\tsigLength = 2 + len(sig.ECDSASigR.bytes)\n\t\tsigLength += 2 + len(sig.ECDSASigS.bytes)\n\tdefault:\n\t\tpanic(\"impossible\")\n\t}\n\n\tunhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)\n\tlength := len(sig.HashSuffix) - 6 /* trailer not included */ +\n\t\t2 /* length of unhashed subpackets */ + unhashedSubpacketsLen +\n\t\t2 /* hash tag */ + sigLength\n\terr = serializeHeader(w, packetTypeSignature, length)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tunhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen)\n\tunhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8)\n\tunhashedSubpackets[1] = byte(unhashedSubpacketsLen)\n\tserializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false)\n\n\t_, err = w.Write(unhashedSubpackets)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = w.Write(sig.HashTag[:])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\terr = writeMPIs(w, sig.RSASignature)\n\tcase PubKeyAlgoDSA:\n\t\terr = writeMPIs(w, sig.DSASigR, sig.DSASigS)\n\tcase PubKeyAlgoECDSA:\n\t\terr = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS)\n\tdefault:\n\t\tpanic(\"impossible\")\n\t}\n\treturn\n}\n\n// outputSubpacket represents a subpacket to be marshaled.\ntype outputSubpacket struct {\n\thashed        bool // true if this subpacket is in the hashed area.\n\tsubpacketType signatureSubpacketType\n\tisCritical    bool\n\tcontents      []byte\n}\n\nfunc (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) {\n\tcreationTime := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))\n\tsubpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime})\n\n\tif sig.IssuerKeyId != nil {\n\t\tkeyId := make([]byte, 8)\n\t\tbinary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId)\n\t\tsubpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId})\n\t}\n\n\tif sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {\n\t\tsigLifetime := make([]byte, 4)\n\t\tbinary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)\n\t\tsubpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})\n\t}\n\n\t// Key flags may only appear in self-signatures or certification signatures.\n\n\tif sig.FlagsValid {\n\t\tvar flags byte\n\t\tif sig.FlagCertify {\n\t\t\tflags |= KeyFlagCertify\n\t\t}\n\t\tif sig.FlagSign {\n\t\t\tflags |= KeyFlagSign\n\t\t}\n\t\tif sig.FlagEncryptCommunications {\n\t\t\tflags |= KeyFlagEncryptCommunications\n\t\t}\n\t\tif sig.FlagEncryptStorage {\n\t\t\tflags |= KeyFlagEncryptStorage\n\t\t}\n\t\tsubpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}})\n\t}\n\n\t// The following subpackets may only appear in self-signatures\n\n\tif sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {\n\t\tkeyLifetime := make([]byte, 4)\n\t\tbinary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)\n\t\tsubpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})\n\t}\n\n\tif sig.IsPrimaryId != nil && *sig.IsPrimaryId {\n\t\tsubpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})\n\t}\n\n\tif len(sig.PreferredSymmetric) > 0 {\n\t\tsubpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})\n\t}\n\n\tif len(sig.PreferredHash) > 0 {\n\t\tsubpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})\n\t}\n\n\tif len(sig.PreferredCompression) > 0 {\n\t\tsubpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n)\n\n// SignatureV3 represents older version 3 signatures. These signatures are less secure\n// than version 4 and should not be used to create new signatures. They are included\n// here for backwards compatibility to read and validate with older key material.\n// See RFC 4880, section 5.2.2.\ntype SignatureV3 struct {\n\tSigType      SignatureType\n\tCreationTime time.Time\n\tIssuerKeyId  uint64\n\tPubKeyAlgo   PublicKeyAlgorithm\n\tHash         crypto.Hash\n\tHashTag      [2]byte\n\n\tRSASignature     parsedMPI\n\tDSASigR, DSASigS parsedMPI\n}\n\nfunc (sig *SignatureV3) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.2.2\n\tvar buf [8]byte\n\tif _, err = readFull(r, buf[:1]); err != nil {\n\t\treturn\n\t}\n\tif buf[0] < 2 || buf[0] > 3 {\n\t\terr = errors.UnsupportedError(\"signature packet version \" + strconv.Itoa(int(buf[0])))\n\t\treturn\n\t}\n\tif _, err = readFull(r, buf[:1]); err != nil {\n\t\treturn\n\t}\n\tif buf[0] != 5 {\n\t\terr = errors.UnsupportedError(\n\t\t\t\"invalid hashed material length \" + strconv.Itoa(int(buf[0])))\n\t\treturn\n\t}\n\n\t// Read hashed material: signature type + creation time\n\tif _, err = readFull(r, buf[:5]); err != nil {\n\t\treturn\n\t}\n\tsig.SigType = SignatureType(buf[0])\n\tt := binary.BigEndian.Uint32(buf[1:5])\n\tsig.CreationTime = time.Unix(int64(t), 0)\n\n\t// Eight-octet Key ID of signer.\n\tif _, err = readFull(r, buf[:8]); err != nil {\n\t\treturn\n\t}\n\tsig.IssuerKeyId = binary.BigEndian.Uint64(buf[:])\n\n\t// Public-key and hash algorithm\n\tif _, err = readFull(r, buf[:2]); err != nil {\n\t\treturn\n\t}\n\tsig.PubKeyAlgo = PublicKeyAlgorithm(buf[0])\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA:\n\tdefault:\n\t\terr = errors.UnsupportedError(\"public key algorithm \" + strconv.Itoa(int(sig.PubKeyAlgo)))\n\t\treturn\n\t}\n\tvar ok bool\n\tif sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok {\n\t\treturn errors.UnsupportedError(\"hash function \" + strconv.Itoa(int(buf[2])))\n\t}\n\n\t// Two-octet field holding left 16 bits of signed hash value.\n\tif _, err = readFull(r, sig.HashTag[:2]); err != nil {\n\t\treturn\n\t}\n\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\tsig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r)\n\tcase PubKeyAlgoDSA:\n\t\tif sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil {\n\t\t\treturn\n\t\t}\n\t\tsig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r)\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n\treturn\n}\n\n// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been\n// called first.\nfunc (sig *SignatureV3) Serialize(w io.Writer) (err error) {\n\tbuf := make([]byte, 8)\n\n\t// Write the sig type and creation time\n\tbuf[0] = byte(sig.SigType)\n\tbinary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix()))\n\tif _, err = w.Write(buf[:5]); err != nil {\n\t\treturn\n\t}\n\n\t// Write the issuer long key ID\n\tbinary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId)\n\tif _, err = w.Write(buf[:8]); err != nil {\n\t\treturn\n\t}\n\n\t// Write public key algorithm, hash ID, and hash value\n\tbuf[0] = byte(sig.PubKeyAlgo)\n\thashId, ok := s2k.HashToHashId(sig.Hash)\n\tif !ok {\n\t\treturn errors.UnsupportedError(fmt.Sprintf(\"hash function %v\", sig.Hash))\n\t}\n\tbuf[1] = hashId\n\tcopy(buf[2:4], sig.HashTag[:])\n\tif _, err = w.Write(buf[:4]); err != nil {\n\t\treturn\n\t}\n\n\tif sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil {\n\t\treturn errors.InvalidArgumentError(\"Signature: need to call Sign, SignUserId or SignKey before Serialize\")\n\t}\n\n\tswitch sig.PubKeyAlgo {\n\tcase PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:\n\t\terr = writeMPIs(w, sig.RSASignature)\n\tcase PubKeyAlgoDSA:\n\t\terr = writeMPIs(w, sig.DSASigR, sig.DSASigS)\n\tdefault:\n\t\tpanic(\"impossible\")\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"crypto/cipher\"\n\t\"io\"\n\t\"strconv\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n)\n\n// This is the largest session key that we'll support. Since no 512-bit cipher\n// has even been seriously used, this is comfortably large.\nconst maxSessionKeySizeInBytes = 64\n\n// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC\n// 4880, section 5.3.\ntype SymmetricKeyEncrypted struct {\n\tCipherFunc   CipherFunction\n\ts2k          func(out, in []byte)\n\tencryptedKey []byte\n}\n\nconst symmetricKeyEncryptedVersion = 4\n\nfunc (ske *SymmetricKeyEncrypted) parse(r io.Reader) error {\n\t// RFC 4880, section 5.3.\n\tvar buf [2]byte\n\tif _, err := readFull(r, buf[:]); err != nil {\n\t\treturn err\n\t}\n\tif buf[0] != symmetricKeyEncryptedVersion {\n\t\treturn errors.UnsupportedError(\"SymmetricKeyEncrypted version\")\n\t}\n\tske.CipherFunc = CipherFunction(buf[1])\n\n\tif ske.CipherFunc.KeySize() == 0 {\n\t\treturn errors.UnsupportedError(\"unknown cipher: \" + strconv.Itoa(int(buf[1])))\n\t}\n\n\tvar err error\n\tske.s2k, err = s2k.Parse(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tencryptedKey := make([]byte, maxSessionKeySizeInBytes)\n\t// The session key may follow. We just have to try and read to find\n\t// out. If it exists then we limit it to maxSessionKeySizeInBytes.\n\tn, err := readFull(r, encryptedKey)\n\tif err != nil && err != io.ErrUnexpectedEOF {\n\t\treturn err\n\t}\n\n\tif n != 0 {\n\t\tif n == maxSessionKeySizeInBytes {\n\t\t\treturn errors.UnsupportedError(\"oversized encrypted session key\")\n\t\t}\n\t\tske.encryptedKey = encryptedKey[:n]\n\t}\n\n\treturn nil\n}\n\n// Decrypt attempts to decrypt an encrypted session key and returns the key and\n// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data\n// packet.\nfunc (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) {\n\tkey := make([]byte, ske.CipherFunc.KeySize())\n\tske.s2k(key, passphrase)\n\n\tif len(ske.encryptedKey) == 0 {\n\t\treturn key, ske.CipherFunc, nil\n\t}\n\n\t// the IV is all zeros\n\tiv := make([]byte, ske.CipherFunc.blockSize())\n\tc := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv)\n\tplaintextKey := make([]byte, len(ske.encryptedKey))\n\tc.XORKeyStream(plaintextKey, ske.encryptedKey)\n\tcipherFunc := CipherFunction(plaintextKey[0])\n\tif cipherFunc.blockSize() == 0 {\n\t\treturn nil, ske.CipherFunc, errors.UnsupportedError(\"unknown cipher: \" + strconv.Itoa(int(cipherFunc)))\n\t}\n\tplaintextKey = plaintextKey[1:]\n\tif l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() {\n\t\treturn nil, cipherFunc, errors.StructuralError(\"length of decrypted key (\" + strconv.Itoa(l) + \") \" +\n\t\t\t\"not equal to cipher keysize (\" + strconv.Itoa(cipherKeySize) + \")\")\n\t}\n\treturn plaintextKey, cipherFunc, nil\n}\n\n// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The\n// packet contains a random session key, encrypted by a key derived from the\n// given passphrase. The session key is returned and must be passed to\n// SerializeSymmetricallyEncrypted.\n// If config is nil, sensible defaults will be used.\nfunc SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) {\n\tcipherFunc := config.Cipher()\n\tkeySize := cipherFunc.KeySize()\n\tif keySize == 0 {\n\t\treturn nil, errors.UnsupportedError(\"unknown cipher: \" + strconv.Itoa(int(cipherFunc)))\n\t}\n\n\ts2kBuf := new(bytes.Buffer)\n\tkeyEncryptingKey := make([]byte, keySize)\n\t// s2k.Serialize salts and stretches the passphrase, and writes the\n\t// resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf.\n\terr = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()})\n\tif err != nil {\n\t\treturn\n\t}\n\ts2kBytes := s2kBuf.Bytes()\n\n\tpacketLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize\n\terr = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar buf [2]byte\n\tbuf[0] = symmetricKeyEncryptedVersion\n\tbuf[1] = byte(cipherFunc)\n\t_, err = w.Write(buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\t_, err = w.Write(s2kBytes)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tsessionKey := make([]byte, keySize)\n\t_, err = io.ReadFull(config.Random(), sessionKey)\n\tif err != nil {\n\t\treturn\n\t}\n\tiv := make([]byte, cipherFunc.blockSize())\n\tc := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)\n\tencryptedCipherAndKey := make([]byte, keySize+1)\n\tc.XORKeyStream(encryptedCipherAndKey, buf[1:])\n\tc.XORKeyStream(encryptedCipherAndKey[1:], sessionKey)\n\t_, err = w.Write(encryptedCipherAndKey)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tkey = sessionKey\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"crypto/cipher\"\n\t\"crypto/sha1\"\n\t\"crypto/subtle\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"hash\"\n\t\"io\"\n\t\"strconv\"\n)\n\n// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The\n// encrypted contents will consist of more OpenPGP packets. See RFC 4880,\n// sections 5.7 and 5.13.\ntype SymmetricallyEncrypted struct {\n\tMDC      bool // true iff this is a type 18 packet and thus has an embedded MAC.\n\tcontents io.Reader\n\tprefix   []byte\n}\n\nconst symmetricallyEncryptedVersion = 1\n\nfunc (se *SymmetricallyEncrypted) parse(r io.Reader) error {\n\tif se.MDC {\n\t\t// See RFC 4880, section 5.13.\n\t\tvar buf [1]byte\n\t\t_, err := readFull(r, buf[:])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif buf[0] != symmetricallyEncryptedVersion {\n\t\t\treturn errors.UnsupportedError(\"unknown SymmetricallyEncrypted version\")\n\t\t}\n\t}\n\tse.contents = r\n\treturn nil\n}\n\n// Decrypt returns a ReadCloser, from which the decrypted contents of the\n// packet can be read. An incorrect key can, with high probability, be detected\n// immediately and this will result in a KeyIncorrect error being returned.\nfunc (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) {\n\tkeySize := c.KeySize()\n\tif keySize == 0 {\n\t\treturn nil, errors.UnsupportedError(\"unknown cipher: \" + strconv.Itoa(int(c)))\n\t}\n\tif len(key) != keySize {\n\t\treturn nil, errors.InvalidArgumentError(\"SymmetricallyEncrypted: incorrect key length\")\n\t}\n\n\tif se.prefix == nil {\n\t\tse.prefix = make([]byte, c.blockSize()+2)\n\t\t_, err := readFull(se.contents, se.prefix)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else if len(se.prefix) != c.blockSize()+2 {\n\t\treturn nil, errors.InvalidArgumentError(\"can't try ciphers with different block lengths\")\n\t}\n\n\tocfbResync := OCFBResync\n\tif se.MDC {\n\t\t// MDC packets use a different form of OCFB mode.\n\t\tocfbResync = OCFBNoResync\n\t}\n\n\ts := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync)\n\tif s == nil {\n\t\treturn nil, errors.ErrKeyIncorrect\n\t}\n\n\tplaintext := cipher.StreamReader{S: s, R: se.contents}\n\n\tif se.MDC {\n\t\t// MDC packets have an embedded hash that we need to check.\n\t\th := sha1.New()\n\t\th.Write(se.prefix)\n\t\treturn &seMDCReader{in: plaintext, h: h}, nil\n\t}\n\n\t// Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser.\n\treturn seReader{plaintext}, nil\n}\n\n// seReader wraps an io.Reader with a no-op Close method.\ntype seReader struct {\n\tin io.Reader\n}\n\nfunc (ser seReader) Read(buf []byte) (int, error) {\n\treturn ser.in.Read(buf)\n}\n\nfunc (ser seReader) Close() error {\n\treturn nil\n}\n\nconst mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size\n\n// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold\n// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an\n// MDC packet containing a hash of the previous contents which is checked\n// against the running hash. See RFC 4880, section 5.13.\ntype seMDCReader struct {\n\tin          io.Reader\n\th           hash.Hash\n\ttrailer     [mdcTrailerSize]byte\n\tscratch     [mdcTrailerSize]byte\n\ttrailerUsed int\n\terror       bool\n\teof         bool\n}\n\nfunc (ser *seMDCReader) Read(buf []byte) (n int, err error) {\n\tif ser.error {\n\t\terr = io.ErrUnexpectedEOF\n\t\treturn\n\t}\n\tif ser.eof {\n\t\terr = io.EOF\n\t\treturn\n\t}\n\n\t// If we haven't yet filled the trailer buffer then we must do that\n\t// first.\n\tfor ser.trailerUsed < mdcTrailerSize {\n\t\tn, err = ser.in.Read(ser.trailer[ser.trailerUsed:])\n\t\tser.trailerUsed += n\n\t\tif err == io.EOF {\n\t\t\tif ser.trailerUsed != mdcTrailerSize {\n\t\t\t\tn = 0\n\t\t\t\terr = io.ErrUnexpectedEOF\n\t\t\t\tser.error = true\n\t\t\t\treturn\n\t\t\t}\n\t\t\tser.eof = true\n\t\t\tn = 0\n\t\t\treturn\n\t\t}\n\n\t\tif err != nil {\n\t\t\tn = 0\n\t\t\treturn\n\t\t}\n\t}\n\n\t// If it's a short read then we read into a temporary buffer and shift\n\t// the data into the caller's buffer.\n\tif len(buf) <= mdcTrailerSize {\n\t\tn, err = readFull(ser.in, ser.scratch[:len(buf)])\n\t\tcopy(buf, ser.trailer[:n])\n\t\tser.h.Write(buf[:n])\n\t\tcopy(ser.trailer[:], ser.trailer[n:])\n\t\tcopy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:])\n\t\tif n < len(buf) {\n\t\t\tser.eof = true\n\t\t\terr = io.EOF\n\t\t}\n\t\treturn\n\t}\n\n\tn, err = ser.in.Read(buf[mdcTrailerSize:])\n\tcopy(buf, ser.trailer[:])\n\tser.h.Write(buf[:n])\n\tcopy(ser.trailer[:], buf[n:])\n\n\tif err == io.EOF {\n\t\tser.eof = true\n\t}\n\treturn\n}\n\n// This is a new-format packet tag byte for a type 19 (MDC) packet.\nconst mdcPacketTagByte = byte(0x80) | 0x40 | 19\n\nfunc (ser *seMDCReader) Close() error {\n\tif ser.error {\n\t\treturn errors.SignatureError(\"error during reading\")\n\t}\n\n\tfor !ser.eof {\n\t\t// We haven't seen EOF so we need to read to the end\n\t\tvar buf [1024]byte\n\t\t_, err := ser.Read(buf[:])\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn errors.SignatureError(\"error during reading\")\n\t\t}\n\t}\n\n\tif ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size {\n\t\treturn errors.SignatureError(\"MDC packet not found\")\n\t}\n\tser.h.Write(ser.trailer[:2])\n\n\tfinal := ser.h.Sum(nil)\n\tif subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 {\n\t\treturn errors.SignatureError(\"hash mismatch\")\n\t}\n\treturn nil\n}\n\n// An seMDCWriter writes through to an io.WriteCloser while maintains a running\n// hash of the data written. On close, it emits an MDC packet containing the\n// running hash.\ntype seMDCWriter struct {\n\tw io.WriteCloser\n\th hash.Hash\n}\n\nfunc (w *seMDCWriter) Write(buf []byte) (n int, err error) {\n\tw.h.Write(buf)\n\treturn w.w.Write(buf)\n}\n\nfunc (w *seMDCWriter) Close() (err error) {\n\tvar buf [mdcTrailerSize]byte\n\n\tbuf[0] = mdcPacketTagByte\n\tbuf[1] = sha1.Size\n\tw.h.Write(buf[:2])\n\tdigest := w.h.Sum(nil)\n\tcopy(buf[2:], digest)\n\n\t_, err = w.w.Write(buf[:])\n\tif err != nil {\n\t\treturn\n\t}\n\treturn w.w.Close()\n}\n\n// noOpCloser is like an io.NopCloser, but for an io.Writer.\ntype noOpCloser struct {\n\tw io.Writer\n}\n\nfunc (c noOpCloser) Write(data []byte) (n int, err error) {\n\treturn c.w.Write(data)\n}\n\nfunc (c noOpCloser) Close() error {\n\treturn nil\n}\n\n// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet\n// to w and returns a WriteCloser to which the to-be-encrypted packets can be\n// written.\n// If config is nil, sensible defaults will be used.\nfunc SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) {\n\tif c.KeySize() != len(key) {\n\t\treturn nil, errors.InvalidArgumentError(\"SymmetricallyEncrypted.Serialize: bad key length\")\n\t}\n\twriteCloser := noOpCloser{w}\n\tciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion})\n\tif err != nil {\n\t\treturn\n\t}\n\n\tblock := c.new(key)\n\tblockSize := block.BlockSize()\n\tiv := make([]byte, blockSize)\n\t_, err = config.Random().Read(iv)\n\tif err != nil {\n\t\treturn\n\t}\n\ts, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync)\n\t_, err = ciphertext.Write(prefix)\n\tif err != nil {\n\t\treturn\n\t}\n\tplaintext := cipher.StreamWriter{S: s, W: ciphertext}\n\n\th := sha1.New()\n\th.Write(iv)\n\th.Write(iv[blockSize-2:])\n\tcontents = &seMDCWriter{w: plaintext, h: h}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/userattribute.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"bytes\"\n\t\"image\"\n\t\"image/jpeg\"\n\t\"io\"\n)\n\nconst UserAttrImageSubpacket = 1\n\n// UserAttribute is capable of storing other types of data about a user\n// beyond name, email and a text comment. In practice, user attributes are typically used\n// to store a signed thumbnail photo JPEG image of the user.\n// See RFC 4880, section 5.12.\ntype UserAttribute struct {\n\tContents []*OpaqueSubpacket\n}\n\n// NewUserAttributePhoto creates a user attribute packet\n// containing the given images.\nfunc NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) {\n\tuat = new(UserAttribute)\n\tfor _, photo := range photos {\n\t\tvar buf bytes.Buffer\n\t\t// RFC 4880, Section 5.12.1.\n\t\tdata := []byte{\n\t\t\t0x10, 0x00, // Little-endian image header length (16 bytes)\n\t\t\t0x01,       // Image header version 1\n\t\t\t0x01,       // JPEG\n\t\t\t0, 0, 0, 0, // 12 reserved octets, must be all zero.\n\t\t\t0, 0, 0, 0,\n\t\t\t0, 0, 0, 0}\n\t\tif _, err = buf.Write(data); err != nil {\n\t\t\treturn\n\t\t}\n\t\tif err = jpeg.Encode(&buf, photo, nil); err != nil {\n\t\t\treturn\n\t\t}\n\t\tuat.Contents = append(uat.Contents, &OpaqueSubpacket{\n\t\t\tSubType:  UserAttrImageSubpacket,\n\t\t\tContents: buf.Bytes()})\n\t}\n\treturn\n}\n\n// NewUserAttribute creates a new user attribute packet containing the given subpackets.\nfunc NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute {\n\treturn &UserAttribute{Contents: contents}\n}\n\nfunc (uat *UserAttribute) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.13\n\tb, err := io.ReadAll(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tuat.Contents, err = OpaqueSubpackets(b)\n\treturn\n}\n\n// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including\n// header.\nfunc (uat *UserAttribute) Serialize(w io.Writer) (err error) {\n\tvar buf bytes.Buffer\n\tfor _, sp := range uat.Contents {\n\t\tsp.Serialize(&buf)\n\t}\n\tif err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil {\n\t\treturn err\n\t}\n\t_, err = w.Write(buf.Bytes())\n\treturn\n}\n\n// ImageData returns zero or more byte slices, each containing\n// JPEG File Interchange Format (JFIF), for each photo in the\n// user attribute packet.\nfunc (uat *UserAttribute) ImageData() (imageData [][]byte) {\n\tfor _, sp := range uat.Contents {\n\t\tif sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 {\n\t\t\timageData = append(imageData, sp.Contents[16:])\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/packet/userid.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage packet\n\nimport (\n\t\"io\"\n\t\"strings\"\n)\n\n// UserId contains text that is intended to represent the name and email\n// address of the key holder. See RFC 4880, section 5.11. By convention, this\n// takes the form \"Full Name (Comment) <email@example.com>\"\ntype UserId struct {\n\tId string // By convention, this takes the form \"Full Name (Comment) <email@example.com>\" which is split out in the fields below.\n\n\tName, Comment, Email string\n}\n\nfunc hasInvalidCharacters(s string) bool {\n\tfor _, c := range s {\n\t\tswitch c {\n\t\tcase '(', ')', '<', '>', 0:\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// NewUserId returns a UserId or nil if any of the arguments contain invalid\n// characters. The invalid characters are '\\x00', '(', ')', '<' and '>'\nfunc NewUserId(name, comment, email string) *UserId {\n\t// RFC 4880 doesn't deal with the structure of userid strings; the\n\t// name, comment and email form is just a convention. However, there's\n\t// no convention about escaping the metacharacters and GPG just refuses\n\t// to create user ids where, say, the name contains a '('. We mirror\n\t// this behaviour.\n\n\tif hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) {\n\t\treturn nil\n\t}\n\n\tuid := new(UserId)\n\tuid.Name, uid.Comment, uid.Email = name, comment, email\n\tuid.Id = name\n\tif len(comment) > 0 {\n\t\tif len(uid.Id) > 0 {\n\t\t\tuid.Id += \" \"\n\t\t}\n\t\tuid.Id += \"(\"\n\t\tuid.Id += comment\n\t\tuid.Id += \")\"\n\t}\n\tif len(email) > 0 {\n\t\tif len(uid.Id) > 0 {\n\t\t\tuid.Id += \" \"\n\t\t}\n\t\tuid.Id += \"<\"\n\t\tuid.Id += email\n\t\tuid.Id += \">\"\n\t}\n\treturn uid\n}\n\nfunc (uid *UserId) parse(r io.Reader) (err error) {\n\t// RFC 4880, section 5.11\n\tb, err := io.ReadAll(r)\n\tif err != nil {\n\t\treturn\n\t}\n\tuid.Id = string(b)\n\tuid.Name, uid.Comment, uid.Email = parseUserId(uid.Id)\n\treturn\n}\n\n// Serialize marshals uid to w in the form of an OpenPGP packet, including\n// header.\nfunc (uid *UserId) Serialize(w io.Writer) error {\n\terr := serializeHeader(w, packetTypeUserId, len(uid.Id))\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = w.Write([]byte(uid.Id))\n\treturn err\n}\n\n// parseUserId extracts the name, comment and email from a user id string that\n// is formatted as \"Full Name (Comment) <email@example.com>\".\nfunc parseUserId(id string) (name, comment, email string) {\n\tvar n, c, e struct {\n\t\tstart, end int\n\t}\n\tvar state int\n\n\tfor offset, rune := range id {\n\t\tswitch state {\n\t\tcase 0:\n\t\t\t// Entering name\n\t\t\tn.start = offset\n\t\t\tstate = 1\n\t\t\tfallthrough\n\t\tcase 1:\n\t\t\t// In name\n\t\t\tif rune == '(' {\n\t\t\t\tstate = 2\n\t\t\t\tn.end = offset\n\t\t\t} else if rune == '<' {\n\t\t\t\tstate = 5\n\t\t\t\tn.end = offset\n\t\t\t}\n\t\tcase 2:\n\t\t\t// Entering comment\n\t\t\tc.start = offset\n\t\t\tstate = 3\n\t\t\tfallthrough\n\t\tcase 3:\n\t\t\t// In comment\n\t\t\tif rune == ')' {\n\t\t\t\tstate = 4\n\t\t\t\tc.end = offset\n\t\t\t}\n\t\tcase 4:\n\t\t\t// Between comment and email\n\t\t\tif rune == '<' {\n\t\t\t\tstate = 5\n\t\t\t}\n\t\tcase 5:\n\t\t\t// Entering email\n\t\t\te.start = offset\n\t\t\tstate = 6\n\t\t\tfallthrough\n\t\tcase 6:\n\t\t\t// In email\n\t\t\tif rune == '>' {\n\t\t\t\tstate = 7\n\t\t\t\te.end = offset\n\t\t\t}\n\t\tdefault:\n\t\t\t// After email\n\t\t}\n\t}\n\tswitch state {\n\tcase 1:\n\t\t// ended in the name\n\t\tn.end = len(id)\n\tcase 3:\n\t\t// ended in comment\n\t\tc.end = len(id)\n\tcase 6:\n\t\t// ended in email\n\t\te.end = len(id)\n\t}\n\n\tname = strings.TrimSpace(id[n.start:n.end])\n\tcomment = strings.TrimSpace(id[c.start:c.end])\n\temail = strings.TrimSpace(id[e.start:e.end])\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/read.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package openpgp implements high level operations on OpenPGP messages.\n//\n// Deprecated: this package is unmaintained except for security fixes. New\n// applications should consider a more focused, modern alternative to OpenPGP\n// for their specific task. If you are required to interoperate with OpenPGP\n// systems and need a maintained package, consider a community fork.\n// See https://golang.org/issue/44226.\npackage openpgp\n\nimport (\n\t\"crypto\"\n\t_ \"crypto/sha256\"\n\t\"hash\"\n\t\"io\"\n\t\"strconv\"\n\n\t\"golang.org/x/crypto/openpgp/armor\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/packet\"\n)\n\n// SignatureType is the armor type for a PGP signature.\nvar SignatureType = \"PGP SIGNATURE\"\n\n// readArmored reads an armored block with the given type.\nfunc readArmored(r io.Reader, expectedType string) (body io.Reader, err error) {\n\tblock, err := armor.Decode(r)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif block.Type != expectedType {\n\t\treturn nil, errors.InvalidArgumentError(\"expected '\" + expectedType + \"', got: \" + block.Type)\n\t}\n\n\treturn block.Body, nil\n}\n\n// MessageDetails contains the result of parsing an OpenPGP encrypted and/or\n// signed message.\ntype MessageDetails struct {\n\tIsEncrypted              bool                // true if the message was encrypted.\n\tEncryptedToKeyIds        []uint64            // the list of recipient key ids.\n\tIsSymmetricallyEncrypted bool                // true if a passphrase could have decrypted the message.\n\tDecryptedWith            Key                 // the private key used to decrypt the message, if any.\n\tIsSigned                 bool                // true if the message is signed.\n\tSignedByKeyId            uint64              // the key id of the signer, if any.\n\tSignedBy                 *Key                // the key of the signer, if available.\n\tLiteralData              *packet.LiteralData // the metadata of the contents\n\tUnverifiedBody           io.Reader           // the contents of the message.\n\n\t// If IsSigned is true and SignedBy is non-zero then the signature will\n\t// be verified as UnverifiedBody is read. The signature cannot be\n\t// checked until the whole of UnverifiedBody is read so UnverifiedBody\n\t// must be consumed until EOF before the data can be trusted. Even if a\n\t// message isn't signed (or the signer is unknown) the data may contain\n\t// an authentication code that is only checked once UnverifiedBody has\n\t// been consumed. Once EOF has been seen, the following fields are\n\t// valid. (An authentication code failure is reported as a\n\t// SignatureError error when reading from UnverifiedBody.)\n\tSignatureError error               // nil if the signature is good.\n\tSignature      *packet.Signature   // the signature packet itself, if v4 (default)\n\tSignatureV3    *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature\n\n\tdecrypted io.ReadCloser\n}\n\n// A PromptFunction is used as a callback by functions that may need to decrypt\n// a private key, or prompt for a passphrase. It is called with a list of\n// acceptable, encrypted private keys and a boolean that indicates whether a\n// passphrase is usable. It should either decrypt a private key or return a\n// passphrase to try. If the decrypted private key or given passphrase isn't\n// correct, the function will be called again, forever. Any error returned will\n// be passed up.\ntype PromptFunction func(keys []Key, symmetric bool) ([]byte, error)\n\n// A keyEnvelopePair is used to store a private key with the envelope that\n// contains a symmetric key, encrypted with that key.\ntype keyEnvelopePair struct {\n\tkey          Key\n\tencryptedKey *packet.EncryptedKey\n}\n\n// ReadMessage parses an OpenPGP message that may be signed and/or encrypted.\n// The given KeyRing should contain both public keys (for signature\n// verification) and, possibly encrypted, private keys for decrypting.\n// If config is nil, sensible defaults will be used.\nfunc ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) {\n\tvar p packet.Packet\n\n\tvar symKeys []*packet.SymmetricKeyEncrypted\n\tvar pubKeys []keyEnvelopePair\n\tvar se *packet.SymmetricallyEncrypted\n\n\tpackets := packet.NewReader(r)\n\tmd = new(MessageDetails)\n\tmd.IsEncrypted = true\n\n\t// The message, if encrypted, starts with a number of packets\n\t// containing an encrypted decryption key. The decryption key is either\n\t// encrypted to a public key, or with a passphrase. This loop\n\t// collects these packets.\nParsePackets:\n\tfor {\n\t\tp, err = packets.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch p := p.(type) {\n\t\tcase *packet.SymmetricKeyEncrypted:\n\t\t\t// This packet contains the decryption key encrypted with a passphrase.\n\t\t\tmd.IsSymmetricallyEncrypted = true\n\t\t\tsymKeys = append(symKeys, p)\n\t\tcase *packet.EncryptedKey:\n\t\t\t// This packet contains the decryption key encrypted to a public key.\n\t\t\tmd.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId)\n\t\t\tswitch p.Algo {\n\t\t\tcase packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal:\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvar keys []Key\n\t\t\tif p.KeyId == 0 {\n\t\t\t\tkeys = keyring.DecryptionKeys()\n\t\t\t} else {\n\t\t\t\tkeys = keyring.KeysById(p.KeyId)\n\t\t\t}\n\t\t\tfor _, k := range keys {\n\t\t\t\tpubKeys = append(pubKeys, keyEnvelopePair{k, p})\n\t\t\t}\n\t\tcase *packet.SymmetricallyEncrypted:\n\t\t\tse = p\n\t\t\tbreak ParsePackets\n\t\tcase *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature:\n\t\t\t// This message isn't encrypted.\n\t\t\tif len(symKeys) != 0 || len(pubKeys) != 0 {\n\t\t\t\treturn nil, errors.StructuralError(\"key material not followed by encrypted message\")\n\t\t\t}\n\t\t\tpackets.Unread(p)\n\t\t\treturn readSignedMessage(packets, nil, keyring)\n\t\t}\n\t}\n\n\tvar candidates []Key\n\tvar decrypted io.ReadCloser\n\n\t// Now that we have the list of encrypted keys we need to decrypt at\n\t// least one of them or, if we cannot, we need to call the prompt\n\t// function so that it can decrypt a key or give us a passphrase.\nFindKey:\n\tfor {\n\t\t// See if any of the keys already have a private key available\n\t\tcandidates = candidates[:0]\n\t\tcandidateFingerprints := make(map[string]bool)\n\n\t\tfor _, pk := range pubKeys {\n\t\t\tif pk.key.PrivateKey == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !pk.key.PrivateKey.Encrypted {\n\t\t\t\tif len(pk.encryptedKey.Key) == 0 {\n\t\t\t\t\tpk.encryptedKey.Decrypt(pk.key.PrivateKey, config)\n\t\t\t\t}\n\t\t\t\tif len(pk.encryptedKey.Key) == 0 {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tdecrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key)\n\t\t\t\tif err != nil && err != errors.ErrKeyIncorrect {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif decrypted != nil {\n\t\t\t\t\tmd.DecryptedWith = pk.key\n\t\t\t\t\tbreak FindKey\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfpr := string(pk.key.PublicKey.Fingerprint[:])\n\t\t\t\tif v := candidateFingerprints[fpr]; v {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tcandidates = append(candidates, pk.key)\n\t\t\t\tcandidateFingerprints[fpr] = true\n\t\t\t}\n\t\t}\n\n\t\tif len(candidates) == 0 && len(symKeys) == 0 {\n\t\t\treturn nil, errors.ErrKeyIncorrect\n\t\t}\n\n\t\tif prompt == nil {\n\t\t\treturn nil, errors.ErrKeyIncorrect\n\t\t}\n\n\t\tpassphrase, err := prompt(candidates, len(symKeys) != 0)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Try the symmetric passphrase first\n\t\tif len(symKeys) != 0 && passphrase != nil {\n\t\t\tfor _, s := range symKeys {\n\t\t\t\tkey, cipherFunc, err := s.Decrypt(passphrase)\n\t\t\t\tif err == nil {\n\t\t\t\t\tdecrypted, err = se.Decrypt(cipherFunc, key)\n\t\t\t\t\tif err != nil && err != errors.ErrKeyIncorrect {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tif decrypted != nil {\n\t\t\t\t\t\tbreak FindKey\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n\n\tmd.decrypted = decrypted\n\tif err := packets.Push(decrypted); err != nil {\n\t\treturn nil, err\n\t}\n\treturn readSignedMessage(packets, md, keyring)\n}\n\n// readSignedMessage reads a possibly signed message if mdin is non-zero then\n// that structure is updated and returned. Otherwise a fresh MessageDetails is\n// used.\nfunc readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) {\n\tif mdin == nil {\n\t\tmdin = new(MessageDetails)\n\t}\n\tmd = mdin\n\n\tvar p packet.Packet\n\tvar h hash.Hash\n\tvar wrappedHash hash.Hash\nFindLiteralData:\n\tfor {\n\t\tp, err = packets.Next()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch p := p.(type) {\n\t\tcase *packet.Compressed:\n\t\t\tif err := packets.Push(p.Body); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\tcase *packet.OnePassSignature:\n\t\t\tif !p.IsLast {\n\t\t\t\treturn nil, errors.UnsupportedError(\"nested signatures\")\n\t\t\t}\n\n\t\t\th, wrappedHash, err = hashForSignature(p.Hash, p.SigType)\n\t\t\tif err != nil {\n\t\t\t\tmd = nil\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tmd.IsSigned = true\n\t\t\tmd.SignedByKeyId = p.KeyId\n\t\t\tkeys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign)\n\t\t\tif len(keys) > 0 {\n\t\t\t\tmd.SignedBy = &keys[0]\n\t\t\t}\n\t\tcase *packet.LiteralData:\n\t\t\tmd.LiteralData = p\n\t\t\tbreak FindLiteralData\n\t\t}\n\t}\n\n\tif md.SignedBy != nil {\n\t\tmd.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md}\n\t} else if md.decrypted != nil {\n\t\tmd.UnverifiedBody = checkReader{md}\n\t} else {\n\t\tmd.UnverifiedBody = md.LiteralData.Body\n\t}\n\n\treturn md, nil\n}\n\n// hashForSignature returns a pair of hashes that can be used to verify a\n// signature. The signature may specify that the contents of the signed message\n// should be preprocessed (i.e. to normalize line endings). Thus this function\n// returns two hashes. The second should be used to hash the message itself and\n// performs any needed preprocessing.\nfunc hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) {\n\tif !hashId.Available() {\n\t\treturn nil, nil, errors.UnsupportedError(\"hash not available: \" + strconv.Itoa(int(hashId)))\n\t}\n\th := hashId.New()\n\n\tswitch sigType {\n\tcase packet.SigTypeBinary:\n\t\treturn h, h, nil\n\tcase packet.SigTypeText:\n\t\treturn h, NewCanonicalTextHash(h), nil\n\t}\n\n\treturn nil, nil, errors.UnsupportedError(\"unsupported signature type: \" + strconv.Itoa(int(sigType)))\n}\n\n// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF\n// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger\n// MDC checks.\ntype checkReader struct {\n\tmd *MessageDetails\n}\n\nfunc (cr checkReader) Read(buf []byte) (n int, err error) {\n\tn, err = cr.md.LiteralData.Body.Read(buf)\n\tif err == io.EOF {\n\t\tmdcErr := cr.md.decrypted.Close()\n\t\tif mdcErr != nil {\n\t\t\terr = mdcErr\n\t\t}\n\t}\n\treturn\n}\n\n// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes\n// the data as it is read. When it sees an EOF from the underlying io.Reader\n// it parses and checks a trailing Signature packet and triggers any MDC checks.\ntype signatureCheckReader struct {\n\tpackets        *packet.Reader\n\th, wrappedHash hash.Hash\n\tmd             *MessageDetails\n}\n\nfunc (scr *signatureCheckReader) Read(buf []byte) (n int, err error) {\n\tn, err = scr.md.LiteralData.Body.Read(buf)\n\tscr.wrappedHash.Write(buf[:n])\n\tif err == io.EOF {\n\t\tvar p packet.Packet\n\t\tp, scr.md.SignatureError = scr.packets.Next()\n\t\tif scr.md.SignatureError != nil {\n\t\t\treturn\n\t\t}\n\n\t\tvar ok bool\n\t\tif scr.md.Signature, ok = p.(*packet.Signature); ok {\n\t\t\tscr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature)\n\t\t} else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok {\n\t\t\tscr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3)\n\t\t} else {\n\t\t\tscr.md.SignatureError = errors.StructuralError(\"LiteralData not followed by Signature\")\n\t\t\treturn\n\t\t}\n\n\t\t// The SymmetricallyEncrypted packet, if any, might have an\n\t\t// unsigned hash of its own. In order to check this we need to\n\t\t// close that Reader.\n\t\tif scr.md.decrypted != nil {\n\t\t\tmdcErr := scr.md.decrypted.Close()\n\t\t\tif mdcErr != nil {\n\t\t\t\terr = mdcErr\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n// CheckDetachedSignature takes a signed file and a detached signature and\n// returns the signer if the signature is valid. If the signer isn't known,\n// ErrUnknownIssuer is returned.\nfunc CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) {\n\tvar issuerKeyId uint64\n\tvar hashFunc crypto.Hash\n\tvar sigType packet.SignatureType\n\tvar keys []Key\n\tvar p packet.Packet\n\n\tpackets := packet.NewReader(signature)\n\tfor {\n\t\tp, err = packets.Next()\n\t\tif err == io.EOF {\n\t\t\treturn nil, errors.ErrUnknownIssuer\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch sig := p.(type) {\n\t\tcase *packet.Signature:\n\t\t\tif sig.IssuerKeyId == nil {\n\t\t\t\treturn nil, errors.StructuralError(\"signature doesn't have an issuer\")\n\t\t\t}\n\t\t\tissuerKeyId = *sig.IssuerKeyId\n\t\t\thashFunc = sig.Hash\n\t\t\tsigType = sig.SigType\n\t\tcase *packet.SignatureV3:\n\t\t\tissuerKeyId = sig.IssuerKeyId\n\t\t\thashFunc = sig.Hash\n\t\t\tsigType = sig.SigType\n\t\tdefault:\n\t\t\treturn nil, errors.StructuralError(\"non signature packet found\")\n\t\t}\n\n\t\tkeys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign)\n\t\tif len(keys) > 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif len(keys) == 0 {\n\t\tpanic(\"unreachable\")\n\t}\n\n\th, wrappedHash, err := hashForSignature(hashFunc, sigType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF {\n\t\treturn nil, err\n\t}\n\n\tfor _, key := range keys {\n\t\tswitch sig := p.(type) {\n\t\tcase *packet.Signature:\n\t\t\terr = key.PublicKey.VerifySignature(h, sig)\n\t\tcase *packet.SignatureV3:\n\t\t\terr = key.PublicKey.VerifySignatureV3(h, sig)\n\t\tdefault:\n\t\t\tpanic(\"unreachable\")\n\t\t}\n\n\t\tif err == nil {\n\t\t\treturn key.Entity, nil\n\t\t}\n\t}\n\n\treturn nil, err\n}\n\n// CheckArmoredDetachedSignature performs the same actions as\n// CheckDetachedSignature but expects the signature to be armored.\nfunc CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) {\n\tbody, err := readArmored(signature, SignatureType)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn CheckDetachedSignature(keyring, signed, body)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/s2k/s2k.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package s2k implements the various OpenPGP string-to-key transforms as\n// specified in RFC 4800 section 3.7.1.\n//\n// Deprecated: this package is unmaintained except for security fixes. New\n// applications should consider a more focused, modern alternative to OpenPGP\n// for their specific task. If you are required to interoperate with OpenPGP\n// systems and need a maintained package, consider a community fork.\n// See https://golang.org/issue/44226.\npackage s2k\n\nimport (\n\t\"crypto\"\n\t\"hash\"\n\t\"io\"\n\t\"strconv\"\n\n\t\"golang.org/x/crypto/openpgp/errors\"\n)\n\n// Config collects configuration parameters for s2k key-stretching\n// transformatioms. A nil *Config is valid and results in all default\n// values. Currently, Config is used only by the Serialize function in\n// this package.\ntype Config struct {\n\t// Hash is the default hash function to be used. If\n\t// nil, SHA1 is used.\n\tHash crypto.Hash\n\t// S2KCount is only used for symmetric encryption. It\n\t// determines the strength of the passphrase stretching when\n\t// the said passphrase is hashed to produce a key. S2KCount\n\t// should be between 1024 and 65011712, inclusive. If Config\n\t// is nil or S2KCount is 0, the value 65536 used. Not all\n\t// values in the above range can be represented. S2KCount will\n\t// be rounded up to the next representable value if it cannot\n\t// be encoded exactly. When set, it is strongly encrouraged to\n\t// use a value that is at least 65536. See RFC 4880 Section\n\t// 3.7.1.3.\n\tS2KCount int\n}\n\nfunc (c *Config) hash() crypto.Hash {\n\tif c == nil || uint(c.Hash) == 0 {\n\t\t// SHA1 is the historical default in this package.\n\t\treturn crypto.SHA1\n\t}\n\n\treturn c.Hash\n}\n\nfunc (c *Config) encodedCount() uint8 {\n\tif c == nil || c.S2KCount == 0 {\n\t\treturn 96 // The common case. Corresponding to 65536\n\t}\n\n\ti := c.S2KCount\n\tswitch {\n\t// Behave like GPG. Should we make 65536 the lowest value used?\n\tcase i < 1024:\n\t\ti = 1024\n\tcase i > 65011712:\n\t\ti = 65011712\n\t}\n\n\treturn encodeCount(i)\n}\n\n// encodeCount converts an iterative \"count\" in the range 1024 to\n// 65011712, inclusive, to an encoded count. The return value is the\n// octet that is actually stored in the GPG file. encodeCount panics\n// if i is not in the above range (encodedCount above takes care to\n// pass i in the correct range). See RFC 4880 Section 3.7.7.1.\nfunc encodeCount(i int) uint8 {\n\tif i < 1024 || i > 65011712 {\n\t\tpanic(\"count arg i outside the required range\")\n\t}\n\n\tfor encoded := 0; encoded < 256; encoded++ {\n\t\tcount := decodeCount(uint8(encoded))\n\t\tif count >= i {\n\t\t\treturn uint8(encoded)\n\t\t}\n\t}\n\n\treturn 255\n}\n\n// decodeCount returns the s2k mode 3 iterative \"count\" corresponding to\n// the encoded octet c.\nfunc decodeCount(c uint8) int {\n\treturn (16 + int(c&15)) << (uint32(c>>4) + 6)\n}\n\n// Simple writes to out the result of computing the Simple S2K function (RFC\n// 4880, section 3.7.1.1) using the given hash and input passphrase.\nfunc Simple(out []byte, h hash.Hash, in []byte) {\n\tSalted(out, h, in, nil)\n}\n\nvar zero [1]byte\n\n// Salted writes to out the result of computing the Salted S2K function (RFC\n// 4880, section 3.7.1.2) using the given hash, input passphrase and salt.\nfunc Salted(out []byte, h hash.Hash, in []byte, salt []byte) {\n\tdone := 0\n\tvar digest []byte\n\n\tfor i := 0; done < len(out); i++ {\n\t\th.Reset()\n\t\tfor j := 0; j < i; j++ {\n\t\t\th.Write(zero[:])\n\t\t}\n\t\th.Write(salt)\n\t\th.Write(in)\n\t\tdigest = h.Sum(digest[:0])\n\t\tn := copy(out[done:], digest)\n\t\tdone += n\n\t}\n}\n\n// Iterated writes to out the result of computing the Iterated and Salted S2K\n// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase,\n// salt and iteration count.\nfunc Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) {\n\tcombined := make([]byte, len(in)+len(salt))\n\tcopy(combined, salt)\n\tcopy(combined[len(salt):], in)\n\n\tif count < len(combined) {\n\t\tcount = len(combined)\n\t}\n\n\tdone := 0\n\tvar digest []byte\n\tfor i := 0; done < len(out); i++ {\n\t\th.Reset()\n\t\tfor j := 0; j < i; j++ {\n\t\t\th.Write(zero[:])\n\t\t}\n\t\twritten := 0\n\t\tfor written < count {\n\t\t\tif written+len(combined) > count {\n\t\t\t\ttodo := count - written\n\t\t\t\th.Write(combined[:todo])\n\t\t\t\twritten = count\n\t\t\t} else {\n\t\t\t\th.Write(combined)\n\t\t\t\twritten += len(combined)\n\t\t\t}\n\t\t}\n\t\tdigest = h.Sum(digest[:0])\n\t\tn := copy(out[done:], digest)\n\t\tdone += n\n\t}\n}\n\n// Parse reads a binary specification for a string-to-key transformation from r\n// and returns a function which performs that transform.\nfunc Parse(r io.Reader) (f func(out, in []byte), err error) {\n\tvar buf [9]byte\n\n\t_, err = io.ReadFull(r, buf[:2])\n\tif err != nil {\n\t\treturn\n\t}\n\n\thash, ok := HashIdToHash(buf[1])\n\tif !ok {\n\t\treturn nil, errors.UnsupportedError(\"hash for S2K function: \" + strconv.Itoa(int(buf[1])))\n\t}\n\tif !hash.Available() {\n\t\treturn nil, errors.UnsupportedError(\"hash not available: \" + strconv.Itoa(int(hash)))\n\t}\n\th := hash.New()\n\n\tswitch buf[0] {\n\tcase 0:\n\t\tf := func(out, in []byte) {\n\t\t\tSimple(out, h, in)\n\t\t}\n\t\treturn f, nil\n\tcase 1:\n\t\t_, err = io.ReadFull(r, buf[:8])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tf := func(out, in []byte) {\n\t\t\tSalted(out, h, in, buf[:8])\n\t\t}\n\t\treturn f, nil\n\tcase 3:\n\t\t_, err = io.ReadFull(r, buf[:9])\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tcount := decodeCount(buf[8])\n\t\tf := func(out, in []byte) {\n\t\t\tIterated(out, h, in, buf[:8], count)\n\t\t}\n\t\treturn f, nil\n\t}\n\n\treturn nil, errors.UnsupportedError(\"S2K function\")\n}\n\n// Serialize salts and stretches the given passphrase and writes the\n// resulting key into key. It also serializes an S2K descriptor to\n// w. The key stretching can be configured with c, which may be\n// nil. In that case, sensible defaults will be used.\nfunc Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error {\n\tvar buf [11]byte\n\tbuf[0] = 3 /* iterated and salted */\n\tbuf[1], _ = HashToHashId(c.hash())\n\tsalt := buf[2:10]\n\tif _, err := io.ReadFull(rand, salt); err != nil {\n\t\treturn err\n\t}\n\tencodedCount := c.encodedCount()\n\tcount := decodeCount(encodedCount)\n\tbuf[10] = encodedCount\n\tif _, err := w.Write(buf[:]); err != nil {\n\t\treturn err\n\t}\n\n\tIterated(key, c.hash().New(), passphrase, salt, count)\n\treturn nil\n}\n\n// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with\n// Go's crypto.Hash type. See RFC 4880, section 9.4.\nvar hashToHashIdMapping = []struct {\n\tid   byte\n\thash crypto.Hash\n\tname string\n}{\n\t{1, crypto.MD5, \"MD5\"},\n\t{2, crypto.SHA1, \"SHA1\"},\n\t{3, crypto.RIPEMD160, \"RIPEMD160\"},\n\t{8, crypto.SHA256, \"SHA256\"},\n\t{9, crypto.SHA384, \"SHA384\"},\n\t{10, crypto.SHA512, \"SHA512\"},\n\t{11, crypto.SHA224, \"SHA224\"},\n}\n\n// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP\n// hash id.\nfunc HashIdToHash(id byte) (h crypto.Hash, ok bool) {\n\tfor _, m := range hashToHashIdMapping {\n\t\tif m.id == id {\n\t\t\treturn m.hash, true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// HashIdToString returns the name of the hash function corresponding to the\n// given OpenPGP hash id.\nfunc HashIdToString(id byte) (name string, ok bool) {\n\tfor _, m := range hashToHashIdMapping {\n\t\tif m.id == id {\n\t\t\treturn m.name, true\n\t\t}\n\t}\n\n\treturn \"\", false\n}\n\n// HashToHashId returns an OpenPGP hash id which corresponds the given Hash.\nfunc HashToHashId(h crypto.Hash) (id byte, ok bool) {\n\tfor _, m := range hashToHashIdMapping {\n\t\tif m.hash == h {\n\t\t\treturn m.id, true\n\t\t}\n\t}\n\treturn 0, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/openpgp/write.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage openpgp\n\nimport (\n\t\"crypto\"\n\t\"hash\"\n\t\"io\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"golang.org/x/crypto/openpgp/armor\"\n\t\"golang.org/x/crypto/openpgp/errors\"\n\t\"golang.org/x/crypto/openpgp/packet\"\n\t\"golang.org/x/crypto/openpgp/s2k\"\n)\n\n// DetachSign signs message with the private key from signer (which must\n// already have been decrypted) and writes the signature to w.\n// If config is nil, sensible defaults will be used.\nfunc DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {\n\treturn detachSign(w, signer, message, packet.SigTypeBinary, config)\n}\n\n// ArmoredDetachSign signs message with the private key from signer (which\n// must already have been decrypted) and writes an armored signature to w.\n// If config is nil, sensible defaults will be used.\nfunc ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) {\n\treturn armoredDetachSign(w, signer, message, packet.SigTypeBinary, config)\n}\n\n// DetachSignText signs message (after canonicalising the line endings) with\n// the private key from signer (which must already have been decrypted) and\n// writes the signature to w.\n// If config is nil, sensible defaults will be used.\nfunc DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {\n\treturn detachSign(w, signer, message, packet.SigTypeText, config)\n}\n\n// ArmoredDetachSignText signs message (after canonicalising the line endings)\n// with the private key from signer (which must already have been decrypted)\n// and writes an armored signature to w.\n// If config is nil, sensible defaults will be used.\nfunc ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {\n\treturn armoredDetachSign(w, signer, message, packet.SigTypeText, config)\n}\n\nfunc armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {\n\tout, err := armor.Encode(w, SignatureType, nil)\n\tif err != nil {\n\t\treturn\n\t}\n\terr = detachSign(out, signer, message, sigType, config)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn out.Close()\n}\n\nfunc detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {\n\tif signer.PrivateKey == nil {\n\t\treturn errors.InvalidArgumentError(\"signing key doesn't have a private key\")\n\t}\n\tif signer.PrivateKey.Encrypted {\n\t\treturn errors.InvalidArgumentError(\"signing key is encrypted\")\n\t}\n\n\tsig := new(packet.Signature)\n\tsig.SigType = sigType\n\tsig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo\n\tsig.Hash = config.Hash()\n\tsig.CreationTime = config.Now()\n\tsig.IssuerKeyId = &signer.PrivateKey.KeyId\n\n\th, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType)\n\tif err != nil {\n\t\treturn\n\t}\n\tio.Copy(wrappedHash, message)\n\n\terr = sig.Sign(h, signer.PrivateKey, config)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn sig.Serialize(w)\n}\n\n// FileHints contains metadata about encrypted files. This metadata is, itself,\n// encrypted.\ntype FileHints struct {\n\t// IsBinary can be set to hint that the contents are binary data.\n\tIsBinary bool\n\t// FileName hints at the name of the file that should be written. It's\n\t// truncated to 255 bytes if longer. It may be empty to suggest that the\n\t// file should not be written to disk. It may be equal to \"_CONSOLE\" to\n\t// suggest the data should not be written to disk.\n\tFileName string\n\t// ModTime contains the modification time of the file, or the zero time if not applicable.\n\tModTime time.Time\n}\n\n// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.\n// The resulting WriteCloser must be closed after the contents of the file have\n// been written.\n// If config is nil, sensible defaults will be used.\nfunc SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {\n\tif hints == nil {\n\t\thints = &FileHints{}\n\t}\n\n\tkey, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config)\n\tif err != nil {\n\t\treturn\n\t}\n\tw, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tliteraldata := w\n\tif algo := config.Compression(); algo != packet.CompressionNone {\n\t\tvar compConfig *packet.CompressionConfig\n\t\tif config != nil {\n\t\t\tcompConfig = config.CompressionConfig\n\t\t}\n\t\tliteraldata, err = packet.SerializeCompressed(w, algo, compConfig)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tvar epochSeconds uint32\n\tif !hints.ModTime.IsZero() {\n\t\tepochSeconds = uint32(hints.ModTime.Unix())\n\t}\n\treturn packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds)\n}\n\n// intersectPreferences mutates and returns a prefix of a that contains only\n// the values in the intersection of a and b. The order of a is preserved.\nfunc intersectPreferences(a []uint8, b []uint8) (intersection []uint8) {\n\tvar j int\n\tfor _, v := range a {\n\t\tfor _, v2 := range b {\n\t\t\tif v == v2 {\n\t\t\t\ta[j] = v\n\t\t\t\tj++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a[:j]\n}\n\nfunc hashToHashId(h crypto.Hash) uint8 {\n\tv, ok := s2k.HashToHashId(h)\n\tif !ok {\n\t\tpanic(\"tried to convert unknown hash\")\n\t}\n\treturn v\n}\n\n// writeAndSign writes the data as a payload package and, optionally, signs\n// it. hints contains optional information, that is also encrypted,\n// that aids the recipients in processing the message. The resulting\n// WriteCloser must be closed after the contents of the file have been\n// written. If config is nil, sensible defaults will be used.\nfunc writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {\n\tvar signer *packet.PrivateKey\n\tif signed != nil {\n\t\tsignKey, ok := signed.signingKey(config.Now())\n\t\tif !ok {\n\t\t\treturn nil, errors.InvalidArgumentError(\"no valid signing keys\")\n\t\t}\n\t\tsigner = signKey.PrivateKey\n\t\tif signer == nil {\n\t\t\treturn nil, errors.InvalidArgumentError(\"no private key in signing key\")\n\t\t}\n\t\tif signer.Encrypted {\n\t\t\treturn nil, errors.InvalidArgumentError(\"signing key must be decrypted\")\n\t\t}\n\t}\n\n\tvar hash crypto.Hash\n\tfor _, hashId := range candidateHashes {\n\t\tif h, ok := s2k.HashIdToHash(hashId); ok && h.Available() {\n\t\t\thash = h\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// If the hash specified by config is a candidate, we'll use that.\n\tif configuredHash := config.Hash(); configuredHash.Available() {\n\t\tfor _, hashId := range candidateHashes {\n\t\t\tif h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash {\n\t\t\t\thash = h\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif hash == 0 {\n\t\thashId := candidateHashes[0]\n\t\tname, ok := s2k.HashIdToString(hashId)\n\t\tif !ok {\n\t\t\tname = \"#\" + strconv.Itoa(int(hashId))\n\t\t}\n\t\treturn nil, errors.InvalidArgumentError(\"cannot encrypt because no candidate hash functions are compiled in. (Wanted \" + name + \" in this case.)\")\n\t}\n\n\tif signer != nil {\n\t\tops := &packet.OnePassSignature{\n\t\t\tSigType:    packet.SigTypeBinary,\n\t\t\tHash:       hash,\n\t\t\tPubKeyAlgo: signer.PubKeyAlgo,\n\t\t\tKeyId:      signer.KeyId,\n\t\t\tIsLast:     true,\n\t\t}\n\t\tif err := ops.Serialize(payload); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif hints == nil {\n\t\thints = &FileHints{}\n\t}\n\n\tw := payload\n\tif signer != nil {\n\t\t// If we need to write a signature packet after the literal\n\t\t// data then we need to stop literalData from closing\n\t\t// encryptedData.\n\t\tw = noOpCloser{w}\n\n\t}\n\tvar epochSeconds uint32\n\tif !hints.ModTime.IsZero() {\n\t\tepochSeconds = uint32(hints.ModTime.Unix())\n\t}\n\tliteralData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif signer != nil {\n\t\treturn signatureWriter{payload, literalData, hash, hash.New(), signer, config}, nil\n\t}\n\treturn literalData, nil\n}\n\n// Encrypt encrypts a message to a number of recipients and, optionally, signs\n// it. hints contains optional information, that is also encrypted, that aids\n// the recipients in processing the message. The resulting WriteCloser must\n// be closed after the contents of the file have been written.\n// If config is nil, sensible defaults will be used.\nfunc Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {\n\tif len(to) == 0 {\n\t\treturn nil, errors.InvalidArgumentError(\"no encryption recipient provided\")\n\t}\n\n\t// These are the possible ciphers that we'll use for the message.\n\tcandidateCiphers := []uint8{\n\t\tuint8(packet.CipherAES128),\n\t\tuint8(packet.CipherAES256),\n\t\tuint8(packet.CipherCAST5),\n\t}\n\t// These are the possible hash functions that we'll use for the signature.\n\tcandidateHashes := []uint8{\n\t\thashToHashId(crypto.SHA256),\n\t\thashToHashId(crypto.SHA384),\n\t\thashToHashId(crypto.SHA512),\n\t\thashToHashId(crypto.SHA1),\n\t\thashToHashId(crypto.RIPEMD160),\n\t}\n\t// In the event that a recipient doesn't specify any supported ciphers\n\t// or hash functions, these are the ones that we assume that every\n\t// implementation supports.\n\tdefaultCiphers := candidateCiphers[len(candidateCiphers)-1:]\n\tdefaultHashes := candidateHashes[len(candidateHashes)-1:]\n\n\tencryptKeys := make([]Key, len(to))\n\tfor i := range to {\n\t\tvar ok bool\n\t\tencryptKeys[i], ok = to[i].encryptionKey(config.Now())\n\t\tif !ok {\n\t\t\treturn nil, errors.InvalidArgumentError(\"cannot encrypt a message to key id \" + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + \" because it has no encryption keys\")\n\t\t}\n\n\t\tsig := to[i].primaryIdentity().SelfSignature\n\n\t\tpreferredSymmetric := sig.PreferredSymmetric\n\t\tif len(preferredSymmetric) == 0 {\n\t\t\tpreferredSymmetric = defaultCiphers\n\t\t}\n\t\tpreferredHashes := sig.PreferredHash\n\t\tif len(preferredHashes) == 0 {\n\t\t\tpreferredHashes = defaultHashes\n\t\t}\n\t\tcandidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric)\n\t\tcandidateHashes = intersectPreferences(candidateHashes, preferredHashes)\n\t}\n\n\tif len(candidateCiphers) == 0 || len(candidateHashes) == 0 {\n\t\treturn nil, errors.InvalidArgumentError(\"cannot encrypt because recipient set shares no common algorithms\")\n\t}\n\n\tcipher := packet.CipherFunction(candidateCiphers[0])\n\t// If the cipher specified by config is a candidate, we'll use that.\n\tconfiguredCipher := config.Cipher()\n\tfor _, c := range candidateCiphers {\n\t\tcipherFunc := packet.CipherFunction(c)\n\t\tif cipherFunc == configuredCipher {\n\t\t\tcipher = cipherFunc\n\t\t\tbreak\n\t\t}\n\t}\n\n\tsymKey := make([]byte, cipher.KeySize())\n\tif _, err := io.ReadFull(config.Random(), symKey); err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, key := range encryptKeys {\n\t\tif err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tpayload, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config)\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn writeAndSign(payload, candidateHashes, signed, hints, config)\n}\n\n// Sign signs a message. The resulting WriteCloser must be closed after the\n// contents of the file have been written.  hints contains optional information\n// that aids the recipients in processing the message.\n// If config is nil, sensible defaults will be used.\nfunc Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) {\n\tif signed == nil {\n\t\treturn nil, errors.InvalidArgumentError(\"no signer provided\")\n\t}\n\n\t// These are the possible hash functions that we'll use for the signature.\n\tcandidateHashes := []uint8{\n\t\thashToHashId(crypto.SHA256),\n\t\thashToHashId(crypto.SHA384),\n\t\thashToHashId(crypto.SHA512),\n\t\thashToHashId(crypto.SHA1),\n\t\thashToHashId(crypto.RIPEMD160),\n\t}\n\tdefaultHashes := candidateHashes[len(candidateHashes)-1:]\n\tpreferredHashes := signed.primaryIdentity().SelfSignature.PreferredHash\n\tif len(preferredHashes) == 0 {\n\t\tpreferredHashes = defaultHashes\n\t}\n\tcandidateHashes = intersectPreferences(candidateHashes, preferredHashes)\n\treturn writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, config)\n}\n\n// signatureWriter hashes the contents of a message while passing it along to\n// literalData. When closed, it closes literalData, writes a signature packet\n// to encryptedData and then also closes encryptedData.\ntype signatureWriter struct {\n\tencryptedData io.WriteCloser\n\tliteralData   io.WriteCloser\n\thashType      crypto.Hash\n\th             hash.Hash\n\tsigner        *packet.PrivateKey\n\tconfig        *packet.Config\n}\n\nfunc (s signatureWriter) Write(data []byte) (int, error) {\n\ts.h.Write(data)\n\treturn s.literalData.Write(data)\n}\n\nfunc (s signatureWriter) Close() error {\n\tsig := &packet.Signature{\n\t\tSigType:      packet.SigTypeBinary,\n\t\tPubKeyAlgo:   s.signer.PubKeyAlgo,\n\t\tHash:         s.hashType,\n\t\tCreationTime: s.config.Now(),\n\t\tIssuerKeyId:  &s.signer.KeyId,\n\t}\n\n\tif err := sig.Sign(s.h, s.signer, s.config); err != nil {\n\t\treturn err\n\t}\n\tif err := s.literalData.Close(); err != nil {\n\t\treturn err\n\t}\n\tif err := sig.Serialize(s.encryptedData); err != nil {\n\t\treturn err\n\t}\n\treturn s.encryptedData.Close()\n}\n\n// noOpCloser is like an io.NopCloser, but for an io.Writer.\n// TODO: we have two of these in OpenPGP packages alone. This probably needs\n// to be promoted somewhere more common.\ntype noOpCloser struct {\n\tw io.Writer\n}\n\nfunc (c noOpCloser) Write(data []byte) (n int, err error) {\n\treturn c.w.Write(data)\n}\n\nfunc (c noOpCloser) Close() error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage pbkdf2 implements the key derivation function PBKDF2 as defined in RFC\n2898 / PKCS #5 v2.0.\n\nA key derivation function is useful when encrypting data based on a password\nor any other not-fully-random data. It uses a pseudorandom function to derive\na secure encryption key based on the password.\n\nWhile v2.0 of the standard defines only one pseudorandom function to use,\nHMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved\nHash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To\nchoose, you can pass the `New` functions from the different SHA packages to\npbkdf2.Key.\n*/\npackage pbkdf2\n\nimport (\n\t\"crypto/hmac\"\n\t\"hash\"\n)\n\n// Key derives a key from the password, salt and iteration count, returning a\n// []byte of length keylen that can be used as cryptographic key. The key is\n// derived based on the method described as PBKDF2 with the HMAC variant using\n// the supplied hash function.\n//\n// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you\n// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by\n// doing:\n//\n//\tdk := pbkdf2.Key([]byte(\"some password\"), salt, 4096, 32, sha1.New)\n//\n// Remember to get a good random salt. At least 8 bytes is recommended by the\n// RFC.\n//\n// Using a higher iteration count will increase the cost of an exhaustive\n// search but will also make derivation proportionally slower.\nfunc Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte {\n\tprf := hmac.New(h, password)\n\thashLen := prf.Size()\n\tnumBlocks := (keyLen + hashLen - 1) / hashLen\n\n\tvar buf [4]byte\n\tdk := make([]byte, 0, numBlocks*hashLen)\n\tU := make([]byte, hashLen)\n\tfor block := 1; block <= numBlocks; block++ {\n\t\t// N.B.: || means concatenation, ^ means XOR\n\t\t// for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter\n\t\t// U_1 = PRF(password, salt || uint(i))\n\t\tprf.Reset()\n\t\tprf.Write(salt)\n\t\tbuf[0] = byte(block >> 24)\n\t\tbuf[1] = byte(block >> 16)\n\t\tbuf[2] = byte(block >> 8)\n\t\tbuf[3] = byte(block)\n\t\tprf.Write(buf[:4])\n\t\tdk = prf.Sum(dk)\n\t\tT := dk[len(dk)-hashLen:]\n\t\tcopy(U, T)\n\n\t\t// U_n = PRF(password, U_(n-1))\n\t\tfor n := 2; n <= iter; n++ {\n\t\t\tprf.Reset()\n\t\t\tprf.Write(U)\n\t\t\tU = U[:0]\n\t\t\tU = prf.Sum(U)\n\t\t\tfor x := range U {\n\t\t\t\tT[x] ^= U[x]\n\t\t\t}\n\t\t}\n\t}\n\treturn dk[:keyLen]\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package salsa provides low-level access to functions in the Salsa family.\n//\n// Deprecated: this package exposes unsafe low-level operations. New applications\n// should consider using the AEAD construction in golang.org/x/crypto/chacha20poly1305\n// instead. Existing users should migrate to golang.org/x/crypto/salsa20.\npackage salsa\n\nimport \"math/bits\"\n\n// Sigma is the Salsa20 constant for 256-bit keys.\nvar Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'}\n\n// HSalsa20 applies the HSalsa20 core function to a 16-byte input in, 32-byte\n// key k, and 16-byte constant c, and puts the result into the 32-byte array\n// out.\nfunc HSalsa20(out *[32]byte, in *[16]byte, k *[32]byte, c *[16]byte) {\n\tx0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24\n\tx1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24\n\tx2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24\n\tx3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24\n\tx4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24\n\tx5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24\n\tx6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24\n\tx7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24\n\tx8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24\n\tx9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24\n\tx10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24\n\tx11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24\n\tx12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24\n\tx13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24\n\tx14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24\n\tx15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24\n\n\tfor i := 0; i < 20; i += 2 {\n\t\tu := x0 + x12\n\t\tx4 ^= bits.RotateLeft32(u, 7)\n\t\tu = x4 + x0\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x4\n\t\tx12 ^= bits.RotateLeft32(u, 13)\n\t\tu = x12 + x8\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x1\n\t\tx9 ^= bits.RotateLeft32(u, 7)\n\t\tu = x9 + x5\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x9\n\t\tx1 ^= bits.RotateLeft32(u, 13)\n\t\tu = x1 + x13\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x6\n\t\tx14 ^= bits.RotateLeft32(u, 7)\n\t\tu = x14 + x10\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x14\n\t\tx6 ^= bits.RotateLeft32(u, 13)\n\t\tu = x6 + x2\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x11\n\t\tx3 ^= bits.RotateLeft32(u, 7)\n\t\tu = x3 + x15\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x3\n\t\tx11 ^= bits.RotateLeft32(u, 13)\n\t\tu = x11 + x7\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x0 + x3\n\t\tx1 ^= bits.RotateLeft32(u, 7)\n\t\tu = x1 + x0\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x1\n\t\tx3 ^= bits.RotateLeft32(u, 13)\n\t\tu = x3 + x2\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x4\n\t\tx6 ^= bits.RotateLeft32(u, 7)\n\t\tu = x6 + x5\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x6\n\t\tx4 ^= bits.RotateLeft32(u, 13)\n\t\tu = x4 + x7\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x9\n\t\tx11 ^= bits.RotateLeft32(u, 7)\n\t\tu = x11 + x10\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x11\n\t\tx9 ^= bits.RotateLeft32(u, 13)\n\t\tu = x9 + x8\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x14\n\t\tx12 ^= bits.RotateLeft32(u, 7)\n\t\tu = x12 + x15\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x12\n\t\tx14 ^= bits.RotateLeft32(u, 13)\n\t\tu = x14 + x13\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\t}\n\tout[0] = byte(x0)\n\tout[1] = byte(x0 >> 8)\n\tout[2] = byte(x0 >> 16)\n\tout[3] = byte(x0 >> 24)\n\n\tout[4] = byte(x5)\n\tout[5] = byte(x5 >> 8)\n\tout[6] = byte(x5 >> 16)\n\tout[7] = byte(x5 >> 24)\n\n\tout[8] = byte(x10)\n\tout[9] = byte(x10 >> 8)\n\tout[10] = byte(x10 >> 16)\n\tout[11] = byte(x10 >> 24)\n\n\tout[12] = byte(x15)\n\tout[13] = byte(x15 >> 8)\n\tout[14] = byte(x15 >> 16)\n\tout[15] = byte(x15 >> 24)\n\n\tout[16] = byte(x6)\n\tout[17] = byte(x6 >> 8)\n\tout[18] = byte(x6 >> 16)\n\tout[19] = byte(x6 >> 24)\n\n\tout[20] = byte(x7)\n\tout[21] = byte(x7 >> 8)\n\tout[22] = byte(x7 >> 16)\n\tout[23] = byte(x7 >> 24)\n\n\tout[24] = byte(x8)\n\tout[25] = byte(x8 >> 8)\n\tout[26] = byte(x8 >> 16)\n\tout[27] = byte(x8 >> 24)\n\n\tout[28] = byte(x9)\n\tout[29] = byte(x9 >> 8)\n\tout[30] = byte(x9 >> 16)\n\tout[31] = byte(x9 >> 24)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage salsa\n\nimport \"math/bits\"\n\n// Core208 applies the Salsa20/8 core function to the 64-byte array in and puts\n// the result into the 64-byte array out. The input and output may be the same array.\nfunc Core208(out *[64]byte, in *[64]byte) {\n\tj0 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24\n\tj1 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24\n\tj2 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24\n\tj3 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24\n\tj4 := uint32(in[16]) | uint32(in[17])<<8 | uint32(in[18])<<16 | uint32(in[19])<<24\n\tj5 := uint32(in[20]) | uint32(in[21])<<8 | uint32(in[22])<<16 | uint32(in[23])<<24\n\tj6 := uint32(in[24]) | uint32(in[25])<<8 | uint32(in[26])<<16 | uint32(in[27])<<24\n\tj7 := uint32(in[28]) | uint32(in[29])<<8 | uint32(in[30])<<16 | uint32(in[31])<<24\n\tj8 := uint32(in[32]) | uint32(in[33])<<8 | uint32(in[34])<<16 | uint32(in[35])<<24\n\tj9 := uint32(in[36]) | uint32(in[37])<<8 | uint32(in[38])<<16 | uint32(in[39])<<24\n\tj10 := uint32(in[40]) | uint32(in[41])<<8 | uint32(in[42])<<16 | uint32(in[43])<<24\n\tj11 := uint32(in[44]) | uint32(in[45])<<8 | uint32(in[46])<<16 | uint32(in[47])<<24\n\tj12 := uint32(in[48]) | uint32(in[49])<<8 | uint32(in[50])<<16 | uint32(in[51])<<24\n\tj13 := uint32(in[52]) | uint32(in[53])<<8 | uint32(in[54])<<16 | uint32(in[55])<<24\n\tj14 := uint32(in[56]) | uint32(in[57])<<8 | uint32(in[58])<<16 | uint32(in[59])<<24\n\tj15 := uint32(in[60]) | uint32(in[61])<<8 | uint32(in[62])<<16 | uint32(in[63])<<24\n\n\tx0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8\n\tx9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15\n\n\tfor i := 0; i < 8; i += 2 {\n\t\tu := x0 + x12\n\t\tx4 ^= bits.RotateLeft32(u, 7)\n\t\tu = x4 + x0\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x4\n\t\tx12 ^= bits.RotateLeft32(u, 13)\n\t\tu = x12 + x8\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x1\n\t\tx9 ^= bits.RotateLeft32(u, 7)\n\t\tu = x9 + x5\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x9\n\t\tx1 ^= bits.RotateLeft32(u, 13)\n\t\tu = x1 + x13\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x6\n\t\tx14 ^= bits.RotateLeft32(u, 7)\n\t\tu = x14 + x10\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x14\n\t\tx6 ^= bits.RotateLeft32(u, 13)\n\t\tu = x6 + x2\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x11\n\t\tx3 ^= bits.RotateLeft32(u, 7)\n\t\tu = x3 + x15\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x3\n\t\tx11 ^= bits.RotateLeft32(u, 13)\n\t\tu = x11 + x7\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x0 + x3\n\t\tx1 ^= bits.RotateLeft32(u, 7)\n\t\tu = x1 + x0\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x1\n\t\tx3 ^= bits.RotateLeft32(u, 13)\n\t\tu = x3 + x2\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x4\n\t\tx6 ^= bits.RotateLeft32(u, 7)\n\t\tu = x6 + x5\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x6\n\t\tx4 ^= bits.RotateLeft32(u, 13)\n\t\tu = x4 + x7\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x9\n\t\tx11 ^= bits.RotateLeft32(u, 7)\n\t\tu = x11 + x10\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x11\n\t\tx9 ^= bits.RotateLeft32(u, 13)\n\t\tu = x9 + x8\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x14\n\t\tx12 ^= bits.RotateLeft32(u, 7)\n\t\tu = x12 + x15\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x12\n\t\tx14 ^= bits.RotateLeft32(u, 13)\n\t\tu = x14 + x13\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\t}\n\tx0 += j0\n\tx1 += j1\n\tx2 += j2\n\tx3 += j3\n\tx4 += j4\n\tx5 += j5\n\tx6 += j6\n\tx7 += j7\n\tx8 += j8\n\tx9 += j9\n\tx10 += j10\n\tx11 += j11\n\tx12 += j12\n\tx13 += j13\n\tx14 += j14\n\tx15 += j15\n\n\tout[0] = byte(x0)\n\tout[1] = byte(x0 >> 8)\n\tout[2] = byte(x0 >> 16)\n\tout[3] = byte(x0 >> 24)\n\n\tout[4] = byte(x1)\n\tout[5] = byte(x1 >> 8)\n\tout[6] = byte(x1 >> 16)\n\tout[7] = byte(x1 >> 24)\n\n\tout[8] = byte(x2)\n\tout[9] = byte(x2 >> 8)\n\tout[10] = byte(x2 >> 16)\n\tout[11] = byte(x2 >> 24)\n\n\tout[12] = byte(x3)\n\tout[13] = byte(x3 >> 8)\n\tout[14] = byte(x3 >> 16)\n\tout[15] = byte(x3 >> 24)\n\n\tout[16] = byte(x4)\n\tout[17] = byte(x4 >> 8)\n\tout[18] = byte(x4 >> 16)\n\tout[19] = byte(x4 >> 24)\n\n\tout[20] = byte(x5)\n\tout[21] = byte(x5 >> 8)\n\tout[22] = byte(x5 >> 16)\n\tout[23] = byte(x5 >> 24)\n\n\tout[24] = byte(x6)\n\tout[25] = byte(x6 >> 8)\n\tout[26] = byte(x6 >> 16)\n\tout[27] = byte(x6 >> 24)\n\n\tout[28] = byte(x7)\n\tout[29] = byte(x7 >> 8)\n\tout[30] = byte(x7 >> 16)\n\tout[31] = byte(x7 >> 24)\n\n\tout[32] = byte(x8)\n\tout[33] = byte(x8 >> 8)\n\tout[34] = byte(x8 >> 16)\n\tout[35] = byte(x8 >> 24)\n\n\tout[36] = byte(x9)\n\tout[37] = byte(x9 >> 8)\n\tout[38] = byte(x9 >> 16)\n\tout[39] = byte(x9 >> 24)\n\n\tout[40] = byte(x10)\n\tout[41] = byte(x10 >> 8)\n\tout[42] = byte(x10 >> 16)\n\tout[43] = byte(x10 >> 24)\n\n\tout[44] = byte(x11)\n\tout[45] = byte(x11 >> 8)\n\tout[46] = byte(x11 >> 16)\n\tout[47] = byte(x11 >> 24)\n\n\tout[48] = byte(x12)\n\tout[49] = byte(x12 >> 8)\n\tout[50] = byte(x12 >> 16)\n\tout[51] = byte(x12 >> 24)\n\n\tout[52] = byte(x13)\n\tout[53] = byte(x13 >> 8)\n\tout[54] = byte(x13 >> 16)\n\tout[55] = byte(x13 >> 24)\n\n\tout[56] = byte(x14)\n\tout[57] = byte(x14 >> 8)\n\tout[58] = byte(x14 >> 16)\n\tout[59] = byte(x14 >> 24)\n\n\tout[60] = byte(x15)\n\tout[61] = byte(x15 >> 8)\n\tout[62] = byte(x15 >> 16)\n\tout[63] = byte(x15 >> 24)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && !purego && gc\n\npackage salsa\n\n//go:noescape\n\n// salsa2020XORKeyStream is implemented in salsa20_amd64.s.\nfunc salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)\n\n// XORKeyStream crypts bytes from in to out using the given key and counters.\n// In and out must overlap entirely or not at all. Counter\n// contains the raw salsa20 counter bytes (both nonce and block counter).\nfunc XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {\n\tif len(in) == 0 {\n\t\treturn\n\t}\n\t_ = out[len(in)-1]\n\tsalsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0])\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s",
    "content": "// Code generated by command: go run salsa20_amd64_asm.go -out ../salsa20_amd64.s -pkg salsa. DO NOT EDIT.\n\n//go:build amd64 && !purego && gc\n\n// func salsa2020XORKeyStream(out *byte, in *byte, n uint64, nonce *byte, key *byte)\n// Requires: SSE2\nTEXT ·salsa2020XORKeyStream(SB), $456-40\n\t// This needs up to 64 bytes at 360(R12); hence the non-obvious frame size.\n\tMOVQ   out+0(FP), DI\n\tMOVQ   in+8(FP), SI\n\tMOVQ   n+16(FP), DX\n\tMOVQ   nonce+24(FP), CX\n\tMOVQ   key+32(FP), R8\n\tMOVQ   SP, R12\n\tADDQ   $0x1f, R12\n\tANDQ   $-32, R12\n\tMOVQ   DX, R9\n\tMOVQ   CX, DX\n\tMOVQ   R8, R10\n\tCMPQ   R9, $0x00\n\tJBE    DONE\n\tMOVL   20(R10), CX\n\tMOVL   (R10), R8\n\tMOVL   (DX), AX\n\tMOVL   16(R10), R11\n\tMOVL   CX, (R12)\n\tMOVL   R8, 4(R12)\n\tMOVL   AX, 8(R12)\n\tMOVL   R11, 12(R12)\n\tMOVL   8(DX), CX\n\tMOVL   24(R10), R8\n\tMOVL   4(R10), AX\n\tMOVL   4(DX), R11\n\tMOVL   CX, 16(R12)\n\tMOVL   R8, 20(R12)\n\tMOVL   AX, 24(R12)\n\tMOVL   R11, 28(R12)\n\tMOVL   12(DX), CX\n\tMOVL   12(R10), DX\n\tMOVL   28(R10), R8\n\tMOVL   8(R10), AX\n\tMOVL   DX, 32(R12)\n\tMOVL   CX, 36(R12)\n\tMOVL   R8, 40(R12)\n\tMOVL   AX, 44(R12)\n\tMOVQ   $0x61707865, DX\n\tMOVQ   $0x3320646e, CX\n\tMOVQ   $0x79622d32, R8\n\tMOVQ   $0x6b206574, AX\n\tMOVL   DX, 48(R12)\n\tMOVL   CX, 52(R12)\n\tMOVL   R8, 56(R12)\n\tMOVL   AX, 60(R12)\n\tCMPQ   R9, $0x00000100\n\tJB     BYTESBETWEEN1AND255\n\tMOVOA  48(R12), X0\n\tPSHUFL $0x55, X0, X1\n\tPSHUFL $0xaa, X0, X2\n\tPSHUFL $0xff, X0, X3\n\tPSHUFL $0x00, X0, X0\n\tMOVOA  X1, 64(R12)\n\tMOVOA  X2, 80(R12)\n\tMOVOA  X3, 96(R12)\n\tMOVOA  X0, 112(R12)\n\tMOVOA  (R12), X0\n\tPSHUFL $0xaa, X0, X1\n\tPSHUFL $0xff, X0, X2\n\tPSHUFL $0x00, X0, X3\n\tPSHUFL $0x55, X0, X0\n\tMOVOA  X1, 128(R12)\n\tMOVOA  X2, 144(R12)\n\tMOVOA  X3, 160(R12)\n\tMOVOA  X0, 176(R12)\n\tMOVOA  16(R12), X0\n\tPSHUFL $0xff, X0, X1\n\tPSHUFL $0x55, X0, X2\n\tPSHUFL $0xaa, X0, X0\n\tMOVOA  X1, 192(R12)\n\tMOVOA  X2, 208(R12)\n\tMOVOA  X0, 224(R12)\n\tMOVOA  32(R12), X0\n\tPSHUFL $0x00, X0, X1\n\tPSHUFL $0xaa, X0, X2\n\tPSHUFL $0xff, X0, X0\n\tMOVOA  X1, 240(R12)\n\tMOVOA  X2, 256(R12)\n\tMOVOA  X0, 272(R12)\n\nBYTESATLEAST256:\n\tMOVL  16(R12), DX\n\tMOVL  36(R12), CX\n\tMOVL  DX, 288(R12)\n\tMOVL  CX, 304(R12)\n\tSHLQ  $0x20, CX\n\tADDQ  CX, DX\n\tADDQ  $0x01, DX\n\tMOVQ  DX, CX\n\tSHRQ  $0x20, CX\n\tMOVL  DX, 292(R12)\n\tMOVL  CX, 308(R12)\n\tADDQ  $0x01, DX\n\tMOVQ  DX, CX\n\tSHRQ  $0x20, CX\n\tMOVL  DX, 296(R12)\n\tMOVL  CX, 312(R12)\n\tADDQ  $0x01, DX\n\tMOVQ  DX, CX\n\tSHRQ  $0x20, CX\n\tMOVL  DX, 300(R12)\n\tMOVL  CX, 316(R12)\n\tADDQ  $0x01, DX\n\tMOVQ  DX, CX\n\tSHRQ  $0x20, CX\n\tMOVL  DX, 16(R12)\n\tMOVL  CX, 36(R12)\n\tMOVQ  R9, 352(R12)\n\tMOVQ  $0x00000014, DX\n\tMOVOA 64(R12), X0\n\tMOVOA 80(R12), X1\n\tMOVOA 96(R12), X2\n\tMOVOA 256(R12), X3\n\tMOVOA 272(R12), X4\n\tMOVOA 128(R12), X5\n\tMOVOA 144(R12), X6\n\tMOVOA 176(R12), X7\n\tMOVOA 192(R12), X8\n\tMOVOA 208(R12), X9\n\tMOVOA 224(R12), X10\n\tMOVOA 304(R12), X11\n\tMOVOA 112(R12), X12\n\tMOVOA 160(R12), X13\n\tMOVOA 240(R12), X14\n\tMOVOA 288(R12), X15\n\nMAINLOOP1:\n\tMOVOA  X1, 320(R12)\n\tMOVOA  X2, 336(R12)\n\tMOVOA  X13, X1\n\tPADDL  X12, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x07, X1\n\tPXOR   X1, X14\n\tPSRLL  $0x19, X2\n\tPXOR   X2, X14\n\tMOVOA  X7, X1\n\tPADDL  X0, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x07, X1\n\tPXOR   X1, X11\n\tPSRLL  $0x19, X2\n\tPXOR   X2, X11\n\tMOVOA  X12, X1\n\tPADDL  X14, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x09, X1\n\tPXOR   X1, X15\n\tPSRLL  $0x17, X2\n\tPXOR   X2, X15\n\tMOVOA  X0, X1\n\tPADDL  X11, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x09, X1\n\tPXOR   X1, X9\n\tPSRLL  $0x17, X2\n\tPXOR   X2, X9\n\tMOVOA  X14, X1\n\tPADDL  X15, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x0d, X1\n\tPXOR   X1, X13\n\tPSRLL  $0x13, X2\n\tPXOR   X2, X13\n\tMOVOA  X11, X1\n\tPADDL  X9, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x0d, X1\n\tPXOR   X1, X7\n\tPSRLL  $0x13, X2\n\tPXOR   X2, X7\n\tMOVOA  X15, X1\n\tPADDL  X13, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x12, X1\n\tPXOR   X1, X12\n\tPSRLL  $0x0e, X2\n\tPXOR   X2, X12\n\tMOVOA  320(R12), X1\n\tMOVOA  X12, 320(R12)\n\tMOVOA  X9, X2\n\tPADDL  X7, X2\n\tMOVOA  X2, X12\n\tPSLLL  $0x12, X2\n\tPXOR   X2, X0\n\tPSRLL  $0x0e, X12\n\tPXOR   X12, X0\n\tMOVOA  X5, X2\n\tPADDL  X1, X2\n\tMOVOA  X2, X12\n\tPSLLL  $0x07, X2\n\tPXOR   X2, X3\n\tPSRLL  $0x19, X12\n\tPXOR   X12, X3\n\tMOVOA  336(R12), X2\n\tMOVOA  X0, 336(R12)\n\tMOVOA  X6, X0\n\tPADDL  X2, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x07, X0\n\tPXOR   X0, X4\n\tPSRLL  $0x19, X12\n\tPXOR   X12, X4\n\tMOVOA  X1, X0\n\tPADDL  X3, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x09, X0\n\tPXOR   X0, X10\n\tPSRLL  $0x17, X12\n\tPXOR   X12, X10\n\tMOVOA  X2, X0\n\tPADDL  X4, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x09, X0\n\tPXOR   X0, X8\n\tPSRLL  $0x17, X12\n\tPXOR   X12, X8\n\tMOVOA  X3, X0\n\tPADDL  X10, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x0d, X0\n\tPXOR   X0, X5\n\tPSRLL  $0x13, X12\n\tPXOR   X12, X5\n\tMOVOA  X4, X0\n\tPADDL  X8, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x0d, X0\n\tPXOR   X0, X6\n\tPSRLL  $0x13, X12\n\tPXOR   X12, X6\n\tMOVOA  X10, X0\n\tPADDL  X5, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x12, X0\n\tPXOR   X0, X1\n\tPSRLL  $0x0e, X12\n\tPXOR   X12, X1\n\tMOVOA  320(R12), X0\n\tMOVOA  X1, 320(R12)\n\tMOVOA  X4, X1\n\tPADDL  X0, X1\n\tMOVOA  X1, X12\n\tPSLLL  $0x07, X1\n\tPXOR   X1, X7\n\tPSRLL  $0x19, X12\n\tPXOR   X12, X7\n\tMOVOA  X8, X1\n\tPADDL  X6, X1\n\tMOVOA  X1, X12\n\tPSLLL  $0x12, X1\n\tPXOR   X1, X2\n\tPSRLL  $0x0e, X12\n\tPXOR   X12, X2\n\tMOVOA  336(R12), X12\n\tMOVOA  X2, 336(R12)\n\tMOVOA  X14, X1\n\tPADDL  X12, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x07, X1\n\tPXOR   X1, X5\n\tPSRLL  $0x19, X2\n\tPXOR   X2, X5\n\tMOVOA  X0, X1\n\tPADDL  X7, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x09, X1\n\tPXOR   X1, X10\n\tPSRLL  $0x17, X2\n\tPXOR   X2, X10\n\tMOVOA  X12, X1\n\tPADDL  X5, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x09, X1\n\tPXOR   X1, X8\n\tPSRLL  $0x17, X2\n\tPXOR   X2, X8\n\tMOVOA  X7, X1\n\tPADDL  X10, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x0d, X1\n\tPXOR   X1, X4\n\tPSRLL  $0x13, X2\n\tPXOR   X2, X4\n\tMOVOA  X5, X1\n\tPADDL  X8, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x0d, X1\n\tPXOR   X1, X14\n\tPSRLL  $0x13, X2\n\tPXOR   X2, X14\n\tMOVOA  X10, X1\n\tPADDL  X4, X1\n\tMOVOA  X1, X2\n\tPSLLL  $0x12, X1\n\tPXOR   X1, X0\n\tPSRLL  $0x0e, X2\n\tPXOR   X2, X0\n\tMOVOA  320(R12), X1\n\tMOVOA  X0, 320(R12)\n\tMOVOA  X8, X0\n\tPADDL  X14, X0\n\tMOVOA  X0, X2\n\tPSLLL  $0x12, X0\n\tPXOR   X0, X12\n\tPSRLL  $0x0e, X2\n\tPXOR   X2, X12\n\tMOVOA  X11, X0\n\tPADDL  X1, X0\n\tMOVOA  X0, X2\n\tPSLLL  $0x07, X0\n\tPXOR   X0, X6\n\tPSRLL  $0x19, X2\n\tPXOR   X2, X6\n\tMOVOA  336(R12), X2\n\tMOVOA  X12, 336(R12)\n\tMOVOA  X3, X0\n\tPADDL  X2, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x07, X0\n\tPXOR   X0, X13\n\tPSRLL  $0x19, X12\n\tPXOR   X12, X13\n\tMOVOA  X1, X0\n\tPADDL  X6, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x09, X0\n\tPXOR   X0, X15\n\tPSRLL  $0x17, X12\n\tPXOR   X12, X15\n\tMOVOA  X2, X0\n\tPADDL  X13, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x09, X0\n\tPXOR   X0, X9\n\tPSRLL  $0x17, X12\n\tPXOR   X12, X9\n\tMOVOA  X6, X0\n\tPADDL  X15, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x0d, X0\n\tPXOR   X0, X11\n\tPSRLL  $0x13, X12\n\tPXOR   X12, X11\n\tMOVOA  X13, X0\n\tPADDL  X9, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x0d, X0\n\tPXOR   X0, X3\n\tPSRLL  $0x13, X12\n\tPXOR   X12, X3\n\tMOVOA  X15, X0\n\tPADDL  X11, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x12, X0\n\tPXOR   X0, X1\n\tPSRLL  $0x0e, X12\n\tPXOR   X12, X1\n\tMOVOA  X9, X0\n\tPADDL  X3, X0\n\tMOVOA  X0, X12\n\tPSLLL  $0x12, X0\n\tPXOR   X0, X2\n\tPSRLL  $0x0e, X12\n\tPXOR   X12, X2\n\tMOVOA  320(R12), X12\n\tMOVOA  336(R12), X0\n\tSUBQ   $0x02, DX\n\tJA     MAINLOOP1\n\tPADDL  112(R12), X12\n\tPADDL  176(R12), X7\n\tPADDL  224(R12), X10\n\tPADDL  272(R12), X4\n\tMOVD   X12, DX\n\tMOVD   X7, CX\n\tMOVD   X10, R8\n\tMOVD   X4, R9\n\tPSHUFL $0x39, X12, X12\n\tPSHUFL $0x39, X7, X7\n\tPSHUFL $0x39, X10, X10\n\tPSHUFL $0x39, X4, X4\n\tXORL   (SI), DX\n\tXORL   4(SI), CX\n\tXORL   8(SI), R8\n\tXORL   12(SI), R9\n\tMOVL   DX, (DI)\n\tMOVL   CX, 4(DI)\n\tMOVL   R8, 8(DI)\n\tMOVL   R9, 12(DI)\n\tMOVD   X12, DX\n\tMOVD   X7, CX\n\tMOVD   X10, R8\n\tMOVD   X4, R9\n\tPSHUFL $0x39, X12, X12\n\tPSHUFL $0x39, X7, X7\n\tPSHUFL $0x39, X10, X10\n\tPSHUFL $0x39, X4, X4\n\tXORL   64(SI), DX\n\tXORL   68(SI), CX\n\tXORL   72(SI), R8\n\tXORL   76(SI), R9\n\tMOVL   DX, 64(DI)\n\tMOVL   CX, 68(DI)\n\tMOVL   R8, 72(DI)\n\tMOVL   R9, 76(DI)\n\tMOVD   X12, DX\n\tMOVD   X7, CX\n\tMOVD   X10, R8\n\tMOVD   X4, R9\n\tPSHUFL $0x39, X12, X12\n\tPSHUFL $0x39, X7, X7\n\tPSHUFL $0x39, X10, X10\n\tPSHUFL $0x39, X4, X4\n\tXORL   128(SI), DX\n\tXORL   132(SI), CX\n\tXORL   136(SI), R8\n\tXORL   140(SI), R9\n\tMOVL   DX, 128(DI)\n\tMOVL   CX, 132(DI)\n\tMOVL   R8, 136(DI)\n\tMOVL   R9, 140(DI)\n\tMOVD   X12, DX\n\tMOVD   X7, CX\n\tMOVD   X10, R8\n\tMOVD   X4, R9\n\tXORL   192(SI), DX\n\tXORL   196(SI), CX\n\tXORL   200(SI), R8\n\tXORL   204(SI), R9\n\tMOVL   DX, 192(DI)\n\tMOVL   CX, 196(DI)\n\tMOVL   R8, 200(DI)\n\tMOVL   R9, 204(DI)\n\tPADDL  240(R12), X14\n\tPADDL  64(R12), X0\n\tPADDL  128(R12), X5\n\tPADDL  192(R12), X8\n\tMOVD   X14, DX\n\tMOVD   X0, CX\n\tMOVD   X5, R8\n\tMOVD   X8, R9\n\tPSHUFL $0x39, X14, X14\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X5, X5\n\tPSHUFL $0x39, X8, X8\n\tXORL   16(SI), DX\n\tXORL   20(SI), CX\n\tXORL   24(SI), R8\n\tXORL   28(SI), R9\n\tMOVL   DX, 16(DI)\n\tMOVL   CX, 20(DI)\n\tMOVL   R8, 24(DI)\n\tMOVL   R9, 28(DI)\n\tMOVD   X14, DX\n\tMOVD   X0, CX\n\tMOVD   X5, R8\n\tMOVD   X8, R9\n\tPSHUFL $0x39, X14, X14\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X5, X5\n\tPSHUFL $0x39, X8, X8\n\tXORL   80(SI), DX\n\tXORL   84(SI), CX\n\tXORL   88(SI), R8\n\tXORL   92(SI), R9\n\tMOVL   DX, 80(DI)\n\tMOVL   CX, 84(DI)\n\tMOVL   R8, 88(DI)\n\tMOVL   R9, 92(DI)\n\tMOVD   X14, DX\n\tMOVD   X0, CX\n\tMOVD   X5, R8\n\tMOVD   X8, R9\n\tPSHUFL $0x39, X14, X14\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X5, X5\n\tPSHUFL $0x39, X8, X8\n\tXORL   144(SI), DX\n\tXORL   148(SI), CX\n\tXORL   152(SI), R8\n\tXORL   156(SI), R9\n\tMOVL   DX, 144(DI)\n\tMOVL   CX, 148(DI)\n\tMOVL   R8, 152(DI)\n\tMOVL   R9, 156(DI)\n\tMOVD   X14, DX\n\tMOVD   X0, CX\n\tMOVD   X5, R8\n\tMOVD   X8, R9\n\tXORL   208(SI), DX\n\tXORL   212(SI), CX\n\tXORL   216(SI), R8\n\tXORL   220(SI), R9\n\tMOVL   DX, 208(DI)\n\tMOVL   CX, 212(DI)\n\tMOVL   R8, 216(DI)\n\tMOVL   R9, 220(DI)\n\tPADDL  288(R12), X15\n\tPADDL  304(R12), X11\n\tPADDL  80(R12), X1\n\tPADDL  144(R12), X6\n\tMOVD   X15, DX\n\tMOVD   X11, CX\n\tMOVD   X1, R8\n\tMOVD   X6, R9\n\tPSHUFL $0x39, X15, X15\n\tPSHUFL $0x39, X11, X11\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X6, X6\n\tXORL   32(SI), DX\n\tXORL   36(SI), CX\n\tXORL   40(SI), R8\n\tXORL   44(SI), R9\n\tMOVL   DX, 32(DI)\n\tMOVL   CX, 36(DI)\n\tMOVL   R8, 40(DI)\n\tMOVL   R9, 44(DI)\n\tMOVD   X15, DX\n\tMOVD   X11, CX\n\tMOVD   X1, R8\n\tMOVD   X6, R9\n\tPSHUFL $0x39, X15, X15\n\tPSHUFL $0x39, X11, X11\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X6, X6\n\tXORL   96(SI), DX\n\tXORL   100(SI), CX\n\tXORL   104(SI), R8\n\tXORL   108(SI), R9\n\tMOVL   DX, 96(DI)\n\tMOVL   CX, 100(DI)\n\tMOVL   R8, 104(DI)\n\tMOVL   R9, 108(DI)\n\tMOVD   X15, DX\n\tMOVD   X11, CX\n\tMOVD   X1, R8\n\tMOVD   X6, R9\n\tPSHUFL $0x39, X15, X15\n\tPSHUFL $0x39, X11, X11\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X6, X6\n\tXORL   160(SI), DX\n\tXORL   164(SI), CX\n\tXORL   168(SI), R8\n\tXORL   172(SI), R9\n\tMOVL   DX, 160(DI)\n\tMOVL   CX, 164(DI)\n\tMOVL   R8, 168(DI)\n\tMOVL   R9, 172(DI)\n\tMOVD   X15, DX\n\tMOVD   X11, CX\n\tMOVD   X1, R8\n\tMOVD   X6, R9\n\tXORL   224(SI), DX\n\tXORL   228(SI), CX\n\tXORL   232(SI), R8\n\tXORL   236(SI), R9\n\tMOVL   DX, 224(DI)\n\tMOVL   CX, 228(DI)\n\tMOVL   R8, 232(DI)\n\tMOVL   R9, 236(DI)\n\tPADDL  160(R12), X13\n\tPADDL  208(R12), X9\n\tPADDL  256(R12), X3\n\tPADDL  96(R12), X2\n\tMOVD   X13, DX\n\tMOVD   X9, CX\n\tMOVD   X3, R8\n\tMOVD   X2, R9\n\tPSHUFL $0x39, X13, X13\n\tPSHUFL $0x39, X9, X9\n\tPSHUFL $0x39, X3, X3\n\tPSHUFL $0x39, X2, X2\n\tXORL   48(SI), DX\n\tXORL   52(SI), CX\n\tXORL   56(SI), R8\n\tXORL   60(SI), R9\n\tMOVL   DX, 48(DI)\n\tMOVL   CX, 52(DI)\n\tMOVL   R8, 56(DI)\n\tMOVL   R9, 60(DI)\n\tMOVD   X13, DX\n\tMOVD   X9, CX\n\tMOVD   X3, R8\n\tMOVD   X2, R9\n\tPSHUFL $0x39, X13, X13\n\tPSHUFL $0x39, X9, X9\n\tPSHUFL $0x39, X3, X3\n\tPSHUFL $0x39, X2, X2\n\tXORL   112(SI), DX\n\tXORL   116(SI), CX\n\tXORL   120(SI), R8\n\tXORL   124(SI), R9\n\tMOVL   DX, 112(DI)\n\tMOVL   CX, 116(DI)\n\tMOVL   R8, 120(DI)\n\tMOVL   R9, 124(DI)\n\tMOVD   X13, DX\n\tMOVD   X9, CX\n\tMOVD   X3, R8\n\tMOVD   X2, R9\n\tPSHUFL $0x39, X13, X13\n\tPSHUFL $0x39, X9, X9\n\tPSHUFL $0x39, X3, X3\n\tPSHUFL $0x39, X2, X2\n\tXORL   176(SI), DX\n\tXORL   180(SI), CX\n\tXORL   184(SI), R8\n\tXORL   188(SI), R9\n\tMOVL   DX, 176(DI)\n\tMOVL   CX, 180(DI)\n\tMOVL   R8, 184(DI)\n\tMOVL   R9, 188(DI)\n\tMOVD   X13, DX\n\tMOVD   X9, CX\n\tMOVD   X3, R8\n\tMOVD   X2, R9\n\tXORL   240(SI), DX\n\tXORL   244(SI), CX\n\tXORL   248(SI), R8\n\tXORL   252(SI), R9\n\tMOVL   DX, 240(DI)\n\tMOVL   CX, 244(DI)\n\tMOVL   R8, 248(DI)\n\tMOVL   R9, 252(DI)\n\tMOVQ   352(R12), R9\n\tSUBQ   $0x00000100, R9\n\tADDQ   $0x00000100, SI\n\tADDQ   $0x00000100, DI\n\tCMPQ   R9, $0x00000100\n\tJAE    BYTESATLEAST256\n\tCMPQ   R9, $0x00\n\tJBE    DONE\n\nBYTESBETWEEN1AND255:\n\tCMPQ R9, $0x40\n\tJAE  NOCOPY\n\tMOVQ DI, DX\n\tLEAQ 360(R12), DI\n\tMOVQ R9, CX\n\tREP; MOVSB\n\tLEAQ 360(R12), DI\n\tLEAQ 360(R12), SI\n\nNOCOPY:\n\tMOVQ  R9, 352(R12)\n\tMOVOA 48(R12), X0\n\tMOVOA (R12), X1\n\tMOVOA 16(R12), X2\n\tMOVOA 32(R12), X3\n\tMOVOA X1, X4\n\tMOVQ  $0x00000014, CX\n\nMAINLOOP2:\n\tPADDL  X0, X4\n\tMOVOA  X0, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x07, X4\n\tPSRLL  $0x19, X6\n\tPXOR   X4, X3\n\tPXOR   X6, X3\n\tPADDL  X3, X5\n\tMOVOA  X3, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x09, X5\n\tPSRLL  $0x17, X6\n\tPXOR   X5, X2\n\tPSHUFL $0x93, X3, X3\n\tPXOR   X6, X2\n\tPADDL  X2, X4\n\tMOVOA  X2, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x0d, X4\n\tPSRLL  $0x13, X6\n\tPXOR   X4, X1\n\tPSHUFL $0x4e, X2, X2\n\tPXOR   X6, X1\n\tPADDL  X1, X5\n\tMOVOA  X3, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x12, X5\n\tPSRLL  $0x0e, X6\n\tPXOR   X5, X0\n\tPSHUFL $0x39, X1, X1\n\tPXOR   X6, X0\n\tPADDL  X0, X4\n\tMOVOA  X0, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x07, X4\n\tPSRLL  $0x19, X6\n\tPXOR   X4, X1\n\tPXOR   X6, X1\n\tPADDL  X1, X5\n\tMOVOA  X1, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x09, X5\n\tPSRLL  $0x17, X6\n\tPXOR   X5, X2\n\tPSHUFL $0x93, X1, X1\n\tPXOR   X6, X2\n\tPADDL  X2, X4\n\tMOVOA  X2, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x0d, X4\n\tPSRLL  $0x13, X6\n\tPXOR   X4, X3\n\tPSHUFL $0x4e, X2, X2\n\tPXOR   X6, X3\n\tPADDL  X3, X5\n\tMOVOA  X1, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x12, X5\n\tPSRLL  $0x0e, X6\n\tPXOR   X5, X0\n\tPSHUFL $0x39, X3, X3\n\tPXOR   X6, X0\n\tPADDL  X0, X4\n\tMOVOA  X0, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x07, X4\n\tPSRLL  $0x19, X6\n\tPXOR   X4, X3\n\tPXOR   X6, X3\n\tPADDL  X3, X5\n\tMOVOA  X3, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x09, X5\n\tPSRLL  $0x17, X6\n\tPXOR   X5, X2\n\tPSHUFL $0x93, X3, X3\n\tPXOR   X6, X2\n\tPADDL  X2, X4\n\tMOVOA  X2, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x0d, X4\n\tPSRLL  $0x13, X6\n\tPXOR   X4, X1\n\tPSHUFL $0x4e, X2, X2\n\tPXOR   X6, X1\n\tPADDL  X1, X5\n\tMOVOA  X3, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x12, X5\n\tPSRLL  $0x0e, X6\n\tPXOR   X5, X0\n\tPSHUFL $0x39, X1, X1\n\tPXOR   X6, X0\n\tPADDL  X0, X4\n\tMOVOA  X0, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x07, X4\n\tPSRLL  $0x19, X6\n\tPXOR   X4, X1\n\tPXOR   X6, X1\n\tPADDL  X1, X5\n\tMOVOA  X1, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x09, X5\n\tPSRLL  $0x17, X6\n\tPXOR   X5, X2\n\tPSHUFL $0x93, X1, X1\n\tPXOR   X6, X2\n\tPADDL  X2, X4\n\tMOVOA  X2, X5\n\tMOVOA  X4, X6\n\tPSLLL  $0x0d, X4\n\tPSRLL  $0x13, X6\n\tPXOR   X4, X3\n\tPSHUFL $0x4e, X2, X2\n\tPXOR   X6, X3\n\tSUBQ   $0x04, CX\n\tPADDL  X3, X5\n\tMOVOA  X1, X4\n\tMOVOA  X5, X6\n\tPSLLL  $0x12, X5\n\tPXOR   X7, X7\n\tPSRLL  $0x0e, X6\n\tPXOR   X5, X0\n\tPSHUFL $0x39, X3, X3\n\tPXOR   X6, X0\n\tJA     MAINLOOP2\n\tPADDL  48(R12), X0\n\tPADDL  (R12), X1\n\tPADDL  16(R12), X2\n\tPADDL  32(R12), X3\n\tMOVD   X0, CX\n\tMOVD   X1, R8\n\tMOVD   X2, R9\n\tMOVD   X3, AX\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X2, X2\n\tPSHUFL $0x39, X3, X3\n\tXORL   (SI), CX\n\tXORL   48(SI), R8\n\tXORL   32(SI), R9\n\tXORL   16(SI), AX\n\tMOVL   CX, (DI)\n\tMOVL   R8, 48(DI)\n\tMOVL   R9, 32(DI)\n\tMOVL   AX, 16(DI)\n\tMOVD   X0, CX\n\tMOVD   X1, R8\n\tMOVD   X2, R9\n\tMOVD   X3, AX\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X2, X2\n\tPSHUFL $0x39, X3, X3\n\tXORL   20(SI), CX\n\tXORL   4(SI), R8\n\tXORL   52(SI), R9\n\tXORL   36(SI), AX\n\tMOVL   CX, 20(DI)\n\tMOVL   R8, 4(DI)\n\tMOVL   R9, 52(DI)\n\tMOVL   AX, 36(DI)\n\tMOVD   X0, CX\n\tMOVD   X1, R8\n\tMOVD   X2, R9\n\tMOVD   X3, AX\n\tPSHUFL $0x39, X0, X0\n\tPSHUFL $0x39, X1, X1\n\tPSHUFL $0x39, X2, X2\n\tPSHUFL $0x39, X3, X3\n\tXORL   40(SI), CX\n\tXORL   24(SI), R8\n\tXORL   8(SI), R9\n\tXORL   56(SI), AX\n\tMOVL   CX, 40(DI)\n\tMOVL   R8, 24(DI)\n\tMOVL   R9, 8(DI)\n\tMOVL   AX, 56(DI)\n\tMOVD   X0, CX\n\tMOVD   X1, R8\n\tMOVD   X2, R9\n\tMOVD   X3, AX\n\tXORL   60(SI), CX\n\tXORL   44(SI), R8\n\tXORL   28(SI), R9\n\tXORL   12(SI), AX\n\tMOVL   CX, 60(DI)\n\tMOVL   R8, 44(DI)\n\tMOVL   R9, 28(DI)\n\tMOVL   AX, 12(DI)\n\tMOVQ   352(R12), R9\n\tMOVL   16(R12), CX\n\tMOVL   36(R12), R8\n\tADDQ   $0x01, CX\n\tSHLQ   $0x20, R8\n\tADDQ   R8, CX\n\tMOVQ   CX, R8\n\tSHRQ   $0x20, R8\n\tMOVL   CX, 16(R12)\n\tMOVL   R8, 36(R12)\n\tCMPQ   R9, $0x40\n\tJA     BYTESATLEAST65\n\tJAE    BYTESATLEAST64\n\tMOVQ   DI, SI\n\tMOVQ   DX, DI\n\tMOVQ   R9, CX\n\tREP; MOVSB\n\nBYTESATLEAST64:\nDONE:\n\tRET\n\nBYTESATLEAST65:\n\tSUBQ $0x40, R9\n\tADDQ $0x40, DI\n\tADDQ $0x40, SI\n\tJMP  BYTESBETWEEN1AND255\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !amd64 || purego || !gc\n\npackage salsa\n\n// XORKeyStream crypts bytes from in to out using the given key and counters.\n// In and out must overlap entirely or not at all. Counter\n// contains the raw salsa20 counter bytes (both nonce and block counter).\nfunc XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {\n\tgenericXORKeyStream(out, in, counter, key)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage salsa\n\nimport \"math/bits\"\n\nconst rounds = 20\n\n// core applies the Salsa20 core function to 16-byte input in, 32-byte key k,\n// and 16-byte constant c, and puts the result into 64-byte array out.\nfunc core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) {\n\tj0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24\n\tj1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24\n\tj2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24\n\tj3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24\n\tj4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24\n\tj5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24\n\tj6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24\n\tj7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24\n\tj8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24\n\tj9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24\n\tj10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24\n\tj11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24\n\tj12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24\n\tj13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24\n\tj14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24\n\tj15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24\n\n\tx0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8\n\tx9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15\n\n\tfor i := 0; i < rounds; i += 2 {\n\t\tu := x0 + x12\n\t\tx4 ^= bits.RotateLeft32(u, 7)\n\t\tu = x4 + x0\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x4\n\t\tx12 ^= bits.RotateLeft32(u, 13)\n\t\tu = x12 + x8\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x1\n\t\tx9 ^= bits.RotateLeft32(u, 7)\n\t\tu = x9 + x5\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x9\n\t\tx1 ^= bits.RotateLeft32(u, 13)\n\t\tu = x1 + x13\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x6\n\t\tx14 ^= bits.RotateLeft32(u, 7)\n\t\tu = x14 + x10\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x14\n\t\tx6 ^= bits.RotateLeft32(u, 13)\n\t\tu = x6 + x2\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x11\n\t\tx3 ^= bits.RotateLeft32(u, 7)\n\t\tu = x3 + x15\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x3\n\t\tx11 ^= bits.RotateLeft32(u, 13)\n\t\tu = x11 + x7\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x0 + x3\n\t\tx1 ^= bits.RotateLeft32(u, 7)\n\t\tu = x1 + x0\n\t\tx2 ^= bits.RotateLeft32(u, 9)\n\t\tu = x2 + x1\n\t\tx3 ^= bits.RotateLeft32(u, 13)\n\t\tu = x3 + x2\n\t\tx0 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x5 + x4\n\t\tx6 ^= bits.RotateLeft32(u, 7)\n\t\tu = x6 + x5\n\t\tx7 ^= bits.RotateLeft32(u, 9)\n\t\tu = x7 + x6\n\t\tx4 ^= bits.RotateLeft32(u, 13)\n\t\tu = x4 + x7\n\t\tx5 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x10 + x9\n\t\tx11 ^= bits.RotateLeft32(u, 7)\n\t\tu = x11 + x10\n\t\tx8 ^= bits.RotateLeft32(u, 9)\n\t\tu = x8 + x11\n\t\tx9 ^= bits.RotateLeft32(u, 13)\n\t\tu = x9 + x8\n\t\tx10 ^= bits.RotateLeft32(u, 18)\n\n\t\tu = x15 + x14\n\t\tx12 ^= bits.RotateLeft32(u, 7)\n\t\tu = x12 + x15\n\t\tx13 ^= bits.RotateLeft32(u, 9)\n\t\tu = x13 + x12\n\t\tx14 ^= bits.RotateLeft32(u, 13)\n\t\tu = x14 + x13\n\t\tx15 ^= bits.RotateLeft32(u, 18)\n\t}\n\tx0 += j0\n\tx1 += j1\n\tx2 += j2\n\tx3 += j3\n\tx4 += j4\n\tx5 += j5\n\tx6 += j6\n\tx7 += j7\n\tx8 += j8\n\tx9 += j9\n\tx10 += j10\n\tx11 += j11\n\tx12 += j12\n\tx13 += j13\n\tx14 += j14\n\tx15 += j15\n\n\tout[0] = byte(x0)\n\tout[1] = byte(x0 >> 8)\n\tout[2] = byte(x0 >> 16)\n\tout[3] = byte(x0 >> 24)\n\n\tout[4] = byte(x1)\n\tout[5] = byte(x1 >> 8)\n\tout[6] = byte(x1 >> 16)\n\tout[7] = byte(x1 >> 24)\n\n\tout[8] = byte(x2)\n\tout[9] = byte(x2 >> 8)\n\tout[10] = byte(x2 >> 16)\n\tout[11] = byte(x2 >> 24)\n\n\tout[12] = byte(x3)\n\tout[13] = byte(x3 >> 8)\n\tout[14] = byte(x3 >> 16)\n\tout[15] = byte(x3 >> 24)\n\n\tout[16] = byte(x4)\n\tout[17] = byte(x4 >> 8)\n\tout[18] = byte(x4 >> 16)\n\tout[19] = byte(x4 >> 24)\n\n\tout[20] = byte(x5)\n\tout[21] = byte(x5 >> 8)\n\tout[22] = byte(x5 >> 16)\n\tout[23] = byte(x5 >> 24)\n\n\tout[24] = byte(x6)\n\tout[25] = byte(x6 >> 8)\n\tout[26] = byte(x6 >> 16)\n\tout[27] = byte(x6 >> 24)\n\n\tout[28] = byte(x7)\n\tout[29] = byte(x7 >> 8)\n\tout[30] = byte(x7 >> 16)\n\tout[31] = byte(x7 >> 24)\n\n\tout[32] = byte(x8)\n\tout[33] = byte(x8 >> 8)\n\tout[34] = byte(x8 >> 16)\n\tout[35] = byte(x8 >> 24)\n\n\tout[36] = byte(x9)\n\tout[37] = byte(x9 >> 8)\n\tout[38] = byte(x9 >> 16)\n\tout[39] = byte(x9 >> 24)\n\n\tout[40] = byte(x10)\n\tout[41] = byte(x10 >> 8)\n\tout[42] = byte(x10 >> 16)\n\tout[43] = byte(x10 >> 24)\n\n\tout[44] = byte(x11)\n\tout[45] = byte(x11 >> 8)\n\tout[46] = byte(x11 >> 16)\n\tout[47] = byte(x11 >> 24)\n\n\tout[48] = byte(x12)\n\tout[49] = byte(x12 >> 8)\n\tout[50] = byte(x12 >> 16)\n\tout[51] = byte(x12 >> 24)\n\n\tout[52] = byte(x13)\n\tout[53] = byte(x13 >> 8)\n\tout[54] = byte(x13 >> 16)\n\tout[55] = byte(x13 >> 24)\n\n\tout[56] = byte(x14)\n\tout[57] = byte(x14 >> 8)\n\tout[58] = byte(x14 >> 16)\n\tout[59] = byte(x14 >> 24)\n\n\tout[60] = byte(x15)\n\tout[61] = byte(x15 >> 8)\n\tout[62] = byte(x15 >> 16)\n\tout[63] = byte(x15 >> 24)\n}\n\n// genericXORKeyStream is the generic implementation of XORKeyStream to be used\n// when no assembly implementation is available.\nfunc genericXORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {\n\tvar block [64]byte\n\tvar counterCopy [16]byte\n\tcopy(counterCopy[:], counter[:])\n\n\tfor len(in) >= 64 {\n\t\tcore(&block, &counterCopy, key, &Sigma)\n\t\tfor i, x := range block {\n\t\t\tout[i] = in[i] ^ x\n\t\t}\n\t\tu := uint32(1)\n\t\tfor i := 8; i < 16; i++ {\n\t\t\tu += uint32(counterCopy[i])\n\t\t\tcounterCopy[i] = byte(u)\n\t\t\tu >>= 8\n\t\t}\n\t\tin = in[64:]\n\t\tout = out[64:]\n\t}\n\n\tif len(in) > 0 {\n\t\tcore(&block, &counterCopy, key, &Sigma)\n\t\tfor i, v := range in {\n\t\t\tout[i] = v ^ block[i]\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/crypto/scrypt/scrypt.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package scrypt implements the scrypt key derivation function as defined in\n// Colin Percival's paper \"Stronger Key Derivation via Sequential Memory-Hard\n// Functions\" (https://www.tarsnap.com/scrypt/scrypt.pdf).\npackage scrypt\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"math/bits\"\n\n\t\"golang.org/x/crypto/pbkdf2\"\n)\n\nconst maxInt = int(^uint(0) >> 1)\n\n// blockCopy copies n numbers from src into dst.\nfunc blockCopy(dst, src []uint32, n int) {\n\tcopy(dst, src[:n])\n}\n\n// blockXOR XORs numbers from dst with n numbers from src.\nfunc blockXOR(dst, src []uint32, n int) {\n\tfor i, v := range src[:n] {\n\t\tdst[i] ^= v\n\t}\n}\n\n// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in,\n// and puts the result into both tmp and out.\nfunc salsaXOR(tmp *[16]uint32, in, out []uint32) {\n\tw0 := tmp[0] ^ in[0]\n\tw1 := tmp[1] ^ in[1]\n\tw2 := tmp[2] ^ in[2]\n\tw3 := tmp[3] ^ in[3]\n\tw4 := tmp[4] ^ in[4]\n\tw5 := tmp[5] ^ in[5]\n\tw6 := tmp[6] ^ in[6]\n\tw7 := tmp[7] ^ in[7]\n\tw8 := tmp[8] ^ in[8]\n\tw9 := tmp[9] ^ in[9]\n\tw10 := tmp[10] ^ in[10]\n\tw11 := tmp[11] ^ in[11]\n\tw12 := tmp[12] ^ in[12]\n\tw13 := tmp[13] ^ in[13]\n\tw14 := tmp[14] ^ in[14]\n\tw15 := tmp[15] ^ in[15]\n\n\tx0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8\n\tx9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15\n\n\tfor i := 0; i < 8; i += 2 {\n\t\tx4 ^= bits.RotateLeft32(x0+x12, 7)\n\t\tx8 ^= bits.RotateLeft32(x4+x0, 9)\n\t\tx12 ^= bits.RotateLeft32(x8+x4, 13)\n\t\tx0 ^= bits.RotateLeft32(x12+x8, 18)\n\n\t\tx9 ^= bits.RotateLeft32(x5+x1, 7)\n\t\tx13 ^= bits.RotateLeft32(x9+x5, 9)\n\t\tx1 ^= bits.RotateLeft32(x13+x9, 13)\n\t\tx5 ^= bits.RotateLeft32(x1+x13, 18)\n\n\t\tx14 ^= bits.RotateLeft32(x10+x6, 7)\n\t\tx2 ^= bits.RotateLeft32(x14+x10, 9)\n\t\tx6 ^= bits.RotateLeft32(x2+x14, 13)\n\t\tx10 ^= bits.RotateLeft32(x6+x2, 18)\n\n\t\tx3 ^= bits.RotateLeft32(x15+x11, 7)\n\t\tx7 ^= bits.RotateLeft32(x3+x15, 9)\n\t\tx11 ^= bits.RotateLeft32(x7+x3, 13)\n\t\tx15 ^= bits.RotateLeft32(x11+x7, 18)\n\n\t\tx1 ^= bits.RotateLeft32(x0+x3, 7)\n\t\tx2 ^= bits.RotateLeft32(x1+x0, 9)\n\t\tx3 ^= bits.RotateLeft32(x2+x1, 13)\n\t\tx0 ^= bits.RotateLeft32(x3+x2, 18)\n\n\t\tx6 ^= bits.RotateLeft32(x5+x4, 7)\n\t\tx7 ^= bits.RotateLeft32(x6+x5, 9)\n\t\tx4 ^= bits.RotateLeft32(x7+x6, 13)\n\t\tx5 ^= bits.RotateLeft32(x4+x7, 18)\n\n\t\tx11 ^= bits.RotateLeft32(x10+x9, 7)\n\t\tx8 ^= bits.RotateLeft32(x11+x10, 9)\n\t\tx9 ^= bits.RotateLeft32(x8+x11, 13)\n\t\tx10 ^= bits.RotateLeft32(x9+x8, 18)\n\n\t\tx12 ^= bits.RotateLeft32(x15+x14, 7)\n\t\tx13 ^= bits.RotateLeft32(x12+x15, 9)\n\t\tx14 ^= bits.RotateLeft32(x13+x12, 13)\n\t\tx15 ^= bits.RotateLeft32(x14+x13, 18)\n\t}\n\tx0 += w0\n\tx1 += w1\n\tx2 += w2\n\tx3 += w3\n\tx4 += w4\n\tx5 += w5\n\tx6 += w6\n\tx7 += w7\n\tx8 += w8\n\tx9 += w9\n\tx10 += w10\n\tx11 += w11\n\tx12 += w12\n\tx13 += w13\n\tx14 += w14\n\tx15 += w15\n\n\tout[0], tmp[0] = x0, x0\n\tout[1], tmp[1] = x1, x1\n\tout[2], tmp[2] = x2, x2\n\tout[3], tmp[3] = x3, x3\n\tout[4], tmp[4] = x4, x4\n\tout[5], tmp[5] = x5, x5\n\tout[6], tmp[6] = x6, x6\n\tout[7], tmp[7] = x7, x7\n\tout[8], tmp[8] = x8, x8\n\tout[9], tmp[9] = x9, x9\n\tout[10], tmp[10] = x10, x10\n\tout[11], tmp[11] = x11, x11\n\tout[12], tmp[12] = x12, x12\n\tout[13], tmp[13] = x13, x13\n\tout[14], tmp[14] = x14, x14\n\tout[15], tmp[15] = x15, x15\n}\n\nfunc blockMix(tmp *[16]uint32, in, out []uint32, r int) {\n\tblockCopy(tmp[:], in[(2*r-1)*16:], 16)\n\tfor i := 0; i < 2*r; i += 2 {\n\t\tsalsaXOR(tmp, in[i*16:], out[i*8:])\n\t\tsalsaXOR(tmp, in[i*16+16:], out[i*8+r*16:])\n\t}\n}\n\nfunc integer(b []uint32, r int) uint64 {\n\tj := (2*r - 1) * 16\n\treturn uint64(b[j]) | uint64(b[j+1])<<32\n}\n\nfunc smix(b []byte, r, N int, v, xy []uint32) {\n\tvar tmp [16]uint32\n\tR := 32 * r\n\tx := xy\n\ty := xy[R:]\n\n\tj := 0\n\tfor i := 0; i < R; i++ {\n\t\tx[i] = binary.LittleEndian.Uint32(b[j:])\n\t\tj += 4\n\t}\n\tfor i := 0; i < N; i += 2 {\n\t\tblockCopy(v[i*R:], x, R)\n\t\tblockMix(&tmp, x, y, r)\n\n\t\tblockCopy(v[(i+1)*R:], y, R)\n\t\tblockMix(&tmp, y, x, r)\n\t}\n\tfor i := 0; i < N; i += 2 {\n\t\tj := int(integer(x, r) & uint64(N-1))\n\t\tblockXOR(x, v[j*R:], R)\n\t\tblockMix(&tmp, x, y, r)\n\n\t\tj = int(integer(y, r) & uint64(N-1))\n\t\tblockXOR(y, v[j*R:], R)\n\t\tblockMix(&tmp, y, x, r)\n\t}\n\tj = 0\n\tfor _, v := range x[:R] {\n\t\tbinary.LittleEndian.PutUint32(b[j:], v)\n\t\tj += 4\n\t}\n}\n\n// Key derives a key from the password, salt, and cost parameters, returning\n// a byte slice of length keyLen that can be used as cryptographic key.\n//\n// N is a CPU/memory cost parameter, which must be a power of two greater than 1.\n// r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the\n// limits, the function returns a nil byte slice and an error.\n//\n// For example, you can get a derived key for e.g. AES-256 (which needs a\n// 32-byte key) by doing:\n//\n//\tdk, err := scrypt.Key([]byte(\"some password\"), salt, 32768, 8, 1, 32)\n//\n// The recommended parameters for interactive logins as of 2017 are N=32768, r=8\n// and p=1. The parameters N, r, and p should be increased as memory latency and\n// CPU parallelism increases; consider setting N to the highest power of 2 you\n// can derive within 100 milliseconds. Remember to get a good random salt.\nfunc Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) {\n\tif N <= 1 || N&(N-1) != 0 {\n\t\treturn nil, errors.New(\"scrypt: N must be > 1 and a power of 2\")\n\t}\n\tif r <= 0 || p <= 0 {\n\t\treturn nil, errors.New(\"scrypt: parameters must be > 0\")\n\t}\n\tif uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r {\n\t\treturn nil, errors.New(\"scrypt: parameters are too large\")\n\t}\n\n\txy := make([]uint32, 64*r)\n\tv := make([]uint32, 32*N*r)\n\tb := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New)\n\n\tfor i := 0; i < p; i++ {\n\t\tsmix(b[i*128*r:], r, N, v, xy)\n\t}\n\n\treturn pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/net/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/net/http/httpguts/guts.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package httpguts provides functions implementing various details\n// of the HTTP specification.\n//\n// This package is shared by the standard library (which vendors it)\n// and x/net/http2. It comes with no API stability promise.\npackage httpguts\n\nimport (\n\t\"net/textproto\"\n\t\"strings\"\n)\n\n// ValidTrailerHeader reports whether name is a valid header field name to appear\n// in trailers.\n// See RFC 7230, Section 4.1.2\nfunc ValidTrailerHeader(name string) bool {\n\tname = textproto.CanonicalMIMEHeaderKey(name)\n\tif strings.HasPrefix(name, \"If-\") || badTrailer[name] {\n\t\treturn false\n\t}\n\treturn true\n}\n\nvar badTrailer = map[string]bool{\n\t\"Authorization\":       true,\n\t\"Cache-Control\":       true,\n\t\"Connection\":          true,\n\t\"Content-Encoding\":    true,\n\t\"Content-Length\":      true,\n\t\"Content-Range\":       true,\n\t\"Content-Type\":        true,\n\t\"Expect\":              true,\n\t\"Host\":                true,\n\t\"Keep-Alive\":          true,\n\t\"Max-Forwards\":        true,\n\t\"Pragma\":              true,\n\t\"Proxy-Authenticate\":  true,\n\t\"Proxy-Authorization\": true,\n\t\"Proxy-Connection\":    true,\n\t\"Range\":               true,\n\t\"Realm\":               true,\n\t\"Te\":                  true,\n\t\"Trailer\":             true,\n\t\"Transfer-Encoding\":   true,\n\t\"Www-Authenticate\":    true,\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http/httpguts/httplex.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage httpguts\n\nimport (\n\t\"net\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/net/idna\"\n)\n\nvar isTokenTable = [256]bool{\n\t'!':  true,\n\t'#':  true,\n\t'$':  true,\n\t'%':  true,\n\t'&':  true,\n\t'\\'': true,\n\t'*':  true,\n\t'+':  true,\n\t'-':  true,\n\t'.':  true,\n\t'0':  true,\n\t'1':  true,\n\t'2':  true,\n\t'3':  true,\n\t'4':  true,\n\t'5':  true,\n\t'6':  true,\n\t'7':  true,\n\t'8':  true,\n\t'9':  true,\n\t'A':  true,\n\t'B':  true,\n\t'C':  true,\n\t'D':  true,\n\t'E':  true,\n\t'F':  true,\n\t'G':  true,\n\t'H':  true,\n\t'I':  true,\n\t'J':  true,\n\t'K':  true,\n\t'L':  true,\n\t'M':  true,\n\t'N':  true,\n\t'O':  true,\n\t'P':  true,\n\t'Q':  true,\n\t'R':  true,\n\t'S':  true,\n\t'T':  true,\n\t'U':  true,\n\t'W':  true,\n\t'V':  true,\n\t'X':  true,\n\t'Y':  true,\n\t'Z':  true,\n\t'^':  true,\n\t'_':  true,\n\t'`':  true,\n\t'a':  true,\n\t'b':  true,\n\t'c':  true,\n\t'd':  true,\n\t'e':  true,\n\t'f':  true,\n\t'g':  true,\n\t'h':  true,\n\t'i':  true,\n\t'j':  true,\n\t'k':  true,\n\t'l':  true,\n\t'm':  true,\n\t'n':  true,\n\t'o':  true,\n\t'p':  true,\n\t'q':  true,\n\t'r':  true,\n\t's':  true,\n\t't':  true,\n\t'u':  true,\n\t'v':  true,\n\t'w':  true,\n\t'x':  true,\n\t'y':  true,\n\t'z':  true,\n\t'|':  true,\n\t'~':  true,\n}\n\nfunc IsTokenRune(r rune) bool {\n\treturn r < utf8.RuneSelf && isTokenTable[byte(r)]\n}\n\n// HeaderValuesContainsToken reports whether any string in values\n// contains the provided token, ASCII case-insensitively.\nfunc HeaderValuesContainsToken(values []string, token string) bool {\n\tfor _, v := range values {\n\t\tif headerValueContainsToken(v, token) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// isOWS reports whether b is an optional whitespace byte, as defined\n// by RFC 7230 section 3.2.3.\nfunc isOWS(b byte) bool { return b == ' ' || b == '\\t' }\n\n// trimOWS returns x with all optional whitespace removes from the\n// beginning and end.\nfunc trimOWS(x string) string {\n\t// TODO: consider using strings.Trim(x, \" \\t\") instead,\n\t// if and when it's fast enough. See issue 10292.\n\t// But this ASCII-only code will probably always beat UTF-8\n\t// aware code.\n\tfor len(x) > 0 && isOWS(x[0]) {\n\t\tx = x[1:]\n\t}\n\tfor len(x) > 0 && isOWS(x[len(x)-1]) {\n\t\tx = x[:len(x)-1]\n\t}\n\treturn x\n}\n\n// headerValueContainsToken reports whether v (assumed to be a\n// 0#element, in the ABNF extension described in RFC 7230 section 7)\n// contains token amongst its comma-separated tokens, ASCII\n// case-insensitively.\nfunc headerValueContainsToken(v string, token string) bool {\n\tfor comma := strings.IndexByte(v, ','); comma != -1; comma = strings.IndexByte(v, ',') {\n\t\tif tokenEqual(trimOWS(v[:comma]), token) {\n\t\t\treturn true\n\t\t}\n\t\tv = v[comma+1:]\n\t}\n\treturn tokenEqual(trimOWS(v), token)\n}\n\n// lowerASCII returns the ASCII lowercase version of b.\nfunc lowerASCII(b byte) byte {\n\tif 'A' <= b && b <= 'Z' {\n\t\treturn b + ('a' - 'A')\n\t}\n\treturn b\n}\n\n// tokenEqual reports whether t1 and t2 are equal, ASCII case-insensitively.\nfunc tokenEqual(t1, t2 string) bool {\n\tif len(t1) != len(t2) {\n\t\treturn false\n\t}\n\tfor i, b := range t1 {\n\t\tif b >= utf8.RuneSelf {\n\t\t\t// No UTF-8 or non-ASCII allowed in tokens.\n\t\t\treturn false\n\t\t}\n\t\tif lowerASCII(byte(b)) != lowerASCII(t2[i]) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// isLWS reports whether b is linear white space, according\n// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2\n//\n//\tLWS            = [CRLF] 1*( SP | HT )\nfunc isLWS(b byte) bool { return b == ' ' || b == '\\t' }\n\n// isCTL reports whether b is a control byte, according\n// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2\n//\n//\tCTL            = <any US-ASCII control character\n//\t                 (octets 0 - 31) and DEL (127)>\nfunc isCTL(b byte) bool {\n\tconst del = 0x7f // a CTL\n\treturn b < ' ' || b == del\n}\n\n// ValidHeaderFieldName reports whether v is a valid HTTP/1.x header name.\n// HTTP/2 imposes the additional restriction that uppercase ASCII\n// letters are not allowed.\n//\n// RFC 7230 says:\n//\n//\theader-field   = field-name \":\" OWS field-value OWS\n//\tfield-name     = token\n//\ttoken          = 1*tchar\n//\ttchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\" / \"+\" / \"-\" / \".\" /\n//\t        \"^\" / \"_\" / \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\nfunc ValidHeaderFieldName(v string) bool {\n\tif len(v) == 0 {\n\t\treturn false\n\t}\n\tfor i := 0; i < len(v); i++ {\n\t\tif !isTokenTable[v[i]] {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// ValidHostHeader reports whether h is a valid host header.\nfunc ValidHostHeader(h string) bool {\n\t// The latest spec is actually this:\n\t//\n\t// http://tools.ietf.org/html/rfc7230#section-5.4\n\t//     Host = uri-host [ \":\" port ]\n\t//\n\t// Where uri-host is:\n\t//     http://tools.ietf.org/html/rfc3986#section-3.2.2\n\t//\n\t// But we're going to be much more lenient for now and just\n\t// search for any byte that's not a valid byte in any of those\n\t// expressions.\n\tfor i := 0; i < len(h); i++ {\n\t\tif !validHostByte[h[i]] {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// See the validHostHeader comment.\nvar validHostByte = [256]bool{\n\t'0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true,\n\t'8': true, '9': true,\n\n\t'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true, 'h': true,\n\t'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true, 'p': true,\n\t'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true, 'x': true,\n\t'y': true, 'z': true,\n\n\t'A': true, 'B': true, 'C': true, 'D': true, 'E': true, 'F': true, 'G': true, 'H': true,\n\t'I': true, 'J': true, 'K': true, 'L': true, 'M': true, 'N': true, 'O': true, 'P': true,\n\t'Q': true, 'R': true, 'S': true, 'T': true, 'U': true, 'V': true, 'W': true, 'X': true,\n\t'Y': true, 'Z': true,\n\n\t'!':  true, // sub-delims\n\t'$':  true, // sub-delims\n\t'%':  true, // pct-encoded (and used in IPv6 zones)\n\t'&':  true, // sub-delims\n\t'(':  true, // sub-delims\n\t')':  true, // sub-delims\n\t'*':  true, // sub-delims\n\t'+':  true, // sub-delims\n\t',':  true, // sub-delims\n\t'-':  true, // unreserved\n\t'.':  true, // unreserved\n\t':':  true, // IPv6address + Host expression's optional port\n\t';':  true, // sub-delims\n\t'=':  true, // sub-delims\n\t'[':  true,\n\t'\\'': true, // sub-delims\n\t']':  true,\n\t'_':  true, // unreserved\n\t'~':  true, // unreserved\n}\n\n// ValidHeaderFieldValue reports whether v is a valid \"field-value\" according to\n// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 :\n//\n//\tmessage-header = field-name \":\" [ field-value ]\n//\tfield-value    = *( field-content | LWS )\n//\tfield-content  = <the OCTETs making up the field-value\n//\t                 and consisting of either *TEXT or combinations\n//\t                 of token, separators, and quoted-string>\n//\n// http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 :\n//\n//\tTEXT           = <any OCTET except CTLs,\n//\t                  but including LWS>\n//\tLWS            = [CRLF] 1*( SP | HT )\n//\tCTL            = <any US-ASCII control character\n//\t                 (octets 0 - 31) and DEL (127)>\n//\n// RFC 7230 says:\n//\n//\tfield-value    = *( field-content / obs-fold )\n//\tobj-fold       =  N/A to http2, and deprecated\n//\tfield-content  = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n//\tfield-vchar    = VCHAR / obs-text\n//\tobs-text       = %x80-FF\n//\tVCHAR          = \"any visible [USASCII] character\"\n//\n// http2 further says: \"Similarly, HTTP/2 allows header field values\n// that are not valid. While most of the values that can be encoded\n// will not alter header field parsing, carriage return (CR, ASCII\n// 0xd), line feed (LF, ASCII 0xa), and the zero character (NUL, ASCII\n// 0x0) might be exploited by an attacker if they are translated\n// verbatim. Any request or response that contains a character not\n// permitted in a header field value MUST be treated as malformed\n// (Section 8.1.2.6). Valid characters are defined by the\n// field-content ABNF rule in Section 3.2 of [RFC7230].\"\n//\n// This function does not (yet?) properly handle the rejection of\n// strings that begin or end with SP or HTAB.\nfunc ValidHeaderFieldValue(v string) bool {\n\tfor i := 0; i < len(v); i++ {\n\t\tb := v[i]\n\t\tif isCTL(b) && !isLWS(b) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc isASCII(s string) bool {\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] >= utf8.RuneSelf {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// PunycodeHostPort returns the IDNA Punycode version\n// of the provided \"host\" or \"host:port\" string.\nfunc PunycodeHostPort(v string) (string, error) {\n\tif isASCII(v) {\n\t\treturn v, nil\n\t}\n\n\thost, port, err := net.SplitHostPort(v)\n\tif err != nil {\n\t\t// The input 'v' argument was just a \"host\" argument,\n\t\t// without a port. This error should not be returned\n\t\t// to the caller.\n\t\thost = v\n\t\tport = \"\"\n\t}\n\thost, err = idna.ToASCII(host)\n\tif err != nil {\n\t\t// Non-UTF-8? Not representable in Punycode, in any\n\t\t// case.\n\t\treturn \"\", err\n\t}\n\tif port == \"\" {\n\t\treturn host, nil\n\t}\n\treturn net.JoinHostPort(host, port), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/.gitignore",
    "content": "*~\nh2i/h2i\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/ascii.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport \"strings\"\n\n// The HTTP protocols are defined in terms of ASCII, not Unicode. This file\n// contains helper functions which may use Unicode-aware functions which would\n// otherwise be unsafe and could introduce vulnerabilities if used improperly.\n\n// asciiEqualFold is strings.EqualFold, ASCII only. It reports whether s and t\n// are equal, ASCII-case-insensitively.\nfunc asciiEqualFold(s, t string) bool {\n\tif len(s) != len(t) {\n\t\treturn false\n\t}\n\tfor i := 0; i < len(s); i++ {\n\t\tif lower(s[i]) != lower(t[i]) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// lower returns the ASCII lowercase version of b.\nfunc lower(b byte) byte {\n\tif 'A' <= b && b <= 'Z' {\n\t\treturn b + ('a' - 'A')\n\t}\n\treturn b\n}\n\n// isASCIIPrint returns whether s is ASCII and printable according to\n// https://tools.ietf.org/html/rfc20#section-4.2.\nfunc isASCIIPrint(s string) bool {\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] < ' ' || s[i] > '~' {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// asciiToLower returns the lowercase version of s if s is ASCII and printable,\n// and whether or not it was.\nfunc asciiToLower(s string) (lower string, ok bool) {\n\tif !isASCIIPrint(s) {\n\t\treturn \"\", false\n\t}\n\treturn strings.ToLower(s), true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/ciphers.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\n// A list of the possible cipher suite ids. Taken from\n// https://www.iana.org/assignments/tls-parameters/tls-parameters.txt\n\nconst (\n\tcipher_TLS_NULL_WITH_NULL_NULL               uint16 = 0x0000\n\tcipher_TLS_RSA_WITH_NULL_MD5                 uint16 = 0x0001\n\tcipher_TLS_RSA_WITH_NULL_SHA                 uint16 = 0x0002\n\tcipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5        uint16 = 0x0003\n\tcipher_TLS_RSA_WITH_RC4_128_MD5              uint16 = 0x0004\n\tcipher_TLS_RSA_WITH_RC4_128_SHA              uint16 = 0x0005\n\tcipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5    uint16 = 0x0006\n\tcipher_TLS_RSA_WITH_IDEA_CBC_SHA             uint16 = 0x0007\n\tcipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA     uint16 = 0x0008\n\tcipher_TLS_RSA_WITH_DES_CBC_SHA              uint16 = 0x0009\n\tcipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA         uint16 = 0x000A\n\tcipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA  uint16 = 0x000B\n\tcipher_TLS_DH_DSS_WITH_DES_CBC_SHA           uint16 = 0x000C\n\tcipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA      uint16 = 0x000D\n\tcipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA  uint16 = 0x000E\n\tcipher_TLS_DH_RSA_WITH_DES_CBC_SHA           uint16 = 0x000F\n\tcipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA      uint16 = 0x0010\n\tcipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0011\n\tcipher_TLS_DHE_DSS_WITH_DES_CBC_SHA          uint16 = 0x0012\n\tcipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA     uint16 = 0x0013\n\tcipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0014\n\tcipher_TLS_DHE_RSA_WITH_DES_CBC_SHA          uint16 = 0x0015\n\tcipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA     uint16 = 0x0016\n\tcipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5    uint16 = 0x0017\n\tcipher_TLS_DH_anon_WITH_RC4_128_MD5          uint16 = 0x0018\n\tcipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0019\n\tcipher_TLS_DH_anon_WITH_DES_CBC_SHA          uint16 = 0x001A\n\tcipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA     uint16 = 0x001B\n\t// Reserved uint16 =  0x001C-1D\n\tcipher_TLS_KRB5_WITH_DES_CBC_SHA             uint16 = 0x001E\n\tcipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA        uint16 = 0x001F\n\tcipher_TLS_KRB5_WITH_RC4_128_SHA             uint16 = 0x0020\n\tcipher_TLS_KRB5_WITH_IDEA_CBC_SHA            uint16 = 0x0021\n\tcipher_TLS_KRB5_WITH_DES_CBC_MD5             uint16 = 0x0022\n\tcipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5        uint16 = 0x0023\n\tcipher_TLS_KRB5_WITH_RC4_128_MD5             uint16 = 0x0024\n\tcipher_TLS_KRB5_WITH_IDEA_CBC_MD5            uint16 = 0x0025\n\tcipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA   uint16 = 0x0026\n\tcipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA   uint16 = 0x0027\n\tcipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA       uint16 = 0x0028\n\tcipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5   uint16 = 0x0029\n\tcipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5   uint16 = 0x002A\n\tcipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5       uint16 = 0x002B\n\tcipher_TLS_PSK_WITH_NULL_SHA                 uint16 = 0x002C\n\tcipher_TLS_DHE_PSK_WITH_NULL_SHA             uint16 = 0x002D\n\tcipher_TLS_RSA_PSK_WITH_NULL_SHA             uint16 = 0x002E\n\tcipher_TLS_RSA_WITH_AES_128_CBC_SHA          uint16 = 0x002F\n\tcipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA       uint16 = 0x0030\n\tcipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA       uint16 = 0x0031\n\tcipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA      uint16 = 0x0032\n\tcipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA      uint16 = 0x0033\n\tcipher_TLS_DH_anon_WITH_AES_128_CBC_SHA      uint16 = 0x0034\n\tcipher_TLS_RSA_WITH_AES_256_CBC_SHA          uint16 = 0x0035\n\tcipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA       uint16 = 0x0036\n\tcipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA       uint16 = 0x0037\n\tcipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA      uint16 = 0x0038\n\tcipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA      uint16 = 0x0039\n\tcipher_TLS_DH_anon_WITH_AES_256_CBC_SHA      uint16 = 0x003A\n\tcipher_TLS_RSA_WITH_NULL_SHA256              uint16 = 0x003B\n\tcipher_TLS_RSA_WITH_AES_128_CBC_SHA256       uint16 = 0x003C\n\tcipher_TLS_RSA_WITH_AES_256_CBC_SHA256       uint16 = 0x003D\n\tcipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256    uint16 = 0x003E\n\tcipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256    uint16 = 0x003F\n\tcipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256   uint16 = 0x0040\n\tcipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA     uint16 = 0x0041\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA  uint16 = 0x0042\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA  uint16 = 0x0043\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0044\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0045\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0046\n\t// Reserved uint16 =  0x0047-4F\n\t// Reserved uint16 =  0x0050-58\n\t// Reserved uint16 =  0x0059-5C\n\t// Unassigned uint16 =  0x005D-5F\n\t// Reserved uint16 =  0x0060-66\n\tcipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x0067\n\tcipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256  uint16 = 0x0068\n\tcipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256  uint16 = 0x0069\n\tcipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x006A\n\tcipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x006B\n\tcipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256 uint16 = 0x006C\n\tcipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256 uint16 = 0x006D\n\t// Unassigned uint16 =  0x006E-83\n\tcipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA        uint16 = 0x0084\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA     uint16 = 0x0085\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA     uint16 = 0x0086\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA    uint16 = 0x0087\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA    uint16 = 0x0088\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA    uint16 = 0x0089\n\tcipher_TLS_PSK_WITH_RC4_128_SHA                 uint16 = 0x008A\n\tcipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA            uint16 = 0x008B\n\tcipher_TLS_PSK_WITH_AES_128_CBC_SHA             uint16 = 0x008C\n\tcipher_TLS_PSK_WITH_AES_256_CBC_SHA             uint16 = 0x008D\n\tcipher_TLS_DHE_PSK_WITH_RC4_128_SHA             uint16 = 0x008E\n\tcipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA        uint16 = 0x008F\n\tcipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA         uint16 = 0x0090\n\tcipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA         uint16 = 0x0091\n\tcipher_TLS_RSA_PSK_WITH_RC4_128_SHA             uint16 = 0x0092\n\tcipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA        uint16 = 0x0093\n\tcipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA         uint16 = 0x0094\n\tcipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA         uint16 = 0x0095\n\tcipher_TLS_RSA_WITH_SEED_CBC_SHA                uint16 = 0x0096\n\tcipher_TLS_DH_DSS_WITH_SEED_CBC_SHA             uint16 = 0x0097\n\tcipher_TLS_DH_RSA_WITH_SEED_CBC_SHA             uint16 = 0x0098\n\tcipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA            uint16 = 0x0099\n\tcipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA            uint16 = 0x009A\n\tcipher_TLS_DH_anon_WITH_SEED_CBC_SHA            uint16 = 0x009B\n\tcipher_TLS_RSA_WITH_AES_128_GCM_SHA256          uint16 = 0x009C\n\tcipher_TLS_RSA_WITH_AES_256_GCM_SHA384          uint16 = 0x009D\n\tcipher_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256      uint16 = 0x009E\n\tcipher_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384      uint16 = 0x009F\n\tcipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256       uint16 = 0x00A0\n\tcipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384       uint16 = 0x00A1\n\tcipher_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256      uint16 = 0x00A2\n\tcipher_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384      uint16 = 0x00A3\n\tcipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256       uint16 = 0x00A4\n\tcipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384       uint16 = 0x00A5\n\tcipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256      uint16 = 0x00A6\n\tcipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384      uint16 = 0x00A7\n\tcipher_TLS_PSK_WITH_AES_128_GCM_SHA256          uint16 = 0x00A8\n\tcipher_TLS_PSK_WITH_AES_256_GCM_SHA384          uint16 = 0x00A9\n\tcipher_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256      uint16 = 0x00AA\n\tcipher_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384      uint16 = 0x00AB\n\tcipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256      uint16 = 0x00AC\n\tcipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384      uint16 = 0x00AD\n\tcipher_TLS_PSK_WITH_AES_128_CBC_SHA256          uint16 = 0x00AE\n\tcipher_TLS_PSK_WITH_AES_256_CBC_SHA384          uint16 = 0x00AF\n\tcipher_TLS_PSK_WITH_NULL_SHA256                 uint16 = 0x00B0\n\tcipher_TLS_PSK_WITH_NULL_SHA384                 uint16 = 0x00B1\n\tcipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256      uint16 = 0x00B2\n\tcipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384      uint16 = 0x00B3\n\tcipher_TLS_DHE_PSK_WITH_NULL_SHA256             uint16 = 0x00B4\n\tcipher_TLS_DHE_PSK_WITH_NULL_SHA384             uint16 = 0x00B5\n\tcipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256      uint16 = 0x00B6\n\tcipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384      uint16 = 0x00B7\n\tcipher_TLS_RSA_PSK_WITH_NULL_SHA256             uint16 = 0x00B8\n\tcipher_TLS_RSA_PSK_WITH_NULL_SHA384             uint16 = 0x00B9\n\tcipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256     uint16 = 0x00BA\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256  uint16 = 0x00BB\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256  uint16 = 0x00BC\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BD\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BE\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BF\n\tcipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256     uint16 = 0x00C0\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256  uint16 = 0x00C1\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256  uint16 = 0x00C2\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C3\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C4\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C5\n\t// Unassigned uint16 =  0x00C6-FE\n\tcipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV uint16 = 0x00FF\n\t// Unassigned uint16 =  0x01-55,*\n\tcipher_TLS_FALLBACK_SCSV uint16 = 0x5600\n\t// Unassigned                                   uint16 = 0x5601 - 0xC000\n\tcipher_TLS_ECDH_ECDSA_WITH_NULL_SHA                 uint16 = 0xC001\n\tcipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA              uint16 = 0xC002\n\tcipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA         uint16 = 0xC003\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA          uint16 = 0xC004\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA          uint16 = 0xC005\n\tcipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA                uint16 = 0xC006\n\tcipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA             uint16 = 0xC007\n\tcipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA        uint16 = 0xC008\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA         uint16 = 0xC009\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA         uint16 = 0xC00A\n\tcipher_TLS_ECDH_RSA_WITH_NULL_SHA                   uint16 = 0xC00B\n\tcipher_TLS_ECDH_RSA_WITH_RC4_128_SHA                uint16 = 0xC00C\n\tcipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA           uint16 = 0xC00D\n\tcipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA            uint16 = 0xC00E\n\tcipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA            uint16 = 0xC00F\n\tcipher_TLS_ECDHE_RSA_WITH_NULL_SHA                  uint16 = 0xC010\n\tcipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA               uint16 = 0xC011\n\tcipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA          uint16 = 0xC012\n\tcipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA           uint16 = 0xC013\n\tcipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA           uint16 = 0xC014\n\tcipher_TLS_ECDH_anon_WITH_NULL_SHA                  uint16 = 0xC015\n\tcipher_TLS_ECDH_anon_WITH_RC4_128_SHA               uint16 = 0xC016\n\tcipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA          uint16 = 0xC017\n\tcipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA           uint16 = 0xC018\n\tcipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA           uint16 = 0xC019\n\tcipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA            uint16 = 0xC01A\n\tcipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA        uint16 = 0xC01B\n\tcipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA        uint16 = 0xC01C\n\tcipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA             uint16 = 0xC01D\n\tcipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA         uint16 = 0xC01E\n\tcipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA         uint16 = 0xC01F\n\tcipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA             uint16 = 0xC020\n\tcipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA         uint16 = 0xC021\n\tcipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA         uint16 = 0xC022\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256      uint16 = 0xC023\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384      uint16 = 0xC024\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256       uint16 = 0xC025\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384       uint16 = 0xC026\n\tcipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256        uint16 = 0xC027\n\tcipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384        uint16 = 0xC028\n\tcipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256         uint16 = 0xC029\n\tcipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384         uint16 = 0xC02A\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256      uint16 = 0xC02B\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384      uint16 = 0xC02C\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256       uint16 = 0xC02D\n\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384       uint16 = 0xC02E\n\tcipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256        uint16 = 0xC02F\n\tcipher_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384        uint16 = 0xC030\n\tcipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256         uint16 = 0xC031\n\tcipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384         uint16 = 0xC032\n\tcipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA               uint16 = 0xC033\n\tcipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA          uint16 = 0xC034\n\tcipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA           uint16 = 0xC035\n\tcipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA           uint16 = 0xC036\n\tcipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256        uint16 = 0xC037\n\tcipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384        uint16 = 0xC038\n\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA                  uint16 = 0xC039\n\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA256               uint16 = 0xC03A\n\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA384               uint16 = 0xC03B\n\tcipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256             uint16 = 0xC03C\n\tcipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384             uint16 = 0xC03D\n\tcipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256          uint16 = 0xC03E\n\tcipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384          uint16 = 0xC03F\n\tcipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256          uint16 = 0xC040\n\tcipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384          uint16 = 0xC041\n\tcipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256         uint16 = 0xC042\n\tcipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384         uint16 = 0xC043\n\tcipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256         uint16 = 0xC044\n\tcipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384         uint16 = 0xC045\n\tcipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256         uint16 = 0xC046\n\tcipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384         uint16 = 0xC047\n\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256     uint16 = 0xC048\n\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384     uint16 = 0xC049\n\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256      uint16 = 0xC04A\n\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384      uint16 = 0xC04B\n\tcipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256       uint16 = 0xC04C\n\tcipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384       uint16 = 0xC04D\n\tcipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256        uint16 = 0xC04E\n\tcipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384        uint16 = 0xC04F\n\tcipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256             uint16 = 0xC050\n\tcipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384             uint16 = 0xC051\n\tcipher_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256         uint16 = 0xC052\n\tcipher_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384         uint16 = 0xC053\n\tcipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256          uint16 = 0xC054\n\tcipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384          uint16 = 0xC055\n\tcipher_TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256         uint16 = 0xC056\n\tcipher_TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384         uint16 = 0xC057\n\tcipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256          uint16 = 0xC058\n\tcipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384          uint16 = 0xC059\n\tcipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256         uint16 = 0xC05A\n\tcipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384         uint16 = 0xC05B\n\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256     uint16 = 0xC05C\n\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384     uint16 = 0xC05D\n\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256      uint16 = 0xC05E\n\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384      uint16 = 0xC05F\n\tcipher_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256       uint16 = 0xC060\n\tcipher_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384       uint16 = 0xC061\n\tcipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256        uint16 = 0xC062\n\tcipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384        uint16 = 0xC063\n\tcipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256             uint16 = 0xC064\n\tcipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384             uint16 = 0xC065\n\tcipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256         uint16 = 0xC066\n\tcipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384         uint16 = 0xC067\n\tcipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256         uint16 = 0xC068\n\tcipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384         uint16 = 0xC069\n\tcipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256             uint16 = 0xC06A\n\tcipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384             uint16 = 0xC06B\n\tcipher_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256         uint16 = 0xC06C\n\tcipher_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384         uint16 = 0xC06D\n\tcipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256         uint16 = 0xC06E\n\tcipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384         uint16 = 0xC06F\n\tcipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256       uint16 = 0xC070\n\tcipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384       uint16 = 0xC071\n\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC072\n\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC073\n\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256  uint16 = 0xC074\n\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384  uint16 = 0xC075\n\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256   uint16 = 0xC076\n\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384   uint16 = 0xC077\n\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256    uint16 = 0xC078\n\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384    uint16 = 0xC079\n\tcipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256         uint16 = 0xC07A\n\tcipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384         uint16 = 0xC07B\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256     uint16 = 0xC07C\n\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384     uint16 = 0xC07D\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256      uint16 = 0xC07E\n\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384      uint16 = 0xC07F\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256     uint16 = 0xC080\n\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384     uint16 = 0xC081\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256      uint16 = 0xC082\n\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384      uint16 = 0xC083\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256     uint16 = 0xC084\n\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384     uint16 = 0xC085\n\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC086\n\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC087\n\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256  uint16 = 0xC088\n\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384  uint16 = 0xC089\n\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256   uint16 = 0xC08A\n\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384   uint16 = 0xC08B\n\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256    uint16 = 0xC08C\n\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384    uint16 = 0xC08D\n\tcipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256         uint16 = 0xC08E\n\tcipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384         uint16 = 0xC08F\n\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256     uint16 = 0xC090\n\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384     uint16 = 0xC091\n\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256     uint16 = 0xC092\n\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384     uint16 = 0xC093\n\tcipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256         uint16 = 0xC094\n\tcipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384         uint16 = 0xC095\n\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256     uint16 = 0xC096\n\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384     uint16 = 0xC097\n\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256     uint16 = 0xC098\n\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384     uint16 = 0xC099\n\tcipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256   uint16 = 0xC09A\n\tcipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384   uint16 = 0xC09B\n\tcipher_TLS_RSA_WITH_AES_128_CCM                     uint16 = 0xC09C\n\tcipher_TLS_RSA_WITH_AES_256_CCM                     uint16 = 0xC09D\n\tcipher_TLS_DHE_RSA_WITH_AES_128_CCM                 uint16 = 0xC09E\n\tcipher_TLS_DHE_RSA_WITH_AES_256_CCM                 uint16 = 0xC09F\n\tcipher_TLS_RSA_WITH_AES_128_CCM_8                   uint16 = 0xC0A0\n\tcipher_TLS_RSA_WITH_AES_256_CCM_8                   uint16 = 0xC0A1\n\tcipher_TLS_DHE_RSA_WITH_AES_128_CCM_8               uint16 = 0xC0A2\n\tcipher_TLS_DHE_RSA_WITH_AES_256_CCM_8               uint16 = 0xC0A3\n\tcipher_TLS_PSK_WITH_AES_128_CCM                     uint16 = 0xC0A4\n\tcipher_TLS_PSK_WITH_AES_256_CCM                     uint16 = 0xC0A5\n\tcipher_TLS_DHE_PSK_WITH_AES_128_CCM                 uint16 = 0xC0A6\n\tcipher_TLS_DHE_PSK_WITH_AES_256_CCM                 uint16 = 0xC0A7\n\tcipher_TLS_PSK_WITH_AES_128_CCM_8                   uint16 = 0xC0A8\n\tcipher_TLS_PSK_WITH_AES_256_CCM_8                   uint16 = 0xC0A9\n\tcipher_TLS_PSK_DHE_WITH_AES_128_CCM_8               uint16 = 0xC0AA\n\tcipher_TLS_PSK_DHE_WITH_AES_256_CCM_8               uint16 = 0xC0AB\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM             uint16 = 0xC0AC\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM             uint16 = 0xC0AD\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8           uint16 = 0xC0AE\n\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8           uint16 = 0xC0AF\n\t// Unassigned uint16 =  0xC0B0-FF\n\t// Unassigned uint16 =  0xC1-CB,*\n\t// Unassigned uint16 =  0xCC00-A7\n\tcipher_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256   uint16 = 0xCCA8\n\tcipher_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA9\n\tcipher_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256     uint16 = 0xCCAA\n\tcipher_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256         uint16 = 0xCCAB\n\tcipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256   uint16 = 0xCCAC\n\tcipher_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256     uint16 = 0xCCAD\n\tcipher_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256     uint16 = 0xCCAE\n)\n\n// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec.\n// References:\n// https://tools.ietf.org/html/rfc7540#appendix-A\n// Reject cipher suites from Appendix A.\n// \"This list includes those cipher suites that do not\n// offer an ephemeral key exchange and those that are\n// based on the TLS null, stream or block cipher type\"\nfunc isBadCipher(cipher uint16) bool {\n\tswitch cipher {\n\tcase cipher_TLS_NULL_WITH_NULL_NULL,\n\t\tcipher_TLS_RSA_WITH_NULL_MD5,\n\t\tcipher_TLS_RSA_WITH_NULL_SHA,\n\t\tcipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,\n\t\tcipher_TLS_RSA_WITH_RC4_128_MD5,\n\t\tcipher_TLS_RSA_WITH_RC4_128_SHA,\n\t\tcipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,\n\t\tcipher_TLS_RSA_WITH_IDEA_CBC_SHA,\n\t\tcipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,\n\t\tcipher_TLS_DH_anon_WITH_RC4_128_MD5,\n\t\tcipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_KRB5_WITH_DES_CBC_SHA,\n\t\tcipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_KRB5_WITH_RC4_128_SHA,\n\t\tcipher_TLS_KRB5_WITH_IDEA_CBC_SHA,\n\t\tcipher_TLS_KRB5_WITH_DES_CBC_MD5,\n\t\tcipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,\n\t\tcipher_TLS_KRB5_WITH_RC4_128_MD5,\n\t\tcipher_TLS_KRB5_WITH_IDEA_CBC_MD5,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,\n\t\tcipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,\n\t\tcipher_TLS_PSK_WITH_NULL_SHA,\n\t\tcipher_TLS_DHE_PSK_WITH_NULL_SHA,\n\t\tcipher_TLS_RSA_PSK_WITH_NULL_SHA,\n\t\tcipher_TLS_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_NULL_SHA256,\n\t\tcipher_TLS_RSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,\n\t\tcipher_TLS_PSK_WITH_RC4_128_SHA,\n\t\tcipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_PSK_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_PSK_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_DHE_PSK_WITH_RC4_128_SHA,\n\t\tcipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_RSA_PSK_WITH_RC4_128_SHA,\n\t\tcipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_DH_anon_WITH_SEED_CBC_SHA,\n\t\tcipher_TLS_RSA_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_PSK_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_PSK_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_PSK_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_PSK_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_PSK_WITH_NULL_SHA256,\n\t\tcipher_TLS_PSK_WITH_NULL_SHA384,\n\t\tcipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_DHE_PSK_WITH_NULL_SHA256,\n\t\tcipher_TLS_DHE_PSK_WITH_NULL_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_NULL_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_NULL_SHA384,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,\n\t\tcipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDH_RSA_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDHE_RSA_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDH_anon_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDH_anon_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,\n\t\tcipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,\n\t\tcipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,\n\t\tcipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,\n\t\tcipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,\n\t\tcipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA,\n\t\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,\n\t\tcipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,\n\t\tcipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,\n\t\tcipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,\n\t\tcipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,\n\t\tcipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,\n\t\tcipher_TLS_RSA_WITH_AES_128_CCM,\n\t\tcipher_TLS_RSA_WITH_AES_256_CCM,\n\t\tcipher_TLS_RSA_WITH_AES_128_CCM_8,\n\t\tcipher_TLS_RSA_WITH_AES_256_CCM_8,\n\t\tcipher_TLS_PSK_WITH_AES_128_CCM,\n\t\tcipher_TLS_PSK_WITH_AES_256_CCM,\n\t\tcipher_TLS_PSK_WITH_AES_128_CCM_8,\n\t\tcipher_TLS_PSK_WITH_AES_256_CCM_8:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/client_conn_pool.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Transport code's client connection pooling.\n\npackage http2\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"net\"\n\t\"net/http\"\n\t\"sync\"\n)\n\n// ClientConnPool manages a pool of HTTP/2 client connections.\ntype ClientConnPool interface {\n\t// GetClientConn returns a specific HTTP/2 connection (usually\n\t// a TLS-TCP connection) to an HTTP/2 server. On success, the\n\t// returned ClientConn accounts for the upcoming RoundTrip\n\t// call, so the caller should not omit it. If the caller needs\n\t// to, ClientConn.RoundTrip can be called with a bogus\n\t// new(http.Request) to release the stream reservation.\n\tGetClientConn(req *http.Request, addr string) (*ClientConn, error)\n\tMarkDead(*ClientConn)\n}\n\n// clientConnPoolIdleCloser is the interface implemented by ClientConnPool\n// implementations which can close their idle connections.\ntype clientConnPoolIdleCloser interface {\n\tClientConnPool\n\tcloseIdleConnections()\n}\n\nvar (\n\t_ clientConnPoolIdleCloser = (*clientConnPool)(nil)\n\t_ clientConnPoolIdleCloser = noDialClientConnPool{}\n)\n\n// TODO: use singleflight for dialing and addConnCalls?\ntype clientConnPool struct {\n\tt *Transport\n\n\tmu sync.Mutex // TODO: maybe switch to RWMutex\n\t// TODO: add support for sharing conns based on cert names\n\t// (e.g. share conn for googleapis.com and appspot.com)\n\tconns        map[string][]*ClientConn // key is host:port\n\tdialing      map[string]*dialCall     // currently in-flight dials\n\tkeys         map[*ClientConn][]string\n\taddConnCalls map[string]*addConnCall // in-flight addConnIfNeeded calls\n}\n\nfunc (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {\n\treturn p.getClientConn(req, addr, dialOnMiss)\n}\n\nconst (\n\tdialOnMiss   = true\n\tnoDialOnMiss = false\n)\n\nfunc (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {\n\t// TODO(dneil): Dial a new connection when t.DisableKeepAlives is set?\n\tif isConnectionCloseRequest(req) && dialOnMiss {\n\t\t// It gets its own connection.\n\t\ttraceGetConn(req, addr)\n\t\tconst singleUse = true\n\t\tcc, err := p.t.dialClientConn(req.Context(), addr, singleUse)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn cc, nil\n\t}\n\tfor {\n\t\tp.mu.Lock()\n\t\tfor _, cc := range p.conns[addr] {\n\t\t\tif cc.ReserveNewRequest() {\n\t\t\t\t// When a connection is presented to us by the net/http package,\n\t\t\t\t// the GetConn hook has already been called.\n\t\t\t\t// Don't call it a second time here.\n\t\t\t\tif !cc.getConnCalled {\n\t\t\t\t\ttraceGetConn(req, addr)\n\t\t\t\t}\n\t\t\t\tcc.getConnCalled = false\n\t\t\t\tp.mu.Unlock()\n\t\t\t\treturn cc, nil\n\t\t\t}\n\t\t}\n\t\tif !dialOnMiss {\n\t\t\tp.mu.Unlock()\n\t\t\treturn nil, ErrNoCachedConn\n\t\t}\n\t\ttraceGetConn(req, addr)\n\t\tcall := p.getStartDialLocked(req.Context(), addr)\n\t\tp.mu.Unlock()\n\t\t<-call.done\n\t\tif shouldRetryDial(call, req) {\n\t\t\tcontinue\n\t\t}\n\t\tcc, err := call.res, call.err\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif cc.ReserveNewRequest() {\n\t\t\treturn cc, nil\n\t\t}\n\t}\n}\n\n// dialCall is an in-flight Transport dial call to a host.\ntype dialCall struct {\n\t_ incomparable\n\tp *clientConnPool\n\t// the context associated with the request\n\t// that created this dialCall\n\tctx  context.Context\n\tdone chan struct{} // closed when done\n\tres  *ClientConn   // valid after done is closed\n\terr  error         // valid after done is closed\n}\n\n// requires p.mu is held.\nfunc (p *clientConnPool) getStartDialLocked(ctx context.Context, addr string) *dialCall {\n\tif call, ok := p.dialing[addr]; ok {\n\t\t// A dial is already in-flight. Don't start another.\n\t\treturn call\n\t}\n\tcall := &dialCall{p: p, done: make(chan struct{}), ctx: ctx}\n\tif p.dialing == nil {\n\t\tp.dialing = make(map[string]*dialCall)\n\t}\n\tp.dialing[addr] = call\n\tgo call.dial(call.ctx, addr)\n\treturn call\n}\n\n// run in its own goroutine.\nfunc (c *dialCall) dial(ctx context.Context, addr string) {\n\tconst singleUse = false // shared conn\n\tc.res, c.err = c.p.t.dialClientConn(ctx, addr, singleUse)\n\n\tc.p.mu.Lock()\n\tdelete(c.p.dialing, addr)\n\tif c.err == nil {\n\t\tc.p.addConnLocked(addr, c.res)\n\t}\n\tc.p.mu.Unlock()\n\n\tclose(c.done)\n}\n\n// addConnIfNeeded makes a NewClientConn out of c if a connection for key doesn't\n// already exist. It coalesces concurrent calls with the same key.\n// This is used by the http1 Transport code when it creates a new connection. Because\n// the http1 Transport doesn't de-dup TCP dials to outbound hosts (because it doesn't know\n// the protocol), it can get into a situation where it has multiple TLS connections.\n// This code decides which ones live or die.\n// The return value used is whether c was used.\n// c is never closed.\nfunc (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c net.Conn) (used bool, err error) {\n\tp.mu.Lock()\n\tfor _, cc := range p.conns[key] {\n\t\tif cc.CanTakeNewRequest() {\n\t\t\tp.mu.Unlock()\n\t\t\treturn false, nil\n\t\t}\n\t}\n\tcall, dup := p.addConnCalls[key]\n\tif !dup {\n\t\tif p.addConnCalls == nil {\n\t\t\tp.addConnCalls = make(map[string]*addConnCall)\n\t\t}\n\t\tcall = &addConnCall{\n\t\t\tp:    p,\n\t\t\tdone: make(chan struct{}),\n\t\t}\n\t\tp.addConnCalls[key] = call\n\t\tgo call.run(t, key, c)\n\t}\n\tp.mu.Unlock()\n\n\t<-call.done\n\tif call.err != nil {\n\t\treturn false, call.err\n\t}\n\treturn !dup, nil\n}\n\ntype addConnCall struct {\n\t_    incomparable\n\tp    *clientConnPool\n\tdone chan struct{} // closed when done\n\terr  error\n}\n\nfunc (c *addConnCall) run(t *Transport, key string, nc net.Conn) {\n\tcc, err := t.NewClientConn(nc)\n\n\tp := c.p\n\tp.mu.Lock()\n\tif err != nil {\n\t\tc.err = err\n\t} else {\n\t\tcc.getConnCalled = true // already called by the net/http package\n\t\tp.addConnLocked(key, cc)\n\t}\n\tdelete(p.addConnCalls, key)\n\tp.mu.Unlock()\n\tclose(c.done)\n}\n\n// p.mu must be held\nfunc (p *clientConnPool) addConnLocked(key string, cc *ClientConn) {\n\tfor _, v := range p.conns[key] {\n\t\tif v == cc {\n\t\t\treturn\n\t\t}\n\t}\n\tif p.conns == nil {\n\t\tp.conns = make(map[string][]*ClientConn)\n\t}\n\tif p.keys == nil {\n\t\tp.keys = make(map[*ClientConn][]string)\n\t}\n\tp.conns[key] = append(p.conns[key], cc)\n\tp.keys[cc] = append(p.keys[cc], key)\n}\n\nfunc (p *clientConnPool) MarkDead(cc *ClientConn) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tfor _, key := range p.keys[cc] {\n\t\tvv, ok := p.conns[key]\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tnewList := filterOutClientConn(vv, cc)\n\t\tif len(newList) > 0 {\n\t\t\tp.conns[key] = newList\n\t\t} else {\n\t\t\tdelete(p.conns, key)\n\t\t}\n\t}\n\tdelete(p.keys, cc)\n}\n\nfunc (p *clientConnPool) closeIdleConnections() {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\t// TODO: don't close a cc if it was just added to the pool\n\t// milliseconds ago and has never been used. There's currently\n\t// a small race window with the HTTP/1 Transport's integration\n\t// where it can add an idle conn just before using it, and\n\t// somebody else can concurrently call CloseIdleConns and\n\t// break some caller's RoundTrip.\n\tfor _, vv := range p.conns {\n\t\tfor _, cc := range vv {\n\t\t\tcc.closeIfIdle()\n\t\t}\n\t}\n}\n\nfunc filterOutClientConn(in []*ClientConn, exclude *ClientConn) []*ClientConn {\n\tout := in[:0]\n\tfor _, v := range in {\n\t\tif v != exclude {\n\t\t\tout = append(out, v)\n\t\t}\n\t}\n\t// If we filtered it out, zero out the last item to prevent\n\t// the GC from seeing it.\n\tif len(in) != len(out) {\n\t\tin[len(in)-1] = nil\n\t}\n\treturn out\n}\n\n// noDialClientConnPool is an implementation of http2.ClientConnPool\n// which never dials. We let the HTTP/1.1 client dial and use its TLS\n// connection instead.\ntype noDialClientConnPool struct{ *clientConnPool }\n\nfunc (p noDialClientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {\n\treturn p.getClientConn(req, addr, noDialOnMiss)\n}\n\n// shouldRetryDial reports whether the current request should\n// retry dialing after the call finished unsuccessfully, for example\n// if the dial was canceled because of a context cancellation or\n// deadline expiry.\nfunc shouldRetryDial(call *dialCall, req *http.Request) bool {\n\tif call.err == nil {\n\t\t// No error, no need to retry\n\t\treturn false\n\t}\n\tif call.ctx == req.Context() {\n\t\t// If the call has the same context as the request, the dial\n\t\t// should not be retried, since any cancellation will have come\n\t\t// from this request.\n\t\treturn false\n\t}\n\tif !errors.Is(call.err, context.Canceled) && !errors.Is(call.err, context.DeadlineExceeded) {\n\t\t// If the call error is not because of a context cancellation or a deadline expiry,\n\t\t// the dial should not be retried.\n\t\treturn false\n\t}\n\t// Only retry if the error is a context cancellation error or deadline expiry\n\t// and the context associated with the call was canceled or expired.\n\treturn call.ctx.Err() != nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/client_priority_go126.go",
    "content": "// Copyright 2026 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.27\n\npackage http2\n\nimport \"net/http\"\n\n// Support for go.dev/issue/75500 is added in Go 1.27. In case anyone uses\n// x/net with versions before Go 1.27, we return true here so that their write\n// scheduler will still be the round-robin write scheduler rather than the RFC\n// 9218 write scheduler. That way, older users of Go will not see a sudden\n// change of behavior just from importing x/net.\n//\n// TODO(nsh): remove this file after x/net go.mod is at Go 1.27.\nfunc clientPriorityDisabled(_ *http.Server) bool {\n\treturn true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/client_priority_go127.go",
    "content": "// Copyright 2026 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.27\n\npackage http2\n\nimport \"net/http\"\n\nfunc clientPriorityDisabled(s *http.Server) bool {\n\treturn s.DisableClientPriority\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/config.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"math\"\n\t\"net/http\"\n\t\"time\"\n)\n\n// http2Config is a package-internal version of net/http.HTTP2Config.\n//\n// http.HTTP2Config was added in Go 1.24.\n// When running with a version of net/http that includes HTTP2Config,\n// we merge the configuration with the fields in Transport or Server\n// to produce an http2Config.\n//\n// Zero valued fields in http2Config are interpreted as in the\n// net/http.HTTPConfig documentation.\n//\n// Precedence order for reconciling configurations is:\n//\n//   - Use the net/http.{Server,Transport}.HTTP2Config value, when non-zero.\n//   - Otherwise use the http2.{Server.Transport} value.\n//   - If the resulting value is zero or out of range, use a default.\ntype http2Config struct {\n\tMaxConcurrentStreams         uint32\n\tStrictMaxConcurrentRequests  bool\n\tMaxDecoderHeaderTableSize    uint32\n\tMaxEncoderHeaderTableSize    uint32\n\tMaxReadFrameSize             uint32\n\tMaxUploadBufferPerConnection int32\n\tMaxUploadBufferPerStream     int32\n\tSendPingTimeout              time.Duration\n\tPingTimeout                  time.Duration\n\tWriteByteTimeout             time.Duration\n\tPermitProhibitedCipherSuites bool\n\tCountError                   func(errType string)\n}\n\n// configFromServer merges configuration settings from\n// net/http.Server.HTTP2Config and http2.Server.\nfunc configFromServer(h1 *http.Server, h2 *Server) http2Config {\n\tconf := http2Config{\n\t\tMaxConcurrentStreams:         h2.MaxConcurrentStreams,\n\t\tMaxEncoderHeaderTableSize:    h2.MaxEncoderHeaderTableSize,\n\t\tMaxDecoderHeaderTableSize:    h2.MaxDecoderHeaderTableSize,\n\t\tMaxReadFrameSize:             h2.MaxReadFrameSize,\n\t\tMaxUploadBufferPerConnection: h2.MaxUploadBufferPerConnection,\n\t\tMaxUploadBufferPerStream:     h2.MaxUploadBufferPerStream,\n\t\tSendPingTimeout:              h2.ReadIdleTimeout,\n\t\tPingTimeout:                  h2.PingTimeout,\n\t\tWriteByteTimeout:             h2.WriteByteTimeout,\n\t\tPermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites,\n\t\tCountError:                   h2.CountError,\n\t}\n\tfillNetHTTPConfig(&conf, h1.HTTP2)\n\tsetConfigDefaults(&conf, true)\n\treturn conf\n}\n\n// configFromTransport merges configuration settings from h2 and h2.t1.HTTP2\n// (the net/http Transport).\nfunc configFromTransport(h2 *Transport) http2Config {\n\tconf := http2Config{\n\t\tStrictMaxConcurrentRequests: h2.StrictMaxConcurrentStreams,\n\t\tMaxEncoderHeaderTableSize:   h2.MaxEncoderHeaderTableSize,\n\t\tMaxDecoderHeaderTableSize:   h2.MaxDecoderHeaderTableSize,\n\t\tMaxReadFrameSize:            h2.MaxReadFrameSize,\n\t\tSendPingTimeout:             h2.ReadIdleTimeout,\n\t\tPingTimeout:                 h2.PingTimeout,\n\t\tWriteByteTimeout:            h2.WriteByteTimeout,\n\t}\n\n\t// Unlike most config fields, where out-of-range values revert to the default,\n\t// Transport.MaxReadFrameSize clips.\n\tif conf.MaxReadFrameSize < minMaxFrameSize {\n\t\tconf.MaxReadFrameSize = minMaxFrameSize\n\t} else if conf.MaxReadFrameSize > maxFrameSize {\n\t\tconf.MaxReadFrameSize = maxFrameSize\n\t}\n\n\tif h2.t1 != nil {\n\t\tfillNetHTTPConfig(&conf, h2.t1.HTTP2)\n\t}\n\tsetConfigDefaults(&conf, false)\n\treturn conf\n}\n\nfunc setDefault[T ~int | ~int32 | ~uint32 | ~int64](v *T, minval, maxval, defval T) {\n\tif *v < minval || *v > maxval {\n\t\t*v = defval\n\t}\n}\n\nfunc setConfigDefaults(conf *http2Config, server bool) {\n\tsetDefault(&conf.MaxConcurrentStreams, 1, math.MaxUint32, defaultMaxStreams)\n\tsetDefault(&conf.MaxEncoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize)\n\tsetDefault(&conf.MaxDecoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize)\n\tif server {\n\t\tsetDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, 1<<20)\n\t} else {\n\t\tsetDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, transportDefaultConnFlow)\n\t}\n\tif server {\n\t\tsetDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, 1<<20)\n\t} else {\n\t\tsetDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, transportDefaultStreamFlow)\n\t}\n\tsetDefault(&conf.MaxReadFrameSize, minMaxFrameSize, maxFrameSize, defaultMaxReadFrameSize)\n\tsetDefault(&conf.PingTimeout, 1, math.MaxInt64, 15*time.Second)\n}\n\n// adjustHTTP1MaxHeaderSize converts a limit in bytes on the size of an HTTP/1 header\n// to an HTTP/2 MAX_HEADER_LIST_SIZE value.\nfunc adjustHTTP1MaxHeaderSize(n int64) int64 {\n\t// http2's count is in a slightly different unit and includes 32 bytes per pair.\n\t// So, take the net/http.Server value and pad it up a bit, assuming 10 headers.\n\tconst perFieldOverhead = 32 // per http2 spec\n\tconst typicalHeaders = 10   // conservative\n\treturn n + typicalHeaders*perFieldOverhead\n}\n\nfunc fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) {\n\tif h2 == nil {\n\t\treturn\n\t}\n\tif h2.MaxConcurrentStreams != 0 {\n\t\tconf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)\n\t}\n\tif http2ConfigStrictMaxConcurrentRequests(h2) {\n\t\tconf.StrictMaxConcurrentRequests = true\n\t}\n\tif h2.MaxEncoderHeaderTableSize != 0 {\n\t\tconf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize)\n\t}\n\tif h2.MaxDecoderHeaderTableSize != 0 {\n\t\tconf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize)\n\t}\n\tif h2.MaxConcurrentStreams != 0 {\n\t\tconf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams)\n\t}\n\tif h2.MaxReadFrameSize != 0 {\n\t\tconf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize)\n\t}\n\tif h2.MaxReceiveBufferPerConnection != 0 {\n\t\tconf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection)\n\t}\n\tif h2.MaxReceiveBufferPerStream != 0 {\n\t\tconf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream)\n\t}\n\tif h2.SendPingTimeout != 0 {\n\t\tconf.SendPingTimeout = h2.SendPingTimeout\n\t}\n\tif h2.PingTimeout != 0 {\n\t\tconf.PingTimeout = h2.PingTimeout\n\t}\n\tif h2.WriteByteTimeout != 0 {\n\t\tconf.WriteByteTimeout = h2.WriteByteTimeout\n\t}\n\tif h2.PermitProhibitedCipherSuites {\n\t\tconf.PermitProhibitedCipherSuites = true\n\t}\n\tif h2.CountError != nil {\n\t\tconf.CountError = h2.CountError\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/config_go125.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.26\n\npackage http2\n\nimport (\n\t\"net/http\"\n)\n\nfunc http2ConfigStrictMaxConcurrentRequests(h2 *http.HTTP2Config) bool {\n\treturn false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/config_go126.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.26\n\npackage http2\n\nimport (\n\t\"net/http\"\n)\n\nfunc http2ConfigStrictMaxConcurrentRequests(h2 *http.HTTP2Config) bool {\n\treturn h2.StrictMaxConcurrentRequests\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/databuffer.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"sync\"\n)\n\n// Buffer chunks are allocated from a pool to reduce pressure on GC.\n// The maximum wasted space per dataBuffer is 2x the largest size class,\n// which happens when the dataBuffer has multiple chunks and there is\n// one unread byte in both the first and last chunks. We use a few size\n// classes to minimize overheads for servers that typically receive very\n// small request bodies.\n//\n// TODO: Benchmark to determine if the pools are necessary. The GC may have\n// improved enough that we can instead allocate chunks like this:\n// make([]byte, max(16<<10, expectedBytesRemaining))\nvar dataChunkPools = [...]sync.Pool{\n\t{New: func() interface{} { return new([1 << 10]byte) }},\n\t{New: func() interface{} { return new([2 << 10]byte) }},\n\t{New: func() interface{} { return new([4 << 10]byte) }},\n\t{New: func() interface{} { return new([8 << 10]byte) }},\n\t{New: func() interface{} { return new([16 << 10]byte) }},\n}\n\nfunc getDataBufferChunk(size int64) []byte {\n\tswitch {\n\tcase size <= 1<<10:\n\t\treturn dataChunkPools[0].Get().(*[1 << 10]byte)[:]\n\tcase size <= 2<<10:\n\t\treturn dataChunkPools[1].Get().(*[2 << 10]byte)[:]\n\tcase size <= 4<<10:\n\t\treturn dataChunkPools[2].Get().(*[4 << 10]byte)[:]\n\tcase size <= 8<<10:\n\t\treturn dataChunkPools[3].Get().(*[8 << 10]byte)[:]\n\tdefault:\n\t\treturn dataChunkPools[4].Get().(*[16 << 10]byte)[:]\n\t}\n}\n\nfunc putDataBufferChunk(p []byte) {\n\tswitch len(p) {\n\tcase 1 << 10:\n\t\tdataChunkPools[0].Put((*[1 << 10]byte)(p))\n\tcase 2 << 10:\n\t\tdataChunkPools[1].Put((*[2 << 10]byte)(p))\n\tcase 4 << 10:\n\t\tdataChunkPools[2].Put((*[4 << 10]byte)(p))\n\tcase 8 << 10:\n\t\tdataChunkPools[3].Put((*[8 << 10]byte)(p))\n\tcase 16 << 10:\n\t\tdataChunkPools[4].Put((*[16 << 10]byte)(p))\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unexpected buffer len=%v\", len(p)))\n\t}\n}\n\n// dataBuffer is an io.ReadWriter backed by a list of data chunks.\n// Each dataBuffer is used to read DATA frames on a single stream.\n// The buffer is divided into chunks so the server can limit the\n// total memory used by a single connection without limiting the\n// request body size on any single stream.\ntype dataBuffer struct {\n\tchunks   [][]byte\n\tr        int   // next byte to read is chunks[0][r]\n\tw        int   // next byte to write is chunks[len(chunks)-1][w]\n\tsize     int   // total buffered bytes\n\texpected int64 // we expect at least this many bytes in future Write calls (ignored if <= 0)\n}\n\nvar errReadEmpty = errors.New(\"read from empty dataBuffer\")\n\n// Read copies bytes from the buffer into p.\n// It is an error to read when no data is available.\nfunc (b *dataBuffer) Read(p []byte) (int, error) {\n\tif b.size == 0 {\n\t\treturn 0, errReadEmpty\n\t}\n\tvar ntotal int\n\tfor len(p) > 0 && b.size > 0 {\n\t\treadFrom := b.bytesFromFirstChunk()\n\t\tn := copy(p, readFrom)\n\t\tp = p[n:]\n\t\tntotal += n\n\t\tb.r += n\n\t\tb.size -= n\n\t\t// If the first chunk has been consumed, advance to the next chunk.\n\t\tif b.r == len(b.chunks[0]) {\n\t\t\tputDataBufferChunk(b.chunks[0])\n\t\t\tend := len(b.chunks) - 1\n\t\t\tcopy(b.chunks[:end], b.chunks[1:])\n\t\t\tb.chunks[end] = nil\n\t\t\tb.chunks = b.chunks[:end]\n\t\t\tb.r = 0\n\t\t}\n\t}\n\treturn ntotal, nil\n}\n\nfunc (b *dataBuffer) bytesFromFirstChunk() []byte {\n\tif len(b.chunks) == 1 {\n\t\treturn b.chunks[0][b.r:b.w]\n\t}\n\treturn b.chunks[0][b.r:]\n}\n\n// Len returns the number of bytes of the unread portion of the buffer.\nfunc (b *dataBuffer) Len() int {\n\treturn b.size\n}\n\n// Write appends p to the buffer.\nfunc (b *dataBuffer) Write(p []byte) (int, error) {\n\tntotal := len(p)\n\tfor len(p) > 0 {\n\t\t// If the last chunk is empty, allocate a new chunk. Try to allocate\n\t\t// enough to fully copy p plus any additional bytes we expect to\n\t\t// receive. However, this may allocate less than len(p).\n\t\twant := int64(len(p))\n\t\tif b.expected > want {\n\t\t\twant = b.expected\n\t\t}\n\t\tchunk := b.lastChunkOrAlloc(want)\n\t\tn := copy(chunk[b.w:], p)\n\t\tp = p[n:]\n\t\tb.w += n\n\t\tb.size += n\n\t\tb.expected -= int64(n)\n\t}\n\treturn ntotal, nil\n}\n\nfunc (b *dataBuffer) lastChunkOrAlloc(want int64) []byte {\n\tif len(b.chunks) != 0 {\n\t\tlast := b.chunks[len(b.chunks)-1]\n\t\tif b.w < len(last) {\n\t\t\treturn last\n\t\t}\n\t}\n\tchunk := getDataBufferChunk(want)\n\tb.chunks = append(b.chunks, chunk)\n\tb.w = 0\n\treturn chunk\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/errors.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// An ErrCode is an unsigned 32-bit error code as defined in the HTTP/2 spec.\ntype ErrCode uint32\n\nconst (\n\tErrCodeNo                 ErrCode = 0x0\n\tErrCodeProtocol           ErrCode = 0x1\n\tErrCodeInternal           ErrCode = 0x2\n\tErrCodeFlowControl        ErrCode = 0x3\n\tErrCodeSettingsTimeout    ErrCode = 0x4\n\tErrCodeStreamClosed       ErrCode = 0x5\n\tErrCodeFrameSize          ErrCode = 0x6\n\tErrCodeRefusedStream      ErrCode = 0x7\n\tErrCodeCancel             ErrCode = 0x8\n\tErrCodeCompression        ErrCode = 0x9\n\tErrCodeConnect            ErrCode = 0xa\n\tErrCodeEnhanceYourCalm    ErrCode = 0xb\n\tErrCodeInadequateSecurity ErrCode = 0xc\n\tErrCodeHTTP11Required     ErrCode = 0xd\n)\n\nvar errCodeName = map[ErrCode]string{\n\tErrCodeNo:                 \"NO_ERROR\",\n\tErrCodeProtocol:           \"PROTOCOL_ERROR\",\n\tErrCodeInternal:           \"INTERNAL_ERROR\",\n\tErrCodeFlowControl:        \"FLOW_CONTROL_ERROR\",\n\tErrCodeSettingsTimeout:    \"SETTINGS_TIMEOUT\",\n\tErrCodeStreamClosed:       \"STREAM_CLOSED\",\n\tErrCodeFrameSize:          \"FRAME_SIZE_ERROR\",\n\tErrCodeRefusedStream:      \"REFUSED_STREAM\",\n\tErrCodeCancel:             \"CANCEL\",\n\tErrCodeCompression:        \"COMPRESSION_ERROR\",\n\tErrCodeConnect:            \"CONNECT_ERROR\",\n\tErrCodeEnhanceYourCalm:    \"ENHANCE_YOUR_CALM\",\n\tErrCodeInadequateSecurity: \"INADEQUATE_SECURITY\",\n\tErrCodeHTTP11Required:     \"HTTP_1_1_REQUIRED\",\n}\n\nfunc (e ErrCode) String() string {\n\tif s, ok := errCodeName[e]; ok {\n\t\treturn s\n\t}\n\treturn fmt.Sprintf(\"unknown error code 0x%x\", uint32(e))\n}\n\nfunc (e ErrCode) stringToken() string {\n\tif s, ok := errCodeName[e]; ok {\n\t\treturn s\n\t}\n\treturn fmt.Sprintf(\"ERR_UNKNOWN_%d\", uint32(e))\n}\n\n// ConnectionError is an error that results in the termination of the\n// entire connection.\ntype ConnectionError ErrCode\n\nfunc (e ConnectionError) Error() string { return fmt.Sprintf(\"connection error: %s\", ErrCode(e)) }\n\n// StreamError is an error that only affects one stream within an\n// HTTP/2 connection.\ntype StreamError struct {\n\tStreamID uint32\n\tCode     ErrCode\n\tCause    error // optional additional detail\n}\n\n// errFromPeer is a sentinel error value for StreamError.Cause to\n// indicate that the StreamError was sent from the peer over the wire\n// and wasn't locally generated in the Transport.\nvar errFromPeer = errors.New(\"received from peer\")\n\nfunc streamError(id uint32, code ErrCode) StreamError {\n\treturn StreamError{StreamID: id, Code: code}\n}\n\nfunc (e StreamError) Error() string {\n\tif e.Cause != nil {\n\t\treturn fmt.Sprintf(\"stream error: stream ID %d; %v; %v\", e.StreamID, e.Code, e.Cause)\n\t}\n\treturn fmt.Sprintf(\"stream error: stream ID %d; %v\", e.StreamID, e.Code)\n}\n\n// 6.9.1 The Flow Control Window\n// \"If a sender receives a WINDOW_UPDATE that causes a flow control\n// window to exceed this maximum it MUST terminate either the stream\n// or the connection, as appropriate. For streams, [...]; for the\n// connection, a GOAWAY frame with a FLOW_CONTROL_ERROR code.\"\ntype goAwayFlowError struct{}\n\nfunc (goAwayFlowError) Error() string { return \"connection exceeded flow control window size\" }\n\n// connError represents an HTTP/2 ConnectionError error code, along\n// with a string (for debugging) explaining why.\n//\n// Errors of this type are only returned by the frame parser functions\n// and converted into ConnectionError(Code), after stashing away\n// the Reason into the Framer's errDetail field, accessible via\n// the (*Framer).ErrorDetail method.\ntype connError struct {\n\tCode   ErrCode // the ConnectionError error code\n\tReason string  // additional reason\n}\n\nfunc (e connError) Error() string {\n\treturn fmt.Sprintf(\"http2: connection error: %v: %v\", e.Code, e.Reason)\n}\n\ntype pseudoHeaderError string\n\nfunc (e pseudoHeaderError) Error() string {\n\treturn fmt.Sprintf(\"invalid pseudo-header %q\", string(e))\n}\n\ntype duplicatePseudoHeaderError string\n\nfunc (e duplicatePseudoHeaderError) Error() string {\n\treturn fmt.Sprintf(\"duplicate pseudo-header %q\", string(e))\n}\n\ntype headerFieldNameError string\n\nfunc (e headerFieldNameError) Error() string {\n\treturn fmt.Sprintf(\"invalid header field name %q\", string(e))\n}\n\ntype headerFieldValueError string\n\nfunc (e headerFieldValueError) Error() string {\n\treturn fmt.Sprintf(\"invalid header field value for %q\", string(e))\n}\n\nvar (\n\terrMixPseudoHeaderTypes = errors.New(\"mix of request and response pseudo headers\")\n\terrPseudoAfterRegular   = errors.New(\"pseudo header field after regular\")\n)\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/flow.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Flow control\n\npackage http2\n\n// inflowMinRefresh is the minimum number of bytes we'll send for a\n// flow control window update.\nconst inflowMinRefresh = 4 << 10\n\n// inflow accounts for an inbound flow control window.\n// It tracks both the latest window sent to the peer (used for enforcement)\n// and the accumulated unsent window.\ntype inflow struct {\n\tavail  int32\n\tunsent int32\n}\n\n// init sets the initial window.\nfunc (f *inflow) init(n int32) {\n\tf.avail = n\n}\n\n// add adds n bytes to the window, with a maximum window size of max,\n// indicating that the peer can now send us more data.\n// For example, the user read from a {Request,Response} body and consumed\n// some of the buffered data, so the peer can now send more.\n// It returns the number of bytes to send in a WINDOW_UPDATE frame to the peer.\n// Window updates are accumulated and sent when the unsent capacity\n// is at least inflowMinRefresh or will at least double the peer's available window.\nfunc (f *inflow) add(n int) (connAdd int32) {\n\tif n < 0 {\n\t\tpanic(\"negative update\")\n\t}\n\tunsent := int64(f.unsent) + int64(n)\n\t// \"A sender MUST NOT allow a flow-control window to exceed 2^31-1 octets.\"\n\t// RFC 7540 Section 6.9.1.\n\tconst maxWindow = 1<<31 - 1\n\tif unsent+int64(f.avail) > maxWindow {\n\t\tpanic(\"flow control update exceeds maximum window size\")\n\t}\n\tf.unsent = int32(unsent)\n\tif f.unsent < inflowMinRefresh && f.unsent < f.avail {\n\t\t// If there aren't at least inflowMinRefresh bytes of window to send,\n\t\t// and this update won't at least double the window, buffer the update for later.\n\t\treturn 0\n\t}\n\tf.avail += f.unsent\n\tf.unsent = 0\n\treturn int32(unsent)\n}\n\n// take attempts to take n bytes from the peer's flow control window.\n// It reports whether the window has available capacity.\nfunc (f *inflow) take(n uint32) bool {\n\tif n > uint32(f.avail) {\n\t\treturn false\n\t}\n\tf.avail -= int32(n)\n\treturn true\n}\n\n// takeInflows attempts to take n bytes from two inflows,\n// typically connection-level and stream-level flows.\n// It reports whether both windows have available capacity.\nfunc takeInflows(f1, f2 *inflow, n uint32) bool {\n\tif n > uint32(f1.avail) || n > uint32(f2.avail) {\n\t\treturn false\n\t}\n\tf1.avail -= int32(n)\n\tf2.avail -= int32(n)\n\treturn true\n}\n\n// outflow is the outbound flow control window's size.\ntype outflow struct {\n\t_ incomparable\n\n\t// n is the number of DATA bytes we're allowed to send.\n\t// An outflow is kept both on a conn and a per-stream.\n\tn int32\n\n\t// conn points to the shared connection-level outflow that is\n\t// shared by all streams on that conn. It is nil for the outflow\n\t// that's on the conn directly.\n\tconn *outflow\n}\n\nfunc (f *outflow) setConnFlow(cf *outflow) { f.conn = cf }\n\nfunc (f *outflow) available() int32 {\n\tn := f.n\n\tif f.conn != nil && f.conn.n < n {\n\t\tn = f.conn.n\n\t}\n\treturn n\n}\n\nfunc (f *outflow) take(n int32) {\n\tif n > f.available() {\n\t\tpanic(\"internal error: took too much\")\n\t}\n\tf.n -= n\n\tif f.conn != nil {\n\t\tf.conn.n -= n\n\t}\n}\n\n// add adds n bytes (positive or negative) to the flow control window.\n// It returns false if the sum would exceed 2^31-1.\nfunc (f *outflow) add(n int32) bool {\n\tsum := f.n + n\n\tif (sum > n) == (f.n > 0) {\n\t\tf.n = sum\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/frame.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"golang.org/x/net/http/httpguts\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"golang.org/x/net/internal/httpsfv\"\n)\n\nconst frameHeaderLen = 9\n\nvar padZeros = make([]byte, 255) // zeros for padding\n\n// A FrameType is a registered frame type as defined in\n// https://httpwg.org/specs/rfc7540.html#rfc.section.11.2 and other future\n// RFCs.\ntype FrameType uint8\n\nconst (\n\tFrameData           FrameType = 0x0\n\tFrameHeaders        FrameType = 0x1\n\tFramePriority       FrameType = 0x2\n\tFrameRSTStream      FrameType = 0x3\n\tFrameSettings       FrameType = 0x4\n\tFramePushPromise    FrameType = 0x5\n\tFramePing           FrameType = 0x6\n\tFrameGoAway         FrameType = 0x7\n\tFrameWindowUpdate   FrameType = 0x8\n\tFrameContinuation   FrameType = 0x9\n\tFramePriorityUpdate FrameType = 0x10\n)\n\nvar frameNames = [...]string{\n\tFrameData:           \"DATA\",\n\tFrameHeaders:        \"HEADERS\",\n\tFramePriority:       \"PRIORITY\",\n\tFrameRSTStream:      \"RST_STREAM\",\n\tFrameSettings:       \"SETTINGS\",\n\tFramePushPromise:    \"PUSH_PROMISE\",\n\tFramePing:           \"PING\",\n\tFrameGoAway:         \"GOAWAY\",\n\tFrameWindowUpdate:   \"WINDOW_UPDATE\",\n\tFrameContinuation:   \"CONTINUATION\",\n\tFramePriorityUpdate: \"PRIORITY_UPDATE\",\n}\n\nfunc (t FrameType) String() string {\n\tif int(t) < len(frameNames) {\n\t\treturn frameNames[t]\n\t}\n\treturn fmt.Sprintf(\"UNKNOWN_FRAME_TYPE_%d\", t)\n}\n\n// Flags is a bitmask of HTTP/2 flags.\n// The meaning of flags varies depending on the frame type.\ntype Flags uint8\n\n// Has reports whether f contains all (0 or more) flags in v.\nfunc (f Flags) Has(v Flags) bool {\n\treturn (f & v) == v\n}\n\n// Frame-specific FrameHeader flag bits.\nconst (\n\t// Data Frame\n\tFlagDataEndStream Flags = 0x1\n\tFlagDataPadded    Flags = 0x8\n\n\t// Headers Frame\n\tFlagHeadersEndStream  Flags = 0x1\n\tFlagHeadersEndHeaders Flags = 0x4\n\tFlagHeadersPadded     Flags = 0x8\n\tFlagHeadersPriority   Flags = 0x20\n\n\t// Settings Frame\n\tFlagSettingsAck Flags = 0x1\n\n\t// Ping Frame\n\tFlagPingAck Flags = 0x1\n\n\t// Continuation Frame\n\tFlagContinuationEndHeaders Flags = 0x4\n\n\tFlagPushPromiseEndHeaders Flags = 0x4\n\tFlagPushPromisePadded     Flags = 0x8\n)\n\nvar flagName = map[FrameType]map[Flags]string{\n\tFrameData: {\n\t\tFlagDataEndStream: \"END_STREAM\",\n\t\tFlagDataPadded:    \"PADDED\",\n\t},\n\tFrameHeaders: {\n\t\tFlagHeadersEndStream:  \"END_STREAM\",\n\t\tFlagHeadersEndHeaders: \"END_HEADERS\",\n\t\tFlagHeadersPadded:     \"PADDED\",\n\t\tFlagHeadersPriority:   \"PRIORITY\",\n\t},\n\tFrameSettings: {\n\t\tFlagSettingsAck: \"ACK\",\n\t},\n\tFramePing: {\n\t\tFlagPingAck: \"ACK\",\n\t},\n\tFrameContinuation: {\n\t\tFlagContinuationEndHeaders: \"END_HEADERS\",\n\t},\n\tFramePushPromise: {\n\t\tFlagPushPromiseEndHeaders: \"END_HEADERS\",\n\t\tFlagPushPromisePadded:     \"PADDED\",\n\t},\n}\n\n// a frameParser parses a frame given its FrameHeader and payload\n// bytes. The length of payload will always equal fh.Length (which\n// might be 0).\ntype frameParser func(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error)\n\nvar frameParsers = [...]frameParser{\n\tFrameData:           parseDataFrame,\n\tFrameHeaders:        parseHeadersFrame,\n\tFramePriority:       parsePriorityFrame,\n\tFrameRSTStream:      parseRSTStreamFrame,\n\tFrameSettings:       parseSettingsFrame,\n\tFramePushPromise:    parsePushPromise,\n\tFramePing:           parsePingFrame,\n\tFrameGoAway:         parseGoAwayFrame,\n\tFrameWindowUpdate:   parseWindowUpdateFrame,\n\tFrameContinuation:   parseContinuationFrame,\n\tFramePriorityUpdate: parsePriorityUpdateFrame,\n}\n\nfunc typeFrameParser(t FrameType) frameParser {\n\tif int(t) < len(frameParsers) {\n\t\tif f := frameParsers[t]; f != nil {\n\t\t\treturn f\n\t\t}\n\t}\n\treturn parseUnknownFrame\n}\n\n// A FrameHeader is the 9 byte header of all HTTP/2 frames.\n//\n// See https://httpwg.org/specs/rfc7540.html#FrameHeader\ntype FrameHeader struct {\n\tvalid bool // caller can access []byte fields in the Frame\n\n\t// Type is the 1 byte frame type. There are ten standard frame\n\t// types, but extension frame types may be written by WriteRawFrame\n\t// and will be returned by ReadFrame (as UnknownFrame).\n\tType FrameType\n\n\t// Flags are the 1 byte of 8 potential bit flags per frame.\n\t// They are specific to the frame type.\n\tFlags Flags\n\n\t// Length is the length of the frame, not including the 9 byte header.\n\t// The maximum size is one byte less than 16MB (uint24), but only\n\t// frames up to 16KB are allowed without peer agreement.\n\tLength uint32\n\n\t// StreamID is which stream this frame is for. Certain frames\n\t// are not stream-specific, in which case this field is 0.\n\tStreamID uint32\n}\n\n// Header returns h. It exists so FrameHeaders can be embedded in other\n// specific frame types and implement the Frame interface.\nfunc (h FrameHeader) Header() FrameHeader { return h }\n\nfunc (h FrameHeader) String() string {\n\tvar buf bytes.Buffer\n\tbuf.WriteString(\"[FrameHeader \")\n\th.writeDebug(&buf)\n\tbuf.WriteByte(']')\n\treturn buf.String()\n}\n\nfunc (h FrameHeader) writeDebug(buf *bytes.Buffer) {\n\tbuf.WriteString(h.Type.String())\n\tif h.Flags != 0 {\n\t\tbuf.WriteString(\" flags=\")\n\t\tset := 0\n\t\tfor i := uint8(0); i < 8; i++ {\n\t\t\tif h.Flags&(1<<i) == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tset++\n\t\t\tif set > 1 {\n\t\t\t\tbuf.WriteByte('|')\n\t\t\t}\n\t\t\tname := flagName[h.Type][Flags(1<<i)]\n\t\t\tif name != \"\" {\n\t\t\t\tbuf.WriteString(name)\n\t\t\t} else {\n\t\t\t\tfmt.Fprintf(buf, \"0x%x\", 1<<i)\n\t\t\t}\n\t\t}\n\t}\n\tif h.StreamID != 0 {\n\t\tfmt.Fprintf(buf, \" stream=%d\", h.StreamID)\n\t}\n\tfmt.Fprintf(buf, \" len=%d\", h.Length)\n}\n\nfunc (h *FrameHeader) checkValid() {\n\tif !h.valid {\n\t\tpanic(\"Frame accessor called on non-owned Frame\")\n\t}\n}\n\nfunc (h *FrameHeader) invalidate() { h.valid = false }\n\n// frame header bytes.\n// Used only by ReadFrameHeader.\nvar fhBytes = sync.Pool{\n\tNew: func() interface{} {\n\t\tbuf := make([]byte, frameHeaderLen)\n\t\treturn &buf\n\t},\n}\n\nfunc invalidHTTP1LookingFrameHeader() FrameHeader {\n\tfh, _ := readFrameHeader(make([]byte, frameHeaderLen), strings.NewReader(\"HTTP/1.1 \"))\n\treturn fh\n}\n\n// ReadFrameHeader reads 9 bytes from r and returns a FrameHeader.\n// Most users should use Framer.ReadFrame instead.\nfunc ReadFrameHeader(r io.Reader) (FrameHeader, error) {\n\tbufp := fhBytes.Get().(*[]byte)\n\tdefer fhBytes.Put(bufp)\n\treturn readFrameHeader(*bufp, r)\n}\n\nfunc readFrameHeader(buf []byte, r io.Reader) (FrameHeader, error) {\n\t_, err := io.ReadFull(r, buf[:frameHeaderLen])\n\tif err != nil {\n\t\treturn FrameHeader{}, err\n\t}\n\treturn FrameHeader{\n\t\tLength:   (uint32(buf[0])<<16 | uint32(buf[1])<<8 | uint32(buf[2])),\n\t\tType:     FrameType(buf[3]),\n\t\tFlags:    Flags(buf[4]),\n\t\tStreamID: binary.BigEndian.Uint32(buf[5:]) & (1<<31 - 1),\n\t\tvalid:    true,\n\t}, nil\n}\n\n// A Frame is the base interface implemented by all frame types.\n// Callers will generally type-assert the specific frame type:\n// *HeadersFrame, *SettingsFrame, *WindowUpdateFrame, etc.\n//\n// Frames are only valid until the next call to Framer.ReadFrame.\ntype Frame interface {\n\tHeader() FrameHeader\n\n\t// invalidate is called by Framer.ReadFrame to make this\n\t// frame's buffers as being invalid, since the subsequent\n\t// frame will reuse them.\n\tinvalidate()\n}\n\n// A Framer reads and writes Frames.\ntype Framer struct {\n\tr         io.Reader\n\tlastFrame Frame\n\terrDetail error\n\n\t// countError is a non-nil func that's called on a frame parse\n\t// error with some unique error path token. It's initialized\n\t// from Transport.CountError or Server.CountError.\n\tcountError func(errToken string)\n\n\t// lastHeaderStream is non-zero if the last frame was an\n\t// unfinished HEADERS/CONTINUATION.\n\tlastHeaderStream uint32\n\t// lastFrameType holds the type of the last frame for verifying frame order.\n\tlastFrameType FrameType\n\n\tmaxReadSize uint32\n\theaderBuf   [frameHeaderLen]byte\n\n\t// TODO: let getReadBuf be configurable, and use a less memory-pinning\n\t// allocator in server.go to minimize memory pinned for many idle conns.\n\t// Will probably also need to make frame invalidation have a hook too.\n\tgetReadBuf func(size uint32) []byte\n\treadBuf    []byte // cache for default getReadBuf\n\n\tmaxWriteSize uint32 // zero means unlimited; TODO: implement\n\n\tw    io.Writer\n\twbuf []byte\n\n\t// AllowIllegalWrites permits the Framer's Write methods to\n\t// write frames that do not conform to the HTTP/2 spec. This\n\t// permits using the Framer to test other HTTP/2\n\t// implementations' conformance to the spec.\n\t// If false, the Write methods will prefer to return an error\n\t// rather than comply.\n\tAllowIllegalWrites bool\n\n\t// AllowIllegalReads permits the Framer's ReadFrame method\n\t// to return non-compliant frames or frame orders.\n\t// This is for testing and permits using the Framer to test\n\t// other HTTP/2 implementations' conformance to the spec.\n\t// It is not compatible with ReadMetaHeaders.\n\tAllowIllegalReads bool\n\n\t// ReadMetaHeaders if non-nil causes ReadFrame to merge\n\t// HEADERS and CONTINUATION frames together and return\n\t// MetaHeadersFrame instead.\n\tReadMetaHeaders *hpack.Decoder\n\n\t// MaxHeaderListSize is the http2 MAX_HEADER_LIST_SIZE.\n\t// It's used only if ReadMetaHeaders is set; 0 means a sane default\n\t// (currently 16MB)\n\t// If the limit is hit, MetaHeadersFrame.Truncated is set true.\n\tMaxHeaderListSize uint32\n\n\t// TODO: track which type of frame & with which flags was sent\n\t// last. Then return an error (unless AllowIllegalWrites) if\n\t// we're in the middle of a header block and a\n\t// non-Continuation or Continuation on a different stream is\n\t// attempted to be written.\n\n\tlogReads, logWrites bool\n\n\tdebugFramer       *Framer // only use for logging written writes\n\tdebugFramerBuf    *bytes.Buffer\n\tdebugReadLoggerf  func(string, ...interface{})\n\tdebugWriteLoggerf func(string, ...interface{})\n\n\tframeCache *frameCache // nil if frames aren't reused (default)\n}\n\nfunc (fr *Framer) maxHeaderListSize() uint32 {\n\tif fr.MaxHeaderListSize == 0 {\n\t\treturn 16 << 20 // sane default, per docs\n\t}\n\treturn fr.MaxHeaderListSize\n}\n\nfunc (f *Framer) startWrite(ftype FrameType, flags Flags, streamID uint32) {\n\t// Write the FrameHeader.\n\tf.wbuf = append(f.wbuf[:0],\n\t\t0, // 3 bytes of length, filled in endWrite\n\t\t0,\n\t\t0,\n\t\tbyte(ftype),\n\t\tbyte(flags),\n\t\tbyte(streamID>>24),\n\t\tbyte(streamID>>16),\n\t\tbyte(streamID>>8),\n\t\tbyte(streamID))\n}\n\nfunc (f *Framer) endWrite() error {\n\t// Now that we know the final size, fill in the FrameHeader in\n\t// the space previously reserved for it. Abuse append.\n\tlength := len(f.wbuf) - frameHeaderLen\n\tif length >= (1 << 24) {\n\t\treturn ErrFrameTooLarge\n\t}\n\t_ = append(f.wbuf[:0],\n\t\tbyte(length>>16),\n\t\tbyte(length>>8),\n\t\tbyte(length))\n\tif f.logWrites {\n\t\tf.logWrite()\n\t}\n\n\tn, err := f.w.Write(f.wbuf)\n\tif err == nil && n != len(f.wbuf) {\n\t\terr = io.ErrShortWrite\n\t}\n\treturn err\n}\n\nfunc (f *Framer) logWrite() {\n\tif f.debugFramer == nil {\n\t\tf.debugFramerBuf = new(bytes.Buffer)\n\t\tf.debugFramer = NewFramer(nil, f.debugFramerBuf)\n\t\tf.debugFramer.logReads = false // we log it ourselves, saying \"wrote\" below\n\t\t// Let us read anything, even if we accidentally wrote it\n\t\t// in the wrong order:\n\t\tf.debugFramer.AllowIllegalReads = true\n\t}\n\tf.debugFramerBuf.Write(f.wbuf)\n\tfr, err := f.debugFramer.ReadFrame()\n\tif err != nil {\n\t\tf.debugWriteLoggerf(\"http2: Framer %p: failed to decode just-written frame\", f)\n\t\treturn\n\t}\n\tf.debugWriteLoggerf(\"http2: Framer %p: wrote %v\", f, summarizeFrame(fr))\n}\n\nfunc (f *Framer) writeByte(v byte)     { f.wbuf = append(f.wbuf, v) }\nfunc (f *Framer) writeBytes(v []byte)  { f.wbuf = append(f.wbuf, v...) }\nfunc (f *Framer) writeUint16(v uint16) { f.wbuf = append(f.wbuf, byte(v>>8), byte(v)) }\nfunc (f *Framer) writeUint32(v uint32) {\n\tf.wbuf = append(f.wbuf, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))\n}\n\nconst (\n\tminMaxFrameSize = 1 << 14\n\tmaxFrameSize    = 1<<24 - 1\n)\n\n// SetReuseFrames allows the Framer to reuse Frames.\n// If called on a Framer, Frames returned by calls to ReadFrame are only\n// valid until the next call to ReadFrame.\nfunc (fr *Framer) SetReuseFrames() {\n\tif fr.frameCache != nil {\n\t\treturn\n\t}\n\tfr.frameCache = &frameCache{}\n}\n\ntype frameCache struct {\n\tdataFrame DataFrame\n}\n\nfunc (fc *frameCache) getDataFrame() *DataFrame {\n\tif fc == nil {\n\t\treturn &DataFrame{}\n\t}\n\treturn &fc.dataFrame\n}\n\n// NewFramer returns a Framer that writes frames to w and reads them from r.\nfunc NewFramer(w io.Writer, r io.Reader) *Framer {\n\tfr := &Framer{\n\t\tw:                 w,\n\t\tr:                 r,\n\t\tcountError:        func(string) {},\n\t\tlogReads:          logFrameReads,\n\t\tlogWrites:         logFrameWrites,\n\t\tdebugReadLoggerf:  log.Printf,\n\t\tdebugWriteLoggerf: log.Printf,\n\t}\n\tfr.getReadBuf = func(size uint32) []byte {\n\t\tif cap(fr.readBuf) >= int(size) {\n\t\t\treturn fr.readBuf[:size]\n\t\t}\n\t\tfr.readBuf = make([]byte, size)\n\t\treturn fr.readBuf\n\t}\n\tfr.SetMaxReadFrameSize(maxFrameSize)\n\treturn fr\n}\n\n// SetMaxReadFrameSize sets the maximum size of a frame\n// that will be read by a subsequent call to ReadFrame.\n// It is the caller's responsibility to advertise this\n// limit with a SETTINGS frame.\nfunc (fr *Framer) SetMaxReadFrameSize(v uint32) {\n\tif v > maxFrameSize {\n\t\tv = maxFrameSize\n\t}\n\tfr.maxReadSize = v\n}\n\n// ErrorDetail returns a more detailed error of the last error\n// returned by Framer.ReadFrame. For instance, if ReadFrame\n// returns a StreamError with code PROTOCOL_ERROR, ErrorDetail\n// will say exactly what was invalid. ErrorDetail is not guaranteed\n// to return a non-nil value and like the rest of the http2 package,\n// its return value is not protected by an API compatibility promise.\n// ErrorDetail is reset after the next call to ReadFrame.\nfunc (fr *Framer) ErrorDetail() error {\n\treturn fr.errDetail\n}\n\n// ErrFrameTooLarge is returned from Framer.ReadFrame when the peer\n// sends a frame that is larger than declared with SetMaxReadFrameSize.\nvar ErrFrameTooLarge = errors.New(\"http2: frame too large\")\n\n// terminalReadFrameError reports whether err is an unrecoverable\n// error from ReadFrame and no other frames should be read.\nfunc terminalReadFrameError(err error) bool {\n\tif _, ok := err.(StreamError); ok {\n\t\treturn false\n\t}\n\treturn err != nil\n}\n\n// ReadFrameHeader reads the header of the next frame.\n// It reads the 9-byte fixed frame header, and does not read any portion of the\n// frame payload. The caller is responsible for consuming the payload, either\n// with ReadFrameForHeader or directly from the Framer's io.Reader.\n//\n// If the frame is larger than previously set with SetMaxReadFrameSize, it\n// returns the frame header and ErrFrameTooLarge.\n//\n// If the returned FrameHeader.StreamID is non-zero, it indicates the stream\n// responsible for the error.\nfunc (fr *Framer) ReadFrameHeader() (FrameHeader, error) {\n\tfr.errDetail = nil\n\tfh, err := readFrameHeader(fr.headerBuf[:], fr.r)\n\tif err != nil {\n\t\treturn fh, err\n\t}\n\tif fh.Length > fr.maxReadSize {\n\t\tif fh == invalidHTTP1LookingFrameHeader() {\n\t\t\treturn fh, fmt.Errorf(\"http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header\", ErrFrameTooLarge)\n\t\t}\n\t\treturn fh, ErrFrameTooLarge\n\t}\n\tif err := fr.checkFrameOrder(fh); err != nil {\n\t\treturn fh, err\n\t}\n\treturn fh, nil\n}\n\n// ReadFrameForHeader reads the payload for the frame with the given FrameHeader.\n//\n// It behaves identically to ReadFrame, other than not checking the maximum\n// frame size.\nfunc (fr *Framer) ReadFrameForHeader(fh FrameHeader) (Frame, error) {\n\tif fr.lastFrame != nil {\n\t\tfr.lastFrame.invalidate()\n\t}\n\tpayload := fr.getReadBuf(fh.Length)\n\tif _, err := io.ReadFull(fr.r, payload); err != nil {\n\t\tif fh == invalidHTTP1LookingFrameHeader() {\n\t\t\treturn nil, fmt.Errorf(\"http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header\", err)\n\t\t}\n\t\treturn nil, err\n\t}\n\tf, err := typeFrameParser(fh.Type)(fr.frameCache, fh, fr.countError, payload)\n\tif err != nil {\n\t\tif ce, ok := err.(connError); ok {\n\t\t\treturn nil, fr.connError(ce.Code, ce.Reason)\n\t\t}\n\t\treturn nil, err\n\t}\n\tfr.lastFrame = f\n\tif fr.logReads {\n\t\tfr.debugReadLoggerf(\"http2: Framer %p: read %v\", fr, summarizeFrame(f))\n\t}\n\tif fh.Type == FrameHeaders && fr.ReadMetaHeaders != nil {\n\t\treturn fr.readMetaFrame(f.(*HeadersFrame))\n\t}\n\treturn f, nil\n}\n\n// ReadFrame reads a single frame. The returned Frame is only valid\n// until the next call to ReadFrame or ReadFrameBodyForHeader.\n//\n// If the frame is larger than previously set with SetMaxReadFrameSize, the\n// returned error is ErrFrameTooLarge. Other errors may be of type\n// ConnectionError, StreamError, or anything else from the underlying\n// reader.\n//\n// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID\n// indicates the stream responsible for the error.\nfunc (fr *Framer) ReadFrame() (Frame, error) {\n\tfh, err := fr.ReadFrameHeader()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fr.ReadFrameForHeader(fh)\n}\n\n// connError returns ConnectionError(code) but first\n// stashes away a public reason to the caller can optionally relay it\n// to the peer before hanging up on them. This might help others debug\n// their implementations.\nfunc (fr *Framer) connError(code ErrCode, reason string) error {\n\tfr.errDetail = errors.New(reason)\n\treturn ConnectionError(code)\n}\n\n// checkFrameOrder reports an error if f is an invalid frame to return\n// next from ReadFrame. Mostly it checks whether HEADERS and\n// CONTINUATION frames are contiguous.\nfunc (fr *Framer) checkFrameOrder(fh FrameHeader) error {\n\tlastType := fr.lastFrameType\n\tfr.lastFrameType = fh.Type\n\tif fr.AllowIllegalReads {\n\t\treturn nil\n\t}\n\n\tif fr.lastHeaderStream != 0 {\n\t\tif fh.Type != FrameContinuation {\n\t\t\treturn fr.connError(ErrCodeProtocol,\n\t\t\t\tfmt.Sprintf(\"got %s for stream %d; expected CONTINUATION following %s for stream %d\",\n\t\t\t\t\tfh.Type, fh.StreamID,\n\t\t\t\t\tlastType, fr.lastHeaderStream))\n\t\t}\n\t\tif fh.StreamID != fr.lastHeaderStream {\n\t\t\treturn fr.connError(ErrCodeProtocol,\n\t\t\t\tfmt.Sprintf(\"got CONTINUATION for stream %d; expected stream %d\",\n\t\t\t\t\tfh.StreamID, fr.lastHeaderStream))\n\t\t}\n\t} else if fh.Type == FrameContinuation {\n\t\treturn fr.connError(ErrCodeProtocol, fmt.Sprintf(\"unexpected CONTINUATION for stream %d\", fh.StreamID))\n\t}\n\n\tswitch fh.Type {\n\tcase FrameHeaders, FrameContinuation:\n\t\tif fh.Flags.Has(FlagHeadersEndHeaders) {\n\t\t\tfr.lastHeaderStream = 0\n\t\t} else {\n\t\t\tfr.lastHeaderStream = fh.StreamID\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// A DataFrame conveys arbitrary, variable-length sequences of octets\n// associated with a stream.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.1\ntype DataFrame struct {\n\tFrameHeader\n\tdata []byte\n}\n\nfunc (f *DataFrame) StreamEnded() bool {\n\treturn f.FrameHeader.Flags.Has(FlagDataEndStream)\n}\n\n// Data returns the frame's data octets, not including any padding\n// size byte or padding suffix bytes.\n// The caller must not retain the returned memory past the next\n// call to ReadFrame.\nfunc (f *DataFrame) Data() []byte {\n\tf.checkValid()\n\treturn f.data\n}\n\nfunc parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {\n\tif fh.StreamID == 0 {\n\t\t// DATA frames MUST be associated with a stream. If a\n\t\t// DATA frame is received whose stream identifier\n\t\t// field is 0x0, the recipient MUST respond with a\n\t\t// connection error (Section 5.4.1) of type\n\t\t// PROTOCOL_ERROR.\n\t\tcountError(\"frame_data_stream_0\")\n\t\treturn nil, connError{ErrCodeProtocol, \"DATA frame with stream ID 0\"}\n\t}\n\tf := fc.getDataFrame()\n\tf.FrameHeader = fh\n\n\tvar padSize byte\n\tif fh.Flags.Has(FlagDataPadded) {\n\t\tvar err error\n\t\tpayload, padSize, err = readByte(payload)\n\t\tif err != nil {\n\t\t\tcountError(\"frame_data_pad_byte_short\")\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif int(padSize) > len(payload) {\n\t\t// If the length of the padding is greater than the\n\t\t// length of the frame payload, the recipient MUST\n\t\t// treat this as a connection error.\n\t\t// Filed: https://github.com/http2/http2-spec/issues/610\n\t\tcountError(\"frame_data_pad_too_big\")\n\t\treturn nil, connError{ErrCodeProtocol, \"pad size larger than data payload\"}\n\t}\n\tf.data = payload[:len(payload)-int(padSize)]\n\treturn f, nil\n}\n\nvar (\n\terrStreamID    = errors.New(\"invalid stream ID\")\n\terrDepStreamID = errors.New(\"invalid dependent stream ID\")\n\terrPadLength   = errors.New(\"pad length too large\")\n\terrPadBytes    = errors.New(\"padding bytes must all be zeros unless AllowIllegalWrites is enabled\")\n)\n\nfunc validStreamIDOrZero(streamID uint32) bool {\n\treturn streamID&(1<<31) == 0\n}\n\nfunc validStreamID(streamID uint32) bool {\n\treturn streamID != 0 && streamID&(1<<31) == 0\n}\n\n// WriteData writes a DATA frame.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility not to violate the maximum frame size\n// and to not call other Write methods concurrently.\nfunc (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error {\n\treturn f.WriteDataPadded(streamID, endStream, data, nil)\n}\n\n// WriteDataPadded writes a DATA frame with optional padding.\n//\n// If pad is nil, the padding bit is not sent.\n// The length of pad must not exceed 255 bytes.\n// The bytes of pad must all be zero, unless f.AllowIllegalWrites is set.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility not to violate the maximum frame size\n// and to not call other Write methods concurrently.\nfunc (f *Framer) WriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {\n\tif err := f.startWriteDataPadded(streamID, endStream, data, pad); err != nil {\n\t\treturn err\n\t}\n\treturn f.endWrite()\n}\n\n// startWriteDataPadded is WriteDataPadded, but only writes the frame to the Framer's internal buffer.\n// The caller should call endWrite to flush the frame to the underlying writer.\nfunc (f *Framer) startWriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {\n\tif !validStreamID(streamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tif len(pad) > 0 {\n\t\tif len(pad) > 255 {\n\t\t\treturn errPadLength\n\t\t}\n\t\tif !f.AllowIllegalWrites {\n\t\t\tfor _, b := range pad {\n\t\t\t\tif b != 0 {\n\t\t\t\t\t// \"Padding octets MUST be set to zero when sending.\"\n\t\t\t\t\treturn errPadBytes\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tvar flags Flags\n\tif endStream {\n\t\tflags |= FlagDataEndStream\n\t}\n\tif pad != nil {\n\t\tflags |= FlagDataPadded\n\t}\n\tf.startWrite(FrameData, flags, streamID)\n\tif pad != nil {\n\t\tf.wbuf = append(f.wbuf, byte(len(pad)))\n\t}\n\tf.wbuf = append(f.wbuf, data...)\n\tf.wbuf = append(f.wbuf, pad...)\n\treturn nil\n}\n\n// A SettingsFrame conveys configuration parameters that affect how\n// endpoints communicate, such as preferences and constraints on peer\n// behavior.\n//\n// See https://httpwg.org/specs/rfc7540.html#SETTINGS\ntype SettingsFrame struct {\n\tFrameHeader\n\tp []byte\n}\n\nfunc parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\tif fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 {\n\t\t// When this (ACK 0x1) bit is set, the payload of the\n\t\t// SETTINGS frame MUST be empty. Receipt of a\n\t\t// SETTINGS frame with the ACK flag set and a length\n\t\t// field value other than 0 MUST be treated as a\n\t\t// connection error (Section 5.4.1) of type\n\t\t// FRAME_SIZE_ERROR.\n\t\tcountError(\"frame_settings_ack_with_length\")\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\tif fh.StreamID != 0 {\n\t\t// SETTINGS frames always apply to a connection,\n\t\t// never a single stream. The stream identifier for a\n\t\t// SETTINGS frame MUST be zero (0x0).  If an endpoint\n\t\t// receives a SETTINGS frame whose stream identifier\n\t\t// field is anything other than 0x0, the endpoint MUST\n\t\t// respond with a connection error (Section 5.4.1) of\n\t\t// type PROTOCOL_ERROR.\n\t\tcountError(\"frame_settings_has_stream\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\tif len(p)%6 != 0 {\n\t\tcountError(\"frame_settings_mod_6\")\n\t\t// Expecting even number of 6 byte settings.\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\tf := &SettingsFrame{FrameHeader: fh, p: p}\n\tif v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 {\n\t\tcountError(\"frame_settings_window_size_too_big\")\n\t\t// Values above the maximum flow control window size of 2^31 - 1 MUST\n\t\t// be treated as a connection error (Section 5.4.1) of type\n\t\t// FLOW_CONTROL_ERROR.\n\t\treturn nil, ConnectionError(ErrCodeFlowControl)\n\t}\n\treturn f, nil\n}\n\nfunc (f *SettingsFrame) IsAck() bool {\n\treturn f.FrameHeader.Flags.Has(FlagSettingsAck)\n}\n\nfunc (f *SettingsFrame) Value(id SettingID) (v uint32, ok bool) {\n\tf.checkValid()\n\tfor i := 0; i < f.NumSettings(); i++ {\n\t\tif s := f.Setting(i); s.ID == id {\n\t\t\treturn s.Val, true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// Setting returns the setting from the frame at the given 0-based index.\n// The index must be >= 0 and less than f.NumSettings().\nfunc (f *SettingsFrame) Setting(i int) Setting {\n\tbuf := f.p\n\treturn Setting{\n\t\tID:  SettingID(binary.BigEndian.Uint16(buf[i*6 : i*6+2])),\n\t\tVal: binary.BigEndian.Uint32(buf[i*6+2 : i*6+6]),\n\t}\n}\n\nfunc (f *SettingsFrame) NumSettings() int { return len(f.p) / 6 }\n\n// HasDuplicates reports whether f contains any duplicate setting IDs.\nfunc (f *SettingsFrame) HasDuplicates() bool {\n\tnum := f.NumSettings()\n\tif num == 0 {\n\t\treturn false\n\t}\n\t// If it's small enough (the common case), just do the n^2\n\t// thing and avoid a map allocation.\n\tif num < 10 {\n\t\tfor i := 0; i < num; i++ {\n\t\t\tidi := f.Setting(i).ID\n\t\t\tfor j := i + 1; j < num; j++ {\n\t\t\t\tidj := f.Setting(j).ID\n\t\t\t\tif idi == idj {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\tseen := map[SettingID]bool{}\n\tfor i := 0; i < num; i++ {\n\t\tid := f.Setting(i).ID\n\t\tif seen[id] {\n\t\t\treturn true\n\t\t}\n\t\tseen[id] = true\n\t}\n\treturn false\n}\n\n// ForeachSetting runs fn for each setting.\n// It stops and returns the first error.\nfunc (f *SettingsFrame) ForeachSetting(fn func(Setting) error) error {\n\tf.checkValid()\n\tfor i := 0; i < f.NumSettings(); i++ {\n\t\tif err := fn(f.Setting(i)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// WriteSettings writes a SETTINGS frame with zero or more settings\n// specified and the ACK bit not set.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WriteSettings(settings ...Setting) error {\n\tf.startWrite(FrameSettings, 0, 0)\n\tfor _, s := range settings {\n\t\tf.writeUint16(uint16(s.ID))\n\t\tf.writeUint32(s.Val)\n\t}\n\treturn f.endWrite()\n}\n\n// WriteSettingsAck writes an empty SETTINGS frame with the ACK bit set.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WriteSettingsAck() error {\n\tf.startWrite(FrameSettings, FlagSettingsAck, 0)\n\treturn f.endWrite()\n}\n\n// A PingFrame is a mechanism for measuring a minimal round trip time\n// from the sender, as well as determining whether an idle connection\n// is still functional.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.7\ntype PingFrame struct {\n\tFrameHeader\n\tData [8]byte\n}\n\nfunc (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) }\n\nfunc parsePingFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {\n\tif len(payload) != 8 {\n\t\tcountError(\"frame_ping_length\")\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\tif fh.StreamID != 0 {\n\t\tcountError(\"frame_ping_has_stream\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\tf := &PingFrame{FrameHeader: fh}\n\tcopy(f.Data[:], payload)\n\treturn f, nil\n}\n\nfunc (f *Framer) WritePing(ack bool, data [8]byte) error {\n\tvar flags Flags\n\tif ack {\n\t\tflags = FlagPingAck\n\t}\n\tf.startWrite(FramePing, flags, 0)\n\tf.writeBytes(data[:])\n\treturn f.endWrite()\n}\n\n// A GoAwayFrame informs the remote peer to stop creating streams on this connection.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.8\ntype GoAwayFrame struct {\n\tFrameHeader\n\tLastStreamID uint32\n\tErrCode      ErrCode\n\tdebugData    []byte\n}\n\n// DebugData returns any debug data in the GOAWAY frame. Its contents\n// are not defined.\n// The caller must not retain the returned memory past the next\n// call to ReadFrame.\nfunc (f *GoAwayFrame) DebugData() []byte {\n\tf.checkValid()\n\treturn f.debugData\n}\n\nfunc parseGoAwayFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\tif fh.StreamID != 0 {\n\t\tcountError(\"frame_goaway_has_stream\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\tif len(p) < 8 {\n\t\tcountError(\"frame_goaway_short\")\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\treturn &GoAwayFrame{\n\t\tFrameHeader:  fh,\n\t\tLastStreamID: binary.BigEndian.Uint32(p[:4]) & (1<<31 - 1),\n\t\tErrCode:      ErrCode(binary.BigEndian.Uint32(p[4:8])),\n\t\tdebugData:    p[8:],\n\t}, nil\n}\n\nfunc (f *Framer) WriteGoAway(maxStreamID uint32, code ErrCode, debugData []byte) error {\n\tf.startWrite(FrameGoAway, 0, 0)\n\tf.writeUint32(maxStreamID & (1<<31 - 1))\n\tf.writeUint32(uint32(code))\n\tf.writeBytes(debugData)\n\treturn f.endWrite()\n}\n\n// An UnknownFrame is the frame type returned when the frame type is unknown\n// or no specific frame type parser exists.\ntype UnknownFrame struct {\n\tFrameHeader\n\tp []byte\n}\n\n// Payload returns the frame's payload (after the header).  It is not\n// valid to call this method after a subsequent call to\n// Framer.ReadFrame, nor is it valid to retain the returned slice.\n// The memory is owned by the Framer and is invalidated when the next\n// frame is read.\nfunc (f *UnknownFrame) Payload() []byte {\n\tf.checkValid()\n\treturn f.p\n}\n\nfunc parseUnknownFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\treturn &UnknownFrame{fh, p}, nil\n}\n\n// A WindowUpdateFrame is used to implement flow control.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.9\ntype WindowUpdateFrame struct {\n\tFrameHeader\n\tIncrement uint32 // never read with high bit set\n}\n\nfunc parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\tif len(p) != 4 {\n\t\tcountError(\"frame_windowupdate_bad_len\")\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\tinc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit\n\tif inc == 0 {\n\t\t// A receiver MUST treat the receipt of a\n\t\t// WINDOW_UPDATE frame with an flow control window\n\t\t// increment of 0 as a stream error (Section 5.4.2) of\n\t\t// type PROTOCOL_ERROR; errors on the connection flow\n\t\t// control window MUST be treated as a connection\n\t\t// error (Section 5.4.1).\n\t\tif fh.StreamID == 0 {\n\t\t\tcountError(\"frame_windowupdate_zero_inc_conn\")\n\t\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t\t}\n\t\tcountError(\"frame_windowupdate_zero_inc_stream\")\n\t\treturn nil, streamError(fh.StreamID, ErrCodeProtocol)\n\t}\n\treturn &WindowUpdateFrame{\n\t\tFrameHeader: fh,\n\t\tIncrement:   inc,\n\t}, nil\n}\n\n// WriteWindowUpdate writes a WINDOW_UPDATE frame.\n// The increment value must be between 1 and 2,147,483,647, inclusive.\n// If the Stream ID is zero, the window update applies to the\n// connection as a whole.\nfunc (f *Framer) WriteWindowUpdate(streamID, incr uint32) error {\n\t// \"The legal range for the increment to the flow control window is 1 to 2^31-1 (2,147,483,647) octets.\"\n\tif (incr < 1 || incr > 2147483647) && !f.AllowIllegalWrites {\n\t\treturn errors.New(\"illegal window increment value\")\n\t}\n\tf.startWrite(FrameWindowUpdate, 0, streamID)\n\tf.writeUint32(incr)\n\treturn f.endWrite()\n}\n\n// A HeadersFrame is used to open a stream and additionally carries a\n// header block fragment.\ntype HeadersFrame struct {\n\tFrameHeader\n\n\t// Priority is set if FlagHeadersPriority is set in the FrameHeader.\n\tPriority PriorityParam\n\n\theaderFragBuf []byte // not owned\n}\n\nfunc (f *HeadersFrame) HeaderBlockFragment() []byte {\n\tf.checkValid()\n\treturn f.headerFragBuf\n}\n\nfunc (f *HeadersFrame) HeadersEnded() bool {\n\treturn f.FrameHeader.Flags.Has(FlagHeadersEndHeaders)\n}\n\nfunc (f *HeadersFrame) StreamEnded() bool {\n\treturn f.FrameHeader.Flags.Has(FlagHeadersEndStream)\n}\n\nfunc (f *HeadersFrame) HasPriority() bool {\n\treturn f.FrameHeader.Flags.Has(FlagHeadersPriority)\n}\n\nfunc parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {\n\thf := &HeadersFrame{\n\t\tFrameHeader: fh,\n\t}\n\tif fh.StreamID == 0 {\n\t\t// HEADERS frames MUST be associated with a stream. If a HEADERS frame\n\t\t// is received whose stream identifier field is 0x0, the recipient MUST\n\t\t// respond with a connection error (Section 5.4.1) of type\n\t\t// PROTOCOL_ERROR.\n\t\tcountError(\"frame_headers_zero_stream\")\n\t\treturn nil, connError{ErrCodeProtocol, \"HEADERS frame with stream ID 0\"}\n\t}\n\tvar padLength uint8\n\tif fh.Flags.Has(FlagHeadersPadded) {\n\t\tif p, padLength, err = readByte(p); err != nil {\n\t\t\tcountError(\"frame_headers_pad_short\")\n\t\t\treturn\n\t\t}\n\t}\n\tif fh.Flags.Has(FlagHeadersPriority) {\n\t\tvar v uint32\n\t\tp, v, err = readUint32(p)\n\t\tif err != nil {\n\t\t\tcountError(\"frame_headers_prio_short\")\n\t\t\treturn nil, err\n\t\t}\n\t\thf.Priority.StreamDep = v & 0x7fffffff\n\t\thf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set\n\t\tp, hf.Priority.Weight, err = readByte(p)\n\t\tif err != nil {\n\t\t\tcountError(\"frame_headers_prio_weight_short\")\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif len(p)-int(padLength) < 0 {\n\t\tcountError(\"frame_headers_pad_too_big\")\n\t\treturn nil, streamError(fh.StreamID, ErrCodeProtocol)\n\t}\n\thf.headerFragBuf = p[:len(p)-int(padLength)]\n\treturn hf, nil\n}\n\n// HeadersFrameParam are the parameters for writing a HEADERS frame.\ntype HeadersFrameParam struct {\n\t// StreamID is the required Stream ID to initiate.\n\tStreamID uint32\n\t// BlockFragment is part (or all) of a Header Block.\n\tBlockFragment []byte\n\n\t// EndStream indicates that the header block is the last that\n\t// the endpoint will send for the identified stream. Setting\n\t// this flag causes the stream to enter one of \"half closed\"\n\t// states.\n\tEndStream bool\n\n\t// EndHeaders indicates that this frame contains an entire\n\t// header block and is not followed by any\n\t// CONTINUATION frames.\n\tEndHeaders bool\n\n\t// PadLength is the optional number of bytes of zeros to add\n\t// to this frame.\n\tPadLength uint8\n\n\t// Priority, if non-zero, includes stream priority information\n\t// in the HEADER frame.\n\tPriority PriorityParam\n}\n\n// WriteHeaders writes a single HEADERS frame.\n//\n// This is a low-level header writing method. Encoding headers and\n// splitting them into any necessary CONTINUATION frames is handled\n// elsewhere.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WriteHeaders(p HeadersFrameParam) error {\n\tif !validStreamID(p.StreamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tvar flags Flags\n\tif p.PadLength != 0 {\n\t\tflags |= FlagHeadersPadded\n\t}\n\tif p.EndStream {\n\t\tflags |= FlagHeadersEndStream\n\t}\n\tif p.EndHeaders {\n\t\tflags |= FlagHeadersEndHeaders\n\t}\n\tif !p.Priority.IsZero() {\n\t\tflags |= FlagHeadersPriority\n\t}\n\tf.startWrite(FrameHeaders, flags, p.StreamID)\n\tif p.PadLength != 0 {\n\t\tf.writeByte(p.PadLength)\n\t}\n\tif !p.Priority.IsZero() {\n\t\tv := p.Priority.StreamDep\n\t\tif !validStreamIDOrZero(v) && !f.AllowIllegalWrites {\n\t\t\treturn errDepStreamID\n\t\t}\n\t\tif p.Priority.Exclusive {\n\t\t\tv |= 1 << 31\n\t\t}\n\t\tf.writeUint32(v)\n\t\tf.writeByte(p.Priority.Weight)\n\t}\n\tf.wbuf = append(f.wbuf, p.BlockFragment...)\n\tf.wbuf = append(f.wbuf, padZeros[:p.PadLength]...)\n\treturn f.endWrite()\n}\n\n// A PriorityFrame specifies the sender-advised priority of a stream.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.3\ntype PriorityFrame struct {\n\tFrameHeader\n\tPriorityParam\n}\n\n// defaultRFC9218Priority determines what priority we should use as the default\n// value.\n//\n// According to RFC 9218, by default, streams should be given an urgency of 3\n// and should be non-incremental. However, making streams non-incremental by\n// default would be a huge change to our historical behavior where we would\n// round-robin writes across streams. When streams are non-incremental, we\n// would process streams of the same urgency one-by-one to completion instead.\n//\n// To avoid such a sudden change which might break some HTTP/2 users, this\n// function allows the caller to specify whether they can actually use the\n// default value as specified in RFC 9218. If not, this function will return a\n// priority value where streams are incremental by default instead: effectively\n// a round-robin between stream of the same urgency.\n//\n// As an example, a server might not be able to use the RFC 9218 default value\n// when it's not sure that the client it is serving is aware of RFC 9218.\nfunc defaultRFC9218Priority(canUseDefault bool) PriorityParam {\n\tif canUseDefault {\n\t\treturn PriorityParam{\n\t\t\turgency:     3,\n\t\t\tincremental: 0,\n\t\t}\n\t}\n\treturn PriorityParam{\n\t\turgency:     3,\n\t\tincremental: 1,\n\t}\n}\n\n// Note that HTTP/2 has had two different prioritization schemes, and\n// PriorityParam struct below is a superset of both schemes. The exported\n// symbols are from RFC 7540 and the non-exported ones are from RFC 9218.\n\n// PriorityParam are the stream prioritization parameters.\ntype PriorityParam struct {\n\t// StreamDep is a 31-bit stream identifier for the\n\t// stream that this stream depends on. Zero means no\n\t// dependency.\n\tStreamDep uint32\n\n\t// Exclusive is whether the dependency is exclusive.\n\tExclusive bool\n\n\t// Weight is the stream's zero-indexed weight. It should be\n\t// set together with StreamDep, or neither should be set. Per\n\t// the spec, \"Add one to the value to obtain a weight between\n\t// 1 and 256.\"\n\tWeight uint8\n\n\t// \"The urgency (u) parameter value is Integer (see Section 3.3.1 of\n\t// [STRUCTURED-FIELDS]), between 0 and 7 inclusive, in descending order of\n\t// priority. The default is 3.\"\n\turgency uint8\n\n\t// \"The incremental (i) parameter value is Boolean (see Section 3.3.6 of\n\t// [STRUCTURED-FIELDS]). It indicates if an HTTP response can be processed\n\t// incrementally, i.e., provide some meaningful output as chunks of the\n\t// response arrive.\"\n\t//\n\t// We use uint8 (i.e. 0 is false, 1 is true) instead of bool so we can\n\t// avoid unnecessary type conversions and because either type takes 1 byte.\n\tincremental uint8\n}\n\nfunc (p PriorityParam) IsZero() bool {\n\treturn p == PriorityParam{}\n}\n\nfunc parsePriorityFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {\n\tif fh.StreamID == 0 {\n\t\tcountError(\"frame_priority_zero_stream\")\n\t\treturn nil, connError{ErrCodeProtocol, \"PRIORITY frame with stream ID 0\"}\n\t}\n\tif len(payload) != 5 {\n\t\tcountError(\"frame_priority_bad_length\")\n\t\treturn nil, connError{ErrCodeFrameSize, fmt.Sprintf(\"PRIORITY frame payload size was %d; want 5\", len(payload))}\n\t}\n\tv := binary.BigEndian.Uint32(payload[:4])\n\tstreamID := v & 0x7fffffff // mask off high bit\n\treturn &PriorityFrame{\n\t\tFrameHeader: fh,\n\t\tPriorityParam: PriorityParam{\n\t\t\tWeight:    payload[4],\n\t\t\tStreamDep: streamID,\n\t\t\tExclusive: streamID != v, // was high bit set?\n\t\t},\n\t}, nil\n}\n\n// WritePriority writes a PRIORITY frame.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WritePriority(streamID uint32, p PriorityParam) error {\n\tif !validStreamID(streamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tif !validStreamIDOrZero(p.StreamDep) {\n\t\treturn errDepStreamID\n\t}\n\tf.startWrite(FramePriority, 0, streamID)\n\tv := p.StreamDep\n\tif p.Exclusive {\n\t\tv |= 1 << 31\n\t}\n\tf.writeUint32(v)\n\tf.writeByte(p.Weight)\n\treturn f.endWrite()\n}\n\n// PriorityUpdateFrame is a PRIORITY_UPDATE frame as described in\n// https://www.rfc-editor.org/rfc/rfc9218.html#name-the-priority_update-frame.\ntype PriorityUpdateFrame struct {\n\tFrameHeader\n\tPriority            string\n\tPrioritizedStreamID uint32\n}\n\nfunc parseRFC9218Priority(s string, canUseDefault bool) (p PriorityParam, ok bool) {\n\tp = defaultRFC9218Priority(canUseDefault)\n\tok = httpsfv.ParseDictionary(s, func(key, val, _ string) {\n\t\tswitch key {\n\t\tcase \"u\":\n\t\t\tif u, ok := httpsfv.ParseInteger(val); ok && u >= 0 && u <= 7 {\n\t\t\t\tp.urgency = uint8(u)\n\t\t\t}\n\t\tcase \"i\":\n\t\t\tif i, ok := httpsfv.ParseBoolean(val); ok {\n\t\t\t\tif i {\n\t\t\t\t\tp.incremental = 1\n\t\t\t\t} else {\n\t\t\t\t\tp.incremental = 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif !ok {\n\t\treturn defaultRFC9218Priority(canUseDefault), ok\n\t}\n\treturn p, true\n}\n\nfunc parsePriorityUpdateFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {\n\tif fh.StreamID != 0 {\n\t\tcountError(\"frame_priority_update_non_zero_stream\")\n\t\treturn nil, connError{ErrCodeProtocol, \"PRIORITY_UPDATE frame with non-zero stream ID\"}\n\t}\n\tif len(payload) < 4 {\n\t\tcountError(\"frame_priority_update_bad_length\")\n\t\treturn nil, connError{ErrCodeFrameSize, fmt.Sprintf(\"PRIORITY_UPDATE frame payload size was %d; want at least 4\", len(payload))}\n\t}\n\tv := binary.BigEndian.Uint32(payload[:4])\n\tstreamID := v & 0x7fffffff // mask off high bit\n\tif streamID == 0 {\n\t\tcountError(\"frame_priority_update_prioritizing_zero_stream\")\n\t\treturn nil, connError{ErrCodeProtocol, \"PRIORITY_UPDATE frame with prioritized stream ID of zero\"}\n\t}\n\treturn &PriorityUpdateFrame{\n\t\tFrameHeader:         fh,\n\t\tPrioritizedStreamID: streamID,\n\t\tPriority:            string(payload[4:]),\n\t}, nil\n}\n\n// WritePriorityUpdate writes a PRIORITY_UPDATE frame.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WritePriorityUpdate(streamID uint32, priority string) error {\n\tif !validStreamID(streamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tf.startWrite(FramePriorityUpdate, 0, 0)\n\tf.writeUint32(streamID)\n\tf.writeBytes([]byte(priority))\n\treturn f.endWrite()\n}\n\n// A RSTStreamFrame allows for abnormal termination of a stream.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.4\ntype RSTStreamFrame struct {\n\tFrameHeader\n\tErrCode ErrCode\n}\n\nfunc parseRSTStreamFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\tif len(p) != 4 {\n\t\tcountError(\"frame_rststream_bad_len\")\n\t\treturn nil, ConnectionError(ErrCodeFrameSize)\n\t}\n\tif fh.StreamID == 0 {\n\t\tcountError(\"frame_rststream_zero_stream\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\treturn &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil\n}\n\n// WriteRSTStream writes a RST_STREAM frame.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WriteRSTStream(streamID uint32, code ErrCode) error {\n\tif !validStreamID(streamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tf.startWrite(FrameRSTStream, 0, streamID)\n\tf.writeUint32(uint32(code))\n\treturn f.endWrite()\n}\n\n// A ContinuationFrame is used to continue a sequence of header block fragments.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.10\ntype ContinuationFrame struct {\n\tFrameHeader\n\theaderFragBuf []byte\n}\n\nfunc parseContinuationFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {\n\tif fh.StreamID == 0 {\n\t\tcountError(\"frame_continuation_zero_stream\")\n\t\treturn nil, connError{ErrCodeProtocol, \"CONTINUATION frame with stream ID 0\"}\n\t}\n\treturn &ContinuationFrame{fh, p}, nil\n}\n\nfunc (f *ContinuationFrame) HeaderBlockFragment() []byte {\n\tf.checkValid()\n\treturn f.headerFragBuf\n}\n\nfunc (f *ContinuationFrame) HeadersEnded() bool {\n\treturn f.FrameHeader.Flags.Has(FlagContinuationEndHeaders)\n}\n\n// WriteContinuation writes a CONTINUATION frame.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WriteContinuation(streamID uint32, endHeaders bool, headerBlockFragment []byte) error {\n\tif !validStreamID(streamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tvar flags Flags\n\tif endHeaders {\n\t\tflags |= FlagContinuationEndHeaders\n\t}\n\tf.startWrite(FrameContinuation, flags, streamID)\n\tf.wbuf = append(f.wbuf, headerBlockFragment...)\n\treturn f.endWrite()\n}\n\n// A PushPromiseFrame is used to initiate a server stream.\n// See https://httpwg.org/specs/rfc7540.html#rfc.section.6.6\ntype PushPromiseFrame struct {\n\tFrameHeader\n\tPromiseID     uint32\n\theaderFragBuf []byte // not owned\n}\n\nfunc (f *PushPromiseFrame) HeaderBlockFragment() []byte {\n\tf.checkValid()\n\treturn f.headerFragBuf\n}\n\nfunc (f *PushPromiseFrame) HeadersEnded() bool {\n\treturn f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders)\n}\n\nfunc parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {\n\tpp := &PushPromiseFrame{\n\t\tFrameHeader: fh,\n\t}\n\tif pp.StreamID == 0 {\n\t\t// PUSH_PROMISE frames MUST be associated with an existing,\n\t\t// peer-initiated stream. The stream identifier of a\n\t\t// PUSH_PROMISE frame indicates the stream it is associated\n\t\t// with. If the stream identifier field specifies the value\n\t\t// 0x0, a recipient MUST respond with a connection error\n\t\t// (Section 5.4.1) of type PROTOCOL_ERROR.\n\t\tcountError(\"frame_pushpromise_zero_stream\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\t// The PUSH_PROMISE frame includes optional padding.\n\t// Padding fields and flags are identical to those defined for DATA frames\n\tvar padLength uint8\n\tif fh.Flags.Has(FlagPushPromisePadded) {\n\t\tif p, padLength, err = readByte(p); err != nil {\n\t\t\tcountError(\"frame_pushpromise_pad_short\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tp, pp.PromiseID, err = readUint32(p)\n\tif err != nil {\n\t\tcountError(\"frame_pushpromise_promiseid_short\")\n\t\treturn\n\t}\n\tpp.PromiseID = pp.PromiseID & (1<<31 - 1)\n\n\tif int(padLength) > len(p) {\n\t\t// like the DATA frame, error out if padding is longer than the body.\n\t\tcountError(\"frame_pushpromise_pad_too_big\")\n\t\treturn nil, ConnectionError(ErrCodeProtocol)\n\t}\n\tpp.headerFragBuf = p[:len(p)-int(padLength)]\n\treturn pp, nil\n}\n\n// PushPromiseParam are the parameters for writing a PUSH_PROMISE frame.\ntype PushPromiseParam struct {\n\t// StreamID is the required Stream ID to initiate.\n\tStreamID uint32\n\n\t// PromiseID is the required Stream ID which this\n\t// Push Promises\n\tPromiseID uint32\n\n\t// BlockFragment is part (or all) of a Header Block.\n\tBlockFragment []byte\n\n\t// EndHeaders indicates that this frame contains an entire\n\t// header block and is not followed by any\n\t// CONTINUATION frames.\n\tEndHeaders bool\n\n\t// PadLength is the optional number of bytes of zeros to add\n\t// to this frame.\n\tPadLength uint8\n}\n\n// WritePushPromise writes a single PushPromise Frame.\n//\n// As with Header Frames, This is the low level call for writing\n// individual frames. Continuation frames are handled elsewhere.\n//\n// It will perform exactly one Write to the underlying Writer.\n// It is the caller's responsibility to not call other Write methods concurrently.\nfunc (f *Framer) WritePushPromise(p PushPromiseParam) error {\n\tif !validStreamID(p.StreamID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tvar flags Flags\n\tif p.PadLength != 0 {\n\t\tflags |= FlagPushPromisePadded\n\t}\n\tif p.EndHeaders {\n\t\tflags |= FlagPushPromiseEndHeaders\n\t}\n\tf.startWrite(FramePushPromise, flags, p.StreamID)\n\tif p.PadLength != 0 {\n\t\tf.writeByte(p.PadLength)\n\t}\n\tif !validStreamID(p.PromiseID) && !f.AllowIllegalWrites {\n\t\treturn errStreamID\n\t}\n\tf.writeUint32(p.PromiseID)\n\tf.wbuf = append(f.wbuf, p.BlockFragment...)\n\tf.wbuf = append(f.wbuf, padZeros[:p.PadLength]...)\n\treturn f.endWrite()\n}\n\n// WriteRawFrame writes a raw frame. This can be used to write\n// extension frames unknown to this package.\nfunc (f *Framer) WriteRawFrame(t FrameType, flags Flags, streamID uint32, payload []byte) error {\n\tf.startWrite(t, flags, streamID)\n\tf.writeBytes(payload)\n\treturn f.endWrite()\n}\n\nfunc readByte(p []byte) (remain []byte, b byte, err error) {\n\tif len(p) == 0 {\n\t\treturn nil, 0, io.ErrUnexpectedEOF\n\t}\n\treturn p[1:], p[0], nil\n}\n\nfunc readUint32(p []byte) (remain []byte, v uint32, err error) {\n\tif len(p) < 4 {\n\t\treturn nil, 0, io.ErrUnexpectedEOF\n\t}\n\treturn p[4:], binary.BigEndian.Uint32(p[:4]), nil\n}\n\ntype streamEnder interface {\n\tStreamEnded() bool\n}\n\ntype headersEnder interface {\n\tHeadersEnded() bool\n}\n\ntype headersOrContinuation interface {\n\theadersEnder\n\tHeaderBlockFragment() []byte\n}\n\n// A MetaHeadersFrame is the representation of one HEADERS frame and\n// zero or more contiguous CONTINUATION frames and the decoding of\n// their HPACK-encoded contents.\n//\n// This type of frame does not appear on the wire and is only returned\n// by the Framer when Framer.ReadMetaHeaders is set.\ntype MetaHeadersFrame struct {\n\t*HeadersFrame\n\n\t// Fields are the fields contained in the HEADERS and\n\t// CONTINUATION frames. The underlying slice is owned by the\n\t// Framer and must not be retained after the next call to\n\t// ReadFrame.\n\t//\n\t// Fields are guaranteed to be in the correct http2 order and\n\t// not have unknown pseudo header fields or invalid header\n\t// field names or values. Required pseudo header fields may be\n\t// missing, however. Use the MetaHeadersFrame.Pseudo accessor\n\t// method access pseudo headers.\n\tFields []hpack.HeaderField\n\n\t// Truncated is whether the max header list size limit was hit\n\t// and Fields is incomplete. The hpack decoder state is still\n\t// valid, however.\n\tTruncated bool\n}\n\n// PseudoValue returns the given pseudo header field's value.\n// The provided pseudo field should not contain the leading colon.\nfunc (mh *MetaHeadersFrame) PseudoValue(pseudo string) string {\n\tfor _, hf := range mh.Fields {\n\t\tif !hf.IsPseudo() {\n\t\t\treturn \"\"\n\t\t}\n\t\tif hf.Name[1:] == pseudo {\n\t\t\treturn hf.Value\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// RegularFields returns the regular (non-pseudo) header fields of mh.\n// The caller does not own the returned slice.\nfunc (mh *MetaHeadersFrame) RegularFields() []hpack.HeaderField {\n\tfor i, hf := range mh.Fields {\n\t\tif !hf.IsPseudo() {\n\t\t\treturn mh.Fields[i:]\n\t\t}\n\t}\n\treturn nil\n}\n\n// PseudoFields returns the pseudo header fields of mh.\n// The caller does not own the returned slice.\nfunc (mh *MetaHeadersFrame) PseudoFields() []hpack.HeaderField {\n\tfor i, hf := range mh.Fields {\n\t\tif !hf.IsPseudo() {\n\t\t\treturn mh.Fields[:i]\n\t\t}\n\t}\n\treturn mh.Fields\n}\n\nfunc (mh *MetaHeadersFrame) rfc9218Priority(priorityAware bool) (p PriorityParam, priorityAwareAfter, hasIntermediary bool) {\n\tvar s string\n\tfor _, field := range mh.Fields {\n\t\tif field.Name == \"priority\" {\n\t\t\ts = field.Value\n\t\t\tpriorityAware = true\n\t\t}\n\t\tif slices.Contains([]string{\"via\", \"forwarded\", \"x-forwarded-for\"}, field.Name) {\n\t\t\thasIntermediary = true\n\t\t}\n\t}\n\t// No need to check for ok. parseRFC9218Priority will return a default\n\t// value if there is no priority field or if the field cannot be parsed.\n\tp, _ = parseRFC9218Priority(s, priorityAware && !hasIntermediary)\n\treturn p, priorityAware, hasIntermediary\n}\n\nfunc (mh *MetaHeadersFrame) checkPseudos() error {\n\tvar isRequest, isResponse bool\n\tpf := mh.PseudoFields()\n\tfor i, hf := range pf {\n\t\tswitch hf.Name {\n\t\tcase \":method\", \":path\", \":scheme\", \":authority\", \":protocol\":\n\t\t\tisRequest = true\n\t\tcase \":status\":\n\t\t\tisResponse = true\n\t\tdefault:\n\t\t\treturn pseudoHeaderError(hf.Name)\n\t\t}\n\t\t// Check for duplicates.\n\t\t// This would be a bad algorithm, but N is 5.\n\t\t// And this doesn't allocate.\n\t\tfor _, hf2 := range pf[:i] {\n\t\t\tif hf.Name == hf2.Name {\n\t\t\t\treturn duplicatePseudoHeaderError(hf.Name)\n\t\t\t}\n\t\t}\n\t}\n\tif isRequest && isResponse {\n\t\treturn errMixPseudoHeaderTypes\n\t}\n\treturn nil\n}\n\nfunc (fr *Framer) maxHeaderStringLen() int {\n\tv := int(fr.maxHeaderListSize())\n\tif v < 0 {\n\t\t// If maxHeaderListSize overflows an int, use no limit (0).\n\t\treturn 0\n\t}\n\treturn v\n}\n\n// readMetaFrame returns 0 or more CONTINUATION frames from fr and\n// merge them into the provided hf and returns a MetaHeadersFrame\n// with the decoded hpack values.\nfunc (fr *Framer) readMetaFrame(hf *HeadersFrame) (Frame, error) {\n\tif fr.AllowIllegalReads {\n\t\treturn nil, errors.New(\"illegal use of AllowIllegalReads with ReadMetaHeaders\")\n\t}\n\tmh := &MetaHeadersFrame{\n\t\tHeadersFrame: hf,\n\t}\n\tvar remainSize = fr.maxHeaderListSize()\n\tvar sawRegular bool\n\n\tvar invalid error // pseudo header field errors\n\thdec := fr.ReadMetaHeaders\n\thdec.SetEmitEnabled(true)\n\thdec.SetMaxStringLength(fr.maxHeaderStringLen())\n\thdec.SetEmitFunc(func(hf hpack.HeaderField) {\n\t\tif VerboseLogs && fr.logReads {\n\t\t\tfr.debugReadLoggerf(\"http2: decoded hpack field %+v\", hf)\n\t\t}\n\t\tif !httpguts.ValidHeaderFieldValue(hf.Value) {\n\t\t\t// Don't include the value in the error, because it may be sensitive.\n\t\t\tinvalid = headerFieldValueError(hf.Name)\n\t\t}\n\t\tisPseudo := strings.HasPrefix(hf.Name, \":\")\n\t\tif isPseudo {\n\t\t\tif sawRegular {\n\t\t\t\tinvalid = errPseudoAfterRegular\n\t\t\t}\n\t\t} else {\n\t\t\tsawRegular = true\n\t\t\tif !validWireHeaderFieldName(hf.Name) {\n\t\t\t\tinvalid = headerFieldNameError(hf.Name)\n\t\t\t}\n\t\t}\n\n\t\tif invalid != nil {\n\t\t\thdec.SetEmitEnabled(false)\n\t\t\treturn\n\t\t}\n\n\t\tsize := hf.Size()\n\t\tif size > remainSize {\n\t\t\thdec.SetEmitEnabled(false)\n\t\t\tmh.Truncated = true\n\t\t\tremainSize = 0\n\t\t\treturn\n\t\t}\n\t\tremainSize -= size\n\n\t\tmh.Fields = append(mh.Fields, hf)\n\t})\n\t// Lose reference to MetaHeadersFrame:\n\tdefer hdec.SetEmitFunc(func(hf hpack.HeaderField) {})\n\n\tvar hc headersOrContinuation = hf\n\tfor {\n\t\tfrag := hc.HeaderBlockFragment()\n\n\t\t// Avoid parsing large amounts of headers that we will then discard.\n\t\t// If the sender exceeds the max header list size by too much,\n\t\t// skip parsing the fragment and close the connection.\n\t\t//\n\t\t// \"Too much\" is either any CONTINUATION frame after we've already\n\t\t// exceeded the max header list size (in which case remainSize is 0),\n\t\t// or a frame whose encoded size is more than twice the remaining\n\t\t// header list bytes we're willing to accept.\n\t\tif int64(len(frag)) > int64(2*remainSize) {\n\t\t\tif VerboseLogs {\n\t\t\t\tlog.Printf(\"http2: header list too large\")\n\t\t\t}\n\t\t\t// It would be nice to send a RST_STREAM before sending the GOAWAY,\n\t\t\t// but the structure of the server's frame writer makes this difficult.\n\t\t\treturn mh, ConnectionError(ErrCodeProtocol)\n\t\t}\n\n\t\t// Also close the connection after any CONTINUATION frame following an\n\t\t// invalid header, since we stop tracking the size of the headers after\n\t\t// an invalid one.\n\t\tif invalid != nil {\n\t\t\tif VerboseLogs {\n\t\t\t\tlog.Printf(\"http2: invalid header: %v\", invalid)\n\t\t\t}\n\t\t\t// It would be nice to send a RST_STREAM before sending the GOAWAY,\n\t\t\t// but the structure of the server's frame writer makes this difficult.\n\t\t\treturn mh, ConnectionError(ErrCodeProtocol)\n\t\t}\n\n\t\tif _, err := hdec.Write(frag); err != nil {\n\t\t\treturn mh, ConnectionError(ErrCodeCompression)\n\t\t}\n\n\t\tif hc.HeadersEnded() {\n\t\t\tbreak\n\t\t}\n\t\tif f, err := fr.ReadFrame(); err != nil {\n\t\t\treturn nil, err\n\t\t} else {\n\t\t\thc = f.(*ContinuationFrame) // guaranteed by checkFrameOrder\n\t\t}\n\t}\n\n\tmh.HeadersFrame.headerFragBuf = nil\n\tmh.HeadersFrame.invalidate()\n\n\tif err := hdec.Close(); err != nil {\n\t\treturn mh, ConnectionError(ErrCodeCompression)\n\t}\n\tif invalid != nil {\n\t\tfr.errDetail = invalid\n\t\tif VerboseLogs {\n\t\t\tlog.Printf(\"http2: invalid header: %v\", invalid)\n\t\t}\n\t\treturn nil, StreamError{mh.StreamID, ErrCodeProtocol, invalid}\n\t}\n\tif err := mh.checkPseudos(); err != nil {\n\t\tfr.errDetail = err\n\t\tif VerboseLogs {\n\t\t\tlog.Printf(\"http2: invalid pseudo headers: %v\", err)\n\t\t}\n\t\treturn nil, StreamError{mh.StreamID, ErrCodeProtocol, err}\n\t}\n\treturn mh, nil\n}\n\nfunc summarizeFrame(f Frame) string {\n\tvar buf bytes.Buffer\n\tf.Header().writeDebug(&buf)\n\tswitch f := f.(type) {\n\tcase *SettingsFrame:\n\t\tn := 0\n\t\tf.ForeachSetting(func(s Setting) error {\n\t\t\tn++\n\t\t\tif n == 1 {\n\t\t\t\tbuf.WriteString(\", settings:\")\n\t\t\t}\n\t\t\tfmt.Fprintf(&buf, \" %v=%v,\", s.ID, s.Val)\n\t\t\treturn nil\n\t\t})\n\t\tif n > 0 {\n\t\t\tbuf.Truncate(buf.Len() - 1) // remove trailing comma\n\t\t}\n\tcase *DataFrame:\n\t\tdata := f.Data()\n\t\tconst max = 256\n\t\tif len(data) > max {\n\t\t\tdata = data[:max]\n\t\t}\n\t\tfmt.Fprintf(&buf, \" data=%q\", data)\n\t\tif len(f.Data()) > max {\n\t\t\tfmt.Fprintf(&buf, \" (%d bytes omitted)\", len(f.Data())-max)\n\t\t}\n\tcase *WindowUpdateFrame:\n\t\tif f.StreamID == 0 {\n\t\t\tbuf.WriteString(\" (conn)\")\n\t\t}\n\t\tfmt.Fprintf(&buf, \" incr=%v\", f.Increment)\n\tcase *PingFrame:\n\t\tfmt.Fprintf(&buf, \" ping=%q\", f.Data[:])\n\tcase *GoAwayFrame:\n\t\tfmt.Fprintf(&buf, \" LastStreamID=%v ErrCode=%v Debug=%q\",\n\t\t\tf.LastStreamID, f.ErrCode, f.debugData)\n\tcase *RSTStreamFrame:\n\t\tfmt.Fprintf(&buf, \" ErrCode=%v\", f.ErrCode)\n\t}\n\treturn buf.String()\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/gotrack.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Defensive debug-only utility to track that functions run on the\n// goroutine that they're supposed to.\n\npackage http2\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"sync\"\n\t\"sync/atomic\"\n)\n\nvar DebugGoroutines = os.Getenv(\"DEBUG_HTTP2_GOROUTINES\") == \"1\"\n\n// Setting DebugGoroutines to false during a test to disable goroutine debugging\n// results in race detector complaints when a test leaves goroutines running before\n// returning. Tests shouldn't do this, of course, but when they do it generally shows\n// up as infrequent, hard-to-debug flakes. (See #66519.)\n//\n// Disable goroutine debugging during individual tests with an atomic bool.\n// (Note that it's safe to enable/disable debugging mid-test, so the actual race condition\n// here is harmless.)\nvar disableDebugGoroutines atomic.Bool\n\ntype goroutineLock uint64\n\nfunc newGoroutineLock() goroutineLock {\n\tif !DebugGoroutines || disableDebugGoroutines.Load() {\n\t\treturn 0\n\t}\n\treturn goroutineLock(curGoroutineID())\n}\n\nfunc (g goroutineLock) check() {\n\tif !DebugGoroutines || disableDebugGoroutines.Load() {\n\t\treturn\n\t}\n\tif curGoroutineID() != uint64(g) {\n\t\tpanic(\"running on the wrong goroutine\")\n\t}\n}\n\nfunc (g goroutineLock) checkNotOn() {\n\tif !DebugGoroutines || disableDebugGoroutines.Load() {\n\t\treturn\n\t}\n\tif curGoroutineID() == uint64(g) {\n\t\tpanic(\"running on the wrong goroutine\")\n\t}\n}\n\nvar goroutineSpace = []byte(\"goroutine \")\n\nfunc curGoroutineID() uint64 {\n\tbp := littleBuf.Get().(*[]byte)\n\tdefer littleBuf.Put(bp)\n\tb := *bp\n\tb = b[:runtime.Stack(b, false)]\n\t// Parse the 4707 out of \"goroutine 4707 [\"\n\tb = bytes.TrimPrefix(b, goroutineSpace)\n\ti := bytes.IndexByte(b, ' ')\n\tif i < 0 {\n\t\tpanic(fmt.Sprintf(\"No space found in %q\", b))\n\t}\n\tb = b[:i]\n\tn, err := parseUintBytes(b, 10, 64)\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"Failed to parse goroutine ID out of %q: %v\", b, err))\n\t}\n\treturn n\n}\n\nvar littleBuf = sync.Pool{\n\tNew: func() interface{} {\n\t\tbuf := make([]byte, 64)\n\t\treturn &buf\n\t},\n}\n\n// parseUintBytes is like strconv.ParseUint, but using a []byte.\nfunc parseUintBytes(s []byte, base int, bitSize int) (n uint64, err error) {\n\tvar cutoff, maxVal uint64\n\n\tif bitSize == 0 {\n\t\tbitSize = int(strconv.IntSize)\n\t}\n\n\ts0 := s\n\tswitch {\n\tcase len(s) < 1:\n\t\terr = strconv.ErrSyntax\n\t\tgoto Error\n\n\tcase 2 <= base && base <= 36:\n\t\t// valid base; nothing to do\n\n\tcase base == 0:\n\t\t// Look for octal, hex prefix.\n\t\tswitch {\n\t\tcase s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'):\n\t\t\tbase = 16\n\t\t\ts = s[2:]\n\t\t\tif len(s) < 1 {\n\t\t\t\terr = strconv.ErrSyntax\n\t\t\t\tgoto Error\n\t\t\t}\n\t\tcase s[0] == '0':\n\t\t\tbase = 8\n\t\tdefault:\n\t\t\tbase = 10\n\t\t}\n\n\tdefault:\n\t\terr = errors.New(\"invalid base \" + strconv.Itoa(base))\n\t\tgoto Error\n\t}\n\n\tn = 0\n\tcutoff = cutoff64(base)\n\tmaxVal = 1<<uint(bitSize) - 1\n\n\tfor i := 0; i < len(s); i++ {\n\t\tvar v byte\n\t\td := s[i]\n\t\tswitch {\n\t\tcase '0' <= d && d <= '9':\n\t\t\tv = d - '0'\n\t\tcase 'a' <= d && d <= 'z':\n\t\t\tv = d - 'a' + 10\n\t\tcase 'A' <= d && d <= 'Z':\n\t\t\tv = d - 'A' + 10\n\t\tdefault:\n\t\t\tn = 0\n\t\t\terr = strconv.ErrSyntax\n\t\t\tgoto Error\n\t\t}\n\t\tif int(v) >= base {\n\t\t\tn = 0\n\t\t\terr = strconv.ErrSyntax\n\t\t\tgoto Error\n\t\t}\n\n\t\tif n >= cutoff {\n\t\t\t// n*base overflows\n\t\t\tn = 1<<64 - 1\n\t\t\terr = strconv.ErrRange\n\t\t\tgoto Error\n\t\t}\n\t\tn *= uint64(base)\n\n\t\tn1 := n + uint64(v)\n\t\tif n1 < n || n1 > maxVal {\n\t\t\t// n+v overflows\n\t\t\tn = 1<<64 - 1\n\t\t\terr = strconv.ErrRange\n\t\t\tgoto Error\n\t\t}\n\t\tn = n1\n\t}\n\n\treturn n, nil\n\nError:\n\treturn n, &strconv.NumError{Func: \"ParseUint\", Num: string(s0), Err: err}\n}\n\n// Return the first number n such that n*base >= 1<<64.\nfunc cutoff64(base int) uint64 {\n\tif base < 2 {\n\t\treturn 0\n\t}\n\treturn (1<<64-1)/uint64(base) + 1\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/hpack/encode.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hpack\n\nimport (\n\t\"io\"\n)\n\nconst (\n\tuint32Max              = ^uint32(0)\n\tinitialHeaderTableSize = 4096\n)\n\ntype Encoder struct {\n\tdynTab dynamicTable\n\t// minSize is the minimum table size set by\n\t// SetMaxDynamicTableSize after the previous Header Table Size\n\t// Update.\n\tminSize uint32\n\t// maxSizeLimit is the maximum table size this encoder\n\t// supports. This will protect the encoder from too large\n\t// size.\n\tmaxSizeLimit uint32\n\t// tableSizeUpdate indicates whether \"Header Table Size\n\t// Update\" is required.\n\ttableSizeUpdate bool\n\tw               io.Writer\n\tbuf             []byte\n}\n\n// NewEncoder returns a new Encoder which performs HPACK encoding. An\n// encoded data is written to w.\nfunc NewEncoder(w io.Writer) *Encoder {\n\te := &Encoder{\n\t\tminSize:         uint32Max,\n\t\tmaxSizeLimit:    initialHeaderTableSize,\n\t\ttableSizeUpdate: false,\n\t\tw:               w,\n\t}\n\te.dynTab.table.init()\n\te.dynTab.setMaxSize(initialHeaderTableSize)\n\treturn e\n}\n\n// WriteField encodes f into a single Write to e's underlying Writer.\n// This function may also produce bytes for \"Header Table Size Update\"\n// if necessary. If produced, it is done before encoding f.\nfunc (e *Encoder) WriteField(f HeaderField) error {\n\te.buf = e.buf[:0]\n\n\tif e.tableSizeUpdate {\n\t\te.tableSizeUpdate = false\n\t\tif e.minSize < e.dynTab.maxSize {\n\t\t\te.buf = appendTableSize(e.buf, e.minSize)\n\t\t}\n\t\te.minSize = uint32Max\n\t\te.buf = appendTableSize(e.buf, e.dynTab.maxSize)\n\t}\n\n\tidx, nameValueMatch := e.searchTable(f)\n\tif nameValueMatch {\n\t\te.buf = appendIndexed(e.buf, idx)\n\t} else {\n\t\tindexing := e.shouldIndex(f)\n\t\tif indexing {\n\t\t\te.dynTab.add(f)\n\t\t}\n\n\t\tif idx == 0 {\n\t\t\te.buf = appendNewName(e.buf, f, indexing)\n\t\t} else {\n\t\t\te.buf = appendIndexedName(e.buf, f, idx, indexing)\n\t\t}\n\t}\n\tn, err := e.w.Write(e.buf)\n\tif err == nil && n != len(e.buf) {\n\t\terr = io.ErrShortWrite\n\t}\n\treturn err\n}\n\n// searchTable searches f in both stable and dynamic header tables.\n// The static header table is searched first. Only when there is no\n// exact match for both name and value, the dynamic header table is\n// then searched. If there is no match, i is 0. If both name and value\n// match, i is the matched index and nameValueMatch becomes true. If\n// only name matches, i points to that index and nameValueMatch\n// becomes false.\nfunc (e *Encoder) searchTable(f HeaderField) (i uint64, nameValueMatch bool) {\n\ti, nameValueMatch = staticTable.search(f)\n\tif nameValueMatch {\n\t\treturn i, true\n\t}\n\n\tj, nameValueMatch := e.dynTab.table.search(f)\n\tif nameValueMatch || (i == 0 && j != 0) {\n\t\treturn j + uint64(staticTable.len()), nameValueMatch\n\t}\n\n\treturn i, false\n}\n\n// SetMaxDynamicTableSize changes the dynamic header table size to v.\n// The actual size is bounded by the value passed to\n// SetMaxDynamicTableSizeLimit.\nfunc (e *Encoder) SetMaxDynamicTableSize(v uint32) {\n\tif v > e.maxSizeLimit {\n\t\tv = e.maxSizeLimit\n\t}\n\tif v < e.minSize {\n\t\te.minSize = v\n\t}\n\te.tableSizeUpdate = true\n\te.dynTab.setMaxSize(v)\n}\n\n// MaxDynamicTableSize returns the current dynamic header table size.\nfunc (e *Encoder) MaxDynamicTableSize() (v uint32) {\n\treturn e.dynTab.maxSize\n}\n\n// SetMaxDynamicTableSizeLimit changes the maximum value that can be\n// specified in SetMaxDynamicTableSize to v. By default, it is set to\n// 4096, which is the same size of the default dynamic header table\n// size described in HPACK specification. If the current maximum\n// dynamic header table size is strictly greater than v, \"Header Table\n// Size Update\" will be done in the next WriteField call and the\n// maximum dynamic header table size is truncated to v.\nfunc (e *Encoder) SetMaxDynamicTableSizeLimit(v uint32) {\n\te.maxSizeLimit = v\n\tif e.dynTab.maxSize > v {\n\t\te.tableSizeUpdate = true\n\t\te.dynTab.setMaxSize(v)\n\t}\n}\n\n// shouldIndex reports whether f should be indexed.\nfunc (e *Encoder) shouldIndex(f HeaderField) bool {\n\treturn !f.Sensitive && f.Size() <= e.dynTab.maxSize\n}\n\n// appendIndexed appends index i, as encoded in \"Indexed Header Field\"\n// representation, to dst and returns the extended buffer.\nfunc appendIndexed(dst []byte, i uint64) []byte {\n\tfirst := len(dst)\n\tdst = appendVarInt(dst, 7, i)\n\tdst[first] |= 0x80\n\treturn dst\n}\n\n// appendNewName appends f, as encoded in one of \"Literal Header field\n// - New Name\" representation variants, to dst and returns the\n// extended buffer.\n//\n// If f.Sensitive is true, \"Never Indexed\" representation is used. If\n// f.Sensitive is false and indexing is true, \"Incremental Indexing\"\n// representation is used.\nfunc appendNewName(dst []byte, f HeaderField, indexing bool) []byte {\n\tdst = append(dst, encodeTypeByte(indexing, f.Sensitive))\n\tdst = appendHpackString(dst, f.Name)\n\treturn appendHpackString(dst, f.Value)\n}\n\n// appendIndexedName appends f and index i referring indexed name\n// entry, as encoded in one of \"Literal Header field - Indexed Name\"\n// representation variants, to dst and returns the extended buffer.\n//\n// If f.Sensitive is true, \"Never Indexed\" representation is used. If\n// f.Sensitive is false and indexing is true, \"Incremental Indexing\"\n// representation is used.\nfunc appendIndexedName(dst []byte, f HeaderField, i uint64, indexing bool) []byte {\n\tfirst := len(dst)\n\tvar n byte\n\tif indexing {\n\t\tn = 6\n\t} else {\n\t\tn = 4\n\t}\n\tdst = appendVarInt(dst, n, i)\n\tdst[first] |= encodeTypeByte(indexing, f.Sensitive)\n\treturn appendHpackString(dst, f.Value)\n}\n\n// appendTableSize appends v, as encoded in \"Header Table Size Update\"\n// representation, to dst and returns the extended buffer.\nfunc appendTableSize(dst []byte, v uint32) []byte {\n\tfirst := len(dst)\n\tdst = appendVarInt(dst, 5, uint64(v))\n\tdst[first] |= 0x20\n\treturn dst\n}\n\n// appendVarInt appends i, as encoded in variable integer form using n\n// bit prefix, to dst and returns the extended buffer.\n//\n// See\n// https://httpwg.org/specs/rfc7541.html#integer.representation\nfunc appendVarInt(dst []byte, n byte, i uint64) []byte {\n\tk := uint64((1 << n) - 1)\n\tif i < k {\n\t\treturn append(dst, byte(i))\n\t}\n\tdst = append(dst, byte(k))\n\ti -= k\n\tfor ; i >= 128; i >>= 7 {\n\t\tdst = append(dst, byte(0x80|(i&0x7f)))\n\t}\n\treturn append(dst, byte(i))\n}\n\n// appendHpackString appends s, as encoded in \"String Literal\"\n// representation, to dst and returns the extended buffer.\n//\n// s will be encoded in Huffman codes only when it produces strictly\n// shorter byte string.\nfunc appendHpackString(dst []byte, s string) []byte {\n\thuffmanLength := HuffmanEncodeLength(s)\n\tif huffmanLength < uint64(len(s)) {\n\t\tfirst := len(dst)\n\t\tdst = appendVarInt(dst, 7, huffmanLength)\n\t\tdst = AppendHuffmanString(dst, s)\n\t\tdst[first] |= 0x80\n\t} else {\n\t\tdst = appendVarInt(dst, 7, uint64(len(s)))\n\t\tdst = append(dst, s...)\n\t}\n\treturn dst\n}\n\n// encodeTypeByte returns type byte. If sensitive is true, type byte\n// for \"Never Indexed\" representation is returned. If sensitive is\n// false and indexing is true, type byte for \"Incremental Indexing\"\n// representation is returned. Otherwise, type byte for \"Without\n// Indexing\" is returned.\nfunc encodeTypeByte(indexing, sensitive bool) byte {\n\tif sensitive {\n\t\treturn 0x10\n\t}\n\tif indexing {\n\t\treturn 0x40\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/hpack/hpack.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package hpack implements HPACK, a compression format for\n// efficiently representing HTTP header fields in the context of HTTP/2.\n//\n// See http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-09\npackage hpack\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n)\n\n// A DecodingError is something the spec defines as a decoding error.\ntype DecodingError struct {\n\tErr error\n}\n\nfunc (de DecodingError) Error() string {\n\treturn fmt.Sprintf(\"decoding error: %v\", de.Err)\n}\n\n// An InvalidIndexError is returned when an encoder references a table\n// entry before the static table or after the end of the dynamic table.\ntype InvalidIndexError int\n\nfunc (e InvalidIndexError) Error() string {\n\treturn fmt.Sprintf(\"invalid indexed representation index %d\", int(e))\n}\n\n// A HeaderField is a name-value pair. Both the name and value are\n// treated as opaque sequences of octets.\ntype HeaderField struct {\n\tName, Value string\n\n\t// Sensitive means that this header field should never be\n\t// indexed.\n\tSensitive bool\n}\n\n// IsPseudo reports whether the header field is an http2 pseudo header.\n// That is, it reports whether it starts with a colon.\n// It is not otherwise guaranteed to be a valid pseudo header field,\n// though.\nfunc (hf HeaderField) IsPseudo() bool {\n\treturn len(hf.Name) != 0 && hf.Name[0] == ':'\n}\n\nfunc (hf HeaderField) String() string {\n\tvar suffix string\n\tif hf.Sensitive {\n\t\tsuffix = \" (sensitive)\"\n\t}\n\treturn fmt.Sprintf(\"header field %q = %q%s\", hf.Name, hf.Value, suffix)\n}\n\n// Size returns the size of an entry per RFC 7541 section 4.1.\nfunc (hf HeaderField) Size() uint32 {\n\t// https://httpwg.org/specs/rfc7541.html#rfc.section.4.1\n\t// \"The size of the dynamic table is the sum of the size of\n\t// its entries. The size of an entry is the sum of its name's\n\t// length in octets (as defined in Section 5.2), its value's\n\t// length in octets (see Section 5.2), plus 32.  The size of\n\t// an entry is calculated using the length of the name and\n\t// value without any Huffman encoding applied.\"\n\n\t// This can overflow if somebody makes a large HeaderField\n\t// Name and/or Value by hand, but we don't care, because that\n\t// won't happen on the wire because the encoding doesn't allow\n\t// it.\n\treturn uint32(len(hf.Name) + len(hf.Value) + 32)\n}\n\n// A Decoder is the decoding context for incremental processing of\n// header blocks.\ntype Decoder struct {\n\tdynTab dynamicTable\n\temit   func(f HeaderField)\n\n\temitEnabled bool // whether calls to emit are enabled\n\tmaxStrLen   int  // 0 means unlimited\n\n\t// buf is the unparsed buffer. It's only written to\n\t// saveBuf if it was truncated in the middle of a header\n\t// block. Because it's usually not owned, we can only\n\t// process it under Write.\n\tbuf []byte // not owned; only valid during Write\n\n\t// saveBuf is previous data passed to Write which we weren't able\n\t// to fully parse before. Unlike buf, we own this data.\n\tsaveBuf bytes.Buffer\n\n\tfirstField bool // processing the first field of the header block\n}\n\n// NewDecoder returns a new decoder with the provided maximum dynamic\n// table size. The emitFunc will be called for each valid field\n// parsed, in the same goroutine as calls to Write, before Write returns.\nfunc NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder {\n\td := &Decoder{\n\t\temit:        emitFunc,\n\t\temitEnabled: true,\n\t\tfirstField:  true,\n\t}\n\td.dynTab.table.init()\n\td.dynTab.allowedMaxSize = maxDynamicTableSize\n\td.dynTab.setMaxSize(maxDynamicTableSize)\n\treturn d\n}\n\n// ErrStringLength is returned by Decoder.Write when the max string length\n// (as configured by Decoder.SetMaxStringLength) would be violated.\nvar ErrStringLength = errors.New(\"hpack: string too long\")\n\n// SetMaxStringLength sets the maximum size of a HeaderField name or\n// value string. If a string exceeds this length (even after any\n// decompression), Write will return ErrStringLength.\n// A value of 0 means unlimited and is the default from NewDecoder.\nfunc (d *Decoder) SetMaxStringLength(n int) {\n\td.maxStrLen = n\n}\n\n// SetEmitFunc changes the callback used when new header fields\n// are decoded.\n// It must be non-nil. It does not affect EmitEnabled.\nfunc (d *Decoder) SetEmitFunc(emitFunc func(f HeaderField)) {\n\td.emit = emitFunc\n}\n\n// SetEmitEnabled controls whether the emitFunc provided to NewDecoder\n// should be called. The default is true.\n//\n// This facility exists to let servers enforce MAX_HEADER_LIST_SIZE\n// while still decoding and keeping in-sync with decoder state, but\n// without doing unnecessary decompression or generating unnecessary\n// garbage for header fields past the limit.\nfunc (d *Decoder) SetEmitEnabled(v bool) { d.emitEnabled = v }\n\n// EmitEnabled reports whether calls to the emitFunc provided to NewDecoder\n// are currently enabled. The default is true.\nfunc (d *Decoder) EmitEnabled() bool { return d.emitEnabled }\n\n// TODO: add method *Decoder.Reset(maxSize, emitFunc) to let callers re-use Decoders and their\n// underlying buffers for garbage reasons.\n\nfunc (d *Decoder) SetMaxDynamicTableSize(v uint32) {\n\td.dynTab.setMaxSize(v)\n}\n\n// SetAllowedMaxDynamicTableSize sets the upper bound that the encoded\n// stream (via dynamic table size updates) may set the maximum size\n// to.\nfunc (d *Decoder) SetAllowedMaxDynamicTableSize(v uint32) {\n\td.dynTab.allowedMaxSize = v\n}\n\ntype dynamicTable struct {\n\t// https://httpwg.org/specs/rfc7541.html#rfc.section.2.3.2\n\ttable          headerFieldTable\n\tsize           uint32 // in bytes\n\tmaxSize        uint32 // current maxSize\n\tallowedMaxSize uint32 // maxSize may go up to this, inclusive\n}\n\nfunc (dt *dynamicTable) setMaxSize(v uint32) {\n\tdt.maxSize = v\n\tdt.evict()\n}\n\nfunc (dt *dynamicTable) add(f HeaderField) {\n\tdt.table.addEntry(f)\n\tdt.size += f.Size()\n\tdt.evict()\n}\n\n// If we're too big, evict old stuff.\nfunc (dt *dynamicTable) evict() {\n\tvar n int\n\tfor dt.size > dt.maxSize && n < dt.table.len() {\n\t\tdt.size -= dt.table.ents[n].Size()\n\t\tn++\n\t}\n\tdt.table.evictOldest(n)\n}\n\nfunc (d *Decoder) maxTableIndex() int {\n\t// This should never overflow. RFC 7540 Section 6.5.2 limits the size of\n\t// the dynamic table to 2^32 bytes, where each entry will occupy more than\n\t// one byte. Further, the staticTable has a fixed, small length.\n\treturn d.dynTab.table.len() + staticTable.len()\n}\n\nfunc (d *Decoder) at(i uint64) (hf HeaderField, ok bool) {\n\t// See Section 2.3.3.\n\tif i == 0 {\n\t\treturn\n\t}\n\tif i <= uint64(staticTable.len()) {\n\t\treturn staticTable.ents[i-1], true\n\t}\n\tif i > uint64(d.maxTableIndex()) {\n\t\treturn\n\t}\n\t// In the dynamic table, newer entries have lower indices.\n\t// However, dt.ents[0] is the oldest entry. Hence, dt.ents is\n\t// the reversed dynamic table.\n\tdt := d.dynTab.table\n\treturn dt.ents[dt.len()-(int(i)-staticTable.len())], true\n}\n\n// DecodeFull decodes an entire block.\n//\n// TODO: remove this method and make it incremental later? This is\n// easier for debugging now.\nfunc (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) {\n\tvar hf []HeaderField\n\tsaveFunc := d.emit\n\tdefer func() { d.emit = saveFunc }()\n\td.emit = func(f HeaderField) { hf = append(hf, f) }\n\tif _, err := d.Write(p); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := d.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn hf, nil\n}\n\n// Close declares that the decoding is complete and resets the Decoder\n// to be reused again for a new header block. If there is any remaining\n// data in the decoder's buffer, Close returns an error.\nfunc (d *Decoder) Close() error {\n\tif d.saveBuf.Len() > 0 {\n\t\td.saveBuf.Reset()\n\t\treturn DecodingError{errors.New(\"truncated headers\")}\n\t}\n\td.firstField = true\n\treturn nil\n}\n\nfunc (d *Decoder) Write(p []byte) (n int, err error) {\n\tif len(p) == 0 {\n\t\t// Prevent state machine CPU attacks (making us redo\n\t\t// work up to the point of finding out we don't have\n\t\t// enough data)\n\t\treturn\n\t}\n\t// Only copy the data if we have to. Optimistically assume\n\t// that p will contain a complete header block.\n\tif d.saveBuf.Len() == 0 {\n\t\td.buf = p\n\t} else {\n\t\td.saveBuf.Write(p)\n\t\td.buf = d.saveBuf.Bytes()\n\t\td.saveBuf.Reset()\n\t}\n\n\tfor len(d.buf) > 0 {\n\t\terr = d.parseHeaderFieldRepr()\n\t\tif err == errNeedMore {\n\t\t\t// Extra paranoia, making sure saveBuf won't\n\t\t\t// get too large. All the varint and string\n\t\t\t// reading code earlier should already catch\n\t\t\t// overlong things and return ErrStringLength,\n\t\t\t// but keep this as a last resort.\n\t\t\tconst varIntOverhead = 8 // conservative\n\t\t\tif d.maxStrLen != 0 && int64(len(d.buf)) > 2*(int64(d.maxStrLen)+varIntOverhead) {\n\t\t\t\treturn 0, ErrStringLength\n\t\t\t}\n\t\t\td.saveBuf.Write(d.buf)\n\t\t\treturn len(p), nil\n\t\t}\n\t\td.firstField = false\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn len(p), err\n}\n\n// errNeedMore is an internal sentinel error value that means the\n// buffer is truncated and we need to read more data before we can\n// continue parsing.\nvar errNeedMore = errors.New(\"need more data\")\n\ntype indexType int\n\nconst (\n\tindexedTrue indexType = iota\n\tindexedFalse\n\tindexedNever\n)\n\nfunc (v indexType) indexed() bool   { return v == indexedTrue }\nfunc (v indexType) sensitive() bool { return v == indexedNever }\n\n// returns errNeedMore if there isn't enough data available.\n// any other error is fatal.\n// consumes d.buf iff it returns nil.\n// precondition: must be called with len(d.buf) > 0\nfunc (d *Decoder) parseHeaderFieldRepr() error {\n\tb := d.buf[0]\n\tswitch {\n\tcase b&128 != 0:\n\t\t// Indexed representation.\n\t\t// High bit set?\n\t\t// https://httpwg.org/specs/rfc7541.html#rfc.section.6.1\n\t\treturn d.parseFieldIndexed()\n\tcase b&192 == 64:\n\t\t// 6.2.1 Literal Header Field with Incremental Indexing\n\t\t// 0b10xxxxxx: top two bits are 10\n\t\t// https://httpwg.org/specs/rfc7541.html#rfc.section.6.2.1\n\t\treturn d.parseFieldLiteral(6, indexedTrue)\n\tcase b&240 == 0:\n\t\t// 6.2.2 Literal Header Field without Indexing\n\t\t// 0b0000xxxx: top four bits are 0000\n\t\t// https://httpwg.org/specs/rfc7541.html#rfc.section.6.2.2\n\t\treturn d.parseFieldLiteral(4, indexedFalse)\n\tcase b&240 == 16:\n\t\t// 6.2.3 Literal Header Field never Indexed\n\t\t// 0b0001xxxx: top four bits are 0001\n\t\t// https://httpwg.org/specs/rfc7541.html#rfc.section.6.2.3\n\t\treturn d.parseFieldLiteral(4, indexedNever)\n\tcase b&224 == 32:\n\t\t// 6.3 Dynamic Table Size Update\n\t\t// Top three bits are '001'.\n\t\t// https://httpwg.org/specs/rfc7541.html#rfc.section.6.3\n\t\treturn d.parseDynamicTableSizeUpdate()\n\t}\n\n\treturn DecodingError{errors.New(\"invalid encoding\")}\n}\n\n// (same invariants and behavior as parseHeaderFieldRepr)\nfunc (d *Decoder) parseFieldIndexed() error {\n\tbuf := d.buf\n\tidx, buf, err := readVarInt(7, buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\thf, ok := d.at(idx)\n\tif !ok {\n\t\treturn DecodingError{InvalidIndexError(idx)}\n\t}\n\td.buf = buf\n\treturn d.callEmit(HeaderField{Name: hf.Name, Value: hf.Value})\n}\n\n// (same invariants and behavior as parseHeaderFieldRepr)\nfunc (d *Decoder) parseFieldLiteral(n uint8, it indexType) error {\n\tbuf := d.buf\n\tnameIdx, buf, err := readVarInt(n, buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar hf HeaderField\n\twantStr := d.emitEnabled || it.indexed()\n\tvar undecodedName undecodedString\n\tif nameIdx > 0 {\n\t\tihf, ok := d.at(nameIdx)\n\t\tif !ok {\n\t\t\treturn DecodingError{InvalidIndexError(nameIdx)}\n\t\t}\n\t\thf.Name = ihf.Name\n\t} else {\n\t\tundecodedName, buf, err = d.readString(buf)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tundecodedValue, buf, err := d.readString(buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif wantStr {\n\t\tif nameIdx <= 0 {\n\t\t\thf.Name, err = d.decodeString(undecodedName)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\thf.Value, err = d.decodeString(undecodedValue)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\td.buf = buf\n\tif it.indexed() {\n\t\td.dynTab.add(hf)\n\t}\n\thf.Sensitive = it.sensitive()\n\treturn d.callEmit(hf)\n}\n\nfunc (d *Decoder) callEmit(hf HeaderField) error {\n\tif d.maxStrLen != 0 {\n\t\tif len(hf.Name) > d.maxStrLen || len(hf.Value) > d.maxStrLen {\n\t\t\treturn ErrStringLength\n\t\t}\n\t}\n\tif d.emitEnabled {\n\t\td.emit(hf)\n\t}\n\treturn nil\n}\n\n// (same invariants and behavior as parseHeaderFieldRepr)\nfunc (d *Decoder) parseDynamicTableSizeUpdate() error {\n\t// RFC 7541, sec 4.2: This dynamic table size update MUST occur at the\n\t// beginning of the first header block following the change to the dynamic table size.\n\tif !d.firstField && d.dynTab.size > 0 {\n\t\treturn DecodingError{errors.New(\"dynamic table size update MUST occur at the beginning of a header block\")}\n\t}\n\n\tbuf := d.buf\n\tsize, buf, err := readVarInt(5, buf)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif size > uint64(d.dynTab.allowedMaxSize) {\n\t\treturn DecodingError{errors.New(\"dynamic table size update too large\")}\n\t}\n\td.dynTab.setMaxSize(uint32(size))\n\td.buf = buf\n\treturn nil\n}\n\nvar errVarintOverflow = DecodingError{errors.New(\"varint integer overflow\")}\n\n// readVarInt reads an unsigned variable length integer off the\n// beginning of p. n is the parameter as described in\n// https://httpwg.org/specs/rfc7541.html#rfc.section.5.1.\n//\n// n must always be between 1 and 8.\n//\n// The returned remain buffer is either a smaller suffix of p, or err != nil.\n// The error is errNeedMore if p doesn't contain a complete integer.\nfunc readVarInt(n byte, p []byte) (i uint64, remain []byte, err error) {\n\tif n < 1 || n > 8 {\n\t\tpanic(\"bad n\")\n\t}\n\tif len(p) == 0 {\n\t\treturn 0, p, errNeedMore\n\t}\n\ti = uint64(p[0])\n\tif n < 8 {\n\t\ti &= (1 << uint64(n)) - 1\n\t}\n\tif i < (1<<uint64(n))-1 {\n\t\treturn i, p[1:], nil\n\t}\n\n\torigP := p\n\tp = p[1:]\n\tvar m uint64\n\tfor len(p) > 0 {\n\t\tb := p[0]\n\t\tp = p[1:]\n\t\ti += uint64(b&127) << m\n\t\tif b&128 == 0 {\n\t\t\treturn i, p, nil\n\t\t}\n\t\tm += 7\n\t\tif m >= 63 { // TODO: proper overflow check. making this up.\n\t\t\treturn 0, origP, errVarintOverflow\n\t\t}\n\t}\n\treturn 0, origP, errNeedMore\n}\n\n// readString reads an hpack string from p.\n//\n// It returns a reference to the encoded string data to permit deferring decode costs\n// until after the caller verifies all data is present.\nfunc (d *Decoder) readString(p []byte) (u undecodedString, remain []byte, err error) {\n\tif len(p) == 0 {\n\t\treturn u, p, errNeedMore\n\t}\n\tisHuff := p[0]&128 != 0\n\tstrLen, p, err := readVarInt(7, p)\n\tif err != nil {\n\t\treturn u, p, err\n\t}\n\tif d.maxStrLen != 0 && strLen > uint64(d.maxStrLen) {\n\t\t// Returning an error here means Huffman decoding errors\n\t\t// for non-indexed strings past the maximum string length\n\t\t// are ignored, but the server is returning an error anyway\n\t\t// and because the string is not indexed the error will not\n\t\t// affect the decoding state.\n\t\treturn u, nil, ErrStringLength\n\t}\n\tif uint64(len(p)) < strLen {\n\t\treturn u, p, errNeedMore\n\t}\n\tu.isHuff = isHuff\n\tu.b = p[:strLen]\n\treturn u, p[strLen:], nil\n}\n\ntype undecodedString struct {\n\tisHuff bool\n\tb      []byte\n}\n\nfunc (d *Decoder) decodeString(u undecodedString) (string, error) {\n\tif !u.isHuff {\n\t\treturn string(u.b), nil\n\t}\n\tbuf := bufPool.Get().(*bytes.Buffer)\n\tbuf.Reset() // don't trust others\n\tvar s string\n\terr := huffmanDecode(buf, d.maxStrLen, u.b)\n\tif err == nil {\n\t\ts = buf.String()\n\t}\n\tbuf.Reset() // be nice to GC\n\tbufPool.Put(buf)\n\treturn s, err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/hpack/huffman.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hpack\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n\t\"sync\"\n)\n\nvar bufPool = sync.Pool{\n\tNew: func() interface{} { return new(bytes.Buffer) },\n}\n\n// HuffmanDecode decodes the string in v and writes the expanded\n// result to w, returning the number of bytes written to w and the\n// Write call's return value. At most one Write call is made.\nfunc HuffmanDecode(w io.Writer, v []byte) (int, error) {\n\tbuf := bufPool.Get().(*bytes.Buffer)\n\tbuf.Reset()\n\tdefer bufPool.Put(buf)\n\tif err := huffmanDecode(buf, 0, v); err != nil {\n\t\treturn 0, err\n\t}\n\treturn w.Write(buf.Bytes())\n}\n\n// HuffmanDecodeToString decodes the string in v.\nfunc HuffmanDecodeToString(v []byte) (string, error) {\n\tbuf := bufPool.Get().(*bytes.Buffer)\n\tbuf.Reset()\n\tdefer bufPool.Put(buf)\n\tif err := huffmanDecode(buf, 0, v); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn buf.String(), nil\n}\n\n// ErrInvalidHuffman is returned for errors found decoding\n// Huffman-encoded strings.\nvar ErrInvalidHuffman = errors.New(\"hpack: invalid Huffman-encoded data\")\n\n// huffmanDecode decodes v to buf.\n// If maxLen is greater than 0, attempts to write more to buf than\n// maxLen bytes will return ErrStringLength.\nfunc huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {\n\trootHuffmanNode := getRootHuffmanNode()\n\tn := rootHuffmanNode\n\t// cur is the bit buffer that has not been fed into n.\n\t// cbits is the number of low order bits in cur that are valid.\n\t// sbits is the number of bits of the symbol prefix being decoded.\n\tcur, cbits, sbits := uint(0), uint8(0), uint8(0)\n\tfor _, b := range v {\n\t\tcur = cur<<8 | uint(b)\n\t\tcbits += 8\n\t\tsbits += 8\n\t\tfor cbits >= 8 {\n\t\t\tidx := byte(cur >> (cbits - 8))\n\t\t\tn = n.children[idx]\n\t\t\tif n == nil {\n\t\t\t\treturn ErrInvalidHuffman\n\t\t\t}\n\t\t\tif n.children == nil {\n\t\t\t\tif maxLen != 0 && buf.Len() == maxLen {\n\t\t\t\t\treturn ErrStringLength\n\t\t\t\t}\n\t\t\t\tbuf.WriteByte(n.sym)\n\t\t\t\tcbits -= n.codeLen\n\t\t\t\tn = rootHuffmanNode\n\t\t\t\tsbits = cbits\n\t\t\t} else {\n\t\t\t\tcbits -= 8\n\t\t\t}\n\t\t}\n\t}\n\tfor cbits > 0 {\n\t\tn = n.children[byte(cur<<(8-cbits))]\n\t\tif n == nil {\n\t\t\treturn ErrInvalidHuffman\n\t\t}\n\t\tif n.children != nil || n.codeLen > cbits {\n\t\t\tbreak\n\t\t}\n\t\tif maxLen != 0 && buf.Len() == maxLen {\n\t\t\treturn ErrStringLength\n\t\t}\n\t\tbuf.WriteByte(n.sym)\n\t\tcbits -= n.codeLen\n\t\tn = rootHuffmanNode\n\t\tsbits = cbits\n\t}\n\tif sbits > 7 {\n\t\t// Either there was an incomplete symbol, or overlong padding.\n\t\t// Both are decoding errors per RFC 7541 section 5.2.\n\t\treturn ErrInvalidHuffman\n\t}\n\tif mask := uint(1<<cbits - 1); cur&mask != mask {\n\t\t// Trailing bits must be a prefix of EOS per RFC 7541 section 5.2.\n\t\treturn ErrInvalidHuffman\n\t}\n\n\treturn nil\n}\n\n// incomparable is a zero-width, non-comparable type. Adding it to a struct\n// makes that struct also non-comparable, and generally doesn't add\n// any size (as long as it's first).\ntype incomparable [0]func()\n\ntype node struct {\n\t_ incomparable\n\n\t// children is non-nil for internal nodes\n\tchildren *[256]*node\n\n\t// The following are only valid if children is nil:\n\tcodeLen uint8 // number of bits that led to the output of sym\n\tsym     byte  // output symbol\n}\n\nfunc newInternalNode() *node {\n\treturn &node{children: new([256]*node)}\n}\n\nvar (\n\tbuildRootOnce       sync.Once\n\tlazyRootHuffmanNode *node\n)\n\nfunc getRootHuffmanNode() *node {\n\tbuildRootOnce.Do(buildRootHuffmanNode)\n\treturn lazyRootHuffmanNode\n}\n\nfunc buildRootHuffmanNode() {\n\tif len(huffmanCodes) != 256 {\n\t\tpanic(\"unexpected size\")\n\t}\n\tlazyRootHuffmanNode = newInternalNode()\n\t// allocate a leaf node for each of the 256 symbols\n\tleaves := new([256]node)\n\n\tfor sym, code := range huffmanCodes {\n\t\tcodeLen := huffmanCodeLen[sym]\n\n\t\tcur := lazyRootHuffmanNode\n\t\tfor codeLen > 8 {\n\t\t\tcodeLen -= 8\n\t\t\ti := uint8(code >> codeLen)\n\t\t\tif cur.children[i] == nil {\n\t\t\t\tcur.children[i] = newInternalNode()\n\t\t\t}\n\t\t\tcur = cur.children[i]\n\t\t}\n\t\tshift := 8 - codeLen\n\t\tstart, end := int(uint8(code<<shift)), int(1<<shift)\n\n\t\tleaves[sym].sym = byte(sym)\n\t\tleaves[sym].codeLen = codeLen\n\t\tfor i := start; i < start+end; i++ {\n\t\t\tcur.children[i] = &leaves[sym]\n\t\t}\n\t}\n}\n\n// AppendHuffmanString appends s, as encoded in Huffman codes, to dst\n// and returns the extended buffer.\nfunc AppendHuffmanString(dst []byte, s string) []byte {\n\t// This relies on the maximum huffman code length being 30 (See tables.go huffmanCodeLen array)\n\t// So if a uint64 buffer has less than 32 valid bits can always accommodate another huffmanCode.\n\tvar (\n\t\tx uint64 // buffer\n\t\tn uint   // number valid of bits present in x\n\t)\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tn += uint(huffmanCodeLen[c])\n\t\tx <<= huffmanCodeLen[c] % 64\n\t\tx |= uint64(huffmanCodes[c])\n\t\tif n >= 32 {\n\t\t\tn %= 32             // Normally would be -= 32 but %= 32 informs compiler 0 <= n <= 31 for upcoming shift\n\t\t\ty := uint32(x >> n) // Compiler doesn't combine memory writes if y isn't uint32\n\t\t\tdst = append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))\n\t\t}\n\t}\n\t// Add padding bits if necessary\n\tif over := n % 8; over > 0 {\n\t\tconst (\n\t\t\teosCode    = 0x3fffffff\n\t\t\teosNBits   = 30\n\t\t\teosPadByte = eosCode >> (eosNBits - 8)\n\t\t)\n\t\tpad := 8 - over\n\t\tx = (x << pad) | (eosPadByte >> over)\n\t\tn += pad // 8 now divides into n exactly\n\t}\n\t// n in (0, 8, 16, 24, 32)\n\tswitch n / 8 {\n\tcase 0:\n\t\treturn dst\n\tcase 1:\n\t\treturn append(dst, byte(x))\n\tcase 2:\n\t\ty := uint16(x)\n\t\treturn append(dst, byte(y>>8), byte(y))\n\tcase 3:\n\t\ty := uint16(x >> 8)\n\t\treturn append(dst, byte(y>>8), byte(y), byte(x))\n\t}\n\t//\tcase 4:\n\ty := uint32(x)\n\treturn append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))\n}\n\n// HuffmanEncodeLength returns the number of bytes required to encode\n// s in Huffman codes. The result is round up to byte boundary.\nfunc HuffmanEncodeLength(s string) uint64 {\n\tn := uint64(0)\n\tfor i := 0; i < len(s); i++ {\n\t\tn += uint64(huffmanCodeLen[s[i]])\n\t}\n\treturn (n + 7) / 8\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/hpack/static_table.go",
    "content": "// go generate gen.go\n// Code generated by the command above; DO NOT EDIT.\n\npackage hpack\n\nvar staticTable = &headerFieldTable{\n\tevictCount: 0,\n\tbyName: map[string]uint64{\n\t\t\":authority\":                  1,\n\t\t\":method\":                     3,\n\t\t\":path\":                       5,\n\t\t\":scheme\":                     7,\n\t\t\":status\":                     14,\n\t\t\"accept-charset\":              15,\n\t\t\"accept-encoding\":             16,\n\t\t\"accept-language\":             17,\n\t\t\"accept-ranges\":               18,\n\t\t\"accept\":                      19,\n\t\t\"access-control-allow-origin\": 20,\n\t\t\"age\":                         21,\n\t\t\"allow\":                       22,\n\t\t\"authorization\":               23,\n\t\t\"cache-control\":               24,\n\t\t\"content-disposition\":         25,\n\t\t\"content-encoding\":            26,\n\t\t\"content-language\":            27,\n\t\t\"content-length\":              28,\n\t\t\"content-location\":            29,\n\t\t\"content-range\":               30,\n\t\t\"content-type\":                31,\n\t\t\"cookie\":                      32,\n\t\t\"date\":                        33,\n\t\t\"etag\":                        34,\n\t\t\"expect\":                      35,\n\t\t\"expires\":                     36,\n\t\t\"from\":                        37,\n\t\t\"host\":                        38,\n\t\t\"if-match\":                    39,\n\t\t\"if-modified-since\":           40,\n\t\t\"if-none-match\":               41,\n\t\t\"if-range\":                    42,\n\t\t\"if-unmodified-since\":         43,\n\t\t\"last-modified\":               44,\n\t\t\"link\":                        45,\n\t\t\"location\":                    46,\n\t\t\"max-forwards\":                47,\n\t\t\"proxy-authenticate\":          48,\n\t\t\"proxy-authorization\":         49,\n\t\t\"range\":                       50,\n\t\t\"referer\":                     51,\n\t\t\"refresh\":                     52,\n\t\t\"retry-after\":                 53,\n\t\t\"server\":                      54,\n\t\t\"set-cookie\":                  55,\n\t\t\"strict-transport-security\":   56,\n\t\t\"transfer-encoding\":           57,\n\t\t\"user-agent\":                  58,\n\t\t\"vary\":                        59,\n\t\t\"via\":                         60,\n\t\t\"www-authenticate\":            61,\n\t},\n\tbyNameValue: map[pairNameValue]uint64{\n\t\t{name: \":authority\", value: \"\"}:                   1,\n\t\t{name: \":method\", value: \"GET\"}:                   2,\n\t\t{name: \":method\", value: \"POST\"}:                  3,\n\t\t{name: \":path\", value: \"/\"}:                       4,\n\t\t{name: \":path\", value: \"/index.html\"}:             5,\n\t\t{name: \":scheme\", value: \"http\"}:                  6,\n\t\t{name: \":scheme\", value: \"https\"}:                 7,\n\t\t{name: \":status\", value: \"200\"}:                   8,\n\t\t{name: \":status\", value: \"204\"}:                   9,\n\t\t{name: \":status\", value: \"206\"}:                   10,\n\t\t{name: \":status\", value: \"304\"}:                   11,\n\t\t{name: \":status\", value: \"400\"}:                   12,\n\t\t{name: \":status\", value: \"404\"}:                   13,\n\t\t{name: \":status\", value: \"500\"}:                   14,\n\t\t{name: \"accept-charset\", value: \"\"}:               15,\n\t\t{name: \"accept-encoding\", value: \"gzip, deflate\"}: 16,\n\t\t{name: \"accept-language\", value: \"\"}:              17,\n\t\t{name: \"accept-ranges\", value: \"\"}:                18,\n\t\t{name: \"accept\", value: \"\"}:                       19,\n\t\t{name: \"access-control-allow-origin\", value: \"\"}:  20,\n\t\t{name: \"age\", value: \"\"}:                          21,\n\t\t{name: \"allow\", value: \"\"}:                        22,\n\t\t{name: \"authorization\", value: \"\"}:                23,\n\t\t{name: \"cache-control\", value: \"\"}:                24,\n\t\t{name: \"content-disposition\", value: \"\"}:          25,\n\t\t{name: \"content-encoding\", value: \"\"}:             26,\n\t\t{name: \"content-language\", value: \"\"}:             27,\n\t\t{name: \"content-length\", value: \"\"}:               28,\n\t\t{name: \"content-location\", value: \"\"}:             29,\n\t\t{name: \"content-range\", value: \"\"}:                30,\n\t\t{name: \"content-type\", value: \"\"}:                 31,\n\t\t{name: \"cookie\", value: \"\"}:                       32,\n\t\t{name: \"date\", value: \"\"}:                         33,\n\t\t{name: \"etag\", value: \"\"}:                         34,\n\t\t{name: \"expect\", value: \"\"}:                       35,\n\t\t{name: \"expires\", value: \"\"}:                      36,\n\t\t{name: \"from\", value: \"\"}:                         37,\n\t\t{name: \"host\", value: \"\"}:                         38,\n\t\t{name: \"if-match\", value: \"\"}:                     39,\n\t\t{name: \"if-modified-since\", value: \"\"}:            40,\n\t\t{name: \"if-none-match\", value: \"\"}:                41,\n\t\t{name: \"if-range\", value: \"\"}:                     42,\n\t\t{name: \"if-unmodified-since\", value: \"\"}:          43,\n\t\t{name: \"last-modified\", value: \"\"}:                44,\n\t\t{name: \"link\", value: \"\"}:                         45,\n\t\t{name: \"location\", value: \"\"}:                     46,\n\t\t{name: \"max-forwards\", value: \"\"}:                 47,\n\t\t{name: \"proxy-authenticate\", value: \"\"}:           48,\n\t\t{name: \"proxy-authorization\", value: \"\"}:          49,\n\t\t{name: \"range\", value: \"\"}:                        50,\n\t\t{name: \"referer\", value: \"\"}:                      51,\n\t\t{name: \"refresh\", value: \"\"}:                      52,\n\t\t{name: \"retry-after\", value: \"\"}:                  53,\n\t\t{name: \"server\", value: \"\"}:                       54,\n\t\t{name: \"set-cookie\", value: \"\"}:                   55,\n\t\t{name: \"strict-transport-security\", value: \"\"}:    56,\n\t\t{name: \"transfer-encoding\", value: \"\"}:            57,\n\t\t{name: \"user-agent\", value: \"\"}:                   58,\n\t\t{name: \"vary\", value: \"\"}:                         59,\n\t\t{name: \"via\", value: \"\"}:                          60,\n\t\t{name: \"www-authenticate\", value: \"\"}:             61,\n\t},\n\tents: []HeaderField{\n\t\t{Name: \":authority\", Value: \"\", Sensitive: false},\n\t\t{Name: \":method\", Value: \"GET\", Sensitive: false},\n\t\t{Name: \":method\", Value: \"POST\", Sensitive: false},\n\t\t{Name: \":path\", Value: \"/\", Sensitive: false},\n\t\t{Name: \":path\", Value: \"/index.html\", Sensitive: false},\n\t\t{Name: \":scheme\", Value: \"http\", Sensitive: false},\n\t\t{Name: \":scheme\", Value: \"https\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"200\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"204\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"206\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"304\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"400\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"404\", Sensitive: false},\n\t\t{Name: \":status\", Value: \"500\", Sensitive: false},\n\t\t{Name: \"accept-charset\", Value: \"\", Sensitive: false},\n\t\t{Name: \"accept-encoding\", Value: \"gzip, deflate\", Sensitive: false},\n\t\t{Name: \"accept-language\", Value: \"\", Sensitive: false},\n\t\t{Name: \"accept-ranges\", Value: \"\", Sensitive: false},\n\t\t{Name: \"accept\", Value: \"\", Sensitive: false},\n\t\t{Name: \"access-control-allow-origin\", Value: \"\", Sensitive: false},\n\t\t{Name: \"age\", Value: \"\", Sensitive: false},\n\t\t{Name: \"allow\", Value: \"\", Sensitive: false},\n\t\t{Name: \"authorization\", Value: \"\", Sensitive: false},\n\t\t{Name: \"cache-control\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-disposition\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-encoding\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-language\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-length\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-location\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-range\", Value: \"\", Sensitive: false},\n\t\t{Name: \"content-type\", Value: \"\", Sensitive: false},\n\t\t{Name: \"cookie\", Value: \"\", Sensitive: false},\n\t\t{Name: \"date\", Value: \"\", Sensitive: false},\n\t\t{Name: \"etag\", Value: \"\", Sensitive: false},\n\t\t{Name: \"expect\", Value: \"\", Sensitive: false},\n\t\t{Name: \"expires\", Value: \"\", Sensitive: false},\n\t\t{Name: \"from\", Value: \"\", Sensitive: false},\n\t\t{Name: \"host\", Value: \"\", Sensitive: false},\n\t\t{Name: \"if-match\", Value: \"\", Sensitive: false},\n\t\t{Name: \"if-modified-since\", Value: \"\", Sensitive: false},\n\t\t{Name: \"if-none-match\", Value: \"\", Sensitive: false},\n\t\t{Name: \"if-range\", Value: \"\", Sensitive: false},\n\t\t{Name: \"if-unmodified-since\", Value: \"\", Sensitive: false},\n\t\t{Name: \"last-modified\", Value: \"\", Sensitive: false},\n\t\t{Name: \"link\", Value: \"\", Sensitive: false},\n\t\t{Name: \"location\", Value: \"\", Sensitive: false},\n\t\t{Name: \"max-forwards\", Value: \"\", Sensitive: false},\n\t\t{Name: \"proxy-authenticate\", Value: \"\", Sensitive: false},\n\t\t{Name: \"proxy-authorization\", Value: \"\", Sensitive: false},\n\t\t{Name: \"range\", Value: \"\", Sensitive: false},\n\t\t{Name: \"referer\", Value: \"\", Sensitive: false},\n\t\t{Name: \"refresh\", Value: \"\", Sensitive: false},\n\t\t{Name: \"retry-after\", Value: \"\", Sensitive: false},\n\t\t{Name: \"server\", Value: \"\", Sensitive: false},\n\t\t{Name: \"set-cookie\", Value: \"\", Sensitive: false},\n\t\t{Name: \"strict-transport-security\", Value: \"\", Sensitive: false},\n\t\t{Name: \"transfer-encoding\", Value: \"\", Sensitive: false},\n\t\t{Name: \"user-agent\", Value: \"\", Sensitive: false},\n\t\t{Name: \"vary\", Value: \"\", Sensitive: false},\n\t\t{Name: \"via\", Value: \"\", Sensitive: false},\n\t\t{Name: \"www-authenticate\", Value: \"\", Sensitive: false},\n\t},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/hpack/tables.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage hpack\n\nimport (\n\t\"fmt\"\n)\n\n// headerFieldTable implements a list of HeaderFields.\n// This is used to implement the static and dynamic tables.\ntype headerFieldTable struct {\n\t// For static tables, entries are never evicted.\n\t//\n\t// For dynamic tables, entries are evicted from ents[0] and added to the end.\n\t// Each entry has a unique id that starts at one and increments for each\n\t// entry that is added. This unique id is stable across evictions, meaning\n\t// it can be used as a pointer to a specific entry. As in hpack, unique ids\n\t// are 1-based. The unique id for ents[k] is k + evictCount + 1.\n\t//\n\t// Zero is not a valid unique id.\n\t//\n\t// evictCount should not overflow in any remotely practical situation. In\n\t// practice, we will have one dynamic table per HTTP/2 connection. If we\n\t// assume a very powerful server that handles 1M QPS per connection and each\n\t// request adds (then evicts) 100 entries from the table, it would still take\n\t// 2M years for evictCount to overflow.\n\tents       []HeaderField\n\tevictCount uint64\n\n\t// byName maps a HeaderField name to the unique id of the newest entry with\n\t// the same name. See above for a definition of \"unique id\".\n\tbyName map[string]uint64\n\n\t// byNameValue maps a HeaderField name/value pair to the unique id of the newest\n\t// entry with the same name and value. See above for a definition of \"unique id\".\n\tbyNameValue map[pairNameValue]uint64\n}\n\ntype pairNameValue struct {\n\tname, value string\n}\n\nfunc (t *headerFieldTable) init() {\n\tt.byName = make(map[string]uint64)\n\tt.byNameValue = make(map[pairNameValue]uint64)\n}\n\n// len reports the number of entries in the table.\nfunc (t *headerFieldTable) len() int {\n\treturn len(t.ents)\n}\n\n// addEntry adds a new entry.\nfunc (t *headerFieldTable) addEntry(f HeaderField) {\n\tid := uint64(t.len()) + t.evictCount + 1\n\tt.byName[f.Name] = id\n\tt.byNameValue[pairNameValue{f.Name, f.Value}] = id\n\tt.ents = append(t.ents, f)\n}\n\n// evictOldest evicts the n oldest entries in the table.\nfunc (t *headerFieldTable) evictOldest(n int) {\n\tif n > t.len() {\n\t\tpanic(fmt.Sprintf(\"evictOldest(%v) on table with %v entries\", n, t.len()))\n\t}\n\tfor k := 0; k < n; k++ {\n\t\tf := t.ents[k]\n\t\tid := t.evictCount + uint64(k) + 1\n\t\tif t.byName[f.Name] == id {\n\t\t\tdelete(t.byName, f.Name)\n\t\t}\n\t\tif p := (pairNameValue{f.Name, f.Value}); t.byNameValue[p] == id {\n\t\t\tdelete(t.byNameValue, p)\n\t\t}\n\t}\n\tcopy(t.ents, t.ents[n:])\n\tfor k := t.len() - n; k < t.len(); k++ {\n\t\tt.ents[k] = HeaderField{} // so strings can be garbage collected\n\t}\n\tt.ents = t.ents[:t.len()-n]\n\tif t.evictCount+uint64(n) < t.evictCount {\n\t\tpanic(\"evictCount overflow\")\n\t}\n\tt.evictCount += uint64(n)\n}\n\n// search finds f in the table. If there is no match, i is 0.\n// If both name and value match, i is the matched index and nameValueMatch\n// becomes true. If only name matches, i points to that index and\n// nameValueMatch becomes false.\n//\n// The returned index is a 1-based HPACK index. For dynamic tables, HPACK says\n// that index 1 should be the newest entry, but t.ents[0] is the oldest entry,\n// meaning t.ents is reversed for dynamic tables. Hence, when t is a dynamic\n// table, the return value i actually refers to the entry t.ents[t.len()-i].\n//\n// All tables are assumed to be a dynamic tables except for the global staticTable.\n//\n// See Section 2.3.3.\nfunc (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) {\n\tif !f.Sensitive {\n\t\tif id := t.byNameValue[pairNameValue{f.Name, f.Value}]; id != 0 {\n\t\t\treturn t.idToIndex(id), true\n\t\t}\n\t}\n\tif id := t.byName[f.Name]; id != 0 {\n\t\treturn t.idToIndex(id), false\n\t}\n\treturn 0, false\n}\n\n// idToIndex converts a unique id to an HPACK index.\n// See Section 2.3.3.\nfunc (t *headerFieldTable) idToIndex(id uint64) uint64 {\n\tif id <= t.evictCount {\n\t\tpanic(fmt.Sprintf(\"id (%v) <= evictCount (%v)\", id, t.evictCount))\n\t}\n\tk := id - t.evictCount - 1 // convert id to an index t.ents[k]\n\tif t != staticTable {\n\t\treturn uint64(t.len()) - k // dynamic table\n\t}\n\treturn k + 1\n}\n\nvar huffmanCodes = [256]uint32{\n\t0x1ff8,\n\t0x7fffd8,\n\t0xfffffe2,\n\t0xfffffe3,\n\t0xfffffe4,\n\t0xfffffe5,\n\t0xfffffe6,\n\t0xfffffe7,\n\t0xfffffe8,\n\t0xffffea,\n\t0x3ffffffc,\n\t0xfffffe9,\n\t0xfffffea,\n\t0x3ffffffd,\n\t0xfffffeb,\n\t0xfffffec,\n\t0xfffffed,\n\t0xfffffee,\n\t0xfffffef,\n\t0xffffff0,\n\t0xffffff1,\n\t0xffffff2,\n\t0x3ffffffe,\n\t0xffffff3,\n\t0xffffff4,\n\t0xffffff5,\n\t0xffffff6,\n\t0xffffff7,\n\t0xffffff8,\n\t0xffffff9,\n\t0xffffffa,\n\t0xffffffb,\n\t0x14,\n\t0x3f8,\n\t0x3f9,\n\t0xffa,\n\t0x1ff9,\n\t0x15,\n\t0xf8,\n\t0x7fa,\n\t0x3fa,\n\t0x3fb,\n\t0xf9,\n\t0x7fb,\n\t0xfa,\n\t0x16,\n\t0x17,\n\t0x18,\n\t0x0,\n\t0x1,\n\t0x2,\n\t0x19,\n\t0x1a,\n\t0x1b,\n\t0x1c,\n\t0x1d,\n\t0x1e,\n\t0x1f,\n\t0x5c,\n\t0xfb,\n\t0x7ffc,\n\t0x20,\n\t0xffb,\n\t0x3fc,\n\t0x1ffa,\n\t0x21,\n\t0x5d,\n\t0x5e,\n\t0x5f,\n\t0x60,\n\t0x61,\n\t0x62,\n\t0x63,\n\t0x64,\n\t0x65,\n\t0x66,\n\t0x67,\n\t0x68,\n\t0x69,\n\t0x6a,\n\t0x6b,\n\t0x6c,\n\t0x6d,\n\t0x6e,\n\t0x6f,\n\t0x70,\n\t0x71,\n\t0x72,\n\t0xfc,\n\t0x73,\n\t0xfd,\n\t0x1ffb,\n\t0x7fff0,\n\t0x1ffc,\n\t0x3ffc,\n\t0x22,\n\t0x7ffd,\n\t0x3,\n\t0x23,\n\t0x4,\n\t0x24,\n\t0x5,\n\t0x25,\n\t0x26,\n\t0x27,\n\t0x6,\n\t0x74,\n\t0x75,\n\t0x28,\n\t0x29,\n\t0x2a,\n\t0x7,\n\t0x2b,\n\t0x76,\n\t0x2c,\n\t0x8,\n\t0x9,\n\t0x2d,\n\t0x77,\n\t0x78,\n\t0x79,\n\t0x7a,\n\t0x7b,\n\t0x7ffe,\n\t0x7fc,\n\t0x3ffd,\n\t0x1ffd,\n\t0xffffffc,\n\t0xfffe6,\n\t0x3fffd2,\n\t0xfffe7,\n\t0xfffe8,\n\t0x3fffd3,\n\t0x3fffd4,\n\t0x3fffd5,\n\t0x7fffd9,\n\t0x3fffd6,\n\t0x7fffda,\n\t0x7fffdb,\n\t0x7fffdc,\n\t0x7fffdd,\n\t0x7fffde,\n\t0xffffeb,\n\t0x7fffdf,\n\t0xffffec,\n\t0xffffed,\n\t0x3fffd7,\n\t0x7fffe0,\n\t0xffffee,\n\t0x7fffe1,\n\t0x7fffe2,\n\t0x7fffe3,\n\t0x7fffe4,\n\t0x1fffdc,\n\t0x3fffd8,\n\t0x7fffe5,\n\t0x3fffd9,\n\t0x7fffe6,\n\t0x7fffe7,\n\t0xffffef,\n\t0x3fffda,\n\t0x1fffdd,\n\t0xfffe9,\n\t0x3fffdb,\n\t0x3fffdc,\n\t0x7fffe8,\n\t0x7fffe9,\n\t0x1fffde,\n\t0x7fffea,\n\t0x3fffdd,\n\t0x3fffde,\n\t0xfffff0,\n\t0x1fffdf,\n\t0x3fffdf,\n\t0x7fffeb,\n\t0x7fffec,\n\t0x1fffe0,\n\t0x1fffe1,\n\t0x3fffe0,\n\t0x1fffe2,\n\t0x7fffed,\n\t0x3fffe1,\n\t0x7fffee,\n\t0x7fffef,\n\t0xfffea,\n\t0x3fffe2,\n\t0x3fffe3,\n\t0x3fffe4,\n\t0x7ffff0,\n\t0x3fffe5,\n\t0x3fffe6,\n\t0x7ffff1,\n\t0x3ffffe0,\n\t0x3ffffe1,\n\t0xfffeb,\n\t0x7fff1,\n\t0x3fffe7,\n\t0x7ffff2,\n\t0x3fffe8,\n\t0x1ffffec,\n\t0x3ffffe2,\n\t0x3ffffe3,\n\t0x3ffffe4,\n\t0x7ffffde,\n\t0x7ffffdf,\n\t0x3ffffe5,\n\t0xfffff1,\n\t0x1ffffed,\n\t0x7fff2,\n\t0x1fffe3,\n\t0x3ffffe6,\n\t0x7ffffe0,\n\t0x7ffffe1,\n\t0x3ffffe7,\n\t0x7ffffe2,\n\t0xfffff2,\n\t0x1fffe4,\n\t0x1fffe5,\n\t0x3ffffe8,\n\t0x3ffffe9,\n\t0xffffffd,\n\t0x7ffffe3,\n\t0x7ffffe4,\n\t0x7ffffe5,\n\t0xfffec,\n\t0xfffff3,\n\t0xfffed,\n\t0x1fffe6,\n\t0x3fffe9,\n\t0x1fffe7,\n\t0x1fffe8,\n\t0x7ffff3,\n\t0x3fffea,\n\t0x3fffeb,\n\t0x1ffffee,\n\t0x1ffffef,\n\t0xfffff4,\n\t0xfffff5,\n\t0x3ffffea,\n\t0x7ffff4,\n\t0x3ffffeb,\n\t0x7ffffe6,\n\t0x3ffffec,\n\t0x3ffffed,\n\t0x7ffffe7,\n\t0x7ffffe8,\n\t0x7ffffe9,\n\t0x7ffffea,\n\t0x7ffffeb,\n\t0xffffffe,\n\t0x7ffffec,\n\t0x7ffffed,\n\t0x7ffffee,\n\t0x7ffffef,\n\t0x7fffff0,\n\t0x3ffffee,\n}\n\nvar huffmanCodeLen = [256]uint8{\n\t13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28,\n\t28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28,\n\t6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6,\n\t5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10,\n\t13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n\t7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6,\n\t15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5,\n\t6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28,\n\t20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23,\n\t24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24,\n\t22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23,\n\t21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23,\n\t26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25,\n\t19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27,\n\t20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23,\n\t26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26,\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/http2.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package http2 implements the HTTP/2 protocol.\n//\n// This package is low-level and intended to be used directly by very\n// few people. Most users will use it indirectly through the automatic\n// use by the net/http package (from Go 1.6 and later).\n// For use in earlier Go versions see ConfigureServer. (Transport support\n// requires Go 1.6 or later)\n//\n// See https://http2.github.io/ for more information on HTTP/2.\npackage http2 // import \"golang.org/x/net/http2\"\n\nimport (\n\t\"bufio\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"golang.org/x/net/http/httpguts\"\n)\n\nvar (\n\tVerboseLogs    bool\n\tlogFrameWrites bool\n\tlogFrameReads  bool\n\n\t// Enabling extended CONNECT by causes browsers to attempt to use\n\t// WebSockets-over-HTTP/2. This results in problems when the server's websocket\n\t// package doesn't support extended CONNECT.\n\t//\n\t// Disable extended CONNECT by default for now.\n\t//\n\t// Issue #71128.\n\tdisableExtendedConnectProtocol = true\n)\n\nfunc init() {\n\te := os.Getenv(\"GODEBUG\")\n\tif strings.Contains(e, \"http2debug=1\") {\n\t\tVerboseLogs = true\n\t}\n\tif strings.Contains(e, \"http2debug=2\") {\n\t\tVerboseLogs = true\n\t\tlogFrameWrites = true\n\t\tlogFrameReads = true\n\t}\n\tif strings.Contains(e, \"http2xconnect=1\") {\n\t\tdisableExtendedConnectProtocol = false\n\t}\n}\n\nconst (\n\t// ClientPreface is the string that must be sent by new\n\t// connections from clients.\n\tClientPreface = \"PRI * HTTP/2.0\\r\\n\\r\\nSM\\r\\n\\r\\n\"\n\n\t// SETTINGS_MAX_FRAME_SIZE default\n\t// https://httpwg.org/specs/rfc7540.html#rfc.section.6.5.2\n\tinitialMaxFrameSize = 16384\n\n\t// NextProtoTLS is the NPN/ALPN protocol negotiated during\n\t// HTTP/2's TLS setup.\n\tNextProtoTLS = \"h2\"\n\n\t// https://httpwg.org/specs/rfc7540.html#SettingValues\n\tinitialHeaderTableSize = 4096\n\n\tinitialWindowSize = 65535 // 6.9.2 Initial Flow Control Window Size\n\n\tdefaultMaxReadFrameSize = 1 << 20\n)\n\nvar (\n\tclientPreface = []byte(ClientPreface)\n)\n\ntype streamState int\n\n// HTTP/2 stream states.\n//\n// See http://tools.ietf.org/html/rfc7540#section-5.1.\n//\n// For simplicity, the server code merges \"reserved (local)\" into\n// \"half-closed (remote)\". This is one less state transition to track.\n// The only downside is that we send PUSH_PROMISEs slightly less\n// liberally than allowable. More discussion here:\n// https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0599.html\n//\n// \"reserved (remote)\" is omitted since the client code does not\n// support server push.\nconst (\n\tstateIdle streamState = iota\n\tstateOpen\n\tstateHalfClosedLocal\n\tstateHalfClosedRemote\n\tstateClosed\n)\n\nvar stateName = [...]string{\n\tstateIdle:             \"Idle\",\n\tstateOpen:             \"Open\",\n\tstateHalfClosedLocal:  \"HalfClosedLocal\",\n\tstateHalfClosedRemote: \"HalfClosedRemote\",\n\tstateClosed:           \"Closed\",\n}\n\nfunc (st streamState) String() string {\n\treturn stateName[st]\n}\n\n// Setting is a setting parameter: which setting it is, and its value.\ntype Setting struct {\n\t// ID is which setting is being set.\n\t// See https://httpwg.org/specs/rfc7540.html#SettingFormat\n\tID SettingID\n\n\t// Val is the value.\n\tVal uint32\n}\n\nfunc (s Setting) String() string {\n\treturn fmt.Sprintf(\"[%v = %d]\", s.ID, s.Val)\n}\n\n// Valid reports whether the setting is valid.\nfunc (s Setting) Valid() error {\n\t// Limits and error codes from 6.5.2 Defined SETTINGS Parameters\n\tswitch s.ID {\n\tcase SettingEnablePush:\n\t\tif s.Val != 1 && s.Val != 0 {\n\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t}\n\tcase SettingInitialWindowSize:\n\t\tif s.Val > 1<<31-1 {\n\t\t\treturn ConnectionError(ErrCodeFlowControl)\n\t\t}\n\tcase SettingMaxFrameSize:\n\t\tif s.Val < 16384 || s.Val > 1<<24-1 {\n\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t}\n\tcase SettingEnableConnectProtocol:\n\t\tif s.Val != 1 && s.Val != 0 {\n\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t}\n\t}\n\treturn nil\n}\n\n// A SettingID is an HTTP/2 setting as defined in\n// https://httpwg.org/specs/rfc7540.html#iana-settings\ntype SettingID uint16\n\nconst (\n\tSettingHeaderTableSize       SettingID = 0x1\n\tSettingEnablePush            SettingID = 0x2\n\tSettingMaxConcurrentStreams  SettingID = 0x3\n\tSettingInitialWindowSize     SettingID = 0x4\n\tSettingMaxFrameSize          SettingID = 0x5\n\tSettingMaxHeaderListSize     SettingID = 0x6\n\tSettingEnableConnectProtocol SettingID = 0x8\n\tSettingNoRFC7540Priorities   SettingID = 0x9\n)\n\nvar settingName = map[SettingID]string{\n\tSettingHeaderTableSize:       \"HEADER_TABLE_SIZE\",\n\tSettingEnablePush:            \"ENABLE_PUSH\",\n\tSettingMaxConcurrentStreams:  \"MAX_CONCURRENT_STREAMS\",\n\tSettingInitialWindowSize:     \"INITIAL_WINDOW_SIZE\",\n\tSettingMaxFrameSize:          \"MAX_FRAME_SIZE\",\n\tSettingMaxHeaderListSize:     \"MAX_HEADER_LIST_SIZE\",\n\tSettingEnableConnectProtocol: \"ENABLE_CONNECT_PROTOCOL\",\n\tSettingNoRFC7540Priorities:   \"NO_RFC7540_PRIORITIES\",\n}\n\nfunc (s SettingID) String() string {\n\tif v, ok := settingName[s]; ok {\n\t\treturn v\n\t}\n\treturn fmt.Sprintf(\"UNKNOWN_SETTING_%d\", uint16(s))\n}\n\n// validWireHeaderFieldName reports whether v is a valid header field\n// name (key). See httpguts.ValidHeaderName for the base rules.\n//\n// Further, http2 says:\n//\n//\t\"Just as in HTTP/1.x, header field names are strings of ASCII\n//\tcharacters that are compared in a case-insensitive\n//\tfashion. However, header field names MUST be converted to\n//\tlowercase prior to their encoding in HTTP/2. \"\nfunc validWireHeaderFieldName(v string) bool {\n\tif len(v) == 0 {\n\t\treturn false\n\t}\n\tfor _, r := range v {\n\t\tif !httpguts.IsTokenRune(r) {\n\t\t\treturn false\n\t\t}\n\t\tif 'A' <= r && r <= 'Z' {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc httpCodeString(code int) string {\n\tswitch code {\n\tcase 200:\n\t\treturn \"200\"\n\tcase 404:\n\t\treturn \"404\"\n\t}\n\treturn strconv.Itoa(code)\n}\n\n// from pkg io\ntype stringWriter interface {\n\tWriteString(s string) (n int, err error)\n}\n\n// A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed).\ntype closeWaiter chan struct{}\n\n// Init makes a closeWaiter usable.\n// It exists because so a closeWaiter value can be placed inside a\n// larger struct and have the Mutex and Cond's memory in the same\n// allocation.\nfunc (cw *closeWaiter) Init() {\n\t*cw = make(chan struct{})\n}\n\n// Close marks the closeWaiter as closed and unblocks any waiters.\nfunc (cw closeWaiter) Close() {\n\tclose(cw)\n}\n\n// Wait waits for the closeWaiter to become closed.\nfunc (cw closeWaiter) Wait() {\n\t<-cw\n}\n\n// bufferedWriter is a buffered writer that writes to w.\n// Its buffered writer is lazily allocated as needed, to minimize\n// idle memory usage with many connections.\ntype bufferedWriter struct {\n\t_           incomparable\n\tconn        net.Conn      // immutable\n\tbw          *bufio.Writer // non-nil when data is buffered\n\tbyteTimeout time.Duration // immutable, WriteByteTimeout\n}\n\nfunc newBufferedWriter(conn net.Conn, timeout time.Duration) *bufferedWriter {\n\treturn &bufferedWriter{\n\t\tconn:        conn,\n\t\tbyteTimeout: timeout,\n\t}\n}\n\n// bufWriterPoolBufferSize is the size of bufio.Writer's\n// buffers created using bufWriterPool.\n//\n// TODO: pick a less arbitrary value? this is a bit under\n// (3 x typical 1500 byte MTU) at least. Other than that,\n// not much thought went into it.\nconst bufWriterPoolBufferSize = 4 << 10\n\nvar bufWriterPool = sync.Pool{\n\tNew: func() interface{} {\n\t\treturn bufio.NewWriterSize(nil, bufWriterPoolBufferSize)\n\t},\n}\n\nfunc (w *bufferedWriter) Available() int {\n\tif w.bw == nil {\n\t\treturn bufWriterPoolBufferSize\n\t}\n\treturn w.bw.Available()\n}\n\nfunc (w *bufferedWriter) Write(p []byte) (n int, err error) {\n\tif w.bw == nil {\n\t\tbw := bufWriterPool.Get().(*bufio.Writer)\n\t\tbw.Reset((*bufferedWriterTimeoutWriter)(w))\n\t\tw.bw = bw\n\t}\n\treturn w.bw.Write(p)\n}\n\nfunc (w *bufferedWriter) Flush() error {\n\tbw := w.bw\n\tif bw == nil {\n\t\treturn nil\n\t}\n\terr := bw.Flush()\n\tbw.Reset(nil)\n\tbufWriterPool.Put(bw)\n\tw.bw = nil\n\treturn err\n}\n\ntype bufferedWriterTimeoutWriter bufferedWriter\n\nfunc (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) {\n\treturn writeWithByteTimeout(w.conn, w.byteTimeout, p)\n}\n\n// writeWithByteTimeout writes to conn.\n// If more than timeout passes without any bytes being written to the connection,\n// the write fails.\nfunc writeWithByteTimeout(conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {\n\tif timeout <= 0 {\n\t\treturn conn.Write(p)\n\t}\n\tfor {\n\t\tconn.SetWriteDeadline(time.Now().Add(timeout))\n\t\tnn, err := conn.Write(p[n:])\n\t\tn += nn\n\t\tif n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) {\n\t\t\t// Either we finished the write, made no progress, or hit the deadline.\n\t\t\t// Whichever it is, we're done now.\n\t\t\tconn.SetWriteDeadline(time.Time{})\n\t\t\treturn n, err\n\t\t}\n\t}\n}\n\nfunc mustUint31(v int32) uint32 {\n\tif v < 0 || v > 2147483647 {\n\t\tpanic(\"out of range\")\n\t}\n\treturn uint32(v)\n}\n\n// bodyAllowedForStatus reports whether a given response status code\n// permits a body. See RFC 7230, section 3.3.\nfunc bodyAllowedForStatus(status int) bool {\n\tswitch {\n\tcase status >= 100 && status <= 199:\n\t\treturn false\n\tcase status == 204:\n\t\treturn false\n\tcase status == 304:\n\t\treturn false\n\t}\n\treturn true\n}\n\ntype httpError struct {\n\t_       incomparable\n\tmsg     string\n\ttimeout bool\n}\n\nfunc (e *httpError) Error() string   { return e.msg }\nfunc (e *httpError) Timeout() bool   { return e.timeout }\nfunc (e *httpError) Temporary() bool { return true }\n\nvar errTimeout error = &httpError{msg: \"http2: timeout awaiting response headers\", timeout: true}\n\ntype connectionStater interface {\n\tConnectionState() tls.ConnectionState\n}\n\nvar sorterPool = sync.Pool{New: func() interface{} { return new(sorter) }}\n\ntype sorter struct {\n\tv []string // owned by sorter\n}\n\nfunc (s *sorter) Len() int           { return len(s.v) }\nfunc (s *sorter) Swap(i, j int)      { s.v[i], s.v[j] = s.v[j], s.v[i] }\nfunc (s *sorter) Less(i, j int) bool { return s.v[i] < s.v[j] }\n\n// Keys returns the sorted keys of h.\n//\n// The returned slice is only valid until s used again or returned to\n// its pool.\nfunc (s *sorter) Keys(h http.Header) []string {\n\tkeys := s.v[:0]\n\tfor k := range h {\n\t\tkeys = append(keys, k)\n\t}\n\ts.v = keys\n\tsort.Sort(s)\n\treturn keys\n}\n\nfunc (s *sorter) SortStrings(ss []string) {\n\t// Our sorter works on s.v, which sorter owns, so\n\t// stash it away while we sort the user's buffer.\n\tsave := s.v\n\ts.v = ss\n\tsort.Sort(s)\n\ts.v = save\n}\n\n// incomparable is a zero-width, non-comparable type. Adding it to a struct\n// makes that struct also non-comparable, and generally doesn't add\n// any size (as long as it's first).\ntype incomparable [0]func()\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/pipe.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"sync\"\n)\n\n// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like\n// io.Pipe except there are no PipeReader/PipeWriter halves, and the\n// underlying buffer is an interface. (io.Pipe is always unbuffered)\ntype pipe struct {\n\tmu       sync.Mutex\n\tc        sync.Cond     // c.L lazily initialized to &p.mu\n\tb        pipeBuffer    // nil when done reading\n\tunread   int           // bytes unread when done\n\terr      error         // read error once empty. non-nil means closed.\n\tbreakErr error         // immediate read error (caller doesn't see rest of b)\n\tdonec    chan struct{} // closed on error\n\treadFn   func()        // optional code to run in Read before error\n}\n\ntype pipeBuffer interface {\n\tLen() int\n\tio.Writer\n\tio.Reader\n}\n\n// setBuffer initializes the pipe buffer.\n// It has no effect if the pipe is already closed.\nfunc (p *pipe) setBuffer(b pipeBuffer) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.err != nil || p.breakErr != nil {\n\t\treturn\n\t}\n\tp.b = b\n}\n\nfunc (p *pipe) Len() int {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.b == nil {\n\t\treturn p.unread\n\t}\n\treturn p.b.Len()\n}\n\n// Read waits until data is available and copies bytes\n// from the buffer into p.\nfunc (p *pipe) Read(d []byte) (n int, err error) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.c.L == nil {\n\t\tp.c.L = &p.mu\n\t}\n\tfor {\n\t\tif p.breakErr != nil {\n\t\t\treturn 0, p.breakErr\n\t\t}\n\t\tif p.b != nil && p.b.Len() > 0 {\n\t\t\treturn p.b.Read(d)\n\t\t}\n\t\tif p.err != nil {\n\t\t\tif p.readFn != nil {\n\t\t\t\tp.readFn()     // e.g. copy trailers\n\t\t\t\tp.readFn = nil // not sticky like p.err\n\t\t\t}\n\t\t\tp.b = nil\n\t\t\treturn 0, p.err\n\t\t}\n\t\tp.c.Wait()\n\t}\n}\n\nvar (\n\terrClosedPipeWrite        = errors.New(\"write on closed buffer\")\n\terrUninitializedPipeWrite = errors.New(\"write on uninitialized buffer\")\n)\n\n// Write copies bytes from p into the buffer and wakes a reader.\n// It is an error to write more data than the buffer can hold.\nfunc (p *pipe) Write(d []byte) (n int, err error) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.c.L == nil {\n\t\tp.c.L = &p.mu\n\t}\n\tdefer p.c.Signal()\n\tif p.err != nil || p.breakErr != nil {\n\t\treturn 0, errClosedPipeWrite\n\t}\n\t// pipe.setBuffer is never invoked, leaving the buffer uninitialized.\n\t// We shouldn't try to write to an uninitialized pipe,\n\t// but returning an error is better than panicking.\n\tif p.b == nil {\n\t\treturn 0, errUninitializedPipeWrite\n\t}\n\treturn p.b.Write(d)\n}\n\n// CloseWithError causes the next Read (waking up a current blocked\n// Read if needed) to return the provided err after all data has been\n// read.\n//\n// The error must be non-nil.\nfunc (p *pipe) CloseWithError(err error) { p.closeWithError(&p.err, err, nil) }\n\n// BreakWithError causes the next Read (waking up a current blocked\n// Read if needed) to return the provided err immediately, without\n// waiting for unread data.\nfunc (p *pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) }\n\n// closeWithErrorAndCode is like CloseWithError but also sets some code to run\n// in the caller's goroutine before returning the error.\nfunc (p *pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) }\n\nfunc (p *pipe) closeWithError(dst *error, err error, fn func()) {\n\tif err == nil {\n\t\tpanic(\"err must be non-nil\")\n\t}\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.c.L == nil {\n\t\tp.c.L = &p.mu\n\t}\n\tdefer p.c.Signal()\n\tif *dst != nil {\n\t\t// Already been done.\n\t\treturn\n\t}\n\tp.readFn = fn\n\tif dst == &p.breakErr {\n\t\tif p.b != nil {\n\t\t\tp.unread += p.b.Len()\n\t\t}\n\t\tp.b = nil\n\t}\n\t*dst = err\n\tp.closeDoneLocked()\n}\n\n// requires p.mu be held.\nfunc (p *pipe) closeDoneLocked() {\n\tif p.donec == nil {\n\t\treturn\n\t}\n\t// Close if unclosed. This isn't racy since we always\n\t// hold p.mu while closing.\n\tselect {\n\tcase <-p.donec:\n\tdefault:\n\t\tclose(p.donec)\n\t}\n}\n\n// Err returns the error (if any) first set by BreakWithError or CloseWithError.\nfunc (p *pipe) Err() error {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.breakErr != nil {\n\t\treturn p.breakErr\n\t}\n\treturn p.err\n}\n\n// Done returns a channel which is closed if and when this pipe is closed\n// with CloseWithError.\nfunc (p *pipe) Done() <-chan struct{} {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tif p.donec == nil {\n\t\tp.donec = make(chan struct{})\n\t\tif p.err != nil || p.breakErr != nil {\n\t\t\t// Already hit an error.\n\t\t\tp.closeDoneLocked()\n\t\t}\n\t}\n\treturn p.donec\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/server.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// TODO: turn off the serve goroutine when idle, so\n// an idle conn only has the readFrames goroutine active. (which could\n// also be optimized probably to pin less memory in crypto/tls). This\n// would involve tracking when the serve goroutine is active (atomic\n// int32 read/CAS probably?) and starting it up when frames arrive,\n// and shutting it down when all handlers exit. the occasional PING\n// packets could use time.AfterFunc to call sc.wakeStartServeLoop()\n// (which is a no-op if already running) and then queue the PING write\n// as normal. The serve loop would then exit in most cases (if no\n// Handlers running) and not be woken up again until the PING packet\n// returns.\n\n// TODO (maybe): add a mechanism for Handlers to going into\n// half-closed-local mode (rw.(io.Closer) test?) but not exit their\n// handler, and continue to be able to read from the\n// Request.Body. This would be a somewhat semantic change from HTTP/1\n// (or at least what we expose in net/http), so I'd probably want to\n// add it there too. For now, this package says that returning from\n// the Handler ServeHTTP function means you're both done reading and\n// done writing, without a way to stop just one or the other.\n\npackage http2\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"math\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/textproto\"\n\t\"net/url\"\n\t\"os\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"golang.org/x/net/http/httpguts\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"golang.org/x/net/internal/httpcommon\"\n)\n\nconst (\n\tprefaceTimeout        = 10 * time.Second\n\tfirstSettingsTimeout  = 2 * time.Second // should be in-flight with preface anyway\n\thandlerChunkWriteSize = 4 << 10\n\tdefaultMaxStreams     = 250 // TODO: make this 100 as the GFE seems to?\n\n\t// maxQueuedControlFrames is the maximum number of control frames like\n\t// SETTINGS, PING and RST_STREAM that will be queued for writing before\n\t// the connection is closed to prevent memory exhaustion attacks.\n\tmaxQueuedControlFrames = 10000\n)\n\nvar (\n\terrClientDisconnected = errors.New(\"client disconnected\")\n\terrClosedBody         = errors.New(\"body closed by handler\")\n\terrHandlerComplete    = errors.New(\"http2: request body closed due to handler exiting\")\n\terrStreamClosed       = errors.New(\"http2: stream closed\")\n)\n\nvar responseWriterStatePool = sync.Pool{\n\tNew: func() interface{} {\n\t\trws := &responseWriterState{}\n\t\trws.bw = bufio.NewWriterSize(chunkWriter{rws}, handlerChunkWriteSize)\n\t\treturn rws\n\t},\n}\n\n// Test hooks.\nvar (\n\ttestHookOnConn        func()\n\ttestHookGetServerConn func(*serverConn)\n\ttestHookOnPanicMu     *sync.Mutex // nil except in tests\n\ttestHookOnPanic       func(sc *serverConn, panicVal interface{}) (rePanic bool)\n)\n\n// Server is an HTTP/2 server.\ntype Server struct {\n\t// MaxHandlers limits the number of http.Handler ServeHTTP goroutines\n\t// which may run at a time over all connections.\n\t// Negative or zero no limit.\n\t// TODO: implement\n\tMaxHandlers int\n\n\t// MaxConcurrentStreams optionally specifies the number of\n\t// concurrent streams that each client may have open at a\n\t// time. This is unrelated to the number of http.Handler goroutines\n\t// which may be active globally, which is MaxHandlers.\n\t// If zero, MaxConcurrentStreams defaults to at least 100, per\n\t// the HTTP/2 spec's recommendations.\n\tMaxConcurrentStreams uint32\n\n\t// MaxDecoderHeaderTableSize optionally specifies the http2\n\t// SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It\n\t// informs the remote endpoint of the maximum size of the header compression\n\t// table used to decode header blocks, in octets. If zero, the default value\n\t// of 4096 is used.\n\tMaxDecoderHeaderTableSize uint32\n\n\t// MaxEncoderHeaderTableSize optionally specifies an upper limit for the\n\t// header compression table used for encoding request headers. Received\n\t// SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,\n\t// the default value of 4096 is used.\n\tMaxEncoderHeaderTableSize uint32\n\n\t// MaxReadFrameSize optionally specifies the largest frame\n\t// this server is willing to read. A valid value is between\n\t// 16k and 16M, inclusive. If zero or otherwise invalid, a\n\t// default value is used.\n\tMaxReadFrameSize uint32\n\n\t// PermitProhibitedCipherSuites, if true, permits the use of\n\t// cipher suites prohibited by the HTTP/2 spec.\n\tPermitProhibitedCipherSuites bool\n\n\t// IdleTimeout specifies how long until idle clients should be\n\t// closed with a GOAWAY frame. PING frames are not considered\n\t// activity for the purposes of IdleTimeout.\n\t// If zero or negative, there is no timeout.\n\tIdleTimeout time.Duration\n\n\t// ReadIdleTimeout is the timeout after which a health check using a ping\n\t// frame will be carried out if no frame is received on the connection.\n\t// If zero, no health check is performed.\n\tReadIdleTimeout time.Duration\n\n\t// PingTimeout is the timeout after which the connection will be closed\n\t// if a response to a ping is not received.\n\t// If zero, a default of 15 seconds is used.\n\tPingTimeout time.Duration\n\n\t// WriteByteTimeout is the timeout after which a connection will be\n\t// closed if no data can be written to it. The timeout begins when data is\n\t// available to write, and is extended whenever any bytes are written.\n\t// If zero or negative, there is no timeout.\n\tWriteByteTimeout time.Duration\n\n\t// MaxUploadBufferPerConnection is the size of the initial flow\n\t// control window for each connections. The HTTP/2 spec does not\n\t// allow this to be smaller than 65535 or larger than 2^32-1.\n\t// If the value is outside this range, a default value will be\n\t// used instead.\n\tMaxUploadBufferPerConnection int32\n\n\t// MaxUploadBufferPerStream is the size of the initial flow control\n\t// window for each stream. The HTTP/2 spec does not allow this to\n\t// be larger than 2^32-1. If the value is zero or larger than the\n\t// maximum, a default value will be used instead.\n\tMaxUploadBufferPerStream int32\n\n\t// NewWriteScheduler constructs a write scheduler for a connection.\n\t// If nil, a default scheduler is chosen.\n\tNewWriteScheduler func() WriteScheduler\n\n\t// CountError, if non-nil, is called on HTTP/2 server errors.\n\t// It's intended to increment a metric for monitoring, such\n\t// as an expvar or Prometheus metric.\n\t// The errType consists of only ASCII word characters.\n\tCountError func(errType string)\n\n\t// Internal state. This is a pointer (rather than embedded directly)\n\t// so that we don't embed a Mutex in this struct, which will make the\n\t// struct non-copyable, which might break some callers.\n\tstate *serverInternalState\n}\n\ntype serverInternalState struct {\n\tmu          sync.Mutex\n\tactiveConns map[*serverConn]struct{}\n\n\t// Pool of error channels. This is per-Server rather than global\n\t// because channels can't be reused across synctest bubbles.\n\terrChanPool sync.Pool\n}\n\nfunc (s *serverInternalState) registerConn(sc *serverConn) {\n\tif s == nil {\n\t\treturn // if the Server was used without calling ConfigureServer\n\t}\n\ts.mu.Lock()\n\ts.activeConns[sc] = struct{}{}\n\ts.mu.Unlock()\n}\n\nfunc (s *serverInternalState) unregisterConn(sc *serverConn) {\n\tif s == nil {\n\t\treturn // if the Server was used without calling ConfigureServer\n\t}\n\ts.mu.Lock()\n\tdelete(s.activeConns, sc)\n\ts.mu.Unlock()\n}\n\nfunc (s *serverInternalState) startGracefulShutdown() {\n\tif s == nil {\n\t\treturn // if the Server was used without calling ConfigureServer\n\t}\n\ts.mu.Lock()\n\tfor sc := range s.activeConns {\n\t\tsc.startGracefulShutdown()\n\t}\n\ts.mu.Unlock()\n}\n\n// Global error channel pool used for uninitialized Servers.\n// We use a per-Server pool when possible to avoid using channels across synctest bubbles.\nvar errChanPool = sync.Pool{\n\tNew: func() any { return make(chan error, 1) },\n}\n\nfunc (s *serverInternalState) getErrChan() chan error {\n\tif s == nil {\n\t\treturn errChanPool.Get().(chan error) // Server used without calling ConfigureServer\n\t}\n\treturn s.errChanPool.Get().(chan error)\n}\n\nfunc (s *serverInternalState) putErrChan(ch chan error) {\n\tif s == nil {\n\t\terrChanPool.Put(ch) // Server used without calling ConfigureServer\n\t\treturn\n\t}\n\ts.errChanPool.Put(ch)\n}\n\n// ConfigureServer adds HTTP/2 support to a net/http Server.\n//\n// The configuration conf may be nil.\n//\n// ConfigureServer must be called before s begins serving.\nfunc ConfigureServer(s *http.Server, conf *Server) error {\n\tif s == nil {\n\t\tpanic(\"nil *http.Server\")\n\t}\n\tif conf == nil {\n\t\tconf = new(Server)\n\t}\n\tconf.state = &serverInternalState{\n\t\tactiveConns: make(map[*serverConn]struct{}),\n\t\terrChanPool: sync.Pool{New: func() any { return make(chan error, 1) }},\n\t}\n\tif h1, h2 := s, conf; h2.IdleTimeout == 0 {\n\t\tif h1.IdleTimeout != 0 {\n\t\t\th2.IdleTimeout = h1.IdleTimeout\n\t\t} else {\n\t\t\th2.IdleTimeout = h1.ReadTimeout\n\t\t}\n\t}\n\ts.RegisterOnShutdown(conf.state.startGracefulShutdown)\n\n\tif s.TLSConfig == nil {\n\t\ts.TLSConfig = new(tls.Config)\n\t} else if s.TLSConfig.CipherSuites != nil && s.TLSConfig.MinVersion < tls.VersionTLS13 {\n\t\t// If they already provided a TLS 1.0–1.2 CipherSuite list, return an\n\t\t// error if it is missing ECDHE_RSA_WITH_AES_128_GCM_SHA256 or\n\t\t// ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.\n\t\thaveRequired := false\n\t\tfor _, cs := range s.TLSConfig.CipherSuites {\n\t\t\tswitch cs {\n\t\t\tcase tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,\n\t\t\t\t// Alternative MTI cipher to not discourage ECDSA-only servers.\n\t\t\t\t// See http://golang.org/cl/30721 for further information.\n\t\t\t\ttls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:\n\t\t\t\thaveRequired = true\n\t\t\t}\n\t\t}\n\t\tif !haveRequired {\n\t\t\treturn fmt.Errorf(\"http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher (need at least one of TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 or TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256)\")\n\t\t}\n\t}\n\n\t// Note: not setting MinVersion to tls.VersionTLS12,\n\t// as we don't want to interfere with HTTP/1.1 traffic\n\t// on the user's server. We enforce TLS 1.2 later once\n\t// we accept a connection. Ideally this should be done\n\t// during next-proto selection, but using TLS <1.2 with\n\t// HTTP/2 is still the client's bug.\n\n\ts.TLSConfig.PreferServerCipherSuites = true\n\n\tif !strSliceContains(s.TLSConfig.NextProtos, NextProtoTLS) {\n\t\ts.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, NextProtoTLS)\n\t}\n\tif !strSliceContains(s.TLSConfig.NextProtos, \"http/1.1\") {\n\t\ts.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, \"http/1.1\")\n\t}\n\n\tif s.TLSNextProto == nil {\n\t\ts.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){}\n\t}\n\tprotoHandler := func(hs *http.Server, c net.Conn, h http.Handler, sawClientPreface bool) {\n\t\tif testHookOnConn != nil {\n\t\t\ttestHookOnConn()\n\t\t}\n\t\t// The TLSNextProto interface predates contexts, so\n\t\t// the net/http package passes down its per-connection\n\t\t// base context via an exported but unadvertised\n\t\t// method on the Handler. This is for internal\n\t\t// net/http<=>http2 use only.\n\t\tvar ctx context.Context\n\t\ttype baseContexter interface {\n\t\t\tBaseContext() context.Context\n\t\t}\n\t\tif bc, ok := h.(baseContexter); ok {\n\t\t\tctx = bc.BaseContext()\n\t\t}\n\t\tconf.ServeConn(c, &ServeConnOpts{\n\t\t\tContext:          ctx,\n\t\t\tHandler:          h,\n\t\t\tBaseConfig:       hs,\n\t\t\tSawClientPreface: sawClientPreface,\n\t\t})\n\t}\n\ts.TLSNextProto[NextProtoTLS] = func(hs *http.Server, c *tls.Conn, h http.Handler) {\n\t\tprotoHandler(hs, c, h, false)\n\t}\n\t// The \"unencrypted_http2\" TLSNextProto key is used to pass off non-TLS HTTP/2 conns.\n\t//\n\t// A connection passed in this method has already had the HTTP/2 preface read from it.\n\ts.TLSNextProto[nextProtoUnencryptedHTTP2] = func(hs *http.Server, c *tls.Conn, h http.Handler) {\n\t\tnc, err := unencryptedNetConnFromTLSConn(c)\n\t\tif err != nil {\n\t\t\tif lg := hs.ErrorLog; lg != nil {\n\t\t\t\tlg.Print(err)\n\t\t\t} else {\n\t\t\t\tlog.Print(err)\n\t\t\t}\n\t\t\tgo c.Close()\n\t\t\treturn\n\t\t}\n\t\tprotoHandler(hs, nc, h, true)\n\t}\n\treturn nil\n}\n\n// ServeConnOpts are options for the Server.ServeConn method.\ntype ServeConnOpts struct {\n\t// Context is the base context to use.\n\t// If nil, context.Background is used.\n\tContext context.Context\n\n\t// BaseConfig optionally sets the base configuration\n\t// for values. If nil, defaults are used.\n\tBaseConfig *http.Server\n\n\t// Handler specifies which handler to use for processing\n\t// requests. If nil, BaseConfig.Handler is used. If BaseConfig\n\t// or BaseConfig.Handler is nil, http.DefaultServeMux is used.\n\tHandler http.Handler\n\n\t// UpgradeRequest is an initial request received on a connection\n\t// undergoing an h2c upgrade. The request body must have been\n\t// completely read from the connection before calling ServeConn,\n\t// and the 101 Switching Protocols response written.\n\tUpgradeRequest *http.Request\n\n\t// Settings is the decoded contents of the HTTP2-Settings header\n\t// in an h2c upgrade request.\n\tSettings []byte\n\n\t// SawClientPreface is set if the HTTP/2 connection preface\n\t// has already been read from the connection.\n\tSawClientPreface bool\n}\n\nfunc (o *ServeConnOpts) context() context.Context {\n\tif o != nil && o.Context != nil {\n\t\treturn o.Context\n\t}\n\treturn context.Background()\n}\n\nfunc (o *ServeConnOpts) baseConfig() *http.Server {\n\tif o != nil && o.BaseConfig != nil {\n\t\treturn o.BaseConfig\n\t}\n\treturn new(http.Server)\n}\n\nfunc (o *ServeConnOpts) handler() http.Handler {\n\tif o != nil {\n\t\tif o.Handler != nil {\n\t\t\treturn o.Handler\n\t\t}\n\t\tif o.BaseConfig != nil && o.BaseConfig.Handler != nil {\n\t\t\treturn o.BaseConfig.Handler\n\t\t}\n\t}\n\treturn http.DefaultServeMux\n}\n\n// ServeConn serves HTTP/2 requests on the provided connection and\n// blocks until the connection is no longer readable.\n//\n// ServeConn starts speaking HTTP/2 assuming that c has not had any\n// reads or writes. It writes its initial settings frame and expects\n// to be able to read the preface and settings frame from the\n// client. If c has a ConnectionState method like a *tls.Conn, the\n// ConnectionState is used to verify the TLS ciphersuite and to set\n// the Request.TLS field in Handlers.\n//\n// ServeConn does not support h2c by itself. Any h2c support must be\n// implemented in terms of providing a suitably-behaving net.Conn.\n//\n// The opts parameter is optional. If nil, default values are used.\nfunc (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {\n\tif opts == nil {\n\t\topts = &ServeConnOpts{}\n\t}\n\ts.serveConn(c, opts, nil)\n}\n\nfunc (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverConn)) {\n\tbaseCtx, cancel := serverConnBaseContext(c, opts)\n\tdefer cancel()\n\n\thttp1srv := opts.baseConfig()\n\tconf := configFromServer(http1srv, s)\n\tsc := &serverConn{\n\t\tsrv:                         s,\n\t\ths:                          http1srv,\n\t\tconn:                        c,\n\t\tbaseCtx:                     baseCtx,\n\t\tremoteAddrStr:               c.RemoteAddr().String(),\n\t\tbw:                          newBufferedWriter(c, conf.WriteByteTimeout),\n\t\thandler:                     opts.handler(),\n\t\tstreams:                     make(map[uint32]*stream),\n\t\treadFrameCh:                 make(chan readFrameResult),\n\t\twantWriteFrameCh:            make(chan FrameWriteRequest, 8),\n\t\tserveMsgCh:                  make(chan interface{}, 8),\n\t\twroteFrameCh:                make(chan frameWriteResult, 1), // buffered; one send in writeFrameAsync\n\t\tbodyReadCh:                  make(chan bodyReadMsg),         // buffering doesn't matter either way\n\t\tdoneServing:                 make(chan struct{}),\n\t\tclientMaxStreams:            math.MaxUint32, // Section 6.5.2: \"Initially, there is no limit to this value\"\n\t\tadvMaxStreams:               conf.MaxConcurrentStreams,\n\t\tinitialStreamSendWindowSize: initialWindowSize,\n\t\tinitialStreamRecvWindowSize: conf.MaxUploadBufferPerStream,\n\t\tmaxFrameSize:                initialMaxFrameSize,\n\t\tpingTimeout:                 conf.PingTimeout,\n\t\tcountErrorFunc:              conf.CountError,\n\t\tserveG:                      newGoroutineLock(),\n\t\tpushEnabled:                 true,\n\t\tsawClientPreface:            opts.SawClientPreface,\n\t}\n\tif newf != nil {\n\t\tnewf(sc)\n\t}\n\n\ts.state.registerConn(sc)\n\tdefer s.state.unregisterConn(sc)\n\n\t// The net/http package sets the write deadline from the\n\t// http.Server.WriteTimeout during the TLS handshake, but then\n\t// passes the connection off to us with the deadline already set.\n\t// Write deadlines are set per stream in serverConn.newStream.\n\t// Disarm the net.Conn write deadline here.\n\tif sc.hs.WriteTimeout > 0 {\n\t\tsc.conn.SetWriteDeadline(time.Time{})\n\t}\n\n\tswitch {\n\tcase s.NewWriteScheduler != nil:\n\t\tsc.writeSched = s.NewWriteScheduler()\n\tcase clientPriorityDisabled(http1srv):\n\t\tsc.writeSched = newRoundRobinWriteScheduler()\n\tdefault:\n\t\tsc.writeSched = newPriorityWriteSchedulerRFC9218()\n\t}\n\n\t// These start at the RFC-specified defaults. If there is a higher\n\t// configured value for inflow, that will be updated when we send a\n\t// WINDOW_UPDATE shortly after sending SETTINGS.\n\tsc.flow.add(initialWindowSize)\n\tsc.inflow.init(initialWindowSize)\n\tsc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)\n\tsc.hpackEncoder.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize)\n\n\tfr := NewFramer(sc.bw, c)\n\tif conf.CountError != nil {\n\t\tfr.countError = conf.CountError\n\t}\n\tfr.ReadMetaHeaders = hpack.NewDecoder(conf.MaxDecoderHeaderTableSize, nil)\n\tfr.MaxHeaderListSize = sc.maxHeaderListSize()\n\tfr.SetMaxReadFrameSize(conf.MaxReadFrameSize)\n\tsc.framer = fr\n\n\tif tc, ok := c.(connectionStater); ok {\n\t\tsc.tlsState = new(tls.ConnectionState)\n\t\t*sc.tlsState = tc.ConnectionState()\n\t\t// 9.2 Use of TLS Features\n\t\t// An implementation of HTTP/2 over TLS MUST use TLS\n\t\t// 1.2 or higher with the restrictions on feature set\n\t\t// and cipher suite described in this section. Due to\n\t\t// implementation limitations, it might not be\n\t\t// possible to fail TLS negotiation. An endpoint MUST\n\t\t// immediately terminate an HTTP/2 connection that\n\t\t// does not meet the TLS requirements described in\n\t\t// this section with a connection error (Section\n\t\t// 5.4.1) of type INADEQUATE_SECURITY.\n\t\tif sc.tlsState.Version < tls.VersionTLS12 {\n\t\t\tsc.rejectConn(ErrCodeInadequateSecurity, \"TLS version too low\")\n\t\t\treturn\n\t\t}\n\n\t\tif sc.tlsState.ServerName == \"\" {\n\t\t\t// Client must use SNI, but we don't enforce that anymore,\n\t\t\t// since it was causing problems when connecting to bare IP\n\t\t\t// addresses during development.\n\t\t\t//\n\t\t\t// TODO: optionally enforce? Or enforce at the time we receive\n\t\t\t// a new request, and verify the ServerName matches the :authority?\n\t\t\t// But that precludes proxy situations, perhaps.\n\t\t\t//\n\t\t\t// So for now, do nothing here again.\n\t\t}\n\n\t\tif !conf.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) {\n\t\t\t// \"Endpoints MAY choose to generate a connection error\n\t\t\t// (Section 5.4.1) of type INADEQUATE_SECURITY if one of\n\t\t\t// the prohibited cipher suites are negotiated.\"\n\t\t\t//\n\t\t\t// We choose that. In my opinion, the spec is weak\n\t\t\t// here. It also says both parties must support at least\n\t\t\t// TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 so there's no\n\t\t\t// excuses here. If we really must, we could allow an\n\t\t\t// \"AllowInsecureWeakCiphers\" option on the server later.\n\t\t\t// Let's see how it plays out first.\n\t\t\tsc.rejectConn(ErrCodeInadequateSecurity, fmt.Sprintf(\"Prohibited TLS 1.2 Cipher Suite: %x\", sc.tlsState.CipherSuite))\n\t\t\treturn\n\t\t}\n\t}\n\n\tif opts.Settings != nil {\n\t\tfr := &SettingsFrame{\n\t\t\tFrameHeader: FrameHeader{valid: true},\n\t\t\tp:           opts.Settings,\n\t\t}\n\t\tif err := fr.ForeachSetting(sc.processSetting); err != nil {\n\t\t\tsc.rejectConn(ErrCodeProtocol, \"invalid settings\")\n\t\t\treturn\n\t\t}\n\t\topts.Settings = nil\n\t}\n\n\tif hook := testHookGetServerConn; hook != nil {\n\t\thook(sc)\n\t}\n\n\tif opts.UpgradeRequest != nil {\n\t\tsc.upgradeRequest(opts.UpgradeRequest)\n\t\topts.UpgradeRequest = nil\n\t}\n\n\tsc.serve(conf)\n}\n\nfunc serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) {\n\tctx, cancel = context.WithCancel(opts.context())\n\tctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())\n\tif hs := opts.baseConfig(); hs != nil {\n\t\tctx = context.WithValue(ctx, http.ServerContextKey, hs)\n\t}\n\treturn\n}\n\nfunc (sc *serverConn) rejectConn(err ErrCode, debug string) {\n\tsc.vlogf(\"http2: server rejecting conn: %v, %s\", err, debug)\n\t// ignoring errors. hanging up anyway.\n\tsc.framer.WriteGoAway(0, err, []byte(debug))\n\tsc.bw.Flush()\n\tsc.conn.Close()\n}\n\ntype serverConn struct {\n\t// Immutable:\n\tsrv              *Server\n\ths               *http.Server\n\tconn             net.Conn\n\tbw               *bufferedWriter // writing to conn\n\thandler          http.Handler\n\tbaseCtx          context.Context\n\tframer           *Framer\n\tdoneServing      chan struct{}          // closed when serverConn.serve ends\n\treadFrameCh      chan readFrameResult   // written by serverConn.readFrames\n\twantWriteFrameCh chan FrameWriteRequest // from handlers -> serve\n\twroteFrameCh     chan frameWriteResult  // from writeFrameAsync -> serve, tickles more frame writes\n\tbodyReadCh       chan bodyReadMsg       // from handlers -> serve\n\tserveMsgCh       chan interface{}       // misc messages & code to send to / run on the serve loop\n\tflow             outflow                // conn-wide (not stream-specific) outbound flow control\n\tinflow           inflow                 // conn-wide inbound flow control\n\ttlsState         *tls.ConnectionState   // shared by all handlers, like net/http\n\tremoteAddrStr    string\n\twriteSched       WriteScheduler\n\tcountErrorFunc   func(errType string)\n\n\t// Everything following is owned by the serve loop; use serveG.check():\n\tserveG                      goroutineLock // used to verify funcs are on serve()\n\tpushEnabled                 bool\n\tsawClientPreface            bool // preface has already been read, used in h2c upgrade\n\tsawFirstSettings            bool // got the initial SETTINGS frame after the preface\n\tneedToSendSettingsAck       bool\n\tunackedSettings             int    // how many SETTINGS have we sent without ACKs?\n\tqueuedControlFrames         int    // control frames in the writeSched queue\n\tclientMaxStreams            uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit)\n\tadvMaxStreams               uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client\n\tcurClientStreams            uint32 // number of open streams initiated by the client\n\tcurPushedStreams            uint32 // number of open streams initiated by server push\n\tcurHandlers                 uint32 // number of running handler goroutines\n\tmaxClientStreamID           uint32 // max ever seen from client (odd), or 0 if there have been no client requests\n\tmaxPushPromiseID            uint32 // ID of the last push promise (even), or 0 if there have been no pushes\n\tstreams                     map[uint32]*stream\n\tunstartedHandlers           []unstartedHandler\n\tinitialStreamSendWindowSize int32\n\tinitialStreamRecvWindowSize int32\n\tmaxFrameSize                int32\n\tpeerMaxHeaderListSize       uint32            // zero means unknown (default)\n\tcanonHeader                 map[string]string // http2-lower-case -> Go-Canonical-Case\n\tcanonHeaderKeysSize         int               // canonHeader keys size in bytes\n\twritingFrame                bool              // started writing a frame (on serve goroutine or separate)\n\twritingFrameAsync           bool              // started a frame on its own goroutine but haven't heard back on wroteFrameCh\n\tneedsFrameFlush             bool              // last frame write wasn't a flush\n\tinGoAway                    bool              // we've started to or sent GOAWAY\n\tinFrameScheduleLoop         bool              // whether we're in the scheduleFrameWrite loop\n\tneedToSendGoAway            bool              // we need to schedule a GOAWAY frame write\n\tpingSent                    bool\n\tsentPingData                [8]byte\n\tgoAwayCode                  ErrCode\n\tshutdownTimer               *time.Timer // nil until used\n\tidleTimer                   *time.Timer // nil if unused\n\treadIdleTimeout             time.Duration\n\tpingTimeout                 time.Duration\n\treadIdleTimer               *time.Timer // nil if unused\n\n\t// Owned by the writeFrameAsync goroutine:\n\theaderWriteBuf bytes.Buffer\n\thpackEncoder   *hpack.Encoder\n\n\t// Used by startGracefulShutdown.\n\tshutdownOnce sync.Once\n\n\t// Used for RFC 9218 prioritization.\n\thasIntermediary bool // connection is done via an intermediary / proxy\n\tpriorityAware   bool // the client has sent priority signal, meaning that it is aware of it.\n}\n\nfunc (sc *serverConn) writeSchedIgnoresRFC7540() bool {\n\tswitch sc.writeSched.(type) {\n\tcase *priorityWriteSchedulerRFC9218:\n\t\treturn true\n\tcase *randomWriteScheduler:\n\t\treturn true\n\tcase *roundRobinWriteScheduler:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc (sc *serverConn) maxHeaderListSize() uint32 {\n\tn := sc.hs.MaxHeaderBytes\n\tif n <= 0 {\n\t\tn = http.DefaultMaxHeaderBytes\n\t}\n\treturn uint32(adjustHTTP1MaxHeaderSize(int64(n)))\n}\n\nfunc (sc *serverConn) curOpenStreams() uint32 {\n\tsc.serveG.check()\n\treturn sc.curClientStreams + sc.curPushedStreams\n}\n\n// stream represents a stream. This is the minimal metadata needed by\n// the serve goroutine. Most of the actual stream state is owned by\n// the http.Handler's goroutine in the responseWriter. Because the\n// responseWriter's responseWriterState is recycled at the end of a\n// handler, this struct intentionally has no pointer to the\n// *responseWriter{,State} itself, as the Handler ending nils out the\n// responseWriter's state field.\ntype stream struct {\n\t// immutable:\n\tsc        *serverConn\n\tid        uint32\n\tbody      *pipe       // non-nil if expecting DATA frames\n\tcw        closeWaiter // closed wait stream transitions to closed state\n\tctx       context.Context\n\tcancelCtx func()\n\n\t// owned by serverConn's serve loop:\n\tbodyBytes        int64   // body bytes seen so far\n\tdeclBodyBytes    int64   // or -1 if undeclared\n\tflow             outflow // limits writing from Handler to client\n\tinflow           inflow  // what the client is allowed to POST/etc to us\n\tstate            streamState\n\tresetQueued      bool        // RST_STREAM queued for write; set by sc.resetStream\n\tgotTrailerHeader bool        // HEADER frame for trailers was seen\n\twroteHeaders     bool        // whether we wrote headers (not status 100)\n\treadDeadline     *time.Timer // nil if unused\n\twriteDeadline    *time.Timer // nil if unused\n\tcloseErr         error       // set before cw is closed\n\n\ttrailer    http.Header // accumulated trailers\n\treqTrailer http.Header // handler's Request.Trailer\n}\n\nfunc (sc *serverConn) Framer() *Framer  { return sc.framer }\nfunc (sc *serverConn) CloseConn() error { return sc.conn.Close() }\nfunc (sc *serverConn) Flush() error     { return sc.bw.Flush() }\nfunc (sc *serverConn) HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) {\n\treturn sc.hpackEncoder, &sc.headerWriteBuf\n}\n\nfunc (sc *serverConn) state(streamID uint32) (streamState, *stream) {\n\tsc.serveG.check()\n\t// http://tools.ietf.org/html/rfc7540#section-5.1\n\tif st, ok := sc.streams[streamID]; ok {\n\t\treturn st.state, st\n\t}\n\t// \"The first use of a new stream identifier implicitly closes all\n\t// streams in the \"idle\" state that might have been initiated by\n\t// that peer with a lower-valued stream identifier. For example, if\n\t// a client sends a HEADERS frame on stream 7 without ever sending a\n\t// frame on stream 5, then stream 5 transitions to the \"closed\"\n\t// state when the first frame for stream 7 is sent or received.\"\n\tif streamID%2 == 1 {\n\t\tif streamID <= sc.maxClientStreamID {\n\t\t\treturn stateClosed, nil\n\t\t}\n\t} else {\n\t\tif streamID <= sc.maxPushPromiseID {\n\t\t\treturn stateClosed, nil\n\t\t}\n\t}\n\treturn stateIdle, nil\n}\n\n// setConnState calls the net/http ConnState hook for this connection, if configured.\n// Note that the net/http package does StateNew and StateClosed for us.\n// There is currently no plan for StateHijacked or hijacking HTTP/2 connections.\nfunc (sc *serverConn) setConnState(state http.ConnState) {\n\tif sc.hs.ConnState != nil {\n\t\tsc.hs.ConnState(sc.conn, state)\n\t}\n}\n\nfunc (sc *serverConn) vlogf(format string, args ...interface{}) {\n\tif VerboseLogs {\n\t\tsc.logf(format, args...)\n\t}\n}\n\nfunc (sc *serverConn) logf(format string, args ...interface{}) {\n\tif lg := sc.hs.ErrorLog; lg != nil {\n\t\tlg.Printf(format, args...)\n\t} else {\n\t\tlog.Printf(format, args...)\n\t}\n}\n\n// errno returns v's underlying uintptr, else 0.\n//\n// TODO: remove this helper function once http2 can use build\n// tags. See comment in isClosedConnError.\nfunc errno(v error) uintptr {\n\tif rv := reflect.ValueOf(v); rv.Kind() == reflect.Uintptr {\n\t\treturn uintptr(rv.Uint())\n\t}\n\treturn 0\n}\n\n// isClosedConnError reports whether err is an error from use of a closed\n// network connection.\nfunc isClosedConnError(err error) bool {\n\tif err == nil {\n\t\treturn false\n\t}\n\n\tif errors.Is(err, net.ErrClosed) {\n\t\treturn true\n\t}\n\n\t// TODO(bradfitz): x/tools/cmd/bundle doesn't really support\n\t// build tags, so I can't make an http2_windows.go file with\n\t// Windows-specific stuff. Fix that and move this, once we\n\t// have a way to bundle this into std's net/http somehow.\n\tif runtime.GOOS == \"windows\" {\n\t\tif oe, ok := err.(*net.OpError); ok && oe.Op == \"read\" {\n\t\t\tif se, ok := oe.Err.(*os.SyscallError); ok && se.Syscall == \"wsarecv\" {\n\t\t\t\tconst WSAECONNABORTED = 10053\n\t\t\t\tconst WSAECONNRESET = 10054\n\t\t\t\tif n := errno(se.Err); n == WSAECONNRESET || n == WSAECONNABORTED {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (sc *serverConn) condlogf(err error, format string, args ...interface{}) {\n\tif err == nil {\n\t\treturn\n\t}\n\tif err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) || err == errPrefaceTimeout {\n\t\t// Boring, expected errors.\n\t\tsc.vlogf(format, args...)\n\t} else {\n\t\tsc.logf(format, args...)\n\t}\n}\n\n// maxCachedCanonicalHeadersKeysSize is an arbitrarily-chosen limit on the size\n// of the entries in the canonHeader cache.\n// This should be larger than the size of unique, uncommon header keys likely to\n// be sent by the peer, while not so high as to permit unreasonable memory usage\n// if the peer sends an unbounded number of unique header keys.\nconst maxCachedCanonicalHeadersKeysSize = 2048\n\nfunc (sc *serverConn) canonicalHeader(v string) string {\n\tsc.serveG.check()\n\tcv, ok := httpcommon.CachedCanonicalHeader(v)\n\tif ok {\n\t\treturn cv\n\t}\n\tcv, ok = sc.canonHeader[v]\n\tif ok {\n\t\treturn cv\n\t}\n\tif sc.canonHeader == nil {\n\t\tsc.canonHeader = make(map[string]string)\n\t}\n\tcv = http.CanonicalHeaderKey(v)\n\tsize := 100 + len(v)*2 // 100 bytes of map overhead + key + value\n\tif sc.canonHeaderKeysSize+size <= maxCachedCanonicalHeadersKeysSize {\n\t\tsc.canonHeader[v] = cv\n\t\tsc.canonHeaderKeysSize += size\n\t}\n\treturn cv\n}\n\ntype readFrameResult struct {\n\tf   Frame // valid until readMore is called\n\terr error\n\n\t// readMore should be called once the consumer no longer needs or\n\t// retains f. After readMore, f is invalid and more frames can be\n\t// read.\n\treadMore func()\n}\n\n// readFrames is the loop that reads incoming frames.\n// It takes care to only read one frame at a time, blocking until the\n// consumer is done with the frame.\n// It's run on its own goroutine.\nfunc (sc *serverConn) readFrames() {\n\tgate := make(chan struct{})\n\tgateDone := func() { gate <- struct{}{} }\n\tfor {\n\t\tf, err := sc.framer.ReadFrame()\n\t\tselect {\n\t\tcase sc.readFrameCh <- readFrameResult{f, err, gateDone}:\n\t\tcase <-sc.doneServing:\n\t\t\treturn\n\t\t}\n\t\tselect {\n\t\tcase <-gate:\n\t\tcase <-sc.doneServing:\n\t\t\treturn\n\t\t}\n\t\tif terminalReadFrameError(err) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// frameWriteResult is the message passed from writeFrameAsync to the serve goroutine.\ntype frameWriteResult struct {\n\t_   incomparable\n\twr  FrameWriteRequest // what was written (or attempted)\n\terr error             // result of the writeFrame call\n}\n\n// writeFrameAsync runs in its own goroutine and writes a single frame\n// and then reports when it's done.\n// At most one goroutine can be running writeFrameAsync at a time per\n// serverConn.\nfunc (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) {\n\tvar err error\n\tif wd == nil {\n\t\terr = wr.write.writeFrame(sc)\n\t} else {\n\t\terr = sc.framer.endWrite()\n\t}\n\tsc.wroteFrameCh <- frameWriteResult{wr: wr, err: err}\n}\n\nfunc (sc *serverConn) closeAllStreamsOnConnClose() {\n\tsc.serveG.check()\n\tfor _, st := range sc.streams {\n\t\tsc.closeStream(st, errClientDisconnected)\n\t}\n}\n\nfunc (sc *serverConn) stopShutdownTimer() {\n\tsc.serveG.check()\n\tif t := sc.shutdownTimer; t != nil {\n\t\tt.Stop()\n\t}\n}\n\nfunc (sc *serverConn) notePanic() {\n\t// Note: this is for serverConn.serve panicking, not http.Handler code.\n\tif testHookOnPanicMu != nil {\n\t\ttestHookOnPanicMu.Lock()\n\t\tdefer testHookOnPanicMu.Unlock()\n\t}\n\tif testHookOnPanic != nil {\n\t\tif e := recover(); e != nil {\n\t\t\tif testHookOnPanic(sc, e) {\n\t\t\t\tpanic(e)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (sc *serverConn) serve(conf http2Config) {\n\tsc.serveG.check()\n\tdefer sc.notePanic()\n\tdefer sc.conn.Close()\n\tdefer sc.closeAllStreamsOnConnClose()\n\tdefer sc.stopShutdownTimer()\n\tdefer close(sc.doneServing) // unblocks handlers trying to send\n\n\tif VerboseLogs {\n\t\tsc.vlogf(\"http2: server connection from %v on %p\", sc.conn.RemoteAddr(), sc.hs)\n\t}\n\n\tsettings := writeSettings{\n\t\t{SettingMaxFrameSize, conf.MaxReadFrameSize},\n\t\t{SettingMaxConcurrentStreams, sc.advMaxStreams},\n\t\t{SettingMaxHeaderListSize, sc.maxHeaderListSize()},\n\t\t{SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize},\n\t\t{SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)},\n\t}\n\tif !disableExtendedConnectProtocol {\n\t\tsettings = append(settings, Setting{SettingEnableConnectProtocol, 1})\n\t}\n\tif sc.writeSchedIgnoresRFC7540() {\n\t\tsettings = append(settings, Setting{SettingNoRFC7540Priorities, 1})\n\t}\n\tsc.writeFrame(FrameWriteRequest{\n\t\twrite: settings,\n\t})\n\tsc.unackedSettings++\n\n\t// Each connection starts with initialWindowSize inflow tokens.\n\t// If a higher value is configured, we add more tokens.\n\tif diff := conf.MaxUploadBufferPerConnection - initialWindowSize; diff > 0 {\n\t\tsc.sendWindowUpdate(nil, int(diff))\n\t}\n\n\tif err := sc.readPreface(); err != nil {\n\t\tsc.condlogf(err, \"http2: server: error reading preface from client %v: %v\", sc.conn.RemoteAddr(), err)\n\t\treturn\n\t}\n\t// Now that we've got the preface, get us out of the\n\t// \"StateNew\" state. We can't go directly to idle, though.\n\t// Active means we read some data and anticipate a request. We'll\n\t// do another Active when we get a HEADERS frame.\n\tsc.setConnState(http.StateActive)\n\tsc.setConnState(http.StateIdle)\n\n\tif sc.srv.IdleTimeout > 0 {\n\t\tsc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)\n\t\tdefer sc.idleTimer.Stop()\n\t}\n\n\tif conf.SendPingTimeout > 0 {\n\t\tsc.readIdleTimeout = conf.SendPingTimeout\n\t\tsc.readIdleTimer = time.AfterFunc(conf.SendPingTimeout, sc.onReadIdleTimer)\n\t\tdefer sc.readIdleTimer.Stop()\n\t}\n\n\tgo sc.readFrames() // closed by defer sc.conn.Close above\n\n\tsettingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer)\n\tdefer settingsTimer.Stop()\n\n\tlastFrameTime := time.Now()\n\tloopNum := 0\n\tfor {\n\t\tloopNum++\n\t\tselect {\n\t\tcase wr := <-sc.wantWriteFrameCh:\n\t\t\tif se, ok := wr.write.(StreamError); ok {\n\t\t\t\tsc.resetStream(se)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tsc.writeFrame(wr)\n\t\tcase res := <-sc.wroteFrameCh:\n\t\t\tsc.wroteFrame(res)\n\t\tcase res := <-sc.readFrameCh:\n\t\t\tlastFrameTime = time.Now()\n\t\t\t// Process any written frames before reading new frames from the client since a\n\t\t\t// written frame could have triggered a new stream to be started.\n\t\t\tif sc.writingFrameAsync {\n\t\t\t\tselect {\n\t\t\t\tcase wroteRes := <-sc.wroteFrameCh:\n\t\t\t\t\tsc.wroteFrame(wroteRes)\n\t\t\t\tdefault:\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !sc.processFrameFromReader(res) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tres.readMore()\n\t\t\tif settingsTimer != nil {\n\t\t\t\tsettingsTimer.Stop()\n\t\t\t\tsettingsTimer = nil\n\t\t\t}\n\t\tcase m := <-sc.bodyReadCh:\n\t\t\tsc.noteBodyRead(m.st, m.n)\n\t\tcase msg := <-sc.serveMsgCh:\n\t\t\tswitch v := msg.(type) {\n\t\t\tcase func(int):\n\t\t\t\tv(loopNum) // for testing\n\t\t\tcase *serverMessage:\n\t\t\t\tswitch v {\n\t\t\t\tcase settingsTimerMsg:\n\t\t\t\t\tsc.logf(\"timeout waiting for SETTINGS frames from %v\", sc.conn.RemoteAddr())\n\t\t\t\t\treturn\n\t\t\t\tcase idleTimerMsg:\n\t\t\t\t\tsc.vlogf(\"connection is idle\")\n\t\t\t\t\tsc.goAway(ErrCodeNo)\n\t\t\t\tcase readIdleTimerMsg:\n\t\t\t\t\tsc.handlePingTimer(lastFrameTime)\n\t\t\t\tcase shutdownTimerMsg:\n\t\t\t\t\tsc.vlogf(\"GOAWAY close timer fired; closing conn from %v\", sc.conn.RemoteAddr())\n\t\t\t\t\treturn\n\t\t\t\tcase gracefulShutdownMsg:\n\t\t\t\t\tsc.startGracefulShutdownInternal()\n\t\t\t\tcase handlerDoneMsg:\n\t\t\t\t\tsc.handlerDone()\n\t\t\t\tdefault:\n\t\t\t\t\tpanic(\"unknown timer\")\n\t\t\t\t}\n\t\t\tcase *startPushRequest:\n\t\t\t\tsc.startPush(v)\n\t\t\tcase func(*serverConn):\n\t\t\t\tv(sc)\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"unexpected type %T\", v))\n\t\t\t}\n\t\t}\n\n\t\t// If the peer is causing us to generate a lot of control frames,\n\t\t// but not reading them from us, assume they are trying to make us\n\t\t// run out of memory.\n\t\tif sc.queuedControlFrames > maxQueuedControlFrames {\n\t\t\tsc.vlogf(\"http2: too many control frames in send queue, closing connection\")\n\t\t\treturn\n\t\t}\n\n\t\t// Start the shutdown timer after sending a GOAWAY. When sending GOAWAY\n\t\t// with no error code (graceful shutdown), don't start the timer until\n\t\t// all open streams have been completed.\n\t\tsentGoAway := sc.inGoAway && !sc.needToSendGoAway && !sc.writingFrame\n\t\tgracefulShutdownComplete := sc.goAwayCode == ErrCodeNo && sc.curOpenStreams() == 0\n\t\tif sentGoAway && sc.shutdownTimer == nil && (sc.goAwayCode != ErrCodeNo || gracefulShutdownComplete) {\n\t\t\tsc.shutDownIn(goAwayTimeout)\n\t\t}\n\t}\n}\n\nfunc (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) {\n\tif sc.pingSent {\n\t\tsc.logf(\"timeout waiting for PING response\")\n\t\tif f := sc.countErrorFunc; f != nil {\n\t\t\tf(\"conn_close_lost_ping\")\n\t\t}\n\t\tsc.conn.Close()\n\t\treturn\n\t}\n\n\tpingAt := lastFrameReadTime.Add(sc.readIdleTimeout)\n\tnow := time.Now()\n\tif pingAt.After(now) {\n\t\t// We received frames since arming the ping timer.\n\t\t// Reset it for the next possible timeout.\n\t\tsc.readIdleTimer.Reset(pingAt.Sub(now))\n\t\treturn\n\t}\n\n\tsc.pingSent = true\n\t// Ignore crypto/rand.Read errors: It generally can't fail, and worse case if it does\n\t// is we send a PING frame containing 0s.\n\t_, _ = rand.Read(sc.sentPingData[:])\n\tsc.writeFrame(FrameWriteRequest{\n\t\twrite: &writePing{data: sc.sentPingData},\n\t})\n\tsc.readIdleTimer.Reset(sc.pingTimeout)\n}\n\ntype serverMessage int\n\n// Message values sent to serveMsgCh.\nvar (\n\tsettingsTimerMsg    = new(serverMessage)\n\tidleTimerMsg        = new(serverMessage)\n\treadIdleTimerMsg    = new(serverMessage)\n\tshutdownTimerMsg    = new(serverMessage)\n\tgracefulShutdownMsg = new(serverMessage)\n\thandlerDoneMsg      = new(serverMessage)\n)\n\nfunc (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }\nfunc (sc *serverConn) onIdleTimer()     { sc.sendServeMsg(idleTimerMsg) }\nfunc (sc *serverConn) onReadIdleTimer() { sc.sendServeMsg(readIdleTimerMsg) }\nfunc (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) }\n\nfunc (sc *serverConn) sendServeMsg(msg interface{}) {\n\tsc.serveG.checkNotOn() // NOT\n\tselect {\n\tcase sc.serveMsgCh <- msg:\n\tcase <-sc.doneServing:\n\t}\n}\n\nvar errPrefaceTimeout = errors.New(\"timeout waiting for client preface\")\n\n// readPreface reads the ClientPreface greeting from the peer or\n// returns errPrefaceTimeout on timeout, or an error if the greeting\n// is invalid.\nfunc (sc *serverConn) readPreface() error {\n\tif sc.sawClientPreface {\n\t\treturn nil\n\t}\n\terrc := make(chan error, 1)\n\tgo func() {\n\t\t// Read the client preface\n\t\tbuf := make([]byte, len(ClientPreface))\n\t\tif _, err := io.ReadFull(sc.conn, buf); err != nil {\n\t\t\terrc <- err\n\t\t} else if !bytes.Equal(buf, clientPreface) {\n\t\t\terrc <- fmt.Errorf(\"bogus greeting %q\", buf)\n\t\t} else {\n\t\t\terrc <- nil\n\t\t}\n\t}()\n\ttimer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server?\n\tdefer timer.Stop()\n\tselect {\n\tcase <-timer.C:\n\t\treturn errPrefaceTimeout\n\tcase err := <-errc:\n\t\tif err == nil {\n\t\t\tif VerboseLogs {\n\t\t\t\tsc.vlogf(\"http2: server: client %v said hello\", sc.conn.RemoteAddr())\n\t\t\t}\n\t\t}\n\t\treturn err\n\t}\n}\n\nvar writeDataPool = sync.Pool{\n\tNew: func() interface{} { return new(writeData) },\n}\n\n// writeDataFromHandler writes DATA response frames from a handler on\n// the given stream.\nfunc (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStream bool) error {\n\tch := sc.srv.state.getErrChan()\n\twriteArg := writeDataPool.Get().(*writeData)\n\t*writeArg = writeData{stream.id, data, endStream}\n\terr := sc.writeFrameFromHandler(FrameWriteRequest{\n\t\twrite:  writeArg,\n\t\tstream: stream,\n\t\tdone:   ch,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar frameWriteDone bool // the frame write is done (successfully or not)\n\tselect {\n\tcase err = <-ch:\n\t\tframeWriteDone = true\n\tcase <-sc.doneServing:\n\t\treturn errClientDisconnected\n\tcase <-stream.cw:\n\t\t// If both ch and stream.cw were ready (as might\n\t\t// happen on the final Write after an http.Handler\n\t\t// ends), prefer the write result. Otherwise this\n\t\t// might just be us successfully closing the stream.\n\t\t// The writeFrameAsync and serve goroutines guarantee\n\t\t// that the ch send will happen before the stream.cw\n\t\t// close.\n\t\tselect {\n\t\tcase err = <-ch:\n\t\t\tframeWriteDone = true\n\t\tdefault:\n\t\t\treturn errStreamClosed\n\t\t}\n\t}\n\tsc.srv.state.putErrChan(ch)\n\tif frameWriteDone {\n\t\twriteDataPool.Put(writeArg)\n\t}\n\treturn err\n}\n\n// writeFrameFromHandler sends wr to sc.wantWriteFrameCh, but aborts\n// if the connection has gone away.\n//\n// This must not be run from the serve goroutine itself, else it might\n// deadlock writing to sc.wantWriteFrameCh (which is only mildly\n// buffered and is read by serve itself). If you're on the serve\n// goroutine, call writeFrame instead.\nfunc (sc *serverConn) writeFrameFromHandler(wr FrameWriteRequest) error {\n\tsc.serveG.checkNotOn() // NOT\n\tselect {\n\tcase sc.wantWriteFrameCh <- wr:\n\t\treturn nil\n\tcase <-sc.doneServing:\n\t\t// Serve loop is gone.\n\t\t// Client has closed their connection to the server.\n\t\treturn errClientDisconnected\n\t}\n}\n\n// writeFrame schedules a frame to write and sends it if there's nothing\n// already being written.\n//\n// There is no pushback here (the serve goroutine never blocks). It's\n// the http.Handlers that block, waiting for their previous frames to\n// make it onto the wire\n//\n// If you're not on the serve goroutine, use writeFrameFromHandler instead.\nfunc (sc *serverConn) writeFrame(wr FrameWriteRequest) {\n\tsc.serveG.check()\n\n\t// If true, wr will not be written and wr.done will not be signaled.\n\tvar ignoreWrite bool\n\n\t// We are not allowed to write frames on closed streams. RFC 7540 Section\n\t// 5.1.1 says: \"An endpoint MUST NOT send frames other than PRIORITY on\n\t// a closed stream.\" Our server never sends PRIORITY, so that exception\n\t// does not apply.\n\t//\n\t// The serverConn might close an open stream while the stream's handler\n\t// is still running. For example, the server might close a stream when it\n\t// receives bad data from the client. If this happens, the handler might\n\t// attempt to write a frame after the stream has been closed (since the\n\t// handler hasn't yet been notified of the close). In this case, we simply\n\t// ignore the frame. The handler will notice that the stream is closed when\n\t// it waits for the frame to be written.\n\t//\n\t// As an exception to this rule, we allow sending RST_STREAM after close.\n\t// This allows us to immediately reject new streams without tracking any\n\t// state for those streams (except for the queued RST_STREAM frame). This\n\t// may result in duplicate RST_STREAMs in some cases, but the client should\n\t// ignore those.\n\tif wr.StreamID() != 0 {\n\t\t_, isReset := wr.write.(StreamError)\n\t\tif state, _ := sc.state(wr.StreamID()); state == stateClosed && !isReset {\n\t\t\tignoreWrite = true\n\t\t}\n\t}\n\n\t// Don't send a 100-continue response if we've already sent headers.\n\t// See golang.org/issue/14030.\n\tswitch wr.write.(type) {\n\tcase *writeResHeaders:\n\t\twr.stream.wroteHeaders = true\n\tcase write100ContinueHeadersFrame:\n\t\tif wr.stream.wroteHeaders {\n\t\t\t// We do not need to notify wr.done because this frame is\n\t\t\t// never written with wr.done != nil.\n\t\t\tif wr.done != nil {\n\t\t\t\tpanic(\"wr.done != nil for write100ContinueHeadersFrame\")\n\t\t\t}\n\t\t\tignoreWrite = true\n\t\t}\n\t}\n\n\tif !ignoreWrite {\n\t\tif wr.isControl() {\n\t\t\tsc.queuedControlFrames++\n\t\t\t// For extra safety, detect wraparounds, which should not happen,\n\t\t\t// and pull the plug.\n\t\t\tif sc.queuedControlFrames < 0 {\n\t\t\t\tsc.conn.Close()\n\t\t\t}\n\t\t}\n\t\tsc.writeSched.Push(wr)\n\t}\n\tsc.scheduleFrameWrite()\n}\n\n// startFrameWrite starts a goroutine to write wr (in a separate\n// goroutine since that might block on the network), and updates the\n// serve goroutine's state about the world, updated from info in wr.\nfunc (sc *serverConn) startFrameWrite(wr FrameWriteRequest) {\n\tsc.serveG.check()\n\tif sc.writingFrame {\n\t\tpanic(\"internal error: can only be writing one frame at a time\")\n\t}\n\n\tst := wr.stream\n\tif st != nil {\n\t\tswitch st.state {\n\t\tcase stateHalfClosedLocal:\n\t\t\tswitch wr.write.(type) {\n\t\t\tcase StreamError, handlerPanicRST, writeWindowUpdate:\n\t\t\t\t// RFC 7540 Section 5.1 allows sending RST_STREAM, PRIORITY, and WINDOW_UPDATE\n\t\t\t\t// in this state. (We never send PRIORITY from the server, so that is not checked.)\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"internal error: attempt to send frame on a half-closed-local stream: %v\", wr))\n\t\t\t}\n\t\tcase stateClosed:\n\t\t\tpanic(fmt.Sprintf(\"internal error: attempt to send frame on a closed stream: %v\", wr))\n\t\t}\n\t}\n\tif wpp, ok := wr.write.(*writePushPromise); ok {\n\t\tvar err error\n\t\twpp.promisedID, err = wpp.allocatePromisedID()\n\t\tif err != nil {\n\t\t\tsc.writingFrameAsync = false\n\t\t\twr.replyToWriter(err)\n\t\t\treturn\n\t\t}\n\t}\n\n\tsc.writingFrame = true\n\tsc.needsFrameFlush = true\n\tif wr.write.staysWithinBuffer(sc.bw.Available()) {\n\t\tsc.writingFrameAsync = false\n\t\terr := wr.write.writeFrame(sc)\n\t\tsc.wroteFrame(frameWriteResult{wr: wr, err: err})\n\t} else if wd, ok := wr.write.(*writeData); ok {\n\t\t// Encode the frame in the serve goroutine, to ensure we don't have\n\t\t// any lingering asynchronous references to data passed to Write.\n\t\t// See https://go.dev/issue/58446.\n\t\tsc.framer.startWriteDataPadded(wd.streamID, wd.endStream, wd.p, nil)\n\t\tsc.writingFrameAsync = true\n\t\tgo sc.writeFrameAsync(wr, wd)\n\t} else {\n\t\tsc.writingFrameAsync = true\n\t\tgo sc.writeFrameAsync(wr, nil)\n\t}\n}\n\n// errHandlerPanicked is the error given to any callers blocked in a read from\n// Request.Body when the main goroutine panics. Since most handlers read in the\n// main ServeHTTP goroutine, this will show up rarely.\nvar errHandlerPanicked = errors.New(\"http2: handler panicked\")\n\n// wroteFrame is called on the serve goroutine with the result of\n// whatever happened on writeFrameAsync.\nfunc (sc *serverConn) wroteFrame(res frameWriteResult) {\n\tsc.serveG.check()\n\tif !sc.writingFrame {\n\t\tpanic(\"internal error: expected to be already writing a frame\")\n\t}\n\tsc.writingFrame = false\n\tsc.writingFrameAsync = false\n\n\tif res.err != nil {\n\t\tsc.conn.Close()\n\t}\n\n\twr := res.wr\n\n\tif writeEndsStream(wr.write) {\n\t\tst := wr.stream\n\t\tif st == nil {\n\t\t\tpanic(\"internal error: expecting non-nil stream\")\n\t\t}\n\t\tswitch st.state {\n\t\tcase stateOpen:\n\t\t\t// Here we would go to stateHalfClosedLocal in\n\t\t\t// theory, but since our handler is done and\n\t\t\t// the net/http package provides no mechanism\n\t\t\t// for closing a ResponseWriter while still\n\t\t\t// reading data (see possible TODO at top of\n\t\t\t// this file), we go into closed state here\n\t\t\t// anyway, after telling the peer we're\n\t\t\t// hanging up on them. We'll transition to\n\t\t\t// stateClosed after the RST_STREAM frame is\n\t\t\t// written.\n\t\t\tst.state = stateHalfClosedLocal\n\t\t\t// Section 8.1: a server MAY request that the client abort\n\t\t\t// transmission of a request without error by sending a\n\t\t\t// RST_STREAM with an error code of NO_ERROR after sending\n\t\t\t// a complete response.\n\t\t\tsc.resetStream(streamError(st.id, ErrCodeNo))\n\t\tcase stateHalfClosedRemote:\n\t\t\tsc.closeStream(st, errHandlerComplete)\n\t\t}\n\t} else {\n\t\tswitch v := wr.write.(type) {\n\t\tcase StreamError:\n\t\t\t// st may be unknown if the RST_STREAM was generated to reject bad input.\n\t\t\tif st, ok := sc.streams[v.StreamID]; ok {\n\t\t\t\tsc.closeStream(st, v)\n\t\t\t}\n\t\tcase handlerPanicRST:\n\t\t\tsc.closeStream(wr.stream, errHandlerPanicked)\n\t\t}\n\t}\n\n\t// Reply (if requested) to unblock the ServeHTTP goroutine.\n\twr.replyToWriter(res.err)\n\n\tsc.scheduleFrameWrite()\n}\n\n// scheduleFrameWrite tickles the frame writing scheduler.\n//\n// If a frame is already being written, nothing happens. This will be called again\n// when the frame is done being written.\n//\n// If a frame isn't being written and we need to send one, the best frame\n// to send is selected by writeSched.\n//\n// If a frame isn't being written and there's nothing else to send, we\n// flush the write buffer.\nfunc (sc *serverConn) scheduleFrameWrite() {\n\tsc.serveG.check()\n\tif sc.writingFrame || sc.inFrameScheduleLoop {\n\t\treturn\n\t}\n\tsc.inFrameScheduleLoop = true\n\tfor !sc.writingFrameAsync {\n\t\tif sc.needToSendGoAway {\n\t\t\tsc.needToSendGoAway = false\n\t\t\tsc.startFrameWrite(FrameWriteRequest{\n\t\t\t\twrite: &writeGoAway{\n\t\t\t\t\tmaxStreamID: sc.maxClientStreamID,\n\t\t\t\t\tcode:        sc.goAwayCode,\n\t\t\t\t},\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\t\tif sc.needToSendSettingsAck {\n\t\t\tsc.needToSendSettingsAck = false\n\t\t\tsc.startFrameWrite(FrameWriteRequest{write: writeSettingsAck{}})\n\t\t\tcontinue\n\t\t}\n\t\tif !sc.inGoAway || sc.goAwayCode == ErrCodeNo {\n\t\t\tif wr, ok := sc.writeSched.Pop(); ok {\n\t\t\t\tif wr.isControl() {\n\t\t\t\t\tsc.queuedControlFrames--\n\t\t\t\t}\n\t\t\t\tsc.startFrameWrite(wr)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tif sc.needsFrameFlush {\n\t\t\tsc.startFrameWrite(FrameWriteRequest{write: flushFrameWriter{}})\n\t\t\tsc.needsFrameFlush = false // after startFrameWrite, since it sets this true\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\tsc.inFrameScheduleLoop = false\n}\n\n// startGracefulShutdown gracefully shuts down a connection. This\n// sends GOAWAY with ErrCodeNo to tell the client we're gracefully\n// shutting down. The connection isn't closed until all current\n// streams are done.\n//\n// startGracefulShutdown returns immediately; it does not wait until\n// the connection has shut down.\nfunc (sc *serverConn) startGracefulShutdown() {\n\tsc.serveG.checkNotOn() // NOT\n\tsc.shutdownOnce.Do(func() { sc.sendServeMsg(gracefulShutdownMsg) })\n}\n\n// After sending GOAWAY with an error code (non-graceful shutdown), the\n// connection will close after goAwayTimeout.\n//\n// If we close the connection immediately after sending GOAWAY, there may\n// be unsent data in our kernel receive buffer, which will cause the kernel\n// to send a TCP RST on close() instead of a FIN. This RST will abort the\n// connection immediately, whether or not the client had received the GOAWAY.\n//\n// Ideally we should delay for at least 1 RTT + epsilon so the client has\n// a chance to read the GOAWAY and stop sending messages. Measuring RTT\n// is hard, so we approximate with 1 second. See golang.org/issue/18701.\n//\n// This is a var so it can be shorter in tests, where all requests uses the\n// loopback interface making the expected RTT very small.\n//\n// TODO: configurable?\nvar goAwayTimeout = 1 * time.Second\n\nfunc (sc *serverConn) startGracefulShutdownInternal() {\n\tsc.goAway(ErrCodeNo)\n}\n\nfunc (sc *serverConn) goAway(code ErrCode) {\n\tsc.serveG.check()\n\tif sc.inGoAway {\n\t\tif sc.goAwayCode == ErrCodeNo {\n\t\t\tsc.goAwayCode = code\n\t\t}\n\t\treturn\n\t}\n\tsc.inGoAway = true\n\tsc.needToSendGoAway = true\n\tsc.goAwayCode = code\n\tsc.scheduleFrameWrite()\n}\n\nfunc (sc *serverConn) shutDownIn(d time.Duration) {\n\tsc.serveG.check()\n\tsc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer)\n}\n\nfunc (sc *serverConn) resetStream(se StreamError) {\n\tsc.serveG.check()\n\tsc.writeFrame(FrameWriteRequest{write: se})\n\tif st, ok := sc.streams[se.StreamID]; ok {\n\t\tst.resetQueued = true\n\t}\n}\n\n// processFrameFromReader processes the serve loop's read from readFrameCh from the\n// frame-reading goroutine.\n// processFrameFromReader returns whether the connection should be kept open.\nfunc (sc *serverConn) processFrameFromReader(res readFrameResult) bool {\n\tsc.serveG.check()\n\terr := res.err\n\tif err != nil {\n\t\tif err == ErrFrameTooLarge {\n\t\t\tsc.goAway(ErrCodeFrameSize)\n\t\t\treturn true // goAway will close the loop\n\t\t}\n\t\tclientGone := err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err)\n\t\tif clientGone {\n\t\t\t// TODO: could we also get into this state if\n\t\t\t// the peer does a half close\n\t\t\t// (e.g. CloseWrite) because they're done\n\t\t\t// sending frames but they're still wanting\n\t\t\t// our open replies?  Investigate.\n\t\t\t// TODO: add CloseWrite to crypto/tls.Conn first\n\t\t\t// so we have a way to test this? I suppose\n\t\t\t// just for testing we could have a non-TLS mode.\n\t\t\treturn false\n\t\t}\n\t} else {\n\t\tf := res.f\n\t\tif VerboseLogs {\n\t\t\tsc.vlogf(\"http2: server read frame %v\", summarizeFrame(f))\n\t\t}\n\t\terr = sc.processFrame(f)\n\t\tif err == nil {\n\t\t\treturn true\n\t\t}\n\t}\n\n\tswitch ev := err.(type) {\n\tcase StreamError:\n\t\tsc.resetStream(ev)\n\t\treturn true\n\tcase goAwayFlowError:\n\t\tsc.goAway(ErrCodeFlowControl)\n\t\treturn true\n\tcase ConnectionError:\n\t\tif res.f != nil {\n\t\t\tif id := res.f.Header().StreamID; id > sc.maxClientStreamID {\n\t\t\t\tsc.maxClientStreamID = id\n\t\t\t}\n\t\t}\n\t\tsc.logf(\"http2: server connection error from %v: %v\", sc.conn.RemoteAddr(), ev)\n\t\tsc.goAway(ErrCode(ev))\n\t\treturn true // goAway will handle shutdown\n\tdefault:\n\t\tif res.err != nil {\n\t\t\tsc.vlogf(\"http2: server closing client connection; error reading frame from client %s: %v\", sc.conn.RemoteAddr(), err)\n\t\t} else {\n\t\t\tsc.logf(\"http2: server closing client connection: %v\", err)\n\t\t}\n\t\treturn false\n\t}\n}\n\nfunc (sc *serverConn) processFrame(f Frame) error {\n\tsc.serveG.check()\n\n\t// First frame received must be SETTINGS.\n\tif !sc.sawFirstSettings {\n\t\tif _, ok := f.(*SettingsFrame); !ok {\n\t\t\treturn sc.countError(\"first_settings\", ConnectionError(ErrCodeProtocol))\n\t\t}\n\t\tsc.sawFirstSettings = true\n\t}\n\n\t// Discard frames for streams initiated after the identified last\n\t// stream sent in a GOAWAY, or all frames after sending an error.\n\t// We still need to return connection-level flow control for DATA frames.\n\t// RFC 9113 Section 6.8.\n\tif sc.inGoAway && (sc.goAwayCode != ErrCodeNo || f.Header().StreamID > sc.maxClientStreamID) {\n\n\t\tif f, ok := f.(*DataFrame); ok {\n\t\t\tif !sc.inflow.take(f.Length) {\n\t\t\t\treturn sc.countError(\"data_flow\", streamError(f.Header().StreamID, ErrCodeFlowControl))\n\t\t\t}\n\t\t\tsc.sendWindowUpdate(nil, int(f.Length)) // conn-level\n\t\t}\n\t\treturn nil\n\t}\n\n\tswitch f := f.(type) {\n\tcase *SettingsFrame:\n\t\treturn sc.processSettings(f)\n\tcase *MetaHeadersFrame:\n\t\treturn sc.processHeaders(f)\n\tcase *WindowUpdateFrame:\n\t\treturn sc.processWindowUpdate(f)\n\tcase *PingFrame:\n\t\treturn sc.processPing(f)\n\tcase *DataFrame:\n\t\treturn sc.processData(f)\n\tcase *RSTStreamFrame:\n\t\treturn sc.processResetStream(f)\n\tcase *PriorityFrame:\n\t\treturn sc.processPriority(f)\n\tcase *GoAwayFrame:\n\t\treturn sc.processGoAway(f)\n\tcase *PushPromiseFrame:\n\t\t// A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE\n\t\t// frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\t\treturn sc.countError(\"push_promise\", ConnectionError(ErrCodeProtocol))\n\tcase *PriorityUpdateFrame:\n\t\treturn sc.processPriorityUpdate(f)\n\tdefault:\n\t\tsc.vlogf(\"http2: server ignoring frame: %v\", f.Header())\n\t\treturn nil\n\t}\n}\n\nfunc (sc *serverConn) processPing(f *PingFrame) error {\n\tsc.serveG.check()\n\tif f.IsAck() {\n\t\tif sc.pingSent && sc.sentPingData == f.Data {\n\t\t\t// This is a response to a PING we sent.\n\t\t\tsc.pingSent = false\n\t\t\tsc.readIdleTimer.Reset(sc.readIdleTimeout)\n\t\t}\n\t\t// 6.7 PING: \" An endpoint MUST NOT respond to PING frames\n\t\t// containing this flag.\"\n\t\treturn nil\n\t}\n\tif f.StreamID != 0 {\n\t\t// \"PING frames are not associated with any individual\n\t\t// stream. If a PING frame is received with a stream\n\t\t// identifier field value other than 0x0, the recipient MUST\n\t\t// respond with a connection error (Section 5.4.1) of type\n\t\t// PROTOCOL_ERROR.\"\n\t\treturn sc.countError(\"ping_on_stream\", ConnectionError(ErrCodeProtocol))\n\t}\n\tsc.writeFrame(FrameWriteRequest{write: writePingAck{f}})\n\treturn nil\n}\n\nfunc (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error {\n\tsc.serveG.check()\n\tswitch {\n\tcase f.StreamID != 0: // stream-level flow control\n\t\tstate, st := sc.state(f.StreamID)\n\t\tif state == stateIdle {\n\t\t\t// Section 5.1: \"Receiving any frame other than HEADERS\n\t\t\t// or PRIORITY on a stream in this state MUST be\n\t\t\t// treated as a connection error (Section 5.4.1) of\n\t\t\t// type PROTOCOL_ERROR.\"\n\t\t\treturn sc.countError(\"stream_idle\", ConnectionError(ErrCodeProtocol))\n\t\t}\n\t\tif st == nil {\n\t\t\t// \"WINDOW_UPDATE can be sent by a peer that has sent a\n\t\t\t// frame bearing the END_STREAM flag. This means that a\n\t\t\t// receiver could receive a WINDOW_UPDATE frame on a \"half\n\t\t\t// closed (remote)\" or \"closed\" stream. A receiver MUST\n\t\t\t// NOT treat this as an error, see Section 5.1.\"\n\t\t\treturn nil\n\t\t}\n\t\tif !st.flow.add(int32(f.Increment)) {\n\t\t\treturn sc.countError(\"bad_flow\", streamError(f.StreamID, ErrCodeFlowControl))\n\t\t}\n\tdefault: // connection-level flow control\n\t\tif !sc.flow.add(int32(f.Increment)) {\n\t\t\treturn goAwayFlowError{}\n\t\t}\n\t}\n\tsc.scheduleFrameWrite()\n\treturn nil\n}\n\nfunc (sc *serverConn) processResetStream(f *RSTStreamFrame) error {\n\tsc.serveG.check()\n\n\tstate, st := sc.state(f.StreamID)\n\tif state == stateIdle {\n\t\t// 6.4 \"RST_STREAM frames MUST NOT be sent for a\n\t\t// stream in the \"idle\" state. If a RST_STREAM frame\n\t\t// identifying an idle stream is received, the\n\t\t// recipient MUST treat this as a connection error\n\t\t// (Section 5.4.1) of type PROTOCOL_ERROR.\n\t\treturn sc.countError(\"reset_idle_stream\", ConnectionError(ErrCodeProtocol))\n\t}\n\tif st != nil {\n\t\tst.cancelCtx()\n\t\tsc.closeStream(st, streamError(f.StreamID, f.ErrCode))\n\t}\n\treturn nil\n}\n\nfunc (sc *serverConn) closeStream(st *stream, err error) {\n\tsc.serveG.check()\n\tif st.state == stateIdle || st.state == stateClosed {\n\t\tpanic(fmt.Sprintf(\"invariant; can't close stream in state %v\", st.state))\n\t}\n\tst.state = stateClosed\n\tif st.readDeadline != nil {\n\t\tst.readDeadline.Stop()\n\t}\n\tif st.writeDeadline != nil {\n\t\tst.writeDeadline.Stop()\n\t}\n\tif st.isPushed() {\n\t\tsc.curPushedStreams--\n\t} else {\n\t\tsc.curClientStreams--\n\t}\n\tdelete(sc.streams, st.id)\n\tif len(sc.streams) == 0 {\n\t\tsc.setConnState(http.StateIdle)\n\t\tif sc.srv.IdleTimeout > 0 && sc.idleTimer != nil {\n\t\t\tsc.idleTimer.Reset(sc.srv.IdleTimeout)\n\t\t}\n\t\tif h1ServerKeepAlivesDisabled(sc.hs) {\n\t\t\tsc.startGracefulShutdownInternal()\n\t\t}\n\t}\n\tif p := st.body; p != nil {\n\t\t// Return any buffered unread bytes worth of conn-level flow control.\n\t\t// See golang.org/issue/16481\n\t\tsc.sendWindowUpdate(nil, p.Len())\n\n\t\tp.CloseWithError(err)\n\t}\n\tif e, ok := err.(StreamError); ok {\n\t\tif e.Cause != nil {\n\t\t\terr = e.Cause\n\t\t} else {\n\t\t\terr = errStreamClosed\n\t\t}\n\t}\n\tst.closeErr = err\n\tst.cancelCtx()\n\tst.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc\n\tsc.writeSched.CloseStream(st.id)\n}\n\nfunc (sc *serverConn) processSettings(f *SettingsFrame) error {\n\tsc.serveG.check()\n\tif f.IsAck() {\n\t\tsc.unackedSettings--\n\t\tif sc.unackedSettings < 0 {\n\t\t\t// Why is the peer ACKing settings we never sent?\n\t\t\t// The spec doesn't mention this case, but\n\t\t\t// hang up on them anyway.\n\t\t\treturn sc.countError(\"ack_mystery\", ConnectionError(ErrCodeProtocol))\n\t\t}\n\t\treturn nil\n\t}\n\tif f.NumSettings() > 100 || f.HasDuplicates() {\n\t\t// This isn't actually in the spec, but hang up on\n\t\t// suspiciously large settings frames or those with\n\t\t// duplicate entries.\n\t\treturn sc.countError(\"settings_big_or_dups\", ConnectionError(ErrCodeProtocol))\n\t}\n\tif err := f.ForeachSetting(sc.processSetting); err != nil {\n\t\treturn err\n\t}\n\t// TODO: judging by RFC 7540, Section 6.5.3 each SETTINGS frame should be\n\t// acknowledged individually, even if multiple are received before the ACK.\n\tsc.needToSendSettingsAck = true\n\tsc.scheduleFrameWrite()\n\treturn nil\n}\n\nfunc (sc *serverConn) processSetting(s Setting) error {\n\tsc.serveG.check()\n\tif err := s.Valid(); err != nil {\n\t\treturn err\n\t}\n\tif VerboseLogs {\n\t\tsc.vlogf(\"http2: server processing setting %v\", s)\n\t}\n\tswitch s.ID {\n\tcase SettingHeaderTableSize:\n\t\tsc.hpackEncoder.SetMaxDynamicTableSize(s.Val)\n\tcase SettingEnablePush:\n\t\tsc.pushEnabled = s.Val != 0\n\tcase SettingMaxConcurrentStreams:\n\t\tsc.clientMaxStreams = s.Val\n\tcase SettingInitialWindowSize:\n\t\treturn sc.processSettingInitialWindowSize(s.Val)\n\tcase SettingMaxFrameSize:\n\t\tsc.maxFrameSize = int32(s.Val) // the maximum valid s.Val is < 2^31\n\tcase SettingMaxHeaderListSize:\n\t\tsc.peerMaxHeaderListSize = s.Val\n\tcase SettingEnableConnectProtocol:\n\t\t// Receipt of this parameter by a server does not\n\t\t// have any impact\n\tcase SettingNoRFC7540Priorities:\n\t\tif s.Val > 1 {\n\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t}\n\tdefault:\n\t\t// Unknown setting: \"An endpoint that receives a SETTINGS\n\t\t// frame with any unknown or unsupported identifier MUST\n\t\t// ignore that setting.\"\n\t\tif VerboseLogs {\n\t\t\tsc.vlogf(\"http2: server ignoring unknown setting %v\", s)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (sc *serverConn) processSettingInitialWindowSize(val uint32) error {\n\tsc.serveG.check()\n\t// Note: val already validated to be within range by\n\t// processSetting's Valid call.\n\n\t// \"A SETTINGS frame can alter the initial flow control window\n\t// size for all current streams. When the value of\n\t// SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST\n\t// adjust the size of all stream flow control windows that it\n\t// maintains by the difference between the new value and the\n\t// old value.\"\n\told := sc.initialStreamSendWindowSize\n\tsc.initialStreamSendWindowSize = int32(val)\n\tgrowth := int32(val) - old // may be negative\n\tfor _, st := range sc.streams {\n\t\tif !st.flow.add(growth) {\n\t\t\t// 6.9.2 Initial Flow Control Window Size\n\t\t\t// \"An endpoint MUST treat a change to\n\t\t\t// SETTINGS_INITIAL_WINDOW_SIZE that causes any flow\n\t\t\t// control window to exceed the maximum size as a\n\t\t\t// connection error (Section 5.4.1) of type\n\t\t\t// FLOW_CONTROL_ERROR.\"\n\t\t\treturn sc.countError(\"setting_win_size\", ConnectionError(ErrCodeFlowControl))\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (sc *serverConn) processData(f *DataFrame) error {\n\tsc.serveG.check()\n\tid := f.Header().StreamID\n\n\tdata := f.Data()\n\tstate, st := sc.state(id)\n\tif id == 0 || state == stateIdle {\n\t\t// Section 6.1: \"DATA frames MUST be associated with a\n\t\t// stream. If a DATA frame is received whose stream\n\t\t// identifier field is 0x0, the recipient MUST respond\n\t\t// with a connection error (Section 5.4.1) of type\n\t\t// PROTOCOL_ERROR.\"\n\t\t//\n\t\t// Section 5.1: \"Receiving any frame other than HEADERS\n\t\t// or PRIORITY on a stream in this state MUST be\n\t\t// treated as a connection error (Section 5.4.1) of\n\t\t// type PROTOCOL_ERROR.\"\n\t\treturn sc.countError(\"data_on_idle\", ConnectionError(ErrCodeProtocol))\n\t}\n\n\t// \"If a DATA frame is received whose stream is not in \"open\"\n\t// or \"half closed (local)\" state, the recipient MUST respond\n\t// with a stream error (Section 5.4.2) of type STREAM_CLOSED.\"\n\tif st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {\n\t\t// This includes sending a RST_STREAM if the stream is\n\t\t// in stateHalfClosedLocal (which currently means that\n\t\t// the http.Handler returned, so it's done reading &\n\t\t// done writing). Try to stop the client from sending\n\t\t// more DATA.\n\n\t\t// But still enforce their connection-level flow control,\n\t\t// and return any flow control bytes since we're not going\n\t\t// to consume them.\n\t\tif !sc.inflow.take(f.Length) {\n\t\t\treturn sc.countError(\"data_flow\", streamError(id, ErrCodeFlowControl))\n\t\t}\n\t\tsc.sendWindowUpdate(nil, int(f.Length)) // conn-level\n\n\t\tif st != nil && st.resetQueued {\n\t\t\t// Already have a stream error in flight. Don't send another.\n\t\t\treturn nil\n\t\t}\n\t\treturn sc.countError(\"closed\", streamError(id, ErrCodeStreamClosed))\n\t}\n\tif st.body == nil {\n\t\tpanic(\"internal error: should have a body in this state\")\n\t}\n\n\t// Sender sending more than they'd declared?\n\tif st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes {\n\t\tif !sc.inflow.take(f.Length) {\n\t\t\treturn sc.countError(\"data_flow\", streamError(id, ErrCodeFlowControl))\n\t\t}\n\t\tsc.sendWindowUpdate(nil, int(f.Length)) // conn-level\n\n\t\tst.body.CloseWithError(fmt.Errorf(\"sender tried to send more than declared Content-Length of %d bytes\", st.declBodyBytes))\n\t\t// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the\n\t\t// value of a content-length header field does not equal the sum of the\n\t\t// DATA frame payload lengths that form the body.\n\t\treturn sc.countError(\"send_too_much\", streamError(id, ErrCodeProtocol))\n\t}\n\tif f.Length > 0 {\n\t\t// Check whether the client has flow control quota.\n\t\tif !takeInflows(&sc.inflow, &st.inflow, f.Length) {\n\t\t\treturn sc.countError(\"flow_on_data_length\", streamError(id, ErrCodeFlowControl))\n\t\t}\n\n\t\tif len(data) > 0 {\n\t\t\tst.bodyBytes += int64(len(data))\n\t\t\twrote, err := st.body.Write(data)\n\t\t\tif err != nil {\n\t\t\t\t// The handler has closed the request body.\n\t\t\t\t// Return the connection-level flow control for the discarded data,\n\t\t\t\t// but not the stream-level flow control.\n\t\t\t\tsc.sendWindowUpdate(nil, int(f.Length)-wrote)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif wrote != len(data) {\n\t\t\t\tpanic(\"internal error: bad Writer\")\n\t\t\t}\n\t\t}\n\n\t\t// Return any padded flow control now, since we won't\n\t\t// refund it later on body reads.\n\t\t// Call sendWindowUpdate even if there is no padding,\n\t\t// to return buffered flow control credit if the sent\n\t\t// window has shrunk.\n\t\tpad := int32(f.Length) - int32(len(data))\n\t\tsc.sendWindowUpdate32(nil, pad)\n\t\tsc.sendWindowUpdate32(st, pad)\n\t}\n\tif f.StreamEnded() {\n\t\tst.endStream()\n\t}\n\treturn nil\n}\n\nfunc (sc *serverConn) processGoAway(f *GoAwayFrame) error {\n\tsc.serveG.check()\n\tif f.ErrCode != ErrCodeNo {\n\t\tsc.logf(\"http2: received GOAWAY %+v, starting graceful shutdown\", f)\n\t} else {\n\t\tsc.vlogf(\"http2: received GOAWAY %+v, starting graceful shutdown\", f)\n\t}\n\tsc.startGracefulShutdownInternal()\n\t// http://tools.ietf.org/html/rfc7540#section-6.8\n\t// We should not create any new streams, which means we should disable push.\n\tsc.pushEnabled = false\n\treturn nil\n}\n\n// isPushed reports whether the stream is server-initiated.\nfunc (st *stream) isPushed() bool {\n\treturn st.id%2 == 0\n}\n\n// endStream closes a Request.Body's pipe. It is called when a DATA\n// frame says a request body is over (or after trailers).\nfunc (st *stream) endStream() {\n\tsc := st.sc\n\tsc.serveG.check()\n\n\tif st.declBodyBytes != -1 && st.declBodyBytes != st.bodyBytes {\n\t\tst.body.CloseWithError(fmt.Errorf(\"request declared a Content-Length of %d but only wrote %d bytes\",\n\t\t\tst.declBodyBytes, st.bodyBytes))\n\t} else {\n\t\tst.body.closeWithErrorAndCode(io.EOF, st.copyTrailersToHandlerRequest)\n\t\tst.body.CloseWithError(io.EOF)\n\t}\n\tst.state = stateHalfClosedRemote\n}\n\n// copyTrailersToHandlerRequest is run in the Handler's goroutine in\n// its Request.Body.Read just before it gets io.EOF.\nfunc (st *stream) copyTrailersToHandlerRequest() {\n\tfor k, vv := range st.trailer {\n\t\tif _, ok := st.reqTrailer[k]; ok {\n\t\t\t// Only copy it over it was pre-declared.\n\t\t\tst.reqTrailer[k] = vv\n\t\t}\n\t}\n}\n\n// onReadTimeout is run on its own goroutine (from time.AfterFunc)\n// when the stream's ReadTimeout has fired.\nfunc (st *stream) onReadTimeout() {\n\tif st.body != nil {\n\t\t// Wrap the ErrDeadlineExceeded to avoid callers depending on us\n\t\t// returning the bare error.\n\t\tst.body.CloseWithError(fmt.Errorf(\"%w\", os.ErrDeadlineExceeded))\n\t}\n}\n\n// onWriteTimeout is run on its own goroutine (from time.AfterFunc)\n// when the stream's WriteTimeout has fired.\nfunc (st *stream) onWriteTimeout() {\n\tst.sc.writeFrameFromHandler(FrameWriteRequest{write: StreamError{\n\t\tStreamID: st.id,\n\t\tCode:     ErrCodeInternal,\n\t\tCause:    os.ErrDeadlineExceeded,\n\t}})\n}\n\nfunc (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {\n\tsc.serveG.check()\n\tid := f.StreamID\n\t// http://tools.ietf.org/html/rfc7540#section-5.1.1\n\t// Streams initiated by a client MUST use odd-numbered stream\n\t// identifiers. [...] An endpoint that receives an unexpected\n\t// stream identifier MUST respond with a connection error\n\t// (Section 5.4.1) of type PROTOCOL_ERROR.\n\tif id%2 != 1 {\n\t\treturn sc.countError(\"headers_even\", ConnectionError(ErrCodeProtocol))\n\t}\n\t// A HEADERS frame can be used to create a new stream or\n\t// send a trailer for an open one. If we already have a stream\n\t// open, let it process its own HEADERS frame (trailers at this\n\t// point, if it's valid).\n\tif st := sc.streams[f.StreamID]; st != nil {\n\t\tif st.resetQueued {\n\t\t\t// We're sending RST_STREAM to close the stream, so don't bother\n\t\t\t// processing this frame.\n\t\t\treturn nil\n\t\t}\n\t\t// RFC 7540, sec 5.1: If an endpoint receives additional frames, other than\n\t\t// WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in\n\t\t// this state, it MUST respond with a stream error (Section 5.4.2) of\n\t\t// type STREAM_CLOSED.\n\t\tif st.state == stateHalfClosedRemote {\n\t\t\treturn sc.countError(\"headers_half_closed\", streamError(id, ErrCodeStreamClosed))\n\t\t}\n\t\treturn st.processTrailerHeaders(f)\n\t}\n\n\t// [...] The identifier of a newly established stream MUST be\n\t// numerically greater than all streams that the initiating\n\t// endpoint has opened or reserved. [...]  An endpoint that\n\t// receives an unexpected stream identifier MUST respond with\n\t// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\tif id <= sc.maxClientStreamID {\n\t\treturn sc.countError(\"stream_went_down\", ConnectionError(ErrCodeProtocol))\n\t}\n\tsc.maxClientStreamID = id\n\n\tif sc.idleTimer != nil {\n\t\tsc.idleTimer.Stop()\n\t}\n\n\t// http://tools.ietf.org/html/rfc7540#section-5.1.2\n\t// [...] Endpoints MUST NOT exceed the limit set by their peer. An\n\t// endpoint that receives a HEADERS frame that causes their\n\t// advertised concurrent stream limit to be exceeded MUST treat\n\t// this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR\n\t// or REFUSED_STREAM.\n\tif sc.curClientStreams+1 > sc.advMaxStreams {\n\t\tif sc.unackedSettings == 0 {\n\t\t\t// They should know better.\n\t\t\treturn sc.countError(\"over_max_streams\", streamError(id, ErrCodeProtocol))\n\t\t}\n\t\t// Assume it's a network race, where they just haven't\n\t\t// received our last SETTINGS update. But actually\n\t\t// this can't happen yet, because we don't yet provide\n\t\t// a way for users to adjust server parameters at\n\t\t// runtime.\n\t\treturn sc.countError(\"over_max_streams_race\", streamError(id, ErrCodeRefusedStream))\n\t}\n\n\tinitialState := stateOpen\n\tif f.StreamEnded() {\n\t\tinitialState = stateHalfClosedRemote\n\t}\n\n\t// We are handling two special cases here:\n\t// 1. When a request is sent via an intermediary, we force priority to be\n\t// u=3,i. This is essentially a round-robin behavior, and is done to ensure\n\t// fairness between, for example, multiple clients using the same proxy.\n\t// 2. Until a client has shown that it is aware of RFC 9218, we make its\n\t// streams non-incremental by default. This is done to preserve the\n\t// historical behavior of handling streams in a round-robin manner, rather\n\t// than one-by-one to completion.\n\tinitialPriority := defaultRFC9218Priority(sc.priorityAware && !sc.hasIntermediary)\n\tif _, ok := sc.writeSched.(*priorityWriteSchedulerRFC9218); ok && !sc.hasIntermediary {\n\t\theaderPriority, priorityAware, hasIntermediary := f.rfc9218Priority(sc.priorityAware)\n\t\tinitialPriority = headerPriority\n\t\tsc.hasIntermediary = hasIntermediary\n\t\tif priorityAware {\n\t\t\tsc.priorityAware = true\n\t\t}\n\t}\n\tst := sc.newStream(id, 0, initialState, initialPriority)\n\n\tif f.HasPriority() {\n\t\tif err := sc.checkPriority(f.StreamID, f.Priority); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !sc.writeSchedIgnoresRFC7540() {\n\t\t\tsc.writeSched.AdjustStream(st.id, f.Priority)\n\t\t}\n\t}\n\n\trw, req, err := sc.newWriterAndRequest(st, f)\n\tif err != nil {\n\t\treturn err\n\t}\n\tst.reqTrailer = req.Trailer\n\tif st.reqTrailer != nil {\n\t\tst.trailer = make(http.Header)\n\t}\n\tst.body = req.Body.(*requestBody).pipe // may be nil\n\tst.declBodyBytes = req.ContentLength\n\n\thandler := sc.handler.ServeHTTP\n\tif f.Truncated {\n\t\t// Their header list was too long. Send a 431 error.\n\t\thandler = handleHeaderListTooLong\n\t} else if err := checkValidHTTP2RequestHeaders(req.Header); err != nil {\n\t\thandler = new400Handler(err)\n\t}\n\n\t// The net/http package sets the read deadline from the\n\t// http.Server.ReadTimeout during the TLS handshake, but then\n\t// passes the connection off to us with the deadline already\n\t// set. Disarm it here after the request headers are read,\n\t// similar to how the http1 server works. Here it's\n\t// technically more like the http1 Server's ReadHeaderTimeout\n\t// (in Go 1.8), though. That's a more sane option anyway.\n\tif sc.hs.ReadTimeout > 0 {\n\t\tsc.conn.SetReadDeadline(time.Time{})\n\t\tst.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)\n\t}\n\n\treturn sc.scheduleHandler(id, rw, req, handler)\n}\n\nfunc (sc *serverConn) upgradeRequest(req *http.Request) {\n\tsc.serveG.check()\n\tid := uint32(1)\n\tsc.maxClientStreamID = id\n\tst := sc.newStream(id, 0, stateHalfClosedRemote, defaultRFC9218Priority(sc.priorityAware && !sc.hasIntermediary))\n\tst.reqTrailer = req.Trailer\n\tif st.reqTrailer != nil {\n\t\tst.trailer = make(http.Header)\n\t}\n\trw := sc.newResponseWriter(st, req)\n\n\t// Disable any read deadline set by the net/http package\n\t// prior to the upgrade.\n\tif sc.hs.ReadTimeout > 0 {\n\t\tsc.conn.SetReadDeadline(time.Time{})\n\t}\n\n\t// This is the first request on the connection,\n\t// so start the handler directly rather than going\n\t// through scheduleHandler.\n\tsc.curHandlers++\n\tgo sc.runHandler(rw, req, sc.handler.ServeHTTP)\n}\n\nfunc (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {\n\tsc := st.sc\n\tsc.serveG.check()\n\tif st.gotTrailerHeader {\n\t\treturn sc.countError(\"dup_trailers\", ConnectionError(ErrCodeProtocol))\n\t}\n\tst.gotTrailerHeader = true\n\tif !f.StreamEnded() {\n\t\treturn sc.countError(\"trailers_not_ended\", streamError(st.id, ErrCodeProtocol))\n\t}\n\n\tif len(f.PseudoFields()) > 0 {\n\t\treturn sc.countError(\"trailers_pseudo\", streamError(st.id, ErrCodeProtocol))\n\t}\n\tif st.trailer != nil {\n\t\tfor _, hf := range f.RegularFields() {\n\t\t\tkey := sc.canonicalHeader(hf.Name)\n\t\t\tif !httpguts.ValidTrailerHeader(key) {\n\t\t\t\t// TODO: send more details to the peer somehow. But http2 has\n\t\t\t\t// no way to send debug data at a stream level. Discuss with\n\t\t\t\t// HTTP folk.\n\t\t\t\treturn sc.countError(\"trailers_bogus\", streamError(st.id, ErrCodeProtocol))\n\t\t\t}\n\t\t\tst.trailer[key] = append(st.trailer[key], hf.Value)\n\t\t}\n\t}\n\tst.endStream()\n\treturn nil\n}\n\nfunc (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error {\n\tif streamID == p.StreamDep {\n\t\t// Section 5.3.1: \"A stream cannot depend on itself. An endpoint MUST treat\n\t\t// this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.\"\n\t\t// Section 5.3.3 says that a stream can depend on one of its dependencies,\n\t\t// so it's only self-dependencies that are forbidden.\n\t\treturn sc.countError(\"priority\", streamError(streamID, ErrCodeProtocol))\n\t}\n\treturn nil\n}\n\nfunc (sc *serverConn) processPriority(f *PriorityFrame) error {\n\tif err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil {\n\t\treturn err\n\t}\n\t// We need to avoid calling AdjustStream when using the RFC 9218 write\n\t// scheduler. Otherwise, incremental's zero value in PriorityParam will\n\t// unexpectedly make all streams non-incremental. This causes us to process\n\t// streams one-by-one to completion rather than doing it in a round-robin\n\t// manner (the historical behavior), which might be unexpected to users.\n\tif sc.writeSchedIgnoresRFC7540() {\n\t\treturn nil\n\t}\n\tsc.writeSched.AdjustStream(f.StreamID, f.PriorityParam)\n\treturn nil\n}\n\nfunc (sc *serverConn) processPriorityUpdate(f *PriorityUpdateFrame) error {\n\tsc.priorityAware = true\n\tif _, ok := sc.writeSched.(*priorityWriteSchedulerRFC9218); !ok {\n\t\treturn nil\n\t}\n\tp, ok := parseRFC9218Priority(f.Priority, sc.priorityAware)\n\tif !ok {\n\t\treturn sc.countError(\"unparsable_priority_update\", streamError(f.PrioritizedStreamID, ErrCodeProtocol))\n\t}\n\tsc.writeSched.AdjustStream(f.PrioritizedStreamID, p)\n\treturn nil\n}\n\nfunc (sc *serverConn) newStream(id, pusherID uint32, state streamState, priority PriorityParam) *stream {\n\tsc.serveG.check()\n\tif id == 0 {\n\t\tpanic(\"internal error: cannot create stream with id 0\")\n\t}\n\n\tctx, cancelCtx := context.WithCancel(sc.baseCtx)\n\tst := &stream{\n\t\tsc:        sc,\n\t\tid:        id,\n\t\tstate:     state,\n\t\tctx:       ctx,\n\t\tcancelCtx: cancelCtx,\n\t}\n\tst.cw.Init()\n\tst.flow.conn = &sc.flow // link to conn-level counter\n\tst.flow.add(sc.initialStreamSendWindowSize)\n\tst.inflow.init(sc.initialStreamRecvWindowSize)\n\tif sc.hs.WriteTimeout > 0 {\n\t\tst.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)\n\t}\n\n\tsc.streams[id] = st\n\tsc.writeSched.OpenStream(st.id, OpenStreamOptions{PusherID: pusherID, priority: priority})\n\tif st.isPushed() {\n\t\tsc.curPushedStreams++\n\t} else {\n\t\tsc.curClientStreams++\n\t}\n\tif sc.curOpenStreams() == 1 {\n\t\tsc.setConnState(http.StateActive)\n\t}\n\n\treturn st\n}\n\nfunc (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*responseWriter, *http.Request, error) {\n\tsc.serveG.check()\n\n\trp := httpcommon.ServerRequestParam{\n\t\tMethod:    f.PseudoValue(\"method\"),\n\t\tScheme:    f.PseudoValue(\"scheme\"),\n\t\tAuthority: f.PseudoValue(\"authority\"),\n\t\tPath:      f.PseudoValue(\"path\"),\n\t\tProtocol:  f.PseudoValue(\"protocol\"),\n\t}\n\n\t// extended connect is disabled, so we should not see :protocol\n\tif disableExtendedConnectProtocol && rp.Protocol != \"\" {\n\t\treturn nil, nil, sc.countError(\"bad_connect\", streamError(f.StreamID, ErrCodeProtocol))\n\t}\n\n\tisConnect := rp.Method == \"CONNECT\"\n\tif isConnect {\n\t\tif rp.Protocol == \"\" && (rp.Path != \"\" || rp.Scheme != \"\" || rp.Authority == \"\") {\n\t\t\treturn nil, nil, sc.countError(\"bad_connect\", streamError(f.StreamID, ErrCodeProtocol))\n\t\t}\n\t} else if rp.Method == \"\" || rp.Path == \"\" || (rp.Scheme != \"https\" && rp.Scheme != \"http\") {\n\t\t// See 8.1.2.6 Malformed Requests and Responses:\n\t\t//\n\t\t// Malformed requests or responses that are detected\n\t\t// MUST be treated as a stream error (Section 5.4.2)\n\t\t// of type PROTOCOL_ERROR.\"\n\t\t//\n\t\t// 8.1.2.3 Request Pseudo-Header Fields\n\t\t// \"All HTTP/2 requests MUST include exactly one valid\n\t\t// value for the :method, :scheme, and :path\n\t\t// pseudo-header fields\"\n\t\treturn nil, nil, sc.countError(\"bad_path_method\", streamError(f.StreamID, ErrCodeProtocol))\n\t}\n\n\theader := make(http.Header)\n\trp.Header = header\n\tfor _, hf := range f.RegularFields() {\n\t\theader.Add(sc.canonicalHeader(hf.Name), hf.Value)\n\t}\n\tif rp.Authority == \"\" {\n\t\trp.Authority = header.Get(\"Host\")\n\t}\n\tif rp.Protocol != \"\" {\n\t\theader.Set(\":protocol\", rp.Protocol)\n\t}\n\n\trw, req, err := sc.newWriterAndRequestNoBody(st, rp)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tbodyOpen := !f.StreamEnded()\n\tif bodyOpen {\n\t\tif vv, ok := rp.Header[\"Content-Length\"]; ok {\n\t\t\tif cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {\n\t\t\t\treq.ContentLength = int64(cl)\n\t\t\t} else {\n\t\t\t\treq.ContentLength = 0\n\t\t\t}\n\t\t} else {\n\t\t\treq.ContentLength = -1\n\t\t}\n\t\treq.Body.(*requestBody).pipe = &pipe{\n\t\t\tb: &dataBuffer{expected: req.ContentLength},\n\t\t}\n\t}\n\treturn rw, req, nil\n}\n\nfunc (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp httpcommon.ServerRequestParam) (*responseWriter, *http.Request, error) {\n\tsc.serveG.check()\n\n\tvar tlsState *tls.ConnectionState // nil if not scheme https\n\tif rp.Scheme == \"https\" {\n\t\ttlsState = sc.tlsState\n\t}\n\n\tres := httpcommon.NewServerRequest(rp)\n\tif res.InvalidReason != \"\" {\n\t\treturn nil, nil, sc.countError(res.InvalidReason, streamError(st.id, ErrCodeProtocol))\n\t}\n\n\tbody := &requestBody{\n\t\tconn:          sc,\n\t\tstream:        st,\n\t\tneedsContinue: res.NeedsContinue,\n\t}\n\treq := (&http.Request{\n\t\tMethod:     rp.Method,\n\t\tURL:        res.URL,\n\t\tRemoteAddr: sc.remoteAddrStr,\n\t\tHeader:     rp.Header,\n\t\tRequestURI: res.RequestURI,\n\t\tProto:      \"HTTP/2.0\",\n\t\tProtoMajor: 2,\n\t\tProtoMinor: 0,\n\t\tTLS:        tlsState,\n\t\tHost:       rp.Authority,\n\t\tBody:       body,\n\t\tTrailer:    res.Trailer,\n\t}).WithContext(st.ctx)\n\trw := sc.newResponseWriter(st, req)\n\treturn rw, req, nil\n}\n\nfunc (sc *serverConn) newResponseWriter(st *stream, req *http.Request) *responseWriter {\n\trws := responseWriterStatePool.Get().(*responseWriterState)\n\tbwSave := rws.bw\n\t*rws = responseWriterState{} // zero all the fields\n\trws.conn = sc\n\trws.bw = bwSave\n\trws.bw.Reset(chunkWriter{rws})\n\trws.stream = st\n\trws.req = req\n\treturn &responseWriter{rws: rws}\n}\n\ntype unstartedHandler struct {\n\tstreamID uint32\n\trw       *responseWriter\n\treq      *http.Request\n\thandler  func(http.ResponseWriter, *http.Request)\n}\n\n// scheduleHandler starts a handler goroutine,\n// or schedules one to start as soon as an existing handler finishes.\nfunc (sc *serverConn) scheduleHandler(streamID uint32, rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) error {\n\tsc.serveG.check()\n\tmaxHandlers := sc.advMaxStreams\n\tif sc.curHandlers < maxHandlers {\n\t\tsc.curHandlers++\n\t\tgo sc.runHandler(rw, req, handler)\n\t\treturn nil\n\t}\n\tif len(sc.unstartedHandlers) > int(4*sc.advMaxStreams) {\n\t\treturn sc.countError(\"too_many_early_resets\", ConnectionError(ErrCodeEnhanceYourCalm))\n\t}\n\tsc.unstartedHandlers = append(sc.unstartedHandlers, unstartedHandler{\n\t\tstreamID: streamID,\n\t\trw:       rw,\n\t\treq:      req,\n\t\thandler:  handler,\n\t})\n\treturn nil\n}\n\nfunc (sc *serverConn) handlerDone() {\n\tsc.serveG.check()\n\tsc.curHandlers--\n\ti := 0\n\tmaxHandlers := sc.advMaxStreams\n\tfor ; i < len(sc.unstartedHandlers); i++ {\n\t\tu := sc.unstartedHandlers[i]\n\t\tif sc.streams[u.streamID] == nil {\n\t\t\t// This stream was reset before its goroutine had a chance to start.\n\t\t\tcontinue\n\t\t}\n\t\tif sc.curHandlers >= maxHandlers {\n\t\t\tbreak\n\t\t}\n\t\tsc.curHandlers++\n\t\tgo sc.runHandler(u.rw, u.req, u.handler)\n\t\tsc.unstartedHandlers[i] = unstartedHandler{} // don't retain references\n\t}\n\tsc.unstartedHandlers = sc.unstartedHandlers[i:]\n\tif len(sc.unstartedHandlers) == 0 {\n\t\tsc.unstartedHandlers = nil\n\t}\n}\n\n// Run on its own goroutine.\nfunc (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {\n\tdefer sc.sendServeMsg(handlerDoneMsg)\n\tdidPanic := true\n\tdefer func() {\n\t\trw.rws.stream.cancelCtx()\n\t\tif req.MultipartForm != nil {\n\t\t\treq.MultipartForm.RemoveAll()\n\t\t}\n\t\tif didPanic {\n\t\t\te := recover()\n\t\t\tsc.writeFrameFromHandler(FrameWriteRequest{\n\t\t\t\twrite:  handlerPanicRST{rw.rws.stream.id},\n\t\t\t\tstream: rw.rws.stream,\n\t\t\t})\n\t\t\t// Same as net/http:\n\t\t\tif e != nil && e != http.ErrAbortHandler {\n\t\t\t\tconst size = 64 << 10\n\t\t\t\tbuf := make([]byte, size)\n\t\t\t\tbuf = buf[:runtime.Stack(buf, false)]\n\t\t\t\tsc.logf(\"http2: panic serving %v: %v\\n%s\", sc.conn.RemoteAddr(), e, buf)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\trw.handlerDone()\n\t}()\n\thandler(rw, req)\n\tdidPanic = false\n}\n\nfunc handleHeaderListTooLong(w http.ResponseWriter, r *http.Request) {\n\t// 10.5.1 Limits on Header Block Size:\n\t// .. \"A server that receives a larger header block than it is\n\t// willing to handle can send an HTTP 431 (Request Header Fields Too\n\t// Large) status code\"\n\tconst statusRequestHeaderFieldsTooLarge = 431 // only in Go 1.6+\n\tw.WriteHeader(statusRequestHeaderFieldsTooLarge)\n\tio.WriteString(w, \"<h1>HTTP Error 431</h1><p>Request Header Field(s) Too Large</p>\")\n}\n\n// called from handler goroutines.\n// h may be nil.\nfunc (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) error {\n\tsc.serveG.checkNotOn() // NOT on\n\tvar errc chan error\n\tif headerData.h != nil {\n\t\t// If there's a header map (which we don't own), so we have to block on\n\t\t// waiting for this frame to be written, so an http.Flush mid-handler\n\t\t// writes out the correct value of keys, before a handler later potentially\n\t\t// mutates it.\n\t\terrc = sc.srv.state.getErrChan()\n\t}\n\tif err := sc.writeFrameFromHandler(FrameWriteRequest{\n\t\twrite:  headerData,\n\t\tstream: st,\n\t\tdone:   errc,\n\t}); err != nil {\n\t\treturn err\n\t}\n\tif errc != nil {\n\t\tselect {\n\t\tcase err := <-errc:\n\t\t\tsc.srv.state.putErrChan(errc)\n\t\t\treturn err\n\t\tcase <-sc.doneServing:\n\t\t\treturn errClientDisconnected\n\t\tcase <-st.cw:\n\t\t\treturn errStreamClosed\n\t\t}\n\t}\n\treturn nil\n}\n\n// called from handler goroutines.\nfunc (sc *serverConn) write100ContinueHeaders(st *stream) {\n\tsc.writeFrameFromHandler(FrameWriteRequest{\n\t\twrite:  write100ContinueHeadersFrame{st.id},\n\t\tstream: st,\n\t})\n}\n\n// A bodyReadMsg tells the server loop that the http.Handler read n\n// bytes of the DATA from the client on the given stream.\ntype bodyReadMsg struct {\n\tst *stream\n\tn  int\n}\n\n// called from handler goroutines.\n// Notes that the handler for the given stream ID read n bytes of its body\n// and schedules flow control tokens to be sent.\nfunc (sc *serverConn) noteBodyReadFromHandler(st *stream, n int, err error) {\n\tsc.serveG.checkNotOn() // NOT on\n\tif n > 0 {\n\t\tselect {\n\t\tcase sc.bodyReadCh <- bodyReadMsg{st, n}:\n\t\tcase <-sc.doneServing:\n\t\t}\n\t}\n}\n\nfunc (sc *serverConn) noteBodyRead(st *stream, n int) {\n\tsc.serveG.check()\n\tsc.sendWindowUpdate(nil, n) // conn-level\n\tif st.state != stateHalfClosedRemote && st.state != stateClosed {\n\t\t// Don't send this WINDOW_UPDATE if the stream is closed\n\t\t// remotely.\n\t\tsc.sendWindowUpdate(st, n)\n\t}\n}\n\n// st may be nil for conn-level\nfunc (sc *serverConn) sendWindowUpdate32(st *stream, n int32) {\n\tsc.sendWindowUpdate(st, int(n))\n}\n\n// st may be nil for conn-level\nfunc (sc *serverConn) sendWindowUpdate(st *stream, n int) {\n\tsc.serveG.check()\n\tvar streamID uint32\n\tvar send int32\n\tif st == nil {\n\t\tsend = sc.inflow.add(n)\n\t} else {\n\t\tstreamID = st.id\n\t\tsend = st.inflow.add(n)\n\t}\n\tif send == 0 {\n\t\treturn\n\t}\n\tsc.writeFrame(FrameWriteRequest{\n\t\twrite:  writeWindowUpdate{streamID: streamID, n: uint32(send)},\n\t\tstream: st,\n\t})\n}\n\n// requestBody is the Handler's Request.Body type.\n// Read and Close may be called concurrently.\ntype requestBody struct {\n\t_             incomparable\n\tstream        *stream\n\tconn          *serverConn\n\tcloseOnce     sync.Once // for use by Close only\n\tsawEOF        bool      // for use by Read only\n\tpipe          *pipe     // non-nil if we have an HTTP entity message body\n\tneedsContinue bool      // need to send a 100-continue\n}\n\nfunc (b *requestBody) Close() error {\n\tb.closeOnce.Do(func() {\n\t\tif b.pipe != nil {\n\t\t\tb.pipe.BreakWithError(errClosedBody)\n\t\t}\n\t})\n\treturn nil\n}\n\nfunc (b *requestBody) Read(p []byte) (n int, err error) {\n\tif b.needsContinue {\n\t\tb.needsContinue = false\n\t\tb.conn.write100ContinueHeaders(b.stream)\n\t}\n\tif b.pipe == nil || b.sawEOF {\n\t\treturn 0, io.EOF\n\t}\n\tn, err = b.pipe.Read(p)\n\tif err == io.EOF {\n\t\tb.sawEOF = true\n\t}\n\tif b.conn == nil {\n\t\treturn\n\t}\n\tb.conn.noteBodyReadFromHandler(b.stream, n, err)\n\treturn\n}\n\n// responseWriter is the http.ResponseWriter implementation. It's\n// intentionally small (1 pointer wide) to minimize garbage. The\n// responseWriterState pointer inside is zeroed at the end of a\n// request (in handlerDone) and calls on the responseWriter thereafter\n// simply crash (caller's mistake), but the much larger responseWriterState\n// and buffers are reused between multiple requests.\ntype responseWriter struct {\n\trws *responseWriterState\n}\n\n// Optional http.ResponseWriter interfaces implemented.\nvar (\n\t_ http.CloseNotifier = (*responseWriter)(nil)\n\t_ http.Flusher       = (*responseWriter)(nil)\n\t_ stringWriter       = (*responseWriter)(nil)\n)\n\ntype responseWriterState struct {\n\t// immutable within a request:\n\tstream *stream\n\treq    *http.Request\n\tconn   *serverConn\n\n\t// TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc\n\tbw *bufio.Writer // writing to a chunkWriter{this *responseWriterState}\n\n\t// mutated by http.Handler goroutine:\n\thandlerHeader http.Header // nil until called\n\tsnapHeader    http.Header // snapshot of handlerHeader at WriteHeader time\n\ttrailers      []string    // set in writeChunk\n\tstatus        int         // status code passed to WriteHeader\n\twroteHeader   bool        // WriteHeader called (explicitly or implicitly). Not necessarily sent to user yet.\n\tsentHeader    bool        // have we sent the header frame?\n\thandlerDone   bool        // handler has finished\n\n\tsentContentLen int64 // non-zero if handler set a Content-Length header\n\twroteBytes     int64\n\n\tcloseNotifierMu sync.Mutex // guards closeNotifierCh\n\tcloseNotifierCh chan bool  // nil until first used\n}\n\ntype chunkWriter struct{ rws *responseWriterState }\n\nfunc (cw chunkWriter) Write(p []byte) (n int, err error) {\n\tn, err = cw.rws.writeChunk(p)\n\tif err == errStreamClosed {\n\t\t// If writing failed because the stream has been closed,\n\t\t// return the reason it was closed.\n\t\terr = cw.rws.stream.closeErr\n\t}\n\treturn n, err\n}\n\nfunc (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) > 0 }\n\nfunc (rws *responseWriterState) hasNonemptyTrailers() bool {\n\tfor _, trailer := range rws.trailers {\n\t\tif _, ok := rws.handlerHeader[trailer]; ok {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// declareTrailer is called for each Trailer header when the\n// response header is written. It notes that a header will need to be\n// written in the trailers at the end of the response.\nfunc (rws *responseWriterState) declareTrailer(k string) {\n\tk = http.CanonicalHeaderKey(k)\n\tif !httpguts.ValidTrailerHeader(k) {\n\t\t// Forbidden by RFC 7230, section 4.1.2.\n\t\trws.conn.logf(\"ignoring invalid trailer %q\", k)\n\t\treturn\n\t}\n\tif !strSliceContains(rws.trailers, k) {\n\t\trws.trailers = append(rws.trailers, k)\n\t}\n}\n\n// writeChunk writes chunks from the bufio.Writer. But because\n// bufio.Writer may bypass its chunking, sometimes p may be\n// arbitrarily large.\n//\n// writeChunk is also responsible (on the first chunk) for sending the\n// HEADER response.\nfunc (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {\n\tif !rws.wroteHeader {\n\t\trws.writeHeader(200)\n\t}\n\n\tif rws.handlerDone {\n\t\trws.promoteUndeclaredTrailers()\n\t}\n\n\tisHeadResp := rws.req.Method == \"HEAD\"\n\tif !rws.sentHeader {\n\t\trws.sentHeader = true\n\t\tvar ctype, clen string\n\t\tif clen = rws.snapHeader.Get(\"Content-Length\"); clen != \"\" {\n\t\t\trws.snapHeader.Del(\"Content-Length\")\n\t\t\tif cl, err := strconv.ParseUint(clen, 10, 63); err == nil {\n\t\t\t\trws.sentContentLen = int64(cl)\n\t\t\t} else {\n\t\t\t\tclen = \"\"\n\t\t\t}\n\t\t}\n\t\t_, hasContentLength := rws.snapHeader[\"Content-Length\"]\n\t\tif !hasContentLength && clen == \"\" && rws.handlerDone && bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {\n\t\t\tclen = strconv.Itoa(len(p))\n\t\t}\n\t\t_, hasContentType := rws.snapHeader[\"Content-Type\"]\n\t\t// If the Content-Encoding is non-blank, we shouldn't\n\t\t// sniff the body. See Issue golang.org/issue/31753.\n\t\tce := rws.snapHeader.Get(\"Content-Encoding\")\n\t\thasCE := len(ce) > 0\n\t\tif !hasCE && !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {\n\t\t\tctype = http.DetectContentType(p)\n\t\t}\n\t\tvar date string\n\t\tif _, ok := rws.snapHeader[\"Date\"]; !ok {\n\t\t\t// TODO(bradfitz): be faster here, like net/http? measure.\n\t\t\tdate = time.Now().UTC().Format(http.TimeFormat)\n\t\t}\n\n\t\tfor _, v := range rws.snapHeader[\"Trailer\"] {\n\t\t\tforeachHeaderElement(v, rws.declareTrailer)\n\t\t}\n\n\t\t// \"Connection\" headers aren't allowed in HTTP/2 (RFC 7540, 8.1.2.2),\n\t\t// but respect \"Connection\" == \"close\" to mean sending a GOAWAY and tearing\n\t\t// down the TCP connection when idle, like we do for HTTP/1.\n\t\t// TODO: remove more Connection-specific header fields here, in addition\n\t\t// to \"Connection\".\n\t\tif _, ok := rws.snapHeader[\"Connection\"]; ok {\n\t\t\tv := rws.snapHeader.Get(\"Connection\")\n\t\t\tdelete(rws.snapHeader, \"Connection\")\n\t\t\tif v == \"close\" {\n\t\t\t\trws.conn.startGracefulShutdown()\n\t\t\t}\n\t\t}\n\n\t\tendStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp\n\t\terr = rws.conn.writeHeaders(rws.stream, &writeResHeaders{\n\t\t\tstreamID:      rws.stream.id,\n\t\t\thttpResCode:   rws.status,\n\t\t\th:             rws.snapHeader,\n\t\t\tendStream:     endStream,\n\t\t\tcontentType:   ctype,\n\t\t\tcontentLength: clen,\n\t\t\tdate:          date,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif endStream {\n\t\t\treturn 0, nil\n\t\t}\n\t}\n\tif isHeadResp {\n\t\treturn len(p), nil\n\t}\n\tif len(p) == 0 && !rws.handlerDone {\n\t\treturn 0, nil\n\t}\n\n\t// only send trailers if they have actually been defined by the\n\t// server handler.\n\thasNonemptyTrailers := rws.hasNonemptyTrailers()\n\tendStream := rws.handlerDone && !hasNonemptyTrailers\n\tif len(p) > 0 || endStream {\n\t\t// only send a 0 byte DATA frame if we're ending the stream.\n\t\tif err := rws.conn.writeDataFromHandler(rws.stream, p, endStream); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tif rws.handlerDone && hasNonemptyTrailers {\n\t\terr = rws.conn.writeHeaders(rws.stream, &writeResHeaders{\n\t\t\tstreamID:  rws.stream.id,\n\t\t\th:         rws.handlerHeader,\n\t\t\ttrailers:  rws.trailers,\n\t\t\tendStream: true,\n\t\t})\n\t\treturn len(p), err\n\t}\n\treturn len(p), nil\n}\n\n// TrailerPrefix is a magic prefix for ResponseWriter.Header map keys\n// that, if present, signals that the map entry is actually for\n// the response trailers, and not the response headers. The prefix\n// is stripped after the ServeHTTP call finishes and the values are\n// sent in the trailers.\n//\n// This mechanism is intended only for trailers that are not known\n// prior to the headers being written. If the set of trailers is fixed\n// or known before the header is written, the normal Go trailers mechanism\n// is preferred:\n//\n//\thttps://golang.org/pkg/net/http/#ResponseWriter\n//\thttps://golang.org/pkg/net/http/#example_ResponseWriter_trailers\nconst TrailerPrefix = \"Trailer:\"\n\n// promoteUndeclaredTrailers permits http.Handlers to set trailers\n// after the header has already been flushed. Because the Go\n// ResponseWriter interface has no way to set Trailers (only the\n// Header), and because we didn't want to expand the ResponseWriter\n// interface, and because nobody used trailers, and because RFC 7230\n// says you SHOULD (but not must) predeclare any trailers in the\n// header, the official ResponseWriter rules said trailers in Go must\n// be predeclared, and then we reuse the same ResponseWriter.Header()\n// map to mean both Headers and Trailers. When it's time to write the\n// Trailers, we pick out the fields of Headers that were declared as\n// trailers. That worked for a while, until we found the first major\n// user of Trailers in the wild: gRPC (using them only over http2),\n// and gRPC libraries permit setting trailers mid-stream without\n// predeclaring them. So: change of plans. We still permit the old\n// way, but we also permit this hack: if a Header() key begins with\n// \"Trailer:\", the suffix of that key is a Trailer. Because ':' is an\n// invalid token byte anyway, there is no ambiguity. (And it's already\n// filtered out) It's mildly hacky, but not terrible.\n//\n// This method runs after the Handler is done and promotes any Header\n// fields to be trailers.\nfunc (rws *responseWriterState) promoteUndeclaredTrailers() {\n\tfor k, vv := range rws.handlerHeader {\n\t\tif !strings.HasPrefix(k, TrailerPrefix) {\n\t\t\tcontinue\n\t\t}\n\t\ttrailerKey := strings.TrimPrefix(k, TrailerPrefix)\n\t\trws.declareTrailer(trailerKey)\n\t\trws.handlerHeader[http.CanonicalHeaderKey(trailerKey)] = vv\n\t}\n\n\tif len(rws.trailers) > 1 {\n\t\tsorter := sorterPool.Get().(*sorter)\n\t\tsorter.SortStrings(rws.trailers)\n\t\tsorterPool.Put(sorter)\n\t}\n}\n\nfunc (w *responseWriter) SetReadDeadline(deadline time.Time) error {\n\tst := w.rws.stream\n\tif !deadline.IsZero() && deadline.Before(time.Now()) {\n\t\t// If we're setting a deadline in the past, reset the stream immediately\n\t\t// so writes after SetWriteDeadline returns will fail.\n\t\tst.onReadTimeout()\n\t\treturn nil\n\t}\n\tw.rws.conn.sendServeMsg(func(sc *serverConn) {\n\t\tif st.readDeadline != nil {\n\t\t\tif !st.readDeadline.Stop() {\n\t\t\t\t// Deadline already exceeded, or stream has been closed.\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tif deadline.IsZero() {\n\t\t\tst.readDeadline = nil\n\t\t} else if st.readDeadline == nil {\n\t\t\tst.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout)\n\t\t} else {\n\t\t\tst.readDeadline.Reset(deadline.Sub(time.Now()))\n\t\t}\n\t})\n\treturn nil\n}\n\nfunc (w *responseWriter) SetWriteDeadline(deadline time.Time) error {\n\tst := w.rws.stream\n\tif !deadline.IsZero() && deadline.Before(time.Now()) {\n\t\t// If we're setting a deadline in the past, reset the stream immediately\n\t\t// so writes after SetWriteDeadline returns will fail.\n\t\tst.onWriteTimeout()\n\t\treturn nil\n\t}\n\tw.rws.conn.sendServeMsg(func(sc *serverConn) {\n\t\tif st.writeDeadline != nil {\n\t\t\tif !st.writeDeadline.Stop() {\n\t\t\t\t// Deadline already exceeded, or stream has been closed.\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tif deadline.IsZero() {\n\t\t\tst.writeDeadline = nil\n\t\t} else if st.writeDeadline == nil {\n\t\t\tst.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout)\n\t\t} else {\n\t\t\tst.writeDeadline.Reset(deadline.Sub(time.Now()))\n\t\t}\n\t})\n\treturn nil\n}\n\nfunc (w *responseWriter) EnableFullDuplex() error {\n\t// We always support full duplex responses, so this is a no-op.\n\treturn nil\n}\n\nfunc (w *responseWriter) Flush() {\n\tw.FlushError()\n}\n\nfunc (w *responseWriter) FlushError() error {\n\trws := w.rws\n\tif rws == nil {\n\t\tpanic(\"Header called after Handler finished\")\n\t}\n\tvar err error\n\tif rws.bw.Buffered() > 0 {\n\t\terr = rws.bw.Flush()\n\t} else {\n\t\t// The bufio.Writer won't call chunkWriter.Write\n\t\t// (writeChunk with zero bytes), so we have to do it\n\t\t// ourselves to force the HTTP response header and/or\n\t\t// final DATA frame (with END_STREAM) to be sent.\n\t\t_, err = chunkWriter{rws}.Write(nil)\n\t\tif err == nil {\n\t\t\tselect {\n\t\t\tcase <-rws.stream.cw:\n\t\t\t\terr = rws.stream.closeErr\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}\n\treturn err\n}\n\nfunc (w *responseWriter) CloseNotify() <-chan bool {\n\trws := w.rws\n\tif rws == nil {\n\t\tpanic(\"CloseNotify called after Handler finished\")\n\t}\n\trws.closeNotifierMu.Lock()\n\tch := rws.closeNotifierCh\n\tif ch == nil {\n\t\tch = make(chan bool, 1)\n\t\trws.closeNotifierCh = ch\n\t\tcw := rws.stream.cw\n\t\tgo func() {\n\t\t\tcw.Wait() // wait for close\n\t\t\tch <- true\n\t\t}()\n\t}\n\trws.closeNotifierMu.Unlock()\n\treturn ch\n}\n\nfunc (w *responseWriter) Header() http.Header {\n\trws := w.rws\n\tif rws == nil {\n\t\tpanic(\"Header called after Handler finished\")\n\t}\n\tif rws.handlerHeader == nil {\n\t\trws.handlerHeader = make(http.Header)\n\t}\n\treturn rws.handlerHeader\n}\n\n// checkWriteHeaderCode is a copy of net/http's checkWriteHeaderCode.\nfunc checkWriteHeaderCode(code int) {\n\t// Issue 22880: require valid WriteHeader status codes.\n\t// For now we only enforce that it's three digits.\n\t// In the future we might block things over 599 (600 and above aren't defined\n\t// at http://httpwg.org/specs/rfc7231.html#status.codes).\n\t// But for now any three digits.\n\t//\n\t// We used to send \"HTTP/1.1 000 0\" on the wire in responses but there's\n\t// no equivalent bogus thing we can realistically send in HTTP/2,\n\t// so we'll consistently panic instead and help people find their bugs\n\t// early. (We can't return an error from WriteHeader even if we wanted to.)\n\tif code < 100 || code > 999 {\n\t\tpanic(fmt.Sprintf(\"invalid WriteHeader code %v\", code))\n\t}\n}\n\nfunc (w *responseWriter) WriteHeader(code int) {\n\trws := w.rws\n\tif rws == nil {\n\t\tpanic(\"WriteHeader called after Handler finished\")\n\t}\n\trws.writeHeader(code)\n}\n\nfunc (rws *responseWriterState) writeHeader(code int) {\n\tif rws.wroteHeader {\n\t\treturn\n\t}\n\n\tcheckWriteHeaderCode(code)\n\n\t// Handle informational headers\n\tif code >= 100 && code <= 199 {\n\t\t// Per RFC 8297 we must not clear the current header map\n\t\th := rws.handlerHeader\n\n\t\t_, cl := h[\"Content-Length\"]\n\t\t_, te := h[\"Transfer-Encoding\"]\n\t\tif cl || te {\n\t\t\th = h.Clone()\n\t\t\th.Del(\"Content-Length\")\n\t\t\th.Del(\"Transfer-Encoding\")\n\t\t}\n\n\t\trws.conn.writeHeaders(rws.stream, &writeResHeaders{\n\t\t\tstreamID:    rws.stream.id,\n\t\t\thttpResCode: code,\n\t\t\th:           h,\n\t\t\tendStream:   rws.handlerDone && !rws.hasTrailers(),\n\t\t})\n\n\t\treturn\n\t}\n\n\trws.wroteHeader = true\n\trws.status = code\n\tif len(rws.handlerHeader) > 0 {\n\t\trws.snapHeader = cloneHeader(rws.handlerHeader)\n\t}\n}\n\nfunc cloneHeader(h http.Header) http.Header {\n\th2 := make(http.Header, len(h))\n\tfor k, vv := range h {\n\t\tvv2 := make([]string, len(vv))\n\t\tcopy(vv2, vv)\n\t\th2[k] = vv2\n\t}\n\treturn h2\n}\n\n// The Life Of A Write is like this:\n//\n// * Handler calls w.Write or w.WriteString ->\n// * -> rws.bw (*bufio.Writer) ->\n// * (Handler might call Flush)\n// * -> chunkWriter{rws}\n// * -> responseWriterState.writeChunk(p []byte)\n// * -> responseWriterState.writeChunk (most of the magic; see comment there)\nfunc (w *responseWriter) Write(p []byte) (n int, err error) {\n\treturn w.write(len(p), p, \"\")\n}\n\nfunc (w *responseWriter) WriteString(s string) (n int, err error) {\n\treturn w.write(len(s), nil, s)\n}\n\n// either dataB or dataS is non-zero.\nfunc (w *responseWriter) write(lenData int, dataB []byte, dataS string) (n int, err error) {\n\trws := w.rws\n\tif rws == nil {\n\t\tpanic(\"Write called after Handler finished\")\n\t}\n\tif !rws.wroteHeader {\n\t\tw.WriteHeader(200)\n\t}\n\tif !bodyAllowedForStatus(rws.status) {\n\t\treturn 0, http.ErrBodyNotAllowed\n\t}\n\trws.wroteBytes += int64(len(dataB)) + int64(len(dataS)) // only one can be set\n\tif rws.sentContentLen != 0 && rws.wroteBytes > rws.sentContentLen {\n\t\t// TODO: send a RST_STREAM\n\t\treturn 0, errors.New(\"http2: handler wrote more than declared Content-Length\")\n\t}\n\n\tif dataB != nil {\n\t\treturn rws.bw.Write(dataB)\n\t} else {\n\t\treturn rws.bw.WriteString(dataS)\n\t}\n}\n\nfunc (w *responseWriter) handlerDone() {\n\trws := w.rws\n\trws.handlerDone = true\n\tw.Flush()\n\tw.rws = nil\n\tresponseWriterStatePool.Put(rws)\n}\n\n// Push errors.\nvar (\n\tErrRecursivePush    = errors.New(\"http2: recursive push not allowed\")\n\tErrPushLimitReached = errors.New(\"http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS\")\n)\n\nvar _ http.Pusher = (*responseWriter)(nil)\n\nfunc (w *responseWriter) Push(target string, opts *http.PushOptions) error {\n\tst := w.rws.stream\n\tsc := st.sc\n\tsc.serveG.checkNotOn()\n\n\t// No recursive pushes: \"PUSH_PROMISE frames MUST only be sent on a peer-initiated stream.\"\n\t// http://tools.ietf.org/html/rfc7540#section-6.6\n\tif st.isPushed() {\n\t\treturn ErrRecursivePush\n\t}\n\n\tif opts == nil {\n\t\topts = new(http.PushOptions)\n\t}\n\n\t// Default options.\n\tif opts.Method == \"\" {\n\t\topts.Method = \"GET\"\n\t}\n\tif opts.Header == nil {\n\t\topts.Header = http.Header{}\n\t}\n\twantScheme := \"http\"\n\tif w.rws.req.TLS != nil {\n\t\twantScheme = \"https\"\n\t}\n\n\t// Validate the request.\n\tu, err := url.Parse(target)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif u.Scheme == \"\" {\n\t\tif !strings.HasPrefix(target, \"/\") {\n\t\t\treturn fmt.Errorf(\"target must be an absolute URL or an absolute path: %q\", target)\n\t\t}\n\t\tu.Scheme = wantScheme\n\t\tu.Host = w.rws.req.Host\n\t} else {\n\t\tif u.Scheme != wantScheme {\n\t\t\treturn fmt.Errorf(\"cannot push URL with scheme %q from request with scheme %q\", u.Scheme, wantScheme)\n\t\t}\n\t\tif u.Host == \"\" {\n\t\t\treturn errors.New(\"URL must have a host\")\n\t\t}\n\t}\n\tfor k := range opts.Header {\n\t\tif strings.HasPrefix(k, \":\") {\n\t\t\treturn fmt.Errorf(\"promised request headers cannot include pseudo header %q\", k)\n\t\t}\n\t\t// These headers are meaningful only if the request has a body,\n\t\t// but PUSH_PROMISE requests cannot have a body.\n\t\t// http://tools.ietf.org/html/rfc7540#section-8.2\n\t\t// Also disallow Host, since the promised URL must be absolute.\n\t\tif asciiEqualFold(k, \"content-length\") ||\n\t\t\tasciiEqualFold(k, \"content-encoding\") ||\n\t\t\tasciiEqualFold(k, \"trailer\") ||\n\t\t\tasciiEqualFold(k, \"te\") ||\n\t\t\tasciiEqualFold(k, \"expect\") ||\n\t\t\tasciiEqualFold(k, \"host\") {\n\t\t\treturn fmt.Errorf(\"promised request headers cannot include %q\", k)\n\t\t}\n\t}\n\tif err := checkValidHTTP2RequestHeaders(opts.Header); err != nil {\n\t\treturn err\n\t}\n\n\t// The RFC effectively limits promised requests to GET and HEAD:\n\t// \"Promised requests MUST be cacheable [GET, HEAD, or POST], and MUST be safe [GET or HEAD]\"\n\t// http://tools.ietf.org/html/rfc7540#section-8.2\n\tif opts.Method != \"GET\" && opts.Method != \"HEAD\" {\n\t\treturn fmt.Errorf(\"method %q must be GET or HEAD\", opts.Method)\n\t}\n\n\tmsg := &startPushRequest{\n\t\tparent: st,\n\t\tmethod: opts.Method,\n\t\turl:    u,\n\t\theader: cloneHeader(opts.Header),\n\t\tdone:   sc.srv.state.getErrChan(),\n\t}\n\n\tselect {\n\tcase <-sc.doneServing:\n\t\treturn errClientDisconnected\n\tcase <-st.cw:\n\t\treturn errStreamClosed\n\tcase sc.serveMsgCh <- msg:\n\t}\n\n\tselect {\n\tcase <-sc.doneServing:\n\t\treturn errClientDisconnected\n\tcase <-st.cw:\n\t\treturn errStreamClosed\n\tcase err := <-msg.done:\n\t\tsc.srv.state.putErrChan(msg.done)\n\t\treturn err\n\t}\n}\n\ntype startPushRequest struct {\n\tparent *stream\n\tmethod string\n\turl    *url.URL\n\theader http.Header\n\tdone   chan error\n}\n\nfunc (sc *serverConn) startPush(msg *startPushRequest) {\n\tsc.serveG.check()\n\n\t// http://tools.ietf.org/html/rfc7540#section-6.6.\n\t// PUSH_PROMISE frames MUST only be sent on a peer-initiated stream that\n\t// is in either the \"open\" or \"half-closed (remote)\" state.\n\tif msg.parent.state != stateOpen && msg.parent.state != stateHalfClosedRemote {\n\t\t// responseWriter.Push checks that the stream is peer-initiated.\n\t\tmsg.done <- errStreamClosed\n\t\treturn\n\t}\n\n\t// http://tools.ietf.org/html/rfc7540#section-6.6.\n\tif !sc.pushEnabled {\n\t\tmsg.done <- http.ErrNotSupported\n\t\treturn\n\t}\n\n\t// PUSH_PROMISE frames must be sent in increasing order by stream ID, so\n\t// we allocate an ID for the promised stream lazily, when the PUSH_PROMISE\n\t// is written. Once the ID is allocated, we start the request handler.\n\tallocatePromisedID := func() (uint32, error) {\n\t\tsc.serveG.check()\n\n\t\t// Check this again, just in case. Technically, we might have received\n\t\t// an updated SETTINGS by the time we got around to writing this frame.\n\t\tif !sc.pushEnabled {\n\t\t\treturn 0, http.ErrNotSupported\n\t\t}\n\t\t// http://tools.ietf.org/html/rfc7540#section-6.5.2.\n\t\tif sc.curPushedStreams+1 > sc.clientMaxStreams {\n\t\t\treturn 0, ErrPushLimitReached\n\t\t}\n\n\t\t// http://tools.ietf.org/html/rfc7540#section-5.1.1.\n\t\t// Streams initiated by the server MUST use even-numbered identifiers.\n\t\t// A server that is unable to establish a new stream identifier can send a GOAWAY\n\t\t// frame so that the client is forced to open a new connection for new streams.\n\t\tif sc.maxPushPromiseID+2 >= 1<<31 {\n\t\t\tsc.startGracefulShutdownInternal()\n\t\t\treturn 0, ErrPushLimitReached\n\t\t}\n\t\tsc.maxPushPromiseID += 2\n\t\tpromisedID := sc.maxPushPromiseID\n\n\t\t// http://tools.ietf.org/html/rfc7540#section-8.2.\n\t\t// Strictly speaking, the new stream should start in \"reserved (local)\", then\n\t\t// transition to \"half closed (remote)\" after sending the initial HEADERS, but\n\t\t// we start in \"half closed (remote)\" for simplicity.\n\t\t// See further comments at the definition of stateHalfClosedRemote.\n\t\tpromised := sc.newStream(promisedID, msg.parent.id, stateHalfClosedRemote, defaultRFC9218Priority(sc.priorityAware && !sc.hasIntermediary))\n\t\trw, req, err := sc.newWriterAndRequestNoBody(promised, httpcommon.ServerRequestParam{\n\t\t\tMethod:    msg.method,\n\t\t\tScheme:    msg.url.Scheme,\n\t\t\tAuthority: msg.url.Host,\n\t\t\tPath:      msg.url.RequestURI(),\n\t\t\tHeader:    cloneHeader(msg.header), // clone since handler runs concurrently with writing the PUSH_PROMISE\n\t\t})\n\t\tif err != nil {\n\t\t\t// Should not happen, since we've already validated msg.url.\n\t\t\tpanic(fmt.Sprintf(\"newWriterAndRequestNoBody(%+v): %v\", msg.url, err))\n\t\t}\n\n\t\tsc.curHandlers++\n\t\tgo sc.runHandler(rw, req, sc.handler.ServeHTTP)\n\t\treturn promisedID, nil\n\t}\n\n\tsc.writeFrame(FrameWriteRequest{\n\t\twrite: &writePushPromise{\n\t\t\tstreamID:           msg.parent.id,\n\t\t\tmethod:             msg.method,\n\t\t\turl:                msg.url,\n\t\t\th:                  msg.header,\n\t\t\tallocatePromisedID: allocatePromisedID,\n\t\t},\n\t\tstream: msg.parent,\n\t\tdone:   msg.done,\n\t})\n}\n\n// foreachHeaderElement splits v according to the \"#rule\" construction\n// in RFC 7230 section 7 and calls fn for each non-empty element.\nfunc foreachHeaderElement(v string, fn func(string)) {\n\tv = textproto.TrimString(v)\n\tif v == \"\" {\n\t\treturn\n\t}\n\tif !strings.Contains(v, \",\") {\n\t\tfn(v)\n\t\treturn\n\t}\n\tfor _, f := range strings.Split(v, \",\") {\n\t\tif f = textproto.TrimString(f); f != \"\" {\n\t\t\tfn(f)\n\t\t}\n\t}\n}\n\n// From http://httpwg.org/specs/rfc7540.html#rfc.section.8.1.2.2\nvar connHeaders = []string{\n\t\"Connection\",\n\t\"Keep-Alive\",\n\t\"Proxy-Connection\",\n\t\"Transfer-Encoding\",\n\t\"Upgrade\",\n}\n\n// checkValidHTTP2RequestHeaders checks whether h is a valid HTTP/2 request,\n// per RFC 7540 Section 8.1.2.2.\n// The returned error is reported to users.\nfunc checkValidHTTP2RequestHeaders(h http.Header) error {\n\tfor _, k := range connHeaders {\n\t\tif _, ok := h[k]; ok {\n\t\t\treturn fmt.Errorf(\"request header %q is not valid in HTTP/2\", k)\n\t\t}\n\t}\n\tte := h[\"Te\"]\n\tif len(te) > 0 && (len(te) > 1 || (te[0] != \"trailers\" && te[0] != \"\")) {\n\t\treturn errors.New(`request header \"TE\" may only be \"trailers\" in HTTP/2`)\n\t}\n\treturn nil\n}\n\nfunc new400Handler(err error) http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\t\thttp.Error(w, err.Error(), http.StatusBadRequest)\n\t}\n}\n\n// h1ServerKeepAlivesDisabled reports whether hs has its keep-alives\n// disabled. See comments on h1ServerShutdownChan above for why\n// the code is written this way.\nfunc h1ServerKeepAlivesDisabled(hs *http.Server) bool {\n\tvar x interface{} = hs\n\ttype I interface {\n\t\tdoKeepAlives() bool\n\t}\n\tif hs, ok := x.(I); ok {\n\t\treturn !hs.doKeepAlives()\n\t}\n\treturn false\n}\n\nfunc (sc *serverConn) countError(name string, err error) error {\n\tif sc == nil || sc.srv == nil {\n\t\treturn err\n\t}\n\tf := sc.countErrorFunc\n\tif f == nil {\n\t\treturn err\n\t}\n\tvar typ string\n\tvar code ErrCode\n\tswitch e := err.(type) {\n\tcase ConnectionError:\n\t\ttyp = \"conn\"\n\t\tcode = ErrCode(e)\n\tcase StreamError:\n\t\ttyp = \"stream\"\n\t\tcode = ErrCode(e.Code)\n\tdefault:\n\t\treturn err\n\t}\n\tcodeStr := errCodeName[code]\n\tif codeStr == \"\" {\n\t\tcodeStr = strconv.Itoa(int(code))\n\t}\n\tf(fmt.Sprintf(\"%s_%s_%s\", typ, codeStr, name))\n\treturn err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/transport.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Transport code.\n\npackage http2\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"compress/flate\"\n\t\"compress/gzip\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"log\"\n\t\"math\"\n\t\"math/bits\"\n\tmathrand \"math/rand\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/http/httptrace\"\n\t\"net/textproto\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"golang.org/x/net/http/httpguts\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"golang.org/x/net/idna\"\n\t\"golang.org/x/net/internal/httpcommon\"\n)\n\nconst (\n\t// transportDefaultConnFlow is how many connection-level flow control\n\t// tokens we give the server at start-up, past the default 64k.\n\ttransportDefaultConnFlow = 1 << 30\n\n\t// transportDefaultStreamFlow is how many stream-level flow\n\t// control tokens we announce to the peer, and how many bytes\n\t// we buffer per stream.\n\ttransportDefaultStreamFlow = 4 << 20\n\n\tdefaultUserAgent = \"Go-http-client/2.0\"\n\n\t// initialMaxConcurrentStreams is a connections maxConcurrentStreams until\n\t// it's received servers initial SETTINGS frame, which corresponds with the\n\t// spec's minimum recommended value.\n\tinitialMaxConcurrentStreams = 100\n\n\t// defaultMaxConcurrentStreams is a connections default maxConcurrentStreams\n\t// if the server doesn't include one in its initial SETTINGS frame.\n\tdefaultMaxConcurrentStreams = 1000\n)\n\n// Transport is an HTTP/2 Transport.\n//\n// A Transport internally caches connections to servers. It is safe\n// for concurrent use by multiple goroutines.\ntype Transport struct {\n\t// DialTLSContext specifies an optional dial function with context for\n\t// creating TLS connections for requests.\n\t//\n\t// If DialTLSContext and DialTLS is nil, tls.Dial is used.\n\t//\n\t// If the returned net.Conn has a ConnectionState method like tls.Conn,\n\t// it will be used to set http.Response.TLS.\n\tDialTLSContext func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error)\n\n\t// DialTLS specifies an optional dial function for creating\n\t// TLS connections for requests.\n\t//\n\t// If DialTLSContext and DialTLS is nil, tls.Dial is used.\n\t//\n\t// Deprecated: Use DialTLSContext instead, which allows the transport\n\t// to cancel dials as soon as they are no longer needed.\n\t// If both are set, DialTLSContext takes priority.\n\tDialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error)\n\n\t// TLSClientConfig specifies the TLS configuration to use with\n\t// tls.Client. If nil, the default configuration is used.\n\tTLSClientConfig *tls.Config\n\n\t// ConnPool optionally specifies an alternate connection pool to use.\n\t// If nil, the default is used.\n\tConnPool ClientConnPool\n\n\t// DisableCompression, if true, prevents the Transport from\n\t// requesting compression with an \"Accept-Encoding: gzip\"\n\t// request header when the Request contains no existing\n\t// Accept-Encoding value. If the Transport requests gzip on\n\t// its own and gets a gzipped response, it's transparently\n\t// decoded in the Response.Body. However, if the user\n\t// explicitly requested gzip it is not automatically\n\t// uncompressed.\n\tDisableCompression bool\n\n\t// AllowHTTP, if true, permits HTTP/2 requests using the insecure,\n\t// plain-text \"http\" scheme. Note that this does not enable h2c support.\n\tAllowHTTP bool\n\n\t// MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to\n\t// send in the initial settings frame. It is how many bytes\n\t// of response headers are allowed. Unlike the http2 spec, zero here\n\t// means to use a default limit (currently 10MB). If you actually\n\t// want to advertise an unlimited value to the peer, Transport\n\t// interprets the highest possible value here (0xffffffff or 1<<32-1)\n\t// to mean no limit.\n\tMaxHeaderListSize uint32\n\n\t// MaxReadFrameSize is the http2 SETTINGS_MAX_FRAME_SIZE to send in the\n\t// initial settings frame. It is the size in bytes of the largest frame\n\t// payload that the sender is willing to receive. If 0, no setting is\n\t// sent, and the value is provided by the peer, which should be 16384\n\t// according to the spec:\n\t// https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2.\n\t// Values are bounded in the range 16k to 16M.\n\tMaxReadFrameSize uint32\n\n\t// MaxDecoderHeaderTableSize optionally specifies the http2\n\t// SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It\n\t// informs the remote endpoint of the maximum size of the header compression\n\t// table used to decode header blocks, in octets. If zero, the default value\n\t// of 4096 is used.\n\tMaxDecoderHeaderTableSize uint32\n\n\t// MaxEncoderHeaderTableSize optionally specifies an upper limit for the\n\t// header compression table used for encoding request headers. Received\n\t// SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,\n\t// the default value of 4096 is used.\n\tMaxEncoderHeaderTableSize uint32\n\n\t// StrictMaxConcurrentStreams controls whether the server's\n\t// SETTINGS_MAX_CONCURRENT_STREAMS should be respected\n\t// globally. If false, new TCP connections are created to the\n\t// server as needed to keep each under the per-connection\n\t// SETTINGS_MAX_CONCURRENT_STREAMS limit. If true, the\n\t// server's SETTINGS_MAX_CONCURRENT_STREAMS is interpreted as\n\t// a global limit and callers of RoundTrip block when needed,\n\t// waiting for their turn.\n\tStrictMaxConcurrentStreams bool\n\n\t// IdleConnTimeout is the maximum amount of time an idle\n\t// (keep-alive) connection will remain idle before closing\n\t// itself.\n\t// Zero means no limit.\n\tIdleConnTimeout time.Duration\n\n\t// ReadIdleTimeout is the timeout after which a health check using ping\n\t// frame will be carried out if no frame is received on the connection.\n\t// Note that a ping response will is considered a received frame, so if\n\t// there is no other traffic on the connection, the health check will\n\t// be performed every ReadIdleTimeout interval.\n\t// If zero, no health check is performed.\n\tReadIdleTimeout time.Duration\n\n\t// PingTimeout is the timeout after which the connection will be closed\n\t// if a response to Ping is not received.\n\t// Defaults to 15s.\n\tPingTimeout time.Duration\n\n\t// WriteByteTimeout is the timeout after which the connection will be\n\t// closed no data can be written to it. The timeout begins when data is\n\t// available to write, and is extended whenever any bytes are written.\n\tWriteByteTimeout time.Duration\n\n\t// CountError, if non-nil, is called on HTTP/2 transport errors.\n\t// It's intended to increment a metric for monitoring, such\n\t// as an expvar or Prometheus metric.\n\t// The errType consists of only ASCII word characters.\n\tCountError func(errType string)\n\n\t// t1, if non-nil, is the standard library Transport using\n\t// this transport. Its settings are used (but not its\n\t// RoundTrip method, etc).\n\tt1 *http.Transport\n\n\tconnPoolOnce  sync.Once\n\tconnPoolOrDef ClientConnPool // non-nil version of ConnPool\n\n\t*transportTestHooks\n}\n\n// Hook points used for testing.\n// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations.\n// Inside tests, see the testSyncHooks function docs.\n\ntype transportTestHooks struct {\n\tnewclientconn func(*ClientConn)\n}\n\nfunc (t *Transport) maxHeaderListSize() uint32 {\n\tn := int64(t.MaxHeaderListSize)\n\tif t.t1 != nil && t.t1.MaxResponseHeaderBytes != 0 {\n\t\tn = t.t1.MaxResponseHeaderBytes\n\t\tif n > 0 {\n\t\t\tn = adjustHTTP1MaxHeaderSize(n)\n\t\t}\n\t}\n\tif n <= 0 {\n\t\treturn 10 << 20\n\t}\n\tif n >= 0xffffffff {\n\t\treturn 0\n\t}\n\treturn uint32(n)\n}\n\nfunc (t *Transport) disableCompression() bool {\n\treturn t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)\n}\n\n// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2.\n// It returns an error if t1 has already been HTTP/2-enabled.\n//\n// Use ConfigureTransports instead to configure the HTTP/2 Transport.\nfunc ConfigureTransport(t1 *http.Transport) error {\n\t_, err := ConfigureTransports(t1)\n\treturn err\n}\n\n// ConfigureTransports configures a net/http HTTP/1 Transport to use HTTP/2.\n// It returns a new HTTP/2 Transport for further configuration.\n// It returns an error if t1 has already been HTTP/2-enabled.\nfunc ConfigureTransports(t1 *http.Transport) (*Transport, error) {\n\treturn configureTransports(t1)\n}\n\nfunc configureTransports(t1 *http.Transport) (*Transport, error) {\n\tconnPool := new(clientConnPool)\n\tt2 := &Transport{\n\t\tConnPool: noDialClientConnPool{connPool},\n\t\tt1:       t1,\n\t}\n\tconnPool.t = t2\n\tif err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil {\n\t\treturn nil, err\n\t}\n\tif t1.TLSClientConfig == nil {\n\t\tt1.TLSClientConfig = new(tls.Config)\n\t}\n\tif !strSliceContains(t1.TLSClientConfig.NextProtos, \"h2\") {\n\t\tt1.TLSClientConfig.NextProtos = append([]string{\"h2\"}, t1.TLSClientConfig.NextProtos...)\n\t}\n\tif !strSliceContains(t1.TLSClientConfig.NextProtos, \"http/1.1\") {\n\t\tt1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, \"http/1.1\")\n\t}\n\tupgradeFn := func(scheme, authority string, c net.Conn) http.RoundTripper {\n\t\taddr := authorityAddr(scheme, authority)\n\t\tif used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil {\n\t\t\tgo c.Close()\n\t\t\treturn erringRoundTripper{err}\n\t\t} else if !used {\n\t\t\t// Turns out we don't need this c.\n\t\t\t// For example, two goroutines made requests to the same host\n\t\t\t// at the same time, both kicking off TCP dials. (since protocol\n\t\t\t// was unknown)\n\t\t\tgo c.Close()\n\t\t}\n\t\tif scheme == \"http\" {\n\t\t\treturn (*unencryptedTransport)(t2)\n\t\t}\n\t\treturn t2\n\t}\n\tif t1.TLSNextProto == nil {\n\t\tt1.TLSNextProto = make(map[string]func(string, *tls.Conn) http.RoundTripper)\n\t}\n\tt1.TLSNextProto[NextProtoTLS] = func(authority string, c *tls.Conn) http.RoundTripper {\n\t\treturn upgradeFn(\"https\", authority, c)\n\t}\n\t// The \"unencrypted_http2\" TLSNextProto key is used to pass off non-TLS HTTP/2 conns.\n\tt1.TLSNextProto[nextProtoUnencryptedHTTP2] = func(authority string, c *tls.Conn) http.RoundTripper {\n\t\tnc, err := unencryptedNetConnFromTLSConn(c)\n\t\tif err != nil {\n\t\t\tgo c.Close()\n\t\t\treturn erringRoundTripper{err}\n\t\t}\n\t\treturn upgradeFn(\"http\", authority, nc)\n\t}\n\treturn t2, nil\n}\n\n// unencryptedTransport is a Transport with a RoundTrip method that\n// always permits http:// URLs.\ntype unencryptedTransport Transport\n\nfunc (t *unencryptedTransport) RoundTrip(req *http.Request) (*http.Response, error) {\n\treturn (*Transport)(t).RoundTripOpt(req, RoundTripOpt{allowHTTP: true})\n}\n\nfunc (t *Transport) connPool() ClientConnPool {\n\tt.connPoolOnce.Do(t.initConnPool)\n\treturn t.connPoolOrDef\n}\n\nfunc (t *Transport) initConnPool() {\n\tif t.ConnPool != nil {\n\t\tt.connPoolOrDef = t.ConnPool\n\t} else {\n\t\tt.connPoolOrDef = &clientConnPool{t: t}\n\t}\n}\n\n// ClientConn is the state of a single HTTP/2 client connection to an\n// HTTP/2 server.\ntype ClientConn struct {\n\tt             *Transport\n\ttconn         net.Conn             // usually *tls.Conn, except specialized impls\n\ttlsState      *tls.ConnectionState // nil only for specialized impls\n\tatomicReused  uint32               // whether conn is being reused; atomic\n\tsingleUse     bool                 // whether being used for a single http.Request\n\tgetConnCalled bool                 // used by clientConnPool\n\n\t// readLoop goroutine fields:\n\treaderDone chan struct{} // closed on error\n\treaderErr  error         // set before readerDone is closed\n\n\tidleTimeout time.Duration // or 0 for never\n\tidleTimer   *time.Timer\n\n\tmu               sync.Mutex // guards following\n\tcond             *sync.Cond // hold mu; broadcast on flow/closed changes\n\tflow             outflow    // our conn-level flow control quota (cs.outflow is per stream)\n\tinflow           inflow     // peer's conn-level flow control\n\tdoNotReuse       bool       // whether conn is marked to not be reused for any future requests\n\tclosing          bool\n\tclosed           bool\n\tclosedOnIdle     bool                     // true if conn was closed for idleness\n\tseenSettings     bool                     // true if we've seen a settings frame, false otherwise\n\tseenSettingsChan chan struct{}            // closed when seenSettings is true or frame reading fails\n\twantSettingsAck  bool                     // we sent a SETTINGS frame and haven't heard back\n\tgoAway           *GoAwayFrame             // if non-nil, the GoAwayFrame we received\n\tgoAwayDebug      string                   // goAway frame's debug data, retained as a string\n\tstreams          map[uint32]*clientStream // client-initiated\n\tstreamsReserved  int                      // incr by ReserveNewRequest; decr on RoundTrip\n\tnextStreamID     uint32\n\tpendingRequests  int                       // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams\n\tpings            map[[8]byte]chan struct{} // in flight ping data to notification channel\n\tbr               *bufio.Reader\n\tlastActive       time.Time\n\tlastIdle         time.Time // time last idle\n\t// Settings from peer: (also guarded by wmu)\n\tmaxFrameSize                uint32\n\tmaxConcurrentStreams        uint32\n\tpeerMaxHeaderListSize       uint64\n\tpeerMaxHeaderTableSize      uint32\n\tinitialWindowSize           uint32\n\tinitialStreamRecvWindowSize int32\n\treadIdleTimeout             time.Duration\n\tpingTimeout                 time.Duration\n\textendedConnectAllowed      bool\n\tstrictMaxConcurrentStreams  bool\n\n\t// rstStreamPingsBlocked works around an unfortunate gRPC behavior.\n\t// gRPC strictly limits the number of PING frames that it will receive.\n\t// The default is two pings per two hours, but the limit resets every time\n\t// the gRPC endpoint sends a HEADERS or DATA frame. See golang/go#70575.\n\t//\n\t// rstStreamPingsBlocked is set after receiving a response to a PING frame\n\t// bundled with an RST_STREAM (see pendingResets below), and cleared after\n\t// receiving a HEADERS or DATA frame.\n\trstStreamPingsBlocked bool\n\n\t// pendingResets is the number of RST_STREAM frames we have sent to the peer,\n\t// without confirming that the peer has received them. When we send a RST_STREAM,\n\t// we bundle it with a PING frame, unless a PING is already in flight. We count\n\t// the reset stream against the connection's concurrency limit until we get\n\t// a PING response. This limits the number of requests we'll try to send to a\n\t// completely unresponsive connection.\n\tpendingResets int\n\n\t// readBeforeStreamID is the smallest stream ID that has not been followed by\n\t// a frame read from the peer. We use this to determine when a request may\n\t// have been sent to a completely unresponsive connection:\n\t// If the request ID is less than readBeforeStreamID, then we have had some\n\t// indication of life on the connection since sending the request.\n\treadBeforeStreamID uint32\n\n\t// reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.\n\t// Write to reqHeaderMu to lock it, read from it to unlock.\n\t// Lock reqmu BEFORE mu or wmu.\n\treqHeaderMu chan struct{}\n\n\t// internalStateHook reports state changes back to the net/http.ClientConn.\n\t// Note that this is different from the user state hook registered by\n\t// net/http.ClientConn.SetStateHook: The internal hook calls ClientConn,\n\t// which calls the user hook.\n\tinternalStateHook func()\n\n\t// wmu is held while writing.\n\t// Acquire BEFORE mu when holding both, to avoid blocking mu on network writes.\n\t// Only acquire both at the same time when changing peer settings.\n\twmu  sync.Mutex\n\tbw   *bufio.Writer\n\tfr   *Framer\n\twerr error        // first write error that has occurred\n\thbuf bytes.Buffer // HPACK encoder writes into this\n\thenc *hpack.Encoder\n}\n\n// clientStream is the state for a single HTTP/2 stream. One of these\n// is created for each Transport.RoundTrip call.\ntype clientStream struct {\n\tcc *ClientConn\n\n\t// Fields of Request that we may access even after the response body is closed.\n\tctx       context.Context\n\treqCancel <-chan struct{}\n\n\ttrace         *httptrace.ClientTrace // or nil\n\tID            uint32\n\tbufPipe       pipe // buffered pipe with the flow-controlled response payload\n\trequestedGzip bool\n\tisHead        bool\n\n\tabortOnce sync.Once\n\tabort     chan struct{} // closed to signal stream should end immediately\n\tabortErr  error         // set if abort is closed\n\n\tpeerClosed chan struct{} // closed when the peer sends an END_STREAM flag\n\tdonec      chan struct{} // closed after the stream is in the closed state\n\ton100      chan struct{} // buffered; written to if a 100 is received\n\n\trespHeaderRecv chan struct{}  // closed when headers are received\n\tres            *http.Response // set if respHeaderRecv is closed\n\n\tflow        outflow // guarded by cc.mu\n\tinflow      inflow  // guarded by cc.mu\n\tbytesRemain int64   // -1 means unknown; owned by transportResponseBody.Read\n\treadErr     error   // sticky read error; owned by transportResponseBody.Read\n\n\treqBody              io.ReadCloser\n\treqBodyContentLength int64         // -1 means unknown\n\treqBodyClosed        chan struct{} // guarded by cc.mu; non-nil on Close, closed when done\n\n\t// owned by writeRequest:\n\tsentEndStream bool // sent an END_STREAM flag to the peer\n\tsentHeaders   bool\n\n\t// owned by clientConnReadLoop:\n\tfirstByte       bool  // got the first response byte\n\tpastHeaders     bool  // got first MetaHeadersFrame (actual headers)\n\tpastTrailers    bool  // got optional second MetaHeadersFrame (trailers)\n\treadClosed      bool  // peer sent an END_STREAM flag\n\treadAborted     bool  // read loop reset the stream\n\ttotalHeaderSize int64 // total size of 1xx headers seen\n\n\ttrailer    http.Header  // accumulated trailers\n\tresTrailer *http.Header // client's Response.Trailer\n}\n\nvar got1xxFuncForTests func(int, textproto.MIMEHeader) error\n\n// get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func,\n// if any. It returns nil if not set or if the Go version is too old.\nfunc (cs *clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error {\n\tif fn := got1xxFuncForTests; fn != nil {\n\t\treturn fn\n\t}\n\treturn traceGot1xxResponseFunc(cs.trace)\n}\n\nfunc (cs *clientStream) abortStream(err error) {\n\tcs.cc.mu.Lock()\n\tdefer cs.cc.mu.Unlock()\n\tcs.abortStreamLocked(err)\n}\n\nfunc (cs *clientStream) abortStreamLocked(err error) {\n\tcs.abortOnce.Do(func() {\n\t\tcs.abortErr = err\n\t\tclose(cs.abort)\n\t})\n\tif cs.reqBody != nil {\n\t\tcs.closeReqBodyLocked()\n\t}\n\t// TODO(dneil): Clean up tests where cs.cc.cond is nil.\n\tif cs.cc.cond != nil {\n\t\t// Wake up writeRequestBody if it is waiting on flow control.\n\t\tcs.cc.cond.Broadcast()\n\t}\n}\n\nfunc (cs *clientStream) abortRequestBodyWrite() {\n\tcc := cs.cc\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\tif cs.reqBody != nil && cs.reqBodyClosed == nil {\n\t\tcs.closeReqBodyLocked()\n\t\tcc.cond.Broadcast()\n\t}\n}\n\nfunc (cs *clientStream) closeReqBodyLocked() {\n\tif cs.reqBodyClosed != nil {\n\t\treturn\n\t}\n\tcs.reqBodyClosed = make(chan struct{})\n\treqBodyClosed := cs.reqBodyClosed\n\tgo func() {\n\t\tcs.reqBody.Close()\n\t\tclose(reqBodyClosed)\n\t}()\n}\n\ntype stickyErrWriter struct {\n\tconn    net.Conn\n\ttimeout time.Duration\n\terr     *error\n}\n\nfunc (sew stickyErrWriter) Write(p []byte) (n int, err error) {\n\tif *sew.err != nil {\n\t\treturn 0, *sew.err\n\t}\n\tn, err = writeWithByteTimeout(sew.conn, sew.timeout, p)\n\t*sew.err = err\n\treturn n, err\n}\n\n// noCachedConnError is the concrete type of ErrNoCachedConn, which\n// needs to be detected by net/http regardless of whether it's its\n// bundled version (in h2_bundle.go with a rewritten type name) or\n// from a user's x/net/http2. As such, as it has a unique method name\n// (IsHTTP2NoCachedConnError) that net/http sniffs for via func\n// isNoCachedConnError.\ntype noCachedConnError struct{}\n\nfunc (noCachedConnError) IsHTTP2NoCachedConnError() {}\nfunc (noCachedConnError) Error() string             { return \"http2: no cached connection was available\" }\n\n// isNoCachedConnError reports whether err is of type noCachedConnError\n// or its equivalent renamed type in net/http2's h2_bundle.go. Both types\n// may coexist in the same running program.\nfunc isNoCachedConnError(err error) bool {\n\t_, ok := err.(interface{ IsHTTP2NoCachedConnError() })\n\treturn ok\n}\n\nvar ErrNoCachedConn error = noCachedConnError{}\n\n// RoundTripOpt are options for the Transport.RoundTripOpt method.\ntype RoundTripOpt struct {\n\t// OnlyCachedConn controls whether RoundTripOpt may\n\t// create a new TCP connection. If set true and\n\t// no cached connection is available, RoundTripOpt\n\t// will return ErrNoCachedConn.\n\tOnlyCachedConn bool\n\n\tallowHTTP bool // allow http:// URLs\n}\n\nfunc (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {\n\treturn t.RoundTripOpt(req, RoundTripOpt{})\n}\n\n// authorityAddr returns a given authority (a host/IP, or host:port / ip:port)\n// and returns a host:port. The port 443 is added if needed.\nfunc authorityAddr(scheme string, authority string) (addr string) {\n\thost, port, err := net.SplitHostPort(authority)\n\tif err != nil { // authority didn't have a port\n\t\thost = authority\n\t\tport = \"\"\n\t}\n\tif port == \"\" { // authority's port was empty\n\t\tport = \"443\"\n\t\tif scheme == \"http\" {\n\t\t\tport = \"80\"\n\t\t}\n\t}\n\tif a, err := idna.ToASCII(host); err == nil {\n\t\thost = a\n\t}\n\t// IPv6 address literal, without a port:\n\tif strings.HasPrefix(host, \"[\") && strings.HasSuffix(host, \"]\") {\n\t\treturn host + \":\" + port\n\t}\n\treturn net.JoinHostPort(host, port)\n}\n\n// RoundTripOpt is like RoundTrip, but takes options.\nfunc (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {\n\tswitch req.URL.Scheme {\n\tcase \"https\":\n\t\t// Always okay.\n\tcase \"http\":\n\t\tif !t.AllowHTTP && !opt.allowHTTP {\n\t\t\treturn nil, errors.New(\"http2: unencrypted HTTP/2 not enabled\")\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"http2: unsupported scheme\")\n\t}\n\n\taddr := authorityAddr(req.URL.Scheme, req.URL.Host)\n\tfor retry := 0; ; retry++ {\n\t\tcc, err := t.connPool().GetClientConn(req, addr)\n\t\tif err != nil {\n\t\t\tt.vlogf(\"http2: Transport failed to get client conn for %s: %v\", addr, err)\n\t\t\treturn nil, err\n\t\t}\n\t\treused := !atomic.CompareAndSwapUint32(&cc.atomicReused, 0, 1)\n\t\ttraceGotConn(req, cc, reused)\n\t\tres, err := cc.RoundTrip(req)\n\t\tif err != nil && retry <= 6 {\n\t\t\troundTripErr := err\n\t\t\tif req, err = shouldRetryRequest(req, err); err == nil {\n\t\t\t\t// After the first retry, do exponential backoff with 10% jitter.\n\t\t\t\tif retry == 0 {\n\t\t\t\t\tt.vlogf(\"RoundTrip retrying after failure: %v\", roundTripErr)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tbackoff := float64(uint(1) << (uint(retry) - 1))\n\t\t\t\tbackoff += backoff * (0.1 * mathrand.Float64())\n\t\t\t\td := time.Second * time.Duration(backoff)\n\t\t\t\ttm := time.NewTimer(d)\n\t\t\t\tselect {\n\t\t\t\tcase <-tm.C:\n\t\t\t\t\tt.vlogf(\"RoundTrip retrying after failure: %v\", roundTripErr)\n\t\t\t\t\tcontinue\n\t\t\t\tcase <-req.Context().Done():\n\t\t\t\t\ttm.Stop()\n\t\t\t\t\terr = req.Context().Err()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif err == errClientConnNotEstablished {\n\t\t\t// This ClientConn was created recently,\n\t\t\t// this is the first request to use it,\n\t\t\t// and the connection is closed and not usable.\n\t\t\t//\n\t\t\t// In this state, cc.idleTimer will remove the conn from the pool\n\t\t\t// when it fires. Stop the timer and remove it here so future requests\n\t\t\t// won't try to use this connection.\n\t\t\t//\n\t\t\t// If the timer has already fired and we're racing it, the redundant\n\t\t\t// call to MarkDead is harmless.\n\t\t\tif cc.idleTimer != nil {\n\t\t\t\tcc.idleTimer.Stop()\n\t\t\t}\n\t\t\tt.connPool().MarkDead(cc)\n\t\t}\n\t\tif err != nil {\n\t\t\tt.vlogf(\"RoundTrip failure: %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t\treturn res, nil\n\t}\n}\n\n// CloseIdleConnections closes any connections which were previously\n// connected from previous requests but are now sitting idle.\n// It does not interrupt any connections currently in use.\nfunc (t *Transport) CloseIdleConnections() {\n\tif cp, ok := t.connPool().(clientConnPoolIdleCloser); ok {\n\t\tcp.closeIdleConnections()\n\t}\n}\n\nvar (\n\terrClientConnClosed         = errors.New(\"http2: client conn is closed\")\n\terrClientConnUnusable       = errors.New(\"http2: client conn not usable\")\n\terrClientConnNotEstablished = errors.New(\"http2: client conn could not be established\")\n\terrClientConnGotGoAway      = errors.New(\"http2: Transport received Server's graceful shutdown GOAWAY\")\n\terrClientConnForceClosed    = errors.New(\"http2: client connection force closed via ClientConn.Close\")\n)\n\n// shouldRetryRequest is called by RoundTrip when a request fails to get\n// response headers. It is always called with a non-nil error.\n// It returns either a request to retry (either the same request, or a\n// modified clone), or an error if the request can't be replayed.\nfunc shouldRetryRequest(req *http.Request, err error) (*http.Request, error) {\n\tif !canRetryError(err) {\n\t\treturn nil, err\n\t}\n\t// If the Body is nil (or http.NoBody), it's safe to reuse\n\t// this request and its Body.\n\tif req.Body == nil || req.Body == http.NoBody {\n\t\treturn req, nil\n\t}\n\n\t// If the request body can be reset back to its original\n\t// state via the optional req.GetBody, do that.\n\tif req.GetBody != nil {\n\t\tbody, err := req.GetBody()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnewReq := *req\n\t\tnewReq.Body = body\n\t\treturn &newReq, nil\n\t}\n\n\t// The Request.Body can't reset back to the beginning, but we\n\t// don't seem to have started to read from it yet, so reuse\n\t// the request directly.\n\tif err == errClientConnUnusable {\n\t\treturn req, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error\", err)\n}\n\nfunc canRetryError(err error) bool {\n\tif err == errClientConnUnusable || err == errClientConnGotGoAway {\n\t\treturn true\n\t}\n\tif se, ok := err.(StreamError); ok {\n\t\tif se.Code == ErrCodeProtocol && se.Cause == errFromPeer {\n\t\t\t// See golang/go#47635, golang/go#42777\n\t\t\treturn true\n\t\t}\n\t\treturn se.Code == ErrCodeRefusedStream\n\t}\n\treturn false\n}\n\nfunc (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) {\n\tif t.transportTestHooks != nil {\n\t\treturn t.newClientConn(nil, singleUse, nil)\n\t}\n\thost, _, err := net.SplitHostPort(addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttconn, err := t.dialTLS(ctx, \"tcp\", addr, t.newTLSConfig(host))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn t.newClientConn(tconn, singleUse, nil)\n}\n\nfunc (t *Transport) newTLSConfig(host string) *tls.Config {\n\tcfg := new(tls.Config)\n\tif t.TLSClientConfig != nil {\n\t\t*cfg = *t.TLSClientConfig.Clone()\n\t}\n\tif !strSliceContains(cfg.NextProtos, NextProtoTLS) {\n\t\tcfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...)\n\t}\n\tif cfg.ServerName == \"\" {\n\t\tcfg.ServerName = host\n\t}\n\treturn cfg\n}\n\nfunc (t *Transport) dialTLS(ctx context.Context, network, addr string, tlsCfg *tls.Config) (net.Conn, error) {\n\tif t.DialTLSContext != nil {\n\t\treturn t.DialTLSContext(ctx, network, addr, tlsCfg)\n\t} else if t.DialTLS != nil {\n\t\treturn t.DialTLS(network, addr, tlsCfg)\n\t}\n\n\ttlsCn, err := t.dialTLSWithContext(ctx, network, addr, tlsCfg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstate := tlsCn.ConnectionState()\n\tif p := state.NegotiatedProtocol; p != NextProtoTLS {\n\t\treturn nil, fmt.Errorf(\"http2: unexpected ALPN protocol %q; want %q\", p, NextProtoTLS)\n\t}\n\tif !state.NegotiatedProtocolIsMutual {\n\t\treturn nil, errors.New(\"http2: could not negotiate protocol mutually\")\n\t}\n\treturn tlsCn, nil\n}\n\n// disableKeepAlives reports whether connections should be closed as\n// soon as possible after handling the first request.\nfunc (t *Transport) disableKeepAlives() bool {\n\treturn t.t1 != nil && t.t1.DisableKeepAlives\n}\n\nfunc (t *Transport) expectContinueTimeout() time.Duration {\n\tif t.t1 == nil {\n\t\treturn 0\n\t}\n\treturn t.t1.ExpectContinueTimeout\n}\n\nfunc (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {\n\treturn t.newClientConn(c, t.disableKeepAlives(), nil)\n}\n\nfunc (t *Transport) newClientConn(c net.Conn, singleUse bool, internalStateHook func()) (*ClientConn, error) {\n\tconf := configFromTransport(t)\n\tcc := &ClientConn{\n\t\tt:                           t,\n\t\ttconn:                       c,\n\t\treaderDone:                  make(chan struct{}),\n\t\tnextStreamID:                1,\n\t\tmaxFrameSize:                16 << 10, // spec default\n\t\tinitialWindowSize:           65535,    // spec default\n\t\tinitialStreamRecvWindowSize: conf.MaxUploadBufferPerStream,\n\t\tmaxConcurrentStreams:        initialMaxConcurrentStreams, // \"infinite\", per spec. Use a smaller value until we have received server settings.\n\t\tstrictMaxConcurrentStreams:  conf.StrictMaxConcurrentRequests,\n\t\tpeerMaxHeaderListSize:       0xffffffffffffffff, // \"infinite\", per spec. Use 2^64-1 instead.\n\t\tstreams:                     make(map[uint32]*clientStream),\n\t\tsingleUse:                   singleUse,\n\t\tseenSettingsChan:            make(chan struct{}),\n\t\twantSettingsAck:             true,\n\t\treadIdleTimeout:             conf.SendPingTimeout,\n\t\tpingTimeout:                 conf.PingTimeout,\n\t\tpings:                       make(map[[8]byte]chan struct{}),\n\t\treqHeaderMu:                 make(chan struct{}, 1),\n\t\tlastActive:                  time.Now(),\n\t\tinternalStateHook:           internalStateHook,\n\t}\n\tif t.transportTestHooks != nil {\n\t\tt.transportTestHooks.newclientconn(cc)\n\t\tc = cc.tconn\n\t}\n\tif VerboseLogs {\n\t\tt.vlogf(\"http2: Transport creating client conn %p to %v\", cc, c.RemoteAddr())\n\t}\n\n\tcc.cond = sync.NewCond(&cc.mu)\n\tcc.flow.add(int32(initialWindowSize))\n\n\t// TODO: adjust this writer size to account for frame size +\n\t// MTU + crypto/tls record padding.\n\tcc.bw = bufio.NewWriter(stickyErrWriter{\n\t\tconn:    c,\n\t\ttimeout: conf.WriteByteTimeout,\n\t\terr:     &cc.werr,\n\t})\n\tcc.br = bufio.NewReader(c)\n\tcc.fr = NewFramer(cc.bw, cc.br)\n\tcc.fr.SetMaxReadFrameSize(conf.MaxReadFrameSize)\n\tif t.CountError != nil {\n\t\tcc.fr.countError = t.CountError\n\t}\n\tmaxHeaderTableSize := conf.MaxDecoderHeaderTableSize\n\tcc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil)\n\tcc.fr.MaxHeaderListSize = t.maxHeaderListSize()\n\n\tcc.henc = hpack.NewEncoder(&cc.hbuf)\n\tcc.henc.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize)\n\tcc.peerMaxHeaderTableSize = initialHeaderTableSize\n\n\tif cs, ok := c.(connectionStater); ok {\n\t\tstate := cs.ConnectionState()\n\t\tcc.tlsState = &state\n\t}\n\n\tinitialSettings := []Setting{\n\t\t{ID: SettingEnablePush, Val: 0},\n\t\t{ID: SettingInitialWindowSize, Val: uint32(cc.initialStreamRecvWindowSize)},\n\t}\n\tinitialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: conf.MaxReadFrameSize})\n\tif max := t.maxHeaderListSize(); max != 0 {\n\t\tinitialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})\n\t}\n\tif maxHeaderTableSize != initialHeaderTableSize {\n\t\tinitialSettings = append(initialSettings, Setting{ID: SettingHeaderTableSize, Val: maxHeaderTableSize})\n\t}\n\n\tcc.bw.Write(clientPreface)\n\tcc.fr.WriteSettings(initialSettings...)\n\tcc.fr.WriteWindowUpdate(0, uint32(conf.MaxUploadBufferPerConnection))\n\tcc.inflow.init(conf.MaxUploadBufferPerConnection + initialWindowSize)\n\tcc.bw.Flush()\n\tif cc.werr != nil {\n\t\tcc.Close()\n\t\treturn nil, cc.werr\n\t}\n\n\t// Start the idle timer after the connection is fully initialized.\n\tif d := t.idleConnTimeout(); d != 0 {\n\t\tcc.idleTimeout = d\n\t\tcc.idleTimer = time.AfterFunc(d, cc.onIdleTimeout)\n\t}\n\n\tgo cc.readLoop()\n\treturn cc, nil\n}\n\nfunc (cc *ClientConn) healthCheck() {\n\tpingTimeout := cc.pingTimeout\n\t// We don't need to periodically ping in the health check, because the readLoop of ClientConn will\n\t// trigger the healthCheck again if there is no frame received.\n\tctx, cancel := context.WithTimeout(context.Background(), pingTimeout)\n\tdefer cancel()\n\tcc.vlogf(\"http2: Transport sending health check\")\n\terr := cc.Ping(ctx)\n\tif err != nil {\n\t\tcc.vlogf(\"http2: Transport health check failure: %v\", err)\n\t\tcc.closeForLostPing()\n\t} else {\n\t\tcc.vlogf(\"http2: Transport health check success\")\n\t}\n}\n\n// SetDoNotReuse marks cc as not reusable for future HTTP requests.\nfunc (cc *ClientConn) SetDoNotReuse() {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\tcc.doNotReuse = true\n}\n\nfunc (cc *ClientConn) setGoAway(f *GoAwayFrame) {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\n\told := cc.goAway\n\tcc.goAway = f\n\n\t// Merge the previous and current GoAway error frames.\n\tif cc.goAwayDebug == \"\" {\n\t\tcc.goAwayDebug = string(f.DebugData())\n\t}\n\tif old != nil && old.ErrCode != ErrCodeNo {\n\t\tcc.goAway.ErrCode = old.ErrCode\n\t}\n\tlast := f.LastStreamID\n\tfor streamID, cs := range cc.streams {\n\t\tif streamID <= last {\n\t\t\t// The server's GOAWAY indicates that it received this stream.\n\t\t\t// It will either finish processing it, or close the connection\n\t\t\t// without doing so. Either way, leave the stream alone for now.\n\t\t\tcontinue\n\t\t}\n\t\tif streamID == 1 && cc.goAway.ErrCode != ErrCodeNo {\n\t\t\t// Don't retry the first stream on a connection if we get a non-NO error.\n\t\t\t// If the server is sending an error on a new connection,\n\t\t\t// retrying the request on a new one probably isn't going to work.\n\t\t\tcs.abortStreamLocked(fmt.Errorf(\"http2: Transport received GOAWAY from server ErrCode:%v\", cc.goAway.ErrCode))\n\t\t} else {\n\t\t\t// Aborting the stream with errClentConnGotGoAway indicates that\n\t\t\t// the request should be retried on a new connection.\n\t\t\tcs.abortStreamLocked(errClientConnGotGoAway)\n\t\t}\n\t}\n}\n\n// CanTakeNewRequest reports whether the connection can take a new request,\n// meaning it has not been closed or received or sent a GOAWAY.\n//\n// If the caller is going to immediately make a new request on this\n// connection, use ReserveNewRequest instead.\nfunc (cc *ClientConn) CanTakeNewRequest() bool {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\treturn cc.canTakeNewRequestLocked()\n}\n\n// ReserveNewRequest is like CanTakeNewRequest but also reserves a\n// concurrent stream in cc. The reservation is decremented on the\n// next call to RoundTrip.\nfunc (cc *ClientConn) ReserveNewRequest() bool {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\tif st := cc.idleStateLocked(); !st.canTakeNewRequest {\n\t\treturn false\n\t}\n\tcc.streamsReserved++\n\treturn true\n}\n\n// ClientConnState describes the state of a ClientConn.\ntype ClientConnState struct {\n\t// Closed is whether the connection is closed.\n\tClosed bool\n\n\t// Closing is whether the connection is in the process of\n\t// closing. It may be closing due to shutdown, being a\n\t// single-use connection, being marked as DoNotReuse, or\n\t// having received a GOAWAY frame.\n\tClosing bool\n\n\t// StreamsActive is how many streams are active.\n\tStreamsActive int\n\n\t// StreamsReserved is how many streams have been reserved via\n\t// ClientConn.ReserveNewRequest.\n\tStreamsReserved int\n\n\t// StreamsPending is how many requests have been sent in excess\n\t// of the peer's advertised MaxConcurrentStreams setting and\n\t// are waiting for other streams to complete.\n\tStreamsPending int\n\n\t// MaxConcurrentStreams is how many concurrent streams the\n\t// peer advertised as acceptable. Zero means no SETTINGS\n\t// frame has been received yet.\n\tMaxConcurrentStreams uint32\n\n\t// LastIdle, if non-zero, is when the connection last\n\t// transitioned to idle state.\n\tLastIdle time.Time\n}\n\n// State returns a snapshot of cc's state.\nfunc (cc *ClientConn) State() ClientConnState {\n\tcc.wmu.Lock()\n\tmaxConcurrent := cc.maxConcurrentStreams\n\tif !cc.seenSettings {\n\t\tmaxConcurrent = 0\n\t}\n\tcc.wmu.Unlock()\n\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\treturn ClientConnState{\n\t\tClosed:               cc.closed,\n\t\tClosing:              cc.closing || cc.singleUse || cc.doNotReuse || cc.goAway != nil,\n\t\tStreamsActive:        len(cc.streams) + cc.pendingResets,\n\t\tStreamsReserved:      cc.streamsReserved,\n\t\tStreamsPending:       cc.pendingRequests,\n\t\tLastIdle:             cc.lastIdle,\n\t\tMaxConcurrentStreams: maxConcurrent,\n\t}\n}\n\n// clientConnIdleState describes the suitability of a client\n// connection to initiate a new RoundTrip request.\ntype clientConnIdleState struct {\n\tcanTakeNewRequest bool\n}\n\nfunc (cc *ClientConn) idleState() clientConnIdleState {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\treturn cc.idleStateLocked()\n}\n\nfunc (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {\n\tif cc.singleUse && cc.nextStreamID > 1 {\n\t\treturn\n\t}\n\tvar maxConcurrentOkay bool\n\tif cc.strictMaxConcurrentStreams {\n\t\t// We'll tell the caller we can take a new request to\n\t\t// prevent the caller from dialing a new TCP\n\t\t// connection, but then we'll block later before\n\t\t// writing it.\n\t\tmaxConcurrentOkay = true\n\t} else {\n\t\t// We can take a new request if the total of\n\t\t//   - active streams;\n\t\t//   - reservation slots for new streams; and\n\t\t//   - streams for which we have sent a RST_STREAM and a PING,\n\t\t//     but received no subsequent frame\n\t\t// is less than the concurrency limit.\n\t\tmaxConcurrentOkay = cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams)\n\t}\n\n\tst.canTakeNewRequest = maxConcurrentOkay && cc.isUsableLocked()\n\n\t// If this connection has never been used for a request and is closed,\n\t// then let it take a request (which will fail).\n\t// If the conn was closed for idleness, we're racing the idle timer;\n\t// don't try to use the conn. (Issue #70515.)\n\t//\n\t// This avoids a situation where an error early in a connection's lifetime\n\t// goes unreported.\n\tif cc.nextStreamID == 1 && cc.streamsReserved == 0 && cc.closed && !cc.closedOnIdle {\n\t\tst.canTakeNewRequest = true\n\t}\n\n\treturn\n}\n\nfunc (cc *ClientConn) isUsableLocked() bool {\n\treturn cc.goAway == nil &&\n\t\t!cc.closed &&\n\t\t!cc.closing &&\n\t\t!cc.doNotReuse &&\n\t\tint64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 &&\n\t\t!cc.tooIdleLocked()\n}\n\n// canReserveLocked reports whether a net/http.ClientConn can reserve a slot on this conn.\n//\n// This follows slightly different rules than clientConnIdleState.canTakeNewRequest.\n// We only permit reservations up to the conn's concurrency limit.\n// This differs from ClientConn.ReserveNewRequest, which permits reservations\n// past the limit when StrictMaxConcurrentStreams is set.\nfunc (cc *ClientConn) canReserveLocked() bool {\n\tif cc.currentRequestCountLocked() >= int(cc.maxConcurrentStreams) {\n\t\treturn false\n\t}\n\tif !cc.isUsableLocked() {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// currentRequestCountLocked reports the number of concurrency slots currently in use,\n// including active streams, reserved slots, and reset streams waiting for acknowledgement.\nfunc (cc *ClientConn) currentRequestCountLocked() int {\n\treturn len(cc.streams) + cc.streamsReserved + cc.pendingResets\n}\n\nfunc (cc *ClientConn) canTakeNewRequestLocked() bool {\n\tst := cc.idleStateLocked()\n\treturn st.canTakeNewRequest\n}\n\n// availableLocked reports the number of concurrency slots available.\nfunc (cc *ClientConn) availableLocked() int {\n\tif !cc.canTakeNewRequestLocked() {\n\t\treturn 0\n\t}\n\treturn max(0, int(cc.maxConcurrentStreams)-cc.currentRequestCountLocked())\n}\n\n// tooIdleLocked reports whether this connection has been been sitting idle\n// for too much wall time.\nfunc (cc *ClientConn) tooIdleLocked() bool {\n\t// The Round(0) strips the monontonic clock reading so the\n\t// times are compared based on their wall time. We don't want\n\t// to reuse a connection that's been sitting idle during\n\t// VM/laptop suspend if monotonic time was also frozen.\n\treturn cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && time.Since(cc.lastIdle.Round(0)) > cc.idleTimeout\n}\n\n// onIdleTimeout is called from a time.AfterFunc goroutine. It will\n// only be called when we're idle, but because we're coming from a new\n// goroutine, there could be a new request coming in at the same time,\n// so this simply calls the synchronized closeIfIdle to shut down this\n// connection. The timer could just call closeIfIdle, but this is more\n// clear.\nfunc (cc *ClientConn) onIdleTimeout() {\n\tcc.closeIfIdle()\n}\n\nfunc (cc *ClientConn) closeConn() {\n\tt := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)\n\tdefer t.Stop()\n\tcc.tconn.Close()\n\tcc.maybeCallStateHook()\n}\n\n// A tls.Conn.Close can hang for a long time if the peer is unresponsive.\n// Try to shut it down more aggressively.\nfunc (cc *ClientConn) forceCloseConn() {\n\ttc, ok := cc.tconn.(*tls.Conn)\n\tif !ok {\n\t\treturn\n\t}\n\tif nc := tc.NetConn(); nc != nil {\n\t\tnc.Close()\n\t}\n}\n\nfunc (cc *ClientConn) closeIfIdle() {\n\tcc.mu.Lock()\n\tif len(cc.streams) > 0 || cc.streamsReserved > 0 {\n\t\tcc.mu.Unlock()\n\t\treturn\n\t}\n\tcc.closed = true\n\tcc.closedOnIdle = true\n\tnextID := cc.nextStreamID\n\t// TODO: do clients send GOAWAY too? maybe? Just Close:\n\tcc.mu.Unlock()\n\n\tif VerboseLogs {\n\t\tcc.vlogf(\"http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)\", cc, cc.singleUse, nextID-2)\n\t}\n\tcc.closeConn()\n}\n\nfunc (cc *ClientConn) isDoNotReuseAndIdle() bool {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\treturn cc.doNotReuse && len(cc.streams) == 0\n}\n\nvar shutdownEnterWaitStateHook = func() {}\n\n// Shutdown gracefully closes the client connection, waiting for running streams to complete.\nfunc (cc *ClientConn) Shutdown(ctx context.Context) error {\n\tif err := cc.sendGoAway(); err != nil {\n\t\treturn err\n\t}\n\t// Wait for all in-flight streams to complete or connection to close\n\tdone := make(chan struct{})\n\tcancelled := false // guarded by cc.mu\n\tgo func() {\n\t\tcc.mu.Lock()\n\t\tdefer cc.mu.Unlock()\n\t\tfor {\n\t\t\tif len(cc.streams) == 0 || cc.closed {\n\t\t\t\tcc.closed = true\n\t\t\t\tclose(done)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif cancelled {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcc.cond.Wait()\n\t\t}\n\t}()\n\tshutdownEnterWaitStateHook()\n\tselect {\n\tcase <-done:\n\t\tcc.closeConn()\n\t\treturn nil\n\tcase <-ctx.Done():\n\t\tcc.mu.Lock()\n\t\t// Free the goroutine above\n\t\tcancelled = true\n\t\tcc.cond.Broadcast()\n\t\tcc.mu.Unlock()\n\t\treturn ctx.Err()\n\t}\n}\n\nfunc (cc *ClientConn) sendGoAway() error {\n\tcc.mu.Lock()\n\tclosing := cc.closing\n\tcc.closing = true\n\tmaxStreamID := cc.nextStreamID\n\tcc.mu.Unlock()\n\tif closing {\n\t\t// GOAWAY sent already\n\t\treturn nil\n\t}\n\n\tcc.wmu.Lock()\n\tdefer cc.wmu.Unlock()\n\t// Send a graceful shutdown frame to server\n\tif err := cc.fr.WriteGoAway(maxStreamID, ErrCodeNo, nil); err != nil {\n\t\treturn err\n\t}\n\tif err := cc.bw.Flush(); err != nil {\n\t\treturn err\n\t}\n\t// Prevent new requests\n\treturn nil\n}\n\n// closes the client connection immediately. In-flight requests are interrupted.\n// err is sent to streams.\nfunc (cc *ClientConn) closeForError(err error) {\n\tcc.mu.Lock()\n\tcc.closed = true\n\tfor _, cs := range cc.streams {\n\t\tcs.abortStreamLocked(err)\n\t}\n\tcc.cond.Broadcast()\n\tcc.mu.Unlock()\n\tcc.closeConn()\n}\n\n// Close closes the client connection immediately.\n//\n// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.\nfunc (cc *ClientConn) Close() error {\n\tcc.closeForError(errClientConnForceClosed)\n\treturn nil\n}\n\n// closes the client connection immediately. In-flight requests are interrupted.\nfunc (cc *ClientConn) closeForLostPing() {\n\terr := errors.New(\"http2: client connection lost\")\n\tif f := cc.t.CountError; f != nil {\n\t\tf(\"conn_close_lost_ping\")\n\t}\n\tcc.closeForError(err)\n}\n\n// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not\n// exported. At least they'll be DeepEqual for h1-vs-h2 comparisons tests.\nvar errRequestCanceled = errors.New(\"net/http: request canceled\")\n\nfunc (cc *ClientConn) responseHeaderTimeout() time.Duration {\n\tif cc.t.t1 != nil {\n\t\treturn cc.t.t1.ResponseHeaderTimeout\n\t}\n\t// No way to do this (yet?) with just an http2.Transport. Probably\n\t// no need. Request.Cancel this is the new way. We only need to support\n\t// this for compatibility with the old http.Transport fields when\n\t// we're doing transparent http2.\n\treturn 0\n}\n\n// actualContentLength returns a sanitized version of\n// req.ContentLength, where 0 actually means zero (not unknown) and -1\n// means unknown.\nfunc actualContentLength(req *http.Request) int64 {\n\tif req.Body == nil || req.Body == http.NoBody {\n\t\treturn 0\n\t}\n\tif req.ContentLength != 0 {\n\t\treturn req.ContentLength\n\t}\n\treturn -1\n}\n\nfunc (cc *ClientConn) decrStreamReservations() {\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\tcc.decrStreamReservationsLocked()\n}\n\nfunc (cc *ClientConn) decrStreamReservationsLocked() {\n\tif cc.streamsReserved > 0 {\n\t\tcc.streamsReserved--\n\t}\n}\n\nfunc (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {\n\treturn cc.roundTrip(req, nil)\n}\n\nfunc (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) (*http.Response, error) {\n\tctx := req.Context()\n\tcs := &clientStream{\n\t\tcc:                   cc,\n\t\tctx:                  ctx,\n\t\treqCancel:            req.Cancel,\n\t\tisHead:               req.Method == \"HEAD\",\n\t\treqBody:              req.Body,\n\t\treqBodyContentLength: actualContentLength(req),\n\t\ttrace:                httptrace.ContextClientTrace(ctx),\n\t\tpeerClosed:           make(chan struct{}),\n\t\tabort:                make(chan struct{}),\n\t\trespHeaderRecv:       make(chan struct{}),\n\t\tdonec:                make(chan struct{}),\n\t}\n\n\tcs.requestedGzip = httpcommon.IsRequestGzip(req.Method, req.Header, cc.t.disableCompression())\n\n\tgo cs.doRequest(req, streamf)\n\n\twaitDone := func() error {\n\t\tselect {\n\t\tcase <-cs.donec:\n\t\t\treturn nil\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase <-cs.reqCancel:\n\t\t\treturn errRequestCanceled\n\t\t}\n\t}\n\n\thandleResponseHeaders := func() (*http.Response, error) {\n\t\tres := cs.res\n\t\tif res.StatusCode > 299 {\n\t\t\t// On error or status code 3xx, 4xx, 5xx, etc abort any\n\t\t\t// ongoing write, assuming that the server doesn't care\n\t\t\t// about our request body. If the server replied with 1xx or\n\t\t\t// 2xx, however, then assume the server DOES potentially\n\t\t\t// want our body (e.g. full-duplex streaming:\n\t\t\t// golang.org/issue/13444). If it turns out the server\n\t\t\t// doesn't, they'll RST_STREAM us soon enough. This is a\n\t\t\t// heuristic to avoid adding knobs to Transport. Hopefully\n\t\t\t// we can keep it.\n\t\t\tcs.abortRequestBodyWrite()\n\t\t}\n\t\tres.Request = req\n\t\tres.TLS = cc.tlsState\n\t\tif res.Body == noBody && actualContentLength(req) == 0 {\n\t\t\t// If there isn't a request or response body still being\n\t\t\t// written, then wait for the stream to be closed before\n\t\t\t// RoundTrip returns.\n\t\t\tif err := waitDone(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\treturn res, nil\n\t}\n\n\tcancelRequest := func(cs *clientStream, err error) error {\n\t\tcs.cc.mu.Lock()\n\t\tbodyClosed := cs.reqBodyClosed\n\t\tcs.cc.mu.Unlock()\n\t\t// Wait for the request body to be closed.\n\t\t//\n\t\t// If nothing closed the body before now, abortStreamLocked\n\t\t// will have started a goroutine to close it.\n\t\t//\n\t\t// Closing the body before returning avoids a race condition\n\t\t// with net/http checking its readTrackingBody to see if the\n\t\t// body was read from or closed. See golang/go#60041.\n\t\t//\n\t\t// The body is closed in a separate goroutine without the\n\t\t// connection mutex held, but dropping the mutex before waiting\n\t\t// will keep us from holding it indefinitely if the body\n\t\t// close is slow for some reason.\n\t\tif bodyClosed != nil {\n\t\t\t<-bodyClosed\n\t\t}\n\t\treturn err\n\t}\n\n\tfor {\n\t\tselect {\n\t\tcase <-cs.respHeaderRecv:\n\t\t\treturn handleResponseHeaders()\n\t\tcase <-cs.abort:\n\t\t\tselect {\n\t\t\tcase <-cs.respHeaderRecv:\n\t\t\t\t// If both cs.respHeaderRecv and cs.abort are signaling,\n\t\t\t\t// pick respHeaderRecv. The server probably wrote the\n\t\t\t\t// response and immediately reset the stream.\n\t\t\t\t// golang.org/issue/49645\n\t\t\t\treturn handleResponseHeaders()\n\t\t\tdefault:\n\t\t\t\twaitDone()\n\t\t\t\treturn nil, cs.abortErr\n\t\t\t}\n\t\tcase <-ctx.Done():\n\t\t\terr := ctx.Err()\n\t\t\tcs.abortStream(err)\n\t\t\treturn nil, cancelRequest(cs, err)\n\t\tcase <-cs.reqCancel:\n\t\t\tcs.abortStream(errRequestCanceled)\n\t\t\treturn nil, cancelRequest(cs, errRequestCanceled)\n\t\t}\n\t}\n}\n\n// doRequest runs for the duration of the request lifetime.\n//\n// It sends the request and performs post-request cleanup (closing Request.Body, etc.).\nfunc (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) {\n\terr := cs.writeRequest(req, streamf)\n\tcs.cleanupWriteRequest(err)\n}\n\nvar errExtendedConnectNotSupported = errors.New(\"net/http: extended connect not supported by peer\")\n\n// writeRequest sends a request.\n//\n// It returns nil after the request is written, the response read,\n// and the request stream is half-closed by the peer.\n//\n// It returns non-nil if the request ends otherwise.\n// If the returned error is StreamError, the error Code may be used in resetting the stream.\nfunc (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStream)) (err error) {\n\tcc := cs.cc\n\tctx := cs.ctx\n\n\t// wait for setting frames to be received, a server can change this value later,\n\t// but we just wait for the first settings frame\n\tvar isExtendedConnect bool\n\tif req.Method == \"CONNECT\" && req.Header.Get(\":protocol\") != \"\" {\n\t\tisExtendedConnect = true\n\t}\n\n\t// Acquire the new-request lock by writing to reqHeaderMu.\n\t// This lock guards the critical section covering allocating a new stream ID\n\t// (requires mu) and creating the stream (requires wmu).\n\tif cc.reqHeaderMu == nil {\n\t\tpanic(\"RoundTrip on uninitialized ClientConn\") // for tests\n\t}\n\tif isExtendedConnect {\n\t\tselect {\n\t\tcase <-cs.reqCancel:\n\t\t\treturn errRequestCanceled\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase <-cc.seenSettingsChan:\n\t\t\tif !cc.extendedConnectAllowed {\n\t\t\t\treturn errExtendedConnectNotSupported\n\t\t\t}\n\t\t}\n\t}\n\tselect {\n\tcase cc.reqHeaderMu <- struct{}{}:\n\tcase <-cs.reqCancel:\n\t\treturn errRequestCanceled\n\tcase <-ctx.Done():\n\t\treturn ctx.Err()\n\t}\n\n\tcc.mu.Lock()\n\tif cc.idleTimer != nil {\n\t\tcc.idleTimer.Stop()\n\t}\n\tcc.decrStreamReservationsLocked()\n\tif err := cc.awaitOpenSlotForStreamLocked(cs); err != nil {\n\t\tcc.mu.Unlock()\n\t\t<-cc.reqHeaderMu\n\t\treturn err\n\t}\n\tcc.addStreamLocked(cs) // assigns stream ID\n\tif isConnectionCloseRequest(req) {\n\t\tcc.doNotReuse = true\n\t}\n\tcc.mu.Unlock()\n\n\tif streamf != nil {\n\t\tstreamf(cs)\n\t}\n\n\tcontinueTimeout := cc.t.expectContinueTimeout()\n\tif continueTimeout != 0 {\n\t\tif !httpguts.HeaderValuesContainsToken(req.Header[\"Expect\"], \"100-continue\") {\n\t\t\tcontinueTimeout = 0\n\t\t} else {\n\t\t\tcs.on100 = make(chan struct{}, 1)\n\t\t}\n\t}\n\n\t// Past this point (where we send request headers), it is possible for\n\t// RoundTrip to return successfully. Since the RoundTrip contract permits\n\t// the caller to \"mutate or reuse\" the Request after closing the Response's Body,\n\t// we must take care when referencing the Request from here on.\n\terr = cs.encodeAndWriteHeaders(req)\n\t<-cc.reqHeaderMu\n\tif err != nil {\n\t\treturn err\n\t}\n\n\thasBody := cs.reqBodyContentLength != 0\n\tif !hasBody {\n\t\tcs.sentEndStream = true\n\t} else {\n\t\tif continueTimeout != 0 {\n\t\t\ttraceWait100Continue(cs.trace)\n\t\t\ttimer := time.NewTimer(continueTimeout)\n\t\t\tselect {\n\t\t\tcase <-timer.C:\n\t\t\t\terr = nil\n\t\t\tcase <-cs.on100:\n\t\t\t\terr = nil\n\t\t\tcase <-cs.abort:\n\t\t\t\terr = cs.abortErr\n\t\t\tcase <-ctx.Done():\n\t\t\t\terr = ctx.Err()\n\t\t\tcase <-cs.reqCancel:\n\t\t\t\terr = errRequestCanceled\n\t\t\t}\n\t\t\ttimer.Stop()\n\t\t\tif err != nil {\n\t\t\t\ttraceWroteRequest(cs.trace, err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif err = cs.writeRequestBody(req); err != nil {\n\t\t\tif err != errStopReqBodyWrite {\n\t\t\t\ttraceWroteRequest(cs.trace, err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tcs.sentEndStream = true\n\t\t}\n\t}\n\n\ttraceWroteRequest(cs.trace, err)\n\n\tvar respHeaderTimer <-chan time.Time\n\tvar respHeaderRecv chan struct{}\n\tif d := cc.responseHeaderTimeout(); d != 0 {\n\t\ttimer := time.NewTimer(d)\n\t\tdefer timer.Stop()\n\t\trespHeaderTimer = timer.C\n\t\trespHeaderRecv = cs.respHeaderRecv\n\t}\n\t// Wait until the peer half-closes its end of the stream,\n\t// or until the request is aborted (via context, error, or otherwise),\n\t// whichever comes first.\n\tfor {\n\t\tselect {\n\t\tcase <-cs.peerClosed:\n\t\t\treturn nil\n\t\tcase <-respHeaderTimer:\n\t\t\treturn errTimeout\n\t\tcase <-respHeaderRecv:\n\t\t\trespHeaderRecv = nil\n\t\t\trespHeaderTimer = nil // keep waiting for END_STREAM\n\t\tcase <-cs.abort:\n\t\t\treturn cs.abortErr\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase <-cs.reqCancel:\n\t\t\treturn errRequestCanceled\n\t\t}\n\t}\n}\n\nfunc (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error {\n\tcc := cs.cc\n\tctx := cs.ctx\n\n\tcc.wmu.Lock()\n\tdefer cc.wmu.Unlock()\n\n\t// If the request was canceled while waiting for cc.mu, just quit.\n\tselect {\n\tcase <-cs.abort:\n\t\treturn cs.abortErr\n\tcase <-ctx.Done():\n\t\treturn ctx.Err()\n\tcase <-cs.reqCancel:\n\t\treturn errRequestCanceled\n\tdefault:\n\t}\n\n\t// Encode headers.\n\t//\n\t// we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is\n\t// sent by writeRequestBody below, along with any Trailers,\n\t// again in form HEADERS{1}, CONTINUATION{0,})\n\tcc.hbuf.Reset()\n\tres, err := encodeRequestHeaders(req, cs.requestedGzip, cc.peerMaxHeaderListSize, func(name, value string) {\n\t\tcc.writeHeader(name, value)\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"http2: %w\", err)\n\t}\n\thdrs := cc.hbuf.Bytes()\n\n\t// Write the request.\n\tendStream := !res.HasBody && !res.HasTrailers\n\tcs.sentHeaders = true\n\terr = cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)\n\ttraceWroteHeaders(cs.trace)\n\treturn err\n}\n\nfunc encodeRequestHeaders(req *http.Request, addGzipHeader bool, peerMaxHeaderListSize uint64, headerf func(name, value string)) (httpcommon.EncodeHeadersResult, error) {\n\treturn httpcommon.EncodeHeaders(req.Context(), httpcommon.EncodeHeadersParam{\n\t\tRequest: httpcommon.Request{\n\t\t\tHeader:              req.Header,\n\t\t\tTrailer:             req.Trailer,\n\t\t\tURL:                 req.URL,\n\t\t\tHost:                req.Host,\n\t\t\tMethod:              req.Method,\n\t\t\tActualContentLength: actualContentLength(req),\n\t\t},\n\t\tAddGzipHeader:         addGzipHeader,\n\t\tPeerMaxHeaderListSize: peerMaxHeaderListSize,\n\t\tDefaultUserAgent:      defaultUserAgent,\n\t}, headerf)\n}\n\n// cleanupWriteRequest performs post-request tasks.\n//\n// If err (the result of writeRequest) is non-nil and the stream is not closed,\n// cleanupWriteRequest will send a reset to the peer.\nfunc (cs *clientStream) cleanupWriteRequest(err error) {\n\tcc := cs.cc\n\n\tif cs.ID == 0 {\n\t\t// We were canceled before creating the stream, so return our reservation.\n\t\tcc.decrStreamReservations()\n\t}\n\n\t// TODO: write h12Compare test showing whether\n\t// Request.Body is closed by the Transport,\n\t// and in multiple cases: server replies <=299 and >299\n\t// while still writing request body\n\tcc.mu.Lock()\n\tmustCloseBody := false\n\tif cs.reqBody != nil && cs.reqBodyClosed == nil {\n\t\tmustCloseBody = true\n\t\tcs.reqBodyClosed = make(chan struct{})\n\t}\n\tbodyClosed := cs.reqBodyClosed\n\tcloseOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil\n\t// Have we read any frames from the connection since sending this request?\n\treadSinceStream := cc.readBeforeStreamID > cs.ID\n\tcc.mu.Unlock()\n\tif mustCloseBody {\n\t\tcs.reqBody.Close()\n\t\tclose(bodyClosed)\n\t}\n\tif bodyClosed != nil {\n\t\t<-bodyClosed\n\t}\n\n\tif err != nil && cs.sentEndStream {\n\t\t// If the connection is closed immediately after the response is read,\n\t\t// we may be aborted before finishing up here. If the stream was closed\n\t\t// cleanly on both sides, there is no error.\n\t\tselect {\n\t\tcase <-cs.peerClosed:\n\t\t\terr = nil\n\t\tdefault:\n\t\t}\n\t}\n\tif err != nil {\n\t\tcs.abortStream(err) // possibly redundant, but harmless\n\t\tif cs.sentHeaders {\n\t\t\tif se, ok := err.(StreamError); ok {\n\t\t\t\tif se.Cause != errFromPeer {\n\t\t\t\t\tcc.writeStreamReset(cs.ID, se.Code, false, err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We're cancelling an in-flight request.\n\t\t\t\t//\n\t\t\t\t// This could be due to the server becoming unresponsive.\n\t\t\t\t// To avoid sending too many requests on a dead connection,\n\t\t\t\t// if we haven't read any frames from the connection since\n\t\t\t\t// sending this request, we let it continue to consume\n\t\t\t\t// a concurrency slot until we can confirm the server is\n\t\t\t\t// still responding.\n\t\t\t\t// We do this by sending a PING frame along with the RST_STREAM\n\t\t\t\t// (unless a ping is already in flight).\n\t\t\t\t//\n\t\t\t\t// For simplicity, we don't bother tracking the PING payload:\n\t\t\t\t// We reset cc.pendingResets any time we receive a PING ACK.\n\t\t\t\t//\n\t\t\t\t// We skip this if the conn is going to be closed on idle,\n\t\t\t\t// because it's short lived and will probably be closed before\n\t\t\t\t// we get the ping response.\n\t\t\t\tping := false\n\t\t\t\tif !closeOnIdle && !readSinceStream {\n\t\t\t\t\tcc.mu.Lock()\n\t\t\t\t\t// rstStreamPingsBlocked works around a gRPC behavior:\n\t\t\t\t\t// see comment on the field for details.\n\t\t\t\t\tif !cc.rstStreamPingsBlocked {\n\t\t\t\t\t\tif cc.pendingResets == 0 {\n\t\t\t\t\t\t\tping = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcc.pendingResets++\n\t\t\t\t\t}\n\t\t\t\t\tcc.mu.Unlock()\n\t\t\t\t}\n\t\t\t\tcc.writeStreamReset(cs.ID, ErrCodeCancel, ping, err)\n\t\t\t}\n\t\t}\n\t\tcs.bufPipe.CloseWithError(err) // no-op if already closed\n\t} else {\n\t\tif cs.sentHeaders && !cs.sentEndStream {\n\t\t\tcc.writeStreamReset(cs.ID, ErrCodeNo, false, nil)\n\t\t}\n\t\tcs.bufPipe.CloseWithError(errRequestCanceled)\n\t}\n\tif cs.ID != 0 {\n\t\tcc.forgetStreamID(cs.ID)\n\t}\n\n\tcc.wmu.Lock()\n\twerr := cc.werr\n\tcc.wmu.Unlock()\n\tif werr != nil {\n\t\tcc.Close()\n\t}\n\n\tclose(cs.donec)\n\tcc.maybeCallStateHook()\n}\n\n// awaitOpenSlotForStreamLocked waits until len(streams) < maxConcurrentStreams.\n// Must hold cc.mu.\nfunc (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {\n\tfor {\n\t\tif cc.closed && cc.nextStreamID == 1 && cc.streamsReserved == 0 {\n\t\t\t// This is the very first request sent to this connection.\n\t\t\t// Return a fatal error which aborts the retry loop.\n\t\t\treturn errClientConnNotEstablished\n\t\t}\n\t\tcc.lastActive = time.Now()\n\t\tif cc.closed || !cc.canTakeNewRequestLocked() {\n\t\t\treturn errClientConnUnusable\n\t\t}\n\t\tcc.lastIdle = time.Time{}\n\t\tif cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) {\n\t\t\treturn nil\n\t\t}\n\t\tcc.pendingRequests++\n\t\tcc.cond.Wait()\n\t\tcc.pendingRequests--\n\t\tselect {\n\t\tcase <-cs.abort:\n\t\t\treturn cs.abortErr\n\t\tdefault:\n\t\t}\n\t}\n}\n\n// requires cc.wmu be held\nfunc (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize int, hdrs []byte) error {\n\tfirst := true // first frame written (HEADERS is first, then CONTINUATION)\n\tfor len(hdrs) > 0 && cc.werr == nil {\n\t\tchunk := hdrs\n\t\tif len(chunk) > maxFrameSize {\n\t\t\tchunk = chunk[:maxFrameSize]\n\t\t}\n\t\thdrs = hdrs[len(chunk):]\n\t\tendHeaders := len(hdrs) == 0\n\t\tif first {\n\t\t\tcc.fr.WriteHeaders(HeadersFrameParam{\n\t\t\t\tStreamID:      streamID,\n\t\t\t\tBlockFragment: chunk,\n\t\t\t\tEndStream:     endStream,\n\t\t\t\tEndHeaders:    endHeaders,\n\t\t\t})\n\t\t\tfirst = false\n\t\t} else {\n\t\t\tcc.fr.WriteContinuation(streamID, endHeaders, chunk)\n\t\t}\n\t}\n\tcc.bw.Flush()\n\treturn cc.werr\n}\n\n// internal error values; they don't escape to callers\nvar (\n\t// abort request body write; don't send cancel\n\terrStopReqBodyWrite = errors.New(\"http2: aborting request body write\")\n\n\t// abort request body write, but send stream reset of cancel.\n\terrStopReqBodyWriteAndCancel = errors.New(\"http2: canceling request\")\n\n\terrReqBodyTooLong = errors.New(\"http2: request body larger than specified content length\")\n)\n\n// frameScratchBufferLen returns the length of a buffer to use for\n// outgoing request bodies to read/write to/from.\n//\n// It returns max(1, min(peer's advertised max frame size,\n// Request.ContentLength+1, 512KB)).\nfunc (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {\n\tconst max = 512 << 10\n\tn := int64(maxFrameSize)\n\tif n > max {\n\t\tn = max\n\t}\n\tif cl := cs.reqBodyContentLength; cl != -1 && cl+1 < n {\n\t\t// Add an extra byte past the declared content-length to\n\t\t// give the caller's Request.Body io.Reader a chance to\n\t\t// give us more bytes than they declared, so we can catch it\n\t\t// early.\n\t\tn = cl + 1\n\t}\n\tif n < 1 {\n\t\treturn 1\n\t}\n\treturn int(n) // doesn't truncate; max is 512K\n}\n\n// Seven bufPools manage different frame sizes. This helps to avoid scenarios where long-running\n// streaming requests using small frame sizes occupy large buffers initially allocated for prior\n// requests needing big buffers. The size ranges are as follows:\n// {0 KB, 16 KB], {16 KB, 32 KB], {32 KB, 64 KB], {64 KB, 128 KB], {128 KB, 256 KB],\n// {256 KB, 512 KB], {512 KB, infinity}\n// In practice, the maximum scratch buffer size should not exceed 512 KB due to\n// frameScratchBufferLen(maxFrameSize), thus the \"infinity pool\" should never be used.\n// It exists mainly as a safety measure, for potential future increases in max buffer size.\nvar bufPools [7]sync.Pool // of *[]byte\nfunc bufPoolIndex(size int) int {\n\tif size <= 16384 {\n\t\treturn 0\n\t}\n\tsize -= 1\n\tbits := bits.Len(uint(size))\n\tindex := bits - 14\n\tif index >= len(bufPools) {\n\t\treturn len(bufPools) - 1\n\t}\n\treturn index\n}\n\nfunc (cs *clientStream) writeRequestBody(req *http.Request) (err error) {\n\tcc := cs.cc\n\tbody := cs.reqBody\n\tsentEnd := false // whether we sent the final DATA frame w/ END_STREAM\n\n\thasTrailers := req.Trailer != nil\n\tremainLen := cs.reqBodyContentLength\n\thasContentLen := remainLen != -1\n\n\tcc.mu.Lock()\n\tmaxFrameSize := int(cc.maxFrameSize)\n\tcc.mu.Unlock()\n\n\t// Scratch buffer for reading into & writing from.\n\tscratchLen := cs.frameScratchBufferLen(maxFrameSize)\n\tvar buf []byte\n\tindex := bufPoolIndex(scratchLen)\n\tif bp, ok := bufPools[index].Get().(*[]byte); ok && len(*bp) >= scratchLen {\n\t\tdefer bufPools[index].Put(bp)\n\t\tbuf = *bp\n\t} else {\n\t\tbuf = make([]byte, scratchLen)\n\t\tdefer bufPools[index].Put(&buf)\n\t}\n\n\tvar sawEOF bool\n\tfor !sawEOF {\n\t\tn, err := body.Read(buf)\n\t\tif hasContentLen {\n\t\t\tremainLen -= int64(n)\n\t\t\tif remainLen == 0 && err == nil {\n\t\t\t\t// The request body's Content-Length was predeclared and\n\t\t\t\t// we just finished reading it all, but the underlying io.Reader\n\t\t\t\t// returned the final chunk with a nil error (which is one of\n\t\t\t\t// the two valid things a Reader can do at EOF). Because we'd prefer\n\t\t\t\t// to send the END_STREAM bit early, double-check that we're actually\n\t\t\t\t// at EOF. Subsequent reads should return (0, EOF) at this point.\n\t\t\t\t// If either value is different, we return an error in one of two ways below.\n\t\t\t\tvar scratch [1]byte\n\t\t\t\tvar n1 int\n\t\t\t\tn1, err = body.Read(scratch[:])\n\t\t\t\tremainLen -= int64(n1)\n\t\t\t}\n\t\t\tif remainLen < 0 {\n\t\t\t\terr = errReqBodyTooLong\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tcc.mu.Lock()\n\t\t\tbodyClosed := cs.reqBodyClosed != nil\n\t\t\tcc.mu.Unlock()\n\t\t\tswitch {\n\t\t\tcase bodyClosed:\n\t\t\t\treturn errStopReqBodyWrite\n\t\t\tcase err == io.EOF:\n\t\t\t\tsawEOF = true\n\t\t\t\terr = nil\n\t\t\tdefault:\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tremain := buf[:n]\n\t\tfor len(remain) > 0 && err == nil {\n\t\t\tvar allowed int32\n\t\t\tallowed, err = cs.awaitFlowControl(len(remain))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tcc.wmu.Lock()\n\t\t\tdata := remain[:allowed]\n\t\t\tremain = remain[allowed:]\n\t\t\tsentEnd = sawEOF && len(remain) == 0 && !hasTrailers\n\t\t\terr = cc.fr.WriteData(cs.ID, sentEnd, data)\n\t\t\tif err == nil {\n\t\t\t\t// TODO(bradfitz): this flush is for latency, not bandwidth.\n\t\t\t\t// Most requests won't need this. Make this opt-in or\n\t\t\t\t// opt-out?  Use some heuristic on the body type? Nagel-like\n\t\t\t\t// timers?  Based on 'n'? Only last chunk of this for loop,\n\t\t\t\t// unless flow control tokens are low? For now, always.\n\t\t\t\t// If we change this, see comment below.\n\t\t\t\terr = cc.bw.Flush()\n\t\t\t}\n\t\t\tcc.wmu.Unlock()\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif sentEnd {\n\t\t// Already sent END_STREAM (which implies we have no\n\t\t// trailers) and flushed, because currently all\n\t\t// WriteData frames above get a flush. So we're done.\n\t\treturn nil\n\t}\n\n\t// Since the RoundTrip contract permits the caller to \"mutate or reuse\"\n\t// a request after the Response's Body is closed, verify that this hasn't\n\t// happened before accessing the trailers.\n\tcc.mu.Lock()\n\ttrailer := req.Trailer\n\terr = cs.abortErr\n\tcc.mu.Unlock()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcc.wmu.Lock()\n\tdefer cc.wmu.Unlock()\n\tvar trls []byte\n\tif len(trailer) > 0 {\n\t\ttrls, err = cc.encodeTrailers(trailer)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Two ways to send END_STREAM: either with trailers, or\n\t// with an empty DATA frame.\n\tif len(trls) > 0 {\n\t\terr = cc.writeHeaders(cs.ID, true, maxFrameSize, trls)\n\t} else {\n\t\terr = cc.fr.WriteData(cs.ID, true, nil)\n\t}\n\tif ferr := cc.bw.Flush(); ferr != nil && err == nil {\n\t\terr = ferr\n\t}\n\treturn err\n}\n\n// awaitFlowControl waits for [1, min(maxBytes, cc.cs.maxFrameSize)] flow\n// control tokens from the server.\n// It returns either the non-zero number of tokens taken or an error\n// if the stream is dead.\nfunc (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) {\n\tcc := cs.cc\n\tctx := cs.ctx\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\tfor {\n\t\tif cc.closed {\n\t\t\treturn 0, errClientConnClosed\n\t\t}\n\t\tif cs.reqBodyClosed != nil {\n\t\t\treturn 0, errStopReqBodyWrite\n\t\t}\n\t\tselect {\n\t\tcase <-cs.abort:\n\t\t\treturn 0, cs.abortErr\n\t\tcase <-ctx.Done():\n\t\t\treturn 0, ctx.Err()\n\t\tcase <-cs.reqCancel:\n\t\t\treturn 0, errRequestCanceled\n\t\tdefault:\n\t\t}\n\t\tif a := cs.flow.available(); a > 0 {\n\t\t\ttake := a\n\t\t\tif int(take) > maxBytes {\n\n\t\t\t\ttake = int32(maxBytes) // can't truncate int; take is int32\n\t\t\t}\n\t\t\tif take > int32(cc.maxFrameSize) {\n\t\t\t\ttake = int32(cc.maxFrameSize)\n\t\t\t}\n\t\t\tcs.flow.take(take)\n\t\t\treturn take, nil\n\t\t}\n\t\tcc.cond.Wait()\n\t}\n}\n\n// requires cc.wmu be held.\nfunc (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {\n\tcc.hbuf.Reset()\n\n\thlSize := uint64(0)\n\tfor k, vv := range trailer {\n\t\tfor _, v := range vv {\n\t\t\thf := hpack.HeaderField{Name: k, Value: v}\n\t\t\thlSize += uint64(hf.Size())\n\t\t}\n\t}\n\tif hlSize > cc.peerMaxHeaderListSize {\n\t\treturn nil, errRequestHeaderListSize\n\t}\n\n\tfor k, vv := range trailer {\n\t\tlowKey, ascii := httpcommon.LowerHeader(k)\n\t\tif !ascii {\n\t\t\t// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header\n\t\t\t// field names have to be ASCII characters (just as in HTTP/1.x).\n\t\t\tcontinue\n\t\t}\n\t\t// Transfer-Encoding, etc.. have already been filtered at the\n\t\t// start of RoundTrip\n\t\tfor _, v := range vv {\n\t\t\tcc.writeHeader(lowKey, v)\n\t\t}\n\t}\n\treturn cc.hbuf.Bytes(), nil\n}\n\nfunc (cc *ClientConn) writeHeader(name, value string) {\n\tif VerboseLogs {\n\t\tlog.Printf(\"http2: Transport encoding header %q = %q\", name, value)\n\t}\n\tcc.henc.WriteField(hpack.HeaderField{Name: name, Value: value})\n}\n\ntype resAndError struct {\n\t_   incomparable\n\tres *http.Response\n\terr error\n}\n\n// requires cc.mu be held.\nfunc (cc *ClientConn) addStreamLocked(cs *clientStream) {\n\tcs.flow.add(int32(cc.initialWindowSize))\n\tcs.flow.setConnFlow(&cc.flow)\n\tcs.inflow.init(cc.initialStreamRecvWindowSize)\n\tcs.ID = cc.nextStreamID\n\tcc.nextStreamID += 2\n\tcc.streams[cs.ID] = cs\n\tif cs.ID == 0 {\n\t\tpanic(\"assigned stream ID 0\")\n\t}\n}\n\nfunc (cc *ClientConn) forgetStreamID(id uint32) {\n\tcc.mu.Lock()\n\tslen := len(cc.streams)\n\tdelete(cc.streams, id)\n\tif len(cc.streams) != slen-1 {\n\t\tpanic(\"forgetting unknown stream id\")\n\t}\n\tcc.lastActive = time.Now()\n\tif len(cc.streams) == 0 && cc.idleTimer != nil {\n\t\tcc.idleTimer.Reset(cc.idleTimeout)\n\t\tcc.lastIdle = time.Now()\n\t}\n\t// Wake up writeRequestBody via clientStream.awaitFlowControl and\n\t// wake up RoundTrip if there is a pending request.\n\tcc.cond.Broadcast()\n\n\tcloseOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil\n\tif closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {\n\t\tif VerboseLogs {\n\t\t\tcc.vlogf(\"http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)\", cc, cc.singleUse, cc.nextStreamID-2)\n\t\t}\n\t\tcc.closed = true\n\t\tdefer cc.closeConn()\n\t}\n\n\tcc.mu.Unlock()\n}\n\n// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.\ntype clientConnReadLoop struct {\n\t_  incomparable\n\tcc *ClientConn\n}\n\n// readLoop runs in its own goroutine and reads and dispatches frames.\nfunc (cc *ClientConn) readLoop() {\n\trl := &clientConnReadLoop{cc: cc}\n\tdefer rl.cleanup()\n\tcc.readerErr = rl.run()\n\tif ce, ok := cc.readerErr.(ConnectionError); ok {\n\t\tcc.wmu.Lock()\n\t\tcc.fr.WriteGoAway(0, ErrCode(ce), nil)\n\t\tcc.wmu.Unlock()\n\t}\n}\n\n// GoAwayError is returned by the Transport when the server closes the\n// TCP connection after sending a GOAWAY frame.\ntype GoAwayError struct {\n\tLastStreamID uint32\n\tErrCode      ErrCode\n\tDebugData    string\n}\n\nfunc (e GoAwayError) Error() string {\n\treturn fmt.Sprintf(\"http2: server sent GOAWAY and closed the connection; LastStreamID=%v, ErrCode=%v, debug=%q\",\n\t\te.LastStreamID, e.ErrCode, e.DebugData)\n}\n\nfunc isEOFOrNetReadError(err error) bool {\n\tif err == io.EOF {\n\t\treturn true\n\t}\n\tne, ok := err.(*net.OpError)\n\treturn ok && ne.Op == \"read\"\n}\n\nfunc (rl *clientConnReadLoop) cleanup() {\n\tcc := rl.cc\n\tdefer cc.closeConn()\n\tdefer close(cc.readerDone)\n\n\tif cc.idleTimer != nil {\n\t\tcc.idleTimer.Stop()\n\t}\n\n\t// Close any response bodies if the server closes prematurely.\n\t// TODO: also do this if we've written the headers but not\n\t// gotten a response yet.\n\terr := cc.readerErr\n\tcc.mu.Lock()\n\tif cc.goAway != nil && isEOFOrNetReadError(err) {\n\t\terr = GoAwayError{\n\t\t\tLastStreamID: cc.goAway.LastStreamID,\n\t\t\tErrCode:      cc.goAway.ErrCode,\n\t\t\tDebugData:    cc.goAwayDebug,\n\t\t}\n\t} else if err == io.EOF {\n\t\terr = io.ErrUnexpectedEOF\n\t}\n\tcc.closed = true\n\n\t// If the connection has never been used, and has been open for only a short time,\n\t// leave it in the connection pool for a little while.\n\t//\n\t// This avoids a situation where new connections are constantly created,\n\t// added to the pool, fail, and are removed from the pool, without any error\n\t// being surfaced to the user.\n\tunusedWaitTime := 5 * time.Second\n\tif cc.idleTimeout > 0 && unusedWaitTime > cc.idleTimeout {\n\t\tunusedWaitTime = cc.idleTimeout\n\t}\n\tidleTime := time.Now().Sub(cc.lastActive)\n\tif atomic.LoadUint32(&cc.atomicReused) == 0 && idleTime < unusedWaitTime && !cc.closedOnIdle {\n\t\tcc.idleTimer = time.AfterFunc(unusedWaitTime-idleTime, func() {\n\t\t\tcc.t.connPool().MarkDead(cc)\n\t\t})\n\t} else {\n\t\tcc.mu.Unlock() // avoid any deadlocks in MarkDead\n\t\tcc.t.connPool().MarkDead(cc)\n\t\tcc.mu.Lock()\n\t}\n\n\tfor _, cs := range cc.streams {\n\t\tselect {\n\t\tcase <-cs.peerClosed:\n\t\t\t// The server closed the stream before closing the conn,\n\t\t\t// so no need to interrupt it.\n\t\tdefault:\n\t\t\tcs.abortStreamLocked(err)\n\t\t}\n\t}\n\tcc.cond.Broadcast()\n\tcc.mu.Unlock()\n\n\tif !cc.seenSettings {\n\t\t// If we have a pending request that wants extended CONNECT,\n\t\t// let it continue and fail with the connection error.\n\t\tcc.extendedConnectAllowed = true\n\t\tclose(cc.seenSettingsChan)\n\t}\n}\n\n// countReadFrameError calls Transport.CountError with a string\n// representing err.\nfunc (cc *ClientConn) countReadFrameError(err error) {\n\tf := cc.t.CountError\n\tif f == nil || err == nil {\n\t\treturn\n\t}\n\tif ce, ok := err.(ConnectionError); ok {\n\t\terrCode := ErrCode(ce)\n\t\tf(fmt.Sprintf(\"read_frame_conn_error_%s\", errCode.stringToken()))\n\t\treturn\n\t}\n\tif errors.Is(err, io.EOF) {\n\t\tf(\"read_frame_eof\")\n\t\treturn\n\t}\n\tif errors.Is(err, io.ErrUnexpectedEOF) {\n\t\tf(\"read_frame_unexpected_eof\")\n\t\treturn\n\t}\n\tif errors.Is(err, ErrFrameTooLarge) {\n\t\tf(\"read_frame_too_large\")\n\t\treturn\n\t}\n\tf(\"read_frame_other\")\n}\n\nfunc (rl *clientConnReadLoop) run() error {\n\tcc := rl.cc\n\tgotSettings := false\n\treadIdleTimeout := cc.readIdleTimeout\n\tvar t *time.Timer\n\tif readIdleTimeout != 0 {\n\t\tt = time.AfterFunc(readIdleTimeout, cc.healthCheck)\n\t}\n\tfor {\n\t\tf, err := cc.fr.ReadFrame()\n\t\tif t != nil {\n\t\t\tt.Reset(readIdleTimeout)\n\t\t}\n\t\tif err != nil {\n\t\t\tcc.vlogf(\"http2: Transport readFrame error on conn %p: (%T) %v\", cc, err, err)\n\t\t}\n\t\tif se, ok := err.(StreamError); ok {\n\t\t\tif cs := rl.streamByID(se.StreamID, notHeaderOrDataFrame); cs != nil {\n\t\t\t\tif se.Cause == nil {\n\t\t\t\t\tse.Cause = cc.fr.errDetail\n\t\t\t\t}\n\t\t\t\trl.endStreamError(cs, se)\n\t\t\t}\n\t\t\tcontinue\n\t\t} else if err != nil {\n\t\t\tcc.countReadFrameError(err)\n\t\t\treturn err\n\t\t}\n\t\tif VerboseLogs {\n\t\t\tcc.vlogf(\"http2: Transport received %s\", summarizeFrame(f))\n\t\t}\n\t\tif !gotSettings {\n\t\t\tif _, ok := f.(*SettingsFrame); !ok {\n\t\t\t\tcc.logf(\"protocol error: received %T before a SETTINGS frame\", f)\n\t\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t\t}\n\t\t\tgotSettings = true\n\t\t}\n\n\t\tswitch f := f.(type) {\n\t\tcase *MetaHeadersFrame:\n\t\t\terr = rl.processHeaders(f)\n\t\tcase *DataFrame:\n\t\t\terr = rl.processData(f)\n\t\tcase *GoAwayFrame:\n\t\t\terr = rl.processGoAway(f)\n\t\tcase *RSTStreamFrame:\n\t\t\terr = rl.processResetStream(f)\n\t\tcase *SettingsFrame:\n\t\t\terr = rl.processSettings(f)\n\t\tcase *PushPromiseFrame:\n\t\t\terr = rl.processPushPromise(f)\n\t\tcase *WindowUpdateFrame:\n\t\t\terr = rl.processWindowUpdate(f)\n\t\tcase *PingFrame:\n\t\t\terr = rl.processPing(f)\n\t\tdefault:\n\t\t\tcc.logf(\"Transport: unhandled response frame type %T\", f)\n\t\t}\n\t\tif err != nil {\n\t\t\tif VerboseLogs {\n\t\t\t\tcc.vlogf(\"http2: Transport conn %p received error from processing frame %v: %v\", cc, summarizeFrame(f), err)\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n}\n\nfunc (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {\n\tcs := rl.streamByID(f.StreamID, headerOrDataFrame)\n\tif cs == nil {\n\t\t// We'd get here if we canceled a request while the\n\t\t// server had its response still in flight. So if this\n\t\t// was just something we canceled, ignore it.\n\t\treturn nil\n\t}\n\tif cs.readClosed {\n\t\trl.endStreamError(cs, StreamError{\n\t\t\tStreamID: f.StreamID,\n\t\t\tCode:     ErrCodeProtocol,\n\t\t\tCause:    errors.New(\"protocol error: headers after END_STREAM\"),\n\t\t})\n\t\treturn nil\n\t}\n\tif !cs.firstByte {\n\t\tif cs.trace != nil {\n\t\t\t// TODO(bradfitz): move first response byte earlier,\n\t\t\t// when we first read the 9 byte header, not waiting\n\t\t\t// until all the HEADERS+CONTINUATION frames have been\n\t\t\t// merged. This works for now.\n\t\t\ttraceFirstResponseByte(cs.trace)\n\t\t}\n\t\tcs.firstByte = true\n\t}\n\tif !cs.pastHeaders {\n\t\tcs.pastHeaders = true\n\t} else {\n\t\treturn rl.processTrailers(cs, f)\n\t}\n\n\tres, err := rl.handleResponse(cs, f)\n\tif err != nil {\n\t\tif _, ok := err.(ConnectionError); ok {\n\t\t\treturn err\n\t\t}\n\t\t// Any other error type is a stream error.\n\t\trl.endStreamError(cs, StreamError{\n\t\t\tStreamID: f.StreamID,\n\t\t\tCode:     ErrCodeProtocol,\n\t\t\tCause:    err,\n\t\t})\n\t\treturn nil // return nil from process* funcs to keep conn alive\n\t}\n\tif res == nil {\n\t\t// (nil, nil) special case. See handleResponse docs.\n\t\treturn nil\n\t}\n\tcs.resTrailer = &res.Trailer\n\tcs.res = res\n\tclose(cs.respHeaderRecv)\n\tif f.StreamEnded() {\n\t\trl.endStream(cs)\n\t}\n\treturn nil\n}\n\n// may return error types nil, or ConnectionError. Any other error value\n// is a StreamError of type ErrCodeProtocol. The returned error in that case\n// is the detail.\n//\n// As a special case, handleResponse may return (nil, nil) to skip the\n// frame (currently only used for 1xx responses).\nfunc (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFrame) (*http.Response, error) {\n\tif f.Truncated {\n\t\treturn nil, errResponseHeaderListSize\n\t}\n\n\tstatus := f.PseudoValue(\"status\")\n\tif status == \"\" {\n\t\treturn nil, errors.New(\"malformed response from server: missing status pseudo header\")\n\t}\n\tstatusCode, err := strconv.Atoi(status)\n\tif err != nil {\n\t\treturn nil, errors.New(\"malformed response from server: malformed non-numeric status pseudo header\")\n\t}\n\n\tregularFields := f.RegularFields()\n\tstrs := make([]string, len(regularFields))\n\theader := make(http.Header, len(regularFields))\n\tres := &http.Response{\n\t\tProto:      \"HTTP/2.0\",\n\t\tProtoMajor: 2,\n\t\tHeader:     header,\n\t\tStatusCode: statusCode,\n\t\tStatus:     status + \" \" + http.StatusText(statusCode),\n\t}\n\tfor _, hf := range regularFields {\n\t\tkey := httpcommon.CanonicalHeader(hf.Name)\n\t\tif key == \"Trailer\" {\n\t\t\tt := res.Trailer\n\t\t\tif t == nil {\n\t\t\t\tt = make(http.Header)\n\t\t\t\tres.Trailer = t\n\t\t\t}\n\t\t\tforeachHeaderElement(hf.Value, func(v string) {\n\t\t\t\tt[httpcommon.CanonicalHeader(v)] = nil\n\t\t\t})\n\t\t} else {\n\t\t\tvv := header[key]\n\t\t\tif vv == nil && len(strs) > 0 {\n\t\t\t\t// More than likely this will be a single-element key.\n\t\t\t\t// Most headers aren't multi-valued.\n\t\t\t\t// Set the capacity on strs[0] to 1, so any future append\n\t\t\t\t// won't extend the slice into the other strings.\n\t\t\t\tvv, strs = strs[:1:1], strs[1:]\n\t\t\t\tvv[0] = hf.Value\n\t\t\t\theader[key] = vv\n\t\t\t} else {\n\t\t\t\theader[key] = append(vv, hf.Value)\n\t\t\t}\n\t\t}\n\t}\n\n\tif statusCode >= 100 && statusCode <= 199 {\n\t\tif f.StreamEnded() {\n\t\t\treturn nil, errors.New(\"1xx informational response with END_STREAM flag\")\n\t\t}\n\t\tif fn := cs.get1xxTraceFunc(); fn != nil {\n\t\t\t// If the 1xx response is being delivered to the user,\n\t\t\t// then they're responsible for limiting the number\n\t\t\t// of responses.\n\t\t\tif err := fn(statusCode, textproto.MIMEHeader(header)); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t} else {\n\t\t\t// If the user didn't examine the 1xx response, then we\n\t\t\t// limit the size of all 1xx headers.\n\t\t\t//\n\t\t\t// This differs a bit from the HTTP/1 implementation, which\n\t\t\t// limits the size of all 1xx headers plus the final response.\n\t\t\t// Use the larger limit of MaxHeaderListSize and\n\t\t\t// net/http.Transport.MaxResponseHeaderBytes.\n\t\t\tlimit := int64(cs.cc.t.maxHeaderListSize())\n\t\t\tif t1 := cs.cc.t.t1; t1 != nil && t1.MaxResponseHeaderBytes > limit {\n\t\t\t\tlimit = t1.MaxResponseHeaderBytes\n\t\t\t}\n\t\t\tfor _, h := range f.Fields {\n\t\t\t\tcs.totalHeaderSize += int64(h.Size())\n\t\t\t}\n\t\t\tif cs.totalHeaderSize > limit {\n\t\t\t\tif VerboseLogs {\n\t\t\t\t\tlog.Printf(\"http2: 1xx informational responses too large\")\n\t\t\t\t}\n\t\t\t\treturn nil, errors.New(\"header list too large\")\n\t\t\t}\n\t\t}\n\t\tif statusCode == 100 {\n\t\t\ttraceGot100Continue(cs.trace)\n\t\t\tselect {\n\t\t\tcase cs.on100 <- struct{}{}:\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t\tcs.pastHeaders = false // do it all again\n\t\treturn nil, nil\n\t}\n\n\tres.ContentLength = -1\n\tif clens := res.Header[\"Content-Length\"]; len(clens) == 1 {\n\t\tif cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil {\n\t\t\tres.ContentLength = int64(cl)\n\t\t} else {\n\t\t\t// TODO: care? unlike http/1, it won't mess up our framing, so it's\n\t\t\t// more safe smuggling-wise to ignore.\n\t\t}\n\t} else if len(clens) > 1 {\n\t\t// TODO: care? unlike http/1, it won't mess up our framing, so it's\n\t\t// more safe smuggling-wise to ignore.\n\t} else if f.StreamEnded() && !cs.isHead {\n\t\tres.ContentLength = 0\n\t}\n\n\tif cs.isHead {\n\t\tres.Body = noBody\n\t\treturn res, nil\n\t}\n\n\tif f.StreamEnded() {\n\t\tif res.ContentLength > 0 {\n\t\t\tres.Body = missingBody{}\n\t\t} else {\n\t\t\tres.Body = noBody\n\t\t}\n\t\treturn res, nil\n\t}\n\n\tcs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength})\n\tcs.bytesRemain = res.ContentLength\n\tres.Body = transportResponseBody{cs}\n\n\tif cs.requestedGzip && asciiEqualFold(res.Header.Get(\"Content-Encoding\"), \"gzip\") {\n\t\tres.Header.Del(\"Content-Encoding\")\n\t\tres.Header.Del(\"Content-Length\")\n\t\tres.ContentLength = -1\n\t\tres.Body = &gzipReader{body: res.Body}\n\t\tres.Uncompressed = true\n\t}\n\treturn res, nil\n}\n\nfunc (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFrame) error {\n\tif cs.pastTrailers {\n\t\t// Too many HEADERS frames for this stream.\n\t\treturn ConnectionError(ErrCodeProtocol)\n\t}\n\tcs.pastTrailers = true\n\tif !f.StreamEnded() {\n\t\t// We expect that any headers for trailers also\n\t\t// has END_STREAM.\n\t\treturn ConnectionError(ErrCodeProtocol)\n\t}\n\tif len(f.PseudoFields()) > 0 {\n\t\t// No pseudo header fields are defined for trailers.\n\t\t// TODO: ConnectionError might be overly harsh? Check.\n\t\treturn ConnectionError(ErrCodeProtocol)\n\t}\n\n\ttrailer := make(http.Header)\n\tfor _, hf := range f.RegularFields() {\n\t\tkey := httpcommon.CanonicalHeader(hf.Name)\n\t\ttrailer[key] = append(trailer[key], hf.Value)\n\t}\n\tcs.trailer = trailer\n\n\trl.endStream(cs)\n\treturn nil\n}\n\n// transportResponseBody is the concrete type of Transport.RoundTrip's\n// Response.Body. It is an io.ReadCloser.\ntype transportResponseBody struct {\n\tcs *clientStream\n}\n\nfunc (b transportResponseBody) Read(p []byte) (n int, err error) {\n\tcs := b.cs\n\tcc := cs.cc\n\n\tif cs.readErr != nil {\n\t\treturn 0, cs.readErr\n\t}\n\tn, err = b.cs.bufPipe.Read(p)\n\tif cs.bytesRemain != -1 {\n\t\tif int64(n) > cs.bytesRemain {\n\t\t\tn = int(cs.bytesRemain)\n\t\t\tif err == nil {\n\t\t\t\terr = errors.New(\"net/http: server replied with more than declared Content-Length; truncated\")\n\t\t\t\tcs.abortStream(err)\n\t\t\t}\n\t\t\tcs.readErr = err\n\t\t\treturn int(cs.bytesRemain), err\n\t\t}\n\t\tcs.bytesRemain -= int64(n)\n\t\tif err == io.EOF && cs.bytesRemain > 0 {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t\tcs.readErr = err\n\t\t\treturn n, err\n\t\t}\n\t}\n\tif n == 0 {\n\t\t// No flow control tokens to send back.\n\t\treturn\n\t}\n\n\tcc.mu.Lock()\n\tconnAdd := cc.inflow.add(n)\n\tvar streamAdd int32\n\tif err == nil { // No need to refresh if the stream is over or failed.\n\t\tstreamAdd = cs.inflow.add(n)\n\t}\n\tcc.mu.Unlock()\n\n\tif connAdd != 0 || streamAdd != 0 {\n\t\tcc.wmu.Lock()\n\t\tdefer cc.wmu.Unlock()\n\t\tif connAdd != 0 {\n\t\t\tcc.fr.WriteWindowUpdate(0, mustUint31(connAdd))\n\t\t}\n\t\tif streamAdd != 0 {\n\t\t\tcc.fr.WriteWindowUpdate(cs.ID, mustUint31(streamAdd))\n\t\t}\n\t\tcc.bw.Flush()\n\t}\n\treturn\n}\n\nvar errClosedResponseBody = errors.New(\"http2: response body closed\")\n\nfunc (b transportResponseBody) Close() error {\n\tcs := b.cs\n\tcc := cs.cc\n\n\tcs.bufPipe.BreakWithError(errClosedResponseBody)\n\tcs.abortStream(errClosedResponseBody)\n\n\tunread := cs.bufPipe.Len()\n\tif unread > 0 {\n\t\tcc.mu.Lock()\n\t\t// Return connection-level flow control.\n\t\tconnAdd := cc.inflow.add(unread)\n\t\tcc.mu.Unlock()\n\n\t\t// TODO(dneil): Acquiring this mutex can block indefinitely.\n\t\t// Move flow control return to a goroutine?\n\t\tcc.wmu.Lock()\n\t\t// Return connection-level flow control.\n\t\tif connAdd > 0 {\n\t\t\tcc.fr.WriteWindowUpdate(0, uint32(connAdd))\n\t\t}\n\t\tcc.bw.Flush()\n\t\tcc.wmu.Unlock()\n\t}\n\n\tselect {\n\tcase <-cs.donec:\n\tcase <-cs.ctx.Done():\n\t\t// See golang/go#49366: The net/http package can cancel the\n\t\t// request context after the response body is fully read.\n\t\t// Don't treat this as an error.\n\t\treturn nil\n\tcase <-cs.reqCancel:\n\t\treturn errRequestCanceled\n\t}\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) processData(f *DataFrame) error {\n\tcc := rl.cc\n\tcs := rl.streamByID(f.StreamID, headerOrDataFrame)\n\tdata := f.Data()\n\tif cs == nil {\n\t\tcc.mu.Lock()\n\t\tneverSent := cc.nextStreamID\n\t\tcc.mu.Unlock()\n\t\tif f.StreamID >= neverSent {\n\t\t\t// We never asked for this.\n\t\t\tcc.logf(\"http2: Transport received unsolicited DATA frame; closing connection\")\n\t\t\treturn ConnectionError(ErrCodeProtocol)\n\t\t}\n\t\t// We probably did ask for this, but canceled. Just ignore it.\n\t\t// TODO: be stricter here? only silently ignore things which\n\t\t// we canceled, but not things which were closed normally\n\t\t// by the peer? Tough without accumulating too much state.\n\n\t\t// But at least return their flow control:\n\t\tif f.Length > 0 {\n\t\t\tcc.mu.Lock()\n\t\t\tok := cc.inflow.take(f.Length)\n\t\t\tconnAdd := cc.inflow.add(int(f.Length))\n\t\t\tcc.mu.Unlock()\n\t\t\tif !ok {\n\t\t\t\treturn ConnectionError(ErrCodeFlowControl)\n\t\t\t}\n\t\t\tif connAdd > 0 {\n\t\t\t\tcc.wmu.Lock()\n\t\t\t\tcc.fr.WriteWindowUpdate(0, uint32(connAdd))\n\t\t\t\tcc.bw.Flush()\n\t\t\t\tcc.wmu.Unlock()\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\tif cs.readClosed {\n\t\tcc.logf(\"protocol error: received DATA after END_STREAM\")\n\t\trl.endStreamError(cs, StreamError{\n\t\t\tStreamID: f.StreamID,\n\t\t\tCode:     ErrCodeProtocol,\n\t\t})\n\t\treturn nil\n\t}\n\tif !cs.pastHeaders {\n\t\tcc.logf(\"protocol error: received DATA before a HEADERS frame\")\n\t\trl.endStreamError(cs, StreamError{\n\t\t\tStreamID: f.StreamID,\n\t\t\tCode:     ErrCodeProtocol,\n\t\t})\n\t\treturn nil\n\t}\n\tif f.Length > 0 {\n\t\tif cs.isHead && len(data) > 0 {\n\t\t\tcc.logf(\"protocol error: received DATA on a HEAD request\")\n\t\t\trl.endStreamError(cs, StreamError{\n\t\t\t\tStreamID: f.StreamID,\n\t\t\t\tCode:     ErrCodeProtocol,\n\t\t\t})\n\t\t\treturn nil\n\t\t}\n\t\t// Check connection-level flow control.\n\t\tcc.mu.Lock()\n\t\tif !takeInflows(&cc.inflow, &cs.inflow, f.Length) {\n\t\t\tcc.mu.Unlock()\n\t\t\treturn ConnectionError(ErrCodeFlowControl)\n\t\t}\n\t\t// Return any padded flow control now, since we won't\n\t\t// refund it later on body reads.\n\t\tvar refund int\n\t\tif pad := int(f.Length) - len(data); pad > 0 {\n\t\t\trefund += pad\n\t\t}\n\n\t\tdidReset := false\n\t\tvar err error\n\t\tif len(data) > 0 {\n\t\t\tif _, err = cs.bufPipe.Write(data); err != nil {\n\t\t\t\t// Return len(data) now if the stream is already closed,\n\t\t\t\t// since data will never be read.\n\t\t\t\tdidReset = true\n\t\t\t\trefund += len(data)\n\t\t\t}\n\t\t}\n\n\t\tsendConn := cc.inflow.add(refund)\n\t\tvar sendStream int32\n\t\tif !didReset {\n\t\t\tsendStream = cs.inflow.add(refund)\n\t\t}\n\t\tcc.mu.Unlock()\n\n\t\tif sendConn > 0 || sendStream > 0 {\n\t\t\tcc.wmu.Lock()\n\t\t\tif sendConn > 0 {\n\t\t\t\tcc.fr.WriteWindowUpdate(0, uint32(sendConn))\n\t\t\t}\n\t\t\tif sendStream > 0 {\n\t\t\t\tcc.fr.WriteWindowUpdate(cs.ID, uint32(sendStream))\n\t\t\t}\n\t\t\tcc.bw.Flush()\n\t\t\tcc.wmu.Unlock()\n\t\t}\n\n\t\tif err != nil {\n\t\t\trl.endStreamError(cs, err)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tif f.StreamEnded() {\n\t\trl.endStream(cs)\n\t}\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) endStream(cs *clientStream) {\n\t// TODO: check that any declared content-length matches, like\n\t// server.go's (*stream).endStream method.\n\tif !cs.readClosed {\n\t\tcs.readClosed = true\n\t\t// Close cs.bufPipe and cs.peerClosed with cc.mu held to avoid a\n\t\t// race condition: The caller can read io.EOF from Response.Body\n\t\t// and close the body before we close cs.peerClosed, causing\n\t\t// cleanupWriteRequest to send a RST_STREAM.\n\t\trl.cc.mu.Lock()\n\t\tdefer rl.cc.mu.Unlock()\n\t\tcs.bufPipe.closeWithErrorAndCode(io.EOF, cs.copyTrailers)\n\t\tclose(cs.peerClosed)\n\t}\n}\n\nfunc (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) {\n\tcs.readAborted = true\n\tcs.abortStream(err)\n}\n\nfunc (rl *clientConnReadLoop) endStreamErrorLocked(cs *clientStream, err error) {\n\tcs.readAborted = true\n\tcs.abortStreamLocked(err)\n}\n\n// Constants passed to streamByID for documentation purposes.\nconst (\n\theaderOrDataFrame    = true\n\tnotHeaderOrDataFrame = false\n)\n\n// streamByID returns the stream with the given id, or nil if no stream has that id.\n// If headerOrData is true, it clears rst.StreamPingsBlocked.\nfunc (rl *clientConnReadLoop) streamByID(id uint32, headerOrData bool) *clientStream {\n\trl.cc.mu.Lock()\n\tdefer rl.cc.mu.Unlock()\n\tif headerOrData {\n\t\t// Work around an unfortunate gRPC behavior.\n\t\t// See comment on ClientConn.rstStreamPingsBlocked for details.\n\t\trl.cc.rstStreamPingsBlocked = false\n\t}\n\trl.cc.readBeforeStreamID = rl.cc.nextStreamID\n\tcs := rl.cc.streams[id]\n\tif cs != nil && !cs.readAborted {\n\t\treturn cs\n\t}\n\treturn nil\n}\n\nfunc (cs *clientStream) copyTrailers() {\n\tfor k, vv := range cs.trailer {\n\t\tt := cs.resTrailer\n\t\tif *t == nil {\n\t\t\t*t = make(http.Header)\n\t\t}\n\t\t(*t)[k] = vv\n\t}\n}\n\nfunc (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {\n\tcc := rl.cc\n\tcc.t.connPool().MarkDead(cc)\n\tif f.ErrCode != 0 {\n\t\t// TODO: deal with GOAWAY more. particularly the error code\n\t\tcc.vlogf(\"transport got GOAWAY with error code = %v\", f.ErrCode)\n\t\tif fn := cc.t.CountError; fn != nil {\n\t\t\tfn(\"recv_goaway_\" + f.ErrCode.stringToken())\n\t\t}\n\t}\n\tcc.setGoAway(f)\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {\n\tcc := rl.cc\n\t// Locking both mu and wmu here allows frame encoding to read settings with only wmu held.\n\t// Acquiring wmu when f.IsAck() is unnecessary, but convenient and mostly harmless.\n\tcc.wmu.Lock()\n\tdefer cc.wmu.Unlock()\n\n\tif err := rl.processSettingsNoWrite(f); err != nil {\n\t\treturn err\n\t}\n\tif !f.IsAck() {\n\t\tcc.fr.WriteSettingsAck()\n\t\tcc.bw.Flush()\n\t}\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {\n\tcc := rl.cc\n\tdefer cc.maybeCallStateHook()\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\n\tif f.IsAck() {\n\t\tif cc.wantSettingsAck {\n\t\t\tcc.wantSettingsAck = false\n\t\t\treturn nil\n\t\t}\n\t\treturn ConnectionError(ErrCodeProtocol)\n\t}\n\n\tvar seenMaxConcurrentStreams bool\n\terr := f.ForeachSetting(func(s Setting) error {\n\t\tswitch s.ID {\n\t\tcase SettingMaxFrameSize:\n\t\t\tcc.maxFrameSize = s.Val\n\t\tcase SettingMaxConcurrentStreams:\n\t\t\tcc.maxConcurrentStreams = s.Val\n\t\t\tseenMaxConcurrentStreams = true\n\t\tcase SettingMaxHeaderListSize:\n\t\t\tcc.peerMaxHeaderListSize = uint64(s.Val)\n\t\tcase SettingInitialWindowSize:\n\t\t\t// Values above the maximum flow-control\n\t\t\t// window size of 2^31-1 MUST be treated as a\n\t\t\t// connection error (Section 5.4.1) of type\n\t\t\t// FLOW_CONTROL_ERROR.\n\t\t\tif s.Val > math.MaxInt32 {\n\t\t\t\treturn ConnectionError(ErrCodeFlowControl)\n\t\t\t}\n\n\t\t\t// Adjust flow control of currently-open\n\t\t\t// frames by the difference of the old initial\n\t\t\t// window size and this one.\n\t\t\tdelta := int32(s.Val) - int32(cc.initialWindowSize)\n\t\t\tfor _, cs := range cc.streams {\n\t\t\t\tcs.flow.add(delta)\n\t\t\t}\n\t\t\tcc.cond.Broadcast()\n\n\t\t\tcc.initialWindowSize = s.Val\n\t\tcase SettingHeaderTableSize:\n\t\t\tcc.henc.SetMaxDynamicTableSize(s.Val)\n\t\t\tcc.peerMaxHeaderTableSize = s.Val\n\t\tcase SettingEnableConnectProtocol:\n\t\t\tif err := s.Valid(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// If the peer wants to send us SETTINGS_ENABLE_CONNECT_PROTOCOL,\n\t\t\t// we require that it do so in the first SETTINGS frame.\n\t\t\t//\n\t\t\t// When we attempt to use extended CONNECT, we wait for the first\n\t\t\t// SETTINGS frame to see if the server supports it. If we let the\n\t\t\t// server enable the feature with a later SETTINGS frame, then\n\t\t\t// users will see inconsistent results depending on whether we've\n\t\t\t// seen that frame or not.\n\t\t\tif !cc.seenSettings {\n\t\t\t\tcc.extendedConnectAllowed = s.Val == 1\n\t\t\t}\n\t\tdefault:\n\t\t\tcc.vlogf(\"Unhandled Setting: %v\", s)\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !cc.seenSettings {\n\t\tif !seenMaxConcurrentStreams {\n\t\t\t// This was the servers initial SETTINGS frame and it\n\t\t\t// didn't contain a MAX_CONCURRENT_STREAMS field so\n\t\t\t// increase the number of concurrent streams this\n\t\t\t// connection can establish to our default.\n\t\t\tcc.maxConcurrentStreams = defaultMaxConcurrentStreams\n\t\t}\n\t\tclose(cc.seenSettingsChan)\n\t\tcc.seenSettings = true\n\t}\n\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {\n\tcc := rl.cc\n\tcs := rl.streamByID(f.StreamID, notHeaderOrDataFrame)\n\tif f.StreamID != 0 && cs == nil {\n\t\treturn nil\n\t}\n\n\tcc.mu.Lock()\n\tdefer cc.mu.Unlock()\n\n\tfl := &cc.flow\n\tif cs != nil {\n\t\tfl = &cs.flow\n\t}\n\tif !fl.add(int32(f.Increment)) {\n\t\t// For stream, the sender sends RST_STREAM with an error code of FLOW_CONTROL_ERROR\n\t\tif cs != nil {\n\t\t\trl.endStreamErrorLocked(cs, StreamError{\n\t\t\t\tStreamID: f.StreamID,\n\t\t\t\tCode:     ErrCodeFlowControl,\n\t\t\t})\n\t\t\treturn nil\n\t\t}\n\n\t\treturn ConnectionError(ErrCodeFlowControl)\n\t}\n\tcc.cond.Broadcast()\n\treturn nil\n}\n\nfunc (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error {\n\tcs := rl.streamByID(f.StreamID, notHeaderOrDataFrame)\n\tif cs == nil {\n\t\t// TODO: return error if server tries to RST_STREAM an idle stream\n\t\treturn nil\n\t}\n\tserr := streamError(cs.ID, f.ErrCode)\n\tserr.Cause = errFromPeer\n\tif f.ErrCode == ErrCodeProtocol {\n\t\trl.cc.SetDoNotReuse()\n\t}\n\tif fn := cs.cc.t.CountError; fn != nil {\n\t\tfn(\"recv_rststream_\" + f.ErrCode.stringToken())\n\t}\n\tcs.abortStream(serr)\n\n\tcs.bufPipe.CloseWithError(serr)\n\treturn nil\n}\n\n// Ping sends a PING frame to the server and waits for the ack.\nfunc (cc *ClientConn) Ping(ctx context.Context) error {\n\tc := make(chan struct{})\n\t// Generate a random payload\n\tvar p [8]byte\n\tfor {\n\t\tif _, err := rand.Read(p[:]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcc.mu.Lock()\n\t\t// check for dup before insert\n\t\tif _, found := cc.pings[p]; !found {\n\t\t\tcc.pings[p] = c\n\t\t\tcc.mu.Unlock()\n\t\t\tbreak\n\t\t}\n\t\tcc.mu.Unlock()\n\t}\n\tvar pingError error\n\terrc := make(chan struct{})\n\tgo func() {\n\t\tcc.wmu.Lock()\n\t\tdefer cc.wmu.Unlock()\n\t\tif pingError = cc.fr.WritePing(false, p); pingError != nil {\n\t\t\tclose(errc)\n\t\t\treturn\n\t\t}\n\t\tif pingError = cc.bw.Flush(); pingError != nil {\n\t\t\tclose(errc)\n\t\t\treturn\n\t\t}\n\t}()\n\tselect {\n\tcase <-c:\n\t\treturn nil\n\tcase <-errc:\n\t\treturn pingError\n\tcase <-ctx.Done():\n\t\treturn ctx.Err()\n\tcase <-cc.readerDone:\n\t\t// connection closed\n\t\treturn cc.readerErr\n\t}\n}\n\nfunc (rl *clientConnReadLoop) processPing(f *PingFrame) error {\n\tif f.IsAck() {\n\t\tcc := rl.cc\n\t\tdefer cc.maybeCallStateHook()\n\t\tcc.mu.Lock()\n\t\tdefer cc.mu.Unlock()\n\t\t// If ack, notify listener if any\n\t\tif c, ok := cc.pings[f.Data]; ok {\n\t\t\tclose(c)\n\t\t\tdelete(cc.pings, f.Data)\n\t\t}\n\t\tif cc.pendingResets > 0 {\n\t\t\t// See clientStream.cleanupWriteRequest.\n\t\t\tcc.pendingResets = 0\n\t\t\tcc.rstStreamPingsBlocked = true\n\t\t\tcc.cond.Broadcast()\n\t\t}\n\t\treturn nil\n\t}\n\tcc := rl.cc\n\tcc.wmu.Lock()\n\tdefer cc.wmu.Unlock()\n\tif err := cc.fr.WritePing(true, f.Data); err != nil {\n\t\treturn err\n\t}\n\treturn cc.bw.Flush()\n}\n\nfunc (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error {\n\t// We told the peer we don't want them.\n\t// Spec says:\n\t// \"PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH\n\t// setting of the peer endpoint is set to 0. An endpoint that\n\t// has set this setting and has received acknowledgement MUST\n\t// treat the receipt of a PUSH_PROMISE frame as a connection\n\t// error (Section 5.4.1) of type PROTOCOL_ERROR.\"\n\treturn ConnectionError(ErrCodeProtocol)\n}\n\n// writeStreamReset sends a RST_STREAM frame.\n// When ping is true, it also sends a PING frame with a random payload.\nfunc (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, ping bool, err error) {\n\t// TODO: map err to more interesting error codes, once the\n\t// HTTP community comes up with some. But currently for\n\t// RST_STREAM there's no equivalent to GOAWAY frame's debug\n\t// data, and the error codes are all pretty vague (\"cancel\").\n\tcc.wmu.Lock()\n\tcc.fr.WriteRSTStream(streamID, code)\n\tif ping {\n\t\tvar payload [8]byte\n\t\trand.Read(payload[:])\n\t\tcc.fr.WritePing(false, payload)\n\t}\n\tcc.bw.Flush()\n\tcc.wmu.Unlock()\n}\n\nvar (\n\terrResponseHeaderListSize = errors.New(\"http2: response header list larger than advertised limit\")\n\terrRequestHeaderListSize  = httpcommon.ErrRequestHeaderListSize\n)\n\nfunc (cc *ClientConn) logf(format string, args ...interface{}) {\n\tcc.t.logf(format, args...)\n}\n\nfunc (cc *ClientConn) vlogf(format string, args ...interface{}) {\n\tcc.t.vlogf(format, args...)\n}\n\nfunc (t *Transport) vlogf(format string, args ...interface{}) {\n\tif VerboseLogs {\n\t\tt.logf(format, args...)\n\t}\n}\n\nfunc (t *Transport) logf(format string, args ...interface{}) {\n\tlog.Printf(format, args...)\n}\n\nvar noBody io.ReadCloser = noBodyReader{}\n\ntype noBodyReader struct{}\n\nfunc (noBodyReader) Close() error             { return nil }\nfunc (noBodyReader) Read([]byte) (int, error) { return 0, io.EOF }\n\ntype missingBody struct{}\n\nfunc (missingBody) Close() error             { return nil }\nfunc (missingBody) Read([]byte) (int, error) { return 0, io.ErrUnexpectedEOF }\n\nfunc strSliceContains(ss []string, s string) bool {\n\tfor _, v := range ss {\n\t\tif v == s {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\ntype erringRoundTripper struct{ err error }\n\nfunc (rt erringRoundTripper) RoundTripErr() error                             { return rt.err }\nfunc (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }\n\nvar errConcurrentReadOnResBody = errors.New(\"http2: concurrent read on response body\")\n\n// gzipReader wraps a response body so it can lazily\n// get gzip.Reader from the pool on the first call to Read.\n// After Close is called it puts gzip.Reader to the pool immediately\n// if there is no Read in progress or later when Read completes.\ntype gzipReader struct {\n\t_    incomparable\n\tbody io.ReadCloser // underlying Response.Body\n\tmu   sync.Mutex    // guards zr and zerr\n\tzr   *gzip.Reader  // stores gzip reader from the pool between reads\n\tzerr error         // sticky gzip reader init error or sentinel value to detect concurrent read and read after close\n}\n\ntype eofReader struct{}\n\nfunc (eofReader) Read([]byte) (int, error) { return 0, io.EOF }\nfunc (eofReader) ReadByte() (byte, error)  { return 0, io.EOF }\n\nvar gzipPool = sync.Pool{New: func() any { return new(gzip.Reader) }}\n\n// gzipPoolGet gets a gzip.Reader from the pool and resets it to read from r.\nfunc gzipPoolGet(r io.Reader) (*gzip.Reader, error) {\n\tzr := gzipPool.Get().(*gzip.Reader)\n\tif err := zr.Reset(r); err != nil {\n\t\tgzipPoolPut(zr)\n\t\treturn nil, err\n\t}\n\treturn zr, nil\n}\n\n// gzipPoolPut puts a gzip.Reader back into the pool.\nfunc gzipPoolPut(zr *gzip.Reader) {\n\t// Reset will allocate bufio.Reader if we pass it anything\n\t// other than a flate.Reader, so ensure that it's getting one.\n\tvar r flate.Reader = eofReader{}\n\tzr.Reset(r)\n\tgzipPool.Put(zr)\n}\n\n// acquire returns a gzip.Reader for reading response body.\n// The reader must be released after use.\nfunc (gz *gzipReader) acquire() (*gzip.Reader, error) {\n\tgz.mu.Lock()\n\tdefer gz.mu.Unlock()\n\tif gz.zerr != nil {\n\t\treturn nil, gz.zerr\n\t}\n\tif gz.zr == nil {\n\t\tgz.zr, gz.zerr = gzipPoolGet(gz.body)\n\t\tif gz.zerr != nil {\n\t\t\treturn nil, gz.zerr\n\t\t}\n\t}\n\tret := gz.zr\n\tgz.zr, gz.zerr = nil, errConcurrentReadOnResBody\n\treturn ret, nil\n}\n\n// release returns the gzip.Reader to the pool if Close was called during Read.\nfunc (gz *gzipReader) release(zr *gzip.Reader) {\n\tgz.mu.Lock()\n\tdefer gz.mu.Unlock()\n\tif gz.zerr == errConcurrentReadOnResBody {\n\t\tgz.zr, gz.zerr = zr, nil\n\t} else { // fs.ErrClosed\n\t\tgzipPoolPut(zr)\n\t}\n}\n\n// close returns the gzip.Reader to the pool immediately or\n// signals release to do so after Read completes.\nfunc (gz *gzipReader) close() {\n\tgz.mu.Lock()\n\tdefer gz.mu.Unlock()\n\tif gz.zerr == nil && gz.zr != nil {\n\t\tgzipPoolPut(gz.zr)\n\t\tgz.zr = nil\n\t}\n\tgz.zerr = fs.ErrClosed\n}\n\nfunc (gz *gzipReader) Read(p []byte) (n int, err error) {\n\tzr, err := gz.acquire()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer gz.release(zr)\n\n\treturn zr.Read(p)\n}\n\nfunc (gz *gzipReader) Close() error {\n\tgz.close()\n\n\treturn gz.body.Close()\n}\n\ntype errorReader struct{ err error }\n\nfunc (r errorReader) Read(p []byte) (int, error) { return 0, r.err }\n\n// isConnectionCloseRequest reports whether req should use its own\n// connection for a single request and then close the connection.\nfunc isConnectionCloseRequest(req *http.Request) bool {\n\treturn req.Close || httpguts.HeaderValuesContainsToken(req.Header[\"Connection\"], \"close\")\n}\n\n// registerHTTPSProtocol calls Transport.RegisterProtocol but\n// converting panics into errors.\nfunc registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) {\n\tdefer func() {\n\t\tif e := recover(); e != nil {\n\t\t\terr = fmt.Errorf(\"%v\", e)\n\t\t}\n\t}()\n\tt.RegisterProtocol(\"https\", rt)\n\treturn nil\n}\n\n// noDialH2RoundTripper is a RoundTripper which only tries to complete the request\n// if there's already a cached connection to the host.\n// (The field is exported so it can be accessed via reflect from net/http; tested\n// by TestNoDialH2RoundTripperType)\n//\n// A noDialH2RoundTripper is registered with http1.Transport.RegisterProtocol,\n// and the http1.Transport can use type assertions to call non-RoundTrip methods on it.\n// This lets us expose, for example, NewClientConn to net/http.\ntype noDialH2RoundTripper struct{ *Transport }\n\nfunc (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {\n\tres, err := rt.Transport.RoundTrip(req)\n\tif isNoCachedConnError(err) {\n\t\treturn nil, http.ErrSkipAltProtocol\n\t}\n\treturn res, err\n}\n\nfunc (rt noDialH2RoundTripper) NewClientConn(conn net.Conn, internalStateHook func()) (http.RoundTripper, error) {\n\ttr := rt.Transport\n\tcc, err := tr.newClientConn(conn, tr.disableKeepAlives(), internalStateHook)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// RoundTrip should block when the conn is at its concurrency limit,\n\t// not return an error. Setting strictMaxConcurrentStreams enables this.\n\tcc.strictMaxConcurrentStreams = true\n\n\treturn netHTTPClientConn{cc}, nil\n}\n\n// netHTTPClientConn wraps ClientConn and implements the interface net/http expects from\n// the RoundTripper returned by NewClientConn.\ntype netHTTPClientConn struct {\n\tcc *ClientConn\n}\n\nfunc (cc netHTTPClientConn) RoundTrip(req *http.Request) (*http.Response, error) {\n\treturn cc.cc.RoundTrip(req)\n}\n\nfunc (cc netHTTPClientConn) Close() error {\n\treturn cc.cc.Close()\n}\n\nfunc (cc netHTTPClientConn) Err() error {\n\tcc.cc.mu.Lock()\n\tdefer cc.cc.mu.Unlock()\n\tif cc.cc.closed {\n\t\treturn errors.New(\"connection closed\")\n\t}\n\treturn nil\n}\n\nfunc (cc netHTTPClientConn) Reserve() error {\n\tdefer cc.cc.maybeCallStateHook()\n\tcc.cc.mu.Lock()\n\tdefer cc.cc.mu.Unlock()\n\tif !cc.cc.canReserveLocked() {\n\t\treturn errors.New(\"connection is unavailable\")\n\t}\n\tcc.cc.streamsReserved++\n\treturn nil\n}\n\nfunc (cc netHTTPClientConn) Release() {\n\tdefer cc.cc.maybeCallStateHook()\n\tcc.cc.mu.Lock()\n\tdefer cc.cc.mu.Unlock()\n\t// We don't complain if streamsReserved is 0.\n\t//\n\t// This is consistent with RoundTrip: both Release and RoundTrip will\n\t// consume a reservation iff one exists.\n\tif cc.cc.streamsReserved > 0 {\n\t\tcc.cc.streamsReserved--\n\t}\n}\n\nfunc (cc netHTTPClientConn) Available() int {\n\tcc.cc.mu.Lock()\n\tdefer cc.cc.mu.Unlock()\n\treturn cc.cc.availableLocked()\n}\n\nfunc (cc netHTTPClientConn) InFlight() int {\n\tcc.cc.mu.Lock()\n\tdefer cc.cc.mu.Unlock()\n\treturn cc.cc.currentRequestCountLocked()\n}\n\nfunc (cc *ClientConn) maybeCallStateHook() {\n\tif cc.internalStateHook != nil {\n\t\tcc.internalStateHook()\n\t}\n}\n\nfunc (t *Transport) idleConnTimeout() time.Duration {\n\t// to keep things backwards compatible, we use non-zero values of\n\t// IdleConnTimeout, followed by using the IdleConnTimeout on the underlying\n\t// http1 transport, followed by 0\n\tif t.IdleConnTimeout != 0 {\n\t\treturn t.IdleConnTimeout\n\t}\n\n\tif t.t1 != nil {\n\t\treturn t.t1.IdleConnTimeout\n\t}\n\n\treturn 0\n}\n\nfunc traceGetConn(req *http.Request, hostPort string) {\n\ttrace := httptrace.ContextClientTrace(req.Context())\n\tif trace == nil || trace.GetConn == nil {\n\t\treturn\n\t}\n\ttrace.GetConn(hostPort)\n}\n\nfunc traceGotConn(req *http.Request, cc *ClientConn, reused bool) {\n\ttrace := httptrace.ContextClientTrace(req.Context())\n\tif trace == nil || trace.GotConn == nil {\n\t\treturn\n\t}\n\tci := httptrace.GotConnInfo{Conn: cc.tconn}\n\tci.Reused = reused\n\tcc.mu.Lock()\n\tci.WasIdle = len(cc.streams) == 0 && reused\n\tif ci.WasIdle && !cc.lastActive.IsZero() {\n\t\tci.IdleTime = time.Since(cc.lastActive)\n\t}\n\tcc.mu.Unlock()\n\n\ttrace.GotConn(ci)\n}\n\nfunc traceWroteHeaders(trace *httptrace.ClientTrace) {\n\tif trace != nil && trace.WroteHeaders != nil {\n\t\ttrace.WroteHeaders()\n\t}\n}\n\nfunc traceGot100Continue(trace *httptrace.ClientTrace) {\n\tif trace != nil && trace.Got100Continue != nil {\n\t\ttrace.Got100Continue()\n\t}\n}\n\nfunc traceWait100Continue(trace *httptrace.ClientTrace) {\n\tif trace != nil && trace.Wait100Continue != nil {\n\t\ttrace.Wait100Continue()\n\t}\n}\n\nfunc traceWroteRequest(trace *httptrace.ClientTrace, err error) {\n\tif trace != nil && trace.WroteRequest != nil {\n\t\ttrace.WroteRequest(httptrace.WroteRequestInfo{Err: err})\n\t}\n}\n\nfunc traceFirstResponseByte(trace *httptrace.ClientTrace) {\n\tif trace != nil && trace.GotFirstResponseByte != nil {\n\t\ttrace.GotFirstResponseByte()\n\t}\n}\n\nfunc traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error {\n\tif trace != nil {\n\t\treturn trace.Got1xxResponse\n\t}\n\treturn nil\n}\n\n// dialTLSWithContext uses tls.Dialer, added in Go 1.15, to open a TLS\n// connection.\nfunc (t *Transport) dialTLSWithContext(ctx context.Context, network, addr string, cfg *tls.Config) (*tls.Conn, error) {\n\tdialer := &tls.Dialer{\n\t\tConfig: cfg,\n\t}\n\tcn, err := dialer.DialContext(ctx, network, addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttlsCn := cn.(*tls.Conn) // DialContext comment promises this will always succeed\n\treturn tlsCn, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/unencrypted.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"net\"\n)\n\nconst nextProtoUnencryptedHTTP2 = \"unencrypted_http2\"\n\n// unencryptedNetConnFromTLSConn retrieves a net.Conn wrapped in a *tls.Conn.\n//\n// TLSNextProto functions accept a *tls.Conn.\n//\n// When passing an unencrypted HTTP/2 connection to a TLSNextProto function,\n// we pass a *tls.Conn with an underlying net.Conn containing the unencrypted connection.\n// To be extra careful about mistakes (accidentally dropping TLS encryption in a place\n// where we want it), the tls.Conn contains a net.Conn with an UnencryptedNetConn method\n// that returns the actual connection we want to use.\nfunc unencryptedNetConnFromTLSConn(tc *tls.Conn) (net.Conn, error) {\n\tconner, ok := tc.NetConn().(interface {\n\t\tUnencryptedNetConn() net.Conn\n\t})\n\tif !ok {\n\t\treturn nil, errors.New(\"http2: TLS conn unexpectedly found in unencrypted handoff\")\n\t}\n\treturn conner.UnencryptedNetConn(), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/write.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"golang.org/x/net/http/httpguts\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"golang.org/x/net/internal/httpcommon\"\n)\n\n// writeFramer is implemented by any type that is used to write frames.\ntype writeFramer interface {\n\twriteFrame(writeContext) error\n\n\t// staysWithinBuffer reports whether this writer promises that\n\t// it will only write less than or equal to size bytes, and it\n\t// won't Flush the write context.\n\tstaysWithinBuffer(size int) bool\n}\n\n// writeContext is the interface needed by the various frame writer\n// types below. All the writeFrame methods below are scheduled via the\n// frame writing scheduler (see writeScheduler in writesched.go).\n//\n// This interface is implemented by *serverConn.\n//\n// TODO: decide whether to a) use this in the client code (which didn't\n// end up using this yet, because it has a simpler design, not\n// currently implementing priorities), or b) delete this and\n// make the server code a bit more concrete.\ntype writeContext interface {\n\tFramer() *Framer\n\tFlush() error\n\tCloseConn() error\n\t// HeaderEncoder returns an HPACK encoder that writes to the\n\t// returned buffer.\n\tHeaderEncoder() (*hpack.Encoder, *bytes.Buffer)\n}\n\n// writeEndsStream reports whether w writes a frame that will transition\n// the stream to a half-closed local state. This returns false for RST_STREAM,\n// which closes the entire stream (not just the local half).\nfunc writeEndsStream(w writeFramer) bool {\n\tswitch v := w.(type) {\n\tcase *writeData:\n\t\treturn v.endStream\n\tcase *writeResHeaders:\n\t\treturn v.endStream\n\tcase nil:\n\t\t// This can only happen if the caller reuses w after it's\n\t\t// been intentionally nil'ed out to prevent use. Keep this\n\t\t// here to catch future refactoring breaking it.\n\t\tpanic(\"writeEndsStream called on nil writeFramer\")\n\t}\n\treturn false\n}\n\ntype flushFrameWriter struct{}\n\nfunc (flushFrameWriter) writeFrame(ctx writeContext) error {\n\treturn ctx.Flush()\n}\n\nfunc (flushFrameWriter) staysWithinBuffer(max int) bool { return false }\n\ntype writeSettings []Setting\n\nfunc (s writeSettings) staysWithinBuffer(max int) bool {\n\tconst settingSize = 6 // uint16 + uint32\n\treturn frameHeaderLen+settingSize*len(s) <= max\n\n}\n\nfunc (s writeSettings) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteSettings([]Setting(s)...)\n}\n\ntype writeGoAway struct {\n\tmaxStreamID uint32\n\tcode        ErrCode\n}\n\nfunc (p *writeGoAway) writeFrame(ctx writeContext) error {\n\terr := ctx.Framer().WriteGoAway(p.maxStreamID, p.code, nil)\n\tctx.Flush() // ignore error: we're hanging up on them anyway\n\treturn err\n}\n\nfunc (*writeGoAway) staysWithinBuffer(max int) bool { return false } // flushes\n\ntype writeData struct {\n\tstreamID  uint32\n\tp         []byte\n\tendStream bool\n}\n\nfunc (w *writeData) String() string {\n\treturn fmt.Sprintf(\"writeData(stream=%d, p=%d, endStream=%v)\", w.streamID, len(w.p), w.endStream)\n}\n\nfunc (w *writeData) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteData(w.streamID, w.endStream, w.p)\n}\n\nfunc (w *writeData) staysWithinBuffer(max int) bool {\n\treturn frameHeaderLen+len(w.p) <= max\n}\n\n// handlerPanicRST is the message sent from handler goroutines when\n// the handler panics.\ntype handlerPanicRST struct {\n\tStreamID uint32\n}\n\nfunc (hp handlerPanicRST) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteRSTStream(hp.StreamID, ErrCodeInternal)\n}\n\nfunc (hp handlerPanicRST) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }\n\nfunc (se StreamError) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteRSTStream(se.StreamID, se.Code)\n}\n\nfunc (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }\n\ntype writePing struct {\n\tdata [8]byte\n}\n\nfunc (w writePing) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WritePing(false, w.data)\n}\n\nfunc (w writePing) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.data) <= max }\n\ntype writePingAck struct{ pf *PingFrame }\n\nfunc (w writePingAck) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WritePing(true, w.pf.Data)\n}\n\nfunc (w writePingAck) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.pf.Data) <= max }\n\ntype writeSettingsAck struct{}\n\nfunc (writeSettingsAck) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteSettingsAck()\n}\n\nfunc (writeSettingsAck) staysWithinBuffer(max int) bool { return frameHeaderLen <= max }\n\n// splitHeaderBlock splits headerBlock into fragments so that each fragment fits\n// in a single frame, then calls fn for each fragment. firstFrag/lastFrag are true\n// for the first/last fragment, respectively.\nfunc splitHeaderBlock(ctx writeContext, headerBlock []byte, fn func(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error) error {\n\t// For now we're lazy and just pick the minimum MAX_FRAME_SIZE\n\t// that all peers must support (16KB). Later we could care\n\t// more and send larger frames if the peer advertised it, but\n\t// there's little point. Most headers are small anyway (so we\n\t// generally won't have CONTINUATION frames), and extra frames\n\t// only waste 9 bytes anyway.\n\tconst maxFrameSize = 16384\n\n\tfirst := true\n\tfor len(headerBlock) > 0 {\n\t\tfrag := headerBlock\n\t\tif len(frag) > maxFrameSize {\n\t\t\tfrag = frag[:maxFrameSize]\n\t\t}\n\t\theaderBlock = headerBlock[len(frag):]\n\t\tif err := fn(ctx, frag, first, len(headerBlock) == 0); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfirst = false\n\t}\n\treturn nil\n}\n\n// writeResHeaders is a request to write a HEADERS and 0+ CONTINUATION frames\n// for HTTP response headers or trailers from a server handler.\ntype writeResHeaders struct {\n\tstreamID    uint32\n\thttpResCode int         // 0 means no \":status\" line\n\th           http.Header // may be nil\n\ttrailers    []string    // if non-nil, which keys of h to write. nil means all.\n\tendStream   bool\n\n\tdate          string\n\tcontentType   string\n\tcontentLength string\n}\n\nfunc encKV(enc *hpack.Encoder, k, v string) {\n\tif VerboseLogs {\n\t\tlog.Printf(\"http2: server encoding header %q = %q\", k, v)\n\t}\n\tenc.WriteField(hpack.HeaderField{Name: k, Value: v})\n}\n\nfunc (w *writeResHeaders) staysWithinBuffer(max int) bool {\n\t// TODO: this is a common one. It'd be nice to return true\n\t// here and get into the fast path if we could be clever and\n\t// calculate the size fast enough, or at least a conservative\n\t// upper bound that usually fires. (Maybe if w.h and\n\t// w.trailers are nil, so we don't need to enumerate it.)\n\t// Otherwise I'm afraid that just calculating the length to\n\t// answer this question would be slower than the ~2µs benefit.\n\treturn false\n}\n\nfunc (w *writeResHeaders) writeFrame(ctx writeContext) error {\n\tenc, buf := ctx.HeaderEncoder()\n\tbuf.Reset()\n\n\tif w.httpResCode != 0 {\n\t\tencKV(enc, \":status\", httpCodeString(w.httpResCode))\n\t}\n\n\tencodeHeaders(enc, w.h, w.trailers)\n\n\tif w.contentType != \"\" {\n\t\tencKV(enc, \"content-type\", w.contentType)\n\t}\n\tif w.contentLength != \"\" {\n\t\tencKV(enc, \"content-length\", w.contentLength)\n\t}\n\tif w.date != \"\" {\n\t\tencKV(enc, \"date\", w.date)\n\t}\n\n\theaderBlock := buf.Bytes()\n\tif len(headerBlock) == 0 && w.trailers == nil {\n\t\tpanic(\"unexpected empty hpack\")\n\t}\n\n\treturn splitHeaderBlock(ctx, headerBlock, w.writeHeaderBlock)\n}\n\nfunc (w *writeResHeaders) writeHeaderBlock(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error {\n\tif firstFrag {\n\t\treturn ctx.Framer().WriteHeaders(HeadersFrameParam{\n\t\t\tStreamID:      w.streamID,\n\t\t\tBlockFragment: frag,\n\t\t\tEndStream:     w.endStream,\n\t\t\tEndHeaders:    lastFrag,\n\t\t})\n\t} else {\n\t\treturn ctx.Framer().WriteContinuation(w.streamID, lastFrag, frag)\n\t}\n}\n\n// writePushPromise is a request to write a PUSH_PROMISE and 0+ CONTINUATION frames.\ntype writePushPromise struct {\n\tstreamID uint32   // pusher stream\n\tmethod   string   // for :method\n\turl      *url.URL // for :scheme, :authority, :path\n\th        http.Header\n\n\t// Creates an ID for a pushed stream. This runs on serveG just before\n\t// the frame is written. The returned ID is copied to promisedID.\n\tallocatePromisedID func() (uint32, error)\n\tpromisedID         uint32\n}\n\nfunc (w *writePushPromise) staysWithinBuffer(max int) bool {\n\t// TODO: see writeResHeaders.staysWithinBuffer\n\treturn false\n}\n\nfunc (w *writePushPromise) writeFrame(ctx writeContext) error {\n\tenc, buf := ctx.HeaderEncoder()\n\tbuf.Reset()\n\n\tencKV(enc, \":method\", w.method)\n\tencKV(enc, \":scheme\", w.url.Scheme)\n\tencKV(enc, \":authority\", w.url.Host)\n\tencKV(enc, \":path\", w.url.RequestURI())\n\tencodeHeaders(enc, w.h, nil)\n\n\theaderBlock := buf.Bytes()\n\tif len(headerBlock) == 0 {\n\t\tpanic(\"unexpected empty hpack\")\n\t}\n\n\treturn splitHeaderBlock(ctx, headerBlock, w.writeHeaderBlock)\n}\n\nfunc (w *writePushPromise) writeHeaderBlock(ctx writeContext, frag []byte, firstFrag, lastFrag bool) error {\n\tif firstFrag {\n\t\treturn ctx.Framer().WritePushPromise(PushPromiseParam{\n\t\t\tStreamID:      w.streamID,\n\t\t\tPromiseID:     w.promisedID,\n\t\t\tBlockFragment: frag,\n\t\t\tEndHeaders:    lastFrag,\n\t\t})\n\t} else {\n\t\treturn ctx.Framer().WriteContinuation(w.streamID, lastFrag, frag)\n\t}\n}\n\ntype write100ContinueHeadersFrame struct {\n\tstreamID uint32\n}\n\nfunc (w write100ContinueHeadersFrame) writeFrame(ctx writeContext) error {\n\tenc, buf := ctx.HeaderEncoder()\n\tbuf.Reset()\n\tencKV(enc, \":status\", \"100\")\n\treturn ctx.Framer().WriteHeaders(HeadersFrameParam{\n\t\tStreamID:      w.streamID,\n\t\tBlockFragment: buf.Bytes(),\n\t\tEndStream:     false,\n\t\tEndHeaders:    true,\n\t})\n}\n\nfunc (w write100ContinueHeadersFrame) staysWithinBuffer(max int) bool {\n\t// Sloppy but conservative:\n\treturn 9+2*(len(\":status\")+len(\"100\")) <= max\n}\n\ntype writeWindowUpdate struct {\n\tstreamID uint32 // or 0 for conn-level\n\tn        uint32\n}\n\nfunc (wu writeWindowUpdate) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max }\n\nfunc (wu writeWindowUpdate) writeFrame(ctx writeContext) error {\n\treturn ctx.Framer().WriteWindowUpdate(wu.streamID, wu.n)\n}\n\n// encodeHeaders encodes an http.Header. If keys is not nil, then (k, h[k])\n// is encoded only if k is in keys.\nfunc encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) {\n\tif keys == nil {\n\t\tsorter := sorterPool.Get().(*sorter)\n\t\t// Using defer here, since the returned keys from the\n\t\t// sorter.Keys method is only valid until the sorter\n\t\t// is returned:\n\t\tdefer sorterPool.Put(sorter)\n\t\tkeys = sorter.Keys(h)\n\t}\n\tfor _, k := range keys {\n\t\tvv := h[k]\n\t\tk, ascii := httpcommon.LowerHeader(k)\n\t\tif !ascii {\n\t\t\t// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header\n\t\t\t// field names have to be ASCII characters (just as in HTTP/1.x).\n\t\t\tcontinue\n\t\t}\n\t\tif !validWireHeaderFieldName(k) {\n\t\t\t// Skip it as backup paranoia. Per\n\t\t\t// golang.org/issue/14048, these should\n\t\t\t// already be rejected at a higher level.\n\t\t\tcontinue\n\t\t}\n\t\tisTE := k == \"transfer-encoding\"\n\t\tfor _, v := range vv {\n\t\t\tif !httpguts.ValidHeaderFieldValue(v) {\n\t\t\t\t// TODO: return an error? golang.org/issue/14048\n\t\t\t\t// For now just omit it.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// TODO: more of \"8.1.2.2 Connection-Specific Header Fields\"\n\t\t\tif isTE && v != \"trailers\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tencKV(enc, k, v)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/writesched.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport \"fmt\"\n\n// WriteScheduler is the interface implemented by HTTP/2 write schedulers.\n// Methods are never called concurrently.\ntype WriteScheduler interface {\n\t// OpenStream opens a new stream in the write scheduler.\n\t// It is illegal to call this with streamID=0 or with a streamID that is\n\t// already open -- the call may panic.\n\tOpenStream(streamID uint32, options OpenStreamOptions)\n\n\t// CloseStream closes a stream in the write scheduler. Any frames queued on\n\t// this stream should be discarded. It is illegal to call this on a stream\n\t// that is not open -- the call may panic.\n\tCloseStream(streamID uint32)\n\n\t// AdjustStream adjusts the priority of the given stream. This may be called\n\t// on a stream that has not yet been opened or has been closed. Note that\n\t// RFC 7540 allows PRIORITY frames to be sent on streams in any state. See:\n\t// https://tools.ietf.org/html/rfc7540#section-5.1\n\tAdjustStream(streamID uint32, priority PriorityParam)\n\n\t// Push queues a frame in the scheduler. In most cases, this will not be\n\t// called with wr.StreamID()!=0 unless that stream is currently open. The one\n\t// exception is RST_STREAM frames, which may be sent on idle or closed streams.\n\tPush(wr FrameWriteRequest)\n\n\t// Pop dequeues the next frame to write. Returns false if no frames can\n\t// be written. Frames with a given wr.StreamID() are Pop'd in the same\n\t// order they are Push'd, except RST_STREAM frames. No frames should be\n\t// discarded except by CloseStream.\n\tPop() (wr FrameWriteRequest, ok bool)\n}\n\n// OpenStreamOptions specifies extra options for WriteScheduler.OpenStream.\ntype OpenStreamOptions struct {\n\t// PusherID is zero if the stream was initiated by the client. Otherwise,\n\t// PusherID names the stream that pushed the newly opened stream.\n\tPusherID uint32\n\t// priority is used to set the priority of the newly opened stream.\n\tpriority PriorityParam\n}\n\n// FrameWriteRequest is a request to write a frame.\ntype FrameWriteRequest struct {\n\t// write is the interface value that does the writing, once the\n\t// WriteScheduler has selected this frame to write. The write\n\t// functions are all defined in write.go.\n\twrite writeFramer\n\n\t// stream is the stream on which this frame will be written.\n\t// nil for non-stream frames like PING and SETTINGS.\n\t// nil for RST_STREAM streams, which use the StreamError.StreamID field instead.\n\tstream *stream\n\n\t// done, if non-nil, must be a buffered channel with space for\n\t// 1 message and is sent the return value from write (or an\n\t// earlier error) when the frame has been written.\n\tdone chan error\n}\n\n// StreamID returns the id of the stream this frame will be written to.\n// 0 is used for non-stream frames such as PING and SETTINGS.\nfunc (wr FrameWriteRequest) StreamID() uint32 {\n\tif wr.stream == nil {\n\t\tif se, ok := wr.write.(StreamError); ok {\n\t\t\t// (*serverConn).resetStream doesn't set\n\t\t\t// stream because it doesn't necessarily have\n\t\t\t// one. So special case this type of write\n\t\t\t// message.\n\t\t\treturn se.StreamID\n\t\t}\n\t\treturn 0\n\t}\n\treturn wr.stream.id\n}\n\n// isControl reports whether wr is a control frame for MaxQueuedControlFrames\n// purposes. That includes non-stream frames and RST_STREAM frames.\nfunc (wr FrameWriteRequest) isControl() bool {\n\treturn wr.stream == nil\n}\n\n// DataSize returns the number of flow control bytes that must be consumed\n// to write this entire frame. This is 0 for non-DATA frames.\nfunc (wr FrameWriteRequest) DataSize() int {\n\tif wd, ok := wr.write.(*writeData); ok {\n\t\treturn len(wd.p)\n\t}\n\treturn 0\n}\n\n// Consume consumes min(n, available) bytes from this frame, where available\n// is the number of flow control bytes available on the stream. Consume returns\n// 0, 1, or 2 frames, where the integer return value gives the number of frames\n// returned.\n//\n// If flow control prevents consuming any bytes, this returns (_, _, 0). If\n// the entire frame was consumed, this returns (wr, _, 1). Otherwise, this\n// returns (consumed, rest, 2), where 'consumed' contains the consumed bytes and\n// 'rest' contains the remaining bytes. The consumed bytes are deducted from the\n// underlying stream's flow control budget.\nfunc (wr FrameWriteRequest) Consume(n int32) (FrameWriteRequest, FrameWriteRequest, int) {\n\tvar empty FrameWriteRequest\n\n\t// Non-DATA frames are always consumed whole.\n\twd, ok := wr.write.(*writeData)\n\tif !ok || len(wd.p) == 0 {\n\t\treturn wr, empty, 1\n\t}\n\n\t// Might need to split after applying limits.\n\tallowed := wr.stream.flow.available()\n\tif n < allowed {\n\t\tallowed = n\n\t}\n\tif wr.stream.sc.maxFrameSize < allowed {\n\t\tallowed = wr.stream.sc.maxFrameSize\n\t}\n\tif allowed <= 0 {\n\t\treturn empty, empty, 0\n\t}\n\tif len(wd.p) > int(allowed) {\n\t\twr.stream.flow.take(allowed)\n\t\tconsumed := FrameWriteRequest{\n\t\t\tstream: wr.stream,\n\t\t\twrite: &writeData{\n\t\t\t\tstreamID: wd.streamID,\n\t\t\t\tp:        wd.p[:allowed],\n\t\t\t\t// Even if the original had endStream set, there\n\t\t\t\t// are bytes remaining because len(wd.p) > allowed,\n\t\t\t\t// so we know endStream is false.\n\t\t\t\tendStream: false,\n\t\t\t},\n\t\t\t// Our caller is blocking on the final DATA frame, not\n\t\t\t// this intermediate frame, so no need to wait.\n\t\t\tdone: nil,\n\t\t}\n\t\trest := FrameWriteRequest{\n\t\t\tstream: wr.stream,\n\t\t\twrite: &writeData{\n\t\t\t\tstreamID:  wd.streamID,\n\t\t\t\tp:         wd.p[allowed:],\n\t\t\t\tendStream: wd.endStream,\n\t\t\t},\n\t\t\tdone: wr.done,\n\t\t}\n\t\treturn consumed, rest, 2\n\t}\n\n\t// The frame is consumed whole.\n\t// NB: This cast cannot overflow because allowed is <= math.MaxInt32.\n\twr.stream.flow.take(int32(len(wd.p)))\n\treturn wr, empty, 1\n}\n\n// String is for debugging only.\nfunc (wr FrameWriteRequest) String() string {\n\tvar des string\n\tif s, ok := wr.write.(fmt.Stringer); ok {\n\t\tdes = s.String()\n\t} else {\n\t\tdes = fmt.Sprintf(\"%T\", wr.write)\n\t}\n\treturn fmt.Sprintf(\"[FrameWriteRequest stream=%d, ch=%v, writer=%v]\", wr.StreamID(), wr.done != nil, des)\n}\n\n// replyToWriter sends err to wr.done and panics if the send must block\n// This does nothing if wr.done is nil.\nfunc (wr *FrameWriteRequest) replyToWriter(err error) {\n\tif wr.done == nil {\n\t\treturn\n\t}\n\tselect {\n\tcase wr.done <- err:\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unbuffered done channel passed in for type %T\", wr.write))\n\t}\n\twr.write = nil // prevent use (assume it's tainted after wr.done send)\n}\n\n// writeQueue is used by implementations of WriteScheduler.\n//\n// Each writeQueue contains a queue of FrameWriteRequests, meant to store all\n// FrameWriteRequests associated with a given stream. This is implemented as a\n// two-stage queue: currQueue[currPos:] and nextQueue. Removing an item is done\n// by incrementing currPos of currQueue. Adding an item is done by appending it\n// to the nextQueue. If currQueue is empty when trying to remove an item, we\n// can swap currQueue and nextQueue to remedy the situation.\n// This two-stage queue is analogous to the use of two lists in Okasaki's\n// purely functional queue but without the overhead of reversing the list when\n// swapping stages.\n//\n// writeQueue also contains prev and next, this can be used by implementations\n// of WriteScheduler to construct data structures that represent the order of\n// writing between different streams (e.g. circular linked list).\ntype writeQueue struct {\n\tcurrQueue []FrameWriteRequest\n\tnextQueue []FrameWriteRequest\n\tcurrPos   int\n\n\tprev, next *writeQueue\n}\n\nfunc (q *writeQueue) empty() bool {\n\treturn (len(q.currQueue) - q.currPos + len(q.nextQueue)) == 0\n}\n\nfunc (q *writeQueue) push(wr FrameWriteRequest) {\n\tq.nextQueue = append(q.nextQueue, wr)\n}\n\nfunc (q *writeQueue) shift() FrameWriteRequest {\n\tif q.empty() {\n\t\tpanic(\"invalid use of queue\")\n\t}\n\tif q.currPos >= len(q.currQueue) {\n\t\tq.currQueue, q.currPos, q.nextQueue = q.nextQueue, 0, q.currQueue[:0]\n\t}\n\twr := q.currQueue[q.currPos]\n\tq.currQueue[q.currPos] = FrameWriteRequest{}\n\tq.currPos++\n\treturn wr\n}\n\nfunc (q *writeQueue) peek() *FrameWriteRequest {\n\tif q.currPos < len(q.currQueue) {\n\t\treturn &q.currQueue[q.currPos]\n\t}\n\tif len(q.nextQueue) > 0 {\n\t\treturn &q.nextQueue[0]\n\t}\n\treturn nil\n}\n\n// consume consumes up to n bytes from q.s[0]. If the frame is\n// entirely consumed, it is removed from the queue. If the frame\n// is partially consumed, the frame is kept with the consumed\n// bytes removed. Returns true iff any bytes were consumed.\nfunc (q *writeQueue) consume(n int32) (FrameWriteRequest, bool) {\n\tif q.empty() {\n\t\treturn FrameWriteRequest{}, false\n\t}\n\tconsumed, rest, numresult := q.peek().Consume(n)\n\tswitch numresult {\n\tcase 0:\n\t\treturn FrameWriteRequest{}, false\n\tcase 1:\n\t\tq.shift()\n\tcase 2:\n\t\t*q.peek() = rest\n\t}\n\treturn consumed, true\n}\n\ntype writeQueuePool []*writeQueue\n\n// put inserts an unused writeQueue into the pool.\nfunc (p *writeQueuePool) put(q *writeQueue) {\n\tfor i := range q.currQueue {\n\t\tq.currQueue[i] = FrameWriteRequest{}\n\t}\n\tfor i := range q.nextQueue {\n\t\tq.nextQueue[i] = FrameWriteRequest{}\n\t}\n\tq.currQueue = q.currQueue[:0]\n\tq.nextQueue = q.nextQueue[:0]\n\tq.currPos = 0\n\t*p = append(*p, q)\n}\n\n// get returns an empty writeQueue.\nfunc (p *writeQueuePool) get() *writeQueue {\n\tln := len(*p)\n\tif ln == 0 {\n\t\treturn new(writeQueue)\n\t}\n\tx := ln - 1\n\tq := (*p)[x]\n\t(*p)[x] = nil\n\t*p = (*p)[:x]\n\treturn q\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sort\"\n)\n\n// RFC 7540, Section 5.3.5: the default weight is 16.\nconst priorityDefaultWeightRFC7540 = 15 // 16 = 15 + 1\n\n// PriorityWriteSchedulerConfig configures a priorityWriteScheduler.\ntype PriorityWriteSchedulerConfig struct {\n\t// MaxClosedNodesInTree controls the maximum number of closed streams to\n\t// retain in the priority tree. Setting this to zero saves a small amount\n\t// of memory at the cost of performance.\n\t//\n\t// See RFC 7540, Section 5.3.4:\n\t//   \"It is possible for a stream to become closed while prioritization\n\t//   information ... is in transit. ... This potentially creates suboptimal\n\t//   prioritization, since the stream could be given a priority that is\n\t//   different from what is intended. To avoid these problems, an endpoint\n\t//   SHOULD retain stream prioritization state for a period after streams\n\t//   become closed. The longer state is retained, the lower the chance that\n\t//   streams are assigned incorrect or default priority values.\"\n\tMaxClosedNodesInTree int\n\n\t// MaxIdleNodesInTree controls the maximum number of idle streams to\n\t// retain in the priority tree. Setting this to zero saves a small amount\n\t// of memory at the cost of performance.\n\t//\n\t// See RFC 7540, Section 5.3.4:\n\t//   Similarly, streams that are in the \"idle\" state can be assigned\n\t//   priority or become a parent of other streams. This allows for the\n\t//   creation of a grouping node in the dependency tree, which enables\n\t//   more flexible expressions of priority. Idle streams begin with a\n\t//   default priority (Section 5.3.5).\n\tMaxIdleNodesInTree int\n\n\t// ThrottleOutOfOrderWrites enables write throttling to help ensure that\n\t// data is delivered in priority order. This works around a race where\n\t// stream B depends on stream A and both streams are about to call Write\n\t// to queue DATA frames. If B wins the race, a naive scheduler would eagerly\n\t// write as much data from B as possible, but this is suboptimal because A\n\t// is a higher-priority stream. With throttling enabled, we write a small\n\t// amount of data from B to minimize the amount of bandwidth that B can\n\t// steal from A.\n\tThrottleOutOfOrderWrites bool\n}\n\n// NewPriorityWriteScheduler constructs a WriteScheduler that schedules\n// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3.\n// If cfg is nil, default options are used.\nfunc NewPriorityWriteScheduler(cfg *PriorityWriteSchedulerConfig) WriteScheduler {\n\treturn newPriorityWriteSchedulerRFC7540(cfg)\n}\n\nfunc newPriorityWriteSchedulerRFC7540(cfg *PriorityWriteSchedulerConfig) WriteScheduler {\n\tif cfg == nil {\n\t\t// For justification of these defaults, see:\n\t\t// https://docs.google.com/document/d/1oLhNg1skaWD4_DtaoCxdSRN5erEXrH-KnLrMwEpOtFY\n\t\tcfg = &PriorityWriteSchedulerConfig{\n\t\t\tMaxClosedNodesInTree:     10,\n\t\t\tMaxIdleNodesInTree:       10,\n\t\t\tThrottleOutOfOrderWrites: false,\n\t\t}\n\t}\n\n\tws := &priorityWriteSchedulerRFC7540{\n\t\tnodes:                make(map[uint32]*priorityNodeRFC7540),\n\t\tmaxClosedNodesInTree: cfg.MaxClosedNodesInTree,\n\t\tmaxIdleNodesInTree:   cfg.MaxIdleNodesInTree,\n\t\tenableWriteThrottle:  cfg.ThrottleOutOfOrderWrites,\n\t}\n\tws.nodes[0] = &ws.root\n\tif cfg.ThrottleOutOfOrderWrites {\n\t\tws.writeThrottleLimit = 1024\n\t} else {\n\t\tws.writeThrottleLimit = math.MaxInt32\n\t}\n\treturn ws\n}\n\ntype priorityNodeStateRFC7540 int\n\nconst (\n\tpriorityNodeOpenRFC7540 priorityNodeStateRFC7540 = iota\n\tpriorityNodeClosedRFC7540\n\tpriorityNodeIdleRFC7540\n)\n\n// priorityNodeRFC7540 is a node in an HTTP/2 priority tree.\n// Each node is associated with a single stream ID.\n// See RFC 7540, Section 5.3.\ntype priorityNodeRFC7540 struct {\n\tq            writeQueue               // queue of pending frames to write\n\tid           uint32                   // id of the stream, or 0 for the root of the tree\n\tweight       uint8                    // the actual weight is weight+1, so the value is in [1,256]\n\tstate        priorityNodeStateRFC7540 // open | closed | idle\n\tbytes        int64                    // number of bytes written by this node, or 0 if closed\n\tsubtreeBytes int64                    // sum(node.bytes) of all nodes in this subtree\n\n\t// These links form the priority tree.\n\tparent     *priorityNodeRFC7540\n\tkids       *priorityNodeRFC7540 // start of the kids list\n\tprev, next *priorityNodeRFC7540 // doubly-linked list of siblings\n}\n\nfunc (n *priorityNodeRFC7540) setParent(parent *priorityNodeRFC7540) {\n\tif n == parent {\n\t\tpanic(\"setParent to self\")\n\t}\n\tif n.parent == parent {\n\t\treturn\n\t}\n\t// Unlink from current parent.\n\tif parent := n.parent; parent != nil {\n\t\tif n.prev == nil {\n\t\t\tparent.kids = n.next\n\t\t} else {\n\t\t\tn.prev.next = n.next\n\t\t}\n\t\tif n.next != nil {\n\t\t\tn.next.prev = n.prev\n\t\t}\n\t}\n\t// Link to new parent.\n\t// If parent=nil, remove n from the tree.\n\t// Always insert at the head of parent.kids (this is assumed by walkReadyInOrder).\n\tn.parent = parent\n\tif parent == nil {\n\t\tn.next = nil\n\t\tn.prev = nil\n\t} else {\n\t\tn.next = parent.kids\n\t\tn.prev = nil\n\t\tif n.next != nil {\n\t\t\tn.next.prev = n\n\t\t}\n\t\tparent.kids = n\n\t}\n}\n\nfunc (n *priorityNodeRFC7540) addBytes(b int64) {\n\tn.bytes += b\n\tfor ; n != nil; n = n.parent {\n\t\tn.subtreeBytes += b\n\t}\n}\n\n// walkReadyInOrder iterates over the tree in priority order, calling f for each node\n// with a non-empty write queue. When f returns true, this function returns true and the\n// walk halts. tmp is used as scratch space for sorting.\n//\n// f(n, openParent) takes two arguments: the node to visit, n, and a bool that is true\n// if any ancestor p of n is still open (ignoring the root node).\nfunc (n *priorityNodeRFC7540) walkReadyInOrder(openParent bool, tmp *[]*priorityNodeRFC7540, f func(*priorityNodeRFC7540, bool) bool) bool {\n\tif !n.q.empty() && f(n, openParent) {\n\t\treturn true\n\t}\n\tif n.kids == nil {\n\t\treturn false\n\t}\n\n\t// Don't consider the root \"open\" when updating openParent since\n\t// we can't send data frames on the root stream (only control frames).\n\tif n.id != 0 {\n\t\topenParent = openParent || (n.state == priorityNodeOpenRFC7540)\n\t}\n\n\t// Common case: only one kid or all kids have the same weight.\n\t// Some clients don't use weights; other clients (like web browsers)\n\t// use mostly-linear priority trees.\n\tw := n.kids.weight\n\tneedSort := false\n\tfor k := n.kids.next; k != nil; k = k.next {\n\t\tif k.weight != w {\n\t\t\tneedSort = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !needSort {\n\t\tfor k := n.kids; k != nil; k = k.next {\n\t\t\tif k.walkReadyInOrder(openParent, tmp, f) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\n\t// Uncommon case: sort the child nodes. We remove the kids from the parent,\n\t// then re-insert after sorting so we can reuse tmp for future sort calls.\n\t*tmp = (*tmp)[:0]\n\tfor n.kids != nil {\n\t\t*tmp = append(*tmp, n.kids)\n\t\tn.kids.setParent(nil)\n\t}\n\tsort.Sort(sortPriorityNodeSiblingsRFC7540(*tmp))\n\tfor i := len(*tmp) - 1; i >= 0; i-- {\n\t\t(*tmp)[i].setParent(n) // setParent inserts at the head of n.kids\n\t}\n\tfor k := n.kids; k != nil; k = k.next {\n\t\tif k.walkReadyInOrder(openParent, tmp, f) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\ntype sortPriorityNodeSiblingsRFC7540 []*priorityNodeRFC7540\n\nfunc (z sortPriorityNodeSiblingsRFC7540) Len() int      { return len(z) }\nfunc (z sortPriorityNodeSiblingsRFC7540) Swap(i, k int) { z[i], z[k] = z[k], z[i] }\nfunc (z sortPriorityNodeSiblingsRFC7540) Less(i, k int) bool {\n\t// Prefer the subtree that has sent fewer bytes relative to its weight.\n\t// See sections 5.3.2 and 5.3.4.\n\twi, bi := float64(z[i].weight)+1, float64(z[i].subtreeBytes)\n\twk, bk := float64(z[k].weight)+1, float64(z[k].subtreeBytes)\n\tif bi == 0 && bk == 0 {\n\t\treturn wi >= wk\n\t}\n\tif bk == 0 {\n\t\treturn false\n\t}\n\treturn bi/bk <= wi/wk\n}\n\ntype priorityWriteSchedulerRFC7540 struct {\n\t// root is the root of the priority tree, where root.id = 0.\n\t// The root queues control frames that are not associated with any stream.\n\troot priorityNodeRFC7540\n\n\t// nodes maps stream ids to priority tree nodes.\n\tnodes map[uint32]*priorityNodeRFC7540\n\n\t// maxID is the maximum stream id in nodes.\n\tmaxID uint32\n\n\t// lists of nodes that have been closed or are idle, but are kept in\n\t// the tree for improved prioritization. When the lengths exceed either\n\t// maxClosedNodesInTree or maxIdleNodesInTree, old nodes are discarded.\n\tclosedNodes, idleNodes []*priorityNodeRFC7540\n\n\t// From the config.\n\tmaxClosedNodesInTree int\n\tmaxIdleNodesInTree   int\n\twriteThrottleLimit   int32\n\tenableWriteThrottle  bool\n\n\t// tmp is scratch space for priorityNode.walkReadyInOrder to reduce allocations.\n\ttmp []*priorityNodeRFC7540\n\n\t// pool of empty queues for reuse.\n\tqueuePool writeQueuePool\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) OpenStream(streamID uint32, options OpenStreamOptions) {\n\t// The stream may be currently idle but cannot be opened or closed.\n\tif curr := ws.nodes[streamID]; curr != nil {\n\t\tif curr.state != priorityNodeIdleRFC7540 {\n\t\t\tpanic(fmt.Sprintf(\"stream %d already opened\", streamID))\n\t\t}\n\t\tcurr.state = priorityNodeOpenRFC7540\n\t\treturn\n\t}\n\n\t// RFC 7540, Section 5.3.5:\n\t//  \"All streams are initially assigned a non-exclusive dependency on stream 0x0.\n\t//  Pushed streams initially depend on their associated stream. In both cases,\n\t//  streams are assigned a default weight of 16.\"\n\tparent := ws.nodes[options.PusherID]\n\tif parent == nil {\n\t\tparent = &ws.root\n\t}\n\tn := &priorityNodeRFC7540{\n\t\tq:      *ws.queuePool.get(),\n\t\tid:     streamID,\n\t\tweight: priorityDefaultWeightRFC7540,\n\t\tstate:  priorityNodeOpenRFC7540,\n\t}\n\tn.setParent(parent)\n\tws.nodes[streamID] = n\n\tif streamID > ws.maxID {\n\t\tws.maxID = streamID\n\t}\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) CloseStream(streamID uint32) {\n\tif streamID == 0 {\n\t\tpanic(\"violation of WriteScheduler interface: cannot close stream 0\")\n\t}\n\tif ws.nodes[streamID] == nil {\n\t\tpanic(fmt.Sprintf(\"violation of WriteScheduler interface: unknown stream %d\", streamID))\n\t}\n\tif ws.nodes[streamID].state != priorityNodeOpenRFC7540 {\n\t\tpanic(fmt.Sprintf(\"violation of WriteScheduler interface: stream %d already closed\", streamID))\n\t}\n\n\tn := ws.nodes[streamID]\n\tn.state = priorityNodeClosedRFC7540\n\tn.addBytes(-n.bytes)\n\n\tq := n.q\n\tws.queuePool.put(&q)\n\tif ws.maxClosedNodesInTree > 0 {\n\t\tws.addClosedOrIdleNode(&ws.closedNodes, ws.maxClosedNodesInTree, n)\n\t} else {\n\t\tws.removeNode(n)\n\t}\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) AdjustStream(streamID uint32, priority PriorityParam) {\n\tif streamID == 0 {\n\t\tpanic(\"adjustPriority on root\")\n\t}\n\n\t// If streamID does not exist, there are two cases:\n\t// - A closed stream that has been removed (this will have ID <= maxID)\n\t// - An idle stream that is being used for \"grouping\" (this will have ID > maxID)\n\tn := ws.nodes[streamID]\n\tif n == nil {\n\t\tif streamID <= ws.maxID || ws.maxIdleNodesInTree == 0 {\n\t\t\treturn\n\t\t}\n\t\tws.maxID = streamID\n\t\tn = &priorityNodeRFC7540{\n\t\t\tq:      *ws.queuePool.get(),\n\t\t\tid:     streamID,\n\t\t\tweight: priorityDefaultWeightRFC7540,\n\t\t\tstate:  priorityNodeIdleRFC7540,\n\t\t}\n\t\tn.setParent(&ws.root)\n\t\tws.nodes[streamID] = n\n\t\tws.addClosedOrIdleNode(&ws.idleNodes, ws.maxIdleNodesInTree, n)\n\t}\n\n\t// Section 5.3.1: A dependency on a stream that is not currently in the tree\n\t// results in that stream being given a default priority (Section 5.3.5).\n\tparent := ws.nodes[priority.StreamDep]\n\tif parent == nil {\n\t\tn.setParent(&ws.root)\n\t\tn.weight = priorityDefaultWeightRFC7540\n\t\treturn\n\t}\n\n\t// Ignore if the client tries to make a node its own parent.\n\tif n == parent {\n\t\treturn\n\t}\n\n\t// Section 5.3.3:\n\t//   \"If a stream is made dependent on one of its own dependencies, the\n\t//   formerly dependent stream is first moved to be dependent on the\n\t//   reprioritized stream's previous parent. The moved dependency retains\n\t//   its weight.\"\n\t//\n\t// That is: if parent depends on n, move parent to depend on n.parent.\n\tfor x := parent.parent; x != nil; x = x.parent {\n\t\tif x == n {\n\t\t\tparent.setParent(n.parent)\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Section 5.3.3: The exclusive flag causes the stream to become the sole\n\t// dependency of its parent stream, causing other dependencies to become\n\t// dependent on the exclusive stream.\n\tif priority.Exclusive {\n\t\tk := parent.kids\n\t\tfor k != nil {\n\t\t\tnext := k.next\n\t\t\tif k != n {\n\t\t\t\tk.setParent(n)\n\t\t\t}\n\t\t\tk = next\n\t\t}\n\t}\n\n\tn.setParent(parent)\n\tn.weight = priority.Weight\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) Push(wr FrameWriteRequest) {\n\tvar n *priorityNodeRFC7540\n\tif wr.isControl() {\n\t\tn = &ws.root\n\t} else {\n\t\tid := wr.StreamID()\n\t\tn = ws.nodes[id]\n\t\tif n == nil {\n\t\t\t// id is an idle or closed stream. wr should not be a HEADERS or\n\t\t\t// DATA frame. In other case, we push wr onto the root, rather\n\t\t\t// than creating a new priorityNode.\n\t\t\tif wr.DataSize() > 0 {\n\t\t\t\tpanic(\"add DATA on non-open stream\")\n\t\t\t}\n\t\t\tn = &ws.root\n\t\t}\n\t}\n\tn.q.push(wr)\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) Pop() (wr FrameWriteRequest, ok bool) {\n\tws.root.walkReadyInOrder(false, &ws.tmp, func(n *priorityNodeRFC7540, openParent bool) bool {\n\t\tlimit := int32(math.MaxInt32)\n\t\tif openParent {\n\t\t\tlimit = ws.writeThrottleLimit\n\t\t}\n\t\twr, ok = n.q.consume(limit)\n\t\tif !ok {\n\t\t\treturn false\n\t\t}\n\t\tn.addBytes(int64(wr.DataSize()))\n\t\t// If B depends on A and B continuously has data available but A\n\t\t// does not, gradually increase the throttling limit to allow B to\n\t\t// steal more and more bandwidth from A.\n\t\tif openParent {\n\t\t\tws.writeThrottleLimit += 1024\n\t\t\tif ws.writeThrottleLimit < 0 {\n\t\t\t\tws.writeThrottleLimit = math.MaxInt32\n\t\t\t}\n\t\t} else if ws.enableWriteThrottle {\n\t\t\tws.writeThrottleLimit = 1024\n\t\t}\n\t\treturn true\n\t})\n\treturn wr, ok\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) addClosedOrIdleNode(list *[]*priorityNodeRFC7540, maxSize int, n *priorityNodeRFC7540) {\n\tif maxSize == 0 {\n\t\treturn\n\t}\n\tif len(*list) == maxSize {\n\t\t// Remove the oldest node, then shift left.\n\t\tws.removeNode((*list)[0])\n\t\tx := (*list)[1:]\n\t\tcopy(*list, x)\n\t\t*list = (*list)[:len(x)]\n\t}\n\t*list = append(*list, n)\n}\n\nfunc (ws *priorityWriteSchedulerRFC7540) removeNode(n *priorityNodeRFC7540) {\n\tfor n.kids != nil {\n\t\tn.kids.setParent(n.parent)\n\t}\n\tn.setParent(nil)\n\tdelete(ws.nodes, n.id)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\ntype streamMetadata struct {\n\tlocation *writeQueue\n\tpriority PriorityParam\n}\n\ntype priorityWriteSchedulerRFC9218 struct {\n\t// control contains control frames (SETTINGS, PING, etc.).\n\tcontrol writeQueue\n\n\t// heads contain the head of a circular list of streams.\n\t// We put these heads within a nested array that represents urgency and\n\t// incremental, as defined in\n\t// https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters.\n\t// 8 represents u=0 up to u=7, and 2 represents i=false and i=true.\n\theads [8][2]*writeQueue\n\n\t// streams contains a mapping between each stream ID and their metadata, so\n\t// we can quickly locate them when needing to, for example, adjust their\n\t// priority.\n\tstreams map[uint32]streamMetadata\n\n\t// queuePool are empty queues for reuse.\n\tqueuePool writeQueuePool\n\n\t// prioritizeIncremental is used to determine whether we should prioritize\n\t// incremental streams or not, when urgency is the same in a given Pop()\n\t// call.\n\tprioritizeIncremental bool\n\n\t// priorityUpdateBuf is used to buffer the most recent PRIORITY_UPDATE we\n\t// receive per https://www.rfc-editor.org/rfc/rfc9218.html#name-the-priority_update-frame.\n\tpriorityUpdateBuf struct {\n\t\t// streamID being 0 means that the buffer is empty. This is a safe\n\t\t// assumption as PRIORITY_UPDATE for stream 0 is a PROTOCOL_ERROR.\n\t\tstreamID uint32\n\t\tpriority PriorityParam\n\t}\n}\n\nfunc newPriorityWriteSchedulerRFC9218() WriteScheduler {\n\tws := &priorityWriteSchedulerRFC9218{\n\t\tstreams: make(map[uint32]streamMetadata),\n\t}\n\treturn ws\n}\n\nfunc (ws *priorityWriteSchedulerRFC9218) OpenStream(streamID uint32, opt OpenStreamOptions) {\n\tif ws.streams[streamID].location != nil {\n\t\tpanic(fmt.Errorf(\"stream %d already opened\", streamID))\n\t}\n\tif streamID == ws.priorityUpdateBuf.streamID {\n\t\tws.priorityUpdateBuf.streamID = 0\n\t\topt.priority = ws.priorityUpdateBuf.priority\n\t}\n\tq := ws.queuePool.get()\n\tws.streams[streamID] = streamMetadata{\n\t\tlocation: q,\n\t\tpriority: opt.priority,\n\t}\n\n\tu, i := opt.priority.urgency, opt.priority.incremental\n\tif ws.heads[u][i] == nil {\n\t\tws.heads[u][i] = q\n\t\tq.next = q\n\t\tq.prev = q\n\t} else {\n\t\t// Queues are stored in a ring.\n\t\t// Insert the new stream before ws.head, putting it at the end of the list.\n\t\tq.prev = ws.heads[u][i].prev\n\t\tq.next = ws.heads[u][i]\n\t\tq.prev.next = q\n\t\tq.next.prev = q\n\t}\n}\n\nfunc (ws *priorityWriteSchedulerRFC9218) CloseStream(streamID uint32) {\n\tmetadata := ws.streams[streamID]\n\tq, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental\n\tif q == nil {\n\t\treturn\n\t}\n\tif q.next == q {\n\t\t// This was the only open stream.\n\t\tws.heads[u][i] = nil\n\t} else {\n\t\tq.prev.next = q.next\n\t\tq.next.prev = q.prev\n\t\tif ws.heads[u][i] == q {\n\t\t\tws.heads[u][i] = q.next\n\t\t}\n\t}\n\tdelete(ws.streams, streamID)\n\tws.queuePool.put(q)\n}\n\nfunc (ws *priorityWriteSchedulerRFC9218) AdjustStream(streamID uint32, priority PriorityParam) {\n\tmetadata := ws.streams[streamID]\n\tq, u, i := metadata.location, metadata.priority.urgency, metadata.priority.incremental\n\tif q == nil {\n\t\tws.priorityUpdateBuf.streamID = streamID\n\t\tws.priorityUpdateBuf.priority = priority\n\t\treturn\n\t}\n\n\t// Remove stream from current location.\n\tif q.next == q {\n\t\t// This was the only open stream.\n\t\tws.heads[u][i] = nil\n\t} else {\n\t\tq.prev.next = q.next\n\t\tq.next.prev = q.prev\n\t\tif ws.heads[u][i] == q {\n\t\t\tws.heads[u][i] = q.next\n\t\t}\n\t}\n\n\t// Insert stream to the new queue.\n\tu, i = priority.urgency, priority.incremental\n\tif ws.heads[u][i] == nil {\n\t\tws.heads[u][i] = q\n\t\tq.next = q\n\t\tq.prev = q\n\t} else {\n\t\t// Queues are stored in a ring.\n\t\t// Insert the new stream before ws.head, putting it at the end of the list.\n\t\tq.prev = ws.heads[u][i].prev\n\t\tq.next = ws.heads[u][i]\n\t\tq.prev.next = q\n\t\tq.next.prev = q\n\t}\n\n\t// Update the metadata.\n\tws.streams[streamID] = streamMetadata{\n\t\tlocation: q,\n\t\tpriority: priority,\n\t}\n}\n\nfunc (ws *priorityWriteSchedulerRFC9218) Push(wr FrameWriteRequest) {\n\tif wr.isControl() {\n\t\tws.control.push(wr)\n\t\treturn\n\t}\n\tq := ws.streams[wr.StreamID()].location\n\tif q == nil {\n\t\t// This is a closed stream.\n\t\t// wr should not be a HEADERS or DATA frame.\n\t\t// We push the request onto the control queue.\n\t\tif wr.DataSize() > 0 {\n\t\t\tpanic(\"add DATA on non-open stream\")\n\t\t}\n\t\tws.control.push(wr)\n\t\treturn\n\t}\n\tq.push(wr)\n}\n\nfunc (ws *priorityWriteSchedulerRFC9218) Pop() (FrameWriteRequest, bool) {\n\t// Control and RST_STREAM frames first.\n\tif !ws.control.empty() {\n\t\treturn ws.control.shift(), true\n\t}\n\n\t// On the next Pop(), we want to prioritize incremental if we prioritized\n\t// non-incremental request of the same urgency this time. Vice-versa.\n\t// i.e. when there are incremental and non-incremental requests at the same\n\t// priority, we give 50% of our bandwidth to the incremental ones in\n\t// aggregate and 50% to the first non-incremental one (since\n\t// non-incremental streams do not use round-robin writes).\n\tws.prioritizeIncremental = !ws.prioritizeIncremental\n\n\t// Always prioritize lowest u (i.e. highest urgency level).\n\tfor u := range ws.heads {\n\t\tfor i := range ws.heads[u] {\n\t\t\t// When we want to prioritize incremental, we try to pop i=true\n\t\t\t// first before i=false when u is the same.\n\t\t\tif ws.prioritizeIncremental {\n\t\t\t\ti = (i + 1) % 2\n\t\t\t}\n\t\t\tq := ws.heads[u][i]\n\t\t\tif q == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor {\n\t\t\t\tif wr, ok := q.consume(math.MaxInt32); ok {\n\t\t\t\t\tif i == 1 {\n\t\t\t\t\t\t// For incremental streams, we update head to q.next so\n\t\t\t\t\t\t// we can round-robin between multiple streams that can\n\t\t\t\t\t\t// immediately benefit from partial writes.\n\t\t\t\t\t\tws.heads[u][i] = q.next\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// For non-incremental streams, we try to finish one to\n\t\t\t\t\t\t// completion rather than doing round-robin. However,\n\t\t\t\t\t\t// we update head here so that if q.consume() is !ok\n\t\t\t\t\t\t// (e.g. the stream has no more frame to consume), head\n\t\t\t\t\t\t// is updated to the next q that has frames to consume\n\t\t\t\t\t\t// on future iterations. This way, we do not prioritize\n\t\t\t\t\t\t// writing to unavailable stream on next Pop() calls,\n\t\t\t\t\t\t// preventing head-of-line blocking.\n\t\t\t\t\t\tws.heads[u][i] = q\n\t\t\t\t\t}\n\t\t\t\t\treturn wr, true\n\t\t\t\t}\n\t\t\t\tq = q.next\n\t\t\t\tif q == ws.heads[u][i] {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\treturn FrameWriteRequest{}, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/writesched_random.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport \"math\"\n\n// NewRandomWriteScheduler constructs a WriteScheduler that ignores HTTP/2\n// priorities. Control frames like SETTINGS and PING are written before DATA\n// frames, but if no control frames are queued and multiple streams have queued\n// HEADERS or DATA frames, Pop selects a ready stream arbitrarily.\nfunc NewRandomWriteScheduler() WriteScheduler {\n\treturn &randomWriteScheduler{sq: make(map[uint32]*writeQueue)}\n}\n\ntype randomWriteScheduler struct {\n\t// zero are frames not associated with a specific stream.\n\tzero writeQueue\n\n\t// sq contains the stream-specific queues, keyed by stream ID.\n\t// When a stream is idle, closed, or emptied, it's deleted\n\t// from the map.\n\tsq map[uint32]*writeQueue\n\n\t// pool of empty queues for reuse.\n\tqueuePool writeQueuePool\n}\n\nfunc (ws *randomWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {\n\t// no-op: idle streams are not tracked\n}\n\nfunc (ws *randomWriteScheduler) CloseStream(streamID uint32) {\n\tq, ok := ws.sq[streamID]\n\tif !ok {\n\t\treturn\n\t}\n\tdelete(ws.sq, streamID)\n\tws.queuePool.put(q)\n}\n\nfunc (ws *randomWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {\n\t// no-op: priorities are ignored\n}\n\nfunc (ws *randomWriteScheduler) Push(wr FrameWriteRequest) {\n\tif wr.isControl() {\n\t\tws.zero.push(wr)\n\t\treturn\n\t}\n\tid := wr.StreamID()\n\tq, ok := ws.sq[id]\n\tif !ok {\n\t\tq = ws.queuePool.get()\n\t\tws.sq[id] = q\n\t}\n\tq.push(wr)\n}\n\nfunc (ws *randomWriteScheduler) Pop() (FrameWriteRequest, bool) {\n\t// Control and RST_STREAM frames first.\n\tif !ws.zero.empty() {\n\t\treturn ws.zero.shift(), true\n\t}\n\t// Iterate over all non-idle streams until finding one that can be consumed.\n\tfor streamID, q := range ws.sq {\n\t\tif wr, ok := q.consume(math.MaxInt32); ok {\n\t\t\tif q.empty() {\n\t\t\t\tdelete(ws.sq, streamID)\n\t\t\t\tws.queuePool.put(q)\n\t\t\t}\n\t\t\treturn wr, true\n\t\t}\n\t}\n\treturn FrameWriteRequest{}, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/http2/writesched_roundrobin.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage http2\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\ntype roundRobinWriteScheduler struct {\n\t// control contains control frames (SETTINGS, PING, etc.).\n\tcontrol writeQueue\n\n\t// streams maps stream ID to a queue.\n\tstreams map[uint32]*writeQueue\n\n\t// stream queues are stored in a circular linked list.\n\t// head is the next stream to write, or nil if there are no streams open.\n\thead *writeQueue\n\n\t// pool of empty queues for reuse.\n\tqueuePool writeQueuePool\n}\n\n// newRoundRobinWriteScheduler constructs a new write scheduler.\n// The round robin scheduler prioritizes control frames\n// like SETTINGS and PING over DATA frames.\n// When there are no control frames to send, it performs a round-robin\n// selection from the ready streams.\nfunc newRoundRobinWriteScheduler() WriteScheduler {\n\tws := &roundRobinWriteScheduler{\n\t\tstreams: make(map[uint32]*writeQueue),\n\t}\n\treturn ws\n}\n\nfunc (ws *roundRobinWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {\n\tif ws.streams[streamID] != nil {\n\t\tpanic(fmt.Errorf(\"stream %d already opened\", streamID))\n\t}\n\tq := ws.queuePool.get()\n\tws.streams[streamID] = q\n\tif ws.head == nil {\n\t\tws.head = q\n\t\tq.next = q\n\t\tq.prev = q\n\t} else {\n\t\t// Queues are stored in a ring.\n\t\t// Insert the new stream before ws.head, putting it at the end of the list.\n\t\tq.prev = ws.head.prev\n\t\tq.next = ws.head\n\t\tq.prev.next = q\n\t\tq.next.prev = q\n\t}\n}\n\nfunc (ws *roundRobinWriteScheduler) CloseStream(streamID uint32) {\n\tq := ws.streams[streamID]\n\tif q == nil {\n\t\treturn\n\t}\n\tif q.next == q {\n\t\t// This was the only open stream.\n\t\tws.head = nil\n\t} else {\n\t\tq.prev.next = q.next\n\t\tq.next.prev = q.prev\n\t\tif ws.head == q {\n\t\t\tws.head = q.next\n\t\t}\n\t}\n\tdelete(ws.streams, streamID)\n\tws.queuePool.put(q)\n}\n\nfunc (ws *roundRobinWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {}\n\nfunc (ws *roundRobinWriteScheduler) Push(wr FrameWriteRequest) {\n\tif wr.isControl() {\n\t\tws.control.push(wr)\n\t\treturn\n\t}\n\tq := ws.streams[wr.StreamID()]\n\tif q == nil {\n\t\t// This is a closed stream.\n\t\t// wr should not be a HEADERS or DATA frame.\n\t\t// We push the request onto the control queue.\n\t\tif wr.DataSize() > 0 {\n\t\t\tpanic(\"add DATA on non-open stream\")\n\t\t}\n\t\tws.control.push(wr)\n\t\treturn\n\t}\n\tq.push(wr)\n}\n\nfunc (ws *roundRobinWriteScheduler) Pop() (FrameWriteRequest, bool) {\n\t// Control and RST_STREAM frames first.\n\tif !ws.control.empty() {\n\t\treturn ws.control.shift(), true\n\t}\n\tif ws.head == nil {\n\t\treturn FrameWriteRequest{}, false\n\t}\n\tq := ws.head\n\tfor {\n\t\tif wr, ok := q.consume(math.MaxInt32); ok {\n\t\t\tws.head = q.next\n\t\t\treturn wr, true\n\t\t}\n\t\tq = q.next\n\t\tif q == ws.head {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn FrameWriteRequest{}, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/go118.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.18\n\npackage idna\n\n// Transitional processing is disabled by default in Go 1.18.\n// https://golang.org/issue/47510\nconst transitionalLookup = false\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/idna10.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.10\n\n// Package idna implements IDNA2008 using the compatibility processing\n// defined by UTS (Unicode Technical Standard) #46, which defines a standard to\n// deal with the transition from IDNA2003.\n//\n// IDNA2008 (Internationalized Domain Names for Applications), is defined in RFC\n// 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894.\n// UTS #46 is defined in https://www.unicode.org/reports/tr46.\n// See https://unicode.org/cldr/utility/idna.jsp for a visualization of the\n// differences between these two standards.\npackage idna // import \"golang.org/x/net/idna\"\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/secure/bidirule\"\n\t\"golang.org/x/text/unicode/bidi\"\n\t\"golang.org/x/text/unicode/norm\"\n)\n\n// NOTE: Unlike common practice in Go APIs, the functions will return a\n// sanitized domain name in case of errors. Browsers sometimes use a partially\n// evaluated string as lookup.\n// TODO: the current error handling is, in my opinion, the least opinionated.\n// Other strategies are also viable, though:\n// Option 1) Return an empty string in case of error, but allow the user to\n//    specify explicitly which errors to ignore.\n// Option 2) Return the partially evaluated string if it is itself a valid\n//    string, otherwise return the empty string in case of error.\n// Option 3) Option 1 and 2.\n// Option 4) Always return an empty string for now and implement Option 1 as\n//    needed, and document that the return string may not be empty in case of\n//    error in the future.\n// I think Option 1 is best, but it is quite opinionated.\n\n// ToASCII is a wrapper for Punycode.ToASCII.\nfunc ToASCII(s string) (string, error) {\n\treturn Punycode.process(s, true)\n}\n\n// ToUnicode is a wrapper for Punycode.ToUnicode.\nfunc ToUnicode(s string) (string, error) {\n\treturn Punycode.process(s, false)\n}\n\n// An Option configures a Profile at creation time.\ntype Option func(*options)\n\n// Transitional sets a Profile to use the Transitional mapping as defined in UTS\n// #46. This will cause, for example, \"ß\" to be mapped to \"ss\". Using the\n// transitional mapping provides a compromise between IDNA2003 and IDNA2008\n// compatibility. It is used by some browsers when resolving domain names. This\n// option is only meaningful if combined with MapForLookup.\nfunc Transitional(transitional bool) Option {\n\treturn func(o *options) { o.transitional = transitional }\n}\n\n// VerifyDNSLength sets whether a Profile should fail if any of the IDN parts\n// are longer than allowed by the RFC.\n//\n// This option corresponds to the VerifyDnsLength flag in UTS #46.\nfunc VerifyDNSLength(verify bool) Option {\n\treturn func(o *options) { o.verifyDNSLength = verify }\n}\n\n// RemoveLeadingDots removes leading label separators. Leading runes that map to\n// dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well.\nfunc RemoveLeadingDots(remove bool) Option {\n\treturn func(o *options) { o.removeLeadingDots = remove }\n}\n\n// ValidateLabels sets whether to check the mandatory label validation criteria\n// as defined in Section 5.4 of RFC 5891. This includes testing for correct use\n// of hyphens ('-'), normalization, validity of runes, and the context rules.\n// In particular, ValidateLabels also sets the CheckHyphens and CheckJoiners flags\n// in UTS #46.\nfunc ValidateLabels(enable bool) Option {\n\treturn func(o *options) {\n\t\t// Don't override existing mappings, but set one that at least checks\n\t\t// normalization if it is not set.\n\t\tif o.mapping == nil && enable {\n\t\t\to.mapping = normalize\n\t\t}\n\t\to.trie = trie\n\t\to.checkJoiners = enable\n\t\to.checkHyphens = enable\n\t\tif enable {\n\t\t\to.fromPuny = validateFromPunycode\n\t\t} else {\n\t\t\to.fromPuny = nil\n\t\t}\n\t}\n}\n\n// CheckHyphens sets whether to check for correct use of hyphens ('-') in\n// labels. Most web browsers do not have this option set, since labels such as\n// \"r3---sn-apo3qvuoxuxbt-j5pe\" are in common use.\n//\n// This option corresponds to the CheckHyphens flag in UTS #46.\nfunc CheckHyphens(enable bool) Option {\n\treturn func(o *options) { o.checkHyphens = enable }\n}\n\n// CheckJoiners sets whether to check the ContextJ rules as defined in Appendix\n// A of RFC 5892, concerning the use of joiner runes.\n//\n// This option corresponds to the CheckJoiners flag in UTS #46.\nfunc CheckJoiners(enable bool) Option {\n\treturn func(o *options) {\n\t\to.trie = trie\n\t\to.checkJoiners = enable\n\t}\n}\n\n// StrictDomainName limits the set of permissible ASCII characters to those\n// allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the\n// hyphen). This is set by default for MapForLookup and ValidateForRegistration,\n// but is only useful if ValidateLabels is set.\n//\n// This option is useful, for instance, for browsers that allow characters\n// outside this range, for example a '_' (U+005F LOW LINE). See\n// http://www.rfc-editor.org/std/std3.txt for more details.\n//\n// This option corresponds to the UseSTD3ASCIIRules flag in UTS #46.\nfunc StrictDomainName(use bool) Option {\n\treturn func(o *options) { o.useSTD3Rules = use }\n}\n\n// NOTE: the following options pull in tables. The tables should not be linked\n// in as long as the options are not used.\n\n// BidiRule enables the Bidi rule as defined in RFC 5893. Any application\n// that relies on proper validation of labels should include this rule.\n//\n// This option corresponds to the CheckBidi flag in UTS #46.\nfunc BidiRule() Option {\n\treturn func(o *options) { o.bidirule = bidirule.ValidString }\n}\n\n// ValidateForRegistration sets validation options to verify that a given IDN is\n// properly formatted for registration as defined by Section 4 of RFC 5891.\nfunc ValidateForRegistration() Option {\n\treturn func(o *options) {\n\t\to.mapping = validateRegistration\n\t\tStrictDomainName(true)(o)\n\t\tValidateLabels(true)(o)\n\t\tVerifyDNSLength(true)(o)\n\t\tBidiRule()(o)\n\t}\n}\n\n// MapForLookup sets validation and mapping options such that a given IDN is\n// transformed for domain name lookup according to the requirements set out in\n// Section 5 of RFC 5891. The mappings follow the recommendations of RFC 5894,\n// RFC 5895 and UTS 46. It does not add the Bidi Rule. Use the BidiRule option\n// to add this check.\n//\n// The mappings include normalization and mapping case, width and other\n// compatibility mappings.\nfunc MapForLookup() Option {\n\treturn func(o *options) {\n\t\to.mapping = validateAndMap\n\t\tStrictDomainName(true)(o)\n\t\tValidateLabels(true)(o)\n\t}\n}\n\ntype options struct {\n\ttransitional      bool\n\tuseSTD3Rules      bool\n\tcheckHyphens      bool\n\tcheckJoiners      bool\n\tverifyDNSLength   bool\n\tremoveLeadingDots bool\n\n\ttrie *idnaTrie\n\n\t// fromPuny calls validation rules when converting A-labels to U-labels.\n\tfromPuny func(p *Profile, s string) error\n\n\t// mapping implements a validation and mapping step as defined in RFC 5895\n\t// or UTS 46, tailored to, for example, domain registration or lookup.\n\tmapping func(p *Profile, s string) (mapped string, isBidi bool, err error)\n\n\t// bidirule, if specified, checks whether s conforms to the Bidi Rule\n\t// defined in RFC 5893.\n\tbidirule func(s string) bool\n}\n\n// A Profile defines the configuration of an IDNA mapper.\ntype Profile struct {\n\toptions\n}\n\nfunc apply(o *options, opts []Option) {\n\tfor _, f := range opts {\n\t\tf(o)\n\t}\n}\n\n// New creates a new Profile.\n//\n// With no options, the returned Profile is the most permissive and equals the\n// Punycode Profile. Options can be passed to further restrict the Profile. The\n// MapForLookup and ValidateForRegistration options set a collection of options,\n// for lookup and registration purposes respectively, which can be tailored by\n// adding more fine-grained options, where later options override earlier\n// options.\nfunc New(o ...Option) *Profile {\n\tp := &Profile{}\n\tapply(&p.options, o)\n\treturn p\n}\n\n// ToASCII converts a domain or domain label to its ASCII form. For example,\n// ToASCII(\"bücher.example.com\") is \"xn--bcher-kva.example.com\", and\n// ToASCII(\"golang\") is \"golang\". If an error is encountered it will return\n// an error and a (partially) processed result.\nfunc (p *Profile) ToASCII(s string) (string, error) {\n\treturn p.process(s, true)\n}\n\n// ToUnicode converts a domain or domain label to its Unicode form. For example,\n// ToUnicode(\"xn--bcher-kva.example.com\") is \"bücher.example.com\", and\n// ToUnicode(\"golang\") is \"golang\". If an error is encountered it will return\n// an error and a (partially) processed result.\nfunc (p *Profile) ToUnicode(s string) (string, error) {\n\tpp := *p\n\tpp.transitional = false\n\treturn pp.process(s, false)\n}\n\n// String reports a string with a description of the profile for debugging\n// purposes. The string format may change with different versions.\nfunc (p *Profile) String() string {\n\ts := \"\"\n\tif p.transitional {\n\t\ts = \"Transitional\"\n\t} else {\n\t\ts = \"NonTransitional\"\n\t}\n\tif p.useSTD3Rules {\n\t\ts += \":UseSTD3Rules\"\n\t}\n\tif p.checkHyphens {\n\t\ts += \":CheckHyphens\"\n\t}\n\tif p.checkJoiners {\n\t\ts += \":CheckJoiners\"\n\t}\n\tif p.verifyDNSLength {\n\t\ts += \":VerifyDNSLength\"\n\t}\n\treturn s\n}\n\nvar (\n\t// Punycode is a Profile that does raw punycode processing with a minimum\n\t// of validation.\n\tPunycode *Profile = punycode\n\n\t// Lookup is the recommended profile for looking up domain names, according\n\t// to Section 5 of RFC 5891. The exact configuration of this profile may\n\t// change over time.\n\tLookup *Profile = lookup\n\n\t// Display is the recommended profile for displaying domain names.\n\t// The configuration of this profile may change over time.\n\tDisplay *Profile = display\n\n\t// Registration is the recommended profile for checking whether a given\n\t// IDN is valid for registration, according to Section 4 of RFC 5891.\n\tRegistration *Profile = registration\n\n\tpunycode = &Profile{}\n\tlookup   = &Profile{options{\n\t\ttransitional: transitionalLookup,\n\t\tuseSTD3Rules: true,\n\t\tcheckHyphens: true,\n\t\tcheckJoiners: true,\n\t\ttrie:         trie,\n\t\tfromPuny:     validateFromPunycode,\n\t\tmapping:      validateAndMap,\n\t\tbidirule:     bidirule.ValidString,\n\t}}\n\tdisplay = &Profile{options{\n\t\tuseSTD3Rules: true,\n\t\tcheckHyphens: true,\n\t\tcheckJoiners: true,\n\t\ttrie:         trie,\n\t\tfromPuny:     validateFromPunycode,\n\t\tmapping:      validateAndMap,\n\t\tbidirule:     bidirule.ValidString,\n\t}}\n\tregistration = &Profile{options{\n\t\tuseSTD3Rules:    true,\n\t\tverifyDNSLength: true,\n\t\tcheckHyphens:    true,\n\t\tcheckJoiners:    true,\n\t\ttrie:            trie,\n\t\tfromPuny:        validateFromPunycode,\n\t\tmapping:         validateRegistration,\n\t\tbidirule:        bidirule.ValidString,\n\t}}\n\n\t// TODO: profiles\n\t// Register: recommended for approving domain names: don't do any mappings\n\t// but rather reject on invalid input. Bundle or block deviation characters.\n)\n\ntype labelError struct{ label, code_ string }\n\nfunc (e labelError) code() string { return e.code_ }\nfunc (e labelError) Error() string {\n\treturn fmt.Sprintf(\"idna: invalid label %q\", e.label)\n}\n\ntype runeError rune\n\nfunc (e runeError) code() string { return \"P1\" }\nfunc (e runeError) Error() string {\n\treturn fmt.Sprintf(\"idna: disallowed rune %U\", e)\n}\n\n// process implements the algorithm described in section 4 of UTS #46,\n// see https://www.unicode.org/reports/tr46.\nfunc (p *Profile) process(s string, toASCII bool) (string, error) {\n\tvar err error\n\tvar isBidi bool\n\tif p.mapping != nil {\n\t\ts, isBidi, err = p.mapping(p, s)\n\t}\n\t// Remove leading empty labels.\n\tif p.removeLeadingDots {\n\t\tfor ; len(s) > 0 && s[0] == '.'; s = s[1:] {\n\t\t}\n\t}\n\t// TODO: allow for a quick check of the tables data.\n\t// It seems like we should only create this error on ToASCII, but the\n\t// UTS 46 conformance tests suggests we should always check this.\n\tif err == nil && p.verifyDNSLength && s == \"\" {\n\t\terr = &labelError{s, \"A4\"}\n\t}\n\tlabels := labelIter{orig: s}\n\tfor ; !labels.done(); labels.next() {\n\t\tlabel := labels.label()\n\t\tif label == \"\" {\n\t\t\t// Empty labels are not okay. The label iterator skips the last\n\t\t\t// label if it is empty.\n\t\t\tif err == nil && p.verifyDNSLength {\n\t\t\t\terr = &labelError{s, \"A4\"}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(label, acePrefix) {\n\t\t\tu, err2 := decode(label[len(acePrefix):])\n\t\t\tif err2 != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = err2\n\t\t\t\t}\n\t\t\t\t// Spec says keep the old label.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tisBidi = isBidi || bidirule.DirectionString(u) != bidi.LeftToRight\n\t\t\tlabels.set(u)\n\t\t\tif err == nil && p.fromPuny != nil {\n\t\t\t\terr = p.fromPuny(p, u)\n\t\t\t}\n\t\t\tif err == nil {\n\t\t\t\t// This should be called on NonTransitional, according to the\n\t\t\t\t// spec, but that currently does not have any effect. Use the\n\t\t\t\t// original profile to preserve options.\n\t\t\t\terr = p.validateLabel(u)\n\t\t\t}\n\t\t} else if err == nil {\n\t\t\terr = p.validateLabel(label)\n\t\t}\n\t}\n\tif isBidi && p.bidirule != nil && err == nil {\n\t\tfor labels.reset(); !labels.done(); labels.next() {\n\t\t\tif !p.bidirule(labels.label()) {\n\t\t\t\terr = &labelError{s, \"B\"}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif toASCII {\n\t\tfor labels.reset(); !labels.done(); labels.next() {\n\t\t\tlabel := labels.label()\n\t\t\tif !ascii(label) {\n\t\t\t\ta, err2 := encode(acePrefix, label)\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = err2\n\t\t\t\t}\n\t\t\t\tlabel = a\n\t\t\t\tlabels.set(a)\n\t\t\t}\n\t\t\tn := len(label)\n\t\t\tif p.verifyDNSLength && err == nil && (n == 0 || n > 63) {\n\t\t\t\terr = &labelError{label, \"A4\"}\n\t\t\t}\n\t\t}\n\t}\n\ts = labels.result()\n\tif toASCII && p.verifyDNSLength && err == nil {\n\t\t// Compute the length of the domain name minus the root label and its dot.\n\t\tn := len(s)\n\t\tif n > 0 && s[n-1] == '.' {\n\t\t\tn--\n\t\t}\n\t\tif len(s) < 1 || n > 253 {\n\t\t\terr = &labelError{s, \"A4\"}\n\t\t}\n\t}\n\treturn s, err\n}\n\nfunc normalize(p *Profile, s string) (mapped string, isBidi bool, err error) {\n\t// TODO: consider first doing a quick check to see if any of these checks\n\t// need to be done. This will make it slower in the general case, but\n\t// faster in the common case.\n\tmapped = norm.NFC.String(s)\n\tisBidi = bidirule.DirectionString(mapped) == bidi.RightToLeft\n\treturn mapped, isBidi, nil\n}\n\nfunc validateRegistration(p *Profile, s string) (idem string, bidi bool, err error) {\n\t// TODO: filter need for normalization in loop below.\n\tif !norm.NFC.IsNormalString(s) {\n\t\treturn s, false, &labelError{s, \"V1\"}\n\t}\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\tif sz == 0 {\n\t\t\treturn s, bidi, runeError(utf8.RuneError)\n\t\t}\n\t\tbidi = bidi || info(v).isBidi(s[i:])\n\t\t// Copy bytes not copied so far.\n\t\tswitch p.simplify(info(v).category()) {\n\t\t// TODO: handle the NV8 defined in the Unicode idna data set to allow\n\t\t// for strict conformance to IDNA2008.\n\t\tcase valid, deviation:\n\t\tcase disallowed, mapped, unknown, ignored:\n\t\t\tr, _ := utf8.DecodeRuneInString(s[i:])\n\t\t\treturn s, bidi, runeError(r)\n\t\t}\n\t\ti += sz\n\t}\n\treturn s, bidi, nil\n}\n\nfunc (c info) isBidi(s string) bool {\n\tif !c.isMapped() {\n\t\treturn c&attributesMask == rtl\n\t}\n\t// TODO: also store bidi info for mapped data. This is possible, but a bit\n\t// cumbersome and not for the common case.\n\tp, _ := bidi.LookupString(s)\n\tswitch p.Class() {\n\tcase bidi.R, bidi.AL, bidi.AN:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) {\n\tvar (\n\t\tb []byte\n\t\tk int\n\t)\n\t// combinedInfoBits contains the or-ed bits of all runes. We use this\n\t// to derive the mayNeedNorm bit later. This may trigger normalization\n\t// overeagerly, but it will not do so in the common case. The end result\n\t// is another 10% saving on BenchmarkProfile for the common case.\n\tvar combinedInfoBits info\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\tif sz == 0 {\n\t\t\tb = append(b, s[k:i]...)\n\t\t\tb = append(b, \"\\ufffd\"...)\n\t\t\tk = len(s)\n\t\t\tif err == nil {\n\t\t\t\terr = runeError(utf8.RuneError)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tcombinedInfoBits |= info(v)\n\t\tbidi = bidi || info(v).isBidi(s[i:])\n\t\tstart := i\n\t\ti += sz\n\t\t// Copy bytes not copied so far.\n\t\tswitch p.simplify(info(v).category()) {\n\t\tcase valid:\n\t\t\tcontinue\n\t\tcase disallowed:\n\t\t\tif err == nil {\n\t\t\t\tr, _ := utf8.DecodeRuneInString(s[start:])\n\t\t\t\terr = runeError(r)\n\t\t\t}\n\t\t\tcontinue\n\t\tcase mapped, deviation:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\tb = info(v).appendMapping(b, s[start:i])\n\t\tcase ignored:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\t// drop the rune\n\t\tcase unknown:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\tb = append(b, \"\\ufffd\"...)\n\t\t}\n\t\tk = i\n\t}\n\tif k == 0 {\n\t\t// No changes so far.\n\t\tif combinedInfoBits&mayNeedNorm != 0 {\n\t\t\ts = norm.NFC.String(s)\n\t\t}\n\t} else {\n\t\tb = append(b, s[k:]...)\n\t\tif norm.NFC.QuickSpan(b) != len(b) {\n\t\t\tb = norm.NFC.Bytes(b)\n\t\t}\n\t\t// TODO: the punycode converters require strings as input.\n\t\ts = string(b)\n\t}\n\treturn s, bidi, err\n}\n\n// A labelIter allows iterating over domain name labels.\ntype labelIter struct {\n\torig     string\n\tslice    []string\n\tcurStart int\n\tcurEnd   int\n\ti        int\n}\n\nfunc (l *labelIter) reset() {\n\tl.curStart = 0\n\tl.curEnd = 0\n\tl.i = 0\n}\n\nfunc (l *labelIter) done() bool {\n\treturn l.curStart >= len(l.orig)\n}\n\nfunc (l *labelIter) result() string {\n\tif l.slice != nil {\n\t\treturn strings.Join(l.slice, \".\")\n\t}\n\treturn l.orig\n}\n\nfunc (l *labelIter) label() string {\n\tif l.slice != nil {\n\t\treturn l.slice[l.i]\n\t}\n\tp := strings.IndexByte(l.orig[l.curStart:], '.')\n\tl.curEnd = l.curStart + p\n\tif p == -1 {\n\t\tl.curEnd = len(l.orig)\n\t}\n\treturn l.orig[l.curStart:l.curEnd]\n}\n\n// next sets the value to the next label. It skips the last label if it is empty.\nfunc (l *labelIter) next() {\n\tl.i++\n\tif l.slice != nil {\n\t\tif l.i >= len(l.slice) || l.i == len(l.slice)-1 && l.slice[l.i] == \"\" {\n\t\t\tl.curStart = len(l.orig)\n\t\t}\n\t} else {\n\t\tl.curStart = l.curEnd + 1\n\t\tif l.curStart == len(l.orig)-1 && l.orig[l.curStart] == '.' {\n\t\t\tl.curStart = len(l.orig)\n\t\t}\n\t}\n}\n\nfunc (l *labelIter) set(s string) {\n\tif l.slice == nil {\n\t\tl.slice = strings.Split(l.orig, \".\")\n\t}\n\tl.slice[l.i] = s\n}\n\n// acePrefix is the ASCII Compatible Encoding prefix.\nconst acePrefix = \"xn--\"\n\nfunc (p *Profile) simplify(cat category) category {\n\tswitch cat {\n\tcase disallowedSTD3Mapped:\n\t\tif p.useSTD3Rules {\n\t\t\tcat = disallowed\n\t\t} else {\n\t\t\tcat = mapped\n\t\t}\n\tcase disallowedSTD3Valid:\n\t\tif p.useSTD3Rules {\n\t\t\tcat = disallowed\n\t\t} else {\n\t\t\tcat = valid\n\t\t}\n\tcase deviation:\n\t\tif !p.transitional {\n\t\t\tcat = valid\n\t\t}\n\tcase validNV8, validXV8:\n\t\t// TODO: handle V2008\n\t\tcat = valid\n\t}\n\treturn cat\n}\n\nfunc validateFromPunycode(p *Profile, s string) error {\n\tif !norm.NFC.IsNormalString(s) {\n\t\treturn &labelError{s, \"V1\"}\n\t}\n\t// TODO: detect whether string may have to be normalized in the following\n\t// loop.\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\tif sz == 0 {\n\t\t\treturn runeError(utf8.RuneError)\n\t\t}\n\t\tif c := p.simplify(info(v).category()); c != valid && c != deviation {\n\t\t\treturn &labelError{s, \"V6\"}\n\t\t}\n\t\ti += sz\n\t}\n\treturn nil\n}\n\nconst (\n\tzwnj = \"\\u200c\"\n\tzwj  = \"\\u200d\"\n)\n\ntype joinState int8\n\nconst (\n\tstateStart joinState = iota\n\tstateVirama\n\tstateBefore\n\tstateBeforeVirama\n\tstateAfter\n\tstateFAIL\n)\n\nvar joinStates = [][numJoinTypes]joinState{\n\tstateStart: {\n\t\tjoiningL:   stateBefore,\n\t\tjoiningD:   stateBefore,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateVirama,\n\t},\n\tstateVirama: {\n\t\tjoiningL: stateBefore,\n\t\tjoiningD: stateBefore,\n\t},\n\tstateBefore: {\n\t\tjoiningL:   stateBefore,\n\t\tjoiningD:   stateBefore,\n\t\tjoiningT:   stateBefore,\n\t\tjoinZWNJ:   stateAfter,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateBeforeVirama,\n\t},\n\tstateBeforeVirama: {\n\t\tjoiningL: stateBefore,\n\t\tjoiningD: stateBefore,\n\t\tjoiningT: stateBefore,\n\t},\n\tstateAfter: {\n\t\tjoiningL:   stateFAIL,\n\t\tjoiningD:   stateBefore,\n\t\tjoiningT:   stateAfter,\n\t\tjoiningR:   stateStart,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateAfter, // no-op as we can't accept joiners here\n\t},\n\tstateFAIL: {\n\t\t0:          stateFAIL,\n\t\tjoiningL:   stateFAIL,\n\t\tjoiningD:   stateFAIL,\n\t\tjoiningT:   stateFAIL,\n\t\tjoiningR:   stateFAIL,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateFAIL,\n\t},\n}\n\n// validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are\n// already implicitly satisfied by the overall implementation.\nfunc (p *Profile) validateLabel(s string) (err error) {\n\tif s == \"\" {\n\t\tif p.verifyDNSLength {\n\t\t\treturn &labelError{s, \"A4\"}\n\t\t}\n\t\treturn nil\n\t}\n\tif p.checkHyphens {\n\t\tif len(s) > 4 && s[2] == '-' && s[3] == '-' {\n\t\t\treturn &labelError{s, \"V2\"}\n\t\t}\n\t\tif s[0] == '-' || s[len(s)-1] == '-' {\n\t\t\treturn &labelError{s, \"V3\"}\n\t\t}\n\t}\n\tif !p.checkJoiners {\n\t\treturn nil\n\t}\n\ttrie := p.trie // p.checkJoiners is only set if trie is set.\n\t// TODO: merge the use of this in the trie.\n\tv, sz := trie.lookupString(s)\n\tx := info(v)\n\tif x.isModifier() {\n\t\treturn &labelError{s, \"V5\"}\n\t}\n\t// Quickly return in the absence of zero-width (non) joiners.\n\tif strings.Index(s, zwj) == -1 && strings.Index(s, zwnj) == -1 {\n\t\treturn nil\n\t}\n\tst := stateStart\n\tfor i := 0; ; {\n\t\tjt := x.joinType()\n\t\tif s[i:i+sz] == zwj {\n\t\t\tjt = joinZWJ\n\t\t} else if s[i:i+sz] == zwnj {\n\t\t\tjt = joinZWNJ\n\t\t}\n\t\tst = joinStates[st][jt]\n\t\tif x.isViramaModifier() {\n\t\t\tst = joinStates[st][joinVirama]\n\t\t}\n\t\tif i += sz; i == len(s) {\n\t\t\tbreak\n\t\t}\n\t\tv, sz = trie.lookupString(s[i:])\n\t\tx = info(v)\n\t}\n\tif st == stateFAIL || st == stateAfter {\n\t\treturn &labelError{s, \"C\"}\n\t}\n\treturn nil\n}\n\nfunc ascii(s string) bool {\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] >= utf8.RuneSelf {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/idna9.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.10\n\n// Package idna implements IDNA2008 using the compatibility processing\n// defined by UTS (Unicode Technical Standard) #46, which defines a standard to\n// deal with the transition from IDNA2003.\n//\n// IDNA2008 (Internationalized Domain Names for Applications), is defined in RFC\n// 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894.\n// UTS #46 is defined in https://www.unicode.org/reports/tr46.\n// See https://unicode.org/cldr/utility/idna.jsp for a visualization of the\n// differences between these two standards.\npackage idna // import \"golang.org/x/net/idna\"\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/secure/bidirule\"\n\t\"golang.org/x/text/unicode/norm\"\n)\n\n// NOTE: Unlike common practice in Go APIs, the functions will return a\n// sanitized domain name in case of errors. Browsers sometimes use a partially\n// evaluated string as lookup.\n// TODO: the current error handling is, in my opinion, the least opinionated.\n// Other strategies are also viable, though:\n// Option 1) Return an empty string in case of error, but allow the user to\n//    specify explicitly which errors to ignore.\n// Option 2) Return the partially evaluated string if it is itself a valid\n//    string, otherwise return the empty string in case of error.\n// Option 3) Option 1 and 2.\n// Option 4) Always return an empty string for now and implement Option 1 as\n//    needed, and document that the return string may not be empty in case of\n//    error in the future.\n// I think Option 1 is best, but it is quite opinionated.\n\n// ToASCII is a wrapper for Punycode.ToASCII.\nfunc ToASCII(s string) (string, error) {\n\treturn Punycode.process(s, true)\n}\n\n// ToUnicode is a wrapper for Punycode.ToUnicode.\nfunc ToUnicode(s string) (string, error) {\n\treturn Punycode.process(s, false)\n}\n\n// An Option configures a Profile at creation time.\ntype Option func(*options)\n\n// Transitional sets a Profile to use the Transitional mapping as defined in UTS\n// #46. This will cause, for example, \"ß\" to be mapped to \"ss\". Using the\n// transitional mapping provides a compromise between IDNA2003 and IDNA2008\n// compatibility. It is used by some browsers when resolving domain names. This\n// option is only meaningful if combined with MapForLookup.\nfunc Transitional(transitional bool) Option {\n\treturn func(o *options) { o.transitional = transitional }\n}\n\n// VerifyDNSLength sets whether a Profile should fail if any of the IDN parts\n// are longer than allowed by the RFC.\n//\n// This option corresponds to the VerifyDnsLength flag in UTS #46.\nfunc VerifyDNSLength(verify bool) Option {\n\treturn func(o *options) { o.verifyDNSLength = verify }\n}\n\n// RemoveLeadingDots removes leading label separators. Leading runes that map to\n// dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well.\nfunc RemoveLeadingDots(remove bool) Option {\n\treturn func(o *options) { o.removeLeadingDots = remove }\n}\n\n// ValidateLabels sets whether to check the mandatory label validation criteria\n// as defined in Section 5.4 of RFC 5891. This includes testing for correct use\n// of hyphens ('-'), normalization, validity of runes, and the context rules.\n// In particular, ValidateLabels also sets the CheckHyphens and CheckJoiners flags\n// in UTS #46.\nfunc ValidateLabels(enable bool) Option {\n\treturn func(o *options) {\n\t\t// Don't override existing mappings, but set one that at least checks\n\t\t// normalization if it is not set.\n\t\tif o.mapping == nil && enable {\n\t\t\to.mapping = normalize\n\t\t}\n\t\to.trie = trie\n\t\to.checkJoiners = enable\n\t\to.checkHyphens = enable\n\t\tif enable {\n\t\t\to.fromPuny = validateFromPunycode\n\t\t} else {\n\t\t\to.fromPuny = nil\n\t\t}\n\t}\n}\n\n// CheckHyphens sets whether to check for correct use of hyphens ('-') in\n// labels. Most web browsers do not have this option set, since labels such as\n// \"r3---sn-apo3qvuoxuxbt-j5pe\" are in common use.\n//\n// This option corresponds to the CheckHyphens flag in UTS #46.\nfunc CheckHyphens(enable bool) Option {\n\treturn func(o *options) { o.checkHyphens = enable }\n}\n\n// CheckJoiners sets whether to check the ContextJ rules as defined in Appendix\n// A of RFC 5892, concerning the use of joiner runes.\n//\n// This option corresponds to the CheckJoiners flag in UTS #46.\nfunc CheckJoiners(enable bool) Option {\n\treturn func(o *options) {\n\t\to.trie = trie\n\t\to.checkJoiners = enable\n\t}\n}\n\n// StrictDomainName limits the set of permissible ASCII characters to those\n// allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the\n// hyphen). This is set by default for MapForLookup and ValidateForRegistration,\n// but is only useful if ValidateLabels is set.\n//\n// This option is useful, for instance, for browsers that allow characters\n// outside this range, for example a '_' (U+005F LOW LINE). See\n// http://www.rfc-editor.org/std/std3.txt for more details.\n//\n// This option corresponds to the UseSTD3ASCIIRules flag in UTS #46.\nfunc StrictDomainName(use bool) Option {\n\treturn func(o *options) { o.useSTD3Rules = use }\n}\n\n// NOTE: the following options pull in tables. The tables should not be linked\n// in as long as the options are not used.\n\n// BidiRule enables the Bidi rule as defined in RFC 5893. Any application\n// that relies on proper validation of labels should include this rule.\n//\n// This option corresponds to the CheckBidi flag in UTS #46.\nfunc BidiRule() Option {\n\treturn func(o *options) { o.bidirule = bidirule.ValidString }\n}\n\n// ValidateForRegistration sets validation options to verify that a given IDN is\n// properly formatted for registration as defined by Section 4 of RFC 5891.\nfunc ValidateForRegistration() Option {\n\treturn func(o *options) {\n\t\to.mapping = validateRegistration\n\t\tStrictDomainName(true)(o)\n\t\tValidateLabels(true)(o)\n\t\tVerifyDNSLength(true)(o)\n\t\tBidiRule()(o)\n\t}\n}\n\n// MapForLookup sets validation and mapping options such that a given IDN is\n// transformed for domain name lookup according to the requirements set out in\n// Section 5 of RFC 5891. The mappings follow the recommendations of RFC 5894,\n// RFC 5895 and UTS 46. It does not add the Bidi Rule. Use the BidiRule option\n// to add this check.\n//\n// The mappings include normalization and mapping case, width and other\n// compatibility mappings.\nfunc MapForLookup() Option {\n\treturn func(o *options) {\n\t\to.mapping = validateAndMap\n\t\tStrictDomainName(true)(o)\n\t\tValidateLabels(true)(o)\n\t\tRemoveLeadingDots(true)(o)\n\t}\n}\n\ntype options struct {\n\ttransitional      bool\n\tuseSTD3Rules      bool\n\tcheckHyphens      bool\n\tcheckJoiners      bool\n\tverifyDNSLength   bool\n\tremoveLeadingDots bool\n\n\ttrie *idnaTrie\n\n\t// fromPuny calls validation rules when converting A-labels to U-labels.\n\tfromPuny func(p *Profile, s string) error\n\n\t// mapping implements a validation and mapping step as defined in RFC 5895\n\t// or UTS 46, tailored to, for example, domain registration or lookup.\n\tmapping func(p *Profile, s string) (string, error)\n\n\t// bidirule, if specified, checks whether s conforms to the Bidi Rule\n\t// defined in RFC 5893.\n\tbidirule func(s string) bool\n}\n\n// A Profile defines the configuration of a IDNA mapper.\ntype Profile struct {\n\toptions\n}\n\nfunc apply(o *options, opts []Option) {\n\tfor _, f := range opts {\n\t\tf(o)\n\t}\n}\n\n// New creates a new Profile.\n//\n// With no options, the returned Profile is the most permissive and equals the\n// Punycode Profile. Options can be passed to further restrict the Profile. The\n// MapForLookup and ValidateForRegistration options set a collection of options,\n// for lookup and registration purposes respectively, which can be tailored by\n// adding more fine-grained options, where later options override earlier\n// options.\nfunc New(o ...Option) *Profile {\n\tp := &Profile{}\n\tapply(&p.options, o)\n\treturn p\n}\n\n// ToASCII converts a domain or domain label to its ASCII form. For example,\n// ToASCII(\"bücher.example.com\") is \"xn--bcher-kva.example.com\", and\n// ToASCII(\"golang\") is \"golang\". If an error is encountered it will return\n// an error and a (partially) processed result.\nfunc (p *Profile) ToASCII(s string) (string, error) {\n\treturn p.process(s, true)\n}\n\n// ToUnicode converts a domain or domain label to its Unicode form. For example,\n// ToUnicode(\"xn--bcher-kva.example.com\") is \"bücher.example.com\", and\n// ToUnicode(\"golang\") is \"golang\". If an error is encountered it will return\n// an error and a (partially) processed result.\nfunc (p *Profile) ToUnicode(s string) (string, error) {\n\tpp := *p\n\tpp.transitional = false\n\treturn pp.process(s, false)\n}\n\n// String reports a string with a description of the profile for debugging\n// purposes. The string format may change with different versions.\nfunc (p *Profile) String() string {\n\ts := \"\"\n\tif p.transitional {\n\t\ts = \"Transitional\"\n\t} else {\n\t\ts = \"NonTransitional\"\n\t}\n\tif p.useSTD3Rules {\n\t\ts += \":UseSTD3Rules\"\n\t}\n\tif p.checkHyphens {\n\t\ts += \":CheckHyphens\"\n\t}\n\tif p.checkJoiners {\n\t\ts += \":CheckJoiners\"\n\t}\n\tif p.verifyDNSLength {\n\t\ts += \":VerifyDNSLength\"\n\t}\n\treturn s\n}\n\nvar (\n\t// Punycode is a Profile that does raw punycode processing with a minimum\n\t// of validation.\n\tPunycode *Profile = punycode\n\n\t// Lookup is the recommended profile for looking up domain names, according\n\t// to Section 5 of RFC 5891. The exact configuration of this profile may\n\t// change over time.\n\tLookup *Profile = lookup\n\n\t// Display is the recommended profile for displaying domain names.\n\t// The configuration of this profile may change over time.\n\tDisplay *Profile = display\n\n\t// Registration is the recommended profile for checking whether a given\n\t// IDN is valid for registration, according to Section 4 of RFC 5891.\n\tRegistration *Profile = registration\n\n\tpunycode = &Profile{}\n\tlookup   = &Profile{options{\n\t\ttransitional:      true,\n\t\tremoveLeadingDots: true,\n\t\tuseSTD3Rules:      true,\n\t\tcheckHyphens:      true,\n\t\tcheckJoiners:      true,\n\t\ttrie:              trie,\n\t\tfromPuny:          validateFromPunycode,\n\t\tmapping:           validateAndMap,\n\t\tbidirule:          bidirule.ValidString,\n\t}}\n\tdisplay = &Profile{options{\n\t\tuseSTD3Rules:      true,\n\t\tremoveLeadingDots: true,\n\t\tcheckHyphens:      true,\n\t\tcheckJoiners:      true,\n\t\ttrie:              trie,\n\t\tfromPuny:          validateFromPunycode,\n\t\tmapping:           validateAndMap,\n\t\tbidirule:          bidirule.ValidString,\n\t}}\n\tregistration = &Profile{options{\n\t\tuseSTD3Rules:    true,\n\t\tverifyDNSLength: true,\n\t\tcheckHyphens:    true,\n\t\tcheckJoiners:    true,\n\t\ttrie:            trie,\n\t\tfromPuny:        validateFromPunycode,\n\t\tmapping:         validateRegistration,\n\t\tbidirule:        bidirule.ValidString,\n\t}}\n\n\t// TODO: profiles\n\t// Register: recommended for approving domain names: don't do any mappings\n\t// but rather reject on invalid input. Bundle or block deviation characters.\n)\n\ntype labelError struct{ label, code_ string }\n\nfunc (e labelError) code() string { return e.code_ }\nfunc (e labelError) Error() string {\n\treturn fmt.Sprintf(\"idna: invalid label %q\", e.label)\n}\n\ntype runeError rune\n\nfunc (e runeError) code() string { return \"P1\" }\nfunc (e runeError) Error() string {\n\treturn fmt.Sprintf(\"idna: disallowed rune %U\", e)\n}\n\n// process implements the algorithm described in section 4 of UTS #46,\n// see https://www.unicode.org/reports/tr46.\nfunc (p *Profile) process(s string, toASCII bool) (string, error) {\n\tvar err error\n\tif p.mapping != nil {\n\t\ts, err = p.mapping(p, s)\n\t}\n\t// Remove leading empty labels.\n\tif p.removeLeadingDots {\n\t\tfor ; len(s) > 0 && s[0] == '.'; s = s[1:] {\n\t\t}\n\t}\n\t// It seems like we should only create this error on ToASCII, but the\n\t// UTS 46 conformance tests suggests we should always check this.\n\tif err == nil && p.verifyDNSLength && s == \"\" {\n\t\terr = &labelError{s, \"A4\"}\n\t}\n\tlabels := labelIter{orig: s}\n\tfor ; !labels.done(); labels.next() {\n\t\tlabel := labels.label()\n\t\tif label == \"\" {\n\t\t\t// Empty labels are not okay. The label iterator skips the last\n\t\t\t// label if it is empty.\n\t\t\tif err == nil && p.verifyDNSLength {\n\t\t\t\terr = &labelError{s, \"A4\"}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(label, acePrefix) {\n\t\t\tu, err2 := decode(label[len(acePrefix):])\n\t\t\tif err2 != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = err2\n\t\t\t\t}\n\t\t\t\t// Spec says keep the old label.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tlabels.set(u)\n\t\t\tif err == nil && p.fromPuny != nil {\n\t\t\t\terr = p.fromPuny(p, u)\n\t\t\t}\n\t\t\tif err == nil {\n\t\t\t\t// This should be called on NonTransitional, according to the\n\t\t\t\t// spec, but that currently does not have any effect. Use the\n\t\t\t\t// original profile to preserve options.\n\t\t\t\terr = p.validateLabel(u)\n\t\t\t}\n\t\t} else if err == nil {\n\t\t\terr = p.validateLabel(label)\n\t\t}\n\t}\n\tif toASCII {\n\t\tfor labels.reset(); !labels.done(); labels.next() {\n\t\t\tlabel := labels.label()\n\t\t\tif !ascii(label) {\n\t\t\t\ta, err2 := encode(acePrefix, label)\n\t\t\t\tif err == nil {\n\t\t\t\t\terr = err2\n\t\t\t\t}\n\t\t\t\tlabel = a\n\t\t\t\tlabels.set(a)\n\t\t\t}\n\t\t\tn := len(label)\n\t\t\tif p.verifyDNSLength && err == nil && (n == 0 || n > 63) {\n\t\t\t\terr = &labelError{label, \"A4\"}\n\t\t\t}\n\t\t}\n\t}\n\ts = labels.result()\n\tif toASCII && p.verifyDNSLength && err == nil {\n\t\t// Compute the length of the domain name minus the root label and its dot.\n\t\tn := len(s)\n\t\tif n > 0 && s[n-1] == '.' {\n\t\t\tn--\n\t\t}\n\t\tif len(s) < 1 || n > 253 {\n\t\t\terr = &labelError{s, \"A4\"}\n\t\t}\n\t}\n\treturn s, err\n}\n\nfunc normalize(p *Profile, s string) (string, error) {\n\treturn norm.NFC.String(s), nil\n}\n\nfunc validateRegistration(p *Profile, s string) (string, error) {\n\tif !norm.NFC.IsNormalString(s) {\n\t\treturn s, &labelError{s, \"V1\"}\n\t}\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\t// Copy bytes not copied so far.\n\t\tswitch p.simplify(info(v).category()) {\n\t\t// TODO: handle the NV8 defined in the Unicode idna data set to allow\n\t\t// for strict conformance to IDNA2008.\n\t\tcase valid, deviation:\n\t\tcase disallowed, mapped, unknown, ignored:\n\t\t\tr, _ := utf8.DecodeRuneInString(s[i:])\n\t\t\treturn s, runeError(r)\n\t\t}\n\t\ti += sz\n\t}\n\treturn s, nil\n}\n\nfunc validateAndMap(p *Profile, s string) (string, error) {\n\tvar (\n\t\terr error\n\t\tb   []byte\n\t\tk   int\n\t)\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\tstart := i\n\t\ti += sz\n\t\t// Copy bytes not copied so far.\n\t\tswitch p.simplify(info(v).category()) {\n\t\tcase valid:\n\t\t\tcontinue\n\t\tcase disallowed:\n\t\t\tif err == nil {\n\t\t\t\tr, _ := utf8.DecodeRuneInString(s[start:])\n\t\t\t\terr = runeError(r)\n\t\t\t}\n\t\t\tcontinue\n\t\tcase mapped, deviation:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\tb = info(v).appendMapping(b, s[start:i])\n\t\tcase ignored:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\t// drop the rune\n\t\tcase unknown:\n\t\t\tb = append(b, s[k:start]...)\n\t\t\tb = append(b, \"\\ufffd\"...)\n\t\t}\n\t\tk = i\n\t}\n\tif k == 0 {\n\t\t// No changes so far.\n\t\ts = norm.NFC.String(s)\n\t} else {\n\t\tb = append(b, s[k:]...)\n\t\tif norm.NFC.QuickSpan(b) != len(b) {\n\t\t\tb = norm.NFC.Bytes(b)\n\t\t}\n\t\t// TODO: the punycode converters require strings as input.\n\t\ts = string(b)\n\t}\n\treturn s, err\n}\n\n// A labelIter allows iterating over domain name labels.\ntype labelIter struct {\n\torig     string\n\tslice    []string\n\tcurStart int\n\tcurEnd   int\n\ti        int\n}\n\nfunc (l *labelIter) reset() {\n\tl.curStart = 0\n\tl.curEnd = 0\n\tl.i = 0\n}\n\nfunc (l *labelIter) done() bool {\n\treturn l.curStart >= len(l.orig)\n}\n\nfunc (l *labelIter) result() string {\n\tif l.slice != nil {\n\t\treturn strings.Join(l.slice, \".\")\n\t}\n\treturn l.orig\n}\n\nfunc (l *labelIter) label() string {\n\tif l.slice != nil {\n\t\treturn l.slice[l.i]\n\t}\n\tp := strings.IndexByte(l.orig[l.curStart:], '.')\n\tl.curEnd = l.curStart + p\n\tif p == -1 {\n\t\tl.curEnd = len(l.orig)\n\t}\n\treturn l.orig[l.curStart:l.curEnd]\n}\n\n// next sets the value to the next label. It skips the last label if it is empty.\nfunc (l *labelIter) next() {\n\tl.i++\n\tif l.slice != nil {\n\t\tif l.i >= len(l.slice) || l.i == len(l.slice)-1 && l.slice[l.i] == \"\" {\n\t\t\tl.curStart = len(l.orig)\n\t\t}\n\t} else {\n\t\tl.curStart = l.curEnd + 1\n\t\tif l.curStart == len(l.orig)-1 && l.orig[l.curStart] == '.' {\n\t\t\tl.curStart = len(l.orig)\n\t\t}\n\t}\n}\n\nfunc (l *labelIter) set(s string) {\n\tif l.slice == nil {\n\t\tl.slice = strings.Split(l.orig, \".\")\n\t}\n\tl.slice[l.i] = s\n}\n\n// acePrefix is the ASCII Compatible Encoding prefix.\nconst acePrefix = \"xn--\"\n\nfunc (p *Profile) simplify(cat category) category {\n\tswitch cat {\n\tcase disallowedSTD3Mapped:\n\t\tif p.useSTD3Rules {\n\t\t\tcat = disallowed\n\t\t} else {\n\t\t\tcat = mapped\n\t\t}\n\tcase disallowedSTD3Valid:\n\t\tif p.useSTD3Rules {\n\t\t\tcat = disallowed\n\t\t} else {\n\t\t\tcat = valid\n\t\t}\n\tcase deviation:\n\t\tif !p.transitional {\n\t\t\tcat = valid\n\t\t}\n\tcase validNV8, validXV8:\n\t\t// TODO: handle V2008\n\t\tcat = valid\n\t}\n\treturn cat\n}\n\nfunc validateFromPunycode(p *Profile, s string) error {\n\tif !norm.NFC.IsNormalString(s) {\n\t\treturn &labelError{s, \"V1\"}\n\t}\n\tfor i := 0; i < len(s); {\n\t\tv, sz := trie.lookupString(s[i:])\n\t\tif c := p.simplify(info(v).category()); c != valid && c != deviation {\n\t\t\treturn &labelError{s, \"V6\"}\n\t\t}\n\t\ti += sz\n\t}\n\treturn nil\n}\n\nconst (\n\tzwnj = \"\\u200c\"\n\tzwj  = \"\\u200d\"\n)\n\ntype joinState int8\n\nconst (\n\tstateStart joinState = iota\n\tstateVirama\n\tstateBefore\n\tstateBeforeVirama\n\tstateAfter\n\tstateFAIL\n)\n\nvar joinStates = [][numJoinTypes]joinState{\n\tstateStart: {\n\t\tjoiningL:   stateBefore,\n\t\tjoiningD:   stateBefore,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateVirama,\n\t},\n\tstateVirama: {\n\t\tjoiningL: stateBefore,\n\t\tjoiningD: stateBefore,\n\t},\n\tstateBefore: {\n\t\tjoiningL:   stateBefore,\n\t\tjoiningD:   stateBefore,\n\t\tjoiningT:   stateBefore,\n\t\tjoinZWNJ:   stateAfter,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateBeforeVirama,\n\t},\n\tstateBeforeVirama: {\n\t\tjoiningL: stateBefore,\n\t\tjoiningD: stateBefore,\n\t\tjoiningT: stateBefore,\n\t},\n\tstateAfter: {\n\t\tjoiningL:   stateFAIL,\n\t\tjoiningD:   stateBefore,\n\t\tjoiningT:   stateAfter,\n\t\tjoiningR:   stateStart,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateAfter, // no-op as we can't accept joiners here\n\t},\n\tstateFAIL: {\n\t\t0:          stateFAIL,\n\t\tjoiningL:   stateFAIL,\n\t\tjoiningD:   stateFAIL,\n\t\tjoiningT:   stateFAIL,\n\t\tjoiningR:   stateFAIL,\n\t\tjoinZWNJ:   stateFAIL,\n\t\tjoinZWJ:    stateFAIL,\n\t\tjoinVirama: stateFAIL,\n\t},\n}\n\n// validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are\n// already implicitly satisfied by the overall implementation.\nfunc (p *Profile) validateLabel(s string) error {\n\tif s == \"\" {\n\t\tif p.verifyDNSLength {\n\t\t\treturn &labelError{s, \"A4\"}\n\t\t}\n\t\treturn nil\n\t}\n\tif p.bidirule != nil && !p.bidirule(s) {\n\t\treturn &labelError{s, \"B\"}\n\t}\n\tif p.checkHyphens {\n\t\tif len(s) > 4 && s[2] == '-' && s[3] == '-' {\n\t\t\treturn &labelError{s, \"V2\"}\n\t\t}\n\t\tif s[0] == '-' || s[len(s)-1] == '-' {\n\t\t\treturn &labelError{s, \"V3\"}\n\t\t}\n\t}\n\tif !p.checkJoiners {\n\t\treturn nil\n\t}\n\ttrie := p.trie // p.checkJoiners is only set if trie is set.\n\t// TODO: merge the use of this in the trie.\n\tv, sz := trie.lookupString(s)\n\tx := info(v)\n\tif x.isModifier() {\n\t\treturn &labelError{s, \"V5\"}\n\t}\n\t// Quickly return in the absence of zero-width (non) joiners.\n\tif strings.Index(s, zwj) == -1 && strings.Index(s, zwnj) == -1 {\n\t\treturn nil\n\t}\n\tst := stateStart\n\tfor i := 0; ; {\n\t\tjt := x.joinType()\n\t\tif s[i:i+sz] == zwj {\n\t\t\tjt = joinZWJ\n\t\t} else if s[i:i+sz] == zwnj {\n\t\t\tjt = joinZWNJ\n\t\t}\n\t\tst = joinStates[st][jt]\n\t\tif x.isViramaModifier() {\n\t\t\tst = joinStates[st][joinVirama]\n\t\t}\n\t\tif i += sz; i == len(s) {\n\t\t\tbreak\n\t\t}\n\t\tv, sz = trie.lookupString(s[i:])\n\t\tx = info(v)\n\t}\n\tif st == stateFAIL || st == stateAfter {\n\t\treturn &labelError{s, \"C\"}\n\t}\n\treturn nil\n}\n\nfunc ascii(s string) bool {\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] >= utf8.RuneSelf {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/pre_go118.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.18\n\npackage idna\n\nconst transitionalLookup = true\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/punycode.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage idna\n\n// This file implements the Punycode algorithm from RFC 3492.\n\nimport (\n\t\"math\"\n\t\"strings\"\n\t\"unicode/utf8\"\n)\n\n// These parameter values are specified in section 5.\n//\n// All computation is done with int32s, so that overflow behavior is identical\n// regardless of whether int is 32-bit or 64-bit.\nconst (\n\tbase        int32 = 36\n\tdamp        int32 = 700\n\tinitialBias int32 = 72\n\tinitialN    int32 = 128\n\tskew        int32 = 38\n\ttmax        int32 = 26\n\ttmin        int32 = 1\n)\n\nfunc punyError(s string) error { return &labelError{s, \"A3\"} }\n\n// decode decodes a string as specified in section 6.2.\nfunc decode(encoded string) (string, error) {\n\tif encoded == \"\" {\n\t\treturn \"\", nil\n\t}\n\tpos := 1 + strings.LastIndex(encoded, \"-\")\n\tif pos == 1 {\n\t\treturn \"\", punyError(encoded)\n\t}\n\tif pos == len(encoded) {\n\t\treturn encoded[:len(encoded)-1], nil\n\t}\n\toutput := make([]rune, 0, len(encoded))\n\tif pos != 0 {\n\t\tfor _, r := range encoded[:pos-1] {\n\t\t\toutput = append(output, r)\n\t\t}\n\t}\n\ti, n, bias := int32(0), initialN, initialBias\n\toverflow := false\n\tfor pos < len(encoded) {\n\t\toldI, w := i, int32(1)\n\t\tfor k := base; ; k += base {\n\t\t\tif pos == len(encoded) {\n\t\t\t\treturn \"\", punyError(encoded)\n\t\t\t}\n\t\t\tdigit, ok := decodeDigit(encoded[pos])\n\t\t\tif !ok {\n\t\t\t\treturn \"\", punyError(encoded)\n\t\t\t}\n\t\t\tpos++\n\t\t\ti, overflow = madd(i, digit, w)\n\t\t\tif overflow {\n\t\t\t\treturn \"\", punyError(encoded)\n\t\t\t}\n\t\t\tt := k - bias\n\t\t\tif k <= bias {\n\t\t\t\tt = tmin\n\t\t\t} else if k >= bias+tmax {\n\t\t\t\tt = tmax\n\t\t\t}\n\t\t\tif digit < t {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tw, overflow = madd(0, w, base-t)\n\t\t\tif overflow {\n\t\t\t\treturn \"\", punyError(encoded)\n\t\t\t}\n\t\t}\n\t\tif len(output) >= 1024 {\n\t\t\treturn \"\", punyError(encoded)\n\t\t}\n\t\tx := int32(len(output) + 1)\n\t\tbias = adapt(i-oldI, x, oldI == 0)\n\t\tn += i / x\n\t\ti %= x\n\t\tif n < 0 || n > utf8.MaxRune {\n\t\t\treturn \"\", punyError(encoded)\n\t\t}\n\t\toutput = append(output, 0)\n\t\tcopy(output[i+1:], output[i:])\n\t\toutput[i] = n\n\t\ti++\n\t}\n\treturn string(output), nil\n}\n\n// encode encodes a string as specified in section 6.3 and prepends prefix to\n// the result.\n//\n// The \"while h < length(input)\" line in the specification becomes \"for\n// remaining != 0\" in the Go code, because len(s) in Go is in bytes, not runes.\nfunc encode(prefix, s string) (string, error) {\n\toutput := make([]byte, len(prefix), len(prefix)+1+2*len(s))\n\tcopy(output, prefix)\n\tdelta, n, bias := int32(0), initialN, initialBias\n\tb, remaining := int32(0), int32(0)\n\tfor _, r := range s {\n\t\tif r < 0x80 {\n\t\t\tb++\n\t\t\toutput = append(output, byte(r))\n\t\t} else {\n\t\t\tremaining++\n\t\t}\n\t}\n\th := b\n\tif b > 0 {\n\t\toutput = append(output, '-')\n\t}\n\toverflow := false\n\tfor remaining != 0 {\n\t\tm := int32(0x7fffffff)\n\t\tfor _, r := range s {\n\t\t\tif m > r && r >= n {\n\t\t\t\tm = r\n\t\t\t}\n\t\t}\n\t\tdelta, overflow = madd(delta, m-n, h+1)\n\t\tif overflow {\n\t\t\treturn \"\", punyError(s)\n\t\t}\n\t\tn = m\n\t\tfor _, r := range s {\n\t\t\tif r < n {\n\t\t\t\tdelta++\n\t\t\t\tif delta < 0 {\n\t\t\t\t\treturn \"\", punyError(s)\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif r > n {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tq := delta\n\t\t\tfor k := base; ; k += base {\n\t\t\t\tt := k - bias\n\t\t\t\tif k <= bias {\n\t\t\t\t\tt = tmin\n\t\t\t\t} else if k >= bias+tmax {\n\t\t\t\t\tt = tmax\n\t\t\t\t}\n\t\t\t\tif q < t {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\toutput = append(output, encodeDigit(t+(q-t)%(base-t)))\n\t\t\t\tq = (q - t) / (base - t)\n\t\t\t}\n\t\t\toutput = append(output, encodeDigit(q))\n\t\t\tbias = adapt(delta, h+1, h == b)\n\t\t\tdelta = 0\n\t\t\th++\n\t\t\tremaining--\n\t\t}\n\t\tdelta++\n\t\tn++\n\t}\n\treturn string(output), nil\n}\n\n// madd computes a + (b * c), detecting overflow.\nfunc madd(a, b, c int32) (next int32, overflow bool) {\n\tp := int64(b) * int64(c)\n\tif p > math.MaxInt32-int64(a) {\n\t\treturn 0, true\n\t}\n\treturn a + int32(p), false\n}\n\nfunc decodeDigit(x byte) (digit int32, ok bool) {\n\tswitch {\n\tcase '0' <= x && x <= '9':\n\t\treturn int32(x - ('0' - 26)), true\n\tcase 'A' <= x && x <= 'Z':\n\t\treturn int32(x - 'A'), true\n\tcase 'a' <= x && x <= 'z':\n\t\treturn int32(x - 'a'), true\n\t}\n\treturn 0, false\n}\n\nfunc encodeDigit(digit int32) byte {\n\tswitch {\n\tcase 0 <= digit && digit < 26:\n\t\treturn byte(digit + 'a')\n\tcase 26 <= digit && digit < 36:\n\t\treturn byte(digit + ('0' - 26))\n\t}\n\tpanic(\"idna: internal error in punycode encoding\")\n}\n\n// adapt is the bias adaptation function specified in section 6.1.\nfunc adapt(delta, numPoints int32, firstTime bool) int32 {\n\tif firstTime {\n\t\tdelta /= damp\n\t} else {\n\t\tdelta /= 2\n\t}\n\tdelta += delta / numPoints\n\tk := int32(0)\n\tfor delta > ((base-tmin)*tmax)/2 {\n\t\tdelta /= base - tmin\n\t\tk += base\n\t}\n\treturn k + (base-tmin+1)*delta/(delta+skew)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables10.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.10 && !go1.13\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"10.0.0\"\n\nvar mappings string = \"\" + // Size: 8175 bytes\n\t\"\\x00\\x01 \\x03 ̈\\x01a\\x03 ̄\\x012\\x013\\x03 ́\\x03 ̧\\x011\\x01o\\x051⁄4\\x051⁄2\" +\n\t\"\\x053⁄4\\x03i̇\\x03l·\\x03ʼn\\x01s\\x03dž\\x03ⱥ\\x03ⱦ\\x01h\\x01j\\x01r\\x01w\\x01y\" +\n\t\"\\x03 ̆\\x03 ̇\\x03 ̊\\x03 ̨\\x03 ̃\\x03 ̋\\x01l\\x01x\\x04̈́\\x03 ι\\x01;\\x05 ̈́\" +\n\t\"\\x04եւ\\x04اٴ\\x04وٴ\\x04ۇٴ\\x04يٴ\\x06क़\\x06ख़\\x06ग़\\x06ज़\\x06ड़\\x06ढ़\\x06फ़\" +\n\t\"\\x06य़\\x06ড়\\x06ঢ়\\x06য়\\x06ਲ਼\\x06ਸ਼\\x06ਖ਼\\x06ਗ਼\\x06ਜ਼\\x06ਫ਼\\x06ଡ଼\\x06ଢ଼\" +\n\t\"\\x06ํา\\x06ໍາ\\x06ຫນ\\x06ຫມ\\x06གྷ\\x06ཌྷ\\x06དྷ\\x06བྷ\\x06ཛྷ\\x06ཀྵ\\x06ཱི\\x06ཱུ\" +\n\t\"\\x06ྲྀ\\x09ྲཱྀ\\x06ླྀ\\x09ླཱྀ\\x06ཱྀ\\x06ྒྷ\\x06ྜྷ\\x06ྡྷ\\x06ྦྷ\\x06ྫྷ\\x06ྐྵ\\x02\" +\n\t\"в\\x02д\\x02о\\x02с\\x02т\\x02ъ\\x02ѣ\\x02æ\\x01b\\x01d\\x01e\\x02ǝ\\x01g\\x01i\\x01k\" +\n\t\"\\x01m\\x01n\\x02ȣ\\x01p\\x01t\\x01u\\x02ɐ\\x02ɑ\\x02ə\\x02ɛ\\x02ɜ\\x02ŋ\\x02ɔ\\x02ɯ\" +\n\t\"\\x01v\\x02β\\x02γ\\x02δ\\x02φ\\x02χ\\x02ρ\\x02н\\x02ɒ\\x01c\\x02ɕ\\x02ð\\x01f\\x02ɟ\" +\n\t\"\\x02ɡ\\x02ɥ\\x02ɨ\\x02ɩ\\x02ɪ\\x02ʝ\\x02ɭ\\x02ʟ\\x02ɱ\\x02ɰ\\x02ɲ\\x02ɳ\\x02ɴ\\x02ɵ\" +\n\t\"\\x02ɸ\\x02ʂ\\x02ʃ\\x02ƫ\\x02ʉ\\x02ʊ\\x02ʋ\\x02ʌ\\x01z\\x02ʐ\\x02ʑ\\x02ʒ\\x02θ\\x02ss\" +\n\t\"\\x02ά\\x02έ\\x02ή\\x02ί\\x02ό\\x02ύ\\x02ώ\\x05ἀι\\x05ἁι\\x05ἂι\\x05ἃι\\x05ἄι\\x05ἅι\" +\n\t\"\\x05ἆι\\x05ἇι\\x05ἠι\\x05ἡι\\x05ἢι\\x05ἣι\\x05ἤι\\x05ἥι\\x05ἦι\\x05ἧι\\x05ὠι\\x05ὡι\" +\n\t\"\\x05ὢι\\x05ὣι\\x05ὤι\\x05ὥι\\x05ὦι\\x05ὧι\\x05ὰι\\x04αι\\x04άι\\x05ᾶι\\x02ι\\x05 ̈͂\" +\n\t\"\\x05ὴι\\x04ηι\\x04ήι\\x05ῆι\\x05 ̓̀\\x05 ̓́\\x05 ̓͂\\x02ΐ\\x05 ̔̀\\x05 ̔́\\x05 ̔͂\" +\n\t\"\\x02ΰ\\x05 ̈̀\\x01`\\x05ὼι\\x04ωι\\x04ώι\\x05ῶι\\x06′′\\x09′′′\\x06‵‵\\x09‵‵‵\\x02!\" +\n\t\"!\\x02??\\x02?!\\x02!?\\x0c′′′′\\x010\\x014\\x015\\x016\\x017\\x018\\x019\\x01+\\x01=\" +\n\t\"\\x01(\\x01)\\x02rs\\x02ħ\\x02no\\x01q\\x02sm\\x02tm\\x02ω\\x02å\\x02א\\x02ב\\x02ג\" +\n\t\"\\x02ד\\x02π\\x051⁄7\\x051⁄9\\x061⁄10\\x051⁄3\\x052⁄3\\x051⁄5\\x052⁄5\\x053⁄5\\x054\" +\n\t\"⁄5\\x051⁄6\\x055⁄6\\x051⁄8\\x053⁄8\\x055⁄8\\x057⁄8\\x041⁄\\x02ii\\x02iv\\x02vi\" +\n\t\"\\x04viii\\x02ix\\x02xi\\x050⁄3\\x06∫∫\\x09∫∫∫\\x06∮∮\\x09∮∮∮\\x0210\\x0211\\x0212\" +\n\t\"\\x0213\\x0214\\x0215\\x0216\\x0217\\x0218\\x0219\\x0220\\x04(10)\\x04(11)\\x04(12)\" +\n\t\"\\x04(13)\\x04(14)\\x04(15)\\x04(16)\\x04(17)\\x04(18)\\x04(19)\\x04(20)\\x0c∫∫∫∫\" +\n\t\"\\x02==\\x05⫝̸\\x02ɫ\\x02ɽ\\x02ȿ\\x02ɀ\\x01.\\x04 ゙\\x04 ゚\\x06より\\x06コト\\x05(ᄀ)\\x05\" +\n\t\"(ᄂ)\\x05(ᄃ)\\x05(ᄅ)\\x05(ᄆ)\\x05(ᄇ)\\x05(ᄉ)\\x05(ᄋ)\\x05(ᄌ)\\x05(ᄎ)\\x05(ᄏ)\\x05(ᄐ\" +\n\t\")\\x05(ᄑ)\\x05(ᄒ)\\x05(가)\\x05(나)\\x05(다)\\x05(라)\\x05(마)\\x05(바)\\x05(사)\\x05(아)\" +\n\t\"\\x05(자)\\x05(차)\\x05(카)\\x05(타)\\x05(파)\\x05(하)\\x05(주)\\x08(오전)\\x08(오후)\\x05(一)\" +\n\t\"\\x05(二)\\x05(三)\\x05(四)\\x05(五)\\x05(六)\\x05(七)\\x05(八)\\x05(九)\\x05(十)\\x05(月)\" +\n\t\"\\x05(火)\\x05(水)\\x05(木)\\x05(金)\\x05(土)\\x05(日)\\x05(株)\\x05(有)\\x05(社)\\x05(名)\" +\n\t\"\\x05(特)\\x05(財)\\x05(祝)\\x05(労)\\x05(代)\\x05(呼)\\x05(学)\\x05(監)\\x05(企)\\x05(資)\" +\n\t\"\\x05(協)\\x05(祭)\\x05(休)\\x05(自)\\x05(至)\\x0221\\x0222\\x0223\\x0224\\x0225\\x0226\" +\n\t\"\\x0227\\x0228\\x0229\\x0230\\x0231\\x0232\\x0233\\x0234\\x0235\\x06참고\\x06주의\\x0236\" +\n\t\"\\x0237\\x0238\\x0239\\x0240\\x0241\\x0242\\x0243\\x0244\\x0245\\x0246\\x0247\\x0248\" +\n\t\"\\x0249\\x0250\\x041月\\x042月\\x043月\\x044月\\x045月\\x046月\\x047月\\x048月\\x049月\\x0510\" +\n\t\"月\\x0511月\\x0512月\\x02hg\\x02ev\\x0cアパート\\x0cアルファ\\x0cアンペア\\x09アール\\x0cイニング\\x09\" +\n\t\"インチ\\x09ウォン\\x0fエスクード\\x0cエーカー\\x09オンス\\x09オーム\\x09カイリ\\x0cカラット\\x0cカロリー\\x09ガロ\" +\n\t\"ン\\x09ガンマ\\x06ギガ\\x09ギニー\\x0cキュリー\\x0cギルダー\\x06キロ\\x0fキログラム\\x12キロメートル\\x0fキロワッ\" +\n\t\"ト\\x09グラム\\x0fグラムトン\\x0fクルゼイロ\\x0cクローネ\\x09ケース\\x09コルナ\\x09コーポ\\x0cサイクル\\x0fサンチ\" +\n\t\"ーム\\x0cシリング\\x09センチ\\x09セント\\x09ダース\\x06デシ\\x06ドル\\x06トン\\x06ナノ\\x09ノット\\x09ハイツ\" +\n\t\"\\x0fパーセント\\x09パーツ\\x0cバーレル\\x0fピアストル\\x09ピクル\\x06ピコ\\x06ビル\\x0fファラッド\\x0cフィート\" +\n\t\"\\x0fブッシェル\\x09フラン\\x0fヘクタール\\x06ペソ\\x09ペニヒ\\x09ヘルツ\\x09ペンス\\x09ページ\\x09ベータ\\x0cポイ\" +\n\t\"ント\\x09ボルト\\x06ホン\\x09ポンド\\x09ホール\\x09ホーン\\x0cマイクロ\\x09マイル\\x09マッハ\\x09マルク\\x0fマ\" +\n\t\"ンション\\x0cミクロン\\x06ミリ\\x0fミリバール\\x06メガ\\x0cメガトン\\x0cメートル\\x09ヤード\\x09ヤール\\x09ユアン\" +\n\t\"\\x0cリットル\\x06リラ\\x09ルピー\\x0cルーブル\\x06レム\\x0fレントゲン\\x09ワット\\x040点\\x041点\\x042点\" +\n\t\"\\x043点\\x044点\\x045点\\x046点\\x047点\\x048点\\x049点\\x0510点\\x0511点\\x0512点\\x0513点\" +\n\t\"\\x0514点\\x0515点\\x0516点\\x0517点\\x0518点\\x0519点\\x0520点\\x0521点\\x0522点\\x0523点\" +\n\t\"\\x0524点\\x02da\\x02au\\x02ov\\x02pc\\x02dm\\x02iu\\x06平成\\x06昭和\\x06大正\\x06明治\\x0c株\" +\n\t\"式会社\\x02pa\\x02na\\x02ma\\x02ka\\x02kb\\x02mb\\x02gb\\x04kcal\\x02pf\\x02nf\\x02m\" +\n\t\"g\\x02kg\\x02hz\\x02ml\\x02dl\\x02kl\\x02fm\\x02nm\\x02mm\\x02cm\\x02km\\x02m2\\x02m\" +\n\t\"3\\x05m∕s\\x06m∕s2\\x07rad∕s\\x08rad∕s2\\x02ps\\x02ns\\x02ms\\x02pv\\x02nv\\x02mv\" +\n\t\"\\x02kv\\x02pw\\x02nw\\x02mw\\x02kw\\x02bq\\x02cc\\x02cd\\x06c∕kg\\x02db\\x02gy\\x02\" +\n\t\"ha\\x02hp\\x02in\\x02kk\\x02kt\\x02lm\\x02ln\\x02lx\\x02ph\\x02pr\\x02sr\\x02sv\\x02\" +\n\t\"wb\\x05v∕m\\x05a∕m\\x041日\\x042日\\x043日\\x044日\\x045日\\x046日\\x047日\\x048日\\x049日\" +\n\t\"\\x0510日\\x0511日\\x0512日\\x0513日\\x0514日\\x0515日\\x0516日\\x0517日\\x0518日\\x0519日\" +\n\t\"\\x0520日\\x0521日\\x0522日\\x0523日\\x0524日\\x0525日\\x0526日\\x0527日\\x0528日\\x0529日\" +\n\t\"\\x0530日\\x0531日\\x02ь\\x02ɦ\\x02ɬ\\x02ʞ\\x02ʇ\\x02œ\\x04𤋮\\x04𢡊\\x04𢡄\\x04𣏕\\x04𥉉\" +\n\t\"\\x04𥳐\\x04𧻓\\x02ff\\x02fi\\x02fl\\x02st\\x04մն\\x04մե\\x04մի\\x04վն\\x04մխ\\x04יִ\" +\n\t\"\\x04ײַ\\x02ע\\x02ה\\x02כ\\x02ל\\x02ם\\x02ר\\x02ת\\x04שׁ\\x04שׂ\\x06שּׁ\\x06שּׂ\\x04א\" +\n\t\"ַ\\x04אָ\\x04אּ\\x04בּ\\x04גּ\\x04דּ\\x04הּ\\x04וּ\\x04זּ\\x04טּ\\x04יּ\\x04ךּ\\x04\" +\n\t\"כּ\\x04לּ\\x04מּ\\x04נּ\\x04סּ\\x04ףּ\\x04פּ\\x04צּ\\x04קּ\\x04רּ\\x04שּ\\x04תּ\" +\n\t\"\\x04וֹ\\x04בֿ\\x04כֿ\\x04פֿ\\x04אל\\x02ٱ\\x02ٻ\\x02پ\\x02ڀ\\x02ٺ\\x02ٿ\\x02ٹ\\x02ڤ\" +\n\t\"\\x02ڦ\\x02ڄ\\x02ڃ\\x02چ\\x02ڇ\\x02ڍ\\x02ڌ\\x02ڎ\\x02ڈ\\x02ژ\\x02ڑ\\x02ک\\x02گ\\x02ڳ\" +\n\t\"\\x02ڱ\\x02ں\\x02ڻ\\x02ۀ\\x02ہ\\x02ھ\\x02ے\\x02ۓ\\x02ڭ\\x02ۇ\\x02ۆ\\x02ۈ\\x02ۋ\\x02ۅ\" +\n\t\"\\x02ۉ\\x02ې\\x02ى\\x04ئا\\x04ئە\\x04ئو\\x04ئۇ\\x04ئۆ\\x04ئۈ\\x04ئې\\x04ئى\\x02ی\\x04\" +\n\t\"ئج\\x04ئح\\x04ئم\\x04ئي\\x04بج\\x04بح\\x04بخ\\x04بم\\x04بى\\x04بي\\x04تج\\x04تح\" +\n\t\"\\x04تخ\\x04تم\\x04تى\\x04تي\\x04ثج\\x04ثم\\x04ثى\\x04ثي\\x04جح\\x04جم\\x04حج\\x04حم\" +\n\t\"\\x04خج\\x04خح\\x04خم\\x04سج\\x04سح\\x04سخ\\x04سم\\x04صح\\x04صم\\x04ضج\\x04ضح\\x04ضخ\" +\n\t\"\\x04ضم\\x04طح\\x04طم\\x04ظم\\x04عج\\x04عم\\x04غج\\x04غم\\x04فج\\x04فح\\x04فخ\\x04فم\" +\n\t\"\\x04فى\\x04في\\x04قح\\x04قم\\x04قى\\x04قي\\x04كا\\x04كج\\x04كح\\x04كخ\\x04كل\\x04كم\" +\n\t\"\\x04كى\\x04كي\\x04لج\\x04لح\\x04لخ\\x04لم\\x04لى\\x04لي\\x04مج\\x04مح\\x04مخ\\x04مم\" +\n\t\"\\x04مى\\x04مي\\x04نج\\x04نح\\x04نخ\\x04نم\\x04نى\\x04ني\\x04هج\\x04هم\\x04هى\\x04هي\" +\n\t\"\\x04يج\\x04يح\\x04يخ\\x04يم\\x04يى\\x04يي\\x04ذٰ\\x04رٰ\\x04ىٰ\\x05 ٌّ\\x05 ٍّ\\x05\" +\n\t\" َّ\\x05 ُّ\\x05 ِّ\\x05 ّٰ\\x04ئر\\x04ئز\\x04ئن\\x04بر\\x04بز\\x04بن\\x04تر\\x04تز\" +\n\t\"\\x04تن\\x04ثر\\x04ثز\\x04ثن\\x04ما\\x04نر\\x04نز\\x04نن\\x04ير\\x04يز\\x04ين\\x04ئخ\" +\n\t\"\\x04ئه\\x04به\\x04ته\\x04صخ\\x04له\\x04نه\\x04هٰ\\x04يه\\x04ثه\\x04سه\\x04شم\\x04شه\" +\n\t\"\\x06ـَّ\\x06ـُّ\\x06ـِّ\\x04طى\\x04طي\\x04عى\\x04عي\\x04غى\\x04غي\\x04سى\\x04سي\" +\n\t\"\\x04شى\\x04شي\\x04حى\\x04حي\\x04جى\\x04جي\\x04خى\\x04خي\\x04صى\\x04صي\\x04ضى\\x04ضي\" +\n\t\"\\x04شج\\x04شح\\x04شخ\\x04شر\\x04سر\\x04صر\\x04ضر\\x04اً\\x06تجم\\x06تحج\\x06تحم\" +\n\t\"\\x06تخم\\x06تمج\\x06تمح\\x06تمخ\\x06جمح\\x06حمي\\x06حمى\\x06سحج\\x06سجح\\x06سجى\" +\n\t\"\\x06سمح\\x06سمج\\x06سمم\\x06صحح\\x06صمم\\x06شحم\\x06شجي\\x06شمخ\\x06شمم\\x06ضحى\" +\n\t\"\\x06ضخم\\x06طمح\\x06طمم\\x06طمي\\x06عجم\\x06عمم\\x06عمى\\x06غمم\\x06غمي\\x06غمى\" +\n\t\"\\x06فخم\\x06قمح\\x06قمم\\x06لحم\\x06لحي\\x06لحى\\x06لجج\\x06لخم\\x06لمح\\x06محج\" +\n\t\"\\x06محم\\x06محي\\x06مجح\\x06مجم\\x06مخج\\x06مخم\\x06مجخ\\x06همج\\x06همم\\x06نحم\" +\n\t\"\\x06نحى\\x06نجم\\x06نجى\\x06نمي\\x06نمى\\x06يمم\\x06بخي\\x06تجي\\x06تجى\\x06تخي\" +\n\t\"\\x06تخى\\x06تمي\\x06تمى\\x06جمي\\x06جحى\\x06جمى\\x06سخى\\x06صحي\\x06شحي\\x06ضحي\" +\n\t\"\\x06لجي\\x06لمي\\x06يحي\\x06يجي\\x06يمي\\x06ممي\\x06قمي\\x06نحي\\x06عمي\\x06كمي\" +\n\t\"\\x06نجح\\x06مخي\\x06لجم\\x06كمم\\x06جحي\\x06حجي\\x06مجي\\x06فمي\\x06بحي\\x06سخي\" +\n\t\"\\x06نجي\\x06صلے\\x06قلے\\x08الله\\x08اكبر\\x08محمد\\x08صلعم\\x08رسول\\x08عليه\" +\n\t\"\\x08وسلم\\x06صلى!صلى الله عليه وسلم\\x0fجل جلاله\\x08ریال\\x01,\\x01:\\x01!\" +\n\t\"\\x01?\\x01_\\x01{\\x01}\\x01[\\x01]\\x01#\\x01&\\x01*\\x01-\\x01<\\x01>\\x01\\\\\\x01$\" +\n\t\"\\x01%\\x01@\\x04ـً\\x04ـَ\\x04ـُ\\x04ـِ\\x04ـّ\\x04ـْ\\x02ء\\x02آ\\x02أ\\x02ؤ\\x02إ\" +\n\t\"\\x02ئ\\x02ا\\x02ب\\x02ة\\x02ت\\x02ث\\x02ج\\x02ح\\x02خ\\x02د\\x02ذ\\x02ر\\x02ز\\x02س\" +\n\t\"\\x02ش\\x02ص\\x02ض\\x02ط\\x02ظ\\x02ع\\x02غ\\x02ف\\x02ق\\x02ك\\x02ل\\x02م\\x02ن\\x02ه\" +\n\t\"\\x02و\\x02ي\\x04لآ\\x04لأ\\x04لإ\\x04لا\\x01\\x22\\x01'\\x01/\\x01^\\x01|\\x01~\\x02¢\" +\n\t\"\\x02£\\x02¬\\x02¦\\x02¥\\x08𝅗𝅥\\x08𝅘𝅥\\x0c𝅘𝅥𝅮\\x0c𝅘𝅥𝅯\\x0c𝅘𝅥𝅰\\x0c𝅘𝅥𝅱\\x0c𝅘𝅥𝅲\\x08𝆹\" +\n\t\"𝅥\\x08𝆺𝅥\\x0c𝆹𝅥𝅮\\x0c𝆺𝅥𝅮\\x0c𝆹𝅥𝅯\\x0c𝆺𝅥𝅯\\x02ı\\x02ȷ\\x02α\\x02ε\\x02ζ\\x02η\\x02\" +\n\t\"κ\\x02λ\\x02μ\\x02ν\\x02ξ\\x02ο\\x02σ\\x02τ\\x02υ\\x02ψ\\x03∇\\x03∂\\x02ϝ\\x02ٮ\\x02ڡ\" +\n\t\"\\x02ٯ\\x020,\\x021,\\x022,\\x023,\\x024,\\x025,\\x026,\\x027,\\x028,\\x029,\\x03(a)\" +\n\t\"\\x03(b)\\x03(c)\\x03(d)\\x03(e)\\x03(f)\\x03(g)\\x03(h)\\x03(i)\\x03(j)\\x03(k)\" +\n\t\"\\x03(l)\\x03(m)\\x03(n)\\x03(o)\\x03(p)\\x03(q)\\x03(r)\\x03(s)\\x03(t)\\x03(u)\" +\n\t\"\\x03(v)\\x03(w)\\x03(x)\\x03(y)\\x03(z)\\x07〔s〕\\x02wz\\x02hv\\x02sd\\x03ppv\\x02w\" +\n\t\"c\\x02mc\\x02md\\x02dj\\x06ほか\\x06ココ\\x03サ\\x03手\\x03字\\x03双\\x03デ\\x03二\\x03多\\x03解\" +\n\t\"\\x03天\\x03交\\x03映\\x03無\\x03料\\x03前\\x03後\\x03再\\x03新\\x03初\\x03終\\x03生\\x03販\\x03声\" +\n\t\"\\x03吹\\x03演\\x03投\\x03捕\\x03一\\x03三\\x03遊\\x03左\\x03中\\x03右\\x03指\\x03走\\x03打\\x03禁\" +\n\t\"\\x03空\\x03合\\x03満\\x03有\\x03月\\x03申\\x03割\\x03営\\x03配\\x09〔本〕\\x09〔三〕\\x09〔二〕\\x09〔安\" +\n\t\"〕\\x09〔点〕\\x09〔打〕\\x09〔盗〕\\x09〔勝〕\\x09〔敗〕\\x03得\\x03可\\x03丽\\x03丸\\x03乁\\x03你\\x03\" +\n\t\"侮\\x03侻\\x03倂\\x03偺\\x03備\\x03僧\\x03像\\x03㒞\\x03免\\x03兔\\x03兤\\x03具\\x03㒹\\x03內\\x03\" +\n\t\"冗\\x03冤\\x03仌\\x03冬\\x03况\\x03凵\\x03刃\\x03㓟\\x03刻\\x03剆\\x03剷\\x03㔕\\x03勇\\x03勉\\x03\" +\n\t\"勤\\x03勺\\x03包\\x03匆\\x03北\\x03卉\\x03卑\\x03博\\x03即\\x03卽\\x03卿\\x03灰\\x03及\\x03叟\\x03\" +\n\t\"叫\\x03叱\\x03吆\\x03咞\\x03吸\\x03呈\\x03周\\x03咢\\x03哶\\x03唐\\x03啓\\x03啣\\x03善\\x03喙\\x03\" +\n\t\"喫\\x03喳\\x03嗂\\x03圖\\x03嘆\\x03圗\\x03噑\\x03噴\\x03切\\x03壮\\x03城\\x03埴\\x03堍\\x03型\\x03\" +\n\t\"堲\\x03報\\x03墬\\x03売\\x03壷\\x03夆\\x03夢\\x03奢\\x03姬\\x03娛\\x03娧\\x03姘\\x03婦\\x03㛮\\x03\" +\n\t\"嬈\\x03嬾\\x03寃\\x03寘\\x03寧\\x03寳\\x03寿\\x03将\\x03尢\\x03㞁\\x03屠\\x03屮\\x03峀\\x03岍\\x03\" +\n\t\"嵃\\x03嵮\\x03嵫\\x03嵼\\x03巡\\x03巢\\x03㠯\\x03巽\\x03帨\\x03帽\\x03幩\\x03㡢\\x03㡼\\x03庰\\x03\" +\n\t\"庳\\x03庶\\x03廊\\x03廾\\x03舁\\x03弢\\x03㣇\\x03形\\x03彫\\x03㣣\\x03徚\\x03忍\\x03志\\x03忹\\x03\" +\n\t\"悁\\x03㤺\\x03㤜\\x03悔\\x03惇\\x03慈\\x03慌\\x03慎\\x03慺\\x03憎\\x03憲\\x03憤\\x03憯\\x03懞\\x03\" +\n\t\"懲\\x03懶\\x03成\\x03戛\\x03扝\\x03抱\\x03拔\\x03捐\\x03挽\\x03拼\\x03捨\\x03掃\\x03揤\\x03搢\\x03\" +\n\t\"揅\\x03掩\\x03㨮\\x03摩\\x03摾\\x03撝\\x03摷\\x03㩬\\x03敏\\x03敬\\x03旣\\x03書\\x03晉\\x03㬙\\x03\" +\n\t\"暑\\x03㬈\\x03㫤\\x03冒\\x03冕\\x03最\\x03暜\\x03肭\\x03䏙\\x03朗\\x03望\\x03朡\\x03杞\\x03杓\\x03\" +\n\t\"㭉\\x03柺\\x03枅\\x03桒\\x03梅\\x03梎\\x03栟\\x03椔\\x03㮝\\x03楂\\x03榣\\x03槪\\x03檨\\x03櫛\\x03\" +\n\t\"㰘\\x03次\\x03歔\\x03㱎\\x03歲\\x03殟\\x03殺\\x03殻\\x03汎\\x03沿\\x03泍\\x03汧\\x03洖\\x03派\\x03\" +\n\t\"海\\x03流\\x03浩\\x03浸\\x03涅\\x03洴\\x03港\\x03湮\\x03㴳\\x03滋\\x03滇\\x03淹\\x03潮\\x03濆\\x03\" +\n\t\"瀹\\x03瀞\\x03瀛\\x03㶖\\x03灊\\x03災\\x03灷\\x03炭\\x03煅\\x03熜\\x03爨\\x03爵\\x03牐\\x03犀\\x03\" +\n\t\"犕\\x03獺\\x03王\\x03㺬\\x03玥\\x03㺸\\x03瑇\\x03瑜\\x03瑱\\x03璅\\x03瓊\\x03㼛\\x03甤\\x03甾\\x03\" +\n\t\"異\\x03瘐\\x03㿼\\x03䀈\\x03直\\x03眞\\x03真\\x03睊\\x03䀹\\x03瞋\\x03䁆\\x03䂖\\x03硎\\x03碌\\x03\" +\n\t\"磌\\x03䃣\\x03祖\\x03福\\x03秫\\x03䄯\\x03穀\\x03穊\\x03穏\\x03䈂\\x03篆\\x03築\\x03䈧\\x03糒\\x03\" +\n\t\"䊠\\x03糨\\x03糣\\x03紀\\x03絣\\x03䌁\\x03緇\\x03縂\\x03繅\\x03䌴\\x03䍙\\x03罺\\x03羕\\x03翺\\x03\" +\n\t\"者\\x03聠\\x03聰\\x03䏕\\x03育\\x03脃\\x03䐋\\x03脾\\x03媵\\x03舄\\x03辞\\x03䑫\\x03芑\\x03芋\\x03\" +\n\t\"芝\\x03劳\\x03花\\x03芳\\x03芽\\x03苦\\x03若\\x03茝\\x03荣\\x03莭\\x03茣\\x03莽\\x03菧\\x03著\\x03\" +\n\t\"荓\\x03菊\\x03菌\\x03菜\\x03䔫\\x03蓱\\x03蓳\\x03蔖\\x03蕤\\x03䕝\\x03䕡\\x03䕫\\x03虐\\x03虜\\x03\" +\n\t\"虧\\x03虩\\x03蚩\\x03蚈\\x03蜎\\x03蛢\\x03蝹\\x03蜨\\x03蝫\\x03螆\\x03蟡\\x03蠁\\x03䗹\\x03衠\\x03\" +\n\t\"衣\\x03裗\\x03裞\\x03䘵\\x03裺\\x03㒻\\x03䚾\\x03䛇\\x03誠\\x03諭\\x03變\\x03豕\\x03貫\\x03賁\\x03\" +\n\t\"贛\\x03起\\x03跋\\x03趼\\x03跰\\x03軔\\x03輸\\x03邔\\x03郱\\x03鄑\\x03鄛\\x03鈸\\x03鋗\\x03鋘\\x03\" +\n\t\"鉼\\x03鏹\\x03鐕\\x03開\\x03䦕\\x03閷\\x03䧦\\x03雃\\x03嶲\\x03霣\\x03䩮\\x03䩶\\x03韠\\x03䪲\\x03\" +\n\t\"頋\\x03頩\\x03飢\\x03䬳\\x03餩\\x03馧\\x03駂\\x03駾\\x03䯎\\x03鬒\\x03鱀\\x03鳽\\x03䳎\\x03䳭\\x03\" +\n\t\"鵧\\x03䳸\\x03麻\\x03䵖\\x03黹\\x03黾\\x03鼅\\x03鼏\\x03鼖\\x03鼻\"\n\nvar xorData string = \"\" + // Size: 4855 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\\x03\\x1c\\x02\" +\n\t\"\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\\xc1r\\x02\" +\n\t\"\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\\x03\\xc1s*\" +\n\t\"\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\\x83\\xab\" +\n\t\"\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\\xe1\\xcd\" +\n\t\"\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\\x9a\\xec\" +\n\t\"\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c!\\x03\" +\n\t\"\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03ʦ\\x93\" +\n\t\"\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\\x03\" +\n\t\"\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\\xfa\" +\n\t\"\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\\x03\" +\n\t\"\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\\xe3\" +\n\t\"\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\\x03\" +\n\t\"\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\\xe8\" +\n\t\"\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\\x0b\" +\n\t\"\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\\x05\" +\n\t\"\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\\x0786\" +\n\t\"\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\\x03\" +\n\t\"\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\\x03\" +\n\t\"\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\\x03\" +\n\t\"\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\\x07\" +\n\t\"\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\\x07\" +\n\t\"\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\\x07\" +\n\t\"\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\\x0a\" +\n\t\"\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\\x07\" +\n\t\"\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\\x03\" +\n\t\"\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\\x04\" +\n\t\"4\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\\x04+ \" +\n\t\"\\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\\x22\" +\n\t\"\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\\x03\" +\n\t\"\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\\x03\" +\n\t\"\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\\x054\" +\n\t\"\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\\x05)\" +\n\t\":\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\\x1e\" +\n\t\"\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\\x03\" +\n\t\"\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\\x1b\" +\n\t\"\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\\x03\" +\n\t\"\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\\x06\" +\n\t\"\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\\x03\" +\n\t\"\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\\x0a6\" +\n\t\"\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\\x1f\" +\n\t\"\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\\x0a\" +\n\t\"\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\\x02\" +\n\t\"\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\\x03\" +\n\t\"\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\\x00\" +\n\t\"\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\\x10\" +\n\t\"\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#<\" +\n\t\"\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\\x00\" +\n\t\"\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\\x03\" +\n\t\"\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\\x22\" +\n\t\"\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\\x12\" +\n\t\"\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05<\" +\n\t\"\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\\x10\\x03\\x0b!0\" +\n\t\"\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\\x03\\x09\\x1f\" +\n\t\"\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\\x03\\x0a\\x01\" +\n\t\"\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\\x08='\\x03\" +\n\t\"\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\\x09\\x0c\" +\n\t\"\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06!3\\x03\" +\n\t\"\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\\x03\\x07\" +\n\t\"<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\\x01\\x00\" +\n\t\"\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\\x09\\x11\" +\n\t\"\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\\x0a/1\" +\n\t\"\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\\x07<3\" +\n\t\"\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\\x13\\x00\" +\n\t\"\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(;\\x03\" +\n\t\"\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\\x14$\" +\n\t\"\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\\x0a\" +\n\t\"\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\\x01\" +\n\t\"\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\\x03\" +\n\t\"\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\\x07\" +\n\t\"\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\\x0a\" +\n\t\"\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\\x0b\" +\n\t\"\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\\x08\" +\n\t\"\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\\x03\" +\n\t\"\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\\x03\" +\n\t\"\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\\x09\" +\n\t\"\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a.\" +\n\t\"\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x01\\x1e\\x03\\x0f$!\\x03\" +\n\t\"\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\\x18\\x03\\x0f\" +\n\t\"\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\\x03\\x0e\\x0d)\" +\n\t\"\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\\x03\\x0d. \\x03\" +\n\t\"\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\\x0d\\x0d\\x0f\\x03\" +\n\t\"\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\\x0c\\x09:\\x03\\x0e\" +\n\t\"\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\\x03\\x0c\\x1f\\x1c\" +\n\t\"\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\\x0b<+\\x03\\x0b8\" +\n\t\"\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\\x22&\\x03\\x0b\\x1a\" +\n\t\"\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\\x0a!\\x1a\\x03\\x0a!\" +\n\t\"7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\\x0a\\x00 \\x03\\x0a\" +\n\t\"\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\\x1b-\\x03\\x09-\" +\n\t\"\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\\x1f\\x03\\x093\" +\n\t\"\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\\x16\\x03\\x09\" +\n\t\"\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\\x03\\x09\\x1a\" +\n\t\"\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\\x08\\x02*\" +\n\t\"\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\\x070\\x0c\" +\n\t\"\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x0671\\x03\" +\n\t\"\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \\x1d\\x03\" +\n\t\"\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 29052 bytes (28.37 KiB). Checksum: ef06e7ecc26f36dd.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 125:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 125\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 127 blocks, 8128 entries, 16256 bytes\n// The third block is the zero block.\nvar idnaValues = [8128]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x001a, 0xe9: 0x0018,\n\t0xea: 0x0039, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x004a,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0069, 0xf3: 0x0079, 0xf4: 0x008a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x00aa, 0xf9: 0x00c9, 0xfa: 0x00d9, 0xfb: 0x0018,\n\t0xfc: 0x00e9, 0xfd: 0x0119, 0xfe: 0x0149, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0179, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0199,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0199, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x01b9, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x01d9,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x01e9, 0x1c5: 0x01e9,\n\t0x1c6: 0x01e9, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0209, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x0229, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x029a, 0x259: 0x02ba, 0x25a: 0x02da, 0x25b: 0x02fa, 0x25c: 0x031a, 0x25d: 0x033a,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0359, 0x262: 0x01d9, 0x263: 0x0369,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x008a, 0x2c5: 0x03d2,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429,\n\t0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,\n\t0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,\n\t0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,\n\t0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0808, 0x557: 0x0808,\n\t0x558: 0x0808, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,\n\t0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,\n\t0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,\n\t0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,\n\t0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040,\n\t0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040,\n\t0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308,\n\t0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008,\n\t0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308,\n\t0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308,\n\t0x598: 0x04c9, 0x599: 0x0501, 0x59a: 0x0539, 0x59b: 0x0571, 0x59c: 0x05a9, 0x59d: 0x05e1,\n\t0x59e: 0x0619, 0x59f: 0x0651, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308,\n\t0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008,\n\t0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,\n\t0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008,\n\t0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008,\n\t0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008,\n\t0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008,\n\t0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040,\n\t0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008,\n\t0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008,\n\t0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008,\n\t0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040,\n\t0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040,\n\t0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040,\n\t0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008,\n\t0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008,\n\t0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0689, 0x61d: 0x06c1,\n\t0x61e: 0x0040, 0x61f: 0x06f9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308,\n\t0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018,\n\t0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018,\n\t0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x0040, 0x63f: 0x0040,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008,\n\t0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040,\n\t0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040,\n\t0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008,\n\t0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008,\n\t0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008,\n\t0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0731, 0x674: 0x0040, 0x675: 0x0008,\n\t0x676: 0x0769, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040,\n\t0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040,\n\t0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308,\n\t0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308,\n\t0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040,\n\t0x698: 0x0040, 0x699: 0x07a1, 0x69a: 0x07d9, 0x69b: 0x0811, 0x69c: 0x0008, 0x69d: 0x0040,\n\t0x69e: 0x0849, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040,\n\t0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308,\n\t0x6b6: 0x0040, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008,\n\t0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008,\n\t0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008,\n\t0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008,\n\t0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008,\n\t0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008,\n\t0x6e4: 0x0008, 0x6e5: 0x0008, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0040,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008,\n\t0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308,\n\t0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008,\n\t0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040,\n\t0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040,\n\t0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040,\n\t0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308,\n\t0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040,\n\t0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308,\n\t0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008,\n\t0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008,\n\t0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008,\n\t0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008,\n\t0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008,\n\t0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008,\n\t0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040,\n\t0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040,\n\t0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008,\n\t0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040,\n\t0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x0040, 0x796: 0x3308, 0x797: 0x3008,\n\t0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x0881, 0x79d: 0x08b9,\n\t0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308,\n\t0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008,\n\t0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018,\n\t0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008,\n\t0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040,\n\t0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040,\n\t0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040,\n\t0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040,\n\t0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008,\n\t0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008,\n\t0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040,\n\t0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040,\n\t0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308,\n\t0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040,\n\t0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040,\n\t0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040,\n\t0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308,\n\t0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008,\n\t0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040,\n\t0x836: 0x0040, 0x837: 0x0040, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018,\n\t0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0040, 0x845: 0x0008,\n\t0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008,\n\t0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040,\n\t0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008,\n\t0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008,\n\t0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008,\n\t0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008,\n\t0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040,\n\t0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040,\n\t0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,\n\t0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040,\n\t0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040,\n\t0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040,\n\t0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,\n\t0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040,\n\t0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040,\n\t0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040,\n\t0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,\n\t0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008,\n\t0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018,\n\t0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,\n\t0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018,\n\t0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008,\n\t0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040,\n\t0x906: 0x0040, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0040, 0x90a: 0x0008, 0x90b: 0x0040,\n\t0x90c: 0x0040, 0x90d: 0x0008, 0x90e: 0x0040, 0x90f: 0x0040, 0x910: 0x0040, 0x911: 0x0040,\n\t0x912: 0x0040, 0x913: 0x0040, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008,\n\t0x918: 0x0040, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008,\n\t0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0040, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,\n\t0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0040, 0x929: 0x0040,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0040, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,\n\t0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x0929, 0x934: 0x3308, 0x935: 0x3308,\n\t0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x0040, 0x93b: 0x3308,\n\t0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x09d1, 0x944: 0x0008, 0x945: 0x0008,\n\t0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,\n\t0x94c: 0x0008, 0x94d: 0x0a09, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,\n\t0x952: 0x0a41, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0a79,\n\t0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0ab1, 0x95d: 0x0008,\n\t0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,\n\t0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0ae9,\n\t0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040,\n\t0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0b21, 0x974: 0x3308, 0x975: 0x0b59,\n\t0x976: 0x0b91, 0x977: 0x0bc9, 0x978: 0x0c19, 0x979: 0x0c51, 0x97a: 0x3308, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x3308, 0x981: 0x0ca1, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018,\n\t0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308,\n\t0x992: 0x3308, 0x993: 0x0cd9, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308,\n\t0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0d11,\n\t0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0d49, 0x9a3: 0x3308,\n\t0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0d81, 0x9a8: 0x3308, 0x9a9: 0x3308,\n\t0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0db9, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308,\n\t0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308,\n\t0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x0df1, 0x9ba: 0x3308, 0x9bb: 0x3308,\n\t0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008,\n\t0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,\n\t0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008,\n\t0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008,\n\t0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008,\n\t0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008,\n\t0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008,\n\t0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0039, 0x9ed: 0x0ed1, 0x9ee: 0x0ee9, 0x9ef: 0x0008,\n\t0x9f0: 0x0ef9, 0x9f1: 0x0f09, 0x9f2: 0x0f19, 0x9f3: 0x0f31, 0x9f4: 0x0249, 0x9f5: 0x0f41,\n\t0x9f6: 0x0259, 0x9f7: 0x0f51, 0x9f8: 0x0359, 0x9f9: 0x0f61, 0x9fa: 0x0f71, 0x9fb: 0x0008,\n\t0x9fc: 0x00d9, 0x9fd: 0x0f81, 0x9fe: 0x0f99, 0x9ff: 0x0269,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0fa9, 0xa01: 0x0fb9, 0xa02: 0x0279, 0xa03: 0x0039, 0xa04: 0x0fc9, 0xa05: 0x0fe1,\n\t0xa06: 0x059d, 0xa07: 0x0ee9, 0xa08: 0x0ef9, 0xa09: 0x0f09, 0xa0a: 0x0ff9, 0xa0b: 0x1011,\n\t0xa0c: 0x1029, 0xa0d: 0x0f31, 0xa0e: 0x0008, 0xa0f: 0x0f51, 0xa10: 0x0f61, 0xa11: 0x1041,\n\t0xa12: 0x00d9, 0xa13: 0x1059, 0xa14: 0x05b5, 0xa15: 0x05b5, 0xa16: 0x0f99, 0xa17: 0x0fa9,\n\t0xa18: 0x0fb9, 0xa19: 0x059d, 0xa1a: 0x1071, 0xa1b: 0x1089, 0xa1c: 0x05cd, 0xa1d: 0x1099,\n\t0xa1e: 0x10b1, 0xa1f: 0x10c9, 0xa20: 0x10e1, 0xa21: 0x10f9, 0xa22: 0x0f41, 0xa23: 0x0269,\n\t0xa24: 0x0fb9, 0xa25: 0x1089, 0xa26: 0x1099, 0xa27: 0x10b1, 0xa28: 0x1111, 0xa29: 0x10e1,\n\t0xa2a: 0x10f9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008,\n\t0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008,\n\t0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x1129, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008,\n\t0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008,\n\t0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008,\n\t0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008,\n\t0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008,\n\t0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x1141, 0xa5c: 0x1159, 0xa5d: 0x1169,\n\t0xa5e: 0x1181, 0xa5f: 0x1029, 0xa60: 0x1199, 0xa61: 0x11a9, 0xa62: 0x11c1, 0xa63: 0x11d9,\n\t0xa64: 0x11f1, 0xa65: 0x1209, 0xa66: 0x1221, 0xa67: 0x05e5, 0xa68: 0x1239, 0xa69: 0x1251,\n\t0xa6a: 0xe17d, 0xa6b: 0x1269, 0xa6c: 0x1281, 0xa6d: 0x1299, 0xa6e: 0x12b1, 0xa6f: 0x12c9,\n\t0xa70: 0x12e1, 0xa71: 0x12f9, 0xa72: 0x1311, 0xa73: 0x1329, 0xa74: 0x1341, 0xa75: 0x1359,\n\t0xa76: 0x1371, 0xa77: 0x1389, 0xa78: 0x05fd, 0xa79: 0x13a1, 0xa7a: 0x13b9, 0xa7b: 0x13d1,\n\t0xa7c: 0x13e1, 0xa7d: 0x13f9, 0xa7e: 0x1411, 0xa7f: 0x1429,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,\n\t0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,\n\t0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,\n\t0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008,\n\t0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008,\n\t0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,\n\t0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,\n\t0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,\n\t0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,\n\t0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,\n\t0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,\n\t0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,\n\t0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,\n\t0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,\n\t0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x0615, 0xadb: 0x0635, 0xadc: 0x0008, 0xadd: 0x0008,\n\t0xade: 0x1441, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,\n\t0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,\n\t0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,\n\t0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,\n\t0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,\n\t0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008,\n\t0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045,\n\t0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008,\n\t0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,\n\t0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045,\n\t0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008,\n\t0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045,\n\t0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045,\n\t0xb30: 0x0008, 0xb31: 0x1459, 0xb32: 0x0008, 0xb33: 0x1471, 0xb34: 0x0008, 0xb35: 0x1489,\n\t0xb36: 0x0008, 0xb37: 0x14a1, 0xb38: 0x0008, 0xb39: 0x14b9, 0xb3a: 0x0008, 0xb3b: 0x14d1,\n\t0xb3c: 0x0008, 0xb3d: 0x14e9, 0xb3e: 0x0040, 0xb3f: 0x0040,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x1501, 0xb41: 0x1531, 0xb42: 0x1561, 0xb43: 0x1591, 0xb44: 0x15c1, 0xb45: 0x15f1,\n\t0xb46: 0x1621, 0xb47: 0x1651, 0xb48: 0x1501, 0xb49: 0x1531, 0xb4a: 0x1561, 0xb4b: 0x1591,\n\t0xb4c: 0x15c1, 0xb4d: 0x15f1, 0xb4e: 0x1621, 0xb4f: 0x1651, 0xb50: 0x1681, 0xb51: 0x16b1,\n\t0xb52: 0x16e1, 0xb53: 0x1711, 0xb54: 0x1741, 0xb55: 0x1771, 0xb56: 0x17a1, 0xb57: 0x17d1,\n\t0xb58: 0x1681, 0xb59: 0x16b1, 0xb5a: 0x16e1, 0xb5b: 0x1711, 0xb5c: 0x1741, 0xb5d: 0x1771,\n\t0xb5e: 0x17a1, 0xb5f: 0x17d1, 0xb60: 0x1801, 0xb61: 0x1831, 0xb62: 0x1861, 0xb63: 0x1891,\n\t0xb64: 0x18c1, 0xb65: 0x18f1, 0xb66: 0x1921, 0xb67: 0x1951, 0xb68: 0x1801, 0xb69: 0x1831,\n\t0xb6a: 0x1861, 0xb6b: 0x1891, 0xb6c: 0x18c1, 0xb6d: 0x18f1, 0xb6e: 0x1921, 0xb6f: 0x1951,\n\t0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x1981, 0xb73: 0x19b1, 0xb74: 0x19d9, 0xb75: 0x0040,\n\t0xb76: 0x0008, 0xb77: 0x1a01, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x064d, 0xb7b: 0x1459,\n\t0xb7c: 0x19b1, 0xb7d: 0x0666, 0xb7e: 0x1a31, 0xb7f: 0x0686,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x06a6, 0xb81: 0x1a4a, 0xb82: 0x1a79, 0xb83: 0x1aa9, 0xb84: 0x1ad1, 0xb85: 0x0040,\n\t0xb86: 0x0008, 0xb87: 0x1af9, 0xb88: 0x06c5, 0xb89: 0x1471, 0xb8a: 0x06dd, 0xb8b: 0x1489,\n\t0xb8c: 0x1aa9, 0xb8d: 0x1b2a, 0xb8e: 0x1b5a, 0xb8f: 0x1b8a, 0xb90: 0x0008, 0xb91: 0x0008,\n\t0xb92: 0x0008, 0xb93: 0x1bb9, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008,\n\t0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x06f5, 0xb9b: 0x14a1, 0xb9c: 0x0040, 0xb9d: 0x1bd2,\n\t0xb9e: 0x1c02, 0xb9f: 0x1c32, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x1c61,\n\t0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045,\n\t0xbaa: 0x070d, 0xbab: 0x14d1, 0xbac: 0xe04d, 0xbad: 0x1c7a, 0xbae: 0x03d2, 0xbaf: 0x1caa,\n\t0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x1cb9, 0xbb3: 0x1ce9, 0xbb4: 0x1d11, 0xbb5: 0x0040,\n\t0xbb6: 0x0008, 0xbb7: 0x1d39, 0xbb8: 0x0725, 0xbb9: 0x14b9, 0xbba: 0x0515, 0xbbb: 0x14e9,\n\t0xbbc: 0x1ce9, 0xbbd: 0x073e, 0xbbe: 0x075e, 0xbbf: 0x0040,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a,\n\t0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0,\n\t0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d,\n\t0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x077e,\n\t0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,\n\t0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018,\n\t0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040,\n\t0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a,\n\t0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x1d69, 0xbf4: 0x1da1, 0xbf5: 0x0018,\n\t0xbf6: 0x1df1, 0xbf7: 0x1e29, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018,\n\t0xbfc: 0x1e7a, 0xbfd: 0x0018, 0xbfe: 0x079e, 0xbff: 0x0018,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018,\n\t0xc06: 0x0018, 0xc07: 0x1e92, 0xc08: 0x1eaa, 0xc09: 0x1ec2, 0xc0a: 0x0018, 0xc0b: 0x0018,\n\t0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018,\n\t0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x1ed9,\n\t0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,\n\t0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340,\n\t0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040,\n\t0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340,\n\t0xc30: 0x1f41, 0xc31: 0x0f41, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x1f51, 0xc35: 0x1f61,\n\t0xc36: 0x1f71, 0xc37: 0x1f81, 0xc38: 0x1f91, 0xc39: 0x1fa1, 0xc3a: 0x1fb2, 0xc3b: 0x07bd,\n\t0xc3c: 0x1fc2, 0xc3d: 0x1fd2, 0xc3e: 0x1fe2, 0xc3f: 0x0f71,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x1f41, 0xc41: 0x00c9, 0xc42: 0x0069, 0xc43: 0x0079, 0xc44: 0x1f51, 0xc45: 0x1f61,\n\t0xc46: 0x1f71, 0xc47: 0x1f81, 0xc48: 0x1f91, 0xc49: 0x1fa1, 0xc4a: 0x1fb2, 0xc4b: 0x07d5,\n\t0xc4c: 0x1fc2, 0xc4d: 0x1fd2, 0xc4e: 0x1fe2, 0xc4f: 0x0040, 0xc50: 0x0039, 0xc51: 0x0f09,\n\t0xc52: 0x00d9, 0xc53: 0x0369, 0xc54: 0x0ff9, 0xc55: 0x0249, 0xc56: 0x0f51, 0xc57: 0x0359,\n\t0xc58: 0x0f61, 0xc59: 0x0f71, 0xc5a: 0x0f99, 0xc5b: 0x01d9, 0xc5c: 0x0fa9, 0xc5d: 0x0040,\n\t0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018,\n\t0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x1ff1, 0xc69: 0x0018,\n\t0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018,\n\t0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018,\n\t0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018,\n\t0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x07ee, 0xc81: 0x080e, 0xc82: 0x1159, 0xc83: 0x082d, 0xc84: 0x0018, 0xc85: 0x084e,\n\t0xc86: 0x086e, 0xc87: 0x1011, 0xc88: 0x0018, 0xc89: 0x088d, 0xc8a: 0x0f31, 0xc8b: 0x0249,\n\t0xc8c: 0x0249, 0xc8d: 0x0249, 0xc8e: 0x0249, 0xc8f: 0x2009, 0xc90: 0x0f41, 0xc91: 0x0f41,\n\t0xc92: 0x0359, 0xc93: 0x0359, 0xc94: 0x0018, 0xc95: 0x0f71, 0xc96: 0x2021, 0xc97: 0x0018,\n\t0xc98: 0x0018, 0xc99: 0x0f99, 0xc9a: 0x2039, 0xc9b: 0x0269, 0xc9c: 0x0269, 0xc9d: 0x0269,\n\t0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x2049, 0xca1: 0x08ad, 0xca2: 0x2061, 0xca3: 0x0018,\n\t0xca4: 0x13d1, 0xca5: 0x0018, 0xca6: 0x2079, 0xca7: 0x0018, 0xca8: 0x13d1, 0xca9: 0x0018,\n\t0xcaa: 0x0f51, 0xcab: 0x2091, 0xcac: 0x0ee9, 0xcad: 0x1159, 0xcae: 0x0018, 0xcaf: 0x0f09,\n\t0xcb0: 0x0f09, 0xcb1: 0x1199, 0xcb2: 0x0040, 0xcb3: 0x0f61, 0xcb4: 0x00d9, 0xcb5: 0x20a9,\n\t0xcb6: 0x20c1, 0xcb7: 0x20d9, 0xcb8: 0x20f1, 0xcb9: 0x0f41, 0xcba: 0x0018, 0xcbb: 0x08cd,\n\t0xcbc: 0x2109, 0xcbd: 0x10b1, 0xcbe: 0x10b1, 0xcbf: 0x2109,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x08ed, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0ef9,\n\t0xcc6: 0x0ef9, 0xcc7: 0x0f09, 0xcc8: 0x0f41, 0xcc9: 0x0259, 0xcca: 0x0018, 0xccb: 0x0018,\n\t0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x2121, 0xcd1: 0x2151,\n\t0xcd2: 0x2181, 0xcd3: 0x21b9, 0xcd4: 0x21e9, 0xcd5: 0x2219, 0xcd6: 0x2249, 0xcd7: 0x2279,\n\t0xcd8: 0x22a9, 0xcd9: 0x22d9, 0xcda: 0x2309, 0xcdb: 0x2339, 0xcdc: 0x2369, 0xcdd: 0x2399,\n\t0xcde: 0x23c9, 0xcdf: 0x23f9, 0xce0: 0x0f41, 0xce1: 0x2421, 0xce2: 0x0905, 0xce3: 0x2439,\n\t0xce4: 0x1089, 0xce5: 0x2451, 0xce6: 0x0925, 0xce7: 0x2469, 0xce8: 0x2491, 0xce9: 0x0369,\n\t0xcea: 0x24a9, 0xceb: 0x0945, 0xcec: 0x0359, 0xced: 0x1159, 0xcee: 0x0ef9, 0xcef: 0x0f61,\n\t0xcf0: 0x0f41, 0xcf1: 0x2421, 0xcf2: 0x0965, 0xcf3: 0x2439, 0xcf4: 0x1089, 0xcf5: 0x2451,\n\t0xcf6: 0x0985, 0xcf7: 0x2469, 0xcf8: 0x2491, 0xcf9: 0x0369, 0xcfa: 0x24a9, 0xcfb: 0x09a5,\n\t0xcfc: 0x0359, 0xcfd: 0x1159, 0xcfe: 0x0ef9, 0xcff: 0x0f61,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018,\n\t0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040,\n\t0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,\n\t0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,\n\t0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040,\n\t0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x00c9, 0xd21: 0x0069, 0xd22: 0x0079, 0xd23: 0x1f51,\n\t0xd24: 0x1f61, 0xd25: 0x1f71, 0xd26: 0x1f81, 0xd27: 0x1f91, 0xd28: 0x1fa1, 0xd29: 0x2601,\n\t0xd2a: 0x2619, 0xd2b: 0x2631, 0xd2c: 0x2649, 0xd2d: 0x2661, 0xd2e: 0x2679, 0xd2f: 0x2691,\n\t0xd30: 0x26a9, 0xd31: 0x26c1, 0xd32: 0x26d9, 0xd33: 0x26f1, 0xd34: 0x0a06, 0xd35: 0x0a26,\n\t0xd36: 0x0a46, 0xd37: 0x0a66, 0xd38: 0x0a86, 0xd39: 0x0aa6, 0xd3a: 0x0ac6, 0xd3b: 0x0ae6,\n\t0xd3c: 0x0b06, 0xd3d: 0x270a, 0xd3e: 0x2732, 0xd3f: 0x275a,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x2782, 0xd41: 0x27aa, 0xd42: 0x27d2, 0xd43: 0x27fa, 0xd44: 0x2822, 0xd45: 0x284a,\n\t0xd46: 0x2872, 0xd47: 0x289a, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040,\n\t0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,\n\t0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,\n\t0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b26, 0xd5d: 0x0b46,\n\t0xd5e: 0x0b66, 0xd5f: 0x0b86, 0xd60: 0x0ba6, 0xd61: 0x0bc6, 0xd62: 0x0be6, 0xd63: 0x0c06,\n\t0xd64: 0x0c26, 0xd65: 0x0c46, 0xd66: 0x0c66, 0xd67: 0x0c86, 0xd68: 0x0ca6, 0xd69: 0x0cc6,\n\t0xd6a: 0x0ce6, 0xd6b: 0x0d06, 0xd6c: 0x0d26, 0xd6d: 0x0d46, 0xd6e: 0x0d66, 0xd6f: 0x0d86,\n\t0xd70: 0x0da6, 0xd71: 0x0dc6, 0xd72: 0x0de6, 0xd73: 0x0e06, 0xd74: 0x0e26, 0xd75: 0x0e46,\n\t0xd76: 0x0039, 0xd77: 0x0ee9, 0xd78: 0x1159, 0xd79: 0x0ef9, 0xd7a: 0x0f09, 0xd7b: 0x1199,\n\t0xd7c: 0x0f31, 0xd7d: 0x0249, 0xd7e: 0x0f41, 0xd7f: 0x0259,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0f51, 0xd81: 0x0359, 0xd82: 0x0f61, 0xd83: 0x0f71, 0xd84: 0x00d9, 0xd85: 0x0f99,\n\t0xd86: 0x2039, 0xd87: 0x0269, 0xd88: 0x01d9, 0xd89: 0x0fa9, 0xd8a: 0x0fb9, 0xd8b: 0x1089,\n\t0xd8c: 0x0279, 0xd8d: 0x0369, 0xd8e: 0x0289, 0xd8f: 0x13d1, 0xd90: 0x0039, 0xd91: 0x0ee9,\n\t0xd92: 0x1159, 0xd93: 0x0ef9, 0xd94: 0x0f09, 0xd95: 0x1199, 0xd96: 0x0f31, 0xd97: 0x0249,\n\t0xd98: 0x0f41, 0xd99: 0x0259, 0xd9a: 0x0f51, 0xd9b: 0x0359, 0xd9c: 0x0f61, 0xd9d: 0x0f71,\n\t0xd9e: 0x00d9, 0xd9f: 0x0f99, 0xda0: 0x2039, 0xda1: 0x0269, 0xda2: 0x01d9, 0xda3: 0x0fa9,\n\t0xda4: 0x0fb9, 0xda5: 0x1089, 0xda6: 0x0279, 0xda7: 0x0369, 0xda8: 0x0289, 0xda9: 0x13d1,\n\t0xdaa: 0x1f41, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018,\n\t0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018,\n\t0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018,\n\t0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008,\n\t0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008,\n\t0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008,\n\t0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008,\n\t0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008,\n\t0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x2971, 0xde3: 0x0ebd,\n\t0xde4: 0x2989, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d,\n\t0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0fe1, 0xdee: 0x1281, 0xdef: 0x0fc9,\n\t0xdf0: 0x1141, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d,\n\t0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008,\n\t0xdfc: 0x0259, 0xdfd: 0x1089, 0xdfe: 0x29a1, 0xdff: 0x29b9,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008,\n\t0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008,\n\t0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008,\n\t0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008,\n\t0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008,\n\t0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008,\n\t0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018,\n\t0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308,\n\t0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040,\n\t0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018,\n\t0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x26fd, 0xe41: 0x271d, 0xe42: 0x273d, 0xe43: 0x275d, 0xe44: 0x277d, 0xe45: 0x279d,\n\t0xe46: 0x27bd, 0xe47: 0x27dd, 0xe48: 0x27fd, 0xe49: 0x281d, 0xe4a: 0x283d, 0xe4b: 0x285d,\n\t0xe4c: 0x287d, 0xe4d: 0x289d, 0xe4e: 0x28bd, 0xe4f: 0x28dd, 0xe50: 0x28fd, 0xe51: 0x291d,\n\t0xe52: 0x293d, 0xe53: 0x295d, 0xe54: 0x297d, 0xe55: 0x299d, 0xe56: 0x0040, 0xe57: 0x0040,\n\t0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040,\n\t0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040,\n\t0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040,\n\t0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040,\n\t0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040,\n\t0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040,\n\t0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x29d1, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008,\n\t0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018,\n\t0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018,\n\t0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018,\n\t0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018,\n\t0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018,\n\t0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018,\n\t0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018,\n\t0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018,\n\t0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29bd, 0xeb9: 0x29dd, 0xeba: 0x29fd, 0xebb: 0x0018,\n\t0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2b3d, 0xec1: 0x2b5d, 0xec2: 0x2b7d, 0xec3: 0x2b9d, 0xec4: 0x2bbd, 0xec5: 0x2bdd,\n\t0xec6: 0x2bdd, 0xec7: 0x2bdd, 0xec8: 0x2bfd, 0xec9: 0x2bfd, 0xeca: 0x2bfd, 0xecb: 0x2bfd,\n\t0xecc: 0x2c1d, 0xecd: 0x2c1d, 0xece: 0x2c1d, 0xecf: 0x2c3d, 0xed0: 0x2c5d, 0xed1: 0x2c5d,\n\t0xed2: 0x2a7d, 0xed3: 0x2a7d, 0xed4: 0x2c5d, 0xed5: 0x2c5d, 0xed6: 0x2c7d, 0xed7: 0x2c7d,\n\t0xed8: 0x2c5d, 0xed9: 0x2c5d, 0xeda: 0x2a7d, 0xedb: 0x2a7d, 0xedc: 0x2c5d, 0xedd: 0x2c5d,\n\t0xede: 0x2c3d, 0xedf: 0x2c3d, 0xee0: 0x2c9d, 0xee1: 0x2c9d, 0xee2: 0x2cbd, 0xee3: 0x2cbd,\n\t0xee4: 0x0040, 0xee5: 0x2cdd, 0xee6: 0x2cfd, 0xee7: 0x2d1d, 0xee8: 0x2d1d, 0xee9: 0x2d3d,\n\t0xeea: 0x2d5d, 0xeeb: 0x2d7d, 0xeec: 0x2d9d, 0xeed: 0x2dbd, 0xeee: 0x2ddd, 0xeef: 0x2dfd,\n\t0xef0: 0x2e1d, 0xef1: 0x2e3d, 0xef2: 0x2e3d, 0xef3: 0x2e5d, 0xef4: 0x2e7d, 0xef5: 0x2e7d,\n\t0xef6: 0x2e9d, 0xef7: 0x2ebd, 0xef8: 0x2e5d, 0xef9: 0x2edd, 0xefa: 0x2efd, 0xefb: 0x2edd,\n\t0xefc: 0x2e5d, 0xefd: 0x2f1d, 0xefe: 0x2f3d, 0xeff: 0x2f5d,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x2f7d, 0xf01: 0x2f9d, 0xf02: 0x2cfd, 0xf03: 0x2cdd, 0xf04: 0x2fbd, 0xf05: 0x2fdd,\n\t0xf06: 0x2ffd, 0xf07: 0x301d, 0xf08: 0x303d, 0xf09: 0x305d, 0xf0a: 0x307d, 0xf0b: 0x309d,\n\t0xf0c: 0x30bd, 0xf0d: 0x30dd, 0xf0e: 0x30fd, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018,\n\t0xf12: 0x311d, 0xf13: 0x313d, 0xf14: 0x315d, 0xf15: 0x317d, 0xf16: 0x319d, 0xf17: 0x31bd,\n\t0xf18: 0x31dd, 0xf19: 0x31fd, 0xf1a: 0x321d, 0xf1b: 0x323d, 0xf1c: 0x315d, 0xf1d: 0x325d,\n\t0xf1e: 0x327d, 0xf1f: 0x329d, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008,\n\t0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008,\n\t0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008,\n\t0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008,\n\t0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0040,\n\t0xf3c: 0x0040, 0xf3d: 0x0040, 0xf3e: 0x0040, 0xf3f: 0x0040,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x36a2, 0xf41: 0x36d2, 0xf42: 0x3702, 0xf43: 0x3732, 0xf44: 0x32bd, 0xf45: 0x32dd,\n\t0xf46: 0x32fd, 0xf47: 0x331d, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018,\n\t0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x333d, 0xf51: 0x3761,\n\t0xf52: 0x3779, 0xf53: 0x3791, 0xf54: 0x37a9, 0xf55: 0x37c1, 0xf56: 0x37d9, 0xf57: 0x37f1,\n\t0xf58: 0x3809, 0xf59: 0x3821, 0xf5a: 0x3839, 0xf5b: 0x3851, 0xf5c: 0x3869, 0xf5d: 0x3881,\n\t0xf5e: 0x3899, 0xf5f: 0x38b1, 0xf60: 0x335d, 0xf61: 0x337d, 0xf62: 0x339d, 0xf63: 0x33bd,\n\t0xf64: 0x33dd, 0xf65: 0x33dd, 0xf66: 0x33fd, 0xf67: 0x341d, 0xf68: 0x343d, 0xf69: 0x345d,\n\t0xf6a: 0x347d, 0xf6b: 0x349d, 0xf6c: 0x34bd, 0xf6d: 0x34dd, 0xf6e: 0x34fd, 0xf6f: 0x351d,\n\t0xf70: 0x353d, 0xf71: 0x355d, 0xf72: 0x357d, 0xf73: 0x359d, 0xf74: 0x35bd, 0xf75: 0x35dd,\n\t0xf76: 0x35fd, 0xf77: 0x361d, 0xf78: 0x363d, 0xf79: 0x365d, 0xf7a: 0x367d, 0xf7b: 0x369d,\n\t0xf7c: 0x38c9, 0xf7d: 0x3901, 0xf7e: 0x36bd, 0xf7f: 0x0018,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x36dd, 0xf81: 0x36fd, 0xf82: 0x371d, 0xf83: 0x373d, 0xf84: 0x375d, 0xf85: 0x377d,\n\t0xf86: 0x379d, 0xf87: 0x37bd, 0xf88: 0x37dd, 0xf89: 0x37fd, 0xf8a: 0x381d, 0xf8b: 0x383d,\n\t0xf8c: 0x385d, 0xf8d: 0x387d, 0xf8e: 0x389d, 0xf8f: 0x38bd, 0xf90: 0x38dd, 0xf91: 0x38fd,\n\t0xf92: 0x391d, 0xf93: 0x393d, 0xf94: 0x395d, 0xf95: 0x397d, 0xf96: 0x399d, 0xf97: 0x39bd,\n\t0xf98: 0x39dd, 0xf99: 0x39fd, 0xf9a: 0x3a1d, 0xf9b: 0x3a3d, 0xf9c: 0x3a5d, 0xf9d: 0x3a7d,\n\t0xf9e: 0x3a9d, 0xf9f: 0x3abd, 0xfa0: 0x3add, 0xfa1: 0x3afd, 0xfa2: 0x3b1d, 0xfa3: 0x3b3d,\n\t0xfa4: 0x3b5d, 0xfa5: 0x3b7d, 0xfa6: 0x127d, 0xfa7: 0x3b9d, 0xfa8: 0x3bbd, 0xfa9: 0x3bdd,\n\t0xfaa: 0x3bfd, 0xfab: 0x3c1d, 0xfac: 0x3c3d, 0xfad: 0x3c5d, 0xfae: 0x239d, 0xfaf: 0x3c7d,\n\t0xfb0: 0x3c9d, 0xfb1: 0x3939, 0xfb2: 0x3951, 0xfb3: 0x3969, 0xfb4: 0x3981, 0xfb5: 0x3999,\n\t0xfb6: 0x39b1, 0xfb7: 0x39c9, 0xfb8: 0x39e1, 0xfb9: 0x39f9, 0xfba: 0x3a11, 0xfbb: 0x3a29,\n\t0xfbc: 0x3a41, 0xfbd: 0x3a59, 0xfbe: 0x3a71, 0xfbf: 0x3a89,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x3aa1, 0xfc1: 0x3ac9, 0xfc2: 0x3af1, 0xfc3: 0x3b19, 0xfc4: 0x3b41, 0xfc5: 0x3b69,\n\t0xfc6: 0x3b91, 0xfc7: 0x3bb9, 0xfc8: 0x3be1, 0xfc9: 0x3c09, 0xfca: 0x3c39, 0xfcb: 0x3c69,\n\t0xfcc: 0x3c99, 0xfcd: 0x3cbd, 0xfce: 0x3cb1, 0xfcf: 0x3cdd, 0xfd0: 0x3cfd, 0xfd1: 0x3d15,\n\t0xfd2: 0x3d2d, 0xfd3: 0x3d45, 0xfd4: 0x3d5d, 0xfd5: 0x3d5d, 0xfd6: 0x3d45, 0xfd7: 0x3d75,\n\t0xfd8: 0x07bd, 0xfd9: 0x3d8d, 0xfda: 0x3da5, 0xfdb: 0x3dbd, 0xfdc: 0x3dd5, 0xfdd: 0x3ded,\n\t0xfde: 0x3e05, 0xfdf: 0x3e1d, 0xfe0: 0x3e35, 0xfe1: 0x3e4d, 0xfe2: 0x3e65, 0xfe3: 0x3e7d,\n\t0xfe4: 0x3e95, 0xfe5: 0x3e95, 0xfe6: 0x3ead, 0xfe7: 0x3ead, 0xfe8: 0x3ec5, 0xfe9: 0x3ec5,\n\t0xfea: 0x3edd, 0xfeb: 0x3ef5, 0xfec: 0x3f0d, 0xfed: 0x3f25, 0xfee: 0x3f3d, 0xfef: 0x3f3d,\n\t0xff0: 0x3f55, 0xff1: 0x3f55, 0xff2: 0x3f55, 0xff3: 0x3f6d, 0xff4: 0x3f85, 0xff5: 0x3f9d,\n\t0xff6: 0x3fb5, 0xff7: 0x3f9d, 0xff8: 0x3fcd, 0xff9: 0x3fe5, 0xffa: 0x3f6d, 0xffb: 0x3ffd,\n\t0xffc: 0x4015, 0xffd: 0x4015, 0xffe: 0x4015, 0xfff: 0x0040,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x3cc9, 0x1001: 0x3d31, 0x1002: 0x3d99, 0x1003: 0x3e01, 0x1004: 0x3e51, 0x1005: 0x3eb9,\n\t0x1006: 0x3f09, 0x1007: 0x3f59, 0x1008: 0x3fd9, 0x1009: 0x4041, 0x100a: 0x4091, 0x100b: 0x40e1,\n\t0x100c: 0x4131, 0x100d: 0x4199, 0x100e: 0x4201, 0x100f: 0x4251, 0x1010: 0x42a1, 0x1011: 0x42d9,\n\t0x1012: 0x4329, 0x1013: 0x4391, 0x1014: 0x43f9, 0x1015: 0x4431, 0x1016: 0x44b1, 0x1017: 0x4549,\n\t0x1018: 0x45c9, 0x1019: 0x4619, 0x101a: 0x4699, 0x101b: 0x4719, 0x101c: 0x4781, 0x101d: 0x47d1,\n\t0x101e: 0x4821, 0x101f: 0x4871, 0x1020: 0x48d9, 0x1021: 0x4959, 0x1022: 0x49c1, 0x1023: 0x4a11,\n\t0x1024: 0x4a61, 0x1025: 0x4ab1, 0x1026: 0x4ae9, 0x1027: 0x4b21, 0x1028: 0x4b59, 0x1029: 0x4b91,\n\t0x102a: 0x4be1, 0x102b: 0x4c31, 0x102c: 0x4cb1, 0x102d: 0x4d01, 0x102e: 0x4d69, 0x102f: 0x4de9,\n\t0x1030: 0x4e39, 0x1031: 0x4e71, 0x1032: 0x4ea9, 0x1033: 0x4f29, 0x1034: 0x4f91, 0x1035: 0x5011,\n\t0x1036: 0x5061, 0x1037: 0x50e1, 0x1038: 0x5119, 0x1039: 0x5169, 0x103a: 0x51b9, 0x103b: 0x5209,\n\t0x103c: 0x5259, 0x103d: 0x52a9, 0x103e: 0x5311, 0x103f: 0x5361,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x5399, 0x1041: 0x53e9, 0x1042: 0x5439, 0x1043: 0x5489, 0x1044: 0x54f1, 0x1045: 0x5541,\n\t0x1046: 0x5591, 0x1047: 0x55e1, 0x1048: 0x5661, 0x1049: 0x56c9, 0x104a: 0x5701, 0x104b: 0x5781,\n\t0x104c: 0x57b9, 0x104d: 0x5821, 0x104e: 0x5889, 0x104f: 0x58d9, 0x1050: 0x5929, 0x1051: 0x5979,\n\t0x1052: 0x59e1, 0x1053: 0x5a19, 0x1054: 0x5a69, 0x1055: 0x5ad1, 0x1056: 0x5b09, 0x1057: 0x5b89,\n\t0x1058: 0x5bd9, 0x1059: 0x5c01, 0x105a: 0x5c29, 0x105b: 0x5c51, 0x105c: 0x5c79, 0x105d: 0x5ca1,\n\t0x105e: 0x5cc9, 0x105f: 0x5cf1, 0x1060: 0x5d19, 0x1061: 0x5d41, 0x1062: 0x5d69, 0x1063: 0x5d99,\n\t0x1064: 0x5dc9, 0x1065: 0x5df9, 0x1066: 0x5e29, 0x1067: 0x5e59, 0x1068: 0x5e89, 0x1069: 0x5eb9,\n\t0x106a: 0x5ee9, 0x106b: 0x5f19, 0x106c: 0x5f49, 0x106d: 0x5f79, 0x106e: 0x5fa9, 0x106f: 0x5fd9,\n\t0x1070: 0x6009, 0x1071: 0x402d, 0x1072: 0x6039, 0x1073: 0x6051, 0x1074: 0x404d, 0x1075: 0x6069,\n\t0x1076: 0x6081, 0x1077: 0x6099, 0x1078: 0x406d, 0x1079: 0x406d, 0x107a: 0x60b1, 0x107b: 0x60c9,\n\t0x107c: 0x6101, 0x107d: 0x6139, 0x107e: 0x6171, 0x107f: 0x61a9,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x6211, 0x1081: 0x6229, 0x1082: 0x408d, 0x1083: 0x6241, 0x1084: 0x6259, 0x1085: 0x6271,\n\t0x1086: 0x6289, 0x1087: 0x62a1, 0x1088: 0x40ad, 0x1089: 0x62b9, 0x108a: 0x62e1, 0x108b: 0x62f9,\n\t0x108c: 0x40cd, 0x108d: 0x40cd, 0x108e: 0x6311, 0x108f: 0x6329, 0x1090: 0x6341, 0x1091: 0x40ed,\n\t0x1092: 0x410d, 0x1093: 0x412d, 0x1094: 0x414d, 0x1095: 0x416d, 0x1096: 0x6359, 0x1097: 0x6371,\n\t0x1098: 0x6389, 0x1099: 0x63a1, 0x109a: 0x63b9, 0x109b: 0x418d, 0x109c: 0x63d1, 0x109d: 0x63e9,\n\t0x109e: 0x6401, 0x109f: 0x41ad, 0x10a0: 0x41cd, 0x10a1: 0x6419, 0x10a2: 0x41ed, 0x10a3: 0x420d,\n\t0x10a4: 0x422d, 0x10a5: 0x6431, 0x10a6: 0x424d, 0x10a7: 0x6449, 0x10a8: 0x6479, 0x10a9: 0x6211,\n\t0x10aa: 0x426d, 0x10ab: 0x428d, 0x10ac: 0x42ad, 0x10ad: 0x42cd, 0x10ae: 0x64b1, 0x10af: 0x64f1,\n\t0x10b0: 0x6539, 0x10b1: 0x6551, 0x10b2: 0x42ed, 0x10b3: 0x6569, 0x10b4: 0x6581, 0x10b5: 0x6599,\n\t0x10b6: 0x430d, 0x10b7: 0x65b1, 0x10b8: 0x65c9, 0x10b9: 0x65b1, 0x10ba: 0x65e1, 0x10bb: 0x65f9,\n\t0x10bc: 0x432d, 0x10bd: 0x6611, 0x10be: 0x6629, 0x10bf: 0x6611,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x434d, 0x10c1: 0x436d, 0x10c2: 0x0040, 0x10c3: 0x6641, 0x10c4: 0x6659, 0x10c5: 0x6671,\n\t0x10c6: 0x6689, 0x10c7: 0x0040, 0x10c8: 0x66c1, 0x10c9: 0x66d9, 0x10ca: 0x66f1, 0x10cb: 0x6709,\n\t0x10cc: 0x6721, 0x10cd: 0x6739, 0x10ce: 0x6401, 0x10cf: 0x6751, 0x10d0: 0x6769, 0x10d1: 0x6781,\n\t0x10d2: 0x438d, 0x10d3: 0x6799, 0x10d4: 0x6289, 0x10d5: 0x43ad, 0x10d6: 0x43cd, 0x10d7: 0x67b1,\n\t0x10d8: 0x0040, 0x10d9: 0x43ed, 0x10da: 0x67c9, 0x10db: 0x67e1, 0x10dc: 0x67f9, 0x10dd: 0x6811,\n\t0x10de: 0x6829, 0x10df: 0x6859, 0x10e0: 0x6889, 0x10e1: 0x68b1, 0x10e2: 0x68d9, 0x10e3: 0x6901,\n\t0x10e4: 0x6929, 0x10e5: 0x6951, 0x10e6: 0x6979, 0x10e7: 0x69a1, 0x10e8: 0x69c9, 0x10e9: 0x69f1,\n\t0x10ea: 0x6a21, 0x10eb: 0x6a51, 0x10ec: 0x6a81, 0x10ed: 0x6ab1, 0x10ee: 0x6ae1, 0x10ef: 0x6b11,\n\t0x10f0: 0x6b41, 0x10f1: 0x6b71, 0x10f2: 0x6ba1, 0x10f3: 0x6bd1, 0x10f4: 0x6c01, 0x10f5: 0x6c31,\n\t0x10f6: 0x6c61, 0x10f7: 0x6c91, 0x10f8: 0x6cc1, 0x10f9: 0x6cf1, 0x10fa: 0x6d21, 0x10fb: 0x6d51,\n\t0x10fc: 0x6d81, 0x10fd: 0x6db1, 0x10fe: 0x6de1, 0x10ff: 0x440d,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,\n\t0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,\n\t0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,\n\t0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,\n\t0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0xe00d, 0x111d: 0x0008,\n\t0x111e: 0xe00d, 0x111f: 0x0008, 0x1120: 0xe00d, 0x1121: 0x0008, 0x1122: 0xe00d, 0x1123: 0x0008,\n\t0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008,\n\t0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x3308,\n\t0x1130: 0x3318, 0x1131: 0x3318, 0x1132: 0x3318, 0x1133: 0x0018, 0x1134: 0x3308, 0x1135: 0x3308,\n\t0x1136: 0x3308, 0x1137: 0x3308, 0x1138: 0x3308, 0x1139: 0x3308, 0x113a: 0x3308, 0x113b: 0x3308,\n\t0x113c: 0x3308, 0x113d: 0x3308, 0x113e: 0x0018, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008,\n\t0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008,\n\t0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008,\n\t0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008,\n\t0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0x0ea1, 0x115d: 0x6e11,\n\t0x115e: 0x3308, 0x115f: 0x3308, 0x1160: 0x0008, 0x1161: 0x0008, 0x1162: 0x0008, 0x1163: 0x0008,\n\t0x1164: 0x0008, 0x1165: 0x0008, 0x1166: 0x0008, 0x1167: 0x0008, 0x1168: 0x0008, 0x1169: 0x0008,\n\t0x116a: 0x0008, 0x116b: 0x0008, 0x116c: 0x0008, 0x116d: 0x0008, 0x116e: 0x0008, 0x116f: 0x0008,\n\t0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008,\n\t0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0x0008, 0x117a: 0x0008, 0x117b: 0x0008,\n\t0x117c: 0x0008, 0x117d: 0x0008, 0x117e: 0x0008, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0x0018, 0x1181: 0x0018, 0x1182: 0x0018, 0x1183: 0x0018, 0x1184: 0x0018, 0x1185: 0x0018,\n\t0x1186: 0x0018, 0x1187: 0x0018, 0x1188: 0x0018, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0x0018,\n\t0x118c: 0x0018, 0x118d: 0x0018, 0x118e: 0x0018, 0x118f: 0x0018, 0x1190: 0x0018, 0x1191: 0x0018,\n\t0x1192: 0x0018, 0x1193: 0x0018, 0x1194: 0x0018, 0x1195: 0x0018, 0x1196: 0x0018, 0x1197: 0x0008,\n\t0x1198: 0x0008, 0x1199: 0x0008, 0x119a: 0x0008, 0x119b: 0x0008, 0x119c: 0x0008, 0x119d: 0x0008,\n\t0x119e: 0x0008, 0x119f: 0x0008, 0x11a0: 0x0018, 0x11a1: 0x0018, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,\n\t0x11b0: 0x0008, 0x11b1: 0x0008, 0x11b2: 0xe00d, 0x11b3: 0x0008, 0x11b4: 0xe00d, 0x11b5: 0x0008,\n\t0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008,\n\t0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,\n\t0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0xe00d, 0x11c9: 0x0008, 0x11ca: 0xe00d, 0x11cb: 0x0008,\n\t0x11cc: 0xe00d, 0x11cd: 0x0008, 0x11ce: 0xe00d, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,\n\t0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0xe00d, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,\n\t0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,\n\t0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,\n\t0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,\n\t0x11ea: 0xe00d, 0x11eb: 0x0008, 0x11ec: 0xe00d, 0x11ed: 0x0008, 0x11ee: 0xe00d, 0x11ef: 0x0008,\n\t0x11f0: 0xe0fd, 0x11f1: 0x0008, 0x11f2: 0x0008, 0x11f3: 0x0008, 0x11f4: 0x0008, 0x11f5: 0x0008,\n\t0x11f6: 0x0008, 0x11f7: 0x0008, 0x11f8: 0x0008, 0x11f9: 0xe01d, 0x11fa: 0x0008, 0x11fb: 0xe03d,\n\t0x11fc: 0x0008, 0x11fd: 0x442d, 0x11fe: 0xe00d, 0x11ff: 0x0008,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0xe00d, 0x1205: 0x0008,\n\t0x1206: 0xe00d, 0x1207: 0x0008, 0x1208: 0x0008, 0x1209: 0x0018, 0x120a: 0x0018, 0x120b: 0xe03d,\n\t0x120c: 0x0008, 0x120d: 0x11d9, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0xe00d, 0x1211: 0x0008,\n\t0x1212: 0xe00d, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008,\n\t0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0xe00d, 0x121b: 0x0008, 0x121c: 0xe00d, 0x121d: 0x0008,\n\t0x121e: 0xe00d, 0x121f: 0x0008, 0x1220: 0xe00d, 0x1221: 0x0008, 0x1222: 0xe00d, 0x1223: 0x0008,\n\t0x1224: 0xe00d, 0x1225: 0x0008, 0x1226: 0xe00d, 0x1227: 0x0008, 0x1228: 0xe00d, 0x1229: 0x0008,\n\t0x122a: 0x6e29, 0x122b: 0x1029, 0x122c: 0x11c1, 0x122d: 0x6e41, 0x122e: 0x1221, 0x122f: 0x0040,\n\t0x1230: 0x6e59, 0x1231: 0x6e71, 0x1232: 0x1239, 0x1233: 0x444d, 0x1234: 0xe00d, 0x1235: 0x0008,\n\t0x1236: 0xe00d, 0x1237: 0x0008, 0x1238: 0x0040, 0x1239: 0x0040, 0x123a: 0x0040, 0x123b: 0x0040,\n\t0x123c: 0x0040, 0x123d: 0x0040, 0x123e: 0x0040, 0x123f: 0x0040,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x64d5, 0x1241: 0x64f5, 0x1242: 0x6515, 0x1243: 0x6535, 0x1244: 0x6555, 0x1245: 0x6575,\n\t0x1246: 0x6595, 0x1247: 0x65b5, 0x1248: 0x65d5, 0x1249: 0x65f5, 0x124a: 0x6615, 0x124b: 0x6635,\n\t0x124c: 0x6655, 0x124d: 0x6675, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x6695, 0x1251: 0x0008,\n\t0x1252: 0x66b5, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x66d5, 0x1256: 0x66f5, 0x1257: 0x6715,\n\t0x1258: 0x6735, 0x1259: 0x6755, 0x125a: 0x6775, 0x125b: 0x6795, 0x125c: 0x67b5, 0x125d: 0x67d5,\n\t0x125e: 0x67f5, 0x125f: 0x0008, 0x1260: 0x6815, 0x1261: 0x0008, 0x1262: 0x6835, 0x1263: 0x0008,\n\t0x1264: 0x0008, 0x1265: 0x6855, 0x1266: 0x6875, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008,\n\t0x126a: 0x6895, 0x126b: 0x68b5, 0x126c: 0x68d5, 0x126d: 0x68f5, 0x126e: 0x6915, 0x126f: 0x6935,\n\t0x1270: 0x6955, 0x1271: 0x6975, 0x1272: 0x6995, 0x1273: 0x69b5, 0x1274: 0x69d5, 0x1275: 0x69f5,\n\t0x1276: 0x6a15, 0x1277: 0x6a35, 0x1278: 0x6a55, 0x1279: 0x6a75, 0x127a: 0x6a95, 0x127b: 0x6ab5,\n\t0x127c: 0x6ad5, 0x127d: 0x6af5, 0x127e: 0x6b15, 0x127f: 0x6b35,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x7a95, 0x1281: 0x7ab5, 0x1282: 0x7ad5, 0x1283: 0x7af5, 0x1284: 0x7b15, 0x1285: 0x7b35,\n\t0x1286: 0x7b55, 0x1287: 0x7b75, 0x1288: 0x7b95, 0x1289: 0x7bb5, 0x128a: 0x7bd5, 0x128b: 0x7bf5,\n\t0x128c: 0x7c15, 0x128d: 0x7c35, 0x128e: 0x7c55, 0x128f: 0x6ec9, 0x1290: 0x6ef1, 0x1291: 0x6f19,\n\t0x1292: 0x7c75, 0x1293: 0x7c95, 0x1294: 0x7cb5, 0x1295: 0x6f41, 0x1296: 0x6f69, 0x1297: 0x6f91,\n\t0x1298: 0x7cd5, 0x1299: 0x7cf5, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040,\n\t0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040,\n\t0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040,\n\t0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040,\n\t0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040,\n\t0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040,\n\t0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x6fb9, 0x12c1: 0x6fd1, 0x12c2: 0x6fe9, 0x12c3: 0x7d15, 0x12c4: 0x7d35, 0x12c5: 0x7001,\n\t0x12c6: 0x7001, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040,\n\t0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040,\n\t0x12d2: 0x0040, 0x12d3: 0x7019, 0x12d4: 0x7041, 0x12d5: 0x7069, 0x12d6: 0x7091, 0x12d7: 0x70b9,\n\t0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x70e1,\n\t0x12de: 0x3308, 0x12df: 0x7109, 0x12e0: 0x7131, 0x12e1: 0x20a9, 0x12e2: 0x20f1, 0x12e3: 0x7149,\n\t0x12e4: 0x7161, 0x12e5: 0x7179, 0x12e6: 0x7191, 0x12e7: 0x71a9, 0x12e8: 0x71c1, 0x12e9: 0x1fb2,\n\t0x12ea: 0x71d9, 0x12eb: 0x7201, 0x12ec: 0x7229, 0x12ed: 0x7261, 0x12ee: 0x7299, 0x12ef: 0x72c1,\n\t0x12f0: 0x72e9, 0x12f1: 0x7311, 0x12f2: 0x7339, 0x12f3: 0x7361, 0x12f4: 0x7389, 0x12f5: 0x73b1,\n\t0x12f6: 0x73d9, 0x12f7: 0x0040, 0x12f8: 0x7401, 0x12f9: 0x7429, 0x12fa: 0x7451, 0x12fb: 0x7479,\n\t0x12fc: 0x74a1, 0x12fd: 0x0040, 0x12fe: 0x74c9, 0x12ff: 0x0040,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x74f1, 0x1301: 0x7519, 0x1302: 0x0040, 0x1303: 0x7541, 0x1304: 0x7569, 0x1305: 0x0040,\n\t0x1306: 0x7591, 0x1307: 0x75b9, 0x1308: 0x75e1, 0x1309: 0x7609, 0x130a: 0x7631, 0x130b: 0x7659,\n\t0x130c: 0x7681, 0x130d: 0x76a9, 0x130e: 0x76d1, 0x130f: 0x76f9, 0x1310: 0x7721, 0x1311: 0x7721,\n\t0x1312: 0x7739, 0x1313: 0x7739, 0x1314: 0x7739, 0x1315: 0x7739, 0x1316: 0x7751, 0x1317: 0x7751,\n\t0x1318: 0x7751, 0x1319: 0x7751, 0x131a: 0x7769, 0x131b: 0x7769, 0x131c: 0x7769, 0x131d: 0x7769,\n\t0x131e: 0x7781, 0x131f: 0x7781, 0x1320: 0x7781, 0x1321: 0x7781, 0x1322: 0x7799, 0x1323: 0x7799,\n\t0x1324: 0x7799, 0x1325: 0x7799, 0x1326: 0x77b1, 0x1327: 0x77b1, 0x1328: 0x77b1, 0x1329: 0x77b1,\n\t0x132a: 0x77c9, 0x132b: 0x77c9, 0x132c: 0x77c9, 0x132d: 0x77c9, 0x132e: 0x77e1, 0x132f: 0x77e1,\n\t0x1330: 0x77e1, 0x1331: 0x77e1, 0x1332: 0x77f9, 0x1333: 0x77f9, 0x1334: 0x77f9, 0x1335: 0x77f9,\n\t0x1336: 0x7811, 0x1337: 0x7811, 0x1338: 0x7811, 0x1339: 0x7811, 0x133a: 0x7829, 0x133b: 0x7829,\n\t0x133c: 0x7829, 0x133d: 0x7829, 0x133e: 0x7841, 0x133f: 0x7841,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x7841, 0x1341: 0x7841, 0x1342: 0x7859, 0x1343: 0x7859, 0x1344: 0x7871, 0x1345: 0x7871,\n\t0x1346: 0x7889, 0x1347: 0x7889, 0x1348: 0x78a1, 0x1349: 0x78a1, 0x134a: 0x78b9, 0x134b: 0x78b9,\n\t0x134c: 0x78d1, 0x134d: 0x78d1, 0x134e: 0x78e9, 0x134f: 0x78e9, 0x1350: 0x78e9, 0x1351: 0x78e9,\n\t0x1352: 0x7901, 0x1353: 0x7901, 0x1354: 0x7901, 0x1355: 0x7901, 0x1356: 0x7919, 0x1357: 0x7919,\n\t0x1358: 0x7919, 0x1359: 0x7919, 0x135a: 0x7931, 0x135b: 0x7931, 0x135c: 0x7931, 0x135d: 0x7931,\n\t0x135e: 0x7949, 0x135f: 0x7949, 0x1360: 0x7961, 0x1361: 0x7961, 0x1362: 0x7961, 0x1363: 0x7961,\n\t0x1364: 0x7979, 0x1365: 0x7979, 0x1366: 0x7991, 0x1367: 0x7991, 0x1368: 0x7991, 0x1369: 0x7991,\n\t0x136a: 0x79a9, 0x136b: 0x79a9, 0x136c: 0x79a9, 0x136d: 0x79a9, 0x136e: 0x79c1, 0x136f: 0x79c1,\n\t0x1370: 0x79d9, 0x1371: 0x79d9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818,\n\t0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818,\n\t0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0040, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040,\n\t0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040,\n\t0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040,\n\t0x1392: 0x0040, 0x1393: 0x79f1, 0x1394: 0x79f1, 0x1395: 0x79f1, 0x1396: 0x79f1, 0x1397: 0x7a09,\n\t0x1398: 0x7a09, 0x1399: 0x7a21, 0x139a: 0x7a21, 0x139b: 0x7a39, 0x139c: 0x7a39, 0x139d: 0x0479,\n\t0x139e: 0x7a51, 0x139f: 0x7a51, 0x13a0: 0x7a69, 0x13a1: 0x7a69, 0x13a2: 0x7a81, 0x13a3: 0x7a81,\n\t0x13a4: 0x7a99, 0x13a5: 0x7a99, 0x13a6: 0x7a99, 0x13a7: 0x7a99, 0x13a8: 0x7ab1, 0x13a9: 0x7ab1,\n\t0x13aa: 0x7ac9, 0x13ab: 0x7ac9, 0x13ac: 0x7af1, 0x13ad: 0x7af1, 0x13ae: 0x7b19, 0x13af: 0x7b19,\n\t0x13b0: 0x7b41, 0x13b1: 0x7b41, 0x13b2: 0x7b69, 0x13b3: 0x7b69, 0x13b4: 0x7b91, 0x13b5: 0x7b91,\n\t0x13b6: 0x7bb9, 0x13b7: 0x7bb9, 0x13b8: 0x7bb9, 0x13b9: 0x7be1, 0x13ba: 0x7be1, 0x13bb: 0x7be1,\n\t0x13bc: 0x7c09, 0x13bd: 0x7c09, 0x13be: 0x7c09, 0x13bf: 0x7c09,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x85f9, 0x13c1: 0x8621, 0x13c2: 0x8649, 0x13c3: 0x8671, 0x13c4: 0x8699, 0x13c5: 0x86c1,\n\t0x13c6: 0x86e9, 0x13c7: 0x8711, 0x13c8: 0x8739, 0x13c9: 0x8761, 0x13ca: 0x8789, 0x13cb: 0x87b1,\n\t0x13cc: 0x87d9, 0x13cd: 0x8801, 0x13ce: 0x8829, 0x13cf: 0x8851, 0x13d0: 0x8879, 0x13d1: 0x88a1,\n\t0x13d2: 0x88c9, 0x13d3: 0x88f1, 0x13d4: 0x8919, 0x13d5: 0x8941, 0x13d6: 0x8969, 0x13d7: 0x8991,\n\t0x13d8: 0x89b9, 0x13d9: 0x89e1, 0x13da: 0x8a09, 0x13db: 0x8a31, 0x13dc: 0x8a59, 0x13dd: 0x8a81,\n\t0x13de: 0x8aaa, 0x13df: 0x8ada, 0x13e0: 0x8b0a, 0x13e1: 0x8b3a, 0x13e2: 0x8b6a, 0x13e3: 0x8b9a,\n\t0x13e4: 0x8bc9, 0x13e5: 0x8bf1, 0x13e6: 0x7c71, 0x13e7: 0x8c19, 0x13e8: 0x7be1, 0x13e9: 0x7c99,\n\t0x13ea: 0x8c41, 0x13eb: 0x8c69, 0x13ec: 0x7d39, 0x13ed: 0x8c91, 0x13ee: 0x7d61, 0x13ef: 0x7d89,\n\t0x13f0: 0x8cb9, 0x13f1: 0x8ce1, 0x13f2: 0x7e29, 0x13f3: 0x8d09, 0x13f4: 0x7e51, 0x13f5: 0x7e79,\n\t0x13f6: 0x8d31, 0x13f7: 0x8d59, 0x13f8: 0x7ec9, 0x13f9: 0x8d81, 0x13fa: 0x7ef1, 0x13fb: 0x7f19,\n\t0x13fc: 0x83a1, 0x13fd: 0x83c9, 0x13fe: 0x8441, 0x13ff: 0x8469,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x8491, 0x1401: 0x8531, 0x1402: 0x8559, 0x1403: 0x8581, 0x1404: 0x85a9, 0x1405: 0x8649,\n\t0x1406: 0x8671, 0x1407: 0x8699, 0x1408: 0x8da9, 0x1409: 0x8739, 0x140a: 0x8dd1, 0x140b: 0x8df9,\n\t0x140c: 0x8829, 0x140d: 0x8e21, 0x140e: 0x8851, 0x140f: 0x8879, 0x1410: 0x8a81, 0x1411: 0x8e49,\n\t0x1412: 0x8e71, 0x1413: 0x89b9, 0x1414: 0x8e99, 0x1415: 0x89e1, 0x1416: 0x8a09, 0x1417: 0x7c21,\n\t0x1418: 0x7c49, 0x1419: 0x8ec1, 0x141a: 0x7c71, 0x141b: 0x8ee9, 0x141c: 0x7cc1, 0x141d: 0x7ce9,\n\t0x141e: 0x7d11, 0x141f: 0x7d39, 0x1420: 0x8f11, 0x1421: 0x7db1, 0x1422: 0x7dd9, 0x1423: 0x7e01,\n\t0x1424: 0x7e29, 0x1425: 0x8f39, 0x1426: 0x7ec9, 0x1427: 0x7f41, 0x1428: 0x7f69, 0x1429: 0x7f91,\n\t0x142a: 0x7fb9, 0x142b: 0x7fe1, 0x142c: 0x8031, 0x142d: 0x8059, 0x142e: 0x8081, 0x142f: 0x80a9,\n\t0x1430: 0x80d1, 0x1431: 0x80f9, 0x1432: 0x8f61, 0x1433: 0x8121, 0x1434: 0x8149, 0x1435: 0x8171,\n\t0x1436: 0x8199, 0x1437: 0x81c1, 0x1438: 0x81e9, 0x1439: 0x8239, 0x143a: 0x8261, 0x143b: 0x8289,\n\t0x143c: 0x82b1, 0x143d: 0x82d9, 0x143e: 0x8301, 0x143f: 0x8329,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x8351, 0x1441: 0x8379, 0x1442: 0x83f1, 0x1443: 0x8419, 0x1444: 0x84b9, 0x1445: 0x84e1,\n\t0x1446: 0x8509, 0x1447: 0x8531, 0x1448: 0x8559, 0x1449: 0x85d1, 0x144a: 0x85f9, 0x144b: 0x8621,\n\t0x144c: 0x8649, 0x144d: 0x8f89, 0x144e: 0x86c1, 0x144f: 0x86e9, 0x1450: 0x8711, 0x1451: 0x8739,\n\t0x1452: 0x87b1, 0x1453: 0x87d9, 0x1454: 0x8801, 0x1455: 0x8829, 0x1456: 0x8fb1, 0x1457: 0x88a1,\n\t0x1458: 0x88c9, 0x1459: 0x8fd9, 0x145a: 0x8941, 0x145b: 0x8969, 0x145c: 0x8991, 0x145d: 0x89b9,\n\t0x145e: 0x9001, 0x145f: 0x7c71, 0x1460: 0x8ee9, 0x1461: 0x7d39, 0x1462: 0x8f11, 0x1463: 0x7e29,\n\t0x1464: 0x8f39, 0x1465: 0x7ec9, 0x1466: 0x9029, 0x1467: 0x80d1, 0x1468: 0x9051, 0x1469: 0x9079,\n\t0x146a: 0x90a1, 0x146b: 0x8531, 0x146c: 0x8559, 0x146d: 0x8649, 0x146e: 0x8829, 0x146f: 0x8fb1,\n\t0x1470: 0x89b9, 0x1471: 0x9001, 0x1472: 0x90c9, 0x1473: 0x9101, 0x1474: 0x9139, 0x1475: 0x9171,\n\t0x1476: 0x9199, 0x1477: 0x91c1, 0x1478: 0x91e9, 0x1479: 0x9211, 0x147a: 0x9239, 0x147b: 0x9261,\n\t0x147c: 0x9289, 0x147d: 0x92b1, 0x147e: 0x92d9, 0x147f: 0x9301,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x9329, 0x1481: 0x9351, 0x1482: 0x9379, 0x1483: 0x93a1, 0x1484: 0x93c9, 0x1485: 0x93f1,\n\t0x1486: 0x9419, 0x1487: 0x9441, 0x1488: 0x9469, 0x1489: 0x9491, 0x148a: 0x94b9, 0x148b: 0x94e1,\n\t0x148c: 0x9079, 0x148d: 0x9509, 0x148e: 0x9531, 0x148f: 0x9559, 0x1490: 0x9581, 0x1491: 0x9171,\n\t0x1492: 0x9199, 0x1493: 0x91c1, 0x1494: 0x91e9, 0x1495: 0x9211, 0x1496: 0x9239, 0x1497: 0x9261,\n\t0x1498: 0x9289, 0x1499: 0x92b1, 0x149a: 0x92d9, 0x149b: 0x9301, 0x149c: 0x9329, 0x149d: 0x9351,\n\t0x149e: 0x9379, 0x149f: 0x93a1, 0x14a0: 0x93c9, 0x14a1: 0x93f1, 0x14a2: 0x9419, 0x14a3: 0x9441,\n\t0x14a4: 0x9469, 0x14a5: 0x9491, 0x14a6: 0x94b9, 0x14a7: 0x94e1, 0x14a8: 0x9079, 0x14a9: 0x9509,\n\t0x14aa: 0x9531, 0x14ab: 0x9559, 0x14ac: 0x9581, 0x14ad: 0x9491, 0x14ae: 0x94b9, 0x14af: 0x94e1,\n\t0x14b0: 0x9079, 0x14b1: 0x9051, 0x14b2: 0x90a1, 0x14b3: 0x8211, 0x14b4: 0x8059, 0x14b5: 0x8081,\n\t0x14b6: 0x80a9, 0x14b7: 0x9491, 0x14b8: 0x94b9, 0x14b9: 0x94e1, 0x14ba: 0x8211, 0x14bb: 0x8239,\n\t0x14bc: 0x95a9, 0x14bd: 0x95a9, 0x14be: 0x0018, 0x14bf: 0x0018,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0040, 0x14c1: 0x0040, 0x14c2: 0x0040, 0x14c3: 0x0040, 0x14c4: 0x0040, 0x14c5: 0x0040,\n\t0x14c6: 0x0040, 0x14c7: 0x0040, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040,\n\t0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x95d1, 0x14d1: 0x9609,\n\t0x14d2: 0x9609, 0x14d3: 0x9641, 0x14d4: 0x9679, 0x14d5: 0x96b1, 0x14d6: 0x96e9, 0x14d7: 0x9721,\n\t0x14d8: 0x9759, 0x14d9: 0x9759, 0x14da: 0x9791, 0x14db: 0x97c9, 0x14dc: 0x9801, 0x14dd: 0x9839,\n\t0x14de: 0x9871, 0x14df: 0x98a9, 0x14e0: 0x98a9, 0x14e1: 0x98e1, 0x14e2: 0x9919, 0x14e3: 0x9919,\n\t0x14e4: 0x9951, 0x14e5: 0x9951, 0x14e6: 0x9989, 0x14e7: 0x99c1, 0x14e8: 0x99c1, 0x14e9: 0x99f9,\n\t0x14ea: 0x9a31, 0x14eb: 0x9a31, 0x14ec: 0x9a69, 0x14ed: 0x9a69, 0x14ee: 0x9aa1, 0x14ef: 0x9ad9,\n\t0x14f0: 0x9ad9, 0x14f1: 0x9b11, 0x14f2: 0x9b11, 0x14f3: 0x9b49, 0x14f4: 0x9b81, 0x14f5: 0x9bb9,\n\t0x14f6: 0x9bf1, 0x14f7: 0x9bf1, 0x14f8: 0x9c29, 0x14f9: 0x9c61, 0x14fa: 0x9c99, 0x14fb: 0x9cd1,\n\t0x14fc: 0x9d09, 0x14fd: 0x9d09, 0x14fe: 0x9d41, 0x14ff: 0x9d79,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0xa949, 0x1501: 0xa981, 0x1502: 0xa9b9, 0x1503: 0xa8a1, 0x1504: 0x9bb9, 0x1505: 0x9989,\n\t0x1506: 0xa9f1, 0x1507: 0xaa29, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040,\n\t0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0040, 0x1510: 0x0040, 0x1511: 0x0040,\n\t0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040,\n\t0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,\n\t0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040,\n\t0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040,\n\t0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,\n\t0x1530: 0xaa61, 0x1531: 0xaa99, 0x1532: 0xaad1, 0x1533: 0xab19, 0x1534: 0xab61, 0x1535: 0xaba9,\n\t0x1536: 0xabf1, 0x1537: 0xac39, 0x1538: 0xac81, 0x1539: 0xacc9, 0x153a: 0xad02, 0x153b: 0xae12,\n\t0x153c: 0xae91, 0x153d: 0x0018, 0x153e: 0x0040, 0x153f: 0x0040,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0,\n\t0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0,\n\t0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0xaeda, 0x1551: 0x7d55,\n\t0x1552: 0x0040, 0x1553: 0xaeea, 0x1554: 0x03c2, 0x1555: 0xaefa, 0x1556: 0xaf0a, 0x1557: 0x7d75,\n\t0x1558: 0x7d95, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040,\n\t0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308,\n\t0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308,\n\t0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308,\n\t0x1570: 0x0040, 0x1571: 0x7db5, 0x1572: 0x7dd5, 0x1573: 0xaf1a, 0x1574: 0xaf1a, 0x1575: 0x1fd2,\n\t0x1576: 0x1fe2, 0x1577: 0xaf2a, 0x1578: 0xaf3a, 0x1579: 0x7df5, 0x157a: 0x7e15, 0x157b: 0x7e35,\n\t0x157c: 0x7df5, 0x157d: 0x7e55, 0x157e: 0x7e75, 0x157f: 0x7e55,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x7e95, 0x1581: 0x7eb5, 0x1582: 0x7ed5, 0x1583: 0x7eb5, 0x1584: 0x7ef5, 0x1585: 0x0018,\n\t0x1586: 0x0018, 0x1587: 0xaf4a, 0x1588: 0xaf5a, 0x1589: 0x7f16, 0x158a: 0x7f36, 0x158b: 0x7f56,\n\t0x158c: 0x7f76, 0x158d: 0xaf1a, 0x158e: 0xaf1a, 0x158f: 0xaf1a, 0x1590: 0xaeda, 0x1591: 0x7f95,\n\t0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x03c2, 0x1595: 0xaeea, 0x1596: 0xaf0a, 0x1597: 0xaefa,\n\t0x1598: 0x7fb5, 0x1599: 0x1fd2, 0x159a: 0x1fe2, 0x159b: 0xaf2a, 0x159c: 0xaf3a, 0x159d: 0x7e95,\n\t0x159e: 0x7ef5, 0x159f: 0xaf6a, 0x15a0: 0xaf7a, 0x15a1: 0xaf8a, 0x15a2: 0x1fb2, 0x15a3: 0xaf99,\n\t0x15a4: 0xafaa, 0x15a5: 0xafba, 0x15a6: 0x1fc2, 0x15a7: 0x0040, 0x15a8: 0xafca, 0x15a9: 0xafda,\n\t0x15aa: 0xafea, 0x15ab: 0xaffa, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040,\n\t0x15b0: 0x7fd6, 0x15b1: 0xb009, 0x15b2: 0x7ff6, 0x15b3: 0x0808, 0x15b4: 0x8016, 0x15b5: 0x0040,\n\t0x15b6: 0x8036, 0x15b7: 0xb031, 0x15b8: 0x8056, 0x15b9: 0xb059, 0x15ba: 0x8076, 0x15bb: 0xb081,\n\t0x15bc: 0x8096, 0x15bd: 0xb0a9, 0x15be: 0x80b6, 0x15bf: 0xb0d1,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0xb0f9, 0x15c1: 0xb111, 0x15c2: 0xb111, 0x15c3: 0xb129, 0x15c4: 0xb129, 0x15c5: 0xb141,\n\t0x15c6: 0xb141, 0x15c7: 0xb159, 0x15c8: 0xb159, 0x15c9: 0xb171, 0x15ca: 0xb171, 0x15cb: 0xb171,\n\t0x15cc: 0xb171, 0x15cd: 0xb189, 0x15ce: 0xb189, 0x15cf: 0xb1a1, 0x15d0: 0xb1a1, 0x15d1: 0xb1a1,\n\t0x15d2: 0xb1a1, 0x15d3: 0xb1b9, 0x15d4: 0xb1b9, 0x15d5: 0xb1d1, 0x15d6: 0xb1d1, 0x15d7: 0xb1d1,\n\t0x15d8: 0xb1d1, 0x15d9: 0xb1e9, 0x15da: 0xb1e9, 0x15db: 0xb1e9, 0x15dc: 0xb1e9, 0x15dd: 0xb201,\n\t0x15de: 0xb201, 0x15df: 0xb201, 0x15e0: 0xb201, 0x15e1: 0xb219, 0x15e2: 0xb219, 0x15e3: 0xb219,\n\t0x15e4: 0xb219, 0x15e5: 0xb231, 0x15e6: 0xb231, 0x15e7: 0xb231, 0x15e8: 0xb231, 0x15e9: 0xb249,\n\t0x15ea: 0xb249, 0x15eb: 0xb261, 0x15ec: 0xb261, 0x15ed: 0xb279, 0x15ee: 0xb279, 0x15ef: 0xb291,\n\t0x15f0: 0xb291, 0x15f1: 0xb2a9, 0x15f2: 0xb2a9, 0x15f3: 0xb2a9, 0x15f4: 0xb2a9, 0x15f5: 0xb2c1,\n\t0x15f6: 0xb2c1, 0x15f7: 0xb2c1, 0x15f8: 0xb2c1, 0x15f9: 0xb2d9, 0x15fa: 0xb2d9, 0x15fb: 0xb2d9,\n\t0x15fc: 0xb2d9, 0x15fd: 0xb2f1, 0x15fe: 0xb2f1, 0x15ff: 0xb2f1,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0xb2f1, 0x1601: 0xb309, 0x1602: 0xb309, 0x1603: 0xb309, 0x1604: 0xb309, 0x1605: 0xb321,\n\t0x1606: 0xb321, 0x1607: 0xb321, 0x1608: 0xb321, 0x1609: 0xb339, 0x160a: 0xb339, 0x160b: 0xb339,\n\t0x160c: 0xb339, 0x160d: 0xb351, 0x160e: 0xb351, 0x160f: 0xb351, 0x1610: 0xb351, 0x1611: 0xb369,\n\t0x1612: 0xb369, 0x1613: 0xb369, 0x1614: 0xb369, 0x1615: 0xb381, 0x1616: 0xb381, 0x1617: 0xb381,\n\t0x1618: 0xb381, 0x1619: 0xb399, 0x161a: 0xb399, 0x161b: 0xb399, 0x161c: 0xb399, 0x161d: 0xb3b1,\n\t0x161e: 0xb3b1, 0x161f: 0xb3b1, 0x1620: 0xb3b1, 0x1621: 0xb3c9, 0x1622: 0xb3c9, 0x1623: 0xb3c9,\n\t0x1624: 0xb3c9, 0x1625: 0xb3e1, 0x1626: 0xb3e1, 0x1627: 0xb3e1, 0x1628: 0xb3e1, 0x1629: 0xb3f9,\n\t0x162a: 0xb3f9, 0x162b: 0xb3f9, 0x162c: 0xb3f9, 0x162d: 0xb411, 0x162e: 0xb411, 0x162f: 0x7ab1,\n\t0x1630: 0x7ab1, 0x1631: 0xb429, 0x1632: 0xb429, 0x1633: 0xb429, 0x1634: 0xb429, 0x1635: 0xb441,\n\t0x1636: 0xb441, 0x1637: 0xb469, 0x1638: 0xb469, 0x1639: 0xb491, 0x163a: 0xb491, 0x163b: 0xb4b9,\n\t0x163c: 0xb4b9, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0040, 0x1641: 0xaefa, 0x1642: 0xb4e2, 0x1643: 0xaf6a, 0x1644: 0xafda, 0x1645: 0xafea,\n\t0x1646: 0xaf7a, 0x1647: 0xb4f2, 0x1648: 0x1fd2, 0x1649: 0x1fe2, 0x164a: 0xaf8a, 0x164b: 0x1fb2,\n\t0x164c: 0xaeda, 0x164d: 0xaf99, 0x164e: 0x29d1, 0x164f: 0xb502, 0x1650: 0x1f41, 0x1651: 0x00c9,\n\t0x1652: 0x0069, 0x1653: 0x0079, 0x1654: 0x1f51, 0x1655: 0x1f61, 0x1656: 0x1f71, 0x1657: 0x1f81,\n\t0x1658: 0x1f91, 0x1659: 0x1fa1, 0x165a: 0xaeea, 0x165b: 0x03c2, 0x165c: 0xafaa, 0x165d: 0x1fc2,\n\t0x165e: 0xafba, 0x165f: 0xaf0a, 0x1660: 0xaffa, 0x1661: 0x0039, 0x1662: 0x0ee9, 0x1663: 0x1159,\n\t0x1664: 0x0ef9, 0x1665: 0x0f09, 0x1666: 0x1199, 0x1667: 0x0f31, 0x1668: 0x0249, 0x1669: 0x0f41,\n\t0x166a: 0x0259, 0x166b: 0x0f51, 0x166c: 0x0359, 0x166d: 0x0f61, 0x166e: 0x0f71, 0x166f: 0x00d9,\n\t0x1670: 0x0f99, 0x1671: 0x2039, 0x1672: 0x0269, 0x1673: 0x01d9, 0x1674: 0x0fa9, 0x1675: 0x0fb9,\n\t0x1676: 0x1089, 0x1677: 0x0279, 0x1678: 0x0369, 0x1679: 0x0289, 0x167a: 0x13d1, 0x167b: 0xaf4a,\n\t0x167c: 0xafca, 0x167d: 0xaf5a, 0x167e: 0xb512, 0x167f: 0xaf1a,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x1caa, 0x1681: 0x0039, 0x1682: 0x0ee9, 0x1683: 0x1159, 0x1684: 0x0ef9, 0x1685: 0x0f09,\n\t0x1686: 0x1199, 0x1687: 0x0f31, 0x1688: 0x0249, 0x1689: 0x0f41, 0x168a: 0x0259, 0x168b: 0x0f51,\n\t0x168c: 0x0359, 0x168d: 0x0f61, 0x168e: 0x0f71, 0x168f: 0x00d9, 0x1690: 0x0f99, 0x1691: 0x2039,\n\t0x1692: 0x0269, 0x1693: 0x01d9, 0x1694: 0x0fa9, 0x1695: 0x0fb9, 0x1696: 0x1089, 0x1697: 0x0279,\n\t0x1698: 0x0369, 0x1699: 0x0289, 0x169a: 0x13d1, 0x169b: 0xaf2a, 0x169c: 0xb522, 0x169d: 0xaf3a,\n\t0x169e: 0xb532, 0x169f: 0x80d5, 0x16a0: 0x80f5, 0x16a1: 0x29d1, 0x16a2: 0x8115, 0x16a3: 0x8115,\n\t0x16a4: 0x8135, 0x16a5: 0x8155, 0x16a6: 0x8175, 0x16a7: 0x8195, 0x16a8: 0x81b5, 0x16a9: 0x81d5,\n\t0x16aa: 0x81f5, 0x16ab: 0x8215, 0x16ac: 0x8235, 0x16ad: 0x8255, 0x16ae: 0x8275, 0x16af: 0x8295,\n\t0x16b0: 0x82b5, 0x16b1: 0x82d5, 0x16b2: 0x82f5, 0x16b3: 0x8315, 0x16b4: 0x8335, 0x16b5: 0x8355,\n\t0x16b6: 0x8375, 0x16b7: 0x8395, 0x16b8: 0x83b5, 0x16b9: 0x83d5, 0x16ba: 0x83f5, 0x16bb: 0x8415,\n\t0x16bc: 0x81b5, 0x16bd: 0x8435, 0x16be: 0x8455, 0x16bf: 0x8215,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x8475, 0x16c1: 0x8495, 0x16c2: 0x84b5, 0x16c3: 0x84d5, 0x16c4: 0x84f5, 0x16c5: 0x8515,\n\t0x16c6: 0x8535, 0x16c7: 0x8555, 0x16c8: 0x84d5, 0x16c9: 0x8575, 0x16ca: 0x84d5, 0x16cb: 0x8595,\n\t0x16cc: 0x8595, 0x16cd: 0x85b5, 0x16ce: 0x85b5, 0x16cf: 0x85d5, 0x16d0: 0x8515, 0x16d1: 0x85f5,\n\t0x16d2: 0x8615, 0x16d3: 0x85f5, 0x16d4: 0x8635, 0x16d5: 0x8615, 0x16d6: 0x8655, 0x16d7: 0x8655,\n\t0x16d8: 0x8675, 0x16d9: 0x8675, 0x16da: 0x8695, 0x16db: 0x8695, 0x16dc: 0x8615, 0x16dd: 0x8115,\n\t0x16de: 0x86b5, 0x16df: 0x86d5, 0x16e0: 0x0040, 0x16e1: 0x86f5, 0x16e2: 0x8715, 0x16e3: 0x8735,\n\t0x16e4: 0x8755, 0x16e5: 0x8735, 0x16e6: 0x8775, 0x16e7: 0x8795, 0x16e8: 0x87b5, 0x16e9: 0x87b5,\n\t0x16ea: 0x87d5, 0x16eb: 0x87d5, 0x16ec: 0x87f5, 0x16ed: 0x87f5, 0x16ee: 0x87d5, 0x16ef: 0x87d5,\n\t0x16f0: 0x8815, 0x16f1: 0x8835, 0x16f2: 0x8855, 0x16f3: 0x8875, 0x16f4: 0x8895, 0x16f5: 0x88b5,\n\t0x16f6: 0x88b5, 0x16f7: 0x88b5, 0x16f8: 0x88d5, 0x16f9: 0x88d5, 0x16fa: 0x88d5, 0x16fb: 0x88d5,\n\t0x16fc: 0x87b5, 0x16fd: 0x87b5, 0x16fe: 0x87b5, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x8715, 0x1703: 0x86f5, 0x1704: 0x88f5, 0x1705: 0x86f5,\n\t0x1706: 0x8715, 0x1707: 0x86f5, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x8915, 0x170b: 0x8715,\n\t0x170c: 0x8935, 0x170d: 0x88f5, 0x170e: 0x8935, 0x170f: 0x8715, 0x1710: 0x0040, 0x1711: 0x0040,\n\t0x1712: 0x8955, 0x1713: 0x8975, 0x1714: 0x8875, 0x1715: 0x8935, 0x1716: 0x88f5, 0x1717: 0x8935,\n\t0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x8995, 0x171b: 0x89b5, 0x171c: 0x8995, 0x171d: 0x0040,\n\t0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0xb541, 0x1721: 0xb559, 0x1722: 0xb571, 0x1723: 0x89d6,\n\t0x1724: 0xb589, 0x1725: 0xb5a1, 0x1726: 0x89f5, 0x1727: 0x0040, 0x1728: 0x8a15, 0x1729: 0x8a35,\n\t0x172a: 0x8a55, 0x172b: 0x8a35, 0x172c: 0x8a75, 0x172d: 0x8a95, 0x172e: 0x8ab5, 0x172f: 0x0040,\n\t0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,\n\t0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x0a08, 0x1741: 0x0a08, 0x1742: 0x0a08, 0x1743: 0x0a08, 0x1744: 0x0a08, 0x1745: 0x0c08,\n\t0x1746: 0x0808, 0x1747: 0x0c08, 0x1748: 0x0818, 0x1749: 0x0c08, 0x174a: 0x0c08, 0x174b: 0x0808,\n\t0x174c: 0x0808, 0x174d: 0x0908, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0c08, 0x1751: 0x0c08,\n\t0x1752: 0x0c08, 0x1753: 0x0a08, 0x1754: 0x0a08, 0x1755: 0x0a08, 0x1756: 0x0a08, 0x1757: 0x0908,\n\t0x1758: 0x0a08, 0x1759: 0x0a08, 0x175a: 0x0a08, 0x175b: 0x0a08, 0x175c: 0x0a08, 0x175d: 0x0c08,\n\t0x175e: 0x0a08, 0x175f: 0x0a08, 0x1760: 0x0a08, 0x1761: 0x0c08, 0x1762: 0x0808, 0x1763: 0x0808,\n\t0x1764: 0x0c08, 0x1765: 0x3308, 0x1766: 0x3308, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040,\n\t0x176a: 0x0040, 0x176b: 0x0a18, 0x176c: 0x0a18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0c18,\n\t0x1770: 0x0818, 0x1771: 0x0818, 0x1772: 0x0818, 0x1773: 0x0818, 0x1774: 0x0818, 0x1775: 0x0818,\n\t0x1776: 0x0818, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040,\n\t0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x0a08, 0x1781: 0x0c08, 0x1782: 0x0a08, 0x1783: 0x0c08, 0x1784: 0x0c08, 0x1785: 0x0c08,\n\t0x1786: 0x0a08, 0x1787: 0x0a08, 0x1788: 0x0a08, 0x1789: 0x0c08, 0x178a: 0x0a08, 0x178b: 0x0a08,\n\t0x178c: 0x0c08, 0x178d: 0x0a08, 0x178e: 0x0c08, 0x178f: 0x0c08, 0x1790: 0x0a08, 0x1791: 0x0c08,\n\t0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x0040,\n\t0x1798: 0x0040, 0x1799: 0x0818, 0x179a: 0x0818, 0x179b: 0x0818, 0x179c: 0x0818, 0x179d: 0x0040,\n\t0x179e: 0x0040, 0x179f: 0x0040, 0x17a0: 0x0040, 0x17a1: 0x0040, 0x17a2: 0x0040, 0x17a3: 0x0040,\n\t0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x0040, 0x17a7: 0x0040, 0x17a8: 0x0040, 0x17a9: 0x0c18,\n\t0x17aa: 0x0c18, 0x17ab: 0x0c18, 0x17ac: 0x0c18, 0x17ad: 0x0a18, 0x17ae: 0x0a18, 0x17af: 0x0818,\n\t0x17b0: 0x0040, 0x17b1: 0x0040, 0x17b2: 0x0040, 0x17b3: 0x0040, 0x17b4: 0x0040, 0x17b5: 0x0040,\n\t0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040,\n\t0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x3308, 0x17c1: 0x3308, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x0040, 0x17c5: 0x0008,\n\t0x17c6: 0x0008, 0x17c7: 0x0008, 0x17c8: 0x0008, 0x17c9: 0x0008, 0x17ca: 0x0008, 0x17cb: 0x0008,\n\t0x17cc: 0x0008, 0x17cd: 0x0040, 0x17ce: 0x0040, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0040,\n\t0x17d2: 0x0040, 0x17d3: 0x0008, 0x17d4: 0x0008, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0008,\n\t0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008,\n\t0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008,\n\t0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0040,\n\t0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008,\n\t0x17f0: 0x0008, 0x17f1: 0x0040, 0x17f2: 0x0008, 0x17f3: 0x0008, 0x17f4: 0x0040, 0x17f5: 0x0008,\n\t0x17f6: 0x0008, 0x17f7: 0x0008, 0x17f8: 0x0008, 0x17f9: 0x0008, 0x17fa: 0x0040, 0x17fb: 0x0040,\n\t0x17fc: 0x3308, 0x17fd: 0x0008, 0x17fe: 0x3008, 0x17ff: 0x3008,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x3308, 0x1801: 0x3008, 0x1802: 0x3008, 0x1803: 0x3008, 0x1804: 0x3008, 0x1805: 0x0040,\n\t0x1806: 0x0040, 0x1807: 0x3008, 0x1808: 0x3008, 0x1809: 0x0040, 0x180a: 0x0040, 0x180b: 0x3008,\n\t0x180c: 0x3008, 0x180d: 0x3808, 0x180e: 0x0040, 0x180f: 0x0040, 0x1810: 0x0008, 0x1811: 0x0040,\n\t0x1812: 0x0040, 0x1813: 0x0040, 0x1814: 0x0040, 0x1815: 0x0040, 0x1816: 0x0040, 0x1817: 0x3008,\n\t0x1818: 0x0040, 0x1819: 0x0040, 0x181a: 0x0040, 0x181b: 0x0040, 0x181c: 0x0040, 0x181d: 0x0008,\n\t0x181e: 0x0008, 0x181f: 0x0008, 0x1820: 0x0008, 0x1821: 0x0008, 0x1822: 0x3008, 0x1823: 0x3008,\n\t0x1824: 0x0040, 0x1825: 0x0040, 0x1826: 0x3308, 0x1827: 0x3308, 0x1828: 0x3308, 0x1829: 0x3308,\n\t0x182a: 0x3308, 0x182b: 0x3308, 0x182c: 0x3308, 0x182d: 0x0040, 0x182e: 0x0040, 0x182f: 0x0040,\n\t0x1830: 0x3308, 0x1831: 0x3308, 0x1832: 0x3308, 0x1833: 0x3308, 0x1834: 0x3308, 0x1835: 0x0040,\n\t0x1836: 0x0040, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040,\n\t0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0039, 0x1841: 0x0ee9, 0x1842: 0x1159, 0x1843: 0x0ef9, 0x1844: 0x0f09, 0x1845: 0x1199,\n\t0x1846: 0x0f31, 0x1847: 0x0249, 0x1848: 0x0f41, 0x1849: 0x0259, 0x184a: 0x0f51, 0x184b: 0x0359,\n\t0x184c: 0x0f61, 0x184d: 0x0f71, 0x184e: 0x00d9, 0x184f: 0x0f99, 0x1850: 0x2039, 0x1851: 0x0269,\n\t0x1852: 0x01d9, 0x1853: 0x0fa9, 0x1854: 0x0fb9, 0x1855: 0x1089, 0x1856: 0x0279, 0x1857: 0x0369,\n\t0x1858: 0x0289, 0x1859: 0x13d1, 0x185a: 0x0039, 0x185b: 0x0ee9, 0x185c: 0x1159, 0x185d: 0x0ef9,\n\t0x185e: 0x0f09, 0x185f: 0x1199, 0x1860: 0x0f31, 0x1861: 0x0249, 0x1862: 0x0f41, 0x1863: 0x0259,\n\t0x1864: 0x0f51, 0x1865: 0x0359, 0x1866: 0x0f61, 0x1867: 0x0f71, 0x1868: 0x00d9, 0x1869: 0x0f99,\n\t0x186a: 0x2039, 0x186b: 0x0269, 0x186c: 0x01d9, 0x186d: 0x0fa9, 0x186e: 0x0fb9, 0x186f: 0x1089,\n\t0x1870: 0x0279, 0x1871: 0x0369, 0x1872: 0x0289, 0x1873: 0x13d1, 0x1874: 0x0039, 0x1875: 0x0ee9,\n\t0x1876: 0x1159, 0x1877: 0x0ef9, 0x1878: 0x0f09, 0x1879: 0x1199, 0x187a: 0x0f31, 0x187b: 0x0249,\n\t0x187c: 0x0f41, 0x187d: 0x0259, 0x187e: 0x0f51, 0x187f: 0x0359,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x0f61, 0x1881: 0x0f71, 0x1882: 0x00d9, 0x1883: 0x0f99, 0x1884: 0x2039, 0x1885: 0x0269,\n\t0x1886: 0x01d9, 0x1887: 0x0fa9, 0x1888: 0x0fb9, 0x1889: 0x1089, 0x188a: 0x0279, 0x188b: 0x0369,\n\t0x188c: 0x0289, 0x188d: 0x13d1, 0x188e: 0x0039, 0x188f: 0x0ee9, 0x1890: 0x1159, 0x1891: 0x0ef9,\n\t0x1892: 0x0f09, 0x1893: 0x1199, 0x1894: 0x0f31, 0x1895: 0x0040, 0x1896: 0x0f41, 0x1897: 0x0259,\n\t0x1898: 0x0f51, 0x1899: 0x0359, 0x189a: 0x0f61, 0x189b: 0x0f71, 0x189c: 0x00d9, 0x189d: 0x0f99,\n\t0x189e: 0x2039, 0x189f: 0x0269, 0x18a0: 0x01d9, 0x18a1: 0x0fa9, 0x18a2: 0x0fb9, 0x18a3: 0x1089,\n\t0x18a4: 0x0279, 0x18a5: 0x0369, 0x18a6: 0x0289, 0x18a7: 0x13d1, 0x18a8: 0x0039, 0x18a9: 0x0ee9,\n\t0x18aa: 0x1159, 0x18ab: 0x0ef9, 0x18ac: 0x0f09, 0x18ad: 0x1199, 0x18ae: 0x0f31, 0x18af: 0x0249,\n\t0x18b0: 0x0f41, 0x18b1: 0x0259, 0x18b2: 0x0f51, 0x18b3: 0x0359, 0x18b4: 0x0f61, 0x18b5: 0x0f71,\n\t0x18b6: 0x00d9, 0x18b7: 0x0f99, 0x18b8: 0x2039, 0x18b9: 0x0269, 0x18ba: 0x01d9, 0x18bb: 0x0fa9,\n\t0x18bc: 0x0fb9, 0x18bd: 0x1089, 0x18be: 0x0279, 0x18bf: 0x0369,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x0289, 0x18c1: 0x13d1, 0x18c2: 0x0039, 0x18c3: 0x0ee9, 0x18c4: 0x1159, 0x18c5: 0x0ef9,\n\t0x18c6: 0x0f09, 0x18c7: 0x1199, 0x18c8: 0x0f31, 0x18c9: 0x0249, 0x18ca: 0x0f41, 0x18cb: 0x0259,\n\t0x18cc: 0x0f51, 0x18cd: 0x0359, 0x18ce: 0x0f61, 0x18cf: 0x0f71, 0x18d0: 0x00d9, 0x18d1: 0x0f99,\n\t0x18d2: 0x2039, 0x18d3: 0x0269, 0x18d4: 0x01d9, 0x18d5: 0x0fa9, 0x18d6: 0x0fb9, 0x18d7: 0x1089,\n\t0x18d8: 0x0279, 0x18d9: 0x0369, 0x18da: 0x0289, 0x18db: 0x13d1, 0x18dc: 0x0039, 0x18dd: 0x0040,\n\t0x18de: 0x1159, 0x18df: 0x0ef9, 0x18e0: 0x0040, 0x18e1: 0x0040, 0x18e2: 0x0f31, 0x18e3: 0x0040,\n\t0x18e4: 0x0040, 0x18e5: 0x0259, 0x18e6: 0x0f51, 0x18e7: 0x0040, 0x18e8: 0x0040, 0x18e9: 0x0f71,\n\t0x18ea: 0x00d9, 0x18eb: 0x0f99, 0x18ec: 0x2039, 0x18ed: 0x0040, 0x18ee: 0x01d9, 0x18ef: 0x0fa9,\n\t0x18f0: 0x0fb9, 0x18f1: 0x1089, 0x18f2: 0x0279, 0x18f3: 0x0369, 0x18f4: 0x0289, 0x18f5: 0x13d1,\n\t0x18f6: 0x0039, 0x18f7: 0x0ee9, 0x18f8: 0x1159, 0x18f9: 0x0ef9, 0x18fa: 0x0040, 0x18fb: 0x1199,\n\t0x18fc: 0x0040, 0x18fd: 0x0249, 0x18fe: 0x0f41, 0x18ff: 0x0259,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x0f51, 0x1901: 0x0359, 0x1902: 0x0f61, 0x1903: 0x0f71, 0x1904: 0x0040, 0x1905: 0x0f99,\n\t0x1906: 0x2039, 0x1907: 0x0269, 0x1908: 0x01d9, 0x1909: 0x0fa9, 0x190a: 0x0fb9, 0x190b: 0x1089,\n\t0x190c: 0x0279, 0x190d: 0x0369, 0x190e: 0x0289, 0x190f: 0x13d1, 0x1910: 0x0039, 0x1911: 0x0ee9,\n\t0x1912: 0x1159, 0x1913: 0x0ef9, 0x1914: 0x0f09, 0x1915: 0x1199, 0x1916: 0x0f31, 0x1917: 0x0249,\n\t0x1918: 0x0f41, 0x1919: 0x0259, 0x191a: 0x0f51, 0x191b: 0x0359, 0x191c: 0x0f61, 0x191d: 0x0f71,\n\t0x191e: 0x00d9, 0x191f: 0x0f99, 0x1920: 0x2039, 0x1921: 0x0269, 0x1922: 0x01d9, 0x1923: 0x0fa9,\n\t0x1924: 0x0fb9, 0x1925: 0x1089, 0x1926: 0x0279, 0x1927: 0x0369, 0x1928: 0x0289, 0x1929: 0x13d1,\n\t0x192a: 0x0039, 0x192b: 0x0ee9, 0x192c: 0x1159, 0x192d: 0x0ef9, 0x192e: 0x0f09, 0x192f: 0x1199,\n\t0x1930: 0x0f31, 0x1931: 0x0249, 0x1932: 0x0f41, 0x1933: 0x0259, 0x1934: 0x0f51, 0x1935: 0x0359,\n\t0x1936: 0x0f61, 0x1937: 0x0f71, 0x1938: 0x00d9, 0x1939: 0x0f99, 0x193a: 0x2039, 0x193b: 0x0269,\n\t0x193c: 0x01d9, 0x193d: 0x0fa9, 0x193e: 0x0fb9, 0x193f: 0x1089,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0279, 0x1941: 0x0369, 0x1942: 0x0289, 0x1943: 0x13d1, 0x1944: 0x0039, 0x1945: 0x0ee9,\n\t0x1946: 0x0040, 0x1947: 0x0ef9, 0x1948: 0x0f09, 0x1949: 0x1199, 0x194a: 0x0f31, 0x194b: 0x0040,\n\t0x194c: 0x0040, 0x194d: 0x0259, 0x194e: 0x0f51, 0x194f: 0x0359, 0x1950: 0x0f61, 0x1951: 0x0f71,\n\t0x1952: 0x00d9, 0x1953: 0x0f99, 0x1954: 0x2039, 0x1955: 0x0040, 0x1956: 0x01d9, 0x1957: 0x0fa9,\n\t0x1958: 0x0fb9, 0x1959: 0x1089, 0x195a: 0x0279, 0x195b: 0x0369, 0x195c: 0x0289, 0x195d: 0x0040,\n\t0x195e: 0x0039, 0x195f: 0x0ee9, 0x1960: 0x1159, 0x1961: 0x0ef9, 0x1962: 0x0f09, 0x1963: 0x1199,\n\t0x1964: 0x0f31, 0x1965: 0x0249, 0x1966: 0x0f41, 0x1967: 0x0259, 0x1968: 0x0f51, 0x1969: 0x0359,\n\t0x196a: 0x0f61, 0x196b: 0x0f71, 0x196c: 0x00d9, 0x196d: 0x0f99, 0x196e: 0x2039, 0x196f: 0x0269,\n\t0x1970: 0x01d9, 0x1971: 0x0fa9, 0x1972: 0x0fb9, 0x1973: 0x1089, 0x1974: 0x0279, 0x1975: 0x0369,\n\t0x1976: 0x0289, 0x1977: 0x13d1, 0x1978: 0x0039, 0x1979: 0x0ee9, 0x197a: 0x0040, 0x197b: 0x0ef9,\n\t0x197c: 0x0f09, 0x197d: 0x1199, 0x197e: 0x0f31, 0x197f: 0x0040,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0f41, 0x1981: 0x0259, 0x1982: 0x0f51, 0x1983: 0x0359, 0x1984: 0x0f61, 0x1985: 0x0040,\n\t0x1986: 0x00d9, 0x1987: 0x0040, 0x1988: 0x0040, 0x1989: 0x0040, 0x198a: 0x01d9, 0x198b: 0x0fa9,\n\t0x198c: 0x0fb9, 0x198d: 0x1089, 0x198e: 0x0279, 0x198f: 0x0369, 0x1990: 0x0289, 0x1991: 0x0040,\n\t0x1992: 0x0039, 0x1993: 0x0ee9, 0x1994: 0x1159, 0x1995: 0x0ef9, 0x1996: 0x0f09, 0x1997: 0x1199,\n\t0x1998: 0x0f31, 0x1999: 0x0249, 0x199a: 0x0f41, 0x199b: 0x0259, 0x199c: 0x0f51, 0x199d: 0x0359,\n\t0x199e: 0x0f61, 0x199f: 0x0f71, 0x19a0: 0x00d9, 0x19a1: 0x0f99, 0x19a2: 0x2039, 0x19a3: 0x0269,\n\t0x19a4: 0x01d9, 0x19a5: 0x0fa9, 0x19a6: 0x0fb9, 0x19a7: 0x1089, 0x19a8: 0x0279, 0x19a9: 0x0369,\n\t0x19aa: 0x0289, 0x19ab: 0x13d1, 0x19ac: 0x0039, 0x19ad: 0x0ee9, 0x19ae: 0x1159, 0x19af: 0x0ef9,\n\t0x19b0: 0x0f09, 0x19b1: 0x1199, 0x19b2: 0x0f31, 0x19b3: 0x0249, 0x19b4: 0x0f41, 0x19b5: 0x0259,\n\t0x19b6: 0x0f51, 0x19b7: 0x0359, 0x19b8: 0x0f61, 0x19b9: 0x0f71, 0x19ba: 0x00d9, 0x19bb: 0x0f99,\n\t0x19bc: 0x2039, 0x19bd: 0x0269, 0x19be: 0x01d9, 0x19bf: 0x0fa9,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x0fb9, 0x19c1: 0x1089, 0x19c2: 0x0279, 0x19c3: 0x0369, 0x19c4: 0x0289, 0x19c5: 0x13d1,\n\t0x19c6: 0x0039, 0x19c7: 0x0ee9, 0x19c8: 0x1159, 0x19c9: 0x0ef9, 0x19ca: 0x0f09, 0x19cb: 0x1199,\n\t0x19cc: 0x0f31, 0x19cd: 0x0249, 0x19ce: 0x0f41, 0x19cf: 0x0259, 0x19d0: 0x0f51, 0x19d1: 0x0359,\n\t0x19d2: 0x0f61, 0x19d3: 0x0f71, 0x19d4: 0x00d9, 0x19d5: 0x0f99, 0x19d6: 0x2039, 0x19d7: 0x0269,\n\t0x19d8: 0x01d9, 0x19d9: 0x0fa9, 0x19da: 0x0fb9, 0x19db: 0x1089, 0x19dc: 0x0279, 0x19dd: 0x0369,\n\t0x19de: 0x0289, 0x19df: 0x13d1, 0x19e0: 0x0039, 0x19e1: 0x0ee9, 0x19e2: 0x1159, 0x19e3: 0x0ef9,\n\t0x19e4: 0x0f09, 0x19e5: 0x1199, 0x19e6: 0x0f31, 0x19e7: 0x0249, 0x19e8: 0x0f41, 0x19e9: 0x0259,\n\t0x19ea: 0x0f51, 0x19eb: 0x0359, 0x19ec: 0x0f61, 0x19ed: 0x0f71, 0x19ee: 0x00d9, 0x19ef: 0x0f99,\n\t0x19f0: 0x2039, 0x19f1: 0x0269, 0x19f2: 0x01d9, 0x19f3: 0x0fa9, 0x19f4: 0x0fb9, 0x19f5: 0x1089,\n\t0x19f6: 0x0279, 0x19f7: 0x0369, 0x19f8: 0x0289, 0x19f9: 0x13d1, 0x19fa: 0x0039, 0x19fb: 0x0ee9,\n\t0x19fc: 0x1159, 0x19fd: 0x0ef9, 0x19fe: 0x0f09, 0x19ff: 0x1199,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x0f31, 0x1a01: 0x0249, 0x1a02: 0x0f41, 0x1a03: 0x0259, 0x1a04: 0x0f51, 0x1a05: 0x0359,\n\t0x1a06: 0x0f61, 0x1a07: 0x0f71, 0x1a08: 0x00d9, 0x1a09: 0x0f99, 0x1a0a: 0x2039, 0x1a0b: 0x0269,\n\t0x1a0c: 0x01d9, 0x1a0d: 0x0fa9, 0x1a0e: 0x0fb9, 0x1a0f: 0x1089, 0x1a10: 0x0279, 0x1a11: 0x0369,\n\t0x1a12: 0x0289, 0x1a13: 0x13d1, 0x1a14: 0x0039, 0x1a15: 0x0ee9, 0x1a16: 0x1159, 0x1a17: 0x0ef9,\n\t0x1a18: 0x0f09, 0x1a19: 0x1199, 0x1a1a: 0x0f31, 0x1a1b: 0x0249, 0x1a1c: 0x0f41, 0x1a1d: 0x0259,\n\t0x1a1e: 0x0f51, 0x1a1f: 0x0359, 0x1a20: 0x0f61, 0x1a21: 0x0f71, 0x1a22: 0x00d9, 0x1a23: 0x0f99,\n\t0x1a24: 0x2039, 0x1a25: 0x0269, 0x1a26: 0x01d9, 0x1a27: 0x0fa9, 0x1a28: 0x0fb9, 0x1a29: 0x1089,\n\t0x1a2a: 0x0279, 0x1a2b: 0x0369, 0x1a2c: 0x0289, 0x1a2d: 0x13d1, 0x1a2e: 0x0039, 0x1a2f: 0x0ee9,\n\t0x1a30: 0x1159, 0x1a31: 0x0ef9, 0x1a32: 0x0f09, 0x1a33: 0x1199, 0x1a34: 0x0f31, 0x1a35: 0x0249,\n\t0x1a36: 0x0f41, 0x1a37: 0x0259, 0x1a38: 0x0f51, 0x1a39: 0x0359, 0x1a3a: 0x0f61, 0x1a3b: 0x0f71,\n\t0x1a3c: 0x00d9, 0x1a3d: 0x0f99, 0x1a3e: 0x2039, 0x1a3f: 0x0269,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x01d9, 0x1a41: 0x0fa9, 0x1a42: 0x0fb9, 0x1a43: 0x1089, 0x1a44: 0x0279, 0x1a45: 0x0369,\n\t0x1a46: 0x0289, 0x1a47: 0x13d1, 0x1a48: 0x0039, 0x1a49: 0x0ee9, 0x1a4a: 0x1159, 0x1a4b: 0x0ef9,\n\t0x1a4c: 0x0f09, 0x1a4d: 0x1199, 0x1a4e: 0x0f31, 0x1a4f: 0x0249, 0x1a50: 0x0f41, 0x1a51: 0x0259,\n\t0x1a52: 0x0f51, 0x1a53: 0x0359, 0x1a54: 0x0f61, 0x1a55: 0x0f71, 0x1a56: 0x00d9, 0x1a57: 0x0f99,\n\t0x1a58: 0x2039, 0x1a59: 0x0269, 0x1a5a: 0x01d9, 0x1a5b: 0x0fa9, 0x1a5c: 0x0fb9, 0x1a5d: 0x1089,\n\t0x1a5e: 0x0279, 0x1a5f: 0x0369, 0x1a60: 0x0289, 0x1a61: 0x13d1, 0x1a62: 0x0039, 0x1a63: 0x0ee9,\n\t0x1a64: 0x1159, 0x1a65: 0x0ef9, 0x1a66: 0x0f09, 0x1a67: 0x1199, 0x1a68: 0x0f31, 0x1a69: 0x0249,\n\t0x1a6a: 0x0f41, 0x1a6b: 0x0259, 0x1a6c: 0x0f51, 0x1a6d: 0x0359, 0x1a6e: 0x0f61, 0x1a6f: 0x0f71,\n\t0x1a70: 0x00d9, 0x1a71: 0x0f99, 0x1a72: 0x2039, 0x1a73: 0x0269, 0x1a74: 0x01d9, 0x1a75: 0x0fa9,\n\t0x1a76: 0x0fb9, 0x1a77: 0x1089, 0x1a78: 0x0279, 0x1a79: 0x0369, 0x1a7a: 0x0289, 0x1a7b: 0x13d1,\n\t0x1a7c: 0x0039, 0x1a7d: 0x0ee9, 0x1a7e: 0x1159, 0x1a7f: 0x0ef9,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x0f09, 0x1a81: 0x1199, 0x1a82: 0x0f31, 0x1a83: 0x0249, 0x1a84: 0x0f41, 0x1a85: 0x0259,\n\t0x1a86: 0x0f51, 0x1a87: 0x0359, 0x1a88: 0x0f61, 0x1a89: 0x0f71, 0x1a8a: 0x00d9, 0x1a8b: 0x0f99,\n\t0x1a8c: 0x2039, 0x1a8d: 0x0269, 0x1a8e: 0x01d9, 0x1a8f: 0x0fa9, 0x1a90: 0x0fb9, 0x1a91: 0x1089,\n\t0x1a92: 0x0279, 0x1a93: 0x0369, 0x1a94: 0x0289, 0x1a95: 0x13d1, 0x1a96: 0x0039, 0x1a97: 0x0ee9,\n\t0x1a98: 0x1159, 0x1a99: 0x0ef9, 0x1a9a: 0x0f09, 0x1a9b: 0x1199, 0x1a9c: 0x0f31, 0x1a9d: 0x0249,\n\t0x1a9e: 0x0f41, 0x1a9f: 0x0259, 0x1aa0: 0x0f51, 0x1aa1: 0x0359, 0x1aa2: 0x0f61, 0x1aa3: 0x0f71,\n\t0x1aa4: 0x00d9, 0x1aa5: 0x0f99, 0x1aa6: 0x2039, 0x1aa7: 0x0269, 0x1aa8: 0x01d9, 0x1aa9: 0x0fa9,\n\t0x1aaa: 0x0fb9, 0x1aab: 0x1089, 0x1aac: 0x0279, 0x1aad: 0x0369, 0x1aae: 0x0289, 0x1aaf: 0x13d1,\n\t0x1ab0: 0x0039, 0x1ab1: 0x0ee9, 0x1ab2: 0x1159, 0x1ab3: 0x0ef9, 0x1ab4: 0x0f09, 0x1ab5: 0x1199,\n\t0x1ab6: 0x0f31, 0x1ab7: 0x0249, 0x1ab8: 0x0f41, 0x1ab9: 0x0259, 0x1aba: 0x0f51, 0x1abb: 0x0359,\n\t0x1abc: 0x0f61, 0x1abd: 0x0f71, 0x1abe: 0x00d9, 0x1abf: 0x0f99,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x2039, 0x1ac1: 0x0269, 0x1ac2: 0x01d9, 0x1ac3: 0x0fa9, 0x1ac4: 0x0fb9, 0x1ac5: 0x1089,\n\t0x1ac6: 0x0279, 0x1ac7: 0x0369, 0x1ac8: 0x0289, 0x1ac9: 0x13d1, 0x1aca: 0x0039, 0x1acb: 0x0ee9,\n\t0x1acc: 0x1159, 0x1acd: 0x0ef9, 0x1ace: 0x0f09, 0x1acf: 0x1199, 0x1ad0: 0x0f31, 0x1ad1: 0x0249,\n\t0x1ad2: 0x0f41, 0x1ad3: 0x0259, 0x1ad4: 0x0f51, 0x1ad5: 0x0359, 0x1ad6: 0x0f61, 0x1ad7: 0x0f71,\n\t0x1ad8: 0x00d9, 0x1ad9: 0x0f99, 0x1ada: 0x2039, 0x1adb: 0x0269, 0x1adc: 0x01d9, 0x1add: 0x0fa9,\n\t0x1ade: 0x0fb9, 0x1adf: 0x1089, 0x1ae0: 0x0279, 0x1ae1: 0x0369, 0x1ae2: 0x0289, 0x1ae3: 0x13d1,\n\t0x1ae4: 0xba81, 0x1ae5: 0xba99, 0x1ae6: 0x0040, 0x1ae7: 0x0040, 0x1ae8: 0xbab1, 0x1ae9: 0x1099,\n\t0x1aea: 0x10b1, 0x1aeb: 0x10c9, 0x1aec: 0xbac9, 0x1aed: 0xbae1, 0x1aee: 0xbaf9, 0x1aef: 0x1429,\n\t0x1af0: 0x1a31, 0x1af1: 0xbb11, 0x1af2: 0xbb29, 0x1af3: 0xbb41, 0x1af4: 0xbb59, 0x1af5: 0xbb71,\n\t0x1af6: 0xbb89, 0x1af7: 0x2109, 0x1af8: 0x1111, 0x1af9: 0x1429, 0x1afa: 0xbba1, 0x1afb: 0xbbb9,\n\t0x1afc: 0xbbd1, 0x1afd: 0x10e1, 0x1afe: 0x10f9, 0x1aff: 0xbbe9,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x2079, 0x1b01: 0xbc01, 0x1b02: 0xbab1, 0x1b03: 0x1099, 0x1b04: 0x10b1, 0x1b05: 0x10c9,\n\t0x1b06: 0xbac9, 0x1b07: 0xbae1, 0x1b08: 0xbaf9, 0x1b09: 0x1429, 0x1b0a: 0x1a31, 0x1b0b: 0xbb11,\n\t0x1b0c: 0xbb29, 0x1b0d: 0xbb41, 0x1b0e: 0xbb59, 0x1b0f: 0xbb71, 0x1b10: 0xbb89, 0x1b11: 0x2109,\n\t0x1b12: 0x1111, 0x1b13: 0xbba1, 0x1b14: 0xbba1, 0x1b15: 0xbbb9, 0x1b16: 0xbbd1, 0x1b17: 0x10e1,\n\t0x1b18: 0x10f9, 0x1b19: 0xbbe9, 0x1b1a: 0x2079, 0x1b1b: 0xbc21, 0x1b1c: 0xbac9, 0x1b1d: 0x1429,\n\t0x1b1e: 0xbb11, 0x1b1f: 0x10e1, 0x1b20: 0x1111, 0x1b21: 0x2109, 0x1b22: 0xbab1, 0x1b23: 0x1099,\n\t0x1b24: 0x10b1, 0x1b25: 0x10c9, 0x1b26: 0xbac9, 0x1b27: 0xbae1, 0x1b28: 0xbaf9, 0x1b29: 0x1429,\n\t0x1b2a: 0x1a31, 0x1b2b: 0xbb11, 0x1b2c: 0xbb29, 0x1b2d: 0xbb41, 0x1b2e: 0xbb59, 0x1b2f: 0xbb71,\n\t0x1b30: 0xbb89, 0x1b31: 0x2109, 0x1b32: 0x1111, 0x1b33: 0x1429, 0x1b34: 0xbba1, 0x1b35: 0xbbb9,\n\t0x1b36: 0xbbd1, 0x1b37: 0x10e1, 0x1b38: 0x10f9, 0x1b39: 0xbbe9, 0x1b3a: 0x2079, 0x1b3b: 0xbc01,\n\t0x1b3c: 0xbab1, 0x1b3d: 0x1099, 0x1b3e: 0x10b1, 0x1b3f: 0x10c9,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0xbac9, 0x1b41: 0xbae1, 0x1b42: 0xbaf9, 0x1b43: 0x1429, 0x1b44: 0x1a31, 0x1b45: 0xbb11,\n\t0x1b46: 0xbb29, 0x1b47: 0xbb41, 0x1b48: 0xbb59, 0x1b49: 0xbb71, 0x1b4a: 0xbb89, 0x1b4b: 0x2109,\n\t0x1b4c: 0x1111, 0x1b4d: 0xbba1, 0x1b4e: 0xbba1, 0x1b4f: 0xbbb9, 0x1b50: 0xbbd1, 0x1b51: 0x10e1,\n\t0x1b52: 0x10f9, 0x1b53: 0xbbe9, 0x1b54: 0x2079, 0x1b55: 0xbc21, 0x1b56: 0xbac9, 0x1b57: 0x1429,\n\t0x1b58: 0xbb11, 0x1b59: 0x10e1, 0x1b5a: 0x1111, 0x1b5b: 0x2109, 0x1b5c: 0xbab1, 0x1b5d: 0x1099,\n\t0x1b5e: 0x10b1, 0x1b5f: 0x10c9, 0x1b60: 0xbac9, 0x1b61: 0xbae1, 0x1b62: 0xbaf9, 0x1b63: 0x1429,\n\t0x1b64: 0x1a31, 0x1b65: 0xbb11, 0x1b66: 0xbb29, 0x1b67: 0xbb41, 0x1b68: 0xbb59, 0x1b69: 0xbb71,\n\t0x1b6a: 0xbb89, 0x1b6b: 0x2109, 0x1b6c: 0x1111, 0x1b6d: 0x1429, 0x1b6e: 0xbba1, 0x1b6f: 0xbbb9,\n\t0x1b70: 0xbbd1, 0x1b71: 0x10e1, 0x1b72: 0x10f9, 0x1b73: 0xbbe9, 0x1b74: 0x2079, 0x1b75: 0xbc01,\n\t0x1b76: 0xbab1, 0x1b77: 0x1099, 0x1b78: 0x10b1, 0x1b79: 0x10c9, 0x1b7a: 0xbac9, 0x1b7b: 0xbae1,\n\t0x1b7c: 0xbaf9, 0x1b7d: 0x1429, 0x1b7e: 0x1a31, 0x1b7f: 0xbb11,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0xbb29, 0x1b81: 0xbb41, 0x1b82: 0xbb59, 0x1b83: 0xbb71, 0x1b84: 0xbb89, 0x1b85: 0x2109,\n\t0x1b86: 0x1111, 0x1b87: 0xbba1, 0x1b88: 0xbba1, 0x1b89: 0xbbb9, 0x1b8a: 0xbbd1, 0x1b8b: 0x10e1,\n\t0x1b8c: 0x10f9, 0x1b8d: 0xbbe9, 0x1b8e: 0x2079, 0x1b8f: 0xbc21, 0x1b90: 0xbac9, 0x1b91: 0x1429,\n\t0x1b92: 0xbb11, 0x1b93: 0x10e1, 0x1b94: 0x1111, 0x1b95: 0x2109, 0x1b96: 0xbab1, 0x1b97: 0x1099,\n\t0x1b98: 0x10b1, 0x1b99: 0x10c9, 0x1b9a: 0xbac9, 0x1b9b: 0xbae1, 0x1b9c: 0xbaf9, 0x1b9d: 0x1429,\n\t0x1b9e: 0x1a31, 0x1b9f: 0xbb11, 0x1ba0: 0xbb29, 0x1ba1: 0xbb41, 0x1ba2: 0xbb59, 0x1ba3: 0xbb71,\n\t0x1ba4: 0xbb89, 0x1ba5: 0x2109, 0x1ba6: 0x1111, 0x1ba7: 0x1429, 0x1ba8: 0xbba1, 0x1ba9: 0xbbb9,\n\t0x1baa: 0xbbd1, 0x1bab: 0x10e1, 0x1bac: 0x10f9, 0x1bad: 0xbbe9, 0x1bae: 0x2079, 0x1baf: 0xbc01,\n\t0x1bb0: 0xbab1, 0x1bb1: 0x1099, 0x1bb2: 0x10b1, 0x1bb3: 0x10c9, 0x1bb4: 0xbac9, 0x1bb5: 0xbae1,\n\t0x1bb6: 0xbaf9, 0x1bb7: 0x1429, 0x1bb8: 0x1a31, 0x1bb9: 0xbb11, 0x1bba: 0xbb29, 0x1bbb: 0xbb41,\n\t0x1bbc: 0xbb59, 0x1bbd: 0xbb71, 0x1bbe: 0xbb89, 0x1bbf: 0x2109,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x1111, 0x1bc1: 0xbba1, 0x1bc2: 0xbba1, 0x1bc3: 0xbbb9, 0x1bc4: 0xbbd1, 0x1bc5: 0x10e1,\n\t0x1bc6: 0x10f9, 0x1bc7: 0xbbe9, 0x1bc8: 0x2079, 0x1bc9: 0xbc21, 0x1bca: 0xbac9, 0x1bcb: 0x1429,\n\t0x1bcc: 0xbb11, 0x1bcd: 0x10e1, 0x1bce: 0x1111, 0x1bcf: 0x2109, 0x1bd0: 0xbab1, 0x1bd1: 0x1099,\n\t0x1bd2: 0x10b1, 0x1bd3: 0x10c9, 0x1bd4: 0xbac9, 0x1bd5: 0xbae1, 0x1bd6: 0xbaf9, 0x1bd7: 0x1429,\n\t0x1bd8: 0x1a31, 0x1bd9: 0xbb11, 0x1bda: 0xbb29, 0x1bdb: 0xbb41, 0x1bdc: 0xbb59, 0x1bdd: 0xbb71,\n\t0x1bde: 0xbb89, 0x1bdf: 0x2109, 0x1be0: 0x1111, 0x1be1: 0x1429, 0x1be2: 0xbba1, 0x1be3: 0xbbb9,\n\t0x1be4: 0xbbd1, 0x1be5: 0x10e1, 0x1be6: 0x10f9, 0x1be7: 0xbbe9, 0x1be8: 0x2079, 0x1be9: 0xbc01,\n\t0x1bea: 0xbab1, 0x1beb: 0x1099, 0x1bec: 0x10b1, 0x1bed: 0x10c9, 0x1bee: 0xbac9, 0x1bef: 0xbae1,\n\t0x1bf0: 0xbaf9, 0x1bf1: 0x1429, 0x1bf2: 0x1a31, 0x1bf3: 0xbb11, 0x1bf4: 0xbb29, 0x1bf5: 0xbb41,\n\t0x1bf6: 0xbb59, 0x1bf7: 0xbb71, 0x1bf8: 0xbb89, 0x1bf9: 0x2109, 0x1bfa: 0x1111, 0x1bfb: 0xbba1,\n\t0x1bfc: 0xbba1, 0x1bfd: 0xbbb9, 0x1bfe: 0xbbd1, 0x1bff: 0x10e1,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0x10f9, 0x1c01: 0xbbe9, 0x1c02: 0x2079, 0x1c03: 0xbc21, 0x1c04: 0xbac9, 0x1c05: 0x1429,\n\t0x1c06: 0xbb11, 0x1c07: 0x10e1, 0x1c08: 0x1111, 0x1c09: 0x2109, 0x1c0a: 0xbc41, 0x1c0b: 0xbc41,\n\t0x1c0c: 0x0040, 0x1c0d: 0x0040, 0x1c0e: 0x1f41, 0x1c0f: 0x00c9, 0x1c10: 0x0069, 0x1c11: 0x0079,\n\t0x1c12: 0x1f51, 0x1c13: 0x1f61, 0x1c14: 0x1f71, 0x1c15: 0x1f81, 0x1c16: 0x1f91, 0x1c17: 0x1fa1,\n\t0x1c18: 0x1f41, 0x1c19: 0x00c9, 0x1c1a: 0x0069, 0x1c1b: 0x0079, 0x1c1c: 0x1f51, 0x1c1d: 0x1f61,\n\t0x1c1e: 0x1f71, 0x1c1f: 0x1f81, 0x1c20: 0x1f91, 0x1c21: 0x1fa1, 0x1c22: 0x1f41, 0x1c23: 0x00c9,\n\t0x1c24: 0x0069, 0x1c25: 0x0079, 0x1c26: 0x1f51, 0x1c27: 0x1f61, 0x1c28: 0x1f71, 0x1c29: 0x1f81,\n\t0x1c2a: 0x1f91, 0x1c2b: 0x1fa1, 0x1c2c: 0x1f41, 0x1c2d: 0x00c9, 0x1c2e: 0x0069, 0x1c2f: 0x0079,\n\t0x1c30: 0x1f51, 0x1c31: 0x1f61, 0x1c32: 0x1f71, 0x1c33: 0x1f81, 0x1c34: 0x1f91, 0x1c35: 0x1fa1,\n\t0x1c36: 0x1f41, 0x1c37: 0x00c9, 0x1c38: 0x0069, 0x1c39: 0x0079, 0x1c3a: 0x1f51, 0x1c3b: 0x1f61,\n\t0x1c3c: 0x1f71, 0x1c3d: 0x1f81, 0x1c3e: 0x1f91, 0x1c3f: 0x1fa1,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0xe115, 0x1c41: 0xe115, 0x1c42: 0xe135, 0x1c43: 0xe135, 0x1c44: 0xe115, 0x1c45: 0xe115,\n\t0x1c46: 0xe175, 0x1c47: 0xe175, 0x1c48: 0xe115, 0x1c49: 0xe115, 0x1c4a: 0xe135, 0x1c4b: 0xe135,\n\t0x1c4c: 0xe115, 0x1c4d: 0xe115, 0x1c4e: 0xe1f5, 0x1c4f: 0xe1f5, 0x1c50: 0xe115, 0x1c51: 0xe115,\n\t0x1c52: 0xe135, 0x1c53: 0xe135, 0x1c54: 0xe115, 0x1c55: 0xe115, 0x1c56: 0xe175, 0x1c57: 0xe175,\n\t0x1c58: 0xe115, 0x1c59: 0xe115, 0x1c5a: 0xe135, 0x1c5b: 0xe135, 0x1c5c: 0xe115, 0x1c5d: 0xe115,\n\t0x1c5e: 0x8b05, 0x1c5f: 0x8b05, 0x1c60: 0x04b5, 0x1c61: 0x04b5, 0x1c62: 0x0a08, 0x1c63: 0x0a08,\n\t0x1c64: 0x0a08, 0x1c65: 0x0a08, 0x1c66: 0x0a08, 0x1c67: 0x0a08, 0x1c68: 0x0a08, 0x1c69: 0x0a08,\n\t0x1c6a: 0x0a08, 0x1c6b: 0x0a08, 0x1c6c: 0x0a08, 0x1c6d: 0x0a08, 0x1c6e: 0x0a08, 0x1c6f: 0x0a08,\n\t0x1c70: 0x0a08, 0x1c71: 0x0a08, 0x1c72: 0x0a08, 0x1c73: 0x0a08, 0x1c74: 0x0a08, 0x1c75: 0x0a08,\n\t0x1c76: 0x0a08, 0x1c77: 0x0a08, 0x1c78: 0x0a08, 0x1c79: 0x0a08, 0x1c7a: 0x0a08, 0x1c7b: 0x0a08,\n\t0x1c7c: 0x0a08, 0x1c7d: 0x0a08, 0x1c7e: 0x0a08, 0x1c7f: 0x0a08,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0x0040, 0x1c85: 0xb411,\n\t0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0xb399, 0x1c8b: 0xb3b1,\n\t0x1c8c: 0xb3c9, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0xb369, 0x1c91: 0xb2d9,\n\t0x1c92: 0xb381, 0x1c93: 0xb279, 0x1c94: 0xb2c1, 0x1c95: 0xb1d1, 0x1c96: 0xb1e9, 0x1c97: 0xb231,\n\t0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0xbc59, 0x1c9d: 0x7949,\n\t0x1c9e: 0xbc71, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040,\n\t0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0x0040, 0x1ca9: 0xb429,\n\t0x1caa: 0xb399, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339,\n\t0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1,\n\t0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0x0040, 0x1cbb: 0xb351,\n\t0x1cbc: 0x0040, 0x1cbd: 0x0040, 0x1cbe: 0x0040, 0x1cbf: 0x0040,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x0040, 0x1cc1: 0x0040, 0x1cc2: 0xb201, 0x1cc3: 0x0040, 0x1cc4: 0x0040, 0x1cc5: 0x0040,\n\t0x1cc6: 0x0040, 0x1cc7: 0xb219, 0x1cc8: 0x0040, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1,\n\t0x1ccc: 0x0040, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0x0040, 0x1cd1: 0xb2d9,\n\t0x1cd2: 0xb381, 0x1cd3: 0x0040, 0x1cd4: 0xb2c1, 0x1cd5: 0x0040, 0x1cd6: 0x0040, 0x1cd7: 0xb231,\n\t0x1cd8: 0x0040, 0x1cd9: 0xb2f1, 0x1cda: 0x0040, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x7949,\n\t0x1cde: 0x0040, 0x1cdf: 0xbc89, 0x1ce0: 0x0040, 0x1ce1: 0xb1a1, 0x1ce2: 0xb201, 0x1ce3: 0x0040,\n\t0x1ce4: 0xb3f9, 0x1ce5: 0x0040, 0x1ce6: 0x0040, 0x1ce7: 0xb219, 0x1ce8: 0xb309, 0x1ce9: 0xb429,\n\t0x1cea: 0xb399, 0x1ceb: 0x0040, 0x1cec: 0xb3c9, 0x1ced: 0xb3e1, 0x1cee: 0xb2a9, 0x1cef: 0xb339,\n\t0x1cf0: 0xb369, 0x1cf1: 0xb2d9, 0x1cf2: 0xb381, 0x1cf3: 0x0040, 0x1cf4: 0xb2c1, 0x1cf5: 0xb1d1,\n\t0x1cf6: 0xb1e9, 0x1cf7: 0xb231, 0x1cf8: 0x0040, 0x1cf9: 0xb2f1, 0x1cfa: 0xb321, 0x1cfb: 0xb351,\n\t0x1cfc: 0xbc59, 0x1cfd: 0x0040, 0x1cfe: 0xbc71, 0x1cff: 0x0040,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0xb189, 0x1d01: 0xb1a1, 0x1d02: 0xb201, 0x1d03: 0xb249, 0x1d04: 0xb3f9, 0x1d05: 0xb411,\n\t0x1d06: 0xb291, 0x1d07: 0xb219, 0x1d08: 0xb309, 0x1d09: 0xb429, 0x1d0a: 0x0040, 0x1d0b: 0xb3b1,\n\t0x1d0c: 0xb3c9, 0x1d0d: 0xb3e1, 0x1d0e: 0xb2a9, 0x1d0f: 0xb339, 0x1d10: 0xb369, 0x1d11: 0xb2d9,\n\t0x1d12: 0xb381, 0x1d13: 0xb279, 0x1d14: 0xb2c1, 0x1d15: 0xb1d1, 0x1d16: 0xb1e9, 0x1d17: 0xb231,\n\t0x1d18: 0xb261, 0x1d19: 0xb2f1, 0x1d1a: 0xb321, 0x1d1b: 0xb351, 0x1d1c: 0x0040, 0x1d1d: 0x0040,\n\t0x1d1e: 0x0040, 0x1d1f: 0x0040, 0x1d20: 0x0040, 0x1d21: 0xb1a1, 0x1d22: 0xb201, 0x1d23: 0xb249,\n\t0x1d24: 0x0040, 0x1d25: 0xb411, 0x1d26: 0xb291, 0x1d27: 0xb219, 0x1d28: 0xb309, 0x1d29: 0xb429,\n\t0x1d2a: 0x0040, 0x1d2b: 0xb3b1, 0x1d2c: 0xb3c9, 0x1d2d: 0xb3e1, 0x1d2e: 0xb2a9, 0x1d2f: 0xb339,\n\t0x1d30: 0xb369, 0x1d31: 0xb2d9, 0x1d32: 0xb381, 0x1d33: 0xb279, 0x1d34: 0xb2c1, 0x1d35: 0xb1d1,\n\t0x1d36: 0xb1e9, 0x1d37: 0xb231, 0x1d38: 0xb261, 0x1d39: 0xb2f1, 0x1d3a: 0xb321, 0x1d3b: 0xb351,\n\t0x1d3c: 0x0040, 0x1d3d: 0x0040, 0x1d3e: 0x0040, 0x1d3f: 0x0040,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x0040, 0x1d41: 0xbca2, 0x1d42: 0xbcba, 0x1d43: 0xbcd2, 0x1d44: 0xbcea, 0x1d45: 0xbd02,\n\t0x1d46: 0xbd1a, 0x1d47: 0xbd32, 0x1d48: 0xbd4a, 0x1d49: 0xbd62, 0x1d4a: 0xbd7a, 0x1d4b: 0x0018,\n\t0x1d4c: 0x0018, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xbd92, 0x1d51: 0xbdb2,\n\t0x1d52: 0xbdd2, 0x1d53: 0xbdf2, 0x1d54: 0xbe12, 0x1d55: 0xbe32, 0x1d56: 0xbe52, 0x1d57: 0xbe72,\n\t0x1d58: 0xbe92, 0x1d59: 0xbeb2, 0x1d5a: 0xbed2, 0x1d5b: 0xbef2, 0x1d5c: 0xbf12, 0x1d5d: 0xbf32,\n\t0x1d5e: 0xbf52, 0x1d5f: 0xbf72, 0x1d60: 0xbf92, 0x1d61: 0xbfb2, 0x1d62: 0xbfd2, 0x1d63: 0xbff2,\n\t0x1d64: 0xc012, 0x1d65: 0xc032, 0x1d66: 0xc052, 0x1d67: 0xc072, 0x1d68: 0xc092, 0x1d69: 0xc0b2,\n\t0x1d6a: 0xc0d1, 0x1d6b: 0x1159, 0x1d6c: 0x0269, 0x1d6d: 0x6671, 0x1d6e: 0xc111, 0x1d6f: 0x0040,\n\t0x1d70: 0x0039, 0x1d71: 0x0ee9, 0x1d72: 0x1159, 0x1d73: 0x0ef9, 0x1d74: 0x0f09, 0x1d75: 0x1199,\n\t0x1d76: 0x0f31, 0x1d77: 0x0249, 0x1d78: 0x0f41, 0x1d79: 0x0259, 0x1d7a: 0x0f51, 0x1d7b: 0x0359,\n\t0x1d7c: 0x0f61, 0x1d7d: 0x0f71, 0x1d7e: 0x00d9, 0x1d7f: 0x0f99,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x2039, 0x1d81: 0x0269, 0x1d82: 0x01d9, 0x1d83: 0x0fa9, 0x1d84: 0x0fb9, 0x1d85: 0x1089,\n\t0x1d86: 0x0279, 0x1d87: 0x0369, 0x1d88: 0x0289, 0x1d89: 0x13d1, 0x1d8a: 0xc129, 0x1d8b: 0x65b1,\n\t0x1d8c: 0xc141, 0x1d8d: 0x1441, 0x1d8e: 0xc159, 0x1d8f: 0xc179, 0x1d90: 0x0018, 0x1d91: 0x0018,\n\t0x1d92: 0x0018, 0x1d93: 0x0018, 0x1d94: 0x0018, 0x1d95: 0x0018, 0x1d96: 0x0018, 0x1d97: 0x0018,\n\t0x1d98: 0x0018, 0x1d99: 0x0018, 0x1d9a: 0x0018, 0x1d9b: 0x0018, 0x1d9c: 0x0018, 0x1d9d: 0x0018,\n\t0x1d9e: 0x0018, 0x1d9f: 0x0018, 0x1da0: 0x0018, 0x1da1: 0x0018, 0x1da2: 0x0018, 0x1da3: 0x0018,\n\t0x1da4: 0x0018, 0x1da5: 0x0018, 0x1da6: 0x0018, 0x1da7: 0x0018, 0x1da8: 0x0018, 0x1da9: 0x0018,\n\t0x1daa: 0xc191, 0x1dab: 0xc1a9, 0x1dac: 0x0040, 0x1dad: 0x0040, 0x1dae: 0x0040, 0x1daf: 0x0040,\n\t0x1db0: 0x0018, 0x1db1: 0x0018, 0x1db2: 0x0018, 0x1db3: 0x0018, 0x1db4: 0x0018, 0x1db5: 0x0018,\n\t0x1db6: 0x0018, 0x1db7: 0x0018, 0x1db8: 0x0018, 0x1db9: 0x0018, 0x1dba: 0x0018, 0x1dbb: 0x0018,\n\t0x1dbc: 0x0018, 0x1dbd: 0x0018, 0x1dbe: 0x0018, 0x1dbf: 0x0018,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0xc1d9, 0x1dc1: 0xc211, 0x1dc2: 0xc249, 0x1dc3: 0x0040, 0x1dc4: 0x0040, 0x1dc5: 0x0040,\n\t0x1dc6: 0x0040, 0x1dc7: 0x0040, 0x1dc8: 0x0040, 0x1dc9: 0x0040, 0x1dca: 0x0040, 0x1dcb: 0x0040,\n\t0x1dcc: 0x0040, 0x1dcd: 0x0040, 0x1dce: 0x0040, 0x1dcf: 0x0040, 0x1dd0: 0xc269, 0x1dd1: 0xc289,\n\t0x1dd2: 0xc2a9, 0x1dd3: 0xc2c9, 0x1dd4: 0xc2e9, 0x1dd5: 0xc309, 0x1dd6: 0xc329, 0x1dd7: 0xc349,\n\t0x1dd8: 0xc369, 0x1dd9: 0xc389, 0x1dda: 0xc3a9, 0x1ddb: 0xc3c9, 0x1ddc: 0xc3e9, 0x1ddd: 0xc409,\n\t0x1dde: 0xc429, 0x1ddf: 0xc449, 0x1de0: 0xc469, 0x1de1: 0xc489, 0x1de2: 0xc4a9, 0x1de3: 0xc4c9,\n\t0x1de4: 0xc4e9, 0x1de5: 0xc509, 0x1de6: 0xc529, 0x1de7: 0xc549, 0x1de8: 0xc569, 0x1de9: 0xc589,\n\t0x1dea: 0xc5a9, 0x1deb: 0xc5c9, 0x1dec: 0xc5e9, 0x1ded: 0xc609, 0x1dee: 0xc629, 0x1def: 0xc649,\n\t0x1df0: 0xc669, 0x1df1: 0xc689, 0x1df2: 0xc6a9, 0x1df3: 0xc6c9, 0x1df4: 0xc6e9, 0x1df5: 0xc709,\n\t0x1df6: 0xc729, 0x1df7: 0xc749, 0x1df8: 0xc769, 0x1df9: 0xc789, 0x1dfa: 0xc7a9, 0x1dfb: 0xc7c9,\n\t0x1dfc: 0x0040, 0x1dfd: 0x0040, 0x1dfe: 0x0040, 0x1dff: 0x0040,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0xcaf9, 0x1e01: 0xcb19, 0x1e02: 0xcb39, 0x1e03: 0x8b1d, 0x1e04: 0xcb59, 0x1e05: 0xcb79,\n\t0x1e06: 0xcb99, 0x1e07: 0xcbb9, 0x1e08: 0xcbd9, 0x1e09: 0xcbf9, 0x1e0a: 0xcc19, 0x1e0b: 0xcc39,\n\t0x1e0c: 0xcc59, 0x1e0d: 0x8b3d, 0x1e0e: 0xcc79, 0x1e0f: 0xcc99, 0x1e10: 0xccb9, 0x1e11: 0xccd9,\n\t0x1e12: 0x8b5d, 0x1e13: 0xccf9, 0x1e14: 0xcd19, 0x1e15: 0xc429, 0x1e16: 0x8b7d, 0x1e17: 0xcd39,\n\t0x1e18: 0xcd59, 0x1e19: 0xcd79, 0x1e1a: 0xcd99, 0x1e1b: 0xcdb9, 0x1e1c: 0x8b9d, 0x1e1d: 0xcdd9,\n\t0x1e1e: 0xcdf9, 0x1e1f: 0xce19, 0x1e20: 0xce39, 0x1e21: 0xce59, 0x1e22: 0xc789, 0x1e23: 0xce79,\n\t0x1e24: 0xce99, 0x1e25: 0xceb9, 0x1e26: 0xced9, 0x1e27: 0xcef9, 0x1e28: 0xcf19, 0x1e29: 0xcf39,\n\t0x1e2a: 0xcf59, 0x1e2b: 0xcf79, 0x1e2c: 0xcf99, 0x1e2d: 0xcfb9, 0x1e2e: 0xcfd9, 0x1e2f: 0xcff9,\n\t0x1e30: 0xd019, 0x1e31: 0xd039, 0x1e32: 0xd039, 0x1e33: 0xd039, 0x1e34: 0x8bbd, 0x1e35: 0xd059,\n\t0x1e36: 0xd079, 0x1e37: 0xd099, 0x1e38: 0x8bdd, 0x1e39: 0xd0b9, 0x1e3a: 0xd0d9, 0x1e3b: 0xd0f9,\n\t0x1e3c: 0xd119, 0x1e3d: 0xd139, 0x1e3e: 0xd159, 0x1e3f: 0xd179,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0xd199, 0x1e41: 0xd1b9, 0x1e42: 0xd1d9, 0x1e43: 0xd1f9, 0x1e44: 0xd219, 0x1e45: 0xd239,\n\t0x1e46: 0xd239, 0x1e47: 0xd259, 0x1e48: 0xd279, 0x1e49: 0xd299, 0x1e4a: 0xd2b9, 0x1e4b: 0xd2d9,\n\t0x1e4c: 0xd2f9, 0x1e4d: 0xd319, 0x1e4e: 0xd339, 0x1e4f: 0xd359, 0x1e50: 0xd379, 0x1e51: 0xd399,\n\t0x1e52: 0xd3b9, 0x1e53: 0xd3d9, 0x1e54: 0xd3f9, 0x1e55: 0xd419, 0x1e56: 0xd439, 0x1e57: 0xd459,\n\t0x1e58: 0xd479, 0x1e59: 0x8bfd, 0x1e5a: 0xd499, 0x1e5b: 0xd4b9, 0x1e5c: 0xd4d9, 0x1e5d: 0xc309,\n\t0x1e5e: 0xd4f9, 0x1e5f: 0xd519, 0x1e60: 0x8c1d, 0x1e61: 0x8c3d, 0x1e62: 0xd539, 0x1e63: 0xd559,\n\t0x1e64: 0xd579, 0x1e65: 0xd599, 0x1e66: 0xd5b9, 0x1e67: 0xd5d9, 0x1e68: 0x2040, 0x1e69: 0xd5f9,\n\t0x1e6a: 0xd619, 0x1e6b: 0xd619, 0x1e6c: 0x8c5d, 0x1e6d: 0xd639, 0x1e6e: 0xd659, 0x1e6f: 0xd679,\n\t0x1e70: 0xd699, 0x1e71: 0x8c7d, 0x1e72: 0xd6b9, 0x1e73: 0xd6d9, 0x1e74: 0x2040, 0x1e75: 0xd6f9,\n\t0x1e76: 0xd719, 0x1e77: 0xd739, 0x1e78: 0xd759, 0x1e79: 0xd779, 0x1e7a: 0xd799, 0x1e7b: 0x8c9d,\n\t0x1e7c: 0xd7b9, 0x1e7d: 0x8cbd, 0x1e7e: 0xd7d9, 0x1e7f: 0xd7f9,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0xd819, 0x1e81: 0xd839, 0x1e82: 0xd859, 0x1e83: 0xd879, 0x1e84: 0xd899, 0x1e85: 0xd8b9,\n\t0x1e86: 0xd8d9, 0x1e87: 0xd8f9, 0x1e88: 0xd919, 0x1e89: 0x8cdd, 0x1e8a: 0xd939, 0x1e8b: 0xd959,\n\t0x1e8c: 0xd979, 0x1e8d: 0xd999, 0x1e8e: 0xd9b9, 0x1e8f: 0x8cfd, 0x1e90: 0xd9d9, 0x1e91: 0x8d1d,\n\t0x1e92: 0x8d3d, 0x1e93: 0xd9f9, 0x1e94: 0xda19, 0x1e95: 0xda19, 0x1e96: 0xda39, 0x1e97: 0x8d5d,\n\t0x1e98: 0x8d7d, 0x1e99: 0xda59, 0x1e9a: 0xda79, 0x1e9b: 0xda99, 0x1e9c: 0xdab9, 0x1e9d: 0xdad9,\n\t0x1e9e: 0xdaf9, 0x1e9f: 0xdb19, 0x1ea0: 0xdb39, 0x1ea1: 0xdb59, 0x1ea2: 0xdb79, 0x1ea3: 0xdb99,\n\t0x1ea4: 0x8d9d, 0x1ea5: 0xdbb9, 0x1ea6: 0xdbd9, 0x1ea7: 0xdbf9, 0x1ea8: 0xdc19, 0x1ea9: 0xdbf9,\n\t0x1eaa: 0xdc39, 0x1eab: 0xdc59, 0x1eac: 0xdc79, 0x1ead: 0xdc99, 0x1eae: 0xdcb9, 0x1eaf: 0xdcd9,\n\t0x1eb0: 0xdcf9, 0x1eb1: 0xdd19, 0x1eb2: 0xdd39, 0x1eb3: 0xdd59, 0x1eb4: 0xdd79, 0x1eb5: 0xdd99,\n\t0x1eb6: 0xddb9, 0x1eb7: 0xddd9, 0x1eb8: 0x8dbd, 0x1eb9: 0xddf9, 0x1eba: 0xde19, 0x1ebb: 0xde39,\n\t0x1ebc: 0xde59, 0x1ebd: 0xde79, 0x1ebe: 0x8ddd, 0x1ebf: 0xde99,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0xe599, 0x1ec1: 0xe5b9, 0x1ec2: 0xe5d9, 0x1ec3: 0xe5f9, 0x1ec4: 0xe619, 0x1ec5: 0xe639,\n\t0x1ec6: 0x8efd, 0x1ec7: 0xe659, 0x1ec8: 0xe679, 0x1ec9: 0xe699, 0x1eca: 0xe6b9, 0x1ecb: 0xe6d9,\n\t0x1ecc: 0xe6f9, 0x1ecd: 0x8f1d, 0x1ece: 0xe719, 0x1ecf: 0xe739, 0x1ed0: 0x8f3d, 0x1ed1: 0x8f5d,\n\t0x1ed2: 0xe759, 0x1ed3: 0xe779, 0x1ed4: 0xe799, 0x1ed5: 0xe7b9, 0x1ed6: 0xe7d9, 0x1ed7: 0xe7f9,\n\t0x1ed8: 0xe819, 0x1ed9: 0xe839, 0x1eda: 0xe859, 0x1edb: 0x8f7d, 0x1edc: 0xe879, 0x1edd: 0x8f9d,\n\t0x1ede: 0xe899, 0x1edf: 0x2040, 0x1ee0: 0xe8b9, 0x1ee1: 0xe8d9, 0x1ee2: 0xe8f9, 0x1ee3: 0x8fbd,\n\t0x1ee4: 0xe919, 0x1ee5: 0xe939, 0x1ee6: 0x8fdd, 0x1ee7: 0x8ffd, 0x1ee8: 0xe959, 0x1ee9: 0xe979,\n\t0x1eea: 0xe999, 0x1eeb: 0xe9b9, 0x1eec: 0xe9d9, 0x1eed: 0xe9d9, 0x1eee: 0xe9f9, 0x1eef: 0xea19,\n\t0x1ef0: 0xea39, 0x1ef1: 0xea59, 0x1ef2: 0xea79, 0x1ef3: 0xea99, 0x1ef4: 0xeab9, 0x1ef5: 0x901d,\n\t0x1ef6: 0xead9, 0x1ef7: 0x903d, 0x1ef8: 0xeaf9, 0x1ef9: 0x905d, 0x1efa: 0xeb19, 0x1efb: 0x907d,\n\t0x1efc: 0x909d, 0x1efd: 0x90bd, 0x1efe: 0xeb39, 0x1eff: 0xeb59,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0xeb79, 0x1f01: 0x90dd, 0x1f02: 0x90fd, 0x1f03: 0x911d, 0x1f04: 0x913d, 0x1f05: 0xeb99,\n\t0x1f06: 0xebb9, 0x1f07: 0xebb9, 0x1f08: 0xebd9, 0x1f09: 0xebf9, 0x1f0a: 0xec19, 0x1f0b: 0xec39,\n\t0x1f0c: 0xec59, 0x1f0d: 0x915d, 0x1f0e: 0xec79, 0x1f0f: 0xec99, 0x1f10: 0xecb9, 0x1f11: 0xecd9,\n\t0x1f12: 0x917d, 0x1f13: 0xecf9, 0x1f14: 0x919d, 0x1f15: 0x91bd, 0x1f16: 0xed19, 0x1f17: 0xed39,\n\t0x1f18: 0xed59, 0x1f19: 0xed79, 0x1f1a: 0xed99, 0x1f1b: 0xedb9, 0x1f1c: 0x91dd, 0x1f1d: 0x91fd,\n\t0x1f1e: 0x921d, 0x1f1f: 0x2040, 0x1f20: 0xedd9, 0x1f21: 0x923d, 0x1f22: 0xedf9, 0x1f23: 0xee19,\n\t0x1f24: 0xee39, 0x1f25: 0x925d, 0x1f26: 0xee59, 0x1f27: 0xee79, 0x1f28: 0xee99, 0x1f29: 0xeeb9,\n\t0x1f2a: 0xeed9, 0x1f2b: 0x927d, 0x1f2c: 0xeef9, 0x1f2d: 0xef19, 0x1f2e: 0xef39, 0x1f2f: 0xef59,\n\t0x1f30: 0xef79, 0x1f31: 0xef99, 0x1f32: 0x929d, 0x1f33: 0x92bd, 0x1f34: 0xefb9, 0x1f35: 0x92dd,\n\t0x1f36: 0xefd9, 0x1f37: 0x92fd, 0x1f38: 0xeff9, 0x1f39: 0xf019, 0x1f3a: 0xf039, 0x1f3b: 0x931d,\n\t0x1f3c: 0x933d, 0x1f3d: 0xf059, 0x1f3e: 0x935d, 0x1f3f: 0xf079,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0xf6b9, 0x1f41: 0xf6d9, 0x1f42: 0xf6f9, 0x1f43: 0xf719, 0x1f44: 0xf739, 0x1f45: 0x951d,\n\t0x1f46: 0xf759, 0x1f47: 0xf779, 0x1f48: 0xf799, 0x1f49: 0xf7b9, 0x1f4a: 0xf7d9, 0x1f4b: 0x953d,\n\t0x1f4c: 0x955d, 0x1f4d: 0xf7f9, 0x1f4e: 0xf819, 0x1f4f: 0xf839, 0x1f50: 0xf859, 0x1f51: 0xf879,\n\t0x1f52: 0xf899, 0x1f53: 0x957d, 0x1f54: 0xf8b9, 0x1f55: 0xf8d9, 0x1f56: 0xf8f9, 0x1f57: 0xf919,\n\t0x1f58: 0x959d, 0x1f59: 0x95bd, 0x1f5a: 0xf939, 0x1f5b: 0xf959, 0x1f5c: 0xf979, 0x1f5d: 0x95dd,\n\t0x1f5e: 0xf999, 0x1f5f: 0xf9b9, 0x1f60: 0x6815, 0x1f61: 0x95fd, 0x1f62: 0xf9d9, 0x1f63: 0xf9f9,\n\t0x1f64: 0xfa19, 0x1f65: 0x961d, 0x1f66: 0xfa39, 0x1f67: 0xfa59, 0x1f68: 0xfa79, 0x1f69: 0xfa99,\n\t0x1f6a: 0xfab9, 0x1f6b: 0xfad9, 0x1f6c: 0xfaf9, 0x1f6d: 0x963d, 0x1f6e: 0xfb19, 0x1f6f: 0xfb39,\n\t0x1f70: 0xfb59, 0x1f71: 0x965d, 0x1f72: 0xfb79, 0x1f73: 0xfb99, 0x1f74: 0xfbb9, 0x1f75: 0xfbd9,\n\t0x1f76: 0x7b35, 0x1f77: 0x967d, 0x1f78: 0xfbf9, 0x1f79: 0xfc19, 0x1f7a: 0xfc39, 0x1f7b: 0x969d,\n\t0x1f7c: 0xfc59, 0x1f7d: 0x96bd, 0x1f7e: 0xfc79, 0x1f7f: 0xfc79,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0xfc99, 0x1f81: 0x96dd, 0x1f82: 0xfcb9, 0x1f83: 0xfcd9, 0x1f84: 0xfcf9, 0x1f85: 0xfd19,\n\t0x1f86: 0xfd39, 0x1f87: 0xfd59, 0x1f88: 0xfd79, 0x1f89: 0x96fd, 0x1f8a: 0xfd99, 0x1f8b: 0xfdb9,\n\t0x1f8c: 0xfdd9, 0x1f8d: 0xfdf9, 0x1f8e: 0xfe19, 0x1f8f: 0xfe39, 0x1f90: 0x971d, 0x1f91: 0xfe59,\n\t0x1f92: 0x973d, 0x1f93: 0x975d, 0x1f94: 0x977d, 0x1f95: 0xfe79, 0x1f96: 0xfe99, 0x1f97: 0xfeb9,\n\t0x1f98: 0xfed9, 0x1f99: 0xfef9, 0x1f9a: 0xff19, 0x1f9b: 0xff39, 0x1f9c: 0xff59, 0x1f9d: 0x979d,\n\t0x1f9e: 0x0040, 0x1f9f: 0x0040, 0x1fa0: 0x0040, 0x1fa1: 0x0040, 0x1fa2: 0x0040, 0x1fa3: 0x0040,\n\t0x1fa4: 0x0040, 0x1fa5: 0x0040, 0x1fa6: 0x0040, 0x1fa7: 0x0040, 0x1fa8: 0x0040, 0x1fa9: 0x0040,\n\t0x1faa: 0x0040, 0x1fab: 0x0040, 0x1fac: 0x0040, 0x1fad: 0x0040, 0x1fae: 0x0040, 0x1faf: 0x0040,\n\t0x1fb0: 0x0040, 0x1fb1: 0x0040, 0x1fb2: 0x0040, 0x1fb3: 0x0040, 0x1fb4: 0x0040, 0x1fb5: 0x0040,\n\t0x1fb6: 0x0040, 0x1fb7: 0x0040, 0x1fb8: 0x0040, 0x1fb9: 0x0040, 0x1fba: 0x0040, 0x1fbb: 0x0040,\n\t0x1fbc: 0x0040, 0x1fbd: 0x0040, 0x1fbe: 0x0040, 0x1fbf: 0x0040,\n}\n\n// idnaIndex: 36 blocks, 2304 entries, 4608 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2304]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x7d, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x7e, 0xca: 0x7f, 0xcb: 0x07, 0xcc: 0x80, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x81, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x82, 0xd6: 0x83, 0xd7: 0x84,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x85, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x86, 0xde: 0x87, 0xdf: 0x88,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,\n\t0xf0: 0x1d, 0xf1: 0x1e, 0xf2: 0x1e, 0xf3: 0x20, 0xf4: 0x21,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x89, 0x121: 0x13, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16,\n\t0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8d,\n\t0x130: 0x8e, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x8f, 0x135: 0x21, 0x136: 0x90, 0x137: 0x91,\n\t0x138: 0x92, 0x139: 0x93, 0x13a: 0x22, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x96,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e,\n\t0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6,\n\t0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f,\n\t0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae,\n\t0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6,\n\t0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe,\n\t0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc3,\n\t0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc4, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc5, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc6, 0x187: 0x9b,\n\t0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0x9b,\n\t0x190: 0xca, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b,\n\t0x198: 0x9b, 0x199: 0x9b, 0x19a: 0x9b, 0x19b: 0x9b, 0x19c: 0x9b, 0x19d: 0x9b, 0x19e: 0x9b, 0x19f: 0x9b,\n\t0x1a0: 0x9b, 0x1a1: 0x9b, 0x1a2: 0x9b, 0x1a3: 0x9b, 0x1a4: 0x9b, 0x1a5: 0x9b, 0x1a6: 0x9b, 0x1a7: 0x9b,\n\t0x1a8: 0xcb, 0x1a9: 0xcc, 0x1aa: 0x9b, 0x1ab: 0xcd, 0x1ac: 0x9b, 0x1ad: 0xce, 0x1ae: 0xcf, 0x1af: 0xd0,\n\t0x1b0: 0xd1, 0x1b1: 0x35, 0x1b2: 0x28, 0x1b3: 0x36, 0x1b4: 0xd2, 0x1b5: 0xd3, 0x1b6: 0xd4, 0x1b7: 0xd5,\n\t0x1b8: 0xd6, 0x1b9: 0xd7, 0x1ba: 0xd8, 0x1bb: 0xd9, 0x1bc: 0xda, 0x1bd: 0xdb, 0x1be: 0xdc, 0x1bf: 0x37,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x38, 0x1c1: 0xdd, 0x1c2: 0xde, 0x1c3: 0xdf, 0x1c4: 0xe0, 0x1c5: 0x39, 0x1c6: 0x3a, 0x1c7: 0xe1,\n\t0x1c8: 0xe2, 0x1c9: 0x3b, 0x1ca: 0x3c, 0x1cb: 0x3d, 0x1cc: 0x3e, 0x1cd: 0x3f, 0x1ce: 0x40, 0x1cf: 0x41,\n\t0x1d0: 0x9f, 0x1d1: 0x9f, 0x1d2: 0x9f, 0x1d3: 0x9f, 0x1d4: 0x9f, 0x1d5: 0x9f, 0x1d6: 0x9f, 0x1d7: 0x9f,\n\t0x1d8: 0x9f, 0x1d9: 0x9f, 0x1da: 0x9f, 0x1db: 0x9f, 0x1dc: 0x9f, 0x1dd: 0x9f, 0x1de: 0x9f, 0x1df: 0x9f,\n\t0x1e0: 0x9f, 0x1e1: 0x9f, 0x1e2: 0x9f, 0x1e3: 0x9f, 0x1e4: 0x9f, 0x1e5: 0x9f, 0x1e6: 0x9f, 0x1e7: 0x9f,\n\t0x1e8: 0x9f, 0x1e9: 0x9f, 0x1ea: 0x9f, 0x1eb: 0x9f, 0x1ec: 0x9f, 0x1ed: 0x9f, 0x1ee: 0x9f, 0x1ef: 0x9f,\n\t0x1f0: 0x9f, 0x1f1: 0x9f, 0x1f2: 0x9f, 0x1f3: 0x9f, 0x1f4: 0x9f, 0x1f5: 0x9f, 0x1f6: 0x9f, 0x1f7: 0x9f,\n\t0x1f8: 0x9f, 0x1f9: 0x9f, 0x1fa: 0x9f, 0x1fb: 0x9f, 0x1fc: 0x9f, 0x1fd: 0x9f, 0x1fe: 0x9f, 0x1ff: 0x9f,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9f, 0x201: 0x9f, 0x202: 0x9f, 0x203: 0x9f, 0x204: 0x9f, 0x205: 0x9f, 0x206: 0x9f, 0x207: 0x9f,\n\t0x208: 0x9f, 0x209: 0x9f, 0x20a: 0x9f, 0x20b: 0x9f, 0x20c: 0x9f, 0x20d: 0x9f, 0x20e: 0x9f, 0x20f: 0x9f,\n\t0x210: 0x9f, 0x211: 0x9f, 0x212: 0x9f, 0x213: 0x9f, 0x214: 0x9f, 0x215: 0x9f, 0x216: 0x9f, 0x217: 0x9f,\n\t0x218: 0x9f, 0x219: 0x9f, 0x21a: 0x9f, 0x21b: 0x9f, 0x21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f,\n\t0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f,\n\t0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f,\n\t0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b,\n\t0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f,\n\t0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f,\n\t0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f,\n\t0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f,\n\t0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f,\n\t0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f,\n\t0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f,\n\t0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f,\n\t0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f,\n\t0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f,\n\t0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f,\n\t0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f, 0x2a4: 0x9f, 0x2a5: 0x9f, 0x2a6: 0x9f, 0x2a7: 0x9f,\n\t0x2a8: 0x9f, 0x2a9: 0x9f, 0x2aa: 0x9f, 0x2ab: 0x9f, 0x2ac: 0x9f, 0x2ad: 0x9f, 0x2ae: 0x9f, 0x2af: 0x9f,\n\t0x2b0: 0x9f, 0x2b1: 0x9f, 0x2b2: 0x9f, 0x2b3: 0x9f, 0x2b4: 0x9f, 0x2b5: 0x9f, 0x2b6: 0x9f, 0x2b7: 0x9f,\n\t0x2b8: 0x9f, 0x2b9: 0x9f, 0x2ba: 0x9f, 0x2bb: 0x9f, 0x2bc: 0x9f, 0x2bd: 0x9f, 0x2be: 0x9f, 0x2bf: 0xe3,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x9f, 0x2c1: 0x9f, 0x2c2: 0x9f, 0x2c3: 0x9f, 0x2c4: 0x9f, 0x2c5: 0x9f, 0x2c6: 0x9f, 0x2c7: 0x9f,\n\t0x2c8: 0x9f, 0x2c9: 0x9f, 0x2ca: 0x9f, 0x2cb: 0x9f, 0x2cc: 0x9f, 0x2cd: 0x9f, 0x2ce: 0x9f, 0x2cf: 0x9f,\n\t0x2d0: 0x9f, 0x2d1: 0x9f, 0x2d2: 0xe4, 0x2d3: 0xe5, 0x2d4: 0x9f, 0x2d5: 0x9f, 0x2d6: 0x9f, 0x2d7: 0x9f,\n\t0x2d8: 0xe6, 0x2d9: 0x42, 0x2da: 0x43, 0x2db: 0xe7, 0x2dc: 0x44, 0x2dd: 0x45, 0x2de: 0x46, 0x2df: 0xe8,\n\t0x2e0: 0xe9, 0x2e1: 0xea, 0x2e2: 0xeb, 0x2e3: 0xec, 0x2e4: 0xed, 0x2e5: 0xee, 0x2e6: 0xef, 0x2e7: 0xf0,\n\t0x2e8: 0xf1, 0x2e9: 0xf2, 0x2ea: 0xf3, 0x2eb: 0xf4, 0x2ec: 0xf5, 0x2ed: 0xf6, 0x2ee: 0xf7, 0x2ef: 0xf8,\n\t0x2f0: 0x9f, 0x2f1: 0x9f, 0x2f2: 0x9f, 0x2f3: 0x9f, 0x2f4: 0x9f, 0x2f5: 0x9f, 0x2f6: 0x9f, 0x2f7: 0x9f,\n\t0x2f8: 0x9f, 0x2f9: 0x9f, 0x2fa: 0x9f, 0x2fb: 0x9f, 0x2fc: 0x9f, 0x2fd: 0x9f, 0x2fe: 0x9f, 0x2ff: 0x9f,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x9f, 0x301: 0x9f, 0x302: 0x9f, 0x303: 0x9f, 0x304: 0x9f, 0x305: 0x9f, 0x306: 0x9f, 0x307: 0x9f,\n\t0x308: 0x9f, 0x309: 0x9f, 0x30a: 0x9f, 0x30b: 0x9f, 0x30c: 0x9f, 0x30d: 0x9f, 0x30e: 0x9f, 0x30f: 0x9f,\n\t0x310: 0x9f, 0x311: 0x9f, 0x312: 0x9f, 0x313: 0x9f, 0x314: 0x9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f,\n\t0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xf9, 0x31f: 0xfa,\n\t// Block 0xd, offset 0x340\n\t0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba,\n\t0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba,\n\t0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba,\n\t0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba,\n\t0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba,\n\t0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba,\n\t0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba,\n\t0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba,\n\t0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba,\n\t0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba,\n\t0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba,\n\t0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfb, 0x3a5: 0xfc, 0x3a6: 0xfd, 0x3a7: 0xfe,\n\t0x3a8: 0x47, 0x3a9: 0xff, 0x3aa: 0x100, 0x3ab: 0x48, 0x3ac: 0x49, 0x3ad: 0x4a, 0x3ae: 0x4b, 0x3af: 0x4c,\n\t0x3b0: 0x101, 0x3b1: 0x4d, 0x3b2: 0x4e, 0x3b3: 0x4f, 0x3b4: 0x50, 0x3b5: 0x51, 0x3b6: 0x102, 0x3b7: 0x52,\n\t0x3b8: 0x53, 0x3b9: 0x54, 0x3ba: 0x55, 0x3bb: 0x56, 0x3bc: 0x57, 0x3bd: 0x58, 0x3be: 0x59, 0x3bf: 0x5a,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x103, 0x3c1: 0x104, 0x3c2: 0x9f, 0x3c3: 0x105, 0x3c4: 0x106, 0x3c5: 0x9b, 0x3c6: 0x107, 0x3c7: 0x108,\n\t0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x109, 0x3cb: 0x10a, 0x3cc: 0x10b, 0x3cd: 0x10c, 0x3ce: 0x10d, 0x3cf: 0x10e,\n\t0x3d0: 0x10f, 0x3d1: 0x9f, 0x3d2: 0x110, 0x3d3: 0x111, 0x3d4: 0x112, 0x3d5: 0x113, 0x3d6: 0xba, 0x3d7: 0xba,\n\t0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x114, 0x3dd: 0x115, 0x3de: 0xba, 0x3df: 0xba,\n\t0x3e0: 0x116, 0x3e1: 0x117, 0x3e2: 0x118, 0x3e3: 0x119, 0x3e4: 0x11a, 0x3e5: 0xba, 0x3e6: 0x11b, 0x3e7: 0x11c,\n\t0x3e8: 0x11d, 0x3e9: 0x11e, 0x3ea: 0x11f, 0x3eb: 0x5b, 0x3ec: 0x120, 0x3ed: 0x121, 0x3ee: 0x5c, 0x3ef: 0xba,\n\t0x3f0: 0x122, 0x3f1: 0x123, 0x3f2: 0x124, 0x3f3: 0x125, 0x3f4: 0xba, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba,\n\t0x3f8: 0xba, 0x3f9: 0x126, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0xba, 0x3fd: 0xba, 0x3fe: 0xba, 0x3ff: 0xba,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x127, 0x401: 0x128, 0x402: 0x129, 0x403: 0x12a, 0x404: 0x12b, 0x405: 0x12c, 0x406: 0x12d, 0x407: 0x12e,\n\t0x408: 0x12f, 0x409: 0xba, 0x40a: 0x130, 0x40b: 0x131, 0x40c: 0x5d, 0x40d: 0x5e, 0x40e: 0xba, 0x40f: 0xba,\n\t0x410: 0x132, 0x411: 0x133, 0x412: 0x134, 0x413: 0x135, 0x414: 0xba, 0x415: 0xba, 0x416: 0x136, 0x417: 0x137,\n\t0x418: 0x138, 0x419: 0x139, 0x41a: 0x13a, 0x41b: 0x13b, 0x41c: 0x13c, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba,\n\t0x420: 0xba, 0x421: 0xba, 0x422: 0x13d, 0x423: 0x13e, 0x424: 0xba, 0x425: 0xba, 0x426: 0xba, 0x427: 0xba,\n\t0x428: 0x13f, 0x429: 0x140, 0x42a: 0x141, 0x42b: 0x142, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba,\n\t0x430: 0x143, 0x431: 0x144, 0x432: 0x145, 0x433: 0xba, 0x434: 0x146, 0x435: 0x147, 0x436: 0xba, 0x437: 0xba,\n\t0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0xba, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0xba,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f,\n\t0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x148, 0x44f: 0xba,\n\t0x450: 0x9b, 0x451: 0x149, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x14a, 0x456: 0xba, 0x457: 0xba,\n\t0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba,\n\t0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba,\n\t0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba,\n\t0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba,\n\t0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f,\n\t0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f,\n\t0x490: 0x14b, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba,\n\t0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba,\n\t0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba,\n\t0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba,\n\t0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba,\n\t0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xba, 0x4c1: 0xba, 0x4c2: 0xba, 0x4c3: 0xba, 0x4c4: 0xba, 0x4c5: 0xba, 0x4c6: 0xba, 0x4c7: 0xba,\n\t0x4c8: 0xba, 0x4c9: 0xba, 0x4ca: 0xba, 0x4cb: 0xba, 0x4cc: 0xba, 0x4cd: 0xba, 0x4ce: 0xba, 0x4cf: 0xba,\n\t0x4d0: 0x9f, 0x4d1: 0x9f, 0x4d2: 0x9f, 0x4d3: 0x9f, 0x4d4: 0x9f, 0x4d5: 0x9f, 0x4d6: 0x9f, 0x4d7: 0x9f,\n\t0x4d8: 0x9f, 0x4d9: 0x14c, 0x4da: 0xba, 0x4db: 0xba, 0x4dc: 0xba, 0x4dd: 0xba, 0x4de: 0xba, 0x4df: 0xba,\n\t0x4e0: 0xba, 0x4e1: 0xba, 0x4e2: 0xba, 0x4e3: 0xba, 0x4e4: 0xba, 0x4e5: 0xba, 0x4e6: 0xba, 0x4e7: 0xba,\n\t0x4e8: 0xba, 0x4e9: 0xba, 0x4ea: 0xba, 0x4eb: 0xba, 0x4ec: 0xba, 0x4ed: 0xba, 0x4ee: 0xba, 0x4ef: 0xba,\n\t0x4f0: 0xba, 0x4f1: 0xba, 0x4f2: 0xba, 0x4f3: 0xba, 0x4f4: 0xba, 0x4f5: 0xba, 0x4f6: 0xba, 0x4f7: 0xba,\n\t0x4f8: 0xba, 0x4f9: 0xba, 0x4fa: 0xba, 0x4fb: 0xba, 0x4fc: 0xba, 0x4fd: 0xba, 0x4fe: 0xba, 0x4ff: 0xba,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xba, 0x501: 0xba, 0x502: 0xba, 0x503: 0xba, 0x504: 0xba, 0x505: 0xba, 0x506: 0xba, 0x507: 0xba,\n\t0x508: 0xba, 0x509: 0xba, 0x50a: 0xba, 0x50b: 0xba, 0x50c: 0xba, 0x50d: 0xba, 0x50e: 0xba, 0x50f: 0xba,\n\t0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba,\n\t0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba,\n\t0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f,\n\t0x528: 0x142, 0x529: 0x14d, 0x52a: 0xba, 0x52b: 0x14e, 0x52c: 0x14f, 0x52d: 0x150, 0x52e: 0x151, 0x52f: 0xba,\n\t0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba,\n\t0x538: 0xba, 0x539: 0xba, 0x53a: 0xba, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x152, 0x53e: 0x153, 0x53f: 0x154,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f,\n\t0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f,\n\t0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f,\n\t0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x155,\n\t0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f,\n\t0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x156, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba,\n\t0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba,\n\t0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x9f, 0x581: 0x9f, 0x582: 0x9f, 0x583: 0x9f, 0x584: 0x157, 0x585: 0x158, 0x586: 0x9f, 0x587: 0x9f,\n\t0x588: 0x9f, 0x589: 0x9f, 0x58a: 0x9f, 0x58b: 0x159, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba,\n\t0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba,\n\t0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba,\n\t0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba,\n\t0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba,\n\t0x5b0: 0x9f, 0x5b1: 0x15a, 0x5b2: 0x15b, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba,\n\t0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x9b, 0x5c1: 0x9b, 0x5c2: 0x9b, 0x5c3: 0x15c, 0x5c4: 0x15d, 0x5c5: 0x15e, 0x5c6: 0x15f, 0x5c7: 0x160,\n\t0x5c8: 0x9b, 0x5c9: 0x161, 0x5ca: 0xba, 0x5cb: 0xba, 0x5cc: 0x9b, 0x5cd: 0x162, 0x5ce: 0xba, 0x5cf: 0xba,\n\t0x5d0: 0x5f, 0x5d1: 0x60, 0x5d2: 0x61, 0x5d3: 0x62, 0x5d4: 0x63, 0x5d5: 0x64, 0x5d6: 0x65, 0x5d7: 0x66,\n\t0x5d8: 0x67, 0x5d9: 0x68, 0x5da: 0x69, 0x5db: 0x6a, 0x5dc: 0x6b, 0x5dd: 0x6c, 0x5de: 0x6d, 0x5df: 0x6e,\n\t0x5e0: 0x9b, 0x5e1: 0x9b, 0x5e2: 0x9b, 0x5e3: 0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b,\n\t0x5e8: 0x163, 0x5e9: 0x164, 0x5ea: 0x165, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba,\n\t0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba,\n\t0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x166, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0xba, 0x605: 0xba, 0x606: 0xba, 0x607: 0xba,\n\t0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0xba, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba,\n\t0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba,\n\t0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba,\n\t0x620: 0x122, 0x621: 0x122, 0x622: 0x122, 0x623: 0x167, 0x624: 0x6f, 0x625: 0x168, 0x626: 0xba, 0x627: 0xba,\n\t0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba,\n\t0x630: 0xba, 0x631: 0xba, 0x632: 0xba, 0x633: 0xba, 0x634: 0xba, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba,\n\t0x638: 0x70, 0x639: 0x71, 0x63a: 0x72, 0x63b: 0x169, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x16a, 0x641: 0x9b, 0x642: 0x16b, 0x643: 0x16c, 0x644: 0x73, 0x645: 0x74, 0x646: 0x16d, 0x647: 0x16e,\n\t0x648: 0x75, 0x649: 0x16f, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b,\n\t0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b,\n\t0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x170, 0x65c: 0x9b, 0x65d: 0x171, 0x65e: 0x9b, 0x65f: 0x172,\n\t0x660: 0x173, 0x661: 0x174, 0x662: 0x175, 0x663: 0xba, 0x664: 0x176, 0x665: 0x177, 0x666: 0x178, 0x667: 0x179,\n\t0x668: 0xba, 0x669: 0xba, 0x66a: 0xba, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba,\n\t0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba,\n\t0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f,\n\t0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f,\n\t0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f,\n\t0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x17a, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f,\n\t0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f,\n\t0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f,\n\t0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 0x9f, 0x6b6: 0x9f, 0x6b7: 0x9f,\n\t0x6b8: 0x9f, 0x6b9: 0x9f, 0x6ba: 0x9f, 0x6bb: 0x9f, 0x6bc: 0x9f, 0x6bd: 0x9f, 0x6be: 0x9f, 0x6bf: 0x9f,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x9f, 0x6c1: 0x9f, 0x6c2: 0x9f, 0x6c3: 0x9f, 0x6c4: 0x9f, 0x6c5: 0x9f, 0x6c6: 0x9f, 0x6c7: 0x9f,\n\t0x6c8: 0x9f, 0x6c9: 0x9f, 0x6ca: 0x9f, 0x6cb: 0x9f, 0x6cc: 0x9f, 0x6cd: 0x9f, 0x6ce: 0x9f, 0x6cf: 0x9f,\n\t0x6d0: 0x9f, 0x6d1: 0x9f, 0x6d2: 0x9f, 0x6d3: 0x9f, 0x6d4: 0x9f, 0x6d5: 0x9f, 0x6d6: 0x9f, 0x6d7: 0x9f,\n\t0x6d8: 0x9f, 0x6d9: 0x9f, 0x6da: 0x9f, 0x6db: 0x9f, 0x6dc: 0x17b, 0x6dd: 0x9f, 0x6de: 0x9f, 0x6df: 0x9f,\n\t0x6e0: 0x17c, 0x6e1: 0x9f, 0x6e2: 0x9f, 0x6e3: 0x9f, 0x6e4: 0x9f, 0x6e5: 0x9f, 0x6e6: 0x9f, 0x6e7: 0x9f,\n\t0x6e8: 0x9f, 0x6e9: 0x9f, 0x6ea: 0x9f, 0x6eb: 0x9f, 0x6ec: 0x9f, 0x6ed: 0x9f, 0x6ee: 0x9f, 0x6ef: 0x9f,\n\t0x6f0: 0x9f, 0x6f1: 0x9f, 0x6f2: 0x9f, 0x6f3: 0x9f, 0x6f4: 0x9f, 0x6f5: 0x9f, 0x6f6: 0x9f, 0x6f7: 0x9f,\n\t0x6f8: 0x9f, 0x6f9: 0x9f, 0x6fa: 0x9f, 0x6fb: 0x9f, 0x6fc: 0x9f, 0x6fd: 0x9f, 0x6fe: 0x9f, 0x6ff: 0x9f,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x9f, 0x701: 0x9f, 0x702: 0x9f, 0x703: 0x9f, 0x704: 0x9f, 0x705: 0x9f, 0x706: 0x9f, 0x707: 0x9f,\n\t0x708: 0x9f, 0x709: 0x9f, 0x70a: 0x9f, 0x70b: 0x9f, 0x70c: 0x9f, 0x70d: 0x9f, 0x70e: 0x9f, 0x70f: 0x9f,\n\t0x710: 0x9f, 0x711: 0x9f, 0x712: 0x9f, 0x713: 0x9f, 0x714: 0x9f, 0x715: 0x9f, 0x716: 0x9f, 0x717: 0x9f,\n\t0x718: 0x9f, 0x719: 0x9f, 0x71a: 0x9f, 0x71b: 0x9f, 0x71c: 0x9f, 0x71d: 0x9f, 0x71e: 0x9f, 0x71f: 0x9f,\n\t0x720: 0x9f, 0x721: 0x9f, 0x722: 0x9f, 0x723: 0x9f, 0x724: 0x9f, 0x725: 0x9f, 0x726: 0x9f, 0x727: 0x9f,\n\t0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f,\n\t0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f,\n\t0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x17d, 0x73b: 0x9f, 0x73c: 0x9f, 0x73d: 0x9f, 0x73e: 0x9f, 0x73f: 0x9f,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x9f, 0x741: 0x9f, 0x742: 0x9f, 0x743: 0x9f, 0x744: 0x9f, 0x745: 0x9f, 0x746: 0x9f, 0x747: 0x9f,\n\t0x748: 0x9f, 0x749: 0x9f, 0x74a: 0x9f, 0x74b: 0x9f, 0x74c: 0x9f, 0x74d: 0x9f, 0x74e: 0x9f, 0x74f: 0x9f,\n\t0x750: 0x9f, 0x751: 0x9f, 0x752: 0x9f, 0x753: 0x9f, 0x754: 0x9f, 0x755: 0x9f, 0x756: 0x9f, 0x757: 0x9f,\n\t0x758: 0x9f, 0x759: 0x9f, 0x75a: 0x9f, 0x75b: 0x9f, 0x75c: 0x9f, 0x75d: 0x9f, 0x75e: 0x9f, 0x75f: 0x9f,\n\t0x760: 0x9f, 0x761: 0x9f, 0x762: 0x9f, 0x763: 0x9f, 0x764: 0x9f, 0x765: 0x9f, 0x766: 0x9f, 0x767: 0x9f,\n\t0x768: 0x9f, 0x769: 0x9f, 0x76a: 0x9f, 0x76b: 0x9f, 0x76c: 0x9f, 0x76d: 0x9f, 0x76e: 0x9f, 0x76f: 0x17e,\n\t0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba,\n\t0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0xba, 0x781: 0xba, 0x782: 0xba, 0x783: 0xba, 0x784: 0xba, 0x785: 0xba, 0x786: 0xba, 0x787: 0xba,\n\t0x788: 0xba, 0x789: 0xba, 0x78a: 0xba, 0x78b: 0xba, 0x78c: 0xba, 0x78d: 0xba, 0x78e: 0xba, 0x78f: 0xba,\n\t0x790: 0xba, 0x791: 0xba, 0x792: 0xba, 0x793: 0xba, 0x794: 0xba, 0x795: 0xba, 0x796: 0xba, 0x797: 0xba,\n\t0x798: 0xba, 0x799: 0xba, 0x79a: 0xba, 0x79b: 0xba, 0x79c: 0xba, 0x79d: 0xba, 0x79e: 0xba, 0x79f: 0xba,\n\t0x7a0: 0x76, 0x7a1: 0x77, 0x7a2: 0x78, 0x7a3: 0x17f, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x180, 0x7a7: 0x7b,\n\t0x7a8: 0x7c, 0x7a9: 0xba, 0x7aa: 0xba, 0x7ab: 0xba, 0x7ac: 0xba, 0x7ad: 0xba, 0x7ae: 0xba, 0x7af: 0xba,\n\t0x7b0: 0xba, 0x7b1: 0xba, 0x7b2: 0xba, 0x7b3: 0xba, 0x7b4: 0xba, 0x7b5: 0xba, 0x7b6: 0xba, 0x7b7: 0xba,\n\t0x7b8: 0xba, 0x7b9: 0xba, 0x7ba: 0xba, 0x7bb: 0xba, 0x7bc: 0xba, 0x7bd: 0xba, 0x7be: 0xba, 0x7bf: 0xba,\n\t// Block 0x1f, offset 0x7c0\n\t0x7d0: 0x0d, 0x7d1: 0x0e, 0x7d2: 0x0f, 0x7d3: 0x10, 0x7d4: 0x11, 0x7d5: 0x0b, 0x7d6: 0x12, 0x7d7: 0x07,\n\t0x7d8: 0x13, 0x7d9: 0x0b, 0x7da: 0x0b, 0x7db: 0x14, 0x7dc: 0x0b, 0x7dd: 0x15, 0x7de: 0x16, 0x7df: 0x17,\n\t0x7e0: 0x07, 0x7e1: 0x07, 0x7e2: 0x07, 0x7e3: 0x07, 0x7e4: 0x07, 0x7e5: 0x07, 0x7e6: 0x07, 0x7e7: 0x07,\n\t0x7e8: 0x07, 0x7e9: 0x07, 0x7ea: 0x18, 0x7eb: 0x19, 0x7ec: 0x1a, 0x7ed: 0x07, 0x7ee: 0x1b, 0x7ef: 0x1c,\n\t0x7f0: 0x0b, 0x7f1: 0x0b, 0x7f2: 0x0b, 0x7f3: 0x0b, 0x7f4: 0x0b, 0x7f5: 0x0b, 0x7f6: 0x0b, 0x7f7: 0x0b,\n\t0x7f8: 0x0b, 0x7f9: 0x0b, 0x7fa: 0x0b, 0x7fb: 0x0b, 0x7fc: 0x0b, 0x7fd: 0x0b, 0x7fe: 0x0b, 0x7ff: 0x0b,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0b, 0x801: 0x0b, 0x802: 0x0b, 0x803: 0x0b, 0x804: 0x0b, 0x805: 0x0b, 0x806: 0x0b, 0x807: 0x0b,\n\t0x808: 0x0b, 0x809: 0x0b, 0x80a: 0x0b, 0x80b: 0x0b, 0x80c: 0x0b, 0x80d: 0x0b, 0x80e: 0x0b, 0x80f: 0x0b,\n\t0x810: 0x0b, 0x811: 0x0b, 0x812: 0x0b, 0x813: 0x0b, 0x814: 0x0b, 0x815: 0x0b, 0x816: 0x0b, 0x817: 0x0b,\n\t0x818: 0x0b, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x0b, 0x81c: 0x0b, 0x81d: 0x0b, 0x81e: 0x0b, 0x81f: 0x0b,\n\t0x820: 0x0b, 0x821: 0x0b, 0x822: 0x0b, 0x823: 0x0b, 0x824: 0x0b, 0x825: 0x0b, 0x826: 0x0b, 0x827: 0x0b,\n\t0x828: 0x0b, 0x829: 0x0b, 0x82a: 0x0b, 0x82b: 0x0b, 0x82c: 0x0b, 0x82d: 0x0b, 0x82e: 0x0b, 0x82f: 0x0b,\n\t0x830: 0x0b, 0x831: 0x0b, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b,\n\t0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x181, 0x841: 0x182, 0x842: 0xba, 0x843: 0xba, 0x844: 0x183, 0x845: 0x183, 0x846: 0x183, 0x847: 0x184,\n\t0x848: 0xba, 0x849: 0xba, 0x84a: 0xba, 0x84b: 0xba, 0x84c: 0xba, 0x84d: 0xba, 0x84e: 0xba, 0x84f: 0xba,\n\t0x850: 0xba, 0x851: 0xba, 0x852: 0xba, 0x853: 0xba, 0x854: 0xba, 0x855: 0xba, 0x856: 0xba, 0x857: 0xba,\n\t0x858: 0xba, 0x859: 0xba, 0x85a: 0xba, 0x85b: 0xba, 0x85c: 0xba, 0x85d: 0xba, 0x85e: 0xba, 0x85f: 0xba,\n\t0x860: 0xba, 0x861: 0xba, 0x862: 0xba, 0x863: 0xba, 0x864: 0xba, 0x865: 0xba, 0x866: 0xba, 0x867: 0xba,\n\t0x868: 0xba, 0x869: 0xba, 0x86a: 0xba, 0x86b: 0xba, 0x86c: 0xba, 0x86d: 0xba, 0x86e: 0xba, 0x86f: 0xba,\n\t0x870: 0xba, 0x871: 0xba, 0x872: 0xba, 0x873: 0xba, 0x874: 0xba, 0x875: 0xba, 0x876: 0xba, 0x877: 0xba,\n\t0x878: 0xba, 0x879: 0xba, 0x87a: 0xba, 0x87b: 0xba, 0x87c: 0xba, 0x87d: 0xba, 0x87e: 0xba, 0x87f: 0xba,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b,\n\t0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b,\n\t0x890: 0x0b, 0x891: 0x0b, 0x892: 0x0b, 0x893: 0x0b, 0x894: 0x0b, 0x895: 0x0b, 0x896: 0x0b, 0x897: 0x0b,\n\t0x898: 0x0b, 0x899: 0x0b, 0x89a: 0x0b, 0x89b: 0x0b, 0x89c: 0x0b, 0x89d: 0x0b, 0x89e: 0x0b, 0x89f: 0x0b,\n\t0x8a0: 0x1f, 0x8a1: 0x0b, 0x8a2: 0x0b, 0x8a3: 0x0b, 0x8a4: 0x0b, 0x8a5: 0x0b, 0x8a6: 0x0b, 0x8a7: 0x0b,\n\t0x8a8: 0x0b, 0x8a9: 0x0b, 0x8aa: 0x0b, 0x8ab: 0x0b, 0x8ac: 0x0b, 0x8ad: 0x0b, 0x8ae: 0x0b, 0x8af: 0x0b,\n\t0x8b0: 0x0b, 0x8b1: 0x0b, 0x8b2: 0x0b, 0x8b3: 0x0b, 0x8b4: 0x0b, 0x8b5: 0x0b, 0x8b6: 0x0b, 0x8b7: 0x0b,\n\t0x8b8: 0x0b, 0x8b9: 0x0b, 0x8ba: 0x0b, 0x8bb: 0x0b, 0x8bc: 0x0b, 0x8bd: 0x0b, 0x8be: 0x0b, 0x8bf: 0x0b,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b,\n\t0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b,\n}\n\n// idnaSparseOffset: 264 entries, 528 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x34, 0x3f, 0x4b, 0x4f, 0x5e, 0x63, 0x6b, 0x77, 0x85, 0x8a, 0x93, 0xa3, 0xb1, 0xbd, 0xc9, 0xda, 0xe4, 0xeb, 0xf8, 0x109, 0x110, 0x11b, 0x12a, 0x138, 0x142, 0x144, 0x149, 0x14c, 0x14f, 0x151, 0x15d, 0x168, 0x170, 0x176, 0x17c, 0x181, 0x186, 0x189, 0x18d, 0x193, 0x198, 0x1a4, 0x1ae, 0x1b4, 0x1c5, 0x1cf, 0x1d2, 0x1da, 0x1dd, 0x1ea, 0x1f2, 0x1f6, 0x1fd, 0x205, 0x215, 0x221, 0x223, 0x22d, 0x239, 0x245, 0x251, 0x259, 0x25e, 0x268, 0x279, 0x27d, 0x288, 0x28c, 0x295, 0x29d, 0x2a3, 0x2a8, 0x2ab, 0x2af, 0x2b5, 0x2b9, 0x2bd, 0x2c3, 0x2ca, 0x2d0, 0x2d8, 0x2df, 0x2ea, 0x2f4, 0x2f8, 0x2fb, 0x301, 0x305, 0x307, 0x30a, 0x30c, 0x30f, 0x319, 0x31c, 0x32b, 0x32f, 0x334, 0x337, 0x33b, 0x340, 0x345, 0x34b, 0x351, 0x360, 0x366, 0x36a, 0x379, 0x37e, 0x386, 0x390, 0x39b, 0x3a3, 0x3b4, 0x3bd, 0x3cd, 0x3da, 0x3e4, 0x3e9, 0x3f6, 0x3fa, 0x3ff, 0x401, 0x405, 0x407, 0x40b, 0x414, 0x41a, 0x41e, 0x42e, 0x438, 0x43d, 0x440, 0x446, 0x44d, 0x452, 0x456, 0x45c, 0x461, 0x46a, 0x46f, 0x475, 0x47c, 0x483, 0x48a, 0x48e, 0x493, 0x496, 0x49b, 0x4a7, 0x4ad, 0x4b2, 0x4b9, 0x4c1, 0x4c6, 0x4ca, 0x4da, 0x4e1, 0x4e5, 0x4e9, 0x4f0, 0x4f2, 0x4f5, 0x4f8, 0x4fc, 0x500, 0x506, 0x50f, 0x51b, 0x522, 0x52b, 0x533, 0x53a, 0x548, 0x555, 0x562, 0x56b, 0x56f, 0x57d, 0x585, 0x590, 0x599, 0x59f, 0x5a7, 0x5b0, 0x5ba, 0x5bd, 0x5c9, 0x5cc, 0x5d1, 0x5de, 0x5e7, 0x5f3, 0x5f6, 0x600, 0x609, 0x615, 0x622, 0x62a, 0x62d, 0x632, 0x635, 0x638, 0x63b, 0x642, 0x649, 0x64d, 0x658, 0x65b, 0x661, 0x666, 0x66a, 0x66d, 0x670, 0x673, 0x676, 0x679, 0x67e, 0x688, 0x68b, 0x68f, 0x69e, 0x6aa, 0x6ae, 0x6b3, 0x6b8, 0x6bc, 0x6c1, 0x6ca, 0x6d5, 0x6db, 0x6e3, 0x6e7, 0x6eb, 0x6f1, 0x6f7, 0x6fc, 0x6ff, 0x70f, 0x716, 0x719, 0x71c, 0x720, 0x726, 0x72b, 0x730, 0x735, 0x738, 0x73d, 0x740, 0x743, 0x747, 0x74b, 0x74e, 0x75e, 0x76f, 0x774, 0x776, 0x778}\n\n// idnaSparseValues: 1915 entries, 7660 bytes\nvar idnaSparseValues = [1915]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0249, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0259, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0269, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0279, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0289, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x6, offset 0x34\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0401, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4f\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x63\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0xc, offset 0x6b\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x77\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0a08, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0c08, lo: 0xaa, hi: 0xac},\n\t{value: 0x0808, lo: 0xad, hi: 0xad},\n\t{value: 0x0c08, lo: 0xae, hi: 0xae},\n\t{value: 0x0a08, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0a08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xe, offset 0x85\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0xf, offset 0x8a\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x10, offset 0x93\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x11, offset 0xa3\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x12, offset 0xb1\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x3b08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbd\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x14, offset 0xc9\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x15, offset 0xda\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x08f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x16, offset 0xe4\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x17, offset 0xeb\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0961, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0999, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x18, offset 0xf8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x19, offset 0x109\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x1a, offset 0x110\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1b, offset 0x11b\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1c, offset 0x12a\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1d, offset 0x138\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1e, offset 0x142\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x1f, offset 0x144\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x20, offset 0x149\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x21, offset 0x14c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x22, offset 0x14f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x23, offset 0x151\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x24, offset 0x15d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x25, offset 0x168\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x26, offset 0x170\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x27, offset 0x176\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x28, offset 0x17c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x29, offset 0x181\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x2a, offset 0x186\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2b, offset 0x189\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2c, offset 0x18d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2d, offset 0x193\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2e, offset 0x198\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a4\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x30, offset 0x1ae\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x31, offset 0x1b4\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x32, offset 0x1c5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x33, offset 0x1cf\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x34, offset 0x1d2\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x35, offset 0x1da\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x36, offset 0x1dd\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x37, offset 0x1ea\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x38, offset 0x1f2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x39, offset 0x1f6\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x3a, offset 0x1fd\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3b, offset 0x205\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3c, offset 0x215\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3d, offset 0x221\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x3e, offset 0x223\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x3f, offset 0x22d\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x40, offset 0x239\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x41, offset 0x245\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x42, offset 0x251\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x43, offset 0x259\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x44, offset 0x25e\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0e29, lo: 0x80, hi: 0x80},\n\t{value: 0x0e41, lo: 0x81, hi: 0x81},\n\t{value: 0x0e59, lo: 0x82, hi: 0x82},\n\t{value: 0x0e71, lo: 0x83, hi: 0x83},\n\t{value: 0x0e89, lo: 0x84, hi: 0x85},\n\t{value: 0x0ea1, lo: 0x86, hi: 0x86},\n\t{value: 0x0eb9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0x45, offset 0x268\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x46, offset 0x279\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x47, offset 0x27d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x48, offset 0x288\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x49, offset 0x28c\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x24c1, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x4a, offset 0x295\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x24f1, lo: 0xac, hi: 0xac},\n\t{value: 0x2529, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x2579, lo: 0xaf, hi: 0xaf},\n\t{value: 0x25b1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4b, offset 0x29d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4c, offset 0x2a3\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09c5, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09e5, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4d, offset 0x2a8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x4e, offset 0x2ab\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x28c1, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x4f, offset 0x2af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e66, lo: 0xb4, hi: 0xb4},\n\t{value: 0x292a, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e86, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x50, offset 0x2b5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x2941, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x51, offset 0x2b9\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x52, offset 0x2bd\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0018, lo: 0xbd, hi: 0xbf},\n\t// Block 0x53, offset 0x2c3\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0xab},\n\t{value: 0x0018, lo: 0xac, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x54, offset 0x2ca\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ea5, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x55, offset 0x2d0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x56, offset 0x2d8\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x57, offset 0x2df\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x58, offset 0x2ea\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x59, offset 0x2f4\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5a, offset 0x2f8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0x5b, offset 0x2fb\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0edd, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5c, offset 0x301\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0efd, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5d, offset 0x305\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f1d, lo: 0x80, hi: 0xbf},\n\t// Block 0x5e, offset 0x307\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x171d, lo: 0x80, hi: 0x8f},\n\t{value: 0x18fd, lo: 0x90, hi: 0xbf},\n\t// Block 0x5f, offset 0x30a\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1efd, lo: 0x80, hi: 0xbf},\n\t// Block 0x60, offset 0x30c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x61, offset 0x30f\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x29e2, lo: 0x9b, hi: 0x9b},\n\t{value: 0x2a0a, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x2a31, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x62, offset 0x319\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x2a69, lo: 0xbf, hi: 0xbf},\n\t// Block 0x63, offset 0x31c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x2a1d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a3d, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a5d, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a7d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a5d, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2a9d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2abd, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2add, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2afd, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b1d, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2afd, lo: 0xbe, hi: 0xbf},\n\t// Block 0x64, offset 0x32b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x65, offset 0x32f\n\t{value: 0x0030, lo: 0x04},\n\t{value: 0x2aa2, lo: 0x80, hi: 0x9d},\n\t{value: 0x305a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x30a2, lo: 0xa0, hi: 0xbf},\n\t// Block 0x66, offset 0x334\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0x67, offset 0x337\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x68, offset 0x33b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x69, offset 0x340\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x6a, offset 0x345\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6b, offset 0x34b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2009, lo: 0xb8, hi: 0xb8},\n\t{value: 0x6e89, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xbf},\n\t// Block 0x6c, offset 0x351\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6d, offset 0x360\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6e, offset 0x366\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x6f, offset 0x36a\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x70, offset 0x379\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x71, offset 0x37e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x72, offset 0x386\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x73, offset 0x390\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x74, offset 0x39b\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x75, offset 0x3a3\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x76, offset 0x3b4\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x77, offset 0x3bd\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x78, offset 0x3cd\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x79, offset 0x3da\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4465, lo: 0x9c, hi: 0x9c},\n\t{value: 0x447d, lo: 0x9d, hi: 0x9d},\n\t{value: 0x2971, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xaf},\n\t{value: 0x4495, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7a, offset 0x3e4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44b5, lo: 0x80, hi: 0x8f},\n\t{value: 0x44d5, lo: 0x90, hi: 0x9f},\n\t{value: 0x44f5, lo: 0xa0, hi: 0xaf},\n\t{value: 0x44d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7b, offset 0x3e9\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x7c, offset 0x3f6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7d, offset 0x3fa\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x7e, offset 0x3ff\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x4515, lo: 0x80, hi: 0xbf},\n\t// Block 0x7f, offset 0x401\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d15, lo: 0x80, hi: 0x94},\n\t{value: 0x4ad5, lo: 0x95, hi: 0x95},\n\t{value: 0x4fb5, lo: 0x96, hi: 0xbf},\n\t// Block 0x80, offset 0x405\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x54f5, lo: 0x80, hi: 0xbf},\n\t// Block 0x81, offset 0x407\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5cf5, lo: 0x80, hi: 0x84},\n\t{value: 0x5655, lo: 0x85, hi: 0x85},\n\t{value: 0x5d95, lo: 0x86, hi: 0xbf},\n\t// Block 0x82, offset 0x40b\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b55, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d15, lo: 0x90, hi: 0x90},\n\t{value: 0x6d55, lo: 0x91, hi: 0xab},\n\t{value: 0x6ea1, lo: 0xac, hi: 0xac},\n\t{value: 0x70b5, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x70d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x83, offset 0x414\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x72d5, lo: 0x80, hi: 0xad},\n\t{value: 0x6535, lo: 0xae, hi: 0xae},\n\t{value: 0x7895, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f55, lo: 0xb6, hi: 0xb6},\n\t{value: 0x7975, lo: 0xb7, hi: 0xbf},\n\t// Block 0x84, offset 0x41a\n\t{value: 0x0028, lo: 0x03},\n\t{value: 0x7c21, lo: 0x80, hi: 0x82},\n\t{value: 0x7be1, lo: 0x83, hi: 0x83},\n\t{value: 0x7c99, lo: 0x84, hi: 0xbf},\n\t// Block 0x85, offset 0x41e\n\t{value: 0x0038, lo: 0x0f},\n\t{value: 0x9db1, lo: 0x80, hi: 0x83},\n\t{value: 0x9e59, lo: 0x84, hi: 0x85},\n\t{value: 0x9e91, lo: 0x86, hi: 0x87},\n\t{value: 0x9ec9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0xa089, lo: 0x92, hi: 0x97},\n\t{value: 0xa1a1, lo: 0x98, hi: 0x9c},\n\t{value: 0xa281, lo: 0x9d, hi: 0xb3},\n\t{value: 0x9d41, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9db1, lo: 0xb5, hi: 0xb5},\n\t{value: 0xa789, lo: 0xb6, hi: 0xbb},\n\t{value: 0xa869, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa7f9, lo: 0xbd, hi: 0xbd},\n\t{value: 0xa8d9, lo: 0xbe, hi: 0xbf},\n\t// Block 0x86, offset 0x42e\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x87, offset 0x438\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x88, offset 0x43d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x89, offset 0x440\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x8a, offset 0x446\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x8b, offset 0x44d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8c, offset 0x452\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8d, offset 0x456\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x8e, offset 0x45c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xbf},\n\t// Block 0x8f, offset 0x461\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x90, offset 0x46a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x91, offset 0x46f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x92, offset 0x475\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8ad5, lo: 0x98, hi: 0x9f},\n\t{value: 0x8aed, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x93, offset 0x47c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8aed, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8ad5, lo: 0xb8, hi: 0xbf},\n\t// Block 0x94, offset 0x483\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x95, offset 0x48a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x96, offset 0x48e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xae},\n\t{value: 0x0018, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x97, offset 0x493\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x98, offset 0x496\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x99, offset 0x49b\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9a, offset 0x4a7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9b, offset 0x4ad\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x9c, offset 0x4b2\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9d, offset 0x4b9\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9e, offset 0x4c1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0x9f, offset 0x4c6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0xa0, offset 0x4ca\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa1, offset 0x4da\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa2, offset 0x4e1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa3, offset 0x4e5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa4, offset 0x4e9\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa5, offset 0x4f0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa6, offset 0x4f2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa7, offset 0x4f5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xa8, offset 0x4f8\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xa9, offset 0x4fc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xaa, offset 0x500\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xab, offset 0x506\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xac, offset 0x50f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0340, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xad, offset 0x51b\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xae, offset 0x522\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xaf, offset 0x52b\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb0, offset 0x533\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb1, offset 0x53a\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xb2, offset 0x548\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb3, offset 0x555\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xb4, offset 0x562\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb5, offset 0x56b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xb6, offset 0x56f\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xb7, offset 0x57d\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb8, offset 0x585\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xb9, offset 0x590\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xba, offset 0x599\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xbb, offset 0x59f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbc, offset 0x5a7\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xbd, offset 0x5b0\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xbe, offset 0x5ba\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xbf, offset 0x5bd\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc0, offset 0x5c9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xc1, offset 0x5cc\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc2, offset 0x5d1\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc3, offset 0x5de\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x3b08, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0xbf},\n\t// Block 0xc4, offset 0x5e7\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x98},\n\t{value: 0x3b08, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xbf},\n\t// Block 0xc5, offset 0x5f3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xc6, offset 0x5f6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc7, offset 0x600\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xc8, offset 0x609\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xc9, offset 0x615\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xca, offset 0x622\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xcb, offset 0x62a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xcc, offset 0x62d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xcd, offset 0x632\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xce, offset 0x635\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xbf},\n\t// Block 0xcf, offset 0x638\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xd0, offset 0x63b\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xd1, offset 0x642\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xd2, offset 0x649\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xd3, offset 0x64d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xd4, offset 0x658\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xd5, offset 0x65b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd6, offset 0x661\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xd7, offset 0x666\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xbf},\n\t// Block 0xd8, offset 0x66a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xd9, offset 0x66d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xda, offset 0x670\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xdb, offset 0x673\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xdc, offset 0x676\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xdd, offset 0x679\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xde, offset 0x67e\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xdf, offset 0x688\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe0, offset 0x68b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xe1, offset 0x68f\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0xb5b9, lo: 0x9e, hi: 0x9e},\n\t{value: 0xb601, lo: 0x9f, hi: 0x9f},\n\t{value: 0xb649, lo: 0xa0, hi: 0xa0},\n\t{value: 0xb6b1, lo: 0xa1, hi: 0xa1},\n\t{value: 0xb719, lo: 0xa2, hi: 0xa2},\n\t{value: 0xb781, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb7e9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xe2, offset 0x69e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0xb851, lo: 0xbb, hi: 0xbb},\n\t{value: 0xb899, lo: 0xbc, hi: 0xbc},\n\t{value: 0xb8e1, lo: 0xbd, hi: 0xbd},\n\t{value: 0xb949, lo: 0xbe, hi: 0xbe},\n\t{value: 0xb9b1, lo: 0xbf, hi: 0xbf},\n\t// Block 0xe3, offset 0x6aa\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xba19, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xbf},\n\t// Block 0xe4, offset 0x6ae\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0xe5, offset 0x6b3\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xe6, offset 0x6b8\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0xe7, offset 0x6bc\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe8, offset 0x6c1\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe9, offset 0x6ca\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xea, offset 0x6d5\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xeb, offset 0x6db\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xec, offset 0x6e3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xed, offset 0x6e7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0xee, offset 0x6eb\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0xef, offset 0x6f1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xf0, offset 0x6f7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0xc1c1, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xf1, offset 0x6fc\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0xf2, offset 0x6ff\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xc7e9, lo: 0x80, hi: 0x80},\n\t{value: 0xc839, lo: 0x81, hi: 0x81},\n\t{value: 0xc889, lo: 0x82, hi: 0x82},\n\t{value: 0xc8d9, lo: 0x83, hi: 0x83},\n\t{value: 0xc929, lo: 0x84, hi: 0x84},\n\t{value: 0xc979, lo: 0x85, hi: 0x85},\n\t{value: 0xc9c9, lo: 0x86, hi: 0x86},\n\t{value: 0xca19, lo: 0x87, hi: 0x87},\n\t{value: 0xca69, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0xcab9, lo: 0x90, hi: 0x90},\n\t{value: 0xcad9, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xbf},\n\t// Block 0xf3, offset 0x70f\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xf4, offset 0x716\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0xf5, offset 0x719\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0xbf},\n\t// Block 0xf6, offset 0x71c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0xf7, offset 0x720\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0xf8, offset 0x726\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0xf9, offset 0x72b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xfa, offset 0x730\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0xfb, offset 0x735\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xbf},\n\t// Block 0xfc, offset 0x738\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0xfd, offset 0x73d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xfe, offset 0x740\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xff, offset 0x743\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x100, offset 0x747\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x101, offset 0x74b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x102, offset 0x74e\n\t{value: 0x0020, lo: 0x0f},\n\t{value: 0xdeb9, lo: 0x80, hi: 0x89},\n\t{value: 0x8dfd, lo: 0x8a, hi: 0x8a},\n\t{value: 0xdff9, lo: 0x8b, hi: 0x9c},\n\t{value: 0x8e1d, lo: 0x9d, hi: 0x9d},\n\t{value: 0xe239, lo: 0x9e, hi: 0xa2},\n\t{value: 0x8e3d, lo: 0xa3, hi: 0xa3},\n\t{value: 0xe2d9, lo: 0xa4, hi: 0xab},\n\t{value: 0x7ed5, lo: 0xac, hi: 0xac},\n\t{value: 0xe3d9, lo: 0xad, hi: 0xaf},\n\t{value: 0x8e5d, lo: 0xb0, hi: 0xb0},\n\t{value: 0xe439, lo: 0xb1, hi: 0xb6},\n\t{value: 0x8e7d, lo: 0xb7, hi: 0xb9},\n\t{value: 0xe4f9, lo: 0xba, hi: 0xba},\n\t{value: 0x8edd, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe519, lo: 0xbc, hi: 0xbf},\n\t// Block 0x103, offset 0x75e\n\t{value: 0x0020, lo: 0x10},\n\t{value: 0x937d, lo: 0x80, hi: 0x80},\n\t{value: 0xf099, lo: 0x81, hi: 0x86},\n\t{value: 0x939d, lo: 0x87, hi: 0x8a},\n\t{value: 0xd9f9, lo: 0x8b, hi: 0x8b},\n\t{value: 0xf159, lo: 0x8c, hi: 0x96},\n\t{value: 0x941d, lo: 0x97, hi: 0x97},\n\t{value: 0xf2b9, lo: 0x98, hi: 0xa3},\n\t{value: 0x943d, lo: 0xa4, hi: 0xa6},\n\t{value: 0xf439, lo: 0xa7, hi: 0xaa},\n\t{value: 0x949d, lo: 0xab, hi: 0xab},\n\t{value: 0xf4b9, lo: 0xac, hi: 0xac},\n\t{value: 0x94bd, lo: 0xad, hi: 0xad},\n\t{value: 0xf4d9, lo: 0xae, hi: 0xaf},\n\t{value: 0x94dd, lo: 0xb0, hi: 0xb1},\n\t{value: 0xf519, lo: 0xb2, hi: 0xbe},\n\t{value: 0x2040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x104, offset 0x76f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0x105, offset 0x774\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x106, offset 0x776\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x107, offset 0x778\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 42114 bytes (41KiB); checksum: 355A58A4\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables11.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.13 && !go1.14\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"11.0.0\"\n\nvar mappings string = \"\" + // Size: 8175 bytes\n\t\"\\x00\\x01 \\x03 ̈\\x01a\\x03 ̄\\x012\\x013\\x03 ́\\x03 ̧\\x011\\x01o\\x051⁄4\\x051⁄2\" +\n\t\"\\x053⁄4\\x03i̇\\x03l·\\x03ʼn\\x01s\\x03dž\\x03ⱥ\\x03ⱦ\\x01h\\x01j\\x01r\\x01w\\x01y\" +\n\t\"\\x03 ̆\\x03 ̇\\x03 ̊\\x03 ̨\\x03 ̃\\x03 ̋\\x01l\\x01x\\x04̈́\\x03 ι\\x01;\\x05 ̈́\" +\n\t\"\\x04եւ\\x04اٴ\\x04وٴ\\x04ۇٴ\\x04يٴ\\x06क़\\x06ख़\\x06ग़\\x06ज़\\x06ड़\\x06ढ़\\x06फ़\" +\n\t\"\\x06य़\\x06ড়\\x06ঢ়\\x06য়\\x06ਲ਼\\x06ਸ਼\\x06ਖ਼\\x06ਗ਼\\x06ਜ਼\\x06ਫ਼\\x06ଡ଼\\x06ଢ଼\" +\n\t\"\\x06ํา\\x06ໍາ\\x06ຫນ\\x06ຫມ\\x06གྷ\\x06ཌྷ\\x06དྷ\\x06བྷ\\x06ཛྷ\\x06ཀྵ\\x06ཱི\\x06ཱུ\" +\n\t\"\\x06ྲྀ\\x09ྲཱྀ\\x06ླྀ\\x09ླཱྀ\\x06ཱྀ\\x06ྒྷ\\x06ྜྷ\\x06ྡྷ\\x06ྦྷ\\x06ྫྷ\\x06ྐྵ\\x02\" +\n\t\"в\\x02д\\x02о\\x02с\\x02т\\x02ъ\\x02ѣ\\x02æ\\x01b\\x01d\\x01e\\x02ǝ\\x01g\\x01i\\x01k\" +\n\t\"\\x01m\\x01n\\x02ȣ\\x01p\\x01t\\x01u\\x02ɐ\\x02ɑ\\x02ə\\x02ɛ\\x02ɜ\\x02ŋ\\x02ɔ\\x02ɯ\" +\n\t\"\\x01v\\x02β\\x02γ\\x02δ\\x02φ\\x02χ\\x02ρ\\x02н\\x02ɒ\\x01c\\x02ɕ\\x02ð\\x01f\\x02ɟ\" +\n\t\"\\x02ɡ\\x02ɥ\\x02ɨ\\x02ɩ\\x02ɪ\\x02ʝ\\x02ɭ\\x02ʟ\\x02ɱ\\x02ɰ\\x02ɲ\\x02ɳ\\x02ɴ\\x02ɵ\" +\n\t\"\\x02ɸ\\x02ʂ\\x02ʃ\\x02ƫ\\x02ʉ\\x02ʊ\\x02ʋ\\x02ʌ\\x01z\\x02ʐ\\x02ʑ\\x02ʒ\\x02θ\\x02ss\" +\n\t\"\\x02ά\\x02έ\\x02ή\\x02ί\\x02ό\\x02ύ\\x02ώ\\x05ἀι\\x05ἁι\\x05ἂι\\x05ἃι\\x05ἄι\\x05ἅι\" +\n\t\"\\x05ἆι\\x05ἇι\\x05ἠι\\x05ἡι\\x05ἢι\\x05ἣι\\x05ἤι\\x05ἥι\\x05ἦι\\x05ἧι\\x05ὠι\\x05ὡι\" +\n\t\"\\x05ὢι\\x05ὣι\\x05ὤι\\x05ὥι\\x05ὦι\\x05ὧι\\x05ὰι\\x04αι\\x04άι\\x05ᾶι\\x02ι\\x05 ̈͂\" +\n\t\"\\x05ὴι\\x04ηι\\x04ήι\\x05ῆι\\x05 ̓̀\\x05 ̓́\\x05 ̓͂\\x02ΐ\\x05 ̔̀\\x05 ̔́\\x05 ̔͂\" +\n\t\"\\x02ΰ\\x05 ̈̀\\x01`\\x05ὼι\\x04ωι\\x04ώι\\x05ῶι\\x06′′\\x09′′′\\x06‵‵\\x09‵‵‵\\x02!\" +\n\t\"!\\x02??\\x02?!\\x02!?\\x0c′′′′\\x010\\x014\\x015\\x016\\x017\\x018\\x019\\x01+\\x01=\" +\n\t\"\\x01(\\x01)\\x02rs\\x02ħ\\x02no\\x01q\\x02sm\\x02tm\\x02ω\\x02å\\x02א\\x02ב\\x02ג\" +\n\t\"\\x02ד\\x02π\\x051⁄7\\x051⁄9\\x061⁄10\\x051⁄3\\x052⁄3\\x051⁄5\\x052⁄5\\x053⁄5\\x054\" +\n\t\"⁄5\\x051⁄6\\x055⁄6\\x051⁄8\\x053⁄8\\x055⁄8\\x057⁄8\\x041⁄\\x02ii\\x02iv\\x02vi\" +\n\t\"\\x04viii\\x02ix\\x02xi\\x050⁄3\\x06∫∫\\x09∫∫∫\\x06∮∮\\x09∮∮∮\\x0210\\x0211\\x0212\" +\n\t\"\\x0213\\x0214\\x0215\\x0216\\x0217\\x0218\\x0219\\x0220\\x04(10)\\x04(11)\\x04(12)\" +\n\t\"\\x04(13)\\x04(14)\\x04(15)\\x04(16)\\x04(17)\\x04(18)\\x04(19)\\x04(20)\\x0c∫∫∫∫\" +\n\t\"\\x02==\\x05⫝̸\\x02ɫ\\x02ɽ\\x02ȿ\\x02ɀ\\x01.\\x04 ゙\\x04 ゚\\x06より\\x06コト\\x05(ᄀ)\\x05\" +\n\t\"(ᄂ)\\x05(ᄃ)\\x05(ᄅ)\\x05(ᄆ)\\x05(ᄇ)\\x05(ᄉ)\\x05(ᄋ)\\x05(ᄌ)\\x05(ᄎ)\\x05(ᄏ)\\x05(ᄐ\" +\n\t\")\\x05(ᄑ)\\x05(ᄒ)\\x05(가)\\x05(나)\\x05(다)\\x05(라)\\x05(마)\\x05(바)\\x05(사)\\x05(아)\" +\n\t\"\\x05(자)\\x05(차)\\x05(카)\\x05(타)\\x05(파)\\x05(하)\\x05(주)\\x08(오전)\\x08(오후)\\x05(一)\" +\n\t\"\\x05(二)\\x05(三)\\x05(四)\\x05(五)\\x05(六)\\x05(七)\\x05(八)\\x05(九)\\x05(十)\\x05(月)\" +\n\t\"\\x05(火)\\x05(水)\\x05(木)\\x05(金)\\x05(土)\\x05(日)\\x05(株)\\x05(有)\\x05(社)\\x05(名)\" +\n\t\"\\x05(特)\\x05(財)\\x05(祝)\\x05(労)\\x05(代)\\x05(呼)\\x05(学)\\x05(監)\\x05(企)\\x05(資)\" +\n\t\"\\x05(協)\\x05(祭)\\x05(休)\\x05(自)\\x05(至)\\x0221\\x0222\\x0223\\x0224\\x0225\\x0226\" +\n\t\"\\x0227\\x0228\\x0229\\x0230\\x0231\\x0232\\x0233\\x0234\\x0235\\x06참고\\x06주의\\x0236\" +\n\t\"\\x0237\\x0238\\x0239\\x0240\\x0241\\x0242\\x0243\\x0244\\x0245\\x0246\\x0247\\x0248\" +\n\t\"\\x0249\\x0250\\x041月\\x042月\\x043月\\x044月\\x045月\\x046月\\x047月\\x048月\\x049月\\x0510\" +\n\t\"月\\x0511月\\x0512月\\x02hg\\x02ev\\x0cアパート\\x0cアルファ\\x0cアンペア\\x09アール\\x0cイニング\\x09\" +\n\t\"インチ\\x09ウォン\\x0fエスクード\\x0cエーカー\\x09オンス\\x09オーム\\x09カイリ\\x0cカラット\\x0cカロリー\\x09ガロ\" +\n\t\"ン\\x09ガンマ\\x06ギガ\\x09ギニー\\x0cキュリー\\x0cギルダー\\x06キロ\\x0fキログラム\\x12キロメートル\\x0fキロワッ\" +\n\t\"ト\\x09グラム\\x0fグラムトン\\x0fクルゼイロ\\x0cクローネ\\x09ケース\\x09コルナ\\x09コーポ\\x0cサイクル\\x0fサンチ\" +\n\t\"ーム\\x0cシリング\\x09センチ\\x09セント\\x09ダース\\x06デシ\\x06ドル\\x06トン\\x06ナノ\\x09ノット\\x09ハイツ\" +\n\t\"\\x0fパーセント\\x09パーツ\\x0cバーレル\\x0fピアストル\\x09ピクル\\x06ピコ\\x06ビル\\x0fファラッド\\x0cフィート\" +\n\t\"\\x0fブッシェル\\x09フラン\\x0fヘクタール\\x06ペソ\\x09ペニヒ\\x09ヘルツ\\x09ペンス\\x09ページ\\x09ベータ\\x0cポイ\" +\n\t\"ント\\x09ボルト\\x06ホン\\x09ポンド\\x09ホール\\x09ホーン\\x0cマイクロ\\x09マイル\\x09マッハ\\x09マルク\\x0fマ\" +\n\t\"ンション\\x0cミクロン\\x06ミリ\\x0fミリバール\\x06メガ\\x0cメガトン\\x0cメートル\\x09ヤード\\x09ヤール\\x09ユアン\" +\n\t\"\\x0cリットル\\x06リラ\\x09ルピー\\x0cルーブル\\x06レム\\x0fレントゲン\\x09ワット\\x040点\\x041点\\x042点\" +\n\t\"\\x043点\\x044点\\x045点\\x046点\\x047点\\x048点\\x049点\\x0510点\\x0511点\\x0512点\\x0513点\" +\n\t\"\\x0514点\\x0515点\\x0516点\\x0517点\\x0518点\\x0519点\\x0520点\\x0521点\\x0522点\\x0523点\" +\n\t\"\\x0524点\\x02da\\x02au\\x02ov\\x02pc\\x02dm\\x02iu\\x06平成\\x06昭和\\x06大正\\x06明治\\x0c株\" +\n\t\"式会社\\x02pa\\x02na\\x02ma\\x02ka\\x02kb\\x02mb\\x02gb\\x04kcal\\x02pf\\x02nf\\x02m\" +\n\t\"g\\x02kg\\x02hz\\x02ml\\x02dl\\x02kl\\x02fm\\x02nm\\x02mm\\x02cm\\x02km\\x02m2\\x02m\" +\n\t\"3\\x05m∕s\\x06m∕s2\\x07rad∕s\\x08rad∕s2\\x02ps\\x02ns\\x02ms\\x02pv\\x02nv\\x02mv\" +\n\t\"\\x02kv\\x02pw\\x02nw\\x02mw\\x02kw\\x02bq\\x02cc\\x02cd\\x06c∕kg\\x02db\\x02gy\\x02\" +\n\t\"ha\\x02hp\\x02in\\x02kk\\x02kt\\x02lm\\x02ln\\x02lx\\x02ph\\x02pr\\x02sr\\x02sv\\x02\" +\n\t\"wb\\x05v∕m\\x05a∕m\\x041日\\x042日\\x043日\\x044日\\x045日\\x046日\\x047日\\x048日\\x049日\" +\n\t\"\\x0510日\\x0511日\\x0512日\\x0513日\\x0514日\\x0515日\\x0516日\\x0517日\\x0518日\\x0519日\" +\n\t\"\\x0520日\\x0521日\\x0522日\\x0523日\\x0524日\\x0525日\\x0526日\\x0527日\\x0528日\\x0529日\" +\n\t\"\\x0530日\\x0531日\\x02ь\\x02ɦ\\x02ɬ\\x02ʞ\\x02ʇ\\x02œ\\x04𤋮\\x04𢡊\\x04𢡄\\x04𣏕\\x04𥉉\" +\n\t\"\\x04𥳐\\x04𧻓\\x02ff\\x02fi\\x02fl\\x02st\\x04մն\\x04մե\\x04մի\\x04վն\\x04մխ\\x04יִ\" +\n\t\"\\x04ײַ\\x02ע\\x02ה\\x02כ\\x02ל\\x02ם\\x02ר\\x02ת\\x04שׁ\\x04שׂ\\x06שּׁ\\x06שּׂ\\x04א\" +\n\t\"ַ\\x04אָ\\x04אּ\\x04בּ\\x04גּ\\x04דּ\\x04הּ\\x04וּ\\x04זּ\\x04טּ\\x04יּ\\x04ךּ\\x04\" +\n\t\"כּ\\x04לּ\\x04מּ\\x04נּ\\x04סּ\\x04ףּ\\x04פּ\\x04צּ\\x04קּ\\x04רּ\\x04שּ\\x04תּ\" +\n\t\"\\x04וֹ\\x04בֿ\\x04כֿ\\x04פֿ\\x04אל\\x02ٱ\\x02ٻ\\x02پ\\x02ڀ\\x02ٺ\\x02ٿ\\x02ٹ\\x02ڤ\" +\n\t\"\\x02ڦ\\x02ڄ\\x02ڃ\\x02چ\\x02ڇ\\x02ڍ\\x02ڌ\\x02ڎ\\x02ڈ\\x02ژ\\x02ڑ\\x02ک\\x02گ\\x02ڳ\" +\n\t\"\\x02ڱ\\x02ں\\x02ڻ\\x02ۀ\\x02ہ\\x02ھ\\x02ے\\x02ۓ\\x02ڭ\\x02ۇ\\x02ۆ\\x02ۈ\\x02ۋ\\x02ۅ\" +\n\t\"\\x02ۉ\\x02ې\\x02ى\\x04ئا\\x04ئە\\x04ئو\\x04ئۇ\\x04ئۆ\\x04ئۈ\\x04ئې\\x04ئى\\x02ی\\x04\" +\n\t\"ئج\\x04ئح\\x04ئم\\x04ئي\\x04بج\\x04بح\\x04بخ\\x04بم\\x04بى\\x04بي\\x04تج\\x04تح\" +\n\t\"\\x04تخ\\x04تم\\x04تى\\x04تي\\x04ثج\\x04ثم\\x04ثى\\x04ثي\\x04جح\\x04جم\\x04حج\\x04حم\" +\n\t\"\\x04خج\\x04خح\\x04خم\\x04سج\\x04سح\\x04سخ\\x04سم\\x04صح\\x04صم\\x04ضج\\x04ضح\\x04ضخ\" +\n\t\"\\x04ضم\\x04طح\\x04طم\\x04ظم\\x04عج\\x04عم\\x04غج\\x04غم\\x04فج\\x04فح\\x04فخ\\x04فم\" +\n\t\"\\x04فى\\x04في\\x04قح\\x04قم\\x04قى\\x04قي\\x04كا\\x04كج\\x04كح\\x04كخ\\x04كل\\x04كم\" +\n\t\"\\x04كى\\x04كي\\x04لج\\x04لح\\x04لخ\\x04لم\\x04لى\\x04لي\\x04مج\\x04مح\\x04مخ\\x04مم\" +\n\t\"\\x04مى\\x04مي\\x04نج\\x04نح\\x04نخ\\x04نم\\x04نى\\x04ني\\x04هج\\x04هم\\x04هى\\x04هي\" +\n\t\"\\x04يج\\x04يح\\x04يخ\\x04يم\\x04يى\\x04يي\\x04ذٰ\\x04رٰ\\x04ىٰ\\x05 ٌّ\\x05 ٍّ\\x05\" +\n\t\" َّ\\x05 ُّ\\x05 ِّ\\x05 ّٰ\\x04ئر\\x04ئز\\x04ئن\\x04بر\\x04بز\\x04بن\\x04تر\\x04تز\" +\n\t\"\\x04تن\\x04ثر\\x04ثز\\x04ثن\\x04ما\\x04نر\\x04نز\\x04نن\\x04ير\\x04يز\\x04ين\\x04ئخ\" +\n\t\"\\x04ئه\\x04به\\x04ته\\x04صخ\\x04له\\x04نه\\x04هٰ\\x04يه\\x04ثه\\x04سه\\x04شم\\x04شه\" +\n\t\"\\x06ـَّ\\x06ـُّ\\x06ـِّ\\x04طى\\x04طي\\x04عى\\x04عي\\x04غى\\x04غي\\x04سى\\x04سي\" +\n\t\"\\x04شى\\x04شي\\x04حى\\x04حي\\x04جى\\x04جي\\x04خى\\x04خي\\x04صى\\x04صي\\x04ضى\\x04ضي\" +\n\t\"\\x04شج\\x04شح\\x04شخ\\x04شر\\x04سر\\x04صر\\x04ضر\\x04اً\\x06تجم\\x06تحج\\x06تحم\" +\n\t\"\\x06تخم\\x06تمج\\x06تمح\\x06تمخ\\x06جمح\\x06حمي\\x06حمى\\x06سحج\\x06سجح\\x06سجى\" +\n\t\"\\x06سمح\\x06سمج\\x06سمم\\x06صحح\\x06صمم\\x06شحم\\x06شجي\\x06شمخ\\x06شمم\\x06ضحى\" +\n\t\"\\x06ضخم\\x06طمح\\x06طمم\\x06طمي\\x06عجم\\x06عمم\\x06عمى\\x06غمم\\x06غمي\\x06غمى\" +\n\t\"\\x06فخم\\x06قمح\\x06قمم\\x06لحم\\x06لحي\\x06لحى\\x06لجج\\x06لخم\\x06لمح\\x06محج\" +\n\t\"\\x06محم\\x06محي\\x06مجح\\x06مجم\\x06مخج\\x06مخم\\x06مجخ\\x06همج\\x06همم\\x06نحم\" +\n\t\"\\x06نحى\\x06نجم\\x06نجى\\x06نمي\\x06نمى\\x06يمم\\x06بخي\\x06تجي\\x06تجى\\x06تخي\" +\n\t\"\\x06تخى\\x06تمي\\x06تمى\\x06جمي\\x06جحى\\x06جمى\\x06سخى\\x06صحي\\x06شحي\\x06ضحي\" +\n\t\"\\x06لجي\\x06لمي\\x06يحي\\x06يجي\\x06يمي\\x06ممي\\x06قمي\\x06نحي\\x06عمي\\x06كمي\" +\n\t\"\\x06نجح\\x06مخي\\x06لجم\\x06كمم\\x06جحي\\x06حجي\\x06مجي\\x06فمي\\x06بحي\\x06سخي\" +\n\t\"\\x06نجي\\x06صلے\\x06قلے\\x08الله\\x08اكبر\\x08محمد\\x08صلعم\\x08رسول\\x08عليه\" +\n\t\"\\x08وسلم\\x06صلى!صلى الله عليه وسلم\\x0fجل جلاله\\x08ریال\\x01,\\x01:\\x01!\" +\n\t\"\\x01?\\x01_\\x01{\\x01}\\x01[\\x01]\\x01#\\x01&\\x01*\\x01-\\x01<\\x01>\\x01\\\\\\x01$\" +\n\t\"\\x01%\\x01@\\x04ـً\\x04ـَ\\x04ـُ\\x04ـِ\\x04ـّ\\x04ـْ\\x02ء\\x02آ\\x02أ\\x02ؤ\\x02إ\" +\n\t\"\\x02ئ\\x02ا\\x02ب\\x02ة\\x02ت\\x02ث\\x02ج\\x02ح\\x02خ\\x02د\\x02ذ\\x02ر\\x02ز\\x02س\" +\n\t\"\\x02ش\\x02ص\\x02ض\\x02ط\\x02ظ\\x02ع\\x02غ\\x02ف\\x02ق\\x02ك\\x02ل\\x02م\\x02ن\\x02ه\" +\n\t\"\\x02و\\x02ي\\x04لآ\\x04لأ\\x04لإ\\x04لا\\x01\\x22\\x01'\\x01/\\x01^\\x01|\\x01~\\x02¢\" +\n\t\"\\x02£\\x02¬\\x02¦\\x02¥\\x08𝅗𝅥\\x08𝅘𝅥\\x0c𝅘𝅥𝅮\\x0c𝅘𝅥𝅯\\x0c𝅘𝅥𝅰\\x0c𝅘𝅥𝅱\\x0c𝅘𝅥𝅲\\x08𝆹\" +\n\t\"𝅥\\x08𝆺𝅥\\x0c𝆹𝅥𝅮\\x0c𝆺𝅥𝅮\\x0c𝆹𝅥𝅯\\x0c𝆺𝅥𝅯\\x02ı\\x02ȷ\\x02α\\x02ε\\x02ζ\\x02η\\x02\" +\n\t\"κ\\x02λ\\x02μ\\x02ν\\x02ξ\\x02ο\\x02σ\\x02τ\\x02υ\\x02ψ\\x03∇\\x03∂\\x02ϝ\\x02ٮ\\x02ڡ\" +\n\t\"\\x02ٯ\\x020,\\x021,\\x022,\\x023,\\x024,\\x025,\\x026,\\x027,\\x028,\\x029,\\x03(a)\" +\n\t\"\\x03(b)\\x03(c)\\x03(d)\\x03(e)\\x03(f)\\x03(g)\\x03(h)\\x03(i)\\x03(j)\\x03(k)\" +\n\t\"\\x03(l)\\x03(m)\\x03(n)\\x03(o)\\x03(p)\\x03(q)\\x03(r)\\x03(s)\\x03(t)\\x03(u)\" +\n\t\"\\x03(v)\\x03(w)\\x03(x)\\x03(y)\\x03(z)\\x07〔s〕\\x02wz\\x02hv\\x02sd\\x03ppv\\x02w\" +\n\t\"c\\x02mc\\x02md\\x02dj\\x06ほか\\x06ココ\\x03サ\\x03手\\x03字\\x03双\\x03デ\\x03二\\x03多\\x03解\" +\n\t\"\\x03天\\x03交\\x03映\\x03無\\x03料\\x03前\\x03後\\x03再\\x03新\\x03初\\x03終\\x03生\\x03販\\x03声\" +\n\t\"\\x03吹\\x03演\\x03投\\x03捕\\x03一\\x03三\\x03遊\\x03左\\x03中\\x03右\\x03指\\x03走\\x03打\\x03禁\" +\n\t\"\\x03空\\x03合\\x03満\\x03有\\x03月\\x03申\\x03割\\x03営\\x03配\\x09〔本〕\\x09〔三〕\\x09〔二〕\\x09〔安\" +\n\t\"〕\\x09〔点〕\\x09〔打〕\\x09〔盗〕\\x09〔勝〕\\x09〔敗〕\\x03得\\x03可\\x03丽\\x03丸\\x03乁\\x03你\\x03\" +\n\t\"侮\\x03侻\\x03倂\\x03偺\\x03備\\x03僧\\x03像\\x03㒞\\x03免\\x03兔\\x03兤\\x03具\\x03㒹\\x03內\\x03\" +\n\t\"冗\\x03冤\\x03仌\\x03冬\\x03况\\x03凵\\x03刃\\x03㓟\\x03刻\\x03剆\\x03剷\\x03㔕\\x03勇\\x03勉\\x03\" +\n\t\"勤\\x03勺\\x03包\\x03匆\\x03北\\x03卉\\x03卑\\x03博\\x03即\\x03卽\\x03卿\\x03灰\\x03及\\x03叟\\x03\" +\n\t\"叫\\x03叱\\x03吆\\x03咞\\x03吸\\x03呈\\x03周\\x03咢\\x03哶\\x03唐\\x03啓\\x03啣\\x03善\\x03喙\\x03\" +\n\t\"喫\\x03喳\\x03嗂\\x03圖\\x03嘆\\x03圗\\x03噑\\x03噴\\x03切\\x03壮\\x03城\\x03埴\\x03堍\\x03型\\x03\" +\n\t\"堲\\x03報\\x03墬\\x03売\\x03壷\\x03夆\\x03夢\\x03奢\\x03姬\\x03娛\\x03娧\\x03姘\\x03婦\\x03㛮\\x03\" +\n\t\"嬈\\x03嬾\\x03寃\\x03寘\\x03寧\\x03寳\\x03寿\\x03将\\x03尢\\x03㞁\\x03屠\\x03屮\\x03峀\\x03岍\\x03\" +\n\t\"嵃\\x03嵮\\x03嵫\\x03嵼\\x03巡\\x03巢\\x03㠯\\x03巽\\x03帨\\x03帽\\x03幩\\x03㡢\\x03㡼\\x03庰\\x03\" +\n\t\"庳\\x03庶\\x03廊\\x03廾\\x03舁\\x03弢\\x03㣇\\x03形\\x03彫\\x03㣣\\x03徚\\x03忍\\x03志\\x03忹\\x03\" +\n\t\"悁\\x03㤺\\x03㤜\\x03悔\\x03惇\\x03慈\\x03慌\\x03慎\\x03慺\\x03憎\\x03憲\\x03憤\\x03憯\\x03懞\\x03\" +\n\t\"懲\\x03懶\\x03成\\x03戛\\x03扝\\x03抱\\x03拔\\x03捐\\x03挽\\x03拼\\x03捨\\x03掃\\x03揤\\x03搢\\x03\" +\n\t\"揅\\x03掩\\x03㨮\\x03摩\\x03摾\\x03撝\\x03摷\\x03㩬\\x03敏\\x03敬\\x03旣\\x03書\\x03晉\\x03㬙\\x03\" +\n\t\"暑\\x03㬈\\x03㫤\\x03冒\\x03冕\\x03最\\x03暜\\x03肭\\x03䏙\\x03朗\\x03望\\x03朡\\x03杞\\x03杓\\x03\" +\n\t\"㭉\\x03柺\\x03枅\\x03桒\\x03梅\\x03梎\\x03栟\\x03椔\\x03㮝\\x03楂\\x03榣\\x03槪\\x03檨\\x03櫛\\x03\" +\n\t\"㰘\\x03次\\x03歔\\x03㱎\\x03歲\\x03殟\\x03殺\\x03殻\\x03汎\\x03沿\\x03泍\\x03汧\\x03洖\\x03派\\x03\" +\n\t\"海\\x03流\\x03浩\\x03浸\\x03涅\\x03洴\\x03港\\x03湮\\x03㴳\\x03滋\\x03滇\\x03淹\\x03潮\\x03濆\\x03\" +\n\t\"瀹\\x03瀞\\x03瀛\\x03㶖\\x03灊\\x03災\\x03灷\\x03炭\\x03煅\\x03熜\\x03爨\\x03爵\\x03牐\\x03犀\\x03\" +\n\t\"犕\\x03獺\\x03王\\x03㺬\\x03玥\\x03㺸\\x03瑇\\x03瑜\\x03瑱\\x03璅\\x03瓊\\x03㼛\\x03甤\\x03甾\\x03\" +\n\t\"異\\x03瘐\\x03㿼\\x03䀈\\x03直\\x03眞\\x03真\\x03睊\\x03䀹\\x03瞋\\x03䁆\\x03䂖\\x03硎\\x03碌\\x03\" +\n\t\"磌\\x03䃣\\x03祖\\x03福\\x03秫\\x03䄯\\x03穀\\x03穊\\x03穏\\x03䈂\\x03篆\\x03築\\x03䈧\\x03糒\\x03\" +\n\t\"䊠\\x03糨\\x03糣\\x03紀\\x03絣\\x03䌁\\x03緇\\x03縂\\x03繅\\x03䌴\\x03䍙\\x03罺\\x03羕\\x03翺\\x03\" +\n\t\"者\\x03聠\\x03聰\\x03䏕\\x03育\\x03脃\\x03䐋\\x03脾\\x03媵\\x03舄\\x03辞\\x03䑫\\x03芑\\x03芋\\x03\" +\n\t\"芝\\x03劳\\x03花\\x03芳\\x03芽\\x03苦\\x03若\\x03茝\\x03荣\\x03莭\\x03茣\\x03莽\\x03菧\\x03著\\x03\" +\n\t\"荓\\x03菊\\x03菌\\x03菜\\x03䔫\\x03蓱\\x03蓳\\x03蔖\\x03蕤\\x03䕝\\x03䕡\\x03䕫\\x03虐\\x03虜\\x03\" +\n\t\"虧\\x03虩\\x03蚩\\x03蚈\\x03蜎\\x03蛢\\x03蝹\\x03蜨\\x03蝫\\x03螆\\x03蟡\\x03蠁\\x03䗹\\x03衠\\x03\" +\n\t\"衣\\x03裗\\x03裞\\x03䘵\\x03裺\\x03㒻\\x03䚾\\x03䛇\\x03誠\\x03諭\\x03變\\x03豕\\x03貫\\x03賁\\x03\" +\n\t\"贛\\x03起\\x03跋\\x03趼\\x03跰\\x03軔\\x03輸\\x03邔\\x03郱\\x03鄑\\x03鄛\\x03鈸\\x03鋗\\x03鋘\\x03\" +\n\t\"鉼\\x03鏹\\x03鐕\\x03開\\x03䦕\\x03閷\\x03䧦\\x03雃\\x03嶲\\x03霣\\x03䩮\\x03䩶\\x03韠\\x03䪲\\x03\" +\n\t\"頋\\x03頩\\x03飢\\x03䬳\\x03餩\\x03馧\\x03駂\\x03駾\\x03䯎\\x03鬒\\x03鱀\\x03鳽\\x03䳎\\x03䳭\\x03\" +\n\t\"鵧\\x03䳸\\x03麻\\x03䵖\\x03黹\\x03黾\\x03鼅\\x03鼏\\x03鼖\\x03鼻\"\n\nvar xorData string = \"\" + // Size: 4855 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\\x03\\x1c\\x02\" +\n\t\"\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\\xc1r\\x02\" +\n\t\"\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\\x03\\xc1s*\" +\n\t\"\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\\x83\\xab\" +\n\t\"\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\\xe1\\xcd\" +\n\t\"\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\\x9a\\xec\" +\n\t\"\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c!\\x03\" +\n\t\"\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03ʦ\\x93\" +\n\t\"\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\\x03\" +\n\t\"\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\\xfa\" +\n\t\"\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\\x03\" +\n\t\"\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\\xe3\" +\n\t\"\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\\x03\" +\n\t\"\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\\xe8\" +\n\t\"\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\\x0b\" +\n\t\"\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\\x05\" +\n\t\"\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\\x0786\" +\n\t\"\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\\x03\" +\n\t\"\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\\x03\" +\n\t\"\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\\x03\" +\n\t\"\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\\x07\" +\n\t\"\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\\x07\" +\n\t\"\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\\x07\" +\n\t\"\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\\x0a\" +\n\t\"\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\\x07\" +\n\t\"\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\\x03\" +\n\t\"\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\\x04\" +\n\t\"4\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\\x04+ \" +\n\t\"\\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\\x22\" +\n\t\"\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\\x03\" +\n\t\"\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\\x03\" +\n\t\"\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\\x054\" +\n\t\"\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\\x05)\" +\n\t\":\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\\x1e\" +\n\t\"\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\\x03\" +\n\t\"\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\\x1b\" +\n\t\"\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\\x03\" +\n\t\"\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\\x06\" +\n\t\"\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\\x03\" +\n\t\"\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\\x0a6\" +\n\t\"\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\\x1f\" +\n\t\"\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\\x0a\" +\n\t\"\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\\x02\" +\n\t\"\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\\x03\" +\n\t\"\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\\x00\" +\n\t\"\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\\x10\" +\n\t\"\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#<\" +\n\t\"\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\\x00\" +\n\t\"\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\\x03\" +\n\t\"\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\\x22\" +\n\t\"\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\\x12\" +\n\t\"\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05<\" +\n\t\"\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\\x10\\x03\\x0b!0\" +\n\t\"\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\\x03\\x09\\x1f\" +\n\t\"\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\\x03\\x0a\\x01\" +\n\t\"\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\\x08='\\x03\" +\n\t\"\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\\x09\\x0c\" +\n\t\"\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06!3\\x03\" +\n\t\"\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\\x03\\x07\" +\n\t\"<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\\x01\\x00\" +\n\t\"\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\\x09\\x11\" +\n\t\"\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\\x0a/1\" +\n\t\"\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\\x07<3\" +\n\t\"\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\\x13\\x00\" +\n\t\"\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(;\\x03\" +\n\t\"\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\\x14$\" +\n\t\"\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\\x0a\" +\n\t\"\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\\x01\" +\n\t\"\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\\x03\" +\n\t\"\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\\x07\" +\n\t\"\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\\x0a\" +\n\t\"\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\\x0b\" +\n\t\"\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\\x08\" +\n\t\"\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\\x03\" +\n\t\"\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\\x03\" +\n\t\"\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\\x09\" +\n\t\"\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a.\" +\n\t\"\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x01\\x1e\\x03\\x0f$!\\x03\" +\n\t\"\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\\x18\\x03\\x0f\" +\n\t\"\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\\x03\\x0e\\x0d)\" +\n\t\"\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\\x03\\x0d. \\x03\" +\n\t\"\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\\x0d\\x0d\\x0f\\x03\" +\n\t\"\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\\x0c\\x09:\\x03\\x0e\" +\n\t\"\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\\x03\\x0c\\x1f\\x1c\" +\n\t\"\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\\x0b<+\\x03\\x0b8\" +\n\t\"\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\\x22&\\x03\\x0b\\x1a\" +\n\t\"\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\\x0a!\\x1a\\x03\\x0a!\" +\n\t\"7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\\x0a\\x00 \\x03\\x0a\" +\n\t\"\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\\x1b-\\x03\\x09-\" +\n\t\"\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\\x1f\\x03\\x093\" +\n\t\"\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\\x16\\x03\\x09\" +\n\t\"\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\\x03\\x09\\x1a\" +\n\t\"\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\\x08\\x02*\" +\n\t\"\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\\x070\\x0c\" +\n\t\"\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x0671\\x03\" +\n\t\"\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \\x1d\\x03\" +\n\t\"\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 29404 bytes (28.71 KiB). Checksum: 848c45acb5f7991c.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 125:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 125\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 127 blocks, 8128 entries, 16256 bytes\n// The third block is the zero block.\nvar idnaValues = [8128]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x001a, 0xe9: 0x0018,\n\t0xea: 0x0039, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x004a,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0069, 0xf3: 0x0079, 0xf4: 0x008a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x00aa, 0xf9: 0x00c9, 0xfa: 0x00d9, 0xfb: 0x0018,\n\t0xfc: 0x00e9, 0xfd: 0x0119, 0xfe: 0x0149, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0179, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0199,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0199, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x01b9, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x01d9,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x01e9, 0x1c5: 0x01e9,\n\t0x1c6: 0x01e9, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0209, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x0229, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x029a, 0x259: 0x02ba, 0x25a: 0x02da, 0x25b: 0x02fa, 0x25c: 0x031a, 0x25d: 0x033a,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0359, 0x262: 0x01d9, 0x263: 0x0369,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x008a, 0x2c5: 0x03d2,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429,\n\t0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,\n\t0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,\n\t0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,\n\t0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0808, 0x557: 0x0808,\n\t0x558: 0x0808, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,\n\t0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,\n\t0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,\n\t0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,\n\t0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040,\n\t0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040,\n\t0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308,\n\t0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008,\n\t0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308,\n\t0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308,\n\t0x598: 0x04c9, 0x599: 0x0501, 0x59a: 0x0539, 0x59b: 0x0571, 0x59c: 0x05a9, 0x59d: 0x05e1,\n\t0x59e: 0x0619, 0x59f: 0x0651, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308,\n\t0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008,\n\t0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,\n\t0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008,\n\t0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008,\n\t0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008,\n\t0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008,\n\t0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040,\n\t0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008,\n\t0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008,\n\t0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008,\n\t0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040,\n\t0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040,\n\t0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040,\n\t0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008,\n\t0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008,\n\t0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0689, 0x61d: 0x06c1,\n\t0x61e: 0x0040, 0x61f: 0x06f9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308,\n\t0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018,\n\t0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018,\n\t0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x3308, 0x63f: 0x0040,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008,\n\t0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040,\n\t0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040,\n\t0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008,\n\t0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008,\n\t0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008,\n\t0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0731, 0x674: 0x0040, 0x675: 0x0008,\n\t0x676: 0x0769, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040,\n\t0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040,\n\t0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308,\n\t0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308,\n\t0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040,\n\t0x698: 0x0040, 0x699: 0x07a1, 0x69a: 0x07d9, 0x69b: 0x0811, 0x69c: 0x0008, 0x69d: 0x0040,\n\t0x69e: 0x0849, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040,\n\t0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308,\n\t0x6b6: 0x0018, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008,\n\t0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008,\n\t0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008,\n\t0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008,\n\t0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008,\n\t0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008,\n\t0x6e4: 0x0008, 0x6e5: 0x0008, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0040,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008,\n\t0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308,\n\t0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008,\n\t0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040,\n\t0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040,\n\t0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040,\n\t0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308,\n\t0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040,\n\t0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308,\n\t0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008,\n\t0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008,\n\t0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008,\n\t0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008,\n\t0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008,\n\t0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008,\n\t0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040,\n\t0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040,\n\t0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008,\n\t0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040,\n\t0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x0040, 0x796: 0x3308, 0x797: 0x3008,\n\t0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x0881, 0x79d: 0x08b9,\n\t0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308,\n\t0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008,\n\t0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018,\n\t0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008,\n\t0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040,\n\t0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040,\n\t0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040,\n\t0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040,\n\t0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008,\n\t0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008,\n\t0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040,\n\t0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040,\n\t0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308,\n\t0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040,\n\t0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040,\n\t0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040,\n\t0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308,\n\t0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008,\n\t0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040,\n\t0x836: 0x0040, 0x837: 0x0040, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018,\n\t0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0018, 0x845: 0x0008,\n\t0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008,\n\t0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040,\n\t0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008,\n\t0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008,\n\t0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008,\n\t0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008,\n\t0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040,\n\t0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040,\n\t0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,\n\t0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040,\n\t0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040,\n\t0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040,\n\t0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,\n\t0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040,\n\t0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040,\n\t0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040,\n\t0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,\n\t0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008,\n\t0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018,\n\t0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,\n\t0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018,\n\t0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008,\n\t0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040,\n\t0x906: 0x0040, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0040, 0x90a: 0x0008, 0x90b: 0x0040,\n\t0x90c: 0x0040, 0x90d: 0x0008, 0x90e: 0x0040, 0x90f: 0x0040, 0x910: 0x0040, 0x911: 0x0040,\n\t0x912: 0x0040, 0x913: 0x0040, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008,\n\t0x918: 0x0040, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008,\n\t0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0040, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,\n\t0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0040, 0x929: 0x0040,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0040, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,\n\t0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x0929, 0x934: 0x3308, 0x935: 0x3308,\n\t0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x0040, 0x93b: 0x3308,\n\t0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x09d1, 0x944: 0x0008, 0x945: 0x0008,\n\t0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,\n\t0x94c: 0x0008, 0x94d: 0x0a09, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,\n\t0x952: 0x0a41, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0a79,\n\t0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0ab1, 0x95d: 0x0008,\n\t0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,\n\t0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0ae9,\n\t0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040,\n\t0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0b21, 0x974: 0x3308, 0x975: 0x0b59,\n\t0x976: 0x0b91, 0x977: 0x0bc9, 0x978: 0x0c19, 0x979: 0x0c51, 0x97a: 0x3308, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x3308, 0x981: 0x0ca1, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018,\n\t0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308,\n\t0x992: 0x3308, 0x993: 0x0cd9, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308,\n\t0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0d11,\n\t0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0d49, 0x9a3: 0x3308,\n\t0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0d81, 0x9a8: 0x3308, 0x9a9: 0x3308,\n\t0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0db9, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308,\n\t0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308,\n\t0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x0df1, 0x9ba: 0x3308, 0x9bb: 0x3308,\n\t0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008,\n\t0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,\n\t0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008,\n\t0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008,\n\t0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008,\n\t0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008,\n\t0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008,\n\t0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0039, 0x9ed: 0x0ed1, 0x9ee: 0x0ee9, 0x9ef: 0x0008,\n\t0x9f0: 0x0ef9, 0x9f1: 0x0f09, 0x9f2: 0x0f19, 0x9f3: 0x0f31, 0x9f4: 0x0249, 0x9f5: 0x0f41,\n\t0x9f6: 0x0259, 0x9f7: 0x0f51, 0x9f8: 0x0359, 0x9f9: 0x0f61, 0x9fa: 0x0f71, 0x9fb: 0x0008,\n\t0x9fc: 0x00d9, 0x9fd: 0x0f81, 0x9fe: 0x0f99, 0x9ff: 0x0269,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0fa9, 0xa01: 0x0fb9, 0xa02: 0x0279, 0xa03: 0x0039, 0xa04: 0x0fc9, 0xa05: 0x0fe1,\n\t0xa06: 0x059d, 0xa07: 0x0ee9, 0xa08: 0x0ef9, 0xa09: 0x0f09, 0xa0a: 0x0ff9, 0xa0b: 0x1011,\n\t0xa0c: 0x1029, 0xa0d: 0x0f31, 0xa0e: 0x0008, 0xa0f: 0x0f51, 0xa10: 0x0f61, 0xa11: 0x1041,\n\t0xa12: 0x00d9, 0xa13: 0x1059, 0xa14: 0x05b5, 0xa15: 0x05b5, 0xa16: 0x0f99, 0xa17: 0x0fa9,\n\t0xa18: 0x0fb9, 0xa19: 0x059d, 0xa1a: 0x1071, 0xa1b: 0x1089, 0xa1c: 0x05cd, 0xa1d: 0x1099,\n\t0xa1e: 0x10b1, 0xa1f: 0x10c9, 0xa20: 0x10e1, 0xa21: 0x10f9, 0xa22: 0x0f41, 0xa23: 0x0269,\n\t0xa24: 0x0fb9, 0xa25: 0x1089, 0xa26: 0x1099, 0xa27: 0x10b1, 0xa28: 0x1111, 0xa29: 0x10e1,\n\t0xa2a: 0x10f9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008,\n\t0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008,\n\t0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x1129, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008,\n\t0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008,\n\t0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008,\n\t0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008,\n\t0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008,\n\t0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x1141, 0xa5c: 0x1159, 0xa5d: 0x1169,\n\t0xa5e: 0x1181, 0xa5f: 0x1029, 0xa60: 0x1199, 0xa61: 0x11a9, 0xa62: 0x11c1, 0xa63: 0x11d9,\n\t0xa64: 0x11f1, 0xa65: 0x1209, 0xa66: 0x1221, 0xa67: 0x05e5, 0xa68: 0x1239, 0xa69: 0x1251,\n\t0xa6a: 0xe17d, 0xa6b: 0x1269, 0xa6c: 0x1281, 0xa6d: 0x1299, 0xa6e: 0x12b1, 0xa6f: 0x12c9,\n\t0xa70: 0x12e1, 0xa71: 0x12f9, 0xa72: 0x1311, 0xa73: 0x1329, 0xa74: 0x1341, 0xa75: 0x1359,\n\t0xa76: 0x1371, 0xa77: 0x1389, 0xa78: 0x05fd, 0xa79: 0x13a1, 0xa7a: 0x13b9, 0xa7b: 0x13d1,\n\t0xa7c: 0x13e1, 0xa7d: 0x13f9, 0xa7e: 0x1411, 0xa7f: 0x1429,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,\n\t0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,\n\t0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,\n\t0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008,\n\t0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008,\n\t0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,\n\t0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,\n\t0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,\n\t0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,\n\t0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,\n\t0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,\n\t0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,\n\t0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,\n\t0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,\n\t0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x0615, 0xadb: 0x0635, 0xadc: 0x0008, 0xadd: 0x0008,\n\t0xade: 0x1441, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,\n\t0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,\n\t0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,\n\t0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,\n\t0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,\n\t0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008,\n\t0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045,\n\t0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008,\n\t0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,\n\t0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045,\n\t0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008,\n\t0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045,\n\t0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045,\n\t0xb30: 0x0008, 0xb31: 0x1459, 0xb32: 0x0008, 0xb33: 0x1471, 0xb34: 0x0008, 0xb35: 0x1489,\n\t0xb36: 0x0008, 0xb37: 0x14a1, 0xb38: 0x0008, 0xb39: 0x14b9, 0xb3a: 0x0008, 0xb3b: 0x14d1,\n\t0xb3c: 0x0008, 0xb3d: 0x14e9, 0xb3e: 0x0040, 0xb3f: 0x0040,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x1501, 0xb41: 0x1531, 0xb42: 0x1561, 0xb43: 0x1591, 0xb44: 0x15c1, 0xb45: 0x15f1,\n\t0xb46: 0x1621, 0xb47: 0x1651, 0xb48: 0x1501, 0xb49: 0x1531, 0xb4a: 0x1561, 0xb4b: 0x1591,\n\t0xb4c: 0x15c1, 0xb4d: 0x15f1, 0xb4e: 0x1621, 0xb4f: 0x1651, 0xb50: 0x1681, 0xb51: 0x16b1,\n\t0xb52: 0x16e1, 0xb53: 0x1711, 0xb54: 0x1741, 0xb55: 0x1771, 0xb56: 0x17a1, 0xb57: 0x17d1,\n\t0xb58: 0x1681, 0xb59: 0x16b1, 0xb5a: 0x16e1, 0xb5b: 0x1711, 0xb5c: 0x1741, 0xb5d: 0x1771,\n\t0xb5e: 0x17a1, 0xb5f: 0x17d1, 0xb60: 0x1801, 0xb61: 0x1831, 0xb62: 0x1861, 0xb63: 0x1891,\n\t0xb64: 0x18c1, 0xb65: 0x18f1, 0xb66: 0x1921, 0xb67: 0x1951, 0xb68: 0x1801, 0xb69: 0x1831,\n\t0xb6a: 0x1861, 0xb6b: 0x1891, 0xb6c: 0x18c1, 0xb6d: 0x18f1, 0xb6e: 0x1921, 0xb6f: 0x1951,\n\t0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x1981, 0xb73: 0x19b1, 0xb74: 0x19d9, 0xb75: 0x0040,\n\t0xb76: 0x0008, 0xb77: 0x1a01, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x064d, 0xb7b: 0x1459,\n\t0xb7c: 0x19b1, 0xb7d: 0x0666, 0xb7e: 0x1a31, 0xb7f: 0x0686,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x06a6, 0xb81: 0x1a4a, 0xb82: 0x1a79, 0xb83: 0x1aa9, 0xb84: 0x1ad1, 0xb85: 0x0040,\n\t0xb86: 0x0008, 0xb87: 0x1af9, 0xb88: 0x06c5, 0xb89: 0x1471, 0xb8a: 0x06dd, 0xb8b: 0x1489,\n\t0xb8c: 0x1aa9, 0xb8d: 0x1b2a, 0xb8e: 0x1b5a, 0xb8f: 0x1b8a, 0xb90: 0x0008, 0xb91: 0x0008,\n\t0xb92: 0x0008, 0xb93: 0x1bb9, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008,\n\t0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x06f5, 0xb9b: 0x14a1, 0xb9c: 0x0040, 0xb9d: 0x1bd2,\n\t0xb9e: 0x1c02, 0xb9f: 0x1c32, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x1c61,\n\t0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045,\n\t0xbaa: 0x070d, 0xbab: 0x14d1, 0xbac: 0xe04d, 0xbad: 0x1c7a, 0xbae: 0x03d2, 0xbaf: 0x1caa,\n\t0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x1cb9, 0xbb3: 0x1ce9, 0xbb4: 0x1d11, 0xbb5: 0x0040,\n\t0xbb6: 0x0008, 0xbb7: 0x1d39, 0xbb8: 0x0725, 0xbb9: 0x14b9, 0xbba: 0x0515, 0xbbb: 0x14e9,\n\t0xbbc: 0x1ce9, 0xbbd: 0x073e, 0xbbe: 0x075e, 0xbbf: 0x0040,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a,\n\t0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0,\n\t0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d,\n\t0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x077e,\n\t0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,\n\t0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018,\n\t0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040,\n\t0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a,\n\t0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x1d69, 0xbf4: 0x1da1, 0xbf5: 0x0018,\n\t0xbf6: 0x1df1, 0xbf7: 0x1e29, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018,\n\t0xbfc: 0x1e7a, 0xbfd: 0x0018, 0xbfe: 0x079e, 0xbff: 0x0018,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018,\n\t0xc06: 0x0018, 0xc07: 0x1e92, 0xc08: 0x1eaa, 0xc09: 0x1ec2, 0xc0a: 0x0018, 0xc0b: 0x0018,\n\t0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018,\n\t0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x1ed9,\n\t0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,\n\t0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340,\n\t0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040,\n\t0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340,\n\t0xc30: 0x1f41, 0xc31: 0x0f41, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x1f51, 0xc35: 0x1f61,\n\t0xc36: 0x1f71, 0xc37: 0x1f81, 0xc38: 0x1f91, 0xc39: 0x1fa1, 0xc3a: 0x1fb2, 0xc3b: 0x07bd,\n\t0xc3c: 0x1fc2, 0xc3d: 0x1fd2, 0xc3e: 0x1fe2, 0xc3f: 0x0f71,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x1f41, 0xc41: 0x00c9, 0xc42: 0x0069, 0xc43: 0x0079, 0xc44: 0x1f51, 0xc45: 0x1f61,\n\t0xc46: 0x1f71, 0xc47: 0x1f81, 0xc48: 0x1f91, 0xc49: 0x1fa1, 0xc4a: 0x1fb2, 0xc4b: 0x07d5,\n\t0xc4c: 0x1fc2, 0xc4d: 0x1fd2, 0xc4e: 0x1fe2, 0xc4f: 0x0040, 0xc50: 0x0039, 0xc51: 0x0f09,\n\t0xc52: 0x00d9, 0xc53: 0x0369, 0xc54: 0x0ff9, 0xc55: 0x0249, 0xc56: 0x0f51, 0xc57: 0x0359,\n\t0xc58: 0x0f61, 0xc59: 0x0f71, 0xc5a: 0x0f99, 0xc5b: 0x01d9, 0xc5c: 0x0fa9, 0xc5d: 0x0040,\n\t0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018,\n\t0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x1ff1, 0xc69: 0x0018,\n\t0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018,\n\t0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018,\n\t0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018,\n\t0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x07ee, 0xc81: 0x080e, 0xc82: 0x1159, 0xc83: 0x082d, 0xc84: 0x0018, 0xc85: 0x084e,\n\t0xc86: 0x086e, 0xc87: 0x1011, 0xc88: 0x0018, 0xc89: 0x088d, 0xc8a: 0x0f31, 0xc8b: 0x0249,\n\t0xc8c: 0x0249, 0xc8d: 0x0249, 0xc8e: 0x0249, 0xc8f: 0x2009, 0xc90: 0x0f41, 0xc91: 0x0f41,\n\t0xc92: 0x0359, 0xc93: 0x0359, 0xc94: 0x0018, 0xc95: 0x0f71, 0xc96: 0x2021, 0xc97: 0x0018,\n\t0xc98: 0x0018, 0xc99: 0x0f99, 0xc9a: 0x2039, 0xc9b: 0x0269, 0xc9c: 0x0269, 0xc9d: 0x0269,\n\t0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x2049, 0xca1: 0x08ad, 0xca2: 0x2061, 0xca3: 0x0018,\n\t0xca4: 0x13d1, 0xca5: 0x0018, 0xca6: 0x2079, 0xca7: 0x0018, 0xca8: 0x13d1, 0xca9: 0x0018,\n\t0xcaa: 0x0f51, 0xcab: 0x2091, 0xcac: 0x0ee9, 0xcad: 0x1159, 0xcae: 0x0018, 0xcaf: 0x0f09,\n\t0xcb0: 0x0f09, 0xcb1: 0x1199, 0xcb2: 0x0040, 0xcb3: 0x0f61, 0xcb4: 0x00d9, 0xcb5: 0x20a9,\n\t0xcb6: 0x20c1, 0xcb7: 0x20d9, 0xcb8: 0x20f1, 0xcb9: 0x0f41, 0xcba: 0x0018, 0xcbb: 0x08cd,\n\t0xcbc: 0x2109, 0xcbd: 0x10b1, 0xcbe: 0x10b1, 0xcbf: 0x2109,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x08ed, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0ef9,\n\t0xcc6: 0x0ef9, 0xcc7: 0x0f09, 0xcc8: 0x0f41, 0xcc9: 0x0259, 0xcca: 0x0018, 0xccb: 0x0018,\n\t0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x2121, 0xcd1: 0x2151,\n\t0xcd2: 0x2181, 0xcd3: 0x21b9, 0xcd4: 0x21e9, 0xcd5: 0x2219, 0xcd6: 0x2249, 0xcd7: 0x2279,\n\t0xcd8: 0x22a9, 0xcd9: 0x22d9, 0xcda: 0x2309, 0xcdb: 0x2339, 0xcdc: 0x2369, 0xcdd: 0x2399,\n\t0xcde: 0x23c9, 0xcdf: 0x23f9, 0xce0: 0x0f41, 0xce1: 0x2421, 0xce2: 0x0905, 0xce3: 0x2439,\n\t0xce4: 0x1089, 0xce5: 0x2451, 0xce6: 0x0925, 0xce7: 0x2469, 0xce8: 0x2491, 0xce9: 0x0369,\n\t0xcea: 0x24a9, 0xceb: 0x0945, 0xcec: 0x0359, 0xced: 0x1159, 0xcee: 0x0ef9, 0xcef: 0x0f61,\n\t0xcf0: 0x0f41, 0xcf1: 0x2421, 0xcf2: 0x0965, 0xcf3: 0x2439, 0xcf4: 0x1089, 0xcf5: 0x2451,\n\t0xcf6: 0x0985, 0xcf7: 0x2469, 0xcf8: 0x2491, 0xcf9: 0x0369, 0xcfa: 0x24a9, 0xcfb: 0x09a5,\n\t0xcfc: 0x0359, 0xcfd: 0x1159, 0xcfe: 0x0ef9, 0xcff: 0x0f61,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018,\n\t0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040,\n\t0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,\n\t0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,\n\t0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040,\n\t0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x00c9, 0xd21: 0x0069, 0xd22: 0x0079, 0xd23: 0x1f51,\n\t0xd24: 0x1f61, 0xd25: 0x1f71, 0xd26: 0x1f81, 0xd27: 0x1f91, 0xd28: 0x1fa1, 0xd29: 0x2601,\n\t0xd2a: 0x2619, 0xd2b: 0x2631, 0xd2c: 0x2649, 0xd2d: 0x2661, 0xd2e: 0x2679, 0xd2f: 0x2691,\n\t0xd30: 0x26a9, 0xd31: 0x26c1, 0xd32: 0x26d9, 0xd33: 0x26f1, 0xd34: 0x0a06, 0xd35: 0x0a26,\n\t0xd36: 0x0a46, 0xd37: 0x0a66, 0xd38: 0x0a86, 0xd39: 0x0aa6, 0xd3a: 0x0ac6, 0xd3b: 0x0ae6,\n\t0xd3c: 0x0b06, 0xd3d: 0x270a, 0xd3e: 0x2732, 0xd3f: 0x275a,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x2782, 0xd41: 0x27aa, 0xd42: 0x27d2, 0xd43: 0x27fa, 0xd44: 0x2822, 0xd45: 0x284a,\n\t0xd46: 0x2872, 0xd47: 0x289a, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040,\n\t0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,\n\t0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,\n\t0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b26, 0xd5d: 0x0b46,\n\t0xd5e: 0x0b66, 0xd5f: 0x0b86, 0xd60: 0x0ba6, 0xd61: 0x0bc6, 0xd62: 0x0be6, 0xd63: 0x0c06,\n\t0xd64: 0x0c26, 0xd65: 0x0c46, 0xd66: 0x0c66, 0xd67: 0x0c86, 0xd68: 0x0ca6, 0xd69: 0x0cc6,\n\t0xd6a: 0x0ce6, 0xd6b: 0x0d06, 0xd6c: 0x0d26, 0xd6d: 0x0d46, 0xd6e: 0x0d66, 0xd6f: 0x0d86,\n\t0xd70: 0x0da6, 0xd71: 0x0dc6, 0xd72: 0x0de6, 0xd73: 0x0e06, 0xd74: 0x0e26, 0xd75: 0x0e46,\n\t0xd76: 0x0039, 0xd77: 0x0ee9, 0xd78: 0x1159, 0xd79: 0x0ef9, 0xd7a: 0x0f09, 0xd7b: 0x1199,\n\t0xd7c: 0x0f31, 0xd7d: 0x0249, 0xd7e: 0x0f41, 0xd7f: 0x0259,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0f51, 0xd81: 0x0359, 0xd82: 0x0f61, 0xd83: 0x0f71, 0xd84: 0x00d9, 0xd85: 0x0f99,\n\t0xd86: 0x2039, 0xd87: 0x0269, 0xd88: 0x01d9, 0xd89: 0x0fa9, 0xd8a: 0x0fb9, 0xd8b: 0x1089,\n\t0xd8c: 0x0279, 0xd8d: 0x0369, 0xd8e: 0x0289, 0xd8f: 0x13d1, 0xd90: 0x0039, 0xd91: 0x0ee9,\n\t0xd92: 0x1159, 0xd93: 0x0ef9, 0xd94: 0x0f09, 0xd95: 0x1199, 0xd96: 0x0f31, 0xd97: 0x0249,\n\t0xd98: 0x0f41, 0xd99: 0x0259, 0xd9a: 0x0f51, 0xd9b: 0x0359, 0xd9c: 0x0f61, 0xd9d: 0x0f71,\n\t0xd9e: 0x00d9, 0xd9f: 0x0f99, 0xda0: 0x2039, 0xda1: 0x0269, 0xda2: 0x01d9, 0xda3: 0x0fa9,\n\t0xda4: 0x0fb9, 0xda5: 0x1089, 0xda6: 0x0279, 0xda7: 0x0369, 0xda8: 0x0289, 0xda9: 0x13d1,\n\t0xdaa: 0x1f41, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018,\n\t0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018,\n\t0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018,\n\t0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008,\n\t0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008,\n\t0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008,\n\t0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008,\n\t0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008,\n\t0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x2971, 0xde3: 0x0ebd,\n\t0xde4: 0x2989, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d,\n\t0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0fe1, 0xdee: 0x1281, 0xdef: 0x0fc9,\n\t0xdf0: 0x1141, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d,\n\t0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008,\n\t0xdfc: 0x0259, 0xdfd: 0x1089, 0xdfe: 0x29a1, 0xdff: 0x29b9,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008,\n\t0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008,\n\t0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008,\n\t0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008,\n\t0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008,\n\t0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008,\n\t0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018,\n\t0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308,\n\t0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040,\n\t0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018,\n\t0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x26fd, 0xe41: 0x271d, 0xe42: 0x273d, 0xe43: 0x275d, 0xe44: 0x277d, 0xe45: 0x279d,\n\t0xe46: 0x27bd, 0xe47: 0x27dd, 0xe48: 0x27fd, 0xe49: 0x281d, 0xe4a: 0x283d, 0xe4b: 0x285d,\n\t0xe4c: 0x287d, 0xe4d: 0x289d, 0xe4e: 0x28bd, 0xe4f: 0x28dd, 0xe50: 0x28fd, 0xe51: 0x291d,\n\t0xe52: 0x293d, 0xe53: 0x295d, 0xe54: 0x297d, 0xe55: 0x299d, 0xe56: 0x0040, 0xe57: 0x0040,\n\t0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040,\n\t0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040,\n\t0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040,\n\t0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040,\n\t0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040,\n\t0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040,\n\t0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x29d1, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008,\n\t0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018,\n\t0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018,\n\t0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018,\n\t0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018,\n\t0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018,\n\t0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018,\n\t0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018,\n\t0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018,\n\t0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29bd, 0xeb9: 0x29dd, 0xeba: 0x29fd, 0xebb: 0x0018,\n\t0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2b3d, 0xec1: 0x2b5d, 0xec2: 0x2b7d, 0xec3: 0x2b9d, 0xec4: 0x2bbd, 0xec5: 0x2bdd,\n\t0xec6: 0x2bdd, 0xec7: 0x2bdd, 0xec8: 0x2bfd, 0xec9: 0x2bfd, 0xeca: 0x2bfd, 0xecb: 0x2bfd,\n\t0xecc: 0x2c1d, 0xecd: 0x2c1d, 0xece: 0x2c1d, 0xecf: 0x2c3d, 0xed0: 0x2c5d, 0xed1: 0x2c5d,\n\t0xed2: 0x2a7d, 0xed3: 0x2a7d, 0xed4: 0x2c5d, 0xed5: 0x2c5d, 0xed6: 0x2c7d, 0xed7: 0x2c7d,\n\t0xed8: 0x2c5d, 0xed9: 0x2c5d, 0xeda: 0x2a7d, 0xedb: 0x2a7d, 0xedc: 0x2c5d, 0xedd: 0x2c5d,\n\t0xede: 0x2c3d, 0xedf: 0x2c3d, 0xee0: 0x2c9d, 0xee1: 0x2c9d, 0xee2: 0x2cbd, 0xee3: 0x2cbd,\n\t0xee4: 0x0040, 0xee5: 0x2cdd, 0xee6: 0x2cfd, 0xee7: 0x2d1d, 0xee8: 0x2d1d, 0xee9: 0x2d3d,\n\t0xeea: 0x2d5d, 0xeeb: 0x2d7d, 0xeec: 0x2d9d, 0xeed: 0x2dbd, 0xeee: 0x2ddd, 0xeef: 0x2dfd,\n\t0xef0: 0x2e1d, 0xef1: 0x2e3d, 0xef2: 0x2e3d, 0xef3: 0x2e5d, 0xef4: 0x2e7d, 0xef5: 0x2e7d,\n\t0xef6: 0x2e9d, 0xef7: 0x2ebd, 0xef8: 0x2e5d, 0xef9: 0x2edd, 0xefa: 0x2efd, 0xefb: 0x2edd,\n\t0xefc: 0x2e5d, 0xefd: 0x2f1d, 0xefe: 0x2f3d, 0xeff: 0x2f5d,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x2f7d, 0xf01: 0x2f9d, 0xf02: 0x2cfd, 0xf03: 0x2cdd, 0xf04: 0x2fbd, 0xf05: 0x2fdd,\n\t0xf06: 0x2ffd, 0xf07: 0x301d, 0xf08: 0x303d, 0xf09: 0x305d, 0xf0a: 0x307d, 0xf0b: 0x309d,\n\t0xf0c: 0x30bd, 0xf0d: 0x30dd, 0xf0e: 0x30fd, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018,\n\t0xf12: 0x311d, 0xf13: 0x313d, 0xf14: 0x315d, 0xf15: 0x317d, 0xf16: 0x319d, 0xf17: 0x31bd,\n\t0xf18: 0x31dd, 0xf19: 0x31fd, 0xf1a: 0x321d, 0xf1b: 0x323d, 0xf1c: 0x315d, 0xf1d: 0x325d,\n\t0xf1e: 0x327d, 0xf1f: 0x329d, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008,\n\t0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008,\n\t0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008,\n\t0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008,\n\t0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0040,\n\t0xf3c: 0x0040, 0xf3d: 0x0040, 0xf3e: 0x0040, 0xf3f: 0x0040,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x36a2, 0xf41: 0x36d2, 0xf42: 0x3702, 0xf43: 0x3732, 0xf44: 0x32bd, 0xf45: 0x32dd,\n\t0xf46: 0x32fd, 0xf47: 0x331d, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018,\n\t0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x333d, 0xf51: 0x3761,\n\t0xf52: 0x3779, 0xf53: 0x3791, 0xf54: 0x37a9, 0xf55: 0x37c1, 0xf56: 0x37d9, 0xf57: 0x37f1,\n\t0xf58: 0x3809, 0xf59: 0x3821, 0xf5a: 0x3839, 0xf5b: 0x3851, 0xf5c: 0x3869, 0xf5d: 0x3881,\n\t0xf5e: 0x3899, 0xf5f: 0x38b1, 0xf60: 0x335d, 0xf61: 0x337d, 0xf62: 0x339d, 0xf63: 0x33bd,\n\t0xf64: 0x33dd, 0xf65: 0x33dd, 0xf66: 0x33fd, 0xf67: 0x341d, 0xf68: 0x343d, 0xf69: 0x345d,\n\t0xf6a: 0x347d, 0xf6b: 0x349d, 0xf6c: 0x34bd, 0xf6d: 0x34dd, 0xf6e: 0x34fd, 0xf6f: 0x351d,\n\t0xf70: 0x353d, 0xf71: 0x355d, 0xf72: 0x357d, 0xf73: 0x359d, 0xf74: 0x35bd, 0xf75: 0x35dd,\n\t0xf76: 0x35fd, 0xf77: 0x361d, 0xf78: 0x363d, 0xf79: 0x365d, 0xf7a: 0x367d, 0xf7b: 0x369d,\n\t0xf7c: 0x38c9, 0xf7d: 0x3901, 0xf7e: 0x36bd, 0xf7f: 0x0018,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x36dd, 0xf81: 0x36fd, 0xf82: 0x371d, 0xf83: 0x373d, 0xf84: 0x375d, 0xf85: 0x377d,\n\t0xf86: 0x379d, 0xf87: 0x37bd, 0xf88: 0x37dd, 0xf89: 0x37fd, 0xf8a: 0x381d, 0xf8b: 0x383d,\n\t0xf8c: 0x385d, 0xf8d: 0x387d, 0xf8e: 0x389d, 0xf8f: 0x38bd, 0xf90: 0x38dd, 0xf91: 0x38fd,\n\t0xf92: 0x391d, 0xf93: 0x393d, 0xf94: 0x395d, 0xf95: 0x397d, 0xf96: 0x399d, 0xf97: 0x39bd,\n\t0xf98: 0x39dd, 0xf99: 0x39fd, 0xf9a: 0x3a1d, 0xf9b: 0x3a3d, 0xf9c: 0x3a5d, 0xf9d: 0x3a7d,\n\t0xf9e: 0x3a9d, 0xf9f: 0x3abd, 0xfa0: 0x3add, 0xfa1: 0x3afd, 0xfa2: 0x3b1d, 0xfa3: 0x3b3d,\n\t0xfa4: 0x3b5d, 0xfa5: 0x3b7d, 0xfa6: 0x127d, 0xfa7: 0x3b9d, 0xfa8: 0x3bbd, 0xfa9: 0x3bdd,\n\t0xfaa: 0x3bfd, 0xfab: 0x3c1d, 0xfac: 0x3c3d, 0xfad: 0x3c5d, 0xfae: 0x239d, 0xfaf: 0x3c7d,\n\t0xfb0: 0x3c9d, 0xfb1: 0x3939, 0xfb2: 0x3951, 0xfb3: 0x3969, 0xfb4: 0x3981, 0xfb5: 0x3999,\n\t0xfb6: 0x39b1, 0xfb7: 0x39c9, 0xfb8: 0x39e1, 0xfb9: 0x39f9, 0xfba: 0x3a11, 0xfbb: 0x3a29,\n\t0xfbc: 0x3a41, 0xfbd: 0x3a59, 0xfbe: 0x3a71, 0xfbf: 0x3a89,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x3aa1, 0xfc1: 0x3ac9, 0xfc2: 0x3af1, 0xfc3: 0x3b19, 0xfc4: 0x3b41, 0xfc5: 0x3b69,\n\t0xfc6: 0x3b91, 0xfc7: 0x3bb9, 0xfc8: 0x3be1, 0xfc9: 0x3c09, 0xfca: 0x3c39, 0xfcb: 0x3c69,\n\t0xfcc: 0x3c99, 0xfcd: 0x3cbd, 0xfce: 0x3cb1, 0xfcf: 0x3cdd, 0xfd0: 0x3cfd, 0xfd1: 0x3d15,\n\t0xfd2: 0x3d2d, 0xfd3: 0x3d45, 0xfd4: 0x3d5d, 0xfd5: 0x3d5d, 0xfd6: 0x3d45, 0xfd7: 0x3d75,\n\t0xfd8: 0x07bd, 0xfd9: 0x3d8d, 0xfda: 0x3da5, 0xfdb: 0x3dbd, 0xfdc: 0x3dd5, 0xfdd: 0x3ded,\n\t0xfde: 0x3e05, 0xfdf: 0x3e1d, 0xfe0: 0x3e35, 0xfe1: 0x3e4d, 0xfe2: 0x3e65, 0xfe3: 0x3e7d,\n\t0xfe4: 0x3e95, 0xfe5: 0x3e95, 0xfe6: 0x3ead, 0xfe7: 0x3ead, 0xfe8: 0x3ec5, 0xfe9: 0x3ec5,\n\t0xfea: 0x3edd, 0xfeb: 0x3ef5, 0xfec: 0x3f0d, 0xfed: 0x3f25, 0xfee: 0x3f3d, 0xfef: 0x3f3d,\n\t0xff0: 0x3f55, 0xff1: 0x3f55, 0xff2: 0x3f55, 0xff3: 0x3f6d, 0xff4: 0x3f85, 0xff5: 0x3f9d,\n\t0xff6: 0x3fb5, 0xff7: 0x3f9d, 0xff8: 0x3fcd, 0xff9: 0x3fe5, 0xffa: 0x3f6d, 0xffb: 0x3ffd,\n\t0xffc: 0x4015, 0xffd: 0x4015, 0xffe: 0x4015, 0xfff: 0x0040,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x3cc9, 0x1001: 0x3d31, 0x1002: 0x3d99, 0x1003: 0x3e01, 0x1004: 0x3e51, 0x1005: 0x3eb9,\n\t0x1006: 0x3f09, 0x1007: 0x3f59, 0x1008: 0x3fd9, 0x1009: 0x4041, 0x100a: 0x4091, 0x100b: 0x40e1,\n\t0x100c: 0x4131, 0x100d: 0x4199, 0x100e: 0x4201, 0x100f: 0x4251, 0x1010: 0x42a1, 0x1011: 0x42d9,\n\t0x1012: 0x4329, 0x1013: 0x4391, 0x1014: 0x43f9, 0x1015: 0x4431, 0x1016: 0x44b1, 0x1017: 0x4549,\n\t0x1018: 0x45c9, 0x1019: 0x4619, 0x101a: 0x4699, 0x101b: 0x4719, 0x101c: 0x4781, 0x101d: 0x47d1,\n\t0x101e: 0x4821, 0x101f: 0x4871, 0x1020: 0x48d9, 0x1021: 0x4959, 0x1022: 0x49c1, 0x1023: 0x4a11,\n\t0x1024: 0x4a61, 0x1025: 0x4ab1, 0x1026: 0x4ae9, 0x1027: 0x4b21, 0x1028: 0x4b59, 0x1029: 0x4b91,\n\t0x102a: 0x4be1, 0x102b: 0x4c31, 0x102c: 0x4cb1, 0x102d: 0x4d01, 0x102e: 0x4d69, 0x102f: 0x4de9,\n\t0x1030: 0x4e39, 0x1031: 0x4e71, 0x1032: 0x4ea9, 0x1033: 0x4f29, 0x1034: 0x4f91, 0x1035: 0x5011,\n\t0x1036: 0x5061, 0x1037: 0x50e1, 0x1038: 0x5119, 0x1039: 0x5169, 0x103a: 0x51b9, 0x103b: 0x5209,\n\t0x103c: 0x5259, 0x103d: 0x52a9, 0x103e: 0x5311, 0x103f: 0x5361,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x5399, 0x1041: 0x53e9, 0x1042: 0x5439, 0x1043: 0x5489, 0x1044: 0x54f1, 0x1045: 0x5541,\n\t0x1046: 0x5591, 0x1047: 0x55e1, 0x1048: 0x5661, 0x1049: 0x56c9, 0x104a: 0x5701, 0x104b: 0x5781,\n\t0x104c: 0x57b9, 0x104d: 0x5821, 0x104e: 0x5889, 0x104f: 0x58d9, 0x1050: 0x5929, 0x1051: 0x5979,\n\t0x1052: 0x59e1, 0x1053: 0x5a19, 0x1054: 0x5a69, 0x1055: 0x5ad1, 0x1056: 0x5b09, 0x1057: 0x5b89,\n\t0x1058: 0x5bd9, 0x1059: 0x5c01, 0x105a: 0x5c29, 0x105b: 0x5c51, 0x105c: 0x5c79, 0x105d: 0x5ca1,\n\t0x105e: 0x5cc9, 0x105f: 0x5cf1, 0x1060: 0x5d19, 0x1061: 0x5d41, 0x1062: 0x5d69, 0x1063: 0x5d99,\n\t0x1064: 0x5dc9, 0x1065: 0x5df9, 0x1066: 0x5e29, 0x1067: 0x5e59, 0x1068: 0x5e89, 0x1069: 0x5eb9,\n\t0x106a: 0x5ee9, 0x106b: 0x5f19, 0x106c: 0x5f49, 0x106d: 0x5f79, 0x106e: 0x5fa9, 0x106f: 0x5fd9,\n\t0x1070: 0x6009, 0x1071: 0x402d, 0x1072: 0x6039, 0x1073: 0x6051, 0x1074: 0x404d, 0x1075: 0x6069,\n\t0x1076: 0x6081, 0x1077: 0x6099, 0x1078: 0x406d, 0x1079: 0x406d, 0x107a: 0x60b1, 0x107b: 0x60c9,\n\t0x107c: 0x6101, 0x107d: 0x6139, 0x107e: 0x6171, 0x107f: 0x61a9,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x6211, 0x1081: 0x6229, 0x1082: 0x408d, 0x1083: 0x6241, 0x1084: 0x6259, 0x1085: 0x6271,\n\t0x1086: 0x6289, 0x1087: 0x62a1, 0x1088: 0x40ad, 0x1089: 0x62b9, 0x108a: 0x62e1, 0x108b: 0x62f9,\n\t0x108c: 0x40cd, 0x108d: 0x40cd, 0x108e: 0x6311, 0x108f: 0x6329, 0x1090: 0x6341, 0x1091: 0x40ed,\n\t0x1092: 0x410d, 0x1093: 0x412d, 0x1094: 0x414d, 0x1095: 0x416d, 0x1096: 0x6359, 0x1097: 0x6371,\n\t0x1098: 0x6389, 0x1099: 0x63a1, 0x109a: 0x63b9, 0x109b: 0x418d, 0x109c: 0x63d1, 0x109d: 0x63e9,\n\t0x109e: 0x6401, 0x109f: 0x41ad, 0x10a0: 0x41cd, 0x10a1: 0x6419, 0x10a2: 0x41ed, 0x10a3: 0x420d,\n\t0x10a4: 0x422d, 0x10a5: 0x6431, 0x10a6: 0x424d, 0x10a7: 0x6449, 0x10a8: 0x6479, 0x10a9: 0x6211,\n\t0x10aa: 0x426d, 0x10ab: 0x428d, 0x10ac: 0x42ad, 0x10ad: 0x42cd, 0x10ae: 0x64b1, 0x10af: 0x64f1,\n\t0x10b0: 0x6539, 0x10b1: 0x6551, 0x10b2: 0x42ed, 0x10b3: 0x6569, 0x10b4: 0x6581, 0x10b5: 0x6599,\n\t0x10b6: 0x430d, 0x10b7: 0x65b1, 0x10b8: 0x65c9, 0x10b9: 0x65b1, 0x10ba: 0x65e1, 0x10bb: 0x65f9,\n\t0x10bc: 0x432d, 0x10bd: 0x6611, 0x10be: 0x6629, 0x10bf: 0x6611,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x434d, 0x10c1: 0x436d, 0x10c2: 0x0040, 0x10c3: 0x6641, 0x10c4: 0x6659, 0x10c5: 0x6671,\n\t0x10c6: 0x6689, 0x10c7: 0x0040, 0x10c8: 0x66c1, 0x10c9: 0x66d9, 0x10ca: 0x66f1, 0x10cb: 0x6709,\n\t0x10cc: 0x6721, 0x10cd: 0x6739, 0x10ce: 0x6401, 0x10cf: 0x6751, 0x10d0: 0x6769, 0x10d1: 0x6781,\n\t0x10d2: 0x438d, 0x10d3: 0x6799, 0x10d4: 0x6289, 0x10d5: 0x43ad, 0x10d6: 0x43cd, 0x10d7: 0x67b1,\n\t0x10d8: 0x0040, 0x10d9: 0x43ed, 0x10da: 0x67c9, 0x10db: 0x67e1, 0x10dc: 0x67f9, 0x10dd: 0x6811,\n\t0x10de: 0x6829, 0x10df: 0x6859, 0x10e0: 0x6889, 0x10e1: 0x68b1, 0x10e2: 0x68d9, 0x10e3: 0x6901,\n\t0x10e4: 0x6929, 0x10e5: 0x6951, 0x10e6: 0x6979, 0x10e7: 0x69a1, 0x10e8: 0x69c9, 0x10e9: 0x69f1,\n\t0x10ea: 0x6a21, 0x10eb: 0x6a51, 0x10ec: 0x6a81, 0x10ed: 0x6ab1, 0x10ee: 0x6ae1, 0x10ef: 0x6b11,\n\t0x10f0: 0x6b41, 0x10f1: 0x6b71, 0x10f2: 0x6ba1, 0x10f3: 0x6bd1, 0x10f4: 0x6c01, 0x10f5: 0x6c31,\n\t0x10f6: 0x6c61, 0x10f7: 0x6c91, 0x10f8: 0x6cc1, 0x10f9: 0x6cf1, 0x10fa: 0x6d21, 0x10fb: 0x6d51,\n\t0x10fc: 0x6d81, 0x10fd: 0x6db1, 0x10fe: 0x6de1, 0x10ff: 0x440d,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,\n\t0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,\n\t0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,\n\t0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,\n\t0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0xe00d, 0x111d: 0x0008,\n\t0x111e: 0xe00d, 0x111f: 0x0008, 0x1120: 0xe00d, 0x1121: 0x0008, 0x1122: 0xe00d, 0x1123: 0x0008,\n\t0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008,\n\t0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x3308,\n\t0x1130: 0x3318, 0x1131: 0x3318, 0x1132: 0x3318, 0x1133: 0x0018, 0x1134: 0x3308, 0x1135: 0x3308,\n\t0x1136: 0x3308, 0x1137: 0x3308, 0x1138: 0x3308, 0x1139: 0x3308, 0x113a: 0x3308, 0x113b: 0x3308,\n\t0x113c: 0x3308, 0x113d: 0x3308, 0x113e: 0x0018, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008,\n\t0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008,\n\t0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008,\n\t0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008,\n\t0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0x0ea1, 0x115d: 0x6e11,\n\t0x115e: 0x3308, 0x115f: 0x3308, 0x1160: 0x0008, 0x1161: 0x0008, 0x1162: 0x0008, 0x1163: 0x0008,\n\t0x1164: 0x0008, 0x1165: 0x0008, 0x1166: 0x0008, 0x1167: 0x0008, 0x1168: 0x0008, 0x1169: 0x0008,\n\t0x116a: 0x0008, 0x116b: 0x0008, 0x116c: 0x0008, 0x116d: 0x0008, 0x116e: 0x0008, 0x116f: 0x0008,\n\t0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008,\n\t0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0x0008, 0x117a: 0x0008, 0x117b: 0x0008,\n\t0x117c: 0x0008, 0x117d: 0x0008, 0x117e: 0x0008, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0x0018, 0x1181: 0x0018, 0x1182: 0x0018, 0x1183: 0x0018, 0x1184: 0x0018, 0x1185: 0x0018,\n\t0x1186: 0x0018, 0x1187: 0x0018, 0x1188: 0x0018, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0x0018,\n\t0x118c: 0x0018, 0x118d: 0x0018, 0x118e: 0x0018, 0x118f: 0x0018, 0x1190: 0x0018, 0x1191: 0x0018,\n\t0x1192: 0x0018, 0x1193: 0x0018, 0x1194: 0x0018, 0x1195: 0x0018, 0x1196: 0x0018, 0x1197: 0x0008,\n\t0x1198: 0x0008, 0x1199: 0x0008, 0x119a: 0x0008, 0x119b: 0x0008, 0x119c: 0x0008, 0x119d: 0x0008,\n\t0x119e: 0x0008, 0x119f: 0x0008, 0x11a0: 0x0018, 0x11a1: 0x0018, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,\n\t0x11b0: 0x0008, 0x11b1: 0x0008, 0x11b2: 0xe00d, 0x11b3: 0x0008, 0x11b4: 0xe00d, 0x11b5: 0x0008,\n\t0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008,\n\t0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,\n\t0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0xe00d, 0x11c9: 0x0008, 0x11ca: 0xe00d, 0x11cb: 0x0008,\n\t0x11cc: 0xe00d, 0x11cd: 0x0008, 0x11ce: 0xe00d, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,\n\t0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0xe00d, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,\n\t0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,\n\t0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,\n\t0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,\n\t0x11ea: 0xe00d, 0x11eb: 0x0008, 0x11ec: 0xe00d, 0x11ed: 0x0008, 0x11ee: 0xe00d, 0x11ef: 0x0008,\n\t0x11f0: 0xe0fd, 0x11f1: 0x0008, 0x11f2: 0x0008, 0x11f3: 0x0008, 0x11f4: 0x0008, 0x11f5: 0x0008,\n\t0x11f6: 0x0008, 0x11f7: 0x0008, 0x11f8: 0x0008, 0x11f9: 0xe01d, 0x11fa: 0x0008, 0x11fb: 0xe03d,\n\t0x11fc: 0x0008, 0x11fd: 0x442d, 0x11fe: 0xe00d, 0x11ff: 0x0008,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0xe00d, 0x1205: 0x0008,\n\t0x1206: 0xe00d, 0x1207: 0x0008, 0x1208: 0x0008, 0x1209: 0x0018, 0x120a: 0x0018, 0x120b: 0xe03d,\n\t0x120c: 0x0008, 0x120d: 0x11d9, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0xe00d, 0x1211: 0x0008,\n\t0x1212: 0xe00d, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008,\n\t0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0xe00d, 0x121b: 0x0008, 0x121c: 0xe00d, 0x121d: 0x0008,\n\t0x121e: 0xe00d, 0x121f: 0x0008, 0x1220: 0xe00d, 0x1221: 0x0008, 0x1222: 0xe00d, 0x1223: 0x0008,\n\t0x1224: 0xe00d, 0x1225: 0x0008, 0x1226: 0xe00d, 0x1227: 0x0008, 0x1228: 0xe00d, 0x1229: 0x0008,\n\t0x122a: 0x6e29, 0x122b: 0x1029, 0x122c: 0x11c1, 0x122d: 0x6e41, 0x122e: 0x1221, 0x122f: 0x0008,\n\t0x1230: 0x6e59, 0x1231: 0x6e71, 0x1232: 0x1239, 0x1233: 0x444d, 0x1234: 0xe00d, 0x1235: 0x0008,\n\t0x1236: 0xe00d, 0x1237: 0x0008, 0x1238: 0x0040, 0x1239: 0x0008, 0x123a: 0x0040, 0x123b: 0x0040,\n\t0x123c: 0x0040, 0x123d: 0x0040, 0x123e: 0x0040, 0x123f: 0x0040,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x64d5, 0x1241: 0x64f5, 0x1242: 0x6515, 0x1243: 0x6535, 0x1244: 0x6555, 0x1245: 0x6575,\n\t0x1246: 0x6595, 0x1247: 0x65b5, 0x1248: 0x65d5, 0x1249: 0x65f5, 0x124a: 0x6615, 0x124b: 0x6635,\n\t0x124c: 0x6655, 0x124d: 0x6675, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x6695, 0x1251: 0x0008,\n\t0x1252: 0x66b5, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x66d5, 0x1256: 0x66f5, 0x1257: 0x6715,\n\t0x1258: 0x6735, 0x1259: 0x6755, 0x125a: 0x6775, 0x125b: 0x6795, 0x125c: 0x67b5, 0x125d: 0x67d5,\n\t0x125e: 0x67f5, 0x125f: 0x0008, 0x1260: 0x6815, 0x1261: 0x0008, 0x1262: 0x6835, 0x1263: 0x0008,\n\t0x1264: 0x0008, 0x1265: 0x6855, 0x1266: 0x6875, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008,\n\t0x126a: 0x6895, 0x126b: 0x68b5, 0x126c: 0x68d5, 0x126d: 0x68f5, 0x126e: 0x6915, 0x126f: 0x6935,\n\t0x1270: 0x6955, 0x1271: 0x6975, 0x1272: 0x6995, 0x1273: 0x69b5, 0x1274: 0x69d5, 0x1275: 0x69f5,\n\t0x1276: 0x6a15, 0x1277: 0x6a35, 0x1278: 0x6a55, 0x1279: 0x6a75, 0x127a: 0x6a95, 0x127b: 0x6ab5,\n\t0x127c: 0x6ad5, 0x127d: 0x6af5, 0x127e: 0x6b15, 0x127f: 0x6b35,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x7a95, 0x1281: 0x7ab5, 0x1282: 0x7ad5, 0x1283: 0x7af5, 0x1284: 0x7b15, 0x1285: 0x7b35,\n\t0x1286: 0x7b55, 0x1287: 0x7b75, 0x1288: 0x7b95, 0x1289: 0x7bb5, 0x128a: 0x7bd5, 0x128b: 0x7bf5,\n\t0x128c: 0x7c15, 0x128d: 0x7c35, 0x128e: 0x7c55, 0x128f: 0x6ec9, 0x1290: 0x6ef1, 0x1291: 0x6f19,\n\t0x1292: 0x7c75, 0x1293: 0x7c95, 0x1294: 0x7cb5, 0x1295: 0x6f41, 0x1296: 0x6f69, 0x1297: 0x6f91,\n\t0x1298: 0x7cd5, 0x1299: 0x7cf5, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040,\n\t0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040,\n\t0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040,\n\t0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040,\n\t0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040,\n\t0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040,\n\t0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x6fb9, 0x12c1: 0x6fd1, 0x12c2: 0x6fe9, 0x12c3: 0x7d15, 0x12c4: 0x7d35, 0x12c5: 0x7001,\n\t0x12c6: 0x7001, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040,\n\t0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040,\n\t0x12d2: 0x0040, 0x12d3: 0x7019, 0x12d4: 0x7041, 0x12d5: 0x7069, 0x12d6: 0x7091, 0x12d7: 0x70b9,\n\t0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x70e1,\n\t0x12de: 0x3308, 0x12df: 0x7109, 0x12e0: 0x7131, 0x12e1: 0x20a9, 0x12e2: 0x20f1, 0x12e3: 0x7149,\n\t0x12e4: 0x7161, 0x12e5: 0x7179, 0x12e6: 0x7191, 0x12e7: 0x71a9, 0x12e8: 0x71c1, 0x12e9: 0x1fb2,\n\t0x12ea: 0x71d9, 0x12eb: 0x7201, 0x12ec: 0x7229, 0x12ed: 0x7261, 0x12ee: 0x7299, 0x12ef: 0x72c1,\n\t0x12f0: 0x72e9, 0x12f1: 0x7311, 0x12f2: 0x7339, 0x12f3: 0x7361, 0x12f4: 0x7389, 0x12f5: 0x73b1,\n\t0x12f6: 0x73d9, 0x12f7: 0x0040, 0x12f8: 0x7401, 0x12f9: 0x7429, 0x12fa: 0x7451, 0x12fb: 0x7479,\n\t0x12fc: 0x74a1, 0x12fd: 0x0040, 0x12fe: 0x74c9, 0x12ff: 0x0040,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x74f1, 0x1301: 0x7519, 0x1302: 0x0040, 0x1303: 0x7541, 0x1304: 0x7569, 0x1305: 0x0040,\n\t0x1306: 0x7591, 0x1307: 0x75b9, 0x1308: 0x75e1, 0x1309: 0x7609, 0x130a: 0x7631, 0x130b: 0x7659,\n\t0x130c: 0x7681, 0x130d: 0x76a9, 0x130e: 0x76d1, 0x130f: 0x76f9, 0x1310: 0x7721, 0x1311: 0x7721,\n\t0x1312: 0x7739, 0x1313: 0x7739, 0x1314: 0x7739, 0x1315: 0x7739, 0x1316: 0x7751, 0x1317: 0x7751,\n\t0x1318: 0x7751, 0x1319: 0x7751, 0x131a: 0x7769, 0x131b: 0x7769, 0x131c: 0x7769, 0x131d: 0x7769,\n\t0x131e: 0x7781, 0x131f: 0x7781, 0x1320: 0x7781, 0x1321: 0x7781, 0x1322: 0x7799, 0x1323: 0x7799,\n\t0x1324: 0x7799, 0x1325: 0x7799, 0x1326: 0x77b1, 0x1327: 0x77b1, 0x1328: 0x77b1, 0x1329: 0x77b1,\n\t0x132a: 0x77c9, 0x132b: 0x77c9, 0x132c: 0x77c9, 0x132d: 0x77c9, 0x132e: 0x77e1, 0x132f: 0x77e1,\n\t0x1330: 0x77e1, 0x1331: 0x77e1, 0x1332: 0x77f9, 0x1333: 0x77f9, 0x1334: 0x77f9, 0x1335: 0x77f9,\n\t0x1336: 0x7811, 0x1337: 0x7811, 0x1338: 0x7811, 0x1339: 0x7811, 0x133a: 0x7829, 0x133b: 0x7829,\n\t0x133c: 0x7829, 0x133d: 0x7829, 0x133e: 0x7841, 0x133f: 0x7841,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x7841, 0x1341: 0x7841, 0x1342: 0x7859, 0x1343: 0x7859, 0x1344: 0x7871, 0x1345: 0x7871,\n\t0x1346: 0x7889, 0x1347: 0x7889, 0x1348: 0x78a1, 0x1349: 0x78a1, 0x134a: 0x78b9, 0x134b: 0x78b9,\n\t0x134c: 0x78d1, 0x134d: 0x78d1, 0x134e: 0x78e9, 0x134f: 0x78e9, 0x1350: 0x78e9, 0x1351: 0x78e9,\n\t0x1352: 0x7901, 0x1353: 0x7901, 0x1354: 0x7901, 0x1355: 0x7901, 0x1356: 0x7919, 0x1357: 0x7919,\n\t0x1358: 0x7919, 0x1359: 0x7919, 0x135a: 0x7931, 0x135b: 0x7931, 0x135c: 0x7931, 0x135d: 0x7931,\n\t0x135e: 0x7949, 0x135f: 0x7949, 0x1360: 0x7961, 0x1361: 0x7961, 0x1362: 0x7961, 0x1363: 0x7961,\n\t0x1364: 0x7979, 0x1365: 0x7979, 0x1366: 0x7991, 0x1367: 0x7991, 0x1368: 0x7991, 0x1369: 0x7991,\n\t0x136a: 0x79a9, 0x136b: 0x79a9, 0x136c: 0x79a9, 0x136d: 0x79a9, 0x136e: 0x79c1, 0x136f: 0x79c1,\n\t0x1370: 0x79d9, 0x1371: 0x79d9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818,\n\t0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818,\n\t0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0040, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040,\n\t0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040,\n\t0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040,\n\t0x1392: 0x0040, 0x1393: 0x79f1, 0x1394: 0x79f1, 0x1395: 0x79f1, 0x1396: 0x79f1, 0x1397: 0x7a09,\n\t0x1398: 0x7a09, 0x1399: 0x7a21, 0x139a: 0x7a21, 0x139b: 0x7a39, 0x139c: 0x7a39, 0x139d: 0x0479,\n\t0x139e: 0x7a51, 0x139f: 0x7a51, 0x13a0: 0x7a69, 0x13a1: 0x7a69, 0x13a2: 0x7a81, 0x13a3: 0x7a81,\n\t0x13a4: 0x7a99, 0x13a5: 0x7a99, 0x13a6: 0x7a99, 0x13a7: 0x7a99, 0x13a8: 0x7ab1, 0x13a9: 0x7ab1,\n\t0x13aa: 0x7ac9, 0x13ab: 0x7ac9, 0x13ac: 0x7af1, 0x13ad: 0x7af1, 0x13ae: 0x7b19, 0x13af: 0x7b19,\n\t0x13b0: 0x7b41, 0x13b1: 0x7b41, 0x13b2: 0x7b69, 0x13b3: 0x7b69, 0x13b4: 0x7b91, 0x13b5: 0x7b91,\n\t0x13b6: 0x7bb9, 0x13b7: 0x7bb9, 0x13b8: 0x7bb9, 0x13b9: 0x7be1, 0x13ba: 0x7be1, 0x13bb: 0x7be1,\n\t0x13bc: 0x7c09, 0x13bd: 0x7c09, 0x13be: 0x7c09, 0x13bf: 0x7c09,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x85f9, 0x13c1: 0x8621, 0x13c2: 0x8649, 0x13c3: 0x8671, 0x13c4: 0x8699, 0x13c5: 0x86c1,\n\t0x13c6: 0x86e9, 0x13c7: 0x8711, 0x13c8: 0x8739, 0x13c9: 0x8761, 0x13ca: 0x8789, 0x13cb: 0x87b1,\n\t0x13cc: 0x87d9, 0x13cd: 0x8801, 0x13ce: 0x8829, 0x13cf: 0x8851, 0x13d0: 0x8879, 0x13d1: 0x88a1,\n\t0x13d2: 0x88c9, 0x13d3: 0x88f1, 0x13d4: 0x8919, 0x13d5: 0x8941, 0x13d6: 0x8969, 0x13d7: 0x8991,\n\t0x13d8: 0x89b9, 0x13d9: 0x89e1, 0x13da: 0x8a09, 0x13db: 0x8a31, 0x13dc: 0x8a59, 0x13dd: 0x8a81,\n\t0x13de: 0x8aaa, 0x13df: 0x8ada, 0x13e0: 0x8b0a, 0x13e1: 0x8b3a, 0x13e2: 0x8b6a, 0x13e3: 0x8b9a,\n\t0x13e4: 0x8bc9, 0x13e5: 0x8bf1, 0x13e6: 0x7c71, 0x13e7: 0x8c19, 0x13e8: 0x7be1, 0x13e9: 0x7c99,\n\t0x13ea: 0x8c41, 0x13eb: 0x8c69, 0x13ec: 0x7d39, 0x13ed: 0x8c91, 0x13ee: 0x7d61, 0x13ef: 0x7d89,\n\t0x13f0: 0x8cb9, 0x13f1: 0x8ce1, 0x13f2: 0x7e29, 0x13f3: 0x8d09, 0x13f4: 0x7e51, 0x13f5: 0x7e79,\n\t0x13f6: 0x8d31, 0x13f7: 0x8d59, 0x13f8: 0x7ec9, 0x13f9: 0x8d81, 0x13fa: 0x7ef1, 0x13fb: 0x7f19,\n\t0x13fc: 0x83a1, 0x13fd: 0x83c9, 0x13fe: 0x8441, 0x13ff: 0x8469,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x8491, 0x1401: 0x8531, 0x1402: 0x8559, 0x1403: 0x8581, 0x1404: 0x85a9, 0x1405: 0x8649,\n\t0x1406: 0x8671, 0x1407: 0x8699, 0x1408: 0x8da9, 0x1409: 0x8739, 0x140a: 0x8dd1, 0x140b: 0x8df9,\n\t0x140c: 0x8829, 0x140d: 0x8e21, 0x140e: 0x8851, 0x140f: 0x8879, 0x1410: 0x8a81, 0x1411: 0x8e49,\n\t0x1412: 0x8e71, 0x1413: 0x89b9, 0x1414: 0x8e99, 0x1415: 0x89e1, 0x1416: 0x8a09, 0x1417: 0x7c21,\n\t0x1418: 0x7c49, 0x1419: 0x8ec1, 0x141a: 0x7c71, 0x141b: 0x8ee9, 0x141c: 0x7cc1, 0x141d: 0x7ce9,\n\t0x141e: 0x7d11, 0x141f: 0x7d39, 0x1420: 0x8f11, 0x1421: 0x7db1, 0x1422: 0x7dd9, 0x1423: 0x7e01,\n\t0x1424: 0x7e29, 0x1425: 0x8f39, 0x1426: 0x7ec9, 0x1427: 0x7f41, 0x1428: 0x7f69, 0x1429: 0x7f91,\n\t0x142a: 0x7fb9, 0x142b: 0x7fe1, 0x142c: 0x8031, 0x142d: 0x8059, 0x142e: 0x8081, 0x142f: 0x80a9,\n\t0x1430: 0x80d1, 0x1431: 0x80f9, 0x1432: 0x8f61, 0x1433: 0x8121, 0x1434: 0x8149, 0x1435: 0x8171,\n\t0x1436: 0x8199, 0x1437: 0x81c1, 0x1438: 0x81e9, 0x1439: 0x8239, 0x143a: 0x8261, 0x143b: 0x8289,\n\t0x143c: 0x82b1, 0x143d: 0x82d9, 0x143e: 0x8301, 0x143f: 0x8329,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x8351, 0x1441: 0x8379, 0x1442: 0x83f1, 0x1443: 0x8419, 0x1444: 0x84b9, 0x1445: 0x84e1,\n\t0x1446: 0x8509, 0x1447: 0x8531, 0x1448: 0x8559, 0x1449: 0x85d1, 0x144a: 0x85f9, 0x144b: 0x8621,\n\t0x144c: 0x8649, 0x144d: 0x8f89, 0x144e: 0x86c1, 0x144f: 0x86e9, 0x1450: 0x8711, 0x1451: 0x8739,\n\t0x1452: 0x87b1, 0x1453: 0x87d9, 0x1454: 0x8801, 0x1455: 0x8829, 0x1456: 0x8fb1, 0x1457: 0x88a1,\n\t0x1458: 0x88c9, 0x1459: 0x8fd9, 0x145a: 0x8941, 0x145b: 0x8969, 0x145c: 0x8991, 0x145d: 0x89b9,\n\t0x145e: 0x9001, 0x145f: 0x7c71, 0x1460: 0x8ee9, 0x1461: 0x7d39, 0x1462: 0x8f11, 0x1463: 0x7e29,\n\t0x1464: 0x8f39, 0x1465: 0x7ec9, 0x1466: 0x9029, 0x1467: 0x80d1, 0x1468: 0x9051, 0x1469: 0x9079,\n\t0x146a: 0x90a1, 0x146b: 0x8531, 0x146c: 0x8559, 0x146d: 0x8649, 0x146e: 0x8829, 0x146f: 0x8fb1,\n\t0x1470: 0x89b9, 0x1471: 0x9001, 0x1472: 0x90c9, 0x1473: 0x9101, 0x1474: 0x9139, 0x1475: 0x9171,\n\t0x1476: 0x9199, 0x1477: 0x91c1, 0x1478: 0x91e9, 0x1479: 0x9211, 0x147a: 0x9239, 0x147b: 0x9261,\n\t0x147c: 0x9289, 0x147d: 0x92b1, 0x147e: 0x92d9, 0x147f: 0x9301,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x9329, 0x1481: 0x9351, 0x1482: 0x9379, 0x1483: 0x93a1, 0x1484: 0x93c9, 0x1485: 0x93f1,\n\t0x1486: 0x9419, 0x1487: 0x9441, 0x1488: 0x9469, 0x1489: 0x9491, 0x148a: 0x94b9, 0x148b: 0x94e1,\n\t0x148c: 0x9079, 0x148d: 0x9509, 0x148e: 0x9531, 0x148f: 0x9559, 0x1490: 0x9581, 0x1491: 0x9171,\n\t0x1492: 0x9199, 0x1493: 0x91c1, 0x1494: 0x91e9, 0x1495: 0x9211, 0x1496: 0x9239, 0x1497: 0x9261,\n\t0x1498: 0x9289, 0x1499: 0x92b1, 0x149a: 0x92d9, 0x149b: 0x9301, 0x149c: 0x9329, 0x149d: 0x9351,\n\t0x149e: 0x9379, 0x149f: 0x93a1, 0x14a0: 0x93c9, 0x14a1: 0x93f1, 0x14a2: 0x9419, 0x14a3: 0x9441,\n\t0x14a4: 0x9469, 0x14a5: 0x9491, 0x14a6: 0x94b9, 0x14a7: 0x94e1, 0x14a8: 0x9079, 0x14a9: 0x9509,\n\t0x14aa: 0x9531, 0x14ab: 0x9559, 0x14ac: 0x9581, 0x14ad: 0x9491, 0x14ae: 0x94b9, 0x14af: 0x94e1,\n\t0x14b0: 0x9079, 0x14b1: 0x9051, 0x14b2: 0x90a1, 0x14b3: 0x8211, 0x14b4: 0x8059, 0x14b5: 0x8081,\n\t0x14b6: 0x80a9, 0x14b7: 0x9491, 0x14b8: 0x94b9, 0x14b9: 0x94e1, 0x14ba: 0x8211, 0x14bb: 0x8239,\n\t0x14bc: 0x95a9, 0x14bd: 0x95a9, 0x14be: 0x0018, 0x14bf: 0x0018,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0040, 0x14c1: 0x0040, 0x14c2: 0x0040, 0x14c3: 0x0040, 0x14c4: 0x0040, 0x14c5: 0x0040,\n\t0x14c6: 0x0040, 0x14c7: 0x0040, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040,\n\t0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x95d1, 0x14d1: 0x9609,\n\t0x14d2: 0x9609, 0x14d3: 0x9641, 0x14d4: 0x9679, 0x14d5: 0x96b1, 0x14d6: 0x96e9, 0x14d7: 0x9721,\n\t0x14d8: 0x9759, 0x14d9: 0x9759, 0x14da: 0x9791, 0x14db: 0x97c9, 0x14dc: 0x9801, 0x14dd: 0x9839,\n\t0x14de: 0x9871, 0x14df: 0x98a9, 0x14e0: 0x98a9, 0x14e1: 0x98e1, 0x14e2: 0x9919, 0x14e3: 0x9919,\n\t0x14e4: 0x9951, 0x14e5: 0x9951, 0x14e6: 0x9989, 0x14e7: 0x99c1, 0x14e8: 0x99c1, 0x14e9: 0x99f9,\n\t0x14ea: 0x9a31, 0x14eb: 0x9a31, 0x14ec: 0x9a69, 0x14ed: 0x9a69, 0x14ee: 0x9aa1, 0x14ef: 0x9ad9,\n\t0x14f0: 0x9ad9, 0x14f1: 0x9b11, 0x14f2: 0x9b11, 0x14f3: 0x9b49, 0x14f4: 0x9b81, 0x14f5: 0x9bb9,\n\t0x14f6: 0x9bf1, 0x14f7: 0x9bf1, 0x14f8: 0x9c29, 0x14f9: 0x9c61, 0x14fa: 0x9c99, 0x14fb: 0x9cd1,\n\t0x14fc: 0x9d09, 0x14fd: 0x9d09, 0x14fe: 0x9d41, 0x14ff: 0x9d79,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0xa949, 0x1501: 0xa981, 0x1502: 0xa9b9, 0x1503: 0xa8a1, 0x1504: 0x9bb9, 0x1505: 0x9989,\n\t0x1506: 0xa9f1, 0x1507: 0xaa29, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040,\n\t0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0040, 0x1510: 0x0040, 0x1511: 0x0040,\n\t0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040,\n\t0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,\n\t0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040,\n\t0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040,\n\t0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,\n\t0x1530: 0xaa61, 0x1531: 0xaa99, 0x1532: 0xaad1, 0x1533: 0xab19, 0x1534: 0xab61, 0x1535: 0xaba9,\n\t0x1536: 0xabf1, 0x1537: 0xac39, 0x1538: 0xac81, 0x1539: 0xacc9, 0x153a: 0xad02, 0x153b: 0xae12,\n\t0x153c: 0xae91, 0x153d: 0x0018, 0x153e: 0x0040, 0x153f: 0x0040,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0,\n\t0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0,\n\t0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0xaeda, 0x1551: 0x7d55,\n\t0x1552: 0x0040, 0x1553: 0xaeea, 0x1554: 0x03c2, 0x1555: 0xaefa, 0x1556: 0xaf0a, 0x1557: 0x7d75,\n\t0x1558: 0x7d95, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040,\n\t0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308,\n\t0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308,\n\t0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308,\n\t0x1570: 0x0040, 0x1571: 0x7db5, 0x1572: 0x7dd5, 0x1573: 0xaf1a, 0x1574: 0xaf1a, 0x1575: 0x1fd2,\n\t0x1576: 0x1fe2, 0x1577: 0xaf2a, 0x1578: 0xaf3a, 0x1579: 0x7df5, 0x157a: 0x7e15, 0x157b: 0x7e35,\n\t0x157c: 0x7df5, 0x157d: 0x7e55, 0x157e: 0x7e75, 0x157f: 0x7e55,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x7e95, 0x1581: 0x7eb5, 0x1582: 0x7ed5, 0x1583: 0x7eb5, 0x1584: 0x7ef5, 0x1585: 0x0018,\n\t0x1586: 0x0018, 0x1587: 0xaf4a, 0x1588: 0xaf5a, 0x1589: 0x7f16, 0x158a: 0x7f36, 0x158b: 0x7f56,\n\t0x158c: 0x7f76, 0x158d: 0xaf1a, 0x158e: 0xaf1a, 0x158f: 0xaf1a, 0x1590: 0xaeda, 0x1591: 0x7f95,\n\t0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x03c2, 0x1595: 0xaeea, 0x1596: 0xaf0a, 0x1597: 0xaefa,\n\t0x1598: 0x7fb5, 0x1599: 0x1fd2, 0x159a: 0x1fe2, 0x159b: 0xaf2a, 0x159c: 0xaf3a, 0x159d: 0x7e95,\n\t0x159e: 0x7ef5, 0x159f: 0xaf6a, 0x15a0: 0xaf7a, 0x15a1: 0xaf8a, 0x15a2: 0x1fb2, 0x15a3: 0xaf99,\n\t0x15a4: 0xafaa, 0x15a5: 0xafba, 0x15a6: 0x1fc2, 0x15a7: 0x0040, 0x15a8: 0xafca, 0x15a9: 0xafda,\n\t0x15aa: 0xafea, 0x15ab: 0xaffa, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040,\n\t0x15b0: 0x7fd6, 0x15b1: 0xb009, 0x15b2: 0x7ff6, 0x15b3: 0x0808, 0x15b4: 0x8016, 0x15b5: 0x0040,\n\t0x15b6: 0x8036, 0x15b7: 0xb031, 0x15b8: 0x8056, 0x15b9: 0xb059, 0x15ba: 0x8076, 0x15bb: 0xb081,\n\t0x15bc: 0x8096, 0x15bd: 0xb0a9, 0x15be: 0x80b6, 0x15bf: 0xb0d1,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0xb0f9, 0x15c1: 0xb111, 0x15c2: 0xb111, 0x15c3: 0xb129, 0x15c4: 0xb129, 0x15c5: 0xb141,\n\t0x15c6: 0xb141, 0x15c7: 0xb159, 0x15c8: 0xb159, 0x15c9: 0xb171, 0x15ca: 0xb171, 0x15cb: 0xb171,\n\t0x15cc: 0xb171, 0x15cd: 0xb189, 0x15ce: 0xb189, 0x15cf: 0xb1a1, 0x15d0: 0xb1a1, 0x15d1: 0xb1a1,\n\t0x15d2: 0xb1a1, 0x15d3: 0xb1b9, 0x15d4: 0xb1b9, 0x15d5: 0xb1d1, 0x15d6: 0xb1d1, 0x15d7: 0xb1d1,\n\t0x15d8: 0xb1d1, 0x15d9: 0xb1e9, 0x15da: 0xb1e9, 0x15db: 0xb1e9, 0x15dc: 0xb1e9, 0x15dd: 0xb201,\n\t0x15de: 0xb201, 0x15df: 0xb201, 0x15e0: 0xb201, 0x15e1: 0xb219, 0x15e2: 0xb219, 0x15e3: 0xb219,\n\t0x15e4: 0xb219, 0x15e5: 0xb231, 0x15e6: 0xb231, 0x15e7: 0xb231, 0x15e8: 0xb231, 0x15e9: 0xb249,\n\t0x15ea: 0xb249, 0x15eb: 0xb261, 0x15ec: 0xb261, 0x15ed: 0xb279, 0x15ee: 0xb279, 0x15ef: 0xb291,\n\t0x15f0: 0xb291, 0x15f1: 0xb2a9, 0x15f2: 0xb2a9, 0x15f3: 0xb2a9, 0x15f4: 0xb2a9, 0x15f5: 0xb2c1,\n\t0x15f6: 0xb2c1, 0x15f7: 0xb2c1, 0x15f8: 0xb2c1, 0x15f9: 0xb2d9, 0x15fa: 0xb2d9, 0x15fb: 0xb2d9,\n\t0x15fc: 0xb2d9, 0x15fd: 0xb2f1, 0x15fe: 0xb2f1, 0x15ff: 0xb2f1,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0xb2f1, 0x1601: 0xb309, 0x1602: 0xb309, 0x1603: 0xb309, 0x1604: 0xb309, 0x1605: 0xb321,\n\t0x1606: 0xb321, 0x1607: 0xb321, 0x1608: 0xb321, 0x1609: 0xb339, 0x160a: 0xb339, 0x160b: 0xb339,\n\t0x160c: 0xb339, 0x160d: 0xb351, 0x160e: 0xb351, 0x160f: 0xb351, 0x1610: 0xb351, 0x1611: 0xb369,\n\t0x1612: 0xb369, 0x1613: 0xb369, 0x1614: 0xb369, 0x1615: 0xb381, 0x1616: 0xb381, 0x1617: 0xb381,\n\t0x1618: 0xb381, 0x1619: 0xb399, 0x161a: 0xb399, 0x161b: 0xb399, 0x161c: 0xb399, 0x161d: 0xb3b1,\n\t0x161e: 0xb3b1, 0x161f: 0xb3b1, 0x1620: 0xb3b1, 0x1621: 0xb3c9, 0x1622: 0xb3c9, 0x1623: 0xb3c9,\n\t0x1624: 0xb3c9, 0x1625: 0xb3e1, 0x1626: 0xb3e1, 0x1627: 0xb3e1, 0x1628: 0xb3e1, 0x1629: 0xb3f9,\n\t0x162a: 0xb3f9, 0x162b: 0xb3f9, 0x162c: 0xb3f9, 0x162d: 0xb411, 0x162e: 0xb411, 0x162f: 0x7ab1,\n\t0x1630: 0x7ab1, 0x1631: 0xb429, 0x1632: 0xb429, 0x1633: 0xb429, 0x1634: 0xb429, 0x1635: 0xb441,\n\t0x1636: 0xb441, 0x1637: 0xb469, 0x1638: 0xb469, 0x1639: 0xb491, 0x163a: 0xb491, 0x163b: 0xb4b9,\n\t0x163c: 0xb4b9, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0040, 0x1641: 0xaefa, 0x1642: 0xb4e2, 0x1643: 0xaf6a, 0x1644: 0xafda, 0x1645: 0xafea,\n\t0x1646: 0xaf7a, 0x1647: 0xb4f2, 0x1648: 0x1fd2, 0x1649: 0x1fe2, 0x164a: 0xaf8a, 0x164b: 0x1fb2,\n\t0x164c: 0xaeda, 0x164d: 0xaf99, 0x164e: 0x29d1, 0x164f: 0xb502, 0x1650: 0x1f41, 0x1651: 0x00c9,\n\t0x1652: 0x0069, 0x1653: 0x0079, 0x1654: 0x1f51, 0x1655: 0x1f61, 0x1656: 0x1f71, 0x1657: 0x1f81,\n\t0x1658: 0x1f91, 0x1659: 0x1fa1, 0x165a: 0xaeea, 0x165b: 0x03c2, 0x165c: 0xafaa, 0x165d: 0x1fc2,\n\t0x165e: 0xafba, 0x165f: 0xaf0a, 0x1660: 0xaffa, 0x1661: 0x0039, 0x1662: 0x0ee9, 0x1663: 0x1159,\n\t0x1664: 0x0ef9, 0x1665: 0x0f09, 0x1666: 0x1199, 0x1667: 0x0f31, 0x1668: 0x0249, 0x1669: 0x0f41,\n\t0x166a: 0x0259, 0x166b: 0x0f51, 0x166c: 0x0359, 0x166d: 0x0f61, 0x166e: 0x0f71, 0x166f: 0x00d9,\n\t0x1670: 0x0f99, 0x1671: 0x2039, 0x1672: 0x0269, 0x1673: 0x01d9, 0x1674: 0x0fa9, 0x1675: 0x0fb9,\n\t0x1676: 0x1089, 0x1677: 0x0279, 0x1678: 0x0369, 0x1679: 0x0289, 0x167a: 0x13d1, 0x167b: 0xaf4a,\n\t0x167c: 0xafca, 0x167d: 0xaf5a, 0x167e: 0xb512, 0x167f: 0xaf1a,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x1caa, 0x1681: 0x0039, 0x1682: 0x0ee9, 0x1683: 0x1159, 0x1684: 0x0ef9, 0x1685: 0x0f09,\n\t0x1686: 0x1199, 0x1687: 0x0f31, 0x1688: 0x0249, 0x1689: 0x0f41, 0x168a: 0x0259, 0x168b: 0x0f51,\n\t0x168c: 0x0359, 0x168d: 0x0f61, 0x168e: 0x0f71, 0x168f: 0x00d9, 0x1690: 0x0f99, 0x1691: 0x2039,\n\t0x1692: 0x0269, 0x1693: 0x01d9, 0x1694: 0x0fa9, 0x1695: 0x0fb9, 0x1696: 0x1089, 0x1697: 0x0279,\n\t0x1698: 0x0369, 0x1699: 0x0289, 0x169a: 0x13d1, 0x169b: 0xaf2a, 0x169c: 0xb522, 0x169d: 0xaf3a,\n\t0x169e: 0xb532, 0x169f: 0x80d5, 0x16a0: 0x80f5, 0x16a1: 0x29d1, 0x16a2: 0x8115, 0x16a3: 0x8115,\n\t0x16a4: 0x8135, 0x16a5: 0x8155, 0x16a6: 0x8175, 0x16a7: 0x8195, 0x16a8: 0x81b5, 0x16a9: 0x81d5,\n\t0x16aa: 0x81f5, 0x16ab: 0x8215, 0x16ac: 0x8235, 0x16ad: 0x8255, 0x16ae: 0x8275, 0x16af: 0x8295,\n\t0x16b0: 0x82b5, 0x16b1: 0x82d5, 0x16b2: 0x82f5, 0x16b3: 0x8315, 0x16b4: 0x8335, 0x16b5: 0x8355,\n\t0x16b6: 0x8375, 0x16b7: 0x8395, 0x16b8: 0x83b5, 0x16b9: 0x83d5, 0x16ba: 0x83f5, 0x16bb: 0x8415,\n\t0x16bc: 0x81b5, 0x16bd: 0x8435, 0x16be: 0x8455, 0x16bf: 0x8215,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x8475, 0x16c1: 0x8495, 0x16c2: 0x84b5, 0x16c3: 0x84d5, 0x16c4: 0x84f5, 0x16c5: 0x8515,\n\t0x16c6: 0x8535, 0x16c7: 0x8555, 0x16c8: 0x84d5, 0x16c9: 0x8575, 0x16ca: 0x84d5, 0x16cb: 0x8595,\n\t0x16cc: 0x8595, 0x16cd: 0x85b5, 0x16ce: 0x85b5, 0x16cf: 0x85d5, 0x16d0: 0x8515, 0x16d1: 0x85f5,\n\t0x16d2: 0x8615, 0x16d3: 0x85f5, 0x16d4: 0x8635, 0x16d5: 0x8615, 0x16d6: 0x8655, 0x16d7: 0x8655,\n\t0x16d8: 0x8675, 0x16d9: 0x8675, 0x16da: 0x8695, 0x16db: 0x8695, 0x16dc: 0x8615, 0x16dd: 0x8115,\n\t0x16de: 0x86b5, 0x16df: 0x86d5, 0x16e0: 0x0040, 0x16e1: 0x86f5, 0x16e2: 0x8715, 0x16e3: 0x8735,\n\t0x16e4: 0x8755, 0x16e5: 0x8735, 0x16e6: 0x8775, 0x16e7: 0x8795, 0x16e8: 0x87b5, 0x16e9: 0x87b5,\n\t0x16ea: 0x87d5, 0x16eb: 0x87d5, 0x16ec: 0x87f5, 0x16ed: 0x87f5, 0x16ee: 0x87d5, 0x16ef: 0x87d5,\n\t0x16f0: 0x8815, 0x16f1: 0x8835, 0x16f2: 0x8855, 0x16f3: 0x8875, 0x16f4: 0x8895, 0x16f5: 0x88b5,\n\t0x16f6: 0x88b5, 0x16f7: 0x88b5, 0x16f8: 0x88d5, 0x16f9: 0x88d5, 0x16fa: 0x88d5, 0x16fb: 0x88d5,\n\t0x16fc: 0x87b5, 0x16fd: 0x87b5, 0x16fe: 0x87b5, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x8715, 0x1703: 0x86f5, 0x1704: 0x88f5, 0x1705: 0x86f5,\n\t0x1706: 0x8715, 0x1707: 0x86f5, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x8915, 0x170b: 0x8715,\n\t0x170c: 0x8935, 0x170d: 0x88f5, 0x170e: 0x8935, 0x170f: 0x8715, 0x1710: 0x0040, 0x1711: 0x0040,\n\t0x1712: 0x8955, 0x1713: 0x8975, 0x1714: 0x8875, 0x1715: 0x8935, 0x1716: 0x88f5, 0x1717: 0x8935,\n\t0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x8995, 0x171b: 0x89b5, 0x171c: 0x8995, 0x171d: 0x0040,\n\t0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0xb541, 0x1721: 0xb559, 0x1722: 0xb571, 0x1723: 0x89d6,\n\t0x1724: 0xb589, 0x1725: 0xb5a1, 0x1726: 0x89f5, 0x1727: 0x0040, 0x1728: 0x8a15, 0x1729: 0x8a35,\n\t0x172a: 0x8a55, 0x172b: 0x8a35, 0x172c: 0x8a75, 0x172d: 0x8a95, 0x172e: 0x8ab5, 0x172f: 0x0040,\n\t0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,\n\t0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x0a08, 0x1741: 0x0a08, 0x1742: 0x0a08, 0x1743: 0x0a08, 0x1744: 0x0a08, 0x1745: 0x0c08,\n\t0x1746: 0x0808, 0x1747: 0x0c08, 0x1748: 0x0818, 0x1749: 0x0c08, 0x174a: 0x0c08, 0x174b: 0x0808,\n\t0x174c: 0x0808, 0x174d: 0x0908, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0c08, 0x1751: 0x0c08,\n\t0x1752: 0x0c08, 0x1753: 0x0a08, 0x1754: 0x0a08, 0x1755: 0x0a08, 0x1756: 0x0a08, 0x1757: 0x0908,\n\t0x1758: 0x0a08, 0x1759: 0x0a08, 0x175a: 0x0a08, 0x175b: 0x0a08, 0x175c: 0x0a08, 0x175d: 0x0c08,\n\t0x175e: 0x0a08, 0x175f: 0x0a08, 0x1760: 0x0a08, 0x1761: 0x0c08, 0x1762: 0x0808, 0x1763: 0x0808,\n\t0x1764: 0x0c08, 0x1765: 0x3308, 0x1766: 0x3308, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040,\n\t0x176a: 0x0040, 0x176b: 0x0a18, 0x176c: 0x0a18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0c18,\n\t0x1770: 0x0818, 0x1771: 0x0818, 0x1772: 0x0818, 0x1773: 0x0818, 0x1774: 0x0818, 0x1775: 0x0818,\n\t0x1776: 0x0818, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040,\n\t0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x0a08, 0x1781: 0x0c08, 0x1782: 0x0a08, 0x1783: 0x0c08, 0x1784: 0x0c08, 0x1785: 0x0c08,\n\t0x1786: 0x0a08, 0x1787: 0x0a08, 0x1788: 0x0a08, 0x1789: 0x0c08, 0x178a: 0x0a08, 0x178b: 0x0a08,\n\t0x178c: 0x0c08, 0x178d: 0x0a08, 0x178e: 0x0c08, 0x178f: 0x0c08, 0x1790: 0x0a08, 0x1791: 0x0c08,\n\t0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x0040,\n\t0x1798: 0x0040, 0x1799: 0x0818, 0x179a: 0x0818, 0x179b: 0x0818, 0x179c: 0x0818, 0x179d: 0x0040,\n\t0x179e: 0x0040, 0x179f: 0x0040, 0x17a0: 0x0040, 0x17a1: 0x0040, 0x17a2: 0x0040, 0x17a3: 0x0040,\n\t0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x0040, 0x17a7: 0x0040, 0x17a8: 0x0040, 0x17a9: 0x0c18,\n\t0x17aa: 0x0c18, 0x17ab: 0x0c18, 0x17ac: 0x0c18, 0x17ad: 0x0a18, 0x17ae: 0x0a18, 0x17af: 0x0818,\n\t0x17b0: 0x0040, 0x17b1: 0x0040, 0x17b2: 0x0040, 0x17b3: 0x0040, 0x17b4: 0x0040, 0x17b5: 0x0040,\n\t0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040,\n\t0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x3308, 0x17c1: 0x3308, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x0040, 0x17c5: 0x0008,\n\t0x17c6: 0x0008, 0x17c7: 0x0008, 0x17c8: 0x0008, 0x17c9: 0x0008, 0x17ca: 0x0008, 0x17cb: 0x0008,\n\t0x17cc: 0x0008, 0x17cd: 0x0040, 0x17ce: 0x0040, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0040,\n\t0x17d2: 0x0040, 0x17d3: 0x0008, 0x17d4: 0x0008, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0008,\n\t0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008,\n\t0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008,\n\t0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0040,\n\t0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008,\n\t0x17f0: 0x0008, 0x17f1: 0x0040, 0x17f2: 0x0008, 0x17f3: 0x0008, 0x17f4: 0x0040, 0x17f5: 0x0008,\n\t0x17f6: 0x0008, 0x17f7: 0x0008, 0x17f8: 0x0008, 0x17f9: 0x0008, 0x17fa: 0x0040, 0x17fb: 0x3308,\n\t0x17fc: 0x3308, 0x17fd: 0x0008, 0x17fe: 0x3008, 0x17ff: 0x3008,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x3308, 0x1801: 0x3008, 0x1802: 0x3008, 0x1803: 0x3008, 0x1804: 0x3008, 0x1805: 0x0040,\n\t0x1806: 0x0040, 0x1807: 0x3008, 0x1808: 0x3008, 0x1809: 0x0040, 0x180a: 0x0040, 0x180b: 0x3008,\n\t0x180c: 0x3008, 0x180d: 0x3808, 0x180e: 0x0040, 0x180f: 0x0040, 0x1810: 0x0008, 0x1811: 0x0040,\n\t0x1812: 0x0040, 0x1813: 0x0040, 0x1814: 0x0040, 0x1815: 0x0040, 0x1816: 0x0040, 0x1817: 0x3008,\n\t0x1818: 0x0040, 0x1819: 0x0040, 0x181a: 0x0040, 0x181b: 0x0040, 0x181c: 0x0040, 0x181d: 0x0008,\n\t0x181e: 0x0008, 0x181f: 0x0008, 0x1820: 0x0008, 0x1821: 0x0008, 0x1822: 0x3008, 0x1823: 0x3008,\n\t0x1824: 0x0040, 0x1825: 0x0040, 0x1826: 0x3308, 0x1827: 0x3308, 0x1828: 0x3308, 0x1829: 0x3308,\n\t0x182a: 0x3308, 0x182b: 0x3308, 0x182c: 0x3308, 0x182d: 0x0040, 0x182e: 0x0040, 0x182f: 0x0040,\n\t0x1830: 0x3308, 0x1831: 0x3308, 0x1832: 0x3308, 0x1833: 0x3308, 0x1834: 0x3308, 0x1835: 0x0040,\n\t0x1836: 0x0040, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040,\n\t0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0039, 0x1841: 0x0ee9, 0x1842: 0x1159, 0x1843: 0x0ef9, 0x1844: 0x0f09, 0x1845: 0x1199,\n\t0x1846: 0x0f31, 0x1847: 0x0249, 0x1848: 0x0f41, 0x1849: 0x0259, 0x184a: 0x0f51, 0x184b: 0x0359,\n\t0x184c: 0x0f61, 0x184d: 0x0f71, 0x184e: 0x00d9, 0x184f: 0x0f99, 0x1850: 0x2039, 0x1851: 0x0269,\n\t0x1852: 0x01d9, 0x1853: 0x0fa9, 0x1854: 0x0fb9, 0x1855: 0x1089, 0x1856: 0x0279, 0x1857: 0x0369,\n\t0x1858: 0x0289, 0x1859: 0x13d1, 0x185a: 0x0039, 0x185b: 0x0ee9, 0x185c: 0x1159, 0x185d: 0x0ef9,\n\t0x185e: 0x0f09, 0x185f: 0x1199, 0x1860: 0x0f31, 0x1861: 0x0249, 0x1862: 0x0f41, 0x1863: 0x0259,\n\t0x1864: 0x0f51, 0x1865: 0x0359, 0x1866: 0x0f61, 0x1867: 0x0f71, 0x1868: 0x00d9, 0x1869: 0x0f99,\n\t0x186a: 0x2039, 0x186b: 0x0269, 0x186c: 0x01d9, 0x186d: 0x0fa9, 0x186e: 0x0fb9, 0x186f: 0x1089,\n\t0x1870: 0x0279, 0x1871: 0x0369, 0x1872: 0x0289, 0x1873: 0x13d1, 0x1874: 0x0039, 0x1875: 0x0ee9,\n\t0x1876: 0x1159, 0x1877: 0x0ef9, 0x1878: 0x0f09, 0x1879: 0x1199, 0x187a: 0x0f31, 0x187b: 0x0249,\n\t0x187c: 0x0f41, 0x187d: 0x0259, 0x187e: 0x0f51, 0x187f: 0x0359,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x0f61, 0x1881: 0x0f71, 0x1882: 0x00d9, 0x1883: 0x0f99, 0x1884: 0x2039, 0x1885: 0x0269,\n\t0x1886: 0x01d9, 0x1887: 0x0fa9, 0x1888: 0x0fb9, 0x1889: 0x1089, 0x188a: 0x0279, 0x188b: 0x0369,\n\t0x188c: 0x0289, 0x188d: 0x13d1, 0x188e: 0x0039, 0x188f: 0x0ee9, 0x1890: 0x1159, 0x1891: 0x0ef9,\n\t0x1892: 0x0f09, 0x1893: 0x1199, 0x1894: 0x0f31, 0x1895: 0x0040, 0x1896: 0x0f41, 0x1897: 0x0259,\n\t0x1898: 0x0f51, 0x1899: 0x0359, 0x189a: 0x0f61, 0x189b: 0x0f71, 0x189c: 0x00d9, 0x189d: 0x0f99,\n\t0x189e: 0x2039, 0x189f: 0x0269, 0x18a0: 0x01d9, 0x18a1: 0x0fa9, 0x18a2: 0x0fb9, 0x18a3: 0x1089,\n\t0x18a4: 0x0279, 0x18a5: 0x0369, 0x18a6: 0x0289, 0x18a7: 0x13d1, 0x18a8: 0x0039, 0x18a9: 0x0ee9,\n\t0x18aa: 0x1159, 0x18ab: 0x0ef9, 0x18ac: 0x0f09, 0x18ad: 0x1199, 0x18ae: 0x0f31, 0x18af: 0x0249,\n\t0x18b0: 0x0f41, 0x18b1: 0x0259, 0x18b2: 0x0f51, 0x18b3: 0x0359, 0x18b4: 0x0f61, 0x18b5: 0x0f71,\n\t0x18b6: 0x00d9, 0x18b7: 0x0f99, 0x18b8: 0x2039, 0x18b9: 0x0269, 0x18ba: 0x01d9, 0x18bb: 0x0fa9,\n\t0x18bc: 0x0fb9, 0x18bd: 0x1089, 0x18be: 0x0279, 0x18bf: 0x0369,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x0289, 0x18c1: 0x13d1, 0x18c2: 0x0039, 0x18c3: 0x0ee9, 0x18c4: 0x1159, 0x18c5: 0x0ef9,\n\t0x18c6: 0x0f09, 0x18c7: 0x1199, 0x18c8: 0x0f31, 0x18c9: 0x0249, 0x18ca: 0x0f41, 0x18cb: 0x0259,\n\t0x18cc: 0x0f51, 0x18cd: 0x0359, 0x18ce: 0x0f61, 0x18cf: 0x0f71, 0x18d0: 0x00d9, 0x18d1: 0x0f99,\n\t0x18d2: 0x2039, 0x18d3: 0x0269, 0x18d4: 0x01d9, 0x18d5: 0x0fa9, 0x18d6: 0x0fb9, 0x18d7: 0x1089,\n\t0x18d8: 0x0279, 0x18d9: 0x0369, 0x18da: 0x0289, 0x18db: 0x13d1, 0x18dc: 0x0039, 0x18dd: 0x0040,\n\t0x18de: 0x1159, 0x18df: 0x0ef9, 0x18e0: 0x0040, 0x18e1: 0x0040, 0x18e2: 0x0f31, 0x18e3: 0x0040,\n\t0x18e4: 0x0040, 0x18e5: 0x0259, 0x18e6: 0x0f51, 0x18e7: 0x0040, 0x18e8: 0x0040, 0x18e9: 0x0f71,\n\t0x18ea: 0x00d9, 0x18eb: 0x0f99, 0x18ec: 0x2039, 0x18ed: 0x0040, 0x18ee: 0x01d9, 0x18ef: 0x0fa9,\n\t0x18f0: 0x0fb9, 0x18f1: 0x1089, 0x18f2: 0x0279, 0x18f3: 0x0369, 0x18f4: 0x0289, 0x18f5: 0x13d1,\n\t0x18f6: 0x0039, 0x18f7: 0x0ee9, 0x18f8: 0x1159, 0x18f9: 0x0ef9, 0x18fa: 0x0040, 0x18fb: 0x1199,\n\t0x18fc: 0x0040, 0x18fd: 0x0249, 0x18fe: 0x0f41, 0x18ff: 0x0259,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x0f51, 0x1901: 0x0359, 0x1902: 0x0f61, 0x1903: 0x0f71, 0x1904: 0x0040, 0x1905: 0x0f99,\n\t0x1906: 0x2039, 0x1907: 0x0269, 0x1908: 0x01d9, 0x1909: 0x0fa9, 0x190a: 0x0fb9, 0x190b: 0x1089,\n\t0x190c: 0x0279, 0x190d: 0x0369, 0x190e: 0x0289, 0x190f: 0x13d1, 0x1910: 0x0039, 0x1911: 0x0ee9,\n\t0x1912: 0x1159, 0x1913: 0x0ef9, 0x1914: 0x0f09, 0x1915: 0x1199, 0x1916: 0x0f31, 0x1917: 0x0249,\n\t0x1918: 0x0f41, 0x1919: 0x0259, 0x191a: 0x0f51, 0x191b: 0x0359, 0x191c: 0x0f61, 0x191d: 0x0f71,\n\t0x191e: 0x00d9, 0x191f: 0x0f99, 0x1920: 0x2039, 0x1921: 0x0269, 0x1922: 0x01d9, 0x1923: 0x0fa9,\n\t0x1924: 0x0fb9, 0x1925: 0x1089, 0x1926: 0x0279, 0x1927: 0x0369, 0x1928: 0x0289, 0x1929: 0x13d1,\n\t0x192a: 0x0039, 0x192b: 0x0ee9, 0x192c: 0x1159, 0x192d: 0x0ef9, 0x192e: 0x0f09, 0x192f: 0x1199,\n\t0x1930: 0x0f31, 0x1931: 0x0249, 0x1932: 0x0f41, 0x1933: 0x0259, 0x1934: 0x0f51, 0x1935: 0x0359,\n\t0x1936: 0x0f61, 0x1937: 0x0f71, 0x1938: 0x00d9, 0x1939: 0x0f99, 0x193a: 0x2039, 0x193b: 0x0269,\n\t0x193c: 0x01d9, 0x193d: 0x0fa9, 0x193e: 0x0fb9, 0x193f: 0x1089,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0279, 0x1941: 0x0369, 0x1942: 0x0289, 0x1943: 0x13d1, 0x1944: 0x0039, 0x1945: 0x0ee9,\n\t0x1946: 0x0040, 0x1947: 0x0ef9, 0x1948: 0x0f09, 0x1949: 0x1199, 0x194a: 0x0f31, 0x194b: 0x0040,\n\t0x194c: 0x0040, 0x194d: 0x0259, 0x194e: 0x0f51, 0x194f: 0x0359, 0x1950: 0x0f61, 0x1951: 0x0f71,\n\t0x1952: 0x00d9, 0x1953: 0x0f99, 0x1954: 0x2039, 0x1955: 0x0040, 0x1956: 0x01d9, 0x1957: 0x0fa9,\n\t0x1958: 0x0fb9, 0x1959: 0x1089, 0x195a: 0x0279, 0x195b: 0x0369, 0x195c: 0x0289, 0x195d: 0x0040,\n\t0x195e: 0x0039, 0x195f: 0x0ee9, 0x1960: 0x1159, 0x1961: 0x0ef9, 0x1962: 0x0f09, 0x1963: 0x1199,\n\t0x1964: 0x0f31, 0x1965: 0x0249, 0x1966: 0x0f41, 0x1967: 0x0259, 0x1968: 0x0f51, 0x1969: 0x0359,\n\t0x196a: 0x0f61, 0x196b: 0x0f71, 0x196c: 0x00d9, 0x196d: 0x0f99, 0x196e: 0x2039, 0x196f: 0x0269,\n\t0x1970: 0x01d9, 0x1971: 0x0fa9, 0x1972: 0x0fb9, 0x1973: 0x1089, 0x1974: 0x0279, 0x1975: 0x0369,\n\t0x1976: 0x0289, 0x1977: 0x13d1, 0x1978: 0x0039, 0x1979: 0x0ee9, 0x197a: 0x0040, 0x197b: 0x0ef9,\n\t0x197c: 0x0f09, 0x197d: 0x1199, 0x197e: 0x0f31, 0x197f: 0x0040,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0f41, 0x1981: 0x0259, 0x1982: 0x0f51, 0x1983: 0x0359, 0x1984: 0x0f61, 0x1985: 0x0040,\n\t0x1986: 0x00d9, 0x1987: 0x0040, 0x1988: 0x0040, 0x1989: 0x0040, 0x198a: 0x01d9, 0x198b: 0x0fa9,\n\t0x198c: 0x0fb9, 0x198d: 0x1089, 0x198e: 0x0279, 0x198f: 0x0369, 0x1990: 0x0289, 0x1991: 0x0040,\n\t0x1992: 0x0039, 0x1993: 0x0ee9, 0x1994: 0x1159, 0x1995: 0x0ef9, 0x1996: 0x0f09, 0x1997: 0x1199,\n\t0x1998: 0x0f31, 0x1999: 0x0249, 0x199a: 0x0f41, 0x199b: 0x0259, 0x199c: 0x0f51, 0x199d: 0x0359,\n\t0x199e: 0x0f61, 0x199f: 0x0f71, 0x19a0: 0x00d9, 0x19a1: 0x0f99, 0x19a2: 0x2039, 0x19a3: 0x0269,\n\t0x19a4: 0x01d9, 0x19a5: 0x0fa9, 0x19a6: 0x0fb9, 0x19a7: 0x1089, 0x19a8: 0x0279, 0x19a9: 0x0369,\n\t0x19aa: 0x0289, 0x19ab: 0x13d1, 0x19ac: 0x0039, 0x19ad: 0x0ee9, 0x19ae: 0x1159, 0x19af: 0x0ef9,\n\t0x19b0: 0x0f09, 0x19b1: 0x1199, 0x19b2: 0x0f31, 0x19b3: 0x0249, 0x19b4: 0x0f41, 0x19b5: 0x0259,\n\t0x19b6: 0x0f51, 0x19b7: 0x0359, 0x19b8: 0x0f61, 0x19b9: 0x0f71, 0x19ba: 0x00d9, 0x19bb: 0x0f99,\n\t0x19bc: 0x2039, 0x19bd: 0x0269, 0x19be: 0x01d9, 0x19bf: 0x0fa9,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x0fb9, 0x19c1: 0x1089, 0x19c2: 0x0279, 0x19c3: 0x0369, 0x19c4: 0x0289, 0x19c5: 0x13d1,\n\t0x19c6: 0x0039, 0x19c7: 0x0ee9, 0x19c8: 0x1159, 0x19c9: 0x0ef9, 0x19ca: 0x0f09, 0x19cb: 0x1199,\n\t0x19cc: 0x0f31, 0x19cd: 0x0249, 0x19ce: 0x0f41, 0x19cf: 0x0259, 0x19d0: 0x0f51, 0x19d1: 0x0359,\n\t0x19d2: 0x0f61, 0x19d3: 0x0f71, 0x19d4: 0x00d9, 0x19d5: 0x0f99, 0x19d6: 0x2039, 0x19d7: 0x0269,\n\t0x19d8: 0x01d9, 0x19d9: 0x0fa9, 0x19da: 0x0fb9, 0x19db: 0x1089, 0x19dc: 0x0279, 0x19dd: 0x0369,\n\t0x19de: 0x0289, 0x19df: 0x13d1, 0x19e0: 0x0039, 0x19e1: 0x0ee9, 0x19e2: 0x1159, 0x19e3: 0x0ef9,\n\t0x19e4: 0x0f09, 0x19e5: 0x1199, 0x19e6: 0x0f31, 0x19e7: 0x0249, 0x19e8: 0x0f41, 0x19e9: 0x0259,\n\t0x19ea: 0x0f51, 0x19eb: 0x0359, 0x19ec: 0x0f61, 0x19ed: 0x0f71, 0x19ee: 0x00d9, 0x19ef: 0x0f99,\n\t0x19f0: 0x2039, 0x19f1: 0x0269, 0x19f2: 0x01d9, 0x19f3: 0x0fa9, 0x19f4: 0x0fb9, 0x19f5: 0x1089,\n\t0x19f6: 0x0279, 0x19f7: 0x0369, 0x19f8: 0x0289, 0x19f9: 0x13d1, 0x19fa: 0x0039, 0x19fb: 0x0ee9,\n\t0x19fc: 0x1159, 0x19fd: 0x0ef9, 0x19fe: 0x0f09, 0x19ff: 0x1199,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x0f31, 0x1a01: 0x0249, 0x1a02: 0x0f41, 0x1a03: 0x0259, 0x1a04: 0x0f51, 0x1a05: 0x0359,\n\t0x1a06: 0x0f61, 0x1a07: 0x0f71, 0x1a08: 0x00d9, 0x1a09: 0x0f99, 0x1a0a: 0x2039, 0x1a0b: 0x0269,\n\t0x1a0c: 0x01d9, 0x1a0d: 0x0fa9, 0x1a0e: 0x0fb9, 0x1a0f: 0x1089, 0x1a10: 0x0279, 0x1a11: 0x0369,\n\t0x1a12: 0x0289, 0x1a13: 0x13d1, 0x1a14: 0x0039, 0x1a15: 0x0ee9, 0x1a16: 0x1159, 0x1a17: 0x0ef9,\n\t0x1a18: 0x0f09, 0x1a19: 0x1199, 0x1a1a: 0x0f31, 0x1a1b: 0x0249, 0x1a1c: 0x0f41, 0x1a1d: 0x0259,\n\t0x1a1e: 0x0f51, 0x1a1f: 0x0359, 0x1a20: 0x0f61, 0x1a21: 0x0f71, 0x1a22: 0x00d9, 0x1a23: 0x0f99,\n\t0x1a24: 0x2039, 0x1a25: 0x0269, 0x1a26: 0x01d9, 0x1a27: 0x0fa9, 0x1a28: 0x0fb9, 0x1a29: 0x1089,\n\t0x1a2a: 0x0279, 0x1a2b: 0x0369, 0x1a2c: 0x0289, 0x1a2d: 0x13d1, 0x1a2e: 0x0039, 0x1a2f: 0x0ee9,\n\t0x1a30: 0x1159, 0x1a31: 0x0ef9, 0x1a32: 0x0f09, 0x1a33: 0x1199, 0x1a34: 0x0f31, 0x1a35: 0x0249,\n\t0x1a36: 0x0f41, 0x1a37: 0x0259, 0x1a38: 0x0f51, 0x1a39: 0x0359, 0x1a3a: 0x0f61, 0x1a3b: 0x0f71,\n\t0x1a3c: 0x00d9, 0x1a3d: 0x0f99, 0x1a3e: 0x2039, 0x1a3f: 0x0269,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x01d9, 0x1a41: 0x0fa9, 0x1a42: 0x0fb9, 0x1a43: 0x1089, 0x1a44: 0x0279, 0x1a45: 0x0369,\n\t0x1a46: 0x0289, 0x1a47: 0x13d1, 0x1a48: 0x0039, 0x1a49: 0x0ee9, 0x1a4a: 0x1159, 0x1a4b: 0x0ef9,\n\t0x1a4c: 0x0f09, 0x1a4d: 0x1199, 0x1a4e: 0x0f31, 0x1a4f: 0x0249, 0x1a50: 0x0f41, 0x1a51: 0x0259,\n\t0x1a52: 0x0f51, 0x1a53: 0x0359, 0x1a54: 0x0f61, 0x1a55: 0x0f71, 0x1a56: 0x00d9, 0x1a57: 0x0f99,\n\t0x1a58: 0x2039, 0x1a59: 0x0269, 0x1a5a: 0x01d9, 0x1a5b: 0x0fa9, 0x1a5c: 0x0fb9, 0x1a5d: 0x1089,\n\t0x1a5e: 0x0279, 0x1a5f: 0x0369, 0x1a60: 0x0289, 0x1a61: 0x13d1, 0x1a62: 0x0039, 0x1a63: 0x0ee9,\n\t0x1a64: 0x1159, 0x1a65: 0x0ef9, 0x1a66: 0x0f09, 0x1a67: 0x1199, 0x1a68: 0x0f31, 0x1a69: 0x0249,\n\t0x1a6a: 0x0f41, 0x1a6b: 0x0259, 0x1a6c: 0x0f51, 0x1a6d: 0x0359, 0x1a6e: 0x0f61, 0x1a6f: 0x0f71,\n\t0x1a70: 0x00d9, 0x1a71: 0x0f99, 0x1a72: 0x2039, 0x1a73: 0x0269, 0x1a74: 0x01d9, 0x1a75: 0x0fa9,\n\t0x1a76: 0x0fb9, 0x1a77: 0x1089, 0x1a78: 0x0279, 0x1a79: 0x0369, 0x1a7a: 0x0289, 0x1a7b: 0x13d1,\n\t0x1a7c: 0x0039, 0x1a7d: 0x0ee9, 0x1a7e: 0x1159, 0x1a7f: 0x0ef9,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x0f09, 0x1a81: 0x1199, 0x1a82: 0x0f31, 0x1a83: 0x0249, 0x1a84: 0x0f41, 0x1a85: 0x0259,\n\t0x1a86: 0x0f51, 0x1a87: 0x0359, 0x1a88: 0x0f61, 0x1a89: 0x0f71, 0x1a8a: 0x00d9, 0x1a8b: 0x0f99,\n\t0x1a8c: 0x2039, 0x1a8d: 0x0269, 0x1a8e: 0x01d9, 0x1a8f: 0x0fa9, 0x1a90: 0x0fb9, 0x1a91: 0x1089,\n\t0x1a92: 0x0279, 0x1a93: 0x0369, 0x1a94: 0x0289, 0x1a95: 0x13d1, 0x1a96: 0x0039, 0x1a97: 0x0ee9,\n\t0x1a98: 0x1159, 0x1a99: 0x0ef9, 0x1a9a: 0x0f09, 0x1a9b: 0x1199, 0x1a9c: 0x0f31, 0x1a9d: 0x0249,\n\t0x1a9e: 0x0f41, 0x1a9f: 0x0259, 0x1aa0: 0x0f51, 0x1aa1: 0x0359, 0x1aa2: 0x0f61, 0x1aa3: 0x0f71,\n\t0x1aa4: 0x00d9, 0x1aa5: 0x0f99, 0x1aa6: 0x2039, 0x1aa7: 0x0269, 0x1aa8: 0x01d9, 0x1aa9: 0x0fa9,\n\t0x1aaa: 0x0fb9, 0x1aab: 0x1089, 0x1aac: 0x0279, 0x1aad: 0x0369, 0x1aae: 0x0289, 0x1aaf: 0x13d1,\n\t0x1ab0: 0x0039, 0x1ab1: 0x0ee9, 0x1ab2: 0x1159, 0x1ab3: 0x0ef9, 0x1ab4: 0x0f09, 0x1ab5: 0x1199,\n\t0x1ab6: 0x0f31, 0x1ab7: 0x0249, 0x1ab8: 0x0f41, 0x1ab9: 0x0259, 0x1aba: 0x0f51, 0x1abb: 0x0359,\n\t0x1abc: 0x0f61, 0x1abd: 0x0f71, 0x1abe: 0x00d9, 0x1abf: 0x0f99,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x2039, 0x1ac1: 0x0269, 0x1ac2: 0x01d9, 0x1ac3: 0x0fa9, 0x1ac4: 0x0fb9, 0x1ac5: 0x1089,\n\t0x1ac6: 0x0279, 0x1ac7: 0x0369, 0x1ac8: 0x0289, 0x1ac9: 0x13d1, 0x1aca: 0x0039, 0x1acb: 0x0ee9,\n\t0x1acc: 0x1159, 0x1acd: 0x0ef9, 0x1ace: 0x0f09, 0x1acf: 0x1199, 0x1ad0: 0x0f31, 0x1ad1: 0x0249,\n\t0x1ad2: 0x0f41, 0x1ad3: 0x0259, 0x1ad4: 0x0f51, 0x1ad5: 0x0359, 0x1ad6: 0x0f61, 0x1ad7: 0x0f71,\n\t0x1ad8: 0x00d9, 0x1ad9: 0x0f99, 0x1ada: 0x2039, 0x1adb: 0x0269, 0x1adc: 0x01d9, 0x1add: 0x0fa9,\n\t0x1ade: 0x0fb9, 0x1adf: 0x1089, 0x1ae0: 0x0279, 0x1ae1: 0x0369, 0x1ae2: 0x0289, 0x1ae3: 0x13d1,\n\t0x1ae4: 0xba81, 0x1ae5: 0xba99, 0x1ae6: 0x0040, 0x1ae7: 0x0040, 0x1ae8: 0xbab1, 0x1ae9: 0x1099,\n\t0x1aea: 0x10b1, 0x1aeb: 0x10c9, 0x1aec: 0xbac9, 0x1aed: 0xbae1, 0x1aee: 0xbaf9, 0x1aef: 0x1429,\n\t0x1af0: 0x1a31, 0x1af1: 0xbb11, 0x1af2: 0xbb29, 0x1af3: 0xbb41, 0x1af4: 0xbb59, 0x1af5: 0xbb71,\n\t0x1af6: 0xbb89, 0x1af7: 0x2109, 0x1af8: 0x1111, 0x1af9: 0x1429, 0x1afa: 0xbba1, 0x1afb: 0xbbb9,\n\t0x1afc: 0xbbd1, 0x1afd: 0x10e1, 0x1afe: 0x10f9, 0x1aff: 0xbbe9,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x2079, 0x1b01: 0xbc01, 0x1b02: 0xbab1, 0x1b03: 0x1099, 0x1b04: 0x10b1, 0x1b05: 0x10c9,\n\t0x1b06: 0xbac9, 0x1b07: 0xbae1, 0x1b08: 0xbaf9, 0x1b09: 0x1429, 0x1b0a: 0x1a31, 0x1b0b: 0xbb11,\n\t0x1b0c: 0xbb29, 0x1b0d: 0xbb41, 0x1b0e: 0xbb59, 0x1b0f: 0xbb71, 0x1b10: 0xbb89, 0x1b11: 0x2109,\n\t0x1b12: 0x1111, 0x1b13: 0xbba1, 0x1b14: 0xbba1, 0x1b15: 0xbbb9, 0x1b16: 0xbbd1, 0x1b17: 0x10e1,\n\t0x1b18: 0x10f9, 0x1b19: 0xbbe9, 0x1b1a: 0x2079, 0x1b1b: 0xbc21, 0x1b1c: 0xbac9, 0x1b1d: 0x1429,\n\t0x1b1e: 0xbb11, 0x1b1f: 0x10e1, 0x1b20: 0x1111, 0x1b21: 0x2109, 0x1b22: 0xbab1, 0x1b23: 0x1099,\n\t0x1b24: 0x10b1, 0x1b25: 0x10c9, 0x1b26: 0xbac9, 0x1b27: 0xbae1, 0x1b28: 0xbaf9, 0x1b29: 0x1429,\n\t0x1b2a: 0x1a31, 0x1b2b: 0xbb11, 0x1b2c: 0xbb29, 0x1b2d: 0xbb41, 0x1b2e: 0xbb59, 0x1b2f: 0xbb71,\n\t0x1b30: 0xbb89, 0x1b31: 0x2109, 0x1b32: 0x1111, 0x1b33: 0x1429, 0x1b34: 0xbba1, 0x1b35: 0xbbb9,\n\t0x1b36: 0xbbd1, 0x1b37: 0x10e1, 0x1b38: 0x10f9, 0x1b39: 0xbbe9, 0x1b3a: 0x2079, 0x1b3b: 0xbc01,\n\t0x1b3c: 0xbab1, 0x1b3d: 0x1099, 0x1b3e: 0x10b1, 0x1b3f: 0x10c9,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0xbac9, 0x1b41: 0xbae1, 0x1b42: 0xbaf9, 0x1b43: 0x1429, 0x1b44: 0x1a31, 0x1b45: 0xbb11,\n\t0x1b46: 0xbb29, 0x1b47: 0xbb41, 0x1b48: 0xbb59, 0x1b49: 0xbb71, 0x1b4a: 0xbb89, 0x1b4b: 0x2109,\n\t0x1b4c: 0x1111, 0x1b4d: 0xbba1, 0x1b4e: 0xbba1, 0x1b4f: 0xbbb9, 0x1b50: 0xbbd1, 0x1b51: 0x10e1,\n\t0x1b52: 0x10f9, 0x1b53: 0xbbe9, 0x1b54: 0x2079, 0x1b55: 0xbc21, 0x1b56: 0xbac9, 0x1b57: 0x1429,\n\t0x1b58: 0xbb11, 0x1b59: 0x10e1, 0x1b5a: 0x1111, 0x1b5b: 0x2109, 0x1b5c: 0xbab1, 0x1b5d: 0x1099,\n\t0x1b5e: 0x10b1, 0x1b5f: 0x10c9, 0x1b60: 0xbac9, 0x1b61: 0xbae1, 0x1b62: 0xbaf9, 0x1b63: 0x1429,\n\t0x1b64: 0x1a31, 0x1b65: 0xbb11, 0x1b66: 0xbb29, 0x1b67: 0xbb41, 0x1b68: 0xbb59, 0x1b69: 0xbb71,\n\t0x1b6a: 0xbb89, 0x1b6b: 0x2109, 0x1b6c: 0x1111, 0x1b6d: 0x1429, 0x1b6e: 0xbba1, 0x1b6f: 0xbbb9,\n\t0x1b70: 0xbbd1, 0x1b71: 0x10e1, 0x1b72: 0x10f9, 0x1b73: 0xbbe9, 0x1b74: 0x2079, 0x1b75: 0xbc01,\n\t0x1b76: 0xbab1, 0x1b77: 0x1099, 0x1b78: 0x10b1, 0x1b79: 0x10c9, 0x1b7a: 0xbac9, 0x1b7b: 0xbae1,\n\t0x1b7c: 0xbaf9, 0x1b7d: 0x1429, 0x1b7e: 0x1a31, 0x1b7f: 0xbb11,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0xbb29, 0x1b81: 0xbb41, 0x1b82: 0xbb59, 0x1b83: 0xbb71, 0x1b84: 0xbb89, 0x1b85: 0x2109,\n\t0x1b86: 0x1111, 0x1b87: 0xbba1, 0x1b88: 0xbba1, 0x1b89: 0xbbb9, 0x1b8a: 0xbbd1, 0x1b8b: 0x10e1,\n\t0x1b8c: 0x10f9, 0x1b8d: 0xbbe9, 0x1b8e: 0x2079, 0x1b8f: 0xbc21, 0x1b90: 0xbac9, 0x1b91: 0x1429,\n\t0x1b92: 0xbb11, 0x1b93: 0x10e1, 0x1b94: 0x1111, 0x1b95: 0x2109, 0x1b96: 0xbab1, 0x1b97: 0x1099,\n\t0x1b98: 0x10b1, 0x1b99: 0x10c9, 0x1b9a: 0xbac9, 0x1b9b: 0xbae1, 0x1b9c: 0xbaf9, 0x1b9d: 0x1429,\n\t0x1b9e: 0x1a31, 0x1b9f: 0xbb11, 0x1ba0: 0xbb29, 0x1ba1: 0xbb41, 0x1ba2: 0xbb59, 0x1ba3: 0xbb71,\n\t0x1ba4: 0xbb89, 0x1ba5: 0x2109, 0x1ba6: 0x1111, 0x1ba7: 0x1429, 0x1ba8: 0xbba1, 0x1ba9: 0xbbb9,\n\t0x1baa: 0xbbd1, 0x1bab: 0x10e1, 0x1bac: 0x10f9, 0x1bad: 0xbbe9, 0x1bae: 0x2079, 0x1baf: 0xbc01,\n\t0x1bb0: 0xbab1, 0x1bb1: 0x1099, 0x1bb2: 0x10b1, 0x1bb3: 0x10c9, 0x1bb4: 0xbac9, 0x1bb5: 0xbae1,\n\t0x1bb6: 0xbaf9, 0x1bb7: 0x1429, 0x1bb8: 0x1a31, 0x1bb9: 0xbb11, 0x1bba: 0xbb29, 0x1bbb: 0xbb41,\n\t0x1bbc: 0xbb59, 0x1bbd: 0xbb71, 0x1bbe: 0xbb89, 0x1bbf: 0x2109,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x1111, 0x1bc1: 0xbba1, 0x1bc2: 0xbba1, 0x1bc3: 0xbbb9, 0x1bc4: 0xbbd1, 0x1bc5: 0x10e1,\n\t0x1bc6: 0x10f9, 0x1bc7: 0xbbe9, 0x1bc8: 0x2079, 0x1bc9: 0xbc21, 0x1bca: 0xbac9, 0x1bcb: 0x1429,\n\t0x1bcc: 0xbb11, 0x1bcd: 0x10e1, 0x1bce: 0x1111, 0x1bcf: 0x2109, 0x1bd0: 0xbab1, 0x1bd1: 0x1099,\n\t0x1bd2: 0x10b1, 0x1bd3: 0x10c9, 0x1bd4: 0xbac9, 0x1bd5: 0xbae1, 0x1bd6: 0xbaf9, 0x1bd7: 0x1429,\n\t0x1bd8: 0x1a31, 0x1bd9: 0xbb11, 0x1bda: 0xbb29, 0x1bdb: 0xbb41, 0x1bdc: 0xbb59, 0x1bdd: 0xbb71,\n\t0x1bde: 0xbb89, 0x1bdf: 0x2109, 0x1be0: 0x1111, 0x1be1: 0x1429, 0x1be2: 0xbba1, 0x1be3: 0xbbb9,\n\t0x1be4: 0xbbd1, 0x1be5: 0x10e1, 0x1be6: 0x10f9, 0x1be7: 0xbbe9, 0x1be8: 0x2079, 0x1be9: 0xbc01,\n\t0x1bea: 0xbab1, 0x1beb: 0x1099, 0x1bec: 0x10b1, 0x1bed: 0x10c9, 0x1bee: 0xbac9, 0x1bef: 0xbae1,\n\t0x1bf0: 0xbaf9, 0x1bf1: 0x1429, 0x1bf2: 0x1a31, 0x1bf3: 0xbb11, 0x1bf4: 0xbb29, 0x1bf5: 0xbb41,\n\t0x1bf6: 0xbb59, 0x1bf7: 0xbb71, 0x1bf8: 0xbb89, 0x1bf9: 0x2109, 0x1bfa: 0x1111, 0x1bfb: 0xbba1,\n\t0x1bfc: 0xbba1, 0x1bfd: 0xbbb9, 0x1bfe: 0xbbd1, 0x1bff: 0x10e1,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0x10f9, 0x1c01: 0xbbe9, 0x1c02: 0x2079, 0x1c03: 0xbc21, 0x1c04: 0xbac9, 0x1c05: 0x1429,\n\t0x1c06: 0xbb11, 0x1c07: 0x10e1, 0x1c08: 0x1111, 0x1c09: 0x2109, 0x1c0a: 0xbc41, 0x1c0b: 0xbc41,\n\t0x1c0c: 0x0040, 0x1c0d: 0x0040, 0x1c0e: 0x1f41, 0x1c0f: 0x00c9, 0x1c10: 0x0069, 0x1c11: 0x0079,\n\t0x1c12: 0x1f51, 0x1c13: 0x1f61, 0x1c14: 0x1f71, 0x1c15: 0x1f81, 0x1c16: 0x1f91, 0x1c17: 0x1fa1,\n\t0x1c18: 0x1f41, 0x1c19: 0x00c9, 0x1c1a: 0x0069, 0x1c1b: 0x0079, 0x1c1c: 0x1f51, 0x1c1d: 0x1f61,\n\t0x1c1e: 0x1f71, 0x1c1f: 0x1f81, 0x1c20: 0x1f91, 0x1c21: 0x1fa1, 0x1c22: 0x1f41, 0x1c23: 0x00c9,\n\t0x1c24: 0x0069, 0x1c25: 0x0079, 0x1c26: 0x1f51, 0x1c27: 0x1f61, 0x1c28: 0x1f71, 0x1c29: 0x1f81,\n\t0x1c2a: 0x1f91, 0x1c2b: 0x1fa1, 0x1c2c: 0x1f41, 0x1c2d: 0x00c9, 0x1c2e: 0x0069, 0x1c2f: 0x0079,\n\t0x1c30: 0x1f51, 0x1c31: 0x1f61, 0x1c32: 0x1f71, 0x1c33: 0x1f81, 0x1c34: 0x1f91, 0x1c35: 0x1fa1,\n\t0x1c36: 0x1f41, 0x1c37: 0x00c9, 0x1c38: 0x0069, 0x1c39: 0x0079, 0x1c3a: 0x1f51, 0x1c3b: 0x1f61,\n\t0x1c3c: 0x1f71, 0x1c3d: 0x1f81, 0x1c3e: 0x1f91, 0x1c3f: 0x1fa1,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0xe115, 0x1c41: 0xe115, 0x1c42: 0xe135, 0x1c43: 0xe135, 0x1c44: 0xe115, 0x1c45: 0xe115,\n\t0x1c46: 0xe175, 0x1c47: 0xe175, 0x1c48: 0xe115, 0x1c49: 0xe115, 0x1c4a: 0xe135, 0x1c4b: 0xe135,\n\t0x1c4c: 0xe115, 0x1c4d: 0xe115, 0x1c4e: 0xe1f5, 0x1c4f: 0xe1f5, 0x1c50: 0xe115, 0x1c51: 0xe115,\n\t0x1c52: 0xe135, 0x1c53: 0xe135, 0x1c54: 0xe115, 0x1c55: 0xe115, 0x1c56: 0xe175, 0x1c57: 0xe175,\n\t0x1c58: 0xe115, 0x1c59: 0xe115, 0x1c5a: 0xe135, 0x1c5b: 0xe135, 0x1c5c: 0xe115, 0x1c5d: 0xe115,\n\t0x1c5e: 0x8b05, 0x1c5f: 0x8b05, 0x1c60: 0x04b5, 0x1c61: 0x04b5, 0x1c62: 0x0a08, 0x1c63: 0x0a08,\n\t0x1c64: 0x0a08, 0x1c65: 0x0a08, 0x1c66: 0x0a08, 0x1c67: 0x0a08, 0x1c68: 0x0a08, 0x1c69: 0x0a08,\n\t0x1c6a: 0x0a08, 0x1c6b: 0x0a08, 0x1c6c: 0x0a08, 0x1c6d: 0x0a08, 0x1c6e: 0x0a08, 0x1c6f: 0x0a08,\n\t0x1c70: 0x0a08, 0x1c71: 0x0a08, 0x1c72: 0x0a08, 0x1c73: 0x0a08, 0x1c74: 0x0a08, 0x1c75: 0x0a08,\n\t0x1c76: 0x0a08, 0x1c77: 0x0a08, 0x1c78: 0x0a08, 0x1c79: 0x0a08, 0x1c7a: 0x0a08, 0x1c7b: 0x0a08,\n\t0x1c7c: 0x0a08, 0x1c7d: 0x0a08, 0x1c7e: 0x0a08, 0x1c7f: 0x0a08,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0x0040, 0x1c85: 0xb411,\n\t0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0xb399, 0x1c8b: 0xb3b1,\n\t0x1c8c: 0xb3c9, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0xb369, 0x1c91: 0xb2d9,\n\t0x1c92: 0xb381, 0x1c93: 0xb279, 0x1c94: 0xb2c1, 0x1c95: 0xb1d1, 0x1c96: 0xb1e9, 0x1c97: 0xb231,\n\t0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0xbc59, 0x1c9d: 0x7949,\n\t0x1c9e: 0xbc71, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040,\n\t0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0x0040, 0x1ca9: 0xb429,\n\t0x1caa: 0xb399, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339,\n\t0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1,\n\t0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0x0040, 0x1cbb: 0xb351,\n\t0x1cbc: 0x0040, 0x1cbd: 0x0040, 0x1cbe: 0x0040, 0x1cbf: 0x0040,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x0040, 0x1cc1: 0x0040, 0x1cc2: 0xb201, 0x1cc3: 0x0040, 0x1cc4: 0x0040, 0x1cc5: 0x0040,\n\t0x1cc6: 0x0040, 0x1cc7: 0xb219, 0x1cc8: 0x0040, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1,\n\t0x1ccc: 0x0040, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0x0040, 0x1cd1: 0xb2d9,\n\t0x1cd2: 0xb381, 0x1cd3: 0x0040, 0x1cd4: 0xb2c1, 0x1cd5: 0x0040, 0x1cd6: 0x0040, 0x1cd7: 0xb231,\n\t0x1cd8: 0x0040, 0x1cd9: 0xb2f1, 0x1cda: 0x0040, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x7949,\n\t0x1cde: 0x0040, 0x1cdf: 0xbc89, 0x1ce0: 0x0040, 0x1ce1: 0xb1a1, 0x1ce2: 0xb201, 0x1ce3: 0x0040,\n\t0x1ce4: 0xb3f9, 0x1ce5: 0x0040, 0x1ce6: 0x0040, 0x1ce7: 0xb219, 0x1ce8: 0xb309, 0x1ce9: 0xb429,\n\t0x1cea: 0xb399, 0x1ceb: 0x0040, 0x1cec: 0xb3c9, 0x1ced: 0xb3e1, 0x1cee: 0xb2a9, 0x1cef: 0xb339,\n\t0x1cf0: 0xb369, 0x1cf1: 0xb2d9, 0x1cf2: 0xb381, 0x1cf3: 0x0040, 0x1cf4: 0xb2c1, 0x1cf5: 0xb1d1,\n\t0x1cf6: 0xb1e9, 0x1cf7: 0xb231, 0x1cf8: 0x0040, 0x1cf9: 0xb2f1, 0x1cfa: 0xb321, 0x1cfb: 0xb351,\n\t0x1cfc: 0xbc59, 0x1cfd: 0x0040, 0x1cfe: 0xbc71, 0x1cff: 0x0040,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0xb189, 0x1d01: 0xb1a1, 0x1d02: 0xb201, 0x1d03: 0xb249, 0x1d04: 0xb3f9, 0x1d05: 0xb411,\n\t0x1d06: 0xb291, 0x1d07: 0xb219, 0x1d08: 0xb309, 0x1d09: 0xb429, 0x1d0a: 0x0040, 0x1d0b: 0xb3b1,\n\t0x1d0c: 0xb3c9, 0x1d0d: 0xb3e1, 0x1d0e: 0xb2a9, 0x1d0f: 0xb339, 0x1d10: 0xb369, 0x1d11: 0xb2d9,\n\t0x1d12: 0xb381, 0x1d13: 0xb279, 0x1d14: 0xb2c1, 0x1d15: 0xb1d1, 0x1d16: 0xb1e9, 0x1d17: 0xb231,\n\t0x1d18: 0xb261, 0x1d19: 0xb2f1, 0x1d1a: 0xb321, 0x1d1b: 0xb351, 0x1d1c: 0x0040, 0x1d1d: 0x0040,\n\t0x1d1e: 0x0040, 0x1d1f: 0x0040, 0x1d20: 0x0040, 0x1d21: 0xb1a1, 0x1d22: 0xb201, 0x1d23: 0xb249,\n\t0x1d24: 0x0040, 0x1d25: 0xb411, 0x1d26: 0xb291, 0x1d27: 0xb219, 0x1d28: 0xb309, 0x1d29: 0xb429,\n\t0x1d2a: 0x0040, 0x1d2b: 0xb3b1, 0x1d2c: 0xb3c9, 0x1d2d: 0xb3e1, 0x1d2e: 0xb2a9, 0x1d2f: 0xb339,\n\t0x1d30: 0xb369, 0x1d31: 0xb2d9, 0x1d32: 0xb381, 0x1d33: 0xb279, 0x1d34: 0xb2c1, 0x1d35: 0xb1d1,\n\t0x1d36: 0xb1e9, 0x1d37: 0xb231, 0x1d38: 0xb261, 0x1d39: 0xb2f1, 0x1d3a: 0xb321, 0x1d3b: 0xb351,\n\t0x1d3c: 0x0040, 0x1d3d: 0x0040, 0x1d3e: 0x0040, 0x1d3f: 0x0040,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x0040, 0x1d41: 0xbca2, 0x1d42: 0xbcba, 0x1d43: 0xbcd2, 0x1d44: 0xbcea, 0x1d45: 0xbd02,\n\t0x1d46: 0xbd1a, 0x1d47: 0xbd32, 0x1d48: 0xbd4a, 0x1d49: 0xbd62, 0x1d4a: 0xbd7a, 0x1d4b: 0x0018,\n\t0x1d4c: 0x0018, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xbd92, 0x1d51: 0xbdb2,\n\t0x1d52: 0xbdd2, 0x1d53: 0xbdf2, 0x1d54: 0xbe12, 0x1d55: 0xbe32, 0x1d56: 0xbe52, 0x1d57: 0xbe72,\n\t0x1d58: 0xbe92, 0x1d59: 0xbeb2, 0x1d5a: 0xbed2, 0x1d5b: 0xbef2, 0x1d5c: 0xbf12, 0x1d5d: 0xbf32,\n\t0x1d5e: 0xbf52, 0x1d5f: 0xbf72, 0x1d60: 0xbf92, 0x1d61: 0xbfb2, 0x1d62: 0xbfd2, 0x1d63: 0xbff2,\n\t0x1d64: 0xc012, 0x1d65: 0xc032, 0x1d66: 0xc052, 0x1d67: 0xc072, 0x1d68: 0xc092, 0x1d69: 0xc0b2,\n\t0x1d6a: 0xc0d1, 0x1d6b: 0x1159, 0x1d6c: 0x0269, 0x1d6d: 0x6671, 0x1d6e: 0xc111, 0x1d6f: 0x0018,\n\t0x1d70: 0x0039, 0x1d71: 0x0ee9, 0x1d72: 0x1159, 0x1d73: 0x0ef9, 0x1d74: 0x0f09, 0x1d75: 0x1199,\n\t0x1d76: 0x0f31, 0x1d77: 0x0249, 0x1d78: 0x0f41, 0x1d79: 0x0259, 0x1d7a: 0x0f51, 0x1d7b: 0x0359,\n\t0x1d7c: 0x0f61, 0x1d7d: 0x0f71, 0x1d7e: 0x00d9, 0x1d7f: 0x0f99,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x2039, 0x1d81: 0x0269, 0x1d82: 0x01d9, 0x1d83: 0x0fa9, 0x1d84: 0x0fb9, 0x1d85: 0x1089,\n\t0x1d86: 0x0279, 0x1d87: 0x0369, 0x1d88: 0x0289, 0x1d89: 0x13d1, 0x1d8a: 0xc129, 0x1d8b: 0x65b1,\n\t0x1d8c: 0xc141, 0x1d8d: 0x1441, 0x1d8e: 0xc159, 0x1d8f: 0xc179, 0x1d90: 0x0018, 0x1d91: 0x0018,\n\t0x1d92: 0x0018, 0x1d93: 0x0018, 0x1d94: 0x0018, 0x1d95: 0x0018, 0x1d96: 0x0018, 0x1d97: 0x0018,\n\t0x1d98: 0x0018, 0x1d99: 0x0018, 0x1d9a: 0x0018, 0x1d9b: 0x0018, 0x1d9c: 0x0018, 0x1d9d: 0x0018,\n\t0x1d9e: 0x0018, 0x1d9f: 0x0018, 0x1da0: 0x0018, 0x1da1: 0x0018, 0x1da2: 0x0018, 0x1da3: 0x0018,\n\t0x1da4: 0x0018, 0x1da5: 0x0018, 0x1da6: 0x0018, 0x1da7: 0x0018, 0x1da8: 0x0018, 0x1da9: 0x0018,\n\t0x1daa: 0xc191, 0x1dab: 0xc1a9, 0x1dac: 0x0040, 0x1dad: 0x0040, 0x1dae: 0x0040, 0x1daf: 0x0040,\n\t0x1db0: 0x0018, 0x1db1: 0x0018, 0x1db2: 0x0018, 0x1db3: 0x0018, 0x1db4: 0x0018, 0x1db5: 0x0018,\n\t0x1db6: 0x0018, 0x1db7: 0x0018, 0x1db8: 0x0018, 0x1db9: 0x0018, 0x1dba: 0x0018, 0x1dbb: 0x0018,\n\t0x1dbc: 0x0018, 0x1dbd: 0x0018, 0x1dbe: 0x0018, 0x1dbf: 0x0018,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0xc1d9, 0x1dc1: 0xc211, 0x1dc2: 0xc249, 0x1dc3: 0x0040, 0x1dc4: 0x0040, 0x1dc5: 0x0040,\n\t0x1dc6: 0x0040, 0x1dc7: 0x0040, 0x1dc8: 0x0040, 0x1dc9: 0x0040, 0x1dca: 0x0040, 0x1dcb: 0x0040,\n\t0x1dcc: 0x0040, 0x1dcd: 0x0040, 0x1dce: 0x0040, 0x1dcf: 0x0040, 0x1dd0: 0xc269, 0x1dd1: 0xc289,\n\t0x1dd2: 0xc2a9, 0x1dd3: 0xc2c9, 0x1dd4: 0xc2e9, 0x1dd5: 0xc309, 0x1dd6: 0xc329, 0x1dd7: 0xc349,\n\t0x1dd8: 0xc369, 0x1dd9: 0xc389, 0x1dda: 0xc3a9, 0x1ddb: 0xc3c9, 0x1ddc: 0xc3e9, 0x1ddd: 0xc409,\n\t0x1dde: 0xc429, 0x1ddf: 0xc449, 0x1de0: 0xc469, 0x1de1: 0xc489, 0x1de2: 0xc4a9, 0x1de3: 0xc4c9,\n\t0x1de4: 0xc4e9, 0x1de5: 0xc509, 0x1de6: 0xc529, 0x1de7: 0xc549, 0x1de8: 0xc569, 0x1de9: 0xc589,\n\t0x1dea: 0xc5a9, 0x1deb: 0xc5c9, 0x1dec: 0xc5e9, 0x1ded: 0xc609, 0x1dee: 0xc629, 0x1def: 0xc649,\n\t0x1df0: 0xc669, 0x1df1: 0xc689, 0x1df2: 0xc6a9, 0x1df3: 0xc6c9, 0x1df4: 0xc6e9, 0x1df5: 0xc709,\n\t0x1df6: 0xc729, 0x1df7: 0xc749, 0x1df8: 0xc769, 0x1df9: 0xc789, 0x1dfa: 0xc7a9, 0x1dfb: 0xc7c9,\n\t0x1dfc: 0x0040, 0x1dfd: 0x0040, 0x1dfe: 0x0040, 0x1dff: 0x0040,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0xcaf9, 0x1e01: 0xcb19, 0x1e02: 0xcb39, 0x1e03: 0x8b1d, 0x1e04: 0xcb59, 0x1e05: 0xcb79,\n\t0x1e06: 0xcb99, 0x1e07: 0xcbb9, 0x1e08: 0xcbd9, 0x1e09: 0xcbf9, 0x1e0a: 0xcc19, 0x1e0b: 0xcc39,\n\t0x1e0c: 0xcc59, 0x1e0d: 0x8b3d, 0x1e0e: 0xcc79, 0x1e0f: 0xcc99, 0x1e10: 0xccb9, 0x1e11: 0xccd9,\n\t0x1e12: 0x8b5d, 0x1e13: 0xccf9, 0x1e14: 0xcd19, 0x1e15: 0xc429, 0x1e16: 0x8b7d, 0x1e17: 0xcd39,\n\t0x1e18: 0xcd59, 0x1e19: 0xcd79, 0x1e1a: 0xcd99, 0x1e1b: 0xcdb9, 0x1e1c: 0x8b9d, 0x1e1d: 0xcdd9,\n\t0x1e1e: 0xcdf9, 0x1e1f: 0xce19, 0x1e20: 0xce39, 0x1e21: 0xce59, 0x1e22: 0xc789, 0x1e23: 0xce79,\n\t0x1e24: 0xce99, 0x1e25: 0xceb9, 0x1e26: 0xced9, 0x1e27: 0xcef9, 0x1e28: 0xcf19, 0x1e29: 0xcf39,\n\t0x1e2a: 0xcf59, 0x1e2b: 0xcf79, 0x1e2c: 0xcf99, 0x1e2d: 0xcfb9, 0x1e2e: 0xcfd9, 0x1e2f: 0xcff9,\n\t0x1e30: 0xd019, 0x1e31: 0xd039, 0x1e32: 0xd039, 0x1e33: 0xd039, 0x1e34: 0x8bbd, 0x1e35: 0xd059,\n\t0x1e36: 0xd079, 0x1e37: 0xd099, 0x1e38: 0x8bdd, 0x1e39: 0xd0b9, 0x1e3a: 0xd0d9, 0x1e3b: 0xd0f9,\n\t0x1e3c: 0xd119, 0x1e3d: 0xd139, 0x1e3e: 0xd159, 0x1e3f: 0xd179,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0xd199, 0x1e41: 0xd1b9, 0x1e42: 0xd1d9, 0x1e43: 0xd1f9, 0x1e44: 0xd219, 0x1e45: 0xd239,\n\t0x1e46: 0xd239, 0x1e47: 0xd259, 0x1e48: 0xd279, 0x1e49: 0xd299, 0x1e4a: 0xd2b9, 0x1e4b: 0xd2d9,\n\t0x1e4c: 0xd2f9, 0x1e4d: 0xd319, 0x1e4e: 0xd339, 0x1e4f: 0xd359, 0x1e50: 0xd379, 0x1e51: 0xd399,\n\t0x1e52: 0xd3b9, 0x1e53: 0xd3d9, 0x1e54: 0xd3f9, 0x1e55: 0xd419, 0x1e56: 0xd439, 0x1e57: 0xd459,\n\t0x1e58: 0xd479, 0x1e59: 0x8bfd, 0x1e5a: 0xd499, 0x1e5b: 0xd4b9, 0x1e5c: 0xd4d9, 0x1e5d: 0xc309,\n\t0x1e5e: 0xd4f9, 0x1e5f: 0xd519, 0x1e60: 0x8c1d, 0x1e61: 0x8c3d, 0x1e62: 0xd539, 0x1e63: 0xd559,\n\t0x1e64: 0xd579, 0x1e65: 0xd599, 0x1e66: 0xd5b9, 0x1e67: 0xd5d9, 0x1e68: 0x2040, 0x1e69: 0xd5f9,\n\t0x1e6a: 0xd619, 0x1e6b: 0xd619, 0x1e6c: 0x8c5d, 0x1e6d: 0xd639, 0x1e6e: 0xd659, 0x1e6f: 0xd679,\n\t0x1e70: 0xd699, 0x1e71: 0x8c7d, 0x1e72: 0xd6b9, 0x1e73: 0xd6d9, 0x1e74: 0x2040, 0x1e75: 0xd6f9,\n\t0x1e76: 0xd719, 0x1e77: 0xd739, 0x1e78: 0xd759, 0x1e79: 0xd779, 0x1e7a: 0xd799, 0x1e7b: 0x8c9d,\n\t0x1e7c: 0xd7b9, 0x1e7d: 0x8cbd, 0x1e7e: 0xd7d9, 0x1e7f: 0xd7f9,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0xd819, 0x1e81: 0xd839, 0x1e82: 0xd859, 0x1e83: 0xd879, 0x1e84: 0xd899, 0x1e85: 0xd8b9,\n\t0x1e86: 0xd8d9, 0x1e87: 0xd8f9, 0x1e88: 0xd919, 0x1e89: 0x8cdd, 0x1e8a: 0xd939, 0x1e8b: 0xd959,\n\t0x1e8c: 0xd979, 0x1e8d: 0xd999, 0x1e8e: 0xd9b9, 0x1e8f: 0x8cfd, 0x1e90: 0xd9d9, 0x1e91: 0x8d1d,\n\t0x1e92: 0x8d3d, 0x1e93: 0xd9f9, 0x1e94: 0xda19, 0x1e95: 0xda19, 0x1e96: 0xda39, 0x1e97: 0x8d5d,\n\t0x1e98: 0x8d7d, 0x1e99: 0xda59, 0x1e9a: 0xda79, 0x1e9b: 0xda99, 0x1e9c: 0xdab9, 0x1e9d: 0xdad9,\n\t0x1e9e: 0xdaf9, 0x1e9f: 0xdb19, 0x1ea0: 0xdb39, 0x1ea1: 0xdb59, 0x1ea2: 0xdb79, 0x1ea3: 0xdb99,\n\t0x1ea4: 0x8d9d, 0x1ea5: 0xdbb9, 0x1ea6: 0xdbd9, 0x1ea7: 0xdbf9, 0x1ea8: 0xdc19, 0x1ea9: 0xdbf9,\n\t0x1eaa: 0xdc39, 0x1eab: 0xdc59, 0x1eac: 0xdc79, 0x1ead: 0xdc99, 0x1eae: 0xdcb9, 0x1eaf: 0xdcd9,\n\t0x1eb0: 0xdcf9, 0x1eb1: 0xdd19, 0x1eb2: 0xdd39, 0x1eb3: 0xdd59, 0x1eb4: 0xdd79, 0x1eb5: 0xdd99,\n\t0x1eb6: 0xddb9, 0x1eb7: 0xddd9, 0x1eb8: 0x8dbd, 0x1eb9: 0xddf9, 0x1eba: 0xde19, 0x1ebb: 0xde39,\n\t0x1ebc: 0xde59, 0x1ebd: 0xde79, 0x1ebe: 0x8ddd, 0x1ebf: 0xde99,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0xe599, 0x1ec1: 0xe5b9, 0x1ec2: 0xe5d9, 0x1ec3: 0xe5f9, 0x1ec4: 0xe619, 0x1ec5: 0xe639,\n\t0x1ec6: 0x8efd, 0x1ec7: 0xe659, 0x1ec8: 0xe679, 0x1ec9: 0xe699, 0x1eca: 0xe6b9, 0x1ecb: 0xe6d9,\n\t0x1ecc: 0xe6f9, 0x1ecd: 0x8f1d, 0x1ece: 0xe719, 0x1ecf: 0xe739, 0x1ed0: 0x8f3d, 0x1ed1: 0x8f5d,\n\t0x1ed2: 0xe759, 0x1ed3: 0xe779, 0x1ed4: 0xe799, 0x1ed5: 0xe7b9, 0x1ed6: 0xe7d9, 0x1ed7: 0xe7f9,\n\t0x1ed8: 0xe819, 0x1ed9: 0xe839, 0x1eda: 0xe859, 0x1edb: 0x8f7d, 0x1edc: 0xe879, 0x1edd: 0x8f9d,\n\t0x1ede: 0xe899, 0x1edf: 0x2040, 0x1ee0: 0xe8b9, 0x1ee1: 0xe8d9, 0x1ee2: 0xe8f9, 0x1ee3: 0x8fbd,\n\t0x1ee4: 0xe919, 0x1ee5: 0xe939, 0x1ee6: 0x8fdd, 0x1ee7: 0x8ffd, 0x1ee8: 0xe959, 0x1ee9: 0xe979,\n\t0x1eea: 0xe999, 0x1eeb: 0xe9b9, 0x1eec: 0xe9d9, 0x1eed: 0xe9d9, 0x1eee: 0xe9f9, 0x1eef: 0xea19,\n\t0x1ef0: 0xea39, 0x1ef1: 0xea59, 0x1ef2: 0xea79, 0x1ef3: 0xea99, 0x1ef4: 0xeab9, 0x1ef5: 0x901d,\n\t0x1ef6: 0xead9, 0x1ef7: 0x903d, 0x1ef8: 0xeaf9, 0x1ef9: 0x905d, 0x1efa: 0xeb19, 0x1efb: 0x907d,\n\t0x1efc: 0x909d, 0x1efd: 0x90bd, 0x1efe: 0xeb39, 0x1eff: 0xeb59,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0xeb79, 0x1f01: 0x90dd, 0x1f02: 0x90fd, 0x1f03: 0x911d, 0x1f04: 0x913d, 0x1f05: 0xeb99,\n\t0x1f06: 0xebb9, 0x1f07: 0xebb9, 0x1f08: 0xebd9, 0x1f09: 0xebf9, 0x1f0a: 0xec19, 0x1f0b: 0xec39,\n\t0x1f0c: 0xec59, 0x1f0d: 0x915d, 0x1f0e: 0xec79, 0x1f0f: 0xec99, 0x1f10: 0xecb9, 0x1f11: 0xecd9,\n\t0x1f12: 0x917d, 0x1f13: 0xecf9, 0x1f14: 0x919d, 0x1f15: 0x91bd, 0x1f16: 0xed19, 0x1f17: 0xed39,\n\t0x1f18: 0xed59, 0x1f19: 0xed79, 0x1f1a: 0xed99, 0x1f1b: 0xedb9, 0x1f1c: 0x91dd, 0x1f1d: 0x91fd,\n\t0x1f1e: 0x921d, 0x1f1f: 0x2040, 0x1f20: 0xedd9, 0x1f21: 0x923d, 0x1f22: 0xedf9, 0x1f23: 0xee19,\n\t0x1f24: 0xee39, 0x1f25: 0x925d, 0x1f26: 0xee59, 0x1f27: 0xee79, 0x1f28: 0xee99, 0x1f29: 0xeeb9,\n\t0x1f2a: 0xeed9, 0x1f2b: 0x927d, 0x1f2c: 0xeef9, 0x1f2d: 0xef19, 0x1f2e: 0xef39, 0x1f2f: 0xef59,\n\t0x1f30: 0xef79, 0x1f31: 0xef99, 0x1f32: 0x929d, 0x1f33: 0x92bd, 0x1f34: 0xefb9, 0x1f35: 0x92dd,\n\t0x1f36: 0xefd9, 0x1f37: 0x92fd, 0x1f38: 0xeff9, 0x1f39: 0xf019, 0x1f3a: 0xf039, 0x1f3b: 0x931d,\n\t0x1f3c: 0x933d, 0x1f3d: 0xf059, 0x1f3e: 0x935d, 0x1f3f: 0xf079,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0xf6b9, 0x1f41: 0xf6d9, 0x1f42: 0xf6f9, 0x1f43: 0xf719, 0x1f44: 0xf739, 0x1f45: 0x951d,\n\t0x1f46: 0xf759, 0x1f47: 0xf779, 0x1f48: 0xf799, 0x1f49: 0xf7b9, 0x1f4a: 0xf7d9, 0x1f4b: 0x953d,\n\t0x1f4c: 0x955d, 0x1f4d: 0xf7f9, 0x1f4e: 0xf819, 0x1f4f: 0xf839, 0x1f50: 0xf859, 0x1f51: 0xf879,\n\t0x1f52: 0xf899, 0x1f53: 0x957d, 0x1f54: 0xf8b9, 0x1f55: 0xf8d9, 0x1f56: 0xf8f9, 0x1f57: 0xf919,\n\t0x1f58: 0x959d, 0x1f59: 0x95bd, 0x1f5a: 0xf939, 0x1f5b: 0xf959, 0x1f5c: 0xf979, 0x1f5d: 0x95dd,\n\t0x1f5e: 0xf999, 0x1f5f: 0xf9b9, 0x1f60: 0x6815, 0x1f61: 0x95fd, 0x1f62: 0xf9d9, 0x1f63: 0xf9f9,\n\t0x1f64: 0xfa19, 0x1f65: 0x961d, 0x1f66: 0xfa39, 0x1f67: 0xfa59, 0x1f68: 0xfa79, 0x1f69: 0xfa99,\n\t0x1f6a: 0xfab9, 0x1f6b: 0xfad9, 0x1f6c: 0xfaf9, 0x1f6d: 0x963d, 0x1f6e: 0xfb19, 0x1f6f: 0xfb39,\n\t0x1f70: 0xfb59, 0x1f71: 0x965d, 0x1f72: 0xfb79, 0x1f73: 0xfb99, 0x1f74: 0xfbb9, 0x1f75: 0xfbd9,\n\t0x1f76: 0x7b35, 0x1f77: 0x967d, 0x1f78: 0xfbf9, 0x1f79: 0xfc19, 0x1f7a: 0xfc39, 0x1f7b: 0x969d,\n\t0x1f7c: 0xfc59, 0x1f7d: 0x96bd, 0x1f7e: 0xfc79, 0x1f7f: 0xfc79,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0xfc99, 0x1f81: 0x96dd, 0x1f82: 0xfcb9, 0x1f83: 0xfcd9, 0x1f84: 0xfcf9, 0x1f85: 0xfd19,\n\t0x1f86: 0xfd39, 0x1f87: 0xfd59, 0x1f88: 0xfd79, 0x1f89: 0x96fd, 0x1f8a: 0xfd99, 0x1f8b: 0xfdb9,\n\t0x1f8c: 0xfdd9, 0x1f8d: 0xfdf9, 0x1f8e: 0xfe19, 0x1f8f: 0xfe39, 0x1f90: 0x971d, 0x1f91: 0xfe59,\n\t0x1f92: 0x973d, 0x1f93: 0x975d, 0x1f94: 0x977d, 0x1f95: 0xfe79, 0x1f96: 0xfe99, 0x1f97: 0xfeb9,\n\t0x1f98: 0xfed9, 0x1f99: 0xfef9, 0x1f9a: 0xff19, 0x1f9b: 0xff39, 0x1f9c: 0xff59, 0x1f9d: 0x979d,\n\t0x1f9e: 0x0040, 0x1f9f: 0x0040, 0x1fa0: 0x0040, 0x1fa1: 0x0040, 0x1fa2: 0x0040, 0x1fa3: 0x0040,\n\t0x1fa4: 0x0040, 0x1fa5: 0x0040, 0x1fa6: 0x0040, 0x1fa7: 0x0040, 0x1fa8: 0x0040, 0x1fa9: 0x0040,\n\t0x1faa: 0x0040, 0x1fab: 0x0040, 0x1fac: 0x0040, 0x1fad: 0x0040, 0x1fae: 0x0040, 0x1faf: 0x0040,\n\t0x1fb0: 0x0040, 0x1fb1: 0x0040, 0x1fb2: 0x0040, 0x1fb3: 0x0040, 0x1fb4: 0x0040, 0x1fb5: 0x0040,\n\t0x1fb6: 0x0040, 0x1fb7: 0x0040, 0x1fb8: 0x0040, 0x1fb9: 0x0040, 0x1fba: 0x0040, 0x1fbb: 0x0040,\n\t0x1fbc: 0x0040, 0x1fbd: 0x0040, 0x1fbe: 0x0040, 0x1fbf: 0x0040,\n}\n\n// idnaIndex: 36 blocks, 2304 entries, 4608 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2304]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x7d, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x7e, 0xca: 0x7f, 0xcb: 0x07, 0xcc: 0x80, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x81, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x82, 0xd6: 0x83, 0xd7: 0x84,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x85, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x86, 0xde: 0x87, 0xdf: 0x88,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,\n\t0xf0: 0x1d, 0xf1: 0x1e, 0xf2: 0x1e, 0xf3: 0x20, 0xf4: 0x21,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x89, 0x121: 0x13, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16,\n\t0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8d,\n\t0x130: 0x8e, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x8f, 0x135: 0x21, 0x136: 0x90, 0x137: 0x91,\n\t0x138: 0x92, 0x139: 0x93, 0x13a: 0x22, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x96,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e,\n\t0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6,\n\t0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f,\n\t0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae,\n\t0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6,\n\t0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe,\n\t0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc3,\n\t0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc4, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc5, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc6, 0x187: 0x9b,\n\t0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0x9b,\n\t0x190: 0xca, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b,\n\t0x198: 0x9b, 0x199: 0x9b, 0x19a: 0x9b, 0x19b: 0x9b, 0x19c: 0x9b, 0x19d: 0x9b, 0x19e: 0x9b, 0x19f: 0x9b,\n\t0x1a0: 0x9b, 0x1a1: 0x9b, 0x1a2: 0x9b, 0x1a3: 0x9b, 0x1a4: 0x9b, 0x1a5: 0x9b, 0x1a6: 0x9b, 0x1a7: 0x9b,\n\t0x1a8: 0xcb, 0x1a9: 0xcc, 0x1aa: 0x9b, 0x1ab: 0xcd, 0x1ac: 0x9b, 0x1ad: 0xce, 0x1ae: 0xcf, 0x1af: 0xd0,\n\t0x1b0: 0xd1, 0x1b1: 0x35, 0x1b2: 0x28, 0x1b3: 0x36, 0x1b4: 0xd2, 0x1b5: 0xd3, 0x1b6: 0xd4, 0x1b7: 0xd5,\n\t0x1b8: 0xd6, 0x1b9: 0xd7, 0x1ba: 0xd8, 0x1bb: 0xd9, 0x1bc: 0xda, 0x1bd: 0xdb, 0x1be: 0xdc, 0x1bf: 0x37,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x38, 0x1c1: 0xdd, 0x1c2: 0xde, 0x1c3: 0xdf, 0x1c4: 0xe0, 0x1c5: 0x39, 0x1c6: 0x3a, 0x1c7: 0xe1,\n\t0x1c8: 0xe2, 0x1c9: 0x3b, 0x1ca: 0x3c, 0x1cb: 0x3d, 0x1cc: 0x3e, 0x1cd: 0x3f, 0x1ce: 0x40, 0x1cf: 0x41,\n\t0x1d0: 0x9f, 0x1d1: 0x9f, 0x1d2: 0x9f, 0x1d3: 0x9f, 0x1d4: 0x9f, 0x1d5: 0x9f, 0x1d6: 0x9f, 0x1d7: 0x9f,\n\t0x1d8: 0x9f, 0x1d9: 0x9f, 0x1da: 0x9f, 0x1db: 0x9f, 0x1dc: 0x9f, 0x1dd: 0x9f, 0x1de: 0x9f, 0x1df: 0x9f,\n\t0x1e0: 0x9f, 0x1e1: 0x9f, 0x1e2: 0x9f, 0x1e3: 0x9f, 0x1e4: 0x9f, 0x1e5: 0x9f, 0x1e6: 0x9f, 0x1e7: 0x9f,\n\t0x1e8: 0x9f, 0x1e9: 0x9f, 0x1ea: 0x9f, 0x1eb: 0x9f, 0x1ec: 0x9f, 0x1ed: 0x9f, 0x1ee: 0x9f, 0x1ef: 0x9f,\n\t0x1f0: 0x9f, 0x1f1: 0x9f, 0x1f2: 0x9f, 0x1f3: 0x9f, 0x1f4: 0x9f, 0x1f5: 0x9f, 0x1f6: 0x9f, 0x1f7: 0x9f,\n\t0x1f8: 0x9f, 0x1f9: 0x9f, 0x1fa: 0x9f, 0x1fb: 0x9f, 0x1fc: 0x9f, 0x1fd: 0x9f, 0x1fe: 0x9f, 0x1ff: 0x9f,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9f, 0x201: 0x9f, 0x202: 0x9f, 0x203: 0x9f, 0x204: 0x9f, 0x205: 0x9f, 0x206: 0x9f, 0x207: 0x9f,\n\t0x208: 0x9f, 0x209: 0x9f, 0x20a: 0x9f, 0x20b: 0x9f, 0x20c: 0x9f, 0x20d: 0x9f, 0x20e: 0x9f, 0x20f: 0x9f,\n\t0x210: 0x9f, 0x211: 0x9f, 0x212: 0x9f, 0x213: 0x9f, 0x214: 0x9f, 0x215: 0x9f, 0x216: 0x9f, 0x217: 0x9f,\n\t0x218: 0x9f, 0x219: 0x9f, 0x21a: 0x9f, 0x21b: 0x9f, 0x21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f,\n\t0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f,\n\t0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f,\n\t0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b,\n\t0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f,\n\t0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f,\n\t0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f,\n\t0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f,\n\t0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f,\n\t0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f,\n\t0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f,\n\t0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f,\n\t0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f,\n\t0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f,\n\t0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f,\n\t0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f, 0x2a4: 0x9f, 0x2a5: 0x9f, 0x2a6: 0x9f, 0x2a7: 0x9f,\n\t0x2a8: 0x9f, 0x2a9: 0x9f, 0x2aa: 0x9f, 0x2ab: 0x9f, 0x2ac: 0x9f, 0x2ad: 0x9f, 0x2ae: 0x9f, 0x2af: 0x9f,\n\t0x2b0: 0x9f, 0x2b1: 0x9f, 0x2b2: 0x9f, 0x2b3: 0x9f, 0x2b4: 0x9f, 0x2b5: 0x9f, 0x2b6: 0x9f, 0x2b7: 0x9f,\n\t0x2b8: 0x9f, 0x2b9: 0x9f, 0x2ba: 0x9f, 0x2bb: 0x9f, 0x2bc: 0x9f, 0x2bd: 0x9f, 0x2be: 0x9f, 0x2bf: 0xe3,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x9f, 0x2c1: 0x9f, 0x2c2: 0x9f, 0x2c3: 0x9f, 0x2c4: 0x9f, 0x2c5: 0x9f, 0x2c6: 0x9f, 0x2c7: 0x9f,\n\t0x2c8: 0x9f, 0x2c9: 0x9f, 0x2ca: 0x9f, 0x2cb: 0x9f, 0x2cc: 0x9f, 0x2cd: 0x9f, 0x2ce: 0x9f, 0x2cf: 0x9f,\n\t0x2d0: 0x9f, 0x2d1: 0x9f, 0x2d2: 0xe4, 0x2d3: 0xe5, 0x2d4: 0x9f, 0x2d5: 0x9f, 0x2d6: 0x9f, 0x2d7: 0x9f,\n\t0x2d8: 0xe6, 0x2d9: 0x42, 0x2da: 0x43, 0x2db: 0xe7, 0x2dc: 0x44, 0x2dd: 0x45, 0x2de: 0x46, 0x2df: 0xe8,\n\t0x2e0: 0xe9, 0x2e1: 0xea, 0x2e2: 0xeb, 0x2e3: 0xec, 0x2e4: 0xed, 0x2e5: 0xee, 0x2e6: 0xef, 0x2e7: 0xf0,\n\t0x2e8: 0xf1, 0x2e9: 0xf2, 0x2ea: 0xf3, 0x2eb: 0xf4, 0x2ec: 0xf5, 0x2ed: 0xf6, 0x2ee: 0xf7, 0x2ef: 0xf8,\n\t0x2f0: 0x9f, 0x2f1: 0x9f, 0x2f2: 0x9f, 0x2f3: 0x9f, 0x2f4: 0x9f, 0x2f5: 0x9f, 0x2f6: 0x9f, 0x2f7: 0x9f,\n\t0x2f8: 0x9f, 0x2f9: 0x9f, 0x2fa: 0x9f, 0x2fb: 0x9f, 0x2fc: 0x9f, 0x2fd: 0x9f, 0x2fe: 0x9f, 0x2ff: 0x9f,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x9f, 0x301: 0x9f, 0x302: 0x9f, 0x303: 0x9f, 0x304: 0x9f, 0x305: 0x9f, 0x306: 0x9f, 0x307: 0x9f,\n\t0x308: 0x9f, 0x309: 0x9f, 0x30a: 0x9f, 0x30b: 0x9f, 0x30c: 0x9f, 0x30d: 0x9f, 0x30e: 0x9f, 0x30f: 0x9f,\n\t0x310: 0x9f, 0x311: 0x9f, 0x312: 0x9f, 0x313: 0x9f, 0x314: 0x9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f,\n\t0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xf9, 0x31f: 0xfa,\n\t// Block 0xd, offset 0x340\n\t0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba,\n\t0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba,\n\t0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba,\n\t0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba,\n\t0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba,\n\t0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba,\n\t0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba,\n\t0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba,\n\t0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba,\n\t0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba,\n\t0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba,\n\t0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfb, 0x3a5: 0xfc, 0x3a6: 0xfd, 0x3a7: 0xfe,\n\t0x3a8: 0x47, 0x3a9: 0xff, 0x3aa: 0x100, 0x3ab: 0x48, 0x3ac: 0x49, 0x3ad: 0x4a, 0x3ae: 0x4b, 0x3af: 0x4c,\n\t0x3b0: 0x101, 0x3b1: 0x4d, 0x3b2: 0x4e, 0x3b3: 0x4f, 0x3b4: 0x50, 0x3b5: 0x51, 0x3b6: 0x102, 0x3b7: 0x52,\n\t0x3b8: 0x53, 0x3b9: 0x54, 0x3ba: 0x55, 0x3bb: 0x56, 0x3bc: 0x57, 0x3bd: 0x58, 0x3be: 0x59, 0x3bf: 0x5a,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x103, 0x3c1: 0x104, 0x3c2: 0x9f, 0x3c3: 0x105, 0x3c4: 0x106, 0x3c5: 0x9b, 0x3c6: 0x107, 0x3c7: 0x108,\n\t0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x109, 0x3cb: 0x10a, 0x3cc: 0x10b, 0x3cd: 0x10c, 0x3ce: 0x10d, 0x3cf: 0x10e,\n\t0x3d0: 0x10f, 0x3d1: 0x9f, 0x3d2: 0x110, 0x3d3: 0x111, 0x3d4: 0x112, 0x3d5: 0x113, 0x3d6: 0xba, 0x3d7: 0xba,\n\t0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x114, 0x3dd: 0x115, 0x3de: 0xba, 0x3df: 0xba,\n\t0x3e0: 0x116, 0x3e1: 0x117, 0x3e2: 0x118, 0x3e3: 0x119, 0x3e4: 0x11a, 0x3e5: 0xba, 0x3e6: 0x11b, 0x3e7: 0x11c,\n\t0x3e8: 0x11d, 0x3e9: 0x11e, 0x3ea: 0x11f, 0x3eb: 0x5b, 0x3ec: 0x120, 0x3ed: 0x121, 0x3ee: 0x5c, 0x3ef: 0xba,\n\t0x3f0: 0x122, 0x3f1: 0x123, 0x3f2: 0x124, 0x3f3: 0x125, 0x3f4: 0x126, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba,\n\t0x3f8: 0xba, 0x3f9: 0x127, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0x128, 0x3fd: 0x129, 0x3fe: 0xba, 0x3ff: 0xba,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x12a, 0x401: 0x12b, 0x402: 0x12c, 0x403: 0x12d, 0x404: 0x12e, 0x405: 0x12f, 0x406: 0x130, 0x407: 0x131,\n\t0x408: 0x132, 0x409: 0xba, 0x40a: 0x133, 0x40b: 0x134, 0x40c: 0x5d, 0x40d: 0x5e, 0x40e: 0xba, 0x40f: 0xba,\n\t0x410: 0x135, 0x411: 0x136, 0x412: 0x137, 0x413: 0x138, 0x414: 0xba, 0x415: 0xba, 0x416: 0x139, 0x417: 0x13a,\n\t0x418: 0x13b, 0x419: 0x13c, 0x41a: 0x13d, 0x41b: 0x13e, 0x41c: 0x13f, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba,\n\t0x420: 0x140, 0x421: 0xba, 0x422: 0x141, 0x423: 0x142, 0x424: 0xba, 0x425: 0xba, 0x426: 0xba, 0x427: 0xba,\n\t0x428: 0x143, 0x429: 0x144, 0x42a: 0x145, 0x42b: 0x146, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba,\n\t0x430: 0x147, 0x431: 0x148, 0x432: 0x149, 0x433: 0xba, 0x434: 0x14a, 0x435: 0x14b, 0x436: 0x14c, 0x437: 0xba,\n\t0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0x14d, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0xba,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f,\n\t0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x14e, 0x44f: 0xba,\n\t0x450: 0x9b, 0x451: 0x14f, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x150, 0x456: 0xba, 0x457: 0xba,\n\t0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba,\n\t0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba,\n\t0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba,\n\t0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba,\n\t0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f,\n\t0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f,\n\t0x490: 0x151, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba,\n\t0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba,\n\t0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba,\n\t0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba,\n\t0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba,\n\t0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xba, 0x4c1: 0xba, 0x4c2: 0xba, 0x4c3: 0xba, 0x4c4: 0xba, 0x4c5: 0xba, 0x4c6: 0xba, 0x4c7: 0xba,\n\t0x4c8: 0xba, 0x4c9: 0xba, 0x4ca: 0xba, 0x4cb: 0xba, 0x4cc: 0xba, 0x4cd: 0xba, 0x4ce: 0xba, 0x4cf: 0xba,\n\t0x4d0: 0x9f, 0x4d1: 0x9f, 0x4d2: 0x9f, 0x4d3: 0x9f, 0x4d4: 0x9f, 0x4d5: 0x9f, 0x4d6: 0x9f, 0x4d7: 0x9f,\n\t0x4d8: 0x9f, 0x4d9: 0x152, 0x4da: 0xba, 0x4db: 0xba, 0x4dc: 0xba, 0x4dd: 0xba, 0x4de: 0xba, 0x4df: 0xba,\n\t0x4e0: 0xba, 0x4e1: 0xba, 0x4e2: 0xba, 0x4e3: 0xba, 0x4e4: 0xba, 0x4e5: 0xba, 0x4e6: 0xba, 0x4e7: 0xba,\n\t0x4e8: 0xba, 0x4e9: 0xba, 0x4ea: 0xba, 0x4eb: 0xba, 0x4ec: 0xba, 0x4ed: 0xba, 0x4ee: 0xba, 0x4ef: 0xba,\n\t0x4f0: 0xba, 0x4f1: 0xba, 0x4f2: 0xba, 0x4f3: 0xba, 0x4f4: 0xba, 0x4f5: 0xba, 0x4f6: 0xba, 0x4f7: 0xba,\n\t0x4f8: 0xba, 0x4f9: 0xba, 0x4fa: 0xba, 0x4fb: 0xba, 0x4fc: 0xba, 0x4fd: 0xba, 0x4fe: 0xba, 0x4ff: 0xba,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xba, 0x501: 0xba, 0x502: 0xba, 0x503: 0xba, 0x504: 0xba, 0x505: 0xba, 0x506: 0xba, 0x507: 0xba,\n\t0x508: 0xba, 0x509: 0xba, 0x50a: 0xba, 0x50b: 0xba, 0x50c: 0xba, 0x50d: 0xba, 0x50e: 0xba, 0x50f: 0xba,\n\t0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba,\n\t0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba,\n\t0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f,\n\t0x528: 0x146, 0x529: 0x153, 0x52a: 0xba, 0x52b: 0x154, 0x52c: 0x155, 0x52d: 0x156, 0x52e: 0x157, 0x52f: 0xba,\n\t0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba,\n\t0x538: 0xba, 0x539: 0x158, 0x53a: 0x159, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x15a, 0x53e: 0x15b, 0x53f: 0x15c,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f,\n\t0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f,\n\t0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f,\n\t0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x15d,\n\t0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f,\n\t0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x15e, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba,\n\t0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba,\n\t0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x9f, 0x581: 0x9f, 0x582: 0x9f, 0x583: 0x9f, 0x584: 0x15f, 0x585: 0x160, 0x586: 0x9f, 0x587: 0x9f,\n\t0x588: 0x9f, 0x589: 0x9f, 0x58a: 0x9f, 0x58b: 0x161, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba,\n\t0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba,\n\t0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba,\n\t0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba,\n\t0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba,\n\t0x5b0: 0x9f, 0x5b1: 0x162, 0x5b2: 0x163, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba,\n\t0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x9b, 0x5c1: 0x9b, 0x5c2: 0x9b, 0x5c3: 0x164, 0x5c4: 0x165, 0x5c5: 0x166, 0x5c6: 0x167, 0x5c7: 0x168,\n\t0x5c8: 0x9b, 0x5c9: 0x169, 0x5ca: 0xba, 0x5cb: 0x16a, 0x5cc: 0x9b, 0x5cd: 0x16b, 0x5ce: 0xba, 0x5cf: 0xba,\n\t0x5d0: 0x5f, 0x5d1: 0x60, 0x5d2: 0x61, 0x5d3: 0x62, 0x5d4: 0x63, 0x5d5: 0x64, 0x5d6: 0x65, 0x5d7: 0x66,\n\t0x5d8: 0x67, 0x5d9: 0x68, 0x5da: 0x69, 0x5db: 0x6a, 0x5dc: 0x6b, 0x5dd: 0x6c, 0x5de: 0x6d, 0x5df: 0x6e,\n\t0x5e0: 0x9b, 0x5e1: 0x9b, 0x5e2: 0x9b, 0x5e3: 0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b,\n\t0x5e8: 0x16c, 0x5e9: 0x16d, 0x5ea: 0x16e, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba,\n\t0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba,\n\t0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x16f, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0xba, 0x605: 0xba, 0x606: 0xba, 0x607: 0xba,\n\t0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0xba, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba,\n\t0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba,\n\t0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba,\n\t0x620: 0x122, 0x621: 0x122, 0x622: 0x122, 0x623: 0x170, 0x624: 0x6f, 0x625: 0x171, 0x626: 0xba, 0x627: 0xba,\n\t0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba,\n\t0x630: 0xba, 0x631: 0x172, 0x632: 0x173, 0x633: 0xba, 0x634: 0xba, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba,\n\t0x638: 0x70, 0x639: 0x71, 0x63a: 0x72, 0x63b: 0x174, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x175, 0x641: 0x9b, 0x642: 0x176, 0x643: 0x177, 0x644: 0x73, 0x645: 0x74, 0x646: 0x178, 0x647: 0x179,\n\t0x648: 0x75, 0x649: 0x17a, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b,\n\t0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b,\n\t0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x17b, 0x65c: 0x9b, 0x65d: 0x17c, 0x65e: 0x9b, 0x65f: 0x17d,\n\t0x660: 0x17e, 0x661: 0x17f, 0x662: 0x180, 0x663: 0xba, 0x664: 0x181, 0x665: 0x182, 0x666: 0x183, 0x667: 0x184,\n\t0x668: 0xba, 0x669: 0x185, 0x66a: 0xba, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba,\n\t0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba,\n\t0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f,\n\t0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f,\n\t0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f,\n\t0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x186, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f,\n\t0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f,\n\t0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f,\n\t0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 0x9f, 0x6b6: 0x9f, 0x6b7: 0x9f,\n\t0x6b8: 0x9f, 0x6b9: 0x9f, 0x6ba: 0x9f, 0x6bb: 0x9f, 0x6bc: 0x9f, 0x6bd: 0x9f, 0x6be: 0x9f, 0x6bf: 0x9f,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x9f, 0x6c1: 0x9f, 0x6c2: 0x9f, 0x6c3: 0x9f, 0x6c4: 0x9f, 0x6c5: 0x9f, 0x6c6: 0x9f, 0x6c7: 0x9f,\n\t0x6c8: 0x9f, 0x6c9: 0x9f, 0x6ca: 0x9f, 0x6cb: 0x9f, 0x6cc: 0x9f, 0x6cd: 0x9f, 0x6ce: 0x9f, 0x6cf: 0x9f,\n\t0x6d0: 0x9f, 0x6d1: 0x9f, 0x6d2: 0x9f, 0x6d3: 0x9f, 0x6d4: 0x9f, 0x6d5: 0x9f, 0x6d6: 0x9f, 0x6d7: 0x9f,\n\t0x6d8: 0x9f, 0x6d9: 0x9f, 0x6da: 0x9f, 0x6db: 0x9f, 0x6dc: 0x187, 0x6dd: 0x9f, 0x6de: 0x9f, 0x6df: 0x9f,\n\t0x6e0: 0x188, 0x6e1: 0x9f, 0x6e2: 0x9f, 0x6e3: 0x9f, 0x6e4: 0x9f, 0x6e5: 0x9f, 0x6e6: 0x9f, 0x6e7: 0x9f,\n\t0x6e8: 0x9f, 0x6e9: 0x9f, 0x6ea: 0x9f, 0x6eb: 0x9f, 0x6ec: 0x9f, 0x6ed: 0x9f, 0x6ee: 0x9f, 0x6ef: 0x9f,\n\t0x6f0: 0x9f, 0x6f1: 0x9f, 0x6f2: 0x9f, 0x6f3: 0x9f, 0x6f4: 0x9f, 0x6f5: 0x9f, 0x6f6: 0x9f, 0x6f7: 0x9f,\n\t0x6f8: 0x9f, 0x6f9: 0x9f, 0x6fa: 0x9f, 0x6fb: 0x9f, 0x6fc: 0x9f, 0x6fd: 0x9f, 0x6fe: 0x9f, 0x6ff: 0x9f,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x9f, 0x701: 0x9f, 0x702: 0x9f, 0x703: 0x9f, 0x704: 0x9f, 0x705: 0x9f, 0x706: 0x9f, 0x707: 0x9f,\n\t0x708: 0x9f, 0x709: 0x9f, 0x70a: 0x9f, 0x70b: 0x9f, 0x70c: 0x9f, 0x70d: 0x9f, 0x70e: 0x9f, 0x70f: 0x9f,\n\t0x710: 0x9f, 0x711: 0x9f, 0x712: 0x9f, 0x713: 0x9f, 0x714: 0x9f, 0x715: 0x9f, 0x716: 0x9f, 0x717: 0x9f,\n\t0x718: 0x9f, 0x719: 0x9f, 0x71a: 0x9f, 0x71b: 0x9f, 0x71c: 0x9f, 0x71d: 0x9f, 0x71e: 0x9f, 0x71f: 0x9f,\n\t0x720: 0x9f, 0x721: 0x9f, 0x722: 0x9f, 0x723: 0x9f, 0x724: 0x9f, 0x725: 0x9f, 0x726: 0x9f, 0x727: 0x9f,\n\t0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f,\n\t0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f,\n\t0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x189, 0x73b: 0x9f, 0x73c: 0x9f, 0x73d: 0x9f, 0x73e: 0x9f, 0x73f: 0x9f,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x9f, 0x741: 0x9f, 0x742: 0x9f, 0x743: 0x9f, 0x744: 0x9f, 0x745: 0x9f, 0x746: 0x9f, 0x747: 0x9f,\n\t0x748: 0x9f, 0x749: 0x9f, 0x74a: 0x9f, 0x74b: 0x9f, 0x74c: 0x9f, 0x74d: 0x9f, 0x74e: 0x9f, 0x74f: 0x9f,\n\t0x750: 0x9f, 0x751: 0x9f, 0x752: 0x9f, 0x753: 0x9f, 0x754: 0x9f, 0x755: 0x9f, 0x756: 0x9f, 0x757: 0x9f,\n\t0x758: 0x9f, 0x759: 0x9f, 0x75a: 0x9f, 0x75b: 0x9f, 0x75c: 0x9f, 0x75d: 0x9f, 0x75e: 0x9f, 0x75f: 0x9f,\n\t0x760: 0x9f, 0x761: 0x9f, 0x762: 0x9f, 0x763: 0x9f, 0x764: 0x9f, 0x765: 0x9f, 0x766: 0x9f, 0x767: 0x9f,\n\t0x768: 0x9f, 0x769: 0x9f, 0x76a: 0x9f, 0x76b: 0x9f, 0x76c: 0x9f, 0x76d: 0x9f, 0x76e: 0x9f, 0x76f: 0x18a,\n\t0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba,\n\t0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0xba, 0x781: 0xba, 0x782: 0xba, 0x783: 0xba, 0x784: 0xba, 0x785: 0xba, 0x786: 0xba, 0x787: 0xba,\n\t0x788: 0xba, 0x789: 0xba, 0x78a: 0xba, 0x78b: 0xba, 0x78c: 0xba, 0x78d: 0xba, 0x78e: 0xba, 0x78f: 0xba,\n\t0x790: 0xba, 0x791: 0xba, 0x792: 0xba, 0x793: 0xba, 0x794: 0xba, 0x795: 0xba, 0x796: 0xba, 0x797: 0xba,\n\t0x798: 0xba, 0x799: 0xba, 0x79a: 0xba, 0x79b: 0xba, 0x79c: 0xba, 0x79d: 0xba, 0x79e: 0xba, 0x79f: 0xba,\n\t0x7a0: 0x76, 0x7a1: 0x77, 0x7a2: 0x78, 0x7a3: 0x18b, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x18c, 0x7a7: 0x7b,\n\t0x7a8: 0x7c, 0x7a9: 0xba, 0x7aa: 0xba, 0x7ab: 0xba, 0x7ac: 0xba, 0x7ad: 0xba, 0x7ae: 0xba, 0x7af: 0xba,\n\t0x7b0: 0xba, 0x7b1: 0xba, 0x7b2: 0xba, 0x7b3: 0xba, 0x7b4: 0xba, 0x7b5: 0xba, 0x7b6: 0xba, 0x7b7: 0xba,\n\t0x7b8: 0xba, 0x7b9: 0xba, 0x7ba: 0xba, 0x7bb: 0xba, 0x7bc: 0xba, 0x7bd: 0xba, 0x7be: 0xba, 0x7bf: 0xba,\n\t// Block 0x1f, offset 0x7c0\n\t0x7d0: 0x0d, 0x7d1: 0x0e, 0x7d2: 0x0f, 0x7d3: 0x10, 0x7d4: 0x11, 0x7d5: 0x0b, 0x7d6: 0x12, 0x7d7: 0x07,\n\t0x7d8: 0x13, 0x7d9: 0x0b, 0x7da: 0x0b, 0x7db: 0x14, 0x7dc: 0x0b, 0x7dd: 0x15, 0x7de: 0x16, 0x7df: 0x17,\n\t0x7e0: 0x07, 0x7e1: 0x07, 0x7e2: 0x07, 0x7e3: 0x07, 0x7e4: 0x07, 0x7e5: 0x07, 0x7e6: 0x07, 0x7e7: 0x07,\n\t0x7e8: 0x07, 0x7e9: 0x07, 0x7ea: 0x18, 0x7eb: 0x19, 0x7ec: 0x1a, 0x7ed: 0x07, 0x7ee: 0x1b, 0x7ef: 0x1c,\n\t0x7f0: 0x0b, 0x7f1: 0x0b, 0x7f2: 0x0b, 0x7f3: 0x0b, 0x7f4: 0x0b, 0x7f5: 0x0b, 0x7f6: 0x0b, 0x7f7: 0x0b,\n\t0x7f8: 0x0b, 0x7f9: 0x0b, 0x7fa: 0x0b, 0x7fb: 0x0b, 0x7fc: 0x0b, 0x7fd: 0x0b, 0x7fe: 0x0b, 0x7ff: 0x0b,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0b, 0x801: 0x0b, 0x802: 0x0b, 0x803: 0x0b, 0x804: 0x0b, 0x805: 0x0b, 0x806: 0x0b, 0x807: 0x0b,\n\t0x808: 0x0b, 0x809: 0x0b, 0x80a: 0x0b, 0x80b: 0x0b, 0x80c: 0x0b, 0x80d: 0x0b, 0x80e: 0x0b, 0x80f: 0x0b,\n\t0x810: 0x0b, 0x811: 0x0b, 0x812: 0x0b, 0x813: 0x0b, 0x814: 0x0b, 0x815: 0x0b, 0x816: 0x0b, 0x817: 0x0b,\n\t0x818: 0x0b, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x0b, 0x81c: 0x0b, 0x81d: 0x0b, 0x81e: 0x0b, 0x81f: 0x0b,\n\t0x820: 0x0b, 0x821: 0x0b, 0x822: 0x0b, 0x823: 0x0b, 0x824: 0x0b, 0x825: 0x0b, 0x826: 0x0b, 0x827: 0x0b,\n\t0x828: 0x0b, 0x829: 0x0b, 0x82a: 0x0b, 0x82b: 0x0b, 0x82c: 0x0b, 0x82d: 0x0b, 0x82e: 0x0b, 0x82f: 0x0b,\n\t0x830: 0x0b, 0x831: 0x0b, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b,\n\t0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x18d, 0x841: 0x18e, 0x842: 0xba, 0x843: 0xba, 0x844: 0x18f, 0x845: 0x18f, 0x846: 0x18f, 0x847: 0x190,\n\t0x848: 0xba, 0x849: 0xba, 0x84a: 0xba, 0x84b: 0xba, 0x84c: 0xba, 0x84d: 0xba, 0x84e: 0xba, 0x84f: 0xba,\n\t0x850: 0xba, 0x851: 0xba, 0x852: 0xba, 0x853: 0xba, 0x854: 0xba, 0x855: 0xba, 0x856: 0xba, 0x857: 0xba,\n\t0x858: 0xba, 0x859: 0xba, 0x85a: 0xba, 0x85b: 0xba, 0x85c: 0xba, 0x85d: 0xba, 0x85e: 0xba, 0x85f: 0xba,\n\t0x860: 0xba, 0x861: 0xba, 0x862: 0xba, 0x863: 0xba, 0x864: 0xba, 0x865: 0xba, 0x866: 0xba, 0x867: 0xba,\n\t0x868: 0xba, 0x869: 0xba, 0x86a: 0xba, 0x86b: 0xba, 0x86c: 0xba, 0x86d: 0xba, 0x86e: 0xba, 0x86f: 0xba,\n\t0x870: 0xba, 0x871: 0xba, 0x872: 0xba, 0x873: 0xba, 0x874: 0xba, 0x875: 0xba, 0x876: 0xba, 0x877: 0xba,\n\t0x878: 0xba, 0x879: 0xba, 0x87a: 0xba, 0x87b: 0xba, 0x87c: 0xba, 0x87d: 0xba, 0x87e: 0xba, 0x87f: 0xba,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b,\n\t0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b,\n\t0x890: 0x0b, 0x891: 0x0b, 0x892: 0x0b, 0x893: 0x0b, 0x894: 0x0b, 0x895: 0x0b, 0x896: 0x0b, 0x897: 0x0b,\n\t0x898: 0x0b, 0x899: 0x0b, 0x89a: 0x0b, 0x89b: 0x0b, 0x89c: 0x0b, 0x89d: 0x0b, 0x89e: 0x0b, 0x89f: 0x0b,\n\t0x8a0: 0x1f, 0x8a1: 0x0b, 0x8a2: 0x0b, 0x8a3: 0x0b, 0x8a4: 0x0b, 0x8a5: 0x0b, 0x8a6: 0x0b, 0x8a7: 0x0b,\n\t0x8a8: 0x0b, 0x8a9: 0x0b, 0x8aa: 0x0b, 0x8ab: 0x0b, 0x8ac: 0x0b, 0x8ad: 0x0b, 0x8ae: 0x0b, 0x8af: 0x0b,\n\t0x8b0: 0x0b, 0x8b1: 0x0b, 0x8b2: 0x0b, 0x8b3: 0x0b, 0x8b4: 0x0b, 0x8b5: 0x0b, 0x8b6: 0x0b, 0x8b7: 0x0b,\n\t0x8b8: 0x0b, 0x8b9: 0x0b, 0x8ba: 0x0b, 0x8bb: 0x0b, 0x8bc: 0x0b, 0x8bd: 0x0b, 0x8be: 0x0b, 0x8bf: 0x0b,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b,\n\t0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b,\n}\n\n// idnaSparseOffset: 276 entries, 552 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x33, 0x3e, 0x4a, 0x4e, 0x5d, 0x62, 0x6c, 0x78, 0x86, 0x8b, 0x94, 0xa4, 0xb2, 0xbe, 0xca, 0xdb, 0xe5, 0xec, 0xf9, 0x10a, 0x111, 0x11c, 0x12b, 0x139, 0x143, 0x145, 0x14a, 0x14d, 0x150, 0x152, 0x15e, 0x169, 0x171, 0x177, 0x17d, 0x182, 0x187, 0x18a, 0x18e, 0x194, 0x199, 0x1a5, 0x1af, 0x1b5, 0x1c6, 0x1d0, 0x1d3, 0x1db, 0x1de, 0x1eb, 0x1f3, 0x1f7, 0x1fe, 0x206, 0x216, 0x222, 0x224, 0x22e, 0x23a, 0x246, 0x252, 0x25a, 0x25f, 0x269, 0x27a, 0x27e, 0x289, 0x28d, 0x296, 0x29e, 0x2a4, 0x2a9, 0x2ac, 0x2b0, 0x2b6, 0x2ba, 0x2be, 0x2c2, 0x2c7, 0x2cd, 0x2d5, 0x2dc, 0x2e7, 0x2f1, 0x2f5, 0x2f8, 0x2fe, 0x302, 0x304, 0x307, 0x309, 0x30c, 0x316, 0x319, 0x328, 0x32c, 0x331, 0x334, 0x338, 0x33d, 0x342, 0x348, 0x34e, 0x35d, 0x363, 0x367, 0x376, 0x37b, 0x383, 0x38d, 0x398, 0x3a0, 0x3b1, 0x3ba, 0x3ca, 0x3d7, 0x3e1, 0x3e6, 0x3f3, 0x3f7, 0x3fc, 0x3fe, 0x402, 0x404, 0x408, 0x411, 0x417, 0x41b, 0x42b, 0x435, 0x43a, 0x43d, 0x443, 0x44a, 0x44f, 0x453, 0x459, 0x45e, 0x467, 0x46c, 0x472, 0x479, 0x480, 0x487, 0x48b, 0x490, 0x493, 0x498, 0x4a4, 0x4aa, 0x4af, 0x4b6, 0x4be, 0x4c3, 0x4c7, 0x4d7, 0x4de, 0x4e2, 0x4e6, 0x4ed, 0x4ef, 0x4f2, 0x4f5, 0x4f9, 0x502, 0x506, 0x50e, 0x516, 0x51c, 0x525, 0x531, 0x538, 0x541, 0x54b, 0x552, 0x560, 0x56d, 0x57a, 0x583, 0x587, 0x596, 0x59e, 0x5a9, 0x5b2, 0x5b8, 0x5c0, 0x5c9, 0x5d3, 0x5d6, 0x5e2, 0x5eb, 0x5ee, 0x5f3, 0x5fe, 0x607, 0x613, 0x616, 0x620, 0x629, 0x635, 0x642, 0x64f, 0x65d, 0x664, 0x667, 0x66c, 0x66f, 0x672, 0x675, 0x67c, 0x683, 0x687, 0x692, 0x695, 0x698, 0x69b, 0x6a1, 0x6a6, 0x6aa, 0x6ad, 0x6b0, 0x6b3, 0x6b6, 0x6b9, 0x6be, 0x6c8, 0x6cb, 0x6cf, 0x6de, 0x6ea, 0x6ee, 0x6f3, 0x6f7, 0x6fc, 0x700, 0x705, 0x70e, 0x719, 0x71f, 0x727, 0x72a, 0x72d, 0x731, 0x735, 0x73b, 0x741, 0x746, 0x749, 0x759, 0x760, 0x763, 0x766, 0x76a, 0x770, 0x775, 0x77a, 0x782, 0x787, 0x78b, 0x78f, 0x792, 0x795, 0x799, 0x79d, 0x7a0, 0x7b0, 0x7c1, 0x7c6, 0x7c8, 0x7ca}\n\n// idnaSparseValues: 1997 entries, 7988 bytes\nvar idnaSparseValues = [1997]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0249, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0259, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0269, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0279, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0289, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x6, offset 0x33\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0401, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xae},\n\t{value: 0x0808, lo: 0xaf, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x62\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbf},\n\t// Block 0xc, offset 0x6c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x78\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0a08, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0c08, lo: 0xaa, hi: 0xac},\n\t{value: 0x0808, lo: 0xad, hi: 0xad},\n\t{value: 0x0c08, lo: 0xae, hi: 0xae},\n\t{value: 0x0a08, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0a08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xe, offset 0x86\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0xf, offset 0x8b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x10, offset 0x94\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x11, offset 0xa4\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x12, offset 0xb2\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x3b08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbe\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x14, offset 0xca\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x15, offset 0xdb\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x08f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x16, offset 0xe5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x17, offset 0xec\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0961, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0999, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x18, offset 0xf9\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x19, offset 0x10a\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x1a, offset 0x111\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1b, offset 0x11c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1c, offset 0x12b\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1d, offset 0x139\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1e, offset 0x143\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x1f, offset 0x145\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x20, offset 0x14a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x21, offset 0x14d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x22, offset 0x150\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x23, offset 0x152\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x24, offset 0x15e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x25, offset 0x169\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x26, offset 0x171\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x27, offset 0x177\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x28, offset 0x17d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x29, offset 0x182\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x2a, offset 0x187\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2b, offset 0x18a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2c, offset 0x18e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2d, offset 0x194\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2e, offset 0x199\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x30, offset 0x1af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x31, offset 0x1b5\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x32, offset 0x1c6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x33, offset 0x1d0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x34, offset 0x1d3\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x35, offset 0x1db\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x36, offset 0x1de\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x37, offset 0x1eb\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x38, offset 0x1f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x39, offset 0x1f7\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x3a, offset 0x1fe\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3b, offset 0x206\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3c, offset 0x216\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3d, offset 0x222\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x3e, offset 0x224\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x3f, offset 0x22e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x40, offset 0x23a\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x41, offset 0x246\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x42, offset 0x252\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x43, offset 0x25a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x44, offset 0x25f\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0e29, lo: 0x80, hi: 0x80},\n\t{value: 0x0e41, lo: 0x81, hi: 0x81},\n\t{value: 0x0e59, lo: 0x82, hi: 0x82},\n\t{value: 0x0e71, lo: 0x83, hi: 0x83},\n\t{value: 0x0e89, lo: 0x84, hi: 0x85},\n\t{value: 0x0ea1, lo: 0x86, hi: 0x86},\n\t{value: 0x0eb9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0x45, offset 0x269\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x46, offset 0x27a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x47, offset 0x27e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x48, offset 0x289\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x49, offset 0x28d\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x24c1, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x4a, offset 0x296\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x24f1, lo: 0xac, hi: 0xac},\n\t{value: 0x2529, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x2579, lo: 0xaf, hi: 0xaf},\n\t{value: 0x25b1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4b, offset 0x29e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4c, offset 0x2a4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09c5, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09e5, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4d, offset 0x2a9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x4e, offset 0x2ac\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x28c1, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x4f, offset 0x2b0\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e66, lo: 0xb4, hi: 0xb4},\n\t{value: 0x292a, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e86, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x50, offset 0x2b6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x2941, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x51, offset 0x2ba\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x52, offset 0x2be\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0xbf},\n\t// Block 0x53, offset 0x2c2\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x54, offset 0x2c7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ea5, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x55, offset 0x2cd\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x56, offset 0x2d5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x57, offset 0x2dc\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x58, offset 0x2e7\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x59, offset 0x2f1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5a, offset 0x2f5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0xbf},\n\t// Block 0x5b, offset 0x2f8\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0edd, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5c, offset 0x2fe\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0efd, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5d, offset 0x302\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f1d, lo: 0x80, hi: 0xbf},\n\t// Block 0x5e, offset 0x304\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x171d, lo: 0x80, hi: 0x8f},\n\t{value: 0x18fd, lo: 0x90, hi: 0xbf},\n\t// Block 0x5f, offset 0x307\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1efd, lo: 0x80, hi: 0xbf},\n\t// Block 0x60, offset 0x309\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x61, offset 0x30c\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x29e2, lo: 0x9b, hi: 0x9b},\n\t{value: 0x2a0a, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x2a31, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x62, offset 0x316\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x2a69, lo: 0xbf, hi: 0xbf},\n\t// Block 0x63, offset 0x319\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb0},\n\t{value: 0x2a1d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a3d, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a5d, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a7d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a5d, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2a9d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2abd, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2add, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2afd, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b1d, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2afd, lo: 0xbe, hi: 0xbf},\n\t// Block 0x64, offset 0x328\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x65, offset 0x32c\n\t{value: 0x0030, lo: 0x04},\n\t{value: 0x2aa2, lo: 0x80, hi: 0x9d},\n\t{value: 0x305a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x30a2, lo: 0xa0, hi: 0xbf},\n\t// Block 0x66, offset 0x331\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x67, offset 0x334\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x68, offset 0x338\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x69, offset 0x33d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x6a, offset 0x342\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6b, offset 0x348\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2009, lo: 0xb8, hi: 0xb8},\n\t{value: 0x6e89, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xbf},\n\t// Block 0x6c, offset 0x34e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6d, offset 0x35d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6e, offset 0x363\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x6f, offset 0x367\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x70, offset 0x376\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x71, offset 0x37b\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x72, offset 0x383\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x73, offset 0x38d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x74, offset 0x398\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x75, offset 0x3a0\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x76, offset 0x3b1\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x77, offset 0x3ba\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x78, offset 0x3ca\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x79, offset 0x3d7\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4465, lo: 0x9c, hi: 0x9c},\n\t{value: 0x447d, lo: 0x9d, hi: 0x9d},\n\t{value: 0x2971, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xaf},\n\t{value: 0x4495, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7a, offset 0x3e1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44b5, lo: 0x80, hi: 0x8f},\n\t{value: 0x44d5, lo: 0x90, hi: 0x9f},\n\t{value: 0x44f5, lo: 0xa0, hi: 0xaf},\n\t{value: 0x44d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7b, offset 0x3e6\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x7c, offset 0x3f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7d, offset 0x3f7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x7e, offset 0x3fc\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x4515, lo: 0x80, hi: 0xbf},\n\t// Block 0x7f, offset 0x3fe\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d15, lo: 0x80, hi: 0x94},\n\t{value: 0x4ad5, lo: 0x95, hi: 0x95},\n\t{value: 0x4fb5, lo: 0x96, hi: 0xbf},\n\t// Block 0x80, offset 0x402\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x54f5, lo: 0x80, hi: 0xbf},\n\t// Block 0x81, offset 0x404\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5cf5, lo: 0x80, hi: 0x84},\n\t{value: 0x5655, lo: 0x85, hi: 0x85},\n\t{value: 0x5d95, lo: 0x86, hi: 0xbf},\n\t// Block 0x82, offset 0x408\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b55, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d15, lo: 0x90, hi: 0x90},\n\t{value: 0x6d55, lo: 0x91, hi: 0xab},\n\t{value: 0x6ea1, lo: 0xac, hi: 0xac},\n\t{value: 0x70b5, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x70d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x83, offset 0x411\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x72d5, lo: 0x80, hi: 0xad},\n\t{value: 0x6535, lo: 0xae, hi: 0xae},\n\t{value: 0x7895, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f55, lo: 0xb6, hi: 0xb6},\n\t{value: 0x7975, lo: 0xb7, hi: 0xbf},\n\t// Block 0x84, offset 0x417\n\t{value: 0x0028, lo: 0x03},\n\t{value: 0x7c21, lo: 0x80, hi: 0x82},\n\t{value: 0x7be1, lo: 0x83, hi: 0x83},\n\t{value: 0x7c99, lo: 0x84, hi: 0xbf},\n\t// Block 0x85, offset 0x41b\n\t{value: 0x0038, lo: 0x0f},\n\t{value: 0x9db1, lo: 0x80, hi: 0x83},\n\t{value: 0x9e59, lo: 0x84, hi: 0x85},\n\t{value: 0x9e91, lo: 0x86, hi: 0x87},\n\t{value: 0x9ec9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0xa089, lo: 0x92, hi: 0x97},\n\t{value: 0xa1a1, lo: 0x98, hi: 0x9c},\n\t{value: 0xa281, lo: 0x9d, hi: 0xb3},\n\t{value: 0x9d41, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9db1, lo: 0xb5, hi: 0xb5},\n\t{value: 0xa789, lo: 0xb6, hi: 0xbb},\n\t{value: 0xa869, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa7f9, lo: 0xbd, hi: 0xbd},\n\t{value: 0xa8d9, lo: 0xbe, hi: 0xbf},\n\t// Block 0x86, offset 0x42b\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x87, offset 0x435\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x88, offset 0x43a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x89, offset 0x43d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x8a, offset 0x443\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x8b, offset 0x44a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8c, offset 0x44f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8d, offset 0x453\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x8e, offset 0x459\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xbf},\n\t// Block 0x8f, offset 0x45e\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x90, offset 0x467\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x91, offset 0x46c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x92, offset 0x472\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8ad5, lo: 0x98, hi: 0x9f},\n\t{value: 0x8aed, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x93, offset 0x479\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8aed, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8ad5, lo: 0xb8, hi: 0xbf},\n\t// Block 0x94, offset 0x480\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x95, offset 0x487\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x96, offset 0x48b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xae},\n\t{value: 0x0018, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x97, offset 0x490\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x98, offset 0x493\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x99, offset 0x498\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9a, offset 0x4a4\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9b, offset 0x4aa\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x9c, offset 0x4af\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9d, offset 0x4b6\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9e, offset 0x4be\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0x9f, offset 0x4c3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0xa0, offset 0x4c7\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa1, offset 0x4d7\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa2, offset 0x4de\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa3, offset 0x4e2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa4, offset 0x4e6\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa5, offset 0x4ed\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa6, offset 0x4ef\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa7, offset 0x4f2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xa8, offset 0x4f5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xa9, offset 0x4f9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0908, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0xa1},\n\t{value: 0x0c08, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0a08, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xaa, offset 0x502\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xab, offset 0x506\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0xa6},\n\t{value: 0x0808, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0a08, lo: 0xb4, hi: 0xbf},\n\t// Block 0xac, offset 0x50e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x84},\n\t{value: 0x0808, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x90},\n\t{value: 0x0a18, lo: 0x91, hi: 0x93},\n\t{value: 0x0c18, lo: 0x94, hi: 0x94},\n\t{value: 0x0818, lo: 0x95, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xad, offset 0x516\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xae, offset 0x51c\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xaf, offset 0x525\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xb0, offset 0x531\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb1, offset 0x538\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xb2, offset 0x541\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb3, offset 0x54b\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb4, offset 0x552\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xb5, offset 0x560\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb6, offset 0x56d\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xb7, offset 0x57a\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb8, offset 0x583\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xb9, offset 0x587\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xba, offset 0x596\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbb, offset 0x59e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xbc, offset 0x5a9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbd, offset 0x5b2\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xbe, offset 0x5b8\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbf, offset 0x5c0\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xc0, offset 0x5c9\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xc1, offset 0x5d3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xc2, offset 0x5d6\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc3, offset 0x5e2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xc4, offset 0x5eb\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xc5, offset 0x5ee\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc6, offset 0x5f3\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc7, offset 0x5fe\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x3b08, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0xbf},\n\t// Block 0xc8, offset 0x607\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x98},\n\t{value: 0x3b08, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xbf},\n\t// Block 0xc9, offset 0x613\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xca, offset 0x616\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xcb, offset 0x620\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xcc, offset 0x629\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xcd, offset 0x635\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xce, offset 0x642\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xcf, offset 0x64f\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x3008, lo: 0x93, hi: 0x94},\n\t{value: 0x3308, lo: 0x95, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x96},\n\t{value: 0x3b08, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd0, offset 0x65d\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd1, offset 0x664\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xd2, offset 0x667\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xd3, offset 0x66c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xd4, offset 0x66f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xbf},\n\t// Block 0xd5, offset 0x672\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xd6, offset 0x675\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xd7, offset 0x67c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xd8, offset 0x683\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xd9, offset 0x687\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xda, offset 0x692\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xdb, offset 0x695\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0xdc, offset 0x698\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0xdd, offset 0x69b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xde, offset 0x6a1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xdf, offset 0x6a6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xbf},\n\t// Block 0xe0, offset 0x6aa\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xe1, offset 0x6ad\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xe2, offset 0x6b0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xe3, offset 0x6b3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe4, offset 0x6b6\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xe5, offset 0x6b9\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xe6, offset 0x6be\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xe7, offset 0x6c8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe8, offset 0x6cb\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xe9, offset 0x6cf\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0xb5b9, lo: 0x9e, hi: 0x9e},\n\t{value: 0xb601, lo: 0x9f, hi: 0x9f},\n\t{value: 0xb649, lo: 0xa0, hi: 0xa0},\n\t{value: 0xb6b1, lo: 0xa1, hi: 0xa1},\n\t{value: 0xb719, lo: 0xa2, hi: 0xa2},\n\t{value: 0xb781, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb7e9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xea, offset 0x6de\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0xb851, lo: 0xbb, hi: 0xbb},\n\t{value: 0xb899, lo: 0xbc, hi: 0xbc},\n\t{value: 0xb8e1, lo: 0xbd, hi: 0xbd},\n\t{value: 0xb949, lo: 0xbe, hi: 0xbe},\n\t{value: 0xb9b1, lo: 0xbf, hi: 0xbf},\n\t// Block 0xeb, offset 0x6ea\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xba19, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xbf},\n\t// Block 0xec, offset 0x6ee\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0xed, offset 0x6f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0xee, offset 0x6f7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xef, offset 0x6fc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0xf0, offset 0x700\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0xf1, offset 0x705\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xf2, offset 0x70e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xf3, offset 0x719\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xf4, offset 0x71f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xf5, offset 0x727\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xb0},\n\t{value: 0x0818, lo: 0xb1, hi: 0xbf},\n\t// Block 0xf6, offset 0x72a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0818, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xf7, offset 0x72d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xf8, offset 0x731\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0xf9, offset 0x735\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0xfa, offset 0x73b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xfb, offset 0x741\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0xc1c1, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xfc, offset 0x746\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0xfd, offset 0x749\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xc7e9, lo: 0x80, hi: 0x80},\n\t{value: 0xc839, lo: 0x81, hi: 0x81},\n\t{value: 0xc889, lo: 0x82, hi: 0x82},\n\t{value: 0xc8d9, lo: 0x83, hi: 0x83},\n\t{value: 0xc929, lo: 0x84, hi: 0x84},\n\t{value: 0xc979, lo: 0x85, hi: 0x85},\n\t{value: 0xc9c9, lo: 0x86, hi: 0x86},\n\t{value: 0xca19, lo: 0x87, hi: 0x87},\n\t{value: 0xca69, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0xcab9, lo: 0x90, hi: 0x90},\n\t{value: 0xcad9, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xbf},\n\t// Block 0xfe, offset 0x759\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xff, offset 0x760\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x100, offset 0x763\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0xbf},\n\t// Block 0x101, offset 0x766\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x102, offset 0x76a\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x103, offset 0x770\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0x104, offset 0x775\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x105, offset 0x77a\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0018, lo: 0xb3, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x106, offset 0x782\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x107, offset 0x787\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x108, offset 0x78b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0x109, offset 0x78f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0x10a, offset 0x792\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x10b, offset 0x795\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x10c, offset 0x799\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x10d, offset 0x79d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x10e, offset 0x7a0\n\t{value: 0x0020, lo: 0x0f},\n\t{value: 0xdeb9, lo: 0x80, hi: 0x89},\n\t{value: 0x8dfd, lo: 0x8a, hi: 0x8a},\n\t{value: 0xdff9, lo: 0x8b, hi: 0x9c},\n\t{value: 0x8e1d, lo: 0x9d, hi: 0x9d},\n\t{value: 0xe239, lo: 0x9e, hi: 0xa2},\n\t{value: 0x8e3d, lo: 0xa3, hi: 0xa3},\n\t{value: 0xe2d9, lo: 0xa4, hi: 0xab},\n\t{value: 0x7ed5, lo: 0xac, hi: 0xac},\n\t{value: 0xe3d9, lo: 0xad, hi: 0xaf},\n\t{value: 0x8e5d, lo: 0xb0, hi: 0xb0},\n\t{value: 0xe439, lo: 0xb1, hi: 0xb6},\n\t{value: 0x8e7d, lo: 0xb7, hi: 0xb9},\n\t{value: 0xe4f9, lo: 0xba, hi: 0xba},\n\t{value: 0x8edd, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe519, lo: 0xbc, hi: 0xbf},\n\t// Block 0x10f, offset 0x7b0\n\t{value: 0x0020, lo: 0x10},\n\t{value: 0x937d, lo: 0x80, hi: 0x80},\n\t{value: 0xf099, lo: 0x81, hi: 0x86},\n\t{value: 0x939d, lo: 0x87, hi: 0x8a},\n\t{value: 0xd9f9, lo: 0x8b, hi: 0x8b},\n\t{value: 0xf159, lo: 0x8c, hi: 0x96},\n\t{value: 0x941d, lo: 0x97, hi: 0x97},\n\t{value: 0xf2b9, lo: 0x98, hi: 0xa3},\n\t{value: 0x943d, lo: 0xa4, hi: 0xa6},\n\t{value: 0xf439, lo: 0xa7, hi: 0xaa},\n\t{value: 0x949d, lo: 0xab, hi: 0xab},\n\t{value: 0xf4b9, lo: 0xac, hi: 0xac},\n\t{value: 0x94bd, lo: 0xad, hi: 0xad},\n\t{value: 0xf4d9, lo: 0xae, hi: 0xaf},\n\t{value: 0x94dd, lo: 0xb0, hi: 0xb1},\n\t{value: 0xf519, lo: 0xb2, hi: 0xbe},\n\t{value: 0x2040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x110, offset 0x7c1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0x111, offset 0x7c6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x112, offset 0x7c8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x113, offset 0x7ca\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 42466 bytes (41KiB); checksum: 355A58A4\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables12.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.14 && !go1.16\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"12.0.0\"\n\nvar mappings string = \"\" + // Size: 8178 bytes\n\t\"\\x00\\x01 \\x03 ̈\\x01a\\x03 ̄\\x012\\x013\\x03 ́\\x03 ̧\\x011\\x01o\\x051⁄4\\x051⁄2\" +\n\t\"\\x053⁄4\\x03i̇\\x03l·\\x03ʼn\\x01s\\x03dž\\x03ⱥ\\x03ⱦ\\x01h\\x01j\\x01r\\x01w\\x01y\" +\n\t\"\\x03 ̆\\x03 ̇\\x03 ̊\\x03 ̨\\x03 ̃\\x03 ̋\\x01l\\x01x\\x04̈́\\x03 ι\\x01;\\x05 ̈́\" +\n\t\"\\x04եւ\\x04اٴ\\x04وٴ\\x04ۇٴ\\x04يٴ\\x06क़\\x06ख़\\x06ग़\\x06ज़\\x06ड़\\x06ढ़\\x06फ़\" +\n\t\"\\x06य़\\x06ড়\\x06ঢ়\\x06য়\\x06ਲ਼\\x06ਸ਼\\x06ਖ਼\\x06ਗ਼\\x06ਜ਼\\x06ਫ਼\\x06ଡ଼\\x06ଢ଼\" +\n\t\"\\x06ํา\\x06ໍາ\\x06ຫນ\\x06ຫມ\\x06གྷ\\x06ཌྷ\\x06དྷ\\x06བྷ\\x06ཛྷ\\x06ཀྵ\\x06ཱི\\x06ཱུ\" +\n\t\"\\x06ྲྀ\\x09ྲཱྀ\\x06ླྀ\\x09ླཱྀ\\x06ཱྀ\\x06ྒྷ\\x06ྜྷ\\x06ྡྷ\\x06ྦྷ\\x06ྫྷ\\x06ྐྵ\\x02\" +\n\t\"в\\x02д\\x02о\\x02с\\x02т\\x02ъ\\x02ѣ\\x02æ\\x01b\\x01d\\x01e\\x02ǝ\\x01g\\x01i\\x01k\" +\n\t\"\\x01m\\x01n\\x02ȣ\\x01p\\x01t\\x01u\\x02ɐ\\x02ɑ\\x02ə\\x02ɛ\\x02ɜ\\x02ŋ\\x02ɔ\\x02ɯ\" +\n\t\"\\x01v\\x02β\\x02γ\\x02δ\\x02φ\\x02χ\\x02ρ\\x02н\\x02ɒ\\x01c\\x02ɕ\\x02ð\\x01f\\x02ɟ\" +\n\t\"\\x02ɡ\\x02ɥ\\x02ɨ\\x02ɩ\\x02ɪ\\x02ʝ\\x02ɭ\\x02ʟ\\x02ɱ\\x02ɰ\\x02ɲ\\x02ɳ\\x02ɴ\\x02ɵ\" +\n\t\"\\x02ɸ\\x02ʂ\\x02ʃ\\x02ƫ\\x02ʉ\\x02ʊ\\x02ʋ\\x02ʌ\\x01z\\x02ʐ\\x02ʑ\\x02ʒ\\x02θ\\x02ss\" +\n\t\"\\x02ά\\x02έ\\x02ή\\x02ί\\x02ό\\x02ύ\\x02ώ\\x05ἀι\\x05ἁι\\x05ἂι\\x05ἃι\\x05ἄι\\x05ἅι\" +\n\t\"\\x05ἆι\\x05ἇι\\x05ἠι\\x05ἡι\\x05ἢι\\x05ἣι\\x05ἤι\\x05ἥι\\x05ἦι\\x05ἧι\\x05ὠι\\x05ὡι\" +\n\t\"\\x05ὢι\\x05ὣι\\x05ὤι\\x05ὥι\\x05ὦι\\x05ὧι\\x05ὰι\\x04αι\\x04άι\\x05ᾶι\\x02ι\\x05 ̈͂\" +\n\t\"\\x05ὴι\\x04ηι\\x04ήι\\x05ῆι\\x05 ̓̀\\x05 ̓́\\x05 ̓͂\\x02ΐ\\x05 ̔̀\\x05 ̔́\\x05 ̔͂\" +\n\t\"\\x02ΰ\\x05 ̈̀\\x01`\\x05ὼι\\x04ωι\\x04ώι\\x05ῶι\\x06′′\\x09′′′\\x06‵‵\\x09‵‵‵\\x02!\" +\n\t\"!\\x02??\\x02?!\\x02!?\\x0c′′′′\\x010\\x014\\x015\\x016\\x017\\x018\\x019\\x01+\\x01=\" +\n\t\"\\x01(\\x01)\\x02rs\\x02ħ\\x02no\\x01q\\x02sm\\x02tm\\x02ω\\x02å\\x02א\\x02ב\\x02ג\" +\n\t\"\\x02ד\\x02π\\x051⁄7\\x051⁄9\\x061⁄10\\x051⁄3\\x052⁄3\\x051⁄5\\x052⁄5\\x053⁄5\\x054\" +\n\t\"⁄5\\x051⁄6\\x055⁄6\\x051⁄8\\x053⁄8\\x055⁄8\\x057⁄8\\x041⁄\\x02ii\\x02iv\\x02vi\" +\n\t\"\\x04viii\\x02ix\\x02xi\\x050⁄3\\x06∫∫\\x09∫∫∫\\x06∮∮\\x09∮∮∮\\x0210\\x0211\\x0212\" +\n\t\"\\x0213\\x0214\\x0215\\x0216\\x0217\\x0218\\x0219\\x0220\\x04(10)\\x04(11)\\x04(12)\" +\n\t\"\\x04(13)\\x04(14)\\x04(15)\\x04(16)\\x04(17)\\x04(18)\\x04(19)\\x04(20)\\x0c∫∫∫∫\" +\n\t\"\\x02==\\x05⫝̸\\x02ɫ\\x02ɽ\\x02ȿ\\x02ɀ\\x01.\\x04 ゙\\x04 ゚\\x06より\\x06コト\\x05(ᄀ)\\x05\" +\n\t\"(ᄂ)\\x05(ᄃ)\\x05(ᄅ)\\x05(ᄆ)\\x05(ᄇ)\\x05(ᄉ)\\x05(ᄋ)\\x05(ᄌ)\\x05(ᄎ)\\x05(ᄏ)\\x05(ᄐ\" +\n\t\")\\x05(ᄑ)\\x05(ᄒ)\\x05(가)\\x05(나)\\x05(다)\\x05(라)\\x05(마)\\x05(바)\\x05(사)\\x05(아)\" +\n\t\"\\x05(자)\\x05(차)\\x05(카)\\x05(타)\\x05(파)\\x05(하)\\x05(주)\\x08(오전)\\x08(오후)\\x05(一)\" +\n\t\"\\x05(二)\\x05(三)\\x05(四)\\x05(五)\\x05(六)\\x05(七)\\x05(八)\\x05(九)\\x05(十)\\x05(月)\" +\n\t\"\\x05(火)\\x05(水)\\x05(木)\\x05(金)\\x05(土)\\x05(日)\\x05(株)\\x05(有)\\x05(社)\\x05(名)\" +\n\t\"\\x05(特)\\x05(財)\\x05(祝)\\x05(労)\\x05(代)\\x05(呼)\\x05(学)\\x05(監)\\x05(企)\\x05(資)\" +\n\t\"\\x05(協)\\x05(祭)\\x05(休)\\x05(自)\\x05(至)\\x0221\\x0222\\x0223\\x0224\\x0225\\x0226\" +\n\t\"\\x0227\\x0228\\x0229\\x0230\\x0231\\x0232\\x0233\\x0234\\x0235\\x06참고\\x06주의\\x0236\" +\n\t\"\\x0237\\x0238\\x0239\\x0240\\x0241\\x0242\\x0243\\x0244\\x0245\\x0246\\x0247\\x0248\" +\n\t\"\\x0249\\x0250\\x041月\\x042月\\x043月\\x044月\\x045月\\x046月\\x047月\\x048月\\x049月\\x0510\" +\n\t\"月\\x0511月\\x0512月\\x02hg\\x02ev\\x0cアパート\\x0cアルファ\\x0cアンペア\\x09アール\\x0cイニング\\x09\" +\n\t\"インチ\\x09ウォン\\x0fエスクード\\x0cエーカー\\x09オンス\\x09オーム\\x09カイリ\\x0cカラット\\x0cカロリー\\x09ガロ\" +\n\t\"ン\\x09ガンマ\\x06ギガ\\x09ギニー\\x0cキュリー\\x0cギルダー\\x06キロ\\x0fキログラム\\x12キロメートル\\x0fキロワッ\" +\n\t\"ト\\x09グラム\\x0fグラムトン\\x0fクルゼイロ\\x0cクローネ\\x09ケース\\x09コルナ\\x09コーポ\\x0cサイクル\\x0fサンチ\" +\n\t\"ーム\\x0cシリング\\x09センチ\\x09セント\\x09ダース\\x06デシ\\x06ドル\\x06トン\\x06ナノ\\x09ノット\\x09ハイツ\" +\n\t\"\\x0fパーセント\\x09パーツ\\x0cバーレル\\x0fピアストル\\x09ピクル\\x06ピコ\\x06ビル\\x0fファラッド\\x0cフィート\" +\n\t\"\\x0fブッシェル\\x09フラン\\x0fヘクタール\\x06ペソ\\x09ペニヒ\\x09ヘルツ\\x09ペンス\\x09ページ\\x09ベータ\\x0cポイ\" +\n\t\"ント\\x09ボルト\\x06ホン\\x09ポンド\\x09ホール\\x09ホーン\\x0cマイクロ\\x09マイル\\x09マッハ\\x09マルク\\x0fマ\" +\n\t\"ンション\\x0cミクロン\\x06ミリ\\x0fミリバール\\x06メガ\\x0cメガトン\\x0cメートル\\x09ヤード\\x09ヤール\\x09ユアン\" +\n\t\"\\x0cリットル\\x06リラ\\x09ルピー\\x0cルーブル\\x06レム\\x0fレントゲン\\x09ワット\\x040点\\x041点\\x042点\" +\n\t\"\\x043点\\x044点\\x045点\\x046点\\x047点\\x048点\\x049点\\x0510点\\x0511点\\x0512点\\x0513点\" +\n\t\"\\x0514点\\x0515点\\x0516点\\x0517点\\x0518点\\x0519点\\x0520点\\x0521点\\x0522点\\x0523点\" +\n\t\"\\x0524点\\x02da\\x02au\\x02ov\\x02pc\\x02dm\\x02iu\\x06平成\\x06昭和\\x06大正\\x06明治\\x0c株\" +\n\t\"式会社\\x02pa\\x02na\\x02ma\\x02ka\\x02kb\\x02mb\\x02gb\\x04kcal\\x02pf\\x02nf\\x02m\" +\n\t\"g\\x02kg\\x02hz\\x02ml\\x02dl\\x02kl\\x02fm\\x02nm\\x02mm\\x02cm\\x02km\\x02m2\\x02m\" +\n\t\"3\\x05m∕s\\x06m∕s2\\x07rad∕s\\x08rad∕s2\\x02ps\\x02ns\\x02ms\\x02pv\\x02nv\\x02mv\" +\n\t\"\\x02kv\\x02pw\\x02nw\\x02mw\\x02kw\\x02bq\\x02cc\\x02cd\\x06c∕kg\\x02db\\x02gy\\x02\" +\n\t\"ha\\x02hp\\x02in\\x02kk\\x02kt\\x02lm\\x02ln\\x02lx\\x02ph\\x02pr\\x02sr\\x02sv\\x02\" +\n\t\"wb\\x05v∕m\\x05a∕m\\x041日\\x042日\\x043日\\x044日\\x045日\\x046日\\x047日\\x048日\\x049日\" +\n\t\"\\x0510日\\x0511日\\x0512日\\x0513日\\x0514日\\x0515日\\x0516日\\x0517日\\x0518日\\x0519日\" +\n\t\"\\x0520日\\x0521日\\x0522日\\x0523日\\x0524日\\x0525日\\x0526日\\x0527日\\x0528日\\x0529日\" +\n\t\"\\x0530日\\x0531日\\x02ь\\x02ɦ\\x02ɬ\\x02ʞ\\x02ʇ\\x02œ\\x04𤋮\\x04𢡊\\x04𢡄\\x04𣏕\\x04𥉉\" +\n\t\"\\x04𥳐\\x04𧻓\\x02ff\\x02fi\\x02fl\\x02st\\x04մն\\x04մե\\x04մի\\x04վն\\x04մխ\\x04יִ\" +\n\t\"\\x04ײַ\\x02ע\\x02ה\\x02כ\\x02ל\\x02ם\\x02ר\\x02ת\\x04שׁ\\x04שׂ\\x06שּׁ\\x06שּׂ\\x04א\" +\n\t\"ַ\\x04אָ\\x04אּ\\x04בּ\\x04גּ\\x04דּ\\x04הּ\\x04וּ\\x04זּ\\x04טּ\\x04יּ\\x04ךּ\\x04\" +\n\t\"כּ\\x04לּ\\x04מּ\\x04נּ\\x04סּ\\x04ףּ\\x04פּ\\x04צּ\\x04קּ\\x04רּ\\x04שּ\\x04תּ\" +\n\t\"\\x04וֹ\\x04בֿ\\x04כֿ\\x04פֿ\\x04אל\\x02ٱ\\x02ٻ\\x02پ\\x02ڀ\\x02ٺ\\x02ٿ\\x02ٹ\\x02ڤ\" +\n\t\"\\x02ڦ\\x02ڄ\\x02ڃ\\x02چ\\x02ڇ\\x02ڍ\\x02ڌ\\x02ڎ\\x02ڈ\\x02ژ\\x02ڑ\\x02ک\\x02گ\\x02ڳ\" +\n\t\"\\x02ڱ\\x02ں\\x02ڻ\\x02ۀ\\x02ہ\\x02ھ\\x02ے\\x02ۓ\\x02ڭ\\x02ۇ\\x02ۆ\\x02ۈ\\x02ۋ\\x02ۅ\" +\n\t\"\\x02ۉ\\x02ې\\x02ى\\x04ئا\\x04ئە\\x04ئو\\x04ئۇ\\x04ئۆ\\x04ئۈ\\x04ئې\\x04ئى\\x02ی\\x04\" +\n\t\"ئج\\x04ئح\\x04ئم\\x04ئي\\x04بج\\x04بح\\x04بخ\\x04بم\\x04بى\\x04بي\\x04تج\\x04تح\" +\n\t\"\\x04تخ\\x04تم\\x04تى\\x04تي\\x04ثج\\x04ثم\\x04ثى\\x04ثي\\x04جح\\x04جم\\x04حج\\x04حم\" +\n\t\"\\x04خج\\x04خح\\x04خم\\x04سج\\x04سح\\x04سخ\\x04سم\\x04صح\\x04صم\\x04ضج\\x04ضح\\x04ضخ\" +\n\t\"\\x04ضم\\x04طح\\x04طم\\x04ظم\\x04عج\\x04عم\\x04غج\\x04غم\\x04فج\\x04فح\\x04فخ\\x04فم\" +\n\t\"\\x04فى\\x04في\\x04قح\\x04قم\\x04قى\\x04قي\\x04كا\\x04كج\\x04كح\\x04كخ\\x04كل\\x04كم\" +\n\t\"\\x04كى\\x04كي\\x04لج\\x04لح\\x04لخ\\x04لم\\x04لى\\x04لي\\x04مج\\x04مح\\x04مخ\\x04مم\" +\n\t\"\\x04مى\\x04مي\\x04نج\\x04نح\\x04نخ\\x04نم\\x04نى\\x04ني\\x04هج\\x04هم\\x04هى\\x04هي\" +\n\t\"\\x04يج\\x04يح\\x04يخ\\x04يم\\x04يى\\x04يي\\x04ذٰ\\x04رٰ\\x04ىٰ\\x05 ٌّ\\x05 ٍّ\\x05\" +\n\t\" َّ\\x05 ُّ\\x05 ِّ\\x05 ّٰ\\x04ئر\\x04ئز\\x04ئن\\x04بر\\x04بز\\x04بن\\x04تر\\x04تز\" +\n\t\"\\x04تن\\x04ثر\\x04ثز\\x04ثن\\x04ما\\x04نر\\x04نز\\x04نن\\x04ير\\x04يز\\x04ين\\x04ئخ\" +\n\t\"\\x04ئه\\x04به\\x04ته\\x04صخ\\x04له\\x04نه\\x04هٰ\\x04يه\\x04ثه\\x04سه\\x04شم\\x04شه\" +\n\t\"\\x06ـَّ\\x06ـُّ\\x06ـِّ\\x04طى\\x04طي\\x04عى\\x04عي\\x04غى\\x04غي\\x04سى\\x04سي\" +\n\t\"\\x04شى\\x04شي\\x04حى\\x04حي\\x04جى\\x04جي\\x04خى\\x04خي\\x04صى\\x04صي\\x04ضى\\x04ضي\" +\n\t\"\\x04شج\\x04شح\\x04شخ\\x04شر\\x04سر\\x04صر\\x04ضر\\x04اً\\x06تجم\\x06تحج\\x06تحم\" +\n\t\"\\x06تخم\\x06تمج\\x06تمح\\x06تمخ\\x06جمح\\x06حمي\\x06حمى\\x06سحج\\x06سجح\\x06سجى\" +\n\t\"\\x06سمح\\x06سمج\\x06سمم\\x06صحح\\x06صمم\\x06شحم\\x06شجي\\x06شمخ\\x06شمم\\x06ضحى\" +\n\t\"\\x06ضخم\\x06طمح\\x06طمم\\x06طمي\\x06عجم\\x06عمم\\x06عمى\\x06غمم\\x06غمي\\x06غمى\" +\n\t\"\\x06فخم\\x06قمح\\x06قمم\\x06لحم\\x06لحي\\x06لحى\\x06لجج\\x06لخم\\x06لمح\\x06محج\" +\n\t\"\\x06محم\\x06محي\\x06مجح\\x06مجم\\x06مخج\\x06مخم\\x06مجخ\\x06همج\\x06همم\\x06نحم\" +\n\t\"\\x06نحى\\x06نجم\\x06نجى\\x06نمي\\x06نمى\\x06يمم\\x06بخي\\x06تجي\\x06تجى\\x06تخي\" +\n\t\"\\x06تخى\\x06تمي\\x06تمى\\x06جمي\\x06جحى\\x06جمى\\x06سخى\\x06صحي\\x06شحي\\x06ضحي\" +\n\t\"\\x06لجي\\x06لمي\\x06يحي\\x06يجي\\x06يمي\\x06ممي\\x06قمي\\x06نحي\\x06عمي\\x06كمي\" +\n\t\"\\x06نجح\\x06مخي\\x06لجم\\x06كمم\\x06جحي\\x06حجي\\x06مجي\\x06فمي\\x06بحي\\x06سخي\" +\n\t\"\\x06نجي\\x06صلے\\x06قلے\\x08الله\\x08اكبر\\x08محمد\\x08صلعم\\x08رسول\\x08عليه\" +\n\t\"\\x08وسلم\\x06صلى!صلى الله عليه وسلم\\x0fجل جلاله\\x08ریال\\x01,\\x01:\\x01!\" +\n\t\"\\x01?\\x01_\\x01{\\x01}\\x01[\\x01]\\x01#\\x01&\\x01*\\x01-\\x01<\\x01>\\x01\\\\\\x01$\" +\n\t\"\\x01%\\x01@\\x04ـً\\x04ـَ\\x04ـُ\\x04ـِ\\x04ـّ\\x04ـْ\\x02ء\\x02آ\\x02أ\\x02ؤ\\x02إ\" +\n\t\"\\x02ئ\\x02ا\\x02ب\\x02ة\\x02ت\\x02ث\\x02ج\\x02ح\\x02خ\\x02د\\x02ذ\\x02ر\\x02ز\\x02س\" +\n\t\"\\x02ش\\x02ص\\x02ض\\x02ط\\x02ظ\\x02ع\\x02غ\\x02ف\\x02ق\\x02ك\\x02ل\\x02م\\x02ن\\x02ه\" +\n\t\"\\x02و\\x02ي\\x04لآ\\x04لأ\\x04لإ\\x04لا\\x01\\x22\\x01'\\x01/\\x01^\\x01|\\x01~\\x02¢\" +\n\t\"\\x02£\\x02¬\\x02¦\\x02¥\\x08𝅗𝅥\\x08𝅘𝅥\\x0c𝅘𝅥𝅮\\x0c𝅘𝅥𝅯\\x0c𝅘𝅥𝅰\\x0c𝅘𝅥𝅱\\x0c𝅘𝅥𝅲\\x08𝆹\" +\n\t\"𝅥\\x08𝆺𝅥\\x0c𝆹𝅥𝅮\\x0c𝆺𝅥𝅮\\x0c𝆹𝅥𝅯\\x0c𝆺𝅥𝅯\\x02ı\\x02ȷ\\x02α\\x02ε\\x02ζ\\x02η\\x02\" +\n\t\"κ\\x02λ\\x02μ\\x02ν\\x02ξ\\x02ο\\x02σ\\x02τ\\x02υ\\x02ψ\\x03∇\\x03∂\\x02ϝ\\x02ٮ\\x02ڡ\" +\n\t\"\\x02ٯ\\x020,\\x021,\\x022,\\x023,\\x024,\\x025,\\x026,\\x027,\\x028,\\x029,\\x03(a)\" +\n\t\"\\x03(b)\\x03(c)\\x03(d)\\x03(e)\\x03(f)\\x03(g)\\x03(h)\\x03(i)\\x03(j)\\x03(k)\" +\n\t\"\\x03(l)\\x03(m)\\x03(n)\\x03(o)\\x03(p)\\x03(q)\\x03(r)\\x03(s)\\x03(t)\\x03(u)\" +\n\t\"\\x03(v)\\x03(w)\\x03(x)\\x03(y)\\x03(z)\\x07〔s〕\\x02wz\\x02hv\\x02sd\\x03ppv\\x02w\" +\n\t\"c\\x02mc\\x02md\\x02mr\\x02dj\\x06ほか\\x06ココ\\x03サ\\x03手\\x03字\\x03双\\x03デ\\x03二\\x03多\" +\n\t\"\\x03解\\x03天\\x03交\\x03映\\x03無\\x03料\\x03前\\x03後\\x03再\\x03新\\x03初\\x03終\\x03生\\x03販\" +\n\t\"\\x03声\\x03吹\\x03演\\x03投\\x03捕\\x03一\\x03三\\x03遊\\x03左\\x03中\\x03右\\x03指\\x03走\\x03打\" +\n\t\"\\x03禁\\x03空\\x03合\\x03満\\x03有\\x03月\\x03申\\x03割\\x03営\\x03配\\x09〔本〕\\x09〔三〕\\x09〔二〕\" +\n\t\"\\x09〔安〕\\x09〔点〕\\x09〔打〕\\x09〔盗〕\\x09〔勝〕\\x09〔敗〕\\x03得\\x03可\\x03丽\\x03丸\\x03乁\\x03你\" +\n\t\"\\x03侮\\x03侻\\x03倂\\x03偺\\x03備\\x03僧\\x03像\\x03㒞\\x03免\\x03兔\\x03兤\\x03具\\x03㒹\\x03內\" +\n\t\"\\x03冗\\x03冤\\x03仌\\x03冬\\x03况\\x03凵\\x03刃\\x03㓟\\x03刻\\x03剆\\x03剷\\x03㔕\\x03勇\\x03勉\" +\n\t\"\\x03勤\\x03勺\\x03包\\x03匆\\x03北\\x03卉\\x03卑\\x03博\\x03即\\x03卽\\x03卿\\x03灰\\x03及\\x03叟\" +\n\t\"\\x03叫\\x03叱\\x03吆\\x03咞\\x03吸\\x03呈\\x03周\\x03咢\\x03哶\\x03唐\\x03啓\\x03啣\\x03善\\x03喙\" +\n\t\"\\x03喫\\x03喳\\x03嗂\\x03圖\\x03嘆\\x03圗\\x03噑\\x03噴\\x03切\\x03壮\\x03城\\x03埴\\x03堍\\x03型\" +\n\t\"\\x03堲\\x03報\\x03墬\\x03売\\x03壷\\x03夆\\x03夢\\x03奢\\x03姬\\x03娛\\x03娧\\x03姘\\x03婦\\x03㛮\" +\n\t\"\\x03嬈\\x03嬾\\x03寃\\x03寘\\x03寧\\x03寳\\x03寿\\x03将\\x03尢\\x03㞁\\x03屠\\x03屮\\x03峀\\x03岍\" +\n\t\"\\x03嵃\\x03嵮\\x03嵫\\x03嵼\\x03巡\\x03巢\\x03㠯\\x03巽\\x03帨\\x03帽\\x03幩\\x03㡢\\x03㡼\\x03庰\" +\n\t\"\\x03庳\\x03庶\\x03廊\\x03廾\\x03舁\\x03弢\\x03㣇\\x03形\\x03彫\\x03㣣\\x03徚\\x03忍\\x03志\\x03忹\" +\n\t\"\\x03悁\\x03㤺\\x03㤜\\x03悔\\x03惇\\x03慈\\x03慌\\x03慎\\x03慺\\x03憎\\x03憲\\x03憤\\x03憯\\x03懞\" +\n\t\"\\x03懲\\x03懶\\x03成\\x03戛\\x03扝\\x03抱\\x03拔\\x03捐\\x03挽\\x03拼\\x03捨\\x03掃\\x03揤\\x03搢\" +\n\t\"\\x03揅\\x03掩\\x03㨮\\x03摩\\x03摾\\x03撝\\x03摷\\x03㩬\\x03敏\\x03敬\\x03旣\\x03書\\x03晉\\x03㬙\" +\n\t\"\\x03暑\\x03㬈\\x03㫤\\x03冒\\x03冕\\x03最\\x03暜\\x03肭\\x03䏙\\x03朗\\x03望\\x03朡\\x03杞\\x03杓\" +\n\t\"\\x03㭉\\x03柺\\x03枅\\x03桒\\x03梅\\x03梎\\x03栟\\x03椔\\x03㮝\\x03楂\\x03榣\\x03槪\\x03檨\\x03櫛\" +\n\t\"\\x03㰘\\x03次\\x03歔\\x03㱎\\x03歲\\x03殟\\x03殺\\x03殻\\x03汎\\x03沿\\x03泍\\x03汧\\x03洖\\x03派\" +\n\t\"\\x03海\\x03流\\x03浩\\x03浸\\x03涅\\x03洴\\x03港\\x03湮\\x03㴳\\x03滋\\x03滇\\x03淹\\x03潮\\x03濆\" +\n\t\"\\x03瀹\\x03瀞\\x03瀛\\x03㶖\\x03灊\\x03災\\x03灷\\x03炭\\x03煅\\x03熜\\x03爨\\x03爵\\x03牐\\x03犀\" +\n\t\"\\x03犕\\x03獺\\x03王\\x03㺬\\x03玥\\x03㺸\\x03瑇\\x03瑜\\x03瑱\\x03璅\\x03瓊\\x03㼛\\x03甤\\x03甾\" +\n\t\"\\x03異\\x03瘐\\x03㿼\\x03䀈\\x03直\\x03眞\\x03真\\x03睊\\x03䀹\\x03瞋\\x03䁆\\x03䂖\\x03硎\\x03碌\" +\n\t\"\\x03磌\\x03䃣\\x03祖\\x03福\\x03秫\\x03䄯\\x03穀\\x03穊\\x03穏\\x03䈂\\x03篆\\x03築\\x03䈧\\x03糒\" +\n\t\"\\x03䊠\\x03糨\\x03糣\\x03紀\\x03絣\\x03䌁\\x03緇\\x03縂\\x03繅\\x03䌴\\x03䍙\\x03罺\\x03羕\\x03翺\" +\n\t\"\\x03者\\x03聠\\x03聰\\x03䏕\\x03育\\x03脃\\x03䐋\\x03脾\\x03媵\\x03舄\\x03辞\\x03䑫\\x03芑\\x03芋\" +\n\t\"\\x03芝\\x03劳\\x03花\\x03芳\\x03芽\\x03苦\\x03若\\x03茝\\x03荣\\x03莭\\x03茣\\x03莽\\x03菧\\x03著\" +\n\t\"\\x03荓\\x03菊\\x03菌\\x03菜\\x03䔫\\x03蓱\\x03蓳\\x03蔖\\x03蕤\\x03䕝\\x03䕡\\x03䕫\\x03虐\\x03虜\" +\n\t\"\\x03虧\\x03虩\\x03蚩\\x03蚈\\x03蜎\\x03蛢\\x03蝹\\x03蜨\\x03蝫\\x03螆\\x03蟡\\x03蠁\\x03䗹\\x03衠\" +\n\t\"\\x03衣\\x03裗\\x03裞\\x03䘵\\x03裺\\x03㒻\\x03䚾\\x03䛇\\x03誠\\x03諭\\x03變\\x03豕\\x03貫\\x03賁\" +\n\t\"\\x03贛\\x03起\\x03跋\\x03趼\\x03跰\\x03軔\\x03輸\\x03邔\\x03郱\\x03鄑\\x03鄛\\x03鈸\\x03鋗\\x03鋘\" +\n\t\"\\x03鉼\\x03鏹\\x03鐕\\x03開\\x03䦕\\x03閷\\x03䧦\\x03雃\\x03嶲\\x03霣\\x03䩮\\x03䩶\\x03韠\\x03䪲\" +\n\t\"\\x03頋\\x03頩\\x03飢\\x03䬳\\x03餩\\x03馧\\x03駂\\x03駾\\x03䯎\\x03鬒\\x03鱀\\x03鳽\\x03䳎\\x03䳭\" +\n\t\"\\x03鵧\\x03䳸\\x03麻\\x03䵖\\x03黹\\x03黾\\x03鼅\\x03鼏\\x03鼖\\x03鼻\"\n\nvar xorData string = \"\" + // Size: 4862 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x021\\x00\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\" +\n\t\"\\x03\\x1c\\x02\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\" +\n\t\"\\xc1r\\x02\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\" +\n\t\"\\x03\\xc1s*\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\" +\n\t\"\\x83\\xab\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\" +\n\t\"\\xe1\\xcd\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\" +\n\t\"\\x9a\\xec\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c\" +\n\t\"!\\x03\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03\" +\n\t\"ʦ\\x93\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\" +\n\t\"\\x03\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\" +\n\t\"\\xfa\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\" +\n\t\"\\x03\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\" +\n\t\"\\xe3\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\" +\n\t\"\\x03\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\" +\n\t\"\\xe8\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\" +\n\t\"\\x0b\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\" +\n\t\"\\x05\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\" +\n\t\"\\x0786\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\" +\n\t\"\\x03\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\" +\n\t\"\\x03\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\" +\n\t\"\\x03\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\" +\n\t\"\\x07\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\" +\n\t\"\\x07\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\" +\n\t\"\\x07\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\" +\n\t\"\\x0a\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\" +\n\t\"\\x07\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\" +\n\t\"\\x03\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\" +\n\t\"\\x044\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\" +\n\t\"\\x04+ \\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\" +\n\t\"\\x22\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\" +\n\t\"\\x03\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\" +\n\t\"\\x03\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\" +\n\t\"\\x054\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\" +\n\t\"\\x05):\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\" +\n\t\"\\x1e\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\" +\n\t\"\\x03\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\" +\n\t\"\\x1b\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\" +\n\t\"\\x03\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\" +\n\t\"\\x06\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\" +\n\t\"\\x03\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\" +\n\t\"\\x0a6\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\" +\n\t\"\\x1f\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\" +\n\t\"\\x0a\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\" +\n\t\"\\x02\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\" +\n\t\"\\x03\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\" +\n\t\"\\x00\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\" +\n\t\"\\x10\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#\" +\n\t\"<\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\" +\n\t\"\\x00\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\" +\n\t\"\\x03\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\" +\n\t\"\\x22\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\" +\n\t\"\\x12\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05\" +\n\t\"<\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x03\\x0b)\\x08\\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\" +\n\t\"\\x10\\x03\\x0b!0\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\" +\n\t\"\\x03\\x09\\x1f\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\" +\n\t\"\\x03\\x0a\\x01\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\" +\n\t\"\\x08='\\x03\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\" +\n\t\"\\x09\\x0c\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06\" +\n\t\"!3\\x03\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\" +\n\t\"\\x03\\x07<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\" +\n\t\"\\x01\\x00\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\" +\n\t\"\\x09\\x11\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\" +\n\t\"\\x0a/1\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\" +\n\t\"\\x07<3\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\" +\n\t\"\\x13\\x00\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(\" +\n\t\";\\x03\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\" +\n\t\"\\x14$\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\" +\n\t\"\\x0a\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\" +\n\t\"\\x01\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\" +\n\t\"\\x03\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\" +\n\t\"\\x07\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\" +\n\t\"\\x0a\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\" +\n\t\"\\x0b\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\" +\n\t\"\\x08\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\" +\n\t\"\\x03\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\" +\n\t\"\\x03\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\" +\n\t\"\\x09\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a\" +\n\t\".\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x01\\x1e\\x03\\x0f$!\\x03\" +\n\t\"\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\\x18\\x03\\x0f\" +\n\t\"\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\\x03\\x0e\\x0d)\" +\n\t\"\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\\x03\\x0d. \\x03\" +\n\t\"\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\\x0d\\x0d\\x0f\\x03\" +\n\t\"\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\\x0c\\x09:\\x03\\x0e\" +\n\t\"\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\\x03\\x0c\\x1f\\x1c\" +\n\t\"\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\\x0b<+\\x03\\x0b8\" +\n\t\"\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\\x22&\\x03\\x0b\\x1a\" +\n\t\"\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\\x0a!\\x1a\\x03\\x0a!\" +\n\t\"7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\\x0a\\x00 \\x03\\x0a\" +\n\t\"\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\\x1b-\\x03\\x09-\" +\n\t\"\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\\x1f\\x03\\x093\" +\n\t\"\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\\x16\\x03\\x09\" +\n\t\"\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\\x03\\x09\\x1a\" +\n\t\"\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\\x08\\x02*\" +\n\t\"\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\\x070\\x0c\" +\n\t\"\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x0671\\x03\" +\n\t\"\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \\x1d\\x03\" +\n\t\"\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 29708 bytes (29.01 KiB). Checksum: c3ecc76d8fffa6e6.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 125:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 125\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 127 blocks, 8128 entries, 16256 bytes\n// The third block is the zero block.\nvar idnaValues = [8128]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x001a, 0xe9: 0x0018,\n\t0xea: 0x0039, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x004a,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0069, 0xf3: 0x0079, 0xf4: 0x008a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x00aa, 0xf9: 0x00c9, 0xfa: 0x00d9, 0xfb: 0x0018,\n\t0xfc: 0x00e9, 0xfd: 0x0119, 0xfe: 0x0149, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0179, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0199,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0199, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x01b9, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x01d9,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x01e9, 0x1c5: 0x01e9,\n\t0x1c6: 0x01e9, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0209, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x0229, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x029a, 0x259: 0x02ba, 0x25a: 0x02da, 0x25b: 0x02fa, 0x25c: 0x031a, 0x25d: 0x033a,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0359, 0x262: 0x01d9, 0x263: 0x0369,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x008a, 0x2c5: 0x03d2,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429,\n\t0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,\n\t0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,\n\t0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,\n\t0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0808, 0x557: 0x0808,\n\t0x558: 0x0808, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,\n\t0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,\n\t0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,\n\t0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,\n\t0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040,\n\t0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040,\n\t0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308,\n\t0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008,\n\t0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308,\n\t0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308,\n\t0x598: 0x04c9, 0x599: 0x0501, 0x59a: 0x0539, 0x59b: 0x0571, 0x59c: 0x05a9, 0x59d: 0x05e1,\n\t0x59e: 0x0619, 0x59f: 0x0651, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308,\n\t0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008,\n\t0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,\n\t0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008,\n\t0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008,\n\t0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008,\n\t0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008,\n\t0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040,\n\t0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008,\n\t0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008,\n\t0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008,\n\t0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040,\n\t0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040,\n\t0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040,\n\t0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008,\n\t0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008,\n\t0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0689, 0x61d: 0x06c1,\n\t0x61e: 0x0040, 0x61f: 0x06f9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308,\n\t0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018,\n\t0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018,\n\t0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x3308, 0x63f: 0x0040,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008,\n\t0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040,\n\t0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040,\n\t0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008,\n\t0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008,\n\t0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008,\n\t0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0731, 0x674: 0x0040, 0x675: 0x0008,\n\t0x676: 0x0769, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040,\n\t0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040,\n\t0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308,\n\t0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308,\n\t0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040,\n\t0x698: 0x0040, 0x699: 0x07a1, 0x69a: 0x07d9, 0x69b: 0x0811, 0x69c: 0x0008, 0x69d: 0x0040,\n\t0x69e: 0x0849, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040,\n\t0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308,\n\t0x6b6: 0x0018, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008,\n\t0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008,\n\t0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008,\n\t0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008,\n\t0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008,\n\t0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008,\n\t0x6e4: 0x0008, 0x6e5: 0x0008, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0040,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008,\n\t0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308,\n\t0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008,\n\t0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040,\n\t0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040,\n\t0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040,\n\t0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308,\n\t0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040,\n\t0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308,\n\t0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008,\n\t0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008,\n\t0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008,\n\t0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008,\n\t0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008,\n\t0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008,\n\t0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040,\n\t0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040,\n\t0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008,\n\t0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040,\n\t0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x0040, 0x796: 0x3308, 0x797: 0x3008,\n\t0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x0881, 0x79d: 0x08b9,\n\t0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308,\n\t0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008,\n\t0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018,\n\t0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008,\n\t0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040,\n\t0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040,\n\t0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040,\n\t0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040,\n\t0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008,\n\t0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008,\n\t0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040,\n\t0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040,\n\t0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308,\n\t0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040,\n\t0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040,\n\t0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040,\n\t0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308,\n\t0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008,\n\t0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040,\n\t0x836: 0x0040, 0x837: 0x0018, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018,\n\t0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0018, 0x845: 0x0008,\n\t0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008,\n\t0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040,\n\t0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008,\n\t0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008,\n\t0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008,\n\t0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008,\n\t0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040,\n\t0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040,\n\t0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,\n\t0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040,\n\t0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040,\n\t0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040,\n\t0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,\n\t0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040,\n\t0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040,\n\t0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040,\n\t0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,\n\t0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008,\n\t0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018,\n\t0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,\n\t0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018,\n\t0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008,\n\t0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040,\n\t0x906: 0x0008, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0008, 0x90a: 0x0008, 0x90b: 0x0040,\n\t0x90c: 0x0008, 0x90d: 0x0008, 0x90e: 0x0008, 0x90f: 0x0008, 0x910: 0x0008, 0x911: 0x0008,\n\t0x912: 0x0008, 0x913: 0x0008, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008,\n\t0x918: 0x0008, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008,\n\t0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0008, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,\n\t0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0008, 0x929: 0x0008,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0008, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,\n\t0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x0929, 0x934: 0x3308, 0x935: 0x3308,\n\t0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x3b08, 0x93b: 0x3308,\n\t0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x09d1, 0x944: 0x0008, 0x945: 0x0008,\n\t0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,\n\t0x94c: 0x0008, 0x94d: 0x0a09, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,\n\t0x952: 0x0a41, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0a79,\n\t0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0ab1, 0x95d: 0x0008,\n\t0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,\n\t0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0ae9,\n\t0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040,\n\t0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0b21, 0x974: 0x3308, 0x975: 0x0b59,\n\t0x976: 0x0b91, 0x977: 0x0bc9, 0x978: 0x0c19, 0x979: 0x0c51, 0x97a: 0x3308, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x3308, 0x981: 0x0ca1, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018,\n\t0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308,\n\t0x992: 0x3308, 0x993: 0x0cd9, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308,\n\t0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0d11,\n\t0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0d49, 0x9a3: 0x3308,\n\t0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0d81, 0x9a8: 0x3308, 0x9a9: 0x3308,\n\t0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0db9, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308,\n\t0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308,\n\t0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x0df1, 0x9ba: 0x3308, 0x9bb: 0x3308,\n\t0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008,\n\t0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,\n\t0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008,\n\t0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008,\n\t0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008,\n\t0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008,\n\t0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008,\n\t0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0039, 0x9ed: 0x0ed1, 0x9ee: 0x0ee9, 0x9ef: 0x0008,\n\t0x9f0: 0x0ef9, 0x9f1: 0x0f09, 0x9f2: 0x0f19, 0x9f3: 0x0f31, 0x9f4: 0x0249, 0x9f5: 0x0f41,\n\t0x9f6: 0x0259, 0x9f7: 0x0f51, 0x9f8: 0x0359, 0x9f9: 0x0f61, 0x9fa: 0x0f71, 0x9fb: 0x0008,\n\t0x9fc: 0x00d9, 0x9fd: 0x0f81, 0x9fe: 0x0f99, 0x9ff: 0x0269,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0fa9, 0xa01: 0x0fb9, 0xa02: 0x0279, 0xa03: 0x0039, 0xa04: 0x0fc9, 0xa05: 0x0fe1,\n\t0xa06: 0x05b5, 0xa07: 0x0ee9, 0xa08: 0x0ef9, 0xa09: 0x0f09, 0xa0a: 0x0ff9, 0xa0b: 0x1011,\n\t0xa0c: 0x1029, 0xa0d: 0x0f31, 0xa0e: 0x0008, 0xa0f: 0x0f51, 0xa10: 0x0f61, 0xa11: 0x1041,\n\t0xa12: 0x00d9, 0xa13: 0x1059, 0xa14: 0x05cd, 0xa15: 0x05cd, 0xa16: 0x0f99, 0xa17: 0x0fa9,\n\t0xa18: 0x0fb9, 0xa19: 0x05b5, 0xa1a: 0x1071, 0xa1b: 0x1089, 0xa1c: 0x05e5, 0xa1d: 0x1099,\n\t0xa1e: 0x10b1, 0xa1f: 0x10c9, 0xa20: 0x10e1, 0xa21: 0x10f9, 0xa22: 0x0f41, 0xa23: 0x0269,\n\t0xa24: 0x0fb9, 0xa25: 0x1089, 0xa26: 0x1099, 0xa27: 0x10b1, 0xa28: 0x1111, 0xa29: 0x10e1,\n\t0xa2a: 0x10f9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008,\n\t0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008,\n\t0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x1129, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008,\n\t0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008,\n\t0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008,\n\t0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008,\n\t0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008,\n\t0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x1141, 0xa5c: 0x1159, 0xa5d: 0x1169,\n\t0xa5e: 0x1181, 0xa5f: 0x1029, 0xa60: 0x1199, 0xa61: 0x11a9, 0xa62: 0x11c1, 0xa63: 0x11d9,\n\t0xa64: 0x11f1, 0xa65: 0x1209, 0xa66: 0x1221, 0xa67: 0x05fd, 0xa68: 0x1239, 0xa69: 0x1251,\n\t0xa6a: 0xe17d, 0xa6b: 0x1269, 0xa6c: 0x1281, 0xa6d: 0x1299, 0xa6e: 0x12b1, 0xa6f: 0x12c9,\n\t0xa70: 0x12e1, 0xa71: 0x12f9, 0xa72: 0x1311, 0xa73: 0x1329, 0xa74: 0x1341, 0xa75: 0x1359,\n\t0xa76: 0x1371, 0xa77: 0x1389, 0xa78: 0x0615, 0xa79: 0x13a1, 0xa7a: 0x13b9, 0xa7b: 0x13d1,\n\t0xa7c: 0x13e1, 0xa7d: 0x13f9, 0xa7e: 0x1411, 0xa7f: 0x1429,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,\n\t0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,\n\t0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,\n\t0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008,\n\t0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008,\n\t0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,\n\t0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,\n\t0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,\n\t0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,\n\t0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,\n\t0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,\n\t0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,\n\t0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,\n\t0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,\n\t0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x062d, 0xadb: 0x064d, 0xadc: 0x0008, 0xadd: 0x0008,\n\t0xade: 0x1441, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,\n\t0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,\n\t0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,\n\t0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,\n\t0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,\n\t0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008,\n\t0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045,\n\t0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008,\n\t0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,\n\t0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045,\n\t0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008,\n\t0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045,\n\t0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045,\n\t0xb30: 0x0008, 0xb31: 0x1459, 0xb32: 0x0008, 0xb33: 0x1471, 0xb34: 0x0008, 0xb35: 0x1489,\n\t0xb36: 0x0008, 0xb37: 0x14a1, 0xb38: 0x0008, 0xb39: 0x14b9, 0xb3a: 0x0008, 0xb3b: 0x14d1,\n\t0xb3c: 0x0008, 0xb3d: 0x14e9, 0xb3e: 0x0040, 0xb3f: 0x0040,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x1501, 0xb41: 0x1531, 0xb42: 0x1561, 0xb43: 0x1591, 0xb44: 0x15c1, 0xb45: 0x15f1,\n\t0xb46: 0x1621, 0xb47: 0x1651, 0xb48: 0x1501, 0xb49: 0x1531, 0xb4a: 0x1561, 0xb4b: 0x1591,\n\t0xb4c: 0x15c1, 0xb4d: 0x15f1, 0xb4e: 0x1621, 0xb4f: 0x1651, 0xb50: 0x1681, 0xb51: 0x16b1,\n\t0xb52: 0x16e1, 0xb53: 0x1711, 0xb54: 0x1741, 0xb55: 0x1771, 0xb56: 0x17a1, 0xb57: 0x17d1,\n\t0xb58: 0x1681, 0xb59: 0x16b1, 0xb5a: 0x16e1, 0xb5b: 0x1711, 0xb5c: 0x1741, 0xb5d: 0x1771,\n\t0xb5e: 0x17a1, 0xb5f: 0x17d1, 0xb60: 0x1801, 0xb61: 0x1831, 0xb62: 0x1861, 0xb63: 0x1891,\n\t0xb64: 0x18c1, 0xb65: 0x18f1, 0xb66: 0x1921, 0xb67: 0x1951, 0xb68: 0x1801, 0xb69: 0x1831,\n\t0xb6a: 0x1861, 0xb6b: 0x1891, 0xb6c: 0x18c1, 0xb6d: 0x18f1, 0xb6e: 0x1921, 0xb6f: 0x1951,\n\t0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x1981, 0xb73: 0x19b1, 0xb74: 0x19d9, 0xb75: 0x0040,\n\t0xb76: 0x0008, 0xb77: 0x1a01, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x0665, 0xb7b: 0x1459,\n\t0xb7c: 0x19b1, 0xb7d: 0x067e, 0xb7e: 0x1a31, 0xb7f: 0x069e,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x06be, 0xb81: 0x1a4a, 0xb82: 0x1a79, 0xb83: 0x1aa9, 0xb84: 0x1ad1, 0xb85: 0x0040,\n\t0xb86: 0x0008, 0xb87: 0x1af9, 0xb88: 0x06dd, 0xb89: 0x1471, 0xb8a: 0x06f5, 0xb8b: 0x1489,\n\t0xb8c: 0x1aa9, 0xb8d: 0x1b2a, 0xb8e: 0x1b5a, 0xb8f: 0x1b8a, 0xb90: 0x0008, 0xb91: 0x0008,\n\t0xb92: 0x0008, 0xb93: 0x1bb9, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008,\n\t0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x070d, 0xb9b: 0x14a1, 0xb9c: 0x0040, 0xb9d: 0x1bd2,\n\t0xb9e: 0x1c02, 0xb9f: 0x1c32, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x1c61,\n\t0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045,\n\t0xbaa: 0x0725, 0xbab: 0x14d1, 0xbac: 0xe04d, 0xbad: 0x1c7a, 0xbae: 0x03d2, 0xbaf: 0x1caa,\n\t0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x1cb9, 0xbb3: 0x1ce9, 0xbb4: 0x1d11, 0xbb5: 0x0040,\n\t0xbb6: 0x0008, 0xbb7: 0x1d39, 0xbb8: 0x073d, 0xbb9: 0x14b9, 0xbba: 0x0515, 0xbbb: 0x14e9,\n\t0xbbc: 0x1ce9, 0xbbd: 0x0756, 0xbbe: 0x0776, 0xbbf: 0x0040,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a,\n\t0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0,\n\t0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d,\n\t0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x0796,\n\t0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,\n\t0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018,\n\t0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040,\n\t0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a,\n\t0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x1d69, 0xbf4: 0x1da1, 0xbf5: 0x0018,\n\t0xbf6: 0x1df1, 0xbf7: 0x1e29, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018,\n\t0xbfc: 0x1e7a, 0xbfd: 0x0018, 0xbfe: 0x07b6, 0xbff: 0x0018,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018,\n\t0xc06: 0x0018, 0xc07: 0x1e92, 0xc08: 0x1eaa, 0xc09: 0x1ec2, 0xc0a: 0x0018, 0xc0b: 0x0018,\n\t0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018,\n\t0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x1ed9,\n\t0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,\n\t0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340,\n\t0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040,\n\t0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340,\n\t0xc30: 0x1f41, 0xc31: 0x0f41, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x1f51, 0xc35: 0x1f61,\n\t0xc36: 0x1f71, 0xc37: 0x1f81, 0xc38: 0x1f91, 0xc39: 0x1fa1, 0xc3a: 0x1fb2, 0xc3b: 0x07d5,\n\t0xc3c: 0x1fc2, 0xc3d: 0x1fd2, 0xc3e: 0x1fe2, 0xc3f: 0x0f71,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x1f41, 0xc41: 0x00c9, 0xc42: 0x0069, 0xc43: 0x0079, 0xc44: 0x1f51, 0xc45: 0x1f61,\n\t0xc46: 0x1f71, 0xc47: 0x1f81, 0xc48: 0x1f91, 0xc49: 0x1fa1, 0xc4a: 0x1fb2, 0xc4b: 0x07ed,\n\t0xc4c: 0x1fc2, 0xc4d: 0x1fd2, 0xc4e: 0x1fe2, 0xc4f: 0x0040, 0xc50: 0x0039, 0xc51: 0x0f09,\n\t0xc52: 0x00d9, 0xc53: 0x0369, 0xc54: 0x0ff9, 0xc55: 0x0249, 0xc56: 0x0f51, 0xc57: 0x0359,\n\t0xc58: 0x0f61, 0xc59: 0x0f71, 0xc5a: 0x0f99, 0xc5b: 0x01d9, 0xc5c: 0x0fa9, 0xc5d: 0x0040,\n\t0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018,\n\t0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x1ff1, 0xc69: 0x0018,\n\t0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018,\n\t0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018,\n\t0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018,\n\t0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x0806, 0xc81: 0x0826, 0xc82: 0x1159, 0xc83: 0x0845, 0xc84: 0x0018, 0xc85: 0x0866,\n\t0xc86: 0x0886, 0xc87: 0x1011, 0xc88: 0x0018, 0xc89: 0x08a5, 0xc8a: 0x0f31, 0xc8b: 0x0249,\n\t0xc8c: 0x0249, 0xc8d: 0x0249, 0xc8e: 0x0249, 0xc8f: 0x2009, 0xc90: 0x0f41, 0xc91: 0x0f41,\n\t0xc92: 0x0359, 0xc93: 0x0359, 0xc94: 0x0018, 0xc95: 0x0f71, 0xc96: 0x2021, 0xc97: 0x0018,\n\t0xc98: 0x0018, 0xc99: 0x0f99, 0xc9a: 0x2039, 0xc9b: 0x0269, 0xc9c: 0x0269, 0xc9d: 0x0269,\n\t0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x2049, 0xca1: 0x08c5, 0xca2: 0x2061, 0xca3: 0x0018,\n\t0xca4: 0x13d1, 0xca5: 0x0018, 0xca6: 0x2079, 0xca7: 0x0018, 0xca8: 0x13d1, 0xca9: 0x0018,\n\t0xcaa: 0x0f51, 0xcab: 0x2091, 0xcac: 0x0ee9, 0xcad: 0x1159, 0xcae: 0x0018, 0xcaf: 0x0f09,\n\t0xcb0: 0x0f09, 0xcb1: 0x1199, 0xcb2: 0x0040, 0xcb3: 0x0f61, 0xcb4: 0x00d9, 0xcb5: 0x20a9,\n\t0xcb6: 0x20c1, 0xcb7: 0x20d9, 0xcb8: 0x20f1, 0xcb9: 0x0f41, 0xcba: 0x0018, 0xcbb: 0x08e5,\n\t0xcbc: 0x2109, 0xcbd: 0x10b1, 0xcbe: 0x10b1, 0xcbf: 0x2109,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x0905, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0ef9,\n\t0xcc6: 0x0ef9, 0xcc7: 0x0f09, 0xcc8: 0x0f41, 0xcc9: 0x0259, 0xcca: 0x0018, 0xccb: 0x0018,\n\t0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x2121, 0xcd1: 0x2151,\n\t0xcd2: 0x2181, 0xcd3: 0x21b9, 0xcd4: 0x21e9, 0xcd5: 0x2219, 0xcd6: 0x2249, 0xcd7: 0x2279,\n\t0xcd8: 0x22a9, 0xcd9: 0x22d9, 0xcda: 0x2309, 0xcdb: 0x2339, 0xcdc: 0x2369, 0xcdd: 0x2399,\n\t0xcde: 0x23c9, 0xcdf: 0x23f9, 0xce0: 0x0f41, 0xce1: 0x2421, 0xce2: 0x091d, 0xce3: 0x2439,\n\t0xce4: 0x1089, 0xce5: 0x2451, 0xce6: 0x093d, 0xce7: 0x2469, 0xce8: 0x2491, 0xce9: 0x0369,\n\t0xcea: 0x24a9, 0xceb: 0x095d, 0xcec: 0x0359, 0xced: 0x1159, 0xcee: 0x0ef9, 0xcef: 0x0f61,\n\t0xcf0: 0x0f41, 0xcf1: 0x2421, 0xcf2: 0x097d, 0xcf3: 0x2439, 0xcf4: 0x1089, 0xcf5: 0x2451,\n\t0xcf6: 0x099d, 0xcf7: 0x2469, 0xcf8: 0x2491, 0xcf9: 0x0369, 0xcfa: 0x24a9, 0xcfb: 0x09bd,\n\t0xcfc: 0x0359, 0xcfd: 0x1159, 0xcfe: 0x0ef9, 0xcff: 0x0f61,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018,\n\t0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040,\n\t0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,\n\t0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,\n\t0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040,\n\t0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x00c9, 0xd21: 0x0069, 0xd22: 0x0079, 0xd23: 0x1f51,\n\t0xd24: 0x1f61, 0xd25: 0x1f71, 0xd26: 0x1f81, 0xd27: 0x1f91, 0xd28: 0x1fa1, 0xd29: 0x2601,\n\t0xd2a: 0x2619, 0xd2b: 0x2631, 0xd2c: 0x2649, 0xd2d: 0x2661, 0xd2e: 0x2679, 0xd2f: 0x2691,\n\t0xd30: 0x26a9, 0xd31: 0x26c1, 0xd32: 0x26d9, 0xd33: 0x26f1, 0xd34: 0x0a1e, 0xd35: 0x0a3e,\n\t0xd36: 0x0a5e, 0xd37: 0x0a7e, 0xd38: 0x0a9e, 0xd39: 0x0abe, 0xd3a: 0x0ade, 0xd3b: 0x0afe,\n\t0xd3c: 0x0b1e, 0xd3d: 0x270a, 0xd3e: 0x2732, 0xd3f: 0x275a,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x2782, 0xd41: 0x27aa, 0xd42: 0x27d2, 0xd43: 0x27fa, 0xd44: 0x2822, 0xd45: 0x284a,\n\t0xd46: 0x2872, 0xd47: 0x289a, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040,\n\t0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,\n\t0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,\n\t0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b3e, 0xd5d: 0x0b5e,\n\t0xd5e: 0x0b7e, 0xd5f: 0x0b9e, 0xd60: 0x0bbe, 0xd61: 0x0bde, 0xd62: 0x0bfe, 0xd63: 0x0c1e,\n\t0xd64: 0x0c3e, 0xd65: 0x0c5e, 0xd66: 0x0c7e, 0xd67: 0x0c9e, 0xd68: 0x0cbe, 0xd69: 0x0cde,\n\t0xd6a: 0x0cfe, 0xd6b: 0x0d1e, 0xd6c: 0x0d3e, 0xd6d: 0x0d5e, 0xd6e: 0x0d7e, 0xd6f: 0x0d9e,\n\t0xd70: 0x0dbe, 0xd71: 0x0dde, 0xd72: 0x0dfe, 0xd73: 0x0e1e, 0xd74: 0x0e3e, 0xd75: 0x0e5e,\n\t0xd76: 0x0039, 0xd77: 0x0ee9, 0xd78: 0x1159, 0xd79: 0x0ef9, 0xd7a: 0x0f09, 0xd7b: 0x1199,\n\t0xd7c: 0x0f31, 0xd7d: 0x0249, 0xd7e: 0x0f41, 0xd7f: 0x0259,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0f51, 0xd81: 0x0359, 0xd82: 0x0f61, 0xd83: 0x0f71, 0xd84: 0x00d9, 0xd85: 0x0f99,\n\t0xd86: 0x2039, 0xd87: 0x0269, 0xd88: 0x01d9, 0xd89: 0x0fa9, 0xd8a: 0x0fb9, 0xd8b: 0x1089,\n\t0xd8c: 0x0279, 0xd8d: 0x0369, 0xd8e: 0x0289, 0xd8f: 0x13d1, 0xd90: 0x0039, 0xd91: 0x0ee9,\n\t0xd92: 0x1159, 0xd93: 0x0ef9, 0xd94: 0x0f09, 0xd95: 0x1199, 0xd96: 0x0f31, 0xd97: 0x0249,\n\t0xd98: 0x0f41, 0xd99: 0x0259, 0xd9a: 0x0f51, 0xd9b: 0x0359, 0xd9c: 0x0f61, 0xd9d: 0x0f71,\n\t0xd9e: 0x00d9, 0xd9f: 0x0f99, 0xda0: 0x2039, 0xda1: 0x0269, 0xda2: 0x01d9, 0xda3: 0x0fa9,\n\t0xda4: 0x0fb9, 0xda5: 0x1089, 0xda6: 0x0279, 0xda7: 0x0369, 0xda8: 0x0289, 0xda9: 0x13d1,\n\t0xdaa: 0x1f41, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018,\n\t0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018,\n\t0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018,\n\t0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008,\n\t0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008,\n\t0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008,\n\t0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008,\n\t0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008,\n\t0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x2971, 0xde3: 0x0ed5,\n\t0xde4: 0x2989, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d,\n\t0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0fe1, 0xdee: 0x1281, 0xdef: 0x0fc9,\n\t0xdf0: 0x1141, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d,\n\t0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008,\n\t0xdfc: 0x0259, 0xdfd: 0x1089, 0xdfe: 0x29a1, 0xdff: 0x29b9,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008,\n\t0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008,\n\t0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008,\n\t0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008,\n\t0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008,\n\t0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008,\n\t0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018,\n\t0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308,\n\t0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040,\n\t0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018,\n\t0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x2715, 0xe41: 0x2735, 0xe42: 0x2755, 0xe43: 0x2775, 0xe44: 0x2795, 0xe45: 0x27b5,\n\t0xe46: 0x27d5, 0xe47: 0x27f5, 0xe48: 0x2815, 0xe49: 0x2835, 0xe4a: 0x2855, 0xe4b: 0x2875,\n\t0xe4c: 0x2895, 0xe4d: 0x28b5, 0xe4e: 0x28d5, 0xe4f: 0x28f5, 0xe50: 0x2915, 0xe51: 0x2935,\n\t0xe52: 0x2955, 0xe53: 0x2975, 0xe54: 0x2995, 0xe55: 0x29b5, 0xe56: 0x0040, 0xe57: 0x0040,\n\t0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040,\n\t0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040,\n\t0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040,\n\t0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040,\n\t0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040,\n\t0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040,\n\t0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x29d1, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008,\n\t0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018,\n\t0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018,\n\t0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018,\n\t0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018,\n\t0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018,\n\t0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018,\n\t0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018,\n\t0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018,\n\t0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29d5, 0xeb9: 0x29f5, 0xeba: 0x2a15, 0xebb: 0x0018,\n\t0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2b55, 0xec1: 0x2b75, 0xec2: 0x2b95, 0xec3: 0x2bb5, 0xec4: 0x2bd5, 0xec5: 0x2bf5,\n\t0xec6: 0x2bf5, 0xec7: 0x2bf5, 0xec8: 0x2c15, 0xec9: 0x2c15, 0xeca: 0x2c15, 0xecb: 0x2c15,\n\t0xecc: 0x2c35, 0xecd: 0x2c35, 0xece: 0x2c35, 0xecf: 0x2c55, 0xed0: 0x2c75, 0xed1: 0x2c75,\n\t0xed2: 0x2a95, 0xed3: 0x2a95, 0xed4: 0x2c75, 0xed5: 0x2c75, 0xed6: 0x2c95, 0xed7: 0x2c95,\n\t0xed8: 0x2c75, 0xed9: 0x2c75, 0xeda: 0x2a95, 0xedb: 0x2a95, 0xedc: 0x2c75, 0xedd: 0x2c75,\n\t0xede: 0x2c55, 0xedf: 0x2c55, 0xee0: 0x2cb5, 0xee1: 0x2cb5, 0xee2: 0x2cd5, 0xee3: 0x2cd5,\n\t0xee4: 0x0040, 0xee5: 0x2cf5, 0xee6: 0x2d15, 0xee7: 0x2d35, 0xee8: 0x2d35, 0xee9: 0x2d55,\n\t0xeea: 0x2d75, 0xeeb: 0x2d95, 0xeec: 0x2db5, 0xeed: 0x2dd5, 0xeee: 0x2df5, 0xeef: 0x2e15,\n\t0xef0: 0x2e35, 0xef1: 0x2e55, 0xef2: 0x2e55, 0xef3: 0x2e75, 0xef4: 0x2e95, 0xef5: 0x2e95,\n\t0xef6: 0x2eb5, 0xef7: 0x2ed5, 0xef8: 0x2e75, 0xef9: 0x2ef5, 0xefa: 0x2f15, 0xefb: 0x2ef5,\n\t0xefc: 0x2e75, 0xefd: 0x2f35, 0xefe: 0x2f55, 0xeff: 0x2f75,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x2f95, 0xf01: 0x2fb5, 0xf02: 0x2d15, 0xf03: 0x2cf5, 0xf04: 0x2fd5, 0xf05: 0x2ff5,\n\t0xf06: 0x3015, 0xf07: 0x3035, 0xf08: 0x3055, 0xf09: 0x3075, 0xf0a: 0x3095, 0xf0b: 0x30b5,\n\t0xf0c: 0x30d5, 0xf0d: 0x30f5, 0xf0e: 0x3115, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018,\n\t0xf12: 0x3135, 0xf13: 0x3155, 0xf14: 0x3175, 0xf15: 0x3195, 0xf16: 0x31b5, 0xf17: 0x31d5,\n\t0xf18: 0x31f5, 0xf19: 0x3215, 0xf1a: 0x3235, 0xf1b: 0x3255, 0xf1c: 0x3175, 0xf1d: 0x3275,\n\t0xf1e: 0x3295, 0xf1f: 0x32b5, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008,\n\t0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008,\n\t0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008,\n\t0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008,\n\t0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0040,\n\t0xf3c: 0x0040, 0xf3d: 0x0040, 0xf3e: 0x0040, 0xf3f: 0x0040,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x36a2, 0xf41: 0x36d2, 0xf42: 0x3702, 0xf43: 0x3732, 0xf44: 0x32d5, 0xf45: 0x32f5,\n\t0xf46: 0x3315, 0xf47: 0x3335, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018,\n\t0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x3355, 0xf51: 0x3761,\n\t0xf52: 0x3779, 0xf53: 0x3791, 0xf54: 0x37a9, 0xf55: 0x37c1, 0xf56: 0x37d9, 0xf57: 0x37f1,\n\t0xf58: 0x3809, 0xf59: 0x3821, 0xf5a: 0x3839, 0xf5b: 0x3851, 0xf5c: 0x3869, 0xf5d: 0x3881,\n\t0xf5e: 0x3899, 0xf5f: 0x38b1, 0xf60: 0x3375, 0xf61: 0x3395, 0xf62: 0x33b5, 0xf63: 0x33d5,\n\t0xf64: 0x33f5, 0xf65: 0x33f5, 0xf66: 0x3415, 0xf67: 0x3435, 0xf68: 0x3455, 0xf69: 0x3475,\n\t0xf6a: 0x3495, 0xf6b: 0x34b5, 0xf6c: 0x34d5, 0xf6d: 0x34f5, 0xf6e: 0x3515, 0xf6f: 0x3535,\n\t0xf70: 0x3555, 0xf71: 0x3575, 0xf72: 0x3595, 0xf73: 0x35b5, 0xf74: 0x35d5, 0xf75: 0x35f5,\n\t0xf76: 0x3615, 0xf77: 0x3635, 0xf78: 0x3655, 0xf79: 0x3675, 0xf7a: 0x3695, 0xf7b: 0x36b5,\n\t0xf7c: 0x38c9, 0xf7d: 0x3901, 0xf7e: 0x36d5, 0xf7f: 0x0018,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x36f5, 0xf81: 0x3715, 0xf82: 0x3735, 0xf83: 0x3755, 0xf84: 0x3775, 0xf85: 0x3795,\n\t0xf86: 0x37b5, 0xf87: 0x37d5, 0xf88: 0x37f5, 0xf89: 0x3815, 0xf8a: 0x3835, 0xf8b: 0x3855,\n\t0xf8c: 0x3875, 0xf8d: 0x3895, 0xf8e: 0x38b5, 0xf8f: 0x38d5, 0xf90: 0x38f5, 0xf91: 0x3915,\n\t0xf92: 0x3935, 0xf93: 0x3955, 0xf94: 0x3975, 0xf95: 0x3995, 0xf96: 0x39b5, 0xf97: 0x39d5,\n\t0xf98: 0x39f5, 0xf99: 0x3a15, 0xf9a: 0x3a35, 0xf9b: 0x3a55, 0xf9c: 0x3a75, 0xf9d: 0x3a95,\n\t0xf9e: 0x3ab5, 0xf9f: 0x3ad5, 0xfa0: 0x3af5, 0xfa1: 0x3b15, 0xfa2: 0x3b35, 0xfa3: 0x3b55,\n\t0xfa4: 0x3b75, 0xfa5: 0x3b95, 0xfa6: 0x1295, 0xfa7: 0x3bb5, 0xfa8: 0x3bd5, 0xfa9: 0x3bf5,\n\t0xfaa: 0x3c15, 0xfab: 0x3c35, 0xfac: 0x3c55, 0xfad: 0x3c75, 0xfae: 0x23b5, 0xfaf: 0x3c95,\n\t0xfb0: 0x3cb5, 0xfb1: 0x3939, 0xfb2: 0x3951, 0xfb3: 0x3969, 0xfb4: 0x3981, 0xfb5: 0x3999,\n\t0xfb6: 0x39b1, 0xfb7: 0x39c9, 0xfb8: 0x39e1, 0xfb9: 0x39f9, 0xfba: 0x3a11, 0xfbb: 0x3a29,\n\t0xfbc: 0x3a41, 0xfbd: 0x3a59, 0xfbe: 0x3a71, 0xfbf: 0x3a89,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x3aa1, 0xfc1: 0x3ac9, 0xfc2: 0x3af1, 0xfc3: 0x3b19, 0xfc4: 0x3b41, 0xfc5: 0x3b69,\n\t0xfc6: 0x3b91, 0xfc7: 0x3bb9, 0xfc8: 0x3be1, 0xfc9: 0x3c09, 0xfca: 0x3c39, 0xfcb: 0x3c69,\n\t0xfcc: 0x3c99, 0xfcd: 0x3cd5, 0xfce: 0x3cb1, 0xfcf: 0x3cf5, 0xfd0: 0x3d15, 0xfd1: 0x3d2d,\n\t0xfd2: 0x3d45, 0xfd3: 0x3d5d, 0xfd4: 0x3d75, 0xfd5: 0x3d75, 0xfd6: 0x3d5d, 0xfd7: 0x3d8d,\n\t0xfd8: 0x07d5, 0xfd9: 0x3da5, 0xfda: 0x3dbd, 0xfdb: 0x3dd5, 0xfdc: 0x3ded, 0xfdd: 0x3e05,\n\t0xfde: 0x3e1d, 0xfdf: 0x3e35, 0xfe0: 0x3e4d, 0xfe1: 0x3e65, 0xfe2: 0x3e7d, 0xfe3: 0x3e95,\n\t0xfe4: 0x3ead, 0xfe5: 0x3ead, 0xfe6: 0x3ec5, 0xfe7: 0x3ec5, 0xfe8: 0x3edd, 0xfe9: 0x3edd,\n\t0xfea: 0x3ef5, 0xfeb: 0x3f0d, 0xfec: 0x3f25, 0xfed: 0x3f3d, 0xfee: 0x3f55, 0xfef: 0x3f55,\n\t0xff0: 0x3f6d, 0xff1: 0x3f6d, 0xff2: 0x3f6d, 0xff3: 0x3f85, 0xff4: 0x3f9d, 0xff5: 0x3fb5,\n\t0xff6: 0x3fcd, 0xff7: 0x3fb5, 0xff8: 0x3fe5, 0xff9: 0x3ffd, 0xffa: 0x3f85, 0xffb: 0x4015,\n\t0xffc: 0x402d, 0xffd: 0x402d, 0xffe: 0x402d, 0xfff: 0x0040,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x3cc9, 0x1001: 0x3d31, 0x1002: 0x3d99, 0x1003: 0x3e01, 0x1004: 0x3e51, 0x1005: 0x3eb9,\n\t0x1006: 0x3f09, 0x1007: 0x3f59, 0x1008: 0x3fd9, 0x1009: 0x4041, 0x100a: 0x4091, 0x100b: 0x40e1,\n\t0x100c: 0x4131, 0x100d: 0x4199, 0x100e: 0x4201, 0x100f: 0x4251, 0x1010: 0x42a1, 0x1011: 0x42d9,\n\t0x1012: 0x4329, 0x1013: 0x4391, 0x1014: 0x43f9, 0x1015: 0x4431, 0x1016: 0x44b1, 0x1017: 0x4549,\n\t0x1018: 0x45c9, 0x1019: 0x4619, 0x101a: 0x4699, 0x101b: 0x4719, 0x101c: 0x4781, 0x101d: 0x47d1,\n\t0x101e: 0x4821, 0x101f: 0x4871, 0x1020: 0x48d9, 0x1021: 0x4959, 0x1022: 0x49c1, 0x1023: 0x4a11,\n\t0x1024: 0x4a61, 0x1025: 0x4ab1, 0x1026: 0x4ae9, 0x1027: 0x4b21, 0x1028: 0x4b59, 0x1029: 0x4b91,\n\t0x102a: 0x4be1, 0x102b: 0x4c31, 0x102c: 0x4cb1, 0x102d: 0x4d01, 0x102e: 0x4d69, 0x102f: 0x4de9,\n\t0x1030: 0x4e39, 0x1031: 0x4e71, 0x1032: 0x4ea9, 0x1033: 0x4f29, 0x1034: 0x4f91, 0x1035: 0x5011,\n\t0x1036: 0x5061, 0x1037: 0x50e1, 0x1038: 0x5119, 0x1039: 0x5169, 0x103a: 0x51b9, 0x103b: 0x5209,\n\t0x103c: 0x5259, 0x103d: 0x52a9, 0x103e: 0x5311, 0x103f: 0x5361,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x5399, 0x1041: 0x53e9, 0x1042: 0x5439, 0x1043: 0x5489, 0x1044: 0x54f1, 0x1045: 0x5541,\n\t0x1046: 0x5591, 0x1047: 0x55e1, 0x1048: 0x5661, 0x1049: 0x56c9, 0x104a: 0x5701, 0x104b: 0x5781,\n\t0x104c: 0x57b9, 0x104d: 0x5821, 0x104e: 0x5889, 0x104f: 0x58d9, 0x1050: 0x5929, 0x1051: 0x5979,\n\t0x1052: 0x59e1, 0x1053: 0x5a19, 0x1054: 0x5a69, 0x1055: 0x5ad1, 0x1056: 0x5b09, 0x1057: 0x5b89,\n\t0x1058: 0x5bd9, 0x1059: 0x5c01, 0x105a: 0x5c29, 0x105b: 0x5c51, 0x105c: 0x5c79, 0x105d: 0x5ca1,\n\t0x105e: 0x5cc9, 0x105f: 0x5cf1, 0x1060: 0x5d19, 0x1061: 0x5d41, 0x1062: 0x5d69, 0x1063: 0x5d99,\n\t0x1064: 0x5dc9, 0x1065: 0x5df9, 0x1066: 0x5e29, 0x1067: 0x5e59, 0x1068: 0x5e89, 0x1069: 0x5eb9,\n\t0x106a: 0x5ee9, 0x106b: 0x5f19, 0x106c: 0x5f49, 0x106d: 0x5f79, 0x106e: 0x5fa9, 0x106f: 0x5fd9,\n\t0x1070: 0x6009, 0x1071: 0x4045, 0x1072: 0x6039, 0x1073: 0x6051, 0x1074: 0x4065, 0x1075: 0x6069,\n\t0x1076: 0x6081, 0x1077: 0x6099, 0x1078: 0x4085, 0x1079: 0x4085, 0x107a: 0x60b1, 0x107b: 0x60c9,\n\t0x107c: 0x6101, 0x107d: 0x6139, 0x107e: 0x6171, 0x107f: 0x61a9,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x6211, 0x1081: 0x6229, 0x1082: 0x40a5, 0x1083: 0x6241, 0x1084: 0x6259, 0x1085: 0x6271,\n\t0x1086: 0x6289, 0x1087: 0x62a1, 0x1088: 0x40c5, 0x1089: 0x62b9, 0x108a: 0x62e1, 0x108b: 0x62f9,\n\t0x108c: 0x40e5, 0x108d: 0x40e5, 0x108e: 0x6311, 0x108f: 0x6329, 0x1090: 0x6341, 0x1091: 0x4105,\n\t0x1092: 0x4125, 0x1093: 0x4145, 0x1094: 0x4165, 0x1095: 0x4185, 0x1096: 0x6359, 0x1097: 0x6371,\n\t0x1098: 0x6389, 0x1099: 0x63a1, 0x109a: 0x63b9, 0x109b: 0x41a5, 0x109c: 0x63d1, 0x109d: 0x63e9,\n\t0x109e: 0x6401, 0x109f: 0x41c5, 0x10a0: 0x41e5, 0x10a1: 0x6419, 0x10a2: 0x4205, 0x10a3: 0x4225,\n\t0x10a4: 0x4245, 0x10a5: 0x6431, 0x10a6: 0x4265, 0x10a7: 0x6449, 0x10a8: 0x6479, 0x10a9: 0x6211,\n\t0x10aa: 0x4285, 0x10ab: 0x42a5, 0x10ac: 0x42c5, 0x10ad: 0x42e5, 0x10ae: 0x64b1, 0x10af: 0x64f1,\n\t0x10b0: 0x6539, 0x10b1: 0x6551, 0x10b2: 0x4305, 0x10b3: 0x6569, 0x10b4: 0x6581, 0x10b5: 0x6599,\n\t0x10b6: 0x4325, 0x10b7: 0x65b1, 0x10b8: 0x65c9, 0x10b9: 0x65b1, 0x10ba: 0x65e1, 0x10bb: 0x65f9,\n\t0x10bc: 0x4345, 0x10bd: 0x6611, 0x10be: 0x6629, 0x10bf: 0x6611,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x4365, 0x10c1: 0x4385, 0x10c2: 0x0040, 0x10c3: 0x6641, 0x10c4: 0x6659, 0x10c5: 0x6671,\n\t0x10c6: 0x6689, 0x10c7: 0x0040, 0x10c8: 0x66c1, 0x10c9: 0x66d9, 0x10ca: 0x66f1, 0x10cb: 0x6709,\n\t0x10cc: 0x6721, 0x10cd: 0x6739, 0x10ce: 0x6401, 0x10cf: 0x6751, 0x10d0: 0x6769, 0x10d1: 0x6781,\n\t0x10d2: 0x43a5, 0x10d3: 0x6799, 0x10d4: 0x6289, 0x10d5: 0x43c5, 0x10d6: 0x43e5, 0x10d7: 0x67b1,\n\t0x10d8: 0x0040, 0x10d9: 0x4405, 0x10da: 0x67c9, 0x10db: 0x67e1, 0x10dc: 0x67f9, 0x10dd: 0x6811,\n\t0x10de: 0x6829, 0x10df: 0x6859, 0x10e0: 0x6889, 0x10e1: 0x68b1, 0x10e2: 0x68d9, 0x10e3: 0x6901,\n\t0x10e4: 0x6929, 0x10e5: 0x6951, 0x10e6: 0x6979, 0x10e7: 0x69a1, 0x10e8: 0x69c9, 0x10e9: 0x69f1,\n\t0x10ea: 0x6a21, 0x10eb: 0x6a51, 0x10ec: 0x6a81, 0x10ed: 0x6ab1, 0x10ee: 0x6ae1, 0x10ef: 0x6b11,\n\t0x10f0: 0x6b41, 0x10f1: 0x6b71, 0x10f2: 0x6ba1, 0x10f3: 0x6bd1, 0x10f4: 0x6c01, 0x10f5: 0x6c31,\n\t0x10f6: 0x6c61, 0x10f7: 0x6c91, 0x10f8: 0x6cc1, 0x10f9: 0x6cf1, 0x10fa: 0x6d21, 0x10fb: 0x6d51,\n\t0x10fc: 0x6d81, 0x10fd: 0x6db1, 0x10fe: 0x6de1, 0x10ff: 0x4425,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,\n\t0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,\n\t0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,\n\t0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,\n\t0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0xe00d, 0x111d: 0x0008,\n\t0x111e: 0xe00d, 0x111f: 0x0008, 0x1120: 0xe00d, 0x1121: 0x0008, 0x1122: 0xe00d, 0x1123: 0x0008,\n\t0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008,\n\t0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x3308,\n\t0x1130: 0x3318, 0x1131: 0x3318, 0x1132: 0x3318, 0x1133: 0x0018, 0x1134: 0x3308, 0x1135: 0x3308,\n\t0x1136: 0x3308, 0x1137: 0x3308, 0x1138: 0x3308, 0x1139: 0x3308, 0x113a: 0x3308, 0x113b: 0x3308,\n\t0x113c: 0x3308, 0x113d: 0x3308, 0x113e: 0x0018, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008,\n\t0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008,\n\t0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008,\n\t0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008,\n\t0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0x0ea1, 0x115d: 0x6e11,\n\t0x115e: 0x3308, 0x115f: 0x3308, 0x1160: 0x0008, 0x1161: 0x0008, 0x1162: 0x0008, 0x1163: 0x0008,\n\t0x1164: 0x0008, 0x1165: 0x0008, 0x1166: 0x0008, 0x1167: 0x0008, 0x1168: 0x0008, 0x1169: 0x0008,\n\t0x116a: 0x0008, 0x116b: 0x0008, 0x116c: 0x0008, 0x116d: 0x0008, 0x116e: 0x0008, 0x116f: 0x0008,\n\t0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008,\n\t0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0x0008, 0x117a: 0x0008, 0x117b: 0x0008,\n\t0x117c: 0x0008, 0x117d: 0x0008, 0x117e: 0x0008, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0x0018, 0x1181: 0x0018, 0x1182: 0x0018, 0x1183: 0x0018, 0x1184: 0x0018, 0x1185: 0x0018,\n\t0x1186: 0x0018, 0x1187: 0x0018, 0x1188: 0x0018, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0x0018,\n\t0x118c: 0x0018, 0x118d: 0x0018, 0x118e: 0x0018, 0x118f: 0x0018, 0x1190: 0x0018, 0x1191: 0x0018,\n\t0x1192: 0x0018, 0x1193: 0x0018, 0x1194: 0x0018, 0x1195: 0x0018, 0x1196: 0x0018, 0x1197: 0x0008,\n\t0x1198: 0x0008, 0x1199: 0x0008, 0x119a: 0x0008, 0x119b: 0x0008, 0x119c: 0x0008, 0x119d: 0x0008,\n\t0x119e: 0x0008, 0x119f: 0x0008, 0x11a0: 0x0018, 0x11a1: 0x0018, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,\n\t0x11b0: 0x0008, 0x11b1: 0x0008, 0x11b2: 0xe00d, 0x11b3: 0x0008, 0x11b4: 0xe00d, 0x11b5: 0x0008,\n\t0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008,\n\t0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,\n\t0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0xe00d, 0x11c9: 0x0008, 0x11ca: 0xe00d, 0x11cb: 0x0008,\n\t0x11cc: 0xe00d, 0x11cd: 0x0008, 0x11ce: 0xe00d, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,\n\t0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0xe00d, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,\n\t0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,\n\t0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,\n\t0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,\n\t0x11ea: 0xe00d, 0x11eb: 0x0008, 0x11ec: 0xe00d, 0x11ed: 0x0008, 0x11ee: 0xe00d, 0x11ef: 0x0008,\n\t0x11f0: 0xe0fd, 0x11f1: 0x0008, 0x11f2: 0x0008, 0x11f3: 0x0008, 0x11f4: 0x0008, 0x11f5: 0x0008,\n\t0x11f6: 0x0008, 0x11f7: 0x0008, 0x11f8: 0x0008, 0x11f9: 0xe01d, 0x11fa: 0x0008, 0x11fb: 0xe03d,\n\t0x11fc: 0x0008, 0x11fd: 0x4445, 0x11fe: 0xe00d, 0x11ff: 0x0008,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0xe00d, 0x1205: 0x0008,\n\t0x1206: 0xe00d, 0x1207: 0x0008, 0x1208: 0x0008, 0x1209: 0x0018, 0x120a: 0x0018, 0x120b: 0xe03d,\n\t0x120c: 0x0008, 0x120d: 0x11d9, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0xe00d, 0x1211: 0x0008,\n\t0x1212: 0xe00d, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008,\n\t0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0xe00d, 0x121b: 0x0008, 0x121c: 0xe00d, 0x121d: 0x0008,\n\t0x121e: 0xe00d, 0x121f: 0x0008, 0x1220: 0xe00d, 0x1221: 0x0008, 0x1222: 0xe00d, 0x1223: 0x0008,\n\t0x1224: 0xe00d, 0x1225: 0x0008, 0x1226: 0xe00d, 0x1227: 0x0008, 0x1228: 0xe00d, 0x1229: 0x0008,\n\t0x122a: 0x6e29, 0x122b: 0x1029, 0x122c: 0x11c1, 0x122d: 0x6e41, 0x122e: 0x1221, 0x122f: 0x0008,\n\t0x1230: 0x6e59, 0x1231: 0x6e71, 0x1232: 0x1239, 0x1233: 0x4465, 0x1234: 0xe00d, 0x1235: 0x0008,\n\t0x1236: 0xe00d, 0x1237: 0x0008, 0x1238: 0xe00d, 0x1239: 0x0008, 0x123a: 0xe00d, 0x123b: 0x0008,\n\t0x123c: 0xe00d, 0x123d: 0x0008, 0x123e: 0xe00d, 0x123f: 0x0008,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x650d, 0x1241: 0x652d, 0x1242: 0x654d, 0x1243: 0x656d, 0x1244: 0x658d, 0x1245: 0x65ad,\n\t0x1246: 0x65cd, 0x1247: 0x65ed, 0x1248: 0x660d, 0x1249: 0x662d, 0x124a: 0x664d, 0x124b: 0x666d,\n\t0x124c: 0x668d, 0x124d: 0x66ad, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x66cd, 0x1251: 0x0008,\n\t0x1252: 0x66ed, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x670d, 0x1256: 0x672d, 0x1257: 0x674d,\n\t0x1258: 0x676d, 0x1259: 0x678d, 0x125a: 0x67ad, 0x125b: 0x67cd, 0x125c: 0x67ed, 0x125d: 0x680d,\n\t0x125e: 0x682d, 0x125f: 0x0008, 0x1260: 0x684d, 0x1261: 0x0008, 0x1262: 0x686d, 0x1263: 0x0008,\n\t0x1264: 0x0008, 0x1265: 0x688d, 0x1266: 0x68ad, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008,\n\t0x126a: 0x68cd, 0x126b: 0x68ed, 0x126c: 0x690d, 0x126d: 0x692d, 0x126e: 0x694d, 0x126f: 0x696d,\n\t0x1270: 0x698d, 0x1271: 0x69ad, 0x1272: 0x69cd, 0x1273: 0x69ed, 0x1274: 0x6a0d, 0x1275: 0x6a2d,\n\t0x1276: 0x6a4d, 0x1277: 0x6a6d, 0x1278: 0x6a8d, 0x1279: 0x6aad, 0x127a: 0x6acd, 0x127b: 0x6aed,\n\t0x127c: 0x6b0d, 0x127d: 0x6b2d, 0x127e: 0x6b4d, 0x127f: 0x6b6d,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x7acd, 0x1281: 0x7aed, 0x1282: 0x7b0d, 0x1283: 0x7b2d, 0x1284: 0x7b4d, 0x1285: 0x7b6d,\n\t0x1286: 0x7b8d, 0x1287: 0x7bad, 0x1288: 0x7bcd, 0x1289: 0x7bed, 0x128a: 0x7c0d, 0x128b: 0x7c2d,\n\t0x128c: 0x7c4d, 0x128d: 0x7c6d, 0x128e: 0x7c8d, 0x128f: 0x6ec9, 0x1290: 0x6ef1, 0x1291: 0x6f19,\n\t0x1292: 0x7cad, 0x1293: 0x7ccd, 0x1294: 0x7ced, 0x1295: 0x6f41, 0x1296: 0x6f69, 0x1297: 0x6f91,\n\t0x1298: 0x7d0d, 0x1299: 0x7d2d, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040,\n\t0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040,\n\t0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040,\n\t0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040,\n\t0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040,\n\t0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040,\n\t0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x6fb9, 0x12c1: 0x6fd1, 0x12c2: 0x6fe9, 0x12c3: 0x7d4d, 0x12c4: 0x7d6d, 0x12c5: 0x7001,\n\t0x12c6: 0x7001, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040,\n\t0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040,\n\t0x12d2: 0x0040, 0x12d3: 0x7019, 0x12d4: 0x7041, 0x12d5: 0x7069, 0x12d6: 0x7091, 0x12d7: 0x70b9,\n\t0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x70e1,\n\t0x12de: 0x3308, 0x12df: 0x7109, 0x12e0: 0x7131, 0x12e1: 0x20a9, 0x12e2: 0x20f1, 0x12e3: 0x7149,\n\t0x12e4: 0x7161, 0x12e5: 0x7179, 0x12e6: 0x7191, 0x12e7: 0x71a9, 0x12e8: 0x71c1, 0x12e9: 0x1fb2,\n\t0x12ea: 0x71d9, 0x12eb: 0x7201, 0x12ec: 0x7229, 0x12ed: 0x7261, 0x12ee: 0x7299, 0x12ef: 0x72c1,\n\t0x12f0: 0x72e9, 0x12f1: 0x7311, 0x12f2: 0x7339, 0x12f3: 0x7361, 0x12f4: 0x7389, 0x12f5: 0x73b1,\n\t0x12f6: 0x73d9, 0x12f7: 0x0040, 0x12f8: 0x7401, 0x12f9: 0x7429, 0x12fa: 0x7451, 0x12fb: 0x7479,\n\t0x12fc: 0x74a1, 0x12fd: 0x0040, 0x12fe: 0x74c9, 0x12ff: 0x0040,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x74f1, 0x1301: 0x7519, 0x1302: 0x0040, 0x1303: 0x7541, 0x1304: 0x7569, 0x1305: 0x0040,\n\t0x1306: 0x7591, 0x1307: 0x75b9, 0x1308: 0x75e1, 0x1309: 0x7609, 0x130a: 0x7631, 0x130b: 0x7659,\n\t0x130c: 0x7681, 0x130d: 0x76a9, 0x130e: 0x76d1, 0x130f: 0x76f9, 0x1310: 0x7721, 0x1311: 0x7721,\n\t0x1312: 0x7739, 0x1313: 0x7739, 0x1314: 0x7739, 0x1315: 0x7739, 0x1316: 0x7751, 0x1317: 0x7751,\n\t0x1318: 0x7751, 0x1319: 0x7751, 0x131a: 0x7769, 0x131b: 0x7769, 0x131c: 0x7769, 0x131d: 0x7769,\n\t0x131e: 0x7781, 0x131f: 0x7781, 0x1320: 0x7781, 0x1321: 0x7781, 0x1322: 0x7799, 0x1323: 0x7799,\n\t0x1324: 0x7799, 0x1325: 0x7799, 0x1326: 0x77b1, 0x1327: 0x77b1, 0x1328: 0x77b1, 0x1329: 0x77b1,\n\t0x132a: 0x77c9, 0x132b: 0x77c9, 0x132c: 0x77c9, 0x132d: 0x77c9, 0x132e: 0x77e1, 0x132f: 0x77e1,\n\t0x1330: 0x77e1, 0x1331: 0x77e1, 0x1332: 0x77f9, 0x1333: 0x77f9, 0x1334: 0x77f9, 0x1335: 0x77f9,\n\t0x1336: 0x7811, 0x1337: 0x7811, 0x1338: 0x7811, 0x1339: 0x7811, 0x133a: 0x7829, 0x133b: 0x7829,\n\t0x133c: 0x7829, 0x133d: 0x7829, 0x133e: 0x7841, 0x133f: 0x7841,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x7841, 0x1341: 0x7841, 0x1342: 0x7859, 0x1343: 0x7859, 0x1344: 0x7871, 0x1345: 0x7871,\n\t0x1346: 0x7889, 0x1347: 0x7889, 0x1348: 0x78a1, 0x1349: 0x78a1, 0x134a: 0x78b9, 0x134b: 0x78b9,\n\t0x134c: 0x78d1, 0x134d: 0x78d1, 0x134e: 0x78e9, 0x134f: 0x78e9, 0x1350: 0x78e9, 0x1351: 0x78e9,\n\t0x1352: 0x7901, 0x1353: 0x7901, 0x1354: 0x7901, 0x1355: 0x7901, 0x1356: 0x7919, 0x1357: 0x7919,\n\t0x1358: 0x7919, 0x1359: 0x7919, 0x135a: 0x7931, 0x135b: 0x7931, 0x135c: 0x7931, 0x135d: 0x7931,\n\t0x135e: 0x7949, 0x135f: 0x7949, 0x1360: 0x7961, 0x1361: 0x7961, 0x1362: 0x7961, 0x1363: 0x7961,\n\t0x1364: 0x7979, 0x1365: 0x7979, 0x1366: 0x7991, 0x1367: 0x7991, 0x1368: 0x7991, 0x1369: 0x7991,\n\t0x136a: 0x79a9, 0x136b: 0x79a9, 0x136c: 0x79a9, 0x136d: 0x79a9, 0x136e: 0x79c1, 0x136f: 0x79c1,\n\t0x1370: 0x79d9, 0x1371: 0x79d9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818,\n\t0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818,\n\t0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0040, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040,\n\t0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040,\n\t0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040,\n\t0x1392: 0x0040, 0x1393: 0x79f1, 0x1394: 0x79f1, 0x1395: 0x79f1, 0x1396: 0x79f1, 0x1397: 0x7a09,\n\t0x1398: 0x7a09, 0x1399: 0x7a21, 0x139a: 0x7a21, 0x139b: 0x7a39, 0x139c: 0x7a39, 0x139d: 0x0479,\n\t0x139e: 0x7a51, 0x139f: 0x7a51, 0x13a0: 0x7a69, 0x13a1: 0x7a69, 0x13a2: 0x7a81, 0x13a3: 0x7a81,\n\t0x13a4: 0x7a99, 0x13a5: 0x7a99, 0x13a6: 0x7a99, 0x13a7: 0x7a99, 0x13a8: 0x7ab1, 0x13a9: 0x7ab1,\n\t0x13aa: 0x7ac9, 0x13ab: 0x7ac9, 0x13ac: 0x7af1, 0x13ad: 0x7af1, 0x13ae: 0x7b19, 0x13af: 0x7b19,\n\t0x13b0: 0x7b41, 0x13b1: 0x7b41, 0x13b2: 0x7b69, 0x13b3: 0x7b69, 0x13b4: 0x7b91, 0x13b5: 0x7b91,\n\t0x13b6: 0x7bb9, 0x13b7: 0x7bb9, 0x13b8: 0x7bb9, 0x13b9: 0x7be1, 0x13ba: 0x7be1, 0x13bb: 0x7be1,\n\t0x13bc: 0x7c09, 0x13bd: 0x7c09, 0x13be: 0x7c09, 0x13bf: 0x7c09,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x85f9, 0x13c1: 0x8621, 0x13c2: 0x8649, 0x13c3: 0x8671, 0x13c4: 0x8699, 0x13c5: 0x86c1,\n\t0x13c6: 0x86e9, 0x13c7: 0x8711, 0x13c8: 0x8739, 0x13c9: 0x8761, 0x13ca: 0x8789, 0x13cb: 0x87b1,\n\t0x13cc: 0x87d9, 0x13cd: 0x8801, 0x13ce: 0x8829, 0x13cf: 0x8851, 0x13d0: 0x8879, 0x13d1: 0x88a1,\n\t0x13d2: 0x88c9, 0x13d3: 0x88f1, 0x13d4: 0x8919, 0x13d5: 0x8941, 0x13d6: 0x8969, 0x13d7: 0x8991,\n\t0x13d8: 0x89b9, 0x13d9: 0x89e1, 0x13da: 0x8a09, 0x13db: 0x8a31, 0x13dc: 0x8a59, 0x13dd: 0x8a81,\n\t0x13de: 0x8aaa, 0x13df: 0x8ada, 0x13e0: 0x8b0a, 0x13e1: 0x8b3a, 0x13e2: 0x8b6a, 0x13e3: 0x8b9a,\n\t0x13e4: 0x8bc9, 0x13e5: 0x8bf1, 0x13e6: 0x7c71, 0x13e7: 0x8c19, 0x13e8: 0x7be1, 0x13e9: 0x7c99,\n\t0x13ea: 0x8c41, 0x13eb: 0x8c69, 0x13ec: 0x7d39, 0x13ed: 0x8c91, 0x13ee: 0x7d61, 0x13ef: 0x7d89,\n\t0x13f0: 0x8cb9, 0x13f1: 0x8ce1, 0x13f2: 0x7e29, 0x13f3: 0x8d09, 0x13f4: 0x7e51, 0x13f5: 0x7e79,\n\t0x13f6: 0x8d31, 0x13f7: 0x8d59, 0x13f8: 0x7ec9, 0x13f9: 0x8d81, 0x13fa: 0x7ef1, 0x13fb: 0x7f19,\n\t0x13fc: 0x83a1, 0x13fd: 0x83c9, 0x13fe: 0x8441, 0x13ff: 0x8469,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x8491, 0x1401: 0x8531, 0x1402: 0x8559, 0x1403: 0x8581, 0x1404: 0x85a9, 0x1405: 0x8649,\n\t0x1406: 0x8671, 0x1407: 0x8699, 0x1408: 0x8da9, 0x1409: 0x8739, 0x140a: 0x8dd1, 0x140b: 0x8df9,\n\t0x140c: 0x8829, 0x140d: 0x8e21, 0x140e: 0x8851, 0x140f: 0x8879, 0x1410: 0x8a81, 0x1411: 0x8e49,\n\t0x1412: 0x8e71, 0x1413: 0x89b9, 0x1414: 0x8e99, 0x1415: 0x89e1, 0x1416: 0x8a09, 0x1417: 0x7c21,\n\t0x1418: 0x7c49, 0x1419: 0x8ec1, 0x141a: 0x7c71, 0x141b: 0x8ee9, 0x141c: 0x7cc1, 0x141d: 0x7ce9,\n\t0x141e: 0x7d11, 0x141f: 0x7d39, 0x1420: 0x8f11, 0x1421: 0x7db1, 0x1422: 0x7dd9, 0x1423: 0x7e01,\n\t0x1424: 0x7e29, 0x1425: 0x8f39, 0x1426: 0x7ec9, 0x1427: 0x7f41, 0x1428: 0x7f69, 0x1429: 0x7f91,\n\t0x142a: 0x7fb9, 0x142b: 0x7fe1, 0x142c: 0x8031, 0x142d: 0x8059, 0x142e: 0x8081, 0x142f: 0x80a9,\n\t0x1430: 0x80d1, 0x1431: 0x80f9, 0x1432: 0x8f61, 0x1433: 0x8121, 0x1434: 0x8149, 0x1435: 0x8171,\n\t0x1436: 0x8199, 0x1437: 0x81c1, 0x1438: 0x81e9, 0x1439: 0x8239, 0x143a: 0x8261, 0x143b: 0x8289,\n\t0x143c: 0x82b1, 0x143d: 0x82d9, 0x143e: 0x8301, 0x143f: 0x8329,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x8351, 0x1441: 0x8379, 0x1442: 0x83f1, 0x1443: 0x8419, 0x1444: 0x84b9, 0x1445: 0x84e1,\n\t0x1446: 0x8509, 0x1447: 0x8531, 0x1448: 0x8559, 0x1449: 0x85d1, 0x144a: 0x85f9, 0x144b: 0x8621,\n\t0x144c: 0x8649, 0x144d: 0x8f89, 0x144e: 0x86c1, 0x144f: 0x86e9, 0x1450: 0x8711, 0x1451: 0x8739,\n\t0x1452: 0x87b1, 0x1453: 0x87d9, 0x1454: 0x8801, 0x1455: 0x8829, 0x1456: 0x8fb1, 0x1457: 0x88a1,\n\t0x1458: 0x88c9, 0x1459: 0x8fd9, 0x145a: 0x8941, 0x145b: 0x8969, 0x145c: 0x8991, 0x145d: 0x89b9,\n\t0x145e: 0x9001, 0x145f: 0x7c71, 0x1460: 0x8ee9, 0x1461: 0x7d39, 0x1462: 0x8f11, 0x1463: 0x7e29,\n\t0x1464: 0x8f39, 0x1465: 0x7ec9, 0x1466: 0x9029, 0x1467: 0x80d1, 0x1468: 0x9051, 0x1469: 0x9079,\n\t0x146a: 0x90a1, 0x146b: 0x8531, 0x146c: 0x8559, 0x146d: 0x8649, 0x146e: 0x8829, 0x146f: 0x8fb1,\n\t0x1470: 0x89b9, 0x1471: 0x9001, 0x1472: 0x90c9, 0x1473: 0x9101, 0x1474: 0x9139, 0x1475: 0x9171,\n\t0x1476: 0x9199, 0x1477: 0x91c1, 0x1478: 0x91e9, 0x1479: 0x9211, 0x147a: 0x9239, 0x147b: 0x9261,\n\t0x147c: 0x9289, 0x147d: 0x92b1, 0x147e: 0x92d9, 0x147f: 0x9301,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x9329, 0x1481: 0x9351, 0x1482: 0x9379, 0x1483: 0x93a1, 0x1484: 0x93c9, 0x1485: 0x93f1,\n\t0x1486: 0x9419, 0x1487: 0x9441, 0x1488: 0x9469, 0x1489: 0x9491, 0x148a: 0x94b9, 0x148b: 0x94e1,\n\t0x148c: 0x9079, 0x148d: 0x9509, 0x148e: 0x9531, 0x148f: 0x9559, 0x1490: 0x9581, 0x1491: 0x9171,\n\t0x1492: 0x9199, 0x1493: 0x91c1, 0x1494: 0x91e9, 0x1495: 0x9211, 0x1496: 0x9239, 0x1497: 0x9261,\n\t0x1498: 0x9289, 0x1499: 0x92b1, 0x149a: 0x92d9, 0x149b: 0x9301, 0x149c: 0x9329, 0x149d: 0x9351,\n\t0x149e: 0x9379, 0x149f: 0x93a1, 0x14a0: 0x93c9, 0x14a1: 0x93f1, 0x14a2: 0x9419, 0x14a3: 0x9441,\n\t0x14a4: 0x9469, 0x14a5: 0x9491, 0x14a6: 0x94b9, 0x14a7: 0x94e1, 0x14a8: 0x9079, 0x14a9: 0x9509,\n\t0x14aa: 0x9531, 0x14ab: 0x9559, 0x14ac: 0x9581, 0x14ad: 0x9491, 0x14ae: 0x94b9, 0x14af: 0x94e1,\n\t0x14b0: 0x9079, 0x14b1: 0x9051, 0x14b2: 0x90a1, 0x14b3: 0x8211, 0x14b4: 0x8059, 0x14b5: 0x8081,\n\t0x14b6: 0x80a9, 0x14b7: 0x9491, 0x14b8: 0x94b9, 0x14b9: 0x94e1, 0x14ba: 0x8211, 0x14bb: 0x8239,\n\t0x14bc: 0x95a9, 0x14bd: 0x95a9, 0x14be: 0x0018, 0x14bf: 0x0018,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0040, 0x14c1: 0x0040, 0x14c2: 0x0040, 0x14c3: 0x0040, 0x14c4: 0x0040, 0x14c5: 0x0040,\n\t0x14c6: 0x0040, 0x14c7: 0x0040, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040,\n\t0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x95d1, 0x14d1: 0x9609,\n\t0x14d2: 0x9609, 0x14d3: 0x9641, 0x14d4: 0x9679, 0x14d5: 0x96b1, 0x14d6: 0x96e9, 0x14d7: 0x9721,\n\t0x14d8: 0x9759, 0x14d9: 0x9759, 0x14da: 0x9791, 0x14db: 0x97c9, 0x14dc: 0x9801, 0x14dd: 0x9839,\n\t0x14de: 0x9871, 0x14df: 0x98a9, 0x14e0: 0x98a9, 0x14e1: 0x98e1, 0x14e2: 0x9919, 0x14e3: 0x9919,\n\t0x14e4: 0x9951, 0x14e5: 0x9951, 0x14e6: 0x9989, 0x14e7: 0x99c1, 0x14e8: 0x99c1, 0x14e9: 0x99f9,\n\t0x14ea: 0x9a31, 0x14eb: 0x9a31, 0x14ec: 0x9a69, 0x14ed: 0x9a69, 0x14ee: 0x9aa1, 0x14ef: 0x9ad9,\n\t0x14f0: 0x9ad9, 0x14f1: 0x9b11, 0x14f2: 0x9b11, 0x14f3: 0x9b49, 0x14f4: 0x9b81, 0x14f5: 0x9bb9,\n\t0x14f6: 0x9bf1, 0x14f7: 0x9bf1, 0x14f8: 0x9c29, 0x14f9: 0x9c61, 0x14fa: 0x9c99, 0x14fb: 0x9cd1,\n\t0x14fc: 0x9d09, 0x14fd: 0x9d09, 0x14fe: 0x9d41, 0x14ff: 0x9d79,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0xa949, 0x1501: 0xa981, 0x1502: 0xa9b9, 0x1503: 0xa8a1, 0x1504: 0x9bb9, 0x1505: 0x9989,\n\t0x1506: 0xa9f1, 0x1507: 0xaa29, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040,\n\t0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0040, 0x1510: 0x0040, 0x1511: 0x0040,\n\t0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040,\n\t0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,\n\t0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040,\n\t0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040,\n\t0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,\n\t0x1530: 0xaa61, 0x1531: 0xaa99, 0x1532: 0xaad1, 0x1533: 0xab19, 0x1534: 0xab61, 0x1535: 0xaba9,\n\t0x1536: 0xabf1, 0x1537: 0xac39, 0x1538: 0xac81, 0x1539: 0xacc9, 0x153a: 0xad02, 0x153b: 0xae12,\n\t0x153c: 0xae91, 0x153d: 0x0018, 0x153e: 0x0040, 0x153f: 0x0040,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0,\n\t0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0,\n\t0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0xaeda, 0x1551: 0x7d8d,\n\t0x1552: 0x0040, 0x1553: 0xaeea, 0x1554: 0x03c2, 0x1555: 0xaefa, 0x1556: 0xaf0a, 0x1557: 0x7dad,\n\t0x1558: 0x7dcd, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040,\n\t0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308,\n\t0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308,\n\t0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308,\n\t0x1570: 0x0040, 0x1571: 0x7ded, 0x1572: 0x7e0d, 0x1573: 0xaf1a, 0x1574: 0xaf1a, 0x1575: 0x1fd2,\n\t0x1576: 0x1fe2, 0x1577: 0xaf2a, 0x1578: 0xaf3a, 0x1579: 0x7e2d, 0x157a: 0x7e4d, 0x157b: 0x7e6d,\n\t0x157c: 0x7e2d, 0x157d: 0x7e8d, 0x157e: 0x7ead, 0x157f: 0x7e8d,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x7ecd, 0x1581: 0x7eed, 0x1582: 0x7f0d, 0x1583: 0x7eed, 0x1584: 0x7f2d, 0x1585: 0x0018,\n\t0x1586: 0x0018, 0x1587: 0xaf4a, 0x1588: 0xaf5a, 0x1589: 0x7f4e, 0x158a: 0x7f6e, 0x158b: 0x7f8e,\n\t0x158c: 0x7fae, 0x158d: 0xaf1a, 0x158e: 0xaf1a, 0x158f: 0xaf1a, 0x1590: 0xaeda, 0x1591: 0x7fcd,\n\t0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x03c2, 0x1595: 0xaeea, 0x1596: 0xaf0a, 0x1597: 0xaefa,\n\t0x1598: 0x7fed, 0x1599: 0x1fd2, 0x159a: 0x1fe2, 0x159b: 0xaf2a, 0x159c: 0xaf3a, 0x159d: 0x7ecd,\n\t0x159e: 0x7f2d, 0x159f: 0xaf6a, 0x15a0: 0xaf7a, 0x15a1: 0xaf8a, 0x15a2: 0x1fb2, 0x15a3: 0xaf99,\n\t0x15a4: 0xafaa, 0x15a5: 0xafba, 0x15a6: 0x1fc2, 0x15a7: 0x0040, 0x15a8: 0xafca, 0x15a9: 0xafda,\n\t0x15aa: 0xafea, 0x15ab: 0xaffa, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040,\n\t0x15b0: 0x800e, 0x15b1: 0xb009, 0x15b2: 0x802e, 0x15b3: 0x0808, 0x15b4: 0x804e, 0x15b5: 0x0040,\n\t0x15b6: 0x806e, 0x15b7: 0xb031, 0x15b8: 0x808e, 0x15b9: 0xb059, 0x15ba: 0x80ae, 0x15bb: 0xb081,\n\t0x15bc: 0x80ce, 0x15bd: 0xb0a9, 0x15be: 0x80ee, 0x15bf: 0xb0d1,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0xb0f9, 0x15c1: 0xb111, 0x15c2: 0xb111, 0x15c3: 0xb129, 0x15c4: 0xb129, 0x15c5: 0xb141,\n\t0x15c6: 0xb141, 0x15c7: 0xb159, 0x15c8: 0xb159, 0x15c9: 0xb171, 0x15ca: 0xb171, 0x15cb: 0xb171,\n\t0x15cc: 0xb171, 0x15cd: 0xb189, 0x15ce: 0xb189, 0x15cf: 0xb1a1, 0x15d0: 0xb1a1, 0x15d1: 0xb1a1,\n\t0x15d2: 0xb1a1, 0x15d3: 0xb1b9, 0x15d4: 0xb1b9, 0x15d5: 0xb1d1, 0x15d6: 0xb1d1, 0x15d7: 0xb1d1,\n\t0x15d8: 0xb1d1, 0x15d9: 0xb1e9, 0x15da: 0xb1e9, 0x15db: 0xb1e9, 0x15dc: 0xb1e9, 0x15dd: 0xb201,\n\t0x15de: 0xb201, 0x15df: 0xb201, 0x15e0: 0xb201, 0x15e1: 0xb219, 0x15e2: 0xb219, 0x15e3: 0xb219,\n\t0x15e4: 0xb219, 0x15e5: 0xb231, 0x15e6: 0xb231, 0x15e7: 0xb231, 0x15e8: 0xb231, 0x15e9: 0xb249,\n\t0x15ea: 0xb249, 0x15eb: 0xb261, 0x15ec: 0xb261, 0x15ed: 0xb279, 0x15ee: 0xb279, 0x15ef: 0xb291,\n\t0x15f0: 0xb291, 0x15f1: 0xb2a9, 0x15f2: 0xb2a9, 0x15f3: 0xb2a9, 0x15f4: 0xb2a9, 0x15f5: 0xb2c1,\n\t0x15f6: 0xb2c1, 0x15f7: 0xb2c1, 0x15f8: 0xb2c1, 0x15f9: 0xb2d9, 0x15fa: 0xb2d9, 0x15fb: 0xb2d9,\n\t0x15fc: 0xb2d9, 0x15fd: 0xb2f1, 0x15fe: 0xb2f1, 0x15ff: 0xb2f1,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0xb2f1, 0x1601: 0xb309, 0x1602: 0xb309, 0x1603: 0xb309, 0x1604: 0xb309, 0x1605: 0xb321,\n\t0x1606: 0xb321, 0x1607: 0xb321, 0x1608: 0xb321, 0x1609: 0xb339, 0x160a: 0xb339, 0x160b: 0xb339,\n\t0x160c: 0xb339, 0x160d: 0xb351, 0x160e: 0xb351, 0x160f: 0xb351, 0x1610: 0xb351, 0x1611: 0xb369,\n\t0x1612: 0xb369, 0x1613: 0xb369, 0x1614: 0xb369, 0x1615: 0xb381, 0x1616: 0xb381, 0x1617: 0xb381,\n\t0x1618: 0xb381, 0x1619: 0xb399, 0x161a: 0xb399, 0x161b: 0xb399, 0x161c: 0xb399, 0x161d: 0xb3b1,\n\t0x161e: 0xb3b1, 0x161f: 0xb3b1, 0x1620: 0xb3b1, 0x1621: 0xb3c9, 0x1622: 0xb3c9, 0x1623: 0xb3c9,\n\t0x1624: 0xb3c9, 0x1625: 0xb3e1, 0x1626: 0xb3e1, 0x1627: 0xb3e1, 0x1628: 0xb3e1, 0x1629: 0xb3f9,\n\t0x162a: 0xb3f9, 0x162b: 0xb3f9, 0x162c: 0xb3f9, 0x162d: 0xb411, 0x162e: 0xb411, 0x162f: 0x7ab1,\n\t0x1630: 0x7ab1, 0x1631: 0xb429, 0x1632: 0xb429, 0x1633: 0xb429, 0x1634: 0xb429, 0x1635: 0xb441,\n\t0x1636: 0xb441, 0x1637: 0xb469, 0x1638: 0xb469, 0x1639: 0xb491, 0x163a: 0xb491, 0x163b: 0xb4b9,\n\t0x163c: 0xb4b9, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0040, 0x1641: 0xaefa, 0x1642: 0xb4e2, 0x1643: 0xaf6a, 0x1644: 0xafda, 0x1645: 0xafea,\n\t0x1646: 0xaf7a, 0x1647: 0xb4f2, 0x1648: 0x1fd2, 0x1649: 0x1fe2, 0x164a: 0xaf8a, 0x164b: 0x1fb2,\n\t0x164c: 0xaeda, 0x164d: 0xaf99, 0x164e: 0x29d1, 0x164f: 0xb502, 0x1650: 0x1f41, 0x1651: 0x00c9,\n\t0x1652: 0x0069, 0x1653: 0x0079, 0x1654: 0x1f51, 0x1655: 0x1f61, 0x1656: 0x1f71, 0x1657: 0x1f81,\n\t0x1658: 0x1f91, 0x1659: 0x1fa1, 0x165a: 0xaeea, 0x165b: 0x03c2, 0x165c: 0xafaa, 0x165d: 0x1fc2,\n\t0x165e: 0xafba, 0x165f: 0xaf0a, 0x1660: 0xaffa, 0x1661: 0x0039, 0x1662: 0x0ee9, 0x1663: 0x1159,\n\t0x1664: 0x0ef9, 0x1665: 0x0f09, 0x1666: 0x1199, 0x1667: 0x0f31, 0x1668: 0x0249, 0x1669: 0x0f41,\n\t0x166a: 0x0259, 0x166b: 0x0f51, 0x166c: 0x0359, 0x166d: 0x0f61, 0x166e: 0x0f71, 0x166f: 0x00d9,\n\t0x1670: 0x0f99, 0x1671: 0x2039, 0x1672: 0x0269, 0x1673: 0x01d9, 0x1674: 0x0fa9, 0x1675: 0x0fb9,\n\t0x1676: 0x1089, 0x1677: 0x0279, 0x1678: 0x0369, 0x1679: 0x0289, 0x167a: 0x13d1, 0x167b: 0xaf4a,\n\t0x167c: 0xafca, 0x167d: 0xaf5a, 0x167e: 0xb512, 0x167f: 0xaf1a,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x1caa, 0x1681: 0x0039, 0x1682: 0x0ee9, 0x1683: 0x1159, 0x1684: 0x0ef9, 0x1685: 0x0f09,\n\t0x1686: 0x1199, 0x1687: 0x0f31, 0x1688: 0x0249, 0x1689: 0x0f41, 0x168a: 0x0259, 0x168b: 0x0f51,\n\t0x168c: 0x0359, 0x168d: 0x0f61, 0x168e: 0x0f71, 0x168f: 0x00d9, 0x1690: 0x0f99, 0x1691: 0x2039,\n\t0x1692: 0x0269, 0x1693: 0x01d9, 0x1694: 0x0fa9, 0x1695: 0x0fb9, 0x1696: 0x1089, 0x1697: 0x0279,\n\t0x1698: 0x0369, 0x1699: 0x0289, 0x169a: 0x13d1, 0x169b: 0xaf2a, 0x169c: 0xb522, 0x169d: 0xaf3a,\n\t0x169e: 0xb532, 0x169f: 0x810d, 0x16a0: 0x812d, 0x16a1: 0x29d1, 0x16a2: 0x814d, 0x16a3: 0x814d,\n\t0x16a4: 0x816d, 0x16a5: 0x818d, 0x16a6: 0x81ad, 0x16a7: 0x81cd, 0x16a8: 0x81ed, 0x16a9: 0x820d,\n\t0x16aa: 0x822d, 0x16ab: 0x824d, 0x16ac: 0x826d, 0x16ad: 0x828d, 0x16ae: 0x82ad, 0x16af: 0x82cd,\n\t0x16b0: 0x82ed, 0x16b1: 0x830d, 0x16b2: 0x832d, 0x16b3: 0x834d, 0x16b4: 0x836d, 0x16b5: 0x838d,\n\t0x16b6: 0x83ad, 0x16b7: 0x83cd, 0x16b8: 0x83ed, 0x16b9: 0x840d, 0x16ba: 0x842d, 0x16bb: 0x844d,\n\t0x16bc: 0x81ed, 0x16bd: 0x846d, 0x16be: 0x848d, 0x16bf: 0x824d,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x84ad, 0x16c1: 0x84cd, 0x16c2: 0x84ed, 0x16c3: 0x850d, 0x16c4: 0x852d, 0x16c5: 0x854d,\n\t0x16c6: 0x856d, 0x16c7: 0x858d, 0x16c8: 0x850d, 0x16c9: 0x85ad, 0x16ca: 0x850d, 0x16cb: 0x85cd,\n\t0x16cc: 0x85cd, 0x16cd: 0x85ed, 0x16ce: 0x85ed, 0x16cf: 0x860d, 0x16d0: 0x854d, 0x16d1: 0x862d,\n\t0x16d2: 0x864d, 0x16d3: 0x862d, 0x16d4: 0x866d, 0x16d5: 0x864d, 0x16d6: 0x868d, 0x16d7: 0x868d,\n\t0x16d8: 0x86ad, 0x16d9: 0x86ad, 0x16da: 0x86cd, 0x16db: 0x86cd, 0x16dc: 0x864d, 0x16dd: 0x814d,\n\t0x16de: 0x86ed, 0x16df: 0x870d, 0x16e0: 0x0040, 0x16e1: 0x872d, 0x16e2: 0x874d, 0x16e3: 0x876d,\n\t0x16e4: 0x878d, 0x16e5: 0x876d, 0x16e6: 0x87ad, 0x16e7: 0x87cd, 0x16e8: 0x87ed, 0x16e9: 0x87ed,\n\t0x16ea: 0x880d, 0x16eb: 0x880d, 0x16ec: 0x882d, 0x16ed: 0x882d, 0x16ee: 0x880d, 0x16ef: 0x880d,\n\t0x16f0: 0x884d, 0x16f1: 0x886d, 0x16f2: 0x888d, 0x16f3: 0x88ad, 0x16f4: 0x88cd, 0x16f5: 0x88ed,\n\t0x16f6: 0x88ed, 0x16f7: 0x88ed, 0x16f8: 0x890d, 0x16f9: 0x890d, 0x16fa: 0x890d, 0x16fb: 0x890d,\n\t0x16fc: 0x87ed, 0x16fd: 0x87ed, 0x16fe: 0x87ed, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x874d, 0x1703: 0x872d, 0x1704: 0x892d, 0x1705: 0x872d,\n\t0x1706: 0x874d, 0x1707: 0x872d, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x894d, 0x170b: 0x874d,\n\t0x170c: 0x896d, 0x170d: 0x892d, 0x170e: 0x896d, 0x170f: 0x874d, 0x1710: 0x0040, 0x1711: 0x0040,\n\t0x1712: 0x898d, 0x1713: 0x89ad, 0x1714: 0x88ad, 0x1715: 0x896d, 0x1716: 0x892d, 0x1717: 0x896d,\n\t0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x89cd, 0x171b: 0x89ed, 0x171c: 0x89cd, 0x171d: 0x0040,\n\t0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0xb541, 0x1721: 0xb559, 0x1722: 0xb571, 0x1723: 0x8a0e,\n\t0x1724: 0xb589, 0x1725: 0xb5a1, 0x1726: 0x8a2d, 0x1727: 0x0040, 0x1728: 0x8a4d, 0x1729: 0x8a6d,\n\t0x172a: 0x8a8d, 0x172b: 0x8a6d, 0x172c: 0x8aad, 0x172d: 0x8acd, 0x172e: 0x8aed, 0x172f: 0x0040,\n\t0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,\n\t0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x0a08, 0x1741: 0x0a08, 0x1742: 0x0a08, 0x1743: 0x0a08, 0x1744: 0x0a08, 0x1745: 0x0c08,\n\t0x1746: 0x0808, 0x1747: 0x0c08, 0x1748: 0x0818, 0x1749: 0x0c08, 0x174a: 0x0c08, 0x174b: 0x0808,\n\t0x174c: 0x0808, 0x174d: 0x0908, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0c08, 0x1751: 0x0c08,\n\t0x1752: 0x0c08, 0x1753: 0x0a08, 0x1754: 0x0a08, 0x1755: 0x0a08, 0x1756: 0x0a08, 0x1757: 0x0908,\n\t0x1758: 0x0a08, 0x1759: 0x0a08, 0x175a: 0x0a08, 0x175b: 0x0a08, 0x175c: 0x0a08, 0x175d: 0x0c08,\n\t0x175e: 0x0a08, 0x175f: 0x0a08, 0x1760: 0x0a08, 0x1761: 0x0c08, 0x1762: 0x0808, 0x1763: 0x0808,\n\t0x1764: 0x0c08, 0x1765: 0x3308, 0x1766: 0x3308, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040,\n\t0x176a: 0x0040, 0x176b: 0x0a18, 0x176c: 0x0a18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0c18,\n\t0x1770: 0x0818, 0x1771: 0x0818, 0x1772: 0x0818, 0x1773: 0x0818, 0x1774: 0x0818, 0x1775: 0x0818,\n\t0x1776: 0x0818, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040,\n\t0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x0a08, 0x1781: 0x0c08, 0x1782: 0x0a08, 0x1783: 0x0c08, 0x1784: 0x0c08, 0x1785: 0x0c08,\n\t0x1786: 0x0a08, 0x1787: 0x0a08, 0x1788: 0x0a08, 0x1789: 0x0c08, 0x178a: 0x0a08, 0x178b: 0x0a08,\n\t0x178c: 0x0c08, 0x178d: 0x0a08, 0x178e: 0x0c08, 0x178f: 0x0c08, 0x1790: 0x0a08, 0x1791: 0x0c08,\n\t0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x0040,\n\t0x1798: 0x0040, 0x1799: 0x0818, 0x179a: 0x0818, 0x179b: 0x0818, 0x179c: 0x0818, 0x179d: 0x0040,\n\t0x179e: 0x0040, 0x179f: 0x0040, 0x17a0: 0x0040, 0x17a1: 0x0040, 0x17a2: 0x0040, 0x17a3: 0x0040,\n\t0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x0040, 0x17a7: 0x0040, 0x17a8: 0x0040, 0x17a9: 0x0c18,\n\t0x17aa: 0x0c18, 0x17ab: 0x0c18, 0x17ac: 0x0c18, 0x17ad: 0x0a18, 0x17ae: 0x0a18, 0x17af: 0x0818,\n\t0x17b0: 0x0040, 0x17b1: 0x0040, 0x17b2: 0x0040, 0x17b3: 0x0040, 0x17b4: 0x0040, 0x17b5: 0x0040,\n\t0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040,\n\t0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x3308, 0x17c1: 0x3308, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x0040, 0x17c5: 0x0008,\n\t0x17c6: 0x0008, 0x17c7: 0x0008, 0x17c8: 0x0008, 0x17c9: 0x0008, 0x17ca: 0x0008, 0x17cb: 0x0008,\n\t0x17cc: 0x0008, 0x17cd: 0x0040, 0x17ce: 0x0040, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0040,\n\t0x17d2: 0x0040, 0x17d3: 0x0008, 0x17d4: 0x0008, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0008,\n\t0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008,\n\t0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008,\n\t0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0040,\n\t0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008,\n\t0x17f0: 0x0008, 0x17f1: 0x0040, 0x17f2: 0x0008, 0x17f3: 0x0008, 0x17f4: 0x0040, 0x17f5: 0x0008,\n\t0x17f6: 0x0008, 0x17f7: 0x0008, 0x17f8: 0x0008, 0x17f9: 0x0008, 0x17fa: 0x0040, 0x17fb: 0x3308,\n\t0x17fc: 0x3308, 0x17fd: 0x0008, 0x17fe: 0x3008, 0x17ff: 0x3008,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x3308, 0x1801: 0x3008, 0x1802: 0x3008, 0x1803: 0x3008, 0x1804: 0x3008, 0x1805: 0x0040,\n\t0x1806: 0x0040, 0x1807: 0x3008, 0x1808: 0x3008, 0x1809: 0x0040, 0x180a: 0x0040, 0x180b: 0x3008,\n\t0x180c: 0x3008, 0x180d: 0x3808, 0x180e: 0x0040, 0x180f: 0x0040, 0x1810: 0x0008, 0x1811: 0x0040,\n\t0x1812: 0x0040, 0x1813: 0x0040, 0x1814: 0x0040, 0x1815: 0x0040, 0x1816: 0x0040, 0x1817: 0x3008,\n\t0x1818: 0x0040, 0x1819: 0x0040, 0x181a: 0x0040, 0x181b: 0x0040, 0x181c: 0x0040, 0x181d: 0x0008,\n\t0x181e: 0x0008, 0x181f: 0x0008, 0x1820: 0x0008, 0x1821: 0x0008, 0x1822: 0x3008, 0x1823: 0x3008,\n\t0x1824: 0x0040, 0x1825: 0x0040, 0x1826: 0x3308, 0x1827: 0x3308, 0x1828: 0x3308, 0x1829: 0x3308,\n\t0x182a: 0x3308, 0x182b: 0x3308, 0x182c: 0x3308, 0x182d: 0x0040, 0x182e: 0x0040, 0x182f: 0x0040,\n\t0x1830: 0x3308, 0x1831: 0x3308, 0x1832: 0x3308, 0x1833: 0x3308, 0x1834: 0x3308, 0x1835: 0x0040,\n\t0x1836: 0x0040, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040,\n\t0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0039, 0x1841: 0x0ee9, 0x1842: 0x1159, 0x1843: 0x0ef9, 0x1844: 0x0f09, 0x1845: 0x1199,\n\t0x1846: 0x0f31, 0x1847: 0x0249, 0x1848: 0x0f41, 0x1849: 0x0259, 0x184a: 0x0f51, 0x184b: 0x0359,\n\t0x184c: 0x0f61, 0x184d: 0x0f71, 0x184e: 0x00d9, 0x184f: 0x0f99, 0x1850: 0x2039, 0x1851: 0x0269,\n\t0x1852: 0x01d9, 0x1853: 0x0fa9, 0x1854: 0x0fb9, 0x1855: 0x1089, 0x1856: 0x0279, 0x1857: 0x0369,\n\t0x1858: 0x0289, 0x1859: 0x13d1, 0x185a: 0x0039, 0x185b: 0x0ee9, 0x185c: 0x1159, 0x185d: 0x0ef9,\n\t0x185e: 0x0f09, 0x185f: 0x1199, 0x1860: 0x0f31, 0x1861: 0x0249, 0x1862: 0x0f41, 0x1863: 0x0259,\n\t0x1864: 0x0f51, 0x1865: 0x0359, 0x1866: 0x0f61, 0x1867: 0x0f71, 0x1868: 0x00d9, 0x1869: 0x0f99,\n\t0x186a: 0x2039, 0x186b: 0x0269, 0x186c: 0x01d9, 0x186d: 0x0fa9, 0x186e: 0x0fb9, 0x186f: 0x1089,\n\t0x1870: 0x0279, 0x1871: 0x0369, 0x1872: 0x0289, 0x1873: 0x13d1, 0x1874: 0x0039, 0x1875: 0x0ee9,\n\t0x1876: 0x1159, 0x1877: 0x0ef9, 0x1878: 0x0f09, 0x1879: 0x1199, 0x187a: 0x0f31, 0x187b: 0x0249,\n\t0x187c: 0x0f41, 0x187d: 0x0259, 0x187e: 0x0f51, 0x187f: 0x0359,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x0f61, 0x1881: 0x0f71, 0x1882: 0x00d9, 0x1883: 0x0f99, 0x1884: 0x2039, 0x1885: 0x0269,\n\t0x1886: 0x01d9, 0x1887: 0x0fa9, 0x1888: 0x0fb9, 0x1889: 0x1089, 0x188a: 0x0279, 0x188b: 0x0369,\n\t0x188c: 0x0289, 0x188d: 0x13d1, 0x188e: 0x0039, 0x188f: 0x0ee9, 0x1890: 0x1159, 0x1891: 0x0ef9,\n\t0x1892: 0x0f09, 0x1893: 0x1199, 0x1894: 0x0f31, 0x1895: 0x0040, 0x1896: 0x0f41, 0x1897: 0x0259,\n\t0x1898: 0x0f51, 0x1899: 0x0359, 0x189a: 0x0f61, 0x189b: 0x0f71, 0x189c: 0x00d9, 0x189d: 0x0f99,\n\t0x189e: 0x2039, 0x189f: 0x0269, 0x18a0: 0x01d9, 0x18a1: 0x0fa9, 0x18a2: 0x0fb9, 0x18a3: 0x1089,\n\t0x18a4: 0x0279, 0x18a5: 0x0369, 0x18a6: 0x0289, 0x18a7: 0x13d1, 0x18a8: 0x0039, 0x18a9: 0x0ee9,\n\t0x18aa: 0x1159, 0x18ab: 0x0ef9, 0x18ac: 0x0f09, 0x18ad: 0x1199, 0x18ae: 0x0f31, 0x18af: 0x0249,\n\t0x18b0: 0x0f41, 0x18b1: 0x0259, 0x18b2: 0x0f51, 0x18b3: 0x0359, 0x18b4: 0x0f61, 0x18b5: 0x0f71,\n\t0x18b6: 0x00d9, 0x18b7: 0x0f99, 0x18b8: 0x2039, 0x18b9: 0x0269, 0x18ba: 0x01d9, 0x18bb: 0x0fa9,\n\t0x18bc: 0x0fb9, 0x18bd: 0x1089, 0x18be: 0x0279, 0x18bf: 0x0369,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x0289, 0x18c1: 0x13d1, 0x18c2: 0x0039, 0x18c3: 0x0ee9, 0x18c4: 0x1159, 0x18c5: 0x0ef9,\n\t0x18c6: 0x0f09, 0x18c7: 0x1199, 0x18c8: 0x0f31, 0x18c9: 0x0249, 0x18ca: 0x0f41, 0x18cb: 0x0259,\n\t0x18cc: 0x0f51, 0x18cd: 0x0359, 0x18ce: 0x0f61, 0x18cf: 0x0f71, 0x18d0: 0x00d9, 0x18d1: 0x0f99,\n\t0x18d2: 0x2039, 0x18d3: 0x0269, 0x18d4: 0x01d9, 0x18d5: 0x0fa9, 0x18d6: 0x0fb9, 0x18d7: 0x1089,\n\t0x18d8: 0x0279, 0x18d9: 0x0369, 0x18da: 0x0289, 0x18db: 0x13d1, 0x18dc: 0x0039, 0x18dd: 0x0040,\n\t0x18de: 0x1159, 0x18df: 0x0ef9, 0x18e0: 0x0040, 0x18e1: 0x0040, 0x18e2: 0x0f31, 0x18e3: 0x0040,\n\t0x18e4: 0x0040, 0x18e5: 0x0259, 0x18e6: 0x0f51, 0x18e7: 0x0040, 0x18e8: 0x0040, 0x18e9: 0x0f71,\n\t0x18ea: 0x00d9, 0x18eb: 0x0f99, 0x18ec: 0x2039, 0x18ed: 0x0040, 0x18ee: 0x01d9, 0x18ef: 0x0fa9,\n\t0x18f0: 0x0fb9, 0x18f1: 0x1089, 0x18f2: 0x0279, 0x18f3: 0x0369, 0x18f4: 0x0289, 0x18f5: 0x13d1,\n\t0x18f6: 0x0039, 0x18f7: 0x0ee9, 0x18f8: 0x1159, 0x18f9: 0x0ef9, 0x18fa: 0x0040, 0x18fb: 0x1199,\n\t0x18fc: 0x0040, 0x18fd: 0x0249, 0x18fe: 0x0f41, 0x18ff: 0x0259,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x0f51, 0x1901: 0x0359, 0x1902: 0x0f61, 0x1903: 0x0f71, 0x1904: 0x0040, 0x1905: 0x0f99,\n\t0x1906: 0x2039, 0x1907: 0x0269, 0x1908: 0x01d9, 0x1909: 0x0fa9, 0x190a: 0x0fb9, 0x190b: 0x1089,\n\t0x190c: 0x0279, 0x190d: 0x0369, 0x190e: 0x0289, 0x190f: 0x13d1, 0x1910: 0x0039, 0x1911: 0x0ee9,\n\t0x1912: 0x1159, 0x1913: 0x0ef9, 0x1914: 0x0f09, 0x1915: 0x1199, 0x1916: 0x0f31, 0x1917: 0x0249,\n\t0x1918: 0x0f41, 0x1919: 0x0259, 0x191a: 0x0f51, 0x191b: 0x0359, 0x191c: 0x0f61, 0x191d: 0x0f71,\n\t0x191e: 0x00d9, 0x191f: 0x0f99, 0x1920: 0x2039, 0x1921: 0x0269, 0x1922: 0x01d9, 0x1923: 0x0fa9,\n\t0x1924: 0x0fb9, 0x1925: 0x1089, 0x1926: 0x0279, 0x1927: 0x0369, 0x1928: 0x0289, 0x1929: 0x13d1,\n\t0x192a: 0x0039, 0x192b: 0x0ee9, 0x192c: 0x1159, 0x192d: 0x0ef9, 0x192e: 0x0f09, 0x192f: 0x1199,\n\t0x1930: 0x0f31, 0x1931: 0x0249, 0x1932: 0x0f41, 0x1933: 0x0259, 0x1934: 0x0f51, 0x1935: 0x0359,\n\t0x1936: 0x0f61, 0x1937: 0x0f71, 0x1938: 0x00d9, 0x1939: 0x0f99, 0x193a: 0x2039, 0x193b: 0x0269,\n\t0x193c: 0x01d9, 0x193d: 0x0fa9, 0x193e: 0x0fb9, 0x193f: 0x1089,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0279, 0x1941: 0x0369, 0x1942: 0x0289, 0x1943: 0x13d1, 0x1944: 0x0039, 0x1945: 0x0ee9,\n\t0x1946: 0x0040, 0x1947: 0x0ef9, 0x1948: 0x0f09, 0x1949: 0x1199, 0x194a: 0x0f31, 0x194b: 0x0040,\n\t0x194c: 0x0040, 0x194d: 0x0259, 0x194e: 0x0f51, 0x194f: 0x0359, 0x1950: 0x0f61, 0x1951: 0x0f71,\n\t0x1952: 0x00d9, 0x1953: 0x0f99, 0x1954: 0x2039, 0x1955: 0x0040, 0x1956: 0x01d9, 0x1957: 0x0fa9,\n\t0x1958: 0x0fb9, 0x1959: 0x1089, 0x195a: 0x0279, 0x195b: 0x0369, 0x195c: 0x0289, 0x195d: 0x0040,\n\t0x195e: 0x0039, 0x195f: 0x0ee9, 0x1960: 0x1159, 0x1961: 0x0ef9, 0x1962: 0x0f09, 0x1963: 0x1199,\n\t0x1964: 0x0f31, 0x1965: 0x0249, 0x1966: 0x0f41, 0x1967: 0x0259, 0x1968: 0x0f51, 0x1969: 0x0359,\n\t0x196a: 0x0f61, 0x196b: 0x0f71, 0x196c: 0x00d9, 0x196d: 0x0f99, 0x196e: 0x2039, 0x196f: 0x0269,\n\t0x1970: 0x01d9, 0x1971: 0x0fa9, 0x1972: 0x0fb9, 0x1973: 0x1089, 0x1974: 0x0279, 0x1975: 0x0369,\n\t0x1976: 0x0289, 0x1977: 0x13d1, 0x1978: 0x0039, 0x1979: 0x0ee9, 0x197a: 0x0040, 0x197b: 0x0ef9,\n\t0x197c: 0x0f09, 0x197d: 0x1199, 0x197e: 0x0f31, 0x197f: 0x0040,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0f41, 0x1981: 0x0259, 0x1982: 0x0f51, 0x1983: 0x0359, 0x1984: 0x0f61, 0x1985: 0x0040,\n\t0x1986: 0x00d9, 0x1987: 0x0040, 0x1988: 0x0040, 0x1989: 0x0040, 0x198a: 0x01d9, 0x198b: 0x0fa9,\n\t0x198c: 0x0fb9, 0x198d: 0x1089, 0x198e: 0x0279, 0x198f: 0x0369, 0x1990: 0x0289, 0x1991: 0x0040,\n\t0x1992: 0x0039, 0x1993: 0x0ee9, 0x1994: 0x1159, 0x1995: 0x0ef9, 0x1996: 0x0f09, 0x1997: 0x1199,\n\t0x1998: 0x0f31, 0x1999: 0x0249, 0x199a: 0x0f41, 0x199b: 0x0259, 0x199c: 0x0f51, 0x199d: 0x0359,\n\t0x199e: 0x0f61, 0x199f: 0x0f71, 0x19a0: 0x00d9, 0x19a1: 0x0f99, 0x19a2: 0x2039, 0x19a3: 0x0269,\n\t0x19a4: 0x01d9, 0x19a5: 0x0fa9, 0x19a6: 0x0fb9, 0x19a7: 0x1089, 0x19a8: 0x0279, 0x19a9: 0x0369,\n\t0x19aa: 0x0289, 0x19ab: 0x13d1, 0x19ac: 0x0039, 0x19ad: 0x0ee9, 0x19ae: 0x1159, 0x19af: 0x0ef9,\n\t0x19b0: 0x0f09, 0x19b1: 0x1199, 0x19b2: 0x0f31, 0x19b3: 0x0249, 0x19b4: 0x0f41, 0x19b5: 0x0259,\n\t0x19b6: 0x0f51, 0x19b7: 0x0359, 0x19b8: 0x0f61, 0x19b9: 0x0f71, 0x19ba: 0x00d9, 0x19bb: 0x0f99,\n\t0x19bc: 0x2039, 0x19bd: 0x0269, 0x19be: 0x01d9, 0x19bf: 0x0fa9,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x0fb9, 0x19c1: 0x1089, 0x19c2: 0x0279, 0x19c3: 0x0369, 0x19c4: 0x0289, 0x19c5: 0x13d1,\n\t0x19c6: 0x0039, 0x19c7: 0x0ee9, 0x19c8: 0x1159, 0x19c9: 0x0ef9, 0x19ca: 0x0f09, 0x19cb: 0x1199,\n\t0x19cc: 0x0f31, 0x19cd: 0x0249, 0x19ce: 0x0f41, 0x19cf: 0x0259, 0x19d0: 0x0f51, 0x19d1: 0x0359,\n\t0x19d2: 0x0f61, 0x19d3: 0x0f71, 0x19d4: 0x00d9, 0x19d5: 0x0f99, 0x19d6: 0x2039, 0x19d7: 0x0269,\n\t0x19d8: 0x01d9, 0x19d9: 0x0fa9, 0x19da: 0x0fb9, 0x19db: 0x1089, 0x19dc: 0x0279, 0x19dd: 0x0369,\n\t0x19de: 0x0289, 0x19df: 0x13d1, 0x19e0: 0x0039, 0x19e1: 0x0ee9, 0x19e2: 0x1159, 0x19e3: 0x0ef9,\n\t0x19e4: 0x0f09, 0x19e5: 0x1199, 0x19e6: 0x0f31, 0x19e7: 0x0249, 0x19e8: 0x0f41, 0x19e9: 0x0259,\n\t0x19ea: 0x0f51, 0x19eb: 0x0359, 0x19ec: 0x0f61, 0x19ed: 0x0f71, 0x19ee: 0x00d9, 0x19ef: 0x0f99,\n\t0x19f0: 0x2039, 0x19f1: 0x0269, 0x19f2: 0x01d9, 0x19f3: 0x0fa9, 0x19f4: 0x0fb9, 0x19f5: 0x1089,\n\t0x19f6: 0x0279, 0x19f7: 0x0369, 0x19f8: 0x0289, 0x19f9: 0x13d1, 0x19fa: 0x0039, 0x19fb: 0x0ee9,\n\t0x19fc: 0x1159, 0x19fd: 0x0ef9, 0x19fe: 0x0f09, 0x19ff: 0x1199,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x0f31, 0x1a01: 0x0249, 0x1a02: 0x0f41, 0x1a03: 0x0259, 0x1a04: 0x0f51, 0x1a05: 0x0359,\n\t0x1a06: 0x0f61, 0x1a07: 0x0f71, 0x1a08: 0x00d9, 0x1a09: 0x0f99, 0x1a0a: 0x2039, 0x1a0b: 0x0269,\n\t0x1a0c: 0x01d9, 0x1a0d: 0x0fa9, 0x1a0e: 0x0fb9, 0x1a0f: 0x1089, 0x1a10: 0x0279, 0x1a11: 0x0369,\n\t0x1a12: 0x0289, 0x1a13: 0x13d1, 0x1a14: 0x0039, 0x1a15: 0x0ee9, 0x1a16: 0x1159, 0x1a17: 0x0ef9,\n\t0x1a18: 0x0f09, 0x1a19: 0x1199, 0x1a1a: 0x0f31, 0x1a1b: 0x0249, 0x1a1c: 0x0f41, 0x1a1d: 0x0259,\n\t0x1a1e: 0x0f51, 0x1a1f: 0x0359, 0x1a20: 0x0f61, 0x1a21: 0x0f71, 0x1a22: 0x00d9, 0x1a23: 0x0f99,\n\t0x1a24: 0x2039, 0x1a25: 0x0269, 0x1a26: 0x01d9, 0x1a27: 0x0fa9, 0x1a28: 0x0fb9, 0x1a29: 0x1089,\n\t0x1a2a: 0x0279, 0x1a2b: 0x0369, 0x1a2c: 0x0289, 0x1a2d: 0x13d1, 0x1a2e: 0x0039, 0x1a2f: 0x0ee9,\n\t0x1a30: 0x1159, 0x1a31: 0x0ef9, 0x1a32: 0x0f09, 0x1a33: 0x1199, 0x1a34: 0x0f31, 0x1a35: 0x0249,\n\t0x1a36: 0x0f41, 0x1a37: 0x0259, 0x1a38: 0x0f51, 0x1a39: 0x0359, 0x1a3a: 0x0f61, 0x1a3b: 0x0f71,\n\t0x1a3c: 0x00d9, 0x1a3d: 0x0f99, 0x1a3e: 0x2039, 0x1a3f: 0x0269,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x01d9, 0x1a41: 0x0fa9, 0x1a42: 0x0fb9, 0x1a43: 0x1089, 0x1a44: 0x0279, 0x1a45: 0x0369,\n\t0x1a46: 0x0289, 0x1a47: 0x13d1, 0x1a48: 0x0039, 0x1a49: 0x0ee9, 0x1a4a: 0x1159, 0x1a4b: 0x0ef9,\n\t0x1a4c: 0x0f09, 0x1a4d: 0x1199, 0x1a4e: 0x0f31, 0x1a4f: 0x0249, 0x1a50: 0x0f41, 0x1a51: 0x0259,\n\t0x1a52: 0x0f51, 0x1a53: 0x0359, 0x1a54: 0x0f61, 0x1a55: 0x0f71, 0x1a56: 0x00d9, 0x1a57: 0x0f99,\n\t0x1a58: 0x2039, 0x1a59: 0x0269, 0x1a5a: 0x01d9, 0x1a5b: 0x0fa9, 0x1a5c: 0x0fb9, 0x1a5d: 0x1089,\n\t0x1a5e: 0x0279, 0x1a5f: 0x0369, 0x1a60: 0x0289, 0x1a61: 0x13d1, 0x1a62: 0x0039, 0x1a63: 0x0ee9,\n\t0x1a64: 0x1159, 0x1a65: 0x0ef9, 0x1a66: 0x0f09, 0x1a67: 0x1199, 0x1a68: 0x0f31, 0x1a69: 0x0249,\n\t0x1a6a: 0x0f41, 0x1a6b: 0x0259, 0x1a6c: 0x0f51, 0x1a6d: 0x0359, 0x1a6e: 0x0f61, 0x1a6f: 0x0f71,\n\t0x1a70: 0x00d9, 0x1a71: 0x0f99, 0x1a72: 0x2039, 0x1a73: 0x0269, 0x1a74: 0x01d9, 0x1a75: 0x0fa9,\n\t0x1a76: 0x0fb9, 0x1a77: 0x1089, 0x1a78: 0x0279, 0x1a79: 0x0369, 0x1a7a: 0x0289, 0x1a7b: 0x13d1,\n\t0x1a7c: 0x0039, 0x1a7d: 0x0ee9, 0x1a7e: 0x1159, 0x1a7f: 0x0ef9,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x0f09, 0x1a81: 0x1199, 0x1a82: 0x0f31, 0x1a83: 0x0249, 0x1a84: 0x0f41, 0x1a85: 0x0259,\n\t0x1a86: 0x0f51, 0x1a87: 0x0359, 0x1a88: 0x0f61, 0x1a89: 0x0f71, 0x1a8a: 0x00d9, 0x1a8b: 0x0f99,\n\t0x1a8c: 0x2039, 0x1a8d: 0x0269, 0x1a8e: 0x01d9, 0x1a8f: 0x0fa9, 0x1a90: 0x0fb9, 0x1a91: 0x1089,\n\t0x1a92: 0x0279, 0x1a93: 0x0369, 0x1a94: 0x0289, 0x1a95: 0x13d1, 0x1a96: 0x0039, 0x1a97: 0x0ee9,\n\t0x1a98: 0x1159, 0x1a99: 0x0ef9, 0x1a9a: 0x0f09, 0x1a9b: 0x1199, 0x1a9c: 0x0f31, 0x1a9d: 0x0249,\n\t0x1a9e: 0x0f41, 0x1a9f: 0x0259, 0x1aa0: 0x0f51, 0x1aa1: 0x0359, 0x1aa2: 0x0f61, 0x1aa3: 0x0f71,\n\t0x1aa4: 0x00d9, 0x1aa5: 0x0f99, 0x1aa6: 0x2039, 0x1aa7: 0x0269, 0x1aa8: 0x01d9, 0x1aa9: 0x0fa9,\n\t0x1aaa: 0x0fb9, 0x1aab: 0x1089, 0x1aac: 0x0279, 0x1aad: 0x0369, 0x1aae: 0x0289, 0x1aaf: 0x13d1,\n\t0x1ab0: 0x0039, 0x1ab1: 0x0ee9, 0x1ab2: 0x1159, 0x1ab3: 0x0ef9, 0x1ab4: 0x0f09, 0x1ab5: 0x1199,\n\t0x1ab6: 0x0f31, 0x1ab7: 0x0249, 0x1ab8: 0x0f41, 0x1ab9: 0x0259, 0x1aba: 0x0f51, 0x1abb: 0x0359,\n\t0x1abc: 0x0f61, 0x1abd: 0x0f71, 0x1abe: 0x00d9, 0x1abf: 0x0f99,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x2039, 0x1ac1: 0x0269, 0x1ac2: 0x01d9, 0x1ac3: 0x0fa9, 0x1ac4: 0x0fb9, 0x1ac5: 0x1089,\n\t0x1ac6: 0x0279, 0x1ac7: 0x0369, 0x1ac8: 0x0289, 0x1ac9: 0x13d1, 0x1aca: 0x0039, 0x1acb: 0x0ee9,\n\t0x1acc: 0x1159, 0x1acd: 0x0ef9, 0x1ace: 0x0f09, 0x1acf: 0x1199, 0x1ad0: 0x0f31, 0x1ad1: 0x0249,\n\t0x1ad2: 0x0f41, 0x1ad3: 0x0259, 0x1ad4: 0x0f51, 0x1ad5: 0x0359, 0x1ad6: 0x0f61, 0x1ad7: 0x0f71,\n\t0x1ad8: 0x00d9, 0x1ad9: 0x0f99, 0x1ada: 0x2039, 0x1adb: 0x0269, 0x1adc: 0x01d9, 0x1add: 0x0fa9,\n\t0x1ade: 0x0fb9, 0x1adf: 0x1089, 0x1ae0: 0x0279, 0x1ae1: 0x0369, 0x1ae2: 0x0289, 0x1ae3: 0x13d1,\n\t0x1ae4: 0xba81, 0x1ae5: 0xba99, 0x1ae6: 0x0040, 0x1ae7: 0x0040, 0x1ae8: 0xbab1, 0x1ae9: 0x1099,\n\t0x1aea: 0x10b1, 0x1aeb: 0x10c9, 0x1aec: 0xbac9, 0x1aed: 0xbae1, 0x1aee: 0xbaf9, 0x1aef: 0x1429,\n\t0x1af0: 0x1a31, 0x1af1: 0xbb11, 0x1af2: 0xbb29, 0x1af3: 0xbb41, 0x1af4: 0xbb59, 0x1af5: 0xbb71,\n\t0x1af6: 0xbb89, 0x1af7: 0x2109, 0x1af8: 0x1111, 0x1af9: 0x1429, 0x1afa: 0xbba1, 0x1afb: 0xbbb9,\n\t0x1afc: 0xbbd1, 0x1afd: 0x10e1, 0x1afe: 0x10f9, 0x1aff: 0xbbe9,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x2079, 0x1b01: 0xbc01, 0x1b02: 0xbab1, 0x1b03: 0x1099, 0x1b04: 0x10b1, 0x1b05: 0x10c9,\n\t0x1b06: 0xbac9, 0x1b07: 0xbae1, 0x1b08: 0xbaf9, 0x1b09: 0x1429, 0x1b0a: 0x1a31, 0x1b0b: 0xbb11,\n\t0x1b0c: 0xbb29, 0x1b0d: 0xbb41, 0x1b0e: 0xbb59, 0x1b0f: 0xbb71, 0x1b10: 0xbb89, 0x1b11: 0x2109,\n\t0x1b12: 0x1111, 0x1b13: 0xbba1, 0x1b14: 0xbba1, 0x1b15: 0xbbb9, 0x1b16: 0xbbd1, 0x1b17: 0x10e1,\n\t0x1b18: 0x10f9, 0x1b19: 0xbbe9, 0x1b1a: 0x2079, 0x1b1b: 0xbc21, 0x1b1c: 0xbac9, 0x1b1d: 0x1429,\n\t0x1b1e: 0xbb11, 0x1b1f: 0x10e1, 0x1b20: 0x1111, 0x1b21: 0x2109, 0x1b22: 0xbab1, 0x1b23: 0x1099,\n\t0x1b24: 0x10b1, 0x1b25: 0x10c9, 0x1b26: 0xbac9, 0x1b27: 0xbae1, 0x1b28: 0xbaf9, 0x1b29: 0x1429,\n\t0x1b2a: 0x1a31, 0x1b2b: 0xbb11, 0x1b2c: 0xbb29, 0x1b2d: 0xbb41, 0x1b2e: 0xbb59, 0x1b2f: 0xbb71,\n\t0x1b30: 0xbb89, 0x1b31: 0x2109, 0x1b32: 0x1111, 0x1b33: 0x1429, 0x1b34: 0xbba1, 0x1b35: 0xbbb9,\n\t0x1b36: 0xbbd1, 0x1b37: 0x10e1, 0x1b38: 0x10f9, 0x1b39: 0xbbe9, 0x1b3a: 0x2079, 0x1b3b: 0xbc01,\n\t0x1b3c: 0xbab1, 0x1b3d: 0x1099, 0x1b3e: 0x10b1, 0x1b3f: 0x10c9,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0xbac9, 0x1b41: 0xbae1, 0x1b42: 0xbaf9, 0x1b43: 0x1429, 0x1b44: 0x1a31, 0x1b45: 0xbb11,\n\t0x1b46: 0xbb29, 0x1b47: 0xbb41, 0x1b48: 0xbb59, 0x1b49: 0xbb71, 0x1b4a: 0xbb89, 0x1b4b: 0x2109,\n\t0x1b4c: 0x1111, 0x1b4d: 0xbba1, 0x1b4e: 0xbba1, 0x1b4f: 0xbbb9, 0x1b50: 0xbbd1, 0x1b51: 0x10e1,\n\t0x1b52: 0x10f9, 0x1b53: 0xbbe9, 0x1b54: 0x2079, 0x1b55: 0xbc21, 0x1b56: 0xbac9, 0x1b57: 0x1429,\n\t0x1b58: 0xbb11, 0x1b59: 0x10e1, 0x1b5a: 0x1111, 0x1b5b: 0x2109, 0x1b5c: 0xbab1, 0x1b5d: 0x1099,\n\t0x1b5e: 0x10b1, 0x1b5f: 0x10c9, 0x1b60: 0xbac9, 0x1b61: 0xbae1, 0x1b62: 0xbaf9, 0x1b63: 0x1429,\n\t0x1b64: 0x1a31, 0x1b65: 0xbb11, 0x1b66: 0xbb29, 0x1b67: 0xbb41, 0x1b68: 0xbb59, 0x1b69: 0xbb71,\n\t0x1b6a: 0xbb89, 0x1b6b: 0x2109, 0x1b6c: 0x1111, 0x1b6d: 0x1429, 0x1b6e: 0xbba1, 0x1b6f: 0xbbb9,\n\t0x1b70: 0xbbd1, 0x1b71: 0x10e1, 0x1b72: 0x10f9, 0x1b73: 0xbbe9, 0x1b74: 0x2079, 0x1b75: 0xbc01,\n\t0x1b76: 0xbab1, 0x1b77: 0x1099, 0x1b78: 0x10b1, 0x1b79: 0x10c9, 0x1b7a: 0xbac9, 0x1b7b: 0xbae1,\n\t0x1b7c: 0xbaf9, 0x1b7d: 0x1429, 0x1b7e: 0x1a31, 0x1b7f: 0xbb11,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0xbb29, 0x1b81: 0xbb41, 0x1b82: 0xbb59, 0x1b83: 0xbb71, 0x1b84: 0xbb89, 0x1b85: 0x2109,\n\t0x1b86: 0x1111, 0x1b87: 0xbba1, 0x1b88: 0xbba1, 0x1b89: 0xbbb9, 0x1b8a: 0xbbd1, 0x1b8b: 0x10e1,\n\t0x1b8c: 0x10f9, 0x1b8d: 0xbbe9, 0x1b8e: 0x2079, 0x1b8f: 0xbc21, 0x1b90: 0xbac9, 0x1b91: 0x1429,\n\t0x1b92: 0xbb11, 0x1b93: 0x10e1, 0x1b94: 0x1111, 0x1b95: 0x2109, 0x1b96: 0xbab1, 0x1b97: 0x1099,\n\t0x1b98: 0x10b1, 0x1b99: 0x10c9, 0x1b9a: 0xbac9, 0x1b9b: 0xbae1, 0x1b9c: 0xbaf9, 0x1b9d: 0x1429,\n\t0x1b9e: 0x1a31, 0x1b9f: 0xbb11, 0x1ba0: 0xbb29, 0x1ba1: 0xbb41, 0x1ba2: 0xbb59, 0x1ba3: 0xbb71,\n\t0x1ba4: 0xbb89, 0x1ba5: 0x2109, 0x1ba6: 0x1111, 0x1ba7: 0x1429, 0x1ba8: 0xbba1, 0x1ba9: 0xbbb9,\n\t0x1baa: 0xbbd1, 0x1bab: 0x10e1, 0x1bac: 0x10f9, 0x1bad: 0xbbe9, 0x1bae: 0x2079, 0x1baf: 0xbc01,\n\t0x1bb0: 0xbab1, 0x1bb1: 0x1099, 0x1bb2: 0x10b1, 0x1bb3: 0x10c9, 0x1bb4: 0xbac9, 0x1bb5: 0xbae1,\n\t0x1bb6: 0xbaf9, 0x1bb7: 0x1429, 0x1bb8: 0x1a31, 0x1bb9: 0xbb11, 0x1bba: 0xbb29, 0x1bbb: 0xbb41,\n\t0x1bbc: 0xbb59, 0x1bbd: 0xbb71, 0x1bbe: 0xbb89, 0x1bbf: 0x2109,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x1111, 0x1bc1: 0xbba1, 0x1bc2: 0xbba1, 0x1bc3: 0xbbb9, 0x1bc4: 0xbbd1, 0x1bc5: 0x10e1,\n\t0x1bc6: 0x10f9, 0x1bc7: 0xbbe9, 0x1bc8: 0x2079, 0x1bc9: 0xbc21, 0x1bca: 0xbac9, 0x1bcb: 0x1429,\n\t0x1bcc: 0xbb11, 0x1bcd: 0x10e1, 0x1bce: 0x1111, 0x1bcf: 0x2109, 0x1bd0: 0xbab1, 0x1bd1: 0x1099,\n\t0x1bd2: 0x10b1, 0x1bd3: 0x10c9, 0x1bd4: 0xbac9, 0x1bd5: 0xbae1, 0x1bd6: 0xbaf9, 0x1bd7: 0x1429,\n\t0x1bd8: 0x1a31, 0x1bd9: 0xbb11, 0x1bda: 0xbb29, 0x1bdb: 0xbb41, 0x1bdc: 0xbb59, 0x1bdd: 0xbb71,\n\t0x1bde: 0xbb89, 0x1bdf: 0x2109, 0x1be0: 0x1111, 0x1be1: 0x1429, 0x1be2: 0xbba1, 0x1be3: 0xbbb9,\n\t0x1be4: 0xbbd1, 0x1be5: 0x10e1, 0x1be6: 0x10f9, 0x1be7: 0xbbe9, 0x1be8: 0x2079, 0x1be9: 0xbc01,\n\t0x1bea: 0xbab1, 0x1beb: 0x1099, 0x1bec: 0x10b1, 0x1bed: 0x10c9, 0x1bee: 0xbac9, 0x1bef: 0xbae1,\n\t0x1bf0: 0xbaf9, 0x1bf1: 0x1429, 0x1bf2: 0x1a31, 0x1bf3: 0xbb11, 0x1bf4: 0xbb29, 0x1bf5: 0xbb41,\n\t0x1bf6: 0xbb59, 0x1bf7: 0xbb71, 0x1bf8: 0xbb89, 0x1bf9: 0x2109, 0x1bfa: 0x1111, 0x1bfb: 0xbba1,\n\t0x1bfc: 0xbba1, 0x1bfd: 0xbbb9, 0x1bfe: 0xbbd1, 0x1bff: 0x10e1,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0x10f9, 0x1c01: 0xbbe9, 0x1c02: 0x2079, 0x1c03: 0xbc21, 0x1c04: 0xbac9, 0x1c05: 0x1429,\n\t0x1c06: 0xbb11, 0x1c07: 0x10e1, 0x1c08: 0x1111, 0x1c09: 0x2109, 0x1c0a: 0xbc41, 0x1c0b: 0xbc41,\n\t0x1c0c: 0x0040, 0x1c0d: 0x0040, 0x1c0e: 0x1f41, 0x1c0f: 0x00c9, 0x1c10: 0x0069, 0x1c11: 0x0079,\n\t0x1c12: 0x1f51, 0x1c13: 0x1f61, 0x1c14: 0x1f71, 0x1c15: 0x1f81, 0x1c16: 0x1f91, 0x1c17: 0x1fa1,\n\t0x1c18: 0x1f41, 0x1c19: 0x00c9, 0x1c1a: 0x0069, 0x1c1b: 0x0079, 0x1c1c: 0x1f51, 0x1c1d: 0x1f61,\n\t0x1c1e: 0x1f71, 0x1c1f: 0x1f81, 0x1c20: 0x1f91, 0x1c21: 0x1fa1, 0x1c22: 0x1f41, 0x1c23: 0x00c9,\n\t0x1c24: 0x0069, 0x1c25: 0x0079, 0x1c26: 0x1f51, 0x1c27: 0x1f61, 0x1c28: 0x1f71, 0x1c29: 0x1f81,\n\t0x1c2a: 0x1f91, 0x1c2b: 0x1fa1, 0x1c2c: 0x1f41, 0x1c2d: 0x00c9, 0x1c2e: 0x0069, 0x1c2f: 0x0079,\n\t0x1c30: 0x1f51, 0x1c31: 0x1f61, 0x1c32: 0x1f71, 0x1c33: 0x1f81, 0x1c34: 0x1f91, 0x1c35: 0x1fa1,\n\t0x1c36: 0x1f41, 0x1c37: 0x00c9, 0x1c38: 0x0069, 0x1c39: 0x0079, 0x1c3a: 0x1f51, 0x1c3b: 0x1f61,\n\t0x1c3c: 0x1f71, 0x1c3d: 0x1f81, 0x1c3e: 0x1f91, 0x1c3f: 0x1fa1,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0xe115, 0x1c41: 0xe115, 0x1c42: 0xe135, 0x1c43: 0xe135, 0x1c44: 0xe115, 0x1c45: 0xe115,\n\t0x1c46: 0xe175, 0x1c47: 0xe175, 0x1c48: 0xe115, 0x1c49: 0xe115, 0x1c4a: 0xe135, 0x1c4b: 0xe135,\n\t0x1c4c: 0xe115, 0x1c4d: 0xe115, 0x1c4e: 0xe1f5, 0x1c4f: 0xe1f5, 0x1c50: 0xe115, 0x1c51: 0xe115,\n\t0x1c52: 0xe135, 0x1c53: 0xe135, 0x1c54: 0xe115, 0x1c55: 0xe115, 0x1c56: 0xe175, 0x1c57: 0xe175,\n\t0x1c58: 0xe115, 0x1c59: 0xe115, 0x1c5a: 0xe135, 0x1c5b: 0xe135, 0x1c5c: 0xe115, 0x1c5d: 0xe115,\n\t0x1c5e: 0x8b3d, 0x1c5f: 0x8b3d, 0x1c60: 0x04b5, 0x1c61: 0x04b5, 0x1c62: 0x0a08, 0x1c63: 0x0a08,\n\t0x1c64: 0x0a08, 0x1c65: 0x0a08, 0x1c66: 0x0a08, 0x1c67: 0x0a08, 0x1c68: 0x0a08, 0x1c69: 0x0a08,\n\t0x1c6a: 0x0a08, 0x1c6b: 0x0a08, 0x1c6c: 0x0a08, 0x1c6d: 0x0a08, 0x1c6e: 0x0a08, 0x1c6f: 0x0a08,\n\t0x1c70: 0x0a08, 0x1c71: 0x0a08, 0x1c72: 0x0a08, 0x1c73: 0x0a08, 0x1c74: 0x0a08, 0x1c75: 0x0a08,\n\t0x1c76: 0x0a08, 0x1c77: 0x0a08, 0x1c78: 0x0a08, 0x1c79: 0x0a08, 0x1c7a: 0x0a08, 0x1c7b: 0x0a08,\n\t0x1c7c: 0x0a08, 0x1c7d: 0x0a08, 0x1c7e: 0x0a08, 0x1c7f: 0x0a08,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0x0040, 0x1c85: 0xb411,\n\t0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0xb399, 0x1c8b: 0xb3b1,\n\t0x1c8c: 0xb3c9, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0xb369, 0x1c91: 0xb2d9,\n\t0x1c92: 0xb381, 0x1c93: 0xb279, 0x1c94: 0xb2c1, 0x1c95: 0xb1d1, 0x1c96: 0xb1e9, 0x1c97: 0xb231,\n\t0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0xbc59, 0x1c9d: 0x7949,\n\t0x1c9e: 0xbc71, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040,\n\t0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0x0040, 0x1ca9: 0xb429,\n\t0x1caa: 0xb399, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339,\n\t0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1,\n\t0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0x0040, 0x1cbb: 0xb351,\n\t0x1cbc: 0x0040, 0x1cbd: 0x0040, 0x1cbe: 0x0040, 0x1cbf: 0x0040,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x0040, 0x1cc1: 0x0040, 0x1cc2: 0xb201, 0x1cc3: 0x0040, 0x1cc4: 0x0040, 0x1cc5: 0x0040,\n\t0x1cc6: 0x0040, 0x1cc7: 0xb219, 0x1cc8: 0x0040, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1,\n\t0x1ccc: 0x0040, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0x0040, 0x1cd1: 0xb2d9,\n\t0x1cd2: 0xb381, 0x1cd3: 0x0040, 0x1cd4: 0xb2c1, 0x1cd5: 0x0040, 0x1cd6: 0x0040, 0x1cd7: 0xb231,\n\t0x1cd8: 0x0040, 0x1cd9: 0xb2f1, 0x1cda: 0x0040, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x7949,\n\t0x1cde: 0x0040, 0x1cdf: 0xbc89, 0x1ce0: 0x0040, 0x1ce1: 0xb1a1, 0x1ce2: 0xb201, 0x1ce3: 0x0040,\n\t0x1ce4: 0xb3f9, 0x1ce5: 0x0040, 0x1ce6: 0x0040, 0x1ce7: 0xb219, 0x1ce8: 0xb309, 0x1ce9: 0xb429,\n\t0x1cea: 0xb399, 0x1ceb: 0x0040, 0x1cec: 0xb3c9, 0x1ced: 0xb3e1, 0x1cee: 0xb2a9, 0x1cef: 0xb339,\n\t0x1cf0: 0xb369, 0x1cf1: 0xb2d9, 0x1cf2: 0xb381, 0x1cf3: 0x0040, 0x1cf4: 0xb2c1, 0x1cf5: 0xb1d1,\n\t0x1cf6: 0xb1e9, 0x1cf7: 0xb231, 0x1cf8: 0x0040, 0x1cf9: 0xb2f1, 0x1cfa: 0xb321, 0x1cfb: 0xb351,\n\t0x1cfc: 0xbc59, 0x1cfd: 0x0040, 0x1cfe: 0xbc71, 0x1cff: 0x0040,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0xb189, 0x1d01: 0xb1a1, 0x1d02: 0xb201, 0x1d03: 0xb249, 0x1d04: 0xb3f9, 0x1d05: 0xb411,\n\t0x1d06: 0xb291, 0x1d07: 0xb219, 0x1d08: 0xb309, 0x1d09: 0xb429, 0x1d0a: 0x0040, 0x1d0b: 0xb3b1,\n\t0x1d0c: 0xb3c9, 0x1d0d: 0xb3e1, 0x1d0e: 0xb2a9, 0x1d0f: 0xb339, 0x1d10: 0xb369, 0x1d11: 0xb2d9,\n\t0x1d12: 0xb381, 0x1d13: 0xb279, 0x1d14: 0xb2c1, 0x1d15: 0xb1d1, 0x1d16: 0xb1e9, 0x1d17: 0xb231,\n\t0x1d18: 0xb261, 0x1d19: 0xb2f1, 0x1d1a: 0xb321, 0x1d1b: 0xb351, 0x1d1c: 0x0040, 0x1d1d: 0x0040,\n\t0x1d1e: 0x0040, 0x1d1f: 0x0040, 0x1d20: 0x0040, 0x1d21: 0xb1a1, 0x1d22: 0xb201, 0x1d23: 0xb249,\n\t0x1d24: 0x0040, 0x1d25: 0xb411, 0x1d26: 0xb291, 0x1d27: 0xb219, 0x1d28: 0xb309, 0x1d29: 0xb429,\n\t0x1d2a: 0x0040, 0x1d2b: 0xb3b1, 0x1d2c: 0xb3c9, 0x1d2d: 0xb3e1, 0x1d2e: 0xb2a9, 0x1d2f: 0xb339,\n\t0x1d30: 0xb369, 0x1d31: 0xb2d9, 0x1d32: 0xb381, 0x1d33: 0xb279, 0x1d34: 0xb2c1, 0x1d35: 0xb1d1,\n\t0x1d36: 0xb1e9, 0x1d37: 0xb231, 0x1d38: 0xb261, 0x1d39: 0xb2f1, 0x1d3a: 0xb321, 0x1d3b: 0xb351,\n\t0x1d3c: 0x0040, 0x1d3d: 0x0040, 0x1d3e: 0x0040, 0x1d3f: 0x0040,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x0040, 0x1d41: 0xbca2, 0x1d42: 0xbcba, 0x1d43: 0xbcd2, 0x1d44: 0xbcea, 0x1d45: 0xbd02,\n\t0x1d46: 0xbd1a, 0x1d47: 0xbd32, 0x1d48: 0xbd4a, 0x1d49: 0xbd62, 0x1d4a: 0xbd7a, 0x1d4b: 0x0018,\n\t0x1d4c: 0x0018, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xbd92, 0x1d51: 0xbdb2,\n\t0x1d52: 0xbdd2, 0x1d53: 0xbdf2, 0x1d54: 0xbe12, 0x1d55: 0xbe32, 0x1d56: 0xbe52, 0x1d57: 0xbe72,\n\t0x1d58: 0xbe92, 0x1d59: 0xbeb2, 0x1d5a: 0xbed2, 0x1d5b: 0xbef2, 0x1d5c: 0xbf12, 0x1d5d: 0xbf32,\n\t0x1d5e: 0xbf52, 0x1d5f: 0xbf72, 0x1d60: 0xbf92, 0x1d61: 0xbfb2, 0x1d62: 0xbfd2, 0x1d63: 0xbff2,\n\t0x1d64: 0xc012, 0x1d65: 0xc032, 0x1d66: 0xc052, 0x1d67: 0xc072, 0x1d68: 0xc092, 0x1d69: 0xc0b2,\n\t0x1d6a: 0xc0d1, 0x1d6b: 0x1159, 0x1d6c: 0x0269, 0x1d6d: 0x6671, 0x1d6e: 0xc111, 0x1d6f: 0x0018,\n\t0x1d70: 0x0039, 0x1d71: 0x0ee9, 0x1d72: 0x1159, 0x1d73: 0x0ef9, 0x1d74: 0x0f09, 0x1d75: 0x1199,\n\t0x1d76: 0x0f31, 0x1d77: 0x0249, 0x1d78: 0x0f41, 0x1d79: 0x0259, 0x1d7a: 0x0f51, 0x1d7b: 0x0359,\n\t0x1d7c: 0x0f61, 0x1d7d: 0x0f71, 0x1d7e: 0x00d9, 0x1d7f: 0x0f99,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x2039, 0x1d81: 0x0269, 0x1d82: 0x01d9, 0x1d83: 0x0fa9, 0x1d84: 0x0fb9, 0x1d85: 0x1089,\n\t0x1d86: 0x0279, 0x1d87: 0x0369, 0x1d88: 0x0289, 0x1d89: 0x13d1, 0x1d8a: 0xc129, 0x1d8b: 0x65b1,\n\t0x1d8c: 0xc141, 0x1d8d: 0x1441, 0x1d8e: 0xc159, 0x1d8f: 0xc179, 0x1d90: 0x0018, 0x1d91: 0x0018,\n\t0x1d92: 0x0018, 0x1d93: 0x0018, 0x1d94: 0x0018, 0x1d95: 0x0018, 0x1d96: 0x0018, 0x1d97: 0x0018,\n\t0x1d98: 0x0018, 0x1d99: 0x0018, 0x1d9a: 0x0018, 0x1d9b: 0x0018, 0x1d9c: 0x0018, 0x1d9d: 0x0018,\n\t0x1d9e: 0x0018, 0x1d9f: 0x0018, 0x1da0: 0x0018, 0x1da1: 0x0018, 0x1da2: 0x0018, 0x1da3: 0x0018,\n\t0x1da4: 0x0018, 0x1da5: 0x0018, 0x1da6: 0x0018, 0x1da7: 0x0018, 0x1da8: 0x0018, 0x1da9: 0x0018,\n\t0x1daa: 0xc191, 0x1dab: 0xc1a9, 0x1dac: 0xc1c1, 0x1dad: 0x0040, 0x1dae: 0x0040, 0x1daf: 0x0040,\n\t0x1db0: 0x0018, 0x1db1: 0x0018, 0x1db2: 0x0018, 0x1db3: 0x0018, 0x1db4: 0x0018, 0x1db5: 0x0018,\n\t0x1db6: 0x0018, 0x1db7: 0x0018, 0x1db8: 0x0018, 0x1db9: 0x0018, 0x1dba: 0x0018, 0x1dbb: 0x0018,\n\t0x1dbc: 0x0018, 0x1dbd: 0x0018, 0x1dbe: 0x0018, 0x1dbf: 0x0018,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0xc1f1, 0x1dc1: 0xc229, 0x1dc2: 0xc261, 0x1dc3: 0x0040, 0x1dc4: 0x0040, 0x1dc5: 0x0040,\n\t0x1dc6: 0x0040, 0x1dc7: 0x0040, 0x1dc8: 0x0040, 0x1dc9: 0x0040, 0x1dca: 0x0040, 0x1dcb: 0x0040,\n\t0x1dcc: 0x0040, 0x1dcd: 0x0040, 0x1dce: 0x0040, 0x1dcf: 0x0040, 0x1dd0: 0xc281, 0x1dd1: 0xc2a1,\n\t0x1dd2: 0xc2c1, 0x1dd3: 0xc2e1, 0x1dd4: 0xc301, 0x1dd5: 0xc321, 0x1dd6: 0xc341, 0x1dd7: 0xc361,\n\t0x1dd8: 0xc381, 0x1dd9: 0xc3a1, 0x1dda: 0xc3c1, 0x1ddb: 0xc3e1, 0x1ddc: 0xc401, 0x1ddd: 0xc421,\n\t0x1dde: 0xc441, 0x1ddf: 0xc461, 0x1de0: 0xc481, 0x1de1: 0xc4a1, 0x1de2: 0xc4c1, 0x1de3: 0xc4e1,\n\t0x1de4: 0xc501, 0x1de5: 0xc521, 0x1de6: 0xc541, 0x1de7: 0xc561, 0x1de8: 0xc581, 0x1de9: 0xc5a1,\n\t0x1dea: 0xc5c1, 0x1deb: 0xc5e1, 0x1dec: 0xc601, 0x1ded: 0xc621, 0x1dee: 0xc641, 0x1def: 0xc661,\n\t0x1df0: 0xc681, 0x1df1: 0xc6a1, 0x1df2: 0xc6c1, 0x1df3: 0xc6e1, 0x1df4: 0xc701, 0x1df5: 0xc721,\n\t0x1df6: 0xc741, 0x1df7: 0xc761, 0x1df8: 0xc781, 0x1df9: 0xc7a1, 0x1dfa: 0xc7c1, 0x1dfb: 0xc7e1,\n\t0x1dfc: 0x0040, 0x1dfd: 0x0040, 0x1dfe: 0x0040, 0x1dff: 0x0040,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0xcb11, 0x1e01: 0xcb31, 0x1e02: 0xcb51, 0x1e03: 0x8b55, 0x1e04: 0xcb71, 0x1e05: 0xcb91,\n\t0x1e06: 0xcbb1, 0x1e07: 0xcbd1, 0x1e08: 0xcbf1, 0x1e09: 0xcc11, 0x1e0a: 0xcc31, 0x1e0b: 0xcc51,\n\t0x1e0c: 0xcc71, 0x1e0d: 0x8b75, 0x1e0e: 0xcc91, 0x1e0f: 0xccb1, 0x1e10: 0xccd1, 0x1e11: 0xccf1,\n\t0x1e12: 0x8b95, 0x1e13: 0xcd11, 0x1e14: 0xcd31, 0x1e15: 0xc441, 0x1e16: 0x8bb5, 0x1e17: 0xcd51,\n\t0x1e18: 0xcd71, 0x1e19: 0xcd91, 0x1e1a: 0xcdb1, 0x1e1b: 0xcdd1, 0x1e1c: 0x8bd5, 0x1e1d: 0xcdf1,\n\t0x1e1e: 0xce11, 0x1e1f: 0xce31, 0x1e20: 0xce51, 0x1e21: 0xce71, 0x1e22: 0xc7a1, 0x1e23: 0xce91,\n\t0x1e24: 0xceb1, 0x1e25: 0xced1, 0x1e26: 0xcef1, 0x1e27: 0xcf11, 0x1e28: 0xcf31, 0x1e29: 0xcf51,\n\t0x1e2a: 0xcf71, 0x1e2b: 0xcf91, 0x1e2c: 0xcfb1, 0x1e2d: 0xcfd1, 0x1e2e: 0xcff1, 0x1e2f: 0xd011,\n\t0x1e30: 0xd031, 0x1e31: 0xd051, 0x1e32: 0xd051, 0x1e33: 0xd051, 0x1e34: 0x8bf5, 0x1e35: 0xd071,\n\t0x1e36: 0xd091, 0x1e37: 0xd0b1, 0x1e38: 0x8c15, 0x1e39: 0xd0d1, 0x1e3a: 0xd0f1, 0x1e3b: 0xd111,\n\t0x1e3c: 0xd131, 0x1e3d: 0xd151, 0x1e3e: 0xd171, 0x1e3f: 0xd191,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0xd1b1, 0x1e41: 0xd1d1, 0x1e42: 0xd1f1, 0x1e43: 0xd211, 0x1e44: 0xd231, 0x1e45: 0xd251,\n\t0x1e46: 0xd251, 0x1e47: 0xd271, 0x1e48: 0xd291, 0x1e49: 0xd2b1, 0x1e4a: 0xd2d1, 0x1e4b: 0xd2f1,\n\t0x1e4c: 0xd311, 0x1e4d: 0xd331, 0x1e4e: 0xd351, 0x1e4f: 0xd371, 0x1e50: 0xd391, 0x1e51: 0xd3b1,\n\t0x1e52: 0xd3d1, 0x1e53: 0xd3f1, 0x1e54: 0xd411, 0x1e55: 0xd431, 0x1e56: 0xd451, 0x1e57: 0xd471,\n\t0x1e58: 0xd491, 0x1e59: 0x8c35, 0x1e5a: 0xd4b1, 0x1e5b: 0xd4d1, 0x1e5c: 0xd4f1, 0x1e5d: 0xc321,\n\t0x1e5e: 0xd511, 0x1e5f: 0xd531, 0x1e60: 0x8c55, 0x1e61: 0x8c75, 0x1e62: 0xd551, 0x1e63: 0xd571,\n\t0x1e64: 0xd591, 0x1e65: 0xd5b1, 0x1e66: 0xd5d1, 0x1e67: 0xd5f1, 0x1e68: 0x2040, 0x1e69: 0xd611,\n\t0x1e6a: 0xd631, 0x1e6b: 0xd631, 0x1e6c: 0x8c95, 0x1e6d: 0xd651, 0x1e6e: 0xd671, 0x1e6f: 0xd691,\n\t0x1e70: 0xd6b1, 0x1e71: 0x8cb5, 0x1e72: 0xd6d1, 0x1e73: 0xd6f1, 0x1e74: 0x2040, 0x1e75: 0xd711,\n\t0x1e76: 0xd731, 0x1e77: 0xd751, 0x1e78: 0xd771, 0x1e79: 0xd791, 0x1e7a: 0xd7b1, 0x1e7b: 0x8cd5,\n\t0x1e7c: 0xd7d1, 0x1e7d: 0x8cf5, 0x1e7e: 0xd7f1, 0x1e7f: 0xd811,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0xd831, 0x1e81: 0xd851, 0x1e82: 0xd871, 0x1e83: 0xd891, 0x1e84: 0xd8b1, 0x1e85: 0xd8d1,\n\t0x1e86: 0xd8f1, 0x1e87: 0xd911, 0x1e88: 0xd931, 0x1e89: 0x8d15, 0x1e8a: 0xd951, 0x1e8b: 0xd971,\n\t0x1e8c: 0xd991, 0x1e8d: 0xd9b1, 0x1e8e: 0xd9d1, 0x1e8f: 0x8d35, 0x1e90: 0xd9f1, 0x1e91: 0x8d55,\n\t0x1e92: 0x8d75, 0x1e93: 0xda11, 0x1e94: 0xda31, 0x1e95: 0xda31, 0x1e96: 0xda51, 0x1e97: 0x8d95,\n\t0x1e98: 0x8db5, 0x1e99: 0xda71, 0x1e9a: 0xda91, 0x1e9b: 0xdab1, 0x1e9c: 0xdad1, 0x1e9d: 0xdaf1,\n\t0x1e9e: 0xdb11, 0x1e9f: 0xdb31, 0x1ea0: 0xdb51, 0x1ea1: 0xdb71, 0x1ea2: 0xdb91, 0x1ea3: 0xdbb1,\n\t0x1ea4: 0x8dd5, 0x1ea5: 0xdbd1, 0x1ea6: 0xdbf1, 0x1ea7: 0xdc11, 0x1ea8: 0xdc31, 0x1ea9: 0xdc11,\n\t0x1eaa: 0xdc51, 0x1eab: 0xdc71, 0x1eac: 0xdc91, 0x1ead: 0xdcb1, 0x1eae: 0xdcd1, 0x1eaf: 0xdcf1,\n\t0x1eb0: 0xdd11, 0x1eb1: 0xdd31, 0x1eb2: 0xdd51, 0x1eb3: 0xdd71, 0x1eb4: 0xdd91, 0x1eb5: 0xddb1,\n\t0x1eb6: 0xddd1, 0x1eb7: 0xddf1, 0x1eb8: 0x8df5, 0x1eb9: 0xde11, 0x1eba: 0xde31, 0x1ebb: 0xde51,\n\t0x1ebc: 0xde71, 0x1ebd: 0xde91, 0x1ebe: 0x8e15, 0x1ebf: 0xdeb1,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0xe5b1, 0x1ec1: 0xe5d1, 0x1ec2: 0xe5f1, 0x1ec3: 0xe611, 0x1ec4: 0xe631, 0x1ec5: 0xe651,\n\t0x1ec6: 0x8f35, 0x1ec7: 0xe671, 0x1ec8: 0xe691, 0x1ec9: 0xe6b1, 0x1eca: 0xe6d1, 0x1ecb: 0xe6f1,\n\t0x1ecc: 0xe711, 0x1ecd: 0x8f55, 0x1ece: 0xe731, 0x1ecf: 0xe751, 0x1ed0: 0x8f75, 0x1ed1: 0x8f95,\n\t0x1ed2: 0xe771, 0x1ed3: 0xe791, 0x1ed4: 0xe7b1, 0x1ed5: 0xe7d1, 0x1ed6: 0xe7f1, 0x1ed7: 0xe811,\n\t0x1ed8: 0xe831, 0x1ed9: 0xe851, 0x1eda: 0xe871, 0x1edb: 0x8fb5, 0x1edc: 0xe891, 0x1edd: 0x8fd5,\n\t0x1ede: 0xe8b1, 0x1edf: 0x2040, 0x1ee0: 0xe8d1, 0x1ee1: 0xe8f1, 0x1ee2: 0xe911, 0x1ee3: 0x8ff5,\n\t0x1ee4: 0xe931, 0x1ee5: 0xe951, 0x1ee6: 0x9015, 0x1ee7: 0x9035, 0x1ee8: 0xe971, 0x1ee9: 0xe991,\n\t0x1eea: 0xe9b1, 0x1eeb: 0xe9d1, 0x1eec: 0xe9f1, 0x1eed: 0xe9f1, 0x1eee: 0xea11, 0x1eef: 0xea31,\n\t0x1ef0: 0xea51, 0x1ef1: 0xea71, 0x1ef2: 0xea91, 0x1ef3: 0xeab1, 0x1ef4: 0xead1, 0x1ef5: 0x9055,\n\t0x1ef6: 0xeaf1, 0x1ef7: 0x9075, 0x1ef8: 0xeb11, 0x1ef9: 0x9095, 0x1efa: 0xeb31, 0x1efb: 0x90b5,\n\t0x1efc: 0x90d5, 0x1efd: 0x90f5, 0x1efe: 0xeb51, 0x1eff: 0xeb71,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0xeb91, 0x1f01: 0x9115, 0x1f02: 0x9135, 0x1f03: 0x9155, 0x1f04: 0x9175, 0x1f05: 0xebb1,\n\t0x1f06: 0xebd1, 0x1f07: 0xebd1, 0x1f08: 0xebf1, 0x1f09: 0xec11, 0x1f0a: 0xec31, 0x1f0b: 0xec51,\n\t0x1f0c: 0xec71, 0x1f0d: 0x9195, 0x1f0e: 0xec91, 0x1f0f: 0xecb1, 0x1f10: 0xecd1, 0x1f11: 0xecf1,\n\t0x1f12: 0x91b5, 0x1f13: 0xed11, 0x1f14: 0x91d5, 0x1f15: 0x91f5, 0x1f16: 0xed31, 0x1f17: 0xed51,\n\t0x1f18: 0xed71, 0x1f19: 0xed91, 0x1f1a: 0xedb1, 0x1f1b: 0xedd1, 0x1f1c: 0x9215, 0x1f1d: 0x9235,\n\t0x1f1e: 0x9255, 0x1f1f: 0x2040, 0x1f20: 0xedf1, 0x1f21: 0x9275, 0x1f22: 0xee11, 0x1f23: 0xee31,\n\t0x1f24: 0xee51, 0x1f25: 0x9295, 0x1f26: 0xee71, 0x1f27: 0xee91, 0x1f28: 0xeeb1, 0x1f29: 0xeed1,\n\t0x1f2a: 0xeef1, 0x1f2b: 0x92b5, 0x1f2c: 0xef11, 0x1f2d: 0xef31, 0x1f2e: 0xef51, 0x1f2f: 0xef71,\n\t0x1f30: 0xef91, 0x1f31: 0xefb1, 0x1f32: 0x92d5, 0x1f33: 0x92f5, 0x1f34: 0xefd1, 0x1f35: 0x9315,\n\t0x1f36: 0xeff1, 0x1f37: 0x9335, 0x1f38: 0xf011, 0x1f39: 0xf031, 0x1f3a: 0xf051, 0x1f3b: 0x9355,\n\t0x1f3c: 0x9375, 0x1f3d: 0xf071, 0x1f3e: 0x9395, 0x1f3f: 0xf091,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0xf6d1, 0x1f41: 0xf6f1, 0x1f42: 0xf711, 0x1f43: 0xf731, 0x1f44: 0xf751, 0x1f45: 0x9555,\n\t0x1f46: 0xf771, 0x1f47: 0xf791, 0x1f48: 0xf7b1, 0x1f49: 0xf7d1, 0x1f4a: 0xf7f1, 0x1f4b: 0x9575,\n\t0x1f4c: 0x9595, 0x1f4d: 0xf811, 0x1f4e: 0xf831, 0x1f4f: 0xf851, 0x1f50: 0xf871, 0x1f51: 0xf891,\n\t0x1f52: 0xf8b1, 0x1f53: 0x95b5, 0x1f54: 0xf8d1, 0x1f55: 0xf8f1, 0x1f56: 0xf911, 0x1f57: 0xf931,\n\t0x1f58: 0x95d5, 0x1f59: 0x95f5, 0x1f5a: 0xf951, 0x1f5b: 0xf971, 0x1f5c: 0xf991, 0x1f5d: 0x9615,\n\t0x1f5e: 0xf9b1, 0x1f5f: 0xf9d1, 0x1f60: 0x684d, 0x1f61: 0x9635, 0x1f62: 0xf9f1, 0x1f63: 0xfa11,\n\t0x1f64: 0xfa31, 0x1f65: 0x9655, 0x1f66: 0xfa51, 0x1f67: 0xfa71, 0x1f68: 0xfa91, 0x1f69: 0xfab1,\n\t0x1f6a: 0xfad1, 0x1f6b: 0xfaf1, 0x1f6c: 0xfb11, 0x1f6d: 0x9675, 0x1f6e: 0xfb31, 0x1f6f: 0xfb51,\n\t0x1f70: 0xfb71, 0x1f71: 0x9695, 0x1f72: 0xfb91, 0x1f73: 0xfbb1, 0x1f74: 0xfbd1, 0x1f75: 0xfbf1,\n\t0x1f76: 0x7b6d, 0x1f77: 0x96b5, 0x1f78: 0xfc11, 0x1f79: 0xfc31, 0x1f7a: 0xfc51, 0x1f7b: 0x96d5,\n\t0x1f7c: 0xfc71, 0x1f7d: 0x96f5, 0x1f7e: 0xfc91, 0x1f7f: 0xfc91,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0xfcb1, 0x1f81: 0x9715, 0x1f82: 0xfcd1, 0x1f83: 0xfcf1, 0x1f84: 0xfd11, 0x1f85: 0xfd31,\n\t0x1f86: 0xfd51, 0x1f87: 0xfd71, 0x1f88: 0xfd91, 0x1f89: 0x9735, 0x1f8a: 0xfdb1, 0x1f8b: 0xfdd1,\n\t0x1f8c: 0xfdf1, 0x1f8d: 0xfe11, 0x1f8e: 0xfe31, 0x1f8f: 0xfe51, 0x1f90: 0x9755, 0x1f91: 0xfe71,\n\t0x1f92: 0x9775, 0x1f93: 0x9795, 0x1f94: 0x97b5, 0x1f95: 0xfe91, 0x1f96: 0xfeb1, 0x1f97: 0xfed1,\n\t0x1f98: 0xfef1, 0x1f99: 0xff11, 0x1f9a: 0xff31, 0x1f9b: 0xff51, 0x1f9c: 0xff71, 0x1f9d: 0x97d5,\n\t0x1f9e: 0x0040, 0x1f9f: 0x0040, 0x1fa0: 0x0040, 0x1fa1: 0x0040, 0x1fa2: 0x0040, 0x1fa3: 0x0040,\n\t0x1fa4: 0x0040, 0x1fa5: 0x0040, 0x1fa6: 0x0040, 0x1fa7: 0x0040, 0x1fa8: 0x0040, 0x1fa9: 0x0040,\n\t0x1faa: 0x0040, 0x1fab: 0x0040, 0x1fac: 0x0040, 0x1fad: 0x0040, 0x1fae: 0x0040, 0x1faf: 0x0040,\n\t0x1fb0: 0x0040, 0x1fb1: 0x0040, 0x1fb2: 0x0040, 0x1fb3: 0x0040, 0x1fb4: 0x0040, 0x1fb5: 0x0040,\n\t0x1fb6: 0x0040, 0x1fb7: 0x0040, 0x1fb8: 0x0040, 0x1fb9: 0x0040, 0x1fba: 0x0040, 0x1fbb: 0x0040,\n\t0x1fbc: 0x0040, 0x1fbd: 0x0040, 0x1fbe: 0x0040, 0x1fbf: 0x0040,\n}\n\n// idnaIndex: 36 blocks, 2304 entries, 4608 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2304]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x7d, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x7e, 0xca: 0x7f, 0xcb: 0x07, 0xcc: 0x80, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x81, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x82, 0xd6: 0x83, 0xd7: 0x84,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x85, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x86, 0xde: 0x87, 0xdf: 0x88,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,\n\t0xf0: 0x1d, 0xf1: 0x1e, 0xf2: 0x1e, 0xf3: 0x20, 0xf4: 0x21,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x89, 0x121: 0x13, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16,\n\t0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8d,\n\t0x130: 0x8e, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x8f, 0x135: 0x21, 0x136: 0x90, 0x137: 0x91,\n\t0x138: 0x92, 0x139: 0x93, 0x13a: 0x22, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x96,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e,\n\t0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6,\n\t0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f,\n\t0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae,\n\t0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6,\n\t0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe,\n\t0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc3,\n\t0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc4, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc5, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc6, 0x187: 0x9b,\n\t0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0x9b,\n\t0x190: 0xca, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b,\n\t0x198: 0x9b, 0x199: 0x9b, 0x19a: 0x9b, 0x19b: 0x9b, 0x19c: 0x9b, 0x19d: 0x9b, 0x19e: 0x9b, 0x19f: 0x9b,\n\t0x1a0: 0x9b, 0x1a1: 0x9b, 0x1a2: 0x9b, 0x1a3: 0x9b, 0x1a4: 0x9b, 0x1a5: 0x9b, 0x1a6: 0x9b, 0x1a7: 0x9b,\n\t0x1a8: 0xcb, 0x1a9: 0xcc, 0x1aa: 0x9b, 0x1ab: 0xcd, 0x1ac: 0x9b, 0x1ad: 0xce, 0x1ae: 0xcf, 0x1af: 0x9b,\n\t0x1b0: 0xd0, 0x1b1: 0x35, 0x1b2: 0x28, 0x1b3: 0x36, 0x1b4: 0xd1, 0x1b5: 0xd2, 0x1b6: 0xd3, 0x1b7: 0xd4,\n\t0x1b8: 0xd5, 0x1b9: 0xd6, 0x1ba: 0xd7, 0x1bb: 0xd8, 0x1bc: 0xd9, 0x1bd: 0xda, 0x1be: 0xdb, 0x1bf: 0x37,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x38, 0x1c1: 0xdc, 0x1c2: 0xdd, 0x1c3: 0xde, 0x1c4: 0xdf, 0x1c5: 0x39, 0x1c6: 0x3a, 0x1c7: 0xe0,\n\t0x1c8: 0xe1, 0x1c9: 0x3b, 0x1ca: 0x3c, 0x1cb: 0x3d, 0x1cc: 0x3e, 0x1cd: 0x3f, 0x1ce: 0x40, 0x1cf: 0x41,\n\t0x1d0: 0x9f, 0x1d1: 0x9f, 0x1d2: 0x9f, 0x1d3: 0x9f, 0x1d4: 0x9f, 0x1d5: 0x9f, 0x1d6: 0x9f, 0x1d7: 0x9f,\n\t0x1d8: 0x9f, 0x1d9: 0x9f, 0x1da: 0x9f, 0x1db: 0x9f, 0x1dc: 0x9f, 0x1dd: 0x9f, 0x1de: 0x9f, 0x1df: 0x9f,\n\t0x1e0: 0x9f, 0x1e1: 0x9f, 0x1e2: 0x9f, 0x1e3: 0x9f, 0x1e4: 0x9f, 0x1e5: 0x9f, 0x1e6: 0x9f, 0x1e7: 0x9f,\n\t0x1e8: 0x9f, 0x1e9: 0x9f, 0x1ea: 0x9f, 0x1eb: 0x9f, 0x1ec: 0x9f, 0x1ed: 0x9f, 0x1ee: 0x9f, 0x1ef: 0x9f,\n\t0x1f0: 0x9f, 0x1f1: 0x9f, 0x1f2: 0x9f, 0x1f3: 0x9f, 0x1f4: 0x9f, 0x1f5: 0x9f, 0x1f6: 0x9f, 0x1f7: 0x9f,\n\t0x1f8: 0x9f, 0x1f9: 0x9f, 0x1fa: 0x9f, 0x1fb: 0x9f, 0x1fc: 0x9f, 0x1fd: 0x9f, 0x1fe: 0x9f, 0x1ff: 0x9f,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9f, 0x201: 0x9f, 0x202: 0x9f, 0x203: 0x9f, 0x204: 0x9f, 0x205: 0x9f, 0x206: 0x9f, 0x207: 0x9f,\n\t0x208: 0x9f, 0x209: 0x9f, 0x20a: 0x9f, 0x20b: 0x9f, 0x20c: 0x9f, 0x20d: 0x9f, 0x20e: 0x9f, 0x20f: 0x9f,\n\t0x210: 0x9f, 0x211: 0x9f, 0x212: 0x9f, 0x213: 0x9f, 0x214: 0x9f, 0x215: 0x9f, 0x216: 0x9f, 0x217: 0x9f,\n\t0x218: 0x9f, 0x219: 0x9f, 0x21a: 0x9f, 0x21b: 0x9f, 0x21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f,\n\t0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f,\n\t0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f,\n\t0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b,\n\t0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f,\n\t0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f,\n\t0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f,\n\t0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f,\n\t0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f,\n\t0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f,\n\t0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f,\n\t0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f,\n\t0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f,\n\t0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f,\n\t0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f,\n\t0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f, 0x2a4: 0x9f, 0x2a5: 0x9f, 0x2a6: 0x9f, 0x2a7: 0x9f,\n\t0x2a8: 0x9f, 0x2a9: 0x9f, 0x2aa: 0x9f, 0x2ab: 0x9f, 0x2ac: 0x9f, 0x2ad: 0x9f, 0x2ae: 0x9f, 0x2af: 0x9f,\n\t0x2b0: 0x9f, 0x2b1: 0x9f, 0x2b2: 0x9f, 0x2b3: 0x9f, 0x2b4: 0x9f, 0x2b5: 0x9f, 0x2b6: 0x9f, 0x2b7: 0x9f,\n\t0x2b8: 0x9f, 0x2b9: 0x9f, 0x2ba: 0x9f, 0x2bb: 0x9f, 0x2bc: 0x9f, 0x2bd: 0x9f, 0x2be: 0x9f, 0x2bf: 0xe2,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x9f, 0x2c1: 0x9f, 0x2c2: 0x9f, 0x2c3: 0x9f, 0x2c4: 0x9f, 0x2c5: 0x9f, 0x2c6: 0x9f, 0x2c7: 0x9f,\n\t0x2c8: 0x9f, 0x2c9: 0x9f, 0x2ca: 0x9f, 0x2cb: 0x9f, 0x2cc: 0x9f, 0x2cd: 0x9f, 0x2ce: 0x9f, 0x2cf: 0x9f,\n\t0x2d0: 0x9f, 0x2d1: 0x9f, 0x2d2: 0xe3, 0x2d3: 0xe4, 0x2d4: 0x9f, 0x2d5: 0x9f, 0x2d6: 0x9f, 0x2d7: 0x9f,\n\t0x2d8: 0xe5, 0x2d9: 0x42, 0x2da: 0x43, 0x2db: 0xe6, 0x2dc: 0x44, 0x2dd: 0x45, 0x2de: 0x46, 0x2df: 0xe7,\n\t0x2e0: 0xe8, 0x2e1: 0xe9, 0x2e2: 0xea, 0x2e3: 0xeb, 0x2e4: 0xec, 0x2e5: 0xed, 0x2e6: 0xee, 0x2e7: 0xef,\n\t0x2e8: 0xf0, 0x2e9: 0xf1, 0x2ea: 0xf2, 0x2eb: 0xf3, 0x2ec: 0xf4, 0x2ed: 0xf5, 0x2ee: 0xf6, 0x2ef: 0xf7,\n\t0x2f0: 0x9f, 0x2f1: 0x9f, 0x2f2: 0x9f, 0x2f3: 0x9f, 0x2f4: 0x9f, 0x2f5: 0x9f, 0x2f6: 0x9f, 0x2f7: 0x9f,\n\t0x2f8: 0x9f, 0x2f9: 0x9f, 0x2fa: 0x9f, 0x2fb: 0x9f, 0x2fc: 0x9f, 0x2fd: 0x9f, 0x2fe: 0x9f, 0x2ff: 0x9f,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x9f, 0x301: 0x9f, 0x302: 0x9f, 0x303: 0x9f, 0x304: 0x9f, 0x305: 0x9f, 0x306: 0x9f, 0x307: 0x9f,\n\t0x308: 0x9f, 0x309: 0x9f, 0x30a: 0x9f, 0x30b: 0x9f, 0x30c: 0x9f, 0x30d: 0x9f, 0x30e: 0x9f, 0x30f: 0x9f,\n\t0x310: 0x9f, 0x311: 0x9f, 0x312: 0x9f, 0x313: 0x9f, 0x314: 0x9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f,\n\t0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xf8, 0x31f: 0xf9,\n\t// Block 0xd, offset 0x340\n\t0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba,\n\t0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba,\n\t0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba,\n\t0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba,\n\t0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba,\n\t0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba,\n\t0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba,\n\t0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba,\n\t0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba,\n\t0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba,\n\t0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba,\n\t0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfa, 0x3a5: 0xfb, 0x3a6: 0xfc, 0x3a7: 0xfd,\n\t0x3a8: 0x47, 0x3a9: 0xfe, 0x3aa: 0xff, 0x3ab: 0x48, 0x3ac: 0x49, 0x3ad: 0x4a, 0x3ae: 0x4b, 0x3af: 0x4c,\n\t0x3b0: 0x100, 0x3b1: 0x4d, 0x3b2: 0x4e, 0x3b3: 0x4f, 0x3b4: 0x50, 0x3b5: 0x51, 0x3b6: 0x101, 0x3b7: 0x52,\n\t0x3b8: 0x53, 0x3b9: 0x54, 0x3ba: 0x55, 0x3bb: 0x56, 0x3bc: 0x57, 0x3bd: 0x58, 0x3be: 0x59, 0x3bf: 0x5a,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x102, 0x3c1: 0x103, 0x3c2: 0x9f, 0x3c3: 0x104, 0x3c4: 0x105, 0x3c5: 0x9b, 0x3c6: 0x106, 0x3c7: 0x107,\n\t0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x108, 0x3cb: 0x109, 0x3cc: 0x10a, 0x3cd: 0x10b, 0x3ce: 0x10c, 0x3cf: 0x10d,\n\t0x3d0: 0x10e, 0x3d1: 0x9f, 0x3d2: 0x10f, 0x3d3: 0x110, 0x3d4: 0x111, 0x3d5: 0x112, 0x3d6: 0xba, 0x3d7: 0xba,\n\t0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x113, 0x3dd: 0x114, 0x3de: 0xba, 0x3df: 0xba,\n\t0x3e0: 0x115, 0x3e1: 0x116, 0x3e2: 0x117, 0x3e3: 0x118, 0x3e4: 0x119, 0x3e5: 0xba, 0x3e6: 0x11a, 0x3e7: 0x11b,\n\t0x3e8: 0x11c, 0x3e9: 0x11d, 0x3ea: 0x11e, 0x3eb: 0x5b, 0x3ec: 0x11f, 0x3ed: 0x120, 0x3ee: 0x5c, 0x3ef: 0xba,\n\t0x3f0: 0x121, 0x3f1: 0x122, 0x3f2: 0x123, 0x3f3: 0x124, 0x3f4: 0x125, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba,\n\t0x3f8: 0xba, 0x3f9: 0x126, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0x127, 0x3fd: 0x128, 0x3fe: 0xba, 0x3ff: 0x129,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x12a, 0x401: 0x12b, 0x402: 0x12c, 0x403: 0x12d, 0x404: 0x12e, 0x405: 0x12f, 0x406: 0x130, 0x407: 0x131,\n\t0x408: 0x132, 0x409: 0xba, 0x40a: 0x133, 0x40b: 0x134, 0x40c: 0x5d, 0x40d: 0x5e, 0x40e: 0xba, 0x40f: 0xba,\n\t0x410: 0x135, 0x411: 0x136, 0x412: 0x137, 0x413: 0x138, 0x414: 0xba, 0x415: 0xba, 0x416: 0x139, 0x417: 0x13a,\n\t0x418: 0x13b, 0x419: 0x13c, 0x41a: 0x13d, 0x41b: 0x13e, 0x41c: 0x13f, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba,\n\t0x420: 0x140, 0x421: 0xba, 0x422: 0x141, 0x423: 0x142, 0x424: 0xba, 0x425: 0xba, 0x426: 0x143, 0x427: 0x144,\n\t0x428: 0x145, 0x429: 0x146, 0x42a: 0x147, 0x42b: 0x148, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba,\n\t0x430: 0x149, 0x431: 0x14a, 0x432: 0x14b, 0x433: 0xba, 0x434: 0x14c, 0x435: 0x14d, 0x436: 0x14e, 0x437: 0xba,\n\t0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0x14f, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0x150,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f,\n\t0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x151, 0x44f: 0xba,\n\t0x450: 0x9b, 0x451: 0x152, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x153, 0x456: 0xba, 0x457: 0xba,\n\t0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba,\n\t0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba,\n\t0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba,\n\t0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba,\n\t0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f,\n\t0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f,\n\t0x490: 0x154, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba,\n\t0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba,\n\t0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba,\n\t0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba,\n\t0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba,\n\t0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xba, 0x4c1: 0xba, 0x4c2: 0xba, 0x4c3: 0xba, 0x4c4: 0xba, 0x4c5: 0xba, 0x4c6: 0xba, 0x4c7: 0xba,\n\t0x4c8: 0xba, 0x4c9: 0xba, 0x4ca: 0xba, 0x4cb: 0xba, 0x4cc: 0xba, 0x4cd: 0xba, 0x4ce: 0xba, 0x4cf: 0xba,\n\t0x4d0: 0x9f, 0x4d1: 0x9f, 0x4d2: 0x9f, 0x4d3: 0x9f, 0x4d4: 0x9f, 0x4d5: 0x9f, 0x4d6: 0x9f, 0x4d7: 0x9f,\n\t0x4d8: 0x9f, 0x4d9: 0x155, 0x4da: 0xba, 0x4db: 0xba, 0x4dc: 0xba, 0x4dd: 0xba, 0x4de: 0xba, 0x4df: 0xba,\n\t0x4e0: 0xba, 0x4e1: 0xba, 0x4e2: 0xba, 0x4e3: 0xba, 0x4e4: 0xba, 0x4e5: 0xba, 0x4e6: 0xba, 0x4e7: 0xba,\n\t0x4e8: 0xba, 0x4e9: 0xba, 0x4ea: 0xba, 0x4eb: 0xba, 0x4ec: 0xba, 0x4ed: 0xba, 0x4ee: 0xba, 0x4ef: 0xba,\n\t0x4f0: 0xba, 0x4f1: 0xba, 0x4f2: 0xba, 0x4f3: 0xba, 0x4f4: 0xba, 0x4f5: 0xba, 0x4f6: 0xba, 0x4f7: 0xba,\n\t0x4f8: 0xba, 0x4f9: 0xba, 0x4fa: 0xba, 0x4fb: 0xba, 0x4fc: 0xba, 0x4fd: 0xba, 0x4fe: 0xba, 0x4ff: 0xba,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xba, 0x501: 0xba, 0x502: 0xba, 0x503: 0xba, 0x504: 0xba, 0x505: 0xba, 0x506: 0xba, 0x507: 0xba,\n\t0x508: 0xba, 0x509: 0xba, 0x50a: 0xba, 0x50b: 0xba, 0x50c: 0xba, 0x50d: 0xba, 0x50e: 0xba, 0x50f: 0xba,\n\t0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba,\n\t0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba,\n\t0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f,\n\t0x528: 0x148, 0x529: 0x156, 0x52a: 0xba, 0x52b: 0x157, 0x52c: 0x158, 0x52d: 0x159, 0x52e: 0x15a, 0x52f: 0xba,\n\t0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba,\n\t0x538: 0xba, 0x539: 0x15b, 0x53a: 0x15c, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x15d, 0x53e: 0x15e, 0x53f: 0x15f,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f,\n\t0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f,\n\t0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f,\n\t0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x160,\n\t0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f,\n\t0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x161, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba,\n\t0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba,\n\t0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x9f, 0x581: 0x9f, 0x582: 0x9f, 0x583: 0x9f, 0x584: 0x162, 0x585: 0x163, 0x586: 0x9f, 0x587: 0x9f,\n\t0x588: 0x9f, 0x589: 0x9f, 0x58a: 0x9f, 0x58b: 0x164, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba,\n\t0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba,\n\t0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba,\n\t0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba,\n\t0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba,\n\t0x5b0: 0x9f, 0x5b1: 0x165, 0x5b2: 0x166, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba,\n\t0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x9b, 0x5c1: 0x9b, 0x5c2: 0x9b, 0x5c3: 0x167, 0x5c4: 0x168, 0x5c5: 0x169, 0x5c6: 0x16a, 0x5c7: 0x16b,\n\t0x5c8: 0x9b, 0x5c9: 0x16c, 0x5ca: 0xba, 0x5cb: 0x16d, 0x5cc: 0x9b, 0x5cd: 0x16e, 0x5ce: 0xba, 0x5cf: 0xba,\n\t0x5d0: 0x5f, 0x5d1: 0x60, 0x5d2: 0x61, 0x5d3: 0x62, 0x5d4: 0x63, 0x5d5: 0x64, 0x5d6: 0x65, 0x5d7: 0x66,\n\t0x5d8: 0x67, 0x5d9: 0x68, 0x5da: 0x69, 0x5db: 0x6a, 0x5dc: 0x6b, 0x5dd: 0x6c, 0x5de: 0x6d, 0x5df: 0x6e,\n\t0x5e0: 0x9b, 0x5e1: 0x9b, 0x5e2: 0x9b, 0x5e3: 0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b,\n\t0x5e8: 0x16f, 0x5e9: 0x170, 0x5ea: 0x171, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba,\n\t0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba,\n\t0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x172, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0x173, 0x605: 0x174, 0x606: 0xba, 0x607: 0xba,\n\t0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0x175, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba,\n\t0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba,\n\t0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba,\n\t0x620: 0x121, 0x621: 0x121, 0x622: 0x121, 0x623: 0x176, 0x624: 0x6f, 0x625: 0x177, 0x626: 0xba, 0x627: 0xba,\n\t0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba,\n\t0x630: 0xba, 0x631: 0x178, 0x632: 0x179, 0x633: 0xba, 0x634: 0x17a, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba,\n\t0x638: 0x70, 0x639: 0x71, 0x63a: 0x72, 0x63b: 0x17b, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x17c, 0x641: 0x9b, 0x642: 0x17d, 0x643: 0x17e, 0x644: 0x73, 0x645: 0x74, 0x646: 0x17f, 0x647: 0x180,\n\t0x648: 0x75, 0x649: 0x181, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b,\n\t0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b,\n\t0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x182, 0x65c: 0x9b, 0x65d: 0x183, 0x65e: 0x9b, 0x65f: 0x184,\n\t0x660: 0x185, 0x661: 0x186, 0x662: 0x187, 0x663: 0xba, 0x664: 0x188, 0x665: 0x189, 0x666: 0x18a, 0x667: 0x18b,\n\t0x668: 0x9b, 0x669: 0x18c, 0x66a: 0x18d, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba,\n\t0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba,\n\t0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f,\n\t0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f,\n\t0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f,\n\t0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x18e, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f,\n\t0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f,\n\t0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f,\n\t0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 0x9f, 0x6b6: 0x9f, 0x6b7: 0x9f,\n\t0x6b8: 0x9f, 0x6b9: 0x9f, 0x6ba: 0x9f, 0x6bb: 0x9f, 0x6bc: 0x9f, 0x6bd: 0x9f, 0x6be: 0x9f, 0x6bf: 0x9f,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x9f, 0x6c1: 0x9f, 0x6c2: 0x9f, 0x6c3: 0x9f, 0x6c4: 0x9f, 0x6c5: 0x9f, 0x6c6: 0x9f, 0x6c7: 0x9f,\n\t0x6c8: 0x9f, 0x6c9: 0x9f, 0x6ca: 0x9f, 0x6cb: 0x9f, 0x6cc: 0x9f, 0x6cd: 0x9f, 0x6ce: 0x9f, 0x6cf: 0x9f,\n\t0x6d0: 0x9f, 0x6d1: 0x9f, 0x6d2: 0x9f, 0x6d3: 0x9f, 0x6d4: 0x9f, 0x6d5: 0x9f, 0x6d6: 0x9f, 0x6d7: 0x9f,\n\t0x6d8: 0x9f, 0x6d9: 0x9f, 0x6da: 0x9f, 0x6db: 0x9f, 0x6dc: 0x18f, 0x6dd: 0x9f, 0x6de: 0x9f, 0x6df: 0x9f,\n\t0x6e0: 0x190, 0x6e1: 0x9f, 0x6e2: 0x9f, 0x6e3: 0x9f, 0x6e4: 0x9f, 0x6e5: 0x9f, 0x6e6: 0x9f, 0x6e7: 0x9f,\n\t0x6e8: 0x9f, 0x6e9: 0x9f, 0x6ea: 0x9f, 0x6eb: 0x9f, 0x6ec: 0x9f, 0x6ed: 0x9f, 0x6ee: 0x9f, 0x6ef: 0x9f,\n\t0x6f0: 0x9f, 0x6f1: 0x9f, 0x6f2: 0x9f, 0x6f3: 0x9f, 0x6f4: 0x9f, 0x6f5: 0x9f, 0x6f6: 0x9f, 0x6f7: 0x9f,\n\t0x6f8: 0x9f, 0x6f9: 0x9f, 0x6fa: 0x9f, 0x6fb: 0x9f, 0x6fc: 0x9f, 0x6fd: 0x9f, 0x6fe: 0x9f, 0x6ff: 0x9f,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x9f, 0x701: 0x9f, 0x702: 0x9f, 0x703: 0x9f, 0x704: 0x9f, 0x705: 0x9f, 0x706: 0x9f, 0x707: 0x9f,\n\t0x708: 0x9f, 0x709: 0x9f, 0x70a: 0x9f, 0x70b: 0x9f, 0x70c: 0x9f, 0x70d: 0x9f, 0x70e: 0x9f, 0x70f: 0x9f,\n\t0x710: 0x9f, 0x711: 0x9f, 0x712: 0x9f, 0x713: 0x9f, 0x714: 0x9f, 0x715: 0x9f, 0x716: 0x9f, 0x717: 0x9f,\n\t0x718: 0x9f, 0x719: 0x9f, 0x71a: 0x9f, 0x71b: 0x9f, 0x71c: 0x9f, 0x71d: 0x9f, 0x71e: 0x9f, 0x71f: 0x9f,\n\t0x720: 0x9f, 0x721: 0x9f, 0x722: 0x9f, 0x723: 0x9f, 0x724: 0x9f, 0x725: 0x9f, 0x726: 0x9f, 0x727: 0x9f,\n\t0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f,\n\t0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f,\n\t0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x191, 0x73b: 0x9f, 0x73c: 0x9f, 0x73d: 0x9f, 0x73e: 0x9f, 0x73f: 0x9f,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x9f, 0x741: 0x9f, 0x742: 0x9f, 0x743: 0x9f, 0x744: 0x9f, 0x745: 0x9f, 0x746: 0x9f, 0x747: 0x9f,\n\t0x748: 0x9f, 0x749: 0x9f, 0x74a: 0x9f, 0x74b: 0x9f, 0x74c: 0x9f, 0x74d: 0x9f, 0x74e: 0x9f, 0x74f: 0x9f,\n\t0x750: 0x9f, 0x751: 0x9f, 0x752: 0x9f, 0x753: 0x9f, 0x754: 0x9f, 0x755: 0x9f, 0x756: 0x9f, 0x757: 0x9f,\n\t0x758: 0x9f, 0x759: 0x9f, 0x75a: 0x9f, 0x75b: 0x9f, 0x75c: 0x9f, 0x75d: 0x9f, 0x75e: 0x9f, 0x75f: 0x9f,\n\t0x760: 0x9f, 0x761: 0x9f, 0x762: 0x9f, 0x763: 0x9f, 0x764: 0x9f, 0x765: 0x9f, 0x766: 0x9f, 0x767: 0x9f,\n\t0x768: 0x9f, 0x769: 0x9f, 0x76a: 0x9f, 0x76b: 0x9f, 0x76c: 0x9f, 0x76d: 0x9f, 0x76e: 0x9f, 0x76f: 0x192,\n\t0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba,\n\t0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0xba, 0x781: 0xba, 0x782: 0xba, 0x783: 0xba, 0x784: 0xba, 0x785: 0xba, 0x786: 0xba, 0x787: 0xba,\n\t0x788: 0xba, 0x789: 0xba, 0x78a: 0xba, 0x78b: 0xba, 0x78c: 0xba, 0x78d: 0xba, 0x78e: 0xba, 0x78f: 0xba,\n\t0x790: 0xba, 0x791: 0xba, 0x792: 0xba, 0x793: 0xba, 0x794: 0xba, 0x795: 0xba, 0x796: 0xba, 0x797: 0xba,\n\t0x798: 0xba, 0x799: 0xba, 0x79a: 0xba, 0x79b: 0xba, 0x79c: 0xba, 0x79d: 0xba, 0x79e: 0xba, 0x79f: 0xba,\n\t0x7a0: 0x76, 0x7a1: 0x77, 0x7a2: 0x78, 0x7a3: 0x193, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x194, 0x7a7: 0x7b,\n\t0x7a8: 0x7c, 0x7a9: 0xba, 0x7aa: 0xba, 0x7ab: 0xba, 0x7ac: 0xba, 0x7ad: 0xba, 0x7ae: 0xba, 0x7af: 0xba,\n\t0x7b0: 0xba, 0x7b1: 0xba, 0x7b2: 0xba, 0x7b3: 0xba, 0x7b4: 0xba, 0x7b5: 0xba, 0x7b6: 0xba, 0x7b7: 0xba,\n\t0x7b8: 0xba, 0x7b9: 0xba, 0x7ba: 0xba, 0x7bb: 0xba, 0x7bc: 0xba, 0x7bd: 0xba, 0x7be: 0xba, 0x7bf: 0xba,\n\t// Block 0x1f, offset 0x7c0\n\t0x7d0: 0x0d, 0x7d1: 0x0e, 0x7d2: 0x0f, 0x7d3: 0x10, 0x7d4: 0x11, 0x7d5: 0x0b, 0x7d6: 0x12, 0x7d7: 0x07,\n\t0x7d8: 0x13, 0x7d9: 0x0b, 0x7da: 0x0b, 0x7db: 0x14, 0x7dc: 0x0b, 0x7dd: 0x15, 0x7de: 0x16, 0x7df: 0x17,\n\t0x7e0: 0x07, 0x7e1: 0x07, 0x7e2: 0x07, 0x7e3: 0x07, 0x7e4: 0x07, 0x7e5: 0x07, 0x7e6: 0x07, 0x7e7: 0x07,\n\t0x7e8: 0x07, 0x7e9: 0x07, 0x7ea: 0x18, 0x7eb: 0x19, 0x7ec: 0x1a, 0x7ed: 0x07, 0x7ee: 0x1b, 0x7ef: 0x1c,\n\t0x7f0: 0x0b, 0x7f1: 0x0b, 0x7f2: 0x0b, 0x7f3: 0x0b, 0x7f4: 0x0b, 0x7f5: 0x0b, 0x7f6: 0x0b, 0x7f7: 0x0b,\n\t0x7f8: 0x0b, 0x7f9: 0x0b, 0x7fa: 0x0b, 0x7fb: 0x0b, 0x7fc: 0x0b, 0x7fd: 0x0b, 0x7fe: 0x0b, 0x7ff: 0x0b,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0b, 0x801: 0x0b, 0x802: 0x0b, 0x803: 0x0b, 0x804: 0x0b, 0x805: 0x0b, 0x806: 0x0b, 0x807: 0x0b,\n\t0x808: 0x0b, 0x809: 0x0b, 0x80a: 0x0b, 0x80b: 0x0b, 0x80c: 0x0b, 0x80d: 0x0b, 0x80e: 0x0b, 0x80f: 0x0b,\n\t0x810: 0x0b, 0x811: 0x0b, 0x812: 0x0b, 0x813: 0x0b, 0x814: 0x0b, 0x815: 0x0b, 0x816: 0x0b, 0x817: 0x0b,\n\t0x818: 0x0b, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x0b, 0x81c: 0x0b, 0x81d: 0x0b, 0x81e: 0x0b, 0x81f: 0x0b,\n\t0x820: 0x0b, 0x821: 0x0b, 0x822: 0x0b, 0x823: 0x0b, 0x824: 0x0b, 0x825: 0x0b, 0x826: 0x0b, 0x827: 0x0b,\n\t0x828: 0x0b, 0x829: 0x0b, 0x82a: 0x0b, 0x82b: 0x0b, 0x82c: 0x0b, 0x82d: 0x0b, 0x82e: 0x0b, 0x82f: 0x0b,\n\t0x830: 0x0b, 0x831: 0x0b, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b,\n\t0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x195, 0x841: 0x196, 0x842: 0xba, 0x843: 0xba, 0x844: 0x197, 0x845: 0x197, 0x846: 0x197, 0x847: 0x198,\n\t0x848: 0xba, 0x849: 0xba, 0x84a: 0xba, 0x84b: 0xba, 0x84c: 0xba, 0x84d: 0xba, 0x84e: 0xba, 0x84f: 0xba,\n\t0x850: 0xba, 0x851: 0xba, 0x852: 0xba, 0x853: 0xba, 0x854: 0xba, 0x855: 0xba, 0x856: 0xba, 0x857: 0xba,\n\t0x858: 0xba, 0x859: 0xba, 0x85a: 0xba, 0x85b: 0xba, 0x85c: 0xba, 0x85d: 0xba, 0x85e: 0xba, 0x85f: 0xba,\n\t0x860: 0xba, 0x861: 0xba, 0x862: 0xba, 0x863: 0xba, 0x864: 0xba, 0x865: 0xba, 0x866: 0xba, 0x867: 0xba,\n\t0x868: 0xba, 0x869: 0xba, 0x86a: 0xba, 0x86b: 0xba, 0x86c: 0xba, 0x86d: 0xba, 0x86e: 0xba, 0x86f: 0xba,\n\t0x870: 0xba, 0x871: 0xba, 0x872: 0xba, 0x873: 0xba, 0x874: 0xba, 0x875: 0xba, 0x876: 0xba, 0x877: 0xba,\n\t0x878: 0xba, 0x879: 0xba, 0x87a: 0xba, 0x87b: 0xba, 0x87c: 0xba, 0x87d: 0xba, 0x87e: 0xba, 0x87f: 0xba,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b,\n\t0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b,\n\t0x890: 0x0b, 0x891: 0x0b, 0x892: 0x0b, 0x893: 0x0b, 0x894: 0x0b, 0x895: 0x0b, 0x896: 0x0b, 0x897: 0x0b,\n\t0x898: 0x0b, 0x899: 0x0b, 0x89a: 0x0b, 0x89b: 0x0b, 0x89c: 0x0b, 0x89d: 0x0b, 0x89e: 0x0b, 0x89f: 0x0b,\n\t0x8a0: 0x1f, 0x8a1: 0x0b, 0x8a2: 0x0b, 0x8a3: 0x0b, 0x8a4: 0x0b, 0x8a5: 0x0b, 0x8a6: 0x0b, 0x8a7: 0x0b,\n\t0x8a8: 0x0b, 0x8a9: 0x0b, 0x8aa: 0x0b, 0x8ab: 0x0b, 0x8ac: 0x0b, 0x8ad: 0x0b, 0x8ae: 0x0b, 0x8af: 0x0b,\n\t0x8b0: 0x0b, 0x8b1: 0x0b, 0x8b2: 0x0b, 0x8b3: 0x0b, 0x8b4: 0x0b, 0x8b5: 0x0b, 0x8b6: 0x0b, 0x8b7: 0x0b,\n\t0x8b8: 0x0b, 0x8b9: 0x0b, 0x8ba: 0x0b, 0x8bb: 0x0b, 0x8bc: 0x0b, 0x8bd: 0x0b, 0x8be: 0x0b, 0x8bf: 0x0b,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b,\n\t0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b,\n}\n\n// idnaSparseOffset: 284 entries, 568 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x33, 0x3e, 0x4a, 0x4e, 0x5d, 0x62, 0x6c, 0x78, 0x86, 0x8b, 0x94, 0xa4, 0xb2, 0xbe, 0xca, 0xdb, 0xe5, 0xec, 0xf9, 0x10a, 0x111, 0x11c, 0x12b, 0x139, 0x143, 0x145, 0x14a, 0x14d, 0x150, 0x152, 0x15e, 0x169, 0x171, 0x177, 0x17d, 0x182, 0x187, 0x18a, 0x18e, 0x194, 0x199, 0x1a5, 0x1af, 0x1b5, 0x1c6, 0x1d0, 0x1d3, 0x1db, 0x1de, 0x1eb, 0x1f3, 0x1f7, 0x1fe, 0x206, 0x216, 0x222, 0x224, 0x22e, 0x23a, 0x246, 0x252, 0x25a, 0x25f, 0x26c, 0x27d, 0x281, 0x28c, 0x290, 0x299, 0x2a1, 0x2a7, 0x2ac, 0x2af, 0x2b3, 0x2b9, 0x2bd, 0x2c1, 0x2c5, 0x2cb, 0x2d3, 0x2da, 0x2e5, 0x2ef, 0x2f3, 0x2f6, 0x2fc, 0x300, 0x302, 0x305, 0x307, 0x30a, 0x314, 0x317, 0x326, 0x32a, 0x32f, 0x332, 0x336, 0x33b, 0x340, 0x346, 0x352, 0x361, 0x367, 0x36b, 0x37a, 0x37f, 0x387, 0x391, 0x39c, 0x3a4, 0x3b5, 0x3be, 0x3ce, 0x3db, 0x3e5, 0x3ea, 0x3f7, 0x3fb, 0x400, 0x402, 0x406, 0x408, 0x40c, 0x415, 0x41b, 0x41f, 0x42f, 0x439, 0x43e, 0x441, 0x447, 0x44e, 0x453, 0x457, 0x45d, 0x462, 0x46b, 0x470, 0x476, 0x47d, 0x484, 0x48b, 0x48f, 0x494, 0x497, 0x49c, 0x4a8, 0x4ae, 0x4b3, 0x4ba, 0x4c2, 0x4c7, 0x4cb, 0x4db, 0x4e2, 0x4e6, 0x4ea, 0x4f1, 0x4f3, 0x4f6, 0x4f9, 0x4fd, 0x506, 0x50a, 0x512, 0x51a, 0x51e, 0x524, 0x52d, 0x539, 0x540, 0x549, 0x553, 0x55a, 0x568, 0x575, 0x582, 0x58b, 0x58f, 0x59f, 0x5a7, 0x5b2, 0x5bb, 0x5c1, 0x5c9, 0x5d2, 0x5dd, 0x5e0, 0x5ec, 0x5f5, 0x5f8, 0x5fd, 0x602, 0x60f, 0x61a, 0x623, 0x62d, 0x630, 0x63a, 0x643, 0x64f, 0x65c, 0x669, 0x677, 0x67e, 0x682, 0x685, 0x68a, 0x68d, 0x692, 0x695, 0x69c, 0x6a3, 0x6a7, 0x6b2, 0x6b5, 0x6b8, 0x6bb, 0x6c1, 0x6c7, 0x6cd, 0x6d0, 0x6d3, 0x6d6, 0x6dd, 0x6e0, 0x6e5, 0x6ef, 0x6f2, 0x6f6, 0x705, 0x711, 0x715, 0x71a, 0x71e, 0x723, 0x727, 0x72c, 0x735, 0x740, 0x746, 0x74c, 0x752, 0x758, 0x761, 0x764, 0x767, 0x76b, 0x76f, 0x773, 0x779, 0x77f, 0x784, 0x787, 0x797, 0x79e, 0x7a1, 0x7a6, 0x7aa, 0x7b0, 0x7b5, 0x7b9, 0x7bf, 0x7c5, 0x7c9, 0x7d2, 0x7d7, 0x7da, 0x7dd, 0x7e1, 0x7e5, 0x7e8, 0x7f8, 0x809, 0x80e, 0x810, 0x812}\n\n// idnaSparseValues: 2069 entries, 8276 bytes\nvar idnaSparseValues = [2069]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0249, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0259, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0269, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0279, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0289, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x6, offset 0x33\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0401, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xae},\n\t{value: 0x0808, lo: 0xaf, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x62\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbf},\n\t// Block 0xc, offset 0x6c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x78\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0a08, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0c08, lo: 0xaa, hi: 0xac},\n\t{value: 0x0808, lo: 0xad, hi: 0xad},\n\t{value: 0x0c08, lo: 0xae, hi: 0xae},\n\t{value: 0x0a08, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0a08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xe, offset 0x86\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0xf, offset 0x8b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x10, offset 0x94\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x11, offset 0xa4\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x12, offset 0xb2\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x3b08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbe\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x14, offset 0xca\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x15, offset 0xdb\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x08f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x16, offset 0xe5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x17, offset 0xec\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0961, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0999, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x18, offset 0xf9\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x19, offset 0x10a\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x1a, offset 0x111\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1b, offset 0x11c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1c, offset 0x12b\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1d, offset 0x139\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1e, offset 0x143\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x1f, offset 0x145\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x20, offset 0x14a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x21, offset 0x14d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x22, offset 0x150\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x23, offset 0x152\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x24, offset 0x15e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x25, offset 0x169\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x26, offset 0x171\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x27, offset 0x177\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x28, offset 0x17d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x29, offset 0x182\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x2a, offset 0x187\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2b, offset 0x18a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2c, offset 0x18e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2d, offset 0x194\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2e, offset 0x199\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x30, offset 0x1af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x31, offset 0x1b5\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x32, offset 0x1c6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x33, offset 0x1d0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x34, offset 0x1d3\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x35, offset 0x1db\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x36, offset 0x1de\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x37, offset 0x1eb\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x38, offset 0x1f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x39, offset 0x1f7\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x3a, offset 0x1fe\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3b, offset 0x206\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3c, offset 0x216\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3d, offset 0x222\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x3e, offset 0x224\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x3f, offset 0x22e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x40, offset 0x23a\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x41, offset 0x246\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x42, offset 0x252\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x43, offset 0x25a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x44, offset 0x25f\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0e29, lo: 0x80, hi: 0x80},\n\t{value: 0x0e41, lo: 0x81, hi: 0x81},\n\t{value: 0x0e59, lo: 0x82, hi: 0x82},\n\t{value: 0x0e71, lo: 0x83, hi: 0x83},\n\t{value: 0x0e89, lo: 0x84, hi: 0x85},\n\t{value: 0x0ea1, lo: 0x86, hi: 0x86},\n\t{value: 0x0eb9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x059d, lo: 0x90, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x059d, lo: 0xbd, hi: 0xbf},\n\t// Block 0x45, offset 0x26c\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x46, offset 0x27d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x47, offset 0x281\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x48, offset 0x28c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x49, offset 0x290\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x24c1, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x4a, offset 0x299\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x24f1, lo: 0xac, hi: 0xac},\n\t{value: 0x2529, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x2579, lo: 0xaf, hi: 0xaf},\n\t{value: 0x25b1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4b, offset 0x2a1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4c, offset 0x2a7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09dd, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09fd, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4d, offset 0x2ac\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x4e, offset 0x2af\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x28c1, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x4f, offset 0x2b3\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e7e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x292a, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e9e, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x50, offset 0x2b9\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x2941, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x51, offset 0x2bd\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x52, offset 0x2c1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0xbf},\n\t// Block 0x53, offset 0x2c5\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ebd, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x54, offset 0x2cb\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x55, offset 0x2d3\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x56, offset 0x2da\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x57, offset 0x2e5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x58, offset 0x2ef\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x59, offset 0x2f3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0x5a, offset 0x2f6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0ef5, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5b, offset 0x2fc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0f15, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5c, offset 0x300\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f35, lo: 0x80, hi: 0xbf},\n\t// Block 0x5d, offset 0x302\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x1735, lo: 0x80, hi: 0x8f},\n\t{value: 0x1915, lo: 0x90, hi: 0xbf},\n\t// Block 0x5e, offset 0x305\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1f15, lo: 0x80, hi: 0xbf},\n\t// Block 0x5f, offset 0x307\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x60, offset 0x30a\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x29e2, lo: 0x9b, hi: 0x9b},\n\t{value: 0x2a0a, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x2a31, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x61, offset 0x314\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x2a69, lo: 0xbf, hi: 0xbf},\n\t// Block 0x62, offset 0x317\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb0},\n\t{value: 0x2a35, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a55, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a75, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a95, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a75, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2ab5, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2ad5, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2af5, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2b15, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b35, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2b15, lo: 0xbe, hi: 0xbf},\n\t// Block 0x63, offset 0x326\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x64, offset 0x32a\n\t{value: 0x0030, lo: 0x04},\n\t{value: 0x2aa2, lo: 0x80, hi: 0x9d},\n\t{value: 0x305a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x30a2, lo: 0xa0, hi: 0xbf},\n\t// Block 0x65, offset 0x32f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x66, offset 0x332\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x67, offset 0x336\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x68, offset 0x33b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x69, offset 0x340\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6a, offset 0x346\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0xe00d, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x83},\n\t{value: 0x03f5, lo: 0x84, hi: 0x84},\n\t{value: 0x1329, lo: 0x85, hi: 0x85},\n\t{value: 0x447d, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2009, lo: 0xb8, hi: 0xb8},\n\t{value: 0x6e89, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xbf},\n\t// Block 0x6b, offset 0x352\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6c, offset 0x361\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6d, offset 0x367\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x6e, offset 0x36b\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x6f, offset 0x37a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x70, offset 0x37f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x71, offset 0x387\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x72, offset 0x391\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x73, offset 0x39c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x74, offset 0x3a4\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x75, offset 0x3b5\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x76, offset 0x3be\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x77, offset 0x3ce\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x78, offset 0x3db\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x449d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x44b5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x2971, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x44cd, lo: 0xb0, hi: 0xbf},\n\t// Block 0x79, offset 0x3e5\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44ed, lo: 0x80, hi: 0x8f},\n\t{value: 0x450d, lo: 0x90, hi: 0x9f},\n\t{value: 0x452d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x450d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7a, offset 0x3ea\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x7b, offset 0x3f7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7c, offset 0x3fb\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x7d, offset 0x400\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x454d, lo: 0x80, hi: 0xbf},\n\t// Block 0x7e, offset 0x402\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d4d, lo: 0x80, hi: 0x94},\n\t{value: 0x4b0d, lo: 0x95, hi: 0x95},\n\t{value: 0x4fed, lo: 0x96, hi: 0xbf},\n\t// Block 0x7f, offset 0x406\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x552d, lo: 0x80, hi: 0xbf},\n\t// Block 0x80, offset 0x408\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5d2d, lo: 0x80, hi: 0x84},\n\t{value: 0x568d, lo: 0x85, hi: 0x85},\n\t{value: 0x5dcd, lo: 0x86, hi: 0xbf},\n\t// Block 0x81, offset 0x40c\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b8d, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d4d, lo: 0x90, hi: 0x90},\n\t{value: 0x6d8d, lo: 0x91, hi: 0xab},\n\t{value: 0x6ea1, lo: 0xac, hi: 0xac},\n\t{value: 0x70ed, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x710d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x82, offset 0x415\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x730d, lo: 0x80, hi: 0xad},\n\t{value: 0x656d, lo: 0xae, hi: 0xae},\n\t{value: 0x78cd, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f8d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x79ad, lo: 0xb7, hi: 0xbf},\n\t// Block 0x83, offset 0x41b\n\t{value: 0x0028, lo: 0x03},\n\t{value: 0x7c21, lo: 0x80, hi: 0x82},\n\t{value: 0x7be1, lo: 0x83, hi: 0x83},\n\t{value: 0x7c99, lo: 0x84, hi: 0xbf},\n\t// Block 0x84, offset 0x41f\n\t{value: 0x0038, lo: 0x0f},\n\t{value: 0x9db1, lo: 0x80, hi: 0x83},\n\t{value: 0x9e59, lo: 0x84, hi: 0x85},\n\t{value: 0x9e91, lo: 0x86, hi: 0x87},\n\t{value: 0x9ec9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0xa089, lo: 0x92, hi: 0x97},\n\t{value: 0xa1a1, lo: 0x98, hi: 0x9c},\n\t{value: 0xa281, lo: 0x9d, hi: 0xb3},\n\t{value: 0x9d41, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9db1, lo: 0xb5, hi: 0xb5},\n\t{value: 0xa789, lo: 0xb6, hi: 0xbb},\n\t{value: 0xa869, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa7f9, lo: 0xbd, hi: 0xbd},\n\t{value: 0xa8d9, lo: 0xbe, hi: 0xbf},\n\t// Block 0x85, offset 0x42f\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x86, offset 0x439\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x87, offset 0x43e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x88, offset 0x441\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x89, offset 0x447\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x8a, offset 0x44e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8b, offset 0x453\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8c, offset 0x457\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x8d, offset 0x45d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xbf},\n\t// Block 0x8e, offset 0x462\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x8f, offset 0x46b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x90, offset 0x470\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x91, offset 0x476\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8b0d, lo: 0x98, hi: 0x9f},\n\t{value: 0x8b25, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x92, offset 0x47d\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8b25, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8b0d, lo: 0xb8, hi: 0xbf},\n\t// Block 0x93, offset 0x484\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x94, offset 0x48b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x95, offset 0x48f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xae},\n\t{value: 0x0018, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x96, offset 0x494\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x97, offset 0x497\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x98, offset 0x49c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x99, offset 0x4a8\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9a, offset 0x4ae\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x9b, offset 0x4b3\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9c, offset 0x4ba\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9d, offset 0x4c2\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0x9e, offset 0x4c7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0x9f, offset 0x4cb\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa0, offset 0x4db\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa1, offset 0x4e2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa2, offset 0x4e6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa3, offset 0x4ea\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa4, offset 0x4f1\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa5, offset 0x4f3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa6, offset 0x4f6\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xa7, offset 0x4f9\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xa8, offset 0x4fd\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0908, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0xa1},\n\t{value: 0x0c08, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0a08, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xa9, offset 0x506\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xaa, offset 0x50a\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0xa6},\n\t{value: 0x0808, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0a08, lo: 0xb4, hi: 0xbf},\n\t// Block 0xab, offset 0x512\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x84},\n\t{value: 0x0808, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x90},\n\t{value: 0x0a18, lo: 0x91, hi: 0x93},\n\t{value: 0x0c18, lo: 0x94, hi: 0x94},\n\t{value: 0x0818, lo: 0x95, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xac, offset 0x51a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xad, offset 0x51e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xae, offset 0x524\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xaf, offset 0x52d\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xb0, offset 0x539\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb1, offset 0x540\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xb2, offset 0x549\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb3, offset 0x553\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb4, offset 0x55a\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xb5, offset 0x568\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb6, offset 0x575\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xb7, offset 0x582\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb8, offset 0x58b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xb9, offset 0x58f\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xba, offset 0x59f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbb, offset 0x5a7\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xbc, offset 0x5b2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbd, offset 0x5bb\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xbe, offset 0x5c1\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbf, offset 0x5c9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xc0, offset 0x5d2\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xc1, offset 0x5dd\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xc2, offset 0x5e0\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc3, offset 0x5ec\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xc4, offset 0x5f5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xc5, offset 0x5f8\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc6, offset 0x5fd\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xc7, offset 0x602\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x99},\n\t{value: 0x3308, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3008, lo: 0x9c, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xbf},\n\t// Block 0xc8, offset 0x60f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc9, offset 0x61a\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x3b08, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0xbf},\n\t// Block 0xca, offset 0x623\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x98},\n\t{value: 0x3b08, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xbf},\n\t// Block 0xcb, offset 0x62d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xcc, offset 0x630\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xcd, offset 0x63a\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xce, offset 0x643\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xcf, offset 0x64f\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd0, offset 0x65c\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd1, offset 0x669\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x3008, lo: 0x93, hi: 0x94},\n\t{value: 0x3308, lo: 0x95, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x96},\n\t{value: 0x3b08, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd2, offset 0x677\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd3, offset 0x67e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd4, offset 0x682\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xd5, offset 0x685\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xd6, offset 0x68a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xd7, offset 0x68d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0340, lo: 0xb0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd8, offset 0x692\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xd9, offset 0x695\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xda, offset 0x69c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xdb, offset 0x6a3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xdc, offset 0x6a7\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xdd, offset 0x6b2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xde, offset 0x6b5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0xe105, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0xdf, offset 0x6b8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0xe0, offset 0x6bb\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbf},\n\t// Block 0xe1, offset 0x6c1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xe2, offset 0x6c7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xe3, offset 0x6cd\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xe4, offset 0x6d0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xe5, offset 0x6d3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xe6, offset 0x6d6\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0xa3},\n\t{value: 0x0008, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe7, offset 0x6dd\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xe8, offset 0x6e0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xe9, offset 0x6e5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xea, offset 0x6ef\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xeb, offset 0x6f2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xec, offset 0x6f6\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0xb5b9, lo: 0x9e, hi: 0x9e},\n\t{value: 0xb601, lo: 0x9f, hi: 0x9f},\n\t{value: 0xb649, lo: 0xa0, hi: 0xa0},\n\t{value: 0xb6b1, lo: 0xa1, hi: 0xa1},\n\t{value: 0xb719, lo: 0xa2, hi: 0xa2},\n\t{value: 0xb781, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb7e9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xed, offset 0x705\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0xb851, lo: 0xbb, hi: 0xbb},\n\t{value: 0xb899, lo: 0xbc, hi: 0xbc},\n\t{value: 0xb8e1, lo: 0xbd, hi: 0xbd},\n\t{value: 0xb949, lo: 0xbe, hi: 0xbe},\n\t{value: 0xb9b1, lo: 0xbf, hi: 0xbf},\n\t// Block 0xee, offset 0x711\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xba19, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xbf},\n\t// Block 0xef, offset 0x715\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0xf0, offset 0x71a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0xf1, offset 0x71e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xf2, offset 0x723\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0xf3, offset 0x727\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0xf4, offset 0x72c\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xf5, offset 0x735\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xf6, offset 0x740\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xf7, offset 0x746\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xf8, offset 0x74c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xf9, offset 0x752\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xfa, offset 0x758\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0b08, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xfb, offset 0x761\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xb0},\n\t{value: 0x0818, lo: 0xb1, hi: 0xbf},\n\t// Block 0xfc, offset 0x764\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0818, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xfd, offset 0x767\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0818, lo: 0x81, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xfe, offset 0x76b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xff, offset 0x76f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x100, offset 0x773\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x101, offset 0x779\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x102, offset 0x77f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0xc1d9, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0x103, offset 0x784\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0x104, offset 0x787\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xc801, lo: 0x80, hi: 0x80},\n\t{value: 0xc851, lo: 0x81, hi: 0x81},\n\t{value: 0xc8a1, lo: 0x82, hi: 0x82},\n\t{value: 0xc8f1, lo: 0x83, hi: 0x83},\n\t{value: 0xc941, lo: 0x84, hi: 0x84},\n\t{value: 0xc991, lo: 0x85, hi: 0x85},\n\t{value: 0xc9e1, lo: 0x86, hi: 0x86},\n\t{value: 0xca31, lo: 0x87, hi: 0x87},\n\t{value: 0xca81, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0xcad1, lo: 0x90, hi: 0x90},\n\t{value: 0xcaf1, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xbf},\n\t// Block 0x105, offset 0x797\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x106, offset 0x79e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x107, offset 0x7a1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x108, offset 0x7a6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x109, offset 0x7aa\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x10a, offset 0x7b0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0x10b, offset 0x7b5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x10c, offset 0x7b9\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0018, lo: 0xb3, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0x10d, offset 0x7bf\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0018, lo: 0xa5, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xbf},\n\t// Block 0x10e, offset 0x7c5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x10f, offset 0x7c9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x110, offset 0x7d2\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x111, offset 0x7d7\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0x112, offset 0x7da\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x113, offset 0x7dd\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x114, offset 0x7e1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x115, offset 0x7e5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x116, offset 0x7e8\n\t{value: 0x0020, lo: 0x0f},\n\t{value: 0xded1, lo: 0x80, hi: 0x89},\n\t{value: 0x8e35, lo: 0x8a, hi: 0x8a},\n\t{value: 0xe011, lo: 0x8b, hi: 0x9c},\n\t{value: 0x8e55, lo: 0x9d, hi: 0x9d},\n\t{value: 0xe251, lo: 0x9e, hi: 0xa2},\n\t{value: 0x8e75, lo: 0xa3, hi: 0xa3},\n\t{value: 0xe2f1, lo: 0xa4, hi: 0xab},\n\t{value: 0x7f0d, lo: 0xac, hi: 0xac},\n\t{value: 0xe3f1, lo: 0xad, hi: 0xaf},\n\t{value: 0x8e95, lo: 0xb0, hi: 0xb0},\n\t{value: 0xe451, lo: 0xb1, hi: 0xb6},\n\t{value: 0x8eb5, lo: 0xb7, hi: 0xb9},\n\t{value: 0xe511, lo: 0xba, hi: 0xba},\n\t{value: 0x8f15, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe531, lo: 0xbc, hi: 0xbf},\n\t// Block 0x117, offset 0x7f8\n\t{value: 0x0020, lo: 0x10},\n\t{value: 0x93b5, lo: 0x80, hi: 0x80},\n\t{value: 0xf0b1, lo: 0x81, hi: 0x86},\n\t{value: 0x93d5, lo: 0x87, hi: 0x8a},\n\t{value: 0xda11, lo: 0x8b, hi: 0x8b},\n\t{value: 0xf171, lo: 0x8c, hi: 0x96},\n\t{value: 0x9455, lo: 0x97, hi: 0x97},\n\t{value: 0xf2d1, lo: 0x98, hi: 0xa3},\n\t{value: 0x9475, lo: 0xa4, hi: 0xa6},\n\t{value: 0xf451, lo: 0xa7, hi: 0xaa},\n\t{value: 0x94d5, lo: 0xab, hi: 0xab},\n\t{value: 0xf4d1, lo: 0xac, hi: 0xac},\n\t{value: 0x94f5, lo: 0xad, hi: 0xad},\n\t{value: 0xf4f1, lo: 0xae, hi: 0xaf},\n\t{value: 0x9515, lo: 0xb0, hi: 0xb1},\n\t{value: 0xf531, lo: 0xb2, hi: 0xbe},\n\t{value: 0x2040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x118, offset 0x809\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0x119, offset 0x80e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x11a, offset 0x810\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x11b, offset 0x812\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 42780 bytes (41KiB); checksum: 29936AB9\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables13.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.16 && !go1.21\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"13.0.0\"\n\nvar mappings string = \"\" + // Size: 6539 bytes\n\t\"  ̈a ̄23 ́ ̧1o1⁄41⁄23⁄4i̇l·ʼnsdžⱥⱦhjrwy ̆ ̇ ̊ ̨ ̃ ̋lẍ́ ι; ̈́եւاٴوٴۇٴيٴक\" +\n\t\"़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀྲཱྀླྀླཱ\" +\n\t\"ཱྀྀྒྷྜྷྡྷྦྷྫྷྐྵвдостъѣæbdeǝgikmnȣptuɐɑəɛɜŋɔɯvβγδφχρнɒcɕðfɟɡɥɨɩɪʝɭʟɱɰɲɳ\" +\n\t\"ɴɵɸʂʃƫʉʊʋʌzʐʑʒθssάέήίόύώἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧ\" +\n\t\"ιὰιαιάιᾶιι ̈͂ὴιηιήιῆι ̓̀ ̓́ ̓͂ΐ ̔̀ ̔́ ̔͂ΰ ̈̀`ὼιωιώιῶι′′′′′‵‵‵‵‵!!???!!?\" +\n\t\"′′′′0456789+=()rsħnoqsmtmωåאבגדπ1⁄71⁄91⁄101⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83\" +\n\t\"⁄85⁄87⁄81⁄iiivviviiiixxi0⁄3∫∫∫∫∫∮∮∮∮∮1011121314151617181920(10)(11)(12\" +\n\t\")(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫==⫝̸ɫɽȿɀ. ゙ ゚よりコト(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)\" +\n\t\"(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(오전\" +\n\t\")(오후)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(\" +\n\t\"財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)21222324252627282930313233343\" +\n\t\"5참고주의3637383940414243444546474849501月2月3月4月5月6月7月8月9月10月11月12月hgev令和アパート\" +\n\t\"アルファアンペアアールイニングインチウォンエスクードエーカーオンスオームカイリカラットカロリーガロンガンマギガギニーキュリーギルダーキロキロ\" +\n\t\"グラムキロメートルキロワットグラムグラムトンクルゼイロクローネケースコルナコーポサイクルサンチームシリングセンチセントダースデシドルトンナノ\" +\n\t\"ノットハイツパーセントパーツバーレルピアストルピクルピコビルファラッドフィートブッシェルフランヘクタールペソペニヒヘルツペンスページベータポ\" +\n\t\"イントボルトホンポンドホールホーンマイクロマイルマッハマルクマンションミクロンミリミリバールメガメガトンメートルヤードヤールユアンリットルリ\" +\n\t\"ラルピールーブルレムレントゲンワット0点1点2点3点4点5点6点7点8点9点10点11点12点13点14点15点16点17点18点19点20\" +\n\t\"点21点22点23点24点daauovpcdmiu平成昭和大正明治株式会社panamakakbmbgbkcalpfnfmgkghzmldlk\" +\n\t\"lfmnmmmcmkmm2m3m∕sm∕s2rad∕srad∕s2psnsmspvnvmvkvpwnwmwkwbqcccdc∕kgdbgyhah\" +\n\t\"pinkkktlmlnlxphprsrsvwbv∕ma∕m1日2日3日4日5日6日7日8日9日10日11日12日13日14日15日16日17日1\" +\n\t\"8日19日20日21日22日23日24日25日26日27日28日29日30日31日ьɦɬʞʇœʍ𤋮𢡊𢡄𣏕𥉉𥳐𧻓fffiflstմնմեմիվնմ\" +\n\t\"խיִײַעהכלםרתשׁשׂשּׁשּׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּשּתּו\" +\n\t\"ֹבֿכֿפֿאלٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھےۓڭۇۆۈۋۅۉېىئائەئوئۇئۆئۈئېئىیئجئحئم\" +\n\t\"ئيبجبحبخبمبىبيتجتحتختمتىتيثجثمثىثيجحجمحجحمخجخحخمسجسحسخسمصحصمضجضحضخضمطحط\" +\n\t\"مظمعجعمغجغمفجفحفخفمفىفيقحقمقىقيكاكجكحكخكلكمكىكيلجلحلخلملىليمجمحمخمممىمي\" +\n\t\"نجنحنخنمنىنيهجهمهىهييجيحيخيميىييذٰرٰىٰ ٌّ ٍّ َّ ُّ ِّ ّٰئرئزئنبربزبنترت\" +\n\t\"زتنثرثزثنمانرنزننيريزينئخئهبهتهصخلهنههٰيهثهسهشمشهـَّـُّـِّطىطيعىعيغىغيس\" +\n\t\"ىسيشىشيحىحيجىجيخىخيصىصيضىضيشجشحشخشرسرصرضراًتجمتحجتحمتخمتمجتمحتمخجمححميح\" +\n\t\"مىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمى\" +\n\t\"فخمقمحقمملحملحيلحىلججلخملمحمحجمحممحيمجحمجممخجمخممجخهمجهممنحمنحىنجمنجىنم\" +\n\t\"ينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمين\" +\n\t\"حيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلےاللهاكبرمحمدصلعمرسولعليه\" +\n\t\"وسلمصلىصلى الله عليه وسلمجل جلالهریال,:!?_{}[]#&*-<>\\\\$%@ـًـَـُـِـّـْءآ\" +\n\t\"أؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهويلآلألإلا\\x22'/^|~¢£¬¦¥𝅗𝅥𝅘𝅥𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱\" +\n\t\"𝅘𝅥𝅲𝆹𝅥𝆺𝅥𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯ıȷαεζηκλμνξοστυψ∇∂ϝٮڡٯ0,1,2,3,4,5,6,7,8,9,(a)(b)(c\" +\n\t\")(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)〔s\" +\n\t\"〕wzhvsdppvwcmcmdmrdjほかココサ手字双デ二多解天交映無料前後再新初終生販声吹演投捕一三遊左中右指走打禁空合満有月申割営配〔\" +\n\t\"本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕得可丽丸乁你侮侻倂偺備僧像㒞免兔兤具㒹內冗冤仌冬况凵刃㓟刻剆剷㔕勇勉勤勺包匆北卉卑博即卽\" +\n\t\"卿灰及叟叫叱吆咞吸呈周咢哶唐啓啣善喙喫喳嗂圖嘆圗噑噴切壮城埴堍型堲報墬売壷夆夢奢姬娛娧姘婦㛮嬈嬾寃寘寧寳寿将尢㞁屠屮峀岍嵃嵮嵫嵼巡巢㠯巽帨帽\" +\n\t\"幩㡢㡼庰庳庶廊廾舁弢㣇形彫㣣徚忍志忹悁㤺㤜悔惇慈慌慎慺憎憲憤憯懞懲懶成戛扝抱拔捐挽拼捨掃揤搢揅掩㨮摩摾撝摷㩬敏敬旣書晉㬙暑㬈㫤冒冕最暜肭䏙朗\" +\n\t\"望朡杞杓㭉柺枅桒梅梎栟椔㮝楂榣槪檨櫛㰘次歔㱎歲殟殺殻汎沿泍汧洖派海流浩浸涅洴港湮㴳滋滇淹潮濆瀹瀞瀛㶖灊災灷炭煅熜爨爵牐犀犕獺王㺬玥㺸瑇瑜瑱璅\" +\n\t\"瓊㼛甤甾異瘐㿼䀈直眞真睊䀹瞋䁆䂖硎碌磌䃣祖福秫䄯穀穊穏䈂篆築䈧糒䊠糨糣紀絣䌁緇縂繅䌴䍙罺羕翺者聠聰䏕育脃䐋脾媵舄辞䑫芑芋芝劳花芳芽苦若茝荣莭\" +\n\t\"茣莽菧著荓菊菌菜䔫蓱蓳蔖蕤䕝䕡䕫虐虜虧虩蚩蚈蜎蛢蝹蜨蝫螆蟡蠁䗹衠衣裗裞䘵裺㒻䚾䛇誠諭變豕貫賁贛起跋趼跰軔輸邔郱鄑鄛鈸鋗鋘鉼鏹鐕開䦕閷䧦雃嶲霣\" +\n\t\"䩮䩶韠䪲頋頩飢䬳餩馧駂駾䯎鬒鱀鳽䳎䳭鵧䳸麻䵖黹黾鼅鼏鼖鼻\"\n\nvar mappingIndex = []uint16{ // 1650 elements\n\t// Entry 0 - 3F\n\t0x0000, 0x0000, 0x0001, 0x0004, 0x0005, 0x0008, 0x0009, 0x000a,\n\t0x000d, 0x0010, 0x0011, 0x0012, 0x0017, 0x001c, 0x0021, 0x0024,\n\t0x0027, 0x002a, 0x002b, 0x002e, 0x0031, 0x0034, 0x0035, 0x0036,\n\t0x0037, 0x0038, 0x0039, 0x003c, 0x003f, 0x0042, 0x0045, 0x0048,\n\t0x004b, 0x004c, 0x004d, 0x0051, 0x0054, 0x0055, 0x005a, 0x005e,\n\t0x0062, 0x0066, 0x006a, 0x006e, 0x0074, 0x007a, 0x0080, 0x0086,\n\t0x008c, 0x0092, 0x0098, 0x009e, 0x00a4, 0x00aa, 0x00b0, 0x00b6,\n\t0x00bc, 0x00c2, 0x00c8, 0x00ce, 0x00d4, 0x00da, 0x00e0, 0x00e6,\n\t// Entry 40 - 7F\n\t0x00ec, 0x00f2, 0x00f8, 0x00fe, 0x0104, 0x010a, 0x0110, 0x0116,\n\t0x011c, 0x0122, 0x0128, 0x012e, 0x0137, 0x013d, 0x0146, 0x014c,\n\t0x0152, 0x0158, 0x015e, 0x0164, 0x016a, 0x0170, 0x0172, 0x0174,\n\t0x0176, 0x0178, 0x017a, 0x017c, 0x017e, 0x0180, 0x0181, 0x0182,\n\t0x0183, 0x0185, 0x0186, 0x0187, 0x0188, 0x0189, 0x018a, 0x018c,\n\t0x018d, 0x018e, 0x018f, 0x0191, 0x0193, 0x0195, 0x0197, 0x0199,\n\t0x019b, 0x019d, 0x019f, 0x01a0, 0x01a2, 0x01a4, 0x01a6, 0x01a8,\n\t0x01aa, 0x01ac, 0x01ae, 0x01b0, 0x01b1, 0x01b3, 0x01b5, 0x01b6,\n\t// Entry 80 - BF\n\t0x01b8, 0x01ba, 0x01bc, 0x01be, 0x01c0, 0x01c2, 0x01c4, 0x01c6,\n\t0x01c8, 0x01ca, 0x01cc, 0x01ce, 0x01d0, 0x01d2, 0x01d4, 0x01d6,\n\t0x01d8, 0x01da, 0x01dc, 0x01de, 0x01e0, 0x01e2, 0x01e4, 0x01e5,\n\t0x01e7, 0x01e9, 0x01eb, 0x01ed, 0x01ef, 0x01f1, 0x01f3, 0x01f5,\n\t0x01f7, 0x01f9, 0x01fb, 0x01fd, 0x0202, 0x0207, 0x020c, 0x0211,\n\t0x0216, 0x021b, 0x0220, 0x0225, 0x022a, 0x022f, 0x0234, 0x0239,\n\t0x023e, 0x0243, 0x0248, 0x024d, 0x0252, 0x0257, 0x025c, 0x0261,\n\t0x0266, 0x026b, 0x0270, 0x0275, 0x027a, 0x027e, 0x0282, 0x0287,\n\t// Entry C0 - FF\n\t0x0289, 0x028e, 0x0293, 0x0297, 0x029b, 0x02a0, 0x02a5, 0x02aa,\n\t0x02af, 0x02b1, 0x02b6, 0x02bb, 0x02c0, 0x02c2, 0x02c7, 0x02c8,\n\t0x02cd, 0x02d1, 0x02d5, 0x02da, 0x02e0, 0x02e9, 0x02ef, 0x02f8,\n\t0x02fa, 0x02fc, 0x02fe, 0x0300, 0x030c, 0x030d, 0x030e, 0x030f,\n\t0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,\n\t0x0319, 0x031b, 0x031d, 0x031e, 0x0320, 0x0322, 0x0324, 0x0326,\n\t0x0328, 0x032a, 0x032c, 0x032e, 0x0330, 0x0335, 0x033a, 0x0340,\n\t0x0345, 0x034a, 0x034f, 0x0354, 0x0359, 0x035e, 0x0363, 0x0368,\n\t// Entry 100 - 13F\n\t0x036d, 0x0372, 0x0377, 0x037c, 0x0380, 0x0382, 0x0384, 0x0386,\n\t0x038a, 0x038c, 0x038e, 0x0393, 0x0399, 0x03a2, 0x03a8, 0x03b1,\n\t0x03b3, 0x03b5, 0x03b7, 0x03b9, 0x03bb, 0x03bd, 0x03bf, 0x03c1,\n\t0x03c3, 0x03c5, 0x03c7, 0x03cb, 0x03cf, 0x03d3, 0x03d7, 0x03db,\n\t0x03df, 0x03e3, 0x03e7, 0x03eb, 0x03ef, 0x03f3, 0x03ff, 0x0401,\n\t0x0406, 0x0408, 0x040a, 0x040c, 0x040e, 0x040f, 0x0413, 0x0417,\n\t0x041d, 0x0423, 0x0428, 0x042d, 0x0432, 0x0437, 0x043c, 0x0441,\n\t0x0446, 0x044b, 0x0450, 0x0455, 0x045a, 0x045f, 0x0464, 0x0469,\n\t// Entry 140 - 17F\n\t0x046e, 0x0473, 0x0478, 0x047d, 0x0482, 0x0487, 0x048c, 0x0491,\n\t0x0496, 0x049b, 0x04a0, 0x04a5, 0x04aa, 0x04af, 0x04b4, 0x04bc,\n\t0x04c4, 0x04c9, 0x04ce, 0x04d3, 0x04d8, 0x04dd, 0x04e2, 0x04e7,\n\t0x04ec, 0x04f1, 0x04f6, 0x04fb, 0x0500, 0x0505, 0x050a, 0x050f,\n\t0x0514, 0x0519, 0x051e, 0x0523, 0x0528, 0x052d, 0x0532, 0x0537,\n\t0x053c, 0x0541, 0x0546, 0x054b, 0x0550, 0x0555, 0x055a, 0x055f,\n\t0x0564, 0x0569, 0x056e, 0x0573, 0x0578, 0x057a, 0x057c, 0x057e,\n\t0x0580, 0x0582, 0x0584, 0x0586, 0x0588, 0x058a, 0x058c, 0x058e,\n\t// Entry 180 - 1BF\n\t0x0590, 0x0592, 0x0594, 0x0596, 0x059c, 0x05a2, 0x05a4, 0x05a6,\n\t0x05a8, 0x05aa, 0x05ac, 0x05ae, 0x05b0, 0x05b2, 0x05b4, 0x05b6,\n\t0x05b8, 0x05ba, 0x05bc, 0x05be, 0x05c0, 0x05c4, 0x05c8, 0x05cc,\n\t0x05d0, 0x05d4, 0x05d8, 0x05dc, 0x05e0, 0x05e4, 0x05e9, 0x05ee,\n\t0x05f3, 0x05f5, 0x05f7, 0x05fd, 0x0609, 0x0615, 0x0621, 0x062a,\n\t0x0636, 0x063f, 0x0648, 0x0657, 0x0663, 0x066c, 0x0675, 0x067e,\n\t0x068a, 0x0696, 0x069f, 0x06a8, 0x06ae, 0x06b7, 0x06c3, 0x06cf,\n\t0x06d5, 0x06e4, 0x06f6, 0x0705, 0x070e, 0x071d, 0x072c, 0x0738,\n\t// Entry 1C0 - 1FF\n\t0x0741, 0x074a, 0x0753, 0x075f, 0x076e, 0x077a, 0x0783, 0x078c,\n\t0x0795, 0x079b, 0x07a1, 0x07a7, 0x07ad, 0x07b6, 0x07bf, 0x07ce,\n\t0x07d7, 0x07e3, 0x07f2, 0x07fb, 0x0801, 0x0807, 0x0816, 0x0822,\n\t0x0831, 0x083a, 0x0849, 0x084f, 0x0858, 0x0861, 0x086a, 0x0873,\n\t0x087c, 0x0888, 0x0891, 0x0897, 0x08a0, 0x08a9, 0x08b2, 0x08be,\n\t0x08c7, 0x08d0, 0x08d9, 0x08e8, 0x08f4, 0x08fa, 0x0909, 0x090f,\n\t0x091b, 0x0927, 0x0930, 0x0939, 0x0942, 0x094e, 0x0954, 0x095d,\n\t0x0969, 0x096f, 0x097e, 0x0987, 0x098b, 0x098f, 0x0993, 0x0997,\n\t// Entry 200 - 23F\n\t0x099b, 0x099f, 0x09a3, 0x09a7, 0x09ab, 0x09af, 0x09b4, 0x09b9,\n\t0x09be, 0x09c3, 0x09c8, 0x09cd, 0x09d2, 0x09d7, 0x09dc, 0x09e1,\n\t0x09e6, 0x09eb, 0x09f0, 0x09f5, 0x09fa, 0x09fc, 0x09fe, 0x0a00,\n\t0x0a02, 0x0a04, 0x0a06, 0x0a0c, 0x0a12, 0x0a18, 0x0a1e, 0x0a2a,\n\t0x0a2c, 0x0a2e, 0x0a30, 0x0a32, 0x0a34, 0x0a36, 0x0a38, 0x0a3c,\n\t0x0a3e, 0x0a40, 0x0a42, 0x0a44, 0x0a46, 0x0a48, 0x0a4a, 0x0a4c,\n\t0x0a4e, 0x0a50, 0x0a52, 0x0a54, 0x0a56, 0x0a58, 0x0a5a, 0x0a5f,\n\t0x0a65, 0x0a6c, 0x0a74, 0x0a76, 0x0a78, 0x0a7a, 0x0a7c, 0x0a7e,\n\t// Entry 240 - 27F\n\t0x0a80, 0x0a82, 0x0a84, 0x0a86, 0x0a88, 0x0a8a, 0x0a8c, 0x0a8e,\n\t0x0a90, 0x0a96, 0x0a98, 0x0a9a, 0x0a9c, 0x0a9e, 0x0aa0, 0x0aa2,\n\t0x0aa4, 0x0aa6, 0x0aa8, 0x0aaa, 0x0aac, 0x0aae, 0x0ab0, 0x0ab2,\n\t0x0ab4, 0x0ab9, 0x0abe, 0x0ac2, 0x0ac6, 0x0aca, 0x0ace, 0x0ad2,\n\t0x0ad6, 0x0ada, 0x0ade, 0x0ae2, 0x0ae7, 0x0aec, 0x0af1, 0x0af6,\n\t0x0afb, 0x0b00, 0x0b05, 0x0b0a, 0x0b0f, 0x0b14, 0x0b19, 0x0b1e,\n\t0x0b23, 0x0b28, 0x0b2d, 0x0b32, 0x0b37, 0x0b3c, 0x0b41, 0x0b46,\n\t0x0b4b, 0x0b50, 0x0b52, 0x0b54, 0x0b56, 0x0b58, 0x0b5a, 0x0b5c,\n\t// Entry 280 - 2BF\n\t0x0b5e, 0x0b62, 0x0b66, 0x0b6a, 0x0b6e, 0x0b72, 0x0b76, 0x0b7a,\n\t0x0b7c, 0x0b7e, 0x0b80, 0x0b82, 0x0b86, 0x0b8a, 0x0b8e, 0x0b92,\n\t0x0b96, 0x0b9a, 0x0b9e, 0x0ba0, 0x0ba2, 0x0ba4, 0x0ba6, 0x0ba8,\n\t0x0baa, 0x0bac, 0x0bb0, 0x0bb4, 0x0bba, 0x0bc0, 0x0bc4, 0x0bc8,\n\t0x0bcc, 0x0bd0, 0x0bd4, 0x0bd8, 0x0bdc, 0x0be0, 0x0be4, 0x0be8,\n\t0x0bec, 0x0bf0, 0x0bf4, 0x0bf8, 0x0bfc, 0x0c00, 0x0c04, 0x0c08,\n\t0x0c0c, 0x0c10, 0x0c14, 0x0c18, 0x0c1c, 0x0c20, 0x0c24, 0x0c28,\n\t0x0c2c, 0x0c30, 0x0c34, 0x0c36, 0x0c38, 0x0c3a, 0x0c3c, 0x0c3e,\n\t// Entry 2C0 - 2FF\n\t0x0c40, 0x0c42, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4c, 0x0c4e,\n\t0x0c50, 0x0c52, 0x0c54, 0x0c56, 0x0c58, 0x0c5a, 0x0c5c, 0x0c5e,\n\t0x0c60, 0x0c62, 0x0c64, 0x0c66, 0x0c68, 0x0c6a, 0x0c6c, 0x0c6e,\n\t0x0c70, 0x0c72, 0x0c74, 0x0c76, 0x0c78, 0x0c7a, 0x0c7c, 0x0c7e,\n\t0x0c80, 0x0c82, 0x0c86, 0x0c8a, 0x0c8e, 0x0c92, 0x0c96, 0x0c9a,\n\t0x0c9e, 0x0ca2, 0x0ca4, 0x0ca8, 0x0cac, 0x0cb0, 0x0cb4, 0x0cb8,\n\t0x0cbc, 0x0cc0, 0x0cc4, 0x0cc8, 0x0ccc, 0x0cd0, 0x0cd4, 0x0cd8,\n\t0x0cdc, 0x0ce0, 0x0ce4, 0x0ce8, 0x0cec, 0x0cf0, 0x0cf4, 0x0cf8,\n\t// Entry 300 - 33F\n\t0x0cfc, 0x0d00, 0x0d04, 0x0d08, 0x0d0c, 0x0d10, 0x0d14, 0x0d18,\n\t0x0d1c, 0x0d20, 0x0d24, 0x0d28, 0x0d2c, 0x0d30, 0x0d34, 0x0d38,\n\t0x0d3c, 0x0d40, 0x0d44, 0x0d48, 0x0d4c, 0x0d50, 0x0d54, 0x0d58,\n\t0x0d5c, 0x0d60, 0x0d64, 0x0d68, 0x0d6c, 0x0d70, 0x0d74, 0x0d78,\n\t0x0d7c, 0x0d80, 0x0d84, 0x0d88, 0x0d8c, 0x0d90, 0x0d94, 0x0d98,\n\t0x0d9c, 0x0da0, 0x0da4, 0x0da8, 0x0dac, 0x0db0, 0x0db4, 0x0db8,\n\t0x0dbc, 0x0dc0, 0x0dc4, 0x0dc8, 0x0dcc, 0x0dd0, 0x0dd4, 0x0dd8,\n\t0x0ddc, 0x0de0, 0x0de4, 0x0de8, 0x0dec, 0x0df0, 0x0df4, 0x0df8,\n\t// Entry 340 - 37F\n\t0x0dfc, 0x0e00, 0x0e04, 0x0e08, 0x0e0c, 0x0e10, 0x0e14, 0x0e18,\n\t0x0e1d, 0x0e22, 0x0e27, 0x0e2c, 0x0e31, 0x0e36, 0x0e3a, 0x0e3e,\n\t0x0e42, 0x0e46, 0x0e4a, 0x0e4e, 0x0e52, 0x0e56, 0x0e5a, 0x0e5e,\n\t0x0e62, 0x0e66, 0x0e6a, 0x0e6e, 0x0e72, 0x0e76, 0x0e7a, 0x0e7e,\n\t0x0e82, 0x0e86, 0x0e8a, 0x0e8e, 0x0e92, 0x0e96, 0x0e9a, 0x0e9e,\n\t0x0ea2, 0x0ea6, 0x0eaa, 0x0eae, 0x0eb2, 0x0eb6, 0x0ebc, 0x0ec2,\n\t0x0ec8, 0x0ecc, 0x0ed0, 0x0ed4, 0x0ed8, 0x0edc, 0x0ee0, 0x0ee4,\n\t0x0ee8, 0x0eec, 0x0ef0, 0x0ef4, 0x0ef8, 0x0efc, 0x0f00, 0x0f04,\n\t// Entry 380 - 3BF\n\t0x0f08, 0x0f0c, 0x0f10, 0x0f14, 0x0f18, 0x0f1c, 0x0f20, 0x0f24,\n\t0x0f28, 0x0f2c, 0x0f30, 0x0f34, 0x0f38, 0x0f3e, 0x0f44, 0x0f4a,\n\t0x0f50, 0x0f56, 0x0f5c, 0x0f62, 0x0f68, 0x0f6e, 0x0f74, 0x0f7a,\n\t0x0f80, 0x0f86, 0x0f8c, 0x0f92, 0x0f98, 0x0f9e, 0x0fa4, 0x0faa,\n\t0x0fb0, 0x0fb6, 0x0fbc, 0x0fc2, 0x0fc8, 0x0fce, 0x0fd4, 0x0fda,\n\t0x0fe0, 0x0fe6, 0x0fec, 0x0ff2, 0x0ff8, 0x0ffe, 0x1004, 0x100a,\n\t0x1010, 0x1016, 0x101c, 0x1022, 0x1028, 0x102e, 0x1034, 0x103a,\n\t0x1040, 0x1046, 0x104c, 0x1052, 0x1058, 0x105e, 0x1064, 0x106a,\n\t// Entry 3C0 - 3FF\n\t0x1070, 0x1076, 0x107c, 0x1082, 0x1088, 0x108e, 0x1094, 0x109a,\n\t0x10a0, 0x10a6, 0x10ac, 0x10b2, 0x10b8, 0x10be, 0x10c4, 0x10ca,\n\t0x10d0, 0x10d6, 0x10dc, 0x10e2, 0x10e8, 0x10ee, 0x10f4, 0x10fa,\n\t0x1100, 0x1106, 0x110c, 0x1112, 0x1118, 0x111e, 0x1124, 0x112a,\n\t0x1130, 0x1136, 0x113c, 0x1142, 0x1148, 0x114e, 0x1154, 0x115a,\n\t0x1160, 0x1166, 0x116c, 0x1172, 0x1178, 0x1180, 0x1188, 0x1190,\n\t0x1198, 0x11a0, 0x11a8, 0x11b0, 0x11b6, 0x11d7, 0x11e6, 0x11ee,\n\t0x11ef, 0x11f0, 0x11f1, 0x11f2, 0x11f3, 0x11f4, 0x11f5, 0x11f6,\n\t// Entry 400 - 43F\n\t0x11f7, 0x11f8, 0x11f9, 0x11fa, 0x11fb, 0x11fc, 0x11fd, 0x11fe,\n\t0x11ff, 0x1200, 0x1201, 0x1205, 0x1209, 0x120d, 0x1211, 0x1215,\n\t0x1219, 0x121b, 0x121d, 0x121f, 0x1221, 0x1223, 0x1225, 0x1227,\n\t0x1229, 0x122b, 0x122d, 0x122f, 0x1231, 0x1233, 0x1235, 0x1237,\n\t0x1239, 0x123b, 0x123d, 0x123f, 0x1241, 0x1243, 0x1245, 0x1247,\n\t0x1249, 0x124b, 0x124d, 0x124f, 0x1251, 0x1253, 0x1255, 0x1257,\n\t0x1259, 0x125b, 0x125d, 0x125f, 0x1263, 0x1267, 0x126b, 0x126f,\n\t0x1270, 0x1271, 0x1272, 0x1273, 0x1274, 0x1275, 0x1277, 0x1279,\n\t// Entry 440 - 47F\n\t0x127b, 0x127d, 0x127f, 0x1287, 0x128f, 0x129b, 0x12a7, 0x12b3,\n\t0x12bf, 0x12cb, 0x12d3, 0x12db, 0x12e7, 0x12f3, 0x12ff, 0x130b,\n\t0x130d, 0x130f, 0x1311, 0x1313, 0x1315, 0x1317, 0x1319, 0x131b,\n\t0x131d, 0x131f, 0x1321, 0x1323, 0x1325, 0x1327, 0x1329, 0x132b,\n\t0x132e, 0x1331, 0x1333, 0x1335, 0x1337, 0x1339, 0x133b, 0x133d,\n\t0x133f, 0x1341, 0x1343, 0x1345, 0x1347, 0x1349, 0x134b, 0x134d,\n\t0x1350, 0x1353, 0x1356, 0x1359, 0x135c, 0x135f, 0x1362, 0x1365,\n\t0x1368, 0x136b, 0x136e, 0x1371, 0x1374, 0x1377, 0x137a, 0x137d,\n\t// Entry 480 - 4BF\n\t0x1380, 0x1383, 0x1386, 0x1389, 0x138c, 0x138f, 0x1392, 0x1395,\n\t0x1398, 0x139b, 0x13a2, 0x13a4, 0x13a6, 0x13a8, 0x13ab, 0x13ad,\n\t0x13af, 0x13b1, 0x13b3, 0x13b5, 0x13bb, 0x13c1, 0x13c4, 0x13c7,\n\t0x13ca, 0x13cd, 0x13d0, 0x13d3, 0x13d6, 0x13d9, 0x13dc, 0x13df,\n\t0x13e2, 0x13e5, 0x13e8, 0x13eb, 0x13ee, 0x13f1, 0x13f4, 0x13f7,\n\t0x13fa, 0x13fd, 0x1400, 0x1403, 0x1406, 0x1409, 0x140c, 0x140f,\n\t0x1412, 0x1415, 0x1418, 0x141b, 0x141e, 0x1421, 0x1424, 0x1427,\n\t0x142a, 0x142d, 0x1430, 0x1433, 0x1436, 0x1439, 0x143c, 0x143f,\n\t// Entry 4C0 - 4FF\n\t0x1442, 0x1445, 0x1448, 0x1451, 0x145a, 0x1463, 0x146c, 0x1475,\n\t0x147e, 0x1487, 0x1490, 0x1499, 0x149c, 0x149f, 0x14a2, 0x14a5,\n\t0x14a8, 0x14ab, 0x14ae, 0x14b1, 0x14b4, 0x14b7, 0x14ba, 0x14bd,\n\t0x14c0, 0x14c3, 0x14c6, 0x14c9, 0x14cc, 0x14cf, 0x14d2, 0x14d5,\n\t0x14d8, 0x14db, 0x14de, 0x14e1, 0x14e4, 0x14e7, 0x14ea, 0x14ed,\n\t0x14f0, 0x14f3, 0x14f6, 0x14f9, 0x14fc, 0x14ff, 0x1502, 0x1505,\n\t0x1508, 0x150b, 0x150e, 0x1511, 0x1514, 0x1517, 0x151a, 0x151d,\n\t0x1520, 0x1523, 0x1526, 0x1529, 0x152c, 0x152f, 0x1532, 0x1535,\n\t// Entry 500 - 53F\n\t0x1538, 0x153b, 0x153e, 0x1541, 0x1544, 0x1547, 0x154a, 0x154d,\n\t0x1550, 0x1553, 0x1556, 0x1559, 0x155c, 0x155f, 0x1562, 0x1565,\n\t0x1568, 0x156b, 0x156e, 0x1571, 0x1574, 0x1577, 0x157a, 0x157d,\n\t0x1580, 0x1583, 0x1586, 0x1589, 0x158c, 0x158f, 0x1592, 0x1595,\n\t0x1598, 0x159b, 0x159e, 0x15a1, 0x15a4, 0x15a7, 0x15aa, 0x15ad,\n\t0x15b0, 0x15b3, 0x15b6, 0x15b9, 0x15bc, 0x15bf, 0x15c2, 0x15c5,\n\t0x15c8, 0x15cb, 0x15ce, 0x15d1, 0x15d4, 0x15d7, 0x15da, 0x15dd,\n\t0x15e0, 0x15e3, 0x15e6, 0x15e9, 0x15ec, 0x15ef, 0x15f2, 0x15f5,\n\t// Entry 540 - 57F\n\t0x15f8, 0x15fb, 0x15fe, 0x1601, 0x1604, 0x1607, 0x160a, 0x160d,\n\t0x1610, 0x1613, 0x1616, 0x1619, 0x161c, 0x161f, 0x1622, 0x1625,\n\t0x1628, 0x162b, 0x162e, 0x1631, 0x1634, 0x1637, 0x163a, 0x163d,\n\t0x1640, 0x1643, 0x1646, 0x1649, 0x164c, 0x164f, 0x1652, 0x1655,\n\t0x1658, 0x165b, 0x165e, 0x1661, 0x1664, 0x1667, 0x166a, 0x166d,\n\t0x1670, 0x1673, 0x1676, 0x1679, 0x167c, 0x167f, 0x1682, 0x1685,\n\t0x1688, 0x168b, 0x168e, 0x1691, 0x1694, 0x1697, 0x169a, 0x169d,\n\t0x16a0, 0x16a3, 0x16a6, 0x16a9, 0x16ac, 0x16af, 0x16b2, 0x16b5,\n\t// Entry 580 - 5BF\n\t0x16b8, 0x16bb, 0x16be, 0x16c1, 0x16c4, 0x16c7, 0x16ca, 0x16cd,\n\t0x16d0, 0x16d3, 0x16d6, 0x16d9, 0x16dc, 0x16df, 0x16e2, 0x16e5,\n\t0x16e8, 0x16eb, 0x16ee, 0x16f1, 0x16f4, 0x16f7, 0x16fa, 0x16fd,\n\t0x1700, 0x1703, 0x1706, 0x1709, 0x170c, 0x170f, 0x1712, 0x1715,\n\t0x1718, 0x171b, 0x171e, 0x1721, 0x1724, 0x1727, 0x172a, 0x172d,\n\t0x1730, 0x1733, 0x1736, 0x1739, 0x173c, 0x173f, 0x1742, 0x1745,\n\t0x1748, 0x174b, 0x174e, 0x1751, 0x1754, 0x1757, 0x175a, 0x175d,\n\t0x1760, 0x1763, 0x1766, 0x1769, 0x176c, 0x176f, 0x1772, 0x1775,\n\t// Entry 5C0 - 5FF\n\t0x1778, 0x177b, 0x177e, 0x1781, 0x1784, 0x1787, 0x178a, 0x178d,\n\t0x1790, 0x1793, 0x1796, 0x1799, 0x179c, 0x179f, 0x17a2, 0x17a5,\n\t0x17a8, 0x17ab, 0x17ae, 0x17b1, 0x17b4, 0x17b7, 0x17ba, 0x17bd,\n\t0x17c0, 0x17c3, 0x17c6, 0x17c9, 0x17cc, 0x17cf, 0x17d2, 0x17d5,\n\t0x17d8, 0x17db, 0x17de, 0x17e1, 0x17e4, 0x17e7, 0x17ea, 0x17ed,\n\t0x17f0, 0x17f3, 0x17f6, 0x17f9, 0x17fc, 0x17ff, 0x1802, 0x1805,\n\t0x1808, 0x180b, 0x180e, 0x1811, 0x1814, 0x1817, 0x181a, 0x181d,\n\t0x1820, 0x1823, 0x1826, 0x1829, 0x182c, 0x182f, 0x1832, 0x1835,\n\t// Entry 600 - 63F\n\t0x1838, 0x183b, 0x183e, 0x1841, 0x1844, 0x1847, 0x184a, 0x184d,\n\t0x1850, 0x1853, 0x1856, 0x1859, 0x185c, 0x185f, 0x1862, 0x1865,\n\t0x1868, 0x186b, 0x186e, 0x1871, 0x1874, 0x1877, 0x187a, 0x187d,\n\t0x1880, 0x1883, 0x1886, 0x1889, 0x188c, 0x188f, 0x1892, 0x1895,\n\t0x1898, 0x189b, 0x189e, 0x18a1, 0x18a4, 0x18a7, 0x18aa, 0x18ad,\n\t0x18b0, 0x18b3, 0x18b6, 0x18b9, 0x18bc, 0x18bf, 0x18c2, 0x18c5,\n\t0x18c8, 0x18cb, 0x18ce, 0x18d1, 0x18d4, 0x18d7, 0x18da, 0x18dd,\n\t0x18e0, 0x18e3, 0x18e6, 0x18e9, 0x18ec, 0x18ef, 0x18f2, 0x18f5,\n\t// Entry 640 - 67F\n\t0x18f8, 0x18fb, 0x18fe, 0x1901, 0x1904, 0x1907, 0x190a, 0x190d,\n\t0x1910, 0x1913, 0x1916, 0x1919, 0x191c, 0x191f, 0x1922, 0x1925,\n\t0x1928, 0x192b, 0x192e, 0x1931, 0x1934, 0x1937, 0x193a, 0x193d,\n\t0x1940, 0x1943, 0x1946, 0x1949, 0x194c, 0x194f, 0x1952, 0x1955,\n\t0x1958, 0x195b, 0x195e, 0x1961, 0x1964, 0x1967, 0x196a, 0x196d,\n\t0x1970, 0x1973, 0x1976, 0x1979, 0x197c, 0x197f, 0x1982, 0x1985,\n\t0x1988, 0x198b,\n} // Size: 3324 bytes\n\nvar xorData string = \"\" + // Size: 4862 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x021\\x00\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\" +\n\t\"\\x03\\x1c\\x02\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\" +\n\t\"\\xc1r\\x02\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\" +\n\t\"\\x03\\xc1s*\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\" +\n\t\"\\x83\\xab\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\" +\n\t\"\\xe1\\xcd\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\" +\n\t\"\\x9a\\xec\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c\" +\n\t\"!\\x03\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03\" +\n\t\"ʦ\\x93\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\" +\n\t\"\\x03\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\" +\n\t\"\\xfa\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\" +\n\t\"\\x03\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\" +\n\t\"\\xe3\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\" +\n\t\"\\x03\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\" +\n\t\"\\xe8\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\" +\n\t\"\\x0b\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\" +\n\t\"\\x05\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\" +\n\t\"\\x0786\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\" +\n\t\"\\x03\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\" +\n\t\"\\x03\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\" +\n\t\"\\x03\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\" +\n\t\"\\x07\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\" +\n\t\"\\x07\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\" +\n\t\"\\x07\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\" +\n\t\"\\x0a\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\" +\n\t\"\\x07\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\" +\n\t\"\\x03\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\" +\n\t\"\\x044\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\" +\n\t\"\\x04+ \\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\" +\n\t\"\\x22\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\" +\n\t\"\\x03\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\" +\n\t\"\\x03\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\" +\n\t\"\\x054\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\" +\n\t\"\\x05):\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\" +\n\t\"\\x1e\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\" +\n\t\"\\x03\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\" +\n\t\"\\x1b\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\" +\n\t\"\\x03\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\" +\n\t\"\\x06\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\" +\n\t\"\\x03\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\" +\n\t\"\\x0a6\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\" +\n\t\"\\x1f\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\" +\n\t\"\\x0a\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\" +\n\t\"\\x02\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\" +\n\t\"\\x03\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\" +\n\t\"\\x00\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\" +\n\t\"\\x10\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#\" +\n\t\"<\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\" +\n\t\"\\x00\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\" +\n\t\"\\x03\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\" +\n\t\"\\x22\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\" +\n\t\"\\x12\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05\" +\n\t\"<\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x03\\x0b)\\x08\\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\" +\n\t\"\\x10\\x03\\x0b!0\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\" +\n\t\"\\x03\\x09\\x1f\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\" +\n\t\"\\x03\\x0a\\x01\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\" +\n\t\"\\x08='\\x03\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\" +\n\t\"\\x09\\x0c\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06\" +\n\t\"!3\\x03\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\" +\n\t\"\\x03\\x07<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\" +\n\t\"\\x01\\x00\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\" +\n\t\"\\x09\\x11\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\" +\n\t\"\\x0a/1\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\" +\n\t\"\\x07<3\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\" +\n\t\"\\x13\\x00\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(\" +\n\t\";\\x03\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\" +\n\t\"\\x14$\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\" +\n\t\"\\x0a\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\" +\n\t\"\\x01\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\" +\n\t\"\\x03\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\" +\n\t\"\\x07\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\" +\n\t\"\\x0a\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\" +\n\t\"\\x0b\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\" +\n\t\"\\x08\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\" +\n\t\"\\x03\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\" +\n\t\"\\x03\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\" +\n\t\"\\x09\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a\" +\n\t\".\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x01\\x1e\\x03\\x0f$!\\x03\" +\n\t\"\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\\x18\\x03\\x0f\" +\n\t\"\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\\x03\\x0e\\x0d)\" +\n\t\"\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\\x03\\x0d. \\x03\" +\n\t\"\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\\x0d\\x0d\\x0f\\x03\" +\n\t\"\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\\x0c\\x09:\\x03\\x0e\" +\n\t\"\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\\x03\\x0c\\x1f\\x1c\" +\n\t\"\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\\x0b<+\\x03\\x0b8\" +\n\t\"\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\\x22&\\x03\\x0b\\x1a\" +\n\t\"\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\\x0a!\\x1a\\x03\\x0a!\" +\n\t\"7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\\x0a\\x00 \\x03\\x0a\" +\n\t\"\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\\x1b-\\x03\\x09-\" +\n\t\"\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\\x1f\\x03\\x093\" +\n\t\"\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\\x16\\x03\\x09\" +\n\t\"\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\\x03\\x09\\x1a\" +\n\t\"\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\\x08\\x02*\" +\n\t\"\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\\x070\\x0c\" +\n\t\"\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x0671\\x03\" +\n\t\"\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \\x1d\\x03\" +\n\t\"\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 30196 bytes (29.49 KiB). Checksum: e2ae95a945f04016.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 126:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 126\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 128 blocks, 8192 entries, 16384 bytes\n// The third block is the zero block.\nvar idnaValues = [8192]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x0012, 0xe9: 0x0018,\n\t0xea: 0x0019, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x0022,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0029, 0xf3: 0x0031, 0xf4: 0x003a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x0042, 0xf9: 0x0049, 0xfa: 0x0051, 0xfb: 0x0018,\n\t0xfc: 0x0059, 0xfd: 0x0061, 0xfe: 0x0069, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0071, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0079,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0079, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x0081, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x0089,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x0091, 0x1c5: 0x0091,\n\t0x1c6: 0x0091, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0099, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x00a1, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x00d2, 0x259: 0x00da, 0x25a: 0x00e2, 0x25b: 0x00ea, 0x25c: 0x00f2, 0x25d: 0x00fa,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0101, 0x262: 0x0089, 0x263: 0x0109,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0111, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x011a, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x0122, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x003a, 0x2c5: 0x012a,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0139,\n\t0x4b6: 0x0141, 0x4b7: 0x0149, 0x4b8: 0x0151, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,\n\t0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,\n\t0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,\n\t0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0c08, 0x557: 0x0c08,\n\t0x558: 0x0c08, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,\n\t0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,\n\t0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,\n\t0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,\n\t0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040,\n\t0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040,\n\t0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308,\n\t0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008,\n\t0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308,\n\t0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308,\n\t0x598: 0x0159, 0x599: 0x0161, 0x59a: 0x0169, 0x59b: 0x0171, 0x59c: 0x0179, 0x59d: 0x0181,\n\t0x59e: 0x0189, 0x59f: 0x0191, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308,\n\t0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008,\n\t0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,\n\t0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008,\n\t0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008,\n\t0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008,\n\t0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008,\n\t0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040,\n\t0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008,\n\t0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008,\n\t0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008,\n\t0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040,\n\t0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040,\n\t0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040,\n\t0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008,\n\t0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008,\n\t0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0199, 0x61d: 0x01a1,\n\t0x61e: 0x0040, 0x61f: 0x01a9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308,\n\t0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018,\n\t0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018,\n\t0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x3308, 0x63f: 0x0040,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008,\n\t0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040,\n\t0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040,\n\t0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008,\n\t0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008,\n\t0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008,\n\t0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x01b1, 0x674: 0x0040, 0x675: 0x0008,\n\t0x676: 0x01b9, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040,\n\t0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040,\n\t0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308,\n\t0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308,\n\t0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040,\n\t0x698: 0x0040, 0x699: 0x01c1, 0x69a: 0x01c9, 0x69b: 0x01d1, 0x69c: 0x0008, 0x69d: 0x0040,\n\t0x69e: 0x01d9, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040,\n\t0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308,\n\t0x6b6: 0x0018, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008,\n\t0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008,\n\t0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008,\n\t0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008,\n\t0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008,\n\t0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008,\n\t0x6e4: 0x0008, 0x6e5: 0x0008, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0040,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008,\n\t0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308,\n\t0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008,\n\t0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040,\n\t0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040,\n\t0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040,\n\t0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308,\n\t0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040,\n\t0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308,\n\t0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008,\n\t0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008,\n\t0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008,\n\t0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008,\n\t0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008,\n\t0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008,\n\t0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040,\n\t0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040,\n\t0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008,\n\t0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040,\n\t0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x3308, 0x796: 0x3308, 0x797: 0x3008,\n\t0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x01e1, 0x79d: 0x01e9,\n\t0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308,\n\t0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008,\n\t0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018,\n\t0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008,\n\t0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040,\n\t0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040,\n\t0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040,\n\t0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040,\n\t0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008,\n\t0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008,\n\t0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040,\n\t0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040,\n\t0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308,\n\t0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040,\n\t0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040,\n\t0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040,\n\t0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308,\n\t0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008,\n\t0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040,\n\t0x836: 0x0040, 0x837: 0x0018, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018,\n\t0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0018, 0x845: 0x0008,\n\t0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008,\n\t0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040,\n\t0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008,\n\t0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008,\n\t0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008,\n\t0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008,\n\t0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040,\n\t0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040,\n\t0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,\n\t0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040,\n\t0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040,\n\t0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040,\n\t0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,\n\t0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040,\n\t0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040,\n\t0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040,\n\t0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,\n\t0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008,\n\t0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018,\n\t0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,\n\t0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018,\n\t0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008,\n\t0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040,\n\t0x906: 0x0008, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0008, 0x90a: 0x0008, 0x90b: 0x0040,\n\t0x90c: 0x0008, 0x90d: 0x0008, 0x90e: 0x0008, 0x90f: 0x0008, 0x910: 0x0008, 0x911: 0x0008,\n\t0x912: 0x0008, 0x913: 0x0008, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008,\n\t0x918: 0x0008, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008,\n\t0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0008, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,\n\t0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0008, 0x929: 0x0008,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0008, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,\n\t0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x01f9, 0x934: 0x3308, 0x935: 0x3308,\n\t0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x3b08, 0x93b: 0x3308,\n\t0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x0211, 0x944: 0x0008, 0x945: 0x0008,\n\t0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,\n\t0x94c: 0x0008, 0x94d: 0x0219, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,\n\t0x952: 0x0221, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0229,\n\t0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0231, 0x95d: 0x0008,\n\t0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,\n\t0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0239,\n\t0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040,\n\t0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0241, 0x974: 0x3308, 0x975: 0x0249,\n\t0x976: 0x0251, 0x977: 0x0259, 0x978: 0x0261, 0x979: 0x0269, 0x97a: 0x3308, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x3308, 0x981: 0x0271, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018,\n\t0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308,\n\t0x992: 0x3308, 0x993: 0x0279, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308,\n\t0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0281,\n\t0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0289, 0x9a3: 0x3308,\n\t0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0291, 0x9a8: 0x3308, 0x9a9: 0x3308,\n\t0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0299, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308,\n\t0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308,\n\t0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x02a1, 0x9ba: 0x3308, 0x9bb: 0x3308,\n\t0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008,\n\t0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,\n\t0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008,\n\t0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008,\n\t0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008,\n\t0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008,\n\t0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008,\n\t0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0019, 0x9ed: 0x02e1, 0x9ee: 0x02e9, 0x9ef: 0x0008,\n\t0x9f0: 0x02f1, 0x9f1: 0x02f9, 0x9f2: 0x0301, 0x9f3: 0x0309, 0x9f4: 0x00a9, 0x9f5: 0x0311,\n\t0x9f6: 0x00b1, 0x9f7: 0x0319, 0x9f8: 0x0101, 0x9f9: 0x0321, 0x9fa: 0x0329, 0x9fb: 0x0008,\n\t0x9fc: 0x0051, 0x9fd: 0x0331, 0x9fe: 0x0339, 0x9ff: 0x00b9,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0341, 0xa01: 0x0349, 0xa02: 0x00c1, 0xa03: 0x0019, 0xa04: 0x0351, 0xa05: 0x0359,\n\t0xa06: 0x05b5, 0xa07: 0x02e9, 0xa08: 0x02f1, 0xa09: 0x02f9, 0xa0a: 0x0361, 0xa0b: 0x0369,\n\t0xa0c: 0x0371, 0xa0d: 0x0309, 0xa0e: 0x0008, 0xa0f: 0x0319, 0xa10: 0x0321, 0xa11: 0x0379,\n\t0xa12: 0x0051, 0xa13: 0x0381, 0xa14: 0x05cd, 0xa15: 0x05cd, 0xa16: 0x0339, 0xa17: 0x0341,\n\t0xa18: 0x0349, 0xa19: 0x05b5, 0xa1a: 0x0389, 0xa1b: 0x0391, 0xa1c: 0x05e5, 0xa1d: 0x0399,\n\t0xa1e: 0x03a1, 0xa1f: 0x03a9, 0xa20: 0x03b1, 0xa21: 0x03b9, 0xa22: 0x0311, 0xa23: 0x00b9,\n\t0xa24: 0x0349, 0xa25: 0x0391, 0xa26: 0x0399, 0xa27: 0x03a1, 0xa28: 0x03c1, 0xa29: 0x03b1,\n\t0xa2a: 0x03b9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008,\n\t0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008,\n\t0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x03c9, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008,\n\t0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008,\n\t0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008,\n\t0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008,\n\t0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008,\n\t0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x03d1, 0xa5c: 0x03d9, 0xa5d: 0x03e1,\n\t0xa5e: 0x03e9, 0xa5f: 0x0371, 0xa60: 0x03f1, 0xa61: 0x03f9, 0xa62: 0x0401, 0xa63: 0x0409,\n\t0xa64: 0x0411, 0xa65: 0x0419, 0xa66: 0x0421, 0xa67: 0x05fd, 0xa68: 0x0429, 0xa69: 0x0431,\n\t0xa6a: 0xe17d, 0xa6b: 0x0439, 0xa6c: 0x0441, 0xa6d: 0x0449, 0xa6e: 0x0451, 0xa6f: 0x0459,\n\t0xa70: 0x0461, 0xa71: 0x0469, 0xa72: 0x0471, 0xa73: 0x0479, 0xa74: 0x0481, 0xa75: 0x0489,\n\t0xa76: 0x0491, 0xa77: 0x0499, 0xa78: 0x0615, 0xa79: 0x04a1, 0xa7a: 0x04a9, 0xa7b: 0x04b1,\n\t0xa7c: 0x04b9, 0xa7d: 0x04c1, 0xa7e: 0x04c9, 0xa7f: 0x04d1,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,\n\t0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,\n\t0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,\n\t0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008,\n\t0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008,\n\t0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,\n\t0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,\n\t0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,\n\t0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,\n\t0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,\n\t0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,\n\t0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,\n\t0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,\n\t0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,\n\t0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x062d, 0xadb: 0x064d, 0xadc: 0x0008, 0xadd: 0x0008,\n\t0xade: 0x04d9, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,\n\t0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,\n\t0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,\n\t0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,\n\t0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,\n\t0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008,\n\t0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045,\n\t0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008,\n\t0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,\n\t0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045,\n\t0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008,\n\t0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045,\n\t0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045,\n\t0xb30: 0x0008, 0xb31: 0x04e1, 0xb32: 0x0008, 0xb33: 0x04e9, 0xb34: 0x0008, 0xb35: 0x04f1,\n\t0xb36: 0x0008, 0xb37: 0x04f9, 0xb38: 0x0008, 0xb39: 0x0501, 0xb3a: 0x0008, 0xb3b: 0x0509,\n\t0xb3c: 0x0008, 0xb3d: 0x0511, 0xb3e: 0x0040, 0xb3f: 0x0040,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x0519, 0xb41: 0x0521, 0xb42: 0x0529, 0xb43: 0x0531, 0xb44: 0x0539, 0xb45: 0x0541,\n\t0xb46: 0x0549, 0xb47: 0x0551, 0xb48: 0x0519, 0xb49: 0x0521, 0xb4a: 0x0529, 0xb4b: 0x0531,\n\t0xb4c: 0x0539, 0xb4d: 0x0541, 0xb4e: 0x0549, 0xb4f: 0x0551, 0xb50: 0x0559, 0xb51: 0x0561,\n\t0xb52: 0x0569, 0xb53: 0x0571, 0xb54: 0x0579, 0xb55: 0x0581, 0xb56: 0x0589, 0xb57: 0x0591,\n\t0xb58: 0x0559, 0xb59: 0x0561, 0xb5a: 0x0569, 0xb5b: 0x0571, 0xb5c: 0x0579, 0xb5d: 0x0581,\n\t0xb5e: 0x0589, 0xb5f: 0x0591, 0xb60: 0x0599, 0xb61: 0x05a1, 0xb62: 0x05a9, 0xb63: 0x05b1,\n\t0xb64: 0x05b9, 0xb65: 0x05c1, 0xb66: 0x05c9, 0xb67: 0x05d1, 0xb68: 0x0599, 0xb69: 0x05a1,\n\t0xb6a: 0x05a9, 0xb6b: 0x05b1, 0xb6c: 0x05b9, 0xb6d: 0x05c1, 0xb6e: 0x05c9, 0xb6f: 0x05d1,\n\t0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x05d9, 0xb73: 0x05e1, 0xb74: 0x05e9, 0xb75: 0x0040,\n\t0xb76: 0x0008, 0xb77: 0x05f1, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x0665, 0xb7b: 0x04e1,\n\t0xb7c: 0x05e1, 0xb7d: 0x067e, 0xb7e: 0x05f9, 0xb7f: 0x069e,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x06be, 0xb81: 0x0602, 0xb82: 0x0609, 0xb83: 0x0611, 0xb84: 0x0619, 0xb85: 0x0040,\n\t0xb86: 0x0008, 0xb87: 0x0621, 0xb88: 0x06dd, 0xb89: 0x04e9, 0xb8a: 0x06f5, 0xb8b: 0x04f1,\n\t0xb8c: 0x0611, 0xb8d: 0x062a, 0xb8e: 0x0632, 0xb8f: 0x063a, 0xb90: 0x0008, 0xb91: 0x0008,\n\t0xb92: 0x0008, 0xb93: 0x0641, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008,\n\t0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x070d, 0xb9b: 0x04f9, 0xb9c: 0x0040, 0xb9d: 0x064a,\n\t0xb9e: 0x0652, 0xb9f: 0x065a, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x0661,\n\t0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045,\n\t0xbaa: 0x0725, 0xbab: 0x0509, 0xbac: 0xe04d, 0xbad: 0x066a, 0xbae: 0x012a, 0xbaf: 0x0672,\n\t0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x0679, 0xbb3: 0x0681, 0xbb4: 0x0689, 0xbb5: 0x0040,\n\t0xbb6: 0x0008, 0xbb7: 0x0691, 0xbb8: 0x073d, 0xbb9: 0x0501, 0xbba: 0x0515, 0xbbb: 0x0511,\n\t0xbbc: 0x0681, 0xbbd: 0x0756, 0xbbe: 0x0776, 0xbbf: 0x0040,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a,\n\t0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0,\n\t0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d,\n\t0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x0796,\n\t0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,\n\t0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018,\n\t0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040,\n\t0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a,\n\t0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x0699, 0xbf4: 0x06a1, 0xbf5: 0x0018,\n\t0xbf6: 0x06a9, 0xbf7: 0x06b1, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018,\n\t0xbfc: 0x06ba, 0xbfd: 0x0018, 0xbfe: 0x07b6, 0xbff: 0x0018,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018,\n\t0xc06: 0x0018, 0xc07: 0x06c2, 0xc08: 0x06ca, 0xc09: 0x06d2, 0xc0a: 0x0018, 0xc0b: 0x0018,\n\t0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018,\n\t0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x06d9,\n\t0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,\n\t0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340,\n\t0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040,\n\t0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340,\n\t0xc30: 0x06e1, 0xc31: 0x0311, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x06e9, 0xc35: 0x06f1,\n\t0xc36: 0x06f9, 0xc37: 0x0701, 0xc38: 0x0709, 0xc39: 0x0711, 0xc3a: 0x071a, 0xc3b: 0x07d5,\n\t0xc3c: 0x0722, 0xc3d: 0x072a, 0xc3e: 0x0732, 0xc3f: 0x0329,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x06e1, 0xc41: 0x0049, 0xc42: 0x0029, 0xc43: 0x0031, 0xc44: 0x06e9, 0xc45: 0x06f1,\n\t0xc46: 0x06f9, 0xc47: 0x0701, 0xc48: 0x0709, 0xc49: 0x0711, 0xc4a: 0x071a, 0xc4b: 0x07ed,\n\t0xc4c: 0x0722, 0xc4d: 0x072a, 0xc4e: 0x0732, 0xc4f: 0x0040, 0xc50: 0x0019, 0xc51: 0x02f9,\n\t0xc52: 0x0051, 0xc53: 0x0109, 0xc54: 0x0361, 0xc55: 0x00a9, 0xc56: 0x0319, 0xc57: 0x0101,\n\t0xc58: 0x0321, 0xc59: 0x0329, 0xc5a: 0x0339, 0xc5b: 0x0089, 0xc5c: 0x0341, 0xc5d: 0x0040,\n\t0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018,\n\t0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x0739, 0xc69: 0x0018,\n\t0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018,\n\t0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018,\n\t0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018,\n\t0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x0806, 0xc81: 0x0826, 0xc82: 0x03d9, 0xc83: 0x0845, 0xc84: 0x0018, 0xc85: 0x0866,\n\t0xc86: 0x0886, 0xc87: 0x0369, 0xc88: 0x0018, 0xc89: 0x08a5, 0xc8a: 0x0309, 0xc8b: 0x00a9,\n\t0xc8c: 0x00a9, 0xc8d: 0x00a9, 0xc8e: 0x00a9, 0xc8f: 0x0741, 0xc90: 0x0311, 0xc91: 0x0311,\n\t0xc92: 0x0101, 0xc93: 0x0101, 0xc94: 0x0018, 0xc95: 0x0329, 0xc96: 0x0749, 0xc97: 0x0018,\n\t0xc98: 0x0018, 0xc99: 0x0339, 0xc9a: 0x0751, 0xc9b: 0x00b9, 0xc9c: 0x00b9, 0xc9d: 0x00b9,\n\t0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x0759, 0xca1: 0x08c5, 0xca2: 0x0761, 0xca3: 0x0018,\n\t0xca4: 0x04b1, 0xca5: 0x0018, 0xca6: 0x0769, 0xca7: 0x0018, 0xca8: 0x04b1, 0xca9: 0x0018,\n\t0xcaa: 0x0319, 0xcab: 0x0771, 0xcac: 0x02e9, 0xcad: 0x03d9, 0xcae: 0x0018, 0xcaf: 0x02f9,\n\t0xcb0: 0x02f9, 0xcb1: 0x03f1, 0xcb2: 0x0040, 0xcb3: 0x0321, 0xcb4: 0x0051, 0xcb5: 0x0779,\n\t0xcb6: 0x0781, 0xcb7: 0x0789, 0xcb8: 0x0791, 0xcb9: 0x0311, 0xcba: 0x0018, 0xcbb: 0x08e5,\n\t0xcbc: 0x0799, 0xcbd: 0x03a1, 0xcbe: 0x03a1, 0xcbf: 0x0799,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x0905, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x02f1,\n\t0xcc6: 0x02f1, 0xcc7: 0x02f9, 0xcc8: 0x0311, 0xcc9: 0x00b1, 0xcca: 0x0018, 0xccb: 0x0018,\n\t0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x07a1, 0xcd1: 0x07a9,\n\t0xcd2: 0x07b1, 0xcd3: 0x07b9, 0xcd4: 0x07c1, 0xcd5: 0x07c9, 0xcd6: 0x07d1, 0xcd7: 0x07d9,\n\t0xcd8: 0x07e1, 0xcd9: 0x07e9, 0xcda: 0x07f1, 0xcdb: 0x07f9, 0xcdc: 0x0801, 0xcdd: 0x0809,\n\t0xcde: 0x0811, 0xcdf: 0x0819, 0xce0: 0x0311, 0xce1: 0x0821, 0xce2: 0x091d, 0xce3: 0x0829,\n\t0xce4: 0x0391, 0xce5: 0x0831, 0xce6: 0x093d, 0xce7: 0x0839, 0xce8: 0x0841, 0xce9: 0x0109,\n\t0xcea: 0x0849, 0xceb: 0x095d, 0xcec: 0x0101, 0xced: 0x03d9, 0xcee: 0x02f1, 0xcef: 0x0321,\n\t0xcf0: 0x0311, 0xcf1: 0x0821, 0xcf2: 0x097d, 0xcf3: 0x0829, 0xcf4: 0x0391, 0xcf5: 0x0831,\n\t0xcf6: 0x099d, 0xcf7: 0x0839, 0xcf8: 0x0841, 0xcf9: 0x0109, 0xcfa: 0x0849, 0xcfb: 0x09bd,\n\t0xcfc: 0x0101, 0xcfd: 0x03d9, 0xcfe: 0x02f1, 0xcff: 0x0321,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018,\n\t0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040,\n\t0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,\n\t0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,\n\t0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040,\n\t0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x0049, 0xd21: 0x0029, 0xd22: 0x0031, 0xd23: 0x06e9,\n\t0xd24: 0x06f1, 0xd25: 0x06f9, 0xd26: 0x0701, 0xd27: 0x0709, 0xd28: 0x0711, 0xd29: 0x0879,\n\t0xd2a: 0x0881, 0xd2b: 0x0889, 0xd2c: 0x0891, 0xd2d: 0x0899, 0xd2e: 0x08a1, 0xd2f: 0x08a9,\n\t0xd30: 0x08b1, 0xd31: 0x08b9, 0xd32: 0x08c1, 0xd33: 0x08c9, 0xd34: 0x0a1e, 0xd35: 0x0a3e,\n\t0xd36: 0x0a5e, 0xd37: 0x0a7e, 0xd38: 0x0a9e, 0xd39: 0x0abe, 0xd3a: 0x0ade, 0xd3b: 0x0afe,\n\t0xd3c: 0x0b1e, 0xd3d: 0x08d2, 0xd3e: 0x08da, 0xd3f: 0x08e2,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x08ea, 0xd41: 0x08f2, 0xd42: 0x08fa, 0xd43: 0x0902, 0xd44: 0x090a, 0xd45: 0x0912,\n\t0xd46: 0x091a, 0xd47: 0x0922, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040,\n\t0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,\n\t0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,\n\t0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b3e, 0xd5d: 0x0b5e,\n\t0xd5e: 0x0b7e, 0xd5f: 0x0b9e, 0xd60: 0x0bbe, 0xd61: 0x0bde, 0xd62: 0x0bfe, 0xd63: 0x0c1e,\n\t0xd64: 0x0c3e, 0xd65: 0x0c5e, 0xd66: 0x0c7e, 0xd67: 0x0c9e, 0xd68: 0x0cbe, 0xd69: 0x0cde,\n\t0xd6a: 0x0cfe, 0xd6b: 0x0d1e, 0xd6c: 0x0d3e, 0xd6d: 0x0d5e, 0xd6e: 0x0d7e, 0xd6f: 0x0d9e,\n\t0xd70: 0x0dbe, 0xd71: 0x0dde, 0xd72: 0x0dfe, 0xd73: 0x0e1e, 0xd74: 0x0e3e, 0xd75: 0x0e5e,\n\t0xd76: 0x0019, 0xd77: 0x02e9, 0xd78: 0x03d9, 0xd79: 0x02f1, 0xd7a: 0x02f9, 0xd7b: 0x03f1,\n\t0xd7c: 0x0309, 0xd7d: 0x00a9, 0xd7e: 0x0311, 0xd7f: 0x00b1,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0319, 0xd81: 0x0101, 0xd82: 0x0321, 0xd83: 0x0329, 0xd84: 0x0051, 0xd85: 0x0339,\n\t0xd86: 0x0751, 0xd87: 0x00b9, 0xd88: 0x0089, 0xd89: 0x0341, 0xd8a: 0x0349, 0xd8b: 0x0391,\n\t0xd8c: 0x00c1, 0xd8d: 0x0109, 0xd8e: 0x00c9, 0xd8f: 0x04b1, 0xd90: 0x0019, 0xd91: 0x02e9,\n\t0xd92: 0x03d9, 0xd93: 0x02f1, 0xd94: 0x02f9, 0xd95: 0x03f1, 0xd96: 0x0309, 0xd97: 0x00a9,\n\t0xd98: 0x0311, 0xd99: 0x00b1, 0xd9a: 0x0319, 0xd9b: 0x0101, 0xd9c: 0x0321, 0xd9d: 0x0329,\n\t0xd9e: 0x0051, 0xd9f: 0x0339, 0xda0: 0x0751, 0xda1: 0x00b9, 0xda2: 0x0089, 0xda3: 0x0341,\n\t0xda4: 0x0349, 0xda5: 0x0391, 0xda6: 0x00c1, 0xda7: 0x0109, 0xda8: 0x00c9, 0xda9: 0x04b1,\n\t0xdaa: 0x06e1, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018,\n\t0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018,\n\t0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018,\n\t0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008,\n\t0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008,\n\t0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008,\n\t0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008,\n\t0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008,\n\t0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x0941, 0xde3: 0x0ed5,\n\t0xde4: 0x0949, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d,\n\t0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0359, 0xdee: 0x0441, 0xdef: 0x0351,\n\t0xdf0: 0x03d1, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d,\n\t0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008,\n\t0xdfc: 0x00b1, 0xdfd: 0x0391, 0xdfe: 0x0951, 0xdff: 0x0959,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008,\n\t0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008,\n\t0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008,\n\t0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008,\n\t0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008,\n\t0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008,\n\t0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018,\n\t0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308,\n\t0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040,\n\t0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018,\n\t0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x2715, 0xe41: 0x2735, 0xe42: 0x2755, 0xe43: 0x2775, 0xe44: 0x2795, 0xe45: 0x27b5,\n\t0xe46: 0x27d5, 0xe47: 0x27f5, 0xe48: 0x2815, 0xe49: 0x2835, 0xe4a: 0x2855, 0xe4b: 0x2875,\n\t0xe4c: 0x2895, 0xe4d: 0x28b5, 0xe4e: 0x28d5, 0xe4f: 0x28f5, 0xe50: 0x2915, 0xe51: 0x2935,\n\t0xe52: 0x2955, 0xe53: 0x2975, 0xe54: 0x2995, 0xe55: 0x29b5, 0xe56: 0x0040, 0xe57: 0x0040,\n\t0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040,\n\t0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040,\n\t0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040,\n\t0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040,\n\t0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040,\n\t0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040,\n\t0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x0961, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008,\n\t0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018,\n\t0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018,\n\t0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018,\n\t0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018,\n\t0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018,\n\t0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018,\n\t0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018,\n\t0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018,\n\t0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29d5, 0xeb9: 0x29f5, 0xeba: 0x2a15, 0xebb: 0x0018,\n\t0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2b55, 0xec1: 0x2b75, 0xec2: 0x2b95, 0xec3: 0x2bb5, 0xec4: 0x2bd5, 0xec5: 0x2bf5,\n\t0xec6: 0x2bf5, 0xec7: 0x2bf5, 0xec8: 0x2c15, 0xec9: 0x2c15, 0xeca: 0x2c15, 0xecb: 0x2c15,\n\t0xecc: 0x2c35, 0xecd: 0x2c35, 0xece: 0x2c35, 0xecf: 0x2c55, 0xed0: 0x2c75, 0xed1: 0x2c75,\n\t0xed2: 0x2a95, 0xed3: 0x2a95, 0xed4: 0x2c75, 0xed5: 0x2c75, 0xed6: 0x2c95, 0xed7: 0x2c95,\n\t0xed8: 0x2c75, 0xed9: 0x2c75, 0xeda: 0x2a95, 0xedb: 0x2a95, 0xedc: 0x2c75, 0xedd: 0x2c75,\n\t0xede: 0x2c55, 0xedf: 0x2c55, 0xee0: 0x2cb5, 0xee1: 0x2cb5, 0xee2: 0x2cd5, 0xee3: 0x2cd5,\n\t0xee4: 0x0040, 0xee5: 0x2cf5, 0xee6: 0x2d15, 0xee7: 0x2d35, 0xee8: 0x2d35, 0xee9: 0x2d55,\n\t0xeea: 0x2d75, 0xeeb: 0x2d95, 0xeec: 0x2db5, 0xeed: 0x2dd5, 0xeee: 0x2df5, 0xeef: 0x2e15,\n\t0xef0: 0x2e35, 0xef1: 0x2e55, 0xef2: 0x2e55, 0xef3: 0x2e75, 0xef4: 0x2e95, 0xef5: 0x2e95,\n\t0xef6: 0x2eb5, 0xef7: 0x2ed5, 0xef8: 0x2e75, 0xef9: 0x2ef5, 0xefa: 0x2f15, 0xefb: 0x2ef5,\n\t0xefc: 0x2e75, 0xefd: 0x2f35, 0xefe: 0x2f55, 0xeff: 0x2f75,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x2f95, 0xf01: 0x2fb5, 0xf02: 0x2d15, 0xf03: 0x2cf5, 0xf04: 0x2fd5, 0xf05: 0x2ff5,\n\t0xf06: 0x3015, 0xf07: 0x3035, 0xf08: 0x3055, 0xf09: 0x3075, 0xf0a: 0x3095, 0xf0b: 0x30b5,\n\t0xf0c: 0x30d5, 0xf0d: 0x30f5, 0xf0e: 0x3115, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018,\n\t0xf12: 0x3135, 0xf13: 0x3155, 0xf14: 0x3175, 0xf15: 0x3195, 0xf16: 0x31b5, 0xf17: 0x31d5,\n\t0xf18: 0x31f5, 0xf19: 0x3215, 0xf1a: 0x3235, 0xf1b: 0x3255, 0xf1c: 0x3175, 0xf1d: 0x3275,\n\t0xf1e: 0x3295, 0xf1f: 0x32b5, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008,\n\t0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008,\n\t0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008,\n\t0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008,\n\t0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0008,\n\t0xf3c: 0x0008, 0xf3d: 0x0008, 0xf3e: 0x0008, 0xf3f: 0x0008,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x0b82, 0xf41: 0x0b8a, 0xf42: 0x0b92, 0xf43: 0x0b9a, 0xf44: 0x32d5, 0xf45: 0x32f5,\n\t0xf46: 0x3315, 0xf47: 0x3335, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018,\n\t0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x3355, 0xf51: 0x0ba1,\n\t0xf52: 0x0ba9, 0xf53: 0x0bb1, 0xf54: 0x0bb9, 0xf55: 0x0bc1, 0xf56: 0x0bc9, 0xf57: 0x0bd1,\n\t0xf58: 0x0bd9, 0xf59: 0x0be1, 0xf5a: 0x0be9, 0xf5b: 0x0bf1, 0xf5c: 0x0bf9, 0xf5d: 0x0c01,\n\t0xf5e: 0x0c09, 0xf5f: 0x0c11, 0xf60: 0x3375, 0xf61: 0x3395, 0xf62: 0x33b5, 0xf63: 0x33d5,\n\t0xf64: 0x33f5, 0xf65: 0x33f5, 0xf66: 0x3415, 0xf67: 0x3435, 0xf68: 0x3455, 0xf69: 0x3475,\n\t0xf6a: 0x3495, 0xf6b: 0x34b5, 0xf6c: 0x34d5, 0xf6d: 0x34f5, 0xf6e: 0x3515, 0xf6f: 0x3535,\n\t0xf70: 0x3555, 0xf71: 0x3575, 0xf72: 0x3595, 0xf73: 0x35b5, 0xf74: 0x35d5, 0xf75: 0x35f5,\n\t0xf76: 0x3615, 0xf77: 0x3635, 0xf78: 0x3655, 0xf79: 0x3675, 0xf7a: 0x3695, 0xf7b: 0x36b5,\n\t0xf7c: 0x0c19, 0xf7d: 0x0c21, 0xf7e: 0x36d5, 0xf7f: 0x0018,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x36f5, 0xf81: 0x3715, 0xf82: 0x3735, 0xf83: 0x3755, 0xf84: 0x3775, 0xf85: 0x3795,\n\t0xf86: 0x37b5, 0xf87: 0x37d5, 0xf88: 0x37f5, 0xf89: 0x3815, 0xf8a: 0x3835, 0xf8b: 0x3855,\n\t0xf8c: 0x3875, 0xf8d: 0x3895, 0xf8e: 0x38b5, 0xf8f: 0x38d5, 0xf90: 0x38f5, 0xf91: 0x3915,\n\t0xf92: 0x3935, 0xf93: 0x3955, 0xf94: 0x3975, 0xf95: 0x3995, 0xf96: 0x39b5, 0xf97: 0x39d5,\n\t0xf98: 0x39f5, 0xf99: 0x3a15, 0xf9a: 0x3a35, 0xf9b: 0x3a55, 0xf9c: 0x3a75, 0xf9d: 0x3a95,\n\t0xf9e: 0x3ab5, 0xf9f: 0x3ad5, 0xfa0: 0x3af5, 0xfa1: 0x3b15, 0xfa2: 0x3b35, 0xfa3: 0x3b55,\n\t0xfa4: 0x3b75, 0xfa5: 0x3b95, 0xfa6: 0x1295, 0xfa7: 0x3bb5, 0xfa8: 0x3bd5, 0xfa9: 0x3bf5,\n\t0xfaa: 0x3c15, 0xfab: 0x3c35, 0xfac: 0x3c55, 0xfad: 0x3c75, 0xfae: 0x23b5, 0xfaf: 0x3c95,\n\t0xfb0: 0x3cb5, 0xfb1: 0x0c29, 0xfb2: 0x0c31, 0xfb3: 0x0c39, 0xfb4: 0x0c41, 0xfb5: 0x0c49,\n\t0xfb6: 0x0c51, 0xfb7: 0x0c59, 0xfb8: 0x0c61, 0xfb9: 0x0c69, 0xfba: 0x0c71, 0xfbb: 0x0c79,\n\t0xfbc: 0x0c81, 0xfbd: 0x0c89, 0xfbe: 0x0c91, 0xfbf: 0x0c99,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x0ca1, 0xfc1: 0x0ca9, 0xfc2: 0x0cb1, 0xfc3: 0x0cb9, 0xfc4: 0x0cc1, 0xfc5: 0x0cc9,\n\t0xfc6: 0x0cd1, 0xfc7: 0x0cd9, 0xfc8: 0x0ce1, 0xfc9: 0x0ce9, 0xfca: 0x0cf1, 0xfcb: 0x0cf9,\n\t0xfcc: 0x0d01, 0xfcd: 0x3cd5, 0xfce: 0x0d09, 0xfcf: 0x3cf5, 0xfd0: 0x3d15, 0xfd1: 0x3d2d,\n\t0xfd2: 0x3d45, 0xfd3: 0x3d5d, 0xfd4: 0x3d75, 0xfd5: 0x3d75, 0xfd6: 0x3d5d, 0xfd7: 0x3d8d,\n\t0xfd8: 0x07d5, 0xfd9: 0x3da5, 0xfda: 0x3dbd, 0xfdb: 0x3dd5, 0xfdc: 0x3ded, 0xfdd: 0x3e05,\n\t0xfde: 0x3e1d, 0xfdf: 0x3e35, 0xfe0: 0x3e4d, 0xfe1: 0x3e65, 0xfe2: 0x3e7d, 0xfe3: 0x3e95,\n\t0xfe4: 0x3ead, 0xfe5: 0x3ead, 0xfe6: 0x3ec5, 0xfe7: 0x3ec5, 0xfe8: 0x3edd, 0xfe9: 0x3edd,\n\t0xfea: 0x3ef5, 0xfeb: 0x3f0d, 0xfec: 0x3f25, 0xfed: 0x3f3d, 0xfee: 0x3f55, 0xfef: 0x3f55,\n\t0xff0: 0x3f6d, 0xff1: 0x3f6d, 0xff2: 0x3f6d, 0xff3: 0x3f85, 0xff4: 0x3f9d, 0xff5: 0x3fb5,\n\t0xff6: 0x3fcd, 0xff7: 0x3fb5, 0xff8: 0x3fe5, 0xff9: 0x3ffd, 0xffa: 0x3f85, 0xffb: 0x4015,\n\t0xffc: 0x402d, 0xffd: 0x402d, 0xffe: 0x402d, 0xfff: 0x0d11,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x10f9, 0x1001: 0x1101, 0x1002: 0x40a5, 0x1003: 0x1109, 0x1004: 0x1111, 0x1005: 0x1119,\n\t0x1006: 0x1121, 0x1007: 0x1129, 0x1008: 0x40c5, 0x1009: 0x1131, 0x100a: 0x1139, 0x100b: 0x1141,\n\t0x100c: 0x40e5, 0x100d: 0x40e5, 0x100e: 0x1149, 0x100f: 0x1151, 0x1010: 0x1159, 0x1011: 0x4105,\n\t0x1012: 0x4125, 0x1013: 0x4145, 0x1014: 0x4165, 0x1015: 0x4185, 0x1016: 0x1161, 0x1017: 0x1169,\n\t0x1018: 0x1171, 0x1019: 0x1179, 0x101a: 0x1181, 0x101b: 0x41a5, 0x101c: 0x1189, 0x101d: 0x1191,\n\t0x101e: 0x1199, 0x101f: 0x41c5, 0x1020: 0x41e5, 0x1021: 0x11a1, 0x1022: 0x4205, 0x1023: 0x4225,\n\t0x1024: 0x4245, 0x1025: 0x11a9, 0x1026: 0x4265, 0x1027: 0x11b1, 0x1028: 0x11b9, 0x1029: 0x10f9,\n\t0x102a: 0x4285, 0x102b: 0x42a5, 0x102c: 0x42c5, 0x102d: 0x42e5, 0x102e: 0x11c1, 0x102f: 0x11c9,\n\t0x1030: 0x11d1, 0x1031: 0x11d9, 0x1032: 0x4305, 0x1033: 0x11e1, 0x1034: 0x11e9, 0x1035: 0x11f1,\n\t0x1036: 0x4325, 0x1037: 0x11f9, 0x1038: 0x1201, 0x1039: 0x11f9, 0x103a: 0x1209, 0x103b: 0x1211,\n\t0x103c: 0x4345, 0x103d: 0x1219, 0x103e: 0x1221, 0x103f: 0x1219,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x4365, 0x1041: 0x4385, 0x1042: 0x0040, 0x1043: 0x1229, 0x1044: 0x1231, 0x1045: 0x1239,\n\t0x1046: 0x1241, 0x1047: 0x0040, 0x1048: 0x1249, 0x1049: 0x1251, 0x104a: 0x1259, 0x104b: 0x1261,\n\t0x104c: 0x1269, 0x104d: 0x1271, 0x104e: 0x1199, 0x104f: 0x1279, 0x1050: 0x1281, 0x1051: 0x1289,\n\t0x1052: 0x43a5, 0x1053: 0x1291, 0x1054: 0x1121, 0x1055: 0x43c5, 0x1056: 0x43e5, 0x1057: 0x1299,\n\t0x1058: 0x0040, 0x1059: 0x4405, 0x105a: 0x12a1, 0x105b: 0x12a9, 0x105c: 0x12b1, 0x105d: 0x12b9,\n\t0x105e: 0x12c1, 0x105f: 0x12c9, 0x1060: 0x12d1, 0x1061: 0x12d9, 0x1062: 0x12e1, 0x1063: 0x12e9,\n\t0x1064: 0x12f1, 0x1065: 0x12f9, 0x1066: 0x1301, 0x1067: 0x1309, 0x1068: 0x1311, 0x1069: 0x1319,\n\t0x106a: 0x1321, 0x106b: 0x1329, 0x106c: 0x1331, 0x106d: 0x1339, 0x106e: 0x1341, 0x106f: 0x1349,\n\t0x1070: 0x1351, 0x1071: 0x1359, 0x1072: 0x1361, 0x1073: 0x1369, 0x1074: 0x1371, 0x1075: 0x1379,\n\t0x1076: 0x1381, 0x1077: 0x1389, 0x1078: 0x1391, 0x1079: 0x1399, 0x107a: 0x13a1, 0x107b: 0x13a9,\n\t0x107c: 0x13b1, 0x107d: 0x13b9, 0x107e: 0x13c1, 0x107f: 0x4425,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0xe00d, 0x1081: 0x0008, 0x1082: 0xe00d, 0x1083: 0x0008, 0x1084: 0xe00d, 0x1085: 0x0008,\n\t0x1086: 0xe00d, 0x1087: 0x0008, 0x1088: 0xe00d, 0x1089: 0x0008, 0x108a: 0xe00d, 0x108b: 0x0008,\n\t0x108c: 0xe00d, 0x108d: 0x0008, 0x108e: 0xe00d, 0x108f: 0x0008, 0x1090: 0xe00d, 0x1091: 0x0008,\n\t0x1092: 0xe00d, 0x1093: 0x0008, 0x1094: 0xe00d, 0x1095: 0x0008, 0x1096: 0xe00d, 0x1097: 0x0008,\n\t0x1098: 0xe00d, 0x1099: 0x0008, 0x109a: 0xe00d, 0x109b: 0x0008, 0x109c: 0xe00d, 0x109d: 0x0008,\n\t0x109e: 0xe00d, 0x109f: 0x0008, 0x10a0: 0xe00d, 0x10a1: 0x0008, 0x10a2: 0xe00d, 0x10a3: 0x0008,\n\t0x10a4: 0xe00d, 0x10a5: 0x0008, 0x10a6: 0xe00d, 0x10a7: 0x0008, 0x10a8: 0xe00d, 0x10a9: 0x0008,\n\t0x10aa: 0xe00d, 0x10ab: 0x0008, 0x10ac: 0xe00d, 0x10ad: 0x0008, 0x10ae: 0x0008, 0x10af: 0x3308,\n\t0x10b0: 0x3318, 0x10b1: 0x3318, 0x10b2: 0x3318, 0x10b3: 0x0018, 0x10b4: 0x3308, 0x10b5: 0x3308,\n\t0x10b6: 0x3308, 0x10b7: 0x3308, 0x10b8: 0x3308, 0x10b9: 0x3308, 0x10ba: 0x3308, 0x10bb: 0x3308,\n\t0x10bc: 0x3308, 0x10bd: 0x3308, 0x10be: 0x0018, 0x10bf: 0x0008,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0xe00d, 0x10c1: 0x0008, 0x10c2: 0xe00d, 0x10c3: 0x0008, 0x10c4: 0xe00d, 0x10c5: 0x0008,\n\t0x10c6: 0xe00d, 0x10c7: 0x0008, 0x10c8: 0xe00d, 0x10c9: 0x0008, 0x10ca: 0xe00d, 0x10cb: 0x0008,\n\t0x10cc: 0xe00d, 0x10cd: 0x0008, 0x10ce: 0xe00d, 0x10cf: 0x0008, 0x10d0: 0xe00d, 0x10d1: 0x0008,\n\t0x10d2: 0xe00d, 0x10d3: 0x0008, 0x10d4: 0xe00d, 0x10d5: 0x0008, 0x10d6: 0xe00d, 0x10d7: 0x0008,\n\t0x10d8: 0xe00d, 0x10d9: 0x0008, 0x10da: 0xe00d, 0x10db: 0x0008, 0x10dc: 0x02d1, 0x10dd: 0x13c9,\n\t0x10de: 0x3308, 0x10df: 0x3308, 0x10e0: 0x0008, 0x10e1: 0x0008, 0x10e2: 0x0008, 0x10e3: 0x0008,\n\t0x10e4: 0x0008, 0x10e5: 0x0008, 0x10e6: 0x0008, 0x10e7: 0x0008, 0x10e8: 0x0008, 0x10e9: 0x0008,\n\t0x10ea: 0x0008, 0x10eb: 0x0008, 0x10ec: 0x0008, 0x10ed: 0x0008, 0x10ee: 0x0008, 0x10ef: 0x0008,\n\t0x10f0: 0x0008, 0x10f1: 0x0008, 0x10f2: 0x0008, 0x10f3: 0x0008, 0x10f4: 0x0008, 0x10f5: 0x0008,\n\t0x10f6: 0x0008, 0x10f7: 0x0008, 0x10f8: 0x0008, 0x10f9: 0x0008, 0x10fa: 0x0008, 0x10fb: 0x0008,\n\t0x10fc: 0x0008, 0x10fd: 0x0008, 0x10fe: 0x0008, 0x10ff: 0x0008,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0x0018, 0x1101: 0x0018, 0x1102: 0x0018, 0x1103: 0x0018, 0x1104: 0x0018, 0x1105: 0x0018,\n\t0x1106: 0x0018, 0x1107: 0x0018, 0x1108: 0x0018, 0x1109: 0x0018, 0x110a: 0x0018, 0x110b: 0x0018,\n\t0x110c: 0x0018, 0x110d: 0x0018, 0x110e: 0x0018, 0x110f: 0x0018, 0x1110: 0x0018, 0x1111: 0x0018,\n\t0x1112: 0x0018, 0x1113: 0x0018, 0x1114: 0x0018, 0x1115: 0x0018, 0x1116: 0x0018, 0x1117: 0x0008,\n\t0x1118: 0x0008, 0x1119: 0x0008, 0x111a: 0x0008, 0x111b: 0x0008, 0x111c: 0x0008, 0x111d: 0x0008,\n\t0x111e: 0x0008, 0x111f: 0x0008, 0x1120: 0x0018, 0x1121: 0x0018, 0x1122: 0xe00d, 0x1123: 0x0008,\n\t0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008,\n\t0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0xe00d, 0x112f: 0x0008,\n\t0x1130: 0x0008, 0x1131: 0x0008, 0x1132: 0xe00d, 0x1133: 0x0008, 0x1134: 0xe00d, 0x1135: 0x0008,\n\t0x1136: 0xe00d, 0x1137: 0x0008, 0x1138: 0xe00d, 0x1139: 0x0008, 0x113a: 0xe00d, 0x113b: 0x0008,\n\t0x113c: 0xe00d, 0x113d: 0x0008, 0x113e: 0xe00d, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008,\n\t0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008,\n\t0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008,\n\t0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008,\n\t0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0xe00d, 0x115d: 0x0008,\n\t0x115e: 0xe00d, 0x115f: 0x0008, 0x1160: 0xe00d, 0x1161: 0x0008, 0x1162: 0xe00d, 0x1163: 0x0008,\n\t0x1164: 0xe00d, 0x1165: 0x0008, 0x1166: 0xe00d, 0x1167: 0x0008, 0x1168: 0xe00d, 0x1169: 0x0008,\n\t0x116a: 0xe00d, 0x116b: 0x0008, 0x116c: 0xe00d, 0x116d: 0x0008, 0x116e: 0xe00d, 0x116f: 0x0008,\n\t0x1170: 0xe0fd, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008,\n\t0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0xe01d, 0x117a: 0x0008, 0x117b: 0xe03d,\n\t0x117c: 0x0008, 0x117d: 0x4445, 0x117e: 0xe00d, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0xe00d, 0x1181: 0x0008, 0x1182: 0xe00d, 0x1183: 0x0008, 0x1184: 0xe00d, 0x1185: 0x0008,\n\t0x1186: 0xe00d, 0x1187: 0x0008, 0x1188: 0x0008, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0xe03d,\n\t0x118c: 0x0008, 0x118d: 0x0409, 0x118e: 0x0008, 0x118f: 0x0008, 0x1190: 0xe00d, 0x1191: 0x0008,\n\t0x1192: 0xe00d, 0x1193: 0x0008, 0x1194: 0x0008, 0x1195: 0x0008, 0x1196: 0xe00d, 0x1197: 0x0008,\n\t0x1198: 0xe00d, 0x1199: 0x0008, 0x119a: 0xe00d, 0x119b: 0x0008, 0x119c: 0xe00d, 0x119d: 0x0008,\n\t0x119e: 0xe00d, 0x119f: 0x0008, 0x11a0: 0xe00d, 0x11a1: 0x0008, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0x13d1, 0x11ab: 0x0371, 0x11ac: 0x0401, 0x11ad: 0x13d9, 0x11ae: 0x0421, 0x11af: 0x0008,\n\t0x11b0: 0x13e1, 0x11b1: 0x13e9, 0x11b2: 0x0429, 0x11b3: 0x4465, 0x11b4: 0xe00d, 0x11b5: 0x0008,\n\t0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008,\n\t0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0x650d, 0x11c1: 0x652d, 0x11c2: 0x654d, 0x11c3: 0x656d, 0x11c4: 0x658d, 0x11c5: 0x65ad,\n\t0x11c6: 0x65cd, 0x11c7: 0x65ed, 0x11c8: 0x660d, 0x11c9: 0x662d, 0x11ca: 0x664d, 0x11cb: 0x666d,\n\t0x11cc: 0x668d, 0x11cd: 0x66ad, 0x11ce: 0x0008, 0x11cf: 0x0008, 0x11d0: 0x66cd, 0x11d1: 0x0008,\n\t0x11d2: 0x66ed, 0x11d3: 0x0008, 0x11d4: 0x0008, 0x11d5: 0x670d, 0x11d6: 0x672d, 0x11d7: 0x674d,\n\t0x11d8: 0x676d, 0x11d9: 0x678d, 0x11da: 0x67ad, 0x11db: 0x67cd, 0x11dc: 0x67ed, 0x11dd: 0x680d,\n\t0x11de: 0x682d, 0x11df: 0x0008, 0x11e0: 0x684d, 0x11e1: 0x0008, 0x11e2: 0x686d, 0x11e3: 0x0008,\n\t0x11e4: 0x0008, 0x11e5: 0x688d, 0x11e6: 0x68ad, 0x11e7: 0x0008, 0x11e8: 0x0008, 0x11e9: 0x0008,\n\t0x11ea: 0x68cd, 0x11eb: 0x68ed, 0x11ec: 0x690d, 0x11ed: 0x692d, 0x11ee: 0x694d, 0x11ef: 0x696d,\n\t0x11f0: 0x698d, 0x11f1: 0x69ad, 0x11f2: 0x69cd, 0x11f3: 0x69ed, 0x11f4: 0x6a0d, 0x11f5: 0x6a2d,\n\t0x11f6: 0x6a4d, 0x11f7: 0x6a6d, 0x11f8: 0x6a8d, 0x11f9: 0x6aad, 0x11fa: 0x6acd, 0x11fb: 0x6aed,\n\t0x11fc: 0x6b0d, 0x11fd: 0x6b2d, 0x11fe: 0x6b4d, 0x11ff: 0x6b6d,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x7acd, 0x1201: 0x7aed, 0x1202: 0x7b0d, 0x1203: 0x7b2d, 0x1204: 0x7b4d, 0x1205: 0x7b6d,\n\t0x1206: 0x7b8d, 0x1207: 0x7bad, 0x1208: 0x7bcd, 0x1209: 0x7bed, 0x120a: 0x7c0d, 0x120b: 0x7c2d,\n\t0x120c: 0x7c4d, 0x120d: 0x7c6d, 0x120e: 0x7c8d, 0x120f: 0x1409, 0x1210: 0x1411, 0x1211: 0x1419,\n\t0x1212: 0x7cad, 0x1213: 0x7ccd, 0x1214: 0x7ced, 0x1215: 0x1421, 0x1216: 0x1429, 0x1217: 0x1431,\n\t0x1218: 0x7d0d, 0x1219: 0x7d2d, 0x121a: 0x0040, 0x121b: 0x0040, 0x121c: 0x0040, 0x121d: 0x0040,\n\t0x121e: 0x0040, 0x121f: 0x0040, 0x1220: 0x0040, 0x1221: 0x0040, 0x1222: 0x0040, 0x1223: 0x0040,\n\t0x1224: 0x0040, 0x1225: 0x0040, 0x1226: 0x0040, 0x1227: 0x0040, 0x1228: 0x0040, 0x1229: 0x0040,\n\t0x122a: 0x0040, 0x122b: 0x0040, 0x122c: 0x0040, 0x122d: 0x0040, 0x122e: 0x0040, 0x122f: 0x0040,\n\t0x1230: 0x0040, 0x1231: 0x0040, 0x1232: 0x0040, 0x1233: 0x0040, 0x1234: 0x0040, 0x1235: 0x0040,\n\t0x1236: 0x0040, 0x1237: 0x0040, 0x1238: 0x0040, 0x1239: 0x0040, 0x123a: 0x0040, 0x123b: 0x0040,\n\t0x123c: 0x0040, 0x123d: 0x0040, 0x123e: 0x0040, 0x123f: 0x0040,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x1439, 0x1241: 0x1441, 0x1242: 0x1449, 0x1243: 0x7d4d, 0x1244: 0x7d6d, 0x1245: 0x1451,\n\t0x1246: 0x1451, 0x1247: 0x0040, 0x1248: 0x0040, 0x1249: 0x0040, 0x124a: 0x0040, 0x124b: 0x0040,\n\t0x124c: 0x0040, 0x124d: 0x0040, 0x124e: 0x0040, 0x124f: 0x0040, 0x1250: 0x0040, 0x1251: 0x0040,\n\t0x1252: 0x0040, 0x1253: 0x1459, 0x1254: 0x1461, 0x1255: 0x1469, 0x1256: 0x1471, 0x1257: 0x1479,\n\t0x1258: 0x0040, 0x1259: 0x0040, 0x125a: 0x0040, 0x125b: 0x0040, 0x125c: 0x0040, 0x125d: 0x1481,\n\t0x125e: 0x3308, 0x125f: 0x1489, 0x1260: 0x1491, 0x1261: 0x0779, 0x1262: 0x0791, 0x1263: 0x1499,\n\t0x1264: 0x14a1, 0x1265: 0x14a9, 0x1266: 0x14b1, 0x1267: 0x14b9, 0x1268: 0x14c1, 0x1269: 0x071a,\n\t0x126a: 0x14c9, 0x126b: 0x14d1, 0x126c: 0x14d9, 0x126d: 0x14e1, 0x126e: 0x14e9, 0x126f: 0x14f1,\n\t0x1270: 0x14f9, 0x1271: 0x1501, 0x1272: 0x1509, 0x1273: 0x1511, 0x1274: 0x1519, 0x1275: 0x1521,\n\t0x1276: 0x1529, 0x1277: 0x0040, 0x1278: 0x1531, 0x1279: 0x1539, 0x127a: 0x1541, 0x127b: 0x1549,\n\t0x127c: 0x1551, 0x127d: 0x0040, 0x127e: 0x1559, 0x127f: 0x0040,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x1561, 0x1281: 0x1569, 0x1282: 0x0040, 0x1283: 0x1571, 0x1284: 0x1579, 0x1285: 0x0040,\n\t0x1286: 0x1581, 0x1287: 0x1589, 0x1288: 0x1591, 0x1289: 0x1599, 0x128a: 0x15a1, 0x128b: 0x15a9,\n\t0x128c: 0x15b1, 0x128d: 0x15b9, 0x128e: 0x15c1, 0x128f: 0x15c9, 0x1290: 0x15d1, 0x1291: 0x15d1,\n\t0x1292: 0x15d9, 0x1293: 0x15d9, 0x1294: 0x15d9, 0x1295: 0x15d9, 0x1296: 0x15e1, 0x1297: 0x15e1,\n\t0x1298: 0x15e1, 0x1299: 0x15e1, 0x129a: 0x15e9, 0x129b: 0x15e9, 0x129c: 0x15e9, 0x129d: 0x15e9,\n\t0x129e: 0x15f1, 0x129f: 0x15f1, 0x12a0: 0x15f1, 0x12a1: 0x15f1, 0x12a2: 0x15f9, 0x12a3: 0x15f9,\n\t0x12a4: 0x15f9, 0x12a5: 0x15f9, 0x12a6: 0x1601, 0x12a7: 0x1601, 0x12a8: 0x1601, 0x12a9: 0x1601,\n\t0x12aa: 0x1609, 0x12ab: 0x1609, 0x12ac: 0x1609, 0x12ad: 0x1609, 0x12ae: 0x1611, 0x12af: 0x1611,\n\t0x12b0: 0x1611, 0x12b1: 0x1611, 0x12b2: 0x1619, 0x12b3: 0x1619, 0x12b4: 0x1619, 0x12b5: 0x1619,\n\t0x12b6: 0x1621, 0x12b7: 0x1621, 0x12b8: 0x1621, 0x12b9: 0x1621, 0x12ba: 0x1629, 0x12bb: 0x1629,\n\t0x12bc: 0x1629, 0x12bd: 0x1629, 0x12be: 0x1631, 0x12bf: 0x1631,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x1631, 0x12c1: 0x1631, 0x12c2: 0x1639, 0x12c3: 0x1639, 0x12c4: 0x1641, 0x12c5: 0x1641,\n\t0x12c6: 0x1649, 0x12c7: 0x1649, 0x12c8: 0x1651, 0x12c9: 0x1651, 0x12ca: 0x1659, 0x12cb: 0x1659,\n\t0x12cc: 0x1661, 0x12cd: 0x1661, 0x12ce: 0x1669, 0x12cf: 0x1669, 0x12d0: 0x1669, 0x12d1: 0x1669,\n\t0x12d2: 0x1671, 0x12d3: 0x1671, 0x12d4: 0x1671, 0x12d5: 0x1671, 0x12d6: 0x1679, 0x12d7: 0x1679,\n\t0x12d8: 0x1679, 0x12d9: 0x1679, 0x12da: 0x1681, 0x12db: 0x1681, 0x12dc: 0x1681, 0x12dd: 0x1681,\n\t0x12de: 0x1689, 0x12df: 0x1689, 0x12e0: 0x1691, 0x12e1: 0x1691, 0x12e2: 0x1691, 0x12e3: 0x1691,\n\t0x12e4: 0x1699, 0x12e5: 0x1699, 0x12e6: 0x16a1, 0x12e7: 0x16a1, 0x12e8: 0x16a1, 0x12e9: 0x16a1,\n\t0x12ea: 0x16a9, 0x12eb: 0x16a9, 0x12ec: 0x16a9, 0x12ed: 0x16a9, 0x12ee: 0x16b1, 0x12ef: 0x16b1,\n\t0x12f0: 0x16b9, 0x12f1: 0x16b9, 0x12f2: 0x0818, 0x12f3: 0x0818, 0x12f4: 0x0818, 0x12f5: 0x0818,\n\t0x12f6: 0x0818, 0x12f7: 0x0818, 0x12f8: 0x0818, 0x12f9: 0x0818, 0x12fa: 0x0818, 0x12fb: 0x0818,\n\t0x12fc: 0x0818, 0x12fd: 0x0818, 0x12fe: 0x0818, 0x12ff: 0x0818,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x0818, 0x1301: 0x0818, 0x1302: 0x0040, 0x1303: 0x0040, 0x1304: 0x0040, 0x1305: 0x0040,\n\t0x1306: 0x0040, 0x1307: 0x0040, 0x1308: 0x0040, 0x1309: 0x0040, 0x130a: 0x0040, 0x130b: 0x0040,\n\t0x130c: 0x0040, 0x130d: 0x0040, 0x130e: 0x0040, 0x130f: 0x0040, 0x1310: 0x0040, 0x1311: 0x0040,\n\t0x1312: 0x0040, 0x1313: 0x16c1, 0x1314: 0x16c1, 0x1315: 0x16c1, 0x1316: 0x16c1, 0x1317: 0x16c9,\n\t0x1318: 0x16c9, 0x1319: 0x16d1, 0x131a: 0x16d1, 0x131b: 0x16d9, 0x131c: 0x16d9, 0x131d: 0x0149,\n\t0x131e: 0x16e1, 0x131f: 0x16e1, 0x1320: 0x16e9, 0x1321: 0x16e9, 0x1322: 0x16f1, 0x1323: 0x16f1,\n\t0x1324: 0x16f9, 0x1325: 0x16f9, 0x1326: 0x16f9, 0x1327: 0x16f9, 0x1328: 0x1701, 0x1329: 0x1701,\n\t0x132a: 0x1709, 0x132b: 0x1709, 0x132c: 0x1711, 0x132d: 0x1711, 0x132e: 0x1719, 0x132f: 0x1719,\n\t0x1330: 0x1721, 0x1331: 0x1721, 0x1332: 0x1729, 0x1333: 0x1729, 0x1334: 0x1731, 0x1335: 0x1731,\n\t0x1336: 0x1739, 0x1337: 0x1739, 0x1338: 0x1739, 0x1339: 0x1741, 0x133a: 0x1741, 0x133b: 0x1741,\n\t0x133c: 0x1749, 0x133d: 0x1749, 0x133e: 0x1749, 0x133f: 0x1749,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x1949, 0x1341: 0x1951, 0x1342: 0x1959, 0x1343: 0x1961, 0x1344: 0x1969, 0x1345: 0x1971,\n\t0x1346: 0x1979, 0x1347: 0x1981, 0x1348: 0x1989, 0x1349: 0x1991, 0x134a: 0x1999, 0x134b: 0x19a1,\n\t0x134c: 0x19a9, 0x134d: 0x19b1, 0x134e: 0x19b9, 0x134f: 0x19c1, 0x1350: 0x19c9, 0x1351: 0x19d1,\n\t0x1352: 0x19d9, 0x1353: 0x19e1, 0x1354: 0x19e9, 0x1355: 0x19f1, 0x1356: 0x19f9, 0x1357: 0x1a01,\n\t0x1358: 0x1a09, 0x1359: 0x1a11, 0x135a: 0x1a19, 0x135b: 0x1a21, 0x135c: 0x1a29, 0x135d: 0x1a31,\n\t0x135e: 0x1a3a, 0x135f: 0x1a42, 0x1360: 0x1a4a, 0x1361: 0x1a52, 0x1362: 0x1a5a, 0x1363: 0x1a62,\n\t0x1364: 0x1a69, 0x1365: 0x1a71, 0x1366: 0x1761, 0x1367: 0x1a79, 0x1368: 0x1741, 0x1369: 0x1769,\n\t0x136a: 0x1a81, 0x136b: 0x1a89, 0x136c: 0x1789, 0x136d: 0x1a91, 0x136e: 0x1791, 0x136f: 0x1799,\n\t0x1370: 0x1a99, 0x1371: 0x1aa1, 0x1372: 0x17b9, 0x1373: 0x1aa9, 0x1374: 0x17c1, 0x1375: 0x17c9,\n\t0x1376: 0x1ab1, 0x1377: 0x1ab9, 0x1378: 0x17d9, 0x1379: 0x1ac1, 0x137a: 0x17e1, 0x137b: 0x17e9,\n\t0x137c: 0x18d1, 0x137d: 0x18d9, 0x137e: 0x18f1, 0x137f: 0x18f9,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x1901, 0x1381: 0x1921, 0x1382: 0x1929, 0x1383: 0x1931, 0x1384: 0x1939, 0x1385: 0x1959,\n\t0x1386: 0x1961, 0x1387: 0x1969, 0x1388: 0x1ac9, 0x1389: 0x1989, 0x138a: 0x1ad1, 0x138b: 0x1ad9,\n\t0x138c: 0x19b9, 0x138d: 0x1ae1, 0x138e: 0x19c1, 0x138f: 0x19c9, 0x1390: 0x1a31, 0x1391: 0x1ae9,\n\t0x1392: 0x1af1, 0x1393: 0x1a09, 0x1394: 0x1af9, 0x1395: 0x1a11, 0x1396: 0x1a19, 0x1397: 0x1751,\n\t0x1398: 0x1759, 0x1399: 0x1b01, 0x139a: 0x1761, 0x139b: 0x1b09, 0x139c: 0x1771, 0x139d: 0x1779,\n\t0x139e: 0x1781, 0x139f: 0x1789, 0x13a0: 0x1b11, 0x13a1: 0x17a1, 0x13a2: 0x17a9, 0x13a3: 0x17b1,\n\t0x13a4: 0x17b9, 0x13a5: 0x1b19, 0x13a6: 0x17d9, 0x13a7: 0x17f1, 0x13a8: 0x17f9, 0x13a9: 0x1801,\n\t0x13aa: 0x1809, 0x13ab: 0x1811, 0x13ac: 0x1821, 0x13ad: 0x1829, 0x13ae: 0x1831, 0x13af: 0x1839,\n\t0x13b0: 0x1841, 0x13b1: 0x1849, 0x13b2: 0x1b21, 0x13b3: 0x1851, 0x13b4: 0x1859, 0x13b5: 0x1861,\n\t0x13b6: 0x1869, 0x13b7: 0x1871, 0x13b8: 0x1879, 0x13b9: 0x1889, 0x13ba: 0x1891, 0x13bb: 0x1899,\n\t0x13bc: 0x18a1, 0x13bd: 0x18a9, 0x13be: 0x18b1, 0x13bf: 0x18b9,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x18c1, 0x13c1: 0x18c9, 0x13c2: 0x18e1, 0x13c3: 0x18e9, 0x13c4: 0x1909, 0x13c5: 0x1911,\n\t0x13c6: 0x1919, 0x13c7: 0x1921, 0x13c8: 0x1929, 0x13c9: 0x1941, 0x13ca: 0x1949, 0x13cb: 0x1951,\n\t0x13cc: 0x1959, 0x13cd: 0x1b29, 0x13ce: 0x1971, 0x13cf: 0x1979, 0x13d0: 0x1981, 0x13d1: 0x1989,\n\t0x13d2: 0x19a1, 0x13d3: 0x19a9, 0x13d4: 0x19b1, 0x13d5: 0x19b9, 0x13d6: 0x1b31, 0x13d7: 0x19d1,\n\t0x13d8: 0x19d9, 0x13d9: 0x1b39, 0x13da: 0x19f1, 0x13db: 0x19f9, 0x13dc: 0x1a01, 0x13dd: 0x1a09,\n\t0x13de: 0x1b41, 0x13df: 0x1761, 0x13e0: 0x1b09, 0x13e1: 0x1789, 0x13e2: 0x1b11, 0x13e3: 0x17b9,\n\t0x13e4: 0x1b19, 0x13e5: 0x17d9, 0x13e6: 0x1b49, 0x13e7: 0x1841, 0x13e8: 0x1b51, 0x13e9: 0x1b59,\n\t0x13ea: 0x1b61, 0x13eb: 0x1921, 0x13ec: 0x1929, 0x13ed: 0x1959, 0x13ee: 0x19b9, 0x13ef: 0x1b31,\n\t0x13f0: 0x1a09, 0x13f1: 0x1b41, 0x13f2: 0x1b69, 0x13f3: 0x1b71, 0x13f4: 0x1b79, 0x13f5: 0x1b81,\n\t0x13f6: 0x1b89, 0x13f7: 0x1b91, 0x13f8: 0x1b99, 0x13f9: 0x1ba1, 0x13fa: 0x1ba9, 0x13fb: 0x1bb1,\n\t0x13fc: 0x1bb9, 0x13fd: 0x1bc1, 0x13fe: 0x1bc9, 0x13ff: 0x1bd1,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x1bd9, 0x1401: 0x1be1, 0x1402: 0x1be9, 0x1403: 0x1bf1, 0x1404: 0x1bf9, 0x1405: 0x1c01,\n\t0x1406: 0x1c09, 0x1407: 0x1c11, 0x1408: 0x1c19, 0x1409: 0x1c21, 0x140a: 0x1c29, 0x140b: 0x1c31,\n\t0x140c: 0x1b59, 0x140d: 0x1c39, 0x140e: 0x1c41, 0x140f: 0x1c49, 0x1410: 0x1c51, 0x1411: 0x1b81,\n\t0x1412: 0x1b89, 0x1413: 0x1b91, 0x1414: 0x1b99, 0x1415: 0x1ba1, 0x1416: 0x1ba9, 0x1417: 0x1bb1,\n\t0x1418: 0x1bb9, 0x1419: 0x1bc1, 0x141a: 0x1bc9, 0x141b: 0x1bd1, 0x141c: 0x1bd9, 0x141d: 0x1be1,\n\t0x141e: 0x1be9, 0x141f: 0x1bf1, 0x1420: 0x1bf9, 0x1421: 0x1c01, 0x1422: 0x1c09, 0x1423: 0x1c11,\n\t0x1424: 0x1c19, 0x1425: 0x1c21, 0x1426: 0x1c29, 0x1427: 0x1c31, 0x1428: 0x1b59, 0x1429: 0x1c39,\n\t0x142a: 0x1c41, 0x142b: 0x1c49, 0x142c: 0x1c51, 0x142d: 0x1c21, 0x142e: 0x1c29, 0x142f: 0x1c31,\n\t0x1430: 0x1b59, 0x1431: 0x1b51, 0x1432: 0x1b61, 0x1433: 0x1881, 0x1434: 0x1829, 0x1435: 0x1831,\n\t0x1436: 0x1839, 0x1437: 0x1c21, 0x1438: 0x1c29, 0x1439: 0x1c31, 0x143a: 0x1881, 0x143b: 0x1889,\n\t0x143c: 0x1c59, 0x143d: 0x1c59, 0x143e: 0x0018, 0x143f: 0x0018,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x0040, 0x1441: 0x0040, 0x1442: 0x0040, 0x1443: 0x0040, 0x1444: 0x0040, 0x1445: 0x0040,\n\t0x1446: 0x0040, 0x1447: 0x0040, 0x1448: 0x0040, 0x1449: 0x0040, 0x144a: 0x0040, 0x144b: 0x0040,\n\t0x144c: 0x0040, 0x144d: 0x0040, 0x144e: 0x0040, 0x144f: 0x0040, 0x1450: 0x1c61, 0x1451: 0x1c69,\n\t0x1452: 0x1c69, 0x1453: 0x1c71, 0x1454: 0x1c79, 0x1455: 0x1c81, 0x1456: 0x1c89, 0x1457: 0x1c91,\n\t0x1458: 0x1c99, 0x1459: 0x1c99, 0x145a: 0x1ca1, 0x145b: 0x1ca9, 0x145c: 0x1cb1, 0x145d: 0x1cb9,\n\t0x145e: 0x1cc1, 0x145f: 0x1cc9, 0x1460: 0x1cc9, 0x1461: 0x1cd1, 0x1462: 0x1cd9, 0x1463: 0x1cd9,\n\t0x1464: 0x1ce1, 0x1465: 0x1ce1, 0x1466: 0x1ce9, 0x1467: 0x1cf1, 0x1468: 0x1cf1, 0x1469: 0x1cf9,\n\t0x146a: 0x1d01, 0x146b: 0x1d01, 0x146c: 0x1d09, 0x146d: 0x1d09, 0x146e: 0x1d11, 0x146f: 0x1d19,\n\t0x1470: 0x1d19, 0x1471: 0x1d21, 0x1472: 0x1d21, 0x1473: 0x1d29, 0x1474: 0x1d31, 0x1475: 0x1d39,\n\t0x1476: 0x1d41, 0x1477: 0x1d41, 0x1478: 0x1d49, 0x1479: 0x1d51, 0x147a: 0x1d59, 0x147b: 0x1d61,\n\t0x147c: 0x1d69, 0x147d: 0x1d69, 0x147e: 0x1d71, 0x147f: 0x1d79,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x1f29, 0x1481: 0x1f31, 0x1482: 0x1f39, 0x1483: 0x1f11, 0x1484: 0x1d39, 0x1485: 0x1ce9,\n\t0x1486: 0x1f41, 0x1487: 0x1f49, 0x1488: 0x0040, 0x1489: 0x0040, 0x148a: 0x0040, 0x148b: 0x0040,\n\t0x148c: 0x0040, 0x148d: 0x0040, 0x148e: 0x0040, 0x148f: 0x0040, 0x1490: 0x0040, 0x1491: 0x0040,\n\t0x1492: 0x0040, 0x1493: 0x0040, 0x1494: 0x0040, 0x1495: 0x0040, 0x1496: 0x0040, 0x1497: 0x0040,\n\t0x1498: 0x0040, 0x1499: 0x0040, 0x149a: 0x0040, 0x149b: 0x0040, 0x149c: 0x0040, 0x149d: 0x0040,\n\t0x149e: 0x0040, 0x149f: 0x0040, 0x14a0: 0x0040, 0x14a1: 0x0040, 0x14a2: 0x0040, 0x14a3: 0x0040,\n\t0x14a4: 0x0040, 0x14a5: 0x0040, 0x14a6: 0x0040, 0x14a7: 0x0040, 0x14a8: 0x0040, 0x14a9: 0x0040,\n\t0x14aa: 0x0040, 0x14ab: 0x0040, 0x14ac: 0x0040, 0x14ad: 0x0040, 0x14ae: 0x0040, 0x14af: 0x0040,\n\t0x14b0: 0x1f51, 0x14b1: 0x1f59, 0x14b2: 0x1f61, 0x14b3: 0x1f69, 0x14b4: 0x1f71, 0x14b5: 0x1f79,\n\t0x14b6: 0x1f81, 0x14b7: 0x1f89, 0x14b8: 0x1f91, 0x14b9: 0x1f99, 0x14ba: 0x1fa2, 0x14bb: 0x1faa,\n\t0x14bc: 0x1fb1, 0x14bd: 0x0018, 0x14be: 0x0040, 0x14bf: 0x0040,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x33c0, 0x14c1: 0x33c0, 0x14c2: 0x33c0, 0x14c3: 0x33c0, 0x14c4: 0x33c0, 0x14c5: 0x33c0,\n\t0x14c6: 0x33c0, 0x14c7: 0x33c0, 0x14c8: 0x33c0, 0x14c9: 0x33c0, 0x14ca: 0x33c0, 0x14cb: 0x33c0,\n\t0x14cc: 0x33c0, 0x14cd: 0x33c0, 0x14ce: 0x33c0, 0x14cf: 0x33c0, 0x14d0: 0x1fba, 0x14d1: 0x7d8d,\n\t0x14d2: 0x0040, 0x14d3: 0x1fc2, 0x14d4: 0x0122, 0x14d5: 0x1fca, 0x14d6: 0x1fd2, 0x14d7: 0x7dad,\n\t0x14d8: 0x7dcd, 0x14d9: 0x0040, 0x14da: 0x0040, 0x14db: 0x0040, 0x14dc: 0x0040, 0x14dd: 0x0040,\n\t0x14de: 0x0040, 0x14df: 0x0040, 0x14e0: 0x3308, 0x14e1: 0x3308, 0x14e2: 0x3308, 0x14e3: 0x3308,\n\t0x14e4: 0x3308, 0x14e5: 0x3308, 0x14e6: 0x3308, 0x14e7: 0x3308, 0x14e8: 0x3308, 0x14e9: 0x3308,\n\t0x14ea: 0x3308, 0x14eb: 0x3308, 0x14ec: 0x3308, 0x14ed: 0x3308, 0x14ee: 0x3308, 0x14ef: 0x3308,\n\t0x14f0: 0x0040, 0x14f1: 0x7ded, 0x14f2: 0x7e0d, 0x14f3: 0x1fda, 0x14f4: 0x1fda, 0x14f5: 0x072a,\n\t0x14f6: 0x0732, 0x14f7: 0x1fe2, 0x14f8: 0x1fea, 0x14f9: 0x7e2d, 0x14fa: 0x7e4d, 0x14fb: 0x7e6d,\n\t0x14fc: 0x7e2d, 0x14fd: 0x7e8d, 0x14fe: 0x7ead, 0x14ff: 0x7e8d,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x7ecd, 0x1501: 0x7eed, 0x1502: 0x7f0d, 0x1503: 0x7eed, 0x1504: 0x7f2d, 0x1505: 0x0018,\n\t0x1506: 0x0018, 0x1507: 0x1ff2, 0x1508: 0x1ffa, 0x1509: 0x7f4e, 0x150a: 0x7f6e, 0x150b: 0x7f8e,\n\t0x150c: 0x7fae, 0x150d: 0x1fda, 0x150e: 0x1fda, 0x150f: 0x1fda, 0x1510: 0x1fba, 0x1511: 0x7fcd,\n\t0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0122, 0x1515: 0x1fc2, 0x1516: 0x1fd2, 0x1517: 0x1fca,\n\t0x1518: 0x7fed, 0x1519: 0x072a, 0x151a: 0x0732, 0x151b: 0x1fe2, 0x151c: 0x1fea, 0x151d: 0x7ecd,\n\t0x151e: 0x7f2d, 0x151f: 0x2002, 0x1520: 0x200a, 0x1521: 0x2012, 0x1522: 0x071a, 0x1523: 0x2019,\n\t0x1524: 0x2022, 0x1525: 0x202a, 0x1526: 0x0722, 0x1527: 0x0040, 0x1528: 0x2032, 0x1529: 0x203a,\n\t0x152a: 0x2042, 0x152b: 0x204a, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,\n\t0x1530: 0x800e, 0x1531: 0x2051, 0x1532: 0x802e, 0x1533: 0x0808, 0x1534: 0x804e, 0x1535: 0x0040,\n\t0x1536: 0x806e, 0x1537: 0x2059, 0x1538: 0x808e, 0x1539: 0x2061, 0x153a: 0x80ae, 0x153b: 0x2069,\n\t0x153c: 0x80ce, 0x153d: 0x2071, 0x153e: 0x80ee, 0x153f: 0x2079,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x2081, 0x1541: 0x2089, 0x1542: 0x2089, 0x1543: 0x2091, 0x1544: 0x2091, 0x1545: 0x2099,\n\t0x1546: 0x2099, 0x1547: 0x20a1, 0x1548: 0x20a1, 0x1549: 0x20a9, 0x154a: 0x20a9, 0x154b: 0x20a9,\n\t0x154c: 0x20a9, 0x154d: 0x20b1, 0x154e: 0x20b1, 0x154f: 0x20b9, 0x1550: 0x20b9, 0x1551: 0x20b9,\n\t0x1552: 0x20b9, 0x1553: 0x20c1, 0x1554: 0x20c1, 0x1555: 0x20c9, 0x1556: 0x20c9, 0x1557: 0x20c9,\n\t0x1558: 0x20c9, 0x1559: 0x20d1, 0x155a: 0x20d1, 0x155b: 0x20d1, 0x155c: 0x20d1, 0x155d: 0x20d9,\n\t0x155e: 0x20d9, 0x155f: 0x20d9, 0x1560: 0x20d9, 0x1561: 0x20e1, 0x1562: 0x20e1, 0x1563: 0x20e1,\n\t0x1564: 0x20e1, 0x1565: 0x20e9, 0x1566: 0x20e9, 0x1567: 0x20e9, 0x1568: 0x20e9, 0x1569: 0x20f1,\n\t0x156a: 0x20f1, 0x156b: 0x20f9, 0x156c: 0x20f9, 0x156d: 0x2101, 0x156e: 0x2101, 0x156f: 0x2109,\n\t0x1570: 0x2109, 0x1571: 0x2111, 0x1572: 0x2111, 0x1573: 0x2111, 0x1574: 0x2111, 0x1575: 0x2119,\n\t0x1576: 0x2119, 0x1577: 0x2119, 0x1578: 0x2119, 0x1579: 0x2121, 0x157a: 0x2121, 0x157b: 0x2121,\n\t0x157c: 0x2121, 0x157d: 0x2129, 0x157e: 0x2129, 0x157f: 0x2129,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x2129, 0x1581: 0x2131, 0x1582: 0x2131, 0x1583: 0x2131, 0x1584: 0x2131, 0x1585: 0x2139,\n\t0x1586: 0x2139, 0x1587: 0x2139, 0x1588: 0x2139, 0x1589: 0x2141, 0x158a: 0x2141, 0x158b: 0x2141,\n\t0x158c: 0x2141, 0x158d: 0x2149, 0x158e: 0x2149, 0x158f: 0x2149, 0x1590: 0x2149, 0x1591: 0x2151,\n\t0x1592: 0x2151, 0x1593: 0x2151, 0x1594: 0x2151, 0x1595: 0x2159, 0x1596: 0x2159, 0x1597: 0x2159,\n\t0x1598: 0x2159, 0x1599: 0x2161, 0x159a: 0x2161, 0x159b: 0x2161, 0x159c: 0x2161, 0x159d: 0x2169,\n\t0x159e: 0x2169, 0x159f: 0x2169, 0x15a0: 0x2169, 0x15a1: 0x2171, 0x15a2: 0x2171, 0x15a3: 0x2171,\n\t0x15a4: 0x2171, 0x15a5: 0x2179, 0x15a6: 0x2179, 0x15a7: 0x2179, 0x15a8: 0x2179, 0x15a9: 0x2181,\n\t0x15aa: 0x2181, 0x15ab: 0x2181, 0x15ac: 0x2181, 0x15ad: 0x2189, 0x15ae: 0x2189, 0x15af: 0x1701,\n\t0x15b0: 0x1701, 0x15b1: 0x2191, 0x15b2: 0x2191, 0x15b3: 0x2191, 0x15b4: 0x2191, 0x15b5: 0x2199,\n\t0x15b6: 0x2199, 0x15b7: 0x21a1, 0x15b8: 0x21a1, 0x15b9: 0x21a9, 0x15ba: 0x21a9, 0x15bb: 0x21b1,\n\t0x15bc: 0x21b1, 0x15bd: 0x0040, 0x15be: 0x0040, 0x15bf: 0x03c0,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x0040, 0x15c1: 0x1fca, 0x15c2: 0x21ba, 0x15c3: 0x2002, 0x15c4: 0x203a, 0x15c5: 0x2042,\n\t0x15c6: 0x200a, 0x15c7: 0x21c2, 0x15c8: 0x072a, 0x15c9: 0x0732, 0x15ca: 0x2012, 0x15cb: 0x071a,\n\t0x15cc: 0x1fba, 0x15cd: 0x2019, 0x15ce: 0x0961, 0x15cf: 0x21ca, 0x15d0: 0x06e1, 0x15d1: 0x0049,\n\t0x15d2: 0x0029, 0x15d3: 0x0031, 0x15d4: 0x06e9, 0x15d5: 0x06f1, 0x15d6: 0x06f9, 0x15d7: 0x0701,\n\t0x15d8: 0x0709, 0x15d9: 0x0711, 0x15da: 0x1fc2, 0x15db: 0x0122, 0x15dc: 0x2022, 0x15dd: 0x0722,\n\t0x15de: 0x202a, 0x15df: 0x1fd2, 0x15e0: 0x204a, 0x15e1: 0x0019, 0x15e2: 0x02e9, 0x15e3: 0x03d9,\n\t0x15e4: 0x02f1, 0x15e5: 0x02f9, 0x15e6: 0x03f1, 0x15e7: 0x0309, 0x15e8: 0x00a9, 0x15e9: 0x0311,\n\t0x15ea: 0x00b1, 0x15eb: 0x0319, 0x15ec: 0x0101, 0x15ed: 0x0321, 0x15ee: 0x0329, 0x15ef: 0x0051,\n\t0x15f0: 0x0339, 0x15f1: 0x0751, 0x15f2: 0x00b9, 0x15f3: 0x0089, 0x15f4: 0x0341, 0x15f5: 0x0349,\n\t0x15f6: 0x0391, 0x15f7: 0x00c1, 0x15f8: 0x0109, 0x15f9: 0x00c9, 0x15fa: 0x04b1, 0x15fb: 0x1ff2,\n\t0x15fc: 0x2032, 0x15fd: 0x1ffa, 0x15fe: 0x21d2, 0x15ff: 0x1fda,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x0672, 0x1601: 0x0019, 0x1602: 0x02e9, 0x1603: 0x03d9, 0x1604: 0x02f1, 0x1605: 0x02f9,\n\t0x1606: 0x03f1, 0x1607: 0x0309, 0x1608: 0x00a9, 0x1609: 0x0311, 0x160a: 0x00b1, 0x160b: 0x0319,\n\t0x160c: 0x0101, 0x160d: 0x0321, 0x160e: 0x0329, 0x160f: 0x0051, 0x1610: 0x0339, 0x1611: 0x0751,\n\t0x1612: 0x00b9, 0x1613: 0x0089, 0x1614: 0x0341, 0x1615: 0x0349, 0x1616: 0x0391, 0x1617: 0x00c1,\n\t0x1618: 0x0109, 0x1619: 0x00c9, 0x161a: 0x04b1, 0x161b: 0x1fe2, 0x161c: 0x21da, 0x161d: 0x1fea,\n\t0x161e: 0x21e2, 0x161f: 0x810d, 0x1620: 0x812d, 0x1621: 0x0961, 0x1622: 0x814d, 0x1623: 0x814d,\n\t0x1624: 0x816d, 0x1625: 0x818d, 0x1626: 0x81ad, 0x1627: 0x81cd, 0x1628: 0x81ed, 0x1629: 0x820d,\n\t0x162a: 0x822d, 0x162b: 0x824d, 0x162c: 0x826d, 0x162d: 0x828d, 0x162e: 0x82ad, 0x162f: 0x82cd,\n\t0x1630: 0x82ed, 0x1631: 0x830d, 0x1632: 0x832d, 0x1633: 0x834d, 0x1634: 0x836d, 0x1635: 0x838d,\n\t0x1636: 0x83ad, 0x1637: 0x83cd, 0x1638: 0x83ed, 0x1639: 0x840d, 0x163a: 0x842d, 0x163b: 0x844d,\n\t0x163c: 0x81ed, 0x163d: 0x846d, 0x163e: 0x848d, 0x163f: 0x824d,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x84ad, 0x1641: 0x84cd, 0x1642: 0x84ed, 0x1643: 0x850d, 0x1644: 0x852d, 0x1645: 0x854d,\n\t0x1646: 0x856d, 0x1647: 0x858d, 0x1648: 0x850d, 0x1649: 0x85ad, 0x164a: 0x850d, 0x164b: 0x85cd,\n\t0x164c: 0x85cd, 0x164d: 0x85ed, 0x164e: 0x85ed, 0x164f: 0x860d, 0x1650: 0x854d, 0x1651: 0x862d,\n\t0x1652: 0x864d, 0x1653: 0x862d, 0x1654: 0x866d, 0x1655: 0x864d, 0x1656: 0x868d, 0x1657: 0x868d,\n\t0x1658: 0x86ad, 0x1659: 0x86ad, 0x165a: 0x86cd, 0x165b: 0x86cd, 0x165c: 0x864d, 0x165d: 0x814d,\n\t0x165e: 0x86ed, 0x165f: 0x870d, 0x1660: 0x0040, 0x1661: 0x872d, 0x1662: 0x874d, 0x1663: 0x876d,\n\t0x1664: 0x878d, 0x1665: 0x876d, 0x1666: 0x87ad, 0x1667: 0x87cd, 0x1668: 0x87ed, 0x1669: 0x87ed,\n\t0x166a: 0x880d, 0x166b: 0x880d, 0x166c: 0x882d, 0x166d: 0x882d, 0x166e: 0x880d, 0x166f: 0x880d,\n\t0x1670: 0x884d, 0x1671: 0x886d, 0x1672: 0x888d, 0x1673: 0x88ad, 0x1674: 0x88cd, 0x1675: 0x88ed,\n\t0x1676: 0x88ed, 0x1677: 0x88ed, 0x1678: 0x890d, 0x1679: 0x890d, 0x167a: 0x890d, 0x167b: 0x890d,\n\t0x167c: 0x87ed, 0x167d: 0x87ed, 0x167e: 0x87ed, 0x167f: 0x0040,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x0040, 0x1681: 0x0040, 0x1682: 0x874d, 0x1683: 0x872d, 0x1684: 0x892d, 0x1685: 0x872d,\n\t0x1686: 0x874d, 0x1687: 0x872d, 0x1688: 0x0040, 0x1689: 0x0040, 0x168a: 0x894d, 0x168b: 0x874d,\n\t0x168c: 0x896d, 0x168d: 0x892d, 0x168e: 0x896d, 0x168f: 0x874d, 0x1690: 0x0040, 0x1691: 0x0040,\n\t0x1692: 0x898d, 0x1693: 0x89ad, 0x1694: 0x88ad, 0x1695: 0x896d, 0x1696: 0x892d, 0x1697: 0x896d,\n\t0x1698: 0x0040, 0x1699: 0x0040, 0x169a: 0x89cd, 0x169b: 0x89ed, 0x169c: 0x89cd, 0x169d: 0x0040,\n\t0x169e: 0x0040, 0x169f: 0x0040, 0x16a0: 0x21e9, 0x16a1: 0x21f1, 0x16a2: 0x21f9, 0x16a3: 0x8a0e,\n\t0x16a4: 0x2201, 0x16a5: 0x2209, 0x16a6: 0x8a2d, 0x16a7: 0x0040, 0x16a8: 0x8a4d, 0x16a9: 0x8a6d,\n\t0x16aa: 0x8a8d, 0x16ab: 0x8a6d, 0x16ac: 0x8aad, 0x16ad: 0x8acd, 0x16ae: 0x8aed, 0x16af: 0x0040,\n\t0x16b0: 0x0040, 0x16b1: 0x0040, 0x16b2: 0x0040, 0x16b3: 0x0040, 0x16b4: 0x0040, 0x16b5: 0x0040,\n\t0x16b6: 0x0040, 0x16b7: 0x0040, 0x16b8: 0x0040, 0x16b9: 0x0340, 0x16ba: 0x0340, 0x16bb: 0x0340,\n\t0x16bc: 0x0040, 0x16bd: 0x0040, 0x16be: 0x0040, 0x16bf: 0x0040,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x0a08, 0x16c1: 0x0a08, 0x16c2: 0x0a08, 0x16c3: 0x0a08, 0x16c4: 0x0a08, 0x16c5: 0x0c08,\n\t0x16c6: 0x0808, 0x16c7: 0x0c08, 0x16c8: 0x0818, 0x16c9: 0x0c08, 0x16ca: 0x0c08, 0x16cb: 0x0808,\n\t0x16cc: 0x0808, 0x16cd: 0x0908, 0x16ce: 0x0c08, 0x16cf: 0x0c08, 0x16d0: 0x0c08, 0x16d1: 0x0c08,\n\t0x16d2: 0x0c08, 0x16d3: 0x0a08, 0x16d4: 0x0a08, 0x16d5: 0x0a08, 0x16d6: 0x0a08, 0x16d7: 0x0908,\n\t0x16d8: 0x0a08, 0x16d9: 0x0a08, 0x16da: 0x0a08, 0x16db: 0x0a08, 0x16dc: 0x0a08, 0x16dd: 0x0c08,\n\t0x16de: 0x0a08, 0x16df: 0x0a08, 0x16e0: 0x0a08, 0x16e1: 0x0c08, 0x16e2: 0x0808, 0x16e3: 0x0808,\n\t0x16e4: 0x0c08, 0x16e5: 0x3308, 0x16e6: 0x3308, 0x16e7: 0x0040, 0x16e8: 0x0040, 0x16e9: 0x0040,\n\t0x16ea: 0x0040, 0x16eb: 0x0a18, 0x16ec: 0x0a18, 0x16ed: 0x0a18, 0x16ee: 0x0a18, 0x16ef: 0x0c18,\n\t0x16f0: 0x0818, 0x16f1: 0x0818, 0x16f2: 0x0818, 0x16f3: 0x0818, 0x16f4: 0x0818, 0x16f5: 0x0818,\n\t0x16f6: 0x0818, 0x16f7: 0x0040, 0x16f8: 0x0040, 0x16f9: 0x0040, 0x16fa: 0x0040, 0x16fb: 0x0040,\n\t0x16fc: 0x0040, 0x16fd: 0x0040, 0x16fe: 0x0040, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0a08, 0x1701: 0x0c08, 0x1702: 0x0a08, 0x1703: 0x0c08, 0x1704: 0x0c08, 0x1705: 0x0c08,\n\t0x1706: 0x0a08, 0x1707: 0x0a08, 0x1708: 0x0a08, 0x1709: 0x0c08, 0x170a: 0x0a08, 0x170b: 0x0a08,\n\t0x170c: 0x0c08, 0x170d: 0x0a08, 0x170e: 0x0c08, 0x170f: 0x0c08, 0x1710: 0x0a08, 0x1711: 0x0c08,\n\t0x1712: 0x0040, 0x1713: 0x0040, 0x1714: 0x0040, 0x1715: 0x0040, 0x1716: 0x0040, 0x1717: 0x0040,\n\t0x1718: 0x0040, 0x1719: 0x0818, 0x171a: 0x0818, 0x171b: 0x0818, 0x171c: 0x0818, 0x171d: 0x0040,\n\t0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0x0040, 0x1721: 0x0040, 0x1722: 0x0040, 0x1723: 0x0040,\n\t0x1724: 0x0040, 0x1725: 0x0040, 0x1726: 0x0040, 0x1727: 0x0040, 0x1728: 0x0040, 0x1729: 0x0c18,\n\t0x172a: 0x0c18, 0x172b: 0x0c18, 0x172c: 0x0c18, 0x172d: 0x0a18, 0x172e: 0x0a18, 0x172f: 0x0818,\n\t0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,\n\t0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0040, 0x173a: 0x0040, 0x173b: 0x0040,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x3308, 0x1741: 0x3308, 0x1742: 0x3008, 0x1743: 0x3008, 0x1744: 0x0040, 0x1745: 0x0008,\n\t0x1746: 0x0008, 0x1747: 0x0008, 0x1748: 0x0008, 0x1749: 0x0008, 0x174a: 0x0008, 0x174b: 0x0008,\n\t0x174c: 0x0008, 0x174d: 0x0040, 0x174e: 0x0040, 0x174f: 0x0008, 0x1750: 0x0008, 0x1751: 0x0040,\n\t0x1752: 0x0040, 0x1753: 0x0008, 0x1754: 0x0008, 0x1755: 0x0008, 0x1756: 0x0008, 0x1757: 0x0008,\n\t0x1758: 0x0008, 0x1759: 0x0008, 0x175a: 0x0008, 0x175b: 0x0008, 0x175c: 0x0008, 0x175d: 0x0008,\n\t0x175e: 0x0008, 0x175f: 0x0008, 0x1760: 0x0008, 0x1761: 0x0008, 0x1762: 0x0008, 0x1763: 0x0008,\n\t0x1764: 0x0008, 0x1765: 0x0008, 0x1766: 0x0008, 0x1767: 0x0008, 0x1768: 0x0008, 0x1769: 0x0040,\n\t0x176a: 0x0008, 0x176b: 0x0008, 0x176c: 0x0008, 0x176d: 0x0008, 0x176e: 0x0008, 0x176f: 0x0008,\n\t0x1770: 0x0008, 0x1771: 0x0040, 0x1772: 0x0008, 0x1773: 0x0008, 0x1774: 0x0040, 0x1775: 0x0008,\n\t0x1776: 0x0008, 0x1777: 0x0008, 0x1778: 0x0008, 0x1779: 0x0008, 0x177a: 0x0040, 0x177b: 0x3308,\n\t0x177c: 0x3308, 0x177d: 0x0008, 0x177e: 0x3008, 0x177f: 0x3008,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x3308, 0x1781: 0x3008, 0x1782: 0x3008, 0x1783: 0x3008, 0x1784: 0x3008, 0x1785: 0x0040,\n\t0x1786: 0x0040, 0x1787: 0x3008, 0x1788: 0x3008, 0x1789: 0x0040, 0x178a: 0x0040, 0x178b: 0x3008,\n\t0x178c: 0x3008, 0x178d: 0x3808, 0x178e: 0x0040, 0x178f: 0x0040, 0x1790: 0x0008, 0x1791: 0x0040,\n\t0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x3008,\n\t0x1798: 0x0040, 0x1799: 0x0040, 0x179a: 0x0040, 0x179b: 0x0040, 0x179c: 0x0040, 0x179d: 0x0008,\n\t0x179e: 0x0008, 0x179f: 0x0008, 0x17a0: 0x0008, 0x17a1: 0x0008, 0x17a2: 0x3008, 0x17a3: 0x3008,\n\t0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x3308, 0x17a7: 0x3308, 0x17a8: 0x3308, 0x17a9: 0x3308,\n\t0x17aa: 0x3308, 0x17ab: 0x3308, 0x17ac: 0x3308, 0x17ad: 0x0040, 0x17ae: 0x0040, 0x17af: 0x0040,\n\t0x17b0: 0x3308, 0x17b1: 0x3308, 0x17b2: 0x3308, 0x17b3: 0x3308, 0x17b4: 0x3308, 0x17b5: 0x0040,\n\t0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040,\n\t0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x0008, 0x17c1: 0x0008, 0x17c2: 0x0008, 0x17c3: 0x0008, 0x17c4: 0x0008, 0x17c5: 0x0008,\n\t0x17c6: 0x0008, 0x17c7: 0x0040, 0x17c8: 0x0040, 0x17c9: 0x0008, 0x17ca: 0x0040, 0x17cb: 0x0040,\n\t0x17cc: 0x0008, 0x17cd: 0x0008, 0x17ce: 0x0008, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0008,\n\t0x17d2: 0x0008, 0x17d3: 0x0008, 0x17d4: 0x0040, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0040,\n\t0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008,\n\t0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008,\n\t0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0008,\n\t0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008,\n\t0x17f0: 0x3008, 0x17f1: 0x3008, 0x17f2: 0x3008, 0x17f3: 0x3008, 0x17f4: 0x3008, 0x17f5: 0x3008,\n\t0x17f6: 0x0040, 0x17f7: 0x3008, 0x17f8: 0x3008, 0x17f9: 0x0040, 0x17fa: 0x0040, 0x17fb: 0x3308,\n\t0x17fc: 0x3308, 0x17fd: 0x3808, 0x17fe: 0x3b08, 0x17ff: 0x0008,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x0019, 0x1801: 0x02e9, 0x1802: 0x03d9, 0x1803: 0x02f1, 0x1804: 0x02f9, 0x1805: 0x03f1,\n\t0x1806: 0x0309, 0x1807: 0x00a9, 0x1808: 0x0311, 0x1809: 0x00b1, 0x180a: 0x0319, 0x180b: 0x0101,\n\t0x180c: 0x0321, 0x180d: 0x0329, 0x180e: 0x0051, 0x180f: 0x0339, 0x1810: 0x0751, 0x1811: 0x00b9,\n\t0x1812: 0x0089, 0x1813: 0x0341, 0x1814: 0x0349, 0x1815: 0x0391, 0x1816: 0x00c1, 0x1817: 0x0109,\n\t0x1818: 0x00c9, 0x1819: 0x04b1, 0x181a: 0x0019, 0x181b: 0x02e9, 0x181c: 0x03d9, 0x181d: 0x02f1,\n\t0x181e: 0x02f9, 0x181f: 0x03f1, 0x1820: 0x0309, 0x1821: 0x00a9, 0x1822: 0x0311, 0x1823: 0x00b1,\n\t0x1824: 0x0319, 0x1825: 0x0101, 0x1826: 0x0321, 0x1827: 0x0329, 0x1828: 0x0051, 0x1829: 0x0339,\n\t0x182a: 0x0751, 0x182b: 0x00b9, 0x182c: 0x0089, 0x182d: 0x0341, 0x182e: 0x0349, 0x182f: 0x0391,\n\t0x1830: 0x00c1, 0x1831: 0x0109, 0x1832: 0x00c9, 0x1833: 0x04b1, 0x1834: 0x0019, 0x1835: 0x02e9,\n\t0x1836: 0x03d9, 0x1837: 0x02f1, 0x1838: 0x02f9, 0x1839: 0x03f1, 0x183a: 0x0309, 0x183b: 0x00a9,\n\t0x183c: 0x0311, 0x183d: 0x00b1, 0x183e: 0x0319, 0x183f: 0x0101,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0321, 0x1841: 0x0329, 0x1842: 0x0051, 0x1843: 0x0339, 0x1844: 0x0751, 0x1845: 0x00b9,\n\t0x1846: 0x0089, 0x1847: 0x0341, 0x1848: 0x0349, 0x1849: 0x0391, 0x184a: 0x00c1, 0x184b: 0x0109,\n\t0x184c: 0x00c9, 0x184d: 0x04b1, 0x184e: 0x0019, 0x184f: 0x02e9, 0x1850: 0x03d9, 0x1851: 0x02f1,\n\t0x1852: 0x02f9, 0x1853: 0x03f1, 0x1854: 0x0309, 0x1855: 0x0040, 0x1856: 0x0311, 0x1857: 0x00b1,\n\t0x1858: 0x0319, 0x1859: 0x0101, 0x185a: 0x0321, 0x185b: 0x0329, 0x185c: 0x0051, 0x185d: 0x0339,\n\t0x185e: 0x0751, 0x185f: 0x00b9, 0x1860: 0x0089, 0x1861: 0x0341, 0x1862: 0x0349, 0x1863: 0x0391,\n\t0x1864: 0x00c1, 0x1865: 0x0109, 0x1866: 0x00c9, 0x1867: 0x04b1, 0x1868: 0x0019, 0x1869: 0x02e9,\n\t0x186a: 0x03d9, 0x186b: 0x02f1, 0x186c: 0x02f9, 0x186d: 0x03f1, 0x186e: 0x0309, 0x186f: 0x00a9,\n\t0x1870: 0x0311, 0x1871: 0x00b1, 0x1872: 0x0319, 0x1873: 0x0101, 0x1874: 0x0321, 0x1875: 0x0329,\n\t0x1876: 0x0051, 0x1877: 0x0339, 0x1878: 0x0751, 0x1879: 0x00b9, 0x187a: 0x0089, 0x187b: 0x0341,\n\t0x187c: 0x0349, 0x187d: 0x0391, 0x187e: 0x00c1, 0x187f: 0x0109,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x00c9, 0x1881: 0x04b1, 0x1882: 0x0019, 0x1883: 0x02e9, 0x1884: 0x03d9, 0x1885: 0x02f1,\n\t0x1886: 0x02f9, 0x1887: 0x03f1, 0x1888: 0x0309, 0x1889: 0x00a9, 0x188a: 0x0311, 0x188b: 0x00b1,\n\t0x188c: 0x0319, 0x188d: 0x0101, 0x188e: 0x0321, 0x188f: 0x0329, 0x1890: 0x0051, 0x1891: 0x0339,\n\t0x1892: 0x0751, 0x1893: 0x00b9, 0x1894: 0x0089, 0x1895: 0x0341, 0x1896: 0x0349, 0x1897: 0x0391,\n\t0x1898: 0x00c1, 0x1899: 0x0109, 0x189a: 0x00c9, 0x189b: 0x04b1, 0x189c: 0x0019, 0x189d: 0x0040,\n\t0x189e: 0x03d9, 0x189f: 0x02f1, 0x18a0: 0x0040, 0x18a1: 0x0040, 0x18a2: 0x0309, 0x18a3: 0x0040,\n\t0x18a4: 0x0040, 0x18a5: 0x00b1, 0x18a6: 0x0319, 0x18a7: 0x0040, 0x18a8: 0x0040, 0x18a9: 0x0329,\n\t0x18aa: 0x0051, 0x18ab: 0x0339, 0x18ac: 0x0751, 0x18ad: 0x0040, 0x18ae: 0x0089, 0x18af: 0x0341,\n\t0x18b0: 0x0349, 0x18b1: 0x0391, 0x18b2: 0x00c1, 0x18b3: 0x0109, 0x18b4: 0x00c9, 0x18b5: 0x04b1,\n\t0x18b6: 0x0019, 0x18b7: 0x02e9, 0x18b8: 0x03d9, 0x18b9: 0x02f1, 0x18ba: 0x0040, 0x18bb: 0x03f1,\n\t0x18bc: 0x0040, 0x18bd: 0x00a9, 0x18be: 0x0311, 0x18bf: 0x00b1,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x0319, 0x18c1: 0x0101, 0x18c2: 0x0321, 0x18c3: 0x0329, 0x18c4: 0x0040, 0x18c5: 0x0339,\n\t0x18c6: 0x0751, 0x18c7: 0x00b9, 0x18c8: 0x0089, 0x18c9: 0x0341, 0x18ca: 0x0349, 0x18cb: 0x0391,\n\t0x18cc: 0x00c1, 0x18cd: 0x0109, 0x18ce: 0x00c9, 0x18cf: 0x04b1, 0x18d0: 0x0019, 0x18d1: 0x02e9,\n\t0x18d2: 0x03d9, 0x18d3: 0x02f1, 0x18d4: 0x02f9, 0x18d5: 0x03f1, 0x18d6: 0x0309, 0x18d7: 0x00a9,\n\t0x18d8: 0x0311, 0x18d9: 0x00b1, 0x18da: 0x0319, 0x18db: 0x0101, 0x18dc: 0x0321, 0x18dd: 0x0329,\n\t0x18de: 0x0051, 0x18df: 0x0339, 0x18e0: 0x0751, 0x18e1: 0x00b9, 0x18e2: 0x0089, 0x18e3: 0x0341,\n\t0x18e4: 0x0349, 0x18e5: 0x0391, 0x18e6: 0x00c1, 0x18e7: 0x0109, 0x18e8: 0x00c9, 0x18e9: 0x04b1,\n\t0x18ea: 0x0019, 0x18eb: 0x02e9, 0x18ec: 0x03d9, 0x18ed: 0x02f1, 0x18ee: 0x02f9, 0x18ef: 0x03f1,\n\t0x18f0: 0x0309, 0x18f1: 0x00a9, 0x18f2: 0x0311, 0x18f3: 0x00b1, 0x18f4: 0x0319, 0x18f5: 0x0101,\n\t0x18f6: 0x0321, 0x18f7: 0x0329, 0x18f8: 0x0051, 0x18f9: 0x0339, 0x18fa: 0x0751, 0x18fb: 0x00b9,\n\t0x18fc: 0x0089, 0x18fd: 0x0341, 0x18fe: 0x0349, 0x18ff: 0x0391,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x00c1, 0x1901: 0x0109, 0x1902: 0x00c9, 0x1903: 0x04b1, 0x1904: 0x0019, 0x1905: 0x02e9,\n\t0x1906: 0x0040, 0x1907: 0x02f1, 0x1908: 0x02f9, 0x1909: 0x03f1, 0x190a: 0x0309, 0x190b: 0x0040,\n\t0x190c: 0x0040, 0x190d: 0x00b1, 0x190e: 0x0319, 0x190f: 0x0101, 0x1910: 0x0321, 0x1911: 0x0329,\n\t0x1912: 0x0051, 0x1913: 0x0339, 0x1914: 0x0751, 0x1915: 0x0040, 0x1916: 0x0089, 0x1917: 0x0341,\n\t0x1918: 0x0349, 0x1919: 0x0391, 0x191a: 0x00c1, 0x191b: 0x0109, 0x191c: 0x00c9, 0x191d: 0x0040,\n\t0x191e: 0x0019, 0x191f: 0x02e9, 0x1920: 0x03d9, 0x1921: 0x02f1, 0x1922: 0x02f9, 0x1923: 0x03f1,\n\t0x1924: 0x0309, 0x1925: 0x00a9, 0x1926: 0x0311, 0x1927: 0x00b1, 0x1928: 0x0319, 0x1929: 0x0101,\n\t0x192a: 0x0321, 0x192b: 0x0329, 0x192c: 0x0051, 0x192d: 0x0339, 0x192e: 0x0751, 0x192f: 0x00b9,\n\t0x1930: 0x0089, 0x1931: 0x0341, 0x1932: 0x0349, 0x1933: 0x0391, 0x1934: 0x00c1, 0x1935: 0x0109,\n\t0x1936: 0x00c9, 0x1937: 0x04b1, 0x1938: 0x0019, 0x1939: 0x02e9, 0x193a: 0x0040, 0x193b: 0x02f1,\n\t0x193c: 0x02f9, 0x193d: 0x03f1, 0x193e: 0x0309, 0x193f: 0x0040,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0311, 0x1941: 0x00b1, 0x1942: 0x0319, 0x1943: 0x0101, 0x1944: 0x0321, 0x1945: 0x0040,\n\t0x1946: 0x0051, 0x1947: 0x0040, 0x1948: 0x0040, 0x1949: 0x0040, 0x194a: 0x0089, 0x194b: 0x0341,\n\t0x194c: 0x0349, 0x194d: 0x0391, 0x194e: 0x00c1, 0x194f: 0x0109, 0x1950: 0x00c9, 0x1951: 0x0040,\n\t0x1952: 0x0019, 0x1953: 0x02e9, 0x1954: 0x03d9, 0x1955: 0x02f1, 0x1956: 0x02f9, 0x1957: 0x03f1,\n\t0x1958: 0x0309, 0x1959: 0x00a9, 0x195a: 0x0311, 0x195b: 0x00b1, 0x195c: 0x0319, 0x195d: 0x0101,\n\t0x195e: 0x0321, 0x195f: 0x0329, 0x1960: 0x0051, 0x1961: 0x0339, 0x1962: 0x0751, 0x1963: 0x00b9,\n\t0x1964: 0x0089, 0x1965: 0x0341, 0x1966: 0x0349, 0x1967: 0x0391, 0x1968: 0x00c1, 0x1969: 0x0109,\n\t0x196a: 0x00c9, 0x196b: 0x04b1, 0x196c: 0x0019, 0x196d: 0x02e9, 0x196e: 0x03d9, 0x196f: 0x02f1,\n\t0x1970: 0x02f9, 0x1971: 0x03f1, 0x1972: 0x0309, 0x1973: 0x00a9, 0x1974: 0x0311, 0x1975: 0x00b1,\n\t0x1976: 0x0319, 0x1977: 0x0101, 0x1978: 0x0321, 0x1979: 0x0329, 0x197a: 0x0051, 0x197b: 0x0339,\n\t0x197c: 0x0751, 0x197d: 0x00b9, 0x197e: 0x0089, 0x197f: 0x0341,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0349, 0x1981: 0x0391, 0x1982: 0x00c1, 0x1983: 0x0109, 0x1984: 0x00c9, 0x1985: 0x04b1,\n\t0x1986: 0x0019, 0x1987: 0x02e9, 0x1988: 0x03d9, 0x1989: 0x02f1, 0x198a: 0x02f9, 0x198b: 0x03f1,\n\t0x198c: 0x0309, 0x198d: 0x00a9, 0x198e: 0x0311, 0x198f: 0x00b1, 0x1990: 0x0319, 0x1991: 0x0101,\n\t0x1992: 0x0321, 0x1993: 0x0329, 0x1994: 0x0051, 0x1995: 0x0339, 0x1996: 0x0751, 0x1997: 0x00b9,\n\t0x1998: 0x0089, 0x1999: 0x0341, 0x199a: 0x0349, 0x199b: 0x0391, 0x199c: 0x00c1, 0x199d: 0x0109,\n\t0x199e: 0x00c9, 0x199f: 0x04b1, 0x19a0: 0x0019, 0x19a1: 0x02e9, 0x19a2: 0x03d9, 0x19a3: 0x02f1,\n\t0x19a4: 0x02f9, 0x19a5: 0x03f1, 0x19a6: 0x0309, 0x19a7: 0x00a9, 0x19a8: 0x0311, 0x19a9: 0x00b1,\n\t0x19aa: 0x0319, 0x19ab: 0x0101, 0x19ac: 0x0321, 0x19ad: 0x0329, 0x19ae: 0x0051, 0x19af: 0x0339,\n\t0x19b0: 0x0751, 0x19b1: 0x00b9, 0x19b2: 0x0089, 0x19b3: 0x0341, 0x19b4: 0x0349, 0x19b5: 0x0391,\n\t0x19b6: 0x00c1, 0x19b7: 0x0109, 0x19b8: 0x00c9, 0x19b9: 0x04b1, 0x19ba: 0x0019, 0x19bb: 0x02e9,\n\t0x19bc: 0x03d9, 0x19bd: 0x02f1, 0x19be: 0x02f9, 0x19bf: 0x03f1,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x0309, 0x19c1: 0x00a9, 0x19c2: 0x0311, 0x19c3: 0x00b1, 0x19c4: 0x0319, 0x19c5: 0x0101,\n\t0x19c6: 0x0321, 0x19c7: 0x0329, 0x19c8: 0x0051, 0x19c9: 0x0339, 0x19ca: 0x0751, 0x19cb: 0x00b9,\n\t0x19cc: 0x0089, 0x19cd: 0x0341, 0x19ce: 0x0349, 0x19cf: 0x0391, 0x19d0: 0x00c1, 0x19d1: 0x0109,\n\t0x19d2: 0x00c9, 0x19d3: 0x04b1, 0x19d4: 0x0019, 0x19d5: 0x02e9, 0x19d6: 0x03d9, 0x19d7: 0x02f1,\n\t0x19d8: 0x02f9, 0x19d9: 0x03f1, 0x19da: 0x0309, 0x19db: 0x00a9, 0x19dc: 0x0311, 0x19dd: 0x00b1,\n\t0x19de: 0x0319, 0x19df: 0x0101, 0x19e0: 0x0321, 0x19e1: 0x0329, 0x19e2: 0x0051, 0x19e3: 0x0339,\n\t0x19e4: 0x0751, 0x19e5: 0x00b9, 0x19e6: 0x0089, 0x19e7: 0x0341, 0x19e8: 0x0349, 0x19e9: 0x0391,\n\t0x19ea: 0x00c1, 0x19eb: 0x0109, 0x19ec: 0x00c9, 0x19ed: 0x04b1, 0x19ee: 0x0019, 0x19ef: 0x02e9,\n\t0x19f0: 0x03d9, 0x19f1: 0x02f1, 0x19f2: 0x02f9, 0x19f3: 0x03f1, 0x19f4: 0x0309, 0x19f5: 0x00a9,\n\t0x19f6: 0x0311, 0x19f7: 0x00b1, 0x19f8: 0x0319, 0x19f9: 0x0101, 0x19fa: 0x0321, 0x19fb: 0x0329,\n\t0x19fc: 0x0051, 0x19fd: 0x0339, 0x19fe: 0x0751, 0x19ff: 0x00b9,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x0089, 0x1a01: 0x0341, 0x1a02: 0x0349, 0x1a03: 0x0391, 0x1a04: 0x00c1, 0x1a05: 0x0109,\n\t0x1a06: 0x00c9, 0x1a07: 0x04b1, 0x1a08: 0x0019, 0x1a09: 0x02e9, 0x1a0a: 0x03d9, 0x1a0b: 0x02f1,\n\t0x1a0c: 0x02f9, 0x1a0d: 0x03f1, 0x1a0e: 0x0309, 0x1a0f: 0x00a9, 0x1a10: 0x0311, 0x1a11: 0x00b1,\n\t0x1a12: 0x0319, 0x1a13: 0x0101, 0x1a14: 0x0321, 0x1a15: 0x0329, 0x1a16: 0x0051, 0x1a17: 0x0339,\n\t0x1a18: 0x0751, 0x1a19: 0x00b9, 0x1a1a: 0x0089, 0x1a1b: 0x0341, 0x1a1c: 0x0349, 0x1a1d: 0x0391,\n\t0x1a1e: 0x00c1, 0x1a1f: 0x0109, 0x1a20: 0x00c9, 0x1a21: 0x04b1, 0x1a22: 0x0019, 0x1a23: 0x02e9,\n\t0x1a24: 0x03d9, 0x1a25: 0x02f1, 0x1a26: 0x02f9, 0x1a27: 0x03f1, 0x1a28: 0x0309, 0x1a29: 0x00a9,\n\t0x1a2a: 0x0311, 0x1a2b: 0x00b1, 0x1a2c: 0x0319, 0x1a2d: 0x0101, 0x1a2e: 0x0321, 0x1a2f: 0x0329,\n\t0x1a30: 0x0051, 0x1a31: 0x0339, 0x1a32: 0x0751, 0x1a33: 0x00b9, 0x1a34: 0x0089, 0x1a35: 0x0341,\n\t0x1a36: 0x0349, 0x1a37: 0x0391, 0x1a38: 0x00c1, 0x1a39: 0x0109, 0x1a3a: 0x00c9, 0x1a3b: 0x04b1,\n\t0x1a3c: 0x0019, 0x1a3d: 0x02e9, 0x1a3e: 0x03d9, 0x1a3f: 0x02f1,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x02f9, 0x1a41: 0x03f1, 0x1a42: 0x0309, 0x1a43: 0x00a9, 0x1a44: 0x0311, 0x1a45: 0x00b1,\n\t0x1a46: 0x0319, 0x1a47: 0x0101, 0x1a48: 0x0321, 0x1a49: 0x0329, 0x1a4a: 0x0051, 0x1a4b: 0x0339,\n\t0x1a4c: 0x0751, 0x1a4d: 0x00b9, 0x1a4e: 0x0089, 0x1a4f: 0x0341, 0x1a50: 0x0349, 0x1a51: 0x0391,\n\t0x1a52: 0x00c1, 0x1a53: 0x0109, 0x1a54: 0x00c9, 0x1a55: 0x04b1, 0x1a56: 0x0019, 0x1a57: 0x02e9,\n\t0x1a58: 0x03d9, 0x1a59: 0x02f1, 0x1a5a: 0x02f9, 0x1a5b: 0x03f1, 0x1a5c: 0x0309, 0x1a5d: 0x00a9,\n\t0x1a5e: 0x0311, 0x1a5f: 0x00b1, 0x1a60: 0x0319, 0x1a61: 0x0101, 0x1a62: 0x0321, 0x1a63: 0x0329,\n\t0x1a64: 0x0051, 0x1a65: 0x0339, 0x1a66: 0x0751, 0x1a67: 0x00b9, 0x1a68: 0x0089, 0x1a69: 0x0341,\n\t0x1a6a: 0x0349, 0x1a6b: 0x0391, 0x1a6c: 0x00c1, 0x1a6d: 0x0109, 0x1a6e: 0x00c9, 0x1a6f: 0x04b1,\n\t0x1a70: 0x0019, 0x1a71: 0x02e9, 0x1a72: 0x03d9, 0x1a73: 0x02f1, 0x1a74: 0x02f9, 0x1a75: 0x03f1,\n\t0x1a76: 0x0309, 0x1a77: 0x00a9, 0x1a78: 0x0311, 0x1a79: 0x00b1, 0x1a7a: 0x0319, 0x1a7b: 0x0101,\n\t0x1a7c: 0x0321, 0x1a7d: 0x0329, 0x1a7e: 0x0051, 0x1a7f: 0x0339,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x0751, 0x1a81: 0x00b9, 0x1a82: 0x0089, 0x1a83: 0x0341, 0x1a84: 0x0349, 0x1a85: 0x0391,\n\t0x1a86: 0x00c1, 0x1a87: 0x0109, 0x1a88: 0x00c9, 0x1a89: 0x04b1, 0x1a8a: 0x0019, 0x1a8b: 0x02e9,\n\t0x1a8c: 0x03d9, 0x1a8d: 0x02f1, 0x1a8e: 0x02f9, 0x1a8f: 0x03f1, 0x1a90: 0x0309, 0x1a91: 0x00a9,\n\t0x1a92: 0x0311, 0x1a93: 0x00b1, 0x1a94: 0x0319, 0x1a95: 0x0101, 0x1a96: 0x0321, 0x1a97: 0x0329,\n\t0x1a98: 0x0051, 0x1a99: 0x0339, 0x1a9a: 0x0751, 0x1a9b: 0x00b9, 0x1a9c: 0x0089, 0x1a9d: 0x0341,\n\t0x1a9e: 0x0349, 0x1a9f: 0x0391, 0x1aa0: 0x00c1, 0x1aa1: 0x0109, 0x1aa2: 0x00c9, 0x1aa3: 0x04b1,\n\t0x1aa4: 0x2279, 0x1aa5: 0x2281, 0x1aa6: 0x0040, 0x1aa7: 0x0040, 0x1aa8: 0x2289, 0x1aa9: 0x0399,\n\t0x1aaa: 0x03a1, 0x1aab: 0x03a9, 0x1aac: 0x2291, 0x1aad: 0x2299, 0x1aae: 0x22a1, 0x1aaf: 0x04d1,\n\t0x1ab0: 0x05f9, 0x1ab1: 0x22a9, 0x1ab2: 0x22b1, 0x1ab3: 0x22b9, 0x1ab4: 0x22c1, 0x1ab5: 0x22c9,\n\t0x1ab6: 0x22d1, 0x1ab7: 0x0799, 0x1ab8: 0x03c1, 0x1ab9: 0x04d1, 0x1aba: 0x22d9, 0x1abb: 0x22e1,\n\t0x1abc: 0x22e9, 0x1abd: 0x03b1, 0x1abe: 0x03b9, 0x1abf: 0x22f1,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x0769, 0x1ac1: 0x22f9, 0x1ac2: 0x2289, 0x1ac3: 0x0399, 0x1ac4: 0x03a1, 0x1ac5: 0x03a9,\n\t0x1ac6: 0x2291, 0x1ac7: 0x2299, 0x1ac8: 0x22a1, 0x1ac9: 0x04d1, 0x1aca: 0x05f9, 0x1acb: 0x22a9,\n\t0x1acc: 0x22b1, 0x1acd: 0x22b9, 0x1ace: 0x22c1, 0x1acf: 0x22c9, 0x1ad0: 0x22d1, 0x1ad1: 0x0799,\n\t0x1ad2: 0x03c1, 0x1ad3: 0x22d9, 0x1ad4: 0x22d9, 0x1ad5: 0x22e1, 0x1ad6: 0x22e9, 0x1ad7: 0x03b1,\n\t0x1ad8: 0x03b9, 0x1ad9: 0x22f1, 0x1ada: 0x0769, 0x1adb: 0x2301, 0x1adc: 0x2291, 0x1add: 0x04d1,\n\t0x1ade: 0x22a9, 0x1adf: 0x03b1, 0x1ae0: 0x03c1, 0x1ae1: 0x0799, 0x1ae2: 0x2289, 0x1ae3: 0x0399,\n\t0x1ae4: 0x03a1, 0x1ae5: 0x03a9, 0x1ae6: 0x2291, 0x1ae7: 0x2299, 0x1ae8: 0x22a1, 0x1ae9: 0x04d1,\n\t0x1aea: 0x05f9, 0x1aeb: 0x22a9, 0x1aec: 0x22b1, 0x1aed: 0x22b9, 0x1aee: 0x22c1, 0x1aef: 0x22c9,\n\t0x1af0: 0x22d1, 0x1af1: 0x0799, 0x1af2: 0x03c1, 0x1af3: 0x04d1, 0x1af4: 0x22d9, 0x1af5: 0x22e1,\n\t0x1af6: 0x22e9, 0x1af7: 0x03b1, 0x1af8: 0x03b9, 0x1af9: 0x22f1, 0x1afa: 0x0769, 0x1afb: 0x22f9,\n\t0x1afc: 0x2289, 0x1afd: 0x0399, 0x1afe: 0x03a1, 0x1aff: 0x03a9,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x2291, 0x1b01: 0x2299, 0x1b02: 0x22a1, 0x1b03: 0x04d1, 0x1b04: 0x05f9, 0x1b05: 0x22a9,\n\t0x1b06: 0x22b1, 0x1b07: 0x22b9, 0x1b08: 0x22c1, 0x1b09: 0x22c9, 0x1b0a: 0x22d1, 0x1b0b: 0x0799,\n\t0x1b0c: 0x03c1, 0x1b0d: 0x22d9, 0x1b0e: 0x22d9, 0x1b0f: 0x22e1, 0x1b10: 0x22e9, 0x1b11: 0x03b1,\n\t0x1b12: 0x03b9, 0x1b13: 0x22f1, 0x1b14: 0x0769, 0x1b15: 0x2301, 0x1b16: 0x2291, 0x1b17: 0x04d1,\n\t0x1b18: 0x22a9, 0x1b19: 0x03b1, 0x1b1a: 0x03c1, 0x1b1b: 0x0799, 0x1b1c: 0x2289, 0x1b1d: 0x0399,\n\t0x1b1e: 0x03a1, 0x1b1f: 0x03a9, 0x1b20: 0x2291, 0x1b21: 0x2299, 0x1b22: 0x22a1, 0x1b23: 0x04d1,\n\t0x1b24: 0x05f9, 0x1b25: 0x22a9, 0x1b26: 0x22b1, 0x1b27: 0x22b9, 0x1b28: 0x22c1, 0x1b29: 0x22c9,\n\t0x1b2a: 0x22d1, 0x1b2b: 0x0799, 0x1b2c: 0x03c1, 0x1b2d: 0x04d1, 0x1b2e: 0x22d9, 0x1b2f: 0x22e1,\n\t0x1b30: 0x22e9, 0x1b31: 0x03b1, 0x1b32: 0x03b9, 0x1b33: 0x22f1, 0x1b34: 0x0769, 0x1b35: 0x22f9,\n\t0x1b36: 0x2289, 0x1b37: 0x0399, 0x1b38: 0x03a1, 0x1b39: 0x03a9, 0x1b3a: 0x2291, 0x1b3b: 0x2299,\n\t0x1b3c: 0x22a1, 0x1b3d: 0x04d1, 0x1b3e: 0x05f9, 0x1b3f: 0x22a9,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0x22b1, 0x1b41: 0x22b9, 0x1b42: 0x22c1, 0x1b43: 0x22c9, 0x1b44: 0x22d1, 0x1b45: 0x0799,\n\t0x1b46: 0x03c1, 0x1b47: 0x22d9, 0x1b48: 0x22d9, 0x1b49: 0x22e1, 0x1b4a: 0x22e9, 0x1b4b: 0x03b1,\n\t0x1b4c: 0x03b9, 0x1b4d: 0x22f1, 0x1b4e: 0x0769, 0x1b4f: 0x2301, 0x1b50: 0x2291, 0x1b51: 0x04d1,\n\t0x1b52: 0x22a9, 0x1b53: 0x03b1, 0x1b54: 0x03c1, 0x1b55: 0x0799, 0x1b56: 0x2289, 0x1b57: 0x0399,\n\t0x1b58: 0x03a1, 0x1b59: 0x03a9, 0x1b5a: 0x2291, 0x1b5b: 0x2299, 0x1b5c: 0x22a1, 0x1b5d: 0x04d1,\n\t0x1b5e: 0x05f9, 0x1b5f: 0x22a9, 0x1b60: 0x22b1, 0x1b61: 0x22b9, 0x1b62: 0x22c1, 0x1b63: 0x22c9,\n\t0x1b64: 0x22d1, 0x1b65: 0x0799, 0x1b66: 0x03c1, 0x1b67: 0x04d1, 0x1b68: 0x22d9, 0x1b69: 0x22e1,\n\t0x1b6a: 0x22e9, 0x1b6b: 0x03b1, 0x1b6c: 0x03b9, 0x1b6d: 0x22f1, 0x1b6e: 0x0769, 0x1b6f: 0x22f9,\n\t0x1b70: 0x2289, 0x1b71: 0x0399, 0x1b72: 0x03a1, 0x1b73: 0x03a9, 0x1b74: 0x2291, 0x1b75: 0x2299,\n\t0x1b76: 0x22a1, 0x1b77: 0x04d1, 0x1b78: 0x05f9, 0x1b79: 0x22a9, 0x1b7a: 0x22b1, 0x1b7b: 0x22b9,\n\t0x1b7c: 0x22c1, 0x1b7d: 0x22c9, 0x1b7e: 0x22d1, 0x1b7f: 0x0799,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0x03c1, 0x1b81: 0x22d9, 0x1b82: 0x22d9, 0x1b83: 0x22e1, 0x1b84: 0x22e9, 0x1b85: 0x03b1,\n\t0x1b86: 0x03b9, 0x1b87: 0x22f1, 0x1b88: 0x0769, 0x1b89: 0x2301, 0x1b8a: 0x2291, 0x1b8b: 0x04d1,\n\t0x1b8c: 0x22a9, 0x1b8d: 0x03b1, 0x1b8e: 0x03c1, 0x1b8f: 0x0799, 0x1b90: 0x2289, 0x1b91: 0x0399,\n\t0x1b92: 0x03a1, 0x1b93: 0x03a9, 0x1b94: 0x2291, 0x1b95: 0x2299, 0x1b96: 0x22a1, 0x1b97: 0x04d1,\n\t0x1b98: 0x05f9, 0x1b99: 0x22a9, 0x1b9a: 0x22b1, 0x1b9b: 0x22b9, 0x1b9c: 0x22c1, 0x1b9d: 0x22c9,\n\t0x1b9e: 0x22d1, 0x1b9f: 0x0799, 0x1ba0: 0x03c1, 0x1ba1: 0x04d1, 0x1ba2: 0x22d9, 0x1ba3: 0x22e1,\n\t0x1ba4: 0x22e9, 0x1ba5: 0x03b1, 0x1ba6: 0x03b9, 0x1ba7: 0x22f1, 0x1ba8: 0x0769, 0x1ba9: 0x22f9,\n\t0x1baa: 0x2289, 0x1bab: 0x0399, 0x1bac: 0x03a1, 0x1bad: 0x03a9, 0x1bae: 0x2291, 0x1baf: 0x2299,\n\t0x1bb0: 0x22a1, 0x1bb1: 0x04d1, 0x1bb2: 0x05f9, 0x1bb3: 0x22a9, 0x1bb4: 0x22b1, 0x1bb5: 0x22b9,\n\t0x1bb6: 0x22c1, 0x1bb7: 0x22c9, 0x1bb8: 0x22d1, 0x1bb9: 0x0799, 0x1bba: 0x03c1, 0x1bbb: 0x22d9,\n\t0x1bbc: 0x22d9, 0x1bbd: 0x22e1, 0x1bbe: 0x22e9, 0x1bbf: 0x03b1,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x03b9, 0x1bc1: 0x22f1, 0x1bc2: 0x0769, 0x1bc3: 0x2301, 0x1bc4: 0x2291, 0x1bc5: 0x04d1,\n\t0x1bc6: 0x22a9, 0x1bc7: 0x03b1, 0x1bc8: 0x03c1, 0x1bc9: 0x0799, 0x1bca: 0x2309, 0x1bcb: 0x2309,\n\t0x1bcc: 0x0040, 0x1bcd: 0x0040, 0x1bce: 0x06e1, 0x1bcf: 0x0049, 0x1bd0: 0x0029, 0x1bd1: 0x0031,\n\t0x1bd2: 0x06e9, 0x1bd3: 0x06f1, 0x1bd4: 0x06f9, 0x1bd5: 0x0701, 0x1bd6: 0x0709, 0x1bd7: 0x0711,\n\t0x1bd8: 0x06e1, 0x1bd9: 0x0049, 0x1bda: 0x0029, 0x1bdb: 0x0031, 0x1bdc: 0x06e9, 0x1bdd: 0x06f1,\n\t0x1bde: 0x06f9, 0x1bdf: 0x0701, 0x1be0: 0x0709, 0x1be1: 0x0711, 0x1be2: 0x06e1, 0x1be3: 0x0049,\n\t0x1be4: 0x0029, 0x1be5: 0x0031, 0x1be6: 0x06e9, 0x1be7: 0x06f1, 0x1be8: 0x06f9, 0x1be9: 0x0701,\n\t0x1bea: 0x0709, 0x1beb: 0x0711, 0x1bec: 0x06e1, 0x1bed: 0x0049, 0x1bee: 0x0029, 0x1bef: 0x0031,\n\t0x1bf0: 0x06e9, 0x1bf1: 0x06f1, 0x1bf2: 0x06f9, 0x1bf3: 0x0701, 0x1bf4: 0x0709, 0x1bf5: 0x0711,\n\t0x1bf6: 0x06e1, 0x1bf7: 0x0049, 0x1bf8: 0x0029, 0x1bf9: 0x0031, 0x1bfa: 0x06e9, 0x1bfb: 0x06f1,\n\t0x1bfc: 0x06f9, 0x1bfd: 0x0701, 0x1bfe: 0x0709, 0x1bff: 0x0711,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0xe115, 0x1c01: 0xe115, 0x1c02: 0xe135, 0x1c03: 0xe135, 0x1c04: 0xe115, 0x1c05: 0xe115,\n\t0x1c06: 0xe175, 0x1c07: 0xe175, 0x1c08: 0xe115, 0x1c09: 0xe115, 0x1c0a: 0xe135, 0x1c0b: 0xe135,\n\t0x1c0c: 0xe115, 0x1c0d: 0xe115, 0x1c0e: 0xe1f5, 0x1c0f: 0xe1f5, 0x1c10: 0xe115, 0x1c11: 0xe115,\n\t0x1c12: 0xe135, 0x1c13: 0xe135, 0x1c14: 0xe115, 0x1c15: 0xe115, 0x1c16: 0xe175, 0x1c17: 0xe175,\n\t0x1c18: 0xe115, 0x1c19: 0xe115, 0x1c1a: 0xe135, 0x1c1b: 0xe135, 0x1c1c: 0xe115, 0x1c1d: 0xe115,\n\t0x1c1e: 0x8b3d, 0x1c1f: 0x8b3d, 0x1c20: 0x04b5, 0x1c21: 0x04b5, 0x1c22: 0x0a08, 0x1c23: 0x0a08,\n\t0x1c24: 0x0a08, 0x1c25: 0x0a08, 0x1c26: 0x0a08, 0x1c27: 0x0a08, 0x1c28: 0x0a08, 0x1c29: 0x0a08,\n\t0x1c2a: 0x0a08, 0x1c2b: 0x0a08, 0x1c2c: 0x0a08, 0x1c2d: 0x0a08, 0x1c2e: 0x0a08, 0x1c2f: 0x0a08,\n\t0x1c30: 0x0a08, 0x1c31: 0x0a08, 0x1c32: 0x0a08, 0x1c33: 0x0a08, 0x1c34: 0x0a08, 0x1c35: 0x0a08,\n\t0x1c36: 0x0a08, 0x1c37: 0x0a08, 0x1c38: 0x0a08, 0x1c39: 0x0a08, 0x1c3a: 0x0a08, 0x1c3b: 0x0a08,\n\t0x1c3c: 0x0a08, 0x1c3d: 0x0a08, 0x1c3e: 0x0a08, 0x1c3f: 0x0a08,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0x20b1, 0x1c41: 0x20b9, 0x1c42: 0x20d9, 0x1c43: 0x20f1, 0x1c44: 0x0040, 0x1c45: 0x2189,\n\t0x1c46: 0x2109, 0x1c47: 0x20e1, 0x1c48: 0x2131, 0x1c49: 0x2191, 0x1c4a: 0x2161, 0x1c4b: 0x2169,\n\t0x1c4c: 0x2171, 0x1c4d: 0x2179, 0x1c4e: 0x2111, 0x1c4f: 0x2141, 0x1c50: 0x2151, 0x1c51: 0x2121,\n\t0x1c52: 0x2159, 0x1c53: 0x2101, 0x1c54: 0x2119, 0x1c55: 0x20c9, 0x1c56: 0x20d1, 0x1c57: 0x20e9,\n\t0x1c58: 0x20f9, 0x1c59: 0x2129, 0x1c5a: 0x2139, 0x1c5b: 0x2149, 0x1c5c: 0x2311, 0x1c5d: 0x1689,\n\t0x1c5e: 0x2319, 0x1c5f: 0x2321, 0x1c60: 0x0040, 0x1c61: 0x20b9, 0x1c62: 0x20d9, 0x1c63: 0x0040,\n\t0x1c64: 0x2181, 0x1c65: 0x0040, 0x1c66: 0x0040, 0x1c67: 0x20e1, 0x1c68: 0x0040, 0x1c69: 0x2191,\n\t0x1c6a: 0x2161, 0x1c6b: 0x2169, 0x1c6c: 0x2171, 0x1c6d: 0x2179, 0x1c6e: 0x2111, 0x1c6f: 0x2141,\n\t0x1c70: 0x2151, 0x1c71: 0x2121, 0x1c72: 0x2159, 0x1c73: 0x0040, 0x1c74: 0x2119, 0x1c75: 0x20c9,\n\t0x1c76: 0x20d1, 0x1c77: 0x20e9, 0x1c78: 0x0040, 0x1c79: 0x2129, 0x1c7a: 0x0040, 0x1c7b: 0x2149,\n\t0x1c7c: 0x0040, 0x1c7d: 0x0040, 0x1c7e: 0x0040, 0x1c7f: 0x0040,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0x0040, 0x1c81: 0x0040, 0x1c82: 0x20d9, 0x1c83: 0x0040, 0x1c84: 0x0040, 0x1c85: 0x0040,\n\t0x1c86: 0x0040, 0x1c87: 0x20e1, 0x1c88: 0x0040, 0x1c89: 0x2191, 0x1c8a: 0x0040, 0x1c8b: 0x2169,\n\t0x1c8c: 0x0040, 0x1c8d: 0x2179, 0x1c8e: 0x2111, 0x1c8f: 0x2141, 0x1c90: 0x0040, 0x1c91: 0x2121,\n\t0x1c92: 0x2159, 0x1c93: 0x0040, 0x1c94: 0x2119, 0x1c95: 0x0040, 0x1c96: 0x0040, 0x1c97: 0x20e9,\n\t0x1c98: 0x0040, 0x1c99: 0x2129, 0x1c9a: 0x0040, 0x1c9b: 0x2149, 0x1c9c: 0x0040, 0x1c9d: 0x1689,\n\t0x1c9e: 0x0040, 0x1c9f: 0x2321, 0x1ca0: 0x0040, 0x1ca1: 0x20b9, 0x1ca2: 0x20d9, 0x1ca3: 0x0040,\n\t0x1ca4: 0x2181, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0x20e1, 0x1ca8: 0x2131, 0x1ca9: 0x2191,\n\t0x1caa: 0x2161, 0x1cab: 0x0040, 0x1cac: 0x2171, 0x1cad: 0x2179, 0x1cae: 0x2111, 0x1caf: 0x2141,\n\t0x1cb0: 0x2151, 0x1cb1: 0x2121, 0x1cb2: 0x2159, 0x1cb3: 0x0040, 0x1cb4: 0x2119, 0x1cb5: 0x20c9,\n\t0x1cb6: 0x20d1, 0x1cb7: 0x20e9, 0x1cb8: 0x0040, 0x1cb9: 0x2129, 0x1cba: 0x2139, 0x1cbb: 0x2149,\n\t0x1cbc: 0x2311, 0x1cbd: 0x0040, 0x1cbe: 0x2319, 0x1cbf: 0x0040,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x20b1, 0x1cc1: 0x20b9, 0x1cc2: 0x20d9, 0x1cc3: 0x20f1, 0x1cc4: 0x2181, 0x1cc5: 0x2189,\n\t0x1cc6: 0x2109, 0x1cc7: 0x20e1, 0x1cc8: 0x2131, 0x1cc9: 0x2191, 0x1cca: 0x0040, 0x1ccb: 0x2169,\n\t0x1ccc: 0x2171, 0x1ccd: 0x2179, 0x1cce: 0x2111, 0x1ccf: 0x2141, 0x1cd0: 0x2151, 0x1cd1: 0x2121,\n\t0x1cd2: 0x2159, 0x1cd3: 0x2101, 0x1cd4: 0x2119, 0x1cd5: 0x20c9, 0x1cd6: 0x20d1, 0x1cd7: 0x20e9,\n\t0x1cd8: 0x20f9, 0x1cd9: 0x2129, 0x1cda: 0x2139, 0x1cdb: 0x2149, 0x1cdc: 0x0040, 0x1cdd: 0x0040,\n\t0x1cde: 0x0040, 0x1cdf: 0x0040, 0x1ce0: 0x0040, 0x1ce1: 0x20b9, 0x1ce2: 0x20d9, 0x1ce3: 0x20f1,\n\t0x1ce4: 0x0040, 0x1ce5: 0x2189, 0x1ce6: 0x2109, 0x1ce7: 0x20e1, 0x1ce8: 0x2131, 0x1ce9: 0x2191,\n\t0x1cea: 0x0040, 0x1ceb: 0x2169, 0x1cec: 0x2171, 0x1ced: 0x2179, 0x1cee: 0x2111, 0x1cef: 0x2141,\n\t0x1cf0: 0x2151, 0x1cf1: 0x2121, 0x1cf2: 0x2159, 0x1cf3: 0x2101, 0x1cf4: 0x2119, 0x1cf5: 0x20c9,\n\t0x1cf6: 0x20d1, 0x1cf7: 0x20e9, 0x1cf8: 0x20f9, 0x1cf9: 0x2129, 0x1cfa: 0x2139, 0x1cfb: 0x2149,\n\t0x1cfc: 0x0040, 0x1cfd: 0x0040, 0x1cfe: 0x0040, 0x1cff: 0x0040,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0x0040, 0x1d01: 0x232a, 0x1d02: 0x2332, 0x1d03: 0x233a, 0x1d04: 0x2342, 0x1d05: 0x234a,\n\t0x1d06: 0x2352, 0x1d07: 0x235a, 0x1d08: 0x2362, 0x1d09: 0x236a, 0x1d0a: 0x2372, 0x1d0b: 0x0018,\n\t0x1d0c: 0x0018, 0x1d0d: 0x0018, 0x1d0e: 0x0018, 0x1d0f: 0x0018, 0x1d10: 0x237a, 0x1d11: 0x2382,\n\t0x1d12: 0x238a, 0x1d13: 0x2392, 0x1d14: 0x239a, 0x1d15: 0x23a2, 0x1d16: 0x23aa, 0x1d17: 0x23b2,\n\t0x1d18: 0x23ba, 0x1d19: 0x23c2, 0x1d1a: 0x23ca, 0x1d1b: 0x23d2, 0x1d1c: 0x23da, 0x1d1d: 0x23e2,\n\t0x1d1e: 0x23ea, 0x1d1f: 0x23f2, 0x1d20: 0x23fa, 0x1d21: 0x2402, 0x1d22: 0x240a, 0x1d23: 0x2412,\n\t0x1d24: 0x241a, 0x1d25: 0x2422, 0x1d26: 0x242a, 0x1d27: 0x2432, 0x1d28: 0x243a, 0x1d29: 0x2442,\n\t0x1d2a: 0x2449, 0x1d2b: 0x03d9, 0x1d2c: 0x00b9, 0x1d2d: 0x1239, 0x1d2e: 0x2451, 0x1d2f: 0x0018,\n\t0x1d30: 0x0019, 0x1d31: 0x02e9, 0x1d32: 0x03d9, 0x1d33: 0x02f1, 0x1d34: 0x02f9, 0x1d35: 0x03f1,\n\t0x1d36: 0x0309, 0x1d37: 0x00a9, 0x1d38: 0x0311, 0x1d39: 0x00b1, 0x1d3a: 0x0319, 0x1d3b: 0x0101,\n\t0x1d3c: 0x0321, 0x1d3d: 0x0329, 0x1d3e: 0x0051, 0x1d3f: 0x0339,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x0751, 0x1d41: 0x00b9, 0x1d42: 0x0089, 0x1d43: 0x0341, 0x1d44: 0x0349, 0x1d45: 0x0391,\n\t0x1d46: 0x00c1, 0x1d47: 0x0109, 0x1d48: 0x00c9, 0x1d49: 0x04b1, 0x1d4a: 0x2459, 0x1d4b: 0x11f9,\n\t0x1d4c: 0x2461, 0x1d4d: 0x04d9, 0x1d4e: 0x2469, 0x1d4f: 0x2471, 0x1d50: 0x0018, 0x1d51: 0x0018,\n\t0x1d52: 0x0018, 0x1d53: 0x0018, 0x1d54: 0x0018, 0x1d55: 0x0018, 0x1d56: 0x0018, 0x1d57: 0x0018,\n\t0x1d58: 0x0018, 0x1d59: 0x0018, 0x1d5a: 0x0018, 0x1d5b: 0x0018, 0x1d5c: 0x0018, 0x1d5d: 0x0018,\n\t0x1d5e: 0x0018, 0x1d5f: 0x0018, 0x1d60: 0x0018, 0x1d61: 0x0018, 0x1d62: 0x0018, 0x1d63: 0x0018,\n\t0x1d64: 0x0018, 0x1d65: 0x0018, 0x1d66: 0x0018, 0x1d67: 0x0018, 0x1d68: 0x0018, 0x1d69: 0x0018,\n\t0x1d6a: 0x2479, 0x1d6b: 0x2481, 0x1d6c: 0x2489, 0x1d6d: 0x0018, 0x1d6e: 0x0018, 0x1d6f: 0x0018,\n\t0x1d70: 0x0018, 0x1d71: 0x0018, 0x1d72: 0x0018, 0x1d73: 0x0018, 0x1d74: 0x0018, 0x1d75: 0x0018,\n\t0x1d76: 0x0018, 0x1d77: 0x0018, 0x1d78: 0x0018, 0x1d79: 0x0018, 0x1d7a: 0x0018, 0x1d7b: 0x0018,\n\t0x1d7c: 0x0018, 0x1d7d: 0x0018, 0x1d7e: 0x0018, 0x1d7f: 0x0018,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x2499, 0x1d81: 0x24a1, 0x1d82: 0x24a9, 0x1d83: 0x0040, 0x1d84: 0x0040, 0x1d85: 0x0040,\n\t0x1d86: 0x0040, 0x1d87: 0x0040, 0x1d88: 0x0040, 0x1d89: 0x0040, 0x1d8a: 0x0040, 0x1d8b: 0x0040,\n\t0x1d8c: 0x0040, 0x1d8d: 0x0040, 0x1d8e: 0x0040, 0x1d8f: 0x0040, 0x1d90: 0x24b1, 0x1d91: 0x24b9,\n\t0x1d92: 0x24c1, 0x1d93: 0x24c9, 0x1d94: 0x24d1, 0x1d95: 0x24d9, 0x1d96: 0x24e1, 0x1d97: 0x24e9,\n\t0x1d98: 0x24f1, 0x1d99: 0x24f9, 0x1d9a: 0x2501, 0x1d9b: 0x2509, 0x1d9c: 0x2511, 0x1d9d: 0x2519,\n\t0x1d9e: 0x2521, 0x1d9f: 0x2529, 0x1da0: 0x2531, 0x1da1: 0x2539, 0x1da2: 0x2541, 0x1da3: 0x2549,\n\t0x1da4: 0x2551, 0x1da5: 0x2559, 0x1da6: 0x2561, 0x1da7: 0x2569, 0x1da8: 0x2571, 0x1da9: 0x2579,\n\t0x1daa: 0x2581, 0x1dab: 0x2589, 0x1dac: 0x2591, 0x1dad: 0x2599, 0x1dae: 0x25a1, 0x1daf: 0x25a9,\n\t0x1db0: 0x25b1, 0x1db1: 0x25b9, 0x1db2: 0x25c1, 0x1db3: 0x25c9, 0x1db4: 0x25d1, 0x1db5: 0x25d9,\n\t0x1db6: 0x25e1, 0x1db7: 0x25e9, 0x1db8: 0x25f1, 0x1db9: 0x25f9, 0x1dba: 0x2601, 0x1dbb: 0x2609,\n\t0x1dbc: 0x0040, 0x1dbd: 0x0040, 0x1dbe: 0x0040, 0x1dbf: 0x0040,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0x2669, 0x1dc1: 0x2671, 0x1dc2: 0x2679, 0x1dc3: 0x8b55, 0x1dc4: 0x2681, 0x1dc5: 0x2689,\n\t0x1dc6: 0x2691, 0x1dc7: 0x2699, 0x1dc8: 0x26a1, 0x1dc9: 0x26a9, 0x1dca: 0x26b1, 0x1dcb: 0x26b9,\n\t0x1dcc: 0x26c1, 0x1dcd: 0x8b75, 0x1dce: 0x26c9, 0x1dcf: 0x26d1, 0x1dd0: 0x26d9, 0x1dd1: 0x26e1,\n\t0x1dd2: 0x8b95, 0x1dd3: 0x26e9, 0x1dd4: 0x26f1, 0x1dd5: 0x2521, 0x1dd6: 0x8bb5, 0x1dd7: 0x26f9,\n\t0x1dd8: 0x2701, 0x1dd9: 0x2709, 0x1dda: 0x2711, 0x1ddb: 0x2719, 0x1ddc: 0x8bd5, 0x1ddd: 0x2721,\n\t0x1dde: 0x2729, 0x1ddf: 0x2731, 0x1de0: 0x2739, 0x1de1: 0x2741, 0x1de2: 0x25f9, 0x1de3: 0x2749,\n\t0x1de4: 0x2751, 0x1de5: 0x2759, 0x1de6: 0x2761, 0x1de7: 0x2769, 0x1de8: 0x2771, 0x1de9: 0x2779,\n\t0x1dea: 0x2781, 0x1deb: 0x2789, 0x1dec: 0x2791, 0x1ded: 0x2799, 0x1dee: 0x27a1, 0x1def: 0x27a9,\n\t0x1df0: 0x27b1, 0x1df1: 0x27b9, 0x1df2: 0x27b9, 0x1df3: 0x27b9, 0x1df4: 0x8bf5, 0x1df5: 0x27c1,\n\t0x1df6: 0x27c9, 0x1df7: 0x27d1, 0x1df8: 0x8c15, 0x1df9: 0x27d9, 0x1dfa: 0x27e1, 0x1dfb: 0x27e9,\n\t0x1dfc: 0x27f1, 0x1dfd: 0x27f9, 0x1dfe: 0x2801, 0x1dff: 0x2809,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0x2811, 0x1e01: 0x2819, 0x1e02: 0x2821, 0x1e03: 0x2829, 0x1e04: 0x2831, 0x1e05: 0x2839,\n\t0x1e06: 0x2839, 0x1e07: 0x2841, 0x1e08: 0x2849, 0x1e09: 0x2851, 0x1e0a: 0x2859, 0x1e0b: 0x2861,\n\t0x1e0c: 0x2869, 0x1e0d: 0x2871, 0x1e0e: 0x2879, 0x1e0f: 0x2881, 0x1e10: 0x2889, 0x1e11: 0x2891,\n\t0x1e12: 0x2899, 0x1e13: 0x28a1, 0x1e14: 0x28a9, 0x1e15: 0x28b1, 0x1e16: 0x28b9, 0x1e17: 0x28c1,\n\t0x1e18: 0x28c9, 0x1e19: 0x8c35, 0x1e1a: 0x28d1, 0x1e1b: 0x28d9, 0x1e1c: 0x28e1, 0x1e1d: 0x24d9,\n\t0x1e1e: 0x28e9, 0x1e1f: 0x28f1, 0x1e20: 0x8c55, 0x1e21: 0x8c75, 0x1e22: 0x28f9, 0x1e23: 0x2901,\n\t0x1e24: 0x2909, 0x1e25: 0x2911, 0x1e26: 0x2919, 0x1e27: 0x2921, 0x1e28: 0x2040, 0x1e29: 0x2929,\n\t0x1e2a: 0x2931, 0x1e2b: 0x2931, 0x1e2c: 0x8c95, 0x1e2d: 0x2939, 0x1e2e: 0x2941, 0x1e2f: 0x2949,\n\t0x1e30: 0x2951, 0x1e31: 0x8cb5, 0x1e32: 0x2959, 0x1e33: 0x2961, 0x1e34: 0x2040, 0x1e35: 0x2969,\n\t0x1e36: 0x2971, 0x1e37: 0x2979, 0x1e38: 0x2981, 0x1e39: 0x2989, 0x1e3a: 0x2991, 0x1e3b: 0x8cd5,\n\t0x1e3c: 0x2999, 0x1e3d: 0x8cf5, 0x1e3e: 0x29a1, 0x1e3f: 0x29a9,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0x29b1, 0x1e41: 0x29b9, 0x1e42: 0x29c1, 0x1e43: 0x29c9, 0x1e44: 0x29d1, 0x1e45: 0x29d9,\n\t0x1e46: 0x29e1, 0x1e47: 0x29e9, 0x1e48: 0x29f1, 0x1e49: 0x8d15, 0x1e4a: 0x29f9, 0x1e4b: 0x2a01,\n\t0x1e4c: 0x2a09, 0x1e4d: 0x2a11, 0x1e4e: 0x2a19, 0x1e4f: 0x8d35, 0x1e50: 0x2a21, 0x1e51: 0x8d55,\n\t0x1e52: 0x8d75, 0x1e53: 0x2a29, 0x1e54: 0x2a31, 0x1e55: 0x2a31, 0x1e56: 0x2a39, 0x1e57: 0x8d95,\n\t0x1e58: 0x8db5, 0x1e59: 0x2a41, 0x1e5a: 0x2a49, 0x1e5b: 0x2a51, 0x1e5c: 0x2a59, 0x1e5d: 0x2a61,\n\t0x1e5e: 0x2a69, 0x1e5f: 0x2a71, 0x1e60: 0x2a79, 0x1e61: 0x2a81, 0x1e62: 0x2a89, 0x1e63: 0x2a91,\n\t0x1e64: 0x8dd5, 0x1e65: 0x2a99, 0x1e66: 0x2aa1, 0x1e67: 0x2aa9, 0x1e68: 0x2ab1, 0x1e69: 0x2aa9,\n\t0x1e6a: 0x2ab9, 0x1e6b: 0x2ac1, 0x1e6c: 0x2ac9, 0x1e6d: 0x2ad1, 0x1e6e: 0x2ad9, 0x1e6f: 0x2ae1,\n\t0x1e70: 0x2ae9, 0x1e71: 0x2af1, 0x1e72: 0x2af9, 0x1e73: 0x2b01, 0x1e74: 0x2b09, 0x1e75: 0x2b11,\n\t0x1e76: 0x2b19, 0x1e77: 0x2b21, 0x1e78: 0x8df5, 0x1e79: 0x2b29, 0x1e7a: 0x2b31, 0x1e7b: 0x2b39,\n\t0x1e7c: 0x2b41, 0x1e7d: 0x2b49, 0x1e7e: 0x8e15, 0x1e7f: 0x2b51,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0x2b59, 0x1e81: 0x2b61, 0x1e82: 0x2b69, 0x1e83: 0x2b71, 0x1e84: 0x2b79, 0x1e85: 0x2b81,\n\t0x1e86: 0x2b89, 0x1e87: 0x2b91, 0x1e88: 0x2b99, 0x1e89: 0x2ba1, 0x1e8a: 0x8e35, 0x1e8b: 0x2ba9,\n\t0x1e8c: 0x2bb1, 0x1e8d: 0x2bb9, 0x1e8e: 0x2bc1, 0x1e8f: 0x2bc9, 0x1e90: 0x2bd1, 0x1e91: 0x2bd9,\n\t0x1e92: 0x2be1, 0x1e93: 0x2be9, 0x1e94: 0x2bf1, 0x1e95: 0x2bf9, 0x1e96: 0x2c01, 0x1e97: 0x2c09,\n\t0x1e98: 0x2c11, 0x1e99: 0x2c19, 0x1e9a: 0x2c21, 0x1e9b: 0x2c29, 0x1e9c: 0x2c31, 0x1e9d: 0x8e55,\n\t0x1e9e: 0x2c39, 0x1e9f: 0x2c41, 0x1ea0: 0x2c49, 0x1ea1: 0x2c51, 0x1ea2: 0x2c59, 0x1ea3: 0x8e75,\n\t0x1ea4: 0x2c61, 0x1ea5: 0x2c69, 0x1ea6: 0x2c71, 0x1ea7: 0x2c79, 0x1ea8: 0x2c81, 0x1ea9: 0x2c89,\n\t0x1eaa: 0x2c91, 0x1eab: 0x2c99, 0x1eac: 0x7f0d, 0x1ead: 0x2ca1, 0x1eae: 0x2ca9, 0x1eaf: 0x2cb1,\n\t0x1eb0: 0x8e95, 0x1eb1: 0x2cb9, 0x1eb2: 0x2cc1, 0x1eb3: 0x2cc9, 0x1eb4: 0x2cd1, 0x1eb5: 0x2cd9,\n\t0x1eb6: 0x2ce1, 0x1eb7: 0x8eb5, 0x1eb8: 0x8ed5, 0x1eb9: 0x8ef5, 0x1eba: 0x2ce9, 0x1ebb: 0x8f15,\n\t0x1ebc: 0x2cf1, 0x1ebd: 0x2cf9, 0x1ebe: 0x2d01, 0x1ebf: 0x2d09,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0x2d11, 0x1ec1: 0x2d19, 0x1ec2: 0x2d21, 0x1ec3: 0x2d29, 0x1ec4: 0x2d31, 0x1ec5: 0x2d39,\n\t0x1ec6: 0x8f35, 0x1ec7: 0x2d41, 0x1ec8: 0x2d49, 0x1ec9: 0x2d51, 0x1eca: 0x2d59, 0x1ecb: 0x2d61,\n\t0x1ecc: 0x2d69, 0x1ecd: 0x8f55, 0x1ece: 0x2d71, 0x1ecf: 0x2d79, 0x1ed0: 0x8f75, 0x1ed1: 0x8f95,\n\t0x1ed2: 0x2d81, 0x1ed3: 0x2d89, 0x1ed4: 0x2d91, 0x1ed5: 0x2d99, 0x1ed6: 0x2da1, 0x1ed7: 0x2da9,\n\t0x1ed8: 0x2db1, 0x1ed9: 0x2db9, 0x1eda: 0x2dc1, 0x1edb: 0x8fb5, 0x1edc: 0x2dc9, 0x1edd: 0x8fd5,\n\t0x1ede: 0x2dd1, 0x1edf: 0x2040, 0x1ee0: 0x2dd9, 0x1ee1: 0x2de1, 0x1ee2: 0x2de9, 0x1ee3: 0x8ff5,\n\t0x1ee4: 0x2df1, 0x1ee5: 0x2df9, 0x1ee6: 0x9015, 0x1ee7: 0x9035, 0x1ee8: 0x2e01, 0x1ee9: 0x2e09,\n\t0x1eea: 0x2e11, 0x1eeb: 0x2e19, 0x1eec: 0x2e21, 0x1eed: 0x2e21, 0x1eee: 0x2e29, 0x1eef: 0x2e31,\n\t0x1ef0: 0x2e39, 0x1ef1: 0x2e41, 0x1ef2: 0x2e49, 0x1ef3: 0x2e51, 0x1ef4: 0x2e59, 0x1ef5: 0x9055,\n\t0x1ef6: 0x2e61, 0x1ef7: 0x9075, 0x1ef8: 0x2e69, 0x1ef9: 0x9095, 0x1efa: 0x2e71, 0x1efb: 0x90b5,\n\t0x1efc: 0x90d5, 0x1efd: 0x90f5, 0x1efe: 0x2e79, 0x1eff: 0x2e81,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0x2e89, 0x1f01: 0x9115, 0x1f02: 0x9135, 0x1f03: 0x9155, 0x1f04: 0x9175, 0x1f05: 0x2e91,\n\t0x1f06: 0x2e99, 0x1f07: 0x2e99, 0x1f08: 0x2ea1, 0x1f09: 0x2ea9, 0x1f0a: 0x2eb1, 0x1f0b: 0x2eb9,\n\t0x1f0c: 0x2ec1, 0x1f0d: 0x9195, 0x1f0e: 0x2ec9, 0x1f0f: 0x2ed1, 0x1f10: 0x2ed9, 0x1f11: 0x2ee1,\n\t0x1f12: 0x91b5, 0x1f13: 0x2ee9, 0x1f14: 0x91d5, 0x1f15: 0x91f5, 0x1f16: 0x2ef1, 0x1f17: 0x2ef9,\n\t0x1f18: 0x2f01, 0x1f19: 0x2f09, 0x1f1a: 0x2f11, 0x1f1b: 0x2f19, 0x1f1c: 0x9215, 0x1f1d: 0x9235,\n\t0x1f1e: 0x9255, 0x1f1f: 0x2040, 0x1f20: 0x2f21, 0x1f21: 0x9275, 0x1f22: 0x2f29, 0x1f23: 0x2f31,\n\t0x1f24: 0x2f39, 0x1f25: 0x9295, 0x1f26: 0x2f41, 0x1f27: 0x2f49, 0x1f28: 0x2f51, 0x1f29: 0x2f59,\n\t0x1f2a: 0x2f61, 0x1f2b: 0x92b5, 0x1f2c: 0x2f69, 0x1f2d: 0x2f71, 0x1f2e: 0x2f79, 0x1f2f: 0x2f81,\n\t0x1f30: 0x2f89, 0x1f31: 0x2f91, 0x1f32: 0x92d5, 0x1f33: 0x92f5, 0x1f34: 0x2f99, 0x1f35: 0x9315,\n\t0x1f36: 0x2fa1, 0x1f37: 0x9335, 0x1f38: 0x2fa9, 0x1f39: 0x2fb1, 0x1f3a: 0x2fb9, 0x1f3b: 0x9355,\n\t0x1f3c: 0x9375, 0x1f3d: 0x2fc1, 0x1f3e: 0x9395, 0x1f3f: 0x2fc9,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0x93b5, 0x1f41: 0x2fd1, 0x1f42: 0x2fd9, 0x1f43: 0x2fe1, 0x1f44: 0x2fe9, 0x1f45: 0x2ff1,\n\t0x1f46: 0x2ff9, 0x1f47: 0x93d5, 0x1f48: 0x93f5, 0x1f49: 0x9415, 0x1f4a: 0x9435, 0x1f4b: 0x2a29,\n\t0x1f4c: 0x3001, 0x1f4d: 0x3009, 0x1f4e: 0x3011, 0x1f4f: 0x3019, 0x1f50: 0x3021, 0x1f51: 0x3029,\n\t0x1f52: 0x3031, 0x1f53: 0x3039, 0x1f54: 0x3041, 0x1f55: 0x3049, 0x1f56: 0x3051, 0x1f57: 0x9455,\n\t0x1f58: 0x3059, 0x1f59: 0x3061, 0x1f5a: 0x3069, 0x1f5b: 0x3071, 0x1f5c: 0x3079, 0x1f5d: 0x3081,\n\t0x1f5e: 0x3089, 0x1f5f: 0x3091, 0x1f60: 0x3099, 0x1f61: 0x30a1, 0x1f62: 0x30a9, 0x1f63: 0x30b1,\n\t0x1f64: 0x9475, 0x1f65: 0x9495, 0x1f66: 0x94b5, 0x1f67: 0x30b9, 0x1f68: 0x30c1, 0x1f69: 0x30c9,\n\t0x1f6a: 0x30d1, 0x1f6b: 0x94d5, 0x1f6c: 0x30d9, 0x1f6d: 0x94f5, 0x1f6e: 0x30e1, 0x1f6f: 0x30e9,\n\t0x1f70: 0x9515, 0x1f71: 0x9535, 0x1f72: 0x30f1, 0x1f73: 0x30f9, 0x1f74: 0x3101, 0x1f75: 0x3109,\n\t0x1f76: 0x3111, 0x1f77: 0x3119, 0x1f78: 0x3121, 0x1f79: 0x3129, 0x1f7a: 0x3131, 0x1f7b: 0x3139,\n\t0x1f7c: 0x3141, 0x1f7d: 0x3149, 0x1f7e: 0x3151, 0x1f7f: 0x2040,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0x3159, 0x1f81: 0x3161, 0x1f82: 0x3169, 0x1f83: 0x3171, 0x1f84: 0x3179, 0x1f85: 0x9555,\n\t0x1f86: 0x3181, 0x1f87: 0x3189, 0x1f88: 0x3191, 0x1f89: 0x3199, 0x1f8a: 0x31a1, 0x1f8b: 0x9575,\n\t0x1f8c: 0x9595, 0x1f8d: 0x31a9, 0x1f8e: 0x31b1, 0x1f8f: 0x31b9, 0x1f90: 0x31c1, 0x1f91: 0x31c9,\n\t0x1f92: 0x31d1, 0x1f93: 0x95b5, 0x1f94: 0x31d9, 0x1f95: 0x31e1, 0x1f96: 0x31e9, 0x1f97: 0x31f1,\n\t0x1f98: 0x95d5, 0x1f99: 0x95f5, 0x1f9a: 0x31f9, 0x1f9b: 0x3201, 0x1f9c: 0x3209, 0x1f9d: 0x9615,\n\t0x1f9e: 0x3211, 0x1f9f: 0x3219, 0x1fa0: 0x684d, 0x1fa1: 0x9635, 0x1fa2: 0x3221, 0x1fa3: 0x3229,\n\t0x1fa4: 0x3231, 0x1fa5: 0x9655, 0x1fa6: 0x3239, 0x1fa7: 0x3241, 0x1fa8: 0x3249, 0x1fa9: 0x3251,\n\t0x1faa: 0x3259, 0x1fab: 0x3261, 0x1fac: 0x3269, 0x1fad: 0x9675, 0x1fae: 0x3271, 0x1faf: 0x3279,\n\t0x1fb0: 0x3281, 0x1fb1: 0x9695, 0x1fb2: 0x3289, 0x1fb3: 0x3291, 0x1fb4: 0x3299, 0x1fb5: 0x32a1,\n\t0x1fb6: 0x7b6d, 0x1fb7: 0x96b5, 0x1fb8: 0x32a9, 0x1fb9: 0x32b1, 0x1fba: 0x32b9, 0x1fbb: 0x96d5,\n\t0x1fbc: 0x32c1, 0x1fbd: 0x96f5, 0x1fbe: 0x32c9, 0x1fbf: 0x32c9,\n\t// Block 0x7f, offset 0x1fc0\n\t0x1fc0: 0x32d1, 0x1fc1: 0x9715, 0x1fc2: 0x32d9, 0x1fc3: 0x32e1, 0x1fc4: 0x32e9, 0x1fc5: 0x32f1,\n\t0x1fc6: 0x32f9, 0x1fc7: 0x3301, 0x1fc8: 0x3309, 0x1fc9: 0x9735, 0x1fca: 0x3311, 0x1fcb: 0x3319,\n\t0x1fcc: 0x3321, 0x1fcd: 0x3329, 0x1fce: 0x3331, 0x1fcf: 0x3339, 0x1fd0: 0x9755, 0x1fd1: 0x3341,\n\t0x1fd2: 0x9775, 0x1fd3: 0x9795, 0x1fd4: 0x97b5, 0x1fd5: 0x3349, 0x1fd6: 0x3351, 0x1fd7: 0x3359,\n\t0x1fd8: 0x3361, 0x1fd9: 0x3369, 0x1fda: 0x3371, 0x1fdb: 0x3379, 0x1fdc: 0x3381, 0x1fdd: 0x97d5,\n\t0x1fde: 0x0040, 0x1fdf: 0x0040, 0x1fe0: 0x0040, 0x1fe1: 0x0040, 0x1fe2: 0x0040, 0x1fe3: 0x0040,\n\t0x1fe4: 0x0040, 0x1fe5: 0x0040, 0x1fe6: 0x0040, 0x1fe7: 0x0040, 0x1fe8: 0x0040, 0x1fe9: 0x0040,\n\t0x1fea: 0x0040, 0x1feb: 0x0040, 0x1fec: 0x0040, 0x1fed: 0x0040, 0x1fee: 0x0040, 0x1fef: 0x0040,\n\t0x1ff0: 0x0040, 0x1ff1: 0x0040, 0x1ff2: 0x0040, 0x1ff3: 0x0040, 0x1ff4: 0x0040, 0x1ff5: 0x0040,\n\t0x1ff6: 0x0040, 0x1ff7: 0x0040, 0x1ff8: 0x0040, 0x1ff9: 0x0040, 0x1ffa: 0x0040, 0x1ffb: 0x0040,\n\t0x1ffc: 0x0040, 0x1ffd: 0x0040, 0x1ffe: 0x0040, 0x1fff: 0x0040,\n}\n\n// idnaIndex: 37 blocks, 2368 entries, 4736 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2368]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x7e, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x7f, 0xca: 0x80, 0xcb: 0x07, 0xcc: 0x81, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x82, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x83, 0xd6: 0x84, 0xd7: 0x85,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x86, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x87, 0xde: 0x88, 0xdf: 0x89,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,\n\t0xf0: 0x1e, 0xf1: 0x1f, 0xf2: 0x1f, 0xf3: 0x21, 0xf4: 0x22,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x8a, 0x121: 0x13, 0x122: 0x8b, 0x123: 0x8c, 0x124: 0x8d, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16,\n\t0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8e,\n\t0x130: 0x8f, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x90, 0x135: 0x21, 0x136: 0x91, 0x137: 0x92,\n\t0x138: 0x93, 0x139: 0x94, 0x13a: 0x22, 0x13b: 0x95, 0x13c: 0x96, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x97,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x98, 0x141: 0x99, 0x142: 0x9a, 0x143: 0x9b, 0x144: 0x9c, 0x145: 0x9d, 0x146: 0x9e, 0x147: 0x9f,\n\t0x148: 0xa0, 0x149: 0xa1, 0x14a: 0xa2, 0x14b: 0xa3, 0x14c: 0xa4, 0x14d: 0xa5, 0x14e: 0xa6, 0x14f: 0xa7,\n\t0x150: 0xa8, 0x151: 0xa0, 0x152: 0xa0, 0x153: 0xa0, 0x154: 0xa0, 0x155: 0xa0, 0x156: 0xa0, 0x157: 0xa0,\n\t0x158: 0xa0, 0x159: 0xa9, 0x15a: 0xaa, 0x15b: 0xab, 0x15c: 0xac, 0x15d: 0xad, 0x15e: 0xae, 0x15f: 0xaf,\n\t0x160: 0xb0, 0x161: 0xb1, 0x162: 0xb2, 0x163: 0xb3, 0x164: 0xb4, 0x165: 0xb5, 0x166: 0xb6, 0x167: 0xb7,\n\t0x168: 0xb8, 0x169: 0xb9, 0x16a: 0xba, 0x16b: 0xbb, 0x16c: 0xbc, 0x16d: 0xbd, 0x16e: 0xbe, 0x16f: 0xbf,\n\t0x170: 0xc0, 0x171: 0xc1, 0x172: 0xc2, 0x173: 0xc3, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc4,\n\t0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc5, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc6, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc7, 0x187: 0x9c,\n\t0x188: 0xc8, 0x189: 0xc9, 0x18a: 0x9c, 0x18b: 0x9c, 0x18c: 0xca, 0x18d: 0x9c, 0x18e: 0x9c, 0x18f: 0x9c,\n\t0x190: 0xcb, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9c, 0x195: 0x9c, 0x196: 0x9c, 0x197: 0x9c,\n\t0x198: 0x9c, 0x199: 0x9c, 0x19a: 0x9c, 0x19b: 0x9c, 0x19c: 0x9c, 0x19d: 0x9c, 0x19e: 0x9c, 0x19f: 0x9c,\n\t0x1a0: 0x9c, 0x1a1: 0x9c, 0x1a2: 0x9c, 0x1a3: 0x9c, 0x1a4: 0x9c, 0x1a5: 0x9c, 0x1a6: 0x9c, 0x1a7: 0x9c,\n\t0x1a8: 0xcc, 0x1a9: 0xcd, 0x1aa: 0x9c, 0x1ab: 0xce, 0x1ac: 0x9c, 0x1ad: 0xcf, 0x1ae: 0xd0, 0x1af: 0x9c,\n\t0x1b0: 0xd1, 0x1b1: 0x35, 0x1b2: 0x28, 0x1b3: 0x36, 0x1b4: 0xd2, 0x1b5: 0xd3, 0x1b6: 0xd4, 0x1b7: 0xd5,\n\t0x1b8: 0xd6, 0x1b9: 0xd7, 0x1ba: 0xd8, 0x1bb: 0xd9, 0x1bc: 0xda, 0x1bd: 0xdb, 0x1be: 0xdc, 0x1bf: 0x37,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x38, 0x1c1: 0xdd, 0x1c2: 0xde, 0x1c3: 0xdf, 0x1c4: 0xe0, 0x1c5: 0x39, 0x1c6: 0x3a, 0x1c7: 0xe1,\n\t0x1c8: 0xe2, 0x1c9: 0x3b, 0x1ca: 0x3c, 0x1cb: 0x3d, 0x1cc: 0xe3, 0x1cd: 0xe4, 0x1ce: 0x3e, 0x1cf: 0x3f,\n\t0x1d0: 0xa0, 0x1d1: 0xa0, 0x1d2: 0xa0, 0x1d3: 0xa0, 0x1d4: 0xa0, 0x1d5: 0xa0, 0x1d6: 0xa0, 0x1d7: 0xa0,\n\t0x1d8: 0xa0, 0x1d9: 0xa0, 0x1da: 0xa0, 0x1db: 0xa0, 0x1dc: 0xa0, 0x1dd: 0xa0, 0x1de: 0xa0, 0x1df: 0xa0,\n\t0x1e0: 0xa0, 0x1e1: 0xa0, 0x1e2: 0xa0, 0x1e3: 0xa0, 0x1e4: 0xa0, 0x1e5: 0xa0, 0x1e6: 0xa0, 0x1e7: 0xa0,\n\t0x1e8: 0xa0, 0x1e9: 0xa0, 0x1ea: 0xa0, 0x1eb: 0xa0, 0x1ec: 0xa0, 0x1ed: 0xa0, 0x1ee: 0xa0, 0x1ef: 0xa0,\n\t0x1f0: 0xa0, 0x1f1: 0xa0, 0x1f2: 0xa0, 0x1f3: 0xa0, 0x1f4: 0xa0, 0x1f5: 0xa0, 0x1f6: 0xa0, 0x1f7: 0xa0,\n\t0x1f8: 0xa0, 0x1f9: 0xa0, 0x1fa: 0xa0, 0x1fb: 0xa0, 0x1fc: 0xa0, 0x1fd: 0xa0, 0x1fe: 0xa0, 0x1ff: 0xa0,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xa0, 0x201: 0xa0, 0x202: 0xa0, 0x203: 0xa0, 0x204: 0xa0, 0x205: 0xa0, 0x206: 0xa0, 0x207: 0xa0,\n\t0x208: 0xa0, 0x209: 0xa0, 0x20a: 0xa0, 0x20b: 0xa0, 0x20c: 0xa0, 0x20d: 0xa0, 0x20e: 0xa0, 0x20f: 0xa0,\n\t0x210: 0xa0, 0x211: 0xa0, 0x212: 0xa0, 0x213: 0xa0, 0x214: 0xa0, 0x215: 0xa0, 0x216: 0xa0, 0x217: 0xa0,\n\t0x218: 0xa0, 0x219: 0xa0, 0x21a: 0xa0, 0x21b: 0xa0, 0x21c: 0xa0, 0x21d: 0xa0, 0x21e: 0xa0, 0x21f: 0xa0,\n\t0x220: 0xa0, 0x221: 0xa0, 0x222: 0xa0, 0x223: 0xa0, 0x224: 0xa0, 0x225: 0xa0, 0x226: 0xa0, 0x227: 0xa0,\n\t0x228: 0xa0, 0x229: 0xa0, 0x22a: 0xa0, 0x22b: 0xa0, 0x22c: 0xa0, 0x22d: 0xa0, 0x22e: 0xa0, 0x22f: 0xa0,\n\t0x230: 0xa0, 0x231: 0xa0, 0x232: 0xa0, 0x233: 0xa0, 0x234: 0xa0, 0x235: 0xa0, 0x236: 0xa0, 0x237: 0x9c,\n\t0x238: 0xa0, 0x239: 0xa0, 0x23a: 0xa0, 0x23b: 0xa0, 0x23c: 0xa0, 0x23d: 0xa0, 0x23e: 0xa0, 0x23f: 0xa0,\n\t// Block 0x9, offset 0x240\n\t0x240: 0xa0, 0x241: 0xa0, 0x242: 0xa0, 0x243: 0xa0, 0x244: 0xa0, 0x245: 0xa0, 0x246: 0xa0, 0x247: 0xa0,\n\t0x248: 0xa0, 0x249: 0xa0, 0x24a: 0xa0, 0x24b: 0xa0, 0x24c: 0xa0, 0x24d: 0xa0, 0x24e: 0xa0, 0x24f: 0xa0,\n\t0x250: 0xa0, 0x251: 0xa0, 0x252: 0xa0, 0x253: 0xa0, 0x254: 0xa0, 0x255: 0xa0, 0x256: 0xa0, 0x257: 0xa0,\n\t0x258: 0xa0, 0x259: 0xa0, 0x25a: 0xa0, 0x25b: 0xa0, 0x25c: 0xa0, 0x25d: 0xa0, 0x25e: 0xa0, 0x25f: 0xa0,\n\t0x260: 0xa0, 0x261: 0xa0, 0x262: 0xa0, 0x263: 0xa0, 0x264: 0xa0, 0x265: 0xa0, 0x266: 0xa0, 0x267: 0xa0,\n\t0x268: 0xa0, 0x269: 0xa0, 0x26a: 0xa0, 0x26b: 0xa0, 0x26c: 0xa0, 0x26d: 0xa0, 0x26e: 0xa0, 0x26f: 0xa0,\n\t0x270: 0xa0, 0x271: 0xa0, 0x272: 0xa0, 0x273: 0xa0, 0x274: 0xa0, 0x275: 0xa0, 0x276: 0xa0, 0x277: 0xa0,\n\t0x278: 0xa0, 0x279: 0xa0, 0x27a: 0xa0, 0x27b: 0xa0, 0x27c: 0xa0, 0x27d: 0xa0, 0x27e: 0xa0, 0x27f: 0xa0,\n\t// Block 0xa, offset 0x280\n\t0x280: 0xa0, 0x281: 0xa0, 0x282: 0xa0, 0x283: 0xa0, 0x284: 0xa0, 0x285: 0xa0, 0x286: 0xa0, 0x287: 0xa0,\n\t0x288: 0xa0, 0x289: 0xa0, 0x28a: 0xa0, 0x28b: 0xa0, 0x28c: 0xa0, 0x28d: 0xa0, 0x28e: 0xa0, 0x28f: 0xa0,\n\t0x290: 0xa0, 0x291: 0xa0, 0x292: 0xa0, 0x293: 0xa0, 0x294: 0xa0, 0x295: 0xa0, 0x296: 0xa0, 0x297: 0xa0,\n\t0x298: 0xa0, 0x299: 0xa0, 0x29a: 0xa0, 0x29b: 0xa0, 0x29c: 0xa0, 0x29d: 0xa0, 0x29e: 0xa0, 0x29f: 0xa0,\n\t0x2a0: 0xa0, 0x2a1: 0xa0, 0x2a2: 0xa0, 0x2a3: 0xa0, 0x2a4: 0xa0, 0x2a5: 0xa0, 0x2a6: 0xa0, 0x2a7: 0xa0,\n\t0x2a8: 0xa0, 0x2a9: 0xa0, 0x2aa: 0xa0, 0x2ab: 0xa0, 0x2ac: 0xa0, 0x2ad: 0xa0, 0x2ae: 0xa0, 0x2af: 0xa0,\n\t0x2b0: 0xa0, 0x2b1: 0xa0, 0x2b2: 0xa0, 0x2b3: 0xa0, 0x2b4: 0xa0, 0x2b5: 0xa0, 0x2b6: 0xa0, 0x2b7: 0xa0,\n\t0x2b8: 0xa0, 0x2b9: 0xa0, 0x2ba: 0xa0, 0x2bb: 0xa0, 0x2bc: 0xa0, 0x2bd: 0xa0, 0x2be: 0xa0, 0x2bf: 0xe5,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0xa0, 0x2c1: 0xa0, 0x2c2: 0xa0, 0x2c3: 0xa0, 0x2c4: 0xa0, 0x2c5: 0xa0, 0x2c6: 0xa0, 0x2c7: 0xa0,\n\t0x2c8: 0xa0, 0x2c9: 0xa0, 0x2ca: 0xa0, 0x2cb: 0xa0, 0x2cc: 0xa0, 0x2cd: 0xa0, 0x2ce: 0xa0, 0x2cf: 0xa0,\n\t0x2d0: 0xa0, 0x2d1: 0xa0, 0x2d2: 0xe6, 0x2d3: 0xe7, 0x2d4: 0xa0, 0x2d5: 0xa0, 0x2d6: 0xa0, 0x2d7: 0xa0,\n\t0x2d8: 0xe8, 0x2d9: 0x40, 0x2da: 0x41, 0x2db: 0xe9, 0x2dc: 0x42, 0x2dd: 0x43, 0x2de: 0x44, 0x2df: 0xea,\n\t0x2e0: 0xeb, 0x2e1: 0xec, 0x2e2: 0xed, 0x2e3: 0xee, 0x2e4: 0xef, 0x2e5: 0xf0, 0x2e6: 0xf1, 0x2e7: 0xf2,\n\t0x2e8: 0xf3, 0x2e9: 0xf4, 0x2ea: 0xf5, 0x2eb: 0xf6, 0x2ec: 0xf7, 0x2ed: 0xf8, 0x2ee: 0xf9, 0x2ef: 0xfa,\n\t0x2f0: 0xa0, 0x2f1: 0xa0, 0x2f2: 0xa0, 0x2f3: 0xa0, 0x2f4: 0xa0, 0x2f5: 0xa0, 0x2f6: 0xa0, 0x2f7: 0xa0,\n\t0x2f8: 0xa0, 0x2f9: 0xa0, 0x2fa: 0xa0, 0x2fb: 0xa0, 0x2fc: 0xa0, 0x2fd: 0xa0, 0x2fe: 0xa0, 0x2ff: 0xa0,\n\t// Block 0xc, offset 0x300\n\t0x300: 0xa0, 0x301: 0xa0, 0x302: 0xa0, 0x303: 0xa0, 0x304: 0xa0, 0x305: 0xa0, 0x306: 0xa0, 0x307: 0xa0,\n\t0x308: 0xa0, 0x309: 0xa0, 0x30a: 0xa0, 0x30b: 0xa0, 0x30c: 0xa0, 0x30d: 0xa0, 0x30e: 0xa0, 0x30f: 0xa0,\n\t0x310: 0xa0, 0x311: 0xa0, 0x312: 0xa0, 0x313: 0xa0, 0x314: 0xa0, 0x315: 0xa0, 0x316: 0xa0, 0x317: 0xa0,\n\t0x318: 0xa0, 0x319: 0xa0, 0x31a: 0xa0, 0x31b: 0xa0, 0x31c: 0xa0, 0x31d: 0xa0, 0x31e: 0xfb, 0x31f: 0xfc,\n\t// Block 0xd, offset 0x340\n\t0x340: 0xfd, 0x341: 0xfd, 0x342: 0xfd, 0x343: 0xfd, 0x344: 0xfd, 0x345: 0xfd, 0x346: 0xfd, 0x347: 0xfd,\n\t0x348: 0xfd, 0x349: 0xfd, 0x34a: 0xfd, 0x34b: 0xfd, 0x34c: 0xfd, 0x34d: 0xfd, 0x34e: 0xfd, 0x34f: 0xfd,\n\t0x350: 0xfd, 0x351: 0xfd, 0x352: 0xfd, 0x353: 0xfd, 0x354: 0xfd, 0x355: 0xfd, 0x356: 0xfd, 0x357: 0xfd,\n\t0x358: 0xfd, 0x359: 0xfd, 0x35a: 0xfd, 0x35b: 0xfd, 0x35c: 0xfd, 0x35d: 0xfd, 0x35e: 0xfd, 0x35f: 0xfd,\n\t0x360: 0xfd, 0x361: 0xfd, 0x362: 0xfd, 0x363: 0xfd, 0x364: 0xfd, 0x365: 0xfd, 0x366: 0xfd, 0x367: 0xfd,\n\t0x368: 0xfd, 0x369: 0xfd, 0x36a: 0xfd, 0x36b: 0xfd, 0x36c: 0xfd, 0x36d: 0xfd, 0x36e: 0xfd, 0x36f: 0xfd,\n\t0x370: 0xfd, 0x371: 0xfd, 0x372: 0xfd, 0x373: 0xfd, 0x374: 0xfd, 0x375: 0xfd, 0x376: 0xfd, 0x377: 0xfd,\n\t0x378: 0xfd, 0x379: 0xfd, 0x37a: 0xfd, 0x37b: 0xfd, 0x37c: 0xfd, 0x37d: 0xfd, 0x37e: 0xfd, 0x37f: 0xfd,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xfd, 0x381: 0xfd, 0x382: 0xfd, 0x383: 0xfd, 0x384: 0xfd, 0x385: 0xfd, 0x386: 0xfd, 0x387: 0xfd,\n\t0x388: 0xfd, 0x389: 0xfd, 0x38a: 0xfd, 0x38b: 0xfd, 0x38c: 0xfd, 0x38d: 0xfd, 0x38e: 0xfd, 0x38f: 0xfd,\n\t0x390: 0xfd, 0x391: 0xfd, 0x392: 0xfd, 0x393: 0xfd, 0x394: 0xfd, 0x395: 0xfd, 0x396: 0xfd, 0x397: 0xfd,\n\t0x398: 0xfd, 0x399: 0xfd, 0x39a: 0xfd, 0x39b: 0xfd, 0x39c: 0xfd, 0x39d: 0xfd, 0x39e: 0xfd, 0x39f: 0xfd,\n\t0x3a0: 0xfd, 0x3a1: 0xfd, 0x3a2: 0xfd, 0x3a3: 0xfd, 0x3a4: 0xfe, 0x3a5: 0xff, 0x3a6: 0x100, 0x3a7: 0x101,\n\t0x3a8: 0x45, 0x3a9: 0x102, 0x3aa: 0x103, 0x3ab: 0x46, 0x3ac: 0x47, 0x3ad: 0x48, 0x3ae: 0x49, 0x3af: 0x4a,\n\t0x3b0: 0x104, 0x3b1: 0x4b, 0x3b2: 0x4c, 0x3b3: 0x4d, 0x3b4: 0x4e, 0x3b5: 0x4f, 0x3b6: 0x105, 0x3b7: 0x50,\n\t0x3b8: 0x51, 0x3b9: 0x52, 0x3ba: 0x53, 0x3bb: 0x54, 0x3bc: 0x55, 0x3bd: 0x56, 0x3be: 0x57, 0x3bf: 0x58,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x106, 0x3c1: 0x107, 0x3c2: 0xa0, 0x3c3: 0x108, 0x3c4: 0x109, 0x3c5: 0x9c, 0x3c6: 0x10a, 0x3c7: 0x10b,\n\t0x3c8: 0xfd, 0x3c9: 0xfd, 0x3ca: 0x10c, 0x3cb: 0x10d, 0x3cc: 0x10e, 0x3cd: 0x10f, 0x3ce: 0x110, 0x3cf: 0x111,\n\t0x3d0: 0x112, 0x3d1: 0xa0, 0x3d2: 0x113, 0x3d3: 0x114, 0x3d4: 0x115, 0x3d5: 0x116, 0x3d6: 0xfd, 0x3d7: 0xfd,\n\t0x3d8: 0xa0, 0x3d9: 0xa0, 0x3da: 0xa0, 0x3db: 0xa0, 0x3dc: 0x117, 0x3dd: 0x118, 0x3de: 0xfd, 0x3df: 0xfd,\n\t0x3e0: 0x119, 0x3e1: 0x11a, 0x3e2: 0x11b, 0x3e3: 0x11c, 0x3e4: 0x11d, 0x3e5: 0xfd, 0x3e6: 0x11e, 0x3e7: 0x11f,\n\t0x3e8: 0x120, 0x3e9: 0x121, 0x3ea: 0x122, 0x3eb: 0x59, 0x3ec: 0x123, 0x3ed: 0x124, 0x3ee: 0x5a, 0x3ef: 0xfd,\n\t0x3f0: 0x125, 0x3f1: 0x126, 0x3f2: 0x127, 0x3f3: 0x128, 0x3f4: 0x129, 0x3f5: 0xfd, 0x3f6: 0xfd, 0x3f7: 0xfd,\n\t0x3f8: 0xfd, 0x3f9: 0x12a, 0x3fa: 0x12b, 0x3fb: 0xfd, 0x3fc: 0x12c, 0x3fd: 0x12d, 0x3fe: 0x12e, 0x3ff: 0x12f,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x130, 0x401: 0x131, 0x402: 0x132, 0x403: 0x133, 0x404: 0x134, 0x405: 0x135, 0x406: 0x136, 0x407: 0x137,\n\t0x408: 0x138, 0x409: 0xfd, 0x40a: 0x139, 0x40b: 0x13a, 0x40c: 0x5b, 0x40d: 0x5c, 0x40e: 0xfd, 0x40f: 0xfd,\n\t0x410: 0x13b, 0x411: 0x13c, 0x412: 0x13d, 0x413: 0x13e, 0x414: 0xfd, 0x415: 0xfd, 0x416: 0x13f, 0x417: 0x140,\n\t0x418: 0x141, 0x419: 0x142, 0x41a: 0x143, 0x41b: 0x144, 0x41c: 0x145, 0x41d: 0xfd, 0x41e: 0xfd, 0x41f: 0xfd,\n\t0x420: 0x146, 0x421: 0xfd, 0x422: 0x147, 0x423: 0x148, 0x424: 0x5d, 0x425: 0x149, 0x426: 0x14a, 0x427: 0x14b,\n\t0x428: 0x14c, 0x429: 0x14d, 0x42a: 0x14e, 0x42b: 0x14f, 0x42c: 0xfd, 0x42d: 0xfd, 0x42e: 0xfd, 0x42f: 0xfd,\n\t0x430: 0x150, 0x431: 0x151, 0x432: 0x152, 0x433: 0xfd, 0x434: 0x153, 0x435: 0x154, 0x436: 0x155, 0x437: 0xfd,\n\t0x438: 0xfd, 0x439: 0xfd, 0x43a: 0xfd, 0x43b: 0x156, 0x43c: 0xfd, 0x43d: 0xfd, 0x43e: 0x157, 0x43f: 0x158,\n\t// Block 0x11, offset 0x440\n\t0x440: 0xa0, 0x441: 0xa0, 0x442: 0xa0, 0x443: 0xa0, 0x444: 0xa0, 0x445: 0xa0, 0x446: 0xa0, 0x447: 0xa0,\n\t0x448: 0xa0, 0x449: 0xa0, 0x44a: 0xa0, 0x44b: 0xa0, 0x44c: 0xa0, 0x44d: 0xa0, 0x44e: 0x159, 0x44f: 0xfd,\n\t0x450: 0x9c, 0x451: 0x15a, 0x452: 0xa0, 0x453: 0xa0, 0x454: 0xa0, 0x455: 0x15b, 0x456: 0xfd, 0x457: 0xfd,\n\t0x458: 0xfd, 0x459: 0xfd, 0x45a: 0xfd, 0x45b: 0xfd, 0x45c: 0xfd, 0x45d: 0xfd, 0x45e: 0xfd, 0x45f: 0xfd,\n\t0x460: 0xfd, 0x461: 0xfd, 0x462: 0xfd, 0x463: 0xfd, 0x464: 0xfd, 0x465: 0xfd, 0x466: 0xfd, 0x467: 0xfd,\n\t0x468: 0xfd, 0x469: 0xfd, 0x46a: 0xfd, 0x46b: 0xfd, 0x46c: 0xfd, 0x46d: 0xfd, 0x46e: 0xfd, 0x46f: 0xfd,\n\t0x470: 0xfd, 0x471: 0xfd, 0x472: 0xfd, 0x473: 0xfd, 0x474: 0xfd, 0x475: 0xfd, 0x476: 0xfd, 0x477: 0xfd,\n\t0x478: 0xfd, 0x479: 0xfd, 0x47a: 0xfd, 0x47b: 0xfd, 0x47c: 0xfd, 0x47d: 0xfd, 0x47e: 0xfd, 0x47f: 0xfd,\n\t// Block 0x12, offset 0x480\n\t0x480: 0xa0, 0x481: 0xa0, 0x482: 0xa0, 0x483: 0xa0, 0x484: 0xa0, 0x485: 0xa0, 0x486: 0xa0, 0x487: 0xa0,\n\t0x488: 0xa0, 0x489: 0xa0, 0x48a: 0xa0, 0x48b: 0xa0, 0x48c: 0xa0, 0x48d: 0xa0, 0x48e: 0xa0, 0x48f: 0xa0,\n\t0x490: 0x15c, 0x491: 0xfd, 0x492: 0xfd, 0x493: 0xfd, 0x494: 0xfd, 0x495: 0xfd, 0x496: 0xfd, 0x497: 0xfd,\n\t0x498: 0xfd, 0x499: 0xfd, 0x49a: 0xfd, 0x49b: 0xfd, 0x49c: 0xfd, 0x49d: 0xfd, 0x49e: 0xfd, 0x49f: 0xfd,\n\t0x4a0: 0xfd, 0x4a1: 0xfd, 0x4a2: 0xfd, 0x4a3: 0xfd, 0x4a4: 0xfd, 0x4a5: 0xfd, 0x4a6: 0xfd, 0x4a7: 0xfd,\n\t0x4a8: 0xfd, 0x4a9: 0xfd, 0x4aa: 0xfd, 0x4ab: 0xfd, 0x4ac: 0xfd, 0x4ad: 0xfd, 0x4ae: 0xfd, 0x4af: 0xfd,\n\t0x4b0: 0xfd, 0x4b1: 0xfd, 0x4b2: 0xfd, 0x4b3: 0xfd, 0x4b4: 0xfd, 0x4b5: 0xfd, 0x4b6: 0xfd, 0x4b7: 0xfd,\n\t0x4b8: 0xfd, 0x4b9: 0xfd, 0x4ba: 0xfd, 0x4bb: 0xfd, 0x4bc: 0xfd, 0x4bd: 0xfd, 0x4be: 0xfd, 0x4bf: 0xfd,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xfd, 0x4c1: 0xfd, 0x4c2: 0xfd, 0x4c3: 0xfd, 0x4c4: 0xfd, 0x4c5: 0xfd, 0x4c6: 0xfd, 0x4c7: 0xfd,\n\t0x4c8: 0xfd, 0x4c9: 0xfd, 0x4ca: 0xfd, 0x4cb: 0xfd, 0x4cc: 0xfd, 0x4cd: 0xfd, 0x4ce: 0xfd, 0x4cf: 0xfd,\n\t0x4d0: 0xa0, 0x4d1: 0xa0, 0x4d2: 0xa0, 0x4d3: 0xa0, 0x4d4: 0xa0, 0x4d5: 0xa0, 0x4d6: 0xa0, 0x4d7: 0xa0,\n\t0x4d8: 0xa0, 0x4d9: 0x15d, 0x4da: 0xfd, 0x4db: 0xfd, 0x4dc: 0xfd, 0x4dd: 0xfd, 0x4de: 0xfd, 0x4df: 0xfd,\n\t0x4e0: 0xfd, 0x4e1: 0xfd, 0x4e2: 0xfd, 0x4e3: 0xfd, 0x4e4: 0xfd, 0x4e5: 0xfd, 0x4e6: 0xfd, 0x4e7: 0xfd,\n\t0x4e8: 0xfd, 0x4e9: 0xfd, 0x4ea: 0xfd, 0x4eb: 0xfd, 0x4ec: 0xfd, 0x4ed: 0xfd, 0x4ee: 0xfd, 0x4ef: 0xfd,\n\t0x4f0: 0xfd, 0x4f1: 0xfd, 0x4f2: 0xfd, 0x4f3: 0xfd, 0x4f4: 0xfd, 0x4f5: 0xfd, 0x4f6: 0xfd, 0x4f7: 0xfd,\n\t0x4f8: 0xfd, 0x4f9: 0xfd, 0x4fa: 0xfd, 0x4fb: 0xfd, 0x4fc: 0xfd, 0x4fd: 0xfd, 0x4fe: 0xfd, 0x4ff: 0xfd,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xfd, 0x501: 0xfd, 0x502: 0xfd, 0x503: 0xfd, 0x504: 0xfd, 0x505: 0xfd, 0x506: 0xfd, 0x507: 0xfd,\n\t0x508: 0xfd, 0x509: 0xfd, 0x50a: 0xfd, 0x50b: 0xfd, 0x50c: 0xfd, 0x50d: 0xfd, 0x50e: 0xfd, 0x50f: 0xfd,\n\t0x510: 0xfd, 0x511: 0xfd, 0x512: 0xfd, 0x513: 0xfd, 0x514: 0xfd, 0x515: 0xfd, 0x516: 0xfd, 0x517: 0xfd,\n\t0x518: 0xfd, 0x519: 0xfd, 0x51a: 0xfd, 0x51b: 0xfd, 0x51c: 0xfd, 0x51d: 0xfd, 0x51e: 0xfd, 0x51f: 0xfd,\n\t0x520: 0xa0, 0x521: 0xa0, 0x522: 0xa0, 0x523: 0xa0, 0x524: 0xa0, 0x525: 0xa0, 0x526: 0xa0, 0x527: 0xa0,\n\t0x528: 0x14f, 0x529: 0x15e, 0x52a: 0xfd, 0x52b: 0x15f, 0x52c: 0x160, 0x52d: 0x161, 0x52e: 0x162, 0x52f: 0xfd,\n\t0x530: 0xfd, 0x531: 0xfd, 0x532: 0xfd, 0x533: 0xfd, 0x534: 0xfd, 0x535: 0xfd, 0x536: 0xfd, 0x537: 0xfd,\n\t0x538: 0xfd, 0x539: 0x163, 0x53a: 0x164, 0x53b: 0xfd, 0x53c: 0xa0, 0x53d: 0x165, 0x53e: 0x166, 0x53f: 0x167,\n\t// Block 0x15, offset 0x540\n\t0x540: 0xa0, 0x541: 0xa0, 0x542: 0xa0, 0x543: 0xa0, 0x544: 0xa0, 0x545: 0xa0, 0x546: 0xa0, 0x547: 0xa0,\n\t0x548: 0xa0, 0x549: 0xa0, 0x54a: 0xa0, 0x54b: 0xa0, 0x54c: 0xa0, 0x54d: 0xa0, 0x54e: 0xa0, 0x54f: 0xa0,\n\t0x550: 0xa0, 0x551: 0xa0, 0x552: 0xa0, 0x553: 0xa0, 0x554: 0xa0, 0x555: 0xa0, 0x556: 0xa0, 0x557: 0xa0,\n\t0x558: 0xa0, 0x559: 0xa0, 0x55a: 0xa0, 0x55b: 0xa0, 0x55c: 0xa0, 0x55d: 0xa0, 0x55e: 0xa0, 0x55f: 0x168,\n\t0x560: 0xa0, 0x561: 0xa0, 0x562: 0xa0, 0x563: 0xa0, 0x564: 0xa0, 0x565: 0xa0, 0x566: 0xa0, 0x567: 0xa0,\n\t0x568: 0xa0, 0x569: 0xa0, 0x56a: 0xa0, 0x56b: 0xa0, 0x56c: 0xa0, 0x56d: 0xa0, 0x56e: 0xa0, 0x56f: 0xa0,\n\t0x570: 0xa0, 0x571: 0xa0, 0x572: 0xa0, 0x573: 0x169, 0x574: 0x16a, 0x575: 0xfd, 0x576: 0xfd, 0x577: 0xfd,\n\t0x578: 0xfd, 0x579: 0xfd, 0x57a: 0xfd, 0x57b: 0xfd, 0x57c: 0xfd, 0x57d: 0xfd, 0x57e: 0xfd, 0x57f: 0xfd,\n\t// Block 0x16, offset 0x580\n\t0x580: 0xa0, 0x581: 0xa0, 0x582: 0xa0, 0x583: 0xa0, 0x584: 0x16b, 0x585: 0x16c, 0x586: 0xa0, 0x587: 0xa0,\n\t0x588: 0xa0, 0x589: 0xa0, 0x58a: 0xa0, 0x58b: 0x16d, 0x58c: 0xfd, 0x58d: 0xfd, 0x58e: 0xfd, 0x58f: 0xfd,\n\t0x590: 0xfd, 0x591: 0xfd, 0x592: 0xfd, 0x593: 0xfd, 0x594: 0xfd, 0x595: 0xfd, 0x596: 0xfd, 0x597: 0xfd,\n\t0x598: 0xfd, 0x599: 0xfd, 0x59a: 0xfd, 0x59b: 0xfd, 0x59c: 0xfd, 0x59d: 0xfd, 0x59e: 0xfd, 0x59f: 0xfd,\n\t0x5a0: 0xfd, 0x5a1: 0xfd, 0x5a2: 0xfd, 0x5a3: 0xfd, 0x5a4: 0xfd, 0x5a5: 0xfd, 0x5a6: 0xfd, 0x5a7: 0xfd,\n\t0x5a8: 0xfd, 0x5a9: 0xfd, 0x5aa: 0xfd, 0x5ab: 0xfd, 0x5ac: 0xfd, 0x5ad: 0xfd, 0x5ae: 0xfd, 0x5af: 0xfd,\n\t0x5b0: 0xa0, 0x5b1: 0x16e, 0x5b2: 0x16f, 0x5b3: 0xfd, 0x5b4: 0xfd, 0x5b5: 0xfd, 0x5b6: 0xfd, 0x5b7: 0xfd,\n\t0x5b8: 0xfd, 0x5b9: 0xfd, 0x5ba: 0xfd, 0x5bb: 0xfd, 0x5bc: 0xfd, 0x5bd: 0xfd, 0x5be: 0xfd, 0x5bf: 0xfd,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x9c, 0x5c1: 0x9c, 0x5c2: 0x9c, 0x5c3: 0x170, 0x5c4: 0x171, 0x5c5: 0x172, 0x5c6: 0x173, 0x5c7: 0x174,\n\t0x5c8: 0x9c, 0x5c9: 0x175, 0x5ca: 0xfd, 0x5cb: 0x176, 0x5cc: 0x9c, 0x5cd: 0x177, 0x5ce: 0xfd, 0x5cf: 0xfd,\n\t0x5d0: 0x5e, 0x5d1: 0x5f, 0x5d2: 0x60, 0x5d3: 0x61, 0x5d4: 0x62, 0x5d5: 0x63, 0x5d6: 0x64, 0x5d7: 0x65,\n\t0x5d8: 0x66, 0x5d9: 0x67, 0x5da: 0x68, 0x5db: 0x69, 0x5dc: 0x6a, 0x5dd: 0x6b, 0x5de: 0x6c, 0x5df: 0x6d,\n\t0x5e0: 0x9c, 0x5e1: 0x9c, 0x5e2: 0x9c, 0x5e3: 0x9c, 0x5e4: 0x9c, 0x5e5: 0x9c, 0x5e6: 0x9c, 0x5e7: 0x9c,\n\t0x5e8: 0x178, 0x5e9: 0x179, 0x5ea: 0x17a, 0x5eb: 0xfd, 0x5ec: 0xfd, 0x5ed: 0xfd, 0x5ee: 0xfd, 0x5ef: 0xfd,\n\t0x5f0: 0xfd, 0x5f1: 0xfd, 0x5f2: 0xfd, 0x5f3: 0xfd, 0x5f4: 0xfd, 0x5f5: 0xfd, 0x5f6: 0xfd, 0x5f7: 0xfd,\n\t0x5f8: 0xfd, 0x5f9: 0xfd, 0x5fa: 0xfd, 0x5fb: 0xfd, 0x5fc: 0xfd, 0x5fd: 0xfd, 0x5fe: 0xfd, 0x5ff: 0xfd,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x17b, 0x601: 0xfd, 0x602: 0xfd, 0x603: 0xfd, 0x604: 0x17c, 0x605: 0x17d, 0x606: 0xfd, 0x607: 0xfd,\n\t0x608: 0xfd, 0x609: 0xfd, 0x60a: 0xfd, 0x60b: 0x17e, 0x60c: 0xfd, 0x60d: 0xfd, 0x60e: 0xfd, 0x60f: 0xfd,\n\t0x610: 0xfd, 0x611: 0xfd, 0x612: 0xfd, 0x613: 0xfd, 0x614: 0xfd, 0x615: 0xfd, 0x616: 0xfd, 0x617: 0xfd,\n\t0x618: 0xfd, 0x619: 0xfd, 0x61a: 0xfd, 0x61b: 0xfd, 0x61c: 0xfd, 0x61d: 0xfd, 0x61e: 0xfd, 0x61f: 0xfd,\n\t0x620: 0x125, 0x621: 0x125, 0x622: 0x125, 0x623: 0x17f, 0x624: 0x6e, 0x625: 0x180, 0x626: 0xfd, 0x627: 0xfd,\n\t0x628: 0xfd, 0x629: 0xfd, 0x62a: 0xfd, 0x62b: 0xfd, 0x62c: 0xfd, 0x62d: 0xfd, 0x62e: 0xfd, 0x62f: 0xfd,\n\t0x630: 0xfd, 0x631: 0x181, 0x632: 0x182, 0x633: 0xfd, 0x634: 0x183, 0x635: 0xfd, 0x636: 0xfd, 0x637: 0xfd,\n\t0x638: 0x6f, 0x639: 0x70, 0x63a: 0x71, 0x63b: 0x184, 0x63c: 0xfd, 0x63d: 0xfd, 0x63e: 0xfd, 0x63f: 0xfd,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x185, 0x641: 0x9c, 0x642: 0x186, 0x643: 0x187, 0x644: 0x72, 0x645: 0x73, 0x646: 0x188, 0x647: 0x189,\n\t0x648: 0x74, 0x649: 0x18a, 0x64a: 0xfd, 0x64b: 0xfd, 0x64c: 0x9c, 0x64d: 0x9c, 0x64e: 0x9c, 0x64f: 0x9c,\n\t0x650: 0x9c, 0x651: 0x9c, 0x652: 0x9c, 0x653: 0x9c, 0x654: 0x9c, 0x655: 0x9c, 0x656: 0x9c, 0x657: 0x9c,\n\t0x658: 0x9c, 0x659: 0x9c, 0x65a: 0x9c, 0x65b: 0x18b, 0x65c: 0x9c, 0x65d: 0x18c, 0x65e: 0x9c, 0x65f: 0x18d,\n\t0x660: 0x18e, 0x661: 0x18f, 0x662: 0x190, 0x663: 0xfd, 0x664: 0x9c, 0x665: 0x191, 0x666: 0x9c, 0x667: 0x192,\n\t0x668: 0x9c, 0x669: 0x193, 0x66a: 0x194, 0x66b: 0x195, 0x66c: 0x9c, 0x66d: 0x9c, 0x66e: 0x196, 0x66f: 0x197,\n\t0x670: 0xfd, 0x671: 0xfd, 0x672: 0xfd, 0x673: 0xfd, 0x674: 0xfd, 0x675: 0xfd, 0x676: 0xfd, 0x677: 0xfd,\n\t0x678: 0xfd, 0x679: 0xfd, 0x67a: 0xfd, 0x67b: 0xfd, 0x67c: 0xfd, 0x67d: 0xfd, 0x67e: 0xfd, 0x67f: 0xfd,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0xa0, 0x681: 0xa0, 0x682: 0xa0, 0x683: 0xa0, 0x684: 0xa0, 0x685: 0xa0, 0x686: 0xa0, 0x687: 0xa0,\n\t0x688: 0xa0, 0x689: 0xa0, 0x68a: 0xa0, 0x68b: 0xa0, 0x68c: 0xa0, 0x68d: 0xa0, 0x68e: 0xa0, 0x68f: 0xa0,\n\t0x690: 0xa0, 0x691: 0xa0, 0x692: 0xa0, 0x693: 0xa0, 0x694: 0xa0, 0x695: 0xa0, 0x696: 0xa0, 0x697: 0xa0,\n\t0x698: 0xa0, 0x699: 0xa0, 0x69a: 0xa0, 0x69b: 0x198, 0x69c: 0xa0, 0x69d: 0xa0, 0x69e: 0xa0, 0x69f: 0xa0,\n\t0x6a0: 0xa0, 0x6a1: 0xa0, 0x6a2: 0xa0, 0x6a3: 0xa0, 0x6a4: 0xa0, 0x6a5: 0xa0, 0x6a6: 0xa0, 0x6a7: 0xa0,\n\t0x6a8: 0xa0, 0x6a9: 0xa0, 0x6aa: 0xa0, 0x6ab: 0xa0, 0x6ac: 0xa0, 0x6ad: 0xa0, 0x6ae: 0xa0, 0x6af: 0xa0,\n\t0x6b0: 0xa0, 0x6b1: 0xa0, 0x6b2: 0xa0, 0x6b3: 0xa0, 0x6b4: 0xa0, 0x6b5: 0xa0, 0x6b6: 0xa0, 0x6b7: 0xa0,\n\t0x6b8: 0xa0, 0x6b9: 0xa0, 0x6ba: 0xa0, 0x6bb: 0xa0, 0x6bc: 0xa0, 0x6bd: 0xa0, 0x6be: 0xa0, 0x6bf: 0xa0,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0xa0, 0x6c1: 0xa0, 0x6c2: 0xa0, 0x6c3: 0xa0, 0x6c4: 0xa0, 0x6c5: 0xa0, 0x6c6: 0xa0, 0x6c7: 0xa0,\n\t0x6c8: 0xa0, 0x6c9: 0xa0, 0x6ca: 0xa0, 0x6cb: 0xa0, 0x6cc: 0xa0, 0x6cd: 0xa0, 0x6ce: 0xa0, 0x6cf: 0xa0,\n\t0x6d0: 0xa0, 0x6d1: 0xa0, 0x6d2: 0xa0, 0x6d3: 0xa0, 0x6d4: 0xa0, 0x6d5: 0xa0, 0x6d6: 0xa0, 0x6d7: 0xa0,\n\t0x6d8: 0xa0, 0x6d9: 0xa0, 0x6da: 0xa0, 0x6db: 0xa0, 0x6dc: 0x199, 0x6dd: 0xa0, 0x6de: 0xa0, 0x6df: 0xa0,\n\t0x6e0: 0x19a, 0x6e1: 0xa0, 0x6e2: 0xa0, 0x6e3: 0xa0, 0x6e4: 0xa0, 0x6e5: 0xa0, 0x6e6: 0xa0, 0x6e7: 0xa0,\n\t0x6e8: 0xa0, 0x6e9: 0xa0, 0x6ea: 0xa0, 0x6eb: 0xa0, 0x6ec: 0xa0, 0x6ed: 0xa0, 0x6ee: 0xa0, 0x6ef: 0xa0,\n\t0x6f0: 0xa0, 0x6f1: 0xa0, 0x6f2: 0xa0, 0x6f3: 0xa0, 0x6f4: 0xa0, 0x6f5: 0xa0, 0x6f6: 0xa0, 0x6f7: 0xa0,\n\t0x6f8: 0xa0, 0x6f9: 0xa0, 0x6fa: 0xa0, 0x6fb: 0xa0, 0x6fc: 0xa0, 0x6fd: 0xa0, 0x6fe: 0xa0, 0x6ff: 0xa0,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0xa0, 0x701: 0xa0, 0x702: 0xa0, 0x703: 0xa0, 0x704: 0xa0, 0x705: 0xa0, 0x706: 0xa0, 0x707: 0xa0,\n\t0x708: 0xa0, 0x709: 0xa0, 0x70a: 0xa0, 0x70b: 0xa0, 0x70c: 0xa0, 0x70d: 0xa0, 0x70e: 0xa0, 0x70f: 0xa0,\n\t0x710: 0xa0, 0x711: 0xa0, 0x712: 0xa0, 0x713: 0xa0, 0x714: 0xa0, 0x715: 0xa0, 0x716: 0xa0, 0x717: 0xa0,\n\t0x718: 0xa0, 0x719: 0xa0, 0x71a: 0xa0, 0x71b: 0xa0, 0x71c: 0xa0, 0x71d: 0xa0, 0x71e: 0xa0, 0x71f: 0xa0,\n\t0x720: 0xa0, 0x721: 0xa0, 0x722: 0xa0, 0x723: 0xa0, 0x724: 0xa0, 0x725: 0xa0, 0x726: 0xa0, 0x727: 0xa0,\n\t0x728: 0xa0, 0x729: 0xa0, 0x72a: 0xa0, 0x72b: 0xa0, 0x72c: 0xa0, 0x72d: 0xa0, 0x72e: 0xa0, 0x72f: 0xa0,\n\t0x730: 0xa0, 0x731: 0xa0, 0x732: 0xa0, 0x733: 0xa0, 0x734: 0xa0, 0x735: 0xa0, 0x736: 0xa0, 0x737: 0xa0,\n\t0x738: 0xa0, 0x739: 0xa0, 0x73a: 0x19b, 0x73b: 0xa0, 0x73c: 0xa0, 0x73d: 0xa0, 0x73e: 0xa0, 0x73f: 0xa0,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0xa0, 0x741: 0xa0, 0x742: 0xa0, 0x743: 0xa0, 0x744: 0xa0, 0x745: 0xa0, 0x746: 0xa0, 0x747: 0xa0,\n\t0x748: 0xa0, 0x749: 0xa0, 0x74a: 0xa0, 0x74b: 0xa0, 0x74c: 0xa0, 0x74d: 0xa0, 0x74e: 0xa0, 0x74f: 0xa0,\n\t0x750: 0xa0, 0x751: 0xa0, 0x752: 0xa0, 0x753: 0xa0, 0x754: 0xa0, 0x755: 0xa0, 0x756: 0xa0, 0x757: 0xa0,\n\t0x758: 0xa0, 0x759: 0xa0, 0x75a: 0xa0, 0x75b: 0xa0, 0x75c: 0xa0, 0x75d: 0xa0, 0x75e: 0xa0, 0x75f: 0xa0,\n\t0x760: 0xa0, 0x761: 0xa0, 0x762: 0xa0, 0x763: 0xa0, 0x764: 0xa0, 0x765: 0xa0, 0x766: 0xa0, 0x767: 0xa0,\n\t0x768: 0xa0, 0x769: 0xa0, 0x76a: 0xa0, 0x76b: 0xa0, 0x76c: 0xa0, 0x76d: 0xa0, 0x76e: 0xa0, 0x76f: 0x19c,\n\t0x770: 0xfd, 0x771: 0xfd, 0x772: 0xfd, 0x773: 0xfd, 0x774: 0xfd, 0x775: 0xfd, 0x776: 0xfd, 0x777: 0xfd,\n\t0x778: 0xfd, 0x779: 0xfd, 0x77a: 0xfd, 0x77b: 0xfd, 0x77c: 0xfd, 0x77d: 0xfd, 0x77e: 0xfd, 0x77f: 0xfd,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0xfd, 0x781: 0xfd, 0x782: 0xfd, 0x783: 0xfd, 0x784: 0xfd, 0x785: 0xfd, 0x786: 0xfd, 0x787: 0xfd,\n\t0x788: 0xfd, 0x789: 0xfd, 0x78a: 0xfd, 0x78b: 0xfd, 0x78c: 0xfd, 0x78d: 0xfd, 0x78e: 0xfd, 0x78f: 0xfd,\n\t0x790: 0xfd, 0x791: 0xfd, 0x792: 0xfd, 0x793: 0xfd, 0x794: 0xfd, 0x795: 0xfd, 0x796: 0xfd, 0x797: 0xfd,\n\t0x798: 0xfd, 0x799: 0xfd, 0x79a: 0xfd, 0x79b: 0xfd, 0x79c: 0xfd, 0x79d: 0xfd, 0x79e: 0xfd, 0x79f: 0xfd,\n\t0x7a0: 0x75, 0x7a1: 0x76, 0x7a2: 0x77, 0x7a3: 0x78, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x7b, 0x7a7: 0x7c,\n\t0x7a8: 0x7d, 0x7a9: 0xfd, 0x7aa: 0xfd, 0x7ab: 0xfd, 0x7ac: 0xfd, 0x7ad: 0xfd, 0x7ae: 0xfd, 0x7af: 0xfd,\n\t0x7b0: 0xfd, 0x7b1: 0xfd, 0x7b2: 0xfd, 0x7b3: 0xfd, 0x7b4: 0xfd, 0x7b5: 0xfd, 0x7b6: 0xfd, 0x7b7: 0xfd,\n\t0x7b8: 0xfd, 0x7b9: 0xfd, 0x7ba: 0xfd, 0x7bb: 0xfd, 0x7bc: 0xfd, 0x7bd: 0xfd, 0x7be: 0xfd, 0x7bf: 0xfd,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0xa0, 0x7c1: 0xa0, 0x7c2: 0xa0, 0x7c3: 0xa0, 0x7c4: 0xa0, 0x7c5: 0xa0, 0x7c6: 0xa0, 0x7c7: 0xa0,\n\t0x7c8: 0xa0, 0x7c9: 0xa0, 0x7ca: 0xa0, 0x7cb: 0xa0, 0x7cc: 0xa0, 0x7cd: 0x19d, 0x7ce: 0xfd, 0x7cf: 0xfd,\n\t0x7d0: 0xfd, 0x7d1: 0xfd, 0x7d2: 0xfd, 0x7d3: 0xfd, 0x7d4: 0xfd, 0x7d5: 0xfd, 0x7d6: 0xfd, 0x7d7: 0xfd,\n\t0x7d8: 0xfd, 0x7d9: 0xfd, 0x7da: 0xfd, 0x7db: 0xfd, 0x7dc: 0xfd, 0x7dd: 0xfd, 0x7de: 0xfd, 0x7df: 0xfd,\n\t0x7e0: 0xfd, 0x7e1: 0xfd, 0x7e2: 0xfd, 0x7e3: 0xfd, 0x7e4: 0xfd, 0x7e5: 0xfd, 0x7e6: 0xfd, 0x7e7: 0xfd,\n\t0x7e8: 0xfd, 0x7e9: 0xfd, 0x7ea: 0xfd, 0x7eb: 0xfd, 0x7ec: 0xfd, 0x7ed: 0xfd, 0x7ee: 0xfd, 0x7ef: 0xfd,\n\t0x7f0: 0xfd, 0x7f1: 0xfd, 0x7f2: 0xfd, 0x7f3: 0xfd, 0x7f4: 0xfd, 0x7f5: 0xfd, 0x7f6: 0xfd, 0x7f7: 0xfd,\n\t0x7f8: 0xfd, 0x7f9: 0xfd, 0x7fa: 0xfd, 0x7fb: 0xfd, 0x7fc: 0xfd, 0x7fd: 0xfd, 0x7fe: 0xfd, 0x7ff: 0xfd,\n\t// Block 0x20, offset 0x800\n\t0x810: 0x0d, 0x811: 0x0e, 0x812: 0x0f, 0x813: 0x10, 0x814: 0x11, 0x815: 0x0b, 0x816: 0x12, 0x817: 0x07,\n\t0x818: 0x13, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x14, 0x81c: 0x0b, 0x81d: 0x15, 0x81e: 0x16, 0x81f: 0x17,\n\t0x820: 0x07, 0x821: 0x07, 0x822: 0x07, 0x823: 0x07, 0x824: 0x07, 0x825: 0x07, 0x826: 0x07, 0x827: 0x07,\n\t0x828: 0x07, 0x829: 0x07, 0x82a: 0x18, 0x82b: 0x19, 0x82c: 0x1a, 0x82d: 0x07, 0x82e: 0x1b, 0x82f: 0x1c,\n\t0x830: 0x07, 0x831: 0x1d, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b,\n\t0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0b, 0x841: 0x0b, 0x842: 0x0b, 0x843: 0x0b, 0x844: 0x0b, 0x845: 0x0b, 0x846: 0x0b, 0x847: 0x0b,\n\t0x848: 0x0b, 0x849: 0x0b, 0x84a: 0x0b, 0x84b: 0x0b, 0x84c: 0x0b, 0x84d: 0x0b, 0x84e: 0x0b, 0x84f: 0x0b,\n\t0x850: 0x0b, 0x851: 0x0b, 0x852: 0x0b, 0x853: 0x0b, 0x854: 0x0b, 0x855: 0x0b, 0x856: 0x0b, 0x857: 0x0b,\n\t0x858: 0x0b, 0x859: 0x0b, 0x85a: 0x0b, 0x85b: 0x0b, 0x85c: 0x0b, 0x85d: 0x0b, 0x85e: 0x0b, 0x85f: 0x0b,\n\t0x860: 0x0b, 0x861: 0x0b, 0x862: 0x0b, 0x863: 0x0b, 0x864: 0x0b, 0x865: 0x0b, 0x866: 0x0b, 0x867: 0x0b,\n\t0x868: 0x0b, 0x869: 0x0b, 0x86a: 0x0b, 0x86b: 0x0b, 0x86c: 0x0b, 0x86d: 0x0b, 0x86e: 0x0b, 0x86f: 0x0b,\n\t0x870: 0x0b, 0x871: 0x0b, 0x872: 0x0b, 0x873: 0x0b, 0x874: 0x0b, 0x875: 0x0b, 0x876: 0x0b, 0x877: 0x0b,\n\t0x878: 0x0b, 0x879: 0x0b, 0x87a: 0x0b, 0x87b: 0x0b, 0x87c: 0x0b, 0x87d: 0x0b, 0x87e: 0x0b, 0x87f: 0x0b,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x19e, 0x881: 0x19f, 0x882: 0xfd, 0x883: 0xfd, 0x884: 0x1a0, 0x885: 0x1a0, 0x886: 0x1a0, 0x887: 0x1a1,\n\t0x888: 0xfd, 0x889: 0xfd, 0x88a: 0xfd, 0x88b: 0xfd, 0x88c: 0xfd, 0x88d: 0xfd, 0x88e: 0xfd, 0x88f: 0xfd,\n\t0x890: 0xfd, 0x891: 0xfd, 0x892: 0xfd, 0x893: 0xfd, 0x894: 0xfd, 0x895: 0xfd, 0x896: 0xfd, 0x897: 0xfd,\n\t0x898: 0xfd, 0x899: 0xfd, 0x89a: 0xfd, 0x89b: 0xfd, 0x89c: 0xfd, 0x89d: 0xfd, 0x89e: 0xfd, 0x89f: 0xfd,\n\t0x8a0: 0xfd, 0x8a1: 0xfd, 0x8a2: 0xfd, 0x8a3: 0xfd, 0x8a4: 0xfd, 0x8a5: 0xfd, 0x8a6: 0xfd, 0x8a7: 0xfd,\n\t0x8a8: 0xfd, 0x8a9: 0xfd, 0x8aa: 0xfd, 0x8ab: 0xfd, 0x8ac: 0xfd, 0x8ad: 0xfd, 0x8ae: 0xfd, 0x8af: 0xfd,\n\t0x8b0: 0xfd, 0x8b1: 0xfd, 0x8b2: 0xfd, 0x8b3: 0xfd, 0x8b4: 0xfd, 0x8b5: 0xfd, 0x8b6: 0xfd, 0x8b7: 0xfd,\n\t0x8b8: 0xfd, 0x8b9: 0xfd, 0x8ba: 0xfd, 0x8bb: 0xfd, 0x8bc: 0xfd, 0x8bd: 0xfd, 0x8be: 0xfd, 0x8bf: 0xfd,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b,\n\t0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b,\n\t0x8d0: 0x0b, 0x8d1: 0x0b, 0x8d2: 0x0b, 0x8d3: 0x0b, 0x8d4: 0x0b, 0x8d5: 0x0b, 0x8d6: 0x0b, 0x8d7: 0x0b,\n\t0x8d8: 0x0b, 0x8d9: 0x0b, 0x8da: 0x0b, 0x8db: 0x0b, 0x8dc: 0x0b, 0x8dd: 0x0b, 0x8de: 0x0b, 0x8df: 0x0b,\n\t0x8e0: 0x20, 0x8e1: 0x0b, 0x8e2: 0x0b, 0x8e3: 0x0b, 0x8e4: 0x0b, 0x8e5: 0x0b, 0x8e6: 0x0b, 0x8e7: 0x0b,\n\t0x8e8: 0x0b, 0x8e9: 0x0b, 0x8ea: 0x0b, 0x8eb: 0x0b, 0x8ec: 0x0b, 0x8ed: 0x0b, 0x8ee: 0x0b, 0x8ef: 0x0b,\n\t0x8f0: 0x0b, 0x8f1: 0x0b, 0x8f2: 0x0b, 0x8f3: 0x0b, 0x8f4: 0x0b, 0x8f5: 0x0b, 0x8f6: 0x0b, 0x8f7: 0x0b,\n\t0x8f8: 0x0b, 0x8f9: 0x0b, 0x8fa: 0x0b, 0x8fb: 0x0b, 0x8fc: 0x0b, 0x8fd: 0x0b, 0x8fe: 0x0b, 0x8ff: 0x0b,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0b, 0x901: 0x0b, 0x902: 0x0b, 0x903: 0x0b, 0x904: 0x0b, 0x905: 0x0b, 0x906: 0x0b, 0x907: 0x0b,\n\t0x908: 0x0b, 0x909: 0x0b, 0x90a: 0x0b, 0x90b: 0x0b, 0x90c: 0x0b, 0x90d: 0x0b, 0x90e: 0x0b, 0x90f: 0x0b,\n}\n\n// idnaSparseOffset: 292 entries, 584 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x33, 0x3e, 0x4a, 0x4e, 0x5d, 0x62, 0x6c, 0x78, 0x85, 0x8b, 0x94, 0xa4, 0xb2, 0xbd, 0xca, 0xdb, 0xe5, 0xec, 0xf9, 0x10a, 0x111, 0x11c, 0x12b, 0x139, 0x143, 0x145, 0x14a, 0x14d, 0x150, 0x152, 0x15e, 0x169, 0x171, 0x177, 0x17d, 0x182, 0x187, 0x18a, 0x18e, 0x194, 0x199, 0x1a5, 0x1af, 0x1b5, 0x1c6, 0x1d0, 0x1d3, 0x1db, 0x1de, 0x1eb, 0x1f3, 0x1f7, 0x1fe, 0x206, 0x216, 0x222, 0x225, 0x22f, 0x23b, 0x247, 0x253, 0x25b, 0x260, 0x26d, 0x27e, 0x282, 0x28d, 0x291, 0x29a, 0x2a2, 0x2a8, 0x2ad, 0x2b0, 0x2b4, 0x2ba, 0x2be, 0x2c2, 0x2c6, 0x2cc, 0x2d4, 0x2db, 0x2e6, 0x2f0, 0x2f4, 0x2f7, 0x2fd, 0x301, 0x303, 0x306, 0x308, 0x30b, 0x315, 0x318, 0x327, 0x32b, 0x32f, 0x331, 0x33a, 0x33d, 0x341, 0x346, 0x34b, 0x351, 0x362, 0x372, 0x378, 0x37c, 0x38b, 0x390, 0x398, 0x3a2, 0x3ad, 0x3b5, 0x3c6, 0x3cf, 0x3df, 0x3ec, 0x3f8, 0x3fd, 0x40a, 0x40e, 0x413, 0x415, 0x417, 0x41b, 0x41d, 0x421, 0x42a, 0x430, 0x434, 0x444, 0x44e, 0x453, 0x456, 0x45c, 0x463, 0x468, 0x46c, 0x472, 0x477, 0x480, 0x485, 0x48b, 0x492, 0x499, 0x4a0, 0x4a4, 0x4a9, 0x4ac, 0x4b1, 0x4bd, 0x4c3, 0x4c8, 0x4cf, 0x4d7, 0x4dc, 0x4e0, 0x4f0, 0x4f7, 0x4fb, 0x4ff, 0x506, 0x508, 0x50b, 0x50e, 0x512, 0x51b, 0x51f, 0x527, 0x52f, 0x537, 0x543, 0x54f, 0x555, 0x55e, 0x56a, 0x571, 0x57a, 0x585, 0x58c, 0x59b, 0x5a8, 0x5b5, 0x5be, 0x5c2, 0x5d1, 0x5d9, 0x5e4, 0x5ed, 0x5f3, 0x5fb, 0x604, 0x60f, 0x612, 0x61e, 0x627, 0x62a, 0x62f, 0x638, 0x63d, 0x64a, 0x655, 0x65e, 0x668, 0x66b, 0x675, 0x67e, 0x68a, 0x697, 0x6a4, 0x6b2, 0x6b9, 0x6bd, 0x6c1, 0x6c4, 0x6c9, 0x6cc, 0x6d1, 0x6d4, 0x6db, 0x6e2, 0x6e6, 0x6f1, 0x6f4, 0x6f7, 0x6fa, 0x700, 0x706, 0x70f, 0x712, 0x715, 0x718, 0x71b, 0x722, 0x725, 0x72a, 0x734, 0x737, 0x73b, 0x74a, 0x756, 0x75a, 0x75f, 0x763, 0x768, 0x76c, 0x771, 0x77a, 0x785, 0x78b, 0x791, 0x797, 0x79d, 0x7a6, 0x7a9, 0x7ac, 0x7b0, 0x7b4, 0x7b8, 0x7be, 0x7c4, 0x7c9, 0x7cc, 0x7dc, 0x7e3, 0x7e6, 0x7eb, 0x7ef, 0x7f5, 0x7fc, 0x800, 0x804, 0x80d, 0x814, 0x819, 0x81d, 0x82b, 0x82e, 0x831, 0x835, 0x839, 0x83c, 0x83f, 0x844, 0x846, 0x848}\n\n// idnaSparseValues: 2123 entries, 8492 bytes\nvar idnaSparseValues = [2123]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x00a9, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x00b1, lo: 0xb2, hi: 0xb2},\n\t{value: 0x00b9, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x00c1, lo: 0xb7, hi: 0xb7},\n\t{value: 0x00c9, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x6, offset 0x33\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0131, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xae},\n\t{value: 0x0808, lo: 0xaf, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x62\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbf},\n\t// Block 0xc, offset 0x6c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x78\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0a08, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0c08, lo: 0xaa, hi: 0xac},\n\t{value: 0x0808, lo: 0xad, hi: 0xad},\n\t{value: 0x0c08, lo: 0xae, hi: 0xae},\n\t{value: 0x0a08, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0a08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xe, offset 0x85\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0xf, offset 0x8b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x10, offset 0x94\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x11, offset 0xa4\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x12, offset 0xb2\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x3b08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbd\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x14, offset 0xca\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x15, offset 0xdb\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x01f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x16, offset 0xe5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x17, offset 0xec\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0201, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0209, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x18, offset 0xf9\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x19, offset 0x10a\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x1a, offset 0x111\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1b, offset 0x11c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1c, offset 0x12b\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1d, offset 0x139\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1e, offset 0x143\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x1f, offset 0x145\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x20, offset 0x14a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x21, offset 0x14d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x22, offset 0x150\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x23, offset 0x152\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x24, offset 0x15e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x25, offset 0x169\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x26, offset 0x171\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x27, offset 0x177\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x28, offset 0x17d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x29, offset 0x182\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x2a, offset 0x187\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2b, offset 0x18a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2c, offset 0x18e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2d, offset 0x194\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2e, offset 0x199\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x30, offset 0x1af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x31, offset 0x1b5\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x32, offset 0x1c6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x33, offset 0x1d0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x34, offset 0x1d3\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x35, offset 0x1db\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x36, offset 0x1de\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x37, offset 0x1eb\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x38, offset 0x1f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x39, offset 0x1f7\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x3a, offset 0x1fe\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3b, offset 0x206\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3c, offset 0x216\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3d, offset 0x222\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0xbf},\n\t// Block 0x3e, offset 0x225\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x3f, offset 0x22f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x40, offset 0x23b\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x41, offset 0x247\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x42, offset 0x253\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x43, offset 0x25b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x44, offset 0x260\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x02a9, lo: 0x80, hi: 0x80},\n\t{value: 0x02b1, lo: 0x81, hi: 0x81},\n\t{value: 0x02b9, lo: 0x82, hi: 0x82},\n\t{value: 0x02c1, lo: 0x83, hi: 0x83},\n\t{value: 0x02c9, lo: 0x84, hi: 0x85},\n\t{value: 0x02d1, lo: 0x86, hi: 0x86},\n\t{value: 0x02d9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x059d, lo: 0x90, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x059d, lo: 0xbd, hi: 0xbf},\n\t// Block 0x45, offset 0x26d\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x46, offset 0x27e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x47, offset 0x282\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x48, offset 0x28d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x49, offset 0x291\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x0851, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x4a, offset 0x29a\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0859, lo: 0xac, hi: 0xac},\n\t{value: 0x0861, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x0869, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0871, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4b, offset 0x2a2\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4c, offset 0x2a8\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09dd, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09fd, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4d, offset 0x2ad\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x4e, offset 0x2b0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0929, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x4f, offset 0x2b4\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e7e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0932, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e9e, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x50, offset 0x2ba\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x0939, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x51, offset 0x2be\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x52, offset 0x2c2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0xbf},\n\t// Block 0x53, offset 0x2c6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ebd, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x54, offset 0x2cc\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x55, offset 0x2d4\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x56, offset 0x2db\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x57, offset 0x2e6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x58, offset 0x2f0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x59, offset 0x2f4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0xbf},\n\t// Block 0x5a, offset 0x2f7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0ef5, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5b, offset 0x2fd\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0f15, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5c, offset 0x301\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f35, lo: 0x80, hi: 0xbf},\n\t// Block 0x5d, offset 0x303\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x1735, lo: 0x80, hi: 0x8f},\n\t{value: 0x1915, lo: 0x90, hi: 0xbf},\n\t// Block 0x5e, offset 0x306\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1f15, lo: 0x80, hi: 0xbf},\n\t// Block 0x5f, offset 0x308\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x60, offset 0x30b\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x096a, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0972, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0979, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x61, offset 0x315\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x0981, lo: 0xbf, hi: 0xbf},\n\t// Block 0x62, offset 0x318\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb0},\n\t{value: 0x2a35, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a55, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a75, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a95, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a75, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2ab5, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2ad5, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2af5, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2b15, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b35, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2b15, lo: 0xbe, hi: 0xbf},\n\t// Block 0x63, offset 0x327\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x64, offset 0x32b\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x098a, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0a82, lo: 0xa0, hi: 0xbf},\n\t// Block 0x65, offset 0x32f\n\t{value: 0x0008, lo: 0x01},\n\t{value: 0x0d19, lo: 0x80, hi: 0xbf},\n\t// Block 0x66, offset 0x331\n\t{value: 0x0008, lo: 0x08},\n\t{value: 0x0f19, lo: 0x80, hi: 0xb0},\n\t{value: 0x4045, lo: 0xb1, hi: 0xb1},\n\t{value: 0x10a1, lo: 0xb2, hi: 0xb3},\n\t{value: 0x4065, lo: 0xb4, hi: 0xb4},\n\t{value: 0x10b1, lo: 0xb5, hi: 0xb7},\n\t{value: 0x4085, lo: 0xb8, hi: 0xb8},\n\t{value: 0x4085, lo: 0xb9, hi: 0xb9},\n\t{value: 0x10c9, lo: 0xba, hi: 0xbf},\n\t// Block 0x67, offset 0x33a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x68, offset 0x33d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x69, offset 0x341\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x6a, offset 0x346\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x6b, offset 0x34b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6c, offset 0x351\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0xe00d, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x83},\n\t{value: 0x03f5, lo: 0x84, hi: 0x84},\n\t{value: 0x0479, lo: 0x85, hi: 0x85},\n\t{value: 0x447d, lo: 0x86, hi: 0x86},\n\t{value: 0xe07d, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0xe01d, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0xb4},\n\t{value: 0xe01d, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0741, lo: 0xb8, hi: 0xb8},\n\t{value: 0x13f1, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xbf},\n\t// Block 0x6d, offset 0x362\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x3b08, lo: 0xac, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6e, offset 0x372\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6f, offset 0x378\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x70, offset 0x37c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x71, offset 0x38b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x72, offset 0x390\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x73, offset 0x398\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x74, offset 0x3a2\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x75, offset 0x3ad\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x76, offset 0x3b5\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x77, offset 0x3c6\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x78, offset 0x3cf\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x79, offset 0x3df\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7a, offset 0x3ec\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x449d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x44b5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0941, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa8},\n\t{value: 0x13f9, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x44cd, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7b, offset 0x3f8\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44ed, lo: 0x80, hi: 0x8f},\n\t{value: 0x450d, lo: 0x90, hi: 0x9f},\n\t{value: 0x452d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x450d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7c, offset 0x3fd\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x7d, offset 0x40a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7e, offset 0x40e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x7f, offset 0x413\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x80, offset 0x415\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x454d, lo: 0x80, hi: 0xbf},\n\t// Block 0x81, offset 0x417\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d4d, lo: 0x80, hi: 0x94},\n\t{value: 0x4b0d, lo: 0x95, hi: 0x95},\n\t{value: 0x4fed, lo: 0x96, hi: 0xbf},\n\t// Block 0x82, offset 0x41b\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x552d, lo: 0x80, hi: 0xbf},\n\t// Block 0x83, offset 0x41d\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5d2d, lo: 0x80, hi: 0x84},\n\t{value: 0x568d, lo: 0x85, hi: 0x85},\n\t{value: 0x5dcd, lo: 0x86, hi: 0xbf},\n\t// Block 0x84, offset 0x421\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b8d, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d4d, lo: 0x90, hi: 0x90},\n\t{value: 0x6d8d, lo: 0x91, hi: 0xab},\n\t{value: 0x1401, lo: 0xac, hi: 0xac},\n\t{value: 0x70ed, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x710d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x85, offset 0x42a\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x730d, lo: 0x80, hi: 0xad},\n\t{value: 0x656d, lo: 0xae, hi: 0xae},\n\t{value: 0x78cd, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f8d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x79ad, lo: 0xb7, hi: 0xbf},\n\t// Block 0x86, offset 0x430\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x1751, lo: 0x80, hi: 0x82},\n\t{value: 0x1741, lo: 0x83, hi: 0x83},\n\t{value: 0x1769, lo: 0x84, hi: 0xbf},\n\t// Block 0x87, offset 0x434\n\t{value: 0x0008, lo: 0x0f},\n\t{value: 0x1d81, lo: 0x80, hi: 0x83},\n\t{value: 0x1d99, lo: 0x84, hi: 0x85},\n\t{value: 0x1da1, lo: 0x86, hi: 0x87},\n\t{value: 0x1da9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x1de9, lo: 0x92, hi: 0x97},\n\t{value: 0x1e11, lo: 0x98, hi: 0x9c},\n\t{value: 0x1e31, lo: 0x9d, hi: 0xb3},\n\t{value: 0x1d71, lo: 0xb4, hi: 0xb4},\n\t{value: 0x1d81, lo: 0xb5, hi: 0xb5},\n\t{value: 0x1ee9, lo: 0xb6, hi: 0xbb},\n\t{value: 0x1f09, lo: 0xbc, hi: 0xbc},\n\t{value: 0x1ef9, lo: 0xbd, hi: 0xbd},\n\t{value: 0x1f19, lo: 0xbe, hi: 0xbf},\n\t// Block 0x88, offset 0x444\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x89, offset 0x44e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x8a, offset 0x453\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x8b, offset 0x456\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x8c, offset 0x45c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x8d, offset 0x463\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8e, offset 0x468\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8f, offset 0x46c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x90, offset 0x472\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xbf},\n\t// Block 0x91, offset 0x477\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x92, offset 0x480\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x93, offset 0x485\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x94, offset 0x48b\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8b0d, lo: 0x98, hi: 0x9f},\n\t{value: 0x8b25, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x95, offset 0x492\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8b25, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8b0d, lo: 0xb8, hi: 0xbf},\n\t// Block 0x96, offset 0x499\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x97, offset 0x4a0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x98, offset 0x4a4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xae},\n\t{value: 0x0018, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x99, offset 0x4a9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9a, offset 0x4ac\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x9b, offset 0x4b1\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9c, offset 0x4bd\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9d, offset 0x4c3\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x9e, offset 0x4c8\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9f, offset 0x4cf\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa0, offset 0x4d7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0xa1, offset 0x4dc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0xa2, offset 0x4e0\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa3, offset 0x4f0\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa4, offset 0x4f7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa5, offset 0x4fb\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa6, offset 0x4ff\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa7, offset 0x506\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa8, offset 0x508\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa9, offset 0x50b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xaa, offset 0x50e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xab, offset 0x512\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0908, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0xa1},\n\t{value: 0x0c08, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0a08, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xac, offset 0x51b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xad, offset 0x51f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xac},\n\t{value: 0x0818, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xae, offset 0x527\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0xa6},\n\t{value: 0x0808, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0a08, lo: 0xb4, hi: 0xbf},\n\t// Block 0xaf, offset 0x52f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x84},\n\t{value: 0x0808, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x90},\n\t{value: 0x0a18, lo: 0x91, hi: 0x93},\n\t{value: 0x0c18, lo: 0x94, hi: 0x94},\n\t{value: 0x0818, lo: 0x95, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xb0, offset 0x537\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0c08, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0a08, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xba},\n\t{value: 0x0a08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0c08, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0a08, lo: 0xbe, hi: 0xbf},\n\t// Block 0xb1, offset 0x543\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0x81},\n\t{value: 0x0c08, lo: 0x82, hi: 0x83},\n\t{value: 0x0a08, lo: 0x84, hi: 0x84},\n\t{value: 0x0818, lo: 0x85, hi: 0x88},\n\t{value: 0x0c18, lo: 0x89, hi: 0x89},\n\t{value: 0x0a18, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0918, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb2, offset 0x54f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xb3, offset 0x555\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb4, offset 0x55e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xb5, offset 0x56a\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb6, offset 0x571\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xb7, offset 0x57a\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb8, offset 0x585\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb9, offset 0x58c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xba, offset 0x59b\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbb, offset 0x5a8\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xbc, offset 0x5b5\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xbd, offset 0x5be\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xbe, offset 0x5c2\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xbf},\n\t// Block 0xbf, offset 0x5d1\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc0, offset 0x5d9\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xc1, offset 0x5e4\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc2, offset 0x5ed\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xc3, offset 0x5f3\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc4, offset 0x5fb\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xc5, offset 0x604\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xc6, offset 0x60f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xc7, offset 0x612\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc8, offset 0x61e\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xc9, offset 0x627\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xca, offset 0x62a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xcb, offset 0x62f\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xcc, offset 0x638\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xcd, offset 0x63d\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x99},\n\t{value: 0x3308, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3008, lo: 0x9c, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xbf},\n\t// Block 0xce, offset 0x64a\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xcf, offset 0x655\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x3b08, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0xbf},\n\t// Block 0xd0, offset 0x65e\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x98},\n\t{value: 0x3b08, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xbf},\n\t// Block 0xd1, offset 0x668\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd2, offset 0x66b\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd3, offset 0x675\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xd4, offset 0x67e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xd5, offset 0x68a\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd6, offset 0x697\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd7, offset 0x6a4\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x3008, lo: 0x93, hi: 0x94},\n\t{value: 0x3308, lo: 0x95, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x96},\n\t{value: 0x3b08, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd8, offset 0x6b2\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd9, offset 0x6b9\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0xda, offset 0x6bd\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xdb, offset 0x6c1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xdc, offset 0x6c4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xdd, offset 0x6c9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xde, offset 0x6cc\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0340, lo: 0xb0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xdf, offset 0x6d1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xe0, offset 0x6d4\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe1, offset 0x6db\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe2, offset 0x6e2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xe3, offset 0x6e6\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xe4, offset 0x6f1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xe5, offset 0x6f4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0xe105, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0xe6, offset 0x6f7\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0xe7, offset 0x6fa\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbf},\n\t// Block 0xe8, offset 0x700\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xe9, offset 0x706\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xea, offset 0x70f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xeb, offset 0x712\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0xec, offset 0x715\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xed, offset 0x718\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xee, offset 0x71b\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0xa3},\n\t{value: 0x0008, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xef, offset 0x722\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xf0, offset 0x725\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xf1, offset 0x72a\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xf2, offset 0x734\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xf3, offset 0x737\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xf4, offset 0x73b\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0x2211, lo: 0x9e, hi: 0x9e},\n\t{value: 0x2219, lo: 0x9f, hi: 0x9f},\n\t{value: 0x2221, lo: 0xa0, hi: 0xa0},\n\t{value: 0x2229, lo: 0xa1, hi: 0xa1},\n\t{value: 0x2231, lo: 0xa2, hi: 0xa2},\n\t{value: 0x2239, lo: 0xa3, hi: 0xa3},\n\t{value: 0x2241, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xf5, offset 0x74a\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0x2249, lo: 0xbb, hi: 0xbb},\n\t{value: 0x2251, lo: 0xbc, hi: 0xbc},\n\t{value: 0x2259, lo: 0xbd, hi: 0xbd},\n\t{value: 0x2261, lo: 0xbe, hi: 0xbe},\n\t{value: 0x2269, lo: 0xbf, hi: 0xbf},\n\t// Block 0xf6, offset 0x756\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x2271, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xbf},\n\t// Block 0xf7, offset 0x75a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0xf8, offset 0x75f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0xf9, offset 0x763\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xfa, offset 0x768\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0xfb, offset 0x76c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0xfc, offset 0x771\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xfd, offset 0x77a\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xfe, offset 0x785\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xff, offset 0x78b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0x100, offset 0x791\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x101, offset 0x797\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0x102, offset 0x79d\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0b08, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x103, offset 0x7a6\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xb0},\n\t{value: 0x0818, lo: 0xb1, hi: 0xbf},\n\t// Block 0x104, offset 0x7a9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0818, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x105, offset 0x7ac\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0818, lo: 0x81, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x106, offset 0x7b0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0x107, offset 0x7b4\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x108, offset 0x7b8\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x109, offset 0x7be\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x10a, offset 0x7c4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0x2491, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0x10b, offset 0x7c9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0x10c, offset 0x7cc\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x2611, lo: 0x80, hi: 0x80},\n\t{value: 0x2619, lo: 0x81, hi: 0x81},\n\t{value: 0x2621, lo: 0x82, hi: 0x82},\n\t{value: 0x2629, lo: 0x83, hi: 0x83},\n\t{value: 0x2631, lo: 0x84, hi: 0x84},\n\t{value: 0x2639, lo: 0x85, hi: 0x85},\n\t{value: 0x2641, lo: 0x86, hi: 0x86},\n\t{value: 0x2649, lo: 0x87, hi: 0x87},\n\t{value: 0x2651, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x2659, lo: 0x90, hi: 0x90},\n\t{value: 0x2661, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xbf},\n\t// Block 0x10d, offset 0x7dc\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x10e, offset 0x7e3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x10f, offset 0x7e6\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x110, offset 0x7eb\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x111, offset 0x7ef\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x112, offset 0x7f5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0x113, offset 0x7fc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0x114, offset 0x800\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x115, offset 0x804\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x116, offset 0x80d\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x117, offset 0x814\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0x118, offset 0x819\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0xbf},\n\t// Block 0x119, offset 0x81d\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0018, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0xaf},\n\t{value: 0x06e1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0049, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0029, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0031, lo: 0xb3, hi: 0xb3},\n\t{value: 0x06e9, lo: 0xb4, hi: 0xb4},\n\t{value: 0x06f1, lo: 0xb5, hi: 0xb5},\n\t{value: 0x06f9, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0701, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0709, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0711, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x11a, offset 0x82b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x11b, offset 0x82e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x11c, offset 0x831\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x11d, offset 0x835\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x11e, offset 0x839\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x11f, offset 0x83c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0xbf},\n\t// Block 0x120, offset 0x83f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0x121, offset 0x844\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x122, offset 0x846\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x123, offset 0x848\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 44953 bytes (43KiB); checksum: D51909DD\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables15.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.21\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"15.0.0\"\n\nvar mappings string = \"\" + // Size: 6704 bytes\n\t\"  ̈a ̄23 ́ ̧1o1⁄41⁄23⁄4i̇l·ʼnsdžⱥⱦhjrwy ̆ ̇ ̊ ̨ ̃ ̋lẍ́ ι; ̈́եւاٴوٴۇٴيٴक\" +\n\t\"़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀྲཱྀླྀླཱ\" +\n\t\"ཱྀྀྒྷྜྷྡྷྦྷྫྷྐྵвдостъѣæbdeǝgikmnȣptuɐɑəɛɜŋɔɯvβγδφχρнɒcɕðfɟɡɥɨɩɪʝɭʟɱɰɲɳ\" +\n\t\"ɴɵɸʂʃƫʉʊʋʌzʐʑʒθssάέήίόύώἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧ\" +\n\t\"ιὰιαιάιᾶιι ̈͂ὴιηιήιῆι ̓̀ ̓́ ̓͂ΐ ̔̀ ̔́ ̔͂ΰ ̈̀`ὼιωιώιῶι′′′′′‵‵‵‵‵!!???!!?\" +\n\t\"′′′′0456789+=()rsħnoqsmtmωåאבגדπ1⁄71⁄91⁄101⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83\" +\n\t\"⁄85⁄87⁄81⁄iiivviviiiixxi0⁄3∫∫∫∫∫∮∮∮∮∮1011121314151617181920(10)(11)(12\" +\n\t\")(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫==⫝̸ɫɽȿɀ. ゙ ゚よりコト(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)\" +\n\t\"(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(오전\" +\n\t\")(오후)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(\" +\n\t\"財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)21222324252627282930313233343\" +\n\t\"5참고주의3637383940414243444546474849501月2月3月4月5月6月7月8月9月10月11月12月hgev令和アパート\" +\n\t\"アルファアンペアアールイニングインチウォンエスクードエーカーオンスオームカイリカラットカロリーガロンガンマギガギニーキュリーギルダーキロキロ\" +\n\t\"グラムキロメートルキロワットグラムグラムトンクルゼイロクローネケースコルナコーポサイクルサンチームシリングセンチセントダースデシドルトンナノ\" +\n\t\"ノットハイツパーセントパーツバーレルピアストルピクルピコビルファラッドフィートブッシェルフランヘクタールペソペニヒヘルツペンスページベータポ\" +\n\t\"イントボルトホンポンドホールホーンマイクロマイルマッハマルクマンションミクロンミリミリバールメガメガトンメートルヤードヤールユアンリットルリ\" +\n\t\"ラルピールーブルレムレントゲンワット0点1点2点3点4点5点6点7点8点9点10点11点12点13点14点15点16点17点18点19点20\" +\n\t\"点21点22点23点24点daauovpcdmiu平成昭和大正明治株式会社panamakakbmbgbkcalpfnfmgkghzmldlk\" +\n\t\"lfmnmmmcmkmm2m3m∕sm∕s2rad∕srad∕s2psnsmspvnvmvkvpwnwmwkwbqcccdc∕kgdbgyhah\" +\n\t\"pinkkktlmlnlxphprsrsvwbv∕ma∕m1日2日3日4日5日6日7日8日9日10日11日12日13日14日15日16日17日1\" +\n\t\"8日19日20日21日22日23日24日25日26日27日28日29日30日31日ьɦɬʞʇœʍ𤋮𢡊𢡄𣏕𥉉𥳐𧻓fffiflstմնմեմիվնմ\" +\n\t\"խיִײַעהכלםרתשׁשׂשּׁשּׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּשּתּו\" +\n\t\"ֹבֿכֿפֿאלٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھےۓڭۇۆۈۋۅۉېىئائەئوئۇئۆئۈئېئىیئجئحئم\" +\n\t\"ئيبجبحبخبمبىبيتجتحتختمتىتيثجثمثىثيجحجمحجحمخجخحخمسجسحسخسمصحصمضجضحضخضمطحط\" +\n\t\"مظمعجعمغجغمفجفحفخفمفىفيقحقمقىقيكاكجكحكخكلكمكىكيلجلحلخلملىليمجمحمخمممىمي\" +\n\t\"نجنحنخنمنىنيهجهمهىهييجيحيخيميىييذٰرٰىٰ ٌّ ٍّ َّ ُّ ِّ ّٰئرئزئنبربزبنترت\" +\n\t\"زتنثرثزثنمانرنزننيريزينئخئهبهتهصخلهنههٰيهثهسهشمشهـَّـُّـِّطىطيعىعيغىغيس\" +\n\t\"ىسيشىشيحىحيجىجيخىخيصىصيضىضيشجشحشخشرسرصرضراًتجمتحجتحمتخمتمجتمحتمخجمححميح\" +\n\t\"مىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمى\" +\n\t\"فخمقمحقمملحملحيلحىلججلخملمحمحجمحممحيمجحمجممخجمخممجخهمجهممنحمنحىنجمنجىنم\" +\n\t\"ينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمين\" +\n\t\"حيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلےاللهاكبرمحمدصلعمرسولعليه\" +\n\t\"وسلمصلىصلى الله عليه وسلمجل جلالهریال,:!?_{}[]#&*-<>\\\\$%@ـًـَـُـِـّـْءآ\" +\n\t\"أؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهويلآلألإلا\\x22'/^|~¢£¬¦¥ːˑʙɓʣꭦʥʤɖɗᶑɘɞʩɤɢ\" +\n\t\"ɠʛʜɧʄʪʫꞎɮʎøɶɷɺɾʀʨʦꭧʧʈⱱʏʡʢʘǀǁǂ𝅗𝅥𝅘𝅥𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝆺𝅥𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯ıȷαεζηκ\" +\n\t\"λμνξοστυψ∇∂ϝабгежзиклмпруфхцчшыэюꚉәіјөүӏґѕџҫꙑұٮڡٯ0,1,2,3,4,5,6,7,8,9,(a\" +\n\t\")(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y\" +\n\t\")(z)〔s〕wzhvsdppvwcmcmdmrdjほかココサ手字双デ二多解天交映無料前後再新初終生販声吹演投捕一三遊左中右指走打禁空合満有月申\" +\n\t\"割営配〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕得可丽丸乁你侮侻倂偺備僧像㒞免兔兤具㒹內冗冤仌冬况凵刃㓟刻剆剷㔕勇勉勤勺包匆北卉\" +\n\t\"卑博即卽卿灰及叟叫叱吆咞吸呈周咢哶唐啓啣善喙喫喳嗂圖嘆圗噑噴切壮城埴堍型堲報墬売壷夆夢奢姬娛娧姘婦㛮嬈嬾寃寘寧寳寿将尢㞁屠屮峀岍嵃嵮嵫嵼巡巢\" +\n\t\"㠯巽帨帽幩㡢㡼庰庳庶廊廾舁弢㣇形彫㣣徚忍志忹悁㤺㤜悔惇慈慌慎慺憎憲憤憯懞懲懶成戛扝抱拔捐挽拼捨掃揤搢揅掩㨮摩摾撝摷㩬敏敬旣書晉㬙暑㬈㫤冒冕最\" +\n\t\"暜肭䏙朗望朡杞杓㭉柺枅桒梅梎栟椔㮝楂榣槪檨櫛㰘次歔㱎歲殟殺殻汎沿泍汧洖派海流浩浸涅洴港湮㴳滋滇淹潮濆瀹瀞瀛㶖灊災灷炭煅熜爨爵牐犀犕獺王㺬玥㺸\" +\n\t\"瑇瑜瑱璅瓊㼛甤甾異瘐㿼䀈直眞真睊䀹瞋䁆䂖硎碌磌䃣祖福秫䄯穀穊穏䈂篆築䈧糒䊠糨糣紀絣䌁緇縂繅䌴䍙罺羕翺者聠聰䏕育脃䐋脾媵舄辞䑫芑芋芝劳花芳芽苦\" +\n\t\"若茝荣莭茣莽菧著荓菊菌菜䔫蓱蓳蔖蕤䕝䕡䕫虐虜虧虩蚩蚈蜎蛢蝹蜨蝫螆蟡蠁䗹衠衣裗裞䘵裺㒻䚾䛇誠諭變豕貫賁贛起跋趼跰軔輸邔郱鄑鄛鈸鋗鋘鉼鏹鐕開䦕閷\" +\n\t\"䧦雃嶲霣䩮䩶韠䪲頋頩飢䬳餩馧駂駾䯎鬒鱀鳽䳎䳭鵧䳸麻䵖黹黾鼅鼏鼖鼻\"\n\nvar mappingIndex = []uint16{ // 1729 elements\n\t// Entry 0 - 3F\n\t0x0000, 0x0000, 0x0001, 0x0004, 0x0005, 0x0008, 0x0009, 0x000a,\n\t0x000d, 0x0010, 0x0011, 0x0012, 0x0017, 0x001c, 0x0021, 0x0024,\n\t0x0027, 0x002a, 0x002b, 0x002e, 0x0031, 0x0034, 0x0035, 0x0036,\n\t0x0037, 0x0038, 0x0039, 0x003c, 0x003f, 0x0042, 0x0045, 0x0048,\n\t0x004b, 0x004c, 0x004d, 0x0051, 0x0054, 0x0055, 0x005a, 0x005e,\n\t0x0062, 0x0066, 0x006a, 0x006e, 0x0074, 0x007a, 0x0080, 0x0086,\n\t0x008c, 0x0092, 0x0098, 0x009e, 0x00a4, 0x00aa, 0x00b0, 0x00b6,\n\t0x00bc, 0x00c2, 0x00c8, 0x00ce, 0x00d4, 0x00da, 0x00e0, 0x00e6,\n\t// Entry 40 - 7F\n\t0x00ec, 0x00f2, 0x00f8, 0x00fe, 0x0104, 0x010a, 0x0110, 0x0116,\n\t0x011c, 0x0122, 0x0128, 0x012e, 0x0137, 0x013d, 0x0146, 0x014c,\n\t0x0152, 0x0158, 0x015e, 0x0164, 0x016a, 0x0170, 0x0172, 0x0174,\n\t0x0176, 0x0178, 0x017a, 0x017c, 0x017e, 0x0180, 0x0181, 0x0182,\n\t0x0183, 0x0185, 0x0186, 0x0187, 0x0188, 0x0189, 0x018a, 0x018c,\n\t0x018d, 0x018e, 0x018f, 0x0191, 0x0193, 0x0195, 0x0197, 0x0199,\n\t0x019b, 0x019d, 0x019f, 0x01a0, 0x01a2, 0x01a4, 0x01a6, 0x01a8,\n\t0x01aa, 0x01ac, 0x01ae, 0x01b0, 0x01b1, 0x01b3, 0x01b5, 0x01b6,\n\t// Entry 80 - BF\n\t0x01b8, 0x01ba, 0x01bc, 0x01be, 0x01c0, 0x01c2, 0x01c4, 0x01c6,\n\t0x01c8, 0x01ca, 0x01cc, 0x01ce, 0x01d0, 0x01d2, 0x01d4, 0x01d6,\n\t0x01d8, 0x01da, 0x01dc, 0x01de, 0x01e0, 0x01e2, 0x01e4, 0x01e5,\n\t0x01e7, 0x01e9, 0x01eb, 0x01ed, 0x01ef, 0x01f1, 0x01f3, 0x01f5,\n\t0x01f7, 0x01f9, 0x01fb, 0x01fd, 0x0202, 0x0207, 0x020c, 0x0211,\n\t0x0216, 0x021b, 0x0220, 0x0225, 0x022a, 0x022f, 0x0234, 0x0239,\n\t0x023e, 0x0243, 0x0248, 0x024d, 0x0252, 0x0257, 0x025c, 0x0261,\n\t0x0266, 0x026b, 0x0270, 0x0275, 0x027a, 0x027e, 0x0282, 0x0287,\n\t// Entry C0 - FF\n\t0x0289, 0x028e, 0x0293, 0x0297, 0x029b, 0x02a0, 0x02a5, 0x02aa,\n\t0x02af, 0x02b1, 0x02b6, 0x02bb, 0x02c0, 0x02c2, 0x02c7, 0x02c8,\n\t0x02cd, 0x02d1, 0x02d5, 0x02da, 0x02e0, 0x02e9, 0x02ef, 0x02f8,\n\t0x02fa, 0x02fc, 0x02fe, 0x0300, 0x030c, 0x030d, 0x030e, 0x030f,\n\t0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,\n\t0x0319, 0x031b, 0x031d, 0x031e, 0x0320, 0x0322, 0x0324, 0x0326,\n\t0x0328, 0x032a, 0x032c, 0x032e, 0x0330, 0x0335, 0x033a, 0x0340,\n\t0x0345, 0x034a, 0x034f, 0x0354, 0x0359, 0x035e, 0x0363, 0x0368,\n\t// Entry 100 - 13F\n\t0x036d, 0x0372, 0x0377, 0x037c, 0x0380, 0x0382, 0x0384, 0x0386,\n\t0x038a, 0x038c, 0x038e, 0x0393, 0x0399, 0x03a2, 0x03a8, 0x03b1,\n\t0x03b3, 0x03b5, 0x03b7, 0x03b9, 0x03bb, 0x03bd, 0x03bf, 0x03c1,\n\t0x03c3, 0x03c5, 0x03c7, 0x03cb, 0x03cf, 0x03d3, 0x03d7, 0x03db,\n\t0x03df, 0x03e3, 0x03e7, 0x03eb, 0x03ef, 0x03f3, 0x03ff, 0x0401,\n\t0x0406, 0x0408, 0x040a, 0x040c, 0x040e, 0x040f, 0x0413, 0x0417,\n\t0x041d, 0x0423, 0x0428, 0x042d, 0x0432, 0x0437, 0x043c, 0x0441,\n\t0x0446, 0x044b, 0x0450, 0x0455, 0x045a, 0x045f, 0x0464, 0x0469,\n\t// Entry 140 - 17F\n\t0x046e, 0x0473, 0x0478, 0x047d, 0x0482, 0x0487, 0x048c, 0x0491,\n\t0x0496, 0x049b, 0x04a0, 0x04a5, 0x04aa, 0x04af, 0x04b4, 0x04bc,\n\t0x04c4, 0x04c9, 0x04ce, 0x04d3, 0x04d8, 0x04dd, 0x04e2, 0x04e7,\n\t0x04ec, 0x04f1, 0x04f6, 0x04fb, 0x0500, 0x0505, 0x050a, 0x050f,\n\t0x0514, 0x0519, 0x051e, 0x0523, 0x0528, 0x052d, 0x0532, 0x0537,\n\t0x053c, 0x0541, 0x0546, 0x054b, 0x0550, 0x0555, 0x055a, 0x055f,\n\t0x0564, 0x0569, 0x056e, 0x0573, 0x0578, 0x057a, 0x057c, 0x057e,\n\t0x0580, 0x0582, 0x0584, 0x0586, 0x0588, 0x058a, 0x058c, 0x058e,\n\t// Entry 180 - 1BF\n\t0x0590, 0x0592, 0x0594, 0x0596, 0x059c, 0x05a2, 0x05a4, 0x05a6,\n\t0x05a8, 0x05aa, 0x05ac, 0x05ae, 0x05b0, 0x05b2, 0x05b4, 0x05b6,\n\t0x05b8, 0x05ba, 0x05bc, 0x05be, 0x05c0, 0x05c4, 0x05c8, 0x05cc,\n\t0x05d0, 0x05d4, 0x05d8, 0x05dc, 0x05e0, 0x05e4, 0x05e9, 0x05ee,\n\t0x05f3, 0x05f5, 0x05f7, 0x05fd, 0x0609, 0x0615, 0x0621, 0x062a,\n\t0x0636, 0x063f, 0x0648, 0x0657, 0x0663, 0x066c, 0x0675, 0x067e,\n\t0x068a, 0x0696, 0x069f, 0x06a8, 0x06ae, 0x06b7, 0x06c3, 0x06cf,\n\t0x06d5, 0x06e4, 0x06f6, 0x0705, 0x070e, 0x071d, 0x072c, 0x0738,\n\t// Entry 1C0 - 1FF\n\t0x0741, 0x074a, 0x0753, 0x075f, 0x076e, 0x077a, 0x0783, 0x078c,\n\t0x0795, 0x079b, 0x07a1, 0x07a7, 0x07ad, 0x07b6, 0x07bf, 0x07ce,\n\t0x07d7, 0x07e3, 0x07f2, 0x07fb, 0x0801, 0x0807, 0x0816, 0x0822,\n\t0x0831, 0x083a, 0x0849, 0x084f, 0x0858, 0x0861, 0x086a, 0x0873,\n\t0x087c, 0x0888, 0x0891, 0x0897, 0x08a0, 0x08a9, 0x08b2, 0x08be,\n\t0x08c7, 0x08d0, 0x08d9, 0x08e8, 0x08f4, 0x08fa, 0x0909, 0x090f,\n\t0x091b, 0x0927, 0x0930, 0x0939, 0x0942, 0x094e, 0x0954, 0x095d,\n\t0x0969, 0x096f, 0x097e, 0x0987, 0x098b, 0x098f, 0x0993, 0x0997,\n\t// Entry 200 - 23F\n\t0x099b, 0x099f, 0x09a3, 0x09a7, 0x09ab, 0x09af, 0x09b4, 0x09b9,\n\t0x09be, 0x09c3, 0x09c8, 0x09cd, 0x09d2, 0x09d7, 0x09dc, 0x09e1,\n\t0x09e6, 0x09eb, 0x09f0, 0x09f5, 0x09fa, 0x09fc, 0x09fe, 0x0a00,\n\t0x0a02, 0x0a04, 0x0a06, 0x0a0c, 0x0a12, 0x0a18, 0x0a1e, 0x0a2a,\n\t0x0a2c, 0x0a2e, 0x0a30, 0x0a32, 0x0a34, 0x0a36, 0x0a38, 0x0a3c,\n\t0x0a3e, 0x0a40, 0x0a42, 0x0a44, 0x0a46, 0x0a48, 0x0a4a, 0x0a4c,\n\t0x0a4e, 0x0a50, 0x0a52, 0x0a54, 0x0a56, 0x0a58, 0x0a5a, 0x0a5f,\n\t0x0a65, 0x0a6c, 0x0a74, 0x0a76, 0x0a78, 0x0a7a, 0x0a7c, 0x0a7e,\n\t// Entry 240 - 27F\n\t0x0a80, 0x0a82, 0x0a84, 0x0a86, 0x0a88, 0x0a8a, 0x0a8c, 0x0a8e,\n\t0x0a90, 0x0a96, 0x0a98, 0x0a9a, 0x0a9c, 0x0a9e, 0x0aa0, 0x0aa2,\n\t0x0aa4, 0x0aa6, 0x0aa8, 0x0aaa, 0x0aac, 0x0aae, 0x0ab0, 0x0ab2,\n\t0x0ab4, 0x0ab9, 0x0abe, 0x0ac2, 0x0ac6, 0x0aca, 0x0ace, 0x0ad2,\n\t0x0ad6, 0x0ada, 0x0ade, 0x0ae2, 0x0ae7, 0x0aec, 0x0af1, 0x0af6,\n\t0x0afb, 0x0b00, 0x0b05, 0x0b0a, 0x0b0f, 0x0b14, 0x0b19, 0x0b1e,\n\t0x0b23, 0x0b28, 0x0b2d, 0x0b32, 0x0b37, 0x0b3c, 0x0b41, 0x0b46,\n\t0x0b4b, 0x0b50, 0x0b52, 0x0b54, 0x0b56, 0x0b58, 0x0b5a, 0x0b5c,\n\t// Entry 280 - 2BF\n\t0x0b5e, 0x0b62, 0x0b66, 0x0b6a, 0x0b6e, 0x0b72, 0x0b76, 0x0b7a,\n\t0x0b7c, 0x0b7e, 0x0b80, 0x0b82, 0x0b86, 0x0b8a, 0x0b8e, 0x0b92,\n\t0x0b96, 0x0b9a, 0x0b9e, 0x0ba0, 0x0ba2, 0x0ba4, 0x0ba6, 0x0ba8,\n\t0x0baa, 0x0bac, 0x0bb0, 0x0bb4, 0x0bba, 0x0bc0, 0x0bc4, 0x0bc8,\n\t0x0bcc, 0x0bd0, 0x0bd4, 0x0bd8, 0x0bdc, 0x0be0, 0x0be4, 0x0be8,\n\t0x0bec, 0x0bf0, 0x0bf4, 0x0bf8, 0x0bfc, 0x0c00, 0x0c04, 0x0c08,\n\t0x0c0c, 0x0c10, 0x0c14, 0x0c18, 0x0c1c, 0x0c20, 0x0c24, 0x0c28,\n\t0x0c2c, 0x0c30, 0x0c34, 0x0c36, 0x0c38, 0x0c3a, 0x0c3c, 0x0c3e,\n\t// Entry 2C0 - 2FF\n\t0x0c40, 0x0c42, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4c, 0x0c4e,\n\t0x0c50, 0x0c52, 0x0c54, 0x0c56, 0x0c58, 0x0c5a, 0x0c5c, 0x0c5e,\n\t0x0c60, 0x0c62, 0x0c64, 0x0c66, 0x0c68, 0x0c6a, 0x0c6c, 0x0c6e,\n\t0x0c70, 0x0c72, 0x0c74, 0x0c76, 0x0c78, 0x0c7a, 0x0c7c, 0x0c7e,\n\t0x0c80, 0x0c82, 0x0c86, 0x0c8a, 0x0c8e, 0x0c92, 0x0c96, 0x0c9a,\n\t0x0c9e, 0x0ca2, 0x0ca4, 0x0ca8, 0x0cac, 0x0cb0, 0x0cb4, 0x0cb8,\n\t0x0cbc, 0x0cc0, 0x0cc4, 0x0cc8, 0x0ccc, 0x0cd0, 0x0cd4, 0x0cd8,\n\t0x0cdc, 0x0ce0, 0x0ce4, 0x0ce8, 0x0cec, 0x0cf0, 0x0cf4, 0x0cf8,\n\t// Entry 300 - 33F\n\t0x0cfc, 0x0d00, 0x0d04, 0x0d08, 0x0d0c, 0x0d10, 0x0d14, 0x0d18,\n\t0x0d1c, 0x0d20, 0x0d24, 0x0d28, 0x0d2c, 0x0d30, 0x0d34, 0x0d38,\n\t0x0d3c, 0x0d40, 0x0d44, 0x0d48, 0x0d4c, 0x0d50, 0x0d54, 0x0d58,\n\t0x0d5c, 0x0d60, 0x0d64, 0x0d68, 0x0d6c, 0x0d70, 0x0d74, 0x0d78,\n\t0x0d7c, 0x0d80, 0x0d84, 0x0d88, 0x0d8c, 0x0d90, 0x0d94, 0x0d98,\n\t0x0d9c, 0x0da0, 0x0da4, 0x0da8, 0x0dac, 0x0db0, 0x0db4, 0x0db8,\n\t0x0dbc, 0x0dc0, 0x0dc4, 0x0dc8, 0x0dcc, 0x0dd0, 0x0dd4, 0x0dd8,\n\t0x0ddc, 0x0de0, 0x0de4, 0x0de8, 0x0dec, 0x0df0, 0x0df4, 0x0df8,\n\t// Entry 340 - 37F\n\t0x0dfc, 0x0e00, 0x0e04, 0x0e08, 0x0e0c, 0x0e10, 0x0e14, 0x0e18,\n\t0x0e1d, 0x0e22, 0x0e27, 0x0e2c, 0x0e31, 0x0e36, 0x0e3a, 0x0e3e,\n\t0x0e42, 0x0e46, 0x0e4a, 0x0e4e, 0x0e52, 0x0e56, 0x0e5a, 0x0e5e,\n\t0x0e62, 0x0e66, 0x0e6a, 0x0e6e, 0x0e72, 0x0e76, 0x0e7a, 0x0e7e,\n\t0x0e82, 0x0e86, 0x0e8a, 0x0e8e, 0x0e92, 0x0e96, 0x0e9a, 0x0e9e,\n\t0x0ea2, 0x0ea6, 0x0eaa, 0x0eae, 0x0eb2, 0x0eb6, 0x0ebc, 0x0ec2,\n\t0x0ec8, 0x0ecc, 0x0ed0, 0x0ed4, 0x0ed8, 0x0edc, 0x0ee0, 0x0ee4,\n\t0x0ee8, 0x0eec, 0x0ef0, 0x0ef4, 0x0ef8, 0x0efc, 0x0f00, 0x0f04,\n\t// Entry 380 - 3BF\n\t0x0f08, 0x0f0c, 0x0f10, 0x0f14, 0x0f18, 0x0f1c, 0x0f20, 0x0f24,\n\t0x0f28, 0x0f2c, 0x0f30, 0x0f34, 0x0f38, 0x0f3e, 0x0f44, 0x0f4a,\n\t0x0f50, 0x0f56, 0x0f5c, 0x0f62, 0x0f68, 0x0f6e, 0x0f74, 0x0f7a,\n\t0x0f80, 0x0f86, 0x0f8c, 0x0f92, 0x0f98, 0x0f9e, 0x0fa4, 0x0faa,\n\t0x0fb0, 0x0fb6, 0x0fbc, 0x0fc2, 0x0fc8, 0x0fce, 0x0fd4, 0x0fda,\n\t0x0fe0, 0x0fe6, 0x0fec, 0x0ff2, 0x0ff8, 0x0ffe, 0x1004, 0x100a,\n\t0x1010, 0x1016, 0x101c, 0x1022, 0x1028, 0x102e, 0x1034, 0x103a,\n\t0x1040, 0x1046, 0x104c, 0x1052, 0x1058, 0x105e, 0x1064, 0x106a,\n\t// Entry 3C0 - 3FF\n\t0x1070, 0x1076, 0x107c, 0x1082, 0x1088, 0x108e, 0x1094, 0x109a,\n\t0x10a0, 0x10a6, 0x10ac, 0x10b2, 0x10b8, 0x10be, 0x10c4, 0x10ca,\n\t0x10d0, 0x10d6, 0x10dc, 0x10e2, 0x10e8, 0x10ee, 0x10f4, 0x10fa,\n\t0x1100, 0x1106, 0x110c, 0x1112, 0x1118, 0x111e, 0x1124, 0x112a,\n\t0x1130, 0x1136, 0x113c, 0x1142, 0x1148, 0x114e, 0x1154, 0x115a,\n\t0x1160, 0x1166, 0x116c, 0x1172, 0x1178, 0x1180, 0x1188, 0x1190,\n\t0x1198, 0x11a0, 0x11a8, 0x11b0, 0x11b6, 0x11d7, 0x11e6, 0x11ee,\n\t0x11ef, 0x11f0, 0x11f1, 0x11f2, 0x11f3, 0x11f4, 0x11f5, 0x11f6,\n\t// Entry 400 - 43F\n\t0x11f7, 0x11f8, 0x11f9, 0x11fa, 0x11fb, 0x11fc, 0x11fd, 0x11fe,\n\t0x11ff, 0x1200, 0x1201, 0x1205, 0x1209, 0x120d, 0x1211, 0x1215,\n\t0x1219, 0x121b, 0x121d, 0x121f, 0x1221, 0x1223, 0x1225, 0x1227,\n\t0x1229, 0x122b, 0x122d, 0x122f, 0x1231, 0x1233, 0x1235, 0x1237,\n\t0x1239, 0x123b, 0x123d, 0x123f, 0x1241, 0x1243, 0x1245, 0x1247,\n\t0x1249, 0x124b, 0x124d, 0x124f, 0x1251, 0x1253, 0x1255, 0x1257,\n\t0x1259, 0x125b, 0x125d, 0x125f, 0x1263, 0x1267, 0x126b, 0x126f,\n\t0x1270, 0x1271, 0x1272, 0x1273, 0x1274, 0x1275, 0x1277, 0x1279,\n\t// Entry 440 - 47F\n\t0x127b, 0x127d, 0x127f, 0x1281, 0x1283, 0x1285, 0x1287, 0x1289,\n\t0x128c, 0x128e, 0x1290, 0x1292, 0x1294, 0x1297, 0x1299, 0x129b,\n\t0x129d, 0x129f, 0x12a1, 0x12a3, 0x12a5, 0x12a7, 0x12a9, 0x12ab,\n\t0x12ad, 0x12af, 0x12b2, 0x12b4, 0x12b6, 0x12b8, 0x12ba, 0x12bc,\n\t0x12be, 0x12c0, 0x12c2, 0x12c4, 0x12c6, 0x12c9, 0x12cb, 0x12cd,\n\t0x12d0, 0x12d2, 0x12d4, 0x12d6, 0x12d8, 0x12da, 0x12dc, 0x12de,\n\t0x12e6, 0x12ee, 0x12fa, 0x1306, 0x1312, 0x131e, 0x132a, 0x1332,\n\t0x133a, 0x1346, 0x1352, 0x135e, 0x136a, 0x136c, 0x136e, 0x1370,\n\t// Entry 480 - 4BF\n\t0x1372, 0x1374, 0x1376, 0x1378, 0x137a, 0x137c, 0x137e, 0x1380,\n\t0x1382, 0x1384, 0x1386, 0x1388, 0x138a, 0x138d, 0x1390, 0x1392,\n\t0x1394, 0x1396, 0x1398, 0x139a, 0x139c, 0x139e, 0x13a0, 0x13a2,\n\t0x13a4, 0x13a6, 0x13a8, 0x13aa, 0x13ac, 0x13ae, 0x13b0, 0x13b2,\n\t0x13b4, 0x13b6, 0x13b8, 0x13ba, 0x13bc, 0x13bf, 0x13c1, 0x13c3,\n\t0x13c5, 0x13c7, 0x13c9, 0x13cb, 0x13cd, 0x13cf, 0x13d1, 0x13d3,\n\t0x13d6, 0x13d8, 0x13da, 0x13dc, 0x13de, 0x13e0, 0x13e2, 0x13e4,\n\t0x13e6, 0x13e8, 0x13ea, 0x13ec, 0x13ee, 0x13f0, 0x13f2, 0x13f5,\n\t// Entry 4C0 - 4FF\n\t0x13f8, 0x13fb, 0x13fe, 0x1401, 0x1404, 0x1407, 0x140a, 0x140d,\n\t0x1410, 0x1413, 0x1416, 0x1419, 0x141c, 0x141f, 0x1422, 0x1425,\n\t0x1428, 0x142b, 0x142e, 0x1431, 0x1434, 0x1437, 0x143a, 0x143d,\n\t0x1440, 0x1447, 0x1449, 0x144b, 0x144d, 0x1450, 0x1452, 0x1454,\n\t0x1456, 0x1458, 0x145a, 0x1460, 0x1466, 0x1469, 0x146c, 0x146f,\n\t0x1472, 0x1475, 0x1478, 0x147b, 0x147e, 0x1481, 0x1484, 0x1487,\n\t0x148a, 0x148d, 0x1490, 0x1493, 0x1496, 0x1499, 0x149c, 0x149f,\n\t0x14a2, 0x14a5, 0x14a8, 0x14ab, 0x14ae, 0x14b1, 0x14b4, 0x14b7,\n\t// Entry 500 - 53F\n\t0x14ba, 0x14bd, 0x14c0, 0x14c3, 0x14c6, 0x14c9, 0x14cc, 0x14cf,\n\t0x14d2, 0x14d5, 0x14d8, 0x14db, 0x14de, 0x14e1, 0x14e4, 0x14e7,\n\t0x14ea, 0x14ed, 0x14f6, 0x14ff, 0x1508, 0x1511, 0x151a, 0x1523,\n\t0x152c, 0x1535, 0x153e, 0x1541, 0x1544, 0x1547, 0x154a, 0x154d,\n\t0x1550, 0x1553, 0x1556, 0x1559, 0x155c, 0x155f, 0x1562, 0x1565,\n\t0x1568, 0x156b, 0x156e, 0x1571, 0x1574, 0x1577, 0x157a, 0x157d,\n\t0x1580, 0x1583, 0x1586, 0x1589, 0x158c, 0x158f, 0x1592, 0x1595,\n\t0x1598, 0x159b, 0x159e, 0x15a1, 0x15a4, 0x15a7, 0x15aa, 0x15ad,\n\t// Entry 540 - 57F\n\t0x15b0, 0x15b3, 0x15b6, 0x15b9, 0x15bc, 0x15bf, 0x15c2, 0x15c5,\n\t0x15c8, 0x15cb, 0x15ce, 0x15d1, 0x15d4, 0x15d7, 0x15da, 0x15dd,\n\t0x15e0, 0x15e3, 0x15e6, 0x15e9, 0x15ec, 0x15ef, 0x15f2, 0x15f5,\n\t0x15f8, 0x15fb, 0x15fe, 0x1601, 0x1604, 0x1607, 0x160a, 0x160d,\n\t0x1610, 0x1613, 0x1616, 0x1619, 0x161c, 0x161f, 0x1622, 0x1625,\n\t0x1628, 0x162b, 0x162e, 0x1631, 0x1634, 0x1637, 0x163a, 0x163d,\n\t0x1640, 0x1643, 0x1646, 0x1649, 0x164c, 0x164f, 0x1652, 0x1655,\n\t0x1658, 0x165b, 0x165e, 0x1661, 0x1664, 0x1667, 0x166a, 0x166d,\n\t// Entry 580 - 5BF\n\t0x1670, 0x1673, 0x1676, 0x1679, 0x167c, 0x167f, 0x1682, 0x1685,\n\t0x1688, 0x168b, 0x168e, 0x1691, 0x1694, 0x1697, 0x169a, 0x169d,\n\t0x16a0, 0x16a3, 0x16a6, 0x16a9, 0x16ac, 0x16af, 0x16b2, 0x16b5,\n\t0x16b8, 0x16bb, 0x16be, 0x16c1, 0x16c4, 0x16c7, 0x16ca, 0x16cd,\n\t0x16d0, 0x16d3, 0x16d6, 0x16d9, 0x16dc, 0x16df, 0x16e2, 0x16e5,\n\t0x16e8, 0x16eb, 0x16ee, 0x16f1, 0x16f4, 0x16f7, 0x16fa, 0x16fd,\n\t0x1700, 0x1703, 0x1706, 0x1709, 0x170c, 0x170f, 0x1712, 0x1715,\n\t0x1718, 0x171b, 0x171e, 0x1721, 0x1724, 0x1727, 0x172a, 0x172d,\n\t// Entry 5C0 - 5FF\n\t0x1730, 0x1733, 0x1736, 0x1739, 0x173c, 0x173f, 0x1742, 0x1745,\n\t0x1748, 0x174b, 0x174e, 0x1751, 0x1754, 0x1757, 0x175a, 0x175d,\n\t0x1760, 0x1763, 0x1766, 0x1769, 0x176c, 0x176f, 0x1772, 0x1775,\n\t0x1778, 0x177b, 0x177e, 0x1781, 0x1784, 0x1787, 0x178a, 0x178d,\n\t0x1790, 0x1793, 0x1796, 0x1799, 0x179c, 0x179f, 0x17a2, 0x17a5,\n\t0x17a8, 0x17ab, 0x17ae, 0x17b1, 0x17b4, 0x17b7, 0x17ba, 0x17bd,\n\t0x17c0, 0x17c3, 0x17c6, 0x17c9, 0x17cc, 0x17cf, 0x17d2, 0x17d5,\n\t0x17d8, 0x17db, 0x17de, 0x17e1, 0x17e4, 0x17e7, 0x17ea, 0x17ed,\n\t// Entry 600 - 63F\n\t0x17f0, 0x17f3, 0x17f6, 0x17f9, 0x17fc, 0x17ff, 0x1802, 0x1805,\n\t0x1808, 0x180b, 0x180e, 0x1811, 0x1814, 0x1817, 0x181a, 0x181d,\n\t0x1820, 0x1823, 0x1826, 0x1829, 0x182c, 0x182f, 0x1832, 0x1835,\n\t0x1838, 0x183b, 0x183e, 0x1841, 0x1844, 0x1847, 0x184a, 0x184d,\n\t0x1850, 0x1853, 0x1856, 0x1859, 0x185c, 0x185f, 0x1862, 0x1865,\n\t0x1868, 0x186b, 0x186e, 0x1871, 0x1874, 0x1877, 0x187a, 0x187d,\n\t0x1880, 0x1883, 0x1886, 0x1889, 0x188c, 0x188f, 0x1892, 0x1895,\n\t0x1898, 0x189b, 0x189e, 0x18a1, 0x18a4, 0x18a7, 0x18aa, 0x18ad,\n\t// Entry 640 - 67F\n\t0x18b0, 0x18b3, 0x18b6, 0x18b9, 0x18bc, 0x18bf, 0x18c2, 0x18c5,\n\t0x18c8, 0x18cb, 0x18ce, 0x18d1, 0x18d4, 0x18d7, 0x18da, 0x18dd,\n\t0x18e0, 0x18e3, 0x18e6, 0x18e9, 0x18ec, 0x18ef, 0x18f2, 0x18f5,\n\t0x18f8, 0x18fb, 0x18fe, 0x1901, 0x1904, 0x1907, 0x190a, 0x190d,\n\t0x1910, 0x1913, 0x1916, 0x1919, 0x191c, 0x191f, 0x1922, 0x1925,\n\t0x1928, 0x192b, 0x192e, 0x1931, 0x1934, 0x1937, 0x193a, 0x193d,\n\t0x1940, 0x1943, 0x1946, 0x1949, 0x194c, 0x194f, 0x1952, 0x1955,\n\t0x1958, 0x195b, 0x195e, 0x1961, 0x1964, 0x1967, 0x196a, 0x196d,\n\t// Entry 680 - 6BF\n\t0x1970, 0x1973, 0x1976, 0x1979, 0x197c, 0x197f, 0x1982, 0x1985,\n\t0x1988, 0x198b, 0x198e, 0x1991, 0x1994, 0x1997, 0x199a, 0x199d,\n\t0x19a0, 0x19a3, 0x19a6, 0x19a9, 0x19ac, 0x19af, 0x19b2, 0x19b5,\n\t0x19b8, 0x19bb, 0x19be, 0x19c1, 0x19c4, 0x19c7, 0x19ca, 0x19cd,\n\t0x19d0, 0x19d3, 0x19d6, 0x19d9, 0x19dc, 0x19df, 0x19e2, 0x19e5,\n\t0x19e8, 0x19eb, 0x19ee, 0x19f1, 0x19f4, 0x19f7, 0x19fa, 0x19fd,\n\t0x1a00, 0x1a03, 0x1a06, 0x1a09, 0x1a0c, 0x1a0f, 0x1a12, 0x1a15,\n\t0x1a18, 0x1a1b, 0x1a1e, 0x1a21, 0x1a24, 0x1a27, 0x1a2a, 0x1a2d,\n\t// Entry 6C0 - 6FF\n\t0x1a30,\n} // Size: 3482 bytes\n\nvar xorData string = \"\" + // Size: 4907 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x021\\x00\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\" +\n\t\"\\x03\\x1c\\x02\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\" +\n\t\"\\xc1r\\x02\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\" +\n\t\"\\x03\\xc1s*\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\" +\n\t\"\\x83\\xab\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\" +\n\t\"\\xe1\\xcd\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\" +\n\t\"\\x9a\\xec\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c\" +\n\t\"!\\x03\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03\" +\n\t\"ʦ\\x93\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\" +\n\t\"\\x03\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\" +\n\t\"\\xfa\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\" +\n\t\"\\x03\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\" +\n\t\"\\xe3\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\" +\n\t\"\\x03\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\" +\n\t\"\\xe8\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\" +\n\t\"\\x0b\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\" +\n\t\"\\x05\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\" +\n\t\"\\x0786\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\" +\n\t\"\\x03\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\" +\n\t\"\\x03\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\" +\n\t\"\\x03\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\" +\n\t\"\\x07\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\" +\n\t\"\\x07\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\" +\n\t\"\\x07\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\" +\n\t\"\\x0a\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\" +\n\t\"\\x07\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\" +\n\t\"\\x03\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\" +\n\t\"\\x044\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\" +\n\t\"\\x04+ \\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\" +\n\t\"\\x22\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\" +\n\t\"\\x03\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\" +\n\t\"\\x03\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\" +\n\t\"\\x054\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\" +\n\t\"\\x05):\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\" +\n\t\"\\x1e\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\" +\n\t\"\\x03\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\" +\n\t\"\\x1b\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\" +\n\t\"\\x03\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\" +\n\t\"\\x06\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\" +\n\t\"\\x03\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\" +\n\t\"\\x0a6\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\" +\n\t\"\\x1f\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\" +\n\t\"\\x0a\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\" +\n\t\"\\x02\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\" +\n\t\"\\x03\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\" +\n\t\"\\x00\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\" +\n\t\"\\x10\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#\" +\n\t\"<\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\" +\n\t\"\\x00\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\" +\n\t\"\\x03\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\" +\n\t\"\\x22\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\" +\n\t\"\\x12\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05\" +\n\t\"<\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x03\\x0b)\\x08\\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\" +\n\t\"\\x10\\x03\\x0b!0\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\" +\n\t\"\\x03\\x09\\x1f\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\" +\n\t\"\\x03\\x0a\\x01\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\" +\n\t\"\\x08='\\x03\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\" +\n\t\"\\x09\\x0c\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06\" +\n\t\"!3\\x03\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\" +\n\t\"\\x03\\x07<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\" +\n\t\"\\x01\\x00\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\" +\n\t\"\\x09\\x11\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\" +\n\t\"\\x0a/1\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\" +\n\t\"\\x07<3\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\" +\n\t\"\\x13\\x00\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(\" +\n\t\";\\x03\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\" +\n\t\"\\x14$\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\" +\n\t\"\\x0a\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\" +\n\t\"\\x01\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\" +\n\t\"\\x03\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\" +\n\t\"\\x07\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\" +\n\t\"\\x0a\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\" +\n\t\"\\x0b\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\" +\n\t\"\\x08\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\" +\n\t\"\\x03\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\" +\n\t\"\\x03\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\" +\n\t\"\\x09\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a\" +\n\t\".\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x03'\\x02\\x03)\\x02\\x03+\" +\n\t\"\\x02\\x03/\\x02\\x03\\x19\\x02\\x03\\x1b\\x02\\x03\\x1f\\x03\\x0d\\x22\\x18\\x03\\x0d\" +\n\t\"\\x22\\x1a\\x03\\x0d\\x22'\\x03\\x0d\\x22/\\x03\\x0d\\x223\\x03\\x0d\\x22$\\x02\\x01\\x1e\" +\n\t\"\\x03\\x0f$!\\x03\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\" +\n\t\"\\x18\\x03\\x0f\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\" +\n\t\"\\x03\\x0e\\x0d)\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\" +\n\t\"\\x03\\x0d. \\x03\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\" +\n\t\"\\x0d\\x0d\\x0f\\x03\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\" +\n\t\"\\x0c\\x09:\\x03\\x0e\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\" +\n\t\"\\x03\\x0c\\x1f\\x1c\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\" +\n\t\"\\x0b<+\\x03\\x0b8\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\" +\n\t\"\\x22&\\x03\\x0b\\x1a\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\" +\n\t\"\\x0a!\\x1a\\x03\\x0a!7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\" +\n\t\"\\x0a\\x00 \\x03\\x0a\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\" +\n\t\"\\x1b-\\x03\\x09-\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\" +\n\t\"\\x1f\\x03\\x093\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\" +\n\t\"\\x16\\x03\\x09\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\" +\n\t\"\\x03\\x09\\x1a\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\" +\n\t\"\\x08\\x02*\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\" +\n\t\"\\x070\\x0c\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x06\" +\n\t\"71\\x03\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \" +\n\t\"\\x1d\\x03\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 31598 bytes (30.86 KiB). Checksum: d3118eda0d6b5360.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 133:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 133\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 135 blocks, 8640 entries, 17280 bytes\n// The third block is the zero block.\nvar idnaValues = [8640]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x0012, 0xe9: 0x0018,\n\t0xea: 0x0019, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x0022,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0029, 0xf3: 0x0031, 0xf4: 0x003a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x0042, 0xf9: 0x0049, 0xfa: 0x0051, 0xfb: 0x0018,\n\t0xfc: 0x0059, 0xfd: 0x0061, 0xfe: 0x0069, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0071, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0079,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0079, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x0081, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x0089,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x0091, 0x1c5: 0x0091,\n\t0x1c6: 0x0091, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0099, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x00a1, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x00d2, 0x259: 0x00da, 0x25a: 0x00e2, 0x25b: 0x00ea, 0x25c: 0x00f2, 0x25d: 0x00fa,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0101, 0x262: 0x0089, 0x263: 0x0109,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0111, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x011a, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x0122, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x003a, 0x2c5: 0x012a,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0818,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0139,\n\t0x4b6: 0x0141, 0x4b7: 0x0149, 0x4b8: 0x0151, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08,\n\t0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08,\n\t0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08,\n\t0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0c08, 0x557: 0x0c08,\n\t0x558: 0x0c08, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040,\n\t0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08,\n\t0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08,\n\t0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040,\n\t0x570: 0x0c08, 0x571: 0x0c08, 0x572: 0x0c08, 0x573: 0x0c08, 0x574: 0x0c08, 0x575: 0x0c08,\n\t0x576: 0x0c08, 0x577: 0x0c08, 0x578: 0x0c08, 0x579: 0x0c08, 0x57a: 0x0c08, 0x57b: 0x0c08,\n\t0x57c: 0x0c08, 0x57d: 0x0c08, 0x57e: 0x0c08, 0x57f: 0x0c08,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x0c08, 0x581: 0x0c08, 0x582: 0x0c08, 0x583: 0x0808, 0x584: 0x0808, 0x585: 0x0808,\n\t0x586: 0x0a08, 0x587: 0x0808, 0x588: 0x0818, 0x589: 0x0a08, 0x58a: 0x0a08, 0x58b: 0x0a08,\n\t0x58c: 0x0a08, 0x58d: 0x0a08, 0x58e: 0x0c08, 0x58f: 0x0040, 0x590: 0x0840, 0x591: 0x0840,\n\t0x592: 0x0040, 0x593: 0x0040, 0x594: 0x0040, 0x595: 0x0040, 0x596: 0x0040, 0x597: 0x0040,\n\t0x598: 0x3308, 0x599: 0x3308, 0x59a: 0x3308, 0x59b: 0x3308, 0x59c: 0x3308, 0x59d: 0x3308,\n\t0x59e: 0x3308, 0x59f: 0x3308, 0x5a0: 0x0a08, 0x5a1: 0x0a08, 0x5a2: 0x0a08, 0x5a3: 0x0a08,\n\t0x5a4: 0x0a08, 0x5a5: 0x0a08, 0x5a6: 0x0a08, 0x5a7: 0x0a08, 0x5a8: 0x0a08, 0x5a9: 0x0a08,\n\t0x5aa: 0x0c08, 0x5ab: 0x0c08, 0x5ac: 0x0c08, 0x5ad: 0x0808, 0x5ae: 0x0c08, 0x5af: 0x0a08,\n\t0x5b0: 0x0a08, 0x5b1: 0x0c08, 0x5b2: 0x0c08, 0x5b3: 0x0a08, 0x5b4: 0x0a08, 0x5b5: 0x0a08,\n\t0x5b6: 0x0a08, 0x5b7: 0x0a08, 0x5b8: 0x0a08, 0x5b9: 0x0c08, 0x5ba: 0x0a08, 0x5bb: 0x0a08,\n\t0x5bc: 0x0a08, 0x5bd: 0x0a08, 0x5be: 0x0a08, 0x5bf: 0x0a08,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x3008, 0x5c1: 0x3308, 0x5c2: 0x3308, 0x5c3: 0x3308, 0x5c4: 0x3308, 0x5c5: 0x3308,\n\t0x5c6: 0x3308, 0x5c7: 0x3308, 0x5c8: 0x3308, 0x5c9: 0x3008, 0x5ca: 0x3008, 0x5cb: 0x3008,\n\t0x5cc: 0x3008, 0x5cd: 0x3b08, 0x5ce: 0x3008, 0x5cf: 0x3008, 0x5d0: 0x0008, 0x5d1: 0x3308,\n\t0x5d2: 0x3308, 0x5d3: 0x3308, 0x5d4: 0x3308, 0x5d5: 0x3308, 0x5d6: 0x3308, 0x5d7: 0x3308,\n\t0x5d8: 0x0159, 0x5d9: 0x0161, 0x5da: 0x0169, 0x5db: 0x0171, 0x5dc: 0x0179, 0x5dd: 0x0181,\n\t0x5de: 0x0189, 0x5df: 0x0191, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x3308, 0x5e3: 0x3308,\n\t0x5e4: 0x0018, 0x5e5: 0x0018, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0008,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0018, 0x5f1: 0x0008, 0x5f2: 0x0008, 0x5f3: 0x0008, 0x5f4: 0x0008, 0x5f5: 0x0008,\n\t0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0008, 0x5fb: 0x0008,\n\t0x5fc: 0x0008, 0x5fd: 0x0008, 0x5fe: 0x0008, 0x5ff: 0x0008,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x0008, 0x601: 0x3308, 0x602: 0x3008, 0x603: 0x3008, 0x604: 0x0040, 0x605: 0x0008,\n\t0x606: 0x0008, 0x607: 0x0008, 0x608: 0x0008, 0x609: 0x0008, 0x60a: 0x0008, 0x60b: 0x0008,\n\t0x60c: 0x0008, 0x60d: 0x0040, 0x60e: 0x0040, 0x60f: 0x0008, 0x610: 0x0008, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0008, 0x614: 0x0008, 0x615: 0x0008, 0x616: 0x0008, 0x617: 0x0008,\n\t0x618: 0x0008, 0x619: 0x0008, 0x61a: 0x0008, 0x61b: 0x0008, 0x61c: 0x0008, 0x61d: 0x0008,\n\t0x61e: 0x0008, 0x61f: 0x0008, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x0008, 0x623: 0x0008,\n\t0x624: 0x0008, 0x625: 0x0008, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0040,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0040, 0x632: 0x0008, 0x633: 0x0040, 0x634: 0x0040, 0x635: 0x0040,\n\t0x636: 0x0008, 0x637: 0x0008, 0x638: 0x0008, 0x639: 0x0008, 0x63a: 0x0040, 0x63b: 0x0040,\n\t0x63c: 0x3308, 0x63d: 0x0008, 0x63e: 0x3008, 0x63f: 0x3008,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x3008, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3308, 0x644: 0x3308, 0x645: 0x0040,\n\t0x646: 0x0040, 0x647: 0x3008, 0x648: 0x3008, 0x649: 0x0040, 0x64a: 0x0040, 0x64b: 0x3008,\n\t0x64c: 0x3008, 0x64d: 0x3b08, 0x64e: 0x0008, 0x64f: 0x0040, 0x650: 0x0040, 0x651: 0x0040,\n\t0x652: 0x0040, 0x653: 0x0040, 0x654: 0x0040, 0x655: 0x0040, 0x656: 0x0040, 0x657: 0x3008,\n\t0x658: 0x0040, 0x659: 0x0040, 0x65a: 0x0040, 0x65b: 0x0040, 0x65c: 0x0199, 0x65d: 0x01a1,\n\t0x65e: 0x0040, 0x65f: 0x01a9, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x3308, 0x663: 0x3308,\n\t0x664: 0x0040, 0x665: 0x0040, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0008,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x0008, 0x671: 0x0008, 0x672: 0x0018, 0x673: 0x0018, 0x674: 0x0018, 0x675: 0x0018,\n\t0x676: 0x0018, 0x677: 0x0018, 0x678: 0x0018, 0x679: 0x0018, 0x67a: 0x0018, 0x67b: 0x0018,\n\t0x67c: 0x0008, 0x67d: 0x0018, 0x67e: 0x3308, 0x67f: 0x0040,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x0040, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x3008, 0x684: 0x0040, 0x685: 0x0008,\n\t0x686: 0x0008, 0x687: 0x0008, 0x688: 0x0008, 0x689: 0x0008, 0x68a: 0x0008, 0x68b: 0x0040,\n\t0x68c: 0x0040, 0x68d: 0x0040, 0x68e: 0x0040, 0x68f: 0x0008, 0x690: 0x0008, 0x691: 0x0040,\n\t0x692: 0x0040, 0x693: 0x0008, 0x694: 0x0008, 0x695: 0x0008, 0x696: 0x0008, 0x697: 0x0008,\n\t0x698: 0x0008, 0x699: 0x0008, 0x69a: 0x0008, 0x69b: 0x0008, 0x69c: 0x0008, 0x69d: 0x0008,\n\t0x69e: 0x0008, 0x69f: 0x0008, 0x6a0: 0x0008, 0x6a1: 0x0008, 0x6a2: 0x0008, 0x6a3: 0x0008,\n\t0x6a4: 0x0008, 0x6a5: 0x0008, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0040,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x0008, 0x6b1: 0x0040, 0x6b2: 0x0008, 0x6b3: 0x01b1, 0x6b4: 0x0040, 0x6b5: 0x0008,\n\t0x6b6: 0x01b9, 0x6b7: 0x0040, 0x6b8: 0x0008, 0x6b9: 0x0008, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x3308, 0x6bd: 0x0040, 0x6be: 0x3008, 0x6bf: 0x3008,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3008, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x0040, 0x6c4: 0x0040, 0x6c5: 0x0040,\n\t0x6c6: 0x0040, 0x6c7: 0x3308, 0x6c8: 0x3308, 0x6c9: 0x0040, 0x6ca: 0x0040, 0x6cb: 0x3308,\n\t0x6cc: 0x3308, 0x6cd: 0x3b08, 0x6ce: 0x0040, 0x6cf: 0x0040, 0x6d0: 0x0040, 0x6d1: 0x3308,\n\t0x6d2: 0x0040, 0x6d3: 0x0040, 0x6d4: 0x0040, 0x6d5: 0x0040, 0x6d6: 0x0040, 0x6d7: 0x0040,\n\t0x6d8: 0x0040, 0x6d9: 0x01c1, 0x6da: 0x01c9, 0x6db: 0x01d1, 0x6dc: 0x0008, 0x6dd: 0x0040,\n\t0x6de: 0x01d9, 0x6df: 0x0040, 0x6e0: 0x0040, 0x6e1: 0x0040, 0x6e2: 0x0040, 0x6e3: 0x0040,\n\t0x6e4: 0x0040, 0x6e5: 0x0040, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0008,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x3308, 0x6f1: 0x3308, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0008, 0x6f5: 0x3308,\n\t0x6f6: 0x0018, 0x6f7: 0x0040, 0x6f8: 0x0040, 0x6f9: 0x0040, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x0040, 0x6fd: 0x0040, 0x6fe: 0x0040, 0x6ff: 0x0040,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x0040, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3008, 0x704: 0x0040, 0x705: 0x0008,\n\t0x706: 0x0008, 0x707: 0x0008, 0x708: 0x0008, 0x709: 0x0008, 0x70a: 0x0008, 0x70b: 0x0008,\n\t0x70c: 0x0008, 0x70d: 0x0008, 0x70e: 0x0040, 0x70f: 0x0008, 0x710: 0x0008, 0x711: 0x0008,\n\t0x712: 0x0040, 0x713: 0x0008, 0x714: 0x0008, 0x715: 0x0008, 0x716: 0x0008, 0x717: 0x0008,\n\t0x718: 0x0008, 0x719: 0x0008, 0x71a: 0x0008, 0x71b: 0x0008, 0x71c: 0x0008, 0x71d: 0x0008,\n\t0x71e: 0x0008, 0x71f: 0x0008, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x0008, 0x723: 0x0008,\n\t0x724: 0x0008, 0x725: 0x0008, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0040,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0008, 0x731: 0x0040, 0x732: 0x0008, 0x733: 0x0008, 0x734: 0x0040, 0x735: 0x0008,\n\t0x736: 0x0008, 0x737: 0x0008, 0x738: 0x0008, 0x739: 0x0008, 0x73a: 0x0040, 0x73b: 0x0040,\n\t0x73c: 0x3308, 0x73d: 0x0008, 0x73e: 0x3008, 0x73f: 0x3008,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x3008, 0x741: 0x3308, 0x742: 0x3308, 0x743: 0x3308, 0x744: 0x3308, 0x745: 0x3308,\n\t0x746: 0x0040, 0x747: 0x3308, 0x748: 0x3308, 0x749: 0x3008, 0x74a: 0x0040, 0x74b: 0x3008,\n\t0x74c: 0x3008, 0x74d: 0x3b08, 0x74e: 0x0040, 0x74f: 0x0040, 0x750: 0x0008, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0040, 0x754: 0x0040, 0x755: 0x0040, 0x756: 0x0040, 0x757: 0x0040,\n\t0x758: 0x0040, 0x759: 0x0040, 0x75a: 0x0040, 0x75b: 0x0040, 0x75c: 0x0040, 0x75d: 0x0040,\n\t0x75e: 0x0040, 0x75f: 0x0040, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x3308, 0x763: 0x3308,\n\t0x764: 0x0040, 0x765: 0x0040, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0008,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0018, 0x771: 0x0018, 0x772: 0x0040, 0x773: 0x0040, 0x774: 0x0040, 0x775: 0x0040,\n\t0x776: 0x0040, 0x777: 0x0040, 0x778: 0x0040, 0x779: 0x0008, 0x77a: 0x3308, 0x77b: 0x3308,\n\t0x77c: 0x3308, 0x77d: 0x3308, 0x77e: 0x3308, 0x77f: 0x3308,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x0040, 0x781: 0x3308, 0x782: 0x3008, 0x783: 0x3008, 0x784: 0x0040, 0x785: 0x0008,\n\t0x786: 0x0008, 0x787: 0x0008, 0x788: 0x0008, 0x789: 0x0008, 0x78a: 0x0008, 0x78b: 0x0008,\n\t0x78c: 0x0008, 0x78d: 0x0040, 0x78e: 0x0040, 0x78f: 0x0008, 0x790: 0x0008, 0x791: 0x0040,\n\t0x792: 0x0040, 0x793: 0x0008, 0x794: 0x0008, 0x795: 0x0008, 0x796: 0x0008, 0x797: 0x0008,\n\t0x798: 0x0008, 0x799: 0x0008, 0x79a: 0x0008, 0x79b: 0x0008, 0x79c: 0x0008, 0x79d: 0x0008,\n\t0x79e: 0x0008, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x0008, 0x7a3: 0x0008,\n\t0x7a4: 0x0008, 0x7a5: 0x0008, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0040,\n\t0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0008, 0x7b1: 0x0040, 0x7b2: 0x0008, 0x7b3: 0x0008, 0x7b4: 0x0040, 0x7b5: 0x0008,\n\t0x7b6: 0x0008, 0x7b7: 0x0008, 0x7b8: 0x0008, 0x7b9: 0x0008, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x3308, 0x7bd: 0x0008, 0x7be: 0x3008, 0x7bf: 0x3308,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x3008, 0x7c1: 0x3308, 0x7c2: 0x3308, 0x7c3: 0x3308, 0x7c4: 0x3308, 0x7c5: 0x0040,\n\t0x7c6: 0x0040, 0x7c7: 0x3008, 0x7c8: 0x3008, 0x7c9: 0x0040, 0x7ca: 0x0040, 0x7cb: 0x3008,\n\t0x7cc: 0x3008, 0x7cd: 0x3b08, 0x7ce: 0x0040, 0x7cf: 0x0040, 0x7d0: 0x0040, 0x7d1: 0x0040,\n\t0x7d2: 0x0040, 0x7d3: 0x0040, 0x7d4: 0x0040, 0x7d5: 0x3308, 0x7d6: 0x3308, 0x7d7: 0x3008,\n\t0x7d8: 0x0040, 0x7d9: 0x0040, 0x7da: 0x0040, 0x7db: 0x0040, 0x7dc: 0x01e1, 0x7dd: 0x01e9,\n\t0x7de: 0x0040, 0x7df: 0x0008, 0x7e0: 0x0008, 0x7e1: 0x0008, 0x7e2: 0x3308, 0x7e3: 0x3308,\n\t0x7e4: 0x0040, 0x7e5: 0x0040, 0x7e6: 0x0008, 0x7e7: 0x0008, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0008, 0x7ec: 0x0008, 0x7ed: 0x0008, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0018, 0x7f1: 0x0008, 0x7f2: 0x0018, 0x7f3: 0x0018, 0x7f4: 0x0018, 0x7f5: 0x0018,\n\t0x7f6: 0x0018, 0x7f7: 0x0018, 0x7f8: 0x0040, 0x7f9: 0x0040, 0x7fa: 0x0040, 0x7fb: 0x0040,\n\t0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x0040, 0x7ff: 0x0040,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0040, 0x801: 0x0040, 0x802: 0x3308, 0x803: 0x0008, 0x804: 0x0040, 0x805: 0x0008,\n\t0x806: 0x0008, 0x807: 0x0008, 0x808: 0x0008, 0x809: 0x0008, 0x80a: 0x0008, 0x80b: 0x0040,\n\t0x80c: 0x0040, 0x80d: 0x0040, 0x80e: 0x0008, 0x80f: 0x0008, 0x810: 0x0008, 0x811: 0x0040,\n\t0x812: 0x0008, 0x813: 0x0008, 0x814: 0x0008, 0x815: 0x0008, 0x816: 0x0040, 0x817: 0x0040,\n\t0x818: 0x0040, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0008, 0x81d: 0x0040,\n\t0x81e: 0x0008, 0x81f: 0x0008, 0x820: 0x0040, 0x821: 0x0040, 0x822: 0x0040, 0x823: 0x0008,\n\t0x824: 0x0008, 0x825: 0x0040, 0x826: 0x0040, 0x827: 0x0040, 0x828: 0x0008, 0x829: 0x0008,\n\t0x82a: 0x0008, 0x82b: 0x0040, 0x82c: 0x0040, 0x82d: 0x0040, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0008, 0x831: 0x0008, 0x832: 0x0008, 0x833: 0x0008, 0x834: 0x0008, 0x835: 0x0008,\n\t0x836: 0x0008, 0x837: 0x0008, 0x838: 0x0008, 0x839: 0x0008, 0x83a: 0x0040, 0x83b: 0x0040,\n\t0x83c: 0x0040, 0x83d: 0x0040, 0x83e: 0x3008, 0x83f: 0x3008,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x3308, 0x841: 0x3008, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x3008, 0x845: 0x0040,\n\t0x846: 0x3308, 0x847: 0x3308, 0x848: 0x3308, 0x849: 0x0040, 0x84a: 0x3308, 0x84b: 0x3308,\n\t0x84c: 0x3308, 0x84d: 0x3b08, 0x84e: 0x0040, 0x84f: 0x0040, 0x850: 0x0040, 0x851: 0x0040,\n\t0x852: 0x0040, 0x853: 0x0040, 0x854: 0x0040, 0x855: 0x3308, 0x856: 0x3308, 0x857: 0x0040,\n\t0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0040, 0x85c: 0x0040, 0x85d: 0x0008,\n\t0x85e: 0x0040, 0x85f: 0x0040, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x3308, 0x863: 0x3308,\n\t0x864: 0x0040, 0x865: 0x0040, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0008,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0040, 0x871: 0x0040, 0x872: 0x0040, 0x873: 0x0040, 0x874: 0x0040, 0x875: 0x0040,\n\t0x876: 0x0040, 0x877: 0x0018, 0x878: 0x0018, 0x879: 0x0018, 0x87a: 0x0018, 0x87b: 0x0018,\n\t0x87c: 0x0018, 0x87d: 0x0018, 0x87e: 0x0018, 0x87f: 0x0018,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0008, 0x881: 0x3308, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x0018, 0x885: 0x0008,\n\t0x886: 0x0008, 0x887: 0x0008, 0x888: 0x0008, 0x889: 0x0008, 0x88a: 0x0008, 0x88b: 0x0008,\n\t0x88c: 0x0008, 0x88d: 0x0040, 0x88e: 0x0008, 0x88f: 0x0008, 0x890: 0x0008, 0x891: 0x0040,\n\t0x892: 0x0008, 0x893: 0x0008, 0x894: 0x0008, 0x895: 0x0008, 0x896: 0x0008, 0x897: 0x0008,\n\t0x898: 0x0008, 0x899: 0x0008, 0x89a: 0x0008, 0x89b: 0x0008, 0x89c: 0x0008, 0x89d: 0x0008,\n\t0x89e: 0x0008, 0x89f: 0x0008, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x0008, 0x8a3: 0x0008,\n\t0x8a4: 0x0008, 0x8a5: 0x0008, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0040,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0008, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0008, 0x8b4: 0x0040, 0x8b5: 0x0008,\n\t0x8b6: 0x0008, 0x8b7: 0x0008, 0x8b8: 0x0008, 0x8b9: 0x0008, 0x8ba: 0x0040, 0x8bb: 0x0040,\n\t0x8bc: 0x3308, 0x8bd: 0x0008, 0x8be: 0x3008, 0x8bf: 0x3308,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x3008, 0x8c1: 0x3008, 0x8c2: 0x3008, 0x8c3: 0x3008, 0x8c4: 0x3008, 0x8c5: 0x0040,\n\t0x8c6: 0x3308, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008,\n\t0x8cc: 0x3308, 0x8cd: 0x3b08, 0x8ce: 0x0040, 0x8cf: 0x0040, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0040, 0x8d5: 0x3008, 0x8d6: 0x3008, 0x8d7: 0x0040,\n\t0x8d8: 0x0040, 0x8d9: 0x0040, 0x8da: 0x0040, 0x8db: 0x0040, 0x8dc: 0x0040, 0x8dd: 0x0008,\n\t0x8de: 0x0008, 0x8df: 0x0040, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308,\n\t0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0040, 0x8f1: 0x0008, 0x8f2: 0x0008, 0x8f3: 0x3008, 0x8f4: 0x0040, 0x8f5: 0x0040,\n\t0x8f6: 0x0040, 0x8f7: 0x0040, 0x8f8: 0x0040, 0x8f9: 0x0040, 0x8fa: 0x0040, 0x8fb: 0x0040,\n\t0x8fc: 0x0040, 0x8fd: 0x0040, 0x8fe: 0x0040, 0x8ff: 0x0040,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x3008, 0x901: 0x3308, 0x902: 0x3308, 0x903: 0x3308, 0x904: 0x3308, 0x905: 0x0040,\n\t0x906: 0x3008, 0x907: 0x3008, 0x908: 0x3008, 0x909: 0x0040, 0x90a: 0x3008, 0x90b: 0x3008,\n\t0x90c: 0x3008, 0x90d: 0x3b08, 0x90e: 0x0008, 0x90f: 0x0018, 0x910: 0x0040, 0x911: 0x0040,\n\t0x912: 0x0040, 0x913: 0x0040, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x3008,\n\t0x918: 0x0018, 0x919: 0x0018, 0x91a: 0x0018, 0x91b: 0x0018, 0x91c: 0x0018, 0x91d: 0x0018,\n\t0x91e: 0x0018, 0x91f: 0x0008, 0x920: 0x0008, 0x921: 0x0008, 0x922: 0x3308, 0x923: 0x3308,\n\t0x924: 0x0040, 0x925: 0x0040, 0x926: 0x0008, 0x927: 0x0008, 0x928: 0x0008, 0x929: 0x0008,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0008, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008,\n\t0x930: 0x0018, 0x931: 0x0018, 0x932: 0x0018, 0x933: 0x0018, 0x934: 0x0018, 0x935: 0x0018,\n\t0x936: 0x0018, 0x937: 0x0018, 0x938: 0x0018, 0x939: 0x0018, 0x93a: 0x0008, 0x93b: 0x0008,\n\t0x93c: 0x0008, 0x93d: 0x0008, 0x93e: 0x0008, 0x93f: 0x0008,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0040, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x0040, 0x944: 0x0008, 0x945: 0x0040,\n\t0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0008, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0040,\n\t0x94c: 0x0008, 0x94d: 0x0008, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008,\n\t0x952: 0x0008, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0008,\n\t0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0008, 0x95d: 0x0008,\n\t0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008,\n\t0x964: 0x0040, 0x965: 0x0008, 0x966: 0x0040, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0008,\n\t0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0008, 0x96e: 0x0008, 0x96f: 0x0008,\n\t0x970: 0x0008, 0x971: 0x3308, 0x972: 0x0008, 0x973: 0x01f9, 0x974: 0x3308, 0x975: 0x3308,\n\t0x976: 0x3308, 0x977: 0x3308, 0x978: 0x3308, 0x979: 0x3308, 0x97a: 0x3b08, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x0008, 0x97e: 0x0040, 0x97f: 0x0040,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x0008, 0x981: 0x0008, 0x982: 0x0008, 0x983: 0x0211, 0x984: 0x0008, 0x985: 0x0008,\n\t0x986: 0x0008, 0x987: 0x0008, 0x988: 0x0040, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x0219, 0x98e: 0x0008, 0x98f: 0x0008, 0x990: 0x0008, 0x991: 0x0008,\n\t0x992: 0x0221, 0x993: 0x0008, 0x994: 0x0008, 0x995: 0x0008, 0x996: 0x0008, 0x997: 0x0229,\n\t0x998: 0x0008, 0x999: 0x0008, 0x99a: 0x0008, 0x99b: 0x0008, 0x99c: 0x0231, 0x99d: 0x0008,\n\t0x99e: 0x0008, 0x99f: 0x0008, 0x9a0: 0x0008, 0x9a1: 0x0008, 0x9a2: 0x0008, 0x9a3: 0x0008,\n\t0x9a4: 0x0008, 0x9a5: 0x0008, 0x9a6: 0x0008, 0x9a7: 0x0008, 0x9a8: 0x0008, 0x9a9: 0x0239,\n\t0x9aa: 0x0008, 0x9ab: 0x0008, 0x9ac: 0x0008, 0x9ad: 0x0040, 0x9ae: 0x0040, 0x9af: 0x0040,\n\t0x9b0: 0x0040, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x0241, 0x9b4: 0x3308, 0x9b5: 0x0249,\n\t0x9b6: 0x0251, 0x9b7: 0x0259, 0x9b8: 0x0261, 0x9b9: 0x0269, 0x9ba: 0x3308, 0x9bb: 0x3308,\n\t0x9bc: 0x3308, 0x9bd: 0x3308, 0x9be: 0x3308, 0x9bf: 0x3008,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x3308, 0x9c1: 0x0271, 0x9c2: 0x3308, 0x9c3: 0x3308, 0x9c4: 0x3b08, 0x9c5: 0x0018,\n\t0x9c6: 0x3308, 0x9c7: 0x3308, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008,\n\t0x9cc: 0x0008, 0x9cd: 0x3308, 0x9ce: 0x3308, 0x9cf: 0x3308, 0x9d0: 0x3308, 0x9d1: 0x3308,\n\t0x9d2: 0x3308, 0x9d3: 0x0279, 0x9d4: 0x3308, 0x9d5: 0x3308, 0x9d6: 0x3308, 0x9d7: 0x3308,\n\t0x9d8: 0x0040, 0x9d9: 0x3308, 0x9da: 0x3308, 0x9db: 0x3308, 0x9dc: 0x3308, 0x9dd: 0x0281,\n\t0x9de: 0x3308, 0x9df: 0x3308, 0x9e0: 0x3308, 0x9e1: 0x3308, 0x9e2: 0x0289, 0x9e3: 0x3308,\n\t0x9e4: 0x3308, 0x9e5: 0x3308, 0x9e6: 0x3308, 0x9e7: 0x0291, 0x9e8: 0x3308, 0x9e9: 0x3308,\n\t0x9ea: 0x3308, 0x9eb: 0x3308, 0x9ec: 0x0299, 0x9ed: 0x3308, 0x9ee: 0x3308, 0x9ef: 0x3308,\n\t0x9f0: 0x3308, 0x9f1: 0x3308, 0x9f2: 0x3308, 0x9f3: 0x3308, 0x9f4: 0x3308, 0x9f5: 0x3308,\n\t0x9f6: 0x3308, 0x9f7: 0x3308, 0x9f8: 0x3308, 0x9f9: 0x02a1, 0x9fa: 0x3308, 0x9fb: 0x3308,\n\t0x9fc: 0x3308, 0x9fd: 0x0040, 0x9fe: 0x0018, 0x9ff: 0x0018,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0008, 0xa01: 0x0008, 0xa02: 0x0008, 0xa03: 0x0008, 0xa04: 0x0008, 0xa05: 0x0008,\n\t0xa06: 0x0008, 0xa07: 0x0008, 0xa08: 0x0008, 0xa09: 0x0008, 0xa0a: 0x0008, 0xa0b: 0x0008,\n\t0xa0c: 0x0008, 0xa0d: 0x0008, 0xa0e: 0x0008, 0xa0f: 0x0008, 0xa10: 0x0008, 0xa11: 0x0008,\n\t0xa12: 0x0008, 0xa13: 0x0008, 0xa14: 0x0008, 0xa15: 0x0008, 0xa16: 0x0008, 0xa17: 0x0008,\n\t0xa18: 0x0008, 0xa19: 0x0008, 0xa1a: 0x0008, 0xa1b: 0x0008, 0xa1c: 0x0008, 0xa1d: 0x0008,\n\t0xa1e: 0x0008, 0xa1f: 0x0008, 0xa20: 0x0008, 0xa21: 0x0008, 0xa22: 0x0008, 0xa23: 0x0008,\n\t0xa24: 0x0008, 0xa25: 0x0008, 0xa26: 0x0008, 0xa27: 0x0008, 0xa28: 0x0008, 0xa29: 0x0008,\n\t0xa2a: 0x0008, 0xa2b: 0x0008, 0xa2c: 0x0019, 0xa2d: 0x02e1, 0xa2e: 0x02e9, 0xa2f: 0x0008,\n\t0xa30: 0x02f1, 0xa31: 0x02f9, 0xa32: 0x0301, 0xa33: 0x0309, 0xa34: 0x00a9, 0xa35: 0x0311,\n\t0xa36: 0x00b1, 0xa37: 0x0319, 0xa38: 0x0101, 0xa39: 0x0321, 0xa3a: 0x0329, 0xa3b: 0x0008,\n\t0xa3c: 0x0051, 0xa3d: 0x0331, 0xa3e: 0x0339, 0xa3f: 0x00b9,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0341, 0xa41: 0x0349, 0xa42: 0x00c1, 0xa43: 0x0019, 0xa44: 0x0351, 0xa45: 0x0359,\n\t0xa46: 0x05b5, 0xa47: 0x02e9, 0xa48: 0x02f1, 0xa49: 0x02f9, 0xa4a: 0x0361, 0xa4b: 0x0369,\n\t0xa4c: 0x0371, 0xa4d: 0x0309, 0xa4e: 0x0008, 0xa4f: 0x0319, 0xa50: 0x0321, 0xa51: 0x0379,\n\t0xa52: 0x0051, 0xa53: 0x0381, 0xa54: 0x05cd, 0xa55: 0x05cd, 0xa56: 0x0339, 0xa57: 0x0341,\n\t0xa58: 0x0349, 0xa59: 0x05b5, 0xa5a: 0x0389, 0xa5b: 0x0391, 0xa5c: 0x05e5, 0xa5d: 0x0399,\n\t0xa5e: 0x03a1, 0xa5f: 0x03a9, 0xa60: 0x03b1, 0xa61: 0x03b9, 0xa62: 0x0311, 0xa63: 0x00b9,\n\t0xa64: 0x0349, 0xa65: 0x0391, 0xa66: 0x0399, 0xa67: 0x03a1, 0xa68: 0x03c1, 0xa69: 0x03b1,\n\t0xa6a: 0x03b9, 0xa6b: 0x0008, 0xa6c: 0x0008, 0xa6d: 0x0008, 0xa6e: 0x0008, 0xa6f: 0x0008,\n\t0xa70: 0x0008, 0xa71: 0x0008, 0xa72: 0x0008, 0xa73: 0x0008, 0xa74: 0x0008, 0xa75: 0x0008,\n\t0xa76: 0x0008, 0xa77: 0x0008, 0xa78: 0x03c9, 0xa79: 0x0008, 0xa7a: 0x0008, 0xa7b: 0x0008,\n\t0xa7c: 0x0008, 0xa7d: 0x0008, 0xa7e: 0x0008, 0xa7f: 0x0008,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0x0008, 0xa81: 0x0008, 0xa82: 0x0008, 0xa83: 0x0008, 0xa84: 0x0008, 0xa85: 0x0008,\n\t0xa86: 0x0008, 0xa87: 0x0008, 0xa88: 0x0008, 0xa89: 0x0008, 0xa8a: 0x0008, 0xa8b: 0x0008,\n\t0xa8c: 0x0008, 0xa8d: 0x0008, 0xa8e: 0x0008, 0xa8f: 0x0008, 0xa90: 0x0008, 0xa91: 0x0008,\n\t0xa92: 0x0008, 0xa93: 0x0008, 0xa94: 0x0008, 0xa95: 0x0008, 0xa96: 0x0008, 0xa97: 0x0008,\n\t0xa98: 0x0008, 0xa99: 0x0008, 0xa9a: 0x0008, 0xa9b: 0x03d1, 0xa9c: 0x03d9, 0xa9d: 0x03e1,\n\t0xa9e: 0x03e9, 0xa9f: 0x0371, 0xaa0: 0x03f1, 0xaa1: 0x03f9, 0xaa2: 0x0401, 0xaa3: 0x0409,\n\t0xaa4: 0x0411, 0xaa5: 0x0419, 0xaa6: 0x0421, 0xaa7: 0x05fd, 0xaa8: 0x0429, 0xaa9: 0x0431,\n\t0xaaa: 0xe17d, 0xaab: 0x0439, 0xaac: 0x0441, 0xaad: 0x0449, 0xaae: 0x0451, 0xaaf: 0x0459,\n\t0xab0: 0x0461, 0xab1: 0x0469, 0xab2: 0x0471, 0xab3: 0x0479, 0xab4: 0x0481, 0xab5: 0x0489,\n\t0xab6: 0x0491, 0xab7: 0x0499, 0xab8: 0x0615, 0xab9: 0x04a1, 0xaba: 0x04a9, 0xabb: 0x04b1,\n\t0xabc: 0x04b9, 0xabd: 0x04c1, 0xabe: 0x04c9, 0xabf: 0x04d1,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008,\n\t0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008,\n\t0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008,\n\t0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0xe00d, 0xad7: 0x0008,\n\t0xad8: 0xe00d, 0xad9: 0x0008, 0xada: 0xe00d, 0xadb: 0x0008, 0xadc: 0xe00d, 0xadd: 0x0008,\n\t0xade: 0xe00d, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008,\n\t0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008,\n\t0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008,\n\t0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008,\n\t0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008,\n\t0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0xe00d, 0xb01: 0x0008, 0xb02: 0xe00d, 0xb03: 0x0008, 0xb04: 0xe00d, 0xb05: 0x0008,\n\t0xb06: 0xe00d, 0xb07: 0x0008, 0xb08: 0xe00d, 0xb09: 0x0008, 0xb0a: 0xe00d, 0xb0b: 0x0008,\n\t0xb0c: 0xe00d, 0xb0d: 0x0008, 0xb0e: 0xe00d, 0xb0f: 0x0008, 0xb10: 0xe00d, 0xb11: 0x0008,\n\t0xb12: 0xe00d, 0xb13: 0x0008, 0xb14: 0xe00d, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008,\n\t0xb18: 0x0008, 0xb19: 0x0008, 0xb1a: 0x062d, 0xb1b: 0x064d, 0xb1c: 0x0008, 0xb1d: 0x0008,\n\t0xb1e: 0x04d9, 0xb1f: 0x0008, 0xb20: 0xe00d, 0xb21: 0x0008, 0xb22: 0xe00d, 0xb23: 0x0008,\n\t0xb24: 0xe00d, 0xb25: 0x0008, 0xb26: 0xe00d, 0xb27: 0x0008, 0xb28: 0xe00d, 0xb29: 0x0008,\n\t0xb2a: 0xe00d, 0xb2b: 0x0008, 0xb2c: 0xe00d, 0xb2d: 0x0008, 0xb2e: 0xe00d, 0xb2f: 0x0008,\n\t0xb30: 0xe00d, 0xb31: 0x0008, 0xb32: 0xe00d, 0xb33: 0x0008, 0xb34: 0xe00d, 0xb35: 0x0008,\n\t0xb36: 0xe00d, 0xb37: 0x0008, 0xb38: 0xe00d, 0xb39: 0x0008, 0xb3a: 0xe00d, 0xb3b: 0x0008,\n\t0xb3c: 0xe00d, 0xb3d: 0x0008, 0xb3e: 0xe00d, 0xb3f: 0x0008,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x0008, 0xb41: 0x0008, 0xb42: 0x0008, 0xb43: 0x0008, 0xb44: 0x0008, 0xb45: 0x0008,\n\t0xb46: 0x0040, 0xb47: 0x0040, 0xb48: 0xe045, 0xb49: 0xe045, 0xb4a: 0xe045, 0xb4b: 0xe045,\n\t0xb4c: 0xe045, 0xb4d: 0xe045, 0xb4e: 0x0040, 0xb4f: 0x0040, 0xb50: 0x0008, 0xb51: 0x0008,\n\t0xb52: 0x0008, 0xb53: 0x0008, 0xb54: 0x0008, 0xb55: 0x0008, 0xb56: 0x0008, 0xb57: 0x0008,\n\t0xb58: 0x0040, 0xb59: 0xe045, 0xb5a: 0x0040, 0xb5b: 0xe045, 0xb5c: 0x0040, 0xb5d: 0xe045,\n\t0xb5e: 0x0040, 0xb5f: 0xe045, 0xb60: 0x0008, 0xb61: 0x0008, 0xb62: 0x0008, 0xb63: 0x0008,\n\t0xb64: 0x0008, 0xb65: 0x0008, 0xb66: 0x0008, 0xb67: 0x0008, 0xb68: 0xe045, 0xb69: 0xe045,\n\t0xb6a: 0xe045, 0xb6b: 0xe045, 0xb6c: 0xe045, 0xb6d: 0xe045, 0xb6e: 0xe045, 0xb6f: 0xe045,\n\t0xb70: 0x0008, 0xb71: 0x04e1, 0xb72: 0x0008, 0xb73: 0x04e9, 0xb74: 0x0008, 0xb75: 0x04f1,\n\t0xb76: 0x0008, 0xb77: 0x04f9, 0xb78: 0x0008, 0xb79: 0x0501, 0xb7a: 0x0008, 0xb7b: 0x0509,\n\t0xb7c: 0x0008, 0xb7d: 0x0511, 0xb7e: 0x0040, 0xb7f: 0x0040,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x0519, 0xb81: 0x0521, 0xb82: 0x0529, 0xb83: 0x0531, 0xb84: 0x0539, 0xb85: 0x0541,\n\t0xb86: 0x0549, 0xb87: 0x0551, 0xb88: 0x0519, 0xb89: 0x0521, 0xb8a: 0x0529, 0xb8b: 0x0531,\n\t0xb8c: 0x0539, 0xb8d: 0x0541, 0xb8e: 0x0549, 0xb8f: 0x0551, 0xb90: 0x0559, 0xb91: 0x0561,\n\t0xb92: 0x0569, 0xb93: 0x0571, 0xb94: 0x0579, 0xb95: 0x0581, 0xb96: 0x0589, 0xb97: 0x0591,\n\t0xb98: 0x0559, 0xb99: 0x0561, 0xb9a: 0x0569, 0xb9b: 0x0571, 0xb9c: 0x0579, 0xb9d: 0x0581,\n\t0xb9e: 0x0589, 0xb9f: 0x0591, 0xba0: 0x0599, 0xba1: 0x05a1, 0xba2: 0x05a9, 0xba3: 0x05b1,\n\t0xba4: 0x05b9, 0xba5: 0x05c1, 0xba6: 0x05c9, 0xba7: 0x05d1, 0xba8: 0x0599, 0xba9: 0x05a1,\n\t0xbaa: 0x05a9, 0xbab: 0x05b1, 0xbac: 0x05b9, 0xbad: 0x05c1, 0xbae: 0x05c9, 0xbaf: 0x05d1,\n\t0xbb0: 0x0008, 0xbb1: 0x0008, 0xbb2: 0x05d9, 0xbb3: 0x05e1, 0xbb4: 0x05e9, 0xbb5: 0x0040,\n\t0xbb6: 0x0008, 0xbb7: 0x05f1, 0xbb8: 0xe045, 0xbb9: 0xe045, 0xbba: 0x0665, 0xbbb: 0x04e1,\n\t0xbbc: 0x05e1, 0xbbd: 0x067e, 0xbbe: 0x05f9, 0xbbf: 0x069e,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x06be, 0xbc1: 0x0602, 0xbc2: 0x0609, 0xbc3: 0x0611, 0xbc4: 0x0619, 0xbc5: 0x0040,\n\t0xbc6: 0x0008, 0xbc7: 0x0621, 0xbc8: 0x06dd, 0xbc9: 0x04e9, 0xbca: 0x06f5, 0xbcb: 0x04f1,\n\t0xbcc: 0x0611, 0xbcd: 0x062a, 0xbce: 0x0632, 0xbcf: 0x063a, 0xbd0: 0x0008, 0xbd1: 0x0008,\n\t0xbd2: 0x0008, 0xbd3: 0x0641, 0xbd4: 0x0040, 0xbd5: 0x0040, 0xbd6: 0x0008, 0xbd7: 0x0008,\n\t0xbd8: 0xe045, 0xbd9: 0xe045, 0xbda: 0x070d, 0xbdb: 0x04f9, 0xbdc: 0x0040, 0xbdd: 0x064a,\n\t0xbde: 0x0652, 0xbdf: 0x065a, 0xbe0: 0x0008, 0xbe1: 0x0008, 0xbe2: 0x0008, 0xbe3: 0x0661,\n\t0xbe4: 0x0008, 0xbe5: 0x0008, 0xbe6: 0x0008, 0xbe7: 0x0008, 0xbe8: 0xe045, 0xbe9: 0xe045,\n\t0xbea: 0x0725, 0xbeb: 0x0509, 0xbec: 0xe04d, 0xbed: 0x066a, 0xbee: 0x012a, 0xbef: 0x0672,\n\t0xbf0: 0x0040, 0xbf1: 0x0040, 0xbf2: 0x0679, 0xbf3: 0x0681, 0xbf4: 0x0689, 0xbf5: 0x0040,\n\t0xbf6: 0x0008, 0xbf7: 0x0691, 0xbf8: 0x073d, 0xbf9: 0x0501, 0xbfa: 0x0515, 0xbfb: 0x0511,\n\t0xbfc: 0x0681, 0xbfd: 0x0756, 0xbfe: 0x0776, 0xbff: 0x0040,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x000a, 0xc01: 0x000a, 0xc02: 0x000a, 0xc03: 0x000a, 0xc04: 0x000a, 0xc05: 0x000a,\n\t0xc06: 0x000a, 0xc07: 0x000a, 0xc08: 0x000a, 0xc09: 0x000a, 0xc0a: 0x000a, 0xc0b: 0x03c0,\n\t0xc0c: 0x0003, 0xc0d: 0x0003, 0xc0e: 0x0340, 0xc0f: 0x0b40, 0xc10: 0x0018, 0xc11: 0xe00d,\n\t0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x0796,\n\t0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018,\n\t0xc1e: 0x0018, 0xc1f: 0x0018, 0xc20: 0x0018, 0xc21: 0x0018, 0xc22: 0x0018, 0xc23: 0x0018,\n\t0xc24: 0x0040, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0018, 0xc28: 0x0040, 0xc29: 0x0040,\n\t0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x000a,\n\t0xc30: 0x0018, 0xc31: 0x0018, 0xc32: 0x0018, 0xc33: 0x0699, 0xc34: 0x06a1, 0xc35: 0x0018,\n\t0xc36: 0x06a9, 0xc37: 0x06b1, 0xc38: 0x0018, 0xc39: 0x0018, 0xc3a: 0x0018, 0xc3b: 0x0018,\n\t0xc3c: 0x06ba, 0xc3d: 0x0018, 0xc3e: 0x07b6, 0xc3f: 0x0018,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x0018, 0xc41: 0x0018, 0xc42: 0x0018, 0xc43: 0x0018, 0xc44: 0x0018, 0xc45: 0x0018,\n\t0xc46: 0x0018, 0xc47: 0x06c2, 0xc48: 0x06ca, 0xc49: 0x06d2, 0xc4a: 0x0018, 0xc4b: 0x0018,\n\t0xc4c: 0x0018, 0xc4d: 0x0018, 0xc4e: 0x0018, 0xc4f: 0x0018, 0xc50: 0x0018, 0xc51: 0x0018,\n\t0xc52: 0x0018, 0xc53: 0x0018, 0xc54: 0x0018, 0xc55: 0x0018, 0xc56: 0x0018, 0xc57: 0x06d9,\n\t0xc58: 0x0018, 0xc59: 0x0018, 0xc5a: 0x0018, 0xc5b: 0x0018, 0xc5c: 0x0018, 0xc5d: 0x0018,\n\t0xc5e: 0x0018, 0xc5f: 0x000a, 0xc60: 0x03c0, 0xc61: 0x0340, 0xc62: 0x0340, 0xc63: 0x0340,\n\t0xc64: 0x03c0, 0xc65: 0x0040, 0xc66: 0x0040, 0xc67: 0x0040, 0xc68: 0x0040, 0xc69: 0x0040,\n\t0xc6a: 0x0340, 0xc6b: 0x0340, 0xc6c: 0x0340, 0xc6d: 0x0340, 0xc6e: 0x0340, 0xc6f: 0x0340,\n\t0xc70: 0x06e1, 0xc71: 0x0311, 0xc72: 0x0040, 0xc73: 0x0040, 0xc74: 0x06e9, 0xc75: 0x06f1,\n\t0xc76: 0x06f9, 0xc77: 0x0701, 0xc78: 0x0709, 0xc79: 0x0711, 0xc7a: 0x071a, 0xc7b: 0x07d5,\n\t0xc7c: 0x0722, 0xc7d: 0x072a, 0xc7e: 0x0732, 0xc7f: 0x0329,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x06e1, 0xc81: 0x0049, 0xc82: 0x0029, 0xc83: 0x0031, 0xc84: 0x06e9, 0xc85: 0x06f1,\n\t0xc86: 0x06f9, 0xc87: 0x0701, 0xc88: 0x0709, 0xc89: 0x0711, 0xc8a: 0x071a, 0xc8b: 0x07ed,\n\t0xc8c: 0x0722, 0xc8d: 0x072a, 0xc8e: 0x0732, 0xc8f: 0x0040, 0xc90: 0x0019, 0xc91: 0x02f9,\n\t0xc92: 0x0051, 0xc93: 0x0109, 0xc94: 0x0361, 0xc95: 0x00a9, 0xc96: 0x0319, 0xc97: 0x0101,\n\t0xc98: 0x0321, 0xc99: 0x0329, 0xc9a: 0x0339, 0xc9b: 0x0089, 0xc9c: 0x0341, 0xc9d: 0x0040,\n\t0xc9e: 0x0040, 0xc9f: 0x0040, 0xca0: 0x0018, 0xca1: 0x0018, 0xca2: 0x0018, 0xca3: 0x0018,\n\t0xca4: 0x0018, 0xca5: 0x0018, 0xca6: 0x0018, 0xca7: 0x0018, 0xca8: 0x0739, 0xca9: 0x0018,\n\t0xcaa: 0x0018, 0xcab: 0x0018, 0xcac: 0x0018, 0xcad: 0x0018, 0xcae: 0x0018, 0xcaf: 0x0018,\n\t0xcb0: 0x0018, 0xcb1: 0x0018, 0xcb2: 0x0018, 0xcb3: 0x0018, 0xcb4: 0x0018, 0xcb5: 0x0018,\n\t0xcb6: 0x0018, 0xcb7: 0x0018, 0xcb8: 0x0018, 0xcb9: 0x0018, 0xcba: 0x0018, 0xcbb: 0x0018,\n\t0xcbc: 0x0018, 0xcbd: 0x0018, 0xcbe: 0x0018, 0xcbf: 0x0018,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x0806, 0xcc1: 0x0826, 0xcc2: 0x03d9, 0xcc3: 0x0845, 0xcc4: 0x0018, 0xcc5: 0x0866,\n\t0xcc6: 0x0886, 0xcc7: 0x0369, 0xcc8: 0x0018, 0xcc9: 0x08a5, 0xcca: 0x0309, 0xccb: 0x00a9,\n\t0xccc: 0x00a9, 0xccd: 0x00a9, 0xcce: 0x00a9, 0xccf: 0x0741, 0xcd0: 0x0311, 0xcd1: 0x0311,\n\t0xcd2: 0x0101, 0xcd3: 0x0101, 0xcd4: 0x0018, 0xcd5: 0x0329, 0xcd6: 0x0749, 0xcd7: 0x0018,\n\t0xcd8: 0x0018, 0xcd9: 0x0339, 0xcda: 0x0751, 0xcdb: 0x00b9, 0xcdc: 0x00b9, 0xcdd: 0x00b9,\n\t0xcde: 0x0018, 0xcdf: 0x0018, 0xce0: 0x0759, 0xce1: 0x08c5, 0xce2: 0x0761, 0xce3: 0x0018,\n\t0xce4: 0x04b1, 0xce5: 0x0018, 0xce6: 0x0769, 0xce7: 0x0018, 0xce8: 0x04b1, 0xce9: 0x0018,\n\t0xcea: 0x0319, 0xceb: 0x0771, 0xcec: 0x02e9, 0xced: 0x03d9, 0xcee: 0x0018, 0xcef: 0x02f9,\n\t0xcf0: 0x02f9, 0xcf1: 0x03f1, 0xcf2: 0x0040, 0xcf3: 0x0321, 0xcf4: 0x0051, 0xcf5: 0x0779,\n\t0xcf6: 0x0781, 0xcf7: 0x0789, 0xcf8: 0x0791, 0xcf9: 0x0311, 0xcfa: 0x0018, 0xcfb: 0x08e5,\n\t0xcfc: 0x0799, 0xcfd: 0x03a1, 0xcfe: 0x03a1, 0xcff: 0x0799,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x0905, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x02f1,\n\t0xd06: 0x02f1, 0xd07: 0x02f9, 0xd08: 0x0311, 0xd09: 0x00b1, 0xd0a: 0x0018, 0xd0b: 0x0018,\n\t0xd0c: 0x0018, 0xd0d: 0x0018, 0xd0e: 0x0008, 0xd0f: 0x0018, 0xd10: 0x07a1, 0xd11: 0x07a9,\n\t0xd12: 0x07b1, 0xd13: 0x07b9, 0xd14: 0x07c1, 0xd15: 0x07c9, 0xd16: 0x07d1, 0xd17: 0x07d9,\n\t0xd18: 0x07e1, 0xd19: 0x07e9, 0xd1a: 0x07f1, 0xd1b: 0x07f9, 0xd1c: 0x0801, 0xd1d: 0x0809,\n\t0xd1e: 0x0811, 0xd1f: 0x0819, 0xd20: 0x0311, 0xd21: 0x0821, 0xd22: 0x091d, 0xd23: 0x0829,\n\t0xd24: 0x0391, 0xd25: 0x0831, 0xd26: 0x093d, 0xd27: 0x0839, 0xd28: 0x0841, 0xd29: 0x0109,\n\t0xd2a: 0x0849, 0xd2b: 0x095d, 0xd2c: 0x0101, 0xd2d: 0x03d9, 0xd2e: 0x02f1, 0xd2f: 0x0321,\n\t0xd30: 0x0311, 0xd31: 0x0821, 0xd32: 0x097d, 0xd33: 0x0829, 0xd34: 0x0391, 0xd35: 0x0831,\n\t0xd36: 0x099d, 0xd37: 0x0839, 0xd38: 0x0841, 0xd39: 0x0109, 0xd3a: 0x0849, 0xd3b: 0x09bd,\n\t0xd3c: 0x0101, 0xd3d: 0x03d9, 0xd3e: 0x02f1, 0xd3f: 0x0321,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x0018, 0xd41: 0x0018, 0xd42: 0x0018, 0xd43: 0x0018, 0xd44: 0x0018, 0xd45: 0x0018,\n\t0xd46: 0x0018, 0xd47: 0x0018, 0xd48: 0x0018, 0xd49: 0x0018, 0xd4a: 0x0018, 0xd4b: 0x0040,\n\t0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040,\n\t0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040,\n\t0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0040, 0xd5d: 0x0040,\n\t0xd5e: 0x0040, 0xd5f: 0x0040, 0xd60: 0x0049, 0xd61: 0x0029, 0xd62: 0x0031, 0xd63: 0x06e9,\n\t0xd64: 0x06f1, 0xd65: 0x06f9, 0xd66: 0x0701, 0xd67: 0x0709, 0xd68: 0x0711, 0xd69: 0x0879,\n\t0xd6a: 0x0881, 0xd6b: 0x0889, 0xd6c: 0x0891, 0xd6d: 0x0899, 0xd6e: 0x08a1, 0xd6f: 0x08a9,\n\t0xd70: 0x08b1, 0xd71: 0x08b9, 0xd72: 0x08c1, 0xd73: 0x08c9, 0xd74: 0x0a1e, 0xd75: 0x0a3e,\n\t0xd76: 0x0a5e, 0xd77: 0x0a7e, 0xd78: 0x0a9e, 0xd79: 0x0abe, 0xd7a: 0x0ade, 0xd7b: 0x0afe,\n\t0xd7c: 0x0b1e, 0xd7d: 0x08d2, 0xd7e: 0x08da, 0xd7f: 0x08e2,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x08ea, 0xd81: 0x08f2, 0xd82: 0x08fa, 0xd83: 0x0902, 0xd84: 0x090a, 0xd85: 0x0912,\n\t0xd86: 0x091a, 0xd87: 0x0922, 0xd88: 0x0040, 0xd89: 0x0040, 0xd8a: 0x0040, 0xd8b: 0x0040,\n\t0xd8c: 0x0040, 0xd8d: 0x0040, 0xd8e: 0x0040, 0xd8f: 0x0040, 0xd90: 0x0040, 0xd91: 0x0040,\n\t0xd92: 0x0040, 0xd93: 0x0040, 0xd94: 0x0040, 0xd95: 0x0040, 0xd96: 0x0040, 0xd97: 0x0040,\n\t0xd98: 0x0040, 0xd99: 0x0040, 0xd9a: 0x0040, 0xd9b: 0x0040, 0xd9c: 0x0b3e, 0xd9d: 0x0b5e,\n\t0xd9e: 0x0b7e, 0xd9f: 0x0b9e, 0xda0: 0x0bbe, 0xda1: 0x0bde, 0xda2: 0x0bfe, 0xda3: 0x0c1e,\n\t0xda4: 0x0c3e, 0xda5: 0x0c5e, 0xda6: 0x0c7e, 0xda7: 0x0c9e, 0xda8: 0x0cbe, 0xda9: 0x0cde,\n\t0xdaa: 0x0cfe, 0xdab: 0x0d1e, 0xdac: 0x0d3e, 0xdad: 0x0d5e, 0xdae: 0x0d7e, 0xdaf: 0x0d9e,\n\t0xdb0: 0x0dbe, 0xdb1: 0x0dde, 0xdb2: 0x0dfe, 0xdb3: 0x0e1e, 0xdb4: 0x0e3e, 0xdb5: 0x0e5e,\n\t0xdb6: 0x0019, 0xdb7: 0x02e9, 0xdb8: 0x03d9, 0xdb9: 0x02f1, 0xdba: 0x02f9, 0xdbb: 0x03f1,\n\t0xdbc: 0x0309, 0xdbd: 0x00a9, 0xdbe: 0x0311, 0xdbf: 0x00b1,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0319, 0xdc1: 0x0101, 0xdc2: 0x0321, 0xdc3: 0x0329, 0xdc4: 0x0051, 0xdc5: 0x0339,\n\t0xdc6: 0x0751, 0xdc7: 0x00b9, 0xdc8: 0x0089, 0xdc9: 0x0341, 0xdca: 0x0349, 0xdcb: 0x0391,\n\t0xdcc: 0x00c1, 0xdcd: 0x0109, 0xdce: 0x00c9, 0xdcf: 0x04b1, 0xdd0: 0x0019, 0xdd1: 0x02e9,\n\t0xdd2: 0x03d9, 0xdd3: 0x02f1, 0xdd4: 0x02f9, 0xdd5: 0x03f1, 0xdd6: 0x0309, 0xdd7: 0x00a9,\n\t0xdd8: 0x0311, 0xdd9: 0x00b1, 0xdda: 0x0319, 0xddb: 0x0101, 0xddc: 0x0321, 0xddd: 0x0329,\n\t0xdde: 0x0051, 0xddf: 0x0339, 0xde0: 0x0751, 0xde1: 0x00b9, 0xde2: 0x0089, 0xde3: 0x0341,\n\t0xde4: 0x0349, 0xde5: 0x0391, 0xde6: 0x00c1, 0xde7: 0x0109, 0xde8: 0x00c9, 0xde9: 0x04b1,\n\t0xdea: 0x06e1, 0xdeb: 0x0018, 0xdec: 0x0018, 0xded: 0x0018, 0xdee: 0x0018, 0xdef: 0x0018,\n\t0xdf0: 0x0018, 0xdf1: 0x0018, 0xdf2: 0x0018, 0xdf3: 0x0018, 0xdf4: 0x0018, 0xdf5: 0x0018,\n\t0xdf6: 0x0018, 0xdf7: 0x0018, 0xdf8: 0x0018, 0xdf9: 0x0018, 0xdfa: 0x0018, 0xdfb: 0x0018,\n\t0xdfc: 0x0018, 0xdfd: 0x0018, 0xdfe: 0x0018, 0xdff: 0x0018,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0x0008, 0xe01: 0x0008, 0xe02: 0x0008, 0xe03: 0x0008, 0xe04: 0x0008, 0xe05: 0x0008,\n\t0xe06: 0x0008, 0xe07: 0x0008, 0xe08: 0x0008, 0xe09: 0x0008, 0xe0a: 0x0008, 0xe0b: 0x0008,\n\t0xe0c: 0x0008, 0xe0d: 0x0008, 0xe0e: 0x0008, 0xe0f: 0x0008, 0xe10: 0x0008, 0xe11: 0x0008,\n\t0xe12: 0x0008, 0xe13: 0x0008, 0xe14: 0x0008, 0xe15: 0x0008, 0xe16: 0x0008, 0xe17: 0x0008,\n\t0xe18: 0x0008, 0xe19: 0x0008, 0xe1a: 0x0008, 0xe1b: 0x0008, 0xe1c: 0x0008, 0xe1d: 0x0008,\n\t0xe1e: 0x0008, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0x0941, 0xe23: 0x0ed5,\n\t0xe24: 0x0949, 0xe25: 0x0008, 0xe26: 0x0008, 0xe27: 0xe07d, 0xe28: 0x0008, 0xe29: 0xe01d,\n\t0xe2a: 0x0008, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0x0359, 0xe2e: 0x0441, 0xe2f: 0x0351,\n\t0xe30: 0x03d1, 0xe31: 0x0008, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0008, 0xe35: 0xe01d,\n\t0xe36: 0x0008, 0xe37: 0x0008, 0xe38: 0x0008, 0xe39: 0x0008, 0xe3a: 0x0008, 0xe3b: 0x0008,\n\t0xe3c: 0x00b1, 0xe3d: 0x0391, 0xe3e: 0x0951, 0xe3f: 0x0959,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0xe00d, 0xe41: 0x0008, 0xe42: 0xe00d, 0xe43: 0x0008, 0xe44: 0xe00d, 0xe45: 0x0008,\n\t0xe46: 0xe00d, 0xe47: 0x0008, 0xe48: 0xe00d, 0xe49: 0x0008, 0xe4a: 0xe00d, 0xe4b: 0x0008,\n\t0xe4c: 0xe00d, 0xe4d: 0x0008, 0xe4e: 0xe00d, 0xe4f: 0x0008, 0xe50: 0xe00d, 0xe51: 0x0008,\n\t0xe52: 0xe00d, 0xe53: 0x0008, 0xe54: 0xe00d, 0xe55: 0x0008, 0xe56: 0xe00d, 0xe57: 0x0008,\n\t0xe58: 0xe00d, 0xe59: 0x0008, 0xe5a: 0xe00d, 0xe5b: 0x0008, 0xe5c: 0xe00d, 0xe5d: 0x0008,\n\t0xe5e: 0xe00d, 0xe5f: 0x0008, 0xe60: 0xe00d, 0xe61: 0x0008, 0xe62: 0xe00d, 0xe63: 0x0008,\n\t0xe64: 0x0008, 0xe65: 0x0018, 0xe66: 0x0018, 0xe67: 0x0018, 0xe68: 0x0018, 0xe69: 0x0018,\n\t0xe6a: 0x0018, 0xe6b: 0xe03d, 0xe6c: 0x0008, 0xe6d: 0xe01d, 0xe6e: 0x0008, 0xe6f: 0x3308,\n\t0xe70: 0x3308, 0xe71: 0x3308, 0xe72: 0xe00d, 0xe73: 0x0008, 0xe74: 0x0040, 0xe75: 0x0040,\n\t0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0018, 0xe7a: 0x0018, 0xe7b: 0x0018,\n\t0xe7c: 0x0018, 0xe7d: 0x0018, 0xe7e: 0x0018, 0xe7f: 0x0018,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x2715, 0xe81: 0x2735, 0xe82: 0x2755, 0xe83: 0x2775, 0xe84: 0x2795, 0xe85: 0x27b5,\n\t0xe86: 0x27d5, 0xe87: 0x27f5, 0xe88: 0x2815, 0xe89: 0x2835, 0xe8a: 0x2855, 0xe8b: 0x2875,\n\t0xe8c: 0x2895, 0xe8d: 0x28b5, 0xe8e: 0x28d5, 0xe8f: 0x28f5, 0xe90: 0x2915, 0xe91: 0x2935,\n\t0xe92: 0x2955, 0xe93: 0x2975, 0xe94: 0x2995, 0xe95: 0x29b5, 0xe96: 0x0040, 0xe97: 0x0040,\n\t0xe98: 0x0040, 0xe99: 0x0040, 0xe9a: 0x0040, 0xe9b: 0x0040, 0xe9c: 0x0040, 0xe9d: 0x0040,\n\t0xe9e: 0x0040, 0xe9f: 0x0040, 0xea0: 0x0040, 0xea1: 0x0040, 0xea2: 0x0040, 0xea3: 0x0040,\n\t0xea4: 0x0040, 0xea5: 0x0040, 0xea6: 0x0040, 0xea7: 0x0040, 0xea8: 0x0040, 0xea9: 0x0040,\n\t0xeaa: 0x0040, 0xeab: 0x0040, 0xeac: 0x0040, 0xead: 0x0040, 0xeae: 0x0040, 0xeaf: 0x0040,\n\t0xeb0: 0x0040, 0xeb1: 0x0040, 0xeb2: 0x0040, 0xeb3: 0x0040, 0xeb4: 0x0040, 0xeb5: 0x0040,\n\t0xeb6: 0x0040, 0xeb7: 0x0040, 0xeb8: 0x0040, 0xeb9: 0x0040, 0xeba: 0x0040, 0xebb: 0x0040,\n\t0xebc: 0x0040, 0xebd: 0x0040, 0xebe: 0x0040, 0xebf: 0x0040,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x000a, 0xec1: 0x0018, 0xec2: 0x0961, 0xec3: 0x0018, 0xec4: 0x0018, 0xec5: 0x0008,\n\t0xec6: 0x0008, 0xec7: 0x0008, 0xec8: 0x0018, 0xec9: 0x0018, 0xeca: 0x0018, 0xecb: 0x0018,\n\t0xecc: 0x0018, 0xecd: 0x0018, 0xece: 0x0018, 0xecf: 0x0018, 0xed0: 0x0018, 0xed1: 0x0018,\n\t0xed2: 0x0018, 0xed3: 0x0018, 0xed4: 0x0018, 0xed5: 0x0018, 0xed6: 0x0018, 0xed7: 0x0018,\n\t0xed8: 0x0018, 0xed9: 0x0018, 0xeda: 0x0018, 0xedb: 0x0018, 0xedc: 0x0018, 0xedd: 0x0018,\n\t0xede: 0x0018, 0xedf: 0x0018, 0xee0: 0x0018, 0xee1: 0x0018, 0xee2: 0x0018, 0xee3: 0x0018,\n\t0xee4: 0x0018, 0xee5: 0x0018, 0xee6: 0x0018, 0xee7: 0x0018, 0xee8: 0x0018, 0xee9: 0x0018,\n\t0xeea: 0x3308, 0xeeb: 0x3308, 0xeec: 0x3308, 0xeed: 0x3308, 0xeee: 0x3018, 0xeef: 0x3018,\n\t0xef0: 0x0018, 0xef1: 0x0018, 0xef2: 0x0018, 0xef3: 0x0018, 0xef4: 0x0018, 0xef5: 0x0018,\n\t0xef6: 0xe125, 0xef7: 0x0018, 0xef8: 0x29d5, 0xef9: 0x29f5, 0xefa: 0x2a15, 0xefb: 0x0018,\n\t0xefc: 0x0008, 0xefd: 0x0018, 0xefe: 0x0018, 0xeff: 0x0018,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x2b55, 0xf01: 0x2b75, 0xf02: 0x2b95, 0xf03: 0x2bb5, 0xf04: 0x2bd5, 0xf05: 0x2bf5,\n\t0xf06: 0x2bf5, 0xf07: 0x2bf5, 0xf08: 0x2c15, 0xf09: 0x2c15, 0xf0a: 0x2c15, 0xf0b: 0x2c15,\n\t0xf0c: 0x2c35, 0xf0d: 0x2c35, 0xf0e: 0x2c35, 0xf0f: 0x2c55, 0xf10: 0x2c75, 0xf11: 0x2c75,\n\t0xf12: 0x2a95, 0xf13: 0x2a95, 0xf14: 0x2c75, 0xf15: 0x2c75, 0xf16: 0x2c95, 0xf17: 0x2c95,\n\t0xf18: 0x2c75, 0xf19: 0x2c75, 0xf1a: 0x2a95, 0xf1b: 0x2a95, 0xf1c: 0x2c75, 0xf1d: 0x2c75,\n\t0xf1e: 0x2c55, 0xf1f: 0x2c55, 0xf20: 0x2cb5, 0xf21: 0x2cb5, 0xf22: 0x2cd5, 0xf23: 0x2cd5,\n\t0xf24: 0x0040, 0xf25: 0x2cf5, 0xf26: 0x2d15, 0xf27: 0x2d35, 0xf28: 0x2d35, 0xf29: 0x2d55,\n\t0xf2a: 0x2d75, 0xf2b: 0x2d95, 0xf2c: 0x2db5, 0xf2d: 0x2dd5, 0xf2e: 0x2df5, 0xf2f: 0x2e15,\n\t0xf30: 0x2e35, 0xf31: 0x2e55, 0xf32: 0x2e55, 0xf33: 0x2e75, 0xf34: 0x2e95, 0xf35: 0x2e95,\n\t0xf36: 0x2eb5, 0xf37: 0x2ed5, 0xf38: 0x2e75, 0xf39: 0x2ef5, 0xf3a: 0x2f15, 0xf3b: 0x2ef5,\n\t0xf3c: 0x2e75, 0xf3d: 0x2f35, 0xf3e: 0x2f55, 0xf3f: 0x2f75,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x2f95, 0xf41: 0x2fb5, 0xf42: 0x2d15, 0xf43: 0x2cf5, 0xf44: 0x2fd5, 0xf45: 0x2ff5,\n\t0xf46: 0x3015, 0xf47: 0x3035, 0xf48: 0x3055, 0xf49: 0x3075, 0xf4a: 0x3095, 0xf4b: 0x30b5,\n\t0xf4c: 0x30d5, 0xf4d: 0x30f5, 0xf4e: 0x3115, 0xf4f: 0x0040, 0xf50: 0x0018, 0xf51: 0x0018,\n\t0xf52: 0x3135, 0xf53: 0x3155, 0xf54: 0x3175, 0xf55: 0x3195, 0xf56: 0x31b5, 0xf57: 0x31d5,\n\t0xf58: 0x31f5, 0xf59: 0x3215, 0xf5a: 0x3235, 0xf5b: 0x3255, 0xf5c: 0x3175, 0xf5d: 0x3275,\n\t0xf5e: 0x3295, 0xf5f: 0x32b5, 0xf60: 0x0008, 0xf61: 0x0008, 0xf62: 0x0008, 0xf63: 0x0008,\n\t0xf64: 0x0008, 0xf65: 0x0008, 0xf66: 0x0008, 0xf67: 0x0008, 0xf68: 0x0008, 0xf69: 0x0008,\n\t0xf6a: 0x0008, 0xf6b: 0x0008, 0xf6c: 0x0008, 0xf6d: 0x0008, 0xf6e: 0x0008, 0xf6f: 0x0008,\n\t0xf70: 0x0008, 0xf71: 0x0008, 0xf72: 0x0008, 0xf73: 0x0008, 0xf74: 0x0008, 0xf75: 0x0008,\n\t0xf76: 0x0008, 0xf77: 0x0008, 0xf78: 0x0008, 0xf79: 0x0008, 0xf7a: 0x0008, 0xf7b: 0x0008,\n\t0xf7c: 0x0008, 0xf7d: 0x0008, 0xf7e: 0x0008, 0xf7f: 0x0008,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x0b82, 0xf81: 0x0b8a, 0xf82: 0x0b92, 0xf83: 0x0b9a, 0xf84: 0x32d5, 0xf85: 0x32f5,\n\t0xf86: 0x3315, 0xf87: 0x3335, 0xf88: 0x0018, 0xf89: 0x0018, 0xf8a: 0x0018, 0xf8b: 0x0018,\n\t0xf8c: 0x0018, 0xf8d: 0x0018, 0xf8e: 0x0018, 0xf8f: 0x0018, 0xf90: 0x3355, 0xf91: 0x0ba1,\n\t0xf92: 0x0ba9, 0xf93: 0x0bb1, 0xf94: 0x0bb9, 0xf95: 0x0bc1, 0xf96: 0x0bc9, 0xf97: 0x0bd1,\n\t0xf98: 0x0bd9, 0xf99: 0x0be1, 0xf9a: 0x0be9, 0xf9b: 0x0bf1, 0xf9c: 0x0bf9, 0xf9d: 0x0c01,\n\t0xf9e: 0x0c09, 0xf9f: 0x0c11, 0xfa0: 0x3375, 0xfa1: 0x3395, 0xfa2: 0x33b5, 0xfa3: 0x33d5,\n\t0xfa4: 0x33f5, 0xfa5: 0x33f5, 0xfa6: 0x3415, 0xfa7: 0x3435, 0xfa8: 0x3455, 0xfa9: 0x3475,\n\t0xfaa: 0x3495, 0xfab: 0x34b5, 0xfac: 0x34d5, 0xfad: 0x34f5, 0xfae: 0x3515, 0xfaf: 0x3535,\n\t0xfb0: 0x3555, 0xfb1: 0x3575, 0xfb2: 0x3595, 0xfb3: 0x35b5, 0xfb4: 0x35d5, 0xfb5: 0x35f5,\n\t0xfb6: 0x3615, 0xfb7: 0x3635, 0xfb8: 0x3655, 0xfb9: 0x3675, 0xfba: 0x3695, 0xfbb: 0x36b5,\n\t0xfbc: 0x0c19, 0xfbd: 0x0c21, 0xfbe: 0x36d5, 0xfbf: 0x0018,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x36f5, 0xfc1: 0x3715, 0xfc2: 0x3735, 0xfc3: 0x3755, 0xfc4: 0x3775, 0xfc5: 0x3795,\n\t0xfc6: 0x37b5, 0xfc7: 0x37d5, 0xfc8: 0x37f5, 0xfc9: 0x3815, 0xfca: 0x3835, 0xfcb: 0x3855,\n\t0xfcc: 0x3875, 0xfcd: 0x3895, 0xfce: 0x38b5, 0xfcf: 0x38d5, 0xfd0: 0x38f5, 0xfd1: 0x3915,\n\t0xfd2: 0x3935, 0xfd3: 0x3955, 0xfd4: 0x3975, 0xfd5: 0x3995, 0xfd6: 0x39b5, 0xfd7: 0x39d5,\n\t0xfd8: 0x39f5, 0xfd9: 0x3a15, 0xfda: 0x3a35, 0xfdb: 0x3a55, 0xfdc: 0x3a75, 0xfdd: 0x3a95,\n\t0xfde: 0x3ab5, 0xfdf: 0x3ad5, 0xfe0: 0x3af5, 0xfe1: 0x3b15, 0xfe2: 0x3b35, 0xfe3: 0x3b55,\n\t0xfe4: 0x3b75, 0xfe5: 0x3b95, 0xfe6: 0x1295, 0xfe7: 0x3bb5, 0xfe8: 0x3bd5, 0xfe9: 0x3bf5,\n\t0xfea: 0x3c15, 0xfeb: 0x3c35, 0xfec: 0x3c55, 0xfed: 0x3c75, 0xfee: 0x23b5, 0xfef: 0x3c95,\n\t0xff0: 0x3cb5, 0xff1: 0x0c29, 0xff2: 0x0c31, 0xff3: 0x0c39, 0xff4: 0x0c41, 0xff5: 0x0c49,\n\t0xff6: 0x0c51, 0xff7: 0x0c59, 0xff8: 0x0c61, 0xff9: 0x0c69, 0xffa: 0x0c71, 0xffb: 0x0c79,\n\t0xffc: 0x0c81, 0xffd: 0x0c89, 0xffe: 0x0c91, 0xfff: 0x0c99,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x0ca1, 0x1001: 0x0ca9, 0x1002: 0x0cb1, 0x1003: 0x0cb9, 0x1004: 0x0cc1, 0x1005: 0x0cc9,\n\t0x1006: 0x0cd1, 0x1007: 0x0cd9, 0x1008: 0x0ce1, 0x1009: 0x0ce9, 0x100a: 0x0cf1, 0x100b: 0x0cf9,\n\t0x100c: 0x0d01, 0x100d: 0x3cd5, 0x100e: 0x0d09, 0x100f: 0x3cf5, 0x1010: 0x3d15, 0x1011: 0x3d2d,\n\t0x1012: 0x3d45, 0x1013: 0x3d5d, 0x1014: 0x3d75, 0x1015: 0x3d75, 0x1016: 0x3d5d, 0x1017: 0x3d8d,\n\t0x1018: 0x07d5, 0x1019: 0x3da5, 0x101a: 0x3dbd, 0x101b: 0x3dd5, 0x101c: 0x3ded, 0x101d: 0x3e05,\n\t0x101e: 0x3e1d, 0x101f: 0x3e35, 0x1020: 0x3e4d, 0x1021: 0x3e65, 0x1022: 0x3e7d, 0x1023: 0x3e95,\n\t0x1024: 0x3ead, 0x1025: 0x3ead, 0x1026: 0x3ec5, 0x1027: 0x3ec5, 0x1028: 0x3edd, 0x1029: 0x3edd,\n\t0x102a: 0x3ef5, 0x102b: 0x3f0d, 0x102c: 0x3f25, 0x102d: 0x3f3d, 0x102e: 0x3f55, 0x102f: 0x3f55,\n\t0x1030: 0x3f6d, 0x1031: 0x3f6d, 0x1032: 0x3f6d, 0x1033: 0x3f85, 0x1034: 0x3f9d, 0x1035: 0x3fb5,\n\t0x1036: 0x3fcd, 0x1037: 0x3fb5, 0x1038: 0x3fe5, 0x1039: 0x3ffd, 0x103a: 0x3f85, 0x103b: 0x4015,\n\t0x103c: 0x402d, 0x103d: 0x402d, 0x103e: 0x402d, 0x103f: 0x0d11,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x10f9, 0x1041: 0x1101, 0x1042: 0x40a5, 0x1043: 0x1109, 0x1044: 0x1111, 0x1045: 0x1119,\n\t0x1046: 0x1121, 0x1047: 0x1129, 0x1048: 0x40c5, 0x1049: 0x1131, 0x104a: 0x1139, 0x104b: 0x1141,\n\t0x104c: 0x40e5, 0x104d: 0x40e5, 0x104e: 0x1149, 0x104f: 0x1151, 0x1050: 0x1159, 0x1051: 0x4105,\n\t0x1052: 0x4125, 0x1053: 0x4145, 0x1054: 0x4165, 0x1055: 0x4185, 0x1056: 0x1161, 0x1057: 0x1169,\n\t0x1058: 0x1171, 0x1059: 0x1179, 0x105a: 0x1181, 0x105b: 0x41a5, 0x105c: 0x1189, 0x105d: 0x1191,\n\t0x105e: 0x1199, 0x105f: 0x41c5, 0x1060: 0x41e5, 0x1061: 0x11a1, 0x1062: 0x4205, 0x1063: 0x4225,\n\t0x1064: 0x4245, 0x1065: 0x11a9, 0x1066: 0x4265, 0x1067: 0x11b1, 0x1068: 0x11b9, 0x1069: 0x10f9,\n\t0x106a: 0x4285, 0x106b: 0x42a5, 0x106c: 0x42c5, 0x106d: 0x42e5, 0x106e: 0x11c1, 0x106f: 0x11c9,\n\t0x1070: 0x11d1, 0x1071: 0x11d9, 0x1072: 0x4305, 0x1073: 0x11e1, 0x1074: 0x11e9, 0x1075: 0x11f1,\n\t0x1076: 0x4325, 0x1077: 0x11f9, 0x1078: 0x1201, 0x1079: 0x11f9, 0x107a: 0x1209, 0x107b: 0x1211,\n\t0x107c: 0x4345, 0x107d: 0x1219, 0x107e: 0x1221, 0x107f: 0x1219,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x4365, 0x1081: 0x4385, 0x1082: 0x0040, 0x1083: 0x1229, 0x1084: 0x1231, 0x1085: 0x1239,\n\t0x1086: 0x1241, 0x1087: 0x0040, 0x1088: 0x1249, 0x1089: 0x1251, 0x108a: 0x1259, 0x108b: 0x1261,\n\t0x108c: 0x1269, 0x108d: 0x1271, 0x108e: 0x1199, 0x108f: 0x1279, 0x1090: 0x1281, 0x1091: 0x1289,\n\t0x1092: 0x43a5, 0x1093: 0x1291, 0x1094: 0x1121, 0x1095: 0x43c5, 0x1096: 0x43e5, 0x1097: 0x1299,\n\t0x1098: 0x0040, 0x1099: 0x4405, 0x109a: 0x12a1, 0x109b: 0x12a9, 0x109c: 0x12b1, 0x109d: 0x12b9,\n\t0x109e: 0x12c1, 0x109f: 0x12c9, 0x10a0: 0x12d1, 0x10a1: 0x12d9, 0x10a2: 0x12e1, 0x10a3: 0x12e9,\n\t0x10a4: 0x12f1, 0x10a5: 0x12f9, 0x10a6: 0x1301, 0x10a7: 0x1309, 0x10a8: 0x1311, 0x10a9: 0x1319,\n\t0x10aa: 0x1321, 0x10ab: 0x1329, 0x10ac: 0x1331, 0x10ad: 0x1339, 0x10ae: 0x1341, 0x10af: 0x1349,\n\t0x10b0: 0x1351, 0x10b1: 0x1359, 0x10b2: 0x1361, 0x10b3: 0x1369, 0x10b4: 0x1371, 0x10b5: 0x1379,\n\t0x10b6: 0x1381, 0x10b7: 0x1389, 0x10b8: 0x1391, 0x10b9: 0x1399, 0x10ba: 0x13a1, 0x10bb: 0x13a9,\n\t0x10bc: 0x13b1, 0x10bd: 0x13b9, 0x10be: 0x13c1, 0x10bf: 0x4425,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0xe00d, 0x10c1: 0x0008, 0x10c2: 0xe00d, 0x10c3: 0x0008, 0x10c4: 0xe00d, 0x10c5: 0x0008,\n\t0x10c6: 0xe00d, 0x10c7: 0x0008, 0x10c8: 0xe00d, 0x10c9: 0x0008, 0x10ca: 0xe00d, 0x10cb: 0x0008,\n\t0x10cc: 0xe00d, 0x10cd: 0x0008, 0x10ce: 0xe00d, 0x10cf: 0x0008, 0x10d0: 0xe00d, 0x10d1: 0x0008,\n\t0x10d2: 0xe00d, 0x10d3: 0x0008, 0x10d4: 0xe00d, 0x10d5: 0x0008, 0x10d6: 0xe00d, 0x10d7: 0x0008,\n\t0x10d8: 0xe00d, 0x10d9: 0x0008, 0x10da: 0xe00d, 0x10db: 0x0008, 0x10dc: 0xe00d, 0x10dd: 0x0008,\n\t0x10de: 0xe00d, 0x10df: 0x0008, 0x10e0: 0xe00d, 0x10e1: 0x0008, 0x10e2: 0xe00d, 0x10e3: 0x0008,\n\t0x10e4: 0xe00d, 0x10e5: 0x0008, 0x10e6: 0xe00d, 0x10e7: 0x0008, 0x10e8: 0xe00d, 0x10e9: 0x0008,\n\t0x10ea: 0xe00d, 0x10eb: 0x0008, 0x10ec: 0xe00d, 0x10ed: 0x0008, 0x10ee: 0x0008, 0x10ef: 0x3308,\n\t0x10f0: 0x3318, 0x10f1: 0x3318, 0x10f2: 0x3318, 0x10f3: 0x0018, 0x10f4: 0x3308, 0x10f5: 0x3308,\n\t0x10f6: 0x3308, 0x10f7: 0x3308, 0x10f8: 0x3308, 0x10f9: 0x3308, 0x10fa: 0x3308, 0x10fb: 0x3308,\n\t0x10fc: 0x3308, 0x10fd: 0x3308, 0x10fe: 0x0018, 0x10ff: 0x0008,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,\n\t0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,\n\t0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,\n\t0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,\n\t0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0x02d1, 0x111d: 0x13c9,\n\t0x111e: 0x3308, 0x111f: 0x3308, 0x1120: 0x0008, 0x1121: 0x0008, 0x1122: 0x0008, 0x1123: 0x0008,\n\t0x1124: 0x0008, 0x1125: 0x0008, 0x1126: 0x0008, 0x1127: 0x0008, 0x1128: 0x0008, 0x1129: 0x0008,\n\t0x112a: 0x0008, 0x112b: 0x0008, 0x112c: 0x0008, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x0008,\n\t0x1130: 0x0008, 0x1131: 0x0008, 0x1132: 0x0008, 0x1133: 0x0008, 0x1134: 0x0008, 0x1135: 0x0008,\n\t0x1136: 0x0008, 0x1137: 0x0008, 0x1138: 0x0008, 0x1139: 0x0008, 0x113a: 0x0008, 0x113b: 0x0008,\n\t0x113c: 0x0008, 0x113d: 0x0008, 0x113e: 0x0008, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0x0018, 0x1141: 0x0018, 0x1142: 0x0018, 0x1143: 0x0018, 0x1144: 0x0018, 0x1145: 0x0018,\n\t0x1146: 0x0018, 0x1147: 0x0018, 0x1148: 0x0018, 0x1149: 0x0018, 0x114a: 0x0018, 0x114b: 0x0018,\n\t0x114c: 0x0018, 0x114d: 0x0018, 0x114e: 0x0018, 0x114f: 0x0018, 0x1150: 0x0018, 0x1151: 0x0018,\n\t0x1152: 0x0018, 0x1153: 0x0018, 0x1154: 0x0018, 0x1155: 0x0018, 0x1156: 0x0018, 0x1157: 0x0008,\n\t0x1158: 0x0008, 0x1159: 0x0008, 0x115a: 0x0008, 0x115b: 0x0008, 0x115c: 0x0008, 0x115d: 0x0008,\n\t0x115e: 0x0008, 0x115f: 0x0008, 0x1160: 0x0018, 0x1161: 0x0018, 0x1162: 0xe00d, 0x1163: 0x0008,\n\t0x1164: 0xe00d, 0x1165: 0x0008, 0x1166: 0xe00d, 0x1167: 0x0008, 0x1168: 0xe00d, 0x1169: 0x0008,\n\t0x116a: 0xe00d, 0x116b: 0x0008, 0x116c: 0xe00d, 0x116d: 0x0008, 0x116e: 0xe00d, 0x116f: 0x0008,\n\t0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0xe00d, 0x1173: 0x0008, 0x1174: 0xe00d, 0x1175: 0x0008,\n\t0x1176: 0xe00d, 0x1177: 0x0008, 0x1178: 0xe00d, 0x1179: 0x0008, 0x117a: 0xe00d, 0x117b: 0x0008,\n\t0x117c: 0xe00d, 0x117d: 0x0008, 0x117e: 0xe00d, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0xe00d, 0x1181: 0x0008, 0x1182: 0xe00d, 0x1183: 0x0008, 0x1184: 0xe00d, 0x1185: 0x0008,\n\t0x1186: 0xe00d, 0x1187: 0x0008, 0x1188: 0xe00d, 0x1189: 0x0008, 0x118a: 0xe00d, 0x118b: 0x0008,\n\t0x118c: 0xe00d, 0x118d: 0x0008, 0x118e: 0xe00d, 0x118f: 0x0008, 0x1190: 0xe00d, 0x1191: 0x0008,\n\t0x1192: 0xe00d, 0x1193: 0x0008, 0x1194: 0xe00d, 0x1195: 0x0008, 0x1196: 0xe00d, 0x1197: 0x0008,\n\t0x1198: 0xe00d, 0x1199: 0x0008, 0x119a: 0xe00d, 0x119b: 0x0008, 0x119c: 0xe00d, 0x119d: 0x0008,\n\t0x119e: 0xe00d, 0x119f: 0x0008, 0x11a0: 0xe00d, 0x11a1: 0x0008, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,\n\t0x11b0: 0xe0fd, 0x11b1: 0x0008, 0x11b2: 0x0008, 0x11b3: 0x0008, 0x11b4: 0x0008, 0x11b5: 0x0008,\n\t0x11b6: 0x0008, 0x11b7: 0x0008, 0x11b8: 0x0008, 0x11b9: 0xe01d, 0x11ba: 0x0008, 0x11bb: 0xe03d,\n\t0x11bc: 0x0008, 0x11bd: 0x4445, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,\n\t0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0x0008, 0x11c9: 0x0018, 0x11ca: 0x0018, 0x11cb: 0xe03d,\n\t0x11cc: 0x0008, 0x11cd: 0x0409, 0x11ce: 0x0008, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,\n\t0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0x0008, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,\n\t0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,\n\t0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,\n\t0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,\n\t0x11ea: 0x13d1, 0x11eb: 0x0371, 0x11ec: 0x0401, 0x11ed: 0x13d9, 0x11ee: 0x0421, 0x11ef: 0x0008,\n\t0x11f0: 0x13e1, 0x11f1: 0x13e9, 0x11f2: 0x0429, 0x11f3: 0x4465, 0x11f4: 0xe00d, 0x11f5: 0x0008,\n\t0x11f6: 0xe00d, 0x11f7: 0x0008, 0x11f8: 0xe00d, 0x11f9: 0x0008, 0x11fa: 0xe00d, 0x11fb: 0x0008,\n\t0x11fc: 0xe00d, 0x11fd: 0x0008, 0x11fe: 0xe00d, 0x11ff: 0x0008,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0x03f5, 0x1205: 0x0479,\n\t0x1206: 0x447d, 0x1207: 0xe07d, 0x1208: 0x0008, 0x1209: 0xe01d, 0x120a: 0x0008, 0x120b: 0x0040,\n\t0x120c: 0x0040, 0x120d: 0x0040, 0x120e: 0x0040, 0x120f: 0x0040, 0x1210: 0xe00d, 0x1211: 0x0008,\n\t0x1212: 0x0040, 0x1213: 0x0008, 0x1214: 0x0040, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008,\n\t0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0x0040, 0x121b: 0x0040, 0x121c: 0x0040, 0x121d: 0x0040,\n\t0x121e: 0x0040, 0x121f: 0x0040, 0x1220: 0x0040, 0x1221: 0x0040, 0x1222: 0x0040, 0x1223: 0x0040,\n\t0x1224: 0x0040, 0x1225: 0x0040, 0x1226: 0x0040, 0x1227: 0x0040, 0x1228: 0x0040, 0x1229: 0x0040,\n\t0x122a: 0x0040, 0x122b: 0x0040, 0x122c: 0x0040, 0x122d: 0x0040, 0x122e: 0x0040, 0x122f: 0x0040,\n\t0x1230: 0x0040, 0x1231: 0x0040, 0x1232: 0x03d9, 0x1233: 0x03f1, 0x1234: 0x0751, 0x1235: 0xe01d,\n\t0x1236: 0x0008, 0x1237: 0x0008, 0x1238: 0x0741, 0x1239: 0x13f1, 0x123a: 0x0008, 0x123b: 0x0008,\n\t0x123c: 0x0008, 0x123d: 0x0008, 0x123e: 0x0008, 0x123f: 0x0008,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x650d, 0x1241: 0x652d, 0x1242: 0x654d, 0x1243: 0x656d, 0x1244: 0x658d, 0x1245: 0x65ad,\n\t0x1246: 0x65cd, 0x1247: 0x65ed, 0x1248: 0x660d, 0x1249: 0x662d, 0x124a: 0x664d, 0x124b: 0x666d,\n\t0x124c: 0x668d, 0x124d: 0x66ad, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x66cd, 0x1251: 0x0008,\n\t0x1252: 0x66ed, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x670d, 0x1256: 0x672d, 0x1257: 0x674d,\n\t0x1258: 0x676d, 0x1259: 0x678d, 0x125a: 0x67ad, 0x125b: 0x67cd, 0x125c: 0x67ed, 0x125d: 0x680d,\n\t0x125e: 0x682d, 0x125f: 0x0008, 0x1260: 0x684d, 0x1261: 0x0008, 0x1262: 0x686d, 0x1263: 0x0008,\n\t0x1264: 0x0008, 0x1265: 0x688d, 0x1266: 0x68ad, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008,\n\t0x126a: 0x68cd, 0x126b: 0x68ed, 0x126c: 0x690d, 0x126d: 0x692d, 0x126e: 0x694d, 0x126f: 0x696d,\n\t0x1270: 0x698d, 0x1271: 0x69ad, 0x1272: 0x69cd, 0x1273: 0x69ed, 0x1274: 0x6a0d, 0x1275: 0x6a2d,\n\t0x1276: 0x6a4d, 0x1277: 0x6a6d, 0x1278: 0x6a8d, 0x1279: 0x6aad, 0x127a: 0x6acd, 0x127b: 0x6aed,\n\t0x127c: 0x6b0d, 0x127d: 0x6b2d, 0x127e: 0x6b4d, 0x127f: 0x6b6d,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x7acd, 0x1281: 0x7aed, 0x1282: 0x7b0d, 0x1283: 0x7b2d, 0x1284: 0x7b4d, 0x1285: 0x7b6d,\n\t0x1286: 0x7b8d, 0x1287: 0x7bad, 0x1288: 0x7bcd, 0x1289: 0x7bed, 0x128a: 0x7c0d, 0x128b: 0x7c2d,\n\t0x128c: 0x7c4d, 0x128d: 0x7c6d, 0x128e: 0x7c8d, 0x128f: 0x1409, 0x1290: 0x1411, 0x1291: 0x1419,\n\t0x1292: 0x7cad, 0x1293: 0x7ccd, 0x1294: 0x7ced, 0x1295: 0x1421, 0x1296: 0x1429, 0x1297: 0x1431,\n\t0x1298: 0x7d0d, 0x1299: 0x7d2d, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040,\n\t0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040,\n\t0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040,\n\t0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040,\n\t0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040,\n\t0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040,\n\t0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x1439, 0x12c1: 0x1441, 0x12c2: 0x1449, 0x12c3: 0x7d4d, 0x12c4: 0x7d6d, 0x12c5: 0x1451,\n\t0x12c6: 0x1451, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040,\n\t0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040,\n\t0x12d2: 0x0040, 0x12d3: 0x1459, 0x12d4: 0x1461, 0x12d5: 0x1469, 0x12d6: 0x1471, 0x12d7: 0x1479,\n\t0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x1481,\n\t0x12de: 0x3308, 0x12df: 0x1489, 0x12e0: 0x1491, 0x12e1: 0x0779, 0x12e2: 0x0791, 0x12e3: 0x1499,\n\t0x12e4: 0x14a1, 0x12e5: 0x14a9, 0x12e6: 0x14b1, 0x12e7: 0x14b9, 0x12e8: 0x14c1, 0x12e9: 0x071a,\n\t0x12ea: 0x14c9, 0x12eb: 0x14d1, 0x12ec: 0x14d9, 0x12ed: 0x14e1, 0x12ee: 0x14e9, 0x12ef: 0x14f1,\n\t0x12f0: 0x14f9, 0x12f1: 0x1501, 0x12f2: 0x1509, 0x12f3: 0x1511, 0x12f4: 0x1519, 0x12f5: 0x1521,\n\t0x12f6: 0x1529, 0x12f7: 0x0040, 0x12f8: 0x1531, 0x12f9: 0x1539, 0x12fa: 0x1541, 0x12fb: 0x1549,\n\t0x12fc: 0x1551, 0x12fd: 0x0040, 0x12fe: 0x1559, 0x12ff: 0x0040,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x1561, 0x1301: 0x1569, 0x1302: 0x0040, 0x1303: 0x1571, 0x1304: 0x1579, 0x1305: 0x0040,\n\t0x1306: 0x1581, 0x1307: 0x1589, 0x1308: 0x1591, 0x1309: 0x1599, 0x130a: 0x15a1, 0x130b: 0x15a9,\n\t0x130c: 0x15b1, 0x130d: 0x15b9, 0x130e: 0x15c1, 0x130f: 0x15c9, 0x1310: 0x15d1, 0x1311: 0x15d1,\n\t0x1312: 0x15d9, 0x1313: 0x15d9, 0x1314: 0x15d9, 0x1315: 0x15d9, 0x1316: 0x15e1, 0x1317: 0x15e1,\n\t0x1318: 0x15e1, 0x1319: 0x15e1, 0x131a: 0x15e9, 0x131b: 0x15e9, 0x131c: 0x15e9, 0x131d: 0x15e9,\n\t0x131e: 0x15f1, 0x131f: 0x15f1, 0x1320: 0x15f1, 0x1321: 0x15f1, 0x1322: 0x15f9, 0x1323: 0x15f9,\n\t0x1324: 0x15f9, 0x1325: 0x15f9, 0x1326: 0x1601, 0x1327: 0x1601, 0x1328: 0x1601, 0x1329: 0x1601,\n\t0x132a: 0x1609, 0x132b: 0x1609, 0x132c: 0x1609, 0x132d: 0x1609, 0x132e: 0x1611, 0x132f: 0x1611,\n\t0x1330: 0x1611, 0x1331: 0x1611, 0x1332: 0x1619, 0x1333: 0x1619, 0x1334: 0x1619, 0x1335: 0x1619,\n\t0x1336: 0x1621, 0x1337: 0x1621, 0x1338: 0x1621, 0x1339: 0x1621, 0x133a: 0x1629, 0x133b: 0x1629,\n\t0x133c: 0x1629, 0x133d: 0x1629, 0x133e: 0x1631, 0x133f: 0x1631,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x1631, 0x1341: 0x1631, 0x1342: 0x1639, 0x1343: 0x1639, 0x1344: 0x1641, 0x1345: 0x1641,\n\t0x1346: 0x1649, 0x1347: 0x1649, 0x1348: 0x1651, 0x1349: 0x1651, 0x134a: 0x1659, 0x134b: 0x1659,\n\t0x134c: 0x1661, 0x134d: 0x1661, 0x134e: 0x1669, 0x134f: 0x1669, 0x1350: 0x1669, 0x1351: 0x1669,\n\t0x1352: 0x1671, 0x1353: 0x1671, 0x1354: 0x1671, 0x1355: 0x1671, 0x1356: 0x1679, 0x1357: 0x1679,\n\t0x1358: 0x1679, 0x1359: 0x1679, 0x135a: 0x1681, 0x135b: 0x1681, 0x135c: 0x1681, 0x135d: 0x1681,\n\t0x135e: 0x1689, 0x135f: 0x1689, 0x1360: 0x1691, 0x1361: 0x1691, 0x1362: 0x1691, 0x1363: 0x1691,\n\t0x1364: 0x1699, 0x1365: 0x1699, 0x1366: 0x16a1, 0x1367: 0x16a1, 0x1368: 0x16a1, 0x1369: 0x16a1,\n\t0x136a: 0x16a9, 0x136b: 0x16a9, 0x136c: 0x16a9, 0x136d: 0x16a9, 0x136e: 0x16b1, 0x136f: 0x16b1,\n\t0x1370: 0x16b9, 0x1371: 0x16b9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818,\n\t0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818,\n\t0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0818, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040,\n\t0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040,\n\t0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040,\n\t0x1392: 0x0040, 0x1393: 0x16c1, 0x1394: 0x16c1, 0x1395: 0x16c1, 0x1396: 0x16c1, 0x1397: 0x16c9,\n\t0x1398: 0x16c9, 0x1399: 0x16d1, 0x139a: 0x16d1, 0x139b: 0x16d9, 0x139c: 0x16d9, 0x139d: 0x0149,\n\t0x139e: 0x16e1, 0x139f: 0x16e1, 0x13a0: 0x16e9, 0x13a1: 0x16e9, 0x13a2: 0x16f1, 0x13a3: 0x16f1,\n\t0x13a4: 0x16f9, 0x13a5: 0x16f9, 0x13a6: 0x16f9, 0x13a7: 0x16f9, 0x13a8: 0x1701, 0x13a9: 0x1701,\n\t0x13aa: 0x1709, 0x13ab: 0x1709, 0x13ac: 0x1711, 0x13ad: 0x1711, 0x13ae: 0x1719, 0x13af: 0x1719,\n\t0x13b0: 0x1721, 0x13b1: 0x1721, 0x13b2: 0x1729, 0x13b3: 0x1729, 0x13b4: 0x1731, 0x13b5: 0x1731,\n\t0x13b6: 0x1739, 0x13b7: 0x1739, 0x13b8: 0x1739, 0x13b9: 0x1741, 0x13ba: 0x1741, 0x13bb: 0x1741,\n\t0x13bc: 0x1749, 0x13bd: 0x1749, 0x13be: 0x1749, 0x13bf: 0x1749,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x1949, 0x13c1: 0x1951, 0x13c2: 0x1959, 0x13c3: 0x1961, 0x13c4: 0x1969, 0x13c5: 0x1971,\n\t0x13c6: 0x1979, 0x13c7: 0x1981, 0x13c8: 0x1989, 0x13c9: 0x1991, 0x13ca: 0x1999, 0x13cb: 0x19a1,\n\t0x13cc: 0x19a9, 0x13cd: 0x19b1, 0x13ce: 0x19b9, 0x13cf: 0x19c1, 0x13d0: 0x19c9, 0x13d1: 0x19d1,\n\t0x13d2: 0x19d9, 0x13d3: 0x19e1, 0x13d4: 0x19e9, 0x13d5: 0x19f1, 0x13d6: 0x19f9, 0x13d7: 0x1a01,\n\t0x13d8: 0x1a09, 0x13d9: 0x1a11, 0x13da: 0x1a19, 0x13db: 0x1a21, 0x13dc: 0x1a29, 0x13dd: 0x1a31,\n\t0x13de: 0x1a3a, 0x13df: 0x1a42, 0x13e0: 0x1a4a, 0x13e1: 0x1a52, 0x13e2: 0x1a5a, 0x13e3: 0x1a62,\n\t0x13e4: 0x1a69, 0x13e5: 0x1a71, 0x13e6: 0x1761, 0x13e7: 0x1a79, 0x13e8: 0x1741, 0x13e9: 0x1769,\n\t0x13ea: 0x1a81, 0x13eb: 0x1a89, 0x13ec: 0x1789, 0x13ed: 0x1a91, 0x13ee: 0x1791, 0x13ef: 0x1799,\n\t0x13f0: 0x1a99, 0x13f1: 0x1aa1, 0x13f2: 0x17b9, 0x13f3: 0x1aa9, 0x13f4: 0x17c1, 0x13f5: 0x17c9,\n\t0x13f6: 0x1ab1, 0x13f7: 0x1ab9, 0x13f8: 0x17d9, 0x13f9: 0x1ac1, 0x13fa: 0x17e1, 0x13fb: 0x17e9,\n\t0x13fc: 0x18d1, 0x13fd: 0x18d9, 0x13fe: 0x18f1, 0x13ff: 0x18f9,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x1901, 0x1401: 0x1921, 0x1402: 0x1929, 0x1403: 0x1931, 0x1404: 0x1939, 0x1405: 0x1959,\n\t0x1406: 0x1961, 0x1407: 0x1969, 0x1408: 0x1ac9, 0x1409: 0x1989, 0x140a: 0x1ad1, 0x140b: 0x1ad9,\n\t0x140c: 0x19b9, 0x140d: 0x1ae1, 0x140e: 0x19c1, 0x140f: 0x19c9, 0x1410: 0x1a31, 0x1411: 0x1ae9,\n\t0x1412: 0x1af1, 0x1413: 0x1a09, 0x1414: 0x1af9, 0x1415: 0x1a11, 0x1416: 0x1a19, 0x1417: 0x1751,\n\t0x1418: 0x1759, 0x1419: 0x1b01, 0x141a: 0x1761, 0x141b: 0x1b09, 0x141c: 0x1771, 0x141d: 0x1779,\n\t0x141e: 0x1781, 0x141f: 0x1789, 0x1420: 0x1b11, 0x1421: 0x17a1, 0x1422: 0x17a9, 0x1423: 0x17b1,\n\t0x1424: 0x17b9, 0x1425: 0x1b19, 0x1426: 0x17d9, 0x1427: 0x17f1, 0x1428: 0x17f9, 0x1429: 0x1801,\n\t0x142a: 0x1809, 0x142b: 0x1811, 0x142c: 0x1821, 0x142d: 0x1829, 0x142e: 0x1831, 0x142f: 0x1839,\n\t0x1430: 0x1841, 0x1431: 0x1849, 0x1432: 0x1b21, 0x1433: 0x1851, 0x1434: 0x1859, 0x1435: 0x1861,\n\t0x1436: 0x1869, 0x1437: 0x1871, 0x1438: 0x1879, 0x1439: 0x1889, 0x143a: 0x1891, 0x143b: 0x1899,\n\t0x143c: 0x18a1, 0x143d: 0x18a9, 0x143e: 0x18b1, 0x143f: 0x18b9,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x18c1, 0x1441: 0x18c9, 0x1442: 0x18e1, 0x1443: 0x18e9, 0x1444: 0x1909, 0x1445: 0x1911,\n\t0x1446: 0x1919, 0x1447: 0x1921, 0x1448: 0x1929, 0x1449: 0x1941, 0x144a: 0x1949, 0x144b: 0x1951,\n\t0x144c: 0x1959, 0x144d: 0x1b29, 0x144e: 0x1971, 0x144f: 0x1979, 0x1450: 0x1981, 0x1451: 0x1989,\n\t0x1452: 0x19a1, 0x1453: 0x19a9, 0x1454: 0x19b1, 0x1455: 0x19b9, 0x1456: 0x1b31, 0x1457: 0x19d1,\n\t0x1458: 0x19d9, 0x1459: 0x1b39, 0x145a: 0x19f1, 0x145b: 0x19f9, 0x145c: 0x1a01, 0x145d: 0x1a09,\n\t0x145e: 0x1b41, 0x145f: 0x1761, 0x1460: 0x1b09, 0x1461: 0x1789, 0x1462: 0x1b11, 0x1463: 0x17b9,\n\t0x1464: 0x1b19, 0x1465: 0x17d9, 0x1466: 0x1b49, 0x1467: 0x1841, 0x1468: 0x1b51, 0x1469: 0x1b59,\n\t0x146a: 0x1b61, 0x146b: 0x1921, 0x146c: 0x1929, 0x146d: 0x1959, 0x146e: 0x19b9, 0x146f: 0x1b31,\n\t0x1470: 0x1a09, 0x1471: 0x1b41, 0x1472: 0x1b69, 0x1473: 0x1b71, 0x1474: 0x1b79, 0x1475: 0x1b81,\n\t0x1476: 0x1b89, 0x1477: 0x1b91, 0x1478: 0x1b99, 0x1479: 0x1ba1, 0x147a: 0x1ba9, 0x147b: 0x1bb1,\n\t0x147c: 0x1bb9, 0x147d: 0x1bc1, 0x147e: 0x1bc9, 0x147f: 0x1bd1,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x1bd9, 0x1481: 0x1be1, 0x1482: 0x1be9, 0x1483: 0x1bf1, 0x1484: 0x1bf9, 0x1485: 0x1c01,\n\t0x1486: 0x1c09, 0x1487: 0x1c11, 0x1488: 0x1c19, 0x1489: 0x1c21, 0x148a: 0x1c29, 0x148b: 0x1c31,\n\t0x148c: 0x1b59, 0x148d: 0x1c39, 0x148e: 0x1c41, 0x148f: 0x1c49, 0x1490: 0x1c51, 0x1491: 0x1b81,\n\t0x1492: 0x1b89, 0x1493: 0x1b91, 0x1494: 0x1b99, 0x1495: 0x1ba1, 0x1496: 0x1ba9, 0x1497: 0x1bb1,\n\t0x1498: 0x1bb9, 0x1499: 0x1bc1, 0x149a: 0x1bc9, 0x149b: 0x1bd1, 0x149c: 0x1bd9, 0x149d: 0x1be1,\n\t0x149e: 0x1be9, 0x149f: 0x1bf1, 0x14a0: 0x1bf9, 0x14a1: 0x1c01, 0x14a2: 0x1c09, 0x14a3: 0x1c11,\n\t0x14a4: 0x1c19, 0x14a5: 0x1c21, 0x14a6: 0x1c29, 0x14a7: 0x1c31, 0x14a8: 0x1b59, 0x14a9: 0x1c39,\n\t0x14aa: 0x1c41, 0x14ab: 0x1c49, 0x14ac: 0x1c51, 0x14ad: 0x1c21, 0x14ae: 0x1c29, 0x14af: 0x1c31,\n\t0x14b0: 0x1b59, 0x14b1: 0x1b51, 0x14b2: 0x1b61, 0x14b3: 0x1881, 0x14b4: 0x1829, 0x14b5: 0x1831,\n\t0x14b6: 0x1839, 0x14b7: 0x1c21, 0x14b8: 0x1c29, 0x14b9: 0x1c31, 0x14ba: 0x1881, 0x14bb: 0x1889,\n\t0x14bc: 0x1c59, 0x14bd: 0x1c59, 0x14be: 0x0018, 0x14bf: 0x0018,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0018, 0x14c1: 0x0018, 0x14c2: 0x0018, 0x14c3: 0x0018, 0x14c4: 0x0018, 0x14c5: 0x0018,\n\t0x14c6: 0x0018, 0x14c7: 0x0018, 0x14c8: 0x0018, 0x14c9: 0x0018, 0x14ca: 0x0018, 0x14cb: 0x0018,\n\t0x14cc: 0x0018, 0x14cd: 0x0018, 0x14ce: 0x0018, 0x14cf: 0x0018, 0x14d0: 0x1c61, 0x14d1: 0x1c69,\n\t0x14d2: 0x1c69, 0x14d3: 0x1c71, 0x14d4: 0x1c79, 0x14d5: 0x1c81, 0x14d6: 0x1c89, 0x14d7: 0x1c91,\n\t0x14d8: 0x1c99, 0x14d9: 0x1c99, 0x14da: 0x1ca1, 0x14db: 0x1ca9, 0x14dc: 0x1cb1, 0x14dd: 0x1cb9,\n\t0x14de: 0x1cc1, 0x14df: 0x1cc9, 0x14e0: 0x1cc9, 0x14e1: 0x1cd1, 0x14e2: 0x1cd9, 0x14e3: 0x1cd9,\n\t0x14e4: 0x1ce1, 0x14e5: 0x1ce1, 0x14e6: 0x1ce9, 0x14e7: 0x1cf1, 0x14e8: 0x1cf1, 0x14e9: 0x1cf9,\n\t0x14ea: 0x1d01, 0x14eb: 0x1d01, 0x14ec: 0x1d09, 0x14ed: 0x1d09, 0x14ee: 0x1d11, 0x14ef: 0x1d19,\n\t0x14f0: 0x1d19, 0x14f1: 0x1d21, 0x14f2: 0x1d21, 0x14f3: 0x1d29, 0x14f4: 0x1d31, 0x14f5: 0x1d39,\n\t0x14f6: 0x1d41, 0x14f7: 0x1d41, 0x14f8: 0x1d49, 0x14f9: 0x1d51, 0x14fa: 0x1d59, 0x14fb: 0x1d61,\n\t0x14fc: 0x1d69, 0x14fd: 0x1d69, 0x14fe: 0x1d71, 0x14ff: 0x1d79,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x1f29, 0x1501: 0x1f31, 0x1502: 0x1f39, 0x1503: 0x1f11, 0x1504: 0x1d39, 0x1505: 0x1ce9,\n\t0x1506: 0x1f41, 0x1507: 0x1f49, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040,\n\t0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0018, 0x1510: 0x0040, 0x1511: 0x0040,\n\t0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040,\n\t0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,\n\t0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040,\n\t0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040,\n\t0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040,\n\t0x1530: 0x1f51, 0x1531: 0x1f59, 0x1532: 0x1f61, 0x1533: 0x1f69, 0x1534: 0x1f71, 0x1535: 0x1f79,\n\t0x1536: 0x1f81, 0x1537: 0x1f89, 0x1538: 0x1f91, 0x1539: 0x1f99, 0x153a: 0x1fa2, 0x153b: 0x1faa,\n\t0x153c: 0x1fb1, 0x153d: 0x0018, 0x153e: 0x0018, 0x153f: 0x0018,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0,\n\t0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0,\n\t0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0x1fba, 0x1551: 0x7d8d,\n\t0x1552: 0x0040, 0x1553: 0x1fc2, 0x1554: 0x0122, 0x1555: 0x1fca, 0x1556: 0x1fd2, 0x1557: 0x7dad,\n\t0x1558: 0x7dcd, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040,\n\t0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308,\n\t0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308,\n\t0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308,\n\t0x1570: 0x0040, 0x1571: 0x7ded, 0x1572: 0x7e0d, 0x1573: 0x1fda, 0x1574: 0x1fda, 0x1575: 0x072a,\n\t0x1576: 0x0732, 0x1577: 0x1fe2, 0x1578: 0x1fea, 0x1579: 0x7e2d, 0x157a: 0x7e4d, 0x157b: 0x7e6d,\n\t0x157c: 0x7e2d, 0x157d: 0x7e8d, 0x157e: 0x7ead, 0x157f: 0x7e8d,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x7ecd, 0x1581: 0x7eed, 0x1582: 0x7f0d, 0x1583: 0x7eed, 0x1584: 0x7f2d, 0x1585: 0x0018,\n\t0x1586: 0x0018, 0x1587: 0x1ff2, 0x1588: 0x1ffa, 0x1589: 0x7f4e, 0x158a: 0x7f6e, 0x158b: 0x7f8e,\n\t0x158c: 0x7fae, 0x158d: 0x1fda, 0x158e: 0x1fda, 0x158f: 0x1fda, 0x1590: 0x1fba, 0x1591: 0x7fcd,\n\t0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x0122, 0x1595: 0x1fc2, 0x1596: 0x1fd2, 0x1597: 0x1fca,\n\t0x1598: 0x7fed, 0x1599: 0x072a, 0x159a: 0x0732, 0x159b: 0x1fe2, 0x159c: 0x1fea, 0x159d: 0x7ecd,\n\t0x159e: 0x7f2d, 0x159f: 0x2002, 0x15a0: 0x200a, 0x15a1: 0x2012, 0x15a2: 0x071a, 0x15a3: 0x2019,\n\t0x15a4: 0x2022, 0x15a5: 0x202a, 0x15a6: 0x0722, 0x15a7: 0x0040, 0x15a8: 0x2032, 0x15a9: 0x203a,\n\t0x15aa: 0x2042, 0x15ab: 0x204a, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040,\n\t0x15b0: 0x800e, 0x15b1: 0x2051, 0x15b2: 0x802e, 0x15b3: 0x0808, 0x15b4: 0x804e, 0x15b5: 0x0040,\n\t0x15b6: 0x806e, 0x15b7: 0x2059, 0x15b8: 0x808e, 0x15b9: 0x2061, 0x15ba: 0x80ae, 0x15bb: 0x2069,\n\t0x15bc: 0x80ce, 0x15bd: 0x2071, 0x15be: 0x80ee, 0x15bf: 0x2079,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x2081, 0x15c1: 0x2089, 0x15c2: 0x2089, 0x15c3: 0x2091, 0x15c4: 0x2091, 0x15c5: 0x2099,\n\t0x15c6: 0x2099, 0x15c7: 0x20a1, 0x15c8: 0x20a1, 0x15c9: 0x20a9, 0x15ca: 0x20a9, 0x15cb: 0x20a9,\n\t0x15cc: 0x20a9, 0x15cd: 0x20b1, 0x15ce: 0x20b1, 0x15cf: 0x20b9, 0x15d0: 0x20b9, 0x15d1: 0x20b9,\n\t0x15d2: 0x20b9, 0x15d3: 0x20c1, 0x15d4: 0x20c1, 0x15d5: 0x20c9, 0x15d6: 0x20c9, 0x15d7: 0x20c9,\n\t0x15d8: 0x20c9, 0x15d9: 0x20d1, 0x15da: 0x20d1, 0x15db: 0x20d1, 0x15dc: 0x20d1, 0x15dd: 0x20d9,\n\t0x15de: 0x20d9, 0x15df: 0x20d9, 0x15e0: 0x20d9, 0x15e1: 0x20e1, 0x15e2: 0x20e1, 0x15e3: 0x20e1,\n\t0x15e4: 0x20e1, 0x15e5: 0x20e9, 0x15e6: 0x20e9, 0x15e7: 0x20e9, 0x15e8: 0x20e9, 0x15e9: 0x20f1,\n\t0x15ea: 0x20f1, 0x15eb: 0x20f9, 0x15ec: 0x20f9, 0x15ed: 0x2101, 0x15ee: 0x2101, 0x15ef: 0x2109,\n\t0x15f0: 0x2109, 0x15f1: 0x2111, 0x15f2: 0x2111, 0x15f3: 0x2111, 0x15f4: 0x2111, 0x15f5: 0x2119,\n\t0x15f6: 0x2119, 0x15f7: 0x2119, 0x15f8: 0x2119, 0x15f9: 0x2121, 0x15fa: 0x2121, 0x15fb: 0x2121,\n\t0x15fc: 0x2121, 0x15fd: 0x2129, 0x15fe: 0x2129, 0x15ff: 0x2129,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x2129, 0x1601: 0x2131, 0x1602: 0x2131, 0x1603: 0x2131, 0x1604: 0x2131, 0x1605: 0x2139,\n\t0x1606: 0x2139, 0x1607: 0x2139, 0x1608: 0x2139, 0x1609: 0x2141, 0x160a: 0x2141, 0x160b: 0x2141,\n\t0x160c: 0x2141, 0x160d: 0x2149, 0x160e: 0x2149, 0x160f: 0x2149, 0x1610: 0x2149, 0x1611: 0x2151,\n\t0x1612: 0x2151, 0x1613: 0x2151, 0x1614: 0x2151, 0x1615: 0x2159, 0x1616: 0x2159, 0x1617: 0x2159,\n\t0x1618: 0x2159, 0x1619: 0x2161, 0x161a: 0x2161, 0x161b: 0x2161, 0x161c: 0x2161, 0x161d: 0x2169,\n\t0x161e: 0x2169, 0x161f: 0x2169, 0x1620: 0x2169, 0x1621: 0x2171, 0x1622: 0x2171, 0x1623: 0x2171,\n\t0x1624: 0x2171, 0x1625: 0x2179, 0x1626: 0x2179, 0x1627: 0x2179, 0x1628: 0x2179, 0x1629: 0x2181,\n\t0x162a: 0x2181, 0x162b: 0x2181, 0x162c: 0x2181, 0x162d: 0x2189, 0x162e: 0x2189, 0x162f: 0x1701,\n\t0x1630: 0x1701, 0x1631: 0x2191, 0x1632: 0x2191, 0x1633: 0x2191, 0x1634: 0x2191, 0x1635: 0x2199,\n\t0x1636: 0x2199, 0x1637: 0x21a1, 0x1638: 0x21a1, 0x1639: 0x21a9, 0x163a: 0x21a9, 0x163b: 0x21b1,\n\t0x163c: 0x21b1, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0040, 0x1641: 0x1fca, 0x1642: 0x21ba, 0x1643: 0x2002, 0x1644: 0x203a, 0x1645: 0x2042,\n\t0x1646: 0x200a, 0x1647: 0x21c2, 0x1648: 0x072a, 0x1649: 0x0732, 0x164a: 0x2012, 0x164b: 0x071a,\n\t0x164c: 0x1fba, 0x164d: 0x2019, 0x164e: 0x0961, 0x164f: 0x21ca, 0x1650: 0x06e1, 0x1651: 0x0049,\n\t0x1652: 0x0029, 0x1653: 0x0031, 0x1654: 0x06e9, 0x1655: 0x06f1, 0x1656: 0x06f9, 0x1657: 0x0701,\n\t0x1658: 0x0709, 0x1659: 0x0711, 0x165a: 0x1fc2, 0x165b: 0x0122, 0x165c: 0x2022, 0x165d: 0x0722,\n\t0x165e: 0x202a, 0x165f: 0x1fd2, 0x1660: 0x204a, 0x1661: 0x0019, 0x1662: 0x02e9, 0x1663: 0x03d9,\n\t0x1664: 0x02f1, 0x1665: 0x02f9, 0x1666: 0x03f1, 0x1667: 0x0309, 0x1668: 0x00a9, 0x1669: 0x0311,\n\t0x166a: 0x00b1, 0x166b: 0x0319, 0x166c: 0x0101, 0x166d: 0x0321, 0x166e: 0x0329, 0x166f: 0x0051,\n\t0x1670: 0x0339, 0x1671: 0x0751, 0x1672: 0x00b9, 0x1673: 0x0089, 0x1674: 0x0341, 0x1675: 0x0349,\n\t0x1676: 0x0391, 0x1677: 0x00c1, 0x1678: 0x0109, 0x1679: 0x00c9, 0x167a: 0x04b1, 0x167b: 0x1ff2,\n\t0x167c: 0x2032, 0x167d: 0x1ffa, 0x167e: 0x21d2, 0x167f: 0x1fda,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x0672, 0x1681: 0x0019, 0x1682: 0x02e9, 0x1683: 0x03d9, 0x1684: 0x02f1, 0x1685: 0x02f9,\n\t0x1686: 0x03f1, 0x1687: 0x0309, 0x1688: 0x00a9, 0x1689: 0x0311, 0x168a: 0x00b1, 0x168b: 0x0319,\n\t0x168c: 0x0101, 0x168d: 0x0321, 0x168e: 0x0329, 0x168f: 0x0051, 0x1690: 0x0339, 0x1691: 0x0751,\n\t0x1692: 0x00b9, 0x1693: 0x0089, 0x1694: 0x0341, 0x1695: 0x0349, 0x1696: 0x0391, 0x1697: 0x00c1,\n\t0x1698: 0x0109, 0x1699: 0x00c9, 0x169a: 0x04b1, 0x169b: 0x1fe2, 0x169c: 0x21da, 0x169d: 0x1fea,\n\t0x169e: 0x21e2, 0x169f: 0x810d, 0x16a0: 0x812d, 0x16a1: 0x0961, 0x16a2: 0x814d, 0x16a3: 0x814d,\n\t0x16a4: 0x816d, 0x16a5: 0x818d, 0x16a6: 0x81ad, 0x16a7: 0x81cd, 0x16a8: 0x81ed, 0x16a9: 0x820d,\n\t0x16aa: 0x822d, 0x16ab: 0x824d, 0x16ac: 0x826d, 0x16ad: 0x828d, 0x16ae: 0x82ad, 0x16af: 0x82cd,\n\t0x16b0: 0x82ed, 0x16b1: 0x830d, 0x16b2: 0x832d, 0x16b3: 0x834d, 0x16b4: 0x836d, 0x16b5: 0x838d,\n\t0x16b6: 0x83ad, 0x16b7: 0x83cd, 0x16b8: 0x83ed, 0x16b9: 0x840d, 0x16ba: 0x842d, 0x16bb: 0x844d,\n\t0x16bc: 0x81ed, 0x16bd: 0x846d, 0x16be: 0x848d, 0x16bf: 0x824d,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x84ad, 0x16c1: 0x84cd, 0x16c2: 0x84ed, 0x16c3: 0x850d, 0x16c4: 0x852d, 0x16c5: 0x854d,\n\t0x16c6: 0x856d, 0x16c7: 0x858d, 0x16c8: 0x850d, 0x16c9: 0x85ad, 0x16ca: 0x850d, 0x16cb: 0x85cd,\n\t0x16cc: 0x85cd, 0x16cd: 0x85ed, 0x16ce: 0x85ed, 0x16cf: 0x860d, 0x16d0: 0x854d, 0x16d1: 0x862d,\n\t0x16d2: 0x864d, 0x16d3: 0x862d, 0x16d4: 0x866d, 0x16d5: 0x864d, 0x16d6: 0x868d, 0x16d7: 0x868d,\n\t0x16d8: 0x86ad, 0x16d9: 0x86ad, 0x16da: 0x86cd, 0x16db: 0x86cd, 0x16dc: 0x864d, 0x16dd: 0x814d,\n\t0x16de: 0x86ed, 0x16df: 0x870d, 0x16e0: 0x0040, 0x16e1: 0x872d, 0x16e2: 0x874d, 0x16e3: 0x876d,\n\t0x16e4: 0x878d, 0x16e5: 0x876d, 0x16e6: 0x87ad, 0x16e7: 0x87cd, 0x16e8: 0x87ed, 0x16e9: 0x87ed,\n\t0x16ea: 0x880d, 0x16eb: 0x880d, 0x16ec: 0x882d, 0x16ed: 0x882d, 0x16ee: 0x880d, 0x16ef: 0x880d,\n\t0x16f0: 0x884d, 0x16f1: 0x886d, 0x16f2: 0x888d, 0x16f3: 0x88ad, 0x16f4: 0x88cd, 0x16f5: 0x88ed,\n\t0x16f6: 0x88ed, 0x16f7: 0x88ed, 0x16f8: 0x890d, 0x16f9: 0x890d, 0x16fa: 0x890d, 0x16fb: 0x890d,\n\t0x16fc: 0x87ed, 0x16fd: 0x87ed, 0x16fe: 0x87ed, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x874d, 0x1703: 0x872d, 0x1704: 0x892d, 0x1705: 0x872d,\n\t0x1706: 0x874d, 0x1707: 0x872d, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x894d, 0x170b: 0x874d,\n\t0x170c: 0x896d, 0x170d: 0x892d, 0x170e: 0x896d, 0x170f: 0x874d, 0x1710: 0x0040, 0x1711: 0x0040,\n\t0x1712: 0x898d, 0x1713: 0x89ad, 0x1714: 0x88ad, 0x1715: 0x896d, 0x1716: 0x892d, 0x1717: 0x896d,\n\t0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x89cd, 0x171b: 0x89ed, 0x171c: 0x89cd, 0x171d: 0x0040,\n\t0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0x21e9, 0x1721: 0x21f1, 0x1722: 0x21f9, 0x1723: 0x8a0e,\n\t0x1724: 0x2201, 0x1725: 0x2209, 0x1726: 0x8a2d, 0x1727: 0x0040, 0x1728: 0x8a4d, 0x1729: 0x8a6d,\n\t0x172a: 0x8a8d, 0x172b: 0x8a6d, 0x172c: 0x8aad, 0x172d: 0x8acd, 0x172e: 0x8aed, 0x172f: 0x0040,\n\t0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040,\n\t0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x0008, 0x1741: 0x0008, 0x1742: 0x0008, 0x1743: 0x0008, 0x1744: 0x0008, 0x1745: 0x0008,\n\t0x1746: 0x0008, 0x1747: 0x0008, 0x1748: 0x0008, 0x1749: 0x0008, 0x174a: 0x0008, 0x174b: 0x0008,\n\t0x174c: 0x0008, 0x174d: 0x0008, 0x174e: 0x0008, 0x174f: 0x0008, 0x1750: 0x0008, 0x1751: 0x0008,\n\t0x1752: 0x0008, 0x1753: 0x0008, 0x1754: 0x0008, 0x1755: 0x0008, 0x1756: 0x0008, 0x1757: 0x0008,\n\t0x1758: 0x0008, 0x1759: 0x0008, 0x175a: 0x0008, 0x175b: 0x0008, 0x175c: 0x0008, 0x175d: 0x0008,\n\t0x175e: 0x0008, 0x175f: 0x0008, 0x1760: 0x0008, 0x1761: 0x0008, 0x1762: 0x0008, 0x1763: 0x0008,\n\t0x1764: 0x0040, 0x1765: 0x0040, 0x1766: 0x0040, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040,\n\t0x176a: 0x0040, 0x176b: 0x0040, 0x176c: 0x0040, 0x176d: 0x0040, 0x176e: 0x0040, 0x176f: 0x0018,\n\t0x1770: 0x8b3d, 0x1771: 0x8b55, 0x1772: 0x8b6d, 0x1773: 0x8b55, 0x1774: 0x8b85, 0x1775: 0x8b55,\n\t0x1776: 0x8b6d, 0x1777: 0x8b55, 0x1778: 0x8b3d, 0x1779: 0x8b9d, 0x177a: 0x8bb5, 0x177b: 0x0040,\n\t0x177c: 0x8bcd, 0x177d: 0x8b9d, 0x177e: 0x8bb5, 0x177f: 0x8b9d,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0xe13d, 0x1781: 0xe14d, 0x1782: 0xe15d, 0x1783: 0xe14d, 0x1784: 0xe17d, 0x1785: 0xe14d,\n\t0x1786: 0xe15d, 0x1787: 0xe14d, 0x1788: 0xe13d, 0x1789: 0xe1cd, 0x178a: 0xe1dd, 0x178b: 0x0040,\n\t0x178c: 0xe1fd, 0x178d: 0xe1cd, 0x178e: 0xe1dd, 0x178f: 0xe1cd, 0x1790: 0xe13d, 0x1791: 0xe14d,\n\t0x1792: 0xe15d, 0x1793: 0x0040, 0x1794: 0xe17d, 0x1795: 0xe14d, 0x1796: 0x0040, 0x1797: 0x0008,\n\t0x1798: 0x0008, 0x1799: 0x0008, 0x179a: 0x0008, 0x179b: 0x0008, 0x179c: 0x0008, 0x179d: 0x0008,\n\t0x179e: 0x0008, 0x179f: 0x0008, 0x17a0: 0x0008, 0x17a1: 0x0008, 0x17a2: 0x0040, 0x17a3: 0x0008,\n\t0x17a4: 0x0008, 0x17a5: 0x0008, 0x17a6: 0x0008, 0x17a7: 0x0008, 0x17a8: 0x0008, 0x17a9: 0x0008,\n\t0x17aa: 0x0008, 0x17ab: 0x0008, 0x17ac: 0x0008, 0x17ad: 0x0008, 0x17ae: 0x0008, 0x17af: 0x0008,\n\t0x17b0: 0x0008, 0x17b1: 0x0008, 0x17b2: 0x0040, 0x17b3: 0x0008, 0x17b4: 0x0008, 0x17b5: 0x0008,\n\t0x17b6: 0x0008, 0x17b7: 0x0008, 0x17b8: 0x0008, 0x17b9: 0x0008, 0x17ba: 0x0040, 0x17bb: 0x0008,\n\t0x17bc: 0x0008, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x0008, 0x17c1: 0x2211, 0x17c2: 0x2219, 0x17c3: 0x02e1, 0x17c4: 0x2221, 0x17c5: 0x2229,\n\t0x17c6: 0x0040, 0x17c7: 0x2231, 0x17c8: 0x2239, 0x17c9: 0x2241, 0x17ca: 0x2249, 0x17cb: 0x2251,\n\t0x17cc: 0x2259, 0x17cd: 0x2261, 0x17ce: 0x2269, 0x17cf: 0x2271, 0x17d0: 0x2279, 0x17d1: 0x2281,\n\t0x17d2: 0x2289, 0x17d3: 0x2291, 0x17d4: 0x2299, 0x17d5: 0x0741, 0x17d6: 0x22a1, 0x17d7: 0x22a9,\n\t0x17d8: 0x22b1, 0x17d9: 0x22b9, 0x17da: 0x22c1, 0x17db: 0x13d9, 0x17dc: 0x8be5, 0x17dd: 0x22c9,\n\t0x17de: 0x22d1, 0x17df: 0x8c05, 0x17e0: 0x22d9, 0x17e1: 0x8c25, 0x17e2: 0x22e1, 0x17e3: 0x22e9,\n\t0x17e4: 0x22f1, 0x17e5: 0x0751, 0x17e6: 0x22f9, 0x17e7: 0x8c45, 0x17e8: 0x0949, 0x17e9: 0x2301,\n\t0x17ea: 0x2309, 0x17eb: 0x2311, 0x17ec: 0x2319, 0x17ed: 0x2321, 0x17ee: 0x2329, 0x17ef: 0x2331,\n\t0x17f0: 0x2339, 0x17f1: 0x0040, 0x17f2: 0x2341, 0x17f3: 0x2349, 0x17f4: 0x2351, 0x17f5: 0x2359,\n\t0x17f6: 0x2361, 0x17f7: 0x2369, 0x17f8: 0x2371, 0x17f9: 0x8c65, 0x17fa: 0x8c85, 0x17fb: 0x0040,\n\t0x17fc: 0x0040, 0x17fd: 0x0040, 0x17fe: 0x0040, 0x17ff: 0x0040,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x0a08, 0x1801: 0x0a08, 0x1802: 0x0a08, 0x1803: 0x0a08, 0x1804: 0x0a08, 0x1805: 0x0c08,\n\t0x1806: 0x0808, 0x1807: 0x0c08, 0x1808: 0x0818, 0x1809: 0x0c08, 0x180a: 0x0c08, 0x180b: 0x0808,\n\t0x180c: 0x0808, 0x180d: 0x0908, 0x180e: 0x0c08, 0x180f: 0x0c08, 0x1810: 0x0c08, 0x1811: 0x0c08,\n\t0x1812: 0x0c08, 0x1813: 0x0a08, 0x1814: 0x0a08, 0x1815: 0x0a08, 0x1816: 0x0a08, 0x1817: 0x0908,\n\t0x1818: 0x0a08, 0x1819: 0x0a08, 0x181a: 0x0a08, 0x181b: 0x0a08, 0x181c: 0x0a08, 0x181d: 0x0c08,\n\t0x181e: 0x0a08, 0x181f: 0x0a08, 0x1820: 0x0a08, 0x1821: 0x0c08, 0x1822: 0x0808, 0x1823: 0x0808,\n\t0x1824: 0x0c08, 0x1825: 0x3308, 0x1826: 0x3308, 0x1827: 0x0040, 0x1828: 0x0040, 0x1829: 0x0040,\n\t0x182a: 0x0040, 0x182b: 0x0a18, 0x182c: 0x0a18, 0x182d: 0x0a18, 0x182e: 0x0a18, 0x182f: 0x0c18,\n\t0x1830: 0x0818, 0x1831: 0x0818, 0x1832: 0x0818, 0x1833: 0x0818, 0x1834: 0x0818, 0x1835: 0x0818,\n\t0x1836: 0x0818, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040,\n\t0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0a08, 0x1841: 0x0c08, 0x1842: 0x0a08, 0x1843: 0x0c08, 0x1844: 0x0c08, 0x1845: 0x0c08,\n\t0x1846: 0x0a08, 0x1847: 0x0a08, 0x1848: 0x0a08, 0x1849: 0x0c08, 0x184a: 0x0a08, 0x184b: 0x0a08,\n\t0x184c: 0x0c08, 0x184d: 0x0a08, 0x184e: 0x0c08, 0x184f: 0x0c08, 0x1850: 0x0a08, 0x1851: 0x0c08,\n\t0x1852: 0x0040, 0x1853: 0x0040, 0x1854: 0x0040, 0x1855: 0x0040, 0x1856: 0x0040, 0x1857: 0x0040,\n\t0x1858: 0x0040, 0x1859: 0x0818, 0x185a: 0x0818, 0x185b: 0x0818, 0x185c: 0x0818, 0x185d: 0x0040,\n\t0x185e: 0x0040, 0x185f: 0x0040, 0x1860: 0x0040, 0x1861: 0x0040, 0x1862: 0x0040, 0x1863: 0x0040,\n\t0x1864: 0x0040, 0x1865: 0x0040, 0x1866: 0x0040, 0x1867: 0x0040, 0x1868: 0x0040, 0x1869: 0x0c18,\n\t0x186a: 0x0c18, 0x186b: 0x0c18, 0x186c: 0x0c18, 0x186d: 0x0a18, 0x186e: 0x0a18, 0x186f: 0x0818,\n\t0x1870: 0x0040, 0x1871: 0x0040, 0x1872: 0x0040, 0x1873: 0x0040, 0x1874: 0x0040, 0x1875: 0x0040,\n\t0x1876: 0x0040, 0x1877: 0x0040, 0x1878: 0x0040, 0x1879: 0x0040, 0x187a: 0x0040, 0x187b: 0x0040,\n\t0x187c: 0x0040, 0x187d: 0x0040, 0x187e: 0x0040, 0x187f: 0x0040,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x3308, 0x1881: 0x3308, 0x1882: 0x3008, 0x1883: 0x3008, 0x1884: 0x0040, 0x1885: 0x0008,\n\t0x1886: 0x0008, 0x1887: 0x0008, 0x1888: 0x0008, 0x1889: 0x0008, 0x188a: 0x0008, 0x188b: 0x0008,\n\t0x188c: 0x0008, 0x188d: 0x0040, 0x188e: 0x0040, 0x188f: 0x0008, 0x1890: 0x0008, 0x1891: 0x0040,\n\t0x1892: 0x0040, 0x1893: 0x0008, 0x1894: 0x0008, 0x1895: 0x0008, 0x1896: 0x0008, 0x1897: 0x0008,\n\t0x1898: 0x0008, 0x1899: 0x0008, 0x189a: 0x0008, 0x189b: 0x0008, 0x189c: 0x0008, 0x189d: 0x0008,\n\t0x189e: 0x0008, 0x189f: 0x0008, 0x18a0: 0x0008, 0x18a1: 0x0008, 0x18a2: 0x0008, 0x18a3: 0x0008,\n\t0x18a4: 0x0008, 0x18a5: 0x0008, 0x18a6: 0x0008, 0x18a7: 0x0008, 0x18a8: 0x0008, 0x18a9: 0x0040,\n\t0x18aa: 0x0008, 0x18ab: 0x0008, 0x18ac: 0x0008, 0x18ad: 0x0008, 0x18ae: 0x0008, 0x18af: 0x0008,\n\t0x18b0: 0x0008, 0x18b1: 0x0040, 0x18b2: 0x0008, 0x18b3: 0x0008, 0x18b4: 0x0040, 0x18b5: 0x0008,\n\t0x18b6: 0x0008, 0x18b7: 0x0008, 0x18b8: 0x0008, 0x18b9: 0x0008, 0x18ba: 0x0040, 0x18bb: 0x3308,\n\t0x18bc: 0x3308, 0x18bd: 0x0008, 0x18be: 0x3008, 0x18bf: 0x3008,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x3308, 0x18c1: 0x3008, 0x18c2: 0x3008, 0x18c3: 0x3008, 0x18c4: 0x3008, 0x18c5: 0x0040,\n\t0x18c6: 0x0040, 0x18c7: 0x3008, 0x18c8: 0x3008, 0x18c9: 0x0040, 0x18ca: 0x0040, 0x18cb: 0x3008,\n\t0x18cc: 0x3008, 0x18cd: 0x3808, 0x18ce: 0x0040, 0x18cf: 0x0040, 0x18d0: 0x0008, 0x18d1: 0x0040,\n\t0x18d2: 0x0040, 0x18d3: 0x0040, 0x18d4: 0x0040, 0x18d5: 0x0040, 0x18d6: 0x0040, 0x18d7: 0x3008,\n\t0x18d8: 0x0040, 0x18d9: 0x0040, 0x18da: 0x0040, 0x18db: 0x0040, 0x18dc: 0x0040, 0x18dd: 0x0008,\n\t0x18de: 0x0008, 0x18df: 0x0008, 0x18e0: 0x0008, 0x18e1: 0x0008, 0x18e2: 0x3008, 0x18e3: 0x3008,\n\t0x18e4: 0x0040, 0x18e5: 0x0040, 0x18e6: 0x3308, 0x18e7: 0x3308, 0x18e8: 0x3308, 0x18e9: 0x3308,\n\t0x18ea: 0x3308, 0x18eb: 0x3308, 0x18ec: 0x3308, 0x18ed: 0x0040, 0x18ee: 0x0040, 0x18ef: 0x0040,\n\t0x18f0: 0x3308, 0x18f1: 0x3308, 0x18f2: 0x3308, 0x18f3: 0x3308, 0x18f4: 0x3308, 0x18f5: 0x0040,\n\t0x18f6: 0x0040, 0x18f7: 0x0040, 0x18f8: 0x0040, 0x18f9: 0x0040, 0x18fa: 0x0040, 0x18fb: 0x0040,\n\t0x18fc: 0x0040, 0x18fd: 0x0040, 0x18fe: 0x0040, 0x18ff: 0x0040,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x0008, 0x1901: 0x0008, 0x1902: 0x0008, 0x1903: 0x0008, 0x1904: 0x0008, 0x1905: 0x0008,\n\t0x1906: 0x0008, 0x1907: 0x0040, 0x1908: 0x0040, 0x1909: 0x0008, 0x190a: 0x0040, 0x190b: 0x0040,\n\t0x190c: 0x0008, 0x190d: 0x0008, 0x190e: 0x0008, 0x190f: 0x0008, 0x1910: 0x0008, 0x1911: 0x0008,\n\t0x1912: 0x0008, 0x1913: 0x0008, 0x1914: 0x0040, 0x1915: 0x0008, 0x1916: 0x0008, 0x1917: 0x0040,\n\t0x1918: 0x0008, 0x1919: 0x0008, 0x191a: 0x0008, 0x191b: 0x0008, 0x191c: 0x0008, 0x191d: 0x0008,\n\t0x191e: 0x0008, 0x191f: 0x0008, 0x1920: 0x0008, 0x1921: 0x0008, 0x1922: 0x0008, 0x1923: 0x0008,\n\t0x1924: 0x0008, 0x1925: 0x0008, 0x1926: 0x0008, 0x1927: 0x0008, 0x1928: 0x0008, 0x1929: 0x0008,\n\t0x192a: 0x0008, 0x192b: 0x0008, 0x192c: 0x0008, 0x192d: 0x0008, 0x192e: 0x0008, 0x192f: 0x0008,\n\t0x1930: 0x3008, 0x1931: 0x3008, 0x1932: 0x3008, 0x1933: 0x3008, 0x1934: 0x3008, 0x1935: 0x3008,\n\t0x1936: 0x0040, 0x1937: 0x3008, 0x1938: 0x3008, 0x1939: 0x0040, 0x193a: 0x0040, 0x193b: 0x3308,\n\t0x193c: 0x3308, 0x193d: 0x3808, 0x193e: 0x3b08, 0x193f: 0x0008,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0019, 0x1941: 0x02e9, 0x1942: 0x03d9, 0x1943: 0x02f1, 0x1944: 0x02f9, 0x1945: 0x03f1,\n\t0x1946: 0x0309, 0x1947: 0x00a9, 0x1948: 0x0311, 0x1949: 0x00b1, 0x194a: 0x0319, 0x194b: 0x0101,\n\t0x194c: 0x0321, 0x194d: 0x0329, 0x194e: 0x0051, 0x194f: 0x0339, 0x1950: 0x0751, 0x1951: 0x00b9,\n\t0x1952: 0x0089, 0x1953: 0x0341, 0x1954: 0x0349, 0x1955: 0x0391, 0x1956: 0x00c1, 0x1957: 0x0109,\n\t0x1958: 0x00c9, 0x1959: 0x04b1, 0x195a: 0x0019, 0x195b: 0x02e9, 0x195c: 0x03d9, 0x195d: 0x02f1,\n\t0x195e: 0x02f9, 0x195f: 0x03f1, 0x1960: 0x0309, 0x1961: 0x00a9, 0x1962: 0x0311, 0x1963: 0x00b1,\n\t0x1964: 0x0319, 0x1965: 0x0101, 0x1966: 0x0321, 0x1967: 0x0329, 0x1968: 0x0051, 0x1969: 0x0339,\n\t0x196a: 0x0751, 0x196b: 0x00b9, 0x196c: 0x0089, 0x196d: 0x0341, 0x196e: 0x0349, 0x196f: 0x0391,\n\t0x1970: 0x00c1, 0x1971: 0x0109, 0x1972: 0x00c9, 0x1973: 0x04b1, 0x1974: 0x0019, 0x1975: 0x02e9,\n\t0x1976: 0x03d9, 0x1977: 0x02f1, 0x1978: 0x02f9, 0x1979: 0x03f1, 0x197a: 0x0309, 0x197b: 0x00a9,\n\t0x197c: 0x0311, 0x197d: 0x00b1, 0x197e: 0x0319, 0x197f: 0x0101,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0321, 0x1981: 0x0329, 0x1982: 0x0051, 0x1983: 0x0339, 0x1984: 0x0751, 0x1985: 0x00b9,\n\t0x1986: 0x0089, 0x1987: 0x0341, 0x1988: 0x0349, 0x1989: 0x0391, 0x198a: 0x00c1, 0x198b: 0x0109,\n\t0x198c: 0x00c9, 0x198d: 0x04b1, 0x198e: 0x0019, 0x198f: 0x02e9, 0x1990: 0x03d9, 0x1991: 0x02f1,\n\t0x1992: 0x02f9, 0x1993: 0x03f1, 0x1994: 0x0309, 0x1995: 0x0040, 0x1996: 0x0311, 0x1997: 0x00b1,\n\t0x1998: 0x0319, 0x1999: 0x0101, 0x199a: 0x0321, 0x199b: 0x0329, 0x199c: 0x0051, 0x199d: 0x0339,\n\t0x199e: 0x0751, 0x199f: 0x00b9, 0x19a0: 0x0089, 0x19a1: 0x0341, 0x19a2: 0x0349, 0x19a3: 0x0391,\n\t0x19a4: 0x00c1, 0x19a5: 0x0109, 0x19a6: 0x00c9, 0x19a7: 0x04b1, 0x19a8: 0x0019, 0x19a9: 0x02e9,\n\t0x19aa: 0x03d9, 0x19ab: 0x02f1, 0x19ac: 0x02f9, 0x19ad: 0x03f1, 0x19ae: 0x0309, 0x19af: 0x00a9,\n\t0x19b0: 0x0311, 0x19b1: 0x00b1, 0x19b2: 0x0319, 0x19b3: 0x0101, 0x19b4: 0x0321, 0x19b5: 0x0329,\n\t0x19b6: 0x0051, 0x19b7: 0x0339, 0x19b8: 0x0751, 0x19b9: 0x00b9, 0x19ba: 0x0089, 0x19bb: 0x0341,\n\t0x19bc: 0x0349, 0x19bd: 0x0391, 0x19be: 0x00c1, 0x19bf: 0x0109,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x00c9, 0x19c1: 0x04b1, 0x19c2: 0x0019, 0x19c3: 0x02e9, 0x19c4: 0x03d9, 0x19c5: 0x02f1,\n\t0x19c6: 0x02f9, 0x19c7: 0x03f1, 0x19c8: 0x0309, 0x19c9: 0x00a9, 0x19ca: 0x0311, 0x19cb: 0x00b1,\n\t0x19cc: 0x0319, 0x19cd: 0x0101, 0x19ce: 0x0321, 0x19cf: 0x0329, 0x19d0: 0x0051, 0x19d1: 0x0339,\n\t0x19d2: 0x0751, 0x19d3: 0x00b9, 0x19d4: 0x0089, 0x19d5: 0x0341, 0x19d6: 0x0349, 0x19d7: 0x0391,\n\t0x19d8: 0x00c1, 0x19d9: 0x0109, 0x19da: 0x00c9, 0x19db: 0x04b1, 0x19dc: 0x0019, 0x19dd: 0x0040,\n\t0x19de: 0x03d9, 0x19df: 0x02f1, 0x19e0: 0x0040, 0x19e1: 0x0040, 0x19e2: 0x0309, 0x19e3: 0x0040,\n\t0x19e4: 0x0040, 0x19e5: 0x00b1, 0x19e6: 0x0319, 0x19e7: 0x0040, 0x19e8: 0x0040, 0x19e9: 0x0329,\n\t0x19ea: 0x0051, 0x19eb: 0x0339, 0x19ec: 0x0751, 0x19ed: 0x0040, 0x19ee: 0x0089, 0x19ef: 0x0341,\n\t0x19f0: 0x0349, 0x19f1: 0x0391, 0x19f2: 0x00c1, 0x19f3: 0x0109, 0x19f4: 0x00c9, 0x19f5: 0x04b1,\n\t0x19f6: 0x0019, 0x19f7: 0x02e9, 0x19f8: 0x03d9, 0x19f9: 0x02f1, 0x19fa: 0x0040, 0x19fb: 0x03f1,\n\t0x19fc: 0x0040, 0x19fd: 0x00a9, 0x19fe: 0x0311, 0x19ff: 0x00b1,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x0319, 0x1a01: 0x0101, 0x1a02: 0x0321, 0x1a03: 0x0329, 0x1a04: 0x0040, 0x1a05: 0x0339,\n\t0x1a06: 0x0751, 0x1a07: 0x00b9, 0x1a08: 0x0089, 0x1a09: 0x0341, 0x1a0a: 0x0349, 0x1a0b: 0x0391,\n\t0x1a0c: 0x00c1, 0x1a0d: 0x0109, 0x1a0e: 0x00c9, 0x1a0f: 0x04b1, 0x1a10: 0x0019, 0x1a11: 0x02e9,\n\t0x1a12: 0x03d9, 0x1a13: 0x02f1, 0x1a14: 0x02f9, 0x1a15: 0x03f1, 0x1a16: 0x0309, 0x1a17: 0x00a9,\n\t0x1a18: 0x0311, 0x1a19: 0x00b1, 0x1a1a: 0x0319, 0x1a1b: 0x0101, 0x1a1c: 0x0321, 0x1a1d: 0x0329,\n\t0x1a1e: 0x0051, 0x1a1f: 0x0339, 0x1a20: 0x0751, 0x1a21: 0x00b9, 0x1a22: 0x0089, 0x1a23: 0x0341,\n\t0x1a24: 0x0349, 0x1a25: 0x0391, 0x1a26: 0x00c1, 0x1a27: 0x0109, 0x1a28: 0x00c9, 0x1a29: 0x04b1,\n\t0x1a2a: 0x0019, 0x1a2b: 0x02e9, 0x1a2c: 0x03d9, 0x1a2d: 0x02f1, 0x1a2e: 0x02f9, 0x1a2f: 0x03f1,\n\t0x1a30: 0x0309, 0x1a31: 0x00a9, 0x1a32: 0x0311, 0x1a33: 0x00b1, 0x1a34: 0x0319, 0x1a35: 0x0101,\n\t0x1a36: 0x0321, 0x1a37: 0x0329, 0x1a38: 0x0051, 0x1a39: 0x0339, 0x1a3a: 0x0751, 0x1a3b: 0x00b9,\n\t0x1a3c: 0x0089, 0x1a3d: 0x0341, 0x1a3e: 0x0349, 0x1a3f: 0x0391,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x00c1, 0x1a41: 0x0109, 0x1a42: 0x00c9, 0x1a43: 0x04b1, 0x1a44: 0x0019, 0x1a45: 0x02e9,\n\t0x1a46: 0x0040, 0x1a47: 0x02f1, 0x1a48: 0x02f9, 0x1a49: 0x03f1, 0x1a4a: 0x0309, 0x1a4b: 0x0040,\n\t0x1a4c: 0x0040, 0x1a4d: 0x00b1, 0x1a4e: 0x0319, 0x1a4f: 0x0101, 0x1a50: 0x0321, 0x1a51: 0x0329,\n\t0x1a52: 0x0051, 0x1a53: 0x0339, 0x1a54: 0x0751, 0x1a55: 0x0040, 0x1a56: 0x0089, 0x1a57: 0x0341,\n\t0x1a58: 0x0349, 0x1a59: 0x0391, 0x1a5a: 0x00c1, 0x1a5b: 0x0109, 0x1a5c: 0x00c9, 0x1a5d: 0x0040,\n\t0x1a5e: 0x0019, 0x1a5f: 0x02e9, 0x1a60: 0x03d9, 0x1a61: 0x02f1, 0x1a62: 0x02f9, 0x1a63: 0x03f1,\n\t0x1a64: 0x0309, 0x1a65: 0x00a9, 0x1a66: 0x0311, 0x1a67: 0x00b1, 0x1a68: 0x0319, 0x1a69: 0x0101,\n\t0x1a6a: 0x0321, 0x1a6b: 0x0329, 0x1a6c: 0x0051, 0x1a6d: 0x0339, 0x1a6e: 0x0751, 0x1a6f: 0x00b9,\n\t0x1a70: 0x0089, 0x1a71: 0x0341, 0x1a72: 0x0349, 0x1a73: 0x0391, 0x1a74: 0x00c1, 0x1a75: 0x0109,\n\t0x1a76: 0x00c9, 0x1a77: 0x04b1, 0x1a78: 0x0019, 0x1a79: 0x02e9, 0x1a7a: 0x0040, 0x1a7b: 0x02f1,\n\t0x1a7c: 0x02f9, 0x1a7d: 0x03f1, 0x1a7e: 0x0309, 0x1a7f: 0x0040,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x0311, 0x1a81: 0x00b1, 0x1a82: 0x0319, 0x1a83: 0x0101, 0x1a84: 0x0321, 0x1a85: 0x0040,\n\t0x1a86: 0x0051, 0x1a87: 0x0040, 0x1a88: 0x0040, 0x1a89: 0x0040, 0x1a8a: 0x0089, 0x1a8b: 0x0341,\n\t0x1a8c: 0x0349, 0x1a8d: 0x0391, 0x1a8e: 0x00c1, 0x1a8f: 0x0109, 0x1a90: 0x00c9, 0x1a91: 0x0040,\n\t0x1a92: 0x0019, 0x1a93: 0x02e9, 0x1a94: 0x03d9, 0x1a95: 0x02f1, 0x1a96: 0x02f9, 0x1a97: 0x03f1,\n\t0x1a98: 0x0309, 0x1a99: 0x00a9, 0x1a9a: 0x0311, 0x1a9b: 0x00b1, 0x1a9c: 0x0319, 0x1a9d: 0x0101,\n\t0x1a9e: 0x0321, 0x1a9f: 0x0329, 0x1aa0: 0x0051, 0x1aa1: 0x0339, 0x1aa2: 0x0751, 0x1aa3: 0x00b9,\n\t0x1aa4: 0x0089, 0x1aa5: 0x0341, 0x1aa6: 0x0349, 0x1aa7: 0x0391, 0x1aa8: 0x00c1, 0x1aa9: 0x0109,\n\t0x1aaa: 0x00c9, 0x1aab: 0x04b1, 0x1aac: 0x0019, 0x1aad: 0x02e9, 0x1aae: 0x03d9, 0x1aaf: 0x02f1,\n\t0x1ab0: 0x02f9, 0x1ab1: 0x03f1, 0x1ab2: 0x0309, 0x1ab3: 0x00a9, 0x1ab4: 0x0311, 0x1ab5: 0x00b1,\n\t0x1ab6: 0x0319, 0x1ab7: 0x0101, 0x1ab8: 0x0321, 0x1ab9: 0x0329, 0x1aba: 0x0051, 0x1abb: 0x0339,\n\t0x1abc: 0x0751, 0x1abd: 0x00b9, 0x1abe: 0x0089, 0x1abf: 0x0341,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x0349, 0x1ac1: 0x0391, 0x1ac2: 0x00c1, 0x1ac3: 0x0109, 0x1ac4: 0x00c9, 0x1ac5: 0x04b1,\n\t0x1ac6: 0x0019, 0x1ac7: 0x02e9, 0x1ac8: 0x03d9, 0x1ac9: 0x02f1, 0x1aca: 0x02f9, 0x1acb: 0x03f1,\n\t0x1acc: 0x0309, 0x1acd: 0x00a9, 0x1ace: 0x0311, 0x1acf: 0x00b1, 0x1ad0: 0x0319, 0x1ad1: 0x0101,\n\t0x1ad2: 0x0321, 0x1ad3: 0x0329, 0x1ad4: 0x0051, 0x1ad5: 0x0339, 0x1ad6: 0x0751, 0x1ad7: 0x00b9,\n\t0x1ad8: 0x0089, 0x1ad9: 0x0341, 0x1ada: 0x0349, 0x1adb: 0x0391, 0x1adc: 0x00c1, 0x1add: 0x0109,\n\t0x1ade: 0x00c9, 0x1adf: 0x04b1, 0x1ae0: 0x0019, 0x1ae1: 0x02e9, 0x1ae2: 0x03d9, 0x1ae3: 0x02f1,\n\t0x1ae4: 0x02f9, 0x1ae5: 0x03f1, 0x1ae6: 0x0309, 0x1ae7: 0x00a9, 0x1ae8: 0x0311, 0x1ae9: 0x00b1,\n\t0x1aea: 0x0319, 0x1aeb: 0x0101, 0x1aec: 0x0321, 0x1aed: 0x0329, 0x1aee: 0x0051, 0x1aef: 0x0339,\n\t0x1af0: 0x0751, 0x1af1: 0x00b9, 0x1af2: 0x0089, 0x1af3: 0x0341, 0x1af4: 0x0349, 0x1af5: 0x0391,\n\t0x1af6: 0x00c1, 0x1af7: 0x0109, 0x1af8: 0x00c9, 0x1af9: 0x04b1, 0x1afa: 0x0019, 0x1afb: 0x02e9,\n\t0x1afc: 0x03d9, 0x1afd: 0x02f1, 0x1afe: 0x02f9, 0x1aff: 0x03f1,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x0309, 0x1b01: 0x00a9, 0x1b02: 0x0311, 0x1b03: 0x00b1, 0x1b04: 0x0319, 0x1b05: 0x0101,\n\t0x1b06: 0x0321, 0x1b07: 0x0329, 0x1b08: 0x0051, 0x1b09: 0x0339, 0x1b0a: 0x0751, 0x1b0b: 0x00b9,\n\t0x1b0c: 0x0089, 0x1b0d: 0x0341, 0x1b0e: 0x0349, 0x1b0f: 0x0391, 0x1b10: 0x00c1, 0x1b11: 0x0109,\n\t0x1b12: 0x00c9, 0x1b13: 0x04b1, 0x1b14: 0x0019, 0x1b15: 0x02e9, 0x1b16: 0x03d9, 0x1b17: 0x02f1,\n\t0x1b18: 0x02f9, 0x1b19: 0x03f1, 0x1b1a: 0x0309, 0x1b1b: 0x00a9, 0x1b1c: 0x0311, 0x1b1d: 0x00b1,\n\t0x1b1e: 0x0319, 0x1b1f: 0x0101, 0x1b20: 0x0321, 0x1b21: 0x0329, 0x1b22: 0x0051, 0x1b23: 0x0339,\n\t0x1b24: 0x0751, 0x1b25: 0x00b9, 0x1b26: 0x0089, 0x1b27: 0x0341, 0x1b28: 0x0349, 0x1b29: 0x0391,\n\t0x1b2a: 0x00c1, 0x1b2b: 0x0109, 0x1b2c: 0x00c9, 0x1b2d: 0x04b1, 0x1b2e: 0x0019, 0x1b2f: 0x02e9,\n\t0x1b30: 0x03d9, 0x1b31: 0x02f1, 0x1b32: 0x02f9, 0x1b33: 0x03f1, 0x1b34: 0x0309, 0x1b35: 0x00a9,\n\t0x1b36: 0x0311, 0x1b37: 0x00b1, 0x1b38: 0x0319, 0x1b39: 0x0101, 0x1b3a: 0x0321, 0x1b3b: 0x0329,\n\t0x1b3c: 0x0051, 0x1b3d: 0x0339, 0x1b3e: 0x0751, 0x1b3f: 0x00b9,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0x0089, 0x1b41: 0x0341, 0x1b42: 0x0349, 0x1b43: 0x0391, 0x1b44: 0x00c1, 0x1b45: 0x0109,\n\t0x1b46: 0x00c9, 0x1b47: 0x04b1, 0x1b48: 0x0019, 0x1b49: 0x02e9, 0x1b4a: 0x03d9, 0x1b4b: 0x02f1,\n\t0x1b4c: 0x02f9, 0x1b4d: 0x03f1, 0x1b4e: 0x0309, 0x1b4f: 0x00a9, 0x1b50: 0x0311, 0x1b51: 0x00b1,\n\t0x1b52: 0x0319, 0x1b53: 0x0101, 0x1b54: 0x0321, 0x1b55: 0x0329, 0x1b56: 0x0051, 0x1b57: 0x0339,\n\t0x1b58: 0x0751, 0x1b59: 0x00b9, 0x1b5a: 0x0089, 0x1b5b: 0x0341, 0x1b5c: 0x0349, 0x1b5d: 0x0391,\n\t0x1b5e: 0x00c1, 0x1b5f: 0x0109, 0x1b60: 0x00c9, 0x1b61: 0x04b1, 0x1b62: 0x0019, 0x1b63: 0x02e9,\n\t0x1b64: 0x03d9, 0x1b65: 0x02f1, 0x1b66: 0x02f9, 0x1b67: 0x03f1, 0x1b68: 0x0309, 0x1b69: 0x00a9,\n\t0x1b6a: 0x0311, 0x1b6b: 0x00b1, 0x1b6c: 0x0319, 0x1b6d: 0x0101, 0x1b6e: 0x0321, 0x1b6f: 0x0329,\n\t0x1b70: 0x0051, 0x1b71: 0x0339, 0x1b72: 0x0751, 0x1b73: 0x00b9, 0x1b74: 0x0089, 0x1b75: 0x0341,\n\t0x1b76: 0x0349, 0x1b77: 0x0391, 0x1b78: 0x00c1, 0x1b79: 0x0109, 0x1b7a: 0x00c9, 0x1b7b: 0x04b1,\n\t0x1b7c: 0x0019, 0x1b7d: 0x02e9, 0x1b7e: 0x03d9, 0x1b7f: 0x02f1,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0x02f9, 0x1b81: 0x03f1, 0x1b82: 0x0309, 0x1b83: 0x00a9, 0x1b84: 0x0311, 0x1b85: 0x00b1,\n\t0x1b86: 0x0319, 0x1b87: 0x0101, 0x1b88: 0x0321, 0x1b89: 0x0329, 0x1b8a: 0x0051, 0x1b8b: 0x0339,\n\t0x1b8c: 0x0751, 0x1b8d: 0x00b9, 0x1b8e: 0x0089, 0x1b8f: 0x0341, 0x1b90: 0x0349, 0x1b91: 0x0391,\n\t0x1b92: 0x00c1, 0x1b93: 0x0109, 0x1b94: 0x00c9, 0x1b95: 0x04b1, 0x1b96: 0x0019, 0x1b97: 0x02e9,\n\t0x1b98: 0x03d9, 0x1b99: 0x02f1, 0x1b9a: 0x02f9, 0x1b9b: 0x03f1, 0x1b9c: 0x0309, 0x1b9d: 0x00a9,\n\t0x1b9e: 0x0311, 0x1b9f: 0x00b1, 0x1ba0: 0x0319, 0x1ba1: 0x0101, 0x1ba2: 0x0321, 0x1ba3: 0x0329,\n\t0x1ba4: 0x0051, 0x1ba5: 0x0339, 0x1ba6: 0x0751, 0x1ba7: 0x00b9, 0x1ba8: 0x0089, 0x1ba9: 0x0341,\n\t0x1baa: 0x0349, 0x1bab: 0x0391, 0x1bac: 0x00c1, 0x1bad: 0x0109, 0x1bae: 0x00c9, 0x1baf: 0x04b1,\n\t0x1bb0: 0x0019, 0x1bb1: 0x02e9, 0x1bb2: 0x03d9, 0x1bb3: 0x02f1, 0x1bb4: 0x02f9, 0x1bb5: 0x03f1,\n\t0x1bb6: 0x0309, 0x1bb7: 0x00a9, 0x1bb8: 0x0311, 0x1bb9: 0x00b1, 0x1bba: 0x0319, 0x1bbb: 0x0101,\n\t0x1bbc: 0x0321, 0x1bbd: 0x0329, 0x1bbe: 0x0051, 0x1bbf: 0x0339,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x0751, 0x1bc1: 0x00b9, 0x1bc2: 0x0089, 0x1bc3: 0x0341, 0x1bc4: 0x0349, 0x1bc5: 0x0391,\n\t0x1bc6: 0x00c1, 0x1bc7: 0x0109, 0x1bc8: 0x00c9, 0x1bc9: 0x04b1, 0x1bca: 0x0019, 0x1bcb: 0x02e9,\n\t0x1bcc: 0x03d9, 0x1bcd: 0x02f1, 0x1bce: 0x02f9, 0x1bcf: 0x03f1, 0x1bd0: 0x0309, 0x1bd1: 0x00a9,\n\t0x1bd2: 0x0311, 0x1bd3: 0x00b1, 0x1bd4: 0x0319, 0x1bd5: 0x0101, 0x1bd6: 0x0321, 0x1bd7: 0x0329,\n\t0x1bd8: 0x0051, 0x1bd9: 0x0339, 0x1bda: 0x0751, 0x1bdb: 0x00b9, 0x1bdc: 0x0089, 0x1bdd: 0x0341,\n\t0x1bde: 0x0349, 0x1bdf: 0x0391, 0x1be0: 0x00c1, 0x1be1: 0x0109, 0x1be2: 0x00c9, 0x1be3: 0x04b1,\n\t0x1be4: 0x23e1, 0x1be5: 0x23e9, 0x1be6: 0x0040, 0x1be7: 0x0040, 0x1be8: 0x23f1, 0x1be9: 0x0399,\n\t0x1bea: 0x03a1, 0x1beb: 0x03a9, 0x1bec: 0x23f9, 0x1bed: 0x2401, 0x1bee: 0x2409, 0x1bef: 0x04d1,\n\t0x1bf0: 0x05f9, 0x1bf1: 0x2411, 0x1bf2: 0x2419, 0x1bf3: 0x2421, 0x1bf4: 0x2429, 0x1bf5: 0x2431,\n\t0x1bf6: 0x2439, 0x1bf7: 0x0799, 0x1bf8: 0x03c1, 0x1bf9: 0x04d1, 0x1bfa: 0x2441, 0x1bfb: 0x2449,\n\t0x1bfc: 0x2451, 0x1bfd: 0x03b1, 0x1bfe: 0x03b9, 0x1bff: 0x2459,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0x0769, 0x1c01: 0x2461, 0x1c02: 0x23f1, 0x1c03: 0x0399, 0x1c04: 0x03a1, 0x1c05: 0x03a9,\n\t0x1c06: 0x23f9, 0x1c07: 0x2401, 0x1c08: 0x2409, 0x1c09: 0x04d1, 0x1c0a: 0x05f9, 0x1c0b: 0x2411,\n\t0x1c0c: 0x2419, 0x1c0d: 0x2421, 0x1c0e: 0x2429, 0x1c0f: 0x2431, 0x1c10: 0x2439, 0x1c11: 0x0799,\n\t0x1c12: 0x03c1, 0x1c13: 0x2441, 0x1c14: 0x2441, 0x1c15: 0x2449, 0x1c16: 0x2451, 0x1c17: 0x03b1,\n\t0x1c18: 0x03b9, 0x1c19: 0x2459, 0x1c1a: 0x0769, 0x1c1b: 0x2469, 0x1c1c: 0x23f9, 0x1c1d: 0x04d1,\n\t0x1c1e: 0x2411, 0x1c1f: 0x03b1, 0x1c20: 0x03c1, 0x1c21: 0x0799, 0x1c22: 0x23f1, 0x1c23: 0x0399,\n\t0x1c24: 0x03a1, 0x1c25: 0x03a9, 0x1c26: 0x23f9, 0x1c27: 0x2401, 0x1c28: 0x2409, 0x1c29: 0x04d1,\n\t0x1c2a: 0x05f9, 0x1c2b: 0x2411, 0x1c2c: 0x2419, 0x1c2d: 0x2421, 0x1c2e: 0x2429, 0x1c2f: 0x2431,\n\t0x1c30: 0x2439, 0x1c31: 0x0799, 0x1c32: 0x03c1, 0x1c33: 0x04d1, 0x1c34: 0x2441, 0x1c35: 0x2449,\n\t0x1c36: 0x2451, 0x1c37: 0x03b1, 0x1c38: 0x03b9, 0x1c39: 0x2459, 0x1c3a: 0x0769, 0x1c3b: 0x2461,\n\t0x1c3c: 0x23f1, 0x1c3d: 0x0399, 0x1c3e: 0x03a1, 0x1c3f: 0x03a9,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0x23f9, 0x1c41: 0x2401, 0x1c42: 0x2409, 0x1c43: 0x04d1, 0x1c44: 0x05f9, 0x1c45: 0x2411,\n\t0x1c46: 0x2419, 0x1c47: 0x2421, 0x1c48: 0x2429, 0x1c49: 0x2431, 0x1c4a: 0x2439, 0x1c4b: 0x0799,\n\t0x1c4c: 0x03c1, 0x1c4d: 0x2441, 0x1c4e: 0x2441, 0x1c4f: 0x2449, 0x1c50: 0x2451, 0x1c51: 0x03b1,\n\t0x1c52: 0x03b9, 0x1c53: 0x2459, 0x1c54: 0x0769, 0x1c55: 0x2469, 0x1c56: 0x23f9, 0x1c57: 0x04d1,\n\t0x1c58: 0x2411, 0x1c59: 0x03b1, 0x1c5a: 0x03c1, 0x1c5b: 0x0799, 0x1c5c: 0x23f1, 0x1c5d: 0x0399,\n\t0x1c5e: 0x03a1, 0x1c5f: 0x03a9, 0x1c60: 0x23f9, 0x1c61: 0x2401, 0x1c62: 0x2409, 0x1c63: 0x04d1,\n\t0x1c64: 0x05f9, 0x1c65: 0x2411, 0x1c66: 0x2419, 0x1c67: 0x2421, 0x1c68: 0x2429, 0x1c69: 0x2431,\n\t0x1c6a: 0x2439, 0x1c6b: 0x0799, 0x1c6c: 0x03c1, 0x1c6d: 0x04d1, 0x1c6e: 0x2441, 0x1c6f: 0x2449,\n\t0x1c70: 0x2451, 0x1c71: 0x03b1, 0x1c72: 0x03b9, 0x1c73: 0x2459, 0x1c74: 0x0769, 0x1c75: 0x2461,\n\t0x1c76: 0x23f1, 0x1c77: 0x0399, 0x1c78: 0x03a1, 0x1c79: 0x03a9, 0x1c7a: 0x23f9, 0x1c7b: 0x2401,\n\t0x1c7c: 0x2409, 0x1c7d: 0x04d1, 0x1c7e: 0x05f9, 0x1c7f: 0x2411,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0x2419, 0x1c81: 0x2421, 0x1c82: 0x2429, 0x1c83: 0x2431, 0x1c84: 0x2439, 0x1c85: 0x0799,\n\t0x1c86: 0x03c1, 0x1c87: 0x2441, 0x1c88: 0x2441, 0x1c89: 0x2449, 0x1c8a: 0x2451, 0x1c8b: 0x03b1,\n\t0x1c8c: 0x03b9, 0x1c8d: 0x2459, 0x1c8e: 0x0769, 0x1c8f: 0x2469, 0x1c90: 0x23f9, 0x1c91: 0x04d1,\n\t0x1c92: 0x2411, 0x1c93: 0x03b1, 0x1c94: 0x03c1, 0x1c95: 0x0799, 0x1c96: 0x23f1, 0x1c97: 0x0399,\n\t0x1c98: 0x03a1, 0x1c99: 0x03a9, 0x1c9a: 0x23f9, 0x1c9b: 0x2401, 0x1c9c: 0x2409, 0x1c9d: 0x04d1,\n\t0x1c9e: 0x05f9, 0x1c9f: 0x2411, 0x1ca0: 0x2419, 0x1ca1: 0x2421, 0x1ca2: 0x2429, 0x1ca3: 0x2431,\n\t0x1ca4: 0x2439, 0x1ca5: 0x0799, 0x1ca6: 0x03c1, 0x1ca7: 0x04d1, 0x1ca8: 0x2441, 0x1ca9: 0x2449,\n\t0x1caa: 0x2451, 0x1cab: 0x03b1, 0x1cac: 0x03b9, 0x1cad: 0x2459, 0x1cae: 0x0769, 0x1caf: 0x2461,\n\t0x1cb0: 0x23f1, 0x1cb1: 0x0399, 0x1cb2: 0x03a1, 0x1cb3: 0x03a9, 0x1cb4: 0x23f9, 0x1cb5: 0x2401,\n\t0x1cb6: 0x2409, 0x1cb7: 0x04d1, 0x1cb8: 0x05f9, 0x1cb9: 0x2411, 0x1cba: 0x2419, 0x1cbb: 0x2421,\n\t0x1cbc: 0x2429, 0x1cbd: 0x2431, 0x1cbe: 0x2439, 0x1cbf: 0x0799,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0x03c1, 0x1cc1: 0x2441, 0x1cc2: 0x2441, 0x1cc3: 0x2449, 0x1cc4: 0x2451, 0x1cc5: 0x03b1,\n\t0x1cc6: 0x03b9, 0x1cc7: 0x2459, 0x1cc8: 0x0769, 0x1cc9: 0x2469, 0x1cca: 0x23f9, 0x1ccb: 0x04d1,\n\t0x1ccc: 0x2411, 0x1ccd: 0x03b1, 0x1cce: 0x03c1, 0x1ccf: 0x0799, 0x1cd0: 0x23f1, 0x1cd1: 0x0399,\n\t0x1cd2: 0x03a1, 0x1cd3: 0x03a9, 0x1cd4: 0x23f9, 0x1cd5: 0x2401, 0x1cd6: 0x2409, 0x1cd7: 0x04d1,\n\t0x1cd8: 0x05f9, 0x1cd9: 0x2411, 0x1cda: 0x2419, 0x1cdb: 0x2421, 0x1cdc: 0x2429, 0x1cdd: 0x2431,\n\t0x1cde: 0x2439, 0x1cdf: 0x0799, 0x1ce0: 0x03c1, 0x1ce1: 0x04d1, 0x1ce2: 0x2441, 0x1ce3: 0x2449,\n\t0x1ce4: 0x2451, 0x1ce5: 0x03b1, 0x1ce6: 0x03b9, 0x1ce7: 0x2459, 0x1ce8: 0x0769, 0x1ce9: 0x2461,\n\t0x1cea: 0x23f1, 0x1ceb: 0x0399, 0x1cec: 0x03a1, 0x1ced: 0x03a9, 0x1cee: 0x23f9, 0x1cef: 0x2401,\n\t0x1cf0: 0x2409, 0x1cf1: 0x04d1, 0x1cf2: 0x05f9, 0x1cf3: 0x2411, 0x1cf4: 0x2419, 0x1cf5: 0x2421,\n\t0x1cf6: 0x2429, 0x1cf7: 0x2431, 0x1cf8: 0x2439, 0x1cf9: 0x0799, 0x1cfa: 0x03c1, 0x1cfb: 0x2441,\n\t0x1cfc: 0x2441, 0x1cfd: 0x2449, 0x1cfe: 0x2451, 0x1cff: 0x03b1,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0x03b9, 0x1d01: 0x2459, 0x1d02: 0x0769, 0x1d03: 0x2469, 0x1d04: 0x23f9, 0x1d05: 0x04d1,\n\t0x1d06: 0x2411, 0x1d07: 0x03b1, 0x1d08: 0x03c1, 0x1d09: 0x0799, 0x1d0a: 0x2471, 0x1d0b: 0x2471,\n\t0x1d0c: 0x0040, 0x1d0d: 0x0040, 0x1d0e: 0x06e1, 0x1d0f: 0x0049, 0x1d10: 0x0029, 0x1d11: 0x0031,\n\t0x1d12: 0x06e9, 0x1d13: 0x06f1, 0x1d14: 0x06f9, 0x1d15: 0x0701, 0x1d16: 0x0709, 0x1d17: 0x0711,\n\t0x1d18: 0x06e1, 0x1d19: 0x0049, 0x1d1a: 0x0029, 0x1d1b: 0x0031, 0x1d1c: 0x06e9, 0x1d1d: 0x06f1,\n\t0x1d1e: 0x06f9, 0x1d1f: 0x0701, 0x1d20: 0x0709, 0x1d21: 0x0711, 0x1d22: 0x06e1, 0x1d23: 0x0049,\n\t0x1d24: 0x0029, 0x1d25: 0x0031, 0x1d26: 0x06e9, 0x1d27: 0x06f1, 0x1d28: 0x06f9, 0x1d29: 0x0701,\n\t0x1d2a: 0x0709, 0x1d2b: 0x0711, 0x1d2c: 0x06e1, 0x1d2d: 0x0049, 0x1d2e: 0x0029, 0x1d2f: 0x0031,\n\t0x1d30: 0x06e9, 0x1d31: 0x06f1, 0x1d32: 0x06f9, 0x1d33: 0x0701, 0x1d34: 0x0709, 0x1d35: 0x0711,\n\t0x1d36: 0x06e1, 0x1d37: 0x0049, 0x1d38: 0x0029, 0x1d39: 0x0031, 0x1d3a: 0x06e9, 0x1d3b: 0x06f1,\n\t0x1d3c: 0x06f9, 0x1d3d: 0x0701, 0x1d3e: 0x0709, 0x1d3f: 0x0711,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x3308, 0x1d41: 0x3308, 0x1d42: 0x3308, 0x1d43: 0x3308, 0x1d44: 0x3308, 0x1d45: 0x3308,\n\t0x1d46: 0x3308, 0x1d47: 0x0040, 0x1d48: 0x3308, 0x1d49: 0x3308, 0x1d4a: 0x3308, 0x1d4b: 0x3308,\n\t0x1d4c: 0x3308, 0x1d4d: 0x3308, 0x1d4e: 0x3308, 0x1d4f: 0x3308, 0x1d50: 0x3308, 0x1d51: 0x3308,\n\t0x1d52: 0x3308, 0x1d53: 0x3308, 0x1d54: 0x3308, 0x1d55: 0x3308, 0x1d56: 0x3308, 0x1d57: 0x3308,\n\t0x1d58: 0x3308, 0x1d59: 0x0040, 0x1d5a: 0x0040, 0x1d5b: 0x3308, 0x1d5c: 0x3308, 0x1d5d: 0x3308,\n\t0x1d5e: 0x3308, 0x1d5f: 0x3308, 0x1d60: 0x3308, 0x1d61: 0x3308, 0x1d62: 0x0040, 0x1d63: 0x3308,\n\t0x1d64: 0x3308, 0x1d65: 0x0040, 0x1d66: 0x3308, 0x1d67: 0x3308, 0x1d68: 0x3308, 0x1d69: 0x3308,\n\t0x1d6a: 0x3308, 0x1d6b: 0x0040, 0x1d6c: 0x0040, 0x1d6d: 0x0040, 0x1d6e: 0x0040, 0x1d6f: 0x0040,\n\t0x1d70: 0x2479, 0x1d71: 0x2481, 0x1d72: 0x02a9, 0x1d73: 0x2489, 0x1d74: 0x02b1, 0x1d75: 0x2491,\n\t0x1d76: 0x2499, 0x1d77: 0x24a1, 0x1d78: 0x24a9, 0x1d79: 0x24b1, 0x1d7a: 0x24b9, 0x1d7b: 0x24c1,\n\t0x1d7c: 0x02b9, 0x1d7d: 0x24c9, 0x1d7e: 0x24d1, 0x1d7f: 0x02c1,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0x02c9, 0x1d81: 0x24d9, 0x1d82: 0x24e1, 0x1d83: 0x24e9, 0x1d84: 0x24f1, 0x1d85: 0x24f9,\n\t0x1d86: 0x2501, 0x1d87: 0x2509, 0x1d88: 0x2511, 0x1d89: 0x2519, 0x1d8a: 0x2521, 0x1d8b: 0x2529,\n\t0x1d8c: 0x2531, 0x1d8d: 0x2539, 0x1d8e: 0x2541, 0x1d8f: 0x2549, 0x1d90: 0x2551, 0x1d91: 0x2479,\n\t0x1d92: 0x2481, 0x1d93: 0x02a9, 0x1d94: 0x2489, 0x1d95: 0x02b1, 0x1d96: 0x2491, 0x1d97: 0x2499,\n\t0x1d98: 0x24a1, 0x1d99: 0x24a9, 0x1d9a: 0x24b1, 0x1d9b: 0x24b9, 0x1d9c: 0x02b9, 0x1d9d: 0x24c9,\n\t0x1d9e: 0x02c1, 0x1d9f: 0x24d9, 0x1da0: 0x24e1, 0x1da1: 0x24e9, 0x1da2: 0x24f1, 0x1da3: 0x24f9,\n\t0x1da4: 0x2501, 0x1da5: 0x02d1, 0x1da6: 0x2509, 0x1da7: 0x2559, 0x1da8: 0x2531, 0x1da9: 0x2561,\n\t0x1daa: 0x2569, 0x1dab: 0x2571, 0x1dac: 0x2579, 0x1dad: 0x2581, 0x1dae: 0x0040, 0x1daf: 0x0040,\n\t0x1db0: 0x0040, 0x1db1: 0x0040, 0x1db2: 0x0040, 0x1db3: 0x0040, 0x1db4: 0x0040, 0x1db5: 0x0040,\n\t0x1db6: 0x0040, 0x1db7: 0x0040, 0x1db8: 0x0040, 0x1db9: 0x0040, 0x1dba: 0x0040, 0x1dbb: 0x0040,\n\t0x1dbc: 0x0040, 0x1dbd: 0x0040, 0x1dbe: 0x0040, 0x1dbf: 0x0040,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0xe115, 0x1dc1: 0xe115, 0x1dc2: 0xe135, 0x1dc3: 0xe135, 0x1dc4: 0xe115, 0x1dc5: 0xe115,\n\t0x1dc6: 0xe175, 0x1dc7: 0xe175, 0x1dc8: 0xe115, 0x1dc9: 0xe115, 0x1dca: 0xe135, 0x1dcb: 0xe135,\n\t0x1dcc: 0xe115, 0x1dcd: 0xe115, 0x1dce: 0xe1f5, 0x1dcf: 0xe1f5, 0x1dd0: 0xe115, 0x1dd1: 0xe115,\n\t0x1dd2: 0xe135, 0x1dd3: 0xe135, 0x1dd4: 0xe115, 0x1dd5: 0xe115, 0x1dd6: 0xe175, 0x1dd7: 0xe175,\n\t0x1dd8: 0xe115, 0x1dd9: 0xe115, 0x1dda: 0xe135, 0x1ddb: 0xe135, 0x1ddc: 0xe115, 0x1ddd: 0xe115,\n\t0x1dde: 0x8ca5, 0x1ddf: 0x8ca5, 0x1de0: 0x04b5, 0x1de1: 0x04b5, 0x1de2: 0x0a08, 0x1de3: 0x0a08,\n\t0x1de4: 0x0a08, 0x1de5: 0x0a08, 0x1de6: 0x0a08, 0x1de7: 0x0a08, 0x1de8: 0x0a08, 0x1de9: 0x0a08,\n\t0x1dea: 0x0a08, 0x1deb: 0x0a08, 0x1dec: 0x0a08, 0x1ded: 0x0a08, 0x1dee: 0x0a08, 0x1def: 0x0a08,\n\t0x1df0: 0x0a08, 0x1df1: 0x0a08, 0x1df2: 0x0a08, 0x1df3: 0x0a08, 0x1df4: 0x0a08, 0x1df5: 0x0a08,\n\t0x1df6: 0x0a08, 0x1df7: 0x0a08, 0x1df8: 0x0a08, 0x1df9: 0x0a08, 0x1dfa: 0x0a08, 0x1dfb: 0x0a08,\n\t0x1dfc: 0x0a08, 0x1dfd: 0x0a08, 0x1dfe: 0x0a08, 0x1dff: 0x0a08,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0x20b1, 0x1e01: 0x20b9, 0x1e02: 0x20d9, 0x1e03: 0x20f1, 0x1e04: 0x0040, 0x1e05: 0x2189,\n\t0x1e06: 0x2109, 0x1e07: 0x20e1, 0x1e08: 0x2131, 0x1e09: 0x2191, 0x1e0a: 0x2161, 0x1e0b: 0x2169,\n\t0x1e0c: 0x2171, 0x1e0d: 0x2179, 0x1e0e: 0x2111, 0x1e0f: 0x2141, 0x1e10: 0x2151, 0x1e11: 0x2121,\n\t0x1e12: 0x2159, 0x1e13: 0x2101, 0x1e14: 0x2119, 0x1e15: 0x20c9, 0x1e16: 0x20d1, 0x1e17: 0x20e9,\n\t0x1e18: 0x20f9, 0x1e19: 0x2129, 0x1e1a: 0x2139, 0x1e1b: 0x2149, 0x1e1c: 0x2589, 0x1e1d: 0x1689,\n\t0x1e1e: 0x2591, 0x1e1f: 0x2599, 0x1e20: 0x0040, 0x1e21: 0x20b9, 0x1e22: 0x20d9, 0x1e23: 0x0040,\n\t0x1e24: 0x2181, 0x1e25: 0x0040, 0x1e26: 0x0040, 0x1e27: 0x20e1, 0x1e28: 0x0040, 0x1e29: 0x2191,\n\t0x1e2a: 0x2161, 0x1e2b: 0x2169, 0x1e2c: 0x2171, 0x1e2d: 0x2179, 0x1e2e: 0x2111, 0x1e2f: 0x2141,\n\t0x1e30: 0x2151, 0x1e31: 0x2121, 0x1e32: 0x2159, 0x1e33: 0x0040, 0x1e34: 0x2119, 0x1e35: 0x20c9,\n\t0x1e36: 0x20d1, 0x1e37: 0x20e9, 0x1e38: 0x0040, 0x1e39: 0x2129, 0x1e3a: 0x0040, 0x1e3b: 0x2149,\n\t0x1e3c: 0x0040, 0x1e3d: 0x0040, 0x1e3e: 0x0040, 0x1e3f: 0x0040,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0x0040, 0x1e41: 0x0040, 0x1e42: 0x20d9, 0x1e43: 0x0040, 0x1e44: 0x0040, 0x1e45: 0x0040,\n\t0x1e46: 0x0040, 0x1e47: 0x20e1, 0x1e48: 0x0040, 0x1e49: 0x2191, 0x1e4a: 0x0040, 0x1e4b: 0x2169,\n\t0x1e4c: 0x0040, 0x1e4d: 0x2179, 0x1e4e: 0x2111, 0x1e4f: 0x2141, 0x1e50: 0x0040, 0x1e51: 0x2121,\n\t0x1e52: 0x2159, 0x1e53: 0x0040, 0x1e54: 0x2119, 0x1e55: 0x0040, 0x1e56: 0x0040, 0x1e57: 0x20e9,\n\t0x1e58: 0x0040, 0x1e59: 0x2129, 0x1e5a: 0x0040, 0x1e5b: 0x2149, 0x1e5c: 0x0040, 0x1e5d: 0x1689,\n\t0x1e5e: 0x0040, 0x1e5f: 0x2599, 0x1e60: 0x0040, 0x1e61: 0x20b9, 0x1e62: 0x20d9, 0x1e63: 0x0040,\n\t0x1e64: 0x2181, 0x1e65: 0x0040, 0x1e66: 0x0040, 0x1e67: 0x20e1, 0x1e68: 0x2131, 0x1e69: 0x2191,\n\t0x1e6a: 0x2161, 0x1e6b: 0x0040, 0x1e6c: 0x2171, 0x1e6d: 0x2179, 0x1e6e: 0x2111, 0x1e6f: 0x2141,\n\t0x1e70: 0x2151, 0x1e71: 0x2121, 0x1e72: 0x2159, 0x1e73: 0x0040, 0x1e74: 0x2119, 0x1e75: 0x20c9,\n\t0x1e76: 0x20d1, 0x1e77: 0x20e9, 0x1e78: 0x0040, 0x1e79: 0x2129, 0x1e7a: 0x2139, 0x1e7b: 0x2149,\n\t0x1e7c: 0x2589, 0x1e7d: 0x0040, 0x1e7e: 0x2591, 0x1e7f: 0x0040,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0x20b1, 0x1e81: 0x20b9, 0x1e82: 0x20d9, 0x1e83: 0x20f1, 0x1e84: 0x2181, 0x1e85: 0x2189,\n\t0x1e86: 0x2109, 0x1e87: 0x20e1, 0x1e88: 0x2131, 0x1e89: 0x2191, 0x1e8a: 0x0040, 0x1e8b: 0x2169,\n\t0x1e8c: 0x2171, 0x1e8d: 0x2179, 0x1e8e: 0x2111, 0x1e8f: 0x2141, 0x1e90: 0x2151, 0x1e91: 0x2121,\n\t0x1e92: 0x2159, 0x1e93: 0x2101, 0x1e94: 0x2119, 0x1e95: 0x20c9, 0x1e96: 0x20d1, 0x1e97: 0x20e9,\n\t0x1e98: 0x20f9, 0x1e99: 0x2129, 0x1e9a: 0x2139, 0x1e9b: 0x2149, 0x1e9c: 0x0040, 0x1e9d: 0x0040,\n\t0x1e9e: 0x0040, 0x1e9f: 0x0040, 0x1ea0: 0x0040, 0x1ea1: 0x20b9, 0x1ea2: 0x20d9, 0x1ea3: 0x20f1,\n\t0x1ea4: 0x0040, 0x1ea5: 0x2189, 0x1ea6: 0x2109, 0x1ea7: 0x20e1, 0x1ea8: 0x2131, 0x1ea9: 0x2191,\n\t0x1eaa: 0x0040, 0x1eab: 0x2169, 0x1eac: 0x2171, 0x1ead: 0x2179, 0x1eae: 0x2111, 0x1eaf: 0x2141,\n\t0x1eb0: 0x2151, 0x1eb1: 0x2121, 0x1eb2: 0x2159, 0x1eb3: 0x2101, 0x1eb4: 0x2119, 0x1eb5: 0x20c9,\n\t0x1eb6: 0x20d1, 0x1eb7: 0x20e9, 0x1eb8: 0x20f9, 0x1eb9: 0x2129, 0x1eba: 0x2139, 0x1ebb: 0x2149,\n\t0x1ebc: 0x0040, 0x1ebd: 0x0040, 0x1ebe: 0x0040, 0x1ebf: 0x0040,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0x0040, 0x1ec1: 0x25a2, 0x1ec2: 0x25aa, 0x1ec3: 0x25b2, 0x1ec4: 0x25ba, 0x1ec5: 0x25c2,\n\t0x1ec6: 0x25ca, 0x1ec7: 0x25d2, 0x1ec8: 0x25da, 0x1ec9: 0x25e2, 0x1eca: 0x25ea, 0x1ecb: 0x0018,\n\t0x1ecc: 0x0018, 0x1ecd: 0x0018, 0x1ece: 0x0018, 0x1ecf: 0x0018, 0x1ed0: 0x25f2, 0x1ed1: 0x25fa,\n\t0x1ed2: 0x2602, 0x1ed3: 0x260a, 0x1ed4: 0x2612, 0x1ed5: 0x261a, 0x1ed6: 0x2622, 0x1ed7: 0x262a,\n\t0x1ed8: 0x2632, 0x1ed9: 0x263a, 0x1eda: 0x2642, 0x1edb: 0x264a, 0x1edc: 0x2652, 0x1edd: 0x265a,\n\t0x1ede: 0x2662, 0x1edf: 0x266a, 0x1ee0: 0x2672, 0x1ee1: 0x267a, 0x1ee2: 0x2682, 0x1ee3: 0x268a,\n\t0x1ee4: 0x2692, 0x1ee5: 0x269a, 0x1ee6: 0x26a2, 0x1ee7: 0x26aa, 0x1ee8: 0x26b2, 0x1ee9: 0x26ba,\n\t0x1eea: 0x26c1, 0x1eeb: 0x03d9, 0x1eec: 0x00b9, 0x1eed: 0x1239, 0x1eee: 0x26c9, 0x1eef: 0x0018,\n\t0x1ef0: 0x0019, 0x1ef1: 0x02e9, 0x1ef2: 0x03d9, 0x1ef3: 0x02f1, 0x1ef4: 0x02f9, 0x1ef5: 0x03f1,\n\t0x1ef6: 0x0309, 0x1ef7: 0x00a9, 0x1ef8: 0x0311, 0x1ef9: 0x00b1, 0x1efa: 0x0319, 0x1efb: 0x0101,\n\t0x1efc: 0x0321, 0x1efd: 0x0329, 0x1efe: 0x0051, 0x1eff: 0x0339,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0x0751, 0x1f01: 0x00b9, 0x1f02: 0x0089, 0x1f03: 0x0341, 0x1f04: 0x0349, 0x1f05: 0x0391,\n\t0x1f06: 0x00c1, 0x1f07: 0x0109, 0x1f08: 0x00c9, 0x1f09: 0x04b1, 0x1f0a: 0x26d1, 0x1f0b: 0x11f9,\n\t0x1f0c: 0x26d9, 0x1f0d: 0x04d9, 0x1f0e: 0x26e1, 0x1f0f: 0x26e9, 0x1f10: 0x0018, 0x1f11: 0x0018,\n\t0x1f12: 0x0018, 0x1f13: 0x0018, 0x1f14: 0x0018, 0x1f15: 0x0018, 0x1f16: 0x0018, 0x1f17: 0x0018,\n\t0x1f18: 0x0018, 0x1f19: 0x0018, 0x1f1a: 0x0018, 0x1f1b: 0x0018, 0x1f1c: 0x0018, 0x1f1d: 0x0018,\n\t0x1f1e: 0x0018, 0x1f1f: 0x0018, 0x1f20: 0x0018, 0x1f21: 0x0018, 0x1f22: 0x0018, 0x1f23: 0x0018,\n\t0x1f24: 0x0018, 0x1f25: 0x0018, 0x1f26: 0x0018, 0x1f27: 0x0018, 0x1f28: 0x0018, 0x1f29: 0x0018,\n\t0x1f2a: 0x26f1, 0x1f2b: 0x26f9, 0x1f2c: 0x2701, 0x1f2d: 0x0018, 0x1f2e: 0x0018, 0x1f2f: 0x0018,\n\t0x1f30: 0x0018, 0x1f31: 0x0018, 0x1f32: 0x0018, 0x1f33: 0x0018, 0x1f34: 0x0018, 0x1f35: 0x0018,\n\t0x1f36: 0x0018, 0x1f37: 0x0018, 0x1f38: 0x0018, 0x1f39: 0x0018, 0x1f3a: 0x0018, 0x1f3b: 0x0018,\n\t0x1f3c: 0x0018, 0x1f3d: 0x0018, 0x1f3e: 0x0018, 0x1f3f: 0x0018,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0x2711, 0x1f41: 0x2719, 0x1f42: 0x2721, 0x1f43: 0x0040, 0x1f44: 0x0040, 0x1f45: 0x0040,\n\t0x1f46: 0x0040, 0x1f47: 0x0040, 0x1f48: 0x0040, 0x1f49: 0x0040, 0x1f4a: 0x0040, 0x1f4b: 0x0040,\n\t0x1f4c: 0x0040, 0x1f4d: 0x0040, 0x1f4e: 0x0040, 0x1f4f: 0x0040, 0x1f50: 0x2729, 0x1f51: 0x2731,\n\t0x1f52: 0x2739, 0x1f53: 0x2741, 0x1f54: 0x2749, 0x1f55: 0x2751, 0x1f56: 0x2759, 0x1f57: 0x2761,\n\t0x1f58: 0x2769, 0x1f59: 0x2771, 0x1f5a: 0x2779, 0x1f5b: 0x2781, 0x1f5c: 0x2789, 0x1f5d: 0x2791,\n\t0x1f5e: 0x2799, 0x1f5f: 0x27a1, 0x1f60: 0x27a9, 0x1f61: 0x27b1, 0x1f62: 0x27b9, 0x1f63: 0x27c1,\n\t0x1f64: 0x27c9, 0x1f65: 0x27d1, 0x1f66: 0x27d9, 0x1f67: 0x27e1, 0x1f68: 0x27e9, 0x1f69: 0x27f1,\n\t0x1f6a: 0x27f9, 0x1f6b: 0x2801, 0x1f6c: 0x2809, 0x1f6d: 0x2811, 0x1f6e: 0x2819, 0x1f6f: 0x2821,\n\t0x1f70: 0x2829, 0x1f71: 0x2831, 0x1f72: 0x2839, 0x1f73: 0x2841, 0x1f74: 0x2849, 0x1f75: 0x2851,\n\t0x1f76: 0x2859, 0x1f77: 0x2861, 0x1f78: 0x2869, 0x1f79: 0x2871, 0x1f7a: 0x2879, 0x1f7b: 0x2881,\n\t0x1f7c: 0x0040, 0x1f7d: 0x0040, 0x1f7e: 0x0040, 0x1f7f: 0x0040,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0x28e1, 0x1f81: 0x28e9, 0x1f82: 0x28f1, 0x1f83: 0x8cbd, 0x1f84: 0x28f9, 0x1f85: 0x2901,\n\t0x1f86: 0x2909, 0x1f87: 0x2911, 0x1f88: 0x2919, 0x1f89: 0x2921, 0x1f8a: 0x2929, 0x1f8b: 0x2931,\n\t0x1f8c: 0x2939, 0x1f8d: 0x8cdd, 0x1f8e: 0x2941, 0x1f8f: 0x2949, 0x1f90: 0x2951, 0x1f91: 0x2959,\n\t0x1f92: 0x8cfd, 0x1f93: 0x2961, 0x1f94: 0x2969, 0x1f95: 0x2799, 0x1f96: 0x8d1d, 0x1f97: 0x2971,\n\t0x1f98: 0x2979, 0x1f99: 0x2981, 0x1f9a: 0x2989, 0x1f9b: 0x2991, 0x1f9c: 0x8d3d, 0x1f9d: 0x2999,\n\t0x1f9e: 0x29a1, 0x1f9f: 0x29a9, 0x1fa0: 0x29b1, 0x1fa1: 0x29b9, 0x1fa2: 0x2871, 0x1fa3: 0x29c1,\n\t0x1fa4: 0x29c9, 0x1fa5: 0x29d1, 0x1fa6: 0x29d9, 0x1fa7: 0x29e1, 0x1fa8: 0x29e9, 0x1fa9: 0x29f1,\n\t0x1faa: 0x29f9, 0x1fab: 0x2a01, 0x1fac: 0x2a09, 0x1fad: 0x2a11, 0x1fae: 0x2a19, 0x1faf: 0x2a21,\n\t0x1fb0: 0x2a29, 0x1fb1: 0x2a31, 0x1fb2: 0x2a31, 0x1fb3: 0x2a31, 0x1fb4: 0x8d5d, 0x1fb5: 0x2a39,\n\t0x1fb6: 0x2a41, 0x1fb7: 0x2a49, 0x1fb8: 0x8d7d, 0x1fb9: 0x2a51, 0x1fba: 0x2a59, 0x1fbb: 0x2a61,\n\t0x1fbc: 0x2a69, 0x1fbd: 0x2a71, 0x1fbe: 0x2a79, 0x1fbf: 0x2a81,\n\t// Block 0x7f, offset 0x1fc0\n\t0x1fc0: 0x2a89, 0x1fc1: 0x2a91, 0x1fc2: 0x2a99, 0x1fc3: 0x2aa1, 0x1fc4: 0x2aa9, 0x1fc5: 0x2ab1,\n\t0x1fc6: 0x2ab1, 0x1fc7: 0x2ab9, 0x1fc8: 0x2ac1, 0x1fc9: 0x2ac9, 0x1fca: 0x2ad1, 0x1fcb: 0x2ad9,\n\t0x1fcc: 0x2ae1, 0x1fcd: 0x2ae9, 0x1fce: 0x2af1, 0x1fcf: 0x2af9, 0x1fd0: 0x2b01, 0x1fd1: 0x2b09,\n\t0x1fd2: 0x2b11, 0x1fd3: 0x2b19, 0x1fd4: 0x2b21, 0x1fd5: 0x2b29, 0x1fd6: 0x2b31, 0x1fd7: 0x2b39,\n\t0x1fd8: 0x2b41, 0x1fd9: 0x8d9d, 0x1fda: 0x2b49, 0x1fdb: 0x2b51, 0x1fdc: 0x2b59, 0x1fdd: 0x2751,\n\t0x1fde: 0x2b61, 0x1fdf: 0x2b69, 0x1fe0: 0x8dbd, 0x1fe1: 0x8ddd, 0x1fe2: 0x2b71, 0x1fe3: 0x2b79,\n\t0x1fe4: 0x2b81, 0x1fe5: 0x2b89, 0x1fe6: 0x2b91, 0x1fe7: 0x2b99, 0x1fe8: 0x2040, 0x1fe9: 0x2ba1,\n\t0x1fea: 0x2ba9, 0x1feb: 0x2ba9, 0x1fec: 0x8dfd, 0x1fed: 0x2bb1, 0x1fee: 0x2bb9, 0x1fef: 0x2bc1,\n\t0x1ff0: 0x2bc9, 0x1ff1: 0x8e1d, 0x1ff2: 0x2bd1, 0x1ff3: 0x2bd9, 0x1ff4: 0x2040, 0x1ff5: 0x2be1,\n\t0x1ff6: 0x2be9, 0x1ff7: 0x2bf1, 0x1ff8: 0x2bf9, 0x1ff9: 0x2c01, 0x1ffa: 0x2c09, 0x1ffb: 0x8e3d,\n\t0x1ffc: 0x2c11, 0x1ffd: 0x8e5d, 0x1ffe: 0x2c19, 0x1fff: 0x2c21,\n\t// Block 0x80, offset 0x2000\n\t0x2000: 0x2c29, 0x2001: 0x2c31, 0x2002: 0x2c39, 0x2003: 0x2c41, 0x2004: 0x2c49, 0x2005: 0x2c51,\n\t0x2006: 0x2c59, 0x2007: 0x2c61, 0x2008: 0x2c69, 0x2009: 0x8e7d, 0x200a: 0x2c71, 0x200b: 0x2c79,\n\t0x200c: 0x2c81, 0x200d: 0x2c89, 0x200e: 0x2c91, 0x200f: 0x8e9d, 0x2010: 0x2c99, 0x2011: 0x8ebd,\n\t0x2012: 0x8edd, 0x2013: 0x2ca1, 0x2014: 0x2ca9, 0x2015: 0x2ca9, 0x2016: 0x2cb1, 0x2017: 0x8efd,\n\t0x2018: 0x8f1d, 0x2019: 0x2cb9, 0x201a: 0x2cc1, 0x201b: 0x2cc9, 0x201c: 0x2cd1, 0x201d: 0x2cd9,\n\t0x201e: 0x2ce1, 0x201f: 0x2ce9, 0x2020: 0x2cf1, 0x2021: 0x2cf9, 0x2022: 0x2d01, 0x2023: 0x2d09,\n\t0x2024: 0x8f3d, 0x2025: 0x2d11, 0x2026: 0x2d19, 0x2027: 0x2d21, 0x2028: 0x2d29, 0x2029: 0x2d21,\n\t0x202a: 0x2d31, 0x202b: 0x2d39, 0x202c: 0x2d41, 0x202d: 0x2d49, 0x202e: 0x2d51, 0x202f: 0x2d59,\n\t0x2030: 0x2d61, 0x2031: 0x2d69, 0x2032: 0x2d71, 0x2033: 0x2d79, 0x2034: 0x2d81, 0x2035: 0x2d89,\n\t0x2036: 0x2d91, 0x2037: 0x2d99, 0x2038: 0x8f5d, 0x2039: 0x2da1, 0x203a: 0x2da9, 0x203b: 0x2db1,\n\t0x203c: 0x2db9, 0x203d: 0x2dc1, 0x203e: 0x8f7d, 0x203f: 0x2dc9,\n\t// Block 0x81, offset 0x2040\n\t0x2040: 0x2dd1, 0x2041: 0x2dd9, 0x2042: 0x2de1, 0x2043: 0x2de9, 0x2044: 0x2df1, 0x2045: 0x2df9,\n\t0x2046: 0x2e01, 0x2047: 0x2e09, 0x2048: 0x2e11, 0x2049: 0x2e19, 0x204a: 0x8f9d, 0x204b: 0x2e21,\n\t0x204c: 0x2e29, 0x204d: 0x2e31, 0x204e: 0x2e39, 0x204f: 0x2e41, 0x2050: 0x2e49, 0x2051: 0x2e51,\n\t0x2052: 0x2e59, 0x2053: 0x2e61, 0x2054: 0x2e69, 0x2055: 0x2e71, 0x2056: 0x2e79, 0x2057: 0x2e81,\n\t0x2058: 0x2e89, 0x2059: 0x2e91, 0x205a: 0x2e99, 0x205b: 0x2ea1, 0x205c: 0x2ea9, 0x205d: 0x8fbd,\n\t0x205e: 0x2eb1, 0x205f: 0x2eb9, 0x2060: 0x2ec1, 0x2061: 0x2ec9, 0x2062: 0x2ed1, 0x2063: 0x8fdd,\n\t0x2064: 0x2ed9, 0x2065: 0x2ee1, 0x2066: 0x2ee9, 0x2067: 0x2ef1, 0x2068: 0x2ef9, 0x2069: 0x2f01,\n\t0x206a: 0x2f09, 0x206b: 0x2f11, 0x206c: 0x7f0d, 0x206d: 0x2f19, 0x206e: 0x2f21, 0x206f: 0x2f29,\n\t0x2070: 0x8ffd, 0x2071: 0x2f31, 0x2072: 0x2f39, 0x2073: 0x2f41, 0x2074: 0x2f49, 0x2075: 0x2f51,\n\t0x2076: 0x2f59, 0x2077: 0x901d, 0x2078: 0x903d, 0x2079: 0x905d, 0x207a: 0x2f61, 0x207b: 0x907d,\n\t0x207c: 0x2f69, 0x207d: 0x2f71, 0x207e: 0x2f79, 0x207f: 0x2f81,\n\t// Block 0x82, offset 0x2080\n\t0x2080: 0x2f89, 0x2081: 0x2f91, 0x2082: 0x2f99, 0x2083: 0x2fa1, 0x2084: 0x2fa9, 0x2085: 0x2fb1,\n\t0x2086: 0x909d, 0x2087: 0x2fb9, 0x2088: 0x2fc1, 0x2089: 0x2fc9, 0x208a: 0x2fd1, 0x208b: 0x2fd9,\n\t0x208c: 0x2fe1, 0x208d: 0x90bd, 0x208e: 0x2fe9, 0x208f: 0x2ff1, 0x2090: 0x90dd, 0x2091: 0x90fd,\n\t0x2092: 0x2ff9, 0x2093: 0x3001, 0x2094: 0x3009, 0x2095: 0x3011, 0x2096: 0x3019, 0x2097: 0x3021,\n\t0x2098: 0x3029, 0x2099: 0x3031, 0x209a: 0x3039, 0x209b: 0x911d, 0x209c: 0x3041, 0x209d: 0x913d,\n\t0x209e: 0x3049, 0x209f: 0x2040, 0x20a0: 0x3051, 0x20a1: 0x3059, 0x20a2: 0x3061, 0x20a3: 0x915d,\n\t0x20a4: 0x3069, 0x20a5: 0x3071, 0x20a6: 0x917d, 0x20a7: 0x919d, 0x20a8: 0x3079, 0x20a9: 0x3081,\n\t0x20aa: 0x3089, 0x20ab: 0x3091, 0x20ac: 0x3099, 0x20ad: 0x3099, 0x20ae: 0x30a1, 0x20af: 0x30a9,\n\t0x20b0: 0x30b1, 0x20b1: 0x30b9, 0x20b2: 0x30c1, 0x20b3: 0x30c9, 0x20b4: 0x30d1, 0x20b5: 0x91bd,\n\t0x20b6: 0x30d9, 0x20b7: 0x91dd, 0x20b8: 0x30e1, 0x20b9: 0x91fd, 0x20ba: 0x30e9, 0x20bb: 0x921d,\n\t0x20bc: 0x923d, 0x20bd: 0x925d, 0x20be: 0x30f1, 0x20bf: 0x30f9,\n\t// Block 0x83, offset 0x20c0\n\t0x20c0: 0x3101, 0x20c1: 0x927d, 0x20c2: 0x929d, 0x20c3: 0x92bd, 0x20c4: 0x92dd, 0x20c5: 0x3109,\n\t0x20c6: 0x3111, 0x20c7: 0x3111, 0x20c8: 0x3119, 0x20c9: 0x3121, 0x20ca: 0x3129, 0x20cb: 0x3131,\n\t0x20cc: 0x3139, 0x20cd: 0x92fd, 0x20ce: 0x3141, 0x20cf: 0x3149, 0x20d0: 0x3151, 0x20d1: 0x3159,\n\t0x20d2: 0x931d, 0x20d3: 0x3161, 0x20d4: 0x933d, 0x20d5: 0x935d, 0x20d6: 0x3169, 0x20d7: 0x3171,\n\t0x20d8: 0x3179, 0x20d9: 0x3181, 0x20da: 0x3189, 0x20db: 0x3191, 0x20dc: 0x937d, 0x20dd: 0x939d,\n\t0x20de: 0x93bd, 0x20df: 0x2040, 0x20e0: 0x3199, 0x20e1: 0x93dd, 0x20e2: 0x31a1, 0x20e3: 0x31a9,\n\t0x20e4: 0x31b1, 0x20e5: 0x93fd, 0x20e6: 0x31b9, 0x20e7: 0x31c1, 0x20e8: 0x31c9, 0x20e9: 0x31d1,\n\t0x20ea: 0x31d9, 0x20eb: 0x941d, 0x20ec: 0x31e1, 0x20ed: 0x31e9, 0x20ee: 0x31f1, 0x20ef: 0x31f9,\n\t0x20f0: 0x3201, 0x20f1: 0x3209, 0x20f2: 0x943d, 0x20f3: 0x945d, 0x20f4: 0x3211, 0x20f5: 0x947d,\n\t0x20f6: 0x3219, 0x20f7: 0x949d, 0x20f8: 0x3221, 0x20f9: 0x3229, 0x20fa: 0x3231, 0x20fb: 0x94bd,\n\t0x20fc: 0x94dd, 0x20fd: 0x3239, 0x20fe: 0x94fd, 0x20ff: 0x3241,\n\t// Block 0x84, offset 0x2100\n\t0x2100: 0x951d, 0x2101: 0x3249, 0x2102: 0x3251, 0x2103: 0x3259, 0x2104: 0x3261, 0x2105: 0x3269,\n\t0x2106: 0x3271, 0x2107: 0x953d, 0x2108: 0x955d, 0x2109: 0x957d, 0x210a: 0x959d, 0x210b: 0x2ca1,\n\t0x210c: 0x3279, 0x210d: 0x3281, 0x210e: 0x3289, 0x210f: 0x3291, 0x2110: 0x3299, 0x2111: 0x32a1,\n\t0x2112: 0x32a9, 0x2113: 0x32b1, 0x2114: 0x32b9, 0x2115: 0x32c1, 0x2116: 0x32c9, 0x2117: 0x95bd,\n\t0x2118: 0x32d1, 0x2119: 0x32d9, 0x211a: 0x32e1, 0x211b: 0x32e9, 0x211c: 0x32f1, 0x211d: 0x32f9,\n\t0x211e: 0x3301, 0x211f: 0x3309, 0x2120: 0x3311, 0x2121: 0x3319, 0x2122: 0x3321, 0x2123: 0x3329,\n\t0x2124: 0x95dd, 0x2125: 0x95fd, 0x2126: 0x961d, 0x2127: 0x3331, 0x2128: 0x3339, 0x2129: 0x3341,\n\t0x212a: 0x3349, 0x212b: 0x963d, 0x212c: 0x3351, 0x212d: 0x965d, 0x212e: 0x3359, 0x212f: 0x3361,\n\t0x2130: 0x967d, 0x2131: 0x969d, 0x2132: 0x3369, 0x2133: 0x3371, 0x2134: 0x3379, 0x2135: 0x3381,\n\t0x2136: 0x3389, 0x2137: 0x3391, 0x2138: 0x3399, 0x2139: 0x33a1, 0x213a: 0x33a9, 0x213b: 0x33b1,\n\t0x213c: 0x33b9, 0x213d: 0x33c1, 0x213e: 0x33c9, 0x213f: 0x2040,\n\t// Block 0x85, offset 0x2140\n\t0x2140: 0x33d1, 0x2141: 0x33d9, 0x2142: 0x33e1, 0x2143: 0x33e9, 0x2144: 0x33f1, 0x2145: 0x96bd,\n\t0x2146: 0x33f9, 0x2147: 0x3401, 0x2148: 0x3409, 0x2149: 0x3411, 0x214a: 0x3419, 0x214b: 0x96dd,\n\t0x214c: 0x96fd, 0x214d: 0x3421, 0x214e: 0x3429, 0x214f: 0x3431, 0x2150: 0x3439, 0x2151: 0x3441,\n\t0x2152: 0x3449, 0x2153: 0x971d, 0x2154: 0x3451, 0x2155: 0x3459, 0x2156: 0x3461, 0x2157: 0x3469,\n\t0x2158: 0x973d, 0x2159: 0x975d, 0x215a: 0x3471, 0x215b: 0x3479, 0x215c: 0x3481, 0x215d: 0x977d,\n\t0x215e: 0x3489, 0x215f: 0x3491, 0x2160: 0x684d, 0x2161: 0x979d, 0x2162: 0x3499, 0x2163: 0x34a1,\n\t0x2164: 0x34a9, 0x2165: 0x97bd, 0x2166: 0x34b1, 0x2167: 0x34b9, 0x2168: 0x34c1, 0x2169: 0x34c9,\n\t0x216a: 0x34d1, 0x216b: 0x34d9, 0x216c: 0x34e1, 0x216d: 0x97dd, 0x216e: 0x34e9, 0x216f: 0x34f1,\n\t0x2170: 0x34f9, 0x2171: 0x97fd, 0x2172: 0x3501, 0x2173: 0x3509, 0x2174: 0x3511, 0x2175: 0x3519,\n\t0x2176: 0x7b6d, 0x2177: 0x981d, 0x2178: 0x3521, 0x2179: 0x3529, 0x217a: 0x3531, 0x217b: 0x983d,\n\t0x217c: 0x3539, 0x217d: 0x985d, 0x217e: 0x3541, 0x217f: 0x3541,\n\t// Block 0x86, offset 0x2180\n\t0x2180: 0x3549, 0x2181: 0x987d, 0x2182: 0x3551, 0x2183: 0x3559, 0x2184: 0x3561, 0x2185: 0x3569,\n\t0x2186: 0x3571, 0x2187: 0x3579, 0x2188: 0x3581, 0x2189: 0x989d, 0x218a: 0x3589, 0x218b: 0x3591,\n\t0x218c: 0x3599, 0x218d: 0x35a1, 0x218e: 0x35a9, 0x218f: 0x35b1, 0x2190: 0x98bd, 0x2191: 0x35b9,\n\t0x2192: 0x98dd, 0x2193: 0x98fd, 0x2194: 0x991d, 0x2195: 0x35c1, 0x2196: 0x35c9, 0x2197: 0x35d1,\n\t0x2198: 0x35d9, 0x2199: 0x35e1, 0x219a: 0x35e9, 0x219b: 0x35f1, 0x219c: 0x35f9, 0x219d: 0x993d,\n\t0x219e: 0x0040, 0x219f: 0x0040, 0x21a0: 0x0040, 0x21a1: 0x0040, 0x21a2: 0x0040, 0x21a3: 0x0040,\n\t0x21a4: 0x0040, 0x21a5: 0x0040, 0x21a6: 0x0040, 0x21a7: 0x0040, 0x21a8: 0x0040, 0x21a9: 0x0040,\n\t0x21aa: 0x0040, 0x21ab: 0x0040, 0x21ac: 0x0040, 0x21ad: 0x0040, 0x21ae: 0x0040, 0x21af: 0x0040,\n\t0x21b0: 0x0040, 0x21b1: 0x0040, 0x21b2: 0x0040, 0x21b3: 0x0040, 0x21b4: 0x0040, 0x21b5: 0x0040,\n\t0x21b6: 0x0040, 0x21b7: 0x0040, 0x21b8: 0x0040, 0x21b9: 0x0040, 0x21ba: 0x0040, 0x21bb: 0x0040,\n\t0x21bc: 0x0040, 0x21bd: 0x0040, 0x21be: 0x0040, 0x21bf: 0x0040,\n}\n\n// idnaIndex: 39 blocks, 2496 entries, 4992 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2496]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x85, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x86, 0xca: 0x87, 0xcb: 0x07, 0xcc: 0x88, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x89, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x8a, 0xd6: 0x8b, 0xd7: 0x8c,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x8d, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x8e, 0xde: 0x8f, 0xdf: 0x90,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x07, 0xea: 0x08, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x09, 0xee: 0x0a, 0xef: 0x0b,\n\t0xf0: 0x20, 0xf1: 0x21, 0xf2: 0x21, 0xf3: 0x23, 0xf4: 0x24,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x91, 0x121: 0x13, 0x122: 0x14, 0x123: 0x92, 0x124: 0x93, 0x125: 0x15, 0x126: 0x16, 0x127: 0x17,\n\t0x128: 0x18, 0x129: 0x19, 0x12a: 0x1a, 0x12b: 0x1b, 0x12c: 0x1c, 0x12d: 0x1d, 0x12e: 0x1e, 0x12f: 0x94,\n\t0x130: 0x95, 0x131: 0x1f, 0x132: 0x20, 0x133: 0x21, 0x134: 0x96, 0x135: 0x22, 0x136: 0x97, 0x137: 0x98,\n\t0x138: 0x99, 0x139: 0x9a, 0x13a: 0x23, 0x13b: 0x9b, 0x13c: 0x9c, 0x13d: 0x24, 0x13e: 0x25, 0x13f: 0x9d,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x9e, 0x141: 0x9f, 0x142: 0xa0, 0x143: 0xa1, 0x144: 0xa2, 0x145: 0xa3, 0x146: 0xa4, 0x147: 0xa5,\n\t0x148: 0xa6, 0x149: 0xa7, 0x14a: 0xa8, 0x14b: 0xa9, 0x14c: 0xaa, 0x14d: 0xab, 0x14e: 0xac, 0x14f: 0xad,\n\t0x150: 0xae, 0x151: 0xa6, 0x152: 0xa6, 0x153: 0xa6, 0x154: 0xa6, 0x155: 0xa6, 0x156: 0xa6, 0x157: 0xa6,\n\t0x158: 0xa6, 0x159: 0xaf, 0x15a: 0xb0, 0x15b: 0xb1, 0x15c: 0xb2, 0x15d: 0xb3, 0x15e: 0xb4, 0x15f: 0xb5,\n\t0x160: 0xb6, 0x161: 0xb7, 0x162: 0xb8, 0x163: 0xb9, 0x164: 0xba, 0x165: 0xbb, 0x166: 0xbc, 0x167: 0xbd,\n\t0x168: 0xbe, 0x169: 0xbf, 0x16a: 0xc0, 0x16b: 0xc1, 0x16c: 0xc2, 0x16d: 0xc3, 0x16e: 0xc4, 0x16f: 0xc5,\n\t0x170: 0xc6, 0x171: 0xc7, 0x172: 0xc8, 0x173: 0xc9, 0x174: 0x26, 0x175: 0x27, 0x176: 0x28, 0x177: 0x88,\n\t0x178: 0x29, 0x179: 0x29, 0x17a: 0x2a, 0x17b: 0x29, 0x17c: 0xca, 0x17d: 0x2b, 0x17e: 0x2c, 0x17f: 0x2d,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2e, 0x181: 0x2f, 0x182: 0x30, 0x183: 0xcb, 0x184: 0x31, 0x185: 0x32, 0x186: 0xcc, 0x187: 0xa2,\n\t0x188: 0xcd, 0x189: 0xce, 0x18a: 0xa2, 0x18b: 0xa2, 0x18c: 0xcf, 0x18d: 0xa2, 0x18e: 0xa2, 0x18f: 0xa2,\n\t0x190: 0xd0, 0x191: 0x33, 0x192: 0x34, 0x193: 0x35, 0x194: 0xa2, 0x195: 0xa2, 0x196: 0xa2, 0x197: 0xa2,\n\t0x198: 0xa2, 0x199: 0xa2, 0x19a: 0xa2, 0x19b: 0xa2, 0x19c: 0xa2, 0x19d: 0xa2, 0x19e: 0xa2, 0x19f: 0xa2,\n\t0x1a0: 0xa2, 0x1a1: 0xa2, 0x1a2: 0xa2, 0x1a3: 0xa2, 0x1a4: 0xa2, 0x1a5: 0xa2, 0x1a6: 0xa2, 0x1a7: 0xa2,\n\t0x1a8: 0xd1, 0x1a9: 0xd2, 0x1aa: 0xa2, 0x1ab: 0xd3, 0x1ac: 0xa2, 0x1ad: 0xd4, 0x1ae: 0xd5, 0x1af: 0xa2,\n\t0x1b0: 0xd6, 0x1b1: 0x36, 0x1b2: 0x29, 0x1b3: 0x37, 0x1b4: 0xd7, 0x1b5: 0xd8, 0x1b6: 0xd9, 0x1b7: 0xda,\n\t0x1b8: 0xdb, 0x1b9: 0xdc, 0x1ba: 0xdd, 0x1bb: 0xde, 0x1bc: 0xdf, 0x1bd: 0xe0, 0x1be: 0xe1, 0x1bf: 0x38,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x39, 0x1c1: 0xe2, 0x1c2: 0xe3, 0x1c3: 0xe4, 0x1c4: 0xe5, 0x1c5: 0x3a, 0x1c6: 0x3b, 0x1c7: 0xe6,\n\t0x1c8: 0xe7, 0x1c9: 0x3c, 0x1ca: 0x3d, 0x1cb: 0x3e, 0x1cc: 0xe8, 0x1cd: 0xe9, 0x1ce: 0x3f, 0x1cf: 0x40,\n\t0x1d0: 0xa6, 0x1d1: 0xa6, 0x1d2: 0xa6, 0x1d3: 0xa6, 0x1d4: 0xa6, 0x1d5: 0xa6, 0x1d6: 0xa6, 0x1d7: 0xa6,\n\t0x1d8: 0xa6, 0x1d9: 0xa6, 0x1da: 0xa6, 0x1db: 0xa6, 0x1dc: 0xa6, 0x1dd: 0xa6, 0x1de: 0xa6, 0x1df: 0xa6,\n\t0x1e0: 0xa6, 0x1e1: 0xa6, 0x1e2: 0xa6, 0x1e3: 0xa6, 0x1e4: 0xa6, 0x1e5: 0xa6, 0x1e6: 0xa6, 0x1e7: 0xa6,\n\t0x1e8: 0xa6, 0x1e9: 0xa6, 0x1ea: 0xa6, 0x1eb: 0xa6, 0x1ec: 0xa6, 0x1ed: 0xa6, 0x1ee: 0xa6, 0x1ef: 0xa6,\n\t0x1f0: 0xa6, 0x1f1: 0xa6, 0x1f2: 0xa6, 0x1f3: 0xa6, 0x1f4: 0xa6, 0x1f5: 0xa6, 0x1f6: 0xa6, 0x1f7: 0xa6,\n\t0x1f8: 0xa6, 0x1f9: 0xa6, 0x1fa: 0xa6, 0x1fb: 0xa6, 0x1fc: 0xa6, 0x1fd: 0xa6, 0x1fe: 0xa6, 0x1ff: 0xa6,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xa6, 0x201: 0xa6, 0x202: 0xa6, 0x203: 0xa6, 0x204: 0xa6, 0x205: 0xa6, 0x206: 0xa6, 0x207: 0xa6,\n\t0x208: 0xa6, 0x209: 0xa6, 0x20a: 0xa6, 0x20b: 0xa6, 0x20c: 0xa6, 0x20d: 0xa6, 0x20e: 0xa6, 0x20f: 0xa6,\n\t0x210: 0xa6, 0x211: 0xa6, 0x212: 0xa6, 0x213: 0xa6, 0x214: 0xa6, 0x215: 0xa6, 0x216: 0xa6, 0x217: 0xa6,\n\t0x218: 0xa6, 0x219: 0xa6, 0x21a: 0xa6, 0x21b: 0xa6, 0x21c: 0xa6, 0x21d: 0xa6, 0x21e: 0xa6, 0x21f: 0xa6,\n\t0x220: 0xa6, 0x221: 0xa6, 0x222: 0xa6, 0x223: 0xa6, 0x224: 0xa6, 0x225: 0xa6, 0x226: 0xa6, 0x227: 0xa6,\n\t0x228: 0xa6, 0x229: 0xa6, 0x22a: 0xa6, 0x22b: 0xa6, 0x22c: 0xa6, 0x22d: 0xa6, 0x22e: 0xa6, 0x22f: 0xa6,\n\t0x230: 0xa6, 0x231: 0xa6, 0x232: 0xa6, 0x233: 0xa6, 0x234: 0xa6, 0x235: 0xa6, 0x236: 0xa6, 0x237: 0xa2,\n\t0x238: 0xa6, 0x239: 0xa6, 0x23a: 0xa6, 0x23b: 0xa6, 0x23c: 0xa6, 0x23d: 0xa6, 0x23e: 0xa6, 0x23f: 0xa6,\n\t// Block 0x9, offset 0x240\n\t0x240: 0xa6, 0x241: 0xa6, 0x242: 0xa6, 0x243: 0xa6, 0x244: 0xa6, 0x245: 0xa6, 0x246: 0xa6, 0x247: 0xa6,\n\t0x248: 0xa6, 0x249: 0xa6, 0x24a: 0xa6, 0x24b: 0xa6, 0x24c: 0xa6, 0x24d: 0xa6, 0x24e: 0xa6, 0x24f: 0xa6,\n\t0x250: 0xa6, 0x251: 0xa6, 0x252: 0xa6, 0x253: 0xa6, 0x254: 0xa6, 0x255: 0xa6, 0x256: 0xa6, 0x257: 0xa6,\n\t0x258: 0xa6, 0x259: 0xa6, 0x25a: 0xa6, 0x25b: 0xa6, 0x25c: 0xa6, 0x25d: 0xa6, 0x25e: 0xa6, 0x25f: 0xa6,\n\t0x260: 0xa6, 0x261: 0xa6, 0x262: 0xa6, 0x263: 0xa6, 0x264: 0xa6, 0x265: 0xa6, 0x266: 0xa6, 0x267: 0xa6,\n\t0x268: 0xa6, 0x269: 0xa6, 0x26a: 0xa6, 0x26b: 0xa6, 0x26c: 0xa6, 0x26d: 0xa6, 0x26e: 0xa6, 0x26f: 0xa6,\n\t0x270: 0xa6, 0x271: 0xa6, 0x272: 0xa6, 0x273: 0xa6, 0x274: 0xa6, 0x275: 0xa6, 0x276: 0xa6, 0x277: 0xa6,\n\t0x278: 0xa6, 0x279: 0xa6, 0x27a: 0xa6, 0x27b: 0xa6, 0x27c: 0xa6, 0x27d: 0xa6, 0x27e: 0xa6, 0x27f: 0xa6,\n\t// Block 0xa, offset 0x280\n\t0x280: 0xa6, 0x281: 0xa6, 0x282: 0xa6, 0x283: 0xa6, 0x284: 0xa6, 0x285: 0xa6, 0x286: 0xa6, 0x287: 0xa6,\n\t0x288: 0xa6, 0x289: 0xa6, 0x28a: 0xa6, 0x28b: 0xa6, 0x28c: 0xa6, 0x28d: 0xa6, 0x28e: 0xa6, 0x28f: 0xa6,\n\t0x290: 0xa6, 0x291: 0xa6, 0x292: 0xea, 0x293: 0xeb, 0x294: 0xa6, 0x295: 0xa6, 0x296: 0xa6, 0x297: 0xa6,\n\t0x298: 0xec, 0x299: 0x41, 0x29a: 0x42, 0x29b: 0xed, 0x29c: 0x43, 0x29d: 0x44, 0x29e: 0x45, 0x29f: 0x46,\n\t0x2a0: 0xee, 0x2a1: 0xef, 0x2a2: 0xf0, 0x2a3: 0xf1, 0x2a4: 0xf2, 0x2a5: 0xf3, 0x2a6: 0xf4, 0x2a7: 0xf5,\n\t0x2a8: 0xf6, 0x2a9: 0xf7, 0x2aa: 0xf8, 0x2ab: 0xf9, 0x2ac: 0xfa, 0x2ad: 0xfb, 0x2ae: 0xfc, 0x2af: 0xfd,\n\t0x2b0: 0xa6, 0x2b1: 0xa6, 0x2b2: 0xa6, 0x2b3: 0xa6, 0x2b4: 0xa6, 0x2b5: 0xa6, 0x2b6: 0xa6, 0x2b7: 0xa6,\n\t0x2b8: 0xa6, 0x2b9: 0xa6, 0x2ba: 0xa6, 0x2bb: 0xa6, 0x2bc: 0xa6, 0x2bd: 0xa6, 0x2be: 0xa6, 0x2bf: 0xa6,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0xa6, 0x2c1: 0xa6, 0x2c2: 0xa6, 0x2c3: 0xa6, 0x2c4: 0xa6, 0x2c5: 0xa6, 0x2c6: 0xa6, 0x2c7: 0xa6,\n\t0x2c8: 0xa6, 0x2c9: 0xa6, 0x2ca: 0xa6, 0x2cb: 0xa6, 0x2cc: 0xa6, 0x2cd: 0xa6, 0x2ce: 0xa6, 0x2cf: 0xa6,\n\t0x2d0: 0xa6, 0x2d1: 0xa6, 0x2d2: 0xa6, 0x2d3: 0xa6, 0x2d4: 0xa6, 0x2d5: 0xa6, 0x2d6: 0xa6, 0x2d7: 0xa6,\n\t0x2d8: 0xa6, 0x2d9: 0xa6, 0x2da: 0xa6, 0x2db: 0xa6, 0x2dc: 0xa6, 0x2dd: 0xa6, 0x2de: 0xfe, 0x2df: 0xff,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x100, 0x301: 0x100, 0x302: 0x100, 0x303: 0x100, 0x304: 0x100, 0x305: 0x100, 0x306: 0x100, 0x307: 0x100,\n\t0x308: 0x100, 0x309: 0x100, 0x30a: 0x100, 0x30b: 0x100, 0x30c: 0x100, 0x30d: 0x100, 0x30e: 0x100, 0x30f: 0x100,\n\t0x310: 0x100, 0x311: 0x100, 0x312: 0x100, 0x313: 0x100, 0x314: 0x100, 0x315: 0x100, 0x316: 0x100, 0x317: 0x100,\n\t0x318: 0x100, 0x319: 0x100, 0x31a: 0x100, 0x31b: 0x100, 0x31c: 0x100, 0x31d: 0x100, 0x31e: 0x100, 0x31f: 0x100,\n\t0x320: 0x100, 0x321: 0x100, 0x322: 0x100, 0x323: 0x100, 0x324: 0x100, 0x325: 0x100, 0x326: 0x100, 0x327: 0x100,\n\t0x328: 0x100, 0x329: 0x100, 0x32a: 0x100, 0x32b: 0x100, 0x32c: 0x100, 0x32d: 0x100, 0x32e: 0x100, 0x32f: 0x100,\n\t0x330: 0x100, 0x331: 0x100, 0x332: 0x100, 0x333: 0x100, 0x334: 0x100, 0x335: 0x100, 0x336: 0x100, 0x337: 0x100,\n\t0x338: 0x100, 0x339: 0x100, 0x33a: 0x100, 0x33b: 0x100, 0x33c: 0x100, 0x33d: 0x100, 0x33e: 0x100, 0x33f: 0x100,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x100, 0x341: 0x100, 0x342: 0x100, 0x343: 0x100, 0x344: 0x100, 0x345: 0x100, 0x346: 0x100, 0x347: 0x100,\n\t0x348: 0x100, 0x349: 0x100, 0x34a: 0x100, 0x34b: 0x100, 0x34c: 0x100, 0x34d: 0x100, 0x34e: 0x100, 0x34f: 0x100,\n\t0x350: 0x100, 0x351: 0x100, 0x352: 0x100, 0x353: 0x100, 0x354: 0x100, 0x355: 0x100, 0x356: 0x100, 0x357: 0x100,\n\t0x358: 0x100, 0x359: 0x100, 0x35a: 0x100, 0x35b: 0x100, 0x35c: 0x100, 0x35d: 0x100, 0x35e: 0x100, 0x35f: 0x100,\n\t0x360: 0x100, 0x361: 0x100, 0x362: 0x100, 0x363: 0x100, 0x364: 0x101, 0x365: 0x102, 0x366: 0x103, 0x367: 0x104,\n\t0x368: 0x47, 0x369: 0x105, 0x36a: 0x106, 0x36b: 0x48, 0x36c: 0x49, 0x36d: 0x4a, 0x36e: 0x4b, 0x36f: 0x4c,\n\t0x370: 0x107, 0x371: 0x4d, 0x372: 0x4e, 0x373: 0x4f, 0x374: 0x50, 0x375: 0x51, 0x376: 0x108, 0x377: 0x52,\n\t0x378: 0x53, 0x379: 0x54, 0x37a: 0x55, 0x37b: 0x56, 0x37c: 0x57, 0x37d: 0x58, 0x37e: 0x59, 0x37f: 0x5a,\n\t// Block 0xe, offset 0x380\n\t0x380: 0x109, 0x381: 0x10a, 0x382: 0xa6, 0x383: 0x10b, 0x384: 0x10c, 0x385: 0xa2, 0x386: 0x10d, 0x387: 0x10e,\n\t0x388: 0x100, 0x389: 0x100, 0x38a: 0x10f, 0x38b: 0x110, 0x38c: 0x111, 0x38d: 0x112, 0x38e: 0x113, 0x38f: 0x114,\n\t0x390: 0x115, 0x391: 0xa6, 0x392: 0x116, 0x393: 0x117, 0x394: 0x118, 0x395: 0x5b, 0x396: 0x5c, 0x397: 0x100,\n\t0x398: 0xa6, 0x399: 0xa6, 0x39a: 0xa6, 0x39b: 0xa6, 0x39c: 0x119, 0x39d: 0x11a, 0x39e: 0x5d, 0x39f: 0x100,\n\t0x3a0: 0x11b, 0x3a1: 0x11c, 0x3a2: 0x11d, 0x3a3: 0x11e, 0x3a4: 0x11f, 0x3a5: 0x100, 0x3a6: 0x120, 0x3a7: 0x121,\n\t0x3a8: 0x122, 0x3a9: 0x123, 0x3aa: 0x124, 0x3ab: 0x5e, 0x3ac: 0x125, 0x3ad: 0x126, 0x3ae: 0x5f, 0x3af: 0x100,\n\t0x3b0: 0x127, 0x3b1: 0x128, 0x3b2: 0x129, 0x3b3: 0x12a, 0x3b4: 0x12b, 0x3b5: 0x100, 0x3b6: 0x100, 0x3b7: 0x100,\n\t0x3b8: 0x100, 0x3b9: 0x12c, 0x3ba: 0x12d, 0x3bb: 0x12e, 0x3bc: 0x12f, 0x3bd: 0x130, 0x3be: 0x131, 0x3bf: 0x132,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x133, 0x3c1: 0x134, 0x3c2: 0x135, 0x3c3: 0x136, 0x3c4: 0x137, 0x3c5: 0x138, 0x3c6: 0x139, 0x3c7: 0x13a,\n\t0x3c8: 0x13b, 0x3c9: 0x13c, 0x3ca: 0x13d, 0x3cb: 0x13e, 0x3cc: 0x60, 0x3cd: 0x61, 0x3ce: 0x100, 0x3cf: 0x100,\n\t0x3d0: 0x13f, 0x3d1: 0x140, 0x3d2: 0x141, 0x3d3: 0x142, 0x3d4: 0x100, 0x3d5: 0x100, 0x3d6: 0x143, 0x3d7: 0x144,\n\t0x3d8: 0x145, 0x3d9: 0x146, 0x3da: 0x147, 0x3db: 0x148, 0x3dc: 0x149, 0x3dd: 0x14a, 0x3de: 0x100, 0x3df: 0x100,\n\t0x3e0: 0x14b, 0x3e1: 0x100, 0x3e2: 0x14c, 0x3e3: 0x14d, 0x3e4: 0x62, 0x3e5: 0x14e, 0x3e6: 0x14f, 0x3e7: 0x150,\n\t0x3e8: 0x151, 0x3e9: 0x152, 0x3ea: 0x153, 0x3eb: 0x154, 0x3ec: 0x155, 0x3ed: 0x100, 0x3ee: 0x100, 0x3ef: 0x100,\n\t0x3f0: 0x156, 0x3f1: 0x157, 0x3f2: 0x158, 0x3f3: 0x100, 0x3f4: 0x159, 0x3f5: 0x15a, 0x3f6: 0x15b, 0x3f7: 0x100,\n\t0x3f8: 0x100, 0x3f9: 0x100, 0x3fa: 0x100, 0x3fb: 0x15c, 0x3fc: 0x15d, 0x3fd: 0x15e, 0x3fe: 0x15f, 0x3ff: 0x160,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xa6, 0x401: 0xa6, 0x402: 0xa6, 0x403: 0xa6, 0x404: 0xa6, 0x405: 0xa6, 0x406: 0xa6, 0x407: 0xa6,\n\t0x408: 0xa6, 0x409: 0xa6, 0x40a: 0xa6, 0x40b: 0xa6, 0x40c: 0xa6, 0x40d: 0xa6, 0x40e: 0x161, 0x40f: 0x100,\n\t0x410: 0xa2, 0x411: 0x162, 0x412: 0xa6, 0x413: 0xa6, 0x414: 0xa6, 0x415: 0x163, 0x416: 0x100, 0x417: 0x100,\n\t0x418: 0x100, 0x419: 0x100, 0x41a: 0x100, 0x41b: 0x100, 0x41c: 0x100, 0x41d: 0x100, 0x41e: 0x100, 0x41f: 0x100,\n\t0x420: 0x100, 0x421: 0x100, 0x422: 0x100, 0x423: 0x100, 0x424: 0x100, 0x425: 0x100, 0x426: 0x100, 0x427: 0x100,\n\t0x428: 0x100, 0x429: 0x100, 0x42a: 0x100, 0x42b: 0x100, 0x42c: 0x100, 0x42d: 0x100, 0x42e: 0x100, 0x42f: 0x100,\n\t0x430: 0x100, 0x431: 0x100, 0x432: 0x100, 0x433: 0x100, 0x434: 0x100, 0x435: 0x100, 0x436: 0x100, 0x437: 0x100,\n\t0x438: 0x100, 0x439: 0x100, 0x43a: 0x100, 0x43b: 0x100, 0x43c: 0x100, 0x43d: 0x100, 0x43e: 0x164, 0x43f: 0x165,\n\t// Block 0x11, offset 0x440\n\t0x440: 0xa6, 0x441: 0xa6, 0x442: 0xa6, 0x443: 0xa6, 0x444: 0xa6, 0x445: 0xa6, 0x446: 0xa6, 0x447: 0xa6,\n\t0x448: 0xa6, 0x449: 0xa6, 0x44a: 0xa6, 0x44b: 0xa6, 0x44c: 0xa6, 0x44d: 0xa6, 0x44e: 0xa6, 0x44f: 0xa6,\n\t0x450: 0x166, 0x451: 0x167, 0x452: 0x100, 0x453: 0x100, 0x454: 0x100, 0x455: 0x100, 0x456: 0x100, 0x457: 0x100,\n\t0x458: 0x100, 0x459: 0x100, 0x45a: 0x100, 0x45b: 0x100, 0x45c: 0x100, 0x45d: 0x100, 0x45e: 0x100, 0x45f: 0x100,\n\t0x460: 0x100, 0x461: 0x100, 0x462: 0x100, 0x463: 0x100, 0x464: 0x100, 0x465: 0x100, 0x466: 0x100, 0x467: 0x100,\n\t0x468: 0x100, 0x469: 0x100, 0x46a: 0x100, 0x46b: 0x100, 0x46c: 0x100, 0x46d: 0x100, 0x46e: 0x100, 0x46f: 0x100,\n\t0x470: 0x100, 0x471: 0x100, 0x472: 0x100, 0x473: 0x100, 0x474: 0x100, 0x475: 0x100, 0x476: 0x100, 0x477: 0x100,\n\t0x478: 0x100, 0x479: 0x100, 0x47a: 0x100, 0x47b: 0x100, 0x47c: 0x100, 0x47d: 0x100, 0x47e: 0x100, 0x47f: 0x100,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x100, 0x481: 0x100, 0x482: 0x100, 0x483: 0x100, 0x484: 0x100, 0x485: 0x100, 0x486: 0x100, 0x487: 0x100,\n\t0x488: 0x100, 0x489: 0x100, 0x48a: 0x100, 0x48b: 0x100, 0x48c: 0x100, 0x48d: 0x100, 0x48e: 0x100, 0x48f: 0x100,\n\t0x490: 0xa6, 0x491: 0xa6, 0x492: 0xa6, 0x493: 0xa6, 0x494: 0xa6, 0x495: 0xa6, 0x496: 0xa6, 0x497: 0xa6,\n\t0x498: 0xa6, 0x499: 0x14a, 0x49a: 0x100, 0x49b: 0x100, 0x49c: 0x100, 0x49d: 0x100, 0x49e: 0x100, 0x49f: 0x100,\n\t0x4a0: 0x100, 0x4a1: 0x100, 0x4a2: 0x100, 0x4a3: 0x100, 0x4a4: 0x100, 0x4a5: 0x100, 0x4a6: 0x100, 0x4a7: 0x100,\n\t0x4a8: 0x100, 0x4a9: 0x100, 0x4aa: 0x100, 0x4ab: 0x100, 0x4ac: 0x100, 0x4ad: 0x100, 0x4ae: 0x100, 0x4af: 0x100,\n\t0x4b0: 0x100, 0x4b1: 0x100, 0x4b2: 0x100, 0x4b3: 0x100, 0x4b4: 0x100, 0x4b5: 0x100, 0x4b6: 0x100, 0x4b7: 0x100,\n\t0x4b8: 0x100, 0x4b9: 0x100, 0x4ba: 0x100, 0x4bb: 0x100, 0x4bc: 0x100, 0x4bd: 0x100, 0x4be: 0x100, 0x4bf: 0x100,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x100, 0x4c1: 0x100, 0x4c2: 0x100, 0x4c3: 0x100, 0x4c4: 0x100, 0x4c5: 0x100, 0x4c6: 0x100, 0x4c7: 0x100,\n\t0x4c8: 0x100, 0x4c9: 0x100, 0x4ca: 0x100, 0x4cb: 0x100, 0x4cc: 0x100, 0x4cd: 0x100, 0x4ce: 0x100, 0x4cf: 0x100,\n\t0x4d0: 0x100, 0x4d1: 0x100, 0x4d2: 0x100, 0x4d3: 0x100, 0x4d4: 0x100, 0x4d5: 0x100, 0x4d6: 0x100, 0x4d7: 0x100,\n\t0x4d8: 0x100, 0x4d9: 0x100, 0x4da: 0x100, 0x4db: 0x100, 0x4dc: 0x100, 0x4dd: 0x100, 0x4de: 0x100, 0x4df: 0x100,\n\t0x4e0: 0xa6, 0x4e1: 0xa6, 0x4e2: 0xa6, 0x4e3: 0xa6, 0x4e4: 0xa6, 0x4e5: 0xa6, 0x4e6: 0xa6, 0x4e7: 0xa6,\n\t0x4e8: 0x154, 0x4e9: 0x168, 0x4ea: 0x169, 0x4eb: 0x16a, 0x4ec: 0x16b, 0x4ed: 0x16c, 0x4ee: 0x16d, 0x4ef: 0x100,\n\t0x4f0: 0x100, 0x4f1: 0x100, 0x4f2: 0x100, 0x4f3: 0x100, 0x4f4: 0x100, 0x4f5: 0x100, 0x4f6: 0x100, 0x4f7: 0x100,\n\t0x4f8: 0x100, 0x4f9: 0x16e, 0x4fa: 0x16f, 0x4fb: 0x100, 0x4fc: 0xa6, 0x4fd: 0x170, 0x4fe: 0x171, 0x4ff: 0x172,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xa6, 0x501: 0xa6, 0x502: 0xa6, 0x503: 0xa6, 0x504: 0xa6, 0x505: 0xa6, 0x506: 0xa6, 0x507: 0xa6,\n\t0x508: 0xa6, 0x509: 0xa6, 0x50a: 0xa6, 0x50b: 0xa6, 0x50c: 0xa6, 0x50d: 0xa6, 0x50e: 0xa6, 0x50f: 0xa6,\n\t0x510: 0xa6, 0x511: 0xa6, 0x512: 0xa6, 0x513: 0xa6, 0x514: 0xa6, 0x515: 0xa6, 0x516: 0xa6, 0x517: 0xa6,\n\t0x518: 0xa6, 0x519: 0xa6, 0x51a: 0xa6, 0x51b: 0xa6, 0x51c: 0xa6, 0x51d: 0xa6, 0x51e: 0xa6, 0x51f: 0x173,\n\t0x520: 0xa6, 0x521: 0xa6, 0x522: 0xa6, 0x523: 0xa6, 0x524: 0xa6, 0x525: 0xa6, 0x526: 0xa6, 0x527: 0xa6,\n\t0x528: 0xa6, 0x529: 0xa6, 0x52a: 0xa6, 0x52b: 0xa6, 0x52c: 0xa6, 0x52d: 0xa6, 0x52e: 0xa6, 0x52f: 0xa6,\n\t0x530: 0xa6, 0x531: 0xa6, 0x532: 0xa6, 0x533: 0x174, 0x534: 0x175, 0x535: 0x100, 0x536: 0x100, 0x537: 0x100,\n\t0x538: 0x100, 0x539: 0x100, 0x53a: 0x100, 0x53b: 0x100, 0x53c: 0x100, 0x53d: 0x100, 0x53e: 0x100, 0x53f: 0x100,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x100, 0x541: 0x100, 0x542: 0x100, 0x543: 0x100, 0x544: 0x100, 0x545: 0x100, 0x546: 0x100, 0x547: 0x100,\n\t0x548: 0x100, 0x549: 0x100, 0x54a: 0x100, 0x54b: 0x100, 0x54c: 0x100, 0x54d: 0x100, 0x54e: 0x100, 0x54f: 0x100,\n\t0x550: 0x100, 0x551: 0x100, 0x552: 0x100, 0x553: 0x100, 0x554: 0x100, 0x555: 0x100, 0x556: 0x100, 0x557: 0x100,\n\t0x558: 0x100, 0x559: 0x100, 0x55a: 0x100, 0x55b: 0x100, 0x55c: 0x100, 0x55d: 0x100, 0x55e: 0x100, 0x55f: 0x100,\n\t0x560: 0x100, 0x561: 0x100, 0x562: 0x100, 0x563: 0x100, 0x564: 0x100, 0x565: 0x100, 0x566: 0x100, 0x567: 0x100,\n\t0x568: 0x100, 0x569: 0x100, 0x56a: 0x100, 0x56b: 0x100, 0x56c: 0x100, 0x56d: 0x100, 0x56e: 0x100, 0x56f: 0x100,\n\t0x570: 0x100, 0x571: 0x100, 0x572: 0x100, 0x573: 0x100, 0x574: 0x100, 0x575: 0x100, 0x576: 0x100, 0x577: 0x100,\n\t0x578: 0x100, 0x579: 0x100, 0x57a: 0x100, 0x57b: 0x100, 0x57c: 0x100, 0x57d: 0x100, 0x57e: 0x100, 0x57f: 0x176,\n\t// Block 0x16, offset 0x580\n\t0x580: 0xa6, 0x581: 0xa6, 0x582: 0xa6, 0x583: 0xa6, 0x584: 0x177, 0x585: 0x178, 0x586: 0xa6, 0x587: 0xa6,\n\t0x588: 0xa6, 0x589: 0xa6, 0x58a: 0xa6, 0x58b: 0x179, 0x58c: 0x100, 0x58d: 0x100, 0x58e: 0x100, 0x58f: 0x100,\n\t0x590: 0x100, 0x591: 0x100, 0x592: 0x100, 0x593: 0x100, 0x594: 0x100, 0x595: 0x100, 0x596: 0x100, 0x597: 0x100,\n\t0x598: 0x100, 0x599: 0x100, 0x59a: 0x100, 0x59b: 0x100, 0x59c: 0x100, 0x59d: 0x100, 0x59e: 0x100, 0x59f: 0x100,\n\t0x5a0: 0x100, 0x5a1: 0x100, 0x5a2: 0x100, 0x5a3: 0x100, 0x5a4: 0x100, 0x5a5: 0x100, 0x5a6: 0x100, 0x5a7: 0x100,\n\t0x5a8: 0x100, 0x5a9: 0x100, 0x5aa: 0x100, 0x5ab: 0x100, 0x5ac: 0x100, 0x5ad: 0x100, 0x5ae: 0x100, 0x5af: 0x100,\n\t0x5b0: 0xa6, 0x5b1: 0x17a, 0x5b2: 0x17b, 0x5b3: 0x100, 0x5b4: 0x100, 0x5b5: 0x100, 0x5b6: 0x100, 0x5b7: 0x100,\n\t0x5b8: 0x100, 0x5b9: 0x100, 0x5ba: 0x100, 0x5bb: 0x100, 0x5bc: 0x100, 0x5bd: 0x100, 0x5be: 0x100, 0x5bf: 0x100,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x100, 0x5c1: 0x100, 0x5c2: 0x100, 0x5c3: 0x100, 0x5c4: 0x100, 0x5c5: 0x100, 0x5c6: 0x100, 0x5c7: 0x100,\n\t0x5c8: 0x100, 0x5c9: 0x100, 0x5ca: 0x100, 0x5cb: 0x100, 0x5cc: 0x100, 0x5cd: 0x100, 0x5ce: 0x100, 0x5cf: 0x100,\n\t0x5d0: 0x100, 0x5d1: 0x100, 0x5d2: 0x100, 0x5d3: 0x100, 0x5d4: 0x100, 0x5d5: 0x100, 0x5d6: 0x100, 0x5d7: 0x100,\n\t0x5d8: 0x100, 0x5d9: 0x100, 0x5da: 0x100, 0x5db: 0x100, 0x5dc: 0x100, 0x5dd: 0x100, 0x5de: 0x100, 0x5df: 0x100,\n\t0x5e0: 0x100, 0x5e1: 0x100, 0x5e2: 0x100, 0x5e3: 0x100, 0x5e4: 0x100, 0x5e5: 0x100, 0x5e6: 0x100, 0x5e7: 0x100,\n\t0x5e8: 0x100, 0x5e9: 0x100, 0x5ea: 0x100, 0x5eb: 0x100, 0x5ec: 0x100, 0x5ed: 0x100, 0x5ee: 0x100, 0x5ef: 0x100,\n\t0x5f0: 0x100, 0x5f1: 0x100, 0x5f2: 0x100, 0x5f3: 0x100, 0x5f4: 0x100, 0x5f5: 0x100, 0x5f6: 0x100, 0x5f7: 0x100,\n\t0x5f8: 0x100, 0x5f9: 0x100, 0x5fa: 0x100, 0x5fb: 0x100, 0x5fc: 0x17c, 0x5fd: 0x17d, 0x5fe: 0xa2, 0x5ff: 0x17e,\n\t// Block 0x18, offset 0x600\n\t0x600: 0xa2, 0x601: 0xa2, 0x602: 0xa2, 0x603: 0x17f, 0x604: 0x180, 0x605: 0x181, 0x606: 0x182, 0x607: 0x183,\n\t0x608: 0xa2, 0x609: 0x184, 0x60a: 0x100, 0x60b: 0x185, 0x60c: 0xa2, 0x60d: 0x186, 0x60e: 0x100, 0x60f: 0x100,\n\t0x610: 0x63, 0x611: 0x64, 0x612: 0x65, 0x613: 0x66, 0x614: 0x67, 0x615: 0x68, 0x616: 0x69, 0x617: 0x6a,\n\t0x618: 0x6b, 0x619: 0x6c, 0x61a: 0x6d, 0x61b: 0x6e, 0x61c: 0x6f, 0x61d: 0x70, 0x61e: 0x71, 0x61f: 0x72,\n\t0x620: 0xa2, 0x621: 0xa2, 0x622: 0xa2, 0x623: 0xa2, 0x624: 0xa2, 0x625: 0xa2, 0x626: 0xa2, 0x627: 0xa2,\n\t0x628: 0x187, 0x629: 0x188, 0x62a: 0x189, 0x62b: 0x100, 0x62c: 0x100, 0x62d: 0x100, 0x62e: 0x100, 0x62f: 0x100,\n\t0x630: 0x100, 0x631: 0x100, 0x632: 0x100, 0x633: 0x100, 0x634: 0x100, 0x635: 0x100, 0x636: 0x100, 0x637: 0x100,\n\t0x638: 0x100, 0x639: 0x100, 0x63a: 0x100, 0x63b: 0x100, 0x63c: 0x18a, 0x63d: 0x100, 0x63e: 0x100, 0x63f: 0x100,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x73, 0x641: 0x74, 0x642: 0x18b, 0x643: 0x100, 0x644: 0x18c, 0x645: 0x18d, 0x646: 0x100, 0x647: 0x100,\n\t0x648: 0x100, 0x649: 0x100, 0x64a: 0x18e, 0x64b: 0x18f, 0x64c: 0x100, 0x64d: 0x100, 0x64e: 0x100, 0x64f: 0x100,\n\t0x650: 0x100, 0x651: 0x100, 0x652: 0x100, 0x653: 0x190, 0x654: 0x100, 0x655: 0x100, 0x656: 0x100, 0x657: 0x100,\n\t0x658: 0x100, 0x659: 0x100, 0x65a: 0x100, 0x65b: 0x100, 0x65c: 0x100, 0x65d: 0x100, 0x65e: 0x100, 0x65f: 0x191,\n\t0x660: 0x127, 0x661: 0x127, 0x662: 0x127, 0x663: 0x192, 0x664: 0x75, 0x665: 0x193, 0x666: 0x100, 0x667: 0x100,\n\t0x668: 0x100, 0x669: 0x100, 0x66a: 0x100, 0x66b: 0x100, 0x66c: 0x100, 0x66d: 0x100, 0x66e: 0x100, 0x66f: 0x100,\n\t0x670: 0x100, 0x671: 0x194, 0x672: 0x195, 0x673: 0x100, 0x674: 0x196, 0x675: 0x100, 0x676: 0x100, 0x677: 0x100,\n\t0x678: 0x76, 0x679: 0x77, 0x67a: 0x78, 0x67b: 0x197, 0x67c: 0x100, 0x67d: 0x100, 0x67e: 0x100, 0x67f: 0x100,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x198, 0x681: 0xa2, 0x682: 0x199, 0x683: 0x19a, 0x684: 0x79, 0x685: 0x7a, 0x686: 0x19b, 0x687: 0x19c,\n\t0x688: 0x7b, 0x689: 0x19d, 0x68a: 0x100, 0x68b: 0x100, 0x68c: 0xa2, 0x68d: 0xa2, 0x68e: 0xa2, 0x68f: 0xa2,\n\t0x690: 0xa2, 0x691: 0xa2, 0x692: 0xa2, 0x693: 0xa2, 0x694: 0xa2, 0x695: 0xa2, 0x696: 0xa2, 0x697: 0xa2,\n\t0x698: 0xa2, 0x699: 0xa2, 0x69a: 0xa2, 0x69b: 0x19e, 0x69c: 0xa2, 0x69d: 0x19f, 0x69e: 0xa2, 0x69f: 0x1a0,\n\t0x6a0: 0x1a1, 0x6a1: 0x1a2, 0x6a2: 0x1a3, 0x6a3: 0x100, 0x6a4: 0xa2, 0x6a5: 0xa2, 0x6a6: 0xa2, 0x6a7: 0xa2,\n\t0x6a8: 0xa2, 0x6a9: 0x1a4, 0x6aa: 0x1a5, 0x6ab: 0x1a6, 0x6ac: 0xa2, 0x6ad: 0xa2, 0x6ae: 0x1a7, 0x6af: 0x1a8,\n\t0x6b0: 0x100, 0x6b1: 0x100, 0x6b2: 0x100, 0x6b3: 0x100, 0x6b4: 0x100, 0x6b5: 0x100, 0x6b6: 0x100, 0x6b7: 0x100,\n\t0x6b8: 0x100, 0x6b9: 0x100, 0x6ba: 0x100, 0x6bb: 0x100, 0x6bc: 0x100, 0x6bd: 0x100, 0x6be: 0x100, 0x6bf: 0x100,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0xa6, 0x6c1: 0xa6, 0x6c2: 0xa6, 0x6c3: 0xa6, 0x6c4: 0xa6, 0x6c5: 0xa6, 0x6c6: 0xa6, 0x6c7: 0xa6,\n\t0x6c8: 0xa6, 0x6c9: 0xa6, 0x6ca: 0xa6, 0x6cb: 0xa6, 0x6cc: 0xa6, 0x6cd: 0xa6, 0x6ce: 0xa6, 0x6cf: 0xa6,\n\t0x6d0: 0xa6, 0x6d1: 0xa6, 0x6d2: 0xa6, 0x6d3: 0xa6, 0x6d4: 0xa6, 0x6d5: 0xa6, 0x6d6: 0xa6, 0x6d7: 0xa6,\n\t0x6d8: 0xa6, 0x6d9: 0xa6, 0x6da: 0xa6, 0x6db: 0x1a9, 0x6dc: 0xa6, 0x6dd: 0xa6, 0x6de: 0xa6, 0x6df: 0xa6,\n\t0x6e0: 0xa6, 0x6e1: 0xa6, 0x6e2: 0xa6, 0x6e3: 0xa6, 0x6e4: 0xa6, 0x6e5: 0xa6, 0x6e6: 0xa6, 0x6e7: 0xa6,\n\t0x6e8: 0xa6, 0x6e9: 0xa6, 0x6ea: 0xa6, 0x6eb: 0xa6, 0x6ec: 0xa6, 0x6ed: 0xa6, 0x6ee: 0xa6, 0x6ef: 0xa6,\n\t0x6f0: 0xa6, 0x6f1: 0xa6, 0x6f2: 0xa6, 0x6f3: 0xa6, 0x6f4: 0xa6, 0x6f5: 0xa6, 0x6f6: 0xa6, 0x6f7: 0xa6,\n\t0x6f8: 0xa6, 0x6f9: 0xa6, 0x6fa: 0xa6, 0x6fb: 0xa6, 0x6fc: 0xa6, 0x6fd: 0xa6, 0x6fe: 0xa6, 0x6ff: 0xa6,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0xa6, 0x701: 0xa6, 0x702: 0xa6, 0x703: 0xa6, 0x704: 0xa6, 0x705: 0xa6, 0x706: 0xa6, 0x707: 0xa6,\n\t0x708: 0xa6, 0x709: 0xa6, 0x70a: 0xa6, 0x70b: 0xa6, 0x70c: 0xa6, 0x70d: 0xa6, 0x70e: 0xa6, 0x70f: 0xa6,\n\t0x710: 0xa6, 0x711: 0xa6, 0x712: 0xa6, 0x713: 0xa6, 0x714: 0xa6, 0x715: 0xa6, 0x716: 0xa6, 0x717: 0xa6,\n\t0x718: 0xa6, 0x719: 0xa6, 0x71a: 0xa6, 0x71b: 0xa6, 0x71c: 0x1aa, 0x71d: 0xa6, 0x71e: 0xa6, 0x71f: 0xa6,\n\t0x720: 0x1ab, 0x721: 0xa6, 0x722: 0xa6, 0x723: 0xa6, 0x724: 0xa6, 0x725: 0xa6, 0x726: 0xa6, 0x727: 0xa6,\n\t0x728: 0xa6, 0x729: 0xa6, 0x72a: 0xa6, 0x72b: 0xa6, 0x72c: 0xa6, 0x72d: 0xa6, 0x72e: 0xa6, 0x72f: 0xa6,\n\t0x730: 0xa6, 0x731: 0xa6, 0x732: 0xa6, 0x733: 0xa6, 0x734: 0xa6, 0x735: 0xa6, 0x736: 0xa6, 0x737: 0xa6,\n\t0x738: 0xa6, 0x739: 0xa6, 0x73a: 0xa6, 0x73b: 0xa6, 0x73c: 0xa6, 0x73d: 0xa6, 0x73e: 0xa6, 0x73f: 0xa6,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0xa6, 0x741: 0xa6, 0x742: 0xa6, 0x743: 0xa6, 0x744: 0xa6, 0x745: 0xa6, 0x746: 0xa6, 0x747: 0xa6,\n\t0x748: 0xa6, 0x749: 0xa6, 0x74a: 0xa6, 0x74b: 0xa6, 0x74c: 0xa6, 0x74d: 0xa6, 0x74e: 0xa6, 0x74f: 0xa6,\n\t0x750: 0xa6, 0x751: 0xa6, 0x752: 0xa6, 0x753: 0xa6, 0x754: 0xa6, 0x755: 0xa6, 0x756: 0xa6, 0x757: 0xa6,\n\t0x758: 0xa6, 0x759: 0xa6, 0x75a: 0xa6, 0x75b: 0xa6, 0x75c: 0xa6, 0x75d: 0xa6, 0x75e: 0xa6, 0x75f: 0xa6,\n\t0x760: 0xa6, 0x761: 0xa6, 0x762: 0xa6, 0x763: 0xa6, 0x764: 0xa6, 0x765: 0xa6, 0x766: 0xa6, 0x767: 0xa6,\n\t0x768: 0xa6, 0x769: 0xa6, 0x76a: 0xa6, 0x76b: 0xa6, 0x76c: 0xa6, 0x76d: 0xa6, 0x76e: 0xa6, 0x76f: 0xa6,\n\t0x770: 0xa6, 0x771: 0xa6, 0x772: 0xa6, 0x773: 0xa6, 0x774: 0xa6, 0x775: 0xa6, 0x776: 0xa6, 0x777: 0xa6,\n\t0x778: 0xa6, 0x779: 0xa6, 0x77a: 0x1ac, 0x77b: 0xa6, 0x77c: 0xa6, 0x77d: 0xa6, 0x77e: 0xa6, 0x77f: 0xa6,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0xa6, 0x781: 0xa6, 0x782: 0xa6, 0x783: 0xa6, 0x784: 0xa6, 0x785: 0xa6, 0x786: 0xa6, 0x787: 0xa6,\n\t0x788: 0xa6, 0x789: 0xa6, 0x78a: 0xa6, 0x78b: 0xa6, 0x78c: 0xa6, 0x78d: 0xa6, 0x78e: 0xa6, 0x78f: 0xa6,\n\t0x790: 0xa6, 0x791: 0xa6, 0x792: 0xa6, 0x793: 0xa6, 0x794: 0xa6, 0x795: 0xa6, 0x796: 0xa6, 0x797: 0xa6,\n\t0x798: 0xa6, 0x799: 0xa6, 0x79a: 0xa6, 0x79b: 0xa6, 0x79c: 0xa6, 0x79d: 0xa6, 0x79e: 0xa6, 0x79f: 0xa6,\n\t0x7a0: 0xa6, 0x7a1: 0xa6, 0x7a2: 0xa6, 0x7a3: 0xa6, 0x7a4: 0xa6, 0x7a5: 0xa6, 0x7a6: 0xa6, 0x7a7: 0xa6,\n\t0x7a8: 0xa6, 0x7a9: 0xa6, 0x7aa: 0xa6, 0x7ab: 0xa6, 0x7ac: 0xa6, 0x7ad: 0xa6, 0x7ae: 0xa6, 0x7af: 0x1ad,\n\t0x7b0: 0x100, 0x7b1: 0x100, 0x7b2: 0x100, 0x7b3: 0x100, 0x7b4: 0x100, 0x7b5: 0x100, 0x7b6: 0x100, 0x7b7: 0x100,\n\t0x7b8: 0x100, 0x7b9: 0x100, 0x7ba: 0x100, 0x7bb: 0x100, 0x7bc: 0x100, 0x7bd: 0x100, 0x7be: 0x100, 0x7bf: 0x100,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x100, 0x7c1: 0x100, 0x7c2: 0x100, 0x7c3: 0x100, 0x7c4: 0x100, 0x7c5: 0x100, 0x7c6: 0x100, 0x7c7: 0x100,\n\t0x7c8: 0x100, 0x7c9: 0x100, 0x7ca: 0x100, 0x7cb: 0x100, 0x7cc: 0x100, 0x7cd: 0x100, 0x7ce: 0x100, 0x7cf: 0x100,\n\t0x7d0: 0x100, 0x7d1: 0x100, 0x7d2: 0x100, 0x7d3: 0x100, 0x7d4: 0x100, 0x7d5: 0x100, 0x7d6: 0x100, 0x7d7: 0x100,\n\t0x7d8: 0x100, 0x7d9: 0x100, 0x7da: 0x100, 0x7db: 0x100, 0x7dc: 0x100, 0x7dd: 0x100, 0x7de: 0x100, 0x7df: 0x100,\n\t0x7e0: 0x7c, 0x7e1: 0x7d, 0x7e2: 0x7e, 0x7e3: 0x7f, 0x7e4: 0x80, 0x7e5: 0x81, 0x7e6: 0x82, 0x7e7: 0x83,\n\t0x7e8: 0x84, 0x7e9: 0x100, 0x7ea: 0x100, 0x7eb: 0x100, 0x7ec: 0x100, 0x7ed: 0x100, 0x7ee: 0x100, 0x7ef: 0x100,\n\t0x7f0: 0x100, 0x7f1: 0x100, 0x7f2: 0x100, 0x7f3: 0x100, 0x7f4: 0x100, 0x7f5: 0x100, 0x7f6: 0x100, 0x7f7: 0x100,\n\t0x7f8: 0x100, 0x7f9: 0x100, 0x7fa: 0x100, 0x7fb: 0x100, 0x7fc: 0x100, 0x7fd: 0x100, 0x7fe: 0x100, 0x7ff: 0x100,\n\t// Block 0x20, offset 0x800\n\t0x800: 0xa6, 0x801: 0xa6, 0x802: 0xa6, 0x803: 0xa6, 0x804: 0xa6, 0x805: 0xa6, 0x806: 0xa6, 0x807: 0xa6,\n\t0x808: 0xa6, 0x809: 0xa6, 0x80a: 0xa6, 0x80b: 0xa6, 0x80c: 0xa6, 0x80d: 0x1ae, 0x80e: 0xa6, 0x80f: 0xa6,\n\t0x810: 0xa6, 0x811: 0xa6, 0x812: 0xa6, 0x813: 0xa6, 0x814: 0xa6, 0x815: 0xa6, 0x816: 0xa6, 0x817: 0xa6,\n\t0x818: 0xa6, 0x819: 0xa6, 0x81a: 0xa6, 0x81b: 0xa6, 0x81c: 0xa6, 0x81d: 0xa6, 0x81e: 0xa6, 0x81f: 0xa6,\n\t0x820: 0xa6, 0x821: 0xa6, 0x822: 0xa6, 0x823: 0xa6, 0x824: 0xa6, 0x825: 0xa6, 0x826: 0xa6, 0x827: 0xa6,\n\t0x828: 0xa6, 0x829: 0xa6, 0x82a: 0xa6, 0x82b: 0xa6, 0x82c: 0xa6, 0x82d: 0xa6, 0x82e: 0xa6, 0x82f: 0xa6,\n\t0x830: 0xa6, 0x831: 0xa6, 0x832: 0xa6, 0x833: 0xa6, 0x834: 0xa6, 0x835: 0xa6, 0x836: 0xa6, 0x837: 0xa6,\n\t0x838: 0xa6, 0x839: 0xa6, 0x83a: 0xa6, 0x83b: 0xa6, 0x83c: 0xa6, 0x83d: 0xa6, 0x83e: 0xa6, 0x83f: 0xa6,\n\t// Block 0x21, offset 0x840\n\t0x840: 0xa6, 0x841: 0xa6, 0x842: 0xa6, 0x843: 0xa6, 0x844: 0xa6, 0x845: 0xa6, 0x846: 0xa6, 0x847: 0xa6,\n\t0x848: 0xa6, 0x849: 0xa6, 0x84a: 0xa6, 0x84b: 0xa6, 0x84c: 0xa6, 0x84d: 0xa6, 0x84e: 0x1af, 0x84f: 0x100,\n\t0x850: 0x100, 0x851: 0x100, 0x852: 0x100, 0x853: 0x100, 0x854: 0x100, 0x855: 0x100, 0x856: 0x100, 0x857: 0x100,\n\t0x858: 0x100, 0x859: 0x100, 0x85a: 0x100, 0x85b: 0x100, 0x85c: 0x100, 0x85d: 0x100, 0x85e: 0x100, 0x85f: 0x100,\n\t0x860: 0x100, 0x861: 0x100, 0x862: 0x100, 0x863: 0x100, 0x864: 0x100, 0x865: 0x100, 0x866: 0x100, 0x867: 0x100,\n\t0x868: 0x100, 0x869: 0x100, 0x86a: 0x100, 0x86b: 0x100, 0x86c: 0x100, 0x86d: 0x100, 0x86e: 0x100, 0x86f: 0x100,\n\t0x870: 0x100, 0x871: 0x100, 0x872: 0x100, 0x873: 0x100, 0x874: 0x100, 0x875: 0x100, 0x876: 0x100, 0x877: 0x100,\n\t0x878: 0x100, 0x879: 0x100, 0x87a: 0x100, 0x87b: 0x100, 0x87c: 0x100, 0x87d: 0x100, 0x87e: 0x100, 0x87f: 0x100,\n\t// Block 0x22, offset 0x880\n\t0x890: 0x0c, 0x891: 0x0d, 0x892: 0x0e, 0x893: 0x0f, 0x894: 0x10, 0x895: 0x0a, 0x896: 0x11, 0x897: 0x07,\n\t0x898: 0x12, 0x899: 0x0a, 0x89a: 0x13, 0x89b: 0x14, 0x89c: 0x15, 0x89d: 0x16, 0x89e: 0x17, 0x89f: 0x18,\n\t0x8a0: 0x07, 0x8a1: 0x07, 0x8a2: 0x07, 0x8a3: 0x07, 0x8a4: 0x07, 0x8a5: 0x07, 0x8a6: 0x07, 0x8a7: 0x07,\n\t0x8a8: 0x07, 0x8a9: 0x07, 0x8aa: 0x19, 0x8ab: 0x1a, 0x8ac: 0x1b, 0x8ad: 0x07, 0x8ae: 0x1c, 0x8af: 0x1d,\n\t0x8b0: 0x07, 0x8b1: 0x1e, 0x8b2: 0x1f, 0x8b3: 0x0a, 0x8b4: 0x0a, 0x8b5: 0x0a, 0x8b6: 0x0a, 0x8b7: 0x0a,\n\t0x8b8: 0x0a, 0x8b9: 0x0a, 0x8ba: 0x0a, 0x8bb: 0x0a, 0x8bc: 0x0a, 0x8bd: 0x0a, 0x8be: 0x0a, 0x8bf: 0x0a,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0a, 0x8c1: 0x0a, 0x8c2: 0x0a, 0x8c3: 0x0a, 0x8c4: 0x0a, 0x8c5: 0x0a, 0x8c6: 0x0a, 0x8c7: 0x0a,\n\t0x8c8: 0x0a, 0x8c9: 0x0a, 0x8ca: 0x0a, 0x8cb: 0x0a, 0x8cc: 0x0a, 0x8cd: 0x0a, 0x8ce: 0x0a, 0x8cf: 0x0a,\n\t0x8d0: 0x0a, 0x8d1: 0x0a, 0x8d2: 0x0a, 0x8d3: 0x0a, 0x8d4: 0x0a, 0x8d5: 0x0a, 0x8d6: 0x0a, 0x8d7: 0x0a,\n\t0x8d8: 0x0a, 0x8d9: 0x0a, 0x8da: 0x0a, 0x8db: 0x0a, 0x8dc: 0x0a, 0x8dd: 0x0a, 0x8de: 0x0a, 0x8df: 0x0a,\n\t0x8e0: 0x0a, 0x8e1: 0x0a, 0x8e2: 0x0a, 0x8e3: 0x0a, 0x8e4: 0x0a, 0x8e5: 0x0a, 0x8e6: 0x0a, 0x8e7: 0x0a,\n\t0x8e8: 0x0a, 0x8e9: 0x0a, 0x8ea: 0x0a, 0x8eb: 0x0a, 0x8ec: 0x0a, 0x8ed: 0x0a, 0x8ee: 0x0a, 0x8ef: 0x0a,\n\t0x8f0: 0x0a, 0x8f1: 0x0a, 0x8f2: 0x0a, 0x8f3: 0x0a, 0x8f4: 0x0a, 0x8f5: 0x0a, 0x8f6: 0x0a, 0x8f7: 0x0a,\n\t0x8f8: 0x0a, 0x8f9: 0x0a, 0x8fa: 0x0a, 0x8fb: 0x0a, 0x8fc: 0x0a, 0x8fd: 0x0a, 0x8fe: 0x0a, 0x8ff: 0x0a,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x1b0, 0x901: 0x1b1, 0x902: 0x100, 0x903: 0x100, 0x904: 0x1b2, 0x905: 0x1b2, 0x906: 0x1b2, 0x907: 0x1b3,\n\t0x908: 0x100, 0x909: 0x100, 0x90a: 0x100, 0x90b: 0x100, 0x90c: 0x100, 0x90d: 0x100, 0x90e: 0x100, 0x90f: 0x100,\n\t0x910: 0x100, 0x911: 0x100, 0x912: 0x100, 0x913: 0x100, 0x914: 0x100, 0x915: 0x100, 0x916: 0x100, 0x917: 0x100,\n\t0x918: 0x100, 0x919: 0x100, 0x91a: 0x100, 0x91b: 0x100, 0x91c: 0x100, 0x91d: 0x100, 0x91e: 0x100, 0x91f: 0x100,\n\t0x920: 0x100, 0x921: 0x100, 0x922: 0x100, 0x923: 0x100, 0x924: 0x100, 0x925: 0x100, 0x926: 0x100, 0x927: 0x100,\n\t0x928: 0x100, 0x929: 0x100, 0x92a: 0x100, 0x92b: 0x100, 0x92c: 0x100, 0x92d: 0x100, 0x92e: 0x100, 0x92f: 0x100,\n\t0x930: 0x100, 0x931: 0x100, 0x932: 0x100, 0x933: 0x100, 0x934: 0x100, 0x935: 0x100, 0x936: 0x100, 0x937: 0x100,\n\t0x938: 0x100, 0x939: 0x100, 0x93a: 0x100, 0x93b: 0x100, 0x93c: 0x100, 0x93d: 0x100, 0x93e: 0x100, 0x93f: 0x100,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0a, 0x941: 0x0a, 0x942: 0x0a, 0x943: 0x0a, 0x944: 0x0a, 0x945: 0x0a, 0x946: 0x0a, 0x947: 0x0a,\n\t0x948: 0x0a, 0x949: 0x0a, 0x94a: 0x0a, 0x94b: 0x0a, 0x94c: 0x0a, 0x94d: 0x0a, 0x94e: 0x0a, 0x94f: 0x0a,\n\t0x950: 0x0a, 0x951: 0x0a, 0x952: 0x0a, 0x953: 0x0a, 0x954: 0x0a, 0x955: 0x0a, 0x956: 0x0a, 0x957: 0x0a,\n\t0x958: 0x0a, 0x959: 0x0a, 0x95a: 0x0a, 0x95b: 0x0a, 0x95c: 0x0a, 0x95d: 0x0a, 0x95e: 0x0a, 0x95f: 0x0a,\n\t0x960: 0x22, 0x961: 0x0a, 0x962: 0x0a, 0x963: 0x0a, 0x964: 0x0a, 0x965: 0x0a, 0x966: 0x0a, 0x967: 0x0a,\n\t0x968: 0x0a, 0x969: 0x0a, 0x96a: 0x0a, 0x96b: 0x0a, 0x96c: 0x0a, 0x96d: 0x0a, 0x96e: 0x0a, 0x96f: 0x0a,\n\t0x970: 0x0a, 0x971: 0x0a, 0x972: 0x0a, 0x973: 0x0a, 0x974: 0x0a, 0x975: 0x0a, 0x976: 0x0a, 0x977: 0x0a,\n\t0x978: 0x0a, 0x979: 0x0a, 0x97a: 0x0a, 0x97b: 0x0a, 0x97c: 0x0a, 0x97d: 0x0a, 0x97e: 0x0a, 0x97f: 0x0a,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x0a, 0x981: 0x0a, 0x982: 0x0a, 0x983: 0x0a, 0x984: 0x0a, 0x985: 0x0a, 0x986: 0x0a, 0x987: 0x0a,\n\t0x988: 0x0a, 0x989: 0x0a, 0x98a: 0x0a, 0x98b: 0x0a, 0x98c: 0x0a, 0x98d: 0x0a, 0x98e: 0x0a, 0x98f: 0x0a,\n}\n\n// idnaSparseOffset: 303 entries, 606 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x33, 0x3e, 0x4a, 0x4e, 0x5d, 0x62, 0x6c, 0x78, 0x7e, 0x87, 0x97, 0xa6, 0xb1, 0xbe, 0xcf, 0xd9, 0xe0, 0xed, 0xfe, 0x105, 0x110, 0x11f, 0x12d, 0x137, 0x139, 0x13e, 0x141, 0x144, 0x146, 0x152, 0x15d, 0x165, 0x16b, 0x171, 0x176, 0x17b, 0x17e, 0x182, 0x188, 0x18d, 0x198, 0x1a2, 0x1a8, 0x1b9, 0x1c4, 0x1c7, 0x1cf, 0x1d2, 0x1df, 0x1e7, 0x1eb, 0x1f2, 0x1fa, 0x20a, 0x216, 0x219, 0x223, 0x22f, 0x23b, 0x247, 0x24f, 0x254, 0x261, 0x272, 0x27d, 0x282, 0x28b, 0x293, 0x299, 0x29e, 0x2a1, 0x2a5, 0x2ab, 0x2af, 0x2b3, 0x2b7, 0x2bc, 0x2c4, 0x2cb, 0x2d6, 0x2e0, 0x2e4, 0x2e7, 0x2ed, 0x2f1, 0x2f3, 0x2f6, 0x2f8, 0x2fb, 0x305, 0x308, 0x317, 0x31b, 0x31f, 0x321, 0x32a, 0x32e, 0x333, 0x338, 0x33e, 0x34e, 0x354, 0x358, 0x367, 0x36c, 0x374, 0x37e, 0x389, 0x391, 0x3a2, 0x3ab, 0x3bb, 0x3c8, 0x3d4, 0x3d9, 0x3e6, 0x3ea, 0x3ef, 0x3f1, 0x3f3, 0x3f7, 0x3f9, 0x3fd, 0x406, 0x40c, 0x410, 0x420, 0x42a, 0x42f, 0x432, 0x438, 0x43f, 0x444, 0x448, 0x44e, 0x453, 0x45c, 0x461, 0x467, 0x46e, 0x475, 0x47c, 0x480, 0x483, 0x488, 0x494, 0x49a, 0x49f, 0x4a6, 0x4ae, 0x4b3, 0x4b7, 0x4c7, 0x4ce, 0x4d2, 0x4d6, 0x4dd, 0x4df, 0x4e2, 0x4e5, 0x4e9, 0x4f2, 0x4f6, 0x4fe, 0x501, 0x509, 0x514, 0x523, 0x52f, 0x535, 0x542, 0x54e, 0x556, 0x55f, 0x56a, 0x571, 0x580, 0x58d, 0x591, 0x59e, 0x5a7, 0x5ab, 0x5ba, 0x5c2, 0x5cd, 0x5d6, 0x5dc, 0x5e4, 0x5ed, 0x5f9, 0x5fc, 0x608, 0x60b, 0x614, 0x617, 0x61c, 0x625, 0x62a, 0x637, 0x642, 0x64b, 0x656, 0x659, 0x65c, 0x666, 0x66f, 0x67b, 0x688, 0x695, 0x6a3, 0x6aa, 0x6b5, 0x6bc, 0x6c0, 0x6c4, 0x6c7, 0x6cc, 0x6cf, 0x6d2, 0x6d6, 0x6d9, 0x6de, 0x6e5, 0x6e8, 0x6f0, 0x6f4, 0x6ff, 0x702, 0x705, 0x708, 0x70e, 0x714, 0x71d, 0x720, 0x723, 0x726, 0x72e, 0x733, 0x73c, 0x73f, 0x744, 0x74e, 0x752, 0x756, 0x759, 0x75c, 0x760, 0x76f, 0x77b, 0x77f, 0x784, 0x789, 0x78e, 0x792, 0x797, 0x7a0, 0x7a5, 0x7a9, 0x7af, 0x7b5, 0x7ba, 0x7c0, 0x7c6, 0x7d0, 0x7d6, 0x7df, 0x7e2, 0x7e5, 0x7e9, 0x7ed, 0x7f1, 0x7f7, 0x7fd, 0x802, 0x805, 0x815, 0x81c, 0x820, 0x827, 0x82b, 0x831, 0x838, 0x83f, 0x845, 0x84e, 0x852, 0x860, 0x863, 0x866, 0x86a, 0x86e, 0x871, 0x875, 0x878, 0x87d, 0x87f, 0x881}\n\n// idnaSparseValues: 2180 entries, 8720 bytes\nvar idnaSparseValues = [2180]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x00a9, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x00b1, lo: 0xb2, hi: 0xb2},\n\t{value: 0x00b9, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x00c1, lo: 0xb7, hi: 0xb7},\n\t{value: 0x00c9, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x6, offset 0x33\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0131, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3e\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xae},\n\t{value: 0x0808, lo: 0xaf, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x62\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbf},\n\t// Block 0xc, offset 0x6c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x78\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0a08, lo: 0x80, hi: 0x88},\n\t{value: 0x0808, lo: 0x89, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0xe, offset 0x7e\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0xf, offset 0x87\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x10, offset 0x97\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x11, offset 0xa6\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x3b08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x12, offset 0xb1\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbe\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x14, offset 0xcf\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x01f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x15, offset 0xd9\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x16, offset 0xe0\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0201, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0209, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x17, offset 0xed\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x18, offset 0xfe\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x19, offset 0x105\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1a, offset 0x110\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1b, offset 0x11f\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1c, offset 0x12d\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1d, offset 0x137\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x1e, offset 0x139\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x1f, offset 0x13e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x20, offset 0x141\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x21, offset 0x144\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x22, offset 0x146\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x23, offset 0x152\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x24, offset 0x15d\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x25, offset 0x165\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x26, offset 0x16b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x27, offset 0x171\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x28, offset 0x176\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x29, offset 0x17b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2a, offset 0x17e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2b, offset 0x182\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2c, offset 0x188\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2d, offset 0x18d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x3808, lo: 0x95, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3808, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x2e, offset 0x198\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a2\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x30, offset 0x1a8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x31, offset 0x1b9\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x33c0, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x32, offset 0x1c4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x33, offset 0x1c7\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x34, offset 0x1cf\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x35, offset 0x1d2\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x36, offset 0x1df\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x37, offset 0x1e7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x38, offset 0x1eb\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x39, offset 0x1f2\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3a, offset 0x1fa\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3b, offset 0x20a\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3c, offset 0x216\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x3308, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0xbf},\n\t// Block 0x3d, offset 0x219\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x3e, offset 0x223\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3f, offset 0x22f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x40, offset 0x23b\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x41, offset 0x247\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x42, offset 0x24f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x43, offset 0x254\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x02a9, lo: 0x80, hi: 0x80},\n\t{value: 0x02b1, lo: 0x81, hi: 0x81},\n\t{value: 0x02b9, lo: 0x82, hi: 0x82},\n\t{value: 0x02c1, lo: 0x83, hi: 0x83},\n\t{value: 0x02c9, lo: 0x84, hi: 0x85},\n\t{value: 0x02d1, lo: 0x86, hi: 0x86},\n\t{value: 0x02d9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x059d, lo: 0x90, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x059d, lo: 0xbd, hi: 0xbf},\n\t// Block 0x44, offset 0x261\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x45, offset 0x272\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x46, offset 0x27d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x47, offset 0x282\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x0851, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x48, offset 0x28b\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0859, lo: 0xac, hi: 0xac},\n\t{value: 0x0861, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x0869, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0871, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x49, offset 0x293\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4a, offset 0x299\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09dd, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09fd, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4b, offset 0x29e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x4c, offset 0x2a1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0929, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x4d, offset 0x2a5\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e7e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0932, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e9e, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x4e, offset 0x2ab\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x0939, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x4f, offset 0x2af\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x50, offset 0x2b3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0xbf},\n\t// Block 0x51, offset 0x2b7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ebd, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x52, offset 0x2bc\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x53, offset 0x2c4\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x54, offset 0x2cb\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x55, offset 0x2d6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x56, offset 0x2e0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x57, offset 0x2e4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x58, offset 0x2e7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0ef5, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x59, offset 0x2ed\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0f15, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5a, offset 0x2f1\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f35, lo: 0x80, hi: 0xbf},\n\t// Block 0x5b, offset 0x2f3\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x1735, lo: 0x80, hi: 0x8f},\n\t{value: 0x1915, lo: 0x90, hi: 0xbf},\n\t// Block 0x5c, offset 0x2f6\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1f15, lo: 0x80, hi: 0xbf},\n\t// Block 0x5d, offset 0x2f8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x5e, offset 0x2fb\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x096a, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0972, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0979, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x5f, offset 0x305\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x0981, lo: 0xbf, hi: 0xbf},\n\t// Block 0x60, offset 0x308\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb0},\n\t{value: 0x2a35, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a55, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a75, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a95, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a75, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2ab5, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2ad5, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2af5, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2b15, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b35, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2b15, lo: 0xbe, hi: 0xbf},\n\t// Block 0x61, offset 0x317\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x62, offset 0x31b\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x098a, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0a82, lo: 0xa0, hi: 0xbf},\n\t// Block 0x63, offset 0x31f\n\t{value: 0x0008, lo: 0x01},\n\t{value: 0x0d19, lo: 0x80, hi: 0xbf},\n\t// Block 0x64, offset 0x321\n\t{value: 0x0008, lo: 0x08},\n\t{value: 0x0f19, lo: 0x80, hi: 0xb0},\n\t{value: 0x4045, lo: 0xb1, hi: 0xb1},\n\t{value: 0x10a1, lo: 0xb2, hi: 0xb3},\n\t{value: 0x4065, lo: 0xb4, hi: 0xb4},\n\t{value: 0x10b1, lo: 0xb5, hi: 0xb7},\n\t{value: 0x4085, lo: 0xb8, hi: 0xb8},\n\t{value: 0x4085, lo: 0xb9, hi: 0xb9},\n\t{value: 0x10c9, lo: 0xba, hi: 0xbf},\n\t// Block 0x65, offset 0x32a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x66, offset 0x32e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x67, offset 0x333\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x68, offset 0x338\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x69, offset 0x33e\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x3b08, lo: 0xac, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6a, offset 0x34e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6b, offset 0x354\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x6c, offset 0x358\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x6d, offset 0x367\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x6e, offset 0x36c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x6f, offset 0x374\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x70, offset 0x37e\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x71, offset 0x389\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x72, offset 0x391\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x73, offset 0x3a2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x74, offset 0x3ab\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x75, offset 0x3bb\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x76, offset 0x3c8\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x449d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x44b5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0941, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa8},\n\t{value: 0x13f9, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x44cd, lo: 0xb0, hi: 0xbf},\n\t// Block 0x77, offset 0x3d4\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44ed, lo: 0x80, hi: 0x8f},\n\t{value: 0x450d, lo: 0x90, hi: 0x9f},\n\t{value: 0x452d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x450d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x78, offset 0x3d9\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x79, offset 0x3e6\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7a, offset 0x3ea\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x7b, offset 0x3ef\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x7c, offset 0x3f1\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x454d, lo: 0x80, hi: 0xbf},\n\t// Block 0x7d, offset 0x3f3\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d4d, lo: 0x80, hi: 0x94},\n\t{value: 0x4b0d, lo: 0x95, hi: 0x95},\n\t{value: 0x4fed, lo: 0x96, hi: 0xbf},\n\t// Block 0x7e, offset 0x3f7\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x552d, lo: 0x80, hi: 0xbf},\n\t// Block 0x7f, offset 0x3f9\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5d2d, lo: 0x80, hi: 0x84},\n\t{value: 0x568d, lo: 0x85, hi: 0x85},\n\t{value: 0x5dcd, lo: 0x86, hi: 0xbf},\n\t// Block 0x80, offset 0x3fd\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b8d, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d4d, lo: 0x90, hi: 0x90},\n\t{value: 0x6d8d, lo: 0x91, hi: 0xab},\n\t{value: 0x1401, lo: 0xac, hi: 0xac},\n\t{value: 0x70ed, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x710d, lo: 0xb0, hi: 0xbf},\n\t// Block 0x81, offset 0x406\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x730d, lo: 0x80, hi: 0xad},\n\t{value: 0x656d, lo: 0xae, hi: 0xae},\n\t{value: 0x78cd, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f8d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x79ad, lo: 0xb7, hi: 0xbf},\n\t// Block 0x82, offset 0x40c\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x1751, lo: 0x80, hi: 0x82},\n\t{value: 0x1741, lo: 0x83, hi: 0x83},\n\t{value: 0x1769, lo: 0x84, hi: 0xbf},\n\t// Block 0x83, offset 0x410\n\t{value: 0x0008, lo: 0x0f},\n\t{value: 0x1d81, lo: 0x80, hi: 0x83},\n\t{value: 0x1d99, lo: 0x84, hi: 0x85},\n\t{value: 0x1da1, lo: 0x86, hi: 0x87},\n\t{value: 0x1da9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x1de9, lo: 0x92, hi: 0x97},\n\t{value: 0x1e11, lo: 0x98, hi: 0x9c},\n\t{value: 0x1e31, lo: 0x9d, hi: 0xb3},\n\t{value: 0x1d71, lo: 0xb4, hi: 0xb4},\n\t{value: 0x1d81, lo: 0xb5, hi: 0xb5},\n\t{value: 0x1ee9, lo: 0xb6, hi: 0xbb},\n\t{value: 0x1f09, lo: 0xbc, hi: 0xbc},\n\t{value: 0x1ef9, lo: 0xbd, hi: 0xbd},\n\t{value: 0x1f19, lo: 0xbe, hi: 0xbf},\n\t// Block 0x84, offset 0x420\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x85, offset 0x42a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x86, offset 0x42f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x87, offset 0x432\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x88, offset 0x438\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x89, offset 0x43f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8a, offset 0x444\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8b, offset 0x448\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x8c, offset 0x44e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xbf},\n\t// Block 0x8d, offset 0x453\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x8e, offset 0x45c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8f, offset 0x461\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x90, offset 0x467\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8b0d, lo: 0x98, hi: 0x9f},\n\t{value: 0x8b25, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x91, offset 0x46e\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8b25, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8b0d, lo: 0xb8, hi: 0xbf},\n\t// Block 0x92, offset 0x475\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x93, offset 0x47c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x94, offset 0x480\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x95, offset 0x483\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x96, offset 0x488\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x97, offset 0x494\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x98, offset 0x49a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x99, offset 0x49f\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9a, offset 0x4a6\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9b, offset 0x4ae\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0x9c, offset 0x4b3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0x9d, offset 0x4b7\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9e, offset 0x4c7\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0x9f, offset 0x4ce\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa0, offset 0x4d2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa1, offset 0x4d6\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa2, offset 0x4dd\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa3, offset 0x4df\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa4, offset 0x4e2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xa5, offset 0x4e5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xa6, offset 0x4e9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0908, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0xa1},\n\t{value: 0x0c08, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0a08, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xa7, offset 0x4f2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa8, offset 0x4f6\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xac},\n\t{value: 0x0818, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xa9, offset 0x4fe\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbf},\n\t// Block 0xaa, offset 0x501\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0xa6},\n\t{value: 0x0808, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0a08, lo: 0xb4, hi: 0xbf},\n\t// Block 0xab, offset 0x509\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0a08, lo: 0x80, hi: 0x84},\n\t{value: 0x0808, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x90},\n\t{value: 0x0a18, lo: 0x91, hi: 0x93},\n\t{value: 0x0c18, lo: 0x94, hi: 0x94},\n\t{value: 0x0818, lo: 0x95, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb3},\n\t{value: 0x0c08, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xbf},\n\t// Block 0xac, offset 0x514\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0a08, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xaf},\n\t{value: 0x0a08, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0c08, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0a08, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xba},\n\t{value: 0x0a08, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0c08, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0a08, lo: 0xbe, hi: 0xbf},\n\t// Block 0xad, offset 0x523\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0x81},\n\t{value: 0x0c08, lo: 0x82, hi: 0x83},\n\t{value: 0x0a08, lo: 0x84, hi: 0x84},\n\t{value: 0x0818, lo: 0x85, hi: 0x88},\n\t{value: 0x0c18, lo: 0x89, hi: 0x89},\n\t{value: 0x0a18, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0918, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xae, offset 0x52f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xaf, offset 0x535\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3b08, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb0, offset 0x542\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xb1, offset 0x54e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb2, offset 0x556\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xb3, offset 0x55f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb4, offset 0x56a\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb5, offset 0x571\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xb6, offset 0x580\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb7, offset 0x58d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0xbf},\n\t// Block 0xb8, offset 0x591\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xb9, offset 0x59e\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xba, offset 0x5a7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xbb, offset 0x5ab\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xbf},\n\t// Block 0xbc, offset 0x5ba\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbd, offset 0x5c2\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xbe, offset 0x5cd\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbf, offset 0x5d6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xc0, offset 0x5dc\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc1, offset 0x5e4\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xc2, offset 0x5ed\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xc3, offset 0x5f9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xc4, offset 0x5fc\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc5, offset 0x608\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xc6, offset 0x60b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xc7, offset 0x614\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xc8, offset 0x617\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc9, offset 0x61c\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xca, offset 0x625\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xcb, offset 0x62a\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x99},\n\t{value: 0x3308, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3008, lo: 0x9c, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xbf},\n\t// Block 0xcc, offset 0x637\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xcd, offset 0x642\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x3b08, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0xbf},\n\t// Block 0xce, offset 0x64b\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x98},\n\t{value: 0x3b08, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xcf, offset 0x656\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd0, offset 0x659\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xd1, offset 0x65c\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd2, offset 0x666\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xd3, offset 0x66f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xd4, offset 0x67b\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd5, offset 0x688\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd6, offset 0x695\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x3008, lo: 0x93, hi: 0x94},\n\t{value: 0x3308, lo: 0x95, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x96},\n\t{value: 0x3b08, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xbf},\n\t// Block 0xd7, offset 0x6a3\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xd8, offset 0x6aa\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0xd9, offset 0x6b5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3808, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xda, offset 0x6bc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0xdb, offset 0x6c0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0xdc, offset 0x6c4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xdd, offset 0x6c7\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xde, offset 0x6cc\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xdf, offset 0x6cf\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbf},\n\t// Block 0xe0, offset 0x6d2\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xe1, offset 0x6d6\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0340, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe2, offset 0x6d9\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0xe3, offset 0x6de\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe4, offset 0x6e5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xe5, offset 0x6e8\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe6, offset 0x6f0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xe7, offset 0x6f4\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xe8, offset 0x6ff\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xe9, offset 0x702\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0xe105, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0xea, offset 0x705\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0xeb, offset 0x708\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbf},\n\t// Block 0xec, offset 0x70e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xed, offset 0x714\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x0018, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3308, lo: 0xa4, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xee, offset 0x71d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xef, offset 0x720\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0xf0, offset 0x723\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xf1, offset 0x726\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xf2, offset 0x72e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x0040, lo: 0xa3, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xf3, offset 0x733\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0x94},\n\t{value: 0x0008, lo: 0x95, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xa3},\n\t{value: 0x0008, lo: 0xa4, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xf4, offset 0x73c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0xf5, offset 0x73f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xf6, offset 0x744\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xf7, offset 0x74e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbf},\n\t// Block 0xf8, offset 0x752\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0xf9, offset 0x756\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xfa, offset 0x759\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xfb, offset 0x75c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xfc, offset 0x760\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0x2379, lo: 0x9e, hi: 0x9e},\n\t{value: 0x2381, lo: 0x9f, hi: 0x9f},\n\t{value: 0x2389, lo: 0xa0, hi: 0xa0},\n\t{value: 0x2391, lo: 0xa1, hi: 0xa1},\n\t{value: 0x2399, lo: 0xa2, hi: 0xa2},\n\t{value: 0x23a1, lo: 0xa3, hi: 0xa3},\n\t{value: 0x23a9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xfd, offset 0x76f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0x23b1, lo: 0xbb, hi: 0xbb},\n\t{value: 0x23b9, lo: 0xbc, hi: 0xbc},\n\t{value: 0x23c1, lo: 0xbd, hi: 0xbd},\n\t{value: 0x23c9, lo: 0xbe, hi: 0xbe},\n\t{value: 0x23d1, lo: 0xbf, hi: 0xbf},\n\t// Block 0xfe, offset 0x77b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x23d9, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xff, offset 0x77f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0x100, offset 0x784\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x101, offset 0x789\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x102, offset 0x78e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x103, offset 0x792\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x104, offset 0x797\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x105, offset 0x7a0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0x106, offset 0x7a5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0x107, offset 0x7a9\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x108, offset 0x7af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0x109, offset 0x7b5\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x3308, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xbf},\n\t// Block 0x10a, offset 0x7ba\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x10b, offset 0x7c0\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x10c, offset 0x7c6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x10d, offset 0x7d0\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0x10e, offset 0x7d6\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0b08, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x10f, offset 0x7df\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xb0},\n\t{value: 0x0818, lo: 0xb1, hi: 0xbf},\n\t// Block 0x110, offset 0x7e2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0818, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x111, offset 0x7e5\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0818, lo: 0x81, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x112, offset 0x7e9\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0x113, offset 0x7ed\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x114, offset 0x7f1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x115, offset 0x7f7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x116, offset 0x7fd\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0x2709, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0x117, offset 0x802\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0x118, offset 0x805\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x2889, lo: 0x80, hi: 0x80},\n\t{value: 0x2891, lo: 0x81, hi: 0x81},\n\t{value: 0x2899, lo: 0x82, hi: 0x82},\n\t{value: 0x28a1, lo: 0x83, hi: 0x83},\n\t{value: 0x28a9, lo: 0x84, hi: 0x84},\n\t{value: 0x28b1, lo: 0x85, hi: 0x85},\n\t{value: 0x28b9, lo: 0x86, hi: 0x86},\n\t{value: 0x28c1, lo: 0x87, hi: 0x87},\n\t{value: 0x28c9, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x28d1, lo: 0x90, hi: 0x90},\n\t{value: 0x28d9, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xbf},\n\t// Block 0x119, offset 0x815\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x11a, offset 0x81c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x11b, offset 0x820\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x11c, offset 0x827\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x11d, offset 0x82b\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x11e, offset 0x831\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0x11f, offset 0x838\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x120, offset 0x83f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x121, offset 0x845\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x122, offset 0x84e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0xbf},\n\t// Block 0x123, offset 0x852\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0018, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0xaf},\n\t{value: 0x06e1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0049, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0029, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0031, lo: 0xb3, hi: 0xb3},\n\t{value: 0x06e9, lo: 0xb4, hi: 0xb4},\n\t{value: 0x06f1, lo: 0xb5, hi: 0xb5},\n\t{value: 0x06f9, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0701, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0709, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0711, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x124, offset 0x860\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x125, offset 0x863\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x126, offset 0x866\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x127, offset 0x86a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x128, offset 0x86e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x129, offset 0x871\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbf},\n\t// Block 0x12a, offset 0x875\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x12b, offset 0x878\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0x12c, offset 0x87d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x12d, offset 0x87f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x12e, offset 0x881\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 46723 bytes (45KiB); checksum: 4CF3143A\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/tables9.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build !go1.10\n\npackage idna\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"9.0.0\"\n\nvar mappings string = \"\" + // Size: 8175 bytes\n\t\"\\x00\\x01 \\x03 ̈\\x01a\\x03 ̄\\x012\\x013\\x03 ́\\x03 ̧\\x011\\x01o\\x051⁄4\\x051⁄2\" +\n\t\"\\x053⁄4\\x03i̇\\x03l·\\x03ʼn\\x01s\\x03dž\\x03ⱥ\\x03ⱦ\\x01h\\x01j\\x01r\\x01w\\x01y\" +\n\t\"\\x03 ̆\\x03 ̇\\x03 ̊\\x03 ̨\\x03 ̃\\x03 ̋\\x01l\\x01x\\x04̈́\\x03 ι\\x01;\\x05 ̈́\" +\n\t\"\\x04եւ\\x04اٴ\\x04وٴ\\x04ۇٴ\\x04يٴ\\x06क़\\x06ख़\\x06ग़\\x06ज़\\x06ड़\\x06ढ़\\x06फ़\" +\n\t\"\\x06य़\\x06ড়\\x06ঢ়\\x06য়\\x06ਲ਼\\x06ਸ਼\\x06ਖ਼\\x06ਗ਼\\x06ਜ਼\\x06ਫ਼\\x06ଡ଼\\x06ଢ଼\" +\n\t\"\\x06ํา\\x06ໍາ\\x06ຫນ\\x06ຫມ\\x06གྷ\\x06ཌྷ\\x06དྷ\\x06བྷ\\x06ཛྷ\\x06ཀྵ\\x06ཱི\\x06ཱུ\" +\n\t\"\\x06ྲྀ\\x09ྲཱྀ\\x06ླྀ\\x09ླཱྀ\\x06ཱྀ\\x06ྒྷ\\x06ྜྷ\\x06ྡྷ\\x06ྦྷ\\x06ྫྷ\\x06ྐྵ\\x02\" +\n\t\"в\\x02д\\x02о\\x02с\\x02т\\x02ъ\\x02ѣ\\x02æ\\x01b\\x01d\\x01e\\x02ǝ\\x01g\\x01i\\x01k\" +\n\t\"\\x01m\\x01n\\x02ȣ\\x01p\\x01t\\x01u\\x02ɐ\\x02ɑ\\x02ə\\x02ɛ\\x02ɜ\\x02ŋ\\x02ɔ\\x02ɯ\" +\n\t\"\\x01v\\x02β\\x02γ\\x02δ\\x02φ\\x02χ\\x02ρ\\x02н\\x02ɒ\\x01c\\x02ɕ\\x02ð\\x01f\\x02ɟ\" +\n\t\"\\x02ɡ\\x02ɥ\\x02ɨ\\x02ɩ\\x02ɪ\\x02ʝ\\x02ɭ\\x02ʟ\\x02ɱ\\x02ɰ\\x02ɲ\\x02ɳ\\x02ɴ\\x02ɵ\" +\n\t\"\\x02ɸ\\x02ʂ\\x02ʃ\\x02ƫ\\x02ʉ\\x02ʊ\\x02ʋ\\x02ʌ\\x01z\\x02ʐ\\x02ʑ\\x02ʒ\\x02θ\\x02ss\" +\n\t\"\\x02ά\\x02έ\\x02ή\\x02ί\\x02ό\\x02ύ\\x02ώ\\x05ἀι\\x05ἁι\\x05ἂι\\x05ἃι\\x05ἄι\\x05ἅι\" +\n\t\"\\x05ἆι\\x05ἇι\\x05ἠι\\x05ἡι\\x05ἢι\\x05ἣι\\x05ἤι\\x05ἥι\\x05ἦι\\x05ἧι\\x05ὠι\\x05ὡι\" +\n\t\"\\x05ὢι\\x05ὣι\\x05ὤι\\x05ὥι\\x05ὦι\\x05ὧι\\x05ὰι\\x04αι\\x04άι\\x05ᾶι\\x02ι\\x05 ̈͂\" +\n\t\"\\x05ὴι\\x04ηι\\x04ήι\\x05ῆι\\x05 ̓̀\\x05 ̓́\\x05 ̓͂\\x02ΐ\\x05 ̔̀\\x05 ̔́\\x05 ̔͂\" +\n\t\"\\x02ΰ\\x05 ̈̀\\x01`\\x05ὼι\\x04ωι\\x04ώι\\x05ῶι\\x06′′\\x09′′′\\x06‵‵\\x09‵‵‵\\x02!\" +\n\t\"!\\x02??\\x02?!\\x02!?\\x0c′′′′\\x010\\x014\\x015\\x016\\x017\\x018\\x019\\x01+\\x01=\" +\n\t\"\\x01(\\x01)\\x02rs\\x02ħ\\x02no\\x01q\\x02sm\\x02tm\\x02ω\\x02å\\x02א\\x02ב\\x02ג\" +\n\t\"\\x02ד\\x02π\\x051⁄7\\x051⁄9\\x061⁄10\\x051⁄3\\x052⁄3\\x051⁄5\\x052⁄5\\x053⁄5\\x054\" +\n\t\"⁄5\\x051⁄6\\x055⁄6\\x051⁄8\\x053⁄8\\x055⁄8\\x057⁄8\\x041⁄\\x02ii\\x02iv\\x02vi\" +\n\t\"\\x04viii\\x02ix\\x02xi\\x050⁄3\\x06∫∫\\x09∫∫∫\\x06∮∮\\x09∮∮∮\\x0210\\x0211\\x0212\" +\n\t\"\\x0213\\x0214\\x0215\\x0216\\x0217\\x0218\\x0219\\x0220\\x04(10)\\x04(11)\\x04(12)\" +\n\t\"\\x04(13)\\x04(14)\\x04(15)\\x04(16)\\x04(17)\\x04(18)\\x04(19)\\x04(20)\\x0c∫∫∫∫\" +\n\t\"\\x02==\\x05⫝̸\\x02ɫ\\x02ɽ\\x02ȿ\\x02ɀ\\x01.\\x04 ゙\\x04 ゚\\x06より\\x06コト\\x05(ᄀ)\\x05\" +\n\t\"(ᄂ)\\x05(ᄃ)\\x05(ᄅ)\\x05(ᄆ)\\x05(ᄇ)\\x05(ᄉ)\\x05(ᄋ)\\x05(ᄌ)\\x05(ᄎ)\\x05(ᄏ)\\x05(ᄐ\" +\n\t\")\\x05(ᄑ)\\x05(ᄒ)\\x05(가)\\x05(나)\\x05(다)\\x05(라)\\x05(마)\\x05(바)\\x05(사)\\x05(아)\" +\n\t\"\\x05(자)\\x05(차)\\x05(카)\\x05(타)\\x05(파)\\x05(하)\\x05(주)\\x08(오전)\\x08(오후)\\x05(一)\" +\n\t\"\\x05(二)\\x05(三)\\x05(四)\\x05(五)\\x05(六)\\x05(七)\\x05(八)\\x05(九)\\x05(十)\\x05(月)\" +\n\t\"\\x05(火)\\x05(水)\\x05(木)\\x05(金)\\x05(土)\\x05(日)\\x05(株)\\x05(有)\\x05(社)\\x05(名)\" +\n\t\"\\x05(特)\\x05(財)\\x05(祝)\\x05(労)\\x05(代)\\x05(呼)\\x05(学)\\x05(監)\\x05(企)\\x05(資)\" +\n\t\"\\x05(協)\\x05(祭)\\x05(休)\\x05(自)\\x05(至)\\x0221\\x0222\\x0223\\x0224\\x0225\\x0226\" +\n\t\"\\x0227\\x0228\\x0229\\x0230\\x0231\\x0232\\x0233\\x0234\\x0235\\x06참고\\x06주의\\x0236\" +\n\t\"\\x0237\\x0238\\x0239\\x0240\\x0241\\x0242\\x0243\\x0244\\x0245\\x0246\\x0247\\x0248\" +\n\t\"\\x0249\\x0250\\x041月\\x042月\\x043月\\x044月\\x045月\\x046月\\x047月\\x048月\\x049月\\x0510\" +\n\t\"月\\x0511月\\x0512月\\x02hg\\x02ev\\x0cアパート\\x0cアルファ\\x0cアンペア\\x09アール\\x0cイニング\\x09\" +\n\t\"インチ\\x09ウォン\\x0fエスクード\\x0cエーカー\\x09オンス\\x09オーム\\x09カイリ\\x0cカラット\\x0cカロリー\\x09ガロ\" +\n\t\"ン\\x09ガンマ\\x06ギガ\\x09ギニー\\x0cキュリー\\x0cギルダー\\x06キロ\\x0fキログラム\\x12キロメートル\\x0fキロワッ\" +\n\t\"ト\\x09グラム\\x0fグラムトン\\x0fクルゼイロ\\x0cクローネ\\x09ケース\\x09コルナ\\x09コーポ\\x0cサイクル\\x0fサンチ\" +\n\t\"ーム\\x0cシリング\\x09センチ\\x09セント\\x09ダース\\x06デシ\\x06ドル\\x06トン\\x06ナノ\\x09ノット\\x09ハイツ\" +\n\t\"\\x0fパーセント\\x09パーツ\\x0cバーレル\\x0fピアストル\\x09ピクル\\x06ピコ\\x06ビル\\x0fファラッド\\x0cフィート\" +\n\t\"\\x0fブッシェル\\x09フラン\\x0fヘクタール\\x06ペソ\\x09ペニヒ\\x09ヘルツ\\x09ペンス\\x09ページ\\x09ベータ\\x0cポイ\" +\n\t\"ント\\x09ボルト\\x06ホン\\x09ポンド\\x09ホール\\x09ホーン\\x0cマイクロ\\x09マイル\\x09マッハ\\x09マルク\\x0fマ\" +\n\t\"ンション\\x0cミクロン\\x06ミリ\\x0fミリバール\\x06メガ\\x0cメガトン\\x0cメートル\\x09ヤード\\x09ヤール\\x09ユアン\" +\n\t\"\\x0cリットル\\x06リラ\\x09ルピー\\x0cルーブル\\x06レム\\x0fレントゲン\\x09ワット\\x040点\\x041点\\x042点\" +\n\t\"\\x043点\\x044点\\x045点\\x046点\\x047点\\x048点\\x049点\\x0510点\\x0511点\\x0512点\\x0513点\" +\n\t\"\\x0514点\\x0515点\\x0516点\\x0517点\\x0518点\\x0519点\\x0520点\\x0521点\\x0522点\\x0523点\" +\n\t\"\\x0524点\\x02da\\x02au\\x02ov\\x02pc\\x02dm\\x02iu\\x06平成\\x06昭和\\x06大正\\x06明治\\x0c株\" +\n\t\"式会社\\x02pa\\x02na\\x02ma\\x02ka\\x02kb\\x02mb\\x02gb\\x04kcal\\x02pf\\x02nf\\x02m\" +\n\t\"g\\x02kg\\x02hz\\x02ml\\x02dl\\x02kl\\x02fm\\x02nm\\x02mm\\x02cm\\x02km\\x02m2\\x02m\" +\n\t\"3\\x05m∕s\\x06m∕s2\\x07rad∕s\\x08rad∕s2\\x02ps\\x02ns\\x02ms\\x02pv\\x02nv\\x02mv\" +\n\t\"\\x02kv\\x02pw\\x02nw\\x02mw\\x02kw\\x02bq\\x02cc\\x02cd\\x06c∕kg\\x02db\\x02gy\\x02\" +\n\t\"ha\\x02hp\\x02in\\x02kk\\x02kt\\x02lm\\x02ln\\x02lx\\x02ph\\x02pr\\x02sr\\x02sv\\x02\" +\n\t\"wb\\x05v∕m\\x05a∕m\\x041日\\x042日\\x043日\\x044日\\x045日\\x046日\\x047日\\x048日\\x049日\" +\n\t\"\\x0510日\\x0511日\\x0512日\\x0513日\\x0514日\\x0515日\\x0516日\\x0517日\\x0518日\\x0519日\" +\n\t\"\\x0520日\\x0521日\\x0522日\\x0523日\\x0524日\\x0525日\\x0526日\\x0527日\\x0528日\\x0529日\" +\n\t\"\\x0530日\\x0531日\\x02ь\\x02ɦ\\x02ɬ\\x02ʞ\\x02ʇ\\x02œ\\x04𤋮\\x04𢡊\\x04𢡄\\x04𣏕\\x04𥉉\" +\n\t\"\\x04𥳐\\x04𧻓\\x02ff\\x02fi\\x02fl\\x02st\\x04մն\\x04մե\\x04մի\\x04վն\\x04մխ\\x04יִ\" +\n\t\"\\x04ײַ\\x02ע\\x02ה\\x02כ\\x02ל\\x02ם\\x02ר\\x02ת\\x04שׁ\\x04שׂ\\x06שּׁ\\x06שּׂ\\x04א\" +\n\t\"ַ\\x04אָ\\x04אּ\\x04בּ\\x04גּ\\x04דּ\\x04הּ\\x04וּ\\x04זּ\\x04טּ\\x04יּ\\x04ךּ\\x04\" +\n\t\"כּ\\x04לּ\\x04מּ\\x04נּ\\x04סּ\\x04ףּ\\x04פּ\\x04צּ\\x04קּ\\x04רּ\\x04שּ\\x04תּ\" +\n\t\"\\x04וֹ\\x04בֿ\\x04כֿ\\x04פֿ\\x04אל\\x02ٱ\\x02ٻ\\x02پ\\x02ڀ\\x02ٺ\\x02ٿ\\x02ٹ\\x02ڤ\" +\n\t\"\\x02ڦ\\x02ڄ\\x02ڃ\\x02چ\\x02ڇ\\x02ڍ\\x02ڌ\\x02ڎ\\x02ڈ\\x02ژ\\x02ڑ\\x02ک\\x02گ\\x02ڳ\" +\n\t\"\\x02ڱ\\x02ں\\x02ڻ\\x02ۀ\\x02ہ\\x02ھ\\x02ے\\x02ۓ\\x02ڭ\\x02ۇ\\x02ۆ\\x02ۈ\\x02ۋ\\x02ۅ\" +\n\t\"\\x02ۉ\\x02ې\\x02ى\\x04ئا\\x04ئە\\x04ئو\\x04ئۇ\\x04ئۆ\\x04ئۈ\\x04ئې\\x04ئى\\x02ی\\x04\" +\n\t\"ئج\\x04ئح\\x04ئم\\x04ئي\\x04بج\\x04بح\\x04بخ\\x04بم\\x04بى\\x04بي\\x04تج\\x04تح\" +\n\t\"\\x04تخ\\x04تم\\x04تى\\x04تي\\x04ثج\\x04ثم\\x04ثى\\x04ثي\\x04جح\\x04جم\\x04حج\\x04حم\" +\n\t\"\\x04خج\\x04خح\\x04خم\\x04سج\\x04سح\\x04سخ\\x04سم\\x04صح\\x04صم\\x04ضج\\x04ضح\\x04ضخ\" +\n\t\"\\x04ضم\\x04طح\\x04طم\\x04ظم\\x04عج\\x04عم\\x04غج\\x04غم\\x04فج\\x04فح\\x04فخ\\x04فم\" +\n\t\"\\x04فى\\x04في\\x04قح\\x04قم\\x04قى\\x04قي\\x04كا\\x04كج\\x04كح\\x04كخ\\x04كل\\x04كم\" +\n\t\"\\x04كى\\x04كي\\x04لج\\x04لح\\x04لخ\\x04لم\\x04لى\\x04لي\\x04مج\\x04مح\\x04مخ\\x04مم\" +\n\t\"\\x04مى\\x04مي\\x04نج\\x04نح\\x04نخ\\x04نم\\x04نى\\x04ني\\x04هج\\x04هم\\x04هى\\x04هي\" +\n\t\"\\x04يج\\x04يح\\x04يخ\\x04يم\\x04يى\\x04يي\\x04ذٰ\\x04رٰ\\x04ىٰ\\x05 ٌّ\\x05 ٍّ\\x05\" +\n\t\" َّ\\x05 ُّ\\x05 ِّ\\x05 ّٰ\\x04ئر\\x04ئز\\x04ئن\\x04بر\\x04بز\\x04بن\\x04تر\\x04تز\" +\n\t\"\\x04تن\\x04ثر\\x04ثز\\x04ثن\\x04ما\\x04نر\\x04نز\\x04نن\\x04ير\\x04يز\\x04ين\\x04ئخ\" +\n\t\"\\x04ئه\\x04به\\x04ته\\x04صخ\\x04له\\x04نه\\x04هٰ\\x04يه\\x04ثه\\x04سه\\x04شم\\x04شه\" +\n\t\"\\x06ـَّ\\x06ـُّ\\x06ـِّ\\x04طى\\x04طي\\x04عى\\x04عي\\x04غى\\x04غي\\x04سى\\x04سي\" +\n\t\"\\x04شى\\x04شي\\x04حى\\x04حي\\x04جى\\x04جي\\x04خى\\x04خي\\x04صى\\x04صي\\x04ضى\\x04ضي\" +\n\t\"\\x04شج\\x04شح\\x04شخ\\x04شر\\x04سر\\x04صر\\x04ضر\\x04اً\\x06تجم\\x06تحج\\x06تحم\" +\n\t\"\\x06تخم\\x06تمج\\x06تمح\\x06تمخ\\x06جمح\\x06حمي\\x06حمى\\x06سحج\\x06سجح\\x06سجى\" +\n\t\"\\x06سمح\\x06سمج\\x06سمم\\x06صحح\\x06صمم\\x06شحم\\x06شجي\\x06شمخ\\x06شمم\\x06ضحى\" +\n\t\"\\x06ضخم\\x06طمح\\x06طمم\\x06طمي\\x06عجم\\x06عمم\\x06عمى\\x06غمم\\x06غمي\\x06غمى\" +\n\t\"\\x06فخم\\x06قمح\\x06قمم\\x06لحم\\x06لحي\\x06لحى\\x06لجج\\x06لخم\\x06لمح\\x06محج\" +\n\t\"\\x06محم\\x06محي\\x06مجح\\x06مجم\\x06مخج\\x06مخم\\x06مجخ\\x06همج\\x06همم\\x06نحم\" +\n\t\"\\x06نحى\\x06نجم\\x06نجى\\x06نمي\\x06نمى\\x06يمم\\x06بخي\\x06تجي\\x06تجى\\x06تخي\" +\n\t\"\\x06تخى\\x06تمي\\x06تمى\\x06جمي\\x06جحى\\x06جمى\\x06سخى\\x06صحي\\x06شحي\\x06ضحي\" +\n\t\"\\x06لجي\\x06لمي\\x06يحي\\x06يجي\\x06يمي\\x06ممي\\x06قمي\\x06نحي\\x06عمي\\x06كمي\" +\n\t\"\\x06نجح\\x06مخي\\x06لجم\\x06كمم\\x06جحي\\x06حجي\\x06مجي\\x06فمي\\x06بحي\\x06سخي\" +\n\t\"\\x06نجي\\x06صلے\\x06قلے\\x08الله\\x08اكبر\\x08محمد\\x08صلعم\\x08رسول\\x08عليه\" +\n\t\"\\x08وسلم\\x06صلى!صلى الله عليه وسلم\\x0fجل جلاله\\x08ریال\\x01,\\x01:\\x01!\" +\n\t\"\\x01?\\x01_\\x01{\\x01}\\x01[\\x01]\\x01#\\x01&\\x01*\\x01-\\x01<\\x01>\\x01\\\\\\x01$\" +\n\t\"\\x01%\\x01@\\x04ـً\\x04ـَ\\x04ـُ\\x04ـِ\\x04ـّ\\x04ـْ\\x02ء\\x02آ\\x02أ\\x02ؤ\\x02إ\" +\n\t\"\\x02ئ\\x02ا\\x02ب\\x02ة\\x02ت\\x02ث\\x02ج\\x02ح\\x02خ\\x02د\\x02ذ\\x02ر\\x02ز\\x02س\" +\n\t\"\\x02ش\\x02ص\\x02ض\\x02ط\\x02ظ\\x02ع\\x02غ\\x02ف\\x02ق\\x02ك\\x02ل\\x02م\\x02ن\\x02ه\" +\n\t\"\\x02و\\x02ي\\x04لآ\\x04لأ\\x04لإ\\x04لا\\x01\\x22\\x01'\\x01/\\x01^\\x01|\\x01~\\x02¢\" +\n\t\"\\x02£\\x02¬\\x02¦\\x02¥\\x08𝅗𝅥\\x08𝅘𝅥\\x0c𝅘𝅥𝅮\\x0c𝅘𝅥𝅯\\x0c𝅘𝅥𝅰\\x0c𝅘𝅥𝅱\\x0c𝅘𝅥𝅲\\x08𝆹\" +\n\t\"𝅥\\x08𝆺𝅥\\x0c𝆹𝅥𝅮\\x0c𝆺𝅥𝅮\\x0c𝆹𝅥𝅯\\x0c𝆺𝅥𝅯\\x02ı\\x02ȷ\\x02α\\x02ε\\x02ζ\\x02η\\x02\" +\n\t\"κ\\x02λ\\x02μ\\x02ν\\x02ξ\\x02ο\\x02σ\\x02τ\\x02υ\\x02ψ\\x03∇\\x03∂\\x02ϝ\\x02ٮ\\x02ڡ\" +\n\t\"\\x02ٯ\\x020,\\x021,\\x022,\\x023,\\x024,\\x025,\\x026,\\x027,\\x028,\\x029,\\x03(a)\" +\n\t\"\\x03(b)\\x03(c)\\x03(d)\\x03(e)\\x03(f)\\x03(g)\\x03(h)\\x03(i)\\x03(j)\\x03(k)\" +\n\t\"\\x03(l)\\x03(m)\\x03(n)\\x03(o)\\x03(p)\\x03(q)\\x03(r)\\x03(s)\\x03(t)\\x03(u)\" +\n\t\"\\x03(v)\\x03(w)\\x03(x)\\x03(y)\\x03(z)\\x07〔s〕\\x02wz\\x02hv\\x02sd\\x03ppv\\x02w\" +\n\t\"c\\x02mc\\x02md\\x02dj\\x06ほか\\x06ココ\\x03サ\\x03手\\x03字\\x03双\\x03デ\\x03二\\x03多\\x03解\" +\n\t\"\\x03天\\x03交\\x03映\\x03無\\x03料\\x03前\\x03後\\x03再\\x03新\\x03初\\x03終\\x03生\\x03販\\x03声\" +\n\t\"\\x03吹\\x03演\\x03投\\x03捕\\x03一\\x03三\\x03遊\\x03左\\x03中\\x03右\\x03指\\x03走\\x03打\\x03禁\" +\n\t\"\\x03空\\x03合\\x03満\\x03有\\x03月\\x03申\\x03割\\x03営\\x03配\\x09〔本〕\\x09〔三〕\\x09〔二〕\\x09〔安\" +\n\t\"〕\\x09〔点〕\\x09〔打〕\\x09〔盗〕\\x09〔勝〕\\x09〔敗〕\\x03得\\x03可\\x03丽\\x03丸\\x03乁\\x03你\\x03\" +\n\t\"侮\\x03侻\\x03倂\\x03偺\\x03備\\x03僧\\x03像\\x03㒞\\x03免\\x03兔\\x03兤\\x03具\\x03㒹\\x03內\\x03\" +\n\t\"冗\\x03冤\\x03仌\\x03冬\\x03况\\x03凵\\x03刃\\x03㓟\\x03刻\\x03剆\\x03剷\\x03㔕\\x03勇\\x03勉\\x03\" +\n\t\"勤\\x03勺\\x03包\\x03匆\\x03北\\x03卉\\x03卑\\x03博\\x03即\\x03卽\\x03卿\\x03灰\\x03及\\x03叟\\x03\" +\n\t\"叫\\x03叱\\x03吆\\x03咞\\x03吸\\x03呈\\x03周\\x03咢\\x03哶\\x03唐\\x03啓\\x03啣\\x03善\\x03喙\\x03\" +\n\t\"喫\\x03喳\\x03嗂\\x03圖\\x03嘆\\x03圗\\x03噑\\x03噴\\x03切\\x03壮\\x03城\\x03埴\\x03堍\\x03型\\x03\" +\n\t\"堲\\x03報\\x03墬\\x03売\\x03壷\\x03夆\\x03夢\\x03奢\\x03姬\\x03娛\\x03娧\\x03姘\\x03婦\\x03㛮\\x03\" +\n\t\"嬈\\x03嬾\\x03寃\\x03寘\\x03寧\\x03寳\\x03寿\\x03将\\x03尢\\x03㞁\\x03屠\\x03屮\\x03峀\\x03岍\\x03\" +\n\t\"嵃\\x03嵮\\x03嵫\\x03嵼\\x03巡\\x03巢\\x03㠯\\x03巽\\x03帨\\x03帽\\x03幩\\x03㡢\\x03㡼\\x03庰\\x03\" +\n\t\"庳\\x03庶\\x03廊\\x03廾\\x03舁\\x03弢\\x03㣇\\x03形\\x03彫\\x03㣣\\x03徚\\x03忍\\x03志\\x03忹\\x03\" +\n\t\"悁\\x03㤺\\x03㤜\\x03悔\\x03惇\\x03慈\\x03慌\\x03慎\\x03慺\\x03憎\\x03憲\\x03憤\\x03憯\\x03懞\\x03\" +\n\t\"懲\\x03懶\\x03成\\x03戛\\x03扝\\x03抱\\x03拔\\x03捐\\x03挽\\x03拼\\x03捨\\x03掃\\x03揤\\x03搢\\x03\" +\n\t\"揅\\x03掩\\x03㨮\\x03摩\\x03摾\\x03撝\\x03摷\\x03㩬\\x03敏\\x03敬\\x03旣\\x03書\\x03晉\\x03㬙\\x03\" +\n\t\"暑\\x03㬈\\x03㫤\\x03冒\\x03冕\\x03最\\x03暜\\x03肭\\x03䏙\\x03朗\\x03望\\x03朡\\x03杞\\x03杓\\x03\" +\n\t\"㭉\\x03柺\\x03枅\\x03桒\\x03梅\\x03梎\\x03栟\\x03椔\\x03㮝\\x03楂\\x03榣\\x03槪\\x03檨\\x03櫛\\x03\" +\n\t\"㰘\\x03次\\x03歔\\x03㱎\\x03歲\\x03殟\\x03殺\\x03殻\\x03汎\\x03沿\\x03泍\\x03汧\\x03洖\\x03派\\x03\" +\n\t\"海\\x03流\\x03浩\\x03浸\\x03涅\\x03洴\\x03港\\x03湮\\x03㴳\\x03滋\\x03滇\\x03淹\\x03潮\\x03濆\\x03\" +\n\t\"瀹\\x03瀞\\x03瀛\\x03㶖\\x03灊\\x03災\\x03灷\\x03炭\\x03煅\\x03熜\\x03爨\\x03爵\\x03牐\\x03犀\\x03\" +\n\t\"犕\\x03獺\\x03王\\x03㺬\\x03玥\\x03㺸\\x03瑇\\x03瑜\\x03瑱\\x03璅\\x03瓊\\x03㼛\\x03甤\\x03甾\\x03\" +\n\t\"異\\x03瘐\\x03㿼\\x03䀈\\x03直\\x03眞\\x03真\\x03睊\\x03䀹\\x03瞋\\x03䁆\\x03䂖\\x03硎\\x03碌\\x03\" +\n\t\"磌\\x03䃣\\x03祖\\x03福\\x03秫\\x03䄯\\x03穀\\x03穊\\x03穏\\x03䈂\\x03篆\\x03築\\x03䈧\\x03糒\\x03\" +\n\t\"䊠\\x03糨\\x03糣\\x03紀\\x03絣\\x03䌁\\x03緇\\x03縂\\x03繅\\x03䌴\\x03䍙\\x03罺\\x03羕\\x03翺\\x03\" +\n\t\"者\\x03聠\\x03聰\\x03䏕\\x03育\\x03脃\\x03䐋\\x03脾\\x03媵\\x03舄\\x03辞\\x03䑫\\x03芑\\x03芋\\x03\" +\n\t\"芝\\x03劳\\x03花\\x03芳\\x03芽\\x03苦\\x03若\\x03茝\\x03荣\\x03莭\\x03茣\\x03莽\\x03菧\\x03著\\x03\" +\n\t\"荓\\x03菊\\x03菌\\x03菜\\x03䔫\\x03蓱\\x03蓳\\x03蔖\\x03蕤\\x03䕝\\x03䕡\\x03䕫\\x03虐\\x03虜\\x03\" +\n\t\"虧\\x03虩\\x03蚩\\x03蚈\\x03蜎\\x03蛢\\x03蝹\\x03蜨\\x03蝫\\x03螆\\x03蟡\\x03蠁\\x03䗹\\x03衠\\x03\" +\n\t\"衣\\x03裗\\x03裞\\x03䘵\\x03裺\\x03㒻\\x03䚾\\x03䛇\\x03誠\\x03諭\\x03變\\x03豕\\x03貫\\x03賁\\x03\" +\n\t\"贛\\x03起\\x03跋\\x03趼\\x03跰\\x03軔\\x03輸\\x03邔\\x03郱\\x03鄑\\x03鄛\\x03鈸\\x03鋗\\x03鋘\\x03\" +\n\t\"鉼\\x03鏹\\x03鐕\\x03開\\x03䦕\\x03閷\\x03䧦\\x03雃\\x03嶲\\x03霣\\x03䩮\\x03䩶\\x03韠\\x03䪲\\x03\" +\n\t\"頋\\x03頩\\x03飢\\x03䬳\\x03餩\\x03馧\\x03駂\\x03駾\\x03䯎\\x03鬒\\x03鱀\\x03鳽\\x03䳎\\x03䳭\\x03\" +\n\t\"鵧\\x03䳸\\x03麻\\x03䵖\\x03黹\\x03黾\\x03鼅\\x03鼏\\x03鼖\\x03鼻\"\n\nvar xorData string = \"\" + // Size: 4855 bytes\n\t\"\\x02\\x0c\\x09\\x02\\xb0\\xec\\x02\\xad\\xd8\\x02\\xad\\xd9\\x02\\x06\\x07\\x02\\x0f\\x12\" +\n\t\"\\x02\\x0f\\x1f\\x02\\x0f\\x1d\\x02\\x01\\x13\\x02\\x0f\\x16\\x02\\x0f\\x0b\\x02\\x0f3\" +\n\t\"\\x02\\x0f7\\x02\\x0f?\\x02\\x0f/\\x02\\x0f*\\x02\\x0c&\\x02\\x0c*\\x02\\x0c;\\x02\\x0c9\" +\n\t\"\\x02\\x0c%\\x02\\xab\\xed\\x02\\xab\\xe2\\x02\\xab\\xe3\\x02\\xa9\\xe0\\x02\\xa9\\xe1\" +\n\t\"\\x02\\xa9\\xe6\\x02\\xa3\\xcb\\x02\\xa3\\xc8\\x02\\xa3\\xc9\\x02\\x01#\\x02\\x01\\x08\" +\n\t\"\\x02\\x0e>\\x02\\x0e'\\x02\\x0f\\x03\\x02\\x03\\x0d\\x02\\x03\\x09\\x02\\x03\\x17\\x02\" +\n\t\"\\x03\\x0e\\x02\\x02\\x03\\x02\\x011\\x02\\x01\\x00\\x02\\x01\\x10\\x02\\x03<\\x02\\x07\" +\n\t\"\\x0d\\x02\\x02\\x0c\\x02\\x0c0\\x02\\x01\\x03\\x02\\x01\\x01\\x02\\x01 \\x02\\x01\\x22\" +\n\t\"\\x02\\x01)\\x02\\x01\\x0a\\x02\\x01\\x0c\\x02\\x02\\x06\\x02\\x02\\x02\\x02\\x03\\x10\" +\n\t\"\\x03\\x037 \\x03\\x0b+\\x03\\x02\\x01\\x04\\x02\\x01\\x02\\x02\\x019\\x02\\x03\\x1c\\x02\" +\n\t\"\\x02$\\x03\\x80p$\\x02\\x03:\\x02\\x03\\x0a\\x03\\xc1r.\\x03\\xc1r,\\x03\\xc1r\\x02\" +\n\t\"\\x02\\x02:\\x02\\x02>\\x02\\x02,\\x02\\x02\\x10\\x02\\x02\\x00\\x03\\xc1s<\\x03\\xc1s*\" +\n\t\"\\x03\\xc2L$\\x03\\xc2L;\\x02\\x09)\\x02\\x0a\\x19\\x03\\x83\\xab\\xe3\\x03\\x83\\xab\" +\n\t\"\\xf2\\x03 4\\xe0\\x03\\x81\\xab\\xea\\x03\\x81\\xab\\xf3\\x03 4\\xef\\x03\\x96\\xe1\\xcd\" +\n\t\"\\x03\\x84\\xe5\\xc3\\x02\\x0d\\x11\\x03\\x8b\\xec\\xcb\\x03\\x94\\xec\\xcf\\x03\\x9a\\xec\" +\n\t\"\\xc2\\x03\\x8b\\xec\\xdb\\x03\\x94\\xec\\xdf\\x03\\x9a\\xec\\xd2\\x03\\x01\\x0c!\\x03\" +\n\t\"\\x01\\x0c#\\x03ʠ\\x9d\\x03ʣ\\x9c\\x03ʢ\\x9f\\x03ʥ\\x9e\\x03ʤ\\x91\\x03ʧ\\x90\\x03ʦ\\x93\" +\n\t\"\\x03ʩ\\x92\\x03ʨ\\x95\\x03\\xca\\xf3\\xb5\\x03\\xca\\xf0\\xb4\\x03\\xca\\xf1\\xb7\\x03\" +\n\t\"\\xca\\xf6\\xb6\\x03\\xca\\xf7\\x89\\x03\\xca\\xf4\\x88\\x03\\xca\\xf5\\x8b\\x03\\xca\\xfa\" +\n\t\"\\x8a\\x03\\xca\\xfb\\x8d\\x03\\xca\\xf8\\x8c\\x03\\xca\\xf9\\x8f\\x03\\xca\\xfe\\x8e\\x03\" +\n\t\"\\xca\\xff\\x81\\x03\\xca\\xfc\\x80\\x03\\xca\\xfd\\x83\\x03\\xca\\xe2\\x82\\x03\\xca\\xe3\" +\n\t\"\\x85\\x03\\xca\\xe0\\x84\\x03\\xca\\xe1\\x87\\x03\\xca\\xe6\\x86\\x03\\xca\\xe7\\x99\\x03\" +\n\t\"\\xca\\xe4\\x98\\x03\\xca\\xe5\\x9b\\x03\\xca\\xea\\x9a\\x03\\xca\\xeb\\x9d\\x03\\xca\\xe8\" +\n\t\"\\x9c\\x03ؓ\\x89\\x03ߔ\\x8b\\x02\\x010\\x03\\x03\\x04\\x1e\\x03\\x04\\x15\\x12\\x03\\x0b\" +\n\t\"\\x05,\\x03\\x06\\x04\\x00\\x03\\x06\\x04)\\x03\\x06\\x044\\x03\\x06\\x04<\\x03\\x06\\x05\" +\n\t\"\\x1d\\x03\\x06\\x06\\x00\\x03\\x06\\x06\\x0a\\x03\\x06\\x06'\\x03\\x06\\x062\\x03\\x0786\" +\n\t\"\\x03\\x079/\\x03\\x079 \\x03\\x07:\\x0e\\x03\\x07:\\x1b\\x03\\x07:%\\x03\\x07;/\\x03\" +\n\t\"\\x07;%\\x03\\x074\\x11\\x03\\x076\\x09\\x03\\x077*\\x03\\x070\\x01\\x03\\x070\\x0f\\x03\" +\n\t\"\\x070.\\x03\\x071\\x16\\x03\\x071\\x04\\x03\\x0710\\x03\\x072\\x18\\x03\\x072-\\x03\" +\n\t\"\\x073\\x14\\x03\\x073>\\x03\\x07'\\x09\\x03\\x07 \\x00\\x03\\x07\\x1f\\x0b\\x03\\x07\" +\n\t\"\\x18#\\x03\\x07\\x18(\\x03\\x07\\x186\\x03\\x07\\x18\\x03\\x03\\x07\\x19\\x16\\x03\\x07\" +\n\t\"\\x116\\x03\\x07\\x12'\\x03\\x07\\x13\\x10\\x03\\x07\\x0c&\\x03\\x07\\x0c\\x08\\x03\\x07\" +\n\t\"\\x0c\\x13\\x03\\x07\\x0d\\x02\\x03\\x07\\x0d\\x1c\\x03\\x07\\x0b5\\x03\\x07\\x0b\\x0a\" +\n\t\"\\x03\\x07\\x0b\\x01\\x03\\x07\\x0b\\x0f\\x03\\x07\\x05\\x00\\x03\\x07\\x05\\x09\\x03\\x07\" +\n\t\"\\x05\\x0b\\x03\\x07\\x07\\x01\\x03\\x07\\x07\\x08\\x03\\x07\\x00<\\x03\\x07\\x00+\\x03\" +\n\t\"\\x07\\x01)\\x03\\x07\\x01\\x1b\\x03\\x07\\x01\\x08\\x03\\x07\\x03?\\x03\\x0445\\x03\\x04\" +\n\t\"4\\x08\\x03\\x0454\\x03\\x04)/\\x03\\x04)5\\x03\\x04+\\x05\\x03\\x04+\\x14\\x03\\x04+ \" +\n\t\"\\x03\\x04+<\\x03\\x04*&\\x03\\x04*\\x22\\x03\\x04&8\\x03\\x04!\\x01\\x03\\x04!\\x22\" +\n\t\"\\x03\\x04\\x11+\\x03\\x04\\x10.\\x03\\x04\\x104\\x03\\x04\\x13=\\x03\\x04\\x12\\x04\\x03\" +\n\t\"\\x04\\x12\\x0a\\x03\\x04\\x0d\\x1d\\x03\\x04\\x0d\\x07\\x03\\x04\\x0d \\x03\\x05<>\\x03\" +\n\t\"\\x055<\\x03\\x055!\\x03\\x055#\\x03\\x055&\\x03\\x054\\x1d\\x03\\x054\\x02\\x03\\x054\" +\n\t\"\\x07\\x03\\x0571\\x03\\x053\\x1a\\x03\\x053\\x16\\x03\\x05.<\\x03\\x05.\\x07\\x03\\x05)\" +\n\t\":\\x03\\x05)<\\x03\\x05)\\x0c\\x03\\x05)\\x15\\x03\\x05+-\\x03\\x05+5\\x03\\x05$\\x1e\" +\n\t\"\\x03\\x05$\\x14\\x03\\x05'\\x04\\x03\\x05'\\x14\\x03\\x05&\\x02\\x03\\x05\\x226\\x03\" +\n\t\"\\x05\\x22\\x0c\\x03\\x05\\x22\\x1c\\x03\\x05\\x19\\x0a\\x03\\x05\\x1b\\x09\\x03\\x05\\x1b\" +\n\t\"\\x0c\\x03\\x05\\x14\\x07\\x03\\x05\\x16?\\x03\\x05\\x16\\x0c\\x03\\x05\\x0c\\x05\\x03\" +\n\t\"\\x05\\x0e\\x0f\\x03\\x05\\x01\\x0e\\x03\\x05\\x00(\\x03\\x05\\x030\\x03\\x05\\x03\\x06\" +\n\t\"\\x03\\x0a==\\x03\\x0a=1\\x03\\x0a=,\\x03\\x0a=\\x0c\\x03\\x0a??\\x03\\x0a<\\x08\\x03\" +\n\t\"\\x0a9!\\x03\\x0a9)\\x03\\x0a97\\x03\\x0a99\\x03\\x0a6\\x0a\\x03\\x0a6\\x1c\\x03\\x0a6\" +\n\t\"\\x17\\x03\\x0a7'\\x03\\x0a78\\x03\\x0a73\\x03\\x0a'\\x01\\x03\\x0a'&\\x03\\x0a\\x1f\" +\n\t\"\\x0e\\x03\\x0a\\x1f\\x03\\x03\\x0a\\x1f3\\x03\\x0a\\x1b/\\x03\\x0a\\x18\\x19\\x03\\x0a\" +\n\t\"\\x19\\x01\\x03\\x0a\\x16\\x14\\x03\\x0a\\x0e\\x22\\x03\\x0a\\x0f\\x10\\x03\\x0a\\x0f\\x02\" +\n\t\"\\x03\\x0a\\x0f \\x03\\x0a\\x0c\\x04\\x03\\x0a\\x0b>\\x03\\x0a\\x0b+\\x03\\x0a\\x08/\\x03\" +\n\t\"\\x0a\\x046\\x03\\x0a\\x05\\x14\\x03\\x0a\\x00\\x04\\x03\\x0a\\x00\\x10\\x03\\x0a\\x00\" +\n\t\"\\x14\\x03\\x0b<3\\x03\\x0b;*\\x03\\x0b9\\x22\\x03\\x0b9)\\x03\\x0b97\\x03\\x0b+\\x10\" +\n\t\"\\x03\\x0b((\\x03\\x0b&5\\x03\\x0b$\\x1c\\x03\\x0b$\\x12\\x03\\x0b%\\x04\\x03\\x0b#<\" +\n\t\"\\x03\\x0b#0\\x03\\x0b#\\x0d\\x03\\x0b#\\x19\\x03\\x0b!:\\x03\\x0b!\\x1f\\x03\\x0b!\\x00\" +\n\t\"\\x03\\x0b\\x1e5\\x03\\x0b\\x1c\\x1d\\x03\\x0b\\x1d-\\x03\\x0b\\x1d(\\x03\\x0b\\x18.\\x03\" +\n\t\"\\x0b\\x18 \\x03\\x0b\\x18\\x16\\x03\\x0b\\x14\\x13\\x03\\x0b\\x15$\\x03\\x0b\\x15\\x22\" +\n\t\"\\x03\\x0b\\x12\\x1b\\x03\\x0b\\x12\\x10\\x03\\x0b\\x132\\x03\\x0b\\x13=\\x03\\x0b\\x12\" +\n\t\"\\x18\\x03\\x0b\\x0c&\\x03\\x0b\\x061\\x03\\x0b\\x06:\\x03\\x0b\\x05#\\x03\\x0b\\x05<\" +\n\t\"\\x03\\x0b\\x04\\x0b\\x03\\x0b\\x04\\x04\\x03\\x0b\\x04\\x1b\\x03\\x0b\\x042\\x03\\x0b\" +\n\t\"\\x041\\x03\\x0b\\x03\\x03\\x03\\x0b\\x03\\x1d\\x03\\x0b\\x03/\\x03\\x0b\\x03+\\x03\\x0b\" +\n\t\"\\x02\\x1b\\x03\\x0b\\x02\\x00\\x03\\x0b\\x01\\x1e\\x03\\x0b\\x01\\x08\\x03\\x0b\\x015\" +\n\t\"\\x03\\x06\\x0d9\\x03\\x06\\x0d=\\x03\\x06\\x0d?\\x03\\x02\\x001\\x03\\x02\\x003\\x03\" +\n\t\"\\x02\\x02\\x19\\x03\\x02\\x006\\x03\\x02\\x02\\x1b\\x03\\x02\\x004\\x03\\x02\\x00<\\x03\" +\n\t\"\\x02\\x02\\x0a\\x03\\x02\\x02\\x0e\\x03\\x02\\x01\\x1a\\x03\\x02\\x01\\x07\\x03\\x02\\x01\" +\n\t\"\\x05\\x03\\x02\\x01\\x0b\\x03\\x02\\x01%\\x03\\x02\\x01\\x0c\\x03\\x02\\x01\\x04\\x03\" +\n\t\"\\x02\\x01\\x1c\\x03\\x02\\x00.\\x03\\x02\\x002\\x03\\x02\\x00>\\x03\\x02\\x00\\x12\\x03\" +\n\t\"\\x02\\x00\\x16\\x03\\x02\\x011\\x03\\x02\\x013\\x03\\x02\\x02 \\x03\\x02\\x02%\\x03\\x02\" +\n\t\"\\x02$\\x03\\x02\\x028\\x03\\x02\\x02;\\x03\\x02\\x024\\x03\\x02\\x012\\x03\\x02\\x022\" +\n\t\"\\x03\\x02\\x02/\\x03\\x02\\x01,\\x03\\x02\\x01\\x13\\x03\\x02\\x01\\x16\\x03\\x02\\x01\" +\n\t\"\\x11\\x03\\x02\\x01\\x1e\\x03\\x02\\x01\\x15\\x03\\x02\\x01\\x17\\x03\\x02\\x01\\x0f\\x03\" +\n\t\"\\x02\\x01\\x08\\x03\\x02\\x00?\\x03\\x02\\x03\\x07\\x03\\x02\\x03\\x0d\\x03\\x02\\x03\" +\n\t\"\\x13\\x03\\x02\\x03\\x1d\\x03\\x02\\x03\\x1f\\x03\\x02\\x00\\x03\\x03\\x02\\x00\\x0d\\x03\" +\n\t\"\\x02\\x00\\x01\\x03\\x02\\x00\\x1b\\x03\\x02\\x00\\x19\\x03\\x02\\x00\\x18\\x03\\x02\\x00\" +\n\t\"\\x13\\x03\\x02\\x00/\\x03\\x07>\\x12\\x03\\x07<\\x1f\\x03\\x07>\\x1d\\x03\\x06\\x1d\\x0e\" +\n\t\"\\x03\\x07>\\x1c\\x03\\x07>:\\x03\\x07>\\x13\\x03\\x04\\x12+\\x03\\x07?\\x03\\x03\\x07>\" +\n\t\"\\x02\\x03\\x06\\x224\\x03\\x06\\x1a.\\x03\\x07<%\\x03\\x06\\x1c\\x0b\\x03\\x0609\\x03\" +\n\t\"\\x05\\x1f\\x01\\x03\\x04'\\x08\\x03\\x93\\xfd\\xf5\\x03\\x02\\x0d \\x03\\x02\\x0d#\\x03\" +\n\t\"\\x02\\x0d!\\x03\\x02\\x0d&\\x03\\x02\\x0d\\x22\\x03\\x02\\x0d/\\x03\\x02\\x0d,\\x03\\x02\" +\n\t\"\\x0d$\\x03\\x02\\x0d'\\x03\\x02\\x0d%\\x03\\x02\\x0d;\\x03\\x02\\x0d=\\x03\\x02\\x0d?\" +\n\t\"\\x03\\x099.\\x03\\x08\\x0b7\\x03\\x08\\x02\\x14\\x03\\x08\\x14\\x0d\\x03\\x08.:\\x03\" +\n\t\"\\x089'\\x03\\x0f\\x0b\\x18\\x03\\x0f\\x1c1\\x03\\x0f\\x17&\\x03\\x0f9\\x1f\\x03\\x0f0\" +\n\t\"\\x0c\\x03\\x0e\\x0a9\\x03\\x0e\\x056\\x03\\x0e\\x1c#\\x03\\x0f\\x13\\x0e\\x03\\x072\\x00\" +\n\t\"\\x03\\x070\\x0d\\x03\\x072\\x0b\\x03\\x06\\x11\\x18\\x03\\x070\\x10\\x03\\x06\\x0f(\\x03\" +\n\t\"\\x072\\x05\\x03\\x06\\x0f,\\x03\\x073\\x15\\x03\\x06\\x07\\x08\\x03\\x05\\x16\\x02\\x03\" +\n\t\"\\x04\\x0b \\x03\\x05:8\\x03\\x05\\x16%\\x03\\x0a\\x0d\\x1f\\x03\\x06\\x16\\x10\\x03\\x05\" +\n\t\"\\x1d5\\x03\\x05*;\\x03\\x05\\x16\\x1b\\x03\\x04.-\\x03\\x06\\x1a\\x19\\x03\\x04\\x03,\" +\n\t\"\\x03\\x0b87\\x03\\x04/\\x0a\\x03\\x06\\x00,\\x03\\x04-\\x01\\x03\\x04\\x1e-\\x03\\x06/(\" +\n\t\"\\x03\\x0a\\x0b5\\x03\\x06\\x0e7\\x03\\x06\\x07.\\x03\\x0597\\x03\\x0a*%\\x03\\x0760\" +\n\t\"\\x03\\x06\\x0c;\\x03\\x05'\\x00\\x03\\x072.\\x03\\x072\\x08\\x03\\x06=\\x01\\x03\\x06\" +\n\t\"\\x05\\x1b\\x03\\x06\\x06\\x12\\x03\\x06$=\\x03\\x06'\\x0d\\x03\\x04\\x11\\x0f\\x03\\x076\" +\n\t\",\\x03\\x06\\x07;\\x03\\x06.,\\x03\\x86\\xf9\\xea\\x03\\x8f\\xff\\xeb\\x02\\x092\\x02\" +\n\t\"\\x095\\x02\\x094\\x02\\x09;\\x02\\x09>\\x02\\x098\\x02\\x09*\\x02\\x09/\\x02\\x09,\\x02\" +\n\t\"\\x09%\\x02\\x09&\\x02\\x09#\\x02\\x09 \\x02\\x08!\\x02\\x08%\\x02\\x08$\\x02\\x08+\\x02\" +\n\t\"\\x08.\\x02\\x08*\\x02\\x08&\\x02\\x088\\x02\\x08>\\x02\\x084\\x02\\x086\\x02\\x080\\x02\" +\n\t\"\\x08\\x10\\x02\\x08\\x17\\x02\\x08\\x12\\x02\\x08\\x1d\\x02\\x08\\x1f\\x02\\x08\\x13\\x02\" +\n\t\"\\x08\\x15\\x02\\x08\\x14\\x02\\x08\\x0c\\x03\\x8b\\xfd\\xd0\\x03\\x81\\xec\\xc6\\x03\\x87\" +\n\t\"\\xe0\\x8a\\x03-2\\xe3\\x03\\x80\\xef\\xe4\\x03-2\\xea\\x03\\x88\\xe6\\xeb\\x03\\x8e\\xe6\" +\n\t\"\\xe8\\x03\\x84\\xe6\\xe9\\x03\\x97\\xe6\\xee\\x03-2\\xf9\\x03-2\\xf6\\x03\\x8e\\xe3\\xad\" +\n\t\"\\x03\\x80\\xe3\\x92\\x03\\x88\\xe3\\x90\\x03\\x8e\\xe3\\x90\\x03\\x80\\xe3\\x97\\x03\\x88\" +\n\t\"\\xe3\\x95\\x03\\x88\\xfe\\xcb\\x03\\x8e\\xfe\\xca\\x03\\x84\\xfe\\xcd\\x03\\x91\\xef\\xc9\" +\n\t\"\\x03-2\\xc1\\x03-2\\xc0\\x03-2\\xcb\\x03\\x88@\\x09\\x03\\x8e@\\x08\\x03\\x8f\\xe0\\xf5\" +\n\t\"\\x03\\x8e\\xe6\\xf9\\x03\\x8e\\xe0\\xfa\\x03\\x93\\xff\\xf4\\x03\\x84\\xee\\xd3\\x03\\x0b\" +\n\t\"(\\x04\\x023 \\x021;\\x02\\x01*\\x03\\x0b#\\x10\\x03\\x0b 0\\x03\\x0b!\\x10\\x03\\x0b!0\" +\n\t\"\\x03\\x07\\x15\\x08\\x03\\x09?5\\x03\\x07\\x1f\\x08\\x03\\x07\\x17\\x0b\\x03\\x09\\x1f\" +\n\t\"\\x15\\x03\\x0b\\x1c7\\x03\\x0a+#\\x03\\x06\\x1a\\x1b\\x03\\x06\\x1a\\x14\\x03\\x0a\\x01\" +\n\t\"\\x18\\x03\\x06#\\x1b\\x03\\x0a2\\x0c\\x03\\x0a\\x01\\x04\\x03\\x09#;\\x03\\x08='\\x03\" +\n\t\"\\x08\\x1a\\x0a\\x03\\x07</\\x03\\x07:+\\x03\\x07\\x07*\\x03\\x06&\\x1c\\x03\\x09\\x0c\" +\n\t\"\\x16\\x03\\x09\\x10\\x0e\\x03\\x08'\\x0f\\x03\\x08+\\x09\\x03\\x074%\\x03\\x06!3\\x03\" +\n\t\"\\x06\\x03+\\x03\\x0b\\x1e\\x19\\x03\\x0a))\\x03\\x09\\x08\\x19\\x03\\x08,\\x05\\x03\\x07\" +\n\t\"<2\\x03\\x06\\x1c>\\x03\\x0a\\x111\\x03\\x09\\x1b\\x09\\x03\\x073.\\x03\\x07\\x01\\x00\" +\n\t\"\\x03\\x09/,\\x03\\x07#>\\x03\\x07\\x048\\x03\\x0a\\x1f\\x22\\x03\\x098>\\x03\\x09\\x11\" +\n\t\"\\x00\\x03\\x08/\\x17\\x03\\x06'\\x22\\x03\\x0b\\x1a+\\x03\\x0a\\x22\\x19\\x03\\x0a/1\" +\n\t\"\\x03\\x0974\\x03\\x09\\x0f\\x22\\x03\\x08,\\x22\\x03\\x08?\\x14\\x03\\x07$5\\x03\\x07<3\" +\n\t\"\\x03\\x07=*\\x03\\x07\\x13\\x18\\x03\\x068\\x0a\\x03\\x06\\x09\\x16\\x03\\x06\\x13\\x00\" +\n\t\"\\x03\\x08\\x067\\x03\\x08\\x01\\x03\\x03\\x08\\x12\\x1d\\x03\\x07+7\\x03\\x06(;\\x03\" +\n\t\"\\x06\\x1c?\\x03\\x07\\x0e\\x17\\x03\\x0a\\x06\\x1d\\x03\\x0a\\x19\\x07\\x03\\x08\\x14$\" +\n\t\"\\x03\\x07$;\\x03\\x08,$\\x03\\x08\\x06\\x0d\\x03\\x07\\x16\\x0a\\x03\\x06>>\\x03\\x0a\" +\n\t\"\\x06\\x12\\x03\\x0a\\x14)\\x03\\x09\\x0d\\x1f\\x03\\x09\\x12\\x17\\x03\\x09\\x19\\x01\" +\n\t\"\\x03\\x08\\x11 \\x03\\x08\\x1d'\\x03\\x06<\\x1a\\x03\\x0a.\\x00\\x03\\x07'\\x18\\x03\" +\n\t\"\\x0a\\x22\\x08\\x03\\x08\\x0d\\x0a\\x03\\x08\\x13)\\x03\\x07*)\\x03\\x06<,\\x03\\x07\" +\n\t\"\\x0b\\x1a\\x03\\x09.\\x14\\x03\\x09\\x0d\\x1e\\x03\\x07\\x0e#\\x03\\x0b\\x1d'\\x03\\x0a\" +\n\t\"\\x0a8\\x03\\x09%2\\x03\\x08+&\\x03\\x080\\x12\\x03\\x0a)4\\x03\\x08\\x06\\x1f\\x03\\x0b\" +\n\t\"\\x1b\\x1a\\x03\\x0a\\x1b\\x0f\\x03\\x0b\\x1d*\\x03\\x09\\x16$\\x03\\x090\\x11\\x03\\x08\" +\n\t\"\\x11\\x08\\x03\\x0a*(\\x03\\x0a\\x042\\x03\\x089,\\x03\\x074'\\x03\\x07\\x0f\\x05\\x03\" +\n\t\"\\x09\\x0b\\x0a\\x03\\x07\\x1b\\x01\\x03\\x09\\x17:\\x03\\x09.\\x0d\\x03\\x07.\\x11\\x03\" +\n\t\"\\x09+\\x15\\x03\\x080\\x13\\x03\\x0b\\x1f\\x19\\x03\\x0a \\x11\\x03\\x0a\\x220\\x03\\x09\" +\n\t\"\\x07;\\x03\\x08\\x16\\x1c\\x03\\x07,\\x13\\x03\\x07\\x0e/\\x03\\x06\\x221\\x03\\x0a.\" +\n\t\"\\x0a\\x03\\x0a7\\x02\\x03\\x0a\\x032\\x03\\x0a\\x1d.\\x03\\x091\\x06\\x03\\x09\\x19:\" +\n\t\"\\x03\\x08\\x02/\\x03\\x060+\\x03\\x06\\x0f-\\x03\\x06\\x1c\\x1f\\x03\\x06\\x1d\\x07\\x03\" +\n\t\"\\x0a,\\x11\\x03\\x09=\\x0d\\x03\\x09\\x0b;\\x03\\x07\\x1b/\\x03\\x0a\\x1f:\\x03\\x09 \" +\n\t\"\\x1f\\x03\\x09.\\x10\\x03\\x094\\x0b\\x03\\x09\\x1a1\\x03\\x08#\\x1a\\x03\\x084\\x1d\" +\n\t\"\\x03\\x08\\x01\\x1f\\x03\\x08\\x11\\x22\\x03\\x07'8\\x03\\x07\\x1a>\\x03\\x0757\\x03\" +\n\t\"\\x06&9\\x03\\x06+\\x11\\x03\\x0a.\\x0b\\x03\\x0a,>\\x03\\x0a4#\\x03\\x08%\\x17\\x03\" +\n\t\"\\x07\\x05\\x22\\x03\\x07\\x0c\\x0b\\x03\\x0a\\x1d+\\x03\\x0a\\x19\\x16\\x03\\x09+\\x1f\" +\n\t\"\\x03\\x09\\x08\\x0b\\x03\\x08\\x16\\x18\\x03\\x08+\\x12\\x03\\x0b\\x1d\\x0c\\x03\\x0a=\" +\n\t\"\\x10\\x03\\x0a\\x09\\x0d\\x03\\x0a\\x10\\x11\\x03\\x09&0\\x03\\x08(\\x1f\\x03\\x087\\x07\" +\n\t\"\\x03\\x08\\x185\\x03\\x07'6\\x03\\x06.\\x05\\x03\\x06=\\x04\\x03\\x06;;\\x03\\x06\\x06,\" +\n\t\"\\x03\\x0b\\x18>\\x03\\x08\\x00\\x18\\x03\\x06 \\x03\\x03\\x06<\\x00\\x03\\x09%\\x18\\x03\" +\n\t\"\\x0b\\x1c<\\x03\\x0a%!\\x03\\x0a\\x09\\x12\\x03\\x0a\\x16\\x02\\x03\\x090'\\x03\\x09\" +\n\t\"\\x0e=\\x03\\x08 \\x0e\\x03\\x08>\\x03\\x03\\x074>\\x03\\x06&?\\x03\\x06\\x19\\x09\\x03\" +\n\t\"\\x06?(\\x03\\x0a-\\x0e\\x03\\x09:3\\x03\\x098:\\x03\\x09\\x12\\x0b\\x03\\x09\\x1d\\x17\" +\n\t\"\\x03\\x087\\x05\\x03\\x082\\x14\\x03\\x08\\x06%\\x03\\x08\\x13\\x1f\\x03\\x06\\x06\\x0e\" +\n\t\"\\x03\\x0a\\x22<\\x03\\x09/<\\x03\\x06>+\\x03\\x0a'?\\x03\\x0a\\x13\\x0c\\x03\\x09\\x10<\" +\n\t\"\\x03\\x07\\x1b=\\x03\\x0a\\x19\\x13\\x03\\x09\\x22\\x1d\\x03\\x09\\x07\\x0d\\x03\\x08)\" +\n\t\"\\x1c\\x03\\x06=\\x1a\\x03\\x0a/4\\x03\\x0a7\\x11\\x03\\x0a\\x16:\\x03\\x09?3\\x03\\x09:\" +\n\t\"/\\x03\\x09\\x05\\x0a\\x03\\x09\\x14\\x06\\x03\\x087\\x22\\x03\\x080\\x07\\x03\\x08\\x1a\" +\n\t\"\\x1f\\x03\\x07\\x04(\\x03\\x07\\x04\\x09\\x03\\x06 %\\x03\\x06<\\x08\\x03\\x0a+\\x14\" +\n\t\"\\x03\\x09\\x1d\\x16\\x03\\x0a70\\x03\\x08 >\\x03\\x0857\\x03\\x070\\x0a\\x03\\x06=\\x12\" +\n\t\"\\x03\\x06\\x16%\\x03\\x06\\x1d,\\x03\\x099#\\x03\\x09\\x10>\\x03\\x07 \\x1e\\x03\\x08\" +\n\t\"\\x0c<\\x03\\x08\\x0b\\x18\\x03\\x08\\x15+\\x03\\x08,:\\x03\\x08%\\x22\\x03\\x07\\x0a$\" +\n\t\"\\x03\\x0b\\x1c=\\x03\\x07+\\x08\\x03\\x0a/\\x05\\x03\\x0a \\x07\\x03\\x0a\\x12'\\x03\" +\n\t\"\\x09#\\x11\\x03\\x08\\x1b\\x15\\x03\\x0a\\x06\\x01\\x03\\x09\\x1c\\x1b\\x03\\x0922\\x03\" +\n\t\"\\x07\\x14<\\x03\\x07\\x09\\x04\\x03\\x061\\x04\\x03\\x07\\x0e\\x01\\x03\\x0a\\x13\\x18\" +\n\t\"\\x03\\x0a-\\x0c\\x03\\x0a?\\x0d\\x03\\x0a\\x09\\x0a\\x03\\x091&\\x03\\x0a/\\x0b\\x03\" +\n\t\"\\x08$<\\x03\\x083\\x1d\\x03\\x08\\x0c$\\x03\\x08\\x0d\\x07\\x03\\x08\\x0d?\\x03\\x08\" +\n\t\"\\x0e\\x14\\x03\\x065\\x0a\\x03\\x08\\x1a#\\x03\\x08\\x16#\\x03\\x0702\\x03\\x07\\x03\" +\n\t\"\\x1a\\x03\\x06(\\x1d\\x03\\x06+\\x1b\\x03\\x06\\x0b\\x05\\x03\\x06\\x0b\\x17\\x03\\x06\" +\n\t\"\\x0c\\x04\\x03\\x06\\x1e\\x19\\x03\\x06+0\\x03\\x062\\x18\\x03\\x0b\\x16\\x1e\\x03\\x0a+\" +\n\t\"\\x16\\x03\\x0a-?\\x03\\x0a#:\\x03\\x0a#\\x10\\x03\\x0a%$\\x03\\x0a>+\\x03\\x0a01\\x03\" +\n\t\"\\x0a1\\x10\\x03\\x0a\\x099\\x03\\x0a\\x0a\\x12\\x03\\x0a\\x19\\x1f\\x03\\x0a\\x19\\x12\" +\n\t\"\\x03\\x09*)\\x03\\x09-\\x16\\x03\\x09.1\\x03\\x09.2\\x03\\x09<\\x0e\\x03\\x09> \\x03\" +\n\t\"\\x093\\x12\\x03\\x09\\x0b\\x01\\x03\\x09\\x1c2\\x03\\x09\\x11\\x1c\\x03\\x09\\x15%\\x03\" +\n\t\"\\x08,&\\x03\\x08!\\x22\\x03\\x089(\\x03\\x08\\x0b\\x1a\\x03\\x08\\x0d2\\x03\\x08\\x0c\" +\n\t\"\\x04\\x03\\x08\\x0c\\x06\\x03\\x08\\x0c\\x1f\\x03\\x08\\x0c\\x0c\\x03\\x08\\x0f\\x1f\\x03\" +\n\t\"\\x08\\x0f\\x1d\\x03\\x08\\x00\\x14\\x03\\x08\\x03\\x14\\x03\\x08\\x06\\x16\\x03\\x08\\x1e\" +\n\t\"#\\x03\\x08\\x11\\x11\\x03\\x08\\x10\\x18\\x03\\x08\\x14(\\x03\\x07)\\x1e\\x03\\x07.1\" +\n\t\"\\x03\\x07 $\\x03\\x07 '\\x03\\x078\\x08\\x03\\x07\\x0d0\\x03\\x07\\x0f7\\x03\\x07\\x05#\" +\n\t\"\\x03\\x07\\x05\\x1a\\x03\\x07\\x1a7\\x03\\x07\\x1d-\\x03\\x07\\x17\\x10\\x03\\x06)\\x1f\" +\n\t\"\\x03\\x062\\x0b\\x03\\x066\\x16\\x03\\x06\\x09\\x11\\x03\\x09(\\x1e\\x03\\x07!5\\x03\" +\n\t\"\\x0b\\x11\\x16\\x03\\x0a/\\x04\\x03\\x0a,\\x1a\\x03\\x0b\\x173\\x03\\x0a,1\\x03\\x0a/5\" +\n\t\"\\x03\\x0a\\x221\\x03\\x0a\\x22\\x0d\\x03\\x0a?%\\x03\\x0a<,\\x03\\x0a?#\\x03\\x0a>\\x19\" +\n\t\"\\x03\\x0a\\x08&\\x03\\x0a\\x0b\\x0e\\x03\\x0a\\x0c:\\x03\\x0a\\x0c+\\x03\\x0a\\x03\\x22\" +\n\t\"\\x03\\x0a\\x06)\\x03\\x0a\\x11\\x10\\x03\\x0a\\x11\\x1a\\x03\\x0a\\x17-\\x03\\x0a\\x14(\" +\n\t\"\\x03\\x09)\\x1e\\x03\\x09/\\x09\\x03\\x09.\\x00\\x03\\x09,\\x07\\x03\\x09/*\\x03\\x09-9\" +\n\t\"\\x03\\x09\\x228\\x03\\x09%\\x09\\x03\\x09:\\x12\\x03\\x09;\\x1d\\x03\\x09?\\x06\\x03\" +\n\t\"\\x093%\\x03\\x096\\x05\\x03\\x096\\x08\\x03\\x097\\x02\\x03\\x09\\x07,\\x03\\x09\\x04,\" +\n\t\"\\x03\\x09\\x1f\\x16\\x03\\x09\\x11\\x03\\x03\\x09\\x11\\x12\\x03\\x09\\x168\\x03\\x08*\" +\n\t\"\\x05\\x03\\x08/2\\x03\\x084:\\x03\\x08\\x22+\\x03\\x08 0\\x03\\x08&\\x0a\\x03\\x08;\" +\n\t\"\\x10\\x03\\x08>$\\x03\\x08>\\x18\\x03\\x0829\\x03\\x082:\\x03\\x081,\\x03\\x081<\\x03\" +\n\t\"\\x081\\x1c\\x03\\x087#\\x03\\x087*\\x03\\x08\\x09'\\x03\\x08\\x00\\x1d\\x03\\x08\\x05-\" +\n\t\"\\x03\\x08\\x1f4\\x03\\x08\\x1d\\x04\\x03\\x08\\x16\\x0f\\x03\\x07*7\\x03\\x07'!\\x03\" +\n\t\"\\x07%\\x1b\\x03\\x077\\x0c\\x03\\x07\\x0c1\\x03\\x07\\x0c.\\x03\\x07\\x00\\x06\\x03\\x07\" +\n\t\"\\x01\\x02\\x03\\x07\\x010\\x03\\x07\\x06=\\x03\\x07\\x01\\x03\\x03\\x07\\x01\\x13\\x03\" +\n\t\"\\x07\\x06\\x06\\x03\\x07\\x05\\x0a\\x03\\x07\\x1f\\x09\\x03\\x07\\x17:\\x03\\x06*1\\x03\" +\n\t\"\\x06-\\x1d\\x03\\x06\\x223\\x03\\x062:\\x03\\x060$\\x03\\x066\\x1e\\x03\\x064\\x12\\x03\" +\n\t\"\\x0645\\x03\\x06\\x0b\\x00\\x03\\x06\\x0b7\\x03\\x06\\x07\\x1f\\x03\\x06\\x15\\x12\\x03\" +\n\t\"\\x0c\\x05\\x0f\\x03\\x0b+\\x0b\\x03\\x0b+-\\x03\\x06\\x16\\x1b\\x03\\x06\\x15\\x17\\x03\" +\n\t\"\\x89\\xca\\xea\\x03\\x89\\xca\\xe8\\x03\\x0c8\\x10\\x03\\x0c8\\x01\\x03\\x0c8\\x0f\\x03\" +\n\t\"\\x0d8%\\x03\\x0d8!\\x03\\x0c8-\\x03\\x0c8/\\x03\\x0c8+\\x03\\x0c87\\x03\\x0c85\\x03\" +\n\t\"\\x0c9\\x09\\x03\\x0c9\\x0d\\x03\\x0c9\\x0f\\x03\\x0c9\\x0b\\x03\\xcfu\\x0c\\x03\\xcfu\" +\n\t\"\\x0f\\x03\\xcfu\\x0e\\x03\\xcfu\\x09\\x03\\x0c9\\x10\\x03\\x0d9\\x0c\\x03\\xcf`;\\x03\" +\n\t\"\\xcf`>\\x03\\xcf`9\\x03\\xcf`8\\x03\\xcf`7\\x03\\xcf`*\\x03\\xcf`-\\x03\\xcf`,\\x03\" +\n\t\"\\x0d\\x1b\\x1a\\x03\\x0d\\x1b&\\x03\\x0c=.\\x03\\x0c=%\\x03\\x0c>\\x1e\\x03\\x0c>\\x14\" +\n\t\"\\x03\\x0c?\\x06\\x03\\x0c?\\x0b\\x03\\x0c?\\x0c\\x03\\x0c?\\x0d\\x03\\x0c?\\x02\\x03\" +\n\t\"\\x0c>\\x0f\\x03\\x0c>\\x08\\x03\\x0c>\\x09\\x03\\x0c>,\\x03\\x0c>\\x0c\\x03\\x0c?\\x13\" +\n\t\"\\x03\\x0c?\\x16\\x03\\x0c?\\x15\\x03\\x0c?\\x1c\\x03\\x0c?\\x1f\\x03\\x0c?\\x1d\\x03\" +\n\t\"\\x0c?\\x1a\\x03\\x0c?\\x17\\x03\\x0c?\\x08\\x03\\x0c?\\x09\\x03\\x0c?\\x0e\\x03\\x0c?\" +\n\t\"\\x04\\x03\\x0c?\\x05\\x03\\x0c<?\\x03\\x0c=\\x00\\x03\\x0c=\\x06\\x03\\x0c=\\x05\\x03\" +\n\t\"\\x0c=\\x0c\\x03\\x0c=\\x0f\\x03\\x0c=\\x0d\\x03\\x0c=\\x0b\\x03\\x0c=\\x07\\x03\\x0c=\" +\n\t\"\\x19\\x03\\x0c=\\x15\\x03\\x0c=\\x11\\x03\\x0c=1\\x03\\x0c=3\\x03\\x0c=0\\x03\\x0c=>\" +\n\t\"\\x03\\x0c=2\\x03\\x0c=6\\x03\\x0c<\\x07\\x03\\x0c<\\x05\\x03\\x0e:!\\x03\\x0e:#\\x03\" +\n\t\"\\x0e8\\x09\\x03\\x0e:&\\x03\\x0e8\\x0b\\x03\\x0e:$\\x03\\x0e:,\\x03\\x0e8\\x1a\\x03\" +\n\t\"\\x0e8\\x1e\\x03\\x0e:*\\x03\\x0e:7\\x03\\x0e:5\\x03\\x0e:;\\x03\\x0e:\\x15\\x03\\x0e:<\" +\n\t\"\\x03\\x0e:4\\x03\\x0e:'\\x03\\x0e:-\\x03\\x0e:%\\x03\\x0e:?\\x03\\x0e:=\\x03\\x0e:)\" +\n\t\"\\x03\\x0e:/\\x03\\xcfs'\\x03\\x0d=\\x0f\\x03\\x0d+*\\x03\\x0d99\\x03\\x0d9;\\x03\\x0d9\" +\n\t\"?\\x03\\x0d)\\x0d\\x03\\x0d(%\\x02\\x01\\x18\\x02\\x01(\\x02\\x01\\x1e\\x03\\x0f$!\\x03\" +\n\t\"\\x0f87\\x03\\x0f4\\x0e\\x03\\x0f5\\x1d\\x03\\x06'\\x03\\x03\\x0f\\x08\\x18\\x03\\x0f\" +\n\t\"\\x0d\\x1b\\x03\\x0e2=\\x03\\x0e;\\x08\\x03\\x0e:\\x0b\\x03\\x0e\\x06$\\x03\\x0e\\x0d)\" +\n\t\"\\x03\\x0e\\x16\\x1f\\x03\\x0e\\x16\\x1b\\x03\\x0d$\\x0a\\x03\\x05,\\x1d\\x03\\x0d. \\x03\" +\n\t\"\\x0d.#\\x03\\x0c(/\\x03\\x09%\\x02\\x03\\x0d90\\x03\\x0d\\x0e4\\x03\\x0d\\x0d\\x0f\\x03\" +\n\t\"\\x0c#\\x00\\x03\\x0c,\\x1e\\x03\\x0c2\\x0e\\x03\\x0c\\x01\\x17\\x03\\x0c\\x09:\\x03\\x0e\" +\n\t\"\\x173\\x03\\x0c\\x08\\x03\\x03\\x0c\\x11\\x07\\x03\\x0c\\x10\\x18\\x03\\x0c\\x1f\\x1c\" +\n\t\"\\x03\\x0c\\x19\\x0e\\x03\\x0c\\x1a\\x1f\\x03\\x0f0>\\x03\\x0b->\\x03\\x0b<+\\x03\\x0b8\" +\n\t\"\\x13\\x03\\x0b\\x043\\x03\\x0b\\x14\\x03\\x03\\x0b\\x16%\\x03\\x0d\\x22&\\x03\\x0b\\x1a\" +\n\t\"\\x1a\\x03\\x0b\\x1a\\x04\\x03\\x0a%9\\x03\\x0a&2\\x03\\x0a&0\\x03\\x0a!\\x1a\\x03\\x0a!\" +\n\t\"7\\x03\\x0a5\\x10\\x03\\x0a=4\\x03\\x0a?\\x0e\\x03\\x0a>\\x10\\x03\\x0a\\x00 \\x03\\x0a\" +\n\t\"\\x0f:\\x03\\x0a\\x0f9\\x03\\x0a\\x0b\\x0a\\x03\\x0a\\x17%\\x03\\x0a\\x1b-\\x03\\x09-\" +\n\t\"\\x1a\\x03\\x09,4\\x03\\x09.,\\x03\\x09)\\x09\\x03\\x096!\\x03\\x091\\x1f\\x03\\x093\" +\n\t\"\\x16\\x03\\x0c+\\x1f\\x03\\x098 \\x03\\x098=\\x03\\x0c(\\x1a\\x03\\x0c(\\x16\\x03\\x09\" +\n\t\"\\x0a+\\x03\\x09\\x16\\x12\\x03\\x09\\x13\\x0e\\x03\\x09\\x153\\x03\\x08)!\\x03\\x09\\x1a\" +\n\t\"\\x01\\x03\\x09\\x18\\x01\\x03\\x08%#\\x03\\x08>\\x22\\x03\\x08\\x05%\\x03\\x08\\x02*\" +\n\t\"\\x03\\x08\\x15;\\x03\\x08\\x1b7\\x03\\x0f\\x07\\x1d\\x03\\x0f\\x04\\x03\\x03\\x070\\x0c\" +\n\t\"\\x03\\x07;\\x0b\\x03\\x07\\x08\\x17\\x03\\x07\\x12\\x06\\x03\\x06/-\\x03\\x0671\\x03\" +\n\t\"\\x065+\\x03\\x06>7\\x03\\x06\\x049\\x03\\x05+\\x1e\\x03\\x05,\\x17\\x03\\x05 \\x1d\\x03\" +\n\t\"\\x05\\x22\\x05\\x03\\x050\\x1d\"\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *idnaTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn idnaValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := idnaIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = idnaIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = idnaIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *idnaTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn idnaValues[c0]\n\t}\n\ti := idnaIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = idnaIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// idnaTrie. Total size: 28600 bytes (27.93 KiB). Checksum: 95575047b5d8fff.\ntype idnaTrie struct{}\n\nfunc newIdnaTrie(i int) *idnaTrie {\n\treturn &idnaTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *idnaTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 124:\n\t\treturn uint16(idnaValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 124\n\t\treturn uint16(idnaSparse.lookup(n, b))\n\t}\n}\n\n// idnaValues: 126 blocks, 8064 entries, 16128 bytes\n// The third block is the zero block.\nvar idnaValues = [8064]uint16{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080,\n\t0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080,\n\t0x0c: 0x0080, 0x0d: 0x0080, 0x0e: 0x0080, 0x0f: 0x0080, 0x10: 0x0080, 0x11: 0x0080,\n\t0x12: 0x0080, 0x13: 0x0080, 0x14: 0x0080, 0x15: 0x0080, 0x16: 0x0080, 0x17: 0x0080,\n\t0x18: 0x0080, 0x19: 0x0080, 0x1a: 0x0080, 0x1b: 0x0080, 0x1c: 0x0080, 0x1d: 0x0080,\n\t0x1e: 0x0080, 0x1f: 0x0080, 0x20: 0x0080, 0x21: 0x0080, 0x22: 0x0080, 0x23: 0x0080,\n\t0x24: 0x0080, 0x25: 0x0080, 0x26: 0x0080, 0x27: 0x0080, 0x28: 0x0080, 0x29: 0x0080,\n\t0x2a: 0x0080, 0x2b: 0x0080, 0x2c: 0x0080, 0x2d: 0x0008, 0x2e: 0x0008, 0x2f: 0x0080,\n\t0x30: 0x0008, 0x31: 0x0008, 0x32: 0x0008, 0x33: 0x0008, 0x34: 0x0008, 0x35: 0x0008,\n\t0x36: 0x0008, 0x37: 0x0008, 0x38: 0x0008, 0x39: 0x0008, 0x3a: 0x0080, 0x3b: 0x0080,\n\t0x3c: 0x0080, 0x3d: 0x0080, 0x3e: 0x0080, 0x3f: 0x0080,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x0080, 0x41: 0xe105, 0x42: 0xe105, 0x43: 0xe105, 0x44: 0xe105, 0x45: 0xe105,\n\t0x46: 0xe105, 0x47: 0xe105, 0x48: 0xe105, 0x49: 0xe105, 0x4a: 0xe105, 0x4b: 0xe105,\n\t0x4c: 0xe105, 0x4d: 0xe105, 0x4e: 0xe105, 0x4f: 0xe105, 0x50: 0xe105, 0x51: 0xe105,\n\t0x52: 0xe105, 0x53: 0xe105, 0x54: 0xe105, 0x55: 0xe105, 0x56: 0xe105, 0x57: 0xe105,\n\t0x58: 0xe105, 0x59: 0xe105, 0x5a: 0xe105, 0x5b: 0x0080, 0x5c: 0x0080, 0x5d: 0x0080,\n\t0x5e: 0x0080, 0x5f: 0x0080, 0x60: 0x0080, 0x61: 0x0008, 0x62: 0x0008, 0x63: 0x0008,\n\t0x64: 0x0008, 0x65: 0x0008, 0x66: 0x0008, 0x67: 0x0008, 0x68: 0x0008, 0x69: 0x0008,\n\t0x6a: 0x0008, 0x6b: 0x0008, 0x6c: 0x0008, 0x6d: 0x0008, 0x6e: 0x0008, 0x6f: 0x0008,\n\t0x70: 0x0008, 0x71: 0x0008, 0x72: 0x0008, 0x73: 0x0008, 0x74: 0x0008, 0x75: 0x0008,\n\t0x76: 0x0008, 0x77: 0x0008, 0x78: 0x0008, 0x79: 0x0008, 0x7a: 0x0008, 0x7b: 0x0080,\n\t0x7c: 0x0080, 0x7d: 0x0080, 0x7e: 0x0080, 0x7f: 0x0080,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040,\n\t0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040,\n\t0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040,\n\t0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040,\n\t0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040,\n\t0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x000a, 0xe1: 0x0018, 0xe2: 0x0018, 0xe3: 0x0018,\n\t0xe4: 0x0018, 0xe5: 0x0018, 0xe6: 0x0018, 0xe7: 0x0018, 0xe8: 0x001a, 0xe9: 0x0018,\n\t0xea: 0x0039, 0xeb: 0x0018, 0xec: 0x0018, 0xed: 0x03c0, 0xee: 0x0018, 0xef: 0x004a,\n\t0xf0: 0x0018, 0xf1: 0x0018, 0xf2: 0x0069, 0xf3: 0x0079, 0xf4: 0x008a, 0xf5: 0x0005,\n\t0xf6: 0x0018, 0xf7: 0x0008, 0xf8: 0x00aa, 0xf9: 0x00c9, 0xfa: 0x00d9, 0xfb: 0x0018,\n\t0xfc: 0x00e9, 0xfd: 0x0119, 0xfe: 0x0149, 0xff: 0x0018,\n\t// Block 0x4, offset 0x100\n\t0x100: 0xe00d, 0x101: 0x0008, 0x102: 0xe00d, 0x103: 0x0008, 0x104: 0xe00d, 0x105: 0x0008,\n\t0x106: 0xe00d, 0x107: 0x0008, 0x108: 0xe00d, 0x109: 0x0008, 0x10a: 0xe00d, 0x10b: 0x0008,\n\t0x10c: 0xe00d, 0x10d: 0x0008, 0x10e: 0xe00d, 0x10f: 0x0008, 0x110: 0xe00d, 0x111: 0x0008,\n\t0x112: 0xe00d, 0x113: 0x0008, 0x114: 0xe00d, 0x115: 0x0008, 0x116: 0xe00d, 0x117: 0x0008,\n\t0x118: 0xe00d, 0x119: 0x0008, 0x11a: 0xe00d, 0x11b: 0x0008, 0x11c: 0xe00d, 0x11d: 0x0008,\n\t0x11e: 0xe00d, 0x11f: 0x0008, 0x120: 0xe00d, 0x121: 0x0008, 0x122: 0xe00d, 0x123: 0x0008,\n\t0x124: 0xe00d, 0x125: 0x0008, 0x126: 0xe00d, 0x127: 0x0008, 0x128: 0xe00d, 0x129: 0x0008,\n\t0x12a: 0xe00d, 0x12b: 0x0008, 0x12c: 0xe00d, 0x12d: 0x0008, 0x12e: 0xe00d, 0x12f: 0x0008,\n\t0x130: 0x0179, 0x131: 0x0008, 0x132: 0x0035, 0x133: 0x004d, 0x134: 0xe00d, 0x135: 0x0008,\n\t0x136: 0xe00d, 0x137: 0x0008, 0x138: 0x0008, 0x139: 0xe01d, 0x13a: 0x0008, 0x13b: 0xe03d,\n\t0x13c: 0x0008, 0x13d: 0xe01d, 0x13e: 0x0008, 0x13f: 0x0199,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x0199, 0x141: 0xe01d, 0x142: 0x0008, 0x143: 0xe03d, 0x144: 0x0008, 0x145: 0xe01d,\n\t0x146: 0x0008, 0x147: 0xe07d, 0x148: 0x0008, 0x149: 0x01b9, 0x14a: 0xe00d, 0x14b: 0x0008,\n\t0x14c: 0xe00d, 0x14d: 0x0008, 0x14e: 0xe00d, 0x14f: 0x0008, 0x150: 0xe00d, 0x151: 0x0008,\n\t0x152: 0xe00d, 0x153: 0x0008, 0x154: 0xe00d, 0x155: 0x0008, 0x156: 0xe00d, 0x157: 0x0008,\n\t0x158: 0xe00d, 0x159: 0x0008, 0x15a: 0xe00d, 0x15b: 0x0008, 0x15c: 0xe00d, 0x15d: 0x0008,\n\t0x15e: 0xe00d, 0x15f: 0x0008, 0x160: 0xe00d, 0x161: 0x0008, 0x162: 0xe00d, 0x163: 0x0008,\n\t0x164: 0xe00d, 0x165: 0x0008, 0x166: 0xe00d, 0x167: 0x0008, 0x168: 0xe00d, 0x169: 0x0008,\n\t0x16a: 0xe00d, 0x16b: 0x0008, 0x16c: 0xe00d, 0x16d: 0x0008, 0x16e: 0xe00d, 0x16f: 0x0008,\n\t0x170: 0xe00d, 0x171: 0x0008, 0x172: 0xe00d, 0x173: 0x0008, 0x174: 0xe00d, 0x175: 0x0008,\n\t0x176: 0xe00d, 0x177: 0x0008, 0x178: 0x0065, 0x179: 0xe01d, 0x17a: 0x0008, 0x17b: 0xe03d,\n\t0x17c: 0x0008, 0x17d: 0xe01d, 0x17e: 0x0008, 0x17f: 0x01d9,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x0008, 0x181: 0x007d, 0x182: 0xe00d, 0x183: 0x0008, 0x184: 0xe00d, 0x185: 0x0008,\n\t0x186: 0x007d, 0x187: 0xe07d, 0x188: 0x0008, 0x189: 0x0095, 0x18a: 0x00ad, 0x18b: 0xe03d,\n\t0x18c: 0x0008, 0x18d: 0x0008, 0x18e: 0x00c5, 0x18f: 0x00dd, 0x190: 0x00f5, 0x191: 0xe01d,\n\t0x192: 0x0008, 0x193: 0x010d, 0x194: 0x0125, 0x195: 0x0008, 0x196: 0x013d, 0x197: 0x013d,\n\t0x198: 0xe00d, 0x199: 0x0008, 0x19a: 0x0008, 0x19b: 0x0008, 0x19c: 0x010d, 0x19d: 0x0155,\n\t0x19e: 0x0008, 0x19f: 0x016d, 0x1a0: 0xe00d, 0x1a1: 0x0008, 0x1a2: 0xe00d, 0x1a3: 0x0008,\n\t0x1a4: 0xe00d, 0x1a5: 0x0008, 0x1a6: 0x0185, 0x1a7: 0xe07d, 0x1a8: 0x0008, 0x1a9: 0x019d,\n\t0x1aa: 0x0008, 0x1ab: 0x0008, 0x1ac: 0xe00d, 0x1ad: 0x0008, 0x1ae: 0x0185, 0x1af: 0xe0fd,\n\t0x1b0: 0x0008, 0x1b1: 0x01b5, 0x1b2: 0x01cd, 0x1b3: 0xe03d, 0x1b4: 0x0008, 0x1b5: 0xe01d,\n\t0x1b6: 0x0008, 0x1b7: 0x01e5, 0x1b8: 0xe00d, 0x1b9: 0x0008, 0x1ba: 0x0008, 0x1bb: 0x0008,\n\t0x1bc: 0xe00d, 0x1bd: 0x0008, 0x1be: 0x0008, 0x1bf: 0x0008,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x0008, 0x1c1: 0x0008, 0x1c2: 0x0008, 0x1c3: 0x0008, 0x1c4: 0x01e9, 0x1c5: 0x01e9,\n\t0x1c6: 0x01e9, 0x1c7: 0x01fd, 0x1c8: 0x0215, 0x1c9: 0x022d, 0x1ca: 0x0245, 0x1cb: 0x025d,\n\t0x1cc: 0x0275, 0x1cd: 0xe01d, 0x1ce: 0x0008, 0x1cf: 0xe0fd, 0x1d0: 0x0008, 0x1d1: 0xe01d,\n\t0x1d2: 0x0008, 0x1d3: 0xe03d, 0x1d4: 0x0008, 0x1d5: 0xe01d, 0x1d6: 0x0008, 0x1d7: 0xe07d,\n\t0x1d8: 0x0008, 0x1d9: 0xe01d, 0x1da: 0x0008, 0x1db: 0xe03d, 0x1dc: 0x0008, 0x1dd: 0x0008,\n\t0x1de: 0xe00d, 0x1df: 0x0008, 0x1e0: 0xe00d, 0x1e1: 0x0008, 0x1e2: 0xe00d, 0x1e3: 0x0008,\n\t0x1e4: 0xe00d, 0x1e5: 0x0008, 0x1e6: 0xe00d, 0x1e7: 0x0008, 0x1e8: 0xe00d, 0x1e9: 0x0008,\n\t0x1ea: 0xe00d, 0x1eb: 0x0008, 0x1ec: 0xe00d, 0x1ed: 0x0008, 0x1ee: 0xe00d, 0x1ef: 0x0008,\n\t0x1f0: 0x0008, 0x1f1: 0x028d, 0x1f2: 0x02a5, 0x1f3: 0x02bd, 0x1f4: 0xe00d, 0x1f5: 0x0008,\n\t0x1f6: 0x02d5, 0x1f7: 0x02ed, 0x1f8: 0xe00d, 0x1f9: 0x0008, 0x1fa: 0xe00d, 0x1fb: 0x0008,\n\t0x1fc: 0xe00d, 0x1fd: 0x0008, 0x1fe: 0xe00d, 0x1ff: 0x0008,\n\t// Block 0x8, offset 0x200\n\t0x200: 0xe00d, 0x201: 0x0008, 0x202: 0xe00d, 0x203: 0x0008, 0x204: 0xe00d, 0x205: 0x0008,\n\t0x206: 0xe00d, 0x207: 0x0008, 0x208: 0xe00d, 0x209: 0x0008, 0x20a: 0xe00d, 0x20b: 0x0008,\n\t0x20c: 0xe00d, 0x20d: 0x0008, 0x20e: 0xe00d, 0x20f: 0x0008, 0x210: 0xe00d, 0x211: 0x0008,\n\t0x212: 0xe00d, 0x213: 0x0008, 0x214: 0xe00d, 0x215: 0x0008, 0x216: 0xe00d, 0x217: 0x0008,\n\t0x218: 0xe00d, 0x219: 0x0008, 0x21a: 0xe00d, 0x21b: 0x0008, 0x21c: 0xe00d, 0x21d: 0x0008,\n\t0x21e: 0xe00d, 0x21f: 0x0008, 0x220: 0x0305, 0x221: 0x0008, 0x222: 0xe00d, 0x223: 0x0008,\n\t0x224: 0xe00d, 0x225: 0x0008, 0x226: 0xe00d, 0x227: 0x0008, 0x228: 0xe00d, 0x229: 0x0008,\n\t0x22a: 0xe00d, 0x22b: 0x0008, 0x22c: 0xe00d, 0x22d: 0x0008, 0x22e: 0xe00d, 0x22f: 0x0008,\n\t0x230: 0xe00d, 0x231: 0x0008, 0x232: 0xe00d, 0x233: 0x0008, 0x234: 0x0008, 0x235: 0x0008,\n\t0x236: 0x0008, 0x237: 0x0008, 0x238: 0x0008, 0x239: 0x0008, 0x23a: 0x0209, 0x23b: 0xe03d,\n\t0x23c: 0x0008, 0x23d: 0x031d, 0x23e: 0x0229, 0x23f: 0x0008,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x0008, 0x241: 0x0008, 0x242: 0x0018, 0x243: 0x0018, 0x244: 0x0018, 0x245: 0x0018,\n\t0x246: 0x0008, 0x247: 0x0008, 0x248: 0x0008, 0x249: 0x0008, 0x24a: 0x0008, 0x24b: 0x0008,\n\t0x24c: 0x0008, 0x24d: 0x0008, 0x24e: 0x0008, 0x24f: 0x0008, 0x250: 0x0008, 0x251: 0x0008,\n\t0x252: 0x0018, 0x253: 0x0018, 0x254: 0x0018, 0x255: 0x0018, 0x256: 0x0018, 0x257: 0x0018,\n\t0x258: 0x029a, 0x259: 0x02ba, 0x25a: 0x02da, 0x25b: 0x02fa, 0x25c: 0x031a, 0x25d: 0x033a,\n\t0x25e: 0x0018, 0x25f: 0x0018, 0x260: 0x03ad, 0x261: 0x0359, 0x262: 0x01d9, 0x263: 0x0369,\n\t0x264: 0x03c5, 0x265: 0x0018, 0x266: 0x0018, 0x267: 0x0018, 0x268: 0x0018, 0x269: 0x0018,\n\t0x26a: 0x0018, 0x26b: 0x0018, 0x26c: 0x0008, 0x26d: 0x0018, 0x26e: 0x0008, 0x26f: 0x0018,\n\t0x270: 0x0018, 0x271: 0x0018, 0x272: 0x0018, 0x273: 0x0018, 0x274: 0x0018, 0x275: 0x0018,\n\t0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018,\n\t0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d,\n\t0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308,\n\t0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308,\n\t0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308,\n\t0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308,\n\t0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308,\n\t0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308,\n\t0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308,\n\t0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008,\n\t0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008,\n\t0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x0040, 0x2c1: 0x0040, 0x2c2: 0x0040, 0x2c3: 0x0040, 0x2c4: 0x008a, 0x2c5: 0x03d2,\n\t0x2c6: 0xe155, 0x2c7: 0x0455, 0x2c8: 0xe12d, 0x2c9: 0xe13d, 0x2ca: 0xe12d, 0x2cb: 0x0040,\n\t0x2cc: 0x03dd, 0x2cd: 0x0040, 0x2ce: 0x046d, 0x2cf: 0x0485, 0x2d0: 0x0008, 0x2d1: 0xe105,\n\t0x2d2: 0xe105, 0x2d3: 0xe105, 0x2d4: 0xe105, 0x2d5: 0xe105, 0x2d6: 0xe105, 0x2d7: 0xe105,\n\t0x2d8: 0xe105, 0x2d9: 0xe105, 0x2da: 0xe105, 0x2db: 0xe105, 0x2dc: 0xe105, 0x2dd: 0xe105,\n\t0x2de: 0xe105, 0x2df: 0xe105, 0x2e0: 0x049d, 0x2e1: 0x049d, 0x2e2: 0x0040, 0x2e3: 0x049d,\n\t0x2e4: 0x049d, 0x2e5: 0x049d, 0x2e6: 0x049d, 0x2e7: 0x049d, 0x2e8: 0x049d, 0x2e9: 0x049d,\n\t0x2ea: 0x049d, 0x2eb: 0x049d, 0x2ec: 0x0008, 0x2ed: 0x0008, 0x2ee: 0x0008, 0x2ef: 0x0008,\n\t0x2f0: 0x0008, 0x2f1: 0x0008, 0x2f2: 0x0008, 0x2f3: 0x0008, 0x2f4: 0x0008, 0x2f5: 0x0008,\n\t0x2f6: 0x0008, 0x2f7: 0x0008, 0x2f8: 0x0008, 0x2f9: 0x0008, 0x2fa: 0x0008, 0x2fb: 0x0008,\n\t0x2fc: 0x0008, 0x2fd: 0x0008, 0x2fe: 0x0008, 0x2ff: 0x0008,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x0008, 0x301: 0x0008, 0x302: 0xe00f, 0x303: 0x0008, 0x304: 0x0008, 0x305: 0x0008,\n\t0x306: 0x0008, 0x307: 0x0008, 0x308: 0x0008, 0x309: 0x0008, 0x30a: 0x0008, 0x30b: 0x0008,\n\t0x30c: 0x0008, 0x30d: 0x0008, 0x30e: 0x0008, 0x30f: 0xe0c5, 0x310: 0x04b5, 0x311: 0x04cd,\n\t0x312: 0xe0bd, 0x313: 0xe0f5, 0x314: 0xe0fd, 0x315: 0xe09d, 0x316: 0xe0b5, 0x317: 0x0008,\n\t0x318: 0xe00d, 0x319: 0x0008, 0x31a: 0xe00d, 0x31b: 0x0008, 0x31c: 0xe00d, 0x31d: 0x0008,\n\t0x31e: 0xe00d, 0x31f: 0x0008, 0x320: 0xe00d, 0x321: 0x0008, 0x322: 0xe00d, 0x323: 0x0008,\n\t0x324: 0xe00d, 0x325: 0x0008, 0x326: 0xe00d, 0x327: 0x0008, 0x328: 0xe00d, 0x329: 0x0008,\n\t0x32a: 0xe00d, 0x32b: 0x0008, 0x32c: 0xe00d, 0x32d: 0x0008, 0x32e: 0xe00d, 0x32f: 0x0008,\n\t0x330: 0x04e5, 0x331: 0xe185, 0x332: 0xe18d, 0x333: 0x0008, 0x334: 0x04fd, 0x335: 0x03dd,\n\t0x336: 0x0018, 0x337: 0xe07d, 0x338: 0x0008, 0x339: 0xe1d5, 0x33a: 0xe00d, 0x33b: 0x0008,\n\t0x33c: 0x0008, 0x33d: 0x0515, 0x33e: 0x052d, 0x33f: 0x052d,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0008, 0x341: 0x0008, 0x342: 0x0008, 0x343: 0x0008, 0x344: 0x0008, 0x345: 0x0008,\n\t0x346: 0x0008, 0x347: 0x0008, 0x348: 0x0008, 0x349: 0x0008, 0x34a: 0x0008, 0x34b: 0x0008,\n\t0x34c: 0x0008, 0x34d: 0x0008, 0x34e: 0x0008, 0x34f: 0x0008, 0x350: 0x0008, 0x351: 0x0008,\n\t0x352: 0x0008, 0x353: 0x0008, 0x354: 0x0008, 0x355: 0x0008, 0x356: 0x0008, 0x357: 0x0008,\n\t0x358: 0x0008, 0x359: 0x0008, 0x35a: 0x0008, 0x35b: 0x0008, 0x35c: 0x0008, 0x35d: 0x0008,\n\t0x35e: 0x0008, 0x35f: 0x0008, 0x360: 0xe00d, 0x361: 0x0008, 0x362: 0xe00d, 0x363: 0x0008,\n\t0x364: 0xe00d, 0x365: 0x0008, 0x366: 0xe00d, 0x367: 0x0008, 0x368: 0xe00d, 0x369: 0x0008,\n\t0x36a: 0xe00d, 0x36b: 0x0008, 0x36c: 0xe00d, 0x36d: 0x0008, 0x36e: 0xe00d, 0x36f: 0x0008,\n\t0x370: 0xe00d, 0x371: 0x0008, 0x372: 0xe00d, 0x373: 0x0008, 0x374: 0xe00d, 0x375: 0x0008,\n\t0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008,\n\t0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308,\n\t0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008,\n\t0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008,\n\t0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008,\n\t0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008,\n\t0x39e: 0xe00d, 0x39f: 0x0008, 0x3a0: 0xe00d, 0x3a1: 0x0008, 0x3a2: 0xe00d, 0x3a3: 0x0008,\n\t0x3a4: 0xe00d, 0x3a5: 0x0008, 0x3a6: 0xe00d, 0x3a7: 0x0008, 0x3a8: 0xe00d, 0x3a9: 0x0008,\n\t0x3aa: 0xe00d, 0x3ab: 0x0008, 0x3ac: 0xe00d, 0x3ad: 0x0008, 0x3ae: 0xe00d, 0x3af: 0x0008,\n\t0x3b0: 0xe00d, 0x3b1: 0x0008, 0x3b2: 0xe00d, 0x3b3: 0x0008, 0x3b4: 0xe00d, 0x3b5: 0x0008,\n\t0x3b6: 0xe00d, 0x3b7: 0x0008, 0x3b8: 0xe00d, 0x3b9: 0x0008, 0x3ba: 0xe00d, 0x3bb: 0x0008,\n\t0x3bc: 0xe00d, 0x3bd: 0x0008, 0x3be: 0xe00d, 0x3bf: 0x0008,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x0040, 0x3c1: 0xe01d, 0x3c2: 0x0008, 0x3c3: 0xe03d, 0x3c4: 0x0008, 0x3c5: 0xe01d,\n\t0x3c6: 0x0008, 0x3c7: 0xe07d, 0x3c8: 0x0008, 0x3c9: 0xe01d, 0x3ca: 0x0008, 0x3cb: 0xe03d,\n\t0x3cc: 0x0008, 0x3cd: 0xe01d, 0x3ce: 0x0008, 0x3cf: 0x0008, 0x3d0: 0xe00d, 0x3d1: 0x0008,\n\t0x3d2: 0xe00d, 0x3d3: 0x0008, 0x3d4: 0xe00d, 0x3d5: 0x0008, 0x3d6: 0xe00d, 0x3d7: 0x0008,\n\t0x3d8: 0xe00d, 0x3d9: 0x0008, 0x3da: 0xe00d, 0x3db: 0x0008, 0x3dc: 0xe00d, 0x3dd: 0x0008,\n\t0x3de: 0xe00d, 0x3df: 0x0008, 0x3e0: 0xe00d, 0x3e1: 0x0008, 0x3e2: 0xe00d, 0x3e3: 0x0008,\n\t0x3e4: 0xe00d, 0x3e5: 0x0008, 0x3e6: 0xe00d, 0x3e7: 0x0008, 0x3e8: 0xe00d, 0x3e9: 0x0008,\n\t0x3ea: 0xe00d, 0x3eb: 0x0008, 0x3ec: 0xe00d, 0x3ed: 0x0008, 0x3ee: 0xe00d, 0x3ef: 0x0008,\n\t0x3f0: 0xe00d, 0x3f1: 0x0008, 0x3f2: 0xe00d, 0x3f3: 0x0008, 0x3f4: 0xe00d, 0x3f5: 0x0008,\n\t0x3f6: 0xe00d, 0x3f7: 0x0008, 0x3f8: 0xe00d, 0x3f9: 0x0008, 0x3fa: 0xe00d, 0x3fb: 0x0008,\n\t0x3fc: 0xe00d, 0x3fd: 0x0008, 0x3fe: 0xe00d, 0x3ff: 0x0008,\n\t// Block 0x10, offset 0x400\n\t0x400: 0xe00d, 0x401: 0x0008, 0x402: 0xe00d, 0x403: 0x0008, 0x404: 0xe00d, 0x405: 0x0008,\n\t0x406: 0xe00d, 0x407: 0x0008, 0x408: 0xe00d, 0x409: 0x0008, 0x40a: 0xe00d, 0x40b: 0x0008,\n\t0x40c: 0xe00d, 0x40d: 0x0008, 0x40e: 0xe00d, 0x40f: 0x0008, 0x410: 0xe00d, 0x411: 0x0008,\n\t0x412: 0xe00d, 0x413: 0x0008, 0x414: 0xe00d, 0x415: 0x0008, 0x416: 0xe00d, 0x417: 0x0008,\n\t0x418: 0xe00d, 0x419: 0x0008, 0x41a: 0xe00d, 0x41b: 0x0008, 0x41c: 0xe00d, 0x41d: 0x0008,\n\t0x41e: 0xe00d, 0x41f: 0x0008, 0x420: 0xe00d, 0x421: 0x0008, 0x422: 0xe00d, 0x423: 0x0008,\n\t0x424: 0xe00d, 0x425: 0x0008, 0x426: 0xe00d, 0x427: 0x0008, 0x428: 0xe00d, 0x429: 0x0008,\n\t0x42a: 0xe00d, 0x42b: 0x0008, 0x42c: 0xe00d, 0x42d: 0x0008, 0x42e: 0xe00d, 0x42f: 0x0008,\n\t0x430: 0x0040, 0x431: 0x03f5, 0x432: 0x03f5, 0x433: 0x03f5, 0x434: 0x03f5, 0x435: 0x03f5,\n\t0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5,\n\t0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840,\n\t0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818,\n\t0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308,\n\t0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308,\n\t0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040,\n\t0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08,\n\t0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08,\n\t0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08,\n\t0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08,\n\t0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08,\n\t0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08,\n\t0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308,\n\t0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308,\n\t0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308,\n\t0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308,\n\t0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808,\n\t0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808,\n\t0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08,\n\t0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429,\n\t0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08,\n\t0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08,\n\t0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08,\n\t0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08,\n\t0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308,\n\t0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840,\n\t0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308,\n\t0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018,\n\t0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08,\n\t0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008,\n\t0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08,\n\t0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818,\n\t0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818,\n\t0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308,\n\t0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08,\n\t0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08,\n\t0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08,\n\t0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08,\n\t0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08,\n\t0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308,\n\t0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308,\n\t0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x3008, 0x541: 0x3308, 0x542: 0x3308, 0x543: 0x3308, 0x544: 0x3308, 0x545: 0x3308,\n\t0x546: 0x3308, 0x547: 0x3308, 0x548: 0x3308, 0x549: 0x3008, 0x54a: 0x3008, 0x54b: 0x3008,\n\t0x54c: 0x3008, 0x54d: 0x3b08, 0x54e: 0x3008, 0x54f: 0x3008, 0x550: 0x0008, 0x551: 0x3308,\n\t0x552: 0x3308, 0x553: 0x3308, 0x554: 0x3308, 0x555: 0x3308, 0x556: 0x3308, 0x557: 0x3308,\n\t0x558: 0x04c9, 0x559: 0x0501, 0x55a: 0x0539, 0x55b: 0x0571, 0x55c: 0x05a9, 0x55d: 0x05e1,\n\t0x55e: 0x0619, 0x55f: 0x0651, 0x560: 0x0008, 0x561: 0x0008, 0x562: 0x3308, 0x563: 0x3308,\n\t0x564: 0x0018, 0x565: 0x0018, 0x566: 0x0008, 0x567: 0x0008, 0x568: 0x0008, 0x569: 0x0008,\n\t0x56a: 0x0008, 0x56b: 0x0008, 0x56c: 0x0008, 0x56d: 0x0008, 0x56e: 0x0008, 0x56f: 0x0008,\n\t0x570: 0x0018, 0x571: 0x0008, 0x572: 0x0008, 0x573: 0x0008, 0x574: 0x0008, 0x575: 0x0008,\n\t0x576: 0x0008, 0x577: 0x0008, 0x578: 0x0008, 0x579: 0x0008, 0x57a: 0x0008, 0x57b: 0x0008,\n\t0x57c: 0x0008, 0x57d: 0x0008, 0x57e: 0x0008, 0x57f: 0x0008,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x0008, 0x581: 0x3308, 0x582: 0x3008, 0x583: 0x3008, 0x584: 0x0040, 0x585: 0x0008,\n\t0x586: 0x0008, 0x587: 0x0008, 0x588: 0x0008, 0x589: 0x0008, 0x58a: 0x0008, 0x58b: 0x0008,\n\t0x58c: 0x0008, 0x58d: 0x0040, 0x58e: 0x0040, 0x58f: 0x0008, 0x590: 0x0008, 0x591: 0x0040,\n\t0x592: 0x0040, 0x593: 0x0008, 0x594: 0x0008, 0x595: 0x0008, 0x596: 0x0008, 0x597: 0x0008,\n\t0x598: 0x0008, 0x599: 0x0008, 0x59a: 0x0008, 0x59b: 0x0008, 0x59c: 0x0008, 0x59d: 0x0008,\n\t0x59e: 0x0008, 0x59f: 0x0008, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x0008, 0x5a3: 0x0008,\n\t0x5a4: 0x0008, 0x5a5: 0x0008, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0040,\n\t0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008,\n\t0x5b0: 0x0008, 0x5b1: 0x0040, 0x5b2: 0x0008, 0x5b3: 0x0040, 0x5b4: 0x0040, 0x5b5: 0x0040,\n\t0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0040, 0x5bb: 0x0040,\n\t0x5bc: 0x3308, 0x5bd: 0x0008, 0x5be: 0x3008, 0x5bf: 0x3008,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x3008, 0x5c1: 0x3308, 0x5c2: 0x3308, 0x5c3: 0x3308, 0x5c4: 0x3308, 0x5c5: 0x0040,\n\t0x5c6: 0x0040, 0x5c7: 0x3008, 0x5c8: 0x3008, 0x5c9: 0x0040, 0x5ca: 0x0040, 0x5cb: 0x3008,\n\t0x5cc: 0x3008, 0x5cd: 0x3b08, 0x5ce: 0x0008, 0x5cf: 0x0040, 0x5d0: 0x0040, 0x5d1: 0x0040,\n\t0x5d2: 0x0040, 0x5d3: 0x0040, 0x5d4: 0x0040, 0x5d5: 0x0040, 0x5d6: 0x0040, 0x5d7: 0x3008,\n\t0x5d8: 0x0040, 0x5d9: 0x0040, 0x5da: 0x0040, 0x5db: 0x0040, 0x5dc: 0x0689, 0x5dd: 0x06c1,\n\t0x5de: 0x0040, 0x5df: 0x06f9, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x3308, 0x5e3: 0x3308,\n\t0x5e4: 0x0040, 0x5e5: 0x0040, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0008,\n\t0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008,\n\t0x5f0: 0x0008, 0x5f1: 0x0008, 0x5f2: 0x0018, 0x5f3: 0x0018, 0x5f4: 0x0018, 0x5f5: 0x0018,\n\t0x5f6: 0x0018, 0x5f7: 0x0018, 0x5f8: 0x0018, 0x5f9: 0x0018, 0x5fa: 0x0018, 0x5fb: 0x0018,\n\t0x5fc: 0x0040, 0x5fd: 0x0040, 0x5fe: 0x0040, 0x5ff: 0x0040,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x0040, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3008, 0x604: 0x0040, 0x605: 0x0008,\n\t0x606: 0x0008, 0x607: 0x0008, 0x608: 0x0008, 0x609: 0x0008, 0x60a: 0x0008, 0x60b: 0x0040,\n\t0x60c: 0x0040, 0x60d: 0x0040, 0x60e: 0x0040, 0x60f: 0x0008, 0x610: 0x0008, 0x611: 0x0040,\n\t0x612: 0x0040, 0x613: 0x0008, 0x614: 0x0008, 0x615: 0x0008, 0x616: 0x0008, 0x617: 0x0008,\n\t0x618: 0x0008, 0x619: 0x0008, 0x61a: 0x0008, 0x61b: 0x0008, 0x61c: 0x0008, 0x61d: 0x0008,\n\t0x61e: 0x0008, 0x61f: 0x0008, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x0008, 0x623: 0x0008,\n\t0x624: 0x0008, 0x625: 0x0008, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0040,\n\t0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008,\n\t0x630: 0x0008, 0x631: 0x0040, 0x632: 0x0008, 0x633: 0x0731, 0x634: 0x0040, 0x635: 0x0008,\n\t0x636: 0x0769, 0x637: 0x0040, 0x638: 0x0008, 0x639: 0x0008, 0x63a: 0x0040, 0x63b: 0x0040,\n\t0x63c: 0x3308, 0x63d: 0x0040, 0x63e: 0x3008, 0x63f: 0x3008,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x3008, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x0040, 0x644: 0x0040, 0x645: 0x0040,\n\t0x646: 0x0040, 0x647: 0x3308, 0x648: 0x3308, 0x649: 0x0040, 0x64a: 0x0040, 0x64b: 0x3308,\n\t0x64c: 0x3308, 0x64d: 0x3b08, 0x64e: 0x0040, 0x64f: 0x0040, 0x650: 0x0040, 0x651: 0x3308,\n\t0x652: 0x0040, 0x653: 0x0040, 0x654: 0x0040, 0x655: 0x0040, 0x656: 0x0040, 0x657: 0x0040,\n\t0x658: 0x0040, 0x659: 0x07a1, 0x65a: 0x07d9, 0x65b: 0x0811, 0x65c: 0x0008, 0x65d: 0x0040,\n\t0x65e: 0x0849, 0x65f: 0x0040, 0x660: 0x0040, 0x661: 0x0040, 0x662: 0x0040, 0x663: 0x0040,\n\t0x664: 0x0040, 0x665: 0x0040, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0008,\n\t0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008,\n\t0x670: 0x3308, 0x671: 0x3308, 0x672: 0x0008, 0x673: 0x0008, 0x674: 0x0008, 0x675: 0x3308,\n\t0x676: 0x0040, 0x677: 0x0040, 0x678: 0x0040, 0x679: 0x0040, 0x67a: 0x0040, 0x67b: 0x0040,\n\t0x67c: 0x0040, 0x67d: 0x0040, 0x67e: 0x0040, 0x67f: 0x0040,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x0040, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x3008, 0x684: 0x0040, 0x685: 0x0008,\n\t0x686: 0x0008, 0x687: 0x0008, 0x688: 0x0008, 0x689: 0x0008, 0x68a: 0x0008, 0x68b: 0x0008,\n\t0x68c: 0x0008, 0x68d: 0x0008, 0x68e: 0x0040, 0x68f: 0x0008, 0x690: 0x0008, 0x691: 0x0008,\n\t0x692: 0x0040, 0x693: 0x0008, 0x694: 0x0008, 0x695: 0x0008, 0x696: 0x0008, 0x697: 0x0008,\n\t0x698: 0x0008, 0x699: 0x0008, 0x69a: 0x0008, 0x69b: 0x0008, 0x69c: 0x0008, 0x69d: 0x0008,\n\t0x69e: 0x0008, 0x69f: 0x0008, 0x6a0: 0x0008, 0x6a1: 0x0008, 0x6a2: 0x0008, 0x6a3: 0x0008,\n\t0x6a4: 0x0008, 0x6a5: 0x0008, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0040,\n\t0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008,\n\t0x6b0: 0x0008, 0x6b1: 0x0040, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0040, 0x6b5: 0x0008,\n\t0x6b6: 0x0008, 0x6b7: 0x0008, 0x6b8: 0x0008, 0x6b9: 0x0008, 0x6ba: 0x0040, 0x6bb: 0x0040,\n\t0x6bc: 0x3308, 0x6bd: 0x0008, 0x6be: 0x3008, 0x6bf: 0x3008,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3008, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3308, 0x6c4: 0x3308, 0x6c5: 0x3308,\n\t0x6c6: 0x0040, 0x6c7: 0x3308, 0x6c8: 0x3308, 0x6c9: 0x3008, 0x6ca: 0x0040, 0x6cb: 0x3008,\n\t0x6cc: 0x3008, 0x6cd: 0x3b08, 0x6ce: 0x0040, 0x6cf: 0x0040, 0x6d0: 0x0008, 0x6d1: 0x0040,\n\t0x6d2: 0x0040, 0x6d3: 0x0040, 0x6d4: 0x0040, 0x6d5: 0x0040, 0x6d6: 0x0040, 0x6d7: 0x0040,\n\t0x6d8: 0x0040, 0x6d9: 0x0040, 0x6da: 0x0040, 0x6db: 0x0040, 0x6dc: 0x0040, 0x6dd: 0x0040,\n\t0x6de: 0x0040, 0x6df: 0x0040, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x3308, 0x6e3: 0x3308,\n\t0x6e4: 0x0040, 0x6e5: 0x0040, 0x6e6: 0x0008, 0x6e7: 0x0008, 0x6e8: 0x0008, 0x6e9: 0x0008,\n\t0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008,\n\t0x6f0: 0x0018, 0x6f1: 0x0018, 0x6f2: 0x0040, 0x6f3: 0x0040, 0x6f4: 0x0040, 0x6f5: 0x0040,\n\t0x6f6: 0x0040, 0x6f7: 0x0040, 0x6f8: 0x0040, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040,\n\t0x6fc: 0x0040, 0x6fd: 0x0040, 0x6fe: 0x0040, 0x6ff: 0x0040,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x0040, 0x701: 0x3308, 0x702: 0x3008, 0x703: 0x3008, 0x704: 0x0040, 0x705: 0x0008,\n\t0x706: 0x0008, 0x707: 0x0008, 0x708: 0x0008, 0x709: 0x0008, 0x70a: 0x0008, 0x70b: 0x0008,\n\t0x70c: 0x0008, 0x70d: 0x0040, 0x70e: 0x0040, 0x70f: 0x0008, 0x710: 0x0008, 0x711: 0x0040,\n\t0x712: 0x0040, 0x713: 0x0008, 0x714: 0x0008, 0x715: 0x0008, 0x716: 0x0008, 0x717: 0x0008,\n\t0x718: 0x0008, 0x719: 0x0008, 0x71a: 0x0008, 0x71b: 0x0008, 0x71c: 0x0008, 0x71d: 0x0008,\n\t0x71e: 0x0008, 0x71f: 0x0008, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x0008, 0x723: 0x0008,\n\t0x724: 0x0008, 0x725: 0x0008, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0040,\n\t0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008,\n\t0x730: 0x0008, 0x731: 0x0040, 0x732: 0x0008, 0x733: 0x0008, 0x734: 0x0040, 0x735: 0x0008,\n\t0x736: 0x0008, 0x737: 0x0008, 0x738: 0x0008, 0x739: 0x0008, 0x73a: 0x0040, 0x73b: 0x0040,\n\t0x73c: 0x3308, 0x73d: 0x0008, 0x73e: 0x3008, 0x73f: 0x3308,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x3008, 0x741: 0x3308, 0x742: 0x3308, 0x743: 0x3308, 0x744: 0x3308, 0x745: 0x0040,\n\t0x746: 0x0040, 0x747: 0x3008, 0x748: 0x3008, 0x749: 0x0040, 0x74a: 0x0040, 0x74b: 0x3008,\n\t0x74c: 0x3008, 0x74d: 0x3b08, 0x74e: 0x0040, 0x74f: 0x0040, 0x750: 0x0040, 0x751: 0x0040,\n\t0x752: 0x0040, 0x753: 0x0040, 0x754: 0x0040, 0x755: 0x0040, 0x756: 0x3308, 0x757: 0x3008,\n\t0x758: 0x0040, 0x759: 0x0040, 0x75a: 0x0040, 0x75b: 0x0040, 0x75c: 0x0881, 0x75d: 0x08b9,\n\t0x75e: 0x0040, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x3308, 0x763: 0x3308,\n\t0x764: 0x0040, 0x765: 0x0040, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0008,\n\t0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008,\n\t0x770: 0x0018, 0x771: 0x0008, 0x772: 0x0018, 0x773: 0x0018, 0x774: 0x0018, 0x775: 0x0018,\n\t0x776: 0x0018, 0x777: 0x0018, 0x778: 0x0040, 0x779: 0x0040, 0x77a: 0x0040, 0x77b: 0x0040,\n\t0x77c: 0x0040, 0x77d: 0x0040, 0x77e: 0x0040, 0x77f: 0x0040,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x0040, 0x781: 0x0040, 0x782: 0x3308, 0x783: 0x0008, 0x784: 0x0040, 0x785: 0x0008,\n\t0x786: 0x0008, 0x787: 0x0008, 0x788: 0x0008, 0x789: 0x0008, 0x78a: 0x0008, 0x78b: 0x0040,\n\t0x78c: 0x0040, 0x78d: 0x0040, 0x78e: 0x0008, 0x78f: 0x0008, 0x790: 0x0008, 0x791: 0x0040,\n\t0x792: 0x0008, 0x793: 0x0008, 0x794: 0x0008, 0x795: 0x0008, 0x796: 0x0040, 0x797: 0x0040,\n\t0x798: 0x0040, 0x799: 0x0008, 0x79a: 0x0008, 0x79b: 0x0040, 0x79c: 0x0008, 0x79d: 0x0040,\n\t0x79e: 0x0008, 0x79f: 0x0008, 0x7a0: 0x0040, 0x7a1: 0x0040, 0x7a2: 0x0040, 0x7a3: 0x0008,\n\t0x7a4: 0x0008, 0x7a5: 0x0040, 0x7a6: 0x0040, 0x7a7: 0x0040, 0x7a8: 0x0008, 0x7a9: 0x0008,\n\t0x7aa: 0x0008, 0x7ab: 0x0040, 0x7ac: 0x0040, 0x7ad: 0x0040, 0x7ae: 0x0008, 0x7af: 0x0008,\n\t0x7b0: 0x0008, 0x7b1: 0x0008, 0x7b2: 0x0008, 0x7b3: 0x0008, 0x7b4: 0x0008, 0x7b5: 0x0008,\n\t0x7b6: 0x0008, 0x7b7: 0x0008, 0x7b8: 0x0008, 0x7b9: 0x0008, 0x7ba: 0x0040, 0x7bb: 0x0040,\n\t0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x3008, 0x7bf: 0x3008,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x3308, 0x7c1: 0x3008, 0x7c2: 0x3008, 0x7c3: 0x3008, 0x7c4: 0x3008, 0x7c5: 0x0040,\n\t0x7c6: 0x3308, 0x7c7: 0x3308, 0x7c8: 0x3308, 0x7c9: 0x0040, 0x7ca: 0x3308, 0x7cb: 0x3308,\n\t0x7cc: 0x3308, 0x7cd: 0x3b08, 0x7ce: 0x0040, 0x7cf: 0x0040, 0x7d0: 0x0040, 0x7d1: 0x0040,\n\t0x7d2: 0x0040, 0x7d3: 0x0040, 0x7d4: 0x0040, 0x7d5: 0x3308, 0x7d6: 0x3308, 0x7d7: 0x0040,\n\t0x7d8: 0x0008, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0040, 0x7dd: 0x0040,\n\t0x7de: 0x0040, 0x7df: 0x0040, 0x7e0: 0x0008, 0x7e1: 0x0008, 0x7e2: 0x3308, 0x7e3: 0x3308,\n\t0x7e4: 0x0040, 0x7e5: 0x0040, 0x7e6: 0x0008, 0x7e7: 0x0008, 0x7e8: 0x0008, 0x7e9: 0x0008,\n\t0x7ea: 0x0008, 0x7eb: 0x0008, 0x7ec: 0x0008, 0x7ed: 0x0008, 0x7ee: 0x0008, 0x7ef: 0x0008,\n\t0x7f0: 0x0040, 0x7f1: 0x0040, 0x7f2: 0x0040, 0x7f3: 0x0040, 0x7f4: 0x0040, 0x7f5: 0x0040,\n\t0x7f6: 0x0040, 0x7f7: 0x0040, 0x7f8: 0x0018, 0x7f9: 0x0018, 0x7fa: 0x0018, 0x7fb: 0x0018,\n\t0x7fc: 0x0018, 0x7fd: 0x0018, 0x7fe: 0x0018, 0x7ff: 0x0018,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x0008, 0x801: 0x3308, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x0040, 0x805: 0x0008,\n\t0x806: 0x0008, 0x807: 0x0008, 0x808: 0x0008, 0x809: 0x0008, 0x80a: 0x0008, 0x80b: 0x0008,\n\t0x80c: 0x0008, 0x80d: 0x0040, 0x80e: 0x0008, 0x80f: 0x0008, 0x810: 0x0008, 0x811: 0x0040,\n\t0x812: 0x0008, 0x813: 0x0008, 0x814: 0x0008, 0x815: 0x0008, 0x816: 0x0008, 0x817: 0x0008,\n\t0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0008, 0x81c: 0x0008, 0x81d: 0x0008,\n\t0x81e: 0x0008, 0x81f: 0x0008, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x0008, 0x823: 0x0008,\n\t0x824: 0x0008, 0x825: 0x0008, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0040,\n\t0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008,\n\t0x830: 0x0008, 0x831: 0x0008, 0x832: 0x0008, 0x833: 0x0008, 0x834: 0x0040, 0x835: 0x0008,\n\t0x836: 0x0008, 0x837: 0x0008, 0x838: 0x0008, 0x839: 0x0008, 0x83a: 0x0040, 0x83b: 0x0040,\n\t0x83c: 0x3308, 0x83d: 0x0008, 0x83e: 0x3008, 0x83f: 0x3308,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x3008, 0x841: 0x3008, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x3008, 0x845: 0x0040,\n\t0x846: 0x3308, 0x847: 0x3008, 0x848: 0x3008, 0x849: 0x0040, 0x84a: 0x3008, 0x84b: 0x3008,\n\t0x84c: 0x3308, 0x84d: 0x3b08, 0x84e: 0x0040, 0x84f: 0x0040, 0x850: 0x0040, 0x851: 0x0040,\n\t0x852: 0x0040, 0x853: 0x0040, 0x854: 0x0040, 0x855: 0x3008, 0x856: 0x3008, 0x857: 0x0040,\n\t0x858: 0x0040, 0x859: 0x0040, 0x85a: 0x0040, 0x85b: 0x0040, 0x85c: 0x0040, 0x85d: 0x0040,\n\t0x85e: 0x0008, 0x85f: 0x0040, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x3308, 0x863: 0x3308,\n\t0x864: 0x0040, 0x865: 0x0040, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0008,\n\t0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008,\n\t0x870: 0x0040, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0040, 0x874: 0x0040, 0x875: 0x0040,\n\t0x876: 0x0040, 0x877: 0x0040, 0x878: 0x0040, 0x879: 0x0040, 0x87a: 0x0040, 0x87b: 0x0040,\n\t0x87c: 0x0040, 0x87d: 0x0040, 0x87e: 0x0040, 0x87f: 0x0040,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x3008, 0x881: 0x3308, 0x882: 0x3308, 0x883: 0x3308, 0x884: 0x3308, 0x885: 0x0040,\n\t0x886: 0x3008, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008,\n\t0x88c: 0x3008, 0x88d: 0x3b08, 0x88e: 0x0008, 0x88f: 0x0018, 0x890: 0x0040, 0x891: 0x0040,\n\t0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0008, 0x895: 0x0008, 0x896: 0x0008, 0x897: 0x3008,\n\t0x898: 0x0018, 0x899: 0x0018, 0x89a: 0x0018, 0x89b: 0x0018, 0x89c: 0x0018, 0x89d: 0x0018,\n\t0x89e: 0x0018, 0x89f: 0x0008, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308,\n\t0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008,\n\t0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008,\n\t0x8b0: 0x0018, 0x8b1: 0x0018, 0x8b2: 0x0018, 0x8b3: 0x0018, 0x8b4: 0x0018, 0x8b5: 0x0018,\n\t0x8b6: 0x0018, 0x8b7: 0x0018, 0x8b8: 0x0018, 0x8b9: 0x0018, 0x8ba: 0x0008, 0x8bb: 0x0008,\n\t0x8bc: 0x0008, 0x8bd: 0x0008, 0x8be: 0x0008, 0x8bf: 0x0008,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0040, 0x8c1: 0x0008, 0x8c2: 0x0008, 0x8c3: 0x0040, 0x8c4: 0x0008, 0x8c5: 0x0040,\n\t0x8c6: 0x0040, 0x8c7: 0x0008, 0x8c8: 0x0008, 0x8c9: 0x0040, 0x8ca: 0x0008, 0x8cb: 0x0040,\n\t0x8cc: 0x0040, 0x8cd: 0x0008, 0x8ce: 0x0040, 0x8cf: 0x0040, 0x8d0: 0x0040, 0x8d1: 0x0040,\n\t0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x0008,\n\t0x8d8: 0x0040, 0x8d9: 0x0008, 0x8da: 0x0008, 0x8db: 0x0008, 0x8dc: 0x0008, 0x8dd: 0x0008,\n\t0x8de: 0x0008, 0x8df: 0x0008, 0x8e0: 0x0040, 0x8e1: 0x0008, 0x8e2: 0x0008, 0x8e3: 0x0008,\n\t0x8e4: 0x0040, 0x8e5: 0x0008, 0x8e6: 0x0040, 0x8e7: 0x0008, 0x8e8: 0x0040, 0x8e9: 0x0040,\n\t0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0040, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008,\n\t0x8f0: 0x0008, 0x8f1: 0x3308, 0x8f2: 0x0008, 0x8f3: 0x0929, 0x8f4: 0x3308, 0x8f5: 0x3308,\n\t0x8f6: 0x3308, 0x8f7: 0x3308, 0x8f8: 0x3308, 0x8f9: 0x3308, 0x8fa: 0x0040, 0x8fb: 0x3308,\n\t0x8fc: 0x3308, 0x8fd: 0x0008, 0x8fe: 0x0040, 0x8ff: 0x0040,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0008, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x09d1, 0x904: 0x0008, 0x905: 0x0008,\n\t0x906: 0x0008, 0x907: 0x0008, 0x908: 0x0040, 0x909: 0x0008, 0x90a: 0x0008, 0x90b: 0x0008,\n\t0x90c: 0x0008, 0x90d: 0x0a09, 0x90e: 0x0008, 0x90f: 0x0008, 0x910: 0x0008, 0x911: 0x0008,\n\t0x912: 0x0a41, 0x913: 0x0008, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0a79,\n\t0x918: 0x0008, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0ab1, 0x91d: 0x0008,\n\t0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0008, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008,\n\t0x924: 0x0008, 0x925: 0x0008, 0x926: 0x0008, 0x927: 0x0008, 0x928: 0x0008, 0x929: 0x0ae9,\n\t0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0008, 0x92d: 0x0040, 0x92e: 0x0040, 0x92f: 0x0040,\n\t0x930: 0x0040, 0x931: 0x3308, 0x932: 0x3308, 0x933: 0x0b21, 0x934: 0x3308, 0x935: 0x0b59,\n\t0x936: 0x0b91, 0x937: 0x0bc9, 0x938: 0x0c19, 0x939: 0x0c51, 0x93a: 0x3308, 0x93b: 0x3308,\n\t0x93c: 0x3308, 0x93d: 0x3308, 0x93e: 0x3308, 0x93f: 0x3008,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x3308, 0x941: 0x0ca1, 0x942: 0x3308, 0x943: 0x3308, 0x944: 0x3b08, 0x945: 0x0018,\n\t0x946: 0x3308, 0x947: 0x3308, 0x948: 0x0008, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008,\n\t0x94c: 0x0008, 0x94d: 0x3308, 0x94e: 0x3308, 0x94f: 0x3308, 0x950: 0x3308, 0x951: 0x3308,\n\t0x952: 0x3308, 0x953: 0x0cd9, 0x954: 0x3308, 0x955: 0x3308, 0x956: 0x3308, 0x957: 0x3308,\n\t0x958: 0x0040, 0x959: 0x3308, 0x95a: 0x3308, 0x95b: 0x3308, 0x95c: 0x3308, 0x95d: 0x0d11,\n\t0x95e: 0x3308, 0x95f: 0x3308, 0x960: 0x3308, 0x961: 0x3308, 0x962: 0x0d49, 0x963: 0x3308,\n\t0x964: 0x3308, 0x965: 0x3308, 0x966: 0x3308, 0x967: 0x0d81, 0x968: 0x3308, 0x969: 0x3308,\n\t0x96a: 0x3308, 0x96b: 0x3308, 0x96c: 0x0db9, 0x96d: 0x3308, 0x96e: 0x3308, 0x96f: 0x3308,\n\t0x970: 0x3308, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x3308, 0x974: 0x3308, 0x975: 0x3308,\n\t0x976: 0x3308, 0x977: 0x3308, 0x978: 0x3308, 0x979: 0x0df1, 0x97a: 0x3308, 0x97b: 0x3308,\n\t0x97c: 0x3308, 0x97d: 0x0040, 0x97e: 0x0018, 0x97f: 0x0018,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x0008, 0x981: 0x0008, 0x982: 0x0008, 0x983: 0x0008, 0x984: 0x0008, 0x985: 0x0008,\n\t0x986: 0x0008, 0x987: 0x0008, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008,\n\t0x98c: 0x0008, 0x98d: 0x0008, 0x98e: 0x0008, 0x98f: 0x0008, 0x990: 0x0008, 0x991: 0x0008,\n\t0x992: 0x0008, 0x993: 0x0008, 0x994: 0x0008, 0x995: 0x0008, 0x996: 0x0008, 0x997: 0x0008,\n\t0x998: 0x0008, 0x999: 0x0008, 0x99a: 0x0008, 0x99b: 0x0008, 0x99c: 0x0008, 0x99d: 0x0008,\n\t0x99e: 0x0008, 0x99f: 0x0008, 0x9a0: 0x0008, 0x9a1: 0x0008, 0x9a2: 0x0008, 0x9a3: 0x0008,\n\t0x9a4: 0x0008, 0x9a5: 0x0008, 0x9a6: 0x0008, 0x9a7: 0x0008, 0x9a8: 0x0008, 0x9a9: 0x0008,\n\t0x9aa: 0x0008, 0x9ab: 0x0008, 0x9ac: 0x0039, 0x9ad: 0x0ed1, 0x9ae: 0x0ee9, 0x9af: 0x0008,\n\t0x9b0: 0x0ef9, 0x9b1: 0x0f09, 0x9b2: 0x0f19, 0x9b3: 0x0f31, 0x9b4: 0x0249, 0x9b5: 0x0f41,\n\t0x9b6: 0x0259, 0x9b7: 0x0f51, 0x9b8: 0x0359, 0x9b9: 0x0f61, 0x9ba: 0x0f71, 0x9bb: 0x0008,\n\t0x9bc: 0x00d9, 0x9bd: 0x0f81, 0x9be: 0x0f99, 0x9bf: 0x0269,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x0fa9, 0x9c1: 0x0fb9, 0x9c2: 0x0279, 0x9c3: 0x0039, 0x9c4: 0x0fc9, 0x9c5: 0x0fe1,\n\t0x9c6: 0x059d, 0x9c7: 0x0ee9, 0x9c8: 0x0ef9, 0x9c9: 0x0f09, 0x9ca: 0x0ff9, 0x9cb: 0x1011,\n\t0x9cc: 0x1029, 0x9cd: 0x0f31, 0x9ce: 0x0008, 0x9cf: 0x0f51, 0x9d0: 0x0f61, 0x9d1: 0x1041,\n\t0x9d2: 0x00d9, 0x9d3: 0x1059, 0x9d4: 0x05b5, 0x9d5: 0x05b5, 0x9d6: 0x0f99, 0x9d7: 0x0fa9,\n\t0x9d8: 0x0fb9, 0x9d9: 0x059d, 0x9da: 0x1071, 0x9db: 0x1089, 0x9dc: 0x05cd, 0x9dd: 0x1099,\n\t0x9de: 0x10b1, 0x9df: 0x10c9, 0x9e0: 0x10e1, 0x9e1: 0x10f9, 0x9e2: 0x0f41, 0x9e3: 0x0269,\n\t0x9e4: 0x0fb9, 0x9e5: 0x1089, 0x9e6: 0x1099, 0x9e7: 0x10b1, 0x9e8: 0x1111, 0x9e9: 0x10e1,\n\t0x9ea: 0x10f9, 0x9eb: 0x0008, 0x9ec: 0x0008, 0x9ed: 0x0008, 0x9ee: 0x0008, 0x9ef: 0x0008,\n\t0x9f0: 0x0008, 0x9f1: 0x0008, 0x9f2: 0x0008, 0x9f3: 0x0008, 0x9f4: 0x0008, 0x9f5: 0x0008,\n\t0x9f6: 0x0008, 0x9f7: 0x0008, 0x9f8: 0x1129, 0x9f9: 0x0008, 0x9fa: 0x0008, 0x9fb: 0x0008,\n\t0x9fc: 0x0008, 0x9fd: 0x0008, 0x9fe: 0x0008, 0x9ff: 0x0008,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0008, 0xa01: 0x0008, 0xa02: 0x0008, 0xa03: 0x0008, 0xa04: 0x0008, 0xa05: 0x0008,\n\t0xa06: 0x0008, 0xa07: 0x0008, 0xa08: 0x0008, 0xa09: 0x0008, 0xa0a: 0x0008, 0xa0b: 0x0008,\n\t0xa0c: 0x0008, 0xa0d: 0x0008, 0xa0e: 0x0008, 0xa0f: 0x0008, 0xa10: 0x0008, 0xa11: 0x0008,\n\t0xa12: 0x0008, 0xa13: 0x0008, 0xa14: 0x0008, 0xa15: 0x0008, 0xa16: 0x0008, 0xa17: 0x0008,\n\t0xa18: 0x0008, 0xa19: 0x0008, 0xa1a: 0x0008, 0xa1b: 0x1141, 0xa1c: 0x1159, 0xa1d: 0x1169,\n\t0xa1e: 0x1181, 0xa1f: 0x1029, 0xa20: 0x1199, 0xa21: 0x11a9, 0xa22: 0x11c1, 0xa23: 0x11d9,\n\t0xa24: 0x11f1, 0xa25: 0x1209, 0xa26: 0x1221, 0xa27: 0x05e5, 0xa28: 0x1239, 0xa29: 0x1251,\n\t0xa2a: 0xe17d, 0xa2b: 0x1269, 0xa2c: 0x1281, 0xa2d: 0x1299, 0xa2e: 0x12b1, 0xa2f: 0x12c9,\n\t0xa30: 0x12e1, 0xa31: 0x12f9, 0xa32: 0x1311, 0xa33: 0x1329, 0xa34: 0x1341, 0xa35: 0x1359,\n\t0xa36: 0x1371, 0xa37: 0x1389, 0xa38: 0x05fd, 0xa39: 0x13a1, 0xa3a: 0x13b9, 0xa3b: 0x13d1,\n\t0xa3c: 0x13e1, 0xa3d: 0x13f9, 0xa3e: 0x1411, 0xa3f: 0x1429,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0xe00d, 0xa41: 0x0008, 0xa42: 0xe00d, 0xa43: 0x0008, 0xa44: 0xe00d, 0xa45: 0x0008,\n\t0xa46: 0xe00d, 0xa47: 0x0008, 0xa48: 0xe00d, 0xa49: 0x0008, 0xa4a: 0xe00d, 0xa4b: 0x0008,\n\t0xa4c: 0xe00d, 0xa4d: 0x0008, 0xa4e: 0xe00d, 0xa4f: 0x0008, 0xa50: 0xe00d, 0xa51: 0x0008,\n\t0xa52: 0xe00d, 0xa53: 0x0008, 0xa54: 0xe00d, 0xa55: 0x0008, 0xa56: 0xe00d, 0xa57: 0x0008,\n\t0xa58: 0xe00d, 0xa59: 0x0008, 0xa5a: 0xe00d, 0xa5b: 0x0008, 0xa5c: 0xe00d, 0xa5d: 0x0008,\n\t0xa5e: 0xe00d, 0xa5f: 0x0008, 0xa60: 0xe00d, 0xa61: 0x0008, 0xa62: 0xe00d, 0xa63: 0x0008,\n\t0xa64: 0xe00d, 0xa65: 0x0008, 0xa66: 0xe00d, 0xa67: 0x0008, 0xa68: 0xe00d, 0xa69: 0x0008,\n\t0xa6a: 0xe00d, 0xa6b: 0x0008, 0xa6c: 0xe00d, 0xa6d: 0x0008, 0xa6e: 0xe00d, 0xa6f: 0x0008,\n\t0xa70: 0xe00d, 0xa71: 0x0008, 0xa72: 0xe00d, 0xa73: 0x0008, 0xa74: 0xe00d, 0xa75: 0x0008,\n\t0xa76: 0xe00d, 0xa77: 0x0008, 0xa78: 0xe00d, 0xa79: 0x0008, 0xa7a: 0xe00d, 0xa7b: 0x0008,\n\t0xa7c: 0xe00d, 0xa7d: 0x0008, 0xa7e: 0xe00d, 0xa7f: 0x0008,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008,\n\t0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008,\n\t0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008,\n\t0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0x0008, 0xa97: 0x0008,\n\t0xa98: 0x0008, 0xa99: 0x0008, 0xa9a: 0x0615, 0xa9b: 0x0635, 0xa9c: 0x0008, 0xa9d: 0x0008,\n\t0xa9e: 0x1441, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008,\n\t0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008,\n\t0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008,\n\t0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008,\n\t0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008,\n\t0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0x0008, 0xac1: 0x0008, 0xac2: 0x0008, 0xac3: 0x0008, 0xac4: 0x0008, 0xac5: 0x0008,\n\t0xac6: 0x0040, 0xac7: 0x0040, 0xac8: 0xe045, 0xac9: 0xe045, 0xaca: 0xe045, 0xacb: 0xe045,\n\t0xacc: 0xe045, 0xacd: 0xe045, 0xace: 0x0040, 0xacf: 0x0040, 0xad0: 0x0008, 0xad1: 0x0008,\n\t0xad2: 0x0008, 0xad3: 0x0008, 0xad4: 0x0008, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008,\n\t0xad8: 0x0040, 0xad9: 0xe045, 0xada: 0x0040, 0xadb: 0xe045, 0xadc: 0x0040, 0xadd: 0xe045,\n\t0xade: 0x0040, 0xadf: 0xe045, 0xae0: 0x0008, 0xae1: 0x0008, 0xae2: 0x0008, 0xae3: 0x0008,\n\t0xae4: 0x0008, 0xae5: 0x0008, 0xae6: 0x0008, 0xae7: 0x0008, 0xae8: 0xe045, 0xae9: 0xe045,\n\t0xaea: 0xe045, 0xaeb: 0xe045, 0xaec: 0xe045, 0xaed: 0xe045, 0xaee: 0xe045, 0xaef: 0xe045,\n\t0xaf0: 0x0008, 0xaf1: 0x1459, 0xaf2: 0x0008, 0xaf3: 0x1471, 0xaf4: 0x0008, 0xaf5: 0x1489,\n\t0xaf6: 0x0008, 0xaf7: 0x14a1, 0xaf8: 0x0008, 0xaf9: 0x14b9, 0xafa: 0x0008, 0xafb: 0x14d1,\n\t0xafc: 0x0008, 0xafd: 0x14e9, 0xafe: 0x0040, 0xaff: 0x0040,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x1501, 0xb01: 0x1531, 0xb02: 0x1561, 0xb03: 0x1591, 0xb04: 0x15c1, 0xb05: 0x15f1,\n\t0xb06: 0x1621, 0xb07: 0x1651, 0xb08: 0x1501, 0xb09: 0x1531, 0xb0a: 0x1561, 0xb0b: 0x1591,\n\t0xb0c: 0x15c1, 0xb0d: 0x15f1, 0xb0e: 0x1621, 0xb0f: 0x1651, 0xb10: 0x1681, 0xb11: 0x16b1,\n\t0xb12: 0x16e1, 0xb13: 0x1711, 0xb14: 0x1741, 0xb15: 0x1771, 0xb16: 0x17a1, 0xb17: 0x17d1,\n\t0xb18: 0x1681, 0xb19: 0x16b1, 0xb1a: 0x16e1, 0xb1b: 0x1711, 0xb1c: 0x1741, 0xb1d: 0x1771,\n\t0xb1e: 0x17a1, 0xb1f: 0x17d1, 0xb20: 0x1801, 0xb21: 0x1831, 0xb22: 0x1861, 0xb23: 0x1891,\n\t0xb24: 0x18c1, 0xb25: 0x18f1, 0xb26: 0x1921, 0xb27: 0x1951, 0xb28: 0x1801, 0xb29: 0x1831,\n\t0xb2a: 0x1861, 0xb2b: 0x1891, 0xb2c: 0x18c1, 0xb2d: 0x18f1, 0xb2e: 0x1921, 0xb2f: 0x1951,\n\t0xb30: 0x0008, 0xb31: 0x0008, 0xb32: 0x1981, 0xb33: 0x19b1, 0xb34: 0x19d9, 0xb35: 0x0040,\n\t0xb36: 0x0008, 0xb37: 0x1a01, 0xb38: 0xe045, 0xb39: 0xe045, 0xb3a: 0x064d, 0xb3b: 0x1459,\n\t0xb3c: 0x19b1, 0xb3d: 0x0666, 0xb3e: 0x1a31, 0xb3f: 0x0686,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x06a6, 0xb41: 0x1a4a, 0xb42: 0x1a79, 0xb43: 0x1aa9, 0xb44: 0x1ad1, 0xb45: 0x0040,\n\t0xb46: 0x0008, 0xb47: 0x1af9, 0xb48: 0x06c5, 0xb49: 0x1471, 0xb4a: 0x06dd, 0xb4b: 0x1489,\n\t0xb4c: 0x1aa9, 0xb4d: 0x1b2a, 0xb4e: 0x1b5a, 0xb4f: 0x1b8a, 0xb50: 0x0008, 0xb51: 0x0008,\n\t0xb52: 0x0008, 0xb53: 0x1bb9, 0xb54: 0x0040, 0xb55: 0x0040, 0xb56: 0x0008, 0xb57: 0x0008,\n\t0xb58: 0xe045, 0xb59: 0xe045, 0xb5a: 0x06f5, 0xb5b: 0x14a1, 0xb5c: 0x0040, 0xb5d: 0x1bd2,\n\t0xb5e: 0x1c02, 0xb5f: 0x1c32, 0xb60: 0x0008, 0xb61: 0x0008, 0xb62: 0x0008, 0xb63: 0x1c61,\n\t0xb64: 0x0008, 0xb65: 0x0008, 0xb66: 0x0008, 0xb67: 0x0008, 0xb68: 0xe045, 0xb69: 0xe045,\n\t0xb6a: 0x070d, 0xb6b: 0x14d1, 0xb6c: 0xe04d, 0xb6d: 0x1c7a, 0xb6e: 0x03d2, 0xb6f: 0x1caa,\n\t0xb70: 0x0040, 0xb71: 0x0040, 0xb72: 0x1cb9, 0xb73: 0x1ce9, 0xb74: 0x1d11, 0xb75: 0x0040,\n\t0xb76: 0x0008, 0xb77: 0x1d39, 0xb78: 0x0725, 0xb79: 0x14b9, 0xb7a: 0x0515, 0xb7b: 0x14e9,\n\t0xb7c: 0x1ce9, 0xb7d: 0x073e, 0xb7e: 0x075e, 0xb7f: 0x0040,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x000a, 0xb81: 0x000a, 0xb82: 0x000a, 0xb83: 0x000a, 0xb84: 0x000a, 0xb85: 0x000a,\n\t0xb86: 0x000a, 0xb87: 0x000a, 0xb88: 0x000a, 0xb89: 0x000a, 0xb8a: 0x000a, 0xb8b: 0x03c0,\n\t0xb8c: 0x0003, 0xb8d: 0x0003, 0xb8e: 0x0340, 0xb8f: 0x0b40, 0xb90: 0x0018, 0xb91: 0xe00d,\n\t0xb92: 0x0018, 0xb93: 0x0018, 0xb94: 0x0018, 0xb95: 0x0018, 0xb96: 0x0018, 0xb97: 0x077e,\n\t0xb98: 0x0018, 0xb99: 0x0018, 0xb9a: 0x0018, 0xb9b: 0x0018, 0xb9c: 0x0018, 0xb9d: 0x0018,\n\t0xb9e: 0x0018, 0xb9f: 0x0018, 0xba0: 0x0018, 0xba1: 0x0018, 0xba2: 0x0018, 0xba3: 0x0018,\n\t0xba4: 0x0040, 0xba5: 0x0040, 0xba6: 0x0040, 0xba7: 0x0018, 0xba8: 0x0040, 0xba9: 0x0040,\n\t0xbaa: 0x0340, 0xbab: 0x0340, 0xbac: 0x0340, 0xbad: 0x0340, 0xbae: 0x0340, 0xbaf: 0x000a,\n\t0xbb0: 0x0018, 0xbb1: 0x0018, 0xbb2: 0x0018, 0xbb3: 0x1d69, 0xbb4: 0x1da1, 0xbb5: 0x0018,\n\t0xbb6: 0x1df1, 0xbb7: 0x1e29, 0xbb8: 0x0018, 0xbb9: 0x0018, 0xbba: 0x0018, 0xbbb: 0x0018,\n\t0xbbc: 0x1e7a, 0xbbd: 0x0018, 0xbbe: 0x079e, 0xbbf: 0x0018,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x0018, 0xbc1: 0x0018, 0xbc2: 0x0018, 0xbc3: 0x0018, 0xbc4: 0x0018, 0xbc5: 0x0018,\n\t0xbc6: 0x0018, 0xbc7: 0x1e92, 0xbc8: 0x1eaa, 0xbc9: 0x1ec2, 0xbca: 0x0018, 0xbcb: 0x0018,\n\t0xbcc: 0x0018, 0xbcd: 0x0018, 0xbce: 0x0018, 0xbcf: 0x0018, 0xbd0: 0x0018, 0xbd1: 0x0018,\n\t0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x1ed9,\n\t0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018,\n\t0xbde: 0x0018, 0xbdf: 0x000a, 0xbe0: 0x03c0, 0xbe1: 0x0340, 0xbe2: 0x0340, 0xbe3: 0x0340,\n\t0xbe4: 0x03c0, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0040, 0xbe8: 0x0040, 0xbe9: 0x0040,\n\t0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x0340,\n\t0xbf0: 0x1f41, 0xbf1: 0x0f41, 0xbf2: 0x0040, 0xbf3: 0x0040, 0xbf4: 0x1f51, 0xbf5: 0x1f61,\n\t0xbf6: 0x1f71, 0xbf7: 0x1f81, 0xbf8: 0x1f91, 0xbf9: 0x1fa1, 0xbfa: 0x1fb2, 0xbfb: 0x07bd,\n\t0xbfc: 0x1fc2, 0xbfd: 0x1fd2, 0xbfe: 0x1fe2, 0xbff: 0x0f71,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x1f41, 0xc01: 0x00c9, 0xc02: 0x0069, 0xc03: 0x0079, 0xc04: 0x1f51, 0xc05: 0x1f61,\n\t0xc06: 0x1f71, 0xc07: 0x1f81, 0xc08: 0x1f91, 0xc09: 0x1fa1, 0xc0a: 0x1fb2, 0xc0b: 0x07d5,\n\t0xc0c: 0x1fc2, 0xc0d: 0x1fd2, 0xc0e: 0x1fe2, 0xc0f: 0x0040, 0xc10: 0x0039, 0xc11: 0x0f09,\n\t0xc12: 0x00d9, 0xc13: 0x0369, 0xc14: 0x0ff9, 0xc15: 0x0249, 0xc16: 0x0f51, 0xc17: 0x0359,\n\t0xc18: 0x0f61, 0xc19: 0x0f71, 0xc1a: 0x0f99, 0xc1b: 0x01d9, 0xc1c: 0x0fa9, 0xc1d: 0x0040,\n\t0xc1e: 0x0040, 0xc1f: 0x0040, 0xc20: 0x0018, 0xc21: 0x0018, 0xc22: 0x0018, 0xc23: 0x0018,\n\t0xc24: 0x0018, 0xc25: 0x0018, 0xc26: 0x0018, 0xc27: 0x0018, 0xc28: 0x1ff1, 0xc29: 0x0018,\n\t0xc2a: 0x0018, 0xc2b: 0x0018, 0xc2c: 0x0018, 0xc2d: 0x0018, 0xc2e: 0x0018, 0xc2f: 0x0018,\n\t0xc30: 0x0018, 0xc31: 0x0018, 0xc32: 0x0018, 0xc33: 0x0018, 0xc34: 0x0018, 0xc35: 0x0018,\n\t0xc36: 0x0018, 0xc37: 0x0018, 0xc38: 0x0018, 0xc39: 0x0018, 0xc3a: 0x0018, 0xc3b: 0x0018,\n\t0xc3c: 0x0018, 0xc3d: 0x0018, 0xc3e: 0x0018, 0xc3f: 0x0040,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x07ee, 0xc41: 0x080e, 0xc42: 0x1159, 0xc43: 0x082d, 0xc44: 0x0018, 0xc45: 0x084e,\n\t0xc46: 0x086e, 0xc47: 0x1011, 0xc48: 0x0018, 0xc49: 0x088d, 0xc4a: 0x0f31, 0xc4b: 0x0249,\n\t0xc4c: 0x0249, 0xc4d: 0x0249, 0xc4e: 0x0249, 0xc4f: 0x2009, 0xc50: 0x0f41, 0xc51: 0x0f41,\n\t0xc52: 0x0359, 0xc53: 0x0359, 0xc54: 0x0018, 0xc55: 0x0f71, 0xc56: 0x2021, 0xc57: 0x0018,\n\t0xc58: 0x0018, 0xc59: 0x0f99, 0xc5a: 0x2039, 0xc5b: 0x0269, 0xc5c: 0x0269, 0xc5d: 0x0269,\n\t0xc5e: 0x0018, 0xc5f: 0x0018, 0xc60: 0x2049, 0xc61: 0x08ad, 0xc62: 0x2061, 0xc63: 0x0018,\n\t0xc64: 0x13d1, 0xc65: 0x0018, 0xc66: 0x2079, 0xc67: 0x0018, 0xc68: 0x13d1, 0xc69: 0x0018,\n\t0xc6a: 0x0f51, 0xc6b: 0x2091, 0xc6c: 0x0ee9, 0xc6d: 0x1159, 0xc6e: 0x0018, 0xc6f: 0x0f09,\n\t0xc70: 0x0f09, 0xc71: 0x1199, 0xc72: 0x0040, 0xc73: 0x0f61, 0xc74: 0x00d9, 0xc75: 0x20a9,\n\t0xc76: 0x20c1, 0xc77: 0x20d9, 0xc78: 0x20f1, 0xc79: 0x0f41, 0xc7a: 0x0018, 0xc7b: 0x08cd,\n\t0xc7c: 0x2109, 0xc7d: 0x10b1, 0xc7e: 0x10b1, 0xc7f: 0x2109,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x08ed, 0xc81: 0x0018, 0xc82: 0x0018, 0xc83: 0x0018, 0xc84: 0x0018, 0xc85: 0x0ef9,\n\t0xc86: 0x0ef9, 0xc87: 0x0f09, 0xc88: 0x0f41, 0xc89: 0x0259, 0xc8a: 0x0018, 0xc8b: 0x0018,\n\t0xc8c: 0x0018, 0xc8d: 0x0018, 0xc8e: 0x0008, 0xc8f: 0x0018, 0xc90: 0x2121, 0xc91: 0x2151,\n\t0xc92: 0x2181, 0xc93: 0x21b9, 0xc94: 0x21e9, 0xc95: 0x2219, 0xc96: 0x2249, 0xc97: 0x2279,\n\t0xc98: 0x22a9, 0xc99: 0x22d9, 0xc9a: 0x2309, 0xc9b: 0x2339, 0xc9c: 0x2369, 0xc9d: 0x2399,\n\t0xc9e: 0x23c9, 0xc9f: 0x23f9, 0xca0: 0x0f41, 0xca1: 0x2421, 0xca2: 0x0905, 0xca3: 0x2439,\n\t0xca4: 0x1089, 0xca5: 0x2451, 0xca6: 0x0925, 0xca7: 0x2469, 0xca8: 0x2491, 0xca9: 0x0369,\n\t0xcaa: 0x24a9, 0xcab: 0x0945, 0xcac: 0x0359, 0xcad: 0x1159, 0xcae: 0x0ef9, 0xcaf: 0x0f61,\n\t0xcb0: 0x0f41, 0xcb1: 0x2421, 0xcb2: 0x0965, 0xcb3: 0x2439, 0xcb4: 0x1089, 0xcb5: 0x2451,\n\t0xcb6: 0x0985, 0xcb7: 0x2469, 0xcb8: 0x2491, 0xcb9: 0x0369, 0xcba: 0x24a9, 0xcbb: 0x09a5,\n\t0xcbc: 0x0359, 0xcbd: 0x1159, 0xcbe: 0x0ef9, 0xcbf: 0x0f61,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x0018, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0018,\n\t0xcc6: 0x0018, 0xcc7: 0x0018, 0xcc8: 0x0018, 0xcc9: 0x0018, 0xcca: 0x0018, 0xccb: 0x0040,\n\t0xccc: 0x0040, 0xccd: 0x0040, 0xcce: 0x0040, 0xccf: 0x0040, 0xcd0: 0x0040, 0xcd1: 0x0040,\n\t0xcd2: 0x0040, 0xcd3: 0x0040, 0xcd4: 0x0040, 0xcd5: 0x0040, 0xcd6: 0x0040, 0xcd7: 0x0040,\n\t0xcd8: 0x0040, 0xcd9: 0x0040, 0xcda: 0x0040, 0xcdb: 0x0040, 0xcdc: 0x0040, 0xcdd: 0x0040,\n\t0xcde: 0x0040, 0xcdf: 0x0040, 0xce0: 0x00c9, 0xce1: 0x0069, 0xce2: 0x0079, 0xce3: 0x1f51,\n\t0xce4: 0x1f61, 0xce5: 0x1f71, 0xce6: 0x1f81, 0xce7: 0x1f91, 0xce8: 0x1fa1, 0xce9: 0x2601,\n\t0xcea: 0x2619, 0xceb: 0x2631, 0xcec: 0x2649, 0xced: 0x2661, 0xcee: 0x2679, 0xcef: 0x2691,\n\t0xcf0: 0x26a9, 0xcf1: 0x26c1, 0xcf2: 0x26d9, 0xcf3: 0x26f1, 0xcf4: 0x0a06, 0xcf5: 0x0a26,\n\t0xcf6: 0x0a46, 0xcf7: 0x0a66, 0xcf8: 0x0a86, 0xcf9: 0x0aa6, 0xcfa: 0x0ac6, 0xcfb: 0x0ae6,\n\t0xcfc: 0x0b06, 0xcfd: 0x270a, 0xcfe: 0x2732, 0xcff: 0x275a,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x2782, 0xd01: 0x27aa, 0xd02: 0x27d2, 0xd03: 0x27fa, 0xd04: 0x2822, 0xd05: 0x284a,\n\t0xd06: 0x2872, 0xd07: 0x289a, 0xd08: 0x0040, 0xd09: 0x0040, 0xd0a: 0x0040, 0xd0b: 0x0040,\n\t0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040,\n\t0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040,\n\t0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0b26, 0xd1d: 0x0b46,\n\t0xd1e: 0x0b66, 0xd1f: 0x0b86, 0xd20: 0x0ba6, 0xd21: 0x0bc6, 0xd22: 0x0be6, 0xd23: 0x0c06,\n\t0xd24: 0x0c26, 0xd25: 0x0c46, 0xd26: 0x0c66, 0xd27: 0x0c86, 0xd28: 0x0ca6, 0xd29: 0x0cc6,\n\t0xd2a: 0x0ce6, 0xd2b: 0x0d06, 0xd2c: 0x0d26, 0xd2d: 0x0d46, 0xd2e: 0x0d66, 0xd2f: 0x0d86,\n\t0xd30: 0x0da6, 0xd31: 0x0dc6, 0xd32: 0x0de6, 0xd33: 0x0e06, 0xd34: 0x0e26, 0xd35: 0x0e46,\n\t0xd36: 0x0039, 0xd37: 0x0ee9, 0xd38: 0x1159, 0xd39: 0x0ef9, 0xd3a: 0x0f09, 0xd3b: 0x1199,\n\t0xd3c: 0x0f31, 0xd3d: 0x0249, 0xd3e: 0x0f41, 0xd3f: 0x0259,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x0f51, 0xd41: 0x0359, 0xd42: 0x0f61, 0xd43: 0x0f71, 0xd44: 0x00d9, 0xd45: 0x0f99,\n\t0xd46: 0x2039, 0xd47: 0x0269, 0xd48: 0x01d9, 0xd49: 0x0fa9, 0xd4a: 0x0fb9, 0xd4b: 0x1089,\n\t0xd4c: 0x0279, 0xd4d: 0x0369, 0xd4e: 0x0289, 0xd4f: 0x13d1, 0xd50: 0x0039, 0xd51: 0x0ee9,\n\t0xd52: 0x1159, 0xd53: 0x0ef9, 0xd54: 0x0f09, 0xd55: 0x1199, 0xd56: 0x0f31, 0xd57: 0x0249,\n\t0xd58: 0x0f41, 0xd59: 0x0259, 0xd5a: 0x0f51, 0xd5b: 0x0359, 0xd5c: 0x0f61, 0xd5d: 0x0f71,\n\t0xd5e: 0x00d9, 0xd5f: 0x0f99, 0xd60: 0x2039, 0xd61: 0x0269, 0xd62: 0x01d9, 0xd63: 0x0fa9,\n\t0xd64: 0x0fb9, 0xd65: 0x1089, 0xd66: 0x0279, 0xd67: 0x0369, 0xd68: 0x0289, 0xd69: 0x13d1,\n\t0xd6a: 0x1f41, 0xd6b: 0x0018, 0xd6c: 0x0018, 0xd6d: 0x0018, 0xd6e: 0x0018, 0xd6f: 0x0018,\n\t0xd70: 0x0018, 0xd71: 0x0018, 0xd72: 0x0018, 0xd73: 0x0018, 0xd74: 0x0018, 0xd75: 0x0018,\n\t0xd76: 0x0018, 0xd77: 0x0018, 0xd78: 0x0018, 0xd79: 0x0018, 0xd7a: 0x0018, 0xd7b: 0x0018,\n\t0xd7c: 0x0018, 0xd7d: 0x0018, 0xd7e: 0x0018, 0xd7f: 0x0018,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0008, 0xd81: 0x0008, 0xd82: 0x0008, 0xd83: 0x0008, 0xd84: 0x0008, 0xd85: 0x0008,\n\t0xd86: 0x0008, 0xd87: 0x0008, 0xd88: 0x0008, 0xd89: 0x0008, 0xd8a: 0x0008, 0xd8b: 0x0008,\n\t0xd8c: 0x0008, 0xd8d: 0x0008, 0xd8e: 0x0008, 0xd8f: 0x0008, 0xd90: 0x0008, 0xd91: 0x0008,\n\t0xd92: 0x0008, 0xd93: 0x0008, 0xd94: 0x0008, 0xd95: 0x0008, 0xd96: 0x0008, 0xd97: 0x0008,\n\t0xd98: 0x0008, 0xd99: 0x0008, 0xd9a: 0x0008, 0xd9b: 0x0008, 0xd9c: 0x0008, 0xd9d: 0x0008,\n\t0xd9e: 0x0008, 0xd9f: 0x0040, 0xda0: 0xe00d, 0xda1: 0x0008, 0xda2: 0x2971, 0xda3: 0x0ebd,\n\t0xda4: 0x2989, 0xda5: 0x0008, 0xda6: 0x0008, 0xda7: 0xe07d, 0xda8: 0x0008, 0xda9: 0xe01d,\n\t0xdaa: 0x0008, 0xdab: 0xe03d, 0xdac: 0x0008, 0xdad: 0x0fe1, 0xdae: 0x1281, 0xdaf: 0x0fc9,\n\t0xdb0: 0x1141, 0xdb1: 0x0008, 0xdb2: 0xe00d, 0xdb3: 0x0008, 0xdb4: 0x0008, 0xdb5: 0xe01d,\n\t0xdb6: 0x0008, 0xdb7: 0x0008, 0xdb8: 0x0008, 0xdb9: 0x0008, 0xdba: 0x0008, 0xdbb: 0x0008,\n\t0xdbc: 0x0259, 0xdbd: 0x1089, 0xdbe: 0x29a1, 0xdbf: 0x29b9,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0xe00d, 0xdc1: 0x0008, 0xdc2: 0xe00d, 0xdc3: 0x0008, 0xdc4: 0xe00d, 0xdc5: 0x0008,\n\t0xdc6: 0xe00d, 0xdc7: 0x0008, 0xdc8: 0xe00d, 0xdc9: 0x0008, 0xdca: 0xe00d, 0xdcb: 0x0008,\n\t0xdcc: 0xe00d, 0xdcd: 0x0008, 0xdce: 0xe00d, 0xdcf: 0x0008, 0xdd0: 0xe00d, 0xdd1: 0x0008,\n\t0xdd2: 0xe00d, 0xdd3: 0x0008, 0xdd4: 0xe00d, 0xdd5: 0x0008, 0xdd6: 0xe00d, 0xdd7: 0x0008,\n\t0xdd8: 0xe00d, 0xdd9: 0x0008, 0xdda: 0xe00d, 0xddb: 0x0008, 0xddc: 0xe00d, 0xddd: 0x0008,\n\t0xdde: 0xe00d, 0xddf: 0x0008, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0xe00d, 0xde3: 0x0008,\n\t0xde4: 0x0008, 0xde5: 0x0018, 0xde6: 0x0018, 0xde7: 0x0018, 0xde8: 0x0018, 0xde9: 0x0018,\n\t0xdea: 0x0018, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0xe01d, 0xdee: 0x0008, 0xdef: 0x3308,\n\t0xdf0: 0x3308, 0xdf1: 0x3308, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0040, 0xdf5: 0x0040,\n\t0xdf6: 0x0040, 0xdf7: 0x0040, 0xdf8: 0x0040, 0xdf9: 0x0018, 0xdfa: 0x0018, 0xdfb: 0x0018,\n\t0xdfc: 0x0018, 0xdfd: 0x0018, 0xdfe: 0x0018, 0xdff: 0x0018,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0x26fd, 0xe01: 0x271d, 0xe02: 0x273d, 0xe03: 0x275d, 0xe04: 0x277d, 0xe05: 0x279d,\n\t0xe06: 0x27bd, 0xe07: 0x27dd, 0xe08: 0x27fd, 0xe09: 0x281d, 0xe0a: 0x283d, 0xe0b: 0x285d,\n\t0xe0c: 0x287d, 0xe0d: 0x289d, 0xe0e: 0x28bd, 0xe0f: 0x28dd, 0xe10: 0x28fd, 0xe11: 0x291d,\n\t0xe12: 0x293d, 0xe13: 0x295d, 0xe14: 0x297d, 0xe15: 0x299d, 0xe16: 0x0040, 0xe17: 0x0040,\n\t0xe18: 0x0040, 0xe19: 0x0040, 0xe1a: 0x0040, 0xe1b: 0x0040, 0xe1c: 0x0040, 0xe1d: 0x0040,\n\t0xe1e: 0x0040, 0xe1f: 0x0040, 0xe20: 0x0040, 0xe21: 0x0040, 0xe22: 0x0040, 0xe23: 0x0040,\n\t0xe24: 0x0040, 0xe25: 0x0040, 0xe26: 0x0040, 0xe27: 0x0040, 0xe28: 0x0040, 0xe29: 0x0040,\n\t0xe2a: 0x0040, 0xe2b: 0x0040, 0xe2c: 0x0040, 0xe2d: 0x0040, 0xe2e: 0x0040, 0xe2f: 0x0040,\n\t0xe30: 0x0040, 0xe31: 0x0040, 0xe32: 0x0040, 0xe33: 0x0040, 0xe34: 0x0040, 0xe35: 0x0040,\n\t0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0040, 0xe3a: 0x0040, 0xe3b: 0x0040,\n\t0xe3c: 0x0040, 0xe3d: 0x0040, 0xe3e: 0x0040, 0xe3f: 0x0040,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x000a, 0xe41: 0x0018, 0xe42: 0x29d1, 0xe43: 0x0018, 0xe44: 0x0018, 0xe45: 0x0008,\n\t0xe46: 0x0008, 0xe47: 0x0008, 0xe48: 0x0018, 0xe49: 0x0018, 0xe4a: 0x0018, 0xe4b: 0x0018,\n\t0xe4c: 0x0018, 0xe4d: 0x0018, 0xe4e: 0x0018, 0xe4f: 0x0018, 0xe50: 0x0018, 0xe51: 0x0018,\n\t0xe52: 0x0018, 0xe53: 0x0018, 0xe54: 0x0018, 0xe55: 0x0018, 0xe56: 0x0018, 0xe57: 0x0018,\n\t0xe58: 0x0018, 0xe59: 0x0018, 0xe5a: 0x0018, 0xe5b: 0x0018, 0xe5c: 0x0018, 0xe5d: 0x0018,\n\t0xe5e: 0x0018, 0xe5f: 0x0018, 0xe60: 0x0018, 0xe61: 0x0018, 0xe62: 0x0018, 0xe63: 0x0018,\n\t0xe64: 0x0018, 0xe65: 0x0018, 0xe66: 0x0018, 0xe67: 0x0018, 0xe68: 0x0018, 0xe69: 0x0018,\n\t0xe6a: 0x3308, 0xe6b: 0x3308, 0xe6c: 0x3308, 0xe6d: 0x3308, 0xe6e: 0x3018, 0xe6f: 0x3018,\n\t0xe70: 0x0018, 0xe71: 0x0018, 0xe72: 0x0018, 0xe73: 0x0018, 0xe74: 0x0018, 0xe75: 0x0018,\n\t0xe76: 0xe125, 0xe77: 0x0018, 0xe78: 0x29bd, 0xe79: 0x29dd, 0xe7a: 0x29fd, 0xe7b: 0x0018,\n\t0xe7c: 0x0008, 0xe7d: 0x0018, 0xe7e: 0x0018, 0xe7f: 0x0018,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x2b3d, 0xe81: 0x2b5d, 0xe82: 0x2b7d, 0xe83: 0x2b9d, 0xe84: 0x2bbd, 0xe85: 0x2bdd,\n\t0xe86: 0x2bdd, 0xe87: 0x2bdd, 0xe88: 0x2bfd, 0xe89: 0x2bfd, 0xe8a: 0x2bfd, 0xe8b: 0x2bfd,\n\t0xe8c: 0x2c1d, 0xe8d: 0x2c1d, 0xe8e: 0x2c1d, 0xe8f: 0x2c3d, 0xe90: 0x2c5d, 0xe91: 0x2c5d,\n\t0xe92: 0x2a7d, 0xe93: 0x2a7d, 0xe94: 0x2c5d, 0xe95: 0x2c5d, 0xe96: 0x2c7d, 0xe97: 0x2c7d,\n\t0xe98: 0x2c5d, 0xe99: 0x2c5d, 0xe9a: 0x2a7d, 0xe9b: 0x2a7d, 0xe9c: 0x2c5d, 0xe9d: 0x2c5d,\n\t0xe9e: 0x2c3d, 0xe9f: 0x2c3d, 0xea0: 0x2c9d, 0xea1: 0x2c9d, 0xea2: 0x2cbd, 0xea3: 0x2cbd,\n\t0xea4: 0x0040, 0xea5: 0x2cdd, 0xea6: 0x2cfd, 0xea7: 0x2d1d, 0xea8: 0x2d1d, 0xea9: 0x2d3d,\n\t0xeaa: 0x2d5d, 0xeab: 0x2d7d, 0xeac: 0x2d9d, 0xead: 0x2dbd, 0xeae: 0x2ddd, 0xeaf: 0x2dfd,\n\t0xeb0: 0x2e1d, 0xeb1: 0x2e3d, 0xeb2: 0x2e3d, 0xeb3: 0x2e5d, 0xeb4: 0x2e7d, 0xeb5: 0x2e7d,\n\t0xeb6: 0x2e9d, 0xeb7: 0x2ebd, 0xeb8: 0x2e5d, 0xeb9: 0x2edd, 0xeba: 0x2efd, 0xebb: 0x2edd,\n\t0xebc: 0x2e5d, 0xebd: 0x2f1d, 0xebe: 0x2f3d, 0xebf: 0x2f5d,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x2f7d, 0xec1: 0x2f9d, 0xec2: 0x2cfd, 0xec3: 0x2cdd, 0xec4: 0x2fbd, 0xec5: 0x2fdd,\n\t0xec6: 0x2ffd, 0xec7: 0x301d, 0xec8: 0x303d, 0xec9: 0x305d, 0xeca: 0x307d, 0xecb: 0x309d,\n\t0xecc: 0x30bd, 0xecd: 0x30dd, 0xece: 0x30fd, 0xecf: 0x0040, 0xed0: 0x0018, 0xed1: 0x0018,\n\t0xed2: 0x311d, 0xed3: 0x313d, 0xed4: 0x315d, 0xed5: 0x317d, 0xed6: 0x319d, 0xed7: 0x31bd,\n\t0xed8: 0x31dd, 0xed9: 0x31fd, 0xeda: 0x321d, 0xedb: 0x323d, 0xedc: 0x315d, 0xedd: 0x325d,\n\t0xede: 0x327d, 0xedf: 0x329d, 0xee0: 0x0008, 0xee1: 0x0008, 0xee2: 0x0008, 0xee3: 0x0008,\n\t0xee4: 0x0008, 0xee5: 0x0008, 0xee6: 0x0008, 0xee7: 0x0008, 0xee8: 0x0008, 0xee9: 0x0008,\n\t0xeea: 0x0008, 0xeeb: 0x0008, 0xeec: 0x0008, 0xeed: 0x0008, 0xeee: 0x0008, 0xeef: 0x0008,\n\t0xef0: 0x0008, 0xef1: 0x0008, 0xef2: 0x0008, 0xef3: 0x0008, 0xef4: 0x0008, 0xef5: 0x0008,\n\t0xef6: 0x0008, 0xef7: 0x0008, 0xef8: 0x0008, 0xef9: 0x0008, 0xefa: 0x0008, 0xefb: 0x0040,\n\t0xefc: 0x0040, 0xefd: 0x0040, 0xefe: 0x0040, 0xeff: 0x0040,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x36a2, 0xf01: 0x36d2, 0xf02: 0x3702, 0xf03: 0x3732, 0xf04: 0x32bd, 0xf05: 0x32dd,\n\t0xf06: 0x32fd, 0xf07: 0x331d, 0xf08: 0x0018, 0xf09: 0x0018, 0xf0a: 0x0018, 0xf0b: 0x0018,\n\t0xf0c: 0x0018, 0xf0d: 0x0018, 0xf0e: 0x0018, 0xf0f: 0x0018, 0xf10: 0x333d, 0xf11: 0x3761,\n\t0xf12: 0x3779, 0xf13: 0x3791, 0xf14: 0x37a9, 0xf15: 0x37c1, 0xf16: 0x37d9, 0xf17: 0x37f1,\n\t0xf18: 0x3809, 0xf19: 0x3821, 0xf1a: 0x3839, 0xf1b: 0x3851, 0xf1c: 0x3869, 0xf1d: 0x3881,\n\t0xf1e: 0x3899, 0xf1f: 0x38b1, 0xf20: 0x335d, 0xf21: 0x337d, 0xf22: 0x339d, 0xf23: 0x33bd,\n\t0xf24: 0x33dd, 0xf25: 0x33dd, 0xf26: 0x33fd, 0xf27: 0x341d, 0xf28: 0x343d, 0xf29: 0x345d,\n\t0xf2a: 0x347d, 0xf2b: 0x349d, 0xf2c: 0x34bd, 0xf2d: 0x34dd, 0xf2e: 0x34fd, 0xf2f: 0x351d,\n\t0xf30: 0x353d, 0xf31: 0x355d, 0xf32: 0x357d, 0xf33: 0x359d, 0xf34: 0x35bd, 0xf35: 0x35dd,\n\t0xf36: 0x35fd, 0xf37: 0x361d, 0xf38: 0x363d, 0xf39: 0x365d, 0xf3a: 0x367d, 0xf3b: 0x369d,\n\t0xf3c: 0x38c9, 0xf3d: 0x3901, 0xf3e: 0x36bd, 0xf3f: 0x0018,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x36dd, 0xf41: 0x36fd, 0xf42: 0x371d, 0xf43: 0x373d, 0xf44: 0x375d, 0xf45: 0x377d,\n\t0xf46: 0x379d, 0xf47: 0x37bd, 0xf48: 0x37dd, 0xf49: 0x37fd, 0xf4a: 0x381d, 0xf4b: 0x383d,\n\t0xf4c: 0x385d, 0xf4d: 0x387d, 0xf4e: 0x389d, 0xf4f: 0x38bd, 0xf50: 0x38dd, 0xf51: 0x38fd,\n\t0xf52: 0x391d, 0xf53: 0x393d, 0xf54: 0x395d, 0xf55: 0x397d, 0xf56: 0x399d, 0xf57: 0x39bd,\n\t0xf58: 0x39dd, 0xf59: 0x39fd, 0xf5a: 0x3a1d, 0xf5b: 0x3a3d, 0xf5c: 0x3a5d, 0xf5d: 0x3a7d,\n\t0xf5e: 0x3a9d, 0xf5f: 0x3abd, 0xf60: 0x3add, 0xf61: 0x3afd, 0xf62: 0x3b1d, 0xf63: 0x3b3d,\n\t0xf64: 0x3b5d, 0xf65: 0x3b7d, 0xf66: 0x127d, 0xf67: 0x3b9d, 0xf68: 0x3bbd, 0xf69: 0x3bdd,\n\t0xf6a: 0x3bfd, 0xf6b: 0x3c1d, 0xf6c: 0x3c3d, 0xf6d: 0x3c5d, 0xf6e: 0x239d, 0xf6f: 0x3c7d,\n\t0xf70: 0x3c9d, 0xf71: 0x3939, 0xf72: 0x3951, 0xf73: 0x3969, 0xf74: 0x3981, 0xf75: 0x3999,\n\t0xf76: 0x39b1, 0xf77: 0x39c9, 0xf78: 0x39e1, 0xf79: 0x39f9, 0xf7a: 0x3a11, 0xf7b: 0x3a29,\n\t0xf7c: 0x3a41, 0xf7d: 0x3a59, 0xf7e: 0x3a71, 0xf7f: 0x3a89,\n\t// Block 0x3e, offset 0xf80\n\t0xf80: 0x3aa1, 0xf81: 0x3ac9, 0xf82: 0x3af1, 0xf83: 0x3b19, 0xf84: 0x3b41, 0xf85: 0x3b69,\n\t0xf86: 0x3b91, 0xf87: 0x3bb9, 0xf88: 0x3be1, 0xf89: 0x3c09, 0xf8a: 0x3c39, 0xf8b: 0x3c69,\n\t0xf8c: 0x3c99, 0xf8d: 0x3cbd, 0xf8e: 0x3cb1, 0xf8f: 0x3cdd, 0xf90: 0x3cfd, 0xf91: 0x3d15,\n\t0xf92: 0x3d2d, 0xf93: 0x3d45, 0xf94: 0x3d5d, 0xf95: 0x3d5d, 0xf96: 0x3d45, 0xf97: 0x3d75,\n\t0xf98: 0x07bd, 0xf99: 0x3d8d, 0xf9a: 0x3da5, 0xf9b: 0x3dbd, 0xf9c: 0x3dd5, 0xf9d: 0x3ded,\n\t0xf9e: 0x3e05, 0xf9f: 0x3e1d, 0xfa0: 0x3e35, 0xfa1: 0x3e4d, 0xfa2: 0x3e65, 0xfa3: 0x3e7d,\n\t0xfa4: 0x3e95, 0xfa5: 0x3e95, 0xfa6: 0x3ead, 0xfa7: 0x3ead, 0xfa8: 0x3ec5, 0xfa9: 0x3ec5,\n\t0xfaa: 0x3edd, 0xfab: 0x3ef5, 0xfac: 0x3f0d, 0xfad: 0x3f25, 0xfae: 0x3f3d, 0xfaf: 0x3f3d,\n\t0xfb0: 0x3f55, 0xfb1: 0x3f55, 0xfb2: 0x3f55, 0xfb3: 0x3f6d, 0xfb4: 0x3f85, 0xfb5: 0x3f9d,\n\t0xfb6: 0x3fb5, 0xfb7: 0x3f9d, 0xfb8: 0x3fcd, 0xfb9: 0x3fe5, 0xfba: 0x3f6d, 0xfbb: 0x3ffd,\n\t0xfbc: 0x4015, 0xfbd: 0x4015, 0xfbe: 0x4015, 0xfbf: 0x0040,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x3cc9, 0xfc1: 0x3d31, 0xfc2: 0x3d99, 0xfc3: 0x3e01, 0xfc4: 0x3e51, 0xfc5: 0x3eb9,\n\t0xfc6: 0x3f09, 0xfc7: 0x3f59, 0xfc8: 0x3fd9, 0xfc9: 0x4041, 0xfca: 0x4091, 0xfcb: 0x40e1,\n\t0xfcc: 0x4131, 0xfcd: 0x4199, 0xfce: 0x4201, 0xfcf: 0x4251, 0xfd0: 0x42a1, 0xfd1: 0x42d9,\n\t0xfd2: 0x4329, 0xfd3: 0x4391, 0xfd4: 0x43f9, 0xfd5: 0x4431, 0xfd6: 0x44b1, 0xfd7: 0x4549,\n\t0xfd8: 0x45c9, 0xfd9: 0x4619, 0xfda: 0x4699, 0xfdb: 0x4719, 0xfdc: 0x4781, 0xfdd: 0x47d1,\n\t0xfde: 0x4821, 0xfdf: 0x4871, 0xfe0: 0x48d9, 0xfe1: 0x4959, 0xfe2: 0x49c1, 0xfe3: 0x4a11,\n\t0xfe4: 0x4a61, 0xfe5: 0x4ab1, 0xfe6: 0x4ae9, 0xfe7: 0x4b21, 0xfe8: 0x4b59, 0xfe9: 0x4b91,\n\t0xfea: 0x4be1, 0xfeb: 0x4c31, 0xfec: 0x4cb1, 0xfed: 0x4d01, 0xfee: 0x4d69, 0xfef: 0x4de9,\n\t0xff0: 0x4e39, 0xff1: 0x4e71, 0xff2: 0x4ea9, 0xff3: 0x4f29, 0xff4: 0x4f91, 0xff5: 0x5011,\n\t0xff6: 0x5061, 0xff7: 0x50e1, 0xff8: 0x5119, 0xff9: 0x5169, 0xffa: 0x51b9, 0xffb: 0x5209,\n\t0xffc: 0x5259, 0xffd: 0x52a9, 0xffe: 0x5311, 0xfff: 0x5361,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x5399, 0x1001: 0x53e9, 0x1002: 0x5439, 0x1003: 0x5489, 0x1004: 0x54f1, 0x1005: 0x5541,\n\t0x1006: 0x5591, 0x1007: 0x55e1, 0x1008: 0x5661, 0x1009: 0x56c9, 0x100a: 0x5701, 0x100b: 0x5781,\n\t0x100c: 0x57b9, 0x100d: 0x5821, 0x100e: 0x5889, 0x100f: 0x58d9, 0x1010: 0x5929, 0x1011: 0x5979,\n\t0x1012: 0x59e1, 0x1013: 0x5a19, 0x1014: 0x5a69, 0x1015: 0x5ad1, 0x1016: 0x5b09, 0x1017: 0x5b89,\n\t0x1018: 0x5bd9, 0x1019: 0x5c01, 0x101a: 0x5c29, 0x101b: 0x5c51, 0x101c: 0x5c79, 0x101d: 0x5ca1,\n\t0x101e: 0x5cc9, 0x101f: 0x5cf1, 0x1020: 0x5d19, 0x1021: 0x5d41, 0x1022: 0x5d69, 0x1023: 0x5d99,\n\t0x1024: 0x5dc9, 0x1025: 0x5df9, 0x1026: 0x5e29, 0x1027: 0x5e59, 0x1028: 0x5e89, 0x1029: 0x5eb9,\n\t0x102a: 0x5ee9, 0x102b: 0x5f19, 0x102c: 0x5f49, 0x102d: 0x5f79, 0x102e: 0x5fa9, 0x102f: 0x5fd9,\n\t0x1030: 0x6009, 0x1031: 0x402d, 0x1032: 0x6039, 0x1033: 0x6051, 0x1034: 0x404d, 0x1035: 0x6069,\n\t0x1036: 0x6081, 0x1037: 0x6099, 0x1038: 0x406d, 0x1039: 0x406d, 0x103a: 0x60b1, 0x103b: 0x60c9,\n\t0x103c: 0x6101, 0x103d: 0x6139, 0x103e: 0x6171, 0x103f: 0x61a9,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x6211, 0x1041: 0x6229, 0x1042: 0x408d, 0x1043: 0x6241, 0x1044: 0x6259, 0x1045: 0x6271,\n\t0x1046: 0x6289, 0x1047: 0x62a1, 0x1048: 0x40ad, 0x1049: 0x62b9, 0x104a: 0x62e1, 0x104b: 0x62f9,\n\t0x104c: 0x40cd, 0x104d: 0x40cd, 0x104e: 0x6311, 0x104f: 0x6329, 0x1050: 0x6341, 0x1051: 0x40ed,\n\t0x1052: 0x410d, 0x1053: 0x412d, 0x1054: 0x414d, 0x1055: 0x416d, 0x1056: 0x6359, 0x1057: 0x6371,\n\t0x1058: 0x6389, 0x1059: 0x63a1, 0x105a: 0x63b9, 0x105b: 0x418d, 0x105c: 0x63d1, 0x105d: 0x63e9,\n\t0x105e: 0x6401, 0x105f: 0x41ad, 0x1060: 0x41cd, 0x1061: 0x6419, 0x1062: 0x41ed, 0x1063: 0x420d,\n\t0x1064: 0x422d, 0x1065: 0x6431, 0x1066: 0x424d, 0x1067: 0x6449, 0x1068: 0x6479, 0x1069: 0x6211,\n\t0x106a: 0x426d, 0x106b: 0x428d, 0x106c: 0x42ad, 0x106d: 0x42cd, 0x106e: 0x64b1, 0x106f: 0x64f1,\n\t0x1070: 0x6539, 0x1071: 0x6551, 0x1072: 0x42ed, 0x1073: 0x6569, 0x1074: 0x6581, 0x1075: 0x6599,\n\t0x1076: 0x430d, 0x1077: 0x65b1, 0x1078: 0x65c9, 0x1079: 0x65b1, 0x107a: 0x65e1, 0x107b: 0x65f9,\n\t0x107c: 0x432d, 0x107d: 0x6611, 0x107e: 0x6629, 0x107f: 0x6611,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x434d, 0x1081: 0x436d, 0x1082: 0x0040, 0x1083: 0x6641, 0x1084: 0x6659, 0x1085: 0x6671,\n\t0x1086: 0x6689, 0x1087: 0x0040, 0x1088: 0x66c1, 0x1089: 0x66d9, 0x108a: 0x66f1, 0x108b: 0x6709,\n\t0x108c: 0x6721, 0x108d: 0x6739, 0x108e: 0x6401, 0x108f: 0x6751, 0x1090: 0x6769, 0x1091: 0x6781,\n\t0x1092: 0x438d, 0x1093: 0x6799, 0x1094: 0x6289, 0x1095: 0x43ad, 0x1096: 0x43cd, 0x1097: 0x67b1,\n\t0x1098: 0x0040, 0x1099: 0x43ed, 0x109a: 0x67c9, 0x109b: 0x67e1, 0x109c: 0x67f9, 0x109d: 0x6811,\n\t0x109e: 0x6829, 0x109f: 0x6859, 0x10a0: 0x6889, 0x10a1: 0x68b1, 0x10a2: 0x68d9, 0x10a3: 0x6901,\n\t0x10a4: 0x6929, 0x10a5: 0x6951, 0x10a6: 0x6979, 0x10a7: 0x69a1, 0x10a8: 0x69c9, 0x10a9: 0x69f1,\n\t0x10aa: 0x6a21, 0x10ab: 0x6a51, 0x10ac: 0x6a81, 0x10ad: 0x6ab1, 0x10ae: 0x6ae1, 0x10af: 0x6b11,\n\t0x10b0: 0x6b41, 0x10b1: 0x6b71, 0x10b2: 0x6ba1, 0x10b3: 0x6bd1, 0x10b4: 0x6c01, 0x10b5: 0x6c31,\n\t0x10b6: 0x6c61, 0x10b7: 0x6c91, 0x10b8: 0x6cc1, 0x10b9: 0x6cf1, 0x10ba: 0x6d21, 0x10bb: 0x6d51,\n\t0x10bc: 0x6d81, 0x10bd: 0x6db1, 0x10be: 0x6de1, 0x10bf: 0x440d,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0xe00d, 0x10c1: 0x0008, 0x10c2: 0xe00d, 0x10c3: 0x0008, 0x10c4: 0xe00d, 0x10c5: 0x0008,\n\t0x10c6: 0xe00d, 0x10c7: 0x0008, 0x10c8: 0xe00d, 0x10c9: 0x0008, 0x10ca: 0xe00d, 0x10cb: 0x0008,\n\t0x10cc: 0xe00d, 0x10cd: 0x0008, 0x10ce: 0xe00d, 0x10cf: 0x0008, 0x10d0: 0xe00d, 0x10d1: 0x0008,\n\t0x10d2: 0xe00d, 0x10d3: 0x0008, 0x10d4: 0xe00d, 0x10d5: 0x0008, 0x10d6: 0xe00d, 0x10d7: 0x0008,\n\t0x10d8: 0xe00d, 0x10d9: 0x0008, 0x10da: 0xe00d, 0x10db: 0x0008, 0x10dc: 0xe00d, 0x10dd: 0x0008,\n\t0x10de: 0xe00d, 0x10df: 0x0008, 0x10e0: 0xe00d, 0x10e1: 0x0008, 0x10e2: 0xe00d, 0x10e3: 0x0008,\n\t0x10e4: 0xe00d, 0x10e5: 0x0008, 0x10e6: 0xe00d, 0x10e7: 0x0008, 0x10e8: 0xe00d, 0x10e9: 0x0008,\n\t0x10ea: 0xe00d, 0x10eb: 0x0008, 0x10ec: 0xe00d, 0x10ed: 0x0008, 0x10ee: 0x0008, 0x10ef: 0x3308,\n\t0x10f0: 0x3318, 0x10f1: 0x3318, 0x10f2: 0x3318, 0x10f3: 0x0018, 0x10f4: 0x3308, 0x10f5: 0x3308,\n\t0x10f6: 0x3308, 0x10f7: 0x3308, 0x10f8: 0x3308, 0x10f9: 0x3308, 0x10fa: 0x3308, 0x10fb: 0x3308,\n\t0x10fc: 0x3308, 0x10fd: 0x3308, 0x10fe: 0x0018, 0x10ff: 0x0008,\n\t// Block 0x44, offset 0x1100\n\t0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008,\n\t0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008,\n\t0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008,\n\t0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008,\n\t0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0x0ea1, 0x111d: 0x6e11,\n\t0x111e: 0x3308, 0x111f: 0x3308, 0x1120: 0x0008, 0x1121: 0x0008, 0x1122: 0x0008, 0x1123: 0x0008,\n\t0x1124: 0x0008, 0x1125: 0x0008, 0x1126: 0x0008, 0x1127: 0x0008, 0x1128: 0x0008, 0x1129: 0x0008,\n\t0x112a: 0x0008, 0x112b: 0x0008, 0x112c: 0x0008, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x0008,\n\t0x1130: 0x0008, 0x1131: 0x0008, 0x1132: 0x0008, 0x1133: 0x0008, 0x1134: 0x0008, 0x1135: 0x0008,\n\t0x1136: 0x0008, 0x1137: 0x0008, 0x1138: 0x0008, 0x1139: 0x0008, 0x113a: 0x0008, 0x113b: 0x0008,\n\t0x113c: 0x0008, 0x113d: 0x0008, 0x113e: 0x0008, 0x113f: 0x0008,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0x0018, 0x1141: 0x0018, 0x1142: 0x0018, 0x1143: 0x0018, 0x1144: 0x0018, 0x1145: 0x0018,\n\t0x1146: 0x0018, 0x1147: 0x0018, 0x1148: 0x0018, 0x1149: 0x0018, 0x114a: 0x0018, 0x114b: 0x0018,\n\t0x114c: 0x0018, 0x114d: 0x0018, 0x114e: 0x0018, 0x114f: 0x0018, 0x1150: 0x0018, 0x1151: 0x0018,\n\t0x1152: 0x0018, 0x1153: 0x0018, 0x1154: 0x0018, 0x1155: 0x0018, 0x1156: 0x0018, 0x1157: 0x0008,\n\t0x1158: 0x0008, 0x1159: 0x0008, 0x115a: 0x0008, 0x115b: 0x0008, 0x115c: 0x0008, 0x115d: 0x0008,\n\t0x115e: 0x0008, 0x115f: 0x0008, 0x1160: 0x0018, 0x1161: 0x0018, 0x1162: 0xe00d, 0x1163: 0x0008,\n\t0x1164: 0xe00d, 0x1165: 0x0008, 0x1166: 0xe00d, 0x1167: 0x0008, 0x1168: 0xe00d, 0x1169: 0x0008,\n\t0x116a: 0xe00d, 0x116b: 0x0008, 0x116c: 0xe00d, 0x116d: 0x0008, 0x116e: 0xe00d, 0x116f: 0x0008,\n\t0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0xe00d, 0x1173: 0x0008, 0x1174: 0xe00d, 0x1175: 0x0008,\n\t0x1176: 0xe00d, 0x1177: 0x0008, 0x1178: 0xe00d, 0x1179: 0x0008, 0x117a: 0xe00d, 0x117b: 0x0008,\n\t0x117c: 0xe00d, 0x117d: 0x0008, 0x117e: 0xe00d, 0x117f: 0x0008,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0xe00d, 0x1181: 0x0008, 0x1182: 0xe00d, 0x1183: 0x0008, 0x1184: 0xe00d, 0x1185: 0x0008,\n\t0x1186: 0xe00d, 0x1187: 0x0008, 0x1188: 0xe00d, 0x1189: 0x0008, 0x118a: 0xe00d, 0x118b: 0x0008,\n\t0x118c: 0xe00d, 0x118d: 0x0008, 0x118e: 0xe00d, 0x118f: 0x0008, 0x1190: 0xe00d, 0x1191: 0x0008,\n\t0x1192: 0xe00d, 0x1193: 0x0008, 0x1194: 0xe00d, 0x1195: 0x0008, 0x1196: 0xe00d, 0x1197: 0x0008,\n\t0x1198: 0xe00d, 0x1199: 0x0008, 0x119a: 0xe00d, 0x119b: 0x0008, 0x119c: 0xe00d, 0x119d: 0x0008,\n\t0x119e: 0xe00d, 0x119f: 0x0008, 0x11a0: 0xe00d, 0x11a1: 0x0008, 0x11a2: 0xe00d, 0x11a3: 0x0008,\n\t0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008,\n\t0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008,\n\t0x11b0: 0xe0fd, 0x11b1: 0x0008, 0x11b2: 0x0008, 0x11b3: 0x0008, 0x11b4: 0x0008, 0x11b5: 0x0008,\n\t0x11b6: 0x0008, 0x11b7: 0x0008, 0x11b8: 0x0008, 0x11b9: 0xe01d, 0x11ba: 0x0008, 0x11bb: 0xe03d,\n\t0x11bc: 0x0008, 0x11bd: 0x442d, 0x11be: 0xe00d, 0x11bf: 0x0008,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008,\n\t0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0x0008, 0x11c9: 0x0018, 0x11ca: 0x0018, 0x11cb: 0xe03d,\n\t0x11cc: 0x0008, 0x11cd: 0x11d9, 0x11ce: 0x0008, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008,\n\t0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0x0008, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008,\n\t0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008,\n\t0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008,\n\t0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008,\n\t0x11ea: 0x6e29, 0x11eb: 0x1029, 0x11ec: 0x11c1, 0x11ed: 0x6e41, 0x11ee: 0x1221, 0x11ef: 0x0040,\n\t0x11f0: 0x6e59, 0x11f1: 0x6e71, 0x11f2: 0x1239, 0x11f3: 0x444d, 0x11f4: 0xe00d, 0x11f5: 0x0008,\n\t0x11f6: 0xe00d, 0x11f7: 0x0008, 0x11f8: 0x0040, 0x11f9: 0x0040, 0x11fa: 0x0040, 0x11fb: 0x0040,\n\t0x11fc: 0x0040, 0x11fd: 0x0040, 0x11fe: 0x0040, 0x11ff: 0x0040,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x64d5, 0x1201: 0x64f5, 0x1202: 0x6515, 0x1203: 0x6535, 0x1204: 0x6555, 0x1205: 0x6575,\n\t0x1206: 0x6595, 0x1207: 0x65b5, 0x1208: 0x65d5, 0x1209: 0x65f5, 0x120a: 0x6615, 0x120b: 0x6635,\n\t0x120c: 0x6655, 0x120d: 0x6675, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0x6695, 0x1211: 0x0008,\n\t0x1212: 0x66b5, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x66d5, 0x1216: 0x66f5, 0x1217: 0x6715,\n\t0x1218: 0x6735, 0x1219: 0x6755, 0x121a: 0x6775, 0x121b: 0x6795, 0x121c: 0x67b5, 0x121d: 0x67d5,\n\t0x121e: 0x67f5, 0x121f: 0x0008, 0x1220: 0x6815, 0x1221: 0x0008, 0x1222: 0x6835, 0x1223: 0x0008,\n\t0x1224: 0x0008, 0x1225: 0x6855, 0x1226: 0x6875, 0x1227: 0x0008, 0x1228: 0x0008, 0x1229: 0x0008,\n\t0x122a: 0x6895, 0x122b: 0x68b5, 0x122c: 0x68d5, 0x122d: 0x68f5, 0x122e: 0x6915, 0x122f: 0x6935,\n\t0x1230: 0x6955, 0x1231: 0x6975, 0x1232: 0x6995, 0x1233: 0x69b5, 0x1234: 0x69d5, 0x1235: 0x69f5,\n\t0x1236: 0x6a15, 0x1237: 0x6a35, 0x1238: 0x6a55, 0x1239: 0x6a75, 0x123a: 0x6a95, 0x123b: 0x6ab5,\n\t0x123c: 0x6ad5, 0x123d: 0x6af5, 0x123e: 0x6b15, 0x123f: 0x6b35,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x7a95, 0x1241: 0x7ab5, 0x1242: 0x7ad5, 0x1243: 0x7af5, 0x1244: 0x7b15, 0x1245: 0x7b35,\n\t0x1246: 0x7b55, 0x1247: 0x7b75, 0x1248: 0x7b95, 0x1249: 0x7bb5, 0x124a: 0x7bd5, 0x124b: 0x7bf5,\n\t0x124c: 0x7c15, 0x124d: 0x7c35, 0x124e: 0x7c55, 0x124f: 0x6ec9, 0x1250: 0x6ef1, 0x1251: 0x6f19,\n\t0x1252: 0x7c75, 0x1253: 0x7c95, 0x1254: 0x7cb5, 0x1255: 0x6f41, 0x1256: 0x6f69, 0x1257: 0x6f91,\n\t0x1258: 0x7cd5, 0x1259: 0x7cf5, 0x125a: 0x0040, 0x125b: 0x0040, 0x125c: 0x0040, 0x125d: 0x0040,\n\t0x125e: 0x0040, 0x125f: 0x0040, 0x1260: 0x0040, 0x1261: 0x0040, 0x1262: 0x0040, 0x1263: 0x0040,\n\t0x1264: 0x0040, 0x1265: 0x0040, 0x1266: 0x0040, 0x1267: 0x0040, 0x1268: 0x0040, 0x1269: 0x0040,\n\t0x126a: 0x0040, 0x126b: 0x0040, 0x126c: 0x0040, 0x126d: 0x0040, 0x126e: 0x0040, 0x126f: 0x0040,\n\t0x1270: 0x0040, 0x1271: 0x0040, 0x1272: 0x0040, 0x1273: 0x0040, 0x1274: 0x0040, 0x1275: 0x0040,\n\t0x1276: 0x0040, 0x1277: 0x0040, 0x1278: 0x0040, 0x1279: 0x0040, 0x127a: 0x0040, 0x127b: 0x0040,\n\t0x127c: 0x0040, 0x127d: 0x0040, 0x127e: 0x0040, 0x127f: 0x0040,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x6fb9, 0x1281: 0x6fd1, 0x1282: 0x6fe9, 0x1283: 0x7d15, 0x1284: 0x7d35, 0x1285: 0x7001,\n\t0x1286: 0x7001, 0x1287: 0x0040, 0x1288: 0x0040, 0x1289: 0x0040, 0x128a: 0x0040, 0x128b: 0x0040,\n\t0x128c: 0x0040, 0x128d: 0x0040, 0x128e: 0x0040, 0x128f: 0x0040, 0x1290: 0x0040, 0x1291: 0x0040,\n\t0x1292: 0x0040, 0x1293: 0x7019, 0x1294: 0x7041, 0x1295: 0x7069, 0x1296: 0x7091, 0x1297: 0x70b9,\n\t0x1298: 0x0040, 0x1299: 0x0040, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x70e1,\n\t0x129e: 0x3308, 0x129f: 0x7109, 0x12a0: 0x7131, 0x12a1: 0x20a9, 0x12a2: 0x20f1, 0x12a3: 0x7149,\n\t0x12a4: 0x7161, 0x12a5: 0x7179, 0x12a6: 0x7191, 0x12a7: 0x71a9, 0x12a8: 0x71c1, 0x12a9: 0x1fb2,\n\t0x12aa: 0x71d9, 0x12ab: 0x7201, 0x12ac: 0x7229, 0x12ad: 0x7261, 0x12ae: 0x7299, 0x12af: 0x72c1,\n\t0x12b0: 0x72e9, 0x12b1: 0x7311, 0x12b2: 0x7339, 0x12b3: 0x7361, 0x12b4: 0x7389, 0x12b5: 0x73b1,\n\t0x12b6: 0x73d9, 0x12b7: 0x0040, 0x12b8: 0x7401, 0x12b9: 0x7429, 0x12ba: 0x7451, 0x12bb: 0x7479,\n\t0x12bc: 0x74a1, 0x12bd: 0x0040, 0x12be: 0x74c9, 0x12bf: 0x0040,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x74f1, 0x12c1: 0x7519, 0x12c2: 0x0040, 0x12c3: 0x7541, 0x12c4: 0x7569, 0x12c5: 0x0040,\n\t0x12c6: 0x7591, 0x12c7: 0x75b9, 0x12c8: 0x75e1, 0x12c9: 0x7609, 0x12ca: 0x7631, 0x12cb: 0x7659,\n\t0x12cc: 0x7681, 0x12cd: 0x76a9, 0x12ce: 0x76d1, 0x12cf: 0x76f9, 0x12d0: 0x7721, 0x12d1: 0x7721,\n\t0x12d2: 0x7739, 0x12d3: 0x7739, 0x12d4: 0x7739, 0x12d5: 0x7739, 0x12d6: 0x7751, 0x12d7: 0x7751,\n\t0x12d8: 0x7751, 0x12d9: 0x7751, 0x12da: 0x7769, 0x12db: 0x7769, 0x12dc: 0x7769, 0x12dd: 0x7769,\n\t0x12de: 0x7781, 0x12df: 0x7781, 0x12e0: 0x7781, 0x12e1: 0x7781, 0x12e2: 0x7799, 0x12e3: 0x7799,\n\t0x12e4: 0x7799, 0x12e5: 0x7799, 0x12e6: 0x77b1, 0x12e7: 0x77b1, 0x12e8: 0x77b1, 0x12e9: 0x77b1,\n\t0x12ea: 0x77c9, 0x12eb: 0x77c9, 0x12ec: 0x77c9, 0x12ed: 0x77c9, 0x12ee: 0x77e1, 0x12ef: 0x77e1,\n\t0x12f0: 0x77e1, 0x12f1: 0x77e1, 0x12f2: 0x77f9, 0x12f3: 0x77f9, 0x12f4: 0x77f9, 0x12f5: 0x77f9,\n\t0x12f6: 0x7811, 0x12f7: 0x7811, 0x12f8: 0x7811, 0x12f9: 0x7811, 0x12fa: 0x7829, 0x12fb: 0x7829,\n\t0x12fc: 0x7829, 0x12fd: 0x7829, 0x12fe: 0x7841, 0x12ff: 0x7841,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x7841, 0x1301: 0x7841, 0x1302: 0x7859, 0x1303: 0x7859, 0x1304: 0x7871, 0x1305: 0x7871,\n\t0x1306: 0x7889, 0x1307: 0x7889, 0x1308: 0x78a1, 0x1309: 0x78a1, 0x130a: 0x78b9, 0x130b: 0x78b9,\n\t0x130c: 0x78d1, 0x130d: 0x78d1, 0x130e: 0x78e9, 0x130f: 0x78e9, 0x1310: 0x78e9, 0x1311: 0x78e9,\n\t0x1312: 0x7901, 0x1313: 0x7901, 0x1314: 0x7901, 0x1315: 0x7901, 0x1316: 0x7919, 0x1317: 0x7919,\n\t0x1318: 0x7919, 0x1319: 0x7919, 0x131a: 0x7931, 0x131b: 0x7931, 0x131c: 0x7931, 0x131d: 0x7931,\n\t0x131e: 0x7949, 0x131f: 0x7949, 0x1320: 0x7961, 0x1321: 0x7961, 0x1322: 0x7961, 0x1323: 0x7961,\n\t0x1324: 0x7979, 0x1325: 0x7979, 0x1326: 0x7991, 0x1327: 0x7991, 0x1328: 0x7991, 0x1329: 0x7991,\n\t0x132a: 0x79a9, 0x132b: 0x79a9, 0x132c: 0x79a9, 0x132d: 0x79a9, 0x132e: 0x79c1, 0x132f: 0x79c1,\n\t0x1330: 0x79d9, 0x1331: 0x79d9, 0x1332: 0x0818, 0x1333: 0x0818, 0x1334: 0x0818, 0x1335: 0x0818,\n\t0x1336: 0x0818, 0x1337: 0x0818, 0x1338: 0x0818, 0x1339: 0x0818, 0x133a: 0x0818, 0x133b: 0x0818,\n\t0x133c: 0x0818, 0x133d: 0x0818, 0x133e: 0x0818, 0x133f: 0x0818,\n\t// Block 0x4d, offset 0x1340\n\t0x1340: 0x0818, 0x1341: 0x0818, 0x1342: 0x0040, 0x1343: 0x0040, 0x1344: 0x0040, 0x1345: 0x0040,\n\t0x1346: 0x0040, 0x1347: 0x0040, 0x1348: 0x0040, 0x1349: 0x0040, 0x134a: 0x0040, 0x134b: 0x0040,\n\t0x134c: 0x0040, 0x134d: 0x0040, 0x134e: 0x0040, 0x134f: 0x0040, 0x1350: 0x0040, 0x1351: 0x0040,\n\t0x1352: 0x0040, 0x1353: 0x79f1, 0x1354: 0x79f1, 0x1355: 0x79f1, 0x1356: 0x79f1, 0x1357: 0x7a09,\n\t0x1358: 0x7a09, 0x1359: 0x7a21, 0x135a: 0x7a21, 0x135b: 0x7a39, 0x135c: 0x7a39, 0x135d: 0x0479,\n\t0x135e: 0x7a51, 0x135f: 0x7a51, 0x1360: 0x7a69, 0x1361: 0x7a69, 0x1362: 0x7a81, 0x1363: 0x7a81,\n\t0x1364: 0x7a99, 0x1365: 0x7a99, 0x1366: 0x7a99, 0x1367: 0x7a99, 0x1368: 0x7ab1, 0x1369: 0x7ab1,\n\t0x136a: 0x7ac9, 0x136b: 0x7ac9, 0x136c: 0x7af1, 0x136d: 0x7af1, 0x136e: 0x7b19, 0x136f: 0x7b19,\n\t0x1370: 0x7b41, 0x1371: 0x7b41, 0x1372: 0x7b69, 0x1373: 0x7b69, 0x1374: 0x7b91, 0x1375: 0x7b91,\n\t0x1376: 0x7bb9, 0x1377: 0x7bb9, 0x1378: 0x7bb9, 0x1379: 0x7be1, 0x137a: 0x7be1, 0x137b: 0x7be1,\n\t0x137c: 0x7c09, 0x137d: 0x7c09, 0x137e: 0x7c09, 0x137f: 0x7c09,\n\t// Block 0x4e, offset 0x1380\n\t0x1380: 0x85f9, 0x1381: 0x8621, 0x1382: 0x8649, 0x1383: 0x8671, 0x1384: 0x8699, 0x1385: 0x86c1,\n\t0x1386: 0x86e9, 0x1387: 0x8711, 0x1388: 0x8739, 0x1389: 0x8761, 0x138a: 0x8789, 0x138b: 0x87b1,\n\t0x138c: 0x87d9, 0x138d: 0x8801, 0x138e: 0x8829, 0x138f: 0x8851, 0x1390: 0x8879, 0x1391: 0x88a1,\n\t0x1392: 0x88c9, 0x1393: 0x88f1, 0x1394: 0x8919, 0x1395: 0x8941, 0x1396: 0x8969, 0x1397: 0x8991,\n\t0x1398: 0x89b9, 0x1399: 0x89e1, 0x139a: 0x8a09, 0x139b: 0x8a31, 0x139c: 0x8a59, 0x139d: 0x8a81,\n\t0x139e: 0x8aaa, 0x139f: 0x8ada, 0x13a0: 0x8b0a, 0x13a1: 0x8b3a, 0x13a2: 0x8b6a, 0x13a3: 0x8b9a,\n\t0x13a4: 0x8bc9, 0x13a5: 0x8bf1, 0x13a6: 0x7c71, 0x13a7: 0x8c19, 0x13a8: 0x7be1, 0x13a9: 0x7c99,\n\t0x13aa: 0x8c41, 0x13ab: 0x8c69, 0x13ac: 0x7d39, 0x13ad: 0x8c91, 0x13ae: 0x7d61, 0x13af: 0x7d89,\n\t0x13b0: 0x8cb9, 0x13b1: 0x8ce1, 0x13b2: 0x7e29, 0x13b3: 0x8d09, 0x13b4: 0x7e51, 0x13b5: 0x7e79,\n\t0x13b6: 0x8d31, 0x13b7: 0x8d59, 0x13b8: 0x7ec9, 0x13b9: 0x8d81, 0x13ba: 0x7ef1, 0x13bb: 0x7f19,\n\t0x13bc: 0x83a1, 0x13bd: 0x83c9, 0x13be: 0x8441, 0x13bf: 0x8469,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x8491, 0x13c1: 0x8531, 0x13c2: 0x8559, 0x13c3: 0x8581, 0x13c4: 0x85a9, 0x13c5: 0x8649,\n\t0x13c6: 0x8671, 0x13c7: 0x8699, 0x13c8: 0x8da9, 0x13c9: 0x8739, 0x13ca: 0x8dd1, 0x13cb: 0x8df9,\n\t0x13cc: 0x8829, 0x13cd: 0x8e21, 0x13ce: 0x8851, 0x13cf: 0x8879, 0x13d0: 0x8a81, 0x13d1: 0x8e49,\n\t0x13d2: 0x8e71, 0x13d3: 0x89b9, 0x13d4: 0x8e99, 0x13d5: 0x89e1, 0x13d6: 0x8a09, 0x13d7: 0x7c21,\n\t0x13d8: 0x7c49, 0x13d9: 0x8ec1, 0x13da: 0x7c71, 0x13db: 0x8ee9, 0x13dc: 0x7cc1, 0x13dd: 0x7ce9,\n\t0x13de: 0x7d11, 0x13df: 0x7d39, 0x13e0: 0x8f11, 0x13e1: 0x7db1, 0x13e2: 0x7dd9, 0x13e3: 0x7e01,\n\t0x13e4: 0x7e29, 0x13e5: 0x8f39, 0x13e6: 0x7ec9, 0x13e7: 0x7f41, 0x13e8: 0x7f69, 0x13e9: 0x7f91,\n\t0x13ea: 0x7fb9, 0x13eb: 0x7fe1, 0x13ec: 0x8031, 0x13ed: 0x8059, 0x13ee: 0x8081, 0x13ef: 0x80a9,\n\t0x13f0: 0x80d1, 0x13f1: 0x80f9, 0x13f2: 0x8f61, 0x13f3: 0x8121, 0x13f4: 0x8149, 0x13f5: 0x8171,\n\t0x13f6: 0x8199, 0x13f7: 0x81c1, 0x13f8: 0x81e9, 0x13f9: 0x8239, 0x13fa: 0x8261, 0x13fb: 0x8289,\n\t0x13fc: 0x82b1, 0x13fd: 0x82d9, 0x13fe: 0x8301, 0x13ff: 0x8329,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x8351, 0x1401: 0x8379, 0x1402: 0x83f1, 0x1403: 0x8419, 0x1404: 0x84b9, 0x1405: 0x84e1,\n\t0x1406: 0x8509, 0x1407: 0x8531, 0x1408: 0x8559, 0x1409: 0x85d1, 0x140a: 0x85f9, 0x140b: 0x8621,\n\t0x140c: 0x8649, 0x140d: 0x8f89, 0x140e: 0x86c1, 0x140f: 0x86e9, 0x1410: 0x8711, 0x1411: 0x8739,\n\t0x1412: 0x87b1, 0x1413: 0x87d9, 0x1414: 0x8801, 0x1415: 0x8829, 0x1416: 0x8fb1, 0x1417: 0x88a1,\n\t0x1418: 0x88c9, 0x1419: 0x8fd9, 0x141a: 0x8941, 0x141b: 0x8969, 0x141c: 0x8991, 0x141d: 0x89b9,\n\t0x141e: 0x9001, 0x141f: 0x7c71, 0x1420: 0x8ee9, 0x1421: 0x7d39, 0x1422: 0x8f11, 0x1423: 0x7e29,\n\t0x1424: 0x8f39, 0x1425: 0x7ec9, 0x1426: 0x9029, 0x1427: 0x80d1, 0x1428: 0x9051, 0x1429: 0x9079,\n\t0x142a: 0x90a1, 0x142b: 0x8531, 0x142c: 0x8559, 0x142d: 0x8649, 0x142e: 0x8829, 0x142f: 0x8fb1,\n\t0x1430: 0x89b9, 0x1431: 0x9001, 0x1432: 0x90c9, 0x1433: 0x9101, 0x1434: 0x9139, 0x1435: 0x9171,\n\t0x1436: 0x9199, 0x1437: 0x91c1, 0x1438: 0x91e9, 0x1439: 0x9211, 0x143a: 0x9239, 0x143b: 0x9261,\n\t0x143c: 0x9289, 0x143d: 0x92b1, 0x143e: 0x92d9, 0x143f: 0x9301,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x9329, 0x1441: 0x9351, 0x1442: 0x9379, 0x1443: 0x93a1, 0x1444: 0x93c9, 0x1445: 0x93f1,\n\t0x1446: 0x9419, 0x1447: 0x9441, 0x1448: 0x9469, 0x1449: 0x9491, 0x144a: 0x94b9, 0x144b: 0x94e1,\n\t0x144c: 0x9079, 0x144d: 0x9509, 0x144e: 0x9531, 0x144f: 0x9559, 0x1450: 0x9581, 0x1451: 0x9171,\n\t0x1452: 0x9199, 0x1453: 0x91c1, 0x1454: 0x91e9, 0x1455: 0x9211, 0x1456: 0x9239, 0x1457: 0x9261,\n\t0x1458: 0x9289, 0x1459: 0x92b1, 0x145a: 0x92d9, 0x145b: 0x9301, 0x145c: 0x9329, 0x145d: 0x9351,\n\t0x145e: 0x9379, 0x145f: 0x93a1, 0x1460: 0x93c9, 0x1461: 0x93f1, 0x1462: 0x9419, 0x1463: 0x9441,\n\t0x1464: 0x9469, 0x1465: 0x9491, 0x1466: 0x94b9, 0x1467: 0x94e1, 0x1468: 0x9079, 0x1469: 0x9509,\n\t0x146a: 0x9531, 0x146b: 0x9559, 0x146c: 0x9581, 0x146d: 0x9491, 0x146e: 0x94b9, 0x146f: 0x94e1,\n\t0x1470: 0x9079, 0x1471: 0x9051, 0x1472: 0x90a1, 0x1473: 0x8211, 0x1474: 0x8059, 0x1475: 0x8081,\n\t0x1476: 0x80a9, 0x1477: 0x9491, 0x1478: 0x94b9, 0x1479: 0x94e1, 0x147a: 0x8211, 0x147b: 0x8239,\n\t0x147c: 0x95a9, 0x147d: 0x95a9, 0x147e: 0x0018, 0x147f: 0x0018,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x0040, 0x1481: 0x0040, 0x1482: 0x0040, 0x1483: 0x0040, 0x1484: 0x0040, 0x1485: 0x0040,\n\t0x1486: 0x0040, 0x1487: 0x0040, 0x1488: 0x0040, 0x1489: 0x0040, 0x148a: 0x0040, 0x148b: 0x0040,\n\t0x148c: 0x0040, 0x148d: 0x0040, 0x148e: 0x0040, 0x148f: 0x0040, 0x1490: 0x95d1, 0x1491: 0x9609,\n\t0x1492: 0x9609, 0x1493: 0x9641, 0x1494: 0x9679, 0x1495: 0x96b1, 0x1496: 0x96e9, 0x1497: 0x9721,\n\t0x1498: 0x9759, 0x1499: 0x9759, 0x149a: 0x9791, 0x149b: 0x97c9, 0x149c: 0x9801, 0x149d: 0x9839,\n\t0x149e: 0x9871, 0x149f: 0x98a9, 0x14a0: 0x98a9, 0x14a1: 0x98e1, 0x14a2: 0x9919, 0x14a3: 0x9919,\n\t0x14a4: 0x9951, 0x14a5: 0x9951, 0x14a6: 0x9989, 0x14a7: 0x99c1, 0x14a8: 0x99c1, 0x14a9: 0x99f9,\n\t0x14aa: 0x9a31, 0x14ab: 0x9a31, 0x14ac: 0x9a69, 0x14ad: 0x9a69, 0x14ae: 0x9aa1, 0x14af: 0x9ad9,\n\t0x14b0: 0x9ad9, 0x14b1: 0x9b11, 0x14b2: 0x9b11, 0x14b3: 0x9b49, 0x14b4: 0x9b81, 0x14b5: 0x9bb9,\n\t0x14b6: 0x9bf1, 0x14b7: 0x9bf1, 0x14b8: 0x9c29, 0x14b9: 0x9c61, 0x14ba: 0x9c99, 0x14bb: 0x9cd1,\n\t0x14bc: 0x9d09, 0x14bd: 0x9d09, 0x14be: 0x9d41, 0x14bf: 0x9d79,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0xa949, 0x14c1: 0xa981, 0x14c2: 0xa9b9, 0x14c3: 0xa8a1, 0x14c4: 0x9bb9, 0x14c5: 0x9989,\n\t0x14c6: 0xa9f1, 0x14c7: 0xaa29, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040,\n\t0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x0040, 0x14d1: 0x0040,\n\t0x14d2: 0x0040, 0x14d3: 0x0040, 0x14d4: 0x0040, 0x14d5: 0x0040, 0x14d6: 0x0040, 0x14d7: 0x0040,\n\t0x14d8: 0x0040, 0x14d9: 0x0040, 0x14da: 0x0040, 0x14db: 0x0040, 0x14dc: 0x0040, 0x14dd: 0x0040,\n\t0x14de: 0x0040, 0x14df: 0x0040, 0x14e0: 0x0040, 0x14e1: 0x0040, 0x14e2: 0x0040, 0x14e3: 0x0040,\n\t0x14e4: 0x0040, 0x14e5: 0x0040, 0x14e6: 0x0040, 0x14e7: 0x0040, 0x14e8: 0x0040, 0x14e9: 0x0040,\n\t0x14ea: 0x0040, 0x14eb: 0x0040, 0x14ec: 0x0040, 0x14ed: 0x0040, 0x14ee: 0x0040, 0x14ef: 0x0040,\n\t0x14f0: 0xaa61, 0x14f1: 0xaa99, 0x14f2: 0xaad1, 0x14f3: 0xab19, 0x14f4: 0xab61, 0x14f5: 0xaba9,\n\t0x14f6: 0xabf1, 0x14f7: 0xac39, 0x14f8: 0xac81, 0x14f9: 0xacc9, 0x14fa: 0xad02, 0x14fb: 0xae12,\n\t0x14fc: 0xae91, 0x14fd: 0x0018, 0x14fe: 0x0040, 0x14ff: 0x0040,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x33c0, 0x1501: 0x33c0, 0x1502: 0x33c0, 0x1503: 0x33c0, 0x1504: 0x33c0, 0x1505: 0x33c0,\n\t0x1506: 0x33c0, 0x1507: 0x33c0, 0x1508: 0x33c0, 0x1509: 0x33c0, 0x150a: 0x33c0, 0x150b: 0x33c0,\n\t0x150c: 0x33c0, 0x150d: 0x33c0, 0x150e: 0x33c0, 0x150f: 0x33c0, 0x1510: 0xaeda, 0x1511: 0x7d55,\n\t0x1512: 0x0040, 0x1513: 0xaeea, 0x1514: 0x03c2, 0x1515: 0xaefa, 0x1516: 0xaf0a, 0x1517: 0x7d75,\n\t0x1518: 0x7d95, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040,\n\t0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x3308, 0x1521: 0x3308, 0x1522: 0x3308, 0x1523: 0x3308,\n\t0x1524: 0x3308, 0x1525: 0x3308, 0x1526: 0x3308, 0x1527: 0x3308, 0x1528: 0x3308, 0x1529: 0x3308,\n\t0x152a: 0x3308, 0x152b: 0x3308, 0x152c: 0x3308, 0x152d: 0x3308, 0x152e: 0x3308, 0x152f: 0x3308,\n\t0x1530: 0x0040, 0x1531: 0x7db5, 0x1532: 0x7dd5, 0x1533: 0xaf1a, 0x1534: 0xaf1a, 0x1535: 0x1fd2,\n\t0x1536: 0x1fe2, 0x1537: 0xaf2a, 0x1538: 0xaf3a, 0x1539: 0x7df5, 0x153a: 0x7e15, 0x153b: 0x7e35,\n\t0x153c: 0x7df5, 0x153d: 0x7e55, 0x153e: 0x7e75, 0x153f: 0x7e55,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x7e95, 0x1541: 0x7eb5, 0x1542: 0x7ed5, 0x1543: 0x7eb5, 0x1544: 0x7ef5, 0x1545: 0x0018,\n\t0x1546: 0x0018, 0x1547: 0xaf4a, 0x1548: 0xaf5a, 0x1549: 0x7f16, 0x154a: 0x7f36, 0x154b: 0x7f56,\n\t0x154c: 0x7f76, 0x154d: 0xaf1a, 0x154e: 0xaf1a, 0x154f: 0xaf1a, 0x1550: 0xaeda, 0x1551: 0x7f95,\n\t0x1552: 0x0040, 0x1553: 0x0040, 0x1554: 0x03c2, 0x1555: 0xaeea, 0x1556: 0xaf0a, 0x1557: 0xaefa,\n\t0x1558: 0x7fb5, 0x1559: 0x1fd2, 0x155a: 0x1fe2, 0x155b: 0xaf2a, 0x155c: 0xaf3a, 0x155d: 0x7e95,\n\t0x155e: 0x7ef5, 0x155f: 0xaf6a, 0x1560: 0xaf7a, 0x1561: 0xaf8a, 0x1562: 0x1fb2, 0x1563: 0xaf99,\n\t0x1564: 0xafaa, 0x1565: 0xafba, 0x1566: 0x1fc2, 0x1567: 0x0040, 0x1568: 0xafca, 0x1569: 0xafda,\n\t0x156a: 0xafea, 0x156b: 0xaffa, 0x156c: 0x0040, 0x156d: 0x0040, 0x156e: 0x0040, 0x156f: 0x0040,\n\t0x1570: 0x7fd6, 0x1571: 0xb009, 0x1572: 0x7ff6, 0x1573: 0x0808, 0x1574: 0x8016, 0x1575: 0x0040,\n\t0x1576: 0x8036, 0x1577: 0xb031, 0x1578: 0x8056, 0x1579: 0xb059, 0x157a: 0x8076, 0x157b: 0xb081,\n\t0x157c: 0x8096, 0x157d: 0xb0a9, 0x157e: 0x80b6, 0x157f: 0xb0d1,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0xb0f9, 0x1581: 0xb111, 0x1582: 0xb111, 0x1583: 0xb129, 0x1584: 0xb129, 0x1585: 0xb141,\n\t0x1586: 0xb141, 0x1587: 0xb159, 0x1588: 0xb159, 0x1589: 0xb171, 0x158a: 0xb171, 0x158b: 0xb171,\n\t0x158c: 0xb171, 0x158d: 0xb189, 0x158e: 0xb189, 0x158f: 0xb1a1, 0x1590: 0xb1a1, 0x1591: 0xb1a1,\n\t0x1592: 0xb1a1, 0x1593: 0xb1b9, 0x1594: 0xb1b9, 0x1595: 0xb1d1, 0x1596: 0xb1d1, 0x1597: 0xb1d1,\n\t0x1598: 0xb1d1, 0x1599: 0xb1e9, 0x159a: 0xb1e9, 0x159b: 0xb1e9, 0x159c: 0xb1e9, 0x159d: 0xb201,\n\t0x159e: 0xb201, 0x159f: 0xb201, 0x15a0: 0xb201, 0x15a1: 0xb219, 0x15a2: 0xb219, 0x15a3: 0xb219,\n\t0x15a4: 0xb219, 0x15a5: 0xb231, 0x15a6: 0xb231, 0x15a7: 0xb231, 0x15a8: 0xb231, 0x15a9: 0xb249,\n\t0x15aa: 0xb249, 0x15ab: 0xb261, 0x15ac: 0xb261, 0x15ad: 0xb279, 0x15ae: 0xb279, 0x15af: 0xb291,\n\t0x15b0: 0xb291, 0x15b1: 0xb2a9, 0x15b2: 0xb2a9, 0x15b3: 0xb2a9, 0x15b4: 0xb2a9, 0x15b5: 0xb2c1,\n\t0x15b6: 0xb2c1, 0x15b7: 0xb2c1, 0x15b8: 0xb2c1, 0x15b9: 0xb2d9, 0x15ba: 0xb2d9, 0x15bb: 0xb2d9,\n\t0x15bc: 0xb2d9, 0x15bd: 0xb2f1, 0x15be: 0xb2f1, 0x15bf: 0xb2f1,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0xb2f1, 0x15c1: 0xb309, 0x15c2: 0xb309, 0x15c3: 0xb309, 0x15c4: 0xb309, 0x15c5: 0xb321,\n\t0x15c6: 0xb321, 0x15c7: 0xb321, 0x15c8: 0xb321, 0x15c9: 0xb339, 0x15ca: 0xb339, 0x15cb: 0xb339,\n\t0x15cc: 0xb339, 0x15cd: 0xb351, 0x15ce: 0xb351, 0x15cf: 0xb351, 0x15d0: 0xb351, 0x15d1: 0xb369,\n\t0x15d2: 0xb369, 0x15d3: 0xb369, 0x15d4: 0xb369, 0x15d5: 0xb381, 0x15d6: 0xb381, 0x15d7: 0xb381,\n\t0x15d8: 0xb381, 0x15d9: 0xb399, 0x15da: 0xb399, 0x15db: 0xb399, 0x15dc: 0xb399, 0x15dd: 0xb3b1,\n\t0x15de: 0xb3b1, 0x15df: 0xb3b1, 0x15e0: 0xb3b1, 0x15e1: 0xb3c9, 0x15e2: 0xb3c9, 0x15e3: 0xb3c9,\n\t0x15e4: 0xb3c9, 0x15e5: 0xb3e1, 0x15e6: 0xb3e1, 0x15e7: 0xb3e1, 0x15e8: 0xb3e1, 0x15e9: 0xb3f9,\n\t0x15ea: 0xb3f9, 0x15eb: 0xb3f9, 0x15ec: 0xb3f9, 0x15ed: 0xb411, 0x15ee: 0xb411, 0x15ef: 0x7ab1,\n\t0x15f0: 0x7ab1, 0x15f1: 0xb429, 0x15f2: 0xb429, 0x15f3: 0xb429, 0x15f4: 0xb429, 0x15f5: 0xb441,\n\t0x15f6: 0xb441, 0x15f7: 0xb469, 0x15f8: 0xb469, 0x15f9: 0xb491, 0x15fa: 0xb491, 0x15fb: 0xb4b9,\n\t0x15fc: 0xb4b9, 0x15fd: 0x0040, 0x15fe: 0x0040, 0x15ff: 0x03c0,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x0040, 0x1601: 0xaefa, 0x1602: 0xb4e2, 0x1603: 0xaf6a, 0x1604: 0xafda, 0x1605: 0xafea,\n\t0x1606: 0xaf7a, 0x1607: 0xb4f2, 0x1608: 0x1fd2, 0x1609: 0x1fe2, 0x160a: 0xaf8a, 0x160b: 0x1fb2,\n\t0x160c: 0xaeda, 0x160d: 0xaf99, 0x160e: 0x29d1, 0x160f: 0xb502, 0x1610: 0x1f41, 0x1611: 0x00c9,\n\t0x1612: 0x0069, 0x1613: 0x0079, 0x1614: 0x1f51, 0x1615: 0x1f61, 0x1616: 0x1f71, 0x1617: 0x1f81,\n\t0x1618: 0x1f91, 0x1619: 0x1fa1, 0x161a: 0xaeea, 0x161b: 0x03c2, 0x161c: 0xafaa, 0x161d: 0x1fc2,\n\t0x161e: 0xafba, 0x161f: 0xaf0a, 0x1620: 0xaffa, 0x1621: 0x0039, 0x1622: 0x0ee9, 0x1623: 0x1159,\n\t0x1624: 0x0ef9, 0x1625: 0x0f09, 0x1626: 0x1199, 0x1627: 0x0f31, 0x1628: 0x0249, 0x1629: 0x0f41,\n\t0x162a: 0x0259, 0x162b: 0x0f51, 0x162c: 0x0359, 0x162d: 0x0f61, 0x162e: 0x0f71, 0x162f: 0x00d9,\n\t0x1630: 0x0f99, 0x1631: 0x2039, 0x1632: 0x0269, 0x1633: 0x01d9, 0x1634: 0x0fa9, 0x1635: 0x0fb9,\n\t0x1636: 0x1089, 0x1637: 0x0279, 0x1638: 0x0369, 0x1639: 0x0289, 0x163a: 0x13d1, 0x163b: 0xaf4a,\n\t0x163c: 0xafca, 0x163d: 0xaf5a, 0x163e: 0xb512, 0x163f: 0xaf1a,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x1caa, 0x1641: 0x0039, 0x1642: 0x0ee9, 0x1643: 0x1159, 0x1644: 0x0ef9, 0x1645: 0x0f09,\n\t0x1646: 0x1199, 0x1647: 0x0f31, 0x1648: 0x0249, 0x1649: 0x0f41, 0x164a: 0x0259, 0x164b: 0x0f51,\n\t0x164c: 0x0359, 0x164d: 0x0f61, 0x164e: 0x0f71, 0x164f: 0x00d9, 0x1650: 0x0f99, 0x1651: 0x2039,\n\t0x1652: 0x0269, 0x1653: 0x01d9, 0x1654: 0x0fa9, 0x1655: 0x0fb9, 0x1656: 0x1089, 0x1657: 0x0279,\n\t0x1658: 0x0369, 0x1659: 0x0289, 0x165a: 0x13d1, 0x165b: 0xaf2a, 0x165c: 0xb522, 0x165d: 0xaf3a,\n\t0x165e: 0xb532, 0x165f: 0x80d5, 0x1660: 0x80f5, 0x1661: 0x29d1, 0x1662: 0x8115, 0x1663: 0x8115,\n\t0x1664: 0x8135, 0x1665: 0x8155, 0x1666: 0x8175, 0x1667: 0x8195, 0x1668: 0x81b5, 0x1669: 0x81d5,\n\t0x166a: 0x81f5, 0x166b: 0x8215, 0x166c: 0x8235, 0x166d: 0x8255, 0x166e: 0x8275, 0x166f: 0x8295,\n\t0x1670: 0x82b5, 0x1671: 0x82d5, 0x1672: 0x82f5, 0x1673: 0x8315, 0x1674: 0x8335, 0x1675: 0x8355,\n\t0x1676: 0x8375, 0x1677: 0x8395, 0x1678: 0x83b5, 0x1679: 0x83d5, 0x167a: 0x83f5, 0x167b: 0x8415,\n\t0x167c: 0x81b5, 0x167d: 0x8435, 0x167e: 0x8455, 0x167f: 0x8215,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x8475, 0x1681: 0x8495, 0x1682: 0x84b5, 0x1683: 0x84d5, 0x1684: 0x84f5, 0x1685: 0x8515,\n\t0x1686: 0x8535, 0x1687: 0x8555, 0x1688: 0x84d5, 0x1689: 0x8575, 0x168a: 0x84d5, 0x168b: 0x8595,\n\t0x168c: 0x8595, 0x168d: 0x85b5, 0x168e: 0x85b5, 0x168f: 0x85d5, 0x1690: 0x8515, 0x1691: 0x85f5,\n\t0x1692: 0x8615, 0x1693: 0x85f5, 0x1694: 0x8635, 0x1695: 0x8615, 0x1696: 0x8655, 0x1697: 0x8655,\n\t0x1698: 0x8675, 0x1699: 0x8675, 0x169a: 0x8695, 0x169b: 0x8695, 0x169c: 0x8615, 0x169d: 0x8115,\n\t0x169e: 0x86b5, 0x169f: 0x86d5, 0x16a0: 0x0040, 0x16a1: 0x86f5, 0x16a2: 0x8715, 0x16a3: 0x8735,\n\t0x16a4: 0x8755, 0x16a5: 0x8735, 0x16a6: 0x8775, 0x16a7: 0x8795, 0x16a8: 0x87b5, 0x16a9: 0x87b5,\n\t0x16aa: 0x87d5, 0x16ab: 0x87d5, 0x16ac: 0x87f5, 0x16ad: 0x87f5, 0x16ae: 0x87d5, 0x16af: 0x87d5,\n\t0x16b0: 0x8815, 0x16b1: 0x8835, 0x16b2: 0x8855, 0x16b3: 0x8875, 0x16b4: 0x8895, 0x16b5: 0x88b5,\n\t0x16b6: 0x88b5, 0x16b7: 0x88b5, 0x16b8: 0x88d5, 0x16b9: 0x88d5, 0x16ba: 0x88d5, 0x16bb: 0x88d5,\n\t0x16bc: 0x87b5, 0x16bd: 0x87b5, 0x16be: 0x87b5, 0x16bf: 0x0040,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x0040, 0x16c1: 0x0040, 0x16c2: 0x8715, 0x16c3: 0x86f5, 0x16c4: 0x88f5, 0x16c5: 0x86f5,\n\t0x16c6: 0x8715, 0x16c7: 0x86f5, 0x16c8: 0x0040, 0x16c9: 0x0040, 0x16ca: 0x8915, 0x16cb: 0x8715,\n\t0x16cc: 0x8935, 0x16cd: 0x88f5, 0x16ce: 0x8935, 0x16cf: 0x8715, 0x16d0: 0x0040, 0x16d1: 0x0040,\n\t0x16d2: 0x8955, 0x16d3: 0x8975, 0x16d4: 0x8875, 0x16d5: 0x8935, 0x16d6: 0x88f5, 0x16d7: 0x8935,\n\t0x16d8: 0x0040, 0x16d9: 0x0040, 0x16da: 0x8995, 0x16db: 0x89b5, 0x16dc: 0x8995, 0x16dd: 0x0040,\n\t0x16de: 0x0040, 0x16df: 0x0040, 0x16e0: 0xb541, 0x16e1: 0xb559, 0x16e2: 0xb571, 0x16e3: 0x89d6,\n\t0x16e4: 0xb589, 0x16e5: 0xb5a1, 0x16e6: 0x89f5, 0x16e7: 0x0040, 0x16e8: 0x8a15, 0x16e9: 0x8a35,\n\t0x16ea: 0x8a55, 0x16eb: 0x8a35, 0x16ec: 0x8a75, 0x16ed: 0x8a95, 0x16ee: 0x8ab5, 0x16ef: 0x0040,\n\t0x16f0: 0x0040, 0x16f1: 0x0040, 0x16f2: 0x0040, 0x16f3: 0x0040, 0x16f4: 0x0040, 0x16f5: 0x0040,\n\t0x16f6: 0x0040, 0x16f7: 0x0040, 0x16f8: 0x0040, 0x16f9: 0x0340, 0x16fa: 0x0340, 0x16fb: 0x0340,\n\t0x16fc: 0x0040, 0x16fd: 0x0040, 0x16fe: 0x0040, 0x16ff: 0x0040,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0a08, 0x1701: 0x0a08, 0x1702: 0x0a08, 0x1703: 0x0a08, 0x1704: 0x0a08, 0x1705: 0x0c08,\n\t0x1706: 0x0808, 0x1707: 0x0c08, 0x1708: 0x0818, 0x1709: 0x0c08, 0x170a: 0x0c08, 0x170b: 0x0808,\n\t0x170c: 0x0808, 0x170d: 0x0908, 0x170e: 0x0c08, 0x170f: 0x0c08, 0x1710: 0x0c08, 0x1711: 0x0c08,\n\t0x1712: 0x0c08, 0x1713: 0x0a08, 0x1714: 0x0a08, 0x1715: 0x0a08, 0x1716: 0x0a08, 0x1717: 0x0908,\n\t0x1718: 0x0a08, 0x1719: 0x0a08, 0x171a: 0x0a08, 0x171b: 0x0a08, 0x171c: 0x0a08, 0x171d: 0x0c08,\n\t0x171e: 0x0a08, 0x171f: 0x0a08, 0x1720: 0x0a08, 0x1721: 0x0c08, 0x1722: 0x0808, 0x1723: 0x0808,\n\t0x1724: 0x0c08, 0x1725: 0x3308, 0x1726: 0x3308, 0x1727: 0x0040, 0x1728: 0x0040, 0x1729: 0x0040,\n\t0x172a: 0x0040, 0x172b: 0x0a18, 0x172c: 0x0a18, 0x172d: 0x0a18, 0x172e: 0x0a18, 0x172f: 0x0c18,\n\t0x1730: 0x0818, 0x1731: 0x0818, 0x1732: 0x0818, 0x1733: 0x0818, 0x1734: 0x0818, 0x1735: 0x0818,\n\t0x1736: 0x0818, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0040, 0x173a: 0x0040, 0x173b: 0x0040,\n\t0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x0a08, 0x1741: 0x0c08, 0x1742: 0x0a08, 0x1743: 0x0c08, 0x1744: 0x0c08, 0x1745: 0x0c08,\n\t0x1746: 0x0a08, 0x1747: 0x0a08, 0x1748: 0x0a08, 0x1749: 0x0c08, 0x174a: 0x0a08, 0x174b: 0x0a08,\n\t0x174c: 0x0c08, 0x174d: 0x0a08, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0a08, 0x1751: 0x0c08,\n\t0x1752: 0x0040, 0x1753: 0x0040, 0x1754: 0x0040, 0x1755: 0x0040, 0x1756: 0x0040, 0x1757: 0x0040,\n\t0x1758: 0x0040, 0x1759: 0x0818, 0x175a: 0x0818, 0x175b: 0x0818, 0x175c: 0x0818, 0x175d: 0x0040,\n\t0x175e: 0x0040, 0x175f: 0x0040, 0x1760: 0x0040, 0x1761: 0x0040, 0x1762: 0x0040, 0x1763: 0x0040,\n\t0x1764: 0x0040, 0x1765: 0x0040, 0x1766: 0x0040, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0c18,\n\t0x176a: 0x0c18, 0x176b: 0x0c18, 0x176c: 0x0c18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0818,\n\t0x1770: 0x0040, 0x1771: 0x0040, 0x1772: 0x0040, 0x1773: 0x0040, 0x1774: 0x0040, 0x1775: 0x0040,\n\t0x1776: 0x0040, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040,\n\t0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x3308, 0x1781: 0x3308, 0x1782: 0x3008, 0x1783: 0x3008, 0x1784: 0x0040, 0x1785: 0x0008,\n\t0x1786: 0x0008, 0x1787: 0x0008, 0x1788: 0x0008, 0x1789: 0x0008, 0x178a: 0x0008, 0x178b: 0x0008,\n\t0x178c: 0x0008, 0x178d: 0x0040, 0x178e: 0x0040, 0x178f: 0x0008, 0x1790: 0x0008, 0x1791: 0x0040,\n\t0x1792: 0x0040, 0x1793: 0x0008, 0x1794: 0x0008, 0x1795: 0x0008, 0x1796: 0x0008, 0x1797: 0x0008,\n\t0x1798: 0x0008, 0x1799: 0x0008, 0x179a: 0x0008, 0x179b: 0x0008, 0x179c: 0x0008, 0x179d: 0x0008,\n\t0x179e: 0x0008, 0x179f: 0x0008, 0x17a0: 0x0008, 0x17a1: 0x0008, 0x17a2: 0x0008, 0x17a3: 0x0008,\n\t0x17a4: 0x0008, 0x17a5: 0x0008, 0x17a6: 0x0008, 0x17a7: 0x0008, 0x17a8: 0x0008, 0x17a9: 0x0040,\n\t0x17aa: 0x0008, 0x17ab: 0x0008, 0x17ac: 0x0008, 0x17ad: 0x0008, 0x17ae: 0x0008, 0x17af: 0x0008,\n\t0x17b0: 0x0008, 0x17b1: 0x0040, 0x17b2: 0x0008, 0x17b3: 0x0008, 0x17b4: 0x0040, 0x17b5: 0x0008,\n\t0x17b6: 0x0008, 0x17b7: 0x0008, 0x17b8: 0x0008, 0x17b9: 0x0008, 0x17ba: 0x0040, 0x17bb: 0x0040,\n\t0x17bc: 0x3308, 0x17bd: 0x0008, 0x17be: 0x3008, 0x17bf: 0x3008,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x3308, 0x17c1: 0x3008, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x3008, 0x17c5: 0x0040,\n\t0x17c6: 0x0040, 0x17c7: 0x3008, 0x17c8: 0x3008, 0x17c9: 0x0040, 0x17ca: 0x0040, 0x17cb: 0x3008,\n\t0x17cc: 0x3008, 0x17cd: 0x3808, 0x17ce: 0x0040, 0x17cf: 0x0040, 0x17d0: 0x0008, 0x17d1: 0x0040,\n\t0x17d2: 0x0040, 0x17d3: 0x0040, 0x17d4: 0x0040, 0x17d5: 0x0040, 0x17d6: 0x0040, 0x17d7: 0x3008,\n\t0x17d8: 0x0040, 0x17d9: 0x0040, 0x17da: 0x0040, 0x17db: 0x0040, 0x17dc: 0x0040, 0x17dd: 0x0008,\n\t0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x3008, 0x17e3: 0x3008,\n\t0x17e4: 0x0040, 0x17e5: 0x0040, 0x17e6: 0x3308, 0x17e7: 0x3308, 0x17e8: 0x3308, 0x17e9: 0x3308,\n\t0x17ea: 0x3308, 0x17eb: 0x3308, 0x17ec: 0x3308, 0x17ed: 0x0040, 0x17ee: 0x0040, 0x17ef: 0x0040,\n\t0x17f0: 0x3308, 0x17f1: 0x3308, 0x17f2: 0x3308, 0x17f3: 0x3308, 0x17f4: 0x3308, 0x17f5: 0x0040,\n\t0x17f6: 0x0040, 0x17f7: 0x0040, 0x17f8: 0x0040, 0x17f9: 0x0040, 0x17fa: 0x0040, 0x17fb: 0x0040,\n\t0x17fc: 0x0040, 0x17fd: 0x0040, 0x17fe: 0x0040, 0x17ff: 0x0040,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x0039, 0x1801: 0x0ee9, 0x1802: 0x1159, 0x1803: 0x0ef9, 0x1804: 0x0f09, 0x1805: 0x1199,\n\t0x1806: 0x0f31, 0x1807: 0x0249, 0x1808: 0x0f41, 0x1809: 0x0259, 0x180a: 0x0f51, 0x180b: 0x0359,\n\t0x180c: 0x0f61, 0x180d: 0x0f71, 0x180e: 0x00d9, 0x180f: 0x0f99, 0x1810: 0x2039, 0x1811: 0x0269,\n\t0x1812: 0x01d9, 0x1813: 0x0fa9, 0x1814: 0x0fb9, 0x1815: 0x1089, 0x1816: 0x0279, 0x1817: 0x0369,\n\t0x1818: 0x0289, 0x1819: 0x13d1, 0x181a: 0x0039, 0x181b: 0x0ee9, 0x181c: 0x1159, 0x181d: 0x0ef9,\n\t0x181e: 0x0f09, 0x181f: 0x1199, 0x1820: 0x0f31, 0x1821: 0x0249, 0x1822: 0x0f41, 0x1823: 0x0259,\n\t0x1824: 0x0f51, 0x1825: 0x0359, 0x1826: 0x0f61, 0x1827: 0x0f71, 0x1828: 0x00d9, 0x1829: 0x0f99,\n\t0x182a: 0x2039, 0x182b: 0x0269, 0x182c: 0x01d9, 0x182d: 0x0fa9, 0x182e: 0x0fb9, 0x182f: 0x1089,\n\t0x1830: 0x0279, 0x1831: 0x0369, 0x1832: 0x0289, 0x1833: 0x13d1, 0x1834: 0x0039, 0x1835: 0x0ee9,\n\t0x1836: 0x1159, 0x1837: 0x0ef9, 0x1838: 0x0f09, 0x1839: 0x1199, 0x183a: 0x0f31, 0x183b: 0x0249,\n\t0x183c: 0x0f41, 0x183d: 0x0259, 0x183e: 0x0f51, 0x183f: 0x0359,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x0f61, 0x1841: 0x0f71, 0x1842: 0x00d9, 0x1843: 0x0f99, 0x1844: 0x2039, 0x1845: 0x0269,\n\t0x1846: 0x01d9, 0x1847: 0x0fa9, 0x1848: 0x0fb9, 0x1849: 0x1089, 0x184a: 0x0279, 0x184b: 0x0369,\n\t0x184c: 0x0289, 0x184d: 0x13d1, 0x184e: 0x0039, 0x184f: 0x0ee9, 0x1850: 0x1159, 0x1851: 0x0ef9,\n\t0x1852: 0x0f09, 0x1853: 0x1199, 0x1854: 0x0f31, 0x1855: 0x0040, 0x1856: 0x0f41, 0x1857: 0x0259,\n\t0x1858: 0x0f51, 0x1859: 0x0359, 0x185a: 0x0f61, 0x185b: 0x0f71, 0x185c: 0x00d9, 0x185d: 0x0f99,\n\t0x185e: 0x2039, 0x185f: 0x0269, 0x1860: 0x01d9, 0x1861: 0x0fa9, 0x1862: 0x0fb9, 0x1863: 0x1089,\n\t0x1864: 0x0279, 0x1865: 0x0369, 0x1866: 0x0289, 0x1867: 0x13d1, 0x1868: 0x0039, 0x1869: 0x0ee9,\n\t0x186a: 0x1159, 0x186b: 0x0ef9, 0x186c: 0x0f09, 0x186d: 0x1199, 0x186e: 0x0f31, 0x186f: 0x0249,\n\t0x1870: 0x0f41, 0x1871: 0x0259, 0x1872: 0x0f51, 0x1873: 0x0359, 0x1874: 0x0f61, 0x1875: 0x0f71,\n\t0x1876: 0x00d9, 0x1877: 0x0f99, 0x1878: 0x2039, 0x1879: 0x0269, 0x187a: 0x01d9, 0x187b: 0x0fa9,\n\t0x187c: 0x0fb9, 0x187d: 0x1089, 0x187e: 0x0279, 0x187f: 0x0369,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x0289, 0x1881: 0x13d1, 0x1882: 0x0039, 0x1883: 0x0ee9, 0x1884: 0x1159, 0x1885: 0x0ef9,\n\t0x1886: 0x0f09, 0x1887: 0x1199, 0x1888: 0x0f31, 0x1889: 0x0249, 0x188a: 0x0f41, 0x188b: 0x0259,\n\t0x188c: 0x0f51, 0x188d: 0x0359, 0x188e: 0x0f61, 0x188f: 0x0f71, 0x1890: 0x00d9, 0x1891: 0x0f99,\n\t0x1892: 0x2039, 0x1893: 0x0269, 0x1894: 0x01d9, 0x1895: 0x0fa9, 0x1896: 0x0fb9, 0x1897: 0x1089,\n\t0x1898: 0x0279, 0x1899: 0x0369, 0x189a: 0x0289, 0x189b: 0x13d1, 0x189c: 0x0039, 0x189d: 0x0040,\n\t0x189e: 0x1159, 0x189f: 0x0ef9, 0x18a0: 0x0040, 0x18a1: 0x0040, 0x18a2: 0x0f31, 0x18a3: 0x0040,\n\t0x18a4: 0x0040, 0x18a5: 0x0259, 0x18a6: 0x0f51, 0x18a7: 0x0040, 0x18a8: 0x0040, 0x18a9: 0x0f71,\n\t0x18aa: 0x00d9, 0x18ab: 0x0f99, 0x18ac: 0x2039, 0x18ad: 0x0040, 0x18ae: 0x01d9, 0x18af: 0x0fa9,\n\t0x18b0: 0x0fb9, 0x18b1: 0x1089, 0x18b2: 0x0279, 0x18b3: 0x0369, 0x18b4: 0x0289, 0x18b5: 0x13d1,\n\t0x18b6: 0x0039, 0x18b7: 0x0ee9, 0x18b8: 0x1159, 0x18b9: 0x0ef9, 0x18ba: 0x0040, 0x18bb: 0x1199,\n\t0x18bc: 0x0040, 0x18bd: 0x0249, 0x18be: 0x0f41, 0x18bf: 0x0259,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x0f51, 0x18c1: 0x0359, 0x18c2: 0x0f61, 0x18c3: 0x0f71, 0x18c4: 0x0040, 0x18c5: 0x0f99,\n\t0x18c6: 0x2039, 0x18c7: 0x0269, 0x18c8: 0x01d9, 0x18c9: 0x0fa9, 0x18ca: 0x0fb9, 0x18cb: 0x1089,\n\t0x18cc: 0x0279, 0x18cd: 0x0369, 0x18ce: 0x0289, 0x18cf: 0x13d1, 0x18d0: 0x0039, 0x18d1: 0x0ee9,\n\t0x18d2: 0x1159, 0x18d3: 0x0ef9, 0x18d4: 0x0f09, 0x18d5: 0x1199, 0x18d6: 0x0f31, 0x18d7: 0x0249,\n\t0x18d8: 0x0f41, 0x18d9: 0x0259, 0x18da: 0x0f51, 0x18db: 0x0359, 0x18dc: 0x0f61, 0x18dd: 0x0f71,\n\t0x18de: 0x00d9, 0x18df: 0x0f99, 0x18e0: 0x2039, 0x18e1: 0x0269, 0x18e2: 0x01d9, 0x18e3: 0x0fa9,\n\t0x18e4: 0x0fb9, 0x18e5: 0x1089, 0x18e6: 0x0279, 0x18e7: 0x0369, 0x18e8: 0x0289, 0x18e9: 0x13d1,\n\t0x18ea: 0x0039, 0x18eb: 0x0ee9, 0x18ec: 0x1159, 0x18ed: 0x0ef9, 0x18ee: 0x0f09, 0x18ef: 0x1199,\n\t0x18f0: 0x0f31, 0x18f1: 0x0249, 0x18f2: 0x0f41, 0x18f3: 0x0259, 0x18f4: 0x0f51, 0x18f5: 0x0359,\n\t0x18f6: 0x0f61, 0x18f7: 0x0f71, 0x18f8: 0x00d9, 0x18f9: 0x0f99, 0x18fa: 0x2039, 0x18fb: 0x0269,\n\t0x18fc: 0x01d9, 0x18fd: 0x0fa9, 0x18fe: 0x0fb9, 0x18ff: 0x1089,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x0279, 0x1901: 0x0369, 0x1902: 0x0289, 0x1903: 0x13d1, 0x1904: 0x0039, 0x1905: 0x0ee9,\n\t0x1906: 0x0040, 0x1907: 0x0ef9, 0x1908: 0x0f09, 0x1909: 0x1199, 0x190a: 0x0f31, 0x190b: 0x0040,\n\t0x190c: 0x0040, 0x190d: 0x0259, 0x190e: 0x0f51, 0x190f: 0x0359, 0x1910: 0x0f61, 0x1911: 0x0f71,\n\t0x1912: 0x00d9, 0x1913: 0x0f99, 0x1914: 0x2039, 0x1915: 0x0040, 0x1916: 0x01d9, 0x1917: 0x0fa9,\n\t0x1918: 0x0fb9, 0x1919: 0x1089, 0x191a: 0x0279, 0x191b: 0x0369, 0x191c: 0x0289, 0x191d: 0x0040,\n\t0x191e: 0x0039, 0x191f: 0x0ee9, 0x1920: 0x1159, 0x1921: 0x0ef9, 0x1922: 0x0f09, 0x1923: 0x1199,\n\t0x1924: 0x0f31, 0x1925: 0x0249, 0x1926: 0x0f41, 0x1927: 0x0259, 0x1928: 0x0f51, 0x1929: 0x0359,\n\t0x192a: 0x0f61, 0x192b: 0x0f71, 0x192c: 0x00d9, 0x192d: 0x0f99, 0x192e: 0x2039, 0x192f: 0x0269,\n\t0x1930: 0x01d9, 0x1931: 0x0fa9, 0x1932: 0x0fb9, 0x1933: 0x1089, 0x1934: 0x0279, 0x1935: 0x0369,\n\t0x1936: 0x0289, 0x1937: 0x13d1, 0x1938: 0x0039, 0x1939: 0x0ee9, 0x193a: 0x0040, 0x193b: 0x0ef9,\n\t0x193c: 0x0f09, 0x193d: 0x1199, 0x193e: 0x0f31, 0x193f: 0x0040,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x0f41, 0x1941: 0x0259, 0x1942: 0x0f51, 0x1943: 0x0359, 0x1944: 0x0f61, 0x1945: 0x0040,\n\t0x1946: 0x00d9, 0x1947: 0x0040, 0x1948: 0x0040, 0x1949: 0x0040, 0x194a: 0x01d9, 0x194b: 0x0fa9,\n\t0x194c: 0x0fb9, 0x194d: 0x1089, 0x194e: 0x0279, 0x194f: 0x0369, 0x1950: 0x0289, 0x1951: 0x0040,\n\t0x1952: 0x0039, 0x1953: 0x0ee9, 0x1954: 0x1159, 0x1955: 0x0ef9, 0x1956: 0x0f09, 0x1957: 0x1199,\n\t0x1958: 0x0f31, 0x1959: 0x0249, 0x195a: 0x0f41, 0x195b: 0x0259, 0x195c: 0x0f51, 0x195d: 0x0359,\n\t0x195e: 0x0f61, 0x195f: 0x0f71, 0x1960: 0x00d9, 0x1961: 0x0f99, 0x1962: 0x2039, 0x1963: 0x0269,\n\t0x1964: 0x01d9, 0x1965: 0x0fa9, 0x1966: 0x0fb9, 0x1967: 0x1089, 0x1968: 0x0279, 0x1969: 0x0369,\n\t0x196a: 0x0289, 0x196b: 0x13d1, 0x196c: 0x0039, 0x196d: 0x0ee9, 0x196e: 0x1159, 0x196f: 0x0ef9,\n\t0x1970: 0x0f09, 0x1971: 0x1199, 0x1972: 0x0f31, 0x1973: 0x0249, 0x1974: 0x0f41, 0x1975: 0x0259,\n\t0x1976: 0x0f51, 0x1977: 0x0359, 0x1978: 0x0f61, 0x1979: 0x0f71, 0x197a: 0x00d9, 0x197b: 0x0f99,\n\t0x197c: 0x2039, 0x197d: 0x0269, 0x197e: 0x01d9, 0x197f: 0x0fa9,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x0fb9, 0x1981: 0x1089, 0x1982: 0x0279, 0x1983: 0x0369, 0x1984: 0x0289, 0x1985: 0x13d1,\n\t0x1986: 0x0039, 0x1987: 0x0ee9, 0x1988: 0x1159, 0x1989: 0x0ef9, 0x198a: 0x0f09, 0x198b: 0x1199,\n\t0x198c: 0x0f31, 0x198d: 0x0249, 0x198e: 0x0f41, 0x198f: 0x0259, 0x1990: 0x0f51, 0x1991: 0x0359,\n\t0x1992: 0x0f61, 0x1993: 0x0f71, 0x1994: 0x00d9, 0x1995: 0x0f99, 0x1996: 0x2039, 0x1997: 0x0269,\n\t0x1998: 0x01d9, 0x1999: 0x0fa9, 0x199a: 0x0fb9, 0x199b: 0x1089, 0x199c: 0x0279, 0x199d: 0x0369,\n\t0x199e: 0x0289, 0x199f: 0x13d1, 0x19a0: 0x0039, 0x19a1: 0x0ee9, 0x19a2: 0x1159, 0x19a3: 0x0ef9,\n\t0x19a4: 0x0f09, 0x19a5: 0x1199, 0x19a6: 0x0f31, 0x19a7: 0x0249, 0x19a8: 0x0f41, 0x19a9: 0x0259,\n\t0x19aa: 0x0f51, 0x19ab: 0x0359, 0x19ac: 0x0f61, 0x19ad: 0x0f71, 0x19ae: 0x00d9, 0x19af: 0x0f99,\n\t0x19b0: 0x2039, 0x19b1: 0x0269, 0x19b2: 0x01d9, 0x19b3: 0x0fa9, 0x19b4: 0x0fb9, 0x19b5: 0x1089,\n\t0x19b6: 0x0279, 0x19b7: 0x0369, 0x19b8: 0x0289, 0x19b9: 0x13d1, 0x19ba: 0x0039, 0x19bb: 0x0ee9,\n\t0x19bc: 0x1159, 0x19bd: 0x0ef9, 0x19be: 0x0f09, 0x19bf: 0x1199,\n\t// Block 0x67, offset 0x19c0\n\t0x19c0: 0x0f31, 0x19c1: 0x0249, 0x19c2: 0x0f41, 0x19c3: 0x0259, 0x19c4: 0x0f51, 0x19c5: 0x0359,\n\t0x19c6: 0x0f61, 0x19c7: 0x0f71, 0x19c8: 0x00d9, 0x19c9: 0x0f99, 0x19ca: 0x2039, 0x19cb: 0x0269,\n\t0x19cc: 0x01d9, 0x19cd: 0x0fa9, 0x19ce: 0x0fb9, 0x19cf: 0x1089, 0x19d0: 0x0279, 0x19d1: 0x0369,\n\t0x19d2: 0x0289, 0x19d3: 0x13d1, 0x19d4: 0x0039, 0x19d5: 0x0ee9, 0x19d6: 0x1159, 0x19d7: 0x0ef9,\n\t0x19d8: 0x0f09, 0x19d9: 0x1199, 0x19da: 0x0f31, 0x19db: 0x0249, 0x19dc: 0x0f41, 0x19dd: 0x0259,\n\t0x19de: 0x0f51, 0x19df: 0x0359, 0x19e0: 0x0f61, 0x19e1: 0x0f71, 0x19e2: 0x00d9, 0x19e3: 0x0f99,\n\t0x19e4: 0x2039, 0x19e5: 0x0269, 0x19e6: 0x01d9, 0x19e7: 0x0fa9, 0x19e8: 0x0fb9, 0x19e9: 0x1089,\n\t0x19ea: 0x0279, 0x19eb: 0x0369, 0x19ec: 0x0289, 0x19ed: 0x13d1, 0x19ee: 0x0039, 0x19ef: 0x0ee9,\n\t0x19f0: 0x1159, 0x19f1: 0x0ef9, 0x19f2: 0x0f09, 0x19f3: 0x1199, 0x19f4: 0x0f31, 0x19f5: 0x0249,\n\t0x19f6: 0x0f41, 0x19f7: 0x0259, 0x19f8: 0x0f51, 0x19f9: 0x0359, 0x19fa: 0x0f61, 0x19fb: 0x0f71,\n\t0x19fc: 0x00d9, 0x19fd: 0x0f99, 0x19fe: 0x2039, 0x19ff: 0x0269,\n\t// Block 0x68, offset 0x1a00\n\t0x1a00: 0x01d9, 0x1a01: 0x0fa9, 0x1a02: 0x0fb9, 0x1a03: 0x1089, 0x1a04: 0x0279, 0x1a05: 0x0369,\n\t0x1a06: 0x0289, 0x1a07: 0x13d1, 0x1a08: 0x0039, 0x1a09: 0x0ee9, 0x1a0a: 0x1159, 0x1a0b: 0x0ef9,\n\t0x1a0c: 0x0f09, 0x1a0d: 0x1199, 0x1a0e: 0x0f31, 0x1a0f: 0x0249, 0x1a10: 0x0f41, 0x1a11: 0x0259,\n\t0x1a12: 0x0f51, 0x1a13: 0x0359, 0x1a14: 0x0f61, 0x1a15: 0x0f71, 0x1a16: 0x00d9, 0x1a17: 0x0f99,\n\t0x1a18: 0x2039, 0x1a19: 0x0269, 0x1a1a: 0x01d9, 0x1a1b: 0x0fa9, 0x1a1c: 0x0fb9, 0x1a1d: 0x1089,\n\t0x1a1e: 0x0279, 0x1a1f: 0x0369, 0x1a20: 0x0289, 0x1a21: 0x13d1, 0x1a22: 0x0039, 0x1a23: 0x0ee9,\n\t0x1a24: 0x1159, 0x1a25: 0x0ef9, 0x1a26: 0x0f09, 0x1a27: 0x1199, 0x1a28: 0x0f31, 0x1a29: 0x0249,\n\t0x1a2a: 0x0f41, 0x1a2b: 0x0259, 0x1a2c: 0x0f51, 0x1a2d: 0x0359, 0x1a2e: 0x0f61, 0x1a2f: 0x0f71,\n\t0x1a30: 0x00d9, 0x1a31: 0x0f99, 0x1a32: 0x2039, 0x1a33: 0x0269, 0x1a34: 0x01d9, 0x1a35: 0x0fa9,\n\t0x1a36: 0x0fb9, 0x1a37: 0x1089, 0x1a38: 0x0279, 0x1a39: 0x0369, 0x1a3a: 0x0289, 0x1a3b: 0x13d1,\n\t0x1a3c: 0x0039, 0x1a3d: 0x0ee9, 0x1a3e: 0x1159, 0x1a3f: 0x0ef9,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x0f09, 0x1a41: 0x1199, 0x1a42: 0x0f31, 0x1a43: 0x0249, 0x1a44: 0x0f41, 0x1a45: 0x0259,\n\t0x1a46: 0x0f51, 0x1a47: 0x0359, 0x1a48: 0x0f61, 0x1a49: 0x0f71, 0x1a4a: 0x00d9, 0x1a4b: 0x0f99,\n\t0x1a4c: 0x2039, 0x1a4d: 0x0269, 0x1a4e: 0x01d9, 0x1a4f: 0x0fa9, 0x1a50: 0x0fb9, 0x1a51: 0x1089,\n\t0x1a52: 0x0279, 0x1a53: 0x0369, 0x1a54: 0x0289, 0x1a55: 0x13d1, 0x1a56: 0x0039, 0x1a57: 0x0ee9,\n\t0x1a58: 0x1159, 0x1a59: 0x0ef9, 0x1a5a: 0x0f09, 0x1a5b: 0x1199, 0x1a5c: 0x0f31, 0x1a5d: 0x0249,\n\t0x1a5e: 0x0f41, 0x1a5f: 0x0259, 0x1a60: 0x0f51, 0x1a61: 0x0359, 0x1a62: 0x0f61, 0x1a63: 0x0f71,\n\t0x1a64: 0x00d9, 0x1a65: 0x0f99, 0x1a66: 0x2039, 0x1a67: 0x0269, 0x1a68: 0x01d9, 0x1a69: 0x0fa9,\n\t0x1a6a: 0x0fb9, 0x1a6b: 0x1089, 0x1a6c: 0x0279, 0x1a6d: 0x0369, 0x1a6e: 0x0289, 0x1a6f: 0x13d1,\n\t0x1a70: 0x0039, 0x1a71: 0x0ee9, 0x1a72: 0x1159, 0x1a73: 0x0ef9, 0x1a74: 0x0f09, 0x1a75: 0x1199,\n\t0x1a76: 0x0f31, 0x1a77: 0x0249, 0x1a78: 0x0f41, 0x1a79: 0x0259, 0x1a7a: 0x0f51, 0x1a7b: 0x0359,\n\t0x1a7c: 0x0f61, 0x1a7d: 0x0f71, 0x1a7e: 0x00d9, 0x1a7f: 0x0f99,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x2039, 0x1a81: 0x0269, 0x1a82: 0x01d9, 0x1a83: 0x0fa9, 0x1a84: 0x0fb9, 0x1a85: 0x1089,\n\t0x1a86: 0x0279, 0x1a87: 0x0369, 0x1a88: 0x0289, 0x1a89: 0x13d1, 0x1a8a: 0x0039, 0x1a8b: 0x0ee9,\n\t0x1a8c: 0x1159, 0x1a8d: 0x0ef9, 0x1a8e: 0x0f09, 0x1a8f: 0x1199, 0x1a90: 0x0f31, 0x1a91: 0x0249,\n\t0x1a92: 0x0f41, 0x1a93: 0x0259, 0x1a94: 0x0f51, 0x1a95: 0x0359, 0x1a96: 0x0f61, 0x1a97: 0x0f71,\n\t0x1a98: 0x00d9, 0x1a99: 0x0f99, 0x1a9a: 0x2039, 0x1a9b: 0x0269, 0x1a9c: 0x01d9, 0x1a9d: 0x0fa9,\n\t0x1a9e: 0x0fb9, 0x1a9f: 0x1089, 0x1aa0: 0x0279, 0x1aa1: 0x0369, 0x1aa2: 0x0289, 0x1aa3: 0x13d1,\n\t0x1aa4: 0xba81, 0x1aa5: 0xba99, 0x1aa6: 0x0040, 0x1aa7: 0x0040, 0x1aa8: 0xbab1, 0x1aa9: 0x1099,\n\t0x1aaa: 0x10b1, 0x1aab: 0x10c9, 0x1aac: 0xbac9, 0x1aad: 0xbae1, 0x1aae: 0xbaf9, 0x1aaf: 0x1429,\n\t0x1ab0: 0x1a31, 0x1ab1: 0xbb11, 0x1ab2: 0xbb29, 0x1ab3: 0xbb41, 0x1ab4: 0xbb59, 0x1ab5: 0xbb71,\n\t0x1ab6: 0xbb89, 0x1ab7: 0x2109, 0x1ab8: 0x1111, 0x1ab9: 0x1429, 0x1aba: 0xbba1, 0x1abb: 0xbbb9,\n\t0x1abc: 0xbbd1, 0x1abd: 0x10e1, 0x1abe: 0x10f9, 0x1abf: 0xbbe9,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x2079, 0x1ac1: 0xbc01, 0x1ac2: 0xbab1, 0x1ac3: 0x1099, 0x1ac4: 0x10b1, 0x1ac5: 0x10c9,\n\t0x1ac6: 0xbac9, 0x1ac7: 0xbae1, 0x1ac8: 0xbaf9, 0x1ac9: 0x1429, 0x1aca: 0x1a31, 0x1acb: 0xbb11,\n\t0x1acc: 0xbb29, 0x1acd: 0xbb41, 0x1ace: 0xbb59, 0x1acf: 0xbb71, 0x1ad0: 0xbb89, 0x1ad1: 0x2109,\n\t0x1ad2: 0x1111, 0x1ad3: 0xbba1, 0x1ad4: 0xbba1, 0x1ad5: 0xbbb9, 0x1ad6: 0xbbd1, 0x1ad7: 0x10e1,\n\t0x1ad8: 0x10f9, 0x1ad9: 0xbbe9, 0x1ada: 0x2079, 0x1adb: 0xbc21, 0x1adc: 0xbac9, 0x1add: 0x1429,\n\t0x1ade: 0xbb11, 0x1adf: 0x10e1, 0x1ae0: 0x1111, 0x1ae1: 0x2109, 0x1ae2: 0xbab1, 0x1ae3: 0x1099,\n\t0x1ae4: 0x10b1, 0x1ae5: 0x10c9, 0x1ae6: 0xbac9, 0x1ae7: 0xbae1, 0x1ae8: 0xbaf9, 0x1ae9: 0x1429,\n\t0x1aea: 0x1a31, 0x1aeb: 0xbb11, 0x1aec: 0xbb29, 0x1aed: 0xbb41, 0x1aee: 0xbb59, 0x1aef: 0xbb71,\n\t0x1af0: 0xbb89, 0x1af1: 0x2109, 0x1af2: 0x1111, 0x1af3: 0x1429, 0x1af4: 0xbba1, 0x1af5: 0xbbb9,\n\t0x1af6: 0xbbd1, 0x1af7: 0x10e1, 0x1af8: 0x10f9, 0x1af9: 0xbbe9, 0x1afa: 0x2079, 0x1afb: 0xbc01,\n\t0x1afc: 0xbab1, 0x1afd: 0x1099, 0x1afe: 0x10b1, 0x1aff: 0x10c9,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0xbac9, 0x1b01: 0xbae1, 0x1b02: 0xbaf9, 0x1b03: 0x1429, 0x1b04: 0x1a31, 0x1b05: 0xbb11,\n\t0x1b06: 0xbb29, 0x1b07: 0xbb41, 0x1b08: 0xbb59, 0x1b09: 0xbb71, 0x1b0a: 0xbb89, 0x1b0b: 0x2109,\n\t0x1b0c: 0x1111, 0x1b0d: 0xbba1, 0x1b0e: 0xbba1, 0x1b0f: 0xbbb9, 0x1b10: 0xbbd1, 0x1b11: 0x10e1,\n\t0x1b12: 0x10f9, 0x1b13: 0xbbe9, 0x1b14: 0x2079, 0x1b15: 0xbc21, 0x1b16: 0xbac9, 0x1b17: 0x1429,\n\t0x1b18: 0xbb11, 0x1b19: 0x10e1, 0x1b1a: 0x1111, 0x1b1b: 0x2109, 0x1b1c: 0xbab1, 0x1b1d: 0x1099,\n\t0x1b1e: 0x10b1, 0x1b1f: 0x10c9, 0x1b20: 0xbac9, 0x1b21: 0xbae1, 0x1b22: 0xbaf9, 0x1b23: 0x1429,\n\t0x1b24: 0x1a31, 0x1b25: 0xbb11, 0x1b26: 0xbb29, 0x1b27: 0xbb41, 0x1b28: 0xbb59, 0x1b29: 0xbb71,\n\t0x1b2a: 0xbb89, 0x1b2b: 0x2109, 0x1b2c: 0x1111, 0x1b2d: 0x1429, 0x1b2e: 0xbba1, 0x1b2f: 0xbbb9,\n\t0x1b30: 0xbbd1, 0x1b31: 0x10e1, 0x1b32: 0x10f9, 0x1b33: 0xbbe9, 0x1b34: 0x2079, 0x1b35: 0xbc01,\n\t0x1b36: 0xbab1, 0x1b37: 0x1099, 0x1b38: 0x10b1, 0x1b39: 0x10c9, 0x1b3a: 0xbac9, 0x1b3b: 0xbae1,\n\t0x1b3c: 0xbaf9, 0x1b3d: 0x1429, 0x1b3e: 0x1a31, 0x1b3f: 0xbb11,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0xbb29, 0x1b41: 0xbb41, 0x1b42: 0xbb59, 0x1b43: 0xbb71, 0x1b44: 0xbb89, 0x1b45: 0x2109,\n\t0x1b46: 0x1111, 0x1b47: 0xbba1, 0x1b48: 0xbba1, 0x1b49: 0xbbb9, 0x1b4a: 0xbbd1, 0x1b4b: 0x10e1,\n\t0x1b4c: 0x10f9, 0x1b4d: 0xbbe9, 0x1b4e: 0x2079, 0x1b4f: 0xbc21, 0x1b50: 0xbac9, 0x1b51: 0x1429,\n\t0x1b52: 0xbb11, 0x1b53: 0x10e1, 0x1b54: 0x1111, 0x1b55: 0x2109, 0x1b56: 0xbab1, 0x1b57: 0x1099,\n\t0x1b58: 0x10b1, 0x1b59: 0x10c9, 0x1b5a: 0xbac9, 0x1b5b: 0xbae1, 0x1b5c: 0xbaf9, 0x1b5d: 0x1429,\n\t0x1b5e: 0x1a31, 0x1b5f: 0xbb11, 0x1b60: 0xbb29, 0x1b61: 0xbb41, 0x1b62: 0xbb59, 0x1b63: 0xbb71,\n\t0x1b64: 0xbb89, 0x1b65: 0x2109, 0x1b66: 0x1111, 0x1b67: 0x1429, 0x1b68: 0xbba1, 0x1b69: 0xbbb9,\n\t0x1b6a: 0xbbd1, 0x1b6b: 0x10e1, 0x1b6c: 0x10f9, 0x1b6d: 0xbbe9, 0x1b6e: 0x2079, 0x1b6f: 0xbc01,\n\t0x1b70: 0xbab1, 0x1b71: 0x1099, 0x1b72: 0x10b1, 0x1b73: 0x10c9, 0x1b74: 0xbac9, 0x1b75: 0xbae1,\n\t0x1b76: 0xbaf9, 0x1b77: 0x1429, 0x1b78: 0x1a31, 0x1b79: 0xbb11, 0x1b7a: 0xbb29, 0x1b7b: 0xbb41,\n\t0x1b7c: 0xbb59, 0x1b7d: 0xbb71, 0x1b7e: 0xbb89, 0x1b7f: 0x2109,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0x1111, 0x1b81: 0xbba1, 0x1b82: 0xbba1, 0x1b83: 0xbbb9, 0x1b84: 0xbbd1, 0x1b85: 0x10e1,\n\t0x1b86: 0x10f9, 0x1b87: 0xbbe9, 0x1b88: 0x2079, 0x1b89: 0xbc21, 0x1b8a: 0xbac9, 0x1b8b: 0x1429,\n\t0x1b8c: 0xbb11, 0x1b8d: 0x10e1, 0x1b8e: 0x1111, 0x1b8f: 0x2109, 0x1b90: 0xbab1, 0x1b91: 0x1099,\n\t0x1b92: 0x10b1, 0x1b93: 0x10c9, 0x1b94: 0xbac9, 0x1b95: 0xbae1, 0x1b96: 0xbaf9, 0x1b97: 0x1429,\n\t0x1b98: 0x1a31, 0x1b99: 0xbb11, 0x1b9a: 0xbb29, 0x1b9b: 0xbb41, 0x1b9c: 0xbb59, 0x1b9d: 0xbb71,\n\t0x1b9e: 0xbb89, 0x1b9f: 0x2109, 0x1ba0: 0x1111, 0x1ba1: 0x1429, 0x1ba2: 0xbba1, 0x1ba3: 0xbbb9,\n\t0x1ba4: 0xbbd1, 0x1ba5: 0x10e1, 0x1ba6: 0x10f9, 0x1ba7: 0xbbe9, 0x1ba8: 0x2079, 0x1ba9: 0xbc01,\n\t0x1baa: 0xbab1, 0x1bab: 0x1099, 0x1bac: 0x10b1, 0x1bad: 0x10c9, 0x1bae: 0xbac9, 0x1baf: 0xbae1,\n\t0x1bb0: 0xbaf9, 0x1bb1: 0x1429, 0x1bb2: 0x1a31, 0x1bb3: 0xbb11, 0x1bb4: 0xbb29, 0x1bb5: 0xbb41,\n\t0x1bb6: 0xbb59, 0x1bb7: 0xbb71, 0x1bb8: 0xbb89, 0x1bb9: 0x2109, 0x1bba: 0x1111, 0x1bbb: 0xbba1,\n\t0x1bbc: 0xbba1, 0x1bbd: 0xbbb9, 0x1bbe: 0xbbd1, 0x1bbf: 0x10e1,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x10f9, 0x1bc1: 0xbbe9, 0x1bc2: 0x2079, 0x1bc3: 0xbc21, 0x1bc4: 0xbac9, 0x1bc5: 0x1429,\n\t0x1bc6: 0xbb11, 0x1bc7: 0x10e1, 0x1bc8: 0x1111, 0x1bc9: 0x2109, 0x1bca: 0xbc41, 0x1bcb: 0xbc41,\n\t0x1bcc: 0x0040, 0x1bcd: 0x0040, 0x1bce: 0x1f41, 0x1bcf: 0x00c9, 0x1bd0: 0x0069, 0x1bd1: 0x0079,\n\t0x1bd2: 0x1f51, 0x1bd3: 0x1f61, 0x1bd4: 0x1f71, 0x1bd5: 0x1f81, 0x1bd6: 0x1f91, 0x1bd7: 0x1fa1,\n\t0x1bd8: 0x1f41, 0x1bd9: 0x00c9, 0x1bda: 0x0069, 0x1bdb: 0x0079, 0x1bdc: 0x1f51, 0x1bdd: 0x1f61,\n\t0x1bde: 0x1f71, 0x1bdf: 0x1f81, 0x1be0: 0x1f91, 0x1be1: 0x1fa1, 0x1be2: 0x1f41, 0x1be3: 0x00c9,\n\t0x1be4: 0x0069, 0x1be5: 0x0079, 0x1be6: 0x1f51, 0x1be7: 0x1f61, 0x1be8: 0x1f71, 0x1be9: 0x1f81,\n\t0x1bea: 0x1f91, 0x1beb: 0x1fa1, 0x1bec: 0x1f41, 0x1bed: 0x00c9, 0x1bee: 0x0069, 0x1bef: 0x0079,\n\t0x1bf0: 0x1f51, 0x1bf1: 0x1f61, 0x1bf2: 0x1f71, 0x1bf3: 0x1f81, 0x1bf4: 0x1f91, 0x1bf5: 0x1fa1,\n\t0x1bf6: 0x1f41, 0x1bf7: 0x00c9, 0x1bf8: 0x0069, 0x1bf9: 0x0079, 0x1bfa: 0x1f51, 0x1bfb: 0x1f61,\n\t0x1bfc: 0x1f71, 0x1bfd: 0x1f81, 0x1bfe: 0x1f91, 0x1bff: 0x1fa1,\n\t// Block 0x70, offset 0x1c00\n\t0x1c00: 0xe115, 0x1c01: 0xe115, 0x1c02: 0xe135, 0x1c03: 0xe135, 0x1c04: 0xe115, 0x1c05: 0xe115,\n\t0x1c06: 0xe175, 0x1c07: 0xe175, 0x1c08: 0xe115, 0x1c09: 0xe115, 0x1c0a: 0xe135, 0x1c0b: 0xe135,\n\t0x1c0c: 0xe115, 0x1c0d: 0xe115, 0x1c0e: 0xe1f5, 0x1c0f: 0xe1f5, 0x1c10: 0xe115, 0x1c11: 0xe115,\n\t0x1c12: 0xe135, 0x1c13: 0xe135, 0x1c14: 0xe115, 0x1c15: 0xe115, 0x1c16: 0xe175, 0x1c17: 0xe175,\n\t0x1c18: 0xe115, 0x1c19: 0xe115, 0x1c1a: 0xe135, 0x1c1b: 0xe135, 0x1c1c: 0xe115, 0x1c1d: 0xe115,\n\t0x1c1e: 0x8b05, 0x1c1f: 0x8b05, 0x1c20: 0x04b5, 0x1c21: 0x04b5, 0x1c22: 0x0a08, 0x1c23: 0x0a08,\n\t0x1c24: 0x0a08, 0x1c25: 0x0a08, 0x1c26: 0x0a08, 0x1c27: 0x0a08, 0x1c28: 0x0a08, 0x1c29: 0x0a08,\n\t0x1c2a: 0x0a08, 0x1c2b: 0x0a08, 0x1c2c: 0x0a08, 0x1c2d: 0x0a08, 0x1c2e: 0x0a08, 0x1c2f: 0x0a08,\n\t0x1c30: 0x0a08, 0x1c31: 0x0a08, 0x1c32: 0x0a08, 0x1c33: 0x0a08, 0x1c34: 0x0a08, 0x1c35: 0x0a08,\n\t0x1c36: 0x0a08, 0x1c37: 0x0a08, 0x1c38: 0x0a08, 0x1c39: 0x0a08, 0x1c3a: 0x0a08, 0x1c3b: 0x0a08,\n\t0x1c3c: 0x0a08, 0x1c3d: 0x0a08, 0x1c3e: 0x0a08, 0x1c3f: 0x0a08,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0xb189, 0x1c41: 0xb1a1, 0x1c42: 0xb201, 0x1c43: 0xb249, 0x1c44: 0x0040, 0x1c45: 0xb411,\n\t0x1c46: 0xb291, 0x1c47: 0xb219, 0x1c48: 0xb309, 0x1c49: 0xb429, 0x1c4a: 0xb399, 0x1c4b: 0xb3b1,\n\t0x1c4c: 0xb3c9, 0x1c4d: 0xb3e1, 0x1c4e: 0xb2a9, 0x1c4f: 0xb339, 0x1c50: 0xb369, 0x1c51: 0xb2d9,\n\t0x1c52: 0xb381, 0x1c53: 0xb279, 0x1c54: 0xb2c1, 0x1c55: 0xb1d1, 0x1c56: 0xb1e9, 0x1c57: 0xb231,\n\t0x1c58: 0xb261, 0x1c59: 0xb2f1, 0x1c5a: 0xb321, 0x1c5b: 0xb351, 0x1c5c: 0xbc59, 0x1c5d: 0x7949,\n\t0x1c5e: 0xbc71, 0x1c5f: 0xbc89, 0x1c60: 0x0040, 0x1c61: 0xb1a1, 0x1c62: 0xb201, 0x1c63: 0x0040,\n\t0x1c64: 0xb3f9, 0x1c65: 0x0040, 0x1c66: 0x0040, 0x1c67: 0xb219, 0x1c68: 0x0040, 0x1c69: 0xb429,\n\t0x1c6a: 0xb399, 0x1c6b: 0xb3b1, 0x1c6c: 0xb3c9, 0x1c6d: 0xb3e1, 0x1c6e: 0xb2a9, 0x1c6f: 0xb339,\n\t0x1c70: 0xb369, 0x1c71: 0xb2d9, 0x1c72: 0xb381, 0x1c73: 0x0040, 0x1c74: 0xb2c1, 0x1c75: 0xb1d1,\n\t0x1c76: 0xb1e9, 0x1c77: 0xb231, 0x1c78: 0x0040, 0x1c79: 0xb2f1, 0x1c7a: 0x0040, 0x1c7b: 0xb351,\n\t0x1c7c: 0x0040, 0x1c7d: 0x0040, 0x1c7e: 0x0040, 0x1c7f: 0x0040,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0x0040, 0x1c81: 0x0040, 0x1c82: 0xb201, 0x1c83: 0x0040, 0x1c84: 0x0040, 0x1c85: 0x0040,\n\t0x1c86: 0x0040, 0x1c87: 0xb219, 0x1c88: 0x0040, 0x1c89: 0xb429, 0x1c8a: 0x0040, 0x1c8b: 0xb3b1,\n\t0x1c8c: 0x0040, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0x0040, 0x1c91: 0xb2d9,\n\t0x1c92: 0xb381, 0x1c93: 0x0040, 0x1c94: 0xb2c1, 0x1c95: 0x0040, 0x1c96: 0x0040, 0x1c97: 0xb231,\n\t0x1c98: 0x0040, 0x1c99: 0xb2f1, 0x1c9a: 0x0040, 0x1c9b: 0xb351, 0x1c9c: 0x0040, 0x1c9d: 0x7949,\n\t0x1c9e: 0x0040, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040,\n\t0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0xb309, 0x1ca9: 0xb429,\n\t0x1caa: 0xb399, 0x1cab: 0x0040, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339,\n\t0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1,\n\t0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0xb321, 0x1cbb: 0xb351,\n\t0x1cbc: 0xbc59, 0x1cbd: 0x0040, 0x1cbe: 0xbc71, 0x1cbf: 0x0040,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cc0: 0xb189, 0x1cc1: 0xb1a1, 0x1cc2: 0xb201, 0x1cc3: 0xb249, 0x1cc4: 0xb3f9, 0x1cc5: 0xb411,\n\t0x1cc6: 0xb291, 0x1cc7: 0xb219, 0x1cc8: 0xb309, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1,\n\t0x1ccc: 0xb3c9, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0xb369, 0x1cd1: 0xb2d9,\n\t0x1cd2: 0xb381, 0x1cd3: 0xb279, 0x1cd4: 0xb2c1, 0x1cd5: 0xb1d1, 0x1cd6: 0xb1e9, 0x1cd7: 0xb231,\n\t0x1cd8: 0xb261, 0x1cd9: 0xb2f1, 0x1cda: 0xb321, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x0040,\n\t0x1cde: 0x0040, 0x1cdf: 0x0040, 0x1ce0: 0x0040, 0x1ce1: 0xb1a1, 0x1ce2: 0xb201, 0x1ce3: 0xb249,\n\t0x1ce4: 0x0040, 0x1ce5: 0xb411, 0x1ce6: 0xb291, 0x1ce7: 0xb219, 0x1ce8: 0xb309, 0x1ce9: 0xb429,\n\t0x1cea: 0x0040, 0x1ceb: 0xb3b1, 0x1cec: 0xb3c9, 0x1ced: 0xb3e1, 0x1cee: 0xb2a9, 0x1cef: 0xb339,\n\t0x1cf0: 0xb369, 0x1cf1: 0xb2d9, 0x1cf2: 0xb381, 0x1cf3: 0xb279, 0x1cf4: 0xb2c1, 0x1cf5: 0xb1d1,\n\t0x1cf6: 0xb1e9, 0x1cf7: 0xb231, 0x1cf8: 0xb261, 0x1cf9: 0xb2f1, 0x1cfa: 0xb321, 0x1cfb: 0xb351,\n\t0x1cfc: 0x0040, 0x1cfd: 0x0040, 0x1cfe: 0x0040, 0x1cff: 0x0040,\n\t// Block 0x74, offset 0x1d00\n\t0x1d00: 0x0040, 0x1d01: 0xbca2, 0x1d02: 0xbcba, 0x1d03: 0xbcd2, 0x1d04: 0xbcea, 0x1d05: 0xbd02,\n\t0x1d06: 0xbd1a, 0x1d07: 0xbd32, 0x1d08: 0xbd4a, 0x1d09: 0xbd62, 0x1d0a: 0xbd7a, 0x1d0b: 0x0018,\n\t0x1d0c: 0x0018, 0x1d0d: 0x0040, 0x1d0e: 0x0040, 0x1d0f: 0x0040, 0x1d10: 0xbd92, 0x1d11: 0xbdb2,\n\t0x1d12: 0xbdd2, 0x1d13: 0xbdf2, 0x1d14: 0xbe12, 0x1d15: 0xbe32, 0x1d16: 0xbe52, 0x1d17: 0xbe72,\n\t0x1d18: 0xbe92, 0x1d19: 0xbeb2, 0x1d1a: 0xbed2, 0x1d1b: 0xbef2, 0x1d1c: 0xbf12, 0x1d1d: 0xbf32,\n\t0x1d1e: 0xbf52, 0x1d1f: 0xbf72, 0x1d20: 0xbf92, 0x1d21: 0xbfb2, 0x1d22: 0xbfd2, 0x1d23: 0xbff2,\n\t0x1d24: 0xc012, 0x1d25: 0xc032, 0x1d26: 0xc052, 0x1d27: 0xc072, 0x1d28: 0xc092, 0x1d29: 0xc0b2,\n\t0x1d2a: 0xc0d1, 0x1d2b: 0x1159, 0x1d2c: 0x0269, 0x1d2d: 0x6671, 0x1d2e: 0xc111, 0x1d2f: 0x0040,\n\t0x1d30: 0x0039, 0x1d31: 0x0ee9, 0x1d32: 0x1159, 0x1d33: 0x0ef9, 0x1d34: 0x0f09, 0x1d35: 0x1199,\n\t0x1d36: 0x0f31, 0x1d37: 0x0249, 0x1d38: 0x0f41, 0x1d39: 0x0259, 0x1d3a: 0x0f51, 0x1d3b: 0x0359,\n\t0x1d3c: 0x0f61, 0x1d3d: 0x0f71, 0x1d3e: 0x00d9, 0x1d3f: 0x0f99,\n\t// Block 0x75, offset 0x1d40\n\t0x1d40: 0x2039, 0x1d41: 0x0269, 0x1d42: 0x01d9, 0x1d43: 0x0fa9, 0x1d44: 0x0fb9, 0x1d45: 0x1089,\n\t0x1d46: 0x0279, 0x1d47: 0x0369, 0x1d48: 0x0289, 0x1d49: 0x13d1, 0x1d4a: 0xc129, 0x1d4b: 0x65b1,\n\t0x1d4c: 0xc141, 0x1d4d: 0x1441, 0x1d4e: 0xc159, 0x1d4f: 0xc179, 0x1d50: 0x0018, 0x1d51: 0x0018,\n\t0x1d52: 0x0018, 0x1d53: 0x0018, 0x1d54: 0x0018, 0x1d55: 0x0018, 0x1d56: 0x0018, 0x1d57: 0x0018,\n\t0x1d58: 0x0018, 0x1d59: 0x0018, 0x1d5a: 0x0018, 0x1d5b: 0x0018, 0x1d5c: 0x0018, 0x1d5d: 0x0018,\n\t0x1d5e: 0x0018, 0x1d5f: 0x0018, 0x1d60: 0x0018, 0x1d61: 0x0018, 0x1d62: 0x0018, 0x1d63: 0x0018,\n\t0x1d64: 0x0018, 0x1d65: 0x0018, 0x1d66: 0x0018, 0x1d67: 0x0018, 0x1d68: 0x0018, 0x1d69: 0x0018,\n\t0x1d6a: 0xc191, 0x1d6b: 0xc1a9, 0x1d6c: 0x0040, 0x1d6d: 0x0040, 0x1d6e: 0x0040, 0x1d6f: 0x0040,\n\t0x1d70: 0x0018, 0x1d71: 0x0018, 0x1d72: 0x0018, 0x1d73: 0x0018, 0x1d74: 0x0018, 0x1d75: 0x0018,\n\t0x1d76: 0x0018, 0x1d77: 0x0018, 0x1d78: 0x0018, 0x1d79: 0x0018, 0x1d7a: 0x0018, 0x1d7b: 0x0018,\n\t0x1d7c: 0x0018, 0x1d7d: 0x0018, 0x1d7e: 0x0018, 0x1d7f: 0x0018,\n\t// Block 0x76, offset 0x1d80\n\t0x1d80: 0xc1d9, 0x1d81: 0xc211, 0x1d82: 0xc249, 0x1d83: 0x0040, 0x1d84: 0x0040, 0x1d85: 0x0040,\n\t0x1d86: 0x0040, 0x1d87: 0x0040, 0x1d88: 0x0040, 0x1d89: 0x0040, 0x1d8a: 0x0040, 0x1d8b: 0x0040,\n\t0x1d8c: 0x0040, 0x1d8d: 0x0040, 0x1d8e: 0x0040, 0x1d8f: 0x0040, 0x1d90: 0xc269, 0x1d91: 0xc289,\n\t0x1d92: 0xc2a9, 0x1d93: 0xc2c9, 0x1d94: 0xc2e9, 0x1d95: 0xc309, 0x1d96: 0xc329, 0x1d97: 0xc349,\n\t0x1d98: 0xc369, 0x1d99: 0xc389, 0x1d9a: 0xc3a9, 0x1d9b: 0xc3c9, 0x1d9c: 0xc3e9, 0x1d9d: 0xc409,\n\t0x1d9e: 0xc429, 0x1d9f: 0xc449, 0x1da0: 0xc469, 0x1da1: 0xc489, 0x1da2: 0xc4a9, 0x1da3: 0xc4c9,\n\t0x1da4: 0xc4e9, 0x1da5: 0xc509, 0x1da6: 0xc529, 0x1da7: 0xc549, 0x1da8: 0xc569, 0x1da9: 0xc589,\n\t0x1daa: 0xc5a9, 0x1dab: 0xc5c9, 0x1dac: 0xc5e9, 0x1dad: 0xc609, 0x1dae: 0xc629, 0x1daf: 0xc649,\n\t0x1db0: 0xc669, 0x1db1: 0xc689, 0x1db2: 0xc6a9, 0x1db3: 0xc6c9, 0x1db4: 0xc6e9, 0x1db5: 0xc709,\n\t0x1db6: 0xc729, 0x1db7: 0xc749, 0x1db8: 0xc769, 0x1db9: 0xc789, 0x1dba: 0xc7a9, 0x1dbb: 0xc7c9,\n\t0x1dbc: 0x0040, 0x1dbd: 0x0040, 0x1dbe: 0x0040, 0x1dbf: 0x0040,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dc0: 0xcaf9, 0x1dc1: 0xcb19, 0x1dc2: 0xcb39, 0x1dc3: 0x8b1d, 0x1dc4: 0xcb59, 0x1dc5: 0xcb79,\n\t0x1dc6: 0xcb99, 0x1dc7: 0xcbb9, 0x1dc8: 0xcbd9, 0x1dc9: 0xcbf9, 0x1dca: 0xcc19, 0x1dcb: 0xcc39,\n\t0x1dcc: 0xcc59, 0x1dcd: 0x8b3d, 0x1dce: 0xcc79, 0x1dcf: 0xcc99, 0x1dd0: 0xccb9, 0x1dd1: 0xccd9,\n\t0x1dd2: 0x8b5d, 0x1dd3: 0xccf9, 0x1dd4: 0xcd19, 0x1dd5: 0xc429, 0x1dd6: 0x8b7d, 0x1dd7: 0xcd39,\n\t0x1dd8: 0xcd59, 0x1dd9: 0xcd79, 0x1dda: 0xcd99, 0x1ddb: 0xcdb9, 0x1ddc: 0x8b9d, 0x1ddd: 0xcdd9,\n\t0x1dde: 0xcdf9, 0x1ddf: 0xce19, 0x1de0: 0xce39, 0x1de1: 0xce59, 0x1de2: 0xc789, 0x1de3: 0xce79,\n\t0x1de4: 0xce99, 0x1de5: 0xceb9, 0x1de6: 0xced9, 0x1de7: 0xcef9, 0x1de8: 0xcf19, 0x1de9: 0xcf39,\n\t0x1dea: 0xcf59, 0x1deb: 0xcf79, 0x1dec: 0xcf99, 0x1ded: 0xcfb9, 0x1dee: 0xcfd9, 0x1def: 0xcff9,\n\t0x1df0: 0xd019, 0x1df1: 0xd039, 0x1df2: 0xd039, 0x1df3: 0xd039, 0x1df4: 0x8bbd, 0x1df5: 0xd059,\n\t0x1df6: 0xd079, 0x1df7: 0xd099, 0x1df8: 0x8bdd, 0x1df9: 0xd0b9, 0x1dfa: 0xd0d9, 0x1dfb: 0xd0f9,\n\t0x1dfc: 0xd119, 0x1dfd: 0xd139, 0x1dfe: 0xd159, 0x1dff: 0xd179,\n\t// Block 0x78, offset 0x1e00\n\t0x1e00: 0xd199, 0x1e01: 0xd1b9, 0x1e02: 0xd1d9, 0x1e03: 0xd1f9, 0x1e04: 0xd219, 0x1e05: 0xd239,\n\t0x1e06: 0xd239, 0x1e07: 0xd259, 0x1e08: 0xd279, 0x1e09: 0xd299, 0x1e0a: 0xd2b9, 0x1e0b: 0xd2d9,\n\t0x1e0c: 0xd2f9, 0x1e0d: 0xd319, 0x1e0e: 0xd339, 0x1e0f: 0xd359, 0x1e10: 0xd379, 0x1e11: 0xd399,\n\t0x1e12: 0xd3b9, 0x1e13: 0xd3d9, 0x1e14: 0xd3f9, 0x1e15: 0xd419, 0x1e16: 0xd439, 0x1e17: 0xd459,\n\t0x1e18: 0xd479, 0x1e19: 0x8bfd, 0x1e1a: 0xd499, 0x1e1b: 0xd4b9, 0x1e1c: 0xd4d9, 0x1e1d: 0xc309,\n\t0x1e1e: 0xd4f9, 0x1e1f: 0xd519, 0x1e20: 0x8c1d, 0x1e21: 0x8c3d, 0x1e22: 0xd539, 0x1e23: 0xd559,\n\t0x1e24: 0xd579, 0x1e25: 0xd599, 0x1e26: 0xd5b9, 0x1e27: 0xd5d9, 0x1e28: 0x2040, 0x1e29: 0xd5f9,\n\t0x1e2a: 0xd619, 0x1e2b: 0xd619, 0x1e2c: 0x8c5d, 0x1e2d: 0xd639, 0x1e2e: 0xd659, 0x1e2f: 0xd679,\n\t0x1e30: 0xd699, 0x1e31: 0x8c7d, 0x1e32: 0xd6b9, 0x1e33: 0xd6d9, 0x1e34: 0x2040, 0x1e35: 0xd6f9,\n\t0x1e36: 0xd719, 0x1e37: 0xd739, 0x1e38: 0xd759, 0x1e39: 0xd779, 0x1e3a: 0xd799, 0x1e3b: 0x8c9d,\n\t0x1e3c: 0xd7b9, 0x1e3d: 0x8cbd, 0x1e3e: 0xd7d9, 0x1e3f: 0xd7f9,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0xd819, 0x1e41: 0xd839, 0x1e42: 0xd859, 0x1e43: 0xd879, 0x1e44: 0xd899, 0x1e45: 0xd8b9,\n\t0x1e46: 0xd8d9, 0x1e47: 0xd8f9, 0x1e48: 0xd919, 0x1e49: 0x8cdd, 0x1e4a: 0xd939, 0x1e4b: 0xd959,\n\t0x1e4c: 0xd979, 0x1e4d: 0xd999, 0x1e4e: 0xd9b9, 0x1e4f: 0x8cfd, 0x1e50: 0xd9d9, 0x1e51: 0x8d1d,\n\t0x1e52: 0x8d3d, 0x1e53: 0xd9f9, 0x1e54: 0xda19, 0x1e55: 0xda19, 0x1e56: 0xda39, 0x1e57: 0x8d5d,\n\t0x1e58: 0x8d7d, 0x1e59: 0xda59, 0x1e5a: 0xda79, 0x1e5b: 0xda99, 0x1e5c: 0xdab9, 0x1e5d: 0xdad9,\n\t0x1e5e: 0xdaf9, 0x1e5f: 0xdb19, 0x1e60: 0xdb39, 0x1e61: 0xdb59, 0x1e62: 0xdb79, 0x1e63: 0xdb99,\n\t0x1e64: 0x8d9d, 0x1e65: 0xdbb9, 0x1e66: 0xdbd9, 0x1e67: 0xdbf9, 0x1e68: 0xdc19, 0x1e69: 0xdbf9,\n\t0x1e6a: 0xdc39, 0x1e6b: 0xdc59, 0x1e6c: 0xdc79, 0x1e6d: 0xdc99, 0x1e6e: 0xdcb9, 0x1e6f: 0xdcd9,\n\t0x1e70: 0xdcf9, 0x1e71: 0xdd19, 0x1e72: 0xdd39, 0x1e73: 0xdd59, 0x1e74: 0xdd79, 0x1e75: 0xdd99,\n\t0x1e76: 0xddb9, 0x1e77: 0xddd9, 0x1e78: 0x8dbd, 0x1e79: 0xddf9, 0x1e7a: 0xde19, 0x1e7b: 0xde39,\n\t0x1e7c: 0xde59, 0x1e7d: 0xde79, 0x1e7e: 0x8ddd, 0x1e7f: 0xde99,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0xe599, 0x1e81: 0xe5b9, 0x1e82: 0xe5d9, 0x1e83: 0xe5f9, 0x1e84: 0xe619, 0x1e85: 0xe639,\n\t0x1e86: 0x8efd, 0x1e87: 0xe659, 0x1e88: 0xe679, 0x1e89: 0xe699, 0x1e8a: 0xe6b9, 0x1e8b: 0xe6d9,\n\t0x1e8c: 0xe6f9, 0x1e8d: 0x8f1d, 0x1e8e: 0xe719, 0x1e8f: 0xe739, 0x1e90: 0x8f3d, 0x1e91: 0x8f5d,\n\t0x1e92: 0xe759, 0x1e93: 0xe779, 0x1e94: 0xe799, 0x1e95: 0xe7b9, 0x1e96: 0xe7d9, 0x1e97: 0xe7f9,\n\t0x1e98: 0xe819, 0x1e99: 0xe839, 0x1e9a: 0xe859, 0x1e9b: 0x8f7d, 0x1e9c: 0xe879, 0x1e9d: 0x8f9d,\n\t0x1e9e: 0xe899, 0x1e9f: 0x2040, 0x1ea0: 0xe8b9, 0x1ea1: 0xe8d9, 0x1ea2: 0xe8f9, 0x1ea3: 0x8fbd,\n\t0x1ea4: 0xe919, 0x1ea5: 0xe939, 0x1ea6: 0x8fdd, 0x1ea7: 0x8ffd, 0x1ea8: 0xe959, 0x1ea9: 0xe979,\n\t0x1eaa: 0xe999, 0x1eab: 0xe9b9, 0x1eac: 0xe9d9, 0x1ead: 0xe9d9, 0x1eae: 0xe9f9, 0x1eaf: 0xea19,\n\t0x1eb0: 0xea39, 0x1eb1: 0xea59, 0x1eb2: 0xea79, 0x1eb3: 0xea99, 0x1eb4: 0xeab9, 0x1eb5: 0x901d,\n\t0x1eb6: 0xead9, 0x1eb7: 0x903d, 0x1eb8: 0xeaf9, 0x1eb9: 0x905d, 0x1eba: 0xeb19, 0x1ebb: 0x907d,\n\t0x1ebc: 0x909d, 0x1ebd: 0x90bd, 0x1ebe: 0xeb39, 0x1ebf: 0xeb59,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ec0: 0xeb79, 0x1ec1: 0x90dd, 0x1ec2: 0x90fd, 0x1ec3: 0x911d, 0x1ec4: 0x913d, 0x1ec5: 0xeb99,\n\t0x1ec6: 0xebb9, 0x1ec7: 0xebb9, 0x1ec8: 0xebd9, 0x1ec9: 0xebf9, 0x1eca: 0xec19, 0x1ecb: 0xec39,\n\t0x1ecc: 0xec59, 0x1ecd: 0x915d, 0x1ece: 0xec79, 0x1ecf: 0xec99, 0x1ed0: 0xecb9, 0x1ed1: 0xecd9,\n\t0x1ed2: 0x917d, 0x1ed3: 0xecf9, 0x1ed4: 0x919d, 0x1ed5: 0x91bd, 0x1ed6: 0xed19, 0x1ed7: 0xed39,\n\t0x1ed8: 0xed59, 0x1ed9: 0xed79, 0x1eda: 0xed99, 0x1edb: 0xedb9, 0x1edc: 0x91dd, 0x1edd: 0x91fd,\n\t0x1ede: 0x921d, 0x1edf: 0x2040, 0x1ee0: 0xedd9, 0x1ee1: 0x923d, 0x1ee2: 0xedf9, 0x1ee3: 0xee19,\n\t0x1ee4: 0xee39, 0x1ee5: 0x925d, 0x1ee6: 0xee59, 0x1ee7: 0xee79, 0x1ee8: 0xee99, 0x1ee9: 0xeeb9,\n\t0x1eea: 0xeed9, 0x1eeb: 0x927d, 0x1eec: 0xeef9, 0x1eed: 0xef19, 0x1eee: 0xef39, 0x1eef: 0xef59,\n\t0x1ef0: 0xef79, 0x1ef1: 0xef99, 0x1ef2: 0x929d, 0x1ef3: 0x92bd, 0x1ef4: 0xefb9, 0x1ef5: 0x92dd,\n\t0x1ef6: 0xefd9, 0x1ef7: 0x92fd, 0x1ef8: 0xeff9, 0x1ef9: 0xf019, 0x1efa: 0xf039, 0x1efb: 0x931d,\n\t0x1efc: 0x933d, 0x1efd: 0xf059, 0x1efe: 0x935d, 0x1eff: 0xf079,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f00: 0xf6b9, 0x1f01: 0xf6d9, 0x1f02: 0xf6f9, 0x1f03: 0xf719, 0x1f04: 0xf739, 0x1f05: 0x951d,\n\t0x1f06: 0xf759, 0x1f07: 0xf779, 0x1f08: 0xf799, 0x1f09: 0xf7b9, 0x1f0a: 0xf7d9, 0x1f0b: 0x953d,\n\t0x1f0c: 0x955d, 0x1f0d: 0xf7f9, 0x1f0e: 0xf819, 0x1f0f: 0xf839, 0x1f10: 0xf859, 0x1f11: 0xf879,\n\t0x1f12: 0xf899, 0x1f13: 0x957d, 0x1f14: 0xf8b9, 0x1f15: 0xf8d9, 0x1f16: 0xf8f9, 0x1f17: 0xf919,\n\t0x1f18: 0x959d, 0x1f19: 0x95bd, 0x1f1a: 0xf939, 0x1f1b: 0xf959, 0x1f1c: 0xf979, 0x1f1d: 0x95dd,\n\t0x1f1e: 0xf999, 0x1f1f: 0xf9b9, 0x1f20: 0x6815, 0x1f21: 0x95fd, 0x1f22: 0xf9d9, 0x1f23: 0xf9f9,\n\t0x1f24: 0xfa19, 0x1f25: 0x961d, 0x1f26: 0xfa39, 0x1f27: 0xfa59, 0x1f28: 0xfa79, 0x1f29: 0xfa99,\n\t0x1f2a: 0xfab9, 0x1f2b: 0xfad9, 0x1f2c: 0xfaf9, 0x1f2d: 0x963d, 0x1f2e: 0xfb19, 0x1f2f: 0xfb39,\n\t0x1f30: 0xfb59, 0x1f31: 0x965d, 0x1f32: 0xfb79, 0x1f33: 0xfb99, 0x1f34: 0xfbb9, 0x1f35: 0xfbd9,\n\t0x1f36: 0x7b35, 0x1f37: 0x967d, 0x1f38: 0xfbf9, 0x1f39: 0xfc19, 0x1f3a: 0xfc39, 0x1f3b: 0x969d,\n\t0x1f3c: 0xfc59, 0x1f3d: 0x96bd, 0x1f3e: 0xfc79, 0x1f3f: 0xfc79,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f40: 0xfc99, 0x1f41: 0x96dd, 0x1f42: 0xfcb9, 0x1f43: 0xfcd9, 0x1f44: 0xfcf9, 0x1f45: 0xfd19,\n\t0x1f46: 0xfd39, 0x1f47: 0xfd59, 0x1f48: 0xfd79, 0x1f49: 0x96fd, 0x1f4a: 0xfd99, 0x1f4b: 0xfdb9,\n\t0x1f4c: 0xfdd9, 0x1f4d: 0xfdf9, 0x1f4e: 0xfe19, 0x1f4f: 0xfe39, 0x1f50: 0x971d, 0x1f51: 0xfe59,\n\t0x1f52: 0x973d, 0x1f53: 0x975d, 0x1f54: 0x977d, 0x1f55: 0xfe79, 0x1f56: 0xfe99, 0x1f57: 0xfeb9,\n\t0x1f58: 0xfed9, 0x1f59: 0xfef9, 0x1f5a: 0xff19, 0x1f5b: 0xff39, 0x1f5c: 0xff59, 0x1f5d: 0x979d,\n\t0x1f5e: 0x0040, 0x1f5f: 0x0040, 0x1f60: 0x0040, 0x1f61: 0x0040, 0x1f62: 0x0040, 0x1f63: 0x0040,\n\t0x1f64: 0x0040, 0x1f65: 0x0040, 0x1f66: 0x0040, 0x1f67: 0x0040, 0x1f68: 0x0040, 0x1f69: 0x0040,\n\t0x1f6a: 0x0040, 0x1f6b: 0x0040, 0x1f6c: 0x0040, 0x1f6d: 0x0040, 0x1f6e: 0x0040, 0x1f6f: 0x0040,\n\t0x1f70: 0x0040, 0x1f71: 0x0040, 0x1f72: 0x0040, 0x1f73: 0x0040, 0x1f74: 0x0040, 0x1f75: 0x0040,\n\t0x1f76: 0x0040, 0x1f77: 0x0040, 0x1f78: 0x0040, 0x1f79: 0x0040, 0x1f7a: 0x0040, 0x1f7b: 0x0040,\n\t0x1f7c: 0x0040, 0x1f7d: 0x0040, 0x1f7e: 0x0040, 0x1f7f: 0x0040,\n}\n\n// idnaIndex: 35 blocks, 2240 entries, 4480 bytes\n// Block 0 is the zero block.\nvar idnaIndex = [2240]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x7c, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05,\n\t0xc8: 0x06, 0xc9: 0x7d, 0xca: 0x7e, 0xcb: 0x07, 0xcc: 0x7f, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a,\n\t0xd0: 0x80, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x81, 0xd6: 0x82, 0xd7: 0x83,\n\t0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x84, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x85, 0xde: 0x86, 0xdf: 0x87,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07,\n\t0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c,\n\t0xf0: 0x1c, 0xf1: 0x1d, 0xf2: 0x1d, 0xf3: 0x1f, 0xf4: 0x20,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x88, 0x121: 0x89, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x13, 0x126: 0x14, 0x127: 0x15,\n\t0x128: 0x16, 0x129: 0x17, 0x12a: 0x18, 0x12b: 0x19, 0x12c: 0x1a, 0x12d: 0x1b, 0x12e: 0x1c, 0x12f: 0x8d,\n\t0x130: 0x8e, 0x131: 0x1d, 0x132: 0x1e, 0x133: 0x1f, 0x134: 0x8f, 0x135: 0x20, 0x136: 0x90, 0x137: 0x91,\n\t0x138: 0x92, 0x139: 0x93, 0x13a: 0x21, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x22, 0x13e: 0x23, 0x13f: 0x96,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e,\n\t0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6,\n\t0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f,\n\t0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae,\n\t0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6,\n\t0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe,\n\t0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x24, 0x175: 0x25, 0x176: 0x26, 0x177: 0xc3,\n\t0x178: 0x27, 0x179: 0x27, 0x17a: 0x28, 0x17b: 0x27, 0x17c: 0xc4, 0x17d: 0x29, 0x17e: 0x2a, 0x17f: 0x2b,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x2c, 0x181: 0x2d, 0x182: 0x2e, 0x183: 0xc5, 0x184: 0x2f, 0x185: 0x30, 0x186: 0xc6, 0x187: 0x9b,\n\t0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0xca,\n\t0x190: 0xcb, 0x191: 0x31, 0x192: 0x32, 0x193: 0x33, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b,\n\t0x198: 0x9b, 0x199: 0x9b, 0x19a: 0x9b, 0x19b: 0x9b, 0x19c: 0x9b, 0x19d: 0x9b, 0x19e: 0x9b, 0x19f: 0x9b,\n\t0x1a0: 0x9b, 0x1a1: 0x9b, 0x1a2: 0x9b, 0x1a3: 0x9b, 0x1a4: 0x9b, 0x1a5: 0x9b, 0x1a6: 0x9b, 0x1a7: 0x9b,\n\t0x1a8: 0xcc, 0x1a9: 0xcd, 0x1aa: 0x9b, 0x1ab: 0xce, 0x1ac: 0x9b, 0x1ad: 0xcf, 0x1ae: 0xd0, 0x1af: 0xd1,\n\t0x1b0: 0xd2, 0x1b1: 0x34, 0x1b2: 0x27, 0x1b3: 0x35, 0x1b4: 0xd3, 0x1b5: 0xd4, 0x1b6: 0xd5, 0x1b7: 0xd6,\n\t0x1b8: 0xd7, 0x1b9: 0xd8, 0x1ba: 0xd9, 0x1bb: 0xda, 0x1bc: 0xdb, 0x1bd: 0xdc, 0x1be: 0xdd, 0x1bf: 0x36,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x37, 0x1c1: 0xde, 0x1c2: 0xdf, 0x1c3: 0xe0, 0x1c4: 0xe1, 0x1c5: 0x38, 0x1c6: 0x39, 0x1c7: 0xe2,\n\t0x1c8: 0xe3, 0x1c9: 0x3a, 0x1ca: 0x3b, 0x1cb: 0x3c, 0x1cc: 0x3d, 0x1cd: 0x3e, 0x1ce: 0x3f, 0x1cf: 0x40,\n\t0x1d0: 0x9f, 0x1d1: 0x9f, 0x1d2: 0x9f, 0x1d3: 0x9f, 0x1d4: 0x9f, 0x1d5: 0x9f, 0x1d6: 0x9f, 0x1d7: 0x9f,\n\t0x1d8: 0x9f, 0x1d9: 0x9f, 0x1da: 0x9f, 0x1db: 0x9f, 0x1dc: 0x9f, 0x1dd: 0x9f, 0x1de: 0x9f, 0x1df: 0x9f,\n\t0x1e0: 0x9f, 0x1e1: 0x9f, 0x1e2: 0x9f, 0x1e3: 0x9f, 0x1e4: 0x9f, 0x1e5: 0x9f, 0x1e6: 0x9f, 0x1e7: 0x9f,\n\t0x1e8: 0x9f, 0x1e9: 0x9f, 0x1ea: 0x9f, 0x1eb: 0x9f, 0x1ec: 0x9f, 0x1ed: 0x9f, 0x1ee: 0x9f, 0x1ef: 0x9f,\n\t0x1f0: 0x9f, 0x1f1: 0x9f, 0x1f2: 0x9f, 0x1f3: 0x9f, 0x1f4: 0x9f, 0x1f5: 0x9f, 0x1f6: 0x9f, 0x1f7: 0x9f,\n\t0x1f8: 0x9f, 0x1f9: 0x9f, 0x1fa: 0x9f, 0x1fb: 0x9f, 0x1fc: 0x9f, 0x1fd: 0x9f, 0x1fe: 0x9f, 0x1ff: 0x9f,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9f, 0x201: 0x9f, 0x202: 0x9f, 0x203: 0x9f, 0x204: 0x9f, 0x205: 0x9f, 0x206: 0x9f, 0x207: 0x9f,\n\t0x208: 0x9f, 0x209: 0x9f, 0x20a: 0x9f, 0x20b: 0x9f, 0x20c: 0x9f, 0x20d: 0x9f, 0x20e: 0x9f, 0x20f: 0x9f,\n\t0x210: 0x9f, 0x211: 0x9f, 0x212: 0x9f, 0x213: 0x9f, 0x214: 0x9f, 0x215: 0x9f, 0x216: 0x9f, 0x217: 0x9f,\n\t0x218: 0x9f, 0x219: 0x9f, 0x21a: 0x9f, 0x21b: 0x9f, 0x21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f,\n\t0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f,\n\t0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f,\n\t0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b,\n\t0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f,\n\t0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f,\n\t0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f,\n\t0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f,\n\t0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f,\n\t0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f,\n\t0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f,\n\t0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f,\n\t0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f,\n\t0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f,\n\t0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f,\n\t0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f, 0x2a4: 0x9f, 0x2a5: 0x9f, 0x2a6: 0x9f, 0x2a7: 0x9f,\n\t0x2a8: 0x9f, 0x2a9: 0x9f, 0x2aa: 0x9f, 0x2ab: 0x9f, 0x2ac: 0x9f, 0x2ad: 0x9f, 0x2ae: 0x9f, 0x2af: 0x9f,\n\t0x2b0: 0x9f, 0x2b1: 0x9f, 0x2b2: 0x9f, 0x2b3: 0x9f, 0x2b4: 0x9f, 0x2b5: 0x9f, 0x2b6: 0x9f, 0x2b7: 0x9f,\n\t0x2b8: 0x9f, 0x2b9: 0x9f, 0x2ba: 0x9f, 0x2bb: 0x9f, 0x2bc: 0x9f, 0x2bd: 0x9f, 0x2be: 0x9f, 0x2bf: 0xe4,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x9f, 0x2c1: 0x9f, 0x2c2: 0x9f, 0x2c3: 0x9f, 0x2c4: 0x9f, 0x2c5: 0x9f, 0x2c6: 0x9f, 0x2c7: 0x9f,\n\t0x2c8: 0x9f, 0x2c9: 0x9f, 0x2ca: 0x9f, 0x2cb: 0x9f, 0x2cc: 0x9f, 0x2cd: 0x9f, 0x2ce: 0x9f, 0x2cf: 0x9f,\n\t0x2d0: 0x9f, 0x2d1: 0x9f, 0x2d2: 0xe5, 0x2d3: 0xe6, 0x2d4: 0x9f, 0x2d5: 0x9f, 0x2d6: 0x9f, 0x2d7: 0x9f,\n\t0x2d8: 0xe7, 0x2d9: 0x41, 0x2da: 0x42, 0x2db: 0xe8, 0x2dc: 0x43, 0x2dd: 0x44, 0x2de: 0x45, 0x2df: 0xe9,\n\t0x2e0: 0xea, 0x2e1: 0xeb, 0x2e2: 0xec, 0x2e3: 0xed, 0x2e4: 0xee, 0x2e5: 0xef, 0x2e6: 0xf0, 0x2e7: 0xf1,\n\t0x2e8: 0xf2, 0x2e9: 0xf3, 0x2ea: 0xf4, 0x2eb: 0xf5, 0x2ec: 0xf6, 0x2ed: 0xf7, 0x2ee: 0xf8, 0x2ef: 0xf9,\n\t0x2f0: 0x9f, 0x2f1: 0x9f, 0x2f2: 0x9f, 0x2f3: 0x9f, 0x2f4: 0x9f, 0x2f5: 0x9f, 0x2f6: 0x9f, 0x2f7: 0x9f,\n\t0x2f8: 0x9f, 0x2f9: 0x9f, 0x2fa: 0x9f, 0x2fb: 0x9f, 0x2fc: 0x9f, 0x2fd: 0x9f, 0x2fe: 0x9f, 0x2ff: 0x9f,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x9f, 0x301: 0x9f, 0x302: 0x9f, 0x303: 0x9f, 0x304: 0x9f, 0x305: 0x9f, 0x306: 0x9f, 0x307: 0x9f,\n\t0x308: 0x9f, 0x309: 0x9f, 0x30a: 0x9f, 0x30b: 0x9f, 0x30c: 0x9f, 0x30d: 0x9f, 0x30e: 0x9f, 0x30f: 0x9f,\n\t0x310: 0x9f, 0x311: 0x9f, 0x312: 0x9f, 0x313: 0x9f, 0x314: 0x9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f,\n\t0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xfa, 0x31f: 0xfb,\n\t// Block 0xd, offset 0x340\n\t0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba,\n\t0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba,\n\t0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba,\n\t0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba,\n\t0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba,\n\t0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba,\n\t0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba,\n\t0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba,\n\t// Block 0xe, offset 0x380\n\t0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba,\n\t0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba,\n\t0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba,\n\t0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba,\n\t0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfc, 0x3a5: 0xfd, 0x3a6: 0xfe, 0x3a7: 0xff,\n\t0x3a8: 0x46, 0x3a9: 0x100, 0x3aa: 0x101, 0x3ab: 0x47, 0x3ac: 0x48, 0x3ad: 0x49, 0x3ae: 0x4a, 0x3af: 0x4b,\n\t0x3b0: 0x102, 0x3b1: 0x4c, 0x3b2: 0x4d, 0x3b3: 0x4e, 0x3b4: 0x4f, 0x3b5: 0x50, 0x3b6: 0x103, 0x3b7: 0x51,\n\t0x3b8: 0x52, 0x3b9: 0x53, 0x3ba: 0x54, 0x3bb: 0x55, 0x3bc: 0x56, 0x3bd: 0x57, 0x3be: 0x58, 0x3bf: 0x59,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x104, 0x3c1: 0x105, 0x3c2: 0x9f, 0x3c3: 0x106, 0x3c4: 0x107, 0x3c5: 0x9b, 0x3c6: 0x108, 0x3c7: 0x109,\n\t0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x10a, 0x3cb: 0x10b, 0x3cc: 0x10c, 0x3cd: 0x10d, 0x3ce: 0x10e, 0x3cf: 0x10f,\n\t0x3d0: 0x110, 0x3d1: 0x9f, 0x3d2: 0x111, 0x3d3: 0x112, 0x3d4: 0x113, 0x3d5: 0x114, 0x3d6: 0xba, 0x3d7: 0xba,\n\t0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x115, 0x3dd: 0x116, 0x3de: 0xba, 0x3df: 0xba,\n\t0x3e0: 0x117, 0x3e1: 0x118, 0x3e2: 0x119, 0x3e3: 0x11a, 0x3e4: 0x11b, 0x3e5: 0xba, 0x3e6: 0x11c, 0x3e7: 0x11d,\n\t0x3e8: 0x11e, 0x3e9: 0x11f, 0x3ea: 0x120, 0x3eb: 0x5a, 0x3ec: 0x121, 0x3ed: 0x122, 0x3ee: 0x5b, 0x3ef: 0xba,\n\t0x3f0: 0x123, 0x3f1: 0x124, 0x3f2: 0x125, 0x3f3: 0x126, 0x3f4: 0xba, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba,\n\t0x3f8: 0xba, 0x3f9: 0x127, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0xba, 0x3fd: 0xba, 0x3fe: 0xba, 0x3ff: 0xba,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x128, 0x401: 0x129, 0x402: 0x12a, 0x403: 0x12b, 0x404: 0x12c, 0x405: 0x12d, 0x406: 0x12e, 0x407: 0x12f,\n\t0x408: 0x130, 0x409: 0xba, 0x40a: 0x131, 0x40b: 0x132, 0x40c: 0x5c, 0x40d: 0x5d, 0x40e: 0xba, 0x40f: 0xba,\n\t0x410: 0x133, 0x411: 0x134, 0x412: 0x135, 0x413: 0x136, 0x414: 0xba, 0x415: 0xba, 0x416: 0x137, 0x417: 0x138,\n\t0x418: 0x139, 0x419: 0x13a, 0x41a: 0x13b, 0x41b: 0x13c, 0x41c: 0x13d, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba,\n\t0x420: 0xba, 0x421: 0xba, 0x422: 0x13e, 0x423: 0x13f, 0x424: 0xba, 0x425: 0xba, 0x426: 0xba, 0x427: 0xba,\n\t0x428: 0xba, 0x429: 0xba, 0x42a: 0xba, 0x42b: 0x140, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba,\n\t0x430: 0x141, 0x431: 0x142, 0x432: 0x143, 0x433: 0xba, 0x434: 0xba, 0x435: 0xba, 0x436: 0xba, 0x437: 0xba,\n\t0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0xba, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0xba,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f,\n\t0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x144, 0x44f: 0xba,\n\t0x450: 0x9b, 0x451: 0x145, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x146, 0x456: 0xba, 0x457: 0xba,\n\t0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba,\n\t0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba,\n\t0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba,\n\t0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba,\n\t0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f,\n\t0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f,\n\t0x490: 0x147, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba,\n\t0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba,\n\t0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba,\n\t0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba,\n\t0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba,\n\t0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xba, 0x4c1: 0xba, 0x4c2: 0xba, 0x4c3: 0xba, 0x4c4: 0xba, 0x4c5: 0xba, 0x4c6: 0xba, 0x4c7: 0xba,\n\t0x4c8: 0xba, 0x4c9: 0xba, 0x4ca: 0xba, 0x4cb: 0xba, 0x4cc: 0xba, 0x4cd: 0xba, 0x4ce: 0xba, 0x4cf: 0xba,\n\t0x4d0: 0x9f, 0x4d1: 0x9f, 0x4d2: 0x9f, 0x4d3: 0x9f, 0x4d4: 0x9f, 0x4d5: 0x9f, 0x4d6: 0x9f, 0x4d7: 0x9f,\n\t0x4d8: 0x9f, 0x4d9: 0x148, 0x4da: 0xba, 0x4db: 0xba, 0x4dc: 0xba, 0x4dd: 0xba, 0x4de: 0xba, 0x4df: 0xba,\n\t0x4e0: 0xba, 0x4e1: 0xba, 0x4e2: 0xba, 0x4e3: 0xba, 0x4e4: 0xba, 0x4e5: 0xba, 0x4e6: 0xba, 0x4e7: 0xba,\n\t0x4e8: 0xba, 0x4e9: 0xba, 0x4ea: 0xba, 0x4eb: 0xba, 0x4ec: 0xba, 0x4ed: 0xba, 0x4ee: 0xba, 0x4ef: 0xba,\n\t0x4f0: 0xba, 0x4f1: 0xba, 0x4f2: 0xba, 0x4f3: 0xba, 0x4f4: 0xba, 0x4f5: 0xba, 0x4f6: 0xba, 0x4f7: 0xba,\n\t0x4f8: 0xba, 0x4f9: 0xba, 0x4fa: 0xba, 0x4fb: 0xba, 0x4fc: 0xba, 0x4fd: 0xba, 0x4fe: 0xba, 0x4ff: 0xba,\n\t// Block 0x14, offset 0x500\n\t0x500: 0xba, 0x501: 0xba, 0x502: 0xba, 0x503: 0xba, 0x504: 0xba, 0x505: 0xba, 0x506: 0xba, 0x507: 0xba,\n\t0x508: 0xba, 0x509: 0xba, 0x50a: 0xba, 0x50b: 0xba, 0x50c: 0xba, 0x50d: 0xba, 0x50e: 0xba, 0x50f: 0xba,\n\t0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba,\n\t0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba,\n\t0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f,\n\t0x528: 0x140, 0x529: 0x149, 0x52a: 0xba, 0x52b: 0x14a, 0x52c: 0x14b, 0x52d: 0x14c, 0x52e: 0x14d, 0x52f: 0xba,\n\t0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba,\n\t0x538: 0xba, 0x539: 0xba, 0x53a: 0xba, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x14e, 0x53e: 0x14f, 0x53f: 0x150,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f,\n\t0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f,\n\t0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f,\n\t0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x151,\n\t0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f,\n\t0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x152, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba,\n\t0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba,\n\t0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x153, 0x581: 0xba, 0x582: 0xba, 0x583: 0xba, 0x584: 0xba, 0x585: 0xba, 0x586: 0xba, 0x587: 0xba,\n\t0x588: 0xba, 0x589: 0xba, 0x58a: 0xba, 0x58b: 0xba, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba,\n\t0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba,\n\t0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba,\n\t0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba,\n\t0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba,\n\t0x5b0: 0x9f, 0x5b1: 0x154, 0x5b2: 0x155, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba,\n\t0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x9b, 0x5c1: 0x9b, 0x5c2: 0x9b, 0x5c3: 0x156, 0x5c4: 0x157, 0x5c5: 0x158, 0x5c6: 0x159, 0x5c7: 0x15a,\n\t0x5c8: 0x9b, 0x5c9: 0x15b, 0x5ca: 0xba, 0x5cb: 0xba, 0x5cc: 0x9b, 0x5cd: 0x15c, 0x5ce: 0xba, 0x5cf: 0xba,\n\t0x5d0: 0x5e, 0x5d1: 0x5f, 0x5d2: 0x60, 0x5d3: 0x61, 0x5d4: 0x62, 0x5d5: 0x63, 0x5d6: 0x64, 0x5d7: 0x65,\n\t0x5d8: 0x66, 0x5d9: 0x67, 0x5da: 0x68, 0x5db: 0x69, 0x5dc: 0x6a, 0x5dd: 0x6b, 0x5de: 0x6c, 0x5df: 0x6d,\n\t0x5e0: 0x9b, 0x5e1: 0x9b, 0x5e2: 0x9b, 0x5e3: 0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b,\n\t0x5e8: 0x15d, 0x5e9: 0x15e, 0x5ea: 0x15f, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba,\n\t0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba,\n\t0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x160, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0xba, 0x605: 0xba, 0x606: 0xba, 0x607: 0xba,\n\t0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0xba, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba,\n\t0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba,\n\t0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba,\n\t0x620: 0x123, 0x621: 0x123, 0x622: 0x123, 0x623: 0x161, 0x624: 0x6e, 0x625: 0x162, 0x626: 0xba, 0x627: 0xba,\n\t0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba,\n\t0x630: 0xba, 0x631: 0xba, 0x632: 0xba, 0x633: 0xba, 0x634: 0xba, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba,\n\t0x638: 0x6f, 0x639: 0x70, 0x63a: 0x71, 0x63b: 0x163, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x164, 0x641: 0x9b, 0x642: 0x165, 0x643: 0x166, 0x644: 0x72, 0x645: 0x73, 0x646: 0x167, 0x647: 0x168,\n\t0x648: 0x74, 0x649: 0x169, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b,\n\t0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b,\n\t0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x16a, 0x65c: 0x9b, 0x65d: 0x16b, 0x65e: 0x9b, 0x65f: 0x16c,\n\t0x660: 0x16d, 0x661: 0x16e, 0x662: 0x16f, 0x663: 0xba, 0x664: 0x170, 0x665: 0x171, 0x666: 0x172, 0x667: 0x173,\n\t0x668: 0xba, 0x669: 0xba, 0x66a: 0xba, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba,\n\t0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba,\n\t0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f,\n\t0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f,\n\t0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f,\n\t0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x174, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f,\n\t0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f,\n\t0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f,\n\t0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 0x9f, 0x6b6: 0x9f, 0x6b7: 0x9f,\n\t0x6b8: 0x9f, 0x6b9: 0x9f, 0x6ba: 0x9f, 0x6bb: 0x9f, 0x6bc: 0x9f, 0x6bd: 0x9f, 0x6be: 0x9f, 0x6bf: 0x9f,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x9f, 0x6c1: 0x9f, 0x6c2: 0x9f, 0x6c3: 0x9f, 0x6c4: 0x9f, 0x6c5: 0x9f, 0x6c6: 0x9f, 0x6c7: 0x9f,\n\t0x6c8: 0x9f, 0x6c9: 0x9f, 0x6ca: 0x9f, 0x6cb: 0x9f, 0x6cc: 0x9f, 0x6cd: 0x9f, 0x6ce: 0x9f, 0x6cf: 0x9f,\n\t0x6d0: 0x9f, 0x6d1: 0x9f, 0x6d2: 0x9f, 0x6d3: 0x9f, 0x6d4: 0x9f, 0x6d5: 0x9f, 0x6d6: 0x9f, 0x6d7: 0x9f,\n\t0x6d8: 0x9f, 0x6d9: 0x9f, 0x6da: 0x9f, 0x6db: 0x9f, 0x6dc: 0x175, 0x6dd: 0x9f, 0x6de: 0x9f, 0x6df: 0x9f,\n\t0x6e0: 0x176, 0x6e1: 0x9f, 0x6e2: 0x9f, 0x6e3: 0x9f, 0x6e4: 0x9f, 0x6e5: 0x9f, 0x6e6: 0x9f, 0x6e7: 0x9f,\n\t0x6e8: 0x9f, 0x6e9: 0x9f, 0x6ea: 0x9f, 0x6eb: 0x9f, 0x6ec: 0x9f, 0x6ed: 0x9f, 0x6ee: 0x9f, 0x6ef: 0x9f,\n\t0x6f0: 0x9f, 0x6f1: 0x9f, 0x6f2: 0x9f, 0x6f3: 0x9f, 0x6f4: 0x9f, 0x6f5: 0x9f, 0x6f6: 0x9f, 0x6f7: 0x9f,\n\t0x6f8: 0x9f, 0x6f9: 0x9f, 0x6fa: 0x9f, 0x6fb: 0x9f, 0x6fc: 0x9f, 0x6fd: 0x9f, 0x6fe: 0x9f, 0x6ff: 0x9f,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x9f, 0x701: 0x9f, 0x702: 0x9f, 0x703: 0x9f, 0x704: 0x9f, 0x705: 0x9f, 0x706: 0x9f, 0x707: 0x9f,\n\t0x708: 0x9f, 0x709: 0x9f, 0x70a: 0x9f, 0x70b: 0x9f, 0x70c: 0x9f, 0x70d: 0x9f, 0x70e: 0x9f, 0x70f: 0x9f,\n\t0x710: 0x9f, 0x711: 0x9f, 0x712: 0x9f, 0x713: 0x9f, 0x714: 0x9f, 0x715: 0x9f, 0x716: 0x9f, 0x717: 0x9f,\n\t0x718: 0x9f, 0x719: 0x9f, 0x71a: 0x9f, 0x71b: 0x9f, 0x71c: 0x9f, 0x71d: 0x9f, 0x71e: 0x9f, 0x71f: 0x9f,\n\t0x720: 0x9f, 0x721: 0x9f, 0x722: 0x9f, 0x723: 0x9f, 0x724: 0x9f, 0x725: 0x9f, 0x726: 0x9f, 0x727: 0x9f,\n\t0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f,\n\t0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f,\n\t0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x177, 0x73b: 0xba, 0x73c: 0xba, 0x73d: 0xba, 0x73e: 0xba, 0x73f: 0xba,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0xba, 0x741: 0xba, 0x742: 0xba, 0x743: 0xba, 0x744: 0xba, 0x745: 0xba, 0x746: 0xba, 0x747: 0xba,\n\t0x748: 0xba, 0x749: 0xba, 0x74a: 0xba, 0x74b: 0xba, 0x74c: 0xba, 0x74d: 0xba, 0x74e: 0xba, 0x74f: 0xba,\n\t0x750: 0xba, 0x751: 0xba, 0x752: 0xba, 0x753: 0xba, 0x754: 0xba, 0x755: 0xba, 0x756: 0xba, 0x757: 0xba,\n\t0x758: 0xba, 0x759: 0xba, 0x75a: 0xba, 0x75b: 0xba, 0x75c: 0xba, 0x75d: 0xba, 0x75e: 0xba, 0x75f: 0xba,\n\t0x760: 0x75, 0x761: 0x76, 0x762: 0x77, 0x763: 0x178, 0x764: 0x78, 0x765: 0x79, 0x766: 0x179, 0x767: 0x7a,\n\t0x768: 0x7b, 0x769: 0xba, 0x76a: 0xba, 0x76b: 0xba, 0x76c: 0xba, 0x76d: 0xba, 0x76e: 0xba, 0x76f: 0xba,\n\t0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba,\n\t0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba,\n\t// Block 0x1e, offset 0x780\n\t0x790: 0x0d, 0x791: 0x0e, 0x792: 0x0f, 0x793: 0x10, 0x794: 0x11, 0x795: 0x0b, 0x796: 0x12, 0x797: 0x07,\n\t0x798: 0x13, 0x799: 0x0b, 0x79a: 0x0b, 0x79b: 0x14, 0x79c: 0x0b, 0x79d: 0x15, 0x79e: 0x16, 0x79f: 0x17,\n\t0x7a0: 0x07, 0x7a1: 0x07, 0x7a2: 0x07, 0x7a3: 0x07, 0x7a4: 0x07, 0x7a5: 0x07, 0x7a6: 0x07, 0x7a7: 0x07,\n\t0x7a8: 0x07, 0x7a9: 0x07, 0x7aa: 0x18, 0x7ab: 0x19, 0x7ac: 0x1a, 0x7ad: 0x0b, 0x7ae: 0x0b, 0x7af: 0x1b,\n\t0x7b0: 0x0b, 0x7b1: 0x0b, 0x7b2: 0x0b, 0x7b3: 0x0b, 0x7b4: 0x0b, 0x7b5: 0x0b, 0x7b6: 0x0b, 0x7b7: 0x0b,\n\t0x7b8: 0x0b, 0x7b9: 0x0b, 0x7ba: 0x0b, 0x7bb: 0x0b, 0x7bc: 0x0b, 0x7bd: 0x0b, 0x7be: 0x0b, 0x7bf: 0x0b,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x0b, 0x7c1: 0x0b, 0x7c2: 0x0b, 0x7c3: 0x0b, 0x7c4: 0x0b, 0x7c5: 0x0b, 0x7c6: 0x0b, 0x7c7: 0x0b,\n\t0x7c8: 0x0b, 0x7c9: 0x0b, 0x7ca: 0x0b, 0x7cb: 0x0b, 0x7cc: 0x0b, 0x7cd: 0x0b, 0x7ce: 0x0b, 0x7cf: 0x0b,\n\t0x7d0: 0x0b, 0x7d1: 0x0b, 0x7d2: 0x0b, 0x7d3: 0x0b, 0x7d4: 0x0b, 0x7d5: 0x0b, 0x7d6: 0x0b, 0x7d7: 0x0b,\n\t0x7d8: 0x0b, 0x7d9: 0x0b, 0x7da: 0x0b, 0x7db: 0x0b, 0x7dc: 0x0b, 0x7dd: 0x0b, 0x7de: 0x0b, 0x7df: 0x0b,\n\t0x7e0: 0x0b, 0x7e1: 0x0b, 0x7e2: 0x0b, 0x7e3: 0x0b, 0x7e4: 0x0b, 0x7e5: 0x0b, 0x7e6: 0x0b, 0x7e7: 0x0b,\n\t0x7e8: 0x0b, 0x7e9: 0x0b, 0x7ea: 0x0b, 0x7eb: 0x0b, 0x7ec: 0x0b, 0x7ed: 0x0b, 0x7ee: 0x0b, 0x7ef: 0x0b,\n\t0x7f0: 0x0b, 0x7f1: 0x0b, 0x7f2: 0x0b, 0x7f3: 0x0b, 0x7f4: 0x0b, 0x7f5: 0x0b, 0x7f6: 0x0b, 0x7f7: 0x0b,\n\t0x7f8: 0x0b, 0x7f9: 0x0b, 0x7fa: 0x0b, 0x7fb: 0x0b, 0x7fc: 0x0b, 0x7fd: 0x0b, 0x7fe: 0x0b, 0x7ff: 0x0b,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x17a, 0x801: 0x17b, 0x802: 0xba, 0x803: 0xba, 0x804: 0x17c, 0x805: 0x17c, 0x806: 0x17c, 0x807: 0x17d,\n\t0x808: 0xba, 0x809: 0xba, 0x80a: 0xba, 0x80b: 0xba, 0x80c: 0xba, 0x80d: 0xba, 0x80e: 0xba, 0x80f: 0xba,\n\t0x810: 0xba, 0x811: 0xba, 0x812: 0xba, 0x813: 0xba, 0x814: 0xba, 0x815: 0xba, 0x816: 0xba, 0x817: 0xba,\n\t0x818: 0xba, 0x819: 0xba, 0x81a: 0xba, 0x81b: 0xba, 0x81c: 0xba, 0x81d: 0xba, 0x81e: 0xba, 0x81f: 0xba,\n\t0x820: 0xba, 0x821: 0xba, 0x822: 0xba, 0x823: 0xba, 0x824: 0xba, 0x825: 0xba, 0x826: 0xba, 0x827: 0xba,\n\t0x828: 0xba, 0x829: 0xba, 0x82a: 0xba, 0x82b: 0xba, 0x82c: 0xba, 0x82d: 0xba, 0x82e: 0xba, 0x82f: 0xba,\n\t0x830: 0xba, 0x831: 0xba, 0x832: 0xba, 0x833: 0xba, 0x834: 0xba, 0x835: 0xba, 0x836: 0xba, 0x837: 0xba,\n\t0x838: 0xba, 0x839: 0xba, 0x83a: 0xba, 0x83b: 0xba, 0x83c: 0xba, 0x83d: 0xba, 0x83e: 0xba, 0x83f: 0xba,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0b, 0x841: 0x0b, 0x842: 0x0b, 0x843: 0x0b, 0x844: 0x0b, 0x845: 0x0b, 0x846: 0x0b, 0x847: 0x0b,\n\t0x848: 0x0b, 0x849: 0x0b, 0x84a: 0x0b, 0x84b: 0x0b, 0x84c: 0x0b, 0x84d: 0x0b, 0x84e: 0x0b, 0x84f: 0x0b,\n\t0x850: 0x0b, 0x851: 0x0b, 0x852: 0x0b, 0x853: 0x0b, 0x854: 0x0b, 0x855: 0x0b, 0x856: 0x0b, 0x857: 0x0b,\n\t0x858: 0x0b, 0x859: 0x0b, 0x85a: 0x0b, 0x85b: 0x0b, 0x85c: 0x0b, 0x85d: 0x0b, 0x85e: 0x0b, 0x85f: 0x0b,\n\t0x860: 0x1e, 0x861: 0x0b, 0x862: 0x0b, 0x863: 0x0b, 0x864: 0x0b, 0x865: 0x0b, 0x866: 0x0b, 0x867: 0x0b,\n\t0x868: 0x0b, 0x869: 0x0b, 0x86a: 0x0b, 0x86b: 0x0b, 0x86c: 0x0b, 0x86d: 0x0b, 0x86e: 0x0b, 0x86f: 0x0b,\n\t0x870: 0x0b, 0x871: 0x0b, 0x872: 0x0b, 0x873: 0x0b, 0x874: 0x0b, 0x875: 0x0b, 0x876: 0x0b, 0x877: 0x0b,\n\t0x878: 0x0b, 0x879: 0x0b, 0x87a: 0x0b, 0x87b: 0x0b, 0x87c: 0x0b, 0x87d: 0x0b, 0x87e: 0x0b, 0x87f: 0x0b,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b,\n\t0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b,\n}\n\n// idnaSparseOffset: 258 entries, 516 bytes\nvar idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x34, 0x3f, 0x4b, 0x4f, 0x5e, 0x63, 0x6b, 0x77, 0x85, 0x93, 0x98, 0xa1, 0xb1, 0xbf, 0xcc, 0xd8, 0xe9, 0xf3, 0xfa, 0x107, 0x118, 0x11f, 0x12a, 0x139, 0x147, 0x151, 0x153, 0x158, 0x15b, 0x15e, 0x160, 0x16c, 0x177, 0x17f, 0x185, 0x18b, 0x190, 0x195, 0x198, 0x19c, 0x1a2, 0x1a7, 0x1b3, 0x1bd, 0x1c3, 0x1d4, 0x1de, 0x1e1, 0x1e9, 0x1ec, 0x1f9, 0x201, 0x205, 0x20c, 0x214, 0x224, 0x230, 0x232, 0x23c, 0x248, 0x254, 0x260, 0x268, 0x26d, 0x277, 0x288, 0x28c, 0x297, 0x29b, 0x2a4, 0x2ac, 0x2b2, 0x2b7, 0x2ba, 0x2bd, 0x2c1, 0x2c7, 0x2cb, 0x2cf, 0x2d5, 0x2dc, 0x2e2, 0x2ea, 0x2f1, 0x2fc, 0x306, 0x30a, 0x30d, 0x313, 0x317, 0x319, 0x31c, 0x31e, 0x321, 0x32b, 0x32e, 0x33d, 0x341, 0x346, 0x349, 0x34d, 0x352, 0x357, 0x35d, 0x363, 0x372, 0x378, 0x37c, 0x38b, 0x390, 0x398, 0x3a2, 0x3ad, 0x3b5, 0x3c6, 0x3cf, 0x3df, 0x3ec, 0x3f6, 0x3fb, 0x408, 0x40c, 0x411, 0x413, 0x417, 0x419, 0x41d, 0x426, 0x42c, 0x430, 0x440, 0x44a, 0x44f, 0x452, 0x458, 0x45f, 0x464, 0x468, 0x46e, 0x473, 0x47c, 0x481, 0x487, 0x48e, 0x495, 0x49c, 0x4a0, 0x4a5, 0x4a8, 0x4ad, 0x4b9, 0x4bf, 0x4c4, 0x4cb, 0x4d3, 0x4d8, 0x4dc, 0x4ec, 0x4f3, 0x4f7, 0x4fb, 0x502, 0x504, 0x507, 0x50a, 0x50e, 0x512, 0x518, 0x521, 0x52d, 0x534, 0x53d, 0x545, 0x54c, 0x55a, 0x567, 0x574, 0x57d, 0x581, 0x58f, 0x597, 0x5a2, 0x5ab, 0x5b1, 0x5b9, 0x5c2, 0x5cc, 0x5cf, 0x5db, 0x5de, 0x5e3, 0x5e6, 0x5f0, 0x5f9, 0x605, 0x608, 0x60d, 0x610, 0x613, 0x616, 0x61d, 0x624, 0x628, 0x633, 0x636, 0x63c, 0x641, 0x645, 0x648, 0x64b, 0x64e, 0x653, 0x65d, 0x660, 0x664, 0x673, 0x67f, 0x683, 0x688, 0x68d, 0x691, 0x696, 0x69f, 0x6aa, 0x6b0, 0x6b8, 0x6bc, 0x6c0, 0x6c6, 0x6cc, 0x6d1, 0x6d4, 0x6e2, 0x6e9, 0x6ec, 0x6ef, 0x6f3, 0x6f9, 0x6fe, 0x708, 0x70d, 0x710, 0x713, 0x716, 0x719, 0x71d, 0x720, 0x730, 0x741, 0x746, 0x748, 0x74a}\n\n// idnaSparseValues: 1869 entries, 7476 bytes\nvar idnaSparseValues = [1869]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe105, lo: 0x80, hi: 0x96},\n\t{value: 0x0018, lo: 0x97, hi: 0x97},\n\t{value: 0xe105, lo: 0x98, hi: 0x9e},\n\t{value: 0x001f, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbf},\n\t// Block 0x1, offset 0x8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0xe01d, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0335, lo: 0x83, hi: 0x83},\n\t{value: 0x034d, lo: 0x84, hi: 0x84},\n\t{value: 0x0365, lo: 0x85, hi: 0x85},\n\t{value: 0xe00d, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0xe00d, lo: 0x88, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x89},\n\t{value: 0xe00d, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe00d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0x8d},\n\t{value: 0xe00d, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0xbf},\n\t// Block 0x2, offset 0x19\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x0249, lo: 0xb0, hi: 0xb0},\n\t{value: 0x037d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0259, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0269, lo: 0xb3, hi: 0xb3},\n\t{value: 0x034d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0395, lo: 0xb5, hi: 0xb5},\n\t{value: 0xe1bd, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0279, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0289, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbf},\n\t// Block 0x3, offset 0x25\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x3308, lo: 0x80, hi: 0xbf},\n\t// Block 0x4, offset 0x27\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x03f5, lo: 0x80, hi: 0x8f},\n\t{value: 0xe105, lo: 0x90, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5, offset 0x2c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x0545, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x0008, lo: 0x99, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x6, offset 0x34\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0401, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x88},\n\t{value: 0x0018, lo: 0x89, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x3308, lo: 0x91, hi: 0xbd},\n\t{value: 0x0818, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7, offset 0x3f\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0818, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x82},\n\t{value: 0x0818, lo: 0x83, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x85},\n\t{value: 0x0818, lo: 0x86, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0808, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x8, offset 0x4b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0a08, lo: 0x80, hi: 0x87},\n\t{value: 0x0c08, lo: 0x88, hi: 0x99},\n\t{value: 0x0a08, lo: 0x9a, hi: 0xbf},\n\t// Block 0x9, offset 0x4f\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3308, lo: 0x80, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8c},\n\t{value: 0x0c08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0a08, lo: 0x8e, hi: 0x98},\n\t{value: 0x0c08, lo: 0x99, hi: 0x9b},\n\t{value: 0x0a08, lo: 0x9c, hi: 0xaa},\n\t{value: 0x0c08, lo: 0xab, hi: 0xac},\n\t{value: 0x0a08, lo: 0xad, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0a08, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0c08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0a08, lo: 0xb5, hi: 0xb7},\n\t{value: 0x0c08, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbf},\n\t// Block 0xa, offset 0x5e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xb0},\n\t{value: 0x0808, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xb, offset 0x63\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0xc, offset 0x6b\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x99},\n\t{value: 0x0808, lo: 0x9a, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa3},\n\t{value: 0x0808, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa7},\n\t{value: 0x0808, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0818, lo: 0xb0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd, offset 0x77\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0c08, lo: 0x80, hi: 0x80},\n\t{value: 0x0a08, lo: 0x81, hi: 0x85},\n\t{value: 0x0c08, lo: 0x86, hi: 0x87},\n\t{value: 0x0a08, lo: 0x88, hi: 0x88},\n\t{value: 0x0c08, lo: 0x89, hi: 0x89},\n\t{value: 0x0a08, lo: 0x8a, hi: 0x93},\n\t{value: 0x0c08, lo: 0x94, hi: 0x94},\n\t{value: 0x0a08, lo: 0x95, hi: 0x95},\n\t{value: 0x0808, lo: 0x96, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xe, offset 0x85\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0a08, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0c08, lo: 0xaa, hi: 0xac},\n\t{value: 0x0808, lo: 0xad, hi: 0xad},\n\t{value: 0x0c08, lo: 0xae, hi: 0xae},\n\t{value: 0x0a08, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0c08, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0a08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0a08, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0c08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0a08, lo: 0xba, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0xf, offset 0x93\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa1},\n\t{value: 0x0840, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xbf},\n\t// Block 0x10, offset 0x98\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x11, offset 0xa1\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x85},\n\t{value: 0x3008, lo: 0x86, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x3008, lo: 0x8a, hi: 0x8c},\n\t{value: 0x3b08, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x12, offset 0xb1\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0008, lo: 0xaa, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x13, offset 0xbf\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x14, offset 0xcc\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0040, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x15, offset 0xd8\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x89},\n\t{value: 0x3b08, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x3008, lo: 0x98, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x16, offset 0xe9\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb2},\n\t{value: 0x08f1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb9},\n\t{value: 0x3b08, lo: 0xba, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x0018, lo: 0xbf, hi: 0xbf},\n\t// Block 0x17, offset 0xf3\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x8e},\n\t{value: 0x0018, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0xbf},\n\t// Block 0x18, offset 0xfa\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0961, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0999, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0008, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x19, offset 0x107\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8a},\n\t{value: 0x0008, lo: 0x8b, hi: 0x8b},\n\t{value: 0xe03d, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x1a, offset 0x118\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0xbf},\n\t// Block 0x1b, offset 0x11f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1c, offset 0x12a\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x3008, lo: 0x96, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x3308, lo: 0x9e, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3008, lo: 0xa2, hi: 0xa4},\n\t{value: 0x0008, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xbf},\n\t// Block 0x1d, offset 0x139\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x8c},\n\t{value: 0x3308, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x8e},\n\t{value: 0x3008, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x3008, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0x1e, offset 0x147\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x86},\n\t{value: 0x055d, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8c},\n\t{value: 0x055d, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe105, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x1f, offset 0x151\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0018, lo: 0x80, hi: 0xbf},\n\t// Block 0x20, offset 0x153\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa0},\n\t{value: 0x2018, lo: 0xa1, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x21, offset 0x158\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa7},\n\t{value: 0x2018, lo: 0xa8, hi: 0xbf},\n\t// Block 0x22, offset 0x15b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x2018, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0xbf},\n\t// Block 0x23, offset 0x15e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0008, lo: 0x80, hi: 0xbf},\n\t// Block 0x24, offset 0x160\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x99},\n\t{value: 0x0008, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x25, offset 0x16c\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x26, offset 0x177\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x27, offset 0x17f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0x0008, lo: 0x92, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbf},\n\t// Block 0x28, offset 0x185\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x29, offset 0x18b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2a, offset 0x190\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x2b, offset 0x195\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x2c, offset 0x198\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xbf},\n\t// Block 0x2d, offset 0x19c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x2e, offset 0x1a2\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0x2f, offset 0x1a7\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0008, lo: 0x8e, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x3b08, lo: 0x94, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3b08, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x30, offset 0x1b3\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x31, offset 0x1bd\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xb3},\n\t{value: 0x3340, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x32, offset 0x1c3\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x3008, lo: 0x80, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x3008, lo: 0x87, hi: 0x88},\n\t{value: 0x3308, lo: 0x89, hi: 0x91},\n\t{value: 0x3b08, lo: 0x92, hi: 0x92},\n\t{value: 0x3308, lo: 0x93, hi: 0x93},\n\t{value: 0x0018, lo: 0x94, hi: 0x96},\n\t{value: 0x0008, lo: 0x97, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x33, offset 0x1d4\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0018, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x86},\n\t{value: 0x0218, lo: 0x87, hi: 0x87},\n\t{value: 0x0018, lo: 0x88, hi: 0x8a},\n\t{value: 0x33c0, lo: 0x8b, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0208, lo: 0xa0, hi: 0xbf},\n\t// Block 0x34, offset 0x1de\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0208, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x35, offset 0x1e1\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0208, lo: 0x87, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0208, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x36, offset 0x1e9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0x37, offset 0x1ec\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3308, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x38, offset 0x1f9\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0008, lo: 0x86, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0x39, offset 0x201\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x3a, offset 0x205\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0028, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0040, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0xbf},\n\t// Block 0x3b, offset 0x20c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x3308, lo: 0x97, hi: 0x98},\n\t{value: 0x3008, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x3c, offset 0x214\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x94},\n\t{value: 0x3008, lo: 0x95, hi: 0x95},\n\t{value: 0x3308, lo: 0x96, hi: 0x96},\n\t{value: 0x3008, lo: 0x97, hi: 0x97},\n\t{value: 0x3308, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3b08, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xac},\n\t{value: 0x3008, lo: 0xad, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3d, offset 0x224\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xbd},\n\t{value: 0x3318, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3e, offset 0x230\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0040, lo: 0x80, hi: 0xbf},\n\t// Block 0x3f, offset 0x232\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x83},\n\t{value: 0x3008, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x40, offset 0x23c\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x3808, lo: 0x84, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x41, offset 0x248\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3808, lo: 0xaa, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xbf},\n\t// Block 0x42, offset 0x254\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa9},\n\t{value: 0x3008, lo: 0xaa, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3808, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbf},\n\t// Block 0x43, offset 0x260\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x3008, lo: 0xa4, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbf},\n\t// Block 0x44, offset 0x268\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x45, offset 0x26d\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0e29, lo: 0x80, hi: 0x80},\n\t{value: 0x0e41, lo: 0x81, hi: 0x81},\n\t{value: 0x0e59, lo: 0x82, hi: 0x82},\n\t{value: 0x0e71, lo: 0x83, hi: 0x83},\n\t{value: 0x0e89, lo: 0x84, hi: 0x85},\n\t{value: 0x0ea1, lo: 0x86, hi: 0x86},\n\t{value: 0x0eb9, lo: 0x87, hi: 0x87},\n\t{value: 0x057d, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0x46, offset 0x277\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x92},\n\t{value: 0x0018, lo: 0x93, hi: 0x93},\n\t{value: 0x3308, lo: 0x94, hi: 0xa0},\n\t{value: 0x3008, lo: 0xa1, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0008, lo: 0xa9, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x0008, lo: 0xae, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x47, offset 0x288\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0x48, offset 0x28c\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x87},\n\t{value: 0xe045, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0xe045, lo: 0x98, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0xe045, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb7},\n\t{value: 0xe045, lo: 0xb8, hi: 0xbf},\n\t// Block 0x49, offset 0x297\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x3318, lo: 0x90, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4a, offset 0x29b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x88},\n\t{value: 0x24c1, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x4b, offset 0x2a4\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x24f1, lo: 0xac, hi: 0xac},\n\t{value: 0x2529, lo: 0xad, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xae},\n\t{value: 0x2579, lo: 0xaf, hi: 0xaf},\n\t{value: 0x25b1, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0x4c, offset 0x2ac\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x9f},\n\t{value: 0x0080, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xad},\n\t{value: 0x0080, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x4d, offset 0x2b2\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xa8},\n\t{value: 0x09c5, lo: 0xa9, hi: 0xa9},\n\t{value: 0x09e5, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xbf},\n\t// Block 0x4e, offset 0x2b7\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x4f, offset 0x2ba\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xbf},\n\t// Block 0x50, offset 0x2bd\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x28c1, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0xbf},\n\t// Block 0x51, offset 0x2c1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0e66, lo: 0xb4, hi: 0xb4},\n\t{value: 0x292a, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0e86, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x52, offset 0x2c7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x9b},\n\t{value: 0x2941, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0xbf},\n\t// Block 0x53, offset 0x2cb\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0x54, offset 0x2cf\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0018, lo: 0x98, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbc},\n\t{value: 0x0018, lo: 0xbd, hi: 0xbf},\n\t// Block 0x55, offset 0x2d5\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0xab},\n\t{value: 0x0018, lo: 0xac, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x56, offset 0x2dc\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xe185, lo: 0x80, hi: 0x8f},\n\t{value: 0x03f5, lo: 0x90, hi: 0x9f},\n\t{value: 0x0ea5, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x57, offset 0x2e2\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xac},\n\t{value: 0x0008, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x58, offset 0x2ea\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xae},\n\t{value: 0xe075, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0x59, offset 0x2f1\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0008, lo: 0xb8, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x5a, offset 0x2fc\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5b, offset 0x306\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x5c, offset 0x30a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0xbf},\n\t// Block 0x5d, offset 0x30d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9e},\n\t{value: 0x0edd, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0x5e, offset 0x313\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xb2},\n\t{value: 0x0efd, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0x5f, offset 0x317\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x0f1d, lo: 0x80, hi: 0xbf},\n\t// Block 0x60, offset 0x319\n\t{value: 0x0020, lo: 0x02},\n\t{value: 0x171d, lo: 0x80, hi: 0x8f},\n\t{value: 0x18fd, lo: 0x90, hi: 0xbf},\n\t// Block 0x61, offset 0x31c\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x1efd, lo: 0x80, hi: 0xbf},\n\t// Block 0x62, offset 0x31e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0xbf},\n\t// Block 0x63, offset 0x321\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x98},\n\t{value: 0x3308, lo: 0x99, hi: 0x9a},\n\t{value: 0x29e2, lo: 0x9b, hi: 0x9b},\n\t{value: 0x2a0a, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0008, lo: 0x9d, hi: 0x9e},\n\t{value: 0x2a31, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0008, lo: 0xa1, hi: 0xbf},\n\t// Block 0x64, offset 0x32b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xbe},\n\t{value: 0x2a69, lo: 0xbf, hi: 0xbf},\n\t// Block 0x65, offset 0x32e\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0040, lo: 0x80, hi: 0x84},\n\t{value: 0x0008, lo: 0x85, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xb0},\n\t{value: 0x2a1d, lo: 0xb1, hi: 0xb1},\n\t{value: 0x2a3d, lo: 0xb2, hi: 0xb2},\n\t{value: 0x2a5d, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2a7d, lo: 0xb4, hi: 0xb4},\n\t{value: 0x2a5d, lo: 0xb5, hi: 0xb5},\n\t{value: 0x2a9d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x2abd, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2add, lo: 0xb8, hi: 0xb9},\n\t{value: 0x2afd, lo: 0xba, hi: 0xbb},\n\t{value: 0x2b1d, lo: 0xbc, hi: 0xbd},\n\t{value: 0x2afd, lo: 0xbe, hi: 0xbf},\n\t// Block 0x66, offset 0x33d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x67, offset 0x341\n\t{value: 0x0030, lo: 0x04},\n\t{value: 0x2aa2, lo: 0x80, hi: 0x9d},\n\t{value: 0x305a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x30a2, lo: 0xa0, hi: 0xbf},\n\t// Block 0x68, offset 0x346\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x69, offset 0x349\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0040, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0x6a, offset 0x34d\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0x6b, offset 0x352\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xbf},\n\t// Block 0x6c, offset 0x357\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0018, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x6d, offset 0x35d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0xb6},\n\t{value: 0x0008, lo: 0xb7, hi: 0xb7},\n\t{value: 0x2009, lo: 0xb8, hi: 0xb8},\n\t{value: 0x6e89, lo: 0xb9, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xbf},\n\t// Block 0x6e, offset 0x363\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x3308, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x3308, lo: 0x8b, hi: 0x8b},\n\t{value: 0x0008, lo: 0x8c, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3008, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0018, lo: 0xa8, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x6f, offset 0x372\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0208, lo: 0x80, hi: 0xb1},\n\t{value: 0x0108, lo: 0xb2, hi: 0xb2},\n\t{value: 0x0008, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0x70, offset 0x378\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xbf},\n\t// Block 0x71, offset 0x37c\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x3008, lo: 0x80, hi: 0x83},\n\t{value: 0x3b08, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8d},\n\t{value: 0x0018, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xba},\n\t{value: 0x0008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0018, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x72, offset 0x38b\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x73, offset 0x390\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x3308, lo: 0x87, hi: 0x91},\n\t{value: 0x3008, lo: 0x92, hi: 0x92},\n\t{value: 0x3808, lo: 0x93, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0x74, offset 0x398\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x3008, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb9},\n\t{value: 0x3008, lo: 0xba, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbf},\n\t// Block 0x75, offset 0x3a2\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0x76, offset 0x3ad\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xa8},\n\t{value: 0x3308, lo: 0xa9, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb0},\n\t{value: 0x3308, lo: 0xb1, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x77, offset 0x3b5\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x0008, lo: 0x80, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8c},\n\t{value: 0x3008, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xb9},\n\t{value: 0x0008, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbc},\n\t{value: 0x3008, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0008, lo: 0xbe, hi: 0xbf},\n\t// Block 0x78, offset 0x3c6\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb4},\n\t{value: 0x0008, lo: 0xb5, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0008, lo: 0xb9, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbf},\n\t// Block 0x79, offset 0x3cf\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x9a},\n\t{value: 0x0008, lo: 0x9b, hi: 0x9d},\n\t{value: 0x0018, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xaa},\n\t{value: 0x3008, lo: 0xab, hi: 0xab},\n\t{value: 0x3308, lo: 0xac, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3b08, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x7a, offset 0x3df\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x88},\n\t{value: 0x0008, lo: 0x89, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x90},\n\t{value: 0x0008, lo: 0x91, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7b, offset 0x3ec\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4465, lo: 0x9c, hi: 0x9c},\n\t{value: 0x447d, lo: 0x9d, hi: 0x9d},\n\t{value: 0x2971, lo: 0x9e, hi: 0x9e},\n\t{value: 0xe06d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa5},\n\t{value: 0x0040, lo: 0xa6, hi: 0xaf},\n\t{value: 0x4495, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7c, offset 0x3f6\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x44b5, lo: 0x80, hi: 0x8f},\n\t{value: 0x44d5, lo: 0x90, hi: 0x9f},\n\t{value: 0x44f5, lo: 0xa0, hi: 0xaf},\n\t{value: 0x44d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7d, offset 0x3fb\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0xa2},\n\t{value: 0x3008, lo: 0xa3, hi: 0xa4},\n\t{value: 0x3308, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa7},\n\t{value: 0x3308, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xaa},\n\t{value: 0x0018, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3b08, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0x7e, offset 0x408\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0x7f, offset 0x40c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x80, offset 0x411\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x4515, lo: 0x80, hi: 0xbf},\n\t// Block 0x81, offset 0x413\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x4d15, lo: 0x80, hi: 0x94},\n\t{value: 0x4ad5, lo: 0x95, hi: 0x95},\n\t{value: 0x4fb5, lo: 0x96, hi: 0xbf},\n\t// Block 0x82, offset 0x417\n\t{value: 0x0020, lo: 0x01},\n\t{value: 0x54f5, lo: 0x80, hi: 0xbf},\n\t// Block 0x83, offset 0x419\n\t{value: 0x0020, lo: 0x03},\n\t{value: 0x5cf5, lo: 0x80, hi: 0x84},\n\t{value: 0x5655, lo: 0x85, hi: 0x85},\n\t{value: 0x5d95, lo: 0x86, hi: 0xbf},\n\t// Block 0x84, offset 0x41d\n\t{value: 0x0020, lo: 0x08},\n\t{value: 0x6b55, lo: 0x80, hi: 0x8f},\n\t{value: 0x6d15, lo: 0x90, hi: 0x90},\n\t{value: 0x6d55, lo: 0x91, hi: 0xab},\n\t{value: 0x6ea1, lo: 0xac, hi: 0xac},\n\t{value: 0x70b5, lo: 0xad, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x70d5, lo: 0xb0, hi: 0xbf},\n\t// Block 0x85, offset 0x426\n\t{value: 0x0020, lo: 0x05},\n\t{value: 0x72d5, lo: 0x80, hi: 0xad},\n\t{value: 0x6535, lo: 0xae, hi: 0xae},\n\t{value: 0x7895, lo: 0xaf, hi: 0xb5},\n\t{value: 0x6f55, lo: 0xb6, hi: 0xb6},\n\t{value: 0x7975, lo: 0xb7, hi: 0xbf},\n\t// Block 0x86, offset 0x42c\n\t{value: 0x0028, lo: 0x03},\n\t{value: 0x7c21, lo: 0x80, hi: 0x82},\n\t{value: 0x7be1, lo: 0x83, hi: 0x83},\n\t{value: 0x7c99, lo: 0x84, hi: 0xbf},\n\t// Block 0x87, offset 0x430\n\t{value: 0x0038, lo: 0x0f},\n\t{value: 0x9db1, lo: 0x80, hi: 0x83},\n\t{value: 0x9e59, lo: 0x84, hi: 0x85},\n\t{value: 0x9e91, lo: 0x86, hi: 0x87},\n\t{value: 0x9ec9, lo: 0x88, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x91},\n\t{value: 0xa089, lo: 0x92, hi: 0x97},\n\t{value: 0xa1a1, lo: 0x98, hi: 0x9c},\n\t{value: 0xa281, lo: 0x9d, hi: 0xb3},\n\t{value: 0x9d41, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9db1, lo: 0xb5, hi: 0xb5},\n\t{value: 0xa789, lo: 0xb6, hi: 0xbb},\n\t{value: 0xa869, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa7f9, lo: 0xbd, hi: 0xbd},\n\t{value: 0xa8d9, lo: 0xbe, hi: 0xbf},\n\t// Block 0x88, offset 0x440\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0008, lo: 0x8d, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0008, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0x89, offset 0x44a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0x8a, offset 0x44f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x8b, offset 0x452\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x82},\n\t{value: 0x0040, lo: 0x83, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0x8c, offset 0x458\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x8e},\n\t{value: 0x0040, lo: 0x8f, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0x8d, offset 0x45f\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0040, lo: 0xbe, hi: 0xbf},\n\t// Block 0x8e, offset 0x464\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9c},\n\t{value: 0x0040, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x8f, offset 0x468\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x90},\n\t{value: 0x0040, lo: 0x91, hi: 0x9f},\n\t{value: 0x3308, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x90, offset 0x46e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x91, offset 0x473\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x81},\n\t{value: 0x0008, lo: 0x82, hi: 0x89},\n\t{value: 0x0018, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbf},\n\t// Block 0x92, offset 0x47c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0x93, offset 0x481\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0xbf},\n\t// Block 0x94, offset 0x487\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x97},\n\t{value: 0x8ad5, lo: 0x98, hi: 0x9f},\n\t{value: 0x8aed, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0008, lo: 0xa8, hi: 0xbf},\n\t// Block 0x95, offset 0x48e\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x8aed, lo: 0xb0, hi: 0xb7},\n\t{value: 0x8ad5, lo: 0xb8, hi: 0xbf},\n\t// Block 0x96, offset 0x495\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe145, lo: 0x80, hi: 0x87},\n\t{value: 0xe1c5, lo: 0x88, hi: 0x8f},\n\t{value: 0xe145, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0xbb},\n\t{value: 0x0040, lo: 0xbc, hi: 0xbf},\n\t// Block 0x97, offset 0x49c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0x98, offset 0x4a0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xae},\n\t{value: 0x0018, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x99, offset 0x4a5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9a, offset 0x4a8\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xbf},\n\t// Block 0x9b, offset 0x4ad\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0808, lo: 0x80, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x87},\n\t{value: 0x0808, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0808, lo: 0x8a, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0808, lo: 0xb7, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbb},\n\t{value: 0x0808, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbe},\n\t{value: 0x0808, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9c, offset 0x4b9\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x96},\n\t{value: 0x0818, lo: 0x97, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb6},\n\t{value: 0x0818, lo: 0xb7, hi: 0xbf},\n\t// Block 0x9d, offset 0x4bf\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xa6},\n\t{value: 0x0818, lo: 0xa7, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0x9e, offset 0x4c4\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0808, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xba},\n\t{value: 0x0818, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9f, offset 0x4cb\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0818, lo: 0x96, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbe},\n\t{value: 0x0818, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa0, offset 0x4d3\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0808, lo: 0x80, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbb},\n\t{value: 0x0818, lo: 0xbc, hi: 0xbd},\n\t{value: 0x0808, lo: 0xbe, hi: 0xbf},\n\t// Block 0xa1, offset 0x4d8\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0818, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x0818, lo: 0x92, hi: 0xbf},\n\t// Block 0xa2, offset 0x4dc\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0x0808, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x84},\n\t{value: 0x3308, lo: 0x85, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x8b},\n\t{value: 0x3308, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x94},\n\t{value: 0x0808, lo: 0x95, hi: 0x97},\n\t{value: 0x0040, lo: 0x98, hi: 0x98},\n\t{value: 0x0808, lo: 0x99, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xba},\n\t{value: 0x0040, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa3, offset 0x4ec\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0818, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0818, lo: 0x90, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xbc},\n\t{value: 0x0818, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa4, offset 0x4f3\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0x9c},\n\t{value: 0x0818, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xa5, offset 0x4f7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb8},\n\t{value: 0x0018, lo: 0xb9, hi: 0xbf},\n\t// Block 0xa6, offset 0x4fb\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0808, lo: 0x80, hi: 0x95},\n\t{value: 0x0040, lo: 0x96, hi: 0x97},\n\t{value: 0x0818, lo: 0x98, hi: 0x9f},\n\t{value: 0x0808, lo: 0xa0, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb7},\n\t{value: 0x0818, lo: 0xb8, hi: 0xbf},\n\t// Block 0xa7, offset 0x502\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0808, lo: 0x80, hi: 0xbf},\n\t// Block 0xa8, offset 0x504\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0808, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0xbf},\n\t// Block 0xa9, offset 0x507\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x03dd, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xaa, offset 0x50a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0808, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xb9},\n\t{value: 0x0818, lo: 0xba, hi: 0xbf},\n\t// Block 0xab, offset 0x50e\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0818, lo: 0xa0, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xac, offset 0x512\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3008, lo: 0x80, hi: 0x80},\n\t{value: 0x3308, lo: 0x81, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xad, offset 0x518\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x85},\n\t{value: 0x3b08, lo: 0x86, hi: 0x86},\n\t{value: 0x0018, lo: 0x87, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x91},\n\t{value: 0x0018, lo: 0x92, hi: 0xa5},\n\t{value: 0x0008, lo: 0xa6, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xae, offset 0x521\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb6},\n\t{value: 0x3008, lo: 0xb7, hi: 0xb8},\n\t{value: 0x3b08, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x0018, lo: 0xbb, hi: 0xbc},\n\t{value: 0x0340, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0018, lo: 0xbe, hi: 0xbf},\n\t// Block 0xaf, offset 0x52d\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb0, offset 0x534\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xb2},\n\t{value: 0x3b08, lo: 0xb3, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xbf},\n\t// Block 0xb1, offset 0x53d\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0018, lo: 0xb4, hi: 0xb5},\n\t{value: 0x0008, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xb2, offset 0x545\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x3308, lo: 0x80, hi: 0x81},\n\t{value: 0x3008, lo: 0x82, hi: 0x82},\n\t{value: 0x0008, lo: 0x83, hi: 0xb2},\n\t{value: 0x3008, lo: 0xb3, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xbe},\n\t{value: 0x3008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb3, offset 0x54c\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3808, lo: 0x80, hi: 0x80},\n\t{value: 0x0008, lo: 0x81, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x89},\n\t{value: 0x3308, lo: 0x8a, hi: 0x8c},\n\t{value: 0x0018, lo: 0x8d, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0008, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0018, lo: 0xa1, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xb4, offset 0x55a\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xae},\n\t{value: 0x3308, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3008, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3308, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3808, lo: 0xb5, hi: 0xb5},\n\t{value: 0x3308, lo: 0xb6, hi: 0xb7},\n\t{value: 0x0018, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3308, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb5, offset 0x567\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x0008, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0x8d},\n\t{value: 0x0040, lo: 0x8e, hi: 0x8e},\n\t{value: 0x0008, lo: 0x8f, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9e},\n\t{value: 0x0008, lo: 0x9f, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbf},\n\t// Block 0xb6, offset 0x574\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x3308, lo: 0x9f, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa9},\n\t{value: 0x3b08, lo: 0xaa, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0040, lo: 0xba, hi: 0xbf},\n\t// Block 0xb7, offset 0x57d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x3008, lo: 0xb5, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbf},\n\t// Block 0xb8, offset 0x581\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x3008, lo: 0x80, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x84},\n\t{value: 0x3008, lo: 0x85, hi: 0x85},\n\t{value: 0x3308, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x8a},\n\t{value: 0x0018, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0x9b},\n\t{value: 0x0040, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0018, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xb9, offset 0x58f\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xb8},\n\t{value: 0x3008, lo: 0xb9, hi: 0xb9},\n\t{value: 0x3308, lo: 0xba, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbe},\n\t{value: 0x3308, lo: 0xbf, hi: 0xbf},\n\t// Block 0xba, offset 0x597\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x3008, lo: 0x81, hi: 0x81},\n\t{value: 0x3b08, lo: 0x82, hi: 0x82},\n\t{value: 0x3308, lo: 0x83, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x85},\n\t{value: 0x0018, lo: 0x86, hi: 0x86},\n\t{value: 0x0008, lo: 0x87, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xbb, offset 0x5a2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xb7},\n\t{value: 0x3008, lo: 0xb8, hi: 0xbb},\n\t{value: 0x3308, lo: 0xbc, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbc, offset 0x5ab\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x97},\n\t{value: 0x0008, lo: 0x98, hi: 0x9b},\n\t{value: 0x3308, lo: 0x9c, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0xbf},\n\t// Block 0xbd, offset 0x5b1\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3008, lo: 0xb0, hi: 0xb2},\n\t{value: 0x3308, lo: 0xb3, hi: 0xba},\n\t{value: 0x3008, lo: 0xbb, hi: 0xbc},\n\t{value: 0x3308, lo: 0xbd, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xbe, offset 0x5b9\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3308, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x83},\n\t{value: 0x0008, lo: 0x84, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xbf, offset 0x5c2\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x3308, lo: 0xab, hi: 0xab},\n\t{value: 0x3008, lo: 0xac, hi: 0xac},\n\t{value: 0x3308, lo: 0xad, hi: 0xad},\n\t{value: 0x3008, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb5},\n\t{value: 0x3808, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3308, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbf},\n\t// Block 0xc0, offset 0x5cc\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x89},\n\t{value: 0x0040, lo: 0x8a, hi: 0xbf},\n\t// Block 0xc1, offset 0x5cf\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9f},\n\t{value: 0x3008, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3308, lo: 0xa2, hi: 0xa5},\n\t{value: 0x3008, lo: 0xa6, hi: 0xa6},\n\t{value: 0x3308, lo: 0xa7, hi: 0xaa},\n\t{value: 0x3b08, lo: 0xab, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xb9},\n\t{value: 0x0018, lo: 0xba, hi: 0xbf},\n\t// Block 0xc2, offset 0x5db\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x049d, lo: 0xa0, hi: 0xbf},\n\t// Block 0xc3, offset 0x5de\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0008, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc4, offset 0x5e3\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb8},\n\t{value: 0x0040, lo: 0xb9, hi: 0xbf},\n\t// Block 0xc5, offset 0x5e6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x89},\n\t{value: 0x0008, lo: 0x8a, hi: 0xae},\n\t{value: 0x3008, lo: 0xaf, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xb7},\n\t{value: 0x3308, lo: 0xb8, hi: 0xbd},\n\t{value: 0x3008, lo: 0xbe, hi: 0xbe},\n\t{value: 0x3b08, lo: 0xbf, hi: 0xbf},\n\t// Block 0xc6, offset 0x5f0\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0008, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0018, lo: 0x9a, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0008, lo: 0xb2, hi: 0xbf},\n\t// Block 0xc7, offset 0x5f9\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x91},\n\t{value: 0x3308, lo: 0x92, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3008, lo: 0xa9, hi: 0xa9},\n\t{value: 0x3308, lo: 0xaa, hi: 0xb0},\n\t{value: 0x3008, lo: 0xb1, hi: 0xb1},\n\t{value: 0x3308, lo: 0xb2, hi: 0xb3},\n\t{value: 0x3008, lo: 0xb4, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xc8, offset 0x605\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0xbf},\n\t// Block 0xc9, offset 0x608\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xca, offset 0x60d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0040, lo: 0x84, hi: 0xbf},\n\t// Block 0xcb, offset 0x610\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xbf},\n\t// Block 0xcc, offset 0x613\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0xbf},\n\t// Block 0xcd, offset 0x616\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0008, lo: 0x80, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa9},\n\t{value: 0x0040, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xce, offset 0x61d\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb4},\n\t{value: 0x0018, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xcf, offset 0x624\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0xaf},\n\t{value: 0x3308, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xbf},\n\t// Block 0xd0, offset 0x628\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x0008, lo: 0x80, hi: 0x83},\n\t{value: 0x0018, lo: 0x84, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9a},\n\t{value: 0x0018, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0008, lo: 0xa3, hi: 0xb7},\n\t{value: 0x0040, lo: 0xb8, hi: 0xbc},\n\t{value: 0x0008, lo: 0xbd, hi: 0xbf},\n\t// Block 0xd1, offset 0x633\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0xbf},\n\t// Block 0xd2, offset 0x636\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0008, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x90},\n\t{value: 0x3008, lo: 0x91, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xd3, offset 0x63c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x8e},\n\t{value: 0x3308, lo: 0x8f, hi: 0x92},\n\t{value: 0x0008, lo: 0x93, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xd4, offset 0x641\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0040, lo: 0xa1, hi: 0xbf},\n\t// Block 0xd5, offset 0x645\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xd6, offset 0x648\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb2},\n\t{value: 0x0040, lo: 0xb3, hi: 0xbf},\n\t// Block 0xd7, offset 0x64b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0xbf},\n\t// Block 0xd8, offset 0x64e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0008, lo: 0x80, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xaf},\n\t{value: 0x0008, lo: 0xb0, hi: 0xbc},\n\t{value: 0x0040, lo: 0xbd, hi: 0xbf},\n\t// Block 0xd9, offset 0x653\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0008, lo: 0x80, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0x0008, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9b},\n\t{value: 0x0018, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3308, lo: 0x9d, hi: 0x9e},\n\t{value: 0x0018, lo: 0x9f, hi: 0x9f},\n\t{value: 0x03c0, lo: 0xa0, hi: 0xa3},\n\t{value: 0x0040, lo: 0xa4, hi: 0xbf},\n\t// Block 0xda, offset 0x65d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xdb, offset 0x660\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xa6},\n\t{value: 0x0040, lo: 0xa7, hi: 0xa8},\n\t{value: 0x0018, lo: 0xa9, hi: 0xbf},\n\t// Block 0xdc, offset 0x664\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x0018, lo: 0x80, hi: 0x9d},\n\t{value: 0xb5b9, lo: 0x9e, hi: 0x9e},\n\t{value: 0xb601, lo: 0x9f, hi: 0x9f},\n\t{value: 0xb649, lo: 0xa0, hi: 0xa0},\n\t{value: 0xb6b1, lo: 0xa1, hi: 0xa1},\n\t{value: 0xb719, lo: 0xa2, hi: 0xa2},\n\t{value: 0xb781, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb7e9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x3018, lo: 0xa5, hi: 0xa6},\n\t{value: 0x3318, lo: 0xa7, hi: 0xa9},\n\t{value: 0x0018, lo: 0xaa, hi: 0xac},\n\t{value: 0x3018, lo: 0xad, hi: 0xb2},\n\t{value: 0x0340, lo: 0xb3, hi: 0xba},\n\t{value: 0x3318, lo: 0xbb, hi: 0xbf},\n\t// Block 0xdd, offset 0x673\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x3318, lo: 0x80, hi: 0x82},\n\t{value: 0x0018, lo: 0x83, hi: 0x84},\n\t{value: 0x3318, lo: 0x85, hi: 0x8b},\n\t{value: 0x0018, lo: 0x8c, hi: 0xa9},\n\t{value: 0x3318, lo: 0xaa, hi: 0xad},\n\t{value: 0x0018, lo: 0xae, hi: 0xba},\n\t{value: 0xb851, lo: 0xbb, hi: 0xbb},\n\t{value: 0xb899, lo: 0xbc, hi: 0xbc},\n\t{value: 0xb8e1, lo: 0xbd, hi: 0xbd},\n\t{value: 0xb949, lo: 0xbe, hi: 0xbe},\n\t{value: 0xb9b1, lo: 0xbf, hi: 0xbf},\n\t// Block 0xde, offset 0x67f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xba19, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0xa8},\n\t{value: 0x0040, lo: 0xa9, hi: 0xbf},\n\t// Block 0xdf, offset 0x683\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x81},\n\t{value: 0x3318, lo: 0x82, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x85},\n\t{value: 0x0040, lo: 0x86, hi: 0xbf},\n\t// Block 0xe0, offset 0x688\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xe1, offset 0x68d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x3308, lo: 0x80, hi: 0xb6},\n\t{value: 0x0018, lo: 0xb7, hi: 0xba},\n\t{value: 0x3308, lo: 0xbb, hi: 0xbf},\n\t// Block 0xe2, offset 0x691\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x3308, lo: 0x80, hi: 0xac},\n\t{value: 0x0018, lo: 0xad, hi: 0xb4},\n\t{value: 0x3308, lo: 0xb5, hi: 0xb5},\n\t{value: 0x0018, lo: 0xb6, hi: 0xbf},\n\t// Block 0xe3, offset 0x696\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x0018, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x84},\n\t{value: 0x0018, lo: 0x85, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xa0},\n\t{value: 0x3308, lo: 0xa1, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe4, offset 0x69f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x3308, lo: 0x80, hi: 0x86},\n\t{value: 0x0040, lo: 0x87, hi: 0x87},\n\t{value: 0x3308, lo: 0x88, hi: 0x98},\n\t{value: 0x0040, lo: 0x99, hi: 0x9a},\n\t{value: 0x3308, lo: 0x9b, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xa2},\n\t{value: 0x3308, lo: 0xa3, hi: 0xa4},\n\t{value: 0x0040, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3308, lo: 0xa6, hi: 0xaa},\n\t{value: 0x0040, lo: 0xab, hi: 0xbf},\n\t// Block 0xe5, offset 0x6aa\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0808, lo: 0x80, hi: 0x84},\n\t{value: 0x0040, lo: 0x85, hi: 0x86},\n\t{value: 0x0818, lo: 0x87, hi: 0x8f},\n\t{value: 0x3308, lo: 0x90, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xe6, offset 0x6b0\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x0a08, lo: 0x80, hi: 0x83},\n\t{value: 0x3308, lo: 0x84, hi: 0x8a},\n\t{value: 0x0040, lo: 0x8b, hi: 0x8f},\n\t{value: 0x0808, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9d},\n\t{value: 0x0818, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0040, lo: 0xa0, hi: 0xbf},\n\t// Block 0xe7, offset 0x6b8\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0040, lo: 0x80, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb1},\n\t{value: 0x0040, lo: 0xb2, hi: 0xbf},\n\t// Block 0xe8, offset 0x6bc\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0xab},\n\t{value: 0x0040, lo: 0xac, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xbf},\n\t// Block 0xe9, offset 0x6c0\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x93},\n\t{value: 0x0040, lo: 0x94, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xae},\n\t{value: 0x0040, lo: 0xaf, hi: 0xb0},\n\t{value: 0x0018, lo: 0xb1, hi: 0xbf},\n\t// Block 0xea, offset 0x6c6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0018, lo: 0x81, hi: 0x8f},\n\t{value: 0x0040, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xb5},\n\t{value: 0x0040, lo: 0xb6, hi: 0xbf},\n\t// Block 0xeb, offset 0x6cc\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8f},\n\t{value: 0xc1c1, lo: 0x90, hi: 0x90},\n\t{value: 0x0018, lo: 0x91, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xbf},\n\t// Block 0xec, offset 0x6d1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0040, lo: 0x80, hi: 0xa5},\n\t{value: 0x0018, lo: 0xa6, hi: 0xbf},\n\t// Block 0xed, offset 0x6d4\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0xc7e9, lo: 0x80, hi: 0x80},\n\t{value: 0xc839, lo: 0x81, hi: 0x81},\n\t{value: 0xc889, lo: 0x82, hi: 0x82},\n\t{value: 0xc8d9, lo: 0x83, hi: 0x83},\n\t{value: 0xc929, lo: 0x84, hi: 0x84},\n\t{value: 0xc979, lo: 0x85, hi: 0x85},\n\t{value: 0xc9c9, lo: 0x86, hi: 0x86},\n\t{value: 0xca19, lo: 0x87, hi: 0x87},\n\t{value: 0xca69, lo: 0x88, hi: 0x88},\n\t{value: 0x0040, lo: 0x89, hi: 0x8f},\n\t{value: 0xcab9, lo: 0x90, hi: 0x90},\n\t{value: 0xcad9, lo: 0x91, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0xbf},\n\t// Block 0xee, offset 0x6e2\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x0018, lo: 0x80, hi: 0x92},\n\t{value: 0x0040, lo: 0x93, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xac},\n\t{value: 0x0040, lo: 0xad, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb6},\n\t{value: 0x0040, lo: 0xb7, hi: 0xbf},\n\t// Block 0xef, offset 0x6e9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0xb3},\n\t{value: 0x0040, lo: 0xb4, hi: 0xbf},\n\t// Block 0xf0, offset 0x6ec\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x94},\n\t{value: 0x0040, lo: 0x95, hi: 0xbf},\n\t// Block 0xf1, offset 0x6ef\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xbf},\n\t// Block 0xf2, offset 0x6f3\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x99},\n\t{value: 0x0040, lo: 0x9a, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xbf},\n\t// Block 0xf3, offset 0x6f9\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x87},\n\t{value: 0x0040, lo: 0x88, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0xad},\n\t{value: 0x0040, lo: 0xae, hi: 0xbf},\n\t// Block 0xf4, offset 0x6fe\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x0040, lo: 0x80, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0018, lo: 0xa0, hi: 0xa7},\n\t{value: 0x0040, lo: 0xa8, hi: 0xaf},\n\t{value: 0x0018, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0040, lo: 0xb1, hi: 0xb2},\n\t{value: 0x0018, lo: 0xb3, hi: 0xbe},\n\t{value: 0x0040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xf5, offset 0x708\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0018, lo: 0x80, hi: 0x8b},\n\t{value: 0x0040, lo: 0x8c, hi: 0x8f},\n\t{value: 0x0018, lo: 0x90, hi: 0x9e},\n\t{value: 0x0040, lo: 0x9f, hi: 0xbf},\n\t// Block 0xf6, offset 0x70d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x91},\n\t{value: 0x0040, lo: 0x92, hi: 0xbf},\n\t// Block 0xf7, offset 0x710\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0018, lo: 0x80, hi: 0x80},\n\t{value: 0x0040, lo: 0x81, hi: 0xbf},\n\t// Block 0xf8, offset 0x713\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0x96},\n\t{value: 0x0040, lo: 0x97, hi: 0xbf},\n\t// Block 0xf9, offset 0x716\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xb4},\n\t{value: 0x0040, lo: 0xb5, hi: 0xbf},\n\t// Block 0xfa, offset 0x719\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x0008, lo: 0x80, hi: 0x9d},\n\t{value: 0x0040, lo: 0x9e, hi: 0x9f},\n\t{value: 0x0008, lo: 0xa0, hi: 0xbf},\n\t// Block 0xfb, offset 0x71d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0008, lo: 0x80, hi: 0xa1},\n\t{value: 0x0040, lo: 0xa2, hi: 0xbf},\n\t// Block 0xfc, offset 0x720\n\t{value: 0x0020, lo: 0x0f},\n\t{value: 0xdeb9, lo: 0x80, hi: 0x89},\n\t{value: 0x8dfd, lo: 0x8a, hi: 0x8a},\n\t{value: 0xdff9, lo: 0x8b, hi: 0x9c},\n\t{value: 0x8e1d, lo: 0x9d, hi: 0x9d},\n\t{value: 0xe239, lo: 0x9e, hi: 0xa2},\n\t{value: 0x8e3d, lo: 0xa3, hi: 0xa3},\n\t{value: 0xe2d9, lo: 0xa4, hi: 0xab},\n\t{value: 0x7ed5, lo: 0xac, hi: 0xac},\n\t{value: 0xe3d9, lo: 0xad, hi: 0xaf},\n\t{value: 0x8e5d, lo: 0xb0, hi: 0xb0},\n\t{value: 0xe439, lo: 0xb1, hi: 0xb6},\n\t{value: 0x8e7d, lo: 0xb7, hi: 0xb9},\n\t{value: 0xe4f9, lo: 0xba, hi: 0xba},\n\t{value: 0x8edd, lo: 0xbb, hi: 0xbb},\n\t{value: 0xe519, lo: 0xbc, hi: 0xbf},\n\t// Block 0xfd, offset 0x730\n\t{value: 0x0020, lo: 0x10},\n\t{value: 0x937d, lo: 0x80, hi: 0x80},\n\t{value: 0xf099, lo: 0x81, hi: 0x86},\n\t{value: 0x939d, lo: 0x87, hi: 0x8a},\n\t{value: 0xd9f9, lo: 0x8b, hi: 0x8b},\n\t{value: 0xf159, lo: 0x8c, hi: 0x96},\n\t{value: 0x941d, lo: 0x97, hi: 0x97},\n\t{value: 0xf2b9, lo: 0x98, hi: 0xa3},\n\t{value: 0x943d, lo: 0xa4, hi: 0xa6},\n\t{value: 0xf439, lo: 0xa7, hi: 0xaa},\n\t{value: 0x949d, lo: 0xab, hi: 0xab},\n\t{value: 0xf4b9, lo: 0xac, hi: 0xac},\n\t{value: 0x94bd, lo: 0xad, hi: 0xad},\n\t{value: 0xf4d9, lo: 0xae, hi: 0xaf},\n\t{value: 0x94dd, lo: 0xb0, hi: 0xb1},\n\t{value: 0xf519, lo: 0xb2, hi: 0xbe},\n\t{value: 0x2040, lo: 0xbf, hi: 0xbf},\n\t// Block 0xfe, offset 0x741\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x0040, lo: 0x80, hi: 0x80},\n\t{value: 0x0340, lo: 0x81, hi: 0x81},\n\t{value: 0x0040, lo: 0x82, hi: 0x9f},\n\t{value: 0x0340, lo: 0xa0, hi: 0xbf},\n\t// Block 0xff, offset 0x746\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0340, lo: 0x80, hi: 0xbf},\n\t// Block 0x100, offset 0x748\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x33c0, lo: 0x80, hi: 0xbf},\n\t// Block 0x101, offset 0x74a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x33c0, lo: 0x80, hi: 0xaf},\n\t{value: 0x0040, lo: 0xb0, hi: 0xbf},\n}\n\n// Total table size 41662 bytes (40KiB); checksum: 355A58A4\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/trie.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage idna\n\n// Sparse block handling code.\n\ntype valueRange struct {\n\tvalue  uint16 // header: value:stride\n\tlo, hi byte   // header: lo:n\n}\n\ntype sparseBlocks struct {\n\tvalues []valueRange\n\toffset []uint16\n}\n\nvar idnaSparse = sparseBlocks{\n\tvalues: idnaSparseValues[:],\n\toffset: idnaSparseOffset[:],\n}\n\n// Don't use newIdnaTrie to avoid unconditional linking in of the table.\nvar trie = &idnaTrie{}\n\n// lookup determines the type of block n and looks up the value for b.\n// For n < t.cutoff, the block is a simple lookup table. Otherwise, the block\n// is a list of ranges with an accompanying value. Given a matching range r,\n// the value for b is by r.value + (b - r.lo) * stride.\nfunc (t *sparseBlocks) lookup(n uint32, b byte) uint16 {\n\toffset := t.offset[n]\n\theader := t.values[offset]\n\tlo := offset + 1\n\thi := lo + uint16(header.lo)\n\tfor lo < hi {\n\t\tm := lo + (hi-lo)/2\n\t\tr := t.values[m]\n\t\tif r.lo <= b && b <= r.hi {\n\t\t\treturn r.value + uint16(b-r.lo)*header.value\n\t\t}\n\t\tif b < r.lo {\n\t\t\thi = m\n\t\t} else {\n\t\t\tlo = m + 1\n\t\t}\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/trie12.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.16\n\npackage idna\n\n// appendMapping appends the mapping for the respective rune. isMapped must be\n// true. A mapping is a categorization of a rune as defined in UTS #46.\nfunc (c info) appendMapping(b []byte, s string) []byte {\n\tindex := int(c >> indexShift)\n\tif c&xorBit == 0 {\n\t\ts := mappings[index:]\n\t\treturn append(b, s[1:s[0]+1]...)\n\t}\n\tb = append(b, s...)\n\tif c&inlineXOR == inlineXOR {\n\t\t// TODO: support and handle two-byte inline masks\n\t\tb[len(b)-1] ^= byte(index)\n\t} else {\n\t\tfor p := len(b) - int(xorData[index]); p < len(b); p++ {\n\t\t\tindex++\n\t\t\tb[p] ^= xorData[index]\n\t\t}\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/trie13.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.16\n\npackage idna\n\n// appendMapping appends the mapping for the respective rune. isMapped must be\n// true. A mapping is a categorization of a rune as defined in UTS #46.\nfunc (c info) appendMapping(b []byte, s string) []byte {\n\tindex := int(c >> indexShift)\n\tif c&xorBit == 0 {\n\t\tp := index\n\t\treturn append(b, mappings[mappingIndex[p]:mappingIndex[p+1]]...)\n\t}\n\tb = append(b, s...)\n\tif c&inlineXOR == inlineXOR {\n\t\t// TODO: support and handle two-byte inline masks\n\t\tb[len(b)-1] ^= byte(index)\n\t} else {\n\t\tfor p := len(b) - int(xorData[index]); p < len(b); p++ {\n\t\t\tindex++\n\t\t\tb[p] ^= xorData[index]\n\t\t}\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/idna/trieval.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage idna\n\n// This file contains definitions for interpreting the trie value of the idna\n// trie generated by \"go run gen*.go\". It is shared by both the generator\n// program and the resultant package. Sharing is achieved by the generator\n// copying gen_trieval.go to trieval.go and changing what's above this comment.\n\n// info holds information from the IDNA mapping table for a single rune. It is\n// the value returned by a trie lookup. In most cases, all information fits in\n// a 16-bit value. For mappings, this value may contain an index into a slice\n// with the mapped string. Such mappings can consist of the actual mapped value\n// or an XOR pattern to be applied to the bytes of the UTF8 encoding of the\n// input rune. This technique is used by the cases packages and reduces the\n// table size significantly.\n//\n// The per-rune values have the following format:\n//\n//\tif mapped {\n//\t  if inlinedXOR {\n//\t    15..13 inline XOR marker\n//\t    12..11 unused\n//\t    10..3  inline XOR mask\n//\t  } else {\n//\t    15..3  index into xor or mapping table\n//\t  }\n//\t} else {\n//\t    15..14 unused\n//\t    13     mayNeedNorm\n//\t    12..11 attributes\n//\t    10..8  joining type\n//\t     7..3  category type\n//\t}\n//\t   2  use xor pattern\n//\t1..0  mapped category\n//\n// See the definitions below for a more detailed description of the various\n// bits.\ntype info uint16\n\nconst (\n\tcatSmallMask = 0x3\n\tcatBigMask   = 0xF8\n\tindexShift   = 3\n\txorBit       = 0x4    // interpret the index as an xor pattern\n\tinlineXOR    = 0xE000 // These bits are set if the XOR pattern is inlined.\n\n\tjoinShift = 8\n\tjoinMask  = 0x07\n\n\t// Attributes\n\tattributesMask = 0x1800\n\tviramaModifier = 0x1800\n\tmodifier       = 0x1000\n\trtl            = 0x0800\n\n\tmayNeedNorm = 0x2000\n)\n\n// A category corresponds to a category defined in the IDNA mapping table.\ntype category uint16\n\nconst (\n\tunknown              category = 0 // not currently defined in unicode.\n\tmapped               category = 1\n\tdisallowedSTD3Mapped category = 2\n\tdeviation            category = 3\n)\n\nconst (\n\tvalid               category = 0x08\n\tvalidNV8            category = 0x18\n\tvalidXV8            category = 0x28\n\tdisallowed          category = 0x40\n\tdisallowedSTD3Valid category = 0x80\n\tignored             category = 0xC0\n)\n\n// join types and additional rune information\nconst (\n\tjoiningL = (iota + 1)\n\tjoiningD\n\tjoiningT\n\tjoiningR\n\n\t//the following types are derived during processing\n\tjoinZWJ\n\tjoinZWNJ\n\tjoinVirama\n\tnumJoinTypes\n)\n\nfunc (c info) isMapped() bool {\n\treturn c&0x3 != 0\n}\n\nfunc (c info) category() category {\n\tsmall := c & catSmallMask\n\tif small != 0 {\n\t\treturn category(small)\n\t}\n\treturn category(c & catBigMask)\n}\n\nfunc (c info) joinType() info {\n\tif c.isMapped() {\n\t\treturn 0\n\t}\n\treturn (c >> joinShift) & joinMask\n}\n\nfunc (c info) isModifier() bool {\n\treturn c&(modifier|catSmallMask) == modifier\n}\n\nfunc (c info) isViramaModifier() bool {\n\treturn c&(attributesMask|catSmallMask) == viramaModifier\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/internal/httpcommon/ascii.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage httpcommon\n\nimport \"strings\"\n\n// The HTTP protocols are defined in terms of ASCII, not Unicode. This file\n// contains helper functions which may use Unicode-aware functions which would\n// otherwise be unsafe and could introduce vulnerabilities if used improperly.\n\n// asciiEqualFold is strings.EqualFold, ASCII only. It reports whether s and t\n// are equal, ASCII-case-insensitively.\nfunc asciiEqualFold(s, t string) bool {\n\tif len(s) != len(t) {\n\t\treturn false\n\t}\n\tfor i := 0; i < len(s); i++ {\n\t\tif lower(s[i]) != lower(t[i]) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// lower returns the ASCII lowercase version of b.\nfunc lower(b byte) byte {\n\tif 'A' <= b && b <= 'Z' {\n\t\treturn b + ('a' - 'A')\n\t}\n\treturn b\n}\n\n// isASCIIPrint returns whether s is ASCII and printable according to\n// https://tools.ietf.org/html/rfc20#section-4.2.\nfunc isASCIIPrint(s string) bool {\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] < ' ' || s[i] > '~' {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// asciiToLower returns the lowercase version of s if s is ASCII and printable,\n// and whether or not it was.\nfunc asciiToLower(s string) (lower string, ok bool) {\n\tif !isASCIIPrint(s) {\n\t\treturn \"\", false\n\t}\n\treturn strings.ToLower(s), true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/internal/httpcommon/headermap.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage httpcommon\n\nimport (\n\t\"net/textproto\"\n\t\"sync\"\n)\n\nvar (\n\tcommonBuildOnce   sync.Once\n\tcommonLowerHeader map[string]string // Go-Canonical-Case -> lower-case\n\tcommonCanonHeader map[string]string // lower-case -> Go-Canonical-Case\n)\n\nfunc buildCommonHeaderMapsOnce() {\n\tcommonBuildOnce.Do(buildCommonHeaderMaps)\n}\n\nfunc buildCommonHeaderMaps() {\n\tcommon := []string{\n\t\t\"accept\",\n\t\t\"accept-charset\",\n\t\t\"accept-encoding\",\n\t\t\"accept-language\",\n\t\t\"accept-ranges\",\n\t\t\"age\",\n\t\t\"access-control-allow-credentials\",\n\t\t\"access-control-allow-headers\",\n\t\t\"access-control-allow-methods\",\n\t\t\"access-control-allow-origin\",\n\t\t\"access-control-expose-headers\",\n\t\t\"access-control-max-age\",\n\t\t\"access-control-request-headers\",\n\t\t\"access-control-request-method\",\n\t\t\"allow\",\n\t\t\"authorization\",\n\t\t\"cache-control\",\n\t\t\"content-disposition\",\n\t\t\"content-encoding\",\n\t\t\"content-language\",\n\t\t\"content-length\",\n\t\t\"content-location\",\n\t\t\"content-range\",\n\t\t\"content-type\",\n\t\t\"cookie\",\n\t\t\"date\",\n\t\t\"etag\",\n\t\t\"expect\",\n\t\t\"expires\",\n\t\t\"from\",\n\t\t\"host\",\n\t\t\"if-match\",\n\t\t\"if-modified-since\",\n\t\t\"if-none-match\",\n\t\t\"if-unmodified-since\",\n\t\t\"last-modified\",\n\t\t\"link\",\n\t\t\"location\",\n\t\t\"max-forwards\",\n\t\t\"origin\",\n\t\t\"proxy-authenticate\",\n\t\t\"proxy-authorization\",\n\t\t\"range\",\n\t\t\"referer\",\n\t\t\"refresh\",\n\t\t\"retry-after\",\n\t\t\"server\",\n\t\t\"set-cookie\",\n\t\t\"strict-transport-security\",\n\t\t\"trailer\",\n\t\t\"transfer-encoding\",\n\t\t\"user-agent\",\n\t\t\"vary\",\n\t\t\"via\",\n\t\t\"www-authenticate\",\n\t\t\"x-forwarded-for\",\n\t\t\"x-forwarded-proto\",\n\t}\n\tcommonLowerHeader = make(map[string]string, len(common))\n\tcommonCanonHeader = make(map[string]string, len(common))\n\tfor _, v := range common {\n\t\tchk := textproto.CanonicalMIMEHeaderKey(v)\n\t\tcommonLowerHeader[chk] = v\n\t\tcommonCanonHeader[v] = chk\n\t}\n}\n\n// LowerHeader returns the lowercase form of a header name,\n// used on the wire for HTTP/2 and HTTP/3 requests.\nfunc LowerHeader(v string) (lower string, ascii bool) {\n\tbuildCommonHeaderMapsOnce()\n\tif s, ok := commonLowerHeader[v]; ok {\n\t\treturn s, true\n\t}\n\treturn asciiToLower(v)\n}\n\n// CanonicalHeader canonicalizes a header name. (For example, \"host\" becomes \"Host\".)\nfunc CanonicalHeader(v string) string {\n\tbuildCommonHeaderMapsOnce()\n\tif s, ok := commonCanonHeader[v]; ok {\n\t\treturn s\n\t}\n\treturn textproto.CanonicalMIMEHeaderKey(v)\n}\n\n// CachedCanonicalHeader returns the canonical form of a well-known header name.\nfunc CachedCanonicalHeader(v string) (string, bool) {\n\tbuildCommonHeaderMapsOnce()\n\ts, ok := commonCanonHeader[v]\n\treturn s, ok\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/internal/httpcommon/request.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage httpcommon\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http/httptrace\"\n\t\"net/textproto\"\n\t\"net/url\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/net/http/httpguts\"\n\t\"golang.org/x/net/http2/hpack\"\n)\n\nvar (\n\tErrRequestHeaderListSize = errors.New(\"request header list larger than peer's advertised limit\")\n)\n\n// Request is a subset of http.Request.\n// It'd be simpler to pass an *http.Request, of course, but we can't depend on net/http\n// without creating a dependency cycle.\ntype Request struct {\n\tURL                 *url.URL\n\tMethod              string\n\tHost                string\n\tHeader              map[string][]string\n\tTrailer             map[string][]string\n\tActualContentLength int64 // 0 means 0, -1 means unknown\n}\n\n// EncodeHeadersParam is parameters to EncodeHeaders.\ntype EncodeHeadersParam struct {\n\tRequest Request\n\n\t// AddGzipHeader indicates that an \"accept-encoding: gzip\" header should be\n\t// added to the request.\n\tAddGzipHeader bool\n\n\t// PeerMaxHeaderListSize, when non-zero, is the peer's MAX_HEADER_LIST_SIZE setting.\n\tPeerMaxHeaderListSize uint64\n\n\t// DefaultUserAgent is the User-Agent header to send when the request\n\t// neither contains a User-Agent nor disables it.\n\tDefaultUserAgent string\n}\n\n// EncodeHeadersResult is the result of EncodeHeaders.\ntype EncodeHeadersResult struct {\n\tHasBody     bool\n\tHasTrailers bool\n}\n\n// EncodeHeaders constructs request headers common to HTTP/2 and HTTP/3.\n// It validates a request and calls headerf with each pseudo-header and header\n// for the request.\n// The headerf function is called with the validated, canonicalized header name.\nfunc EncodeHeaders(ctx context.Context, param EncodeHeadersParam, headerf func(name, value string)) (res EncodeHeadersResult, _ error) {\n\treq := param.Request\n\n\t// Check for invalid connection-level headers.\n\tif err := checkConnHeaders(req.Header); err != nil {\n\t\treturn res, err\n\t}\n\n\tif req.URL == nil {\n\t\treturn res, errors.New(\"Request.URL is nil\")\n\t}\n\n\thost := req.Host\n\tif host == \"\" {\n\t\thost = req.URL.Host\n\t}\n\thost, err := httpguts.PunycodeHostPort(host)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tif !httpguts.ValidHostHeader(host) {\n\t\treturn res, errors.New(\"invalid Host header\")\n\t}\n\n\t// isNormalConnect is true if this is a non-extended CONNECT request.\n\tisNormalConnect := false\n\tvar protocol string\n\tif vv := req.Header[\":protocol\"]; len(vv) > 0 {\n\t\tprotocol = vv[0]\n\t}\n\tif req.Method == \"CONNECT\" && protocol == \"\" {\n\t\tisNormalConnect = true\n\t} else if protocol != \"\" && req.Method != \"CONNECT\" {\n\t\treturn res, errors.New(\"invalid :protocol header in non-CONNECT request\")\n\t}\n\n\t// Validate the path, except for non-extended CONNECT requests which have no path.\n\tvar path string\n\tif !isNormalConnect {\n\t\tpath = req.URL.RequestURI()\n\t\tif !validPseudoPath(path) {\n\t\t\torig := path\n\t\t\tpath = strings.TrimPrefix(path, req.URL.Scheme+\"://\"+host)\n\t\t\tif !validPseudoPath(path) {\n\t\t\t\tif req.URL.Opaque != \"\" {\n\t\t\t\t\treturn res, fmt.Errorf(\"invalid request :path %q from URL.Opaque = %q\", orig, req.URL.Opaque)\n\t\t\t\t} else {\n\t\t\t\t\treturn res, fmt.Errorf(\"invalid request :path %q\", orig)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check for any invalid headers+trailers and return an error before we\n\t// potentially pollute our hpack state. (We want to be able to\n\t// continue to reuse the hpack encoder for future requests)\n\tif err := validateHeaders(req.Header); err != \"\" {\n\t\treturn res, fmt.Errorf(\"invalid HTTP header %s\", err)\n\t}\n\tif err := validateHeaders(req.Trailer); err != \"\" {\n\t\treturn res, fmt.Errorf(\"invalid HTTP trailer %s\", err)\n\t}\n\n\ttrailers, err := commaSeparatedTrailers(req.Trailer)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\n\tenumerateHeaders := func(f func(name, value string)) {\n\t\t// 8.1.2.3 Request Pseudo-Header Fields\n\t\t// The :path pseudo-header field includes the path and query parts of the\n\t\t// target URI (the path-absolute production and optionally a '?' character\n\t\t// followed by the query production, see Sections 3.3 and 3.4 of\n\t\t// [RFC3986]).\n\t\tf(\":authority\", host)\n\t\tm := req.Method\n\t\tif m == \"\" {\n\t\t\tm = \"GET\"\n\t\t}\n\t\tf(\":method\", m)\n\t\tif !isNormalConnect {\n\t\t\tf(\":path\", path)\n\t\t\tf(\":scheme\", req.URL.Scheme)\n\t\t}\n\t\tif protocol != \"\" {\n\t\t\tf(\":protocol\", protocol)\n\t\t}\n\t\tif trailers != \"\" {\n\t\t\tf(\"trailer\", trailers)\n\t\t}\n\n\t\tvar didUA bool\n\t\tfor k, vv := range req.Header {\n\t\t\tif asciiEqualFold(k, \"host\") || asciiEqualFold(k, \"content-length\") {\n\t\t\t\t// Host is :authority, already sent.\n\t\t\t\t// Content-Length is automatic, set below.\n\t\t\t\tcontinue\n\t\t\t} else if asciiEqualFold(k, \"connection\") ||\n\t\t\t\tasciiEqualFold(k, \"proxy-connection\") ||\n\t\t\t\tasciiEqualFold(k, \"transfer-encoding\") ||\n\t\t\t\tasciiEqualFold(k, \"upgrade\") ||\n\t\t\t\tasciiEqualFold(k, \"keep-alive\") {\n\t\t\t\t// Per 8.1.2.2 Connection-Specific Header\n\t\t\t\t// Fields, don't send connection-specific\n\t\t\t\t// fields. We have already checked if any\n\t\t\t\t// are error-worthy so just ignore the rest.\n\t\t\t\tcontinue\n\t\t\t} else if asciiEqualFold(k, \"user-agent\") {\n\t\t\t\t// Match Go's http1 behavior: at most one\n\t\t\t\t// User-Agent. If set to nil or empty string,\n\t\t\t\t// then omit it. Otherwise if not mentioned,\n\t\t\t\t// include the default (below).\n\t\t\t\tdidUA = true\n\t\t\t\tif len(vv) < 1 {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tvv = vv[:1]\n\t\t\t\tif vv[0] == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t} else if asciiEqualFold(k, \"cookie\") {\n\t\t\t\t// Per 8.1.2.5 To allow for better compression efficiency, the\n\t\t\t\t// Cookie header field MAY be split into separate header fields,\n\t\t\t\t// each with one or more cookie-pairs.\n\t\t\t\tfor _, v := range vv {\n\t\t\t\t\tfor {\n\t\t\t\t\t\tp := strings.IndexByte(v, ';')\n\t\t\t\t\t\tif p < 0 {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tf(\"cookie\", v[:p])\n\t\t\t\t\t\tp++\n\t\t\t\t\t\t// strip space after semicolon if any.\n\t\t\t\t\t\tfor p+1 <= len(v) && v[p] == ' ' {\n\t\t\t\t\t\t\tp++\n\t\t\t\t\t\t}\n\t\t\t\t\t\tv = v[p:]\n\t\t\t\t\t}\n\t\t\t\t\tif len(v) > 0 {\n\t\t\t\t\t\tf(\"cookie\", v)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t} else if k == \":protocol\" {\n\t\t\t\t// :protocol pseudo-header was already sent above.\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tfor _, v := range vv {\n\t\t\t\tf(k, v)\n\t\t\t}\n\t\t}\n\t\tif shouldSendReqContentLength(req.Method, req.ActualContentLength) {\n\t\t\tf(\"content-length\", strconv.FormatInt(req.ActualContentLength, 10))\n\t\t}\n\t\tif param.AddGzipHeader {\n\t\t\tf(\"accept-encoding\", \"gzip\")\n\t\t}\n\t\tif !didUA {\n\t\t\tf(\"user-agent\", param.DefaultUserAgent)\n\t\t}\n\t}\n\n\t// Do a first pass over the headers counting bytes to ensure\n\t// we don't exceed cc.peerMaxHeaderListSize. This is done as a\n\t// separate pass before encoding the headers to prevent\n\t// modifying the hpack state.\n\tif param.PeerMaxHeaderListSize > 0 {\n\t\thlSize := uint64(0)\n\t\tenumerateHeaders(func(name, value string) {\n\t\t\thf := hpack.HeaderField{Name: name, Value: value}\n\t\t\thlSize += uint64(hf.Size())\n\t\t})\n\n\t\tif hlSize > param.PeerMaxHeaderListSize {\n\t\t\treturn res, ErrRequestHeaderListSize\n\t\t}\n\t}\n\n\ttrace := httptrace.ContextClientTrace(ctx)\n\n\t// Header list size is ok. Write the headers.\n\tenumerateHeaders(func(name, value string) {\n\t\tname, ascii := LowerHeader(name)\n\t\tif !ascii {\n\t\t\t// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header\n\t\t\t// field names have to be ASCII characters (just as in HTTP/1.x).\n\t\t\treturn\n\t\t}\n\n\t\theaderf(name, value)\n\n\t\tif trace != nil && trace.WroteHeaderField != nil {\n\t\t\ttrace.WroteHeaderField(name, []string{value})\n\t\t}\n\t})\n\n\tres.HasBody = req.ActualContentLength != 0\n\tres.HasTrailers = trailers != \"\"\n\treturn res, nil\n}\n\n// IsRequestGzip reports whether we should add an Accept-Encoding: gzip header\n// for a request.\nfunc IsRequestGzip(method string, header map[string][]string, disableCompression bool) bool {\n\t// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?\n\tif !disableCompression &&\n\t\tlen(header[\"Accept-Encoding\"]) == 0 &&\n\t\tlen(header[\"Range\"]) == 0 &&\n\t\tmethod != \"HEAD\" {\n\t\t// Request gzip only, not deflate. Deflate is ambiguous and\n\t\t// not as universally supported anyway.\n\t\t// See: https://zlib.net/zlib_faq.html#faq39\n\t\t//\n\t\t// Note that we don't request this for HEAD requests,\n\t\t// due to a bug in nginx:\n\t\t//   http://trac.nginx.org/nginx/ticket/358\n\t\t//   https://golang.org/issue/5522\n\t\t//\n\t\t// We don't request gzip if the request is for a range, since\n\t\t// auto-decoding a portion of a gzipped document will just fail\n\t\t// anyway. See https://golang.org/issue/8923\n\t\treturn true\n\t}\n\treturn false\n}\n\n// checkConnHeaders checks whether req has any invalid connection-level headers.\n//\n// https://www.rfc-editor.org/rfc/rfc9114.html#section-4.2-3\n// https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.2-1\n//\n// Certain headers are special-cased as okay but not transmitted later.\n// For example, we allow \"Transfer-Encoding: chunked\", but drop the header when encoding.\nfunc checkConnHeaders(h map[string][]string) error {\n\tif vv := h[\"Upgrade\"]; len(vv) > 0 && (vv[0] != \"\" && vv[0] != \"chunked\") {\n\t\treturn fmt.Errorf(\"invalid Upgrade request header: %q\", vv)\n\t}\n\tif vv := h[\"Transfer-Encoding\"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != \"\" && vv[0] != \"chunked\") {\n\t\treturn fmt.Errorf(\"invalid Transfer-Encoding request header: %q\", vv)\n\t}\n\tif vv := h[\"Connection\"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != \"\" && !asciiEqualFold(vv[0], \"close\") && !asciiEqualFold(vv[0], \"keep-alive\")) {\n\t\treturn fmt.Errorf(\"invalid Connection request header: %q\", vv)\n\t}\n\treturn nil\n}\n\nfunc commaSeparatedTrailers(trailer map[string][]string) (string, error) {\n\tkeys := make([]string, 0, len(trailer))\n\tfor k := range trailer {\n\t\tk = CanonicalHeader(k)\n\t\tswitch k {\n\t\tcase \"Transfer-Encoding\", \"Trailer\", \"Content-Length\":\n\t\t\treturn \"\", fmt.Errorf(\"invalid Trailer key %q\", k)\n\t\t}\n\t\tkeys = append(keys, k)\n\t}\n\tif len(keys) > 0 {\n\t\tsort.Strings(keys)\n\t\treturn strings.Join(keys, \",\"), nil\n\t}\n\treturn \"\", nil\n}\n\n// validPseudoPath reports whether v is a valid :path pseudo-header\n// value. It must be either:\n//\n//   - a non-empty string starting with '/'\n//   - the string '*', for OPTIONS requests.\n//\n// For now this is only used a quick check for deciding when to clean\n// up Opaque URLs before sending requests from the Transport.\n// See golang.org/issue/16847\n//\n// We used to enforce that the path also didn't start with \"//\", but\n// Google's GFE accepts such paths and Chrome sends them, so ignore\n// that part of the spec. See golang.org/issue/19103.\nfunc validPseudoPath(v string) bool {\n\treturn (len(v) > 0 && v[0] == '/') || v == \"*\"\n}\n\nfunc validateHeaders(hdrs map[string][]string) string {\n\tfor k, vv := range hdrs {\n\t\tif !httpguts.ValidHeaderFieldName(k) && k != \":protocol\" {\n\t\t\treturn fmt.Sprintf(\"name %q\", k)\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\tif !httpguts.ValidHeaderFieldValue(v) {\n\t\t\t\t// Don't include the value in the error,\n\t\t\t\t// because it may be sensitive.\n\t\t\t\treturn fmt.Sprintf(\"value for header %q\", k)\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// shouldSendReqContentLength reports whether we should send\n// a \"content-length\" request header. This logic is basically a copy of the net/http\n// transferWriter.shouldSendContentLength.\n// The contentLength is the corrected contentLength (so 0 means actually 0, not unknown).\n// -1 means unknown.\nfunc shouldSendReqContentLength(method string, contentLength int64) bool {\n\tif contentLength > 0 {\n\t\treturn true\n\t}\n\tif contentLength < 0 {\n\t\treturn false\n\t}\n\t// For zero bodies, whether we send a content-length depends on the method.\n\t// It also kinda doesn't matter for http2 either way, with END_STREAM.\n\tswitch method {\n\tcase \"POST\", \"PUT\", \"PATCH\":\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// ServerRequestParam is parameters to NewServerRequest.\ntype ServerRequestParam struct {\n\tMethod                  string\n\tScheme, Authority, Path string\n\tProtocol                string\n\tHeader                  map[string][]string\n}\n\n// ServerRequestResult is the result of NewServerRequest.\ntype ServerRequestResult struct {\n\t// Various http.Request fields.\n\tURL        *url.URL\n\tRequestURI string\n\tTrailer    map[string][]string\n\n\tNeedsContinue bool // client provided an \"Expect: 100-continue\" header\n\n\t// If the request should be rejected, this is a short string suitable for passing\n\t// to the http2 package's CountError function.\n\t// It might be a bit odd to return errors this way rather than returning an error,\n\t// but this ensures we don't forget to include a CountError reason.\n\tInvalidReason string\n}\n\nfunc NewServerRequest(rp ServerRequestParam) ServerRequestResult {\n\tneedsContinue := httpguts.HeaderValuesContainsToken(rp.Header[\"Expect\"], \"100-continue\")\n\tif needsContinue {\n\t\tdelete(rp.Header, \"Expect\")\n\t}\n\t// Merge Cookie headers into one \"; \"-delimited value.\n\tif cookies := rp.Header[\"Cookie\"]; len(cookies) > 1 {\n\t\trp.Header[\"Cookie\"] = []string{strings.Join(cookies, \"; \")}\n\t}\n\n\t// Setup Trailers\n\tvar trailer map[string][]string\n\tfor _, v := range rp.Header[\"Trailer\"] {\n\t\tfor _, key := range strings.Split(v, \",\") {\n\t\t\tkey = textproto.CanonicalMIMEHeaderKey(textproto.TrimString(key))\n\t\t\tswitch key {\n\t\t\tcase \"Transfer-Encoding\", \"Trailer\", \"Content-Length\":\n\t\t\t\t// Bogus. (copy of http1 rules)\n\t\t\t\t// Ignore.\n\t\t\tdefault:\n\t\t\t\tif trailer == nil {\n\t\t\t\t\ttrailer = make(map[string][]string)\n\t\t\t\t}\n\t\t\t\ttrailer[key] = nil\n\t\t\t}\n\t\t}\n\t}\n\tdelete(rp.Header, \"Trailer\")\n\n\t// \"':authority' MUST NOT include the deprecated userinfo subcomponent\n\t// for \"http\" or \"https\" schemed URIs.\"\n\t// https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.8\n\tif strings.IndexByte(rp.Authority, '@') != -1 && (rp.Scheme == \"http\" || rp.Scheme == \"https\") {\n\t\treturn ServerRequestResult{\n\t\t\tInvalidReason: \"userinfo_in_authority\",\n\t\t}\n\t}\n\n\tvar url_ *url.URL\n\tvar requestURI string\n\tif rp.Method == \"CONNECT\" && rp.Protocol == \"\" {\n\t\turl_ = &url.URL{Host: rp.Authority}\n\t\trequestURI = rp.Authority // mimic HTTP/1 server behavior\n\t} else {\n\t\tvar err error\n\t\turl_, err = url.ParseRequestURI(rp.Path)\n\t\tif err != nil {\n\t\t\treturn ServerRequestResult{\n\t\t\t\tInvalidReason: \"bad_path\",\n\t\t\t}\n\t\t}\n\t\trequestURI = rp.Path\n\t}\n\n\treturn ServerRequestResult{\n\t\tURL:           url_,\n\t\tNeedsContinue: needsContinue,\n\t\tRequestURI:    requestURI,\n\t\tTrailer:       trailer,\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/internal/httpsfv/httpsfv.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package httpsfv provides functionality for dealing with HTTP Structured\n// Field Values.\npackage httpsfv\n\nimport (\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf8\"\n)\n\nfunc isLCAlpha(b byte) bool {\n\treturn (b >= 'a' && b <= 'z')\n}\n\nfunc isAlpha(b byte) bool {\n\treturn isLCAlpha(b) || (b >= 'A' && b <= 'Z')\n}\n\nfunc isDigit(b byte) bool {\n\treturn b >= '0' && b <= '9'\n}\n\nfunc isVChar(b byte) bool {\n\treturn b >= 0x21 && b <= 0x7e\n}\n\nfunc isSP(b byte) bool {\n\treturn b == 0x20\n}\n\nfunc isTChar(b byte) bool {\n\tif isAlpha(b) || isDigit(b) {\n\t\treturn true\n\t}\n\treturn slices.Contains([]byte{'!', '#', '$', '%', '&', '\\'', '*', '+', '-', '.', '^', '_', '`', '|', '~'}, b)\n}\n\nfunc countLeftWhitespace(s string) int {\n\ti := 0\n\tfor _, ch := range []byte(s) {\n\t\tif ch != ' ' && ch != '\\t' {\n\t\t\tbreak\n\t\t}\n\t\ti++\n\t}\n\treturn i\n}\n\n// https://www.rfc-editor.org/rfc/rfc4648#section-8.\nfunc decOctetHex(ch1, ch2 byte) (ch byte, ok bool) {\n\tdecBase16 := func(in byte) (out byte, ok bool) {\n\t\tif !isDigit(in) && !(in >= 'a' && in <= 'f') {\n\t\t\treturn 0, false\n\t\t}\n\t\tif isDigit(in) {\n\t\t\treturn in - '0', true\n\t\t}\n\t\treturn in - 'a' + 10, true\n\t}\n\n\tif ch1, ok = decBase16(ch1); !ok {\n\t\treturn 0, ok\n\t}\n\tif ch2, ok = decBase16(ch2); !ok {\n\t\treturn 0, ok\n\t}\n\treturn ch1<<4 | ch2, true\n}\n\n// ParseList parses a list from a given HTTP Structured Field Values.\n//\n// Given an HTTP SFV string that represents a list, it will call the given\n// function using each of the members and parameters contained in the list.\n// This allows the caller to extract information out of the list.\n//\n// This function will return once it encounters the end of the string, or\n// something that is not a list. If it cannot consume the entire given\n// string, the ok value returned will be false.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-list.\nfunc ParseList(s string, f func(member, param string)) (ok bool) {\n\tfor len(s) != 0 {\n\t\tvar member, param string\n\t\tif len(s) != 0 && s[0] == '(' {\n\t\t\tif member, s, ok = consumeBareInnerList(s, nil); !ok {\n\t\t\t\treturn ok\n\t\t\t}\n\t\t} else {\n\t\t\tif member, s, ok = consumeBareItem(s); !ok {\n\t\t\t\treturn ok\n\t\t\t}\n\t\t}\n\t\tif param, s, ok = consumeParameter(s, nil); !ok {\n\t\t\treturn ok\n\t\t}\n\t\tif f != nil {\n\t\t\tf(member, param)\n\t\t}\n\n\t\ts = s[countLeftWhitespace(s):]\n\t\tif len(s) == 0 {\n\t\t\tbreak\n\t\t}\n\t\tif s[0] != ',' {\n\t\t\treturn false\n\t\t}\n\t\ts = s[1:]\n\t\ts = s[countLeftWhitespace(s):]\n\t\tif len(s) == 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// consumeBareInnerList consumes an inner list\n// (https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-inner-list),\n// except for the inner list's top-most parameter.\n// For example, given `(a;b c;d);e`, it will consume only `(a;b c;d)`.\nfunc consumeBareInnerList(s string, f func(bareItem, param string)) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || s[0] != '(' {\n\t\treturn \"\", s, false\n\t}\n\trest = s[1:]\n\tfor len(rest) != 0 {\n\t\tvar bareItem, param string\n\t\trest = rest[countLeftWhitespace(rest):]\n\t\tif len(rest) != 0 && rest[0] == ')' {\n\t\t\trest = rest[1:]\n\t\t\tbreak\n\t\t}\n\t\tif bareItem, rest, ok = consumeBareItem(rest); !ok {\n\t\t\treturn \"\", s, ok\n\t\t}\n\t\tif param, rest, ok = consumeParameter(rest, nil); !ok {\n\t\t\treturn \"\", s, ok\n\t\t}\n\t\tif len(rest) == 0 || (rest[0] != ')' && !isSP(rest[0])) {\n\t\t\treturn \"\", s, false\n\t\t}\n\t\tif f != nil {\n\t\t\tf(bareItem, param)\n\t\t}\n\t}\n\treturn s[:len(s)-len(rest)], rest, true\n}\n\n// ParseBareInnerList parses a bare inner list from a given HTTP Structured\n// Field Values.\n//\n// We define a bare inner list as an inner list\n// (https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-inner-list),\n// without the top-most parameter of the inner list. For example, given the\n// inner list `(a;b c;d);e`, the bare inner list would be `(a;b c;d)`.\n//\n// Given an HTTP SFV string that represents a bare inner list, it will call the\n// given function using each of the bare item and parameter within the bare\n// inner list. This allows the caller to extract information out of the bare\n// inner list.\n//\n// This function will return once it encounters the end of the bare inner list,\n// or something that is not a bare inner list. If it cannot consume the entire\n// given string, the ok value returned will be false.\nfunc ParseBareInnerList(s string, f func(bareItem, param string)) (ok bool) {\n\t_, rest, ok := consumeBareInnerList(s, f)\n\treturn rest == \"\" && ok\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-item.\nfunc consumeItem(s string, f func(bareItem, param string)) (consumed, rest string, ok bool) {\n\tvar bareItem, param string\n\tif bareItem, rest, ok = consumeBareItem(s); !ok {\n\t\treturn \"\", s, ok\n\t}\n\tif param, rest, ok = consumeParameter(rest, nil); !ok {\n\t\treturn \"\", s, ok\n\t}\n\tif f != nil {\n\t\tf(bareItem, param)\n\t}\n\treturn s[:len(s)-len(rest)], rest, true\n}\n\n// ParseItem parses an item from a given HTTP Structured Field Values.\n//\n// Given an HTTP SFV string that represents an item, it will call the given\n// function once, with the bare item and the parameter of the item. This allows\n// the caller to extract information out of the item.\n//\n// This function will return once it encounters the end of the string, or\n// something that is not an item. If it cannot consume the entire given\n// string, the ok value returned will be false.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-item.\nfunc ParseItem(s string, f func(bareItem, param string)) (ok bool) {\n\t_, rest, ok := consumeItem(s, f)\n\treturn rest == \"\" && ok\n}\n\n// ParseDictionary parses a dictionary from a given HTTP Structured Field\n// Values.\n//\n// Given an HTTP SFV string that represents a dictionary, it will call the\n// given function using each of the keys, values, and parameters contained in\n// the dictionary. This allows the caller to extract information out of the\n// dictionary.\n//\n// This function will return once it encounters the end of the string, or\n// something that is not a dictionary. If it cannot consume the entire given\n// string, the ok value returned will be false.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-dictionary.\nfunc ParseDictionary(s string, f func(key, val, param string)) (ok bool) {\n\tfor len(s) != 0 {\n\t\tvar key, val, param string\n\t\tval = \"?1\" // Default value for empty val is boolean true.\n\t\tif key, s, ok = consumeKey(s); !ok {\n\t\t\treturn ok\n\t\t}\n\t\tif len(s) != 0 && s[0] == '=' {\n\t\t\ts = s[1:]\n\t\t\tif len(s) != 0 && s[0] == '(' {\n\t\t\t\tif val, s, ok = consumeBareInnerList(s, nil); !ok {\n\t\t\t\t\treturn ok\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif val, s, ok = consumeBareItem(s); !ok {\n\t\t\t\t\treturn ok\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif param, s, ok = consumeParameter(s, nil); !ok {\n\t\t\treturn ok\n\t\t}\n\t\tif f != nil {\n\t\t\tf(key, val, param)\n\t\t}\n\t\ts = s[countLeftWhitespace(s):]\n\t\tif len(s) == 0 {\n\t\t\tbreak\n\t\t}\n\t\tif s[0] == ',' {\n\t\t\ts = s[1:]\n\t\t}\n\t\ts = s[countLeftWhitespace(s):]\n\t\tif len(s) == 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#parse-param.\nfunc consumeParameter(s string, f func(key, val string)) (consumed, rest string, ok bool) {\n\trest = s\n\tfor len(rest) != 0 {\n\t\tvar key, val string\n\t\tval = \"?1\" // Default value for empty val is boolean true.\n\t\tif rest[0] != ';' {\n\t\t\tbreak\n\t\t}\n\t\trest = rest[1:]\n\t\trest = rest[countLeftWhitespace(rest):]\n\t\tkey, rest, ok = consumeKey(rest)\n\t\tif !ok {\n\t\t\treturn \"\", s, ok\n\t\t}\n\t\tif len(rest) != 0 && rest[0] == '=' {\n\t\t\trest = rest[1:]\n\t\t\tval, rest, ok = consumeBareItem(rest)\n\t\t\tif !ok {\n\t\t\t\treturn \"\", s, ok\n\t\t\t}\n\t\t}\n\t\tif f != nil {\n\t\t\tf(key, val)\n\t\t}\n\t}\n\treturn s[:len(s)-len(rest)], rest, true\n}\n\n// ParseParameter parses a parameter from a given HTTP Structured Field Values.\n//\n// Given an HTTP SFV string that represents a parameter, it will call the given\n// function using each of the keys and values contained in the parameter. This\n// allows the caller to extract information out of the parameter.\n//\n// This function will return once it encounters the end of the string, or\n// something that is not a parameter. If it cannot consume the entire given\n// string, the ok value returned will be false.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#parse-param.\nfunc ParseParameter(s string, f func(key, val string)) (ok bool) {\n\t_, rest, ok := consumeParameter(s, f)\n\treturn rest == \"\" && ok\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-key.\nfunc consumeKey(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || (!isLCAlpha(s[0]) && s[0] != '*') {\n\t\treturn \"\", s, false\n\t}\n\ti := 0\n\tfor _, ch := range []byte(s) {\n\t\tif !isLCAlpha(ch) && !isDigit(ch) && !slices.Contains([]byte(\"_-.*\"), ch) {\n\t\t\tbreak\n\t\t}\n\t\ti++\n\t}\n\treturn s[:i], s[i:], true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-integer-or-decim.\nfunc consumeIntegerOrDecimal(s string) (consumed, rest string, ok bool) {\n\tvar i, signOffset, periodIndex int\n\tvar isDecimal bool\n\tif i < len(s) && s[i] == '-' {\n\t\ti++\n\t\tsignOffset++\n\t}\n\tif i >= len(s) {\n\t\treturn \"\", s, false\n\t}\n\tif !isDigit(s[i]) {\n\t\treturn \"\", s, false\n\t}\n\tfor i < len(s) {\n\t\tch := s[i]\n\t\tif isDigit(ch) {\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\tif !isDecimal && ch == '.' {\n\t\t\tif i-signOffset > 12 {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\t\tperiodIndex = i\n\t\t\tisDecimal = true\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\tif !isDecimal && i-signOffset > 15 {\n\t\treturn \"\", s, false\n\t}\n\tif isDecimal {\n\t\tif i-signOffset > 16 {\n\t\t\treturn \"\", s, false\n\t\t}\n\t\tif s[i-1] == '.' {\n\t\t\treturn \"\", s, false\n\t\t}\n\t\tif i-periodIndex-1 > 3 {\n\t\t\treturn \"\", s, false\n\t\t}\n\t}\n\treturn s[:i], s[i:], true\n}\n\n// ParseInteger parses an integer from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid integer. It returns the\n// parsed integer and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-integer-or-decim.\nfunc ParseInteger(s string) (parsed int64, ok bool) {\n\tif _, rest, ok := consumeIntegerOrDecimal(s); !ok || rest != \"\" {\n\t\treturn 0, false\n\t}\n\tif n, err := strconv.ParseInt(s, 10, 64); err == nil {\n\t\treturn n, true\n\t}\n\treturn 0, false\n}\n\n// ParseDecimal parses a decimal from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid decimal. It returns the\n// parsed decimal and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-an-integer-or-decim.\nfunc ParseDecimal(s string) (parsed float64, ok bool) {\n\tif _, rest, ok := consumeIntegerOrDecimal(s); !ok || rest != \"\" {\n\t\treturn 0, false\n\t}\n\tif !strings.Contains(s, \".\") {\n\t\treturn 0, false\n\t}\n\tif n, err := strconv.ParseFloat(s, 64); err == nil {\n\t\treturn n, true\n\t}\n\treturn 0, false\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-string.\nfunc consumeString(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || s[0] != '\"' {\n\t\treturn \"\", s, false\n\t}\n\tfor i := 1; i < len(s); i++ {\n\t\tswitch ch := s[i]; ch {\n\t\tcase '\\\\':\n\t\t\tif i+1 >= len(s) {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\t\ti++\n\t\t\tif ch = s[i]; ch != '\"' && ch != '\\\\' {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\tcase '\"':\n\t\t\treturn s[:i+1], s[i+1:], true\n\t\tdefault:\n\t\t\tif !isVChar(ch) && !isSP(ch) {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\", s, false\n}\n\n// ParseString parses a Go string from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid string. It returns the\n// parsed string and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-string.\nfunc ParseString(s string) (parsed string, ok bool) {\n\tif _, rest, ok := consumeString(s); !ok || rest != \"\" {\n\t\treturn \"\", false\n\t}\n\treturn s[1 : len(s)-1], true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-token\nfunc consumeToken(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || (!isAlpha(s[0]) && s[0] != '*') {\n\t\treturn \"\", s, false\n\t}\n\ti := 0\n\tfor _, ch := range []byte(s) {\n\t\tif !isTChar(ch) && !slices.Contains([]byte(\":/\"), ch) {\n\t\t\tbreak\n\t\t}\n\t\ti++\n\t}\n\treturn s[:i], s[i:], true\n}\n\n// ParseToken parses a token from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid token. It returns the\n// parsed token and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-token\nfunc ParseToken(s string) (parsed string, ok bool) {\n\tif _, rest, ok := consumeToken(s); !ok || rest != \"\" {\n\t\treturn \"\", false\n\t}\n\treturn s, true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-byte-sequence.\nfunc consumeByteSequence(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || s[0] != ':' {\n\t\treturn \"\", s, false\n\t}\n\tfor i := 1; i < len(s); i++ {\n\t\tif ch := s[i]; ch == ':' {\n\t\t\treturn s[:i+1], s[i+1:], true\n\t\t}\n\t\tif ch := s[i]; !isAlpha(ch) && !isDigit(ch) && !slices.Contains([]byte(\"+/=\"), ch) {\n\t\t\treturn \"\", s, false\n\t\t}\n\t}\n\treturn \"\", s, false\n}\n\n// ParseByteSequence parses a byte sequence from a given HTTP Structured Field\n// Values.\n//\n// The entire HTTP SFV string must consist of a valid byte sequence. It returns\n// the parsed byte sequence and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-byte-sequence.\nfunc ParseByteSequence(s string) (parsed []byte, ok bool) {\n\tif _, rest, ok := consumeByteSequence(s); !ok || rest != \"\" {\n\t\treturn nil, false\n\t}\n\treturn []byte(s[1 : len(s)-1]), true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-boolean.\nfunc consumeBoolean(s string) (consumed, rest string, ok bool) {\n\tif len(s) >= 2 && (s[:2] == \"?0\" || s[:2] == \"?1\") {\n\t\treturn s[:2], s[2:], true\n\t}\n\treturn \"\", s, false\n}\n\n// ParseBoolean parses a boolean from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid boolean. It returns the\n// parsed boolean and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-boolean.\nfunc ParseBoolean(s string) (parsed bool, ok bool) {\n\tif _, rest, ok := consumeBoolean(s); !ok || rest != \"\" {\n\t\treturn false, false\n\t}\n\treturn s == \"?1\", true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-date.\nfunc consumeDate(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 || s[0] != '@' {\n\t\treturn \"\", s, false\n\t}\n\tif _, rest, ok = consumeIntegerOrDecimal(s[1:]); !ok {\n\t\treturn \"\", s, ok\n\t}\n\tconsumed = s[:len(s)-len(rest)]\n\tif slices.Contains([]byte(consumed), '.') {\n\t\treturn \"\", s, false\n\t}\n\treturn consumed, rest, ok\n}\n\n// ParseDate parses a date from a given HTTP Structured Field Values.\n//\n// The entire HTTP SFV string must consist of a valid date. It returns the\n// parsed date and an ok boolean value, indicating success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-date.\nfunc ParseDate(s string) (parsed time.Time, ok bool) {\n\tif _, rest, ok := consumeDate(s); !ok || rest != \"\" {\n\t\treturn time.Time{}, false\n\t}\n\tif n, ok := ParseInteger(s[1:]); !ok {\n\t\treturn time.Time{}, false\n\t} else {\n\t\treturn time.Unix(n, 0), true\n\t}\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-display-string.\nfunc consumeDisplayString(s string) (consumed, rest string, ok bool) {\n\t// To prevent excessive allocation, especially when input is large, we\n\t// maintain a buffer of 4 bytes to keep track of the last rune we\n\t// encounter. This way, we can validate that the display string conforms to\n\t// UTF-8 without actually building the whole string.\n\tvar lastRune [4]byte\n\tvar runeLen int\n\tisPartOfValidRune := func(ch byte) bool {\n\t\tlastRune[runeLen] = ch\n\t\truneLen++\n\t\tif utf8.FullRune(lastRune[:runeLen]) {\n\t\t\tr, s := utf8.DecodeRune(lastRune[:runeLen])\n\t\t\tif r == utf8.RuneError {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tcopy(lastRune[:], lastRune[s:runeLen])\n\t\t\truneLen -= s\n\t\t\treturn true\n\t\t}\n\t\treturn runeLen <= 4\n\t}\n\n\tif len(s) <= 1 || s[:2] != `%\"` {\n\t\treturn \"\", s, false\n\t}\n\ti := 2\n\tfor i < len(s) {\n\t\tch := s[i]\n\t\tif !isVChar(ch) && !isSP(ch) {\n\t\t\treturn \"\", s, false\n\t\t}\n\t\tswitch ch {\n\t\tcase '\"':\n\t\t\tif runeLen > 0 {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\t\treturn s[:i+1], s[i+1:], true\n\t\tcase '%':\n\t\t\tif i+2 >= len(s) {\n\t\t\t\treturn \"\", s, false\n\t\t\t}\n\t\t\tif ch, ok = decOctetHex(s[i+1], s[i+2]); !ok {\n\t\t\t\treturn \"\", s, ok\n\t\t\t}\n\t\t\tif ok = isPartOfValidRune(ch); !ok {\n\t\t\t\treturn \"\", s, ok\n\t\t\t}\n\t\t\ti += 3\n\t\tdefault:\n\t\t\tif ok = isPartOfValidRune(ch); !ok {\n\t\t\t\treturn \"\", s, ok\n\t\t\t}\n\t\t\ti++\n\t\t}\n\t}\n\treturn \"\", s, false\n}\n\n// ParseDisplayString parses a display string from a given HTTP Structured\n// Field Values.\n//\n// The entire HTTP SFV string must consist of a valid display string. It\n// returns the parsed display string and an ok boolean value, indicating\n// success or not.\n//\n// https://www.rfc-editor.org/rfc/rfc9651.html#name-parsing-a-display-string.\nfunc ParseDisplayString(s string) (parsed string, ok bool) {\n\tif _, rest, ok := consumeDisplayString(s); !ok || rest != \"\" {\n\t\treturn \"\", false\n\t}\n\t// consumeDisplayString() already validates that we have a valid display\n\t// string. Therefore, we can just construct the display string, without\n\t// validating it again.\n\ts = s[2 : len(s)-1]\n\tvar b strings.Builder\n\tfor i := 0; i < len(s); {\n\t\tif s[i] == '%' {\n\t\t\tdecoded, _ := decOctetHex(s[i+1], s[i+2])\n\t\t\tb.WriteByte(decoded)\n\t\t\ti += 3\n\t\t\tcontinue\n\t\t}\n\t\tb.WriteByte(s[i])\n\t\ti++\n\t}\n\treturn b.String(), true\n}\n\n// https://www.rfc-editor.org/rfc/rfc9651.html#parse-bare-item.\nfunc consumeBareItem(s string) (consumed, rest string, ok bool) {\n\tif len(s) == 0 {\n\t\treturn \"\", s, false\n\t}\n\tch := s[0]\n\tswitch {\n\tcase ch == '-' || isDigit(ch):\n\t\treturn consumeIntegerOrDecimal(s)\n\tcase ch == '\"':\n\t\treturn consumeString(s)\n\tcase ch == '*' || isAlpha(ch):\n\t\treturn consumeToken(s)\n\tcase ch == ':':\n\t\treturn consumeByteSequence(s)\n\tcase ch == '?':\n\t\treturn consumeBoolean(s)\n\tcase ch == '@':\n\t\treturn consumeDate(s)\n\tcase ch == '%':\n\t\treturn consumeDisplayString(s)\n\tdefault:\n\t\treturn \"\", s, false\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/internal/timeseries/timeseries.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package timeseries implements a time series structure for stats collection.\npackage timeseries // import \"golang.org/x/net/internal/timeseries\"\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n)\n\nconst (\n\ttimeSeriesNumBuckets       = 64\n\tminuteHourSeriesNumBuckets = 60\n)\n\nvar timeSeriesResolutions = []time.Duration{\n\t1 * time.Second,\n\t10 * time.Second,\n\t1 * time.Minute,\n\t10 * time.Minute,\n\t1 * time.Hour,\n\t6 * time.Hour,\n\t24 * time.Hour,          // 1 day\n\t7 * 24 * time.Hour,      // 1 week\n\t4 * 7 * 24 * time.Hour,  // 4 weeks\n\t16 * 7 * 24 * time.Hour, // 16 weeks\n}\n\nvar minuteHourSeriesResolutions = []time.Duration{\n\t1 * time.Second,\n\t1 * time.Minute,\n}\n\n// An Observable is a kind of data that can be aggregated in a time series.\ntype Observable interface {\n\tMultiply(ratio float64)    // Multiplies the data in self by a given ratio\n\tAdd(other Observable)      // Adds the data from a different observation to self\n\tClear()                    // Clears the observation so it can be reused.\n\tCopyFrom(other Observable) // Copies the contents of a given observation to self\n}\n\n// Float attaches the methods of Observable to a float64.\ntype Float float64\n\n// NewFloat returns a Float.\nfunc NewFloat() Observable {\n\tf := Float(0)\n\treturn &f\n}\n\n// String returns the float as a string.\nfunc (f *Float) String() string { return fmt.Sprintf(\"%g\", f.Value()) }\n\n// Value returns the float's value.\nfunc (f *Float) Value() float64 { return float64(*f) }\n\nfunc (f *Float) Multiply(ratio float64) { *f *= Float(ratio) }\n\nfunc (f *Float) Add(other Observable) {\n\to := other.(*Float)\n\t*f += *o\n}\n\nfunc (f *Float) Clear() { *f = 0 }\n\nfunc (f *Float) CopyFrom(other Observable) {\n\to := other.(*Float)\n\t*f = *o\n}\n\n// A Clock tells the current time.\ntype Clock interface {\n\tTime() time.Time\n}\n\ntype defaultClock int\n\nvar defaultClockInstance defaultClock\n\nfunc (defaultClock) Time() time.Time { return time.Now() }\n\n// Information kept per level. Each level consists of a circular list of\n// observations. The start of the level may be derived from end and the\n// len(buckets) * sizeInMillis.\ntype tsLevel struct {\n\toldest   int               // index to oldest bucketed Observable\n\tnewest   int               // index to newest bucketed Observable\n\tend      time.Time         // end timestamp for this level\n\tsize     time.Duration     // duration of the bucketed Observable\n\tbuckets  []Observable      // collections of observations\n\tprovider func() Observable // used for creating new Observable\n}\n\nfunc (l *tsLevel) Clear() {\n\tl.oldest = 0\n\tl.newest = len(l.buckets) - 1\n\tl.end = time.Time{}\n\tfor i := range l.buckets {\n\t\tif l.buckets[i] != nil {\n\t\t\tl.buckets[i].Clear()\n\t\t\tl.buckets[i] = nil\n\t\t}\n\t}\n}\n\nfunc (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) {\n\tl.size = size\n\tl.provider = f\n\tl.buckets = make([]Observable, numBuckets)\n}\n\n// Keeps a sequence of levels. Each level is responsible for storing data at\n// a given resolution. For example, the first level stores data at a one\n// minute resolution while the second level stores data at a one hour\n// resolution.\n\n// Each level is represented by a sequence of buckets. Each bucket spans an\n// interval equal to the resolution of the level. New observations are added\n// to the last bucket.\ntype timeSeries struct {\n\tprovider    func() Observable // make more Observable\n\tnumBuckets  int               // number of buckets in each level\n\tlevels      []*tsLevel        // levels of bucketed Observable\n\tlastAdd     time.Time         // time of last Observable tracked\n\ttotal       Observable        // convenient aggregation of all Observable\n\tclock       Clock             // Clock for getting current time\n\tpending     Observable        // observations not yet bucketed\n\tpendingTime time.Time         // what time are we keeping in pending\n\tdirty       bool              // if there are pending observations\n}\n\n// init initializes a level according to the supplied criteria.\nfunc (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) {\n\tts.provider = f\n\tts.numBuckets = numBuckets\n\tts.clock = clock\n\tts.levels = make([]*tsLevel, len(resolutions))\n\n\tfor i := range resolutions {\n\t\tif i > 0 && resolutions[i-1] >= resolutions[i] {\n\t\t\tlog.Print(\"timeseries: resolutions must be monotonically increasing\")\n\t\t\tbreak\n\t\t}\n\t\tnewLevel := new(tsLevel)\n\t\tnewLevel.InitLevel(resolutions[i], ts.numBuckets, ts.provider)\n\t\tts.levels[i] = newLevel\n\t}\n\n\tts.Clear()\n}\n\n// Clear removes all observations from the time series.\nfunc (ts *timeSeries) Clear() {\n\tts.lastAdd = time.Time{}\n\tts.total = ts.resetObservation(ts.total)\n\tts.pending = ts.resetObservation(ts.pending)\n\tts.pendingTime = time.Time{}\n\tts.dirty = false\n\n\tfor i := range ts.levels {\n\t\tts.levels[i].Clear()\n\t}\n}\n\n// Add records an observation at the current time.\nfunc (ts *timeSeries) Add(observation Observable) {\n\tts.AddWithTime(observation, ts.clock.Time())\n}\n\n// AddWithTime records an observation at the specified time.\nfunc (ts *timeSeries) AddWithTime(observation Observable, t time.Time) {\n\n\tsmallBucketDuration := ts.levels[0].size\n\n\tif t.After(ts.lastAdd) {\n\t\tts.lastAdd = t\n\t}\n\n\tif t.After(ts.pendingTime) {\n\t\tts.advance(t)\n\t\tts.mergePendingUpdates()\n\t\tts.pendingTime = ts.levels[0].end\n\t\tts.pending.CopyFrom(observation)\n\t\tts.dirty = true\n\t} else if t.After(ts.pendingTime.Add(-1 * smallBucketDuration)) {\n\t\t// The observation is close enough to go into the pending bucket.\n\t\t// This compensates for clock skewing and small scheduling delays\n\t\t// by letting the update stay in the fast path.\n\t\tts.pending.Add(observation)\n\t\tts.dirty = true\n\t} else {\n\t\tts.mergeValue(observation, t)\n\t}\n}\n\n// mergeValue inserts the observation at the specified time in the past into all levels.\nfunc (ts *timeSeries) mergeValue(observation Observable, t time.Time) {\n\tfor _, level := range ts.levels {\n\t\tindex := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size)\n\t\tif 0 <= index && index < ts.numBuckets {\n\t\t\tbucketNumber := (level.oldest + index) % ts.numBuckets\n\t\t\tif level.buckets[bucketNumber] == nil {\n\t\t\t\tlevel.buckets[bucketNumber] = level.provider()\n\t\t\t}\n\t\t\tlevel.buckets[bucketNumber].Add(observation)\n\t\t}\n\t}\n\tts.total.Add(observation)\n}\n\n// mergePendingUpdates applies the pending updates into all levels.\nfunc (ts *timeSeries) mergePendingUpdates() {\n\tif ts.dirty {\n\t\tts.mergeValue(ts.pending, ts.pendingTime)\n\t\tts.pending = ts.resetObservation(ts.pending)\n\t\tts.dirty = false\n\t}\n}\n\n// advance cycles the buckets at each level until the latest bucket in\n// each level can hold the time specified.\nfunc (ts *timeSeries) advance(t time.Time) {\n\tif !t.After(ts.levels[0].end) {\n\t\treturn\n\t}\n\tfor i := 0; i < len(ts.levels); i++ {\n\t\tlevel := ts.levels[i]\n\t\tif !level.end.Before(t) {\n\t\t\tbreak\n\t\t}\n\n\t\t// If the time is sufficiently far, just clear the level and advance\n\t\t// directly.\n\t\tif !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) {\n\t\t\tfor _, b := range level.buckets {\n\t\t\t\tts.resetObservation(b)\n\t\t\t}\n\t\t\tlevel.end = time.Unix(0, (t.UnixNano()/level.size.Nanoseconds())*level.size.Nanoseconds())\n\t\t}\n\n\t\tfor t.After(level.end) {\n\t\t\tlevel.end = level.end.Add(level.size)\n\t\t\tlevel.newest = level.oldest\n\t\t\tlevel.oldest = (level.oldest + 1) % ts.numBuckets\n\t\t\tts.resetObservation(level.buckets[level.newest])\n\t\t}\n\n\t\tt = level.end\n\t}\n}\n\n// Latest returns the sum of the num latest buckets from the level.\nfunc (ts *timeSeries) Latest(level, num int) Observable {\n\tnow := ts.clock.Time()\n\tif ts.levels[0].end.Before(now) {\n\t\tts.advance(now)\n\t}\n\n\tts.mergePendingUpdates()\n\n\tresult := ts.provider()\n\tl := ts.levels[level]\n\tindex := l.newest\n\n\tfor i := 0; i < num; i++ {\n\t\tif l.buckets[index] != nil {\n\t\t\tresult.Add(l.buckets[index])\n\t\t}\n\t\tif index == 0 {\n\t\t\tindex = ts.numBuckets\n\t\t}\n\t\tindex--\n\t}\n\n\treturn result\n}\n\n// LatestBuckets returns a copy of the num latest buckets from level.\nfunc (ts *timeSeries) LatestBuckets(level, num int) []Observable {\n\tif level < 0 || level > len(ts.levels) {\n\t\tlog.Print(\"timeseries: bad level argument: \", level)\n\t\treturn nil\n\t}\n\tif num < 0 || num >= ts.numBuckets {\n\t\tlog.Print(\"timeseries: bad num argument: \", num)\n\t\treturn nil\n\t}\n\n\tresults := make([]Observable, num)\n\tnow := ts.clock.Time()\n\tif ts.levels[0].end.Before(now) {\n\t\tts.advance(now)\n\t}\n\n\tts.mergePendingUpdates()\n\n\tl := ts.levels[level]\n\tindex := l.newest\n\n\tfor i := 0; i < num; i++ {\n\t\tresult := ts.provider()\n\t\tresults[i] = result\n\t\tif l.buckets[index] != nil {\n\t\t\tresult.CopyFrom(l.buckets[index])\n\t\t}\n\n\t\tif index == 0 {\n\t\t\tindex = ts.numBuckets\n\t\t}\n\t\tindex -= 1\n\t}\n\treturn results\n}\n\n// ScaleBy updates observations by scaling by factor.\nfunc (ts *timeSeries) ScaleBy(factor float64) {\n\tfor _, l := range ts.levels {\n\t\tfor i := 0; i < ts.numBuckets; i++ {\n\t\t\tl.buckets[i].Multiply(factor)\n\t\t}\n\t}\n\n\tts.total.Multiply(factor)\n\tts.pending.Multiply(factor)\n}\n\n// Range returns the sum of observations added over the specified time range.\n// If start or finish times don't fall on bucket boundaries of the same\n// level, then return values are approximate answers.\nfunc (ts *timeSeries) Range(start, finish time.Time) Observable {\n\treturn ts.ComputeRange(start, finish, 1)[0]\n}\n\n// Recent returns the sum of observations from the last delta.\nfunc (ts *timeSeries) Recent(delta time.Duration) Observable {\n\tnow := ts.clock.Time()\n\treturn ts.Range(now.Add(-delta), now)\n}\n\n// Total returns the total of all observations.\nfunc (ts *timeSeries) Total() Observable {\n\tts.mergePendingUpdates()\n\treturn ts.total\n}\n\n// ComputeRange computes a specified number of values into a slice using\n// the observations recorded over the specified time period. The return\n// values are approximate if the start or finish times don't fall on the\n// bucket boundaries at the same level or if the number of buckets spanning\n// the range is not an integral multiple of num.\nfunc (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable {\n\tif start.After(finish) {\n\t\tlog.Printf(\"timeseries: start > finish, %v>%v\", start, finish)\n\t\treturn nil\n\t}\n\n\tif num < 0 {\n\t\tlog.Printf(\"timeseries: num < 0, %v\", num)\n\t\treturn nil\n\t}\n\n\tresults := make([]Observable, num)\n\n\tfor _, l := range ts.levels {\n\t\tif !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) {\n\t\t\tts.extract(l, start, finish, num, results)\n\t\t\treturn results\n\t\t}\n\t}\n\n\t// Failed to find a level that covers the desired range. So just\n\t// extract from the last level, even if it doesn't cover the entire\n\t// desired range.\n\tts.extract(ts.levels[len(ts.levels)-1], start, finish, num, results)\n\n\treturn results\n}\n\n// RecentList returns the specified number of values in slice over the most\n// recent time period of the specified range.\nfunc (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable {\n\tif delta < 0 {\n\t\treturn nil\n\t}\n\tnow := ts.clock.Time()\n\treturn ts.ComputeRange(now.Add(-delta), now, num)\n}\n\n// extract returns a slice of specified number of observations from a given\n// level over a given range.\nfunc (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) {\n\tts.mergePendingUpdates()\n\n\tsrcInterval := l.size\n\tdstInterval := finish.Sub(start) / time.Duration(num)\n\tdstStart := start\n\tsrcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets))\n\n\tsrcIndex := 0\n\n\t// Where should scanning start?\n\tif dstStart.After(srcStart) {\n\t\tadvance := int(dstStart.Sub(srcStart) / srcInterval)\n\t\tsrcIndex += advance\n\t\tsrcStart = srcStart.Add(time.Duration(advance) * srcInterval)\n\t}\n\n\t// The i'th value is computed as show below.\n\t// interval = (finish/start)/num\n\t// i'th value = sum of observation in range\n\t//   [ start + i       * interval,\n\t//     start + (i + 1) * interval )\n\tfor i := 0; i < num; i++ {\n\t\tresults[i] = ts.resetObservation(results[i])\n\t\tdstEnd := dstStart.Add(dstInterval)\n\t\tfor srcIndex < ts.numBuckets && srcStart.Before(dstEnd) {\n\t\t\tsrcEnd := srcStart.Add(srcInterval)\n\t\t\tif srcEnd.After(ts.lastAdd) {\n\t\t\t\tsrcEnd = ts.lastAdd\n\t\t\t}\n\n\t\t\tif !srcEnd.Before(dstStart) {\n\t\t\t\tsrcValue := l.buckets[(srcIndex+l.oldest)%ts.numBuckets]\n\t\t\t\tif !srcStart.Before(dstStart) && !srcEnd.After(dstEnd) {\n\t\t\t\t\t// dst completely contains src.\n\t\t\t\t\tif srcValue != nil {\n\t\t\t\t\t\tresults[i].Add(srcValue)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// dst partially overlaps src.\n\t\t\t\t\toverlapStart := maxTime(srcStart, dstStart)\n\t\t\t\t\toverlapEnd := minTime(srcEnd, dstEnd)\n\t\t\t\t\tbase := srcEnd.Sub(srcStart)\n\t\t\t\t\tfraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds()\n\n\t\t\t\t\tused := ts.provider()\n\t\t\t\t\tif srcValue != nil {\n\t\t\t\t\t\tused.CopyFrom(srcValue)\n\t\t\t\t\t}\n\t\t\t\t\tused.Multiply(fraction)\n\t\t\t\t\tresults[i].Add(used)\n\t\t\t\t}\n\n\t\t\t\tif srcEnd.After(dstEnd) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tsrcIndex++\n\t\t\tsrcStart = srcStart.Add(srcInterval)\n\t\t}\n\t\tdstStart = dstStart.Add(dstInterval)\n\t}\n}\n\n// resetObservation clears the content so the struct may be reused.\nfunc (ts *timeSeries) resetObservation(observation Observable) Observable {\n\tif observation == nil {\n\t\tobservation = ts.provider()\n\t} else {\n\t\tobservation.Clear()\n\t}\n\treturn observation\n}\n\n// TimeSeries tracks data at granularities from 1 second to 16 weeks.\ntype TimeSeries struct {\n\ttimeSeries\n}\n\n// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable.\nfunc NewTimeSeries(f func() Observable) *TimeSeries {\n\treturn NewTimeSeriesWithClock(f, defaultClockInstance)\n}\n\n// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for\n// assigning timestamps.\nfunc NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries {\n\tts := new(TimeSeries)\n\tts.timeSeries.init(timeSeriesResolutions, f, timeSeriesNumBuckets, clock)\n\treturn ts\n}\n\n// MinuteHourSeries tracks data at granularities of 1 minute and 1 hour.\ntype MinuteHourSeries struct {\n\ttimeSeries\n}\n\n// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable.\nfunc NewMinuteHourSeries(f func() Observable) *MinuteHourSeries {\n\treturn NewMinuteHourSeriesWithClock(f, defaultClockInstance)\n}\n\n// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for\n// assigning timestamps.\nfunc NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries {\n\tts := new(MinuteHourSeries)\n\tts.timeSeries.init(minuteHourSeriesResolutions, f,\n\t\tminuteHourSeriesNumBuckets, clock)\n\treturn ts\n}\n\nfunc (ts *MinuteHourSeries) Minute() Observable {\n\treturn ts.timeSeries.Latest(0, 60)\n}\n\nfunc (ts *MinuteHourSeries) Hour() Observable {\n\treturn ts.timeSeries.Latest(1, 60)\n}\n\nfunc minTime(a, b time.Time) time.Time {\n\tif a.Before(b) {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc maxTime(a, b time.Time) time.Time {\n\tif a.After(b) {\n\t\treturn a\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/trace/events.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage trace\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"text/tabwriter\"\n\t\"time\"\n)\n\nconst maxEventsPerLog = 100\n\ntype bucket struct {\n\tMaxErrAge time.Duration\n\tString    string\n}\n\nvar buckets = []bucket{\n\t{0, \"total\"},\n\t{10 * time.Second, \"errs<10s\"},\n\t{1 * time.Minute, \"errs<1m\"},\n\t{10 * time.Minute, \"errs<10m\"},\n\t{1 * time.Hour, \"errs<1h\"},\n\t{10 * time.Hour, \"errs<10h\"},\n\t{24000 * time.Hour, \"errors\"},\n}\n\n// RenderEvents renders the HTML page typically served at /debug/events.\n// It does not do any auth checking. The request may be nil.\n//\n// Most users will use the Events handler.\nfunc RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) {\n\tnow := time.Now()\n\tdata := &struct {\n\t\tFamilies []string // family names\n\t\tBuckets  []bucket\n\t\tCounts   [][]int // eventLog count per family/bucket\n\n\t\t// Set when a bucket has been selected.\n\t\tFamily    string\n\t\tBucket    int\n\t\tEventLogs eventLogs\n\t\tExpanded  bool\n\t}{\n\t\tBuckets: buckets,\n\t}\n\n\tfamMu.RLock()\n\tdata.Families = make([]string, 0, len(families))\n\tfor name := range families {\n\t\tdata.Families = append(data.Families, name)\n\t}\n\tfamMu.RUnlock()\n\tsort.Strings(data.Families)\n\n\t// Count the number of eventLogs in each family for each error age.\n\tdata.Counts = make([][]int, len(data.Families))\n\tfor i, name := range data.Families {\n\t\t// TODO(sameer): move this loop under the family lock.\n\t\tf := getEventFamily(name)\n\t\tdata.Counts[i] = make([]int, len(data.Buckets))\n\t\tfor j, b := range data.Buckets {\n\t\t\tdata.Counts[i][j] = f.Count(now, b.MaxErrAge)\n\t\t}\n\t}\n\n\tif req != nil {\n\t\tvar ok bool\n\t\tdata.Family, data.Bucket, ok = parseEventsArgs(req)\n\t\tif !ok {\n\t\t\t// No-op\n\t\t} else {\n\t\t\tdata.EventLogs = getEventFamily(data.Family).Copy(now, buckets[data.Bucket].MaxErrAge)\n\t\t}\n\t\tif data.EventLogs != nil {\n\t\t\tdefer data.EventLogs.Free()\n\t\t\tsort.Sort(data.EventLogs)\n\t\t}\n\t\tif exp, err := strconv.ParseBool(req.FormValue(\"exp\")); err == nil {\n\t\t\tdata.Expanded = exp\n\t\t}\n\t}\n\n\tfamMu.RLock()\n\tdefer famMu.RUnlock()\n\tif err := eventsTmpl().Execute(w, data); err != nil {\n\t\tlog.Printf(\"net/trace: Failed executing template: %v\", err)\n\t}\n}\n\nfunc parseEventsArgs(req *http.Request) (fam string, b int, ok bool) {\n\tfam, bStr := req.FormValue(\"fam\"), req.FormValue(\"b\")\n\tif fam == \"\" || bStr == \"\" {\n\t\treturn \"\", 0, false\n\t}\n\tb, err := strconv.Atoi(bStr)\n\tif err != nil || b < 0 || b >= len(buckets) {\n\t\treturn \"\", 0, false\n\t}\n\treturn fam, b, true\n}\n\n// An EventLog provides a log of events associated with a specific object.\ntype EventLog interface {\n\t// Printf formats its arguments with fmt.Sprintf and adds the\n\t// result to the event log.\n\tPrintf(format string, a ...interface{})\n\n\t// Errorf is like Printf, but it marks this event as an error.\n\tErrorf(format string, a ...interface{})\n\n\t// Finish declares that this event log is complete.\n\t// The event log should not be used after calling this method.\n\tFinish()\n}\n\n// NewEventLog returns a new EventLog with the specified family name\n// and title.\nfunc NewEventLog(family, title string) EventLog {\n\tel := newEventLog()\n\tel.ref()\n\tel.Family, el.Title = family, title\n\tel.Start = time.Now()\n\tel.events = make([]logEntry, 0, maxEventsPerLog)\n\tel.stack = make([]uintptr, 32)\n\tn := runtime.Callers(2, el.stack)\n\tel.stack = el.stack[:n]\n\n\tgetEventFamily(family).add(el)\n\treturn el\n}\n\nfunc (el *eventLog) Finish() {\n\tgetEventFamily(el.Family).remove(el)\n\tel.unref() // matches ref in New\n}\n\nvar (\n\tfamMu    sync.RWMutex\n\tfamilies = make(map[string]*eventFamily) // family name => family\n)\n\nfunc getEventFamily(fam string) *eventFamily {\n\tfamMu.Lock()\n\tdefer famMu.Unlock()\n\tf := families[fam]\n\tif f == nil {\n\t\tf = &eventFamily{}\n\t\tfamilies[fam] = f\n\t}\n\treturn f\n}\n\ntype eventFamily struct {\n\tmu        sync.RWMutex\n\teventLogs eventLogs\n}\n\nfunc (f *eventFamily) add(el *eventLog) {\n\tf.mu.Lock()\n\tf.eventLogs = append(f.eventLogs, el)\n\tf.mu.Unlock()\n}\n\nfunc (f *eventFamily) remove(el *eventLog) {\n\tf.mu.Lock()\n\tdefer f.mu.Unlock()\n\tfor i, el0 := range f.eventLogs {\n\t\tif el == el0 {\n\t\t\tcopy(f.eventLogs[i:], f.eventLogs[i+1:])\n\t\t\tf.eventLogs = f.eventLogs[:len(f.eventLogs)-1]\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) {\n\tf.mu.RLock()\n\tdefer f.mu.RUnlock()\n\tfor _, el := range f.eventLogs {\n\t\tif el.hasRecentError(now, maxErrAge) {\n\t\t\tn++\n\t\t}\n\t}\n\treturn\n}\n\nfunc (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) {\n\tf.mu.RLock()\n\tdefer f.mu.RUnlock()\n\tels = make(eventLogs, 0, len(f.eventLogs))\n\tfor _, el := range f.eventLogs {\n\t\tif el.hasRecentError(now, maxErrAge) {\n\t\t\tel.ref()\n\t\t\tels = append(els, el)\n\t\t}\n\t}\n\treturn\n}\n\ntype eventLogs []*eventLog\n\n// Free calls unref on each element of the list.\nfunc (els eventLogs) Free() {\n\tfor _, el := range els {\n\t\tel.unref()\n\t}\n}\n\n// eventLogs may be sorted in reverse chronological order.\nfunc (els eventLogs) Len() int           { return len(els) }\nfunc (els eventLogs) Less(i, j int) bool { return els[i].Start.After(els[j].Start) }\nfunc (els eventLogs) Swap(i, j int)      { els[i], els[j] = els[j], els[i] }\n\n// A logEntry is a timestamped log entry in an event log.\ntype logEntry struct {\n\tWhen    time.Time\n\tElapsed time.Duration // since previous event in log\n\tNewDay  bool          // whether this event is on a different day to the previous event\n\tWhat    string\n\tIsErr   bool\n}\n\n// WhenString returns a string representation of the elapsed time of the event.\n// It will include the date if midnight was crossed.\nfunc (e logEntry) WhenString() string {\n\tif e.NewDay {\n\t\treturn e.When.Format(\"2006/01/02 15:04:05.000000\")\n\t}\n\treturn e.When.Format(\"15:04:05.000000\")\n}\n\n// An eventLog represents an active event log.\ntype eventLog struct {\n\t// Family is the top-level grouping of event logs to which this belongs.\n\tFamily string\n\n\t// Title is the title of this event log.\n\tTitle string\n\n\t// Timing information.\n\tStart time.Time\n\n\t// Call stack where this event log was created.\n\tstack []uintptr\n\n\t// Append-only sequence of events.\n\t//\n\t// TODO(sameer): change this to a ring buffer to avoid the array copy\n\t// when we hit maxEventsPerLog.\n\tmu            sync.RWMutex\n\tevents        []logEntry\n\tLastErrorTime time.Time\n\tdiscarded     int\n\n\trefs int32 // how many buckets this is in\n}\n\nfunc (el *eventLog) reset() {\n\t// Clear all but the mutex. Mutexes may not be copied, even when unlocked.\n\tel.Family = \"\"\n\tel.Title = \"\"\n\tel.Start = time.Time{}\n\tel.stack = nil\n\tel.events = nil\n\tel.LastErrorTime = time.Time{}\n\tel.discarded = 0\n\tel.refs = 0\n}\n\nfunc (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool {\n\tif maxErrAge == 0 {\n\t\treturn true\n\t}\n\tel.mu.RLock()\n\tdefer el.mu.RUnlock()\n\treturn now.Sub(el.LastErrorTime) < maxErrAge\n}\n\n// delta returns the elapsed time since the last event or the log start,\n// and whether it spans midnight.\n// L >= el.mu\nfunc (el *eventLog) delta(t time.Time) (time.Duration, bool) {\n\tif len(el.events) == 0 {\n\t\treturn t.Sub(el.Start), false\n\t}\n\tprev := el.events[len(el.events)-1].When\n\treturn t.Sub(prev), prev.Day() != t.Day()\n\n}\n\nfunc (el *eventLog) Printf(format string, a ...interface{}) {\n\tel.printf(false, format, a...)\n}\n\nfunc (el *eventLog) Errorf(format string, a ...interface{}) {\n\tel.printf(true, format, a...)\n}\n\nfunc (el *eventLog) printf(isErr bool, format string, a ...interface{}) {\n\te := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)}\n\tel.mu.Lock()\n\te.Elapsed, e.NewDay = el.delta(e.When)\n\tif len(el.events) < maxEventsPerLog {\n\t\tel.events = append(el.events, e)\n\t} else {\n\t\t// Discard the oldest event.\n\t\tif el.discarded == 0 {\n\t\t\t// el.discarded starts at two to count for the event it\n\t\t\t// is replacing, plus the next one that we are about to\n\t\t\t// drop.\n\t\t\tel.discarded = 2\n\t\t} else {\n\t\t\tel.discarded++\n\t\t}\n\t\t// TODO(sameer): if this causes allocations on a critical path,\n\t\t// change eventLog.What to be a fmt.Stringer, as in trace.go.\n\t\tel.events[0].What = fmt.Sprintf(\"(%d events discarded)\", el.discarded)\n\t\t// The timestamp of the discarded meta-event should be\n\t\t// the time of the last event it is representing.\n\t\tel.events[0].When = el.events[1].When\n\t\tcopy(el.events[1:], el.events[2:])\n\t\tel.events[maxEventsPerLog-1] = e\n\t}\n\tif e.IsErr {\n\t\tel.LastErrorTime = e.When\n\t}\n\tel.mu.Unlock()\n}\n\nfunc (el *eventLog) ref() {\n\tatomic.AddInt32(&el.refs, 1)\n}\n\nfunc (el *eventLog) unref() {\n\tif atomic.AddInt32(&el.refs, -1) == 0 {\n\t\tfreeEventLog(el)\n\t}\n}\n\nfunc (el *eventLog) When() string {\n\treturn el.Start.Format(\"2006/01/02 15:04:05.000000\")\n}\n\nfunc (el *eventLog) ElapsedTime() string {\n\telapsed := time.Since(el.Start)\n\treturn fmt.Sprintf(\"%.6f\", elapsed.Seconds())\n}\n\nfunc (el *eventLog) Stack() string {\n\tbuf := new(bytes.Buffer)\n\ttw := tabwriter.NewWriter(buf, 1, 8, 1, '\\t', 0)\n\tprintStackRecord(tw, el.stack)\n\ttw.Flush()\n\treturn buf.String()\n}\n\n// printStackRecord prints the function + source line information\n// for a single stack trace.\n// Adapted from runtime/pprof/pprof.go.\nfunc printStackRecord(w io.Writer, stk []uintptr) {\n\tfor _, pc := range stk {\n\t\tf := runtime.FuncForPC(pc)\n\t\tif f == nil {\n\t\t\tcontinue\n\t\t}\n\t\tfile, line := f.FileLine(pc)\n\t\tname := f.Name()\n\t\t// Hide runtime.goexit and any runtime functions at the beginning.\n\t\tif strings.HasPrefix(name, \"runtime.\") {\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Fprintf(w, \"#   %s\\t%s:%d\\n\", name, file, line)\n\t}\n}\n\nfunc (el *eventLog) Events() []logEntry {\n\tel.mu.RLock()\n\tdefer el.mu.RUnlock()\n\treturn el.events\n}\n\n// freeEventLogs is a freelist of *eventLog\nvar freeEventLogs = make(chan *eventLog, 1000)\n\n// newEventLog returns a event log ready to use.\nfunc newEventLog() *eventLog {\n\tselect {\n\tcase el := <-freeEventLogs:\n\t\treturn el\n\tdefault:\n\t\treturn new(eventLog)\n\t}\n}\n\n// freeEventLog adds el to freeEventLogs if there's room.\n// This is non-blocking.\nfunc freeEventLog(el *eventLog) {\n\tel.reset()\n\tselect {\n\tcase freeEventLogs <- el:\n\tdefault:\n\t}\n}\n\nvar eventsTmplCache *template.Template\nvar eventsTmplOnce sync.Once\n\nfunc eventsTmpl() *template.Template {\n\teventsTmplOnce.Do(func() {\n\t\teventsTmplCache = template.Must(template.New(\"events\").Funcs(template.FuncMap{\n\t\t\t\"elapsed\":   elapsed,\n\t\t\t\"trimSpace\": strings.TrimSpace,\n\t\t}).Parse(eventsHTML))\n\t})\n\treturn eventsTmplCache\n}\n\nconst eventsHTML = `\n<html>\n\t<head>\n\t\t<title>events</title>\n\t</head>\n\t<style type=\"text/css\">\n\t\tbody {\n\t\t\tfont-family: sans-serif;\n\t\t}\n\t\ttable#req-status td.family {\n\t\t\tpadding-right: 2em;\n\t\t}\n\t\ttable#req-status td.active {\n\t\t\tpadding-right: 1em;\n\t\t}\n\t\ttable#req-status td.empty {\n\t\t\tcolor: #aaa;\n\t\t}\n\t\ttable#reqs {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\ttable#reqs tr.first {\n\t\t\t{{if $.Expanded}}font-weight: bold;{{end}}\n\t\t}\n\t\ttable#reqs td {\n\t\t\tfont-family: monospace;\n\t\t}\n\t\ttable#reqs td.when {\n\t\t\ttext-align: right;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\ttable#reqs td.elapsed {\n\t\t\tpadding: 0 0.5em;\n\t\t\ttext-align: right;\n\t\t\twhite-space: pre;\n\t\t\twidth: 10em;\n\t\t}\n\t\taddress {\n\t\t\tfont-size: smaller;\n\t\t\tmargin-top: 5em;\n\t\t}\n\t</style>\n\t<body>\n\n<h1>/debug/events</h1>\n\n<table id=\"req-status\">\n\t{{range $i, $fam := .Families}}\n\t<tr>\n\t\t<td class=\"family\">{{$fam}}</td>\n\n\t        {{range $j, $bucket := $.Buckets}}\n\t        {{$n := index $.Counts $i $j}}\n\t\t<td class=\"{{if not $bucket.MaxErrAge}}active{{end}}{{if not $n}}empty{{end}}\">\n\t                {{if $n}}<a href=\"?fam={{$fam}}&b={{$j}}{{if $.Expanded}}&exp=1{{end}}\">{{end}}\n\t\t        [{{$n}} {{$bucket.String}}]\n\t\t\t{{if $n}}</a>{{end}}\n\t\t</td>\n                {{end}}\n\n\t</tr>{{end}}\n</table>\n\n{{if $.EventLogs}}\n<hr />\n<h3>Family: {{$.Family}}</h3>\n\n{{if $.Expanded}}<a href=\"?fam={{$.Family}}&b={{$.Bucket}}\">{{end}}\n[Summary]{{if $.Expanded}}</a>{{end}}\n\n{{if not $.Expanded}}<a href=\"?fam={{$.Family}}&b={{$.Bucket}}&exp=1\">{{end}}\n[Expanded]{{if not $.Expanded}}</a>{{end}}\n\n<table id=\"reqs\">\n\t<tr><th>When</th><th>Elapsed</th></tr>\n\t{{range $el := $.EventLogs}}\n\t<tr class=\"first\">\n\t\t<td class=\"when\">{{$el.When}}</td>\n\t\t<td class=\"elapsed\">{{$el.ElapsedTime}}</td>\n\t\t<td>{{$el.Title}}</td>\n\t</tr>\n\t{{if $.Expanded}}\n\t<tr>\n\t\t<td class=\"when\"></td>\n\t\t<td class=\"elapsed\"></td>\n\t\t<td><pre>{{$el.Stack|trimSpace}}</pre></td>\n\t</tr>\n\t{{range $el.Events}}\n\t<tr>\n\t\t<td class=\"when\">{{.WhenString}}</td>\n\t\t<td class=\"elapsed\">{{elapsed .Elapsed}}</td>\n\t\t<td>.{{if .IsErr}}E{{else}}.{{end}}. {{.What}}</td>\n\t</tr>\n\t{{end}}\n\t{{end}}\n\t{{end}}\n</table>\n{{end}}\n\t</body>\n</html>\n`\n"
  },
  {
    "path": "vendor/golang.org/x/net/trace/histogram.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage trace\n\n// This file implements histogramming for RPC statistics collection.\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log\"\n\t\"math\"\n\t\"sync\"\n\n\t\"golang.org/x/net/internal/timeseries\"\n)\n\nconst (\n\tbucketCount = 38\n)\n\n// histogram keeps counts of values in buckets that are spaced\n// out in powers of 2: 0-1, 2-3, 4-7...\n// histogram implements timeseries.Observable\ntype histogram struct {\n\tsum          int64   // running total of measurements\n\tsumOfSquares float64 // square of running total\n\tbuckets      []int64 // bucketed values for histogram\n\tvalue        int     // holds a single value as an optimization\n\tvalueCount   int64   // number of values recorded for single value\n}\n\n// addMeasurement records a value measurement observation to the histogram.\nfunc (h *histogram) addMeasurement(value int64) {\n\t// TODO: assert invariant\n\th.sum += value\n\th.sumOfSquares += float64(value) * float64(value)\n\n\tbucketIndex := getBucket(value)\n\n\tif h.valueCount == 0 || (h.valueCount > 0 && h.value == bucketIndex) {\n\t\th.value = bucketIndex\n\t\th.valueCount++\n\t} else {\n\t\th.allocateBuckets()\n\t\th.buckets[bucketIndex]++\n\t}\n}\n\nfunc (h *histogram) allocateBuckets() {\n\tif h.buckets == nil {\n\t\th.buckets = make([]int64, bucketCount)\n\t\th.buckets[h.value] = h.valueCount\n\t\th.value = 0\n\t\th.valueCount = -1\n\t}\n}\n\nfunc log2(i int64) int {\n\tn := 0\n\tfor ; i >= 0x100; i >>= 8 {\n\t\tn += 8\n\t}\n\tfor ; i > 0; i >>= 1 {\n\t\tn += 1\n\t}\n\treturn n\n}\n\nfunc getBucket(i int64) (index int) {\n\tindex = log2(i) - 1\n\tif index < 0 {\n\t\tindex = 0\n\t}\n\tif index >= bucketCount {\n\t\tindex = bucketCount - 1\n\t}\n\treturn\n}\n\n// Total returns the number of recorded observations.\nfunc (h *histogram) total() (total int64) {\n\tif h.valueCount >= 0 {\n\t\ttotal = h.valueCount\n\t}\n\tfor _, val := range h.buckets {\n\t\ttotal += int64(val)\n\t}\n\treturn\n}\n\n// Average returns the average value of recorded observations.\nfunc (h *histogram) average() float64 {\n\tt := h.total()\n\tif t == 0 {\n\t\treturn 0\n\t}\n\treturn float64(h.sum) / float64(t)\n}\n\n// Variance returns the variance of recorded observations.\nfunc (h *histogram) variance() float64 {\n\tt := float64(h.total())\n\tif t == 0 {\n\t\treturn 0\n\t}\n\ts := float64(h.sum) / t\n\treturn h.sumOfSquares/t - s*s\n}\n\n// StandardDeviation returns the standard deviation of recorded observations.\nfunc (h *histogram) standardDeviation() float64 {\n\treturn math.Sqrt(h.variance())\n}\n\n// PercentileBoundary estimates the value that the given fraction of recorded\n// observations are less than.\nfunc (h *histogram) percentileBoundary(percentile float64) int64 {\n\ttotal := h.total()\n\n\t// Corner cases (make sure result is strictly less than Total())\n\tif total == 0 {\n\t\treturn 0\n\t} else if total == 1 {\n\t\treturn int64(h.average())\n\t}\n\n\tpercentOfTotal := round(float64(total) * percentile)\n\tvar runningTotal int64\n\n\tfor i := range h.buckets {\n\t\tvalue := h.buckets[i]\n\t\trunningTotal += value\n\t\tif runningTotal == percentOfTotal {\n\t\t\t// We hit an exact bucket boundary. If the next bucket has data, it is a\n\t\t\t// good estimate of the value. If the bucket is empty, we interpolate the\n\t\t\t// midpoint between the next bucket's boundary and the next non-zero\n\t\t\t// bucket. If the remaining buckets are all empty, then we use the\n\t\t\t// boundary for the next bucket as the estimate.\n\t\t\tj := uint8(i + 1)\n\t\t\tmin := bucketBoundary(j)\n\t\t\tif runningTotal < total {\n\t\t\t\tfor h.buckets[j] == 0 {\n\t\t\t\t\tj++\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax := bucketBoundary(j)\n\t\t\treturn min + round(float64(max-min)/2)\n\t\t} else if runningTotal > percentOfTotal {\n\t\t\t// The value is in this bucket. Interpolate the value.\n\t\t\tdelta := runningTotal - percentOfTotal\n\t\t\tpercentBucket := float64(value-delta) / float64(value)\n\t\t\tbucketMin := bucketBoundary(uint8(i))\n\t\t\tnextBucketMin := bucketBoundary(uint8(i + 1))\n\t\t\tbucketSize := nextBucketMin - bucketMin\n\t\t\treturn bucketMin + round(percentBucket*float64(bucketSize))\n\t\t}\n\t}\n\treturn bucketBoundary(bucketCount - 1)\n}\n\n// Median returns the estimated median of the observed values.\nfunc (h *histogram) median() int64 {\n\treturn h.percentileBoundary(0.5)\n}\n\n// Add adds other to h.\nfunc (h *histogram) Add(other timeseries.Observable) {\n\to := other.(*histogram)\n\tif o.valueCount == 0 {\n\t\t// Other histogram is empty\n\t} else if h.valueCount >= 0 && o.valueCount > 0 && h.value == o.value {\n\t\t// Both have a single bucketed value, aggregate them\n\t\th.valueCount += o.valueCount\n\t} else {\n\t\t// Two different values necessitate buckets in this histogram\n\t\th.allocateBuckets()\n\t\tif o.valueCount >= 0 {\n\t\t\th.buckets[o.value] += o.valueCount\n\t\t} else {\n\t\t\tfor i := range h.buckets {\n\t\t\t\th.buckets[i] += o.buckets[i]\n\t\t\t}\n\t\t}\n\t}\n\th.sumOfSquares += o.sumOfSquares\n\th.sum += o.sum\n}\n\n// Clear resets the histogram to an empty state, removing all observed values.\nfunc (h *histogram) Clear() {\n\th.buckets = nil\n\th.value = 0\n\th.valueCount = 0\n\th.sum = 0\n\th.sumOfSquares = 0\n}\n\n// CopyFrom copies from other, which must be a *histogram, into h.\nfunc (h *histogram) CopyFrom(other timeseries.Observable) {\n\to := other.(*histogram)\n\tif o.valueCount == -1 {\n\t\th.allocateBuckets()\n\t\tcopy(h.buckets, o.buckets)\n\t}\n\th.sum = o.sum\n\th.sumOfSquares = o.sumOfSquares\n\th.value = o.value\n\th.valueCount = o.valueCount\n}\n\n// Multiply scales the histogram by the specified ratio.\nfunc (h *histogram) Multiply(ratio float64) {\n\tif h.valueCount == -1 {\n\t\tfor i := range h.buckets {\n\t\t\th.buckets[i] = int64(float64(h.buckets[i]) * ratio)\n\t\t}\n\t} else {\n\t\th.valueCount = int64(float64(h.valueCount) * ratio)\n\t}\n\th.sum = int64(float64(h.sum) * ratio)\n\th.sumOfSquares = h.sumOfSquares * ratio\n}\n\n// New creates a new histogram.\nfunc (h *histogram) New() timeseries.Observable {\n\tr := new(histogram)\n\tr.Clear()\n\treturn r\n}\n\nfunc (h *histogram) String() string {\n\treturn fmt.Sprintf(\"%d, %f, %d, %d, %v\",\n\t\th.sum, h.sumOfSquares, h.value, h.valueCount, h.buckets)\n}\n\n// round returns the closest int64 to the argument\nfunc round(in float64) int64 {\n\treturn int64(math.Floor(in + 0.5))\n}\n\n// bucketBoundary returns the first value in the bucket.\nfunc bucketBoundary(bucket uint8) int64 {\n\tif bucket == 0 {\n\t\treturn 0\n\t}\n\treturn 1 << bucket\n}\n\n// bucketData holds data about a specific bucket for use in distTmpl.\ntype bucketData struct {\n\tLower, Upper       int64\n\tN                  int64\n\tPct, CumulativePct float64\n\tGraphWidth         int\n}\n\n// data holds data about a Distribution for use in distTmpl.\ntype data struct {\n\tBuckets                 []*bucketData\n\tCount, Median           int64\n\tMean, StandardDeviation float64\n}\n\n// maxHTMLBarWidth is the maximum width of the HTML bar for visualizing buckets.\nconst maxHTMLBarWidth = 350.0\n\n// newData returns data representing h for use in distTmpl.\nfunc (h *histogram) newData() *data {\n\t// Force the allocation of buckets to simplify the rendering implementation\n\th.allocateBuckets()\n\t// We scale the bars on the right so that the largest bar is\n\t// maxHTMLBarWidth pixels in width.\n\tmaxBucket := int64(0)\n\tfor _, n := range h.buckets {\n\t\tif n > maxBucket {\n\t\t\tmaxBucket = n\n\t\t}\n\t}\n\ttotal := h.total()\n\tbarsizeMult := maxHTMLBarWidth / float64(maxBucket)\n\tvar pctMult float64\n\tif total == 0 {\n\t\tpctMult = 1.0\n\t} else {\n\t\tpctMult = 100.0 / float64(total)\n\t}\n\n\tbuckets := make([]*bucketData, len(h.buckets))\n\trunningTotal := int64(0)\n\tfor i, n := range h.buckets {\n\t\tif n == 0 {\n\t\t\tcontinue\n\t\t}\n\t\trunningTotal += n\n\t\tvar upperBound int64\n\t\tif i < bucketCount-1 {\n\t\t\tupperBound = bucketBoundary(uint8(i + 1))\n\t\t} else {\n\t\t\tupperBound = math.MaxInt64\n\t\t}\n\t\tbuckets[i] = &bucketData{\n\t\t\tLower:         bucketBoundary(uint8(i)),\n\t\t\tUpper:         upperBound,\n\t\t\tN:             n,\n\t\t\tPct:           float64(n) * pctMult,\n\t\t\tCumulativePct: float64(runningTotal) * pctMult,\n\t\t\tGraphWidth:    int(float64(n) * barsizeMult),\n\t\t}\n\t}\n\treturn &data{\n\t\tBuckets:           buckets,\n\t\tCount:             total,\n\t\tMedian:            h.median(),\n\t\tMean:              h.average(),\n\t\tStandardDeviation: h.standardDeviation(),\n\t}\n}\n\nfunc (h *histogram) html() template.HTML {\n\tbuf := new(bytes.Buffer)\n\tif err := distTmpl().Execute(buf, h.newData()); err != nil {\n\t\tbuf.Reset()\n\t\tlog.Printf(\"net/trace: couldn't execute template: %v\", err)\n\t}\n\treturn template.HTML(buf.String())\n}\n\nvar distTmplCache *template.Template\nvar distTmplOnce sync.Once\n\nfunc distTmpl() *template.Template {\n\tdistTmplOnce.Do(func() {\n\t\t// Input: data\n\t\tdistTmplCache = template.Must(template.New(\"distTmpl\").Parse(`\n<table>\n<tr>\n    <td style=\"padding:0.25em\">Count: {{.Count}}</td>\n    <td style=\"padding:0.25em\">Mean: {{printf \"%.0f\" .Mean}}</td>\n    <td style=\"padding:0.25em\">StdDev: {{printf \"%.0f\" .StandardDeviation}}</td>\n    <td style=\"padding:0.25em\">Median: {{.Median}}</td>\n</tr>\n</table>\n<hr>\n<table>\n{{range $b := .Buckets}}\n{{if $b}}\n  <tr>\n    <td style=\"padding:0 0 0 0.25em\">[</td>\n    <td style=\"text-align:right;padding:0 0.25em\">{{.Lower}},</td>\n    <td style=\"text-align:right;padding:0 0.25em\">{{.Upper}})</td>\n    <td style=\"text-align:right;padding:0 0.25em\">{{.N}}</td>\n    <td style=\"text-align:right;padding:0 0.25em\">{{printf \"%#.3f\" .Pct}}%</td>\n    <td style=\"text-align:right;padding:0 0.25em\">{{printf \"%#.3f\" .CumulativePct}}%</td>\n    <td><div style=\"background-color: blue; height: 1em; width: {{.GraphWidth}};\"></div></td>\n  </tr>\n{{end}}\n{{end}}\n</table>\n`))\n\t})\n\treturn distTmplCache\n}\n"
  },
  {
    "path": "vendor/golang.org/x/net/trace/trace.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/*\nPackage trace implements tracing of requests and long-lived objects.\nIt exports HTTP interfaces on /debug/requests and /debug/events.\n\nA trace.Trace provides tracing for short-lived objects, usually requests.\nA request handler might be implemented like this:\n\n\tfunc fooHandler(w http.ResponseWriter, req *http.Request) {\n\t\ttr := trace.New(\"mypkg.Foo\", req.URL.Path)\n\t\tdefer tr.Finish()\n\t\t...\n\t\ttr.LazyPrintf(\"some event %q happened\", str)\n\t\t...\n\t\tif err := somethingImportant(); err != nil {\n\t\t\ttr.LazyPrintf(\"somethingImportant failed: %v\", err)\n\t\t\ttr.SetError()\n\t\t}\n\t}\n\nThe /debug/requests HTTP endpoint organizes the traces by family,\nerrors, and duration.  It also provides histogram of request duration\nfor each family.\n\nA trace.EventLog provides tracing for long-lived objects, such as RPC\nconnections.\n\n\t// A Fetcher fetches URL paths for a single domain.\n\ttype Fetcher struct {\n\t\tdomain string\n\t\tevents trace.EventLog\n\t}\n\n\tfunc NewFetcher(domain string) *Fetcher {\n\t\treturn &Fetcher{\n\t\t\tdomain,\n\t\t\ttrace.NewEventLog(\"mypkg.Fetcher\", domain),\n\t\t}\n\t}\n\n\tfunc (f *Fetcher) Fetch(path string) (string, error) {\n\t\tresp, err := http.Get(\"http://\" + f.domain + \"/\" + path)\n\t\tif err != nil {\n\t\t\tf.events.Errorf(\"Get(%q) = %v\", path, err)\n\t\t\treturn \"\", err\n\t\t}\n\t\tf.events.Printf(\"Get(%q) = %s\", path, resp.Status)\n\t\t...\n\t}\n\n\tfunc (f *Fetcher) Close() error {\n\t\tf.events.Finish()\n\t\treturn nil\n\t}\n\nThe /debug/events HTTP endpoint organizes the event logs by family and\nby time since the last error.  The expanded view displays recent log\nentries and the log's call stack.\n*/\npackage trace // import \"golang.org/x/net/trace\"\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strconv\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"golang.org/x/net/internal/timeseries\"\n)\n\n// DebugUseAfterFinish controls whether to debug uses of Trace values after finishing.\n// FOR DEBUGGING ONLY. This will slow down the program.\nvar DebugUseAfterFinish = false\n\n// HTTP ServeMux paths.\nconst (\n\tdebugRequestsPath = \"/debug/requests\"\n\tdebugEventsPath   = \"/debug/events\"\n)\n\n// AuthRequest determines whether a specific request is permitted to load the\n// /debug/requests or /debug/events pages.\n//\n// It returns two bools; the first indicates whether the page may be viewed at all,\n// and the second indicates whether sensitive events will be shown.\n//\n// AuthRequest may be replaced by a program to customize its authorization requirements.\n//\n// The default AuthRequest function returns (true, true) if and only if the request\n// comes from localhost/127.0.0.1/[::1].\nvar AuthRequest = func(req *http.Request) (any, sensitive bool) {\n\t// RemoteAddr is commonly in the form \"IP\" or \"IP:port\".\n\t// If it is in the form \"IP:port\", split off the port.\n\thost, _, err := net.SplitHostPort(req.RemoteAddr)\n\tif err != nil {\n\t\thost = req.RemoteAddr\n\t}\n\tswitch host {\n\tcase \"localhost\", \"127.0.0.1\", \"::1\":\n\t\treturn true, true\n\tdefault:\n\t\treturn false, false\n\t}\n}\n\nfunc init() {\n\t_, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: debugRequestsPath}})\n\tif pat == debugRequestsPath {\n\t\tpanic(\"/debug/requests is already registered. You may have two independent copies of \" +\n\t\t\t\"golang.org/x/net/trace in your binary, trying to maintain separate state. This may \" +\n\t\t\t\"involve a vendored copy of golang.org/x/net/trace.\")\n\t}\n\n\t// TODO(jbd): Serve Traces from /debug/traces in the future?\n\t// There is no requirement for a request to be present to have traces.\n\thttp.HandleFunc(debugRequestsPath, Traces)\n\thttp.HandleFunc(debugEventsPath, Events)\n}\n\n// NewContext returns a copy of the parent context\n// and associates it with a Trace.\nfunc NewContext(ctx context.Context, tr Trace) context.Context {\n\treturn context.WithValue(ctx, contextKey, tr)\n}\n\n// FromContext returns the Trace bound to the context, if any.\nfunc FromContext(ctx context.Context) (tr Trace, ok bool) {\n\ttr, ok = ctx.Value(contextKey).(Trace)\n\treturn\n}\n\n// Traces responds with traces from the program.\n// The package initialization registers it in http.DefaultServeMux\n// at /debug/requests.\n//\n// It performs authorization by running AuthRequest.\nfunc Traces(w http.ResponseWriter, req *http.Request) {\n\tany, sensitive := AuthRequest(req)\n\tif !any {\n\t\thttp.Error(w, \"not allowed\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"text/html; charset=utf-8\")\n\tRender(w, req, sensitive)\n}\n\n// Events responds with a page of events collected by EventLogs.\n// The package initialization registers it in http.DefaultServeMux\n// at /debug/events.\n//\n// It performs authorization by running AuthRequest.\nfunc Events(w http.ResponseWriter, req *http.Request) {\n\tany, sensitive := AuthRequest(req)\n\tif !any {\n\t\thttp.Error(w, \"not allowed\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"text/html; charset=utf-8\")\n\tRenderEvents(w, req, sensitive)\n}\n\n// Render renders the HTML page typically served at /debug/requests.\n// It does not do any auth checking. The request may be nil.\n//\n// Most users will use the Traces handler.\nfunc Render(w io.Writer, req *http.Request, sensitive bool) {\n\tdata := &struct {\n\t\tFamilies         []string\n\t\tActiveTraceCount map[string]int\n\t\tCompletedTraces  map[string]*family\n\n\t\t// Set when a bucket has been selected.\n\t\tTraces        traceList\n\t\tFamily        string\n\t\tBucket        int\n\t\tExpanded      bool\n\t\tTraced        bool\n\t\tActive        bool\n\t\tShowSensitive bool // whether to show sensitive events\n\n\t\tHistogram       template.HTML\n\t\tHistogramWindow string // e.g. \"last minute\", \"last hour\", \"all time\"\n\n\t\t// If non-zero, the set of traces is a partial set,\n\t\t// and this is the total number.\n\t\tTotal int\n\t}{\n\t\tCompletedTraces: completedTraces,\n\t}\n\n\tdata.ShowSensitive = sensitive\n\tif req != nil {\n\t\t// Allow show_sensitive=0 to force hiding of sensitive data for testing.\n\t\t// This only goes one way; you can't use show_sensitive=1 to see things.\n\t\tif req.FormValue(\"show_sensitive\") == \"0\" {\n\t\t\tdata.ShowSensitive = false\n\t\t}\n\n\t\tif exp, err := strconv.ParseBool(req.FormValue(\"exp\")); err == nil {\n\t\t\tdata.Expanded = exp\n\t\t}\n\t\tif exp, err := strconv.ParseBool(req.FormValue(\"rtraced\")); err == nil {\n\t\t\tdata.Traced = exp\n\t\t}\n\t}\n\n\tcompletedMu.RLock()\n\tdata.Families = make([]string, 0, len(completedTraces))\n\tfor fam := range completedTraces {\n\t\tdata.Families = append(data.Families, fam)\n\t}\n\tcompletedMu.RUnlock()\n\tsort.Strings(data.Families)\n\n\t// We are careful here to minimize the time spent locking activeMu,\n\t// since that lock is required every time an RPC starts and finishes.\n\tdata.ActiveTraceCount = make(map[string]int, len(data.Families))\n\tactiveMu.RLock()\n\tfor fam, s := range activeTraces {\n\t\tdata.ActiveTraceCount[fam] = s.Len()\n\t}\n\tactiveMu.RUnlock()\n\n\tvar ok bool\n\tdata.Family, data.Bucket, ok = parseArgs(req)\n\tswitch {\n\tcase !ok:\n\t\t// No-op\n\tcase data.Bucket == -1:\n\t\tdata.Active = true\n\t\tn := data.ActiveTraceCount[data.Family]\n\t\tdata.Traces = getActiveTraces(data.Family)\n\t\tif len(data.Traces) < n {\n\t\t\tdata.Total = n\n\t\t}\n\tcase data.Bucket < bucketsPerFamily:\n\t\tif b := lookupBucket(data.Family, data.Bucket); b != nil {\n\t\t\tdata.Traces = b.Copy(data.Traced)\n\t\t}\n\tdefault:\n\t\tif f := getFamily(data.Family, false); f != nil {\n\t\t\tvar obs timeseries.Observable\n\t\t\tf.LatencyMu.RLock()\n\t\t\tswitch o := data.Bucket - bucketsPerFamily; o {\n\t\t\tcase 0:\n\t\t\t\tobs = f.Latency.Minute()\n\t\t\t\tdata.HistogramWindow = \"last minute\"\n\t\t\tcase 1:\n\t\t\t\tobs = f.Latency.Hour()\n\t\t\t\tdata.HistogramWindow = \"last hour\"\n\t\t\tcase 2:\n\t\t\t\tobs = f.Latency.Total()\n\t\t\t\tdata.HistogramWindow = \"all time\"\n\t\t\t}\n\t\t\tf.LatencyMu.RUnlock()\n\t\t\tif obs != nil {\n\t\t\t\tdata.Histogram = obs.(*histogram).html()\n\t\t\t}\n\t\t}\n\t}\n\n\tif data.Traces != nil {\n\t\tdefer data.Traces.Free()\n\t\tsort.Sort(data.Traces)\n\t}\n\n\tcompletedMu.RLock()\n\tdefer completedMu.RUnlock()\n\tif err := pageTmpl().ExecuteTemplate(w, \"Page\", data); err != nil {\n\t\tlog.Printf(\"net/trace: Failed executing template: %v\", err)\n\t}\n}\n\nfunc parseArgs(req *http.Request) (fam string, b int, ok bool) {\n\tif req == nil {\n\t\treturn \"\", 0, false\n\t}\n\tfam, bStr := req.FormValue(\"fam\"), req.FormValue(\"b\")\n\tif fam == \"\" || bStr == \"\" {\n\t\treturn \"\", 0, false\n\t}\n\tb, err := strconv.Atoi(bStr)\n\tif err != nil || b < -1 {\n\t\treturn \"\", 0, false\n\t}\n\n\treturn fam, b, true\n}\n\nfunc lookupBucket(fam string, b int) *traceBucket {\n\tf := getFamily(fam, false)\n\tif f == nil || b < 0 || b >= len(f.Buckets) {\n\t\treturn nil\n\t}\n\treturn f.Buckets[b]\n}\n\ntype contextKeyT string\n\nvar contextKey = contextKeyT(\"golang.org/x/net/trace.Trace\")\n\n// Trace represents an active request.\ntype Trace interface {\n\t// LazyLog adds x to the event log. It will be evaluated each time the\n\t// /debug/requests page is rendered. Any memory referenced by x will be\n\t// pinned until the trace is finished and later discarded.\n\tLazyLog(x fmt.Stringer, sensitive bool)\n\n\t// LazyPrintf evaluates its arguments with fmt.Sprintf each time the\n\t// /debug/requests page is rendered. Any memory referenced by a will be\n\t// pinned until the trace is finished and later discarded.\n\tLazyPrintf(format string, a ...interface{})\n\n\t// SetError declares that this trace resulted in an error.\n\tSetError()\n\n\t// SetRecycler sets a recycler for the trace.\n\t// f will be called for each event passed to LazyLog at a time when\n\t// it is no longer required, whether while the trace is still active\n\t// and the event is discarded, or when a completed trace is discarded.\n\tSetRecycler(f func(interface{}))\n\n\t// SetTraceInfo sets the trace info for the trace.\n\t// This is currently unused.\n\tSetTraceInfo(traceID, spanID uint64)\n\n\t// SetMaxEvents sets the maximum number of events that will be stored\n\t// in the trace. This has no effect if any events have already been\n\t// added to the trace.\n\tSetMaxEvents(m int)\n\n\t// Finish declares that this trace is complete.\n\t// The trace should not be used after calling this method.\n\tFinish()\n}\n\ntype lazySprintf struct {\n\tformat string\n\ta      []interface{}\n}\n\nfunc (l *lazySprintf) String() string {\n\treturn fmt.Sprintf(l.format, l.a...)\n}\n\n// New returns a new Trace with the specified family and title.\nfunc New(family, title string) Trace {\n\ttr := newTrace()\n\ttr.ref()\n\ttr.Family, tr.Title = family, title\n\ttr.Start = time.Now()\n\ttr.maxEvents = maxEventsPerTrace\n\ttr.events = tr.eventsBuf[:0]\n\n\tactiveMu.RLock()\n\ts := activeTraces[tr.Family]\n\tactiveMu.RUnlock()\n\tif s == nil {\n\t\tactiveMu.Lock()\n\t\ts = activeTraces[tr.Family] // check again\n\t\tif s == nil {\n\t\t\ts = new(traceSet)\n\t\t\tactiveTraces[tr.Family] = s\n\t\t}\n\t\tactiveMu.Unlock()\n\t}\n\ts.Add(tr)\n\n\t// Trigger allocation of the completed trace structure for this family.\n\t// This will cause the family to be present in the request page during\n\t// the first trace of this family. We don't care about the return value,\n\t// nor is there any need for this to run inline, so we execute it in its\n\t// own goroutine, but only if the family isn't allocated yet.\n\tcompletedMu.RLock()\n\tif _, ok := completedTraces[tr.Family]; !ok {\n\t\tgo allocFamily(tr.Family)\n\t}\n\tcompletedMu.RUnlock()\n\n\treturn tr\n}\n\nfunc (tr *trace) Finish() {\n\telapsed := time.Since(tr.Start)\n\ttr.mu.Lock()\n\ttr.Elapsed = elapsed\n\ttr.mu.Unlock()\n\n\tif DebugUseAfterFinish {\n\t\tbuf := make([]byte, 4<<10) // 4 KB should be enough\n\t\tn := runtime.Stack(buf, false)\n\t\ttr.finishStack = buf[:n]\n\t}\n\n\tactiveMu.RLock()\n\tm := activeTraces[tr.Family]\n\tactiveMu.RUnlock()\n\tm.Remove(tr)\n\n\tf := getFamily(tr.Family, true)\n\ttr.mu.RLock() // protects tr fields in Cond.match calls\n\tfor _, b := range f.Buckets {\n\t\tif b.Cond.match(tr) {\n\t\t\tb.Add(tr)\n\t\t}\n\t}\n\ttr.mu.RUnlock()\n\n\t// Add a sample of elapsed time as microseconds to the family's timeseries\n\th := new(histogram)\n\th.addMeasurement(elapsed.Nanoseconds() / 1e3)\n\tf.LatencyMu.Lock()\n\tf.Latency.Add(h)\n\tf.LatencyMu.Unlock()\n\n\ttr.unref() // matches ref in New\n}\n\nconst (\n\tbucketsPerFamily    = 9\n\ttracesPerBucket     = 10\n\tmaxActiveTraces     = 20 // Maximum number of active traces to show.\n\tmaxEventsPerTrace   = 10\n\tnumHistogramBuckets = 38\n)\n\nvar (\n\t// The active traces.\n\tactiveMu     sync.RWMutex\n\tactiveTraces = make(map[string]*traceSet) // family -> traces\n\n\t// Families of completed traces.\n\tcompletedMu     sync.RWMutex\n\tcompletedTraces = make(map[string]*family) // family -> traces\n)\n\ntype traceSet struct {\n\tmu sync.RWMutex\n\tm  map[*trace]bool\n\n\t// We could avoid the entire map scan in FirstN by having a slice of all the traces\n\t// ordered by start time, and an index into that from the trace struct, with a periodic\n\t// repack of the slice after enough traces finish; we could also use a skip list or similar.\n\t// However, that would shift some of the expense from /debug/requests time to RPC time,\n\t// which is probably the wrong trade-off.\n}\n\nfunc (ts *traceSet) Len() int {\n\tts.mu.RLock()\n\tdefer ts.mu.RUnlock()\n\treturn len(ts.m)\n}\n\nfunc (ts *traceSet) Add(tr *trace) {\n\tts.mu.Lock()\n\tif ts.m == nil {\n\t\tts.m = make(map[*trace]bool)\n\t}\n\tts.m[tr] = true\n\tts.mu.Unlock()\n}\n\nfunc (ts *traceSet) Remove(tr *trace) {\n\tts.mu.Lock()\n\tdelete(ts.m, tr)\n\tts.mu.Unlock()\n}\n\n// FirstN returns the first n traces ordered by time.\nfunc (ts *traceSet) FirstN(n int) traceList {\n\tts.mu.RLock()\n\tdefer ts.mu.RUnlock()\n\n\tif n > len(ts.m) {\n\t\tn = len(ts.m)\n\t}\n\ttrl := make(traceList, 0, n)\n\n\t// Fast path for when no selectivity is needed.\n\tif n == len(ts.m) {\n\t\tfor tr := range ts.m {\n\t\t\ttr.ref()\n\t\t\ttrl = append(trl, tr)\n\t\t}\n\t\tsort.Sort(trl)\n\t\treturn trl\n\t}\n\n\t// Pick the oldest n traces.\n\t// This is inefficient. See the comment in the traceSet struct.\n\tfor tr := range ts.m {\n\t\t// Put the first n traces into trl in the order they occur.\n\t\t// When we have n, sort trl, and thereafter maintain its order.\n\t\tif len(trl) < n {\n\t\t\ttr.ref()\n\t\t\ttrl = append(trl, tr)\n\t\t\tif len(trl) == n {\n\t\t\t\t// This is guaranteed to happen exactly once during this loop.\n\t\t\t\tsort.Sort(trl)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif tr.Start.After(trl[n-1].Start) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Find where to insert this one.\n\t\ttr.ref()\n\t\ti := sort.Search(n, func(i int) bool { return trl[i].Start.After(tr.Start) })\n\t\ttrl[n-1].unref()\n\t\tcopy(trl[i+1:], trl[i:])\n\t\ttrl[i] = tr\n\t}\n\n\treturn trl\n}\n\nfunc getActiveTraces(fam string) traceList {\n\tactiveMu.RLock()\n\ts := activeTraces[fam]\n\tactiveMu.RUnlock()\n\tif s == nil {\n\t\treturn nil\n\t}\n\treturn s.FirstN(maxActiveTraces)\n}\n\nfunc getFamily(fam string, allocNew bool) *family {\n\tcompletedMu.RLock()\n\tf := completedTraces[fam]\n\tcompletedMu.RUnlock()\n\tif f == nil && allocNew {\n\t\tf = allocFamily(fam)\n\t}\n\treturn f\n}\n\nfunc allocFamily(fam string) *family {\n\tcompletedMu.Lock()\n\tdefer completedMu.Unlock()\n\tf := completedTraces[fam]\n\tif f == nil {\n\t\tf = newFamily()\n\t\tcompletedTraces[fam] = f\n\t}\n\treturn f\n}\n\n// family represents a set of trace buckets and associated latency information.\ntype family struct {\n\t// traces may occur in multiple buckets.\n\tBuckets [bucketsPerFamily]*traceBucket\n\n\t// latency time series\n\tLatencyMu sync.RWMutex\n\tLatency   *timeseries.MinuteHourSeries\n}\n\nfunc newFamily() *family {\n\treturn &family{\n\t\tBuckets: [bucketsPerFamily]*traceBucket{\n\t\t\t{Cond: minCond(0)},\n\t\t\t{Cond: minCond(50 * time.Millisecond)},\n\t\t\t{Cond: minCond(100 * time.Millisecond)},\n\t\t\t{Cond: minCond(200 * time.Millisecond)},\n\t\t\t{Cond: minCond(500 * time.Millisecond)},\n\t\t\t{Cond: minCond(1 * time.Second)},\n\t\t\t{Cond: minCond(10 * time.Second)},\n\t\t\t{Cond: minCond(100 * time.Second)},\n\t\t\t{Cond: errorCond{}},\n\t\t},\n\t\tLatency: timeseries.NewMinuteHourSeries(func() timeseries.Observable { return new(histogram) }),\n\t}\n}\n\n// traceBucket represents a size-capped bucket of historic traces,\n// along with a condition for a trace to belong to the bucket.\ntype traceBucket struct {\n\tCond cond\n\n\t// Ring buffer implementation of a fixed-size FIFO queue.\n\tmu     sync.RWMutex\n\tbuf    [tracesPerBucket]*trace\n\tstart  int // < tracesPerBucket\n\tlength int // <= tracesPerBucket\n}\n\nfunc (b *traceBucket) Add(tr *trace) {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\n\ti := b.start + b.length\n\tif i >= tracesPerBucket {\n\t\ti -= tracesPerBucket\n\t}\n\tif b.length == tracesPerBucket {\n\t\t// \"Remove\" an element from the bucket.\n\t\tb.buf[i].unref()\n\t\tb.start++\n\t\tif b.start == tracesPerBucket {\n\t\t\tb.start = 0\n\t\t}\n\t}\n\tb.buf[i] = tr\n\tif b.length < tracesPerBucket {\n\t\tb.length++\n\t}\n\ttr.ref()\n}\n\n// Copy returns a copy of the traces in the bucket.\n// If tracedOnly is true, only the traces with trace information will be returned.\n// The logs will be ref'd before returning; the caller should call\n// the Free method when it is done with them.\n// TODO(dsymonds): keep track of traced requests in separate buckets.\nfunc (b *traceBucket) Copy(tracedOnly bool) traceList {\n\tb.mu.RLock()\n\tdefer b.mu.RUnlock()\n\n\ttrl := make(traceList, 0, b.length)\n\tfor i, x := 0, b.start; i < b.length; i++ {\n\t\ttr := b.buf[x]\n\t\tif !tracedOnly || tr.spanID != 0 {\n\t\t\ttr.ref()\n\t\t\ttrl = append(trl, tr)\n\t\t}\n\t\tx++\n\t\tif x == b.length {\n\t\t\tx = 0\n\t\t}\n\t}\n\treturn trl\n}\n\nfunc (b *traceBucket) Empty() bool {\n\tb.mu.RLock()\n\tdefer b.mu.RUnlock()\n\treturn b.length == 0\n}\n\n// cond represents a condition on a trace.\ntype cond interface {\n\tmatch(t *trace) bool\n\tString() string\n}\n\ntype minCond time.Duration\n\nfunc (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) }\nfunc (m minCond) String() string      { return fmt.Sprintf(\"≥%gs\", time.Duration(m).Seconds()) }\n\ntype errorCond struct{}\n\nfunc (e errorCond) match(t *trace) bool { return t.IsError }\nfunc (e errorCond) String() string      { return \"errors\" }\n\ntype traceList []*trace\n\n// Free calls unref on each element of the list.\nfunc (trl traceList) Free() {\n\tfor _, t := range trl {\n\t\tt.unref()\n\t}\n}\n\n// traceList may be sorted in reverse chronological order.\nfunc (trl traceList) Len() int           { return len(trl) }\nfunc (trl traceList) Less(i, j int) bool { return trl[i].Start.After(trl[j].Start) }\nfunc (trl traceList) Swap(i, j int)      { trl[i], trl[j] = trl[j], trl[i] }\n\n// An event is a timestamped log entry in a trace.\ntype event struct {\n\tWhen       time.Time\n\tElapsed    time.Duration // since previous event in trace\n\tNewDay     bool          // whether this event is on a different day to the previous event\n\tRecyclable bool          // whether this event was passed via LazyLog\n\tSensitive  bool          // whether this event contains sensitive information\n\tWhat       interface{}   // string or fmt.Stringer\n}\n\n// WhenString returns a string representation of the elapsed time of the event.\n// It will include the date if midnight was crossed.\nfunc (e event) WhenString() string {\n\tif e.NewDay {\n\t\treturn e.When.Format(\"2006/01/02 15:04:05.000000\")\n\t}\n\treturn e.When.Format(\"15:04:05.000000\")\n}\n\n// discarded represents a number of discarded events.\n// It is stored as *discarded to make it easier to update in-place.\ntype discarded int\n\nfunc (d *discarded) String() string {\n\treturn fmt.Sprintf(\"(%d events discarded)\", int(*d))\n}\n\n// trace represents an active or complete request,\n// either sent or received by this program.\ntype trace struct {\n\t// Family is the top-level grouping of traces to which this belongs.\n\tFamily string\n\n\t// Title is the title of this trace.\n\tTitle string\n\n\t// Start time of the this trace.\n\tStart time.Time\n\n\tmu        sync.RWMutex\n\tevents    []event // Append-only sequence of events (modulo discards).\n\tmaxEvents int\n\trecycler  func(interface{})\n\tIsError   bool          // Whether this trace resulted in an error.\n\tElapsed   time.Duration // Elapsed time for this trace, zero while active.\n\ttraceID   uint64        // Trace information if non-zero.\n\tspanID    uint64\n\n\trefs int32     // how many buckets this is in\n\tdisc discarded // scratch space to avoid allocation\n\n\tfinishStack []byte // where finish was called, if DebugUseAfterFinish is set\n\n\teventsBuf [4]event // preallocated buffer in case we only log a few events\n}\n\nfunc (tr *trace) reset() {\n\t// Clear all but the mutex. Mutexes may not be copied, even when unlocked.\n\ttr.Family = \"\"\n\ttr.Title = \"\"\n\ttr.Start = time.Time{}\n\n\ttr.mu.Lock()\n\ttr.Elapsed = 0\n\ttr.traceID = 0\n\ttr.spanID = 0\n\ttr.IsError = false\n\ttr.maxEvents = 0\n\ttr.events = nil\n\ttr.recycler = nil\n\ttr.mu.Unlock()\n\n\ttr.refs = 0\n\ttr.disc = 0\n\ttr.finishStack = nil\n\tfor i := range tr.eventsBuf {\n\t\ttr.eventsBuf[i] = event{}\n\t}\n}\n\n// delta returns the elapsed time since the last event or the trace start,\n// and whether it spans midnight.\n// L >= tr.mu\nfunc (tr *trace) delta(t time.Time) (time.Duration, bool) {\n\tif len(tr.events) == 0 {\n\t\treturn t.Sub(tr.Start), false\n\t}\n\tprev := tr.events[len(tr.events)-1].When\n\treturn t.Sub(prev), prev.Day() != t.Day()\n}\n\nfunc (tr *trace) addEvent(x interface{}, recyclable, sensitive bool) {\n\tif DebugUseAfterFinish && tr.finishStack != nil {\n\t\tbuf := make([]byte, 4<<10) // 4 KB should be enough\n\t\tn := runtime.Stack(buf, false)\n\t\tlog.Printf(\"net/trace: trace used after finish:\\nFinished at:\\n%s\\nUsed at:\\n%s\", tr.finishStack, buf[:n])\n\t}\n\n\t/*\n\t\tNOTE TO DEBUGGERS\n\n\t\tIf you are here because your program panicked in this code,\n\t\tit is almost definitely the fault of code using this package,\n\t\tand very unlikely to be the fault of this code.\n\n\t\tThe most likely scenario is that some code elsewhere is using\n\t\ta trace.Trace after its Finish method is called.\n\t\tYou can temporarily set the DebugUseAfterFinish var\n\t\tto help discover where that is; do not leave that var set,\n\t\tsince it makes this package much less efficient.\n\t*/\n\n\te := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive}\n\ttr.mu.Lock()\n\te.Elapsed, e.NewDay = tr.delta(e.When)\n\tif len(tr.events) < tr.maxEvents {\n\t\ttr.events = append(tr.events, e)\n\t} else {\n\t\t// Discard the middle events.\n\t\tdi := int((tr.maxEvents - 1) / 2)\n\t\tif d, ok := tr.events[di].What.(*discarded); ok {\n\t\t\t(*d)++\n\t\t} else {\n\t\t\t// disc starts at two to count for the event it is replacing,\n\t\t\t// plus the next one that we are about to drop.\n\t\t\ttr.disc = 2\n\t\t\tif tr.recycler != nil && tr.events[di].Recyclable {\n\t\t\t\tgo tr.recycler(tr.events[di].What)\n\t\t\t}\n\t\t\ttr.events[di].What = &tr.disc\n\t\t}\n\t\t// The timestamp of the discarded meta-event should be\n\t\t// the time of the last event it is representing.\n\t\ttr.events[di].When = tr.events[di+1].When\n\n\t\tif tr.recycler != nil && tr.events[di+1].Recyclable {\n\t\t\tgo tr.recycler(tr.events[di+1].What)\n\t\t}\n\t\tcopy(tr.events[di+1:], tr.events[di+2:])\n\t\ttr.events[tr.maxEvents-1] = e\n\t}\n\ttr.mu.Unlock()\n}\n\nfunc (tr *trace) LazyLog(x fmt.Stringer, sensitive bool) {\n\ttr.addEvent(x, true, sensitive)\n}\n\nfunc (tr *trace) LazyPrintf(format string, a ...interface{}) {\n\ttr.addEvent(&lazySprintf{format, a}, false, false)\n}\n\nfunc (tr *trace) SetError() {\n\ttr.mu.Lock()\n\ttr.IsError = true\n\ttr.mu.Unlock()\n}\n\nfunc (tr *trace) SetRecycler(f func(interface{})) {\n\ttr.mu.Lock()\n\ttr.recycler = f\n\ttr.mu.Unlock()\n}\n\nfunc (tr *trace) SetTraceInfo(traceID, spanID uint64) {\n\ttr.mu.Lock()\n\ttr.traceID, tr.spanID = traceID, spanID\n\ttr.mu.Unlock()\n}\n\nfunc (tr *trace) SetMaxEvents(m int) {\n\ttr.mu.Lock()\n\t// Always keep at least three events: first, discarded count, last.\n\tif len(tr.events) == 0 && m > 3 {\n\t\ttr.maxEvents = m\n\t}\n\ttr.mu.Unlock()\n}\n\nfunc (tr *trace) ref() {\n\tatomic.AddInt32(&tr.refs, 1)\n}\n\nfunc (tr *trace) unref() {\n\tif atomic.AddInt32(&tr.refs, -1) == 0 {\n\t\ttr.mu.RLock()\n\t\tif tr.recycler != nil {\n\t\t\t// freeTrace clears tr, so we hold tr.recycler and tr.events here.\n\t\t\tgo func(f func(interface{}), es []event) {\n\t\t\t\tfor _, e := range es {\n\t\t\t\t\tif e.Recyclable {\n\t\t\t\t\t\tf(e.What)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}(tr.recycler, tr.events)\n\t\t}\n\t\ttr.mu.RUnlock()\n\n\t\tfreeTrace(tr)\n\t}\n}\n\nfunc (tr *trace) When() string {\n\treturn tr.Start.Format(\"2006/01/02 15:04:05.000000\")\n}\n\nfunc (tr *trace) ElapsedTime() string {\n\ttr.mu.RLock()\n\tt := tr.Elapsed\n\ttr.mu.RUnlock()\n\n\tif t == 0 {\n\t\t// Active trace.\n\t\tt = time.Since(tr.Start)\n\t}\n\treturn fmt.Sprintf(\"%.6f\", t.Seconds())\n}\n\nfunc (tr *trace) Events() []event {\n\ttr.mu.RLock()\n\tdefer tr.mu.RUnlock()\n\treturn tr.events\n}\n\nvar traceFreeList = make(chan *trace, 1000) // TODO(dsymonds): Use sync.Pool?\n\n// newTrace returns a trace ready to use.\nfunc newTrace() *trace {\n\tselect {\n\tcase tr := <-traceFreeList:\n\t\treturn tr\n\tdefault:\n\t\treturn new(trace)\n\t}\n}\n\n// freeTrace adds tr to traceFreeList if there's room.\n// This is non-blocking.\nfunc freeTrace(tr *trace) {\n\tif DebugUseAfterFinish {\n\t\treturn // never reuse\n\t}\n\ttr.reset()\n\tselect {\n\tcase traceFreeList <- tr:\n\tdefault:\n\t}\n}\n\nfunc elapsed(d time.Duration) string {\n\tb := []byte(fmt.Sprintf(\"%.6f\", d.Seconds()))\n\n\t// For subsecond durations, blank all zeros before decimal point,\n\t// and all zeros between the decimal point and the first non-zero digit.\n\tif d < time.Second {\n\t\tdot := bytes.IndexByte(b, '.')\n\t\tfor i := 0; i < dot; i++ {\n\t\t\tb[i] = ' '\n\t\t}\n\t\tfor i := dot + 1; i < len(b); i++ {\n\t\t\tif b[i] == '0' {\n\t\t\t\tb[i] = ' '\n\t\t\t} else {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn string(b)\n}\n\nvar pageTmplCache *template.Template\nvar pageTmplOnce sync.Once\n\nfunc pageTmpl() *template.Template {\n\tpageTmplOnce.Do(func() {\n\t\tpageTmplCache = template.Must(template.New(\"Page\").Funcs(template.FuncMap{\n\t\t\t\"elapsed\": elapsed,\n\t\t\t\"add\":     func(a, b int) int { return a + b },\n\t\t}).Parse(pageHTML))\n\t})\n\treturn pageTmplCache\n}\n\nconst pageHTML = `\n{{template \"Prolog\" .}}\n{{template \"StatusTable\" .}}\n{{template \"Epilog\" .}}\n\n{{define \"Prolog\"}}\n<html>\n\t<head>\n\t<title>/debug/requests</title>\n\t<style type=\"text/css\">\n\t\tbody {\n\t\t\tfont-family: sans-serif;\n\t\t}\n\t\ttable#tr-status td.family {\n\t\t\tpadding-right: 2em;\n\t\t}\n\t\ttable#tr-status td.active {\n\t\t\tpadding-right: 1em;\n\t\t}\n\t\ttable#tr-status td.latency-first {\n\t\t\tpadding-left: 1em;\n\t\t}\n\t\ttable#tr-status td.empty {\n\t\t\tcolor: #aaa;\n\t\t}\n\t\ttable#reqs {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\ttable#reqs tr.first {\n\t\t\t{{if $.Expanded}}font-weight: bold;{{end}}\n\t\t}\n\t\ttable#reqs td {\n\t\t\tfont-family: monospace;\n\t\t}\n\t\ttable#reqs td.when {\n\t\t\ttext-align: right;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\ttable#reqs td.elapsed {\n\t\t\tpadding: 0 0.5em;\n\t\t\ttext-align: right;\n\t\t\twhite-space: pre;\n\t\t\twidth: 10em;\n\t\t}\n\t\taddress {\n\t\t\tfont-size: smaller;\n\t\t\tmargin-top: 5em;\n\t\t}\n\t</style>\n\t</head>\n\t<body>\n\n<h1>/debug/requests</h1>\n{{end}} {{/* end of Prolog */}}\n\n{{define \"StatusTable\"}}\n<table id=\"tr-status\">\n\t{{range $fam := .Families}}\n\t<tr>\n\t\t<td class=\"family\">{{$fam}}</td>\n\n\t\t{{$n := index $.ActiveTraceCount $fam}}\n\t\t<td class=\"active {{if not $n}}empty{{end}}\">\n\t\t\t{{if $n}}<a href=\"?fam={{$fam}}&b=-1{{if $.Expanded}}&exp=1{{end}}\">{{end}}\n\t\t\t[{{$n}} active]\n\t\t\t{{if $n}}</a>{{end}}\n\t\t</td>\n\n\t\t{{$f := index $.CompletedTraces $fam}}\n\t\t{{range $i, $b := $f.Buckets}}\n\t\t{{$empty := $b.Empty}}\n\t\t<td {{if $empty}}class=\"empty\"{{end}}>\n\t\t{{if not $empty}}<a href=\"?fam={{$fam}}&b={{$i}}{{if $.Expanded}}&exp=1{{end}}\">{{end}}\n\t\t[{{.Cond}}]\n\t\t{{if not $empty}}</a>{{end}}\n\t\t</td>\n\t\t{{end}}\n\n\t\t{{$nb := len $f.Buckets}}\n\t\t<td class=\"latency-first\">\n\t\t<a href=\"?fam={{$fam}}&b={{$nb}}\">[minute]</a>\n\t\t</td>\n\t\t<td>\n\t\t<a href=\"?fam={{$fam}}&b={{add $nb 1}}\">[hour]</a>\n\t\t</td>\n\t\t<td>\n\t\t<a href=\"?fam={{$fam}}&b={{add $nb 2}}\">[total]</a>\n\t\t</td>\n\n\t</tr>\n\t{{end}}\n</table>\n{{end}} {{/* end of StatusTable */}}\n\n{{define \"Epilog\"}}\n{{if $.Traces}}\n<hr />\n<h3>Family: {{$.Family}}</h3>\n\n{{if or $.Expanded $.Traced}}\n  <a href=\"?fam={{$.Family}}&b={{$.Bucket}}\">[Normal/Summary]</a>\n{{else}}\n  [Normal/Summary]\n{{end}}\n\n{{if or (not $.Expanded) $.Traced}}\n  <a href=\"?fam={{$.Family}}&b={{$.Bucket}}&exp=1\">[Normal/Expanded]</a>\n{{else}}\n  [Normal/Expanded]\n{{end}}\n\n{{if not $.Active}}\n\t{{if or $.Expanded (not $.Traced)}}\n\t<a href=\"?fam={{$.Family}}&b={{$.Bucket}}&rtraced=1\">[Traced/Summary]</a>\n\t{{else}}\n\t[Traced/Summary]\n\t{{end}}\n\t{{if or (not $.Expanded) (not $.Traced)}}\n\t<a href=\"?fam={{$.Family}}&b={{$.Bucket}}&exp=1&rtraced=1\">[Traced/Expanded]</a>\n        {{else}}\n\t[Traced/Expanded]\n\t{{end}}\n{{end}}\n\n{{if $.Total}}\n<p><em>Showing <b>{{len $.Traces}}</b> of <b>{{$.Total}}</b> traces.</em></p>\n{{end}}\n\n<table id=\"reqs\">\n\t<caption>\n\t\t{{if $.Active}}Active{{else}}Completed{{end}} Requests\n\t</caption>\n\t<tr><th>When</th><th>Elapsed&nbsp;(s)</th></tr>\n\t{{range $tr := $.Traces}}\n\t<tr class=\"first\">\n\t\t<td class=\"when\">{{$tr.When}}</td>\n\t\t<td class=\"elapsed\">{{$tr.ElapsedTime}}</td>\n\t\t<td>{{$tr.Title}}</td>\n\t\t{{/* TODO: include traceID/spanID */}}\n\t</tr>\n\t{{if $.Expanded}}\n\t{{range $tr.Events}}\n\t<tr>\n\t\t<td class=\"when\">{{.WhenString}}</td>\n\t\t<td class=\"elapsed\">{{elapsed .Elapsed}}</td>\n\t\t<td>{{if or $.ShowSensitive (not .Sensitive)}}... {{.What}}{{else}}<em>[redacted]</em>{{end}}</td>\n\t</tr>\n\t{{end}}\n\t{{end}}\n\t{{end}}\n</table>\n{{end}} {{/* if $.Traces */}}\n\n{{if $.Histogram}}\n<h4>Latency (&micro;s) of {{$.Family}} over {{$.HistogramWindow}}</h4>\n{{$.Histogram}}\n{{end}} {{/* if $.Histogram */}}\n\n\t</body>\n</html>\n{{end}} {{/* end of Epilog */}}\n`\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/.travis.yml",
    "content": "language: go\n\ngo:\n  - tip\n\ninstall:\n  - export GOPATH=\"$HOME/gopath\"\n  - mkdir -p \"$GOPATH/src/golang.org/x\"\n  - mv \"$TRAVIS_BUILD_DIR\" \"$GOPATH/src/golang.org/x/oauth2\"\n  - go get -v -t -d golang.org/x/oauth2/...\n\nscript:\n  - go test -v golang.org/x/oauth2/...\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/CONTRIBUTING.md",
    "content": "# Contributing to Go\n\nGo is an open source project.\n\nIt is the work of hundreds of contributors. We appreciate your help!\n\n## Filing issues\n\nWhen [filing an issue](https://github.com/golang/oauth2/issues), make sure to answer these five questions:\n\n1.  What version of Go are you using (`go version`)?\n2.  What operating system and processor architecture are you using?\n3.  What did you do?\n4.  What did you expect to see?\n5.  What did you see instead?\n\nGeneral questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.\nThe gophers there will answer or ask you to file an issue if you've tripped over a bug.\n\n## Contributing code\n\nPlease read the [Contribution Guidelines](https://golang.org/doc/contribute.html)\nbefore sending patches.\n\nUnless otherwise noted, the Go source files are distributed under\nthe BSD-style license found in the LICENSE file.\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/README.md",
    "content": "# OAuth2 for Go\n\n[![Go Reference](https://pkg.go.dev/badge/golang.org/x/oauth2.svg)](https://pkg.go.dev/golang.org/x/oauth2)\n[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2)\n\noauth2 package contains a client implementation for OAuth 2.0 spec.\n\nSee pkg.go.dev for further documentation and examples.\n\n* [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2)\n* [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google)\n\n## Policy for new endpoints\n\nWe no longer accept new provider-specific packages in this repo if all\nthey do is add a single endpoint variable. If you just want to add a\nsingle endpoint, add it to the\n[pkg.go.dev/golang.org/x/oauth2/endpoints](https://pkg.go.dev/golang.org/x/oauth2/endpoints)\npackage.\n\n## Report Issues / Send Patches\n\nThe main issue tracker for the oauth2 repository is located at\nhttps://github.com/golang/oauth2/issues.\n\nThis repository uses Gerrit for code changes. To learn how to submit changes to\nthis repository, see https://go.dev/doc/contribute.\n\nThe git repository is https://go.googlesource.com/oauth2.\n\nNote:\n\n* Excluding trivial changes, all contributions should be connected to an existing issue.\n* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted.\n* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2).\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/deviceauth.go",
    "content": "package oauth2\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/oauth2/internal\"\n)\n\n// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5\nconst (\n\terrAuthorizationPending = \"authorization_pending\"\n\terrSlowDown             = \"slow_down\"\n\terrAccessDenied         = \"access_denied\"\n\terrExpiredToken         = \"expired_token\"\n)\n\n// DeviceAuthResponse describes a successful RFC 8628 Device Authorization Response\n// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2\ntype DeviceAuthResponse struct {\n\t// DeviceCode\n\tDeviceCode string `json:\"device_code\"`\n\t// UserCode is the code the user should enter at the verification uri\n\tUserCode string `json:\"user_code\"`\n\t// VerificationURI is where user should enter the user code\n\tVerificationURI string `json:\"verification_uri\"`\n\t// VerificationURIComplete (if populated) includes the user code in the verification URI. This is typically shown to the user in non-textual form, such as a QR code.\n\tVerificationURIComplete string `json:\"verification_uri_complete,omitempty\"`\n\t// Expiry is when the device code and user code expire\n\tExpiry time.Time `json:\"expires_in,omitempty\"`\n\t// Interval is the duration in seconds that Poll should wait between requests\n\tInterval int64 `json:\"interval,omitempty\"`\n}\n\nfunc (d DeviceAuthResponse) MarshalJSON() ([]byte, error) {\n\ttype Alias DeviceAuthResponse\n\tvar expiresIn int64\n\tif !d.Expiry.IsZero() {\n\t\texpiresIn = int64(time.Until(d.Expiry).Seconds())\n\t}\n\treturn json.Marshal(&struct {\n\t\tExpiresIn int64 `json:\"expires_in,omitempty\"`\n\t\t*Alias\n\t}{\n\t\tExpiresIn: expiresIn,\n\t\tAlias:     (*Alias)(&d),\n\t})\n\n}\n\nfunc (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {\n\ttype Alias DeviceAuthResponse\n\taux := &struct {\n\t\tExpiresIn int64 `json:\"expires_in\"`\n\t\t// workaround misspelling of verification_uri\n\t\tVerificationURL string `json:\"verification_url\"`\n\t\t*Alias\n\t}{\n\t\tAlias: (*Alias)(c),\n\t}\n\tif err := json.Unmarshal(data, &aux); err != nil {\n\t\treturn err\n\t}\n\tif aux.ExpiresIn != 0 {\n\t\tc.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn))\n\t}\n\tif c.VerificationURI == \"\" {\n\t\tc.VerificationURI = aux.VerificationURL\n\t}\n\treturn nil\n}\n\n// DeviceAuth returns a device auth struct which contains a device code\n// and authorization information provided for users to enter on another device.\nfunc (c *Config) DeviceAuth(ctx context.Context, opts ...AuthCodeOption) (*DeviceAuthResponse, error) {\n\t// https://datatracker.ietf.org/doc/html/rfc8628#section-3.1\n\tv := url.Values{\n\t\t\"client_id\": {c.ClientID},\n\t}\n\tif len(c.Scopes) > 0 {\n\t\tv.Set(\"scope\", strings.Join(c.Scopes, \" \"))\n\t}\n\tfor _, opt := range opts {\n\t\topt.setValue(v)\n\t}\n\treturn retrieveDeviceAuth(ctx, c, v)\n}\n\nfunc retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAuthResponse, error) {\n\tif c.Endpoint.DeviceAuthURL == \"\" {\n\t\treturn nil, errors.New(\"endpoint missing DeviceAuthURL\")\n\t}\n\n\treq, err := http.NewRequest(\"POST\", c.Endpoint.DeviceAuthURL, strings.NewReader(v.Encode()))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\treq.Header.Set(\"Accept\", \"application/json\")\n\n\tt := time.Now()\n\tr, err := internal.ContextClient(ctx).Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbody, err := io.ReadAll(io.LimitReader(r.Body, 1<<20))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oauth2: cannot auth device: %v\", err)\n\t}\n\tif code := r.StatusCode; code < 200 || code > 299 {\n\t\tretrieveError := &RetrieveError{\n\t\t\tResponse: r,\n\t\t\tBody:     body,\n\t\t}\n\n\t\tcontent, _, _ := mime.ParseMediaType(r.Header.Get(\"Content-Type\"))\n\t\tswitch content {\n\t\tcase \"application/x-www-form-urlencoded\", \"text/plain\":\n\t\t\t// some endpoints return a query string\n\t\t\tvals, err := url.ParseQuery(string(body))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, retrieveError\n\t\t\t}\n\t\t\tretrieveError.ErrorCode = vals.Get(\"error\")\n\t\t\tretrieveError.ErrorDescription = vals.Get(\"error_description\")\n\t\t\tretrieveError.ErrorURI = vals.Get(\"error_uri\")\n\t\tdefault:\n\t\t\tvar tj struct {\n\t\t\t\t// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2\n\t\t\t\tErrorCode        string `json:\"error\"`\n\t\t\t\tErrorDescription string `json:\"error_description\"`\n\t\t\t\tErrorURI         string `json:\"error_uri\"`\n\t\t\t}\n\t\t\tif json.Unmarshal(body, &tj) != nil {\n\t\t\t\treturn nil, retrieveError\n\t\t\t}\n\t\t\tretrieveError.ErrorCode = tj.ErrorCode\n\t\t\tretrieveError.ErrorDescription = tj.ErrorDescription\n\t\t\tretrieveError.ErrorURI = tj.ErrorURI\n\t\t}\n\n\t\treturn nil, retrieveError\n\t}\n\n\tda := &DeviceAuthResponse{}\n\terr = json.Unmarshal(body, &da)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unmarshal %s\", err)\n\t}\n\n\tif !da.Expiry.IsZero() {\n\t\t// Make a small adjustment to account for time taken by the request\n\t\tda.Expiry = da.Expiry.Add(-time.Since(t))\n\t}\n\n\treturn da, nil\n}\n\n// DeviceAccessToken polls the server to exchange a device code for a token.\nfunc (c *Config) DeviceAccessToken(ctx context.Context, da *DeviceAuthResponse, opts ...AuthCodeOption) (*Token, error) {\n\tif !da.Expiry.IsZero() {\n\t\tvar cancel context.CancelFunc\n\t\tctx, cancel = context.WithDeadline(ctx, da.Expiry)\n\t\tdefer cancel()\n\t}\n\n\t// https://datatracker.ietf.org/doc/html/rfc8628#section-3.4\n\tv := url.Values{\n\t\t\"client_id\":   {c.ClientID},\n\t\t\"grant_type\":  {\"urn:ietf:params:oauth:grant-type:device_code\"},\n\t\t\"device_code\": {da.DeviceCode},\n\t}\n\tif len(c.Scopes) > 0 {\n\t\tv.Set(\"scope\", strings.Join(c.Scopes, \" \"))\n\t}\n\tfor _, opt := range opts {\n\t\topt.setValue(v)\n\t}\n\n\t// \"If no value is provided, clients MUST use 5 as the default.\"\n\t// https://datatracker.ietf.org/doc/html/rfc8628#section-3.2\n\tinterval := da.Interval\n\tif interval == 0 {\n\t\tinterval = 5\n\t}\n\n\tticker := time.NewTicker(time.Duration(interval) * time.Second)\n\tdefer ticker.Stop()\n\tfor {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn nil, ctx.Err()\n\t\tcase <-ticker.C:\n\t\t\ttok, err := retrieveToken(ctx, c, v)\n\t\t\tif err == nil {\n\t\t\t\treturn tok, nil\n\t\t\t}\n\n\t\t\te, ok := err.(*RetrieveError)\n\t\t\tif !ok {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tswitch e.ErrorCode {\n\t\t\tcase errSlowDown:\n\t\t\t\t// https://datatracker.ietf.org/doc/html/rfc8628#section-3.5\n\t\t\t\t// \"the interval MUST be increased by 5 seconds for this and all subsequent requests\"\n\t\t\t\tinterval += 5\n\t\t\t\tticker.Reset(time.Duration(interval) * time.Second)\n\t\t\tcase errAuthorizationPending:\n\t\t\t\t// Do nothing.\n\t\t\tcase errAccessDenied, errExpiredToken:\n\t\t\t\tfallthrough\n\t\t\tdefault:\n\t\t\t\treturn tok, err\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/internal/doc.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package internal contains support packages for [golang.org/x/oauth2].\npackage internal\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/internal/oauth2.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage internal\n\nimport (\n\t\"crypto/rsa\"\n\t\"crypto/x509\"\n\t\"encoding/pem\"\n\t\"errors\"\n\t\"fmt\"\n)\n\n// ParseKey converts the binary contents of a private key file\n// to an [*rsa.PrivateKey]. It detects whether the private key is in a\n// PEM container or not. If so, it extracts the private key\n// from PEM container before conversion. It only supports PEM\n// containers with no passphrase.\nfunc ParseKey(key []byte) (*rsa.PrivateKey, error) {\n\tblock, _ := pem.Decode(key)\n\tif block != nil {\n\t\tkey = block.Bytes\n\t}\n\tparsedKey, err := x509.ParsePKCS8PrivateKey(key)\n\tif err != nil {\n\t\tparsedKey, err = x509.ParsePKCS1PrivateKey(key)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"private key should be a PEM or plain PKCS1 or PKCS8; parse error: %v\", err)\n\t\t}\n\t}\n\tparsed, ok := parsedKey.(*rsa.PrivateKey)\n\tif !ok {\n\t\treturn nil, errors.New(\"private key is invalid\")\n\t}\n\treturn parsed, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/internal/token.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage internal\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"mime\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n)\n\n// Token represents the credentials used to authorize\n// the requests to access protected resources on the OAuth 2.0\n// provider's backend.\n//\n// This type is a mirror of [golang.org/x/oauth2.Token] and exists to break\n// an otherwise-circular dependency. Other internal packages\n// should convert this Token into an [golang.org/x/oauth2.Token] before use.\ntype Token struct {\n\t// AccessToken is the token that authorizes and authenticates\n\t// the requests.\n\tAccessToken string\n\n\t// TokenType is the type of token.\n\t// The Type method returns either this or \"Bearer\", the default.\n\tTokenType string\n\n\t// RefreshToken is a token that's used by the application\n\t// (as opposed to the user) to refresh the access token\n\t// if it expires.\n\tRefreshToken string\n\n\t// Expiry is the optional expiration time of the access token.\n\t//\n\t// If zero, TokenSource implementations will reuse the same\n\t// token forever and RefreshToken or equivalent\n\t// mechanisms for that TokenSource will not be used.\n\tExpiry time.Time\n\n\t// ExpiresIn is the OAuth2 wire format \"expires_in\" field,\n\t// which specifies how many seconds later the token expires,\n\t// relative to an unknown time base approximately around \"now\".\n\t// It is the application's responsibility to populate\n\t// `Expiry` from `ExpiresIn` when required.\n\tExpiresIn int64 `json:\"expires_in,omitempty\"`\n\n\t// Raw optionally contains extra metadata from the server\n\t// when updating a token.\n\tRaw any\n}\n\n// tokenJSON is the struct representing the HTTP response from OAuth2\n// providers returning a token or error in JSON form.\n// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1\ntype tokenJSON struct {\n\tAccessToken  string         `json:\"access_token\"`\n\tTokenType    string         `json:\"token_type\"`\n\tRefreshToken string         `json:\"refresh_token\"`\n\tExpiresIn    expirationTime `json:\"expires_in\"` // at least PayPal returns string, while most return number\n\t// error fields\n\t// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2\n\tErrorCode        string `json:\"error\"`\n\tErrorDescription string `json:\"error_description\"`\n\tErrorURI         string `json:\"error_uri\"`\n}\n\nfunc (e *tokenJSON) expiry() (t time.Time) {\n\tif v := e.ExpiresIn; v != 0 {\n\t\treturn time.Now().Add(time.Duration(v) * time.Second)\n\t}\n\treturn\n}\n\ntype expirationTime int32\n\nfunc (e *expirationTime) UnmarshalJSON(b []byte) error {\n\tif len(b) == 0 || string(b) == \"null\" {\n\t\treturn nil\n\t}\n\tvar n json.Number\n\terr := json.Unmarshal(b, &n)\n\tif err != nil {\n\t\treturn err\n\t}\n\ti, err := n.Int64()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif i > math.MaxInt32 {\n\t\ti = math.MaxInt32\n\t}\n\t*e = expirationTime(i)\n\treturn nil\n}\n\n// AuthStyle is a copy of the golang.org/x/oauth2 package's AuthStyle type.\ntype AuthStyle int\n\nconst (\n\tAuthStyleUnknown  AuthStyle = 0\n\tAuthStyleInParams AuthStyle = 1\n\tAuthStyleInHeader AuthStyle = 2\n)\n\n// LazyAuthStyleCache is a backwards compatibility compromise to let Configs\n// have a lazily-initialized AuthStyleCache.\n//\n// The two users of this, oauth2.Config and oauth2/clientcredentials.Config,\n// both would ideally just embed an unexported AuthStyleCache but because both\n// were historically allowed to be copied by value we can't retroactively add an\n// uncopyable Mutex to them.\n//\n// We could use an atomic.Pointer, but that was added recently enough (in Go\n// 1.18) that we'd break Go 1.17 users where the tests as of 2023-08-03\n// still pass. By using an atomic.Value, it supports both Go 1.17 and\n// copying by value, even if that's not ideal.\ntype LazyAuthStyleCache struct {\n\tv atomic.Value // of *AuthStyleCache\n}\n\nfunc (lc *LazyAuthStyleCache) Get() *AuthStyleCache {\n\tif c, ok := lc.v.Load().(*AuthStyleCache); ok {\n\t\treturn c\n\t}\n\tc := new(AuthStyleCache)\n\tif !lc.v.CompareAndSwap(nil, c) {\n\t\tc = lc.v.Load().(*AuthStyleCache)\n\t}\n\treturn c\n}\n\ntype authStyleCacheKey struct {\n\turl      string\n\tclientID string\n}\n\n// AuthStyleCache is the set of tokenURLs we've successfully used via\n// RetrieveToken and which style auth we ended up using.\n// It's called a cache, but it doesn't (yet?) shrink. It's expected that\n// the set of OAuth2 servers a program contacts over time is fixed and\n// small.\ntype AuthStyleCache struct {\n\tmu sync.Mutex\n\tm  map[authStyleCacheKey]AuthStyle\n}\n\n// lookupAuthStyle reports which auth style we last used with tokenURL\n// when calling RetrieveToken and whether we have ever done so.\nfunc (c *AuthStyleCache) lookupAuthStyle(tokenURL, clientID string) (style AuthStyle, ok bool) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tstyle, ok = c.m[authStyleCacheKey{tokenURL, clientID}]\n\treturn\n}\n\n// setAuthStyle adds an entry to authStyleCache, documented above.\nfunc (c *AuthStyleCache) setAuthStyle(tokenURL, clientID string, v AuthStyle) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tif c.m == nil {\n\t\tc.m = make(map[authStyleCacheKey]AuthStyle)\n\t}\n\tc.m[authStyleCacheKey{tokenURL, clientID}] = v\n}\n\n// newTokenRequest returns a new *http.Request to retrieve a new token\n// from tokenURL using the provided clientID, clientSecret, and POST\n// body parameters.\n//\n// inParams is whether the clientID & clientSecret should be encoded\n// as the POST body. An 'inParams' value of true means to send it in\n// the POST body (along with any values in v); false means to send it\n// in the Authorization header.\nfunc newTokenRequest(tokenURL, clientID, clientSecret string, v url.Values, authStyle AuthStyle) (*http.Request, error) {\n\tif authStyle == AuthStyleInParams {\n\t\tv = cloneURLValues(v)\n\t\tif clientID != \"\" {\n\t\t\tv.Set(\"client_id\", clientID)\n\t\t}\n\t\tif clientSecret != \"\" {\n\t\t\tv.Set(\"client_secret\", clientSecret)\n\t\t}\n\t}\n\treq, err := http.NewRequest(\"POST\", tokenURL, strings.NewReader(v.Encode()))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\tif authStyle == AuthStyleInHeader {\n\t\treq.SetBasicAuth(url.QueryEscape(clientID), url.QueryEscape(clientSecret))\n\t}\n\treturn req, nil\n}\n\nfunc cloneURLValues(v url.Values) url.Values {\n\tv2 := make(url.Values, len(v))\n\tfor k, vv := range v {\n\t\tv2[k] = append([]string(nil), vv...)\n\t}\n\treturn v2\n}\n\nfunc RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values, authStyle AuthStyle, styleCache *AuthStyleCache) (*Token, error) {\n\tneedsAuthStyleProbe := authStyle == AuthStyleUnknown\n\tif needsAuthStyleProbe {\n\t\tif style, ok := styleCache.lookupAuthStyle(tokenURL, clientID); ok {\n\t\t\tauthStyle = style\n\t\t\tneedsAuthStyleProbe = false\n\t\t} else {\n\t\t\tauthStyle = AuthStyleInHeader // the first way we'll try\n\t\t}\n\t}\n\treq, err := newTokenRequest(tokenURL, clientID, clientSecret, v, authStyle)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttoken, err := doTokenRoundTrip(ctx, req)\n\tif err != nil && needsAuthStyleProbe {\n\t\t// If we get an error, assume the server wants the\n\t\t// clientID & clientSecret in a different form.\n\t\t// See https://code.google.com/p/goauth2/issues/detail?id=31 for background.\n\t\t// In summary:\n\t\t// - Reddit only accepts client secret in the Authorization header\n\t\t// - Dropbox accepts either it in URL param or Auth header, but not both.\n\t\t// - Google only accepts URL param (not spec compliant?), not Auth header\n\t\t// - Stripe only accepts client secret in Auth header with Bearer method, not Basic\n\t\t//\n\t\t// We used to maintain a big table in this code of all the sites and which way\n\t\t// they went, but maintaining it didn't scale & got annoying.\n\t\t// So just try both ways.\n\t\tauthStyle = AuthStyleInParams // the second way we'll try\n\t\treq, _ = newTokenRequest(tokenURL, clientID, clientSecret, v, authStyle)\n\t\ttoken, err = doTokenRoundTrip(ctx, req)\n\t}\n\tif needsAuthStyleProbe && err == nil {\n\t\tstyleCache.setAuthStyle(tokenURL, clientID, authStyle)\n\t}\n\t// Don't overwrite `RefreshToken` with an empty value\n\t// if this was a token refreshing request.\n\tif token != nil && token.RefreshToken == \"\" {\n\t\ttoken.RefreshToken = v.Get(\"refresh_token\")\n\t}\n\treturn token, err\n}\n\nfunc doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {\n\tr, err := ContextClient(ctx).Do(req.WithContext(ctx))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbody, err := io.ReadAll(io.LimitReader(r.Body, 1<<20))\n\tr.Body.Close()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"oauth2: cannot fetch token: %v\", err)\n\t}\n\n\tfailureStatus := r.StatusCode < 200 || r.StatusCode > 299\n\tretrieveError := &RetrieveError{\n\t\tResponse: r,\n\t\tBody:     body,\n\t\t// attempt to populate error detail below\n\t}\n\n\tvar token *Token\n\tcontent, _, _ := mime.ParseMediaType(r.Header.Get(\"Content-Type\"))\n\tswitch content {\n\tcase \"application/x-www-form-urlencoded\", \"text/plain\":\n\t\t// some endpoints return a query string\n\t\tvals, err := url.ParseQuery(string(body))\n\t\tif err != nil {\n\t\t\tif failureStatus {\n\t\t\t\treturn nil, retrieveError\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"oauth2: cannot parse response: %v\", err)\n\t\t}\n\t\tretrieveError.ErrorCode = vals.Get(\"error\")\n\t\tretrieveError.ErrorDescription = vals.Get(\"error_description\")\n\t\tretrieveError.ErrorURI = vals.Get(\"error_uri\")\n\t\ttoken = &Token{\n\t\t\tAccessToken:  vals.Get(\"access_token\"),\n\t\t\tTokenType:    vals.Get(\"token_type\"),\n\t\t\tRefreshToken: vals.Get(\"refresh_token\"),\n\t\t\tRaw:          vals,\n\t\t}\n\t\te := vals.Get(\"expires_in\")\n\t\texpires, _ := strconv.Atoi(e)\n\t\tif expires != 0 {\n\t\t\ttoken.Expiry = time.Now().Add(time.Duration(expires) * time.Second)\n\t\t}\n\tdefault:\n\t\tvar tj tokenJSON\n\t\tif err = json.Unmarshal(body, &tj); err != nil {\n\t\t\tif failureStatus {\n\t\t\t\treturn nil, retrieveError\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"oauth2: cannot parse json: %v\", err)\n\t\t}\n\t\tretrieveError.ErrorCode = tj.ErrorCode\n\t\tretrieveError.ErrorDescription = tj.ErrorDescription\n\t\tretrieveError.ErrorURI = tj.ErrorURI\n\t\ttoken = &Token{\n\t\t\tAccessToken:  tj.AccessToken,\n\t\t\tTokenType:    tj.TokenType,\n\t\t\tRefreshToken: tj.RefreshToken,\n\t\t\tExpiry:       tj.expiry(),\n\t\t\tExpiresIn:    int64(tj.ExpiresIn),\n\t\t\tRaw:          make(map[string]any),\n\t\t}\n\t\tjson.Unmarshal(body, &token.Raw) // no error checks for optional fields\n\t}\n\t// according to spec, servers should respond status 400 in error case\n\t// https://www.rfc-editor.org/rfc/rfc6749#section-5.2\n\t// but some unorthodox servers respond 200 in error case\n\tif failureStatus || retrieveError.ErrorCode != \"\" {\n\t\treturn nil, retrieveError\n\t}\n\tif token.AccessToken == \"\" {\n\t\treturn nil, errors.New(\"oauth2: server response missing access_token\")\n\t}\n\treturn token, nil\n}\n\n// mirrors oauth2.RetrieveError\ntype RetrieveError struct {\n\tResponse         *http.Response\n\tBody             []byte\n\tErrorCode        string\n\tErrorDescription string\n\tErrorURI         string\n}\n\nfunc (r *RetrieveError) Error() string {\n\tif r.ErrorCode != \"\" {\n\t\ts := fmt.Sprintf(\"oauth2: %q\", r.ErrorCode)\n\t\tif r.ErrorDescription != \"\" {\n\t\t\ts += fmt.Sprintf(\" %q\", r.ErrorDescription)\n\t\t}\n\t\tif r.ErrorURI != \"\" {\n\t\t\ts += fmt.Sprintf(\" %q\", r.ErrorURI)\n\t\t}\n\t\treturn s\n\t}\n\treturn fmt.Sprintf(\"oauth2: cannot fetch token: %v\\nResponse: %s\", r.Response.Status, r.Body)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/internal/transport.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage internal\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\n// HTTPClient is the context key to use with [context.WithValue]\n// to associate an [*http.Client] value with a context.\nvar HTTPClient ContextKey\n\n// ContextKey is just an empty struct. It exists so HTTPClient can be\n// an immutable public variable with a unique type. It's immutable\n// because nobody else can create a ContextKey, being unexported.\ntype ContextKey struct{}\n\nfunc ContextClient(ctx context.Context) *http.Client {\n\tif ctx != nil {\n\t\tif hc, ok := ctx.Value(HTTPClient).(*http.Client); ok {\n\t\t\treturn hc\n\t\t}\n\t}\n\treturn http.DefaultClient\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/oauth2.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package oauth2 provides support for making\n// OAuth2 authorized and authenticated HTTP requests,\n// as specified in RFC 6749.\n// It can additionally grant authorization with Bearer JWT.\npackage oauth2 // import \"golang.org/x/oauth2\"\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"golang.org/x/oauth2/internal\"\n)\n\n// NoContext is the default context you should supply if not using\n// your own [context.Context].\n//\n// Deprecated: Use [context.Background] or [context.TODO] instead.\nvar NoContext = context.TODO()\n\n// RegisterBrokenAuthHeaderProvider previously did something. It is now a no-op.\n//\n// Deprecated: this function no longer does anything. Caller code that\n// wants to avoid potential extra HTTP requests made during\n// auto-probing of the provider's auth style should set\n// Endpoint.AuthStyle.\nfunc RegisterBrokenAuthHeaderProvider(tokenURL string) {}\n\n// Config describes a typical 3-legged OAuth2 flow, with both the\n// client application information and the server's endpoint URLs.\n// For the client credentials 2-legged OAuth2 flow, see the\n// [golang.org/x/oauth2/clientcredentials] package.\ntype Config struct {\n\t// ClientID is the application's ID.\n\tClientID string\n\n\t// ClientSecret is the application's secret.\n\tClientSecret string\n\n\t// Endpoint contains the authorization server's token endpoint\n\t// URLs. These are constants specific to each server and are\n\t// often available via site-specific packages, such as\n\t// google.Endpoint or github.Endpoint.\n\tEndpoint Endpoint\n\n\t// RedirectURL is the URL to redirect users going through\n\t// the OAuth flow, after the resource owner's URLs.\n\tRedirectURL string\n\n\t// Scopes specifies optional requested permissions.\n\tScopes []string\n\n\t// authStyleCache caches which auth style to use when Endpoint.AuthStyle is\n\t// the zero value (AuthStyleAutoDetect).\n\tauthStyleCache internal.LazyAuthStyleCache\n}\n\n// A TokenSource is anything that can return a token.\ntype TokenSource interface {\n\t// Token returns a token or an error.\n\t// Token must be safe for concurrent use by multiple goroutines.\n\t// The returned Token must not be modified.\n\tToken() (*Token, error)\n}\n\n// Endpoint represents an OAuth 2.0 provider's authorization and token\n// endpoint URLs.\ntype Endpoint struct {\n\tAuthURL       string\n\tDeviceAuthURL string\n\tTokenURL      string\n\n\t// AuthStyle optionally specifies how the endpoint wants the\n\t// client ID & client secret sent. The zero value means to\n\t// auto-detect.\n\tAuthStyle AuthStyle\n}\n\n// AuthStyle represents how requests for tokens are authenticated\n// to the server.\ntype AuthStyle int\n\nconst (\n\t// AuthStyleAutoDetect means to auto-detect which authentication\n\t// style the provider wants by trying both ways and caching\n\t// the successful way for the future.\n\tAuthStyleAutoDetect AuthStyle = 0\n\n\t// AuthStyleInParams sends the \"client_id\" and \"client_secret\"\n\t// in the POST body as application/x-www-form-urlencoded parameters.\n\tAuthStyleInParams AuthStyle = 1\n\n\t// AuthStyleInHeader sends the client_id and client_secret\n\t// using HTTP Basic Authorization. This is an optional style\n\t// described in the OAuth2 RFC 6749 section 2.3.1.\n\tAuthStyleInHeader AuthStyle = 2\n)\n\nvar (\n\t// AccessTypeOnline and AccessTypeOffline are options passed\n\t// to the Options.AuthCodeURL method. They modify the\n\t// \"access_type\" field that gets sent in the URL returned by\n\t// AuthCodeURL.\n\t//\n\t// Online is the default if neither is specified. If your\n\t// application needs to refresh access tokens when the user\n\t// is not present at the browser, then use offline. This will\n\t// result in your application obtaining a refresh token the\n\t// first time your application exchanges an authorization\n\t// code for a user.\n\tAccessTypeOnline  AuthCodeOption = SetAuthURLParam(\"access_type\", \"online\")\n\tAccessTypeOffline AuthCodeOption = SetAuthURLParam(\"access_type\", \"offline\")\n\n\t// ApprovalForce forces the users to view the consent dialog\n\t// and confirm the permissions request at the URL returned\n\t// from AuthCodeURL, even if they've already done so.\n\tApprovalForce AuthCodeOption = SetAuthURLParam(\"prompt\", \"consent\")\n)\n\n// An AuthCodeOption is passed to Config.AuthCodeURL.\ntype AuthCodeOption interface {\n\tsetValue(url.Values)\n}\n\ntype setParam struct{ k, v string }\n\nfunc (p setParam) setValue(m url.Values) { m.Set(p.k, p.v) }\n\n// SetAuthURLParam builds an [AuthCodeOption] which passes key/value parameters\n// to a provider's authorization endpoint.\nfunc SetAuthURLParam(key, value string) AuthCodeOption {\n\treturn setParam{key, value}\n}\n\n// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page\n// that asks for permissions for the required scopes explicitly.\n//\n// State is an opaque value used by the client to maintain state between the\n// request and callback. The authorization server includes this value when\n// redirecting the user agent back to the client.\n//\n// Opts may include [AccessTypeOnline] or [AccessTypeOffline], as well\n// as [ApprovalForce].\n//\n// To protect against CSRF attacks, opts should include a PKCE challenge\n// (S256ChallengeOption). Not all servers support PKCE. An alternative is to\n// generate a random state parameter and verify it after exchange.\n// See https://datatracker.ietf.org/doc/html/rfc6749#section-10.12 (predating\n// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and\n// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)\nfunc (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {\n\tvar buf strings.Builder\n\tbuf.WriteString(c.Endpoint.AuthURL)\n\tv := url.Values{\n\t\t\"response_type\": {\"code\"},\n\t\t\"client_id\":     {c.ClientID},\n\t}\n\tif c.RedirectURL != \"\" {\n\t\tv.Set(\"redirect_uri\", c.RedirectURL)\n\t}\n\tif len(c.Scopes) > 0 {\n\t\tv.Set(\"scope\", strings.Join(c.Scopes, \" \"))\n\t}\n\tif state != \"\" {\n\t\tv.Set(\"state\", state)\n\t}\n\tfor _, opt := range opts {\n\t\topt.setValue(v)\n\t}\n\tif strings.Contains(c.Endpoint.AuthURL, \"?\") {\n\t\tbuf.WriteByte('&')\n\t} else {\n\t\tbuf.WriteByte('?')\n\t}\n\tbuf.WriteString(v.Encode())\n\treturn buf.String()\n}\n\n// PasswordCredentialsToken converts a resource owner username and password\n// pair into a token.\n//\n// Per the RFC, this grant type should only be used \"when there is a high\n// degree of trust between the resource owner and the client (e.g., the client\n// is part of the device operating system or a highly privileged application),\n// and when other authorization grant types are not available.\"\n// See https://tools.ietf.org/html/rfc6749#section-4.3 for more info.\n//\n// The provided context optionally controls which HTTP client is used. See the [HTTPClient] variable.\nfunc (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) {\n\tv := url.Values{\n\t\t\"grant_type\": {\"password\"},\n\t\t\"username\":   {username},\n\t\t\"password\":   {password},\n\t}\n\tif len(c.Scopes) > 0 {\n\t\tv.Set(\"scope\", strings.Join(c.Scopes, \" \"))\n\t}\n\treturn retrieveToken(ctx, c, v)\n}\n\n// Exchange converts an authorization code into a token.\n//\n// It is used after a resource provider redirects the user back\n// to the Redirect URI (the URL obtained from AuthCodeURL).\n//\n// The provided context optionally controls which HTTP client is used. See the [HTTPClient] variable.\n//\n// The code will be in the [http.Request.FormValue](\"code\"). Before\n// calling Exchange, be sure to validate [http.Request.FormValue](\"state\") if you are\n// using it to protect against CSRF attacks.\n//\n// If using PKCE to protect against CSRF attacks, opts should include a\n// VerifierOption.\nfunc (c *Config) Exchange(ctx context.Context, code string, opts ...AuthCodeOption) (*Token, error) {\n\tv := url.Values{\n\t\t\"grant_type\": {\"authorization_code\"},\n\t\t\"code\":       {code},\n\t}\n\tif c.RedirectURL != \"\" {\n\t\tv.Set(\"redirect_uri\", c.RedirectURL)\n\t}\n\tfor _, opt := range opts {\n\t\topt.setValue(v)\n\t}\n\treturn retrieveToken(ctx, c, v)\n}\n\n// Client returns an HTTP client using the provided token.\n// The token will auto-refresh as necessary. The underlying\n// HTTP transport will be obtained using the provided context.\n// The returned client and its Transport should not be modified.\nfunc (c *Config) Client(ctx context.Context, t *Token) *http.Client {\n\treturn NewClient(ctx, c.TokenSource(ctx, t))\n}\n\n// TokenSource returns a [TokenSource] that returns t until t expires,\n// automatically refreshing it as necessary using the provided context.\n//\n// Most users will use [Config.Client] instead.\nfunc (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource {\n\ttkr := &tokenRefresher{\n\t\tctx:  ctx,\n\t\tconf: c,\n\t}\n\tif t != nil {\n\t\ttkr.refreshToken = t.RefreshToken\n\t}\n\treturn &reuseTokenSource{\n\t\tt:   t,\n\t\tnew: tkr,\n\t}\n}\n\n// tokenRefresher is a TokenSource that makes \"grant_type=refresh_token\"\n// HTTP requests to renew a token using a RefreshToken.\ntype tokenRefresher struct {\n\tctx          context.Context // used to get HTTP requests\n\tconf         *Config\n\trefreshToken string\n}\n\n// WARNING: Token is not safe for concurrent access, as it\n// updates the tokenRefresher's refreshToken field.\n// Within this package, it is used by reuseTokenSource which\n// synchronizes calls to this method with its own mutex.\nfunc (tf *tokenRefresher) Token() (*Token, error) {\n\tif tf.refreshToken == \"\" {\n\t\treturn nil, errors.New(\"oauth2: token expired and refresh token is not set\")\n\t}\n\n\ttk, err := retrieveToken(tf.ctx, tf.conf, url.Values{\n\t\t\"grant_type\":    {\"refresh_token\"},\n\t\t\"refresh_token\": {tf.refreshToken},\n\t})\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif tf.refreshToken != tk.RefreshToken {\n\t\ttf.refreshToken = tk.RefreshToken\n\t}\n\treturn tk, nil\n}\n\n// reuseTokenSource is a TokenSource that holds a single token in memory\n// and validates its expiry before each call to retrieve it with\n// Token. If it's expired, it will be auto-refreshed using the\n// new TokenSource.\ntype reuseTokenSource struct {\n\tnew TokenSource // called when t is expired.\n\n\tmu sync.Mutex // guards t\n\tt  *Token\n\n\texpiryDelta time.Duration\n}\n\n// Token returns the current token if it's still valid, else will\n// refresh the current token and return the new one.\nfunc (s *reuseTokenSource) Token() (*Token, error) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\tif s.t.Valid() {\n\t\treturn s.t, nil\n\t}\n\tt, err := s.new.Token()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt.expiryDelta = s.expiryDelta\n\ts.t = t\n\treturn t, nil\n}\n\n// StaticTokenSource returns a [TokenSource] that always returns the same token.\n// Because the provided token t is never refreshed, StaticTokenSource is only\n// useful for tokens that never expire.\nfunc StaticTokenSource(t *Token) TokenSource {\n\treturn staticTokenSource{t}\n}\n\n// staticTokenSource is a TokenSource that always returns the same Token.\ntype staticTokenSource struct {\n\tt *Token\n}\n\nfunc (s staticTokenSource) Token() (*Token, error) {\n\treturn s.t, nil\n}\n\n// HTTPClient is the context key to use with [context.WithValue]\n// to associate a [*http.Client] value with a context.\nvar HTTPClient internal.ContextKey\n\n// NewClient creates an [*http.Client] from a [context.Context] and [TokenSource].\n// The returned client is not valid beyond the lifetime of the context.\n//\n// Note that if a custom [*http.Client] is provided via the [context.Context] it\n// is used only for token acquisition and is not used to configure the\n// [*http.Client] returned from NewClient.\n//\n// As a special case, if src is nil, a non-OAuth2 client is returned\n// using the provided context. This exists to support related OAuth2\n// packages.\nfunc NewClient(ctx context.Context, src TokenSource) *http.Client {\n\tif src == nil {\n\t\treturn internal.ContextClient(ctx)\n\t}\n\tcc := internal.ContextClient(ctx)\n\treturn &http.Client{\n\t\tTransport: &Transport{\n\t\t\tBase:   cc.Transport,\n\t\t\tSource: ReuseTokenSource(nil, src),\n\t\t},\n\t\tCheckRedirect: cc.CheckRedirect,\n\t\tJar:           cc.Jar,\n\t\tTimeout:       cc.Timeout,\n\t}\n}\n\n// ReuseTokenSource returns a [TokenSource] which repeatedly returns the\n// same token as long as it's valid, starting with t.\n// When its cached token is invalid, a new token is obtained from src.\n//\n// ReuseTokenSource is typically used to reuse tokens from a cache\n// (such as a file on disk) between runs of a program, rather than\n// obtaining new tokens unnecessarily.\n//\n// The initial token t may be nil, in which case the [TokenSource] is\n// wrapped in a caching version if it isn't one already. This also\n// means it's always safe to wrap ReuseTokenSource around any other\n// [TokenSource] without adverse effects.\nfunc ReuseTokenSource(t *Token, src TokenSource) TokenSource {\n\t// Don't wrap a reuseTokenSource in itself. That would work,\n\t// but cause an unnecessary number of mutex operations.\n\t// Just build the equivalent one.\n\tif rt, ok := src.(*reuseTokenSource); ok {\n\t\tif t == nil {\n\t\t\t// Just use it directly.\n\t\t\treturn rt\n\t\t}\n\t\tsrc = rt.new\n\t}\n\treturn &reuseTokenSource{\n\t\tt:   t,\n\t\tnew: src,\n\t}\n}\n\n// ReuseTokenSourceWithExpiry returns a [TokenSource] that acts in the same manner as the\n// [TokenSource] returned by [ReuseTokenSource], except the expiry buffer is\n// configurable. The expiration time of a token is calculated as\n// t.Expiry.Add(-earlyExpiry).\nfunc ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource {\n\t// Don't wrap a reuseTokenSource in itself. That would work,\n\t// but cause an unnecessary number of mutex operations.\n\t// Just build the equivalent one.\n\tif rt, ok := src.(*reuseTokenSource); ok {\n\t\tif t == nil {\n\t\t\t// Just use it directly, but set the expiryDelta to earlyExpiry,\n\t\t\t// so the behavior matches what the user expects.\n\t\t\trt.expiryDelta = earlyExpiry\n\t\t\treturn rt\n\t\t}\n\t\tsrc = rt.new\n\t}\n\tif t != nil {\n\t\tt.expiryDelta = earlyExpiry\n\t}\n\treturn &reuseTokenSource{\n\t\tt:           t,\n\t\tnew:         src,\n\t\texpiryDelta: earlyExpiry,\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/pkce.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage oauth2\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"net/url\"\n)\n\nconst (\n\tcodeChallengeKey       = \"code_challenge\"\n\tcodeChallengeMethodKey = \"code_challenge_method\"\n\tcodeVerifierKey        = \"code_verifier\"\n)\n\n// GenerateVerifier generates a PKCE code verifier with 32 octets of randomness.\n// This follows recommendations in RFC 7636.\n//\n// A fresh verifier should be generated for each authorization.\n// The resulting verifier should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth]\n// with [S256ChallengeOption], and to [Config.Exchange] or [Config.DeviceAccessToken]\n// with [VerifierOption].\nfunc GenerateVerifier() string {\n\t// \"RECOMMENDED that the output of a suitable random number generator be\n\t// used to create a 32-octet sequence.  The octet sequence is then\n\t// base64url-encoded to produce a 43-octet URL-safe string to use as the\n\t// code verifier.\"\n\t// https://datatracker.ietf.org/doc/html/rfc7636#section-4.1\n\tdata := make([]byte, 32)\n\tif _, err := rand.Read(data); err != nil {\n\t\tpanic(err)\n\t}\n\treturn base64.RawURLEncoding.EncodeToString(data)\n}\n\n// VerifierOption returns a PKCE code verifier [AuthCodeOption]. It should only be\n// passed to [Config.Exchange] or [Config.DeviceAccessToken].\nfunc VerifierOption(verifier string) AuthCodeOption {\n\treturn setParam{k: codeVerifierKey, v: verifier}\n}\n\n// S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256.\n//\n// Prefer to use [S256ChallengeOption] where possible.\nfunc S256ChallengeFromVerifier(verifier string) string {\n\tsha := sha256.Sum256([]byte(verifier))\n\treturn base64.RawURLEncoding.EncodeToString(sha[:])\n}\n\n// S256ChallengeOption derives a PKCE code challenge from the verifier with\n// method S256. It should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth]\n// only.\nfunc S256ChallengeOption(verifier string) AuthCodeOption {\n\treturn challengeOption{\n\t\tchallenge_method: \"S256\",\n\t\tchallenge:        S256ChallengeFromVerifier(verifier),\n\t}\n}\n\ntype challengeOption struct{ challenge_method, challenge string }\n\nfunc (p challengeOption) setValue(m url.Values) {\n\tm.Set(codeChallengeMethodKey, p.challenge_method)\n\tm.Set(codeChallengeKey, p.challenge)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/token.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage oauth2\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/oauth2/internal\"\n)\n\n// defaultExpiryDelta determines how earlier a token should be considered\n// expired than its actual expiration time. It is used to avoid late\n// expirations due to client-server time mismatches.\nconst defaultExpiryDelta = 10 * time.Second\n\n// Token represents the credentials used to authorize\n// the requests to access protected resources on the OAuth 2.0\n// provider's backend.\n//\n// Most users of this package should not access fields of Token\n// directly. They're exported mostly for use by related packages\n// implementing derivative OAuth2 flows.\ntype Token struct {\n\t// AccessToken is the token that authorizes and authenticates\n\t// the requests.\n\tAccessToken string `json:\"access_token\"`\n\n\t// TokenType is the type of token.\n\t// The Type method returns either this or \"Bearer\", the default.\n\tTokenType string `json:\"token_type,omitempty\"`\n\n\t// RefreshToken is a token that's used by the application\n\t// (as opposed to the user) to refresh the access token\n\t// if it expires.\n\tRefreshToken string `json:\"refresh_token,omitempty\"`\n\n\t// Expiry is the optional expiration time of the access token.\n\t//\n\t// If zero, [TokenSource] implementations will reuse the same\n\t// token forever and RefreshToken or equivalent\n\t// mechanisms for that TokenSource will not be used.\n\tExpiry time.Time `json:\"expiry,omitempty\"`\n\n\t// ExpiresIn is the OAuth2 wire format \"expires_in\" field,\n\t// which specifies how many seconds later the token expires,\n\t// relative to an unknown time base approximately around \"now\".\n\t// It is the application's responsibility to populate\n\t// `Expiry` from `ExpiresIn` when required.\n\tExpiresIn int64 `json:\"expires_in,omitempty\"`\n\n\t// raw optionally contains extra metadata from the server\n\t// when updating a token.\n\traw any\n\n\t// expiryDelta is used to calculate when a token is considered\n\t// expired, by subtracting from Expiry. If zero, defaultExpiryDelta\n\t// is used.\n\texpiryDelta time.Duration\n}\n\n// Type returns t.TokenType if non-empty, else \"Bearer\".\nfunc (t *Token) Type() string {\n\tif strings.EqualFold(t.TokenType, \"bearer\") {\n\t\treturn \"Bearer\"\n\t}\n\tif strings.EqualFold(t.TokenType, \"mac\") {\n\t\treturn \"MAC\"\n\t}\n\tif strings.EqualFold(t.TokenType, \"basic\") {\n\t\treturn \"Basic\"\n\t}\n\tif t.TokenType != \"\" {\n\t\treturn t.TokenType\n\t}\n\treturn \"Bearer\"\n}\n\n// SetAuthHeader sets the Authorization header to r using the access\n// token in t.\n//\n// This method is unnecessary when using [Transport] or an HTTP Client\n// returned by this package.\nfunc (t *Token) SetAuthHeader(r *http.Request) {\n\tr.Header.Set(\"Authorization\", t.Type()+\" \"+t.AccessToken)\n}\n\n// WithExtra returns a new [Token] that's a clone of t, but using the\n// provided raw extra map. This is only intended for use by packages\n// implementing derivative OAuth2 flows.\nfunc (t *Token) WithExtra(extra any) *Token {\n\tt2 := new(Token)\n\t*t2 = *t\n\tt2.raw = extra\n\treturn t2\n}\n\n// Extra returns an extra field.\n// Extra fields are key-value pairs returned by the server as\n// part of the token retrieval response.\nfunc (t *Token) Extra(key string) any {\n\tif raw, ok := t.raw.(map[string]any); ok {\n\t\treturn raw[key]\n\t}\n\n\tvals, ok := t.raw.(url.Values)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\tv := vals.Get(key)\n\tswitch s := strings.TrimSpace(v); strings.Count(s, \".\") {\n\tcase 0: // Contains no \".\"; try to parse as int\n\t\tif i, err := strconv.ParseInt(s, 10, 64); err == nil {\n\t\t\treturn i\n\t\t}\n\tcase 1: // Contains a single \".\"; try to parse as float\n\t\tif f, err := strconv.ParseFloat(s, 64); err == nil {\n\t\t\treturn f\n\t\t}\n\t}\n\n\treturn v\n}\n\n// timeNow is time.Now but pulled out as a variable for tests.\nvar timeNow = time.Now\n\n// expired reports whether the token is expired.\n// t must be non-nil.\nfunc (t *Token) expired() bool {\n\tif t.Expiry.IsZero() {\n\t\treturn false\n\t}\n\n\texpiryDelta := defaultExpiryDelta\n\tif t.expiryDelta != 0 {\n\t\texpiryDelta = t.expiryDelta\n\t}\n\treturn t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow())\n}\n\n// Valid reports whether t is non-nil, has an AccessToken, and is not expired.\nfunc (t *Token) Valid() bool {\n\treturn t != nil && t.AccessToken != \"\" && !t.expired()\n}\n\n// tokenFromInternal maps an *internal.Token struct into\n// a *Token struct.\nfunc tokenFromInternal(t *internal.Token) *Token {\n\tif t == nil {\n\t\treturn nil\n\t}\n\treturn &Token{\n\t\tAccessToken:  t.AccessToken,\n\t\tTokenType:    t.TokenType,\n\t\tRefreshToken: t.RefreshToken,\n\t\tExpiry:       t.Expiry,\n\t\tExpiresIn:    t.ExpiresIn,\n\t\traw:          t.Raw,\n\t}\n}\n\n// retrieveToken takes a *Config and uses that to retrieve an *internal.Token.\n// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along\n// with an error.\nfunc retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) {\n\ttk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v, internal.AuthStyle(c.Endpoint.AuthStyle), c.authStyleCache.Get())\n\tif err != nil {\n\t\tif rErr, ok := err.(*internal.RetrieveError); ok {\n\t\t\treturn nil, (*RetrieveError)(rErr)\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn tokenFromInternal(tk), nil\n}\n\n// RetrieveError is the error returned when the token endpoint returns a\n// non-2XX HTTP status code or populates RFC 6749's 'error' parameter.\n// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2\ntype RetrieveError struct {\n\tResponse *http.Response\n\t// Body is the body that was consumed by reading Response.Body.\n\t// It may be truncated.\n\tBody []byte\n\t// ErrorCode is RFC 6749's 'error' parameter.\n\tErrorCode string\n\t// ErrorDescription is RFC 6749's 'error_description' parameter.\n\tErrorDescription string\n\t// ErrorURI is RFC 6749's 'error_uri' parameter.\n\tErrorURI string\n}\n\nfunc (r *RetrieveError) Error() string {\n\tif r.ErrorCode != \"\" {\n\t\ts := fmt.Sprintf(\"oauth2: %q\", r.ErrorCode)\n\t\tif r.ErrorDescription != \"\" {\n\t\t\ts += fmt.Sprintf(\" %q\", r.ErrorDescription)\n\t\t}\n\t\tif r.ErrorURI != \"\" {\n\t\t\ts += fmt.Sprintf(\" %q\", r.ErrorURI)\n\t\t}\n\t\treturn s\n\t}\n\treturn fmt.Sprintf(\"oauth2: cannot fetch token: %v\\nResponse: %s\", r.Response.Status, r.Body)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/oauth2/transport.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage oauth2\n\nimport (\n\t\"errors\"\n\t\"log\"\n\t\"net/http\"\n\t\"sync\"\n)\n\n// Transport is an [http.RoundTripper] that makes OAuth 2.0 HTTP requests,\n// wrapping a base [http.RoundTripper] and adding an Authorization header\n// with a token from the supplied [TokenSource].\n//\n// Transport is a low-level mechanism. Most code will use the\n// higher-level [Config.Client] method instead.\ntype Transport struct {\n\t// Source supplies the token to add to outgoing requests'\n\t// Authorization headers.\n\tSource TokenSource\n\n\t// Base is the base RoundTripper used to make HTTP requests.\n\t// If nil, http.DefaultTransport is used.\n\tBase http.RoundTripper\n}\n\n// RoundTrip authorizes and authenticates the request with an\n// access token from Transport's Source.\nfunc (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {\n\treqBodyClosed := false\n\tif req.Body != nil {\n\t\tdefer func() {\n\t\t\tif !reqBodyClosed {\n\t\t\t\treq.Body.Close()\n\t\t\t}\n\t\t}()\n\t}\n\n\tif t.Source == nil {\n\t\treturn nil, errors.New(\"oauth2: Transport's Source is nil\")\n\t}\n\ttoken, err := t.Source.Token()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treq2 := req.Clone(req.Context())\n\ttoken.SetAuthHeader(req2)\n\n\t// req.Body is assumed to be closed by the base RoundTripper.\n\treqBodyClosed = true\n\treturn t.base().RoundTrip(req2)\n}\n\nvar cancelOnce sync.Once\n\n// CancelRequest does nothing. It used to be a legacy cancellation mechanism\n// but now only logs on first use to warn that it's deprecated.\n//\n// Deprecated: use contexts for cancellation instead.\nfunc (t *Transport) CancelRequest(req *http.Request) {\n\tcancelOnce.Do(func() {\n\t\tlog.Printf(\"deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts\")\n\t})\n}\n\nfunc (t *Transport) base() http.RoundTripper {\n\tif t.Base != nil {\n\t\treturn t.Base\n\t}\n\treturn http.DefaultTransport\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sync/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/sync/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/sync/errgroup/errgroup.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package errgroup provides synchronization, error propagation, and Context\n// cancellation for groups of goroutines working on subtasks of a common task.\n//\n// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks\n// returning errors.\npackage errgroup\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n)\n\ntype token struct{}\n\n// A Group is a collection of goroutines working on subtasks that are part of\n// the same overall task. A Group should not be reused for different tasks.\n//\n// A zero Group is valid, has no limit on the number of active goroutines,\n// and does not cancel on error.\ntype Group struct {\n\tcancel func(error)\n\n\twg sync.WaitGroup\n\n\tsem chan token\n\n\terrOnce sync.Once\n\terr     error\n}\n\nfunc (g *Group) done() {\n\tif g.sem != nil {\n\t\t<-g.sem\n\t}\n\tg.wg.Done()\n}\n\n// WithContext returns a new Group and an associated Context derived from ctx.\n//\n// The derived Context is canceled the first time a function passed to Go\n// returns a non-nil error or the first time Wait returns, whichever occurs\n// first.\nfunc WithContext(ctx context.Context) (*Group, context.Context) {\n\tctx, cancel := context.WithCancelCause(ctx)\n\treturn &Group{cancel: cancel}, ctx\n}\n\n// Wait blocks until all function calls from the Go method have returned, then\n// returns the first non-nil error (if any) from them.\nfunc (g *Group) Wait() error {\n\tg.wg.Wait()\n\tif g.cancel != nil {\n\t\tg.cancel(g.err)\n\t}\n\treturn g.err\n}\n\n// Go calls the given function in a new goroutine.\n//\n// The first call to Go must happen before a Wait.\n// It blocks until the new goroutine can be added without the number of\n// goroutines in the group exceeding the configured limit.\n//\n// The first goroutine in the group that returns a non-nil error will\n// cancel the associated Context, if any. The error will be returned\n// by Wait.\nfunc (g *Group) Go(f func() error) {\n\tif g.sem != nil {\n\t\tg.sem <- token{}\n\t}\n\n\tg.wg.Add(1)\n\tgo func() {\n\t\tdefer g.done()\n\n\t\t// It is tempting to propagate panics from f()\n\t\t// up to the goroutine that calls Wait, but\n\t\t// it creates more problems than it solves:\n\t\t// - it delays panics arbitrarily,\n\t\t//   making bugs harder to detect;\n\t\t// - it turns f's panic stack into a mere value,\n\t\t//   hiding it from crash-monitoring tools;\n\t\t// - it risks deadlocks that hide the panic entirely,\n\t\t//   if f's panic leaves the program in a state\n\t\t//   that prevents the Wait call from being reached.\n\t\t// See #53757, #74275, #74304, #74306.\n\n\t\tif err := f(); err != nil {\n\t\t\tg.errOnce.Do(func() {\n\t\t\t\tg.err = err\n\t\t\t\tif g.cancel != nil {\n\t\t\t\t\tg.cancel(g.err)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}()\n}\n\n// TryGo calls the given function in a new goroutine only if the number of\n// active goroutines in the group is currently below the configured limit.\n//\n// The return value reports whether the goroutine was started.\nfunc (g *Group) TryGo(f func() error) bool {\n\tif g.sem != nil {\n\t\tselect {\n\t\tcase g.sem <- token{}:\n\t\t\t// Note: this allows barging iff channels in general allow barging.\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n\n\tg.wg.Add(1)\n\tgo func() {\n\t\tdefer g.done()\n\n\t\tif err := f(); err != nil {\n\t\t\tg.errOnce.Do(func() {\n\t\t\t\tg.err = err\n\t\t\t\tif g.cancel != nil {\n\t\t\t\t\tg.cancel(g.err)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}()\n\treturn true\n}\n\n// SetLimit limits the number of active goroutines in this group to at most n.\n// A negative value indicates no limit.\n// A limit of zero will prevent any new goroutines from being added.\n//\n// Any subsequent call to the Go method will block until it can add an active\n// goroutine without exceeding the configured limit.\n//\n// The limit must not be modified while any goroutines in the group are active.\nfunc (g *Group) SetLimit(n int) {\n\tif n < 0 {\n\t\tg.sem = nil\n\t\treturn\n\t}\n\tif active := len(g.sem); active != 0 {\n\t\tpanic(fmt.Errorf(\"errgroup: modify limit while %v goroutines in the group are still active\", active))\n\t}\n\tg.sem = make(chan token, n)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sync/semaphore/semaphore.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package semaphore provides a weighted semaphore implementation.\npackage semaphore // import \"golang.org/x/sync/semaphore\"\n\nimport (\n\t\"container/list\"\n\t\"context\"\n\t\"sync\"\n)\n\ntype waiter struct {\n\tn     int64\n\tready chan<- struct{} // Closed when semaphore acquired.\n}\n\n// NewWeighted creates a new weighted semaphore with the given\n// maximum combined weight for concurrent access.\nfunc NewWeighted(n int64) *Weighted {\n\tw := &Weighted{size: n}\n\treturn w\n}\n\n// Weighted provides a way to bound concurrent access to a resource.\n// The callers can request access with a given weight.\ntype Weighted struct {\n\tsize    int64\n\tcur     int64\n\tmu      sync.Mutex\n\twaiters list.List\n}\n\n// Acquire acquires the semaphore with a weight of n, blocking until resources\n// are available or ctx is done. On success, returns nil. On failure, returns\n// ctx.Err() and leaves the semaphore unchanged.\nfunc (s *Weighted) Acquire(ctx context.Context, n int64) error {\n\tdone := ctx.Done()\n\n\ts.mu.Lock()\n\tselect {\n\tcase <-done:\n\t\t// ctx becoming done has \"happened before\" acquiring the semaphore,\n\t\t// whether it became done before the call began or while we were\n\t\t// waiting for the mutex. We prefer to fail even if we could acquire\n\t\t// the mutex without blocking.\n\t\ts.mu.Unlock()\n\t\treturn ctx.Err()\n\tdefault:\n\t}\n\tif s.size-s.cur >= n && s.waiters.Len() == 0 {\n\t\t// Since we hold s.mu and haven't synchronized since checking done, if\n\t\t// ctx becomes done before we return here, it becoming done must have\n\t\t// \"happened concurrently\" with this call - it cannot \"happen before\"\n\t\t// we return in this branch. So, we're ok to always acquire here.\n\t\ts.cur += n\n\t\ts.mu.Unlock()\n\t\treturn nil\n\t}\n\n\tif n > s.size {\n\t\t// Don't make other Acquire calls block on one that's doomed to fail.\n\t\ts.mu.Unlock()\n\t\t<-done\n\t\treturn ctx.Err()\n\t}\n\n\tready := make(chan struct{})\n\tw := waiter{n: n, ready: ready}\n\telem := s.waiters.PushBack(w)\n\ts.mu.Unlock()\n\n\tselect {\n\tcase <-done:\n\t\ts.mu.Lock()\n\t\tselect {\n\t\tcase <-ready:\n\t\t\t// Acquired the semaphore after we were canceled.\n\t\t\t// Pretend we didn't and put the tokens back.\n\t\t\ts.cur -= n\n\t\t\ts.notifyWaiters()\n\t\tdefault:\n\t\t\tisFront := s.waiters.Front() == elem\n\t\t\ts.waiters.Remove(elem)\n\t\t\t// If we're at the front and there're extra tokens left, notify other waiters.\n\t\t\tif isFront && s.size > s.cur {\n\t\t\t\ts.notifyWaiters()\n\t\t\t}\n\t\t}\n\t\ts.mu.Unlock()\n\t\treturn ctx.Err()\n\n\tcase <-ready:\n\t\t// Acquired the semaphore. Check that ctx isn't already done.\n\t\t// We check the done channel instead of calling ctx.Err because we\n\t\t// already have the channel, and ctx.Err is O(n) with the nesting\n\t\t// depth of ctx.\n\t\tselect {\n\t\tcase <-done:\n\t\t\ts.Release(n)\n\t\t\treturn ctx.Err()\n\t\tdefault:\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// TryAcquire acquires the semaphore with a weight of n without blocking.\n// On success, returns true. On failure, returns false and leaves the semaphore unchanged.\nfunc (s *Weighted) TryAcquire(n int64) bool {\n\ts.mu.Lock()\n\tsuccess := s.size-s.cur >= n && s.waiters.Len() == 0\n\tif success {\n\t\ts.cur += n\n\t}\n\ts.mu.Unlock()\n\treturn success\n}\n\n// Release releases the semaphore with a weight of n.\nfunc (s *Weighted) Release(n int64) {\n\ts.mu.Lock()\n\ts.cur -= n\n\tif s.cur < 0 {\n\t\ts.mu.Unlock()\n\t\tpanic(\"semaphore: released more than held\")\n\t}\n\ts.notifyWaiters()\n\ts.mu.Unlock()\n}\n\nfunc (s *Weighted) notifyWaiters() {\n\tfor {\n\t\tnext := s.waiters.Front()\n\t\tif next == nil {\n\t\t\tbreak // No more waiters blocked.\n\t\t}\n\n\t\tw := next.Value.(waiter)\n\t\tif s.size-s.cur < w.n {\n\t\t\t// Not enough tokens for the next waiter.  We could keep going (to try to\n\t\t\t// find a waiter with a smaller request), but under load that could cause\n\t\t\t// starvation for large requests; instead, we leave all remaining waiters\n\t\t\t// blocked.\n\t\t\t//\n\t\t\t// Consider a semaphore used as a read-write lock, with N tokens, N\n\t\t\t// readers, and one writer.  Each reader can Acquire(1) to obtain a read\n\t\t\t// lock.  The writer can Acquire(N) to obtain a write lock, excluding all\n\t\t\t// of the readers.  If we allow the readers to jump ahead in the queue,\n\t\t\t// the writer will starve — there is always one token available for every\n\t\t\t// reader.\n\t\t\tbreak\n\t\t}\n\n\t\ts.cur += w.n\n\t\ts.waiters.Remove(next)\n\t\tclose(w.ready)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/sys/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go\n//\n\nTEXT ·syscall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·syscall6(SB)\n\nTEXT ·rawSyscall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·rawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && arm64 && gc\n\n#include \"textflag.h\"\n\nTEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctlbyname(SB)\nGLOBL\t·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && amd64 && gc\n\n#include \"textflag.h\"\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctlbyname(SB)\nGLOBL\t·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/byteorder.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"runtime\"\n)\n\n// byteOrder is a subset of encoding/binary.ByteOrder.\ntype byteOrder interface {\n\tUint32([]byte) uint32\n\tUint64([]byte) uint64\n}\n\ntype littleEndian struct{}\ntype bigEndian struct{}\n\nfunc (littleEndian) Uint32(b []byte) uint32 {\n\t_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808\n\treturn uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24\n}\n\nfunc (littleEndian) Uint64(b []byte) uint64 {\n\t_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808\n\treturn uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |\n\t\tuint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56\n}\n\nfunc (bigEndian) Uint32(b []byte) uint32 {\n\t_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808\n\treturn uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24\n}\n\nfunc (bigEndian) Uint64(b []byte) uint64 {\n\t_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808\n\treturn uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |\n\t\tuint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56\n}\n\n// hostByteOrder returns littleEndian on little-endian machines and\n// bigEndian on big-endian machines.\nfunc hostByteOrder() byteOrder {\n\tswitch runtime.GOARCH {\n\tcase \"386\", \"amd64\", \"amd64p32\",\n\t\t\"alpha\",\n\t\t\"arm\", \"arm64\",\n\t\t\"loong64\",\n\t\t\"mipsle\", \"mips64le\", \"mips64p32le\",\n\t\t\"nios2\",\n\t\t\"ppc64le\",\n\t\t\"riscv\", \"riscv64\",\n\t\t\"sh\":\n\t\treturn littleEndian{}\n\tcase \"armbe\", \"arm64be\",\n\t\t\"m68k\",\n\t\t\"mips\", \"mips64\", \"mips64p32\",\n\t\t\"ppc\", \"ppc64\",\n\t\t\"s390\", \"s390x\",\n\t\t\"shbe\",\n\t\t\"sparc\", \"sparc64\":\n\t\treturn bigEndian{}\n\t}\n\tpanic(\"unknown architecture\")\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package cpu implements processor feature detection for\n// various CPU architectures.\npackage cpu\n\nimport (\n\t\"os\"\n\t\"strings\"\n)\n\n// Initialized reports whether the CPU features were initialized.\n//\n// For some GOOS/GOARCH combinations initialization of the CPU features depends\n// on reading an operating specific file, e.g. /proc/self/auxv on linux/arm\n// Initialized will report false if reading the file fails.\nvar Initialized bool\n\n// CacheLinePad is used to pad structs to avoid false sharing.\ntype CacheLinePad struct{ _ [cacheLineSize]byte }\n\n// X86 contains the supported CPU features of the\n// current X86/AMD64 platform. If the current platform\n// is not X86/AMD64 then all feature flags are false.\n//\n// X86 is padded to avoid false sharing. Further the HasAVX\n// and HasAVX2 are only set if the OS supports XMM and YMM\n// registers in addition to the CPUID feature bit being set.\nvar X86 struct {\n\t_                   CacheLinePad\n\tHasAES              bool // AES hardware implementation (AES NI)\n\tHasADX              bool // Multi-precision add-carry instruction extensions\n\tHasAVX              bool // Advanced vector extension\n\tHasAVX2             bool // Advanced vector extension 2\n\tHasAVX512           bool // Advanced vector extension 512\n\tHasAVX512F          bool // Advanced vector extension 512 Foundation Instructions\n\tHasAVX512CD         bool // Advanced vector extension 512 Conflict Detection Instructions\n\tHasAVX512ER         bool // Advanced vector extension 512 Exponential and Reciprocal Instructions\n\tHasAVX512PF         bool // Advanced vector extension 512 Prefetch Instructions\n\tHasAVX512VL         bool // Advanced vector extension 512 Vector Length Extensions\n\tHasAVX512BW         bool // Advanced vector extension 512 Byte and Word Instructions\n\tHasAVX512DQ         bool // Advanced vector extension 512 Doubleword and Quadword Instructions\n\tHasAVX512IFMA       bool // Advanced vector extension 512 Integer Fused Multiply Add\n\tHasAVX512VBMI       bool // Advanced vector extension 512 Vector Byte Manipulation Instructions\n\tHasAVX5124VNNIW     bool // Advanced vector extension 512 Vector Neural Network Instructions Word variable precision\n\tHasAVX5124FMAPS     bool // Advanced vector extension 512 Fused Multiply Accumulation Packed Single precision\n\tHasAVX512VPOPCNTDQ  bool // Advanced vector extension 512 Double and quad word population count instructions\n\tHasAVX512VPCLMULQDQ bool // Advanced vector extension 512 Vector carry-less multiply operations\n\tHasAVX512VNNI       bool // Advanced vector extension 512 Vector Neural Network Instructions\n\tHasAVX512GFNI       bool // Advanced vector extension 512 Galois field New Instructions\n\tHasAVX512VAES       bool // Advanced vector extension 512 Vector AES instructions\n\tHasAVX512VBMI2      bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2\n\tHasAVX512BITALG     bool // Advanced vector extension 512 Bit Algorithms\n\tHasAVX512BF16       bool // Advanced vector extension 512 BFloat16 Instructions\n\tHasAMXTile          bool // Advanced Matrix Extension Tile instructions\n\tHasAMXInt8          bool // Advanced Matrix Extension Int8 instructions\n\tHasAMXBF16          bool // Advanced Matrix Extension BFloat16 instructions\n\tHasBMI1             bool // Bit manipulation instruction set 1\n\tHasBMI2             bool // Bit manipulation instruction set 2\n\tHasCX16             bool // Compare and exchange 16 Bytes\n\tHasERMS             bool // Enhanced REP for MOVSB and STOSB\n\tHasFMA              bool // Fused-multiply-add instructions\n\tHasOSXSAVE          bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.\n\tHasPCLMULQDQ        bool // PCLMULQDQ instruction - most often used for AES-GCM\n\tHasPOPCNT           bool // Hamming weight instruction POPCNT.\n\tHasRDRAND           bool // RDRAND instruction (on-chip random number generator)\n\tHasRDSEED           bool // RDSEED instruction (on-chip random number generator)\n\tHasSSE2             bool // Streaming SIMD extension 2 (always available on amd64)\n\tHasSSE3             bool // Streaming SIMD extension 3\n\tHasSSSE3            bool // Supplemental streaming SIMD extension 3\n\tHasSSE41            bool // Streaming SIMD extension 4 and 4.1\n\tHasSSE42            bool // Streaming SIMD extension 4 and 4.2\n\tHasAVXIFMA          bool // Advanced vector extension Integer Fused Multiply Add\n\tHasAVXVNNI          bool // Advanced vector extension Vector Neural Network Instructions\n\tHasAVXVNNIInt8      bool // Advanced vector extension Vector Neural Network Int8 instructions\n\t_                   CacheLinePad\n}\n\n// ARM64 contains the supported CPU features of the\n// current ARMv8(aarch64) platform. If the current platform\n// is not arm64 then all feature flags are false.\nvar ARM64 struct {\n\t_           CacheLinePad\n\tHasFP       bool // Floating-point instruction set (always available)\n\tHasASIMD    bool // Advanced SIMD (always available)\n\tHasEVTSTRM  bool // Event stream support\n\tHasAES      bool // AES hardware implementation\n\tHasPMULL    bool // Polynomial multiplication instruction set\n\tHasSHA1     bool // SHA1 hardware implementation\n\tHasSHA2     bool // SHA2 hardware implementation\n\tHasCRC32    bool // CRC32 hardware implementation\n\tHasATOMICS  bool // Atomic memory operation instruction set\n\tHasFPHP     bool // Half precision floating-point instruction set\n\tHasASIMDHP  bool // Advanced SIMD half precision instruction set\n\tHasCPUID    bool // CPUID identification scheme registers\n\tHasASIMDRDM bool // Rounding double multiply add/subtract instruction set\n\tHasJSCVT    bool // Javascript conversion from floating-point to integer\n\tHasFCMA     bool // Floating-point multiplication and addition of complex numbers\n\tHasLRCPC    bool // Release Consistent processor consistent support\n\tHasDCPOP    bool // Persistent memory support\n\tHasSHA3     bool // SHA3 hardware implementation\n\tHasSM3      bool // SM3 hardware implementation\n\tHasSM4      bool // SM4 hardware implementation\n\tHasASIMDDP  bool // Advanced SIMD double precision instruction set\n\tHasSHA512   bool // SHA512 hardware implementation\n\tHasSVE      bool // Scalable Vector Extensions\n\tHasSVE2     bool // Scalable Vector Extensions 2\n\tHasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32\n\tHasDIT      bool // Data Independent Timing support\n\tHasI8MM     bool // Advanced SIMD Int8 matrix multiplication instructions\n\t_           CacheLinePad\n}\n\n// ARM contains the supported CPU features of the current ARM (32-bit) platform.\n// All feature flags are false if:\n//  1. the current platform is not arm, or\n//  2. the current operating system is not Linux.\nvar ARM struct {\n\t_           CacheLinePad\n\tHasSWP      bool // SWP instruction support\n\tHasHALF     bool // Half-word load and store support\n\tHasTHUMB    bool // ARM Thumb instruction set\n\tHas26BIT    bool // Address space limited to 26-bits\n\tHasFASTMUL  bool // 32-bit operand, 64-bit result multiplication support\n\tHasFPA      bool // Floating point arithmetic support\n\tHasVFP      bool // Vector floating point support\n\tHasEDSP     bool // DSP Extensions support\n\tHasJAVA     bool // Java instruction set\n\tHasIWMMXT   bool // Intel Wireless MMX technology support\n\tHasCRUNCH   bool // MaverickCrunch context switching and handling\n\tHasTHUMBEE  bool // Thumb EE instruction set\n\tHasNEON     bool // NEON instruction set\n\tHasVFPv3    bool // Vector floating point version 3 support\n\tHasVFPv3D16 bool // Vector floating point version 3 D8-D15\n\tHasTLS      bool // Thread local storage support\n\tHasVFPv4    bool // Vector floating point version 4 support\n\tHasIDIVA    bool // Integer divide instruction support in ARM mode\n\tHasIDIVT    bool // Integer divide instruction support in Thumb mode\n\tHasVFPD32   bool // Vector floating point version 3 D15-D31\n\tHasLPAE     bool // Large Physical Address Extensions\n\tHasEVTSTRM  bool // Event stream support\n\tHasAES      bool // AES hardware implementation\n\tHasPMULL    bool // Polynomial multiplication instruction set\n\tHasSHA1     bool // SHA1 hardware implementation\n\tHasSHA2     bool // SHA2 hardware implementation\n\tHasCRC32    bool // CRC32 hardware implementation\n\t_           CacheLinePad\n}\n\n// The booleans in Loong64 contain the correspondingly named cpu feature bit.\n// The struct is padded to avoid false sharing.\nvar Loong64 struct {\n\t_         CacheLinePad\n\tHasLSX    bool // support 128-bit vector extension\n\tHasLASX   bool // support 256-bit vector extension\n\tHasCRC32  bool // support CRC instruction\n\tHasLAM_BH bool // support AM{SWAP/ADD}[_DB].{B/H} instruction\n\tHasLAMCAS bool // support AMCAS[_DB].{B/H/W/D} instruction\n\t_         CacheLinePad\n}\n\n// MIPS64X contains the supported CPU features of the current mips64/mips64le\n// platforms. If the current platform is not mips64/mips64le or the current\n// operating system is not Linux then all feature flags are false.\nvar MIPS64X struct {\n\t_      CacheLinePad\n\tHasMSA bool // MIPS SIMD architecture\n\t_      CacheLinePad\n}\n\n// PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms.\n// If the current platform is not ppc64/ppc64le then all feature flags are false.\n//\n// For ppc64/ppc64le, it is safe to check only for ISA level starting on ISA v3.00,\n// since there are no optional categories. There are some exceptions that also\n// require kernel support to work (DARN, SCV), so there are feature bits for\n// those as well. The struct is padded to avoid false sharing.\nvar PPC64 struct {\n\t_        CacheLinePad\n\tHasDARN  bool // Hardware random number generator (requires kernel enablement)\n\tHasSCV   bool // Syscall vectored (requires kernel enablement)\n\tIsPOWER8 bool // ISA v2.07 (POWER8)\n\tIsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8\n\t_        CacheLinePad\n}\n\n// S390X contains the supported CPU features of the current IBM Z\n// (s390x) platform. If the current platform is not IBM Z then all\n// feature flags are false.\n//\n// S390X is padded to avoid false sharing. Further HasVX is only set\n// if the OS supports vector registers in addition to the STFLE\n// feature bit being set.\nvar S390X struct {\n\t_         CacheLinePad\n\tHasZARCH  bool // z/Architecture mode is active [mandatory]\n\tHasSTFLE  bool // store facility list extended\n\tHasLDISP  bool // long (20-bit) displacements\n\tHasEIMM   bool // 32-bit immediates\n\tHasDFP    bool // decimal floating point\n\tHasETF3EH bool // ETF-3 enhanced\n\tHasMSA    bool // message security assist (CPACF)\n\tHasAES    bool // KM-AES{128,192,256} functions\n\tHasAESCBC bool // KMC-AES{128,192,256} functions\n\tHasAESCTR bool // KMCTR-AES{128,192,256} functions\n\tHasAESGCM bool // KMA-GCM-AES{128,192,256} functions\n\tHasGHASH  bool // KIMD-GHASH function\n\tHasSHA1   bool // K{I,L}MD-SHA-1 functions\n\tHasSHA256 bool // K{I,L}MD-SHA-256 functions\n\tHasSHA512 bool // K{I,L}MD-SHA-512 functions\n\tHasSHA3   bool // K{I,L}MD-SHA3-{224,256,384,512} and K{I,L}MD-SHAKE-{128,256} functions\n\tHasVX     bool // vector facility\n\tHasVXE    bool // vector-enhancements facility 1\n\t_         CacheLinePad\n}\n\n// RISCV64 contains the supported CPU features and performance characteristics for riscv64\n// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate\n// the presence of RISC-V extensions.\n//\n// It is safe to assume that all the RV64G extensions are supported and so they are omitted from\n// this structure. As riscv64 Go programs require at least RV64G, the code that populates\n// this structure cannot run successfully if some of the RV64G extensions are missing.\n// The struct is padded to avoid false sharing.\nvar RISCV64 struct {\n\t_                 CacheLinePad\n\tHasFastMisaligned bool // Fast misaligned accesses\n\tHasC              bool // Compressed instruction-set extension\n\tHasV              bool // Vector extension compatible with RVV 1.0\n\tHasZba            bool // Address generation instructions extension\n\tHasZbb            bool // Basic bit-manipulation extension\n\tHasZbs            bool // Single-bit instructions extension\n\tHasZvbb           bool // Vector Basic Bit-manipulation\n\tHasZvbc           bool // Vector Carryless Multiplication\n\tHasZvkb           bool // Vector Cryptography Bit-manipulation\n\tHasZvkt           bool // Vector Data-Independent Execution Latency\n\tHasZvkg           bool // Vector GCM/GMAC\n\tHasZvkn           bool // NIST Algorithm Suite (AES/SHA256/SHA512)\n\tHasZvknc          bool // NIST Algorithm Suite with carryless multiply\n\tHasZvkng          bool // NIST Algorithm Suite with GCM\n\tHasZvks           bool // ShangMi Algorithm Suite\n\tHasZvksc          bool // ShangMi Algorithm Suite with carryless multiplication\n\tHasZvksg          bool // ShangMi Algorithm Suite with GCM\n\t_                 CacheLinePad\n}\n\nfunc init() {\n\tarchInit()\n\tinitOptions()\n\tprocessOptions()\n}\n\n// options contains the cpu debug options that can be used in GODEBUG.\n// Options are arch dependent and are added by the arch specific initOptions functions.\n// Features that are mandatory for the specific GOARCH should have the Required field set\n// (e.g. SSE2 on amd64).\nvar options []option\n\n// Option names should be lower case. e.g. avx instead of AVX.\ntype option struct {\n\tName      string\n\tFeature   *bool\n\tSpecified bool // whether feature value was specified in GODEBUG\n\tEnable    bool // whether feature should be enabled\n\tRequired  bool // whether feature is mandatory and can not be disabled\n}\n\nfunc processOptions() {\n\tenv := os.Getenv(\"GODEBUG\")\nfield:\n\tfor env != \"\" {\n\t\tfield := \"\"\n\t\ti := strings.IndexByte(env, ',')\n\t\tif i < 0 {\n\t\t\tfield, env = env, \"\"\n\t\t} else {\n\t\t\tfield, env = env[:i], env[i+1:]\n\t\t}\n\t\tif len(field) < 4 || field[:4] != \"cpu.\" {\n\t\t\tcontinue\n\t\t}\n\t\ti = strings.IndexByte(field, '=')\n\t\tif i < 0 {\n\t\t\tprint(\"GODEBUG sys/cpu: no value specified for \\\"\", field, \"\\\"\\n\")\n\t\t\tcontinue\n\t\t}\n\t\tkey, value := field[4:i], field[i+1:] // e.g. \"SSE2\", \"on\"\n\n\t\tvar enable bool\n\t\tswitch value {\n\t\tcase \"on\":\n\t\t\tenable = true\n\t\tcase \"off\":\n\t\t\tenable = false\n\t\tdefault:\n\t\t\tprint(\"GODEBUG sys/cpu: value \\\"\", value, \"\\\" not supported for cpu option \\\"\", key, \"\\\"\\n\")\n\t\t\tcontinue field\n\t\t}\n\n\t\tif key == \"all\" {\n\t\t\tfor i := range options {\n\t\t\t\toptions[i].Specified = true\n\t\t\t\toptions[i].Enable = enable || options[i].Required\n\t\t\t}\n\t\t\tcontinue field\n\t\t}\n\n\t\tfor i := range options {\n\t\t\tif options[i].Name == key {\n\t\t\t\toptions[i].Specified = true\n\t\t\t\toptions[i].Enable = enable\n\t\t\t\tcontinue field\n\t\t\t}\n\t\t}\n\n\t\tprint(\"GODEBUG sys/cpu: unknown cpu feature \\\"\", key, \"\\\"\\n\")\n\t}\n\n\tfor _, o := range options {\n\t\tif !o.Specified {\n\t\t\tcontinue\n\t\t}\n\n\t\tif o.Enable && !*o.Feature {\n\t\t\tprint(\"GODEBUG sys/cpu: can not enable \\\"\", o.Name, \"\\\", missing CPU support\\n\")\n\t\t\tcontinue\n\t\t}\n\n\t\tif !o.Enable && o.Required {\n\t\t\tprint(\"GODEBUG sys/cpu: can not disable \\\"\", o.Name, \"\\\", required CPU feature\\n\")\n\t\t\tcontinue\n\t\t}\n\n\t\t*o.Feature = o.Enable\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_aix.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix\n\npackage cpu\n\nconst (\n\t// getsystemcfg constants\n\t_SC_IMPL     = 2\n\t_IMPL_POWER8 = 0x10000\n\t_IMPL_POWER9 = 0x20000\n)\n\nfunc archInit() {\n\timpl := getsystemcfg(_SC_IMPL)\n\tif impl&_IMPL_POWER8 != 0 {\n\t\tPPC64.IsPOWER8 = true\n\t}\n\tif impl&_IMPL_POWER9 != 0 {\n\t\tPPC64.IsPOWER8 = true\n\t\tPPC64.IsPOWER9 = true\n\t}\n\n\tInitialized = true\n}\n\nfunc getsystemcfg(label int) (n uint64) {\n\tr0, _ := callgetsystemcfg(label)\n\tn = uint64(r0)\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_arm.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nconst cacheLineSize = 32\n\n// HWCAP/HWCAP2 bits.\n// These are specific to Linux.\nconst (\n\thwcap_SWP       = 1 << 0\n\thwcap_HALF      = 1 << 1\n\thwcap_THUMB     = 1 << 2\n\thwcap_26BIT     = 1 << 3\n\thwcap_FAST_MULT = 1 << 4\n\thwcap_FPA       = 1 << 5\n\thwcap_VFP       = 1 << 6\n\thwcap_EDSP      = 1 << 7\n\thwcap_JAVA      = 1 << 8\n\thwcap_IWMMXT    = 1 << 9\n\thwcap_CRUNCH    = 1 << 10\n\thwcap_THUMBEE   = 1 << 11\n\thwcap_NEON      = 1 << 12\n\thwcap_VFPv3     = 1 << 13\n\thwcap_VFPv3D16  = 1 << 14\n\thwcap_TLS       = 1 << 15\n\thwcap_VFPv4     = 1 << 16\n\thwcap_IDIVA     = 1 << 17\n\thwcap_IDIVT     = 1 << 18\n\thwcap_VFPD32    = 1 << 19\n\thwcap_LPAE      = 1 << 20\n\thwcap_EVTSTRM   = 1 << 21\n\n\thwcap2_AES   = 1 << 0\n\thwcap2_PMULL = 1 << 1\n\thwcap2_SHA1  = 1 << 2\n\thwcap2_SHA2  = 1 << 3\n\thwcap2_CRC32 = 1 << 4\n)\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"pmull\", Feature: &ARM.HasPMULL},\n\t\t{Name: \"sha1\", Feature: &ARM.HasSHA1},\n\t\t{Name: \"sha2\", Feature: &ARM.HasSHA2},\n\t\t{Name: \"swp\", Feature: &ARM.HasSWP},\n\t\t{Name: \"thumb\", Feature: &ARM.HasTHUMB},\n\t\t{Name: \"thumbee\", Feature: &ARM.HasTHUMBEE},\n\t\t{Name: \"tls\", Feature: &ARM.HasTLS},\n\t\t{Name: \"vfp\", Feature: &ARM.HasVFP},\n\t\t{Name: \"vfpd32\", Feature: &ARM.HasVFPD32},\n\t\t{Name: \"vfpv3\", Feature: &ARM.HasVFPv3},\n\t\t{Name: \"vfpv3d16\", Feature: &ARM.HasVFPv3D16},\n\t\t{Name: \"vfpv4\", Feature: &ARM.HasVFPv4},\n\t\t{Name: \"half\", Feature: &ARM.HasHALF},\n\t\t{Name: \"26bit\", Feature: &ARM.Has26BIT},\n\t\t{Name: \"fastmul\", Feature: &ARM.HasFASTMUL},\n\t\t{Name: \"fpa\", Feature: &ARM.HasFPA},\n\t\t{Name: \"edsp\", Feature: &ARM.HasEDSP},\n\t\t{Name: \"java\", Feature: &ARM.HasJAVA},\n\t\t{Name: \"iwmmxt\", Feature: &ARM.HasIWMMXT},\n\t\t{Name: \"crunch\", Feature: &ARM.HasCRUNCH},\n\t\t{Name: \"neon\", Feature: &ARM.HasNEON},\n\t\t{Name: \"idivt\", Feature: &ARM.HasIDIVT},\n\t\t{Name: \"idiva\", Feature: &ARM.HasIDIVA},\n\t\t{Name: \"lpae\", Feature: &ARM.HasLPAE},\n\t\t{Name: \"evtstrm\", Feature: &ARM.HasEVTSTRM},\n\t\t{Name: \"aes\", Feature: &ARM.HasAES},\n\t\t{Name: \"crc32\", Feature: &ARM.HasCRC32},\n\t}\n\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport \"runtime\"\n\n// cacheLineSize is used to prevent false sharing of cache lines.\n// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size.\n// It doesn't cost much and is much more future-proof.\nconst cacheLineSize = 128\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"fp\", Feature: &ARM64.HasFP},\n\t\t{Name: \"asimd\", Feature: &ARM64.HasASIMD},\n\t\t{Name: \"evstrm\", Feature: &ARM64.HasEVTSTRM},\n\t\t{Name: \"aes\", Feature: &ARM64.HasAES},\n\t\t{Name: \"fphp\", Feature: &ARM64.HasFPHP},\n\t\t{Name: \"jscvt\", Feature: &ARM64.HasJSCVT},\n\t\t{Name: \"lrcpc\", Feature: &ARM64.HasLRCPC},\n\t\t{Name: \"pmull\", Feature: &ARM64.HasPMULL},\n\t\t{Name: \"sha1\", Feature: &ARM64.HasSHA1},\n\t\t{Name: \"sha2\", Feature: &ARM64.HasSHA2},\n\t\t{Name: \"sha3\", Feature: &ARM64.HasSHA3},\n\t\t{Name: \"sha512\", Feature: &ARM64.HasSHA512},\n\t\t{Name: \"sm3\", Feature: &ARM64.HasSM3},\n\t\t{Name: \"sm4\", Feature: &ARM64.HasSM4},\n\t\t{Name: \"sve\", Feature: &ARM64.HasSVE},\n\t\t{Name: \"sve2\", Feature: &ARM64.HasSVE2},\n\t\t{Name: \"crc32\", Feature: &ARM64.HasCRC32},\n\t\t{Name: \"atomics\", Feature: &ARM64.HasATOMICS},\n\t\t{Name: \"asimdhp\", Feature: &ARM64.HasASIMDHP},\n\t\t{Name: \"cpuid\", Feature: &ARM64.HasCPUID},\n\t\t{Name: \"asimrdm\", Feature: &ARM64.HasASIMDRDM},\n\t\t{Name: \"fcma\", Feature: &ARM64.HasFCMA},\n\t\t{Name: \"dcpop\", Feature: &ARM64.HasDCPOP},\n\t\t{Name: \"asimddp\", Feature: &ARM64.HasASIMDDP},\n\t\t{Name: \"asimdfhm\", Feature: &ARM64.HasASIMDFHM},\n\t\t{Name: \"dit\", Feature: &ARM64.HasDIT},\n\t\t{Name: \"i8mm\", Feature: &ARM64.HasI8MM},\n\t}\n}\n\nfunc archInit() {\n\tif runtime.GOOS == \"freebsd\" {\n\t\treadARM64Registers()\n\t} else {\n\t\t// Most platforms don't seem to allow directly reading these registers.\n\t\tdoinit()\n\t}\n}\n\n// setMinimalFeatures fakes the minimal ARM64 features expected by\n// TestARM64minimalFeatures.\nfunc setMinimalFeatures() {\n\tARM64.HasASIMD = true\n\tARM64.HasFP = true\n}\n\nfunc readARM64Registers() {\n\tInitialized = true\n\n\tparseARM64SystemRegisters(getisar0(), getisar1(), getpfr0())\n}\n\nfunc parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {\n\t// ID_AA64ISAR0_EL1\n\tswitch extractBits(isar0, 4, 7) {\n\tcase 1:\n\t\tARM64.HasAES = true\n\tcase 2:\n\t\tARM64.HasAES = true\n\t\tARM64.HasPMULL = true\n\t}\n\n\tswitch extractBits(isar0, 8, 11) {\n\tcase 1:\n\t\tARM64.HasSHA1 = true\n\t}\n\n\tswitch extractBits(isar0, 12, 15) {\n\tcase 1:\n\t\tARM64.HasSHA2 = true\n\tcase 2:\n\t\tARM64.HasSHA2 = true\n\t\tARM64.HasSHA512 = true\n\t}\n\n\tswitch extractBits(isar0, 16, 19) {\n\tcase 1:\n\t\tARM64.HasCRC32 = true\n\t}\n\n\tswitch extractBits(isar0, 20, 23) {\n\tcase 2:\n\t\tARM64.HasATOMICS = true\n\t}\n\n\tswitch extractBits(isar0, 28, 31) {\n\tcase 1:\n\t\tARM64.HasASIMDRDM = true\n\t}\n\n\tswitch extractBits(isar0, 32, 35) {\n\tcase 1:\n\t\tARM64.HasSHA3 = true\n\t}\n\n\tswitch extractBits(isar0, 36, 39) {\n\tcase 1:\n\t\tARM64.HasSM3 = true\n\t}\n\n\tswitch extractBits(isar0, 40, 43) {\n\tcase 1:\n\t\tARM64.HasSM4 = true\n\t}\n\n\tswitch extractBits(isar0, 44, 47) {\n\tcase 1:\n\t\tARM64.HasASIMDDP = true\n\t}\n\n\t// ID_AA64ISAR1_EL1\n\tswitch extractBits(isar1, 0, 3) {\n\tcase 1:\n\t\tARM64.HasDCPOP = true\n\t}\n\n\tswitch extractBits(isar1, 12, 15) {\n\tcase 1:\n\t\tARM64.HasJSCVT = true\n\t}\n\n\tswitch extractBits(isar1, 16, 19) {\n\tcase 1:\n\t\tARM64.HasFCMA = true\n\t}\n\n\tswitch extractBits(isar1, 20, 23) {\n\tcase 1:\n\t\tARM64.HasLRCPC = true\n\t}\n\n\tswitch extractBits(isar1, 52, 55) {\n\tcase 1:\n\t\tARM64.HasI8MM = true\n\t}\n\n\t// ID_AA64PFR0_EL1\n\tswitch extractBits(pfr0, 16, 19) {\n\tcase 0:\n\t\tARM64.HasFP = true\n\tcase 1:\n\t\tARM64.HasFP = true\n\t\tARM64.HasFPHP = true\n\t}\n\n\tswitch extractBits(pfr0, 20, 23) {\n\tcase 0:\n\t\tARM64.HasASIMD = true\n\tcase 1:\n\t\tARM64.HasASIMD = true\n\t\tARM64.HasASIMDHP = true\n\t}\n\n\tswitch extractBits(pfr0, 32, 35) {\n\tcase 1:\n\t\tARM64.HasSVE = true\n\n\t\tparseARM64SVERegister(getzfr0())\n\t}\n\n\tswitch extractBits(pfr0, 48, 51) {\n\tcase 1:\n\t\tARM64.HasDIT = true\n\t}\n}\n\nfunc parseARM64SVERegister(zfr0 uint64) {\n\tswitch extractBits(zfr0, 0, 3) {\n\tcase 1:\n\t\tARM64.HasSVE2 = true\n\t}\n}\n\nfunc extractBits(data uint64, start, end uint) uint {\n\treturn (uint)(data>>start) & ((1 << (end - start + 1)) - 1)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_arm64.s",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n// func getisar0() uint64\nTEXT ·getisar0(SB),NOSPLIT,$0-8\n\t// get Instruction Set Attributes 0 into x0\n\tMRS\tID_AA64ISAR0_EL1, R0\n\tMOVD\tR0, ret+0(FP)\n\tRET\n\n// func getisar1() uint64\nTEXT ·getisar1(SB),NOSPLIT,$0-8\n\t// get Instruction Set Attributes 1 into x0\n\tMRS\tID_AA64ISAR1_EL1, R0\n\tMOVD\tR0, ret+0(FP)\n\tRET\n\n// func getpfr0() uint64\nTEXT ·getpfr0(SB),NOSPLIT,$0-8\n\t// get Processor Feature Register 0 into x0\n\tMRS\tID_AA64PFR0_EL1, R0\n\tMOVD\tR0, ret+0(FP)\n\tRET\n\n// func getzfr0() uint64\nTEXT ·getzfr0(SB),NOSPLIT,$0-8\n\t// get SVE Feature Register 0 into x0\n\tMRS\tID_AA64ZFR0_EL1, R0\n\tMOVD\tR0, ret+0(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go",
    "content": "// Copyright 2026 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && arm64 && gc\n\npackage cpu\n\nfunc doinit() {\n\tsetMinimalFeatures()\n\n\t// The feature flags are explained in [Instruction Set Detection].\n\t// There are some differences between MacOS versions:\n\t//\n\t// MacOS 11 and 12 do not have \"hw.optional\" sysctl values for some of the features.\n\t//\n\t// MacOS 13 changed some of the naming conventions to align with ARM Architecture Reference Manual.\n\t// For example \"hw.optional.armv8_2_sha512\" became \"hw.optional.arm.FEAT_SHA512\".\n\t// It currently checks both to stay compatible with MacOS 11 and 12.\n\t// The old names also work with MacOS 13, however it's not clear whether\n\t// they will continue working with future OS releases.\n\t//\n\t// Once MacOS 12 is no longer supported the old names can be removed.\n\t//\n\t// [Instruction Set Detection]: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics\n\n\t// Encryption, hashing and checksum capabilities\n\n\t// For the following flags there are no MacOS 11 sysctl flags.\n\tARM64.HasAES = true || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_AES\\x00\"))\n\tARM64.HasPMULL = true || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_PMULL\\x00\"))\n\tARM64.HasSHA1 = true || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SHA1\\x00\"))\n\tARM64.HasSHA2 = true || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SHA256\\x00\"))\n\n\tARM64.HasSHA3 = darwinSysctlEnabled([]byte(\"hw.optional.armv8_2_sha3\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SHA3\\x00\"))\n\tARM64.HasSHA512 = darwinSysctlEnabled([]byte(\"hw.optional.armv8_2_sha512\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SHA512\\x00\"))\n\n\tARM64.HasCRC32 = darwinSysctlEnabled([]byte(\"hw.optional.armv8_crc32\\x00\"))\n\n\t// Atomic and memory ordering\n\tARM64.HasATOMICS = darwinSysctlEnabled([]byte(\"hw.optional.armv8_1_atomics\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_LSE\\x00\"))\n\tARM64.HasLRCPC = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_LRCPC\\x00\"))\n\n\t// SIMD and floating point capabilities\n\tARM64.HasFPHP = darwinSysctlEnabled([]byte(\"hw.optional.neon_fp16\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_FP16\\x00\"))\n\tARM64.HasASIMDHP = darwinSysctlEnabled([]byte(\"hw.optional.neon_hpfp\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.AdvSIMD_HPFPCvt\\x00\"))\n\tARM64.HasASIMDRDM = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_RDM\\x00\"))\n\tARM64.HasASIMDDP = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_DotProd\\x00\"))\n\tARM64.HasASIMDFHM = darwinSysctlEnabled([]byte(\"hw.optional.armv8_2_fhm\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_FHM\\x00\"))\n\tARM64.HasI8MM = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_I8MM\\x00\"))\n\n\tARM64.HasJSCVT = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_JSCVT\\x00\"))\n\tARM64.HasFCMA = darwinSysctlEnabled([]byte(\"hw.optional.armv8_3_compnum\\x00\")) || darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_FCMA\\x00\"))\n\n\t// Miscellaneous\n\tARM64.HasDCPOP = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_DPB\\x00\"))\n\tARM64.HasEVTSTRM = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_ECV\\x00\"))\n\tARM64.HasDIT = darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_DIT\\x00\"))\n\n\t// Not supported, but added for completeness\n\tARM64.HasCPUID = false\n\n\tARM64.HasSM3 = false  // darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SM3\\x00\"))\n\tARM64.HasSM4 = false  // darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SM4\\x00\"))\n\tARM64.HasSVE = false  // darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SVE\\x00\"))\n\tARM64.HasSVE2 = false // darwinSysctlEnabled([]byte(\"hw.optional.arm.FEAT_SVE2\\x00\"))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go",
    "content": "// Copyright 2026 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && arm64 && !gc\n\npackage cpu\n\nfunc doinit() {\n\tsetMinimalFeatures()\n\n\tARM64.HasASIMD = true\n\tARM64.HasFP = true\n\n\t// Go already assumes these to be available because they were on the M1\n\t// and these are supported on all Apple arm64 chips.\n\tARM64.HasAES = true\n\tARM64.HasPMULL = true\n\tARM64.HasSHA1 = true\n\tARM64.HasSHA2 = true\n\n\tif runtime.GOOS != \"ios\" {\n\t\t// Apple A7 processors do not support these, however\n\t\t// M-series SoCs are at least armv8.4-a\n\t\tARM64.HasCRC32 = true   // armv8.1\n\t\tARM64.HasATOMICS = true // armv8.2\n\t\tARM64.HasJSCVT = true   // armv8.3, if HasFP\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && amd64 && gc\n\npackage cpu\n\n// darwinSupportsAVX512 checks Darwin kernel for AVX512 support via sysctl\n// call (see issue 43089). It also restricts AVX512 support for Darwin to\n// kernel version 21.3.0 (MacOS 12.2.0) or later (see issue 49233).\n//\n// Background:\n// Darwin implements a special mechanism to economize on thread state when\n// AVX512 specific registers are not in use. This scheme minimizes state when\n// preempting threads that haven't yet used any AVX512 instructions, but adds\n// special requirements to check for AVX512 hardware support at runtime (e.g.\n// via sysctl call or commpage inspection). See issue 43089 and link below for\n// full background:\n// https://github.com/apple-oss-distributions/xnu/blob/xnu-11215.1.10/osfmk/i386/fpu.c#L214-L240\n//\n// Additionally, all versions of the Darwin kernel from 19.6.0 through 21.2.0\n// (corresponding to MacOS 10.15.6 - 12.1) have a bug that can cause corruption\n// of the AVX512 mask registers (K0-K7) upon signal return. For this reason\n// AVX512 is considered unsafe to use on Darwin for kernel versions prior to\n// 21.3.0, where a fix has been confirmed. See issue 49233 for full background.\nfunc darwinSupportsAVX512() bool {\n\treturn darwinSysctlEnabled([]byte(\"hw.optional.avx512f\\x00\")) && darwinKernelVersionCheck(21, 3, 0)\n}\n\n// Ensure Darwin kernel version is at least major.minor.patch, avoiding dependencies\nfunc darwinKernelVersionCheck(major, minor, patch int) bool {\n\tvar release [256]byte\n\terr := darwinOSRelease(&release)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tvar mmp [3]int\n\tc := 0\nLoop:\n\tfor _, b := range release[:] {\n\t\tswitch {\n\t\tcase b >= '0' && b <= '9':\n\t\t\tmmp[c] = 10*mmp[c] + int(b-'0')\n\t\tcase b == '.':\n\t\t\tc++\n\t\t\tif c > 2 {\n\t\t\t\treturn false\n\t\t\t}\n\t\tcase b == 0:\n\t\t\tbreak Loop\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n\tif c != 2 {\n\t\treturn false\n\t}\n\treturn mmp[0] > major || mmp[0] == major && (mmp[1] > minor || mmp[1] == minor && mmp[2] >= patch)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\npackage cpu\n\nfunc getisar0() uint64\nfunc getisar1() uint64\nfunc getpfr0() uint64\nfunc getzfr0() uint64\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\npackage cpu\n\n// haveAsmFunctions reports whether the other functions in this file can\n// be safely called.\nfunc haveAsmFunctions() bool { return true }\n\n// The following feature detection functions are defined in cpu_s390x.s.\n// They are likely to be expensive to call so the results should be cached.\nfunc stfle() facilityList\nfunc kmQuery() queryResult\nfunc kmcQuery() queryResult\nfunc kmctrQuery() queryResult\nfunc kmaQuery() queryResult\nfunc kimdQuery() queryResult\nfunc klmdQuery() queryResult\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gc_x86.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (386 || amd64 || amd64p32) && gc\n\npackage cpu\n\n// cpuid is implemented in cpu_gc_x86.s for gc compiler\n// and in cpu_gccgo.c for gccgo.\nfunc cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)\n\n// xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler\n// and in cpu_gccgo.c for gccgo.\nfunc xgetbv() (eax, edx uint32)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gc_x86.s",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (386 || amd64 || amd64p32) && gc\n\n#include \"textflag.h\"\n\n// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)\nTEXT ·cpuid(SB), NOSPLIT, $0-24\n\tMOVL eaxArg+0(FP), AX\n\tMOVL ecxArg+4(FP), CX\n\tCPUID\n\tMOVL AX, eax+8(FP)\n\tMOVL BX, ebx+12(FP)\n\tMOVL CX, ecx+16(FP)\n\tMOVL DX, edx+20(FP)\n\tRET\n\n// func xgetbv() (eax, edx uint32)\nTEXT ·xgetbv(SB), NOSPLIT, $0-8\n\tMOVL $0, CX\n\tXGETBV\n\tMOVL AX, eax+0(FP)\n\tMOVL DX, edx+4(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gccgo\n\npackage cpu\n\nfunc getisar0() uint64 { return 0 }\nfunc getisar1() uint64 { return 0 }\nfunc getpfr0() uint64  { return 0 }\nfunc getzfr0() uint64  { return 0 }\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gccgo\n\npackage cpu\n\n// haveAsmFunctions reports whether the other functions in this file can\n// be safely called.\nfunc haveAsmFunctions() bool { return false }\n\n// TODO(mundaym): the following feature detection functions are currently\n// stubs. See https://golang.org/cl/162887 for how to fix this.\n// They are likely to be expensive to call so the results should be cached.\nfunc stfle() facilityList     { panic(\"not implemented for gccgo\") }\nfunc kmQuery() queryResult    { panic(\"not implemented for gccgo\") }\nfunc kmcQuery() queryResult   { panic(\"not implemented for gccgo\") }\nfunc kmctrQuery() queryResult { panic(\"not implemented for gccgo\") }\nfunc kmaQuery() queryResult   { panic(\"not implemented for gccgo\") }\nfunc kimdQuery() queryResult  { panic(\"not implemented for gccgo\") }\nfunc klmdQuery() queryResult  { panic(\"not implemented for gccgo\") }\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (386 || amd64 || amd64p32) && gccgo\n\n#include <cpuid.h>\n#include <stdint.h>\n#include <x86intrin.h>\n\n// Need to wrap __get_cpuid_count because it's declared as static.\nint\ngccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf,\n                   uint32_t *eax, uint32_t *ebx,\n                   uint32_t *ecx, uint32_t *edx)\n{\n\treturn __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx);\n}\n\n#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n#pragma GCC push_options\n#pragma GCC target(\"xsave\")\n#pragma clang attribute push (__attribute__((target(\"xsave\"))), apply_to=function)\n\n// xgetbv reads the contents of an XCR (Extended Control Register)\n// specified in the ECX register into registers EDX:EAX.\n// Currently, the only supported value for XCR is 0.\nvoid\ngccgoXgetbv(uint32_t *eax, uint32_t *edx)\n{\n\tuint64_t v = _xgetbv(0);\n\t*eax = v & 0xffffffff;\n\t*edx = v >> 32;\n}\n\n#pragma clang attribute pop\n#pragma GCC pop_options\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (386 || amd64 || amd64p32) && gccgo\n\npackage cpu\n\n//extern gccgoGetCpuidCount\nfunc gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)\n\nfunc cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {\n\tvar a, b, c, d uint32\n\tgccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)\n\treturn a, b, c, d\n}\n\n//extern gccgoXgetbv\nfunc gccgoXgetbv(eax, edx *uint32)\n\nfunc xgetbv() (eax, edx uint32) {\n\tvar a, d uint32\n\tgccgoXgetbv(&a, &d)\n\treturn a, d\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !386 && !amd64 && !amd64p32 && !arm64\n\npackage cpu\n\nfunc archInit() {\n\tif err := readHWCAP(); err != nil {\n\t\treturn\n\t}\n\tdoinit()\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_arm.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nfunc doinit() {\n\tARM.HasSWP = isSet(hwCap, hwcap_SWP)\n\tARM.HasHALF = isSet(hwCap, hwcap_HALF)\n\tARM.HasTHUMB = isSet(hwCap, hwcap_THUMB)\n\tARM.Has26BIT = isSet(hwCap, hwcap_26BIT)\n\tARM.HasFASTMUL = isSet(hwCap, hwcap_FAST_MULT)\n\tARM.HasFPA = isSet(hwCap, hwcap_FPA)\n\tARM.HasVFP = isSet(hwCap, hwcap_VFP)\n\tARM.HasEDSP = isSet(hwCap, hwcap_EDSP)\n\tARM.HasJAVA = isSet(hwCap, hwcap_JAVA)\n\tARM.HasIWMMXT = isSet(hwCap, hwcap_IWMMXT)\n\tARM.HasCRUNCH = isSet(hwCap, hwcap_CRUNCH)\n\tARM.HasTHUMBEE = isSet(hwCap, hwcap_THUMBEE)\n\tARM.HasNEON = isSet(hwCap, hwcap_NEON)\n\tARM.HasVFPv3 = isSet(hwCap, hwcap_VFPv3)\n\tARM.HasVFPv3D16 = isSet(hwCap, hwcap_VFPv3D16)\n\tARM.HasTLS = isSet(hwCap, hwcap_TLS)\n\tARM.HasVFPv4 = isSet(hwCap, hwcap_VFPv4)\n\tARM.HasIDIVA = isSet(hwCap, hwcap_IDIVA)\n\tARM.HasIDIVT = isSet(hwCap, hwcap_IDIVT)\n\tARM.HasVFPD32 = isSet(hwCap, hwcap_VFPD32)\n\tARM.HasLPAE = isSet(hwCap, hwcap_LPAE)\n\tARM.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)\n\tARM.HasAES = isSet(hwCap2, hwcap2_AES)\n\tARM.HasPMULL = isSet(hwCap2, hwcap2_PMULL)\n\tARM.HasSHA1 = isSet(hwCap2, hwcap2_SHA1)\n\tARM.HasSHA2 = isSet(hwCap2, hwcap2_SHA2)\n\tARM.HasCRC32 = isSet(hwCap2, hwcap2_CRC32)\n}\n\nfunc isSet(hwc uint, value uint) bool {\n\treturn hwc&value != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"strings\"\n\t\"syscall\"\n)\n\n// HWCAP/HWCAP2 bits. These are exposed by Linux.\nconst (\n\thwcap_FP       = 1 << 0\n\thwcap_ASIMD    = 1 << 1\n\thwcap_EVTSTRM  = 1 << 2\n\thwcap_AES      = 1 << 3\n\thwcap_PMULL    = 1 << 4\n\thwcap_SHA1     = 1 << 5\n\thwcap_SHA2     = 1 << 6\n\thwcap_CRC32    = 1 << 7\n\thwcap_ATOMICS  = 1 << 8\n\thwcap_FPHP     = 1 << 9\n\thwcap_ASIMDHP  = 1 << 10\n\thwcap_CPUID    = 1 << 11\n\thwcap_ASIMDRDM = 1 << 12\n\thwcap_JSCVT    = 1 << 13\n\thwcap_FCMA     = 1 << 14\n\thwcap_LRCPC    = 1 << 15\n\thwcap_DCPOP    = 1 << 16\n\thwcap_SHA3     = 1 << 17\n\thwcap_SM3      = 1 << 18\n\thwcap_SM4      = 1 << 19\n\thwcap_ASIMDDP  = 1 << 20\n\thwcap_SHA512   = 1 << 21\n\thwcap_SVE      = 1 << 22\n\thwcap_ASIMDFHM = 1 << 23\n\thwcap_DIT      = 1 << 24\n\n\thwcap2_SVE2 = 1 << 1\n\thwcap2_I8MM = 1 << 13\n)\n\n// linuxKernelCanEmulateCPUID reports whether we're running\n// on Linux 4.11+. Ideally we'd like to ask the question about\n// whether the current kernel contains\n// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77c97b4ee21290f5f083173d957843b615abbff2\n// but the version number will have to do.\nfunc linuxKernelCanEmulateCPUID() bool {\n\tvar un syscall.Utsname\n\tsyscall.Uname(&un)\n\tvar sb strings.Builder\n\tfor _, b := range un.Release[:] {\n\t\tif b == 0 {\n\t\t\tbreak\n\t\t}\n\t\tsb.WriteByte(byte(b))\n\t}\n\tmajor, minor, _, ok := parseRelease(sb.String())\n\treturn ok && (major > 4 || major == 4 && minor >= 11)\n}\n\nfunc doinit() {\n\tif err := readHWCAP(); err != nil {\n\t\t// We failed to read /proc/self/auxv. This can happen if the binary has\n\t\t// been given extra capabilities(7) with /bin/setcap.\n\t\t//\n\t\t// When this happens, we have two options. If the Linux kernel is new\n\t\t// enough (4.11+), we can read the arm64 registers directly which'll\n\t\t// trap into the kernel and then return back to userspace.\n\t\t//\n\t\t// But on older kernels, such as Linux 4.4.180 as used on many Synology\n\t\t// devices, calling readARM64Registers (specifically getisar0) will\n\t\t// cause a SIGILL and we'll die. So for older kernels, parse /proc/cpuinfo\n\t\t// instead.\n\t\t//\n\t\t// See golang/go#57336.\n\t\tif linuxKernelCanEmulateCPUID() {\n\t\t\treadARM64Registers()\n\t\t} else {\n\t\t\treadLinuxProcCPUInfo()\n\t\t}\n\t\treturn\n\t}\n\n\t// HWCAP feature bits\n\tARM64.HasFP = isSet(hwCap, hwcap_FP)\n\tARM64.HasASIMD = isSet(hwCap, hwcap_ASIMD)\n\tARM64.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)\n\tARM64.HasAES = isSet(hwCap, hwcap_AES)\n\tARM64.HasPMULL = isSet(hwCap, hwcap_PMULL)\n\tARM64.HasSHA1 = isSet(hwCap, hwcap_SHA1)\n\tARM64.HasSHA2 = isSet(hwCap, hwcap_SHA2)\n\tARM64.HasCRC32 = isSet(hwCap, hwcap_CRC32)\n\tARM64.HasATOMICS = isSet(hwCap, hwcap_ATOMICS)\n\tARM64.HasFPHP = isSet(hwCap, hwcap_FPHP)\n\tARM64.HasASIMDHP = isSet(hwCap, hwcap_ASIMDHP)\n\tARM64.HasCPUID = isSet(hwCap, hwcap_CPUID)\n\tARM64.HasASIMDRDM = isSet(hwCap, hwcap_ASIMDRDM)\n\tARM64.HasJSCVT = isSet(hwCap, hwcap_JSCVT)\n\tARM64.HasFCMA = isSet(hwCap, hwcap_FCMA)\n\tARM64.HasLRCPC = isSet(hwCap, hwcap_LRCPC)\n\tARM64.HasDCPOP = isSet(hwCap, hwcap_DCPOP)\n\tARM64.HasSHA3 = isSet(hwCap, hwcap_SHA3)\n\tARM64.HasSM3 = isSet(hwCap, hwcap_SM3)\n\tARM64.HasSM4 = isSet(hwCap, hwcap_SM4)\n\tARM64.HasASIMDDP = isSet(hwCap, hwcap_ASIMDDP)\n\tARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)\n\tARM64.HasSVE = isSet(hwCap, hwcap_SVE)\n\tARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)\n\tARM64.HasDIT = isSet(hwCap, hwcap_DIT)\n\n\t// HWCAP2 feature bits\n\tARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)\n\tARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM)\n}\n\nfunc isSet(hwc uint, value uint) bool {\n\treturn hwc&value != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_loong64.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\n// HWCAP bits. These are exposed by the Linux kernel.\nconst (\n\thwcap_LOONGARCH_LSX  = 1 << 4\n\thwcap_LOONGARCH_LASX = 1 << 5\n)\n\nfunc doinit() {\n\t// TODO: Features that require kernel support like LSX and LASX can\n\t// be detected here once needed in std library or by the compiler.\n\tLoong64.HasLSX = hwcIsSet(hwCap, hwcap_LOONGARCH_LSX)\n\tLoong64.HasLASX = hwcIsSet(hwCap, hwcap_LOONGARCH_LASX)\n}\n\nfunc hwcIsSet(hwc uint, val uint) bool {\n\treturn hwc&val != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (mips64 || mips64le)\n\npackage cpu\n\n// HWCAP bits. These are exposed by the Linux kernel 5.4.\nconst (\n\t// CPU features\n\thwcap_MIPS_MSA = 1 << 1\n)\n\nfunc doinit() {\n\t// HWCAP feature bits\n\tMIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)\n}\n\nfunc isSet(hwc uint, value uint) bool {\n\treturn hwc&value != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && !arm && !arm64 && !loong64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64\n\npackage cpu\n\nfunc doinit() {}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (ppc64 || ppc64le)\n\npackage cpu\n\n// HWCAP/HWCAP2 bits. These are exposed by the kernel.\nconst (\n\t// ISA Level\n\t_PPC_FEATURE2_ARCH_2_07 = 0x80000000\n\t_PPC_FEATURE2_ARCH_3_00 = 0x00800000\n\n\t// CPU features\n\t_PPC_FEATURE2_DARN = 0x00200000\n\t_PPC_FEATURE2_SCV  = 0x00100000\n)\n\nfunc doinit() {\n\t// HWCAP2 feature bits\n\tPPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)\n\tPPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)\n\tPPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)\n\tPPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)\n}\n\nfunc isSet(hwc uint, value uint) bool {\n\treturn hwc&value != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe\n// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available.\n//\n// A note on detection of the Vector extension using HWCAP.\n//\n// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5.\n// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe\n// syscall is not available then neither is the Vector extension (which needs kernel support).\n// The riscv_hwprobe syscall should then be all we need to detect the Vector extension.\n// However, some RISC-V board manufacturers ship boards with an older kernel on top of which\n// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe\n// patches. These kernels advertise support for the Vector extension using HWCAP. Falling\n// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not\n// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option.\n//\n// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by\n// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board\n// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified\n// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use\n// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector\n// extension are binary incompatible. HWCAP can then not be used in isolation to populate the\n// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0.\n//\n// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector\n// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype\n// register. This check would allow us to safely detect version 1.0 of the Vector extension\n// with HWCAP, if riscv_hwprobe were not available. However, the check cannot\n// be added until the assembler supports the Vector instructions.\n//\n// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the\n// extensions it advertises support for are explicitly versioned. It's also worth noting that\n// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba.\n// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority\n// of RISC-V extensions.\n//\n// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information.\n\n// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must\n// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall\n// here.\n\nconst (\n\t// Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.\n\triscv_HWPROBE_KEY_IMA_EXT_0   = 0x4\n\triscv_HWPROBE_IMA_C           = 0x2\n\triscv_HWPROBE_IMA_V           = 0x4\n\triscv_HWPROBE_EXT_ZBA         = 0x8\n\triscv_HWPROBE_EXT_ZBB         = 0x10\n\triscv_HWPROBE_EXT_ZBS         = 0x20\n\triscv_HWPROBE_EXT_ZVBB        = 0x20000\n\triscv_HWPROBE_EXT_ZVBC        = 0x40000\n\triscv_HWPROBE_EXT_ZVKB        = 0x80000\n\triscv_HWPROBE_EXT_ZVKG        = 0x100000\n\triscv_HWPROBE_EXT_ZVKNED      = 0x200000\n\triscv_HWPROBE_EXT_ZVKNHB      = 0x800000\n\triscv_HWPROBE_EXT_ZVKSED      = 0x1000000\n\triscv_HWPROBE_EXT_ZVKSH       = 0x2000000\n\triscv_HWPROBE_EXT_ZVKT        = 0x4000000\n\triscv_HWPROBE_KEY_CPUPERF_0   = 0x5\n\triscv_HWPROBE_MISALIGNED_FAST = 0x3\n\triscv_HWPROBE_MISALIGNED_MASK = 0x7\n)\n\nconst (\n\t// sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go.\n\tsys_RISCV_HWPROBE = 258\n)\n\n// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.\ntype riscvHWProbePairs struct {\n\tkey   int64\n\tvalue uint64\n}\n\nconst (\n\t// CPU features\n\thwcap_RISCV_ISA_C = 1 << ('C' - 'A')\n)\n\nfunc doinit() {\n\t// A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key\n\t// field should be initialised with one of the key constants defined above, e.g.,\n\t// RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value.\n\t// If the kernel does not recognise a key it will set the key field to -1 and the value field to 0.\n\n\tpairs := []riscvHWProbePairs{\n\t\t{riscv_HWPROBE_KEY_IMA_EXT_0, 0},\n\t\t{riscv_HWPROBE_KEY_CPUPERF_0, 0},\n\t}\n\n\t// This call only indicates that extensions are supported if they are implemented on all cores.\n\tif riscvHWProbe(pairs, 0) {\n\t\tif pairs[0].key != -1 {\n\t\t\tv := uint(pairs[0].value)\n\t\t\tRISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C)\n\t\t\tRISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V)\n\t\t\tRISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA)\n\t\t\tRISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB)\n\t\t\tRISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS)\n\t\t\tRISCV64.HasZvbb = isSet(v, riscv_HWPROBE_EXT_ZVBB)\n\t\t\tRISCV64.HasZvbc = isSet(v, riscv_HWPROBE_EXT_ZVBC)\n\t\t\tRISCV64.HasZvkb = isSet(v, riscv_HWPROBE_EXT_ZVKB)\n\t\t\tRISCV64.HasZvkg = isSet(v, riscv_HWPROBE_EXT_ZVKG)\n\t\t\tRISCV64.HasZvkt = isSet(v, riscv_HWPROBE_EXT_ZVKT)\n\t\t\t// Cryptography shorthand extensions\n\t\t\tRISCV64.HasZvkn = isSet(v, riscv_HWPROBE_EXT_ZVKNED) &&\n\t\t\t\tisSet(v, riscv_HWPROBE_EXT_ZVKNHB) && RISCV64.HasZvkb && RISCV64.HasZvkt\n\t\t\tRISCV64.HasZvknc = RISCV64.HasZvkn && RISCV64.HasZvbc\n\t\t\tRISCV64.HasZvkng = RISCV64.HasZvkn && RISCV64.HasZvkg\n\t\t\tRISCV64.HasZvks = isSet(v, riscv_HWPROBE_EXT_ZVKSED) &&\n\t\t\t\tisSet(v, riscv_HWPROBE_EXT_ZVKSH) && RISCV64.HasZvkb && RISCV64.HasZvkt\n\t\t\tRISCV64.HasZvksc = RISCV64.HasZvks && RISCV64.HasZvbc\n\t\t\tRISCV64.HasZvksg = RISCV64.HasZvks && RISCV64.HasZvkg\n\t\t}\n\t\tif pairs[1].key != -1 {\n\t\t\tv := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK\n\t\t\tRISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST\n\t\t}\n\t}\n\n\t// Let's double check with HWCAP if the C extension does not appear to be supported.\n\t// This may happen if we're running on a kernel older than 6.4.\n\n\tif !RISCV64.HasC {\n\t\tRISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C)\n\t}\n}\n\nfunc isSet(hwc uint, value uint) bool {\n\treturn hwc&value != 0\n}\n\n// riscvHWProbe is a simplified version of the generated wrapper function found in\n// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the\n// cpuCount and cpus parameters which we do not need. We always want to pass 0 for\n// these parameters here so the kernel only reports the extensions that are present\n// on all cores.\nfunc riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool {\n\tvar _zero uintptr\n\tvar p0 unsafe.Pointer\n\tif len(pairs) > 0 {\n\t\tp0 = unsafe.Pointer(&pairs[0])\n\t} else {\n\t\tp0 = unsafe.Pointer(&_zero)\n\t}\n\n\t_, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0)\n\treturn e1 == 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nconst (\n\t// bit mask values from /usr/include/bits/hwcap.h\n\thwcap_ZARCH  = 2\n\thwcap_STFLE  = 4\n\thwcap_MSA    = 8\n\thwcap_LDISP  = 16\n\thwcap_EIMM   = 32\n\thwcap_DFP    = 64\n\thwcap_ETF3EH = 256\n\thwcap_VX     = 2048\n\thwcap_VXE    = 8192\n)\n\nfunc initS390Xbase() {\n\t// test HWCAP bit vector\n\thas := func(featureMask uint) bool {\n\t\treturn hwCap&featureMask == featureMask\n\t}\n\n\t// mandatory\n\tS390X.HasZARCH = has(hwcap_ZARCH)\n\n\t// optional\n\tS390X.HasSTFLE = has(hwcap_STFLE)\n\tS390X.HasLDISP = has(hwcap_LDISP)\n\tS390X.HasEIMM = has(hwcap_EIMM)\n\tS390X.HasETF3EH = has(hwcap_ETF3EH)\n\tS390X.HasDFP = has(hwcap_DFP)\n\tS390X.HasMSA = has(hwcap_MSA)\n\tS390X.HasVX = has(hwcap_VX)\n\tif S390X.HasVX {\n\t\tS390X.HasVXE = has(hwcap_VXE)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_loong64.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build loong64\n\npackage cpu\n\nconst cacheLineSize = 64\n\n// Bit fields for CPUCFG registers, Related reference documents:\n// https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_cpucfg\nconst (\n\t// CPUCFG1 bits\n\tcpucfg1_CRC32 = 1 << 25\n\n\t// CPUCFG2 bits\n\tcpucfg2_LAM_BH = 1 << 27\n\tcpucfg2_LAMCAS = 1 << 28\n)\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"lsx\", Feature: &Loong64.HasLSX},\n\t\t{Name: \"lasx\", Feature: &Loong64.HasLASX},\n\t\t{Name: \"crc32\", Feature: &Loong64.HasCRC32},\n\t\t{Name: \"lam_bh\", Feature: &Loong64.HasLAM_BH},\n\t\t{Name: \"lamcas\", Feature: &Loong64.HasLAMCAS},\n\t}\n\n\t// The CPUCFG data on Loong64 only reflects the hardware capabilities,\n\t// not the kernel support status, so features such as LSX and LASX that\n\t// require kernel support cannot be obtained from the CPUCFG data.\n\t//\n\t// These features only require hardware capability support and do not\n\t// require kernel specific support, so they can be obtained directly\n\t// through CPUCFG\n\tcfg1 := get_cpucfg(1)\n\tcfg2 := get_cpucfg(2)\n\n\tLoong64.HasCRC32 = cfgIsSet(cfg1, cpucfg1_CRC32)\n\tLoong64.HasLAMCAS = cfgIsSet(cfg2, cpucfg2_LAMCAS)\n\tLoong64.HasLAM_BH = cfgIsSet(cfg2, cpucfg2_LAM_BH)\n}\n\nfunc get_cpucfg(reg uint32) uint32\n\nfunc cfgIsSet(cfg uint32, val uint32) bool {\n\treturn cfg&val != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_loong64.s",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\n// func get_cpucfg(reg uint32) uint32\nTEXT ·get_cpucfg(SB), NOSPLIT|NOFRAME, $0\n\tMOVW\treg+0(FP), R5\n\t// CPUCFG R5, R4 = 0x00006ca4\n\tWORD\t$0x00006ca4\n\tMOVW\tR4, ret+8(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_mips64x.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build mips64 || mips64le\n\npackage cpu\n\nconst cacheLineSize = 32\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"msa\", Feature: &MIPS64X.HasMSA},\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_mipsx.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build mips || mipsle\n\npackage cpu\n\nconst cacheLineSize = 32\n\nfunc initOptions() {}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// Minimal copy of functionality from x/sys/unix so the cpu package can call\n// sysctl without depending on x/sys/unix.\n\nconst (\n\t_CTL_QUERY = -2\n\n\t_SYSCTL_VERS_1 = 0x1000000\n)\n\nvar _zero uintptr\n\nfunc sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, errno := syscall.Syscall6(\n\t\tsyscall.SYS___SYSCTL,\n\t\tuintptr(_p0),\n\t\tuintptr(len(mib)),\n\t\tuintptr(unsafe.Pointer(old)),\n\t\tuintptr(unsafe.Pointer(oldlen)),\n\t\tuintptr(unsafe.Pointer(new)),\n\t\tuintptr(newlen))\n\tif errno != 0 {\n\t\treturn errno\n\t}\n\treturn nil\n}\n\ntype sysctlNode struct {\n\tFlags          uint32\n\tNum            int32\n\tName           [32]int8\n\tVer            uint32\n\t__rsvd         uint32\n\tUn             [16]byte\n\t_sysctl_size   [8]byte\n\t_sysctl_func   [8]byte\n\t_sysctl_parent [8]byte\n\t_sysctl_desc   [8]byte\n}\n\nfunc sysctlNodes(mib []int32) ([]sysctlNode, error) {\n\tvar olen uintptr\n\n\t// Get a list of all sysctl nodes below the given MIB by performing\n\t// a sysctl for the given MIB with CTL_QUERY appended.\n\tmib = append(mib, _CTL_QUERY)\n\tqnode := sysctlNode{Flags: _SYSCTL_VERS_1}\n\tqp := (*byte)(unsafe.Pointer(&qnode))\n\tsz := unsafe.Sizeof(qnode)\n\tif err := sysctl(mib, nil, &olen, qp, sz); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Now that we know the size, get the actual nodes.\n\tnodes := make([]sysctlNode, olen/sz)\n\tnp := (*byte)(unsafe.Pointer(&nodes[0]))\n\tif err := sysctl(mib, np, &olen, qp, sz); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn nodes, nil\n}\n\nfunc nametomib(name string) ([]int32, error) {\n\t// Split name into components.\n\tvar parts []string\n\tlast := 0\n\tfor i := 0; i < len(name); i++ {\n\t\tif name[i] == '.' {\n\t\t\tparts = append(parts, name[last:i])\n\t\t\tlast = i + 1\n\t\t}\n\t}\n\tparts = append(parts, name[last:])\n\n\tmib := []int32{}\n\t// Discover the nodes and construct the MIB OID.\n\tfor partno, part := range parts {\n\t\tnodes, err := sysctlNodes(mib)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, node := range nodes {\n\t\t\tn := make([]byte, 0)\n\t\t\tfor i := range node.Name {\n\t\t\t\tif node.Name[i] != 0 {\n\t\t\t\t\tn = append(n, byte(node.Name[i]))\n\t\t\t\t}\n\t\t\t}\n\t\t\tif string(n) == part {\n\t\t\t\tmib = append(mib, int32(node.Num))\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif len(mib) != partno+1 {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn mib, nil\n}\n\n// aarch64SysctlCPUID is struct aarch64_sysctl_cpu_id from NetBSD's <aarch64/armreg.h>\ntype aarch64SysctlCPUID struct {\n\tmidr      uint64 /* Main ID Register */\n\trevidr    uint64 /* Revision ID Register */\n\tmpidr     uint64 /* Multiprocessor Affinity Register */\n\taa64dfr0  uint64 /* A64 Debug Feature Register 0 */\n\taa64dfr1  uint64 /* A64 Debug Feature Register 1 */\n\taa64isar0 uint64 /* A64 Instruction Set Attribute Register 0 */\n\taa64isar1 uint64 /* A64 Instruction Set Attribute Register 1 */\n\taa64mmfr0 uint64 /* A64 Memory Model Feature Register 0 */\n\taa64mmfr1 uint64 /* A64 Memory Model Feature Register 1 */\n\taa64mmfr2 uint64 /* A64 Memory Model Feature Register 2 */\n\taa64pfr0  uint64 /* A64 Processor Feature Register 0 */\n\taa64pfr1  uint64 /* A64 Processor Feature Register 1 */\n\taa64zfr0  uint64 /* A64 SVE Feature ID Register 0 */\n\tmvfr0     uint32 /* Media and VFP Feature Register 0 */\n\tmvfr1     uint32 /* Media and VFP Feature Register 1 */\n\tmvfr2     uint32 /* Media and VFP Feature Register 2 */\n\tpad       uint32\n\tclidr     uint64 /* Cache Level ID Register */\n\tctr       uint64 /* Cache Type Register */\n}\n\nfunc sysctlCPUID(name string) (*aarch64SysctlCPUID, error) {\n\tmib, err := nametomib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tout := aarch64SysctlCPUID{}\n\tn := unsafe.Sizeof(out)\n\t_, _, errno := syscall.Syscall6(\n\t\tsyscall.SYS___SYSCTL,\n\t\tuintptr(unsafe.Pointer(&mib[0])),\n\t\tuintptr(len(mib)),\n\t\tuintptr(unsafe.Pointer(&out)),\n\t\tuintptr(unsafe.Pointer(&n)),\n\t\tuintptr(0),\n\t\tuintptr(0))\n\tif errno != 0 {\n\t\treturn nil, errno\n\t}\n\treturn &out, nil\n}\n\nfunc doinit() {\n\tcpuid, err := sysctlCPUID(\"machdep.cpu0.cpu_id\")\n\tif err != nil {\n\t\tsetMinimalFeatures()\n\t\treturn\n\t}\n\tparseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0)\n\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// Minimal copy of functionality from x/sys/unix so the cpu package can call\n// sysctl without depending on x/sys/unix.\n\nconst (\n\t// From OpenBSD's sys/sysctl.h.\n\t_CTL_MACHDEP = 7\n\n\t// From OpenBSD's machine/cpu.h.\n\t_CPU_ID_AA64ISAR0 = 2\n\t_CPU_ID_AA64ISAR1 = 3\n)\n\n// Implemented in the runtime package (runtime/sys_openbsd3.go)\nfunc syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\n//go:linkname syscall_syscall6 syscall.syscall6\n\nfunc sysctl(mib []uint32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\t_, _, errno := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(unsafe.Pointer(&mib[0])), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif errno != 0 {\n\t\treturn errno\n\t}\n\treturn nil\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\nfunc sysctlUint64(mib []uint32) (uint64, bool) {\n\tvar out uint64\n\tnout := unsafe.Sizeof(out)\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); err != nil {\n\t\treturn 0, false\n\t}\n\treturn out, true\n}\n\nfunc doinit() {\n\tsetMinimalFeatures()\n\n\t// Get ID_AA64ISAR0 and ID_AA64ISAR1 from sysctl.\n\tisar0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR0})\n\tif !ok {\n\t\treturn\n\t}\n\tisar1, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR1})\n\tif !ok {\n\t\treturn\n\t}\n\tparseARM64SystemRegisters(isar0, isar1, 0)\n\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\n\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_arm.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !linux && arm\n\npackage cpu\n\nfunc archInit() {}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !darwin && !linux && !netbsd && !openbsd && !windows && arm64\n\npackage cpu\n\nfunc doinit() {\n\tsetMinimalFeatures()\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !linux && (mips64 || mips64le)\n\npackage cpu\n\nfunc archInit() {\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !aix && !linux && (ppc64 || ppc64le)\n\npackage cpu\n\nfunc archInit() {\n\tPPC64.IsPOWER8 = true\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !linux && riscv64\n\npackage cpu\n\nfunc archInit() {\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_other_x86.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 || amd64p32 || (amd64 && (!darwin || !gc))\n\npackage cpu\n\nfunc darwinSupportsAVX512() bool {\n\tpanic(\"only implemented for gc && amd64 && darwin\")\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_ppc64x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build ppc64 || ppc64le\n\npackage cpu\n\nconst cacheLineSize = 128\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"darn\", Feature: &PPC64.HasDARN},\n\t\t{Name: \"scv\", Feature: &PPC64.HasSCV},\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_riscv64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build riscv64\n\npackage cpu\n\nconst cacheLineSize = 64\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"fastmisaligned\", Feature: &RISCV64.HasFastMisaligned},\n\t\t{Name: \"c\", Feature: &RISCV64.HasC},\n\t\t{Name: \"v\", Feature: &RISCV64.HasV},\n\t\t{Name: \"zba\", Feature: &RISCV64.HasZba},\n\t\t{Name: \"zbb\", Feature: &RISCV64.HasZbb},\n\t\t{Name: \"zbs\", Feature: &RISCV64.HasZbs},\n\t\t// RISC-V Cryptography Extensions\n\t\t{Name: \"zvbb\", Feature: &RISCV64.HasZvbb},\n\t\t{Name: \"zvbc\", Feature: &RISCV64.HasZvbc},\n\t\t{Name: \"zvkb\", Feature: &RISCV64.HasZvkb},\n\t\t{Name: \"zvkg\", Feature: &RISCV64.HasZvkg},\n\t\t{Name: \"zvkt\", Feature: &RISCV64.HasZvkt},\n\t\t{Name: \"zvkn\", Feature: &RISCV64.HasZvkn},\n\t\t{Name: \"zvknc\", Feature: &RISCV64.HasZvknc},\n\t\t{Name: \"zvkng\", Feature: &RISCV64.HasZvkng},\n\t\t{Name: \"zvks\", Feature: &RISCV64.HasZvks},\n\t\t{Name: \"zvksc\", Feature: &RISCV64.HasZvksc},\n\t\t{Name: \"zvksg\", Feature: &RISCV64.HasZvksg},\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_s390x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nconst cacheLineSize = 256\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"zarch\", Feature: &S390X.HasZARCH, Required: true},\n\t\t{Name: \"stfle\", Feature: &S390X.HasSTFLE, Required: true},\n\t\t{Name: \"ldisp\", Feature: &S390X.HasLDISP, Required: true},\n\t\t{Name: \"eimm\", Feature: &S390X.HasEIMM, Required: true},\n\t\t{Name: \"dfp\", Feature: &S390X.HasDFP},\n\t\t{Name: \"etf3eh\", Feature: &S390X.HasETF3EH},\n\t\t{Name: \"msa\", Feature: &S390X.HasMSA},\n\t\t{Name: \"aes\", Feature: &S390X.HasAES},\n\t\t{Name: \"aescbc\", Feature: &S390X.HasAESCBC},\n\t\t{Name: \"aesctr\", Feature: &S390X.HasAESCTR},\n\t\t{Name: \"aesgcm\", Feature: &S390X.HasAESGCM},\n\t\t{Name: \"ghash\", Feature: &S390X.HasGHASH},\n\t\t{Name: \"sha1\", Feature: &S390X.HasSHA1},\n\t\t{Name: \"sha256\", Feature: &S390X.HasSHA256},\n\t\t{Name: \"sha3\", Feature: &S390X.HasSHA3},\n\t\t{Name: \"sha512\", Feature: &S390X.HasSHA512},\n\t\t{Name: \"vx\", Feature: &S390X.HasVX},\n\t\t{Name: \"vxe\", Feature: &S390X.HasVXE},\n\t}\n}\n\n// bitIsSet reports whether the bit at index is set. The bit index\n// is in big endian order, so bit index 0 is the leftmost bit.\nfunc bitIsSet(bits []uint64, index uint) bool {\n\treturn bits[index/64]&((1<<63)>>(index%64)) != 0\n}\n\n// facility is a bit index for the named facility.\ntype facility uint8\n\nconst (\n\t// mandatory facilities\n\tzarch  facility = 1  // z architecture mode is active\n\tstflef facility = 7  // store-facility-list-extended\n\tldisp  facility = 18 // long-displacement\n\teimm   facility = 21 // extended-immediate\n\n\t// miscellaneous facilities\n\tdfp    facility = 42 // decimal-floating-point\n\tetf3eh facility = 30 // extended-translation 3 enhancement\n\n\t// cryptography facilities\n\tmsa  facility = 17  // message-security-assist\n\tmsa3 facility = 76  // message-security-assist extension 3\n\tmsa4 facility = 77  // message-security-assist extension 4\n\tmsa5 facility = 57  // message-security-assist extension 5\n\tmsa8 facility = 146 // message-security-assist extension 8\n\tmsa9 facility = 155 // message-security-assist extension 9\n\n\t// vector facilities\n\tvx   facility = 129 // vector facility\n\tvxe  facility = 135 // vector-enhancements 1\n\tvxe2 facility = 148 // vector-enhancements 2\n)\n\n// facilityList contains the result of an STFLE call.\n// Bits are numbered in big endian order so the\n// leftmost bit (the MSB) is at index 0.\ntype facilityList struct {\n\tbits [4]uint64\n}\n\n// Has reports whether the given facilities are present.\nfunc (s *facilityList) Has(fs ...facility) bool {\n\tif len(fs) == 0 {\n\t\tpanic(\"no facility bits provided\")\n\t}\n\tfor _, f := range fs {\n\t\tif !bitIsSet(s.bits[:], uint(f)) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// function is the code for the named cryptographic function.\ntype function uint8\n\nconst (\n\t// KM{,A,C,CTR} function codes\n\taes128 function = 18 // AES-128\n\taes192 function = 19 // AES-192\n\taes256 function = 20 // AES-256\n\n\t// K{I,L}MD function codes\n\tsha1     function = 1  // SHA-1\n\tsha256   function = 2  // SHA-256\n\tsha512   function = 3  // SHA-512\n\tsha3_224 function = 32 // SHA3-224\n\tsha3_256 function = 33 // SHA3-256\n\tsha3_384 function = 34 // SHA3-384\n\tsha3_512 function = 35 // SHA3-512\n\tshake128 function = 36 // SHAKE-128\n\tshake256 function = 37 // SHAKE-256\n\n\t// KLMD function codes\n\tghash function = 65 // GHASH\n)\n\n// queryResult contains the result of a Query function\n// call. Bits are numbered in big endian order so the\n// leftmost bit (the MSB) is at index 0.\ntype queryResult struct {\n\tbits [2]uint64\n}\n\n// Has reports whether the given functions are present.\nfunc (q *queryResult) Has(fns ...function) bool {\n\tif len(fns) == 0 {\n\t\tpanic(\"no function codes provided\")\n\t}\n\tfor _, f := range fns {\n\t\tif !bitIsSet(q.bits[:], uint(f)) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc doinit() {\n\tinitS390Xbase()\n\n\t// We need implementations of stfle, km and so on\n\t// to detect cryptographic features.\n\tif !haveAsmFunctions() {\n\t\treturn\n\t}\n\n\t// optional cryptographic functions\n\tif S390X.HasMSA {\n\t\taes := []function{aes128, aes192, aes256}\n\n\t\t// cipher message\n\t\tkm, kmc := kmQuery(), kmcQuery()\n\t\tS390X.HasAES = km.Has(aes...)\n\t\tS390X.HasAESCBC = kmc.Has(aes...)\n\t\tif S390X.HasSTFLE {\n\t\t\tfacilities := stfle()\n\t\t\tif facilities.Has(msa4) {\n\t\t\t\tkmctr := kmctrQuery()\n\t\t\t\tS390X.HasAESCTR = kmctr.Has(aes...)\n\t\t\t}\n\t\t\tif facilities.Has(msa8) {\n\t\t\t\tkma := kmaQuery()\n\t\t\t\tS390X.HasAESGCM = kma.Has(aes...)\n\t\t\t}\n\t\t}\n\n\t\t// compute message digest\n\t\tkimd := kimdQuery() // intermediate (no padding)\n\t\tklmd := klmdQuery() // last (padding)\n\t\tS390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1)\n\t\tS390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256)\n\t\tS390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512)\n\t\tS390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist\n\t\tsha3 := []function{\n\t\t\tsha3_224, sha3_256, sha3_384, sha3_512,\n\t\t\tshake128, shake256,\n\t\t}\n\t\tS390X.HasSHA3 = kimd.Has(sha3...) && klmd.Has(sha3...)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_s390x.s",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n// func stfle() facilityList\nTEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32\n\tMOVD $ret+0(FP), R1\n\tMOVD $3, R0          // last doubleword index to store\n\tXC   $32, (R1), (R1) // clear 4 doublewords (32 bytes)\n\tWORD $0xb2b01000     // store facility list extended (STFLE)\n\tRET\n\n// func kmQuery() queryResult\nTEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KM-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xB92E0024    // cipher message (KM)\n\tRET\n\n// func kmcQuery() queryResult\nTEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KMC-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xB92F0024    // cipher message with chaining (KMC)\n\tRET\n\n// func kmctrQuery() queryResult\nTEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KMCTR-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xB92D4024    // cipher message with counter (KMCTR)\n\tRET\n\n// func kmaQuery() queryResult\nTEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KMA-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xb9296024    // cipher message with authentication (KMA)\n\tRET\n\n// func kimdQuery() queryResult\nTEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KIMD-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xB93E0024    // compute intermediate message digest (KIMD)\n\tRET\n\n// func klmdQuery() queryResult\nTEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16\n\tMOVD $0, R0         // set function code to 0 (KLMD-Query)\n\tMOVD $ret+0(FP), R1 // address of 16-byte return value\n\tWORD $0xB93F0024    // compute last message digest (KLMD)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_wasm.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build wasm\n\npackage cpu\n\n// We're compiling the cpu package for an unknown (software-abstracted) CPU.\n// Make CacheLinePad an empty struct and hope that the usual struct alignment\n// rules are good enough.\n\nconst cacheLineSize = 0\n\nfunc initOptions() {}\n\nfunc archInit() {}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_windows_arm64.go",
    "content": "// Copyright 2026 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"golang.org/x/sys/windows\"\n)\n\nfunc doinit() {\n\t// set HasASIMD and HasFP to true as per\n\t// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#base-requirements\n\t//\n\t// The ARM64 version of Windows always presupposes that it's running on an ARMv8 or later architecture.\n\t// Both floating-point and NEON support are presumed to be present in hardware.\n\t//\n\tARM64.HasASIMD = true\n\tARM64.HasFP = true\n\n\tif windows.IsProcessorFeaturePresent(windows.PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) {\n\t\tARM64.HasAES = true\n\t\tARM64.HasPMULL = true\n\t\tARM64.HasSHA1 = true\n\t\tARM64.HasSHA2 = true\n\t}\n\tARM64.HasSHA3 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE)\n\tARM64.HasCRC32 = windows.IsProcessorFeaturePresent(windows.PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)\n\tARM64.HasSHA512 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SHA512_INSTRUCTIONS_AVAILABLE)\n\tARM64.HasATOMICS = windows.IsProcessorFeaturePresent(windows.PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)\n\tif windows.IsProcessorFeaturePresent(windows.PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) {\n\t\tARM64.HasASIMDDP = true\n\t\tARM64.HasASIMDRDM = true\n\t}\n\tif windows.IsProcessorFeaturePresent(windows.PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE) {\n\t\tARM64.HasLRCPC = true\n\t\tARM64.HasSM3 = true\n\t}\n\tARM64.HasSVE = windows.IsProcessorFeaturePresent(windows.PF_ARM_SVE_INSTRUCTIONS_AVAILABLE)\n\tARM64.HasSVE2 = windows.IsProcessorFeaturePresent(windows.PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE)\n\tARM64.HasJSCVT = windows.IsProcessorFeaturePresent(windows.PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_x86.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 || amd64 || amd64p32\n\npackage cpu\n\nimport \"runtime\"\n\nconst cacheLineSize = 64\n\nfunc initOptions() {\n\toptions = []option{\n\t\t{Name: \"adx\", Feature: &X86.HasADX},\n\t\t{Name: \"aes\", Feature: &X86.HasAES},\n\t\t{Name: \"avx\", Feature: &X86.HasAVX},\n\t\t{Name: \"avx2\", Feature: &X86.HasAVX2},\n\t\t{Name: \"avx512\", Feature: &X86.HasAVX512},\n\t\t{Name: \"avx512f\", Feature: &X86.HasAVX512F},\n\t\t{Name: \"avx512cd\", Feature: &X86.HasAVX512CD},\n\t\t{Name: \"avx512er\", Feature: &X86.HasAVX512ER},\n\t\t{Name: \"avx512pf\", Feature: &X86.HasAVX512PF},\n\t\t{Name: \"avx512vl\", Feature: &X86.HasAVX512VL},\n\t\t{Name: \"avx512bw\", Feature: &X86.HasAVX512BW},\n\t\t{Name: \"avx512dq\", Feature: &X86.HasAVX512DQ},\n\t\t{Name: \"avx512ifma\", Feature: &X86.HasAVX512IFMA},\n\t\t{Name: \"avx512vbmi\", Feature: &X86.HasAVX512VBMI},\n\t\t{Name: \"avx512vnniw\", Feature: &X86.HasAVX5124VNNIW},\n\t\t{Name: \"avx5124fmaps\", Feature: &X86.HasAVX5124FMAPS},\n\t\t{Name: \"avx512vpopcntdq\", Feature: &X86.HasAVX512VPOPCNTDQ},\n\t\t{Name: \"avx512vpclmulqdq\", Feature: &X86.HasAVX512VPCLMULQDQ},\n\t\t{Name: \"avx512vnni\", Feature: &X86.HasAVX512VNNI},\n\t\t{Name: \"avx512gfni\", Feature: &X86.HasAVX512GFNI},\n\t\t{Name: \"avx512vaes\", Feature: &X86.HasAVX512VAES},\n\t\t{Name: \"avx512vbmi2\", Feature: &X86.HasAVX512VBMI2},\n\t\t{Name: \"avx512bitalg\", Feature: &X86.HasAVX512BITALG},\n\t\t{Name: \"avx512bf16\", Feature: &X86.HasAVX512BF16},\n\t\t{Name: \"amxtile\", Feature: &X86.HasAMXTile},\n\t\t{Name: \"amxint8\", Feature: &X86.HasAMXInt8},\n\t\t{Name: \"amxbf16\", Feature: &X86.HasAMXBF16},\n\t\t{Name: \"bmi1\", Feature: &X86.HasBMI1},\n\t\t{Name: \"bmi2\", Feature: &X86.HasBMI2},\n\t\t{Name: \"cx16\", Feature: &X86.HasCX16},\n\t\t{Name: \"erms\", Feature: &X86.HasERMS},\n\t\t{Name: \"fma\", Feature: &X86.HasFMA},\n\t\t{Name: \"osxsave\", Feature: &X86.HasOSXSAVE},\n\t\t{Name: \"pclmulqdq\", Feature: &X86.HasPCLMULQDQ},\n\t\t{Name: \"popcnt\", Feature: &X86.HasPOPCNT},\n\t\t{Name: \"rdrand\", Feature: &X86.HasRDRAND},\n\t\t{Name: \"rdseed\", Feature: &X86.HasRDSEED},\n\t\t{Name: \"sse3\", Feature: &X86.HasSSE3},\n\t\t{Name: \"sse41\", Feature: &X86.HasSSE41},\n\t\t{Name: \"sse42\", Feature: &X86.HasSSE42},\n\t\t{Name: \"ssse3\", Feature: &X86.HasSSSE3},\n\t\t{Name: \"avxifma\", Feature: &X86.HasAVXIFMA},\n\t\t{Name: \"avxvnni\", Feature: &X86.HasAVXVNNI},\n\t\t{Name: \"avxvnniint8\", Feature: &X86.HasAVXVNNIInt8},\n\n\t\t// These capabilities should always be enabled on amd64:\n\t\t{Name: \"sse2\", Feature: &X86.HasSSE2, Required: runtime.GOARCH == \"amd64\"},\n\t}\n}\n\nfunc archInit() {\n\n\t// From internal/cpu\n\tconst (\n\t\t// eax bits\n\t\tcpuid_AVXVNNI = 1 << 4\n\n\t\t// ecx bits\n\t\tcpuid_SSE3            = 1 << 0\n\t\tcpuid_PCLMULQDQ       = 1 << 1\n\t\tcpuid_AVX512VBMI      = 1 << 1\n\t\tcpuid_AVX512VBMI2     = 1 << 6\n\t\tcpuid_SSSE3           = 1 << 9\n\t\tcpuid_AVX512GFNI      = 1 << 8\n\t\tcpuid_AVX512VAES      = 1 << 9\n\t\tcpuid_AVX512VNNI      = 1 << 11\n\t\tcpuid_AVX512BITALG    = 1 << 12\n\t\tcpuid_FMA             = 1 << 12\n\t\tcpuid_AVX512VPOPCNTDQ = 1 << 14\n\t\tcpuid_SSE41           = 1 << 19\n\t\tcpuid_SSE42           = 1 << 20\n\t\tcpuid_POPCNT          = 1 << 23\n\t\tcpuid_AES             = 1 << 25\n\t\tcpuid_OSXSAVE         = 1 << 27\n\t\tcpuid_AVX             = 1 << 28\n\n\t\t// \"Extended Feature Flag\" bits returned in EBX for CPUID EAX=0x7 ECX=0x0\n\t\tcpuid_BMI1     = 1 << 3\n\t\tcpuid_AVX2     = 1 << 5\n\t\tcpuid_BMI2     = 1 << 8\n\t\tcpuid_ERMS     = 1 << 9\n\t\tcpuid_AVX512F  = 1 << 16\n\t\tcpuid_AVX512DQ = 1 << 17\n\t\tcpuid_ADX      = 1 << 19\n\t\tcpuid_AVX512CD = 1 << 28\n\t\tcpuid_SHA      = 1 << 29\n\t\tcpuid_AVX512BW = 1 << 30\n\t\tcpuid_AVX512VL = 1 << 31\n\n\t\t// \"Extended Feature Flag\" bits returned in ECX for CPUID EAX=0x7 ECX=0x0\n\t\tcpuid_AVX512_VBMI      = 1 << 1\n\t\tcpuid_AVX512_VBMI2     = 1 << 6\n\t\tcpuid_GFNI             = 1 << 8\n\t\tcpuid_AVX512VPCLMULQDQ = 1 << 10\n\t\tcpuid_AVX512_BITALG    = 1 << 12\n\n\t\t// edx bits\n\t\tcpuid_FSRM = 1 << 4\n\t\t// edx bits for CPUID 0x80000001\n\t\tcpuid_RDTSCP = 1 << 27\n\t)\n\t// Additional constants not in internal/cpu\n\tconst (\n\t\t// eax=1: edx\n\t\tcpuid_SSE2 = 1 << 26\n\t\t// eax=1: ecx\n\t\tcpuid_CX16   = 1 << 13\n\t\tcpuid_RDRAND = 1 << 30\n\t\t// eax=7,ecx=0: ebx\n\t\tcpuid_RDSEED     = 1 << 18\n\t\tcpuid_AVX512IFMA = 1 << 21\n\t\tcpuid_AVX512PF   = 1 << 26\n\t\tcpuid_AVX512ER   = 1 << 27\n\t\t// eax=7,ecx=0: edx\n\t\tcpuid_AVX5124VNNIW = 1 << 2\n\t\tcpuid_AVX5124FMAPS = 1 << 3\n\t\tcpuid_AMXBF16      = 1 << 22\n\t\tcpuid_AMXTile      = 1 << 24\n\t\tcpuid_AMXInt8      = 1 << 25\n\t\t// eax=7,ecx=1: eax\n\t\tcpuid_AVX512BF16 = 1 << 5\n\t\tcpuid_AVXIFMA    = 1 << 23\n\t\t// eax=7,ecx=1: edx\n\t\tcpuid_AVXVNNIInt8 = 1 << 4\n\t)\n\n\tInitialized = true\n\n\tmaxID, _, _, _ := cpuid(0, 0)\n\n\tif maxID < 1 {\n\t\treturn\n\t}\n\n\t_, _, ecx1, edx1 := cpuid(1, 0)\n\tX86.HasSSE2 = isSet(edx1, cpuid_SSE2)\n\n\tX86.HasSSE3 = isSet(ecx1, cpuid_SSE3)\n\tX86.HasPCLMULQDQ = isSet(ecx1, cpuid_PCLMULQDQ)\n\tX86.HasSSSE3 = isSet(ecx1, cpuid_SSSE3)\n\tX86.HasFMA = isSet(ecx1, cpuid_FMA)\n\tX86.HasCX16 = isSet(ecx1, cpuid_CX16)\n\tX86.HasSSE41 = isSet(ecx1, cpuid_SSE41)\n\tX86.HasSSE42 = isSet(ecx1, cpuid_SSE42)\n\tX86.HasPOPCNT = isSet(ecx1, cpuid_POPCNT)\n\tX86.HasAES = isSet(ecx1, cpuid_AES)\n\tX86.HasOSXSAVE = isSet(ecx1, cpuid_OSXSAVE)\n\tX86.HasRDRAND = isSet(ecx1, cpuid_RDRAND)\n\n\tvar osSupportsAVX, osSupportsAVX512 bool\n\t// For XGETBV, OSXSAVE bit is required and sufficient.\n\tif X86.HasOSXSAVE {\n\t\teax, _ := xgetbv()\n\t\t// Check if XMM and YMM registers have OS support.\n\t\tosSupportsAVX = isSet(eax, 1<<1) && isSet(eax, 1<<2)\n\n\t\tif runtime.GOOS == \"darwin\" {\n\t\t\t// Darwin requires special AVX512 checks, see cpu_darwin_x86.go\n\t\t\tosSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()\n\t\t} else {\n\t\t\t// Check if OPMASK and ZMM registers have OS support.\n\t\t\tosSupportsAVX512 = osSupportsAVX && isSet(eax, 1<<5) && isSet(eax, 1<<6) && isSet(eax, 1<<7)\n\t\t}\n\t}\n\n\tX86.HasAVX = isSet(ecx1, cpuid_AVX) && osSupportsAVX\n\n\tif maxID < 7 {\n\t\treturn\n\t}\n\n\teax7, ebx7, ecx7, edx7 := cpuid(7, 0)\n\tX86.HasBMI1 = isSet(ebx7, cpuid_BMI1)\n\tX86.HasAVX2 = isSet(ebx7, cpuid_AVX2) && osSupportsAVX\n\tX86.HasBMI2 = isSet(ebx7, cpuid_BMI2)\n\tX86.HasERMS = isSet(ebx7, cpuid_ERMS)\n\tX86.HasRDSEED = isSet(ebx7, cpuid_RDSEED)\n\tX86.HasADX = isSet(ebx7, cpuid_ADX)\n\n\tX86.HasAVX512 = isSet(ebx7, cpuid_AVX512F) && osSupportsAVX512 // Because avx-512 foundation is the core required extension\n\tif X86.HasAVX512 {\n\t\tX86.HasAVX512F = true\n\t\tX86.HasAVX512CD = isSet(ebx7, cpuid_AVX512CD)\n\t\tX86.HasAVX512ER = isSet(ebx7, cpuid_AVX512ER)\n\t\tX86.HasAVX512PF = isSet(ebx7, cpuid_AVX512PF)\n\t\tX86.HasAVX512VL = isSet(ebx7, cpuid_AVX512VL)\n\t\tX86.HasAVX512BW = isSet(ebx7, cpuid_AVX512BW)\n\t\tX86.HasAVX512DQ = isSet(ebx7, cpuid_AVX512DQ)\n\t\tX86.HasAVX512IFMA = isSet(ebx7, cpuid_AVX512IFMA)\n\t\tX86.HasAVX512VBMI = isSet(ecx7, cpuid_AVX512_VBMI)\n\t\tX86.HasAVX5124VNNIW = isSet(edx7, cpuid_AVX5124VNNIW)\n\t\tX86.HasAVX5124FMAPS = isSet(edx7, cpuid_AVX5124FMAPS)\n\t\tX86.HasAVX512VPOPCNTDQ = isSet(ecx7, cpuid_AVX512VPOPCNTDQ)\n\t\tX86.HasAVX512VPCLMULQDQ = isSet(ecx7, cpuid_AVX512VPCLMULQDQ)\n\t\tX86.HasAVX512VNNI = isSet(ecx7, cpuid_AVX512VNNI)\n\t\tX86.HasAVX512GFNI = isSet(ecx7, cpuid_AVX512GFNI)\n\t\tX86.HasAVX512VAES = isSet(ecx7, cpuid_AVX512VAES)\n\t\tX86.HasAVX512VBMI2 = isSet(ecx7, cpuid_AVX512VBMI2)\n\t\tX86.HasAVX512BITALG = isSet(ecx7, cpuid_AVX512BITALG)\n\t}\n\n\tX86.HasAMXTile = isSet(edx7, cpuid_AMXTile)\n\tX86.HasAMXInt8 = isSet(edx7, cpuid_AMXInt8)\n\tX86.HasAMXBF16 = isSet(edx7, cpuid_AMXBF16)\n\n\t// These features depend on the second level of extended features.\n\tif eax7 >= 1 {\n\t\teax71, _, _, edx71 := cpuid(7, 1)\n\t\tif X86.HasAVX512 {\n\t\t\tX86.HasAVX512BF16 = isSet(eax71, cpuid_AVX512BF16)\n\t\t}\n\t\tif X86.HasAVX {\n\t\t\tX86.HasAVXIFMA = isSet(eax71, cpuid_AVXIFMA)\n\t\t\tX86.HasAVXVNNI = isSet(eax71, cpuid_AVXVNNI)\n\t\t\tX86.HasAVXVNNIInt8 = isSet(edx71, cpuid_AVXVNNIInt8)\n\t\t}\n\t}\n}\n\nfunc isSet(hwc uint32, value uint32) bool {\n\treturn hwc&value != 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_zos.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nfunc archInit() {\n\tdoinit()\n\tInitialized = true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nfunc initS390Xbase() {\n\t// get the facilities list\n\tfacilities := stfle()\n\n\t// mandatory\n\tS390X.HasZARCH = facilities.Has(zarch)\n\tS390X.HasSTFLE = facilities.Has(stflef)\n\tS390X.HasLDISP = facilities.Has(ldisp)\n\tS390X.HasEIMM = facilities.Has(eimm)\n\n\t// optional\n\tS390X.HasETF3EH = facilities.Has(etf3eh)\n\tS390X.HasDFP = facilities.Has(dfp)\n\tS390X.HasMSA = facilities.Has(msa)\n\tS390X.HasVX = facilities.Has(vx)\n\tif S390X.HasVX {\n\t\tS390X.HasVXE = facilities.Has(vxe)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/endian_big.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64\n\npackage cpu\n\n// IsBigEndian records whether the GOARCH's byte order is big endian.\nconst IsBigEndian = true\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/endian_little.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm\n\npackage cpu\n\n// IsBigEndian records whether the GOARCH's byte order is big endian.\nconst IsBigEndian = false\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/hwcap_linux.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport (\n\t\"os\"\n)\n\nconst (\n\t_AT_HWCAP  = 16\n\t_AT_HWCAP2 = 26\n\n\tprocAuxv = \"/proc/self/auxv\"\n\n\tuintSize = int(32 << (^uint(0) >> 63))\n)\n\n// For those platforms don't have a 'cpuid' equivalent we use HWCAP/HWCAP2\n// These are initialized in cpu_$GOARCH.go\n// and should not be changed after they are initialized.\nvar hwCap uint\nvar hwCap2 uint\n\nfunc readHWCAP() error {\n\t// For Go 1.21+, get auxv from the Go runtime.\n\tif a := getAuxv(); len(a) > 0 {\n\t\tfor len(a) >= 2 {\n\t\t\ttag, val := a[0], uint(a[1])\n\t\t\ta = a[2:]\n\t\t\tswitch tag {\n\t\t\tcase _AT_HWCAP:\n\t\t\t\thwCap = val\n\t\t\tcase _AT_HWCAP2:\n\t\t\t\thwCap2 = val\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tbuf, err := os.ReadFile(procAuxv)\n\tif err != nil {\n\t\t// e.g. on android /proc/self/auxv is not accessible, so silently\n\t\t// ignore the error and leave Initialized = false. On some\n\t\t// architectures (e.g. arm64) doinit() implements a fallback\n\t\t// readout and will set Initialized = true again.\n\t\treturn err\n\t}\n\tbo := hostByteOrder()\n\tfor len(buf) >= 2*(uintSize/8) {\n\t\tvar tag, val uint\n\t\tswitch uintSize {\n\t\tcase 32:\n\t\t\ttag = uint(bo.Uint32(buf[0:]))\n\t\t\tval = uint(bo.Uint32(buf[4:]))\n\t\t\tbuf = buf[8:]\n\t\tcase 64:\n\t\t\ttag = uint(bo.Uint64(buf[0:]))\n\t\t\tval = uint(bo.Uint64(buf[8:]))\n\t\t\tbuf = buf[16:]\n\t\t}\n\t\tswitch tag {\n\t\tcase _AT_HWCAP:\n\t\t\thwCap = val\n\t\tcase _AT_HWCAP2:\n\t\t\thwCap2 = val\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/parse.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\nimport \"strconv\"\n\n// parseRelease parses a dot-separated version number. It follows the semver\n// syntax, but allows the minor and patch versions to be elided.\n//\n// This is a copy of the Go runtime's parseRelease from\n// https://golang.org/cl/209597.\nfunc parseRelease(rel string) (major, minor, patch int, ok bool) {\n\t// Strip anything after a dash or plus.\n\tfor i := range len(rel) {\n\t\tif rel[i] == '-' || rel[i] == '+' {\n\t\t\trel = rel[:i]\n\t\t\tbreak\n\t\t}\n\t}\n\n\tnext := func() (int, bool) {\n\t\tfor i := range len(rel) {\n\t\t\tif rel[i] == '.' {\n\t\t\t\tver, err := strconv.Atoi(rel[:i])\n\t\t\t\trel = rel[i+1:]\n\t\t\t\treturn ver, err == nil\n\t\t\t}\n\t\t}\n\t\tver, err := strconv.Atoi(rel)\n\t\trel = \"\"\n\t\treturn ver, err == nil\n\t}\n\tif major, ok = next(); !ok || rel == \"\" {\n\t\treturn\n\t}\n\tif minor, ok = next(); !ok || rel == \"\" {\n\t\treturn\n\t}\n\tpatch, ok = next()\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && arm64\n\npackage cpu\n\nimport (\n\t\"errors\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc readLinuxProcCPUInfo() error {\n\tf, err := os.Open(\"/proc/cpuinfo\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\n\tvar buf [1 << 10]byte // enough for first CPU\n\tn, err := io.ReadFull(f, buf[:])\n\tif err != nil && err != io.ErrUnexpectedEOF {\n\t\treturn err\n\t}\n\tin := string(buf[:n])\n\tconst features = \"\\nFeatures\t: \"\n\ti := strings.Index(in, features)\n\tif i == -1 {\n\t\treturn errors.New(\"no CPU features found\")\n\t}\n\tin = in[i+len(features):]\n\tif i := strings.Index(in, \"\\n\"); i != -1 {\n\t\tin = in[:i]\n\t}\n\tm := map[string]*bool{}\n\n\tinitOptions() // need it early here; it's harmless to call twice\n\tfor _, o := range options {\n\t\tm[o.Name] = o.Feature\n\t}\n\t// The EVTSTRM field has alias \"evstrm\" in Go, but Linux calls it \"evtstrm\".\n\tm[\"evtstrm\"] = &ARM64.HasEVTSTRM\n\n\tfor _, f := range strings.Fields(in) {\n\t\tif p, ok := m[f]; ok {\n\t\t\t*p = true\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/runtime_auxv.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cpu\n\n// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)\n// on platforms that use auxv.\nvar getAuxvFn func() []uintptr\n\nfunc getAuxv() []uintptr {\n\tif getAuxvFn == nil {\n\t\treturn nil\n\t}\n\treturn getAuxvFn()\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.21\n\npackage cpu\n\nimport (\n\t_ \"unsafe\" // for linkname\n)\n\n//go:linkname runtime_getAuxv runtime.getAuxv\nfunc runtime_getAuxv() []uintptr\n\nfunc init() {\n\tgetAuxvFn = runtime_getAuxv\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Recreate a getsystemcfg syscall handler instead of\n// using the one provided by x/sys/unix to avoid having\n// the dependency between them. (See golang.org/issue/32102)\n// Moreover, this file will be used during the building of\n// gccgo's libgo and thus must not used a CGo method.\n\n//go:build aix && gccgo\n\npackage cpu\n\nimport (\n\t\"syscall\"\n)\n\n//extern getsystemcfg\nfunc gccgoGetsystemcfg(label uint32) (r uint64)\n\nfunc callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {\n\tr1 = uintptr(gccgoGetsystemcfg(uint32(label)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Minimal copy of x/sys/unix so the cpu package can make a\n// system call on AIX without depending on x/sys/unix.\n// (See golang.org/issue/32102)\n\n//go:build aix && ppc64 && gc\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg \"libc.a/shr_64.o\"\n\n//go:linkname libc_getsystemcfg libc_getsystemcfg\n\ntype syscallFunc uintptr\n\nvar libc_getsystemcfg syscallFunc\n\ntype errno = syscall.Errno\n\n// Implemented in runtime/syscall_aix.go.\nfunc rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)\nfunc syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)\n\nfunc callgetsystemcfg(label int) (r1 uintptr, e1 errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Minimal copy from internal/cpu and runtime to make sysctl calls.\n\n//go:build darwin && arm64 && gc\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\ntype Errno = syscall.Errno\n\n// adapted from internal/cpu/cpu_arm64_darwin.go\nfunc darwinSysctlEnabled(name []byte) bool {\n\tout := int32(0)\n\tnout := unsafe.Sizeof(out)\n\tif ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil {\n\t\treturn false\n\t}\n\treturn out > 0\n}\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"/usr/lib/libSystem.B.dylib\"\n\nvar libc_sysctlbyname_trampoline_addr uintptr\n\n// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix\nfunc sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {\n\tif _, _, err := syscall_syscall6(\n\t\tlibc_sysctlbyname_trampoline_addr,\n\t\tuintptr(unsafe.Pointer(name)),\n\t\tuintptr(unsafe.Pointer(old)),\n\t\tuintptr(unsafe.Pointer(oldlen)),\n\t\tuintptr(unsafe.Pointer(new)),\n\t\tuintptr(newlen),\n\t\t0,\n\t); err != 0 {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname \"/usr/lib/libSystem.B.dylib\"\n\n// Implemented in the runtime package (runtime/sys_darwin.go)\nfunc syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\n\n//go:linkname syscall_syscall6 syscall.syscall6\n"
  },
  {
    "path": "vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Minimal copy of x/sys/unix so the cpu package can make a\n// system call on Darwin without depending on x/sys/unix.\n\n//go:build darwin && amd64 && gc\n\npackage cpu\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\ntype _C_int int32\n\n// adapted from unix.Uname() at x/sys/unix/syscall_darwin.go L419\nfunc darwinOSRelease(release *[256]byte) error {\n\t// from x/sys/unix/zerrors_openbsd_amd64.go\n\tconst (\n\t\tCTL_KERN       = 0x1\n\t\tKERN_OSRELEASE = 0x2\n\t)\n\n\tmib := []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn := unsafe.Sizeof(*release)\n\n\treturn sysctl(mib, &release[0], &n, nil, 0)\n}\n\ntype Errno = syscall.Errno\n\nvar _zero uintptr // Single-word zero for use when we need a valid pointer to 0 bytes.\n\n// from x/sys/unix/zsyscall_darwin_amd64.go L791-807\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tif _, _, err := syscall_syscall6(\n\t\tlibc_sysctl_trampoline_addr,\n\t\tuintptr(_p0),\n\t\tuintptr(len(mib)),\n\t\tuintptr(unsafe.Pointer(old)),\n\t\tuintptr(unsafe.Pointer(oldlen)),\n\t\tuintptr(unsafe.Pointer(new)),\n\t\tuintptr(newlen),\n\t); err != 0 {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n// adapted from internal/cpu/cpu_arm64_darwin.go\nfunc darwinSysctlEnabled(name []byte) bool {\n\tout := int32(0)\n\tnout := unsafe.Sizeof(out)\n\tif ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil {\n\t\treturn false\n\t}\n\treturn out > 0\n}\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"/usr/lib/libSystem.B.dylib\"\n\nvar libc_sysctlbyname_trampoline_addr uintptr\n\n// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix\nfunc sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {\n\tif _, _, err := syscall_syscall6(\n\t\tlibc_sysctlbyname_trampoline_addr,\n\t\tuintptr(unsafe.Pointer(name)),\n\t\tuintptr(unsafe.Pointer(old)),\n\t\tuintptr(unsafe.Pointer(oldlen)),\n\t\tuintptr(unsafe.Pointer(new)),\n\t\tuintptr(newlen),\n\t\t0,\n\t); err != 0 {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname \"/usr/lib/libSystem.B.dylib\"\n\n// Implemented in the runtime package (runtime/sys_darwin.go)\nfunc syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\n\n//go:linkname syscall_syscall6 syscall.syscall6\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/asm.s",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\nTEXT ·use(SB),NOSPLIT,$0\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/asm_plan9_386.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\n//\n// System call support for 386, Plan 9\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-32\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-44\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·seek(SB),NOSPLIT,$0-36\n\tJMP\tsyscall·seek(SB)\n\nTEXT ·exit(SB),NOSPLIT,$4-4\n\tJMP\tsyscall·exit(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\n//\n// System call support for amd64, Plan 9\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-64\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·seek(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·seek(SB)\n\nTEXT ·exit(SB),NOSPLIT,$8-8\n\tJMP\tsyscall·exit(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/asm_plan9_arm.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"textflag.h\"\n\n// System call support for plan9 on arm\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-32\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-44\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·seek(SB),NOSPLIT,$0-36\n\tJMP\tsyscall·exit(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/const_plan9.go",
    "content": "package plan9\n\n// Plan 9 Constants\n\n// Open modes\nconst (\n\tO_RDONLY  = 0\n\tO_WRONLY  = 1\n\tO_RDWR    = 2\n\tO_TRUNC   = 16\n\tO_CLOEXEC = 32\n\tO_EXCL    = 0x1000\n)\n\n// Rfork flags\nconst (\n\tRFNAMEG  = 1 << 0\n\tRFENVG   = 1 << 1\n\tRFFDG    = 1 << 2\n\tRFNOTEG  = 1 << 3\n\tRFPROC   = 1 << 4\n\tRFMEM    = 1 << 5\n\tRFNOWAIT = 1 << 6\n\tRFCNAMEG = 1 << 10\n\tRFCENVG  = 1 << 11\n\tRFCFDG   = 1 << 12\n\tRFREND   = 1 << 13\n\tRFNOMNT  = 1 << 14\n)\n\n// Qid.Type bits\nconst (\n\tQTDIR    = 0x80\n\tQTAPPEND = 0x40\n\tQTEXCL   = 0x20\n\tQTMOUNT  = 0x10\n\tQTAUTH   = 0x08\n\tQTTMP    = 0x04\n\tQTFILE   = 0x00\n)\n\n// Dir.Mode bits\nconst (\n\tDMDIR    = 0x80000000\n\tDMAPPEND = 0x40000000\n\tDMEXCL   = 0x20000000\n\tDMMOUNT  = 0x10000000\n\tDMAUTH   = 0x08000000\n\tDMTMP    = 0x04000000\n\tDMREAD   = 0x4\n\tDMWRITE  = 0x2\n\tDMEXEC   = 0x1\n)\n\nconst (\n\tSTATMAX    = 65535\n\tERRMAX     = 128\n\tSTATFIXLEN = 49\n)\n\n// Mount and bind flags\nconst (\n\tMREPL   = 0x0000\n\tMBEFORE = 0x0001\n\tMAFTER  = 0x0002\n\tMORDER  = 0x0003\n\tMCREATE = 0x0004\n\tMCACHE  = 0x0010\n\tMMASK   = 0x0017\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/dir_plan9.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Plan 9 directory marshalling. See intro(5).\n\npackage plan9\n\nimport \"errors\"\n\nvar (\n\tErrShortStat = errors.New(\"stat buffer too short\")\n\tErrBadStat   = errors.New(\"malformed stat buffer\")\n\tErrBadName   = errors.New(\"bad character in file name\")\n)\n\n// A Qid represents a 9P server's unique identification for a file.\ntype Qid struct {\n\tPath uint64 // the file server's unique identification for the file\n\tVers uint32 // version number for given Path\n\tType uint8  // the type of the file (plan9.QTDIR for example)\n}\n\n// A Dir contains the metadata for a file.\ntype Dir struct {\n\t// system-modified data\n\tType uint16 // server type\n\tDev  uint32 // server subtype\n\n\t// file data\n\tQid    Qid    // unique id from server\n\tMode   uint32 // permissions\n\tAtime  uint32 // last read time\n\tMtime  uint32 // last write time\n\tLength int64  // file length\n\tName   string // last element of path\n\tUid    string // owner name\n\tGid    string // group name\n\tMuid   string // last modifier name\n}\n\nvar nullDir = Dir{\n\tType: ^uint16(0),\n\tDev:  ^uint32(0),\n\tQid: Qid{\n\t\tPath: ^uint64(0),\n\t\tVers: ^uint32(0),\n\t\tType: ^uint8(0),\n\t},\n\tMode:   ^uint32(0),\n\tAtime:  ^uint32(0),\n\tMtime:  ^uint32(0),\n\tLength: ^int64(0),\n}\n\n// Null assigns special \"don't touch\" values to members of d to\n// avoid modifying them during plan9.Wstat.\nfunc (d *Dir) Null() { *d = nullDir }\n\n// Marshal encodes a 9P stat message corresponding to d into b\n//\n// If there isn't enough space in b for a stat message, ErrShortStat is returned.\nfunc (d *Dir) Marshal(b []byte) (n int, err error) {\n\tn = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid)\n\tif n > len(b) {\n\t\treturn n, ErrShortStat\n\t}\n\n\tfor _, c := range d.Name {\n\t\tif c == '/' {\n\t\t\treturn n, ErrBadName\n\t\t}\n\t}\n\n\tb = pbit16(b, uint16(n)-2)\n\tb = pbit16(b, d.Type)\n\tb = pbit32(b, d.Dev)\n\tb = pbit8(b, d.Qid.Type)\n\tb = pbit32(b, d.Qid.Vers)\n\tb = pbit64(b, d.Qid.Path)\n\tb = pbit32(b, d.Mode)\n\tb = pbit32(b, d.Atime)\n\tb = pbit32(b, d.Mtime)\n\tb = pbit64(b, uint64(d.Length))\n\tb = pstring(b, d.Name)\n\tb = pstring(b, d.Uid)\n\tb = pstring(b, d.Gid)\n\tb = pstring(b, d.Muid)\n\n\treturn n, nil\n}\n\n// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir.\n//\n// If b is too small to hold a valid stat message, ErrShortStat is returned.\n//\n// If the stat message itself is invalid, ErrBadStat is returned.\nfunc UnmarshalDir(b []byte) (*Dir, error) {\n\tif len(b) < STATFIXLEN {\n\t\treturn nil, ErrShortStat\n\t}\n\tsize, buf := gbit16(b)\n\tif len(b) != int(size)+2 {\n\t\treturn nil, ErrBadStat\n\t}\n\tb = buf\n\n\tvar d Dir\n\td.Type, b = gbit16(b)\n\td.Dev, b = gbit32(b)\n\td.Qid.Type, b = gbit8(b)\n\td.Qid.Vers, b = gbit32(b)\n\td.Qid.Path, b = gbit64(b)\n\td.Mode, b = gbit32(b)\n\td.Atime, b = gbit32(b)\n\td.Mtime, b = gbit32(b)\n\n\tn, b := gbit64(b)\n\td.Length = int64(n)\n\n\tvar ok bool\n\tif d.Name, b, ok = gstring(b); !ok {\n\t\treturn nil, ErrBadStat\n\t}\n\tif d.Uid, b, ok = gstring(b); !ok {\n\t\treturn nil, ErrBadStat\n\t}\n\tif d.Gid, b, ok = gstring(b); !ok {\n\t\treturn nil, ErrBadStat\n\t}\n\tif d.Muid, b, ok = gstring(b); !ok {\n\t\treturn nil, ErrBadStat\n\t}\n\n\treturn &d, nil\n}\n\n// pbit8 copies the 8-bit number v to b and returns the remaining slice of b.\nfunc pbit8(b []byte, v uint8) []byte {\n\tb[0] = byte(v)\n\treturn b[1:]\n}\n\n// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b.\nfunc pbit16(b []byte, v uint16) []byte {\n\tb[0] = byte(v)\n\tb[1] = byte(v >> 8)\n\treturn b[2:]\n}\n\n// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b.\nfunc pbit32(b []byte, v uint32) []byte {\n\tb[0] = byte(v)\n\tb[1] = byte(v >> 8)\n\tb[2] = byte(v >> 16)\n\tb[3] = byte(v >> 24)\n\treturn b[4:]\n}\n\n// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b.\nfunc pbit64(b []byte, v uint64) []byte {\n\tb[0] = byte(v)\n\tb[1] = byte(v >> 8)\n\tb[2] = byte(v >> 16)\n\tb[3] = byte(v >> 24)\n\tb[4] = byte(v >> 32)\n\tb[5] = byte(v >> 40)\n\tb[6] = byte(v >> 48)\n\tb[7] = byte(v >> 56)\n\treturn b[8:]\n}\n\n// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and\n// returning the remaining slice of b..\nfunc pstring(b []byte, s string) []byte {\n\tb = pbit16(b, uint16(len(s)))\n\tn := copy(b, s)\n\treturn b[n:]\n}\n\n// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b.\nfunc gbit8(b []byte) (uint8, []byte) {\n\treturn uint8(b[0]), b[1:]\n}\n\n// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.\nfunc gbit16(b []byte) (uint16, []byte) {\n\treturn uint16(b[0]) | uint16(b[1])<<8, b[2:]\n}\n\n// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b.\nfunc gbit32(b []byte) (uint32, []byte) {\n\treturn uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:]\n}\n\n// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b.\nfunc gbit64(b []byte) (uint64, []byte) {\n\tlo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24\n\thi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24\n\treturn uint64(lo) | uint64(hi)<<32, b[8:]\n}\n\n// gstring reads a string from b, prefixed with a 16-bit length in little-endian order.\n// It returns the string with the remaining slice of b and a boolean. If the length is\n// greater than the number of bytes in b, the boolean will be false.\nfunc gstring(b []byte) (string, []byte, bool) {\n\tn, b := gbit16(b)\n\tif int(n) > len(b) {\n\t\treturn \"\", b, false\n\t}\n\treturn string(b[:n]), b[n:], true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/env_plan9.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Plan 9 environment variables.\n\npackage plan9\n\nimport (\n\t\"syscall\"\n)\n\nfunc Getenv(key string) (value string, found bool) {\n\treturn syscall.Getenv(key)\n}\n\nfunc Setenv(key, value string) error {\n\treturn syscall.Setenv(key, value)\n}\n\nfunc Clearenv() {\n\tsyscall.Clearenv()\n}\n\nfunc Environ() []string {\n\treturn syscall.Environ()\n}\n\nfunc Unsetenv(key string) error {\n\treturn syscall.Unsetenv(key)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/errors_plan9.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage plan9\n\nimport \"syscall\"\n\n// Constants\nconst (\n\t// Invented values to support what package os expects.\n\tO_CREAT    = 0x02000\n\tO_APPEND   = 0x00400\n\tO_NOCTTY   = 0x00000\n\tO_NONBLOCK = 0x00000\n\tO_SYNC     = 0x00000\n\tO_ASYNC    = 0x00000\n\n\tS_IFMT   = 0x1f000\n\tS_IFIFO  = 0x1000\n\tS_IFCHR  = 0x2000\n\tS_IFDIR  = 0x4000\n\tS_IFBLK  = 0x6000\n\tS_IFREG  = 0x8000\n\tS_IFLNK  = 0xa000\n\tS_IFSOCK = 0xc000\n)\n\n// Errors\nvar (\n\tEINVAL       = syscall.NewError(\"bad arg in system call\")\n\tENOTDIR      = syscall.NewError(\"not a directory\")\n\tEISDIR       = syscall.NewError(\"file is a directory\")\n\tENOENT       = syscall.NewError(\"file does not exist\")\n\tEEXIST       = syscall.NewError(\"file already exists\")\n\tEMFILE       = syscall.NewError(\"no free file descriptors\")\n\tEIO          = syscall.NewError(\"i/o error\")\n\tENAMETOOLONG = syscall.NewError(\"file name too long\")\n\tEINTR        = syscall.NewError(\"interrupted\")\n\tEPERM        = syscall.NewError(\"permission denied\")\n\tEBUSY        = syscall.NewError(\"no free devices\")\n\tETIMEDOUT    = syscall.NewError(\"connection timed out\")\n\tEPLAN9       = syscall.NewError(\"not supported by plan 9\")\n\n\t// The following errors do not correspond to any\n\t// Plan 9 system messages. Invented to support\n\t// what package os and others expect.\n\tEACCES       = syscall.NewError(\"access permission denied\")\n\tEAFNOSUPPORT = syscall.NewError(\"address family not supported by protocol\")\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/mkall.sh",
    "content": "#!/usr/bin/env bash\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# The plan9 package provides access to the raw system call\n# interface of the underlying operating system.  Porting Go to\n# a new architecture/operating system combination requires\n# some manual effort, though there are tools that automate\n# much of the process.  The auto-generated files have names\n# beginning with z.\n#\n# This script runs or (given -n) prints suggested commands to generate z files\n# for the current system.  Running those commands is not automatic.\n# This script is documentation more than anything else.\n#\n# * asm_${GOOS}_${GOARCH}.s\n#\n# This hand-written assembly file implements system call dispatch.\n# There are three entry points:\n#\n# \tfunc Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);\n# \tfunc Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);\n# \tfunc RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);\n#\n# The first and second are the standard ones; they differ only in\n# how many arguments can be passed to the kernel.\n# The third is for low-level use by the ForkExec wrapper;\n# unlike the first two, it does not call into the scheduler to\n# let it know that a system call is running.\n#\n# * syscall_${GOOS}.go\n#\n# This hand-written Go file implements system calls that need\n# special handling and lists \"//sys\" comments giving prototypes\n# for ones that can be auto-generated.  Mksyscall reads those\n# comments to generate the stubs.\n#\n# * syscall_${GOOS}_${GOARCH}.go\n#\n# Same as syscall_${GOOS}.go except that it contains code specific\n# to ${GOOS} on one particular architecture.\n#\n# * types_${GOOS}.c\n#\n# This hand-written C file includes standard C headers and then\n# creates typedef or enum names beginning with a dollar sign\n# (use of $ in variable names is a gcc extension).  The hardest\n# part about preparing this file is figuring out which headers to\n# include and which symbols need to be #defined to get the\n# actual data structures that pass through to the kernel system calls.\n# Some C libraries present alternate versions for binary compatibility\n# and translate them on the way in and out of system calls, but\n# there is almost always a #define that can get the real ones.\n# See types_darwin.c and types_linux.c for examples.\n#\n# * zerror_${GOOS}_${GOARCH}.go\n#\n# This machine-generated file defines the system's error numbers,\n# error strings, and signal numbers.  The generator is \"mkerrors.sh\".\n# Usually no arguments are needed, but mkerrors.sh will pass its\n# arguments on to godefs.\n#\n# * zsyscall_${GOOS}_${GOARCH}.go\n#\n# Generated by mksyscall.pl; see syscall_${GOOS}.go above.\n#\n# * zsysnum_${GOOS}_${GOARCH}.go\n#\n# Generated by mksysnum_${GOOS}.\n#\n# * ztypes_${GOOS}_${GOARCH}.go\n#\n# Generated by godefs; see types_${GOOS}.c above.\n\nGOOSARCH=\"${GOOS}_${GOARCH}\"\n\n# defaults\nmksyscall=\"go run mksyscall.go\"\nmkerrors=\"./mkerrors.sh\"\nzerrors=\"zerrors_$GOOSARCH.go\"\nmksysctl=\"\"\nzsysctl=\"zsysctl_$GOOSARCH.go\"\nmksysnum=\nmktypes=\nrun=\"sh\"\n\ncase \"$1\" in\n-syscalls)\n\tfor i in zsyscall*go\n\tdo\n\t\tsed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i\n\t\trm _$i\n\tdone\n\texit 0\n\t;;\n-n)\n\trun=\"cat\"\n\tshift\nesac\n\ncase \"$#\" in\n0)\n\t;;\n*)\n\techo 'usage: mkall.sh [-n]' 1>&2\n\texit 2\nesac\n\ncase \"$GOOSARCH\" in\n_* | *_ | _)\n\techo 'undefined $GOOS_$GOARCH:' \"$GOOSARCH\" 1>&2\n\texit 1\n\t;;\nplan9_386)\n\tmkerrors=\n\tmksyscall=\"go run mksyscall.go -l32 -plan9 -tags plan9,386\"\n\tmksysnum=\"./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h\"\n\tmktypes=\"XXX\"\n\t;;\nplan9_amd64)\n\tmkerrors=\n\tmksyscall=\"go run mksyscall.go -l32 -plan9 -tags plan9,amd64\"\n\tmksysnum=\"./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h\"\n\tmktypes=\"XXX\"\n\t;;\nplan9_arm)\n\tmkerrors=\n\tmksyscall=\"go run mksyscall.go -l32 -plan9 -tags plan9,arm\"\n\tmksysnum=\"./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h\"\n\tmktypes=\"XXX\"\n\t;;\n*)\n\techo 'unrecognized $GOOS_$GOARCH: ' \"$GOOSARCH\" 1>&2\n\texit 1\n\t;;\nesac\n\n(\n\tif [ -n \"$mkerrors\" ]; then echo \"$mkerrors |gofmt >$zerrors\"; fi\n\tcase \"$GOOS\" in\n\tplan9)\n\t\tsyscall_goos=\"syscall_$GOOS.go\"\n\t\tif [ -n \"$mksyscall\" ]; then echo \"$mksyscall $syscall_goos |gofmt >zsyscall_$GOOSARCH.go\"; fi\n\t\t;;\n\tesac\n\tif [ -n \"$mksysctl\" ]; then echo \"$mksysctl |gofmt >$zsysctl\"; fi\n\tif [ -n \"$mksysnum\" ]; then echo \"$mksysnum |gofmt >zsysnum_$GOOSARCH.go\"; fi\n\tif [ -n \"$mktypes\" ]; then echo \"$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go\"; fi\n) | $run\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/mkerrors.sh",
    "content": "#!/usr/bin/env bash\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# Generate Go code listing errors and other #defined constant\n# values (ENAMETOOLONG etc.), by asking the preprocessor\n# about the definitions.\n\nunset LANG\nexport LC_ALL=C\nexport LC_CTYPE=C\n\nCC=${CC:-gcc}\n\nuname=$(uname)\n\nincludes='\n#include <sys/types.h>\n#include <sys/file.h>\n#include <fcntl.h>\n#include <dirent.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <netinet/ip6.h>\n#include <netinet/tcp.h>\n#include <errno.h>\n#include <sys/signal.h>\n#include <signal.h>\n#include <sys/resource.h>\n'\n\nccflags=\"$@\"\n\n# Write go tool cgo -godefs input.\n(\n\techo package plan9\n\techo\n\techo '/*'\n\tindirect=\"includes_$(uname)\"\n\techo \"${!indirect} $includes\"\n\techo '*/'\n\techo 'import \"C\"'\n\techo\n\techo 'const ('\n\n\t# The gcc command line prints all the #defines\n\t# it encounters while processing the input\n\techo \"${!indirect} $includes\" | $CC -x c - -E -dM $ccflags |\n\tawk '\n\t\t$1 != \"#define\" || $2 ~ /\\(/ || $3 == \"\" {next}\n\n\t\t$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next}  # 386 registers\n\t\t$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}\n\t\t$2 ~ /^(SCM_SRCRT)$/ {next}\n\t\t$2 ~ /^(MAP_FAILED)$/ {next}\n\n\t\t$2 !~ /^ETH_/ &&\n\t\t$2 !~ /^EPROC_/ &&\n\t\t$2 !~ /^EQUIV_/ &&\n\t\t$2 !~ /^EXPR_/ &&\n\t\t$2 ~ /^E[A-Z0-9_]+$/ ||\n\t\t$2 ~ /^B[0-9_]+$/ ||\n\t\t$2 ~ /^V[A-Z0-9]+$/ ||\n\t\t$2 ~ /^CS[A-Z0-9]/ ||\n\t\t$2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ ||\n\t\t$2 ~ /^IGN/ ||\n\t\t$2 ~ /^IX(ON|ANY|OFF)$/ ||\n\t\t$2 ~ /^IN(LCR|PCK)$/ ||\n\t\t$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||\n\t\t$2 ~ /^C(LOCAL|READ)$/ ||\n\t\t$2 == \"BRKINT\" ||\n\t\t$2 == \"HUPCL\" ||\n\t\t$2 == \"PENDIN\" ||\n\t\t$2 == \"TOSTOP\" ||\n\t\t$2 ~ /^PAR/ ||\n\t\t$2 ~ /^SIG[^_]/ ||\n\t\t$2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ ||\n\t\t$2 ~ /^IN_/ ||\n\t\t$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||\n\t\t$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||\n\t\t$2 == \"ICMPV6_FILTER\" ||\n\t\t$2 == \"SOMAXCONN\" ||\n\t\t$2 == \"NAME_MAX\" ||\n\t\t$2 == \"IFNAMSIZ\" ||\n\t\t$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||\n\t\t$2 ~ /^SYSCTL_VERS/ ||\n\t\t$2 ~ /^(MS|MNT)_/ ||\n\t\t$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||\n\t\t$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||\n\t\t$2 ~ /^LINUX_REBOOT_CMD_/ ||\n\t\t$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||\n\t\t$2 !~ \"NLA_TYPE_MASK\" &&\n\t\t$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||\n\t\t$2 ~ /^SIOC/ ||\n\t\t$2 ~ /^TIOC/ ||\n\t\t$2 !~ \"RTF_BITS\" &&\n\t\t$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||\n\t\t$2 ~ /^BIOC/ ||\n\t\t$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||\n\t\t$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||\n\t\t$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||\n\t\t$2 ~ /^CLONE_[A-Z_]+/ ||\n\t\t$2 !~ /^(BPF_TIMEVAL)$/ &&\n\t\t$2 ~ /^(BPF|DLT)_/ ||\n\t\t$2 !~ \"WMESGLEN\" &&\n\t\t$2 ~ /^W[A-Z0-9]+$/ {printf(\"\\t%s = C.%s\\n\", $2, $2)}\n\t\t$2 ~ /^__WCOREFLAG$/ {next}\n\t\t$2 ~ /^__W[A-Z0-9]+$/ {printf(\"\\t%s = C.%s\\n\", substr($2,3), $2)}\n\n\t\t{next}\n\t' | sort\n\n\techo ')'\n) >_const.go\n\n# Pull out the error names for later.\nerrors=$(\n\techo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |\n\tsort\n)\n\n# Pull out the signal names for later.\nsignals=$(\n\techo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |\n\tgrep -v 'SIGSTKSIZE\\|SIGSTKSZ\\|SIGRT' |\n\tsort\n)\n\n# Again, writing regexps to a file.\necho '#include <errno.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^E[A-Z0-9_]+$/ { print \"^\\t\" $2 \"[ \\t]*=\" }' |\n\tsort >_error.grep\necho '#include <signal.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^SIG[A-Z0-9]+$/ { print \"^\\t\" $2 \"[ \\t]*=\" }' |\n\tgrep -v 'SIGSTKSIZE\\|SIGSTKSZ\\|SIGRT' |\n\tsort >_signal.grep\n\necho '// mkerrors.sh' \"$@\"\necho '// Code generated by the command above; DO NOT EDIT.'\necho\ngo tool cgo -godefs -- \"$@\" _const.go >_error.out\ncat _error.out | grep -vf _error.grep | grep -vf _signal.grep\necho\necho '// Errors'\necho 'const ('\ncat _error.out | grep -f _error.grep | sed 's/=\\(.*\\)/= Errno(\\1)/'\necho ')'\n\necho\necho '// Signals'\necho 'const ('\ncat _error.out | grep -f _signal.grep | sed 's/=\\(.*\\)/= Signal(\\1)/'\necho ')'\n\n# Run C program to print error and syscall strings.\n(\n\techo -E \"\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <ctype.h>\n#include <string.h>\n#include <signal.h>\n\n#define nelem(x) (sizeof(x)/sizeof((x)[0]))\n\nenum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below\n\nint errors[] = {\n\"\n\tfor i in $errors\n\tdo\n\t\techo -E '\t'$i,\n\tdone\n\n\techo -E \"\n};\n\nint signals[] = {\n\"\n\tfor i in $signals\n\tdo\n\t\techo -E '\t'$i,\n\tdone\n\n\t# Use -E because on some systems bash builtin interprets \\n itself.\n\techo -E '\n};\n\nstatic int\nintcmp(const void *a, const void *b)\n{\n\treturn *(int*)a - *(int*)b;\n}\n\nint\nmain(void)\n{\n\tint i, j, e;\n\tchar buf[1024], *p;\n\n\tprintf(\"\\n\\n// Error table\\n\");\n\tprintf(\"var errors = [...]string {\\n\");\n\tqsort(errors, nelem(errors), sizeof errors[0], intcmp);\n\tfor(i=0; i<nelem(errors); i++) {\n\t\te = errors[i];\n\t\tif(i > 0 && errors[i-1] == e)\n\t\t\tcontinue;\n\t\tstrcpy(buf, strerror(e));\n\t\t// lowercase first letter: Bad -> bad, but STREAM -> STREAM.\n\t\tif(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)\n\t\t\tbuf[0] += a - A;\n\t\tprintf(\"\\t%d: \\\"%s\\\",\\n\", e, buf);\n\t}\n\tprintf(\"}\\n\\n\");\n\t\n\tprintf(\"\\n\\n// Signal table\\n\");\n\tprintf(\"var signals = [...]string {\\n\");\n\tqsort(signals, nelem(signals), sizeof signals[0], intcmp);\n\tfor(i=0; i<nelem(signals); i++) {\n\t\te = signals[i];\n\t\tif(i > 0 && signals[i-1] == e)\n\t\t\tcontinue;\n\t\tstrcpy(buf, strsignal(e));\n\t\t// lowercase first letter: Bad -> bad, but STREAM -> STREAM.\n\t\tif(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)\n\t\t\tbuf[0] += a - A;\n\t\t// cut trailing : number.\n\t\tp = strrchr(buf, \":\"[0]);\n\t\tif(p)\n\t\t\t*p = '\\0';\n\t\tprintf(\"\\t%d: \\\"%s\\\",\\n\", e, buf);\n\t}\n\tprintf(\"}\\n\\n\");\n\n\treturn 0;\n}\n\n'\n) >_errors.c\n\n$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh",
    "content": "#!/bin/sh\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\nCOMMAND=\"mksysnum_plan9.sh $@\"\n\ncat <<EOF\n// $COMMAND\n// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT\n\npackage plan9\n\nconst(\nEOF\n\nSP='[ \t]' # space or tab\nsed \"s/^#define${SP}\\\\([A-Z0-9_][A-Z0-9_]*\\\\)${SP}${SP}*\\\\([0-9][0-9]*\\\\)/SYS_\\\\1=\\\\2/g\" \\\n\t< $1 | grep -v SYS__\n\ncat <<EOF\n)\nEOF\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/pwd_plan9.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage plan9\n\nimport \"syscall\"\n\nfunc fixwd() {\n\tsyscall.Fixwd()\n}\n\nfunc Getwd() (wd string, err error) {\n\treturn syscall.Getwd()\n}\n\nfunc Chdir(path string) error {\n\treturn syscall.Chdir(path)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/race.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build plan9 && race\n\npackage plan9\n\nimport (\n\t\"runtime\"\n\t\"unsafe\"\n)\n\nconst raceenabled = true\n\nfunc raceAcquire(addr unsafe.Pointer) {\n\truntime.RaceAcquire(addr)\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n\truntime.RaceReleaseMerge(addr)\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n\truntime.RaceReadRange(addr, len)\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n\truntime.RaceWriteRange(addr, len)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/race0.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build plan9 && !race\n\npackage plan9\n\nimport (\n\t\"unsafe\"\n)\n\nconst raceenabled = false\n\nfunc raceAcquire(addr unsafe.Pointer) {\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/str.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build plan9\n\npackage plan9\n\nfunc itoa(val int) string { // do it here rather than with fmt to avoid dependency\n\tif val < 0 {\n\t\treturn \"-\" + itoa(-val)\n\t}\n\tvar buf [32]byte // big enough for int64\n\ti := len(buf) - 1\n\tfor val >= 10 {\n\t\tbuf[i] = byte(val%10 + '0')\n\t\ti--\n\t\tval /= 10\n\t}\n\tbuf[i] = byte(val + '0')\n\treturn string(buf[i:])\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/syscall.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build plan9\n\n// Package plan9 contains an interface to the low-level operating system\n// primitives. OS details vary depending on the underlying system, and\n// by default, godoc will display the OS-specific documentation for the current\n// system. If you want godoc to display documentation for another\n// system, set $GOOS and $GOARCH to the desired system. For example, if\n// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS\n// to freebsd and $GOARCH to arm.\n//\n// The primary use of this package is inside other packages that provide a more\n// portable interface to the system, such as \"os\", \"time\" and \"net\".  Use\n// those packages rather than this one if you can.\n//\n// For details of the functions and data types in this package consult\n// the manuals for the appropriate operating system.\n//\n// These calls return err == nil to indicate success; otherwise\n// err represents an operating system error describing the failure and\n// holds a value of type syscall.ErrorString.\npackage plan9 // import \"golang.org/x/sys/plan9\"\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n\t\"unsafe\"\n)\n\n// ByteSliceFromString returns a NUL-terminated slice of bytes\n// containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, EINVAL).\nfunc ByteSliceFromString(s string) ([]byte, error) {\n\tif strings.IndexByte(s, 0) != -1 {\n\t\treturn nil, EINVAL\n\t}\n\ta := make([]byte, len(s)+1)\n\tcopy(a, s)\n\treturn a, nil\n}\n\n// BytePtrFromString returns a pointer to a NUL-terminated array of\n// bytes containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, EINVAL).\nfunc BytePtrFromString(s string) (*byte, error) {\n\ta, err := ByteSliceFromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &a[0], nil\n}\n\n// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any\n// bytes after the NUL removed.\nfunc ByteSliceToString(s []byte) string {\n\tif i := bytes.IndexByte(s, 0); i != -1 {\n\t\ts = s[:i]\n\t}\n\treturn string(s)\n}\n\n// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.\n// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated\n// at a zero byte; if the zero byte is not present, the program may crash.\nfunc BytePtrToString(p *byte) string {\n\tif p == nil {\n\t\treturn \"\"\n\t}\n\tif *p == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Find NUL terminator.\n\tn := 0\n\tfor ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {\n\t\tptr = unsafe.Pointer(uintptr(ptr) + 1)\n\t}\n\n\treturn string(unsafe.Slice(p, n))\n}\n\n// Single-word zero for use when we need a valid pointer to 0 bytes.\n// See mksyscall.pl.\nvar _zero uintptr\n\nfunc (ts *Timespec) Unix() (sec int64, nsec int64) {\n\treturn int64(ts.Sec), int64(ts.Nsec)\n}\n\nfunc (tv *Timeval) Unix() (sec int64, nsec int64) {\n\treturn int64(tv.Sec), int64(tv.Usec) * 1000\n}\n\nfunc (ts *Timespec) Nano() int64 {\n\treturn int64(ts.Sec)*1e9 + int64(ts.Nsec)\n}\n\nfunc (tv *Timeval) Nano() int64 {\n\treturn int64(tv.Sec)*1e9 + int64(tv.Usec)*1000\n}\n\n// use is a no-op, but the compiler cannot see that it is.\n// Calling use(p) ensures that p is kept live until that point.\n//\n//go:noescape\nfunc use(p unsafe.Pointer)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/syscall_plan9.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Plan 9 system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and\n// wrap it in our own nicer implementation.\n\npackage plan9\n\nimport (\n\t\"bytes\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// A Note is a string describing a process note.\n// It implements the os.Signal interface.\ntype Note = syscall.Note\n\nvar (\n\tStdin  = 0\n\tStdout = 1\n\tStderr = 2\n)\n\n// For testing: clients can set this flag to force\n// creation of IPv6 sockets to return EAFNOSUPPORT.\nvar SocketDisableIPv6 bool\n\nfunc Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString)\nfunc Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString)\nfunc RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)\nfunc RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)\n\nfunc atoi(b []byte) (n uint) {\n\tn = 0\n\tfor i := 0; i < len(b); i++ {\n\t\tn = n*10 + uint(b[i]-'0')\n\t}\n\treturn\n}\n\nfunc cstring(s []byte) string {\n\ti := bytes.IndexByte(s, 0)\n\tif i == -1 {\n\t\ti = len(s)\n\t}\n\treturn string(s[:i])\n}\n\nfunc errstr() string {\n\tvar buf [ERRMAX]byte\n\n\tRawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0)\n\n\tbuf[len(buf)-1] = 0\n\treturn cstring(buf[:])\n}\n\n// Implemented in assembly to import from runtime.\nfunc exit(code int)\n\nfunc Exit(code int) { exit(code) }\n\nfunc readnum(path string) (uint, error) {\n\tvar b [12]byte\n\n\tfd, e := Open(path, O_RDONLY)\n\tif e != nil {\n\t\treturn 0, e\n\t}\n\tdefer Close(fd)\n\n\tn, e := Pread(fd, b[:], 0)\n\n\tif e != nil {\n\t\treturn 0, e\n\t}\n\n\tm := 0\n\tfor ; m < n && b[m] == ' '; m++ {\n\t}\n\n\treturn atoi(b[m : n-1]), nil\n}\n\nfunc Getpid() (pid int) {\n\tn, _ := readnum(\"#c/pid\")\n\treturn int(n)\n}\n\nfunc Getppid() (ppid int) {\n\tn, _ := readnum(\"#c/ppid\")\n\treturn int(n)\n}\n\nfunc Read(fd int, p []byte) (n int, err error) {\n\treturn Pread(fd, p, -1)\n}\n\nfunc Write(fd int, p []byte) (n int, err error) {\n\treturn Pwrite(fd, p, -1)\n}\n\nvar ioSync int64\n\n//sys\tfd2path(fd int, buf []byte) (err error)\n\nfunc Fd2path(fd int) (path string, err error) {\n\tvar buf [512]byte\n\n\te := fd2path(fd, buf[:])\n\tif e != nil {\n\t\treturn \"\", e\n\t}\n\treturn cstring(buf[:]), nil\n}\n\n//sys\tpipe(p *[2]int32) (err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn syscall.ErrorString(\"bad arg in system call\")\n\t}\n\tvar pp [2]int32\n\terr = pipe(&pp)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn\n}\n\n// Underlying system call writes to newoffset via pointer.\n// Implemented in assembly to avoid allocation.\nfunc seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tnewoffset, e := seek(0, fd, offset, whence)\n\n\tif newoffset == -1 {\n\t\terr = syscall.ErrorString(e)\n\t}\n\treturn\n}\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tfd, err := Create(path, O_RDONLY, DMDIR|mode)\n\n\tif fd != -1 {\n\t\tClose(fd)\n\t}\n\n\treturn\n}\n\ntype Waitmsg struct {\n\tPid  int\n\tTime [3]uint32\n\tMsg  string\n}\n\nfunc (w Waitmsg) Exited() bool   { return true }\nfunc (w Waitmsg) Signaled() bool { return false }\n\nfunc (w Waitmsg) ExitStatus() int {\n\tif len(w.Msg) == 0 {\n\t\t// a normal exit returns no message\n\t\treturn 0\n\t}\n\treturn 1\n}\n\n//sys\tawait(s []byte) (n int, err error)\n\nfunc Await(w *Waitmsg) (err error) {\n\tvar buf [512]byte\n\tvar f [5][]byte\n\n\tn, err := await(buf[:])\n\n\tif err != nil || w == nil {\n\t\treturn\n\t}\n\n\tnf := 0\n\tp := 0\n\tfor i := 0; i < n && nf < len(f)-1; i++ {\n\t\tif buf[i] == ' ' {\n\t\t\tf[nf] = buf[p:i]\n\t\t\tp = i + 1\n\t\t\tnf++\n\t\t}\n\t}\n\tf[nf] = buf[p:]\n\tnf++\n\n\tif nf != len(f) {\n\t\treturn syscall.ErrorString(\"invalid wait message\")\n\t}\n\tw.Pid = int(atoi(f[0]))\n\tw.Time[0] = uint32(atoi(f[1]))\n\tw.Time[1] = uint32(atoi(f[2]))\n\tw.Time[2] = uint32(atoi(f[3]))\n\tw.Msg = cstring(f[4])\n\tif w.Msg == \"''\" {\n\t\t// await() returns '' for no error\n\t\tw.Msg = \"\"\n\t}\n\treturn\n}\n\nfunc Unmount(name, old string) (err error) {\n\tfixwd()\n\toldp, err := BytePtrFromString(old)\n\tif err != nil {\n\t\treturn err\n\t}\n\toldptr := uintptr(unsafe.Pointer(oldp))\n\n\tvar r0 uintptr\n\tvar e syscall.ErrorString\n\n\t// bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted.\n\tif name == \"\" {\n\t\tr0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0)\n\t} else {\n\t\tnamep, err := BytePtrFromString(name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tr0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0)\n\t}\n\n\tif int32(r0) == -1 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Fchdir(fd int) (err error) {\n\tpath, err := Fd2path(fd)\n\n\tif err != nil {\n\t\treturn\n\t}\n\n\treturn Chdir(path)\n}\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\nfunc NsecToTimeval(nsec int64) (tv Timeval) {\n\tnsec += 999 // round up to microsecond\n\ttv.Usec = int32(nsec % 1e9 / 1e3)\n\ttv.Sec = int32(nsec / 1e9)\n\treturn\n}\n\nfunc nsec() int64 {\n\tvar scratch int64\n\n\tr0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0)\n\t// TODO(aram): remove hack after I fix _nsec in the pc64 kernel.\n\tif r0 == 0 {\n\t\treturn scratch\n\t}\n\treturn int64(r0)\n}\n\nfunc Gettimeofday(tv *Timeval) error {\n\tnsec := nsec()\n\t*tv = NsecToTimeval(nsec)\n\treturn nil\n}\n\nfunc Getpagesize() int { return 0x1000 }\n\nfunc Getegid() (egid int) { return -1 }\nfunc Geteuid() (euid int) { return -1 }\nfunc Getgid() (gid int)   { return -1 }\nfunc Getuid() (uid int)   { return -1 }\n\nfunc Getgroups() (gids []int, err error) {\n\treturn make([]int, 0), nil\n}\n\n//sys\topen(path string, mode int) (fd int, err error)\n\nfunc Open(path string, mode int) (fd int, err error) {\n\tfixwd()\n\treturn open(path, mode)\n}\n\n//sys\tcreate(path string, mode int, perm uint32) (fd int, err error)\n\nfunc Create(path string, mode int, perm uint32) (fd int, err error) {\n\tfixwd()\n\treturn create(path, mode, perm)\n}\n\n//sys\tremove(path string) (err error)\n\nfunc Remove(path string) error {\n\tfixwd()\n\treturn remove(path)\n}\n\n//sys\tstat(path string, edir []byte) (n int, err error)\n\nfunc Stat(path string, edir []byte) (n int, err error) {\n\tfixwd()\n\treturn stat(path, edir)\n}\n\n//sys\tbind(name string, old string, flag int) (err error)\n\nfunc Bind(name string, old string, flag int) (err error) {\n\tfixwd()\n\treturn bind(name, old, flag)\n}\n\n//sys\tmount(fd int, afd int, old string, flag int, aname string) (err error)\n\nfunc Mount(fd int, afd int, old string, flag int, aname string) (err error) {\n\tfixwd()\n\treturn mount(fd, afd, old, flag, aname)\n}\n\n//sys\twstat(path string, edir []byte) (err error)\n\nfunc Wstat(path string, edir []byte) (err error) {\n\tfixwd()\n\treturn wstat(path, edir)\n}\n\n//sys\tchdir(path string) (err error)\n//sys\tDup(oldfd int, newfd int) (fd int, err error)\n//sys\tPread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tPwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tClose(fd int) (err error)\n//sys\tFstat(fd int, edir []byte) (n int, err error)\n//sys\tFwstat(fd int, edir []byte) (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go",
    "content": "// go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build plan9 && 386\n\npackage plan9\n\nimport \"unsafe\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fd2path(fd int, buf []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]int32) (err error) {\n\tr0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc await(s []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(s) > 0 {\n\t\t_p0 = unsafe.Pointer(&s[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc open(path string, mode int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc create(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc remove(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, edir []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(name string, old string, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mount(fd int, afd int, old string, flag int, aname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(aname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wstat(path string, edir []byte) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int, newfd int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\tr0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, edir []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fwstat(fd int, edir []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go",
    "content": "// go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build plan9 && amd64\n\npackage plan9\n\nimport \"unsafe\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fd2path(fd int, buf []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]int32) (err error) {\n\tr0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc await(s []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(s) > 0 {\n\t\t_p0 = unsafe.Pointer(&s[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc open(path string, mode int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc create(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc remove(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, edir []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(name string, old string, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mount(fd int, afd int, old string, flag int, aname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(aname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wstat(path string, edir []byte) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int, newfd int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\tr0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, edir []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fwstat(fd int, edir []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go",
    "content": "// go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build plan9 && arm\n\npackage plan9\n\nimport \"unsafe\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fd2path(fd int, buf []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]int32) (err error) {\n\tr0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc await(s []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(s) > 0 {\n\t\t_p0 = unsafe.Pointer(&s[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc open(path string, mode int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc create(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc remove(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, edir []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(name string, old string, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mount(fd int, afd int, old string, flag int, aname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(old)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(aname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wstat(path string, edir []byte) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p1 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int, newfd int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)\n\tfd = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\tr0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, edir []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tn = int(r0)\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fwstat(fd int, edir []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(edir) > 0 {\n\t\t_p0 = unsafe.Pointer(&edir[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))\n\tif int32(r0) == -1 {\n\t\terr = e1\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/plan9/zsysnum_plan9.go",
    "content": "// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h\n// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT\n\npackage plan9\n\nconst (\n\tSYS_SYSR1       = 0\n\tSYS_BIND        = 2\n\tSYS_CHDIR       = 3\n\tSYS_CLOSE       = 4\n\tSYS_DUP         = 5\n\tSYS_ALARM       = 6\n\tSYS_EXEC        = 7\n\tSYS_EXITS       = 8\n\tSYS_FAUTH       = 10\n\tSYS_SEGBRK      = 12\n\tSYS_OPEN        = 14\n\tSYS_OSEEK       = 16\n\tSYS_SLEEP       = 17\n\tSYS_RFORK       = 19\n\tSYS_PIPE        = 21\n\tSYS_CREATE      = 22\n\tSYS_FD2PATH     = 23\n\tSYS_BRK_        = 24\n\tSYS_REMOVE      = 25\n\tSYS_NOTIFY      = 28\n\tSYS_NOTED       = 29\n\tSYS_SEGATTACH   = 30\n\tSYS_SEGDETACH   = 31\n\tSYS_SEGFREE     = 32\n\tSYS_SEGFLUSH    = 33\n\tSYS_RENDEZVOUS  = 34\n\tSYS_UNMOUNT     = 35\n\tSYS_SEMACQUIRE  = 37\n\tSYS_SEMRELEASE  = 38\n\tSYS_SEEK        = 39\n\tSYS_FVERSION    = 40\n\tSYS_ERRSTR      = 41\n\tSYS_STAT        = 42\n\tSYS_FSTAT       = 43\n\tSYS_WSTAT       = 44\n\tSYS_FWSTAT      = 45\n\tSYS_MOUNT       = 46\n\tSYS_AWAIT       = 47\n\tSYS_PREAD       = 50\n\tSYS_PWRITE      = 51\n\tSYS_TSEMACQUIRE = 52\n\tSYS_NSEC        = 53\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/.gitignore",
    "content": "_obj/\nunix.test\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/README.md",
    "content": "# Building `sys/unix`\n\nThe sys/unix package provides access to the raw system call interface of the\nunderlying operating system. See: https://godoc.org/golang.org/x/sys/unix\n\nPorting Go to a new architecture/OS combination or adding syscalls, types, or\nconstants to an existing architecture/OS pair requires some manual effort;\nhowever, there are tools that automate much of the process.\n\n## Build Systems\n\nThere are currently two ways we generate the necessary files. We are currently\nmigrating the build system to use containers so the builds are reproducible.\nThis is being done on an OS-by-OS basis. Please update this documentation as\ncomponents of the build system change.\n\n### Old Build System (currently for `GOOS != \"linux\"`)\n\nThe old build system generates the Go files based on the C header files\npresent on your system. This means that files\nfor a given GOOS/GOARCH pair must be generated on a system with that OS and\narchitecture. This also means that the generated code can differ from system\nto system, based on differences in the header files.\n\nTo avoid this, if you are using the old build system, only generate the Go\nfiles on an installation with unmodified header files. It is also important to\nkeep track of which version of the OS the files were generated from (ex.\nDarwin 14 vs Darwin 15). This makes it easier to track the progress of changes\nand have each OS upgrade correspond to a single change.\n\nTo build the files for your current OS and architecture, make sure GOOS and\nGOARCH are set correctly and run `mkall.sh`. This will generate the files for\nyour specific system. Running `mkall.sh -n` shows the commands that will be run.\n\nRequirements: bash, go\n\n### New Build System (currently for `GOOS == \"linux\"`)\n\nThe new build system uses a Docker container to generate the go files directly\nfrom source checkouts of the kernel and various system libraries. This means\nthat on any platform that supports Docker, all the files using the new build\nsystem can be generated at once, and generated files will not change based on\nwhat the person running the scripts has installed on their computer.\n\nThe OS specific files for the new build system are located in the `${GOOS}`\ndirectory, and the build is coordinated by the `${GOOS}/mkall.go` program. When\nthe kernel or system library updates, modify the Dockerfile at\n`${GOOS}/Dockerfile` to checkout the new release of the source.\n\nTo build all the files under the new build system, you must be on an amd64/Linux\nsystem and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will\nthen generate all of the files for all of the GOOS/GOARCH pairs in the new build\nsystem. Running `mkall.sh -n` shows the commands that will be run.\n\nRequirements: bash, go, docker\n\n## Component files\n\nThis section describes the various files used in the code generation process.\nIt also contains instructions on how to modify these files to add a new\narchitecture/OS or to add additional syscalls, types, or constants. Note that\nif you are using the new build system, the scripts/programs cannot be called normally.\nThey must be called from within the docker container.\n\n### asm files\n\nThe hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system\ncall dispatch. There are three entry points:\n```\n  func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)\n  func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)\n  func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)\n```\nThe first and second are the standard ones; they differ only in how many\narguments can be passed to the kernel. The third is for low-level use by the\nForkExec wrapper. Unlike the first two, it does not call into the scheduler to\nlet it know that a system call is running.\n\nWhen porting Go to a new architecture/OS, this file must be implemented for\neach GOOS/GOARCH pair.\n\n### mksysnum\n\nMksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go`\nfor the old system). This program takes in a list of header files containing the\nsyscall number declarations and parses them to produce the corresponding list of\nGo numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated\nconstants.\n\nAdding new syscall numbers is mostly done by running the build on a sufficiently\nnew installation of the target OS (or updating the source checkouts for the\nnew build system). However, depending on the OS, you may need to update the\nparsing in mksysnum.\n\n### mksyscall.go\n\nThe `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are\nhand-written Go files which implement system calls (for unix, the specific OS,\nor the specific OS/Architecture pair respectively) that need special handling\nand list `//sys` comments giving prototypes for ones that can be generated.\n\nThe mksyscall.go program takes the `//sys` and `//sysnb` comments and converts\nthem into syscalls. This requires the name of the prototype in the comment to\nmatch a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function\nprototype can be exported (capitalized) or not.\n\nAdding a new syscall often just requires adding a new `//sys` function prototype\nwith the desired arguments and a capitalized name so it is exported. However, if\nyou want the interface to the syscall to be different, often one will make an\nunexported `//sys` prototype, and then write a custom wrapper in\n`syscall_${GOOS}.go`.\n\n### types files\n\nFor each OS, there is a hand-written Go file at `${GOOS}/types.go` (or\n`types_${GOOS}.go` on the old system). This file includes standard C headers and\ncreates Go type aliases to the corresponding C types. The file is then fed\nthrough godef to get the Go compatible definitions. Finally, the generated code\nis fed though mkpost.go to format the code correctly and remove any hidden or\nprivate identifiers. This cleaned-up code is written to\n`ztypes_${GOOS}_${GOARCH}.go`.\n\nThe hardest part about preparing this file is figuring out which headers to\ninclude and which symbols need to be `#define`d to get the actual data\nstructures that pass through to the kernel system calls. Some C libraries\npreset alternate versions for binary compatibility and translate them on the\nway in and out of system calls, but there is almost always a `#define` that can\nget the real ones.\nSee `types_darwin.go` and `linux/types.go` for examples.\n\nTo add a new type, add in the necessary include statement at the top of the\nfile (if it is not already there) and add in a type alias line. Note that if\nyour type is significantly different on different architectures, you may need\nsome `#if/#elif` macros in your include statements.\n\n### mkerrors.sh\n\nThis script is used to generate the system's various constants. This doesn't\njust include the error numbers and error strings, but also the signal numbers\nand a wide variety of miscellaneous constants. The constants come from the list\nof include files in the `includes_${uname}` variable. A regex then picks out\nthe desired `#define` statements, and generates the corresponding Go constants.\nThe error numbers and strings are generated from `#include <errno.h>`, and the\nsignal numbers and strings are generated from `#include <signal.h>`. All of\nthese constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program,\n`_errors.c`, which prints out all the constants.\n\nTo add a constant, add the header that includes it to the appropriate variable.\nThen, edit the regex (if necessary) to match the desired constant. Avoid making\nthe regex too broad to avoid matching unintended constants.\n\n### internal/mkmerge\n\nThis program is used to extract duplicate const, func, and type declarations\nfrom the generated architecture-specific files listed below, and merge these\ninto a common file for each OS.\n\nThe merge is performed in the following steps:\n1. Construct the set of common code that is identical in all architecture-specific files.\n2. Write this common code to the merged file.\n3. Remove the common code from all architecture-specific files.\n\n\n## Generated files\n\n### `zerrors_${GOOS}_${GOARCH}.go`\n\nA file containing all of the system's generated error numbers, error strings,\nsignal numbers, and constants. Generated by `mkerrors.sh` (see above).\n\n### `zsyscall_${GOOS}_${GOARCH}.go`\n\nA file containing all the generated syscalls for a specific GOOS and GOARCH.\nGenerated by `mksyscall.go` (see above).\n\n### `zsysnum_${GOOS}_${GOARCH}.go`\n\nA list of numeric constants for all the syscall number of the specific GOOS\nand GOARCH. Generated by mksysnum (see above).\n\n### `ztypes_${GOOS}_${GOARCH}.go`\n\nA file containing Go types for passing into (or returning from) syscalls.\nGenerated by godefs and the types file (see above).\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/affinity_linux.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// CPU affinity functions\n\npackage unix\n\nimport (\n\t\"math/bits\"\n\t\"unsafe\"\n)\n\nconst cpuSetSize = _CPU_SETSIZE / _NCPUBITS\n\n// CPUSet represents a CPU affinity mask.\ntype CPUSet [cpuSetSize]cpuMask\n\nfunc schedAffinity(trap uintptr, pid int, set *CPUSet) error {\n\t_, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set)))\n\tif e != 0 {\n\t\treturn errnoErr(e)\n\t}\n\treturn nil\n}\n\n// SchedGetaffinity gets the CPU affinity mask of the thread specified by pid.\n// If pid is 0 the calling thread is used.\nfunc SchedGetaffinity(pid int, set *CPUSet) error {\n\treturn schedAffinity(SYS_SCHED_GETAFFINITY, pid, set)\n}\n\n// SchedSetaffinity sets the CPU affinity mask of the thread specified by pid.\n// If pid is 0 the calling thread is used.\nfunc SchedSetaffinity(pid int, set *CPUSet) error {\n\treturn schedAffinity(SYS_SCHED_SETAFFINITY, pid, set)\n}\n\n// Zero clears the set s, so that it contains no CPUs.\nfunc (s *CPUSet) Zero() {\n\tclear(s[:])\n}\n\n// Fill adds all possible CPU bits to the set s. On Linux, [SchedSetaffinity]\n// will silently ignore any invalid CPU bits in [CPUSet] so this is an\n// efficient way of resetting the CPU affinity of a process.\nfunc (s *CPUSet) Fill() {\n\tfor i := range s {\n\t\ts[i] = ^cpuMask(0)\n\t}\n}\n\nfunc cpuBitsIndex(cpu int) int {\n\treturn cpu / _NCPUBITS\n}\n\nfunc cpuBitsMask(cpu int) cpuMask {\n\treturn cpuMask(1 << (uint(cpu) % _NCPUBITS))\n}\n\n// Set adds cpu to the set s.\nfunc (s *CPUSet) Set(cpu int) {\n\ti := cpuBitsIndex(cpu)\n\tif i < len(s) {\n\t\ts[i] |= cpuBitsMask(cpu)\n\t}\n}\n\n// Clear removes cpu from the set s.\nfunc (s *CPUSet) Clear(cpu int) {\n\ti := cpuBitsIndex(cpu)\n\tif i < len(s) {\n\t\ts[i] &^= cpuBitsMask(cpu)\n\t}\n}\n\n// IsSet reports whether cpu is in the set s.\nfunc (s *CPUSet) IsSet(cpu int) bool {\n\ti := cpuBitsIndex(cpu)\n\tif i < len(s) {\n\t\treturn s[i]&cpuBitsMask(cpu) != 0\n\t}\n\treturn false\n}\n\n// Count returns the number of CPUs in the set s.\nfunc (s *CPUSet) Count() int {\n\tc := 0\n\tfor _, b := range s {\n\t\tc += bits.OnesCount64(uint64(b))\n\t}\n\treturn c\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/aliases.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\nimport \"syscall\"\n\ntype Signal = syscall.Signal\ntype Errno = syscall.Errno\ntype SysProcAttr = syscall.SysProcAttr\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_aix_ppc64.s",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go\n//\n\nTEXT ·syscall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·syscall6(SB)\n\nTEXT ·rawSyscall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·rawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_386.s",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n// System call support for 386 BSD\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-52\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_amd64.s",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n// System call support for AMD64 BSD\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_arm.s",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n// System call support for ARM BSD\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-28\n\tB\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-40\n\tB\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-52\n\tB\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-28\n\tB\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-40\n\tB\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_arm64.s",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin || freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n// System call support for ARM64 BSD\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin || freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n//\n// System call support for ppc64, BSD\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin || freebsd || netbsd || openbsd) && gc\n\n#include \"textflag.h\"\n\n// System call support for RISCV64 BSD\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_386.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for 386, Linux\n//\n\n// See ../runtime/sys_linux_386.s for the reason why we always use int 0x80\n// instead of the glibc-specific \"CALL 0x10(GS)\".\n#define INVOKE_SYSCALL\tINT\t$0x80\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-24\n\tCALL\truntime·entersyscall(SB)\n\tMOVL\ttrap+0(FP), AX  // syscall entry\n\tMOVL\ta1+4(FP), BX\n\tMOVL\ta2+8(FP), CX\n\tMOVL\ta3+12(FP), DX\n\tMOVL\t$0, SI\n\tMOVL\t$0, DI\n\tINVOKE_SYSCALL\n\tMOVL\tAX, r1+16(FP)\n\tMOVL\tDX, r2+20(FP)\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-40\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24\n\tMOVL\ttrap+0(FP), AX  // syscall entry\n\tMOVL\ta1+4(FP), BX\n\tMOVL\ta2+8(FP), CX\n\tMOVL\ta3+12(FP), DX\n\tMOVL\t$0, SI\n\tMOVL\t$0, DI\n\tINVOKE_SYSCALL\n\tMOVL\tAX, r1+16(FP)\n\tMOVL\tDX, r2+20(FP)\n\tRET\n\nTEXT ·socketcall(SB),NOSPLIT,$0-36\n\tJMP\tsyscall·socketcall(SB)\n\nTEXT ·rawsocketcall(SB),NOSPLIT,$0-36\n\tJMP\tsyscall·rawsocketcall(SB)\n\nTEXT ·seek(SB),NOSPLIT,$0-28\n\tJMP\tsyscall·seek(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_amd64.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for AMD64, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tCALL\truntime·entersyscall(SB)\n\tMOVQ\ta1+8(FP), DI\n\tMOVQ\ta2+16(FP), SI\n\tMOVQ\ta3+24(FP), DX\n\tMOVQ\t$0, R10\n\tMOVQ\t$0, R8\n\tMOVQ\t$0, R9\n\tMOVQ\ttrap+0(FP), AX\t// syscall entry\n\tSYSCALL\n\tMOVQ\tAX, r1+32(FP)\n\tMOVQ\tDX, r2+40(FP)\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVQ\ta1+8(FP), DI\n\tMOVQ\ta2+16(FP), SI\n\tMOVQ\ta3+24(FP), DX\n\tMOVQ\t$0, R10\n\tMOVQ\t$0, R8\n\tMOVQ\t$0, R9\n\tMOVQ\ttrap+0(FP), AX\t// syscall entry\n\tSYSCALL\n\tMOVQ\tAX, r1+32(FP)\n\tMOVQ\tDX, r2+40(FP)\n\tRET\n\nTEXT ·gettimeofday(SB),NOSPLIT,$0-16\n\tJMP\tsyscall·gettimeofday(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_arm.s",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for arm, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-28\n\tB\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-40\n\tB\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-24\n\tBL\truntime·entersyscall(SB)\n\tMOVW\ttrap+0(FP), R7\n\tMOVW\ta1+4(FP), R0\n\tMOVW\ta2+8(FP), R1\n\tMOVW\ta3+12(FP), R2\n\tMOVW\t$0, R3\n\tMOVW\t$0, R4\n\tMOVW\t$0, R5\n\tSWI\t$0\n\tMOVW\tR0, r1+16(FP)\n\tMOVW\t$0, R0\n\tMOVW\tR0, r2+20(FP)\n\tBL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-28\n\tB\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-40\n\tB\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24\n\tMOVW\ttrap+0(FP), R7\t// syscall entry\n\tMOVW\ta1+4(FP), R0\n\tMOVW\ta2+8(FP), R1\n\tMOVW\ta3+12(FP), R2\n\tSWI\t$0\n\tMOVW\tR0, r1+16(FP)\n\tMOVW\t$0, R0\n\tMOVW\tR0, r2+20(FP)\n\tRET\n\nTEXT ·seek(SB),NOSPLIT,$0-28\n\tB\tsyscall·seek(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_arm64.s",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && arm64 && gc\n\n#include \"textflag.h\"\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tB\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tB\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tBL\truntime·entersyscall(SB)\n\tMOVD\ta1+8(FP), R0\n\tMOVD\ta2+16(FP), R1\n\tMOVD\ta3+24(FP), R2\n\tMOVD\t$0, R3\n\tMOVD\t$0, R4\n\tMOVD\t$0, R5\n\tMOVD\ttrap+0(FP), R8\t// syscall entry\n\tSVC\n\tMOVD\tR0, r1+32(FP)\t// r1\n\tMOVD\tR1, r2+40(FP)\t// r2\n\tBL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tB\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tB\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVD\ta1+8(FP), R0\n\tMOVD\ta2+16(FP), R1\n\tMOVD\ta3+24(FP), R2\n\tMOVD\t$0, R3\n\tMOVD\t$0, R4\n\tMOVD\t$0, R5\n\tMOVD\ttrap+0(FP), R8\t// syscall entry\n\tSVC\n\tMOVD\tR0, r1+32(FP)\n\tMOVD\tR1, r2+40(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_loong64.s",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && loong64 && gc\n\n#include \"textflag.h\"\n\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tJAL\truntime·entersyscall(SB)\n\tMOVV\ta1+8(FP), R4\n\tMOVV\ta2+16(FP), R5\n\tMOVV\ta3+24(FP), R6\n\tMOVV\tR0, R7\n\tMOVV\tR0, R8\n\tMOVV\tR0, R9\n\tMOVV\ttrap+0(FP), R11\t// syscall entry\n\tSYSCALL\n\tMOVV\tR4, r1+32(FP)\n\tMOVV\tR0, r2+40(FP)\t// r2 is not used. Always set to 0\n\tJAL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVV\ta1+8(FP), R4\n\tMOVV\ta2+16(FP), R5\n\tMOVV\ta3+24(FP), R6\n\tMOVV\tR0, R7\n\tMOVV\tR0, R8\n\tMOVV\tR0, R9\n\tMOVV\ttrap+0(FP), R11\t// syscall entry\n\tSYSCALL\n\tMOVV\tR4, r1+32(FP)\n\tMOVV\tR0, r2+40(FP)\t// r2 is not used. Always set to 0\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_mips64x.s",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (mips64 || mips64le) && gc\n\n#include \"textflag.h\"\n\n//\n// System calls for mips64, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tJAL\truntime·entersyscall(SB)\n\tMOVV\ta1+8(FP), R4\n\tMOVV\ta2+16(FP), R5\n\tMOVV\ta3+24(FP), R6\n\tMOVV\tR0, R7\n\tMOVV\tR0, R8\n\tMOVV\tR0, R9\n\tMOVV\ttrap+0(FP), R2\t// syscall entry\n\tSYSCALL\n\tMOVV\tR2, r1+32(FP)\n\tMOVV\tR3, r2+40(FP)\n\tJAL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVV\ta1+8(FP), R4\n\tMOVV\ta2+16(FP), R5\n\tMOVV\ta3+24(FP), R6\n\tMOVV\tR0, R7\n\tMOVV\tR0, R8\n\tMOVV\tR0, R9\n\tMOVV\ttrap+0(FP), R2\t// syscall entry\n\tSYSCALL\n\tMOVV\tR2, r1+32(FP)\n\tMOVV\tR3, r2+40(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_mipsx.s",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (mips || mipsle) && gc\n\n#include \"textflag.h\"\n\n//\n// System calls for mips, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-28\n\tJMP syscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-40\n\tJMP syscall·Syscall6(SB)\n\nTEXT ·Syscall9(SB),NOSPLIT,$0-52\n\tJMP syscall·Syscall9(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-24\n\tJAL\truntime·entersyscall(SB)\n\tMOVW\ta1+4(FP), R4\n\tMOVW\ta2+8(FP), R5\n\tMOVW\ta3+12(FP), R6\n\tMOVW\tR0, R7\n\tMOVW\ttrap+0(FP), R2\t// syscall entry\n\tSYSCALL\n\tMOVW\tR2, r1+16(FP)\t// r1\n\tMOVW\tR3, r2+20(FP)\t// r2\n\tJAL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-28\n\tJMP syscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-40\n\tJMP syscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24\n\tMOVW\ta1+4(FP), R4\n\tMOVW\ta2+8(FP), R5\n\tMOVW\ta3+12(FP), R6\n\tMOVW\ttrap+0(FP), R2\t// syscall entry\n\tSYSCALL\n\tMOVW\tR2, r1+16(FP)\n\tMOVW\tR3, r2+20(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (ppc64 || ppc64le) && gc\n\n#include \"textflag.h\"\n\n//\n// System calls for ppc64, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tBL\truntime·entersyscall(SB)\n\tMOVD\ta1+8(FP), R3\n\tMOVD\ta2+16(FP), R4\n\tMOVD\ta3+24(FP), R5\n\tMOVD\tR0, R6\n\tMOVD\tR0, R7\n\tMOVD\tR0, R8\n\tMOVD\ttrap+0(FP), R9\t// syscall entry\n\tSYSCALL R9\n\tMOVD\tR3, r1+32(FP)\n\tMOVD\tR4, r2+40(FP)\n\tBL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVD\ta1+8(FP), R3\n\tMOVD\ta2+16(FP), R4\n\tMOVD\ta3+24(FP), R5\n\tMOVD\tR0, R6\n\tMOVD\tR0, R7\n\tMOVD\tR0, R8\n\tMOVD\ttrap+0(FP), R9\t// syscall entry\n\tSYSCALL R9\n\tMOVD\tR3, r1+32(FP)\n\tMOVD\tR4, r2+40(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_riscv64.s",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build riscv64 && gc\n\n#include \"textflag.h\"\n\n//\n// System calls for linux/riscv64.\n//\n// Where available, just jump to package syscall's implementation of\n// these functions.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tCALL\truntime·entersyscall(SB)\n\tMOV\ta1+8(FP), A0\n\tMOV\ta2+16(FP), A1\n\tMOV\ta3+24(FP), A2\n\tMOV\ttrap+0(FP), A7\t// syscall entry\n\tECALL\n\tMOV\tA0, r1+32(FP)\t// r1\n\tMOV\tA1, r2+40(FP)\t// r2\n\tCALL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOV\ta1+8(FP), A0\n\tMOV\ta2+16(FP), A1\n\tMOV\ta3+24(FP), A2\n\tMOV\ttrap+0(FP), A7\t// syscall entry\n\tECALL\n\tMOV\tA0, r1+32(FP)\n\tMOV\tA1, r2+40(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_linux_s390x.s",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && s390x && gc\n\n#include \"textflag.h\"\n\n//\n// System calls for s390x, Linux\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT ·Syscall(SB),NOSPLIT,$0-56\n\tBR\tsyscall·Syscall(SB)\n\nTEXT ·Syscall6(SB),NOSPLIT,$0-80\n\tBR\tsyscall·Syscall6(SB)\n\nTEXT ·SyscallNoError(SB),NOSPLIT,$0-48\n\tBL\truntime·entersyscall(SB)\n\tMOVD\ta1+8(FP), R2\n\tMOVD\ta2+16(FP), R3\n\tMOVD\ta3+24(FP), R4\n\tMOVD\t$0, R5\n\tMOVD\t$0, R6\n\tMOVD\t$0, R7\n\tMOVD\ttrap+0(FP), R1\t// syscall entry\n\tSYSCALL\n\tMOVD\tR2, r1+32(FP)\n\tMOVD\tR3, r2+40(FP)\n\tBL\truntime·exitsyscall(SB)\n\tRET\n\nTEXT ·RawSyscall(SB),NOSPLIT,$0-56\n\tBR\tsyscall·RawSyscall(SB)\n\nTEXT ·RawSyscall6(SB),NOSPLIT,$0-80\n\tBR\tsyscall·RawSyscall6(SB)\n\nTEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48\n\tMOVD\ta1+8(FP), R2\n\tMOVD\ta2+16(FP), R3\n\tMOVD\ta3+24(FP), R4\n\tMOVD\t$0, R5\n\tMOVD\t$0, R6\n\tMOVD\t$0, R7\n\tMOVD\ttrap+0(FP), R1\t// syscall entry\n\tSYSCALL\n\tMOVD\tR2, r1+32(FP)\n\tMOVD\tR3, r2+40(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System call support for mips64, OpenBSD\n//\n\n// Just jump to package syscall's implementation for all these functions.\n// The runtime may know about them.\n\nTEXT\t·Syscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·Syscall(SB)\n\nTEXT\t·Syscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·Syscall6(SB)\n\nTEXT\t·Syscall9(SB),NOSPLIT,$0-104\n\tJMP\tsyscall·Syscall9(SB)\n\nTEXT\t·RawSyscall(SB),NOSPLIT,$0-56\n\tJMP\tsyscall·RawSyscall(SB)\n\nTEXT\t·RawSyscall6(SB),NOSPLIT,$0-80\n\tJMP\tsyscall·RawSyscall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_solaris_amd64.s",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gc\n\n#include \"textflag.h\"\n\n//\n// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go\n//\n\nTEXT ·sysvicall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·sysvicall6(SB)\n\nTEXT ·rawSysvicall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·rawSysvicall6(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/asm_zos_s390x.s",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x && gc\n\n#include \"textflag.h\"\n\n#define PSALAA            1208(R0)\n#define GTAB64(x)           80(x)\n#define LCA64(x)            88(x)\n#define SAVSTACK_ASYNC(x)  336(x) // in the LCA\n#define CAA(x)               8(x)\n#define CEECAATHDID(x)     976(x) // in the CAA\n#define EDCHPXV(x)        1016(x) // in the CAA\n#define GOCB(x)           1104(x) // in the CAA\n\n// SS_*, where x=SAVSTACK_ASYNC\n#define SS_LE(x)             0(x)\n#define SS_GO(x)             8(x)\n#define SS_ERRNO(x)         16(x)\n#define SS_ERRNOJR(x)       20(x)\n\n// Function Descriptor Offsets\n#define __errno  0x156*16\n#define __err2ad 0x16C*16\n\n// Call Instructions\n#define LE_CALL    BYTE $0x0D; BYTE $0x76 // BL R7, R6\n#define SVC_LOAD   BYTE $0x0A; BYTE $0x08 // SVC 08 LOAD\n#define SVC_DELETE BYTE $0x0A; BYTE $0x09 // SVC 09 DELETE\n\nDATA zosLibVec<>(SB)/8, $0\nGLOBL zosLibVec<>(SB), NOPTR, $8\n\nTEXT ·initZosLibVec(SB), NOSPLIT|NOFRAME, $0-0\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\tMOVD CAA(R8), R8\n\tMOVD EDCHPXV(R8), R8\n\tMOVD R8, zosLibVec<>(SB)\n\tRET\n\nTEXT ·GetZosLibVec(SB), NOSPLIT|NOFRAME, $0-0\n\tMOVD zosLibVec<>(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·clearErrno(SB), NOSPLIT, $0-0\n\tBL   addrerrno<>(SB)\n\tMOVD $0, 0(R3)\n\tRET\n\n// Returns the address of errno in R3.\nTEXT addrerrno<>(SB), NOSPLIT|NOFRAME, $0-0\n\t// Get library control area (LCA).\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\n\t// Get __errno FuncDesc.\n\tMOVD CAA(R8), R9\n\tMOVD EDCHPXV(R9), R9\n\tADD  $(__errno), R9\n\tLMG  0(R9), R5, R6\n\n\t// Switch to saved LE stack.\n\tMOVD SAVSTACK_ASYNC(R8), R9\n\tMOVD 0(R9), R4\n\tMOVD $0, 0(R9)\n\n\t// Call __errno function.\n\tLE_CALL\n\tNOPH\n\n\t// Switch back to Go stack.\n\tXOR  R0, R0    // Restore R0 to $0.\n\tMOVD R4, 0(R9) // Save stack pointer.\n\tRET\n\n// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)\nTEXT ·svcCall(SB), NOSPLIT, $0\n\tBL   runtime·save_g(SB)     // Save g and stack pointer\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\tMOVD SAVSTACK_ASYNC(R8), R9\n\tMOVD R15, 0(R9)\n\n\tMOVD argv+8(FP), R1   // Move function arguments into registers\n\tMOVD dsa+16(FP), g\n\tMOVD fnptr+0(FP), R15\n\n\tBYTE $0x0D // Branch to function\n\tBYTE $0xEF\n\n\tBL   runtime·load_g(SB)     // Restore g and stack pointer\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\tMOVD SAVSTACK_ASYNC(R8), R9\n\tMOVD 0(R9), R15\n\n\tRET\n\n// func svcLoad(name *byte) unsafe.Pointer\nTEXT ·svcLoad(SB), NOSPLIT, $0\n\tMOVD R15, R2         // Save go stack pointer\n\tMOVD name+0(FP), R0  // Move SVC args into registers\n\tMOVD $0x80000000, R1\n\tMOVD $0, R15\n\tSVC_LOAD\n\tMOVW R15, R3         // Save return code from SVC\n\tMOVD R2, R15         // Restore go stack pointer\n\tCMP  R3, $0          // Check SVC return code\n\tBNE  error\n\n\tMOVD $-2, R3       // Reset last bit of entry point to zero\n\tAND  R0, R3\n\tMOVD R3, ret+8(FP) // Return entry point returned by SVC\n\tCMP  R0, R3        // Check if last bit of entry point was set\n\tBNE  done\n\n\tMOVD R15, R2 // Save go stack pointer\n\tMOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08)\n\tSVC_DELETE\n\tMOVD R2, R15 // Restore go stack pointer\n\nerror:\n\tMOVD $0, ret+8(FP) // Return 0 on failure\n\ndone:\n\tXOR R0, R0 // Reset r0 to 0\n\tRET\n\n// func svcUnload(name *byte, fnptr unsafe.Pointer) int64\nTEXT ·svcUnload(SB), NOSPLIT, $0\n\tMOVD R15, R2          // Save go stack pointer\n\tMOVD name+0(FP), R0   // Move SVC args into registers\n\tMOVD fnptr+8(FP), R15\n\tSVC_DELETE\n\tXOR  R0, R0           // Reset r0 to 0\n\tMOVD R15, R1          // Save SVC return code\n\tMOVD R2, R15          // Restore go stack pointer\n\tMOVD R1, ret+16(FP)   // Return SVC return code\n\tRET\n\n// func gettid() uint64\nTEXT ·gettid(SB), NOSPLIT, $0\n\t// Get library control area (LCA).\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\n\t// Get CEECAATHDID\n\tMOVD CAA(R8), R9\n\tMOVD CEECAATHDID(R9), R9\n\tMOVD R9, ret+0(FP)\n\n\tRET\n\n//\n// Call LE function, if the return is -1\n// errno and errno2 is retrieved\n//\nTEXT ·CallLeFuncWithErr(SB), NOSPLIT, $0\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\tMOVD CAA(R8), R9\n\tMOVD g, GOCB(R9)\n\n\t// Restore LE stack.\n\tMOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address\n\tMOVD 0(R9), R4              // R4-> restore previously saved stack frame pointer\n\n\tMOVD parms_base+8(FP), R7 // R7 -> argument array\n\tMOVD parms_len+16(FP), R8 // R8 number of arguments\n\n\t//  arg 1 ---> R1\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tMOVD 0(R7), R1\n\n\t//  arg 2 ---> R2\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tADD  $8, R7\n\tMOVD 0(R7), R2\n\n\t//  arg 3 --> R3\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tADD  $8, R7\n\tMOVD 0(R7), R3\n\n\tCMP  R8, $0\n\tBEQ  docall\n\tMOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument\n\nrepeat:\n\tADD  $8, R7\n\tMOVD 0(R7), R0      // advance arg pointer by 8 byte\n\tADD  $8, R6         // advance LE argument address by 8 byte\n\tMOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame\n\tSUB  $1, R8\n\tCMP  R8, $0\n\tBNE  repeat\n\ndocall:\n\tMOVD funcdesc+0(FP), R8 // R8-> function descriptor\n\tLMG  0(R8), R5, R6\n\tMOVD $0, 0(R9)          // R9 address of SAVSTACK_ASYNC\n\tLE_CALL                 // balr R7, R6 (return #1)\n\tNOPH\n\tMOVD R3, ret+32(FP)\n\tCMP  R3, $-1            // compare result to -1\n\tBNE  done\n\n\t// retrieve errno and errno2\n\tMOVD  zosLibVec<>(SB), R8\n\tADD   $(__errno), R8\n\tLMG   0(R8), R5, R6\n\tLE_CALL                   // balr R7, R6 __errno (return #3)\n\tNOPH\n\tMOVWZ 0(R3), R3\n\tMOVD  R3, err+48(FP)\n\tMOVD  zosLibVec<>(SB), R8\n\tADD   $(__err2ad), R8\n\tLMG   0(R8), R5, R6\n\tLE_CALL                   // balr R7, R6 __err2ad (return #2)\n\tNOPH\n\tMOVW  (R3), R2            // retrieve errno2\n\tMOVD  R2, errno2+40(FP)   // store in return area\n\ndone:\n\tMOVD R4, 0(R9)            // Save stack pointer.\n\tRET\n\n//\n// Call LE function, if the return is 0\n// errno and errno2 is retrieved\n//\nTEXT ·CallLeFuncWithPtrReturn(SB), NOSPLIT, $0\n\tMOVW PSALAA, R8\n\tMOVD LCA64(R8), R8\n\tMOVD CAA(R8), R9\n\tMOVD g, GOCB(R9)\n\n\t// Restore LE stack.\n\tMOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address\n\tMOVD 0(R9), R4              // R4-> restore previously saved stack frame pointer\n\n\tMOVD parms_base+8(FP), R7 // R7 -> argument array\n\tMOVD parms_len+16(FP), R8 // R8 number of arguments\n\n\t//  arg 1 ---> R1\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tMOVD 0(R7), R1\n\n\t//  arg 2 ---> R2\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tADD  $8, R7\n\tMOVD 0(R7), R2\n\n\t//  arg 3 --> R3\n\tCMP  R8, $0\n\tBEQ  docall\n\tSUB  $1, R8\n\tADD  $8, R7\n\tMOVD 0(R7), R3\n\n\tCMP  R8, $0\n\tBEQ  docall\n\tMOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument\n\nrepeat:\n\tADD  $8, R7\n\tMOVD 0(R7), R0      // advance arg pointer by 8 byte\n\tADD  $8, R6         // advance LE argument address by 8 byte\n\tMOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame\n\tSUB  $1, R8\n\tCMP  R8, $0\n\tBNE  repeat\n\ndocall:\n\tMOVD funcdesc+0(FP), R8 // R8-> function descriptor\n\tLMG  0(R8), R5, R6\n\tMOVD $0, 0(R9)          // R9 address of SAVSTACK_ASYNC\n\tLE_CALL                 // balr R7, R6 (return #1)\n\tNOPH\n\tMOVD R3, ret+32(FP)\n\tCMP  R3, $0             // compare result to 0\n\tBNE  done\n\n\t// retrieve errno and errno2\n\tMOVD  zosLibVec<>(SB), R8\n\tADD   $(__errno), R8\n\tLMG   0(R8), R5, R6\n\tLE_CALL                   // balr R7, R6 __errno (return #3)\n\tNOPH\n\tMOVWZ 0(R3), R3\n\tMOVD  R3, err+48(FP)\n\tMOVD  zosLibVec<>(SB), R8\n\tADD   $(__err2ad), R8\n\tLMG   0(R8), R5, R6\n\tLE_CALL                   // balr R7, R6 __err2ad (return #2)\n\tNOPH\n\tMOVW  (R3), R2            // retrieve errno2\n\tMOVD  R2, errno2+40(FP)   // store in return area\n\tXOR   R2, R2\n\tMOVWZ R2, (R3)            // clear errno2\n\ndone:\n\tMOVD R4, 0(R9)            // Save stack pointer.\n\tRET\n\n//\n// function to test if a pointer can be safely dereferenced (content read)\n// return 0 for succces\n//\nTEXT ·ptrtest(SB), NOSPLIT, $0-16\n\tMOVD arg+0(FP), R10 // test pointer in R10\n\n\t// set up R2 to point to CEECAADMC\n\tBYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt  2,1208\n\tBYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22                         // llgtr 2,2\n\tBYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF                         // nilh  2,32767\n\tBYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg    2,88(2)\n\tBYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg    2,8(2)\n\tBYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68                         // la    2,872(2)\n\n\t// set up R5 to point to the \"shunt\" path which set 1 to R3 (failure)\n\tBYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr   3,3\n\tBYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras  5,lbl1\n\tBYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi  3,1\n\n\t// if r3 is not zero (failed) then branch to finish\n\tBYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1     ltgr  3,3\n\tBYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc   b'0111',lbl2\n\n\t// stomic store shunt address in R5 into CEECAADMC\n\tBYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg   5,0(2)\n\n\t// now try reading from the test pointer in R10, if it fails it branches to the \"lghi\" instruction above\n\tBYTE $0xE3; BYTE $0x9A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg    9,0(10)\n\n\t// finish here, restore 0 into CEECAADMC\n\tBYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99                         // lbl2     xgr   9,9\n\tBYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg   9,0(2)\n\tMOVD R3, ret+8(FP)                                                     // result in R3\n\tRET\n\n//\n// function to test if a untptr can be loaded from a pointer\n// return 1: the 8-byte content\n//        2: 0 for success, 1 for failure\n//\n// func safeload(ptr uintptr) ( value uintptr, error uintptr)\nTEXT ·safeload(SB), NOSPLIT, $0-24\n\tMOVD ptr+0(FP), R10                                                    // test pointer in R10\n\tMOVD $0x0, R6\n\tBYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt  2,1208\n\tBYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22                         // llgtr 2,2\n\tBYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF                         // nilh  2,32767\n\tBYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg    2,88(2)\n\tBYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg    2,8(2)\n\tBYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68                         // la    2,872(2)\n\tBYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33                         // xgr   3,3\n\tBYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04                         // bras  5,lbl1\n\tBYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01                         // lghi  3,1\n\tBYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33                         // lbl1     ltgr  3,3\n\tBYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08                         // brc   b'0111',lbl2\n\tBYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2)\n\tBYTE $0xE3; BYTE $0x6A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg    6,0(10)\n\tBYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99                         // lbl2     xgr   9,9\n\tBYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg   9,0(2)\n\tMOVD R6, value+8(FP)                                                   // result in R6\n\tMOVD R3, error+16(FP)                                                  // error in R3\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/auxv.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//go:linkname runtime_getAuxv runtime.getAuxv\nfunc runtime_getAuxv() []uintptr\n\n// Auxv returns the ELF auxiliary vector as a sequence of key/value pairs.\n// The returned slice is always a fresh copy, owned by the caller.\n// It returns an error on non-ELF platforms, or if the auxiliary vector cannot be accessed,\n// which happens in some locked-down environments and build modes.\nfunc Auxv() ([][2]uintptr, error) {\n\tvec := runtime_getAuxv()\n\tvecLen := len(vec)\n\n\tif vecLen == 0 {\n\t\treturn nil, syscall.ENOENT\n\t}\n\n\tif vecLen%2 != 0 {\n\t\treturn nil, syscall.EINVAL\n\t}\n\n\tresult := make([]uintptr, vecLen)\n\tcopy(result, vec)\n\treturn unsafe.Slice((*[2]uintptr)(unsafe.Pointer(&result[0])), vecLen/2), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/auxv_unsupported.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)\n\npackage unix\n\nimport \"syscall\"\n\nfunc Auxv() ([][2]uintptr, error) {\n\treturn nil, syscall.ENOTSUP\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/bluetooth_linux.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Bluetooth sockets and messages\n\npackage unix\n\n// Bluetooth Protocols\nconst (\n\tBTPROTO_L2CAP  = 0\n\tBTPROTO_HCI    = 1\n\tBTPROTO_SCO    = 2\n\tBTPROTO_RFCOMM = 3\n\tBTPROTO_BNEP   = 4\n\tBTPROTO_CMTP   = 5\n\tBTPROTO_HIDP   = 6\n\tBTPROTO_AVDTP  = 7\n)\n\nconst (\n\tHCI_CHANNEL_RAW     = 0\n\tHCI_CHANNEL_USER    = 1\n\tHCI_CHANNEL_MONITOR = 2\n\tHCI_CHANNEL_CONTROL = 3\n\tHCI_CHANNEL_LOGGING = 4\n)\n\n// Socketoption Level\nconst (\n\tSOL_BLUETOOTH = 0x112\n\tSOL_HCI       = 0x0\n\tSOL_L2CAP     = 0x6\n\tSOL_RFCOMM    = 0x12\n\tSOL_SCO       = 0x11\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/bpxsvc_zos.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos\n\npackage unix\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"unsafe\"\n)\n\n//go:noescape\nfunc bpxcall(plist []unsafe.Pointer, bpx_offset int64)\n\n//go:noescape\nfunc A2e([]byte)\n\n//go:noescape\nfunc E2a([]byte)\n\nconst (\n\tBPX4STA = 192  // stat\n\tBPX4FST = 104  // fstat\n\tBPX4LST = 132  // lstat\n\tBPX4OPN = 156  // open\n\tBPX4CLO = 72   // close\n\tBPX4CHR = 500  // chattr\n\tBPX4FCR = 504  // fchattr\n\tBPX4LCR = 1180 // lchattr\n\tBPX4CTW = 492  // cond_timed_wait\n\tBPX4GTH = 1056 // __getthent\n\tBPX4PTQ = 412  // pthread_quiesc\n\tBPX4PTR = 320  // ptrace\n)\n\nconst (\n\t//options\n\t//byte1\n\tBPX_OPNFHIGH = 0x80\n\t//byte2\n\tBPX_OPNFEXEC = 0x80\n\t//byte3\n\tBPX_O_NOLARGEFILE = 0x08\n\tBPX_O_LARGEFILE   = 0x04\n\tBPX_O_ASYNCSIG    = 0x02\n\tBPX_O_SYNC        = 0x01\n\t//byte4\n\tBPX_O_CREXCL   = 0xc0\n\tBPX_O_CREAT    = 0x80\n\tBPX_O_EXCL     = 0x40\n\tBPX_O_NOCTTY   = 0x20\n\tBPX_O_TRUNC    = 0x10\n\tBPX_O_APPEND   = 0x08\n\tBPX_O_NONBLOCK = 0x04\n\tBPX_FNDELAY    = 0x04\n\tBPX_O_RDWR     = 0x03\n\tBPX_O_RDONLY   = 0x02\n\tBPX_O_WRONLY   = 0x01\n\tBPX_O_ACCMODE  = 0x03\n\tBPX_O_GETFL    = 0x0f\n\n\t//mode\n\t// byte1 (file type)\n\tBPX_FT_DIR      = 1\n\tBPX_FT_CHARSPEC = 2\n\tBPX_FT_REGFILE  = 3\n\tBPX_FT_FIFO     = 4\n\tBPX_FT_SYMLINK  = 5\n\tBPX_FT_SOCKET   = 6\n\t//byte3\n\tBPX_S_ISUID  = 0x08\n\tBPX_S_ISGID  = 0x04\n\tBPX_S_ISVTX  = 0x02\n\tBPX_S_IRWXU1 = 0x01\n\tBPX_S_IRUSR  = 0x01\n\t//byte4\n\tBPX_S_IRWXU2 = 0xc0\n\tBPX_S_IWUSR  = 0x80\n\tBPX_S_IXUSR  = 0x40\n\tBPX_S_IRWXG  = 0x38\n\tBPX_S_IRGRP  = 0x20\n\tBPX_S_IWGRP  = 0x10\n\tBPX_S_IXGRP  = 0x08\n\tBPX_S_IRWXOX = 0x07\n\tBPX_S_IROTH  = 0x04\n\tBPX_S_IWOTH  = 0x02\n\tBPX_S_IXOTH  = 0x01\n\n\tCW_INTRPT  = 1\n\tCW_CONDVAR = 32\n\tCW_TIMEOUT = 64\n\n\tPGTHA_NEXT        = 2\n\tPGTHA_CURRENT     = 1\n\tPGTHA_FIRST       = 0\n\tPGTHA_LAST        = 3\n\tPGTHA_PROCESS     = 0x80\n\tPGTHA_CONTTY      = 0x40\n\tPGTHA_PATH        = 0x20\n\tPGTHA_COMMAND     = 0x10\n\tPGTHA_FILEDATA    = 0x08\n\tPGTHA_THREAD      = 0x04\n\tPGTHA_PTAG        = 0x02\n\tPGTHA_COMMANDLONG = 0x01\n\tPGTHA_THREADFAST  = 0x80\n\tPGTHA_FILEPATH    = 0x40\n\tPGTHA_THDSIGMASK  = 0x20\n\t// thread quiece mode\n\tQUIESCE_TERM       int32 = 1\n\tQUIESCE_FORCE      int32 = 2\n\tQUIESCE_QUERY      int32 = 3\n\tQUIESCE_FREEZE     int32 = 4\n\tQUIESCE_UNFREEZE   int32 = 5\n\tFREEZE_THIS_THREAD int32 = 6\n\tFREEZE_EXIT        int32 = 8\n\tQUIESCE_SRB        int32 = 9\n)\n\ntype Pgtha struct {\n\tPid        uint32 // 0\n\tTid0       uint32 // 4\n\tTid1       uint32\n\tAccesspid  byte    // C\n\tAccesstid  byte    // D\n\tAccessasid uint16  // E\n\tLoginname  [8]byte // 10\n\tFlag1      byte    // 18\n\tFlag1b2    byte    // 19\n}\n\ntype Bpxystat_t struct { // DSECT BPXYSTAT\n\tSt_id           [4]uint8  // 0\n\tSt_length       uint16    // 0x4\n\tSt_version      uint16    // 0x6\n\tSt_mode         uint32    // 0x8\n\tSt_ino          uint32    // 0xc\n\tSt_dev          uint32    // 0x10\n\tSt_nlink        uint32    // 0x14\n\tSt_uid          uint32    // 0x18\n\tSt_gid          uint32    // 0x1c\n\tSt_size         uint64    // 0x20\n\tSt_atime        uint32    // 0x28\n\tSt_mtime        uint32    // 0x2c\n\tSt_ctime        uint32    // 0x30\n\tSt_rdev         uint32    // 0x34\n\tSt_auditoraudit uint32    // 0x38\n\tSt_useraudit    uint32    // 0x3c\n\tSt_blksize      uint32    // 0x40\n\tSt_createtime   uint32    // 0x44\n\tSt_auditid      [4]uint32 // 0x48\n\tSt_res01        uint32    // 0x58\n\tFt_ccsid        uint16    // 0x5c\n\tFt_flags        uint16    // 0x5e\n\tSt_res01a       [2]uint32 // 0x60\n\tSt_res02        uint32    // 0x68\n\tSt_blocks       uint32    // 0x6c\n\tSt_opaque       [3]uint8  // 0x70\n\tSt_visible      uint8     // 0x73\n\tSt_reftime      uint32    // 0x74\n\tSt_fid          uint64    // 0x78\n\tSt_filefmt      uint8     // 0x80\n\tSt_fspflag2     uint8     // 0x81\n\tSt_res03        [2]uint8  // 0x82\n\tSt_ctimemsec    uint32    // 0x84\n\tSt_seclabel     [8]uint8  // 0x88\n\tSt_res04        [4]uint8  // 0x90\n\t// end of version 1\n\t_               uint32    // 0x94\n\tSt_atime64      uint64    // 0x98\n\tSt_mtime64      uint64    // 0xa0\n\tSt_ctime64      uint64    // 0xa8\n\tSt_createtime64 uint64    // 0xb0\n\tSt_reftime64    uint64    // 0xb8\n\t_               uint64    // 0xc0\n\tSt_res05        [16]uint8 // 0xc8\n\t// end of version 2\n}\n\ntype BpxFilestatus struct {\n\tOflag1 byte\n\tOflag2 byte\n\tOflag3 byte\n\tOflag4 byte\n}\n\ntype BpxMode struct {\n\tFtype byte\n\tMode1 byte\n\tMode2 byte\n\tMode3 byte\n}\n\n// Thr attribute structure for extended attributes\ntype Bpxyatt_t struct { // DSECT BPXYATT\n\tAtt_id           [4]uint8\n\tAtt_version      uint16\n\tAtt_res01        [2]uint8\n\tAtt_setflags1    uint8\n\tAtt_setflags2    uint8\n\tAtt_setflags3    uint8\n\tAtt_setflags4    uint8\n\tAtt_mode         uint32\n\tAtt_uid          uint32\n\tAtt_gid          uint32\n\tAtt_opaquemask   [3]uint8\n\tAtt_visblmaskres uint8\n\tAtt_opaque       [3]uint8\n\tAtt_visibleres   uint8\n\tAtt_size_h       uint32\n\tAtt_size_l       uint32\n\tAtt_atime        uint32\n\tAtt_mtime        uint32\n\tAtt_auditoraudit uint32\n\tAtt_useraudit    uint32\n\tAtt_ctime        uint32\n\tAtt_reftime      uint32\n\t// end of version 1\n\tAtt_filefmt uint8\n\tAtt_res02   [3]uint8\n\tAtt_filetag uint32\n\tAtt_res03   [8]uint8\n\t// end of version 2\n\tAtt_atime64   uint64\n\tAtt_mtime64   uint64\n\tAtt_ctime64   uint64\n\tAtt_reftime64 uint64\n\tAtt_seclabel  [8]uint8\n\tAtt_ver3res02 [8]uint8\n\t// end of version 3\n}\n\nfunc BpxOpen(name string, options *BpxFilestatus, mode *BpxMode) (rv int32, rc int32, rn int32) {\n\tif len(name) < 1024 {\n\t\tvar namebuf [1024]byte\n\t\tsz := int32(copy(namebuf[:], name))\n\t\tA2e(namebuf[:sz])\n\t\tvar parms [7]unsafe.Pointer\n\t\tparms[0] = unsafe.Pointer(&sz)\n\t\tparms[1] = unsafe.Pointer(&namebuf[0])\n\t\tparms[2] = unsafe.Pointer(options)\n\t\tparms[3] = unsafe.Pointer(mode)\n\t\tparms[4] = unsafe.Pointer(&rv)\n\t\tparms[5] = unsafe.Pointer(&rc)\n\t\tparms[6] = unsafe.Pointer(&rn)\n\t\tbpxcall(parms[:], BPX4OPN)\n\t\treturn rv, rc, rn\n\t}\n\treturn -1, -1, -1\n}\n\nfunc BpxClose(fd int32) (rv int32, rc int32, rn int32) {\n\tvar parms [4]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&fd)\n\tparms[1] = unsafe.Pointer(&rv)\n\tparms[2] = unsafe.Pointer(&rc)\n\tparms[3] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4CLO)\n\treturn rv, rc, rn\n}\n\nfunc BpxFileFStat(fd int32, st *Bpxystat_t) (rv int32, rc int32, rn int32) {\n\tst.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}\n\tst.St_version = 2\n\tstat_sz := uint32(unsafe.Sizeof(*st))\n\tvar parms [6]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&fd)\n\tparms[1] = unsafe.Pointer(&stat_sz)\n\tparms[2] = unsafe.Pointer(st)\n\tparms[3] = unsafe.Pointer(&rv)\n\tparms[4] = unsafe.Pointer(&rc)\n\tparms[5] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4FST)\n\treturn rv, rc, rn\n}\n\nfunc BpxFileStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) {\n\tif len(name) < 1024 {\n\t\tvar namebuf [1024]byte\n\t\tsz := int32(copy(namebuf[:], name))\n\t\tA2e(namebuf[:sz])\n\t\tst.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}\n\t\tst.St_version = 2\n\t\tstat_sz := uint32(unsafe.Sizeof(*st))\n\t\tvar parms [7]unsafe.Pointer\n\t\tparms[0] = unsafe.Pointer(&sz)\n\t\tparms[1] = unsafe.Pointer(&namebuf[0])\n\t\tparms[2] = unsafe.Pointer(&stat_sz)\n\t\tparms[3] = unsafe.Pointer(st)\n\t\tparms[4] = unsafe.Pointer(&rv)\n\t\tparms[5] = unsafe.Pointer(&rc)\n\t\tparms[6] = unsafe.Pointer(&rn)\n\t\tbpxcall(parms[:], BPX4STA)\n\t\treturn rv, rc, rn\n\t}\n\treturn -1, -1, -1\n}\n\nfunc BpxFileLStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) {\n\tif len(name) < 1024 {\n\t\tvar namebuf [1024]byte\n\t\tsz := int32(copy(namebuf[:], name))\n\t\tA2e(namebuf[:sz])\n\t\tst.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3}\n\t\tst.St_version = 2\n\t\tstat_sz := uint32(unsafe.Sizeof(*st))\n\t\tvar parms [7]unsafe.Pointer\n\t\tparms[0] = unsafe.Pointer(&sz)\n\t\tparms[1] = unsafe.Pointer(&namebuf[0])\n\t\tparms[2] = unsafe.Pointer(&stat_sz)\n\t\tparms[3] = unsafe.Pointer(st)\n\t\tparms[4] = unsafe.Pointer(&rv)\n\t\tparms[5] = unsafe.Pointer(&rc)\n\t\tparms[6] = unsafe.Pointer(&rn)\n\t\tbpxcall(parms[:], BPX4LST)\n\t\treturn rv, rc, rn\n\t}\n\treturn -1, -1, -1\n}\n\nfunc BpxChattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {\n\tif len(path) >= 1024 {\n\t\treturn -1, -1, -1\n\t}\n\tvar namebuf [1024]byte\n\tsz := int32(copy(namebuf[:], path))\n\tA2e(namebuf[:sz])\n\tattr_sz := uint32(unsafe.Sizeof(*attr))\n\tvar parms [7]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&sz)\n\tparms[1] = unsafe.Pointer(&namebuf[0])\n\tparms[2] = unsafe.Pointer(&attr_sz)\n\tparms[3] = unsafe.Pointer(attr)\n\tparms[4] = unsafe.Pointer(&rv)\n\tparms[5] = unsafe.Pointer(&rc)\n\tparms[6] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4CHR)\n\treturn rv, rc, rn\n}\n\nfunc BpxLchattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {\n\tif len(path) >= 1024 {\n\t\treturn -1, -1, -1\n\t}\n\tvar namebuf [1024]byte\n\tsz := int32(copy(namebuf[:], path))\n\tA2e(namebuf[:sz])\n\tattr_sz := uint32(unsafe.Sizeof(*attr))\n\tvar parms [7]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&sz)\n\tparms[1] = unsafe.Pointer(&namebuf[0])\n\tparms[2] = unsafe.Pointer(&attr_sz)\n\tparms[3] = unsafe.Pointer(attr)\n\tparms[4] = unsafe.Pointer(&rv)\n\tparms[5] = unsafe.Pointer(&rc)\n\tparms[6] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4LCR)\n\treturn rv, rc, rn\n}\n\nfunc BpxFchattr(fd int32, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) {\n\tattr_sz := uint32(unsafe.Sizeof(*attr))\n\tvar parms [6]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&fd)\n\tparms[1] = unsafe.Pointer(&attr_sz)\n\tparms[2] = unsafe.Pointer(attr)\n\tparms[3] = unsafe.Pointer(&rv)\n\tparms[4] = unsafe.Pointer(&rc)\n\tparms[5] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4FCR)\n\treturn rv, rc, rn\n}\n\nfunc BpxCondTimedWait(sec uint32, nsec uint32, events uint32, secrem *uint32, nsecrem *uint32) (rv int32, rc int32, rn int32) {\n\tvar parms [8]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&sec)\n\tparms[1] = unsafe.Pointer(&nsec)\n\tparms[2] = unsafe.Pointer(&events)\n\tparms[3] = unsafe.Pointer(secrem)\n\tparms[4] = unsafe.Pointer(nsecrem)\n\tparms[5] = unsafe.Pointer(&rv)\n\tparms[6] = unsafe.Pointer(&rc)\n\tparms[7] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4CTW)\n\treturn rv, rc, rn\n}\nfunc BpxGetthent(in *Pgtha, outlen *uint32, out unsafe.Pointer) (rv int32, rc int32, rn int32) {\n\tvar parms [7]unsafe.Pointer\n\tinlen := uint32(26) // nothing else will work. Go says Pgtha is 28-byte because of alignment, but Pgtha is \"packed\" and must be 26-byte\n\tparms[0] = unsafe.Pointer(&inlen)\n\tparms[1] = unsafe.Pointer(&in)\n\tparms[2] = unsafe.Pointer(outlen)\n\tparms[3] = unsafe.Pointer(&out)\n\tparms[4] = unsafe.Pointer(&rv)\n\tparms[5] = unsafe.Pointer(&rc)\n\tparms[6] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4GTH)\n\treturn rv, rc, rn\n}\nfunc ZosJobname() (jobname string, err error) {\n\tvar pgtha Pgtha\n\tpgtha.Pid = uint32(Getpid())\n\tpgtha.Accesspid = PGTHA_CURRENT\n\tpgtha.Flag1 = PGTHA_PROCESS\n\tvar out [256]byte\n\tvar outlen uint32\n\toutlen = 256\n\trv, rc, rn := BpxGetthent(&pgtha, &outlen, unsafe.Pointer(&out[0]))\n\tif rv == 0 {\n\t\tgthc := []byte{0x87, 0xa3, 0x88, 0x83} // 'gthc' in ebcdic\n\t\tix := bytes.Index(out[:], gthc)\n\t\tif ix == -1 {\n\t\t\terr = fmt.Errorf(\"BPX4GTH: gthc return data not found\")\n\t\t\treturn\n\t\t}\n\t\tjn := out[ix+80 : ix+88] // we didn't declare Pgthc, but jobname is 8-byte at offset 80\n\t\tE2a(jn)\n\t\tjobname = string(bytes.TrimRight(jn, \" \"))\n\n\t} else {\n\t\terr = fmt.Errorf(\"BPX4GTH: rc=%d errno=%d reason=code=0x%x\", rv, rc, rn)\n\t}\n\treturn\n}\nfunc Bpx4ptq(code int32, data string) (rv int32, rc int32, rn int32) {\n\tvar userdata [8]byte\n\tvar parms [5]unsafe.Pointer\n\tcopy(userdata[:], data+\"        \")\n\tA2e(userdata[:])\n\tparms[0] = unsafe.Pointer(&code)\n\tparms[1] = unsafe.Pointer(&userdata[0])\n\tparms[2] = unsafe.Pointer(&rv)\n\tparms[3] = unsafe.Pointer(&rc)\n\tparms[4] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4PTQ)\n\treturn rv, rc, rn\n}\n\nconst (\n\tPT_TRACE_ME             = 0  // Debug this process\n\tPT_READ_I               = 1  // Read a full word\n\tPT_READ_D               = 2  // Read a full word\n\tPT_READ_U               = 3  // Read control info\n\tPT_WRITE_I              = 4  //Write a full word\n\tPT_WRITE_D              = 5  //Write a full word\n\tPT_CONTINUE             = 7  //Continue the process\n\tPT_KILL                 = 8  //Terminate the process\n\tPT_READ_GPR             = 11 // Read GPR, CR, PSW\n\tPT_READ_FPR             = 12 // Read FPR\n\tPT_READ_VR              = 13 // Read VR\n\tPT_WRITE_GPR            = 14 // Write GPR, CR, PSW\n\tPT_WRITE_FPR            = 15 // Write FPR\n\tPT_WRITE_VR             = 16 // Write VR\n\tPT_READ_BLOCK           = 17 // Read storage\n\tPT_WRITE_BLOCK          = 19 // Write storage\n\tPT_READ_GPRH            = 20 // Read GPRH\n\tPT_WRITE_GPRH           = 21 // Write GPRH\n\tPT_REGHSET              = 22 // Read all GPRHs\n\tPT_ATTACH               = 30 // Attach to a process\n\tPT_DETACH               = 31 // Detach from a process\n\tPT_REGSET               = 32 // Read all GPRs\n\tPT_REATTACH             = 33 // Reattach to a process\n\tPT_LDINFO               = 34 // Read loader info\n\tPT_MULTI                = 35 // Multi process mode\n\tPT_LD64INFO             = 36 // RMODE64 Info Area\n\tPT_BLOCKREQ             = 40 // Block request\n\tPT_THREAD_INFO          = 60 // Read thread info\n\tPT_THREAD_MODIFY        = 61\n\tPT_THREAD_READ_FOCUS    = 62\n\tPT_THREAD_WRITE_FOCUS   = 63\n\tPT_THREAD_HOLD          = 64\n\tPT_THREAD_SIGNAL        = 65\n\tPT_EXPLAIN              = 66\n\tPT_EVENTS               = 67\n\tPT_THREAD_INFO_EXTENDED = 68\n\tPT_REATTACH2            = 71\n\tPT_CAPTURE              = 72\n\tPT_UNCAPTURE            = 73\n\tPT_GET_THREAD_TCB       = 74\n\tPT_GET_ALET             = 75\n\tPT_SWAPIN               = 76\n\tPT_EXTENDED_EVENT       = 98\n\tPT_RECOVER              = 99  // Debug a program check\n\tPT_GPR0                 = 0   // General purpose register 0\n\tPT_GPR1                 = 1   // General purpose register 1\n\tPT_GPR2                 = 2   // General purpose register 2\n\tPT_GPR3                 = 3   // General purpose register 3\n\tPT_GPR4                 = 4   // General purpose register 4\n\tPT_GPR5                 = 5   // General purpose register 5\n\tPT_GPR6                 = 6   // General purpose register 6\n\tPT_GPR7                 = 7   // General purpose register 7\n\tPT_GPR8                 = 8   // General purpose register 8\n\tPT_GPR9                 = 9   // General purpose register 9\n\tPT_GPR10                = 10  // General purpose register 10\n\tPT_GPR11                = 11  // General purpose register 11\n\tPT_GPR12                = 12  // General purpose register 12\n\tPT_GPR13                = 13  // General purpose register 13\n\tPT_GPR14                = 14  // General purpose register 14\n\tPT_GPR15                = 15  // General purpose register 15\n\tPT_FPR0                 = 16  // Floating point register 0\n\tPT_FPR1                 = 17  // Floating point register 1\n\tPT_FPR2                 = 18  // Floating point register 2\n\tPT_FPR3                 = 19  // Floating point register 3\n\tPT_FPR4                 = 20  // Floating point register 4\n\tPT_FPR5                 = 21  // Floating point register 5\n\tPT_FPR6                 = 22  // Floating point register 6\n\tPT_FPR7                 = 23  // Floating point register 7\n\tPT_FPR8                 = 24  // Floating point register 8\n\tPT_FPR9                 = 25  // Floating point register 9\n\tPT_FPR10                = 26  // Floating point register 10\n\tPT_FPR11                = 27  // Floating point register 11\n\tPT_FPR12                = 28  // Floating point register 12\n\tPT_FPR13                = 29  // Floating point register 13\n\tPT_FPR14                = 30  // Floating point register 14\n\tPT_FPR15                = 31  // Floating point register 15\n\tPT_FPC                  = 32  // Floating point control register\n\tPT_PSW                  = 40  // PSW\n\tPT_PSW0                 = 40  // Left half of the PSW\n\tPT_PSW1                 = 41  // Right half of the PSW\n\tPT_CR0                  = 42  // Control register 0\n\tPT_CR1                  = 43  // Control register 1\n\tPT_CR2                  = 44  // Control register 2\n\tPT_CR3                  = 45  // Control register 3\n\tPT_CR4                  = 46  // Control register 4\n\tPT_CR5                  = 47  // Control register 5\n\tPT_CR6                  = 48  // Control register 6\n\tPT_CR7                  = 49  // Control register 7\n\tPT_CR8                  = 50  // Control register 8\n\tPT_CR9                  = 51  // Control register 9\n\tPT_CR10                 = 52  // Control register 10\n\tPT_CR11                 = 53  // Control register 11\n\tPT_CR12                 = 54  // Control register 12\n\tPT_CR13                 = 55  // Control register 13\n\tPT_CR14                 = 56  // Control register 14\n\tPT_CR15                 = 57  // Control register 15\n\tPT_GPRH0                = 58  // GP High register 0\n\tPT_GPRH1                = 59  // GP High register 1\n\tPT_GPRH2                = 60  // GP High register 2\n\tPT_GPRH3                = 61  // GP High register 3\n\tPT_GPRH4                = 62  // GP High register 4\n\tPT_GPRH5                = 63  // GP High register 5\n\tPT_GPRH6                = 64  // GP High register 6\n\tPT_GPRH7                = 65  // GP High register 7\n\tPT_GPRH8                = 66  // GP High register 8\n\tPT_GPRH9                = 67  // GP High register 9\n\tPT_GPRH10               = 68  // GP High register 10\n\tPT_GPRH11               = 69  // GP High register 11\n\tPT_GPRH12               = 70  // GP High register 12\n\tPT_GPRH13               = 71  // GP High register 13\n\tPT_GPRH14               = 72  // GP High register 14\n\tPT_GPRH15               = 73  // GP High register 15\n\tPT_VR0                  = 74  // Vector register 0\n\tPT_VR1                  = 75  // Vector register 1\n\tPT_VR2                  = 76  // Vector register 2\n\tPT_VR3                  = 77  // Vector register 3\n\tPT_VR4                  = 78  // Vector register 4\n\tPT_VR5                  = 79  // Vector register 5\n\tPT_VR6                  = 80  // Vector register 6\n\tPT_VR7                  = 81  // Vector register 7\n\tPT_VR8                  = 82  // Vector register 8\n\tPT_VR9                  = 83  // Vector register 9\n\tPT_VR10                 = 84  // Vector register 10\n\tPT_VR11                 = 85  // Vector register 11\n\tPT_VR12                 = 86  // Vector register 12\n\tPT_VR13                 = 87  // Vector register 13\n\tPT_VR14                 = 88  // Vector register 14\n\tPT_VR15                 = 89  // Vector register 15\n\tPT_VR16                 = 90  // Vector register 16\n\tPT_VR17                 = 91  // Vector register 17\n\tPT_VR18                 = 92  // Vector register 18\n\tPT_VR19                 = 93  // Vector register 19\n\tPT_VR20                 = 94  // Vector register 20\n\tPT_VR21                 = 95  // Vector register 21\n\tPT_VR22                 = 96  // Vector register 22\n\tPT_VR23                 = 97  // Vector register 23\n\tPT_VR24                 = 98  // Vector register 24\n\tPT_VR25                 = 99  // Vector register 25\n\tPT_VR26                 = 100 // Vector register 26\n\tPT_VR27                 = 101 // Vector register 27\n\tPT_VR28                 = 102 // Vector register 28\n\tPT_VR29                 = 103 // Vector register 29\n\tPT_VR30                 = 104 // Vector register 30\n\tPT_VR31                 = 105 // Vector register 31\n\tPT_PSWG                 = 106 // PSWG\n\tPT_PSWG0                = 106 // Bytes 0-3\n\tPT_PSWG1                = 107 // Bytes 4-7\n\tPT_PSWG2                = 108 // Bytes 8-11 (IA high word)\n\tPT_PSWG3                = 109 // Bytes 12-15 (IA low word)\n)\n\nfunc Bpx4ptr(request int32, pid int32, addr unsafe.Pointer, data unsafe.Pointer, buffer unsafe.Pointer) (rv int32, rc int32, rn int32) {\n\tvar parms [8]unsafe.Pointer\n\tparms[0] = unsafe.Pointer(&request)\n\tparms[1] = unsafe.Pointer(&pid)\n\tparms[2] = unsafe.Pointer(&addr)\n\tparms[3] = unsafe.Pointer(&data)\n\tparms[4] = unsafe.Pointer(&buffer)\n\tparms[5] = unsafe.Pointer(&rv)\n\tparms[6] = unsafe.Pointer(&rc)\n\tparms[7] = unsafe.Pointer(&rn)\n\tbpxcall(parms[:], BPX4PTR)\n\treturn rv, rc, rn\n}\n\nfunc copyU8(val uint8, dest []uint8) int {\n\tif len(dest) < 1 {\n\t\treturn 0\n\t}\n\tdest[0] = val\n\treturn 1\n}\n\nfunc copyU8Arr(src, dest []uint8) int {\n\tif len(dest) < len(src) {\n\t\treturn 0\n\t}\n\tfor i, v := range src {\n\t\tdest[i] = v\n\t}\n\treturn len(src)\n}\n\nfunc copyU16(val uint16, dest []uint16) int {\n\tif len(dest) < 1 {\n\t\treturn 0\n\t}\n\tdest[0] = val\n\treturn 1\n}\n\nfunc copyU32(val uint32, dest []uint32) int {\n\tif len(dest) < 1 {\n\t\treturn 0\n\t}\n\tdest[0] = val\n\treturn 1\n}\n\nfunc copyU32Arr(src, dest []uint32) int {\n\tif len(dest) < len(src) {\n\t\treturn 0\n\t}\n\tfor i, v := range src {\n\t\tdest[i] = v\n\t}\n\treturn len(src)\n}\n\nfunc copyU64(val uint64, dest []uint64) int {\n\tif len(dest) < 1 {\n\t\treturn 0\n\t}\n\tdest[0] = val\n\treturn 1\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/bpxsvc_zos.s",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n#include \"go_asm.h\"\n#include \"textflag.h\"\n\n// function to call USS assembly language services\n//\n// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bit64env.htm\n//\n//   arg1 unsafe.Pointer array that ressembles an OS PLIST\n//\n//   arg2 function offset as in\n//       doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bpx2cr_List_of_offsets.htm\n//\n// func bpxcall(plist []unsafe.Pointer, bpx_offset int64)\n\nTEXT ·bpxcall(SB), NOSPLIT|NOFRAME, $0\n\tMOVD  plist_base+0(FP), R1  // r1 points to plist\n\tMOVD  bpx_offset+24(FP), R2 // r2 offset to BPX vector table\n\tMOVD  R14, R7               // save r14\n\tMOVD  R15, R8               // save r15\n\tMOVWZ 16(R0), R9\n\tMOVWZ 544(R9), R9\n\tMOVWZ 24(R9), R9            // call vector in r9\n\tADD   R2, R9                // add offset to vector table\n\tMOVWZ (R9), R9              // r9 points to entry point\n\tBYTE  $0x0D                 // BL R14,R9 --> basr r14,r9\n\tBYTE  $0xE9                 // clobbers 0,1,14,15\n\tMOVD  R8, R15               // restore 15\n\tJMP   R7                    // return via saved return address\n\n//   func A2e(arr [] byte)\n//   code page conversion from  819 to 1047\nTEXT ·A2e(SB), NOSPLIT|NOFRAME, $0\n\tMOVD arg_base+0(FP), R2                        // pointer to arry of characters\n\tMOVD arg_len+8(FP), R3                         // count\n\tXOR  R0, R0\n\tXOR  R1, R1\n\tBYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2))\n\n\t// ASCII -> EBCDIC conversion table:\n\tBYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03\n\tBYTE $0x37; BYTE $0x2d; BYTE $0x2e; BYTE $0x2f\n\tBYTE $0x16; BYTE $0x05; BYTE $0x15; BYTE $0x0b\n\tBYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f\n\tBYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13\n\tBYTE $0x3c; BYTE $0x3d; BYTE $0x32; BYTE $0x26\n\tBYTE $0x18; BYTE $0x19; BYTE $0x3f; BYTE $0x27\n\tBYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f\n\tBYTE $0x40; BYTE $0x5a; BYTE $0x7f; BYTE $0x7b\n\tBYTE $0x5b; BYTE $0x6c; BYTE $0x50; BYTE $0x7d\n\tBYTE $0x4d; BYTE $0x5d; BYTE $0x5c; BYTE $0x4e\n\tBYTE $0x6b; BYTE $0x60; BYTE $0x4b; BYTE $0x61\n\tBYTE $0xf0; BYTE $0xf1; BYTE $0xf2; BYTE $0xf3\n\tBYTE $0xf4; BYTE $0xf5; BYTE $0xf6; BYTE $0xf7\n\tBYTE $0xf8; BYTE $0xf9; BYTE $0x7a; BYTE $0x5e\n\tBYTE $0x4c; BYTE $0x7e; BYTE $0x6e; BYTE $0x6f\n\tBYTE $0x7c; BYTE $0xc1; BYTE $0xc2; BYTE $0xc3\n\tBYTE $0xc4; BYTE $0xc5; BYTE $0xc6; BYTE $0xc7\n\tBYTE $0xc8; BYTE $0xc9; BYTE $0xd1; BYTE $0xd2\n\tBYTE $0xd3; BYTE $0xd4; BYTE $0xd5; BYTE $0xd6\n\tBYTE $0xd7; BYTE $0xd8; BYTE $0xd9; BYTE $0xe2\n\tBYTE $0xe3; BYTE $0xe4; BYTE $0xe5; BYTE $0xe6\n\tBYTE $0xe7; BYTE $0xe8; BYTE $0xe9; BYTE $0xad\n\tBYTE $0xe0; BYTE $0xbd; BYTE $0x5f; BYTE $0x6d\n\tBYTE $0x79; BYTE $0x81; BYTE $0x82; BYTE $0x83\n\tBYTE $0x84; BYTE $0x85; BYTE $0x86; BYTE $0x87\n\tBYTE $0x88; BYTE $0x89; BYTE $0x91; BYTE $0x92\n\tBYTE $0x93; BYTE $0x94; BYTE $0x95; BYTE $0x96\n\tBYTE $0x97; BYTE $0x98; BYTE $0x99; BYTE $0xa2\n\tBYTE $0xa3; BYTE $0xa4; BYTE $0xa5; BYTE $0xa6\n\tBYTE $0xa7; BYTE $0xa8; BYTE $0xa9; BYTE $0xc0\n\tBYTE $0x4f; BYTE $0xd0; BYTE $0xa1; BYTE $0x07\n\tBYTE $0x20; BYTE $0x21; BYTE $0x22; BYTE $0x23\n\tBYTE $0x24; BYTE $0x25; BYTE $0x06; BYTE $0x17\n\tBYTE $0x28; BYTE $0x29; BYTE $0x2a; BYTE $0x2b\n\tBYTE $0x2c; BYTE $0x09; BYTE $0x0a; BYTE $0x1b\n\tBYTE $0x30; BYTE $0x31; BYTE $0x1a; BYTE $0x33\n\tBYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x08\n\tBYTE $0x38; BYTE $0x39; BYTE $0x3a; BYTE $0x3b\n\tBYTE $0x04; BYTE $0x14; BYTE $0x3e; BYTE $0xff\n\tBYTE $0x41; BYTE $0xaa; BYTE $0x4a; BYTE $0xb1\n\tBYTE $0x9f; BYTE $0xb2; BYTE $0x6a; BYTE $0xb5\n\tBYTE $0xbb; BYTE $0xb4; BYTE $0x9a; BYTE $0x8a\n\tBYTE $0xb0; BYTE $0xca; BYTE $0xaf; BYTE $0xbc\n\tBYTE $0x90; BYTE $0x8f; BYTE $0xea; BYTE $0xfa\n\tBYTE $0xbe; BYTE $0xa0; BYTE $0xb6; BYTE $0xb3\n\tBYTE $0x9d; BYTE $0xda; BYTE $0x9b; BYTE $0x8b\n\tBYTE $0xb7; BYTE $0xb8; BYTE $0xb9; BYTE $0xab\n\tBYTE $0x64; BYTE $0x65; BYTE $0x62; BYTE $0x66\n\tBYTE $0x63; BYTE $0x67; BYTE $0x9e; BYTE $0x68\n\tBYTE $0x74; BYTE $0x71; BYTE $0x72; BYTE $0x73\n\tBYTE $0x78; BYTE $0x75; BYTE $0x76; BYTE $0x77\n\tBYTE $0xac; BYTE $0x69; BYTE $0xed; BYTE $0xee\n\tBYTE $0xeb; BYTE $0xef; BYTE $0xec; BYTE $0xbf\n\tBYTE $0x80; BYTE $0xfd; BYTE $0xfe; BYTE $0xfb\n\tBYTE $0xfc; BYTE $0xba; BYTE $0xae; BYTE $0x59\n\tBYTE $0x44; BYTE $0x45; BYTE $0x42; BYTE $0x46\n\tBYTE $0x43; BYTE $0x47; BYTE $0x9c; BYTE $0x48\n\tBYTE $0x54; BYTE $0x51; BYTE $0x52; BYTE $0x53\n\tBYTE $0x58; BYTE $0x55; BYTE $0x56; BYTE $0x57\n\tBYTE $0x8c; BYTE $0x49; BYTE $0xcd; BYTE $0xce\n\tBYTE $0xcb; BYTE $0xcf; BYTE $0xcc; BYTE $0xe1\n\tBYTE $0x70; BYTE $0xdd; BYTE $0xde; BYTE $0xdb\n\tBYTE $0xdc; BYTE $0x8d; BYTE $0x8e; BYTE $0xdf\n\nretry:\n\tWORD $0xB9931022 // TROO 2,2,b'0001'\n\tBVS  retry\n\tRET\n\n//   func e2a(arr [] byte)\n//   code page conversion from  1047 to 819\nTEXT ·E2a(SB), NOSPLIT|NOFRAME, $0\n\tMOVD arg_base+0(FP), R2                        // pointer to arry of characters\n\tMOVD arg_len+8(FP), R3                         // count\n\tXOR  R0, R0\n\tXOR  R1, R1\n\tBYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2))\n\n\t// EBCDIC -> ASCII conversion table:\n\tBYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03\n\tBYTE $0x9c; BYTE $0x09; BYTE $0x86; BYTE $0x7f\n\tBYTE $0x97; BYTE $0x8d; BYTE $0x8e; BYTE $0x0b\n\tBYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f\n\tBYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13\n\tBYTE $0x9d; BYTE $0x0a; BYTE $0x08; BYTE $0x87\n\tBYTE $0x18; BYTE $0x19; BYTE $0x92; BYTE $0x8f\n\tBYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f\n\tBYTE $0x80; BYTE $0x81; BYTE $0x82; BYTE $0x83\n\tBYTE $0x84; BYTE $0x85; BYTE $0x17; BYTE $0x1b\n\tBYTE $0x88; BYTE $0x89; BYTE $0x8a; BYTE $0x8b\n\tBYTE $0x8c; BYTE $0x05; BYTE $0x06; BYTE $0x07\n\tBYTE $0x90; BYTE $0x91; BYTE $0x16; BYTE $0x93\n\tBYTE $0x94; BYTE $0x95; BYTE $0x96; BYTE $0x04\n\tBYTE $0x98; BYTE $0x99; BYTE $0x9a; BYTE $0x9b\n\tBYTE $0x14; BYTE $0x15; BYTE $0x9e; BYTE $0x1a\n\tBYTE $0x20; BYTE $0xa0; BYTE $0xe2; BYTE $0xe4\n\tBYTE $0xe0; BYTE $0xe1; BYTE $0xe3; BYTE $0xe5\n\tBYTE $0xe7; BYTE $0xf1; BYTE $0xa2; BYTE $0x2e\n\tBYTE $0x3c; BYTE $0x28; BYTE $0x2b; BYTE $0x7c\n\tBYTE $0x26; BYTE $0xe9; BYTE $0xea; BYTE $0xeb\n\tBYTE $0xe8; BYTE $0xed; BYTE $0xee; BYTE $0xef\n\tBYTE $0xec; BYTE $0xdf; BYTE $0x21; BYTE $0x24\n\tBYTE $0x2a; BYTE $0x29; BYTE $0x3b; BYTE $0x5e\n\tBYTE $0x2d; BYTE $0x2f; BYTE $0xc2; BYTE $0xc4\n\tBYTE $0xc0; BYTE $0xc1; BYTE $0xc3; BYTE $0xc5\n\tBYTE $0xc7; BYTE $0xd1; BYTE $0xa6; BYTE $0x2c\n\tBYTE $0x25; BYTE $0x5f; BYTE $0x3e; BYTE $0x3f\n\tBYTE $0xf8; BYTE $0xc9; BYTE $0xca; BYTE $0xcb\n\tBYTE $0xc8; BYTE $0xcd; BYTE $0xce; BYTE $0xcf\n\tBYTE $0xcc; BYTE $0x60; BYTE $0x3a; BYTE $0x23\n\tBYTE $0x40; BYTE $0x27; BYTE $0x3d; BYTE $0x22\n\tBYTE $0xd8; BYTE $0x61; BYTE $0x62; BYTE $0x63\n\tBYTE $0x64; BYTE $0x65; BYTE $0x66; BYTE $0x67\n\tBYTE $0x68; BYTE $0x69; BYTE $0xab; BYTE $0xbb\n\tBYTE $0xf0; BYTE $0xfd; BYTE $0xfe; BYTE $0xb1\n\tBYTE $0xb0; BYTE $0x6a; BYTE $0x6b; BYTE $0x6c\n\tBYTE $0x6d; BYTE $0x6e; BYTE $0x6f; BYTE $0x70\n\tBYTE $0x71; BYTE $0x72; BYTE $0xaa; BYTE $0xba\n\tBYTE $0xe6; BYTE $0xb8; BYTE $0xc6; BYTE $0xa4\n\tBYTE $0xb5; BYTE $0x7e; BYTE $0x73; BYTE $0x74\n\tBYTE $0x75; BYTE $0x76; BYTE $0x77; BYTE $0x78\n\tBYTE $0x79; BYTE $0x7a; BYTE $0xa1; BYTE $0xbf\n\tBYTE $0xd0; BYTE $0x5b; BYTE $0xde; BYTE $0xae\n\tBYTE $0xac; BYTE $0xa3; BYTE $0xa5; BYTE $0xb7\n\tBYTE $0xa9; BYTE $0xa7; BYTE $0xb6; BYTE $0xbc\n\tBYTE $0xbd; BYTE $0xbe; BYTE $0xdd; BYTE $0xa8\n\tBYTE $0xaf; BYTE $0x5d; BYTE $0xb4; BYTE $0xd7\n\tBYTE $0x7b; BYTE $0x41; BYTE $0x42; BYTE $0x43\n\tBYTE $0x44; BYTE $0x45; BYTE $0x46; BYTE $0x47\n\tBYTE $0x48; BYTE $0x49; BYTE $0xad; BYTE $0xf4\n\tBYTE $0xf6; BYTE $0xf2; BYTE $0xf3; BYTE $0xf5\n\tBYTE $0x7d; BYTE $0x4a; BYTE $0x4b; BYTE $0x4c\n\tBYTE $0x4d; BYTE $0x4e; BYTE $0x4f; BYTE $0x50\n\tBYTE $0x51; BYTE $0x52; BYTE $0xb9; BYTE $0xfb\n\tBYTE $0xfc; BYTE $0xf9; BYTE $0xfa; BYTE $0xff\n\tBYTE $0x5c; BYTE $0xf7; BYTE $0x53; BYTE $0x54\n\tBYTE $0x55; BYTE $0x56; BYTE $0x57; BYTE $0x58\n\tBYTE $0x59; BYTE $0x5a; BYTE $0xb2; BYTE $0xd4\n\tBYTE $0xd6; BYTE $0xd2; BYTE $0xd3; BYTE $0xd5\n\tBYTE $0x30; BYTE $0x31; BYTE $0x32; BYTE $0x33\n\tBYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x37\n\tBYTE $0x38; BYTE $0x39; BYTE $0xb3; BYTE $0xdb\n\tBYTE $0xdc; BYTE $0xd9; BYTE $0xda; BYTE $0x9f\n\nretry:\n\tWORD $0xB9931022 // TROO 2,2,b'0001'\n\tBVS  retry\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/cap_freebsd.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build freebsd\n\npackage unix\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c\n\nconst (\n\t// This is the version of CapRights this package understands. See C implementation for parallels.\n\tcapRightsGoVersion = CAP_RIGHTS_VERSION_00\n\tcapArSizeMin       = CAP_RIGHTS_VERSION_00 + 2\n\tcapArSizeMax       = capRightsGoVersion + 2\n)\n\nvar (\n\tbit2idx = []int{\n\t\t-1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1,\n\t\t4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n\t}\n)\n\nfunc capidxbit(right uint64) int {\n\treturn int((right >> 57) & 0x1f)\n}\n\nfunc rightToIndex(right uint64) (int, error) {\n\tidx := capidxbit(right)\n\tif idx < 0 || idx >= len(bit2idx) {\n\t\treturn -2, fmt.Errorf(\"index for right 0x%x out of range\", right)\n\t}\n\treturn bit2idx[idx], nil\n}\n\nfunc caprver(right uint64) int {\n\treturn int(right >> 62)\n}\n\nfunc capver(rights *CapRights) int {\n\treturn caprver(rights.Rights[0])\n}\n\nfunc caparsize(rights *CapRights) int {\n\treturn capver(rights) + 2\n}\n\n// CapRightsSet sets the permissions in setrights in rights.\nfunc CapRightsSet(rights *CapRights, setrights []uint64) error {\n\t// This is essentially a copy of cap_rights_vset()\n\tif capver(rights) != CAP_RIGHTS_VERSION_00 {\n\t\treturn fmt.Errorf(\"bad rights version %d\", capver(rights))\n\t}\n\n\tn := caparsize(rights)\n\tif n < capArSizeMin || n > capArSizeMax {\n\t\treturn errors.New(\"bad rights size\")\n\t}\n\n\tfor _, right := range setrights {\n\t\tif caprver(right) != CAP_RIGHTS_VERSION_00 {\n\t\t\treturn errors.New(\"bad right version\")\n\t\t}\n\t\ti, err := rightToIndex(right)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif i >= n {\n\t\t\treturn errors.New(\"index overflow\")\n\t\t}\n\t\tif capidxbit(rights.Rights[i]) != capidxbit(right) {\n\t\t\treturn errors.New(\"index mismatch\")\n\t\t}\n\t\trights.Rights[i] |= right\n\t\tif capidxbit(rights.Rights[i]) != capidxbit(right) {\n\t\t\treturn errors.New(\"index mismatch (after assign)\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CapRightsClear clears the permissions in clearrights from rights.\nfunc CapRightsClear(rights *CapRights, clearrights []uint64) error {\n\t// This is essentially a copy of cap_rights_vclear()\n\tif capver(rights) != CAP_RIGHTS_VERSION_00 {\n\t\treturn fmt.Errorf(\"bad rights version %d\", capver(rights))\n\t}\n\n\tn := caparsize(rights)\n\tif n < capArSizeMin || n > capArSizeMax {\n\t\treturn errors.New(\"bad rights size\")\n\t}\n\n\tfor _, right := range clearrights {\n\t\tif caprver(right) != CAP_RIGHTS_VERSION_00 {\n\t\t\treturn errors.New(\"bad right version\")\n\t\t}\n\t\ti, err := rightToIndex(right)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif i >= n {\n\t\t\treturn errors.New(\"index overflow\")\n\t\t}\n\t\tif capidxbit(rights.Rights[i]) != capidxbit(right) {\n\t\t\treturn errors.New(\"index mismatch\")\n\t\t}\n\t\trights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)\n\t\tif capidxbit(rights.Rights[i]) != capidxbit(right) {\n\t\t\treturn errors.New(\"index mismatch (after assign)\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CapRightsIsSet checks whether all the permissions in setrights are present in rights.\nfunc CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) {\n\t// This is essentially a copy of cap_rights_is_vset()\n\tif capver(rights) != CAP_RIGHTS_VERSION_00 {\n\t\treturn false, fmt.Errorf(\"bad rights version %d\", capver(rights))\n\t}\n\n\tn := caparsize(rights)\n\tif n < capArSizeMin || n > capArSizeMax {\n\t\treturn false, errors.New(\"bad rights size\")\n\t}\n\n\tfor _, right := range setrights {\n\t\tif caprver(right) != CAP_RIGHTS_VERSION_00 {\n\t\t\treturn false, errors.New(\"bad right version\")\n\t\t}\n\t\ti, err := rightToIndex(right)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif i >= n {\n\t\t\treturn false, errors.New(\"index overflow\")\n\t\t}\n\t\tif capidxbit(rights.Rights[i]) != capidxbit(right) {\n\t\t\treturn false, errors.New(\"index mismatch\")\n\t\t}\n\t\tif (rights.Rights[i] & right) != right {\n\t\t\treturn false, nil\n\t\t}\n\t}\n\n\treturn true, nil\n}\n\nfunc capright(idx uint64, bit uint64) uint64 {\n\treturn ((1 << (57 + idx)) | bit)\n}\n\n// CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.\n// See man cap_rights_init(3) and rights(4).\nfunc CapRightsInit(rights []uint64) (*CapRights, error) {\n\tvar r CapRights\n\tr.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)\n\tr.Rights[1] = capright(1, 0)\n\n\terr := CapRightsSet(&r, rights)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &r, nil\n}\n\n// CapRightsLimit reduces the operations permitted on fd to at most those contained in rights.\n// The capability rights on fd can never be increased by CapRightsLimit.\n// See man cap_rights_limit(2) and rights(4).\nfunc CapRightsLimit(fd uintptr, rights *CapRights) error {\n\treturn capRightsLimit(int(fd), rights)\n}\n\n// CapRightsGet returns a CapRights structure containing the operations permitted on fd.\n// See man cap_rights_get(3) and rights(4).\nfunc CapRightsGet(fd uintptr) (*CapRights, error) {\n\tr, err := CapRightsInit(nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = capRightsGet(capRightsGoVersion, int(fd), r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn r, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/constants.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\nconst (\n\tR_OK = 0x4\n\tW_OK = 0x2\n\tX_OK = 0x1\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_aix_ppc.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix && ppc\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used by AIX.\n\npackage unix\n\n// Major returns the major component of a Linux device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev >> 16) & 0xffff)\n}\n\n// Minor returns the minor component of a Linux device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(dev & 0xffff)\n}\n\n// Mkdev returns a Linux device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn uint64(((major) << 16) | (minor))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_aix_ppc64.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix && ppc64\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used AIX.\n\npackage unix\n\n// Major returns the major component of a Linux device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev & 0x3fffffff00000000) >> 32)\n}\n\n// Minor returns the minor component of a Linux device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32((dev & 0x00000000ffffffff) >> 0)\n}\n\n// Mkdev returns a Linux device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\tvar DEVNO64 uint64\n\tDEVNO64 = 0x8000000000000000\n\treturn ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_darwin.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used in Darwin's sys/types.h header.\n\npackage unix\n\n// Major returns the major component of a Darwin device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev >> 24) & 0xff)\n}\n\n// Minor returns the minor component of a Darwin device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(dev & 0xffffff)\n}\n\n// Mkdev returns a Darwin device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn (uint64(major) << 24) | uint64(minor)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_dragonfly.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used in Dragonfly's sys/types.h header.\n//\n// The information below is extracted and adapted from sys/types.h:\n//\n// Minor gives a cookie instead of an index since in order to avoid changing the\n// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for\n// devices that don't use them.\n\npackage unix\n\n// Major returns the major component of a DragonFlyBSD device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev >> 8) & 0xff)\n}\n\n// Minor returns the minor component of a DragonFlyBSD device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(dev & 0xffff00ff)\n}\n\n// Mkdev returns a DragonFlyBSD device number generated from the given major and\n// minor components.\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn (uint64(major) << 8) | uint64(minor)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_freebsd.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used in FreeBSD's sys/types.h header.\n//\n// The information below is extracted and adapted from sys/types.h:\n//\n// Minor gives a cookie instead of an index since in order to avoid changing the\n// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for\n// devices that don't use them.\n\npackage unix\n\n// Major returns the major component of a FreeBSD device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev >> 8) & 0xff)\n}\n\n// Minor returns the minor component of a FreeBSD device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(dev & 0xffff00ff)\n}\n\n// Mkdev returns a FreeBSD device number generated from the given major and\n// minor components.\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn (uint64(major) << 8) | uint64(minor)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_linux.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used by the Linux kernel and glibc.\n//\n// The information below is extracted and adapted from bits/sysmacros.h in the\n// glibc sources:\n//\n// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's\n// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major\n// number and m is a hex digit of the minor number. This is backward compatible\n// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also\n// backward compatible with the Linux kernel, which for some architectures uses\n// 32-bit dev_t, encoded as mmmM MMmm.\n\npackage unix\n\n// Major returns the major component of a Linux device number.\nfunc Major(dev uint64) uint32 {\n\tmajor := uint32((dev & 0x00000000000fff00) >> 8)\n\tmajor |= uint32((dev & 0xfffff00000000000) >> 32)\n\treturn major\n}\n\n// Minor returns the minor component of a Linux device number.\nfunc Minor(dev uint64) uint32 {\n\tminor := uint32((dev & 0x00000000000000ff) >> 0)\n\tminor |= uint32((dev & 0x00000ffffff00000) >> 12)\n\treturn minor\n}\n\n// Mkdev returns a Linux device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\tdev := (uint64(major) & 0x00000fff) << 8\n\tdev |= (uint64(major) & 0xfffff000) << 32\n\tdev |= (uint64(minor) & 0x000000ff) << 0\n\tdev |= (uint64(minor) & 0xffffff00) << 12\n\treturn dev\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_netbsd.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used in NetBSD's sys/types.h header.\n\npackage unix\n\n// Major returns the major component of a NetBSD device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev & 0x000fff00) >> 8)\n}\n\n// Minor returns the minor component of a NetBSD device number.\nfunc Minor(dev uint64) uint32 {\n\tminor := uint32((dev & 0x000000ff) >> 0)\n\tminor |= uint32((dev & 0xfff00000) >> 12)\n\treturn minor\n}\n\n// Mkdev returns a NetBSD device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\tdev := (uint64(major) << 8) & 0x000fff00\n\tdev |= (uint64(minor) << 12) & 0xfff00000\n\tdev |= (uint64(minor) << 0) & 0x000000ff\n\treturn dev\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_openbsd.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used in OpenBSD's sys/types.h header.\n\npackage unix\n\n// Major returns the major component of an OpenBSD device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev & 0x0000ff00) >> 8)\n}\n\n// Minor returns the minor component of an OpenBSD device number.\nfunc Minor(dev uint64) uint32 {\n\tminor := uint32((dev & 0x000000ff) >> 0)\n\tminor |= uint32((dev & 0xffff0000) >> 8)\n\treturn minor\n}\n\n// Mkdev returns an OpenBSD device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\tdev := (uint64(major) << 8) & 0x0000ff00\n\tdev |= (uint64(minor) << 8) & 0xffff0000\n\tdev |= (uint64(minor) << 0) & 0x000000ff\n\treturn dev\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dev_zos.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x\n\n// Functions to access/create device major and minor numbers matching the\n// encoding used by z/OS.\n//\n// The information below is extracted and adapted from <sys/stat.h> macros.\n\npackage unix\n\n// Major returns the major component of a z/OS device number.\nfunc Major(dev uint64) uint32 {\n\treturn uint32((dev >> 16) & 0x0000FFFF)\n}\n\n// Minor returns the minor component of a z/OS device number.\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(dev & 0x0000FFFF)\n}\n\n// Mkdev returns a z/OS device number generated from the given major and minor\n// components.\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn (uint64(major) << 16) | uint64(minor)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/dirent.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\nimport \"unsafe\"\n\n// readInt returns the size-bytes unsigned integer in native byte order at offset off.\nfunc readInt(b []byte, off, size uintptr) (u uint64, ok bool) {\n\tif len(b) < int(off+size) {\n\t\treturn 0, false\n\t}\n\tif isBigEndian {\n\t\treturn readIntBE(b[off:], size), true\n\t}\n\treturn readIntLE(b[off:], size), true\n}\n\nfunc readIntBE(b []byte, size uintptr) uint64 {\n\tswitch size {\n\tcase 1:\n\t\treturn uint64(b[0])\n\tcase 2:\n\t\t_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[1]) | uint64(b[0])<<8\n\tcase 4:\n\t\t_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24\n\tcase 8:\n\t\t_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |\n\t\t\tuint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56\n\tdefault:\n\t\tpanic(\"syscall: readInt with unsupported size\")\n\t}\n}\n\nfunc readIntLE(b []byte, size uintptr) uint64 {\n\tswitch size {\n\tcase 1:\n\t\treturn uint64(b[0])\n\tcase 2:\n\t\t_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[0]) | uint64(b[1])<<8\n\tcase 4:\n\t\t_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24\n\tcase 8:\n\t\t_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808\n\t\treturn uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |\n\t\t\tuint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56\n\tdefault:\n\t\tpanic(\"syscall: readInt with unsupported size\")\n\t}\n}\n\n// ParseDirent parses up to max directory entries in buf,\n// appending the names to names. It returns the number of\n// bytes consumed from buf, the number of entries added\n// to names, and the new names slice.\nfunc ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {\n\toriglen := len(buf)\n\tcount = 0\n\tfor max != 0 && len(buf) > 0 {\n\t\treclen, ok := direntReclen(buf)\n\t\tif !ok || reclen > uint64(len(buf)) {\n\t\t\treturn origlen, count, names\n\t\t}\n\t\trec := buf[:reclen]\n\t\tbuf = buf[reclen:]\n\t\tino, ok := direntIno(rec)\n\t\tif !ok {\n\t\t\tbreak\n\t\t}\n\t\tif ino == 0 { // File absent in directory.\n\t\t\tcontinue\n\t\t}\n\t\tconst namoff = uint64(unsafe.Offsetof(Dirent{}.Name))\n\t\tnamlen, ok := direntNamlen(rec)\n\t\tif !ok || namoff+namlen > uint64(len(rec)) {\n\t\t\tbreak\n\t\t}\n\t\tname := rec[namoff : namoff+namlen]\n\t\tfor i, c := range name {\n\t\t\tif c == 0 {\n\t\t\t\tname = name[:i]\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Check for useless names before allocating a string.\n\t\tif string(name) == \".\" || string(name) == \"..\" {\n\t\t\tcontinue\n\t\t}\n\t\tmax--\n\t\tcount++\n\t\tnames = append(names, string(name))\n\t}\n\treturn origlen - len(buf), count, names\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/endian_big.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n//\n//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64\n\npackage unix\n\nconst isBigEndian = true\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/endian_little.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n//\n//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh\n\npackage unix\n\nconst isBigEndian = false\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/env_unix.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\n// Unix environment variables.\n\npackage unix\n\nimport \"syscall\"\n\nfunc Getenv(key string) (value string, found bool) {\n\treturn syscall.Getenv(key)\n}\n\nfunc Setenv(key, value string) error {\n\treturn syscall.Setenv(key, value)\n}\n\nfunc Clearenv() {\n\tsyscall.Clearenv()\n}\n\nfunc Environ() []string {\n\treturn syscall.Environ()\n}\n\nfunc Unsetenv(key string) error {\n\treturn syscall.Unsetenv(key)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/fcntl.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build dragonfly || freebsd || linux || netbsd\n\npackage unix\n\nimport \"unsafe\"\n\n// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux\n// systems by fcntl_linux_32bit.go to be SYS_FCNTL64.\nvar fcntl64Syscall uintptr = SYS_FCNTL\n\nfunc fcntl(fd int, cmd, arg int) (int, error) {\n\tvalptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tvar err error\n\tif errno != 0 {\n\t\terr = errno\n\t}\n\treturn int(valptr), err\n}\n\n// FcntlInt performs a fcntl syscall on fd with the provided command and argument.\nfunc FcntlInt(fd uintptr, cmd, arg int) (int, error) {\n\treturn fcntl(int(fd), cmd, arg)\n}\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {\n\t_, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))\n\tif errno == 0 {\n\t\treturn nil\n\t}\n\treturn errno\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/fcntl_darwin.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\nimport \"unsafe\"\n\n// FcntlInt performs a fcntl syscall on fd with the provided command and argument.\nfunc FcntlInt(fd uintptr, cmd, arg int) (int, error) {\n\treturn fcntl(int(fd), cmd, arg)\n}\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {\n\t_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))\n\treturn err\n}\n\n// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.\nfunc FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {\n\t_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))\n\treturn err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)\n\npackage unix\n\nfunc init() {\n\t// On 32-bit Linux systems, the fcntl syscall that matches Go's\n\t// Flock_t type is SYS_FCNTL64, not SYS_FCNTL.\n\tfcntl64Syscall = SYS_FCNTL64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/fdset.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\n// Set adds fd to the set fds.\nfunc (fds *FdSet) Set(fd int) {\n\tfds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))\n}\n\n// Clear removes fd from the set fds.\nfunc (fds *FdSet) Clear(fd int) {\n\tfds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))\n}\n\n// IsSet returns whether fd is in the set fds.\nfunc (fds *FdSet) IsSet(fd int) bool {\n\treturn fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0\n}\n\n// Zero clears the set fds.\nfunc (fds *FdSet) Zero() {\n\tclear(fds.Bits[:])\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/gccgo.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gccgo && !aix && !hurd\n\npackage unix\n\nimport \"syscall\"\n\n// We can't use the gc-syntax .s files for gccgo. On the plus side\n// much of the functionality can be written directly in Go.\n\nfunc realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)\n\nfunc realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)\n\nfunc SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {\n\tsyscall.Entersyscall()\n\tr := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)\n\tsyscall.Exitsyscall()\n\treturn r, 0\n}\n\nfunc Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\tsyscall.Entersyscall()\n\tr, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)\n\tsyscall.Exitsyscall()\n\treturn r, 0, syscall.Errno(errno)\n}\n\nfunc Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\tsyscall.Entersyscall()\n\tr, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)\n\tsyscall.Exitsyscall()\n\treturn r, 0, syscall.Errno(errno)\n}\n\nfunc Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\tsyscall.Entersyscall()\n\tr, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)\n\tsyscall.Exitsyscall()\n\treturn r, 0, syscall.Errno(errno)\n}\n\nfunc RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {\n\tr := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)\n\treturn r, 0\n}\n\nfunc RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\tr, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)\n\treturn r, 0, syscall.Errno(errno)\n}\n\nfunc RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\tr, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)\n\treturn r, 0, syscall.Errno(errno)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/gccgo_c.c",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gccgo && !aix && !hurd\n\n#include <errno.h>\n#include <stdint.h>\n#include <unistd.h>\n\n#define _STRINGIFY2_(x) #x\n#define _STRINGIFY_(x) _STRINGIFY2_(x)\n#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)\n\n// Call syscall from C code because the gccgo support for calling from\n// Go to C does not support varargs functions.\n\nstruct ret {\n\tuintptr_t r;\n\tuintptr_t err;\n};\n\nstruct ret gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)\n  __asm__(GOSYM_PREFIX GOPKGPATH \".realSyscall\");\n\nstruct ret\ngccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)\n{\n\tstruct ret r;\n\n\terrno = 0;\n\tr.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);\n\tr.err = errno;\n\treturn r;\n}\n\nuintptr_t gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)\n  __asm__(GOSYM_PREFIX GOPKGPATH \".realSyscallNoError\");\n\nuintptr_t\ngccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)\n{\n\treturn syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build gccgo && linux && amd64\n\npackage unix\n\nimport \"syscall\"\n\n//extern gettimeofday\nfunc realGettimeofday(*Timeval, *byte) int32\n\nfunc gettimeofday(tv *Timeval) (err syscall.Errno) {\n\tr := realGettimeofday(tv, nil)\n\tif r < 0 {\n\t\treturn syscall.GetErrno()\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ifreq_linux.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n// Helpers for dealing with ifreq since it contains a union and thus requires a\n// lot of unsafe.Pointer casts to use properly.\n\n// An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq\n// contains an interface name and a union of arbitrary data which can be\n// accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq\n// function.\n//\n// Use the Name method to access the stored interface name. The union data\n// fields can be get and set using the following methods:\n//   - Uint16/SetUint16: flags\n//   - Uint32/SetUint32: ifindex, metric, mtu\ntype Ifreq struct{ raw ifreq }\n\n// NewIfreq creates an Ifreq with the input network interface name after\n// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)\n// bytes.\nfunc NewIfreq(name string) (*Ifreq, error) {\n\t// Leave room for terminating NULL byte.\n\tif len(name) >= IFNAMSIZ {\n\t\treturn nil, EINVAL\n\t}\n\n\tvar ifr ifreq\n\tcopy(ifr.Ifrn[:], name)\n\n\treturn &Ifreq{raw: ifr}, nil\n}\n\n// TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.\n\n// Name returns the interface name associated with the Ifreq.\nfunc (ifr *Ifreq) Name() string {\n\treturn ByteSliceToString(ifr.raw.Ifrn[:])\n}\n\n// According to netdevice(7), only AF_INET addresses are returned for numerous\n// sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port\n// field and other data is always empty.\n\n// Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C\n// in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not\n// AF_INET, an error is returned.\nfunc (ifr *Ifreq) Inet4Addr() ([]byte, error) {\n\traw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))\n\tif raw.Family != AF_INET {\n\t\t// Cannot safely interpret raw.Addr bytes as an IPv4 address.\n\t\treturn nil, EINVAL\n\t}\n\n\treturn raw.Addr[:], nil\n}\n\n// SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an\n// embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length\n// or an error will be returned.\nfunc (ifr *Ifreq) SetInet4Addr(v []byte) error {\n\tif len(v) != 4 {\n\t\treturn EINVAL\n\t}\n\n\tvar addr [4]byte\n\tcopy(addr[:], v)\n\n\tifr.clear()\n\t*(*RawSockaddrInet4)(\n\t\tunsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),\n\t) = RawSockaddrInet4{\n\t\t// Always set IP family as ioctls would require it anyway.\n\t\tFamily: AF_INET,\n\t\tAddr:   addr,\n\t}\n\n\treturn nil\n}\n\n// Uint16 returns the Ifreq union data as a C short/Go uint16 value.\nfunc (ifr *Ifreq) Uint16() uint16 {\n\treturn *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))\n}\n\n// SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.\nfunc (ifr *Ifreq) SetUint16(v uint16) {\n\tifr.clear()\n\t*(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v\n}\n\n// Uint32 returns the Ifreq union data as a C int/Go uint32 value.\nfunc (ifr *Ifreq) Uint32() uint32 {\n\treturn *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))\n}\n\n// SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.\nfunc (ifr *Ifreq) SetUint32(v uint32) {\n\tifr.clear()\n\t*(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v\n}\n\n// clear zeroes the ifreq's union field to prevent trailing garbage data from\n// being sent to the kernel if an ifreq is reused.\nfunc (ifr *Ifreq) clear() {\n\tclear(ifr.raw.Ifru[:])\n}\n\n// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as\n// IoctlGetEthtoolDrvinfo which use these APIs under the hood.\n\n// An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,\n// use the Ifreq.withData method.\ntype ifreqData struct {\n\tname [IFNAMSIZ]byte\n\t// A type separate from ifreq is required in order to comply with the\n\t// unsafe.Pointer rules since the \"pointer-ness\" of data would not be\n\t// preserved if it were cast into the byte array of a raw ifreq.\n\tdata unsafe.Pointer\n\t// Pad to the same size as ifreq.\n\t_ [len(ifreq{}.Ifru) - SizeofPtr]byte\n}\n\n// withData produces an ifreqData with the pointer p set for ioctls which require\n// arbitrary pointer data.\nfunc (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {\n\treturn ifreqData{\n\t\tname: ifr.raw.Ifrn,\n\t\tdata: p,\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ioctl_linux.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\nimport \"unsafe\"\n\n// IoctlRetInt performs an ioctl operation specified by req on a device\n// associated with opened file descriptor fd, and returns a non-negative\n// integer that is returned by the ioctl syscall.\nfunc IoctlRetInt(fd int, req uint) (int, error) {\n\tret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(ret), nil\n}\n\nfunc IoctlGetUint32(fd int, req uint) (uint32, error) {\n\tvar value uint32\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn value, err\n}\n\nfunc IoctlGetRTCTime(fd int) (*RTCTime, error) {\n\tvar value RTCTime\n\terr := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc IoctlSetRTCTime(fd int, value *RTCTime) error {\n\treturn ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))\n}\n\nfunc IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {\n\tvar value RTCWkAlrm\n\terr := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {\n\treturn ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))\n}\n\n// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network\n// device specified by ifname.\nfunc IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {\n\tifr, err := NewIfreq(ifname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvalue := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}\n\tifrd := ifr.withData(unsafe.Pointer(&value))\n\n\terr = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)\n\treturn &value, err\n}\n\n// IoctlGetEthtoolTsInfo fetches ethtool timestamping and PHC\n// association for the network device specified by ifname.\nfunc IoctlGetEthtoolTsInfo(fd int, ifname string) (*EthtoolTsInfo, error) {\n\tifr, err := NewIfreq(ifname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvalue := EthtoolTsInfo{Cmd: ETHTOOL_GET_TS_INFO}\n\tifrd := ifr.withData(unsafe.Pointer(&value))\n\n\terr = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)\n\treturn &value, err\n}\n\n// IoctlGetHwTstamp retrieves the hardware timestamping configuration\n// for the network device specified by ifname.\nfunc IoctlGetHwTstamp(fd int, ifname string) (*HwTstampConfig, error) {\n\tifr, err := NewIfreq(ifname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvalue := HwTstampConfig{}\n\tifrd := ifr.withData(unsafe.Pointer(&value))\n\n\terr = ioctlIfreqData(fd, SIOCGHWTSTAMP, &ifrd)\n\treturn &value, err\n}\n\n// IoctlSetHwTstamp updates the hardware timestamping configuration for\n// the network device specified by ifname.\nfunc IoctlSetHwTstamp(fd int, ifname string, cfg *HwTstampConfig) error {\n\tifr, err := NewIfreq(ifname)\n\tif err != nil {\n\t\treturn err\n\t}\n\tifrd := ifr.withData(unsafe.Pointer(cfg))\n\treturn ioctlIfreqData(fd, SIOCSHWTSTAMP, &ifrd)\n}\n\n// FdToClockID derives the clock ID from the file descriptor number\n// - see clock_gettime(3), FD_TO_CLOCKID macros. The resulting ID is\n// suitable for system calls like ClockGettime.\nfunc FdToClockID(fd int) int32 { return int32((int(^fd) << 3) | 3) }\n\n// IoctlPtpClockGetcaps returns the description of a given PTP device.\nfunc IoctlPtpClockGetcaps(fd int) (*PtpClockCaps, error) {\n\tvar value PtpClockCaps\n\terr := ioctlPtr(fd, PTP_CLOCK_GETCAPS2, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlPtpSysOffsetPrecise returns a description of the clock\n// offset compared to the system clock.\nfunc IoctlPtpSysOffsetPrecise(fd int) (*PtpSysOffsetPrecise, error) {\n\tvar value PtpSysOffsetPrecise\n\terr := ioctlPtr(fd, PTP_SYS_OFFSET_PRECISE2, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlPtpSysOffsetExtended returns an extended description of the\n// clock offset compared to the system clock. The samples parameter\n// specifies the desired number of measurements.\nfunc IoctlPtpSysOffsetExtended(fd int, samples uint) (*PtpSysOffsetExtended, error) {\n\tvalue := PtpSysOffsetExtended{Samples: uint32(samples)}\n\terr := ioctlPtr(fd, PTP_SYS_OFFSET_EXTENDED2, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlPtpPinGetfunc returns the configuration of the specified\n// I/O pin on given PTP device.\nfunc IoctlPtpPinGetfunc(fd int, index uint) (*PtpPinDesc, error) {\n\tvalue := PtpPinDesc{Index: uint32(index)}\n\terr := ioctlPtr(fd, PTP_PIN_GETFUNC2, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlPtpPinSetfunc updates configuration of the specified PTP\n// I/O pin.\nfunc IoctlPtpPinSetfunc(fd int, pd *PtpPinDesc) error {\n\treturn ioctlPtr(fd, PTP_PIN_SETFUNC2, unsafe.Pointer(pd))\n}\n\n// IoctlPtpPeroutRequest configures the periodic output mode of the\n// PTP I/O pins.\nfunc IoctlPtpPeroutRequest(fd int, r *PtpPeroutRequest) error {\n\treturn ioctlPtr(fd, PTP_PEROUT_REQUEST2, unsafe.Pointer(r))\n}\n\n// IoctlPtpExttsRequest configures the external timestamping mode\n// of the PTP I/O pins.\nfunc IoctlPtpExttsRequest(fd int, r *PtpExttsRequest) error {\n\treturn ioctlPtr(fd, PTP_EXTTS_REQUEST2, unsafe.Pointer(r))\n}\n\n// IoctlGetWatchdogInfo fetches information about a watchdog device from the\n// Linux watchdog API. For more information, see:\n// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.\nfunc IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {\n\tvar value WatchdogInfo\n\terr := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For\n// more information, see:\n// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.\nfunc IoctlWatchdogKeepalive(fd int) error {\n\t// arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.\n\treturn ioctl(fd, WDIOC_KEEPALIVE, 0)\n}\n\n// IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the\n// range of data conveyed in value to the file associated with the file\n// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.\nfunc IoctlFileCloneRange(destFd int, value *FileCloneRange) error {\n\treturn ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))\n}\n\n// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file\n// associated with the file description srcFd to the file associated with the\n// file descriptor destFd. See the ioctl_ficlone(2) man page for details.\nfunc IoctlFileClone(destFd, srcFd int) error {\n\treturn ioctl(destFd, FICLONE, uintptr(srcFd))\n}\n\ntype FileDedupeRange struct {\n\tSrc_offset uint64\n\tSrc_length uint64\n\tReserved1  uint16\n\tReserved2  uint32\n\tInfo       []FileDedupeRangeInfo\n}\n\ntype FileDedupeRangeInfo struct {\n\tDest_fd       int64\n\tDest_offset   uint64\n\tBytes_deduped uint64\n\tStatus        int32\n\tReserved      uint32\n}\n\n// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the\n// range of data conveyed in value from the file associated with the file\n// descriptor srcFd to the value.Info destinations. See the\n// ioctl_fideduperange(2) man page for details.\nfunc IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {\n\tbuf := make([]byte, SizeofRawFileDedupeRange+\n\t\tlen(value.Info)*SizeofRawFileDedupeRangeInfo)\n\trawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0]))\n\trawrange.Src_offset = value.Src_offset\n\trawrange.Src_length = value.Src_length\n\trawrange.Dest_count = uint16(len(value.Info))\n\trawrange.Reserved1 = value.Reserved1\n\trawrange.Reserved2 = value.Reserved2\n\n\tfor i := range value.Info {\n\t\trawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(\n\t\t\tuintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +\n\t\t\t\tuintptr(i*SizeofRawFileDedupeRangeInfo)))\n\t\trawinfo.Dest_fd = value.Info[i].Dest_fd\n\t\trawinfo.Dest_offset = value.Info[i].Dest_offset\n\t\trawinfo.Bytes_deduped = value.Info[i].Bytes_deduped\n\t\trawinfo.Status = value.Info[i].Status\n\t\trawinfo.Reserved = value.Info[i].Reserved\n\t}\n\n\terr := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))\n\n\t// Output\n\tfor i := range value.Info {\n\t\trawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(\n\t\t\tuintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +\n\t\t\t\tuintptr(i*SizeofRawFileDedupeRangeInfo)))\n\t\tvalue.Info[i].Dest_fd = rawinfo.Dest_fd\n\t\tvalue.Info[i].Dest_offset = rawinfo.Dest_offset\n\t\tvalue.Info[i].Bytes_deduped = rawinfo.Bytes_deduped\n\t\tvalue.Info[i].Status = rawinfo.Status\n\t\tvalue.Info[i].Reserved = rawinfo.Reserved\n\t}\n\n\treturn err\n}\n\nfunc IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {\n\treturn ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))\n}\n\nfunc IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {\n\tvar value HIDRawDevInfo\n\terr := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc IoctlHIDGetRawName(fd int) (string, error) {\n\tvar value [_HIDIOCGRAWNAME_LEN]byte\n\terr := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))\n\treturn ByteSliceToString(value[:]), err\n}\n\nfunc IoctlHIDGetRawPhys(fd int) (string, error) {\n\tvar value [_HIDIOCGRAWPHYS_LEN]byte\n\terr := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))\n\treturn ByteSliceToString(value[:]), err\n}\n\nfunc IoctlHIDGetRawUniq(fd int) (string, error) {\n\tvar value [_HIDIOCGRAWUNIQ_LEN]byte\n\terr := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))\n\treturn ByteSliceToString(value[:]), err\n}\n\n// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or\n// output. See the netdevice(7) man page for details.\nfunc IoctlIfreq(fd int, req uint, value *Ifreq) error {\n\t// It is possible we will add more fields to *Ifreq itself later to prevent\n\t// misuse, so pass the raw *ifreq directly.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(&value.raw))\n}\n\n// TODO(mdlayher): export if and when IfreqData is exported.\n\n// ioctlIfreqData performs an ioctl using an ifreqData structure for input\n// and/or output. See the netdevice(7) man page for details.\nfunc ioctlIfreqData(fd int, req uint, value *ifreqData) error {\n\t// The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are\n\t// identical so pass *IfreqData directly.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an\n// existing KCM socket, returning a structure containing the file descriptor of\n// the new socket.\nfunc IoctlKCMClone(fd int) (*KCMClone, error) {\n\tvar info KCMClone\n\tif err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &info, nil\n}\n\n// IoctlKCMAttach attaches a TCP socket and associated BPF program file\n// descriptor to a multiplexor.\nfunc IoctlKCMAttach(fd int, info KCMAttach) error {\n\treturn ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))\n}\n\n// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.\nfunc IoctlKCMUnattach(fd int, info KCMUnattach) error {\n\treturn ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))\n}\n\n// IoctlLoopGetStatus64 gets the status of the loop device associated with the\n// file descriptor fd using the LOOP_GET_STATUS64 operation.\nfunc IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {\n\tvar value LoopInfo64\n\tif err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &value, nil\n}\n\n// IoctlLoopSetStatus64 sets the status of the loop device associated with the\n// file descriptor fd using the LOOP_SET_STATUS64 operation.\nfunc IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {\n\treturn ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))\n}\n\n// IoctlLoopConfigure configures all loop device parameters in a single step\nfunc IoctlLoopConfigure(fd int, value *LoopConfig) error {\n\treturn ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ioctl_signed.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || solaris\n\npackage unix\n\nimport \"unsafe\"\n\n// ioctl itself should not be exposed directly, but additional get/set\n// functions for specific types are permissible.\n\n// IoctlSetInt performs an ioctl operation which sets an integer value\n// on fd, using the specified request number.\nfunc IoctlSetInt(fd int, req int, value int) error {\n\treturn ioctl(fd, req, uintptr(value))\n}\n\n// IoctlSetPointerInt performs an ioctl operation which sets an\n// integer value on fd, using the specified request number. The ioctl\n// argument is called with a pointer to the integer value, rather than\n// passing the integer value directly.\nfunc IoctlSetPointerInt(fd int, req int, value int) error {\n\tv := int32(value)\n\treturn ioctlPtr(fd, req, unsafe.Pointer(&v))\n}\n\n// IoctlSetString performs an ioctl operation which sets a string value\n// on fd, using the specified request number.\nfunc IoctlSetString(fd int, req int, value string) error {\n\tbs := append([]byte(value), 0)\n\treturn ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))\n}\n\n// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.\n//\n// To change fd's window size, the req argument should be TIOCSWINSZ.\nfunc IoctlSetWinsize(fd int, req int, value *Winsize) error {\n\t// TODO: if we get the chance, remove the req parameter and\n\t// hardcode TIOCSWINSZ.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlSetTermios performs an ioctl on fd with a *Termios.\n//\n// The req value will usually be TCSETA or TIOCSETA.\nfunc IoctlSetTermios(fd int, req int, value *Termios) error {\n\t// TODO: if we get the chance, remove the req parameter.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlGetInt performs an ioctl operation which gets an integer value\n// from fd, using the specified request number.\n//\n// A few ioctl requests use the return value as an output parameter;\n// for those, IoctlRetInt should be used instead of this function.\nfunc IoctlGetInt(fd int, req int) (int, error) {\n\tvar value int\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn value, err\n}\n\nfunc IoctlGetWinsize(fd int, req int) (*Winsize, error) {\n\tvar value Winsize\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc IoctlGetTermios(fd int, req int) (*Termios, error) {\n\tvar value Termios\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ioctl_unsigned.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd\n\npackage unix\n\nimport \"unsafe\"\n\n// ioctl itself should not be exposed directly, but additional get/set\n// functions for specific types are permissible.\n\n// IoctlSetInt performs an ioctl operation which sets an integer value\n// on fd, using the specified request number.\nfunc IoctlSetInt(fd int, req uint, value int) error {\n\treturn ioctl(fd, req, uintptr(value))\n}\n\n// IoctlSetPointerInt performs an ioctl operation which sets an\n// integer value on fd, using the specified request number. The ioctl\n// argument is called with a pointer to the integer value, rather than\n// passing the integer value directly.\nfunc IoctlSetPointerInt(fd int, req uint, value int) error {\n\tv := int32(value)\n\treturn ioctlPtr(fd, req, unsafe.Pointer(&v))\n}\n\n// IoctlSetString performs an ioctl operation which sets a string value\n// on fd, using the specified request number.\nfunc IoctlSetString(fd int, req uint, value string) error {\n\tbs := append([]byte(value), 0)\n\treturn ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))\n}\n\n// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.\n//\n// To change fd's window size, the req argument should be TIOCSWINSZ.\nfunc IoctlSetWinsize(fd int, req uint, value *Winsize) error {\n\t// TODO: if we get the chance, remove the req parameter and\n\t// hardcode TIOCSWINSZ.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlSetTermios performs an ioctl on fd with a *Termios.\n//\n// The req value will usually be TCSETA or TIOCSETA.\nfunc IoctlSetTermios(fd int, req uint, value *Termios) error {\n\t// TODO: if we get the chance, remove the req parameter.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlGetInt performs an ioctl operation which gets an integer value\n// from fd, using the specified request number.\n//\n// A few ioctl requests use the return value as an output parameter;\n// for those, IoctlRetInt should be used instead of this function.\nfunc IoctlGetInt(fd int, req uint) (int, error) {\n\tvar value int\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn value, err\n}\n\nfunc IoctlGetWinsize(fd int, req uint) (*Winsize, error) {\n\tvar value Winsize\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc IoctlGetTermios(fd int, req uint) (*Termios, error) {\n\tvar value Termios\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ioctl_zos.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x\n\npackage unix\n\nimport (\n\t\"runtime\"\n\t\"unsafe\"\n)\n\n// ioctl itself should not be exposed directly, but additional get/set\n// functions for specific types are permissible.\n\n// IoctlSetInt performs an ioctl operation which sets an integer value\n// on fd, using the specified request number.\nfunc IoctlSetInt(fd int, req int, value int) error {\n\treturn ioctl(fd, req, uintptr(value))\n}\n\n// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.\n//\n// To change fd's window size, the req argument should be TIOCSWINSZ.\nfunc IoctlSetWinsize(fd int, req int, value *Winsize) error {\n\t// TODO: if we get the chance, remove the req parameter and\n\t// hardcode TIOCSWINSZ.\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\n// IoctlSetTermios performs an ioctl on fd with a *Termios.\n//\n// The req value is expected to be TCSETS, TCSETSW, or TCSETSF\nfunc IoctlSetTermios(fd int, req int, value *Termios) error {\n\tif (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {\n\t\treturn ENOSYS\n\t}\n\terr := Tcsetattr(fd, int(req), value)\n\truntime.KeepAlive(value)\n\treturn err\n}\n\n// IoctlGetInt performs an ioctl operation which gets an integer value\n// from fd, using the specified request number.\n//\n// A few ioctl requests use the return value as an output parameter;\n// for those, IoctlRetInt should be used instead of this function.\nfunc IoctlGetInt(fd int, req int) (int, error) {\n\tvar value int\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn value, err\n}\n\nfunc IoctlGetWinsize(fd int, req int) (*Winsize, error) {\n\tvar value Winsize\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n// IoctlGetTermios performs an ioctl on fd with a *Termios.\n//\n// The req value is expected to be TCGETS\nfunc IoctlGetTermios(fd int, req int) (*Termios, error) {\n\tvar value Termios\n\tif req != TCGETS {\n\t\treturn &value, ENOSYS\n\t}\n\terr := Tcgetattr(fd, &value)\n\treturn &value, err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/mkall.sh",
    "content": "#!/usr/bin/env bash\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# This script runs or (given -n) prints suggested commands to generate files for\n# the Architecture/OS specified by the GOARCH and GOOS environment variables.\n# See README.md for more information about how the build system works.\n\nGOOSARCH=\"${GOOS}_${GOARCH}\"\n\n# defaults\nmksyscall=\"go run mksyscall.go\"\nmkerrors=\"./mkerrors.sh\"\nzerrors=\"zerrors_$GOOSARCH.go\"\nmksysctl=\"\"\nzsysctl=\"zsysctl_$GOOSARCH.go\"\nmksysnum=\nmktypes=\nmkasm=\nrun=\"sh\"\ncmd=\"\"\n\ncase \"$1\" in\n-syscalls)\n\tfor i in zsyscall*go\n\tdo\n\t\t# Run the command line that appears in the first line\n\t\t# of the generated file to regenerate it.\n\t\tsed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i\n\t\trm _$i\n\tdone\n\texit 0\n\t;;\n-n)\n\trun=\"cat\"\n\tcmd=\"echo\"\n\tshift\nesac\n\ncase \"$#\" in\n0)\n\t;;\n*)\n\techo 'usage: mkall.sh [-n]' 1>&2\n\texit 2\nesac\n\nif [[ \"$GOOS\" = \"linux\" ]]; then\n\t# Use the Docker-based build system\n\t# Files generated through docker (use $cmd so you can Ctl-C the build or run)\n\tset -e\n\t$cmd docker build --tag generate:$GOOS $GOOS\n\t$cmd docker run --interactive --tty --volume $(cd -- \"$(dirname -- \"$0\")/..\" && pwd):/build generate:$GOOS\n\texit\nfi\n\nGOOSARCH_in=syscall_$GOOSARCH.go\ncase \"$GOOSARCH\" in\n_* | *_ | _)\n\techo 'undefined $GOOS_$GOARCH:' \"$GOOSARCH\" 1>&2\n\texit 1\n\t;;\naix_ppc)\n\tmkerrors=\"$mkerrors -maix32\"\n\tmksyscall=\"go run mksyscall_aix_ppc.go -aix\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\naix_ppc64)\n\tmkerrors=\"$mkerrors -maix64\"\n\tmksyscall=\"go run mksyscall_aix_ppc64.go -aix\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\ndarwin_amd64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\tmkasm=\"go run mkasm.go\"\n\t;;\ndarwin_arm64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\tmkasm=\"go run mkasm.go\"\n\t;;\ndragonfly_amd64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -dragonfly\"\n\tmksysnum=\"go run mksysnum.go 'https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nfreebsd_386)\n\tmkerrors=\"$mkerrors -m32\"\n\tmksyscall=\"go run mksyscall.go -l32\"\n\tmksysnum=\"go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nfreebsd_amd64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksysnum=\"go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nfreebsd_arm)\n\tmkerrors=\"$mkerrors\"\n\tmksyscall=\"go run mksyscall.go -l32 -arm\"\n\tmksysnum=\"go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nfreebsd_arm64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksysnum=\"go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nfreebsd_riscv64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksysnum=\"go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nnetbsd_386)\n\tmkerrors=\"$mkerrors -m32\"\n\tmksyscall=\"go run mksyscall.go -l32 -netbsd\"\n\tmksysnum=\"go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nnetbsd_amd64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -netbsd\"\n\tmksysnum=\"go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nnetbsd_arm)\n\tmkerrors=\"$mkerrors\"\n\tmksyscall=\"go run mksyscall.go -l32 -netbsd -arm\"\n\tmksysnum=\"go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nnetbsd_arm64)\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -netbsd\"\n\tmksysnum=\"go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nopenbsd_386)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m32\"\n\tmksyscall=\"go run mksyscall.go -l32 -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nopenbsd_amd64)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nopenbsd_arm)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors\"\n\tmksyscall=\"go run mksyscall.go -l32 -openbsd -arm -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nopenbsd_arm64)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nopenbsd_mips64)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nopenbsd_ppc64)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nopenbsd_riscv64)\n\tmkasm=\"go run mkasm.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksyscall=\"go run mksyscall.go -openbsd -libc\"\n\tmksysctl=\"go run mksysctl_openbsd.go\"\n\t# Let the type of C char be signed for making the bare syscall\n\t# API consistent across platforms.\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char\"\n\t;;\nsolaris_amd64)\n\tmksyscall=\"go run mksyscall_solaris.go\"\n\tmkerrors=\"$mkerrors -m64\"\n\tmksysnum=\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\nillumos_amd64)\n        mksyscall=\"go run mksyscall_solaris.go\"\n\tmkerrors=\n\tmksysnum=\n\tmktypes=\"GOARCH=$GOARCH go tool cgo -godefs\"\n\t;;\n*)\n\techo 'unrecognized $GOOS_$GOARCH: ' \"$GOOSARCH\" 1>&2\n\texit 1\n\t;;\nesac\n\n(\n\tif [ -n \"$mkerrors\" ]; then echo \"$mkerrors |gofmt >$zerrors\"; fi\n\tcase \"$GOOS\" in\n\t*)\n\t\tsyscall_goos=\"syscall_$GOOS.go\"\n\t\tcase \"$GOOS\" in\n\t\tdarwin | dragonfly | freebsd | netbsd | openbsd)\n\t\t\tsyscall_goos=\"syscall_bsd.go $syscall_goos\"\n\t\t\t;;\n\t\tesac\n\t\tif [ -n \"$mksyscall\" ]; then\n\t\t\tif [ \"$GOOSARCH\" == \"aix_ppc64\" ]; then\n\t\t\t\t# aix/ppc64 script generates files instead of writing to stdin.\n\t\t\t\techo \"$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_\"$GOOSARCH\"_gccgo.go && gofmt -w zsyscall_\"$GOOSARCH\"_gc.go \" ;\n\t\t\telif [ \"$GOOS\" == \"illumos\" ]; then\n\t\t\t        # illumos code generation requires a --illumos switch\n\t\t\t        echo \"$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go\";\n\t\t\t        # illumos implies solaris, so solaris code generation is also required\n\t\t\t\techo \"$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go\";\n\t\t\telse\n\t\t\t\techo \"$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go\";\n\t\t\tfi\n\t\tfi\n\tesac\n\tif [ -n \"$mksysctl\" ]; then echo \"$mksysctl |gofmt >$zsysctl\"; fi\n\tif [ -n \"$mksysnum\" ]; then echo \"$mksysnum |gofmt >zsysnum_$GOOSARCH.go\"; fi\n\tif [ -n \"$mktypes\" ]; then echo \"$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go\"; fi\n\tif [ -n \"$mkasm\" ]; then echo \"$mkasm $GOOS $GOARCH\"; fi\n) | $run\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/mkerrors.sh",
    "content": "#!/usr/bin/env bash\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\n# Generate Go code listing errors and other #defined constant\n# values (ENAMETOOLONG etc.), by asking the preprocessor\n# about the definitions.\n\nunset LANG\nexport LC_ALL=C\nexport LC_CTYPE=C\n\nif test -z \"$GOARCH\" -o -z \"$GOOS\"; then\n\techo 1>&2 \"GOARCH or GOOS not defined in environment\"\n\texit 1\nfi\n\n# Check that we are using the new build system if we should\nif [[ \"$GOOS\" = \"linux\" ]] && [[ \"$GOLANG_SYS_BUILD\" != \"docker\" ]]; then\n\techo 1>&2 \"In the Docker based build system, mkerrors should not be called directly.\"\n\techo 1>&2 \"See README.md\"\n\texit 1\nfi\n\nif [[ \"$GOOS\" = \"aix\" ]]; then\n\tCC=${CC:-gcc}\nelse\n\tCC=${CC:-cc}\nfi\n\nif [[ \"$GOOS\" = \"solaris\" ]]; then\n\t# Assumes GNU versions of utilities in PATH.\n\texport PATH=/usr/gnu/bin:$PATH\nfi\n\nuname=$(uname)\n\nincludes_AIX='\n#include <net/if.h>\n#include <net/netopt.h>\n#include <netinet/ip_mroute.h>\n#include <sys/protosw.h>\n#include <sys/stropts.h>\n#include <sys/mman.h>\n#include <sys/poll.h>\n#include <sys/select.h>\n#include <sys/termio.h>\n#include <termios.h>\n#include <fcntl.h>\n\n#define AF_LOCAL AF_UNIX\n'\n\nincludes_Darwin='\n#define _DARWIN_C_SOURCE\n#define KERNEL 1\n#define _DARWIN_USE_64_BIT_INODE\n#define __APPLE_USE_RFC_3542\n#include <stdint.h>\n#include <sys/stdio.h>\n#include <sys/attr.h>\n#include <sys/clonefile.h>\n#include <sys/kern_control.h>\n#include <sys/types.h>\n#include <sys/event.h>\n#include <sys/ptrace.h>\n#include <sys/select.h>\n#include <sys/socket.h>\n#include <sys/stat.h>\n#include <sys/un.h>\n#include <sys/sockio.h>\n#include <sys/sys_domain.h>\n#include <sys/sysctl.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/utsname.h>\n#include <sys/wait.h>\n#include <sys/xattr.h>\n#include <sys/vsock.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_types.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <termios.h>\n\n// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.\n#define TIOCREMOTE 0x80047469\n'\n\nincludes_DragonFly='\n#include <sys/types.h>\n#include <sys/event.h>\n#include <sys/select.h>\n#include <sys/socket.h>\n#include <sys/sockio.h>\n#include <sys/stat.h>\n#include <sys/sysctl.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/wait.h>\n#include <sys/ioctl.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_clone.h>\n#include <net/if_types.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <termios.h>\n#include <netinet/ip.h>\n#include <net/ip_mroute/ip_mroute.h>\n'\n\nincludes_FreeBSD='\n#include <sys/capsicum.h>\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/disk.h>\n#include <sys/event.h>\n#include <sys/sched.h>\n#include <sys/select.h>\n#include <sys/socket.h>\n#include <sys/un.h>\n#include <sys/sockio.h>\n#include <sys/stat.h>\n#include <sys/sysctl.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/wait.h>\n#include <sys/ioctl.h>\n#include <sys/ptrace.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_types.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <termios.h>\n#include <netinet/ip.h>\n#include <netinet/ip_mroute.h>\n#include <sys/extattr.h>\n\n#if __FreeBSD__ >= 10\n#define IFT_CARP\t0xf8\t// IFT_CARP is deprecated in FreeBSD 10\n#undef SIOCAIFADDR\n#define SIOCAIFADDR\t_IOW(105, 26, struct oifaliasreq)\t// ifaliasreq contains if_data\n#undef SIOCSIFPHYADDR\n#define SIOCSIFPHYADDR\t_IOW(105, 70, struct oifaliasreq)\t// ifaliasreq contains if_data\n#endif\n'\n\nincludes_Linux='\n#define _LARGEFILE_SOURCE\n#define _LARGEFILE64_SOURCE\n#ifndef __LP64__\n#define _FILE_OFFSET_BITS 64\n#endif\n#define _GNU_SOURCE\n\n// See the description in unix/linux/types.go\n#if defined(__ARM_EABI__) || \\\n\t(defined(__mips__) && (_MIPS_SIM == _ABIO32)) || \\\n\t(defined(__powerpc__) && (!defined(__powerpc64__)))\n# ifdef   _TIME_BITS\n#  undef  _TIME_BITS\n# endif\n# define  _TIME_BITS 32\n#endif\n\n// <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of\n// these structures. We just include them copied from <bits/termios.h>.\n#if defined(__powerpc__)\nstruct sgttyb {\n        char    sg_ispeed;\n        char    sg_ospeed;\n        char    sg_erase;\n        char    sg_kill;\n        short   sg_flags;\n};\n\nstruct tchars {\n        char    t_intrc;\n        char    t_quitc;\n        char    t_startc;\n        char    t_stopc;\n        char    t_eofc;\n        char    t_brkc;\n};\n\nstruct ltchars {\n        char    t_suspc;\n        char    t_dsuspc;\n        char    t_rprntc;\n        char    t_flushc;\n        char    t_werasc;\n        char    t_lnextc;\n};\n#endif\n\n#include <bits/sockaddr.h>\n#include <sys/epoll.h>\n#include <sys/eventfd.h>\n#include <sys/inotify.h>\n#include <sys/ioctl.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/prctl.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <sys/time.h>\n#include <sys/select.h>\n#include <sys/signalfd.h>\n#include <sys/socket.h>\n#include <sys/timerfd.h>\n#include <sys/uio.h>\n#include <sys/xattr.h>\n#include <netinet/udp.h>\n#include <linux/audit.h>\n#include <linux/bpf.h>\n#include <linux/can.h>\n#include <linux/can/error.h>\n#include <linux/can/netlink.h>\n#include <linux/can/raw.h>\n#include <linux/capability.h>\n#include <linux/cryptouser.h>\n#include <linux/devlink.h>\n#include <linux/dm-ioctl.h>\n#include <linux/elf.h>\n#include <linux/errqueue.h>\n#include <linux/ethtool_netlink.h>\n#include <linux/falloc.h>\n#include <linux/fanotify.h>\n#include <linux/fib_rules.h>\n#include <linux/filter.h>\n#include <linux/fs.h>\n#include <linux/fscrypt.h>\n#include <linux/fsverity.h>\n#include <linux/genetlink.h>\n#include <linux/hdreg.h>\n#include <linux/hidraw.h>\n#include <linux/if.h>\n#include <linux/if_addr.h>\n#include <linux/if_alg.h>\n#include <linux/if_arp.h>\n#include <linux/if_ether.h>\n#include <linux/if_ppp.h>\n#include <linux/if_tun.h>\n#include <linux/if_packet.h>\n#include <linux/if_xdp.h>\n#include <linux/input.h>\n#include <linux/kcm.h>\n#include <linux/kexec.h>\n#include <linux/keyctl.h>\n#include <linux/landlock.h>\n#include <linux/loop.h>\n#include <linux/lwtunnel.h>\n#include <linux/magic.h>\n#include <linux/mei.h>\n#include <linux/memfd.h>\n#include <linux/module.h>\n#include <linux/mount.h>\n#include <linux/netfilter/nfnetlink.h>\n#include <linux/netfilter/nf_tables.h>\n#include <linux/netlink.h>\n#include <linux/net_namespace.h>\n#include <linux/nfc.h>\n#include <linux/nsfs.h>\n#include <linux/perf_event.h>\n#include <linux/pps.h>\n#include <linux/ptp_clock.h>\n#include <linux/ptrace.h>\n#include <linux/random.h>\n#include <linux/reboot.h>\n#include <linux/rtc.h>\n#include <linux/rtnetlink.h>\n#include <linux/sched.h>\n#include <linux/seccomp.h>\n#include <linux/serial.h>\n#include <linux/sock_diag.h>\n#include <linux/sockios.h>\n#include <linux/taskstats.h>\n#include <linux/tipc.h>\n#include <linux/vm_sockets.h>\n#include <linux/wait.h>\n#include <linux/watchdog.h>\n#include <linux/wireguard.h>\n\n#include <mtd/ubi-user.h>\n#include <mtd/mtd-user.h>\n#include <net/route.h>\n\n#if defined(__sparc__)\n// On sparc{,64}, the kernel defines struct termios2 itself which clashes with the\n// definition in glibc. As only the error constants are needed here, include the\n// generic termibits.h (which is included by termbits.h on sparc).\n#include <asm-generic/termbits.h>\n#else\n#include <asm/termbits.h>\n#endif\n\n#ifndef PTRACE_GETREGS\n#define PTRACE_GETREGS\t0xc\n#endif\n\n#ifndef PTRACE_SETREGS\n#define PTRACE_SETREGS\t0xd\n#endif\n\n#ifdef SOL_BLUETOOTH\n// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h\n// but it is already in bluetooth_linux.go\n#undef SOL_BLUETOOTH\n#endif\n\n// Certain constants are missing from the fs/crypto UAPI\n#define FS_KEY_DESC_PREFIX              \"fscrypt:\"\n#define FS_KEY_DESC_PREFIX_SIZE         8\n#define FS_MAX_KEY_SIZE                 64\n\n// The code generator produces -0x1 for (~0), but an unsigned value is necessary\n// for the tipc_subscr timeout __u32 field.\n#undef TIPC_WAIT_FOREVER\n#define TIPC_WAIT_FOREVER 0xffffffff\n\n// Copied from linux/netfilter/nf_nat.h\n// Including linux/netfilter/nf_nat.h here causes conflicts between linux/in.h\n// and netinet/in.h.\n#define NF_NAT_RANGE_MAP_IPS\t\t\t(1 << 0)\n#define NF_NAT_RANGE_PROTO_SPECIFIED\t\t(1 << 1)\n#define NF_NAT_RANGE_PROTO_RANDOM\t\t(1 << 2)\n#define NF_NAT_RANGE_PERSISTENT\t\t\t(1 << 3)\n#define NF_NAT_RANGE_PROTO_RANDOM_FULLY\t\t(1 << 4)\n#define NF_NAT_RANGE_PROTO_OFFSET\t\t(1 << 5)\n#define NF_NAT_RANGE_NETMAP\t\t\t(1 << 6)\n#define NF_NAT_RANGE_PROTO_RANDOM_ALL\t\t\\\n\t(NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)\n#define NF_NAT_RANGE_MASK\t\t\t\t\t\\\n\t(NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED |\t\\\n\t NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT |\t\\\n\t NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \\\n\t NF_NAT_RANGE_NETMAP)\n\n// Copied from linux/hid.h.\n// Keep in sync with the size of the referenced fields.\n#define _HIDIOCGRAWNAME_LEN\t128 // sizeof_field(struct hid_device, name)\n#define _HIDIOCGRAWPHYS_LEN\t64  // sizeof_field(struct hid_device, phys)\n#define _HIDIOCGRAWUNIQ_LEN\t64  // sizeof_field(struct hid_device, uniq)\n\n#define _HIDIOCGRAWNAME\t\tHIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN)\n#define _HIDIOCGRAWPHYS\t\tHIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)\n#define _HIDIOCGRAWUNIQ\t\tHIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)\n\n// Renamed in v6.16, commit c6d732c38f93 (\"net: ethtool: remove duplicate defines for family info\")\n#define ETHTOOL_FAMILY_NAME\tETHTOOL_GENL_NAME\n#define ETHTOOL_FAMILY_VERSION\tETHTOOL_GENL_VERSION\n'\n\nincludes_NetBSD='\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/event.h>\n#include <sys/extattr.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/sched.h>\n#include <sys/select.h>\n#include <sys/socket.h>\n#include <sys/sockio.h>\n#include <sys/sysctl.h>\n#include <sys/termios.h>\n#include <sys/ttycom.h>\n#include <sys/wait.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_types.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <netinet/in_systm.h>\n#include <netinet/ip.h>\n#include <netinet/ip_mroute.h>\n#include <netinet/if_ether.h>\n\n// Needed since <sys/param.h> refers to it...\n#define schedppq 1\n'\n\nincludes_OpenBSD='\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/event.h>\n#include <sys/mman.h>\n#include <sys/mount.h>\n#include <sys/select.h>\n#include <sys/sched.h>\n#include <sys/socket.h>\n#include <sys/sockio.h>\n#include <sys/stat.h>\n#include <sys/sysctl.h>\n#include <sys/termios.h>\n#include <sys/ttycom.h>\n#include <sys/unistd.h>\n#include <sys/wait.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_types.h>\n#include <net/if_var.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <netinet/in_systm.h>\n#include <netinet/ip.h>\n#include <netinet/ip_mroute.h>\n#include <netinet/if_ether.h>\n#include <net/if_bridge.h>\n\n// We keep some constants not supported in OpenBSD 5.5 and beyond for\n// the promise of compatibility.\n#define EMUL_ENABLED\t\t0x1\n#define EMUL_NATIVE\t\t0x2\n#define IPV6_FAITH\t\t0x1d\n#define IPV6_OPTIONS\t\t0x1\n#define IPV6_RTHDR_STRICT\t0x1\n#define IPV6_SOCKOPT_RESERVED1\t0x3\n#define SIOCGIFGENERIC\t\t0xc020693a\n#define SIOCSIFGENERIC\t\t0x80206939\n#define WALTSIG\t\t\t0x4\n'\n\nincludes_SunOS='\n#include <limits.h>\n#include <sys/types.h>\n#include <sys/select.h>\n#include <sys/socket.h>\n#include <sys/sockio.h>\n#include <sys/stat.h>\n#include <sys/stream.h>\n#include <sys/mman.h>\n#include <sys/wait.h>\n#include <sys/ioctl.h>\n#include <sys/mkdev.h>\n#include <net/bpf.h>\n#include <net/if.h>\n#include <net/if_arp.h>\n#include <net/if_types.h>\n#include <net/route.h>\n#include <netinet/icmp6.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <netinet/ip_mroute.h>\n#include <termios.h>\n'\n\n\nincludes='\n#include <sys/types.h>\n#include <sys/file.h>\n#include <fcntl.h>\n#include <dirent.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <netinet/ip6.h>\n#include <netinet/tcp.h>\n#include <errno.h>\n#include <sys/signal.h>\n#include <signal.h>\n#include <sys/resource.h>\n#include <time.h>\n'\nccflags=\"$@\"\n\n# Write go tool cgo -godefs input.\n(\n\techo package unix\n\techo\n\techo '/*'\n\tindirect=\"includes_$(uname)\"\n\techo \"${!indirect} $includes\"\n\techo '*/'\n\techo 'import \"C\"'\n\techo 'import \"syscall\"'\n\techo\n\techo 'const ('\n\n\t# The gcc command line prints all the #defines\n\t# it encounters while processing the input\n\techo \"${!indirect} $includes\" | $CC -x c - -E -dM $ccflags |\n\tawk '\n\t\t$1 != \"#define\" || $2 ~ /\\(/ || $3 == \"\" {next}\n\n\t\t$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next}  # 386 registers\n\t\t$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}\n\t\t$2 ~ /^(SCM_SRCRT)$/ {next}\n\t\t$2 ~ /^(MAP_FAILED)$/ {next}\n\t\t$2 ~ /^ELF_.*$/ {next}# <asm/elf.h> contains ELF_ARCH, etc.\n\n\t\t$2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||\n\t\t$2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}\n\n\t\t$2 !~ /^ECCAPBITS/ &&\n\t\t$2 !~ /^ETH_/ &&\n\t\t$2 !~ /^EPROC_/ &&\n\t\t$2 !~ /^EQUIV_/ &&\n\t\t$2 !~ /^EXPR_/ &&\n\t\t$2 !~ /^EVIOC/ &&\n\t\t$2 ~ /^E[A-Z0-9_]+$/ ||\n\t\t$2 ~ /^B[0-9_]+$/ ||\n\t\t$2 ~ /^(OLD|NEW)DEV$/ ||\n\t\t$2 == \"BOTHER\" ||\n\t\t$2 ~ /^CI?BAUD(EX)?$/ ||\n\t\t$2 == \"IBSHIFT\" ||\n\t\t$2 ~ /^V[A-Z0-9]+$/ ||\n\t\t$2 ~ /^CS[A-Z0-9]/ ||\n\t\t$2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||\n\t\t$2 ~ /^IGN/ ||\n\t\t$2 ~ /^IX(ON|ANY|OFF)$/ ||\n\t\t$2 ~ /^IN(LCR|PCK)$/ ||\n\t\t$2 !~ \"X86_CR3_PCID_NOFLUSH\" &&\n\t\t$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||\n\t\t$2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||\n\t\t$2 == \"BRKINT\" ||\n\t\t$2 == \"HUPCL\" ||\n\t\t$2 == \"PENDIN\" ||\n\t\t$2 == \"TOSTOP\" ||\n\t\t$2 == \"XCASE\" ||\n\t\t$2 == \"ALTWERASE\" ||\n\t\t$2 == \"NOKERNINFO\" ||\n\t\t$2 == \"NFDBITS\" ||\n\t\t$2 ~ /^PAR/ ||\n\t\t$2 ~ /^SIG[^_]/ ||\n\t\t$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||\n\t\t$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||\n\t\t$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||\n\t\t$2 ~ /^(DT|EI|ELF|EV|NN|NT|PF|SHF|SHN|SHT|STB|STT|VER)_/ ||\n\t\t$2 ~ /^O?XTABS$/ ||\n\t\t$2 ~ /^TC[IO](ON|OFF)$/ ||\n\t\t$2 ~ /^IN_/ ||\n\t\t$2 ~ /^KCM/ ||\n\t\t$2 ~ /^LANDLOCK_/ ||\n\t\t$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||\n\t\t$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||\n\t\t$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||\n\t\t$2 == \"LOOP_CONFIGURE\" ||\n\t\t$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||\n\t\t$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||\n\t\t$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||\n\t\t$2 ~ /^PTP_/ ||\n\t\t$2 ~ /^RAW_PAYLOAD_/ ||\n\t\t$2 ~ /^[US]F_/ ||\n\t\t$2 ~ /^TP_STATUS_/ ||\n\t\t$2 ~ /^FALLOC_/ ||\n\t\t$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||\n\t\t$2 == \"SOMAXCONN\" ||\n\t\t$2 == \"NAME_MAX\" ||\n\t\t$2 == \"IFNAMSIZ\" ||\n\t\t$2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ ||\n\t\t$2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||\n\t\t$2 ~ /^HW_MACHINE$/ ||\n\t\t$2 ~ /^SYSCTL_VERS/ ||\n\t\t$2 !~ \"MNT_BITS\" &&\n\t\t$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||\n\t\t$2 ~ /^NS_GET_/ ||\n\t\t$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||\n\t\t$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||\n\t\t$2 ~ /^KEXEC_/ ||\n\t\t$2 ~ /^LINUX_REBOOT_CMD_/ ||\n\t\t$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||\n\t\t$2 ~ /^MODULE_INIT_/ ||\n\t\t$2 !~ \"NLA_TYPE_MASK\" &&\n\t\t$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&\n\t\t$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||\n\t\t$2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ ||\n\t\t$2 ~ /^(CONNECT|SAE)_/ ||\n\t\t$2 ~ /^FIORDCHK$/ ||\n\t\t$2 ~ /^SIOC/ ||\n\t\t$2 ~ /^TIOC/ ||\n\t\t$2 ~ /^TCGET/ ||\n\t\t$2 ~ /^TCSET/ ||\n\t\t$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||\n\t\t$2 !~ \"RTF_BITS\" &&\n\t\t$2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ ||\n\t\t$2 ~ /^BIOC/ ||\n\t\t$2 ~ /^DIOC/ ||\n\t\t$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||\n\t\t$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||\n\t\t$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||\n\t\t$2 ~ /^CLONE_[A-Z_]+/ ||\n\t\t$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+|BPF_F_LINK)$/ &&\n\t\t$2 ~ /^(BPF|DLT)_/ ||\n\t\t$2 ~ /^AUDIT_/ ||\n\t\t$2 ~ /^(CLOCK|TIMER)_/ ||\n\t\t$2 ~ /^CAN_/ ||\n\t\t$2 ~ /^CAP_/ ||\n\t\t$2 ~ /^CP_/ ||\n\t\t$2 ~ /^CPUSTATES$/ ||\n\t\t$2 ~ /^CTLIOCGINFO$/ ||\n\t\t$2 ~ /^ALG_/ ||\n\t\t$2 ~ /^FI(CLONE|DEDUPERANGE)/ ||\n\t\t$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||\n\t\t$2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ ||\n\t\t$2 ~ /^FS_VERITY_/ ||\n\t\t$2 ~ /^FSCRYPT_/ ||\n\t\t$2 ~ /^DM_/ ||\n\t\t$2 ~ /^GRND_/ ||\n\t\t$2 ~ /^RND/ ||\n\t\t$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||\n\t\t$2 ~ /^KEYCTL_/ ||\n\t\t$2 ~ /^PERF_/ ||\n\t\t$2 ~ /^SECCOMP_/ ||\n\t\t$2 ~ /^SEEK_/ ||\n\t\t$2 ~ /^SCHED_/ ||\n\t\t$2 ~ /^SPLICE_/ ||\n\t\t$2 ~ /^SYNC_FILE_RANGE_/ ||\n\t\t$2 !~ /IOC_MAGIC/ &&\n\t\t$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||\n\t\t$2 ~ /^(VM|VMADDR)_/ ||\n\t\t$2 ~ /^(IOCTL_VM_SOCKETS_|IOCTL_MEI_)/ ||\n\t\t$2 ~ /^(TASKSTATS|TS)_/ ||\n\t\t$2 ~ /^CGROUPSTATS_/ ||\n\t\t$2 ~ /^GENL_/ ||\n\t\t$2 ~ /^STATX_/ ||\n\t\t$2 ~ /^RENAME/ ||\n\t\t$2 ~ /^UBI_IOC[A-Z]/ ||\n\t\t$2 ~ /^UTIME_/ ||\n\t\t$2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ ||\n\t\t$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||\n\t\t$2 ~ /^FSOPT_/ ||\n\t\t$2 ~ /^WDIO[CFS]_/ ||\n\t\t$2 ~ /^NFN/ ||\n\t\t$2 !~ /^NFT_META_IIFTYPE/ &&\n\t\t$2 ~ /^NFT_/ ||\n\t\t$2 ~ /^NF_NAT_/ ||\n\t\t$2 ~ /^XDP_/ ||\n\t\t$2 ~ /^RWF_/ ||\n\t\t$2 ~ /^(HDIO|WIN|SMART)_/ ||\n\t\t$2 ~ /^CRYPTO_/ ||\n\t\t$2 ~ /^TIPC_/ ||\n\t\t$2 !~  \"DEVLINK_RELOAD_LIMITS_VALID_MASK\" &&\n\t\t$2 ~ /^DEVLINK_/ ||\n\t\t$2 ~ /^ETHTOOL_/ ||\n\t\t$2 ~ /^LWTUNNEL_IP/ ||\n\t\t$2 ~ /^ITIMER_/ ||\n\t\t$2 !~ \"WMESGLEN\" &&\n\t\t$2 ~ /^W[A-Z0-9]+$/ ||\n\t\t$2 ~ /^P_/ ||\n\t\t$2 ~/^PPPIOC/ ||\n\t\t$2 ~ /^FAN_|FANOTIFY_/ ||\n\t\t$2 == \"HID_MAX_DESCRIPTOR_SIZE\" ||\n\t\t$2 ~ /^_?HIDIOC/ ||\n\t\t$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||\n\t\t$2 ~ /^MTD/ ||\n\t\t$2 ~ /^OTP/ ||\n\t\t$2 ~ /^MEM/ ||\n\t\t$2 ~ /^WG/ ||\n\t\t$2 ~ /^FIB_RULE_/ ||\n\t\t$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE|IOMIN$|IOOPT$|ALIGNOFF$|DISCARD|ROTATIONAL$|ZEROOUT$|GETDISKSEQ$)/ {printf(\"\\t%s = C.%s\\n\", $2, $2)}\n\t\t$2 ~ /^__WCOREFLAG$/ {next}\n\t\t$2 ~ /^__W[A-Z0-9]+$/ {printf(\"\\t%s = C.%s\\n\", substr($2,3), $2)}\n\n\t\t{next}\n\t' | sort\n\n\techo ')'\n) >_const.go\n\n# Pull out the error names for later.\nerrors=$(\n\techo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |\n\tsort\n)\n\n# Pull out the signal names for later.\nsignals=$(\n\techo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |\n\tgrep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |\n\tsort\n)\n\n# Again, writing regexps to a file.\necho '#include <errno.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^E[A-Z0-9_]+$/ { print \"^\\t\" $2 \"[ \\t]*=\" }' |\n\tsort >_error.grep\necho '#include <signal.h>' | $CC -x c - -E -dM $ccflags |\n\tawk '$1==\"#define\" && $2 ~ /^SIG[A-Z0-9]+$/ { print \"^\\t\" $2 \"[ \\t]*=\" }' |\n\tgrep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |\n\tsort >_signal.grep\n\necho '// mkerrors.sh' \"$@\"\necho '// Code generated by the command above; see README.md. DO NOT EDIT.'\necho\necho \"//go:build ${GOARCH} && ${GOOS}\"\necho\ngo tool cgo -godefs -- \"$@\" _const.go >_error.out\ncat _error.out | grep -vf _error.grep | grep -vf _signal.grep\necho\necho '// Errors'\necho 'const ('\ncat _error.out | grep -f _error.grep | sed 's/=\\(.*\\)/= syscall.Errno(\\1)/'\necho ')'\n\necho\necho '// Signals'\necho 'const ('\ncat _error.out | grep -f _signal.grep | sed 's/=\\(.*\\)/= syscall.Signal(\\1)/'\necho ')'\n\n# Run C program to print error and syscall strings.\n(\n\techo -E \"\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <ctype.h>\n#include <string.h>\n#include <signal.h>\n\n#define nelem(x) (sizeof(x)/sizeof((x)[0]))\n\nenum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below\n\nstruct tuple {\n\tint num;\n\tconst char *name;\n};\n\nstruct tuple errors[] = {\n\"\n\tfor i in $errors\n\tdo\n\t\techo -E '\t{'$i', \"'$i'\" },'\n\tdone\n\n\techo -E \"\n};\n\nstruct tuple signals[] = {\n\"\n\tfor i in $signals\n\tdo\n\t\techo -E '\t{'$i', \"'$i'\" },'\n\tdone\n\n\t# Use -E because on some systems bash builtin interprets \\n itself.\n\techo -E '\n};\n\nstatic int\ntuplecmp(const void *a, const void *b)\n{\n\treturn ((struct tuple *)a)->num - ((struct tuple *)b)->num;\n}\n\nint\nmain(void)\n{\n\tint i, e;\n\tchar buf[1024], *p;\n\n\tprintf(\"\\n\\n// Error table\\n\");\n\tprintf(\"var errorList = [...]struct {\\n\");\n\tprintf(\"\\tnum  syscall.Errno\\n\");\n\tprintf(\"\\tname string\\n\");\n\tprintf(\"\\tdesc string\\n\");\n\tprintf(\"} {\\n\");\n\tqsort(errors, nelem(errors), sizeof errors[0], tuplecmp);\n\tfor(i=0; i<nelem(errors); i++) {\n\t\te = errors[i].num;\n\t\tif(i > 0 && errors[i-1].num == e)\n\t\t\tcontinue;\n\t\tstrncpy(buf, strerror(e), sizeof(buf) - 1);\n\t\tbuf[sizeof(buf) - 1] = '\\0';\n\t\t// lowercase first letter: Bad -> bad, but STREAM -> STREAM.\n\t\tif(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)\n\t\t\tbuf[0] += a - A;\n\t\tprintf(\"\\t{ %d, \\\"%s\\\", \\\"%s\\\" },\\n\", e, errors[i].name, buf);\n\t}\n\tprintf(\"}\\n\\n\");\n\n\tprintf(\"\\n\\n// Signal table\\n\");\n\tprintf(\"var signalList = [...]struct {\\n\");\n\tprintf(\"\\tnum  syscall.Signal\\n\");\n\tprintf(\"\\tname string\\n\");\n\tprintf(\"\\tdesc string\\n\");\n\tprintf(\"} {\\n\");\n\tqsort(signals, nelem(signals), sizeof signals[0], tuplecmp);\n\tfor(i=0; i<nelem(signals); i++) {\n\t\te = signals[i].num;\n\t\tif(i > 0 && signals[i-1].num == e)\n\t\t\tcontinue;\n\t\tstrncpy(buf, strsignal(e), sizeof(buf) - 1);\n\t\tbuf[sizeof(buf) - 1] = '\\0';\n\t\t// lowercase first letter: Bad -> bad, but STREAM -> STREAM.\n\t\tif(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)\n\t\t\tbuf[0] += a - A;\n\t\t// cut trailing : number.\n\t\tp = strrchr(buf, \":\"[0]);\n\t\tif(p)\n\t\t\t*p = '\\0';\n\t\tprintf(\"\\t{ %d, \\\"%s\\\", \\\"%s\\\" },\\n\", e, signals[i].name, buf);\n\t}\n\tprintf(\"}\\n\\n\");\n\n\treturn 0;\n}\n\n'\n) >_errors.c\n\n$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/mmap_nomremap.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos\n\npackage unix\n\nvar mapper = &mmapper{\n\tactive: make(map[*byte][]byte),\n\tmmap:   mmap,\n\tmunmap: munmap,\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/mremap.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux || netbsd\n\npackage unix\n\nimport \"unsafe\"\n\ntype mremapMmapper struct {\n\tmmapper\n\tmremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)\n}\n\nvar mapper = &mremapMmapper{\n\tmmapper: mmapper{\n\t\tactive: make(map[*byte][]byte),\n\t\tmmap:   mmap,\n\t\tmunmap: munmap,\n\t},\n\tmremap: mremap,\n}\n\nfunc (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {\n\tif newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&mremapFixed != 0 {\n\t\treturn nil, EINVAL\n\t}\n\n\tpOld := &oldData[cap(oldData)-1]\n\tm.Lock()\n\tdefer m.Unlock()\n\tbOld := m.active[pOld]\n\tif bOld == nil || &bOld[0] != &oldData[0] {\n\t\treturn nil, EINVAL\n\t}\n\tnewAddr, errno := m.mremap(uintptr(unsafe.Pointer(&bOld[0])), uintptr(len(bOld)), uintptr(newLength), flags, 0)\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\tbNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength)\n\tpNew := &bNew[cap(bNew)-1]\n\tif flags&mremapDontunmap == 0 {\n\t\tdelete(m.active, pOld)\n\t}\n\tm.active[pNew] = bNew\n\treturn bNew, nil\n}\n\nfunc Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {\n\treturn mapper.Mremap(oldData, newLength, flags)\n}\n\nfunc MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {\n\txaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))\n\treturn unsafe.Pointer(xaddr), err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/pagesize_unix.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\n// For Unix, get the pagesize from the runtime.\n\npackage unix\n\nimport \"syscall\"\n\nfunc Getpagesize() int {\n\treturn syscall.Getpagesize()\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/pledge_openbsd.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n)\n\n// Pledge implements the pledge syscall.\n//\n// This changes both the promises and execpromises; use PledgePromises or\n// PledgeExecpromises to only change the promises or execpromises\n// respectively.\n//\n// For more information see pledge(2).\nfunc Pledge(promises, execpromises string) error {\n\tif err := pledgeAvailable(); err != nil {\n\t\treturn err\n\t}\n\n\tpptr, err := BytePtrFromString(promises)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\texptr, err := BytePtrFromString(execpromises)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn pledge(pptr, exptr)\n}\n\n// PledgePromises implements the pledge syscall.\n//\n// This changes the promises and leaves the execpromises untouched.\n//\n// For more information see pledge(2).\nfunc PledgePromises(promises string) error {\n\tif err := pledgeAvailable(); err != nil {\n\t\treturn err\n\t}\n\n\tpptr, err := BytePtrFromString(promises)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn pledge(pptr, nil)\n}\n\n// PledgeExecpromises implements the pledge syscall.\n//\n// This changes the execpromises and leaves the promises untouched.\n//\n// For more information see pledge(2).\nfunc PledgeExecpromises(execpromises string) error {\n\tif err := pledgeAvailable(); err != nil {\n\t\treturn err\n\t}\n\n\texptr, err := BytePtrFromString(execpromises)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn pledge(nil, exptr)\n}\n\n// majmin returns major and minor version number for an OpenBSD system.\nfunc majmin() (major int, minor int, err error) {\n\tvar v Utsname\n\terr = Uname(&v)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tmajor, err = strconv.Atoi(string(v.Release[0]))\n\tif err != nil {\n\t\terr = errors.New(\"cannot parse major version number returned by uname\")\n\t\treturn\n\t}\n\n\tminor, err = strconv.Atoi(string(v.Release[2]))\n\tif err != nil {\n\t\terr = errors.New(\"cannot parse minor version number returned by uname\")\n\t\treturn\n\t}\n\n\treturn\n}\n\n// pledgeAvailable checks for availability of the pledge(2) syscall\n// based on the running OpenBSD version.\nfunc pledgeAvailable() error {\n\tmaj, min, err := majmin()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Require OpenBSD 6.4 as a minimum.\n\tif maj < 6 || (maj == 6 && min <= 3) {\n\t\treturn fmt.Errorf(\"cannot call Pledge on OpenBSD %d.%d\", maj, min)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ptrace_darwin.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin && !ios\n\npackage unix\n\nfunc ptrace(request int, pid int, addr uintptr, data uintptr) error {\n\treturn ptrace1(request, pid, addr, data)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ptrace_ios.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build ios\n\npackage unix\n\nfunc ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {\n\treturn ENOTSUP\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/race.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin && race) || (linux && race) || (freebsd && race)\n\npackage unix\n\nimport (\n\t\"runtime\"\n\t\"unsafe\"\n)\n\nconst raceenabled = true\n\nfunc raceAcquire(addr unsafe.Pointer) {\n\truntime.RaceAcquire(addr)\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n\truntime.RaceReleaseMerge(addr)\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n\truntime.RaceReadRange(addr, len)\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n\truntime.RaceWriteRange(addr, len)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/race0.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\nconst raceenabled = false\n\nfunc raceAcquire(addr unsafe.Pointer) {\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/readdirent_getdents.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd\n\npackage unix\n\n// ReadDirent reads directory entries from fd and writes them into buf.\nfunc ReadDirent(fd int, buf []byte) (n int, err error) {\n\treturn Getdents(fd, buf)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/readdirent_getdirentries.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin || zos\n\npackage unix\n\nimport \"unsafe\"\n\n// ReadDirent reads directory entries from fd and writes them into buf.\nfunc ReadDirent(fd int, buf []byte) (n int, err error) {\n\t// Final argument is (basep *uintptr) and the syscall doesn't take nil.\n\t// 64 bits should be enough. (32 bits isn't even on 386). Since the\n\t// actual system call is getdirentries64, 64 is a good guess.\n\t// TODO(rsc): Can we use a single global basep for all calls?\n\tvar base = (*uintptr)(unsafe.Pointer(new(uint64)))\n\treturn Getdirentries(fd, buf, base)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\n// Round the length of a raw sockaddr up to align it properly.\nfunc cmsgAlignOf(salen int) int {\n\tsalign := SizeofPtr\n\tif SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {\n\t\t// 64-bit Dragonfly before the September 2019 ABI changes still requires\n\t\t// 32-bit aligned access to network subsystem.\n\t\tsalign = 4\n\t}\n\treturn (salen + salign - 1) & ^(salign - 1)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sockcmsg_linux.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Socket control messages\n\npackage unix\n\nimport \"unsafe\"\n\n// UnixCredentials encodes credentials into a socket control message\n// for sending to another process. This can be used for\n// authentication.\nfunc UnixCredentials(ucred *Ucred) []byte {\n\tb := make([]byte, CmsgSpace(SizeofUcred))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_SOCKET\n\th.Type = SCM_CREDENTIALS\n\th.SetLen(CmsgLen(SizeofUcred))\n\t*(*Ucred)(h.data(0)) = *ucred\n\treturn b\n}\n\n// ParseUnixCredentials decodes a socket control message that contains\n// credentials in a Ucred structure. To receive such a message, the\n// SO_PASSCRED option must be enabled on the socket.\nfunc ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {\n\tif m.Header.Level != SOL_SOCKET {\n\t\treturn nil, EINVAL\n\t}\n\tif m.Header.Type != SCM_CREDENTIALS {\n\t\treturn nil, EINVAL\n\t}\n\tucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))\n\treturn &ucred, nil\n}\n\n// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.\nfunc PktInfo4(info *Inet4Pktinfo) []byte {\n\tb := make([]byte, CmsgSpace(SizeofInet4Pktinfo))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_IP\n\th.Type = IP_PKTINFO\n\th.SetLen(CmsgLen(SizeofInet4Pktinfo))\n\t*(*Inet4Pktinfo)(h.data(0)) = *info\n\treturn b\n}\n\n// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.\nfunc PktInfo6(info *Inet6Pktinfo) []byte {\n\tb := make([]byte, CmsgSpace(SizeofInet6Pktinfo))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_IPV6\n\th.Type = IPV6_PKTINFO\n\th.SetLen(CmsgLen(SizeofInet6Pktinfo))\n\t*(*Inet6Pktinfo)(h.data(0)) = *info\n\treturn b\n}\n\n// ParseOrigDstAddr decodes a socket control message containing the original\n// destination address. To receive such a message the IP_RECVORIGDSTADDR or\n// IPV6_RECVORIGDSTADDR option must be enabled on the socket.\nfunc ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {\n\tswitch {\n\tcase m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tdefault:\n\t\treturn nil, EINVAL\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sockcmsg_unix.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\n// Socket control messages\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n// CmsgLen returns the value to store in the Len field of the Cmsghdr\n// structure, taking into account any necessary alignment.\nfunc CmsgLen(datalen int) int {\n\treturn cmsgAlignOf(SizeofCmsghdr) + datalen\n}\n\n// CmsgSpace returns the number of bytes an ancillary element with\n// payload of the passed data length occupies.\nfunc CmsgSpace(datalen int) int {\n\treturn cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)\n}\n\nfunc (h *Cmsghdr) data(offset uintptr) unsafe.Pointer {\n\treturn unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)) + offset)\n}\n\n// SocketControlMessage represents a socket control message.\ntype SocketControlMessage struct {\n\tHeader Cmsghdr\n\tData   []byte\n}\n\n// ParseSocketControlMessage parses b as an array of socket control\n// messages.\nfunc ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {\n\tvar msgs []SocketControlMessage\n\ti := 0\n\tfor i+CmsgLen(0) <= len(b) {\n\t\th, dbuf, err := socketControlMessageHeaderAndData(b[i:])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tm := SocketControlMessage{Header: *h, Data: dbuf}\n\t\tmsgs = append(msgs, m)\n\t\ti += cmsgAlignOf(int(h.Len))\n\t}\n\treturn msgs, nil\n}\n\n// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,\n// message data (a slice of b), and the remainder of b after that single message.\n// When there are no remaining messages, len(remainder) == 0.\nfunc ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {\n\th, dbuf, err := socketControlMessageHeaderAndData(b)\n\tif err != nil {\n\t\treturn Cmsghdr{}, nil, nil, err\n\t}\n\tif i := cmsgAlignOf(int(h.Len)); i < len(b) {\n\t\tremainder = b[i:]\n\t}\n\treturn *h, dbuf, remainder, nil\n}\n\nfunc socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\tif h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {\n\t\treturn nil, nil, EINVAL\n\t}\n\treturn h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil\n}\n\n// UnixRights encodes a set of open file descriptors into a socket\n// control message for sending to another process.\nfunc UnixRights(fds ...int) []byte {\n\tdatalen := len(fds) * 4\n\tb := make([]byte, CmsgSpace(datalen))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_SOCKET\n\th.Type = SCM_RIGHTS\n\th.SetLen(CmsgLen(datalen))\n\tfor i, fd := range fds {\n\t\t*(*int32)(h.data(4 * uintptr(i))) = int32(fd)\n\t}\n\treturn b\n}\n\n// ParseUnixRights decodes a socket control message that contains an\n// integer array of open file descriptors from another process.\nfunc ParseUnixRights(m *SocketControlMessage) ([]int, error) {\n\tif m.Header.Level != SOL_SOCKET {\n\t\treturn nil, EINVAL\n\t}\n\tif m.Header.Type != SCM_RIGHTS {\n\t\treturn nil, EINVAL\n\t}\n\tfds := make([]int, len(m.Data)>>2)\n\tfor i, j := 0, 0; i < len(m.Data); i += 4 {\n\t\tfds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))\n\t\tj++\n\t}\n\treturn fds, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\nimport (\n\t\"runtime\"\n)\n\n// Round the length of a raw sockaddr up to align it properly.\nfunc cmsgAlignOf(salen int) int {\n\tsalign := SizeofPtr\n\n\t// dragonfly needs to check ABI version at runtime, see cmsgAlignOf in\n\t// sockcmsg_dragonfly.go\n\tswitch runtime.GOOS {\n\tcase \"aix\":\n\t\t// There is no alignment on AIX.\n\t\tsalign = 1\n\tcase \"darwin\", \"ios\", \"illumos\", \"solaris\":\n\t\t// NOTE: It seems like 64-bit Darwin, Illumos and Solaris\n\t\t// kernels still require 32-bit aligned access to network\n\t\t// subsystem.\n\t\tif SizeofPtr == 8 {\n\t\t\tsalign = 4\n\t\t}\n\tcase \"netbsd\", \"openbsd\":\n\t\t// NetBSD and OpenBSD armv7 require 64-bit alignment.\n\t\tif runtime.GOARCH == \"arm\" {\n\t\t\tsalign = 8\n\t\t}\n\t\t// NetBSD aarch64 requires 128-bit alignment.\n\t\tif runtime.GOOS == \"netbsd\" && runtime.GOARCH == \"arm64\" {\n\t\t\tsalign = 16\n\t\t}\n\tcase \"zos\":\n\t\t// z/OS socket macros use [32-bit] sizeof(int) alignment,\n\t\t// not pointer width.\n\t\tsalign = SizeofInt\n\t}\n\n\treturn (salen + salign - 1) & ^(salign - 1)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sockcmsg_zos.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Socket control messages\n\npackage unix\n\nimport \"unsafe\"\n\n// UnixCredentials encodes credentials into a socket control message\n// for sending to another process. This can be used for\n// authentication.\nfunc UnixCredentials(ucred *Ucred) []byte {\n\tb := make([]byte, CmsgSpace(SizeofUcred))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_SOCKET\n\th.Type = SCM_CREDENTIALS\n\th.SetLen(CmsgLen(SizeofUcred))\n\t*(*Ucred)(h.data(0)) = *ucred\n\treturn b\n}\n\n// ParseUnixCredentials decodes a socket control message that contains\n// credentials in a Ucred structure. To receive such a message, the\n// SO_PASSCRED option must be enabled on the socket.\nfunc ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {\n\tif m.Header.Level != SOL_SOCKET {\n\t\treturn nil, EINVAL\n\t}\n\tif m.Header.Type != SCM_CREDENTIALS {\n\t\treturn nil, EINVAL\n\t}\n\tucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))\n\treturn &ucred, nil\n}\n\n// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.\nfunc PktInfo4(info *Inet4Pktinfo) []byte {\n\tb := make([]byte, CmsgSpace(SizeofInet4Pktinfo))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_IP\n\th.Type = IP_PKTINFO\n\th.SetLen(CmsgLen(SizeofInet4Pktinfo))\n\t*(*Inet4Pktinfo)(h.data(0)) = *info\n\treturn b\n}\n\n// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.\nfunc PktInfo6(info *Inet6Pktinfo) []byte {\n\tb := make([]byte, CmsgSpace(SizeofInet6Pktinfo))\n\th := (*Cmsghdr)(unsafe.Pointer(&b[0]))\n\th.Level = SOL_IPV6\n\th.Type = IPV6_PKTINFO\n\th.SetLen(CmsgLen(SizeofInet6Pktinfo))\n\t*(*Inet6Pktinfo)(h.data(0)) = *info\n\treturn b\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x && gc\n\n#include \"textflag.h\"\n\n//  provide the address of function variable to be fixed up.\n\nTEXT ·getPipe2Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Pipe2(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_FlockAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Flock(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_GetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Getxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_NanosleepAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Nanosleep(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_SetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Setxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_Wait4Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Wait4(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_MountAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Mount(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_UnmountAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Unmount(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_UtimesNanoAtAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·UtimesNanoAt(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_UtimesNanoAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·UtimesNano(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_MkfifoatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Mkfifoat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_ChtagAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Chtag(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\nTEXT ·get_ReadlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Readlinkat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\t\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\n// Package unix contains an interface to the low-level operating system\n// primitives. OS details vary depending on the underlying system, and\n// by default, godoc will display OS-specific documentation for the current\n// system. If you want godoc to display OS documentation for another\n// system, set $GOOS and $GOARCH to the desired system. For example, if\n// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS\n// to freebsd and $GOARCH to arm.\n//\n// The primary use of this package is inside other packages that provide a more\n// portable interface to the system, such as \"os\", \"time\" and \"net\".  Use\n// those packages rather than this one if you can.\n//\n// For details of the functions and data types in this package consult\n// the manuals for the appropriate operating system.\n//\n// These calls return err == nil to indicate success; otherwise\n// err represents an operating system error describing the failure and\n// holds a value of type syscall.Errno.\npackage unix // import \"golang.org/x/sys/unix\"\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n\t\"unsafe\"\n)\n\n// ByteSliceFromString returns a NUL-terminated slice of bytes\n// containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, EINVAL).\nfunc ByteSliceFromString(s string) ([]byte, error) {\n\tif strings.IndexByte(s, 0) != -1 {\n\t\treturn nil, EINVAL\n\t}\n\ta := make([]byte, len(s)+1)\n\tcopy(a, s)\n\treturn a, nil\n}\n\n// BytePtrFromString returns a pointer to a NUL-terminated array of\n// bytes containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, EINVAL).\nfunc BytePtrFromString(s string) (*byte, error) {\n\ta, err := ByteSliceFromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &a[0], nil\n}\n\n// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any\n// bytes after the NUL removed.\nfunc ByteSliceToString(s []byte) string {\n\tif i := bytes.IndexByte(s, 0); i != -1 {\n\t\ts = s[:i]\n\t}\n\treturn string(s)\n}\n\n// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.\n// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated\n// at a zero byte; if the zero byte is not present, the program may crash.\nfunc BytePtrToString(p *byte) string {\n\tif p == nil {\n\t\treturn \"\"\n\t}\n\tif *p == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Find NUL terminator.\n\tn := 0\n\tfor ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {\n\t\tptr = unsafe.Pointer(uintptr(ptr) + 1)\n\t}\n\n\treturn string(unsafe.Slice(p, n))\n}\n\n// Single-word zero for use when we need a valid pointer to 0 bytes.\nvar _zero uintptr\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_aix.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix\n\n// Aix system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and\n// wrap it in our own nicer implementation.\n\npackage unix\n\nimport \"unsafe\"\n\n/*\n * Wrapped\n */\n\nfunc Access(path string, mode uint32) (err error) {\n\treturn Faccessat(AT_FDCWD, path, mode, 0)\n}\n\nfunc Chmod(path string, mode uint32) (err error) {\n\treturn Fchmodat(AT_FDCWD, path, mode, 0)\n}\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\treturn Fchownat(AT_FDCWD, path, uid, gid, 0)\n}\n\nfunc Creat(path string, mode uint32) (fd int, err error) {\n\treturn Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)\n}\n\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc Utimes(path string, tv []Timeval) error {\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)\n\nfunc UtimesNano(path string, ts []Timespec) error {\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {\n\tif ts == nil {\n\t\treturn utimensat(dirfd, path, nil, flags)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)\n}\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n > len(sa.raw.Path) {\n\t\treturn nil, 0, EINVAL\n\t}\n\tif n == len(sa.raw.Path) && name[0] != '@' {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_UNIX\n\tfor i := 0; i < n; i++ {\n\t\tsa.raw.Path[i] = uint8(name[i])\n\t}\n\t// length is family (uint16), name, NUL.\n\tsl := _Socklen(2)\n\tif n > 0 {\n\t\tsl += _Socklen(n) + 1\n\t}\n\tif sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {\n\t\t// Check sl > 3 so we don't change unnamed socket behavior.\n\t\tsa.raw.Path[0] = 0\n\t\t// Don't count trailing NUL for abstract address.\n\t\tsl--\n\t}\n\n\treturn unsafe.Pointer(&sa.raw), sl, nil\n}\n\nfunc Getsockname(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getsockname(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\n//sys\tgetcwd(buf []byte) (err error)\n\nconst ImplementsGetwd = true\n\nfunc Getwd() (ret string, err error) {\n\tfor len := uint64(4096); ; len *= 2 {\n\t\tb := make([]byte, len)\n\t\terr := getcwd(b)\n\t\tif err == nil {\n\t\t\ti := 0\n\t\t\tfor b[i] != 0 {\n\t\t\t\ti++\n\t\t\t}\n\t\t\treturn string(b[0:i]), nil\n\t\t}\n\t\tif err != ERANGE {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n}\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\terr = getcwd(buf)\n\tif err == nil {\n\t\ti := 0\n\t\tfor buf[i] != 0 {\n\t\t\ti++\n\t\t}\n\t\tn = i + 1\n\t}\n\treturn\n}\n\nfunc Getgroups() (gids []int, err error) {\n\tn, err := getgroups(0, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Sanity check group count. Max is 16 on BSD.\n\tif n < 0 || n > 1000 {\n\t\treturn nil, EINVAL\n\t}\n\n\ta := make([]_Gid_t, n)\n\tn, err = getgroups(n, &a[0])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tgids = make([]int, n)\n\tfor i, v := range a[0:n] {\n\t\tgids[i] = int(v)\n\t}\n\treturn\n}\n\nfunc Setgroups(gids []int) (err error) {\n\tif len(gids) == 0 {\n\t\treturn setgroups(0, nil)\n\t}\n\n\ta := make([]_Gid_t, len(gids))\n\tfor i, v := range gids {\n\t\ta[i] = _Gid_t(v)\n\t}\n\treturn setgroups(len(a), &a[0])\n}\n\n/*\n * Socket\n */\n\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)\n\nfunc Accept(fd int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept(fd, &rsa, &len)\n\tif nfd == -1 {\n\t\treturn\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(rsa))\n\tmsg.Namelen = uint32(SizeofSockaddrAny)\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\t// receive at least one normal byte\n\t\tif emptyIovecs(iov) {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = recvmsg(fd, &msg, flags); n == -1 {\n\t\treturn\n\t}\n\toobn = int(msg.Controllen)\n\trecvflags = int(msg.Flags)\n\treturn\n}\n\nfunc sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(ptr))\n\tmsg.Namelen = uint32(salen)\n\tvar dummy byte\n\tvar empty bool\n\tif len(oob) > 0 {\n\t\t// send at least one normal byte\n\t\tempty = emptyIovecs(iov)\n\t\tif empty {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = sendmsg(fd, &msg, flags); err != nil {\n\t\treturn 0, err\n\t}\n\tif len(oob) > 0 && empty {\n\t\tn = 0\n\t}\n\treturn n, nil\n}\n\nfunc anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrUnix)\n\n\t\t// Some versions of AIX have a bug in getsockname (see IV78655).\n\t\t// We can't rely on sa.Len being set correctly.\n\t\tn := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL.\n\t\tfor i := 0; i < n; i++ {\n\t\t\tif pp.Path[i] == 0 {\n\t\t\t\tn = i\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase AF_INET6:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\t}\n\treturn nil, EAFNOSUPPORT\n}\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\terr = gettimeofday(tv, nil)\n\treturn\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\n// TODO\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\treturn -1, ENOSYS\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treclen, ok := direntReclen(buf)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\treturn reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true\n}\n\n//sys\tgetdirent(fd int, buf []byte) (n int, err error)\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\treturn getdirent(fd, buf)\n}\n\n//sys\twait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)\n\nfunc Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\tvar status _C_int\n\tvar r Pid_t\n\terr = ERESTART\n\t// AIX wait4 may return with ERESTART errno, while the process is still\n\t// active.\n\tfor err == ERESTART {\n\t\tr, err = wait4(Pid_t(pid), &status, options, rusage)\n\t}\n\twpid = int(r)\n\tif wstatus != nil {\n\t\t*wstatus = WaitStatus(status)\n\t}\n\treturn\n}\n\n/*\n * Wait\n */\n\ntype WaitStatus uint32\n\nfunc (w WaitStatus) Stopped() bool { return w&0x40 != 0 }\nfunc (w WaitStatus) StopSignal() Signal {\n\tif !w.Stopped() {\n\t\treturn -1\n\t}\n\treturn Signal(w>>8) & 0xFF\n}\n\nfunc (w WaitStatus) Exited() bool { return w&0xFF == 0 }\nfunc (w WaitStatus) ExitStatus() int {\n\tif !w.Exited() {\n\t\treturn -1\n\t}\n\treturn int((w >> 8) & 0xFF)\n}\n\nfunc (w WaitStatus) Signaled() bool { return w&0x40 == 0 && w&0xFF != 0 }\nfunc (w WaitStatus) Signal() Signal {\n\tif !w.Signaled() {\n\t\treturn -1\n\t}\n\treturn Signal(w>>16) & 0xFF\n}\n\nfunc (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }\n\nfunc (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }\n\nfunc (w WaitStatus) TrapCause() int { return -1 }\n\n//sys\tioctl(fd int, req int, arg uintptr) (err error)\n//sys\tioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl\n\n// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX\n// There is no way to create a custom fcntl and to keep //sys fcntl easily,\n// Therefore, the programmer must call dup2 instead of fcntl in this case.\n\n// FcntlInt performs a fcntl syscall on fd with the provided command and argument.\n//sys\tFcntlInt(fd uintptr, cmd int, arg int) (r int,err error) = fcntl\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\n//sys\tFcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl\n\n//sys\tfcntl(fd int, cmd int, arg int) (val int, err error)\n\n//sys\tfsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range\n\nfunc Fsync(fd int) error {\n\treturn fsyncRange(fd, O_SYNC, 0, 0)\n}\n\n/*\n * Direct access\n */\n\n//sys\tAcct(path string) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tDup(oldfd int) (fd int, err error)\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFdatasync(fd int) (err error)\n// readdir_r\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n\n//sys\tGetpgrp() (pid int)\n\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tKill(pid int, sig Signal) (err error)\n//sys\tKlogctl(typ int, buf []byte) (n int, err error) = syslog\n//sys\tMkdir(dirfd int, path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error) = open64\n//sys\tOpenat(dirfd int, path string, flags int, mode uint32) (fd int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSetdomainname(p []byte) (err error)\n//sys\tSethostname(p []byte) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tv *Timeval) (err error)\n\n//sys\tSetuid(uid int) (err error)\n//sys\tSetgid(uid int) (err error)\n\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sys\tStatx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)\n//sys\tSync()\n//sysnb\tTimes(tms *Tms) (ticks uintptr, err error)\n//sysnb\tUmask(mask int) (oldmask int)\n//sysnb\tUname(buf *Utsname) (err error)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n\n//sys\tDup2(oldfd int, newfd int) (err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tfstat(fd int, stat *Stat_t) (err error)\n//sys\tfstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tlstat(path string, stat *Stat_t) (err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = pread64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sys\tPselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tstat(path string, statptr *Stat_t) (err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n\n// In order to use msghdr structure with Control, Controllen, nrecvmsg and nsendmsg must be used.\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error) = nrecvmsg\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg\n\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\tMadvise(b []byte, advice int) (err error)\n//sys\tMprotect(b []byte, prot int) (err error)\n//sys\tMlock(b []byte) (err error)\n//sys\tMlockall(flags int) (err error)\n//sys\tMsync(b []byte, flags int) (err error)\n//sys\tMunlock(b []byte) (err error)\n//sys\tMunlockall() (err error)\n\n//sysnb\tpipe(p *[2]_C_int) (err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr = pipe(&pp)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn\n}\n\n//sys\tpoll(fds *PollFd, nfds int, timeout int) (n int, err error)\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn poll(nil, 0, timeout)\n\t}\n\treturn poll(&fds[0], len(fds), timeout)\n}\n\n//sys\tgettimeofday(tv *Timeval, tzp *Timezone) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n\n//sys\tGetsystemcfg(label int) (n uint64)\n\n//sys\tumount(target string) (err error)\n\nfunc Unmount(target string, flags int) (err error) {\n\tif flags != 0 {\n\t\t// AIX doesn't have any flags for umount.\n\t\treturn ENOSYS\n\t}\n\treturn umount(target)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_aix_ppc.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix && ppc\n\npackage unix\n\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = lseek64\n\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc Fstat(fd int, stat *Stat_t) error {\n\treturn fstat(fd, stat)\n}\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {\n\treturn fstatat(dirfd, path, stat, flags)\n}\n\nfunc Lstat(path string, stat *Stat_t) error {\n\treturn lstat(path, stat)\n}\n\nfunc Stat(path string, statptr *Stat_t) error {\n\treturn stat(path, statptr)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix && ppc64\n\npackage unix\n\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = lseek\n\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int64(sec), Usec: int32(usec)}\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// In order to only have Timespec structure, type of Stat_t's fields\n// Atim, Mtim and Ctim is changed from StTimespec to Timespec during\n// ztypes generation.\n// On ppc64, Timespec.Nsec is an int64 while StTimespec.Nsec is an\n// int32, so the fields' value must be modified.\nfunc fixStatTimFields(stat *Stat_t) {\n\tstat.Atim.Nsec >>= 32\n\tstat.Mtim.Nsec >>= 32\n\tstat.Ctim.Nsec >>= 32\n}\n\nfunc Fstat(fd int, stat *Stat_t) error {\n\terr := fstat(fd, stat)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfixStatTimFields(stat)\n\treturn nil\n}\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {\n\terr := fstatat(dirfd, path, stat, flags)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfixStatTimFields(stat)\n\treturn nil\n}\n\nfunc Lstat(path string, stat *Stat_t) error {\n\terr := lstat(path, stat)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfixStatTimFields(stat)\n\treturn nil\n}\n\nfunc Stat(path string, statptr *Stat_t) error {\n\terr := stat(path, statptr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfixStatTimFields(statptr)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_bsd.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin || dragonfly || freebsd || netbsd || openbsd\n\n// BSD system call wrappers shared by *BSD based systems\n// including OS X (Darwin) and FreeBSD.  Like the other\n// syscall_*.go files it is compiled as Go code but also\n// used as input to mksyscall which parses the //sys\n// lines and generates system call stubs.\n\npackage unix\n\nimport (\n\t\"runtime\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nconst ImplementsGetwd = true\n\nfunc Getwd() (string, error) {\n\tvar buf [PathMax]byte\n\t_, err := Getcwd(buf[0:])\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tn := clen(buf[:])\n\tif n < 1 {\n\t\treturn \"\", EINVAL\n\t}\n\treturn string(buf[:n]), nil\n}\n\n/*\n * Wrapped\n */\n\n//sysnb\tgetgroups(ngid int, gid *_Gid_t) (n int, err error)\n//sysnb\tsetgroups(ngid int, gid *_Gid_t) (err error)\n\nfunc Getgroups() (gids []int, err error) {\n\tn, err := getgroups(0, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Sanity check group count. Max is 16 on BSD.\n\tif n < 0 || n > 1000 {\n\t\treturn nil, EINVAL\n\t}\n\n\ta := make([]_Gid_t, n)\n\tn, err = getgroups(n, &a[0])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tgids = make([]int, n)\n\tfor i, v := range a[0:n] {\n\t\tgids[i] = int(v)\n\t}\n\treturn\n}\n\nfunc Setgroups(gids []int) (err error) {\n\tif len(gids) == 0 {\n\t\treturn setgroups(0, nil)\n\t}\n\n\ta := make([]_Gid_t, len(gids))\n\tfor i, v := range gids {\n\t\ta[i] = _Gid_t(v)\n\t}\n\treturn setgroups(len(a), &a[0])\n}\n\n// Wait status is 7 bits at bottom, either 0 (exited),\n// 0x7F (stopped), or a signal number that caused an exit.\n// The 0x80 bit is whether there was a core dump.\n// An extra number (exit code, signal causing a stop)\n// is in the high bits.\n\ntype WaitStatus uint32\n\nconst (\n\tmask  = 0x7F\n\tcore  = 0x80\n\tshift = 8\n\n\texited  = 0\n\tkilled  = 9\n\tstopped = 0x7F\n)\n\nfunc (w WaitStatus) Exited() bool { return w&mask == exited }\n\nfunc (w WaitStatus) ExitStatus() int {\n\tif w&mask != exited {\n\t\treturn -1\n\t}\n\treturn int(w >> shift)\n}\n\nfunc (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }\n\nfunc (w WaitStatus) Signal() syscall.Signal {\n\tsig := syscall.Signal(w & mask)\n\tif sig == stopped || sig == 0 {\n\t\treturn -1\n\t}\n\treturn sig\n}\n\nfunc (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }\n\nfunc (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }\n\nfunc (w WaitStatus) Killed() bool { return w&mask == killed && syscall.Signal(w>>shift) != SIGKILL }\n\nfunc (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }\n\nfunc (w WaitStatus) StopSignal() syscall.Signal {\n\tif !w.Stopped() {\n\t\treturn -1\n\t}\n\treturn syscall.Signal(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) TrapCause() int { return -1 }\n\n//sys\twait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)\n\nfunc Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\tvar status _C_int\n\twpid, err = wait4(pid, &status, options, rusage)\n\tif wstatus != nil {\n\t\t*wstatus = WaitStatus(status)\n\t}\n\treturn\n}\n\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\tShutdown(s int, how int) (err error)\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = SizeofSockaddrInet4\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = SizeofSockaddrInet6\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n >= len(sa.raw.Path) || n == 0 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL\n\tsa.raw.Family = AF_UNIX\n\tfor i := 0; i < n; i++ {\n\t\tsa.raw.Path[i] = int8(name[i])\n\t}\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Index == 0 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = sa.Len\n\tsa.raw.Family = AF_LINK\n\tsa.raw.Index = sa.Index\n\tsa.raw.Type = sa.Type\n\tsa.raw.Nlen = sa.Nlen\n\tsa.raw.Alen = sa.Alen\n\tsa.raw.Slen = sa.Slen\n\tsa.raw.Data = sa.Data\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil\n}\n\nfunc anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\tcase AF_LINK:\n\t\tpp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrDatalink)\n\t\tsa.Len = pp.Len\n\t\tsa.Family = pp.Family\n\t\tsa.Index = pp.Index\n\t\tsa.Type = pp.Type\n\t\tsa.Nlen = pp.Nlen\n\t\tsa.Alen = pp.Alen\n\t\tsa.Slen = pp.Slen\n\t\tsa.Data = pp.Data\n\t\treturn sa, nil\n\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tif pp.Len < 2 || pp.Len > SizeofSockaddrUnix {\n\t\t\treturn nil, EINVAL\n\t\t}\n\t\tsa := new(SockaddrUnix)\n\n\t\t// Some BSDs include the trailing NUL in the length, whereas\n\t\t// others do not. Work around this by subtracting the leading\n\t\t// family and len. The path is then scanned to see if a NUL\n\t\t// terminator still exists within the length.\n\t\tn := int(pp.Len) - 2 // subtract leading Family, Len\n\t\tfor i := 0; i < n; i++ {\n\t\t\tif pp.Path[i] == 0 {\n\t\t\t\t// found early NUL; assume Len included the NUL\n\t\t\t\t// or was overestimating.\n\t\t\t\tn = i\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase AF_INET6:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\t}\n\treturn anyToSockaddrGOOS(fd, rsa)\n}\n\nfunc Accept(fd int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept(fd, &rsa, &len)\n\tif err != nil {\n\t\treturn\n\t}\n\tif (runtime.GOOS == \"darwin\" || runtime.GOOS == \"ios\") && len == 0 {\n\t\t// Accepted socket has no address.\n\t\t// This is likely due to a bug in xnu kernels,\n\t\t// where instead of ECONNABORTED error socket\n\t\t// is accepted, but has no address.\n\t\tClose(nfd)\n\t\treturn 0, nil, ECONNABORTED\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc Getsockname(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getsockname(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\t// TODO(jsing): DragonFly has a \"bug\" (see issue 3349), which should be\n\t// reported upstream.\n\tif runtime.GOOS == \"dragonfly\" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {\n\t\trsa.Addr.Family = AF_UNIX\n\t\trsa.Addr.Len = SizeofSockaddrUnix\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n\n// GetsockoptString returns the string value of the socket option opt for the\n// socket associated with fd at the given socket level.\nfunc GetsockoptString(fd, level, opt int) (string, error) {\n\tbuf := make([]byte, 256)\n\tvallen := _Socklen(len(buf))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn ByteSliceToString(buf[:vallen]), nil\n}\n\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\nfunc recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(rsa))\n\tmsg.Namelen = uint32(SizeofSockaddrAny)\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\t// receive at least one normal byte\n\t\tif emptyIovecs(iov) {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = recvmsg(fd, &msg, flags); err != nil {\n\t\treturn\n\t}\n\toobn = int(msg.Controllen)\n\trecvflags = int(msg.Flags)\n\treturn\n}\n\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\nfunc sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(ptr))\n\tmsg.Namelen = uint32(salen)\n\tvar dummy byte\n\tvar empty bool\n\tif len(oob) > 0 {\n\t\t// send at least one normal byte\n\t\tempty = emptyIovecs(iov)\n\t\tif empty {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = sendmsg(fd, &msg, flags); err != nil {\n\t\treturn 0, err\n\t}\n\tif len(oob) > 0 && empty {\n\t\tn = 0\n\t}\n\treturn n, nil\n}\n\n//sys\tkevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)\n\nfunc Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {\n\tvar change, event unsafe.Pointer\n\tif len(changes) > 0 {\n\t\tchange = unsafe.Pointer(&changes[0])\n\t}\n\tif len(events) > 0 {\n\t\tevent = unsafe.Pointer(&events[0])\n\t}\n\treturn kevent(kq, change, len(changes), event, len(events), timeout)\n}\n\n// sysctlmib translates name to mib number and appends any additional args.\nfunc sysctlmib(name string, args ...int) ([]_C_int, error) {\n\t// Translate name to mib number.\n\tmib, err := nametomib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, a := range args {\n\t\tmib = append(mib, _C_int(a))\n\t}\n\n\treturn mib, nil\n}\n\nfunc Sysctl(name string) (string, error) {\n\treturn SysctlArgs(name)\n}\n\nfunc SysctlArgs(name string, args ...int) (string, error) {\n\tbuf, err := SysctlRaw(name, args...)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tn := len(buf)\n\n\t// Throw away terminating NUL.\n\tif n > 0 && buf[n-1] == '\\x00' {\n\t\tn--\n\t}\n\treturn string(buf[0:n]), nil\n}\n\nfunc SysctlUint32(name string) (uint32, error) {\n\treturn SysctlUint32Args(name)\n}\n\nfunc SysctlUint32Args(name string, args ...int) (uint32, error) {\n\tmib, err := sysctlmib(name, args...)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tn := uintptr(4)\n\tbuf := make([]byte, 4)\n\tif err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {\n\t\treturn 0, err\n\t}\n\tif n != 4 {\n\t\treturn 0, EIO\n\t}\n\treturn *(*uint32)(unsafe.Pointer(&buf[0])), nil\n}\n\nfunc SysctlUint64(name string, args ...int) (uint64, error) {\n\tmib, err := sysctlmib(name, args...)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tn := uintptr(8)\n\tbuf := make([]byte, 8)\n\tif err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {\n\t\treturn 0, err\n\t}\n\tif n != 8 {\n\t\treturn 0, EIO\n\t}\n\treturn *(*uint64)(unsafe.Pointer(&buf[0])), nil\n}\n\nfunc SysctlRaw(name string, args ...int) ([]byte, error) {\n\tmib, err := sysctlmib(name, args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Find size.\n\tn := uintptr(0)\n\tif err := sysctl(mib, nil, &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Read into buffer of that size.\n\tbuf := make([]byte, n)\n\tif err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// The actual call may return less than the original reported required\n\t// size so ensure we deal with that.\n\treturn buf[:n], nil\n}\n\nfunc SysctlClockinfo(name string) (*Clockinfo, error) {\n\tmib, err := sysctlmib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tn := uintptr(SizeofClockinfo)\n\tvar ci Clockinfo\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n != SizeofClockinfo {\n\t\treturn nil, EIO\n\t}\n\treturn &ci, nil\n}\n\nfunc SysctlTimeval(name string) (*Timeval, error) {\n\tmib, err := sysctlmib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar tv Timeval\n\tn := uintptr(unsafe.Sizeof(tv))\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&tv)), &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n != unsafe.Sizeof(tv) {\n\t\treturn nil, EIO\n\t}\n\treturn &tv, nil\n}\n\n//sys\tutimes(path string, timeval *[2]Timeval) (err error)\n\nfunc Utimes(path string, tv []Timeval) error {\n\tif tv == nil {\n\t\treturn utimes(path, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\nfunc UtimesNano(path string, ts []Timespec) error {\n\tif ts == nil {\n\t\terr := utimensat(AT_FDCWD, path, nil, 0)\n\t\tif err != ENOSYS {\n\t\t\treturn err\n\t\t}\n\t\treturn utimes(path, nil)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\terr := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\t// Not as efficient as it could be because Timespec and\n\t// Timeval have different types in the different OSes\n\ttv := [2]Timeval{\n\t\tNsecToTimeval(TimespecToNsec(ts[0])),\n\t\tNsecToTimeval(TimespecToNsec(ts[1])),\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\nfunc UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {\n\tif ts == nil {\n\t\treturn utimensat(dirfd, path, nil, flags)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)\n}\n\n//sys\tfutimes(fd int, timeval *[2]Timeval) (err error)\n\nfunc Futimes(fd int, tv []Timeval) error {\n\tif tv == nil {\n\t\treturn futimes(fd, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n//sys\tpoll(fds *PollFd, nfds int, timeout int) (n int, err error)\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn poll(nil, 0, timeout)\n\t}\n\treturn poll(&fds[0], len(fds), timeout)\n}\n\n// TODO: wrap\n//\tAcct(name nil-string) (err error)\n//\tGethostuuid(uuid *byte, timeout *Timespec) (err error)\n//\tPtrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)\n\n//sys\tMadvise(b []byte, behav int) (err error)\n//sys\tMlock(b []byte) (err error)\n//sys\tMlockall(flags int) (err error)\n//sys\tMprotect(b []byte, prot int) (err error)\n//sys\tMsync(b []byte, flags int) (err error)\n//sys\tMunlock(b []byte) (err error)\n//sys\tMunlockall() (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_darwin.go",
    "content": "// Copyright 2009,2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Darwin system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_bsd.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//sys\tclosedir(dir uintptr) (err error)\n//sys\treaddir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)\n\nfunc fdopendir(fd int) (dir uintptr, err error) {\n\tr0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)\n\tdir = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fdopendir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fdopendir fdopendir \"/usr/lib/libSystem.B.dylib\"\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\t// Simulate Getdirentries using fdopendir/readdir_r/closedir.\n\t// We store the number of entries to skip in the seek\n\t// offset of fd. See issue #31368.\n\t// It's not the full required semantics, but should handle the case\n\t// of calling Getdirentries or ReadDirent repeatedly.\n\t// It won't handle assigning the results of lseek to *basep, or handle\n\t// the directory being edited underfoot.\n\tskip, err := Seek(fd, 0, 1 /* SEEK_CUR */)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// We need to duplicate the incoming file descriptor\n\t// because the caller expects to retain control of it, but\n\t// fdopendir expects to take control of its argument.\n\t// Just Dup'ing the file descriptor is not enough, as the\n\t// result shares underlying state. Use Openat to make a really\n\t// new file descriptor referring to the same directory.\n\tfd2, err := Openat(fd, \".\", O_RDONLY, 0)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\td, err := fdopendir(fd2)\n\tif err != nil {\n\t\tClose(fd2)\n\t\treturn 0, err\n\t}\n\tdefer closedir(d)\n\n\tvar cnt int64\n\tfor {\n\t\tvar entry Dirent\n\t\tvar entryp *Dirent\n\t\te := readdir_r(d, &entry, &entryp)\n\t\tif e != 0 {\n\t\t\treturn n, errnoErr(e)\n\t\t}\n\t\tif entryp == nil {\n\t\t\tbreak\n\t\t}\n\t\tif skip > 0 {\n\t\t\tskip--\n\t\t\tcnt++\n\t\t\tcontinue\n\t\t}\n\n\t\treclen := int(entry.Reclen)\n\t\tif reclen > len(buf) {\n\t\t\t// Not enough room. Return for now.\n\t\t\t// The counter will let us know where we should start up again.\n\t\t\t// Note: this strategy for suspending in the middle and\n\t\t\t// restarting is O(n^2) in the length of the directory. Oh well.\n\t\t\tbreak\n\t\t}\n\n\t\t// Copy entry into return buffer.\n\t\ts := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)\n\t\tcopy(buf, s)\n\n\t\tbuf = buf[reclen:]\n\t\tn += reclen\n\t\tcnt++\n\t}\n\t// Set the seek offset of the input fd to record\n\t// how many files we've already returned.\n\t_, err = Seek(fd, cnt, 0 /* SEEK_SET */)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\n\treturn n, nil\n}\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n\traw    RawSockaddrDatalink\n}\n\n// SockaddrCtl implements the Sockaddr interface for AF_SYSTEM type sockets.\ntype SockaddrCtl struct {\n\tID   uint32\n\tUnit uint32\n\traw  RawSockaddrCtl\n}\n\nfunc (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Sc_len = SizeofSockaddrCtl\n\tsa.raw.Sc_family = AF_SYSTEM\n\tsa.raw.Ss_sysaddr = AF_SYS_CONTROL\n\tsa.raw.Sc_id = sa.ID\n\tsa.raw.Sc_unit = sa.Unit\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil\n}\n\n// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.\n// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables\n// bidirectional communication between a hypervisor and its guest virtual\n// machines.\ntype SockaddrVM struct {\n\t// CID and Port specify a context ID and port address for a VM socket.\n\t// Guests have a unique CID, and hosts may have a well-known CID of:\n\t//  - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.\n\t//  - VMADDR_CID_LOCAL: refers to local communication (loopback).\n\t//  - VMADDR_CID_HOST: refers to other processes on the host.\n\tCID  uint32\n\tPort uint32\n\traw  RawSockaddrVM\n}\n\nfunc (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Len = SizeofSockaddrVM\n\tsa.raw.Family = AF_VSOCK\n\tsa.raw.Port = sa.Port\n\tsa.raw.Cid = sa.CID\n\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil\n}\n\nfunc anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\tcase AF_SYSTEM:\n\t\tpp := (*RawSockaddrCtl)(unsafe.Pointer(rsa))\n\t\tif pp.Ss_sysaddr == AF_SYS_CONTROL {\n\t\t\tsa := new(SockaddrCtl)\n\t\t\tsa.ID = pp.Sc_id\n\t\t\tsa.Unit = pp.Sc_unit\n\t\t\treturn sa, nil\n\t\t}\n\tcase AF_VSOCK:\n\t\tpp := (*RawSockaddrVM)(unsafe.Pointer(rsa))\n\t\tsa := &SockaddrVM{\n\t\t\tCID:  pp.Cid,\n\t\t\tPort: pp.Port,\n\t\t}\n\t\treturn sa, nil\n\t}\n\treturn nil, EAFNOSUPPORT\n}\n\n// Some external packages rely on SYS___SYSCTL being defined to implement their\n// own sysctl wrappers. Provide it here, even though direct syscalls are no\n// longer supported on darwin.\nconst SYS___SYSCTL = SYS_SYSCTL\n\n// Translate \"kern.hostname\" to []_C_int{0,1,2,3}.\nfunc nametomib(name string) (mib []_C_int, err error) {\n\tconst siz = unsafe.Sizeof(mib[0])\n\n\t// NOTE(rsc): It seems strange to set the buffer to have\n\t// size CTL_MAXNAME+2 but use only CTL_MAXNAME\n\t// as the size. I don't know why the +2 is here, but the\n\t// kernel uses +2 for its own implementation of this function.\n\t// I am scared that if we don't include the +2 here, the kernel\n\t// will silently write 2 words farther than we specify\n\t// and we'll get memory corruption.\n\tvar buf [CTL_MAXNAME + 2]_C_int\n\tn := uintptr(CTL_MAXNAME) * siz\n\n\tp := (*byte)(unsafe.Pointer(&buf[0]))\n\tbytes, err := ByteSliceFromString(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Magic sysctl: \"setting\" 0.3 to a string name\n\t// lets you read back the array of integers form.\n\tif err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf[0 : n/siz], nil\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))\n}\n\nfunc PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }\nfunc PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }\nfunc PtraceDenyAttach() (err error)    { return ptrace(PT_DENY_ATTACH, 0, 0, 0) }\n\n//sysnb\tpipe(p *[2]int32) (err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar x [2]int32\n\terr = pipe(&x)\n\tif err == nil {\n\t\tp[0] = int(x[0])\n\t\tp[1] = int(x[1])\n\t}\n\treturn\n}\n\nfunc Getfsstat(buf []Statfs_t, flags int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tvar bufsize uintptr\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t\tbufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))\n\t}\n\treturn getfsstat(_p0, bufsize, flags)\n}\n\nfunc xattrPointer(dest []byte) *byte {\n\t// It's only when dest is set to NULL that the OS X implementations of\n\t// getxattr() and listxattr() return the current sizes of the named attributes.\n\t// An empty byte array is not sufficient. To maintain the same behaviour as the\n\t// linux implementation, we wrap around the system calls and pass in NULL when\n\t// dest is empty.\n\tvar destp *byte\n\tif len(dest) > 0 {\n\t\tdestp = &dest[0]\n\t}\n\treturn destp\n}\n\n//sys\tgetxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)\n\nfunc Getxattr(path string, attr string, dest []byte) (sz int, err error) {\n\treturn getxattr(path, attr, xattrPointer(dest), len(dest), 0, 0)\n}\n\nfunc Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {\n\treturn getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW)\n}\n\n//sys\tfgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)\n\nfunc Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\treturn fgetxattr(fd, attr, xattrPointer(dest), len(dest), 0, 0)\n}\n\n//sys\tsetxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error)\n\nfunc Setxattr(path string, attr string, data []byte, flags int) (err error) {\n\t// The parameters for the OS X implementation vary slightly compared to the\n\t// linux system call, specifically the position parameter:\n\t//\n\t//  linux:\n\t//      int setxattr(\n\t//          const char *path,\n\t//          const char *name,\n\t//          const void *value,\n\t//          size_t size,\n\t//          int flags\n\t//      );\n\t//\n\t//  darwin:\n\t//      int setxattr(\n\t//          const char *path,\n\t//          const char *name,\n\t//          void *value,\n\t//          size_t size,\n\t//          u_int32_t position,\n\t//          int options\n\t//      );\n\t//\n\t// position specifies the offset within the extended attribute. In the\n\t// current implementation, only the resource fork extended attribute makes\n\t// use of this argument. For all others, position is reserved. We simply\n\t// default to setting it to zero.\n\treturn setxattr(path, attr, xattrPointer(data), len(data), 0, flags)\n}\n\nfunc Lsetxattr(link string, attr string, data []byte, flags int) (err error) {\n\treturn setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW)\n}\n\n//sys\tfsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error)\n\nfunc Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {\n\treturn fsetxattr(fd, attr, xattrPointer(data), len(data), 0, 0)\n}\n\n//sys\tremovexattr(path string, attr string, options int) (err error)\n\nfunc Removexattr(path string, attr string) (err error) {\n\t// We wrap around and explicitly zero out the options provided to the OS X\n\t// implementation of removexattr, we do so for interoperability with the\n\t// linux variant.\n\treturn removexattr(path, attr, 0)\n}\n\nfunc Lremovexattr(link string, attr string) (err error) {\n\treturn removexattr(link, attr, XATTR_NOFOLLOW)\n}\n\n//sys\tfremovexattr(fd int, attr string, options int) (err error)\n\nfunc Fremovexattr(fd int, attr string) (err error) {\n\treturn fremovexattr(fd, attr, 0)\n}\n\n//sys\tlistxattr(path string, dest *byte, size int, options int) (sz int, err error)\n\nfunc Listxattr(path string, dest []byte) (sz int, err error) {\n\treturn listxattr(path, xattrPointer(dest), len(dest), 0)\n}\n\nfunc Llistxattr(link string, dest []byte) (sz int, err error) {\n\treturn listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW)\n}\n\n//sys\tflistxattr(fd int, dest *byte, size int, options int) (sz int, err error)\n\nfunc Flistxattr(fd int, dest []byte) (sz int, err error) {\n\treturn flistxattr(fd, xattrPointer(dest), len(dest), 0)\n}\n\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n\n/*\n * Wrapped\n */\n\n//sys\tfcntl(fd int, cmd int, arg int) (val int, err error)\n\n//sys\tkill(pid int, signum int, posix int) (err error)\n\nfunc Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error)\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\nfunc IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {\n\treturn ioctlPtr(fd, CTLIOCGINFO, unsafe.Pointer(ctlInfo))\n}\n\n// IfreqMTU is struct ifreq used to get or set a network device's MTU.\ntype IfreqMTU struct {\n\tName [IFNAMSIZ]byte\n\tMTU  int32\n}\n\n// IoctlGetIfreqMTU performs the SIOCGIFMTU ioctl operation on fd to get the MTU\n// of the network device specified by ifname.\nfunc IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {\n\tvar ifreq IfreqMTU\n\tcopy(ifreq.Name[:], ifname)\n\terr := ioctlPtr(fd, SIOCGIFMTU, unsafe.Pointer(&ifreq))\n\treturn &ifreq, err\n}\n\n// IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU\n// of the network device specified by ifreq.Name.\nfunc IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {\n\treturn ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))\n}\n\n//sys\trenamexNp(from string, to string, flag uint32) (err error)\n\nfunc RenamexNp(from string, to string, flag uint32) (err error) {\n\treturn renamexNp(from, to, flag)\n}\n\n//sys\trenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error)\n\nfunc RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {\n\treturn renameatxNp(fromfd, from, tofd, to, flag)\n}\n\n//sys\tsysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL\n\nfunc Uname(uname *Utsname) error {\n\tmib := []_C_int{CTL_KERN, KERN_OSTYPE}\n\tn := unsafe.Sizeof(uname.Sysname)\n\tif err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_HOSTNAME}\n\tn = unsafe.Sizeof(uname.Nodename)\n\tif err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn = unsafe.Sizeof(uname.Release)\n\tif err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_VERSION}\n\tn = unsafe.Sizeof(uname.Version)\n\tif err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\t// The version might have newlines or tabs in it, convert them to\n\t// spaces.\n\tfor i, b := range uname.Version {\n\t\tif b == '\\n' || b == '\\t' {\n\t\t\tif i == len(uname.Version)-1 {\n\t\t\t\tuname.Version[i] = 0\n\t\t\t} else {\n\t\t\t\tuname.Version[i] = ' '\n\t\t\t}\n\t\t}\n\t}\n\n\tmib = []_C_int{CTL_HW, HW_MACHINE}\n\tn = unsafe.Sizeof(uname.Machine)\n\tif err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tvar length = int64(count)\n\terr = sendfile(infd, outfd, *offset, &length, nil, 0)\n\twritten = int(length)\n\treturn\n}\n\nfunc GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {\n\tvar value IPMreqn\n\tvallen := _Socklen(SizeofIPMreqn)\n\terrno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, errno\n}\n\nfunc SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))\n}\n\n// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.\n// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.\nfunc GetsockoptXucred(fd, level, opt int) (*Xucred, error) {\n\tx := new(Xucred)\n\tvallen := _Socklen(SizeofXucred)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)\n\treturn x, err\n}\n\nfunc GetsockoptTCPConnectionInfo(fd, level, opt int) (*TCPConnectionInfo, error) {\n\tvar value TCPConnectionInfo\n\tvallen := _Socklen(SizeofTCPConnectionInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {\n\tmib, err := sysctlmib(name, args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar kinfo KinfoProc\n\tn := uintptr(SizeofKinfoProc)\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n != SizeofKinfoProc {\n\t\treturn nil, EIO\n\t}\n\treturn &kinfo, nil\n}\n\nfunc SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {\n\tmib, err := sysctlmib(name, args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor {\n\t\t// Find size.\n\t\tn := uintptr(0)\n\t\tif err := sysctl(mib, nil, &n, nil, 0); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif n == 0 {\n\t\t\treturn nil, nil\n\t\t}\n\t\tif n%SizeofKinfoProc != 0 {\n\t\t\treturn nil, fmt.Errorf(\"sysctl() returned a size of %d, which is not a multiple of %d\", n, SizeofKinfoProc)\n\t\t}\n\n\t\t// Read into buffer of that size.\n\t\tbuf := make([]KinfoProc, n/SizeofKinfoProc)\n\t\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {\n\t\t\tif err == ENOMEM {\n\t\t\t\t// Process table grew. Try again.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\tif n%SizeofKinfoProc != 0 {\n\t\t\treturn nil, fmt.Errorf(\"sysctl() returned a size of %d, which is not a multiple of %d\", n, SizeofKinfoProc)\n\t\t}\n\n\t\t// The actual call may return less than the original reported required\n\t\t// size so ensure we deal with that.\n\t\treturn buf[:n/SizeofKinfoProc], nil\n\t}\n}\n\n//sys\tpthread_chdir_np(path string) (err error)\n\nfunc PthreadChdir(path string) (err error) {\n\treturn pthread_chdir_np(path)\n}\n\n//sys\tpthread_fchdir_np(fd int) (err error)\n\nfunc PthreadFchdir(fd int) (err error) {\n\treturn pthread_fchdir_np(fd)\n}\n\n// Connectx calls connectx(2) to initiate a connection on a socket.\n//\n// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument.\n//\n//   - srcIf is the optional source interface index. 0 means unspecified.\n//   - srcAddr is the optional source address. nil means unspecified.\n//   - dstAddr is the destination address.\n//\n// On success, Connectx returns the number of bytes enqueued for transmission.\nfunc Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) {\n\tendpoints := SaEndpoints{\n\t\tSrcif: srcIf,\n\t}\n\n\tif srcAddr != nil {\n\t\taddrp, addrlen, err := srcAddr.sockaddr()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tendpoints.Srcaddr = (*RawSockaddr)(addrp)\n\t\tendpoints.Srcaddrlen = uint32(addrlen)\n\t}\n\n\tif dstAddr != nil {\n\t\taddrp, addrlen, err := dstAddr.sockaddr()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tendpoints.Dstaddr = (*RawSockaddr)(addrp)\n\t\tendpoints.Dstaddrlen = uint32(addrlen)\n\t}\n\n\terr = connectx(fd, &endpoints, associd, flags, iov, &n, connid)\n\treturn\n}\n\nconst minIovec = 8\n\nfunc Readv(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tn, err = readv(fd, iovecs)\n\treadvRacedetect(iovecs, n, err)\n\treturn n, err\n}\n\nfunc Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tn, err = preadv(fd, iovecs, offset)\n\treadvRacedetect(iovecs, n, err)\n\treturn n, err\n}\n\nfunc Writev(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = writev(fd, iovecs)\n\twritevRacedetect(iovecs, n)\n\treturn n, err\n}\n\nfunc Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = pwritev(fd, iovecs, offset)\n\twritevRacedetect(iovecs, n)\n\treturn n, err\n}\n\nfunc appendBytes(vecs []Iovec, bs [][]byte) []Iovec {\n\tfor _, b := range bs {\n\t\tvar v Iovec\n\t\tv.SetLen(len(b))\n\t\tif len(b) > 0 {\n\t\t\tv.Base = &b[0]\n\t\t} else {\n\t\t\tv.Base = (*byte)(unsafe.Pointer(&_zero))\n\t\t}\n\t\tvecs = append(vecs, v)\n\t}\n\treturn vecs\n}\n\nfunc writevRacedetect(iovecs []Iovec, n int) {\n\tif !raceenabled {\n\t\treturn\n\t}\n\tfor i := 0; n > 0 && i < len(iovecs); i++ {\n\t\tm := int(iovecs[i].Len)\n\t\tif m > n {\n\t\t\tm = n\n\t\t}\n\t\tn -= m\n\t\tif m > 0 {\n\t\t\traceReadRange(unsafe.Pointer(iovecs[i].Base), m)\n\t\t}\n\t}\n}\n\nfunc readvRacedetect(iovecs []Iovec, n int, err error) {\n\tif !raceenabled {\n\t\treturn\n\t}\n\tfor i := 0; n > 0 && i < len(iovecs); i++ {\n\t\tm := int(iovecs[i].Len)\n\t\tif m > n {\n\t\t\tm = n\n\t\t}\n\t\tn -= m\n\t\tif m > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(iovecs[i].Base), m)\n\t\t}\n\t}\n\tif err == nil {\n\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t}\n}\n\n//sys\tconnectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)\n//sys\tsendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)\n\n//sys\tshmat(id int, addr uintptr, flag int) (ret uintptr, err error)\n//sys\tshmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)\n//sys\tshmdt(addr uintptr) (err error)\n//sys\tshmget(key int, size int, flag int) (id int, err error)\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChflags(path string, flags int) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tClonefile(src string, dst string, flags int) (err error)\n//sys\tClonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(from int, to int) (err error)\n//sys\tExchangedata(path1 string, path2 string, options int) (err error)\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchflags(fd int, flags int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sys\tGetcwd(buf []byte) (n int, err error)\n//sys\tGetdtablesize() (size int)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (uid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgrp int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tp *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sysnb\tIssetugid() (tainted bool)\n//sys\tKqueue() (fd int, err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tLinkat(pathfd int, path string, linkfd int, link string, flags int) (err error)\n//sys\tListen(s int, backlog int) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(dirfd int, path string, mode int, perm uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tReadlinkat(dirfd int, path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(fromfd int, from string, tofd int, to string) (err error)\n//sys\tRevoke(path string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sys\tSetattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error)\n//sys\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sys\tSetlogin(name string) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sys\tSetprivexec(flag int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tp *Timeval) (err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSync() (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUmask(newmask int) (oldmask int)\n//sys\tUndelete(path string) (err error)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUnmount(path string, flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\treadv(fd int, iovecs []Iovec) (n int, err error)\n//sys\tpreadv(fd int, iovecs []Iovec, offset int64) (n int, err error)\n//sys\twritev(fd int, iovecs []Iovec) (n int, err error)\n//sys\tpwritev(fd int, iovecs []Iovec, offset int64) (n int, err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && darwin\n\npackage unix\n\nimport \"syscall\"\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tFstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64\n//sys\tgetfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n//sys\tStatfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm64 && darwin\n\npackage unix\n\nimport \"syscall\"\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic\n\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, stat *Statfs_t) (err error)\n//sys\tgetfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, stat *Statfs_t) (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin\n\npackage unix\n\nimport _ \"unsafe\"\n\n// Implemented in the runtime package (runtime/sys_darwin.go)\nfunc syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only\nfunc syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)\n\n//go:linkname syscall_syscall syscall.syscall\n//go:linkname syscall_syscall6 syscall.syscall6\n//go:linkname syscall_syscall6X syscall.syscall6X\n//go:linkname syscall_syscall9 syscall.syscall9\n//go:linkname syscall_rawSyscall syscall.rawSyscall\n//go:linkname syscall_rawSyscall6 syscall.rawSyscall6\n//go:linkname syscall_syscallPtr syscall.syscallPtr\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_dragonfly.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// DragonFly BSD system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_bsd.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"sync\"\n\t\"unsafe\"\n)\n\n// See version list in https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/param.h\nvar (\n\tosreldateOnce sync.Once\n\tosreldate     uint32\n)\n\n// First __DragonFly_version after September 2019 ABI changes\n// http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html\nconst _dragonflyABIChangeVersion = 500705\n\nfunc supportsABI(ver uint32) bool {\n\tosreldateOnce.Do(func() { osreldate, _ = SysctlUint32(\"kern.osreldate\") })\n\treturn osreldate >= ver\n}\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n\tRcf    uint16\n\tRoute  [16]uint16\n\traw    RawSockaddrDatalink\n}\n\nfunc anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\treturn nil, EAFNOSUPPORT\n}\n\n// Translate \"kern.hostname\" to []_C_int{0,1,2,3}.\nfunc nametomib(name string) (mib []_C_int, err error) {\n\tconst siz = unsafe.Sizeof(mib[0])\n\n\t// NOTE(rsc): It seems strange to set the buffer to have\n\t// size CTL_MAXNAME+2 but use only CTL_MAXNAME\n\t// as the size. I don't know why the +2 is here, but the\n\t// kernel uses +2 for its own implementation of this function.\n\t// I am scared that if we don't include the +2 here, the kernel\n\t// will silently write 2 words farther than we specify\n\t// and we'll get memory corruption.\n\tvar buf [CTL_MAXNAME + 2]_C_int\n\tn := uintptr(CTL_MAXNAME) * siz\n\n\tp := (*byte)(unsafe.Pointer(&buf[0]))\n\tbytes, err := ByteSliceFromString(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Magic sysctl: \"setting\" 0.3 to a string name\n\t// lets you read back the array of integers form.\n\tif err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf[0 : n/siz], nil\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\tnamlen, ok := direntNamlen(buf)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\treturn (16 + namlen + 1 + 7) &^ 7, true\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))\n}\n\n//sysnb\tpipe() (r int, w int, err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tr, w, err := pipe()\n\tif err == nil {\n\t\tp[0], p[1] = r, w\n\t}\n\treturn\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (r int, w int, err error)\n\nfunc Pipe2(p []int, flags int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\t// pipe2 on dragonfly takes an fds array as an argument, but still\n\t// returns the file descriptors.\n\tr, w, err := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0], p[1] = r, w\n\t}\n\treturn err\n}\n\n//sys\textpread(fd int, p []byte, flags int, offset int64) (n int, err error)\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\treturn extpread(fd, p, 0, offset)\n}\n\n//sys\textpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\treturn extpwrite(fd, p, 0, offset)\n}\n\nfunc Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, flags)\n\tif err != nil {\n\t\treturn\n\t}\n\tif len > SizeofSockaddrAny {\n\t\tpanic(\"RawSockaddrAny too small\")\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\n//sys\tGetcwd(buf []byte) (n int, err error) = SYS___GETCWD\n\nfunc Getfsstat(buf []Statfs_t, flags int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tvar bufsize uintptr\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t\tbufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))\n\t}\n\tr0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error)\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\n//sys\tsysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL\n\nfunc sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {\n\terr := sysctl(mib, old, oldlen, nil, 0)\n\tif err != nil {\n\t\t// Utsname members on Dragonfly are only 32 bytes and\n\t\t// the syscall returns ENOMEM in case the actual value\n\t\t// is longer.\n\t\tif err == ENOMEM {\n\t\t\terr = nil\n\t\t}\n\t}\n\treturn err\n}\n\nfunc Uname(uname *Utsname) error {\n\tmib := []_C_int{CTL_KERN, KERN_OSTYPE}\n\tn := unsafe.Sizeof(uname.Sysname)\n\tif err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil {\n\t\treturn err\n\t}\n\tuname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0\n\n\tmib = []_C_int{CTL_KERN, KERN_HOSTNAME}\n\tn = unsafe.Sizeof(uname.Nodename)\n\tif err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil {\n\t\treturn err\n\t}\n\tuname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0\n\n\tmib = []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn = unsafe.Sizeof(uname.Release)\n\tif err := sysctlUname(mib, &uname.Release[0], &n); err != nil {\n\t\treturn err\n\t}\n\tuname.Release[unsafe.Sizeof(uname.Release)-1] = 0\n\n\tmib = []_C_int{CTL_KERN, KERN_VERSION}\n\tn = unsafe.Sizeof(uname.Version)\n\tif err := sysctlUname(mib, &uname.Version[0], &n); err != nil {\n\t\treturn err\n\t}\n\n\t// The version might have newlines or tabs in it, convert them to\n\t// spaces.\n\tfor i, b := range uname.Version {\n\t\tif b == '\\n' || b == '\\t' {\n\t\t\tif i == len(uname.Version)-1 {\n\t\t\t\tuname.Version[i] = 0\n\t\t\t} else {\n\t\t\t\tuname.Version[i] = ' '\n\t\t\t}\n\t\t}\n\t}\n\n\tmib = []_C_int{CTL_HW, HW_MACHINE}\n\tn = unsafe.Sizeof(uname.Machine)\n\tif err := sysctlUname(mib, &uname.Machine[0], &n); err != nil {\n\t\treturn err\n\t}\n\tuname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0\n\n\treturn nil\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\nfunc Dup3(oldfd, newfd, flags int) error {\n\tif oldfd == newfd || flags&^O_CLOEXEC != 0 {\n\t\treturn EINVAL\n\t}\n\thow := F_DUP2FD\n\tif flags&O_CLOEXEC != 0 {\n\t\thow = F_DUP2FD_CLOEXEC\n\t}\n\t_, err := fcntl(oldfd, how, newfd)\n\treturn err\n}\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChflags(path string, flags int) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(from int, to int) (err error)\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchflags(fd int, flags int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, stat *Statfs_t) (err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sys\tGetdents(fd int, buf []byte) (n int, err error)\n//sys\tGetdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)\n//sys\tGetdtablesize() (size int)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (uid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgrp int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tIssetugid() (tainted bool)\n//sys\tKill(pid int, signum syscall.Signal) (err error)\n//sys\tKqueue() (fd int, err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tLinkat(pathfd int, path string, linkfd int, link string, flags int) (err error)\n//sys\tListen(s int, backlog int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMknodat(fd int, path string, mode uint32, dev int) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(dirfd int, path string, mode int, perm uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(fromfd int, from string, tofd int, to string) (err error)\n//sys\tRevoke(path string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sysnb\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sys\tSetlogin(name string) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetresgid(rgid int, egid int, sgid int) (err error)\n//sysnb\tSetresuid(ruid int, euid int, suid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tp *Timeval) (err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, stat *Statfs_t) (err error)\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSync() (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUmask(newmask int) (oldmask int)\n//sys\tUndelete(path string) (err error)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUnmount(path string, flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\taccept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && dragonfly\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd.go",
    "content": "// Copyright 2009,2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// FreeBSD system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_bsd.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"errors\"\n\t\"sync\"\n\t\"unsafe\"\n)\n\n// See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.\nvar (\n\tosreldateOnce sync.Once\n\tosreldate     uint32\n)\n\nfunc supportsABI(ver uint32) bool {\n\tosreldateOnce.Do(func() { osreldate, _ = SysctlUint32(\"kern.osreldate\") })\n\treturn osreldate >= ver\n}\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n\traw    RawSockaddrDatalink\n}\n\nfunc anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\treturn nil, EAFNOSUPPORT\n}\n\n// Translate \"kern.hostname\" to []_C_int{0,1,2,3}.\nfunc nametomib(name string) (mib []_C_int, err error) {\n\tconst siz = unsafe.Sizeof(mib[0])\n\n\t// NOTE(rsc): It seems strange to set the buffer to have\n\t// size CTL_MAXNAME+2 but use only CTL_MAXNAME\n\t// as the size. I don't know why the +2 is here, but the\n\t// kernel uses +2 for its own implementation of this function.\n\t// I am scared that if we don't include the +2 here, the kernel\n\t// will silently write 2 words farther than we specify\n\t// and we'll get memory corruption.\n\tvar buf [CTL_MAXNAME + 2]_C_int\n\tn := uintptr(CTL_MAXNAME) * siz\n\n\tp := (*byte)(unsafe.Pointer(&buf[0]))\n\tbytes, err := ByteSliceFromString(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Magic sysctl: \"setting\" 0.3 to a string name\n\t// lets you read back the array of integers form.\n\tif err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf[0 : n/siz], nil\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))\n}\n\nfunc Pipe(p []int) (err error) {\n\treturn Pipe2(p, 0)\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) error {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn err\n}\n\nfunc GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {\n\tvar value IPMreqn\n\tvallen := _Socklen(SizeofIPMreqn)\n\terrno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, errno\n}\n\nfunc SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))\n}\n\n// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.\n// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.\nfunc GetsockoptXucred(fd, level, opt int) (*Xucred, error) {\n\tx := new(Xucred)\n\tvallen := _Socklen(SizeofXucred)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)\n\treturn x, err\n}\n\nfunc Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, flags)\n\tif err != nil {\n\t\treturn\n\t}\n\tif len > SizeofSockaddrAny {\n\t\tpanic(\"RawSockaddrAny too small\")\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\n//sys\tGetcwd(buf []byte) (n int, err error) = SYS___GETCWD\n\nfunc Getfsstat(buf []Statfs_t, flags int) (n int, err error) {\n\tvar (\n\t\t_p0     unsafe.Pointer\n\t\tbufsize uintptr\n\t)\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t\tbufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))\n\t}\n\tr0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\n//sys\tsysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL\n\nfunc Uname(uname *Utsname) error {\n\tmib := []_C_int{CTL_KERN, KERN_OSTYPE}\n\tn := unsafe.Sizeof(uname.Sysname)\n\t// Suppress ENOMEM errors to be compatible with the C library __xuname() implementation.\n\tif err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_HOSTNAME}\n\tn = unsafe.Sizeof(uname.Nodename)\n\tif err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn = unsafe.Sizeof(uname.Release)\n\tif err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_VERSION}\n\tn = unsafe.Sizeof(uname.Version)\n\tif err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {\n\t\treturn err\n\t}\n\n\t// The version might have newlines or tabs in it, convert them to\n\t// spaces.\n\tfor i, b := range uname.Version {\n\t\tif b == '\\n' || b == '\\t' {\n\t\t\tif i == len(uname.Version)-1 {\n\t\t\t\tuname.Version[i] = 0\n\t\t\t} else {\n\t\t\t\tuname.Version[i] = ' '\n\t\t\t}\n\t\t}\n\t}\n\n\tmib = []_C_int{CTL_HW, HW_MACHINE}\n\tn = unsafe.Sizeof(uname.Machine)\n\tif err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc Stat(path string, st *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, st, 0)\n}\n\nfunc Lstat(path string, st *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)\n}\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\treturn Getdirentries(fd, buf, nil)\n}\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\tif basep == nil || unsafe.Sizeof(*basep) == 8 {\n\t\treturn getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))\n\t}\n\t// The syscall needs a 64-bit base. On 32-bit machines\n\t// we can't just use the basep passed in. See #32498.\n\tvar base uint64 = uint64(*basep)\n\tn, err = getdirentries(fd, buf, &base)\n\t*basep = uintptr(base)\n\tif base>>32 != 0 {\n\t\t// We can't stuff the base back into a uintptr, so any\n\t\t// future calls would be suspect. Generate an error.\n\t\t// EIO is allowed by getdirentries.\n\t\terr = EIO\n\t}\n\treturn\n}\n\nfunc Mknod(path string, mode uint32, dev uint64) (err error) {\n\treturn Mknodat(AT_FDCWD, path, mode, dev)\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\n//sys\tptrace(request int, pid int, addr uintptr, data int) (err error)\n//sys\tptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) = SYS_PTRACE\n\nfunc PtraceAttach(pid int) (err error) {\n\treturn ptrace(PT_ATTACH, pid, 0, 0)\n}\n\nfunc PtraceCont(pid int, signal int) (err error) {\n\treturn ptrace(PT_CONTINUE, pid, 1, signal)\n}\n\nfunc PtraceDetach(pid int) (err error) {\n\treturn ptrace(PT_DETACH, pid, 1, 0)\n}\n\nfunc PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {\n\treturn ptracePtr(PT_GETFPREGS, pid, unsafe.Pointer(fpregsout), 0)\n}\n\nfunc PtraceGetRegs(pid int, regsout *Reg) (err error) {\n\treturn ptracePtr(PT_GETREGS, pid, unsafe.Pointer(regsout), 0)\n}\n\nfunc PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {\n\tioDesc := PtraceIoDesc{\n\t\tOp:   int32(req),\n\t\tOffs: offs,\n\t}\n\tif countin > 0 {\n\t\t_ = out[:countin] // check bounds\n\t\tioDesc.Addr = &out[0]\n\t} else if out != nil {\n\t\tioDesc.Addr = (*byte)(unsafe.Pointer(&_zero))\n\t}\n\tioDesc.SetLen(countin)\n\n\terr = ptracePtr(PT_IO, pid, unsafe.Pointer(&ioDesc), 0)\n\treturn int(ioDesc.Len), err\n}\n\nfunc PtraceLwpEvents(pid int, enable int) (err error) {\n\treturn ptrace(PT_LWP_EVENTS, pid, 0, enable)\n}\n\nfunc PtraceLwpInfo(pid int, info *PtraceLwpInfoStruct) (err error) {\n\treturn ptracePtr(PT_LWPINFO, pid, unsafe.Pointer(info), int(unsafe.Sizeof(*info)))\n}\n\nfunc PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {\n\treturn PtraceIO(PIOD_READ_D, pid, addr, out, SizeofLong)\n}\n\nfunc PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {\n\treturn PtraceIO(PIOD_READ_I, pid, addr, out, SizeofLong)\n}\n\nfunc PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {\n\treturn PtraceIO(PIOD_WRITE_D, pid, addr, data, SizeofLong)\n}\n\nfunc PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {\n\treturn PtraceIO(PIOD_WRITE_I, pid, addr, data, SizeofLong)\n}\n\nfunc PtraceSetRegs(pid int, regs *Reg) (err error) {\n\treturn ptracePtr(PT_SETREGS, pid, unsafe.Pointer(regs), 0)\n}\n\nfunc PtraceSingleStep(pid int) (err error) {\n\treturn ptrace(PT_STEP, pid, 1, 0)\n}\n\nfunc Dup3(oldfd, newfd, flags int) error {\n\tif oldfd == newfd || flags&^O_CLOEXEC != 0 {\n\t\treturn EINVAL\n\t}\n\thow := F_DUP2FD\n\tif flags&O_CLOEXEC != 0 {\n\t\thow = F_DUP2FD_CLOEXEC\n\t}\n\t_, err := fcntl(oldfd, how, newfd)\n\treturn err\n}\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tCapEnter() (err error)\n//sys\tcapRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET\n//sys\tcapRightsLimit(fd int, rightsp *CapRights) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChflags(path string, flags int) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(from int, to int) (err error)\n//sys\tExit(code int)\n//sys\tExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchflags(fd int, flags int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, stat *Statfs_t) (err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sys\tgetdirentries(fd int, buf []byte, basep *uint64) (n int, err error)\n//sys\tGetdtablesize() (size int)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (uid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgrp int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tIssetugid() (tainted bool)\n//sys\tKill(pid int, signum syscall.Signal) (err error)\n//sys\tKqueue() (fd int, err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tLinkat(pathfd int, path string, linkfd int, link string, flags int) (err error)\n//sys\tListen(s int, backlog int) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMknodat(fd int, path string, mode uint32, dev uint64) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(fdat int, path string, mode int, perm uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tReadlinkat(dirfd int, path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(fromfd int, from string, tofd int, to string) (err error)\n//sys\tRevoke(path string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sysnb\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sys\tSetlogin(name string) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetresgid(rgid int, egid int, sgid int) (err error)\n//sysnb\tSetresuid(ruid int, euid int, suid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tp *Timeval) (err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tStatfs(path string, stat *Statfs_t) (err error)\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSync() (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUmask(newmask int) (oldmask int)\n//sys\tUndelete(path string) (err error)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUnmount(path string, flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\taccept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd_386.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 && freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (d *PtraceIoDesc) SetLen(length int) {\n\td.Len = uint32(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\nfunc PtraceGetFsBase(pid int, fsbase *int64) (err error) {\n\treturn ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (d *PtraceIoDesc) SetLen(length int) {\n\td.Len = uint64(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\nfunc PtraceGetFsBase(pid int, fsbase *int64) (err error) {\n\treturn ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm && freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (d *PtraceIoDesc) SetLen(length int) {\n\td.Len = uint32(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm64 && freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (d *PtraceIoDesc) SetLen(length int) {\n\td.Len = uint64(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build riscv64 && freebsd\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (d *PtraceIoDesc) SetLen(length int) {\n\td.Len = uint64(length)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tvar writtenOut uint64 = 0\n\t_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)\n\n\twritten = int(writtenOut)\n\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\nfunc Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_hurd.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build hurd\n\npackage unix\n\n/*\n#include <stdint.h>\nint ioctl(int, unsigned long int, uintptr_t);\n*/\nimport \"C\"\nimport \"unsafe\"\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\tr0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\tr0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_hurd_386.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 && hurd\n\npackage unix\n\nconst (\n\tTIOCGETA = 0x62251713\n)\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_illumos.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// illumos system calls not present on Solaris.\n\n//go:build amd64 && illumos\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\nfunc bytes2iovec(bs [][]byte) []Iovec {\n\tiovecs := make([]Iovec, len(bs))\n\tfor i, b := range bs {\n\t\tiovecs[i].SetLen(len(b))\n\t\tif len(b) > 0 {\n\t\t\tiovecs[i].Base = &b[0]\n\t\t} else {\n\t\t\tiovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))\n\t\t}\n\t}\n\treturn iovecs\n}\n\n//sys\treadv(fd int, iovs []Iovec) (n int, err error)\n\nfunc Readv(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := bytes2iovec(iovs)\n\tn, err = readv(fd, iovecs)\n\treturn n, err\n}\n\n//sys\tpreadv(fd int, iovs []Iovec, off int64) (n int, err error)\n\nfunc Preadv(fd int, iovs [][]byte, off int64) (n int, err error) {\n\tiovecs := bytes2iovec(iovs)\n\tn, err = preadv(fd, iovecs, off)\n\treturn n, err\n}\n\n//sys\twritev(fd int, iovs []Iovec) (n int, err error)\n\nfunc Writev(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := bytes2iovec(iovs)\n\tn, err = writev(fd, iovecs)\n\treturn n, err\n}\n\n//sys\tpwritev(fd int, iovs []Iovec, off int64) (n int, err error)\n\nfunc Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {\n\tiovecs := bytes2iovec(iovs)\n\tn, err = pwritev(fd, iovecs, off)\n\treturn n, err\n}\n\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libsocket.accept4\n\nfunc Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, flags)\n\tif err != nil {\n\t\treturn\n\t}\n\tif len > SizeofSockaddrAny {\n\t\tpanic(\"RawSockaddrAny too small\")\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Linux system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and\n// wrap it in our own nicer implementation.\n\npackage unix\n\nimport (\n\t\"encoding/binary\"\n\t\"slices\"\n\t\"strconv\"\n\t\"syscall\"\n\t\"time\"\n\t\"unsafe\"\n)\n\n/*\n * Wrapped\n */\n\nfunc Access(path string, mode uint32) (err error) {\n\treturn Faccessat(AT_FDCWD, path, mode, 0)\n}\n\nfunc Chmod(path string, mode uint32) (err error) {\n\treturn Fchmodat(AT_FDCWD, path, mode, 0)\n}\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\treturn Fchownat(AT_FDCWD, path, uid, gid, 0)\n}\n\nfunc Creat(path string, mode uint32) (fd int, err error) {\n\treturn Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)\n}\n\nfunc EpollCreate(size int) (fd int, err error) {\n\tif size <= 0 {\n\t\treturn -1, EINVAL\n\t}\n\treturn EpollCreate1(0)\n}\n\n//sys\tFanotifyInit(flags uint, event_f_flags uint) (fd int, err error)\n//sys\tfanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)\n\nfunc FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) {\n\tif pathname == \"\" {\n\t\treturn fanotifyMark(fd, flags, mask, dirFd, nil)\n\t}\n\tp, err := BytePtrFromString(pathname)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn fanotifyMark(fd, flags, mask, dirFd, p)\n}\n\n//sys\tfchmodat(dirfd int, path string, mode uint32) (err error)\n//sys\tfchmodat2(dirfd int, path string, mode uint32, flags int) (err error)\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) error {\n\t// Linux fchmodat doesn't support the flags parameter, but fchmodat2 does.\n\t// Try fchmodat2 if flags are specified.\n\tif flags != 0 {\n\t\terr := fchmodat2(dirfd, path, mode, flags)\n\t\tif err == ENOSYS {\n\t\t\t// fchmodat2 isn't available. If the flags are known to be valid,\n\t\t\t// return EOPNOTSUPP to indicate that fchmodat doesn't support them.\n\t\t\tif flags&^(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 {\n\t\t\t\treturn EINVAL\n\t\t\t} else if flags&(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 {\n\t\t\t\treturn EOPNOTSUPP\n\t\t\t}\n\t\t}\n\t\treturn err\n\t}\n\treturn fchmodat(dirfd, path, mode)\n}\n\nfunc InotifyInit() (fd int, err error) {\n\treturn InotifyInit1(0)\n}\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\n// ioctl itself should not be exposed directly, but additional get/set functions\n// for specific types are permissible. These are defined in ioctl.go and\n// ioctl_linux.go.\n//\n// The third argument to ioctl is often a pointer but sometimes an integer.\n// Callers should use ioctlPtr when the third argument is a pointer and ioctl\n// when the third argument is an integer.\n//\n// TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.\n\n//sys\tLinkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)\n\nfunc Link(oldpath string, newpath string) (err error) {\n\treturn Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)\n}\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\treturn Mkdirat(AT_FDCWD, path, mode)\n}\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\treturn Mknodat(AT_FDCWD, path, mode, dev)\n}\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\treturn openat(AT_FDCWD, path, mode|O_LARGEFILE, perm)\n}\n\n//sys\topenat(dirfd int, path string, flags int, mode uint32) (fd int, err error)\n\nfunc Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\treturn openat(dirfd, path, flags|O_LARGEFILE, mode)\n}\n\n//sys\topenat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)\n\nfunc Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {\n\treturn openat2(dirfd, path, how, SizeofOpenHow)\n}\n\nfunc Pipe(p []int) error {\n\treturn Pipe2(p, 0)\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) error {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn err\n}\n\n//sys\tppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)\n\nfunc Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn ppoll(nil, 0, timeout, sigmask)\n\t}\n\treturn ppoll(&fds[0], len(fds), timeout, sigmask)\n}\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout >= 0 {\n\t\tts = new(Timespec)\n\t\t*ts = NsecToTimespec(int64(timeout) * 1e6)\n\t}\n\treturn Ppoll(fds, ts, nil)\n}\n\n//sys\tReadlinkat(dirfd int, path string, buf []byte) (n int, err error)\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\treturn Readlinkat(AT_FDCWD, path, buf)\n}\n\nfunc Rename(oldpath string, newpath string) (err error) {\n\treturn Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath)\n}\n\nfunc Rmdir(path string) error {\n\treturn Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)\n}\n\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n\nfunc Symlink(oldpath string, newpath string) (err error) {\n\treturn Symlinkat(oldpath, AT_FDCWD, newpath)\n}\n\nfunc Unlink(path string) error {\n\treturn Unlinkat(AT_FDCWD, path, 0)\n}\n\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n\nfunc Utimes(path string, tv []Timeval) error {\n\tif tv == nil {\n\t\terr := utimensat(AT_FDCWD, path, nil, 0)\n\t\tif err != ENOSYS {\n\t\t\treturn err\n\t\t}\n\t\treturn utimes(path, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar ts [2]Timespec\n\tts[0] = NsecToTimespec(TimevalToNsec(tv[0]))\n\tts[1] = NsecToTimespec(TimevalToNsec(tv[1]))\n\terr := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n\nfunc UtimesNano(path string, ts []Timespec) error {\n\treturn UtimesNanoAt(AT_FDCWD, path, ts, 0)\n}\n\nfunc UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {\n\tif ts == nil {\n\t\treturn utimensat(dirfd, path, nil, flags)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)\n}\n\nfunc Futimesat(dirfd int, path string, tv []Timeval) error {\n\tif tv == nil {\n\t\treturn futimesat(dirfd, path, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn futimesat(dirfd, path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\nfunc Futimes(fd int, tv []Timeval) (err error) {\n\t// Believe it or not, this is the best we can do on Linux\n\t// (and is what glibc does).\n\treturn Utimes(\"/proc/self/fd/\"+strconv.Itoa(fd), tv)\n}\n\nconst ImplementsGetwd = true\n\n//sys\tGetcwd(buf []byte) (n int, err error)\n\nfunc Getwd() (wd string, err error) {\n\tvar buf [PathMax]byte\n\tn, err := Getcwd(buf[0:])\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t// Getcwd returns the number of bytes written to buf, including the NUL.\n\tif n < 1 || n > len(buf) || buf[n-1] != 0 {\n\t\treturn \"\", EINVAL\n\t}\n\t// In some cases, Linux can return a path that starts with the\n\t// \"(unreachable)\" prefix, which can potentially be a valid relative\n\t// path. To work around that, return ENOENT if path is not absolute.\n\tif buf[0] != '/' {\n\t\treturn \"\", ENOENT\n\t}\n\n\treturn string(buf[0 : n-1]), nil\n}\n\nfunc Getgroups() (gids []int, err error) {\n\tn, err := getgroups(0, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Sanity check group count. Max is 1<<16 on Linux.\n\tif n < 0 || n > 1<<20 {\n\t\treturn nil, EINVAL\n\t}\n\n\ta := make([]_Gid_t, n)\n\tn, err = getgroups(n, &a[0])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tgids = make([]int, n)\n\tfor i, v := range a[0:n] {\n\t\tgids[i] = int(v)\n\t}\n\treturn\n}\n\nfunc Setgroups(gids []int) (err error) {\n\tif len(gids) == 0 {\n\t\treturn setgroups(0, nil)\n\t}\n\n\ta := make([]_Gid_t, len(gids))\n\tfor i, v := range gids {\n\t\ta[i] = _Gid_t(v)\n\t}\n\treturn setgroups(len(a), &a[0])\n}\n\ntype WaitStatus uint32\n\n// Wait status is 7 bits at bottom, either 0 (exited),\n// 0x7F (stopped), or a signal number that caused an exit.\n// The 0x80 bit is whether there was a core dump.\n// An extra number (exit code, signal causing a stop)\n// is in the high bits. At least that's the idea.\n// There are various irregularities. For example, the\n// \"continued\" status is 0xFFFF, distinguishing itself\n// from stopped via the core dump bit.\n\nconst (\n\tmask    = 0x7F\n\tcore    = 0x80\n\texited  = 0x00\n\tstopped = 0x7F\n\tshift   = 8\n)\n\nfunc (w WaitStatus) Exited() bool { return w&mask == exited }\n\nfunc (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }\n\nfunc (w WaitStatus) Stopped() bool { return w&0xFF == stopped }\n\nfunc (w WaitStatus) Continued() bool { return w == 0xFFFF }\n\nfunc (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }\n\nfunc (w WaitStatus) ExitStatus() int {\n\tif !w.Exited() {\n\t\treturn -1\n\t}\n\treturn int(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) Signal() syscall.Signal {\n\tif !w.Signaled() {\n\t\treturn -1\n\t}\n\treturn syscall.Signal(w & mask)\n}\n\nfunc (w WaitStatus) StopSignal() syscall.Signal {\n\tif !w.Stopped() {\n\t\treturn -1\n\t}\n\treturn syscall.Signal(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) TrapCause() int {\n\tif w.StopSignal() != SIGTRAP {\n\t\treturn -1\n\t}\n\treturn int(w>>shift) >> 8\n}\n\n//sys\twait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)\n\nfunc Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\tvar status _C_int\n\twpid, err = wait4(pid, &status, options, rusage)\n\tif wstatus != nil {\n\t\t*wstatus = WaitStatus(status)\n\t}\n\treturn\n}\n\n//sys\tWaitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)\n\nfunc Mkfifo(path string, mode uint32) error {\n\treturn Mknod(path, mode|S_IFIFO, 0)\n}\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) error {\n\treturn Mknodat(dirfd, path, mode|S_IFIFO, 0)\n}\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n >= len(sa.raw.Path) {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_UNIX\n\tfor i := range n {\n\t\tsa.raw.Path[i] = int8(name[i])\n\t}\n\t// length is family (uint16), name, NUL.\n\tsl := _Socklen(2)\n\tif n > 0 {\n\t\tsl += _Socklen(n) + 1\n\t}\n\tif sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {\n\t\t// Check sl > 3 so we don't change unnamed socket behavior.\n\t\tsa.raw.Path[0] = 0\n\t\t// Don't count trailing NUL for abstract address.\n\t\tsl--\n\t}\n\n\treturn unsafe.Pointer(&sa.raw), sl, nil\n}\n\n// SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets.\ntype SockaddrLinklayer struct {\n\tProtocol uint16\n\tIfindex  int\n\tHatype   uint16\n\tPkttype  uint8\n\tHalen    uint8\n\tAddr     [8]byte\n\traw      RawSockaddrLinklayer\n}\n\nfunc (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_PACKET\n\tsa.raw.Protocol = sa.Protocol\n\tsa.raw.Ifindex = int32(sa.Ifindex)\n\tsa.raw.Hatype = sa.Hatype\n\tsa.raw.Pkttype = sa.Pkttype\n\tsa.raw.Halen = sa.Halen\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil\n}\n\n// SockaddrNetlink implements the Sockaddr interface for AF_NETLINK type sockets.\ntype SockaddrNetlink struct {\n\tFamily uint16\n\tPad    uint16\n\tPid    uint32\n\tGroups uint32\n\traw    RawSockaddrNetlink\n}\n\nfunc (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_NETLINK\n\tsa.raw.Pad = sa.Pad\n\tsa.raw.Pid = sa.Pid\n\tsa.raw.Groups = sa.Groups\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil\n}\n\n// SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets\n// using the HCI protocol.\ntype SockaddrHCI struct {\n\tDev     uint16\n\tChannel uint16\n\traw     RawSockaddrHCI\n}\n\nfunc (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_BLUETOOTH\n\tsa.raw.Dev = sa.Dev\n\tsa.raw.Channel = sa.Channel\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil\n}\n\n// SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets\n// using the L2CAP protocol.\ntype SockaddrL2 struct {\n\tPSM      uint16\n\tCID      uint16\n\tAddr     [6]uint8\n\tAddrType uint8\n\traw      RawSockaddrL2\n}\n\nfunc (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_BLUETOOTH\n\tpsm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm))\n\tpsm[0] = byte(sa.PSM)\n\tpsm[1] = byte(sa.PSM >> 8)\n\tfor i := range len(sa.Addr) {\n\t\tsa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i]\n\t}\n\tcid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid))\n\tcid[0] = byte(sa.CID)\n\tcid[1] = byte(sa.CID >> 8)\n\tsa.raw.Bdaddr_type = sa.AddrType\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil\n}\n\n// SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets\n// using the RFCOMM protocol.\n//\n// Server example:\n//\n//\tfd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)\n//\t_ = unix.Bind(fd, &unix.SockaddrRFCOMM{\n//\t\tChannel: 1,\n//\t\tAddr:    [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00\n//\t})\n//\t_ = Listen(fd, 1)\n//\tnfd, sa, _ := Accept(fd)\n//\tfmt.Printf(\"conn addr=%v fd=%d\", sa.(*unix.SockaddrRFCOMM).Addr, nfd)\n//\tRead(nfd, buf)\n//\n// Client example:\n//\n//\tfd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)\n//\t_ = Connect(fd, &SockaddrRFCOMM{\n//\t\tChannel: 1,\n//\t\tAddr:    [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11\n//\t})\n//\tWrite(fd, []byte(`hello`))\ntype SockaddrRFCOMM struct {\n\t// Addr represents a bluetooth address, byte ordering is little-endian.\n\tAddr [6]uint8\n\n\t// Channel is a designated bluetooth channel, only 1-30 are available for use.\n\t// Since Linux 2.6.7 and further zero value is the first available channel.\n\tChannel uint8\n\n\traw RawSockaddrRFCOMM\n}\n\nfunc (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_BLUETOOTH\n\tsa.raw.Channel = sa.Channel\n\tsa.raw.Bdaddr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrRFCOMM, nil\n}\n\n// SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.\n// The RxID and TxID fields are used for transport protocol addressing in\n// (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with\n// zero values for CAN_RAW and CAN_BCM sockets as they have no meaning.\n//\n// The SockaddrCAN struct must be bound to the socket file descriptor\n// using Bind before the CAN socket can be used.\n//\n//\t// Read one raw CAN frame\n//\tfd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)\n//\taddr := &SockaddrCAN{Ifindex: index}\n//\tBind(fd, addr)\n//\tframe := make([]byte, 16)\n//\tRead(fd, frame)\n//\n// The full SocketCAN documentation can be found in the linux kernel\n// archives at: https://www.kernel.org/doc/Documentation/networking/can.txt\ntype SockaddrCAN struct {\n\tIfindex int\n\tRxID    uint32\n\tTxID    uint32\n\traw     RawSockaddrCAN\n}\n\nfunc (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_CAN\n\tsa.raw.Ifindex = int32(sa.Ifindex)\n\trx := (*[4]byte)(unsafe.Pointer(&sa.RxID))\n\tfor i := range 4 {\n\t\tsa.raw.Addr[i] = rx[i]\n\t}\n\ttx := (*[4]byte)(unsafe.Pointer(&sa.TxID))\n\tfor i := range 4 {\n\t\tsa.raw.Addr[i+4] = tx[i]\n\t}\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil\n}\n\n// SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939\n// protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information\n// on the purposes of the fields, check the official linux kernel documentation\n// available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst\ntype SockaddrCANJ1939 struct {\n\tIfindex int\n\tName    uint64\n\tPGN     uint32\n\tAddr    uint8\n\traw     RawSockaddrCAN\n}\n\nfunc (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_CAN\n\tsa.raw.Ifindex = int32(sa.Ifindex)\n\tn := (*[8]byte)(unsafe.Pointer(&sa.Name))\n\tfor i := range 8 {\n\t\tsa.raw.Addr[i] = n[i]\n\t}\n\tp := (*[4]byte)(unsafe.Pointer(&sa.PGN))\n\tfor i := range 4 {\n\t\tsa.raw.Addr[i+8] = p[i]\n\t}\n\tsa.raw.Addr[12] = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil\n}\n\n// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.\n// SockaddrALG enables userspace access to the Linux kernel's cryptography\n// subsystem. The Type and Name fields specify which type of hash or cipher\n// should be used with a given socket.\n//\n// To create a file descriptor that provides access to a hash or cipher, both\n// Bind and Accept must be used. Once the setup process is complete, input\n// data can be written to the socket, processed by the kernel, and then read\n// back as hash output or ciphertext.\n//\n// Here is an example of using an AF_ALG socket with SHA1 hashing.\n// The initial socket setup process is as follows:\n//\n//\t// Open a socket to perform SHA1 hashing.\n//\tfd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)\n//\taddr := &unix.SockaddrALG{Type: \"hash\", Name: \"sha1\"}\n//\tunix.Bind(fd, addr)\n//\t// Note: unix.Accept does not work at this time; must invoke accept()\n//\t// manually using unix.Syscall.\n//\thashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)\n//\n// Once a file descriptor has been returned from Accept, it may be used to\n// perform SHA1 hashing. The descriptor is not safe for concurrent use, but\n// may be re-used repeatedly with subsequent Write and Read operations.\n//\n// When hashing a small byte slice or string, a single Write and Read may\n// be used:\n//\n//\t// Assume hashfd is already configured using the setup process.\n//\thash := os.NewFile(hashfd, \"sha1\")\n//\t// Hash an input string and read the results. Each Write discards\n//\t// previous hash state. Read always reads the current state.\n//\tb := make([]byte, 20)\n//\tfor i := 0; i < 2; i++ {\n//\t    io.WriteString(hash, \"Hello, world.\")\n//\t    hash.Read(b)\n//\t    fmt.Println(hex.EncodeToString(b))\n//\t}\n//\t// Output:\n//\t// 2ae01472317d1935a84797ec1983ae243fc6aa28\n//\t// 2ae01472317d1935a84797ec1983ae243fc6aa28\n//\n// For hashing larger byte slices, or byte streams such as those read from\n// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update\n// the hash digest instead of creating a new one for a given chunk and finalizing it.\n//\n//\t// Assume hashfd and addr are already configured using the setup process.\n//\thash := os.NewFile(hashfd, \"sha1\")\n//\t// Hash the contents of a file.\n//\tf, _ := os.Open(\"/tmp/linux-4.10-rc7.tar.xz\")\n//\tb := make([]byte, 4096)\n//\tfor {\n//\t    n, err := f.Read(b)\n//\t    if err == io.EOF {\n//\t        break\n//\t    }\n//\t    unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)\n//\t}\n//\thash.Read(b)\n//\tfmt.Println(hex.EncodeToString(b))\n//\t// Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5\n//\n// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.\ntype SockaddrALG struct {\n\tType    string\n\tName    string\n\tFeature uint32\n\tMask    uint32\n\traw     RawSockaddrALG\n}\n\nfunc (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\t// Leave room for NUL byte terminator.\n\tif len(sa.Type) > len(sa.raw.Type)-1 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tif len(sa.Name) > len(sa.raw.Name)-1 {\n\t\treturn nil, 0, EINVAL\n\t}\n\n\tsa.raw.Family = AF_ALG\n\tsa.raw.Feat = sa.Feature\n\tsa.raw.Mask = sa.Mask\n\n\tcopy(sa.raw.Type[:], sa.Type)\n\tcopy(sa.raw.Name[:], sa.Name)\n\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil\n}\n\n// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.\n// SockaddrVM provides access to Linux VM sockets: a mechanism that enables\n// bidirectional communication between a hypervisor and its guest virtual\n// machines.\ntype SockaddrVM struct {\n\t// CID and Port specify a context ID and port address for a VM socket.\n\t// Guests have a unique CID, and hosts may have a well-known CID of:\n\t//  - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.\n\t//  - VMADDR_CID_LOCAL: refers to local communication (loopback).\n\t//  - VMADDR_CID_HOST: refers to other processes on the host.\n\tCID   uint32\n\tPort  uint32\n\tFlags uint8\n\traw   RawSockaddrVM\n}\n\nfunc (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_VSOCK\n\tsa.raw.Port = sa.Port\n\tsa.raw.Cid = sa.CID\n\tsa.raw.Flags = sa.Flags\n\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil\n}\n\ntype SockaddrXDP struct {\n\tFlags        uint16\n\tIfindex      uint32\n\tQueueID      uint32\n\tSharedUmemFD uint32\n\traw          RawSockaddrXDP\n}\n\nfunc (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_XDP\n\tsa.raw.Flags = sa.Flags\n\tsa.raw.Ifindex = sa.Ifindex\n\tsa.raw.Queue_id = sa.QueueID\n\tsa.raw.Shared_umem_fd = sa.SharedUmemFD\n\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil\n}\n\n// This constant mirrors the #define of PX_PROTO_OE in\n// linux/if_pppox.h. We're defining this by hand here instead of\n// autogenerating through mkerrors.sh because including\n// linux/if_pppox.h causes some declaration conflicts with other\n// includes (linux/if_pppox.h includes linux/in.h, which conflicts\n// with netinet/in.h). Given that we only need a single zero constant\n// out of that file, it's cleaner to just define it by hand here.\nconst px_proto_oe = 0\n\ntype SockaddrPPPoE struct {\n\tSID    uint16\n\tRemote []byte\n\tDev    string\n\traw    RawSockaddrPPPoX\n}\n\nfunc (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif len(sa.Remote) != 6 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tif len(sa.Dev) > IFNAMSIZ-1 {\n\t\treturn nil, 0, EINVAL\n\t}\n\n\t*(*uint16)(unsafe.Pointer(&sa.raw[0])) = AF_PPPOX\n\t// This next field is in host-endian byte order. We can't use the\n\t// same unsafe pointer cast as above, because this value is not\n\t// 32-bit aligned and some architectures don't allow unaligned\n\t// access.\n\t//\n\t// However, the value of px_proto_oe is 0, so we can use\n\t// encoding/binary helpers to write the bytes without worrying\n\t// about the ordering.\n\tbinary.BigEndian.PutUint32(sa.raw[2:6], px_proto_oe)\n\t// This field is deliberately big-endian, unlike the previous\n\t// one. The kernel expects SID to be in network byte order.\n\tbinary.BigEndian.PutUint16(sa.raw[6:8], sa.SID)\n\tcopy(sa.raw[8:14], sa.Remote)\n\tclear(sa.raw[14 : 14+IFNAMSIZ])\n\tcopy(sa.raw[14:], sa.Dev)\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil\n}\n\n// SockaddrTIPC implements the Sockaddr interface for AF_TIPC type sockets.\n// For more information on TIPC, see: http://tipc.sourceforge.net/.\ntype SockaddrTIPC struct {\n\t// Scope is the publication scopes when binding service/service range.\n\t// Should be set to TIPC_CLUSTER_SCOPE or TIPC_NODE_SCOPE.\n\tScope int\n\n\t// Addr is the type of address used to manipulate a socket. Addr must be\n\t// one of:\n\t//  - *TIPCSocketAddr: \"id\" variant in the C addr union\n\t//  - *TIPCServiceRange: \"nameseq\" variant in the C addr union\n\t//  - *TIPCServiceName: \"name\" variant in the C addr union\n\t//\n\t// If nil, EINVAL will be returned when the structure is used.\n\tAddr TIPCAddr\n\n\traw RawSockaddrTIPC\n}\n\n// TIPCAddr is implemented by types that can be used as an address for\n// SockaddrTIPC. It is only implemented by *TIPCSocketAddr, *TIPCServiceRange,\n// and *TIPCServiceName.\ntype TIPCAddr interface {\n\ttipcAddrtype() uint8\n\ttipcAddr() [12]byte\n}\n\nfunc (sa *TIPCSocketAddr) tipcAddr() [12]byte {\n\tvar out [12]byte\n\tcopy(out[:], (*(*[unsafe.Sizeof(TIPCSocketAddr{})]byte)(unsafe.Pointer(sa)))[:])\n\treturn out\n}\n\nfunc (sa *TIPCSocketAddr) tipcAddrtype() uint8 { return TIPC_SOCKET_ADDR }\n\nfunc (sa *TIPCServiceRange) tipcAddr() [12]byte {\n\tvar out [12]byte\n\tcopy(out[:], (*(*[unsafe.Sizeof(TIPCServiceRange{})]byte)(unsafe.Pointer(sa)))[:])\n\treturn out\n}\n\nfunc (sa *TIPCServiceRange) tipcAddrtype() uint8 { return TIPC_SERVICE_RANGE }\n\nfunc (sa *TIPCServiceName) tipcAddr() [12]byte {\n\tvar out [12]byte\n\tcopy(out[:], (*(*[unsafe.Sizeof(TIPCServiceName{})]byte)(unsafe.Pointer(sa)))[:])\n\treturn out\n}\n\nfunc (sa *TIPCServiceName) tipcAddrtype() uint8 { return TIPC_SERVICE_ADDR }\n\nfunc (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Addr == nil {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_TIPC\n\tsa.raw.Scope = int8(sa.Scope)\n\tsa.raw.Addrtype = sa.Addr.tipcAddrtype()\n\tsa.raw.Addr = sa.Addr.tipcAddr()\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil\n}\n\n// SockaddrL2TPIP implements the Sockaddr interface for IPPROTO_L2TP/AF_INET sockets.\ntype SockaddrL2TPIP struct {\n\tAddr   [4]byte\n\tConnId uint32\n\traw    RawSockaddrL2TPIP\n}\n\nfunc (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_INET\n\tsa.raw.Conn_id = sa.ConnId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil\n}\n\n// SockaddrL2TPIP6 implements the Sockaddr interface for IPPROTO_L2TP/AF_INET6 sockets.\ntype SockaddrL2TPIP6 struct {\n\tAddr   [16]byte\n\tZoneId uint32\n\tConnId uint32\n\traw    RawSockaddrL2TPIP6\n}\n\nfunc (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_INET6\n\tsa.raw.Conn_id = sa.ConnId\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil\n}\n\n// SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets.\ntype SockaddrIUCV struct {\n\tUserID string\n\tName   string\n\traw    RawSockaddrIUCV\n}\n\nfunc (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Family = AF_IUCV\n\t// These are EBCDIC encoded by the kernel, but we still need to pad them\n\t// with blanks. Initializing with blanks allows the caller to feed in either\n\t// a padded or an unpadded string.\n\tfor i := range 8 {\n\t\tsa.raw.Nodeid[i] = ' '\n\t\tsa.raw.User_id[i] = ' '\n\t\tsa.raw.Name[i] = ' '\n\t}\n\tif len(sa.UserID) > 8 || len(sa.Name) > 8 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tfor i, b := range []byte(sa.UserID[:]) {\n\t\tsa.raw.User_id[i] = int8(b)\n\t}\n\tfor i, b := range []byte(sa.Name[:]) {\n\t\tsa.raw.Name[i] = int8(b)\n\t}\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil\n}\n\ntype SockaddrNFC struct {\n\tDeviceIdx   uint32\n\tTargetIdx   uint32\n\tNFCProtocol uint32\n\traw         RawSockaddrNFC\n}\n\nfunc (sa *SockaddrNFC) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Sa_family = AF_NFC\n\tsa.raw.Dev_idx = sa.DeviceIdx\n\tsa.raw.Target_idx = sa.TargetIdx\n\tsa.raw.Nfc_protocol = sa.NFCProtocol\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrNFC, nil\n}\n\ntype SockaddrNFCLLCP struct {\n\tDeviceIdx      uint32\n\tTargetIdx      uint32\n\tNFCProtocol    uint32\n\tDestinationSAP uint8\n\tSourceSAP      uint8\n\tServiceName    string\n\traw            RawSockaddrNFCLLCP\n}\n\nfunc (sa *SockaddrNFCLLCP) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tsa.raw.Sa_family = AF_NFC\n\tsa.raw.Dev_idx = sa.DeviceIdx\n\tsa.raw.Target_idx = sa.TargetIdx\n\tsa.raw.Nfc_protocol = sa.NFCProtocol\n\tsa.raw.Dsap = sa.DestinationSAP\n\tsa.raw.Ssap = sa.SourceSAP\n\tif len(sa.ServiceName) > len(sa.raw.Service_name) {\n\t\treturn nil, 0, EINVAL\n\t}\n\tcopy(sa.raw.Service_name[:], sa.ServiceName)\n\tsa.raw.SetServiceNameLen(len(sa.ServiceName))\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrNFCLLCP, nil\n}\n\nvar socketProtocol = func(fd int) (int, error) {\n\treturn GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)\n}\n\nfunc anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\tcase AF_NETLINK:\n\t\tpp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrNetlink)\n\t\tsa.Family = pp.Family\n\t\tsa.Pad = pp.Pad\n\t\tsa.Pid = pp.Pid\n\t\tsa.Groups = pp.Groups\n\t\treturn sa, nil\n\n\tcase AF_PACKET:\n\t\tpp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrLinklayer)\n\t\tsa.Protocol = pp.Protocol\n\t\tsa.Ifindex = int(pp.Ifindex)\n\t\tsa.Hatype = pp.Hatype\n\t\tsa.Pkttype = pp.Pkttype\n\t\tsa.Halen = pp.Halen\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrUnix)\n\t\tif pp.Path[0] == 0 {\n\t\t\t// \"Abstract\" Unix domain socket.\n\t\t\t// Rewrite leading NUL as @ for textual display.\n\t\t\t// (This is the standard convention.)\n\t\t\t// Not friendly to overwrite in place,\n\t\t\t// but the callers below don't care.\n\t\t\tpp.Path[0] = '@'\n\t\t}\n\n\t\t// Assume path ends at NUL.\n\t\t// This is not technically the Linux semantics for\n\t\t// abstract Unix domain sockets--they are supposed\n\t\t// to be uninterpreted fixed-size binary blobs--but\n\t\t// everyone uses this convention.\n\t\tn := 0\n\t\tfor n < len(pp.Path) && pp.Path[n] != 0 {\n\t\t\tn++\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tproto, err := socketProtocol(fd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch proto {\n\t\tcase IPPROTO_L2TP:\n\t\t\tpp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))\n\t\t\tsa := new(SockaddrL2TPIP)\n\t\t\tsa.ConnId = pp.Conn_id\n\t\t\tsa.Addr = pp.Addr\n\t\t\treturn sa, nil\n\t\tdefault:\n\t\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\t\tsa := new(SockaddrInet4)\n\t\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\t\tsa.Addr = pp.Addr\n\t\t\treturn sa, nil\n\t\t}\n\n\tcase AF_INET6:\n\t\tproto, err := socketProtocol(fd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch proto {\n\t\tcase IPPROTO_L2TP:\n\t\t\tpp := (*RawSockaddrL2TPIP6)(unsafe.Pointer(rsa))\n\t\t\tsa := new(SockaddrL2TPIP6)\n\t\t\tsa.ConnId = pp.Conn_id\n\t\t\tsa.ZoneId = pp.Scope_id\n\t\t\tsa.Addr = pp.Addr\n\t\t\treturn sa, nil\n\t\tdefault:\n\t\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\t\tsa := new(SockaddrInet6)\n\t\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\t\tsa.ZoneId = pp.Scope_id\n\t\t\tsa.Addr = pp.Addr\n\t\t\treturn sa, nil\n\t\t}\n\n\tcase AF_VSOCK:\n\t\tpp := (*RawSockaddrVM)(unsafe.Pointer(rsa))\n\t\tsa := &SockaddrVM{\n\t\t\tCID:   pp.Cid,\n\t\t\tPort:  pp.Port,\n\t\t\tFlags: pp.Flags,\n\t\t}\n\t\treturn sa, nil\n\tcase AF_BLUETOOTH:\n\t\tproto, err := socketProtocol(fd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// only BTPROTO_L2CAP and BTPROTO_RFCOMM can accept connections\n\t\tswitch proto {\n\t\tcase BTPROTO_L2CAP:\n\t\t\tpp := (*RawSockaddrL2)(unsafe.Pointer(rsa))\n\t\t\tsa := &SockaddrL2{\n\t\t\t\tPSM:      pp.Psm,\n\t\t\t\tCID:      pp.Cid,\n\t\t\t\tAddr:     pp.Bdaddr,\n\t\t\t\tAddrType: pp.Bdaddr_type,\n\t\t\t}\n\t\t\treturn sa, nil\n\t\tcase BTPROTO_RFCOMM:\n\t\t\tpp := (*RawSockaddrRFCOMM)(unsafe.Pointer(rsa))\n\t\t\tsa := &SockaddrRFCOMM{\n\t\t\t\tChannel: pp.Channel,\n\t\t\t\tAddr:    pp.Bdaddr,\n\t\t\t}\n\t\t\treturn sa, nil\n\t\t}\n\tcase AF_XDP:\n\t\tpp := (*RawSockaddrXDP)(unsafe.Pointer(rsa))\n\t\tsa := &SockaddrXDP{\n\t\t\tFlags:        pp.Flags,\n\t\t\tIfindex:      pp.Ifindex,\n\t\t\tQueueID:      pp.Queue_id,\n\t\t\tSharedUmemFD: pp.Shared_umem_fd,\n\t\t}\n\t\treturn sa, nil\n\tcase AF_PPPOX:\n\t\tpp := (*RawSockaddrPPPoX)(unsafe.Pointer(rsa))\n\t\tif binary.BigEndian.Uint32(pp[2:6]) != px_proto_oe {\n\t\t\treturn nil, EINVAL\n\t\t}\n\t\tsa := &SockaddrPPPoE{\n\t\t\tSID:    binary.BigEndian.Uint16(pp[6:8]),\n\t\t\tRemote: pp[8:14],\n\t\t}\n\t\tfor i := 14; i < 14+IFNAMSIZ; i++ {\n\t\t\tif pp[i] == 0 {\n\t\t\t\tsa.Dev = string(pp[14:i])\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\treturn sa, nil\n\tcase AF_TIPC:\n\t\tpp := (*RawSockaddrTIPC)(unsafe.Pointer(rsa))\n\n\t\tsa := &SockaddrTIPC{\n\t\t\tScope: int(pp.Scope),\n\t\t}\n\n\t\t// Determine which union variant is present in pp.Addr by checking\n\t\t// pp.Addrtype.\n\t\tswitch pp.Addrtype {\n\t\tcase TIPC_SERVICE_RANGE:\n\t\t\tsa.Addr = (*TIPCServiceRange)(unsafe.Pointer(&pp.Addr))\n\t\tcase TIPC_SERVICE_ADDR:\n\t\t\tsa.Addr = (*TIPCServiceName)(unsafe.Pointer(&pp.Addr))\n\t\tcase TIPC_SOCKET_ADDR:\n\t\t\tsa.Addr = (*TIPCSocketAddr)(unsafe.Pointer(&pp.Addr))\n\t\tdefault:\n\t\t\treturn nil, EINVAL\n\t\t}\n\n\t\treturn sa, nil\n\tcase AF_IUCV:\n\t\tpp := (*RawSockaddrIUCV)(unsafe.Pointer(rsa))\n\n\t\tvar user [8]byte\n\t\tvar name [8]byte\n\n\t\tfor i := range 8 {\n\t\t\tuser[i] = byte(pp.User_id[i])\n\t\t\tname[i] = byte(pp.Name[i])\n\t\t}\n\n\t\tsa := &SockaddrIUCV{\n\t\t\tUserID: string(user[:]),\n\t\t\tName:   string(name[:]),\n\t\t}\n\t\treturn sa, nil\n\n\tcase AF_CAN:\n\t\tproto, err := socketProtocol(fd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tpp := (*RawSockaddrCAN)(unsafe.Pointer(rsa))\n\n\t\tswitch proto {\n\t\tcase CAN_J1939:\n\t\t\tsa := &SockaddrCANJ1939{\n\t\t\t\tIfindex: int(pp.Ifindex),\n\t\t\t}\n\t\t\tname := (*[8]byte)(unsafe.Pointer(&sa.Name))\n\t\t\tfor i := range 8 {\n\t\t\t\tname[i] = pp.Addr[i]\n\t\t\t}\n\t\t\tpgn := (*[4]byte)(unsafe.Pointer(&sa.PGN))\n\t\t\tfor i := range 4 {\n\t\t\t\tpgn[i] = pp.Addr[i+8]\n\t\t\t}\n\t\t\taddr := (*[1]byte)(unsafe.Pointer(&sa.Addr))\n\t\t\taddr[0] = pp.Addr[12]\n\t\t\treturn sa, nil\n\t\tdefault:\n\t\t\tsa := &SockaddrCAN{\n\t\t\t\tIfindex: int(pp.Ifindex),\n\t\t\t}\n\t\t\trx := (*[4]byte)(unsafe.Pointer(&sa.RxID))\n\t\t\tfor i := range 4 {\n\t\t\t\trx[i] = pp.Addr[i]\n\t\t\t}\n\t\t\ttx := (*[4]byte)(unsafe.Pointer(&sa.TxID))\n\t\t\tfor i := range 4 {\n\t\t\t\ttx[i] = pp.Addr[i+4]\n\t\t\t}\n\t\t\treturn sa, nil\n\t\t}\n\tcase AF_NFC:\n\t\tproto, err := socketProtocol(fd)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tswitch proto {\n\t\tcase NFC_SOCKPROTO_RAW:\n\t\t\tpp := (*RawSockaddrNFC)(unsafe.Pointer(rsa))\n\t\t\tsa := &SockaddrNFC{\n\t\t\t\tDeviceIdx:   pp.Dev_idx,\n\t\t\t\tTargetIdx:   pp.Target_idx,\n\t\t\t\tNFCProtocol: pp.Nfc_protocol,\n\t\t\t}\n\t\t\treturn sa, nil\n\t\tcase NFC_SOCKPROTO_LLCP:\n\t\t\tpp := (*RawSockaddrNFCLLCP)(unsafe.Pointer(rsa))\n\t\t\tif uint64(pp.Service_name_len) > uint64(len(pp.Service_name)) {\n\t\t\t\treturn nil, EINVAL\n\t\t\t}\n\t\t\tsa := &SockaddrNFCLLCP{\n\t\t\t\tDeviceIdx:      pp.Dev_idx,\n\t\t\t\tTargetIdx:      pp.Target_idx,\n\t\t\t\tNFCProtocol:    pp.Nfc_protocol,\n\t\t\t\tDestinationSAP: pp.Dsap,\n\t\t\t\tSourceSAP:      pp.Ssap,\n\t\t\t\tServiceName:    string(pp.Service_name[:pp.Service_name_len]),\n\t\t\t}\n\t\t\treturn sa, nil\n\t\tdefault:\n\t\t\treturn nil, EINVAL\n\t\t}\n\t}\n\treturn nil, EAFNOSUPPORT\n}\n\nfunc Accept(fd int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, 0)\n\tif err != nil {\n\t\treturn\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, flags)\n\tif err != nil {\n\t\treturn\n\t}\n\tif len > SizeofSockaddrAny {\n\t\tpanic(\"RawSockaddrAny too small\")\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc Getsockname(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getsockname(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\nfunc GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {\n\tvar value IPMreqn\n\tvallen := _Socklen(SizeofIPMreqn)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptUcred(fd, level, opt int) (*Ucred, error) {\n\tvar value Ucred\n\tvallen := _Socklen(SizeofUcred)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {\n\tvar value TCPInfo\n\tvallen := _Socklen(SizeofTCPInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\n// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the \"vegas\"\n// algorithm.\n//\n// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:\n//\n//\talgo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)\nfunc GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) {\n\tvar value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment\n\tvallen := _Socklen(SizeofTCPCCInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)\n\tout := (*TCPVegasInfo)(unsafe.Pointer(&value[0]))\n\treturn out, err\n}\n\n// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the \"dctp\"\n// algorithm.\n//\n// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:\n//\n//\talgo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)\nfunc GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) {\n\tvar value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment\n\tvallen := _Socklen(SizeofTCPCCInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)\n\tout := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0]))\n\treturn out, err\n}\n\n// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the \"bbr\"\n// algorithm.\n//\n// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:\n//\n//\talgo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)\nfunc GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) {\n\tvar value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment\n\tvallen := _Socklen(SizeofTCPCCInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)\n\tout := (*TCPBBRInfo)(unsafe.Pointer(&value[0]))\n\treturn out, err\n}\n\n// GetsockoptString returns the string value of the socket option opt for the\n// socket associated with fd at the given socket level.\nfunc GetsockoptString(fd, level, opt int) (string, error) {\n\tbuf := make([]byte, 256)\n\tvallen := _Socklen(len(buf))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)\n\tif err != nil {\n\t\tif err == ERANGE {\n\t\t\tbuf = make([]byte, vallen)\n\t\t\terr = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\treturn ByteSliceToString(buf[:vallen]), nil\n}\n\nfunc GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) {\n\tvar value TpacketStats\n\tvallen := _Socklen(SizeofTpacketStats)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, error) {\n\tvar value TpacketStatsV3\n\tvallen := _Socklen(SizeofTpacketStatsV3)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))\n}\n\nfunc SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))\n}\n\n// SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a\n// socket to filter incoming packets.  See 'man 7 socket' for usage information.\nfunc SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(fprog), unsafe.Sizeof(*fprog))\n}\n\nfunc SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error {\n\tvar p unsafe.Pointer\n\tif len(filter) > 0 {\n\t\tp = unsafe.Pointer(&filter[0])\n\t}\n\treturn setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter))\n}\n\nfunc SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))\n}\n\nfunc SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))\n}\n\nfunc SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {\n\tif len(o) == 0 {\n\t\treturn EINVAL\n\t}\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))\n}\n\nfunc SetsockoptTCPMD5Sig(fd, level, opt int, s *TCPMD5Sig) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(s), unsafe.Sizeof(*s))\n}\n\n// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)\n\n// KeyctlInt calls keyctl commands in which each argument is an int.\n// These commands are KEYCTL_REVOKE, KEYCTL_CHOWN, KEYCTL_CLEAR, KEYCTL_LINK,\n// KEYCTL_UNLINK, KEYCTL_NEGATE, KEYCTL_SET_REQKEY_KEYRING, KEYCTL_SET_TIMEOUT,\n// KEYCTL_ASSUME_AUTHORITY, KEYCTL_SESSION_TO_PARENT, KEYCTL_REJECT,\n// KEYCTL_INVALIDATE, and KEYCTL_GET_PERSISTENT.\n//sys\tKeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) = SYS_KEYCTL\n\n// KeyctlBuffer calls keyctl commands in which the third and fourth\n// arguments are a buffer and its length, respectively.\n// These commands are KEYCTL_UPDATE, KEYCTL_READ, and KEYCTL_INSTANTIATE.\n//sys\tKeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) = SYS_KEYCTL\n\n// KeyctlString calls keyctl commands which return a string.\n// These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY.\nfunc KeyctlString(cmd int, id int) (string, error) {\n\t// We must loop as the string data may change in between the syscalls.\n\t// We could allocate a large buffer here to reduce the chance that the\n\t// syscall needs to be called twice; however, this is unnecessary as\n\t// the performance loss is negligible.\n\tvar buffer []byte\n\tfor {\n\t\t// Try to fill the buffer with data\n\t\tlength, err := KeyctlBuffer(cmd, id, buffer, 0)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// Check if the data was written\n\t\tif length <= len(buffer) {\n\t\t\t// Exclude the null terminator\n\t\t\treturn string(buffer[:length-1]), nil\n\t\t}\n\n\t\t// Make a bigger buffer if needed\n\t\tbuffer = make([]byte, length)\n\t}\n}\n\n// Keyctl commands with special signatures.\n\n// KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html\nfunc KeyctlGetKeyringID(id int, create bool) (ringid int, err error) {\n\tcreateInt := 0\n\tif create {\n\t\tcreateInt = 1\n\t}\n\treturn KeyctlInt(KEYCTL_GET_KEYRING_ID, id, createInt, 0, 0)\n}\n\n// KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the\n// key handle permission mask as described in the \"keyctl setperm\" section of\n// http://man7.org/linux/man-pages/man1/keyctl.1.html.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html\nfunc KeyctlSetperm(id int, perm uint32) error {\n\t_, err := KeyctlInt(KEYCTL_SETPERM, id, int(perm), 0, 0)\n\treturn err\n}\n\n//sys\tkeyctlJoin(cmd int, arg2 string) (ret int, err error) = SYS_KEYCTL\n\n// KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html\nfunc KeyctlJoinSessionKeyring(name string) (ringid int, err error) {\n\treturn keyctlJoin(KEYCTL_JOIN_SESSION_KEYRING, name)\n}\n\n//sys\tkeyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) = SYS_KEYCTL\n\n// KeyctlSearch implements the KEYCTL_SEARCH command.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_search.3.html\nfunc KeyctlSearch(ringid int, keyType, description string, destRingid int) (id int, err error) {\n\treturn keyctlSearch(KEYCTL_SEARCH, ringid, keyType, description, destRingid)\n}\n\n//sys\tkeyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) = SYS_KEYCTL\n\n// KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This\n// command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice\n// of Iovec (each of which represents a buffer) instead of a single buffer.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html\nfunc KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error {\n\treturn keyctlIOV(KEYCTL_INSTANTIATE_IOV, id, payload, ringid)\n}\n\n//sys\tkeyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) = SYS_KEYCTL\n\n// KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command\n// computes a Diffie-Hellman shared secret based on the provide params. The\n// secret is written to the provided buffer and the returned size is the number\n// of bytes written (returning an error if there is insufficient space in the\n// buffer). If a nil buffer is passed in, this function returns the minimum\n// buffer length needed to store the appropriate data. Note that this differs\n// from KEYCTL_READ's behavior which always returns the requested payload size.\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html\nfunc KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error) {\n\treturn keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)\n}\n\n// KeyctlRestrictKeyring implements the KEYCTL_RESTRICT_KEYRING command. This\n// command limits the set of keys that can be linked to the keyring, regardless\n// of keyring permissions. The command requires the \"setattr\" permission.\n//\n// When called with an empty keyType the command locks the keyring, preventing\n// any further keys from being linked to the keyring.\n//\n// The \"asymmetric\" keyType defines restrictions requiring key payloads to be\n// DER encoded X.509 certificates signed by keys in another keyring. Restrictions\n// for \"asymmetric\" include \"builtin_trusted\", \"builtin_and_secondary_trusted\",\n// \"key_or_keyring:<key>\", and \"key_or_keyring:<key>:chain\".\n//\n// As of Linux 4.12, only the \"asymmetric\" keyType defines type-specific\n// restrictions.\n//\n// See the full documentation at:\n// http://man7.org/linux/man-pages/man3/keyctl_restrict_keyring.3.html\n// http://man7.org/linux/man-pages/man2/keyctl.2.html\nfunc KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error {\n\tif keyType == \"\" {\n\t\treturn keyctlRestrictKeyring(KEYCTL_RESTRICT_KEYRING, ringid)\n\t}\n\treturn keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction)\n}\n\n//sys\tkeyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL\n//sys\tkeyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL\n\nfunc recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(rsa))\n\tmsg.Namelen = uint32(SizeofSockaddrAny)\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\tif emptyIovecs(iov) {\n\t\t\tvar sockType int\n\t\t\tsockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)\n\t\t\tif err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// receive at least one normal byte\n\t\t\tif sockType != SOCK_DGRAM {\n\t\t\t\tvar iova [1]Iovec\n\t\t\t\tiova[0].Base = &dummy\n\t\t\t\tiova[0].SetLen(1)\n\t\t\t\tiov = iova[:]\n\t\t\t}\n\t\t}\n\t\tmsg.Control = &oob[0]\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = recvmsg(fd, &msg, flags); err != nil {\n\t\treturn\n\t}\n\toobn = int(msg.Controllen)\n\trecvflags = int(msg.Flags)\n\treturn\n}\n\nfunc sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(ptr)\n\tmsg.Namelen = uint32(salen)\n\tvar dummy byte\n\tvar empty bool\n\tif len(oob) > 0 {\n\t\tempty = emptyIovecs(iov)\n\t\tif empty {\n\t\t\tvar sockType int\n\t\t\tsockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\t// send at least one normal byte\n\t\t\tif sockType != SOCK_DGRAM {\n\t\t\t\tvar iova [1]Iovec\n\t\t\t\tiova[0].Base = &dummy\n\t\t\t\tiova[0].SetLen(1)\n\t\t\t\tiov = iova[:]\n\t\t\t}\n\t\t}\n\t\tmsg.Control = &oob[0]\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = sendmsg(fd, &msg, flags); err != nil {\n\t\treturn 0, err\n\t}\n\tif len(oob) > 0 && empty {\n\t\tn = 0\n\t}\n\treturn n, nil\n}\n\n// BindToDevice binds the socket associated with fd to device.\nfunc BindToDevice(fd int, device string) (err error) {\n\treturn SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)\n}\n\n//sys\tptrace(request int, pid int, addr uintptr, data uintptr) (err error)\n//sys\tptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) = SYS_PTRACE\n\nfunc ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {\n\t// The peek requests are machine-size oriented, so we wrap it\n\t// to retrieve arbitrary-length data.\n\n\t// The ptrace syscall differs from glibc's ptrace.\n\t// Peeks returns the word in *data, not as the return value.\n\n\tvar buf [SizeofPtr]byte\n\n\t// Leading edge. PEEKTEXT/PEEKDATA don't require aligned\n\t// access (PEEKUSER warns that it might), but if we don't\n\t// align our reads, we might straddle an unmapped page\n\t// boundary and not get the bytes leading up to the page\n\t// boundary.\n\tn := 0\n\tif addr%SizeofPtr != 0 {\n\t\terr = ptracePtr(req, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tn += copy(out, buf[addr%SizeofPtr:])\n\t\tout = out[n:]\n\t}\n\n\t// Remainder.\n\tfor len(out) > 0 {\n\t\t// We use an internal buffer to guarantee alignment.\n\t\t// It's not documented if this is necessary, but we're paranoid.\n\t\terr = ptracePtr(req, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tcopied := copy(out, buf[0:])\n\t\tn += copied\n\t\tout = out[copied:]\n\t}\n\n\treturn n, nil\n}\n\nfunc PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {\n\treturn ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)\n}\n\nfunc PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {\n\treturn ptracePeek(PTRACE_PEEKDATA, pid, addr, out)\n}\n\nfunc PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) {\n\treturn ptracePeek(PTRACE_PEEKUSR, pid, addr, out)\n}\n\nfunc ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {\n\t// As for ptracePeek, we need to align our accesses to deal\n\t// with the possibility of straddling an invalid page.\n\n\t// Leading edge.\n\tn := 0\n\tif addr%SizeofPtr != 0 {\n\t\tvar buf [SizeofPtr]byte\n\t\terr = ptracePtr(peekReq, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tn += copy(buf[addr%SizeofPtr:], data)\n\t\tword := *((*uintptr)(unsafe.Pointer(&buf[0])))\n\t\terr = ptrace(pokeReq, pid, addr-addr%SizeofPtr, word)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tdata = data[n:]\n\t}\n\n\t// Interior.\n\tfor len(data) > SizeofPtr {\n\t\tword := *((*uintptr)(unsafe.Pointer(&data[0])))\n\t\terr = ptrace(pokeReq, pid, addr+uintptr(n), word)\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tn += SizeofPtr\n\t\tdata = data[SizeofPtr:]\n\t}\n\n\t// Trailing edge.\n\tif len(data) > 0 {\n\t\tvar buf [SizeofPtr]byte\n\t\terr = ptracePtr(peekReq, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tcopy(buf[0:], data)\n\t\tword := *((*uintptr)(unsafe.Pointer(&buf[0])))\n\t\terr = ptrace(pokeReq, pid, addr+uintptr(n), word)\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tn += len(data)\n\t}\n\n\treturn n, nil\n}\n\nfunc PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {\n\treturn ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)\n}\n\nfunc PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {\n\treturn ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)\n}\n\nfunc PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {\n\treturn ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)\n}\n\n// elfNT_PRSTATUS is a copy of the debug/elf.NT_PRSTATUS constant so\n// x/sys/unix doesn't need to depend on debug/elf and thus\n// compress/zlib, debug/dwarf, and other packages.\nconst elfNT_PRSTATUS = 1\n\nfunc PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {\n\tvar iov Iovec\n\tiov.Base = (*byte)(unsafe.Pointer(regsout))\n\tiov.SetLen(int(unsafe.Sizeof(*regsout)))\n\treturn ptracePtr(PTRACE_GETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))\n}\n\nfunc PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {\n\tvar iov Iovec\n\tiov.Base = (*byte)(unsafe.Pointer(regs))\n\tiov.SetLen(int(unsafe.Sizeof(*regs)))\n\treturn ptracePtr(PTRACE_SETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))\n}\n\nfunc PtraceSetOptions(pid int, options int) (err error) {\n\treturn ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))\n}\n\nfunc PtraceGetEventMsg(pid int) (msg uint, err error) {\n\tvar data _C_long\n\terr = ptracePtr(PTRACE_GETEVENTMSG, pid, 0, unsafe.Pointer(&data))\n\tmsg = uint(data)\n\treturn\n}\n\nfunc PtraceCont(pid int, signal int) (err error) {\n\treturn ptrace(PTRACE_CONT, pid, 0, uintptr(signal))\n}\n\nfunc PtraceSyscall(pid int, signal int) (err error) {\n\treturn ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))\n}\n\nfunc PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }\n\nfunc PtraceInterrupt(pid int) (err error) { return ptrace(PTRACE_INTERRUPT, pid, 0, 0) }\n\nfunc PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }\n\nfunc PtraceSeize(pid int) (err error) { return ptrace(PTRACE_SEIZE, pid, 0, 0) }\n\nfunc PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }\n\n//sys\treboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)\n\nfunc Reboot(cmd int) (err error) {\n\treturn reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, \"\")\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treclen, ok := direntReclen(buf)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\treturn reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true\n}\n\n//sys\tmount(source string, target string, fstype string, flags uintptr, data *byte) (err error)\n\nfunc Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {\n\t// Certain file systems get rather angry and EINVAL if you give\n\t// them an empty string of data, rather than NULL.\n\tif data == \"\" {\n\t\treturn mount(source, target, fstype, flags, nil)\n\t}\n\tdatap, err := BytePtrFromString(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn mount(source, target, fstype, flags, datap)\n}\n\n//sys\tmountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR\n\n// MountSetattr is a wrapper for mount_setattr(2).\n// https://man7.org/linux/man-pages/man2/mount_setattr.2.html\n//\n// Requires kernel >= 5.12.\nfunc MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {\n\treturn mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\n// Sendto\n// Recvfrom\n// Socketpair\n\n/*\n * Direct access\n */\n//sys\tAcct(path string) (err error)\n//sys\tAddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)\n//sys\tAdjtimex(buf *Timex) (state int, err error)\n//sysnb\tCapget(hdr *CapUserHeader, data *CapUserData) (err error)\n//sysnb\tCapset(hdr *CapUserHeader, data *CapUserData) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockAdjtime(clockid int32, buf *Timex) (state int, err error)\n//sys\tClockGetres(clockid int32, res *Timespec) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClockSettime(clockid int32, time *Timespec) (err error)\n//sys\tClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tCloseRange(first uint, last uint, flags uint) (err error)\n//sys\tCopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tDeleteModule(name string, flags int) (err error)\n//sys\tDup(oldfd int) (fd int, err error)\n\nfunc Dup2(oldfd, newfd int) error {\n\treturn Dup3(oldfd, newfd, 0)\n}\n\n//sys\tDup3(oldfd int, newfd int, flags int) (err error)\n//sysnb\tEpollCreate1(flag int) (fd int, err error)\n//sysnb\tEpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)\n//sys\tEventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2\n//sys\tExit(code int) = SYS_EXIT_GROUP\n//sys\tFallocate(fd int, mode uint32, off int64, len int64) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFdatasync(fd int) (err error)\n//sys\tFgetxattr(fd int, attr string, dest []byte) (sz int, err error)\n//sys\tFinitModule(fd int, params string, flags int) (err error)\n//sys\tFlistxattr(fd int, dest []byte) (sz int, err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFremovexattr(fd int, attr string) (err error)\n//sys\tFsetxattr(fd int, attr string, dest []byte, flags int) (err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)\n//sys\tFsopen(fsName string, flags int) (fd int, err error)\n//sys\tFspick(dirfd int, pathName string, flags int) (fd int, err error)\n\n//sys\tfsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error)\n\nfunc fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) {\n\tvar keyp *byte\n\tif keyp, err = BytePtrFromString(key); err != nil {\n\t\treturn\n\t}\n\treturn fsconfig(fd, cmd, keyp, value, aux)\n}\n\n// FsconfigSetFlag is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_FLAG.\n//\n// fd is the filesystem context to act upon.\n// key the parameter key to set.\nfunc FsconfigSetFlag(fd int, key string) (err error) {\n\treturn fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0)\n}\n\n// FsconfigSetString is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_STRING.\n//\n// fd is the filesystem context to act upon.\n// key the parameter key to set.\n// value is the parameter value to set.\nfunc FsconfigSetString(fd int, key string, value string) (err error) {\n\tvar valuep *byte\n\tif valuep, err = BytePtrFromString(value); err != nil {\n\t\treturn\n\t}\n\treturn fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0)\n}\n\n// FsconfigSetBinary is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_BINARY.\n//\n// fd is the filesystem context to act upon.\n// key the parameter key to set.\n// value is the parameter value to set.\nfunc FsconfigSetBinary(fd int, key string, value []byte) (err error) {\n\tif len(value) == 0 {\n\t\treturn EINVAL\n\t}\n\treturn fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value))\n}\n\n// FsconfigSetPath is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_PATH.\n//\n// fd is the filesystem context to act upon.\n// key the parameter key to set.\n// path is a non-empty path for specified key.\n// atfd is a file descriptor at which to start lookup from or AT_FDCWD.\nfunc FsconfigSetPath(fd int, key string, path string, atfd int) (err error) {\n\tvar valuep *byte\n\tif valuep, err = BytePtrFromString(path); err != nil {\n\t\treturn\n\t}\n\treturn fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd)\n}\n\n// FsconfigSetPathEmpty is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_PATH_EMPTY. The same as\n// FconfigSetPath but with AT_PATH_EMPTY implied.\nfunc FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) {\n\tvar valuep *byte\n\tif valuep, err = BytePtrFromString(path); err != nil {\n\t\treturn\n\t}\n\treturn fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd)\n}\n\n// FsconfigSetFd is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_SET_FD.\n//\n// fd is the filesystem context to act upon.\n// key the parameter key to set.\n// value is a file descriptor to be assigned to specified key.\nfunc FsconfigSetFd(fd int, key string, value int) (err error) {\n\treturn fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value)\n}\n\n// FsconfigCreate is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_CMD_CREATE.\n//\n// fd is the filesystem context to act upon.\nfunc FsconfigCreate(fd int) (err error) {\n\treturn fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0)\n}\n\n// FsconfigReconfigure is equivalent to fsconfig(2) called\n// with cmd == FSCONFIG_CMD_RECONFIGURE.\n//\n// fd is the filesystem context to act upon.\nfunc FsconfigReconfigure(fd int) (err error) {\n\treturn fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0)\n}\n\n//sys\tGetdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n\nfunc Getpgrp() (pid int) {\n\tpid, _ = Getpgid(0)\n\treturn\n}\n\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n\nfunc Getrandom(buf []byte, flags int) (n int, err error) {\n\tvdsoRet, supported := vgetrandom(buf, uint32(flags))\n\tif supported {\n\t\tif vdsoRet < 0 {\n\t\t\treturn 0, errnoErr(syscall.Errno(-vdsoRet))\n\t\t}\n\t\treturn vdsoRet, nil\n\t}\n\tvar p *byte\n\tif len(buf) > 0 {\n\t\tp = &buf[0]\n\t}\n\tr, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags))\n\tif e != 0 {\n\t\treturn 0, errnoErr(e)\n\t}\n\treturn int(r), nil\n}\n\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettid() (tid int)\n//sys\tGetxattr(path string, attr string, dest []byte) (sz int, err error)\n//sys\tInitModule(moduleImage []byte, params string) (err error)\n//sys\tInotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)\n//sysnb\tInotifyInit1(flags int) (fd int, err error)\n//sysnb\tInotifyRmWatch(fd int, watchdesc uint32) (success int, err error)\n//sysnb\tKill(pid int, sig syscall.Signal) (err error)\n//sys\tKlogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG\n//sys\tLgetxattr(path string, attr string, dest []byte) (sz int, err error)\n//sys\tListxattr(path string, dest []byte) (sz int, err error)\n//sys\tLlistxattr(path string, dest []byte) (sz int, err error)\n//sys\tLremovexattr(path string, attr string) (err error)\n//sys\tLsetxattr(path string, attr string, data []byte, flags int) (err error)\n//sys\tMemfdCreate(name string, flags int) (fd int, err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error)\n//sys\tMoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpenTree(dfd int, fileName string, flags uint) (r int, err error)\n//sys\tPerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)\n//sys\tPivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT\n//sys\tPrctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)\n//sys\tpselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tRemovexattr(path string, attr string) (err error)\n//sys\tRenameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)\n//sys\tRequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)\n//sys\tSetdomainname(p []byte) (err error)\n//sys\tSethostname(p []byte) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tv *Timeval) (err error)\n//sys\tSetns(fd int, nstype int) (err error)\n\n//go:linkname syscall_prlimit syscall.prlimit\nfunc syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error\n\nfunc Prlimit(pid, resource int, newlimit, old *Rlimit) error {\n\t// Just call the syscall version, because as of Go 1.21\n\t// it will affect starting a new process.\n\treturn syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old))\n}\n\n// PrctlRetInt performs a prctl operation specified by option and further\n// optional arguments arg2 through arg5 depending on option. It returns a\n// non-negative integer that is returned by the prctl syscall.\nfunc PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (int, error) {\n\tret, _, err := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(ret), nil\n}\n\nfunc Setuid(uid int) (err error) {\n\treturn syscall.Setuid(uid)\n}\n\nfunc Setgid(gid int) (err error) {\n\treturn syscall.Setgid(gid)\n}\n\nfunc Setreuid(ruid, euid int) (err error) {\n\treturn syscall.Setreuid(ruid, euid)\n}\n\nfunc Setregid(rgid, egid int) (err error) {\n\treturn syscall.Setregid(rgid, egid)\n}\n\nfunc Setresuid(ruid, euid, suid int) (err error) {\n\treturn syscall.Setresuid(ruid, euid, suid)\n}\n\nfunc Setresgid(rgid, egid, sgid int) (err error) {\n\treturn syscall.Setresgid(rgid, egid, sgid)\n}\n\n// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.\n// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability.\n// If the call fails due to other reasons, current fsgid will be returned.\nfunc SetfsgidRetGid(gid int) (int, error) {\n\treturn setfsgid(gid)\n}\n\n// SetfsuidRetUid sets fsuid for current thread and returns previous fsuid set.\n// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability\n// If the call fails due to other reasons, current fsuid will be returned.\nfunc SetfsuidRetUid(uid int) (int, error) {\n\treturn setfsuid(uid)\n}\n\nfunc Setfsgid(gid int) error {\n\t_, err := setfsgid(gid)\n\treturn err\n}\n\nfunc Setfsuid(uid int) error {\n\t_, err := setfsuid(uid)\n\treturn err\n}\n\nfunc Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {\n\treturn signalfd(fd, sigmask, _C__NSIG/8, flags)\n}\n\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sys\tSetxattr(path string, attr string, data []byte, flags int) (err error)\n//sys\tsignalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) = SYS_SIGNALFD4\n//sys\tStatx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)\n//sys\tSync()\n//sys\tSyncfs(fd int) (err error)\n//sysnb\tSysinfo(info *Sysinfo_t) (err error)\n//sys\tTee(rfd int, wfd int, len int, flags int) (n int64, err error)\n//sysnb\tTimerfdCreate(clockid int, flags int) (fd int, err error)\n//sysnb\tTimerfdGettime(fd int, currValue *ItimerSpec) (err error)\n//sysnb\tTimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)\n//sysnb\tTgkill(tgid int, tid int, sig syscall.Signal) (err error)\n//sysnb\tTimes(tms *Tms) (ticks uintptr, err error)\n//sysnb\tUmask(mask int) (oldmask int)\n//sysnb\tUname(buf *Utsname) (err error)\n//sys\tUnmount(target string, flags int) (err error) = SYS_UMOUNT2\n//sys\tUnshare(flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\texitThread(code int) (err error) = SYS_EXIT\n//sys\treadv(fd int, iovs []Iovec) (n int, err error) = SYS_READV\n//sys\twritev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV\n//sys\tpreadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV\n//sys\tpwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV\n//sys\tpreadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2\n//sys\tpwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2\n\n// minIovec is the size of the small initial allocation used by\n// Readv, Writev, etc.\n//\n// This small allocation gets stack allocated, which lets the\n// common use case of len(iovs) <= minIovs avoid more expensive\n// heap allocations.\nconst minIovec = 8\n\n// appendBytes converts bs to Iovecs and appends them to vecs.\nfunc appendBytes(vecs []Iovec, bs [][]byte) []Iovec {\n\tfor _, b := range bs {\n\t\tvar v Iovec\n\t\tv.SetLen(len(b))\n\t\tif len(b) > 0 {\n\t\t\tv.Base = &b[0]\n\t\t} else {\n\t\t\tv.Base = (*byte)(unsafe.Pointer(&_zero))\n\t\t}\n\t\tvecs = append(vecs, v)\n\t}\n\treturn vecs\n}\n\n// offs2lohi splits offs into its low and high order bits.\nfunc offs2lohi(offs int64) (lo, hi uintptr) {\n\tconst longBits = SizeofLong * 8\n\treturn uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet\n}\n\nfunc Readv(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tn, err = readv(fd, iovecs)\n\treadvRacedetect(iovecs, n, err)\n\treturn n, err\n}\n\nfunc Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tlo, hi := offs2lohi(offset)\n\tn, err = preadv(fd, iovecs, lo, hi)\n\treadvRacedetect(iovecs, n, err)\n\treturn n, err\n}\n\nfunc Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tlo, hi := offs2lohi(offset)\n\tn, err = preadv2(fd, iovecs, lo, hi, flags)\n\treadvRacedetect(iovecs, n, err)\n\treturn n, err\n}\n\nfunc readvRacedetect(iovecs []Iovec, n int, err error) {\n\tif !raceenabled {\n\t\treturn\n\t}\n\tfor i := 0; n > 0 && i < len(iovecs); i++ {\n\t\tm := min(int(iovecs[i].Len), n)\n\t\tn -= m\n\t\tif m > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(iovecs[i].Base), m)\n\t\t}\n\t}\n\tif err == nil {\n\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t}\n}\n\nfunc Writev(fd int, iovs [][]byte) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = writev(fd, iovecs)\n\twritevRacedetect(iovecs, n)\n\treturn n, err\n}\n\nfunc Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tlo, hi := offs2lohi(offset)\n\tn, err = pwritev(fd, iovecs, lo, hi)\n\twritevRacedetect(iovecs, n)\n\treturn n, err\n}\n\nfunc Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {\n\tiovecs := make([]Iovec, 0, minIovec)\n\tiovecs = appendBytes(iovecs, iovs)\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tlo, hi := offs2lohi(offset)\n\tn, err = pwritev2(fd, iovecs, lo, hi, flags)\n\twritevRacedetect(iovecs, n)\n\treturn n, err\n}\n\nfunc writevRacedetect(iovecs []Iovec, n int) {\n\tif !raceenabled {\n\t\treturn\n\t}\n\tfor i := 0; n > 0 && i < len(iovecs); i++ {\n\t\tm := min(int(iovecs[i].Len), n)\n\t\tn -= m\n\t\tif m > 0 {\n\t\t\traceReadRange(unsafe.Pointer(iovecs[i].Base), m)\n\t\t}\n\t}\n}\n\n// mmap varies by architecture; see syscall_linux_*.go.\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\tmremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)\n//sys\tMadvise(b []byte, advice int) (err error)\n//sys\tMprotect(b []byte, prot int) (err error)\n//sys\tMlock(b []byte) (err error)\n//sys\tMlockall(flags int) (err error)\n//sys\tMsync(b []byte, flags int) (err error)\n//sys\tMunlock(b []byte) (err error)\n//sys\tMunlockall() (err error)\n\nconst (\n\tmremapFixed     = MREMAP_FIXED\n\tmremapDontunmap = MREMAP_DONTUNMAP\n\tmremapMaymove   = MREMAP_MAYMOVE\n)\n\n// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,\n// using the specified flags.\nfunc Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {\n\tvar p unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\tp = unsafe.Pointer(&iovs[0])\n\t}\n\n\tn, _, errno := Syscall6(SYS_VMSPLICE, uintptr(fd), uintptr(p), uintptr(len(iovs)), uintptr(flags), 0, 0)\n\tif errno != 0 {\n\t\treturn 0, syscall.Errno(errno)\n\t}\n\n\treturn int(n), nil\n}\n\nfunc isGroupMember(gid int) bool {\n\tgroups, err := Getgroups()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn slices.Contains(groups, gid)\n}\n\nfunc isCapDacOverrideSet() bool {\n\thdr := CapUserHeader{Version: LINUX_CAPABILITY_VERSION_3}\n\tdata := [2]CapUserData{}\n\terr := Capget(&hdr, &data[0])\n\n\treturn err == nil && data[0].Effective&(1<<CAP_DAC_OVERRIDE) != 0\n}\n\n//sys\tfaccessat(dirfd int, path string, mode uint32) (err error)\n//sys\tFaccessat2(dirfd int, path string, mode uint32, flags int) (err error)\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tif flags == 0 {\n\t\treturn faccessat(dirfd, path, mode)\n\t}\n\n\tif err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS && err != EPERM {\n\t\treturn err\n\t}\n\n\t// The Linux kernel faccessat system call does not take any flags.\n\t// The glibc faccessat implements the flags itself; see\n\t// https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/faccessat.c;hb=HEAD\n\t// Because people naturally expect syscall.Faccessat to act\n\t// like C faccessat, we do the same.\n\n\tif flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {\n\t\treturn EINVAL\n\t}\n\n\tvar st Stat_t\n\tif err := Fstatat(dirfd, path, &st, flags&AT_SYMLINK_NOFOLLOW); err != nil {\n\t\treturn err\n\t}\n\n\tmode &= 7\n\tif mode == 0 {\n\t\treturn nil\n\t}\n\n\tvar uid int\n\tif flags&AT_EACCESS != 0 {\n\t\tuid = Geteuid()\n\t\tif uid != 0 && isCapDacOverrideSet() {\n\t\t\t// If CAP_DAC_OVERRIDE is set, file access check is\n\t\t\t// done by the kernel in the same way as for root\n\t\t\t// (see generic_permission() in the Linux sources).\n\t\t\tuid = 0\n\t\t}\n\t} else {\n\t\tuid = Getuid()\n\t}\n\n\tif uid == 0 {\n\t\tif mode&1 == 0 {\n\t\t\t// Root can read and write any file.\n\t\t\treturn nil\n\t\t}\n\t\tif st.Mode&0111 != 0 {\n\t\t\t// Root can execute any file that anybody can execute.\n\t\t\treturn nil\n\t\t}\n\t\treturn EACCES\n\t}\n\n\tvar fmode uint32\n\tif uint32(uid) == st.Uid {\n\t\tfmode = (st.Mode >> 6) & 7\n\t} else {\n\t\tvar gid int\n\t\tif flags&AT_EACCESS != 0 {\n\t\t\tgid = Getegid()\n\t\t} else {\n\t\t\tgid = Getgid()\n\t\t}\n\n\t\tif uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {\n\t\t\tfmode = (st.Mode >> 3) & 7\n\t\t} else {\n\t\t\tfmode = st.Mode & 7\n\t\t}\n\t}\n\n\tif fmode&mode == mode {\n\t\treturn nil\n\t}\n\n\treturn EACCES\n}\n\n//sys\tnameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT\n//sys\topenByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT\n\n// fileHandle is the argument to nameToHandleAt and openByHandleAt. We\n// originally tried to generate it via unix/linux/types.go with \"type\n// fileHandle C.struct_file_handle\" but that generated empty structs\n// for mips64 and mips64le. Instead, hard code it for now (it's the\n// same everywhere else) until the mips64 generator issue is fixed.\ntype fileHandle struct {\n\tBytes uint32\n\tType  int32\n}\n\n// FileHandle represents the C struct file_handle used by\n// name_to_handle_at (see NameToHandleAt) and open_by_handle_at (see\n// OpenByHandleAt).\ntype FileHandle struct {\n\t*fileHandle\n}\n\n// NewFileHandle constructs a FileHandle.\nfunc NewFileHandle(handleType int32, handle []byte) FileHandle {\n\tconst hdrSize = unsafe.Sizeof(fileHandle{})\n\tbuf := make([]byte, hdrSize+uintptr(len(handle)))\n\tcopy(buf[hdrSize:], handle)\n\tfh := (*fileHandle)(unsafe.Pointer(&buf[0]))\n\tfh.Type = handleType\n\tfh.Bytes = uint32(len(handle))\n\treturn FileHandle{fh}\n}\n\nfunc (fh *FileHandle) Size() int   { return int(fh.fileHandle.Bytes) }\nfunc (fh *FileHandle) Type() int32 { return fh.fileHandle.Type }\nfunc (fh *FileHandle) Bytes() []byte {\n\tn := fh.Size()\n\tif n == 0 {\n\t\treturn nil\n\t}\n\treturn unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)\n}\n\n// NameToHandleAt wraps the name_to_handle_at system call; it obtains\n// a handle for a path name.\nfunc NameToHandleAt(dirfd int, path string, flags int) (handle FileHandle, mountID int, err error) {\n\tvar mid _C_int\n\t// Try first with a small buffer, assuming the handle will\n\t// only be 32 bytes.\n\tsize := uint32(32 + unsafe.Sizeof(fileHandle{}))\n\tdidResize := false\n\tfor {\n\t\tbuf := make([]byte, size)\n\t\tfh := (*fileHandle)(unsafe.Pointer(&buf[0]))\n\t\tfh.Bytes = size - uint32(unsafe.Sizeof(fileHandle{}))\n\t\terr = nameToHandleAt(dirfd, path, fh, &mid, flags)\n\t\tif err == EOVERFLOW {\n\t\t\tif didResize {\n\t\t\t\t// We shouldn't need to resize more than once\n\t\t\t\treturn\n\t\t\t}\n\t\t\tdidResize = true\n\t\t\tsize = fh.Bytes + uint32(unsafe.Sizeof(fileHandle{}))\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\treturn FileHandle{fh}, int(mid), nil\n\t}\n}\n\n// OpenByHandleAt wraps the open_by_handle_at system call; it opens a\n// file via a handle as previously returned by NameToHandleAt.\nfunc OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err error) {\n\treturn openByHandleAt(mountFD, handle.fileHandle, flags)\n}\n\n// Klogset wraps the sys_syslog system call; it sets console_loglevel to\n// the value specified by arg and passes a dummy pointer to bufp.\nfunc Klogset(typ int, arg int) (err error) {\n\tvar p unsafe.Pointer\n\t_, _, errno := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(p), uintptr(arg))\n\tif errno != 0 {\n\t\treturn errnoErr(errno)\n\t}\n\treturn nil\n}\n\n// RemoteIovec is Iovec with the pointer replaced with an integer.\n// It is used for ProcessVMReadv and ProcessVMWritev, where the pointer\n// refers to a location in a different process' address space, which\n// would confuse the Go garbage collector.\ntype RemoteIovec struct {\n\tBase uintptr\n\tLen  int\n}\n\n//sys\tProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV\n//sys\tProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV\n\n//sys\tPidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN\n//sys\tPidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD\n//sys\tPidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL\n\n//sys\tshmat(id int, addr uintptr, flag int) (ret uintptr, err error)\n//sys\tshmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)\n//sys\tshmdt(addr uintptr) (err error)\n//sys\tshmget(key int, size int, flag int) (id int, err error)\n\n//sys\tgetitimer(which int, currValue *Itimerval) (err error)\n//sys\tsetitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)\n\n// MakeItimerval creates an Itimerval from interval and value durations.\nfunc MakeItimerval(interval, value time.Duration) Itimerval {\n\treturn Itimerval{\n\t\tInterval: NsecToTimeval(interval.Nanoseconds()),\n\t\tValue:    NsecToTimeval(value.Nanoseconds()),\n\t}\n}\n\n// A value which may be passed to the which parameter for Getitimer and\n// Setitimer.\ntype ItimerWhich int\n\n// Possible which values for Getitimer and Setitimer.\nconst (\n\tItimerReal    ItimerWhich = ITIMER_REAL\n\tItimerVirtual ItimerWhich = ITIMER_VIRTUAL\n\tItimerProf    ItimerWhich = ITIMER_PROF\n)\n\n// Getitimer wraps getitimer(2) to return the current value of the timer\n// specified by which.\nfunc Getitimer(which ItimerWhich) (Itimerval, error) {\n\tvar it Itimerval\n\tif err := getitimer(int(which), &it); err != nil {\n\t\treturn Itimerval{}, err\n\t}\n\n\treturn it, nil\n}\n\n// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.\n// It returns the previous value of the timer.\n//\n// If the Itimerval argument is the zero value, the timer will be disarmed.\nfunc Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {\n\tvar prev Itimerval\n\tif err := setitimer(int(which), &it, &prev); err != nil {\n\t\treturn Itimerval{}, err\n\t}\n\n\treturn prev, nil\n}\n\n//sysnb\trtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK\n\nfunc PthreadSigmask(how int, set, oldset *Sigset_t) error {\n\tif oldset != nil {\n\t\t// Explicitly clear in case Sigset_t is larger than _C__NSIG.\n\t\t*oldset = Sigset_t{}\n\t}\n\treturn rtSigprocmask(how, set, oldset, _C__NSIG/8)\n}\n\n//sysnb\tgetresuid(ruid *_C_int, euid *_C_int, suid *_C_int)\n//sysnb\tgetresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)\n\nfunc Getresuid() (ruid, euid, suid int) {\n\tvar r, e, s _C_int\n\tgetresuid(&r, &e, &s)\n\treturn int(r), int(e), int(s)\n}\n\nfunc Getresgid() (rgid, egid, sgid int) {\n\tvar r, e, s _C_int\n\tgetresgid(&r, &e, &s)\n\treturn int(r), int(e), int(s)\n}\n\n// Pselect is a wrapper around the Linux pselect6 system call.\n// This version does not modify the timeout argument.\nfunc Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\t// Per https://man7.org/linux/man-pages/man2/select.2.html#NOTES,\n\t// The Linux pselect6() system call modifies its timeout argument.\n\t// [Not modifying the argument] is the behavior required by POSIX.1-2001.\n\tvar mutableTimeout *Timespec\n\tif timeout != nil {\n\t\tmutableTimeout = new(Timespec)\n\t\t*mutableTimeout = *timeout\n\t}\n\n\t// The final argument of the pselect6() system call is not a\n\t// sigset_t * pointer, but is instead a structure\n\tvar kernelMask *sigset_argpack\n\tif sigmask != nil {\n\t\twordBits := 32 << (^uintptr(0) >> 63) // see math.intSize\n\n\t\t// A sigset stores one bit per signal,\n\t\t// offset by 1 (because signal 0 does not exist).\n\t\t// So the number of words needed is ⌈__C_NSIG - 1 / wordBits⌉.\n\t\tsigsetWords := (_C__NSIG - 1 + wordBits - 1) / (wordBits)\n\n\t\tsigsetBytes := uintptr(sigsetWords * (wordBits / 8))\n\t\tkernelMask = &sigset_argpack{\n\t\t\tss:    sigmask,\n\t\t\tssLen: sigsetBytes,\n\t\t}\n\t}\n\n\treturn pselect6(nfd, r, w, e, mutableTimeout, kernelMask)\n}\n\n//sys\tschedSetattr(pid int, attr *SchedAttr, flags uint) (err error)\n//sys\tschedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error)\n\n// SchedSetAttr is a wrapper for sched_setattr(2) syscall.\n// https://man7.org/linux/man-pages/man2/sched_setattr.2.html\nfunc SchedSetAttr(pid int, attr *SchedAttr, flags uint) error {\n\tif attr == nil {\n\t\treturn EINVAL\n\t}\n\tattr.Size = SizeofSchedAttr\n\treturn schedSetattr(pid, attr, flags)\n}\n\n// SchedGetAttr is a wrapper for sched_getattr(2) syscall.\n// https://man7.org/linux/man-pages/man2/sched_getattr.2.html\nfunc SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {\n\tattr := &SchedAttr{}\n\tif err := schedGetattr(pid, attr, SizeofSchedAttr, flags); err != nil {\n\t\treturn nil, err\n\t}\n\treturn attr, nil\n}\n\n//sys\tCachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)\n//sys\tMseal(b []byte, flags uint) (err error)\n\n//sys\tsetMemPolicy(mode int, mask *CPUSet, size int) (err error) = SYS_SET_MEMPOLICY\n\nfunc SetMemPolicy(mode int, mask *CPUSet) error {\n\treturn setMemPolicy(mode, mask, _CPU_SETSIZE)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_386.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 && linux\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\n// 64-bit file system and 32-bit uid calls\n// (386 default is 32-bit file system and 16-bit uid).\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64\n//sys\tFchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tFtruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64\n//sysnb\tGetegid() (egid int) = SYS_GETEGID32\n//sysnb\tGeteuid() (euid int) = SYS_GETEUID32\n//sysnb\tGetgid() (gid int) = SYS_GETGID32\n//sysnb\tGetuid() (uid int) = SYS_GETUID32\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64\n//sys\tsetfsgid(gid int) (prev int, err error) = SYS_SETFSGID32\n//sys\tsetfsuid(uid int) (prev int, err error) = SYS_SETFSUID32\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error) = SYS_TRUNCATE64\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n\n//sys\tmmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)\n//sys\tPause() (err error)\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tpage := uintptr(offset / 4096)\n\tif offset != int64(page)*4096 {\n\t\treturn 0, EINVAL\n\t}\n\treturn mmap2(addr, length, prot, flags, fd, page)\n}\n\ntype rlimit32 struct {\n\tCur uint32\n\tMax uint32\n}\n\n//sysnb\tgetrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT\n\nconst rlimInf32 = ^uint32(0)\nconst rlimInf64 = ^uint64(0)\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = Prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\terr = getrlimit(resource, &rl)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif rl.Cur == rlimInf32 {\n\t\trlim.Cur = rlimInf64\n\t} else {\n\t\trlim.Cur = uint64(rl.Cur)\n\t}\n\n\tif rl.Max == rlimInf32 {\n\t\trlim.Max = rlimInf64\n\t} else {\n\t\trlim.Max = uint64(rl.Max)\n\t}\n\treturn\n}\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tnewoffset, errno := seek(fd, offset, whence)\n\tif errno != 0 {\n\t\treturn 0, errno\n\t}\n\treturn newoffset, nil\n}\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\n// On x86 Linux, all the socket calls go through an extra indirection,\n// I think because the 5-register system call interface can't handle\n// the 6-argument calls like sendto and recvfrom. Instead the\n// arguments to the underlying system call are the number below\n// and a pointer to an array of uintptr. We hide the pointer in the\n// socketcall assembly to avoid allocation on every system call.\n\nconst (\n\t// see linux/net.h\n\t_SOCKET      = 1\n\t_BIND        = 2\n\t_CONNECT     = 3\n\t_LISTEN      = 4\n\t_ACCEPT      = 5\n\t_GETSOCKNAME = 6\n\t_GETPEERNAME = 7\n\t_SOCKETPAIR  = 8\n\t_SEND        = 9\n\t_RECV        = 10\n\t_SENDTO      = 11\n\t_RECVFROM    = 12\n\t_SHUTDOWN    = 13\n\t_SETSOCKOPT  = 14\n\t_GETSOCKOPT  = 15\n\t_SENDMSG     = 16\n\t_RECVMSG     = 17\n\t_ACCEPT4     = 18\n\t_RECVMMSG    = 19\n\t_SENDMMSG    = 20\n)\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tfd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {\n\t_, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tfd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar base uintptr\n\tif len(p) > 0 {\n\t\tbase = uintptr(unsafe.Pointer(&p[0]))\n\t}\n\tn, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar base uintptr\n\tif len(p) > 0 {\n\t\tbase = uintptr(unsafe.Pointer(&p[0]))\n\t}\n\t_, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tn, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tn, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Listen(s int, n int) (err error) {\n\t_, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Shutdown(s, how int) (err error) {\n\t_, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tpathp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_alarm.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)\n\npackage unix\n\n// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH\n// values.\n\n//sys\tAlarm(seconds uint) (remaining uint, err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && linux\n\npackage unix\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)\n}\n\n//sys\tMemfdSecret(flags int) (fd int, err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout != nil {\n\t\tts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}\n\t}\n\treturn pselect6(nfd, r, w, e, ts, nil)\n}\n\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\t// Use fstatat, because Android's seccomp policy blocks stat.\n\treturn Fstatat(AT_FDCWD, path, stat, 0)\n}\n\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\terrno := gettimeofday(tv)\n\tif errno != 0 {\n\t\treturn errno\n\t}\n\treturn nil\n}\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terrno := gettimeofday(&tv)\n\tif errno != 0 {\n\t\treturn 0, errno\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Rip }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && linux && gc\n\npackage unix\n\nimport \"syscall\"\n\n//go:noescape\nfunc gettimeofday(tv *Timeval) (err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_arm.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm && linux\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tnewoffset, errno := seek(fd, offset, whence)\n\tif errno != 0 {\n\t\treturn 0, errno\n\t}\n\treturn newoffset, nil\n}\n\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tsocketpair(domain int, typ int, flags int, fd *[2]int32) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\n// 64-bit file system and 32-bit uid calls\n// (16-bit uid calls are not always supported in newer kernels)\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sysnb\tGetegid() (egid int) = SYS_GETEGID32\n//sysnb\tGeteuid() (euid int) = SYS_GETEUID32\n//sysnb\tGetgid() (gid int) = SYS_GETGID32\n//sysnb\tGetuid() (uid int) = SYS_GETUID32\n//sys\tLchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32\n//sys\tListen(s int, n int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tPause() (err error)\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n//sys\tsetfsgid(gid int) (prev int, err error) = SYS_SETFSGID32\n//sys\tsetfsuid(uid int) (prev int, err error) = SYS_SETFSUID32\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc Time(t *Time_t) (Time_t, error) {\n\tvar tv Timeval\n\terr := Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\nfunc Utime(path string, buf *Utimbuf) error {\n\ttv := []Timeval{\n\t\t{Sec: buf.Actime},\n\t\t{Sec: buf.Modtime},\n\t}\n\treturn Utimes(path, tv)\n}\n\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tTruncate(path string, length int64) (err error) = SYS_TRUNCATE64\n//sys\tFtruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n//sys\tmmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tpathp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tpage := uintptr(offset / 4096)\n\tif offset != int64(page)*4096 {\n\t\treturn 0, EINVAL\n\t}\n\treturn mmap2(addr, length, prot, flags, fd, page)\n}\n\ntype rlimit32 struct {\n\tCur uint32\n\tMax uint32\n}\n\n//sysnb\tgetrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT\n\nconst rlimInf32 = ^uint32(0)\nconst rlimInf64 = ^uint64(0)\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = Prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\terr = getrlimit(resource, &rl)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif rl.Cur == rlimInf32 {\n\t\trlim.Cur = rlimInf64\n\t} else {\n\t\trlim.Cur = uint64(rl.Cur)\n\t}\n\n\tif rl.Max == rlimInf32 {\n\t\trlim.Max = rlimInf64\n\t} else {\n\t\trlim.Max = uint64(rl.Max)\n\t}\n\treturn\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint32(length)\n}\n\n//sys\tarmSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) error {\n\t// The sync_file_range and arm_sync_file_range syscalls differ only in the\n\t// order of their arguments.\n\treturn armSyncFileRange(fd, flags, off, n)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_arm64.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm64 && linux\n\npackage unix\n\nimport \"unsafe\"\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tgetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tListen(s int, n int) (err error)\n//sys\tMemfdSecret(flags int) (fd int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout != nil {\n\t\tts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}\n\t}\n\treturn pselect6(nfd, r, w, e, ts, nil)\n}\n\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, 0)\n}\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\treturn Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)\n}\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)\n}\n\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\treturn ENOSYS\n}\n\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(dirfd, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc Time(t *Time_t) (Time_t, error) {\n\tvar tv Timeval\n\terr := Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\nfunc Utime(path string, buf *Utimbuf) error {\n\ttv := []Timeval{\n\t\t{Sec: buf.Actime},\n\t\t{Sec: buf.Modtime},\n\t}\n\treturn Utimes(path, tv)\n}\n\nfunc utimes(path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(AT_FDCWD, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\n// Getrlimit prefers the prlimit64 system call. See issue 38604.\nfunc Getrlimit(resource int, rlim *Rlimit) error {\n\terr := Prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\treturn getrlimit(resource, rlim)\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Pc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\nfunc Pause() error {\n\t_, err := ppoll(nil, 0, nil, nil)\n\treturn err\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n\nconst SYS_FSTATAT = SYS_NEWFSTATAT\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_gc.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && gc\n\npackage unix\n\n// SyscallNoError may be used instead of Syscall for syscalls that don't fail.\nfunc SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)\n\n// RawSyscallNoError may be used instead of RawSyscall for syscalls that don't\n// fail.\nfunc RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && gc && 386\n\npackage unix\n\nimport \"syscall\"\n\n// Underlying system call writes to newoffset via pointer.\n// Implemented in assembly to avoid allocation.\nfunc seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)\n\nfunc socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)\nfunc rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm && gc && linux\n\npackage unix\n\nimport \"syscall\"\n\n// Underlying system call writes to newoffset via pointer.\n// Implemented in assembly to avoid allocation.\nfunc seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && gccgo && 386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc seek(fd int, offset int64, whence int) (int64, syscall.Errno) {\n\tvar newoffset int64\n\toffsetLow := uint32(offset & 0xffffffff)\n\toffsetHigh := uint32((offset >> 32) & 0xffffffff)\n\t_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)\n\treturn newoffset, err\n}\n\nfunc socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {\n\tfd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)\n\treturn int(fd), err\n}\n\nfunc rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {\n\tfd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)\n\treturn int(fd), err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && gccgo && arm\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc seek(fd int, offset int64, whence int) (int64, syscall.Errno) {\n\tvar newoffset int64\n\toffsetLow := uint32(offset & 0xffffffff)\n\toffsetHigh := uint32((offset >> 32) & 0xffffffff)\n\t_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)\n\treturn newoffset, err\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_loong64.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build loong64 && linux\n\npackage unix\n\nimport \"unsafe\"\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetuid() (uid int)\n//sys\tListen(s int, n int) (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout != nil {\n\t\tts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}\n\t}\n\treturn pselect6(nfd, r, w, e, ts, nil)\n}\n\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n\nfunc timespecFromStatxTimestamp(x StatxTimestamp) Timespec {\n\treturn Timespec{\n\t\tSec:  x.Sec,\n\t\tNsec: int64(x.Nsec),\n\t}\n}\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) error {\n\tvar r Statx_t\n\t// Do it the glibc way, add AT_NO_AUTOMOUNT.\n\tif err := Statx(fd, path, AT_NO_AUTOMOUNT|flags, STATX_BASIC_STATS, &r); err != nil {\n\t\treturn err\n\t}\n\n\tstat.Dev = Mkdev(r.Dev_major, r.Dev_minor)\n\tstat.Ino = r.Ino\n\tstat.Mode = uint32(r.Mode)\n\tstat.Nlink = r.Nlink\n\tstat.Uid = r.Uid\n\tstat.Gid = r.Gid\n\tstat.Rdev = Mkdev(r.Rdev_major, r.Rdev_minor)\n\t// hope we don't get to process files so large to overflow these size\n\t// fields...\n\tstat.Size = int64(r.Size)\n\tstat.Blksize = int32(r.Blksize)\n\tstat.Blocks = int64(r.Blocks)\n\tstat.Atim = timespecFromStatxTimestamp(r.Atime)\n\tstat.Mtim = timespecFromStatxTimestamp(r.Mtime)\n\tstat.Ctim = timespecFromStatxTimestamp(r.Ctime)\n\n\treturn nil\n}\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\treturn Fstatat(fd, \"\", stat, AT_EMPTY_PATH)\n}\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, 0)\n}\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\treturn Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)\n}\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)\n}\n\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\treturn ENOSYS\n}\n\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = Prlimit(0, resource, nil, rlim)\n\treturn\n}\n\nfunc futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(dirfd, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc Time(t *Time_t) (Time_t, error) {\n\tvar tv Timeval\n\terr := Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\nfunc Utime(path string, buf *Utimbuf) error {\n\ttv := []Timeval{\n\t\t{Sec: buf.Actime},\n\t\t{Sec: buf.Modtime},\n\t}\n\treturn Utimes(path, tv)\n}\n\nfunc utimes(path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(AT_FDCWD, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Era }\n\nfunc (r *PtraceRegs) SetPC(era uint64) { r.Era = era }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\nfunc Pause() error {\n\t_, err := ppoll(nil, 0, nil, nil)\n\treturn err\n}\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\treturn Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n\nconst SYS_FSTATAT = SYS_NEWFSTATAT\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (mips64 || mips64le)\n\npackage unix\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout != nil {\n\t\tts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}\n\t}\n\treturn pselect6(nfd, r, w, e, ts, nil)\n}\n\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terr = Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\treturn ENOSYS\n}\n\nfunc Iopl(level int) (err error) {\n\treturn ENOSYS\n}\n\ntype stat_t struct {\n\tDev        uint32\n\tPad0       [3]int32\n\tIno        uint64\n\tMode       uint32\n\tNlink      uint32\n\tUid        uint32\n\tGid        uint32\n\tRdev       uint32\n\tPad1       [3]uint32\n\tSize       int64\n\tAtime      uint32\n\tAtime_nsec uint32\n\tMtime      uint32\n\tMtime_nsec uint32\n\tCtime      uint32\n\tCtime_nsec uint32\n\tBlksize    uint32\n\tPad2       uint32\n\tBlocks     int64\n}\n\n//sys\tfstat(fd int, st *stat_t) (err error)\n//sys\tfstatat(dirfd int, path string, st *stat_t, flags int) (err error) = SYS_NEWFSTATAT\n//sys\tlstat(path string, st *stat_t) (err error)\n//sys\tstat(path string, st *stat_t) (err error)\n\nfunc Fstat(fd int, s *Stat_t) (err error) {\n\tst := &stat_t{}\n\terr = fstat(fd, st)\n\tfillStat_t(s, st)\n\treturn\n}\n\nfunc Fstatat(dirfd int, path string, s *Stat_t, flags int) (err error) {\n\tst := &stat_t{}\n\terr = fstatat(dirfd, path, st, flags)\n\tfillStat_t(s, st)\n\treturn\n}\n\nfunc Lstat(path string, s *Stat_t) (err error) {\n\tst := &stat_t{}\n\terr = lstat(path, st)\n\tfillStat_t(s, st)\n\treturn\n}\n\nfunc Stat(path string, s *Stat_t) (err error) {\n\tst := &stat_t{}\n\terr = stat(path, st)\n\tfillStat_t(s, st)\n\treturn\n}\n\nfunc fillStat_t(s *Stat_t, st *stat_t) {\n\ts.Dev = st.Dev\n\ts.Ino = st.Ino\n\ts.Mode = st.Mode\n\ts.Nlink = st.Nlink\n\ts.Uid = st.Uid\n\ts.Gid = st.Gid\n\ts.Rdev = st.Rdev\n\ts.Size = st.Size\n\ts.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)}\n\ts.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)}\n\ts.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)}\n\ts.Blksize = st.Blksize\n\ts.Blocks = st.Blocks\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Epc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (mips || mipsle)\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error) = SYS_TRUNCATE64\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n\n//sys\tPause() (err error)\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\t_, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0)\n\tif e != 0 {\n\t\terr = errnoErr(e)\n\t}\n\treturn\n}\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\n//sys\tmmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tpage := uintptr(offset / 4096)\n\tif offset != int64(page)*4096 {\n\t\treturn 0, EINVAL\n\t}\n\treturn mmap2(addr, length, prot, flags, fd, page)\n}\n\nconst rlimInf32 = ^uint32(0)\nconst rlimInf64 = ^uint64(0)\n\ntype rlimit32 struct {\n\tCur uint32\n\tMax uint32\n}\n\n//sysnb\tgetrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = Prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\terr = getrlimit(resource, &rl)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif rl.Cur == rlimInf32 {\n\t\trlim.Cur = rlimInf64\n\t} else {\n\t\trlim.Cur = uint64(rl.Cur)\n\t}\n\n\tif rl.Max == rlimInf32 {\n\t\trlim.Max = rlimInf64\n\t} else {\n\t\trlim.Max = uint64(rl.Max)\n\t}\n\treturn\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Epc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_ppc.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && ppc\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tFtruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetuid() (uid int)\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)\n//sys\tStat(path string, stat *Stat_t) (err error) = SYS_STAT64\n//sys\tTruncate(path string, length int64) (err error) = SYS_TRUNCATE64\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc seek(fd int, offset int64, whence int) (int64, syscall.Errno) {\n\tvar newoffset int64\n\toffsetLow := uint32(offset & 0xffffffff)\n\toffsetHigh := uint32((offset >> 32) & 0xffffffff)\n\t_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)\n\treturn newoffset, err\n}\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tnewoffset, errno := seek(fd, offset, whence)\n\tif errno != 0 {\n\t\treturn 0, errno\n\t}\n\treturn newoffset, nil\n}\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tpathp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))\n\tif e != 0 {\n\t\terr = e\n\t}\n\treturn\n}\n\n//sys\tmmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tpage := uintptr(offset / 4096)\n\tif offset != int64(page)*4096 {\n\t\treturn 0, EINVAL\n\t}\n\treturn mmap2(addr, length, prot, flags, fd, page)\n}\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: int32(sec), Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: int32(sec), Usec: int32(usec)}\n}\n\ntype rlimit32 struct {\n\tCur uint32\n\tMax uint32\n}\n\n//sysnb\tgetrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT\n\nconst rlimInf32 = ^uint32(0)\nconst rlimInf64 = ^uint64(0)\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\terr = Prlimit(0, resource, nil, rlim)\n\tif err != ENOSYS {\n\t\treturn err\n\t}\n\n\trl := rlimit32{}\n\terr = getrlimit(resource, &rl)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif rl.Cur == rlimInf32 {\n\t\trlim.Cur = rlimInf64\n\t} else {\n\t\trlim.Cur = uint64(rl.Cur)\n\t}\n\n\tif rl.Max == rlimInf32 {\n\t\trlim.Max = rlimInf64\n\t} else {\n\t\trlim.Max = uint64(rl.Max)\n\t}\n\treturn\n}\n\nfunc (r *PtraceRegs) PC() uint32 { return r.Nip }\n\nfunc (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint32(length)\n}\n\n//sys\tsyncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) error {\n\t// The sync_file_range and sync_file_range2 syscalls differ only in the\n\t// order of their arguments.\n\treturn syncFileRange2(fd, flags, off, n)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (ppc64 || ppc64le)\n\npackage unix\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT\n//sysnb\tGetuid() (uid int)\n//sys\tIoperm(from int, num int, on int) (err error)\n//sys\tIopl(level int) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tTime(t *Time_t) (tt Time_t, err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Nip }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\n//sys\tsyncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) error {\n\t// The sync_file_range and sync_file_range2 syscalls differ only in the\n\t// order of their arguments.\n\treturn syncFileRange2(fd, flags, off, n)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build riscv64 && linux\n\npackage unix\n\nimport \"unsafe\"\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tListen(s int, n int) (err error)\n//sys\tMemfdSecret(flags int) (fd int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tvar ts *Timespec\n\tif timeout != nil {\n\t\tts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}\n\t}\n\treturn pselect6(nfd, r, w, e, ts, nil)\n}\n\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, 0)\n}\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\treturn Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)\n}\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\treturn Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)\n}\n\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\treturn ENOSYS\n}\n\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(dirfd, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc Time(t *Time_t) (Time_t, error) {\n\tvar tv Timeval\n\terr := Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\nfunc Utime(path string, buf *Utimbuf) error {\n\ttv := []Timeval{\n\t\t{Sec: buf.Actime},\n\t\t{Sec: buf.Modtime},\n\t}\n\treturn Utimes(path, tv)\n}\n\nfunc utimes(path string, tv *[2]Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimensat(AT_FDCWD, path, nil, 0)\n\t}\n\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Pc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\nfunc Pause() error {\n\t_, err := ppoll(nil, 0, nil, nil)\n\treturn err\n}\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\treturn Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n\n//sys\triscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error)\n\nfunc RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error) {\n\tvar setSize uintptr\n\n\tif set != nil {\n\t\tsetSize = uintptr(unsafe.Sizeof(*set))\n\t}\n\treturn riscvHWProbe(pairs, setSize, set, flags)\n}\n\nconst SYS_FSTATAT = SYS_NEWFSTATAT\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_s390x.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build s390x && linux\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terr = Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\treturn ENOSYS\n}\n\nfunc Iopl(level int) (err error) {\n\treturn ENOSYS\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n\n// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.\n// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tmmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}\n\tr0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// On s390x Linux, all the socket calls go through an extra indirection.\n// The arguments to the underlying system call (SYS_SOCKETCALL) are the\n// number below and a pointer to an array of uintptr.\nconst (\n\t// see linux/net.h\n\tnetSocket      = 1\n\tnetBind        = 2\n\tnetConnect     = 3\n\tnetListen      = 4\n\tnetAccept      = 5\n\tnetGetSockName = 6\n\tnetGetPeerName = 7\n\tnetSocketPair  = 8\n\tnetSend        = 9\n\tnetRecv        = 10\n\tnetSendTo      = 11\n\tnetRecvFrom    = 12\n\tnetShutdown    = 13\n\tnetSetSockOpt  = 14\n\tnetGetSockOpt  = 15\n\tnetSendMsg     = 16\n\tnetRecvMsg     = 17\n\tnetAccept4     = 18\n\tnetRecvMMsg    = 19\n\tnetSendMMsg    = 20\n)\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {\n\targs := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}\n\tfd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(fd), nil\n}\n\nfunc getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {\n\targs := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}\n\t_, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {\n\targs := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}\n\t_, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc socketpair(domain int, typ int, flags int, fd *[2]int32) error {\n\targs := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}\n\t_, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {\n\targs := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {\n\targs := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc socket(domain int, typ int, proto int) (int, error) {\n\targs := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}\n\tfd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(fd), nil\n}\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {\n\targs := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {\n\targs := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {\n\tvar base uintptr\n\tif len(p) > 0 {\n\t\tbase = uintptr(unsafe.Pointer(&p[0]))\n\t}\n\targs := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}\n\tn, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(n), nil\n}\n\nfunc sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {\n\tvar base uintptr\n\tif len(p) > 0 {\n\t\tbase = uintptr(unsafe.Pointer(&p[0]))\n\t}\n\targs := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (int, error) {\n\targs := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}\n\tn, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(n), nil\n}\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (int, error) {\n\targs := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}\n\tn, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn 0, err\n\t}\n\treturn int(n), nil\n}\n\nfunc Listen(s int, n int) error {\n\targs := [2]uintptr{uintptr(s), uintptr(n)}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc Shutdown(s, how int) error {\n\targs := [2]uintptr{uintptr(s), uintptr(how)}\n\t_, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n//sys\tkexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)\n\nfunc KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {\n\tcmdlineLen := len(cmdline)\n\tif cmdlineLen > 0 {\n\t\t// Account for the additional NULL byte added by\n\t\t// BytePtrFromString in kexecFileLoad. The kexec_file_load\n\t\t// syscall expects a NULL-terminated string.\n\t\tcmdlineLen++\n\t}\n\treturn kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build sparc64 && linux\n\npackage unix\n\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (euid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tListen(s int, n int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error)\n//sys\tsetfsgid(gid int) (prev int, err error)\n//sys\tsetfsuid(uid int) (prev int, err error)\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tSplice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, buf *Statfs_t) (err error)\n//sys\tSyncFileRange(fd int, off int64, n int64, flags int) (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\treturn ENOSYS\n}\n\nfunc Iopl(level int) (err error) {\n\treturn ENOSYS\n}\n\n//sys\tfutimesat(dirfd int, path string, times *[2]Timeval) (err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terr = Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc (r *PtraceRegs) PC() uint64 { return r.Tpc }\n\nfunc (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint64(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint64(length)\n}\n\nfunc (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {\n\trsa.Service_name_len = uint64(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_netbsd.go",
    "content": "// Copyright 2009,2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// NetBSD system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_bsd.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n\traw    RawSockaddrDatalink\n}\n\nfunc anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\treturn nil, EAFNOSUPPORT\n}\n\nfunc Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\nfunc sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {\n\tvar olen uintptr\n\n\t// Get a list of all sysctl nodes below the given MIB by performing\n\t// a sysctl for the given MIB with CTL_QUERY appended.\n\tmib = append(mib, CTL_QUERY)\n\tqnode := Sysctlnode{Flags: SYSCTL_VERS_1}\n\tqp := (*byte)(unsafe.Pointer(&qnode))\n\tsz := unsafe.Sizeof(qnode)\n\tif err = sysctl(mib, nil, &olen, qp, sz); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Now that we know the size, get the actual nodes.\n\tnodes = make([]Sysctlnode, olen/sz)\n\tnp := (*byte)(unsafe.Pointer(&nodes[0]))\n\tif err = sysctl(mib, np, &olen, qp, sz); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn nodes, nil\n}\n\nfunc nametomib(name string) (mib []_C_int, err error) {\n\t// Split name into components.\n\tvar parts []string\n\tlast := 0\n\tfor i := 0; i < len(name); i++ {\n\t\tif name[i] == '.' {\n\t\t\tparts = append(parts, name[last:i])\n\t\t\tlast = i + 1\n\t\t}\n\t}\n\tparts = append(parts, name[last:])\n\n\t// Discover the nodes and construct the MIB OID.\n\tfor partno, part := range parts {\n\t\tnodes, err := sysctlNodes(mib)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, node := range nodes {\n\t\t\tn := make([]byte, 0)\n\t\t\tfor i := range node.Name {\n\t\t\t\tif node.Name[i] != 0 {\n\t\t\t\t\tn = append(n, byte(node.Name[i]))\n\t\t\t\t}\n\t\t\t}\n\t\t\tif string(n) == part {\n\t\t\t\tmib = append(mib, _C_int(node.Num))\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif len(mib) != partno+1 {\n\t\t\treturn nil, EINVAL\n\t\t}\n\t}\n\n\treturn mib, nil\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))\n}\n\nfunc SysctlUvmexp(name string) (*Uvmexp, error) {\n\tmib, err := sysctlmib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tn := uintptr(SizeofUvmexp)\n\tvar u Uvmexp\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &u, nil\n}\n\nfunc Pipe(p []int) (err error) {\n\treturn Pipe2(p, 0)\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) error {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn err\n}\n\n//sys\tGetdents(fd int, buf []byte) (n int, err error)\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\tn, err = Getdents(fd, buf)\n\tif err != nil || basep == nil {\n\t\treturn\n\t}\n\n\tvar off int64\n\toff, err = Seek(fd, 0, 1 /* SEEK_CUR */)\n\tif err != nil {\n\t\t*basep = ^uintptr(0)\n\t\treturn\n\t}\n\t*basep = uintptr(off)\n\tif unsafe.Sizeof(*basep) == 8 {\n\t\treturn\n\t}\n\tif off>>32 != 0 {\n\t\t// We can't stuff the offset back into a uintptr, so any\n\t\t// future calls would be suspect. Generate an error.\n\t\t// EIO is allowed by getdirentries.\n\t\terr = EIO\n\t}\n\treturn\n}\n\n//sys\tGetcwd(buf []byte) (n int, err error) = SYS___GETCWD\n\n// TODO\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\treturn -1, ENOSYS\n}\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error)\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\n//sys\tsysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL\n\nfunc IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {\n\tvar value Ptmget\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\nfunc Uname(uname *Utsname) error {\n\tmib := []_C_int{CTL_KERN, KERN_OSTYPE}\n\tn := unsafe.Sizeof(uname.Sysname)\n\tif err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_HOSTNAME}\n\tn = unsafe.Sizeof(uname.Nodename)\n\tif err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn = unsafe.Sizeof(uname.Release)\n\tif err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_VERSION}\n\tn = unsafe.Sizeof(uname.Version)\n\tif err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\t// The version might have newlines or tabs in it, convert them to\n\t// spaces.\n\tfor i, b := range uname.Version {\n\t\tif b == '\\n' || b == '\\t' {\n\t\t\tif i == len(uname.Version)-1 {\n\t\t\t\tuname.Version[i] = 0\n\t\t\t} else {\n\t\t\t\tuname.Version[i] = ' '\n\t\t\t}\n\t\t}\n\t}\n\n\tmib = []_C_int{CTL_HW, HW_MACHINE}\n\tn = unsafe.Sizeof(uname.Machine)\n\tif err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\nfunc Fstatvfs(fd int, buf *Statvfs_t) (err error) {\n\treturn Fstatvfs1(fd, buf, ST_WAIT)\n}\n\nfunc Statvfs(path string, buf *Statvfs_t) (err error) {\n\treturn Statvfs1(path, buf, ST_WAIT)\n}\n\nfunc Getvfsstat(buf []Statvfs_t, flags int) (n int, err error) {\n\tvar (\n\t\t_p0     unsafe.Pointer\n\t\tbufsize uintptr\n\t)\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t\tbufsize = unsafe.Sizeof(Statvfs_t{}) * uintptr(len(buf))\n\t}\n\tr0, _, e1 := Syscall(SYS_GETVFSSTAT, uintptr(_p0), bufsize, uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = e1\n\t}\n\treturn\n}\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChflags(path string, flags int) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(from int, to int) (err error)\n//sys\tDup3(from int, to int, flags int) (err error)\n//sys\tExit(code int)\n//sys\tExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)\n//sys\tExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)\n//sys\tExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE\n//sys\tFchdir(fd int) (err error)\n//sys\tFchflags(fd int, flags int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) = SYS_FSTATVFS1\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (uid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgrp int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tIssetugid() (tainted bool)\n//sys\tKill(pid int, signum syscall.Signal) (err error)\n//sys\tKqueue() (fd int, err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tLinkat(pathfd int, path string, linkfd int, link string, flags int) (err error)\n//sys\tListen(s int, backlog int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMkfifoat(dirfd int, path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(dirfd int, path string, mode int, perm uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tReadlinkat(dirfd int, path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(fromfd int, from string, tofd int, to string) (err error)\n//sys\tRevoke(path string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sysnb\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tp *Timeval) (err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatvfs1(path string, buf *Statvfs_t, flags int) (err error) = SYS_STATVFS1\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSync() (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUmask(newmask int) (oldmask int)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUnmount(path string, flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n\nconst (\n\tmremapFixed     = MAP_FIXED\n\tmremapDontunmap = 0\n\tmremapMaymove   = 0\n)\n\n//sys\tmremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) = SYS_MREMAP\n\nfunc mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (uintptr, error) {\n\treturn mremapNetBSD(oldaddr, oldlength, newaddr, newlength, flags)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_netbsd_386.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 && netbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = uint32(mode)\n\tk.Flags = uint32(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && netbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = uint32(mode)\n\tk.Flags = uint32(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm && netbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = uint32(mode)\n\tk.Flags = uint32(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm64 && netbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = uint32(mode)\n\tk.Flags = uint32(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd.go",
    "content": "// Copyright 2009,2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// OpenBSD system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_bsd.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"sort\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n\traw    RawSockaddrDatalink\n}\n\nfunc anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\treturn nil, EAFNOSUPPORT\n}\n\nfunc Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\nfunc nametomib(name string) (mib []_C_int, err error) {\n\ti := sort.Search(len(sysctlMib), func(i int) bool {\n\t\treturn sysctlMib[i].ctlname >= name\n\t})\n\tif i < len(sysctlMib) && sysctlMib[i].ctlname == name {\n\t\treturn sysctlMib[i].ctloid, nil\n\t}\n\treturn nil, EINVAL\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))\n}\n\nfunc SysctlUvmexp(name string) (*Uvmexp, error) {\n\tmib, err := sysctlmib(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tn := uintptr(SizeofUvmexp)\n\tvar u Uvmexp\n\tif err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n != SizeofUvmexp {\n\t\treturn nil, EIO\n\t}\n\treturn &u, nil\n}\n\nfunc Pipe(p []int) (err error) {\n\treturn Pipe2(p, 0)\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) error {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn err\n}\n\n//sys\tGetdents(fd int, buf []byte) (n int, err error)\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\tn, err = Getdents(fd, buf)\n\tif err != nil || basep == nil {\n\t\treturn\n\t}\n\n\tvar off int64\n\toff, err = Seek(fd, 0, 1 /* SEEK_CUR */)\n\tif err != nil {\n\t\t*basep = ^uintptr(0)\n\t\treturn\n\t}\n\t*basep = uintptr(off)\n\tif unsafe.Sizeof(*basep) == 8 {\n\t\treturn\n\t}\n\tif off>>32 != 0 {\n\t\t// We can't stuff the offset back into a uintptr, so any\n\t\t// future calls would be suspect. Generate an error.\n\t\t// EIO was allowed by getdirentries.\n\t\terr = EIO\n\t}\n\treturn\n}\n\n//sys\tGetcwd(buf []byte) (n int, err error) = SYS___GETCWD\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\n// TODO\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\treturn -1, ENOSYS\n}\n\nfunc Getfsstat(buf []Statfs_t, flags int) (n int, err error) {\n\tvar bufptr *Statfs_t\n\tvar bufsize uintptr\n\tif len(buf) > 0 {\n\t\tbufptr = &buf[0]\n\t\tbufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))\n\t}\n\treturn getfsstat(bufptr, bufsize, flags)\n}\n\n//sysnb\tgetresuid(ruid *_C_int, euid *_C_int, suid *_C_int)\n//sysnb\tgetresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)\n\nfunc Getresuid() (ruid, euid, suid int) {\n\tvar r, e, s _C_int\n\tgetresuid(&r, &e, &s)\n\treturn int(r), int(e), int(s)\n}\n\nfunc Getresgid() (rgid, egid, sgid int) {\n\tvar r, e, s _C_int\n\tgetresgid(&r, &e, &s)\n\treturn int(r), int(e), int(s)\n}\n\n//sys\tioctl(fd int, req uint, arg uintptr) (err error)\n//sys\tioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL\n\n//sys\tsysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL\n\n//sys\tfcntl(fd int, cmd int, arg int) (n int, err error)\n//sys\tfcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL\n\n// FcntlInt performs a fcntl syscall on fd with the provided command and argument.\nfunc FcntlInt(fd uintptr, cmd, arg int) (int, error) {\n\treturn fcntl(int(fd), cmd, arg)\n}\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {\n\t_, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk))\n\treturn err\n}\n\n//sys\tppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)\n\nfunc Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn ppoll(nil, 0, timeout, sigmask)\n\t}\n\treturn ppoll(&fds[0], len(fds), timeout, sigmask)\n}\n\nfunc Uname(uname *Utsname) error {\n\tmib := []_C_int{CTL_KERN, KERN_OSTYPE}\n\tn := unsafe.Sizeof(uname.Sysname)\n\tif err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_HOSTNAME}\n\tn = unsafe.Sizeof(uname.Nodename)\n\tif err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_OSRELEASE}\n\tn = unsafe.Sizeof(uname.Release)\n\tif err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\tmib = []_C_int{CTL_KERN, KERN_VERSION}\n\tn = unsafe.Sizeof(uname.Version)\n\tif err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\t// The version might have newlines or tabs in it, convert them to\n\t// spaces.\n\tfor i, b := range uname.Version {\n\t\tif b == '\\n' || b == '\\t' {\n\t\t\tif i == len(uname.Version)-1 {\n\t\t\t\tuname.Version[i] = 0\n\t\t\t} else {\n\t\t\t\tuname.Version[i] = ' '\n\t\t\t}\n\t\t}\n\t}\n\n\tmib = []_C_int{CTL_HW, HW_MACHINE}\n\tn = unsafe.Sizeof(uname.Machine)\n\tif err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChflags(path string, flags int) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(from int, to int) (err error)\n//sys\tDup3(from int, to int, flags int) (err error)\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchflags(fd int, flags int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatfs(fd int, stat *Statfs_t) (err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sysnb\tGetegid() (egid int)\n//sysnb\tGeteuid() (uid int)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgrp int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrtable() (rtable int, err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tIssetugid() (tainted bool)\n//sys\tKill(pid int, signum syscall.Signal) (err error)\n//sys\tKqueue() (fd int, err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tLinkat(pathfd int, path string, linkfd int, link string, flags int) (err error)\n//sys\tListen(s int, backlog int) (err error)\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMkfifoat(dirfd int, path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error)\n//sys\tMount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(dirfd int, path string, mode int, perm uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tReadlinkat(dirfd int, path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(fromfd int, from string, tofd int, to string) (err error)\n//sys\tRevoke(path string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sysnb\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sys\tSetlogin(name string) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetresgid(rgid int, egid int, sgid int) (err error)\n//sysnb\tSetresuid(ruid int, euid int, suid int) (err error)\n//sysnb\tSetrtable(rtable int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSettimeofday(tp *Timeval) (err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatfs(path string, stat *Statfs_t) (err error)\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSymlinkat(oldpath string, newdirfd int, newpath string) (err error)\n//sys\tSync() (err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tUmask(newmask int) (oldmask int)\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUnmount(path string, flags int) (err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\tgetfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error)\n//sys\tutimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)\n//sys\tpledge(promises *byte, execpromises *byte) (err error)\n//sys\tunveil(path *byte, flags *byte) (err error)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_386.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build 386 && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/386 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/amd64 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/arm the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build arm64 && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/amd64 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build openbsd\n\npackage unix\n\nimport _ \"unsafe\"\n\n// Implemented in the runtime package (runtime/sys_openbsd3.go)\nfunc syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\n\n//go:linkname syscall_syscall syscall.syscall\n//go:linkname syscall_syscall6 syscall.syscall6\n//go:linkname syscall_syscall10 syscall.syscall10\n//go:linkname syscall_rawSyscall syscall.rawSyscall\n//go:linkname syscall_rawSyscall6 syscall.rawSyscall6\n\nfunc syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {\n\treturn syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of OpenBSD the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build ppc64 && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build riscv64 && openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint64(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_solaris.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Solaris system calls.\n// This file is compiled as ordinary Go code,\n// but it is also input to mksyscall,\n// which parses the //sys lines and generates system call stubs.\n// Note that sometimes we use a lowercase //sys name and wrap\n// it in our own nicer implementation, either here or in\n// syscall_solaris.go or syscall_unix.go.\n\npackage unix\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// Implemented in runtime/syscall_solaris.go.\ntype syscallFunc uintptr\n\nfunc rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)\nfunc sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)\n\n// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.\ntype SockaddrDatalink struct {\n\tFamily uint16\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [244]int8\n\traw    RawSockaddrDatalink\n}\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treclen, ok := direntReclen(buf)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\treturn reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true\n}\n\n//sysnb\tpipe(p *[2]_C_int) (n int, err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\tn, err := pipe(&pp)\n\tif n != 0 {\n\t\treturn err\n\t}\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn nil\n}\n\n//sysnb\tpipe2(p *[2]_C_int, flags int) (err error)\n\nfunc Pipe2(p []int, flags int) error {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr := pipe2(&pp, flags)\n\tif err == nil {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn err\n}\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n >= len(sa.raw.Path) {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Family = AF_UNIX\n\tfor i := 0; i < n; i++ {\n\t\tsa.raw.Path[i] = int8(name[i])\n\t}\n\t// length is family (uint16), name, NUL.\n\tsl := _Socklen(2)\n\tif n > 0 {\n\t\tsl += _Socklen(n) + 1\n\t}\n\tif sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {\n\t\t// Check sl > 3 so we don't change unnamed socket behavior.\n\t\tsa.raw.Path[0] = 0\n\t\t// Don't count trailing NUL for abstract address.\n\t\tsl--\n\t}\n\n\treturn unsafe.Pointer(&sa.raw), sl, nil\n}\n\n//sys\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname\n\nfunc Getsockname(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getsockname(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\n// GetsockoptString returns the string value of the socket option opt for the\n// socket associated with fd at the given socket level.\nfunc GetsockoptString(fd, level, opt int) (string, error) {\n\tbuf := make([]byte, 256)\n\tvallen := _Socklen(len(buf))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn ByteSliceToString(buf[:vallen]), nil\n}\n\nconst ImplementsGetwd = true\n\n//sys\tGetcwd(buf []byte) (n int, err error)\n\nfunc Getwd() (wd string, err error) {\n\tvar buf [PathMax]byte\n\t// Getcwd will return an error if it failed for any reason.\n\t_, err = Getcwd(buf[0:])\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tn := clen(buf[:])\n\tif n < 1 {\n\t\treturn \"\", EINVAL\n\t}\n\treturn string(buf[:n]), nil\n}\n\n/*\n * Wrapped\n */\n\n//sysnb\tgetgroups(ngid int, gid *_Gid_t) (n int, err error)\n//sysnb\tsetgroups(ngid int, gid *_Gid_t) (err error)\n\nfunc Getgroups() (gids []int, err error) {\n\tn, err := getgroups(0, nil)\n\t// Check for error and sanity check group count. Newer versions of\n\t// Solaris allow up to 1024 (NGROUPS_MAX).\n\tif n < 0 || n > 1024 {\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, EINVAL\n\t} else if n == 0 {\n\t\treturn nil, nil\n\t}\n\n\ta := make([]_Gid_t, n)\n\tn, err = getgroups(n, &a[0])\n\tif n == -1 {\n\t\treturn nil, err\n\t}\n\tgids = make([]int, n)\n\tfor i, v := range a[0:n] {\n\t\tgids[i] = int(v)\n\t}\n\treturn\n}\n\nfunc Setgroups(gids []int) (err error) {\n\tif len(gids) == 0 {\n\t\treturn setgroups(0, nil)\n\t}\n\n\ta := make([]_Gid_t, len(gids))\n\tfor i, v := range gids {\n\t\ta[i] = _Gid_t(v)\n\t}\n\treturn setgroups(len(a), &a[0])\n}\n\n// ReadDirent reads directory entries from fd and writes them into buf.\nfunc ReadDirent(fd int, buf []byte) (n int, err error) {\n\t// Final argument is (basep *uintptr) and the syscall doesn't take nil.\n\t// TODO(rsc): Can we use a single global basep for all calls?\n\treturn Getdents(fd, buf, new(uintptr))\n}\n\n// Wait status is 7 bits at bottom, either 0 (exited),\n// 0x7F (stopped), or a signal number that caused an exit.\n// The 0x80 bit is whether there was a core dump.\n// An extra number (exit code, signal causing a stop)\n// is in the high bits.\n\ntype WaitStatus uint32\n\nconst (\n\tmask  = 0x7F\n\tcore  = 0x80\n\tshift = 8\n\n\texited  = 0\n\tstopped = 0x7F\n)\n\nfunc (w WaitStatus) Exited() bool { return w&mask == exited }\n\nfunc (w WaitStatus) ExitStatus() int {\n\tif w&mask != exited {\n\t\treturn -1\n\t}\n\treturn int(w >> shift)\n}\n\nfunc (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }\n\nfunc (w WaitStatus) Signal() syscall.Signal {\n\tsig := syscall.Signal(w & mask)\n\tif sig == stopped || sig == 0 {\n\t\treturn -1\n\t}\n\treturn sig\n}\n\nfunc (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }\n\nfunc (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }\n\nfunc (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }\n\nfunc (w WaitStatus) StopSignal() syscall.Signal {\n\tif !w.Stopped() {\n\t\treturn -1\n\t}\n\treturn syscall.Signal(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) TrapCause() int { return -1 }\n\n//sys\twait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)\n\nfunc Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {\n\tvar status _C_int\n\trpid, err := wait4(int32(pid), &status, options, rusage)\n\twpid := int(rpid)\n\tif wpid == -1 {\n\t\treturn wpid, err\n\t}\n\tif wstatus != nil {\n\t\t*wstatus = WaitStatus(status)\n\t}\n\treturn wpid, nil\n}\n\n//sys\tgethostname(buf []byte) (n int, err error)\n\nfunc Gethostname() (name string, err error) {\n\tvar buf [MaxHostNameLen]byte\n\tn, err := gethostname(buf[:])\n\tif n != 0 {\n\t\treturn \"\", err\n\t}\n\tn = clen(buf[:])\n\tif n < 1 {\n\t\treturn \"\", EFAULT\n\t}\n\treturn string(buf[:n]), nil\n}\n\n//sys\tutimes(path string, times *[2]Timeval) (err error)\n\nfunc Utimes(path string, tv []Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimes(path, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n//sys\tutimensat(fd int, path string, times *[2]Timespec, flag int) (err error)\n\nfunc UtimesNano(path string, ts []Timespec) error {\n\tif ts == nil {\n\t\treturn utimensat(AT_FDCWD, path, nil, 0)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {\n\tif ts == nil {\n\t\treturn utimensat(dirfd, path, nil, flags)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)\n}\n\n//sys\tfcntl(fd int, cmd int, arg int) (val int, err error)\n\n// FcntlInt performs a fcntl syscall on fd with the provided command and argument.\nfunc FcntlInt(fd uintptr, cmd, arg int) (int, error) {\n\tvalptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)\n\tvar err error\n\tif errno != 0 {\n\t\terr = errno\n\t}\n\treturn int(valptr), err\n}\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)\n\tif e1 != 0 {\n\t\treturn e1\n\t}\n\treturn nil\n}\n\n//sys\tfutimesat(fildes int, path *byte, times *[2]Timeval) (err error)\n\nfunc Futimesat(dirfd int, path string, tv []Timeval) error {\n\tpathp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tv == nil {\n\t\treturn futimesat(dirfd, pathp, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n// Solaris doesn't have an futimes function because it allows NULL to be\n// specified as the path for futimesat. However, Go doesn't like\n// NULL-style string interfaces, so this simple wrapper is provided.\nfunc Futimes(fd int, tv []Timeval) error {\n\tif tv == nil {\n\t\treturn futimesat(fd, nil, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\nfunc anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrUnix)\n\t\t// Assume path ends at NUL.\n\t\t// This is not technically the Solaris semantics for\n\t\t// abstract Unix domain sockets -- they are supposed\n\t\t// to be uninterpreted fixed-size binary blobs -- but\n\t\t// everyone uses this convention.\n\t\tn := 0\n\t\tfor n < len(pp.Path) && pp.Path[n] != 0 {\n\t\t\tn++\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase AF_INET6:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\t}\n\treturn nil, EAFNOSUPPORT\n}\n\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept\n\nfunc Accept(fd int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept(fd, &rsa, &len)\n\tif nfd == -1 {\n\t\treturn\n\t}\n\tsa, err = anyToSockaddr(fd, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg\n\nfunc recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(rsa))\n\tmsg.Namelen = uint32(SizeofSockaddrAny)\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\t// receive at least one normal byte\n\t\tif emptyIovecs(iov) {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Accrightslen = int32(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = recvmsg(fd, &msg, flags); n == -1 {\n\t\treturn\n\t}\n\toobn = int(msg.Accrightslen)\n\treturn\n}\n\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg\n\nfunc sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(ptr))\n\tmsg.Namelen = uint32(salen)\n\tvar dummy byte\n\tvar empty bool\n\tif len(oob) > 0 {\n\t\t// send at least one normal byte\n\t\tempty = emptyIovecs(iov)\n\t\tif empty {\n\t\t\tvar iova [1]Iovec\n\t\t\tiova[0].Base = &dummy\n\t\t\tiova[0].SetLen(1)\n\t\t\tiov = iova[:]\n\t\t}\n\t\tmsg.Accrightslen = int32(len(oob))\n\t}\n\tif len(iov) > 0 {\n\t\tmsg.Iov = &iov[0]\n\t\tmsg.SetIovlen(len(iov))\n\t}\n\tif n, err = sendmsg(fd, &msg, flags); err != nil {\n\t\treturn 0, err\n\t}\n\tif len(oob) > 0 && empty {\n\t\tn = 0\n\t}\n\treturn n, nil\n}\n\n//sys\tacct(path *byte) (err error)\n\nfunc Acct(path string) (err error) {\n\tif len(path) == 0 {\n\t\t// Assume caller wants to disable accounting.\n\t\treturn acct(nil)\n\t}\n\n\tpathp, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn acct(pathp)\n}\n\n//sys\t__makedev(version int, major uint, minor uint) (val uint64)\n\nfunc Mkdev(major, minor uint32) uint64 {\n\treturn __makedev(NEWDEV, uint(major), uint(minor))\n}\n\n//sys\t__major(version int, dev uint64) (val uint)\n\nfunc Major(dev uint64) uint32 {\n\treturn uint32(__major(NEWDEV, dev))\n}\n\n//sys\t__minor(version int, dev uint64) (val uint)\n\nfunc Minor(dev uint64) uint32 {\n\treturn uint32(__minor(NEWDEV, dev))\n}\n\n/*\n * Expose the ioctl function\n */\n\n//sys\tioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl\n//sys\tioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl\n\nfunc ioctl(fd int, req int, arg uintptr) (err error) {\n\t_, err = ioctlRet(fd, req, arg)\n\treturn err\n}\n\nfunc ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {\n\t_, err = ioctlPtrRet(fd, req, arg)\n\treturn err\n}\n\nfunc IoctlSetTermio(fd int, req int, value *Termio) error {\n\treturn ioctlPtr(fd, req, unsafe.Pointer(value))\n}\n\nfunc IoctlGetTermio(fd int, req int) (*Termio, error) {\n\tvar value Termio\n\terr := ioctlPtr(fd, req, unsafe.Pointer(&value))\n\treturn &value, err\n}\n\n//sys\tpoll(fds *PollFd, nfds int, timeout int) (n int, err error)\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tif len(fds) == 0 {\n\t\treturn poll(nil, 0, timeout)\n\t}\n\treturn poll(&fds[0], len(fds), timeout)\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\n/*\n * Exposed directly\n */\n//sys\tAccess(path string, mode uint32) (err error)\n//sys\tAdjtime(delta *Timeval, olddelta *Timeval) (err error)\n//sys\tChdir(path string) (err error)\n//sys\tChmod(path string, mode uint32) (err error)\n//sys\tChown(path string, uid int, gid int) (err error)\n//sys\tChroot(path string) (err error)\n//sys\tClockGettime(clockid int32, time *Timespec) (err error)\n//sys\tClose(fd int) (err error)\n//sys\tCreat(path string, mode uint32) (fd int, err error)\n//sys\tDup(fd int) (nfd int, err error)\n//sys\tDup2(oldfd int, newfd int) (err error)\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchdir(fd int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error)\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(dirfd int, path string, uid int, gid int, flags int) (err error)\n//sys\tFdatasync(fd int) (err error)\n//sys\tFlock(fd int, how int) (err error)\n//sys\tFpathconf(fd int, name int) (val int, err error)\n//sys\tFstat(fd int, stat *Stat_t) (err error)\n//sys\tFstatat(fd int, path string, stat *Stat_t, flags int) (err error)\n//sys\tFstatvfs(fd int, vfsstat *Statvfs_t) (err error)\n//sys\tGetdents(fd int, buf []byte, basep *uintptr) (n int, err error)\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error)\n//sysnb\tGetpgrp() (pgid int, err error)\n//sys\tGeteuid() (euid int)\n//sys\tGetegid() (egid int)\n//sys\tGetppid() (ppid int)\n//sys\tGetpriority(which int, who int) (n int, err error)\n//sysnb\tGetrlimit(which int, lim *Rlimit) (err error)\n//sysnb\tGetrusage(who int, rusage *Rusage) (err error)\n//sysnb\tGetsid(pid int) (sid int, err error)\n//sysnb\tGettimeofday(tv *Timeval) (err error)\n//sysnb\tGetuid() (uid int)\n//sys\tKill(pid int, signum syscall.Signal) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error)\n//sys\tLink(path string, link string) (err error)\n//sys\tListen(s int, backlog int) (err error) = libsocket.__xnet_listen\n//sys\tLstat(path string, stat *Stat_t) (err error)\n//sys\tMadvise(b []byte, advice int) (err error)\n//sys\tMkdir(path string, mode uint32) (err error)\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error)\n//sys\tMkfifo(path string, mode uint32) (err error)\n//sys\tMkfifoat(dirfd int, path string, mode uint32) (err error)\n//sys\tMknod(path string, mode uint32, dev int) (err error)\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error)\n//sys\tMlock(b []byte) (err error)\n//sys\tMlockall(flags int) (err error)\n//sys\tMprotect(b []byte, prot int) (err error)\n//sys\tMsync(b []byte, flags int) (err error)\n//sys\tMunlock(b []byte) (err error)\n//sys\tMunlockall() (err error)\n//sys\tNanosleep(time *Timespec, leftover *Timespec) (err error)\n//sys\tOpen(path string, mode int, perm uint32) (fd int, err error)\n//sys\tOpenat(dirfd int, path string, flags int, mode uint32) (fd int, err error)\n//sys\tPathconf(path string, name int) (val int, err error)\n//sys\tPause() (err error)\n//sys\tpread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tpwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\tReadlink(path string, buf []byte) (n int, err error)\n//sys\tRename(from string, to string) (err error)\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)\n//sys\tRmdir(path string) (err error)\n//sys\tSeek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek\n//sys\tSelect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)\n//sysnb\tSetegid(egid int) (err error)\n//sysnb\tSeteuid(euid int) (err error)\n//sysnb\tSetgid(gid int) (err error)\n//sys\tSethostname(p []byte) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error)\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error)\n//sysnb\tSetreuid(ruid int, euid int) (err error)\n//sysnb\tSetsid() (pid int, err error)\n//sysnb\tSetuid(uid int) (err error)\n//sys\tShutdown(s int, how int) (err error) = libsocket.shutdown\n//sys\tStat(path string, stat *Stat_t) (err error)\n//sys\tStatvfs(path string, vfsstat *Statvfs_t) (err error)\n//sys\tSymlink(path string, link string) (err error)\n//sys\tSync() (err error)\n//sys\tSysconf(which int) (n int64, err error)\n//sysnb\tTimes(tms *Tms) (ticks uintptr, err error)\n//sys\tTruncate(path string, length int64) (err error)\n//sys\tFsync(fd int) (err error)\n//sys\tFtruncate(fd int, length int64) (err error)\n//sys\tUmask(mask int) (oldmask int)\n//sysnb\tUname(buf *Utsname) (err error)\n//sys\tUnmount(target string, flags int) (err error) = libc.umount\n//sys\tUnlink(path string) (err error)\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error)\n//sys\tUstat(dev int, ubuf *Ustat_t) (err error)\n//sys\tUtime(path string, buf *Utimbuf) (err error)\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect\n//sys\tmmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)\n//sys\tmunmap(addr uintptr, length uintptr) (err error)\n//sys\tsendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = libsendfile.sendfile\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto\n//sys\tsocket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair\n//sys\twrite(fd int, p []byte) (n int, err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom\n\n// Event Ports\n\ntype fileObjCookie struct {\n\tfobj   *fileObj\n\tcookie interface{}\n}\n\n// EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.\ntype EventPort struct {\n\tport  int\n\tmu    sync.Mutex\n\tfds   map[uintptr]*fileObjCookie\n\tpaths map[string]*fileObjCookie\n\t// The user cookie presents an interesting challenge from a memory management perspective.\n\t// There are two paths by which we can discover that it is no longer in use:\n\t// 1. The user calls port_dissociate before any events fire\n\t// 2. An event fires and we return it to the user\n\t// The tricky situation is if the event has fired in the kernel but\n\t// the user hasn't requested/received it yet.\n\t// If the user wants to port_dissociate before the event has been processed,\n\t// we should handle things gracefully. To do so, we need to keep an extra\n\t// reference to the cookie around until the event is processed\n\t// thus the otherwise seemingly extraneous \"cookies\" map\n\t// The key of this map is a pointer to the corresponding fCookie\n\tcookies map[*fileObjCookie]struct{}\n}\n\n// PortEvent is an abstraction of the port_event C struct.\n// Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD\n// to see if Path or Fd was the event source. The other will be\n// uninitialized.\ntype PortEvent struct {\n\tCookie interface{}\n\tEvents int32\n\tFd     uintptr\n\tPath   string\n\tSource uint16\n\tfobj   *fileObj\n}\n\n// NewEventPort creates a new EventPort including the\n// underlying call to port_create(3c).\nfunc NewEventPort() (*EventPort, error) {\n\tport, err := port_create()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\te := &EventPort{\n\t\tport:    port,\n\t\tfds:     make(map[uintptr]*fileObjCookie),\n\t\tpaths:   make(map[string]*fileObjCookie),\n\t\tcookies: make(map[*fileObjCookie]struct{}),\n\t}\n\treturn e, nil\n}\n\n//sys\tport_create() (n int, err error)\n//sys\tport_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)\n//sys\tport_dissociate(port int, source int, object uintptr) (n int, err error)\n//sys\tport_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)\n//sys\tport_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)\n\n// Close closes the event port.\nfunc (e *EventPort) Close() error {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\terr := Close(e.port)\n\tif err != nil {\n\t\treturn err\n\t}\n\te.fds = nil\n\te.paths = nil\n\te.cookies = nil\n\treturn nil\n}\n\n// PathIsWatched checks to see if path is associated with this EventPort.\nfunc (e *EventPort) PathIsWatched(path string) bool {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\t_, found := e.paths[path]\n\treturn found\n}\n\n// FdIsWatched checks to see if fd is associated with this EventPort.\nfunc (e *EventPort) FdIsWatched(fd uintptr) bool {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\t_, found := e.fds[fd]\n\treturn found\n}\n\n// AssociatePath wraps port_associate(3c) for a filesystem path including\n// creating the necessary file_obj from the provided stat information.\nfunc (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\tif _, found := e.paths[path]; found {\n\t\treturn fmt.Errorf(\"%v is already associated with this Event Port\", path)\n\t}\n\tfCookie, err := createFileObjCookie(path, stat, cookie)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))\n\tif err != nil {\n\t\treturn err\n\t}\n\te.paths[path] = fCookie\n\te.cookies[fCookie] = struct{}{}\n\treturn nil\n}\n\n// DissociatePath wraps port_dissociate(3c) for a filesystem path.\nfunc (e *EventPort) DissociatePath(path string) error {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\tf, ok := e.paths[path]\n\tif !ok {\n\t\treturn fmt.Errorf(\"%v is not associated with this Event Port\", path)\n\t}\n\t_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))\n\t// If the path is no longer associated with this event port (ENOENT)\n\t// we should delete it from our map. We can still return ENOENT to the caller.\n\t// But we need to save the cookie\n\tif err != nil && err != ENOENT {\n\t\treturn err\n\t}\n\tif err == nil {\n\t\t// dissociate was successful, safe to delete the cookie\n\t\tfCookie := e.paths[path]\n\t\tdelete(e.cookies, fCookie)\n\t}\n\tdelete(e.paths, path)\n\treturn err\n}\n\n// AssociateFd wraps calls to port_associate(3c) on file descriptors.\nfunc (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\tif _, found := e.fds[fd]; found {\n\t\treturn fmt.Errorf(\"%v is already associated with this Event Port\", fd)\n\t}\n\tfCookie, err := createFileObjCookie(\"\", nil, cookie)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))\n\tif err != nil {\n\t\treturn err\n\t}\n\te.fds[fd] = fCookie\n\te.cookies[fCookie] = struct{}{}\n\treturn nil\n}\n\n// DissociateFd wraps calls to port_dissociate(3c) on file descriptors.\nfunc (e *EventPort) DissociateFd(fd uintptr) error {\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\t_, ok := e.fds[fd]\n\tif !ok {\n\t\treturn fmt.Errorf(\"%v is not associated with this Event Port\", fd)\n\t}\n\t_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)\n\tif err != nil && err != ENOENT {\n\t\treturn err\n\t}\n\tif err == nil {\n\t\t// dissociate was successful, safe to delete the cookie\n\t\tfCookie := e.fds[fd]\n\t\tdelete(e.cookies, fCookie)\n\t}\n\tdelete(e.fds, fd)\n\treturn err\n}\n\nfunc createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {\n\tfCookie := new(fileObjCookie)\n\tfCookie.cookie = cookie\n\tif name != \"\" && stat != nil {\n\t\tfCookie.fobj = new(fileObj)\n\t\tbs, err := ByteSliceFromString(name)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))\n\t\ts := stat.Sys().(*syscall.Stat_t)\n\t\tfCookie.fobj.Atim.Sec = s.Atim.Sec\n\t\tfCookie.fobj.Atim.Nsec = s.Atim.Nsec\n\t\tfCookie.fobj.Mtim.Sec = s.Mtim.Sec\n\t\tfCookie.fobj.Mtim.Nsec = s.Mtim.Nsec\n\t\tfCookie.fobj.Ctim.Sec = s.Ctim.Sec\n\t\tfCookie.fobj.Ctim.Nsec = s.Ctim.Nsec\n\t}\n\treturn fCookie, nil\n}\n\n// GetOne wraps port_get(3c) and returns a single PortEvent.\nfunc (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {\n\tpe := new(portEvent)\n\t_, err := port_get(e.port, pe, t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tp := new(PortEvent)\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\terr = e.peIntToExt(pe, p)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn p, nil\n}\n\n// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent\n// NOTE: Always call this function while holding the e.mu mutex\nfunc (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {\n\tif e.cookies == nil {\n\t\treturn fmt.Errorf(\"this EventPort is already closed\")\n\t}\n\tpeExt.Events = peInt.Events\n\tpeExt.Source = peInt.Source\n\tfCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))\n\t_, found := e.cookies[fCookie]\n\n\tif !found {\n\t\tpanic(\"unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254\")\n\t}\n\tpeExt.Cookie = fCookie.cookie\n\tdelete(e.cookies, fCookie)\n\n\tswitch peInt.Source {\n\tcase PORT_SOURCE_FD:\n\t\tpeExt.Fd = uintptr(peInt.Object)\n\t\t// Only remove the fds entry if it exists and this cookie matches\n\t\tif fobj, ok := e.fds[peExt.Fd]; ok {\n\t\t\tif fobj == fCookie {\n\t\t\t\tdelete(e.fds, peExt.Fd)\n\t\t\t}\n\t\t}\n\tcase PORT_SOURCE_FILE:\n\t\tpeExt.fobj = fCookie.fobj\n\t\tpeExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))\n\t\t// Only remove the paths entry if it exists and this cookie matches\n\t\tif fobj, ok := e.paths[peExt.Path]; ok {\n\t\t\tif fobj == fCookie {\n\t\t\t\tdelete(e.paths, peExt.Path)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// Pending wraps port_getn(3c) and returns how many events are pending.\nfunc (e *EventPort) Pending() (int, error) {\n\tvar n uint32 = 0\n\t_, err := port_getn(e.port, nil, 0, &n, nil)\n\treturn int(n), err\n}\n\n// Get wraps port_getn(3c) and fills a slice of PortEvent.\n// It will block until either min events have been received\n// or the timeout has been exceeded. It will return how many\n// events were actually received along with any error information.\nfunc (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {\n\tif min == 0 {\n\t\treturn 0, fmt.Errorf(\"need to request at least one event or use Pending() instead\")\n\t}\n\tif len(s) < min {\n\t\treturn 0, fmt.Errorf(\"len(s) (%d) is less than min events requested (%d)\", len(s), min)\n\t}\n\tgot := uint32(min)\n\tmax := uint32(len(s))\n\tvar err error\n\tps := make([]portEvent, max)\n\t_, err = port_getn(e.port, &ps[0], max, &got, timeout)\n\t// got will be trustworthy with ETIME, but not any other error.\n\tif err != nil && err != ETIME {\n\t\treturn 0, err\n\t}\n\te.mu.Lock()\n\tdefer e.mu.Unlock()\n\tvalid := 0\n\tfor i := 0; i < int(got); i++ {\n\t\terr2 := e.peIntToExt(&ps[i], &s[i])\n\t\tif err2 != nil {\n\t\t\tif valid == 0 && err == nil {\n\t\t\t\t// If err2 is the only error and there are no valid events\n\t\t\t\t// to return, return it to the caller.\n\t\t\t\terr = err2\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tvalid = i + 1\n\t}\n\treturn valid, err\n}\n\n//sys\tputmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)\n\nfunc Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {\n\tvar clp, datap *strbuf\n\tif len(cl) > 0 {\n\t\tclp = &strbuf{\n\t\t\tLen: int32(len(cl)),\n\t\t\tBuf: (*int8)(unsafe.Pointer(&cl[0])),\n\t\t}\n\t}\n\tif len(data) > 0 {\n\t\tdatap = &strbuf{\n\t\t\tLen: int32(len(data)),\n\t\t\tBuf: (*int8)(unsafe.Pointer(&data[0])),\n\t\t}\n\t}\n\treturn putmsg(fd, clp, datap, flags)\n}\n\n//sys\tgetmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)\n\nfunc Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {\n\tvar clp, datap *strbuf\n\tif len(cl) > 0 {\n\t\tclp = &strbuf{\n\t\t\tMaxlen: int32(len(cl)),\n\t\t\tBuf:    (*int8)(unsafe.Pointer(&cl[0])),\n\t\t}\n\t}\n\tif len(data) > 0 {\n\t\tdatap = &strbuf{\n\t\t\tMaxlen: int32(len(data)),\n\t\t\tBuf:    (*int8)(unsafe.Pointer(&data[0])),\n\t\t}\n\t}\n\n\tif err = getmsg(fd, clp, datap, &flags); err != nil {\n\t\treturn nil, nil, 0, err\n\t}\n\n\tif len(cl) > 0 {\n\t\tretCl = cl[:clp.Len]\n\t}\n\tif len(data) > 0 {\n\t\tretData = data[:datap.Len]\n\t}\n\treturn retCl, retData, flags, nil\n}\n\nfunc IoctlSetIntRetInt(fd int, req int, arg int) (int, error) {\n\treturn ioctlRet(fd, req, uintptr(arg))\n}\n\n// Lifreq Helpers\n\nfunc (l *Lifreq) SetName(name string) error {\n\tif len(name) >= len(l.Name) {\n\t\treturn fmt.Errorf(\"name cannot be more than %d characters\", len(l.Name)-1)\n\t}\n\tfor i := range name {\n\t\tl.Name[i] = int8(name[i])\n\t}\n\treturn nil\n}\n\nfunc (l *Lifreq) SetLifruInt(d int) {\n\t*(*int)(unsafe.Pointer(&l.Lifru[0])) = d\n}\n\nfunc (l *Lifreq) GetLifruInt() int {\n\treturn *(*int)(unsafe.Pointer(&l.Lifru[0]))\n}\n\nfunc (l *Lifreq) SetLifruUint(d uint) {\n\t*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d\n}\n\nfunc (l *Lifreq) GetLifruUint() uint {\n\treturn *(*uint)(unsafe.Pointer(&l.Lifru[0]))\n}\n\nfunc IoctlLifreq(fd int, req int, l *Lifreq) error {\n\treturn ioctlPtr(fd, req, unsafe.Pointer(l))\n}\n\n// Strioctl Helpers\n\nfunc (s *Strioctl) SetInt(i int) {\n\ts.Len = int32(unsafe.Sizeof(i))\n\ts.Dp = (*int8)(unsafe.Pointer(&i))\n}\n\nfunc IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {\n\treturn ioctlPtrRet(fd, req, unsafe.Pointer(s))\n}\n\n// Ucred Helpers\n// See ucred(3c) and getpeerucred(3c)\n\n//sys\tgetpeerucred(fd uintptr, ucred *uintptr) (err error)\n//sys\tucredFree(ucred uintptr) = ucred_free\n//sys\tucredGet(pid int) (ucred uintptr, err error) = ucred_get\n//sys\tucredGeteuid(ucred uintptr) (uid int) = ucred_geteuid\n//sys\tucredGetegid(ucred uintptr) (gid int) = ucred_getegid\n//sys\tucredGetruid(ucred uintptr) (uid int) = ucred_getruid\n//sys\tucredGetrgid(ucred uintptr) (gid int) = ucred_getrgid\n//sys\tucredGetsuid(ucred uintptr) (uid int) = ucred_getsuid\n//sys\tucredGetsgid(ucred uintptr) (gid int) = ucred_getsgid\n//sys\tucredGetpid(ucred uintptr) (pid int) = ucred_getpid\n\n// Ucred is an opaque struct that holds user credentials.\ntype Ucred struct {\n\tucred uintptr\n}\n\n// We need to ensure that ucredFree is called on the underlying ucred\n// when the Ucred is garbage collected.\nfunc ucredFinalizer(u *Ucred) {\n\tucredFree(u.ucred)\n}\n\nfunc GetPeerUcred(fd uintptr) (*Ucred, error) {\n\tvar ucred uintptr\n\terr := getpeerucred(fd, &ucred)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresult := &Ucred{\n\t\tucred: ucred,\n\t}\n\t// set the finalizer on the result so that the ucred will be freed\n\truntime.SetFinalizer(result, ucredFinalizer)\n\treturn result, nil\n}\n\nfunc UcredGet(pid int) (*Ucred, error) {\n\tucred, err := ucredGet(pid)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresult := &Ucred{\n\t\tucred: ucred,\n\t}\n\t// set the finalizer on the result so that the ucred will be freed\n\truntime.SetFinalizer(result, ucredFinalizer)\n\treturn result, nil\n}\n\nfunc (u *Ucred) Geteuid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGeteuid(u.ucred)\n}\n\nfunc (u *Ucred) Getruid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetruid(u.ucred)\n}\n\nfunc (u *Ucred) Getsuid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetsuid(u.ucred)\n}\n\nfunc (u *Ucred) Getegid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetegid(u.ucred)\n}\n\nfunc (u *Ucred) Getrgid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetrgid(u.ucred)\n}\n\nfunc (u *Ucred) Getsgid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetsgid(u.ucred)\n}\n\nfunc (u *Ucred) Getpid() int {\n\tdefer runtime.KeepAlive(u)\n\treturn ucredGetpid(u.ucred)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build amd64 && solaris\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetIovlen(length int) {\n\tmsghdr.Iovlen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_unix.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris\n\npackage unix\n\nimport (\n\t\"bytes\"\n\t\"sort\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar (\n\tStdin  = 0\n\tStdout = 1\n\tStderr = 2\n)\n\n// Do the interface allocations only once for common\n// Errno values.\nvar (\n\terrEAGAIN error = syscall.EAGAIN\n\terrEINVAL error = syscall.EINVAL\n\terrENOENT error = syscall.ENOENT\n)\n\nvar (\n\tsignalNameMapOnce sync.Once\n\tsignalNameMap     map[string]syscall.Signal\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn nil\n\tcase EAGAIN:\n\t\treturn errEAGAIN\n\tcase EINVAL:\n\t\treturn errEINVAL\n\tcase ENOENT:\n\t\treturn errENOENT\n\t}\n\treturn e\n}\n\n// ErrnoName returns the error name for error number e.\nfunc ErrnoName(e syscall.Errno) string {\n\ti := sort.Search(len(errorList), func(i int) bool {\n\t\treturn errorList[i].num >= e\n\t})\n\tif i < len(errorList) && errorList[i].num == e {\n\t\treturn errorList[i].name\n\t}\n\treturn \"\"\n}\n\n// SignalName returns the signal name for signal number s.\nfunc SignalName(s syscall.Signal) string {\n\ti := sort.Search(len(signalList), func(i int) bool {\n\t\treturn signalList[i].num >= s\n\t})\n\tif i < len(signalList) && signalList[i].num == s {\n\t\treturn signalList[i].name\n\t}\n\treturn \"\"\n}\n\n// SignalNum returns the syscall.Signal for signal named s,\n// or 0 if a signal with such name is not found.\n// The signal name should start with \"SIG\".\nfunc SignalNum(s string) syscall.Signal {\n\tsignalNameMapOnce.Do(func() {\n\t\tsignalNameMap = make(map[string]syscall.Signal, len(signalList))\n\t\tfor _, signal := range signalList {\n\t\t\tsignalNameMap[signal.name] = signal.num\n\t\t}\n\t})\n\treturn signalNameMap[s]\n}\n\n// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.\nfunc clen(n []byte) int {\n\ti := bytes.IndexByte(n, 0)\n\tif i == -1 {\n\t\ti = len(n)\n\t}\n\treturn i\n}\n\n// Mmap manager, for use by operating system-specific implementations.\n\ntype mmapper struct {\n\tsync.Mutex\n\tactive map[*byte][]byte // active mappings; key is last byte in mapping\n\tmmap   func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)\n\tmunmap func(addr uintptr, length uintptr) error\n}\n\nfunc (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {\n\tif length <= 0 {\n\t\treturn nil, EINVAL\n\t}\n\n\t// Map the requested memory.\n\taddr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\n\t// Use unsafe to convert addr into a []byte.\n\tb := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)\n\n\t// Register mapping in m and return it.\n\tp := &b[cap(b)-1]\n\tm.Lock()\n\tdefer m.Unlock()\n\tm.active[p] = b\n\treturn b, nil\n}\n\nfunc (m *mmapper) Munmap(data []byte) (err error) {\n\tif len(data) == 0 || len(data) != cap(data) {\n\t\treturn EINVAL\n\t}\n\n\t// Find the base of the mapping.\n\tp := &data[cap(data)-1]\n\tm.Lock()\n\tdefer m.Unlock()\n\tb := m.active[p]\n\tif b == nil || &b[0] != &data[0] {\n\t\treturn EINVAL\n\t}\n\n\t// Unmap the memory and update m.\n\tif errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {\n\t\treturn errno\n\t}\n\tdelete(m.active, p)\n\treturn nil\n}\n\nfunc Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {\n\treturn mapper.Mmap(fd, offset, length, prot, flags)\n}\n\nfunc Munmap(b []byte) (err error) {\n\treturn mapper.Munmap(b)\n}\n\nfunc MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {\n\txaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)\n\treturn unsafe.Pointer(xaddr), err\n}\n\nfunc MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {\n\treturn mapper.munmap(uintptr(addr), length)\n}\n\nfunc Read(fd int, p []byte) (n int, err error) {\n\tn, err = read(fd, p)\n\tif raceenabled {\n\t\tif n > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(&p[0]), n)\n\t\t}\n\t\tif err == nil {\n\t\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t\t}\n\t}\n\treturn\n}\n\nfunc Write(fd int, p []byte) (n int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = write(fd, p)\n\tif raceenabled && n > 0 {\n\t\traceReadRange(unsafe.Pointer(&p[0]), n)\n\t}\n\treturn\n}\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tn, err = pread(fd, p, offset)\n\tif raceenabled {\n\t\tif n > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(&p[0]), n)\n\t\t}\n\t\tif err == nil {\n\t\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t\t}\n\t}\n\treturn\n}\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = pwrite(fd, p, offset)\n\tif raceenabled && n > 0 {\n\t\traceReadRange(unsafe.Pointer(&p[0]), n)\n\t}\n\treturn\n}\n\n// For testing: clients can set this flag to force\n// creation of IPv6 sockets to return EAFNOSUPPORT.\nvar SocketDisableIPv6 bool\n\n// Sockaddr represents a socket address.\ntype Sockaddr interface {\n\tsockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs\n}\n\n// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.\ntype SockaddrInet4 struct {\n\tPort int\n\tAddr [4]byte\n\traw  RawSockaddrInet4\n}\n\n// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.\ntype SockaddrInet6 struct {\n\tPort   int\n\tZoneId uint32\n\tAddr   [16]byte\n\traw    RawSockaddrInet6\n}\n\n// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.\ntype SockaddrUnix struct {\n\tName string\n\traw  RawSockaddrUnix\n}\n\nfunc Bind(fd int, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn bind(fd, ptr, n)\n}\n\nfunc Connect(fd int, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn connect(fd, ptr, n)\n}\n\nfunc Getpeername(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getpeername(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\nfunc GetsockoptByte(fd, level, opt int) (value byte, err error) {\n\tvar n byte\n\tvallen := _Socklen(1)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn n, err\n}\n\nfunc GetsockoptInt(fd, level, opt int) (value int, err error) {\n\tvar n int32\n\tvallen := _Socklen(4)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn int(n), err\n}\n\nfunc GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {\n\tvallen := _Socklen(4)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)\n\treturn value, err\n}\n\nfunc GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {\n\tvar value IPMreq\n\tvallen := _Socklen(SizeofIPMreq)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {\n\tvar value IPv6Mreq\n\tvallen := _Socklen(SizeofIPv6Mreq)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {\n\tvar value IPv6MTUInfo\n\tvallen := _Socklen(SizeofIPv6MTUInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {\n\tvar value ICMPv6Filter\n\tvallen := _Socklen(SizeofICMPv6Filter)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptLinger(fd, level, opt int) (*Linger, error) {\n\tvar linger Linger\n\tvallen := _Socklen(SizeofLinger)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen)\n\treturn &linger, err\n}\n\nfunc GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {\n\tvar tv Timeval\n\tvallen := _Socklen(unsafe.Sizeof(tv))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen)\n\treturn &tv, err\n}\n\nfunc GetsockoptUint64(fd, level, opt int) (value uint64, err error) {\n\tvar n uint64\n\tvallen := _Socklen(8)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn n, err\n}\n\nfunc Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\tif rsa.Addr.Family != AF_UNSPEC {\n\t\tfrom, err = anyToSockaddr(fd, &rsa)\n\t}\n\treturn\n}\n\n// Recvmsg receives a message from a socket using the recvmsg system call. The\n// received non-control data will be written to p, and any \"out of band\"\n// control data will be written to oob. The flags are passed to recvmsg.\n//\n// The results are:\n//   - n is the number of non-control data bytes read into p\n//   - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage]\n//   - recvflags is flags returned by recvmsg\n//   - from is the address of the sender\n//\n// If the underlying socket type is not SOCK_DGRAM, a received message\n// containing oob data and a single '\\0' of non-control data is treated as if\n// the message contained only control data, i.e. n will be zero on return.\nfunc Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {\n\tvar iov [1]Iovec\n\tif len(p) > 0 {\n\t\tiov[0].Base = &p[0]\n\t\tiov[0].SetLen(len(p))\n\t}\n\tvar rsa RawSockaddrAny\n\tif n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa); err != nil {\n\t\treturn\n\t}\n\t// source address is only specified if the socket is unconnected\n\tif rsa.Addr.Family != AF_UNSPEC {\n\t\tfrom, err = anyToSockaddr(fd, &rsa)\n\t}\n\treturn\n}\n\n// RecvmsgBuffers receives a message from a socket using the recvmsg system\n// call. This function is equivalent to Recvmsg, but non-control data read is\n// scattered into the buffers slices.\nfunc RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {\n\tiov := make([]Iovec, len(buffers))\n\tfor i := range buffers {\n\t\tif len(buffers[i]) > 0 {\n\t\t\tiov[i].Base = &buffers[i][0]\n\t\t\tiov[i].SetLen(len(buffers[i]))\n\t\t} else {\n\t\t\tiov[i].Base = (*byte)(unsafe.Pointer(&_zero))\n\t\t}\n\t}\n\tvar rsa RawSockaddrAny\n\tif n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa); err != nil {\n\t\treturn\n\t}\n\tif rsa.Addr.Family != AF_UNSPEC {\n\t\tfrom, err = anyToSockaddr(fd, &rsa)\n\t}\n\treturn\n}\n\n// Sendmsg sends a message on a socket to an address using the sendmsg system\n// call. This function is equivalent to SendmsgN, but does not return the\n// number of bytes actually sent.\nfunc Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {\n\t_, err = SendmsgN(fd, p, oob, to, flags)\n\treturn\n}\n\n// SendmsgN sends a message on a socket to an address using the sendmsg system\n// call. p contains the non-control data to send, and oob contains the \"out of\n// band\" control data. The flags are passed to sendmsg. The number of\n// non-control bytes actually written to the socket is returned.\n//\n// Some socket types do not support sending control data without accompanying\n// non-control data. If p is empty, and oob contains control data, and the\n// underlying socket type is not SOCK_DGRAM, p will be treated as containing a\n// single '\\0' and the return value will indicate zero bytes sent.\n//\n// The Go function Recvmsg, if called with an empty p and a non-empty oob,\n// will read and ignore this additional '\\0'.  If the message is received by\n// code that does not use Recvmsg, or that does not use Go at all, that code\n// will need to be written to expect and ignore the additional '\\0'.\n//\n// If you need to send non-empty oob with p actually empty, and if the\n// underlying socket type supports it, you can do so via a raw system call as\n// follows:\n//\n//\tmsg := &unix.Msghdr{\n//\t    Control: &oob[0],\n//\t}\n//\tmsg.SetControllen(len(oob))\n//\tn, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags)\nfunc SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {\n\tvar iov [1]Iovec\n\tif len(p) > 0 {\n\t\tiov[0].Base = &p[0]\n\t\tiov[0].SetLen(len(p))\n\t}\n\tvar ptr unsafe.Pointer\n\tvar salen _Socklen\n\tif to != nil {\n\t\tptr, salen, err = to.sockaddr()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\treturn sendmsgN(fd, iov[:], oob, ptr, salen, flags)\n}\n\n// SendmsgBuffers sends a message on a socket to an address using the sendmsg\n// system call. This function is equivalent to SendmsgN, but the non-control\n// data is gathered from buffers.\nfunc SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {\n\tiov := make([]Iovec, len(buffers))\n\tfor i := range buffers {\n\t\tif len(buffers[i]) > 0 {\n\t\t\tiov[i].Base = &buffers[i][0]\n\t\t\tiov[i].SetLen(len(buffers[i]))\n\t\t} else {\n\t\t\tiov[i].Base = (*byte)(unsafe.Pointer(&_zero))\n\t\t}\n\t}\n\tvar ptr unsafe.Pointer\n\tvar salen _Socklen\n\tif to != nil {\n\t\tptr, salen, err = to.sockaddr()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\treturn sendmsgN(fd, iov, oob, ptr, salen, flags)\n}\n\nfunc Send(s int, buf []byte, flags int) (err error) {\n\treturn sendto(s, buf, flags, nil, 0)\n}\n\nfunc Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {\n\tvar ptr unsafe.Pointer\n\tvar salen _Socklen\n\tif to != nil {\n\t\tptr, salen, err = to.sockaddr()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn sendto(fd, p, flags, ptr, salen)\n}\n\nfunc SetsockoptByte(fd, level, opt int, value byte) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)\n}\n\nfunc SetsockoptInt(fd, level, opt int, value int) (err error) {\n\tvar n = int32(value)\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)\n}\n\nfunc SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)\n}\n\nfunc SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)\n}\n\nfunc SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)\n}\n\nfunc SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)\n}\n\nfunc SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)\n}\n\nfunc SetsockoptString(fd, level, opt int, s string) (err error) {\n\tvar p unsafe.Pointer\n\tif len(s) > 0 {\n\t\tp = unsafe.Pointer(&[]byte(s)[0])\n\t}\n\treturn setsockopt(fd, level, opt, p, uintptr(len(s)))\n}\n\nfunc SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))\n}\n\nfunc SetsockoptUint64(fd, level, opt int, value uint64) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)\n}\n\nfunc Socket(domain, typ, proto int) (fd int, err error) {\n\tif domain == AF_INET6 && SocketDisableIPv6 {\n\t\treturn -1, EAFNOSUPPORT\n\t}\n\tfd, err = socket(domain, typ, proto)\n\treturn\n}\n\nfunc Socketpair(domain, typ, proto int) (fd [2]int, err error) {\n\tvar fdx [2]int32\n\terr = socketpair(domain, typ, proto, &fdx)\n\tif err == nil {\n\t\tfd[0] = int(fdx[0])\n\t\tfd[1] = int(fdx[1])\n\t}\n\treturn\n}\n\nvar ioSync int64\n\nfunc CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }\n\nfunc SetNonblock(fd int, nonblocking bool) (err error) {\n\tflag, err := fcntl(fd, F_GETFL, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif (flag&O_NONBLOCK != 0) == nonblocking {\n\t\treturn nil\n\t}\n\tif nonblocking {\n\t\tflag |= O_NONBLOCK\n\t} else {\n\t\tflag &= ^O_NONBLOCK\n\t}\n\t_, err = fcntl(fd, F_SETFL, flag)\n\treturn err\n}\n\n// Exec calls execve(2), which replaces the calling executable in the process\n// tree. argv0 should be the full path to an executable (\"/bin/ls\") and the\n// executable name should also be the first argument in argv ([\"ls\", \"-l\"]).\n// envv are the environment variables that should be passed to the new\n// process ([\"USER=go\", \"PWD=/tmp\"]).\nfunc Exec(argv0 string, argv []string, envv []string) error {\n\treturn syscall.Exec(argv0, argv, envv)\n}\n\n// Lutimes sets the access and modification times tv on path. If path refers to\n// a symlink, it is not dereferenced and the timestamps are set on the symlink.\n// If tv is nil, the access and modification times are set to the current time.\n// Otherwise tv must contain exactly 2 elements, with access time as the first\n// element and modification time as the second element.\nfunc Lutimes(path string, tv []Timeval) error {\n\tif tv == nil {\n\t\treturn UtimesNanoAt(AT_FDCWD, path, nil, AT_SYMLINK_NOFOLLOW)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\tts := []Timespec{\n\t\tNsecToTimespec(TimevalToNsec(tv[0])),\n\t\tNsecToTimespec(TimevalToNsec(tv[1])),\n\t}\n\treturn UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)\n}\n\n// emptyIovecs reports whether there are no bytes in the slice of Iovec.\nfunc emptyIovecs(iov []Iovec) bool {\n\tfor i := range iov {\n\t\tif iov[i].Len > 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// Setrlimit sets a resource limit.\nfunc Setrlimit(resource int, rlim *Rlimit) error {\n\t// Just call the syscall version, because as of Go 1.21\n\t// it will affect starting a new process.\n\treturn syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_unix_gc.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc\n\npackage unix\n\nimport \"syscall\"\n\nfunc Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)\nfunc Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)\nfunc RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)\nfunc RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && (ppc64le || ppc64) && gc\n\npackage unix\n\nimport \"syscall\"\n\nfunc Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\treturn syscall.Syscall(trap, a1, a2, a3)\n}\nfunc Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\treturn syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)\n}\nfunc RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\treturn syscall.RawSyscall(trap, a1, a2, a3)\n}\nfunc RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {\n\treturn syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/syscall_zos_s390x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x\n\n// Many of the following syscalls are not available on all versions of z/OS.\n// Some missing calls have legacy implementations/simulations but others\n// will be missing completely. To achieve consistent failing behaviour on\n// legacy systems, we first test the function pointer via a safeloading\n// mechanism to see if the function exists on a given system. Then execution\n// is branched to either continue the function call, or return an error.\n\npackage unix\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//go:noescape\nfunc initZosLibVec()\n\n//go:noescape\nfunc GetZosLibVec() uintptr\n\nfunc init() {\n\tinitZosLibVec()\n\tr0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte(\"__ZOS_XSYSTRACE\\x00\"))[0])))\n\tif r0 != 0 {\n\t\tn, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0)\n\t\tZosTraceLevel = int(n)\n\t\tr0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte(\"__ZOS_XSYSTRACEFD\\x00\"))[0])))\n\t\tif r0 != 0 {\n\t\t\tfd, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0)\n\t\t\tf := os.NewFile(fd, \"zostracefile\")\n\t\t\tif f != nil {\n\t\t\t\tZosTracefile = f\n\t\t\t}\n\t\t}\n\n\t}\n}\n\n//go:noescape\nfunc CallLeFuncWithErr(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno)\n\n//go:noescape\nfunc CallLeFuncWithPtrReturn(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno)\n\n// -------------------------------\n// pointer validity test\n// good pointer returns 0\n// bad pointer returns 1\n//\n//go:nosplit\nfunc ptrtest(uintptr) uint64\n\n// Load memory at ptr location with error handling if the location is invalid\n//\n//go:noescape\nfunc safeload(ptr uintptr) (value uintptr, error uintptr)\n\nconst (\n\tentrypointLocationOffset = 8 // From function descriptor\n\n\txplinkEyecatcher   = 0x00c300c500c500f1 // \".C.E.E.1\"\n\teyecatcherOffset   = 16                 // From function entrypoint (negative)\n\tppa1LocationOffset = 8                  // From function entrypoint (negative)\n\n\tnameLenOffset = 0x14 // From PPA1 start\n\tnameOffset    = 0x16 // From PPA1 start\n)\n\nfunc getPpaOffset(funcptr uintptr) int64 {\n\tentrypoint, err := safeload(funcptr + entrypointLocationOffset)\n\tif err != 0 {\n\t\treturn -1\n\t}\n\n\t// XPLink functions have \".C.E.E.1\" as the first 8 bytes (EBCDIC)\n\tval, err := safeload(entrypoint - eyecatcherOffset)\n\tif err != 0 {\n\t\treturn -1\n\t}\n\tif val != xplinkEyecatcher {\n\t\treturn -1\n\t}\n\n\tppaoff, err := safeload(entrypoint - ppa1LocationOffset)\n\tif err != 0 {\n\t\treturn -1\n\t}\n\n\tppaoff >>= 32\n\treturn int64(ppaoff)\n}\n\n//-------------------------------\n// function descriptor pointer validity test\n// good pointer returns 0\n// bad pointer returns 1\n\n// TODO: currently mksyscall_zos_s390x.go generate empty string for funcName\n// have correct funcName pass to the funcptrtest function\nfunc funcptrtest(funcptr uintptr, funcName string) uint64 {\n\tentrypoint, err := safeload(funcptr + entrypointLocationOffset)\n\tif err != 0 {\n\t\treturn 1\n\t}\n\n\tppaoff := getPpaOffset(funcptr)\n\tif ppaoff == -1 {\n\t\treturn 1\n\t}\n\n\t// PPA1 offset value is from the start of the entire function block, not the entrypoint\n\tppa1 := (entrypoint - eyecatcherOffset) + uintptr(ppaoff)\n\n\tnameLen, err := safeload(ppa1 + nameLenOffset)\n\tif err != 0 {\n\t\treturn 1\n\t}\n\n\tnameLen >>= 48\n\tif nameLen > 128 {\n\t\treturn 1\n\t}\n\n\t// no function name input to argument end here\n\tif funcName == \"\" {\n\t\treturn 0\n\t}\n\n\tvar funcname [128]byte\n\tfor i := 0; i < int(nameLen); i += 8 {\n\t\tv, err := safeload(ppa1 + nameOffset + uintptr(i))\n\t\tif err != 0 {\n\t\t\treturn 1\n\t\t}\n\t\tfuncname[i] = byte(v >> 56)\n\t\tfuncname[i+1] = byte(v >> 48)\n\t\tfuncname[i+2] = byte(v >> 40)\n\t\tfuncname[i+3] = byte(v >> 32)\n\t\tfuncname[i+4] = byte(v >> 24)\n\t\tfuncname[i+5] = byte(v >> 16)\n\t\tfuncname[i+6] = byte(v >> 8)\n\t\tfuncname[i+7] = byte(v)\n\t}\n\n\truntime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l\n\t\t[]uintptr{uintptr(unsafe.Pointer(&funcname[0])), nameLen})\n\n\tname := string(funcname[:nameLen])\n\tif name != funcName {\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n// For detection of capabilities on a system.\n// Is function descriptor f a valid function?\nfunc isValidLeFunc(f uintptr) error {\n\tret := funcptrtest(f, \"\")\n\tif ret != 0 {\n\t\treturn fmt.Errorf(\"Bad pointer, not an LE function \")\n\t}\n\treturn nil\n}\n\n// Retrieve function name from descriptor\nfunc getLeFuncName(f uintptr) (string, error) {\n\t// assume it has been checked, only check ppa1 validity here\n\tentry := ((*[2]uintptr)(unsafe.Pointer(f)))[1]\n\tpreamp := ((*[4]uint32)(unsafe.Pointer(entry - eyecatcherOffset)))\n\n\toffsetPpa1 := preamp[2]\n\tif offsetPpa1 > 0x0ffff {\n\t\treturn \"\", fmt.Errorf(\"PPA1 offset seems too big 0x%x\\n\", offsetPpa1)\n\t}\n\n\tppa1 := uintptr(unsafe.Pointer(preamp)) + uintptr(offsetPpa1)\n\tres := ptrtest(ppa1)\n\tif res != 0 {\n\t\treturn \"\", fmt.Errorf(\"PPA1 address not valid\")\n\t}\n\n\tsize := *(*uint16)(unsafe.Pointer(ppa1 + nameLenOffset))\n\tif size > 128 {\n\t\treturn \"\", fmt.Errorf(\"Function name seems too long, length=%d\\n\", size)\n\t}\n\n\tvar name [128]byte\n\tfuncname := (*[128]byte)(unsafe.Pointer(ppa1 + nameOffset))\n\tcopy(name[0:size], funcname[0:size])\n\n\truntime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l\n\t\t[]uintptr{uintptr(unsafe.Pointer(&name[0])), uintptr(size)})\n\n\treturn string(name[:size]), nil\n}\n\n// Check z/OS version\nfunc zosLeVersion() (version, release uint32) {\n\tp1 := (*(*uintptr)(unsafe.Pointer(uintptr(1208)))) >> 32\n\tp1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 88)))\n\tp1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 8)))\n\tp1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 984)))\n\tvrm := *(*uint32)(unsafe.Pointer(p1 + 80))\n\tversion = (vrm & 0x00ff0000) >> 16\n\trelease = (vrm & 0x0000ff00) >> 8\n\treturn\n}\n\n// returns a zos C FILE * for stdio fd 0, 1, 2\nfunc ZosStdioFilep(fd int32) uintptr {\n\treturn uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(uint64(*(*uint32)(unsafe.Pointer(uintptr(1208)))) + 80))) + uint64((fd+2)<<3))))))))\n}\n\nfunc copyStat(stat *Stat_t, statLE *Stat_LE_t) {\n\tstat.Dev = uint64(statLE.Dev)\n\tstat.Ino = uint64(statLE.Ino)\n\tstat.Nlink = uint64(statLE.Nlink)\n\tstat.Mode = uint32(statLE.Mode)\n\tstat.Uid = uint32(statLE.Uid)\n\tstat.Gid = uint32(statLE.Gid)\n\tstat.Rdev = uint64(statLE.Rdev)\n\tstat.Size = statLE.Size\n\tstat.Atim.Sec = int64(statLE.Atim)\n\tstat.Atim.Nsec = 0 //zos doesn't return nanoseconds\n\tstat.Mtim.Sec = int64(statLE.Mtim)\n\tstat.Mtim.Nsec = 0 //zos doesn't return nanoseconds\n\tstat.Ctim.Sec = int64(statLE.Ctim)\n\tstat.Ctim.Nsec = 0 //zos doesn't return nanoseconds\n\tstat.Blksize = int64(statLE.Blksize)\n\tstat.Blocks = statLE.Blocks\n}\n\nfunc svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)\nfunc svcLoad(name *byte) unsafe.Pointer\nfunc svcUnload(name *byte, fnptr unsafe.Pointer) int64\n\nfunc (d *Dirent) NameString() string {\n\tif d == nil {\n\t\treturn \"\"\n\t}\n\ts := string(d.Name[:])\n\tidx := strings.IndexByte(s, 0)\n\tif idx == -1 {\n\t\treturn s\n\t} else {\n\t\treturn s[:idx]\n\t}\n}\n\nfunc DecodeData(dest []byte, sz int, val uint64) {\n\tfor i := 0; i < sz; i++ {\n\t\tdest[sz-1-i] = byte((val >> (uint64(i * 8))) & 0xff)\n\t}\n}\n\nfunc EncodeData(data []byte) uint64 {\n\tvar value uint64\n\tsz := len(data)\n\tfor i := 0; i < sz; i++ {\n\t\tvalue |= uint64(data[i]) << uint64(((sz - i - 1) * 8))\n\t}\n\treturn value\n}\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = SizeofSockaddrInet4\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tfor i := 0; i < len(sa.Addr); i++ {\n\t\tsa.raw.Addr[i] = sa.Addr[i]\n\t}\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = SizeofSockaddrInet6\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tfor i := 0; i < len(sa.Addr); i++ {\n\t\tsa.raw.Addr[i] = sa.Addr[i]\n\t}\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n >= len(sa.raw.Path) || n == 0 {\n\t\treturn nil, 0, EINVAL\n\t}\n\tsa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL\n\tsa.raw.Family = AF_UNIX\n\tfor i := 0; i < n; i++ {\n\t\tsa.raw.Path[i] = int8(name[i])\n\t}\n\treturn unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil\n}\n\nfunc anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {\n\t// TODO(neeilan): Implement use of first param (fd)\n\tswitch rsa.Addr.Family {\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrUnix)\n\t\t// For z/OS, only replace NUL with @ when the\n\t\t// length is not zero.\n\t\tif pp.Len != 0 && pp.Path[0] == 0 {\n\t\t\t// \"Abstract\" Unix domain socket.\n\t\t\t// Rewrite leading NUL as @ for textual display.\n\t\t\t// (This is the standard convention.)\n\t\t\t// Not friendly to overwrite in place,\n\t\t\t// but the callers below don't care.\n\t\t\tpp.Path[0] = '@'\n\t\t}\n\n\t\t// Assume path ends at NUL.\n\t\t//\n\t\t// For z/OS, the length of the name is a field\n\t\t// in the structure. To be on the safe side, we\n\t\t// will still scan the name for a NUL but only\n\t\t// to the length provided in the structure.\n\t\t//\n\t\t// This is not technically the Linux semantics for\n\t\t// abstract Unix domain sockets--they are supposed\n\t\t// to be uninterpreted fixed-size binary blobs--but\n\t\t// everyone uses this convention.\n\t\tn := 0\n\t\tfor n < int(pp.Len) && pp.Path[n] != 0 {\n\t\t\tn++\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tfor i := 0; i < len(sa.Addr); i++ {\n\t\t\tsa.Addr[i] = pp.Addr[i]\n\t\t}\n\t\treturn sa, nil\n\n\tcase AF_INET6:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tfor i := 0; i < len(sa.Addr); i++ {\n\t\t\tsa.Addr[i] = pp.Addr[i]\n\t\t}\n\t\treturn sa, nil\n\t}\n\treturn nil, EAFNOSUPPORT\n}\n\nfunc Accept(fd int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept(fd, &rsa, &len)\n\tif err != nil {\n\t\treturn\n\t}\n\t// TODO(neeilan): Remove 0 in call\n\tsa, err = anyToSockaddr(0, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tnfd, err = accept4(fd, &rsa, &len, flags)\n\tif err != nil {\n\t\treturn\n\t}\n\tif len > SizeofSockaddrAny {\n\t\tpanic(\"RawSockaddrAny too small\")\n\t}\n\t// TODO(neeilan): Remove 0 in call\n\tsa, err = anyToSockaddr(0, &rsa)\n\tif err != nil {\n\t\tClose(nfd)\n\t\tnfd = 0\n\t}\n\treturn\n}\n\nfunc Ctermid() (tty string, err error) {\n\tvar termdev [1025]byte\n\truntime.EnterSyscall()\n\tr0, err2, err1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___CTERMID_A<<4, uintptr(unsafe.Pointer(&termdev[0])))\n\truntime.ExitSyscall()\n\tif r0 == 0 {\n\t\treturn \"\", fmt.Errorf(\"%s (errno2=0x%x)\\n\", err1.Error(), err2)\n\t}\n\ts := string(termdev[:])\n\tidx := strings.Index(s, string(rune(0)))\n\tif idx == -1 {\n\t\ttty = s\n\t} else {\n\t\ttty = s[:idx]\n\t}\n\treturn\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint64(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = int32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = int32(length)\n}\n\n//sys   fcntl(fd int, cmd int, arg int) (val int, err error)\n//sys   Flistxattr(fd int, dest []byte) (sz int, err error) = SYS___FLISTXATTR_A\n//sys   Fremovexattr(fd int, attr string) (err error) = SYS___FREMOVEXATTR_A\n//sys\tread(fd int, p []byte) (n int, err error)\n//sys\twrite(fd int, p []byte) (n int, err error)\n\n//sys   Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) = SYS___FGETXATTR_A\n//sys   Fsetxattr(fd int, attr string, data []byte, flag int) (err error) = SYS___FSETXATTR_A\n\n//sys\taccept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A\n//sys\taccept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = SYS___ACCEPT4_A\n//sys\tbind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A\n//sys\tconnect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A\n//sysnb\tgetgroups(n int, list *_Gid_t) (nn int, err error)\n//sysnb\tsetgroups(n int, list *_Gid_t) (err error)\n//sys\tgetsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)\n//sys\tsetsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)\n//sysnb\tsocket(domain int, typ int, proto int) (fd int, err error)\n//sysnb\tsocketpair(domain int, typ int, proto int, fd *[2]int32) (err error)\n//sysnb\tgetpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A\n//sysnb\tgetsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A\n//sys   Removexattr(path string, attr string) (err error) = SYS___REMOVEXATTR_A\n//sys\trecvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A\n//sys\tsendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A\n//sys\trecvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A\n//sys\tsendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A\n//sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP\n//sys   munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP\n//sys   ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL\n//sys   ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL\n//sys\tshmat(id int, addr uintptr, flag int) (ret uintptr, err error) = SYS_SHMAT\n//sys\tshmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) = SYS_SHMCTL64\n//sys\tshmdt(addr uintptr) (err error) = SYS_SHMDT\n//sys\tshmget(key int, size int, flag int) (id int, err error) = SYS_SHMGET\n\n//sys   Access(path string, mode uint32) (err error) = SYS___ACCESS_A\n//sys   Chdir(path string) (err error) = SYS___CHDIR_A\n//sys\tChown(path string, uid int, gid int) (err error) = SYS___CHOWN_A\n//sys\tChmod(path string, mode uint32) (err error) = SYS___CHMOD_A\n//sys   Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A\n//sys\tDup(oldfd int) (fd int, err error)\n//sys\tDup2(oldfd int, newfd int) (err error)\n//sys\tDup3(oldfd int, newfd int, flags int) (err error) = SYS_DUP3\n//sys\tDirfd(dirp uintptr) (fd int, err error) = SYS_DIRFD\n//sys\tEpollCreate(size int) (fd int, err error) = SYS_EPOLL_CREATE\n//sys\tEpollCreate1(flags int) (fd int, err error) = SYS_EPOLL_CREATE1\n//sys\tEpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) = SYS_EPOLL_CTL\n//sys\tEpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) = SYS_EPOLL_PWAIT\n//sys\tEpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_WAIT\n//sys\tErrno2() (er2 int) = SYS___ERRNO2\n//sys\tEventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD\n//sys\tExit(code int)\n//sys\tFaccessat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FACCESSAT_A\n\nfunc Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {\n\treturn Faccessat(dirfd, path, mode, flags)\n}\n\n//sys\tFchdir(fd int) (err error)\n//sys\tFchmod(fd int, mode uint32) (err error)\n//sys\tFchmodat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FCHMODAT_A\n//sys\tFchown(fd int, uid int, gid int) (err error)\n//sys\tFchownat(fd int, path string, uid int, gid int, flags int) (err error) = SYS___FCHOWNAT_A\n//sys\tFcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL\n//sys\tFdatasync(fd int) (err error) = SYS_FDATASYNC\n//sys\tfstat(fd int, stat *Stat_LE_t) (err error)\n//sys\tfstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) = SYS___FSTATAT_A\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\tvar statLE Stat_LE_t\n\terr = fstat(fd, &statLE)\n\tcopyStat(stat, &statLE)\n\treturn\n}\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar statLE Stat_LE_t\n\terr = fstatat(dirfd, path, &statLE, flags)\n\tcopyStat(stat, &statLE)\n\treturn\n}\n\nfunc impl_Getxattr(path string, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p2 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)))\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_GetxattrAddr() *(func(path string, attr string, dest []byte) (sz int, err error))\n\nvar Getxattr = enter_Getxattr\n\nfunc enter_Getxattr(path string, attr string, dest []byte) (sz int, err error) {\n\tfuncref := get_GetxattrAddr()\n\tif validGetxattr() {\n\t\t*funcref = impl_Getxattr\n\t} else {\n\t\t*funcref = error_Getxattr\n\t}\n\treturn (*funcref)(path, attr, dest)\n}\n\nfunc error_Getxattr(path string, attr string, dest []byte) (sz int, err error) {\n\treturn -1, ENOSYS\n}\n\nfunc validGetxattr() bool {\n\tif funcptrtest(GetZosLibVec()+SYS___GETXATTR_A<<4, \"\") == 0 {\n\t\tif name, err := getLeFuncName(GetZosLibVec() + SYS___GETXATTR_A<<4); err == nil {\n\t\t\treturn name == \"__getxattr_a\"\n\t\t}\n\t}\n\treturn false\n}\n\n//sys   Lgetxattr(link string, attr string, dest []byte) (sz int, err error) = SYS___LGETXATTR_A\n//sys   Lsetxattr(path string, attr string, data []byte, flags int) (err error) = SYS___LSETXATTR_A\n\nfunc impl_Setxattr(path string, attr string, data []byte, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(data) > 0 {\n\t\t_p2 = unsafe.Pointer(&data[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_SetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error))\n\nvar Setxattr = enter_Setxattr\n\nfunc enter_Setxattr(path string, attr string, data []byte, flags int) (err error) {\n\tfuncref := get_SetxattrAddr()\n\tif validSetxattr() {\n\t\t*funcref = impl_Setxattr\n\t} else {\n\t\t*funcref = error_Setxattr\n\t}\n\treturn (*funcref)(path, attr, data, flags)\n}\n\nfunc error_Setxattr(path string, attr string, data []byte, flags int) (err error) {\n\treturn ENOSYS\n}\n\nfunc validSetxattr() bool {\n\tif funcptrtest(GetZosLibVec()+SYS___SETXATTR_A<<4, \"\") == 0 {\n\t\tif name, err := getLeFuncName(GetZosLibVec() + SYS___SETXATTR_A<<4); err == nil {\n\t\t\treturn name == \"__setxattr_a\"\n\t\t}\n\t}\n\treturn false\n}\n\n//sys\tFstatfs(fd int, buf *Statfs_t) (err error) = SYS_FSTATFS\n//sys\tFstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS\n//sys\tFsync(fd int) (err error)\n//sys\tFutimes(fd int, tv []Timeval) (err error) = SYS_FUTIMES\n//sys\tFutimesat(dirfd int, path string, tv []Timeval) (err error) = SYS___FUTIMESAT_A\n//sys\tFtruncate(fd int, length int64) (err error)\n//sys\tGetrandom(buf []byte, flags int) (n int, err error) = SYS_GETRANDOM\n//sys\tInotifyInit() (fd int, err error) = SYS_INOTIFY_INIT\n//sys\tInotifyInit1(flags int) (fd int, err error) = SYS_INOTIFY_INIT1\n//sys\tInotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) = SYS___INOTIFY_ADD_WATCH_A\n//sys\tInotifyRmWatch(fd int, watchdesc uint32) (success int, err error) = SYS_INOTIFY_RM_WATCH\n//sys   Listxattr(path string, dest []byte) (sz int, err error) = SYS___LISTXATTR_A\n//sys   Llistxattr(path string, dest []byte) (sz int, err error) = SYS___LLISTXATTR_A\n//sys   Lremovexattr(path string, attr string) (err error) = SYS___LREMOVEXATTR_A\n//sys\tLutimes(path string, tv []Timeval) (err error) = SYS___LUTIMES_A\n//sys   Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT\n//sys   Msync(b []byte, flags int) (err error) = SYS_MSYNC\n//sys   Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) = SYS___CONSOLE2\n\n// Pipe2 begin\n\n//go:nosplit\nfunc getPipe2Addr() *(func([]int, int) error)\n\nvar Pipe2 = pipe2Enter\n\nfunc pipe2Enter(p []int, flags int) (err error) {\n\tif funcptrtest(GetZosLibVec()+SYS_PIPE2<<4, \"\") == 0 {\n\t\t*getPipe2Addr() = pipe2Impl\n\t} else {\n\t\t*getPipe2Addr() = pipe2Error\n\t}\n\treturn (*getPipe2Addr())(p, flags)\n}\n\nfunc pipe2Impl(p []int, flags int) (err error) {\n\tvar pp [2]_C_int\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE2<<4, uintptr(unsafe.Pointer(&pp[0])), uintptr(flags))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t} else {\n\t\tp[0] = int(pp[0])\n\t\tp[1] = int(pp[1])\n\t}\n\treturn\n}\nfunc pipe2Error(p []int, flags int) (err error) {\n\treturn fmt.Errorf(\"Pipe2 is not available on this system\")\n}\n\n// Pipe2 end\n\n//sys   Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL\n\nfunc Readdir(dir uintptr) (dirent *Dirent, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_A<<4, uintptr(dir))\n\truntime.ExitSyscall()\n\tdirent = (*Dirent)(unsafe.Pointer(r0))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//sys\tReaddir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) = SYS___READDIR_R_A\n//sys\tStatfs(path string, buf *Statfs_t) (err error) = SYS___STATFS_A\n//sys\tSyncfs(fd int) (err error) = SYS_SYNCFS\n//sys   Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES\n//sys   W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT\n//sys   W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A\n\n//sys   mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A\n//sys   unmount_LE(filesystem string, mtm int) (err error) = SYS___UMOUNT_A\n//sys   Chroot(path string) (err error) = SYS___CHROOT_A\n//sys   Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT\n//sysnb Uname(buf *Utsname) (err error) = SYS_____OSNAME_A\n//sys   Unshare(flags int) (err error) = SYS_UNSHARE\n\nfunc Ptsname(fd int) (name string, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___PTSNAME_A<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tif r0 == 0 {\n\t\terr = errnoErr2(e1, e2)\n\t} else {\n\t\tname = u2s(unsafe.Pointer(r0))\n\t}\n\treturn\n}\n\nfunc u2s(cstr unsafe.Pointer) string {\n\tstr := (*[1024]uint8)(cstr)\n\ti := 0\n\tfor str[i] != 0 {\n\t\ti++\n\t}\n\treturn string(str[:i])\n}\n\nfunc Close(fd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tfor i := 0; e1 == EAGAIN && i < 10; i++ {\n\t\truntime.EnterSyscall()\n\t\tCallLeFuncWithErr(GetZosLibVec()+SYS_USLEEP<<4, uintptr(10))\n\t\truntime.ExitSyscall()\n\t\truntime.EnterSyscall()\n\t\tr0, e2, e1 = CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd))\n\t\truntime.ExitSyscall()\n\t}\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// Dummy function: there are no semantics for Madvise on z/OS\nfunc Madvise(b []byte, advice int) (err error) {\n\treturn\n}\n\nfunc Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {\n\treturn mapper.Mmap(fd, offset, length, prot, flags)\n}\n\nfunc Munmap(b []byte) (err error) {\n\treturn mapper.Munmap(b)\n}\n\nfunc MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {\n\txaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)\n\treturn unsafe.Pointer(xaddr), err\n}\n\nfunc MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {\n\treturn mapper.munmap(uintptr(addr), length)\n}\n\n//sys   Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A\n//sysnb\tGetgid() (gid int)\n//sysnb\tGetpid() (pid int)\n//sysnb\tGetpgid(pid int) (pgid int, err error) = SYS_GETPGID\n\nfunc Getpgrp() (pid int) {\n\tpid, _ = Getpgid(0)\n\treturn\n}\n\n//sysnb\tGetppid() (pid int)\n//sys\tGetpriority(which int, who int) (prio int, err error)\n//sysnb\tGetrlimit(resource int, rlim *Rlimit) (err error) = SYS_GETRLIMIT\n\n//sysnb getrusage(who int, rusage *rusage_zos) (err error) = SYS_GETRUSAGE\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\tvar ruz rusage_zos\n\terr = getrusage(who, &ruz)\n\t//Only the first two fields of Rusage are set\n\trusage.Utime.Sec = ruz.Utime.Sec\n\trusage.Utime.Usec = int64(ruz.Utime.Usec)\n\trusage.Stime.Sec = ruz.Stime.Sec\n\trusage.Stime.Usec = int64(ruz.Stime.Usec)\n\treturn\n}\n\n//sys\tGetegid() (egid int) = SYS_GETEGID\n//sys\tGeteuid() (euid int) = SYS_GETEUID\n//sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID\n//sysnb\tGetuid() (uid int)\n//sysnb\tKill(pid int, sig Signal) (err error)\n//sys\tLchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A\n//sys\tLink(path string, link string) (err error) = SYS___LINK_A\n//sys\tLinkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) = SYS___LINKAT_A\n//sys\tListen(s int, n int) (err error)\n//sys\tlstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar statLE Stat_LE_t\n\terr = lstat(path, &statLE)\n\tcopyStat(stat, &statLE)\n\treturn\n}\n\n// for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/\nfunc isSpecialPath(path []byte) (v bool) {\n\tvar special = [4][8]byte{\n\t\t{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'},\n\t\t{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'},\n\t\t{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'},\n\t\t{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}}\n\n\tvar i, j int\n\tfor i = 0; i < len(special); i++ {\n\t\tfor j = 0; j < len(special[i]); j++ {\n\t\t\tif path[j] != special[i][j] {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif j == len(special[i]) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc realpath(srcpath string, abspath []byte) (pathlen int, errno int) {\n\tvar source [1024]byte\n\tcopy(source[:], srcpath)\n\tsource[len(srcpath)] = 0\n\tret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___REALPATH_A<<4, //__realpath_a()\n\t\t[]uintptr{uintptr(unsafe.Pointer(&source[0])),\n\t\t\tuintptr(unsafe.Pointer(&abspath[0]))})\n\tif ret != 0 {\n\t\tindex := bytes.IndexByte(abspath[:], byte(0))\n\t\tif index != -1 {\n\t\t\treturn index, 0\n\t\t}\n\t} else {\n\t\terrptr := (*int)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) //__errno()\n\t\treturn 0, *errptr\n\t}\n\treturn 0, 245 // EBADDATA   245\n}\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tn = int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___READLINK_A<<4,\n\t\t[]uintptr{uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))}))\n\truntime.KeepAlive(unsafe.Pointer(_p0))\n\tif n == -1 {\n\t\tvalue := *(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{})))\n\t\terr = errnoErr(Errno(value))\n\t} else {\n\t\tif buf[0] == '$' {\n\t\t\tif isSpecialPath(buf[1:9]) {\n\t\t\t\tcnt, err1 := realpath(path, buf)\n\t\t\t\tif err1 == 0 {\n\t\t\t\t\tn = cnt\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\nfunc impl_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t\treturn n, err\n\t} else {\n\t\tif buf[0] == '$' {\n\t\t\tif isSpecialPath(buf[1:9]) {\n\t\t\t\tcnt, err1 := realpath(path, buf)\n\t\t\t\tif err1 == 0 {\n\t\t\t\t\tn = cnt\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_ReadlinkatAddr() *(func(dirfd int, path string, buf []byte) (n int, err error))\n\nvar Readlinkat = enter_Readlinkat\n\nfunc enter_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tfuncref := get_ReadlinkatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___READLINKAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Readlinkat\n\t} else {\n\t\t*funcref = error_Readlinkat\n\t}\n\treturn (*funcref)(dirfd, path, buf)\n}\n\nfunc error_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tn = -1\n\terr = ENOSYS\n\treturn\n}\n\n//sys\tMkdir(path string, mode uint32) (err error) = SYS___MKDIR_A\n//sys\tMkdirat(dirfd int, path string, mode uint32) (err error) = SYS___MKDIRAT_A\n//sys   Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A\n//sys\tMknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A\n//sys\tMknodat(dirfd int, path string, mode uint32, dev int) (err error) = SYS___MKNODAT_A\n//sys\tPivotRoot(newroot string, oldroot string) (err error) = SYS___PIVOT_ROOT_A\n//sys\tPread(fd int, p []byte, offset int64) (n int, err error)\n//sys\tPwrite(fd int, p []byte, offset int64) (n int, err error)\n//sys\tPrctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) = SYS___PRCTL_A\n//sysnb\tPrlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT\n//sys\tRename(from string, to string) (err error) = SYS___RENAME_A\n//sys\tRenameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) = SYS___RENAMEAT_A\n//sys\tRenameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) = SYS___RENAMEAT2_A\n//sys\tRmdir(path string) (err error) = SYS___RMDIR_A\n//sys   Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK\n//sys\tSetegid(egid int) (err error) = SYS_SETEGID\n//sys\tSeteuid(euid int) (err error) = SYS_SETEUID\n//sys\tSethostname(p []byte) (err error) = SYS___SETHOSTNAME_A\n//sys   Setns(fd int, nstype int) (err error) = SYS_SETNS\n//sys\tSetpriority(which int, who int, prio int) (err error)\n//sysnb\tSetpgid(pid int, pgid int) (err error) = SYS_SETPGID\n//sysnb\tSetrlimit(resource int, lim *Rlimit) (err error)\n//sysnb\tSetregid(rgid int, egid int) (err error) = SYS_SETREGID\n//sysnb\tSetreuid(ruid int, euid int) (err error) = SYS_SETREUID\n//sysnb\tSetsid() (pid int, err error) = SYS_SETSID\n//sys\tSetuid(uid int) (err error) = SYS_SETUID\n//sys\tSetgid(uid int) (err error) = SYS_SETGID\n//sys\tShutdown(fd int, how int) (err error)\n//sys\tstat(path string, statLE *Stat_LE_t) (err error) = SYS___STAT_A\n\nfunc Stat(path string, sta *Stat_t) (err error) {\n\tvar statLE Stat_LE_t\n\terr = stat(path, &statLE)\n\tcopyStat(sta, &statLE)\n\treturn\n}\n\n//sys\tSymlink(path string, link string) (err error) = SYS___SYMLINK_A\n//sys\tSymlinkat(oldPath string, dirfd int, newPath string) (err error) = SYS___SYMLINKAT_A\n//sys\tSync() = SYS_SYNC\n//sys\tTruncate(path string, length int64) (err error) = SYS___TRUNCATE_A\n//sys\tTcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR\n//sys\tTcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR\n//sys\tUmask(mask int) (oldmask int)\n//sys\tUnlink(path string) (err error) = SYS___UNLINK_A\n//sys\tUnlinkat(dirfd int, path string, flags int) (err error) = SYS___UNLINKAT_A\n//sys\tUtime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A\n\n//sys\topen(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tif mode&O_ACCMODE == 0 {\n\t\tmode |= O_RDONLY\n\t}\n\treturn open(path, mode, perm)\n}\n\n//sys\topenat(dirfd int, path string, flags int, mode uint32) (fd int, err error) = SYS___OPENAT_A\n\nfunc Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tif flags&O_ACCMODE == 0 {\n\t\tflags |= O_RDONLY\n\t}\n\treturn openat(dirfd, path, flags, mode)\n}\n\n//sys\topenat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) = SYS___OPENAT2_A\n\nfunc Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {\n\tif how.Flags&O_ACCMODE == 0 {\n\t\thow.Flags |= O_RDONLY\n\t}\n\treturn openat2(dirfd, path, how, SizeofOpenHow)\n}\n\nfunc ZosFdToPath(dirfd int) (path string, err error) {\n\tvar buffer [1024]byte\n\truntime.EnterSyscall()\n\tret, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_IOCTL<<4, uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0])))\n\truntime.ExitSyscall()\n\tif ret == 0 {\n\t\tzb := bytes.IndexByte(buffer[:], 0)\n\t\tif zb == -1 {\n\t\t\tzb = len(buffer)\n\t\t}\n\t\tCallLeFuncWithErr(GetZosLibVec()+SYS___E2A_L<<4, uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb))\n\t\treturn string(buffer[:zb]), nil\n\t}\n\treturn \"\", errnoErr2(e1, e2)\n}\n\n//sys\tremove(path string) (err error)\n\nfunc Remove(path string) error {\n\treturn remove(path)\n}\n\nconst ImplementsGetwd = true\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar p unsafe.Pointer\n\tif len(buf) > 0 {\n\t\tp = unsafe.Pointer(&buf[0])\n\t} else {\n\t\tp = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___GETCWD_A<<4, uintptr(p), uintptr(len(buf)))\n\truntime.ExitSyscall()\n\tn = clen(buf) + 1\n\tif r0 == 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Getwd() (wd string, err error) {\n\tvar buf [PathMax]byte\n\tn, err := Getcwd(buf[0:])\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\t// Getcwd returns the number of bytes written to buf, including the NUL.\n\tif n < 1 || n > len(buf) || buf[n-1] != 0 {\n\t\treturn \"\", EINVAL\n\t}\n\treturn string(buf[0 : n-1]), nil\n}\n\nfunc Getgroups() (gids []int, err error) {\n\tn, err := getgroups(0, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\t// Sanity check group count.  Max is 1<<16 on Linux.\n\tif n < 0 || n > 1<<20 {\n\t\treturn nil, EINVAL\n\t}\n\n\ta := make([]_Gid_t, n)\n\tn, err = getgroups(n, &a[0])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tgids = make([]int, n)\n\tfor i, v := range a[0:n] {\n\t\tgids[i] = int(v)\n\t}\n\treturn\n}\n\nfunc Setgroups(gids []int) (err error) {\n\tif len(gids) == 0 {\n\t\treturn setgroups(0, nil)\n\t}\n\n\ta := make([]_Gid_t, len(gids))\n\tfor i, v := range gids {\n\t\ta[i] = _Gid_t(v)\n\t}\n\treturn setgroups(len(a), &a[0])\n}\n\nfunc gettid() uint64\n\nfunc Gettid() (tid int) {\n\treturn int(gettid())\n}\n\ntype WaitStatus uint32\n\n// Wait status is 7 bits at bottom, either 0 (exited),\n// 0x7F (stopped), or a signal number that caused an exit.\n// The 0x80 bit is whether there was a core dump.\n// An extra number (exit code, signal causing a stop)\n// is in the high bits.  At least that's the idea.\n// There are various irregularities.  For example, the\n// \"continued\" status is 0xFFFF, distinguishing itself\n// from stopped via the core dump bit.\n\nconst (\n\tmask    = 0x7F\n\tcore    = 0x80\n\texited  = 0x00\n\tstopped = 0x7F\n\tshift   = 8\n)\n\nfunc (w WaitStatus) Exited() bool { return w&mask == exited }\n\nfunc (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }\n\nfunc (w WaitStatus) Stopped() bool { return w&0xFF == stopped }\n\nfunc (w WaitStatus) Continued() bool { return w == 0xFFFF }\n\nfunc (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }\n\nfunc (w WaitStatus) ExitStatus() int {\n\tif !w.Exited() {\n\t\treturn -1\n\t}\n\treturn int(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) Signal() Signal {\n\tif !w.Signaled() {\n\t\treturn -1\n\t}\n\treturn Signal(w & mask)\n}\n\nfunc (w WaitStatus) StopSignal() Signal {\n\tif !w.Stopped() {\n\t\treturn -1\n\t}\n\treturn Signal(w>>shift) & 0xFF\n}\n\nfunc (w WaitStatus) TrapCause() int { return -1 }\n\n//sys\twaitid(idType int, id int, info *Siginfo, options int) (err error)\n\nfunc Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {\n\treturn waitid(idType, id, info, options)\n}\n\n//sys\twaitpid(pid int, wstatus *_C_int, options int) (wpid int, err error)\n\nfunc impl_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAIT4<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)))\n\truntime.ExitSyscall()\n\twpid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_Wait4Addr() *(func(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error))\n\nvar Wait4 = enter_Wait4\n\nfunc enter_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\tfuncref := get_Wait4Addr()\n\tif funcptrtest(GetZosLibVec()+SYS_WAIT4<<4, \"\") == 0 {\n\t\t*funcref = impl_Wait4\n\t} else {\n\t\t*funcref = legacyWait4\n\t}\n\treturn (*funcref)(pid, wstatus, options, rusage)\n}\n\nfunc legacyWait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {\n\t// TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want.\n\t// At the moment rusage will not be touched.\n\tvar status _C_int\n\twpid, err = waitpid(pid, &status, options)\n\tif wstatus != nil {\n\t\t*wstatus = WaitStatus(status)\n\t}\n\treturn\n}\n\n//sysnb\tgettimeofday(tv *timeval_zos) (err error)\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\tvar tvz timeval_zos\n\terr = gettimeofday(&tvz)\n\ttv.Sec = tvz.Sec\n\ttv.Usec = int64(tvz.Usec)\n\treturn\n}\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tvar tv Timeval\n\terr = Gettimeofday(&tv)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tif t != nil {\n\t\t*t = Time_t(tv.Sec)\n\t}\n\treturn Time_t(tv.Sec), nil\n}\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: nsec}\n}\n\nfunc setTimeval(sec, usec int64) Timeval { //fix\n\treturn Timeval{Sec: sec, Usec: usec}\n}\n\n//sysnb pipe(p *[2]_C_int) (err error)\n\nfunc Pipe(p []int) (err error) {\n\tif len(p) != 2 {\n\t\treturn EINVAL\n\t}\n\tvar pp [2]_C_int\n\terr = pipe(&pp)\n\tp[0] = int(pp[0])\n\tp[1] = int(pp[1])\n\treturn\n}\n\n//sys\tutimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A\n\nfunc Utimes(path string, tv []Timeval) (err error) {\n\tif tv == nil {\n\t\treturn utimes(path, nil)\n\t}\n\tif len(tv) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n//sys\tutimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) = SYS___UTIMENSAT_A\n\nfunc validUtimensat() bool {\n\tif funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, \"\") == 0 {\n\t\tif name, err := getLeFuncName(GetZosLibVec() + SYS___UTIMENSAT_A<<4); err == nil {\n\t\t\treturn name == \"__utimensat_a\"\n\t\t}\n\t}\n\treturn false\n}\n\n// Begin UtimesNano\n\n//go:nosplit\nfunc get_UtimesNanoAddr() *(func(path string, ts []Timespec) (err error))\n\nvar UtimesNano = enter_UtimesNano\n\nfunc enter_UtimesNano(path string, ts []Timespec) (err error) {\n\tfuncref := get_UtimesNanoAddr()\n\tif validUtimensat() {\n\t\t*funcref = utimesNanoImpl\n\t} else {\n\t\t*funcref = legacyUtimesNano\n\t}\n\treturn (*funcref)(path, ts)\n}\n\nfunc utimesNanoImpl(path string, ts []Timespec) (err error) {\n\tif ts == nil {\n\t\treturn utimensat(AT_FDCWD, path, nil, 0)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)\n}\n\nfunc legacyUtimesNano(path string, ts []Timespec) (err error) {\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\t// Not as efficient as it could be because Timespec and\n\t// Timeval have different types in the different OSes\n\ttv := [2]Timeval{\n\t\tNsecToTimeval(TimespecToNsec(ts[0])),\n\t\tNsecToTimeval(TimespecToNsec(ts[1])),\n\t}\n\treturn utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))\n}\n\n// End UtimesNano\n\n// Begin UtimesNanoAt\n\n//go:nosplit\nfunc get_UtimesNanoAtAddr() *(func(dirfd int, path string, ts []Timespec, flags int) (err error))\n\nvar UtimesNanoAt = enter_UtimesNanoAt\n\nfunc enter_UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) {\n\tfuncref := get_UtimesNanoAtAddr()\n\tif validUtimensat() {\n\t\t*funcref = utimesNanoAtImpl\n\t} else {\n\t\t*funcref = legacyUtimesNanoAt\n\t}\n\treturn (*funcref)(dirfd, path, ts, flags)\n}\n\nfunc utimesNanoAtImpl(dirfd int, path string, ts []Timespec, flags int) (err error) {\n\tif ts == nil {\n\t\treturn utimensat(dirfd, path, nil, flags)\n\t}\n\tif len(ts) != 2 {\n\t\treturn EINVAL\n\t}\n\treturn utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)\n}\n\nfunc legacyUtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) {\n\tif path[0] != '/' {\n\t\tdirPath, err := ZosFdToPath(dirfd)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpath = dirPath + \"/\" + path\n\t}\n\tif flags == AT_SYMLINK_NOFOLLOW {\n\t\tif len(ts) != 2 {\n\t\t\treturn EINVAL\n\t\t}\n\n\t\tif ts[0].Nsec >= 5e8 {\n\t\t\tts[0].Sec++\n\t\t}\n\t\tts[0].Nsec = 0\n\t\tif ts[1].Nsec >= 5e8 {\n\t\t\tts[1].Sec++\n\t\t}\n\t\tts[1].Nsec = 0\n\n\t\t// Not as efficient as it could be because Timespec and\n\t\t// Timeval have different types in the different OSes\n\t\ttv := []Timeval{\n\t\t\tNsecToTimeval(TimespecToNsec(ts[0])),\n\t\t\tNsecToTimeval(TimespecToNsec(ts[1])),\n\t\t}\n\t\treturn Lutimes(path, tv)\n\t}\n\treturn UtimesNano(path, ts)\n}\n\n// End UtimesNanoAt\n\nfunc Getsockname(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getsockname(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\t// TODO(neeilan) : Remove this 0 ( added to get sys/unix compiling on z/OS )\n\treturn anyToSockaddr(0, &rsa)\n}\n\nconst (\n\t// identifier constants\n\tnwmHeaderIdentifier    = 0xd5e6d4c8\n\tnwmFilterIdentifier    = 0xd5e6d4c6\n\tnwmTCPConnIdentifier   = 0xd5e6d4c3\n\tnwmRecHeaderIdentifier = 0xd5e6d4d9\n\tnwmIPStatsIdentifier   = 0xd5e6d4c9d7e2e340\n\tnwmIPGStatsIdentifier  = 0xd5e6d4c9d7c7e2e3\n\tnwmTCPStatsIdentifier  = 0xd5e6d4e3c3d7e2e3\n\tnwmUDPStatsIdentifier  = 0xd5e6d4e4c4d7e2e3\n\tnwmICMPGStatsEntry     = 0xd5e6d4c9c3d4d7c7\n\tnwmICMPTStatsEntry     = 0xd5e6d4c9c3d4d7e3\n\n\t// nwmHeader constants\n\tnwmVersion1   = 1\n\tnwmVersion2   = 2\n\tnwmCurrentVer = 2\n\n\tnwmTCPConnType     = 1\n\tnwmGlobalStatsType = 14\n\n\t// nwmFilter constants\n\tnwmFilterLclAddrMask = 0x20000000 // Local address\n\tnwmFilterSrcAddrMask = 0x20000000 // Source address\n\tnwmFilterLclPortMask = 0x10000000 // Local port\n\tnwmFilterSrcPortMask = 0x10000000 // Source port\n\n\t// nwmConnEntry constants\n\tnwmTCPStateClosed   = 1\n\tnwmTCPStateListen   = 2\n\tnwmTCPStateSynSent  = 3\n\tnwmTCPStateSynRcvd  = 4\n\tnwmTCPStateEstab    = 5\n\tnwmTCPStateFinWait1 = 6\n\tnwmTCPStateFinWait2 = 7\n\tnwmTCPStateClosWait = 8\n\tnwmTCPStateLastAck  = 9\n\tnwmTCPStateClosing  = 10\n\tnwmTCPStateTimeWait = 11\n\tnwmTCPStateDeletTCB = 12\n\n\t// Existing constants on linux\n\tBPF_TCP_CLOSE        = 1\n\tBPF_TCP_LISTEN       = 2\n\tBPF_TCP_SYN_SENT     = 3\n\tBPF_TCP_SYN_RECV     = 4\n\tBPF_TCP_ESTABLISHED  = 5\n\tBPF_TCP_FIN_WAIT1    = 6\n\tBPF_TCP_FIN_WAIT2    = 7\n\tBPF_TCP_CLOSE_WAIT   = 8\n\tBPF_TCP_LAST_ACK     = 9\n\tBPF_TCP_CLOSING      = 10\n\tBPF_TCP_TIME_WAIT    = 11\n\tBPF_TCP_NEW_SYN_RECV = -1\n\tBPF_TCP_MAX_STATES   = -2\n)\n\ntype nwmTriplet struct {\n\toffset uint32\n\tlength uint32\n\tnumber uint32\n}\n\ntype nwmQuadruplet struct {\n\toffset uint32\n\tlength uint32\n\tnumber uint32\n\tmatch  uint32\n}\n\ntype nwmHeader struct {\n\tident       uint32\n\tlength      uint32\n\tversion     uint16\n\tnwmType     uint16\n\tbytesNeeded uint32\n\toptions     uint32\n\t_           [16]byte\n\tinputDesc   nwmTriplet\n\toutputDesc  nwmQuadruplet\n}\n\ntype nwmFilter struct {\n\tident         uint32\n\tflags         uint32\n\tresourceName  [8]byte\n\tresourceId    uint32\n\tlistenerId    uint32\n\tlocal         [28]byte // union of sockaddr4 and sockaddr6\n\tremote        [28]byte // union of sockaddr4 and sockaddr6\n\t_             uint16\n\t_             uint16\n\tasid          uint16\n\t_             [2]byte\n\ttnLuName      [8]byte\n\ttnMonGrp      uint32\n\ttnAppl        [8]byte\n\tapplData      [40]byte\n\tnInterface    [16]byte\n\tdVipa         [16]byte\n\tdVipaPfx      uint16\n\tdVipaPort     uint16\n\tdVipaFamily   byte\n\t_             [3]byte\n\tdestXCF       [16]byte\n\tdestXCFPfx    uint16\n\tdestXCFFamily byte\n\t_             [1]byte\n\ttargIP        [16]byte\n\ttargIPPfx     uint16\n\ttargIPFamily  byte\n\t_             [1]byte\n\t_             [20]byte\n}\n\ntype nwmRecHeader struct {\n\tident  uint32\n\tlength uint32\n\tnumber byte\n\t_      [3]byte\n}\n\ntype nwmTCPStatsEntry struct {\n\tident             uint64\n\tcurrEstab         uint32\n\tactiveOpened      uint32\n\tpassiveOpened     uint32\n\tconnClosed        uint32\n\testabResets       uint32\n\tattemptFails      uint32\n\tpassiveDrops      uint32\n\ttimeWaitReused    uint32\n\tinSegs            uint64\n\tpredictAck        uint32\n\tpredictData       uint32\n\tinDupAck          uint32\n\tinBadSum          uint32\n\tinBadLen          uint32\n\tinShort           uint32\n\tinDiscOldTime     uint32\n\tinAllBeforeWin    uint32\n\tinSomeBeforeWin   uint32\n\tinAllAfterWin     uint32\n\tinSomeAfterWin    uint32\n\tinOutOfOrder      uint32\n\tinAfterClose      uint32\n\tinWinProbes       uint32\n\tinWinUpdates      uint32\n\toutWinUpdates     uint32\n\toutSegs           uint64\n\toutDelayAcks      uint32\n\toutRsts           uint32\n\tretransSegs       uint32\n\tretransTimeouts   uint32\n\tretransDrops      uint32\n\tpmtuRetrans       uint32\n\tpmtuErrors        uint32\n\toutWinProbes      uint32\n\tprobeDrops        uint32\n\tkeepAliveProbes   uint32\n\tkeepAliveDrops    uint32\n\tfinwait2Drops     uint32\n\tacceptCount       uint64\n\tinBulkQSegs       uint64\n\tinDiscards        uint64\n\tconnFloods        uint32\n\tconnStalls        uint32\n\tcfgEphemDef       uint16\n\tephemInUse        uint16\n\tephemHiWater      uint16\n\tflags             byte\n\t_                 [1]byte\n\tephemExhaust      uint32\n\tsmcRCurrEstabLnks uint32\n\tsmcRLnkActTimeOut uint32\n\tsmcRActLnkOpened  uint32\n\tsmcRPasLnkOpened  uint32\n\tsmcRLnksClosed    uint32\n\tsmcRCurrEstab     uint32\n\tsmcRActiveOpened  uint32\n\tsmcRPassiveOpened uint32\n\tsmcRConnClosed    uint32\n\tsmcRInSegs        uint64\n\tsmcROutSegs       uint64\n\tsmcRInRsts        uint32\n\tsmcROutRsts       uint32\n\tsmcDCurrEstabLnks uint32\n\tsmcDActLnkOpened  uint32\n\tsmcDPasLnkOpened  uint32\n\tsmcDLnksClosed    uint32\n\tsmcDCurrEstab     uint32\n\tsmcDActiveOpened  uint32\n\tsmcDPassiveOpened uint32\n\tsmcDConnClosed    uint32\n\tsmcDInSegs        uint64\n\tsmcDOutSegs       uint64\n\tsmcDInRsts        uint32\n\tsmcDOutRsts       uint32\n}\n\ntype nwmConnEntry struct {\n\tident             uint32\n\tlocal             [28]byte // union of sockaddr4 and sockaddr6\n\tremote            [28]byte // union of sockaddr4 and sockaddr6\n\tstartTime         [8]byte  // uint64, changed to prevent padding from being inserted\n\tlastActivity      [8]byte  // uint64\n\tbytesIn           [8]byte  // uint64\n\tbytesOut          [8]byte  // uint64\n\tinSegs            [8]byte  // uint64\n\toutSegs           [8]byte  // uint64\n\tstate             uint16\n\tactiveOpen        byte\n\tflag01            byte\n\toutBuffered       uint32\n\tinBuffered        uint32\n\tmaxSndWnd         uint32\n\treXmtCount        uint32\n\tcongestionWnd     uint32\n\tssThresh          uint32\n\troundTripTime     uint32\n\troundTripVar      uint32\n\tsendMSS           uint32\n\tsndWnd            uint32\n\trcvBufSize        uint32\n\tsndBufSize        uint32\n\toutOfOrderCount   uint32\n\tlcl0WindowCount   uint32\n\trmt0WindowCount   uint32\n\tdupacks           uint32\n\tflag02            byte\n\tsockOpt6Cont      byte\n\tasid              uint16\n\tresourceName      [8]byte\n\tresourceId        uint32\n\tsubtask           uint32\n\tsockOpt           byte\n\tsockOpt6          byte\n\tclusterConnFlag   byte\n\tproto             byte\n\ttargetAppl        [8]byte\n\tluName            [8]byte\n\tclientUserId      [8]byte\n\tlogMode           [8]byte\n\ttimeStamp         uint32\n\ttimeStampAge      uint32\n\tserverResourceId  uint32\n\tintfName          [16]byte\n\tttlsStatPol       byte\n\tttlsStatConn      byte\n\tttlsSSLProt       uint16\n\tttlsNegCiph       [2]byte\n\tttlsSecType       byte\n\tttlsFIPS140Mode   byte\n\tttlsUserID        [8]byte\n\tapplData          [40]byte\n\tinOldestTime      [8]byte // uint64\n\toutOldestTime     [8]byte // uint64\n\ttcpTrustedPartner byte\n\t_                 [3]byte\n\tbulkDataIntfName  [16]byte\n\tttlsNegCiph4      [4]byte\n\tsmcReason         uint32\n\tlclSMCLinkId      uint32\n\trmtSMCLinkId      uint32\n\tsmcStatus         byte\n\tsmcFlags          byte\n\t_                 [2]byte\n\trcvWnd            uint32\n\tlclSMCBufSz       uint32\n\trmtSMCBufSz       uint32\n\tttlsSessID        [32]byte\n\tttlsSessIDLen     int16\n\t_                 [1]byte\n\tsmcDStatus        byte\n\tsmcDReason        uint32\n}\n\nvar svcNameTable [][]byte = [][]byte{\n\t[]byte(\"\\xc5\\xe9\\xc2\\xd5\\xd4\\xc9\\xc6\\xf4\"), // svc_EZBNMIF4\n}\n\nconst (\n\tsvc_EZBNMIF4 = 0\n)\n\nfunc GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {\n\tjobname := []byte(\"\\x5c\\x40\\x40\\x40\\x40\\x40\\x40\\x40\") // \"*\"\n\tresponseBuffer := [4096]byte{0}\n\tvar bufferAlet, reasonCode uint32 = 0, 0\n\tvar bufferLen, returnValue, returnCode int32 = 4096, 0, 0\n\n\tdsa := [18]uint64{0}\n\tvar argv [7]unsafe.Pointer\n\targv[0] = unsafe.Pointer(&jobname[0])\n\targv[1] = unsafe.Pointer(&responseBuffer[0])\n\targv[2] = unsafe.Pointer(&bufferAlet)\n\targv[3] = unsafe.Pointer(&bufferLen)\n\targv[4] = unsafe.Pointer(&returnValue)\n\targv[5] = unsafe.Pointer(&returnCode)\n\targv[6] = unsafe.Pointer(&reasonCode)\n\n\trequest := (*struct {\n\t\theader nwmHeader\n\t\tfilter nwmFilter\n\t})(unsafe.Pointer(&responseBuffer[0]))\n\n\tEZBNMIF4 := svcLoad(&svcNameTable[svc_EZBNMIF4][0])\n\tif EZBNMIF4 == nil {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// GetGlobalStats EZBNMIF4 call\n\trequest.header.ident = nwmHeaderIdentifier\n\trequest.header.length = uint32(unsafe.Sizeof(request.header))\n\trequest.header.version = nwmCurrentVer\n\trequest.header.nwmType = nwmGlobalStatsType\n\trequest.header.options = 0x80000000\n\n\tsvcCall(EZBNMIF4, &argv[0], &dsa[0])\n\n\t// outputDesc field is filled by EZBNMIF4 on success\n\tif returnCode != 0 || request.header.outputDesc.offset == 0 {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// Check that EZBNMIF4 returned a nwmRecHeader\n\trecHeader := (*nwmRecHeader)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))\n\tif recHeader.ident != nwmRecHeaderIdentifier {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// Parse nwmTriplets to get offsets of returned entries\n\tvar sections []*uint64\n\tvar sectionDesc *nwmTriplet = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[0]))\n\tfor i := uint32(0); i < uint32(recHeader.number); i++ {\n\t\toffset := request.header.outputDesc.offset + uint32(unsafe.Sizeof(*recHeader)) + i*uint32(unsafe.Sizeof(*sectionDesc))\n\t\tsectionDesc = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[offset]))\n\t\tfor j := uint32(0); j < sectionDesc.number; j++ {\n\t\t\toffset = request.header.outputDesc.offset + sectionDesc.offset + j*sectionDesc.length\n\t\t\tsections = append(sections, (*uint64)(unsafe.Pointer(&responseBuffer[offset])))\n\t\t}\n\t}\n\n\t// Find nwmTCPStatsEntry in returned entries\n\tvar tcpStats *nwmTCPStatsEntry = nil\n\tfor _, ptr := range sections {\n\t\tswitch *ptr {\n\t\tcase nwmTCPStatsIdentifier:\n\t\t\tif tcpStats != nil {\n\t\t\t\treturn nil, errnoErr(EINVAL)\n\t\t\t}\n\t\t\ttcpStats = (*nwmTCPStatsEntry)(unsafe.Pointer(ptr))\n\t\tcase nwmIPStatsIdentifier:\n\t\tcase nwmIPGStatsIdentifier:\n\t\tcase nwmUDPStatsIdentifier:\n\t\tcase nwmICMPGStatsEntry:\n\t\tcase nwmICMPTStatsEntry:\n\t\tdefault:\n\t\t\treturn nil, errnoErr(EINVAL)\n\t\t}\n\t}\n\tif tcpStats == nil {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// GetConnectionDetail EZBNMIF4 call\n\tresponseBuffer = [4096]byte{0}\n\tdsa = [18]uint64{0}\n\tbufferAlet, reasonCode = 0, 0\n\tbufferLen, returnValue, returnCode = 4096, 0, 0\n\tnameptr := (*uint32)(unsafe.Pointer(uintptr(0x21c))) // Get jobname of current process\n\tnameptr = (*uint32)(unsafe.Pointer(uintptr(*nameptr + 12)))\n\targv[0] = unsafe.Pointer(uintptr(*nameptr))\n\n\trequest.header.ident = nwmHeaderIdentifier\n\trequest.header.length = uint32(unsafe.Sizeof(request.header))\n\trequest.header.version = nwmCurrentVer\n\trequest.header.nwmType = nwmTCPConnType\n\trequest.header.options = 0x80000000\n\n\trequest.filter.ident = nwmFilterIdentifier\n\n\tvar localSockaddr RawSockaddrAny\n\tsocklen := _Socklen(SizeofSockaddrAny)\n\terr := getsockname(fd, &localSockaddr, &socklen)\n\tif err != nil {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\tif localSockaddr.Addr.Family == AF_INET {\n\t\tlocalSockaddr := (*RawSockaddrInet4)(unsafe.Pointer(&localSockaddr.Addr))\n\t\tlocalSockFilter := (*RawSockaddrInet4)(unsafe.Pointer(&request.filter.local[0]))\n\t\tlocalSockFilter.Family = AF_INET\n\t\tvar i int\n\t\tfor i = 0; i < 4; i++ {\n\t\t\tif localSockaddr.Addr[i] != 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif i != 4 {\n\t\t\trequest.filter.flags |= nwmFilterLclAddrMask\n\t\t\tfor i = 0; i < 4; i++ {\n\t\t\t\tlocalSockFilter.Addr[i] = localSockaddr.Addr[i]\n\t\t\t}\n\t\t}\n\t\tif localSockaddr.Port != 0 {\n\t\t\trequest.filter.flags |= nwmFilterLclPortMask\n\t\t\tlocalSockFilter.Port = localSockaddr.Port\n\t\t}\n\t} else if localSockaddr.Addr.Family == AF_INET6 {\n\t\tlocalSockaddr := (*RawSockaddrInet6)(unsafe.Pointer(&localSockaddr.Addr))\n\t\tlocalSockFilter := (*RawSockaddrInet6)(unsafe.Pointer(&request.filter.local[0]))\n\t\tlocalSockFilter.Family = AF_INET6\n\t\tvar i int\n\t\tfor i = 0; i < 16; i++ {\n\t\t\tif localSockaddr.Addr[i] != 0 {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif i != 16 {\n\t\t\trequest.filter.flags |= nwmFilterLclAddrMask\n\t\t\tfor i = 0; i < 16; i++ {\n\t\t\t\tlocalSockFilter.Addr[i] = localSockaddr.Addr[i]\n\t\t\t}\n\t\t}\n\t\tif localSockaddr.Port != 0 {\n\t\t\trequest.filter.flags |= nwmFilterLclPortMask\n\t\t\tlocalSockFilter.Port = localSockaddr.Port\n\t\t}\n\t}\n\n\tsvcCall(EZBNMIF4, &argv[0], &dsa[0])\n\n\t// outputDesc field is filled by EZBNMIF4 on success\n\tif returnCode != 0 || request.header.outputDesc.offset == 0 {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// Check that EZBNMIF4 returned a nwmConnEntry\n\tconn := (*nwmConnEntry)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))\n\tif conn.ident != nwmTCPConnIdentifier {\n\t\treturn nil, errnoErr(EINVAL)\n\t}\n\n\t// Copy data from the returned data structures into tcpInfo\n\t// Stats from nwmConnEntry are specific to that connection.\n\t// Stats from nwmTCPStatsEntry are global (to the interface?)\n\t// Fields may not be an exact match. Some fields have no equivalent.\n\tvar tcpinfo TCPInfo\n\ttcpinfo.State = uint8(conn.state)\n\ttcpinfo.Ca_state = 0 // dummy\n\ttcpinfo.Retransmits = uint8(tcpStats.retransSegs)\n\ttcpinfo.Probes = uint8(tcpStats.outWinProbes)\n\ttcpinfo.Backoff = 0 // dummy\n\ttcpinfo.Options = 0 // dummy\n\ttcpinfo.Rto = tcpStats.retransTimeouts\n\ttcpinfo.Ato = tcpStats.outDelayAcks\n\ttcpinfo.Snd_mss = conn.sendMSS\n\ttcpinfo.Rcv_mss = conn.sendMSS // dummy\n\ttcpinfo.Unacked = 0            // dummy\n\ttcpinfo.Sacked = 0             // dummy\n\ttcpinfo.Lost = 0               // dummy\n\ttcpinfo.Retrans = conn.reXmtCount\n\ttcpinfo.Fackets = 0 // dummy\n\ttcpinfo.Last_data_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.lastActivity[0])))\n\ttcpinfo.Last_ack_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.outOldestTime[0])))\n\ttcpinfo.Last_data_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))\n\ttcpinfo.Last_ack_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))\n\ttcpinfo.Pmtu = conn.sendMSS // dummy, NWMIfRouteMtu is a candidate\n\ttcpinfo.Rcv_ssthresh = conn.ssThresh\n\ttcpinfo.Rtt = conn.roundTripTime\n\ttcpinfo.Rttvar = conn.roundTripVar\n\ttcpinfo.Snd_ssthresh = conn.ssThresh // dummy\n\ttcpinfo.Snd_cwnd = conn.congestionWnd\n\ttcpinfo.Advmss = conn.sendMSS        // dummy\n\ttcpinfo.Reordering = 0               // dummy\n\ttcpinfo.Rcv_rtt = conn.roundTripTime // dummy\n\ttcpinfo.Rcv_space = conn.sendMSS     // dummy\n\ttcpinfo.Total_retrans = conn.reXmtCount\n\n\tsvcUnload(&svcNameTable[svc_EZBNMIF4][0], EZBNMIF4)\n\n\treturn &tcpinfo, nil\n}\n\n// GetsockoptString returns the string value of the socket option opt for the\n// socket associated with fd at the given socket level.\nfunc GetsockoptString(fd, level, opt int) (string, error) {\n\tbuf := make([]byte, 256)\n\tvallen := _Socklen(len(buf))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn ByteSliceToString(buf[:vallen]), nil\n}\n\nfunc Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {\n\tvar msg Msghdr\n\tvar rsa RawSockaddrAny\n\tmsg.Name = (*byte)(unsafe.Pointer(&rsa))\n\tmsg.Namelen = SizeofSockaddrAny\n\tvar iov Iovec\n\tif len(p) > 0 {\n\t\tiov.Base = (*byte)(unsafe.Pointer(&p[0]))\n\t\tiov.SetLen(len(p))\n\t}\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\t// receive at least one normal byte\n\t\tif len(p) == 0 {\n\t\t\tiov.Base = &dummy\n\t\t\tiov.SetLen(1)\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tmsg.Iov = &iov\n\tmsg.Iovlen = 1\n\tif n, err = recvmsg(fd, &msg, flags); err != nil {\n\t\treturn\n\t}\n\toobn = int(msg.Controllen)\n\trecvflags = int(msg.Flags)\n\t// source address is only specified if the socket is unconnected\n\tif rsa.Addr.Family != AF_UNSPEC {\n\t\t// TODO(neeilan): Remove 0 arg added to get this compiling on z/OS\n\t\tfrom, err = anyToSockaddr(0, &rsa)\n\t}\n\treturn\n}\n\nfunc Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {\n\t_, err = SendmsgN(fd, p, oob, to, flags)\n\treturn\n}\n\nfunc SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {\n\tvar ptr unsafe.Pointer\n\tvar salen _Socklen\n\tif to != nil {\n\t\tvar err error\n\t\tptr, salen, err = to.sockaddr()\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\tvar msg Msghdr\n\tmsg.Name = (*byte)(unsafe.Pointer(ptr))\n\tmsg.Namelen = int32(salen)\n\tvar iov Iovec\n\tif len(p) > 0 {\n\t\tiov.Base = (*byte)(unsafe.Pointer(&p[0]))\n\t\tiov.SetLen(len(p))\n\t}\n\tvar dummy byte\n\tif len(oob) > 0 {\n\t\t// send at least one normal byte\n\t\tif len(p) == 0 {\n\t\t\tiov.Base = &dummy\n\t\t\tiov.SetLen(1)\n\t\t}\n\t\tmsg.Control = (*byte)(unsafe.Pointer(&oob[0]))\n\t\tmsg.SetControllen(len(oob))\n\t}\n\tmsg.Iov = &iov\n\tmsg.Iovlen = 1\n\tif n, err = sendmsg(fd, &msg, flags); err != nil {\n\t\treturn 0, err\n\t}\n\tif len(oob) > 0 && len(p) == 0 {\n\t\tn = 0\n\t}\n\treturn n, nil\n}\n\nfunc Opendir(name string) (uintptr, error) {\n\tp, err := BytePtrFromString(name)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\terr = nil\n\truntime.EnterSyscall()\n\tdir, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___OPENDIR_A<<4, uintptr(unsafe.Pointer(p)))\n\truntime.ExitSyscall()\n\truntime.KeepAlive(unsafe.Pointer(p))\n\tif dir == 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn dir, err\n}\n\n// clearsyscall.Errno resets the errno value to 0.\nfunc clearErrno()\n\nfunc Closedir(dir uintptr) error {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSEDIR<<4, dir)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\treturn errnoErr2(e1, e2)\n\t}\n\treturn nil\n}\n\nfunc Seekdir(dir uintptr, pos int) {\n\truntime.EnterSyscall()\n\tCallLeFuncWithErr(GetZosLibVec()+SYS_SEEKDIR<<4, dir, uintptr(pos))\n\truntime.ExitSyscall()\n}\n\nfunc Telldir(dir uintptr) (int, error) {\n\tp, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TELLDIR<<4, dir)\n\tpos := int(p)\n\tif int64(p) == -1 {\n\t\treturn pos, errnoErr2(e1, e2)\n\t}\n\treturn pos, nil\n}\n\n// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {\n\t// struct flock is packed on z/OS. We can't emulate that in Go so\n\t// instead we pack it here.\n\tvar flock [24]byte\n\t*(*int16)(unsafe.Pointer(&flock[0])) = lk.Type\n\t*(*int16)(unsafe.Pointer(&flock[2])) = lk.Whence\n\t*(*int64)(unsafe.Pointer(&flock[4])) = lk.Start\n\t*(*int64)(unsafe.Pointer(&flock[12])) = lk.Len\n\t*(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock)))\n\truntime.ExitSyscall()\n\tlk.Type = *(*int16)(unsafe.Pointer(&flock[0]))\n\tlk.Whence = *(*int16)(unsafe.Pointer(&flock[2]))\n\tlk.Start = *(*int64)(unsafe.Pointer(&flock[4]))\n\tlk.Len = *(*int64)(unsafe.Pointer(&flock[12]))\n\tlk.Pid = *(*int32)(unsafe.Pointer(&flock[20]))\n\tif r0 == 0 {\n\t\treturn nil\n\t}\n\treturn errnoErr2(e1, e2)\n}\n\nfunc impl_Flock(fd int, how int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FLOCK<<4, uintptr(fd), uintptr(how))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FlockAddr() *(func(fd int, how int) (err error))\n\nvar Flock = enter_Flock\n\nfunc validFlock(fp uintptr) bool {\n\tif funcptrtest(GetZosLibVec()+SYS_FLOCK<<4, \"\") == 0 {\n\t\tif name, err := getLeFuncName(GetZosLibVec() + SYS_FLOCK<<4); err == nil {\n\t\t\treturn name == \"flock\"\n\t\t}\n\t}\n\treturn false\n}\n\nfunc enter_Flock(fd int, how int) (err error) {\n\tfuncref := get_FlockAddr()\n\tif validFlock(GetZosLibVec() + SYS_FLOCK<<4) {\n\t\t*funcref = impl_Flock\n\t} else {\n\t\t*funcref = legacyFlock\n\t}\n\treturn (*funcref)(fd, how)\n}\n\nfunc legacyFlock(fd int, how int) error {\n\n\tvar flock_type int16\n\tvar fcntl_cmd int\n\n\tswitch how {\n\tcase LOCK_SH | LOCK_NB:\n\t\tflock_type = F_RDLCK\n\t\tfcntl_cmd = F_SETLK\n\tcase LOCK_EX | LOCK_NB:\n\t\tflock_type = F_WRLCK\n\t\tfcntl_cmd = F_SETLK\n\tcase LOCK_EX:\n\t\tflock_type = F_WRLCK\n\t\tfcntl_cmd = F_SETLKW\n\tcase LOCK_UN:\n\t\tflock_type = F_UNLCK\n\t\tfcntl_cmd = F_SETLKW\n\tdefault:\n\t}\n\n\tflock := Flock_t{\n\t\tType:   int16(flock_type),\n\t\tWhence: int16(0),\n\t\tStart:  int64(0),\n\t\tLen:    int64(0),\n\t\tPid:    int32(Getppid()),\n\t}\n\n\terr := FcntlFlock(uintptr(fd), fcntl_cmd, &flock)\n\treturn err\n}\n\nfunc Mlock(b []byte) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Mlock2(b []byte, flags int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Mlockall(flags int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Munlock(b []byte) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Munlockall() (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP)\n\truntime.ExitSyscall()\n\tif r0 != 0 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc ClockGettime(clockid int32, ts *Timespec) error {\n\n\tvar ticks_per_sec uint32 = 100 //TODO(kenan): value is currently hardcoded; need sysconf() call otherwise\n\tvar nsec_per_sec int64 = 1000000000\n\n\tif ts == nil {\n\t\treturn EFAULT\n\t}\n\tif clockid == CLOCK_REALTIME || clockid == CLOCK_MONOTONIC {\n\t\tvar nanotime int64 = runtime.Nanotime1()\n\t\tts.Sec = nanotime / nsec_per_sec\n\t\tts.Nsec = nanotime % nsec_per_sec\n\t} else if clockid == CLOCK_PROCESS_CPUTIME_ID || clockid == CLOCK_THREAD_CPUTIME_ID {\n\t\tvar tm Tms\n\t\t_, err := Times(&tm)\n\t\tif err != nil {\n\t\t\treturn EFAULT\n\t\t}\n\t\tts.Sec = int64(tm.Utime / ticks_per_sec)\n\t\tts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec)\n\t} else {\n\t\treturn EINVAL\n\t}\n\treturn nil\n}\n\n// Chtag\n\n//go:nosplit\nfunc get_ChtagAddr() *(func(path string, ccsid uint64, textbit uint64) error)\n\nvar Chtag = enter_Chtag\n\nfunc enter_Chtag(path string, ccsid uint64, textbit uint64) error {\n\tfuncref := get_ChtagAddr()\n\tif validSetxattr() {\n\t\t*funcref = impl_Chtag\n\t} else {\n\t\t*funcref = legacy_Chtag\n\t}\n\treturn (*funcref)(path, ccsid, textbit)\n}\n\nfunc legacy_Chtag(path string, ccsid uint64, textbit uint64) error {\n\ttag := ccsid<<16 | textbit<<15\n\tvar tag_buff [8]byte\n\tDecodeData(tag_buff[:], 8, tag)\n\treturn Setxattr(path, \"filetag\", tag_buff[:], XATTR_REPLACE)\n}\n\nfunc impl_Chtag(path string, ccsid uint64, textbit uint64) error {\n\ttag := ccsid<<16 | textbit<<15\n\tvar tag_buff [4]byte\n\tDecodeData(tag_buff[:], 4, tag)\n\treturn Setxattr(path, \"system.filetag\", tag_buff[:], XATTR_REPLACE)\n}\n\n// End of Chtag\n\n// Nanosleep\n\n//go:nosplit\nfunc get_NanosleepAddr() *(func(time *Timespec, leftover *Timespec) error)\n\nvar Nanosleep = enter_Nanosleep\n\nfunc enter_Nanosleep(time *Timespec, leftover *Timespec) error {\n\tfuncref := get_NanosleepAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_NANOSLEEP<<4, \"\") == 0 {\n\t\t*funcref = impl_Nanosleep\n\t} else {\n\t\t*funcref = legacyNanosleep\n\t}\n\treturn (*funcref)(time, leftover)\n}\n\nfunc impl_Nanosleep(time *Timespec, leftover *Timespec) error {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_NANOSLEEP<<4, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\treturn errnoErr2(e1, e2)\n\t}\n\treturn nil\n}\n\nfunc legacyNanosleep(time *Timespec, leftover *Timespec) error {\n\tt0 := runtime.Nanotime1()\n\tvar secrem uint32\n\tvar nsecrem uint32\n\ttotal := time.Sec*1000000000 + time.Nsec\n\telapsed := runtime.Nanotime1() - t0\n\tvar rv int32\n\tvar rc int32\n\tvar err error\n\t// repeatedly sleep for 1 second until less than 1 second left\n\tfor total-elapsed > 1000000000 {\n\t\trv, rc, _ = BpxCondTimedWait(uint32(1), uint32(0), uint32(CW_CONDVAR), &secrem, &nsecrem)\n\t\tif rv != 0 && rc != 112 { // 112 is EAGAIN\n\t\t\tif leftover != nil && rc == 120 { // 120 is EINTR\n\t\t\t\tleftover.Sec = int64(secrem)\n\t\t\t\tleftover.Nsec = int64(nsecrem)\n\t\t\t}\n\t\t\terr = Errno(rc)\n\t\t\treturn err\n\t\t}\n\t\telapsed = runtime.Nanotime1() - t0\n\t}\n\t// sleep the remainder\n\tif total > elapsed {\n\t\trv, rc, _ = BpxCondTimedWait(uint32(0), uint32(total-elapsed), uint32(CW_CONDVAR), &secrem, &nsecrem)\n\t}\n\tif leftover != nil && rc == 120 {\n\t\tleftover.Sec = int64(secrem)\n\t\tleftover.Nsec = int64(nsecrem)\n\t}\n\tif rv != 0 && rc != 112 {\n\t\terr = Errno(rc)\n\t}\n\treturn err\n}\n\n// End of Nanosleep\n\nvar (\n\tStdin  = 0\n\tStdout = 1\n\tStderr = 2\n)\n\n// Do the interface allocations only once for common\n// Errno values.\nvar (\n\terrEAGAIN error = syscall.EAGAIN\n\terrEINVAL error = syscall.EINVAL\n\terrENOENT error = syscall.ENOENT\n)\n\nvar ZosTraceLevel int\nvar ZosTracefile *os.File\n\nvar (\n\tsignalNameMapOnce sync.Once\n\tsignalNameMap     map[string]syscall.Signal\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn nil\n\tcase EAGAIN:\n\t\treturn errEAGAIN\n\tcase EINVAL:\n\t\treturn errEINVAL\n\tcase ENOENT:\n\t\treturn errENOENT\n\t}\n\treturn e\n}\n\nvar reg *regexp.Regexp\n\n// enhanced with zos specific errno2\nfunc errnoErr2(e Errno, e2 uintptr) error {\n\tswitch e {\n\tcase 0:\n\t\treturn nil\n\tcase EAGAIN:\n\t\treturn errEAGAIN\n\t\t/*\n\t\t\tAllow the retrieval of errno2 for EINVAL and ENOENT on zos\n\t\t\t\tcase EINVAL:\n\t\t\t\t\treturn errEINVAL\n\t\t\t\tcase ENOENT:\n\t\t\t\t\treturn errENOENT\n\t\t*/\n\t}\n\tif ZosTraceLevel > 0 {\n\t\tvar name string\n\t\tif reg == nil {\n\t\t\treg = regexp.MustCompile(\"(^unix\\\\.[^/]+$|.*\\\\/unix\\\\.[^/]+$)\")\n\t\t}\n\t\ti := 1\n\t\tpc, file, line, ok := runtime.Caller(i)\n\t\tif ok {\n\t\t\tname = runtime.FuncForPC(pc).Name()\n\t\t}\n\t\tfor ok && reg.MatchString(runtime.FuncForPC(pc).Name()) {\n\t\t\ti += 1\n\t\t\tpc, file, line, ok = runtime.Caller(i)\n\t\t}\n\t\tif ok {\n\t\t\tif ZosTracefile == nil {\n\t\t\t\tZosConsolePrintf(\"From %s:%d\\n\", file, line)\n\t\t\t\tZosConsolePrintf(\"%s: %s (errno2=0x%x)\\n\", name, e.Error(), e2)\n\t\t\t} else {\n\t\t\t\tfmt.Fprintf(ZosTracefile, \"From %s:%d\\n\", file, line)\n\t\t\t\tfmt.Fprintf(ZosTracefile, \"%s: %s (errno2=0x%x)\\n\", name, e.Error(), e2)\n\t\t\t}\n\t\t} else {\n\t\t\tif ZosTracefile == nil {\n\t\t\t\tZosConsolePrintf(\"%s (errno2=0x%x)\\n\", e.Error(), e2)\n\t\t\t} else {\n\t\t\t\tfmt.Fprintf(ZosTracefile, \"%s (errno2=0x%x)\\n\", e.Error(), e2)\n\t\t\t}\n\t\t}\n\t}\n\treturn e\n}\n\n// ErrnoName returns the error name for error number e.\nfunc ErrnoName(e Errno) string {\n\ti := sort.Search(len(errorList), func(i int) bool {\n\t\treturn errorList[i].num >= e\n\t})\n\tif i < len(errorList) && errorList[i].num == e {\n\t\treturn errorList[i].name\n\t}\n\treturn \"\"\n}\n\n// SignalName returns the signal name for signal number s.\nfunc SignalName(s syscall.Signal) string {\n\ti := sort.Search(len(signalList), func(i int) bool {\n\t\treturn signalList[i].num >= s\n\t})\n\tif i < len(signalList) && signalList[i].num == s {\n\t\treturn signalList[i].name\n\t}\n\treturn \"\"\n}\n\n// SignalNum returns the syscall.Signal for signal named s,\n// or 0 if a signal with such name is not found.\n// The signal name should start with \"SIG\".\nfunc SignalNum(s string) syscall.Signal {\n\tsignalNameMapOnce.Do(func() {\n\t\tsignalNameMap = make(map[string]syscall.Signal, len(signalList))\n\t\tfor _, signal := range signalList {\n\t\t\tsignalNameMap[signal.name] = signal.num\n\t\t}\n\t})\n\treturn signalNameMap[s]\n}\n\n// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.\nfunc clen(n []byte) int {\n\ti := bytes.IndexByte(n, 0)\n\tif i == -1 {\n\t\ti = len(n)\n\t}\n\treturn i\n}\n\n// Mmap manager, for use by operating system-specific implementations.\n\ntype mmapper struct {\n\tsync.Mutex\n\tactive map[*byte][]byte // active mappings; key is last byte in mapping\n\tmmap   func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)\n\tmunmap func(addr uintptr, length uintptr) error\n}\n\nfunc (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {\n\tif length <= 0 {\n\t\treturn nil, EINVAL\n\t}\n\n\t// Set __MAP_64 by default\n\tflags |= __MAP_64\n\n\t// Map the requested memory.\n\taddr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\n\t// Slice memory layout\n\tvar sl = struct {\n\t\taddr uintptr\n\t\tlen  int\n\t\tcap  int\n\t}{addr, length, length}\n\n\t// Use unsafe to turn sl into a []byte.\n\tb := *(*[]byte)(unsafe.Pointer(&sl))\n\n\t// Register mapping in m and return it.\n\tp := &b[cap(b)-1]\n\tm.Lock()\n\tdefer m.Unlock()\n\tm.active[p] = b\n\treturn b, nil\n}\n\nfunc (m *mmapper) Munmap(data []byte) (err error) {\n\tif len(data) == 0 || len(data) != cap(data) {\n\t\treturn EINVAL\n\t}\n\n\t// Find the base of the mapping.\n\tp := &data[cap(data)-1]\n\tm.Lock()\n\tdefer m.Unlock()\n\tb := m.active[p]\n\tif b == nil || &b[0] != &data[0] {\n\t\treturn EINVAL\n\t}\n\n\t// Unmap the memory and update m.\n\tif errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {\n\t\treturn errno\n\t}\n\tdelete(m.active, p)\n\treturn nil\n}\n\nfunc Read(fd int, p []byte) (n int, err error) {\n\tn, err = read(fd, p)\n\tif raceenabled {\n\t\tif n > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(&p[0]), n)\n\t\t}\n\t\tif err == nil {\n\t\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t\t}\n\t}\n\treturn\n}\n\nfunc Write(fd int, p []byte) (n int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tn, err = write(fd, p)\n\tif raceenabled && n > 0 {\n\t\traceReadRange(unsafe.Pointer(&p[0]), n)\n\t}\n\treturn\n}\n\n// For testing: clients can set this flag to force\n// creation of IPv6 sockets to return EAFNOSUPPORT.\nvar SocketDisableIPv6 bool\n\n// Sockaddr represents a socket address.\ntype Sockaddr interface {\n\tsockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs\n}\n\n// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.\ntype SockaddrInet4 struct {\n\tPort int\n\tAddr [4]byte\n\traw  RawSockaddrInet4\n}\n\n// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.\ntype SockaddrInet6 struct {\n\tPort   int\n\tZoneId uint32\n\tAddr   [16]byte\n\traw    RawSockaddrInet6\n}\n\n// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.\ntype SockaddrUnix struct {\n\tName string\n\traw  RawSockaddrUnix\n}\n\nfunc Bind(fd int, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn bind(fd, ptr, n)\n}\n\nfunc Connect(fd int, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn connect(fd, ptr, n)\n}\n\nfunc Getpeername(fd int) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif err = getpeername(fd, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\treturn anyToSockaddr(fd, &rsa)\n}\n\nfunc GetsockoptByte(fd, level, opt int) (value byte, err error) {\n\tvar n byte\n\tvallen := _Socklen(1)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn n, err\n}\n\nfunc GetsockoptInt(fd, level, opt int) (value int, err error) {\n\tvar n int32\n\tvallen := _Socklen(4)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn int(n), err\n}\n\nfunc GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {\n\tvallen := _Socklen(4)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)\n\treturn value, err\n}\n\nfunc GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {\n\tvar value IPMreq\n\tvallen := _Socklen(SizeofIPMreq)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {\n\tvar value IPv6Mreq\n\tvallen := _Socklen(SizeofIPv6Mreq)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {\n\tvar value IPv6MTUInfo\n\tvallen := _Socklen(SizeofIPv6MTUInfo)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {\n\tvar value ICMPv6Filter\n\tvallen := _Socklen(SizeofICMPv6Filter)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)\n\treturn &value, err\n}\n\nfunc GetsockoptLinger(fd, level, opt int) (*Linger, error) {\n\tvar linger Linger\n\tvallen := _Socklen(SizeofLinger)\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen)\n\treturn &linger, err\n}\n\nfunc GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {\n\tvar tv Timeval\n\tvallen := _Socklen(unsafe.Sizeof(tv))\n\terr := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen)\n\treturn &tv, err\n}\n\nfunc GetsockoptUint64(fd, level, opt int) (value uint64, err error) {\n\tvar n uint64\n\tvallen := _Socklen(8)\n\terr = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)\n\treturn n, err\n}\n\nfunc Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tvar len _Socklen = SizeofSockaddrAny\n\tif n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {\n\t\treturn\n\t}\n\tif rsa.Addr.Family != AF_UNSPEC {\n\t\tfrom, err = anyToSockaddr(fd, &rsa)\n\t}\n\treturn\n}\n\nfunc Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {\n\tptr, n, err := to.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn sendto(fd, p, flags, ptr, n)\n}\n\nfunc SetsockoptByte(fd, level, opt int, value byte) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)\n}\n\nfunc SetsockoptInt(fd, level, opt int, value int) (err error) {\n\tvar n = int32(value)\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)\n}\n\nfunc SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)\n}\n\nfunc SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)\n}\n\nfunc SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)\n}\n\nfunc SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)\n}\n\nfunc SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)\n}\n\nfunc SetsockoptString(fd, level, opt int, s string) (err error) {\n\tvar p unsafe.Pointer\n\tif len(s) > 0 {\n\t\tp = unsafe.Pointer(&[]byte(s)[0])\n\t}\n\treturn setsockopt(fd, level, opt, p, uintptr(len(s)))\n}\n\nfunc SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))\n}\n\nfunc SetsockoptUint64(fd, level, opt int, value uint64) (err error) {\n\treturn setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)\n}\n\nfunc Socket(domain, typ, proto int) (fd int, err error) {\n\tif domain == AF_INET6 && SocketDisableIPv6 {\n\t\treturn -1, EAFNOSUPPORT\n\t}\n\tfd, err = socket(domain, typ, proto)\n\treturn\n}\n\nfunc Socketpair(domain, typ, proto int) (fd [2]int, err error) {\n\tvar fdx [2]int32\n\terr = socketpair(domain, typ, proto, &fdx)\n\tif err == nil {\n\t\tfd[0] = int(fdx[0])\n\t\tfd[1] = int(fdx[1])\n\t}\n\treturn\n}\n\nvar ioSync int64\n\nfunc CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }\n\nfunc SetNonblock(fd int, nonblocking bool) (err error) {\n\tflag, err := fcntl(fd, F_GETFL, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif nonblocking {\n\t\tflag |= O_NONBLOCK\n\t} else {\n\t\tflag &= ^O_NONBLOCK\n\t}\n\t_, err = fcntl(fd, F_SETFL, flag)\n\treturn err\n}\n\n// Exec calls execve(2), which replaces the calling executable in the process\n// tree. argv0 should be the full path to an executable (\"/bin/ls\") and the\n// executable name should also be the first argument in argv ([\"ls\", \"-l\"]).\n// envv are the environment variables that should be passed to the new\n// process ([\"USER=go\", \"PWD=/tmp\"]).\nfunc Exec(argv0 string, argv []string, envv []string) error {\n\treturn syscall.Exec(argv0, argv, envv)\n}\n\nfunc Getag(path string) (ccsid uint16, flag uint16, err error) {\n\tvar val [8]byte\n\tsz, err := Getxattr(path, \"ccsid\", val[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tccsid = uint16(EncodeData(val[0:sz]))\n\tsz, err = Getxattr(path, \"flags\", val[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tflag = uint16(EncodeData(val[0:sz]) >> 15)\n\treturn\n}\n\n// Mount begin\nfunc impl_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(source)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 *byte\n\t_p2, err = BytePtrFromString(fstype)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p3 *byte\n\t_p3, err = BytePtrFromString(data)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT1_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(_p3)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_MountAddr() *(func(source string, target string, fstype string, flags uintptr, data string) (err error))\n\nvar Mount = enter_Mount\n\nfunc enter_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {\n\tfuncref := get_MountAddr()\n\tif validMount() {\n\t\t*funcref = impl_Mount\n\t} else {\n\t\t*funcref = legacyMount\n\t}\n\treturn (*funcref)(source, target, fstype, flags, data)\n}\n\nfunc legacyMount(source string, target string, fstype string, flags uintptr, data string) (err error) {\n\tif needspace := 8 - len(fstype); needspace <= 0 {\n\t\tfstype = fstype[0:8]\n\t} else {\n\t\tfstype += \"        \"[0:needspace]\n\t}\n\treturn mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data)\n}\n\nfunc validMount() bool {\n\tif funcptrtest(GetZosLibVec()+SYS___MOUNT1_A<<4, \"\") == 0 {\n\t\tif name, err := getLeFuncName(GetZosLibVec() + SYS___MOUNT1_A<<4); err == nil {\n\t\t\treturn name == \"__mount1_a\"\n\t\t}\n\t}\n\treturn false\n}\n\n// Mount end\n\n// Unmount begin\nfunc impl_Unmount(target string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT2_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_UnmountAddr() *(func(target string, flags int) (err error))\n\nvar Unmount = enter_Unmount\n\nfunc enter_Unmount(target string, flags int) (err error) {\n\tfuncref := get_UnmountAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___UMOUNT2_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Unmount\n\t} else {\n\t\t*funcref = legacyUnmount\n\t}\n\treturn (*funcref)(target, flags)\n}\n\nfunc legacyUnmount(name string, mtm int) (err error) {\n\t// mountpoint is always a full path and starts with a '/'\n\t// check if input string is not a mountpoint but a filesystem name\n\tif name[0] != '/' {\n\t\treturn unmount_LE(name, mtm)\n\t}\n\t// treat name as mountpoint\n\tb2s := func(arr []byte) string {\n\t\tvar str string\n\t\tfor i := 0; i < len(arr); i++ {\n\t\t\tif arr[i] == 0 {\n\t\t\t\tstr = string(arr[:i])\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\treturn str\n\t}\n\tvar buffer struct {\n\t\theader W_Mnth\n\t\tfsinfo [64]W_Mntent\n\t}\n\tfs_count, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer)))\n\tif err == nil {\n\t\terr = EINVAL\n\t\tfor i := 0; i < fs_count; i++ {\n\t\t\tif b2s(buffer.fsinfo[i].Mountpoint[:]) == name {\n\t\t\t\terr = unmount_LE(b2s(buffer.fsinfo[i].Fsname[:]), mtm)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t} else if fs_count == 0 {\n\t\terr = EINVAL\n\t}\n\treturn err\n}\n\n// Unmount end\n\nfunc direntIno(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))\n}\n\nfunc direntReclen(buf []byte) (uint64, bool) {\n\treturn readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))\n}\n\nfunc direntNamlen(buf []byte) (uint64, bool) {\n\treclen, ok := direntReclen(buf)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\treturn reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true\n}\n\nfunc direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {\n\tvar d Dirent\n\n\td.Ino = uint64(dirent.Ino)\n\toffset, err := Telldir(dir)\n\tif err != nil {\n\t\treturn d, err\n\t}\n\n\td.Off = int64(offset)\n\ts := string(bytes.Split(dirent.Name[:], []byte{0})[0])\n\tcopy(d.Name[:], s)\n\n\td.Reclen = uint16(24 + len(d.NameString()))\n\tvar st Stat_t\n\tpath = path + \"/\" + s\n\terr = Lstat(path, &st)\n\tif err != nil {\n\t\treturn d, err\n\t}\n\n\td.Type = uint8(st.Mode >> 24)\n\treturn d, err\n}\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\t// Simulation of Getdirentries port from the Darwin implementation.\n\t// COMMENTS FROM DARWIN:\n\t// It's not the full required semantics, but should handle the case\n\t// of calling Getdirentries or ReadDirent repeatedly.\n\t// It won't handle assigning the results of lseek to *basep, or handle\n\t// the directory being edited underfoot.\n\n\tskip, err := Seek(fd, 0, 1 /* SEEK_CUR */)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\t// Get path from fd to avoid unavailable call (fdopendir)\n\tpath, err := ZosFdToPath(fd)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\td, err := Opendir(path)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer Closedir(d)\n\n\tvar cnt int64\n\tfor {\n\t\tvar entryLE direntLE\n\t\tvar entrypLE *direntLE\n\t\te := Readdir_r(d, &entryLE, &entrypLE)\n\t\tif e != nil {\n\t\t\treturn n, e\n\t\t}\n\t\tif entrypLE == nil {\n\t\t\tbreak\n\t\t}\n\t\tif skip > 0 {\n\t\t\tskip--\n\t\t\tcnt++\n\t\t\tcontinue\n\t\t}\n\n\t\t// Dirent on zos has a different structure\n\t\tentry, e := direntLeToDirentUnix(&entryLE, d, path)\n\t\tif e != nil {\n\t\t\treturn n, e\n\t\t}\n\n\t\treclen := int(entry.Reclen)\n\t\tif reclen > len(buf) {\n\t\t\t// Not enough room. Return for now.\n\t\t\t// The counter will let us know where we should start up again.\n\t\t\t// Note: this strategy for suspending in the middle and\n\t\t\t// restarting is O(n^2) in the length of the directory. Oh well.\n\t\t\tbreak\n\t\t}\n\n\t\t// Copy entry into return buffer.\n\t\ts := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)\n\t\tcopy(buf, s)\n\n\t\tbuf = buf[reclen:]\n\t\tn += reclen\n\t\tcnt++\n\t}\n\t// Set the seek offset of the input fd to record\n\t// how many files we've already returned.\n\t_, err = Seek(fd, cnt, 0 /* SEEK_SET */)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\n\treturn n, nil\n}\n\nfunc Err2ad() (eadd *int) {\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERR2AD<<4)\n\teadd = (*int)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc ZosConsolePrintf(format string, v ...interface{}) (int, error) {\n\ttype __cmsg struct {\n\t\t_            uint16\n\t\t_            [2]uint8\n\t\t__msg_length uint32\n\t\t__msg        uintptr\n\t\t_            [4]uint8\n\t}\n\tmsg := fmt.Sprintf(format, v...)\n\tstrptr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&msg)).Data)\n\tlen := (*reflect.StringHeader)(unsafe.Pointer(&msg)).Len\n\tcmsg := __cmsg{__msg_length: uint32(len), __msg: uintptr(strptr)}\n\tcmd := uint32(0)\n\truntime.EnterSyscall()\n\trc, err2, err1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____CONSOLE_A<<4, uintptr(unsafe.Pointer(&cmsg)), 0, uintptr(unsafe.Pointer(&cmd)))\n\truntime.ExitSyscall()\n\tif rc != 0 {\n\t\treturn 0, fmt.Errorf(\"%s (errno2=0x%x)\\n\", err1.Error(), err2)\n\t}\n\treturn 0, nil\n}\nfunc ZosStringToEbcdicBytes(str string, nullterm bool) (ebcdicBytes []byte) {\n\tif nullterm {\n\t\tebcdicBytes = []byte(str + \"\\x00\")\n\t} else {\n\t\tebcdicBytes = []byte(str)\n\t}\n\tA2e(ebcdicBytes)\n\treturn\n}\nfunc ZosEbcdicBytesToString(b []byte, trimRight bool) (str string) {\n\tres := make([]byte, len(b))\n\tcopy(res, b)\n\tE2a(res)\n\tif trimRight {\n\t\tstr = string(bytes.TrimRight(res, \" \\x00\"))\n\t} else {\n\t\tstr = string(res)\n\t}\n\treturn\n}\n\nfunc fdToPath(dirfd int) (path string, err error) {\n\tvar buffer [1024]byte\n\t// w_ctrl()\n\tret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,\n\t\t[]uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})\n\tif ret == 0 {\n\t\tzb := bytes.IndexByte(buffer[:], 0)\n\t\tif zb == -1 {\n\t\t\tzb = len(buffer)\n\t\t}\n\t\t// __e2a_l()\n\t\truntime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,\n\t\t\t[]uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})\n\t\treturn string(buffer[:zb]), nil\n\t}\n\t// __errno()\n\terrno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,\n\t\t[]uintptr{}))))\n\t// __errno2()\n\terrno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,\n\t\t[]uintptr{}))\n\t// strerror_r()\n\tret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,\n\t\t[]uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})\n\tif ret == 0 {\n\t\tzb := bytes.IndexByte(buffer[:], 0)\n\t\tif zb == -1 {\n\t\t\tzb = len(buffer)\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"%s (errno2=0x%x)\", buffer[:zb], errno2)\n\t} else {\n\t\treturn \"\", fmt.Errorf(\"fdToPath errno %d (errno2=0x%x)\", errno, errno2)\n\t}\n}\n\nfunc impl_Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFOAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_MkfifoatAddr() *(func(dirfd int, path string, mode uint32) (err error))\n\nvar Mkfifoat = enter_Mkfifoat\n\nfunc enter_Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tfuncref := get_MkfifoatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___MKFIFOAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Mkfifoat\n\t} else {\n\t\t*funcref = legacy_Mkfifoat\n\t}\n\treturn (*funcref)(dirfd, path, mode)\n}\n\nfunc legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tdirname, err := ZosFdToPath(dirfd)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn Mkfifo(dirname+\"/\"+path, mode)\n}\n\n//sys\tPosix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT\n//sys\tGrantpt(fildes int) (rc int, err error) = SYS_GRANTPT\n//sys\tUnlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT\n\nfunc fcntlAsIs(fd uintptr, cmd int, arg uintptr) (val int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), arg)\n\truntime.ExitSyscall()\n\tval = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\nfunc Fcntl(fd uintptr, cmd int, op interface{}) (ret int, err error) {\n\tswitch op.(type) {\n\tcase *Flock_t:\n\t\terr = FcntlFlock(fd, cmd, op.(*Flock_t))\n\t\tif err != nil {\n\t\t\tret = -1\n\t\t}\n\t\treturn\n\tcase int:\n\t\treturn FcntlInt(fd, cmd, op.(int))\n\tcase *F_cnvrt:\n\t\treturn fcntlAsIs(fd, cmd, uintptr(unsafe.Pointer(op.(*F_cnvrt))))\n\tcase unsafe.Pointer:\n\t\treturn fcntlAsIs(fd, cmd, uintptr(op.(unsafe.Pointer)))\n\tdefault:\n\t\treturn -1, EINVAL\n\t}\n\treturn\n}\n\nfunc Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\treturn sendfile(outfd, infd, offset, count)\n}\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\t// TODO: use LE call instead if the call is implemented\n\toriginalOffset, err := Seek(infd, 0, SEEK_CUR)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\t//start reading data from in_fd\n\tif offset != nil {\n\t\t_, err := Seek(infd, *offset, SEEK_SET)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t}\n\n\tbuf := make([]byte, count)\n\treadBuf := make([]byte, 0)\n\tvar n int = 0\n\tfor i := 0; i < count; i += n {\n\t\tn, err := Read(infd, buf)\n\t\tif n == 0 {\n\t\t\tif err != nil {\n\t\t\t\treturn -1, err\n\t\t\t} else { // EOF\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\treadBuf = append(readBuf, buf...)\n\t\tbuf = buf[0:0]\n\t}\n\n\tn2, err := Write(outfd, readBuf)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\t//When sendfile() returns, this variable will be set to the\n\t// offset of the byte following the last byte that was read.\n\tif offset != nil {\n\t\t*offset = *offset + int64(n)\n\t\t// If offset is not NULL, then sendfile() does not modify the file\n\t\t// offset of in_fd\n\t\t_, err := Seek(infd, originalOffset, SEEK_SET)\n\t\tif err != nil {\n\t\t\treturn -1, err\n\t\t}\n\t}\n\treturn n2, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sysvshm_linux.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux\n\npackage unix\n\nimport \"runtime\"\n\n// SysvShmCtl performs control operations on the shared memory segment\n// specified by id.\nfunc SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {\n\tif runtime.GOARCH == \"arm\" ||\n\t\truntime.GOARCH == \"mips64\" || runtime.GOARCH == \"mips64le\" {\n\t\tcmd |= ipc_64\n\t}\n\n\treturn shmctl(id, cmd, desc)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sysvshm_unix.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin && !ios) || linux || zos\n\npackage unix\n\nimport \"unsafe\"\n\n// SysvShmAttach attaches the Sysv shared memory segment associated with the\n// shared memory identifier id.\nfunc SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {\n\taddr, errno := shmat(id, addr, flag)\n\tif errno != nil {\n\t\treturn nil, errno\n\t}\n\n\t// Retrieve the size of the shared memory to enable slice creation\n\tvar info SysvShmDesc\n\n\t_, err := SysvShmCtl(id, IPC_STAT, &info)\n\tif err != nil {\n\t\t// release the shared memory if we can't find the size\n\n\t\t// ignoring error from shmdt as there's nothing sensible to return here\n\t\tshmdt(addr)\n\t\treturn nil, err\n\t}\n\n\t// Use unsafe to convert addr into a []byte.\n\tb := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))\n\treturn b, nil\n}\n\n// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.\n//\n// It is not safe to use the slice after calling this function.\nfunc SysvShmDetach(data []byte) error {\n\tif len(data) == 0 {\n\t\treturn EINVAL\n\t}\n\n\treturn shmdt(uintptr(unsafe.Pointer(&data[0])))\n}\n\n// SysvShmGet returns the Sysv shared memory identifier associated with key.\n// If the IPC_CREAT flag is specified a new segment is created.\nfunc SysvShmGet(key, size, flag int) (id int, err error) {\n\treturn shmget(key, size, flag)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/sysvshm_unix_other.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build (darwin && !ios) || zos\n\npackage unix\n\n// SysvShmCtl performs control operations on the shared memory segment\n// specified by id.\nfunc SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {\n\treturn shmctl(id, cmd, desc)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/timestruct.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage unix\n\nimport \"time\"\n\n// TimespecToNsec returns the time stored in ts as nanoseconds.\nfunc TimespecToNsec(ts Timespec) int64 { return ts.Nano() }\n\n// NsecToTimespec converts a number of nanoseconds into a Timespec.\nfunc NsecToTimespec(nsec int64) Timespec {\n\tsec := nsec / 1e9\n\tnsec = nsec % 1e9\n\tif nsec < 0 {\n\t\tnsec += 1e9\n\t\tsec--\n\t}\n\treturn setTimespec(sec, nsec)\n}\n\n// TimeToTimespec converts t into a Timespec.\n// On some 32-bit systems the range of valid Timespec values are smaller\n// than that of time.Time values.  So if t is out of the valid range of\n// Timespec, it returns a zero Timespec and ERANGE.\nfunc TimeToTimespec(t time.Time) (Timespec, error) {\n\tsec := t.Unix()\n\tnsec := int64(t.Nanosecond())\n\tts := setTimespec(sec, nsec)\n\n\t// Currently all targets have either int32 or int64 for Timespec.Sec.\n\t// If there were a new target with floating point type for it, we have\n\t// to consider the rounding error.\n\tif int64(ts.Sec) != sec {\n\t\treturn Timespec{}, ERANGE\n\t}\n\treturn ts, nil\n}\n\n// TimevalToNsec returns the time stored in tv as nanoseconds.\nfunc TimevalToNsec(tv Timeval) int64 { return tv.Nano() }\n\n// NsecToTimeval converts a number of nanoseconds into a Timeval.\nfunc NsecToTimeval(nsec int64) Timeval {\n\tnsec += 999 // round up to microsecond\n\tusec := nsec % 1e9 / 1e3\n\tsec := nsec / 1e9\n\tif usec < 0 {\n\t\tusec += 1e6\n\t\tsec--\n\t}\n\treturn setTimeval(sec, usec)\n}\n\n// Unix returns the time stored in ts as seconds plus nanoseconds.\nfunc (ts *Timespec) Unix() (sec int64, nsec int64) {\n\treturn int64(ts.Sec), int64(ts.Nsec)\n}\n\n// Unix returns the time stored in tv as seconds plus nanoseconds.\nfunc (tv *Timeval) Unix() (sec int64, nsec int64) {\n\treturn int64(tv.Sec), int64(tv.Usec) * 1000\n}\n\n// Nano returns the time stored in ts as nanoseconds.\nfunc (ts *Timespec) Nano() int64 {\n\treturn int64(ts.Sec)*1e9 + int64(ts.Nsec)\n}\n\n// Nano returns the time stored in tv as nanoseconds.\nfunc (tv *Timeval) Nano() int64 {\n\treturn int64(tv.Sec)*1e9 + int64(tv.Usec)*1000\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/unveil_openbsd.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage unix\n\nimport \"fmt\"\n\n// Unveil implements the unveil syscall.\n// For more information see unveil(2).\n// Note that the special case of blocking further\n// unveil calls is handled by UnveilBlock.\nfunc Unveil(path string, flags string) error {\n\tif err := supportsUnveil(); err != nil {\n\t\treturn err\n\t}\n\tpathPtr, err := BytePtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tflagsPtr, err := BytePtrFromString(flags)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn unveil(pathPtr, flagsPtr)\n}\n\n// UnveilBlock blocks future unveil calls.\n// For more information see unveil(2).\nfunc UnveilBlock() error {\n\tif err := supportsUnveil(); err != nil {\n\t\treturn err\n\t}\n\treturn unveil(nil, nil)\n}\n\n// supportsUnveil checks for availability of the unveil(2) system call based\n// on the running OpenBSD version.\nfunc supportsUnveil() error {\n\tmaj, min, err := majmin()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// unveil is not available before 6.4\n\tif maj < 6 || (maj == 6 && min <= 3) {\n\t\treturn fmt.Errorf(\"cannot call Unveil on OpenBSD %d.%d\", maj, min)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/vgetrandom_linux.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build linux && go1.24\n\npackage unix\n\nimport _ \"unsafe\"\n\n//go:linkname vgetrandom runtime.vgetrandom\n//go:noescape\nfunc vgetrandom(p []byte, flags uint32) (ret int, supported bool)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !linux || !go1.24\n\npackage unix\n\nfunc vgetrandom(p []byte, flags uint32) (ret int, supported bool) {\n\treturn -1, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/xattr_bsd.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build freebsd || netbsd\n\npackage unix\n\nimport (\n\t\"strings\"\n\t\"unsafe\"\n)\n\n// Derive extattr namespace and attribute name\n\nfunc xattrnamespace(fullattr string) (ns int, attr string, err error) {\n\ts := strings.IndexByte(fullattr, '.')\n\tif s == -1 {\n\t\treturn -1, \"\", ENOATTR\n\t}\n\n\tnamespace := fullattr[0:s]\n\tattr = fullattr[s+1:]\n\n\tswitch namespace {\n\tcase \"user\":\n\t\treturn EXTATTR_NAMESPACE_USER, attr, nil\n\tcase \"system\":\n\t\treturn EXTATTR_NAMESPACE_SYSTEM, attr, nil\n\tdefault:\n\t\treturn -1, \"\", ENOATTR\n\t}\n}\n\nfunc initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {\n\tif len(dest) > idx {\n\t\treturn unsafe.Pointer(&dest[idx])\n\t}\n\tif dest != nil {\n\t\t// extattr_get_file and extattr_list_file treat NULL differently from\n\t\t// a non-NULL pointer of length zero. Preserve the property of nilness,\n\t\t// even if we can't use dest directly.\n\t\treturn unsafe.Pointer(&_zero)\n\t}\n\treturn nil\n}\n\n// FreeBSD and NetBSD implement their own syscalls to handle extended attributes\n\nfunc Getxattr(file string, attr string, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsize := len(dest)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn ExtattrGetFile(file, nsid, a, uintptr(d), destsize)\n}\n\nfunc Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsize := len(dest)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)\n}\n\nfunc Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsize := len(dest)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\treturn ExtattrGetLink(link, nsid, a, uintptr(d), destsize)\n}\n\n// flags are unused on FreeBSD\n\nfunc Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {\n\tvar d unsafe.Pointer\n\tif len(data) > 0 {\n\t\td = unsafe.Pointer(&data[0])\n\t}\n\tdatasiz := len(data)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)\n\treturn\n}\n\nfunc Setxattr(file string, attr string, data []byte, flags int) (err error) {\n\tvar d unsafe.Pointer\n\tif len(data) > 0 {\n\t\td = unsafe.Pointer(&data[0])\n\t}\n\tdatasiz := len(data)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)\n\treturn\n}\n\nfunc Lsetxattr(link string, attr string, data []byte, flags int) (err error) {\n\tvar d unsafe.Pointer\n\tif len(data) > 0 {\n\t\td = unsafe.Pointer(&data[0])\n\t}\n\tdatasiz := len(data)\n\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t_, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)\n\treturn\n}\n\nfunc Removexattr(file string, attr string) (err error) {\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\terr = ExtattrDeleteFile(file, nsid, a)\n\treturn\n}\n\nfunc Fremovexattr(fd int, attr string) (err error) {\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\terr = ExtattrDeleteFd(fd, nsid, a)\n\treturn\n}\n\nfunc Lremovexattr(link string, attr string) (err error) {\n\tnsid, a, err := xattrnamespace(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\n\terr = ExtattrDeleteLink(link, nsid, a)\n\treturn\n}\n\nfunc Listxattr(file string, dest []byte) (sz int, err error) {\n\tdestsiz := len(dest)\n\n\t// FreeBSD won't allow you to list xattrs from multiple namespaces\n\ts, pos := 0, 0\n\tfor _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {\n\t\tstmp, e := ListxattrNS(file, nsid, dest[pos:])\n\n\t\t/* Errors accessing system attrs are ignored so that\n\t\t * we can implement the Linux-like behavior of omitting errors that\n\t\t * we don't have read permissions on\n\t\t *\n\t\t * Linux will still error if we ask for user attributes on a file that\n\t\t * we don't have read permissions on, so don't ignore those errors\n\t\t */\n\t\tif e != nil {\n\t\t\tif e == EPERM && nsid != EXTATTR_NAMESPACE_USER {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn s, e\n\t\t}\n\n\t\ts += stmp\n\t\tpos = s\n\t\tif pos > destsiz {\n\t\t\tpos = destsiz\n\t\t}\n\t}\n\n\treturn s, nil\n}\n\nfunc ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsiz := len(dest)\n\n\ts, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)\n\tif e != nil {\n\t\treturn 0, err\n\t}\n\n\treturn s, nil\n}\n\nfunc Flistxattr(fd int, dest []byte) (sz int, err error) {\n\tdestsiz := len(dest)\n\n\ts, pos := 0, 0\n\tfor _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {\n\t\tstmp, e := FlistxattrNS(fd, nsid, dest[pos:])\n\n\t\tif e != nil {\n\t\t\tif e == EPERM && nsid != EXTATTR_NAMESPACE_USER {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn s, e\n\t\t}\n\n\t\ts += stmp\n\t\tpos = s\n\t\tif pos > destsiz {\n\t\t\tpos = destsiz\n\t\t}\n\t}\n\n\treturn s, nil\n}\n\nfunc FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsiz := len(dest)\n\n\ts, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)\n\tif e != nil {\n\t\treturn 0, err\n\t}\n\n\treturn s, nil\n}\n\nfunc Llistxattr(link string, dest []byte) (sz int, err error) {\n\tdestsiz := len(dest)\n\n\ts, pos := 0, 0\n\tfor _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {\n\t\tstmp, e := LlistxattrNS(link, nsid, dest[pos:])\n\n\t\tif e != nil {\n\t\t\tif e == EPERM && nsid != EXTATTR_NAMESPACE_USER {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn s, e\n\t\t}\n\n\t\ts += stmp\n\t\tpos = s\n\t\tif pos > destsiz {\n\t\t\tpos = destsiz\n\t\t}\n\t}\n\n\treturn s, nil\n}\n\nfunc LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {\n\td := initxattrdest(dest, 0)\n\tdestsiz := len(dest)\n\n\ts, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)\n\tif e != nil {\n\t\treturn 0, err\n\t}\n\n\treturn s, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go",
    "content": "// mkerrors.sh -maix32\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc && aix\n\n// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs -- -maix32 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                  = 0x10\n\tAF_BYPASS                     = 0x19\n\tAF_CCITT                      = 0xa\n\tAF_CHAOS                      = 0x5\n\tAF_DATAKIT                    = 0x9\n\tAF_DECnet                     = 0xc\n\tAF_DLI                        = 0xd\n\tAF_ECMA                       = 0x8\n\tAF_HYLINK                     = 0xf\n\tAF_IMPLINK                    = 0x3\n\tAF_INET                       = 0x2\n\tAF_INET6                      = 0x18\n\tAF_INTF                       = 0x14\n\tAF_ISO                        = 0x7\n\tAF_LAT                        = 0xe\n\tAF_LINK                       = 0x12\n\tAF_LOCAL                      = 0x1\n\tAF_MAX                        = 0x1e\n\tAF_NDD                        = 0x17\n\tAF_NETWARE                    = 0x16\n\tAF_NS                         = 0x6\n\tAF_OSI                        = 0x7\n\tAF_PUP                        = 0x4\n\tAF_RIF                        = 0x15\n\tAF_ROUTE                      = 0x11\n\tAF_SNA                        = 0xb\n\tAF_UNIX                       = 0x1\n\tAF_UNSPEC                     = 0x0\n\tALTWERASE                     = 0x400000\n\tARPHRD_802_3                  = 0x6\n\tARPHRD_802_5                  = 0x6\n\tARPHRD_ETHER                  = 0x1\n\tARPHRD_FDDI                   = 0x1\n\tB0                            = 0x0\n\tB110                          = 0x3\n\tB1200                         = 0x9\n\tB134                          = 0x4\n\tB150                          = 0x5\n\tB1800                         = 0xa\n\tB19200                        = 0xe\n\tB200                          = 0x6\n\tB2400                         = 0xb\n\tB300                          = 0x7\n\tB38400                        = 0xf\n\tB4800                         = 0xc\n\tB50                           = 0x1\n\tB600                          = 0x8\n\tB75                           = 0x2\n\tB9600                         = 0xd\n\tBRKINT                        = 0x2\n\tBS0                           = 0x0\n\tBS1                           = 0x1000\n\tBSDLY                         = 0x1000\n\tCAP_AACCT                     = 0x6\n\tCAP_ARM_APPLICATION           = 0x5\n\tCAP_BYPASS_RAC_VMM            = 0x3\n\tCAP_CLEAR                     = 0x0\n\tCAP_CREDENTIALS               = 0x7\n\tCAP_EFFECTIVE                 = 0x1\n\tCAP_EWLM_AGENT                = 0x4\n\tCAP_INHERITABLE               = 0x2\n\tCAP_MAXIMUM                   = 0x7\n\tCAP_NUMA_ATTACH               = 0x2\n\tCAP_PERMITTED                 = 0x3\n\tCAP_PROPAGATE                 = 0x1\n\tCAP_PROPOGATE                 = 0x1\n\tCAP_SET                       = 0x1\n\tCBAUD                         = 0xf\n\tCFLUSH                        = 0xf\n\tCIBAUD                        = 0xf0000\n\tCLOCAL                        = 0x800\n\tCLOCK_MONOTONIC               = 0xa\n\tCLOCK_PROCESS_CPUTIME_ID      = 0xb\n\tCLOCK_REALTIME                = 0x9\n\tCLOCK_THREAD_CPUTIME_ID       = 0xc\n\tCR0                           = 0x0\n\tCR1                           = 0x100\n\tCR2                           = 0x200\n\tCR3                           = 0x300\n\tCRDLY                         = 0x300\n\tCREAD                         = 0x80\n\tCS5                           = 0x0\n\tCS6                           = 0x10\n\tCS7                           = 0x20\n\tCS8                           = 0x30\n\tCSIOCGIFCONF                  = -0x3ff796dc\n\tCSIZE                         = 0x30\n\tCSMAP_DIR                     = \"/usr/lib/nls/csmap/\"\n\tCSTART                        = '\\021'\n\tCSTOP                         = '\\023'\n\tCSTOPB                        = 0x40\n\tCSUSP                         = 0x1a\n\tECHO                          = 0x8\n\tECHOCTL                       = 0x20000\n\tECHOE                         = 0x10\n\tECHOK                         = 0x20\n\tECHOKE                        = 0x80000\n\tECHONL                        = 0x40\n\tECHOPRT                       = 0x40000\n\tECH_ICMPID                    = 0x2\n\tETHERNET_CSMACD               = 0x6\n\tEVENP                         = 0x80\n\tEXCONTINUE                    = 0x0\n\tEXDLOK                        = 0x3\n\tEXIO                          = 0x2\n\tEXPGIO                        = 0x0\n\tEXRESUME                      = 0x2\n\tEXRETURN                      = 0x1\n\tEXSIG                         = 0x4\n\tEXTA                          = 0xe\n\tEXTB                          = 0xf\n\tEXTRAP                        = 0x1\n\tEYEC_RTENTRYA                 = 0x257274656e747241\n\tEYEC_RTENTRYF                 = 0x257274656e747246\n\tE_ACC                         = 0x0\n\tFD_CLOEXEC                    = 0x1\n\tFD_SETSIZE                    = 0xfffe\n\tFF0                           = 0x0\n\tFF1                           = 0x2000\n\tFFDLY                         = 0x2000\n\tFLUSHBAND                     = 0x40\n\tFLUSHLOW                      = 0x8\n\tFLUSHO                        = 0x100000\n\tFLUSHR                        = 0x1\n\tFLUSHRW                       = 0x3\n\tFLUSHW                        = 0x2\n\tF_CLOSEM                      = 0xa\n\tF_DUP2FD                      = 0xe\n\tF_DUPFD                       = 0x0\n\tF_GETFD                       = 0x1\n\tF_GETFL                       = 0x3\n\tF_GETLK                       = 0x5\n\tF_GETLK64                     = 0xb\n\tF_GETOWN                      = 0x8\n\tF_LOCK                        = 0x1\n\tF_OK                          = 0x0\n\tF_RDLCK                       = 0x1\n\tF_SETFD                       = 0x2\n\tF_SETFL                       = 0x4\n\tF_SETLK                       = 0x6\n\tF_SETLK64                     = 0xc\n\tF_SETLKW                      = 0x7\n\tF_SETLKW64                    = 0xd\n\tF_SETOWN                      = 0x9\n\tF_TEST                        = 0x3\n\tF_TLOCK                       = 0x2\n\tF_TSTLK                       = 0xf\n\tF_ULOCK                       = 0x0\n\tF_UNLCK                       = 0x3\n\tF_WRLCK                       = 0x2\n\tHUPCL                         = 0x400\n\tIBSHIFT                       = 0x10\n\tICANON                        = 0x2\n\tICMP6_FILTER                  = 0x26\n\tICMP6_SEC_SEND_DEL            = 0x46\n\tICMP6_SEC_SEND_GET            = 0x47\n\tICMP6_SEC_SEND_SET            = 0x44\n\tICMP6_SEC_SEND_SET_CGA_ADDR   = 0x45\n\tICRNL                         = 0x100\n\tIEXTEN                        = 0x200000\n\tIFA_FIRSTALIAS                = 0x2000\n\tIFA_ROUTE                     = 0x1\n\tIFF_64BIT                     = 0x4000000\n\tIFF_ALLCAST                   = 0x20000\n\tIFF_ALLMULTI                  = 0x200\n\tIFF_BPF                       = 0x8000000\n\tIFF_BRIDGE                    = 0x40000\n\tIFF_BROADCAST                 = 0x2\n\tIFF_CANTCHANGE                = 0x80c52\n\tIFF_CHECKSUM_OFFLOAD          = 0x10000000\n\tIFF_D1                        = 0x8000\n\tIFF_D2                        = 0x4000\n\tIFF_D3                        = 0x2000\n\tIFF_D4                        = 0x1000\n\tIFF_DEBUG                     = 0x4\n\tIFF_DEVHEALTH                 = 0x4000\n\tIFF_DO_HW_LOOPBACK            = 0x10000\n\tIFF_GROUP_ROUTING             = 0x2000000\n\tIFF_IFBUFMGT                  = 0x800000\n\tIFF_LINK0                     = 0x100000\n\tIFF_LINK1                     = 0x200000\n\tIFF_LINK2                     = 0x400000\n\tIFF_LOOPBACK                  = 0x8\n\tIFF_MULTICAST                 = 0x80000\n\tIFF_NOARP                     = 0x80\n\tIFF_NOECHO                    = 0x800\n\tIFF_NOTRAILERS                = 0x20\n\tIFF_OACTIVE                   = 0x400\n\tIFF_POINTOPOINT               = 0x10\n\tIFF_PROMISC                   = 0x100\n\tIFF_PSEG                      = 0x40000000\n\tIFF_RUNNING                   = 0x40\n\tIFF_SIMPLEX                   = 0x800\n\tIFF_SNAP                      = 0x8000\n\tIFF_TCP_DISABLE_CKSUM         = 0x20000000\n\tIFF_TCP_NOCKSUM               = 0x1000000\n\tIFF_UP                        = 0x1\n\tIFF_VIPA                      = 0x80000000\n\tIFNAMSIZ                      = 0x10\n\tIFO_FLUSH                     = 0x1\n\tIFT_1822                      = 0x2\n\tIFT_AAL5                      = 0x31\n\tIFT_ARCNET                    = 0x23\n\tIFT_ARCNETPLUS                = 0x24\n\tIFT_ATM                       = 0x25\n\tIFT_CEPT                      = 0x13\n\tIFT_CLUSTER                   = 0x3e\n\tIFT_DS3                       = 0x1e\n\tIFT_EON                       = 0x19\n\tIFT_ETHER                     = 0x6\n\tIFT_FCS                       = 0x3a\n\tIFT_FDDI                      = 0xf\n\tIFT_FRELAY                    = 0x20\n\tIFT_FRELAYDCE                 = 0x2c\n\tIFT_GIFTUNNEL                 = 0x3c\n\tIFT_HDH1822                   = 0x3\n\tIFT_HF                        = 0x3d\n\tIFT_HIPPI                     = 0x2f\n\tIFT_HSSI                      = 0x2e\n\tIFT_HY                        = 0xe\n\tIFT_IB                        = 0xc7\n\tIFT_ISDNBASIC                 = 0x14\n\tIFT_ISDNPRIMARY               = 0x15\n\tIFT_ISO88022LLC               = 0x29\n\tIFT_ISO88023                  = 0x7\n\tIFT_ISO88024                  = 0x8\n\tIFT_ISO88025                  = 0x9\n\tIFT_ISO88026                  = 0xa\n\tIFT_LAPB                      = 0x10\n\tIFT_LOCALTALK                 = 0x2a\n\tIFT_LOOP                      = 0x18\n\tIFT_MIOX25                    = 0x26\n\tIFT_MODEM                     = 0x30\n\tIFT_NSIP                      = 0x1b\n\tIFT_OTHER                     = 0x1\n\tIFT_P10                       = 0xc\n\tIFT_P80                       = 0xd\n\tIFT_PARA                      = 0x22\n\tIFT_PPP                       = 0x17\n\tIFT_PROPMUX                   = 0x36\n\tIFT_PROPVIRTUAL               = 0x35\n\tIFT_PTPSERIAL                 = 0x16\n\tIFT_RS232                     = 0x21\n\tIFT_SDLC                      = 0x11\n\tIFT_SIP                       = 0x1f\n\tIFT_SLIP                      = 0x1c\n\tIFT_SMDSDXI                   = 0x2b\n\tIFT_SMDSICIP                  = 0x34\n\tIFT_SN                        = 0x38\n\tIFT_SONET                     = 0x27\n\tIFT_SONETPATH                 = 0x32\n\tIFT_SONETVT                   = 0x33\n\tIFT_SP                        = 0x39\n\tIFT_STARLAN                   = 0xb\n\tIFT_T1                        = 0x12\n\tIFT_TUNNEL                    = 0x3b\n\tIFT_ULTRA                     = 0x1d\n\tIFT_V35                       = 0x2d\n\tIFT_VIPA                      = 0x37\n\tIFT_X25                       = 0x5\n\tIFT_X25DDN                    = 0x4\n\tIFT_X25PLE                    = 0x28\n\tIFT_XETHER                    = 0x1a\n\tIGNBRK                        = 0x1\n\tIGNCR                         = 0x80\n\tIGNPAR                        = 0x4\n\tIMAXBEL                       = 0x10000\n\tINLCR                         = 0x40\n\tINPCK                         = 0x10\n\tIN_CLASSA_HOST                = 0xffffff\n\tIN_CLASSA_MAX                 = 0x80\n\tIN_CLASSA_NET                 = 0xff000000\n\tIN_CLASSA_NSHIFT              = 0x18\n\tIN_CLASSB_HOST                = 0xffff\n\tIN_CLASSB_MAX                 = 0x10000\n\tIN_CLASSB_NET                 = 0xffff0000\n\tIN_CLASSB_NSHIFT              = 0x10\n\tIN_CLASSC_HOST                = 0xff\n\tIN_CLASSC_NET                 = 0xffffff00\n\tIN_CLASSC_NSHIFT              = 0x8\n\tIN_CLASSD_HOST                = 0xfffffff\n\tIN_CLASSD_NET                 = 0xf0000000\n\tIN_CLASSD_NSHIFT              = 0x1c\n\tIN_LOOPBACKNET                = 0x7f\n\tIN_USE                        = 0x1\n\tIPPROTO_AH                    = 0x33\n\tIPPROTO_BIP                   = 0x53\n\tIPPROTO_DSTOPTS               = 0x3c\n\tIPPROTO_EGP                   = 0x8\n\tIPPROTO_EON                   = 0x50\n\tIPPROTO_ESP                   = 0x32\n\tIPPROTO_FRAGMENT              = 0x2c\n\tIPPROTO_GGP                   = 0x3\n\tIPPROTO_GIF                   = 0x8c\n\tIPPROTO_GRE                   = 0x2f\n\tIPPROTO_HOPOPTS               = 0x0\n\tIPPROTO_ICMP                  = 0x1\n\tIPPROTO_ICMPV6                = 0x3a\n\tIPPROTO_IDP                   = 0x16\n\tIPPROTO_IGMP                  = 0x2\n\tIPPROTO_IP                    = 0x0\n\tIPPROTO_IPIP                  = 0x4\n\tIPPROTO_IPV6                  = 0x29\n\tIPPROTO_LOCAL                 = 0x3f\n\tIPPROTO_MAX                   = 0x100\n\tIPPROTO_MH                    = 0x87\n\tIPPROTO_NONE                  = 0x3b\n\tIPPROTO_PUP                   = 0xc\n\tIPPROTO_QOS                   = 0x2d\n\tIPPROTO_RAW                   = 0xff\n\tIPPROTO_ROUTING               = 0x2b\n\tIPPROTO_RSVP                  = 0x2e\n\tIPPROTO_SCTP                  = 0x84\n\tIPPROTO_TCP                   = 0x6\n\tIPPROTO_TP                    = 0x1d\n\tIPPROTO_UDP                   = 0x11\n\tIPV6_ADDRFORM                 = 0x16\n\tIPV6_ADDR_PREFERENCES         = 0x4a\n\tIPV6_ADD_MEMBERSHIP           = 0xc\n\tIPV6_AIXRAWSOCKET             = 0x39\n\tIPV6_CHECKSUM                 = 0x27\n\tIPV6_DONTFRAG                 = 0x2d\n\tIPV6_DROP_MEMBERSHIP          = 0xd\n\tIPV6_DSTOPTS                  = 0x36\n\tIPV6_FLOWINFO_FLOWLABEL       = 0xffffff\n\tIPV6_FLOWINFO_PRIFLOW         = 0xfffffff\n\tIPV6_FLOWINFO_PRIORITY        = 0xf000000\n\tIPV6_FLOWINFO_SRFLAG          = 0x10000000\n\tIPV6_FLOWINFO_VERSION         = 0xf0000000\n\tIPV6_HOPLIMIT                 = 0x28\n\tIPV6_HOPOPTS                  = 0x34\n\tIPV6_JOIN_GROUP               = 0xc\n\tIPV6_LEAVE_GROUP              = 0xd\n\tIPV6_MIPDSTOPTS               = 0x36\n\tIPV6_MULTICAST_HOPS           = 0xa\n\tIPV6_MULTICAST_IF             = 0x9\n\tIPV6_MULTICAST_LOOP           = 0xb\n\tIPV6_NEXTHOP                  = 0x30\n\tIPV6_NOPROBE                  = 0x1c\n\tIPV6_PATHMTU                  = 0x2e\n\tIPV6_PKTINFO                  = 0x21\n\tIPV6_PKTOPTIONS               = 0x24\n\tIPV6_PRIORITY_10              = 0xa000000\n\tIPV6_PRIORITY_11              = 0xb000000\n\tIPV6_PRIORITY_12              = 0xc000000\n\tIPV6_PRIORITY_13              = 0xd000000\n\tIPV6_PRIORITY_14              = 0xe000000\n\tIPV6_PRIORITY_15              = 0xf000000\n\tIPV6_PRIORITY_8               = 0x8000000\n\tIPV6_PRIORITY_9               = 0x9000000\n\tIPV6_PRIORITY_BULK            = 0x4000000\n\tIPV6_PRIORITY_CONTROL         = 0x7000000\n\tIPV6_PRIORITY_FILLER          = 0x1000000\n\tIPV6_PRIORITY_INTERACTIVE     = 0x6000000\n\tIPV6_PRIORITY_RESERVED1       = 0x3000000\n\tIPV6_PRIORITY_RESERVED2       = 0x5000000\n\tIPV6_PRIORITY_UNATTENDED      = 0x2000000\n\tIPV6_PRIORITY_UNCHARACTERIZED = 0x0\n\tIPV6_RECVDSTOPTS              = 0x38\n\tIPV6_RECVHOPLIMIT             = 0x29\n\tIPV6_RECVHOPOPTS              = 0x35\n\tIPV6_RECVHOPS                 = 0x22\n\tIPV6_RECVIF                   = 0x1e\n\tIPV6_RECVPATHMTU              = 0x2f\n\tIPV6_RECVPKTINFO              = 0x23\n\tIPV6_RECVRTHDR                = 0x33\n\tIPV6_RECVSRCRT                = 0x1d\n\tIPV6_RECVTCLASS               = 0x2a\n\tIPV6_RTHDR                    = 0x32\n\tIPV6_RTHDRDSTOPTS             = 0x37\n\tIPV6_RTHDR_TYPE_0             = 0x0\n\tIPV6_RTHDR_TYPE_2             = 0x2\n\tIPV6_SENDIF                   = 0x1f\n\tIPV6_SRFLAG_LOOSE             = 0x0\n\tIPV6_SRFLAG_STRICT            = 0x10000000\n\tIPV6_TCLASS                   = 0x2b\n\tIPV6_TOKEN_LENGTH             = 0x40\n\tIPV6_UNICAST_HOPS             = 0x4\n\tIPV6_USE_MIN_MTU              = 0x2c\n\tIPV6_V6ONLY                   = 0x25\n\tIPV6_VERSION                  = 0x60000000\n\tIP_ADDRFORM                   = 0x16\n\tIP_ADD_MEMBERSHIP             = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP      = 0x3c\n\tIP_BLOCK_SOURCE               = 0x3a\n\tIP_BROADCAST_IF               = 0x10\n\tIP_CACHE_LINE_SIZE            = 0x80\n\tIP_DEFAULT_MULTICAST_LOOP     = 0x1\n\tIP_DEFAULT_MULTICAST_TTL      = 0x1\n\tIP_DF                         = 0x4000\n\tIP_DHCPMODE                   = 0x11\n\tIP_DONTFRAG                   = 0x19\n\tIP_DROP_MEMBERSHIP            = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP     = 0x3d\n\tIP_FINDPMTU                   = 0x1a\n\tIP_HDRINCL                    = 0x2\n\tIP_INC_MEMBERSHIPS            = 0x14\n\tIP_INIT_MEMBERSHIP            = 0x14\n\tIP_MAXPACKET                  = 0xffff\n\tIP_MF                         = 0x2000\n\tIP_MSS                        = 0x240\n\tIP_MULTICAST_HOPS             = 0xa\n\tIP_MULTICAST_IF               = 0x9\n\tIP_MULTICAST_LOOP             = 0xb\n\tIP_MULTICAST_TTL              = 0xa\n\tIP_OPT                        = 0x1b\n\tIP_OPTIONS                    = 0x1\n\tIP_PMTUAGE                    = 0x1b\n\tIP_RECVDSTADDR                = 0x7\n\tIP_RECVIF                     = 0x14\n\tIP_RECVIFINFO                 = 0xf\n\tIP_RECVINTERFACE              = 0x20\n\tIP_RECVMACHDR                 = 0xe\n\tIP_RECVOPTS                   = 0x5\n\tIP_RECVRETOPTS                = 0x6\n\tIP_RECVTTL                    = 0x22\n\tIP_RETOPTS                    = 0x8\n\tIP_SOURCE_FILTER              = 0x48\n\tIP_TOS                        = 0x3\n\tIP_TTL                        = 0x4\n\tIP_UNBLOCK_SOURCE             = 0x3b\n\tIP_UNICAST_HOPS               = 0x4\n\tISIG                          = 0x1\n\tISTRIP                        = 0x20\n\tIUCLC                         = 0x800\n\tIXANY                         = 0x1000\n\tIXOFF                         = 0x400\n\tIXON                          = 0x200\n\tI_FLUSH                       = 0x20005305\n\tLNOFLSH                       = 0x8000\n\tLOCK_EX                       = 0x2\n\tLOCK_NB                       = 0x4\n\tLOCK_SH                       = 0x1\n\tLOCK_UN                       = 0x8\n\tMADV_DONTNEED                 = 0x4\n\tMADV_NORMAL                   = 0x0\n\tMADV_RANDOM                   = 0x1\n\tMADV_SEQUENTIAL               = 0x2\n\tMADV_SPACEAVAIL               = 0x5\n\tMADV_WILLNEED                 = 0x3\n\tMAP_ANON                      = 0x10\n\tMAP_ANONYMOUS                 = 0x10\n\tMAP_FILE                      = 0x0\n\tMAP_FIXED                     = 0x100\n\tMAP_PRIVATE                   = 0x2\n\tMAP_SHARED                    = 0x1\n\tMAP_TYPE                      = 0xf0\n\tMAP_VARIABLE                  = 0x0\n\tMCAST_BLOCK_SOURCE            = 0x40\n\tMCAST_EXCLUDE                 = 0x2\n\tMCAST_INCLUDE                 = 0x1\n\tMCAST_JOIN_GROUP              = 0x3e\n\tMCAST_JOIN_SOURCE_GROUP       = 0x42\n\tMCAST_LEAVE_GROUP             = 0x3f\n\tMCAST_LEAVE_SOURCE_GROUP      = 0x43\n\tMCAST_SOURCE_FILTER           = 0x49\n\tMCAST_UNBLOCK_SOURCE          = 0x41\n\tMCL_CURRENT                   = 0x100\n\tMCL_FUTURE                    = 0x200\n\tMSG_ANY                       = 0x4\n\tMSG_ARGEXT                    = 0x400\n\tMSG_BAND                      = 0x2\n\tMSG_COMPAT                    = 0x8000\n\tMSG_CTRUNC                    = 0x20\n\tMSG_DONTROUTE                 = 0x4\n\tMSG_EOR                       = 0x8\n\tMSG_HIPRI                     = 0x1\n\tMSG_MAXIOVLEN                 = 0x10\n\tMSG_MPEG2                     = 0x80\n\tMSG_NONBLOCK                  = 0x4000\n\tMSG_NOSIGNAL                  = 0x100\n\tMSG_OOB                       = 0x1\n\tMSG_PEEK                      = 0x2\n\tMSG_TRUNC                     = 0x10\n\tMSG_WAITALL                   = 0x40\n\tMSG_WAITFORONE                = 0x200\n\tMS_ASYNC                      = 0x10\n\tMS_EINTR                      = 0x80\n\tMS_INVALIDATE                 = 0x40\n\tMS_PER_SEC                    = 0x3e8\n\tMS_SYNC                       = 0x20\n\tNFDBITS                       = 0x20\n\tNL0                           = 0x0\n\tNL1                           = 0x4000\n\tNL2                           = 0x8000\n\tNL3                           = 0xc000\n\tNLDLY                         = 0x4000\n\tNOFLSH                        = 0x80\n\tNOFLUSH                       = 0x80000000\n\tOCRNL                         = 0x8\n\tOFDEL                         = 0x80\n\tOFILL                         = 0x40\n\tOLCUC                         = 0x2\n\tONLCR                         = 0x4\n\tONLRET                        = 0x20\n\tONOCR                         = 0x10\n\tONOEOT                        = 0x80000\n\tOPOST                         = 0x1\n\tOXTABS                        = 0x40000\n\tO_ACCMODE                     = 0x23\n\tO_APPEND                      = 0x8\n\tO_CIO                         = 0x80\n\tO_CIOR                        = 0x800000000\n\tO_CLOEXEC                     = 0x800000\n\tO_CREAT                       = 0x100\n\tO_DEFER                       = 0x2000\n\tO_DELAY                       = 0x4000\n\tO_DIRECT                      = 0x8000000\n\tO_DIRECTORY                   = 0x80000\n\tO_DSYNC                       = 0x400000\n\tO_EFSOFF                      = 0x400000000\n\tO_EFSON                       = 0x200000000\n\tO_EXCL                        = 0x400\n\tO_EXEC                        = 0x20\n\tO_LARGEFILE                   = 0x4000000\n\tO_NDELAY                      = 0x8000\n\tO_NOCACHE                     = 0x100000\n\tO_NOCTTY                      = 0x800\n\tO_NOFOLLOW                    = 0x1000000\n\tO_NONBLOCK                    = 0x4\n\tO_NONE                        = 0x3\n\tO_NSHARE                      = 0x10000\n\tO_RAW                         = 0x100000000\n\tO_RDONLY                      = 0x0\n\tO_RDWR                        = 0x2\n\tO_RSHARE                      = 0x1000\n\tO_RSYNC                       = 0x200000\n\tO_SEARCH                      = 0x20\n\tO_SNAPSHOT                    = 0x40\n\tO_SYNC                        = 0x10\n\tO_TRUNC                       = 0x200\n\tO_TTY_INIT                    = 0x0\n\tO_WRONLY                      = 0x1\n\tPARENB                        = 0x100\n\tPAREXT                        = 0x100000\n\tPARMRK                        = 0x8\n\tPARODD                        = 0x200\n\tPENDIN                        = 0x20000000\n\tPRIO_PGRP                     = 0x1\n\tPRIO_PROCESS                  = 0x0\n\tPRIO_USER                     = 0x2\n\tPROT_EXEC                     = 0x4\n\tPROT_NONE                     = 0x0\n\tPROT_READ                     = 0x1\n\tPROT_WRITE                    = 0x2\n\tPR_64BIT                      = 0x20\n\tPR_ADDR                       = 0x2\n\tPR_ARGEXT                     = 0x400\n\tPR_ATOMIC                     = 0x1\n\tPR_CONNREQUIRED               = 0x4\n\tPR_FASTHZ                     = 0x5\n\tPR_INP                        = 0x40\n\tPR_INTRLEVEL                  = 0x8000\n\tPR_MLS                        = 0x100\n\tPR_MLS_1_LABEL                = 0x200\n\tPR_NOEOR                      = 0x4000\n\tPR_RIGHTS                     = 0x10\n\tPR_SLOWHZ                     = 0x2\n\tPR_WANTRCVD                   = 0x8\n\tRLIMIT_AS                     = 0x6\n\tRLIMIT_CORE                   = 0x4\n\tRLIMIT_CPU                    = 0x0\n\tRLIMIT_DATA                   = 0x2\n\tRLIMIT_FSIZE                  = 0x1\n\tRLIMIT_NOFILE                 = 0x7\n\tRLIMIT_NPROC                  = 0x9\n\tRLIMIT_RSS                    = 0x5\n\tRLIMIT_STACK                  = 0x3\n\tRLIM_INFINITY                 = 0x7fffffff\n\tRTAX_AUTHOR                   = 0x6\n\tRTAX_BRD                      = 0x7\n\tRTAX_DST                      = 0x0\n\tRTAX_GATEWAY                  = 0x1\n\tRTAX_GENMASK                  = 0x3\n\tRTAX_IFA                      = 0x5\n\tRTAX_IFP                      = 0x4\n\tRTAX_MAX                      = 0x8\n\tRTAX_NETMASK                  = 0x2\n\tRTA_AUTHOR                    = 0x40\n\tRTA_BRD                       = 0x80\n\tRTA_DOWNSTREAM                = 0x100\n\tRTA_DST                       = 0x1\n\tRTA_GATEWAY                   = 0x2\n\tRTA_GENMASK                   = 0x8\n\tRTA_IFA                       = 0x20\n\tRTA_IFP                       = 0x10\n\tRTA_NETMASK                   = 0x4\n\tRTC_IA64                      = 0x3\n\tRTC_POWER                     = 0x1\n\tRTC_POWER_PC                  = 0x2\n\tRTF_ACTIVE_DGD                = 0x1000000\n\tRTF_BCE                       = 0x80000\n\tRTF_BLACKHOLE                 = 0x1000\n\tRTF_BROADCAST                 = 0x400000\n\tRTF_BUL                       = 0x2000\n\tRTF_CLONE                     = 0x10000\n\tRTF_CLONED                    = 0x20000\n\tRTF_CLONING                   = 0x100\n\tRTF_DONE                      = 0x40\n\tRTF_DYNAMIC                   = 0x10\n\tRTF_FREE_IN_PROG              = 0x4000000\n\tRTF_GATEWAY                   = 0x2\n\tRTF_HOST                      = 0x4\n\tRTF_LLINFO                    = 0x400\n\tRTF_LOCAL                     = 0x200000\n\tRTF_MASK                      = 0x80\n\tRTF_MODIFIED                  = 0x20\n\tRTF_MULTICAST                 = 0x800000\n\tRTF_PERMANENT6                = 0x8000000\n\tRTF_PINNED                    = 0x100000\n\tRTF_PROTO1                    = 0x8000\n\tRTF_PROTO2                    = 0x4000\n\tRTF_PROTO3                    = 0x40000\n\tRTF_REJECT                    = 0x8\n\tRTF_SMALLMTU                  = 0x40000\n\tRTF_STATIC                    = 0x800\n\tRTF_STOPSRCH                  = 0x2000000\n\tRTF_UNREACHABLE               = 0x10000000\n\tRTF_UP                        = 0x1\n\tRTF_XRESOLVE                  = 0x200\n\tRTM_ADD                       = 0x1\n\tRTM_CHANGE                    = 0x3\n\tRTM_DELADDR                   = 0xd\n\tRTM_DELETE                    = 0x2\n\tRTM_EXPIRE                    = 0xf\n\tRTM_GET                       = 0x4\n\tRTM_GETNEXT                   = 0x11\n\tRTM_IFINFO                    = 0xe\n\tRTM_LOCK                      = 0x8\n\tRTM_LOSING                    = 0x5\n\tRTM_MISS                      = 0x7\n\tRTM_NEWADDR                   = 0xc\n\tRTM_OLDADD                    = 0x9\n\tRTM_OLDDEL                    = 0xa\n\tRTM_REDIRECT                  = 0x6\n\tRTM_RESOLVE                   = 0xb\n\tRTM_RTLOST                    = 0x10\n\tRTM_RTTUNIT                   = 0xf4240\n\tRTM_SAMEADDR                  = 0x12\n\tRTM_SET                       = 0x13\n\tRTM_VERSION                   = 0x2\n\tRTM_VERSION_GR                = 0x4\n\tRTM_VERSION_GR_COMPAT         = 0x3\n\tRTM_VERSION_POLICY            = 0x5\n\tRTM_VERSION_POLICY_EXT        = 0x6\n\tRTM_VERSION_POLICY_PRFN       = 0x7\n\tRTV_EXPIRE                    = 0x4\n\tRTV_HOPCOUNT                  = 0x2\n\tRTV_MTU                       = 0x1\n\tRTV_RPIPE                     = 0x8\n\tRTV_RTT                       = 0x40\n\tRTV_RTTVAR                    = 0x80\n\tRTV_SPIPE                     = 0x10\n\tRTV_SSTHRESH                  = 0x20\n\tRUSAGE_CHILDREN               = -0x1\n\tRUSAGE_SELF                   = 0x0\n\tRUSAGE_THREAD                 = 0x1\n\tSCM_RIGHTS                    = 0x1\n\tSHUT_RD                       = 0x0\n\tSHUT_RDWR                     = 0x2\n\tSHUT_WR                       = 0x1\n\tSIGMAX64                      = 0xff\n\tSIGQUEUE_MAX                  = 0x20\n\tSIOCADDIFVIPA                 = 0x20006942\n\tSIOCADDMTU                    = -0x7ffb9690\n\tSIOCADDMULTI                  = -0x7fdf96cf\n\tSIOCADDNETID                  = -0x7fd796a9\n\tSIOCADDRT                     = -0x7fcf8df6\n\tSIOCAIFADDR                   = -0x7fbf96e6\n\tSIOCATMARK                    = 0x40047307\n\tSIOCDARP                      = -0x7fb396e0\n\tSIOCDELIFVIPA                 = 0x20006943\n\tSIOCDELMTU                    = -0x7ffb968f\n\tSIOCDELMULTI                  = -0x7fdf96ce\n\tSIOCDELPMTU                   = -0x7fd78ff6\n\tSIOCDELRT                     = -0x7fcf8df5\n\tSIOCDIFADDR                   = -0x7fd796e7\n\tSIOCDNETOPT                   = -0x3ffe9680\n\tSIOCDX25XLATE                 = -0x7fd7969b\n\tSIOCFIFADDR                   = -0x7fdf966d\n\tSIOCGARP                      = -0x3fb396da\n\tSIOCGETMTUS                   = 0x2000696f\n\tSIOCGETSGCNT                  = -0x3feb8acc\n\tSIOCGETVIFCNT                 = -0x3feb8acd\n\tSIOCGHIWAT                    = 0x40047301\n\tSIOCGIFADDR                   = -0x3fd796df\n\tSIOCGIFADDRS                  = 0x2000698c\n\tSIOCGIFBAUDRATE               = -0x3fdf9669\n\tSIOCGIFBRDADDR                = -0x3fd796dd\n\tSIOCGIFCONF                   = -0x3ff796bb\n\tSIOCGIFCONFGLOB               = -0x3ff79670\n\tSIOCGIFDSTADDR                = -0x3fd796de\n\tSIOCGIFFLAGS                  = -0x3fd796ef\n\tSIOCGIFGIDLIST                = 0x20006968\n\tSIOCGIFHWADDR                 = -0x3fab966b\n\tSIOCGIFMETRIC                 = -0x3fd796e9\n\tSIOCGIFMTU                    = -0x3fd796aa\n\tSIOCGIFNETMASK                = -0x3fd796db\n\tSIOCGIFOPTIONS                = -0x3fd796d6\n\tSIOCGISNO                     = -0x3fd79695\n\tSIOCGLOADF                    = -0x3ffb967e\n\tSIOCGLOWAT                    = 0x40047303\n\tSIOCGNETOPT                   = -0x3ffe96a5\n\tSIOCGNETOPT1                  = -0x3fdf967f\n\tSIOCGNMTUS                    = 0x2000696e\n\tSIOCGPGRP                     = 0x40047309\n\tSIOCGSIZIFCONF                = 0x4004696a\n\tSIOCGSRCFILTER                = -0x3fe796cb\n\tSIOCGTUNEPHASE                = -0x3ffb9676\n\tSIOCGX25XLATE                 = -0x3fd7969c\n\tSIOCIFATTACH                  = -0x7fdf9699\n\tSIOCIFDETACH                  = -0x7fdf969a\n\tSIOCIFGETPKEY                 = -0x7fdf969b\n\tSIOCIF_ATM_DARP               = -0x7fdf9683\n\tSIOCIF_ATM_DUMPARP            = -0x7fdf9685\n\tSIOCIF_ATM_GARP               = -0x7fdf9682\n\tSIOCIF_ATM_IDLE               = -0x7fdf9686\n\tSIOCIF_ATM_SARP               = -0x7fdf9681\n\tSIOCIF_ATM_SNMPARP            = -0x7fdf9687\n\tSIOCIF_ATM_SVC                = -0x7fdf9684\n\tSIOCIF_ATM_UBR                = -0x7fdf9688\n\tSIOCIF_DEVHEALTH              = -0x7ffb966c\n\tSIOCIF_IB_ARP_INCOMP          = -0x7fdf9677\n\tSIOCIF_IB_ARP_TIMER           = -0x7fdf9678\n\tSIOCIF_IB_CLEAR_PINFO         = -0x3fdf966f\n\tSIOCIF_IB_DEL_ARP             = -0x7fdf967f\n\tSIOCIF_IB_DEL_PINFO           = -0x3fdf9670\n\tSIOCIF_IB_DUMP_ARP            = -0x7fdf9680\n\tSIOCIF_IB_GET_ARP             = -0x7fdf967e\n\tSIOCIF_IB_GET_INFO            = -0x3f879675\n\tSIOCIF_IB_GET_STATS           = -0x3f879672\n\tSIOCIF_IB_NOTIFY_ADDR_REM     = -0x3f87966a\n\tSIOCIF_IB_RESET_STATS         = -0x3f879671\n\tSIOCIF_IB_RESIZE_CQ           = -0x7fdf9679\n\tSIOCIF_IB_SET_ARP             = -0x7fdf967d\n\tSIOCIF_IB_SET_PKEY            = -0x7fdf967c\n\tSIOCIF_IB_SET_PORT            = -0x7fdf967b\n\tSIOCIF_IB_SET_QKEY            = -0x7fdf9676\n\tSIOCIF_IB_SET_QSIZE           = -0x7fdf967a\n\tSIOCLISTIFVIPA                = 0x20006944\n\tSIOCSARP                      = -0x7fb396e2\n\tSIOCSHIWAT                    = 0x80047300\n\tSIOCSIFADDR                   = -0x7fd796f4\n\tSIOCSIFADDRORI                = -0x7fdb9673\n\tSIOCSIFBRDADDR                = -0x7fd796ed\n\tSIOCSIFDSTADDR                = -0x7fd796f2\n\tSIOCSIFFLAGS                  = -0x7fd796f0\n\tSIOCSIFGIDLIST                = 0x20006969\n\tSIOCSIFMETRIC                 = -0x7fd796e8\n\tSIOCSIFMTU                    = -0x7fd796a8\n\tSIOCSIFNETDUMP                = -0x7fd796e4\n\tSIOCSIFNETMASK                = -0x7fd796ea\n\tSIOCSIFOPTIONS                = -0x7fd796d7\n\tSIOCSIFSUBCHAN                = -0x7fd796e5\n\tSIOCSISNO                     = -0x7fd79694\n\tSIOCSLOADF                    = -0x3ffb967d\n\tSIOCSLOWAT                    = 0x80047302\n\tSIOCSNETOPT                   = -0x7ffe96a6\n\tSIOCSPGRP                     = 0x80047308\n\tSIOCSX25XLATE                 = -0x7fd7969d\n\tSOCK_CONN_DGRAM               = 0x6\n\tSOCK_DGRAM                    = 0x2\n\tSOCK_RAW                      = 0x3\n\tSOCK_RDM                      = 0x4\n\tSOCK_SEQPACKET                = 0x5\n\tSOCK_STREAM                   = 0x1\n\tSOL_SOCKET                    = 0xffff\n\tSOMAXCONN                     = 0x400\n\tSO_ACCEPTCONN                 = 0x2\n\tSO_AUDIT                      = 0x8000\n\tSO_BROADCAST                  = 0x20\n\tSO_CKSUMRECV                  = 0x800\n\tSO_DEBUG                      = 0x1\n\tSO_DONTROUTE                  = 0x10\n\tSO_ERROR                      = 0x1007\n\tSO_KEEPALIVE                  = 0x8\n\tSO_KERNACCEPT                 = 0x2000\n\tSO_LINGER                     = 0x80\n\tSO_NOMULTIPATH                = 0x4000\n\tSO_NOREUSEADDR                = 0x1000\n\tSO_OOBINLINE                  = 0x100\n\tSO_PEERID                     = 0x1009\n\tSO_RCVBUF                     = 0x1002\n\tSO_RCVLOWAT                   = 0x1004\n\tSO_RCVTIMEO                   = 0x1006\n\tSO_REUSEADDR                  = 0x4\n\tSO_REUSEPORT                  = 0x200\n\tSO_SNDBUF                     = 0x1001\n\tSO_SNDLOWAT                   = 0x1003\n\tSO_SNDTIMEO                   = 0x1005\n\tSO_TIMESTAMPNS                = 0x100a\n\tSO_TYPE                       = 0x1008\n\tSO_USELOOPBACK                = 0x40\n\tSO_USE_IFBUFS                 = 0x400\n\tS_BANDURG                     = 0x400\n\tS_EMODFMT                     = 0x3c000000\n\tS_ENFMT                       = 0x400\n\tS_ERROR                       = 0x100\n\tS_HANGUP                      = 0x200\n\tS_HIPRI                       = 0x2\n\tS_ICRYPTO                     = 0x80000\n\tS_IEXEC                       = 0x40\n\tS_IFBLK                       = 0x6000\n\tS_IFCHR                       = 0x2000\n\tS_IFDIR                       = 0x4000\n\tS_IFIFO                       = 0x1000\n\tS_IFJOURNAL                   = 0x10000\n\tS_IFLNK                       = 0xa000\n\tS_IFMPX                       = 0x2200\n\tS_IFMT                        = 0xf000\n\tS_IFPDIR                      = 0x4000000\n\tS_IFPSDIR                     = 0x8000000\n\tS_IFPSSDIR                    = 0xc000000\n\tS_IFREG                       = 0x8000\n\tS_IFSOCK                      = 0xc000\n\tS_IFSYSEA                     = 0x30000000\n\tS_INPUT                       = 0x1\n\tS_IREAD                       = 0x100\n\tS_IRGRP                       = 0x20\n\tS_IROTH                       = 0x4\n\tS_IRUSR                       = 0x100\n\tS_IRWXG                       = 0x38\n\tS_IRWXO                       = 0x7\n\tS_IRWXU                       = 0x1c0\n\tS_ISGID                       = 0x400\n\tS_ISUID                       = 0x800\n\tS_ISVTX                       = 0x200\n\tS_ITCB                        = 0x1000000\n\tS_ITP                         = 0x800000\n\tS_IWGRP                       = 0x10\n\tS_IWOTH                       = 0x2\n\tS_IWRITE                      = 0x80\n\tS_IWUSR                       = 0x80\n\tS_IXACL                       = 0x2000000\n\tS_IXATTR                      = 0x40000\n\tS_IXGRP                       = 0x8\n\tS_IXINTERFACE                 = 0x100000\n\tS_IXMOD                       = 0x40000000\n\tS_IXOTH                       = 0x1\n\tS_IXUSR                       = 0x40\n\tS_MSG                         = 0x8\n\tS_OUTPUT                      = 0x4\n\tS_RDBAND                      = 0x20\n\tS_RDNORM                      = 0x10\n\tS_RESERVED1                   = 0x20000\n\tS_RESERVED2                   = 0x200000\n\tS_RESERVED3                   = 0x400000\n\tS_RESERVED4                   = 0x80000000\n\tS_RESFMT1                     = 0x10000000\n\tS_RESFMT10                    = 0x34000000\n\tS_RESFMT11                    = 0x38000000\n\tS_RESFMT12                    = 0x3c000000\n\tS_RESFMT2                     = 0x14000000\n\tS_RESFMT3                     = 0x18000000\n\tS_RESFMT4                     = 0x1c000000\n\tS_RESFMT5                     = 0x20000000\n\tS_RESFMT6                     = 0x24000000\n\tS_RESFMT7                     = 0x28000000\n\tS_RESFMT8                     = 0x2c000000\n\tS_WRBAND                      = 0x80\n\tS_WRNORM                      = 0x40\n\tTAB0                          = 0x0\n\tTAB1                          = 0x400\n\tTAB2                          = 0x800\n\tTAB3                          = 0xc00\n\tTABDLY                        = 0xc00\n\tTCFLSH                        = 0x540c\n\tTCGETA                        = 0x5405\n\tTCGETS                        = 0x5401\n\tTCIFLUSH                      = 0x0\n\tTCIOFF                        = 0x2\n\tTCIOFLUSH                     = 0x2\n\tTCION                         = 0x3\n\tTCOFLUSH                      = 0x1\n\tTCOOFF                        = 0x0\n\tTCOON                         = 0x1\n\tTCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800\n\tTCP_ACLADD                    = 0x23\n\tTCP_ACLBIND                   = 0x26\n\tTCP_ACLCLEAR                  = 0x22\n\tTCP_ACLDEL                    = 0x24\n\tTCP_ACLDENY                   = 0x8\n\tTCP_ACLFLUSH                  = 0x21\n\tTCP_ACLGID                    = 0x1\n\tTCP_ACLLS                     = 0x25\n\tTCP_ACLSUBNET                 = 0x4\n\tTCP_ACLUID                    = 0x2\n\tTCP_CWND_DF                   = 0x16\n\tTCP_CWND_IF                   = 0x15\n\tTCP_DELAY_ACK_FIN             = 0x2\n\tTCP_DELAY_ACK_SYN             = 0x1\n\tTCP_FASTNAME                  = 0x101080a\n\tTCP_KEEPCNT                   = 0x13\n\tTCP_KEEPIDLE                  = 0x11\n\tTCP_KEEPINTVL                 = 0x12\n\tTCP_LSPRIV                    = 0x29\n\tTCP_LUID                      = 0x20\n\tTCP_MAXBURST                  = 0x8\n\tTCP_MAXDF                     = 0x64\n\tTCP_MAXIF                     = 0x64\n\tTCP_MAXSEG                    = 0x2\n\tTCP_MAXWIN                    = 0xffff\n\tTCP_MAXWINDOWSCALE            = 0xe\n\tTCP_MAX_SACK                  = 0x4\n\tTCP_MSS                       = 0x5b4\n\tTCP_NODELAY                   = 0x1\n\tTCP_NODELAYACK                = 0x14\n\tTCP_NOREDUCE_CWND_EXIT_FRXMT  = 0x19\n\tTCP_NOREDUCE_CWND_IN_FRXMT    = 0x18\n\tTCP_NOTENTER_SSTART           = 0x17\n\tTCP_OPT                       = 0x19\n\tTCP_RFC1323                   = 0x4\n\tTCP_SETPRIV                   = 0x27\n\tTCP_STDURG                    = 0x10\n\tTCP_TIMESTAMP_OPTLEN          = 0xc\n\tTCP_UNSETPRIV                 = 0x28\n\tTCSAFLUSH                     = 0x2\n\tTCSBRK                        = 0x5409\n\tTCSETA                        = 0x5406\n\tTCSETAF                       = 0x5408\n\tTCSETAW                       = 0x5407\n\tTCSETS                        = 0x5402\n\tTCSETSF                       = 0x5404\n\tTCSETSW                       = 0x5403\n\tTCXONC                        = 0x540b\n\tTIMER_ABSTIME                 = 0x3e7\n\tTIMER_MAX                     = 0x20\n\tTIOC                          = 0x5400\n\tTIOCCBRK                      = 0x2000747a\n\tTIOCCDTR                      = 0x20007478\n\tTIOCCONS                      = 0x80047462\n\tTIOCEXCL                      = 0x2000740d\n\tTIOCFLUSH                     = 0x80047410\n\tTIOCGETC                      = 0x40067412\n\tTIOCGETD                      = 0x40047400\n\tTIOCGETP                      = 0x40067408\n\tTIOCGLTC                      = 0x40067474\n\tTIOCGPGRP                     = 0x40047477\n\tTIOCGSID                      = 0x40047448\n\tTIOCGSIZE                     = 0x40087468\n\tTIOCGWINSZ                    = 0x40087468\n\tTIOCHPCL                      = 0x20007402\n\tTIOCLBIC                      = 0x8004747e\n\tTIOCLBIS                      = 0x8004747f\n\tTIOCLGET                      = 0x4004747c\n\tTIOCLSET                      = 0x8004747d\n\tTIOCMBIC                      = 0x8004746b\n\tTIOCMBIS                      = 0x8004746c\n\tTIOCMGET                      = 0x4004746a\n\tTIOCMIWAIT                    = 0x80047464\n\tTIOCMODG                      = 0x40047403\n\tTIOCMODS                      = 0x80047404\n\tTIOCMSET                      = 0x8004746d\n\tTIOCM_CAR                     = 0x40\n\tTIOCM_CD                      = 0x40\n\tTIOCM_CTS                     = 0x20\n\tTIOCM_DSR                     = 0x100\n\tTIOCM_DTR                     = 0x2\n\tTIOCM_LE                      = 0x1\n\tTIOCM_RI                      = 0x80\n\tTIOCM_RNG                     = 0x80\n\tTIOCM_RTS                     = 0x4\n\tTIOCM_SR                      = 0x10\n\tTIOCM_ST                      = 0x8\n\tTIOCNOTTY                     = 0x20007471\n\tTIOCNXCL                      = 0x2000740e\n\tTIOCOUTQ                      = 0x40047473\n\tTIOCPKT                       = 0x80047470\n\tTIOCPKT_DATA                  = 0x0\n\tTIOCPKT_DOSTOP                = 0x20\n\tTIOCPKT_FLUSHREAD             = 0x1\n\tTIOCPKT_FLUSHWRITE            = 0x2\n\tTIOCPKT_NOSTOP                = 0x10\n\tTIOCPKT_START                 = 0x8\n\tTIOCPKT_STOP                  = 0x4\n\tTIOCREMOTE                    = 0x80047469\n\tTIOCSBRK                      = 0x2000747b\n\tTIOCSDTR                      = 0x20007479\n\tTIOCSETC                      = 0x80067411\n\tTIOCSETD                      = 0x80047401\n\tTIOCSETN                      = 0x8006740a\n\tTIOCSETP                      = 0x80067409\n\tTIOCSLTC                      = 0x80067475\n\tTIOCSPGRP                     = 0x80047476\n\tTIOCSSIZE                     = 0x80087467\n\tTIOCSTART                     = 0x2000746e\n\tTIOCSTI                       = 0x80017472\n\tTIOCSTOP                      = 0x2000746f\n\tTIOCSWINSZ                    = 0x80087467\n\tTIOCUCNTL                     = 0x80047466\n\tTOSTOP                        = 0x10000\n\tUTIME_NOW                     = -0x2\n\tUTIME_OMIT                    = -0x3\n\tVDISCRD                       = 0xc\n\tVDSUSP                        = 0xa\n\tVEOF                          = 0x4\n\tVEOL                          = 0x5\n\tVEOL2                         = 0x6\n\tVERASE                        = 0x2\n\tVINTR                         = 0x0\n\tVKILL                         = 0x3\n\tVLNEXT                        = 0xe\n\tVMIN                          = 0x4\n\tVQUIT                         = 0x1\n\tVREPRINT                      = 0xb\n\tVSTART                        = 0x7\n\tVSTOP                         = 0x8\n\tVSTRT                         = 0x7\n\tVSUSP                         = 0x9\n\tVT0                           = 0x0\n\tVT1                           = 0x8000\n\tVTDELAY                       = 0x2000\n\tVTDLY                         = 0x8000\n\tVTIME                         = 0x5\n\tVWERSE                        = 0xd\n\tWPARSTART                     = 0x1\n\tWPARSTOP                      = 0x2\n\tWPARTTYNAME                   = \"Global\"\n\tXCASE                         = 0x4\n\tXTABS                         = 0xc00\n\t_FDATAFLUSH                   = 0x2000000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x43)\n\tEADDRNOTAVAIL   = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x42)\n\tEAGAIN          = syscall.Errno(0xb)\n\tEALREADY        = syscall.Errno(0x38)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x78)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x75)\n\tECHILD          = syscall.Errno(0xa)\n\tECHRNG          = syscall.Errno(0x25)\n\tECLONEME        = syscall.Errno(0x52)\n\tECONNABORTED    = syscall.Errno(0x48)\n\tECONNREFUSED    = syscall.Errno(0x4f)\n\tECONNRESET      = syscall.Errno(0x49)\n\tECORRUPT        = syscall.Errno(0x59)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDESTADDREQ     = syscall.Errno(0x3a)\n\tEDESTADDRREQ    = syscall.Errno(0x3a)\n\tEDIST           = syscall.Errno(0x35)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x58)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFORMAT         = syscall.Errno(0x30)\n\tEHOSTDOWN       = syscall.Errno(0x50)\n\tEHOSTUNREACH    = syscall.Errno(0x51)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x74)\n\tEINPROGRESS     = syscall.Errno(0x37)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x4b)\n\tEISDIR          = syscall.Errno(0x15)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x55)\n\tEMEDIA          = syscall.Errno(0x6e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x3b)\n\tEMULTIHOP       = syscall.Errno(0x7d)\n\tENAMETOOLONG    = syscall.Errno(0x56)\n\tENETDOWN        = syscall.Errno(0x45)\n\tENETRESET       = syscall.Errno(0x47)\n\tENETUNREACH     = syscall.Errno(0x46)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x70)\n\tENOBUFS         = syscall.Errno(0x4a)\n\tENOCONNECT      = syscall.Errno(0x32)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x7a)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x31)\n\tENOLINK         = syscall.Errno(0x7e)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x23)\n\tENOPROTOOPT     = syscall.Errno(0x3d)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x76)\n\tENOSTR          = syscall.Errno(0x7b)\n\tENOSYS          = syscall.Errno(0x6d)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x4c)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x11)\n\tENOTREADY       = syscall.Errno(0x2e)\n\tENOTRECOVERABLE = syscall.Errno(0x5e)\n\tENOTRUST        = syscall.Errno(0x72)\n\tENOTSOCK        = syscall.Errno(0x39)\n\tENOTSUP         = syscall.Errno(0x7c)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x40)\n\tEOVERFLOW       = syscall.Errno(0x7f)\n\tEOWNERDEAD      = syscall.Errno(0x5f)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x41)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x53)\n\tEPROTO          = syscall.Errno(0x79)\n\tEPROTONOSUPPORT = syscall.Errno(0x3e)\n\tEPROTOTYPE      = syscall.Errno(0x3c)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x5d)\n\tERESTART        = syscall.Errno(0x52)\n\tEROFS           = syscall.Errno(0x1e)\n\tESAD            = syscall.Errno(0x71)\n\tESHUTDOWN       = syscall.Errno(0x4d)\n\tESOCKTNOSUPPORT = syscall.Errno(0x3f)\n\tESOFT           = syscall.Errno(0x6f)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x34)\n\tESYSERROR       = syscall.Errno(0x5a)\n\tETIME           = syscall.Errno(0x77)\n\tETIMEDOUT       = syscall.Errno(0x4e)\n\tETOOMANYREFS    = syscall.Errno(0x73)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x54)\n\tEWOULDBLOCK     = syscall.Errno(0xb)\n\tEWRPROTECT      = syscall.Errno(0x2f)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT     = syscall.Signal(0x6)\n\tSIGAIO      = syscall.Signal(0x17)\n\tSIGALRM     = syscall.Signal(0xe)\n\tSIGALRM1    = syscall.Signal(0x26)\n\tSIGBUS      = syscall.Signal(0xa)\n\tSIGCAPI     = syscall.Signal(0x31)\n\tSIGCHLD     = syscall.Signal(0x14)\n\tSIGCLD      = syscall.Signal(0x14)\n\tSIGCONT     = syscall.Signal(0x13)\n\tSIGCPUFAIL  = syscall.Signal(0x3b)\n\tSIGDANGER   = syscall.Signal(0x21)\n\tSIGEMT      = syscall.Signal(0x7)\n\tSIGFPE      = syscall.Signal(0x8)\n\tSIGGRANT    = syscall.Signal(0x3c)\n\tSIGHUP      = syscall.Signal(0x1)\n\tSIGILL      = syscall.Signal(0x4)\n\tSIGINT      = syscall.Signal(0x2)\n\tSIGIO       = syscall.Signal(0x17)\n\tSIGIOINT    = syscall.Signal(0x10)\n\tSIGIOT      = syscall.Signal(0x6)\n\tSIGKAP      = syscall.Signal(0x3c)\n\tSIGKILL     = syscall.Signal(0x9)\n\tSIGLOST     = syscall.Signal(0x6)\n\tSIGMAX      = syscall.Signal(0x3f)\n\tSIGMAX32    = syscall.Signal(0x3f)\n\tSIGMIGRATE  = syscall.Signal(0x23)\n\tSIGMSG      = syscall.Signal(0x1b)\n\tSIGPIPE     = syscall.Signal(0xd)\n\tSIGPOLL     = syscall.Signal(0x17)\n\tSIGPRE      = syscall.Signal(0x24)\n\tSIGPROF     = syscall.Signal(0x20)\n\tSIGPTY      = syscall.Signal(0x17)\n\tSIGPWR      = syscall.Signal(0x1d)\n\tSIGQUIT     = syscall.Signal(0x3)\n\tSIGRECONFIG = syscall.Signal(0x3a)\n\tSIGRETRACT  = syscall.Signal(0x3d)\n\tSIGSAK      = syscall.Signal(0x3f)\n\tSIGSEGV     = syscall.Signal(0xb)\n\tSIGSOUND    = syscall.Signal(0x3e)\n\tSIGSTOP     = syscall.Signal(0x11)\n\tSIGSYS      = syscall.Signal(0xc)\n\tSIGSYSERROR = syscall.Signal(0x30)\n\tSIGTALRM    = syscall.Signal(0x26)\n\tSIGTERM     = syscall.Signal(0xf)\n\tSIGTRAP     = syscall.Signal(0x5)\n\tSIGTSTP     = syscall.Signal(0x12)\n\tSIGTTIN     = syscall.Signal(0x15)\n\tSIGTTOU     = syscall.Signal(0x16)\n\tSIGURG      = syscall.Signal(0x10)\n\tSIGUSR1     = syscall.Signal(0x1e)\n\tSIGUSR2     = syscall.Signal(0x1f)\n\tSIGVIRT     = syscall.Signal(0x25)\n\tSIGVTALRM   = syscall.Signal(0x22)\n\tSIGWAITING  = syscall.Signal(0x27)\n\tSIGWINCH    = syscall.Signal(0x1c)\n\tSIGXCPU     = syscall.Signal(0x18)\n\tSIGXFSZ     = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"not owner\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"I/O error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"arg list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file number\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"not enough space\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"ENOTEMPTY\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"file table overflow\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"not a typewriter\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"deadlock condition if locked\"},\n\t{46, \"ENOTREADY\", \"device not ready\"},\n\t{47, \"EWRPROTECT\", \"write-protected media\"},\n\t{48, \"EFORMAT\", \"unformatted or incompatible media\"},\n\t{49, \"ENOLCK\", \"no locks available\"},\n\t{50, \"ENOCONNECT\", \"cannot Establish Connection\"},\n\t{52, \"ESTALE\", \"missing file or filesystem\"},\n\t{53, \"EDIST\", \"requests blocked by Administrator\"},\n\t{55, \"EINPROGRESS\", \"operation now in progress\"},\n\t{56, \"EALREADY\", \"operation already in progress\"},\n\t{57, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{58, \"EDESTADDREQ\", \"destination address required\"},\n\t{59, \"EMSGSIZE\", \"message too long\"},\n\t{60, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{61, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{62, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{63, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{64, \"EOPNOTSUPP\", \"operation not supported on socket\"},\n\t{65, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{66, \"EAFNOSUPPORT\", \"addr family not supported by protocol\"},\n\t{67, \"EADDRINUSE\", \"address already in use\"},\n\t{68, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{69, \"ENETDOWN\", \"network is down\"},\n\t{70, \"ENETUNREACH\", \"network is unreachable\"},\n\t{71, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{72, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{73, \"ECONNRESET\", \"connection reset by peer\"},\n\t{74, \"ENOBUFS\", \"no buffer space available\"},\n\t{75, \"EISCONN\", \"socket is already connected\"},\n\t{76, \"ENOTCONN\", \"socket is not connected\"},\n\t{77, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{78, \"ETIMEDOUT\", \"connection timed out\"},\n\t{79, \"ECONNREFUSED\", \"connection refused\"},\n\t{80, \"EHOSTDOWN\", \"host is down\"},\n\t{81, \"EHOSTUNREACH\", \"no route to host\"},\n\t{82, \"ERESTART\", \"restart the system call\"},\n\t{83, \"EPROCLIM\", \"too many processes\"},\n\t{84, \"EUSERS\", \"too many users\"},\n\t{85, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{86, \"ENAMETOOLONG\", \"file name too long\"},\n\t{88, \"EDQUOT\", \"disk quota exceeded\"},\n\t{89, \"ECORRUPT\", \"invalid file system control data detected\"},\n\t{90, \"ESYSERROR\", \"for future use \"},\n\t{93, \"EREMOTE\", \"item is not local to host\"},\n\t{94, \"ENOTRECOVERABLE\", \"state not recoverable \"},\n\t{95, \"EOWNERDEAD\", \"previous owner died \"},\n\t{109, \"ENOSYS\", \"function not implemented\"},\n\t{110, \"EMEDIA\", \"media surface error\"},\n\t{111, \"ESOFT\", \"I/O completed, but needs relocation\"},\n\t{112, \"ENOATTR\", \"no attribute found\"},\n\t{113, \"ESAD\", \"security Authentication Denied\"},\n\t{114, \"ENOTRUST\", \"not a Trusted Program\"},\n\t{115, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{116, \"EILSEQ\", \"invalid wide character\"},\n\t{117, \"ECANCELED\", \"asynchronous I/O cancelled\"},\n\t{118, \"ENOSR\", \"out of STREAMS resources\"},\n\t{119, \"ETIME\", \"system call timed out\"},\n\t{120, \"EBADMSG\", \"next message has wrong type\"},\n\t{121, \"EPROTO\", \"error in protocol\"},\n\t{122, \"ENODATA\", \"no message on stream head read q\"},\n\t{123, \"ENOSTR\", \"fd not associated with a stream\"},\n\t{124, \"ENOTSUP\", \"unsupported attribute value\"},\n\t{125, \"EMULTIHOP\", \"multihop is not allowed\"},\n\t{126, \"ENOLINK\", \"the server link has been severed\"},\n\t{127, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"IOT/Abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible/complete\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{27, \"SIGMSG\", \"input device data\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGPWR\", \"power-failure\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPROF\", \"profiling timer expired\"},\n\t{33, \"SIGDANGER\", \"paging space low\"},\n\t{34, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{35, \"SIGMIGRATE\", \"signal 35\"},\n\t{36, \"SIGPRE\", \"signal 36\"},\n\t{37, \"SIGVIRT\", \"signal 37\"},\n\t{38, \"SIGTALRM\", \"signal 38\"},\n\t{39, \"SIGWAITING\", \"signal 39\"},\n\t{48, \"SIGSYSERROR\", \"signal 48\"},\n\t{49, \"SIGCAPI\", \"signal 49\"},\n\t{58, \"SIGRECONFIG\", \"signal 58\"},\n\t{59, \"SIGCPUFAIL\", \"CPU Failure Predicted\"},\n\t{60, \"SIGKAP\", \"monitor mode granted\"},\n\t{61, \"SIGRETRACT\", \"monitor mode retracted\"},\n\t{62, \"SIGSOUND\", \"sound completed\"},\n\t{63, \"SIGSAK\", \"secure attention\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go",
    "content": "// mkerrors.sh -maix64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && aix\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -maix64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                  = 0x10\n\tAF_BYPASS                     = 0x19\n\tAF_CCITT                      = 0xa\n\tAF_CHAOS                      = 0x5\n\tAF_DATAKIT                    = 0x9\n\tAF_DECnet                     = 0xc\n\tAF_DLI                        = 0xd\n\tAF_ECMA                       = 0x8\n\tAF_HYLINK                     = 0xf\n\tAF_IMPLINK                    = 0x3\n\tAF_INET                       = 0x2\n\tAF_INET6                      = 0x18\n\tAF_INTF                       = 0x14\n\tAF_ISO                        = 0x7\n\tAF_LAT                        = 0xe\n\tAF_LINK                       = 0x12\n\tAF_LOCAL                      = 0x1\n\tAF_MAX                        = 0x1e\n\tAF_NDD                        = 0x17\n\tAF_NETWARE                    = 0x16\n\tAF_NS                         = 0x6\n\tAF_OSI                        = 0x7\n\tAF_PUP                        = 0x4\n\tAF_RIF                        = 0x15\n\tAF_ROUTE                      = 0x11\n\tAF_SNA                        = 0xb\n\tAF_UNIX                       = 0x1\n\tAF_UNSPEC                     = 0x0\n\tALTWERASE                     = 0x400000\n\tARPHRD_802_3                  = 0x6\n\tARPHRD_802_5                  = 0x6\n\tARPHRD_ETHER                  = 0x1\n\tARPHRD_FDDI                   = 0x1\n\tB0                            = 0x0\n\tB110                          = 0x3\n\tB1200                         = 0x9\n\tB134                          = 0x4\n\tB150                          = 0x5\n\tB1800                         = 0xa\n\tB19200                        = 0xe\n\tB200                          = 0x6\n\tB2400                         = 0xb\n\tB300                          = 0x7\n\tB38400                        = 0xf\n\tB4800                         = 0xc\n\tB50                           = 0x1\n\tB600                          = 0x8\n\tB75                           = 0x2\n\tB9600                         = 0xd\n\tBRKINT                        = 0x2\n\tBS0                           = 0x0\n\tBS1                           = 0x1000\n\tBSDLY                         = 0x1000\n\tCAP_AACCT                     = 0x6\n\tCAP_ARM_APPLICATION           = 0x5\n\tCAP_BYPASS_RAC_VMM            = 0x3\n\tCAP_CLEAR                     = 0x0\n\tCAP_CREDENTIALS               = 0x7\n\tCAP_EFFECTIVE                 = 0x1\n\tCAP_EWLM_AGENT                = 0x4\n\tCAP_INHERITABLE               = 0x2\n\tCAP_MAXIMUM                   = 0x7\n\tCAP_NUMA_ATTACH               = 0x2\n\tCAP_PERMITTED                 = 0x3\n\tCAP_PROPAGATE                 = 0x1\n\tCAP_PROPOGATE                 = 0x1\n\tCAP_SET                       = 0x1\n\tCBAUD                         = 0xf\n\tCFLUSH                        = 0xf\n\tCIBAUD                        = 0xf0000\n\tCLOCAL                        = 0x800\n\tCLOCK_MONOTONIC               = 0xa\n\tCLOCK_PROCESS_CPUTIME_ID      = 0xb\n\tCLOCK_REALTIME                = 0x9\n\tCLOCK_THREAD_CPUTIME_ID       = 0xc\n\tCR0                           = 0x0\n\tCR1                           = 0x100\n\tCR2                           = 0x200\n\tCR3                           = 0x300\n\tCRDLY                         = 0x300\n\tCREAD                         = 0x80\n\tCS5                           = 0x0\n\tCS6                           = 0x10\n\tCS7                           = 0x20\n\tCS8                           = 0x30\n\tCSIOCGIFCONF                  = -0x3fef96dc\n\tCSIZE                         = 0x30\n\tCSMAP_DIR                     = \"/usr/lib/nls/csmap/\"\n\tCSTART                        = '\\021'\n\tCSTOP                         = '\\023'\n\tCSTOPB                        = 0x40\n\tCSUSP                         = 0x1a\n\tECHO                          = 0x8\n\tECHOCTL                       = 0x20000\n\tECHOE                         = 0x10\n\tECHOK                         = 0x20\n\tECHOKE                        = 0x80000\n\tECHONL                        = 0x40\n\tECHOPRT                       = 0x40000\n\tECH_ICMPID                    = 0x2\n\tETHERNET_CSMACD               = 0x6\n\tEVENP                         = 0x80\n\tEXCONTINUE                    = 0x0\n\tEXDLOK                        = 0x3\n\tEXIO                          = 0x2\n\tEXPGIO                        = 0x0\n\tEXRESUME                      = 0x2\n\tEXRETURN                      = 0x1\n\tEXSIG                         = 0x4\n\tEXTA                          = 0xe\n\tEXTB                          = 0xf\n\tEXTRAP                        = 0x1\n\tEYEC_RTENTRYA                 = 0x257274656e747241\n\tEYEC_RTENTRYF                 = 0x257274656e747246\n\tE_ACC                         = 0x0\n\tFD_CLOEXEC                    = 0x1\n\tFD_SETSIZE                    = 0xfffe\n\tFF0                           = 0x0\n\tFF1                           = 0x2000\n\tFFDLY                         = 0x2000\n\tFLUSHBAND                     = 0x40\n\tFLUSHLOW                      = 0x8\n\tFLUSHO                        = 0x100000\n\tFLUSHR                        = 0x1\n\tFLUSHRW                       = 0x3\n\tFLUSHW                        = 0x2\n\tF_CLOSEM                      = 0xa\n\tF_DUP2FD                      = 0xe\n\tF_DUPFD                       = 0x0\n\tF_GETFD                       = 0x1\n\tF_GETFL                       = 0x3\n\tF_GETLK                       = 0xb\n\tF_GETLK64                     = 0xb\n\tF_GETOWN                      = 0x8\n\tF_LOCK                        = 0x1\n\tF_OK                          = 0x0\n\tF_RDLCK                       = 0x1\n\tF_SETFD                       = 0x2\n\tF_SETFL                       = 0x4\n\tF_SETLK                       = 0xc\n\tF_SETLK64                     = 0xc\n\tF_SETLKW                      = 0xd\n\tF_SETLKW64                    = 0xd\n\tF_SETOWN                      = 0x9\n\tF_TEST                        = 0x3\n\tF_TLOCK                       = 0x2\n\tF_TSTLK                       = 0xf\n\tF_ULOCK                       = 0x0\n\tF_UNLCK                       = 0x3\n\tF_WRLCK                       = 0x2\n\tHUPCL                         = 0x400\n\tIBSHIFT                       = 0x10\n\tICANON                        = 0x2\n\tICMP6_FILTER                  = 0x26\n\tICMP6_SEC_SEND_DEL            = 0x46\n\tICMP6_SEC_SEND_GET            = 0x47\n\tICMP6_SEC_SEND_SET            = 0x44\n\tICMP6_SEC_SEND_SET_CGA_ADDR   = 0x45\n\tICRNL                         = 0x100\n\tIEXTEN                        = 0x200000\n\tIFA_FIRSTALIAS                = 0x2000\n\tIFA_ROUTE                     = 0x1\n\tIFF_64BIT                     = 0x4000000\n\tIFF_ALLCAST                   = 0x20000\n\tIFF_ALLMULTI                  = 0x200\n\tIFF_BPF                       = 0x8000000\n\tIFF_BRIDGE                    = 0x40000\n\tIFF_BROADCAST                 = 0x2\n\tIFF_CANTCHANGE                = 0x80c52\n\tIFF_CHECKSUM_OFFLOAD          = 0x10000000\n\tIFF_D1                        = 0x8000\n\tIFF_D2                        = 0x4000\n\tIFF_D3                        = 0x2000\n\tIFF_D4                        = 0x1000\n\tIFF_DEBUG                     = 0x4\n\tIFF_DEVHEALTH                 = 0x4000\n\tIFF_DO_HW_LOOPBACK            = 0x10000\n\tIFF_GROUP_ROUTING             = 0x2000000\n\tIFF_IFBUFMGT                  = 0x800000\n\tIFF_LINK0                     = 0x100000\n\tIFF_LINK1                     = 0x200000\n\tIFF_LINK2                     = 0x400000\n\tIFF_LOOPBACK                  = 0x8\n\tIFF_MULTICAST                 = 0x80000\n\tIFF_NOARP                     = 0x80\n\tIFF_NOECHO                    = 0x800\n\tIFF_NOTRAILERS                = 0x20\n\tIFF_OACTIVE                   = 0x400\n\tIFF_POINTOPOINT               = 0x10\n\tIFF_PROMISC                   = 0x100\n\tIFF_PSEG                      = 0x40000000\n\tIFF_RUNNING                   = 0x40\n\tIFF_SIMPLEX                   = 0x800\n\tIFF_SNAP                      = 0x8000\n\tIFF_TCP_DISABLE_CKSUM         = 0x20000000\n\tIFF_TCP_NOCKSUM               = 0x1000000\n\tIFF_UP                        = 0x1\n\tIFF_VIPA                      = 0x80000000\n\tIFNAMSIZ                      = 0x10\n\tIFO_FLUSH                     = 0x1\n\tIFT_1822                      = 0x2\n\tIFT_AAL5                      = 0x31\n\tIFT_ARCNET                    = 0x23\n\tIFT_ARCNETPLUS                = 0x24\n\tIFT_ATM                       = 0x25\n\tIFT_CEPT                      = 0x13\n\tIFT_CLUSTER                   = 0x3e\n\tIFT_DS3                       = 0x1e\n\tIFT_EON                       = 0x19\n\tIFT_ETHER                     = 0x6\n\tIFT_FCS                       = 0x3a\n\tIFT_FDDI                      = 0xf\n\tIFT_FRELAY                    = 0x20\n\tIFT_FRELAYDCE                 = 0x2c\n\tIFT_GIFTUNNEL                 = 0x3c\n\tIFT_HDH1822                   = 0x3\n\tIFT_HF                        = 0x3d\n\tIFT_HIPPI                     = 0x2f\n\tIFT_HSSI                      = 0x2e\n\tIFT_HY                        = 0xe\n\tIFT_IB                        = 0xc7\n\tIFT_ISDNBASIC                 = 0x14\n\tIFT_ISDNPRIMARY               = 0x15\n\tIFT_ISO88022LLC               = 0x29\n\tIFT_ISO88023                  = 0x7\n\tIFT_ISO88024                  = 0x8\n\tIFT_ISO88025                  = 0x9\n\tIFT_ISO88026                  = 0xa\n\tIFT_LAPB                      = 0x10\n\tIFT_LOCALTALK                 = 0x2a\n\tIFT_LOOP                      = 0x18\n\tIFT_MIOX25                    = 0x26\n\tIFT_MODEM                     = 0x30\n\tIFT_NSIP                      = 0x1b\n\tIFT_OTHER                     = 0x1\n\tIFT_P10                       = 0xc\n\tIFT_P80                       = 0xd\n\tIFT_PARA                      = 0x22\n\tIFT_PPP                       = 0x17\n\tIFT_PROPMUX                   = 0x36\n\tIFT_PROPVIRTUAL               = 0x35\n\tIFT_PTPSERIAL                 = 0x16\n\tIFT_RS232                     = 0x21\n\tIFT_SDLC                      = 0x11\n\tIFT_SIP                       = 0x1f\n\tIFT_SLIP                      = 0x1c\n\tIFT_SMDSDXI                   = 0x2b\n\tIFT_SMDSICIP                  = 0x34\n\tIFT_SN                        = 0x38\n\tIFT_SONET                     = 0x27\n\tIFT_SONETPATH                 = 0x32\n\tIFT_SONETVT                   = 0x33\n\tIFT_SP                        = 0x39\n\tIFT_STARLAN                   = 0xb\n\tIFT_T1                        = 0x12\n\tIFT_TUNNEL                    = 0x3b\n\tIFT_ULTRA                     = 0x1d\n\tIFT_V35                       = 0x2d\n\tIFT_VIPA                      = 0x37\n\tIFT_X25                       = 0x5\n\tIFT_X25DDN                    = 0x4\n\tIFT_X25PLE                    = 0x28\n\tIFT_XETHER                    = 0x1a\n\tIGNBRK                        = 0x1\n\tIGNCR                         = 0x80\n\tIGNPAR                        = 0x4\n\tIMAXBEL                       = 0x10000\n\tINLCR                         = 0x40\n\tINPCK                         = 0x10\n\tIN_CLASSA_HOST                = 0xffffff\n\tIN_CLASSA_MAX                 = 0x80\n\tIN_CLASSA_NET                 = 0xff000000\n\tIN_CLASSA_NSHIFT              = 0x18\n\tIN_CLASSB_HOST                = 0xffff\n\tIN_CLASSB_MAX                 = 0x10000\n\tIN_CLASSB_NET                 = 0xffff0000\n\tIN_CLASSB_NSHIFT              = 0x10\n\tIN_CLASSC_HOST                = 0xff\n\tIN_CLASSC_NET                 = 0xffffff00\n\tIN_CLASSC_NSHIFT              = 0x8\n\tIN_CLASSD_HOST                = 0xfffffff\n\tIN_CLASSD_NET                 = 0xf0000000\n\tIN_CLASSD_NSHIFT              = 0x1c\n\tIN_LOOPBACKNET                = 0x7f\n\tIN_USE                        = 0x1\n\tIPPROTO_AH                    = 0x33\n\tIPPROTO_BIP                   = 0x53\n\tIPPROTO_DSTOPTS               = 0x3c\n\tIPPROTO_EGP                   = 0x8\n\tIPPROTO_EON                   = 0x50\n\tIPPROTO_ESP                   = 0x32\n\tIPPROTO_FRAGMENT              = 0x2c\n\tIPPROTO_GGP                   = 0x3\n\tIPPROTO_GIF                   = 0x8c\n\tIPPROTO_GRE                   = 0x2f\n\tIPPROTO_HOPOPTS               = 0x0\n\tIPPROTO_ICMP                  = 0x1\n\tIPPROTO_ICMPV6                = 0x3a\n\tIPPROTO_IDP                   = 0x16\n\tIPPROTO_IGMP                  = 0x2\n\tIPPROTO_IP                    = 0x0\n\tIPPROTO_IPIP                  = 0x4\n\tIPPROTO_IPV6                  = 0x29\n\tIPPROTO_LOCAL                 = 0x3f\n\tIPPROTO_MAX                   = 0x100\n\tIPPROTO_MH                    = 0x87\n\tIPPROTO_NONE                  = 0x3b\n\tIPPROTO_PUP                   = 0xc\n\tIPPROTO_QOS                   = 0x2d\n\tIPPROTO_RAW                   = 0xff\n\tIPPROTO_ROUTING               = 0x2b\n\tIPPROTO_RSVP                  = 0x2e\n\tIPPROTO_SCTP                  = 0x84\n\tIPPROTO_TCP                   = 0x6\n\tIPPROTO_TP                    = 0x1d\n\tIPPROTO_UDP                   = 0x11\n\tIPV6_ADDRFORM                 = 0x16\n\tIPV6_ADDR_PREFERENCES         = 0x4a\n\tIPV6_ADD_MEMBERSHIP           = 0xc\n\tIPV6_AIXRAWSOCKET             = 0x39\n\tIPV6_CHECKSUM                 = 0x27\n\tIPV6_DONTFRAG                 = 0x2d\n\tIPV6_DROP_MEMBERSHIP          = 0xd\n\tIPV6_DSTOPTS                  = 0x36\n\tIPV6_FLOWINFO_FLOWLABEL       = 0xffffff\n\tIPV6_FLOWINFO_PRIFLOW         = 0xfffffff\n\tIPV6_FLOWINFO_PRIORITY        = 0xf000000\n\tIPV6_FLOWINFO_SRFLAG          = 0x10000000\n\tIPV6_FLOWINFO_VERSION         = 0xf0000000\n\tIPV6_HOPLIMIT                 = 0x28\n\tIPV6_HOPOPTS                  = 0x34\n\tIPV6_JOIN_GROUP               = 0xc\n\tIPV6_LEAVE_GROUP              = 0xd\n\tIPV6_MIPDSTOPTS               = 0x36\n\tIPV6_MULTICAST_HOPS           = 0xa\n\tIPV6_MULTICAST_IF             = 0x9\n\tIPV6_MULTICAST_LOOP           = 0xb\n\tIPV6_NEXTHOP                  = 0x30\n\tIPV6_NOPROBE                  = 0x1c\n\tIPV6_PATHMTU                  = 0x2e\n\tIPV6_PKTINFO                  = 0x21\n\tIPV6_PKTOPTIONS               = 0x24\n\tIPV6_PRIORITY_10              = 0xa000000\n\tIPV6_PRIORITY_11              = 0xb000000\n\tIPV6_PRIORITY_12              = 0xc000000\n\tIPV6_PRIORITY_13              = 0xd000000\n\tIPV6_PRIORITY_14              = 0xe000000\n\tIPV6_PRIORITY_15              = 0xf000000\n\tIPV6_PRIORITY_8               = 0x8000000\n\tIPV6_PRIORITY_9               = 0x9000000\n\tIPV6_PRIORITY_BULK            = 0x4000000\n\tIPV6_PRIORITY_CONTROL         = 0x7000000\n\tIPV6_PRIORITY_FILLER          = 0x1000000\n\tIPV6_PRIORITY_INTERACTIVE     = 0x6000000\n\tIPV6_PRIORITY_RESERVED1       = 0x3000000\n\tIPV6_PRIORITY_RESERVED2       = 0x5000000\n\tIPV6_PRIORITY_UNATTENDED      = 0x2000000\n\tIPV6_PRIORITY_UNCHARACTERIZED = 0x0\n\tIPV6_RECVDSTOPTS              = 0x38\n\tIPV6_RECVHOPLIMIT             = 0x29\n\tIPV6_RECVHOPOPTS              = 0x35\n\tIPV6_RECVHOPS                 = 0x22\n\tIPV6_RECVIF                   = 0x1e\n\tIPV6_RECVPATHMTU              = 0x2f\n\tIPV6_RECVPKTINFO              = 0x23\n\tIPV6_RECVRTHDR                = 0x33\n\tIPV6_RECVSRCRT                = 0x1d\n\tIPV6_RECVTCLASS               = 0x2a\n\tIPV6_RTHDR                    = 0x32\n\tIPV6_RTHDRDSTOPTS             = 0x37\n\tIPV6_RTHDR_TYPE_0             = 0x0\n\tIPV6_RTHDR_TYPE_2             = 0x2\n\tIPV6_SENDIF                   = 0x1f\n\tIPV6_SRFLAG_LOOSE             = 0x0\n\tIPV6_SRFLAG_STRICT            = 0x10000000\n\tIPV6_TCLASS                   = 0x2b\n\tIPV6_TOKEN_LENGTH             = 0x40\n\tIPV6_UNICAST_HOPS             = 0x4\n\tIPV6_USE_MIN_MTU              = 0x2c\n\tIPV6_V6ONLY                   = 0x25\n\tIPV6_VERSION                  = 0x60000000\n\tIP_ADDRFORM                   = 0x16\n\tIP_ADD_MEMBERSHIP             = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP      = 0x3c\n\tIP_BLOCK_SOURCE               = 0x3a\n\tIP_BROADCAST_IF               = 0x10\n\tIP_CACHE_LINE_SIZE            = 0x80\n\tIP_DEFAULT_MULTICAST_LOOP     = 0x1\n\tIP_DEFAULT_MULTICAST_TTL      = 0x1\n\tIP_DF                         = 0x4000\n\tIP_DHCPMODE                   = 0x11\n\tIP_DONTFRAG                   = 0x19\n\tIP_DROP_MEMBERSHIP            = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP     = 0x3d\n\tIP_FINDPMTU                   = 0x1a\n\tIP_HDRINCL                    = 0x2\n\tIP_INC_MEMBERSHIPS            = 0x14\n\tIP_INIT_MEMBERSHIP            = 0x14\n\tIP_MAXPACKET                  = 0xffff\n\tIP_MF                         = 0x2000\n\tIP_MSS                        = 0x240\n\tIP_MULTICAST_HOPS             = 0xa\n\tIP_MULTICAST_IF               = 0x9\n\tIP_MULTICAST_LOOP             = 0xb\n\tIP_MULTICAST_TTL              = 0xa\n\tIP_OPT                        = 0x1b\n\tIP_OPTIONS                    = 0x1\n\tIP_PMTUAGE                    = 0x1b\n\tIP_RECVDSTADDR                = 0x7\n\tIP_RECVIF                     = 0x14\n\tIP_RECVIFINFO                 = 0xf\n\tIP_RECVINTERFACE              = 0x20\n\tIP_RECVMACHDR                 = 0xe\n\tIP_RECVOPTS                   = 0x5\n\tIP_RECVRETOPTS                = 0x6\n\tIP_RECVTTL                    = 0x22\n\tIP_RETOPTS                    = 0x8\n\tIP_SOURCE_FILTER              = 0x48\n\tIP_TOS                        = 0x3\n\tIP_TTL                        = 0x4\n\tIP_UNBLOCK_SOURCE             = 0x3b\n\tIP_UNICAST_HOPS               = 0x4\n\tISIG                          = 0x1\n\tISTRIP                        = 0x20\n\tIUCLC                         = 0x800\n\tIXANY                         = 0x1000\n\tIXOFF                         = 0x400\n\tIXON                          = 0x200\n\tI_FLUSH                       = 0x20005305\n\tLNOFLSH                       = 0x8000\n\tLOCK_EX                       = 0x2\n\tLOCK_NB                       = 0x4\n\tLOCK_SH                       = 0x1\n\tLOCK_UN                       = 0x8\n\tMADV_DONTNEED                 = 0x4\n\tMADV_NORMAL                   = 0x0\n\tMADV_RANDOM                   = 0x1\n\tMADV_SEQUENTIAL               = 0x2\n\tMADV_SPACEAVAIL               = 0x5\n\tMADV_WILLNEED                 = 0x3\n\tMAP_ANON                      = 0x10\n\tMAP_ANONYMOUS                 = 0x10\n\tMAP_FILE                      = 0x0\n\tMAP_FIXED                     = 0x100\n\tMAP_PRIVATE                   = 0x2\n\tMAP_SHARED                    = 0x1\n\tMAP_TYPE                      = 0xf0\n\tMAP_VARIABLE                  = 0x0\n\tMCAST_BLOCK_SOURCE            = 0x40\n\tMCAST_EXCLUDE                 = 0x2\n\tMCAST_INCLUDE                 = 0x1\n\tMCAST_JOIN_GROUP              = 0x3e\n\tMCAST_JOIN_SOURCE_GROUP       = 0x42\n\tMCAST_LEAVE_GROUP             = 0x3f\n\tMCAST_LEAVE_SOURCE_GROUP      = 0x43\n\tMCAST_SOURCE_FILTER           = 0x49\n\tMCAST_UNBLOCK_SOURCE          = 0x41\n\tMCL_CURRENT                   = 0x100\n\tMCL_FUTURE                    = 0x200\n\tMSG_ANY                       = 0x4\n\tMSG_ARGEXT                    = 0x400\n\tMSG_BAND                      = 0x2\n\tMSG_COMPAT                    = 0x8000\n\tMSG_CTRUNC                    = 0x20\n\tMSG_DONTROUTE                 = 0x4\n\tMSG_EOR                       = 0x8\n\tMSG_HIPRI                     = 0x1\n\tMSG_MAXIOVLEN                 = 0x10\n\tMSG_MPEG2                     = 0x80\n\tMSG_NONBLOCK                  = 0x4000\n\tMSG_NOSIGNAL                  = 0x100\n\tMSG_OOB                       = 0x1\n\tMSG_PEEK                      = 0x2\n\tMSG_TRUNC                     = 0x10\n\tMSG_WAITALL                   = 0x40\n\tMSG_WAITFORONE                = 0x200\n\tMS_ASYNC                      = 0x10\n\tMS_EINTR                      = 0x80\n\tMS_INVALIDATE                 = 0x40\n\tMS_PER_SEC                    = 0x3e8\n\tMS_SYNC                       = 0x20\n\tNFDBITS                       = 0x40\n\tNL0                           = 0x0\n\tNL1                           = 0x4000\n\tNL2                           = 0x8000\n\tNL3                           = 0xc000\n\tNLDLY                         = 0x4000\n\tNOFLSH                        = 0x80\n\tNOFLUSH                       = 0x80000000\n\tOCRNL                         = 0x8\n\tOFDEL                         = 0x80\n\tOFILL                         = 0x40\n\tOLCUC                         = 0x2\n\tONLCR                         = 0x4\n\tONLRET                        = 0x20\n\tONOCR                         = 0x10\n\tONOEOT                        = 0x80000\n\tOPOST                         = 0x1\n\tOXTABS                        = 0x40000\n\tO_ACCMODE                     = 0x23\n\tO_APPEND                      = 0x8\n\tO_CIO                         = 0x80\n\tO_CIOR                        = 0x800000000\n\tO_CLOEXEC                     = 0x800000\n\tO_CREAT                       = 0x100\n\tO_DEFER                       = 0x2000\n\tO_DELAY                       = 0x4000\n\tO_DIRECT                      = 0x8000000\n\tO_DIRECTORY                   = 0x80000\n\tO_DSYNC                       = 0x400000\n\tO_EFSOFF                      = 0x400000000\n\tO_EFSON                       = 0x200000000\n\tO_EXCL                        = 0x400\n\tO_EXEC                        = 0x20\n\tO_LARGEFILE                   = 0x4000000\n\tO_NDELAY                      = 0x8000\n\tO_NOCACHE                     = 0x100000\n\tO_NOCTTY                      = 0x800\n\tO_NOFOLLOW                    = 0x1000000\n\tO_NONBLOCK                    = 0x4\n\tO_NONE                        = 0x3\n\tO_NSHARE                      = 0x10000\n\tO_RAW                         = 0x100000000\n\tO_RDONLY                      = 0x0\n\tO_RDWR                        = 0x2\n\tO_RSHARE                      = 0x1000\n\tO_RSYNC                       = 0x200000\n\tO_SEARCH                      = 0x20\n\tO_SNAPSHOT                    = 0x40\n\tO_SYNC                        = 0x10\n\tO_TRUNC                       = 0x200\n\tO_TTY_INIT                    = 0x0\n\tO_WRONLY                      = 0x1\n\tPARENB                        = 0x100\n\tPAREXT                        = 0x100000\n\tPARMRK                        = 0x8\n\tPARODD                        = 0x200\n\tPENDIN                        = 0x20000000\n\tPRIO_PGRP                     = 0x1\n\tPRIO_PROCESS                  = 0x0\n\tPRIO_USER                     = 0x2\n\tPROT_EXEC                     = 0x4\n\tPROT_NONE                     = 0x0\n\tPROT_READ                     = 0x1\n\tPROT_WRITE                    = 0x2\n\tPR_64BIT                      = 0x20\n\tPR_ADDR                       = 0x2\n\tPR_ARGEXT                     = 0x400\n\tPR_ATOMIC                     = 0x1\n\tPR_CONNREQUIRED               = 0x4\n\tPR_FASTHZ                     = 0x5\n\tPR_INP                        = 0x40\n\tPR_INTRLEVEL                  = 0x8000\n\tPR_MLS                        = 0x100\n\tPR_MLS_1_LABEL                = 0x200\n\tPR_NOEOR                      = 0x4000\n\tPR_RIGHTS                     = 0x10\n\tPR_SLOWHZ                     = 0x2\n\tPR_WANTRCVD                   = 0x8\n\tRLIMIT_AS                     = 0x6\n\tRLIMIT_CORE                   = 0x4\n\tRLIMIT_CPU                    = 0x0\n\tRLIMIT_DATA                   = 0x2\n\tRLIMIT_FSIZE                  = 0x1\n\tRLIMIT_NOFILE                 = 0x7\n\tRLIMIT_NPROC                  = 0x9\n\tRLIMIT_RSS                    = 0x5\n\tRLIMIT_STACK                  = 0x3\n\tRLIM_INFINITY                 = 0x7fffffffffffffff\n\tRTAX_AUTHOR                   = 0x6\n\tRTAX_BRD                      = 0x7\n\tRTAX_DST                      = 0x0\n\tRTAX_GATEWAY                  = 0x1\n\tRTAX_GENMASK                  = 0x3\n\tRTAX_IFA                      = 0x5\n\tRTAX_IFP                      = 0x4\n\tRTAX_MAX                      = 0x8\n\tRTAX_NETMASK                  = 0x2\n\tRTA_AUTHOR                    = 0x40\n\tRTA_BRD                       = 0x80\n\tRTA_DOWNSTREAM                = 0x100\n\tRTA_DST                       = 0x1\n\tRTA_GATEWAY                   = 0x2\n\tRTA_GENMASK                   = 0x8\n\tRTA_IFA                       = 0x20\n\tRTA_IFP                       = 0x10\n\tRTA_NETMASK                   = 0x4\n\tRTC_IA64                      = 0x3\n\tRTC_POWER                     = 0x1\n\tRTC_POWER_PC                  = 0x2\n\tRTF_ACTIVE_DGD                = 0x1000000\n\tRTF_BCE                       = 0x80000\n\tRTF_BLACKHOLE                 = 0x1000\n\tRTF_BROADCAST                 = 0x400000\n\tRTF_BUL                       = 0x2000\n\tRTF_CLONE                     = 0x10000\n\tRTF_CLONED                    = 0x20000\n\tRTF_CLONING                   = 0x100\n\tRTF_DONE                      = 0x40\n\tRTF_DYNAMIC                   = 0x10\n\tRTF_FREE_IN_PROG              = 0x4000000\n\tRTF_GATEWAY                   = 0x2\n\tRTF_HOST                      = 0x4\n\tRTF_LLINFO                    = 0x400\n\tRTF_LOCAL                     = 0x200000\n\tRTF_MASK                      = 0x80\n\tRTF_MODIFIED                  = 0x20\n\tRTF_MULTICAST                 = 0x800000\n\tRTF_PERMANENT6                = 0x8000000\n\tRTF_PINNED                    = 0x100000\n\tRTF_PROTO1                    = 0x8000\n\tRTF_PROTO2                    = 0x4000\n\tRTF_PROTO3                    = 0x40000\n\tRTF_REJECT                    = 0x8\n\tRTF_SMALLMTU                  = 0x40000\n\tRTF_STATIC                    = 0x800\n\tRTF_STOPSRCH                  = 0x2000000\n\tRTF_UNREACHABLE               = 0x10000000\n\tRTF_UP                        = 0x1\n\tRTF_XRESOLVE                  = 0x200\n\tRTM_ADD                       = 0x1\n\tRTM_CHANGE                    = 0x3\n\tRTM_DELADDR                   = 0xd\n\tRTM_DELETE                    = 0x2\n\tRTM_EXPIRE                    = 0xf\n\tRTM_GET                       = 0x4\n\tRTM_GETNEXT                   = 0x11\n\tRTM_IFINFO                    = 0xe\n\tRTM_LOCK                      = 0x8\n\tRTM_LOSING                    = 0x5\n\tRTM_MISS                      = 0x7\n\tRTM_NEWADDR                   = 0xc\n\tRTM_OLDADD                    = 0x9\n\tRTM_OLDDEL                    = 0xa\n\tRTM_REDIRECT                  = 0x6\n\tRTM_RESOLVE                   = 0xb\n\tRTM_RTLOST                    = 0x10\n\tRTM_RTTUNIT                   = 0xf4240\n\tRTM_SAMEADDR                  = 0x12\n\tRTM_SET                       = 0x13\n\tRTM_VERSION                   = 0x2\n\tRTM_VERSION_GR                = 0x4\n\tRTM_VERSION_GR_COMPAT         = 0x3\n\tRTM_VERSION_POLICY            = 0x5\n\tRTM_VERSION_POLICY_EXT        = 0x6\n\tRTM_VERSION_POLICY_PRFN       = 0x7\n\tRTV_EXPIRE                    = 0x4\n\tRTV_HOPCOUNT                  = 0x2\n\tRTV_MTU                       = 0x1\n\tRTV_RPIPE                     = 0x8\n\tRTV_RTT                       = 0x40\n\tRTV_RTTVAR                    = 0x80\n\tRTV_SPIPE                     = 0x10\n\tRTV_SSTHRESH                  = 0x20\n\tRUSAGE_CHILDREN               = -0x1\n\tRUSAGE_SELF                   = 0x0\n\tRUSAGE_THREAD                 = 0x1\n\tSCM_RIGHTS                    = 0x1\n\tSHUT_RD                       = 0x0\n\tSHUT_RDWR                     = 0x2\n\tSHUT_WR                       = 0x1\n\tSIGMAX64                      = 0xff\n\tSIGQUEUE_MAX                  = 0x20\n\tSIOCADDIFVIPA                 = 0x20006942\n\tSIOCADDMTU                    = -0x7ffb9690\n\tSIOCADDMULTI                  = -0x7fdf96cf\n\tSIOCADDNETID                  = -0x7fd796a9\n\tSIOCADDRT                     = -0x7fc78df6\n\tSIOCAIFADDR                   = -0x7fbf96e6\n\tSIOCATMARK                    = 0x40047307\n\tSIOCDARP                      = -0x7fb396e0\n\tSIOCDELIFVIPA                 = 0x20006943\n\tSIOCDELMTU                    = -0x7ffb968f\n\tSIOCDELMULTI                  = -0x7fdf96ce\n\tSIOCDELPMTU                   = -0x7fd78ff6\n\tSIOCDELRT                     = -0x7fc78df5\n\tSIOCDIFADDR                   = -0x7fd796e7\n\tSIOCDNETOPT                   = -0x3ffe9680\n\tSIOCDX25XLATE                 = -0x7fd7969b\n\tSIOCFIFADDR                   = -0x7fdf966d\n\tSIOCGARP                      = -0x3fb396da\n\tSIOCGETMTUS                   = 0x2000696f\n\tSIOCGETSGCNT                  = -0x3feb8acc\n\tSIOCGETVIFCNT                 = -0x3feb8acd\n\tSIOCGHIWAT                    = 0x40047301\n\tSIOCGIFADDR                   = -0x3fd796df\n\tSIOCGIFADDRS                  = 0x2000698c\n\tSIOCGIFBAUDRATE               = -0x3fdf9669\n\tSIOCGIFBRDADDR                = -0x3fd796dd\n\tSIOCGIFCONF                   = -0x3fef96bb\n\tSIOCGIFCONFGLOB               = -0x3fef9670\n\tSIOCGIFDSTADDR                = -0x3fd796de\n\tSIOCGIFFLAGS                  = -0x3fd796ef\n\tSIOCGIFGIDLIST                = 0x20006968\n\tSIOCGIFHWADDR                 = -0x3fab966b\n\tSIOCGIFMETRIC                 = -0x3fd796e9\n\tSIOCGIFMTU                    = -0x3fd796aa\n\tSIOCGIFNETMASK                = -0x3fd796db\n\tSIOCGIFOPTIONS                = -0x3fd796d6\n\tSIOCGISNO                     = -0x3fd79695\n\tSIOCGLOADF                    = -0x3ffb967e\n\tSIOCGLOWAT                    = 0x40047303\n\tSIOCGNETOPT                   = -0x3ffe96a5\n\tSIOCGNETOPT1                  = -0x3fdf967f\n\tSIOCGNMTUS                    = 0x2000696e\n\tSIOCGPGRP                     = 0x40047309\n\tSIOCGSIZIFCONF                = 0x4004696a\n\tSIOCGSRCFILTER                = -0x3fe796cb\n\tSIOCGTUNEPHASE                = -0x3ffb9676\n\tSIOCGX25XLATE                 = -0x3fd7969c\n\tSIOCIFATTACH                  = -0x7fdf9699\n\tSIOCIFDETACH                  = -0x7fdf969a\n\tSIOCIFGETPKEY                 = -0x7fdf969b\n\tSIOCIF_ATM_DARP               = -0x7fdf9683\n\tSIOCIF_ATM_DUMPARP            = -0x7fdf9685\n\tSIOCIF_ATM_GARP               = -0x7fdf9682\n\tSIOCIF_ATM_IDLE               = -0x7fdf9686\n\tSIOCIF_ATM_SARP               = -0x7fdf9681\n\tSIOCIF_ATM_SNMPARP            = -0x7fdf9687\n\tSIOCIF_ATM_SVC                = -0x7fdf9684\n\tSIOCIF_ATM_UBR                = -0x7fdf9688\n\tSIOCIF_DEVHEALTH              = -0x7ffb966c\n\tSIOCIF_IB_ARP_INCOMP          = -0x7fdf9677\n\tSIOCIF_IB_ARP_TIMER           = -0x7fdf9678\n\tSIOCIF_IB_CLEAR_PINFO         = -0x3fdf966f\n\tSIOCIF_IB_DEL_ARP             = -0x7fdf967f\n\tSIOCIF_IB_DEL_PINFO           = -0x3fdf9670\n\tSIOCIF_IB_DUMP_ARP            = -0x7fdf9680\n\tSIOCIF_IB_GET_ARP             = -0x7fdf967e\n\tSIOCIF_IB_GET_INFO            = -0x3f879675\n\tSIOCIF_IB_GET_STATS           = -0x3f879672\n\tSIOCIF_IB_NOTIFY_ADDR_REM     = -0x3f87966a\n\tSIOCIF_IB_RESET_STATS         = -0x3f879671\n\tSIOCIF_IB_RESIZE_CQ           = -0x7fdf9679\n\tSIOCIF_IB_SET_ARP             = -0x7fdf967d\n\tSIOCIF_IB_SET_PKEY            = -0x7fdf967c\n\tSIOCIF_IB_SET_PORT            = -0x7fdf967b\n\tSIOCIF_IB_SET_QKEY            = -0x7fdf9676\n\tSIOCIF_IB_SET_QSIZE           = -0x7fdf967a\n\tSIOCLISTIFVIPA                = 0x20006944\n\tSIOCSARP                      = -0x7fb396e2\n\tSIOCSHIWAT                    = 0xffffffff80047300\n\tSIOCSIFADDR                   = -0x7fd796f4\n\tSIOCSIFADDRORI                = -0x7fdb9673\n\tSIOCSIFBRDADDR                = -0x7fd796ed\n\tSIOCSIFDSTADDR                = -0x7fd796f2\n\tSIOCSIFFLAGS                  = -0x7fd796f0\n\tSIOCSIFGIDLIST                = 0x20006969\n\tSIOCSIFMETRIC                 = -0x7fd796e8\n\tSIOCSIFMTU                    = -0x7fd796a8\n\tSIOCSIFNETDUMP                = -0x7fd796e4\n\tSIOCSIFNETMASK                = -0x7fd796ea\n\tSIOCSIFOPTIONS                = -0x7fd796d7\n\tSIOCSIFSUBCHAN                = -0x7fd796e5\n\tSIOCSISNO                     = -0x7fd79694\n\tSIOCSLOADF                    = -0x3ffb967d\n\tSIOCSLOWAT                    = 0xffffffff80047302\n\tSIOCSNETOPT                   = -0x7ffe96a6\n\tSIOCSPGRP                     = 0xffffffff80047308\n\tSIOCSX25XLATE                 = -0x7fd7969d\n\tSOCK_CONN_DGRAM               = 0x6\n\tSOCK_DGRAM                    = 0x2\n\tSOCK_RAW                      = 0x3\n\tSOCK_RDM                      = 0x4\n\tSOCK_SEQPACKET                = 0x5\n\tSOCK_STREAM                   = 0x1\n\tSOL_SOCKET                    = 0xffff\n\tSOMAXCONN                     = 0x400\n\tSO_ACCEPTCONN                 = 0x2\n\tSO_AUDIT                      = 0x8000\n\tSO_BROADCAST                  = 0x20\n\tSO_CKSUMRECV                  = 0x800\n\tSO_DEBUG                      = 0x1\n\tSO_DONTROUTE                  = 0x10\n\tSO_ERROR                      = 0x1007\n\tSO_KEEPALIVE                  = 0x8\n\tSO_KERNACCEPT                 = 0x2000\n\tSO_LINGER                     = 0x80\n\tSO_NOMULTIPATH                = 0x4000\n\tSO_NOREUSEADDR                = 0x1000\n\tSO_OOBINLINE                  = 0x100\n\tSO_PEERID                     = 0x1009\n\tSO_RCVBUF                     = 0x1002\n\tSO_RCVLOWAT                   = 0x1004\n\tSO_RCVTIMEO                   = 0x1006\n\tSO_REUSEADDR                  = 0x4\n\tSO_REUSEPORT                  = 0x200\n\tSO_SNDBUF                     = 0x1001\n\tSO_SNDLOWAT                   = 0x1003\n\tSO_SNDTIMEO                   = 0x1005\n\tSO_TIMESTAMPNS                = 0x100a\n\tSO_TYPE                       = 0x1008\n\tSO_USELOOPBACK                = 0x40\n\tSO_USE_IFBUFS                 = 0x400\n\tS_BANDURG                     = 0x400\n\tS_EMODFMT                     = 0x3c000000\n\tS_ENFMT                       = 0x400\n\tS_ERROR                       = 0x100\n\tS_HANGUP                      = 0x200\n\tS_HIPRI                       = 0x2\n\tS_ICRYPTO                     = 0x80000\n\tS_IEXEC                       = 0x40\n\tS_IFBLK                       = 0x6000\n\tS_IFCHR                       = 0x2000\n\tS_IFDIR                       = 0x4000\n\tS_IFIFO                       = 0x1000\n\tS_IFJOURNAL                   = 0x10000\n\tS_IFLNK                       = 0xa000\n\tS_IFMPX                       = 0x2200\n\tS_IFMT                        = 0xf000\n\tS_IFPDIR                      = 0x4000000\n\tS_IFPSDIR                     = 0x8000000\n\tS_IFPSSDIR                    = 0xc000000\n\tS_IFREG                       = 0x8000\n\tS_IFSOCK                      = 0xc000\n\tS_IFSYSEA                     = 0x30000000\n\tS_INPUT                       = 0x1\n\tS_IREAD                       = 0x100\n\tS_IRGRP                       = 0x20\n\tS_IROTH                       = 0x4\n\tS_IRUSR                       = 0x100\n\tS_IRWXG                       = 0x38\n\tS_IRWXO                       = 0x7\n\tS_IRWXU                       = 0x1c0\n\tS_ISGID                       = 0x400\n\tS_ISUID                       = 0x800\n\tS_ISVTX                       = 0x200\n\tS_ITCB                        = 0x1000000\n\tS_ITP                         = 0x800000\n\tS_IWGRP                       = 0x10\n\tS_IWOTH                       = 0x2\n\tS_IWRITE                      = 0x80\n\tS_IWUSR                       = 0x80\n\tS_IXACL                       = 0x2000000\n\tS_IXATTR                      = 0x40000\n\tS_IXGRP                       = 0x8\n\tS_IXINTERFACE                 = 0x100000\n\tS_IXMOD                       = 0x40000000\n\tS_IXOTH                       = 0x1\n\tS_IXUSR                       = 0x40\n\tS_MSG                         = 0x8\n\tS_OUTPUT                      = 0x4\n\tS_RDBAND                      = 0x20\n\tS_RDNORM                      = 0x10\n\tS_RESERVED1                   = 0x20000\n\tS_RESERVED2                   = 0x200000\n\tS_RESERVED3                   = 0x400000\n\tS_RESERVED4                   = 0x80000000\n\tS_RESFMT1                     = 0x10000000\n\tS_RESFMT10                    = 0x34000000\n\tS_RESFMT11                    = 0x38000000\n\tS_RESFMT12                    = 0x3c000000\n\tS_RESFMT2                     = 0x14000000\n\tS_RESFMT3                     = 0x18000000\n\tS_RESFMT4                     = 0x1c000000\n\tS_RESFMT5                     = 0x20000000\n\tS_RESFMT6                     = 0x24000000\n\tS_RESFMT7                     = 0x28000000\n\tS_RESFMT8                     = 0x2c000000\n\tS_WRBAND                      = 0x80\n\tS_WRNORM                      = 0x40\n\tTAB0                          = 0x0\n\tTAB1                          = 0x400\n\tTAB2                          = 0x800\n\tTAB3                          = 0xc00\n\tTABDLY                        = 0xc00\n\tTCFLSH                        = 0x540c\n\tTCGETA                        = 0x5405\n\tTCGETS                        = 0x5401\n\tTCIFLUSH                      = 0x0\n\tTCIOFF                        = 0x2\n\tTCIOFLUSH                     = 0x2\n\tTCION                         = 0x3\n\tTCOFLUSH                      = 0x1\n\tTCOOFF                        = 0x0\n\tTCOON                         = 0x1\n\tTCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800\n\tTCP_ACLADD                    = 0x23\n\tTCP_ACLBIND                   = 0x26\n\tTCP_ACLCLEAR                  = 0x22\n\tTCP_ACLDEL                    = 0x24\n\tTCP_ACLDENY                   = 0x8\n\tTCP_ACLFLUSH                  = 0x21\n\tTCP_ACLGID                    = 0x1\n\tTCP_ACLLS                     = 0x25\n\tTCP_ACLSUBNET                 = 0x4\n\tTCP_ACLUID                    = 0x2\n\tTCP_CWND_DF                   = 0x16\n\tTCP_CWND_IF                   = 0x15\n\tTCP_DELAY_ACK_FIN             = 0x2\n\tTCP_DELAY_ACK_SYN             = 0x1\n\tTCP_FASTNAME                  = 0x101080a\n\tTCP_KEEPCNT                   = 0x13\n\tTCP_KEEPIDLE                  = 0x11\n\tTCP_KEEPINTVL                 = 0x12\n\tTCP_LSPRIV                    = 0x29\n\tTCP_LUID                      = 0x20\n\tTCP_MAXBURST                  = 0x8\n\tTCP_MAXDF                     = 0x64\n\tTCP_MAXIF                     = 0x64\n\tTCP_MAXSEG                    = 0x2\n\tTCP_MAXWIN                    = 0xffff\n\tTCP_MAXWINDOWSCALE            = 0xe\n\tTCP_MAX_SACK                  = 0x4\n\tTCP_MSS                       = 0x5b4\n\tTCP_NODELAY                   = 0x1\n\tTCP_NODELAYACK                = 0x14\n\tTCP_NOREDUCE_CWND_EXIT_FRXMT  = 0x19\n\tTCP_NOREDUCE_CWND_IN_FRXMT    = 0x18\n\tTCP_NOTENTER_SSTART           = 0x17\n\tTCP_OPT                       = 0x19\n\tTCP_RFC1323                   = 0x4\n\tTCP_SETPRIV                   = 0x27\n\tTCP_STDURG                    = 0x10\n\tTCP_TIMESTAMP_OPTLEN          = 0xc\n\tTCP_UNSETPRIV                 = 0x28\n\tTCSAFLUSH                     = 0x2\n\tTCSBRK                        = 0x5409\n\tTCSETA                        = 0x5406\n\tTCSETAF                       = 0x5408\n\tTCSETAW                       = 0x5407\n\tTCSETS                        = 0x5402\n\tTCSETSF                       = 0x5404\n\tTCSETSW                       = 0x5403\n\tTCXONC                        = 0x540b\n\tTIMER_ABSTIME                 = 0x3e7\n\tTIMER_MAX                     = 0x20\n\tTIOC                          = 0x5400\n\tTIOCCBRK                      = 0x2000747a\n\tTIOCCDTR                      = 0x20007478\n\tTIOCCONS                      = 0xffffffff80047462\n\tTIOCEXCL                      = 0x2000740d\n\tTIOCFLUSH                     = 0xffffffff80047410\n\tTIOCGETC                      = 0x40067412\n\tTIOCGETD                      = 0x40047400\n\tTIOCGETP                      = 0x40067408\n\tTIOCGLTC                      = 0x40067474\n\tTIOCGPGRP                     = 0x40047477\n\tTIOCGSID                      = 0x40047448\n\tTIOCGSIZE                     = 0x40087468\n\tTIOCGWINSZ                    = 0x40087468\n\tTIOCHPCL                      = 0x20007402\n\tTIOCLBIC                      = 0xffffffff8004747e\n\tTIOCLBIS                      = 0xffffffff8004747f\n\tTIOCLGET                      = 0x4004747c\n\tTIOCLSET                      = 0xffffffff8004747d\n\tTIOCMBIC                      = 0xffffffff8004746b\n\tTIOCMBIS                      = 0xffffffff8004746c\n\tTIOCMGET                      = 0x4004746a\n\tTIOCMIWAIT                    = 0xffffffff80047464\n\tTIOCMODG                      = 0x40047403\n\tTIOCMODS                      = 0xffffffff80047404\n\tTIOCMSET                      = 0xffffffff8004746d\n\tTIOCM_CAR                     = 0x40\n\tTIOCM_CD                      = 0x40\n\tTIOCM_CTS                     = 0x20\n\tTIOCM_DSR                     = 0x100\n\tTIOCM_DTR                     = 0x2\n\tTIOCM_LE                      = 0x1\n\tTIOCM_RI                      = 0x80\n\tTIOCM_RNG                     = 0x80\n\tTIOCM_RTS                     = 0x4\n\tTIOCM_SR                      = 0x10\n\tTIOCM_ST                      = 0x8\n\tTIOCNOTTY                     = 0x20007471\n\tTIOCNXCL                      = 0x2000740e\n\tTIOCOUTQ                      = 0x40047473\n\tTIOCPKT                       = 0xffffffff80047470\n\tTIOCPKT_DATA                  = 0x0\n\tTIOCPKT_DOSTOP                = 0x20\n\tTIOCPKT_FLUSHREAD             = 0x1\n\tTIOCPKT_FLUSHWRITE            = 0x2\n\tTIOCPKT_NOSTOP                = 0x10\n\tTIOCPKT_START                 = 0x8\n\tTIOCPKT_STOP                  = 0x4\n\tTIOCREMOTE                    = 0xffffffff80047469\n\tTIOCSBRK                      = 0x2000747b\n\tTIOCSDTR                      = 0x20007479\n\tTIOCSETC                      = 0xffffffff80067411\n\tTIOCSETD                      = 0xffffffff80047401\n\tTIOCSETN                      = 0xffffffff8006740a\n\tTIOCSETP                      = 0xffffffff80067409\n\tTIOCSLTC                      = 0xffffffff80067475\n\tTIOCSPGRP                     = 0xffffffff80047476\n\tTIOCSSIZE                     = 0xffffffff80087467\n\tTIOCSTART                     = 0x2000746e\n\tTIOCSTI                       = 0xffffffff80017472\n\tTIOCSTOP                      = 0x2000746f\n\tTIOCSWINSZ                    = 0xffffffff80087467\n\tTIOCUCNTL                     = 0xffffffff80047466\n\tTOSTOP                        = 0x10000\n\tUTIME_NOW                     = -0x2\n\tUTIME_OMIT                    = -0x3\n\tVDISCRD                       = 0xc\n\tVDSUSP                        = 0xa\n\tVEOF                          = 0x4\n\tVEOL                          = 0x5\n\tVEOL2                         = 0x6\n\tVERASE                        = 0x2\n\tVINTR                         = 0x0\n\tVKILL                         = 0x3\n\tVLNEXT                        = 0xe\n\tVMIN                          = 0x4\n\tVQUIT                         = 0x1\n\tVREPRINT                      = 0xb\n\tVSTART                        = 0x7\n\tVSTOP                         = 0x8\n\tVSTRT                         = 0x7\n\tVSUSP                         = 0x9\n\tVT0                           = 0x0\n\tVT1                           = 0x8000\n\tVTDELAY                       = 0x2000\n\tVTDLY                         = 0x8000\n\tVTIME                         = 0x5\n\tVWERSE                        = 0xd\n\tWPARSTART                     = 0x1\n\tWPARSTOP                      = 0x2\n\tWPARTTYNAME                   = \"Global\"\n\tXCASE                         = 0x4\n\tXTABS                         = 0xc00\n\t_FDATAFLUSH                   = 0x2000000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x43)\n\tEADDRNOTAVAIL   = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x42)\n\tEAGAIN          = syscall.Errno(0xb)\n\tEALREADY        = syscall.Errno(0x38)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x78)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x75)\n\tECHILD          = syscall.Errno(0xa)\n\tECHRNG          = syscall.Errno(0x25)\n\tECLONEME        = syscall.Errno(0x52)\n\tECONNABORTED    = syscall.Errno(0x48)\n\tECONNREFUSED    = syscall.Errno(0x4f)\n\tECONNRESET      = syscall.Errno(0x49)\n\tECORRUPT        = syscall.Errno(0x59)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDESTADDREQ     = syscall.Errno(0x3a)\n\tEDESTADDRREQ    = syscall.Errno(0x3a)\n\tEDIST           = syscall.Errno(0x35)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x58)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFORMAT         = syscall.Errno(0x30)\n\tEHOSTDOWN       = syscall.Errno(0x50)\n\tEHOSTUNREACH    = syscall.Errno(0x51)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x74)\n\tEINPROGRESS     = syscall.Errno(0x37)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x4b)\n\tEISDIR          = syscall.Errno(0x15)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x55)\n\tEMEDIA          = syscall.Errno(0x6e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x3b)\n\tEMULTIHOP       = syscall.Errno(0x7d)\n\tENAMETOOLONG    = syscall.Errno(0x56)\n\tENETDOWN        = syscall.Errno(0x45)\n\tENETRESET       = syscall.Errno(0x47)\n\tENETUNREACH     = syscall.Errno(0x46)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x70)\n\tENOBUFS         = syscall.Errno(0x4a)\n\tENOCONNECT      = syscall.Errno(0x32)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x7a)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x31)\n\tENOLINK         = syscall.Errno(0x7e)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x23)\n\tENOPROTOOPT     = syscall.Errno(0x3d)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x76)\n\tENOSTR          = syscall.Errno(0x7b)\n\tENOSYS          = syscall.Errno(0x6d)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x4c)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x11)\n\tENOTREADY       = syscall.Errno(0x2e)\n\tENOTRECOVERABLE = syscall.Errno(0x5e)\n\tENOTRUST        = syscall.Errno(0x72)\n\tENOTSOCK        = syscall.Errno(0x39)\n\tENOTSUP         = syscall.Errno(0x7c)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x40)\n\tEOVERFLOW       = syscall.Errno(0x7f)\n\tEOWNERDEAD      = syscall.Errno(0x5f)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x41)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x53)\n\tEPROTO          = syscall.Errno(0x79)\n\tEPROTONOSUPPORT = syscall.Errno(0x3e)\n\tEPROTOTYPE      = syscall.Errno(0x3c)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x5d)\n\tERESTART        = syscall.Errno(0x52)\n\tEROFS           = syscall.Errno(0x1e)\n\tESAD            = syscall.Errno(0x71)\n\tESHUTDOWN       = syscall.Errno(0x4d)\n\tESOCKTNOSUPPORT = syscall.Errno(0x3f)\n\tESOFT           = syscall.Errno(0x6f)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x34)\n\tESYSERROR       = syscall.Errno(0x5a)\n\tETIME           = syscall.Errno(0x77)\n\tETIMEDOUT       = syscall.Errno(0x4e)\n\tETOOMANYREFS    = syscall.Errno(0x73)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x54)\n\tEWOULDBLOCK     = syscall.Errno(0xb)\n\tEWRPROTECT      = syscall.Errno(0x2f)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT     = syscall.Signal(0x6)\n\tSIGAIO      = syscall.Signal(0x17)\n\tSIGALRM     = syscall.Signal(0xe)\n\tSIGALRM1    = syscall.Signal(0x26)\n\tSIGBUS      = syscall.Signal(0xa)\n\tSIGCAPI     = syscall.Signal(0x31)\n\tSIGCHLD     = syscall.Signal(0x14)\n\tSIGCLD      = syscall.Signal(0x14)\n\tSIGCONT     = syscall.Signal(0x13)\n\tSIGCPUFAIL  = syscall.Signal(0x3b)\n\tSIGDANGER   = syscall.Signal(0x21)\n\tSIGEMT      = syscall.Signal(0x7)\n\tSIGFPE      = syscall.Signal(0x8)\n\tSIGGRANT    = syscall.Signal(0x3c)\n\tSIGHUP      = syscall.Signal(0x1)\n\tSIGILL      = syscall.Signal(0x4)\n\tSIGINT      = syscall.Signal(0x2)\n\tSIGIO       = syscall.Signal(0x17)\n\tSIGIOINT    = syscall.Signal(0x10)\n\tSIGIOT      = syscall.Signal(0x6)\n\tSIGKAP      = syscall.Signal(0x3c)\n\tSIGKILL     = syscall.Signal(0x9)\n\tSIGLOST     = syscall.Signal(0x6)\n\tSIGMAX      = syscall.Signal(0xff)\n\tSIGMAX32    = syscall.Signal(0x3f)\n\tSIGMIGRATE  = syscall.Signal(0x23)\n\tSIGMSG      = syscall.Signal(0x1b)\n\tSIGPIPE     = syscall.Signal(0xd)\n\tSIGPOLL     = syscall.Signal(0x17)\n\tSIGPRE      = syscall.Signal(0x24)\n\tSIGPROF     = syscall.Signal(0x20)\n\tSIGPTY      = syscall.Signal(0x17)\n\tSIGPWR      = syscall.Signal(0x1d)\n\tSIGQUIT     = syscall.Signal(0x3)\n\tSIGRECONFIG = syscall.Signal(0x3a)\n\tSIGRETRACT  = syscall.Signal(0x3d)\n\tSIGSAK      = syscall.Signal(0x3f)\n\tSIGSEGV     = syscall.Signal(0xb)\n\tSIGSOUND    = syscall.Signal(0x3e)\n\tSIGSTOP     = syscall.Signal(0x11)\n\tSIGSYS      = syscall.Signal(0xc)\n\tSIGSYSERROR = syscall.Signal(0x30)\n\tSIGTALRM    = syscall.Signal(0x26)\n\tSIGTERM     = syscall.Signal(0xf)\n\tSIGTRAP     = syscall.Signal(0x5)\n\tSIGTSTP     = syscall.Signal(0x12)\n\tSIGTTIN     = syscall.Signal(0x15)\n\tSIGTTOU     = syscall.Signal(0x16)\n\tSIGURG      = syscall.Signal(0x10)\n\tSIGUSR1     = syscall.Signal(0x1e)\n\tSIGUSR2     = syscall.Signal(0x1f)\n\tSIGVIRT     = syscall.Signal(0x25)\n\tSIGVTALRM   = syscall.Signal(0x22)\n\tSIGWAITING  = syscall.Signal(0x27)\n\tSIGWINCH    = syscall.Signal(0x1c)\n\tSIGXCPU     = syscall.Signal(0x18)\n\tSIGXFSZ     = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"not owner\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"I/O error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"arg list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file number\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"not enough space\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"ENOTEMPTY\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"file table overflow\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"not a typewriter\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"deadlock condition if locked\"},\n\t{46, \"ENOTREADY\", \"device not ready\"},\n\t{47, \"EWRPROTECT\", \"write-protected media\"},\n\t{48, \"EFORMAT\", \"unformatted or incompatible media\"},\n\t{49, \"ENOLCK\", \"no locks available\"},\n\t{50, \"ENOCONNECT\", \"cannot Establish Connection\"},\n\t{52, \"ESTALE\", \"missing file or filesystem\"},\n\t{53, \"EDIST\", \"requests blocked by Administrator\"},\n\t{55, \"EINPROGRESS\", \"operation now in progress\"},\n\t{56, \"EALREADY\", \"operation already in progress\"},\n\t{57, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{58, \"EDESTADDREQ\", \"destination address required\"},\n\t{59, \"EMSGSIZE\", \"message too long\"},\n\t{60, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{61, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{62, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{63, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{64, \"EOPNOTSUPP\", \"operation not supported on socket\"},\n\t{65, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{66, \"EAFNOSUPPORT\", \"addr family not supported by protocol\"},\n\t{67, \"EADDRINUSE\", \"address already in use\"},\n\t{68, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{69, \"ENETDOWN\", \"network is down\"},\n\t{70, \"ENETUNREACH\", \"network is unreachable\"},\n\t{71, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{72, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{73, \"ECONNRESET\", \"connection reset by peer\"},\n\t{74, \"ENOBUFS\", \"no buffer space available\"},\n\t{75, \"EISCONN\", \"socket is already connected\"},\n\t{76, \"ENOTCONN\", \"socket is not connected\"},\n\t{77, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{78, \"ETIMEDOUT\", \"connection timed out\"},\n\t{79, \"ECONNREFUSED\", \"connection refused\"},\n\t{80, \"EHOSTDOWN\", \"host is down\"},\n\t{81, \"EHOSTUNREACH\", \"no route to host\"},\n\t{82, \"ERESTART\", \"restart the system call\"},\n\t{83, \"EPROCLIM\", \"too many processes\"},\n\t{84, \"EUSERS\", \"too many users\"},\n\t{85, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{86, \"ENAMETOOLONG\", \"file name too long\"},\n\t{88, \"EDQUOT\", \"disk quota exceeded\"},\n\t{89, \"ECORRUPT\", \"invalid file system control data detected\"},\n\t{90, \"ESYSERROR\", \"for future use \"},\n\t{93, \"EREMOTE\", \"item is not local to host\"},\n\t{94, \"ENOTRECOVERABLE\", \"state not recoverable \"},\n\t{95, \"EOWNERDEAD\", \"previous owner died \"},\n\t{109, \"ENOSYS\", \"function not implemented\"},\n\t{110, \"EMEDIA\", \"media surface error\"},\n\t{111, \"ESOFT\", \"I/O completed, but needs relocation\"},\n\t{112, \"ENOATTR\", \"no attribute found\"},\n\t{113, \"ESAD\", \"security Authentication Denied\"},\n\t{114, \"ENOTRUST\", \"not a Trusted Program\"},\n\t{115, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{116, \"EILSEQ\", \"invalid wide character\"},\n\t{117, \"ECANCELED\", \"asynchronous I/O cancelled\"},\n\t{118, \"ENOSR\", \"out of STREAMS resources\"},\n\t{119, \"ETIME\", \"system call timed out\"},\n\t{120, \"EBADMSG\", \"next message has wrong type\"},\n\t{121, \"EPROTO\", \"error in protocol\"},\n\t{122, \"ENODATA\", \"no message on stream head read q\"},\n\t{123, \"ENOSTR\", \"fd not associated with a stream\"},\n\t{124, \"ENOTSUP\", \"unsupported attribute value\"},\n\t{125, \"EMULTIHOP\", \"multihop is not allowed\"},\n\t{126, \"ENOLINK\", \"the server link has been severed\"},\n\t{127, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"IOT/Abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible/complete\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{27, \"SIGMSG\", \"input device data\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGPWR\", \"power-failure\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPROF\", \"profiling timer expired\"},\n\t{33, \"SIGDANGER\", \"paging space low\"},\n\t{34, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{35, \"SIGMIGRATE\", \"signal 35\"},\n\t{36, \"SIGPRE\", \"signal 36\"},\n\t{37, \"SIGVIRT\", \"signal 37\"},\n\t{38, \"SIGTALRM\", \"signal 38\"},\n\t{39, \"SIGWAITING\", \"signal 39\"},\n\t{48, \"SIGSYSERROR\", \"signal 48\"},\n\t{49, \"SIGCAPI\", \"signal 49\"},\n\t{58, \"SIGRECONFIG\", \"signal 58\"},\n\t{59, \"SIGCPUFAIL\", \"CPU Failure Predicted\"},\n\t{60, \"SIGGRANT\", \"monitor mode granted\"},\n\t{61, \"SIGRETRACT\", \"monitor mode retracted\"},\n\t{62, \"SIGSOUND\", \"sound completed\"},\n\t{63, \"SIGMAX32\", \"secure attention\"},\n\t{255, \"SIGMAX\", \"signal 255\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && darwin\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                            = 0x10\n\tAF_CCITT                                = 0xa\n\tAF_CHAOS                                = 0x5\n\tAF_CNT                                  = 0x15\n\tAF_COIP                                 = 0x14\n\tAF_DATAKIT                              = 0x9\n\tAF_DECnet                               = 0xc\n\tAF_DLI                                  = 0xd\n\tAF_E164                                 = 0x1c\n\tAF_ECMA                                 = 0x8\n\tAF_HYLINK                               = 0xf\n\tAF_IEEE80211                            = 0x25\n\tAF_IMPLINK                              = 0x3\n\tAF_INET                                 = 0x2\n\tAF_INET6                                = 0x1e\n\tAF_IPX                                  = 0x17\n\tAF_ISDN                                 = 0x1c\n\tAF_ISO                                  = 0x7\n\tAF_LAT                                  = 0xe\n\tAF_LINK                                 = 0x12\n\tAF_LOCAL                                = 0x1\n\tAF_MAX                                  = 0x29\n\tAF_NATM                                 = 0x1f\n\tAF_NDRV                                 = 0x1b\n\tAF_NETBIOS                              = 0x21\n\tAF_NS                                   = 0x6\n\tAF_OSI                                  = 0x7\n\tAF_PPP                                  = 0x22\n\tAF_PUP                                  = 0x4\n\tAF_RESERVED_36                          = 0x24\n\tAF_ROUTE                                = 0x11\n\tAF_SIP                                  = 0x18\n\tAF_SNA                                  = 0xb\n\tAF_SYSTEM                               = 0x20\n\tAF_SYS_CONTROL                          = 0x2\n\tAF_UNIX                                 = 0x1\n\tAF_UNSPEC                               = 0x0\n\tAF_UTUN                                 = 0x26\n\tAF_VSOCK                                = 0x28\n\tALTWERASE                               = 0x200\n\tATTR_BIT_MAP_COUNT                      = 0x5\n\tATTR_CMN_ACCESSMASK                     = 0x20000\n\tATTR_CMN_ACCTIME                        = 0x1000\n\tATTR_CMN_ADDEDTIME                      = 0x10000000\n\tATTR_CMN_BKUPTIME                       = 0x2000\n\tATTR_CMN_CHGTIME                        = 0x800\n\tATTR_CMN_CRTIME                         = 0x200\n\tATTR_CMN_DATA_PROTECT_FLAGS             = 0x40000000\n\tATTR_CMN_DEVID                          = 0x2\n\tATTR_CMN_DOCUMENT_ID                    = 0x100000\n\tATTR_CMN_ERROR                          = 0x20000000\n\tATTR_CMN_EXTENDED_SECURITY              = 0x400000\n\tATTR_CMN_FILEID                         = 0x2000000\n\tATTR_CMN_FLAGS                          = 0x40000\n\tATTR_CMN_FNDRINFO                       = 0x4000\n\tATTR_CMN_FSID                           = 0x4\n\tATTR_CMN_FULLPATH                       = 0x8000000\n\tATTR_CMN_GEN_COUNT                      = 0x80000\n\tATTR_CMN_GRPID                          = 0x10000\n\tATTR_CMN_GRPUUID                        = 0x1000000\n\tATTR_CMN_MODTIME                        = 0x400\n\tATTR_CMN_NAME                           = 0x1\n\tATTR_CMN_NAMEDATTRCOUNT                 = 0x80000\n\tATTR_CMN_NAMEDATTRLIST                  = 0x100000\n\tATTR_CMN_OBJID                          = 0x20\n\tATTR_CMN_OBJPERMANENTID                 = 0x40\n\tATTR_CMN_OBJTAG                         = 0x10\n\tATTR_CMN_OBJTYPE                        = 0x8\n\tATTR_CMN_OWNERID                        = 0x8000\n\tATTR_CMN_PARENTID                       = 0x4000000\n\tATTR_CMN_PAROBJID                       = 0x80\n\tATTR_CMN_RETURNED_ATTRS                 = 0x80000000\n\tATTR_CMN_SCRIPT                         = 0x100\n\tATTR_CMN_SETMASK                        = 0x51c7ff00\n\tATTR_CMN_USERACCESS                     = 0x200000\n\tATTR_CMN_UUID                           = 0x800000\n\tATTR_CMN_VALIDMASK                      = 0xffffffff\n\tATTR_CMN_VOLSETMASK                     = 0x6700\n\tATTR_FILE_ALLOCSIZE                     = 0x4\n\tATTR_FILE_CLUMPSIZE                     = 0x10\n\tATTR_FILE_DATAALLOCSIZE                 = 0x400\n\tATTR_FILE_DATAEXTENTS                   = 0x800\n\tATTR_FILE_DATALENGTH                    = 0x200\n\tATTR_FILE_DEVTYPE                       = 0x20\n\tATTR_FILE_FILETYPE                      = 0x40\n\tATTR_FILE_FORKCOUNT                     = 0x80\n\tATTR_FILE_FORKLIST                      = 0x100\n\tATTR_FILE_IOBLOCKSIZE                   = 0x8\n\tATTR_FILE_LINKCOUNT                     = 0x1\n\tATTR_FILE_RSRCALLOCSIZE                 = 0x2000\n\tATTR_FILE_RSRCEXTENTS                   = 0x4000\n\tATTR_FILE_RSRCLENGTH                    = 0x1000\n\tATTR_FILE_SETMASK                       = 0x20\n\tATTR_FILE_TOTALSIZE                     = 0x2\n\tATTR_FILE_VALIDMASK                     = 0x37ff\n\tATTR_VOL_ALLOCATIONCLUMP                = 0x40\n\tATTR_VOL_ATTRIBUTES                     = 0x40000000\n\tATTR_VOL_CAPABILITIES                   = 0x20000\n\tATTR_VOL_DIRCOUNT                       = 0x400\n\tATTR_VOL_ENCODINGSUSED                  = 0x10000\n\tATTR_VOL_FILECOUNT                      = 0x200\n\tATTR_VOL_FSTYPE                         = 0x1\n\tATTR_VOL_INFO                           = 0x80000000\n\tATTR_VOL_IOBLOCKSIZE                    = 0x80\n\tATTR_VOL_MAXOBJCOUNT                    = 0x800\n\tATTR_VOL_MINALLOCATION                  = 0x20\n\tATTR_VOL_MOUNTEDDEVICE                  = 0x8000\n\tATTR_VOL_MOUNTFLAGS                     = 0x4000\n\tATTR_VOL_MOUNTPOINT                     = 0x1000\n\tATTR_VOL_NAME                           = 0x2000\n\tATTR_VOL_OBJCOUNT                       = 0x100\n\tATTR_VOL_QUOTA_SIZE                     = 0x10000000\n\tATTR_VOL_RESERVED_SIZE                  = 0x20000000\n\tATTR_VOL_SETMASK                        = 0x80002000\n\tATTR_VOL_SIGNATURE                      = 0x2\n\tATTR_VOL_SIZE                           = 0x4\n\tATTR_VOL_SPACEAVAIL                     = 0x10\n\tATTR_VOL_SPACEFREE                      = 0x8\n\tATTR_VOL_SPACEUSED                      = 0x800000\n\tATTR_VOL_UUID                           = 0x40000\n\tATTR_VOL_VALIDMASK                      = 0xf087ffff\n\tB0                                      = 0x0\n\tB110                                    = 0x6e\n\tB115200                                 = 0x1c200\n\tB1200                                   = 0x4b0\n\tB134                                    = 0x86\n\tB14400                                  = 0x3840\n\tB150                                    = 0x96\n\tB1800                                   = 0x708\n\tB19200                                  = 0x4b00\n\tB200                                    = 0xc8\n\tB230400                                 = 0x38400\n\tB2400                                   = 0x960\n\tB28800                                  = 0x7080\n\tB300                                    = 0x12c\n\tB38400                                  = 0x9600\n\tB4800                                   = 0x12c0\n\tB50                                     = 0x32\n\tB57600                                  = 0xe100\n\tB600                                    = 0x258\n\tB7200                                   = 0x1c20\n\tB75                                     = 0x4b\n\tB76800                                  = 0x12c00\n\tB9600                                   = 0x2580\n\tBIOCFLUSH                               = 0x20004268\n\tBIOCGBLEN                               = 0x40044266\n\tBIOCGDLT                                = 0x4004426a\n\tBIOCGDLTLIST                            = 0xc00c4279\n\tBIOCGETIF                               = 0x4020426b\n\tBIOCGHDRCMPLT                           = 0x40044274\n\tBIOCGRSIG                               = 0x40044272\n\tBIOCGRTIMEOUT                           = 0x4010426e\n\tBIOCGSEESENT                            = 0x40044276\n\tBIOCGSTATS                              = 0x4008426f\n\tBIOCIMMEDIATE                           = 0x80044270\n\tBIOCPROMISC                             = 0x20004269\n\tBIOCSBLEN                               = 0xc0044266\n\tBIOCSDLT                                = 0x80044278\n\tBIOCSETF                                = 0x80104267\n\tBIOCSETFNR                              = 0x8010427e\n\tBIOCSETIF                               = 0x8020426c\n\tBIOCSHDRCMPLT                           = 0x80044275\n\tBIOCSRSIG                               = 0x80044273\n\tBIOCSRTIMEOUT                           = 0x8010426d\n\tBIOCSSEESENT                            = 0x80044277\n\tBIOCVERSION                             = 0x40044271\n\tBPF_A                                   = 0x10\n\tBPF_ABS                                 = 0x20\n\tBPF_ADD                                 = 0x0\n\tBPF_ALIGNMENT                           = 0x4\n\tBPF_ALU                                 = 0x4\n\tBPF_AND                                 = 0x50\n\tBPF_B                                   = 0x10\n\tBPF_DIV                                 = 0x30\n\tBPF_H                                   = 0x8\n\tBPF_IMM                                 = 0x0\n\tBPF_IND                                 = 0x40\n\tBPF_JA                                  = 0x0\n\tBPF_JEQ                                 = 0x10\n\tBPF_JGE                                 = 0x30\n\tBPF_JGT                                 = 0x20\n\tBPF_JMP                                 = 0x5\n\tBPF_JSET                                = 0x40\n\tBPF_K                                   = 0x0\n\tBPF_LD                                  = 0x0\n\tBPF_LDX                                 = 0x1\n\tBPF_LEN                                 = 0x80\n\tBPF_LSH                                 = 0x60\n\tBPF_MAJOR_VERSION                       = 0x1\n\tBPF_MAXBUFSIZE                          = 0x80000\n\tBPF_MAXINSNS                            = 0x200\n\tBPF_MEM                                 = 0x60\n\tBPF_MEMWORDS                            = 0x10\n\tBPF_MINBUFSIZE                          = 0x20\n\tBPF_MINOR_VERSION                       = 0x1\n\tBPF_MISC                                = 0x7\n\tBPF_MSH                                 = 0xa0\n\tBPF_MUL                                 = 0x20\n\tBPF_NEG                                 = 0x80\n\tBPF_OR                                  = 0x40\n\tBPF_RELEASE                             = 0x30bb6\n\tBPF_RET                                 = 0x6\n\tBPF_RSH                                 = 0x70\n\tBPF_ST                                  = 0x2\n\tBPF_STX                                 = 0x3\n\tBPF_SUB                                 = 0x10\n\tBPF_TAX                                 = 0x0\n\tBPF_TXA                                 = 0x80\n\tBPF_W                                   = 0x0\n\tBPF_X                                   = 0x8\n\tBRKINT                                  = 0x2\n\tBS0                                     = 0x0\n\tBS1                                     = 0x8000\n\tBSDLY                                   = 0x8000\n\tCFLUSH                                  = 0xf\n\tCLOCAL                                  = 0x8000\n\tCLOCK_MONOTONIC                         = 0x6\n\tCLOCK_MONOTONIC_RAW                     = 0x4\n\tCLOCK_MONOTONIC_RAW_APPROX              = 0x5\n\tCLOCK_PROCESS_CPUTIME_ID                = 0xc\n\tCLOCK_REALTIME                          = 0x0\n\tCLOCK_THREAD_CPUTIME_ID                 = 0x10\n\tCLOCK_UPTIME_RAW                        = 0x8\n\tCLOCK_UPTIME_RAW_APPROX                 = 0x9\n\tCLONE_NOFOLLOW                          = 0x1\n\tCLONE_NOOWNERCOPY                       = 0x2\n\tCONNECT_DATA_AUTHENTICATED              = 0x4\n\tCONNECT_DATA_IDEMPOTENT                 = 0x2\n\tCONNECT_RESUME_ON_READ_WRITE            = 0x1\n\tCR0                                     = 0x0\n\tCR1                                     = 0x1000\n\tCR2                                     = 0x2000\n\tCR3                                     = 0x3000\n\tCRDLY                                   = 0x3000\n\tCREAD                                   = 0x800\n\tCRTSCTS                                 = 0x30000\n\tCS5                                     = 0x0\n\tCS6                                     = 0x100\n\tCS7                                     = 0x200\n\tCS8                                     = 0x300\n\tCSIZE                                   = 0x300\n\tCSTART                                  = 0x11\n\tCSTATUS                                 = 0x14\n\tCSTOP                                   = 0x13\n\tCSTOPB                                  = 0x400\n\tCSUSP                                   = 0x1a\n\tCTLIOCGINFO                             = 0xc0644e03\n\tCTL_HW                                  = 0x6\n\tCTL_KERN                                = 0x1\n\tCTL_MAXNAME                             = 0xc\n\tCTL_NET                                 = 0x4\n\tDLT_A429                                = 0xb8\n\tDLT_A653_ICM                            = 0xb9\n\tDLT_AIRONET_HEADER                      = 0x78\n\tDLT_AOS                                 = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394              = 0x8a\n\tDLT_ARCNET                              = 0x7\n\tDLT_ARCNET_LINUX                        = 0x81\n\tDLT_ATM_CLIP                            = 0x13\n\tDLT_ATM_RFC1483                         = 0xb\n\tDLT_AURORA                              = 0x7e\n\tDLT_AX25                                = 0x3\n\tDLT_AX25_KISS                           = 0xca\n\tDLT_BACNET_MS_TP                        = 0xa5\n\tDLT_BLUETOOTH_HCI_H4                    = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR          = 0xc9\n\tDLT_CAN20B                              = 0xbe\n\tDLT_CAN_SOCKETCAN                       = 0xe3\n\tDLT_CHAOS                               = 0x5\n\tDLT_CHDLC                               = 0x68\n\tDLT_CISCO_IOS                           = 0x76\n\tDLT_C_HDLC                              = 0x68\n\tDLT_C_HDLC_WITH_DIR                     = 0xcd\n\tDLT_DBUS                                = 0xe7\n\tDLT_DECT                                = 0xdd\n\tDLT_DOCSIS                              = 0x8f\n\tDLT_DVB_CI                              = 0xeb\n\tDLT_ECONET                              = 0x73\n\tDLT_EN10MB                              = 0x1\n\tDLT_EN3MB                               = 0x2\n\tDLT_ENC                                 = 0x6d\n\tDLT_ERF                                 = 0xc5\n\tDLT_ERF_ETH                             = 0xaf\n\tDLT_ERF_POS                             = 0xb0\n\tDLT_FC_2                                = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS              = 0xe1\n\tDLT_FDDI                                = 0xa\n\tDLT_FLEXRAY                             = 0xd2\n\tDLT_FRELAY                              = 0x6b\n\tDLT_FRELAY_WITH_DIR                     = 0xce\n\tDLT_GCOM_SERIAL                         = 0xad\n\tDLT_GCOM_T1E1                           = 0xac\n\tDLT_GPF_F                               = 0xab\n\tDLT_GPF_T                               = 0xaa\n\tDLT_GPRS_LLC                            = 0xa9\n\tDLT_GSMTAP_ABIS                         = 0xda\n\tDLT_GSMTAP_UM                           = 0xd9\n\tDLT_HHDLC                               = 0x79\n\tDLT_IBM_SN                              = 0x92\n\tDLT_IBM_SP                              = 0x91\n\tDLT_IEEE802                             = 0x6\n\tDLT_IEEE802_11                          = 0x69\n\tDLT_IEEE802_11_RADIO                    = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS                = 0xa3\n\tDLT_IEEE802_15_4                        = 0xc3\n\tDLT_IEEE802_15_4_LINUX                  = 0xbf\n\tDLT_IEEE802_15_4_NOFCS                  = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY             = 0xd7\n\tDLT_IEEE802_16_MAC_CPS                  = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO            = 0xc1\n\tDLT_IPFILTER                            = 0x74\n\tDLT_IPMB                                = 0xc7\n\tDLT_IPMB_LINUX                          = 0xd1\n\tDLT_IPNET                               = 0xe2\n\tDLT_IPOIB                               = 0xf2\n\tDLT_IPV4                                = 0xe4\n\tDLT_IPV6                                = 0xe5\n\tDLT_IP_OVER_FC                          = 0x7a\n\tDLT_JUNIPER_ATM1                        = 0x89\n\tDLT_JUNIPER_ATM2                        = 0x87\n\tDLT_JUNIPER_ATM_CEMIC                   = 0xee\n\tDLT_JUNIPER_CHDLC                       = 0xb5\n\tDLT_JUNIPER_ES                          = 0x84\n\tDLT_JUNIPER_ETHER                       = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL                = 0xea\n\tDLT_JUNIPER_FRELAY                      = 0xb4\n\tDLT_JUNIPER_GGSN                        = 0x85\n\tDLT_JUNIPER_ISM                         = 0xc2\n\tDLT_JUNIPER_MFR                         = 0x86\n\tDLT_JUNIPER_MLFR                        = 0x83\n\tDLT_JUNIPER_MLPPP                       = 0x82\n\tDLT_JUNIPER_MONITOR                     = 0xa4\n\tDLT_JUNIPER_PIC_PEER                    = 0xae\n\tDLT_JUNIPER_PPP                         = 0xb3\n\tDLT_JUNIPER_PPPOE                       = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM                   = 0xa8\n\tDLT_JUNIPER_SERVICES                    = 0x88\n\tDLT_JUNIPER_SRX_E2E                     = 0xe9\n\tDLT_JUNIPER_ST                          = 0xc8\n\tDLT_JUNIPER_VP                          = 0xb7\n\tDLT_JUNIPER_VS                          = 0xe8\n\tDLT_LAPB_WITH_DIR                       = 0xcf\n\tDLT_LAPD                                = 0xcb\n\tDLT_LIN                                 = 0xd4\n\tDLT_LINUX_EVDEV                         = 0xd8\n\tDLT_LINUX_IRDA                          = 0x90\n\tDLT_LINUX_LAPD                          = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION             = 0xa6\n\tDLT_LINUX_SLL                           = 0x71\n\tDLT_LOOP                                = 0x6c\n\tDLT_LTALK                               = 0x72\n\tDLT_MATCHING_MAX                        = 0x10a\n\tDLT_MATCHING_MIN                        = 0x68\n\tDLT_MFR                                 = 0xb6\n\tDLT_MOST                                = 0xd3\n\tDLT_MPEG_2_TS                           = 0xf3\n\tDLT_MPLS                                = 0xdb\n\tDLT_MTP2                                = 0x8c\n\tDLT_MTP2_WITH_PHDR                      = 0x8b\n\tDLT_MTP3                                = 0x8d\n\tDLT_MUX27010                            = 0xec\n\tDLT_NETANALYZER                         = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT             = 0xf1\n\tDLT_NFC_LLCP                            = 0xf5\n\tDLT_NFLOG                               = 0xef\n\tDLT_NG40                                = 0xf4\n\tDLT_NULL                                = 0x0\n\tDLT_PCI_EXP                             = 0x7d\n\tDLT_PFLOG                               = 0x75\n\tDLT_PFSYNC                              = 0x12\n\tDLT_PPI                                 = 0xc0\n\tDLT_PPP                                 = 0x9\n\tDLT_PPP_BSDOS                           = 0x10\n\tDLT_PPP_ETHER                           = 0x33\n\tDLT_PPP_PPPD                            = 0xa6\n\tDLT_PPP_SERIAL                          = 0x32\n\tDLT_PPP_WITH_DIR                        = 0xcc\n\tDLT_PPP_WITH_DIRECTION                  = 0xa6\n\tDLT_PRISM_HEADER                        = 0x77\n\tDLT_PRONET                              = 0x4\n\tDLT_RAIF1                               = 0xc6\n\tDLT_RAW                                 = 0xc\n\tDLT_RIO                                 = 0x7c\n\tDLT_SCCP                                = 0x8e\n\tDLT_SITA                                = 0xc4\n\tDLT_SLIP                                = 0x8\n\tDLT_SLIP_BSDOS                          = 0xf\n\tDLT_STANAG_5066_D_PDU                   = 0xed\n\tDLT_SUNATM                              = 0x7b\n\tDLT_SYMANTEC_FIREWALL                   = 0x63\n\tDLT_TZSP                                = 0x80\n\tDLT_USB                                 = 0xba\n\tDLT_USB_DARWIN                          = 0x10a\n\tDLT_USB_LINUX                           = 0xbd\n\tDLT_USB_LINUX_MMAPPED                   = 0xdc\n\tDLT_USER0                               = 0x93\n\tDLT_USER1                               = 0x94\n\tDLT_USER10                              = 0x9d\n\tDLT_USER11                              = 0x9e\n\tDLT_USER12                              = 0x9f\n\tDLT_USER13                              = 0xa0\n\tDLT_USER14                              = 0xa1\n\tDLT_USER15                              = 0xa2\n\tDLT_USER2                               = 0x95\n\tDLT_USER3                               = 0x96\n\tDLT_USER4                               = 0x97\n\tDLT_USER5                               = 0x98\n\tDLT_USER6                               = 0x99\n\tDLT_USER7                               = 0x9a\n\tDLT_USER8                               = 0x9b\n\tDLT_USER9                               = 0x9c\n\tDLT_WIHART                              = 0xdf\n\tDLT_X2E_SERIAL                          = 0xd5\n\tDLT_X2E_XORAYA                          = 0xd6\n\tDT_BLK                                  = 0x6\n\tDT_CHR                                  = 0x2\n\tDT_DIR                                  = 0x4\n\tDT_FIFO                                 = 0x1\n\tDT_LNK                                  = 0xa\n\tDT_REG                                  = 0x8\n\tDT_SOCK                                 = 0xc\n\tDT_UNKNOWN                              = 0x0\n\tDT_WHT                                  = 0xe\n\tECHO                                    = 0x8\n\tECHOCTL                                 = 0x40\n\tECHOE                                   = 0x2\n\tECHOK                                   = 0x4\n\tECHOKE                                  = 0x1\n\tECHONL                                  = 0x10\n\tECHOPRT                                 = 0x20\n\tEVFILT_AIO                              = -0x3\n\tEVFILT_EXCEPT                           = -0xf\n\tEVFILT_FS                               = -0x9\n\tEVFILT_MACHPORT                         = -0x8\n\tEVFILT_PROC                             = -0x5\n\tEVFILT_READ                             = -0x1\n\tEVFILT_SIGNAL                           = -0x6\n\tEVFILT_SYSCOUNT                         = 0x11\n\tEVFILT_THREADMARKER                     = 0x11\n\tEVFILT_TIMER                            = -0x7\n\tEVFILT_USER                             = -0xa\n\tEVFILT_VM                               = -0xc\n\tEVFILT_VNODE                            = -0x4\n\tEVFILT_WRITE                            = -0x2\n\tEV_ADD                                  = 0x1\n\tEV_CLEAR                                = 0x20\n\tEV_DELETE                               = 0x2\n\tEV_DISABLE                              = 0x8\n\tEV_DISPATCH                             = 0x80\n\tEV_DISPATCH2                            = 0x180\n\tEV_ENABLE                               = 0x4\n\tEV_EOF                                  = 0x8000\n\tEV_ERROR                                = 0x4000\n\tEV_FLAG0                                = 0x1000\n\tEV_FLAG1                                = 0x2000\n\tEV_ONESHOT                              = 0x10\n\tEV_OOBAND                               = 0x2000\n\tEV_POLL                                 = 0x1000\n\tEV_RECEIPT                              = 0x40\n\tEV_SYSFLAGS                             = 0xf000\n\tEV_UDATA_SPECIFIC                       = 0x100\n\tEV_VANISHED                             = 0x200\n\tEXTA                                    = 0x4b00\n\tEXTB                                    = 0x9600\n\tEXTPROC                                 = 0x800\n\tFD_CLOEXEC                              = 0x1\n\tFD_SETSIZE                              = 0x400\n\tFF0                                     = 0x0\n\tFF1                                     = 0x4000\n\tFFDLY                                   = 0x4000\n\tFLUSHO                                  = 0x800000\n\tFSOPT_ATTR_CMN_EXTENDED                 = 0x20\n\tFSOPT_NOFOLLOW                          = 0x1\n\tFSOPT_NOINMEMUPDATE                     = 0x2\n\tFSOPT_PACK_INVAL_ATTRS                  = 0x8\n\tFSOPT_REPORT_FULLSIZE                   = 0x4\n\tFSOPT_RETURN_REALDEV                    = 0x200\n\tF_ADDFILESIGS                           = 0x3d\n\tF_ADDFILESIGS_FOR_DYLD_SIM              = 0x53\n\tF_ADDFILESIGS_INFO                      = 0x67\n\tF_ADDFILESIGS_RETURN                    = 0x61\n\tF_ADDFILESUPPL                          = 0x68\n\tF_ADDSIGS                               = 0x3b\n\tF_ALLOCATEALL                           = 0x4\n\tF_ALLOCATECONTIG                        = 0x2\n\tF_BARRIERFSYNC                          = 0x55\n\tF_CHECK_LV                              = 0x62\n\tF_CHKCLEAN                              = 0x29\n\tF_DUPFD                                 = 0x0\n\tF_DUPFD_CLOEXEC                         = 0x43\n\tF_FINDSIGS                              = 0x4e\n\tF_FLUSH_DATA                            = 0x28\n\tF_FREEZE_FS                             = 0x35\n\tF_FULLFSYNC                             = 0x33\n\tF_GETCODEDIR                            = 0x48\n\tF_GETFD                                 = 0x1\n\tF_GETFL                                 = 0x3\n\tF_GETLK                                 = 0x7\n\tF_GETLKPID                              = 0x42\n\tF_GETNOSIGPIPE                          = 0x4a\n\tF_GETOWN                                = 0x5\n\tF_GETPATH                               = 0x32\n\tF_GETPATH_MTMINFO                       = 0x47\n\tF_GETPATH_NOFIRMLINK                    = 0x66\n\tF_GETPROTECTIONCLASS                    = 0x3f\n\tF_GETPROTECTIONLEVEL                    = 0x4d\n\tF_GETSIGSINFO                           = 0x69\n\tF_GLOBAL_NOCACHE                        = 0x37\n\tF_LOG2PHYS                              = 0x31\n\tF_LOG2PHYS_EXT                          = 0x41\n\tF_NOCACHE                               = 0x30\n\tF_NODIRECT                              = 0x3e\n\tF_OK                                    = 0x0\n\tF_PATHPKG_CHECK                         = 0x34\n\tF_PEOFPOSMODE                           = 0x3\n\tF_PREALLOCATE                           = 0x2a\n\tF_PUNCHHOLE                             = 0x63\n\tF_RDADVISE                              = 0x2c\n\tF_RDAHEAD                               = 0x2d\n\tF_RDLCK                                 = 0x1\n\tF_SETBACKINGSTORE                       = 0x46\n\tF_SETFD                                 = 0x2\n\tF_SETFL                                 = 0x4\n\tF_SETLK                                 = 0x8\n\tF_SETLKW                                = 0x9\n\tF_SETLKWTIMEOUT                         = 0xa\n\tF_SETNOSIGPIPE                          = 0x49\n\tF_SETOWN                                = 0x6\n\tF_SETPROTECTIONCLASS                    = 0x40\n\tF_SETSIZE                               = 0x2b\n\tF_SINGLE_WRITER                         = 0x4c\n\tF_SPECULATIVE_READ                      = 0x65\n\tF_THAW_FS                               = 0x36\n\tF_TRANSCODEKEY                          = 0x4b\n\tF_TRIM_ACTIVE_FILE                      = 0x64\n\tF_UNLCK                                 = 0x2\n\tF_VOLPOSMODE                            = 0x4\n\tF_WRLCK                                 = 0x3\n\tHUPCL                                   = 0x4000\n\tHW_MACHINE                              = 0x1\n\tICANON                                  = 0x100\n\tICMP6_FILTER                            = 0x12\n\tICRNL                                   = 0x100\n\tIEXTEN                                  = 0x400\n\tIFF_ALLMULTI                            = 0x200\n\tIFF_ALTPHYS                             = 0x4000\n\tIFF_BROADCAST                           = 0x2\n\tIFF_DEBUG                               = 0x4\n\tIFF_LINK0                               = 0x1000\n\tIFF_LINK1                               = 0x2000\n\tIFF_LINK2                               = 0x4000\n\tIFF_LOOPBACK                            = 0x8\n\tIFF_MULTICAST                           = 0x8000\n\tIFF_NOARP                               = 0x80\n\tIFF_NOTRAILERS                          = 0x20\n\tIFF_OACTIVE                             = 0x400\n\tIFF_POINTOPOINT                         = 0x10\n\tIFF_PROMISC                             = 0x100\n\tIFF_RUNNING                             = 0x40\n\tIFF_SIMPLEX                             = 0x800\n\tIFF_UP                                  = 0x1\n\tIFNAMSIZ                                = 0x10\n\tIFT_1822                                = 0x2\n\tIFT_6LOWPAN                             = 0x40\n\tIFT_AAL5                                = 0x31\n\tIFT_ARCNET                              = 0x23\n\tIFT_ARCNETPLUS                          = 0x24\n\tIFT_ATM                                 = 0x25\n\tIFT_BRIDGE                              = 0xd1\n\tIFT_CARP                                = 0xf8\n\tIFT_CELLULAR                            = 0xff\n\tIFT_CEPT                                = 0x13\n\tIFT_DS3                                 = 0x1e\n\tIFT_ENC                                 = 0xf4\n\tIFT_EON                                 = 0x19\n\tIFT_ETHER                               = 0x6\n\tIFT_FAITH                               = 0x38\n\tIFT_FDDI                                = 0xf\n\tIFT_FRELAY                              = 0x20\n\tIFT_FRELAYDCE                           = 0x2c\n\tIFT_GIF                                 = 0x37\n\tIFT_HDH1822                             = 0x3\n\tIFT_HIPPI                               = 0x2f\n\tIFT_HSSI                                = 0x2e\n\tIFT_HY                                  = 0xe\n\tIFT_IEEE1394                            = 0x90\n\tIFT_IEEE8023ADLAG                       = 0x88\n\tIFT_ISDNBASIC                           = 0x14\n\tIFT_ISDNPRIMARY                         = 0x15\n\tIFT_ISO88022LLC                         = 0x29\n\tIFT_ISO88023                            = 0x7\n\tIFT_ISO88024                            = 0x8\n\tIFT_ISO88025                            = 0x9\n\tIFT_ISO88026                            = 0xa\n\tIFT_L2VLAN                              = 0x87\n\tIFT_LAPB                                = 0x10\n\tIFT_LOCALTALK                           = 0x2a\n\tIFT_LOOP                                = 0x18\n\tIFT_MIOX25                              = 0x26\n\tIFT_MODEM                               = 0x30\n\tIFT_NSIP                                = 0x1b\n\tIFT_OTHER                               = 0x1\n\tIFT_P10                                 = 0xc\n\tIFT_P80                                 = 0xd\n\tIFT_PARA                                = 0x22\n\tIFT_PDP                                 = 0xff\n\tIFT_PFLOG                               = 0xf5\n\tIFT_PFSYNC                              = 0xf6\n\tIFT_PKTAP                               = 0xfe\n\tIFT_PPP                                 = 0x17\n\tIFT_PROPMUX                             = 0x36\n\tIFT_PROPVIRTUAL                         = 0x35\n\tIFT_PTPSERIAL                           = 0x16\n\tIFT_RS232                               = 0x21\n\tIFT_SDLC                                = 0x11\n\tIFT_SIP                                 = 0x1f\n\tIFT_SLIP                                = 0x1c\n\tIFT_SMDSDXI                             = 0x2b\n\tIFT_SMDSICIP                            = 0x34\n\tIFT_SONET                               = 0x27\n\tIFT_SONETPATH                           = 0x32\n\tIFT_SONETVT                             = 0x33\n\tIFT_STARLAN                             = 0xb\n\tIFT_STF                                 = 0x39\n\tIFT_T1                                  = 0x12\n\tIFT_ULTRA                               = 0x1d\n\tIFT_V35                                 = 0x2d\n\tIFT_X25                                 = 0x5\n\tIFT_X25DDN                              = 0x4\n\tIFT_X25PLE                              = 0x28\n\tIFT_XETHER                              = 0x1a\n\tIGNBRK                                  = 0x1\n\tIGNCR                                   = 0x80\n\tIGNPAR                                  = 0x4\n\tIMAXBEL                                 = 0x2000\n\tINLCR                                   = 0x40\n\tINPCK                                   = 0x10\n\tIN_CLASSA_HOST                          = 0xffffff\n\tIN_CLASSA_MAX                           = 0x80\n\tIN_CLASSA_NET                           = 0xff000000\n\tIN_CLASSA_NSHIFT                        = 0x18\n\tIN_CLASSB_HOST                          = 0xffff\n\tIN_CLASSB_MAX                           = 0x10000\n\tIN_CLASSB_NET                           = 0xffff0000\n\tIN_CLASSB_NSHIFT                        = 0x10\n\tIN_CLASSC_HOST                          = 0xff\n\tIN_CLASSC_NET                           = 0xffffff00\n\tIN_CLASSC_NSHIFT                        = 0x8\n\tIN_CLASSD_HOST                          = 0xfffffff\n\tIN_CLASSD_NET                           = 0xf0000000\n\tIN_CLASSD_NSHIFT                        = 0x1c\n\tIN_LINKLOCALNETNUM                      = 0xa9fe0000\n\tIN_LOOPBACKNET                          = 0x7f\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID          = 0x400473d1\n\tIPPROTO_3PC                             = 0x22\n\tIPPROTO_ADFS                            = 0x44\n\tIPPROTO_AH                              = 0x33\n\tIPPROTO_AHIP                            = 0x3d\n\tIPPROTO_APES                            = 0x63\n\tIPPROTO_ARGUS                           = 0xd\n\tIPPROTO_AX25                            = 0x5d\n\tIPPROTO_BHA                             = 0x31\n\tIPPROTO_BLT                             = 0x1e\n\tIPPROTO_BRSATMON                        = 0x4c\n\tIPPROTO_CFTP                            = 0x3e\n\tIPPROTO_CHAOS                           = 0x10\n\tIPPROTO_CMTP                            = 0x26\n\tIPPROTO_CPHB                            = 0x49\n\tIPPROTO_CPNX                            = 0x48\n\tIPPROTO_DDP                             = 0x25\n\tIPPROTO_DGP                             = 0x56\n\tIPPROTO_DIVERT                          = 0xfe\n\tIPPROTO_DONE                            = 0x101\n\tIPPROTO_DSTOPTS                         = 0x3c\n\tIPPROTO_EGP                             = 0x8\n\tIPPROTO_EMCON                           = 0xe\n\tIPPROTO_ENCAP                           = 0x62\n\tIPPROTO_EON                             = 0x50\n\tIPPROTO_ESP                             = 0x32\n\tIPPROTO_ETHERIP                         = 0x61\n\tIPPROTO_FRAGMENT                        = 0x2c\n\tIPPROTO_GGP                             = 0x3\n\tIPPROTO_GMTP                            = 0x64\n\tIPPROTO_GRE                             = 0x2f\n\tIPPROTO_HELLO                           = 0x3f\n\tIPPROTO_HMP                             = 0x14\n\tIPPROTO_HOPOPTS                         = 0x0\n\tIPPROTO_ICMP                            = 0x1\n\tIPPROTO_ICMPV6                          = 0x3a\n\tIPPROTO_IDP                             = 0x16\n\tIPPROTO_IDPR                            = 0x23\n\tIPPROTO_IDRP                            = 0x2d\n\tIPPROTO_IGMP                            = 0x2\n\tIPPROTO_IGP                             = 0x55\n\tIPPROTO_IGRP                            = 0x58\n\tIPPROTO_IL                              = 0x28\n\tIPPROTO_INLSP                           = 0x34\n\tIPPROTO_INP                             = 0x20\n\tIPPROTO_IP                              = 0x0\n\tIPPROTO_IPCOMP                          = 0x6c\n\tIPPROTO_IPCV                            = 0x47\n\tIPPROTO_IPEIP                           = 0x5e\n\tIPPROTO_IPIP                            = 0x4\n\tIPPROTO_IPPC                            = 0x43\n\tIPPROTO_IPV4                            = 0x4\n\tIPPROTO_IPV6                            = 0x29\n\tIPPROTO_IRTP                            = 0x1c\n\tIPPROTO_KRYPTOLAN                       = 0x41\n\tIPPROTO_LARP                            = 0x5b\n\tIPPROTO_LEAF1                           = 0x19\n\tIPPROTO_LEAF2                           = 0x1a\n\tIPPROTO_MAX                             = 0x100\n\tIPPROTO_MAXID                           = 0x34\n\tIPPROTO_MEAS                            = 0x13\n\tIPPROTO_MHRP                            = 0x30\n\tIPPROTO_MICP                            = 0x5f\n\tIPPROTO_MTP                             = 0x5c\n\tIPPROTO_MUX                             = 0x12\n\tIPPROTO_ND                              = 0x4d\n\tIPPROTO_NHRP                            = 0x36\n\tIPPROTO_NONE                            = 0x3b\n\tIPPROTO_NSP                             = 0x1f\n\tIPPROTO_NVPII                           = 0xb\n\tIPPROTO_OSPFIGP                         = 0x59\n\tIPPROTO_PGM                             = 0x71\n\tIPPROTO_PIGP                            = 0x9\n\tIPPROTO_PIM                             = 0x67\n\tIPPROTO_PRM                             = 0x15\n\tIPPROTO_PUP                             = 0xc\n\tIPPROTO_PVP                             = 0x4b\n\tIPPROTO_RAW                             = 0xff\n\tIPPROTO_RCCMON                          = 0xa\n\tIPPROTO_RDP                             = 0x1b\n\tIPPROTO_ROUTING                         = 0x2b\n\tIPPROTO_RSVP                            = 0x2e\n\tIPPROTO_RVD                             = 0x42\n\tIPPROTO_SATEXPAK                        = 0x40\n\tIPPROTO_SATMON                          = 0x45\n\tIPPROTO_SCCSP                           = 0x60\n\tIPPROTO_SCTP                            = 0x84\n\tIPPROTO_SDRP                            = 0x2a\n\tIPPROTO_SEP                             = 0x21\n\tIPPROTO_SRPC                            = 0x5a\n\tIPPROTO_ST                              = 0x7\n\tIPPROTO_SVMTP                           = 0x52\n\tIPPROTO_SWIPE                           = 0x35\n\tIPPROTO_TCF                             = 0x57\n\tIPPROTO_TCP                             = 0x6\n\tIPPROTO_TP                              = 0x1d\n\tIPPROTO_TPXX                            = 0x27\n\tIPPROTO_TRUNK1                          = 0x17\n\tIPPROTO_TRUNK2                          = 0x18\n\tIPPROTO_TTP                             = 0x54\n\tIPPROTO_UDP                             = 0x11\n\tIPPROTO_VINES                           = 0x53\n\tIPPROTO_VISA                            = 0x46\n\tIPPROTO_VMTP                            = 0x51\n\tIPPROTO_WBEXPAK                         = 0x4f\n\tIPPROTO_WBMON                           = 0x4e\n\tIPPROTO_WSN                             = 0x4a\n\tIPPROTO_XNET                            = 0xf\n\tIPPROTO_XTP                             = 0x24\n\tIPV6_2292DSTOPTS                        = 0x17\n\tIPV6_2292HOPLIMIT                       = 0x14\n\tIPV6_2292HOPOPTS                        = 0x16\n\tIPV6_2292NEXTHOP                        = 0x15\n\tIPV6_2292PKTINFO                        = 0x13\n\tIPV6_2292PKTOPTIONS                     = 0x19\n\tIPV6_2292RTHDR                          = 0x18\n\tIPV6_3542DSTOPTS                        = 0x32\n\tIPV6_3542HOPLIMIT                       = 0x2f\n\tIPV6_3542HOPOPTS                        = 0x31\n\tIPV6_3542NEXTHOP                        = 0x30\n\tIPV6_3542PKTINFO                        = 0x2e\n\tIPV6_3542RTHDR                          = 0x33\n\tIPV6_ADDR_MC_FLAGS_PREFIX               = 0x20\n\tIPV6_ADDR_MC_FLAGS_TRANSIENT            = 0x10\n\tIPV6_ADDR_MC_FLAGS_UNICAST_BASED        = 0x30\n\tIPV6_AUTOFLOWLABEL                      = 0x3b\n\tIPV6_BINDV6ONLY                         = 0x1b\n\tIPV6_BOUND_IF                           = 0x7d\n\tIPV6_CHECKSUM                           = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS             = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP             = 0x1\n\tIPV6_DEFHLIM                            = 0x40\n\tIPV6_DONTFRAG                           = 0x3e\n\tIPV6_DSTOPTS                            = 0x32\n\tIPV6_FAITH                              = 0x1d\n\tIPV6_FLOWINFO_MASK                      = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK                     = 0xffff0f00\n\tIPV6_FLOW_ECN_MASK                      = 0x3000\n\tIPV6_FRAGTTL                            = 0x3c\n\tIPV6_FW_ADD                             = 0x1e\n\tIPV6_FW_DEL                             = 0x1f\n\tIPV6_FW_FLUSH                           = 0x20\n\tIPV6_FW_GET                             = 0x22\n\tIPV6_FW_ZERO                            = 0x21\n\tIPV6_HLIMDEC                            = 0x1\n\tIPV6_HOPLIMIT                           = 0x2f\n\tIPV6_HOPOPTS                            = 0x31\n\tIPV6_IPSEC_POLICY                       = 0x1c\n\tIPV6_JOIN_GROUP                         = 0xc\n\tIPV6_LEAVE_GROUP                        = 0xd\n\tIPV6_MAXHLIM                            = 0xff\n\tIPV6_MAXOPTHDR                          = 0x800\n\tIPV6_MAXPACKET                          = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER               = 0x200\n\tIPV6_MAX_MEMBERSHIPS                    = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER                = 0x80\n\tIPV6_MIN_MEMBERSHIPS                    = 0x1f\n\tIPV6_MMTU                               = 0x500\n\tIPV6_MSFILTER                           = 0x4a\n\tIPV6_MULTICAST_HOPS                     = 0xa\n\tIPV6_MULTICAST_IF                       = 0x9\n\tIPV6_MULTICAST_LOOP                     = 0xb\n\tIPV6_NEXTHOP                            = 0x30\n\tIPV6_PATHMTU                            = 0x2c\n\tIPV6_PKTINFO                            = 0x2e\n\tIPV6_PORTRANGE                          = 0xe\n\tIPV6_PORTRANGE_DEFAULT                  = 0x0\n\tIPV6_PORTRANGE_HIGH                     = 0x1\n\tIPV6_PORTRANGE_LOW                      = 0x2\n\tIPV6_PREFER_TEMPADDR                    = 0x3f\n\tIPV6_RECVDSTOPTS                        = 0x28\n\tIPV6_RECVHOPLIMIT                       = 0x25\n\tIPV6_RECVHOPOPTS                        = 0x27\n\tIPV6_RECVPATHMTU                        = 0x2b\n\tIPV6_RECVPKTINFO                        = 0x3d\n\tIPV6_RECVRTHDR                          = 0x26\n\tIPV6_RECVTCLASS                         = 0x23\n\tIPV6_RTHDR                              = 0x33\n\tIPV6_RTHDRDSTOPTS                       = 0x39\n\tIPV6_RTHDR_LOOSE                        = 0x0\n\tIPV6_RTHDR_STRICT                       = 0x1\n\tIPV6_RTHDR_TYPE_0                       = 0x0\n\tIPV6_SOCKOPT_RESERVED1                  = 0x3\n\tIPV6_TCLASS                             = 0x24\n\tIPV6_UNICAST_HOPS                       = 0x4\n\tIPV6_USE_MIN_MTU                        = 0x2a\n\tIPV6_V6ONLY                             = 0x1b\n\tIPV6_VERSION                            = 0x60\n\tIPV6_VERSION_MASK                       = 0xf0\n\tIP_ADD_MEMBERSHIP                       = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP                = 0x46\n\tIP_BLOCK_SOURCE                         = 0x48\n\tIP_BOUND_IF                             = 0x19\n\tIP_DEFAULT_MULTICAST_LOOP               = 0x1\n\tIP_DEFAULT_MULTICAST_TTL                = 0x1\n\tIP_DF                                   = 0x4000\n\tIP_DONTFRAG                             = 0x1c\n\tIP_DROP_MEMBERSHIP                      = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP               = 0x47\n\tIP_DUMMYNET_CONFIGURE                   = 0x3c\n\tIP_DUMMYNET_DEL                         = 0x3d\n\tIP_DUMMYNET_FLUSH                       = 0x3e\n\tIP_DUMMYNET_GET                         = 0x40\n\tIP_FAITH                                = 0x16\n\tIP_FW_ADD                               = 0x28\n\tIP_FW_DEL                               = 0x29\n\tIP_FW_FLUSH                             = 0x2a\n\tIP_FW_GET                               = 0x2c\n\tIP_FW_RESETLOG                          = 0x2d\n\tIP_FW_ZERO                              = 0x2b\n\tIP_HDRINCL                              = 0x2\n\tIP_IPSEC_POLICY                         = 0x15\n\tIP_MAXPACKET                            = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER                 = 0x200\n\tIP_MAX_MEMBERSHIPS                      = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER                 = 0x80\n\tIP_MAX_SOCK_SRC_FILTER                  = 0x80\n\tIP_MF                                   = 0x2000\n\tIP_MIN_MEMBERSHIPS                      = 0x1f\n\tIP_MSFILTER                             = 0x4a\n\tIP_MSS                                  = 0x240\n\tIP_MULTICAST_IF                         = 0x9\n\tIP_MULTICAST_IFINDEX                    = 0x42\n\tIP_MULTICAST_LOOP                       = 0xb\n\tIP_MULTICAST_TTL                        = 0xa\n\tIP_MULTICAST_VIF                        = 0xe\n\tIP_NAT__XXX                             = 0x37\n\tIP_OFFMASK                              = 0x1fff\n\tIP_OLD_FW_ADD                           = 0x32\n\tIP_OLD_FW_DEL                           = 0x33\n\tIP_OLD_FW_FLUSH                         = 0x34\n\tIP_OLD_FW_GET                           = 0x36\n\tIP_OLD_FW_RESETLOG                      = 0x38\n\tIP_OLD_FW_ZERO                          = 0x35\n\tIP_OPTIONS                              = 0x1\n\tIP_PKTINFO                              = 0x1a\n\tIP_PORTRANGE                            = 0x13\n\tIP_PORTRANGE_DEFAULT                    = 0x0\n\tIP_PORTRANGE_HIGH                       = 0x1\n\tIP_PORTRANGE_LOW                        = 0x2\n\tIP_RECVDSTADDR                          = 0x7\n\tIP_RECVIF                               = 0x14\n\tIP_RECVOPTS                             = 0x5\n\tIP_RECVPKTINFO                          = 0x1a\n\tIP_RECVRETOPTS                          = 0x6\n\tIP_RECVTOS                              = 0x1b\n\tIP_RECVTTL                              = 0x18\n\tIP_RETOPTS                              = 0x8\n\tIP_RF                                   = 0x8000\n\tIP_RSVP_OFF                             = 0x10\n\tIP_RSVP_ON                              = 0xf\n\tIP_RSVP_VIF_OFF                         = 0x12\n\tIP_RSVP_VIF_ON                          = 0x11\n\tIP_STRIPHDR                             = 0x17\n\tIP_TOS                                  = 0x3\n\tIP_TRAFFIC_MGT_BACKGROUND               = 0x41\n\tIP_TTL                                  = 0x4\n\tIP_UNBLOCK_SOURCE                       = 0x49\n\tISIG                                    = 0x80\n\tISTRIP                                  = 0x20\n\tIUTF8                                   = 0x4000\n\tIXANY                                   = 0x800\n\tIXOFF                                   = 0x400\n\tIXON                                    = 0x200\n\tKERN_HOSTNAME                           = 0xa\n\tKERN_OSRELEASE                          = 0x2\n\tKERN_OSTYPE                             = 0x1\n\tKERN_VERSION                            = 0x4\n\tLOCAL_PEERCRED                          = 0x1\n\tLOCAL_PEEREPID                          = 0x3\n\tLOCAL_PEEREUUID                         = 0x5\n\tLOCAL_PEERPID                           = 0x2\n\tLOCAL_PEERTOKEN                         = 0x6\n\tLOCAL_PEERUUID                          = 0x4\n\tLOCK_EX                                 = 0x2\n\tLOCK_NB                                 = 0x4\n\tLOCK_SH                                 = 0x1\n\tLOCK_UN                                 = 0x8\n\tMADV_CAN_REUSE                          = 0x9\n\tMADV_DONTNEED                           = 0x4\n\tMADV_FREE                               = 0x5\n\tMADV_FREE_REUSABLE                      = 0x7\n\tMADV_FREE_REUSE                         = 0x8\n\tMADV_NORMAL                             = 0x0\n\tMADV_PAGEOUT                            = 0xa\n\tMADV_RANDOM                             = 0x1\n\tMADV_SEQUENTIAL                         = 0x2\n\tMADV_WILLNEED                           = 0x3\n\tMADV_ZERO_WIRED_PAGES                   = 0x6\n\tMAP_32BIT                               = 0x8000\n\tMAP_ANON                                = 0x1000\n\tMAP_ANONYMOUS                           = 0x1000\n\tMAP_COPY                                = 0x2\n\tMAP_FILE                                = 0x0\n\tMAP_FIXED                               = 0x10\n\tMAP_HASSEMAPHORE                        = 0x200\n\tMAP_JIT                                 = 0x800\n\tMAP_NOCACHE                             = 0x400\n\tMAP_NOEXTEND                            = 0x100\n\tMAP_NORESERVE                           = 0x40\n\tMAP_PRIVATE                             = 0x2\n\tMAP_RENAME                              = 0x20\n\tMAP_RESERVED0080                        = 0x80\n\tMAP_RESILIENT_CODESIGN                  = 0x2000\n\tMAP_RESILIENT_MEDIA                     = 0x4000\n\tMAP_SHARED                              = 0x1\n\tMAP_TRANSLATED_ALLOW_EXECUTE            = 0x20000\n\tMAP_UNIX03                              = 0x40000\n\tMCAST_BLOCK_SOURCE                      = 0x54\n\tMCAST_EXCLUDE                           = 0x2\n\tMCAST_INCLUDE                           = 0x1\n\tMCAST_JOIN_GROUP                        = 0x50\n\tMCAST_JOIN_SOURCE_GROUP                 = 0x52\n\tMCAST_LEAVE_GROUP                       = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP                = 0x53\n\tMCAST_UNBLOCK_SOURCE                    = 0x55\n\tMCAST_UNDEFINED                         = 0x0\n\tMCL_CURRENT                             = 0x1\n\tMCL_FUTURE                              = 0x2\n\tMNT_ASYNC                               = 0x40\n\tMNT_AUTOMOUNTED                         = 0x400000\n\tMNT_CMDFLAGS                            = 0xf0000\n\tMNT_CPROTECT                            = 0x80\n\tMNT_DEFWRITE                            = 0x2000000\n\tMNT_DONTBROWSE                          = 0x100000\n\tMNT_DOVOLFS                             = 0x8000\n\tMNT_DWAIT                               = 0x4\n\tMNT_EXPORTED                            = 0x100\n\tMNT_EXT_ROOT_DATA_VOL                   = 0x1\n\tMNT_FORCE                               = 0x80000\n\tMNT_IGNORE_OWNERSHIP                    = 0x200000\n\tMNT_JOURNALED                           = 0x800000\n\tMNT_LOCAL                               = 0x1000\n\tMNT_MULTILABEL                          = 0x4000000\n\tMNT_NOATIME                             = 0x10000000\n\tMNT_NOBLOCK                             = 0x20000\n\tMNT_NODEV                               = 0x10\n\tMNT_NOEXEC                              = 0x4\n\tMNT_NOSUID                              = 0x8\n\tMNT_NOUSERXATTR                         = 0x1000000\n\tMNT_NOWAIT                              = 0x2\n\tMNT_QUARANTINE                          = 0x400\n\tMNT_QUOTA                               = 0x2000\n\tMNT_RDONLY                              = 0x1\n\tMNT_RELOAD                              = 0x40000\n\tMNT_REMOVABLE                           = 0x200\n\tMNT_ROOTFS                              = 0x4000\n\tMNT_SNAPSHOT                            = 0x40000000\n\tMNT_STRICTATIME                         = 0x80000000\n\tMNT_SYNCHRONOUS                         = 0x2\n\tMNT_UNION                               = 0x20\n\tMNT_UNKNOWNPERMISSIONS                  = 0x200000\n\tMNT_UPDATE                              = 0x10000\n\tMNT_VISFLAGMASK                         = 0xd7f0f7ff\n\tMNT_WAIT                                = 0x1\n\tMSG_CTRUNC                              = 0x20\n\tMSG_DONTROUTE                           = 0x4\n\tMSG_DONTWAIT                            = 0x80\n\tMSG_EOF                                 = 0x100\n\tMSG_EOR                                 = 0x8\n\tMSG_FLUSH                               = 0x400\n\tMSG_HAVEMORE                            = 0x2000\n\tMSG_HOLD                                = 0x800\n\tMSG_NEEDSA                              = 0x10000\n\tMSG_NOSIGNAL                            = 0x80000\n\tMSG_OOB                                 = 0x1\n\tMSG_PEEK                                = 0x2\n\tMSG_RCVMORE                             = 0x4000\n\tMSG_SEND                                = 0x1000\n\tMSG_TRUNC                               = 0x10\n\tMSG_WAITALL                             = 0x40\n\tMSG_WAITSTREAM                          = 0x200\n\tMS_ASYNC                                = 0x1\n\tMS_DEACTIVATE                           = 0x8\n\tMS_INVALIDATE                           = 0x2\n\tMS_KILLPAGES                            = 0x4\n\tMS_SYNC                                 = 0x10\n\tNAME_MAX                                = 0xff\n\tNET_RT_DUMP                             = 0x1\n\tNET_RT_DUMP2                            = 0x7\n\tNET_RT_FLAGS                            = 0x2\n\tNET_RT_FLAGS_PRIV                       = 0xa\n\tNET_RT_IFLIST                           = 0x3\n\tNET_RT_IFLIST2                          = 0x6\n\tNET_RT_MAXID                            = 0xb\n\tNET_RT_STAT                             = 0x4\n\tNET_RT_TRASH                            = 0x5\n\tNFDBITS                                 = 0x20\n\tNL0                                     = 0x0\n\tNL1                                     = 0x100\n\tNL2                                     = 0x200\n\tNL3                                     = 0x300\n\tNLDLY                                   = 0x300\n\tNOFLSH                                  = 0x80000000\n\tNOKERNINFO                              = 0x2000000\n\tNOTE_ABSOLUTE                           = 0x8\n\tNOTE_ATTRIB                             = 0x8\n\tNOTE_BACKGROUND                         = 0x40\n\tNOTE_CHILD                              = 0x4\n\tNOTE_CRITICAL                           = 0x20\n\tNOTE_DELETE                             = 0x1\n\tNOTE_EXEC                               = 0x20000000\n\tNOTE_EXIT                               = 0x80000000\n\tNOTE_EXITSTATUS                         = 0x4000000\n\tNOTE_EXIT_CSERROR                       = 0x40000\n\tNOTE_EXIT_DECRYPTFAIL                   = 0x10000\n\tNOTE_EXIT_DETAIL                        = 0x2000000\n\tNOTE_EXIT_DETAIL_MASK                   = 0x70000\n\tNOTE_EXIT_MEMORY                        = 0x20000\n\tNOTE_EXIT_REPARENTED                    = 0x80000\n\tNOTE_EXTEND                             = 0x4\n\tNOTE_FFAND                              = 0x40000000\n\tNOTE_FFCOPY                             = 0xc0000000\n\tNOTE_FFCTRLMASK                         = 0xc0000000\n\tNOTE_FFLAGSMASK                         = 0xffffff\n\tNOTE_FFNOP                              = 0x0\n\tNOTE_FFOR                               = 0x80000000\n\tNOTE_FORK                               = 0x40000000\n\tNOTE_FUNLOCK                            = 0x100\n\tNOTE_LEEWAY                             = 0x10\n\tNOTE_LINK                               = 0x10\n\tNOTE_LOWAT                              = 0x1\n\tNOTE_MACHTIME                           = 0x100\n\tNOTE_MACH_CONTINUOUS_TIME               = 0x80\n\tNOTE_NONE                               = 0x80\n\tNOTE_NSECONDS                           = 0x4\n\tNOTE_OOB                                = 0x2\n\tNOTE_PCTRLMASK                          = -0x100000\n\tNOTE_PDATAMASK                          = 0xfffff\n\tNOTE_REAP                               = 0x10000000\n\tNOTE_RENAME                             = 0x20\n\tNOTE_REVOKE                             = 0x40\n\tNOTE_SECONDS                            = 0x1\n\tNOTE_SIGNAL                             = 0x8000000\n\tNOTE_TRACK                              = 0x1\n\tNOTE_TRACKERR                           = 0x2\n\tNOTE_TRIGGER                            = 0x1000000\n\tNOTE_USECONDS                           = 0x2\n\tNOTE_VM_ERROR                           = 0x10000000\n\tNOTE_VM_PRESSURE                        = 0x80000000\n\tNOTE_VM_PRESSURE_SUDDEN_TERMINATE       = 0x20000000\n\tNOTE_VM_PRESSURE_TERMINATE              = 0x40000000\n\tNOTE_WRITE                              = 0x2\n\tOCRNL                                   = 0x10\n\tOFDEL                                   = 0x20000\n\tOFILL                                   = 0x80\n\tONLCR                                   = 0x2\n\tONLRET                                  = 0x40\n\tONOCR                                   = 0x20\n\tONOEOT                                  = 0x8\n\tOPOST                                   = 0x1\n\tOXTABS                                  = 0x4\n\tO_ACCMODE                               = 0x3\n\tO_ALERT                                 = 0x20000000\n\tO_APPEND                                = 0x8\n\tO_ASYNC                                 = 0x40\n\tO_CLOEXEC                               = 0x1000000\n\tO_CREAT                                 = 0x200\n\tO_DIRECTORY                             = 0x100000\n\tO_DP_GETRAWENCRYPTED                    = 0x1\n\tO_DP_GETRAWUNENCRYPTED                  = 0x2\n\tO_DSYNC                                 = 0x400000\n\tO_EVTONLY                               = 0x8000\n\tO_EXCL                                  = 0x800\n\tO_EXLOCK                                = 0x20\n\tO_FSYNC                                 = 0x80\n\tO_NDELAY                                = 0x4\n\tO_NOCTTY                                = 0x20000\n\tO_NOFOLLOW                              = 0x100\n\tO_NOFOLLOW_ANY                          = 0x20000000\n\tO_NONBLOCK                              = 0x4\n\tO_POPUP                                 = 0x80000000\n\tO_RDONLY                                = 0x0\n\tO_RDWR                                  = 0x2\n\tO_SHLOCK                                = 0x10\n\tO_SYMLINK                               = 0x200000\n\tO_SYNC                                  = 0x80\n\tO_TRUNC                                 = 0x400\n\tO_WRONLY                                = 0x1\n\tPARENB                                  = 0x1000\n\tPARMRK                                  = 0x8\n\tPARODD                                  = 0x2000\n\tPENDIN                                  = 0x20000000\n\tPRIO_PGRP                               = 0x1\n\tPRIO_PROCESS                            = 0x0\n\tPRIO_USER                               = 0x2\n\tPROT_EXEC                               = 0x4\n\tPROT_NONE                               = 0x0\n\tPROT_READ                               = 0x1\n\tPROT_WRITE                              = 0x2\n\tPT_ATTACH                               = 0xa\n\tPT_ATTACHEXC                            = 0xe\n\tPT_CONTINUE                             = 0x7\n\tPT_DENY_ATTACH                          = 0x1f\n\tPT_DETACH                               = 0xb\n\tPT_FIRSTMACH                            = 0x20\n\tPT_FORCEQUOTA                           = 0x1e\n\tPT_KILL                                 = 0x8\n\tPT_READ_D                               = 0x2\n\tPT_READ_I                               = 0x1\n\tPT_READ_U                               = 0x3\n\tPT_SIGEXC                               = 0xc\n\tPT_STEP                                 = 0x9\n\tPT_THUPDATE                             = 0xd\n\tPT_TRACE_ME                             = 0x0\n\tPT_WRITE_D                              = 0x5\n\tPT_WRITE_I                              = 0x4\n\tPT_WRITE_U                              = 0x6\n\tRENAME_EXCL                             = 0x4\n\tRENAME_NOFOLLOW_ANY                     = 0x10\n\tRENAME_RESERVED1                        = 0x8\n\tRENAME_SECLUDE                          = 0x1\n\tRENAME_SWAP                             = 0x2\n\tRLIMIT_AS                               = 0x5\n\tRLIMIT_CORE                             = 0x4\n\tRLIMIT_CPU                              = 0x0\n\tRLIMIT_CPU_USAGE_MONITOR                = 0x2\n\tRLIMIT_DATA                             = 0x2\n\tRLIMIT_FSIZE                            = 0x1\n\tRLIMIT_MEMLOCK                          = 0x6\n\tRLIMIT_NOFILE                           = 0x8\n\tRLIMIT_NPROC                            = 0x7\n\tRLIMIT_RSS                              = 0x5\n\tRLIMIT_STACK                            = 0x3\n\tRLIM_INFINITY                           = 0x7fffffffffffffff\n\tRTAX_AUTHOR                             = 0x6\n\tRTAX_BRD                                = 0x7\n\tRTAX_DST                                = 0x0\n\tRTAX_GATEWAY                            = 0x1\n\tRTAX_GENMASK                            = 0x3\n\tRTAX_IFA                                = 0x5\n\tRTAX_IFP                                = 0x4\n\tRTAX_MAX                                = 0x8\n\tRTAX_NETMASK                            = 0x2\n\tRTA_AUTHOR                              = 0x40\n\tRTA_BRD                                 = 0x80\n\tRTA_DST                                 = 0x1\n\tRTA_GATEWAY                             = 0x2\n\tRTA_GENMASK                             = 0x8\n\tRTA_IFA                                 = 0x20\n\tRTA_IFP                                 = 0x10\n\tRTA_NETMASK                             = 0x4\n\tRTF_BLACKHOLE                           = 0x1000\n\tRTF_BROADCAST                           = 0x400000\n\tRTF_CLONING                             = 0x100\n\tRTF_CONDEMNED                           = 0x2000000\n\tRTF_DEAD                                = 0x20000000\n\tRTF_DELCLONE                            = 0x80\n\tRTF_DONE                                = 0x40\n\tRTF_DYNAMIC                             = 0x10\n\tRTF_GATEWAY                             = 0x2\n\tRTF_GLOBAL                              = 0x40000000\n\tRTF_HOST                                = 0x4\n\tRTF_IFREF                               = 0x4000000\n\tRTF_IFSCOPE                             = 0x1000000\n\tRTF_LLDATA                              = 0x400\n\tRTF_LLINFO                              = 0x400\n\tRTF_LOCAL                               = 0x200000\n\tRTF_MODIFIED                            = 0x20\n\tRTF_MULTICAST                           = 0x800000\n\tRTF_NOIFREF                             = 0x2000\n\tRTF_PINNED                              = 0x100000\n\tRTF_PRCLONING                           = 0x10000\n\tRTF_PROTO1                              = 0x8000\n\tRTF_PROTO2                              = 0x4000\n\tRTF_PROTO3                              = 0x40000\n\tRTF_PROXY                               = 0x8000000\n\tRTF_REJECT                              = 0x8\n\tRTF_ROUTER                              = 0x10000000\n\tRTF_STATIC                              = 0x800\n\tRTF_UP                                  = 0x1\n\tRTF_WASCLONED                           = 0x20000\n\tRTF_XRESOLVE                            = 0x200\n\tRTM_ADD                                 = 0x1\n\tRTM_CHANGE                              = 0x3\n\tRTM_DELADDR                             = 0xd\n\tRTM_DELETE                              = 0x2\n\tRTM_DELMADDR                            = 0x10\n\tRTM_GET                                 = 0x4\n\tRTM_GET2                                = 0x14\n\tRTM_IFINFO                              = 0xe\n\tRTM_IFINFO2                             = 0x12\n\tRTM_LOCK                                = 0x8\n\tRTM_LOSING                              = 0x5\n\tRTM_MISS                                = 0x7\n\tRTM_NEWADDR                             = 0xc\n\tRTM_NEWMADDR                            = 0xf\n\tRTM_NEWMADDR2                           = 0x13\n\tRTM_OLDADD                              = 0x9\n\tRTM_OLDDEL                              = 0xa\n\tRTM_REDIRECT                            = 0x6\n\tRTM_RESOLVE                             = 0xb\n\tRTM_RTTUNIT                             = 0xf4240\n\tRTM_VERSION                             = 0x5\n\tRTV_EXPIRE                              = 0x4\n\tRTV_HOPCOUNT                            = 0x2\n\tRTV_MTU                                 = 0x1\n\tRTV_RPIPE                               = 0x8\n\tRTV_RTT                                 = 0x40\n\tRTV_RTTVAR                              = 0x80\n\tRTV_SPIPE                               = 0x10\n\tRTV_SSTHRESH                            = 0x20\n\tRUSAGE_CHILDREN                         = -0x1\n\tRUSAGE_SELF                             = 0x0\n\tSAE_ASSOCID_ALL                         = 0xffffffff\n\tSAE_ASSOCID_ANY                         = 0x0\n\tSAE_CONNID_ALL                          = 0xffffffff\n\tSAE_CONNID_ANY                          = 0x0\n\tSCM_CREDS                               = 0x3\n\tSCM_RIGHTS                              = 0x1\n\tSCM_TIMESTAMP                           = 0x2\n\tSCM_TIMESTAMP_MONOTONIC                 = 0x4\n\tSEEK_CUR                                = 0x1\n\tSEEK_DATA                               = 0x4\n\tSEEK_END                                = 0x2\n\tSEEK_HOLE                               = 0x3\n\tSEEK_SET                                = 0x0\n\tSF_APPEND                               = 0x40000\n\tSF_ARCHIVED                             = 0x10000\n\tSF_DATALESS                             = 0x40000000\n\tSF_FIRMLINK                             = 0x800000\n\tSF_IMMUTABLE                            = 0x20000\n\tSF_NOUNLINK                             = 0x100000\n\tSF_RESTRICTED                           = 0x80000\n\tSF_SETTABLE                             = 0x3fff0000\n\tSF_SUPPORTED                            = 0x9f0000\n\tSF_SYNTHETIC                            = 0xc0000000\n\tSHUT_RD                                 = 0x0\n\tSHUT_RDWR                               = 0x2\n\tSHUT_WR                                 = 0x1\n\tSIOCADDMULTI                            = 0x80206931\n\tSIOCAIFADDR                             = 0x8040691a\n\tSIOCARPIPLL                             = 0xc0206928\n\tSIOCATMARK                              = 0x40047307\n\tSIOCAUTOADDR                            = 0xc0206926\n\tSIOCAUTONETMASK                         = 0x80206927\n\tSIOCDELMULTI                            = 0x80206932\n\tSIOCDIFADDR                             = 0x80206919\n\tSIOCDIFPHYADDR                          = 0x80206941\n\tSIOCGDRVSPEC                            = 0xc028697b\n\tSIOCGETVLAN                             = 0xc020697f\n\tSIOCGHIWAT                              = 0x40047301\n\tSIOCGIF6LOWPAN                          = 0xc02069c5\n\tSIOCGIFADDR                             = 0xc0206921\n\tSIOCGIFALTMTU                           = 0xc0206948\n\tSIOCGIFASYNCMAP                         = 0xc020697c\n\tSIOCGIFBOND                             = 0xc0206947\n\tSIOCGIFBRDADDR                          = 0xc0206923\n\tSIOCGIFCAP                              = 0xc020695b\n\tSIOCGIFCONF                             = 0xc00c6924\n\tSIOCGIFDEVMTU                           = 0xc0206944\n\tSIOCGIFDSTADDR                          = 0xc0206922\n\tSIOCGIFFLAGS                            = 0xc0206911\n\tSIOCGIFFUNCTIONALTYPE                   = 0xc02069ad\n\tSIOCGIFGENERIC                          = 0xc020693a\n\tSIOCGIFKPI                              = 0xc0206987\n\tSIOCGIFMAC                              = 0xc0206982\n\tSIOCGIFMEDIA                            = 0xc02c6938\n\tSIOCGIFMETRIC                           = 0xc0206917\n\tSIOCGIFMTU                              = 0xc0206933\n\tSIOCGIFNETMASK                          = 0xc0206925\n\tSIOCGIFPDSTADDR                         = 0xc0206940\n\tSIOCGIFPHYS                             = 0xc0206935\n\tSIOCGIFPSRCADDR                         = 0xc020693f\n\tSIOCGIFSTATUS                           = 0xc331693d\n\tSIOCGIFVLAN                             = 0xc020697f\n\tSIOCGIFWAKEFLAGS                        = 0xc0206988\n\tSIOCGIFXMEDIA                           = 0xc02c6948\n\tSIOCGLOWAT                              = 0x40047303\n\tSIOCGPGRP                               = 0x40047309\n\tSIOCIFCREATE                            = 0xc0206978\n\tSIOCIFCREATE2                           = 0xc020697a\n\tSIOCIFDESTROY                           = 0x80206979\n\tSIOCIFGCLONERS                          = 0xc0106981\n\tSIOCRSLVMULTI                           = 0xc010693b\n\tSIOCSDRVSPEC                            = 0x8028697b\n\tSIOCSETVLAN                             = 0x8020697e\n\tSIOCSHIWAT                              = 0x80047300\n\tSIOCSIF6LOWPAN                          = 0x802069c4\n\tSIOCSIFADDR                             = 0x8020690c\n\tSIOCSIFALTMTU                           = 0x80206945\n\tSIOCSIFASYNCMAP                         = 0x8020697d\n\tSIOCSIFBOND                             = 0x80206946\n\tSIOCSIFBRDADDR                          = 0x80206913\n\tSIOCSIFCAP                              = 0x8020695a\n\tSIOCSIFDSTADDR                          = 0x8020690e\n\tSIOCSIFFLAGS                            = 0x80206910\n\tSIOCSIFGENERIC                          = 0x80206939\n\tSIOCSIFKPI                              = 0x80206986\n\tSIOCSIFLLADDR                           = 0x8020693c\n\tSIOCSIFMAC                              = 0x80206983\n\tSIOCSIFMEDIA                            = 0xc0206937\n\tSIOCSIFMETRIC                           = 0x80206918\n\tSIOCSIFMTU                              = 0x80206934\n\tSIOCSIFNETMASK                          = 0x80206916\n\tSIOCSIFPHYADDR                          = 0x8040693e\n\tSIOCSIFPHYS                             = 0x80206936\n\tSIOCSIFVLAN                             = 0x8020697e\n\tSIOCSLOWAT                              = 0x80047302\n\tSIOCSPGRP                               = 0x80047308\n\tSOCK_DGRAM                              = 0x2\n\tSOCK_MAXADDRLEN                         = 0xff\n\tSOCK_RAW                                = 0x3\n\tSOCK_RDM                                = 0x4\n\tSOCK_SEQPACKET                          = 0x5\n\tSOCK_STREAM                             = 0x1\n\tSOL_LOCAL                               = 0x0\n\tSOL_SOCKET                              = 0xffff\n\tSOMAXCONN                               = 0x80\n\tSO_ACCEPTCONN                           = 0x2\n\tSO_BROADCAST                            = 0x20\n\tSO_DEBUG                                = 0x1\n\tSO_DONTROUTE                            = 0x10\n\tSO_DONTTRUNC                            = 0x2000\n\tSO_ERROR                                = 0x1007\n\tSO_KEEPALIVE                            = 0x8\n\tSO_LABEL                                = 0x1010\n\tSO_LINGER                               = 0x80\n\tSO_LINGER_SEC                           = 0x1080\n\tSO_NETSVC_MARKING_LEVEL                 = 0x1119\n\tSO_NET_SERVICE_TYPE                     = 0x1116\n\tSO_NKE                                  = 0x1021\n\tSO_NOADDRERR                            = 0x1023\n\tSO_NOSIGPIPE                            = 0x1022\n\tSO_NOTIFYCONFLICT                       = 0x1026\n\tSO_NP_EXTENSIONS                        = 0x1083\n\tSO_NREAD                                = 0x1020\n\tSO_NUMRCVPKT                            = 0x1112\n\tSO_NWRITE                               = 0x1024\n\tSO_OOBINLINE                            = 0x100\n\tSO_PEERLABEL                            = 0x1011\n\tSO_RANDOMPORT                           = 0x1082\n\tSO_RCVBUF                               = 0x1002\n\tSO_RCVLOWAT                             = 0x1004\n\tSO_RCVTIMEO                             = 0x1006\n\tSO_REUSEADDR                            = 0x4\n\tSO_REUSEPORT                            = 0x200\n\tSO_REUSESHAREUID                        = 0x1025\n\tSO_SNDBUF                               = 0x1001\n\tSO_SNDLOWAT                             = 0x1003\n\tSO_SNDTIMEO                             = 0x1005\n\tSO_TIMESTAMP                            = 0x400\n\tSO_TIMESTAMP_MONOTONIC                  = 0x800\n\tSO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1\n\tSO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4\n\tSO_TRACKER_ATTRIBUTE_FLAGS_TRACKER      = 0x2\n\tSO_TRACKER_TRANSPARENCY_VERSION         = 0x3\n\tSO_TYPE                                 = 0x1008\n\tSO_UPCALLCLOSEWAIT                      = 0x1027\n\tSO_USELOOPBACK                          = 0x40\n\tSO_WANTMORE                             = 0x4000\n\tSO_WANTOOBFLAG                          = 0x8000\n\tS_IEXEC                                 = 0x40\n\tS_IFBLK                                 = 0x6000\n\tS_IFCHR                                 = 0x2000\n\tS_IFDIR                                 = 0x4000\n\tS_IFIFO                                 = 0x1000\n\tS_IFLNK                                 = 0xa000\n\tS_IFMT                                  = 0xf000\n\tS_IFREG                                 = 0x8000\n\tS_IFSOCK                                = 0xc000\n\tS_IFWHT                                 = 0xe000\n\tS_IREAD                                 = 0x100\n\tS_IRGRP                                 = 0x20\n\tS_IROTH                                 = 0x4\n\tS_IRUSR                                 = 0x100\n\tS_IRWXG                                 = 0x38\n\tS_IRWXO                                 = 0x7\n\tS_IRWXU                                 = 0x1c0\n\tS_ISGID                                 = 0x400\n\tS_ISTXT                                 = 0x200\n\tS_ISUID                                 = 0x800\n\tS_ISVTX                                 = 0x200\n\tS_IWGRP                                 = 0x10\n\tS_IWOTH                                 = 0x2\n\tS_IWRITE                                = 0x80\n\tS_IWUSR                                 = 0x80\n\tS_IXGRP                                 = 0x8\n\tS_IXOTH                                 = 0x1\n\tS_IXUSR                                 = 0x40\n\tTAB0                                    = 0x0\n\tTAB1                                    = 0x400\n\tTAB2                                    = 0x800\n\tTAB3                                    = 0x4\n\tTABDLY                                  = 0xc04\n\tTCIFLUSH                                = 0x1\n\tTCIOFF                                  = 0x3\n\tTCIOFLUSH                               = 0x3\n\tTCION                                   = 0x4\n\tTCOFLUSH                                = 0x2\n\tTCOOFF                                  = 0x1\n\tTCOON                                   = 0x2\n\tTCPOPT_CC                               = 0xb\n\tTCPOPT_CCECHO                           = 0xd\n\tTCPOPT_CCNEW                            = 0xc\n\tTCPOPT_EOL                              = 0x0\n\tTCPOPT_FASTOPEN                         = 0x22\n\tTCPOPT_MAXSEG                           = 0x2\n\tTCPOPT_NOP                              = 0x1\n\tTCPOPT_SACK                             = 0x5\n\tTCPOPT_SACK_HDR                         = 0x1010500\n\tTCPOPT_SACK_PERMITTED                   = 0x4\n\tTCPOPT_SACK_PERMIT_HDR                  = 0x1010402\n\tTCPOPT_SIGNATURE                        = 0x13\n\tTCPOPT_TIMESTAMP                        = 0x8\n\tTCPOPT_TSTAMP_HDR                       = 0x101080a\n\tTCPOPT_WINDOW                           = 0x3\n\tTCP_CONNECTIONTIMEOUT                   = 0x20\n\tTCP_CONNECTION_INFO                     = 0x106\n\tTCP_ENABLE_ECN                          = 0x104\n\tTCP_FASTOPEN                            = 0x105\n\tTCP_KEEPALIVE                           = 0x10\n\tTCP_KEEPCNT                             = 0x102\n\tTCP_KEEPINTVL                           = 0x101\n\tTCP_MAXHLEN                             = 0x3c\n\tTCP_MAXOLEN                             = 0x28\n\tTCP_MAXSEG                              = 0x2\n\tTCP_MAXWIN                              = 0xffff\n\tTCP_MAX_SACK                            = 0x4\n\tTCP_MAX_WINSHIFT                        = 0xe\n\tTCP_MINMSS                              = 0xd8\n\tTCP_MSS                                 = 0x200\n\tTCP_NODELAY                             = 0x1\n\tTCP_NOOPT                               = 0x8\n\tTCP_NOPUSH                              = 0x4\n\tTCP_NOTSENT_LOWAT                       = 0x201\n\tTCP_RXT_CONNDROPTIME                    = 0x80\n\tTCP_RXT_FINDROP                         = 0x100\n\tTCP_SENDMOREACKS                        = 0x103\n\tTCSAFLUSH                               = 0x2\n\tTIOCCBRK                                = 0x2000747a\n\tTIOCCDTR                                = 0x20007478\n\tTIOCCONS                                = 0x80047462\n\tTIOCDCDTIMESTAMP                        = 0x40107458\n\tTIOCDRAIN                               = 0x2000745e\n\tTIOCDSIMICROCODE                        = 0x20007455\n\tTIOCEXCL                                = 0x2000740d\n\tTIOCEXT                                 = 0x80047460\n\tTIOCFLUSH                               = 0x80047410\n\tTIOCGDRAINWAIT                          = 0x40047456\n\tTIOCGETA                                = 0x40487413\n\tTIOCGETD                                = 0x4004741a\n\tTIOCGPGRP                               = 0x40047477\n\tTIOCGWINSZ                              = 0x40087468\n\tTIOCIXOFF                               = 0x20007480\n\tTIOCIXON                                = 0x20007481\n\tTIOCMBIC                                = 0x8004746b\n\tTIOCMBIS                                = 0x8004746c\n\tTIOCMGDTRWAIT                           = 0x4004745a\n\tTIOCMGET                                = 0x4004746a\n\tTIOCMODG                                = 0x40047403\n\tTIOCMODS                                = 0x80047404\n\tTIOCMSDTRWAIT                           = 0x8004745b\n\tTIOCMSET                                = 0x8004746d\n\tTIOCM_CAR                               = 0x40\n\tTIOCM_CD                                = 0x40\n\tTIOCM_CTS                               = 0x20\n\tTIOCM_DSR                               = 0x100\n\tTIOCM_DTR                               = 0x2\n\tTIOCM_LE                                = 0x1\n\tTIOCM_RI                                = 0x80\n\tTIOCM_RNG                               = 0x80\n\tTIOCM_RTS                               = 0x4\n\tTIOCM_SR                                = 0x10\n\tTIOCM_ST                                = 0x8\n\tTIOCNOTTY                               = 0x20007471\n\tTIOCNXCL                                = 0x2000740e\n\tTIOCOUTQ                                = 0x40047473\n\tTIOCPKT                                 = 0x80047470\n\tTIOCPKT_DATA                            = 0x0\n\tTIOCPKT_DOSTOP                          = 0x20\n\tTIOCPKT_FLUSHREAD                       = 0x1\n\tTIOCPKT_FLUSHWRITE                      = 0x2\n\tTIOCPKT_IOCTL                           = 0x40\n\tTIOCPKT_NOSTOP                          = 0x10\n\tTIOCPKT_START                           = 0x8\n\tTIOCPKT_STOP                            = 0x4\n\tTIOCPTYGNAME                            = 0x40807453\n\tTIOCPTYGRANT                            = 0x20007454\n\tTIOCPTYUNLK                             = 0x20007452\n\tTIOCREMOTE                              = 0x80047469\n\tTIOCSBRK                                = 0x2000747b\n\tTIOCSCONS                               = 0x20007463\n\tTIOCSCTTY                               = 0x20007461\n\tTIOCSDRAINWAIT                          = 0x80047457\n\tTIOCSDTR                                = 0x20007479\n\tTIOCSETA                                = 0x80487414\n\tTIOCSETAF                               = 0x80487416\n\tTIOCSETAW                               = 0x80487415\n\tTIOCSETD                                = 0x8004741b\n\tTIOCSIG                                 = 0x2000745f\n\tTIOCSPGRP                               = 0x80047476\n\tTIOCSTART                               = 0x2000746e\n\tTIOCSTAT                                = 0x20007465\n\tTIOCSTI                                 = 0x80017472\n\tTIOCSTOP                                = 0x2000746f\n\tTIOCSWINSZ                              = 0x80087467\n\tTIOCTIMESTAMP                           = 0x40107459\n\tTIOCUCNTL                               = 0x80047466\n\tTOSTOP                                  = 0x400000\n\tUF_APPEND                               = 0x4\n\tUF_COMPRESSED                           = 0x20\n\tUF_DATAVAULT                            = 0x80\n\tUF_HIDDEN                               = 0x8000\n\tUF_IMMUTABLE                            = 0x2\n\tUF_NODUMP                               = 0x1\n\tUF_OPAQUE                               = 0x8\n\tUF_SETTABLE                             = 0xffff\n\tUF_TRACKED                              = 0x40\n\tVDISCARD                                = 0xf\n\tVDSUSP                                  = 0xb\n\tVEOF                                    = 0x0\n\tVEOL                                    = 0x1\n\tVEOL2                                   = 0x2\n\tVERASE                                  = 0x3\n\tVINTR                                   = 0x8\n\tVKILL                                   = 0x5\n\tVLNEXT                                  = 0xe\n\tVMADDR_CID_ANY                          = 0xffffffff\n\tVMADDR_CID_HOST                         = 0x2\n\tVMADDR_CID_HYPERVISOR                   = 0x0\n\tVMADDR_CID_RESERVED                     = 0x1\n\tVMADDR_PORT_ANY                         = 0xffffffff\n\tVMIN                                    = 0x10\n\tVM_LOADAVG                              = 0x2\n\tVM_MACHFACTOR                           = 0x4\n\tVM_MAXID                                = 0x6\n\tVM_METER                                = 0x1\n\tVM_SWAPUSAGE                            = 0x5\n\tVQUIT                                   = 0x9\n\tVREPRINT                                = 0x6\n\tVSTART                                  = 0xc\n\tVSTATUS                                 = 0x12\n\tVSTOP                                   = 0xd\n\tVSUSP                                   = 0xa\n\tVT0                                     = 0x0\n\tVT1                                     = 0x10000\n\tVTDLY                                   = 0x10000\n\tVTIME                                   = 0x11\n\tVWERASE                                 = 0x4\n\tWCONTINUED                              = 0x10\n\tWCOREFLAG                               = 0x80\n\tWEXITED                                 = 0x4\n\tWNOHANG                                 = 0x1\n\tWNOWAIT                                 = 0x20\n\tWORDSIZE                                = 0x40\n\tWSTOPPED                                = 0x8\n\tWUNTRACED                               = 0x2\n\tXATTR_CREATE                            = 0x2\n\tXATTR_NODEFAULT                         = 0x10\n\tXATTR_NOFOLLOW                          = 0x1\n\tXATTR_NOSECURITY                        = 0x8\n\tXATTR_REPLACE                           = 0x4\n\tXATTR_SHOWCOMPRESSION                   = 0x20\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADARCH        = syscall.Errno(0x56)\n\tEBADEXEC        = syscall.Errno(0x55)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMACHO       = syscall.Errno(0x58)\n\tEBADMSG         = syscall.Errno(0x5e)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x59)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDEVERR         = syscall.Errno(0x53)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x5a)\n\tEILSEQ          = syscall.Errno(0x5c)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x6a)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5f)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x60)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x61)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5b)\n\tENOPOLICY       = syscall.Errno(0x67)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x62)\n\tENOSTR          = syscall.Errno(0x63)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x68)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x66)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x69)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x64)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tEPWROFF         = syscall.Errno(0x52)\n\tEQFULL          = syscall.Errno(0x6a)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHLIBVERS      = syscall.Errno(0x57)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x65)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"ENOTSUP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EPWROFF\", \"device power is off\"},\n\t{83, \"EDEVERR\", \"device error\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EBADEXEC\", \"bad executable (or shared library)\"},\n\t{86, \"EBADARCH\", \"bad CPU type in executable\"},\n\t{87, \"ESHLIBVERS\", \"shared library version mismatch\"},\n\t{88, \"EBADMACHO\", \"malformed Mach-o file\"},\n\t{89, \"ECANCELED\", \"operation canceled\"},\n\t{90, \"EIDRM\", \"identifier removed\"},\n\t{91, \"ENOMSG\", \"no message of desired type\"},\n\t{92, \"EILSEQ\", \"illegal byte sequence\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EBADMSG\", \"bad message\"},\n\t{95, \"EMULTIHOP\", \"EMULTIHOP (Reserved)\"},\n\t{96, \"ENODATA\", \"no message available on STREAM\"},\n\t{97, \"ENOLINK\", \"ENOLINK (Reserved)\"},\n\t{98, \"ENOSR\", \"no STREAM resources\"},\n\t{99, \"ENOSTR\", \"not a STREAM\"},\n\t{100, \"EPROTO\", \"protocol error\"},\n\t{101, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{102, \"EOPNOTSUPP\", \"operation not supported on socket\"},\n\t{103, \"ENOPOLICY\", \"policy not found\"},\n\t{104, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{105, \"EOWNERDEAD\", \"previous owner died\"},\n\t{106, \"EQFULL\", \"interface output queue is full\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGABRT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && darwin\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                            = 0x10\n\tAF_CCITT                                = 0xa\n\tAF_CHAOS                                = 0x5\n\tAF_CNT                                  = 0x15\n\tAF_COIP                                 = 0x14\n\tAF_DATAKIT                              = 0x9\n\tAF_DECnet                               = 0xc\n\tAF_DLI                                  = 0xd\n\tAF_E164                                 = 0x1c\n\tAF_ECMA                                 = 0x8\n\tAF_HYLINK                               = 0xf\n\tAF_IEEE80211                            = 0x25\n\tAF_IMPLINK                              = 0x3\n\tAF_INET                                 = 0x2\n\tAF_INET6                                = 0x1e\n\tAF_IPX                                  = 0x17\n\tAF_ISDN                                 = 0x1c\n\tAF_ISO                                  = 0x7\n\tAF_LAT                                  = 0xe\n\tAF_LINK                                 = 0x12\n\tAF_LOCAL                                = 0x1\n\tAF_MAX                                  = 0x29\n\tAF_NATM                                 = 0x1f\n\tAF_NDRV                                 = 0x1b\n\tAF_NETBIOS                              = 0x21\n\tAF_NS                                   = 0x6\n\tAF_OSI                                  = 0x7\n\tAF_PPP                                  = 0x22\n\tAF_PUP                                  = 0x4\n\tAF_RESERVED_36                          = 0x24\n\tAF_ROUTE                                = 0x11\n\tAF_SIP                                  = 0x18\n\tAF_SNA                                  = 0xb\n\tAF_SYSTEM                               = 0x20\n\tAF_SYS_CONTROL                          = 0x2\n\tAF_UNIX                                 = 0x1\n\tAF_UNSPEC                               = 0x0\n\tAF_UTUN                                 = 0x26\n\tAF_VSOCK                                = 0x28\n\tALTWERASE                               = 0x200\n\tATTR_BIT_MAP_COUNT                      = 0x5\n\tATTR_CMN_ACCESSMASK                     = 0x20000\n\tATTR_CMN_ACCTIME                        = 0x1000\n\tATTR_CMN_ADDEDTIME                      = 0x10000000\n\tATTR_CMN_BKUPTIME                       = 0x2000\n\tATTR_CMN_CHGTIME                        = 0x800\n\tATTR_CMN_CRTIME                         = 0x200\n\tATTR_CMN_DATA_PROTECT_FLAGS             = 0x40000000\n\tATTR_CMN_DEVID                          = 0x2\n\tATTR_CMN_DOCUMENT_ID                    = 0x100000\n\tATTR_CMN_ERROR                          = 0x20000000\n\tATTR_CMN_EXTENDED_SECURITY              = 0x400000\n\tATTR_CMN_FILEID                         = 0x2000000\n\tATTR_CMN_FLAGS                          = 0x40000\n\tATTR_CMN_FNDRINFO                       = 0x4000\n\tATTR_CMN_FSID                           = 0x4\n\tATTR_CMN_FULLPATH                       = 0x8000000\n\tATTR_CMN_GEN_COUNT                      = 0x80000\n\tATTR_CMN_GRPID                          = 0x10000\n\tATTR_CMN_GRPUUID                        = 0x1000000\n\tATTR_CMN_MODTIME                        = 0x400\n\tATTR_CMN_NAME                           = 0x1\n\tATTR_CMN_NAMEDATTRCOUNT                 = 0x80000\n\tATTR_CMN_NAMEDATTRLIST                  = 0x100000\n\tATTR_CMN_OBJID                          = 0x20\n\tATTR_CMN_OBJPERMANENTID                 = 0x40\n\tATTR_CMN_OBJTAG                         = 0x10\n\tATTR_CMN_OBJTYPE                        = 0x8\n\tATTR_CMN_OWNERID                        = 0x8000\n\tATTR_CMN_PARENTID                       = 0x4000000\n\tATTR_CMN_PAROBJID                       = 0x80\n\tATTR_CMN_RETURNED_ATTRS                 = 0x80000000\n\tATTR_CMN_SCRIPT                         = 0x100\n\tATTR_CMN_SETMASK                        = 0x51c7ff00\n\tATTR_CMN_USERACCESS                     = 0x200000\n\tATTR_CMN_UUID                           = 0x800000\n\tATTR_CMN_VALIDMASK                      = 0xffffffff\n\tATTR_CMN_VOLSETMASK                     = 0x6700\n\tATTR_FILE_ALLOCSIZE                     = 0x4\n\tATTR_FILE_CLUMPSIZE                     = 0x10\n\tATTR_FILE_DATAALLOCSIZE                 = 0x400\n\tATTR_FILE_DATAEXTENTS                   = 0x800\n\tATTR_FILE_DATALENGTH                    = 0x200\n\tATTR_FILE_DEVTYPE                       = 0x20\n\tATTR_FILE_FILETYPE                      = 0x40\n\tATTR_FILE_FORKCOUNT                     = 0x80\n\tATTR_FILE_FORKLIST                      = 0x100\n\tATTR_FILE_IOBLOCKSIZE                   = 0x8\n\tATTR_FILE_LINKCOUNT                     = 0x1\n\tATTR_FILE_RSRCALLOCSIZE                 = 0x2000\n\tATTR_FILE_RSRCEXTENTS                   = 0x4000\n\tATTR_FILE_RSRCLENGTH                    = 0x1000\n\tATTR_FILE_SETMASK                       = 0x20\n\tATTR_FILE_TOTALSIZE                     = 0x2\n\tATTR_FILE_VALIDMASK                     = 0x37ff\n\tATTR_VOL_ALLOCATIONCLUMP                = 0x40\n\tATTR_VOL_ATTRIBUTES                     = 0x40000000\n\tATTR_VOL_CAPABILITIES                   = 0x20000\n\tATTR_VOL_DIRCOUNT                       = 0x400\n\tATTR_VOL_ENCODINGSUSED                  = 0x10000\n\tATTR_VOL_FILECOUNT                      = 0x200\n\tATTR_VOL_FSTYPE                         = 0x1\n\tATTR_VOL_INFO                           = 0x80000000\n\tATTR_VOL_IOBLOCKSIZE                    = 0x80\n\tATTR_VOL_MAXOBJCOUNT                    = 0x800\n\tATTR_VOL_MINALLOCATION                  = 0x20\n\tATTR_VOL_MOUNTEDDEVICE                  = 0x8000\n\tATTR_VOL_MOUNTFLAGS                     = 0x4000\n\tATTR_VOL_MOUNTPOINT                     = 0x1000\n\tATTR_VOL_NAME                           = 0x2000\n\tATTR_VOL_OBJCOUNT                       = 0x100\n\tATTR_VOL_QUOTA_SIZE                     = 0x10000000\n\tATTR_VOL_RESERVED_SIZE                  = 0x20000000\n\tATTR_VOL_SETMASK                        = 0x80002000\n\tATTR_VOL_SIGNATURE                      = 0x2\n\tATTR_VOL_SIZE                           = 0x4\n\tATTR_VOL_SPACEAVAIL                     = 0x10\n\tATTR_VOL_SPACEFREE                      = 0x8\n\tATTR_VOL_SPACEUSED                      = 0x800000\n\tATTR_VOL_UUID                           = 0x40000\n\tATTR_VOL_VALIDMASK                      = 0xf087ffff\n\tB0                                      = 0x0\n\tB110                                    = 0x6e\n\tB115200                                 = 0x1c200\n\tB1200                                   = 0x4b0\n\tB134                                    = 0x86\n\tB14400                                  = 0x3840\n\tB150                                    = 0x96\n\tB1800                                   = 0x708\n\tB19200                                  = 0x4b00\n\tB200                                    = 0xc8\n\tB230400                                 = 0x38400\n\tB2400                                   = 0x960\n\tB28800                                  = 0x7080\n\tB300                                    = 0x12c\n\tB38400                                  = 0x9600\n\tB4800                                   = 0x12c0\n\tB50                                     = 0x32\n\tB57600                                  = 0xe100\n\tB600                                    = 0x258\n\tB7200                                   = 0x1c20\n\tB75                                     = 0x4b\n\tB76800                                  = 0x12c00\n\tB9600                                   = 0x2580\n\tBIOCFLUSH                               = 0x20004268\n\tBIOCGBLEN                               = 0x40044266\n\tBIOCGDLT                                = 0x4004426a\n\tBIOCGDLTLIST                            = 0xc00c4279\n\tBIOCGETIF                               = 0x4020426b\n\tBIOCGHDRCMPLT                           = 0x40044274\n\tBIOCGRSIG                               = 0x40044272\n\tBIOCGRTIMEOUT                           = 0x4010426e\n\tBIOCGSEESENT                            = 0x40044276\n\tBIOCGSTATS                              = 0x4008426f\n\tBIOCIMMEDIATE                           = 0x80044270\n\tBIOCPROMISC                             = 0x20004269\n\tBIOCSBLEN                               = 0xc0044266\n\tBIOCSDLT                                = 0x80044278\n\tBIOCSETF                                = 0x80104267\n\tBIOCSETFNR                              = 0x8010427e\n\tBIOCSETIF                               = 0x8020426c\n\tBIOCSHDRCMPLT                           = 0x80044275\n\tBIOCSRSIG                               = 0x80044273\n\tBIOCSRTIMEOUT                           = 0x8010426d\n\tBIOCSSEESENT                            = 0x80044277\n\tBIOCVERSION                             = 0x40044271\n\tBPF_A                                   = 0x10\n\tBPF_ABS                                 = 0x20\n\tBPF_ADD                                 = 0x0\n\tBPF_ALIGNMENT                           = 0x4\n\tBPF_ALU                                 = 0x4\n\tBPF_AND                                 = 0x50\n\tBPF_B                                   = 0x10\n\tBPF_DIV                                 = 0x30\n\tBPF_H                                   = 0x8\n\tBPF_IMM                                 = 0x0\n\tBPF_IND                                 = 0x40\n\tBPF_JA                                  = 0x0\n\tBPF_JEQ                                 = 0x10\n\tBPF_JGE                                 = 0x30\n\tBPF_JGT                                 = 0x20\n\tBPF_JMP                                 = 0x5\n\tBPF_JSET                                = 0x40\n\tBPF_K                                   = 0x0\n\tBPF_LD                                  = 0x0\n\tBPF_LDX                                 = 0x1\n\tBPF_LEN                                 = 0x80\n\tBPF_LSH                                 = 0x60\n\tBPF_MAJOR_VERSION                       = 0x1\n\tBPF_MAXBUFSIZE                          = 0x80000\n\tBPF_MAXINSNS                            = 0x200\n\tBPF_MEM                                 = 0x60\n\tBPF_MEMWORDS                            = 0x10\n\tBPF_MINBUFSIZE                          = 0x20\n\tBPF_MINOR_VERSION                       = 0x1\n\tBPF_MISC                                = 0x7\n\tBPF_MSH                                 = 0xa0\n\tBPF_MUL                                 = 0x20\n\tBPF_NEG                                 = 0x80\n\tBPF_OR                                  = 0x40\n\tBPF_RELEASE                             = 0x30bb6\n\tBPF_RET                                 = 0x6\n\tBPF_RSH                                 = 0x70\n\tBPF_ST                                  = 0x2\n\tBPF_STX                                 = 0x3\n\tBPF_SUB                                 = 0x10\n\tBPF_TAX                                 = 0x0\n\tBPF_TXA                                 = 0x80\n\tBPF_W                                   = 0x0\n\tBPF_X                                   = 0x8\n\tBRKINT                                  = 0x2\n\tBS0                                     = 0x0\n\tBS1                                     = 0x8000\n\tBSDLY                                   = 0x8000\n\tCFLUSH                                  = 0xf\n\tCLOCAL                                  = 0x8000\n\tCLOCK_MONOTONIC                         = 0x6\n\tCLOCK_MONOTONIC_RAW                     = 0x4\n\tCLOCK_MONOTONIC_RAW_APPROX              = 0x5\n\tCLOCK_PROCESS_CPUTIME_ID                = 0xc\n\tCLOCK_REALTIME                          = 0x0\n\tCLOCK_THREAD_CPUTIME_ID                 = 0x10\n\tCLOCK_UPTIME_RAW                        = 0x8\n\tCLOCK_UPTIME_RAW_APPROX                 = 0x9\n\tCLONE_NOFOLLOW                          = 0x1\n\tCLONE_NOOWNERCOPY                       = 0x2\n\tCONNECT_DATA_AUTHENTICATED              = 0x4\n\tCONNECT_DATA_IDEMPOTENT                 = 0x2\n\tCONNECT_RESUME_ON_READ_WRITE            = 0x1\n\tCR0                                     = 0x0\n\tCR1                                     = 0x1000\n\tCR2                                     = 0x2000\n\tCR3                                     = 0x3000\n\tCRDLY                                   = 0x3000\n\tCREAD                                   = 0x800\n\tCRTSCTS                                 = 0x30000\n\tCS5                                     = 0x0\n\tCS6                                     = 0x100\n\tCS7                                     = 0x200\n\tCS8                                     = 0x300\n\tCSIZE                                   = 0x300\n\tCSTART                                  = 0x11\n\tCSTATUS                                 = 0x14\n\tCSTOP                                   = 0x13\n\tCSTOPB                                  = 0x400\n\tCSUSP                                   = 0x1a\n\tCTLIOCGINFO                             = 0xc0644e03\n\tCTL_HW                                  = 0x6\n\tCTL_KERN                                = 0x1\n\tCTL_MAXNAME                             = 0xc\n\tCTL_NET                                 = 0x4\n\tDLT_A429                                = 0xb8\n\tDLT_A653_ICM                            = 0xb9\n\tDLT_AIRONET_HEADER                      = 0x78\n\tDLT_AOS                                 = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394              = 0x8a\n\tDLT_ARCNET                              = 0x7\n\tDLT_ARCNET_LINUX                        = 0x81\n\tDLT_ATM_CLIP                            = 0x13\n\tDLT_ATM_RFC1483                         = 0xb\n\tDLT_AURORA                              = 0x7e\n\tDLT_AX25                                = 0x3\n\tDLT_AX25_KISS                           = 0xca\n\tDLT_BACNET_MS_TP                        = 0xa5\n\tDLT_BLUETOOTH_HCI_H4                    = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR          = 0xc9\n\tDLT_CAN20B                              = 0xbe\n\tDLT_CAN_SOCKETCAN                       = 0xe3\n\tDLT_CHAOS                               = 0x5\n\tDLT_CHDLC                               = 0x68\n\tDLT_CISCO_IOS                           = 0x76\n\tDLT_C_HDLC                              = 0x68\n\tDLT_C_HDLC_WITH_DIR                     = 0xcd\n\tDLT_DBUS                                = 0xe7\n\tDLT_DECT                                = 0xdd\n\tDLT_DOCSIS                              = 0x8f\n\tDLT_DVB_CI                              = 0xeb\n\tDLT_ECONET                              = 0x73\n\tDLT_EN10MB                              = 0x1\n\tDLT_EN3MB                               = 0x2\n\tDLT_ENC                                 = 0x6d\n\tDLT_ERF                                 = 0xc5\n\tDLT_ERF_ETH                             = 0xaf\n\tDLT_ERF_POS                             = 0xb0\n\tDLT_FC_2                                = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS              = 0xe1\n\tDLT_FDDI                                = 0xa\n\tDLT_FLEXRAY                             = 0xd2\n\tDLT_FRELAY                              = 0x6b\n\tDLT_FRELAY_WITH_DIR                     = 0xce\n\tDLT_GCOM_SERIAL                         = 0xad\n\tDLT_GCOM_T1E1                           = 0xac\n\tDLT_GPF_F                               = 0xab\n\tDLT_GPF_T                               = 0xaa\n\tDLT_GPRS_LLC                            = 0xa9\n\tDLT_GSMTAP_ABIS                         = 0xda\n\tDLT_GSMTAP_UM                           = 0xd9\n\tDLT_HHDLC                               = 0x79\n\tDLT_IBM_SN                              = 0x92\n\tDLT_IBM_SP                              = 0x91\n\tDLT_IEEE802                             = 0x6\n\tDLT_IEEE802_11                          = 0x69\n\tDLT_IEEE802_11_RADIO                    = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS                = 0xa3\n\tDLT_IEEE802_15_4                        = 0xc3\n\tDLT_IEEE802_15_4_LINUX                  = 0xbf\n\tDLT_IEEE802_15_4_NOFCS                  = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY             = 0xd7\n\tDLT_IEEE802_16_MAC_CPS                  = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO            = 0xc1\n\tDLT_IPFILTER                            = 0x74\n\tDLT_IPMB                                = 0xc7\n\tDLT_IPMB_LINUX                          = 0xd1\n\tDLT_IPNET                               = 0xe2\n\tDLT_IPOIB                               = 0xf2\n\tDLT_IPV4                                = 0xe4\n\tDLT_IPV6                                = 0xe5\n\tDLT_IP_OVER_FC                          = 0x7a\n\tDLT_JUNIPER_ATM1                        = 0x89\n\tDLT_JUNIPER_ATM2                        = 0x87\n\tDLT_JUNIPER_ATM_CEMIC                   = 0xee\n\tDLT_JUNIPER_CHDLC                       = 0xb5\n\tDLT_JUNIPER_ES                          = 0x84\n\tDLT_JUNIPER_ETHER                       = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL                = 0xea\n\tDLT_JUNIPER_FRELAY                      = 0xb4\n\tDLT_JUNIPER_GGSN                        = 0x85\n\tDLT_JUNIPER_ISM                         = 0xc2\n\tDLT_JUNIPER_MFR                         = 0x86\n\tDLT_JUNIPER_MLFR                        = 0x83\n\tDLT_JUNIPER_MLPPP                       = 0x82\n\tDLT_JUNIPER_MONITOR                     = 0xa4\n\tDLT_JUNIPER_PIC_PEER                    = 0xae\n\tDLT_JUNIPER_PPP                         = 0xb3\n\tDLT_JUNIPER_PPPOE                       = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM                   = 0xa8\n\tDLT_JUNIPER_SERVICES                    = 0x88\n\tDLT_JUNIPER_SRX_E2E                     = 0xe9\n\tDLT_JUNIPER_ST                          = 0xc8\n\tDLT_JUNIPER_VP                          = 0xb7\n\tDLT_JUNIPER_VS                          = 0xe8\n\tDLT_LAPB_WITH_DIR                       = 0xcf\n\tDLT_LAPD                                = 0xcb\n\tDLT_LIN                                 = 0xd4\n\tDLT_LINUX_EVDEV                         = 0xd8\n\tDLT_LINUX_IRDA                          = 0x90\n\tDLT_LINUX_LAPD                          = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION             = 0xa6\n\tDLT_LINUX_SLL                           = 0x71\n\tDLT_LOOP                                = 0x6c\n\tDLT_LTALK                               = 0x72\n\tDLT_MATCHING_MAX                        = 0x10a\n\tDLT_MATCHING_MIN                        = 0x68\n\tDLT_MFR                                 = 0xb6\n\tDLT_MOST                                = 0xd3\n\tDLT_MPEG_2_TS                           = 0xf3\n\tDLT_MPLS                                = 0xdb\n\tDLT_MTP2                                = 0x8c\n\tDLT_MTP2_WITH_PHDR                      = 0x8b\n\tDLT_MTP3                                = 0x8d\n\tDLT_MUX27010                            = 0xec\n\tDLT_NETANALYZER                         = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT             = 0xf1\n\tDLT_NFC_LLCP                            = 0xf5\n\tDLT_NFLOG                               = 0xef\n\tDLT_NG40                                = 0xf4\n\tDLT_NULL                                = 0x0\n\tDLT_PCI_EXP                             = 0x7d\n\tDLT_PFLOG                               = 0x75\n\tDLT_PFSYNC                              = 0x12\n\tDLT_PPI                                 = 0xc0\n\tDLT_PPP                                 = 0x9\n\tDLT_PPP_BSDOS                           = 0x10\n\tDLT_PPP_ETHER                           = 0x33\n\tDLT_PPP_PPPD                            = 0xa6\n\tDLT_PPP_SERIAL                          = 0x32\n\tDLT_PPP_WITH_DIR                        = 0xcc\n\tDLT_PPP_WITH_DIRECTION                  = 0xa6\n\tDLT_PRISM_HEADER                        = 0x77\n\tDLT_PRONET                              = 0x4\n\tDLT_RAIF1                               = 0xc6\n\tDLT_RAW                                 = 0xc\n\tDLT_RIO                                 = 0x7c\n\tDLT_SCCP                                = 0x8e\n\tDLT_SITA                                = 0xc4\n\tDLT_SLIP                                = 0x8\n\tDLT_SLIP_BSDOS                          = 0xf\n\tDLT_STANAG_5066_D_PDU                   = 0xed\n\tDLT_SUNATM                              = 0x7b\n\tDLT_SYMANTEC_FIREWALL                   = 0x63\n\tDLT_TZSP                                = 0x80\n\tDLT_USB                                 = 0xba\n\tDLT_USB_DARWIN                          = 0x10a\n\tDLT_USB_LINUX                           = 0xbd\n\tDLT_USB_LINUX_MMAPPED                   = 0xdc\n\tDLT_USER0                               = 0x93\n\tDLT_USER1                               = 0x94\n\tDLT_USER10                              = 0x9d\n\tDLT_USER11                              = 0x9e\n\tDLT_USER12                              = 0x9f\n\tDLT_USER13                              = 0xa0\n\tDLT_USER14                              = 0xa1\n\tDLT_USER15                              = 0xa2\n\tDLT_USER2                               = 0x95\n\tDLT_USER3                               = 0x96\n\tDLT_USER4                               = 0x97\n\tDLT_USER5                               = 0x98\n\tDLT_USER6                               = 0x99\n\tDLT_USER7                               = 0x9a\n\tDLT_USER8                               = 0x9b\n\tDLT_USER9                               = 0x9c\n\tDLT_WIHART                              = 0xdf\n\tDLT_X2E_SERIAL                          = 0xd5\n\tDLT_X2E_XORAYA                          = 0xd6\n\tDT_BLK                                  = 0x6\n\tDT_CHR                                  = 0x2\n\tDT_DIR                                  = 0x4\n\tDT_FIFO                                 = 0x1\n\tDT_LNK                                  = 0xa\n\tDT_REG                                  = 0x8\n\tDT_SOCK                                 = 0xc\n\tDT_UNKNOWN                              = 0x0\n\tDT_WHT                                  = 0xe\n\tECHO                                    = 0x8\n\tECHOCTL                                 = 0x40\n\tECHOE                                   = 0x2\n\tECHOK                                   = 0x4\n\tECHOKE                                  = 0x1\n\tECHONL                                  = 0x10\n\tECHOPRT                                 = 0x20\n\tEVFILT_AIO                              = -0x3\n\tEVFILT_EXCEPT                           = -0xf\n\tEVFILT_FS                               = -0x9\n\tEVFILT_MACHPORT                         = -0x8\n\tEVFILT_PROC                             = -0x5\n\tEVFILT_READ                             = -0x1\n\tEVFILT_SIGNAL                           = -0x6\n\tEVFILT_SYSCOUNT                         = 0x11\n\tEVFILT_THREADMARKER                     = 0x11\n\tEVFILT_TIMER                            = -0x7\n\tEVFILT_USER                             = -0xa\n\tEVFILT_VM                               = -0xc\n\tEVFILT_VNODE                            = -0x4\n\tEVFILT_WRITE                            = -0x2\n\tEV_ADD                                  = 0x1\n\tEV_CLEAR                                = 0x20\n\tEV_DELETE                               = 0x2\n\tEV_DISABLE                              = 0x8\n\tEV_DISPATCH                             = 0x80\n\tEV_DISPATCH2                            = 0x180\n\tEV_ENABLE                               = 0x4\n\tEV_EOF                                  = 0x8000\n\tEV_ERROR                                = 0x4000\n\tEV_FLAG0                                = 0x1000\n\tEV_FLAG1                                = 0x2000\n\tEV_ONESHOT                              = 0x10\n\tEV_OOBAND                               = 0x2000\n\tEV_POLL                                 = 0x1000\n\tEV_RECEIPT                              = 0x40\n\tEV_SYSFLAGS                             = 0xf000\n\tEV_UDATA_SPECIFIC                       = 0x100\n\tEV_VANISHED                             = 0x200\n\tEXTA                                    = 0x4b00\n\tEXTB                                    = 0x9600\n\tEXTPROC                                 = 0x800\n\tFD_CLOEXEC                              = 0x1\n\tFD_SETSIZE                              = 0x400\n\tFF0                                     = 0x0\n\tFF1                                     = 0x4000\n\tFFDLY                                   = 0x4000\n\tFLUSHO                                  = 0x800000\n\tFSOPT_ATTR_CMN_EXTENDED                 = 0x20\n\tFSOPT_NOFOLLOW                          = 0x1\n\tFSOPT_NOINMEMUPDATE                     = 0x2\n\tFSOPT_PACK_INVAL_ATTRS                  = 0x8\n\tFSOPT_REPORT_FULLSIZE                   = 0x4\n\tFSOPT_RETURN_REALDEV                    = 0x200\n\tF_ADDFILESIGS                           = 0x3d\n\tF_ADDFILESIGS_FOR_DYLD_SIM              = 0x53\n\tF_ADDFILESIGS_INFO                      = 0x67\n\tF_ADDFILESIGS_RETURN                    = 0x61\n\tF_ADDFILESUPPL                          = 0x68\n\tF_ADDSIGS                               = 0x3b\n\tF_ALLOCATEALL                           = 0x4\n\tF_ALLOCATECONTIG                        = 0x2\n\tF_BARRIERFSYNC                          = 0x55\n\tF_CHECK_LV                              = 0x62\n\tF_CHKCLEAN                              = 0x29\n\tF_DUPFD                                 = 0x0\n\tF_DUPFD_CLOEXEC                         = 0x43\n\tF_FINDSIGS                              = 0x4e\n\tF_FLUSH_DATA                            = 0x28\n\tF_FREEZE_FS                             = 0x35\n\tF_FULLFSYNC                             = 0x33\n\tF_GETCODEDIR                            = 0x48\n\tF_GETFD                                 = 0x1\n\tF_GETFL                                 = 0x3\n\tF_GETLK                                 = 0x7\n\tF_GETLKPID                              = 0x42\n\tF_GETNOSIGPIPE                          = 0x4a\n\tF_GETOWN                                = 0x5\n\tF_GETPATH                               = 0x32\n\tF_GETPATH_MTMINFO                       = 0x47\n\tF_GETPATH_NOFIRMLINK                    = 0x66\n\tF_GETPROTECTIONCLASS                    = 0x3f\n\tF_GETPROTECTIONLEVEL                    = 0x4d\n\tF_GETSIGSINFO                           = 0x69\n\tF_GLOBAL_NOCACHE                        = 0x37\n\tF_LOG2PHYS                              = 0x31\n\tF_LOG2PHYS_EXT                          = 0x41\n\tF_NOCACHE                               = 0x30\n\tF_NODIRECT                              = 0x3e\n\tF_OK                                    = 0x0\n\tF_PATHPKG_CHECK                         = 0x34\n\tF_PEOFPOSMODE                           = 0x3\n\tF_PREALLOCATE                           = 0x2a\n\tF_PUNCHHOLE                             = 0x63\n\tF_RDADVISE                              = 0x2c\n\tF_RDAHEAD                               = 0x2d\n\tF_RDLCK                                 = 0x1\n\tF_SETBACKINGSTORE                       = 0x46\n\tF_SETFD                                 = 0x2\n\tF_SETFL                                 = 0x4\n\tF_SETLK                                 = 0x8\n\tF_SETLKW                                = 0x9\n\tF_SETLKWTIMEOUT                         = 0xa\n\tF_SETNOSIGPIPE                          = 0x49\n\tF_SETOWN                                = 0x6\n\tF_SETPROTECTIONCLASS                    = 0x40\n\tF_SETSIZE                               = 0x2b\n\tF_SINGLE_WRITER                         = 0x4c\n\tF_SPECULATIVE_READ                      = 0x65\n\tF_THAW_FS                               = 0x36\n\tF_TRANSCODEKEY                          = 0x4b\n\tF_TRIM_ACTIVE_FILE                      = 0x64\n\tF_UNLCK                                 = 0x2\n\tF_VOLPOSMODE                            = 0x4\n\tF_WRLCK                                 = 0x3\n\tHUPCL                                   = 0x4000\n\tHW_MACHINE                              = 0x1\n\tICANON                                  = 0x100\n\tICMP6_FILTER                            = 0x12\n\tICRNL                                   = 0x100\n\tIEXTEN                                  = 0x400\n\tIFF_ALLMULTI                            = 0x200\n\tIFF_ALTPHYS                             = 0x4000\n\tIFF_BROADCAST                           = 0x2\n\tIFF_DEBUG                               = 0x4\n\tIFF_LINK0                               = 0x1000\n\tIFF_LINK1                               = 0x2000\n\tIFF_LINK2                               = 0x4000\n\tIFF_LOOPBACK                            = 0x8\n\tIFF_MULTICAST                           = 0x8000\n\tIFF_NOARP                               = 0x80\n\tIFF_NOTRAILERS                          = 0x20\n\tIFF_OACTIVE                             = 0x400\n\tIFF_POINTOPOINT                         = 0x10\n\tIFF_PROMISC                             = 0x100\n\tIFF_RUNNING                             = 0x40\n\tIFF_SIMPLEX                             = 0x800\n\tIFF_UP                                  = 0x1\n\tIFNAMSIZ                                = 0x10\n\tIFT_1822                                = 0x2\n\tIFT_6LOWPAN                             = 0x40\n\tIFT_AAL5                                = 0x31\n\tIFT_ARCNET                              = 0x23\n\tIFT_ARCNETPLUS                          = 0x24\n\tIFT_ATM                                 = 0x25\n\tIFT_BRIDGE                              = 0xd1\n\tIFT_CARP                                = 0xf8\n\tIFT_CELLULAR                            = 0xff\n\tIFT_CEPT                                = 0x13\n\tIFT_DS3                                 = 0x1e\n\tIFT_ENC                                 = 0xf4\n\tIFT_EON                                 = 0x19\n\tIFT_ETHER                               = 0x6\n\tIFT_FAITH                               = 0x38\n\tIFT_FDDI                                = 0xf\n\tIFT_FRELAY                              = 0x20\n\tIFT_FRELAYDCE                           = 0x2c\n\tIFT_GIF                                 = 0x37\n\tIFT_HDH1822                             = 0x3\n\tIFT_HIPPI                               = 0x2f\n\tIFT_HSSI                                = 0x2e\n\tIFT_HY                                  = 0xe\n\tIFT_IEEE1394                            = 0x90\n\tIFT_IEEE8023ADLAG                       = 0x88\n\tIFT_ISDNBASIC                           = 0x14\n\tIFT_ISDNPRIMARY                         = 0x15\n\tIFT_ISO88022LLC                         = 0x29\n\tIFT_ISO88023                            = 0x7\n\tIFT_ISO88024                            = 0x8\n\tIFT_ISO88025                            = 0x9\n\tIFT_ISO88026                            = 0xa\n\tIFT_L2VLAN                              = 0x87\n\tIFT_LAPB                                = 0x10\n\tIFT_LOCALTALK                           = 0x2a\n\tIFT_LOOP                                = 0x18\n\tIFT_MIOX25                              = 0x26\n\tIFT_MODEM                               = 0x30\n\tIFT_NSIP                                = 0x1b\n\tIFT_OTHER                               = 0x1\n\tIFT_P10                                 = 0xc\n\tIFT_P80                                 = 0xd\n\tIFT_PARA                                = 0x22\n\tIFT_PDP                                 = 0xff\n\tIFT_PFLOG                               = 0xf5\n\tIFT_PFSYNC                              = 0xf6\n\tIFT_PKTAP                               = 0xfe\n\tIFT_PPP                                 = 0x17\n\tIFT_PROPMUX                             = 0x36\n\tIFT_PROPVIRTUAL                         = 0x35\n\tIFT_PTPSERIAL                           = 0x16\n\tIFT_RS232                               = 0x21\n\tIFT_SDLC                                = 0x11\n\tIFT_SIP                                 = 0x1f\n\tIFT_SLIP                                = 0x1c\n\tIFT_SMDSDXI                             = 0x2b\n\tIFT_SMDSICIP                            = 0x34\n\tIFT_SONET                               = 0x27\n\tIFT_SONETPATH                           = 0x32\n\tIFT_SONETVT                             = 0x33\n\tIFT_STARLAN                             = 0xb\n\tIFT_STF                                 = 0x39\n\tIFT_T1                                  = 0x12\n\tIFT_ULTRA                               = 0x1d\n\tIFT_V35                                 = 0x2d\n\tIFT_X25                                 = 0x5\n\tIFT_X25DDN                              = 0x4\n\tIFT_X25PLE                              = 0x28\n\tIFT_XETHER                              = 0x1a\n\tIGNBRK                                  = 0x1\n\tIGNCR                                   = 0x80\n\tIGNPAR                                  = 0x4\n\tIMAXBEL                                 = 0x2000\n\tINLCR                                   = 0x40\n\tINPCK                                   = 0x10\n\tIN_CLASSA_HOST                          = 0xffffff\n\tIN_CLASSA_MAX                           = 0x80\n\tIN_CLASSA_NET                           = 0xff000000\n\tIN_CLASSA_NSHIFT                        = 0x18\n\tIN_CLASSB_HOST                          = 0xffff\n\tIN_CLASSB_MAX                           = 0x10000\n\tIN_CLASSB_NET                           = 0xffff0000\n\tIN_CLASSB_NSHIFT                        = 0x10\n\tIN_CLASSC_HOST                          = 0xff\n\tIN_CLASSC_NET                           = 0xffffff00\n\tIN_CLASSC_NSHIFT                        = 0x8\n\tIN_CLASSD_HOST                          = 0xfffffff\n\tIN_CLASSD_NET                           = 0xf0000000\n\tIN_CLASSD_NSHIFT                        = 0x1c\n\tIN_LINKLOCALNETNUM                      = 0xa9fe0000\n\tIN_LOOPBACKNET                          = 0x7f\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID          = 0x400473d1\n\tIPPROTO_3PC                             = 0x22\n\tIPPROTO_ADFS                            = 0x44\n\tIPPROTO_AH                              = 0x33\n\tIPPROTO_AHIP                            = 0x3d\n\tIPPROTO_APES                            = 0x63\n\tIPPROTO_ARGUS                           = 0xd\n\tIPPROTO_AX25                            = 0x5d\n\tIPPROTO_BHA                             = 0x31\n\tIPPROTO_BLT                             = 0x1e\n\tIPPROTO_BRSATMON                        = 0x4c\n\tIPPROTO_CFTP                            = 0x3e\n\tIPPROTO_CHAOS                           = 0x10\n\tIPPROTO_CMTP                            = 0x26\n\tIPPROTO_CPHB                            = 0x49\n\tIPPROTO_CPNX                            = 0x48\n\tIPPROTO_DDP                             = 0x25\n\tIPPROTO_DGP                             = 0x56\n\tIPPROTO_DIVERT                          = 0xfe\n\tIPPROTO_DONE                            = 0x101\n\tIPPROTO_DSTOPTS                         = 0x3c\n\tIPPROTO_EGP                             = 0x8\n\tIPPROTO_EMCON                           = 0xe\n\tIPPROTO_ENCAP                           = 0x62\n\tIPPROTO_EON                             = 0x50\n\tIPPROTO_ESP                             = 0x32\n\tIPPROTO_ETHERIP                         = 0x61\n\tIPPROTO_FRAGMENT                        = 0x2c\n\tIPPROTO_GGP                             = 0x3\n\tIPPROTO_GMTP                            = 0x64\n\tIPPROTO_GRE                             = 0x2f\n\tIPPROTO_HELLO                           = 0x3f\n\tIPPROTO_HMP                             = 0x14\n\tIPPROTO_HOPOPTS                         = 0x0\n\tIPPROTO_ICMP                            = 0x1\n\tIPPROTO_ICMPV6                          = 0x3a\n\tIPPROTO_IDP                             = 0x16\n\tIPPROTO_IDPR                            = 0x23\n\tIPPROTO_IDRP                            = 0x2d\n\tIPPROTO_IGMP                            = 0x2\n\tIPPROTO_IGP                             = 0x55\n\tIPPROTO_IGRP                            = 0x58\n\tIPPROTO_IL                              = 0x28\n\tIPPROTO_INLSP                           = 0x34\n\tIPPROTO_INP                             = 0x20\n\tIPPROTO_IP                              = 0x0\n\tIPPROTO_IPCOMP                          = 0x6c\n\tIPPROTO_IPCV                            = 0x47\n\tIPPROTO_IPEIP                           = 0x5e\n\tIPPROTO_IPIP                            = 0x4\n\tIPPROTO_IPPC                            = 0x43\n\tIPPROTO_IPV4                            = 0x4\n\tIPPROTO_IPV6                            = 0x29\n\tIPPROTO_IRTP                            = 0x1c\n\tIPPROTO_KRYPTOLAN                       = 0x41\n\tIPPROTO_LARP                            = 0x5b\n\tIPPROTO_LEAF1                           = 0x19\n\tIPPROTO_LEAF2                           = 0x1a\n\tIPPROTO_MAX                             = 0x100\n\tIPPROTO_MAXID                           = 0x34\n\tIPPROTO_MEAS                            = 0x13\n\tIPPROTO_MHRP                            = 0x30\n\tIPPROTO_MICP                            = 0x5f\n\tIPPROTO_MTP                             = 0x5c\n\tIPPROTO_MUX                             = 0x12\n\tIPPROTO_ND                              = 0x4d\n\tIPPROTO_NHRP                            = 0x36\n\tIPPROTO_NONE                            = 0x3b\n\tIPPROTO_NSP                             = 0x1f\n\tIPPROTO_NVPII                           = 0xb\n\tIPPROTO_OSPFIGP                         = 0x59\n\tIPPROTO_PGM                             = 0x71\n\tIPPROTO_PIGP                            = 0x9\n\tIPPROTO_PIM                             = 0x67\n\tIPPROTO_PRM                             = 0x15\n\tIPPROTO_PUP                             = 0xc\n\tIPPROTO_PVP                             = 0x4b\n\tIPPROTO_RAW                             = 0xff\n\tIPPROTO_RCCMON                          = 0xa\n\tIPPROTO_RDP                             = 0x1b\n\tIPPROTO_ROUTING                         = 0x2b\n\tIPPROTO_RSVP                            = 0x2e\n\tIPPROTO_RVD                             = 0x42\n\tIPPROTO_SATEXPAK                        = 0x40\n\tIPPROTO_SATMON                          = 0x45\n\tIPPROTO_SCCSP                           = 0x60\n\tIPPROTO_SCTP                            = 0x84\n\tIPPROTO_SDRP                            = 0x2a\n\tIPPROTO_SEP                             = 0x21\n\tIPPROTO_SRPC                            = 0x5a\n\tIPPROTO_ST                              = 0x7\n\tIPPROTO_SVMTP                           = 0x52\n\tIPPROTO_SWIPE                           = 0x35\n\tIPPROTO_TCF                             = 0x57\n\tIPPROTO_TCP                             = 0x6\n\tIPPROTO_TP                              = 0x1d\n\tIPPROTO_TPXX                            = 0x27\n\tIPPROTO_TRUNK1                          = 0x17\n\tIPPROTO_TRUNK2                          = 0x18\n\tIPPROTO_TTP                             = 0x54\n\tIPPROTO_UDP                             = 0x11\n\tIPPROTO_VINES                           = 0x53\n\tIPPROTO_VISA                            = 0x46\n\tIPPROTO_VMTP                            = 0x51\n\tIPPROTO_WBEXPAK                         = 0x4f\n\tIPPROTO_WBMON                           = 0x4e\n\tIPPROTO_WSN                             = 0x4a\n\tIPPROTO_XNET                            = 0xf\n\tIPPROTO_XTP                             = 0x24\n\tIPV6_2292DSTOPTS                        = 0x17\n\tIPV6_2292HOPLIMIT                       = 0x14\n\tIPV6_2292HOPOPTS                        = 0x16\n\tIPV6_2292NEXTHOP                        = 0x15\n\tIPV6_2292PKTINFO                        = 0x13\n\tIPV6_2292PKTOPTIONS                     = 0x19\n\tIPV6_2292RTHDR                          = 0x18\n\tIPV6_3542DSTOPTS                        = 0x32\n\tIPV6_3542HOPLIMIT                       = 0x2f\n\tIPV6_3542HOPOPTS                        = 0x31\n\tIPV6_3542NEXTHOP                        = 0x30\n\tIPV6_3542PKTINFO                        = 0x2e\n\tIPV6_3542RTHDR                          = 0x33\n\tIPV6_ADDR_MC_FLAGS_PREFIX               = 0x20\n\tIPV6_ADDR_MC_FLAGS_TRANSIENT            = 0x10\n\tIPV6_ADDR_MC_FLAGS_UNICAST_BASED        = 0x30\n\tIPV6_AUTOFLOWLABEL                      = 0x3b\n\tIPV6_BINDV6ONLY                         = 0x1b\n\tIPV6_BOUND_IF                           = 0x7d\n\tIPV6_CHECKSUM                           = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS             = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP             = 0x1\n\tIPV6_DEFHLIM                            = 0x40\n\tIPV6_DONTFRAG                           = 0x3e\n\tIPV6_DSTOPTS                            = 0x32\n\tIPV6_FAITH                              = 0x1d\n\tIPV6_FLOWINFO_MASK                      = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK                     = 0xffff0f00\n\tIPV6_FLOW_ECN_MASK                      = 0x3000\n\tIPV6_FRAGTTL                            = 0x3c\n\tIPV6_FW_ADD                             = 0x1e\n\tIPV6_FW_DEL                             = 0x1f\n\tIPV6_FW_FLUSH                           = 0x20\n\tIPV6_FW_GET                             = 0x22\n\tIPV6_FW_ZERO                            = 0x21\n\tIPV6_HLIMDEC                            = 0x1\n\tIPV6_HOPLIMIT                           = 0x2f\n\tIPV6_HOPOPTS                            = 0x31\n\tIPV6_IPSEC_POLICY                       = 0x1c\n\tIPV6_JOIN_GROUP                         = 0xc\n\tIPV6_LEAVE_GROUP                        = 0xd\n\tIPV6_MAXHLIM                            = 0xff\n\tIPV6_MAXOPTHDR                          = 0x800\n\tIPV6_MAXPACKET                          = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER               = 0x200\n\tIPV6_MAX_MEMBERSHIPS                    = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER                = 0x80\n\tIPV6_MIN_MEMBERSHIPS                    = 0x1f\n\tIPV6_MMTU                               = 0x500\n\tIPV6_MSFILTER                           = 0x4a\n\tIPV6_MULTICAST_HOPS                     = 0xa\n\tIPV6_MULTICAST_IF                       = 0x9\n\tIPV6_MULTICAST_LOOP                     = 0xb\n\tIPV6_NEXTHOP                            = 0x30\n\tIPV6_PATHMTU                            = 0x2c\n\tIPV6_PKTINFO                            = 0x2e\n\tIPV6_PORTRANGE                          = 0xe\n\tIPV6_PORTRANGE_DEFAULT                  = 0x0\n\tIPV6_PORTRANGE_HIGH                     = 0x1\n\tIPV6_PORTRANGE_LOW                      = 0x2\n\tIPV6_PREFER_TEMPADDR                    = 0x3f\n\tIPV6_RECVDSTOPTS                        = 0x28\n\tIPV6_RECVHOPLIMIT                       = 0x25\n\tIPV6_RECVHOPOPTS                        = 0x27\n\tIPV6_RECVPATHMTU                        = 0x2b\n\tIPV6_RECVPKTINFO                        = 0x3d\n\tIPV6_RECVRTHDR                          = 0x26\n\tIPV6_RECVTCLASS                         = 0x23\n\tIPV6_RTHDR                              = 0x33\n\tIPV6_RTHDRDSTOPTS                       = 0x39\n\tIPV6_RTHDR_LOOSE                        = 0x0\n\tIPV6_RTHDR_STRICT                       = 0x1\n\tIPV6_RTHDR_TYPE_0                       = 0x0\n\tIPV6_SOCKOPT_RESERVED1                  = 0x3\n\tIPV6_TCLASS                             = 0x24\n\tIPV6_UNICAST_HOPS                       = 0x4\n\tIPV6_USE_MIN_MTU                        = 0x2a\n\tIPV6_V6ONLY                             = 0x1b\n\tIPV6_VERSION                            = 0x60\n\tIPV6_VERSION_MASK                       = 0xf0\n\tIP_ADD_MEMBERSHIP                       = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP                = 0x46\n\tIP_BLOCK_SOURCE                         = 0x48\n\tIP_BOUND_IF                             = 0x19\n\tIP_DEFAULT_MULTICAST_LOOP               = 0x1\n\tIP_DEFAULT_MULTICAST_TTL                = 0x1\n\tIP_DF                                   = 0x4000\n\tIP_DONTFRAG                             = 0x1c\n\tIP_DROP_MEMBERSHIP                      = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP               = 0x47\n\tIP_DUMMYNET_CONFIGURE                   = 0x3c\n\tIP_DUMMYNET_DEL                         = 0x3d\n\tIP_DUMMYNET_FLUSH                       = 0x3e\n\tIP_DUMMYNET_GET                         = 0x40\n\tIP_FAITH                                = 0x16\n\tIP_FW_ADD                               = 0x28\n\tIP_FW_DEL                               = 0x29\n\tIP_FW_FLUSH                             = 0x2a\n\tIP_FW_GET                               = 0x2c\n\tIP_FW_RESETLOG                          = 0x2d\n\tIP_FW_ZERO                              = 0x2b\n\tIP_HDRINCL                              = 0x2\n\tIP_IPSEC_POLICY                         = 0x15\n\tIP_MAXPACKET                            = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER                 = 0x200\n\tIP_MAX_MEMBERSHIPS                      = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER                 = 0x80\n\tIP_MAX_SOCK_SRC_FILTER                  = 0x80\n\tIP_MF                                   = 0x2000\n\tIP_MIN_MEMBERSHIPS                      = 0x1f\n\tIP_MSFILTER                             = 0x4a\n\tIP_MSS                                  = 0x240\n\tIP_MULTICAST_IF                         = 0x9\n\tIP_MULTICAST_IFINDEX                    = 0x42\n\tIP_MULTICAST_LOOP                       = 0xb\n\tIP_MULTICAST_TTL                        = 0xa\n\tIP_MULTICAST_VIF                        = 0xe\n\tIP_NAT__XXX                             = 0x37\n\tIP_OFFMASK                              = 0x1fff\n\tIP_OLD_FW_ADD                           = 0x32\n\tIP_OLD_FW_DEL                           = 0x33\n\tIP_OLD_FW_FLUSH                         = 0x34\n\tIP_OLD_FW_GET                           = 0x36\n\tIP_OLD_FW_RESETLOG                      = 0x38\n\tIP_OLD_FW_ZERO                          = 0x35\n\tIP_OPTIONS                              = 0x1\n\tIP_PKTINFO                              = 0x1a\n\tIP_PORTRANGE                            = 0x13\n\tIP_PORTRANGE_DEFAULT                    = 0x0\n\tIP_PORTRANGE_HIGH                       = 0x1\n\tIP_PORTRANGE_LOW                        = 0x2\n\tIP_RECVDSTADDR                          = 0x7\n\tIP_RECVIF                               = 0x14\n\tIP_RECVOPTS                             = 0x5\n\tIP_RECVPKTINFO                          = 0x1a\n\tIP_RECVRETOPTS                          = 0x6\n\tIP_RECVTOS                              = 0x1b\n\tIP_RECVTTL                              = 0x18\n\tIP_RETOPTS                              = 0x8\n\tIP_RF                                   = 0x8000\n\tIP_RSVP_OFF                             = 0x10\n\tIP_RSVP_ON                              = 0xf\n\tIP_RSVP_VIF_OFF                         = 0x12\n\tIP_RSVP_VIF_ON                          = 0x11\n\tIP_STRIPHDR                             = 0x17\n\tIP_TOS                                  = 0x3\n\tIP_TRAFFIC_MGT_BACKGROUND               = 0x41\n\tIP_TTL                                  = 0x4\n\tIP_UNBLOCK_SOURCE                       = 0x49\n\tISIG                                    = 0x80\n\tISTRIP                                  = 0x20\n\tIUTF8                                   = 0x4000\n\tIXANY                                   = 0x800\n\tIXOFF                                   = 0x400\n\tIXON                                    = 0x200\n\tKERN_HOSTNAME                           = 0xa\n\tKERN_OSRELEASE                          = 0x2\n\tKERN_OSTYPE                             = 0x1\n\tKERN_VERSION                            = 0x4\n\tLOCAL_PEERCRED                          = 0x1\n\tLOCAL_PEEREPID                          = 0x3\n\tLOCAL_PEEREUUID                         = 0x5\n\tLOCAL_PEERPID                           = 0x2\n\tLOCAL_PEERTOKEN                         = 0x6\n\tLOCAL_PEERUUID                          = 0x4\n\tLOCK_EX                                 = 0x2\n\tLOCK_NB                                 = 0x4\n\tLOCK_SH                                 = 0x1\n\tLOCK_UN                                 = 0x8\n\tMADV_CAN_REUSE                          = 0x9\n\tMADV_DONTNEED                           = 0x4\n\tMADV_FREE                               = 0x5\n\tMADV_FREE_REUSABLE                      = 0x7\n\tMADV_FREE_REUSE                         = 0x8\n\tMADV_NORMAL                             = 0x0\n\tMADV_PAGEOUT                            = 0xa\n\tMADV_RANDOM                             = 0x1\n\tMADV_SEQUENTIAL                         = 0x2\n\tMADV_WILLNEED                           = 0x3\n\tMADV_ZERO_WIRED_PAGES                   = 0x6\n\tMAP_32BIT                               = 0x8000\n\tMAP_ANON                                = 0x1000\n\tMAP_ANONYMOUS                           = 0x1000\n\tMAP_COPY                                = 0x2\n\tMAP_FILE                                = 0x0\n\tMAP_FIXED                               = 0x10\n\tMAP_HASSEMAPHORE                        = 0x200\n\tMAP_JIT                                 = 0x800\n\tMAP_NOCACHE                             = 0x400\n\tMAP_NOEXTEND                            = 0x100\n\tMAP_NORESERVE                           = 0x40\n\tMAP_PRIVATE                             = 0x2\n\tMAP_RENAME                              = 0x20\n\tMAP_RESERVED0080                        = 0x80\n\tMAP_RESILIENT_CODESIGN                  = 0x2000\n\tMAP_RESILIENT_MEDIA                     = 0x4000\n\tMAP_SHARED                              = 0x1\n\tMAP_TRANSLATED_ALLOW_EXECUTE            = 0x20000\n\tMAP_UNIX03                              = 0x40000\n\tMCAST_BLOCK_SOURCE                      = 0x54\n\tMCAST_EXCLUDE                           = 0x2\n\tMCAST_INCLUDE                           = 0x1\n\tMCAST_JOIN_GROUP                        = 0x50\n\tMCAST_JOIN_SOURCE_GROUP                 = 0x52\n\tMCAST_LEAVE_GROUP                       = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP                = 0x53\n\tMCAST_UNBLOCK_SOURCE                    = 0x55\n\tMCAST_UNDEFINED                         = 0x0\n\tMCL_CURRENT                             = 0x1\n\tMCL_FUTURE                              = 0x2\n\tMNT_ASYNC                               = 0x40\n\tMNT_AUTOMOUNTED                         = 0x400000\n\tMNT_CMDFLAGS                            = 0xf0000\n\tMNT_CPROTECT                            = 0x80\n\tMNT_DEFWRITE                            = 0x2000000\n\tMNT_DONTBROWSE                          = 0x100000\n\tMNT_DOVOLFS                             = 0x8000\n\tMNT_DWAIT                               = 0x4\n\tMNT_EXPORTED                            = 0x100\n\tMNT_EXT_ROOT_DATA_VOL                   = 0x1\n\tMNT_FORCE                               = 0x80000\n\tMNT_IGNORE_OWNERSHIP                    = 0x200000\n\tMNT_JOURNALED                           = 0x800000\n\tMNT_LOCAL                               = 0x1000\n\tMNT_MULTILABEL                          = 0x4000000\n\tMNT_NOATIME                             = 0x10000000\n\tMNT_NOBLOCK                             = 0x20000\n\tMNT_NODEV                               = 0x10\n\tMNT_NOEXEC                              = 0x4\n\tMNT_NOSUID                              = 0x8\n\tMNT_NOUSERXATTR                         = 0x1000000\n\tMNT_NOWAIT                              = 0x2\n\tMNT_QUARANTINE                          = 0x400\n\tMNT_QUOTA                               = 0x2000\n\tMNT_RDONLY                              = 0x1\n\tMNT_RELOAD                              = 0x40000\n\tMNT_REMOVABLE                           = 0x200\n\tMNT_ROOTFS                              = 0x4000\n\tMNT_SNAPSHOT                            = 0x40000000\n\tMNT_STRICTATIME                         = 0x80000000\n\tMNT_SYNCHRONOUS                         = 0x2\n\tMNT_UNION                               = 0x20\n\tMNT_UNKNOWNPERMISSIONS                  = 0x200000\n\tMNT_UPDATE                              = 0x10000\n\tMNT_VISFLAGMASK                         = 0xd7f0f7ff\n\tMNT_WAIT                                = 0x1\n\tMSG_CTRUNC                              = 0x20\n\tMSG_DONTROUTE                           = 0x4\n\tMSG_DONTWAIT                            = 0x80\n\tMSG_EOF                                 = 0x100\n\tMSG_EOR                                 = 0x8\n\tMSG_FLUSH                               = 0x400\n\tMSG_HAVEMORE                            = 0x2000\n\tMSG_HOLD                                = 0x800\n\tMSG_NEEDSA                              = 0x10000\n\tMSG_NOSIGNAL                            = 0x80000\n\tMSG_OOB                                 = 0x1\n\tMSG_PEEK                                = 0x2\n\tMSG_RCVMORE                             = 0x4000\n\tMSG_SEND                                = 0x1000\n\tMSG_TRUNC                               = 0x10\n\tMSG_WAITALL                             = 0x40\n\tMSG_WAITSTREAM                          = 0x200\n\tMS_ASYNC                                = 0x1\n\tMS_DEACTIVATE                           = 0x8\n\tMS_INVALIDATE                           = 0x2\n\tMS_KILLPAGES                            = 0x4\n\tMS_SYNC                                 = 0x10\n\tNAME_MAX                                = 0xff\n\tNET_RT_DUMP                             = 0x1\n\tNET_RT_DUMP2                            = 0x7\n\tNET_RT_FLAGS                            = 0x2\n\tNET_RT_FLAGS_PRIV                       = 0xa\n\tNET_RT_IFLIST                           = 0x3\n\tNET_RT_IFLIST2                          = 0x6\n\tNET_RT_MAXID                            = 0xb\n\tNET_RT_STAT                             = 0x4\n\tNET_RT_TRASH                            = 0x5\n\tNFDBITS                                 = 0x20\n\tNL0                                     = 0x0\n\tNL1                                     = 0x100\n\tNL2                                     = 0x200\n\tNL3                                     = 0x300\n\tNLDLY                                   = 0x300\n\tNOFLSH                                  = 0x80000000\n\tNOKERNINFO                              = 0x2000000\n\tNOTE_ABSOLUTE                           = 0x8\n\tNOTE_ATTRIB                             = 0x8\n\tNOTE_BACKGROUND                         = 0x40\n\tNOTE_CHILD                              = 0x4\n\tNOTE_CRITICAL                           = 0x20\n\tNOTE_DELETE                             = 0x1\n\tNOTE_EXEC                               = 0x20000000\n\tNOTE_EXIT                               = 0x80000000\n\tNOTE_EXITSTATUS                         = 0x4000000\n\tNOTE_EXIT_CSERROR                       = 0x40000\n\tNOTE_EXIT_DECRYPTFAIL                   = 0x10000\n\tNOTE_EXIT_DETAIL                        = 0x2000000\n\tNOTE_EXIT_DETAIL_MASK                   = 0x70000\n\tNOTE_EXIT_MEMORY                        = 0x20000\n\tNOTE_EXIT_REPARENTED                    = 0x80000\n\tNOTE_EXTEND                             = 0x4\n\tNOTE_FFAND                              = 0x40000000\n\tNOTE_FFCOPY                             = 0xc0000000\n\tNOTE_FFCTRLMASK                         = 0xc0000000\n\tNOTE_FFLAGSMASK                         = 0xffffff\n\tNOTE_FFNOP                              = 0x0\n\tNOTE_FFOR                               = 0x80000000\n\tNOTE_FORK                               = 0x40000000\n\tNOTE_FUNLOCK                            = 0x100\n\tNOTE_LEEWAY                             = 0x10\n\tNOTE_LINK                               = 0x10\n\tNOTE_LOWAT                              = 0x1\n\tNOTE_MACHTIME                           = 0x100\n\tNOTE_MACH_CONTINUOUS_TIME               = 0x80\n\tNOTE_NONE                               = 0x80\n\tNOTE_NSECONDS                           = 0x4\n\tNOTE_OOB                                = 0x2\n\tNOTE_PCTRLMASK                          = -0x100000\n\tNOTE_PDATAMASK                          = 0xfffff\n\tNOTE_REAP                               = 0x10000000\n\tNOTE_RENAME                             = 0x20\n\tNOTE_REVOKE                             = 0x40\n\tNOTE_SECONDS                            = 0x1\n\tNOTE_SIGNAL                             = 0x8000000\n\tNOTE_TRACK                              = 0x1\n\tNOTE_TRACKERR                           = 0x2\n\tNOTE_TRIGGER                            = 0x1000000\n\tNOTE_USECONDS                           = 0x2\n\tNOTE_VM_ERROR                           = 0x10000000\n\tNOTE_VM_PRESSURE                        = 0x80000000\n\tNOTE_VM_PRESSURE_SUDDEN_TERMINATE       = 0x20000000\n\tNOTE_VM_PRESSURE_TERMINATE              = 0x40000000\n\tNOTE_WRITE                              = 0x2\n\tOCRNL                                   = 0x10\n\tOFDEL                                   = 0x20000\n\tOFILL                                   = 0x80\n\tONLCR                                   = 0x2\n\tONLRET                                  = 0x40\n\tONOCR                                   = 0x20\n\tONOEOT                                  = 0x8\n\tOPOST                                   = 0x1\n\tOXTABS                                  = 0x4\n\tO_ACCMODE                               = 0x3\n\tO_ALERT                                 = 0x20000000\n\tO_APPEND                                = 0x8\n\tO_ASYNC                                 = 0x40\n\tO_CLOEXEC                               = 0x1000000\n\tO_CREAT                                 = 0x200\n\tO_DIRECTORY                             = 0x100000\n\tO_DP_GETRAWENCRYPTED                    = 0x1\n\tO_DP_GETRAWUNENCRYPTED                  = 0x2\n\tO_DSYNC                                 = 0x400000\n\tO_EVTONLY                               = 0x8000\n\tO_EXCL                                  = 0x800\n\tO_EXLOCK                                = 0x20\n\tO_FSYNC                                 = 0x80\n\tO_NDELAY                                = 0x4\n\tO_NOCTTY                                = 0x20000\n\tO_NOFOLLOW                              = 0x100\n\tO_NOFOLLOW_ANY                          = 0x20000000\n\tO_NONBLOCK                              = 0x4\n\tO_POPUP                                 = 0x80000000\n\tO_RDONLY                                = 0x0\n\tO_RDWR                                  = 0x2\n\tO_SHLOCK                                = 0x10\n\tO_SYMLINK                               = 0x200000\n\tO_SYNC                                  = 0x80\n\tO_TRUNC                                 = 0x400\n\tO_WRONLY                                = 0x1\n\tPARENB                                  = 0x1000\n\tPARMRK                                  = 0x8\n\tPARODD                                  = 0x2000\n\tPENDIN                                  = 0x20000000\n\tPRIO_PGRP                               = 0x1\n\tPRIO_PROCESS                            = 0x0\n\tPRIO_USER                               = 0x2\n\tPROT_EXEC                               = 0x4\n\tPROT_NONE                               = 0x0\n\tPROT_READ                               = 0x1\n\tPROT_WRITE                              = 0x2\n\tPT_ATTACH                               = 0xa\n\tPT_ATTACHEXC                            = 0xe\n\tPT_CONTINUE                             = 0x7\n\tPT_DENY_ATTACH                          = 0x1f\n\tPT_DETACH                               = 0xb\n\tPT_FIRSTMACH                            = 0x20\n\tPT_FORCEQUOTA                           = 0x1e\n\tPT_KILL                                 = 0x8\n\tPT_READ_D                               = 0x2\n\tPT_READ_I                               = 0x1\n\tPT_READ_U                               = 0x3\n\tPT_SIGEXC                               = 0xc\n\tPT_STEP                                 = 0x9\n\tPT_THUPDATE                             = 0xd\n\tPT_TRACE_ME                             = 0x0\n\tPT_WRITE_D                              = 0x5\n\tPT_WRITE_I                              = 0x4\n\tPT_WRITE_U                              = 0x6\n\tRENAME_EXCL                             = 0x4\n\tRENAME_NOFOLLOW_ANY                     = 0x10\n\tRENAME_RESERVED1                        = 0x8\n\tRENAME_SECLUDE                          = 0x1\n\tRENAME_SWAP                             = 0x2\n\tRLIMIT_AS                               = 0x5\n\tRLIMIT_CORE                             = 0x4\n\tRLIMIT_CPU                              = 0x0\n\tRLIMIT_CPU_USAGE_MONITOR                = 0x2\n\tRLIMIT_DATA                             = 0x2\n\tRLIMIT_FSIZE                            = 0x1\n\tRLIMIT_MEMLOCK                          = 0x6\n\tRLIMIT_NOFILE                           = 0x8\n\tRLIMIT_NPROC                            = 0x7\n\tRLIMIT_RSS                              = 0x5\n\tRLIMIT_STACK                            = 0x3\n\tRLIM_INFINITY                           = 0x7fffffffffffffff\n\tRTAX_AUTHOR                             = 0x6\n\tRTAX_BRD                                = 0x7\n\tRTAX_DST                                = 0x0\n\tRTAX_GATEWAY                            = 0x1\n\tRTAX_GENMASK                            = 0x3\n\tRTAX_IFA                                = 0x5\n\tRTAX_IFP                                = 0x4\n\tRTAX_MAX                                = 0x8\n\tRTAX_NETMASK                            = 0x2\n\tRTA_AUTHOR                              = 0x40\n\tRTA_BRD                                 = 0x80\n\tRTA_DST                                 = 0x1\n\tRTA_GATEWAY                             = 0x2\n\tRTA_GENMASK                             = 0x8\n\tRTA_IFA                                 = 0x20\n\tRTA_IFP                                 = 0x10\n\tRTA_NETMASK                             = 0x4\n\tRTF_BLACKHOLE                           = 0x1000\n\tRTF_BROADCAST                           = 0x400000\n\tRTF_CLONING                             = 0x100\n\tRTF_CONDEMNED                           = 0x2000000\n\tRTF_DEAD                                = 0x20000000\n\tRTF_DELCLONE                            = 0x80\n\tRTF_DONE                                = 0x40\n\tRTF_DYNAMIC                             = 0x10\n\tRTF_GATEWAY                             = 0x2\n\tRTF_GLOBAL                              = 0x40000000\n\tRTF_HOST                                = 0x4\n\tRTF_IFREF                               = 0x4000000\n\tRTF_IFSCOPE                             = 0x1000000\n\tRTF_LLDATA                              = 0x400\n\tRTF_LLINFO                              = 0x400\n\tRTF_LOCAL                               = 0x200000\n\tRTF_MODIFIED                            = 0x20\n\tRTF_MULTICAST                           = 0x800000\n\tRTF_NOIFREF                             = 0x2000\n\tRTF_PINNED                              = 0x100000\n\tRTF_PRCLONING                           = 0x10000\n\tRTF_PROTO1                              = 0x8000\n\tRTF_PROTO2                              = 0x4000\n\tRTF_PROTO3                              = 0x40000\n\tRTF_PROXY                               = 0x8000000\n\tRTF_REJECT                              = 0x8\n\tRTF_ROUTER                              = 0x10000000\n\tRTF_STATIC                              = 0x800\n\tRTF_UP                                  = 0x1\n\tRTF_WASCLONED                           = 0x20000\n\tRTF_XRESOLVE                            = 0x200\n\tRTM_ADD                                 = 0x1\n\tRTM_CHANGE                              = 0x3\n\tRTM_DELADDR                             = 0xd\n\tRTM_DELETE                              = 0x2\n\tRTM_DELMADDR                            = 0x10\n\tRTM_GET                                 = 0x4\n\tRTM_GET2                                = 0x14\n\tRTM_IFINFO                              = 0xe\n\tRTM_IFINFO2                             = 0x12\n\tRTM_LOCK                                = 0x8\n\tRTM_LOSING                              = 0x5\n\tRTM_MISS                                = 0x7\n\tRTM_NEWADDR                             = 0xc\n\tRTM_NEWMADDR                            = 0xf\n\tRTM_NEWMADDR2                           = 0x13\n\tRTM_OLDADD                              = 0x9\n\tRTM_OLDDEL                              = 0xa\n\tRTM_REDIRECT                            = 0x6\n\tRTM_RESOLVE                             = 0xb\n\tRTM_RTTUNIT                             = 0xf4240\n\tRTM_VERSION                             = 0x5\n\tRTV_EXPIRE                              = 0x4\n\tRTV_HOPCOUNT                            = 0x2\n\tRTV_MTU                                 = 0x1\n\tRTV_RPIPE                               = 0x8\n\tRTV_RTT                                 = 0x40\n\tRTV_RTTVAR                              = 0x80\n\tRTV_SPIPE                               = 0x10\n\tRTV_SSTHRESH                            = 0x20\n\tRUSAGE_CHILDREN                         = -0x1\n\tRUSAGE_SELF                             = 0x0\n\tSAE_ASSOCID_ALL                         = 0xffffffff\n\tSAE_ASSOCID_ANY                         = 0x0\n\tSAE_CONNID_ALL                          = 0xffffffff\n\tSAE_CONNID_ANY                          = 0x0\n\tSCM_CREDS                               = 0x3\n\tSCM_RIGHTS                              = 0x1\n\tSCM_TIMESTAMP                           = 0x2\n\tSCM_TIMESTAMP_MONOTONIC                 = 0x4\n\tSEEK_CUR                                = 0x1\n\tSEEK_DATA                               = 0x4\n\tSEEK_END                                = 0x2\n\tSEEK_HOLE                               = 0x3\n\tSEEK_SET                                = 0x0\n\tSF_APPEND                               = 0x40000\n\tSF_ARCHIVED                             = 0x10000\n\tSF_DATALESS                             = 0x40000000\n\tSF_FIRMLINK                             = 0x800000\n\tSF_IMMUTABLE                            = 0x20000\n\tSF_NOUNLINK                             = 0x100000\n\tSF_RESTRICTED                           = 0x80000\n\tSF_SETTABLE                             = 0x3fff0000\n\tSF_SUPPORTED                            = 0x9f0000\n\tSF_SYNTHETIC                            = 0xc0000000\n\tSHUT_RD                                 = 0x0\n\tSHUT_RDWR                               = 0x2\n\tSHUT_WR                                 = 0x1\n\tSIOCADDMULTI                            = 0x80206931\n\tSIOCAIFADDR                             = 0x8040691a\n\tSIOCARPIPLL                             = 0xc0206928\n\tSIOCATMARK                              = 0x40047307\n\tSIOCAUTOADDR                            = 0xc0206926\n\tSIOCAUTONETMASK                         = 0x80206927\n\tSIOCDELMULTI                            = 0x80206932\n\tSIOCDIFADDR                             = 0x80206919\n\tSIOCDIFPHYADDR                          = 0x80206941\n\tSIOCGDRVSPEC                            = 0xc028697b\n\tSIOCGETVLAN                             = 0xc020697f\n\tSIOCGHIWAT                              = 0x40047301\n\tSIOCGIF6LOWPAN                          = 0xc02069c5\n\tSIOCGIFADDR                             = 0xc0206921\n\tSIOCGIFALTMTU                           = 0xc0206948\n\tSIOCGIFASYNCMAP                         = 0xc020697c\n\tSIOCGIFBOND                             = 0xc0206947\n\tSIOCGIFBRDADDR                          = 0xc0206923\n\tSIOCGIFCAP                              = 0xc020695b\n\tSIOCGIFCONF                             = 0xc00c6924\n\tSIOCGIFDEVMTU                           = 0xc0206944\n\tSIOCGIFDSTADDR                          = 0xc0206922\n\tSIOCGIFFLAGS                            = 0xc0206911\n\tSIOCGIFFUNCTIONALTYPE                   = 0xc02069ad\n\tSIOCGIFGENERIC                          = 0xc020693a\n\tSIOCGIFKPI                              = 0xc0206987\n\tSIOCGIFMAC                              = 0xc0206982\n\tSIOCGIFMEDIA                            = 0xc02c6938\n\tSIOCGIFMETRIC                           = 0xc0206917\n\tSIOCGIFMTU                              = 0xc0206933\n\tSIOCGIFNETMASK                          = 0xc0206925\n\tSIOCGIFPDSTADDR                         = 0xc0206940\n\tSIOCGIFPHYS                             = 0xc0206935\n\tSIOCGIFPSRCADDR                         = 0xc020693f\n\tSIOCGIFSTATUS                           = 0xc331693d\n\tSIOCGIFVLAN                             = 0xc020697f\n\tSIOCGIFWAKEFLAGS                        = 0xc0206988\n\tSIOCGIFXMEDIA                           = 0xc02c6948\n\tSIOCGLOWAT                              = 0x40047303\n\tSIOCGPGRP                               = 0x40047309\n\tSIOCIFCREATE                            = 0xc0206978\n\tSIOCIFCREATE2                           = 0xc020697a\n\tSIOCIFDESTROY                           = 0x80206979\n\tSIOCIFGCLONERS                          = 0xc0106981\n\tSIOCRSLVMULTI                           = 0xc010693b\n\tSIOCSDRVSPEC                            = 0x8028697b\n\tSIOCSETVLAN                             = 0x8020697e\n\tSIOCSHIWAT                              = 0x80047300\n\tSIOCSIF6LOWPAN                          = 0x802069c4\n\tSIOCSIFADDR                             = 0x8020690c\n\tSIOCSIFALTMTU                           = 0x80206945\n\tSIOCSIFASYNCMAP                         = 0x8020697d\n\tSIOCSIFBOND                             = 0x80206946\n\tSIOCSIFBRDADDR                          = 0x80206913\n\tSIOCSIFCAP                              = 0x8020695a\n\tSIOCSIFDSTADDR                          = 0x8020690e\n\tSIOCSIFFLAGS                            = 0x80206910\n\tSIOCSIFGENERIC                          = 0x80206939\n\tSIOCSIFKPI                              = 0x80206986\n\tSIOCSIFLLADDR                           = 0x8020693c\n\tSIOCSIFMAC                              = 0x80206983\n\tSIOCSIFMEDIA                            = 0xc0206937\n\tSIOCSIFMETRIC                           = 0x80206918\n\tSIOCSIFMTU                              = 0x80206934\n\tSIOCSIFNETMASK                          = 0x80206916\n\tSIOCSIFPHYADDR                          = 0x8040693e\n\tSIOCSIFPHYS                             = 0x80206936\n\tSIOCSIFVLAN                             = 0x8020697e\n\tSIOCSLOWAT                              = 0x80047302\n\tSIOCSPGRP                               = 0x80047308\n\tSOCK_DGRAM                              = 0x2\n\tSOCK_MAXADDRLEN                         = 0xff\n\tSOCK_RAW                                = 0x3\n\tSOCK_RDM                                = 0x4\n\tSOCK_SEQPACKET                          = 0x5\n\tSOCK_STREAM                             = 0x1\n\tSOL_LOCAL                               = 0x0\n\tSOL_SOCKET                              = 0xffff\n\tSOMAXCONN                               = 0x80\n\tSO_ACCEPTCONN                           = 0x2\n\tSO_BROADCAST                            = 0x20\n\tSO_DEBUG                                = 0x1\n\tSO_DONTROUTE                            = 0x10\n\tSO_DONTTRUNC                            = 0x2000\n\tSO_ERROR                                = 0x1007\n\tSO_KEEPALIVE                            = 0x8\n\tSO_LABEL                                = 0x1010\n\tSO_LINGER                               = 0x80\n\tSO_LINGER_SEC                           = 0x1080\n\tSO_NETSVC_MARKING_LEVEL                 = 0x1119\n\tSO_NET_SERVICE_TYPE                     = 0x1116\n\tSO_NKE                                  = 0x1021\n\tSO_NOADDRERR                            = 0x1023\n\tSO_NOSIGPIPE                            = 0x1022\n\tSO_NOTIFYCONFLICT                       = 0x1026\n\tSO_NP_EXTENSIONS                        = 0x1083\n\tSO_NREAD                                = 0x1020\n\tSO_NUMRCVPKT                            = 0x1112\n\tSO_NWRITE                               = 0x1024\n\tSO_OOBINLINE                            = 0x100\n\tSO_PEERLABEL                            = 0x1011\n\tSO_RANDOMPORT                           = 0x1082\n\tSO_RCVBUF                               = 0x1002\n\tSO_RCVLOWAT                             = 0x1004\n\tSO_RCVTIMEO                             = 0x1006\n\tSO_REUSEADDR                            = 0x4\n\tSO_REUSEPORT                            = 0x200\n\tSO_REUSESHAREUID                        = 0x1025\n\tSO_SNDBUF                               = 0x1001\n\tSO_SNDLOWAT                             = 0x1003\n\tSO_SNDTIMEO                             = 0x1005\n\tSO_TIMESTAMP                            = 0x400\n\tSO_TIMESTAMP_MONOTONIC                  = 0x800\n\tSO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1\n\tSO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4\n\tSO_TRACKER_ATTRIBUTE_FLAGS_TRACKER      = 0x2\n\tSO_TRACKER_TRANSPARENCY_VERSION         = 0x3\n\tSO_TYPE                                 = 0x1008\n\tSO_UPCALLCLOSEWAIT                      = 0x1027\n\tSO_USELOOPBACK                          = 0x40\n\tSO_WANTMORE                             = 0x4000\n\tSO_WANTOOBFLAG                          = 0x8000\n\tS_IEXEC                                 = 0x40\n\tS_IFBLK                                 = 0x6000\n\tS_IFCHR                                 = 0x2000\n\tS_IFDIR                                 = 0x4000\n\tS_IFIFO                                 = 0x1000\n\tS_IFLNK                                 = 0xa000\n\tS_IFMT                                  = 0xf000\n\tS_IFREG                                 = 0x8000\n\tS_IFSOCK                                = 0xc000\n\tS_IFWHT                                 = 0xe000\n\tS_IREAD                                 = 0x100\n\tS_IRGRP                                 = 0x20\n\tS_IROTH                                 = 0x4\n\tS_IRUSR                                 = 0x100\n\tS_IRWXG                                 = 0x38\n\tS_IRWXO                                 = 0x7\n\tS_IRWXU                                 = 0x1c0\n\tS_ISGID                                 = 0x400\n\tS_ISTXT                                 = 0x200\n\tS_ISUID                                 = 0x800\n\tS_ISVTX                                 = 0x200\n\tS_IWGRP                                 = 0x10\n\tS_IWOTH                                 = 0x2\n\tS_IWRITE                                = 0x80\n\tS_IWUSR                                 = 0x80\n\tS_IXGRP                                 = 0x8\n\tS_IXOTH                                 = 0x1\n\tS_IXUSR                                 = 0x40\n\tTAB0                                    = 0x0\n\tTAB1                                    = 0x400\n\tTAB2                                    = 0x800\n\tTAB3                                    = 0x4\n\tTABDLY                                  = 0xc04\n\tTCIFLUSH                                = 0x1\n\tTCIOFF                                  = 0x3\n\tTCIOFLUSH                               = 0x3\n\tTCION                                   = 0x4\n\tTCOFLUSH                                = 0x2\n\tTCOOFF                                  = 0x1\n\tTCOON                                   = 0x2\n\tTCPOPT_CC                               = 0xb\n\tTCPOPT_CCECHO                           = 0xd\n\tTCPOPT_CCNEW                            = 0xc\n\tTCPOPT_EOL                              = 0x0\n\tTCPOPT_FASTOPEN                         = 0x22\n\tTCPOPT_MAXSEG                           = 0x2\n\tTCPOPT_NOP                              = 0x1\n\tTCPOPT_SACK                             = 0x5\n\tTCPOPT_SACK_HDR                         = 0x1010500\n\tTCPOPT_SACK_PERMITTED                   = 0x4\n\tTCPOPT_SACK_PERMIT_HDR                  = 0x1010402\n\tTCPOPT_SIGNATURE                        = 0x13\n\tTCPOPT_TIMESTAMP                        = 0x8\n\tTCPOPT_TSTAMP_HDR                       = 0x101080a\n\tTCPOPT_WINDOW                           = 0x3\n\tTCP_CONNECTIONTIMEOUT                   = 0x20\n\tTCP_CONNECTION_INFO                     = 0x106\n\tTCP_ENABLE_ECN                          = 0x104\n\tTCP_FASTOPEN                            = 0x105\n\tTCP_KEEPALIVE                           = 0x10\n\tTCP_KEEPCNT                             = 0x102\n\tTCP_KEEPINTVL                           = 0x101\n\tTCP_MAXHLEN                             = 0x3c\n\tTCP_MAXOLEN                             = 0x28\n\tTCP_MAXSEG                              = 0x2\n\tTCP_MAXWIN                              = 0xffff\n\tTCP_MAX_SACK                            = 0x4\n\tTCP_MAX_WINSHIFT                        = 0xe\n\tTCP_MINMSS                              = 0xd8\n\tTCP_MSS                                 = 0x200\n\tTCP_NODELAY                             = 0x1\n\tTCP_NOOPT                               = 0x8\n\tTCP_NOPUSH                              = 0x4\n\tTCP_NOTSENT_LOWAT                       = 0x201\n\tTCP_RXT_CONNDROPTIME                    = 0x80\n\tTCP_RXT_FINDROP                         = 0x100\n\tTCP_SENDMOREACKS                        = 0x103\n\tTCSAFLUSH                               = 0x2\n\tTIOCCBRK                                = 0x2000747a\n\tTIOCCDTR                                = 0x20007478\n\tTIOCCONS                                = 0x80047462\n\tTIOCDCDTIMESTAMP                        = 0x40107458\n\tTIOCDRAIN                               = 0x2000745e\n\tTIOCDSIMICROCODE                        = 0x20007455\n\tTIOCEXCL                                = 0x2000740d\n\tTIOCEXT                                 = 0x80047460\n\tTIOCFLUSH                               = 0x80047410\n\tTIOCGDRAINWAIT                          = 0x40047456\n\tTIOCGETA                                = 0x40487413\n\tTIOCGETD                                = 0x4004741a\n\tTIOCGPGRP                               = 0x40047477\n\tTIOCGWINSZ                              = 0x40087468\n\tTIOCIXOFF                               = 0x20007480\n\tTIOCIXON                                = 0x20007481\n\tTIOCMBIC                                = 0x8004746b\n\tTIOCMBIS                                = 0x8004746c\n\tTIOCMGDTRWAIT                           = 0x4004745a\n\tTIOCMGET                                = 0x4004746a\n\tTIOCMODG                                = 0x40047403\n\tTIOCMODS                                = 0x80047404\n\tTIOCMSDTRWAIT                           = 0x8004745b\n\tTIOCMSET                                = 0x8004746d\n\tTIOCM_CAR                               = 0x40\n\tTIOCM_CD                                = 0x40\n\tTIOCM_CTS                               = 0x20\n\tTIOCM_DSR                               = 0x100\n\tTIOCM_DTR                               = 0x2\n\tTIOCM_LE                                = 0x1\n\tTIOCM_RI                                = 0x80\n\tTIOCM_RNG                               = 0x80\n\tTIOCM_RTS                               = 0x4\n\tTIOCM_SR                                = 0x10\n\tTIOCM_ST                                = 0x8\n\tTIOCNOTTY                               = 0x20007471\n\tTIOCNXCL                                = 0x2000740e\n\tTIOCOUTQ                                = 0x40047473\n\tTIOCPKT                                 = 0x80047470\n\tTIOCPKT_DATA                            = 0x0\n\tTIOCPKT_DOSTOP                          = 0x20\n\tTIOCPKT_FLUSHREAD                       = 0x1\n\tTIOCPKT_FLUSHWRITE                      = 0x2\n\tTIOCPKT_IOCTL                           = 0x40\n\tTIOCPKT_NOSTOP                          = 0x10\n\tTIOCPKT_START                           = 0x8\n\tTIOCPKT_STOP                            = 0x4\n\tTIOCPTYGNAME                            = 0x40807453\n\tTIOCPTYGRANT                            = 0x20007454\n\tTIOCPTYUNLK                             = 0x20007452\n\tTIOCREMOTE                              = 0x80047469\n\tTIOCSBRK                                = 0x2000747b\n\tTIOCSCONS                               = 0x20007463\n\tTIOCSCTTY                               = 0x20007461\n\tTIOCSDRAINWAIT                          = 0x80047457\n\tTIOCSDTR                                = 0x20007479\n\tTIOCSETA                                = 0x80487414\n\tTIOCSETAF                               = 0x80487416\n\tTIOCSETAW                               = 0x80487415\n\tTIOCSETD                                = 0x8004741b\n\tTIOCSIG                                 = 0x2000745f\n\tTIOCSPGRP                               = 0x80047476\n\tTIOCSTART                               = 0x2000746e\n\tTIOCSTAT                                = 0x20007465\n\tTIOCSTI                                 = 0x80017472\n\tTIOCSTOP                                = 0x2000746f\n\tTIOCSWINSZ                              = 0x80087467\n\tTIOCTIMESTAMP                           = 0x40107459\n\tTIOCUCNTL                               = 0x80047466\n\tTOSTOP                                  = 0x400000\n\tUF_APPEND                               = 0x4\n\tUF_COMPRESSED                           = 0x20\n\tUF_DATAVAULT                            = 0x80\n\tUF_HIDDEN                               = 0x8000\n\tUF_IMMUTABLE                            = 0x2\n\tUF_NODUMP                               = 0x1\n\tUF_OPAQUE                               = 0x8\n\tUF_SETTABLE                             = 0xffff\n\tUF_TRACKED                              = 0x40\n\tVDISCARD                                = 0xf\n\tVDSUSP                                  = 0xb\n\tVEOF                                    = 0x0\n\tVEOL                                    = 0x1\n\tVEOL2                                   = 0x2\n\tVERASE                                  = 0x3\n\tVINTR                                   = 0x8\n\tVKILL                                   = 0x5\n\tVLNEXT                                  = 0xe\n\tVMADDR_CID_ANY                          = 0xffffffff\n\tVMADDR_CID_HOST                         = 0x2\n\tVMADDR_CID_HYPERVISOR                   = 0x0\n\tVMADDR_CID_RESERVED                     = 0x1\n\tVMADDR_PORT_ANY                         = 0xffffffff\n\tVMIN                                    = 0x10\n\tVM_LOADAVG                              = 0x2\n\tVM_MACHFACTOR                           = 0x4\n\tVM_MAXID                                = 0x6\n\tVM_METER                                = 0x1\n\tVM_SWAPUSAGE                            = 0x5\n\tVQUIT                                   = 0x9\n\tVREPRINT                                = 0x6\n\tVSTART                                  = 0xc\n\tVSTATUS                                 = 0x12\n\tVSTOP                                   = 0xd\n\tVSUSP                                   = 0xa\n\tVT0                                     = 0x0\n\tVT1                                     = 0x10000\n\tVTDLY                                   = 0x10000\n\tVTIME                                   = 0x11\n\tVWERASE                                 = 0x4\n\tWCONTINUED                              = 0x10\n\tWCOREFLAG                               = 0x80\n\tWEXITED                                 = 0x4\n\tWNOHANG                                 = 0x1\n\tWNOWAIT                                 = 0x20\n\tWORDSIZE                                = 0x40\n\tWSTOPPED                                = 0x8\n\tWUNTRACED                               = 0x2\n\tXATTR_CREATE                            = 0x2\n\tXATTR_NODEFAULT                         = 0x10\n\tXATTR_NOFOLLOW                          = 0x1\n\tXATTR_NOSECURITY                        = 0x8\n\tXATTR_REPLACE                           = 0x4\n\tXATTR_SHOWCOMPRESSION                   = 0x20\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADARCH        = syscall.Errno(0x56)\n\tEBADEXEC        = syscall.Errno(0x55)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMACHO       = syscall.Errno(0x58)\n\tEBADMSG         = syscall.Errno(0x5e)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x59)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDEVERR         = syscall.Errno(0x53)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x5a)\n\tEILSEQ          = syscall.Errno(0x5c)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x6a)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5f)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x60)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x61)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5b)\n\tENOPOLICY       = syscall.Errno(0x67)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x62)\n\tENOSTR          = syscall.Errno(0x63)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x68)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x66)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x69)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x64)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tEPWROFF         = syscall.Errno(0x52)\n\tEQFULL          = syscall.Errno(0x6a)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHLIBVERS      = syscall.Errno(0x57)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x65)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"ENOTSUP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EPWROFF\", \"device power is off\"},\n\t{83, \"EDEVERR\", \"device error\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EBADEXEC\", \"bad executable (or shared library)\"},\n\t{86, \"EBADARCH\", \"bad CPU type in executable\"},\n\t{87, \"ESHLIBVERS\", \"shared library version mismatch\"},\n\t{88, \"EBADMACHO\", \"malformed Mach-o file\"},\n\t{89, \"ECANCELED\", \"operation canceled\"},\n\t{90, \"EIDRM\", \"identifier removed\"},\n\t{91, \"ENOMSG\", \"no message of desired type\"},\n\t{92, \"EILSEQ\", \"illegal byte sequence\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EBADMSG\", \"bad message\"},\n\t{95, \"EMULTIHOP\", \"EMULTIHOP (Reserved)\"},\n\t{96, \"ENODATA\", \"no message available on STREAM\"},\n\t{97, \"ENOLINK\", \"ENOLINK (Reserved)\"},\n\t{98, \"ENOSR\", \"no STREAM resources\"},\n\t{99, \"ENOSTR\", \"not a STREAM\"},\n\t{100, \"EPROTO\", \"protocol error\"},\n\t{101, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{102, \"EOPNOTSUPP\", \"operation not supported on socket\"},\n\t{103, \"ENOPOLICY\", \"policy not found\"},\n\t{104, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{105, \"EOWNERDEAD\", \"previous owner died\"},\n\t{106, \"EQFULL\", \"interface output queue is full\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGABRT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && dragonfly\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_ATM                            = 0x1e\n\tAF_BLUETOOTH                      = 0x21\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_HYLINK                         = 0xf\n\tAF_IEEE80211                      = 0x23\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x1c\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x22\n\tAF_NATM                           = 0x1d\n\tAF_NETBIOS                        = 0x6\n\tAF_NETGRAPH                       = 0x20\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x18\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB460800                           = 0x70800\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB921600                           = 0xe1000\n\tB9600                             = 0x2580\n\tBIOCFEEDBACK                      = 0x8004427d\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc0104279\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFEEDBACK                     = 0x4004427c\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044272\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSEESENT                      = 0x40044276\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x2000427a\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDLT                          = 0x80044278\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x8010427b\n\tBIOCSFEEDBACK                     = 0x8004427d\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044273\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCSSEESENT                      = 0x80044277\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x8\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DEFAULTBUFSIZE                = 0x1000\n\tBPF_DIV                           = 0x30\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x80000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MAX_CLONES                    = 0x80\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MOD                           = 0x90\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBPF_XOR                           = 0xa0\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_MONOTONIC                   = 0x4\n\tCLOCK_MONOTONIC_FAST              = 0xc\n\tCLOCK_MONOTONIC_PRECISE           = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID          = 0xf\n\tCLOCK_PROF                        = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_REALTIME_FAST               = 0xa\n\tCLOCK_REALTIME_PRECISE            = 0x9\n\tCLOCK_SECOND                      = 0xd\n\tCLOCK_THREAD_CPUTIME_ID           = 0xe\n\tCLOCK_UPTIME                      = 0x5\n\tCLOCK_UPTIME_FAST                 = 0x8\n\tCLOCK_UPTIME_PRECISE              = 0x7\n\tCLOCK_VIRTUAL                     = 0x1\n\tCPUSTATES                         = 0x5\n\tCP_IDLE                           = 0x4\n\tCP_INTR                           = 0x3\n\tCP_NICE                           = 0x1\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x30000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0x14\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDLT_A429                          = 0xb8\n\tDLT_A653_ICM                      = 0xb9\n\tDLT_AIRONET_HEADER                = 0x78\n\tDLT_AOS                           = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394        = 0x8a\n\tDLT_ARCNET                        = 0x7\n\tDLT_ARCNET_LINUX                  = 0x81\n\tDLT_ATM_CLIP                      = 0x13\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AURORA                        = 0x7e\n\tDLT_AX25                          = 0x3\n\tDLT_AX25_KISS                     = 0xca\n\tDLT_BACNET_MS_TP                  = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB            = 0xff\n\tDLT_BLUETOOTH_HCI_H4              = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9\n\tDLT_BLUETOOTH_LE_LL               = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR     = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR       = 0xfe\n\tDLT_CAN20B                        = 0xbe\n\tDLT_CAN_SOCKETCAN                 = 0xe3\n\tDLT_CHAOS                         = 0x5\n\tDLT_CHDLC                         = 0x68\n\tDLT_CISCO_IOS                     = 0x76\n\tDLT_C_HDLC                        = 0x68\n\tDLT_C_HDLC_WITH_DIR               = 0xcd\n\tDLT_DBUS                          = 0xe7\n\tDLT_DECT                          = 0xdd\n\tDLT_DOCSIS                        = 0x8f\n\tDLT_DVB_CI                        = 0xeb\n\tDLT_ECONET                        = 0x73\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0x6d\n\tDLT_EPON                          = 0x103\n\tDLT_ERF                           = 0xc5\n\tDLT_ERF_ETH                       = 0xaf\n\tDLT_ERF_POS                       = 0xb0\n\tDLT_FC_2                          = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS        = 0xe1\n\tDLT_FDDI                          = 0xa\n\tDLT_FLEXRAY                       = 0xd2\n\tDLT_FRELAY                        = 0x6b\n\tDLT_FRELAY_WITH_DIR               = 0xce\n\tDLT_GCOM_SERIAL                   = 0xad\n\tDLT_GCOM_T1E1                     = 0xac\n\tDLT_GPF_F                         = 0xab\n\tDLT_GPF_T                         = 0xaa\n\tDLT_GPRS_LLC                      = 0xa9\n\tDLT_GSMTAP_ABIS                   = 0xda\n\tDLT_GSMTAP_UM                     = 0xd9\n\tDLT_HHDLC                         = 0x79\n\tDLT_IBM_SN                        = 0x92\n\tDLT_IBM_SP                        = 0x91\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS          = 0xa3\n\tDLT_IEEE802_15_4                  = 0xc3\n\tDLT_IEEE802_15_4_LINUX            = 0xbf\n\tDLT_IEEE802_15_4_NOFCS            = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY       = 0xd7\n\tDLT_IEEE802_16_MAC_CPS            = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1\n\tDLT_INFINIBAND                    = 0xf7\n\tDLT_IPFILTER                      = 0x74\n\tDLT_IPMB                          = 0xc7\n\tDLT_IPMB_LINUX                    = 0xd1\n\tDLT_IPMI_HPM_2                    = 0x104\n\tDLT_IPNET                         = 0xe2\n\tDLT_IPOIB                         = 0xf2\n\tDLT_IPV4                          = 0xe4\n\tDLT_IPV6                          = 0xe5\n\tDLT_IP_OVER_FC                    = 0x7a\n\tDLT_ISO_14443                     = 0x108\n\tDLT_JUNIPER_ATM1                  = 0x89\n\tDLT_JUNIPER_ATM2                  = 0x87\n\tDLT_JUNIPER_ATM_CEMIC             = 0xee\n\tDLT_JUNIPER_CHDLC                 = 0xb5\n\tDLT_JUNIPER_ES                    = 0x84\n\tDLT_JUNIPER_ETHER                 = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL          = 0xea\n\tDLT_JUNIPER_FRELAY                = 0xb4\n\tDLT_JUNIPER_GGSN                  = 0x85\n\tDLT_JUNIPER_ISM                   = 0xc2\n\tDLT_JUNIPER_MFR                   = 0x86\n\tDLT_JUNIPER_MLFR                  = 0x83\n\tDLT_JUNIPER_MLPPP                 = 0x82\n\tDLT_JUNIPER_MONITOR               = 0xa4\n\tDLT_JUNIPER_PIC_PEER              = 0xae\n\tDLT_JUNIPER_PPP                   = 0xb3\n\tDLT_JUNIPER_PPPOE                 = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM             = 0xa8\n\tDLT_JUNIPER_SERVICES              = 0x88\n\tDLT_JUNIPER_SRX_E2E               = 0xe9\n\tDLT_JUNIPER_ST                    = 0xc8\n\tDLT_JUNIPER_VP                    = 0xb7\n\tDLT_JUNIPER_VS                    = 0xe8\n\tDLT_LAPB_WITH_DIR                 = 0xcf\n\tDLT_LAPD                          = 0xcb\n\tDLT_LIN                           = 0xd4\n\tDLT_LINUX_EVDEV                   = 0xd8\n\tDLT_LINUX_IRDA                    = 0x90\n\tDLT_LINUX_LAPD                    = 0xb1\n\tDLT_LINUX_SLL                     = 0x71\n\tDLT_LOOP                          = 0x6c\n\tDLT_LTALK                         = 0x72\n\tDLT_MATCHING_MAX                  = 0x109\n\tDLT_MATCHING_MIN                  = 0x68\n\tDLT_MFR                           = 0xb6\n\tDLT_MOST                          = 0xd3\n\tDLT_MPEG_2_TS                     = 0xf3\n\tDLT_MPLS                          = 0xdb\n\tDLT_MTP2                          = 0x8c\n\tDLT_MTP2_WITH_PHDR                = 0x8b\n\tDLT_MTP3                          = 0x8d\n\tDLT_MUX27010                      = 0xec\n\tDLT_NETANALYZER                   = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT       = 0xf1\n\tDLT_NETLINK                       = 0xfd\n\tDLT_NFC_LLCP                      = 0xf5\n\tDLT_NFLOG                         = 0xef\n\tDLT_NG40                          = 0xf4\n\tDLT_NULL                          = 0x0\n\tDLT_PCI_EXP                       = 0x7d\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PKTAP                         = 0x102\n\tDLT_PPI                           = 0xc0\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_PPPD                      = 0xa6\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PPP_WITH_DIR                  = 0xcc\n\tDLT_PRISM_HEADER                  = 0x77\n\tDLT_PROFIBUS_DL                   = 0x101\n\tDLT_PRONET                        = 0x4\n\tDLT_RAIF1                         = 0xc6\n\tDLT_RAW                           = 0xc\n\tDLT_RDS                           = 0x109\n\tDLT_REDBACK_SMARTEDGE             = 0x20\n\tDLT_RIO                           = 0x7c\n\tDLT_RTAC_SERIAL                   = 0xfa\n\tDLT_SCCP                          = 0x8e\n\tDLT_SCTP                          = 0xf8\n\tDLT_SITA                          = 0xc4\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_STANAG_5066_D_PDU             = 0xed\n\tDLT_SUNATM                        = 0x7b\n\tDLT_SYMANTEC_FIREWALL             = 0x63\n\tDLT_TZSP                          = 0x80\n\tDLT_USB                           = 0xba\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USB_FREEBSD                   = 0xba\n\tDLT_USB_LINUX                     = 0xbd\n\tDLT_USB_LINUX_MMAPPED             = 0xdc\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDLT_WATTSTOPPER_DLM               = 0x107\n\tDLT_WIHART                        = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU           = 0xfc\n\tDLT_X2E_SERIAL                    = 0xd5\n\tDLT_X2E_XORAYA                    = 0xd6\n\tDLT_ZWAVE_R1_R2                   = 0x105\n\tDLT_ZWAVE_R3                      = 0x106\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DBF                            = 0xf\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tDT_WHT                            = 0xe\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_EXCEPT                     = -0x8\n\tEVFILT_FS                         = -0xa\n\tEVFILT_MARKER                     = 0xf\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0xa\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_USER                       = -0x9\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_HUP                            = 0x800\n\tEV_NODATA                         = 0x1000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTEXIT_LWP                       = 0x10000\n\tEXTEXIT_PROC                      = 0x0\n\tEXTEXIT_SETINT                    = 0x1\n\tEXTEXIT_SIMPLE                    = 0x0\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUP2FD                          = 0xa\n\tF_DUP2FD_CLOEXEC                  = 0x12\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0x11\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_ALTPHYS                       = 0x4000\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x318e72\n\tIFF_DEBUG                         = 0x4\n\tIFF_IDIRECT                       = 0x200000\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MONITOR                       = 0x40000\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_NPOLLING                      = 0x100000\n\tIFF_OACTIVE                       = 0x400\n\tIFF_OACTIVE_COMPAT                = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_POLLING                       = 0x10000\n\tIFF_POLLING_COMPAT                = 0x10000\n\tIFF_PPROMISC                      = 0x20000\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_SMART                         = 0x20\n\tIFF_STATICARP                     = 0x80000\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf8\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf1\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_STF                           = 0xf3\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_MASK                   = 0xfffffffe\n\tIPPROTO_3PC                       = 0x22\n\tIPPROTO_ADFS                      = 0x44\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_AHIP                      = 0x3d\n\tIPPROTO_APES                      = 0x63\n\tIPPROTO_ARGUS                     = 0xd\n\tIPPROTO_AX25                      = 0x5d\n\tIPPROTO_BHA                       = 0x31\n\tIPPROTO_BLT                       = 0x1e\n\tIPPROTO_BRSATMON                  = 0x4c\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_CFTP                      = 0x3e\n\tIPPROTO_CHAOS                     = 0x10\n\tIPPROTO_CMTP                      = 0x26\n\tIPPROTO_CPHB                      = 0x49\n\tIPPROTO_CPNX                      = 0x48\n\tIPPROTO_DDP                       = 0x25\n\tIPPROTO_DGP                       = 0x56\n\tIPPROTO_DIVERT                    = 0xfe\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_EMCON                     = 0xe\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GMTP                      = 0x64\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HELLO                     = 0x3f\n\tIPPROTO_HMP                       = 0x14\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IDPR                      = 0x23\n\tIPPROTO_IDRP                      = 0x2d\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IGP                       = 0x55\n\tIPPROTO_IGRP                      = 0x58\n\tIPPROTO_IL                        = 0x28\n\tIPPROTO_INLSP                     = 0x34\n\tIPPROTO_INP                       = 0x20\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPCV                      = 0x47\n\tIPPROTO_IPEIP                     = 0x5e\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPPC                      = 0x43\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_IRTP                      = 0x1c\n\tIPPROTO_KRYPTOLAN                 = 0x41\n\tIPPROTO_LARP                      = 0x5b\n\tIPPROTO_LEAF1                     = 0x19\n\tIPPROTO_LEAF2                     = 0x1a\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x34\n\tIPPROTO_MEAS                      = 0x13\n\tIPPROTO_MHRP                      = 0x30\n\tIPPROTO_MICP                      = 0x5f\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MTP                       = 0x5c\n\tIPPROTO_MUX                       = 0x12\n\tIPPROTO_ND                        = 0x4d\n\tIPPROTO_NHRP                      = 0x36\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_NSP                       = 0x1f\n\tIPPROTO_NVPII                     = 0xb\n\tIPPROTO_OSPFIGP                   = 0x59\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PGM                       = 0x71\n\tIPPROTO_PIGP                      = 0x9\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PRM                       = 0x15\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_PVP                       = 0x4b\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_RCCMON                    = 0xa\n\tIPPROTO_RDP                       = 0x1b\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_RVD                       = 0x42\n\tIPPROTO_SATEXPAK                  = 0x40\n\tIPPROTO_SATMON                    = 0x45\n\tIPPROTO_SCCSP                     = 0x60\n\tIPPROTO_SDRP                      = 0x2a\n\tIPPROTO_SEP                       = 0x21\n\tIPPROTO_SKIP                      = 0x39\n\tIPPROTO_SRPC                      = 0x5a\n\tIPPROTO_ST                        = 0x7\n\tIPPROTO_SVMTP                     = 0x52\n\tIPPROTO_SWIPE                     = 0x35\n\tIPPROTO_TCF                       = 0x57\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TLSP                      = 0x38\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_TPXX                      = 0x27\n\tIPPROTO_TRUNK1                    = 0x17\n\tIPPROTO_TRUNK2                    = 0x18\n\tIPPROTO_TTP                       = 0x54\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UNKNOWN                   = 0x102\n\tIPPROTO_VINES                     = 0x53\n\tIPPROTO_VISA                      = 0x46\n\tIPPROTO_VMTP                      = 0x51\n\tIPPROTO_WBEXPAK                   = 0x4f\n\tIPPROTO_WBMON                     = 0x4e\n\tIPPROTO_WSN                       = 0x4a\n\tIPPROTO_XNET                      = 0xf\n\tIPPROTO_XTP                       = 0x24\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_BINDV6ONLY                   = 0x1b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_FW_ADD                       = 0x1e\n\tIPV6_FW_DEL                       = 0x1f\n\tIPV6_FW_FLUSH                     = 0x20\n\tIPV6_FW_GET                       = 0x22\n\tIPV6_FW_ZERO                      = 0x21\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHLIM                      = 0x28\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MSFILTER                     = 0x4a\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PKTOPTIONS                   = 0x34\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_PREFER_TEMPADDR              = 0x3f\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_DUMMYNET_CONFIGURE             = 0x3c\n\tIP_DUMMYNET_DEL                   = 0x3d\n\tIP_DUMMYNET_FLUSH                 = 0x3e\n\tIP_DUMMYNET_GET                   = 0x40\n\tIP_FW_ADD                         = 0x32\n\tIP_FW_DEL                         = 0x33\n\tIP_FW_FLUSH                       = 0x34\n\tIP_FW_GET                         = 0x36\n\tIP_FW_RESETLOG                    = 0x37\n\tIP_FW_TBL_ADD                     = 0x2a\n\tIP_FW_TBL_CREATE                  = 0x28\n\tIP_FW_TBL_DEL                     = 0x2b\n\tIP_FW_TBL_DESTROY                 = 0x29\n\tIP_FW_TBL_EXPIRE                  = 0x2f\n\tIP_FW_TBL_FLUSH                   = 0x2c\n\tIP_FW_TBL_GET                     = 0x2d\n\tIP_FW_TBL_ZERO                    = 0x2e\n\tIP_FW_X                           = 0x31\n\tIP_FW_ZERO                        = 0x35\n\tIP_HDRINCL                        = 0x2\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0x14\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x42\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_MULTICAST_VIF                  = 0xe\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVIF                         = 0x14\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVTTL                        = 0x41\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RSVP_OFF                       = 0x10\n\tIP_RSVP_ON                        = 0xf\n\tIP_RSVP_VIF_OFF                   = 0x12\n\tIP_RSVP_VIF_ON                    = 0x11\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_AUTOSYNC                     = 0x7\n\tMADV_CONTROL_END                  = 0xb\n\tMADV_CONTROL_START                = 0xa\n\tMADV_CORE                         = 0x9\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x5\n\tMADV_INVAL                        = 0xa\n\tMADV_NOCORE                       = 0x8\n\tMADV_NORMAL                       = 0x0\n\tMADV_NOSYNC                       = 0x6\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SETMAP                       = 0xb\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_HASSEMAPHORE                  = 0x200\n\tMAP_INHERIT                       = 0x80\n\tMAP_NOCORE                        = 0x20000\n\tMAP_NOEXTEND                      = 0x100\n\tMAP_NORESERVE                     = 0x40\n\tMAP_NOSYNC                        = 0x800\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x20\n\tMAP_SHARED                        = 0x1\n\tMAP_SIZEALIGN                     = 0x40000\n\tMAP_STACK                         = 0x400\n\tMAP_TRYFIXED                      = 0x10000\n\tMAP_VPAGETABLE                    = 0x2000\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_AUTOMOUNTED                   = 0x20\n\tMNT_CMDFLAGS                      = 0xf0000\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_EXKERB                        = 0x800\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXPUBLIC                      = 0x20000000\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_IGNORE                        = 0x800000\n\tMNT_LAZY                          = 0x4\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x10000000\n\tMNT_NOCLUSTERR                    = 0x40000000\n\tMNT_NOCLUSTERW                    = 0x80000000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOSYMFOLLOW                   = 0x400000\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x200000\n\tMNT_SUIDDIR                       = 0x100000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_TRIM                          = 0x1000000\n\tMNT_UPDATE                        = 0x10000\n\tMNT_USER                          = 0x8000\n\tMNT_VISFLAGMASK                   = 0xf1f0ffff\n\tMNT_WAIT                          = 0x1\n\tMSG_CMSG_CLOEXEC                  = 0x1000\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOF                           = 0x100\n\tMSG_EOR                           = 0x8\n\tMSG_FBLOCKING                     = 0x10000\n\tMSG_FMASK                         = 0xffff0000\n\tMSG_FNONBLOCKING                  = 0x20000\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_SYNC                          = 0x800\n\tMSG_TRUNC                         = 0x10\n\tMSG_UNUSED09                      = 0x200\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x2\n\tMS_SYNC                           = 0x0\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_MAXID                      = 0x4\n\tNFDBITS                           = 0x40\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FFAND                        = 0x40000000\n\tNOTE_FFCOPY                       = 0xc0000000\n\tNOTE_FFCTRLMASK                   = 0xc0000000\n\tNOTE_FFLAGSMASK                   = 0xffffff\n\tNOTE_FFNOP                        = 0x0\n\tNOTE_FFOR                         = 0x80000000\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x2\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRIGGER                      = 0x1000000\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tONLCR                             = 0x2\n\tONLRET                            = 0x40\n\tONOCR                             = 0x20\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x20000\n\tO_CREAT                           = 0x200\n\tO_DIRECT                          = 0x10000\n\tO_DIRECTORY                       = 0x8000000\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FAPPEND                         = 0x100000\n\tO_FASYNCWRITE                     = 0x800000\n\tO_FBLOCKING                       = 0x40000\n\tO_FMASK                           = 0xfc0000\n\tO_FNONBLOCKING                    = 0x80000\n\tO_FOFFSET                         = 0x200000\n\tO_FSYNC                           = 0x80\n\tO_FSYNCWRITE                      = 0x400000\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_AS                         = 0xa\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BRD                          = 0x7\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_MAX                          = 0xb\n\tRTAX_MPLS1                        = 0x8\n\tRTAX_MPLS2                        = 0x9\n\tRTAX_MPLS3                        = 0xa\n\tRTAX_NETMASK                      = 0x2\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BRD                           = 0x80\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_MPLS1                         = 0x100\n\tRTA_MPLS2                         = 0x200\n\tRTA_MPLS3                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CLONING                       = 0x100\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPLSOPS                       = 0x1000000\n\tRTF_MULTICAST                     = 0x800000\n\tRTF_PINNED                        = 0x100000\n\tRTF_PRCLONING                     = 0x10000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x40000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_WASCLONED                     = 0x20000\n\tRTF_XRESOLVE                      = 0x200\n\tRTM_ADD                           = 0x1\n\tRTM_CHANGE                        = 0x3\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DELMADDR                      = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IEEE80211                     = 0x12\n\tRTM_IFANNOUNCE                    = 0x11\n\tRTM_IFINFO                        = 0xe\n\tRTM_LOCK                          = 0x8\n\tRTM_LOSING                        = 0x5\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_NEWMADDR                      = 0xf\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_RTTUNIT                       = 0xf4240\n\tRTM_VERSION                       = 0x7\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_IWCAPSEGS                     = 0x400\n\tRTV_IWMAXSEGS                     = 0x200\n\tRTV_MSL                           = 0x100\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tSCM_CREDS                         = 0x3\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x2\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCALIFADDR                      = 0x8118691b\n\tSIOCATMARK                        = 0x40047307\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDLIFADDR                      = 0x8118691d\n\tSIOCGDRVSPEC                      = 0xc028697b\n\tSIOCGETSGCNT                      = 0xc0207210\n\tSIOCGETVIFCNT                     = 0xc028720f\n\tSIOCGHIWAT                        = 0x40047301\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFALIAS                      = 0xc0406929\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCAP                        = 0xc020691f\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc0206926\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFINDEX                      = 0xc0206920\n\tSIOCGIFMEDIA                      = 0xc0306938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc0206933\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPDSTADDR                   = 0xc0206948\n\tSIOCGIFPHYS                       = 0xc0206935\n\tSIOCGIFPOLLCPU                    = 0xc020697e\n\tSIOCGIFPSRCADDR                   = 0xc0206947\n\tSIOCGIFSTATUS                     = 0xc331693b\n\tSIOCGIFTSOLEN                     = 0xc0206980\n\tSIOCGLIFADDR                      = 0xc118691c\n\tSIOCGLIFPHYADDR                   = 0xc118694b\n\tSIOCGLOWAT                        = 0x40047303\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPRIVATE_0                    = 0xc0206950\n\tSIOCGPRIVATE_1                    = 0xc0206951\n\tSIOCIFCREATE                      = 0xc020697a\n\tSIOCIFCREATE2                     = 0xc020697c\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSDRVSPEC                      = 0x8028697b\n\tSIOCSHIWAT                        = 0x80047300\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFCAP                        = 0x8020691e\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020693c\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x80206934\n\tSIOCSIFNAME                       = 0x80206928\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPHYADDR                    = 0x80406946\n\tSIOCSIFPHYS                       = 0x80206936\n\tSIOCSIFPOLLCPU                    = 0x8020697d\n\tSIOCSIFTSOLEN                     = 0x8020697f\n\tSIOCSLIFPHYADDR                   = 0x8118694a\n\tSIOCSLOWAT                        = 0x80047302\n\tSIOCSPGRP                         = 0x80047308\n\tSOCK_CLOEXEC                      = 0x10000000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_MAXADDRLEN                   = 0xff\n\tSOCK_NONBLOCK                     = 0x20000000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_ACCEPTFILTER                   = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_CPUHINT                        = 0x1030\n\tSO_DEBUG                          = 0x1\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NOSIGPIPE                      = 0x800\n\tSO_OOBINLINE                      = 0x100\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_RERROR                         = 0x2000\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDSPACE                       = 0x100a\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_TIMESTAMP                      = 0x400\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDB                            = 0x9000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IFWHT                           = 0xe000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTAB0                              = 0x0\n\tTAB3                              = 0x4\n\tTABDLY                            = 0x4\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCP_FASTKEEP                      = 0x80\n\tTCP_KEEPCNT                       = 0x400\n\tTCP_KEEPIDLE                      = 0x100\n\tTCP_KEEPINIT                      = 0x20\n\tTCP_KEEPINTVL                     = 0x200\n\tTCP_MAXBURST                      = 0x4\n\tTCP_MAXHLEN                       = 0x3c\n\tTCP_MAXOLEN                       = 0x28\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MINMSS                        = 0x100\n\tTCP_MIN_WINSHIFT                  = 0x5\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOOPT                         = 0x8\n\tTCP_NOPUSH                        = 0x4\n\tTCP_SIGNATURE_ENABLE              = 0x10\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCONS                          = 0x80047462\n\tTIOCDCDTIMESTAMP                  = 0x40107458\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGDRAINWAIT                    = 0x40047456\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCISPTMASTER                    = 0x20007455\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGDTRWAIT                     = 0x4004745a\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x40047403\n\tTIOCMODS                          = 0x80047404\n\tTIOCMSDTRWAIT                     = 0x8004745b\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDRAINWAIT                    = 0x80047457\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSIG                           = 0x2000745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTI                           = 0x80017472\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCTIMESTAMP                     = 0x40107459\n\tTIOCUCNTL                         = 0x80047466\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x1\n\tUTIME_OMIT                        = -0x2\n\tVCHECKPT                          = 0x13\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVERASE2                           = 0x7\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_BCACHE_SIZE_MAX                = 0x0\n\tVM_SWZONE_SIZE_MAX                = 0x4000000000\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWCONTINUED                        = 0x4\n\tWCOREFLAG                         = 0x80\n\tWEXITED                           = 0x10\n\tWLINUXCLONE                       = 0x80000000\n\tWNOHANG                           = 0x1\n\tWNOWAIT                           = 0x8\n\tWSTOPPED                          = 0x2\n\tWTRAPPED                          = 0x20\n\tWUNTRACED                         = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEASYNC          = syscall.Errno(0x63)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x63)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEDIUM       = syscall.Errno(0x5d)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT     = syscall.Signal(0x6)\n\tSIGALRM     = syscall.Signal(0xe)\n\tSIGBUS      = syscall.Signal(0xa)\n\tSIGCHLD     = syscall.Signal(0x14)\n\tSIGCKPT     = syscall.Signal(0x21)\n\tSIGCKPTEXIT = syscall.Signal(0x22)\n\tSIGCONT     = syscall.Signal(0x13)\n\tSIGEMT      = syscall.Signal(0x7)\n\tSIGFPE      = syscall.Signal(0x8)\n\tSIGHUP      = syscall.Signal(0x1)\n\tSIGILL      = syscall.Signal(0x4)\n\tSIGINFO     = syscall.Signal(0x1d)\n\tSIGINT      = syscall.Signal(0x2)\n\tSIGIO       = syscall.Signal(0x17)\n\tSIGIOT      = syscall.Signal(0x6)\n\tSIGKILL     = syscall.Signal(0x9)\n\tSIGPIPE     = syscall.Signal(0xd)\n\tSIGPROF     = syscall.Signal(0x1b)\n\tSIGQUIT     = syscall.Signal(0x3)\n\tSIGSEGV     = syscall.Signal(0xb)\n\tSIGSTOP     = syscall.Signal(0x11)\n\tSIGSYS      = syscall.Signal(0xc)\n\tSIGTERM     = syscall.Signal(0xf)\n\tSIGTHR      = syscall.Signal(0x20)\n\tSIGTRAP     = syscall.Signal(0x5)\n\tSIGTSTP     = syscall.Signal(0x12)\n\tSIGTTIN     = syscall.Signal(0x15)\n\tSIGTTOU     = syscall.Signal(0x16)\n\tSIGURG      = syscall.Signal(0x10)\n\tSIGUSR1     = syscall.Signal(0x1e)\n\tSIGUSR2     = syscall.Signal(0x1f)\n\tSIGVTALRM   = syscall.Signal(0x1a)\n\tSIGWINCH    = syscall.Signal(0x1c)\n\tSIGXCPU     = syscall.Signal(0x18)\n\tSIGXFSZ     = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOMEDIUM\", \"no medium found\"},\n\t{99, \"EASYNC\", \"unknown error: 99\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread Scheduler\"},\n\t{33, \"SIGCKPT\", \"checkPoint\"},\n\t{34, \"SIGCKPTEXIT\", \"checkPointExit\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go",
    "content": "// mkerrors.sh -m32\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && freebsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m32 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                   = 0x10\n\tAF_ARP                         = 0x23\n\tAF_ATM                         = 0x1e\n\tAF_BLUETOOTH                   = 0x24\n\tAF_CCITT                       = 0xa\n\tAF_CHAOS                       = 0x5\n\tAF_CNT                         = 0x15\n\tAF_COIP                        = 0x14\n\tAF_DATAKIT                     = 0x9\n\tAF_DECnet                      = 0xc\n\tAF_DLI                         = 0xd\n\tAF_E164                        = 0x1a\n\tAF_ECMA                        = 0x8\n\tAF_HYLINK                      = 0xf\n\tAF_IEEE80211                   = 0x25\n\tAF_IMPLINK                     = 0x3\n\tAF_INET                        = 0x2\n\tAF_INET6                       = 0x1c\n\tAF_INET6_SDP                   = 0x2a\n\tAF_INET_SDP                    = 0x28\n\tAF_IPX                         = 0x17\n\tAF_ISDN                        = 0x1a\n\tAF_ISO                         = 0x7\n\tAF_LAT                         = 0xe\n\tAF_LINK                        = 0x12\n\tAF_LOCAL                       = 0x1\n\tAF_MAX                         = 0x2a\n\tAF_NATM                        = 0x1d\n\tAF_NETBIOS                     = 0x6\n\tAF_NETGRAPH                    = 0x20\n\tAF_OSI                         = 0x7\n\tAF_PUP                         = 0x4\n\tAF_ROUTE                       = 0x11\n\tAF_SCLUSTER                    = 0x22\n\tAF_SIP                         = 0x18\n\tAF_SLOW                        = 0x21\n\tAF_SNA                         = 0xb\n\tAF_UNIX                        = 0x1\n\tAF_UNSPEC                      = 0x0\n\tAF_VENDOR00                    = 0x27\n\tAF_VENDOR01                    = 0x29\n\tAF_VENDOR02                    = 0x2b\n\tAF_VENDOR03                    = 0x2d\n\tAF_VENDOR04                    = 0x2f\n\tAF_VENDOR05                    = 0x31\n\tAF_VENDOR06                    = 0x33\n\tAF_VENDOR07                    = 0x35\n\tAF_VENDOR08                    = 0x37\n\tAF_VENDOR09                    = 0x39\n\tAF_VENDOR10                    = 0x3b\n\tAF_VENDOR11                    = 0x3d\n\tAF_VENDOR12                    = 0x3f\n\tAF_VENDOR13                    = 0x41\n\tAF_VENDOR14                    = 0x43\n\tAF_VENDOR15                    = 0x45\n\tAF_VENDOR16                    = 0x47\n\tAF_VENDOR17                    = 0x49\n\tAF_VENDOR18                    = 0x4b\n\tAF_VENDOR19                    = 0x4d\n\tAF_VENDOR20                    = 0x4f\n\tAF_VENDOR21                    = 0x51\n\tAF_VENDOR22                    = 0x53\n\tAF_VENDOR23                    = 0x55\n\tAF_VENDOR24                    = 0x57\n\tAF_VENDOR25                    = 0x59\n\tAF_VENDOR26                    = 0x5b\n\tAF_VENDOR27                    = 0x5d\n\tAF_VENDOR28                    = 0x5f\n\tAF_VENDOR29                    = 0x61\n\tAF_VENDOR30                    = 0x63\n\tAF_VENDOR31                    = 0x65\n\tAF_VENDOR32                    = 0x67\n\tAF_VENDOR33                    = 0x69\n\tAF_VENDOR34                    = 0x6b\n\tAF_VENDOR35                    = 0x6d\n\tAF_VENDOR36                    = 0x6f\n\tAF_VENDOR37                    = 0x71\n\tAF_VENDOR38                    = 0x73\n\tAF_VENDOR39                    = 0x75\n\tAF_VENDOR40                    = 0x77\n\tAF_VENDOR41                    = 0x79\n\tAF_VENDOR42                    = 0x7b\n\tAF_VENDOR43                    = 0x7d\n\tAF_VENDOR44                    = 0x7f\n\tAF_VENDOR45                    = 0x81\n\tAF_VENDOR46                    = 0x83\n\tAF_VENDOR47                    = 0x85\n\tALTWERASE                      = 0x200\n\tB0                             = 0x0\n\tB110                           = 0x6e\n\tB115200                        = 0x1c200\n\tB1200                          = 0x4b0\n\tB134                           = 0x86\n\tB14400                         = 0x3840\n\tB150                           = 0x96\n\tB1800                          = 0x708\n\tB19200                         = 0x4b00\n\tB200                           = 0xc8\n\tB230400                        = 0x38400\n\tB2400                          = 0x960\n\tB28800                         = 0x7080\n\tB300                           = 0x12c\n\tB38400                         = 0x9600\n\tB460800                        = 0x70800\n\tB4800                          = 0x12c0\n\tB50                            = 0x32\n\tB57600                         = 0xe100\n\tB600                           = 0x258\n\tB7200                          = 0x1c20\n\tB75                            = 0x4b\n\tB76800                         = 0x12c00\n\tB921600                        = 0xe1000\n\tB9600                          = 0x2580\n\tBIOCFEEDBACK                   = 0x8004427c\n\tBIOCFLUSH                      = 0x20004268\n\tBIOCGBLEN                      = 0x40044266\n\tBIOCGDIRECTION                 = 0x40044276\n\tBIOCGDLT                       = 0x4004426a\n\tBIOCGDLTLIST                   = 0xc0084279\n\tBIOCGETBUFMODE                 = 0x4004427d\n\tBIOCGETIF                      = 0x4020426b\n\tBIOCGETZMAX                    = 0x4004427f\n\tBIOCGHDRCMPLT                  = 0x40044274\n\tBIOCGRSIG                      = 0x40044272\n\tBIOCGRTIMEOUT                  = 0x4008426e\n\tBIOCGSEESENT                   = 0x40044276\n\tBIOCGSTATS                     = 0x4008426f\n\tBIOCGTSTAMP                    = 0x40044283\n\tBIOCIMMEDIATE                  = 0x80044270\n\tBIOCLOCK                       = 0x2000427a\n\tBIOCPROMISC                    = 0x20004269\n\tBIOCROTZBUF                    = 0x400c4280\n\tBIOCSBLEN                      = 0xc0044266\n\tBIOCSDIRECTION                 = 0x80044277\n\tBIOCSDLT                       = 0x80044278\n\tBIOCSETBUFMODE                 = 0x8004427e\n\tBIOCSETF                       = 0x80084267\n\tBIOCSETFNR                     = 0x80084282\n\tBIOCSETIF                      = 0x8020426c\n\tBIOCSETVLANPCP                 = 0x80044285\n\tBIOCSETWF                      = 0x8008427b\n\tBIOCSETZBUF                    = 0x800c4281\n\tBIOCSHDRCMPLT                  = 0x80044275\n\tBIOCSRSIG                      = 0x80044273\n\tBIOCSRTIMEOUT                  = 0x8008426d\n\tBIOCSSEESENT                   = 0x80044277\n\tBIOCSTSTAMP                    = 0x80044284\n\tBIOCVERSION                    = 0x40044271\n\tBPF_A                          = 0x10\n\tBPF_ABS                        = 0x20\n\tBPF_ADD                        = 0x0\n\tBPF_ALIGNMENT                  = 0x4\n\tBPF_ALU                        = 0x4\n\tBPF_AND                        = 0x50\n\tBPF_B                          = 0x10\n\tBPF_BUFMODE_BUFFER             = 0x1\n\tBPF_BUFMODE_ZBUF               = 0x2\n\tBPF_DIV                        = 0x30\n\tBPF_H                          = 0x8\n\tBPF_IMM                        = 0x0\n\tBPF_IND                        = 0x40\n\tBPF_JA                         = 0x0\n\tBPF_JEQ                        = 0x10\n\tBPF_JGE                        = 0x30\n\tBPF_JGT                        = 0x20\n\tBPF_JMP                        = 0x5\n\tBPF_JSET                       = 0x40\n\tBPF_K                          = 0x0\n\tBPF_LD                         = 0x0\n\tBPF_LDX                        = 0x1\n\tBPF_LEN                        = 0x80\n\tBPF_LSH                        = 0x60\n\tBPF_MAJOR_VERSION              = 0x1\n\tBPF_MAXBUFSIZE                 = 0x80000\n\tBPF_MAXINSNS                   = 0x200\n\tBPF_MEM                        = 0x60\n\tBPF_MEMWORDS                   = 0x10\n\tBPF_MINBUFSIZE                 = 0x20\n\tBPF_MINOR_VERSION              = 0x1\n\tBPF_MISC                       = 0x7\n\tBPF_MOD                        = 0x90\n\tBPF_MSH                        = 0xa0\n\tBPF_MUL                        = 0x20\n\tBPF_NEG                        = 0x80\n\tBPF_OR                         = 0x40\n\tBPF_RELEASE                    = 0x30bb6\n\tBPF_RET                        = 0x6\n\tBPF_RSH                        = 0x70\n\tBPF_ST                         = 0x2\n\tBPF_STX                        = 0x3\n\tBPF_SUB                        = 0x10\n\tBPF_TAX                        = 0x0\n\tBPF_TXA                        = 0x80\n\tBPF_T_BINTIME                  = 0x2\n\tBPF_T_BINTIME_FAST             = 0x102\n\tBPF_T_BINTIME_MONOTONIC        = 0x202\n\tBPF_T_BINTIME_MONOTONIC_FAST   = 0x302\n\tBPF_T_FAST                     = 0x100\n\tBPF_T_FLAG_MASK                = 0x300\n\tBPF_T_FORMAT_MASK              = 0x3\n\tBPF_T_MICROTIME                = 0x0\n\tBPF_T_MICROTIME_FAST           = 0x100\n\tBPF_T_MICROTIME_MONOTONIC      = 0x200\n\tBPF_T_MICROTIME_MONOTONIC_FAST = 0x300\n\tBPF_T_MONOTONIC                = 0x200\n\tBPF_T_MONOTONIC_FAST           = 0x300\n\tBPF_T_NANOTIME                 = 0x1\n\tBPF_T_NANOTIME_FAST            = 0x101\n\tBPF_T_NANOTIME_MONOTONIC       = 0x201\n\tBPF_T_NANOTIME_MONOTONIC_FAST  = 0x301\n\tBPF_T_NONE                     = 0x3\n\tBPF_T_NORMAL                   = 0x0\n\tBPF_W                          = 0x0\n\tBPF_X                          = 0x8\n\tBPF_XOR                        = 0xa0\n\tBRKINT                         = 0x2\n\tCAP_ACCEPT                     = 0x200000020000000\n\tCAP_ACL_CHECK                  = 0x400000000010000\n\tCAP_ACL_DELETE                 = 0x400000000020000\n\tCAP_ACL_GET                    = 0x400000000040000\n\tCAP_ACL_SET                    = 0x400000000080000\n\tCAP_ALL0                       = 0x20007ffffffffff\n\tCAP_ALL1                       = 0x4000000001fffff\n\tCAP_BIND                       = 0x200000040000000\n\tCAP_BINDAT                     = 0x200008000000400\n\tCAP_CHFLAGSAT                  = 0x200000000001400\n\tCAP_CONNECT                    = 0x200000080000000\n\tCAP_CONNECTAT                  = 0x200010000000400\n\tCAP_CREATE                     = 0x200000000000040\n\tCAP_EVENT                      = 0x400000000000020\n\tCAP_EXTATTR_DELETE             = 0x400000000001000\n\tCAP_EXTATTR_GET                = 0x400000000002000\n\tCAP_EXTATTR_LIST               = 0x400000000004000\n\tCAP_EXTATTR_SET                = 0x400000000008000\n\tCAP_FCHDIR                     = 0x200000000000800\n\tCAP_FCHFLAGS                   = 0x200000000001000\n\tCAP_FCHMOD                     = 0x200000000002000\n\tCAP_FCHMODAT                   = 0x200000000002400\n\tCAP_FCHOWN                     = 0x200000000004000\n\tCAP_FCHOWNAT                   = 0x200000000004400\n\tCAP_FCNTL                      = 0x200000000008000\n\tCAP_FCNTL_ALL                  = 0x78\n\tCAP_FCNTL_GETFL                = 0x8\n\tCAP_FCNTL_GETOWN               = 0x20\n\tCAP_FCNTL_SETFL                = 0x10\n\tCAP_FCNTL_SETOWN               = 0x40\n\tCAP_FEXECVE                    = 0x200000000000080\n\tCAP_FLOCK                      = 0x200000000010000\n\tCAP_FPATHCONF                  = 0x200000000020000\n\tCAP_FSCK                       = 0x200000000040000\n\tCAP_FSTAT                      = 0x200000000080000\n\tCAP_FSTATAT                    = 0x200000000080400\n\tCAP_FSTATFS                    = 0x200000000100000\n\tCAP_FSYNC                      = 0x200000000000100\n\tCAP_FTRUNCATE                  = 0x200000000000200\n\tCAP_FUTIMES                    = 0x200000000200000\n\tCAP_FUTIMESAT                  = 0x200000000200400\n\tCAP_GETPEERNAME                = 0x200000100000000\n\tCAP_GETSOCKNAME                = 0x200000200000000\n\tCAP_GETSOCKOPT                 = 0x200000400000000\n\tCAP_IOCTL                      = 0x400000000000080\n\tCAP_IOCTLS_ALL                 = 0x7fffffff\n\tCAP_KQUEUE                     = 0x400000000100040\n\tCAP_KQUEUE_CHANGE              = 0x400000000100000\n\tCAP_KQUEUE_EVENT               = 0x400000000000040\n\tCAP_LINKAT_SOURCE              = 0x200020000000400\n\tCAP_LINKAT_TARGET              = 0x200000000400400\n\tCAP_LISTEN                     = 0x200000800000000\n\tCAP_LOOKUP                     = 0x200000000000400\n\tCAP_MAC_GET                    = 0x400000000000001\n\tCAP_MAC_SET                    = 0x400000000000002\n\tCAP_MKDIRAT                    = 0x200000000800400\n\tCAP_MKFIFOAT                   = 0x200000001000400\n\tCAP_MKNODAT                    = 0x200000002000400\n\tCAP_MMAP                       = 0x200000000000010\n\tCAP_MMAP_R                     = 0x20000000000001d\n\tCAP_MMAP_RW                    = 0x20000000000001f\n\tCAP_MMAP_RWX                   = 0x20000000000003f\n\tCAP_MMAP_RX                    = 0x20000000000003d\n\tCAP_MMAP_W                     = 0x20000000000001e\n\tCAP_MMAP_WX                    = 0x20000000000003e\n\tCAP_MMAP_X                     = 0x20000000000003c\n\tCAP_PDGETPID                   = 0x400000000000200\n\tCAP_PDKILL                     = 0x400000000000800\n\tCAP_PDWAIT                     = 0x400000000000400\n\tCAP_PEELOFF                    = 0x200001000000000\n\tCAP_POLL_EVENT                 = 0x400000000000020\n\tCAP_PREAD                      = 0x20000000000000d\n\tCAP_PWRITE                     = 0x20000000000000e\n\tCAP_READ                       = 0x200000000000001\n\tCAP_RECV                       = 0x200000000000001\n\tCAP_RENAMEAT_SOURCE            = 0x200000004000400\n\tCAP_RENAMEAT_TARGET            = 0x200040000000400\n\tCAP_RIGHTS_VERSION             = 0x0\n\tCAP_RIGHTS_VERSION_00          = 0x0\n\tCAP_SEEK                       = 0x20000000000000c\n\tCAP_SEEK_TELL                  = 0x200000000000004\n\tCAP_SEM_GETVALUE               = 0x400000000000004\n\tCAP_SEM_POST                   = 0x400000000000008\n\tCAP_SEM_WAIT                   = 0x400000000000010\n\tCAP_SEND                       = 0x200000000000002\n\tCAP_SETSOCKOPT                 = 0x200002000000000\n\tCAP_SHUTDOWN                   = 0x200004000000000\n\tCAP_SOCK_CLIENT                = 0x200007780000003\n\tCAP_SOCK_SERVER                = 0x200007f60000003\n\tCAP_SYMLINKAT                  = 0x200000008000400\n\tCAP_TTYHOOK                    = 0x400000000000100\n\tCAP_UNLINKAT                   = 0x200000010000400\n\tCAP_UNUSED0_44                 = 0x200080000000000\n\tCAP_UNUSED0_57                 = 0x300000000000000\n\tCAP_UNUSED1_22                 = 0x400000000200000\n\tCAP_UNUSED1_57                 = 0x500000000000000\n\tCAP_WRITE                      = 0x200000000000002\n\tCFLUSH                         = 0xf\n\tCLOCAL                         = 0x8000\n\tCLOCK_MONOTONIC                = 0x4\n\tCLOCK_MONOTONIC_FAST           = 0xc\n\tCLOCK_MONOTONIC_PRECISE        = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID       = 0xf\n\tCLOCK_PROF                     = 0x2\n\tCLOCK_REALTIME                 = 0x0\n\tCLOCK_REALTIME_FAST            = 0xa\n\tCLOCK_REALTIME_PRECISE         = 0x9\n\tCLOCK_SECOND                   = 0xd\n\tCLOCK_THREAD_CPUTIME_ID        = 0xe\n\tCLOCK_UPTIME                   = 0x5\n\tCLOCK_UPTIME_FAST              = 0x8\n\tCLOCK_UPTIME_PRECISE           = 0x7\n\tCLOCK_VIRTUAL                  = 0x1\n\tCPUSTATES                      = 0x5\n\tCP_IDLE                        = 0x4\n\tCP_INTR                        = 0x3\n\tCP_NICE                        = 0x1\n\tCP_SYS                         = 0x2\n\tCP_USER                        = 0x0\n\tCREAD                          = 0x800\n\tCRTSCTS                        = 0x30000\n\tCS5                            = 0x0\n\tCS6                            = 0x100\n\tCS7                            = 0x200\n\tCS8                            = 0x300\n\tCSIZE                          = 0x300\n\tCSTART                         = 0x11\n\tCSTATUS                        = 0x14\n\tCSTOP                          = 0x13\n\tCSTOPB                         = 0x400\n\tCSUSP                          = 0x1a\n\tCTL_HW                         = 0x6\n\tCTL_KERN                       = 0x1\n\tCTL_MAXNAME                    = 0x18\n\tCTL_NET                        = 0x4\n\tDIOCGATTR                      = 0xc144648e\n\tDIOCGDELETE                    = 0x80106488\n\tDIOCGFLUSH                     = 0x20006487\n\tDIOCGFRONTSTUFF                = 0x40086486\n\tDIOCGFWHEADS                   = 0x40046483\n\tDIOCGFWSECTORS                 = 0x40046482\n\tDIOCGIDENT                     = 0x41006489\n\tDIOCGMEDIASIZE                 = 0x40086481\n\tDIOCGPHYSPATH                  = 0x4400648d\n\tDIOCGPROVIDERNAME              = 0x4400648a\n\tDIOCGSECTORSIZE                = 0x40046480\n\tDIOCGSTRIPEOFFSET              = 0x4008648c\n\tDIOCGSTRIPESIZE                = 0x4008648b\n\tDIOCSKERNELDUMP                = 0x804c6490\n\tDIOCSKERNELDUMP_FREEBSD11      = 0x80046485\n\tDIOCZONECMD                    = 0xc06c648f\n\tDLT_A429                       = 0xb8\n\tDLT_A653_ICM                   = 0xb9\n\tDLT_AIRONET_HEADER             = 0x78\n\tDLT_AOS                        = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394     = 0x8a\n\tDLT_ARCNET                     = 0x7\n\tDLT_ARCNET_LINUX               = 0x81\n\tDLT_ATM_CLIP                   = 0x13\n\tDLT_ATM_RFC1483                = 0xb\n\tDLT_AURORA                     = 0x7e\n\tDLT_AX25                       = 0x3\n\tDLT_AX25_KISS                  = 0xca\n\tDLT_BACNET_MS_TP               = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB         = 0xff\n\tDLT_BLUETOOTH_HCI_H4           = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9\n\tDLT_BLUETOOTH_LE_LL            = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR    = 0xfe\n\tDLT_CAN20B                     = 0xbe\n\tDLT_CAN_SOCKETCAN              = 0xe3\n\tDLT_CHAOS                      = 0x5\n\tDLT_CHDLC                      = 0x68\n\tDLT_CISCO_IOS                  = 0x76\n\tDLT_CLASS_NETBSD_RAWAF         = 0x2240000\n\tDLT_C_HDLC                     = 0x68\n\tDLT_C_HDLC_WITH_DIR            = 0xcd\n\tDLT_DBUS                       = 0xe7\n\tDLT_DECT                       = 0xdd\n\tDLT_DISPLAYPORT_AUX            = 0x113\n\tDLT_DOCSIS                     = 0x8f\n\tDLT_DOCSIS31_XRA31             = 0x111\n\tDLT_DVB_CI                     = 0xeb\n\tDLT_ECONET                     = 0x73\n\tDLT_EN10MB                     = 0x1\n\tDLT_EN3MB                      = 0x2\n\tDLT_ENC                        = 0x6d\n\tDLT_EPON                       = 0x103\n\tDLT_ERF                        = 0xc5\n\tDLT_ERF_ETH                    = 0xaf\n\tDLT_ERF_POS                    = 0xb0\n\tDLT_ETHERNET_MPACKET           = 0x112\n\tDLT_FC_2                       = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS     = 0xe1\n\tDLT_FDDI                       = 0xa\n\tDLT_FLEXRAY                    = 0xd2\n\tDLT_FRELAY                     = 0x6b\n\tDLT_FRELAY_WITH_DIR            = 0xce\n\tDLT_GCOM_SERIAL                = 0xad\n\tDLT_GCOM_T1E1                  = 0xac\n\tDLT_GPF_F                      = 0xab\n\tDLT_GPF_T                      = 0xaa\n\tDLT_GPRS_LLC                   = 0xa9\n\tDLT_GSMTAP_ABIS                = 0xda\n\tDLT_GSMTAP_UM                  = 0xd9\n\tDLT_IBM_SN                     = 0x92\n\tDLT_IBM_SP                     = 0x91\n\tDLT_IEEE802                    = 0x6\n\tDLT_IEEE802_11                 = 0x69\n\tDLT_IEEE802_11_RADIO           = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS       = 0xa3\n\tDLT_IEEE802_15_4               = 0xc3\n\tDLT_IEEE802_15_4_LINUX         = 0xbf\n\tDLT_IEEE802_15_4_NOFCS         = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY    = 0xd7\n\tDLT_IEEE802_16_MAC_CPS         = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1\n\tDLT_INFINIBAND                 = 0xf7\n\tDLT_IPFILTER                   = 0x74\n\tDLT_IPMB_KONTRON               = 0xc7\n\tDLT_IPMB_LINUX                 = 0xd1\n\tDLT_IPMI_HPM_2                 = 0x104\n\tDLT_IPNET                      = 0xe2\n\tDLT_IPOIB                      = 0xf2\n\tDLT_IPV4                       = 0xe4\n\tDLT_IPV6                       = 0xe5\n\tDLT_IP_OVER_FC                 = 0x7a\n\tDLT_ISO_14443                  = 0x108\n\tDLT_JUNIPER_ATM1               = 0x89\n\tDLT_JUNIPER_ATM2               = 0x87\n\tDLT_JUNIPER_ATM_CEMIC          = 0xee\n\tDLT_JUNIPER_CHDLC              = 0xb5\n\tDLT_JUNIPER_ES                 = 0x84\n\tDLT_JUNIPER_ETHER              = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL       = 0xea\n\tDLT_JUNIPER_FRELAY             = 0xb4\n\tDLT_JUNIPER_GGSN               = 0x85\n\tDLT_JUNIPER_ISM                = 0xc2\n\tDLT_JUNIPER_MFR                = 0x86\n\tDLT_JUNIPER_MLFR               = 0x83\n\tDLT_JUNIPER_MLPPP              = 0x82\n\tDLT_JUNIPER_MONITOR            = 0xa4\n\tDLT_JUNIPER_PIC_PEER           = 0xae\n\tDLT_JUNIPER_PPP                = 0xb3\n\tDLT_JUNIPER_PPPOE              = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM          = 0xa8\n\tDLT_JUNIPER_SERVICES           = 0x88\n\tDLT_JUNIPER_SRX_E2E            = 0xe9\n\tDLT_JUNIPER_ST                 = 0xc8\n\tDLT_JUNIPER_VP                 = 0xb7\n\tDLT_JUNIPER_VS                 = 0xe8\n\tDLT_LAPB_WITH_DIR              = 0xcf\n\tDLT_LAPD                       = 0xcb\n\tDLT_LIN                        = 0xd4\n\tDLT_LINUX_EVDEV                = 0xd8\n\tDLT_LINUX_IRDA                 = 0x90\n\tDLT_LINUX_LAPD                 = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION    = 0xa6\n\tDLT_LINUX_SLL                  = 0x71\n\tDLT_LINUX_SLL2                 = 0x114\n\tDLT_LOOP                       = 0x6c\n\tDLT_LORATAP                    = 0x10e\n\tDLT_LTALK                      = 0x72\n\tDLT_MATCHING_MAX               = 0x114\n\tDLT_MATCHING_MIN               = 0x68\n\tDLT_MFR                        = 0xb6\n\tDLT_MOST                       = 0xd3\n\tDLT_MPEG_2_TS                  = 0xf3\n\tDLT_MPLS                       = 0xdb\n\tDLT_MTP2                       = 0x8c\n\tDLT_MTP2_WITH_PHDR             = 0x8b\n\tDLT_MTP3                       = 0x8d\n\tDLT_MUX27010                   = 0xec\n\tDLT_NETANALYZER                = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT    = 0xf1\n\tDLT_NETLINK                    = 0xfd\n\tDLT_NFC_LLCP                   = 0xf5\n\tDLT_NFLOG                      = 0xef\n\tDLT_NG40                       = 0xf4\n\tDLT_NORDIC_BLE                 = 0x110\n\tDLT_NULL                       = 0x0\n\tDLT_OPENFLOW                   = 0x10b\n\tDLT_PCI_EXP                    = 0x7d\n\tDLT_PFLOG                      = 0x75\n\tDLT_PFSYNC                     = 0x79\n\tDLT_PKTAP                      = 0x102\n\tDLT_PPI                        = 0xc0\n\tDLT_PPP                        = 0x9\n\tDLT_PPP_BSDOS                  = 0xe\n\tDLT_PPP_ETHER                  = 0x33\n\tDLT_PPP_PPPD                   = 0xa6\n\tDLT_PPP_SERIAL                 = 0x32\n\tDLT_PPP_WITH_DIR               = 0xcc\n\tDLT_PPP_WITH_DIRECTION         = 0xa6\n\tDLT_PRISM_HEADER               = 0x77\n\tDLT_PROFIBUS_DL                = 0x101\n\tDLT_PRONET                     = 0x4\n\tDLT_RAIF1                      = 0xc6\n\tDLT_RAW                        = 0xc\n\tDLT_RDS                        = 0x109\n\tDLT_REDBACK_SMARTEDGE          = 0x20\n\tDLT_RIO                        = 0x7c\n\tDLT_RTAC_SERIAL                = 0xfa\n\tDLT_SCCP                       = 0x8e\n\tDLT_SCTP                       = 0xf8\n\tDLT_SDLC                       = 0x10c\n\tDLT_SITA                       = 0xc4\n\tDLT_SLIP                       = 0x8\n\tDLT_SLIP_BSDOS                 = 0xd\n\tDLT_STANAG_5066_D_PDU          = 0xed\n\tDLT_SUNATM                     = 0x7b\n\tDLT_SYMANTEC_FIREWALL          = 0x63\n\tDLT_TI_LLN_SNIFFER             = 0x10d\n\tDLT_TZSP                       = 0x80\n\tDLT_USB                        = 0xba\n\tDLT_USBPCAP                    = 0xf9\n\tDLT_USB_DARWIN                 = 0x10a\n\tDLT_USB_FREEBSD                = 0xba\n\tDLT_USB_LINUX                  = 0xbd\n\tDLT_USB_LINUX_MMAPPED          = 0xdc\n\tDLT_USER0                      = 0x93\n\tDLT_USER1                      = 0x94\n\tDLT_USER10                     = 0x9d\n\tDLT_USER11                     = 0x9e\n\tDLT_USER12                     = 0x9f\n\tDLT_USER13                     = 0xa0\n\tDLT_USER14                     = 0xa1\n\tDLT_USER15                     = 0xa2\n\tDLT_USER2                      = 0x95\n\tDLT_USER3                      = 0x96\n\tDLT_USER4                      = 0x97\n\tDLT_USER5                      = 0x98\n\tDLT_USER6                      = 0x99\n\tDLT_USER7                      = 0x9a\n\tDLT_USER8                      = 0x9b\n\tDLT_USER9                      = 0x9c\n\tDLT_VSOCK                      = 0x10f\n\tDLT_WATTSTOPPER_DLM            = 0x107\n\tDLT_WIHART                     = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU        = 0xfc\n\tDLT_X2E_SERIAL                 = 0xd5\n\tDLT_X2E_XORAYA                 = 0xd6\n\tDLT_ZWAVE_R1_R2                = 0x105\n\tDLT_ZWAVE_R3                   = 0x106\n\tDT_BLK                         = 0x6\n\tDT_CHR                         = 0x2\n\tDT_DIR                         = 0x4\n\tDT_FIFO                        = 0x1\n\tDT_LNK                         = 0xa\n\tDT_REG                         = 0x8\n\tDT_SOCK                        = 0xc\n\tDT_UNKNOWN                     = 0x0\n\tDT_WHT                         = 0xe\n\tECHO                           = 0x8\n\tECHOCTL                        = 0x40\n\tECHOE                          = 0x2\n\tECHOK                          = 0x4\n\tECHOKE                         = 0x1\n\tECHONL                         = 0x10\n\tECHOPRT                        = 0x20\n\tEVFILT_AIO                     = -0x3\n\tEVFILT_EMPTY                   = -0xd\n\tEVFILT_FS                      = -0x9\n\tEVFILT_LIO                     = -0xa\n\tEVFILT_PROC                    = -0x5\n\tEVFILT_PROCDESC                = -0x8\n\tEVFILT_READ                    = -0x1\n\tEVFILT_SENDFILE                = -0xc\n\tEVFILT_SIGNAL                  = -0x6\n\tEVFILT_SYSCOUNT                = 0xd\n\tEVFILT_TIMER                   = -0x7\n\tEVFILT_USER                    = -0xb\n\tEVFILT_VNODE                   = -0x4\n\tEVFILT_WRITE                   = -0x2\n\tEVNAMEMAP_NAME_SIZE            = 0x40\n\tEV_ADD                         = 0x1\n\tEV_CLEAR                       = 0x20\n\tEV_DELETE                      = 0x2\n\tEV_DISABLE                     = 0x8\n\tEV_DISPATCH                    = 0x80\n\tEV_DROP                        = 0x1000\n\tEV_ENABLE                      = 0x4\n\tEV_EOF                         = 0x8000\n\tEV_ERROR                       = 0x4000\n\tEV_FLAG1                       = 0x2000\n\tEV_FLAG2                       = 0x4000\n\tEV_FORCEONESHOT                = 0x100\n\tEV_ONESHOT                     = 0x10\n\tEV_RECEIPT                     = 0x40\n\tEV_SYSFLAGS                    = 0xf000\n\tEXTA                           = 0x4b00\n\tEXTATTR_MAXNAMELEN             = 0xff\n\tEXTATTR_NAMESPACE_EMPTY        = 0x0\n\tEXTATTR_NAMESPACE_SYSTEM       = 0x2\n\tEXTATTR_NAMESPACE_USER         = 0x1\n\tEXTB                           = 0x9600\n\tEXTPROC                        = 0x800\n\tFD_CLOEXEC                     = 0x1\n\tFD_SETSIZE                     = 0x400\n\tFLUSHO                         = 0x800000\n\tF_CANCEL                       = 0x5\n\tF_DUP2FD                       = 0xa\n\tF_DUP2FD_CLOEXEC               = 0x12\n\tF_DUPFD                        = 0x0\n\tF_DUPFD_CLOEXEC                = 0x11\n\tF_GETFD                        = 0x1\n\tF_GETFL                        = 0x3\n\tF_GETLK                        = 0xb\n\tF_GETOWN                       = 0x5\n\tF_OGETLK                       = 0x7\n\tF_OK                           = 0x0\n\tF_OSETLK                       = 0x8\n\tF_OSETLKW                      = 0x9\n\tF_RDAHEAD                      = 0x10\n\tF_RDLCK                        = 0x1\n\tF_READAHEAD                    = 0xf\n\tF_SETFD                        = 0x2\n\tF_SETFL                        = 0x4\n\tF_SETLK                        = 0xc\n\tF_SETLKW                       = 0xd\n\tF_SETLK_REMOTE                 = 0xe\n\tF_SETOWN                       = 0x6\n\tF_UNLCK                        = 0x2\n\tF_UNLCKSYS                     = 0x4\n\tF_WRLCK                        = 0x3\n\tHUPCL                          = 0x4000\n\tHW_MACHINE                     = 0x1\n\tICANON                         = 0x100\n\tICMP6_FILTER                   = 0x12\n\tICRNL                          = 0x100\n\tIEXTEN                         = 0x400\n\tIFAN_ARRIVAL                   = 0x0\n\tIFAN_DEPARTURE                 = 0x1\n\tIFCAP_WOL_MAGIC                = 0x2000\n\tIFF_ALLMULTI                   = 0x200\n\tIFF_ALTPHYS                    = 0x4000\n\tIFF_BROADCAST                  = 0x2\n\tIFF_CANTCHANGE                 = 0x218f52\n\tIFF_CANTCONFIG                 = 0x10000\n\tIFF_DEBUG                      = 0x4\n\tIFF_DRV_OACTIVE                = 0x400\n\tIFF_DRV_RUNNING                = 0x40\n\tIFF_DYING                      = 0x200000\n\tIFF_LINK0                      = 0x1000\n\tIFF_LINK1                      = 0x2000\n\tIFF_LINK2                      = 0x4000\n\tIFF_LOOPBACK                   = 0x8\n\tIFF_MONITOR                    = 0x40000\n\tIFF_MULTICAST                  = 0x8000\n\tIFF_NOARP                      = 0x80\n\tIFF_NOGROUP                    = 0x800000\n\tIFF_OACTIVE                    = 0x400\n\tIFF_POINTOPOINT                = 0x10\n\tIFF_PPROMISC                   = 0x20000\n\tIFF_PROMISC                    = 0x100\n\tIFF_RENAMING                   = 0x400000\n\tIFF_RUNNING                    = 0x40\n\tIFF_SIMPLEX                    = 0x800\n\tIFF_STATICARP                  = 0x80000\n\tIFF_UP                         = 0x1\n\tIFNAMSIZ                       = 0x10\n\tIFT_BRIDGE                     = 0xd1\n\tIFT_CARP                       = 0xf8\n\tIFT_IEEE1394                   = 0x90\n\tIFT_INFINIBAND                 = 0xc7\n\tIFT_L2VLAN                     = 0x87\n\tIFT_L3IPVLAN                   = 0x88\n\tIFT_PPP                        = 0x17\n\tIFT_PROPVIRTUAL                = 0x35\n\tIGNBRK                         = 0x1\n\tIGNCR                          = 0x80\n\tIGNPAR                         = 0x4\n\tIMAXBEL                        = 0x2000\n\tINLCR                          = 0x40\n\tINPCK                          = 0x10\n\tIN_CLASSA_HOST                 = 0xffffff\n\tIN_CLASSA_MAX                  = 0x80\n\tIN_CLASSA_NET                  = 0xff000000\n\tIN_CLASSA_NSHIFT               = 0x18\n\tIN_CLASSB_HOST                 = 0xffff\n\tIN_CLASSB_MAX                  = 0x10000\n\tIN_CLASSB_NET                  = 0xffff0000\n\tIN_CLASSB_NSHIFT               = 0x10\n\tIN_CLASSC_HOST                 = 0xff\n\tIN_CLASSC_NET                  = 0xffffff00\n\tIN_CLASSC_NSHIFT               = 0x8\n\tIN_CLASSD_HOST                 = 0xfffffff\n\tIN_CLASSD_NET                  = 0xf0000000\n\tIN_CLASSD_NSHIFT               = 0x1c\n\tIN_LOOPBACKNET                 = 0x7f\n\tIN_RFC3021_MASK                = 0xfffffffe\n\tIPPROTO_3PC                    = 0x22\n\tIPPROTO_ADFS                   = 0x44\n\tIPPROTO_AH                     = 0x33\n\tIPPROTO_AHIP                   = 0x3d\n\tIPPROTO_APES                   = 0x63\n\tIPPROTO_ARGUS                  = 0xd\n\tIPPROTO_AX25                   = 0x5d\n\tIPPROTO_BHA                    = 0x31\n\tIPPROTO_BLT                    = 0x1e\n\tIPPROTO_BRSATMON               = 0x4c\n\tIPPROTO_CARP                   = 0x70\n\tIPPROTO_CFTP                   = 0x3e\n\tIPPROTO_CHAOS                  = 0x10\n\tIPPROTO_CMTP                   = 0x26\n\tIPPROTO_CPHB                   = 0x49\n\tIPPROTO_CPNX                   = 0x48\n\tIPPROTO_DCCP                   = 0x21\n\tIPPROTO_DDP                    = 0x25\n\tIPPROTO_DGP                    = 0x56\n\tIPPROTO_DIVERT                 = 0x102\n\tIPPROTO_DONE                   = 0x101\n\tIPPROTO_DSTOPTS                = 0x3c\n\tIPPROTO_EGP                    = 0x8\n\tIPPROTO_EMCON                  = 0xe\n\tIPPROTO_ENCAP                  = 0x62\n\tIPPROTO_EON                    = 0x50\n\tIPPROTO_ESP                    = 0x32\n\tIPPROTO_ETHERIP                = 0x61\n\tIPPROTO_FRAGMENT               = 0x2c\n\tIPPROTO_GGP                    = 0x3\n\tIPPROTO_GMTP                   = 0x64\n\tIPPROTO_GRE                    = 0x2f\n\tIPPROTO_HELLO                  = 0x3f\n\tIPPROTO_HIP                    = 0x8b\n\tIPPROTO_HMP                    = 0x14\n\tIPPROTO_HOPOPTS                = 0x0\n\tIPPROTO_ICMP                   = 0x1\n\tIPPROTO_ICMPV6                 = 0x3a\n\tIPPROTO_IDP                    = 0x16\n\tIPPROTO_IDPR                   = 0x23\n\tIPPROTO_IDRP                   = 0x2d\n\tIPPROTO_IGMP                   = 0x2\n\tIPPROTO_IGP                    = 0x55\n\tIPPROTO_IGRP                   = 0x58\n\tIPPROTO_IL                     = 0x28\n\tIPPROTO_INLSP                  = 0x34\n\tIPPROTO_INP                    = 0x20\n\tIPPROTO_IP                     = 0x0\n\tIPPROTO_IPCOMP                 = 0x6c\n\tIPPROTO_IPCV                   = 0x47\n\tIPPROTO_IPEIP                  = 0x5e\n\tIPPROTO_IPIP                   = 0x4\n\tIPPROTO_IPPC                   = 0x43\n\tIPPROTO_IPV4                   = 0x4\n\tIPPROTO_IPV6                   = 0x29\n\tIPPROTO_IRTP                   = 0x1c\n\tIPPROTO_KRYPTOLAN              = 0x41\n\tIPPROTO_LARP                   = 0x5b\n\tIPPROTO_LEAF1                  = 0x19\n\tIPPROTO_LEAF2                  = 0x1a\n\tIPPROTO_MAX                    = 0x100\n\tIPPROTO_MEAS                   = 0x13\n\tIPPROTO_MH                     = 0x87\n\tIPPROTO_MHRP                   = 0x30\n\tIPPROTO_MICP                   = 0x5f\n\tIPPROTO_MOBILE                 = 0x37\n\tIPPROTO_MPLS                   = 0x89\n\tIPPROTO_MTP                    = 0x5c\n\tIPPROTO_MUX                    = 0x12\n\tIPPROTO_ND                     = 0x4d\n\tIPPROTO_NHRP                   = 0x36\n\tIPPROTO_NONE                   = 0x3b\n\tIPPROTO_NSP                    = 0x1f\n\tIPPROTO_NVPII                  = 0xb\n\tIPPROTO_OLD_DIVERT             = 0xfe\n\tIPPROTO_OSPFIGP                = 0x59\n\tIPPROTO_PFSYNC                 = 0xf0\n\tIPPROTO_PGM                    = 0x71\n\tIPPROTO_PIGP                   = 0x9\n\tIPPROTO_PIM                    = 0x67\n\tIPPROTO_PRM                    = 0x15\n\tIPPROTO_PUP                    = 0xc\n\tIPPROTO_PVP                    = 0x4b\n\tIPPROTO_RAW                    = 0xff\n\tIPPROTO_RCCMON                 = 0xa\n\tIPPROTO_RDP                    = 0x1b\n\tIPPROTO_RESERVED_253           = 0xfd\n\tIPPROTO_RESERVED_254           = 0xfe\n\tIPPROTO_ROUTING                = 0x2b\n\tIPPROTO_RSVP                   = 0x2e\n\tIPPROTO_RVD                    = 0x42\n\tIPPROTO_SATEXPAK               = 0x40\n\tIPPROTO_SATMON                 = 0x45\n\tIPPROTO_SCCSP                  = 0x60\n\tIPPROTO_SCTP                   = 0x84\n\tIPPROTO_SDRP                   = 0x2a\n\tIPPROTO_SEND                   = 0x103\n\tIPPROTO_SHIM6                  = 0x8c\n\tIPPROTO_SKIP                   = 0x39\n\tIPPROTO_SPACER                 = 0x7fff\n\tIPPROTO_SRPC                   = 0x5a\n\tIPPROTO_ST                     = 0x7\n\tIPPROTO_SVMTP                  = 0x52\n\tIPPROTO_SWIPE                  = 0x35\n\tIPPROTO_TCF                    = 0x57\n\tIPPROTO_TCP                    = 0x6\n\tIPPROTO_TLSP                   = 0x38\n\tIPPROTO_TP                     = 0x1d\n\tIPPROTO_TPXX                   = 0x27\n\tIPPROTO_TRUNK1                 = 0x17\n\tIPPROTO_TRUNK2                 = 0x18\n\tIPPROTO_TTP                    = 0x54\n\tIPPROTO_UDP                    = 0x11\n\tIPPROTO_UDPLITE                = 0x88\n\tIPPROTO_VINES                  = 0x53\n\tIPPROTO_VISA                   = 0x46\n\tIPPROTO_VMTP                   = 0x51\n\tIPPROTO_WBEXPAK                = 0x4f\n\tIPPROTO_WBMON                  = 0x4e\n\tIPPROTO_WSN                    = 0x4a\n\tIPPROTO_XNET                   = 0xf\n\tIPPROTO_XTP                    = 0x24\n\tIPV6_AUTOFLOWLABEL             = 0x3b\n\tIPV6_BINDANY                   = 0x40\n\tIPV6_BINDMULTI                 = 0x41\n\tIPV6_BINDV6ONLY                = 0x1b\n\tIPV6_CHECKSUM                  = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS    = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP    = 0x1\n\tIPV6_DEFHLIM                   = 0x40\n\tIPV6_DONTFRAG                  = 0x3e\n\tIPV6_DSTOPTS                   = 0x32\n\tIPV6_FLOWID                    = 0x43\n\tIPV6_FLOWINFO_MASK             = 0xffffff0f\n\tIPV6_FLOWLABEL_LEN             = 0x14\n\tIPV6_FLOWLABEL_MASK            = 0xffff0f00\n\tIPV6_FLOWTYPE                  = 0x44\n\tIPV6_FRAGTTL                   = 0x78\n\tIPV6_FW_ADD                    = 0x1e\n\tIPV6_FW_DEL                    = 0x1f\n\tIPV6_FW_FLUSH                  = 0x20\n\tIPV6_FW_GET                    = 0x22\n\tIPV6_FW_ZERO                   = 0x21\n\tIPV6_HLIMDEC                   = 0x1\n\tIPV6_HOPLIMIT                  = 0x2f\n\tIPV6_HOPOPTS                   = 0x31\n\tIPV6_IPSEC_POLICY              = 0x1c\n\tIPV6_JOIN_GROUP                = 0xc\n\tIPV6_LEAVE_GROUP               = 0xd\n\tIPV6_MAXHLIM                   = 0xff\n\tIPV6_MAXOPTHDR                 = 0x800\n\tIPV6_MAXPACKET                 = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER      = 0x200\n\tIPV6_MAX_MEMBERSHIPS           = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER       = 0x80\n\tIPV6_MMTU                      = 0x500\n\tIPV6_MSFILTER                  = 0x4a\n\tIPV6_MULTICAST_HOPS            = 0xa\n\tIPV6_MULTICAST_IF              = 0x9\n\tIPV6_MULTICAST_LOOP            = 0xb\n\tIPV6_NEXTHOP                   = 0x30\n\tIPV6_ORIGDSTADDR               = 0x48\n\tIPV6_PATHMTU                   = 0x2c\n\tIPV6_PKTINFO                   = 0x2e\n\tIPV6_PORTRANGE                 = 0xe\n\tIPV6_PORTRANGE_DEFAULT         = 0x0\n\tIPV6_PORTRANGE_HIGH            = 0x1\n\tIPV6_PORTRANGE_LOW             = 0x2\n\tIPV6_PREFER_TEMPADDR           = 0x3f\n\tIPV6_RECVDSTOPTS               = 0x28\n\tIPV6_RECVFLOWID                = 0x46\n\tIPV6_RECVHOPLIMIT              = 0x25\n\tIPV6_RECVHOPOPTS               = 0x27\n\tIPV6_RECVORIGDSTADDR           = 0x48\n\tIPV6_RECVPATHMTU               = 0x2b\n\tIPV6_RECVPKTINFO               = 0x24\n\tIPV6_RECVRSSBUCKETID           = 0x47\n\tIPV6_RECVRTHDR                 = 0x26\n\tIPV6_RECVTCLASS                = 0x39\n\tIPV6_RSSBUCKETID               = 0x45\n\tIPV6_RSS_LISTEN_BUCKET         = 0x42\n\tIPV6_RTHDR                     = 0x33\n\tIPV6_RTHDRDSTOPTS              = 0x23\n\tIPV6_RTHDR_LOOSE               = 0x0\n\tIPV6_RTHDR_STRICT              = 0x1\n\tIPV6_RTHDR_TYPE_0              = 0x0\n\tIPV6_SOCKOPT_RESERVED1         = 0x3\n\tIPV6_TCLASS                    = 0x3d\n\tIPV6_UNICAST_HOPS              = 0x4\n\tIPV6_USE_MIN_MTU               = 0x2a\n\tIPV6_V6ONLY                    = 0x1b\n\tIPV6_VERSION                   = 0x60\n\tIPV6_VERSION_MASK              = 0xf0\n\tIPV6_VLAN_PCP                  = 0x4b\n\tIP_ADD_MEMBERSHIP              = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP       = 0x46\n\tIP_BINDANY                     = 0x18\n\tIP_BINDMULTI                   = 0x19\n\tIP_BLOCK_SOURCE                = 0x48\n\tIP_DEFAULT_MULTICAST_LOOP      = 0x1\n\tIP_DEFAULT_MULTICAST_TTL       = 0x1\n\tIP_DF                          = 0x4000\n\tIP_DONTFRAG                    = 0x43\n\tIP_DROP_MEMBERSHIP             = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP      = 0x47\n\tIP_DUMMYNET3                   = 0x31\n\tIP_DUMMYNET_CONFIGURE          = 0x3c\n\tIP_DUMMYNET_DEL                = 0x3d\n\tIP_DUMMYNET_FLUSH              = 0x3e\n\tIP_DUMMYNET_GET                = 0x40\n\tIP_FLOWID                      = 0x5a\n\tIP_FLOWTYPE                    = 0x5b\n\tIP_FW3                         = 0x30\n\tIP_FW_ADD                      = 0x32\n\tIP_FW_DEL                      = 0x33\n\tIP_FW_FLUSH                    = 0x34\n\tIP_FW_GET                      = 0x36\n\tIP_FW_NAT_CFG                  = 0x38\n\tIP_FW_NAT_DEL                  = 0x39\n\tIP_FW_NAT_GET_CONFIG           = 0x3a\n\tIP_FW_NAT_GET_LOG              = 0x3b\n\tIP_FW_RESETLOG                 = 0x37\n\tIP_FW_TABLE_ADD                = 0x28\n\tIP_FW_TABLE_DEL                = 0x29\n\tIP_FW_TABLE_FLUSH              = 0x2a\n\tIP_FW_TABLE_GETSIZE            = 0x2b\n\tIP_FW_TABLE_LIST               = 0x2c\n\tIP_FW_ZERO                     = 0x35\n\tIP_HDRINCL                     = 0x2\n\tIP_IPSEC_POLICY                = 0x15\n\tIP_MAXPACKET                   = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER        = 0x200\n\tIP_MAX_MEMBERSHIPS             = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER        = 0x80\n\tIP_MAX_SOCK_SRC_FILTER         = 0x80\n\tIP_MF                          = 0x2000\n\tIP_MINTTL                      = 0x42\n\tIP_MSFILTER                    = 0x4a\n\tIP_MSS                         = 0x240\n\tIP_MULTICAST_IF                = 0x9\n\tIP_MULTICAST_LOOP              = 0xb\n\tIP_MULTICAST_TTL               = 0xa\n\tIP_MULTICAST_VIF               = 0xe\n\tIP_OFFMASK                     = 0x1fff\n\tIP_ONESBCAST                   = 0x17\n\tIP_OPTIONS                     = 0x1\n\tIP_ORIGDSTADDR                 = 0x1b\n\tIP_PORTRANGE                   = 0x13\n\tIP_PORTRANGE_DEFAULT           = 0x0\n\tIP_PORTRANGE_HIGH              = 0x1\n\tIP_PORTRANGE_LOW               = 0x2\n\tIP_RECVDSTADDR                 = 0x7\n\tIP_RECVFLOWID                  = 0x5d\n\tIP_RECVIF                      = 0x14\n\tIP_RECVOPTS                    = 0x5\n\tIP_RECVORIGDSTADDR             = 0x1b\n\tIP_RECVRETOPTS                 = 0x6\n\tIP_RECVRSSBUCKETID             = 0x5e\n\tIP_RECVTOS                     = 0x44\n\tIP_RECVTTL                     = 0x41\n\tIP_RETOPTS                     = 0x8\n\tIP_RF                          = 0x8000\n\tIP_RSSBUCKETID                 = 0x5c\n\tIP_RSS_LISTEN_BUCKET           = 0x1a\n\tIP_RSVP_OFF                    = 0x10\n\tIP_RSVP_ON                     = 0xf\n\tIP_RSVP_VIF_OFF                = 0x12\n\tIP_RSVP_VIF_ON                 = 0x11\n\tIP_SENDSRCADDR                 = 0x7\n\tIP_TOS                         = 0x3\n\tIP_TTL                         = 0x4\n\tIP_UNBLOCK_SOURCE              = 0x49\n\tIP_VLAN_PCP                    = 0x4b\n\tISIG                           = 0x80\n\tISTRIP                         = 0x20\n\tITIMER_PROF                    = 0x2\n\tITIMER_REAL                    = 0x0\n\tITIMER_VIRTUAL                 = 0x1\n\tIXANY                          = 0x800\n\tIXOFF                          = 0x400\n\tIXON                           = 0x200\n\tKERN_HOSTNAME                  = 0xa\n\tKERN_OSRELEASE                 = 0x2\n\tKERN_OSTYPE                    = 0x1\n\tKERN_VERSION                   = 0x4\n\tLOCAL_CONNWAIT                 = 0x4\n\tLOCAL_CREDS                    = 0x2\n\tLOCAL_PEERCRED                 = 0x1\n\tLOCAL_VENDOR                   = 0x80000000\n\tLOCK_EX                        = 0x2\n\tLOCK_NB                        = 0x4\n\tLOCK_SH                        = 0x1\n\tLOCK_UN                        = 0x8\n\tMADV_AUTOSYNC                  = 0x7\n\tMADV_CORE                      = 0x9\n\tMADV_DONTNEED                  = 0x4\n\tMADV_FREE                      = 0x5\n\tMADV_NOCORE                    = 0x8\n\tMADV_NORMAL                    = 0x0\n\tMADV_NOSYNC                    = 0x6\n\tMADV_PROTECT                   = 0xa\n\tMADV_RANDOM                    = 0x1\n\tMADV_SEQUENTIAL                = 0x2\n\tMADV_WILLNEED                  = 0x3\n\tMAP_ALIGNED_SUPER              = 0x1000000\n\tMAP_ALIGNMENT_MASK             = -0x1000000\n\tMAP_ALIGNMENT_SHIFT            = 0x18\n\tMAP_ANON                       = 0x1000\n\tMAP_ANONYMOUS                  = 0x1000\n\tMAP_COPY                       = 0x2\n\tMAP_EXCL                       = 0x4000\n\tMAP_FILE                       = 0x0\n\tMAP_FIXED                      = 0x10\n\tMAP_GUARD                      = 0x2000\n\tMAP_HASSEMAPHORE               = 0x200\n\tMAP_NOCORE                     = 0x20000\n\tMAP_NOSYNC                     = 0x800\n\tMAP_PREFAULT_READ              = 0x40000\n\tMAP_PRIVATE                    = 0x2\n\tMAP_RESERVED0020               = 0x20\n\tMAP_RESERVED0040               = 0x40\n\tMAP_RESERVED0080               = 0x80\n\tMAP_RESERVED0100               = 0x100\n\tMAP_SHARED                     = 0x1\n\tMAP_STACK                      = 0x400\n\tMCAST_BLOCK_SOURCE             = 0x54\n\tMCAST_EXCLUDE                  = 0x2\n\tMCAST_INCLUDE                  = 0x1\n\tMCAST_JOIN_GROUP               = 0x50\n\tMCAST_JOIN_SOURCE_GROUP        = 0x52\n\tMCAST_LEAVE_GROUP              = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP       = 0x53\n\tMCAST_UNBLOCK_SOURCE           = 0x55\n\tMCAST_UNDEFINED                = 0x0\n\tMCL_CURRENT                    = 0x1\n\tMCL_FUTURE                     = 0x2\n\tMNT_ACLS                       = 0x8000000\n\tMNT_ASYNC                      = 0x40\n\tMNT_AUTOMOUNTED                = 0x200000000\n\tMNT_BYFSID                     = 0x8000000\n\tMNT_CMDFLAGS                   = 0xd0f0000\n\tMNT_DEFEXPORTED                = 0x200\n\tMNT_DELEXPORT                  = 0x20000\n\tMNT_EXKERB                     = 0x800\n\tMNT_EXPORTANON                 = 0x400\n\tMNT_EXPORTED                   = 0x100\n\tMNT_EXPUBLIC                   = 0x20000000\n\tMNT_EXRDONLY                   = 0x80\n\tMNT_FORCE                      = 0x80000\n\tMNT_GJOURNAL                   = 0x2000000\n\tMNT_IGNORE                     = 0x800000\n\tMNT_LAZY                       = 0x3\n\tMNT_LOCAL                      = 0x1000\n\tMNT_MULTILABEL                 = 0x4000000\n\tMNT_NFS4ACLS                   = 0x10\n\tMNT_NOATIME                    = 0x10000000\n\tMNT_NOCLUSTERR                 = 0x40000000\n\tMNT_NOCLUSTERW                 = 0x80000000\n\tMNT_NOEXEC                     = 0x4\n\tMNT_NONBUSY                    = 0x4000000\n\tMNT_NOSUID                     = 0x8\n\tMNT_NOSYMFOLLOW                = 0x400000\n\tMNT_NOWAIT                     = 0x2\n\tMNT_QUOTA                      = 0x2000\n\tMNT_RDONLY                     = 0x1\n\tMNT_RELOAD                     = 0x40000\n\tMNT_ROOTFS                     = 0x4000\n\tMNT_SNAPSHOT                   = 0x1000000\n\tMNT_SOFTDEP                    = 0x200000\n\tMNT_SUIDDIR                    = 0x100000\n\tMNT_SUJ                        = 0x100000000\n\tMNT_SUSPEND                    = 0x4\n\tMNT_SYNCHRONOUS                = 0x2\n\tMNT_UNION                      = 0x20\n\tMNT_UNTRUSTED                  = 0x800000000\n\tMNT_UPDATE                     = 0x10000\n\tMNT_UPDATEMASK                 = 0xad8d0807e\n\tMNT_USER                       = 0x8000\n\tMNT_VERIFIED                   = 0x400000000\n\tMNT_VISFLAGMASK                = 0xffef0ffff\n\tMNT_WAIT                       = 0x1\n\tMSG_CMSG_CLOEXEC               = 0x40000\n\tMSG_COMPAT                     = 0x8000\n\tMSG_CTRUNC                     = 0x20\n\tMSG_DONTROUTE                  = 0x4\n\tMSG_DONTWAIT                   = 0x80\n\tMSG_EOF                        = 0x100\n\tMSG_EOR                        = 0x8\n\tMSG_NBIO                       = 0x4000\n\tMSG_NOSIGNAL                   = 0x20000\n\tMSG_NOTIFICATION               = 0x2000\n\tMSG_OOB                        = 0x1\n\tMSG_PEEK                       = 0x2\n\tMSG_TRUNC                      = 0x10\n\tMSG_WAITALL                    = 0x40\n\tMSG_WAITFORONE                 = 0x80000\n\tMS_ASYNC                       = 0x1\n\tMS_INVALIDATE                  = 0x2\n\tMS_SYNC                        = 0x0\n\tNAME_MAX                       = 0xff\n\tNET_RT_DUMP                    = 0x1\n\tNET_RT_FLAGS                   = 0x2\n\tNET_RT_IFLIST                  = 0x3\n\tNET_RT_IFLISTL                 = 0x5\n\tNET_RT_IFMALIST                = 0x4\n\tNFDBITS                        = 0x20\n\tNOFLSH                         = 0x80000000\n\tNOKERNINFO                     = 0x2000000\n\tNOTE_ABSTIME                   = 0x10\n\tNOTE_ATTRIB                    = 0x8\n\tNOTE_CHILD                     = 0x4\n\tNOTE_CLOSE                     = 0x100\n\tNOTE_CLOSE_WRITE               = 0x200\n\tNOTE_DELETE                    = 0x1\n\tNOTE_EXEC                      = 0x20000000\n\tNOTE_EXIT                      = 0x80000000\n\tNOTE_EXTEND                    = 0x4\n\tNOTE_FFAND                     = 0x40000000\n\tNOTE_FFCOPY                    = 0xc0000000\n\tNOTE_FFCTRLMASK                = 0xc0000000\n\tNOTE_FFLAGSMASK                = 0xffffff\n\tNOTE_FFNOP                     = 0x0\n\tNOTE_FFOR                      = 0x80000000\n\tNOTE_FILE_POLL                 = 0x2\n\tNOTE_FORK                      = 0x40000000\n\tNOTE_LINK                      = 0x10\n\tNOTE_LOWAT                     = 0x1\n\tNOTE_MSECONDS                  = 0x2\n\tNOTE_NSECONDS                  = 0x8\n\tNOTE_OPEN                      = 0x80\n\tNOTE_PCTRLMASK                 = 0xf0000000\n\tNOTE_PDATAMASK                 = 0xfffff\n\tNOTE_READ                      = 0x400\n\tNOTE_RENAME                    = 0x20\n\tNOTE_REVOKE                    = 0x40\n\tNOTE_SECONDS                   = 0x1\n\tNOTE_TRACK                     = 0x1\n\tNOTE_TRACKERR                  = 0x2\n\tNOTE_TRIGGER                   = 0x1000000\n\tNOTE_USECONDS                  = 0x4\n\tNOTE_WRITE                     = 0x2\n\tOCRNL                          = 0x10\n\tONLCR                          = 0x2\n\tONLRET                         = 0x40\n\tONOCR                          = 0x20\n\tONOEOT                         = 0x8\n\tOPOST                          = 0x1\n\tOXTABS                         = 0x4\n\tO_ACCMODE                      = 0x3\n\tO_APPEND                       = 0x8\n\tO_ASYNC                        = 0x40\n\tO_CLOEXEC                      = 0x100000\n\tO_CREAT                        = 0x200\n\tO_DIRECT                       = 0x10000\n\tO_DIRECTORY                    = 0x20000\n\tO_EXCL                         = 0x800\n\tO_EXEC                         = 0x40000\n\tO_EXLOCK                       = 0x20\n\tO_FSYNC                        = 0x80\n\tO_NDELAY                       = 0x4\n\tO_NOCTTY                       = 0x8000\n\tO_NOFOLLOW                     = 0x100\n\tO_NONBLOCK                     = 0x4\n\tO_RDONLY                       = 0x0\n\tO_RDWR                         = 0x2\n\tO_RESOLVE_BENEATH              = 0x800000\n\tO_SEARCH                       = 0x40000\n\tO_SHLOCK                       = 0x10\n\tO_SYNC                         = 0x80\n\tO_TRUNC                        = 0x400\n\tO_TTY_INIT                     = 0x80000\n\tO_VERIFY                       = 0x200000\n\tO_WRONLY                       = 0x1\n\tPARENB                         = 0x1000\n\tPARMRK                         = 0x8\n\tPARODD                         = 0x2000\n\tPENDIN                         = 0x20000000\n\tPIOD_READ_D                    = 0x1\n\tPIOD_READ_I                    = 0x3\n\tPIOD_WRITE_D                   = 0x2\n\tPIOD_WRITE_I                   = 0x4\n\tPRIO_PGRP                      = 0x1\n\tPRIO_PROCESS                   = 0x0\n\tPRIO_USER                      = 0x2\n\tPROT_EXEC                      = 0x4\n\tPROT_NONE                      = 0x0\n\tPROT_READ                      = 0x1\n\tPROT_WRITE                     = 0x2\n\tPTRACE_DEFAULT                 = 0x1\n\tPTRACE_EXEC                    = 0x1\n\tPTRACE_FORK                    = 0x8\n\tPTRACE_LWP                     = 0x10\n\tPTRACE_SCE                     = 0x2\n\tPTRACE_SCX                     = 0x4\n\tPTRACE_SYSCALL                 = 0x6\n\tPTRACE_VFORK                   = 0x20\n\tPT_ATTACH                      = 0xa\n\tPT_CLEARSTEP                   = 0x10\n\tPT_CONTINUE                    = 0x7\n\tPT_DETACH                      = 0xb\n\tPT_FIRSTMACH                   = 0x40\n\tPT_FOLLOW_FORK                 = 0x17\n\tPT_GETDBREGS                   = 0x25\n\tPT_GETFPREGS                   = 0x23\n\tPT_GETFSBASE                   = 0x47\n\tPT_GETGSBASE                   = 0x49\n\tPT_GETLWPLIST                  = 0xf\n\tPT_GETNUMLWPS                  = 0xe\n\tPT_GETREGS                     = 0x21\n\tPT_GETXMMREGS                  = 0x40\n\tPT_GETXSTATE                   = 0x45\n\tPT_GETXSTATE_INFO              = 0x44\n\tPT_GET_EVENT_MASK              = 0x19\n\tPT_GET_SC_ARGS                 = 0x1b\n\tPT_GET_SC_RET                  = 0x1c\n\tPT_IO                          = 0xc\n\tPT_KILL                        = 0x8\n\tPT_LWPINFO                     = 0xd\n\tPT_LWP_EVENTS                  = 0x18\n\tPT_READ_D                      = 0x2\n\tPT_READ_I                      = 0x1\n\tPT_RESUME                      = 0x13\n\tPT_SETDBREGS                   = 0x26\n\tPT_SETFPREGS                   = 0x24\n\tPT_SETFSBASE                   = 0x48\n\tPT_SETGSBASE                   = 0x4a\n\tPT_SETREGS                     = 0x22\n\tPT_SETSTEP                     = 0x11\n\tPT_SETXMMREGS                  = 0x41\n\tPT_SETXSTATE                   = 0x46\n\tPT_SET_EVENT_MASK              = 0x1a\n\tPT_STEP                        = 0x9\n\tPT_SUSPEND                     = 0x12\n\tPT_SYSCALL                     = 0x16\n\tPT_TO_SCE                      = 0x14\n\tPT_TO_SCX                      = 0x15\n\tPT_TRACE_ME                    = 0x0\n\tPT_VM_ENTRY                    = 0x29\n\tPT_VM_TIMESTAMP                = 0x28\n\tPT_WRITE_D                     = 0x5\n\tPT_WRITE_I                     = 0x4\n\tP_ZONEID                       = 0xc\n\tRLIMIT_AS                      = 0xa\n\tRLIMIT_CORE                    = 0x4\n\tRLIMIT_CPU                     = 0x0\n\tRLIMIT_DATA                    = 0x2\n\tRLIMIT_FSIZE                   = 0x1\n\tRLIMIT_MEMLOCK                 = 0x6\n\tRLIMIT_NOFILE                  = 0x8\n\tRLIMIT_NPROC                   = 0x7\n\tRLIMIT_RSS                     = 0x5\n\tRLIMIT_STACK                   = 0x3\n\tRLIM_INFINITY                  = 0x7fffffffffffffff\n\tRTAX_AUTHOR                    = 0x6\n\tRTAX_BRD                       = 0x7\n\tRTAX_DST                       = 0x0\n\tRTAX_GATEWAY                   = 0x1\n\tRTAX_GENMASK                   = 0x3\n\tRTAX_IFA                       = 0x5\n\tRTAX_IFP                       = 0x4\n\tRTAX_MAX                       = 0x8\n\tRTAX_NETMASK                   = 0x2\n\tRTA_AUTHOR                     = 0x40\n\tRTA_BRD                        = 0x80\n\tRTA_DST                        = 0x1\n\tRTA_GATEWAY                    = 0x2\n\tRTA_GENMASK                    = 0x8\n\tRTA_IFA                        = 0x20\n\tRTA_IFP                        = 0x10\n\tRTA_NETMASK                    = 0x4\n\tRTF_BLACKHOLE                  = 0x1000\n\tRTF_BROADCAST                  = 0x400000\n\tRTF_DONE                       = 0x40\n\tRTF_DYNAMIC                    = 0x10\n\tRTF_FIXEDMTU                   = 0x80000\n\tRTF_FMASK                      = 0x1004d808\n\tRTF_GATEWAY                    = 0x2\n\tRTF_GWFLAG_COMPAT              = 0x80000000\n\tRTF_HOST                       = 0x4\n\tRTF_LLDATA                     = 0x400\n\tRTF_LLINFO                     = 0x400\n\tRTF_LOCAL                      = 0x200000\n\tRTF_MODIFIED                   = 0x20\n\tRTF_MULTICAST                  = 0x800000\n\tRTF_PINNED                     = 0x100000\n\tRTF_PROTO1                     = 0x8000\n\tRTF_PROTO2                     = 0x4000\n\tRTF_PROTO3                     = 0x40000\n\tRTF_REJECT                     = 0x8\n\tRTF_RNH_LOCKED                 = 0x40000000\n\tRTF_STATIC                     = 0x800\n\tRTF_STICKY                     = 0x10000000\n\tRTF_UP                         = 0x1\n\tRTF_XRESOLVE                   = 0x200\n\tRTM_ADD                        = 0x1\n\tRTM_CHANGE                     = 0x3\n\tRTM_DELADDR                    = 0xd\n\tRTM_DELETE                     = 0x2\n\tRTM_DELMADDR                   = 0x10\n\tRTM_GET                        = 0x4\n\tRTM_IEEE80211                  = 0x12\n\tRTM_IFANNOUNCE                 = 0x11\n\tRTM_IFINFO                     = 0xe\n\tRTM_LOCK                       = 0x8\n\tRTM_LOSING                     = 0x5\n\tRTM_MISS                       = 0x7\n\tRTM_NEWADDR                    = 0xc\n\tRTM_NEWMADDR                   = 0xf\n\tRTM_REDIRECT                   = 0x6\n\tRTM_RESOLVE                    = 0xb\n\tRTM_RTTUNIT                    = 0xf4240\n\tRTM_VERSION                    = 0x5\n\tRTV_EXPIRE                     = 0x4\n\tRTV_HOPCOUNT                   = 0x2\n\tRTV_MTU                        = 0x1\n\tRTV_RPIPE                      = 0x8\n\tRTV_RTT                        = 0x40\n\tRTV_RTTVAR                     = 0x80\n\tRTV_SPIPE                      = 0x10\n\tRTV_SSTHRESH                   = 0x20\n\tRTV_WEIGHT                     = 0x100\n\tRT_ALL_FIBS                    = -0x1\n\tRT_BLACKHOLE                   = 0x40\n\tRT_DEFAULT_FIB                 = 0x0\n\tRT_HAS_GW                      = 0x80\n\tRT_HAS_HEADER                  = 0x10\n\tRT_HAS_HEADER_BIT              = 0x4\n\tRT_L2_ME                       = 0x4\n\tRT_L2_ME_BIT                   = 0x2\n\tRT_LLE_CACHE                   = 0x100\n\tRT_MAY_LOOP                    = 0x8\n\tRT_MAY_LOOP_BIT                = 0x3\n\tRT_REJECT                      = 0x20\n\tRUSAGE_CHILDREN                = -0x1\n\tRUSAGE_SELF                    = 0x0\n\tRUSAGE_THREAD                  = 0x1\n\tSCM_BINTIME                    = 0x4\n\tSCM_CREDS                      = 0x3\n\tSCM_MONOTONIC                  = 0x6\n\tSCM_REALTIME                   = 0x5\n\tSCM_RIGHTS                     = 0x1\n\tSCM_TIMESTAMP                  = 0x2\n\tSCM_TIME_INFO                  = 0x7\n\tSEEK_CUR                       = 0x1\n\tSEEK_DATA                      = 0x3\n\tSEEK_END                       = 0x2\n\tSEEK_HOLE                      = 0x4\n\tSEEK_SET                       = 0x0\n\tSHUT_RD                        = 0x0\n\tSHUT_RDWR                      = 0x2\n\tSHUT_WR                        = 0x1\n\tSIOCADDMULTI                   = 0x80206931\n\tSIOCAIFADDR                    = 0x8040691a\n\tSIOCAIFGROUP                   = 0x80246987\n\tSIOCATMARK                     = 0x40047307\n\tSIOCDELMULTI                   = 0x80206932\n\tSIOCDIFADDR                    = 0x80206919\n\tSIOCDIFGROUP                   = 0x80246989\n\tSIOCDIFPHYADDR                 = 0x80206949\n\tSIOCGDRVSPEC                   = 0xc01c697b\n\tSIOCGETSGCNT                   = 0xc0147210\n\tSIOCGETVIFCNT                  = 0xc014720f\n\tSIOCGHIWAT                     = 0x40047301\n\tSIOCGHWADDR                    = 0xc020693e\n\tSIOCGI2C                       = 0xc020693d\n\tSIOCGIFADDR                    = 0xc0206921\n\tSIOCGIFALIAS                   = 0xc044692d\n\tSIOCGIFBRDADDR                 = 0xc0206923\n\tSIOCGIFCAP                     = 0xc020691f\n\tSIOCGIFCONF                    = 0xc0086924\n\tSIOCGIFDESCR                   = 0xc020692a\n\tSIOCGIFDOWNREASON              = 0xc058699a\n\tSIOCGIFDSTADDR                 = 0xc0206922\n\tSIOCGIFFIB                     = 0xc020695c\n\tSIOCGIFFLAGS                   = 0xc0206911\n\tSIOCGIFGENERIC                 = 0xc020693a\n\tSIOCGIFGMEMB                   = 0xc024698a\n\tSIOCGIFGROUP                   = 0xc0246988\n\tSIOCGIFINDEX                   = 0xc0206920\n\tSIOCGIFMAC                     = 0xc0206926\n\tSIOCGIFMEDIA                   = 0xc0286938\n\tSIOCGIFMETRIC                  = 0xc0206917\n\tSIOCGIFMTU                     = 0xc0206933\n\tSIOCGIFNETMASK                 = 0xc0206925\n\tSIOCGIFPDSTADDR                = 0xc0206948\n\tSIOCGIFPHYS                    = 0xc0206935\n\tSIOCGIFPSRCADDR                = 0xc0206947\n\tSIOCGIFRSSHASH                 = 0xc0186997\n\tSIOCGIFRSSKEY                  = 0xc0946996\n\tSIOCGIFSTATUS                  = 0xc331693b\n\tSIOCGIFXMEDIA                  = 0xc028698b\n\tSIOCGLANPCP                    = 0xc0206998\n\tSIOCGLOWAT                     = 0x40047303\n\tSIOCGPGRP                      = 0x40047309\n\tSIOCGPRIVATE_0                 = 0xc0206950\n\tSIOCGPRIVATE_1                 = 0xc0206951\n\tSIOCGTUNFIB                    = 0xc020695e\n\tSIOCIFCREATE                   = 0xc020697a\n\tSIOCIFCREATE2                  = 0xc020697c\n\tSIOCIFDESTROY                  = 0x80206979\n\tSIOCIFGCLONERS                 = 0xc00c6978\n\tSIOCSDRVSPEC                   = 0x801c697b\n\tSIOCSHIWAT                     = 0x80047300\n\tSIOCSIFADDR                    = 0x8020690c\n\tSIOCSIFBRDADDR                 = 0x80206913\n\tSIOCSIFCAP                     = 0x8020691e\n\tSIOCSIFDESCR                   = 0x80206929\n\tSIOCSIFDSTADDR                 = 0x8020690e\n\tSIOCSIFFIB                     = 0x8020695d\n\tSIOCSIFFLAGS                   = 0x80206910\n\tSIOCSIFGENERIC                 = 0x80206939\n\tSIOCSIFLLADDR                  = 0x8020693c\n\tSIOCSIFMAC                     = 0x80206927\n\tSIOCSIFMEDIA                   = 0xc0206937\n\tSIOCSIFMETRIC                  = 0x80206918\n\tSIOCSIFMTU                     = 0x80206934\n\tSIOCSIFNAME                    = 0x80206928\n\tSIOCSIFNETMASK                 = 0x80206916\n\tSIOCSIFPHYADDR                 = 0x80406946\n\tSIOCSIFPHYS                    = 0x80206936\n\tSIOCSIFRVNET                   = 0xc020695b\n\tSIOCSIFVNET                    = 0xc020695a\n\tSIOCSLANPCP                    = 0x80206999\n\tSIOCSLOWAT                     = 0x80047302\n\tSIOCSPGRP                      = 0x80047308\n\tSIOCSTUNFIB                    = 0x8020695f\n\tSOCK_CLOEXEC                   = 0x10000000\n\tSOCK_DGRAM                     = 0x2\n\tSOCK_MAXADDRLEN                = 0xff\n\tSOCK_NONBLOCK                  = 0x20000000\n\tSOCK_RAW                       = 0x3\n\tSOCK_RDM                       = 0x4\n\tSOCK_SEQPACKET                 = 0x5\n\tSOCK_STREAM                    = 0x1\n\tSOL_LOCAL                      = 0x0\n\tSOL_SOCKET                     = 0xffff\n\tSOMAXCONN                      = 0x80\n\tSO_ACCEPTCONN                  = 0x2\n\tSO_ACCEPTFILTER                = 0x1000\n\tSO_BINTIME                     = 0x2000\n\tSO_BROADCAST                   = 0x20\n\tSO_DEBUG                       = 0x1\n\tSO_DOMAIN                      = 0x1019\n\tSO_DONTROUTE                   = 0x10\n\tSO_ERROR                       = 0x1007\n\tSO_KEEPALIVE                   = 0x8\n\tSO_LABEL                       = 0x1009\n\tSO_LINGER                      = 0x80\n\tSO_LISTENINCQLEN               = 0x1013\n\tSO_LISTENQLEN                  = 0x1012\n\tSO_LISTENQLIMIT                = 0x1011\n\tSO_MAX_PACING_RATE             = 0x1018\n\tSO_NOSIGPIPE                   = 0x800\n\tSO_NO_DDP                      = 0x8000\n\tSO_NO_OFFLOAD                  = 0x4000\n\tSO_OOBINLINE                   = 0x100\n\tSO_PEERLABEL                   = 0x1010\n\tSO_PROTOCOL                    = 0x1016\n\tSO_PROTOTYPE                   = 0x1016\n\tSO_RCVBUF                      = 0x1002\n\tSO_RCVLOWAT                    = 0x1004\n\tSO_RCVTIMEO                    = 0x1006\n\tSO_RERROR                      = 0x20000\n\tSO_REUSEADDR                   = 0x4\n\tSO_REUSEPORT                   = 0x200\n\tSO_REUSEPORT_LB                = 0x10000\n\tSO_SETFIB                      = 0x1014\n\tSO_SNDBUF                      = 0x1001\n\tSO_SNDLOWAT                    = 0x1003\n\tSO_SNDTIMEO                    = 0x1005\n\tSO_TIMESTAMP                   = 0x400\n\tSO_TS_BINTIME                  = 0x1\n\tSO_TS_CLOCK                    = 0x1017\n\tSO_TS_CLOCK_MAX                = 0x3\n\tSO_TS_DEFAULT                  = 0x0\n\tSO_TS_MONOTONIC                = 0x3\n\tSO_TS_REALTIME                 = 0x2\n\tSO_TS_REALTIME_MICRO           = 0x0\n\tSO_TYPE                        = 0x1008\n\tSO_USELOOPBACK                 = 0x40\n\tSO_USER_COOKIE                 = 0x1015\n\tSO_VENDOR                      = 0x80000000\n\tS_BLKSIZE                      = 0x200\n\tS_IEXEC                        = 0x40\n\tS_IFBLK                        = 0x6000\n\tS_IFCHR                        = 0x2000\n\tS_IFDIR                        = 0x4000\n\tS_IFIFO                        = 0x1000\n\tS_IFLNK                        = 0xa000\n\tS_IFMT                         = 0xf000\n\tS_IFREG                        = 0x8000\n\tS_IFSOCK                       = 0xc000\n\tS_IFWHT                        = 0xe000\n\tS_IREAD                        = 0x100\n\tS_IRGRP                        = 0x20\n\tS_IROTH                        = 0x4\n\tS_IRUSR                        = 0x100\n\tS_IRWXG                        = 0x38\n\tS_IRWXO                        = 0x7\n\tS_IRWXU                        = 0x1c0\n\tS_ISGID                        = 0x400\n\tS_ISTXT                        = 0x200\n\tS_ISUID                        = 0x800\n\tS_ISVTX                        = 0x200\n\tS_IWGRP                        = 0x10\n\tS_IWOTH                        = 0x2\n\tS_IWRITE                       = 0x80\n\tS_IWUSR                        = 0x80\n\tS_IXGRP                        = 0x8\n\tS_IXOTH                        = 0x1\n\tS_IXUSR                        = 0x40\n\tTAB0                           = 0x0\n\tTAB3                           = 0x4\n\tTABDLY                         = 0x4\n\tTCIFLUSH                       = 0x1\n\tTCIOFF                         = 0x3\n\tTCIOFLUSH                      = 0x3\n\tTCION                          = 0x4\n\tTCOFLUSH                       = 0x2\n\tTCOOFF                         = 0x1\n\tTCOON                          = 0x2\n\tTCPOPT_EOL                     = 0x0\n\tTCPOPT_FAST_OPEN               = 0x22\n\tTCPOPT_MAXSEG                  = 0x2\n\tTCPOPT_NOP                     = 0x1\n\tTCPOPT_PAD                     = 0x0\n\tTCPOPT_SACK                    = 0x5\n\tTCPOPT_SACK_PERMITTED          = 0x4\n\tTCPOPT_SIGNATURE               = 0x13\n\tTCPOPT_TIMESTAMP               = 0x8\n\tTCPOPT_WINDOW                  = 0x3\n\tTCP_BBR_ACK_COMP_ALG           = 0x448\n\tTCP_BBR_ALGORITHM              = 0x43b\n\tTCP_BBR_DRAIN_INC_EXTRA        = 0x43c\n\tTCP_BBR_DRAIN_PG               = 0x42e\n\tTCP_BBR_EXTRA_GAIN             = 0x449\n\tTCP_BBR_EXTRA_STATE            = 0x453\n\tTCP_BBR_FLOOR_MIN_TSO          = 0x454\n\tTCP_BBR_HDWR_PACE              = 0x451\n\tTCP_BBR_HOLD_TARGET            = 0x436\n\tTCP_BBR_IWINTSO                = 0x42b\n\tTCP_BBR_LOWGAIN_FD             = 0x436\n\tTCP_BBR_LOWGAIN_HALF           = 0x435\n\tTCP_BBR_LOWGAIN_THRESH         = 0x434\n\tTCP_BBR_MAX_RTO                = 0x439\n\tTCP_BBR_MIN_RTO                = 0x438\n\tTCP_BBR_MIN_TOPACEOUT          = 0x455\n\tTCP_BBR_ONE_RETRAN             = 0x431\n\tTCP_BBR_PACE_CROSS             = 0x442\n\tTCP_BBR_PACE_DEL_TAR           = 0x43f\n\tTCP_BBR_PACE_OH                = 0x435\n\tTCP_BBR_PACE_PER_SEC           = 0x43e\n\tTCP_BBR_PACE_SEG_MAX           = 0x440\n\tTCP_BBR_PACE_SEG_MIN           = 0x441\n\tTCP_BBR_POLICER_DETECT         = 0x457\n\tTCP_BBR_PROBE_RTT_GAIN         = 0x44d\n\tTCP_BBR_PROBE_RTT_INT          = 0x430\n\tTCP_BBR_PROBE_RTT_LEN          = 0x44e\n\tTCP_BBR_RACK_RTT_USE           = 0x44a\n\tTCP_BBR_RECFORCE               = 0x42c\n\tTCP_BBR_REC_OVER_HPTS          = 0x43a\n\tTCP_BBR_RETRAN_WTSO            = 0x44b\n\tTCP_BBR_RWND_IS_APP            = 0x42f\n\tTCP_BBR_SEND_IWND_IN_TSO       = 0x44f\n\tTCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d\n\tTCP_BBR_STARTUP_LOSS_EXIT      = 0x432\n\tTCP_BBR_STARTUP_PG             = 0x42d\n\tTCP_BBR_TMR_PACE_OH            = 0x448\n\tTCP_BBR_TSLIMITS               = 0x434\n\tTCP_BBR_TSTMP_RAISES           = 0x456\n\tTCP_BBR_UNLIMITED              = 0x43b\n\tTCP_BBR_USEDEL_RATE            = 0x437\n\tTCP_BBR_USE_LOWGAIN            = 0x433\n\tTCP_BBR_USE_RACK_CHEAT         = 0x450\n\tTCP_BBR_UTTER_MAX_TSO          = 0x452\n\tTCP_CA_NAME_MAX                = 0x10\n\tTCP_CCALGOOPT                  = 0x41\n\tTCP_CONGESTION                 = 0x40\n\tTCP_DATA_AFTER_CLOSE           = 0x44c\n\tTCP_DELACK                     = 0x48\n\tTCP_FASTOPEN                   = 0x401\n\tTCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10\n\tTCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4\n\tTCP_FASTOPEN_PSK_LEN           = 0x10\n\tTCP_FUNCTION_BLK               = 0x2000\n\tTCP_FUNCTION_NAME_LEN_MAX      = 0x20\n\tTCP_INFO                       = 0x20\n\tTCP_KEEPCNT                    = 0x400\n\tTCP_KEEPIDLE                   = 0x100\n\tTCP_KEEPINIT                   = 0x80\n\tTCP_KEEPINTVL                  = 0x200\n\tTCP_LOG                        = 0x22\n\tTCP_LOGBUF                     = 0x23\n\tTCP_LOGDUMP                    = 0x25\n\tTCP_LOGDUMPID                  = 0x26\n\tTCP_LOGID                      = 0x24\n\tTCP_LOG_ID_LEN                 = 0x40\n\tTCP_MAXBURST                   = 0x4\n\tTCP_MAXHLEN                    = 0x3c\n\tTCP_MAXOLEN                    = 0x28\n\tTCP_MAXSEG                     = 0x2\n\tTCP_MAXWIN                     = 0xffff\n\tTCP_MAX_SACK                   = 0x4\n\tTCP_MAX_WINSHIFT               = 0xe\n\tTCP_MD5SIG                     = 0x10\n\tTCP_MINMSS                     = 0xd8\n\tTCP_MSS                        = 0x218\n\tTCP_NODELAY                    = 0x1\n\tTCP_NOOPT                      = 0x8\n\tTCP_NOPUSH                     = 0x4\n\tTCP_PCAP_IN                    = 0x1000\n\tTCP_PCAP_OUT                   = 0x800\n\tTCP_RACK_EARLY_RECOV           = 0x423\n\tTCP_RACK_EARLY_SEG             = 0x424\n\tTCP_RACK_GP_INCREASE           = 0x446\n\tTCP_RACK_IDLE_REDUCE_HIGH      = 0x444\n\tTCP_RACK_MIN_PACE              = 0x445\n\tTCP_RACK_MIN_PACE_SEG          = 0x446\n\tTCP_RACK_MIN_TO                = 0x422\n\tTCP_RACK_PACE_ALWAYS           = 0x41f\n\tTCP_RACK_PACE_MAX_SEG          = 0x41e\n\tTCP_RACK_PACE_REDUCE           = 0x41d\n\tTCP_RACK_PKT_DELAY             = 0x428\n\tTCP_RACK_PROP                  = 0x41b\n\tTCP_RACK_PROP_RATE             = 0x420\n\tTCP_RACK_PRR_SENDALOT          = 0x421\n\tTCP_RACK_REORD_FADE            = 0x426\n\tTCP_RACK_REORD_THRESH          = 0x425\n\tTCP_RACK_TLP_INC_VAR           = 0x429\n\tTCP_RACK_TLP_REDUCE            = 0x41c\n\tTCP_RACK_TLP_THRESH            = 0x427\n\tTCP_RACK_TLP_USE               = 0x447\n\tTCP_VENDOR                     = 0x80000000\n\tTCSAFLUSH                      = 0x2\n\tTIMER_ABSTIME                  = 0x1\n\tTIMER_RELTIME                  = 0x0\n\tTIOCCBRK                       = 0x2000747a\n\tTIOCCDTR                       = 0x20007478\n\tTIOCCONS                       = 0x80047462\n\tTIOCDRAIN                      = 0x2000745e\n\tTIOCEXCL                       = 0x2000740d\n\tTIOCEXT                        = 0x80047460\n\tTIOCFLUSH                      = 0x80047410\n\tTIOCGDRAINWAIT                 = 0x40047456\n\tTIOCGETA                       = 0x402c7413\n\tTIOCGETD                       = 0x4004741a\n\tTIOCGPGRP                      = 0x40047477\n\tTIOCGPTN                       = 0x4004740f\n\tTIOCGSID                       = 0x40047463\n\tTIOCGWINSZ                     = 0x40087468\n\tTIOCMBIC                       = 0x8004746b\n\tTIOCMBIS                       = 0x8004746c\n\tTIOCMGDTRWAIT                  = 0x4004745a\n\tTIOCMGET                       = 0x4004746a\n\tTIOCMSDTRWAIT                  = 0x8004745b\n\tTIOCMSET                       = 0x8004746d\n\tTIOCM_CAR                      = 0x40\n\tTIOCM_CD                       = 0x40\n\tTIOCM_CTS                      = 0x20\n\tTIOCM_DCD                      = 0x40\n\tTIOCM_DSR                      = 0x100\n\tTIOCM_DTR                      = 0x2\n\tTIOCM_LE                       = 0x1\n\tTIOCM_RI                       = 0x80\n\tTIOCM_RNG                      = 0x80\n\tTIOCM_RTS                      = 0x4\n\tTIOCM_SR                       = 0x10\n\tTIOCM_ST                       = 0x8\n\tTIOCNOTTY                      = 0x20007471\n\tTIOCNXCL                       = 0x2000740e\n\tTIOCOUTQ                       = 0x40047473\n\tTIOCPKT                        = 0x80047470\n\tTIOCPKT_DATA                   = 0x0\n\tTIOCPKT_DOSTOP                 = 0x20\n\tTIOCPKT_FLUSHREAD              = 0x1\n\tTIOCPKT_FLUSHWRITE             = 0x2\n\tTIOCPKT_IOCTL                  = 0x40\n\tTIOCPKT_NOSTOP                 = 0x10\n\tTIOCPKT_START                  = 0x8\n\tTIOCPKT_STOP                   = 0x4\n\tTIOCPTMASTER                   = 0x2000741c\n\tTIOCSBRK                       = 0x2000747b\n\tTIOCSCTTY                      = 0x20007461\n\tTIOCSDRAINWAIT                 = 0x80047457\n\tTIOCSDTR                       = 0x20007479\n\tTIOCSETA                       = 0x802c7414\n\tTIOCSETAF                      = 0x802c7416\n\tTIOCSETAW                      = 0x802c7415\n\tTIOCSETD                       = 0x8004741b\n\tTIOCSIG                        = 0x2004745f\n\tTIOCSPGRP                      = 0x80047476\n\tTIOCSTART                      = 0x2000746e\n\tTIOCSTAT                       = 0x20007465\n\tTIOCSTI                        = 0x80017472\n\tTIOCSTOP                       = 0x2000746f\n\tTIOCSWINSZ                     = 0x80087467\n\tTIOCTIMESTAMP                  = 0x40087459\n\tTIOCUCNTL                      = 0x80047466\n\tTOSTOP                         = 0x400000\n\tUTIME_NOW                      = -0x1\n\tUTIME_OMIT                     = -0x2\n\tVDISCARD                       = 0xf\n\tVDSUSP                         = 0xb\n\tVEOF                           = 0x0\n\tVEOL                           = 0x1\n\tVEOL2                          = 0x2\n\tVERASE                         = 0x3\n\tVERASE2                        = 0x7\n\tVINTR                          = 0x8\n\tVKILL                          = 0x5\n\tVLNEXT                         = 0xe\n\tVMIN                           = 0x10\n\tVM_BCACHE_SIZE_MAX             = 0x70e0000\n\tVM_SWZONE_SIZE_MAX             = 0x2280000\n\tVQUIT                          = 0x9\n\tVREPRINT                       = 0x6\n\tVSTART                         = 0xc\n\tVSTATUS                        = 0x12\n\tVSTOP                          = 0xd\n\tVSUSP                          = 0xa\n\tVTIME                          = 0x11\n\tVWERASE                        = 0x4\n\tWCONTINUED                     = 0x4\n\tWCOREFLAG                      = 0x80\n\tWEXITED                        = 0x10\n\tWLINUXCLONE                    = 0x80000000\n\tWNOHANG                        = 0x1\n\tWNOWAIT                        = 0x8\n\tWSTOPPED                       = 0x2\n\tWTRAPPED                       = 0x20\n\tWUNTRACED                      = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECAPMODE        = syscall.Errno(0x5e)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTEGRITY      = syscall.Errno(0x61)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x61)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCAPABLE     = syscall.Errno(0x5d)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5f)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x60)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGLIBRT  = syscall.Signal(0x21)\n\tSIGLWP    = syscall.Signal(0x20)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOTCAPABLE\", \"capabilities insufficient\"},\n\t{94, \"ECAPMODE\", \"not permitted in capability mode\"},\n\t{95, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{96, \"EOWNERDEAD\", \"previous owner died\"},\n\t{97, \"EINTEGRITY\", \"integrity check failed\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"unknown signal\"},\n\t{33, \"SIGLIBRT\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && freebsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                   = 0x10\n\tAF_ARP                         = 0x23\n\tAF_ATM                         = 0x1e\n\tAF_BLUETOOTH                   = 0x24\n\tAF_CCITT                       = 0xa\n\tAF_CHAOS                       = 0x5\n\tAF_CNT                         = 0x15\n\tAF_COIP                        = 0x14\n\tAF_DATAKIT                     = 0x9\n\tAF_DECnet                      = 0xc\n\tAF_DLI                         = 0xd\n\tAF_E164                        = 0x1a\n\tAF_ECMA                        = 0x8\n\tAF_HYLINK                      = 0xf\n\tAF_IEEE80211                   = 0x25\n\tAF_IMPLINK                     = 0x3\n\tAF_INET                        = 0x2\n\tAF_INET6                       = 0x1c\n\tAF_INET6_SDP                   = 0x2a\n\tAF_INET_SDP                    = 0x28\n\tAF_IPX                         = 0x17\n\tAF_ISDN                        = 0x1a\n\tAF_ISO                         = 0x7\n\tAF_LAT                         = 0xe\n\tAF_LINK                        = 0x12\n\tAF_LOCAL                       = 0x1\n\tAF_MAX                         = 0x2a\n\tAF_NATM                        = 0x1d\n\tAF_NETBIOS                     = 0x6\n\tAF_NETGRAPH                    = 0x20\n\tAF_OSI                         = 0x7\n\tAF_PUP                         = 0x4\n\tAF_ROUTE                       = 0x11\n\tAF_SCLUSTER                    = 0x22\n\tAF_SIP                         = 0x18\n\tAF_SLOW                        = 0x21\n\tAF_SNA                         = 0xb\n\tAF_UNIX                        = 0x1\n\tAF_UNSPEC                      = 0x0\n\tAF_VENDOR00                    = 0x27\n\tAF_VENDOR01                    = 0x29\n\tAF_VENDOR02                    = 0x2b\n\tAF_VENDOR03                    = 0x2d\n\tAF_VENDOR04                    = 0x2f\n\tAF_VENDOR05                    = 0x31\n\tAF_VENDOR06                    = 0x33\n\tAF_VENDOR07                    = 0x35\n\tAF_VENDOR08                    = 0x37\n\tAF_VENDOR09                    = 0x39\n\tAF_VENDOR10                    = 0x3b\n\tAF_VENDOR11                    = 0x3d\n\tAF_VENDOR12                    = 0x3f\n\tAF_VENDOR13                    = 0x41\n\tAF_VENDOR14                    = 0x43\n\tAF_VENDOR15                    = 0x45\n\tAF_VENDOR16                    = 0x47\n\tAF_VENDOR17                    = 0x49\n\tAF_VENDOR18                    = 0x4b\n\tAF_VENDOR19                    = 0x4d\n\tAF_VENDOR20                    = 0x4f\n\tAF_VENDOR21                    = 0x51\n\tAF_VENDOR22                    = 0x53\n\tAF_VENDOR23                    = 0x55\n\tAF_VENDOR24                    = 0x57\n\tAF_VENDOR25                    = 0x59\n\tAF_VENDOR26                    = 0x5b\n\tAF_VENDOR27                    = 0x5d\n\tAF_VENDOR28                    = 0x5f\n\tAF_VENDOR29                    = 0x61\n\tAF_VENDOR30                    = 0x63\n\tAF_VENDOR31                    = 0x65\n\tAF_VENDOR32                    = 0x67\n\tAF_VENDOR33                    = 0x69\n\tAF_VENDOR34                    = 0x6b\n\tAF_VENDOR35                    = 0x6d\n\tAF_VENDOR36                    = 0x6f\n\tAF_VENDOR37                    = 0x71\n\tAF_VENDOR38                    = 0x73\n\tAF_VENDOR39                    = 0x75\n\tAF_VENDOR40                    = 0x77\n\tAF_VENDOR41                    = 0x79\n\tAF_VENDOR42                    = 0x7b\n\tAF_VENDOR43                    = 0x7d\n\tAF_VENDOR44                    = 0x7f\n\tAF_VENDOR45                    = 0x81\n\tAF_VENDOR46                    = 0x83\n\tAF_VENDOR47                    = 0x85\n\tALTWERASE                      = 0x200\n\tB0                             = 0x0\n\tB110                           = 0x6e\n\tB115200                        = 0x1c200\n\tB1200                          = 0x4b0\n\tB134                           = 0x86\n\tB14400                         = 0x3840\n\tB150                           = 0x96\n\tB1800                          = 0x708\n\tB19200                         = 0x4b00\n\tB200                           = 0xc8\n\tB230400                        = 0x38400\n\tB2400                          = 0x960\n\tB28800                         = 0x7080\n\tB300                           = 0x12c\n\tB38400                         = 0x9600\n\tB460800                        = 0x70800\n\tB4800                          = 0x12c0\n\tB50                            = 0x32\n\tB57600                         = 0xe100\n\tB600                           = 0x258\n\tB7200                          = 0x1c20\n\tB75                            = 0x4b\n\tB76800                         = 0x12c00\n\tB921600                        = 0xe1000\n\tB9600                          = 0x2580\n\tBIOCFEEDBACK                   = 0x8004427c\n\tBIOCFLUSH                      = 0x20004268\n\tBIOCGBLEN                      = 0x40044266\n\tBIOCGDIRECTION                 = 0x40044276\n\tBIOCGDLT                       = 0x4004426a\n\tBIOCGDLTLIST                   = 0xc0104279\n\tBIOCGETBUFMODE                 = 0x4004427d\n\tBIOCGETIF                      = 0x4020426b\n\tBIOCGETZMAX                    = 0x4008427f\n\tBIOCGHDRCMPLT                  = 0x40044274\n\tBIOCGRSIG                      = 0x40044272\n\tBIOCGRTIMEOUT                  = 0x4010426e\n\tBIOCGSEESENT                   = 0x40044276\n\tBIOCGSTATS                     = 0x4008426f\n\tBIOCGTSTAMP                    = 0x40044283\n\tBIOCIMMEDIATE                  = 0x80044270\n\tBIOCLOCK                       = 0x2000427a\n\tBIOCPROMISC                    = 0x20004269\n\tBIOCROTZBUF                    = 0x40184280\n\tBIOCSBLEN                      = 0xc0044266\n\tBIOCSDIRECTION                 = 0x80044277\n\tBIOCSDLT                       = 0x80044278\n\tBIOCSETBUFMODE                 = 0x8004427e\n\tBIOCSETF                       = 0x80104267\n\tBIOCSETFNR                     = 0x80104282\n\tBIOCSETIF                      = 0x8020426c\n\tBIOCSETVLANPCP                 = 0x80044285\n\tBIOCSETWF                      = 0x8010427b\n\tBIOCSETZBUF                    = 0x80184281\n\tBIOCSHDRCMPLT                  = 0x80044275\n\tBIOCSRSIG                      = 0x80044273\n\tBIOCSRTIMEOUT                  = 0x8010426d\n\tBIOCSSEESENT                   = 0x80044277\n\tBIOCSTSTAMP                    = 0x80044284\n\tBIOCVERSION                    = 0x40044271\n\tBPF_A                          = 0x10\n\tBPF_ABS                        = 0x20\n\tBPF_ADD                        = 0x0\n\tBPF_ALIGNMENT                  = 0x8\n\tBPF_ALU                        = 0x4\n\tBPF_AND                        = 0x50\n\tBPF_B                          = 0x10\n\tBPF_BUFMODE_BUFFER             = 0x1\n\tBPF_BUFMODE_ZBUF               = 0x2\n\tBPF_DIV                        = 0x30\n\tBPF_H                          = 0x8\n\tBPF_IMM                        = 0x0\n\tBPF_IND                        = 0x40\n\tBPF_JA                         = 0x0\n\tBPF_JEQ                        = 0x10\n\tBPF_JGE                        = 0x30\n\tBPF_JGT                        = 0x20\n\tBPF_JMP                        = 0x5\n\tBPF_JSET                       = 0x40\n\tBPF_K                          = 0x0\n\tBPF_LD                         = 0x0\n\tBPF_LDX                        = 0x1\n\tBPF_LEN                        = 0x80\n\tBPF_LSH                        = 0x60\n\tBPF_MAJOR_VERSION              = 0x1\n\tBPF_MAXBUFSIZE                 = 0x80000\n\tBPF_MAXINSNS                   = 0x200\n\tBPF_MEM                        = 0x60\n\tBPF_MEMWORDS                   = 0x10\n\tBPF_MINBUFSIZE                 = 0x20\n\tBPF_MINOR_VERSION              = 0x1\n\tBPF_MISC                       = 0x7\n\tBPF_MOD                        = 0x90\n\tBPF_MSH                        = 0xa0\n\tBPF_MUL                        = 0x20\n\tBPF_NEG                        = 0x80\n\tBPF_OR                         = 0x40\n\tBPF_RELEASE                    = 0x30bb6\n\tBPF_RET                        = 0x6\n\tBPF_RSH                        = 0x70\n\tBPF_ST                         = 0x2\n\tBPF_STX                        = 0x3\n\tBPF_SUB                        = 0x10\n\tBPF_TAX                        = 0x0\n\tBPF_TXA                        = 0x80\n\tBPF_T_BINTIME                  = 0x2\n\tBPF_T_BINTIME_FAST             = 0x102\n\tBPF_T_BINTIME_MONOTONIC        = 0x202\n\tBPF_T_BINTIME_MONOTONIC_FAST   = 0x302\n\tBPF_T_FAST                     = 0x100\n\tBPF_T_FLAG_MASK                = 0x300\n\tBPF_T_FORMAT_MASK              = 0x3\n\tBPF_T_MICROTIME                = 0x0\n\tBPF_T_MICROTIME_FAST           = 0x100\n\tBPF_T_MICROTIME_MONOTONIC      = 0x200\n\tBPF_T_MICROTIME_MONOTONIC_FAST = 0x300\n\tBPF_T_MONOTONIC                = 0x200\n\tBPF_T_MONOTONIC_FAST           = 0x300\n\tBPF_T_NANOTIME                 = 0x1\n\tBPF_T_NANOTIME_FAST            = 0x101\n\tBPF_T_NANOTIME_MONOTONIC       = 0x201\n\tBPF_T_NANOTIME_MONOTONIC_FAST  = 0x301\n\tBPF_T_NONE                     = 0x3\n\tBPF_T_NORMAL                   = 0x0\n\tBPF_W                          = 0x0\n\tBPF_X                          = 0x8\n\tBPF_XOR                        = 0xa0\n\tBRKINT                         = 0x2\n\tCAP_ACCEPT                     = 0x200000020000000\n\tCAP_ACL_CHECK                  = 0x400000000010000\n\tCAP_ACL_DELETE                 = 0x400000000020000\n\tCAP_ACL_GET                    = 0x400000000040000\n\tCAP_ACL_SET                    = 0x400000000080000\n\tCAP_ALL0                       = 0x20007ffffffffff\n\tCAP_ALL1                       = 0x4000000001fffff\n\tCAP_BIND                       = 0x200000040000000\n\tCAP_BINDAT                     = 0x200008000000400\n\tCAP_CHFLAGSAT                  = 0x200000000001400\n\tCAP_CONNECT                    = 0x200000080000000\n\tCAP_CONNECTAT                  = 0x200010000000400\n\tCAP_CREATE                     = 0x200000000000040\n\tCAP_EVENT                      = 0x400000000000020\n\tCAP_EXTATTR_DELETE             = 0x400000000001000\n\tCAP_EXTATTR_GET                = 0x400000000002000\n\tCAP_EXTATTR_LIST               = 0x400000000004000\n\tCAP_EXTATTR_SET                = 0x400000000008000\n\tCAP_FCHDIR                     = 0x200000000000800\n\tCAP_FCHFLAGS                   = 0x200000000001000\n\tCAP_FCHMOD                     = 0x200000000002000\n\tCAP_FCHMODAT                   = 0x200000000002400\n\tCAP_FCHOWN                     = 0x200000000004000\n\tCAP_FCHOWNAT                   = 0x200000000004400\n\tCAP_FCNTL                      = 0x200000000008000\n\tCAP_FCNTL_ALL                  = 0x78\n\tCAP_FCNTL_GETFL                = 0x8\n\tCAP_FCNTL_GETOWN               = 0x20\n\tCAP_FCNTL_SETFL                = 0x10\n\tCAP_FCNTL_SETOWN               = 0x40\n\tCAP_FEXECVE                    = 0x200000000000080\n\tCAP_FLOCK                      = 0x200000000010000\n\tCAP_FPATHCONF                  = 0x200000000020000\n\tCAP_FSCK                       = 0x200000000040000\n\tCAP_FSTAT                      = 0x200000000080000\n\tCAP_FSTATAT                    = 0x200000000080400\n\tCAP_FSTATFS                    = 0x200000000100000\n\tCAP_FSYNC                      = 0x200000000000100\n\tCAP_FTRUNCATE                  = 0x200000000000200\n\tCAP_FUTIMES                    = 0x200000000200000\n\tCAP_FUTIMESAT                  = 0x200000000200400\n\tCAP_GETPEERNAME                = 0x200000100000000\n\tCAP_GETSOCKNAME                = 0x200000200000000\n\tCAP_GETSOCKOPT                 = 0x200000400000000\n\tCAP_IOCTL                      = 0x400000000000080\n\tCAP_IOCTLS_ALL                 = 0x7fffffffffffffff\n\tCAP_KQUEUE                     = 0x400000000100040\n\tCAP_KQUEUE_CHANGE              = 0x400000000100000\n\tCAP_KQUEUE_EVENT               = 0x400000000000040\n\tCAP_LINKAT_SOURCE              = 0x200020000000400\n\tCAP_LINKAT_TARGET              = 0x200000000400400\n\tCAP_LISTEN                     = 0x200000800000000\n\tCAP_LOOKUP                     = 0x200000000000400\n\tCAP_MAC_GET                    = 0x400000000000001\n\tCAP_MAC_SET                    = 0x400000000000002\n\tCAP_MKDIRAT                    = 0x200000000800400\n\tCAP_MKFIFOAT                   = 0x200000001000400\n\tCAP_MKNODAT                    = 0x200000002000400\n\tCAP_MMAP                       = 0x200000000000010\n\tCAP_MMAP_R                     = 0x20000000000001d\n\tCAP_MMAP_RW                    = 0x20000000000001f\n\tCAP_MMAP_RWX                   = 0x20000000000003f\n\tCAP_MMAP_RX                    = 0x20000000000003d\n\tCAP_MMAP_W                     = 0x20000000000001e\n\tCAP_MMAP_WX                    = 0x20000000000003e\n\tCAP_MMAP_X                     = 0x20000000000003c\n\tCAP_PDGETPID                   = 0x400000000000200\n\tCAP_PDKILL                     = 0x400000000000800\n\tCAP_PDWAIT                     = 0x400000000000400\n\tCAP_PEELOFF                    = 0x200001000000000\n\tCAP_POLL_EVENT                 = 0x400000000000020\n\tCAP_PREAD                      = 0x20000000000000d\n\tCAP_PWRITE                     = 0x20000000000000e\n\tCAP_READ                       = 0x200000000000001\n\tCAP_RECV                       = 0x200000000000001\n\tCAP_RENAMEAT_SOURCE            = 0x200000004000400\n\tCAP_RENAMEAT_TARGET            = 0x200040000000400\n\tCAP_RIGHTS_VERSION             = 0x0\n\tCAP_RIGHTS_VERSION_00          = 0x0\n\tCAP_SEEK                       = 0x20000000000000c\n\tCAP_SEEK_TELL                  = 0x200000000000004\n\tCAP_SEM_GETVALUE               = 0x400000000000004\n\tCAP_SEM_POST                   = 0x400000000000008\n\tCAP_SEM_WAIT                   = 0x400000000000010\n\tCAP_SEND                       = 0x200000000000002\n\tCAP_SETSOCKOPT                 = 0x200002000000000\n\tCAP_SHUTDOWN                   = 0x200004000000000\n\tCAP_SOCK_CLIENT                = 0x200007780000003\n\tCAP_SOCK_SERVER                = 0x200007f60000003\n\tCAP_SYMLINKAT                  = 0x200000008000400\n\tCAP_TTYHOOK                    = 0x400000000000100\n\tCAP_UNLINKAT                   = 0x200000010000400\n\tCAP_UNUSED0_44                 = 0x200080000000000\n\tCAP_UNUSED0_57                 = 0x300000000000000\n\tCAP_UNUSED1_22                 = 0x400000000200000\n\tCAP_UNUSED1_57                 = 0x500000000000000\n\tCAP_WRITE                      = 0x200000000000002\n\tCFLUSH                         = 0xf\n\tCLOCAL                         = 0x8000\n\tCLOCK_MONOTONIC                = 0x4\n\tCLOCK_MONOTONIC_FAST           = 0xc\n\tCLOCK_MONOTONIC_PRECISE        = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID       = 0xf\n\tCLOCK_PROF                     = 0x2\n\tCLOCK_REALTIME                 = 0x0\n\tCLOCK_REALTIME_FAST            = 0xa\n\tCLOCK_REALTIME_PRECISE         = 0x9\n\tCLOCK_SECOND                   = 0xd\n\tCLOCK_THREAD_CPUTIME_ID        = 0xe\n\tCLOCK_UPTIME                   = 0x5\n\tCLOCK_UPTIME_FAST              = 0x8\n\tCLOCK_UPTIME_PRECISE           = 0x7\n\tCLOCK_VIRTUAL                  = 0x1\n\tCPUSTATES                      = 0x5\n\tCP_IDLE                        = 0x4\n\tCP_INTR                        = 0x3\n\tCP_NICE                        = 0x1\n\tCP_SYS                         = 0x2\n\tCP_USER                        = 0x0\n\tCREAD                          = 0x800\n\tCRTSCTS                        = 0x30000\n\tCS5                            = 0x0\n\tCS6                            = 0x100\n\tCS7                            = 0x200\n\tCS8                            = 0x300\n\tCSIZE                          = 0x300\n\tCSTART                         = 0x11\n\tCSTATUS                        = 0x14\n\tCSTOP                          = 0x13\n\tCSTOPB                         = 0x400\n\tCSUSP                          = 0x1a\n\tCTL_HW                         = 0x6\n\tCTL_KERN                       = 0x1\n\tCTL_MAXNAME                    = 0x18\n\tCTL_NET                        = 0x4\n\tDIOCGATTR                      = 0xc148648e\n\tDIOCGDELETE                    = 0x80106488\n\tDIOCGFLUSH                     = 0x20006487\n\tDIOCGFRONTSTUFF                = 0x40086486\n\tDIOCGFWHEADS                   = 0x40046483\n\tDIOCGFWSECTORS                 = 0x40046482\n\tDIOCGIDENT                     = 0x41006489\n\tDIOCGMEDIASIZE                 = 0x40086481\n\tDIOCGPHYSPATH                  = 0x4400648d\n\tDIOCGPROVIDERNAME              = 0x4400648a\n\tDIOCGSECTORSIZE                = 0x40046480\n\tDIOCGSTRIPEOFFSET              = 0x4008648c\n\tDIOCGSTRIPESIZE                = 0x4008648b\n\tDIOCSKERNELDUMP                = 0x80506490\n\tDIOCSKERNELDUMP_FREEBSD11      = 0x80046485\n\tDIOCZONECMD                    = 0xc080648f\n\tDLT_A429                       = 0xb8\n\tDLT_A653_ICM                   = 0xb9\n\tDLT_AIRONET_HEADER             = 0x78\n\tDLT_AOS                        = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394     = 0x8a\n\tDLT_ARCNET                     = 0x7\n\tDLT_ARCNET_LINUX               = 0x81\n\tDLT_ATM_CLIP                   = 0x13\n\tDLT_ATM_RFC1483                = 0xb\n\tDLT_AURORA                     = 0x7e\n\tDLT_AX25                       = 0x3\n\tDLT_AX25_KISS                  = 0xca\n\tDLT_BACNET_MS_TP               = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB         = 0xff\n\tDLT_BLUETOOTH_HCI_H4           = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9\n\tDLT_BLUETOOTH_LE_LL            = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR    = 0xfe\n\tDLT_CAN20B                     = 0xbe\n\tDLT_CAN_SOCKETCAN              = 0xe3\n\tDLT_CHAOS                      = 0x5\n\tDLT_CHDLC                      = 0x68\n\tDLT_CISCO_IOS                  = 0x76\n\tDLT_CLASS_NETBSD_RAWAF         = 0x2240000\n\tDLT_C_HDLC                     = 0x68\n\tDLT_C_HDLC_WITH_DIR            = 0xcd\n\tDLT_DBUS                       = 0xe7\n\tDLT_DECT                       = 0xdd\n\tDLT_DISPLAYPORT_AUX            = 0x113\n\tDLT_DOCSIS                     = 0x8f\n\tDLT_DOCSIS31_XRA31             = 0x111\n\tDLT_DVB_CI                     = 0xeb\n\tDLT_ECONET                     = 0x73\n\tDLT_EN10MB                     = 0x1\n\tDLT_EN3MB                      = 0x2\n\tDLT_ENC                        = 0x6d\n\tDLT_EPON                       = 0x103\n\tDLT_ERF                        = 0xc5\n\tDLT_ERF_ETH                    = 0xaf\n\tDLT_ERF_POS                    = 0xb0\n\tDLT_ETHERNET_MPACKET           = 0x112\n\tDLT_FC_2                       = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS     = 0xe1\n\tDLT_FDDI                       = 0xa\n\tDLT_FLEXRAY                    = 0xd2\n\tDLT_FRELAY                     = 0x6b\n\tDLT_FRELAY_WITH_DIR            = 0xce\n\tDLT_GCOM_SERIAL                = 0xad\n\tDLT_GCOM_T1E1                  = 0xac\n\tDLT_GPF_F                      = 0xab\n\tDLT_GPF_T                      = 0xaa\n\tDLT_GPRS_LLC                   = 0xa9\n\tDLT_GSMTAP_ABIS                = 0xda\n\tDLT_GSMTAP_UM                  = 0xd9\n\tDLT_IBM_SN                     = 0x92\n\tDLT_IBM_SP                     = 0x91\n\tDLT_IEEE802                    = 0x6\n\tDLT_IEEE802_11                 = 0x69\n\tDLT_IEEE802_11_RADIO           = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS       = 0xa3\n\tDLT_IEEE802_15_4               = 0xc3\n\tDLT_IEEE802_15_4_LINUX         = 0xbf\n\tDLT_IEEE802_15_4_NOFCS         = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY    = 0xd7\n\tDLT_IEEE802_16_MAC_CPS         = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1\n\tDLT_INFINIBAND                 = 0xf7\n\tDLT_IPFILTER                   = 0x74\n\tDLT_IPMB_KONTRON               = 0xc7\n\tDLT_IPMB_LINUX                 = 0xd1\n\tDLT_IPMI_HPM_2                 = 0x104\n\tDLT_IPNET                      = 0xe2\n\tDLT_IPOIB                      = 0xf2\n\tDLT_IPV4                       = 0xe4\n\tDLT_IPV6                       = 0xe5\n\tDLT_IP_OVER_FC                 = 0x7a\n\tDLT_ISO_14443                  = 0x108\n\tDLT_JUNIPER_ATM1               = 0x89\n\tDLT_JUNIPER_ATM2               = 0x87\n\tDLT_JUNIPER_ATM_CEMIC          = 0xee\n\tDLT_JUNIPER_CHDLC              = 0xb5\n\tDLT_JUNIPER_ES                 = 0x84\n\tDLT_JUNIPER_ETHER              = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL       = 0xea\n\tDLT_JUNIPER_FRELAY             = 0xb4\n\tDLT_JUNIPER_GGSN               = 0x85\n\tDLT_JUNIPER_ISM                = 0xc2\n\tDLT_JUNIPER_MFR                = 0x86\n\tDLT_JUNIPER_MLFR               = 0x83\n\tDLT_JUNIPER_MLPPP              = 0x82\n\tDLT_JUNIPER_MONITOR            = 0xa4\n\tDLT_JUNIPER_PIC_PEER           = 0xae\n\tDLT_JUNIPER_PPP                = 0xb3\n\tDLT_JUNIPER_PPPOE              = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM          = 0xa8\n\tDLT_JUNIPER_SERVICES           = 0x88\n\tDLT_JUNIPER_SRX_E2E            = 0xe9\n\tDLT_JUNIPER_ST                 = 0xc8\n\tDLT_JUNIPER_VP                 = 0xb7\n\tDLT_JUNIPER_VS                 = 0xe8\n\tDLT_LAPB_WITH_DIR              = 0xcf\n\tDLT_LAPD                       = 0xcb\n\tDLT_LIN                        = 0xd4\n\tDLT_LINUX_EVDEV                = 0xd8\n\tDLT_LINUX_IRDA                 = 0x90\n\tDLT_LINUX_LAPD                 = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION    = 0xa6\n\tDLT_LINUX_SLL                  = 0x71\n\tDLT_LINUX_SLL2                 = 0x114\n\tDLT_LOOP                       = 0x6c\n\tDLT_LORATAP                    = 0x10e\n\tDLT_LTALK                      = 0x72\n\tDLT_MATCHING_MAX               = 0x114\n\tDLT_MATCHING_MIN               = 0x68\n\tDLT_MFR                        = 0xb6\n\tDLT_MOST                       = 0xd3\n\tDLT_MPEG_2_TS                  = 0xf3\n\tDLT_MPLS                       = 0xdb\n\tDLT_MTP2                       = 0x8c\n\tDLT_MTP2_WITH_PHDR             = 0x8b\n\tDLT_MTP3                       = 0x8d\n\tDLT_MUX27010                   = 0xec\n\tDLT_NETANALYZER                = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT    = 0xf1\n\tDLT_NETLINK                    = 0xfd\n\tDLT_NFC_LLCP                   = 0xf5\n\tDLT_NFLOG                      = 0xef\n\tDLT_NG40                       = 0xf4\n\tDLT_NORDIC_BLE                 = 0x110\n\tDLT_NULL                       = 0x0\n\tDLT_OPENFLOW                   = 0x10b\n\tDLT_PCI_EXP                    = 0x7d\n\tDLT_PFLOG                      = 0x75\n\tDLT_PFSYNC                     = 0x79\n\tDLT_PKTAP                      = 0x102\n\tDLT_PPI                        = 0xc0\n\tDLT_PPP                        = 0x9\n\tDLT_PPP_BSDOS                  = 0xe\n\tDLT_PPP_ETHER                  = 0x33\n\tDLT_PPP_PPPD                   = 0xa6\n\tDLT_PPP_SERIAL                 = 0x32\n\tDLT_PPP_WITH_DIR               = 0xcc\n\tDLT_PPP_WITH_DIRECTION         = 0xa6\n\tDLT_PRISM_HEADER               = 0x77\n\tDLT_PROFIBUS_DL                = 0x101\n\tDLT_PRONET                     = 0x4\n\tDLT_RAIF1                      = 0xc6\n\tDLT_RAW                        = 0xc\n\tDLT_RDS                        = 0x109\n\tDLT_REDBACK_SMARTEDGE          = 0x20\n\tDLT_RIO                        = 0x7c\n\tDLT_RTAC_SERIAL                = 0xfa\n\tDLT_SCCP                       = 0x8e\n\tDLT_SCTP                       = 0xf8\n\tDLT_SDLC                       = 0x10c\n\tDLT_SITA                       = 0xc4\n\tDLT_SLIP                       = 0x8\n\tDLT_SLIP_BSDOS                 = 0xd\n\tDLT_STANAG_5066_D_PDU          = 0xed\n\tDLT_SUNATM                     = 0x7b\n\tDLT_SYMANTEC_FIREWALL          = 0x63\n\tDLT_TI_LLN_SNIFFER             = 0x10d\n\tDLT_TZSP                       = 0x80\n\tDLT_USB                        = 0xba\n\tDLT_USBPCAP                    = 0xf9\n\tDLT_USB_DARWIN                 = 0x10a\n\tDLT_USB_FREEBSD                = 0xba\n\tDLT_USB_LINUX                  = 0xbd\n\tDLT_USB_LINUX_MMAPPED          = 0xdc\n\tDLT_USER0                      = 0x93\n\tDLT_USER1                      = 0x94\n\tDLT_USER10                     = 0x9d\n\tDLT_USER11                     = 0x9e\n\tDLT_USER12                     = 0x9f\n\tDLT_USER13                     = 0xa0\n\tDLT_USER14                     = 0xa1\n\tDLT_USER15                     = 0xa2\n\tDLT_USER2                      = 0x95\n\tDLT_USER3                      = 0x96\n\tDLT_USER4                      = 0x97\n\tDLT_USER5                      = 0x98\n\tDLT_USER6                      = 0x99\n\tDLT_USER7                      = 0x9a\n\tDLT_USER8                      = 0x9b\n\tDLT_USER9                      = 0x9c\n\tDLT_VSOCK                      = 0x10f\n\tDLT_WATTSTOPPER_DLM            = 0x107\n\tDLT_WIHART                     = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU        = 0xfc\n\tDLT_X2E_SERIAL                 = 0xd5\n\tDLT_X2E_XORAYA                 = 0xd6\n\tDLT_ZWAVE_R1_R2                = 0x105\n\tDLT_ZWAVE_R3                   = 0x106\n\tDT_BLK                         = 0x6\n\tDT_CHR                         = 0x2\n\tDT_DIR                         = 0x4\n\tDT_FIFO                        = 0x1\n\tDT_LNK                         = 0xa\n\tDT_REG                         = 0x8\n\tDT_SOCK                        = 0xc\n\tDT_UNKNOWN                     = 0x0\n\tDT_WHT                         = 0xe\n\tECHO                           = 0x8\n\tECHOCTL                        = 0x40\n\tECHOE                          = 0x2\n\tECHOK                          = 0x4\n\tECHOKE                         = 0x1\n\tECHONL                         = 0x10\n\tECHOPRT                        = 0x20\n\tEVFILT_AIO                     = -0x3\n\tEVFILT_EMPTY                   = -0xd\n\tEVFILT_FS                      = -0x9\n\tEVFILT_LIO                     = -0xa\n\tEVFILT_PROC                    = -0x5\n\tEVFILT_PROCDESC                = -0x8\n\tEVFILT_READ                    = -0x1\n\tEVFILT_SENDFILE                = -0xc\n\tEVFILT_SIGNAL                  = -0x6\n\tEVFILT_SYSCOUNT                = 0xd\n\tEVFILT_TIMER                   = -0x7\n\tEVFILT_USER                    = -0xb\n\tEVFILT_VNODE                   = -0x4\n\tEVFILT_WRITE                   = -0x2\n\tEVNAMEMAP_NAME_SIZE            = 0x40\n\tEV_ADD                         = 0x1\n\tEV_CLEAR                       = 0x20\n\tEV_DELETE                      = 0x2\n\tEV_DISABLE                     = 0x8\n\tEV_DISPATCH                    = 0x80\n\tEV_DROP                        = 0x1000\n\tEV_ENABLE                      = 0x4\n\tEV_EOF                         = 0x8000\n\tEV_ERROR                       = 0x4000\n\tEV_FLAG1                       = 0x2000\n\tEV_FLAG2                       = 0x4000\n\tEV_FORCEONESHOT                = 0x100\n\tEV_ONESHOT                     = 0x10\n\tEV_RECEIPT                     = 0x40\n\tEV_SYSFLAGS                    = 0xf000\n\tEXTA                           = 0x4b00\n\tEXTATTR_MAXNAMELEN             = 0xff\n\tEXTATTR_NAMESPACE_EMPTY        = 0x0\n\tEXTATTR_NAMESPACE_SYSTEM       = 0x2\n\tEXTATTR_NAMESPACE_USER         = 0x1\n\tEXTB                           = 0x9600\n\tEXTPROC                        = 0x800\n\tFD_CLOEXEC                     = 0x1\n\tFD_SETSIZE                     = 0x400\n\tFLUSHO                         = 0x800000\n\tF_CANCEL                       = 0x5\n\tF_DUP2FD                       = 0xa\n\tF_DUP2FD_CLOEXEC               = 0x12\n\tF_DUPFD                        = 0x0\n\tF_DUPFD_CLOEXEC                = 0x11\n\tF_GETFD                        = 0x1\n\tF_GETFL                        = 0x3\n\tF_GETLK                        = 0xb\n\tF_GETOWN                       = 0x5\n\tF_OGETLK                       = 0x7\n\tF_OK                           = 0x0\n\tF_OSETLK                       = 0x8\n\tF_OSETLKW                      = 0x9\n\tF_RDAHEAD                      = 0x10\n\tF_RDLCK                        = 0x1\n\tF_READAHEAD                    = 0xf\n\tF_SETFD                        = 0x2\n\tF_SETFL                        = 0x4\n\tF_SETLK                        = 0xc\n\tF_SETLKW                       = 0xd\n\tF_SETLK_REMOTE                 = 0xe\n\tF_SETOWN                       = 0x6\n\tF_UNLCK                        = 0x2\n\tF_UNLCKSYS                     = 0x4\n\tF_WRLCK                        = 0x3\n\tHUPCL                          = 0x4000\n\tHW_MACHINE                     = 0x1\n\tICANON                         = 0x100\n\tICMP6_FILTER                   = 0x12\n\tICRNL                          = 0x100\n\tIEXTEN                         = 0x400\n\tIFAN_ARRIVAL                   = 0x0\n\tIFAN_DEPARTURE                 = 0x1\n\tIFCAP_WOL_MAGIC                = 0x2000\n\tIFF_ALLMULTI                   = 0x200\n\tIFF_ALTPHYS                    = 0x4000\n\tIFF_BROADCAST                  = 0x2\n\tIFF_CANTCHANGE                 = 0x218f52\n\tIFF_CANTCONFIG                 = 0x10000\n\tIFF_DEBUG                      = 0x4\n\tIFF_DRV_OACTIVE                = 0x400\n\tIFF_DRV_RUNNING                = 0x40\n\tIFF_DYING                      = 0x200000\n\tIFF_LINK0                      = 0x1000\n\tIFF_LINK1                      = 0x2000\n\tIFF_LINK2                      = 0x4000\n\tIFF_LOOPBACK                   = 0x8\n\tIFF_MONITOR                    = 0x40000\n\tIFF_MULTICAST                  = 0x8000\n\tIFF_NOARP                      = 0x80\n\tIFF_NOGROUP                    = 0x800000\n\tIFF_OACTIVE                    = 0x400\n\tIFF_POINTOPOINT                = 0x10\n\tIFF_PPROMISC                   = 0x20000\n\tIFF_PROMISC                    = 0x100\n\tIFF_RENAMING                   = 0x400000\n\tIFF_RUNNING                    = 0x40\n\tIFF_SIMPLEX                    = 0x800\n\tIFF_STATICARP                  = 0x80000\n\tIFF_UP                         = 0x1\n\tIFNAMSIZ                       = 0x10\n\tIFT_BRIDGE                     = 0xd1\n\tIFT_CARP                       = 0xf8\n\tIFT_IEEE1394                   = 0x90\n\tIFT_INFINIBAND                 = 0xc7\n\tIFT_L2VLAN                     = 0x87\n\tIFT_L3IPVLAN                   = 0x88\n\tIFT_PPP                        = 0x17\n\tIFT_PROPVIRTUAL                = 0x35\n\tIGNBRK                         = 0x1\n\tIGNCR                          = 0x80\n\tIGNPAR                         = 0x4\n\tIMAXBEL                        = 0x2000\n\tINLCR                          = 0x40\n\tINPCK                          = 0x10\n\tIN_CLASSA_HOST                 = 0xffffff\n\tIN_CLASSA_MAX                  = 0x80\n\tIN_CLASSA_NET                  = 0xff000000\n\tIN_CLASSA_NSHIFT               = 0x18\n\tIN_CLASSB_HOST                 = 0xffff\n\tIN_CLASSB_MAX                  = 0x10000\n\tIN_CLASSB_NET                  = 0xffff0000\n\tIN_CLASSB_NSHIFT               = 0x10\n\tIN_CLASSC_HOST                 = 0xff\n\tIN_CLASSC_NET                  = 0xffffff00\n\tIN_CLASSC_NSHIFT               = 0x8\n\tIN_CLASSD_HOST                 = 0xfffffff\n\tIN_CLASSD_NET                  = 0xf0000000\n\tIN_CLASSD_NSHIFT               = 0x1c\n\tIN_LOOPBACKNET                 = 0x7f\n\tIN_RFC3021_MASK                = 0xfffffffe\n\tIPPROTO_3PC                    = 0x22\n\tIPPROTO_ADFS                   = 0x44\n\tIPPROTO_AH                     = 0x33\n\tIPPROTO_AHIP                   = 0x3d\n\tIPPROTO_APES                   = 0x63\n\tIPPROTO_ARGUS                  = 0xd\n\tIPPROTO_AX25                   = 0x5d\n\tIPPROTO_BHA                    = 0x31\n\tIPPROTO_BLT                    = 0x1e\n\tIPPROTO_BRSATMON               = 0x4c\n\tIPPROTO_CARP                   = 0x70\n\tIPPROTO_CFTP                   = 0x3e\n\tIPPROTO_CHAOS                  = 0x10\n\tIPPROTO_CMTP                   = 0x26\n\tIPPROTO_CPHB                   = 0x49\n\tIPPROTO_CPNX                   = 0x48\n\tIPPROTO_DCCP                   = 0x21\n\tIPPROTO_DDP                    = 0x25\n\tIPPROTO_DGP                    = 0x56\n\tIPPROTO_DIVERT                 = 0x102\n\tIPPROTO_DONE                   = 0x101\n\tIPPROTO_DSTOPTS                = 0x3c\n\tIPPROTO_EGP                    = 0x8\n\tIPPROTO_EMCON                  = 0xe\n\tIPPROTO_ENCAP                  = 0x62\n\tIPPROTO_EON                    = 0x50\n\tIPPROTO_ESP                    = 0x32\n\tIPPROTO_ETHERIP                = 0x61\n\tIPPROTO_FRAGMENT               = 0x2c\n\tIPPROTO_GGP                    = 0x3\n\tIPPROTO_GMTP                   = 0x64\n\tIPPROTO_GRE                    = 0x2f\n\tIPPROTO_HELLO                  = 0x3f\n\tIPPROTO_HIP                    = 0x8b\n\tIPPROTO_HMP                    = 0x14\n\tIPPROTO_HOPOPTS                = 0x0\n\tIPPROTO_ICMP                   = 0x1\n\tIPPROTO_ICMPV6                 = 0x3a\n\tIPPROTO_IDP                    = 0x16\n\tIPPROTO_IDPR                   = 0x23\n\tIPPROTO_IDRP                   = 0x2d\n\tIPPROTO_IGMP                   = 0x2\n\tIPPROTO_IGP                    = 0x55\n\tIPPROTO_IGRP                   = 0x58\n\tIPPROTO_IL                     = 0x28\n\tIPPROTO_INLSP                  = 0x34\n\tIPPROTO_INP                    = 0x20\n\tIPPROTO_IP                     = 0x0\n\tIPPROTO_IPCOMP                 = 0x6c\n\tIPPROTO_IPCV                   = 0x47\n\tIPPROTO_IPEIP                  = 0x5e\n\tIPPROTO_IPIP                   = 0x4\n\tIPPROTO_IPPC                   = 0x43\n\tIPPROTO_IPV4                   = 0x4\n\tIPPROTO_IPV6                   = 0x29\n\tIPPROTO_IRTP                   = 0x1c\n\tIPPROTO_KRYPTOLAN              = 0x41\n\tIPPROTO_LARP                   = 0x5b\n\tIPPROTO_LEAF1                  = 0x19\n\tIPPROTO_LEAF2                  = 0x1a\n\tIPPROTO_MAX                    = 0x100\n\tIPPROTO_MEAS                   = 0x13\n\tIPPROTO_MH                     = 0x87\n\tIPPROTO_MHRP                   = 0x30\n\tIPPROTO_MICP                   = 0x5f\n\tIPPROTO_MOBILE                 = 0x37\n\tIPPROTO_MPLS                   = 0x89\n\tIPPROTO_MTP                    = 0x5c\n\tIPPROTO_MUX                    = 0x12\n\tIPPROTO_ND                     = 0x4d\n\tIPPROTO_NHRP                   = 0x36\n\tIPPROTO_NONE                   = 0x3b\n\tIPPROTO_NSP                    = 0x1f\n\tIPPROTO_NVPII                  = 0xb\n\tIPPROTO_OLD_DIVERT             = 0xfe\n\tIPPROTO_OSPFIGP                = 0x59\n\tIPPROTO_PFSYNC                 = 0xf0\n\tIPPROTO_PGM                    = 0x71\n\tIPPROTO_PIGP                   = 0x9\n\tIPPROTO_PIM                    = 0x67\n\tIPPROTO_PRM                    = 0x15\n\tIPPROTO_PUP                    = 0xc\n\tIPPROTO_PVP                    = 0x4b\n\tIPPROTO_RAW                    = 0xff\n\tIPPROTO_RCCMON                 = 0xa\n\tIPPROTO_RDP                    = 0x1b\n\tIPPROTO_RESERVED_253           = 0xfd\n\tIPPROTO_RESERVED_254           = 0xfe\n\tIPPROTO_ROUTING                = 0x2b\n\tIPPROTO_RSVP                   = 0x2e\n\tIPPROTO_RVD                    = 0x42\n\tIPPROTO_SATEXPAK               = 0x40\n\tIPPROTO_SATMON                 = 0x45\n\tIPPROTO_SCCSP                  = 0x60\n\tIPPROTO_SCTP                   = 0x84\n\tIPPROTO_SDRP                   = 0x2a\n\tIPPROTO_SEND                   = 0x103\n\tIPPROTO_SHIM6                  = 0x8c\n\tIPPROTO_SKIP                   = 0x39\n\tIPPROTO_SPACER                 = 0x7fff\n\tIPPROTO_SRPC                   = 0x5a\n\tIPPROTO_ST                     = 0x7\n\tIPPROTO_SVMTP                  = 0x52\n\tIPPROTO_SWIPE                  = 0x35\n\tIPPROTO_TCF                    = 0x57\n\tIPPROTO_TCP                    = 0x6\n\tIPPROTO_TLSP                   = 0x38\n\tIPPROTO_TP                     = 0x1d\n\tIPPROTO_TPXX                   = 0x27\n\tIPPROTO_TRUNK1                 = 0x17\n\tIPPROTO_TRUNK2                 = 0x18\n\tIPPROTO_TTP                    = 0x54\n\tIPPROTO_UDP                    = 0x11\n\tIPPROTO_UDPLITE                = 0x88\n\tIPPROTO_VINES                  = 0x53\n\tIPPROTO_VISA                   = 0x46\n\tIPPROTO_VMTP                   = 0x51\n\tIPPROTO_WBEXPAK                = 0x4f\n\tIPPROTO_WBMON                  = 0x4e\n\tIPPROTO_WSN                    = 0x4a\n\tIPPROTO_XNET                   = 0xf\n\tIPPROTO_XTP                    = 0x24\n\tIPV6_AUTOFLOWLABEL             = 0x3b\n\tIPV6_BINDANY                   = 0x40\n\tIPV6_BINDMULTI                 = 0x41\n\tIPV6_BINDV6ONLY                = 0x1b\n\tIPV6_CHECKSUM                  = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS    = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP    = 0x1\n\tIPV6_DEFHLIM                   = 0x40\n\tIPV6_DONTFRAG                  = 0x3e\n\tIPV6_DSTOPTS                   = 0x32\n\tIPV6_FLOWID                    = 0x43\n\tIPV6_FLOWINFO_MASK             = 0xffffff0f\n\tIPV6_FLOWLABEL_LEN             = 0x14\n\tIPV6_FLOWLABEL_MASK            = 0xffff0f00\n\tIPV6_FLOWTYPE                  = 0x44\n\tIPV6_FRAGTTL                   = 0x78\n\tIPV6_FW_ADD                    = 0x1e\n\tIPV6_FW_DEL                    = 0x1f\n\tIPV6_FW_FLUSH                  = 0x20\n\tIPV6_FW_GET                    = 0x22\n\tIPV6_FW_ZERO                   = 0x21\n\tIPV6_HLIMDEC                   = 0x1\n\tIPV6_HOPLIMIT                  = 0x2f\n\tIPV6_HOPOPTS                   = 0x31\n\tIPV6_IPSEC_POLICY              = 0x1c\n\tIPV6_JOIN_GROUP                = 0xc\n\tIPV6_LEAVE_GROUP               = 0xd\n\tIPV6_MAXHLIM                   = 0xff\n\tIPV6_MAXOPTHDR                 = 0x800\n\tIPV6_MAXPACKET                 = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER      = 0x200\n\tIPV6_MAX_MEMBERSHIPS           = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER       = 0x80\n\tIPV6_MMTU                      = 0x500\n\tIPV6_MSFILTER                  = 0x4a\n\tIPV6_MULTICAST_HOPS            = 0xa\n\tIPV6_MULTICAST_IF              = 0x9\n\tIPV6_MULTICAST_LOOP            = 0xb\n\tIPV6_NEXTHOP                   = 0x30\n\tIPV6_ORIGDSTADDR               = 0x48\n\tIPV6_PATHMTU                   = 0x2c\n\tIPV6_PKTINFO                   = 0x2e\n\tIPV6_PORTRANGE                 = 0xe\n\tIPV6_PORTRANGE_DEFAULT         = 0x0\n\tIPV6_PORTRANGE_HIGH            = 0x1\n\tIPV6_PORTRANGE_LOW             = 0x2\n\tIPV6_PREFER_TEMPADDR           = 0x3f\n\tIPV6_RECVDSTOPTS               = 0x28\n\tIPV6_RECVFLOWID                = 0x46\n\tIPV6_RECVHOPLIMIT              = 0x25\n\tIPV6_RECVHOPOPTS               = 0x27\n\tIPV6_RECVORIGDSTADDR           = 0x48\n\tIPV6_RECVPATHMTU               = 0x2b\n\tIPV6_RECVPKTINFO               = 0x24\n\tIPV6_RECVRSSBUCKETID           = 0x47\n\tIPV6_RECVRTHDR                 = 0x26\n\tIPV6_RECVTCLASS                = 0x39\n\tIPV6_RSSBUCKETID               = 0x45\n\tIPV6_RSS_LISTEN_BUCKET         = 0x42\n\tIPV6_RTHDR                     = 0x33\n\tIPV6_RTHDRDSTOPTS              = 0x23\n\tIPV6_RTHDR_LOOSE               = 0x0\n\tIPV6_RTHDR_STRICT              = 0x1\n\tIPV6_RTHDR_TYPE_0              = 0x0\n\tIPV6_SOCKOPT_RESERVED1         = 0x3\n\tIPV6_TCLASS                    = 0x3d\n\tIPV6_UNICAST_HOPS              = 0x4\n\tIPV6_USE_MIN_MTU               = 0x2a\n\tIPV6_V6ONLY                    = 0x1b\n\tIPV6_VERSION                   = 0x60\n\tIPV6_VERSION_MASK              = 0xf0\n\tIPV6_VLAN_PCP                  = 0x4b\n\tIP_ADD_MEMBERSHIP              = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP       = 0x46\n\tIP_BINDANY                     = 0x18\n\tIP_BINDMULTI                   = 0x19\n\tIP_BLOCK_SOURCE                = 0x48\n\tIP_DEFAULT_MULTICAST_LOOP      = 0x1\n\tIP_DEFAULT_MULTICAST_TTL       = 0x1\n\tIP_DF                          = 0x4000\n\tIP_DONTFRAG                    = 0x43\n\tIP_DROP_MEMBERSHIP             = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP      = 0x47\n\tIP_DUMMYNET3                   = 0x31\n\tIP_DUMMYNET_CONFIGURE          = 0x3c\n\tIP_DUMMYNET_DEL                = 0x3d\n\tIP_DUMMYNET_FLUSH              = 0x3e\n\tIP_DUMMYNET_GET                = 0x40\n\tIP_FLOWID                      = 0x5a\n\tIP_FLOWTYPE                    = 0x5b\n\tIP_FW3                         = 0x30\n\tIP_FW_ADD                      = 0x32\n\tIP_FW_DEL                      = 0x33\n\tIP_FW_FLUSH                    = 0x34\n\tIP_FW_GET                      = 0x36\n\tIP_FW_NAT_CFG                  = 0x38\n\tIP_FW_NAT_DEL                  = 0x39\n\tIP_FW_NAT_GET_CONFIG           = 0x3a\n\tIP_FW_NAT_GET_LOG              = 0x3b\n\tIP_FW_RESETLOG                 = 0x37\n\tIP_FW_TABLE_ADD                = 0x28\n\tIP_FW_TABLE_DEL                = 0x29\n\tIP_FW_TABLE_FLUSH              = 0x2a\n\tIP_FW_TABLE_GETSIZE            = 0x2b\n\tIP_FW_TABLE_LIST               = 0x2c\n\tIP_FW_ZERO                     = 0x35\n\tIP_HDRINCL                     = 0x2\n\tIP_IPSEC_POLICY                = 0x15\n\tIP_MAXPACKET                   = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER        = 0x200\n\tIP_MAX_MEMBERSHIPS             = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER        = 0x80\n\tIP_MAX_SOCK_SRC_FILTER         = 0x80\n\tIP_MF                          = 0x2000\n\tIP_MINTTL                      = 0x42\n\tIP_MSFILTER                    = 0x4a\n\tIP_MSS                         = 0x240\n\tIP_MULTICAST_IF                = 0x9\n\tIP_MULTICAST_LOOP              = 0xb\n\tIP_MULTICAST_TTL               = 0xa\n\tIP_MULTICAST_VIF               = 0xe\n\tIP_OFFMASK                     = 0x1fff\n\tIP_ONESBCAST                   = 0x17\n\tIP_OPTIONS                     = 0x1\n\tIP_ORIGDSTADDR                 = 0x1b\n\tIP_PORTRANGE                   = 0x13\n\tIP_PORTRANGE_DEFAULT           = 0x0\n\tIP_PORTRANGE_HIGH              = 0x1\n\tIP_PORTRANGE_LOW               = 0x2\n\tIP_RECVDSTADDR                 = 0x7\n\tIP_RECVFLOWID                  = 0x5d\n\tIP_RECVIF                      = 0x14\n\tIP_RECVOPTS                    = 0x5\n\tIP_RECVORIGDSTADDR             = 0x1b\n\tIP_RECVRETOPTS                 = 0x6\n\tIP_RECVRSSBUCKETID             = 0x5e\n\tIP_RECVTOS                     = 0x44\n\tIP_RECVTTL                     = 0x41\n\tIP_RETOPTS                     = 0x8\n\tIP_RF                          = 0x8000\n\tIP_RSSBUCKETID                 = 0x5c\n\tIP_RSS_LISTEN_BUCKET           = 0x1a\n\tIP_RSVP_OFF                    = 0x10\n\tIP_RSVP_ON                     = 0xf\n\tIP_RSVP_VIF_OFF                = 0x12\n\tIP_RSVP_VIF_ON                 = 0x11\n\tIP_SENDSRCADDR                 = 0x7\n\tIP_TOS                         = 0x3\n\tIP_TTL                         = 0x4\n\tIP_UNBLOCK_SOURCE              = 0x49\n\tIP_VLAN_PCP                    = 0x4b\n\tISIG                           = 0x80\n\tISTRIP                         = 0x20\n\tITIMER_PROF                    = 0x2\n\tITIMER_REAL                    = 0x0\n\tITIMER_VIRTUAL                 = 0x1\n\tIXANY                          = 0x800\n\tIXOFF                          = 0x400\n\tIXON                           = 0x200\n\tKERN_HOSTNAME                  = 0xa\n\tKERN_OSRELEASE                 = 0x2\n\tKERN_OSTYPE                    = 0x1\n\tKERN_VERSION                   = 0x4\n\tLOCAL_CONNWAIT                 = 0x4\n\tLOCAL_CREDS                    = 0x2\n\tLOCAL_PEERCRED                 = 0x1\n\tLOCAL_VENDOR                   = 0x80000000\n\tLOCK_EX                        = 0x2\n\tLOCK_NB                        = 0x4\n\tLOCK_SH                        = 0x1\n\tLOCK_UN                        = 0x8\n\tMADV_AUTOSYNC                  = 0x7\n\tMADV_CORE                      = 0x9\n\tMADV_DONTNEED                  = 0x4\n\tMADV_FREE                      = 0x5\n\tMADV_NOCORE                    = 0x8\n\tMADV_NORMAL                    = 0x0\n\tMADV_NOSYNC                    = 0x6\n\tMADV_PROTECT                   = 0xa\n\tMADV_RANDOM                    = 0x1\n\tMADV_SEQUENTIAL                = 0x2\n\tMADV_WILLNEED                  = 0x3\n\tMAP_32BIT                      = 0x80000\n\tMAP_ALIGNED_SUPER              = 0x1000000\n\tMAP_ALIGNMENT_MASK             = -0x1000000\n\tMAP_ALIGNMENT_SHIFT            = 0x18\n\tMAP_ANON                       = 0x1000\n\tMAP_ANONYMOUS                  = 0x1000\n\tMAP_COPY                       = 0x2\n\tMAP_EXCL                       = 0x4000\n\tMAP_FILE                       = 0x0\n\tMAP_FIXED                      = 0x10\n\tMAP_GUARD                      = 0x2000\n\tMAP_HASSEMAPHORE               = 0x200\n\tMAP_NOCORE                     = 0x20000\n\tMAP_NOSYNC                     = 0x800\n\tMAP_PREFAULT_READ              = 0x40000\n\tMAP_PRIVATE                    = 0x2\n\tMAP_RESERVED0020               = 0x20\n\tMAP_RESERVED0040               = 0x40\n\tMAP_RESERVED0080               = 0x80\n\tMAP_RESERVED0100               = 0x100\n\tMAP_SHARED                     = 0x1\n\tMAP_STACK                      = 0x400\n\tMCAST_BLOCK_SOURCE             = 0x54\n\tMCAST_EXCLUDE                  = 0x2\n\tMCAST_INCLUDE                  = 0x1\n\tMCAST_JOIN_GROUP               = 0x50\n\tMCAST_JOIN_SOURCE_GROUP        = 0x52\n\tMCAST_LEAVE_GROUP              = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP       = 0x53\n\tMCAST_UNBLOCK_SOURCE           = 0x55\n\tMCAST_UNDEFINED                = 0x0\n\tMCL_CURRENT                    = 0x1\n\tMCL_FUTURE                     = 0x2\n\tMNT_ACLS                       = 0x8000000\n\tMNT_ASYNC                      = 0x40\n\tMNT_AUTOMOUNTED                = 0x200000000\n\tMNT_BYFSID                     = 0x8000000\n\tMNT_CMDFLAGS                   = 0xd0f0000\n\tMNT_DEFEXPORTED                = 0x200\n\tMNT_DELEXPORT                  = 0x20000\n\tMNT_EXKERB                     = 0x800\n\tMNT_EXPORTANON                 = 0x400\n\tMNT_EXPORTED                   = 0x100\n\tMNT_EXPUBLIC                   = 0x20000000\n\tMNT_EXRDONLY                   = 0x80\n\tMNT_FORCE                      = 0x80000\n\tMNT_GJOURNAL                   = 0x2000000\n\tMNT_IGNORE                     = 0x800000\n\tMNT_LAZY                       = 0x3\n\tMNT_LOCAL                      = 0x1000\n\tMNT_MULTILABEL                 = 0x4000000\n\tMNT_NFS4ACLS                   = 0x10\n\tMNT_NOATIME                    = 0x10000000\n\tMNT_NOCLUSTERR                 = 0x40000000\n\tMNT_NOCLUSTERW                 = 0x80000000\n\tMNT_NOEXEC                     = 0x4\n\tMNT_NONBUSY                    = 0x4000000\n\tMNT_NOSUID                     = 0x8\n\tMNT_NOSYMFOLLOW                = 0x400000\n\tMNT_NOWAIT                     = 0x2\n\tMNT_QUOTA                      = 0x2000\n\tMNT_RDONLY                     = 0x1\n\tMNT_RELOAD                     = 0x40000\n\tMNT_ROOTFS                     = 0x4000\n\tMNT_SNAPSHOT                   = 0x1000000\n\tMNT_SOFTDEP                    = 0x200000\n\tMNT_SUIDDIR                    = 0x100000\n\tMNT_SUJ                        = 0x100000000\n\tMNT_SUSPEND                    = 0x4\n\tMNT_SYNCHRONOUS                = 0x2\n\tMNT_UNION                      = 0x20\n\tMNT_UNTRUSTED                  = 0x800000000\n\tMNT_UPDATE                     = 0x10000\n\tMNT_UPDATEMASK                 = 0xad8d0807e\n\tMNT_USER                       = 0x8000\n\tMNT_VERIFIED                   = 0x400000000\n\tMNT_VISFLAGMASK                = 0xffef0ffff\n\tMNT_WAIT                       = 0x1\n\tMSG_CMSG_CLOEXEC               = 0x40000\n\tMSG_COMPAT                     = 0x8000\n\tMSG_CTRUNC                     = 0x20\n\tMSG_DONTROUTE                  = 0x4\n\tMSG_DONTWAIT                   = 0x80\n\tMSG_EOF                        = 0x100\n\tMSG_EOR                        = 0x8\n\tMSG_NBIO                       = 0x4000\n\tMSG_NOSIGNAL                   = 0x20000\n\tMSG_NOTIFICATION               = 0x2000\n\tMSG_OOB                        = 0x1\n\tMSG_PEEK                       = 0x2\n\tMSG_TRUNC                      = 0x10\n\tMSG_WAITALL                    = 0x40\n\tMSG_WAITFORONE                 = 0x80000\n\tMS_ASYNC                       = 0x1\n\tMS_INVALIDATE                  = 0x2\n\tMS_SYNC                        = 0x0\n\tNAME_MAX                       = 0xff\n\tNET_RT_DUMP                    = 0x1\n\tNET_RT_FLAGS                   = 0x2\n\tNET_RT_IFLIST                  = 0x3\n\tNET_RT_IFLISTL                 = 0x5\n\tNET_RT_IFMALIST                = 0x4\n\tNFDBITS                        = 0x40\n\tNOFLSH                         = 0x80000000\n\tNOKERNINFO                     = 0x2000000\n\tNOTE_ABSTIME                   = 0x10\n\tNOTE_ATTRIB                    = 0x8\n\tNOTE_CHILD                     = 0x4\n\tNOTE_CLOSE                     = 0x100\n\tNOTE_CLOSE_WRITE               = 0x200\n\tNOTE_DELETE                    = 0x1\n\tNOTE_EXEC                      = 0x20000000\n\tNOTE_EXIT                      = 0x80000000\n\tNOTE_EXTEND                    = 0x4\n\tNOTE_FFAND                     = 0x40000000\n\tNOTE_FFCOPY                    = 0xc0000000\n\tNOTE_FFCTRLMASK                = 0xc0000000\n\tNOTE_FFLAGSMASK                = 0xffffff\n\tNOTE_FFNOP                     = 0x0\n\tNOTE_FFOR                      = 0x80000000\n\tNOTE_FILE_POLL                 = 0x2\n\tNOTE_FORK                      = 0x40000000\n\tNOTE_LINK                      = 0x10\n\tNOTE_LOWAT                     = 0x1\n\tNOTE_MSECONDS                  = 0x2\n\tNOTE_NSECONDS                  = 0x8\n\tNOTE_OPEN                      = 0x80\n\tNOTE_PCTRLMASK                 = 0xf0000000\n\tNOTE_PDATAMASK                 = 0xfffff\n\tNOTE_READ                      = 0x400\n\tNOTE_RENAME                    = 0x20\n\tNOTE_REVOKE                    = 0x40\n\tNOTE_SECONDS                   = 0x1\n\tNOTE_TRACK                     = 0x1\n\tNOTE_TRACKERR                  = 0x2\n\tNOTE_TRIGGER                   = 0x1000000\n\tNOTE_USECONDS                  = 0x4\n\tNOTE_WRITE                     = 0x2\n\tOCRNL                          = 0x10\n\tONLCR                          = 0x2\n\tONLRET                         = 0x40\n\tONOCR                          = 0x20\n\tONOEOT                         = 0x8\n\tOPOST                          = 0x1\n\tOXTABS                         = 0x4\n\tO_ACCMODE                      = 0x3\n\tO_APPEND                       = 0x8\n\tO_ASYNC                        = 0x40\n\tO_CLOEXEC                      = 0x100000\n\tO_CREAT                        = 0x200\n\tO_DIRECT                       = 0x10000\n\tO_DIRECTORY                    = 0x20000\n\tO_EXCL                         = 0x800\n\tO_EXEC                         = 0x40000\n\tO_EXLOCK                       = 0x20\n\tO_FSYNC                        = 0x80\n\tO_NDELAY                       = 0x4\n\tO_NOCTTY                       = 0x8000\n\tO_NOFOLLOW                     = 0x100\n\tO_NONBLOCK                     = 0x4\n\tO_RDONLY                       = 0x0\n\tO_RDWR                         = 0x2\n\tO_RESOLVE_BENEATH              = 0x800000\n\tO_SEARCH                       = 0x40000\n\tO_SHLOCK                       = 0x10\n\tO_SYNC                         = 0x80\n\tO_TRUNC                        = 0x400\n\tO_TTY_INIT                     = 0x80000\n\tO_VERIFY                       = 0x200000\n\tO_WRONLY                       = 0x1\n\tPARENB                         = 0x1000\n\tPARMRK                         = 0x8\n\tPARODD                         = 0x2000\n\tPENDIN                         = 0x20000000\n\tPIOD_READ_D                    = 0x1\n\tPIOD_READ_I                    = 0x3\n\tPIOD_WRITE_D                   = 0x2\n\tPIOD_WRITE_I                   = 0x4\n\tPRIO_PGRP                      = 0x1\n\tPRIO_PROCESS                   = 0x0\n\tPRIO_USER                      = 0x2\n\tPROT_EXEC                      = 0x4\n\tPROT_NONE                      = 0x0\n\tPROT_READ                      = 0x1\n\tPROT_WRITE                     = 0x2\n\tPTRACE_DEFAULT                 = 0x1\n\tPTRACE_EXEC                    = 0x1\n\tPTRACE_FORK                    = 0x8\n\tPTRACE_LWP                     = 0x10\n\tPTRACE_SCE                     = 0x2\n\tPTRACE_SCX                     = 0x4\n\tPTRACE_SYSCALL                 = 0x6\n\tPTRACE_VFORK                   = 0x20\n\tPT_ATTACH                      = 0xa\n\tPT_CLEARSTEP                   = 0x10\n\tPT_CONTINUE                    = 0x7\n\tPT_DETACH                      = 0xb\n\tPT_FIRSTMACH                   = 0x40\n\tPT_FOLLOW_FORK                 = 0x17\n\tPT_GETDBREGS                   = 0x25\n\tPT_GETFPREGS                   = 0x23\n\tPT_GETFSBASE                   = 0x47\n\tPT_GETGSBASE                   = 0x49\n\tPT_GETLWPLIST                  = 0xf\n\tPT_GETNUMLWPS                  = 0xe\n\tPT_GETREGS                     = 0x21\n\tPT_GETXSTATE                   = 0x45\n\tPT_GETXSTATE_INFO              = 0x44\n\tPT_GET_EVENT_MASK              = 0x19\n\tPT_GET_SC_ARGS                 = 0x1b\n\tPT_GET_SC_RET                  = 0x1c\n\tPT_IO                          = 0xc\n\tPT_KILL                        = 0x8\n\tPT_LWPINFO                     = 0xd\n\tPT_LWP_EVENTS                  = 0x18\n\tPT_READ_D                      = 0x2\n\tPT_READ_I                      = 0x1\n\tPT_RESUME                      = 0x13\n\tPT_SETDBREGS                   = 0x26\n\tPT_SETFPREGS                   = 0x24\n\tPT_SETFSBASE                   = 0x48\n\tPT_SETGSBASE                   = 0x4a\n\tPT_SETREGS                     = 0x22\n\tPT_SETSTEP                     = 0x11\n\tPT_SETXSTATE                   = 0x46\n\tPT_SET_EVENT_MASK              = 0x1a\n\tPT_STEP                        = 0x9\n\tPT_SUSPEND                     = 0x12\n\tPT_SYSCALL                     = 0x16\n\tPT_TO_SCE                      = 0x14\n\tPT_TO_SCX                      = 0x15\n\tPT_TRACE_ME                    = 0x0\n\tPT_VM_ENTRY                    = 0x29\n\tPT_VM_TIMESTAMP                = 0x28\n\tPT_WRITE_D                     = 0x5\n\tPT_WRITE_I                     = 0x4\n\tP_ZONEID                       = 0xc\n\tRLIMIT_AS                      = 0xa\n\tRLIMIT_CORE                    = 0x4\n\tRLIMIT_CPU                     = 0x0\n\tRLIMIT_DATA                    = 0x2\n\tRLIMIT_FSIZE                   = 0x1\n\tRLIMIT_MEMLOCK                 = 0x6\n\tRLIMIT_NOFILE                  = 0x8\n\tRLIMIT_NPROC                   = 0x7\n\tRLIMIT_RSS                     = 0x5\n\tRLIMIT_STACK                   = 0x3\n\tRLIM_INFINITY                  = 0x7fffffffffffffff\n\tRTAX_AUTHOR                    = 0x6\n\tRTAX_BRD                       = 0x7\n\tRTAX_DST                       = 0x0\n\tRTAX_GATEWAY                   = 0x1\n\tRTAX_GENMASK                   = 0x3\n\tRTAX_IFA                       = 0x5\n\tRTAX_IFP                       = 0x4\n\tRTAX_MAX                       = 0x8\n\tRTAX_NETMASK                   = 0x2\n\tRTA_AUTHOR                     = 0x40\n\tRTA_BRD                        = 0x80\n\tRTA_DST                        = 0x1\n\tRTA_GATEWAY                    = 0x2\n\tRTA_GENMASK                    = 0x8\n\tRTA_IFA                        = 0x20\n\tRTA_IFP                        = 0x10\n\tRTA_NETMASK                    = 0x4\n\tRTF_BLACKHOLE                  = 0x1000\n\tRTF_BROADCAST                  = 0x400000\n\tRTF_DONE                       = 0x40\n\tRTF_DYNAMIC                    = 0x10\n\tRTF_FIXEDMTU                   = 0x80000\n\tRTF_FMASK                      = 0x1004d808\n\tRTF_GATEWAY                    = 0x2\n\tRTF_GWFLAG_COMPAT              = 0x80000000\n\tRTF_HOST                       = 0x4\n\tRTF_LLDATA                     = 0x400\n\tRTF_LLINFO                     = 0x400\n\tRTF_LOCAL                      = 0x200000\n\tRTF_MODIFIED                   = 0x20\n\tRTF_MULTICAST                  = 0x800000\n\tRTF_PINNED                     = 0x100000\n\tRTF_PROTO1                     = 0x8000\n\tRTF_PROTO2                     = 0x4000\n\tRTF_PROTO3                     = 0x40000\n\tRTF_REJECT                     = 0x8\n\tRTF_RNH_LOCKED                 = 0x40000000\n\tRTF_STATIC                     = 0x800\n\tRTF_STICKY                     = 0x10000000\n\tRTF_UP                         = 0x1\n\tRTF_XRESOLVE                   = 0x200\n\tRTM_ADD                        = 0x1\n\tRTM_CHANGE                     = 0x3\n\tRTM_DELADDR                    = 0xd\n\tRTM_DELETE                     = 0x2\n\tRTM_DELMADDR                   = 0x10\n\tRTM_GET                        = 0x4\n\tRTM_IEEE80211                  = 0x12\n\tRTM_IFANNOUNCE                 = 0x11\n\tRTM_IFINFO                     = 0xe\n\tRTM_LOCK                       = 0x8\n\tRTM_LOSING                     = 0x5\n\tRTM_MISS                       = 0x7\n\tRTM_NEWADDR                    = 0xc\n\tRTM_NEWMADDR                   = 0xf\n\tRTM_REDIRECT                   = 0x6\n\tRTM_RESOLVE                    = 0xb\n\tRTM_RTTUNIT                    = 0xf4240\n\tRTM_VERSION                    = 0x5\n\tRTV_EXPIRE                     = 0x4\n\tRTV_HOPCOUNT                   = 0x2\n\tRTV_MTU                        = 0x1\n\tRTV_RPIPE                      = 0x8\n\tRTV_RTT                        = 0x40\n\tRTV_RTTVAR                     = 0x80\n\tRTV_SPIPE                      = 0x10\n\tRTV_SSTHRESH                   = 0x20\n\tRTV_WEIGHT                     = 0x100\n\tRT_ALL_FIBS                    = -0x1\n\tRT_BLACKHOLE                   = 0x40\n\tRT_DEFAULT_FIB                 = 0x0\n\tRT_HAS_GW                      = 0x80\n\tRT_HAS_HEADER                  = 0x10\n\tRT_HAS_HEADER_BIT              = 0x4\n\tRT_L2_ME                       = 0x4\n\tRT_L2_ME_BIT                   = 0x2\n\tRT_LLE_CACHE                   = 0x100\n\tRT_MAY_LOOP                    = 0x8\n\tRT_MAY_LOOP_BIT                = 0x3\n\tRT_REJECT                      = 0x20\n\tRUSAGE_CHILDREN                = -0x1\n\tRUSAGE_SELF                    = 0x0\n\tRUSAGE_THREAD                  = 0x1\n\tSCM_BINTIME                    = 0x4\n\tSCM_CREDS                      = 0x3\n\tSCM_MONOTONIC                  = 0x6\n\tSCM_REALTIME                   = 0x5\n\tSCM_RIGHTS                     = 0x1\n\tSCM_TIMESTAMP                  = 0x2\n\tSCM_TIME_INFO                  = 0x7\n\tSEEK_CUR                       = 0x1\n\tSEEK_DATA                      = 0x3\n\tSEEK_END                       = 0x2\n\tSEEK_HOLE                      = 0x4\n\tSEEK_SET                       = 0x0\n\tSHUT_RD                        = 0x0\n\tSHUT_RDWR                      = 0x2\n\tSHUT_WR                        = 0x1\n\tSIOCADDMULTI                   = 0x80206931\n\tSIOCAIFADDR                    = 0x8040691a\n\tSIOCAIFGROUP                   = 0x80286987\n\tSIOCATMARK                     = 0x40047307\n\tSIOCDELMULTI                   = 0x80206932\n\tSIOCDIFADDR                    = 0x80206919\n\tSIOCDIFGROUP                   = 0x80286989\n\tSIOCDIFPHYADDR                 = 0x80206949\n\tSIOCGDRVSPEC                   = 0xc028697b\n\tSIOCGETSGCNT                   = 0xc0207210\n\tSIOCGETVIFCNT                  = 0xc028720f\n\tSIOCGHIWAT                     = 0x40047301\n\tSIOCGHWADDR                    = 0xc020693e\n\tSIOCGI2C                       = 0xc020693d\n\tSIOCGIFADDR                    = 0xc0206921\n\tSIOCGIFALIAS                   = 0xc044692d\n\tSIOCGIFBRDADDR                 = 0xc0206923\n\tSIOCGIFCAP                     = 0xc020691f\n\tSIOCGIFCONF                    = 0xc0106924\n\tSIOCGIFDESCR                   = 0xc020692a\n\tSIOCGIFDOWNREASON              = 0xc058699a\n\tSIOCGIFDSTADDR                 = 0xc0206922\n\tSIOCGIFFIB                     = 0xc020695c\n\tSIOCGIFFLAGS                   = 0xc0206911\n\tSIOCGIFGENERIC                 = 0xc020693a\n\tSIOCGIFGMEMB                   = 0xc028698a\n\tSIOCGIFGROUP                   = 0xc0286988\n\tSIOCGIFINDEX                   = 0xc0206920\n\tSIOCGIFMAC                     = 0xc0206926\n\tSIOCGIFMEDIA                   = 0xc0306938\n\tSIOCGIFMETRIC                  = 0xc0206917\n\tSIOCGIFMTU                     = 0xc0206933\n\tSIOCGIFNETMASK                 = 0xc0206925\n\tSIOCGIFPDSTADDR                = 0xc0206948\n\tSIOCGIFPHYS                    = 0xc0206935\n\tSIOCGIFPSRCADDR                = 0xc0206947\n\tSIOCGIFRSSHASH                 = 0xc0186997\n\tSIOCGIFRSSKEY                  = 0xc0946996\n\tSIOCGIFSTATUS                  = 0xc331693b\n\tSIOCGIFXMEDIA                  = 0xc030698b\n\tSIOCGLANPCP                    = 0xc0206998\n\tSIOCGLOWAT                     = 0x40047303\n\tSIOCGPGRP                      = 0x40047309\n\tSIOCGPRIVATE_0                 = 0xc0206950\n\tSIOCGPRIVATE_1                 = 0xc0206951\n\tSIOCGTUNFIB                    = 0xc020695e\n\tSIOCIFCREATE                   = 0xc020697a\n\tSIOCIFCREATE2                  = 0xc020697c\n\tSIOCIFDESTROY                  = 0x80206979\n\tSIOCIFGCLONERS                 = 0xc0106978\n\tSIOCSDRVSPEC                   = 0x8028697b\n\tSIOCSHIWAT                     = 0x80047300\n\tSIOCSIFADDR                    = 0x8020690c\n\tSIOCSIFBRDADDR                 = 0x80206913\n\tSIOCSIFCAP                     = 0x8020691e\n\tSIOCSIFDESCR                   = 0x80206929\n\tSIOCSIFDSTADDR                 = 0x8020690e\n\tSIOCSIFFIB                     = 0x8020695d\n\tSIOCSIFFLAGS                   = 0x80206910\n\tSIOCSIFGENERIC                 = 0x80206939\n\tSIOCSIFLLADDR                  = 0x8020693c\n\tSIOCSIFMAC                     = 0x80206927\n\tSIOCSIFMEDIA                   = 0xc0206937\n\tSIOCSIFMETRIC                  = 0x80206918\n\tSIOCSIFMTU                     = 0x80206934\n\tSIOCSIFNAME                    = 0x80206928\n\tSIOCSIFNETMASK                 = 0x80206916\n\tSIOCSIFPHYADDR                 = 0x80406946\n\tSIOCSIFPHYS                    = 0x80206936\n\tSIOCSIFRVNET                   = 0xc020695b\n\tSIOCSIFVNET                    = 0xc020695a\n\tSIOCSLANPCP                    = 0x80206999\n\tSIOCSLOWAT                     = 0x80047302\n\tSIOCSPGRP                      = 0x80047308\n\tSIOCSTUNFIB                    = 0x8020695f\n\tSOCK_CLOEXEC                   = 0x10000000\n\tSOCK_DGRAM                     = 0x2\n\tSOCK_MAXADDRLEN                = 0xff\n\tSOCK_NONBLOCK                  = 0x20000000\n\tSOCK_RAW                       = 0x3\n\tSOCK_RDM                       = 0x4\n\tSOCK_SEQPACKET                 = 0x5\n\tSOCK_STREAM                    = 0x1\n\tSOL_LOCAL                      = 0x0\n\tSOL_SOCKET                     = 0xffff\n\tSOMAXCONN                      = 0x80\n\tSO_ACCEPTCONN                  = 0x2\n\tSO_ACCEPTFILTER                = 0x1000\n\tSO_BINTIME                     = 0x2000\n\tSO_BROADCAST                   = 0x20\n\tSO_DEBUG                       = 0x1\n\tSO_DOMAIN                      = 0x1019\n\tSO_DONTROUTE                   = 0x10\n\tSO_ERROR                       = 0x1007\n\tSO_KEEPALIVE                   = 0x8\n\tSO_LABEL                       = 0x1009\n\tSO_LINGER                      = 0x80\n\tSO_LISTENINCQLEN               = 0x1013\n\tSO_LISTENQLEN                  = 0x1012\n\tSO_LISTENQLIMIT                = 0x1011\n\tSO_MAX_PACING_RATE             = 0x1018\n\tSO_NOSIGPIPE                   = 0x800\n\tSO_NO_DDP                      = 0x8000\n\tSO_NO_OFFLOAD                  = 0x4000\n\tSO_OOBINLINE                   = 0x100\n\tSO_PEERLABEL                   = 0x1010\n\tSO_PROTOCOL                    = 0x1016\n\tSO_PROTOTYPE                   = 0x1016\n\tSO_RCVBUF                      = 0x1002\n\tSO_RCVLOWAT                    = 0x1004\n\tSO_RCVTIMEO                    = 0x1006\n\tSO_RERROR                      = 0x20000\n\tSO_REUSEADDR                   = 0x4\n\tSO_REUSEPORT                   = 0x200\n\tSO_REUSEPORT_LB                = 0x10000\n\tSO_SETFIB                      = 0x1014\n\tSO_SNDBUF                      = 0x1001\n\tSO_SNDLOWAT                    = 0x1003\n\tSO_SNDTIMEO                    = 0x1005\n\tSO_TIMESTAMP                   = 0x400\n\tSO_TS_BINTIME                  = 0x1\n\tSO_TS_CLOCK                    = 0x1017\n\tSO_TS_CLOCK_MAX                = 0x3\n\tSO_TS_DEFAULT                  = 0x0\n\tSO_TS_MONOTONIC                = 0x3\n\tSO_TS_REALTIME                 = 0x2\n\tSO_TS_REALTIME_MICRO           = 0x0\n\tSO_TYPE                        = 0x1008\n\tSO_USELOOPBACK                 = 0x40\n\tSO_USER_COOKIE                 = 0x1015\n\tSO_VENDOR                      = 0x80000000\n\tS_BLKSIZE                      = 0x200\n\tS_IEXEC                        = 0x40\n\tS_IFBLK                        = 0x6000\n\tS_IFCHR                        = 0x2000\n\tS_IFDIR                        = 0x4000\n\tS_IFIFO                        = 0x1000\n\tS_IFLNK                        = 0xa000\n\tS_IFMT                         = 0xf000\n\tS_IFREG                        = 0x8000\n\tS_IFSOCK                       = 0xc000\n\tS_IFWHT                        = 0xe000\n\tS_IREAD                        = 0x100\n\tS_IRGRP                        = 0x20\n\tS_IROTH                        = 0x4\n\tS_IRUSR                        = 0x100\n\tS_IRWXG                        = 0x38\n\tS_IRWXO                        = 0x7\n\tS_IRWXU                        = 0x1c0\n\tS_ISGID                        = 0x400\n\tS_ISTXT                        = 0x200\n\tS_ISUID                        = 0x800\n\tS_ISVTX                        = 0x200\n\tS_IWGRP                        = 0x10\n\tS_IWOTH                        = 0x2\n\tS_IWRITE                       = 0x80\n\tS_IWUSR                        = 0x80\n\tS_IXGRP                        = 0x8\n\tS_IXOTH                        = 0x1\n\tS_IXUSR                        = 0x40\n\tTAB0                           = 0x0\n\tTAB3                           = 0x4\n\tTABDLY                         = 0x4\n\tTCIFLUSH                       = 0x1\n\tTCIOFF                         = 0x3\n\tTCIOFLUSH                      = 0x3\n\tTCION                          = 0x4\n\tTCOFLUSH                       = 0x2\n\tTCOOFF                         = 0x1\n\tTCOON                          = 0x2\n\tTCPOPT_EOL                     = 0x0\n\tTCPOPT_FAST_OPEN               = 0x22\n\tTCPOPT_MAXSEG                  = 0x2\n\tTCPOPT_NOP                     = 0x1\n\tTCPOPT_PAD                     = 0x0\n\tTCPOPT_SACK                    = 0x5\n\tTCPOPT_SACK_PERMITTED          = 0x4\n\tTCPOPT_SIGNATURE               = 0x13\n\tTCPOPT_TIMESTAMP               = 0x8\n\tTCPOPT_WINDOW                  = 0x3\n\tTCP_BBR_ACK_COMP_ALG           = 0x448\n\tTCP_BBR_ALGORITHM              = 0x43b\n\tTCP_BBR_DRAIN_INC_EXTRA        = 0x43c\n\tTCP_BBR_DRAIN_PG               = 0x42e\n\tTCP_BBR_EXTRA_GAIN             = 0x449\n\tTCP_BBR_EXTRA_STATE            = 0x453\n\tTCP_BBR_FLOOR_MIN_TSO          = 0x454\n\tTCP_BBR_HDWR_PACE              = 0x451\n\tTCP_BBR_HOLD_TARGET            = 0x436\n\tTCP_BBR_IWINTSO                = 0x42b\n\tTCP_BBR_LOWGAIN_FD             = 0x436\n\tTCP_BBR_LOWGAIN_HALF           = 0x435\n\tTCP_BBR_LOWGAIN_THRESH         = 0x434\n\tTCP_BBR_MAX_RTO                = 0x439\n\tTCP_BBR_MIN_RTO                = 0x438\n\tTCP_BBR_MIN_TOPACEOUT          = 0x455\n\tTCP_BBR_ONE_RETRAN             = 0x431\n\tTCP_BBR_PACE_CROSS             = 0x442\n\tTCP_BBR_PACE_DEL_TAR           = 0x43f\n\tTCP_BBR_PACE_OH                = 0x435\n\tTCP_BBR_PACE_PER_SEC           = 0x43e\n\tTCP_BBR_PACE_SEG_MAX           = 0x440\n\tTCP_BBR_PACE_SEG_MIN           = 0x441\n\tTCP_BBR_POLICER_DETECT         = 0x457\n\tTCP_BBR_PROBE_RTT_GAIN         = 0x44d\n\tTCP_BBR_PROBE_RTT_INT          = 0x430\n\tTCP_BBR_PROBE_RTT_LEN          = 0x44e\n\tTCP_BBR_RACK_RTT_USE           = 0x44a\n\tTCP_BBR_RECFORCE               = 0x42c\n\tTCP_BBR_REC_OVER_HPTS          = 0x43a\n\tTCP_BBR_RETRAN_WTSO            = 0x44b\n\tTCP_BBR_RWND_IS_APP            = 0x42f\n\tTCP_BBR_SEND_IWND_IN_TSO       = 0x44f\n\tTCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d\n\tTCP_BBR_STARTUP_LOSS_EXIT      = 0x432\n\tTCP_BBR_STARTUP_PG             = 0x42d\n\tTCP_BBR_TMR_PACE_OH            = 0x448\n\tTCP_BBR_TSLIMITS               = 0x434\n\tTCP_BBR_TSTMP_RAISES           = 0x456\n\tTCP_BBR_UNLIMITED              = 0x43b\n\tTCP_BBR_USEDEL_RATE            = 0x437\n\tTCP_BBR_USE_LOWGAIN            = 0x433\n\tTCP_BBR_USE_RACK_CHEAT         = 0x450\n\tTCP_BBR_UTTER_MAX_TSO          = 0x452\n\tTCP_CA_NAME_MAX                = 0x10\n\tTCP_CCALGOOPT                  = 0x41\n\tTCP_CONGESTION                 = 0x40\n\tTCP_DATA_AFTER_CLOSE           = 0x44c\n\tTCP_DELACK                     = 0x48\n\tTCP_FASTOPEN                   = 0x401\n\tTCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10\n\tTCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4\n\tTCP_FASTOPEN_PSK_LEN           = 0x10\n\tTCP_FUNCTION_BLK               = 0x2000\n\tTCP_FUNCTION_NAME_LEN_MAX      = 0x20\n\tTCP_INFO                       = 0x20\n\tTCP_KEEPCNT                    = 0x400\n\tTCP_KEEPIDLE                   = 0x100\n\tTCP_KEEPINIT                   = 0x80\n\tTCP_KEEPINTVL                  = 0x200\n\tTCP_LOG                        = 0x22\n\tTCP_LOGBUF                     = 0x23\n\tTCP_LOGDUMP                    = 0x25\n\tTCP_LOGDUMPID                  = 0x26\n\tTCP_LOGID                      = 0x24\n\tTCP_LOG_ID_LEN                 = 0x40\n\tTCP_MAXBURST                   = 0x4\n\tTCP_MAXHLEN                    = 0x3c\n\tTCP_MAXOLEN                    = 0x28\n\tTCP_MAXSEG                     = 0x2\n\tTCP_MAXWIN                     = 0xffff\n\tTCP_MAX_SACK                   = 0x4\n\tTCP_MAX_WINSHIFT               = 0xe\n\tTCP_MD5SIG                     = 0x10\n\tTCP_MINMSS                     = 0xd8\n\tTCP_MSS                        = 0x218\n\tTCP_NODELAY                    = 0x1\n\tTCP_NOOPT                      = 0x8\n\tTCP_NOPUSH                     = 0x4\n\tTCP_PCAP_IN                    = 0x1000\n\tTCP_PCAP_OUT                   = 0x800\n\tTCP_RACK_EARLY_RECOV           = 0x423\n\tTCP_RACK_EARLY_SEG             = 0x424\n\tTCP_RACK_GP_INCREASE           = 0x446\n\tTCP_RACK_IDLE_REDUCE_HIGH      = 0x444\n\tTCP_RACK_MIN_PACE              = 0x445\n\tTCP_RACK_MIN_PACE_SEG          = 0x446\n\tTCP_RACK_MIN_TO                = 0x422\n\tTCP_RACK_PACE_ALWAYS           = 0x41f\n\tTCP_RACK_PACE_MAX_SEG          = 0x41e\n\tTCP_RACK_PACE_REDUCE           = 0x41d\n\tTCP_RACK_PKT_DELAY             = 0x428\n\tTCP_RACK_PROP                  = 0x41b\n\tTCP_RACK_PROP_RATE             = 0x420\n\tTCP_RACK_PRR_SENDALOT          = 0x421\n\tTCP_RACK_REORD_FADE            = 0x426\n\tTCP_RACK_REORD_THRESH          = 0x425\n\tTCP_RACK_TLP_INC_VAR           = 0x429\n\tTCP_RACK_TLP_REDUCE            = 0x41c\n\tTCP_RACK_TLP_THRESH            = 0x427\n\tTCP_RACK_TLP_USE               = 0x447\n\tTCP_VENDOR                     = 0x80000000\n\tTCSAFLUSH                      = 0x2\n\tTIMER_ABSTIME                  = 0x1\n\tTIMER_RELTIME                  = 0x0\n\tTIOCCBRK                       = 0x2000747a\n\tTIOCCDTR                       = 0x20007478\n\tTIOCCONS                       = 0x80047462\n\tTIOCDRAIN                      = 0x2000745e\n\tTIOCEXCL                       = 0x2000740d\n\tTIOCEXT                        = 0x80047460\n\tTIOCFLUSH                      = 0x80047410\n\tTIOCGDRAINWAIT                 = 0x40047456\n\tTIOCGETA                       = 0x402c7413\n\tTIOCGETD                       = 0x4004741a\n\tTIOCGPGRP                      = 0x40047477\n\tTIOCGPTN                       = 0x4004740f\n\tTIOCGSID                       = 0x40047463\n\tTIOCGWINSZ                     = 0x40087468\n\tTIOCMBIC                       = 0x8004746b\n\tTIOCMBIS                       = 0x8004746c\n\tTIOCMGDTRWAIT                  = 0x4004745a\n\tTIOCMGET                       = 0x4004746a\n\tTIOCMSDTRWAIT                  = 0x8004745b\n\tTIOCMSET                       = 0x8004746d\n\tTIOCM_CAR                      = 0x40\n\tTIOCM_CD                       = 0x40\n\tTIOCM_CTS                      = 0x20\n\tTIOCM_DCD                      = 0x40\n\tTIOCM_DSR                      = 0x100\n\tTIOCM_DTR                      = 0x2\n\tTIOCM_LE                       = 0x1\n\tTIOCM_RI                       = 0x80\n\tTIOCM_RNG                      = 0x80\n\tTIOCM_RTS                      = 0x4\n\tTIOCM_SR                       = 0x10\n\tTIOCM_ST                       = 0x8\n\tTIOCNOTTY                      = 0x20007471\n\tTIOCNXCL                       = 0x2000740e\n\tTIOCOUTQ                       = 0x40047473\n\tTIOCPKT                        = 0x80047470\n\tTIOCPKT_DATA                   = 0x0\n\tTIOCPKT_DOSTOP                 = 0x20\n\tTIOCPKT_FLUSHREAD              = 0x1\n\tTIOCPKT_FLUSHWRITE             = 0x2\n\tTIOCPKT_IOCTL                  = 0x40\n\tTIOCPKT_NOSTOP                 = 0x10\n\tTIOCPKT_START                  = 0x8\n\tTIOCPKT_STOP                   = 0x4\n\tTIOCPTMASTER                   = 0x2000741c\n\tTIOCSBRK                       = 0x2000747b\n\tTIOCSCTTY                      = 0x20007461\n\tTIOCSDRAINWAIT                 = 0x80047457\n\tTIOCSDTR                       = 0x20007479\n\tTIOCSETA                       = 0x802c7414\n\tTIOCSETAF                      = 0x802c7416\n\tTIOCSETAW                      = 0x802c7415\n\tTIOCSETD                       = 0x8004741b\n\tTIOCSIG                        = 0x2004745f\n\tTIOCSPGRP                      = 0x80047476\n\tTIOCSTART                      = 0x2000746e\n\tTIOCSTAT                       = 0x20007465\n\tTIOCSTI                        = 0x80017472\n\tTIOCSTOP                       = 0x2000746f\n\tTIOCSWINSZ                     = 0x80087467\n\tTIOCTIMESTAMP                  = 0x40107459\n\tTIOCUCNTL                      = 0x80047466\n\tTOSTOP                         = 0x400000\n\tUTIME_NOW                      = -0x1\n\tUTIME_OMIT                     = -0x2\n\tVDISCARD                       = 0xf\n\tVDSUSP                         = 0xb\n\tVEOF                           = 0x0\n\tVEOL                           = 0x1\n\tVEOL2                          = 0x2\n\tVERASE                         = 0x3\n\tVERASE2                        = 0x7\n\tVINTR                          = 0x8\n\tVKILL                          = 0x5\n\tVLNEXT                         = 0xe\n\tVMIN                           = 0x10\n\tVQUIT                          = 0x9\n\tVREPRINT                       = 0x6\n\tVSTART                         = 0xc\n\tVSTATUS                        = 0x12\n\tVSTOP                          = 0xd\n\tVSUSP                          = 0xa\n\tVTIME                          = 0x11\n\tVWERASE                        = 0x4\n\tWCONTINUED                     = 0x4\n\tWCOREFLAG                      = 0x80\n\tWEXITED                        = 0x10\n\tWLINUXCLONE                    = 0x80000000\n\tWNOHANG                        = 0x1\n\tWNOWAIT                        = 0x8\n\tWSTOPPED                       = 0x2\n\tWTRAPPED                       = 0x20\n\tWUNTRACED                      = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECAPMODE        = syscall.Errno(0x5e)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTEGRITY      = syscall.Errno(0x61)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x61)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCAPABLE     = syscall.Errno(0x5d)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5f)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x60)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGLIBRT  = syscall.Signal(0x21)\n\tSIGLWP    = syscall.Signal(0x20)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOTCAPABLE\", \"capabilities insufficient\"},\n\t{94, \"ECAPMODE\", \"not permitted in capability mode\"},\n\t{95, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{96, \"EOWNERDEAD\", \"previous owner died\"},\n\t{97, \"EINTEGRITY\", \"integrity check failed\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"unknown signal\"},\n\t{33, \"SIGLIBRT\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go",
    "content": "// mkerrors.sh\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && freebsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                   = 0x10\n\tAF_ARP                         = 0x23\n\tAF_ATM                         = 0x1e\n\tAF_BLUETOOTH                   = 0x24\n\tAF_CCITT                       = 0xa\n\tAF_CHAOS                       = 0x5\n\tAF_CNT                         = 0x15\n\tAF_COIP                        = 0x14\n\tAF_DATAKIT                     = 0x9\n\tAF_DECnet                      = 0xc\n\tAF_DLI                         = 0xd\n\tAF_E164                        = 0x1a\n\tAF_ECMA                        = 0x8\n\tAF_HYLINK                      = 0xf\n\tAF_IEEE80211                   = 0x25\n\tAF_IMPLINK                     = 0x3\n\tAF_INET                        = 0x2\n\tAF_INET6                       = 0x1c\n\tAF_INET6_SDP                   = 0x2a\n\tAF_INET_SDP                    = 0x28\n\tAF_IPX                         = 0x17\n\tAF_ISDN                        = 0x1a\n\tAF_ISO                         = 0x7\n\tAF_LAT                         = 0xe\n\tAF_LINK                        = 0x12\n\tAF_LOCAL                       = 0x1\n\tAF_MAX                         = 0x2a\n\tAF_NATM                        = 0x1d\n\tAF_NETBIOS                     = 0x6\n\tAF_NETGRAPH                    = 0x20\n\tAF_OSI                         = 0x7\n\tAF_PUP                         = 0x4\n\tAF_ROUTE                       = 0x11\n\tAF_SCLUSTER                    = 0x22\n\tAF_SIP                         = 0x18\n\tAF_SLOW                        = 0x21\n\tAF_SNA                         = 0xb\n\tAF_UNIX                        = 0x1\n\tAF_UNSPEC                      = 0x0\n\tAF_VENDOR00                    = 0x27\n\tAF_VENDOR01                    = 0x29\n\tAF_VENDOR02                    = 0x2b\n\tAF_VENDOR03                    = 0x2d\n\tAF_VENDOR04                    = 0x2f\n\tAF_VENDOR05                    = 0x31\n\tAF_VENDOR06                    = 0x33\n\tAF_VENDOR07                    = 0x35\n\tAF_VENDOR08                    = 0x37\n\tAF_VENDOR09                    = 0x39\n\tAF_VENDOR10                    = 0x3b\n\tAF_VENDOR11                    = 0x3d\n\tAF_VENDOR12                    = 0x3f\n\tAF_VENDOR13                    = 0x41\n\tAF_VENDOR14                    = 0x43\n\tAF_VENDOR15                    = 0x45\n\tAF_VENDOR16                    = 0x47\n\tAF_VENDOR17                    = 0x49\n\tAF_VENDOR18                    = 0x4b\n\tAF_VENDOR19                    = 0x4d\n\tAF_VENDOR20                    = 0x4f\n\tAF_VENDOR21                    = 0x51\n\tAF_VENDOR22                    = 0x53\n\tAF_VENDOR23                    = 0x55\n\tAF_VENDOR24                    = 0x57\n\tAF_VENDOR25                    = 0x59\n\tAF_VENDOR26                    = 0x5b\n\tAF_VENDOR27                    = 0x5d\n\tAF_VENDOR28                    = 0x5f\n\tAF_VENDOR29                    = 0x61\n\tAF_VENDOR30                    = 0x63\n\tAF_VENDOR31                    = 0x65\n\tAF_VENDOR32                    = 0x67\n\tAF_VENDOR33                    = 0x69\n\tAF_VENDOR34                    = 0x6b\n\tAF_VENDOR35                    = 0x6d\n\tAF_VENDOR36                    = 0x6f\n\tAF_VENDOR37                    = 0x71\n\tAF_VENDOR38                    = 0x73\n\tAF_VENDOR39                    = 0x75\n\tAF_VENDOR40                    = 0x77\n\tAF_VENDOR41                    = 0x79\n\tAF_VENDOR42                    = 0x7b\n\tAF_VENDOR43                    = 0x7d\n\tAF_VENDOR44                    = 0x7f\n\tAF_VENDOR45                    = 0x81\n\tAF_VENDOR46                    = 0x83\n\tAF_VENDOR47                    = 0x85\n\tALTWERASE                      = 0x200\n\tB0                             = 0x0\n\tB110                           = 0x6e\n\tB115200                        = 0x1c200\n\tB1200                          = 0x4b0\n\tB134                           = 0x86\n\tB14400                         = 0x3840\n\tB150                           = 0x96\n\tB1800                          = 0x708\n\tB19200                         = 0x4b00\n\tB200                           = 0xc8\n\tB230400                        = 0x38400\n\tB2400                          = 0x960\n\tB28800                         = 0x7080\n\tB300                           = 0x12c\n\tB38400                         = 0x9600\n\tB460800                        = 0x70800\n\tB4800                          = 0x12c0\n\tB50                            = 0x32\n\tB57600                         = 0xe100\n\tB600                           = 0x258\n\tB7200                          = 0x1c20\n\tB75                            = 0x4b\n\tB76800                         = 0x12c00\n\tB921600                        = 0xe1000\n\tB9600                          = 0x2580\n\tBIOCFEEDBACK                   = 0x8004427c\n\tBIOCFLUSH                      = 0x20004268\n\tBIOCGBLEN                      = 0x40044266\n\tBIOCGDIRECTION                 = 0x40044276\n\tBIOCGDLT                       = 0x4004426a\n\tBIOCGDLTLIST                   = 0xc0084279\n\tBIOCGETBUFMODE                 = 0x4004427d\n\tBIOCGETIF                      = 0x4020426b\n\tBIOCGETZMAX                    = 0x4004427f\n\tBIOCGHDRCMPLT                  = 0x40044274\n\tBIOCGRSIG                      = 0x40044272\n\tBIOCGRTIMEOUT                  = 0x4010426e\n\tBIOCGSEESENT                   = 0x40044276\n\tBIOCGSTATS                     = 0x4008426f\n\tBIOCGTSTAMP                    = 0x40044283\n\tBIOCIMMEDIATE                  = 0x80044270\n\tBIOCLOCK                       = 0x2000427a\n\tBIOCPROMISC                    = 0x20004269\n\tBIOCROTZBUF                    = 0x400c4280\n\tBIOCSBLEN                      = 0xc0044266\n\tBIOCSDIRECTION                 = 0x80044277\n\tBIOCSDLT                       = 0x80044278\n\tBIOCSETBUFMODE                 = 0x8004427e\n\tBIOCSETF                       = 0x80084267\n\tBIOCSETFNR                     = 0x80084282\n\tBIOCSETIF                      = 0x8020426c\n\tBIOCSETVLANPCP                 = 0x80044285\n\tBIOCSETWF                      = 0x8008427b\n\tBIOCSETZBUF                    = 0x800c4281\n\tBIOCSHDRCMPLT                  = 0x80044275\n\tBIOCSRSIG                      = 0x80044273\n\tBIOCSRTIMEOUT                  = 0x8010426d\n\tBIOCSSEESENT                   = 0x80044277\n\tBIOCSTSTAMP                    = 0x80044284\n\tBIOCVERSION                    = 0x40044271\n\tBPF_A                          = 0x10\n\tBPF_ABS                        = 0x20\n\tBPF_ADD                        = 0x0\n\tBPF_ALIGNMENT                  = 0x4\n\tBPF_ALU                        = 0x4\n\tBPF_AND                        = 0x50\n\tBPF_B                          = 0x10\n\tBPF_BUFMODE_BUFFER             = 0x1\n\tBPF_BUFMODE_ZBUF               = 0x2\n\tBPF_DIV                        = 0x30\n\tBPF_H                          = 0x8\n\tBPF_IMM                        = 0x0\n\tBPF_IND                        = 0x40\n\tBPF_JA                         = 0x0\n\tBPF_JEQ                        = 0x10\n\tBPF_JGE                        = 0x30\n\tBPF_JGT                        = 0x20\n\tBPF_JMP                        = 0x5\n\tBPF_JSET                       = 0x40\n\tBPF_K                          = 0x0\n\tBPF_LD                         = 0x0\n\tBPF_LDX                        = 0x1\n\tBPF_LEN                        = 0x80\n\tBPF_LSH                        = 0x60\n\tBPF_MAJOR_VERSION              = 0x1\n\tBPF_MAXBUFSIZE                 = 0x80000\n\tBPF_MAXINSNS                   = 0x200\n\tBPF_MEM                        = 0x60\n\tBPF_MEMWORDS                   = 0x10\n\tBPF_MINBUFSIZE                 = 0x20\n\tBPF_MINOR_VERSION              = 0x1\n\tBPF_MISC                       = 0x7\n\tBPF_MOD                        = 0x90\n\tBPF_MSH                        = 0xa0\n\tBPF_MUL                        = 0x20\n\tBPF_NEG                        = 0x80\n\tBPF_OR                         = 0x40\n\tBPF_RELEASE                    = 0x30bb6\n\tBPF_RET                        = 0x6\n\tBPF_RSH                        = 0x70\n\tBPF_ST                         = 0x2\n\tBPF_STX                        = 0x3\n\tBPF_SUB                        = 0x10\n\tBPF_TAX                        = 0x0\n\tBPF_TXA                        = 0x80\n\tBPF_T_BINTIME                  = 0x2\n\tBPF_T_BINTIME_FAST             = 0x102\n\tBPF_T_BINTIME_MONOTONIC        = 0x202\n\tBPF_T_BINTIME_MONOTONIC_FAST   = 0x302\n\tBPF_T_FAST                     = 0x100\n\tBPF_T_FLAG_MASK                = 0x300\n\tBPF_T_FORMAT_MASK              = 0x3\n\tBPF_T_MICROTIME                = 0x0\n\tBPF_T_MICROTIME_FAST           = 0x100\n\tBPF_T_MICROTIME_MONOTONIC      = 0x200\n\tBPF_T_MICROTIME_MONOTONIC_FAST = 0x300\n\tBPF_T_MONOTONIC                = 0x200\n\tBPF_T_MONOTONIC_FAST           = 0x300\n\tBPF_T_NANOTIME                 = 0x1\n\tBPF_T_NANOTIME_FAST            = 0x101\n\tBPF_T_NANOTIME_MONOTONIC       = 0x201\n\tBPF_T_NANOTIME_MONOTONIC_FAST  = 0x301\n\tBPF_T_NONE                     = 0x3\n\tBPF_T_NORMAL                   = 0x0\n\tBPF_W                          = 0x0\n\tBPF_X                          = 0x8\n\tBPF_XOR                        = 0xa0\n\tBRKINT                         = 0x2\n\tCAP_ACCEPT                     = 0x200000020000000\n\tCAP_ACL_CHECK                  = 0x400000000010000\n\tCAP_ACL_DELETE                 = 0x400000000020000\n\tCAP_ACL_GET                    = 0x400000000040000\n\tCAP_ACL_SET                    = 0x400000000080000\n\tCAP_ALL0                       = 0x20007ffffffffff\n\tCAP_ALL1                       = 0x4000000001fffff\n\tCAP_BIND                       = 0x200000040000000\n\tCAP_BINDAT                     = 0x200008000000400\n\tCAP_CHFLAGSAT                  = 0x200000000001400\n\tCAP_CONNECT                    = 0x200000080000000\n\tCAP_CONNECTAT                  = 0x200010000000400\n\tCAP_CREATE                     = 0x200000000000040\n\tCAP_EVENT                      = 0x400000000000020\n\tCAP_EXTATTR_DELETE             = 0x400000000001000\n\tCAP_EXTATTR_GET                = 0x400000000002000\n\tCAP_EXTATTR_LIST               = 0x400000000004000\n\tCAP_EXTATTR_SET                = 0x400000000008000\n\tCAP_FCHDIR                     = 0x200000000000800\n\tCAP_FCHFLAGS                   = 0x200000000001000\n\tCAP_FCHMOD                     = 0x200000000002000\n\tCAP_FCHMODAT                   = 0x200000000002400\n\tCAP_FCHOWN                     = 0x200000000004000\n\tCAP_FCHOWNAT                   = 0x200000000004400\n\tCAP_FCNTL                      = 0x200000000008000\n\tCAP_FCNTL_ALL                  = 0x78\n\tCAP_FCNTL_GETFL                = 0x8\n\tCAP_FCNTL_GETOWN               = 0x20\n\tCAP_FCNTL_SETFL                = 0x10\n\tCAP_FCNTL_SETOWN               = 0x40\n\tCAP_FEXECVE                    = 0x200000000000080\n\tCAP_FLOCK                      = 0x200000000010000\n\tCAP_FPATHCONF                  = 0x200000000020000\n\tCAP_FSCK                       = 0x200000000040000\n\tCAP_FSTAT                      = 0x200000000080000\n\tCAP_FSTATAT                    = 0x200000000080400\n\tCAP_FSTATFS                    = 0x200000000100000\n\tCAP_FSYNC                      = 0x200000000000100\n\tCAP_FTRUNCATE                  = 0x200000000000200\n\tCAP_FUTIMES                    = 0x200000000200000\n\tCAP_FUTIMESAT                  = 0x200000000200400\n\tCAP_GETPEERNAME                = 0x200000100000000\n\tCAP_GETSOCKNAME                = 0x200000200000000\n\tCAP_GETSOCKOPT                 = 0x200000400000000\n\tCAP_IOCTL                      = 0x400000000000080\n\tCAP_IOCTLS_ALL                 = 0x7fffffff\n\tCAP_KQUEUE                     = 0x400000000100040\n\tCAP_KQUEUE_CHANGE              = 0x400000000100000\n\tCAP_KQUEUE_EVENT               = 0x400000000000040\n\tCAP_LINKAT_SOURCE              = 0x200020000000400\n\tCAP_LINKAT_TARGET              = 0x200000000400400\n\tCAP_LISTEN                     = 0x200000800000000\n\tCAP_LOOKUP                     = 0x200000000000400\n\tCAP_MAC_GET                    = 0x400000000000001\n\tCAP_MAC_SET                    = 0x400000000000002\n\tCAP_MKDIRAT                    = 0x200000000800400\n\tCAP_MKFIFOAT                   = 0x200000001000400\n\tCAP_MKNODAT                    = 0x200000002000400\n\tCAP_MMAP                       = 0x200000000000010\n\tCAP_MMAP_R                     = 0x20000000000001d\n\tCAP_MMAP_RW                    = 0x20000000000001f\n\tCAP_MMAP_RWX                   = 0x20000000000003f\n\tCAP_MMAP_RX                    = 0x20000000000003d\n\tCAP_MMAP_W                     = 0x20000000000001e\n\tCAP_MMAP_WX                    = 0x20000000000003e\n\tCAP_MMAP_X                     = 0x20000000000003c\n\tCAP_PDGETPID                   = 0x400000000000200\n\tCAP_PDKILL                     = 0x400000000000800\n\tCAP_PDWAIT                     = 0x400000000000400\n\tCAP_PEELOFF                    = 0x200001000000000\n\tCAP_POLL_EVENT                 = 0x400000000000020\n\tCAP_PREAD                      = 0x20000000000000d\n\tCAP_PWRITE                     = 0x20000000000000e\n\tCAP_READ                       = 0x200000000000001\n\tCAP_RECV                       = 0x200000000000001\n\tCAP_RENAMEAT_SOURCE            = 0x200000004000400\n\tCAP_RENAMEAT_TARGET            = 0x200040000000400\n\tCAP_RIGHTS_VERSION             = 0x0\n\tCAP_RIGHTS_VERSION_00          = 0x0\n\tCAP_SEEK                       = 0x20000000000000c\n\tCAP_SEEK_TELL                  = 0x200000000000004\n\tCAP_SEM_GETVALUE               = 0x400000000000004\n\tCAP_SEM_POST                   = 0x400000000000008\n\tCAP_SEM_WAIT                   = 0x400000000000010\n\tCAP_SEND                       = 0x200000000000002\n\tCAP_SETSOCKOPT                 = 0x200002000000000\n\tCAP_SHUTDOWN                   = 0x200004000000000\n\tCAP_SOCK_CLIENT                = 0x200007780000003\n\tCAP_SOCK_SERVER                = 0x200007f60000003\n\tCAP_SYMLINKAT                  = 0x200000008000400\n\tCAP_TTYHOOK                    = 0x400000000000100\n\tCAP_UNLINKAT                   = 0x200000010000400\n\tCAP_UNUSED0_44                 = 0x200080000000000\n\tCAP_UNUSED0_57                 = 0x300000000000000\n\tCAP_UNUSED1_22                 = 0x400000000200000\n\tCAP_UNUSED1_57                 = 0x500000000000000\n\tCAP_WRITE                      = 0x200000000000002\n\tCFLUSH                         = 0xf\n\tCLOCAL                         = 0x8000\n\tCLOCK_MONOTONIC                = 0x4\n\tCLOCK_MONOTONIC_FAST           = 0xc\n\tCLOCK_MONOTONIC_PRECISE        = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID       = 0xf\n\tCLOCK_PROF                     = 0x2\n\tCLOCK_REALTIME                 = 0x0\n\tCLOCK_REALTIME_FAST            = 0xa\n\tCLOCK_REALTIME_PRECISE         = 0x9\n\tCLOCK_SECOND                   = 0xd\n\tCLOCK_THREAD_CPUTIME_ID        = 0xe\n\tCLOCK_UPTIME                   = 0x5\n\tCLOCK_UPTIME_FAST              = 0x8\n\tCLOCK_UPTIME_PRECISE           = 0x7\n\tCLOCK_VIRTUAL                  = 0x1\n\tCPUSTATES                      = 0x5\n\tCP_IDLE                        = 0x4\n\tCP_INTR                        = 0x3\n\tCP_NICE                        = 0x1\n\tCP_SYS                         = 0x2\n\tCP_USER                        = 0x0\n\tCREAD                          = 0x800\n\tCRTSCTS                        = 0x30000\n\tCS5                            = 0x0\n\tCS6                            = 0x100\n\tCS7                            = 0x200\n\tCS8                            = 0x300\n\tCSIZE                          = 0x300\n\tCSTART                         = 0x11\n\tCSTATUS                        = 0x14\n\tCSTOP                          = 0x13\n\tCSTOPB                         = 0x400\n\tCSUSP                          = 0x1a\n\tCTL_HW                         = 0x6\n\tCTL_KERN                       = 0x1\n\tCTL_MAXNAME                    = 0x18\n\tCTL_NET                        = 0x4\n\tDIOCGATTR                      = 0xc148648e\n\tDIOCGDELETE                    = 0x80106488\n\tDIOCGFLUSH                     = 0x20006487\n\tDIOCGFRONTSTUFF                = 0x40086486\n\tDIOCGFWHEADS                   = 0x40046483\n\tDIOCGFWSECTORS                 = 0x40046482\n\tDIOCGIDENT                     = 0x41006489\n\tDIOCGMEDIASIZE                 = 0x40086481\n\tDIOCGPHYSPATH                  = 0x4400648d\n\tDIOCGPROVIDERNAME              = 0x4400648a\n\tDIOCGSECTORSIZE                = 0x40046480\n\tDIOCGSTRIPEOFFSET              = 0x4008648c\n\tDIOCGSTRIPESIZE                = 0x4008648b\n\tDIOCSKERNELDUMP                = 0x804c6490\n\tDIOCSKERNELDUMP_FREEBSD11      = 0x80046485\n\tDIOCZONECMD                    = 0xc078648f\n\tDLT_A429                       = 0xb8\n\tDLT_A653_ICM                   = 0xb9\n\tDLT_AIRONET_HEADER             = 0x78\n\tDLT_AOS                        = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394     = 0x8a\n\tDLT_ARCNET                     = 0x7\n\tDLT_ARCNET_LINUX               = 0x81\n\tDLT_ATM_CLIP                   = 0x13\n\tDLT_ATM_RFC1483                = 0xb\n\tDLT_AURORA                     = 0x7e\n\tDLT_AX25                       = 0x3\n\tDLT_AX25_KISS                  = 0xca\n\tDLT_BACNET_MS_TP               = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB         = 0xff\n\tDLT_BLUETOOTH_HCI_H4           = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9\n\tDLT_BLUETOOTH_LE_LL            = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR    = 0xfe\n\tDLT_CAN20B                     = 0xbe\n\tDLT_CAN_SOCKETCAN              = 0xe3\n\tDLT_CHAOS                      = 0x5\n\tDLT_CHDLC                      = 0x68\n\tDLT_CISCO_IOS                  = 0x76\n\tDLT_CLASS_NETBSD_RAWAF         = 0x2240000\n\tDLT_C_HDLC                     = 0x68\n\tDLT_C_HDLC_WITH_DIR            = 0xcd\n\tDLT_DBUS                       = 0xe7\n\tDLT_DECT                       = 0xdd\n\tDLT_DISPLAYPORT_AUX            = 0x113\n\tDLT_DOCSIS                     = 0x8f\n\tDLT_DOCSIS31_XRA31             = 0x111\n\tDLT_DVB_CI                     = 0xeb\n\tDLT_ECONET                     = 0x73\n\tDLT_EN10MB                     = 0x1\n\tDLT_EN3MB                      = 0x2\n\tDLT_ENC                        = 0x6d\n\tDLT_EPON                       = 0x103\n\tDLT_ERF                        = 0xc5\n\tDLT_ERF_ETH                    = 0xaf\n\tDLT_ERF_POS                    = 0xb0\n\tDLT_ETHERNET_MPACKET           = 0x112\n\tDLT_FC_2                       = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS     = 0xe1\n\tDLT_FDDI                       = 0xa\n\tDLT_FLEXRAY                    = 0xd2\n\tDLT_FRELAY                     = 0x6b\n\tDLT_FRELAY_WITH_DIR            = 0xce\n\tDLT_GCOM_SERIAL                = 0xad\n\tDLT_GCOM_T1E1                  = 0xac\n\tDLT_GPF_F                      = 0xab\n\tDLT_GPF_T                      = 0xaa\n\tDLT_GPRS_LLC                   = 0xa9\n\tDLT_GSMTAP_ABIS                = 0xda\n\tDLT_GSMTAP_UM                  = 0xd9\n\tDLT_IBM_SN                     = 0x92\n\tDLT_IBM_SP                     = 0x91\n\tDLT_IEEE802                    = 0x6\n\tDLT_IEEE802_11                 = 0x69\n\tDLT_IEEE802_11_RADIO           = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS       = 0xa3\n\tDLT_IEEE802_15_4               = 0xc3\n\tDLT_IEEE802_15_4_LINUX         = 0xbf\n\tDLT_IEEE802_15_4_NOFCS         = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY    = 0xd7\n\tDLT_IEEE802_16_MAC_CPS         = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1\n\tDLT_INFINIBAND                 = 0xf7\n\tDLT_IPFILTER                   = 0x74\n\tDLT_IPMB_KONTRON               = 0xc7\n\tDLT_IPMB_LINUX                 = 0xd1\n\tDLT_IPMI_HPM_2                 = 0x104\n\tDLT_IPNET                      = 0xe2\n\tDLT_IPOIB                      = 0xf2\n\tDLT_IPV4                       = 0xe4\n\tDLT_IPV6                       = 0xe5\n\tDLT_IP_OVER_FC                 = 0x7a\n\tDLT_ISO_14443                  = 0x108\n\tDLT_JUNIPER_ATM1               = 0x89\n\tDLT_JUNIPER_ATM2               = 0x87\n\tDLT_JUNIPER_ATM_CEMIC          = 0xee\n\tDLT_JUNIPER_CHDLC              = 0xb5\n\tDLT_JUNIPER_ES                 = 0x84\n\tDLT_JUNIPER_ETHER              = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL       = 0xea\n\tDLT_JUNIPER_FRELAY             = 0xb4\n\tDLT_JUNIPER_GGSN               = 0x85\n\tDLT_JUNIPER_ISM                = 0xc2\n\tDLT_JUNIPER_MFR                = 0x86\n\tDLT_JUNIPER_MLFR               = 0x83\n\tDLT_JUNIPER_MLPPP              = 0x82\n\tDLT_JUNIPER_MONITOR            = 0xa4\n\tDLT_JUNIPER_PIC_PEER           = 0xae\n\tDLT_JUNIPER_PPP                = 0xb3\n\tDLT_JUNIPER_PPPOE              = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM          = 0xa8\n\tDLT_JUNIPER_SERVICES           = 0x88\n\tDLT_JUNIPER_SRX_E2E            = 0xe9\n\tDLT_JUNIPER_ST                 = 0xc8\n\tDLT_JUNIPER_VP                 = 0xb7\n\tDLT_JUNIPER_VS                 = 0xe8\n\tDLT_LAPB_WITH_DIR              = 0xcf\n\tDLT_LAPD                       = 0xcb\n\tDLT_LIN                        = 0xd4\n\tDLT_LINUX_EVDEV                = 0xd8\n\tDLT_LINUX_IRDA                 = 0x90\n\tDLT_LINUX_LAPD                 = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION    = 0xa6\n\tDLT_LINUX_SLL                  = 0x71\n\tDLT_LINUX_SLL2                 = 0x114\n\tDLT_LOOP                       = 0x6c\n\tDLT_LORATAP                    = 0x10e\n\tDLT_LTALK                      = 0x72\n\tDLT_MATCHING_MAX               = 0x114\n\tDLT_MATCHING_MIN               = 0x68\n\tDLT_MFR                        = 0xb6\n\tDLT_MOST                       = 0xd3\n\tDLT_MPEG_2_TS                  = 0xf3\n\tDLT_MPLS                       = 0xdb\n\tDLT_MTP2                       = 0x8c\n\tDLT_MTP2_WITH_PHDR             = 0x8b\n\tDLT_MTP3                       = 0x8d\n\tDLT_MUX27010                   = 0xec\n\tDLT_NETANALYZER                = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT    = 0xf1\n\tDLT_NETLINK                    = 0xfd\n\tDLT_NFC_LLCP                   = 0xf5\n\tDLT_NFLOG                      = 0xef\n\tDLT_NG40                       = 0xf4\n\tDLT_NORDIC_BLE                 = 0x110\n\tDLT_NULL                       = 0x0\n\tDLT_OPENFLOW                   = 0x10b\n\tDLT_PCI_EXP                    = 0x7d\n\tDLT_PFLOG                      = 0x75\n\tDLT_PFSYNC                     = 0x79\n\tDLT_PKTAP                      = 0x102\n\tDLT_PPI                        = 0xc0\n\tDLT_PPP                        = 0x9\n\tDLT_PPP_BSDOS                  = 0xe\n\tDLT_PPP_ETHER                  = 0x33\n\tDLT_PPP_PPPD                   = 0xa6\n\tDLT_PPP_SERIAL                 = 0x32\n\tDLT_PPP_WITH_DIR               = 0xcc\n\tDLT_PPP_WITH_DIRECTION         = 0xa6\n\tDLT_PRISM_HEADER               = 0x77\n\tDLT_PROFIBUS_DL                = 0x101\n\tDLT_PRONET                     = 0x4\n\tDLT_RAIF1                      = 0xc6\n\tDLT_RAW                        = 0xc\n\tDLT_RDS                        = 0x109\n\tDLT_REDBACK_SMARTEDGE          = 0x20\n\tDLT_RIO                        = 0x7c\n\tDLT_RTAC_SERIAL                = 0xfa\n\tDLT_SCCP                       = 0x8e\n\tDLT_SCTP                       = 0xf8\n\tDLT_SDLC                       = 0x10c\n\tDLT_SITA                       = 0xc4\n\tDLT_SLIP                       = 0x8\n\tDLT_SLIP_BSDOS                 = 0xd\n\tDLT_STANAG_5066_D_PDU          = 0xed\n\tDLT_SUNATM                     = 0x7b\n\tDLT_SYMANTEC_FIREWALL          = 0x63\n\tDLT_TI_LLN_SNIFFER             = 0x10d\n\tDLT_TZSP                       = 0x80\n\tDLT_USB                        = 0xba\n\tDLT_USBPCAP                    = 0xf9\n\tDLT_USB_DARWIN                 = 0x10a\n\tDLT_USB_FREEBSD                = 0xba\n\tDLT_USB_LINUX                  = 0xbd\n\tDLT_USB_LINUX_MMAPPED          = 0xdc\n\tDLT_USER0                      = 0x93\n\tDLT_USER1                      = 0x94\n\tDLT_USER10                     = 0x9d\n\tDLT_USER11                     = 0x9e\n\tDLT_USER12                     = 0x9f\n\tDLT_USER13                     = 0xa0\n\tDLT_USER14                     = 0xa1\n\tDLT_USER15                     = 0xa2\n\tDLT_USER2                      = 0x95\n\tDLT_USER3                      = 0x96\n\tDLT_USER4                      = 0x97\n\tDLT_USER5                      = 0x98\n\tDLT_USER6                      = 0x99\n\tDLT_USER7                      = 0x9a\n\tDLT_USER8                      = 0x9b\n\tDLT_USER9                      = 0x9c\n\tDLT_VSOCK                      = 0x10f\n\tDLT_WATTSTOPPER_DLM            = 0x107\n\tDLT_WIHART                     = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU        = 0xfc\n\tDLT_X2E_SERIAL                 = 0xd5\n\tDLT_X2E_XORAYA                 = 0xd6\n\tDLT_ZWAVE_R1_R2                = 0x105\n\tDLT_ZWAVE_R3                   = 0x106\n\tDT_BLK                         = 0x6\n\tDT_CHR                         = 0x2\n\tDT_DIR                         = 0x4\n\tDT_FIFO                        = 0x1\n\tDT_LNK                         = 0xa\n\tDT_REG                         = 0x8\n\tDT_SOCK                        = 0xc\n\tDT_UNKNOWN                     = 0x0\n\tDT_WHT                         = 0xe\n\tECHO                           = 0x8\n\tECHOCTL                        = 0x40\n\tECHOE                          = 0x2\n\tECHOK                          = 0x4\n\tECHOKE                         = 0x1\n\tECHONL                         = 0x10\n\tECHOPRT                        = 0x20\n\tEVFILT_AIO                     = -0x3\n\tEVFILT_EMPTY                   = -0xd\n\tEVFILT_FS                      = -0x9\n\tEVFILT_LIO                     = -0xa\n\tEVFILT_PROC                    = -0x5\n\tEVFILT_PROCDESC                = -0x8\n\tEVFILT_READ                    = -0x1\n\tEVFILT_SENDFILE                = -0xc\n\tEVFILT_SIGNAL                  = -0x6\n\tEVFILT_SYSCOUNT                = 0xd\n\tEVFILT_TIMER                   = -0x7\n\tEVFILT_USER                    = -0xb\n\tEVFILT_VNODE                   = -0x4\n\tEVFILT_WRITE                   = -0x2\n\tEVNAMEMAP_NAME_SIZE            = 0x40\n\tEV_ADD                         = 0x1\n\tEV_CLEAR                       = 0x20\n\tEV_DELETE                      = 0x2\n\tEV_DISABLE                     = 0x8\n\tEV_DISPATCH                    = 0x80\n\tEV_DROP                        = 0x1000\n\tEV_ENABLE                      = 0x4\n\tEV_EOF                         = 0x8000\n\tEV_ERROR                       = 0x4000\n\tEV_FLAG1                       = 0x2000\n\tEV_FLAG2                       = 0x4000\n\tEV_FORCEONESHOT                = 0x100\n\tEV_ONESHOT                     = 0x10\n\tEV_RECEIPT                     = 0x40\n\tEV_SYSFLAGS                    = 0xf000\n\tEXTA                           = 0x4b00\n\tEXTATTR_MAXNAMELEN             = 0xff\n\tEXTATTR_NAMESPACE_EMPTY        = 0x0\n\tEXTATTR_NAMESPACE_SYSTEM       = 0x2\n\tEXTATTR_NAMESPACE_USER         = 0x1\n\tEXTB                           = 0x9600\n\tEXTPROC                        = 0x800\n\tFD_CLOEXEC                     = 0x1\n\tFD_SETSIZE                     = 0x400\n\tFLUSHO                         = 0x800000\n\tF_CANCEL                       = 0x5\n\tF_DUP2FD                       = 0xa\n\tF_DUP2FD_CLOEXEC               = 0x12\n\tF_DUPFD                        = 0x0\n\tF_DUPFD_CLOEXEC                = 0x11\n\tF_GETFD                        = 0x1\n\tF_GETFL                        = 0x3\n\tF_GETLK                        = 0xb\n\tF_GETOWN                       = 0x5\n\tF_OGETLK                       = 0x7\n\tF_OK                           = 0x0\n\tF_OSETLK                       = 0x8\n\tF_OSETLKW                      = 0x9\n\tF_RDAHEAD                      = 0x10\n\tF_RDLCK                        = 0x1\n\tF_READAHEAD                    = 0xf\n\tF_SETFD                        = 0x2\n\tF_SETFL                        = 0x4\n\tF_SETLK                        = 0xc\n\tF_SETLKW                       = 0xd\n\tF_SETLK_REMOTE                 = 0xe\n\tF_SETOWN                       = 0x6\n\tF_UNLCK                        = 0x2\n\tF_UNLCKSYS                     = 0x4\n\tF_WRLCK                        = 0x3\n\tHUPCL                          = 0x4000\n\tHW_MACHINE                     = 0x1\n\tICANON                         = 0x100\n\tICMP6_FILTER                   = 0x12\n\tICRNL                          = 0x100\n\tIEXTEN                         = 0x400\n\tIFAN_ARRIVAL                   = 0x0\n\tIFAN_DEPARTURE                 = 0x1\n\tIFCAP_WOL_MAGIC                = 0x2000\n\tIFF_ALLMULTI                   = 0x200\n\tIFF_ALTPHYS                    = 0x4000\n\tIFF_BROADCAST                  = 0x2\n\tIFF_CANTCHANGE                 = 0x218f52\n\tIFF_CANTCONFIG                 = 0x10000\n\tIFF_DEBUG                      = 0x4\n\tIFF_DRV_OACTIVE                = 0x400\n\tIFF_DRV_RUNNING                = 0x40\n\tIFF_DYING                      = 0x200000\n\tIFF_LINK0                      = 0x1000\n\tIFF_LINK1                      = 0x2000\n\tIFF_LINK2                      = 0x4000\n\tIFF_LOOPBACK                   = 0x8\n\tIFF_MONITOR                    = 0x40000\n\tIFF_MULTICAST                  = 0x8000\n\tIFF_NOARP                      = 0x80\n\tIFF_NOGROUP                    = 0x800000\n\tIFF_OACTIVE                    = 0x400\n\tIFF_POINTOPOINT                = 0x10\n\tIFF_PPROMISC                   = 0x20000\n\tIFF_PROMISC                    = 0x100\n\tIFF_RENAMING                   = 0x400000\n\tIFF_RUNNING                    = 0x40\n\tIFF_SIMPLEX                    = 0x800\n\tIFF_STATICARP                  = 0x80000\n\tIFF_UP                         = 0x1\n\tIFNAMSIZ                       = 0x10\n\tIFT_BRIDGE                     = 0xd1\n\tIFT_CARP                       = 0xf8\n\tIFT_IEEE1394                   = 0x90\n\tIFT_INFINIBAND                 = 0xc7\n\tIFT_L2VLAN                     = 0x87\n\tIFT_L3IPVLAN                   = 0x88\n\tIFT_PPP                        = 0x17\n\tIFT_PROPVIRTUAL                = 0x35\n\tIGNBRK                         = 0x1\n\tIGNCR                          = 0x80\n\tIGNPAR                         = 0x4\n\tIMAXBEL                        = 0x2000\n\tINLCR                          = 0x40\n\tINPCK                          = 0x10\n\tIN_CLASSA_HOST                 = 0xffffff\n\tIN_CLASSA_MAX                  = 0x80\n\tIN_CLASSA_NET                  = 0xff000000\n\tIN_CLASSA_NSHIFT               = 0x18\n\tIN_CLASSB_HOST                 = 0xffff\n\tIN_CLASSB_MAX                  = 0x10000\n\tIN_CLASSB_NET                  = 0xffff0000\n\tIN_CLASSB_NSHIFT               = 0x10\n\tIN_CLASSC_HOST                 = 0xff\n\tIN_CLASSC_NET                  = 0xffffff00\n\tIN_CLASSC_NSHIFT               = 0x8\n\tIN_CLASSD_HOST                 = 0xfffffff\n\tIN_CLASSD_NET                  = 0xf0000000\n\tIN_CLASSD_NSHIFT               = 0x1c\n\tIN_LOOPBACKNET                 = 0x7f\n\tIN_RFC3021_MASK                = 0xfffffffe\n\tIPPROTO_3PC                    = 0x22\n\tIPPROTO_ADFS                   = 0x44\n\tIPPROTO_AH                     = 0x33\n\tIPPROTO_AHIP                   = 0x3d\n\tIPPROTO_APES                   = 0x63\n\tIPPROTO_ARGUS                  = 0xd\n\tIPPROTO_AX25                   = 0x5d\n\tIPPROTO_BHA                    = 0x31\n\tIPPROTO_BLT                    = 0x1e\n\tIPPROTO_BRSATMON               = 0x4c\n\tIPPROTO_CARP                   = 0x70\n\tIPPROTO_CFTP                   = 0x3e\n\tIPPROTO_CHAOS                  = 0x10\n\tIPPROTO_CMTP                   = 0x26\n\tIPPROTO_CPHB                   = 0x49\n\tIPPROTO_CPNX                   = 0x48\n\tIPPROTO_DCCP                   = 0x21\n\tIPPROTO_DDP                    = 0x25\n\tIPPROTO_DGP                    = 0x56\n\tIPPROTO_DIVERT                 = 0x102\n\tIPPROTO_DONE                   = 0x101\n\tIPPROTO_DSTOPTS                = 0x3c\n\tIPPROTO_EGP                    = 0x8\n\tIPPROTO_EMCON                  = 0xe\n\tIPPROTO_ENCAP                  = 0x62\n\tIPPROTO_EON                    = 0x50\n\tIPPROTO_ESP                    = 0x32\n\tIPPROTO_ETHERIP                = 0x61\n\tIPPROTO_FRAGMENT               = 0x2c\n\tIPPROTO_GGP                    = 0x3\n\tIPPROTO_GMTP                   = 0x64\n\tIPPROTO_GRE                    = 0x2f\n\tIPPROTO_HELLO                  = 0x3f\n\tIPPROTO_HIP                    = 0x8b\n\tIPPROTO_HMP                    = 0x14\n\tIPPROTO_HOPOPTS                = 0x0\n\tIPPROTO_ICMP                   = 0x1\n\tIPPROTO_ICMPV6                 = 0x3a\n\tIPPROTO_IDP                    = 0x16\n\tIPPROTO_IDPR                   = 0x23\n\tIPPROTO_IDRP                   = 0x2d\n\tIPPROTO_IGMP                   = 0x2\n\tIPPROTO_IGP                    = 0x55\n\tIPPROTO_IGRP                   = 0x58\n\tIPPROTO_IL                     = 0x28\n\tIPPROTO_INLSP                  = 0x34\n\tIPPROTO_INP                    = 0x20\n\tIPPROTO_IP                     = 0x0\n\tIPPROTO_IPCOMP                 = 0x6c\n\tIPPROTO_IPCV                   = 0x47\n\tIPPROTO_IPEIP                  = 0x5e\n\tIPPROTO_IPIP                   = 0x4\n\tIPPROTO_IPPC                   = 0x43\n\tIPPROTO_IPV4                   = 0x4\n\tIPPROTO_IPV6                   = 0x29\n\tIPPROTO_IRTP                   = 0x1c\n\tIPPROTO_KRYPTOLAN              = 0x41\n\tIPPROTO_LARP                   = 0x5b\n\tIPPROTO_LEAF1                  = 0x19\n\tIPPROTO_LEAF2                  = 0x1a\n\tIPPROTO_MAX                    = 0x100\n\tIPPROTO_MEAS                   = 0x13\n\tIPPROTO_MH                     = 0x87\n\tIPPROTO_MHRP                   = 0x30\n\tIPPROTO_MICP                   = 0x5f\n\tIPPROTO_MOBILE                 = 0x37\n\tIPPROTO_MPLS                   = 0x89\n\tIPPROTO_MTP                    = 0x5c\n\tIPPROTO_MUX                    = 0x12\n\tIPPROTO_ND                     = 0x4d\n\tIPPROTO_NHRP                   = 0x36\n\tIPPROTO_NONE                   = 0x3b\n\tIPPROTO_NSP                    = 0x1f\n\tIPPROTO_NVPII                  = 0xb\n\tIPPROTO_OLD_DIVERT             = 0xfe\n\tIPPROTO_OSPFIGP                = 0x59\n\tIPPROTO_PFSYNC                 = 0xf0\n\tIPPROTO_PGM                    = 0x71\n\tIPPROTO_PIGP                   = 0x9\n\tIPPROTO_PIM                    = 0x67\n\tIPPROTO_PRM                    = 0x15\n\tIPPROTO_PUP                    = 0xc\n\tIPPROTO_PVP                    = 0x4b\n\tIPPROTO_RAW                    = 0xff\n\tIPPROTO_RCCMON                 = 0xa\n\tIPPROTO_RDP                    = 0x1b\n\tIPPROTO_RESERVED_253           = 0xfd\n\tIPPROTO_RESERVED_254           = 0xfe\n\tIPPROTO_ROUTING                = 0x2b\n\tIPPROTO_RSVP                   = 0x2e\n\tIPPROTO_RVD                    = 0x42\n\tIPPROTO_SATEXPAK               = 0x40\n\tIPPROTO_SATMON                 = 0x45\n\tIPPROTO_SCCSP                  = 0x60\n\tIPPROTO_SCTP                   = 0x84\n\tIPPROTO_SDRP                   = 0x2a\n\tIPPROTO_SEND                   = 0x103\n\tIPPROTO_SHIM6                  = 0x8c\n\tIPPROTO_SKIP                   = 0x39\n\tIPPROTO_SPACER                 = 0x7fff\n\tIPPROTO_SRPC                   = 0x5a\n\tIPPROTO_ST                     = 0x7\n\tIPPROTO_SVMTP                  = 0x52\n\tIPPROTO_SWIPE                  = 0x35\n\tIPPROTO_TCF                    = 0x57\n\tIPPROTO_TCP                    = 0x6\n\tIPPROTO_TLSP                   = 0x38\n\tIPPROTO_TP                     = 0x1d\n\tIPPROTO_TPXX                   = 0x27\n\tIPPROTO_TRUNK1                 = 0x17\n\tIPPROTO_TRUNK2                 = 0x18\n\tIPPROTO_TTP                    = 0x54\n\tIPPROTO_UDP                    = 0x11\n\tIPPROTO_UDPLITE                = 0x88\n\tIPPROTO_VINES                  = 0x53\n\tIPPROTO_VISA                   = 0x46\n\tIPPROTO_VMTP                   = 0x51\n\tIPPROTO_WBEXPAK                = 0x4f\n\tIPPROTO_WBMON                  = 0x4e\n\tIPPROTO_WSN                    = 0x4a\n\tIPPROTO_XNET                   = 0xf\n\tIPPROTO_XTP                    = 0x24\n\tIPV6_AUTOFLOWLABEL             = 0x3b\n\tIPV6_BINDANY                   = 0x40\n\tIPV6_BINDMULTI                 = 0x41\n\tIPV6_BINDV6ONLY                = 0x1b\n\tIPV6_CHECKSUM                  = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS    = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP    = 0x1\n\tIPV6_DEFHLIM                   = 0x40\n\tIPV6_DONTFRAG                  = 0x3e\n\tIPV6_DSTOPTS                   = 0x32\n\tIPV6_FLOWID                    = 0x43\n\tIPV6_FLOWINFO_MASK             = 0xffffff0f\n\tIPV6_FLOWLABEL_LEN             = 0x14\n\tIPV6_FLOWLABEL_MASK            = 0xffff0f00\n\tIPV6_FLOWTYPE                  = 0x44\n\tIPV6_FRAGTTL                   = 0x78\n\tIPV6_FW_ADD                    = 0x1e\n\tIPV6_FW_DEL                    = 0x1f\n\tIPV6_FW_FLUSH                  = 0x20\n\tIPV6_FW_GET                    = 0x22\n\tIPV6_FW_ZERO                   = 0x21\n\tIPV6_HLIMDEC                   = 0x1\n\tIPV6_HOPLIMIT                  = 0x2f\n\tIPV6_HOPOPTS                   = 0x31\n\tIPV6_IPSEC_POLICY              = 0x1c\n\tIPV6_JOIN_GROUP                = 0xc\n\tIPV6_LEAVE_GROUP               = 0xd\n\tIPV6_MAXHLIM                   = 0xff\n\tIPV6_MAXOPTHDR                 = 0x800\n\tIPV6_MAXPACKET                 = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER      = 0x200\n\tIPV6_MAX_MEMBERSHIPS           = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER       = 0x80\n\tIPV6_MMTU                      = 0x500\n\tIPV6_MSFILTER                  = 0x4a\n\tIPV6_MULTICAST_HOPS            = 0xa\n\tIPV6_MULTICAST_IF              = 0x9\n\tIPV6_MULTICAST_LOOP            = 0xb\n\tIPV6_NEXTHOP                   = 0x30\n\tIPV6_ORIGDSTADDR               = 0x48\n\tIPV6_PATHMTU                   = 0x2c\n\tIPV6_PKTINFO                   = 0x2e\n\tIPV6_PORTRANGE                 = 0xe\n\tIPV6_PORTRANGE_DEFAULT         = 0x0\n\tIPV6_PORTRANGE_HIGH            = 0x1\n\tIPV6_PORTRANGE_LOW             = 0x2\n\tIPV6_PREFER_TEMPADDR           = 0x3f\n\tIPV6_RECVDSTOPTS               = 0x28\n\tIPV6_RECVFLOWID                = 0x46\n\tIPV6_RECVHOPLIMIT              = 0x25\n\tIPV6_RECVHOPOPTS               = 0x27\n\tIPV6_RECVORIGDSTADDR           = 0x48\n\tIPV6_RECVPATHMTU               = 0x2b\n\tIPV6_RECVPKTINFO               = 0x24\n\tIPV6_RECVRSSBUCKETID           = 0x47\n\tIPV6_RECVRTHDR                 = 0x26\n\tIPV6_RECVTCLASS                = 0x39\n\tIPV6_RSSBUCKETID               = 0x45\n\tIPV6_RSS_LISTEN_BUCKET         = 0x42\n\tIPV6_RTHDR                     = 0x33\n\tIPV6_RTHDRDSTOPTS              = 0x23\n\tIPV6_RTHDR_LOOSE               = 0x0\n\tIPV6_RTHDR_STRICT              = 0x1\n\tIPV6_RTHDR_TYPE_0              = 0x0\n\tIPV6_SOCKOPT_RESERVED1         = 0x3\n\tIPV6_TCLASS                    = 0x3d\n\tIPV6_UNICAST_HOPS              = 0x4\n\tIPV6_USE_MIN_MTU               = 0x2a\n\tIPV6_V6ONLY                    = 0x1b\n\tIPV6_VERSION                   = 0x60\n\tIPV6_VERSION_MASK              = 0xf0\n\tIPV6_VLAN_PCP                  = 0x4b\n\tIP_ADD_MEMBERSHIP              = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP       = 0x46\n\tIP_BINDANY                     = 0x18\n\tIP_BINDMULTI                   = 0x19\n\tIP_BLOCK_SOURCE                = 0x48\n\tIP_DEFAULT_MULTICAST_LOOP      = 0x1\n\tIP_DEFAULT_MULTICAST_TTL       = 0x1\n\tIP_DF                          = 0x4000\n\tIP_DONTFRAG                    = 0x43\n\tIP_DROP_MEMBERSHIP             = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP      = 0x47\n\tIP_DUMMYNET3                   = 0x31\n\tIP_DUMMYNET_CONFIGURE          = 0x3c\n\tIP_DUMMYNET_DEL                = 0x3d\n\tIP_DUMMYNET_FLUSH              = 0x3e\n\tIP_DUMMYNET_GET                = 0x40\n\tIP_FLOWID                      = 0x5a\n\tIP_FLOWTYPE                    = 0x5b\n\tIP_FW3                         = 0x30\n\tIP_FW_ADD                      = 0x32\n\tIP_FW_DEL                      = 0x33\n\tIP_FW_FLUSH                    = 0x34\n\tIP_FW_GET                      = 0x36\n\tIP_FW_NAT_CFG                  = 0x38\n\tIP_FW_NAT_DEL                  = 0x39\n\tIP_FW_NAT_GET_CONFIG           = 0x3a\n\tIP_FW_NAT_GET_LOG              = 0x3b\n\tIP_FW_RESETLOG                 = 0x37\n\tIP_FW_TABLE_ADD                = 0x28\n\tIP_FW_TABLE_DEL                = 0x29\n\tIP_FW_TABLE_FLUSH              = 0x2a\n\tIP_FW_TABLE_GETSIZE            = 0x2b\n\tIP_FW_TABLE_LIST               = 0x2c\n\tIP_FW_ZERO                     = 0x35\n\tIP_HDRINCL                     = 0x2\n\tIP_IPSEC_POLICY                = 0x15\n\tIP_MAXPACKET                   = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER        = 0x200\n\tIP_MAX_MEMBERSHIPS             = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER        = 0x80\n\tIP_MAX_SOCK_SRC_FILTER         = 0x80\n\tIP_MF                          = 0x2000\n\tIP_MINTTL                      = 0x42\n\tIP_MSFILTER                    = 0x4a\n\tIP_MSS                         = 0x240\n\tIP_MULTICAST_IF                = 0x9\n\tIP_MULTICAST_LOOP              = 0xb\n\tIP_MULTICAST_TTL               = 0xa\n\tIP_MULTICAST_VIF               = 0xe\n\tIP_OFFMASK                     = 0x1fff\n\tIP_ONESBCAST                   = 0x17\n\tIP_OPTIONS                     = 0x1\n\tIP_ORIGDSTADDR                 = 0x1b\n\tIP_PORTRANGE                   = 0x13\n\tIP_PORTRANGE_DEFAULT           = 0x0\n\tIP_PORTRANGE_HIGH              = 0x1\n\tIP_PORTRANGE_LOW               = 0x2\n\tIP_RECVDSTADDR                 = 0x7\n\tIP_RECVFLOWID                  = 0x5d\n\tIP_RECVIF                      = 0x14\n\tIP_RECVOPTS                    = 0x5\n\tIP_RECVORIGDSTADDR             = 0x1b\n\tIP_RECVRETOPTS                 = 0x6\n\tIP_RECVRSSBUCKETID             = 0x5e\n\tIP_RECVTOS                     = 0x44\n\tIP_RECVTTL                     = 0x41\n\tIP_RETOPTS                     = 0x8\n\tIP_RF                          = 0x8000\n\tIP_RSSBUCKETID                 = 0x5c\n\tIP_RSS_LISTEN_BUCKET           = 0x1a\n\tIP_RSVP_OFF                    = 0x10\n\tIP_RSVP_ON                     = 0xf\n\tIP_RSVP_VIF_OFF                = 0x12\n\tIP_RSVP_VIF_ON                 = 0x11\n\tIP_SENDSRCADDR                 = 0x7\n\tIP_TOS                         = 0x3\n\tIP_TTL                         = 0x4\n\tIP_UNBLOCK_SOURCE              = 0x49\n\tIP_VLAN_PCP                    = 0x4b\n\tISIG                           = 0x80\n\tISTRIP                         = 0x20\n\tITIMER_PROF                    = 0x2\n\tITIMER_REAL                    = 0x0\n\tITIMER_VIRTUAL                 = 0x1\n\tIXANY                          = 0x800\n\tIXOFF                          = 0x400\n\tIXON                           = 0x200\n\tKERN_HOSTNAME                  = 0xa\n\tKERN_OSRELEASE                 = 0x2\n\tKERN_OSTYPE                    = 0x1\n\tKERN_VERSION                   = 0x4\n\tLOCAL_CONNWAIT                 = 0x4\n\tLOCAL_CREDS                    = 0x2\n\tLOCAL_PEERCRED                 = 0x1\n\tLOCAL_VENDOR                   = 0x80000000\n\tLOCK_EX                        = 0x2\n\tLOCK_NB                        = 0x4\n\tLOCK_SH                        = 0x1\n\tLOCK_UN                        = 0x8\n\tMADV_AUTOSYNC                  = 0x7\n\tMADV_CORE                      = 0x9\n\tMADV_DONTNEED                  = 0x4\n\tMADV_FREE                      = 0x5\n\tMADV_NOCORE                    = 0x8\n\tMADV_NORMAL                    = 0x0\n\tMADV_NOSYNC                    = 0x6\n\tMADV_PROTECT                   = 0xa\n\tMADV_RANDOM                    = 0x1\n\tMADV_SEQUENTIAL                = 0x2\n\tMADV_WILLNEED                  = 0x3\n\tMAP_ALIGNED_SUPER              = 0x1000000\n\tMAP_ALIGNMENT_MASK             = -0x1000000\n\tMAP_ALIGNMENT_SHIFT            = 0x18\n\tMAP_ANON                       = 0x1000\n\tMAP_ANONYMOUS                  = 0x1000\n\tMAP_COPY                       = 0x2\n\tMAP_EXCL                       = 0x4000\n\tMAP_FILE                       = 0x0\n\tMAP_FIXED                      = 0x10\n\tMAP_GUARD                      = 0x2000\n\tMAP_HASSEMAPHORE               = 0x200\n\tMAP_NOCORE                     = 0x20000\n\tMAP_NOSYNC                     = 0x800\n\tMAP_PREFAULT_READ              = 0x40000\n\tMAP_PRIVATE                    = 0x2\n\tMAP_RESERVED0020               = 0x20\n\tMAP_RESERVED0040               = 0x40\n\tMAP_RESERVED0080               = 0x80\n\tMAP_RESERVED0100               = 0x100\n\tMAP_SHARED                     = 0x1\n\tMAP_STACK                      = 0x400\n\tMCAST_BLOCK_SOURCE             = 0x54\n\tMCAST_EXCLUDE                  = 0x2\n\tMCAST_INCLUDE                  = 0x1\n\tMCAST_JOIN_GROUP               = 0x50\n\tMCAST_JOIN_SOURCE_GROUP        = 0x52\n\tMCAST_LEAVE_GROUP              = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP       = 0x53\n\tMCAST_UNBLOCK_SOURCE           = 0x55\n\tMCAST_UNDEFINED                = 0x0\n\tMCL_CURRENT                    = 0x1\n\tMCL_FUTURE                     = 0x2\n\tMNT_ACLS                       = 0x8000000\n\tMNT_ASYNC                      = 0x40\n\tMNT_AUTOMOUNTED                = 0x200000000\n\tMNT_BYFSID                     = 0x8000000\n\tMNT_CMDFLAGS                   = 0xd0f0000\n\tMNT_DEFEXPORTED                = 0x200\n\tMNT_DELEXPORT                  = 0x20000\n\tMNT_EXKERB                     = 0x800\n\tMNT_EXPORTANON                 = 0x400\n\tMNT_EXPORTED                   = 0x100\n\tMNT_EXPUBLIC                   = 0x20000000\n\tMNT_EXRDONLY                   = 0x80\n\tMNT_FORCE                      = 0x80000\n\tMNT_GJOURNAL                   = 0x2000000\n\tMNT_IGNORE                     = 0x800000\n\tMNT_LAZY                       = 0x3\n\tMNT_LOCAL                      = 0x1000\n\tMNT_MULTILABEL                 = 0x4000000\n\tMNT_NFS4ACLS                   = 0x10\n\tMNT_NOATIME                    = 0x10000000\n\tMNT_NOCLUSTERR                 = 0x40000000\n\tMNT_NOCLUSTERW                 = 0x80000000\n\tMNT_NOEXEC                     = 0x4\n\tMNT_NONBUSY                    = 0x4000000\n\tMNT_NOSUID                     = 0x8\n\tMNT_NOSYMFOLLOW                = 0x400000\n\tMNT_NOWAIT                     = 0x2\n\tMNT_QUOTA                      = 0x2000\n\tMNT_RDONLY                     = 0x1\n\tMNT_RELOAD                     = 0x40000\n\tMNT_ROOTFS                     = 0x4000\n\tMNT_SNAPSHOT                   = 0x1000000\n\tMNT_SOFTDEP                    = 0x200000\n\tMNT_SUIDDIR                    = 0x100000\n\tMNT_SUJ                        = 0x100000000\n\tMNT_SUSPEND                    = 0x4\n\tMNT_SYNCHRONOUS                = 0x2\n\tMNT_UNION                      = 0x20\n\tMNT_UNTRUSTED                  = 0x800000000\n\tMNT_UPDATE                     = 0x10000\n\tMNT_UPDATEMASK                 = 0xad8d0807e\n\tMNT_USER                       = 0x8000\n\tMNT_VERIFIED                   = 0x400000000\n\tMNT_VISFLAGMASK                = 0xffef0ffff\n\tMNT_WAIT                       = 0x1\n\tMSG_CMSG_CLOEXEC               = 0x40000\n\tMSG_COMPAT                     = 0x8000\n\tMSG_CTRUNC                     = 0x20\n\tMSG_DONTROUTE                  = 0x4\n\tMSG_DONTWAIT                   = 0x80\n\tMSG_EOF                        = 0x100\n\tMSG_EOR                        = 0x8\n\tMSG_NBIO                       = 0x4000\n\tMSG_NOSIGNAL                   = 0x20000\n\tMSG_NOTIFICATION               = 0x2000\n\tMSG_OOB                        = 0x1\n\tMSG_PEEK                       = 0x2\n\tMSG_TRUNC                      = 0x10\n\tMSG_WAITALL                    = 0x40\n\tMSG_WAITFORONE                 = 0x80000\n\tMS_ASYNC                       = 0x1\n\tMS_INVALIDATE                  = 0x2\n\tMS_SYNC                        = 0x0\n\tNAME_MAX                       = 0xff\n\tNET_RT_DUMP                    = 0x1\n\tNET_RT_FLAGS                   = 0x2\n\tNET_RT_IFLIST                  = 0x3\n\tNET_RT_IFLISTL                 = 0x5\n\tNET_RT_IFMALIST                = 0x4\n\tNFDBITS                        = 0x20\n\tNOFLSH                         = 0x80000000\n\tNOKERNINFO                     = 0x2000000\n\tNOTE_ABSTIME                   = 0x10\n\tNOTE_ATTRIB                    = 0x8\n\tNOTE_CHILD                     = 0x4\n\tNOTE_CLOSE                     = 0x100\n\tNOTE_CLOSE_WRITE               = 0x200\n\tNOTE_DELETE                    = 0x1\n\tNOTE_EXEC                      = 0x20000000\n\tNOTE_EXIT                      = 0x80000000\n\tNOTE_EXTEND                    = 0x4\n\tNOTE_FFAND                     = 0x40000000\n\tNOTE_FFCOPY                    = 0xc0000000\n\tNOTE_FFCTRLMASK                = 0xc0000000\n\tNOTE_FFLAGSMASK                = 0xffffff\n\tNOTE_FFNOP                     = 0x0\n\tNOTE_FFOR                      = 0x80000000\n\tNOTE_FILE_POLL                 = 0x2\n\tNOTE_FORK                      = 0x40000000\n\tNOTE_LINK                      = 0x10\n\tNOTE_LOWAT                     = 0x1\n\tNOTE_MSECONDS                  = 0x2\n\tNOTE_NSECONDS                  = 0x8\n\tNOTE_OPEN                      = 0x80\n\tNOTE_PCTRLMASK                 = 0xf0000000\n\tNOTE_PDATAMASK                 = 0xfffff\n\tNOTE_READ                      = 0x400\n\tNOTE_RENAME                    = 0x20\n\tNOTE_REVOKE                    = 0x40\n\tNOTE_SECONDS                   = 0x1\n\tNOTE_TRACK                     = 0x1\n\tNOTE_TRACKERR                  = 0x2\n\tNOTE_TRIGGER                   = 0x1000000\n\tNOTE_USECONDS                  = 0x4\n\tNOTE_WRITE                     = 0x2\n\tOCRNL                          = 0x10\n\tONLCR                          = 0x2\n\tONLRET                         = 0x40\n\tONOCR                          = 0x20\n\tONOEOT                         = 0x8\n\tOPOST                          = 0x1\n\tOXTABS                         = 0x4\n\tO_ACCMODE                      = 0x3\n\tO_APPEND                       = 0x8\n\tO_ASYNC                        = 0x40\n\tO_CLOEXEC                      = 0x100000\n\tO_CREAT                        = 0x200\n\tO_DIRECT                       = 0x10000\n\tO_DIRECTORY                    = 0x20000\n\tO_EXCL                         = 0x800\n\tO_EXEC                         = 0x40000\n\tO_EXLOCK                       = 0x20\n\tO_FSYNC                        = 0x80\n\tO_NDELAY                       = 0x4\n\tO_NOCTTY                       = 0x8000\n\tO_NOFOLLOW                     = 0x100\n\tO_NONBLOCK                     = 0x4\n\tO_RDONLY                       = 0x0\n\tO_RDWR                         = 0x2\n\tO_RESOLVE_BENEATH              = 0x800000\n\tO_SEARCH                       = 0x40000\n\tO_SHLOCK                       = 0x10\n\tO_SYNC                         = 0x80\n\tO_TRUNC                        = 0x400\n\tO_TTY_INIT                     = 0x80000\n\tO_VERIFY                       = 0x200000\n\tO_WRONLY                       = 0x1\n\tPARENB                         = 0x1000\n\tPARMRK                         = 0x8\n\tPARODD                         = 0x2000\n\tPENDIN                         = 0x20000000\n\tPIOD_READ_D                    = 0x1\n\tPIOD_READ_I                    = 0x3\n\tPIOD_WRITE_D                   = 0x2\n\tPIOD_WRITE_I                   = 0x4\n\tPRIO_PGRP                      = 0x1\n\tPRIO_PROCESS                   = 0x0\n\tPRIO_USER                      = 0x2\n\tPROT_EXEC                      = 0x4\n\tPROT_NONE                      = 0x0\n\tPROT_READ                      = 0x1\n\tPROT_WRITE                     = 0x2\n\tPTRACE_DEFAULT                 = 0x1\n\tPTRACE_EXEC                    = 0x1\n\tPTRACE_FORK                    = 0x8\n\tPTRACE_LWP                     = 0x10\n\tPTRACE_SCE                     = 0x2\n\tPTRACE_SCX                     = 0x4\n\tPTRACE_SYSCALL                 = 0x6\n\tPTRACE_VFORK                   = 0x20\n\tPT_ATTACH                      = 0xa\n\tPT_CLEARSTEP                   = 0x10\n\tPT_CONTINUE                    = 0x7\n\tPT_DETACH                      = 0xb\n\tPT_FIRSTMACH                   = 0x40\n\tPT_FOLLOW_FORK                 = 0x17\n\tPT_GETDBREGS                   = 0x25\n\tPT_GETFPREGS                   = 0x23\n\tPT_GETLWPLIST                  = 0xf\n\tPT_GETNUMLWPS                  = 0xe\n\tPT_GETREGS                     = 0x21\n\tPT_GETVFPREGS                  = 0x40\n\tPT_GET_EVENT_MASK              = 0x19\n\tPT_GET_SC_ARGS                 = 0x1b\n\tPT_GET_SC_RET                  = 0x1c\n\tPT_IO                          = 0xc\n\tPT_KILL                        = 0x8\n\tPT_LWPINFO                     = 0xd\n\tPT_LWP_EVENTS                  = 0x18\n\tPT_READ_D                      = 0x2\n\tPT_READ_I                      = 0x1\n\tPT_RESUME                      = 0x13\n\tPT_SETDBREGS                   = 0x26\n\tPT_SETFPREGS                   = 0x24\n\tPT_SETREGS                     = 0x22\n\tPT_SETSTEP                     = 0x11\n\tPT_SETVFPREGS                  = 0x41\n\tPT_SET_EVENT_MASK              = 0x1a\n\tPT_STEP                        = 0x9\n\tPT_SUSPEND                     = 0x12\n\tPT_SYSCALL                     = 0x16\n\tPT_TO_SCE                      = 0x14\n\tPT_TO_SCX                      = 0x15\n\tPT_TRACE_ME                    = 0x0\n\tPT_VM_ENTRY                    = 0x29\n\tPT_VM_TIMESTAMP                = 0x28\n\tPT_WRITE_D                     = 0x5\n\tPT_WRITE_I                     = 0x4\n\tP_ZONEID                       = 0xc\n\tRLIMIT_AS                      = 0xa\n\tRLIMIT_CORE                    = 0x4\n\tRLIMIT_CPU                     = 0x0\n\tRLIMIT_DATA                    = 0x2\n\tRLIMIT_FSIZE                   = 0x1\n\tRLIMIT_MEMLOCK                 = 0x6\n\tRLIMIT_NOFILE                  = 0x8\n\tRLIMIT_NPROC                   = 0x7\n\tRLIMIT_RSS                     = 0x5\n\tRLIMIT_STACK                   = 0x3\n\tRLIM_INFINITY                  = 0x7fffffffffffffff\n\tRTAX_AUTHOR                    = 0x6\n\tRTAX_BRD                       = 0x7\n\tRTAX_DST                       = 0x0\n\tRTAX_GATEWAY                   = 0x1\n\tRTAX_GENMASK                   = 0x3\n\tRTAX_IFA                       = 0x5\n\tRTAX_IFP                       = 0x4\n\tRTAX_MAX                       = 0x8\n\tRTAX_NETMASK                   = 0x2\n\tRTA_AUTHOR                     = 0x40\n\tRTA_BRD                        = 0x80\n\tRTA_DST                        = 0x1\n\tRTA_GATEWAY                    = 0x2\n\tRTA_GENMASK                    = 0x8\n\tRTA_IFA                        = 0x20\n\tRTA_IFP                        = 0x10\n\tRTA_NETMASK                    = 0x4\n\tRTF_BLACKHOLE                  = 0x1000\n\tRTF_BROADCAST                  = 0x400000\n\tRTF_DONE                       = 0x40\n\tRTF_DYNAMIC                    = 0x10\n\tRTF_FIXEDMTU                   = 0x80000\n\tRTF_FMASK                      = 0x1004d808\n\tRTF_GATEWAY                    = 0x2\n\tRTF_GWFLAG_COMPAT              = 0x80000000\n\tRTF_HOST                       = 0x4\n\tRTF_LLDATA                     = 0x400\n\tRTF_LLINFO                     = 0x400\n\tRTF_LOCAL                      = 0x200000\n\tRTF_MODIFIED                   = 0x20\n\tRTF_MULTICAST                  = 0x800000\n\tRTF_PINNED                     = 0x100000\n\tRTF_PROTO1                     = 0x8000\n\tRTF_PROTO2                     = 0x4000\n\tRTF_PROTO3                     = 0x40000\n\tRTF_REJECT                     = 0x8\n\tRTF_RNH_LOCKED                 = 0x40000000\n\tRTF_STATIC                     = 0x800\n\tRTF_STICKY                     = 0x10000000\n\tRTF_UP                         = 0x1\n\tRTF_XRESOLVE                   = 0x200\n\tRTM_ADD                        = 0x1\n\tRTM_CHANGE                     = 0x3\n\tRTM_DELADDR                    = 0xd\n\tRTM_DELETE                     = 0x2\n\tRTM_DELMADDR                   = 0x10\n\tRTM_GET                        = 0x4\n\tRTM_IEEE80211                  = 0x12\n\tRTM_IFANNOUNCE                 = 0x11\n\tRTM_IFINFO                     = 0xe\n\tRTM_LOCK                       = 0x8\n\tRTM_LOSING                     = 0x5\n\tRTM_MISS                       = 0x7\n\tRTM_NEWADDR                    = 0xc\n\tRTM_NEWMADDR                   = 0xf\n\tRTM_REDIRECT                   = 0x6\n\tRTM_RESOLVE                    = 0xb\n\tRTM_RTTUNIT                    = 0xf4240\n\tRTM_VERSION                    = 0x5\n\tRTV_EXPIRE                     = 0x4\n\tRTV_HOPCOUNT                   = 0x2\n\tRTV_MTU                        = 0x1\n\tRTV_RPIPE                      = 0x8\n\tRTV_RTT                        = 0x40\n\tRTV_RTTVAR                     = 0x80\n\tRTV_SPIPE                      = 0x10\n\tRTV_SSTHRESH                   = 0x20\n\tRTV_WEIGHT                     = 0x100\n\tRT_ALL_FIBS                    = -0x1\n\tRT_BLACKHOLE                   = 0x40\n\tRT_DEFAULT_FIB                 = 0x0\n\tRT_HAS_GW                      = 0x80\n\tRT_HAS_HEADER                  = 0x10\n\tRT_HAS_HEADER_BIT              = 0x4\n\tRT_L2_ME                       = 0x4\n\tRT_L2_ME_BIT                   = 0x2\n\tRT_LLE_CACHE                   = 0x100\n\tRT_MAY_LOOP                    = 0x8\n\tRT_MAY_LOOP_BIT                = 0x3\n\tRT_REJECT                      = 0x20\n\tRUSAGE_CHILDREN                = -0x1\n\tRUSAGE_SELF                    = 0x0\n\tRUSAGE_THREAD                  = 0x1\n\tSCM_BINTIME                    = 0x4\n\tSCM_CREDS                      = 0x3\n\tSCM_MONOTONIC                  = 0x6\n\tSCM_REALTIME                   = 0x5\n\tSCM_RIGHTS                     = 0x1\n\tSCM_TIMESTAMP                  = 0x2\n\tSCM_TIME_INFO                  = 0x7\n\tSEEK_CUR                       = 0x1\n\tSEEK_DATA                      = 0x3\n\tSEEK_END                       = 0x2\n\tSEEK_HOLE                      = 0x4\n\tSEEK_SET                       = 0x0\n\tSHUT_RD                        = 0x0\n\tSHUT_RDWR                      = 0x2\n\tSHUT_WR                        = 0x1\n\tSIOCADDMULTI                   = 0x80206931\n\tSIOCAIFADDR                    = 0x8040691a\n\tSIOCAIFGROUP                   = 0x80246987\n\tSIOCATMARK                     = 0x40047307\n\tSIOCDELMULTI                   = 0x80206932\n\tSIOCDIFADDR                    = 0x80206919\n\tSIOCDIFGROUP                   = 0x80246989\n\tSIOCDIFPHYADDR                 = 0x80206949\n\tSIOCGDRVSPEC                   = 0xc01c697b\n\tSIOCGETSGCNT                   = 0xc0147210\n\tSIOCGETVIFCNT                  = 0xc014720f\n\tSIOCGHIWAT                     = 0x40047301\n\tSIOCGHWADDR                    = 0xc020693e\n\tSIOCGI2C                       = 0xc020693d\n\tSIOCGIFADDR                    = 0xc0206921\n\tSIOCGIFALIAS                   = 0xc044692d\n\tSIOCGIFBRDADDR                 = 0xc0206923\n\tSIOCGIFCAP                     = 0xc020691f\n\tSIOCGIFCONF                    = 0xc0086924\n\tSIOCGIFDESCR                   = 0xc020692a\n\tSIOCGIFDOWNREASON              = 0xc058699a\n\tSIOCGIFDSTADDR                 = 0xc0206922\n\tSIOCGIFFIB                     = 0xc020695c\n\tSIOCGIFFLAGS                   = 0xc0206911\n\tSIOCGIFGENERIC                 = 0xc020693a\n\tSIOCGIFGMEMB                   = 0xc024698a\n\tSIOCGIFGROUP                   = 0xc0246988\n\tSIOCGIFINDEX                   = 0xc0206920\n\tSIOCGIFMAC                     = 0xc0206926\n\tSIOCGIFMEDIA                   = 0xc0286938\n\tSIOCGIFMETRIC                  = 0xc0206917\n\tSIOCGIFMTU                     = 0xc0206933\n\tSIOCGIFNETMASK                 = 0xc0206925\n\tSIOCGIFPDSTADDR                = 0xc0206948\n\tSIOCGIFPHYS                    = 0xc0206935\n\tSIOCGIFPSRCADDR                = 0xc0206947\n\tSIOCGIFRSSHASH                 = 0xc0186997\n\tSIOCGIFRSSKEY                  = 0xc0946996\n\tSIOCGIFSTATUS                  = 0xc331693b\n\tSIOCGIFXMEDIA                  = 0xc028698b\n\tSIOCGLANPCP                    = 0xc0206998\n\tSIOCGLOWAT                     = 0x40047303\n\tSIOCGPGRP                      = 0x40047309\n\tSIOCGPRIVATE_0                 = 0xc0206950\n\tSIOCGPRIVATE_1                 = 0xc0206951\n\tSIOCGTUNFIB                    = 0xc020695e\n\tSIOCIFCREATE                   = 0xc020697a\n\tSIOCIFCREATE2                  = 0xc020697c\n\tSIOCIFDESTROY                  = 0x80206979\n\tSIOCIFGCLONERS                 = 0xc00c6978\n\tSIOCSDRVSPEC                   = 0x801c697b\n\tSIOCSHIWAT                     = 0x80047300\n\tSIOCSIFADDR                    = 0x8020690c\n\tSIOCSIFBRDADDR                 = 0x80206913\n\tSIOCSIFCAP                     = 0x8020691e\n\tSIOCSIFDESCR                   = 0x80206929\n\tSIOCSIFDSTADDR                 = 0x8020690e\n\tSIOCSIFFIB                     = 0x8020695d\n\tSIOCSIFFLAGS                   = 0x80206910\n\tSIOCSIFGENERIC                 = 0x80206939\n\tSIOCSIFLLADDR                  = 0x8020693c\n\tSIOCSIFMAC                     = 0x80206927\n\tSIOCSIFMEDIA                   = 0xc0206937\n\tSIOCSIFMETRIC                  = 0x80206918\n\tSIOCSIFMTU                     = 0x80206934\n\tSIOCSIFNAME                    = 0x80206928\n\tSIOCSIFNETMASK                 = 0x80206916\n\tSIOCSIFPHYADDR                 = 0x80406946\n\tSIOCSIFPHYS                    = 0x80206936\n\tSIOCSIFRVNET                   = 0xc020695b\n\tSIOCSIFVNET                    = 0xc020695a\n\tSIOCSLANPCP                    = 0x80206999\n\tSIOCSLOWAT                     = 0x80047302\n\tSIOCSPGRP                      = 0x80047308\n\tSIOCSTUNFIB                    = 0x8020695f\n\tSOCK_CLOEXEC                   = 0x10000000\n\tSOCK_DGRAM                     = 0x2\n\tSOCK_MAXADDRLEN                = 0xff\n\tSOCK_NONBLOCK                  = 0x20000000\n\tSOCK_RAW                       = 0x3\n\tSOCK_RDM                       = 0x4\n\tSOCK_SEQPACKET                 = 0x5\n\tSOCK_STREAM                    = 0x1\n\tSOL_LOCAL                      = 0x0\n\tSOL_SOCKET                     = 0xffff\n\tSOMAXCONN                      = 0x80\n\tSO_ACCEPTCONN                  = 0x2\n\tSO_ACCEPTFILTER                = 0x1000\n\tSO_BINTIME                     = 0x2000\n\tSO_BROADCAST                   = 0x20\n\tSO_DEBUG                       = 0x1\n\tSO_DOMAIN                      = 0x1019\n\tSO_DONTROUTE                   = 0x10\n\tSO_ERROR                       = 0x1007\n\tSO_KEEPALIVE                   = 0x8\n\tSO_LABEL                       = 0x1009\n\tSO_LINGER                      = 0x80\n\tSO_LISTENINCQLEN               = 0x1013\n\tSO_LISTENQLEN                  = 0x1012\n\tSO_LISTENQLIMIT                = 0x1011\n\tSO_MAX_PACING_RATE             = 0x1018\n\tSO_NOSIGPIPE                   = 0x800\n\tSO_NO_DDP                      = 0x8000\n\tSO_NO_OFFLOAD                  = 0x4000\n\tSO_OOBINLINE                   = 0x100\n\tSO_PEERLABEL                   = 0x1010\n\tSO_PROTOCOL                    = 0x1016\n\tSO_PROTOTYPE                   = 0x1016\n\tSO_RCVBUF                      = 0x1002\n\tSO_RCVLOWAT                    = 0x1004\n\tSO_RCVTIMEO                    = 0x1006\n\tSO_RERROR                      = 0x20000\n\tSO_REUSEADDR                   = 0x4\n\tSO_REUSEPORT                   = 0x200\n\tSO_REUSEPORT_LB                = 0x10000\n\tSO_SETFIB                      = 0x1014\n\tSO_SNDBUF                      = 0x1001\n\tSO_SNDLOWAT                    = 0x1003\n\tSO_SNDTIMEO                    = 0x1005\n\tSO_TIMESTAMP                   = 0x400\n\tSO_TS_BINTIME                  = 0x1\n\tSO_TS_CLOCK                    = 0x1017\n\tSO_TS_CLOCK_MAX                = 0x3\n\tSO_TS_DEFAULT                  = 0x0\n\tSO_TS_MONOTONIC                = 0x3\n\tSO_TS_REALTIME                 = 0x2\n\tSO_TS_REALTIME_MICRO           = 0x0\n\tSO_TYPE                        = 0x1008\n\tSO_USELOOPBACK                 = 0x40\n\tSO_USER_COOKIE                 = 0x1015\n\tSO_VENDOR                      = 0x80000000\n\tS_BLKSIZE                      = 0x200\n\tS_IEXEC                        = 0x40\n\tS_IFBLK                        = 0x6000\n\tS_IFCHR                        = 0x2000\n\tS_IFDIR                        = 0x4000\n\tS_IFIFO                        = 0x1000\n\tS_IFLNK                        = 0xa000\n\tS_IFMT                         = 0xf000\n\tS_IFREG                        = 0x8000\n\tS_IFSOCK                       = 0xc000\n\tS_IFWHT                        = 0xe000\n\tS_IREAD                        = 0x100\n\tS_IRGRP                        = 0x20\n\tS_IROTH                        = 0x4\n\tS_IRUSR                        = 0x100\n\tS_IRWXG                        = 0x38\n\tS_IRWXO                        = 0x7\n\tS_IRWXU                        = 0x1c0\n\tS_ISGID                        = 0x400\n\tS_ISTXT                        = 0x200\n\tS_ISUID                        = 0x800\n\tS_ISVTX                        = 0x200\n\tS_IWGRP                        = 0x10\n\tS_IWOTH                        = 0x2\n\tS_IWRITE                       = 0x80\n\tS_IWUSR                        = 0x80\n\tS_IXGRP                        = 0x8\n\tS_IXOTH                        = 0x1\n\tS_IXUSR                        = 0x40\n\tTAB0                           = 0x0\n\tTAB3                           = 0x4\n\tTABDLY                         = 0x4\n\tTCIFLUSH                       = 0x1\n\tTCIOFF                         = 0x3\n\tTCIOFLUSH                      = 0x3\n\tTCION                          = 0x4\n\tTCOFLUSH                       = 0x2\n\tTCOOFF                         = 0x1\n\tTCOON                          = 0x2\n\tTCPOPT_EOL                     = 0x0\n\tTCPOPT_FAST_OPEN               = 0x22\n\tTCPOPT_MAXSEG                  = 0x2\n\tTCPOPT_NOP                     = 0x1\n\tTCPOPT_PAD                     = 0x0\n\tTCPOPT_SACK                    = 0x5\n\tTCPOPT_SACK_PERMITTED          = 0x4\n\tTCPOPT_SIGNATURE               = 0x13\n\tTCPOPT_TIMESTAMP               = 0x8\n\tTCPOPT_WINDOW                  = 0x3\n\tTCP_BBR_ACK_COMP_ALG           = 0x448\n\tTCP_BBR_ALGORITHM              = 0x43b\n\tTCP_BBR_DRAIN_INC_EXTRA        = 0x43c\n\tTCP_BBR_DRAIN_PG               = 0x42e\n\tTCP_BBR_EXTRA_GAIN             = 0x449\n\tTCP_BBR_EXTRA_STATE            = 0x453\n\tTCP_BBR_FLOOR_MIN_TSO          = 0x454\n\tTCP_BBR_HDWR_PACE              = 0x451\n\tTCP_BBR_HOLD_TARGET            = 0x436\n\tTCP_BBR_IWINTSO                = 0x42b\n\tTCP_BBR_LOWGAIN_FD             = 0x436\n\tTCP_BBR_LOWGAIN_HALF           = 0x435\n\tTCP_BBR_LOWGAIN_THRESH         = 0x434\n\tTCP_BBR_MAX_RTO                = 0x439\n\tTCP_BBR_MIN_RTO                = 0x438\n\tTCP_BBR_MIN_TOPACEOUT          = 0x455\n\tTCP_BBR_ONE_RETRAN             = 0x431\n\tTCP_BBR_PACE_CROSS             = 0x442\n\tTCP_BBR_PACE_DEL_TAR           = 0x43f\n\tTCP_BBR_PACE_OH                = 0x435\n\tTCP_BBR_PACE_PER_SEC           = 0x43e\n\tTCP_BBR_PACE_SEG_MAX           = 0x440\n\tTCP_BBR_PACE_SEG_MIN           = 0x441\n\tTCP_BBR_POLICER_DETECT         = 0x457\n\tTCP_BBR_PROBE_RTT_GAIN         = 0x44d\n\tTCP_BBR_PROBE_RTT_INT          = 0x430\n\tTCP_BBR_PROBE_RTT_LEN          = 0x44e\n\tTCP_BBR_RACK_RTT_USE           = 0x44a\n\tTCP_BBR_RECFORCE               = 0x42c\n\tTCP_BBR_REC_OVER_HPTS          = 0x43a\n\tTCP_BBR_RETRAN_WTSO            = 0x44b\n\tTCP_BBR_RWND_IS_APP            = 0x42f\n\tTCP_BBR_SEND_IWND_IN_TSO       = 0x44f\n\tTCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d\n\tTCP_BBR_STARTUP_LOSS_EXIT      = 0x432\n\tTCP_BBR_STARTUP_PG             = 0x42d\n\tTCP_BBR_TMR_PACE_OH            = 0x448\n\tTCP_BBR_TSLIMITS               = 0x434\n\tTCP_BBR_TSTMP_RAISES           = 0x456\n\tTCP_BBR_UNLIMITED              = 0x43b\n\tTCP_BBR_USEDEL_RATE            = 0x437\n\tTCP_BBR_USE_LOWGAIN            = 0x433\n\tTCP_BBR_USE_RACK_CHEAT         = 0x450\n\tTCP_BBR_UTTER_MAX_TSO          = 0x452\n\tTCP_CA_NAME_MAX                = 0x10\n\tTCP_CCALGOOPT                  = 0x41\n\tTCP_CONGESTION                 = 0x40\n\tTCP_DATA_AFTER_CLOSE           = 0x44c\n\tTCP_DELACK                     = 0x48\n\tTCP_FASTOPEN                   = 0x401\n\tTCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10\n\tTCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4\n\tTCP_FASTOPEN_PSK_LEN           = 0x10\n\tTCP_FUNCTION_BLK               = 0x2000\n\tTCP_FUNCTION_NAME_LEN_MAX      = 0x20\n\tTCP_INFO                       = 0x20\n\tTCP_KEEPCNT                    = 0x400\n\tTCP_KEEPIDLE                   = 0x100\n\tTCP_KEEPINIT                   = 0x80\n\tTCP_KEEPINTVL                  = 0x200\n\tTCP_LOG                        = 0x22\n\tTCP_LOGBUF                     = 0x23\n\tTCP_LOGDUMP                    = 0x25\n\tTCP_LOGDUMPID                  = 0x26\n\tTCP_LOGID                      = 0x24\n\tTCP_LOG_ID_LEN                 = 0x40\n\tTCP_MAXBURST                   = 0x4\n\tTCP_MAXHLEN                    = 0x3c\n\tTCP_MAXOLEN                    = 0x28\n\tTCP_MAXSEG                     = 0x2\n\tTCP_MAXWIN                     = 0xffff\n\tTCP_MAX_SACK                   = 0x4\n\tTCP_MAX_WINSHIFT               = 0xe\n\tTCP_MD5SIG                     = 0x10\n\tTCP_MINMSS                     = 0xd8\n\tTCP_MSS                        = 0x218\n\tTCP_NODELAY                    = 0x1\n\tTCP_NOOPT                      = 0x8\n\tTCP_NOPUSH                     = 0x4\n\tTCP_PCAP_IN                    = 0x1000\n\tTCP_PCAP_OUT                   = 0x800\n\tTCP_RACK_EARLY_RECOV           = 0x423\n\tTCP_RACK_EARLY_SEG             = 0x424\n\tTCP_RACK_GP_INCREASE           = 0x446\n\tTCP_RACK_IDLE_REDUCE_HIGH      = 0x444\n\tTCP_RACK_MIN_PACE              = 0x445\n\tTCP_RACK_MIN_PACE_SEG          = 0x446\n\tTCP_RACK_MIN_TO                = 0x422\n\tTCP_RACK_PACE_ALWAYS           = 0x41f\n\tTCP_RACK_PACE_MAX_SEG          = 0x41e\n\tTCP_RACK_PACE_REDUCE           = 0x41d\n\tTCP_RACK_PKT_DELAY             = 0x428\n\tTCP_RACK_PROP                  = 0x41b\n\tTCP_RACK_PROP_RATE             = 0x420\n\tTCP_RACK_PRR_SENDALOT          = 0x421\n\tTCP_RACK_REORD_FADE            = 0x426\n\tTCP_RACK_REORD_THRESH          = 0x425\n\tTCP_RACK_TLP_INC_VAR           = 0x429\n\tTCP_RACK_TLP_REDUCE            = 0x41c\n\tTCP_RACK_TLP_THRESH            = 0x427\n\tTCP_RACK_TLP_USE               = 0x447\n\tTCP_VENDOR                     = 0x80000000\n\tTCSAFLUSH                      = 0x2\n\tTIMER_ABSTIME                  = 0x1\n\tTIMER_RELTIME                  = 0x0\n\tTIOCCBRK                       = 0x2000747a\n\tTIOCCDTR                       = 0x20007478\n\tTIOCCONS                       = 0x80047462\n\tTIOCDRAIN                      = 0x2000745e\n\tTIOCEXCL                       = 0x2000740d\n\tTIOCEXT                        = 0x80047460\n\tTIOCFLUSH                      = 0x80047410\n\tTIOCGDRAINWAIT                 = 0x40047456\n\tTIOCGETA                       = 0x402c7413\n\tTIOCGETD                       = 0x4004741a\n\tTIOCGPGRP                      = 0x40047477\n\tTIOCGPTN                       = 0x4004740f\n\tTIOCGSID                       = 0x40047463\n\tTIOCGWINSZ                     = 0x40087468\n\tTIOCMBIC                       = 0x8004746b\n\tTIOCMBIS                       = 0x8004746c\n\tTIOCMGDTRWAIT                  = 0x4004745a\n\tTIOCMGET                       = 0x4004746a\n\tTIOCMSDTRWAIT                  = 0x8004745b\n\tTIOCMSET                       = 0x8004746d\n\tTIOCM_CAR                      = 0x40\n\tTIOCM_CD                       = 0x40\n\tTIOCM_CTS                      = 0x20\n\tTIOCM_DCD                      = 0x40\n\tTIOCM_DSR                      = 0x100\n\tTIOCM_DTR                      = 0x2\n\tTIOCM_LE                       = 0x1\n\tTIOCM_RI                       = 0x80\n\tTIOCM_RNG                      = 0x80\n\tTIOCM_RTS                      = 0x4\n\tTIOCM_SR                       = 0x10\n\tTIOCM_ST                       = 0x8\n\tTIOCNOTTY                      = 0x20007471\n\tTIOCNXCL                       = 0x2000740e\n\tTIOCOUTQ                       = 0x40047473\n\tTIOCPKT                        = 0x80047470\n\tTIOCPKT_DATA                   = 0x0\n\tTIOCPKT_DOSTOP                 = 0x20\n\tTIOCPKT_FLUSHREAD              = 0x1\n\tTIOCPKT_FLUSHWRITE             = 0x2\n\tTIOCPKT_IOCTL                  = 0x40\n\tTIOCPKT_NOSTOP                 = 0x10\n\tTIOCPKT_START                  = 0x8\n\tTIOCPKT_STOP                   = 0x4\n\tTIOCPTMASTER                   = 0x2000741c\n\tTIOCSBRK                       = 0x2000747b\n\tTIOCSCTTY                      = 0x20007461\n\tTIOCSDRAINWAIT                 = 0x80047457\n\tTIOCSDTR                       = 0x20007479\n\tTIOCSETA                       = 0x802c7414\n\tTIOCSETAF                      = 0x802c7416\n\tTIOCSETAW                      = 0x802c7415\n\tTIOCSETD                       = 0x8004741b\n\tTIOCSIG                        = 0x2004745f\n\tTIOCSPGRP                      = 0x80047476\n\tTIOCSTART                      = 0x2000746e\n\tTIOCSTAT                       = 0x20007465\n\tTIOCSTI                        = 0x80017472\n\tTIOCSTOP                       = 0x2000746f\n\tTIOCSWINSZ                     = 0x80087467\n\tTIOCTIMESTAMP                  = 0x40107459\n\tTIOCUCNTL                      = 0x80047466\n\tTOSTOP                         = 0x400000\n\tUTIME_NOW                      = -0x1\n\tUTIME_OMIT                     = -0x2\n\tVDISCARD                       = 0xf\n\tVDSUSP                         = 0xb\n\tVEOF                           = 0x0\n\tVEOL                           = 0x1\n\tVEOL2                          = 0x2\n\tVERASE                         = 0x3\n\tVERASE2                        = 0x7\n\tVINTR                          = 0x8\n\tVKILL                          = 0x5\n\tVLNEXT                         = 0xe\n\tVMIN                           = 0x10\n\tVQUIT                          = 0x9\n\tVREPRINT                       = 0x6\n\tVSTART                         = 0xc\n\tVSTATUS                        = 0x12\n\tVSTOP                          = 0xd\n\tVSUSP                          = 0xa\n\tVTIME                          = 0x11\n\tVWERASE                        = 0x4\n\tWCONTINUED                     = 0x4\n\tWCOREFLAG                      = 0x80\n\tWEXITED                        = 0x10\n\tWLINUXCLONE                    = 0x80000000\n\tWNOHANG                        = 0x1\n\tWNOWAIT                        = 0x8\n\tWSTOPPED                       = 0x2\n\tWTRAPPED                       = 0x20\n\tWUNTRACED                      = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECAPMODE        = syscall.Errno(0x5e)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTEGRITY      = syscall.Errno(0x61)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x61)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCAPABLE     = syscall.Errno(0x5d)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5f)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x60)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGLIBRT  = syscall.Signal(0x21)\n\tSIGLWP    = syscall.Signal(0x20)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOTCAPABLE\", \"capabilities insufficient\"},\n\t{94, \"ECAPMODE\", \"not permitted in capability mode\"},\n\t{95, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{96, \"EOWNERDEAD\", \"previous owner died\"},\n\t{97, \"EINTEGRITY\", \"integrity check failed\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"unknown signal\"},\n\t{33, \"SIGLIBRT\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && freebsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                   = 0x10\n\tAF_ARP                         = 0x23\n\tAF_ATM                         = 0x1e\n\tAF_BLUETOOTH                   = 0x24\n\tAF_CCITT                       = 0xa\n\tAF_CHAOS                       = 0x5\n\tAF_CNT                         = 0x15\n\tAF_COIP                        = 0x14\n\tAF_DATAKIT                     = 0x9\n\tAF_DECnet                      = 0xc\n\tAF_DLI                         = 0xd\n\tAF_E164                        = 0x1a\n\tAF_ECMA                        = 0x8\n\tAF_HYLINK                      = 0xf\n\tAF_IEEE80211                   = 0x25\n\tAF_IMPLINK                     = 0x3\n\tAF_INET                        = 0x2\n\tAF_INET6                       = 0x1c\n\tAF_INET6_SDP                   = 0x2a\n\tAF_INET_SDP                    = 0x28\n\tAF_IPX                         = 0x17\n\tAF_ISDN                        = 0x1a\n\tAF_ISO                         = 0x7\n\tAF_LAT                         = 0xe\n\tAF_LINK                        = 0x12\n\tAF_LOCAL                       = 0x1\n\tAF_MAX                         = 0x2a\n\tAF_NATM                        = 0x1d\n\tAF_NETBIOS                     = 0x6\n\tAF_NETGRAPH                    = 0x20\n\tAF_OSI                         = 0x7\n\tAF_PUP                         = 0x4\n\tAF_ROUTE                       = 0x11\n\tAF_SCLUSTER                    = 0x22\n\tAF_SIP                         = 0x18\n\tAF_SLOW                        = 0x21\n\tAF_SNA                         = 0xb\n\tAF_UNIX                        = 0x1\n\tAF_UNSPEC                      = 0x0\n\tAF_VENDOR00                    = 0x27\n\tAF_VENDOR01                    = 0x29\n\tAF_VENDOR02                    = 0x2b\n\tAF_VENDOR03                    = 0x2d\n\tAF_VENDOR04                    = 0x2f\n\tAF_VENDOR05                    = 0x31\n\tAF_VENDOR06                    = 0x33\n\tAF_VENDOR07                    = 0x35\n\tAF_VENDOR08                    = 0x37\n\tAF_VENDOR09                    = 0x39\n\tAF_VENDOR10                    = 0x3b\n\tAF_VENDOR11                    = 0x3d\n\tAF_VENDOR12                    = 0x3f\n\tAF_VENDOR13                    = 0x41\n\tAF_VENDOR14                    = 0x43\n\tAF_VENDOR15                    = 0x45\n\tAF_VENDOR16                    = 0x47\n\tAF_VENDOR17                    = 0x49\n\tAF_VENDOR18                    = 0x4b\n\tAF_VENDOR19                    = 0x4d\n\tAF_VENDOR20                    = 0x4f\n\tAF_VENDOR21                    = 0x51\n\tAF_VENDOR22                    = 0x53\n\tAF_VENDOR23                    = 0x55\n\tAF_VENDOR24                    = 0x57\n\tAF_VENDOR25                    = 0x59\n\tAF_VENDOR26                    = 0x5b\n\tAF_VENDOR27                    = 0x5d\n\tAF_VENDOR28                    = 0x5f\n\tAF_VENDOR29                    = 0x61\n\tAF_VENDOR30                    = 0x63\n\tAF_VENDOR31                    = 0x65\n\tAF_VENDOR32                    = 0x67\n\tAF_VENDOR33                    = 0x69\n\tAF_VENDOR34                    = 0x6b\n\tAF_VENDOR35                    = 0x6d\n\tAF_VENDOR36                    = 0x6f\n\tAF_VENDOR37                    = 0x71\n\tAF_VENDOR38                    = 0x73\n\tAF_VENDOR39                    = 0x75\n\tAF_VENDOR40                    = 0x77\n\tAF_VENDOR41                    = 0x79\n\tAF_VENDOR42                    = 0x7b\n\tAF_VENDOR43                    = 0x7d\n\tAF_VENDOR44                    = 0x7f\n\tAF_VENDOR45                    = 0x81\n\tAF_VENDOR46                    = 0x83\n\tAF_VENDOR47                    = 0x85\n\tALTWERASE                      = 0x200\n\tB0                             = 0x0\n\tB110                           = 0x6e\n\tB115200                        = 0x1c200\n\tB1200                          = 0x4b0\n\tB134                           = 0x86\n\tB14400                         = 0x3840\n\tB150                           = 0x96\n\tB1800                          = 0x708\n\tB19200                         = 0x4b00\n\tB200                           = 0xc8\n\tB230400                        = 0x38400\n\tB2400                          = 0x960\n\tB28800                         = 0x7080\n\tB300                           = 0x12c\n\tB38400                         = 0x9600\n\tB460800                        = 0x70800\n\tB4800                          = 0x12c0\n\tB50                            = 0x32\n\tB57600                         = 0xe100\n\tB600                           = 0x258\n\tB7200                          = 0x1c20\n\tB75                            = 0x4b\n\tB76800                         = 0x12c00\n\tB921600                        = 0xe1000\n\tB9600                          = 0x2580\n\tBIOCFEEDBACK                   = 0x8004427c\n\tBIOCFLUSH                      = 0x20004268\n\tBIOCGBLEN                      = 0x40044266\n\tBIOCGDIRECTION                 = 0x40044276\n\tBIOCGDLT                       = 0x4004426a\n\tBIOCGDLTLIST                   = 0xc0104279\n\tBIOCGETBUFMODE                 = 0x4004427d\n\tBIOCGETIF                      = 0x4020426b\n\tBIOCGETZMAX                    = 0x4008427f\n\tBIOCGHDRCMPLT                  = 0x40044274\n\tBIOCGRSIG                      = 0x40044272\n\tBIOCGRTIMEOUT                  = 0x4010426e\n\tBIOCGSEESENT                   = 0x40044276\n\tBIOCGSTATS                     = 0x4008426f\n\tBIOCGTSTAMP                    = 0x40044283\n\tBIOCIMMEDIATE                  = 0x80044270\n\tBIOCLOCK                       = 0x2000427a\n\tBIOCPROMISC                    = 0x20004269\n\tBIOCROTZBUF                    = 0x40184280\n\tBIOCSBLEN                      = 0xc0044266\n\tBIOCSDIRECTION                 = 0x80044277\n\tBIOCSDLT                       = 0x80044278\n\tBIOCSETBUFMODE                 = 0x8004427e\n\tBIOCSETF                       = 0x80104267\n\tBIOCSETFNR                     = 0x80104282\n\tBIOCSETIF                      = 0x8020426c\n\tBIOCSETVLANPCP                 = 0x80044285\n\tBIOCSETWF                      = 0x8010427b\n\tBIOCSETZBUF                    = 0x80184281\n\tBIOCSHDRCMPLT                  = 0x80044275\n\tBIOCSRSIG                      = 0x80044273\n\tBIOCSRTIMEOUT                  = 0x8010426d\n\tBIOCSSEESENT                   = 0x80044277\n\tBIOCSTSTAMP                    = 0x80044284\n\tBIOCVERSION                    = 0x40044271\n\tBPF_A                          = 0x10\n\tBPF_ABS                        = 0x20\n\tBPF_ADD                        = 0x0\n\tBPF_ALIGNMENT                  = 0x8\n\tBPF_ALU                        = 0x4\n\tBPF_AND                        = 0x50\n\tBPF_B                          = 0x10\n\tBPF_BUFMODE_BUFFER             = 0x1\n\tBPF_BUFMODE_ZBUF               = 0x2\n\tBPF_DIV                        = 0x30\n\tBPF_H                          = 0x8\n\tBPF_IMM                        = 0x0\n\tBPF_IND                        = 0x40\n\tBPF_JA                         = 0x0\n\tBPF_JEQ                        = 0x10\n\tBPF_JGE                        = 0x30\n\tBPF_JGT                        = 0x20\n\tBPF_JMP                        = 0x5\n\tBPF_JSET                       = 0x40\n\tBPF_K                          = 0x0\n\tBPF_LD                         = 0x0\n\tBPF_LDX                        = 0x1\n\tBPF_LEN                        = 0x80\n\tBPF_LSH                        = 0x60\n\tBPF_MAJOR_VERSION              = 0x1\n\tBPF_MAXBUFSIZE                 = 0x80000\n\tBPF_MAXINSNS                   = 0x200\n\tBPF_MEM                        = 0x60\n\tBPF_MEMWORDS                   = 0x10\n\tBPF_MINBUFSIZE                 = 0x20\n\tBPF_MINOR_VERSION              = 0x1\n\tBPF_MISC                       = 0x7\n\tBPF_MOD                        = 0x90\n\tBPF_MSH                        = 0xa0\n\tBPF_MUL                        = 0x20\n\tBPF_NEG                        = 0x80\n\tBPF_OR                         = 0x40\n\tBPF_RELEASE                    = 0x30bb6\n\tBPF_RET                        = 0x6\n\tBPF_RSH                        = 0x70\n\tBPF_ST                         = 0x2\n\tBPF_STX                        = 0x3\n\tBPF_SUB                        = 0x10\n\tBPF_TAX                        = 0x0\n\tBPF_TXA                        = 0x80\n\tBPF_T_BINTIME                  = 0x2\n\tBPF_T_BINTIME_FAST             = 0x102\n\tBPF_T_BINTIME_MONOTONIC        = 0x202\n\tBPF_T_BINTIME_MONOTONIC_FAST   = 0x302\n\tBPF_T_FAST                     = 0x100\n\tBPF_T_FLAG_MASK                = 0x300\n\tBPF_T_FORMAT_MASK              = 0x3\n\tBPF_T_MICROTIME                = 0x0\n\tBPF_T_MICROTIME_FAST           = 0x100\n\tBPF_T_MICROTIME_MONOTONIC      = 0x200\n\tBPF_T_MICROTIME_MONOTONIC_FAST = 0x300\n\tBPF_T_MONOTONIC                = 0x200\n\tBPF_T_MONOTONIC_FAST           = 0x300\n\tBPF_T_NANOTIME                 = 0x1\n\tBPF_T_NANOTIME_FAST            = 0x101\n\tBPF_T_NANOTIME_MONOTONIC       = 0x201\n\tBPF_T_NANOTIME_MONOTONIC_FAST  = 0x301\n\tBPF_T_NONE                     = 0x3\n\tBPF_T_NORMAL                   = 0x0\n\tBPF_W                          = 0x0\n\tBPF_X                          = 0x8\n\tBPF_XOR                        = 0xa0\n\tBRKINT                         = 0x2\n\tCAP_ACCEPT                     = 0x200000020000000\n\tCAP_ACL_CHECK                  = 0x400000000010000\n\tCAP_ACL_DELETE                 = 0x400000000020000\n\tCAP_ACL_GET                    = 0x400000000040000\n\tCAP_ACL_SET                    = 0x400000000080000\n\tCAP_ALL0                       = 0x20007ffffffffff\n\tCAP_ALL1                       = 0x4000000001fffff\n\tCAP_BIND                       = 0x200000040000000\n\tCAP_BINDAT                     = 0x200008000000400\n\tCAP_CHFLAGSAT                  = 0x200000000001400\n\tCAP_CONNECT                    = 0x200000080000000\n\tCAP_CONNECTAT                  = 0x200010000000400\n\tCAP_CREATE                     = 0x200000000000040\n\tCAP_EVENT                      = 0x400000000000020\n\tCAP_EXTATTR_DELETE             = 0x400000000001000\n\tCAP_EXTATTR_GET                = 0x400000000002000\n\tCAP_EXTATTR_LIST               = 0x400000000004000\n\tCAP_EXTATTR_SET                = 0x400000000008000\n\tCAP_FCHDIR                     = 0x200000000000800\n\tCAP_FCHFLAGS                   = 0x200000000001000\n\tCAP_FCHMOD                     = 0x200000000002000\n\tCAP_FCHMODAT                   = 0x200000000002400\n\tCAP_FCHOWN                     = 0x200000000004000\n\tCAP_FCHOWNAT                   = 0x200000000004400\n\tCAP_FCNTL                      = 0x200000000008000\n\tCAP_FCNTL_ALL                  = 0x78\n\tCAP_FCNTL_GETFL                = 0x8\n\tCAP_FCNTL_GETOWN               = 0x20\n\tCAP_FCNTL_SETFL                = 0x10\n\tCAP_FCNTL_SETOWN               = 0x40\n\tCAP_FEXECVE                    = 0x200000000000080\n\tCAP_FLOCK                      = 0x200000000010000\n\tCAP_FPATHCONF                  = 0x200000000020000\n\tCAP_FSCK                       = 0x200000000040000\n\tCAP_FSTAT                      = 0x200000000080000\n\tCAP_FSTATAT                    = 0x200000000080400\n\tCAP_FSTATFS                    = 0x200000000100000\n\tCAP_FSYNC                      = 0x200000000000100\n\tCAP_FTRUNCATE                  = 0x200000000000200\n\tCAP_FUTIMES                    = 0x200000000200000\n\tCAP_FUTIMESAT                  = 0x200000000200400\n\tCAP_GETPEERNAME                = 0x200000100000000\n\tCAP_GETSOCKNAME                = 0x200000200000000\n\tCAP_GETSOCKOPT                 = 0x200000400000000\n\tCAP_IOCTL                      = 0x400000000000080\n\tCAP_IOCTLS_ALL                 = 0x7fffffffffffffff\n\tCAP_KQUEUE                     = 0x400000000100040\n\tCAP_KQUEUE_CHANGE              = 0x400000000100000\n\tCAP_KQUEUE_EVENT               = 0x400000000000040\n\tCAP_LINKAT_SOURCE              = 0x200020000000400\n\tCAP_LINKAT_TARGET              = 0x200000000400400\n\tCAP_LISTEN                     = 0x200000800000000\n\tCAP_LOOKUP                     = 0x200000000000400\n\tCAP_MAC_GET                    = 0x400000000000001\n\tCAP_MAC_SET                    = 0x400000000000002\n\tCAP_MKDIRAT                    = 0x200000000800400\n\tCAP_MKFIFOAT                   = 0x200000001000400\n\tCAP_MKNODAT                    = 0x200000002000400\n\tCAP_MMAP                       = 0x200000000000010\n\tCAP_MMAP_R                     = 0x20000000000001d\n\tCAP_MMAP_RW                    = 0x20000000000001f\n\tCAP_MMAP_RWX                   = 0x20000000000003f\n\tCAP_MMAP_RX                    = 0x20000000000003d\n\tCAP_MMAP_W                     = 0x20000000000001e\n\tCAP_MMAP_WX                    = 0x20000000000003e\n\tCAP_MMAP_X                     = 0x20000000000003c\n\tCAP_PDGETPID                   = 0x400000000000200\n\tCAP_PDKILL                     = 0x400000000000800\n\tCAP_PDWAIT                     = 0x400000000000400\n\tCAP_PEELOFF                    = 0x200001000000000\n\tCAP_POLL_EVENT                 = 0x400000000000020\n\tCAP_PREAD                      = 0x20000000000000d\n\tCAP_PWRITE                     = 0x20000000000000e\n\tCAP_READ                       = 0x200000000000001\n\tCAP_RECV                       = 0x200000000000001\n\tCAP_RENAMEAT_SOURCE            = 0x200000004000400\n\tCAP_RENAMEAT_TARGET            = 0x200040000000400\n\tCAP_RIGHTS_VERSION             = 0x0\n\tCAP_RIGHTS_VERSION_00          = 0x0\n\tCAP_SEEK                       = 0x20000000000000c\n\tCAP_SEEK_TELL                  = 0x200000000000004\n\tCAP_SEM_GETVALUE               = 0x400000000000004\n\tCAP_SEM_POST                   = 0x400000000000008\n\tCAP_SEM_WAIT                   = 0x400000000000010\n\tCAP_SEND                       = 0x200000000000002\n\tCAP_SETSOCKOPT                 = 0x200002000000000\n\tCAP_SHUTDOWN                   = 0x200004000000000\n\tCAP_SOCK_CLIENT                = 0x200007780000003\n\tCAP_SOCK_SERVER                = 0x200007f60000003\n\tCAP_SYMLINKAT                  = 0x200000008000400\n\tCAP_TTYHOOK                    = 0x400000000000100\n\tCAP_UNLINKAT                   = 0x200000010000400\n\tCAP_UNUSED0_44                 = 0x200080000000000\n\tCAP_UNUSED0_57                 = 0x300000000000000\n\tCAP_UNUSED1_22                 = 0x400000000200000\n\tCAP_UNUSED1_57                 = 0x500000000000000\n\tCAP_WRITE                      = 0x200000000000002\n\tCFLUSH                         = 0xf\n\tCLOCAL                         = 0x8000\n\tCLOCK_MONOTONIC                = 0x4\n\tCLOCK_MONOTONIC_FAST           = 0xc\n\tCLOCK_MONOTONIC_PRECISE        = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID       = 0xf\n\tCLOCK_PROF                     = 0x2\n\tCLOCK_REALTIME                 = 0x0\n\tCLOCK_REALTIME_FAST            = 0xa\n\tCLOCK_REALTIME_PRECISE         = 0x9\n\tCLOCK_SECOND                   = 0xd\n\tCLOCK_THREAD_CPUTIME_ID        = 0xe\n\tCLOCK_UPTIME                   = 0x5\n\tCLOCK_UPTIME_FAST              = 0x8\n\tCLOCK_UPTIME_PRECISE           = 0x7\n\tCLOCK_VIRTUAL                  = 0x1\n\tCPUSTATES                      = 0x5\n\tCP_IDLE                        = 0x4\n\tCP_INTR                        = 0x3\n\tCP_NICE                        = 0x1\n\tCP_SYS                         = 0x2\n\tCP_USER                        = 0x0\n\tCREAD                          = 0x800\n\tCRTSCTS                        = 0x30000\n\tCS5                            = 0x0\n\tCS6                            = 0x100\n\tCS7                            = 0x200\n\tCS8                            = 0x300\n\tCSIZE                          = 0x300\n\tCSTART                         = 0x11\n\tCSTATUS                        = 0x14\n\tCSTOP                          = 0x13\n\tCSTOPB                         = 0x400\n\tCSUSP                          = 0x1a\n\tCTL_HW                         = 0x6\n\tCTL_KERN                       = 0x1\n\tCTL_MAXNAME                    = 0x18\n\tCTL_NET                        = 0x4\n\tDIOCGATTR                      = 0xc148648e\n\tDIOCGDELETE                    = 0x80106488\n\tDIOCGFLUSH                     = 0x20006487\n\tDIOCGFRONTSTUFF                = 0x40086486\n\tDIOCGFWHEADS                   = 0x40046483\n\tDIOCGFWSECTORS                 = 0x40046482\n\tDIOCGIDENT                     = 0x41006489\n\tDIOCGMEDIASIZE                 = 0x40086481\n\tDIOCGPHYSPATH                  = 0x4400648d\n\tDIOCGPROVIDERNAME              = 0x4400648a\n\tDIOCGSECTORSIZE                = 0x40046480\n\tDIOCGSTRIPEOFFSET              = 0x4008648c\n\tDIOCGSTRIPESIZE                = 0x4008648b\n\tDIOCSKERNELDUMP                = 0x80506490\n\tDIOCSKERNELDUMP_FREEBSD11      = 0x80046485\n\tDIOCZONECMD                    = 0xc080648f\n\tDLT_A429                       = 0xb8\n\tDLT_A653_ICM                   = 0xb9\n\tDLT_AIRONET_HEADER             = 0x78\n\tDLT_AOS                        = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394     = 0x8a\n\tDLT_ARCNET                     = 0x7\n\tDLT_ARCNET_LINUX               = 0x81\n\tDLT_ATM_CLIP                   = 0x13\n\tDLT_ATM_RFC1483                = 0xb\n\tDLT_AURORA                     = 0x7e\n\tDLT_AX25                       = 0x3\n\tDLT_AX25_KISS                  = 0xca\n\tDLT_BACNET_MS_TP               = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB         = 0xff\n\tDLT_BLUETOOTH_HCI_H4           = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9\n\tDLT_BLUETOOTH_LE_LL            = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR    = 0xfe\n\tDLT_CAN20B                     = 0xbe\n\tDLT_CAN_SOCKETCAN              = 0xe3\n\tDLT_CHAOS                      = 0x5\n\tDLT_CHDLC                      = 0x68\n\tDLT_CISCO_IOS                  = 0x76\n\tDLT_CLASS_NETBSD_RAWAF         = 0x2240000\n\tDLT_C_HDLC                     = 0x68\n\tDLT_C_HDLC_WITH_DIR            = 0xcd\n\tDLT_DBUS                       = 0xe7\n\tDLT_DECT                       = 0xdd\n\tDLT_DISPLAYPORT_AUX            = 0x113\n\tDLT_DOCSIS                     = 0x8f\n\tDLT_DOCSIS31_XRA31             = 0x111\n\tDLT_DVB_CI                     = 0xeb\n\tDLT_ECONET                     = 0x73\n\tDLT_EN10MB                     = 0x1\n\tDLT_EN3MB                      = 0x2\n\tDLT_ENC                        = 0x6d\n\tDLT_EPON                       = 0x103\n\tDLT_ERF                        = 0xc5\n\tDLT_ERF_ETH                    = 0xaf\n\tDLT_ERF_POS                    = 0xb0\n\tDLT_ETHERNET_MPACKET           = 0x112\n\tDLT_FC_2                       = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS     = 0xe1\n\tDLT_FDDI                       = 0xa\n\tDLT_FLEXRAY                    = 0xd2\n\tDLT_FRELAY                     = 0x6b\n\tDLT_FRELAY_WITH_DIR            = 0xce\n\tDLT_GCOM_SERIAL                = 0xad\n\tDLT_GCOM_T1E1                  = 0xac\n\tDLT_GPF_F                      = 0xab\n\tDLT_GPF_T                      = 0xaa\n\tDLT_GPRS_LLC                   = 0xa9\n\tDLT_GSMTAP_ABIS                = 0xda\n\tDLT_GSMTAP_UM                  = 0xd9\n\tDLT_IBM_SN                     = 0x92\n\tDLT_IBM_SP                     = 0x91\n\tDLT_IEEE802                    = 0x6\n\tDLT_IEEE802_11                 = 0x69\n\tDLT_IEEE802_11_RADIO           = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS       = 0xa3\n\tDLT_IEEE802_15_4               = 0xc3\n\tDLT_IEEE802_15_4_LINUX         = 0xbf\n\tDLT_IEEE802_15_4_NOFCS         = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY    = 0xd7\n\tDLT_IEEE802_16_MAC_CPS         = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1\n\tDLT_INFINIBAND                 = 0xf7\n\tDLT_IPFILTER                   = 0x74\n\tDLT_IPMB_KONTRON               = 0xc7\n\tDLT_IPMB_LINUX                 = 0xd1\n\tDLT_IPMI_HPM_2                 = 0x104\n\tDLT_IPNET                      = 0xe2\n\tDLT_IPOIB                      = 0xf2\n\tDLT_IPV4                       = 0xe4\n\tDLT_IPV6                       = 0xe5\n\tDLT_IP_OVER_FC                 = 0x7a\n\tDLT_ISO_14443                  = 0x108\n\tDLT_JUNIPER_ATM1               = 0x89\n\tDLT_JUNIPER_ATM2               = 0x87\n\tDLT_JUNIPER_ATM_CEMIC          = 0xee\n\tDLT_JUNIPER_CHDLC              = 0xb5\n\tDLT_JUNIPER_ES                 = 0x84\n\tDLT_JUNIPER_ETHER              = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL       = 0xea\n\tDLT_JUNIPER_FRELAY             = 0xb4\n\tDLT_JUNIPER_GGSN               = 0x85\n\tDLT_JUNIPER_ISM                = 0xc2\n\tDLT_JUNIPER_MFR                = 0x86\n\tDLT_JUNIPER_MLFR               = 0x83\n\tDLT_JUNIPER_MLPPP              = 0x82\n\tDLT_JUNIPER_MONITOR            = 0xa4\n\tDLT_JUNIPER_PIC_PEER           = 0xae\n\tDLT_JUNIPER_PPP                = 0xb3\n\tDLT_JUNIPER_PPPOE              = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM          = 0xa8\n\tDLT_JUNIPER_SERVICES           = 0x88\n\tDLT_JUNIPER_SRX_E2E            = 0xe9\n\tDLT_JUNIPER_ST                 = 0xc8\n\tDLT_JUNIPER_VP                 = 0xb7\n\tDLT_JUNIPER_VS                 = 0xe8\n\tDLT_LAPB_WITH_DIR              = 0xcf\n\tDLT_LAPD                       = 0xcb\n\tDLT_LIN                        = 0xd4\n\tDLT_LINUX_EVDEV                = 0xd8\n\tDLT_LINUX_IRDA                 = 0x90\n\tDLT_LINUX_LAPD                 = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION    = 0xa6\n\tDLT_LINUX_SLL                  = 0x71\n\tDLT_LINUX_SLL2                 = 0x114\n\tDLT_LOOP                       = 0x6c\n\tDLT_LORATAP                    = 0x10e\n\tDLT_LTALK                      = 0x72\n\tDLT_MATCHING_MAX               = 0x114\n\tDLT_MATCHING_MIN               = 0x68\n\tDLT_MFR                        = 0xb6\n\tDLT_MOST                       = 0xd3\n\tDLT_MPEG_2_TS                  = 0xf3\n\tDLT_MPLS                       = 0xdb\n\tDLT_MTP2                       = 0x8c\n\tDLT_MTP2_WITH_PHDR             = 0x8b\n\tDLT_MTP3                       = 0x8d\n\tDLT_MUX27010                   = 0xec\n\tDLT_NETANALYZER                = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT    = 0xf1\n\tDLT_NETLINK                    = 0xfd\n\tDLT_NFC_LLCP                   = 0xf5\n\tDLT_NFLOG                      = 0xef\n\tDLT_NG40                       = 0xf4\n\tDLT_NORDIC_BLE                 = 0x110\n\tDLT_NULL                       = 0x0\n\tDLT_OPENFLOW                   = 0x10b\n\tDLT_PCI_EXP                    = 0x7d\n\tDLT_PFLOG                      = 0x75\n\tDLT_PFSYNC                     = 0x79\n\tDLT_PKTAP                      = 0x102\n\tDLT_PPI                        = 0xc0\n\tDLT_PPP                        = 0x9\n\tDLT_PPP_BSDOS                  = 0xe\n\tDLT_PPP_ETHER                  = 0x33\n\tDLT_PPP_PPPD                   = 0xa6\n\tDLT_PPP_SERIAL                 = 0x32\n\tDLT_PPP_WITH_DIR               = 0xcc\n\tDLT_PPP_WITH_DIRECTION         = 0xa6\n\tDLT_PRISM_HEADER               = 0x77\n\tDLT_PROFIBUS_DL                = 0x101\n\tDLT_PRONET                     = 0x4\n\tDLT_RAIF1                      = 0xc6\n\tDLT_RAW                        = 0xc\n\tDLT_RDS                        = 0x109\n\tDLT_REDBACK_SMARTEDGE          = 0x20\n\tDLT_RIO                        = 0x7c\n\tDLT_RTAC_SERIAL                = 0xfa\n\tDLT_SCCP                       = 0x8e\n\tDLT_SCTP                       = 0xf8\n\tDLT_SDLC                       = 0x10c\n\tDLT_SITA                       = 0xc4\n\tDLT_SLIP                       = 0x8\n\tDLT_SLIP_BSDOS                 = 0xd\n\tDLT_STANAG_5066_D_PDU          = 0xed\n\tDLT_SUNATM                     = 0x7b\n\tDLT_SYMANTEC_FIREWALL          = 0x63\n\tDLT_TI_LLN_SNIFFER             = 0x10d\n\tDLT_TZSP                       = 0x80\n\tDLT_USB                        = 0xba\n\tDLT_USBPCAP                    = 0xf9\n\tDLT_USB_DARWIN                 = 0x10a\n\tDLT_USB_FREEBSD                = 0xba\n\tDLT_USB_LINUX                  = 0xbd\n\tDLT_USB_LINUX_MMAPPED          = 0xdc\n\tDLT_USER0                      = 0x93\n\tDLT_USER1                      = 0x94\n\tDLT_USER10                     = 0x9d\n\tDLT_USER11                     = 0x9e\n\tDLT_USER12                     = 0x9f\n\tDLT_USER13                     = 0xa0\n\tDLT_USER14                     = 0xa1\n\tDLT_USER15                     = 0xa2\n\tDLT_USER2                      = 0x95\n\tDLT_USER3                      = 0x96\n\tDLT_USER4                      = 0x97\n\tDLT_USER5                      = 0x98\n\tDLT_USER6                      = 0x99\n\tDLT_USER7                      = 0x9a\n\tDLT_USER8                      = 0x9b\n\tDLT_USER9                      = 0x9c\n\tDLT_VSOCK                      = 0x10f\n\tDLT_WATTSTOPPER_DLM            = 0x107\n\tDLT_WIHART                     = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU        = 0xfc\n\tDLT_X2E_SERIAL                 = 0xd5\n\tDLT_X2E_XORAYA                 = 0xd6\n\tDLT_ZWAVE_R1_R2                = 0x105\n\tDLT_ZWAVE_R3                   = 0x106\n\tDT_BLK                         = 0x6\n\tDT_CHR                         = 0x2\n\tDT_DIR                         = 0x4\n\tDT_FIFO                        = 0x1\n\tDT_LNK                         = 0xa\n\tDT_REG                         = 0x8\n\tDT_SOCK                        = 0xc\n\tDT_UNKNOWN                     = 0x0\n\tDT_WHT                         = 0xe\n\tECHO                           = 0x8\n\tECHOCTL                        = 0x40\n\tECHOE                          = 0x2\n\tECHOK                          = 0x4\n\tECHOKE                         = 0x1\n\tECHONL                         = 0x10\n\tECHOPRT                        = 0x20\n\tEVFILT_AIO                     = -0x3\n\tEVFILT_EMPTY                   = -0xd\n\tEVFILT_FS                      = -0x9\n\tEVFILT_LIO                     = -0xa\n\tEVFILT_PROC                    = -0x5\n\tEVFILT_PROCDESC                = -0x8\n\tEVFILT_READ                    = -0x1\n\tEVFILT_SENDFILE                = -0xc\n\tEVFILT_SIGNAL                  = -0x6\n\tEVFILT_SYSCOUNT                = 0xd\n\tEVFILT_TIMER                   = -0x7\n\tEVFILT_USER                    = -0xb\n\tEVFILT_VNODE                   = -0x4\n\tEVFILT_WRITE                   = -0x2\n\tEVNAMEMAP_NAME_SIZE            = 0x40\n\tEV_ADD                         = 0x1\n\tEV_CLEAR                       = 0x20\n\tEV_DELETE                      = 0x2\n\tEV_DISABLE                     = 0x8\n\tEV_DISPATCH                    = 0x80\n\tEV_DROP                        = 0x1000\n\tEV_ENABLE                      = 0x4\n\tEV_EOF                         = 0x8000\n\tEV_ERROR                       = 0x4000\n\tEV_FLAG1                       = 0x2000\n\tEV_FLAG2                       = 0x4000\n\tEV_FORCEONESHOT                = 0x100\n\tEV_ONESHOT                     = 0x10\n\tEV_RECEIPT                     = 0x40\n\tEV_SYSFLAGS                    = 0xf000\n\tEXTA                           = 0x4b00\n\tEXTATTR_MAXNAMELEN             = 0xff\n\tEXTATTR_NAMESPACE_EMPTY        = 0x0\n\tEXTATTR_NAMESPACE_SYSTEM       = 0x2\n\tEXTATTR_NAMESPACE_USER         = 0x1\n\tEXTB                           = 0x9600\n\tEXTPROC                        = 0x800\n\tFD_CLOEXEC                     = 0x1\n\tFD_SETSIZE                     = 0x400\n\tFLUSHO                         = 0x800000\n\tF_CANCEL                       = 0x5\n\tF_DUP2FD                       = 0xa\n\tF_DUP2FD_CLOEXEC               = 0x12\n\tF_DUPFD                        = 0x0\n\tF_DUPFD_CLOEXEC                = 0x11\n\tF_GETFD                        = 0x1\n\tF_GETFL                        = 0x3\n\tF_GETLK                        = 0xb\n\tF_GETOWN                       = 0x5\n\tF_OGETLK                       = 0x7\n\tF_OK                           = 0x0\n\tF_OSETLK                       = 0x8\n\tF_OSETLKW                      = 0x9\n\tF_RDAHEAD                      = 0x10\n\tF_RDLCK                        = 0x1\n\tF_READAHEAD                    = 0xf\n\tF_SETFD                        = 0x2\n\tF_SETFL                        = 0x4\n\tF_SETLK                        = 0xc\n\tF_SETLKW                       = 0xd\n\tF_SETLK_REMOTE                 = 0xe\n\tF_SETOWN                       = 0x6\n\tF_UNLCK                        = 0x2\n\tF_UNLCKSYS                     = 0x4\n\tF_WRLCK                        = 0x3\n\tHUPCL                          = 0x4000\n\tHW_MACHINE                     = 0x1\n\tICANON                         = 0x100\n\tICMP6_FILTER                   = 0x12\n\tICRNL                          = 0x100\n\tIEXTEN                         = 0x400\n\tIFAN_ARRIVAL                   = 0x0\n\tIFAN_DEPARTURE                 = 0x1\n\tIFCAP_WOL_MAGIC                = 0x2000\n\tIFF_ALLMULTI                   = 0x200\n\tIFF_ALTPHYS                    = 0x4000\n\tIFF_BROADCAST                  = 0x2\n\tIFF_CANTCHANGE                 = 0x218f52\n\tIFF_CANTCONFIG                 = 0x10000\n\tIFF_DEBUG                      = 0x4\n\tIFF_DRV_OACTIVE                = 0x400\n\tIFF_DRV_RUNNING                = 0x40\n\tIFF_DYING                      = 0x200000\n\tIFF_LINK0                      = 0x1000\n\tIFF_LINK1                      = 0x2000\n\tIFF_LINK2                      = 0x4000\n\tIFF_LOOPBACK                   = 0x8\n\tIFF_MONITOR                    = 0x40000\n\tIFF_MULTICAST                  = 0x8000\n\tIFF_NOARP                      = 0x80\n\tIFF_NOGROUP                    = 0x800000\n\tIFF_OACTIVE                    = 0x400\n\tIFF_POINTOPOINT                = 0x10\n\tIFF_PPROMISC                   = 0x20000\n\tIFF_PROMISC                    = 0x100\n\tIFF_RENAMING                   = 0x400000\n\tIFF_RUNNING                    = 0x40\n\tIFF_SIMPLEX                    = 0x800\n\tIFF_STATICARP                  = 0x80000\n\tIFF_UP                         = 0x1\n\tIFNAMSIZ                       = 0x10\n\tIFT_BRIDGE                     = 0xd1\n\tIFT_CARP                       = 0xf8\n\tIFT_IEEE1394                   = 0x90\n\tIFT_INFINIBAND                 = 0xc7\n\tIFT_L2VLAN                     = 0x87\n\tIFT_L3IPVLAN                   = 0x88\n\tIFT_PPP                        = 0x17\n\tIFT_PROPVIRTUAL                = 0x35\n\tIGNBRK                         = 0x1\n\tIGNCR                          = 0x80\n\tIGNPAR                         = 0x4\n\tIMAXBEL                        = 0x2000\n\tINLCR                          = 0x40\n\tINPCK                          = 0x10\n\tIN_CLASSA_HOST                 = 0xffffff\n\tIN_CLASSA_MAX                  = 0x80\n\tIN_CLASSA_NET                  = 0xff000000\n\tIN_CLASSA_NSHIFT               = 0x18\n\tIN_CLASSB_HOST                 = 0xffff\n\tIN_CLASSB_MAX                  = 0x10000\n\tIN_CLASSB_NET                  = 0xffff0000\n\tIN_CLASSB_NSHIFT               = 0x10\n\tIN_CLASSC_HOST                 = 0xff\n\tIN_CLASSC_NET                  = 0xffffff00\n\tIN_CLASSC_NSHIFT               = 0x8\n\tIN_CLASSD_HOST                 = 0xfffffff\n\tIN_CLASSD_NET                  = 0xf0000000\n\tIN_CLASSD_NSHIFT               = 0x1c\n\tIN_LOOPBACKNET                 = 0x7f\n\tIN_RFC3021_MASK                = 0xfffffffe\n\tIPPROTO_3PC                    = 0x22\n\tIPPROTO_ADFS                   = 0x44\n\tIPPROTO_AH                     = 0x33\n\tIPPROTO_AHIP                   = 0x3d\n\tIPPROTO_APES                   = 0x63\n\tIPPROTO_ARGUS                  = 0xd\n\tIPPROTO_AX25                   = 0x5d\n\tIPPROTO_BHA                    = 0x31\n\tIPPROTO_BLT                    = 0x1e\n\tIPPROTO_BRSATMON               = 0x4c\n\tIPPROTO_CARP                   = 0x70\n\tIPPROTO_CFTP                   = 0x3e\n\tIPPROTO_CHAOS                  = 0x10\n\tIPPROTO_CMTP                   = 0x26\n\tIPPROTO_CPHB                   = 0x49\n\tIPPROTO_CPNX                   = 0x48\n\tIPPROTO_DCCP                   = 0x21\n\tIPPROTO_DDP                    = 0x25\n\tIPPROTO_DGP                    = 0x56\n\tIPPROTO_DIVERT                 = 0x102\n\tIPPROTO_DONE                   = 0x101\n\tIPPROTO_DSTOPTS                = 0x3c\n\tIPPROTO_EGP                    = 0x8\n\tIPPROTO_EMCON                  = 0xe\n\tIPPROTO_ENCAP                  = 0x62\n\tIPPROTO_EON                    = 0x50\n\tIPPROTO_ESP                    = 0x32\n\tIPPROTO_ETHERIP                = 0x61\n\tIPPROTO_FRAGMENT               = 0x2c\n\tIPPROTO_GGP                    = 0x3\n\tIPPROTO_GMTP                   = 0x64\n\tIPPROTO_GRE                    = 0x2f\n\tIPPROTO_HELLO                  = 0x3f\n\tIPPROTO_HIP                    = 0x8b\n\tIPPROTO_HMP                    = 0x14\n\tIPPROTO_HOPOPTS                = 0x0\n\tIPPROTO_ICMP                   = 0x1\n\tIPPROTO_ICMPV6                 = 0x3a\n\tIPPROTO_IDP                    = 0x16\n\tIPPROTO_IDPR                   = 0x23\n\tIPPROTO_IDRP                   = 0x2d\n\tIPPROTO_IGMP                   = 0x2\n\tIPPROTO_IGP                    = 0x55\n\tIPPROTO_IGRP                   = 0x58\n\tIPPROTO_IL                     = 0x28\n\tIPPROTO_INLSP                  = 0x34\n\tIPPROTO_INP                    = 0x20\n\tIPPROTO_IP                     = 0x0\n\tIPPROTO_IPCOMP                 = 0x6c\n\tIPPROTO_IPCV                   = 0x47\n\tIPPROTO_IPEIP                  = 0x5e\n\tIPPROTO_IPIP                   = 0x4\n\tIPPROTO_IPPC                   = 0x43\n\tIPPROTO_IPV4                   = 0x4\n\tIPPROTO_IPV6                   = 0x29\n\tIPPROTO_IRTP                   = 0x1c\n\tIPPROTO_KRYPTOLAN              = 0x41\n\tIPPROTO_LARP                   = 0x5b\n\tIPPROTO_LEAF1                  = 0x19\n\tIPPROTO_LEAF2                  = 0x1a\n\tIPPROTO_MAX                    = 0x100\n\tIPPROTO_MEAS                   = 0x13\n\tIPPROTO_MH                     = 0x87\n\tIPPROTO_MHRP                   = 0x30\n\tIPPROTO_MICP                   = 0x5f\n\tIPPROTO_MOBILE                 = 0x37\n\tIPPROTO_MPLS                   = 0x89\n\tIPPROTO_MTP                    = 0x5c\n\tIPPROTO_MUX                    = 0x12\n\tIPPROTO_ND                     = 0x4d\n\tIPPROTO_NHRP                   = 0x36\n\tIPPROTO_NONE                   = 0x3b\n\tIPPROTO_NSP                    = 0x1f\n\tIPPROTO_NVPII                  = 0xb\n\tIPPROTO_OLD_DIVERT             = 0xfe\n\tIPPROTO_OSPFIGP                = 0x59\n\tIPPROTO_PFSYNC                 = 0xf0\n\tIPPROTO_PGM                    = 0x71\n\tIPPROTO_PIGP                   = 0x9\n\tIPPROTO_PIM                    = 0x67\n\tIPPROTO_PRM                    = 0x15\n\tIPPROTO_PUP                    = 0xc\n\tIPPROTO_PVP                    = 0x4b\n\tIPPROTO_RAW                    = 0xff\n\tIPPROTO_RCCMON                 = 0xa\n\tIPPROTO_RDP                    = 0x1b\n\tIPPROTO_RESERVED_253           = 0xfd\n\tIPPROTO_RESERVED_254           = 0xfe\n\tIPPROTO_ROUTING                = 0x2b\n\tIPPROTO_RSVP                   = 0x2e\n\tIPPROTO_RVD                    = 0x42\n\tIPPROTO_SATEXPAK               = 0x40\n\tIPPROTO_SATMON                 = 0x45\n\tIPPROTO_SCCSP                  = 0x60\n\tIPPROTO_SCTP                   = 0x84\n\tIPPROTO_SDRP                   = 0x2a\n\tIPPROTO_SEND                   = 0x103\n\tIPPROTO_SHIM6                  = 0x8c\n\tIPPROTO_SKIP                   = 0x39\n\tIPPROTO_SPACER                 = 0x7fff\n\tIPPROTO_SRPC                   = 0x5a\n\tIPPROTO_ST                     = 0x7\n\tIPPROTO_SVMTP                  = 0x52\n\tIPPROTO_SWIPE                  = 0x35\n\tIPPROTO_TCF                    = 0x57\n\tIPPROTO_TCP                    = 0x6\n\tIPPROTO_TLSP                   = 0x38\n\tIPPROTO_TP                     = 0x1d\n\tIPPROTO_TPXX                   = 0x27\n\tIPPROTO_TRUNK1                 = 0x17\n\tIPPROTO_TRUNK2                 = 0x18\n\tIPPROTO_TTP                    = 0x54\n\tIPPROTO_UDP                    = 0x11\n\tIPPROTO_UDPLITE                = 0x88\n\tIPPROTO_VINES                  = 0x53\n\tIPPROTO_VISA                   = 0x46\n\tIPPROTO_VMTP                   = 0x51\n\tIPPROTO_WBEXPAK                = 0x4f\n\tIPPROTO_WBMON                  = 0x4e\n\tIPPROTO_WSN                    = 0x4a\n\tIPPROTO_XNET                   = 0xf\n\tIPPROTO_XTP                    = 0x24\n\tIPV6_AUTOFLOWLABEL             = 0x3b\n\tIPV6_BINDANY                   = 0x40\n\tIPV6_BINDMULTI                 = 0x41\n\tIPV6_BINDV6ONLY                = 0x1b\n\tIPV6_CHECKSUM                  = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS    = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP    = 0x1\n\tIPV6_DEFHLIM                   = 0x40\n\tIPV6_DONTFRAG                  = 0x3e\n\tIPV6_DSTOPTS                   = 0x32\n\tIPV6_FLOWID                    = 0x43\n\tIPV6_FLOWINFO_MASK             = 0xffffff0f\n\tIPV6_FLOWLABEL_LEN             = 0x14\n\tIPV6_FLOWLABEL_MASK            = 0xffff0f00\n\tIPV6_FLOWTYPE                  = 0x44\n\tIPV6_FRAGTTL                   = 0x78\n\tIPV6_FW_ADD                    = 0x1e\n\tIPV6_FW_DEL                    = 0x1f\n\tIPV6_FW_FLUSH                  = 0x20\n\tIPV6_FW_GET                    = 0x22\n\tIPV6_FW_ZERO                   = 0x21\n\tIPV6_HLIMDEC                   = 0x1\n\tIPV6_HOPLIMIT                  = 0x2f\n\tIPV6_HOPOPTS                   = 0x31\n\tIPV6_IPSEC_POLICY              = 0x1c\n\tIPV6_JOIN_GROUP                = 0xc\n\tIPV6_LEAVE_GROUP               = 0xd\n\tIPV6_MAXHLIM                   = 0xff\n\tIPV6_MAXOPTHDR                 = 0x800\n\tIPV6_MAXPACKET                 = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER      = 0x200\n\tIPV6_MAX_MEMBERSHIPS           = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER       = 0x80\n\tIPV6_MMTU                      = 0x500\n\tIPV6_MSFILTER                  = 0x4a\n\tIPV6_MULTICAST_HOPS            = 0xa\n\tIPV6_MULTICAST_IF              = 0x9\n\tIPV6_MULTICAST_LOOP            = 0xb\n\tIPV6_NEXTHOP                   = 0x30\n\tIPV6_ORIGDSTADDR               = 0x48\n\tIPV6_PATHMTU                   = 0x2c\n\tIPV6_PKTINFO                   = 0x2e\n\tIPV6_PORTRANGE                 = 0xe\n\tIPV6_PORTRANGE_DEFAULT         = 0x0\n\tIPV6_PORTRANGE_HIGH            = 0x1\n\tIPV6_PORTRANGE_LOW             = 0x2\n\tIPV6_PREFER_TEMPADDR           = 0x3f\n\tIPV6_RECVDSTOPTS               = 0x28\n\tIPV6_RECVFLOWID                = 0x46\n\tIPV6_RECVHOPLIMIT              = 0x25\n\tIPV6_RECVHOPOPTS               = 0x27\n\tIPV6_RECVORIGDSTADDR           = 0x48\n\tIPV6_RECVPATHMTU               = 0x2b\n\tIPV6_RECVPKTINFO               = 0x24\n\tIPV6_RECVRSSBUCKETID           = 0x47\n\tIPV6_RECVRTHDR                 = 0x26\n\tIPV6_RECVTCLASS                = 0x39\n\tIPV6_RSSBUCKETID               = 0x45\n\tIPV6_RSS_LISTEN_BUCKET         = 0x42\n\tIPV6_RTHDR                     = 0x33\n\tIPV6_RTHDRDSTOPTS              = 0x23\n\tIPV6_RTHDR_LOOSE               = 0x0\n\tIPV6_RTHDR_STRICT              = 0x1\n\tIPV6_RTHDR_TYPE_0              = 0x0\n\tIPV6_SOCKOPT_RESERVED1         = 0x3\n\tIPV6_TCLASS                    = 0x3d\n\tIPV6_UNICAST_HOPS              = 0x4\n\tIPV6_USE_MIN_MTU               = 0x2a\n\tIPV6_V6ONLY                    = 0x1b\n\tIPV6_VERSION                   = 0x60\n\tIPV6_VERSION_MASK              = 0xf0\n\tIPV6_VLAN_PCP                  = 0x4b\n\tIP_ADD_MEMBERSHIP              = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP       = 0x46\n\tIP_BINDANY                     = 0x18\n\tIP_BINDMULTI                   = 0x19\n\tIP_BLOCK_SOURCE                = 0x48\n\tIP_DEFAULT_MULTICAST_LOOP      = 0x1\n\tIP_DEFAULT_MULTICAST_TTL       = 0x1\n\tIP_DF                          = 0x4000\n\tIP_DONTFRAG                    = 0x43\n\tIP_DROP_MEMBERSHIP             = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP      = 0x47\n\tIP_DUMMYNET3                   = 0x31\n\tIP_DUMMYNET_CONFIGURE          = 0x3c\n\tIP_DUMMYNET_DEL                = 0x3d\n\tIP_DUMMYNET_FLUSH              = 0x3e\n\tIP_DUMMYNET_GET                = 0x40\n\tIP_FLOWID                      = 0x5a\n\tIP_FLOWTYPE                    = 0x5b\n\tIP_FW3                         = 0x30\n\tIP_FW_ADD                      = 0x32\n\tIP_FW_DEL                      = 0x33\n\tIP_FW_FLUSH                    = 0x34\n\tIP_FW_GET                      = 0x36\n\tIP_FW_NAT_CFG                  = 0x38\n\tIP_FW_NAT_DEL                  = 0x39\n\tIP_FW_NAT_GET_CONFIG           = 0x3a\n\tIP_FW_NAT_GET_LOG              = 0x3b\n\tIP_FW_RESETLOG                 = 0x37\n\tIP_FW_TABLE_ADD                = 0x28\n\tIP_FW_TABLE_DEL                = 0x29\n\tIP_FW_TABLE_FLUSH              = 0x2a\n\tIP_FW_TABLE_GETSIZE            = 0x2b\n\tIP_FW_TABLE_LIST               = 0x2c\n\tIP_FW_ZERO                     = 0x35\n\tIP_HDRINCL                     = 0x2\n\tIP_IPSEC_POLICY                = 0x15\n\tIP_MAXPACKET                   = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER        = 0x200\n\tIP_MAX_MEMBERSHIPS             = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER        = 0x80\n\tIP_MAX_SOCK_SRC_FILTER         = 0x80\n\tIP_MF                          = 0x2000\n\tIP_MINTTL                      = 0x42\n\tIP_MSFILTER                    = 0x4a\n\tIP_MSS                         = 0x240\n\tIP_MULTICAST_IF                = 0x9\n\tIP_MULTICAST_LOOP              = 0xb\n\tIP_MULTICAST_TTL               = 0xa\n\tIP_MULTICAST_VIF               = 0xe\n\tIP_OFFMASK                     = 0x1fff\n\tIP_ONESBCAST                   = 0x17\n\tIP_OPTIONS                     = 0x1\n\tIP_ORIGDSTADDR                 = 0x1b\n\tIP_PORTRANGE                   = 0x13\n\tIP_PORTRANGE_DEFAULT           = 0x0\n\tIP_PORTRANGE_HIGH              = 0x1\n\tIP_PORTRANGE_LOW               = 0x2\n\tIP_RECVDSTADDR                 = 0x7\n\tIP_RECVFLOWID                  = 0x5d\n\tIP_RECVIF                      = 0x14\n\tIP_RECVOPTS                    = 0x5\n\tIP_RECVORIGDSTADDR             = 0x1b\n\tIP_RECVRETOPTS                 = 0x6\n\tIP_RECVRSSBUCKETID             = 0x5e\n\tIP_RECVTOS                     = 0x44\n\tIP_RECVTTL                     = 0x41\n\tIP_RETOPTS                     = 0x8\n\tIP_RF                          = 0x8000\n\tIP_RSSBUCKETID                 = 0x5c\n\tIP_RSS_LISTEN_BUCKET           = 0x1a\n\tIP_RSVP_OFF                    = 0x10\n\tIP_RSVP_ON                     = 0xf\n\tIP_RSVP_VIF_OFF                = 0x12\n\tIP_RSVP_VIF_ON                 = 0x11\n\tIP_SENDSRCADDR                 = 0x7\n\tIP_TOS                         = 0x3\n\tIP_TTL                         = 0x4\n\tIP_UNBLOCK_SOURCE              = 0x49\n\tIP_VLAN_PCP                    = 0x4b\n\tISIG                           = 0x80\n\tISTRIP                         = 0x20\n\tITIMER_PROF                    = 0x2\n\tITIMER_REAL                    = 0x0\n\tITIMER_VIRTUAL                 = 0x1\n\tIXANY                          = 0x800\n\tIXOFF                          = 0x400\n\tIXON                           = 0x200\n\tKERN_HOSTNAME                  = 0xa\n\tKERN_OSRELEASE                 = 0x2\n\tKERN_OSTYPE                    = 0x1\n\tKERN_VERSION                   = 0x4\n\tLOCAL_CONNWAIT                 = 0x4\n\tLOCAL_CREDS                    = 0x2\n\tLOCAL_PEERCRED                 = 0x1\n\tLOCAL_VENDOR                   = 0x80000000\n\tLOCK_EX                        = 0x2\n\tLOCK_NB                        = 0x4\n\tLOCK_SH                        = 0x1\n\tLOCK_UN                        = 0x8\n\tMADV_AUTOSYNC                  = 0x7\n\tMADV_CORE                      = 0x9\n\tMADV_DONTNEED                  = 0x4\n\tMADV_FREE                      = 0x5\n\tMADV_NOCORE                    = 0x8\n\tMADV_NORMAL                    = 0x0\n\tMADV_NOSYNC                    = 0x6\n\tMADV_PROTECT                   = 0xa\n\tMADV_RANDOM                    = 0x1\n\tMADV_SEQUENTIAL                = 0x2\n\tMADV_WILLNEED                  = 0x3\n\tMAP_32BIT                      = 0x80000\n\tMAP_ALIGNED_SUPER              = 0x1000000\n\tMAP_ALIGNMENT_MASK             = -0x1000000\n\tMAP_ALIGNMENT_SHIFT            = 0x18\n\tMAP_ANON                       = 0x1000\n\tMAP_ANONYMOUS                  = 0x1000\n\tMAP_COPY                       = 0x2\n\tMAP_EXCL                       = 0x4000\n\tMAP_FILE                       = 0x0\n\tMAP_FIXED                      = 0x10\n\tMAP_GUARD                      = 0x2000\n\tMAP_HASSEMAPHORE               = 0x200\n\tMAP_NOCORE                     = 0x20000\n\tMAP_NOSYNC                     = 0x800\n\tMAP_PREFAULT_READ              = 0x40000\n\tMAP_PRIVATE                    = 0x2\n\tMAP_RESERVED0020               = 0x20\n\tMAP_RESERVED0040               = 0x40\n\tMAP_RESERVED0080               = 0x80\n\tMAP_RESERVED0100               = 0x100\n\tMAP_SHARED                     = 0x1\n\tMAP_STACK                      = 0x400\n\tMCAST_BLOCK_SOURCE             = 0x54\n\tMCAST_EXCLUDE                  = 0x2\n\tMCAST_INCLUDE                  = 0x1\n\tMCAST_JOIN_GROUP               = 0x50\n\tMCAST_JOIN_SOURCE_GROUP        = 0x52\n\tMCAST_LEAVE_GROUP              = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP       = 0x53\n\tMCAST_UNBLOCK_SOURCE           = 0x55\n\tMCAST_UNDEFINED                = 0x0\n\tMCL_CURRENT                    = 0x1\n\tMCL_FUTURE                     = 0x2\n\tMNT_ACLS                       = 0x8000000\n\tMNT_ASYNC                      = 0x40\n\tMNT_AUTOMOUNTED                = 0x200000000\n\tMNT_BYFSID                     = 0x8000000\n\tMNT_CMDFLAGS                   = 0xd0f0000\n\tMNT_DEFEXPORTED                = 0x200\n\tMNT_DELEXPORT                  = 0x20000\n\tMNT_EXKERB                     = 0x800\n\tMNT_EXPORTANON                 = 0x400\n\tMNT_EXPORTED                   = 0x100\n\tMNT_EXPUBLIC                   = 0x20000000\n\tMNT_EXRDONLY                   = 0x80\n\tMNT_FORCE                      = 0x80000\n\tMNT_GJOURNAL                   = 0x2000000\n\tMNT_IGNORE                     = 0x800000\n\tMNT_LAZY                       = 0x3\n\tMNT_LOCAL                      = 0x1000\n\tMNT_MULTILABEL                 = 0x4000000\n\tMNT_NFS4ACLS                   = 0x10\n\tMNT_NOATIME                    = 0x10000000\n\tMNT_NOCLUSTERR                 = 0x40000000\n\tMNT_NOCLUSTERW                 = 0x80000000\n\tMNT_NOEXEC                     = 0x4\n\tMNT_NONBUSY                    = 0x4000000\n\tMNT_NOSUID                     = 0x8\n\tMNT_NOSYMFOLLOW                = 0x400000\n\tMNT_NOWAIT                     = 0x2\n\tMNT_QUOTA                      = 0x2000\n\tMNT_RDONLY                     = 0x1\n\tMNT_RELOAD                     = 0x40000\n\tMNT_ROOTFS                     = 0x4000\n\tMNT_SNAPSHOT                   = 0x1000000\n\tMNT_SOFTDEP                    = 0x200000\n\tMNT_SUIDDIR                    = 0x100000\n\tMNT_SUJ                        = 0x100000000\n\tMNT_SUSPEND                    = 0x4\n\tMNT_SYNCHRONOUS                = 0x2\n\tMNT_UNION                      = 0x20\n\tMNT_UNTRUSTED                  = 0x800000000\n\tMNT_UPDATE                     = 0x10000\n\tMNT_UPDATEMASK                 = 0xad8d0807e\n\tMNT_USER                       = 0x8000\n\tMNT_VERIFIED                   = 0x400000000\n\tMNT_VISFLAGMASK                = 0xffef0ffff\n\tMNT_WAIT                       = 0x1\n\tMSG_CMSG_CLOEXEC               = 0x40000\n\tMSG_COMPAT                     = 0x8000\n\tMSG_CTRUNC                     = 0x20\n\tMSG_DONTROUTE                  = 0x4\n\tMSG_DONTWAIT                   = 0x80\n\tMSG_EOF                        = 0x100\n\tMSG_EOR                        = 0x8\n\tMSG_NBIO                       = 0x4000\n\tMSG_NOSIGNAL                   = 0x20000\n\tMSG_NOTIFICATION               = 0x2000\n\tMSG_OOB                        = 0x1\n\tMSG_PEEK                       = 0x2\n\tMSG_TRUNC                      = 0x10\n\tMSG_WAITALL                    = 0x40\n\tMSG_WAITFORONE                 = 0x80000\n\tMS_ASYNC                       = 0x1\n\tMS_INVALIDATE                  = 0x2\n\tMS_SYNC                        = 0x0\n\tNAME_MAX                       = 0xff\n\tNET_RT_DUMP                    = 0x1\n\tNET_RT_FLAGS                   = 0x2\n\tNET_RT_IFLIST                  = 0x3\n\tNET_RT_IFLISTL                 = 0x5\n\tNET_RT_IFMALIST                = 0x4\n\tNFDBITS                        = 0x40\n\tNOFLSH                         = 0x80000000\n\tNOKERNINFO                     = 0x2000000\n\tNOTE_ABSTIME                   = 0x10\n\tNOTE_ATTRIB                    = 0x8\n\tNOTE_CHILD                     = 0x4\n\tNOTE_CLOSE                     = 0x100\n\tNOTE_CLOSE_WRITE               = 0x200\n\tNOTE_DELETE                    = 0x1\n\tNOTE_EXEC                      = 0x20000000\n\tNOTE_EXIT                      = 0x80000000\n\tNOTE_EXTEND                    = 0x4\n\tNOTE_FFAND                     = 0x40000000\n\tNOTE_FFCOPY                    = 0xc0000000\n\tNOTE_FFCTRLMASK                = 0xc0000000\n\tNOTE_FFLAGSMASK                = 0xffffff\n\tNOTE_FFNOP                     = 0x0\n\tNOTE_FFOR                      = 0x80000000\n\tNOTE_FILE_POLL                 = 0x2\n\tNOTE_FORK                      = 0x40000000\n\tNOTE_LINK                      = 0x10\n\tNOTE_LOWAT                     = 0x1\n\tNOTE_MSECONDS                  = 0x2\n\tNOTE_NSECONDS                  = 0x8\n\tNOTE_OPEN                      = 0x80\n\tNOTE_PCTRLMASK                 = 0xf0000000\n\tNOTE_PDATAMASK                 = 0xfffff\n\tNOTE_READ                      = 0x400\n\tNOTE_RENAME                    = 0x20\n\tNOTE_REVOKE                    = 0x40\n\tNOTE_SECONDS                   = 0x1\n\tNOTE_TRACK                     = 0x1\n\tNOTE_TRACKERR                  = 0x2\n\tNOTE_TRIGGER                   = 0x1000000\n\tNOTE_USECONDS                  = 0x4\n\tNOTE_WRITE                     = 0x2\n\tOCRNL                          = 0x10\n\tONLCR                          = 0x2\n\tONLRET                         = 0x40\n\tONOCR                          = 0x20\n\tONOEOT                         = 0x8\n\tOPOST                          = 0x1\n\tOXTABS                         = 0x4\n\tO_ACCMODE                      = 0x3\n\tO_APPEND                       = 0x8\n\tO_ASYNC                        = 0x40\n\tO_CLOEXEC                      = 0x100000\n\tO_CREAT                        = 0x200\n\tO_DIRECT                       = 0x10000\n\tO_DIRECTORY                    = 0x20000\n\tO_EXCL                         = 0x800\n\tO_EXEC                         = 0x40000\n\tO_EXLOCK                       = 0x20\n\tO_FSYNC                        = 0x80\n\tO_NDELAY                       = 0x4\n\tO_NOCTTY                       = 0x8000\n\tO_NOFOLLOW                     = 0x100\n\tO_NONBLOCK                     = 0x4\n\tO_RDONLY                       = 0x0\n\tO_RDWR                         = 0x2\n\tO_RESOLVE_BENEATH              = 0x800000\n\tO_SEARCH                       = 0x40000\n\tO_SHLOCK                       = 0x10\n\tO_SYNC                         = 0x80\n\tO_TRUNC                        = 0x400\n\tO_TTY_INIT                     = 0x80000\n\tO_VERIFY                       = 0x200000\n\tO_WRONLY                       = 0x1\n\tPARENB                         = 0x1000\n\tPARMRK                         = 0x8\n\tPARODD                         = 0x2000\n\tPENDIN                         = 0x20000000\n\tPIOD_READ_D                    = 0x1\n\tPIOD_READ_I                    = 0x3\n\tPIOD_WRITE_D                   = 0x2\n\tPIOD_WRITE_I                   = 0x4\n\tPRIO_PGRP                      = 0x1\n\tPRIO_PROCESS                   = 0x0\n\tPRIO_USER                      = 0x2\n\tPROT_EXEC                      = 0x4\n\tPROT_NONE                      = 0x0\n\tPROT_READ                      = 0x1\n\tPROT_WRITE                     = 0x2\n\tPTRACE_DEFAULT                 = 0x1\n\tPTRACE_EXEC                    = 0x1\n\tPTRACE_FORK                    = 0x8\n\tPTRACE_LWP                     = 0x10\n\tPTRACE_SCE                     = 0x2\n\tPTRACE_SCX                     = 0x4\n\tPTRACE_SYSCALL                 = 0x6\n\tPTRACE_VFORK                   = 0x20\n\tPT_ATTACH                      = 0xa\n\tPT_CLEARSTEP                   = 0x10\n\tPT_CONTINUE                    = 0x7\n\tPT_DETACH                      = 0xb\n\tPT_FIRSTMACH                   = 0x40\n\tPT_FOLLOW_FORK                 = 0x17\n\tPT_GETDBREGS                   = 0x25\n\tPT_GETFPREGS                   = 0x23\n\tPT_GETLWPLIST                  = 0xf\n\tPT_GETNUMLWPS                  = 0xe\n\tPT_GETREGS                     = 0x21\n\tPT_GET_EVENT_MASK              = 0x19\n\tPT_GET_SC_ARGS                 = 0x1b\n\tPT_GET_SC_RET                  = 0x1c\n\tPT_IO                          = 0xc\n\tPT_KILL                        = 0x8\n\tPT_LWPINFO                     = 0xd\n\tPT_LWP_EVENTS                  = 0x18\n\tPT_READ_D                      = 0x2\n\tPT_READ_I                      = 0x1\n\tPT_RESUME                      = 0x13\n\tPT_SETDBREGS                   = 0x26\n\tPT_SETFPREGS                   = 0x24\n\tPT_SETREGS                     = 0x22\n\tPT_SETSTEP                     = 0x11\n\tPT_SET_EVENT_MASK              = 0x1a\n\tPT_STEP                        = 0x9\n\tPT_SUSPEND                     = 0x12\n\tPT_SYSCALL                     = 0x16\n\tPT_TO_SCE                      = 0x14\n\tPT_TO_SCX                      = 0x15\n\tPT_TRACE_ME                    = 0x0\n\tPT_VM_ENTRY                    = 0x29\n\tPT_VM_TIMESTAMP                = 0x28\n\tPT_WRITE_D                     = 0x5\n\tPT_WRITE_I                     = 0x4\n\tP_ZONEID                       = 0xc\n\tRLIMIT_AS                      = 0xa\n\tRLIMIT_CORE                    = 0x4\n\tRLIMIT_CPU                     = 0x0\n\tRLIMIT_DATA                    = 0x2\n\tRLIMIT_FSIZE                   = 0x1\n\tRLIMIT_MEMLOCK                 = 0x6\n\tRLIMIT_NOFILE                  = 0x8\n\tRLIMIT_NPROC                   = 0x7\n\tRLIMIT_RSS                     = 0x5\n\tRLIMIT_STACK                   = 0x3\n\tRLIM_INFINITY                  = 0x7fffffffffffffff\n\tRTAX_AUTHOR                    = 0x6\n\tRTAX_BRD                       = 0x7\n\tRTAX_DST                       = 0x0\n\tRTAX_GATEWAY                   = 0x1\n\tRTAX_GENMASK                   = 0x3\n\tRTAX_IFA                       = 0x5\n\tRTAX_IFP                       = 0x4\n\tRTAX_MAX                       = 0x8\n\tRTAX_NETMASK                   = 0x2\n\tRTA_AUTHOR                     = 0x40\n\tRTA_BRD                        = 0x80\n\tRTA_DST                        = 0x1\n\tRTA_GATEWAY                    = 0x2\n\tRTA_GENMASK                    = 0x8\n\tRTA_IFA                        = 0x20\n\tRTA_IFP                        = 0x10\n\tRTA_NETMASK                    = 0x4\n\tRTF_BLACKHOLE                  = 0x1000\n\tRTF_BROADCAST                  = 0x400000\n\tRTF_DONE                       = 0x40\n\tRTF_DYNAMIC                    = 0x10\n\tRTF_FIXEDMTU                   = 0x80000\n\tRTF_FMASK                      = 0x1004d808\n\tRTF_GATEWAY                    = 0x2\n\tRTF_GWFLAG_COMPAT              = 0x80000000\n\tRTF_HOST                       = 0x4\n\tRTF_LLDATA                     = 0x400\n\tRTF_LLINFO                     = 0x400\n\tRTF_LOCAL                      = 0x200000\n\tRTF_MODIFIED                   = 0x20\n\tRTF_MULTICAST                  = 0x800000\n\tRTF_PINNED                     = 0x100000\n\tRTF_PROTO1                     = 0x8000\n\tRTF_PROTO2                     = 0x4000\n\tRTF_PROTO3                     = 0x40000\n\tRTF_REJECT                     = 0x8\n\tRTF_RNH_LOCKED                 = 0x40000000\n\tRTF_STATIC                     = 0x800\n\tRTF_STICKY                     = 0x10000000\n\tRTF_UP                         = 0x1\n\tRTF_XRESOLVE                   = 0x200\n\tRTM_ADD                        = 0x1\n\tRTM_CHANGE                     = 0x3\n\tRTM_DELADDR                    = 0xd\n\tRTM_DELETE                     = 0x2\n\tRTM_DELMADDR                   = 0x10\n\tRTM_GET                        = 0x4\n\tRTM_IEEE80211                  = 0x12\n\tRTM_IFANNOUNCE                 = 0x11\n\tRTM_IFINFO                     = 0xe\n\tRTM_LOCK                       = 0x8\n\tRTM_LOSING                     = 0x5\n\tRTM_MISS                       = 0x7\n\tRTM_NEWADDR                    = 0xc\n\tRTM_NEWMADDR                   = 0xf\n\tRTM_REDIRECT                   = 0x6\n\tRTM_RESOLVE                    = 0xb\n\tRTM_RTTUNIT                    = 0xf4240\n\tRTM_VERSION                    = 0x5\n\tRTV_EXPIRE                     = 0x4\n\tRTV_HOPCOUNT                   = 0x2\n\tRTV_MTU                        = 0x1\n\tRTV_RPIPE                      = 0x8\n\tRTV_RTT                        = 0x40\n\tRTV_RTTVAR                     = 0x80\n\tRTV_SPIPE                      = 0x10\n\tRTV_SSTHRESH                   = 0x20\n\tRTV_WEIGHT                     = 0x100\n\tRT_ALL_FIBS                    = -0x1\n\tRT_BLACKHOLE                   = 0x40\n\tRT_DEFAULT_FIB                 = 0x0\n\tRT_HAS_GW                      = 0x80\n\tRT_HAS_HEADER                  = 0x10\n\tRT_HAS_HEADER_BIT              = 0x4\n\tRT_L2_ME                       = 0x4\n\tRT_L2_ME_BIT                   = 0x2\n\tRT_LLE_CACHE                   = 0x100\n\tRT_MAY_LOOP                    = 0x8\n\tRT_MAY_LOOP_BIT                = 0x3\n\tRT_REJECT                      = 0x20\n\tRUSAGE_CHILDREN                = -0x1\n\tRUSAGE_SELF                    = 0x0\n\tRUSAGE_THREAD                  = 0x1\n\tSCM_BINTIME                    = 0x4\n\tSCM_CREDS                      = 0x3\n\tSCM_MONOTONIC                  = 0x6\n\tSCM_REALTIME                   = 0x5\n\tSCM_RIGHTS                     = 0x1\n\tSCM_TIMESTAMP                  = 0x2\n\tSCM_TIME_INFO                  = 0x7\n\tSEEK_CUR                       = 0x1\n\tSEEK_DATA                      = 0x3\n\tSEEK_END                       = 0x2\n\tSEEK_HOLE                      = 0x4\n\tSEEK_SET                       = 0x0\n\tSHUT_RD                        = 0x0\n\tSHUT_RDWR                      = 0x2\n\tSHUT_WR                        = 0x1\n\tSIOCADDMULTI                   = 0x80206931\n\tSIOCAIFADDR                    = 0x8040691a\n\tSIOCAIFGROUP                   = 0x80286987\n\tSIOCATMARK                     = 0x40047307\n\tSIOCDELMULTI                   = 0x80206932\n\tSIOCDIFADDR                    = 0x80206919\n\tSIOCDIFGROUP                   = 0x80286989\n\tSIOCDIFPHYADDR                 = 0x80206949\n\tSIOCGDRVSPEC                   = 0xc028697b\n\tSIOCGETSGCNT                   = 0xc0207210\n\tSIOCGETVIFCNT                  = 0xc028720f\n\tSIOCGHIWAT                     = 0x40047301\n\tSIOCGHWADDR                    = 0xc020693e\n\tSIOCGI2C                       = 0xc020693d\n\tSIOCGIFADDR                    = 0xc0206921\n\tSIOCGIFALIAS                   = 0xc044692d\n\tSIOCGIFBRDADDR                 = 0xc0206923\n\tSIOCGIFCAP                     = 0xc020691f\n\tSIOCGIFCONF                    = 0xc0106924\n\tSIOCGIFDESCR                   = 0xc020692a\n\tSIOCGIFDOWNREASON              = 0xc058699a\n\tSIOCGIFDSTADDR                 = 0xc0206922\n\tSIOCGIFFIB                     = 0xc020695c\n\tSIOCGIFFLAGS                   = 0xc0206911\n\tSIOCGIFGENERIC                 = 0xc020693a\n\tSIOCGIFGMEMB                   = 0xc028698a\n\tSIOCGIFGROUP                   = 0xc0286988\n\tSIOCGIFINDEX                   = 0xc0206920\n\tSIOCGIFMAC                     = 0xc0206926\n\tSIOCGIFMEDIA                   = 0xc0306938\n\tSIOCGIFMETRIC                  = 0xc0206917\n\tSIOCGIFMTU                     = 0xc0206933\n\tSIOCGIFNETMASK                 = 0xc0206925\n\tSIOCGIFPDSTADDR                = 0xc0206948\n\tSIOCGIFPHYS                    = 0xc0206935\n\tSIOCGIFPSRCADDR                = 0xc0206947\n\tSIOCGIFRSSHASH                 = 0xc0186997\n\tSIOCGIFRSSKEY                  = 0xc0946996\n\tSIOCGIFSTATUS                  = 0xc331693b\n\tSIOCGIFXMEDIA                  = 0xc030698b\n\tSIOCGLANPCP                    = 0xc0206998\n\tSIOCGLOWAT                     = 0x40047303\n\tSIOCGPGRP                      = 0x40047309\n\tSIOCGPRIVATE_0                 = 0xc0206950\n\tSIOCGPRIVATE_1                 = 0xc0206951\n\tSIOCGTUNFIB                    = 0xc020695e\n\tSIOCIFCREATE                   = 0xc020697a\n\tSIOCIFCREATE2                  = 0xc020697c\n\tSIOCIFDESTROY                  = 0x80206979\n\tSIOCIFGCLONERS                 = 0xc0106978\n\tSIOCSDRVSPEC                   = 0x8028697b\n\tSIOCSHIWAT                     = 0x80047300\n\tSIOCSIFADDR                    = 0x8020690c\n\tSIOCSIFBRDADDR                 = 0x80206913\n\tSIOCSIFCAP                     = 0x8020691e\n\tSIOCSIFDESCR                   = 0x80206929\n\tSIOCSIFDSTADDR                 = 0x8020690e\n\tSIOCSIFFIB                     = 0x8020695d\n\tSIOCSIFFLAGS                   = 0x80206910\n\tSIOCSIFGENERIC                 = 0x80206939\n\tSIOCSIFLLADDR                  = 0x8020693c\n\tSIOCSIFMAC                     = 0x80206927\n\tSIOCSIFMEDIA                   = 0xc0206937\n\tSIOCSIFMETRIC                  = 0x80206918\n\tSIOCSIFMTU                     = 0x80206934\n\tSIOCSIFNAME                    = 0x80206928\n\tSIOCSIFNETMASK                 = 0x80206916\n\tSIOCSIFPHYADDR                 = 0x80406946\n\tSIOCSIFPHYS                    = 0x80206936\n\tSIOCSIFRVNET                   = 0xc020695b\n\tSIOCSIFVNET                    = 0xc020695a\n\tSIOCSLANPCP                    = 0x80206999\n\tSIOCSLOWAT                     = 0x80047302\n\tSIOCSPGRP                      = 0x80047308\n\tSIOCSTUNFIB                    = 0x8020695f\n\tSOCK_CLOEXEC                   = 0x10000000\n\tSOCK_DGRAM                     = 0x2\n\tSOCK_MAXADDRLEN                = 0xff\n\tSOCK_NONBLOCK                  = 0x20000000\n\tSOCK_RAW                       = 0x3\n\tSOCK_RDM                       = 0x4\n\tSOCK_SEQPACKET                 = 0x5\n\tSOCK_STREAM                    = 0x1\n\tSOL_LOCAL                      = 0x0\n\tSOL_SOCKET                     = 0xffff\n\tSOMAXCONN                      = 0x80\n\tSO_ACCEPTCONN                  = 0x2\n\tSO_ACCEPTFILTER                = 0x1000\n\tSO_BINTIME                     = 0x2000\n\tSO_BROADCAST                   = 0x20\n\tSO_DEBUG                       = 0x1\n\tSO_DOMAIN                      = 0x1019\n\tSO_DONTROUTE                   = 0x10\n\tSO_ERROR                       = 0x1007\n\tSO_KEEPALIVE                   = 0x8\n\tSO_LABEL                       = 0x1009\n\tSO_LINGER                      = 0x80\n\tSO_LISTENINCQLEN               = 0x1013\n\tSO_LISTENQLEN                  = 0x1012\n\tSO_LISTENQLIMIT                = 0x1011\n\tSO_MAX_PACING_RATE             = 0x1018\n\tSO_NOSIGPIPE                   = 0x800\n\tSO_NO_DDP                      = 0x8000\n\tSO_NO_OFFLOAD                  = 0x4000\n\tSO_OOBINLINE                   = 0x100\n\tSO_PEERLABEL                   = 0x1010\n\tSO_PROTOCOL                    = 0x1016\n\tSO_PROTOTYPE                   = 0x1016\n\tSO_RCVBUF                      = 0x1002\n\tSO_RCVLOWAT                    = 0x1004\n\tSO_RCVTIMEO                    = 0x1006\n\tSO_RERROR                      = 0x20000\n\tSO_REUSEADDR                   = 0x4\n\tSO_REUSEPORT                   = 0x200\n\tSO_REUSEPORT_LB                = 0x10000\n\tSO_SETFIB                      = 0x1014\n\tSO_SNDBUF                      = 0x1001\n\tSO_SNDLOWAT                    = 0x1003\n\tSO_SNDTIMEO                    = 0x1005\n\tSO_TIMESTAMP                   = 0x400\n\tSO_TS_BINTIME                  = 0x1\n\tSO_TS_CLOCK                    = 0x1017\n\tSO_TS_CLOCK_MAX                = 0x3\n\tSO_TS_DEFAULT                  = 0x0\n\tSO_TS_MONOTONIC                = 0x3\n\tSO_TS_REALTIME                 = 0x2\n\tSO_TS_REALTIME_MICRO           = 0x0\n\tSO_TYPE                        = 0x1008\n\tSO_USELOOPBACK                 = 0x40\n\tSO_USER_COOKIE                 = 0x1015\n\tSO_VENDOR                      = 0x80000000\n\tS_BLKSIZE                      = 0x200\n\tS_IEXEC                        = 0x40\n\tS_IFBLK                        = 0x6000\n\tS_IFCHR                        = 0x2000\n\tS_IFDIR                        = 0x4000\n\tS_IFIFO                        = 0x1000\n\tS_IFLNK                        = 0xa000\n\tS_IFMT                         = 0xf000\n\tS_IFREG                        = 0x8000\n\tS_IFSOCK                       = 0xc000\n\tS_IFWHT                        = 0xe000\n\tS_IREAD                        = 0x100\n\tS_IRGRP                        = 0x20\n\tS_IROTH                        = 0x4\n\tS_IRUSR                        = 0x100\n\tS_IRWXG                        = 0x38\n\tS_IRWXO                        = 0x7\n\tS_IRWXU                        = 0x1c0\n\tS_ISGID                        = 0x400\n\tS_ISTXT                        = 0x200\n\tS_ISUID                        = 0x800\n\tS_ISVTX                        = 0x200\n\tS_IWGRP                        = 0x10\n\tS_IWOTH                        = 0x2\n\tS_IWRITE                       = 0x80\n\tS_IWUSR                        = 0x80\n\tS_IXGRP                        = 0x8\n\tS_IXOTH                        = 0x1\n\tS_IXUSR                        = 0x40\n\tTAB0                           = 0x0\n\tTAB3                           = 0x4\n\tTABDLY                         = 0x4\n\tTCIFLUSH                       = 0x1\n\tTCIOFF                         = 0x3\n\tTCIOFLUSH                      = 0x3\n\tTCION                          = 0x4\n\tTCOFLUSH                       = 0x2\n\tTCOOFF                         = 0x1\n\tTCOON                          = 0x2\n\tTCPOPT_EOL                     = 0x0\n\tTCPOPT_FAST_OPEN               = 0x22\n\tTCPOPT_MAXSEG                  = 0x2\n\tTCPOPT_NOP                     = 0x1\n\tTCPOPT_PAD                     = 0x0\n\tTCPOPT_SACK                    = 0x5\n\tTCPOPT_SACK_PERMITTED          = 0x4\n\tTCPOPT_SIGNATURE               = 0x13\n\tTCPOPT_TIMESTAMP               = 0x8\n\tTCPOPT_WINDOW                  = 0x3\n\tTCP_BBR_ACK_COMP_ALG           = 0x448\n\tTCP_BBR_ALGORITHM              = 0x43b\n\tTCP_BBR_DRAIN_INC_EXTRA        = 0x43c\n\tTCP_BBR_DRAIN_PG               = 0x42e\n\tTCP_BBR_EXTRA_GAIN             = 0x449\n\tTCP_BBR_EXTRA_STATE            = 0x453\n\tTCP_BBR_FLOOR_MIN_TSO          = 0x454\n\tTCP_BBR_HDWR_PACE              = 0x451\n\tTCP_BBR_HOLD_TARGET            = 0x436\n\tTCP_BBR_IWINTSO                = 0x42b\n\tTCP_BBR_LOWGAIN_FD             = 0x436\n\tTCP_BBR_LOWGAIN_HALF           = 0x435\n\tTCP_BBR_LOWGAIN_THRESH         = 0x434\n\tTCP_BBR_MAX_RTO                = 0x439\n\tTCP_BBR_MIN_RTO                = 0x438\n\tTCP_BBR_MIN_TOPACEOUT          = 0x455\n\tTCP_BBR_ONE_RETRAN             = 0x431\n\tTCP_BBR_PACE_CROSS             = 0x442\n\tTCP_BBR_PACE_DEL_TAR           = 0x43f\n\tTCP_BBR_PACE_OH                = 0x435\n\tTCP_BBR_PACE_PER_SEC           = 0x43e\n\tTCP_BBR_PACE_SEG_MAX           = 0x440\n\tTCP_BBR_PACE_SEG_MIN           = 0x441\n\tTCP_BBR_POLICER_DETECT         = 0x457\n\tTCP_BBR_PROBE_RTT_GAIN         = 0x44d\n\tTCP_BBR_PROBE_RTT_INT          = 0x430\n\tTCP_BBR_PROBE_RTT_LEN          = 0x44e\n\tTCP_BBR_RACK_RTT_USE           = 0x44a\n\tTCP_BBR_RECFORCE               = 0x42c\n\tTCP_BBR_REC_OVER_HPTS          = 0x43a\n\tTCP_BBR_RETRAN_WTSO            = 0x44b\n\tTCP_BBR_RWND_IS_APP            = 0x42f\n\tTCP_BBR_SEND_IWND_IN_TSO       = 0x44f\n\tTCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d\n\tTCP_BBR_STARTUP_LOSS_EXIT      = 0x432\n\tTCP_BBR_STARTUP_PG             = 0x42d\n\tTCP_BBR_TMR_PACE_OH            = 0x448\n\tTCP_BBR_TSLIMITS               = 0x434\n\tTCP_BBR_TSTMP_RAISES           = 0x456\n\tTCP_BBR_UNLIMITED              = 0x43b\n\tTCP_BBR_USEDEL_RATE            = 0x437\n\tTCP_BBR_USE_LOWGAIN            = 0x433\n\tTCP_BBR_USE_RACK_CHEAT         = 0x450\n\tTCP_BBR_UTTER_MAX_TSO          = 0x452\n\tTCP_CA_NAME_MAX                = 0x10\n\tTCP_CCALGOOPT                  = 0x41\n\tTCP_CONGESTION                 = 0x40\n\tTCP_DATA_AFTER_CLOSE           = 0x44c\n\tTCP_DELACK                     = 0x48\n\tTCP_FASTOPEN                   = 0x401\n\tTCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10\n\tTCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4\n\tTCP_FASTOPEN_PSK_LEN           = 0x10\n\tTCP_FUNCTION_BLK               = 0x2000\n\tTCP_FUNCTION_NAME_LEN_MAX      = 0x20\n\tTCP_INFO                       = 0x20\n\tTCP_KEEPCNT                    = 0x400\n\tTCP_KEEPIDLE                   = 0x100\n\tTCP_KEEPINIT                   = 0x80\n\tTCP_KEEPINTVL                  = 0x200\n\tTCP_LOG                        = 0x22\n\tTCP_LOGBUF                     = 0x23\n\tTCP_LOGDUMP                    = 0x25\n\tTCP_LOGDUMPID                  = 0x26\n\tTCP_LOGID                      = 0x24\n\tTCP_LOG_ID_LEN                 = 0x40\n\tTCP_MAXBURST                   = 0x4\n\tTCP_MAXHLEN                    = 0x3c\n\tTCP_MAXOLEN                    = 0x28\n\tTCP_MAXSEG                     = 0x2\n\tTCP_MAXWIN                     = 0xffff\n\tTCP_MAX_SACK                   = 0x4\n\tTCP_MAX_WINSHIFT               = 0xe\n\tTCP_MD5SIG                     = 0x10\n\tTCP_MINMSS                     = 0xd8\n\tTCP_MSS                        = 0x218\n\tTCP_NODELAY                    = 0x1\n\tTCP_NOOPT                      = 0x8\n\tTCP_NOPUSH                     = 0x4\n\tTCP_PCAP_IN                    = 0x1000\n\tTCP_PCAP_OUT                   = 0x800\n\tTCP_RACK_EARLY_RECOV           = 0x423\n\tTCP_RACK_EARLY_SEG             = 0x424\n\tTCP_RACK_GP_INCREASE           = 0x446\n\tTCP_RACK_IDLE_REDUCE_HIGH      = 0x444\n\tTCP_RACK_MIN_PACE              = 0x445\n\tTCP_RACK_MIN_PACE_SEG          = 0x446\n\tTCP_RACK_MIN_TO                = 0x422\n\tTCP_RACK_PACE_ALWAYS           = 0x41f\n\tTCP_RACK_PACE_MAX_SEG          = 0x41e\n\tTCP_RACK_PACE_REDUCE           = 0x41d\n\tTCP_RACK_PKT_DELAY             = 0x428\n\tTCP_RACK_PROP                  = 0x41b\n\tTCP_RACK_PROP_RATE             = 0x420\n\tTCP_RACK_PRR_SENDALOT          = 0x421\n\tTCP_RACK_REORD_FADE            = 0x426\n\tTCP_RACK_REORD_THRESH          = 0x425\n\tTCP_RACK_TLP_INC_VAR           = 0x429\n\tTCP_RACK_TLP_REDUCE            = 0x41c\n\tTCP_RACK_TLP_THRESH            = 0x427\n\tTCP_RACK_TLP_USE               = 0x447\n\tTCP_VENDOR                     = 0x80000000\n\tTCSAFLUSH                      = 0x2\n\tTIMER_ABSTIME                  = 0x1\n\tTIMER_RELTIME                  = 0x0\n\tTIOCCBRK                       = 0x2000747a\n\tTIOCCDTR                       = 0x20007478\n\tTIOCCONS                       = 0x80047462\n\tTIOCDRAIN                      = 0x2000745e\n\tTIOCEXCL                       = 0x2000740d\n\tTIOCEXT                        = 0x80047460\n\tTIOCFLUSH                      = 0x80047410\n\tTIOCGDRAINWAIT                 = 0x40047456\n\tTIOCGETA                       = 0x402c7413\n\tTIOCGETD                       = 0x4004741a\n\tTIOCGPGRP                      = 0x40047477\n\tTIOCGPTN                       = 0x4004740f\n\tTIOCGSID                       = 0x40047463\n\tTIOCGWINSZ                     = 0x40087468\n\tTIOCMBIC                       = 0x8004746b\n\tTIOCMBIS                       = 0x8004746c\n\tTIOCMGDTRWAIT                  = 0x4004745a\n\tTIOCMGET                       = 0x4004746a\n\tTIOCMSDTRWAIT                  = 0x8004745b\n\tTIOCMSET                       = 0x8004746d\n\tTIOCM_CAR                      = 0x40\n\tTIOCM_CD                       = 0x40\n\tTIOCM_CTS                      = 0x20\n\tTIOCM_DCD                      = 0x40\n\tTIOCM_DSR                      = 0x100\n\tTIOCM_DTR                      = 0x2\n\tTIOCM_LE                       = 0x1\n\tTIOCM_RI                       = 0x80\n\tTIOCM_RNG                      = 0x80\n\tTIOCM_RTS                      = 0x4\n\tTIOCM_SR                       = 0x10\n\tTIOCM_ST                       = 0x8\n\tTIOCNOTTY                      = 0x20007471\n\tTIOCNXCL                       = 0x2000740e\n\tTIOCOUTQ                       = 0x40047473\n\tTIOCPKT                        = 0x80047470\n\tTIOCPKT_DATA                   = 0x0\n\tTIOCPKT_DOSTOP                 = 0x20\n\tTIOCPKT_FLUSHREAD              = 0x1\n\tTIOCPKT_FLUSHWRITE             = 0x2\n\tTIOCPKT_IOCTL                  = 0x40\n\tTIOCPKT_NOSTOP                 = 0x10\n\tTIOCPKT_START                  = 0x8\n\tTIOCPKT_STOP                   = 0x4\n\tTIOCPTMASTER                   = 0x2000741c\n\tTIOCSBRK                       = 0x2000747b\n\tTIOCSCTTY                      = 0x20007461\n\tTIOCSDRAINWAIT                 = 0x80047457\n\tTIOCSDTR                       = 0x20007479\n\tTIOCSETA                       = 0x802c7414\n\tTIOCSETAF                      = 0x802c7416\n\tTIOCSETAW                      = 0x802c7415\n\tTIOCSETD                       = 0x8004741b\n\tTIOCSIG                        = 0x2004745f\n\tTIOCSPGRP                      = 0x80047476\n\tTIOCSTART                      = 0x2000746e\n\tTIOCSTAT                       = 0x20007465\n\tTIOCSTI                        = 0x80017472\n\tTIOCSTOP                       = 0x2000746f\n\tTIOCSWINSZ                     = 0x80087467\n\tTIOCTIMESTAMP                  = 0x40107459\n\tTIOCUCNTL                      = 0x80047466\n\tTOSTOP                         = 0x400000\n\tUTIME_NOW                      = -0x1\n\tUTIME_OMIT                     = -0x2\n\tVDISCARD                       = 0xf\n\tVDSUSP                         = 0xb\n\tVEOF                           = 0x0\n\tVEOL                           = 0x1\n\tVEOL2                          = 0x2\n\tVERASE                         = 0x3\n\tVERASE2                        = 0x7\n\tVINTR                          = 0x8\n\tVKILL                          = 0x5\n\tVLNEXT                         = 0xe\n\tVMIN                           = 0x10\n\tVM_BCACHE_SIZE_MAX             = 0x19000000\n\tVQUIT                          = 0x9\n\tVREPRINT                       = 0x6\n\tVSTART                         = 0xc\n\tVSTATUS                        = 0x12\n\tVSTOP                          = 0xd\n\tVSUSP                          = 0xa\n\tVTIME                          = 0x11\n\tVWERASE                        = 0x4\n\tWCONTINUED                     = 0x4\n\tWCOREFLAG                      = 0x80\n\tWEXITED                        = 0x10\n\tWLINUXCLONE                    = 0x80000000\n\tWNOHANG                        = 0x1\n\tWNOWAIT                        = 0x8\n\tWSTOPPED                       = 0x2\n\tWTRAPPED                       = 0x20\n\tWUNTRACED                      = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECAPMODE        = syscall.Errno(0x5e)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTEGRITY      = syscall.Errno(0x61)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x61)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCAPABLE     = syscall.Errno(0x5d)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5f)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x60)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGLIBRT  = syscall.Signal(0x21)\n\tSIGLWP    = syscall.Signal(0x20)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOTCAPABLE\", \"capabilities insufficient\"},\n\t{94, \"ECAPMODE\", \"not permitted in capability mode\"},\n\t{95, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{96, \"EOWNERDEAD\", \"previous owner died\"},\n\t{97, \"EINTEGRITY\", \"integrity check failed\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"unknown signal\"},\n\t{33, \"SIGLIBRT\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && freebsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                   = 0x10\n\tAF_ARP                         = 0x23\n\tAF_ATM                         = 0x1e\n\tAF_BLUETOOTH                   = 0x24\n\tAF_CCITT                       = 0xa\n\tAF_CHAOS                       = 0x5\n\tAF_CNT                         = 0x15\n\tAF_COIP                        = 0x14\n\tAF_DATAKIT                     = 0x9\n\tAF_DECnet                      = 0xc\n\tAF_DLI                         = 0xd\n\tAF_E164                        = 0x1a\n\tAF_ECMA                        = 0x8\n\tAF_HYLINK                      = 0xf\n\tAF_HYPERV                      = 0x2b\n\tAF_IEEE80211                   = 0x25\n\tAF_IMPLINK                     = 0x3\n\tAF_INET                        = 0x2\n\tAF_INET6                       = 0x1c\n\tAF_INET6_SDP                   = 0x2a\n\tAF_INET_SDP                    = 0x28\n\tAF_IPX                         = 0x17\n\tAF_ISDN                        = 0x1a\n\tAF_ISO                         = 0x7\n\tAF_LAT                         = 0xe\n\tAF_LINK                        = 0x12\n\tAF_LOCAL                       = 0x1\n\tAF_MAX                         = 0x2b\n\tAF_NATM                        = 0x1d\n\tAF_NETBIOS                     = 0x6\n\tAF_NETGRAPH                    = 0x20\n\tAF_OSI                         = 0x7\n\tAF_PUP                         = 0x4\n\tAF_ROUTE                       = 0x11\n\tAF_SCLUSTER                    = 0x22\n\tAF_SIP                         = 0x18\n\tAF_SLOW                        = 0x21\n\tAF_SNA                         = 0xb\n\tAF_UNIX                        = 0x1\n\tAF_UNSPEC                      = 0x0\n\tAF_VENDOR00                    = 0x27\n\tAF_VENDOR01                    = 0x29\n\tAF_VENDOR03                    = 0x2d\n\tAF_VENDOR04                    = 0x2f\n\tAF_VENDOR05                    = 0x31\n\tAF_VENDOR06                    = 0x33\n\tAF_VENDOR07                    = 0x35\n\tAF_VENDOR08                    = 0x37\n\tAF_VENDOR09                    = 0x39\n\tAF_VENDOR10                    = 0x3b\n\tAF_VENDOR11                    = 0x3d\n\tAF_VENDOR12                    = 0x3f\n\tAF_VENDOR13                    = 0x41\n\tAF_VENDOR14                    = 0x43\n\tAF_VENDOR15                    = 0x45\n\tAF_VENDOR16                    = 0x47\n\tAF_VENDOR17                    = 0x49\n\tAF_VENDOR18                    = 0x4b\n\tAF_VENDOR19                    = 0x4d\n\tAF_VENDOR20                    = 0x4f\n\tAF_VENDOR21                    = 0x51\n\tAF_VENDOR22                    = 0x53\n\tAF_VENDOR23                    = 0x55\n\tAF_VENDOR24                    = 0x57\n\tAF_VENDOR25                    = 0x59\n\tAF_VENDOR26                    = 0x5b\n\tAF_VENDOR27                    = 0x5d\n\tAF_VENDOR28                    = 0x5f\n\tAF_VENDOR29                    = 0x61\n\tAF_VENDOR30                    = 0x63\n\tAF_VENDOR31                    = 0x65\n\tAF_VENDOR32                    = 0x67\n\tAF_VENDOR33                    = 0x69\n\tAF_VENDOR34                    = 0x6b\n\tAF_VENDOR35                    = 0x6d\n\tAF_VENDOR36                    = 0x6f\n\tAF_VENDOR37                    = 0x71\n\tAF_VENDOR38                    = 0x73\n\tAF_VENDOR39                    = 0x75\n\tAF_VENDOR40                    = 0x77\n\tAF_VENDOR41                    = 0x79\n\tAF_VENDOR42                    = 0x7b\n\tAF_VENDOR43                    = 0x7d\n\tAF_VENDOR44                    = 0x7f\n\tAF_VENDOR45                    = 0x81\n\tAF_VENDOR46                    = 0x83\n\tAF_VENDOR47                    = 0x85\n\tALTWERASE                      = 0x200\n\tB0                             = 0x0\n\tB1000000                       = 0xf4240\n\tB110                           = 0x6e\n\tB115200                        = 0x1c200\n\tB1200                          = 0x4b0\n\tB134                           = 0x86\n\tB14400                         = 0x3840\n\tB150                           = 0x96\n\tB1500000                       = 0x16e360\n\tB1800                          = 0x708\n\tB19200                         = 0x4b00\n\tB200                           = 0xc8\n\tB2000000                       = 0x1e8480\n\tB230400                        = 0x38400\n\tB2400                          = 0x960\n\tB2500000                       = 0x2625a0\n\tB28800                         = 0x7080\n\tB300                           = 0x12c\n\tB3000000                       = 0x2dc6c0\n\tB3500000                       = 0x3567e0\n\tB38400                         = 0x9600\n\tB4000000                       = 0x3d0900\n\tB460800                        = 0x70800\n\tB4800                          = 0x12c0\n\tB50                            = 0x32\n\tB500000                        = 0x7a120\n\tB57600                         = 0xe100\n\tB600                           = 0x258\n\tB7200                          = 0x1c20\n\tB75                            = 0x4b\n\tB76800                         = 0x12c00\n\tB921600                        = 0xe1000\n\tB9600                          = 0x2580\n\tBIOCFEEDBACK                   = 0x8004427c\n\tBIOCFLUSH                      = 0x20004268\n\tBIOCGBLEN                      = 0x40044266\n\tBIOCGDIRECTION                 = 0x40044276\n\tBIOCGDLT                       = 0x4004426a\n\tBIOCGDLTLIST                   = 0xc0104279\n\tBIOCGETBUFMODE                 = 0x4004427d\n\tBIOCGETIF                      = 0x4020426b\n\tBIOCGETZMAX                    = 0x4008427f\n\tBIOCGHDRCMPLT                  = 0x40044274\n\tBIOCGRSIG                      = 0x40044272\n\tBIOCGRTIMEOUT                  = 0x4010426e\n\tBIOCGSEESENT                   = 0x40044276\n\tBIOCGSTATS                     = 0x4008426f\n\tBIOCGTSTAMP                    = 0x40044283\n\tBIOCIMMEDIATE                  = 0x80044270\n\tBIOCLOCK                       = 0x2000427a\n\tBIOCPROMISC                    = 0x20004269\n\tBIOCROTZBUF                    = 0x40184280\n\tBIOCSBLEN                      = 0xc0044266\n\tBIOCSDIRECTION                 = 0x80044277\n\tBIOCSDLT                       = 0x80044278\n\tBIOCSETBUFMODE                 = 0x8004427e\n\tBIOCSETF                       = 0x80104267\n\tBIOCSETFNR                     = 0x80104282\n\tBIOCSETIF                      = 0x8020426c\n\tBIOCSETVLANPCP                 = 0x80044285\n\tBIOCSETWF                      = 0x8010427b\n\tBIOCSETZBUF                    = 0x80184281\n\tBIOCSHDRCMPLT                  = 0x80044275\n\tBIOCSRSIG                      = 0x80044273\n\tBIOCSRTIMEOUT                  = 0x8010426d\n\tBIOCSSEESENT                   = 0x80044277\n\tBIOCSTSTAMP                    = 0x80044284\n\tBIOCVERSION                    = 0x40044271\n\tBPF_A                          = 0x10\n\tBPF_ABS                        = 0x20\n\tBPF_ADD                        = 0x0\n\tBPF_ALIGNMENT                  = 0x8\n\tBPF_ALU                        = 0x4\n\tBPF_AND                        = 0x50\n\tBPF_B                          = 0x10\n\tBPF_BUFMODE_BUFFER             = 0x1\n\tBPF_BUFMODE_ZBUF               = 0x2\n\tBPF_DIV                        = 0x30\n\tBPF_H                          = 0x8\n\tBPF_IMM                        = 0x0\n\tBPF_IND                        = 0x40\n\tBPF_JA                         = 0x0\n\tBPF_JEQ                        = 0x10\n\tBPF_JGE                        = 0x30\n\tBPF_JGT                        = 0x20\n\tBPF_JMP                        = 0x5\n\tBPF_JSET                       = 0x40\n\tBPF_K                          = 0x0\n\tBPF_LD                         = 0x0\n\tBPF_LDX                        = 0x1\n\tBPF_LEN                        = 0x80\n\tBPF_LSH                        = 0x60\n\tBPF_MAJOR_VERSION              = 0x1\n\tBPF_MAXBUFSIZE                 = 0x80000\n\tBPF_MAXINSNS                   = 0x200\n\tBPF_MEM                        = 0x60\n\tBPF_MEMWORDS                   = 0x10\n\tBPF_MINBUFSIZE                 = 0x20\n\tBPF_MINOR_VERSION              = 0x1\n\tBPF_MISC                       = 0x7\n\tBPF_MOD                        = 0x90\n\tBPF_MSH                        = 0xa0\n\tBPF_MUL                        = 0x20\n\tBPF_NEG                        = 0x80\n\tBPF_OR                         = 0x40\n\tBPF_RELEASE                    = 0x30bb6\n\tBPF_RET                        = 0x6\n\tBPF_RSH                        = 0x70\n\tBPF_ST                         = 0x2\n\tBPF_STX                        = 0x3\n\tBPF_SUB                        = 0x10\n\tBPF_TAX                        = 0x0\n\tBPF_TXA                        = 0x80\n\tBPF_T_BINTIME                  = 0x2\n\tBPF_T_BINTIME_FAST             = 0x102\n\tBPF_T_BINTIME_MONOTONIC        = 0x202\n\tBPF_T_BINTIME_MONOTONIC_FAST   = 0x302\n\tBPF_T_FAST                     = 0x100\n\tBPF_T_FLAG_MASK                = 0x300\n\tBPF_T_FORMAT_MASK              = 0x3\n\tBPF_T_MICROTIME                = 0x0\n\tBPF_T_MICROTIME_FAST           = 0x100\n\tBPF_T_MICROTIME_MONOTONIC      = 0x200\n\tBPF_T_MICROTIME_MONOTONIC_FAST = 0x300\n\tBPF_T_MONOTONIC                = 0x200\n\tBPF_T_MONOTONIC_FAST           = 0x300\n\tBPF_T_NANOTIME                 = 0x1\n\tBPF_T_NANOTIME_FAST            = 0x101\n\tBPF_T_NANOTIME_MONOTONIC       = 0x201\n\tBPF_T_NANOTIME_MONOTONIC_FAST  = 0x301\n\tBPF_T_NONE                     = 0x3\n\tBPF_T_NORMAL                   = 0x0\n\tBPF_W                          = 0x0\n\tBPF_X                          = 0x8\n\tBPF_XOR                        = 0xa0\n\tBRKINT                         = 0x2\n\tCAP_ACCEPT                     = 0x200000020000000\n\tCAP_ACL_CHECK                  = 0x400000000010000\n\tCAP_ACL_DELETE                 = 0x400000000020000\n\tCAP_ACL_GET                    = 0x400000000040000\n\tCAP_ACL_SET                    = 0x400000000080000\n\tCAP_ALL0                       = 0x20007ffffffffff\n\tCAP_ALL1                       = 0x4000000001fffff\n\tCAP_BIND                       = 0x200000040000000\n\tCAP_BINDAT                     = 0x200008000000400\n\tCAP_CHFLAGSAT                  = 0x200000000001400\n\tCAP_CONNECT                    = 0x200000080000000\n\tCAP_CONNECTAT                  = 0x200010000000400\n\tCAP_CREATE                     = 0x200000000000040\n\tCAP_EVENT                      = 0x400000000000020\n\tCAP_EXTATTR_DELETE             = 0x400000000001000\n\tCAP_EXTATTR_GET                = 0x400000000002000\n\tCAP_EXTATTR_LIST               = 0x400000000004000\n\tCAP_EXTATTR_SET                = 0x400000000008000\n\tCAP_FCHDIR                     = 0x200000000000800\n\tCAP_FCHFLAGS                   = 0x200000000001000\n\tCAP_FCHMOD                     = 0x200000000002000\n\tCAP_FCHMODAT                   = 0x200000000002400\n\tCAP_FCHOWN                     = 0x200000000004000\n\tCAP_FCHOWNAT                   = 0x200000000004400\n\tCAP_FCNTL                      = 0x200000000008000\n\tCAP_FCNTL_ALL                  = 0x78\n\tCAP_FCNTL_GETFL                = 0x8\n\tCAP_FCNTL_GETOWN               = 0x20\n\tCAP_FCNTL_SETFL                = 0x10\n\tCAP_FCNTL_SETOWN               = 0x40\n\tCAP_FEXECVE                    = 0x200000000000080\n\tCAP_FLOCK                      = 0x200000000010000\n\tCAP_FPATHCONF                  = 0x200000000020000\n\tCAP_FSCK                       = 0x200000000040000\n\tCAP_FSTAT                      = 0x200000000080000\n\tCAP_FSTATAT                    = 0x200000000080400\n\tCAP_FSTATFS                    = 0x200000000100000\n\tCAP_FSYNC                      = 0x200000000000100\n\tCAP_FTRUNCATE                  = 0x200000000000200\n\tCAP_FUTIMES                    = 0x200000000200000\n\tCAP_FUTIMESAT                  = 0x200000000200400\n\tCAP_GETPEERNAME                = 0x200000100000000\n\tCAP_GETSOCKNAME                = 0x200000200000000\n\tCAP_GETSOCKOPT                 = 0x200000400000000\n\tCAP_IOCTL                      = 0x400000000000080\n\tCAP_IOCTLS_ALL                 = 0x7fffffffffffffff\n\tCAP_KQUEUE                     = 0x400000000100040\n\tCAP_KQUEUE_CHANGE              = 0x400000000100000\n\tCAP_KQUEUE_EVENT               = 0x400000000000040\n\tCAP_LINKAT_SOURCE              = 0x200020000000400\n\tCAP_LINKAT_TARGET              = 0x200000000400400\n\tCAP_LISTEN                     = 0x200000800000000\n\tCAP_LOOKUP                     = 0x200000000000400\n\tCAP_MAC_GET                    = 0x400000000000001\n\tCAP_MAC_SET                    = 0x400000000000002\n\tCAP_MKDIRAT                    = 0x200000000800400\n\tCAP_MKFIFOAT                   = 0x200000001000400\n\tCAP_MKNODAT                    = 0x200000002000400\n\tCAP_MMAP                       = 0x200000000000010\n\tCAP_MMAP_R                     = 0x20000000000001d\n\tCAP_MMAP_RW                    = 0x20000000000001f\n\tCAP_MMAP_RWX                   = 0x20000000000003f\n\tCAP_MMAP_RX                    = 0x20000000000003d\n\tCAP_MMAP_W                     = 0x20000000000001e\n\tCAP_MMAP_WX                    = 0x20000000000003e\n\tCAP_MMAP_X                     = 0x20000000000003c\n\tCAP_PDGETPID                   = 0x400000000000200\n\tCAP_PDKILL                     = 0x400000000000800\n\tCAP_PDWAIT                     = 0x400000000000400\n\tCAP_PEELOFF                    = 0x200001000000000\n\tCAP_POLL_EVENT                 = 0x400000000000020\n\tCAP_PREAD                      = 0x20000000000000d\n\tCAP_PWRITE                     = 0x20000000000000e\n\tCAP_READ                       = 0x200000000000001\n\tCAP_RECV                       = 0x200000000000001\n\tCAP_RENAMEAT_SOURCE            = 0x200000004000400\n\tCAP_RENAMEAT_TARGET            = 0x200040000000400\n\tCAP_RIGHTS_VERSION             = 0x0\n\tCAP_RIGHTS_VERSION_00          = 0x0\n\tCAP_SEEK                       = 0x20000000000000c\n\tCAP_SEEK_TELL                  = 0x200000000000004\n\tCAP_SEM_GETVALUE               = 0x400000000000004\n\tCAP_SEM_POST                   = 0x400000000000008\n\tCAP_SEM_WAIT                   = 0x400000000000010\n\tCAP_SEND                       = 0x200000000000002\n\tCAP_SETSOCKOPT                 = 0x200002000000000\n\tCAP_SHUTDOWN                   = 0x200004000000000\n\tCAP_SOCK_CLIENT                = 0x200007780000003\n\tCAP_SOCK_SERVER                = 0x200007f60000003\n\tCAP_SYMLINKAT                  = 0x200000008000400\n\tCAP_TTYHOOK                    = 0x400000000000100\n\tCAP_UNLINKAT                   = 0x200000010000400\n\tCAP_UNUSED0_44                 = 0x200080000000000\n\tCAP_UNUSED0_57                 = 0x300000000000000\n\tCAP_UNUSED1_22                 = 0x400000000200000\n\tCAP_UNUSED1_57                 = 0x500000000000000\n\tCAP_WRITE                      = 0x200000000000002\n\tCFLUSH                         = 0xf\n\tCLOCAL                         = 0x8000\n\tCLOCK_BOOTTIME                 = 0x5\n\tCLOCK_MONOTONIC                = 0x4\n\tCLOCK_MONOTONIC_COARSE         = 0xc\n\tCLOCK_MONOTONIC_FAST           = 0xc\n\tCLOCK_MONOTONIC_PRECISE        = 0xb\n\tCLOCK_PROCESS_CPUTIME_ID       = 0xf\n\tCLOCK_PROF                     = 0x2\n\tCLOCK_REALTIME                 = 0x0\n\tCLOCK_REALTIME_COARSE          = 0xa\n\tCLOCK_REALTIME_FAST            = 0xa\n\tCLOCK_REALTIME_PRECISE         = 0x9\n\tCLOCK_SECOND                   = 0xd\n\tCLOCK_THREAD_CPUTIME_ID        = 0xe\n\tCLOCK_UPTIME                   = 0x5\n\tCLOCK_UPTIME_FAST              = 0x8\n\tCLOCK_UPTIME_PRECISE           = 0x7\n\tCLOCK_VIRTUAL                  = 0x1\n\tCPUSTATES                      = 0x5\n\tCP_IDLE                        = 0x4\n\tCP_INTR                        = 0x3\n\tCP_NICE                        = 0x1\n\tCP_SYS                         = 0x2\n\tCP_USER                        = 0x0\n\tCREAD                          = 0x800\n\tCRTSCTS                        = 0x30000\n\tCS5                            = 0x0\n\tCS6                            = 0x100\n\tCS7                            = 0x200\n\tCS8                            = 0x300\n\tCSIZE                          = 0x300\n\tCSTART                         = 0x11\n\tCSTATUS                        = 0x14\n\tCSTOP                          = 0x13\n\tCSTOPB                         = 0x400\n\tCSUSP                          = 0x1a\n\tCTL_HW                         = 0x6\n\tCTL_KERN                       = 0x1\n\tCTL_MAXNAME                    = 0x18\n\tCTL_NET                        = 0x4\n\tDIOCGATTR                      = 0xc148648e\n\tDIOCGDELETE                    = 0x80106488\n\tDIOCGFLUSH                     = 0x20006487\n\tDIOCGFWHEADS                   = 0x40046483\n\tDIOCGFWSECTORS                 = 0x40046482\n\tDIOCGIDENT                     = 0x41006489\n\tDIOCGKERNELDUMP                = 0xc0986492\n\tDIOCGMEDIASIZE                 = 0x40086481\n\tDIOCGPHYSPATH                  = 0x4400648d\n\tDIOCGPROVIDERNAME              = 0x4400648a\n\tDIOCGSECTORSIZE                = 0x40046480\n\tDIOCGSTRIPEOFFSET              = 0x4008648c\n\tDIOCGSTRIPESIZE                = 0x4008648b\n\tDIOCSKERNELDUMP                = 0x80986491\n\tDIOCSKERNELDUMP_FREEBSD11      = 0x80046485\n\tDIOCSKERNELDUMP_FREEBSD12      = 0x80506490\n\tDIOCZONECMD                    = 0xc080648f\n\tDLT_A429                       = 0xb8\n\tDLT_A653_ICM                   = 0xb9\n\tDLT_AIRONET_HEADER             = 0x78\n\tDLT_AOS                        = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394     = 0x8a\n\tDLT_ARCNET                     = 0x7\n\tDLT_ARCNET_LINUX               = 0x81\n\tDLT_ATM_CLIP                   = 0x13\n\tDLT_ATM_RFC1483                = 0xb\n\tDLT_AURORA                     = 0x7e\n\tDLT_AX25                       = 0x3\n\tDLT_AX25_KISS                  = 0xca\n\tDLT_BACNET_MS_TP               = 0xa5\n\tDLT_BLUETOOTH_BREDR_BB         = 0xff\n\tDLT_BLUETOOTH_HCI_H4           = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9\n\tDLT_BLUETOOTH_LE_LL            = 0xfb\n\tDLT_BLUETOOTH_LE_LL_WITH_PHDR  = 0x100\n\tDLT_BLUETOOTH_LINUX_MONITOR    = 0xfe\n\tDLT_CAN20B                     = 0xbe\n\tDLT_CAN_SOCKETCAN              = 0xe3\n\tDLT_CHAOS                      = 0x5\n\tDLT_CHDLC                      = 0x68\n\tDLT_CISCO_IOS                  = 0x76\n\tDLT_CLASS_NETBSD_RAWAF         = 0x2240000\n\tDLT_C_HDLC                     = 0x68\n\tDLT_C_HDLC_WITH_DIR            = 0xcd\n\tDLT_DBUS                       = 0xe7\n\tDLT_DECT                       = 0xdd\n\tDLT_DISPLAYPORT_AUX            = 0x113\n\tDLT_DOCSIS                     = 0x8f\n\tDLT_DOCSIS31_XRA31             = 0x111\n\tDLT_DVB_CI                     = 0xeb\n\tDLT_ECONET                     = 0x73\n\tDLT_EN10MB                     = 0x1\n\tDLT_EN3MB                      = 0x2\n\tDLT_ENC                        = 0x6d\n\tDLT_EPON                       = 0x103\n\tDLT_ERF                        = 0xc5\n\tDLT_ERF_ETH                    = 0xaf\n\tDLT_ERF_POS                    = 0xb0\n\tDLT_ETHERNET_MPACKET           = 0x112\n\tDLT_FC_2                       = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS     = 0xe1\n\tDLT_FDDI                       = 0xa\n\tDLT_FLEXRAY                    = 0xd2\n\tDLT_FRELAY                     = 0x6b\n\tDLT_FRELAY_WITH_DIR            = 0xce\n\tDLT_GCOM_SERIAL                = 0xad\n\tDLT_GCOM_T1E1                  = 0xac\n\tDLT_GPF_F                      = 0xab\n\tDLT_GPF_T                      = 0xaa\n\tDLT_GPRS_LLC                   = 0xa9\n\tDLT_GSMTAP_ABIS                = 0xda\n\tDLT_GSMTAP_UM                  = 0xd9\n\tDLT_IBM_SN                     = 0x92\n\tDLT_IBM_SP                     = 0x91\n\tDLT_IEEE802                    = 0x6\n\tDLT_IEEE802_11                 = 0x69\n\tDLT_IEEE802_11_RADIO           = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS       = 0xa3\n\tDLT_IEEE802_15_4               = 0xc3\n\tDLT_IEEE802_15_4_LINUX         = 0xbf\n\tDLT_IEEE802_15_4_NOFCS         = 0xe6\n\tDLT_IEEE802_15_4_NONASK_PHY    = 0xd7\n\tDLT_IEEE802_16_MAC_CPS         = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO   = 0xc1\n\tDLT_INFINIBAND                 = 0xf7\n\tDLT_IPFILTER                   = 0x74\n\tDLT_IPMB_KONTRON               = 0xc7\n\tDLT_IPMB_LINUX                 = 0xd1\n\tDLT_IPMI_HPM_2                 = 0x104\n\tDLT_IPNET                      = 0xe2\n\tDLT_IPOIB                      = 0xf2\n\tDLT_IPV4                       = 0xe4\n\tDLT_IPV6                       = 0xe5\n\tDLT_IP_OVER_FC                 = 0x7a\n\tDLT_ISO_14443                  = 0x108\n\tDLT_JUNIPER_ATM1               = 0x89\n\tDLT_JUNIPER_ATM2               = 0x87\n\tDLT_JUNIPER_ATM_CEMIC          = 0xee\n\tDLT_JUNIPER_CHDLC              = 0xb5\n\tDLT_JUNIPER_ES                 = 0x84\n\tDLT_JUNIPER_ETHER              = 0xb2\n\tDLT_JUNIPER_FIBRECHANNEL       = 0xea\n\tDLT_JUNIPER_FRELAY             = 0xb4\n\tDLT_JUNIPER_GGSN               = 0x85\n\tDLT_JUNIPER_ISM                = 0xc2\n\tDLT_JUNIPER_MFR                = 0x86\n\tDLT_JUNIPER_MLFR               = 0x83\n\tDLT_JUNIPER_MLPPP              = 0x82\n\tDLT_JUNIPER_MONITOR            = 0xa4\n\tDLT_JUNIPER_PIC_PEER           = 0xae\n\tDLT_JUNIPER_PPP                = 0xb3\n\tDLT_JUNIPER_PPPOE              = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM          = 0xa8\n\tDLT_JUNIPER_SERVICES           = 0x88\n\tDLT_JUNIPER_SRX_E2E            = 0xe9\n\tDLT_JUNIPER_ST                 = 0xc8\n\tDLT_JUNIPER_VP                 = 0xb7\n\tDLT_JUNIPER_VS                 = 0xe8\n\tDLT_LAPB_WITH_DIR              = 0xcf\n\tDLT_LAPD                       = 0xcb\n\tDLT_LIN                        = 0xd4\n\tDLT_LINUX_EVDEV                = 0xd8\n\tDLT_LINUX_IRDA                 = 0x90\n\tDLT_LINUX_LAPD                 = 0xb1\n\tDLT_LINUX_PPP_WITHDIRECTION    = 0xa6\n\tDLT_LINUX_SLL                  = 0x71\n\tDLT_LINUX_SLL2                 = 0x114\n\tDLT_LOOP                       = 0x6c\n\tDLT_LORATAP                    = 0x10e\n\tDLT_LTALK                      = 0x72\n\tDLT_MATCHING_MAX               = 0x114\n\tDLT_MATCHING_MIN               = 0x68\n\tDLT_MFR                        = 0xb6\n\tDLT_MOST                       = 0xd3\n\tDLT_MPEG_2_TS                  = 0xf3\n\tDLT_MPLS                       = 0xdb\n\tDLT_MTP2                       = 0x8c\n\tDLT_MTP2_WITH_PHDR             = 0x8b\n\tDLT_MTP3                       = 0x8d\n\tDLT_MUX27010                   = 0xec\n\tDLT_NETANALYZER                = 0xf0\n\tDLT_NETANALYZER_TRANSPARENT    = 0xf1\n\tDLT_NETLINK                    = 0xfd\n\tDLT_NFC_LLCP                   = 0xf5\n\tDLT_NFLOG                      = 0xef\n\tDLT_NG40                       = 0xf4\n\tDLT_NORDIC_BLE                 = 0x110\n\tDLT_NULL                       = 0x0\n\tDLT_OPENFLOW                   = 0x10b\n\tDLT_PCI_EXP                    = 0x7d\n\tDLT_PFLOG                      = 0x75\n\tDLT_PFSYNC                     = 0x79\n\tDLT_PKTAP                      = 0x102\n\tDLT_PPI                        = 0xc0\n\tDLT_PPP                        = 0x9\n\tDLT_PPP_BSDOS                  = 0xe\n\tDLT_PPP_ETHER                  = 0x33\n\tDLT_PPP_PPPD                   = 0xa6\n\tDLT_PPP_SERIAL                 = 0x32\n\tDLT_PPP_WITH_DIR               = 0xcc\n\tDLT_PPP_WITH_DIRECTION         = 0xa6\n\tDLT_PRISM_HEADER               = 0x77\n\tDLT_PROFIBUS_DL                = 0x101\n\tDLT_PRONET                     = 0x4\n\tDLT_RAIF1                      = 0xc6\n\tDLT_RAW                        = 0xc\n\tDLT_RDS                        = 0x109\n\tDLT_REDBACK_SMARTEDGE          = 0x20\n\tDLT_RIO                        = 0x7c\n\tDLT_RTAC_SERIAL                = 0xfa\n\tDLT_SCCP                       = 0x8e\n\tDLT_SCTP                       = 0xf8\n\tDLT_SDLC                       = 0x10c\n\tDLT_SITA                       = 0xc4\n\tDLT_SLIP                       = 0x8\n\tDLT_SLIP_BSDOS                 = 0xd\n\tDLT_STANAG_5066_D_PDU          = 0xed\n\tDLT_SUNATM                     = 0x7b\n\tDLT_SYMANTEC_FIREWALL          = 0x63\n\tDLT_TI_LLN_SNIFFER             = 0x10d\n\tDLT_TZSP                       = 0x80\n\tDLT_USB                        = 0xba\n\tDLT_USBPCAP                    = 0xf9\n\tDLT_USB_DARWIN                 = 0x10a\n\tDLT_USB_FREEBSD                = 0xba\n\tDLT_USB_LINUX                  = 0xbd\n\tDLT_USB_LINUX_MMAPPED          = 0xdc\n\tDLT_USER0                      = 0x93\n\tDLT_USER1                      = 0x94\n\tDLT_USER10                     = 0x9d\n\tDLT_USER11                     = 0x9e\n\tDLT_USER12                     = 0x9f\n\tDLT_USER13                     = 0xa0\n\tDLT_USER14                     = 0xa1\n\tDLT_USER15                     = 0xa2\n\tDLT_USER2                      = 0x95\n\tDLT_USER3                      = 0x96\n\tDLT_USER4                      = 0x97\n\tDLT_USER5                      = 0x98\n\tDLT_USER6                      = 0x99\n\tDLT_USER7                      = 0x9a\n\tDLT_USER8                      = 0x9b\n\tDLT_USER9                      = 0x9c\n\tDLT_VSOCK                      = 0x10f\n\tDLT_WATTSTOPPER_DLM            = 0x107\n\tDLT_WIHART                     = 0xdf\n\tDLT_WIRESHARK_UPPER_PDU        = 0xfc\n\tDLT_X2E_SERIAL                 = 0xd5\n\tDLT_X2E_XORAYA                 = 0xd6\n\tDLT_ZWAVE_R1_R2                = 0x105\n\tDLT_ZWAVE_R3                   = 0x106\n\tDT_BLK                         = 0x6\n\tDT_CHR                         = 0x2\n\tDT_DIR                         = 0x4\n\tDT_FIFO                        = 0x1\n\tDT_LNK                         = 0xa\n\tDT_REG                         = 0x8\n\tDT_SOCK                        = 0xc\n\tDT_UNKNOWN                     = 0x0\n\tDT_WHT                         = 0xe\n\tECHO                           = 0x8\n\tECHOCTL                        = 0x40\n\tECHOE                          = 0x2\n\tECHOK                          = 0x4\n\tECHOKE                         = 0x1\n\tECHONL                         = 0x10\n\tECHOPRT                        = 0x20\n\tEHE_DEAD_PRIORITY              = -0x1\n\tEVFILT_AIO                     = -0x3\n\tEVFILT_EMPTY                   = -0xd\n\tEVFILT_FS                      = -0x9\n\tEVFILT_LIO                     = -0xa\n\tEVFILT_PROC                    = -0x5\n\tEVFILT_PROCDESC                = -0x8\n\tEVFILT_READ                    = -0x1\n\tEVFILT_SENDFILE                = -0xc\n\tEVFILT_SIGNAL                  = -0x6\n\tEVFILT_SYSCOUNT                = 0xd\n\tEVFILT_TIMER                   = -0x7\n\tEVFILT_USER                    = -0xb\n\tEVFILT_VNODE                   = -0x4\n\tEVFILT_WRITE                   = -0x2\n\tEVNAMEMAP_NAME_SIZE            = 0x40\n\tEV_ADD                         = 0x1\n\tEV_CLEAR                       = 0x20\n\tEV_DELETE                      = 0x2\n\tEV_DISABLE                     = 0x8\n\tEV_DISPATCH                    = 0x80\n\tEV_DROP                        = 0x1000\n\tEV_ENABLE                      = 0x4\n\tEV_EOF                         = 0x8000\n\tEV_ERROR                       = 0x4000\n\tEV_FLAG1                       = 0x2000\n\tEV_FLAG2                       = 0x4000\n\tEV_FORCEONESHOT                = 0x100\n\tEV_ONESHOT                     = 0x10\n\tEV_RECEIPT                     = 0x40\n\tEV_SYSFLAGS                    = 0xf000\n\tEXTA                           = 0x4b00\n\tEXTATTR_MAXNAMELEN             = 0xff\n\tEXTATTR_NAMESPACE_EMPTY        = 0x0\n\tEXTATTR_NAMESPACE_SYSTEM       = 0x2\n\tEXTATTR_NAMESPACE_USER         = 0x1\n\tEXTB                           = 0x9600\n\tEXTPROC                        = 0x800\n\tFD_CLOEXEC                     = 0x1\n\tFD_NONE                        = -0xc8\n\tFD_SETSIZE                     = 0x400\n\tFLUSHO                         = 0x800000\n\tF_ADD_SEALS                    = 0x13\n\tF_CANCEL                       = 0x5\n\tF_DUP2FD                       = 0xa\n\tF_DUP2FD_CLOEXEC               = 0x12\n\tF_DUPFD                        = 0x0\n\tF_DUPFD_CLOEXEC                = 0x11\n\tF_GETFD                        = 0x1\n\tF_GETFL                        = 0x3\n\tF_GETLK                        = 0xb\n\tF_GETOWN                       = 0x5\n\tF_GET_SEALS                    = 0x14\n\tF_ISUNIONSTACK                 = 0x15\n\tF_KINFO                        = 0x16\n\tF_OGETLK                       = 0x7\n\tF_OK                           = 0x0\n\tF_OSETLK                       = 0x8\n\tF_OSETLKW                      = 0x9\n\tF_RDAHEAD                      = 0x10\n\tF_RDLCK                        = 0x1\n\tF_READAHEAD                    = 0xf\n\tF_SEAL_GROW                    = 0x4\n\tF_SEAL_SEAL                    = 0x1\n\tF_SEAL_SHRINK                  = 0x2\n\tF_SEAL_WRITE                   = 0x8\n\tF_SETFD                        = 0x2\n\tF_SETFL                        = 0x4\n\tF_SETLK                        = 0xc\n\tF_SETLKW                       = 0xd\n\tF_SETLK_REMOTE                 = 0xe\n\tF_SETOWN                       = 0x6\n\tF_UNLCK                        = 0x2\n\tF_UNLCKSYS                     = 0x4\n\tF_WRLCK                        = 0x3\n\tHUPCL                          = 0x4000\n\tHW_MACHINE                     = 0x1\n\tICANON                         = 0x100\n\tICMP6_FILTER                   = 0x12\n\tICRNL                          = 0x100\n\tIEXTEN                         = 0x400\n\tIFAN_ARRIVAL                   = 0x0\n\tIFAN_DEPARTURE                 = 0x1\n\tIFCAP_WOL_MAGIC                = 0x2000\n\tIFF_ALLMULTI                   = 0x200\n\tIFF_ALTPHYS                    = 0x4000\n\tIFF_BROADCAST                  = 0x2\n\tIFF_CANTCHANGE                 = 0x218f72\n\tIFF_CANTCONFIG                 = 0x10000\n\tIFF_DEBUG                      = 0x4\n\tIFF_DRV_OACTIVE                = 0x400\n\tIFF_DRV_RUNNING                = 0x40\n\tIFF_DYING                      = 0x200000\n\tIFF_KNOWSEPOCH                 = 0x20\n\tIFF_LINK0                      = 0x1000\n\tIFF_LINK1                      = 0x2000\n\tIFF_LINK2                      = 0x4000\n\tIFF_LOOPBACK                   = 0x8\n\tIFF_MONITOR                    = 0x40000\n\tIFF_MULTICAST                  = 0x8000\n\tIFF_NOARP                      = 0x80\n\tIFF_NOGROUP                    = 0x800000\n\tIFF_OACTIVE                    = 0x400\n\tIFF_POINTOPOINT                = 0x10\n\tIFF_PPROMISC                   = 0x20000\n\tIFF_PROMISC                    = 0x100\n\tIFF_RENAMING                   = 0x400000\n\tIFF_RUNNING                    = 0x40\n\tIFF_SIMPLEX                    = 0x800\n\tIFF_STATICARP                  = 0x80000\n\tIFF_UP                         = 0x1\n\tIFNAMSIZ                       = 0x10\n\tIFT_BRIDGE                     = 0xd1\n\tIFT_CARP                       = 0xf8\n\tIFT_IEEE1394                   = 0x90\n\tIFT_INFINIBAND                 = 0xc7\n\tIFT_L2VLAN                     = 0x87\n\tIFT_L3IPVLAN                   = 0x88\n\tIFT_PPP                        = 0x17\n\tIFT_PROPVIRTUAL                = 0x35\n\tIGNBRK                         = 0x1\n\tIGNCR                          = 0x80\n\tIGNPAR                         = 0x4\n\tIMAXBEL                        = 0x2000\n\tINLCR                          = 0x40\n\tINPCK                          = 0x10\n\tIN_CLASSA_HOST                 = 0xffffff\n\tIN_CLASSA_MAX                  = 0x80\n\tIN_CLASSA_NET                  = 0xff000000\n\tIN_CLASSA_NSHIFT               = 0x18\n\tIN_CLASSB_HOST                 = 0xffff\n\tIN_CLASSB_MAX                  = 0x10000\n\tIN_CLASSB_NET                  = 0xffff0000\n\tIN_CLASSB_NSHIFT               = 0x10\n\tIN_CLASSC_HOST                 = 0xff\n\tIN_CLASSC_NET                  = 0xffffff00\n\tIN_CLASSC_NSHIFT               = 0x8\n\tIN_CLASSD_HOST                 = 0xfffffff\n\tIN_CLASSD_NET                  = 0xf0000000\n\tIN_CLASSD_NSHIFT               = 0x1c\n\tIN_LOOPBACKNET                 = 0x7f\n\tIN_NETMASK_DEFAULT             = 0xffffff00\n\tIN_RFC3021_MASK                = 0xfffffffe\n\tIPPROTO_3PC                    = 0x22\n\tIPPROTO_ADFS                   = 0x44\n\tIPPROTO_AH                     = 0x33\n\tIPPROTO_AHIP                   = 0x3d\n\tIPPROTO_APES                   = 0x63\n\tIPPROTO_ARGUS                  = 0xd\n\tIPPROTO_AX25                   = 0x5d\n\tIPPROTO_BHA                    = 0x31\n\tIPPROTO_BLT                    = 0x1e\n\tIPPROTO_BRSATMON               = 0x4c\n\tIPPROTO_CARP                   = 0x70\n\tIPPROTO_CFTP                   = 0x3e\n\tIPPROTO_CHAOS                  = 0x10\n\tIPPROTO_CMTP                   = 0x26\n\tIPPROTO_CPHB                   = 0x49\n\tIPPROTO_CPNX                   = 0x48\n\tIPPROTO_DCCP                   = 0x21\n\tIPPROTO_DDP                    = 0x25\n\tIPPROTO_DGP                    = 0x56\n\tIPPROTO_DIVERT                 = 0x102\n\tIPPROTO_DONE                   = 0x101\n\tIPPROTO_DSTOPTS                = 0x3c\n\tIPPROTO_EGP                    = 0x8\n\tIPPROTO_EMCON                  = 0xe\n\tIPPROTO_ENCAP                  = 0x62\n\tIPPROTO_EON                    = 0x50\n\tIPPROTO_ESP                    = 0x32\n\tIPPROTO_ETHERIP                = 0x61\n\tIPPROTO_FRAGMENT               = 0x2c\n\tIPPROTO_GGP                    = 0x3\n\tIPPROTO_GMTP                   = 0x64\n\tIPPROTO_GRE                    = 0x2f\n\tIPPROTO_HELLO                  = 0x3f\n\tIPPROTO_HIP                    = 0x8b\n\tIPPROTO_HMP                    = 0x14\n\tIPPROTO_HOPOPTS                = 0x0\n\tIPPROTO_ICMP                   = 0x1\n\tIPPROTO_ICMPV6                 = 0x3a\n\tIPPROTO_IDP                    = 0x16\n\tIPPROTO_IDPR                   = 0x23\n\tIPPROTO_IDRP                   = 0x2d\n\tIPPROTO_IGMP                   = 0x2\n\tIPPROTO_IGP                    = 0x55\n\tIPPROTO_IGRP                   = 0x58\n\tIPPROTO_IL                     = 0x28\n\tIPPROTO_INLSP                  = 0x34\n\tIPPROTO_INP                    = 0x20\n\tIPPROTO_IP                     = 0x0\n\tIPPROTO_IPCOMP                 = 0x6c\n\tIPPROTO_IPCV                   = 0x47\n\tIPPROTO_IPEIP                  = 0x5e\n\tIPPROTO_IPIP                   = 0x4\n\tIPPROTO_IPPC                   = 0x43\n\tIPPROTO_IPV4                   = 0x4\n\tIPPROTO_IPV6                   = 0x29\n\tIPPROTO_IRTP                   = 0x1c\n\tIPPROTO_KRYPTOLAN              = 0x41\n\tIPPROTO_LARP                   = 0x5b\n\tIPPROTO_LEAF1                  = 0x19\n\tIPPROTO_LEAF2                  = 0x1a\n\tIPPROTO_MAX                    = 0x100\n\tIPPROTO_MEAS                   = 0x13\n\tIPPROTO_MH                     = 0x87\n\tIPPROTO_MHRP                   = 0x30\n\tIPPROTO_MICP                   = 0x5f\n\tIPPROTO_MOBILE                 = 0x37\n\tIPPROTO_MPLS                   = 0x89\n\tIPPROTO_MTP                    = 0x5c\n\tIPPROTO_MUX                    = 0x12\n\tIPPROTO_ND                     = 0x4d\n\tIPPROTO_NHRP                   = 0x36\n\tIPPROTO_NONE                   = 0x3b\n\tIPPROTO_NSP                    = 0x1f\n\tIPPROTO_NVPII                  = 0xb\n\tIPPROTO_OLD_DIVERT             = 0xfe\n\tIPPROTO_OSPFIGP                = 0x59\n\tIPPROTO_PFSYNC                 = 0xf0\n\tIPPROTO_PGM                    = 0x71\n\tIPPROTO_PIGP                   = 0x9\n\tIPPROTO_PIM                    = 0x67\n\tIPPROTO_PRM                    = 0x15\n\tIPPROTO_PUP                    = 0xc\n\tIPPROTO_PVP                    = 0x4b\n\tIPPROTO_RAW                    = 0xff\n\tIPPROTO_RCCMON                 = 0xa\n\tIPPROTO_RDP                    = 0x1b\n\tIPPROTO_RESERVED_253           = 0xfd\n\tIPPROTO_RESERVED_254           = 0xfe\n\tIPPROTO_ROUTING                = 0x2b\n\tIPPROTO_RSVP                   = 0x2e\n\tIPPROTO_RVD                    = 0x42\n\tIPPROTO_SATEXPAK               = 0x40\n\tIPPROTO_SATMON                 = 0x45\n\tIPPROTO_SCCSP                  = 0x60\n\tIPPROTO_SCTP                   = 0x84\n\tIPPROTO_SDRP                   = 0x2a\n\tIPPROTO_SEND                   = 0x103\n\tIPPROTO_SHIM6                  = 0x8c\n\tIPPROTO_SKIP                   = 0x39\n\tIPPROTO_SPACER                 = 0x7fff\n\tIPPROTO_SRPC                   = 0x5a\n\tIPPROTO_ST                     = 0x7\n\tIPPROTO_SVMTP                  = 0x52\n\tIPPROTO_SWIPE                  = 0x35\n\tIPPROTO_TCF                    = 0x57\n\tIPPROTO_TCP                    = 0x6\n\tIPPROTO_TLSP                   = 0x38\n\tIPPROTO_TP                     = 0x1d\n\tIPPROTO_TPXX                   = 0x27\n\tIPPROTO_TRUNK1                 = 0x17\n\tIPPROTO_TRUNK2                 = 0x18\n\tIPPROTO_TTP                    = 0x54\n\tIPPROTO_UDP                    = 0x11\n\tIPPROTO_UDPLITE                = 0x88\n\tIPPROTO_VINES                  = 0x53\n\tIPPROTO_VISA                   = 0x46\n\tIPPROTO_VMTP                   = 0x51\n\tIPPROTO_WBEXPAK                = 0x4f\n\tIPPROTO_WBMON                  = 0x4e\n\tIPPROTO_WSN                    = 0x4a\n\tIPPROTO_XNET                   = 0xf\n\tIPPROTO_XTP                    = 0x24\n\tIPV6_AUTOFLOWLABEL             = 0x3b\n\tIPV6_BINDANY                   = 0x40\n\tIPV6_BINDMULTI                 = 0x41\n\tIPV6_BINDV6ONLY                = 0x1b\n\tIPV6_CHECKSUM                  = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS    = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP    = 0x1\n\tIPV6_DEFHLIM                   = 0x40\n\tIPV6_DONTFRAG                  = 0x3e\n\tIPV6_DSTOPTS                   = 0x32\n\tIPV6_FLOWID                    = 0x43\n\tIPV6_FLOWINFO_MASK             = 0xffffff0f\n\tIPV6_FLOWLABEL_LEN             = 0x14\n\tIPV6_FLOWLABEL_MASK            = 0xffff0f00\n\tIPV6_FLOWTYPE                  = 0x44\n\tIPV6_FRAGTTL                   = 0x78\n\tIPV6_FW_ADD                    = 0x1e\n\tIPV6_FW_DEL                    = 0x1f\n\tIPV6_FW_FLUSH                  = 0x20\n\tIPV6_FW_GET                    = 0x22\n\tIPV6_FW_ZERO                   = 0x21\n\tIPV6_HLIMDEC                   = 0x1\n\tIPV6_HOPLIMIT                  = 0x2f\n\tIPV6_HOPOPTS                   = 0x31\n\tIPV6_IPSEC_POLICY              = 0x1c\n\tIPV6_JOIN_GROUP                = 0xc\n\tIPV6_LEAVE_GROUP               = 0xd\n\tIPV6_MAXHLIM                   = 0xff\n\tIPV6_MAXOPTHDR                 = 0x800\n\tIPV6_MAXPACKET                 = 0xffff\n\tIPV6_MAX_GROUP_SRC_FILTER      = 0x200\n\tIPV6_MAX_MEMBERSHIPS           = 0xfff\n\tIPV6_MAX_SOCK_SRC_FILTER       = 0x80\n\tIPV6_MMTU                      = 0x500\n\tIPV6_MSFILTER                  = 0x4a\n\tIPV6_MULTICAST_HOPS            = 0xa\n\tIPV6_MULTICAST_IF              = 0x9\n\tIPV6_MULTICAST_LOOP            = 0xb\n\tIPV6_NEXTHOP                   = 0x30\n\tIPV6_ORIGDSTADDR               = 0x48\n\tIPV6_PATHMTU                   = 0x2c\n\tIPV6_PKTINFO                   = 0x2e\n\tIPV6_PORTRANGE                 = 0xe\n\tIPV6_PORTRANGE_DEFAULT         = 0x0\n\tIPV6_PORTRANGE_HIGH            = 0x1\n\tIPV6_PORTRANGE_LOW             = 0x2\n\tIPV6_PREFER_TEMPADDR           = 0x3f\n\tIPV6_RECVDSTOPTS               = 0x28\n\tIPV6_RECVFLOWID                = 0x46\n\tIPV6_RECVHOPLIMIT              = 0x25\n\tIPV6_RECVHOPOPTS               = 0x27\n\tIPV6_RECVORIGDSTADDR           = 0x48\n\tIPV6_RECVPATHMTU               = 0x2b\n\tIPV6_RECVPKTINFO               = 0x24\n\tIPV6_RECVRSSBUCKETID           = 0x47\n\tIPV6_RECVRTHDR                 = 0x26\n\tIPV6_RECVTCLASS                = 0x39\n\tIPV6_RSSBUCKETID               = 0x45\n\tIPV6_RSS_LISTEN_BUCKET         = 0x42\n\tIPV6_RTHDR                     = 0x33\n\tIPV6_RTHDRDSTOPTS              = 0x23\n\tIPV6_RTHDR_LOOSE               = 0x0\n\tIPV6_RTHDR_STRICT              = 0x1\n\tIPV6_RTHDR_TYPE_0              = 0x0\n\tIPV6_SOCKOPT_RESERVED1         = 0x3\n\tIPV6_TCLASS                    = 0x3d\n\tIPV6_UNICAST_HOPS              = 0x4\n\tIPV6_USE_MIN_MTU               = 0x2a\n\tIPV6_V6ONLY                    = 0x1b\n\tIPV6_VERSION                   = 0x60\n\tIPV6_VERSION_MASK              = 0xf0\n\tIPV6_VLAN_PCP                  = 0x4b\n\tIP_ADD_MEMBERSHIP              = 0xc\n\tIP_ADD_SOURCE_MEMBERSHIP       = 0x46\n\tIP_BINDANY                     = 0x18\n\tIP_BINDMULTI                   = 0x19\n\tIP_BLOCK_SOURCE                = 0x48\n\tIP_DEFAULT_MULTICAST_LOOP      = 0x1\n\tIP_DEFAULT_MULTICAST_TTL       = 0x1\n\tIP_DF                          = 0x4000\n\tIP_DONTFRAG                    = 0x43\n\tIP_DROP_MEMBERSHIP             = 0xd\n\tIP_DROP_SOURCE_MEMBERSHIP      = 0x47\n\tIP_DUMMYNET3                   = 0x31\n\tIP_DUMMYNET_CONFIGURE          = 0x3c\n\tIP_DUMMYNET_DEL                = 0x3d\n\tIP_DUMMYNET_FLUSH              = 0x3e\n\tIP_DUMMYNET_GET                = 0x40\n\tIP_FLOWID                      = 0x5a\n\tIP_FLOWTYPE                    = 0x5b\n\tIP_FW3                         = 0x30\n\tIP_FW_ADD                      = 0x32\n\tIP_FW_DEL                      = 0x33\n\tIP_FW_FLUSH                    = 0x34\n\tIP_FW_GET                      = 0x36\n\tIP_FW_NAT_CFG                  = 0x38\n\tIP_FW_NAT_DEL                  = 0x39\n\tIP_FW_NAT_GET_CONFIG           = 0x3a\n\tIP_FW_NAT_GET_LOG              = 0x3b\n\tIP_FW_RESETLOG                 = 0x37\n\tIP_FW_TABLE_ADD                = 0x28\n\tIP_FW_TABLE_DEL                = 0x29\n\tIP_FW_TABLE_FLUSH              = 0x2a\n\tIP_FW_TABLE_GETSIZE            = 0x2b\n\tIP_FW_TABLE_LIST               = 0x2c\n\tIP_FW_ZERO                     = 0x35\n\tIP_HDRINCL                     = 0x2\n\tIP_IPSEC_POLICY                = 0x15\n\tIP_MAXPACKET                   = 0xffff\n\tIP_MAX_GROUP_SRC_FILTER        = 0x200\n\tIP_MAX_MEMBERSHIPS             = 0xfff\n\tIP_MAX_SOCK_MUTE_FILTER        = 0x80\n\tIP_MAX_SOCK_SRC_FILTER         = 0x80\n\tIP_MF                          = 0x2000\n\tIP_MINTTL                      = 0x42\n\tIP_MSFILTER                    = 0x4a\n\tIP_MSS                         = 0x240\n\tIP_MULTICAST_IF                = 0x9\n\tIP_MULTICAST_LOOP              = 0xb\n\tIP_MULTICAST_TTL               = 0xa\n\tIP_MULTICAST_VIF               = 0xe\n\tIP_OFFMASK                     = 0x1fff\n\tIP_ONESBCAST                   = 0x17\n\tIP_OPTIONS                     = 0x1\n\tIP_ORIGDSTADDR                 = 0x1b\n\tIP_PORTRANGE                   = 0x13\n\tIP_PORTRANGE_DEFAULT           = 0x0\n\tIP_PORTRANGE_HIGH              = 0x1\n\tIP_PORTRANGE_LOW               = 0x2\n\tIP_RECVDSTADDR                 = 0x7\n\tIP_RECVFLOWID                  = 0x5d\n\tIP_RECVIF                      = 0x14\n\tIP_RECVOPTS                    = 0x5\n\tIP_RECVORIGDSTADDR             = 0x1b\n\tIP_RECVRETOPTS                 = 0x6\n\tIP_RECVRSSBUCKETID             = 0x5e\n\tIP_RECVTOS                     = 0x44\n\tIP_RECVTTL                     = 0x41\n\tIP_RETOPTS                     = 0x8\n\tIP_RF                          = 0x8000\n\tIP_RSSBUCKETID                 = 0x5c\n\tIP_RSS_LISTEN_BUCKET           = 0x1a\n\tIP_RSVP_OFF                    = 0x10\n\tIP_RSVP_ON                     = 0xf\n\tIP_RSVP_VIF_OFF                = 0x12\n\tIP_RSVP_VIF_ON                 = 0x11\n\tIP_SENDSRCADDR                 = 0x7\n\tIP_TOS                         = 0x3\n\tIP_TTL                         = 0x4\n\tIP_UNBLOCK_SOURCE              = 0x49\n\tIP_VLAN_PCP                    = 0x4b\n\tISIG                           = 0x80\n\tISTRIP                         = 0x20\n\tITIMER_PROF                    = 0x2\n\tITIMER_REAL                    = 0x0\n\tITIMER_VIRTUAL                 = 0x1\n\tIXANY                          = 0x800\n\tIXOFF                          = 0x400\n\tIXON                           = 0x200\n\tKERN_HOSTNAME                  = 0xa\n\tKERN_OSRELEASE                 = 0x2\n\tKERN_OSTYPE                    = 0x1\n\tKERN_VERSION                   = 0x4\n\tLOCAL_CONNWAIT                 = 0x4\n\tLOCAL_CREDS                    = 0x2\n\tLOCAL_CREDS_PERSISTENT         = 0x3\n\tLOCAL_PEERCRED                 = 0x1\n\tLOCAL_VENDOR                   = 0x80000000\n\tLOCK_EX                        = 0x2\n\tLOCK_NB                        = 0x4\n\tLOCK_SH                        = 0x1\n\tLOCK_UN                        = 0x8\n\tMADV_AUTOSYNC                  = 0x7\n\tMADV_CORE                      = 0x9\n\tMADV_DONTNEED                  = 0x4\n\tMADV_FREE                      = 0x5\n\tMADV_NOCORE                    = 0x8\n\tMADV_NORMAL                    = 0x0\n\tMADV_NOSYNC                    = 0x6\n\tMADV_PROTECT                   = 0xa\n\tMADV_RANDOM                    = 0x1\n\tMADV_SEQUENTIAL                = 0x2\n\tMADV_WILLNEED                  = 0x3\n\tMAP_32BIT                      = 0x80000\n\tMAP_ALIGNED_SUPER              = 0x1000000\n\tMAP_ALIGNMENT_MASK             = -0x1000000\n\tMAP_ALIGNMENT_SHIFT            = 0x18\n\tMAP_ANON                       = 0x1000\n\tMAP_ANONYMOUS                  = 0x1000\n\tMAP_COPY                       = 0x2\n\tMAP_EXCL                       = 0x4000\n\tMAP_FILE                       = 0x0\n\tMAP_FIXED                      = 0x10\n\tMAP_GUARD                      = 0x2000\n\tMAP_HASSEMAPHORE               = 0x200\n\tMAP_NOCORE                     = 0x20000\n\tMAP_NOSYNC                     = 0x800\n\tMAP_PREFAULT_READ              = 0x40000\n\tMAP_PRIVATE                    = 0x2\n\tMAP_RESERVED0020               = 0x20\n\tMAP_RESERVED0040               = 0x40\n\tMAP_RESERVED0080               = 0x80\n\tMAP_RESERVED0100               = 0x100\n\tMAP_SHARED                     = 0x1\n\tMAP_STACK                      = 0x400\n\tMCAST_BLOCK_SOURCE             = 0x54\n\tMCAST_EXCLUDE                  = 0x2\n\tMCAST_INCLUDE                  = 0x1\n\tMCAST_JOIN_GROUP               = 0x50\n\tMCAST_JOIN_SOURCE_GROUP        = 0x52\n\tMCAST_LEAVE_GROUP              = 0x51\n\tMCAST_LEAVE_SOURCE_GROUP       = 0x53\n\tMCAST_UNBLOCK_SOURCE           = 0x55\n\tMCAST_UNDEFINED                = 0x0\n\tMCL_CURRENT                    = 0x1\n\tMCL_FUTURE                     = 0x2\n\tMFD_ALLOW_SEALING              = 0x2\n\tMFD_CLOEXEC                    = 0x1\n\tMFD_HUGETLB                    = 0x4\n\tMFD_HUGE_16GB                  = -0x78000000\n\tMFD_HUGE_16MB                  = 0x60000000\n\tMFD_HUGE_1GB                   = 0x78000000\n\tMFD_HUGE_1MB                   = 0x50000000\n\tMFD_HUGE_256MB                 = 0x70000000\n\tMFD_HUGE_2GB                   = 0x7c000000\n\tMFD_HUGE_2MB                   = 0x54000000\n\tMFD_HUGE_32MB                  = 0x64000000\n\tMFD_HUGE_512KB                 = 0x4c000000\n\tMFD_HUGE_512MB                 = 0x74000000\n\tMFD_HUGE_64KB                  = 0x40000000\n\tMFD_HUGE_8MB                   = 0x5c000000\n\tMFD_HUGE_MASK                  = 0xfc000000\n\tMFD_HUGE_SHIFT                 = 0x1a\n\tMNT_ACLS                       = 0x8000000\n\tMNT_ASYNC                      = 0x40\n\tMNT_AUTOMOUNTED                = 0x200000000\n\tMNT_BYFSID                     = 0x8000000\n\tMNT_CMDFLAGS                   = 0x300d0f0000\n\tMNT_DEFEXPORTED                = 0x200\n\tMNT_DELEXPORT                  = 0x20000\n\tMNT_EMPTYDIR                   = 0x2000000000\n\tMNT_EXKERB                     = 0x800\n\tMNT_EXPORTANON                 = 0x400\n\tMNT_EXPORTED                   = 0x100\n\tMNT_EXPUBLIC                   = 0x20000000\n\tMNT_EXRDONLY                   = 0x80\n\tMNT_EXTLS                      = 0x4000000000\n\tMNT_EXTLSCERT                  = 0x8000000000\n\tMNT_EXTLSCERTUSER              = 0x10000000000\n\tMNT_FORCE                      = 0x80000\n\tMNT_GJOURNAL                   = 0x2000000\n\tMNT_IGNORE                     = 0x800000\n\tMNT_LAZY                       = 0x3\n\tMNT_LOCAL                      = 0x1000\n\tMNT_MULTILABEL                 = 0x4000000\n\tMNT_NFS4ACLS                   = 0x10\n\tMNT_NOATIME                    = 0x10000000\n\tMNT_NOCLUSTERR                 = 0x40000000\n\tMNT_NOCLUSTERW                 = 0x80000000\n\tMNT_NOCOVER                    = 0x1000000000\n\tMNT_NOEXEC                     = 0x4\n\tMNT_NONBUSY                    = 0x4000000\n\tMNT_NOSUID                     = 0x8\n\tMNT_NOSYMFOLLOW                = 0x400000\n\tMNT_NOWAIT                     = 0x2\n\tMNT_QUOTA                      = 0x2000\n\tMNT_RDONLY                     = 0x1\n\tMNT_RELOAD                     = 0x40000\n\tMNT_ROOTFS                     = 0x4000\n\tMNT_SNAPSHOT                   = 0x1000000\n\tMNT_SOFTDEP                    = 0x200000\n\tMNT_SUIDDIR                    = 0x100000\n\tMNT_SUJ                        = 0x100000000\n\tMNT_SUSPEND                    = 0x4\n\tMNT_SYNCHRONOUS                = 0x2\n\tMNT_UNION                      = 0x20\n\tMNT_UNTRUSTED                  = 0x800000000\n\tMNT_UPDATE                     = 0x10000\n\tMNT_UPDATEMASK                 = 0xad8d0807e\n\tMNT_USER                       = 0x8000\n\tMNT_VERIFIED                   = 0x400000000\n\tMNT_VISFLAGMASK                = 0xffef0ffff\n\tMNT_WAIT                       = 0x1\n\tMSG_CMSG_CLOEXEC               = 0x40000\n\tMSG_COMPAT                     = 0x8000\n\tMSG_CTRUNC                     = 0x20\n\tMSG_DONTROUTE                  = 0x4\n\tMSG_DONTWAIT                   = 0x80\n\tMSG_EOF                        = 0x100\n\tMSG_EOR                        = 0x8\n\tMSG_NBIO                       = 0x4000\n\tMSG_NOSIGNAL                   = 0x20000\n\tMSG_NOTIFICATION               = 0x2000\n\tMSG_OOB                        = 0x1\n\tMSG_PEEK                       = 0x2\n\tMSG_TRUNC                      = 0x10\n\tMSG_WAITALL                    = 0x40\n\tMSG_WAITFORONE                 = 0x80000\n\tMS_ASYNC                       = 0x1\n\tMS_INVALIDATE                  = 0x2\n\tMS_SYNC                        = 0x0\n\tNAME_MAX                       = 0xff\n\tNET_RT_DUMP                    = 0x1\n\tNET_RT_FLAGS                   = 0x2\n\tNET_RT_IFLIST                  = 0x3\n\tNET_RT_IFLISTL                 = 0x5\n\tNET_RT_IFMALIST                = 0x4\n\tNET_RT_NHGRP                   = 0x7\n\tNET_RT_NHOP                    = 0x6\n\tNFDBITS                        = 0x40\n\tNOFLSH                         = 0x80000000\n\tNOKERNINFO                     = 0x2000000\n\tNOTE_ABSTIME                   = 0x10\n\tNOTE_ATTRIB                    = 0x8\n\tNOTE_CHILD                     = 0x4\n\tNOTE_CLOSE                     = 0x100\n\tNOTE_CLOSE_WRITE               = 0x200\n\tNOTE_DELETE                    = 0x1\n\tNOTE_EXEC                      = 0x20000000\n\tNOTE_EXIT                      = 0x80000000\n\tNOTE_EXTEND                    = 0x4\n\tNOTE_FFAND                     = 0x40000000\n\tNOTE_FFCOPY                    = 0xc0000000\n\tNOTE_FFCTRLMASK                = 0xc0000000\n\tNOTE_FFLAGSMASK                = 0xffffff\n\tNOTE_FFNOP                     = 0x0\n\tNOTE_FFOR                      = 0x80000000\n\tNOTE_FILE_POLL                 = 0x2\n\tNOTE_FORK                      = 0x40000000\n\tNOTE_LINK                      = 0x10\n\tNOTE_LOWAT                     = 0x1\n\tNOTE_MSECONDS                  = 0x2\n\tNOTE_NSECONDS                  = 0x8\n\tNOTE_OPEN                      = 0x80\n\tNOTE_PCTRLMASK                 = 0xf0000000\n\tNOTE_PDATAMASK                 = 0xfffff\n\tNOTE_READ                      = 0x400\n\tNOTE_RENAME                    = 0x20\n\tNOTE_REVOKE                    = 0x40\n\tNOTE_SECONDS                   = 0x1\n\tNOTE_TRACK                     = 0x1\n\tNOTE_TRACKERR                  = 0x2\n\tNOTE_TRIGGER                   = 0x1000000\n\tNOTE_USECONDS                  = 0x4\n\tNOTE_WRITE                     = 0x2\n\tOCRNL                          = 0x10\n\tONLCR                          = 0x2\n\tONLRET                         = 0x40\n\tONOCR                          = 0x20\n\tONOEOT                         = 0x8\n\tOPOST                          = 0x1\n\tOXTABS                         = 0x4\n\tO_ACCMODE                      = 0x3\n\tO_APPEND                       = 0x8\n\tO_ASYNC                        = 0x40\n\tO_CLOEXEC                      = 0x100000\n\tO_CREAT                        = 0x200\n\tO_DIRECT                       = 0x10000\n\tO_DIRECTORY                    = 0x20000\n\tO_DSYNC                        = 0x1000000\n\tO_EMPTY_PATH                   = 0x2000000\n\tO_EXCL                         = 0x800\n\tO_EXEC                         = 0x40000\n\tO_EXLOCK                       = 0x20\n\tO_FSYNC                        = 0x80\n\tO_NDELAY                       = 0x4\n\tO_NOCTTY                       = 0x8000\n\tO_NOFOLLOW                     = 0x100\n\tO_NONBLOCK                     = 0x4\n\tO_PATH                         = 0x400000\n\tO_RDONLY                       = 0x0\n\tO_RDWR                         = 0x2\n\tO_RESOLVE_BENEATH              = 0x800000\n\tO_SEARCH                       = 0x40000\n\tO_SHLOCK                       = 0x10\n\tO_SYNC                         = 0x80\n\tO_TRUNC                        = 0x400\n\tO_TTY_INIT                     = 0x80000\n\tO_VERIFY                       = 0x200000\n\tO_WRONLY                       = 0x1\n\tPARENB                         = 0x1000\n\tPARMRK                         = 0x8\n\tPARODD                         = 0x2000\n\tPENDIN                         = 0x20000000\n\tPIOD_READ_D                    = 0x1\n\tPIOD_READ_I                    = 0x3\n\tPIOD_WRITE_D                   = 0x2\n\tPIOD_WRITE_I                   = 0x4\n\tPRIO_PGRP                      = 0x1\n\tPRIO_PROCESS                   = 0x0\n\tPRIO_USER                      = 0x2\n\tPROT_EXEC                      = 0x4\n\tPROT_NONE                      = 0x0\n\tPROT_READ                      = 0x1\n\tPROT_WRITE                     = 0x2\n\tPTRACE_DEFAULT                 = 0x1\n\tPTRACE_EXEC                    = 0x1\n\tPTRACE_FORK                    = 0x8\n\tPTRACE_LWP                     = 0x10\n\tPTRACE_SCE                     = 0x2\n\tPTRACE_SCX                     = 0x4\n\tPTRACE_SYSCALL                 = 0x6\n\tPTRACE_VFORK                   = 0x20\n\tPT_ATTACH                      = 0xa\n\tPT_CLEARSTEP                   = 0x10\n\tPT_CONTINUE                    = 0x7\n\tPT_COREDUMP                    = 0x1d\n\tPT_DETACH                      = 0xb\n\tPT_FIRSTMACH                   = 0x40\n\tPT_FOLLOW_FORK                 = 0x17\n\tPT_GETDBREGS                   = 0x25\n\tPT_GETFPREGS                   = 0x23\n\tPT_GETLWPLIST                  = 0xf\n\tPT_GETNUMLWPS                  = 0xe\n\tPT_GETREGS                     = 0x21\n\tPT_GET_EVENT_MASK              = 0x19\n\tPT_GET_SC_ARGS                 = 0x1b\n\tPT_GET_SC_RET                  = 0x1c\n\tPT_IO                          = 0xc\n\tPT_KILL                        = 0x8\n\tPT_LWPINFO                     = 0xd\n\tPT_LWP_EVENTS                  = 0x18\n\tPT_READ_D                      = 0x2\n\tPT_READ_I                      = 0x1\n\tPT_RESUME                      = 0x13\n\tPT_SETDBREGS                   = 0x26\n\tPT_SETFPREGS                   = 0x24\n\tPT_SETREGS                     = 0x22\n\tPT_SETSTEP                     = 0x11\n\tPT_SET_EVENT_MASK              = 0x1a\n\tPT_STEP                        = 0x9\n\tPT_SUSPEND                     = 0x12\n\tPT_SYSCALL                     = 0x16\n\tPT_TO_SCE                      = 0x14\n\tPT_TO_SCX                      = 0x15\n\tPT_TRACE_ME                    = 0x0\n\tPT_VM_ENTRY                    = 0x29\n\tPT_VM_TIMESTAMP                = 0x28\n\tPT_WRITE_D                     = 0x5\n\tPT_WRITE_I                     = 0x4\n\tP_ZONEID                       = 0xc\n\tRLIMIT_AS                      = 0xa\n\tRLIMIT_CORE                    = 0x4\n\tRLIMIT_CPU                     = 0x0\n\tRLIMIT_DATA                    = 0x2\n\tRLIMIT_FSIZE                   = 0x1\n\tRLIMIT_MEMLOCK                 = 0x6\n\tRLIMIT_NOFILE                  = 0x8\n\tRLIMIT_NPROC                   = 0x7\n\tRLIMIT_RSS                     = 0x5\n\tRLIMIT_STACK                   = 0x3\n\tRLIM_INFINITY                  = 0x7fffffffffffffff\n\tRTAX_AUTHOR                    = 0x6\n\tRTAX_BRD                       = 0x7\n\tRTAX_DST                       = 0x0\n\tRTAX_GATEWAY                   = 0x1\n\tRTAX_GENMASK                   = 0x3\n\tRTAX_IFA                       = 0x5\n\tRTAX_IFP                       = 0x4\n\tRTAX_MAX                       = 0x8\n\tRTAX_NETMASK                   = 0x2\n\tRTA_AUTHOR                     = 0x40\n\tRTA_BRD                        = 0x80\n\tRTA_DST                        = 0x1\n\tRTA_GATEWAY                    = 0x2\n\tRTA_GENMASK                    = 0x8\n\tRTA_IFA                        = 0x20\n\tRTA_IFP                        = 0x10\n\tRTA_NETMASK                    = 0x4\n\tRTF_BLACKHOLE                  = 0x1000\n\tRTF_BROADCAST                  = 0x400000\n\tRTF_DONE                       = 0x40\n\tRTF_DYNAMIC                    = 0x10\n\tRTF_FIXEDMTU                   = 0x80000\n\tRTF_FMASK                      = 0x1004d808\n\tRTF_GATEWAY                    = 0x2\n\tRTF_GWFLAG_COMPAT              = 0x80000000\n\tRTF_HOST                       = 0x4\n\tRTF_LLDATA                     = 0x400\n\tRTF_LLINFO                     = 0x400\n\tRTF_LOCAL                      = 0x200000\n\tRTF_MODIFIED                   = 0x20\n\tRTF_MULTICAST                  = 0x800000\n\tRTF_PINNED                     = 0x100000\n\tRTF_PROTO1                     = 0x8000\n\tRTF_PROTO2                     = 0x4000\n\tRTF_PROTO3                     = 0x40000\n\tRTF_REJECT                     = 0x8\n\tRTF_STATIC                     = 0x800\n\tRTF_STICKY                     = 0x10000000\n\tRTF_UP                         = 0x1\n\tRTF_XRESOLVE                   = 0x200\n\tRTM_ADD                        = 0x1\n\tRTM_CHANGE                     = 0x3\n\tRTM_DELADDR                    = 0xd\n\tRTM_DELETE                     = 0x2\n\tRTM_DELMADDR                   = 0x10\n\tRTM_GET                        = 0x4\n\tRTM_IEEE80211                  = 0x12\n\tRTM_IFANNOUNCE                 = 0x11\n\tRTM_IFINFO                     = 0xe\n\tRTM_LOCK                       = 0x8\n\tRTM_LOSING                     = 0x5\n\tRTM_MISS                       = 0x7\n\tRTM_NEWADDR                    = 0xc\n\tRTM_NEWMADDR                   = 0xf\n\tRTM_REDIRECT                   = 0x6\n\tRTM_RESOLVE                    = 0xb\n\tRTM_RTTUNIT                    = 0xf4240\n\tRTM_VERSION                    = 0x5\n\tRTV_EXPIRE                     = 0x4\n\tRTV_HOPCOUNT                   = 0x2\n\tRTV_MTU                        = 0x1\n\tRTV_RPIPE                      = 0x8\n\tRTV_RTT                        = 0x40\n\tRTV_RTTVAR                     = 0x80\n\tRTV_SPIPE                      = 0x10\n\tRTV_SSTHRESH                   = 0x20\n\tRTV_WEIGHT                     = 0x100\n\tRT_ALL_FIBS                    = -0x1\n\tRT_BLACKHOLE                   = 0x40\n\tRT_DEFAULT_FIB                 = 0x0\n\tRT_DEFAULT_WEIGHT              = 0x1\n\tRT_HAS_GW                      = 0x80\n\tRT_HAS_HEADER                  = 0x10\n\tRT_HAS_HEADER_BIT              = 0x4\n\tRT_L2_ME                       = 0x4\n\tRT_L2_ME_BIT                   = 0x2\n\tRT_LLE_CACHE                   = 0x100\n\tRT_MAX_WEIGHT                  = 0xffffff\n\tRT_MAY_LOOP                    = 0x8\n\tRT_MAY_LOOP_BIT                = 0x3\n\tRT_REJECT                      = 0x20\n\tRUSAGE_CHILDREN                = -0x1\n\tRUSAGE_SELF                    = 0x0\n\tRUSAGE_THREAD                  = 0x1\n\tSCM_BINTIME                    = 0x4\n\tSCM_CREDS                      = 0x3\n\tSCM_CREDS2                     = 0x8\n\tSCM_MONOTONIC                  = 0x6\n\tSCM_REALTIME                   = 0x5\n\tSCM_RIGHTS                     = 0x1\n\tSCM_TIMESTAMP                  = 0x2\n\tSCM_TIME_INFO                  = 0x7\n\tSEEK_CUR                       = 0x1\n\tSEEK_DATA                      = 0x3\n\tSEEK_END                       = 0x2\n\tSEEK_HOLE                      = 0x4\n\tSEEK_SET                       = 0x0\n\tSHUT_RD                        = 0x0\n\tSHUT_RDWR                      = 0x2\n\tSHUT_WR                        = 0x1\n\tSIOCADDMULTI                   = 0x80206931\n\tSIOCAIFADDR                    = 0x8040691a\n\tSIOCAIFGROUP                   = 0x80286987\n\tSIOCATMARK                     = 0x40047307\n\tSIOCDELMULTI                   = 0x80206932\n\tSIOCDIFADDR                    = 0x80206919\n\tSIOCDIFGROUP                   = 0x80286989\n\tSIOCDIFPHYADDR                 = 0x80206949\n\tSIOCGDRVSPEC                   = 0xc028697b\n\tSIOCGETSGCNT                   = 0xc0207210\n\tSIOCGETVIFCNT                  = 0xc028720f\n\tSIOCGHIWAT                     = 0x40047301\n\tSIOCGHWADDR                    = 0xc020693e\n\tSIOCGI2C                       = 0xc020693d\n\tSIOCGIFADDR                    = 0xc0206921\n\tSIOCGIFALIAS                   = 0xc044692d\n\tSIOCGIFBRDADDR                 = 0xc0206923\n\tSIOCGIFCAP                     = 0xc020691f\n\tSIOCGIFCONF                    = 0xc0106924\n\tSIOCGIFDATA                    = 0x8020692c\n\tSIOCGIFDESCR                   = 0xc020692a\n\tSIOCGIFDOWNREASON              = 0xc058699a\n\tSIOCGIFDSTADDR                 = 0xc0206922\n\tSIOCGIFFIB                     = 0xc020695c\n\tSIOCGIFFLAGS                   = 0xc0206911\n\tSIOCGIFGENERIC                 = 0xc020693a\n\tSIOCGIFGMEMB                   = 0xc028698a\n\tSIOCGIFGROUP                   = 0xc0286988\n\tSIOCGIFINDEX                   = 0xc0206920\n\tSIOCGIFMAC                     = 0xc0206926\n\tSIOCGIFMEDIA                   = 0xc0306938\n\tSIOCGIFMETRIC                  = 0xc0206917\n\tSIOCGIFMTU                     = 0xc0206933\n\tSIOCGIFNETMASK                 = 0xc0206925\n\tSIOCGIFPDSTADDR                = 0xc0206948\n\tSIOCGIFPHYS                    = 0xc0206935\n\tSIOCGIFPSRCADDR                = 0xc0206947\n\tSIOCGIFRSSHASH                 = 0xc0186997\n\tSIOCGIFRSSKEY                  = 0xc0946996\n\tSIOCGIFSTATUS                  = 0xc331693b\n\tSIOCGIFXMEDIA                  = 0xc030698b\n\tSIOCGLANPCP                    = 0xc0206998\n\tSIOCGLOWAT                     = 0x40047303\n\tSIOCGPGRP                      = 0x40047309\n\tSIOCGPRIVATE_0                 = 0xc0206950\n\tSIOCGPRIVATE_1                 = 0xc0206951\n\tSIOCGTUNFIB                    = 0xc020695e\n\tSIOCIFCREATE                   = 0xc020697a\n\tSIOCIFCREATE2                  = 0xc020697c\n\tSIOCIFDESTROY                  = 0x80206979\n\tSIOCIFGCLONERS                 = 0xc0106978\n\tSIOCSDRVSPEC                   = 0x8028697b\n\tSIOCSHIWAT                     = 0x80047300\n\tSIOCSIFADDR                    = 0x8020690c\n\tSIOCSIFBRDADDR                 = 0x80206913\n\tSIOCSIFCAP                     = 0x8020691e\n\tSIOCSIFDESCR                   = 0x80206929\n\tSIOCSIFDSTADDR                 = 0x8020690e\n\tSIOCSIFFIB                     = 0x8020695d\n\tSIOCSIFFLAGS                   = 0x80206910\n\tSIOCSIFGENERIC                 = 0x80206939\n\tSIOCSIFLLADDR                  = 0x8020693c\n\tSIOCSIFMAC                     = 0x80206927\n\tSIOCSIFMEDIA                   = 0xc0206937\n\tSIOCSIFMETRIC                  = 0x80206918\n\tSIOCSIFMTU                     = 0x80206934\n\tSIOCSIFNAME                    = 0x80206928\n\tSIOCSIFNETMASK                 = 0x80206916\n\tSIOCSIFPHYADDR                 = 0x80406946\n\tSIOCSIFPHYS                    = 0x80206936\n\tSIOCSIFRVNET                   = 0xc020695b\n\tSIOCSIFVNET                    = 0xc020695a\n\tSIOCSLANPCP                    = 0x80206999\n\tSIOCSLOWAT                     = 0x80047302\n\tSIOCSPGRP                      = 0x80047308\n\tSIOCSTUNFIB                    = 0x8020695f\n\tSOCK_CLOEXEC                   = 0x10000000\n\tSOCK_DGRAM                     = 0x2\n\tSOCK_MAXADDRLEN                = 0xff\n\tSOCK_NONBLOCK                  = 0x20000000\n\tSOCK_RAW                       = 0x3\n\tSOCK_RDM                       = 0x4\n\tSOCK_SEQPACKET                 = 0x5\n\tSOCK_STREAM                    = 0x1\n\tSOL_LOCAL                      = 0x0\n\tSOL_SOCKET                     = 0xffff\n\tSOMAXCONN                      = 0x80\n\tSO_ACCEPTCONN                  = 0x2\n\tSO_ACCEPTFILTER                = 0x1000\n\tSO_BINTIME                     = 0x2000\n\tSO_BROADCAST                   = 0x20\n\tSO_DEBUG                       = 0x1\n\tSO_DOMAIN                      = 0x1019\n\tSO_DONTROUTE                   = 0x10\n\tSO_ERROR                       = 0x1007\n\tSO_KEEPALIVE                   = 0x8\n\tSO_LABEL                       = 0x1009\n\tSO_LINGER                      = 0x80\n\tSO_LISTENINCQLEN               = 0x1013\n\tSO_LISTENQLEN                  = 0x1012\n\tSO_LISTENQLIMIT                = 0x1011\n\tSO_MAX_PACING_RATE             = 0x1018\n\tSO_NOSIGPIPE                   = 0x800\n\tSO_NO_DDP                      = 0x8000\n\tSO_NO_OFFLOAD                  = 0x4000\n\tSO_OOBINLINE                   = 0x100\n\tSO_PEERLABEL                   = 0x1010\n\tSO_PROTOCOL                    = 0x1016\n\tSO_PROTOTYPE                   = 0x1016\n\tSO_RCVBUF                      = 0x1002\n\tSO_RCVLOWAT                    = 0x1004\n\tSO_RCVTIMEO                    = 0x1006\n\tSO_RERROR                      = 0x20000\n\tSO_REUSEADDR                   = 0x4\n\tSO_REUSEPORT                   = 0x200\n\tSO_REUSEPORT_LB                = 0x10000\n\tSO_SETFIB                      = 0x1014\n\tSO_SNDBUF                      = 0x1001\n\tSO_SNDLOWAT                    = 0x1003\n\tSO_SNDTIMEO                    = 0x1005\n\tSO_TIMESTAMP                   = 0x400\n\tSO_TS_BINTIME                  = 0x1\n\tSO_TS_CLOCK                    = 0x1017\n\tSO_TS_CLOCK_MAX                = 0x3\n\tSO_TS_DEFAULT                  = 0x0\n\tSO_TS_MONOTONIC                = 0x3\n\tSO_TS_REALTIME                 = 0x2\n\tSO_TS_REALTIME_MICRO           = 0x0\n\tSO_TYPE                        = 0x1008\n\tSO_USELOOPBACK                 = 0x40\n\tSO_USER_COOKIE                 = 0x1015\n\tSO_VENDOR                      = 0x80000000\n\tS_BLKSIZE                      = 0x200\n\tS_IEXEC                        = 0x40\n\tS_IFBLK                        = 0x6000\n\tS_IFCHR                        = 0x2000\n\tS_IFDIR                        = 0x4000\n\tS_IFIFO                        = 0x1000\n\tS_IFLNK                        = 0xa000\n\tS_IFMT                         = 0xf000\n\tS_IFREG                        = 0x8000\n\tS_IFSOCK                       = 0xc000\n\tS_IFWHT                        = 0xe000\n\tS_IREAD                        = 0x100\n\tS_IRGRP                        = 0x20\n\tS_IROTH                        = 0x4\n\tS_IRUSR                        = 0x100\n\tS_IRWXG                        = 0x38\n\tS_IRWXO                        = 0x7\n\tS_IRWXU                        = 0x1c0\n\tS_ISGID                        = 0x400\n\tS_ISTXT                        = 0x200\n\tS_ISUID                        = 0x800\n\tS_ISVTX                        = 0x200\n\tS_IWGRP                        = 0x10\n\tS_IWOTH                        = 0x2\n\tS_IWRITE                       = 0x80\n\tS_IWUSR                        = 0x80\n\tS_IXGRP                        = 0x8\n\tS_IXOTH                        = 0x1\n\tS_IXUSR                        = 0x40\n\tTAB0                           = 0x0\n\tTAB3                           = 0x4\n\tTABDLY                         = 0x4\n\tTCIFLUSH                       = 0x1\n\tTCIOFF                         = 0x3\n\tTCIOFLUSH                      = 0x3\n\tTCION                          = 0x4\n\tTCOFLUSH                       = 0x2\n\tTCOOFF                         = 0x1\n\tTCOON                          = 0x2\n\tTCPOPT_EOL                     = 0x0\n\tTCPOPT_FAST_OPEN               = 0x22\n\tTCPOPT_MAXSEG                  = 0x2\n\tTCPOPT_NOP                     = 0x1\n\tTCPOPT_PAD                     = 0x0\n\tTCPOPT_SACK                    = 0x5\n\tTCPOPT_SACK_PERMITTED          = 0x4\n\tTCPOPT_SIGNATURE               = 0x13\n\tTCPOPT_TIMESTAMP               = 0x8\n\tTCPOPT_WINDOW                  = 0x3\n\tTCP_BBR_ACK_COMP_ALG           = 0x448\n\tTCP_BBR_ALGORITHM              = 0x43b\n\tTCP_BBR_DRAIN_INC_EXTRA        = 0x43c\n\tTCP_BBR_DRAIN_PG               = 0x42e\n\tTCP_BBR_EXTRA_GAIN             = 0x449\n\tTCP_BBR_EXTRA_STATE            = 0x453\n\tTCP_BBR_FLOOR_MIN_TSO          = 0x454\n\tTCP_BBR_HDWR_PACE              = 0x451\n\tTCP_BBR_HOLD_TARGET            = 0x436\n\tTCP_BBR_IWINTSO                = 0x42b\n\tTCP_BBR_LOWGAIN_FD             = 0x436\n\tTCP_BBR_LOWGAIN_HALF           = 0x435\n\tTCP_BBR_LOWGAIN_THRESH         = 0x434\n\tTCP_BBR_MAX_RTO                = 0x439\n\tTCP_BBR_MIN_RTO                = 0x438\n\tTCP_BBR_MIN_TOPACEOUT          = 0x455\n\tTCP_BBR_ONE_RETRAN             = 0x431\n\tTCP_BBR_PACE_CROSS             = 0x442\n\tTCP_BBR_PACE_DEL_TAR           = 0x43f\n\tTCP_BBR_PACE_OH                = 0x435\n\tTCP_BBR_PACE_PER_SEC           = 0x43e\n\tTCP_BBR_PACE_SEG_MAX           = 0x440\n\tTCP_BBR_PACE_SEG_MIN           = 0x441\n\tTCP_BBR_POLICER_DETECT         = 0x457\n\tTCP_BBR_PROBE_RTT_GAIN         = 0x44d\n\tTCP_BBR_PROBE_RTT_INT          = 0x430\n\tTCP_BBR_PROBE_RTT_LEN          = 0x44e\n\tTCP_BBR_RACK_INIT_RATE         = 0x458\n\tTCP_BBR_RACK_RTT_USE           = 0x44a\n\tTCP_BBR_RECFORCE               = 0x42c\n\tTCP_BBR_REC_OVER_HPTS          = 0x43a\n\tTCP_BBR_RETRAN_WTSO            = 0x44b\n\tTCP_BBR_RWND_IS_APP            = 0x42f\n\tTCP_BBR_SEND_IWND_IN_TSO       = 0x44f\n\tTCP_BBR_STARTUP_EXIT_EPOCH     = 0x43d\n\tTCP_BBR_STARTUP_LOSS_EXIT      = 0x432\n\tTCP_BBR_STARTUP_PG             = 0x42d\n\tTCP_BBR_TMR_PACE_OH            = 0x448\n\tTCP_BBR_TSLIMITS               = 0x434\n\tTCP_BBR_TSTMP_RAISES           = 0x456\n\tTCP_BBR_UNLIMITED              = 0x43b\n\tTCP_BBR_USEDEL_RATE            = 0x437\n\tTCP_BBR_USE_LOWGAIN            = 0x433\n\tTCP_BBR_USE_RACK_CHEAT         = 0x450\n\tTCP_BBR_USE_RACK_RR            = 0x450\n\tTCP_BBR_UTTER_MAX_TSO          = 0x452\n\tTCP_CA_NAME_MAX                = 0x10\n\tTCP_CCALGOOPT                  = 0x41\n\tTCP_CONGESTION                 = 0x40\n\tTCP_DATA_AFTER_CLOSE           = 0x44c\n\tTCP_DEFER_OPTIONS              = 0x470\n\tTCP_DELACK                     = 0x48\n\tTCP_FASTOPEN                   = 0x401\n\tTCP_FASTOPEN_MAX_COOKIE_LEN    = 0x10\n\tTCP_FASTOPEN_MIN_COOKIE_LEN    = 0x4\n\tTCP_FASTOPEN_PSK_LEN           = 0x10\n\tTCP_FAST_RSM_HACK              = 0x471\n\tTCP_FIN_IS_RST                 = 0x49\n\tTCP_FUNCTION_BLK               = 0x2000\n\tTCP_FUNCTION_NAME_LEN_MAX      = 0x20\n\tTCP_HDWR_RATE_CAP              = 0x46a\n\tTCP_HDWR_UP_ONLY               = 0x46c\n\tTCP_IDLE_REDUCE                = 0x46\n\tTCP_INFO                       = 0x20\n\tTCP_IWND_NB                    = 0x2b\n\tTCP_IWND_NSEG                  = 0x2c\n\tTCP_KEEPCNT                    = 0x400\n\tTCP_KEEPIDLE                   = 0x100\n\tTCP_KEEPINIT                   = 0x80\n\tTCP_KEEPINTVL                  = 0x200\n\tTCP_LOG                        = 0x22\n\tTCP_LOGBUF                     = 0x23\n\tTCP_LOGDUMP                    = 0x25\n\tTCP_LOGDUMPID                  = 0x26\n\tTCP_LOGID                      = 0x24\n\tTCP_LOGID_CNT                  = 0x2e\n\tTCP_LOG_ID_LEN                 = 0x40\n\tTCP_LOG_LIMIT                  = 0x4a\n\tTCP_LOG_TAG                    = 0x2f\n\tTCP_MAXBURST                   = 0x4\n\tTCP_MAXHLEN                    = 0x3c\n\tTCP_MAXOLEN                    = 0x28\n\tTCP_MAXPEAKRATE                = 0x45\n\tTCP_MAXSEG                     = 0x2\n\tTCP_MAXUNACKTIME               = 0x44\n\tTCP_MAXWIN                     = 0xffff\n\tTCP_MAX_SACK                   = 0x4\n\tTCP_MAX_WINSHIFT               = 0xe\n\tTCP_MD5SIG                     = 0x10\n\tTCP_MINMSS                     = 0xd8\n\tTCP_MSS                        = 0x218\n\tTCP_NODELAY                    = 0x1\n\tTCP_NOOPT                      = 0x8\n\tTCP_NOPUSH                     = 0x4\n\tTCP_NO_PRR                     = 0x462\n\tTCP_PACING_RATE_CAP            = 0x46b\n\tTCP_PCAP_IN                    = 0x1000\n\tTCP_PCAP_OUT                   = 0x800\n\tTCP_PERF_INFO                  = 0x4e\n\tTCP_PROC_ACCOUNTING            = 0x4c\n\tTCP_RACK_ABC_VAL               = 0x46d\n\tTCP_RACK_CHEAT_NOT_CONF_RATE   = 0x459\n\tTCP_RACK_DO_DETECTION          = 0x449\n\tTCP_RACK_EARLY_RECOV           = 0x423\n\tTCP_RACK_EARLY_SEG             = 0x424\n\tTCP_RACK_FORCE_MSEG            = 0x45d\n\tTCP_RACK_GP_INCREASE           = 0x446\n\tTCP_RACK_GP_INCREASE_CA        = 0x45a\n\tTCP_RACK_GP_INCREASE_REC       = 0x45c\n\tTCP_RACK_GP_INCREASE_SS        = 0x45b\n\tTCP_RACK_IDLE_REDUCE_HIGH      = 0x444\n\tTCP_RACK_MBUF_QUEUE            = 0x41a\n\tTCP_RACK_MEASURE_CNT           = 0x46f\n\tTCP_RACK_MIN_PACE              = 0x445\n\tTCP_RACK_MIN_PACE_SEG          = 0x446\n\tTCP_RACK_MIN_TO                = 0x422\n\tTCP_RACK_NONRXT_CFG_RATE       = 0x463\n\tTCP_RACK_NO_PUSH_AT_MAX        = 0x466\n\tTCP_RACK_PACE_ALWAYS           = 0x41f\n\tTCP_RACK_PACE_MAX_SEG          = 0x41e\n\tTCP_RACK_PACE_RATE_CA          = 0x45e\n\tTCP_RACK_PACE_RATE_REC         = 0x460\n\tTCP_RACK_PACE_RATE_SS          = 0x45f\n\tTCP_RACK_PACE_REDUCE           = 0x41d\n\tTCP_RACK_PACE_TO_FILL          = 0x467\n\tTCP_RACK_PACING_BETA           = 0x472\n\tTCP_RACK_PACING_BETA_ECN       = 0x473\n\tTCP_RACK_PKT_DELAY             = 0x428\n\tTCP_RACK_PROFILE               = 0x469\n\tTCP_RACK_PROP                  = 0x41b\n\tTCP_RACK_PROP_RATE             = 0x420\n\tTCP_RACK_PRR_SENDALOT          = 0x421\n\tTCP_RACK_REORD_FADE            = 0x426\n\tTCP_RACK_REORD_THRESH          = 0x425\n\tTCP_RACK_RR_CONF               = 0x459\n\tTCP_RACK_TIMER_SLOP            = 0x474\n\tTCP_RACK_TLP_INC_VAR           = 0x429\n\tTCP_RACK_TLP_REDUCE            = 0x41c\n\tTCP_RACK_TLP_THRESH            = 0x427\n\tTCP_RACK_TLP_USE               = 0x447\n\tTCP_REC_ABC_VAL                = 0x46e\n\tTCP_REMOTE_UDP_ENCAPS_PORT     = 0x47\n\tTCP_REUSPORT_LB_NUMA           = 0x402\n\tTCP_REUSPORT_LB_NUMA_CURDOM    = -0x1\n\tTCP_REUSPORT_LB_NUMA_NODOM     = -0x2\n\tTCP_RXTLS_ENABLE               = 0x29\n\tTCP_RXTLS_MODE                 = 0x2a\n\tTCP_SHARED_CWND_ALLOWED        = 0x4b\n\tTCP_SHARED_CWND_ENABLE         = 0x464\n\tTCP_SHARED_CWND_TIME_LIMIT     = 0x468\n\tTCP_STATS                      = 0x21\n\tTCP_TIMELY_DYN_ADJ             = 0x465\n\tTCP_TLS_MODE_IFNET             = 0x2\n\tTCP_TLS_MODE_NONE              = 0x0\n\tTCP_TLS_MODE_SW                = 0x1\n\tTCP_TLS_MODE_TOE               = 0x3\n\tTCP_TXTLS_ENABLE               = 0x27\n\tTCP_TXTLS_MODE                 = 0x28\n\tTCP_USER_LOG                   = 0x30\n\tTCP_USE_CMP_ACKS               = 0x4d\n\tTCP_VENDOR                     = 0x80000000\n\tTCSAFLUSH                      = 0x2\n\tTIMER_ABSTIME                  = 0x1\n\tTIMER_RELTIME                  = 0x0\n\tTIOCCBRK                       = 0x2000747a\n\tTIOCCDTR                       = 0x20007478\n\tTIOCCONS                       = 0x80047462\n\tTIOCDRAIN                      = 0x2000745e\n\tTIOCEXCL                       = 0x2000740d\n\tTIOCEXT                        = 0x80047460\n\tTIOCFLUSH                      = 0x80047410\n\tTIOCGDRAINWAIT                 = 0x40047456\n\tTIOCGETA                       = 0x402c7413\n\tTIOCGETD                       = 0x4004741a\n\tTIOCGPGRP                      = 0x40047477\n\tTIOCGPTN                       = 0x4004740f\n\tTIOCGSID                       = 0x40047463\n\tTIOCGWINSZ                     = 0x40087468\n\tTIOCMBIC                       = 0x8004746b\n\tTIOCMBIS                       = 0x8004746c\n\tTIOCMGDTRWAIT                  = 0x4004745a\n\tTIOCMGET                       = 0x4004746a\n\tTIOCMSDTRWAIT                  = 0x8004745b\n\tTIOCMSET                       = 0x8004746d\n\tTIOCM_CAR                      = 0x40\n\tTIOCM_CD                       = 0x40\n\tTIOCM_CTS                      = 0x20\n\tTIOCM_DCD                      = 0x40\n\tTIOCM_DSR                      = 0x100\n\tTIOCM_DTR                      = 0x2\n\tTIOCM_LE                       = 0x1\n\tTIOCM_RI                       = 0x80\n\tTIOCM_RNG                      = 0x80\n\tTIOCM_RTS                      = 0x4\n\tTIOCM_SR                       = 0x10\n\tTIOCM_ST                       = 0x8\n\tTIOCNOTTY                      = 0x20007471\n\tTIOCNXCL                       = 0x2000740e\n\tTIOCOUTQ                       = 0x40047473\n\tTIOCPKT                        = 0x80047470\n\tTIOCPKT_DATA                   = 0x0\n\tTIOCPKT_DOSTOP                 = 0x20\n\tTIOCPKT_FLUSHREAD              = 0x1\n\tTIOCPKT_FLUSHWRITE             = 0x2\n\tTIOCPKT_IOCTL                  = 0x40\n\tTIOCPKT_NOSTOP                 = 0x10\n\tTIOCPKT_START                  = 0x8\n\tTIOCPKT_STOP                   = 0x4\n\tTIOCPTMASTER                   = 0x2000741c\n\tTIOCSBRK                       = 0x2000747b\n\tTIOCSCTTY                      = 0x20007461\n\tTIOCSDRAINWAIT                 = 0x80047457\n\tTIOCSDTR                       = 0x20007479\n\tTIOCSETA                       = 0x802c7414\n\tTIOCSETAF                      = 0x802c7416\n\tTIOCSETAW                      = 0x802c7415\n\tTIOCSETD                       = 0x8004741b\n\tTIOCSIG                        = 0x2004745f\n\tTIOCSPGRP                      = 0x80047476\n\tTIOCSTART                      = 0x2000746e\n\tTIOCSTAT                       = 0x20007465\n\tTIOCSTI                        = 0x80017472\n\tTIOCSTOP                       = 0x2000746f\n\tTIOCSWINSZ                     = 0x80087467\n\tTIOCTIMESTAMP                  = 0x40107459\n\tTIOCUCNTL                      = 0x80047466\n\tTOSTOP                         = 0x400000\n\tUTIME_NOW                      = -0x1\n\tUTIME_OMIT                     = -0x2\n\tVDISCARD                       = 0xf\n\tVDSUSP                         = 0xb\n\tVEOF                           = 0x0\n\tVEOL                           = 0x1\n\tVEOL2                          = 0x2\n\tVERASE                         = 0x3\n\tVERASE2                        = 0x7\n\tVINTR                          = 0x8\n\tVKILL                          = 0x5\n\tVLNEXT                         = 0xe\n\tVMIN                           = 0x10\n\tVQUIT                          = 0x9\n\tVREPRINT                       = 0x6\n\tVSTART                         = 0xc\n\tVSTATUS                        = 0x12\n\tVSTOP                          = 0xd\n\tVSUSP                          = 0xa\n\tVTIME                          = 0x11\n\tVWERASE                        = 0x4\n\tWCONTINUED                     = 0x4\n\tWCOREFLAG                      = 0x80\n\tWEXITED                        = 0x10\n\tWLINUXCLONE                    = 0x80000000\n\tWNOHANG                        = 0x1\n\tWNOWAIT                        = 0x8\n\tWSTOPPED                       = 0x2\n\tWTRAPPED                       = 0x20\n\tWUNTRACED                      = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x59)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x55)\n\tECAPMODE        = syscall.Errno(0x5e)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDOOFUS         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x56)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTEGRITY      = syscall.Errno(0x61)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x61)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5a)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x57)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5b)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCAPABLE     = syscall.Errno(0x5d)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5f)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEOWNERDEAD      = syscall.Errno(0x60)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5c)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGLIBRT  = syscall.Signal(0x21)\n\tSIGLWP    = syscall.Signal(0x20)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EWOULDBLOCK\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"ECANCELED\", \"operation canceled\"},\n\t{86, \"EILSEQ\", \"illegal byte sequence\"},\n\t{87, \"ENOATTR\", \"attribute not found\"},\n\t{88, \"EDOOFUS\", \"programming error\"},\n\t{89, \"EBADMSG\", \"bad message\"},\n\t{90, \"EMULTIHOP\", \"multihop attempted\"},\n\t{91, \"ENOLINK\", \"link has been severed\"},\n\t{92, \"EPROTO\", \"protocol error\"},\n\t{93, \"ENOTCAPABLE\", \"capabilities insufficient\"},\n\t{94, \"ECAPMODE\", \"not permitted in capability mode\"},\n\t{95, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{96, \"EOWNERDEAD\", \"previous owner died\"},\n\t{97, \"EINTEGRITY\", \"integrity check failed\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"unknown signal\"},\n\t{33, \"SIGLIBRT\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux.go",
    "content": "// Code generated by mkmerge; DO NOT EDIT.\n\n//go:build linux\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAAFS_MAGIC                                  = 0x5a3c69f0\n\tADFS_SUPER_MAGIC                            = 0xadf5\n\tAFFS_SUPER_MAGIC                            = 0xadff\n\tAFS_FS_MAGIC                                = 0x6b414653\n\tAFS_SUPER_MAGIC                             = 0x5346414f\n\tAF_ALG                                      = 0x26\n\tAF_APPLETALK                                = 0x5\n\tAF_ASH                                      = 0x12\n\tAF_ATMPVC                                   = 0x8\n\tAF_ATMSVC                                   = 0x14\n\tAF_AX25                                     = 0x3\n\tAF_BLUETOOTH                                = 0x1f\n\tAF_BRIDGE                                   = 0x7\n\tAF_CAIF                                     = 0x25\n\tAF_CAN                                      = 0x1d\n\tAF_DECnet                                   = 0xc\n\tAF_ECONET                                   = 0x13\n\tAF_FILE                                     = 0x1\n\tAF_IB                                       = 0x1b\n\tAF_IEEE802154                               = 0x24\n\tAF_INET                                     = 0x2\n\tAF_INET6                                    = 0xa\n\tAF_IPX                                      = 0x4\n\tAF_IRDA                                     = 0x17\n\tAF_ISDN                                     = 0x22\n\tAF_IUCV                                     = 0x20\n\tAF_KCM                                      = 0x29\n\tAF_KEY                                      = 0xf\n\tAF_LLC                                      = 0x1a\n\tAF_LOCAL                                    = 0x1\n\tAF_MAX                                      = 0x2e\n\tAF_MCTP                                     = 0x2d\n\tAF_MPLS                                     = 0x1c\n\tAF_NETBEUI                                  = 0xd\n\tAF_NETLINK                                  = 0x10\n\tAF_NETROM                                   = 0x6\n\tAF_NFC                                      = 0x27\n\tAF_PACKET                                   = 0x11\n\tAF_PHONET                                   = 0x23\n\tAF_PPPOX                                    = 0x18\n\tAF_QIPCRTR                                  = 0x2a\n\tAF_RDS                                      = 0x15\n\tAF_ROSE                                     = 0xb\n\tAF_ROUTE                                    = 0x10\n\tAF_RXRPC                                    = 0x21\n\tAF_SECURITY                                 = 0xe\n\tAF_SMC                                      = 0x2b\n\tAF_SNA                                      = 0x16\n\tAF_TIPC                                     = 0x1e\n\tAF_UNIX                                     = 0x1\n\tAF_UNSPEC                                   = 0x0\n\tAF_VSOCK                                    = 0x28\n\tAF_WANPIPE                                  = 0x19\n\tAF_X25                                      = 0x9\n\tAF_XDP                                      = 0x2c\n\tALG_OP_DECRYPT                              = 0x0\n\tALG_OP_ENCRYPT                              = 0x1\n\tALG_SET_AEAD_ASSOCLEN                       = 0x4\n\tALG_SET_AEAD_AUTHSIZE                       = 0x5\n\tALG_SET_DRBG_ENTROPY                        = 0x6\n\tALG_SET_IV                                  = 0x2\n\tALG_SET_KEY                                 = 0x1\n\tALG_SET_KEY_BY_KEY_SERIAL                   = 0x7\n\tALG_SET_OP                                  = 0x3\n\tANON_INODE_FS_MAGIC                         = 0x9041934\n\tARPHRD_6LOWPAN                              = 0x339\n\tARPHRD_ADAPT                                = 0x108\n\tARPHRD_APPLETLK                             = 0x8\n\tARPHRD_ARCNET                               = 0x7\n\tARPHRD_ASH                                  = 0x30d\n\tARPHRD_ATM                                  = 0x13\n\tARPHRD_AX25                                 = 0x3\n\tARPHRD_BIF                                  = 0x307\n\tARPHRD_CAIF                                 = 0x336\n\tARPHRD_CAN                                  = 0x118\n\tARPHRD_CHAOS                                = 0x5\n\tARPHRD_CISCO                                = 0x201\n\tARPHRD_CSLIP                                = 0x101\n\tARPHRD_CSLIP6                               = 0x103\n\tARPHRD_DDCMP                                = 0x205\n\tARPHRD_DLCI                                 = 0xf\n\tARPHRD_ECONET                               = 0x30e\n\tARPHRD_EETHER                               = 0x2\n\tARPHRD_ETHER                                = 0x1\n\tARPHRD_EUI64                                = 0x1b\n\tARPHRD_FCAL                                 = 0x311\n\tARPHRD_FCFABRIC                             = 0x313\n\tARPHRD_FCPL                                 = 0x312\n\tARPHRD_FCPP                                 = 0x310\n\tARPHRD_FDDI                                 = 0x306\n\tARPHRD_FRAD                                 = 0x302\n\tARPHRD_HDLC                                 = 0x201\n\tARPHRD_HIPPI                                = 0x30c\n\tARPHRD_HWX25                                = 0x110\n\tARPHRD_IEEE1394                             = 0x18\n\tARPHRD_IEEE802                              = 0x6\n\tARPHRD_IEEE80211                            = 0x321\n\tARPHRD_IEEE80211_PRISM                      = 0x322\n\tARPHRD_IEEE80211_RADIOTAP                   = 0x323\n\tARPHRD_IEEE802154                           = 0x324\n\tARPHRD_IEEE802154_MONITOR                   = 0x325\n\tARPHRD_IEEE802_TR                           = 0x320\n\tARPHRD_INFINIBAND                           = 0x20\n\tARPHRD_IP6GRE                               = 0x337\n\tARPHRD_IPDDP                                = 0x309\n\tARPHRD_IPGRE                                = 0x30a\n\tARPHRD_IRDA                                 = 0x30f\n\tARPHRD_LAPB                                 = 0x204\n\tARPHRD_LOCALTLK                             = 0x305\n\tARPHRD_LOOPBACK                             = 0x304\n\tARPHRD_MCTP                                 = 0x122\n\tARPHRD_METRICOM                             = 0x17\n\tARPHRD_NETLINK                              = 0x338\n\tARPHRD_NETROM                               = 0x0\n\tARPHRD_NONE                                 = 0xfffe\n\tARPHRD_PHONET                               = 0x334\n\tARPHRD_PHONET_PIPE                          = 0x335\n\tARPHRD_PIMREG                               = 0x30b\n\tARPHRD_PPP                                  = 0x200\n\tARPHRD_PRONET                               = 0x4\n\tARPHRD_RAWHDLC                              = 0x206\n\tARPHRD_RAWIP                                = 0x207\n\tARPHRD_ROSE                                 = 0x10e\n\tARPHRD_RSRVD                                = 0x104\n\tARPHRD_SIT                                  = 0x308\n\tARPHRD_SKIP                                 = 0x303\n\tARPHRD_SLIP                                 = 0x100\n\tARPHRD_SLIP6                                = 0x102\n\tARPHRD_TUNNEL                               = 0x300\n\tARPHRD_TUNNEL6                              = 0x301\n\tARPHRD_VOID                                 = 0xffff\n\tARPHRD_VSOCKMON                             = 0x33a\n\tARPHRD_X25                                  = 0x10f\n\tAUDIT_ADD                                   = 0x3eb\n\tAUDIT_ADD_RULE                              = 0x3f3\n\tAUDIT_ALWAYS                                = 0x2\n\tAUDIT_ANOM_ABEND                            = 0x6a5\n\tAUDIT_ANOM_CREAT                            = 0x6a7\n\tAUDIT_ANOM_LINK                             = 0x6a6\n\tAUDIT_ANOM_PROMISCUOUS                      = 0x6a4\n\tAUDIT_ARCH                                  = 0xb\n\tAUDIT_ARCH_AARCH64                          = 0xc00000b7\n\tAUDIT_ARCH_ALPHA                            = 0xc0009026\n\tAUDIT_ARCH_ARCOMPACT                        = 0x4000005d\n\tAUDIT_ARCH_ARCOMPACTBE                      = 0x5d\n\tAUDIT_ARCH_ARCV2                            = 0x400000c3\n\tAUDIT_ARCH_ARCV2BE                          = 0xc3\n\tAUDIT_ARCH_ARM                              = 0x40000028\n\tAUDIT_ARCH_ARMEB                            = 0x28\n\tAUDIT_ARCH_C6X                              = 0x4000008c\n\tAUDIT_ARCH_C6XBE                            = 0x8c\n\tAUDIT_ARCH_CRIS                             = 0x4000004c\n\tAUDIT_ARCH_CSKY                             = 0x400000fc\n\tAUDIT_ARCH_FRV                              = 0x5441\n\tAUDIT_ARCH_H8300                            = 0x2e\n\tAUDIT_ARCH_HEXAGON                          = 0xa4\n\tAUDIT_ARCH_I386                             = 0x40000003\n\tAUDIT_ARCH_IA64                             = 0xc0000032\n\tAUDIT_ARCH_LOONGARCH32                      = 0x40000102\n\tAUDIT_ARCH_LOONGARCH64                      = 0xc0000102\n\tAUDIT_ARCH_M32R                             = 0x58\n\tAUDIT_ARCH_M68K                             = 0x4\n\tAUDIT_ARCH_MICROBLAZE                       = 0xbd\n\tAUDIT_ARCH_MIPS                             = 0x8\n\tAUDIT_ARCH_MIPS64                           = 0x80000008\n\tAUDIT_ARCH_MIPS64N32                        = 0xa0000008\n\tAUDIT_ARCH_MIPSEL                           = 0x40000008\n\tAUDIT_ARCH_MIPSEL64                         = 0xc0000008\n\tAUDIT_ARCH_MIPSEL64N32                      = 0xe0000008\n\tAUDIT_ARCH_NDS32                            = 0x400000a7\n\tAUDIT_ARCH_NDS32BE                          = 0xa7\n\tAUDIT_ARCH_NIOS2                            = 0x40000071\n\tAUDIT_ARCH_OPENRISC                         = 0x5c\n\tAUDIT_ARCH_PARISC                           = 0xf\n\tAUDIT_ARCH_PARISC64                         = 0x8000000f\n\tAUDIT_ARCH_PPC                              = 0x14\n\tAUDIT_ARCH_PPC64                            = 0x80000015\n\tAUDIT_ARCH_PPC64LE                          = 0xc0000015\n\tAUDIT_ARCH_RISCV32                          = 0x400000f3\n\tAUDIT_ARCH_RISCV64                          = 0xc00000f3\n\tAUDIT_ARCH_S390                             = 0x16\n\tAUDIT_ARCH_S390X                            = 0x80000016\n\tAUDIT_ARCH_SH                               = 0x2a\n\tAUDIT_ARCH_SH64                             = 0x8000002a\n\tAUDIT_ARCH_SHEL                             = 0x4000002a\n\tAUDIT_ARCH_SHEL64                           = 0xc000002a\n\tAUDIT_ARCH_SPARC                            = 0x2\n\tAUDIT_ARCH_SPARC64                          = 0x8000002b\n\tAUDIT_ARCH_TILEGX                           = 0xc00000bf\n\tAUDIT_ARCH_TILEGX32                         = 0x400000bf\n\tAUDIT_ARCH_TILEPRO                          = 0x400000bc\n\tAUDIT_ARCH_UNICORE                          = 0x4000006e\n\tAUDIT_ARCH_X86_64                           = 0xc000003e\n\tAUDIT_ARCH_XTENSA                           = 0x5e\n\tAUDIT_ARG0                                  = 0xc8\n\tAUDIT_ARG1                                  = 0xc9\n\tAUDIT_ARG2                                  = 0xca\n\tAUDIT_ARG3                                  = 0xcb\n\tAUDIT_AVC                                   = 0x578\n\tAUDIT_AVC_PATH                              = 0x57a\n\tAUDIT_BITMASK_SIZE                          = 0x40\n\tAUDIT_BIT_MASK                              = 0x8000000\n\tAUDIT_BIT_TEST                              = 0x48000000\n\tAUDIT_BPF                                   = 0x536\n\tAUDIT_BPRM_FCAPS                            = 0x529\n\tAUDIT_CAPSET                                = 0x52a\n\tAUDIT_CLASS_CHATTR                          = 0x2\n\tAUDIT_CLASS_CHATTR_32                       = 0x3\n\tAUDIT_CLASS_DIR_WRITE                       = 0x0\n\tAUDIT_CLASS_DIR_WRITE_32                    = 0x1\n\tAUDIT_CLASS_READ                            = 0x4\n\tAUDIT_CLASS_READ_32                         = 0x5\n\tAUDIT_CLASS_SIGNAL                          = 0x8\n\tAUDIT_CLASS_SIGNAL_32                       = 0x9\n\tAUDIT_CLASS_WRITE                           = 0x6\n\tAUDIT_CLASS_WRITE_32                        = 0x7\n\tAUDIT_COMPARE_AUID_TO_EUID                  = 0x10\n\tAUDIT_COMPARE_AUID_TO_FSUID                 = 0xe\n\tAUDIT_COMPARE_AUID_TO_OBJ_UID               = 0x5\n\tAUDIT_COMPARE_AUID_TO_SUID                  = 0xf\n\tAUDIT_COMPARE_EGID_TO_FSGID                 = 0x17\n\tAUDIT_COMPARE_EGID_TO_OBJ_GID               = 0x4\n\tAUDIT_COMPARE_EGID_TO_SGID                  = 0x18\n\tAUDIT_COMPARE_EUID_TO_FSUID                 = 0x12\n\tAUDIT_COMPARE_EUID_TO_OBJ_UID               = 0x3\n\tAUDIT_COMPARE_EUID_TO_SUID                  = 0x11\n\tAUDIT_COMPARE_FSGID_TO_OBJ_GID              = 0x9\n\tAUDIT_COMPARE_FSUID_TO_OBJ_UID              = 0x8\n\tAUDIT_COMPARE_GID_TO_EGID                   = 0x14\n\tAUDIT_COMPARE_GID_TO_FSGID                  = 0x15\n\tAUDIT_COMPARE_GID_TO_OBJ_GID                = 0x2\n\tAUDIT_COMPARE_GID_TO_SGID                   = 0x16\n\tAUDIT_COMPARE_SGID_TO_FSGID                 = 0x19\n\tAUDIT_COMPARE_SGID_TO_OBJ_GID               = 0x7\n\tAUDIT_COMPARE_SUID_TO_FSUID                 = 0x13\n\tAUDIT_COMPARE_SUID_TO_OBJ_UID               = 0x6\n\tAUDIT_COMPARE_UID_TO_AUID                   = 0xa\n\tAUDIT_COMPARE_UID_TO_EUID                   = 0xb\n\tAUDIT_COMPARE_UID_TO_FSUID                  = 0xc\n\tAUDIT_COMPARE_UID_TO_OBJ_UID                = 0x1\n\tAUDIT_COMPARE_UID_TO_SUID                   = 0xd\n\tAUDIT_CONFIG_CHANGE                         = 0x519\n\tAUDIT_CWD                                   = 0x51b\n\tAUDIT_DAEMON_ABORT                          = 0x4b2\n\tAUDIT_DAEMON_CONFIG                         = 0x4b3\n\tAUDIT_DAEMON_END                            = 0x4b1\n\tAUDIT_DAEMON_START                          = 0x4b0\n\tAUDIT_DEL                                   = 0x3ec\n\tAUDIT_DEL_RULE                              = 0x3f4\n\tAUDIT_DEVMAJOR                              = 0x64\n\tAUDIT_DEVMINOR                              = 0x65\n\tAUDIT_DIR                                   = 0x6b\n\tAUDIT_DM_CTRL                               = 0x53a\n\tAUDIT_DM_EVENT                              = 0x53b\n\tAUDIT_EGID                                  = 0x6\n\tAUDIT_EOE                                   = 0x528\n\tAUDIT_EQUAL                                 = 0x40000000\n\tAUDIT_EUID                                  = 0x2\n\tAUDIT_EVENT_LISTENER                        = 0x537\n\tAUDIT_EXE                                   = 0x70\n\tAUDIT_EXECVE                                = 0x51d\n\tAUDIT_EXIT                                  = 0x67\n\tAUDIT_FAIL_PANIC                            = 0x2\n\tAUDIT_FAIL_PRINTK                           = 0x1\n\tAUDIT_FAIL_SILENT                           = 0x0\n\tAUDIT_FANOTIFY                              = 0x533\n\tAUDIT_FD_PAIR                               = 0x525\n\tAUDIT_FEATURE_BITMAP_ALL                    = 0x7f\n\tAUDIT_FEATURE_BITMAP_BACKLOG_LIMIT          = 0x1\n\tAUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME      = 0x2\n\tAUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND         = 0x8\n\tAUDIT_FEATURE_BITMAP_EXECUTABLE_PATH        = 0x4\n\tAUDIT_FEATURE_BITMAP_FILTER_FS              = 0x40\n\tAUDIT_FEATURE_BITMAP_LOST_RESET             = 0x20\n\tAUDIT_FEATURE_BITMAP_SESSIONID_FILTER       = 0x10\n\tAUDIT_FEATURE_CHANGE                        = 0x530\n\tAUDIT_FEATURE_LOGINUID_IMMUTABLE            = 0x1\n\tAUDIT_FEATURE_ONLY_UNSET_LOGINUID           = 0x0\n\tAUDIT_FEATURE_VERSION                       = 0x1\n\tAUDIT_FIELD_COMPARE                         = 0x6f\n\tAUDIT_FILETYPE                              = 0x6c\n\tAUDIT_FILTERKEY                             = 0xd2\n\tAUDIT_FILTER_ENTRY                          = 0x2\n\tAUDIT_FILTER_EXCLUDE                        = 0x5\n\tAUDIT_FILTER_EXIT                           = 0x4\n\tAUDIT_FILTER_FS                             = 0x6\n\tAUDIT_FILTER_PREPEND                        = 0x10\n\tAUDIT_FILTER_TASK                           = 0x1\n\tAUDIT_FILTER_TYPE                           = 0x5\n\tAUDIT_FILTER_URING_EXIT                     = 0x7\n\tAUDIT_FILTER_USER                           = 0x0\n\tAUDIT_FILTER_WATCH                          = 0x3\n\tAUDIT_FIRST_KERN_ANOM_MSG                   = 0x6a4\n\tAUDIT_FIRST_USER_MSG                        = 0x44c\n\tAUDIT_FIRST_USER_MSG2                       = 0x834\n\tAUDIT_FSGID                                 = 0x8\n\tAUDIT_FSTYPE                                = 0x1a\n\tAUDIT_FSUID                                 = 0x4\n\tAUDIT_GET                                   = 0x3e8\n\tAUDIT_GET_FEATURE                           = 0x3fb\n\tAUDIT_GID                                   = 0x5\n\tAUDIT_GREATER_THAN                          = 0x20000000\n\tAUDIT_GREATER_THAN_OR_EQUAL                 = 0x60000000\n\tAUDIT_INODE                                 = 0x66\n\tAUDIT_INTEGRITY_DATA                        = 0x708\n\tAUDIT_INTEGRITY_EVM_XATTR                   = 0x70e\n\tAUDIT_INTEGRITY_HASH                        = 0x70b\n\tAUDIT_INTEGRITY_METADATA                    = 0x709\n\tAUDIT_INTEGRITY_PCR                         = 0x70c\n\tAUDIT_INTEGRITY_POLICY_RULE                 = 0x70f\n\tAUDIT_INTEGRITY_RULE                        = 0x70d\n\tAUDIT_INTEGRITY_STATUS                      = 0x70a\n\tAUDIT_INTEGRITY_USERSPACE                   = 0x710\n\tAUDIT_IPC                                   = 0x517\n\tAUDIT_IPC_SET_PERM                          = 0x51f\n\tAUDIT_IPE_ACCESS                            = 0x58c\n\tAUDIT_IPE_CONFIG_CHANGE                     = 0x58d\n\tAUDIT_IPE_POLICY_LOAD                       = 0x58e\n\tAUDIT_KERNEL                                = 0x7d0\n\tAUDIT_KERNEL_OTHER                          = 0x524\n\tAUDIT_KERN_MODULE                           = 0x532\n\tAUDIT_LANDLOCK_ACCESS                       = 0x58f\n\tAUDIT_LANDLOCK_DOMAIN                       = 0x590\n\tAUDIT_LAST_FEATURE                          = 0x1\n\tAUDIT_LAST_KERN_ANOM_MSG                    = 0x707\n\tAUDIT_LAST_USER_MSG                         = 0x4af\n\tAUDIT_LAST_USER_MSG2                        = 0xbb7\n\tAUDIT_LESS_THAN                             = 0x10000000\n\tAUDIT_LESS_THAN_OR_EQUAL                    = 0x50000000\n\tAUDIT_LIST                                  = 0x3ea\n\tAUDIT_LIST_RULES                            = 0x3f5\n\tAUDIT_LOGIN                                 = 0x3ee\n\tAUDIT_LOGINUID                              = 0x9\n\tAUDIT_LOGINUID_SET                          = 0x18\n\tAUDIT_MAC_CALIPSO_ADD                       = 0x58a\n\tAUDIT_MAC_CALIPSO_DEL                       = 0x58b\n\tAUDIT_MAC_CIPSOV4_ADD                       = 0x57f\n\tAUDIT_MAC_CIPSOV4_DEL                       = 0x580\n\tAUDIT_MAC_CONFIG_CHANGE                     = 0x57d\n\tAUDIT_MAC_IPSEC_ADDSA                       = 0x583\n\tAUDIT_MAC_IPSEC_ADDSPD                      = 0x585\n\tAUDIT_MAC_IPSEC_DELSA                       = 0x584\n\tAUDIT_MAC_IPSEC_DELSPD                      = 0x586\n\tAUDIT_MAC_IPSEC_EVENT                       = 0x587\n\tAUDIT_MAC_MAP_ADD                           = 0x581\n\tAUDIT_MAC_MAP_DEL                           = 0x582\n\tAUDIT_MAC_POLICY_LOAD                       = 0x57b\n\tAUDIT_MAC_STATUS                            = 0x57c\n\tAUDIT_MAC_UNLBL_ALLOW                       = 0x57e\n\tAUDIT_MAC_UNLBL_STCADD                      = 0x588\n\tAUDIT_MAC_UNLBL_STCDEL                      = 0x589\n\tAUDIT_MAKE_EQUIV                            = 0x3f7\n\tAUDIT_MAX_FIELDS                            = 0x40\n\tAUDIT_MAX_FIELD_COMPARE                     = 0x19\n\tAUDIT_MAX_KEY_LEN                           = 0x100\n\tAUDIT_MESSAGE_TEXT_MAX                      = 0x2170\n\tAUDIT_MMAP                                  = 0x52b\n\tAUDIT_MQ_GETSETATTR                         = 0x523\n\tAUDIT_MQ_NOTIFY                             = 0x522\n\tAUDIT_MQ_OPEN                               = 0x520\n\tAUDIT_MQ_SENDRECV                           = 0x521\n\tAUDIT_MSGTYPE                               = 0xc\n\tAUDIT_NEGATE                                = 0x80000000\n\tAUDIT_NETFILTER_CFG                         = 0x52d\n\tAUDIT_NETFILTER_PKT                         = 0x52c\n\tAUDIT_NEVER                                 = 0x0\n\tAUDIT_NLGRP_MAX                             = 0x1\n\tAUDIT_NOT_EQUAL                             = 0x30000000\n\tAUDIT_NR_FILTERS                            = 0x8\n\tAUDIT_OBJ_GID                               = 0x6e\n\tAUDIT_OBJ_LEV_HIGH                          = 0x17\n\tAUDIT_OBJ_LEV_LOW                           = 0x16\n\tAUDIT_OBJ_PID                               = 0x526\n\tAUDIT_OBJ_ROLE                              = 0x14\n\tAUDIT_OBJ_TYPE                              = 0x15\n\tAUDIT_OBJ_UID                               = 0x6d\n\tAUDIT_OBJ_USER                              = 0x13\n\tAUDIT_OPENAT2                               = 0x539\n\tAUDIT_OPERATORS                             = 0x78000000\n\tAUDIT_PATH                                  = 0x516\n\tAUDIT_PERM                                  = 0x6a\n\tAUDIT_PERM_ATTR                             = 0x8\n\tAUDIT_PERM_EXEC                             = 0x1\n\tAUDIT_PERM_READ                             = 0x4\n\tAUDIT_PERM_WRITE                            = 0x2\n\tAUDIT_PERS                                  = 0xa\n\tAUDIT_PID                                   = 0x0\n\tAUDIT_POSSIBLE                              = 0x1\n\tAUDIT_PPID                                  = 0x12\n\tAUDIT_PROCTITLE                             = 0x52f\n\tAUDIT_REPLACE                               = 0x531\n\tAUDIT_SADDR_FAM                             = 0x71\n\tAUDIT_SECCOMP                               = 0x52e\n\tAUDIT_SELINUX_ERR                           = 0x579\n\tAUDIT_SESSIONID                             = 0x19\n\tAUDIT_SET                                   = 0x3e9\n\tAUDIT_SET_FEATURE                           = 0x3fa\n\tAUDIT_SGID                                  = 0x7\n\tAUDIT_SID_UNSET                             = 0xffffffff\n\tAUDIT_SIGNAL_INFO                           = 0x3f2\n\tAUDIT_SOCKADDR                              = 0x51a\n\tAUDIT_SOCKETCALL                            = 0x518\n\tAUDIT_STATUS_BACKLOG_LIMIT                  = 0x10\n\tAUDIT_STATUS_BACKLOG_WAIT_TIME              = 0x20\n\tAUDIT_STATUS_BACKLOG_WAIT_TIME_ACTUAL       = 0x80\n\tAUDIT_STATUS_ENABLED                        = 0x1\n\tAUDIT_STATUS_FAILURE                        = 0x2\n\tAUDIT_STATUS_LOST                           = 0x40\n\tAUDIT_STATUS_PID                            = 0x4\n\tAUDIT_STATUS_RATE_LIMIT                     = 0x8\n\tAUDIT_SUBJ_CLR                              = 0x11\n\tAUDIT_SUBJ_ROLE                             = 0xe\n\tAUDIT_SUBJ_SEN                              = 0x10\n\tAUDIT_SUBJ_TYPE                             = 0xf\n\tAUDIT_SUBJ_USER                             = 0xd\n\tAUDIT_SUCCESS                               = 0x68\n\tAUDIT_SUID                                  = 0x3\n\tAUDIT_SYSCALL                               = 0x514\n\tAUDIT_SYSCALL_CLASSES                       = 0x10\n\tAUDIT_TIME_ADJNTPVAL                        = 0x535\n\tAUDIT_TIME_INJOFFSET                        = 0x534\n\tAUDIT_TRIM                                  = 0x3f6\n\tAUDIT_TTY                                   = 0x527\n\tAUDIT_TTY_GET                               = 0x3f8\n\tAUDIT_TTY_SET                               = 0x3f9\n\tAUDIT_UID                                   = 0x1\n\tAUDIT_UID_UNSET                             = 0xffffffff\n\tAUDIT_UNUSED_BITS                           = 0x7fffc00\n\tAUDIT_URINGOP                               = 0x538\n\tAUDIT_USER                                  = 0x3ed\n\tAUDIT_USER_AVC                              = 0x453\n\tAUDIT_USER_TTY                              = 0x464\n\tAUDIT_VERSION_BACKLOG_LIMIT                 = 0x1\n\tAUDIT_VERSION_BACKLOG_WAIT_TIME             = 0x2\n\tAUDIT_VERSION_LATEST                        = 0x7f\n\tAUDIT_WATCH                                 = 0x69\n\tAUDIT_WATCH_INS                             = 0x3ef\n\tAUDIT_WATCH_LIST                            = 0x3f1\n\tAUDIT_WATCH_REM                             = 0x3f0\n\tAUTOFS_SUPER_MAGIC                          = 0x187\n\tB0                                          = 0x0\n\tB110                                        = 0x3\n\tB1200                                       = 0x9\n\tB134                                        = 0x4\n\tB150                                        = 0x5\n\tB1800                                       = 0xa\n\tB19200                                      = 0xe\n\tB200                                        = 0x6\n\tB2400                                       = 0xb\n\tB300                                        = 0x7\n\tB38400                                      = 0xf\n\tB4800                                       = 0xc\n\tB50                                         = 0x1\n\tB600                                        = 0x8\n\tB75                                         = 0x2\n\tB9600                                       = 0xd\n\tBCACHEFS_SUPER_MAGIC                        = 0xca451a4e\n\tBDEVFS_MAGIC                                = 0x62646576\n\tBINDERFS_SUPER_MAGIC                        = 0x6c6f6f70\n\tBINFMTFS_MAGIC                              = 0x42494e4d\n\tBPF_A                                       = 0x10\n\tBPF_ABS                                     = 0x20\n\tBPF_ADD                                     = 0x0\n\tBPF_ALU                                     = 0x4\n\tBPF_ALU64                                   = 0x7\n\tBPF_AND                                     = 0x50\n\tBPF_ARSH                                    = 0xc0\n\tBPF_ATOMIC                                  = 0xc0\n\tBPF_B                                       = 0x10\n\tBPF_BUILD_ID_SIZE                           = 0x14\n\tBPF_CALL                                    = 0x80\n\tBPF_CMPXCHG                                 = 0xf1\n\tBPF_DIV                                     = 0x30\n\tBPF_DW                                      = 0x18\n\tBPF_END                                     = 0xd0\n\tBPF_EXIT                                    = 0x90\n\tBPF_FETCH                                   = 0x1\n\tBPF_FROM_BE                                 = 0x8\n\tBPF_FROM_LE                                 = 0x0\n\tBPF_FS_MAGIC                                = 0xcafe4a11\n\tBPF_F_AFTER                                 = 0x10\n\tBPF_F_ALLOW_MULTI                           = 0x2\n\tBPF_F_ALLOW_OVERRIDE                        = 0x1\n\tBPF_F_ANY_ALIGNMENT                         = 0x2\n\tBPF_F_BEFORE                                = 0x8\n\tBPF_F_ID                                    = 0x20\n\tBPF_F_NETFILTER_IP_DEFRAG                   = 0x1\n\tBPF_F_PREORDER                              = 0x40\n\tBPF_F_QUERY_EFFECTIVE                       = 0x1\n\tBPF_F_REDIRECT_FLAGS                        = 0x19\n\tBPF_F_REPLACE                               = 0x4\n\tBPF_F_SLEEPABLE                             = 0x10\n\tBPF_F_STRICT_ALIGNMENT                      = 0x1\n\tBPF_F_TEST_REG_INVARIANTS                   = 0x80\n\tBPF_F_TEST_RND_HI32                         = 0x4\n\tBPF_F_TEST_RUN_ON_CPU                       = 0x1\n\tBPF_F_TEST_SKB_CHECKSUM_COMPLETE            = 0x4\n\tBPF_F_TEST_STATE_FREQ                       = 0x8\n\tBPF_F_TEST_XDP_LIVE_FRAMES                  = 0x2\n\tBPF_F_XDP_DEV_BOUND_ONLY                    = 0x40\n\tBPF_F_XDP_HAS_FRAGS                         = 0x20\n\tBPF_H                                       = 0x8\n\tBPF_IMM                                     = 0x0\n\tBPF_IND                                     = 0x40\n\tBPF_JA                                      = 0x0\n\tBPF_JCOND                                   = 0xe0\n\tBPF_JEQ                                     = 0x10\n\tBPF_JGE                                     = 0x30\n\tBPF_JGT                                     = 0x20\n\tBPF_JLE                                     = 0xb0\n\tBPF_JLT                                     = 0xa0\n\tBPF_JMP                                     = 0x5\n\tBPF_JMP32                                   = 0x6\n\tBPF_JNE                                     = 0x50\n\tBPF_JSET                                    = 0x40\n\tBPF_JSGE                                    = 0x70\n\tBPF_JSGT                                    = 0x60\n\tBPF_JSLE                                    = 0xd0\n\tBPF_JSLT                                    = 0xc0\n\tBPF_K                                       = 0x0\n\tBPF_LD                                      = 0x0\n\tBPF_LDX                                     = 0x1\n\tBPF_LEN                                     = 0x80\n\tBPF_LL_OFF                                  = -0x200000\n\tBPF_LOAD_ACQ                                = 0x100\n\tBPF_LSH                                     = 0x60\n\tBPF_MAJOR_VERSION                           = 0x1\n\tBPF_MAXINSNS                                = 0x1000\n\tBPF_MEM                                     = 0x60\n\tBPF_MEMSX                                   = 0x80\n\tBPF_MEMWORDS                                = 0x10\n\tBPF_MINOR_VERSION                           = 0x1\n\tBPF_MISC                                    = 0x7\n\tBPF_MOD                                     = 0x90\n\tBPF_MOV                                     = 0xb0\n\tBPF_MSH                                     = 0xa0\n\tBPF_MUL                                     = 0x20\n\tBPF_NEG                                     = 0x80\n\tBPF_NET_OFF                                 = -0x100000\n\tBPF_OBJ_NAME_LEN                            = 0x10\n\tBPF_OR                                      = 0x40\n\tBPF_PSEUDO_BTF_ID                           = 0x3\n\tBPF_PSEUDO_CALL                             = 0x1\n\tBPF_PSEUDO_FUNC                             = 0x4\n\tBPF_PSEUDO_KFUNC_CALL                       = 0x2\n\tBPF_PSEUDO_MAP_FD                           = 0x1\n\tBPF_PSEUDO_MAP_IDX                          = 0x5\n\tBPF_PSEUDO_MAP_IDX_VALUE                    = 0x6\n\tBPF_PSEUDO_MAP_VALUE                        = 0x2\n\tBPF_RET                                     = 0x6\n\tBPF_RSH                                     = 0x70\n\tBPF_ST                                      = 0x2\n\tBPF_STORE_REL                               = 0x110\n\tBPF_STX                                     = 0x3\n\tBPF_SUB                                     = 0x10\n\tBPF_TAG_SIZE                                = 0x8\n\tBPF_TAX                                     = 0x0\n\tBPF_TO_BE                                   = 0x8\n\tBPF_TO_LE                                   = 0x0\n\tBPF_TXA                                     = 0x80\n\tBPF_W                                       = 0x0\n\tBPF_X                                       = 0x8\n\tBPF_XADD                                    = 0xc0\n\tBPF_XCHG                                    = 0xe1\n\tBPF_XOR                                     = 0xa0\n\tBRKINT                                      = 0x2\n\tBS0                                         = 0x0\n\tBTRFS_SUPER_MAGIC                           = 0x9123683e\n\tBTRFS_TEST_MAGIC                            = 0x73727279\n\tBUS_BLUETOOTH                               = 0x5\n\tBUS_HIL                                     = 0x4\n\tBUS_USB                                     = 0x3\n\tBUS_VIRTUAL                                 = 0x6\n\tCAN_BCM                                     = 0x2\n\tCAN_BUS_OFF_THRESHOLD                       = 0x100\n\tCAN_CTRLMODE_3_SAMPLES                      = 0x4\n\tCAN_CTRLMODE_BERR_REPORTING                 = 0x10\n\tCAN_CTRLMODE_CC_LEN8_DLC                    = 0x100\n\tCAN_CTRLMODE_FD                             = 0x20\n\tCAN_CTRLMODE_FD_NON_ISO                     = 0x80\n\tCAN_CTRLMODE_LISTENONLY                     = 0x2\n\tCAN_CTRLMODE_LOOPBACK                       = 0x1\n\tCAN_CTRLMODE_ONE_SHOT                       = 0x8\n\tCAN_CTRLMODE_PRESUME_ACK                    = 0x40\n\tCAN_CTRLMODE_TDC_AUTO                       = 0x200\n\tCAN_CTRLMODE_TDC_MANUAL                     = 0x400\n\tCAN_EFF_FLAG                                = 0x80000000\n\tCAN_EFF_ID_BITS                             = 0x1d\n\tCAN_EFF_MASK                                = 0x1fffffff\n\tCAN_ERROR_PASSIVE_THRESHOLD                 = 0x80\n\tCAN_ERROR_WARNING_THRESHOLD                 = 0x60\n\tCAN_ERR_ACK                                 = 0x20\n\tCAN_ERR_BUSERROR                            = 0x80\n\tCAN_ERR_BUSOFF                              = 0x40\n\tCAN_ERR_CNT                                 = 0x200\n\tCAN_ERR_CRTL                                = 0x4\n\tCAN_ERR_CRTL_ACTIVE                         = 0x40\n\tCAN_ERR_CRTL_RX_OVERFLOW                    = 0x1\n\tCAN_ERR_CRTL_RX_PASSIVE                     = 0x10\n\tCAN_ERR_CRTL_RX_WARNING                     = 0x4\n\tCAN_ERR_CRTL_TX_OVERFLOW                    = 0x2\n\tCAN_ERR_CRTL_TX_PASSIVE                     = 0x20\n\tCAN_ERR_CRTL_TX_WARNING                     = 0x8\n\tCAN_ERR_CRTL_UNSPEC                         = 0x0\n\tCAN_ERR_DLC                                 = 0x8\n\tCAN_ERR_FLAG                                = 0x20000000\n\tCAN_ERR_LOSTARB                             = 0x2\n\tCAN_ERR_LOSTARB_UNSPEC                      = 0x0\n\tCAN_ERR_MASK                                = 0x1fffffff\n\tCAN_ERR_PROT                                = 0x8\n\tCAN_ERR_PROT_ACTIVE                         = 0x40\n\tCAN_ERR_PROT_BIT                            = 0x1\n\tCAN_ERR_PROT_BIT0                           = 0x8\n\tCAN_ERR_PROT_BIT1                           = 0x10\n\tCAN_ERR_PROT_FORM                           = 0x2\n\tCAN_ERR_PROT_LOC_ACK                        = 0x19\n\tCAN_ERR_PROT_LOC_ACK_DEL                    = 0x1b\n\tCAN_ERR_PROT_LOC_CRC_DEL                    = 0x18\n\tCAN_ERR_PROT_LOC_CRC_SEQ                    = 0x8\n\tCAN_ERR_PROT_LOC_DATA                       = 0xa\n\tCAN_ERR_PROT_LOC_DLC                        = 0xb\n\tCAN_ERR_PROT_LOC_EOF                        = 0x1a\n\tCAN_ERR_PROT_LOC_ID04_00                    = 0xe\n\tCAN_ERR_PROT_LOC_ID12_05                    = 0xf\n\tCAN_ERR_PROT_LOC_ID17_13                    = 0x7\n\tCAN_ERR_PROT_LOC_ID20_18                    = 0x6\n\tCAN_ERR_PROT_LOC_ID28_21                    = 0x2\n\tCAN_ERR_PROT_LOC_IDE                        = 0x5\n\tCAN_ERR_PROT_LOC_INTERM                     = 0x12\n\tCAN_ERR_PROT_LOC_RES0                       = 0x9\n\tCAN_ERR_PROT_LOC_RES1                       = 0xd\n\tCAN_ERR_PROT_LOC_RTR                        = 0xc\n\tCAN_ERR_PROT_LOC_SOF                        = 0x3\n\tCAN_ERR_PROT_LOC_SRTR                       = 0x4\n\tCAN_ERR_PROT_LOC_UNSPEC                     = 0x0\n\tCAN_ERR_PROT_OVERLOAD                       = 0x20\n\tCAN_ERR_PROT_STUFF                          = 0x4\n\tCAN_ERR_PROT_TX                             = 0x80\n\tCAN_ERR_PROT_UNSPEC                         = 0x0\n\tCAN_ERR_RESTARTED                           = 0x100\n\tCAN_ERR_TRX                                 = 0x10\n\tCAN_ERR_TRX_CANH_NO_WIRE                    = 0x4\n\tCAN_ERR_TRX_CANH_SHORT_TO_BAT               = 0x5\n\tCAN_ERR_TRX_CANH_SHORT_TO_GND               = 0x7\n\tCAN_ERR_TRX_CANH_SHORT_TO_VCC               = 0x6\n\tCAN_ERR_TRX_CANL_NO_WIRE                    = 0x40\n\tCAN_ERR_TRX_CANL_SHORT_TO_BAT               = 0x50\n\tCAN_ERR_TRX_CANL_SHORT_TO_CANH              = 0x80\n\tCAN_ERR_TRX_CANL_SHORT_TO_GND               = 0x70\n\tCAN_ERR_TRX_CANL_SHORT_TO_VCC               = 0x60\n\tCAN_ERR_TRX_UNSPEC                          = 0x0\n\tCAN_ERR_TX_TIMEOUT                          = 0x1\n\tCAN_INV_FILTER                              = 0x20000000\n\tCAN_ISOTP                                   = 0x6\n\tCAN_J1939                                   = 0x7\n\tCAN_MAX_DLC                                 = 0x8\n\tCAN_MAX_DLEN                                = 0x8\n\tCAN_MAX_RAW_DLC                             = 0xf\n\tCAN_MCNET                                   = 0x5\n\tCAN_MTU                                     = 0x10\n\tCAN_NPROTO                                  = 0x8\n\tCAN_RAW                                     = 0x1\n\tCAN_RAW_FILTER_MAX                          = 0x200\n\tCAN_RAW_XL_VCID_RX_FILTER                   = 0x4\n\tCAN_RAW_XL_VCID_TX_PASS                     = 0x2\n\tCAN_RAW_XL_VCID_TX_SET                      = 0x1\n\tCAN_RTR_FLAG                                = 0x40000000\n\tCAN_SFF_ID_BITS                             = 0xb\n\tCAN_SFF_MASK                                = 0x7ff\n\tCAN_TERMINATION_DISABLED                    = 0x0\n\tCAN_TP16                                    = 0x3\n\tCAN_TP20                                    = 0x4\n\tCAP_AUDIT_CONTROL                           = 0x1e\n\tCAP_AUDIT_READ                              = 0x25\n\tCAP_AUDIT_WRITE                             = 0x1d\n\tCAP_BLOCK_SUSPEND                           = 0x24\n\tCAP_BPF                                     = 0x27\n\tCAP_CHECKPOINT_RESTORE                      = 0x28\n\tCAP_CHOWN                                   = 0x0\n\tCAP_DAC_OVERRIDE                            = 0x1\n\tCAP_DAC_READ_SEARCH                         = 0x2\n\tCAP_FOWNER                                  = 0x3\n\tCAP_FSETID                                  = 0x4\n\tCAP_IPC_LOCK                                = 0xe\n\tCAP_IPC_OWNER                               = 0xf\n\tCAP_KILL                                    = 0x5\n\tCAP_LAST_CAP                                = 0x28\n\tCAP_LEASE                                   = 0x1c\n\tCAP_LINUX_IMMUTABLE                         = 0x9\n\tCAP_MAC_ADMIN                               = 0x21\n\tCAP_MAC_OVERRIDE                            = 0x20\n\tCAP_MKNOD                                   = 0x1b\n\tCAP_NET_ADMIN                               = 0xc\n\tCAP_NET_BIND_SERVICE                        = 0xa\n\tCAP_NET_BROADCAST                           = 0xb\n\tCAP_NET_RAW                                 = 0xd\n\tCAP_PERFMON                                 = 0x26\n\tCAP_SETFCAP                                 = 0x1f\n\tCAP_SETGID                                  = 0x6\n\tCAP_SETPCAP                                 = 0x8\n\tCAP_SETUID                                  = 0x7\n\tCAP_SYSLOG                                  = 0x22\n\tCAP_SYS_ADMIN                               = 0x15\n\tCAP_SYS_BOOT                                = 0x16\n\tCAP_SYS_CHROOT                              = 0x12\n\tCAP_SYS_MODULE                              = 0x10\n\tCAP_SYS_NICE                                = 0x17\n\tCAP_SYS_PACCT                               = 0x14\n\tCAP_SYS_PTRACE                              = 0x13\n\tCAP_SYS_RAWIO                               = 0x11\n\tCAP_SYS_RESOURCE                            = 0x18\n\tCAP_SYS_TIME                                = 0x19\n\tCAP_SYS_TTY_CONFIG                          = 0x1a\n\tCAP_WAKE_ALARM                              = 0x23\n\tCEPH_SUPER_MAGIC                            = 0xc36400\n\tCFLUSH                                      = 0xf\n\tCGROUP2_SUPER_MAGIC                         = 0x63677270\n\tCGROUP_SUPER_MAGIC                          = 0x27e0eb\n\tCIFS_SUPER_MAGIC                            = 0xff534d42\n\tCLOCK_BOOTTIME                              = 0x7\n\tCLOCK_BOOTTIME_ALARM                        = 0x9\n\tCLOCK_DEFAULT                               = 0x0\n\tCLOCK_EXT                                   = 0x1\n\tCLOCK_INT                                   = 0x2\n\tCLOCK_MONOTONIC                             = 0x1\n\tCLOCK_MONOTONIC_COARSE                      = 0x6\n\tCLOCK_MONOTONIC_RAW                         = 0x4\n\tCLOCK_PROCESS_CPUTIME_ID                    = 0x2\n\tCLOCK_REALTIME                              = 0x0\n\tCLOCK_REALTIME_ALARM                        = 0x8\n\tCLOCK_REALTIME_COARSE                       = 0x5\n\tCLOCK_TAI                                   = 0xb\n\tCLOCK_THREAD_CPUTIME_ID                     = 0x3\n\tCLOCK_TXFROMRX                              = 0x4\n\tCLOCK_TXINT                                 = 0x3\n\tCLONE_ARGS_SIZE_VER0                        = 0x40\n\tCLONE_ARGS_SIZE_VER1                        = 0x50\n\tCLONE_ARGS_SIZE_VER2                        = 0x58\n\tCLONE_CHILD_CLEARTID                        = 0x200000\n\tCLONE_CHILD_SETTID                          = 0x1000000\n\tCLONE_CLEAR_SIGHAND                         = 0x100000000\n\tCLONE_DETACHED                              = 0x400000\n\tCLONE_FILES                                 = 0x400\n\tCLONE_FS                                    = 0x200\n\tCLONE_INTO_CGROUP                           = 0x200000000\n\tCLONE_IO                                    = 0x80000000\n\tCLONE_NEWCGROUP                             = 0x2000000\n\tCLONE_NEWIPC                                = 0x8000000\n\tCLONE_NEWNET                                = 0x40000000\n\tCLONE_NEWNS                                 = 0x20000\n\tCLONE_NEWPID                                = 0x20000000\n\tCLONE_NEWTIME                               = 0x80\n\tCLONE_NEWUSER                               = 0x10000000\n\tCLONE_NEWUTS                                = 0x4000000\n\tCLONE_PARENT                                = 0x8000\n\tCLONE_PARENT_SETTID                         = 0x100000\n\tCLONE_PIDFD                                 = 0x1000\n\tCLONE_PTRACE                                = 0x2000\n\tCLONE_SETTLS                                = 0x80000\n\tCLONE_SIGHAND                               = 0x800\n\tCLONE_SYSVSEM                               = 0x40000\n\tCLONE_THREAD                                = 0x10000\n\tCLONE_UNTRACED                              = 0x800000\n\tCLONE_VFORK                                 = 0x4000\n\tCLONE_VM                                    = 0x100\n\tCMSPAR                                      = 0x40000000\n\tCODA_SUPER_MAGIC                            = 0x73757245\n\tCR0                                         = 0x0\n\tCRAMFS_MAGIC                                = 0x28cd3d45\n\tCRTSCTS                                     = 0x80000000\n\tCRYPTO_MAX_NAME                             = 0x40\n\tCRYPTO_MSG_MAX                              = 0x15\n\tCRYPTO_NR_MSGTYPES                          = 0x6\n\tCRYPTO_REPORT_MAXSIZE                       = 0x160\n\tCS5                                         = 0x0\n\tCSIGNAL                                     = 0xff\n\tCSTART                                      = 0x11\n\tCSTATUS                                     = 0x0\n\tCSTOP                                       = 0x13\n\tCSUSP                                       = 0x1a\n\tDAXFS_MAGIC                                 = 0x64646178\n\tDEBUGFS_MAGIC                               = 0x64626720\n\tDEVLINK_CMD_ESWITCH_MODE_GET                = 0x1d\n\tDEVLINK_CMD_ESWITCH_MODE_SET                = 0x1e\n\tDEVLINK_FLASH_OVERWRITE_IDENTIFIERS         = 0x2\n\tDEVLINK_FLASH_OVERWRITE_SETTINGS            = 0x1\n\tDEVLINK_GENL_MCGRP_CONFIG_NAME              = \"config\"\n\tDEVLINK_GENL_NAME                           = \"devlink\"\n\tDEVLINK_GENL_VERSION                        = 0x1\n\tDEVLINK_PORT_FN_CAP_IPSEC_CRYPTO            = 0x4\n\tDEVLINK_PORT_FN_CAP_IPSEC_PACKET            = 0x8\n\tDEVLINK_PORT_FN_CAP_MIGRATABLE              = 0x2\n\tDEVLINK_PORT_FN_CAP_ROCE                    = 0x1\n\tDEVLINK_SB_THRESHOLD_TO_ALPHA_MAX           = 0x14\n\tDEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS  = 0x3\n\tDEVMEM_MAGIC                                = 0x454d444d\n\tDEVPTS_SUPER_MAGIC                          = 0x1cd1\n\tDMA_BUF_MAGIC                               = 0x444d4142\n\tDM_ACTIVE_PRESENT_FLAG                      = 0x20\n\tDM_BUFFER_FULL_FLAG                         = 0x100\n\tDM_CONTROL_NODE                             = \"control\"\n\tDM_DATA_OUT_FLAG                            = 0x10000\n\tDM_DEFERRED_REMOVE                          = 0x20000\n\tDM_DEV_ARM_POLL                             = 0xc138fd10\n\tDM_DEV_CREATE                               = 0xc138fd03\n\tDM_DEV_REMOVE                               = 0xc138fd04\n\tDM_DEV_RENAME                               = 0xc138fd05\n\tDM_DEV_SET_GEOMETRY                         = 0xc138fd0f\n\tDM_DEV_STATUS                               = 0xc138fd07\n\tDM_DEV_SUSPEND                              = 0xc138fd06\n\tDM_DEV_WAIT                                 = 0xc138fd08\n\tDM_DIR                                      = \"mapper\"\n\tDM_GET_TARGET_VERSION                       = 0xc138fd11\n\tDM_IMA_MEASUREMENT_FLAG                     = 0x80000\n\tDM_INACTIVE_PRESENT_FLAG                    = 0x40\n\tDM_INTERNAL_SUSPEND_FLAG                    = 0x40000\n\tDM_IOCTL                                    = 0xfd\n\tDM_LIST_DEVICES                             = 0xc138fd02\n\tDM_LIST_VERSIONS                            = 0xc138fd0d\n\tDM_MAX_TYPE_NAME                            = 0x10\n\tDM_NAME_LEN                                 = 0x80\n\tDM_NAME_LIST_FLAG_DOESNT_HAVE_UUID          = 0x2\n\tDM_NAME_LIST_FLAG_HAS_UUID                  = 0x1\n\tDM_NOFLUSH_FLAG                             = 0x800\n\tDM_PERSISTENT_DEV_FLAG                      = 0x8\n\tDM_QUERY_INACTIVE_TABLE_FLAG                = 0x1000\n\tDM_READONLY_FLAG                            = 0x1\n\tDM_REMOVE_ALL                               = 0xc138fd01\n\tDM_SECURE_DATA_FLAG                         = 0x8000\n\tDM_SKIP_BDGET_FLAG                          = 0x200\n\tDM_SKIP_LOCKFS_FLAG                         = 0x400\n\tDM_STATUS_TABLE_FLAG                        = 0x10\n\tDM_SUSPEND_FLAG                             = 0x2\n\tDM_TABLE_CLEAR                              = 0xc138fd0a\n\tDM_TABLE_DEPS                               = 0xc138fd0b\n\tDM_TABLE_LOAD                               = 0xc138fd09\n\tDM_TABLE_STATUS                             = 0xc138fd0c\n\tDM_TARGET_MSG                               = 0xc138fd0e\n\tDM_UEVENT_GENERATED_FLAG                    = 0x2000\n\tDM_UUID_FLAG                                = 0x4000\n\tDM_UUID_LEN                                 = 0x81\n\tDM_VERSION                                  = 0xc138fd00\n\tDM_VERSION_EXTRA                            = \"-ioctl (2025-04-28)\"\n\tDM_VERSION_MAJOR                            = 0x4\n\tDM_VERSION_MINOR                            = 0x32\n\tDM_VERSION_PATCHLEVEL                       = 0x0\n\tDT_ADDRRNGHI                                = 0x6ffffeff\n\tDT_ADDRRNGLO                                = 0x6ffffe00\n\tDT_BLK                                      = 0x6\n\tDT_CHR                                      = 0x2\n\tDT_DEBUG                                    = 0x15\n\tDT_DIR                                      = 0x4\n\tDT_ENCODING                                 = 0x20\n\tDT_FIFO                                     = 0x1\n\tDT_FINI                                     = 0xd\n\tDT_FLAGS_1                                  = 0x6ffffffb\n\tDT_GNU_HASH                                 = 0x6ffffef5\n\tDT_HASH                                     = 0x4\n\tDT_HIOS                                     = 0x6ffff000\n\tDT_HIPROC                                   = 0x7fffffff\n\tDT_INIT                                     = 0xc\n\tDT_JMPREL                                   = 0x17\n\tDT_LNK                                      = 0xa\n\tDT_LOOS                                     = 0x6000000d\n\tDT_LOPROC                                   = 0x70000000\n\tDT_NEEDED                                   = 0x1\n\tDT_NULL                                     = 0x0\n\tDT_PLTGOT                                   = 0x3\n\tDT_PLTREL                                   = 0x14\n\tDT_PLTRELSZ                                 = 0x2\n\tDT_REG                                      = 0x8\n\tDT_REL                                      = 0x11\n\tDT_RELA                                     = 0x7\n\tDT_RELACOUNT                                = 0x6ffffff9\n\tDT_RELAENT                                  = 0x9\n\tDT_RELASZ                                   = 0x8\n\tDT_RELCOUNT                                 = 0x6ffffffa\n\tDT_RELENT                                   = 0x13\n\tDT_RELSZ                                    = 0x12\n\tDT_RPATH                                    = 0xf\n\tDT_SOCK                                     = 0xc\n\tDT_SONAME                                   = 0xe\n\tDT_STRSZ                                    = 0xa\n\tDT_STRTAB                                   = 0x5\n\tDT_SYMBOLIC                                 = 0x10\n\tDT_SYMENT                                   = 0xb\n\tDT_SYMTAB                                   = 0x6\n\tDT_TEXTREL                                  = 0x16\n\tDT_UNKNOWN                                  = 0x0\n\tDT_VALRNGHI                                 = 0x6ffffdff\n\tDT_VALRNGLO                                 = 0x6ffffd00\n\tDT_VERDEF                                   = 0x6ffffffc\n\tDT_VERDEFNUM                                = 0x6ffffffd\n\tDT_VERNEED                                  = 0x6ffffffe\n\tDT_VERNEEDNUM                               = 0x6fffffff\n\tDT_VERSYM                                   = 0x6ffffff0\n\tDT_WHT                                      = 0xe\n\tECHO                                        = 0x8\n\tECRYPTFS_SUPER_MAGIC                        = 0xf15f\n\tEFD_SEMAPHORE                               = 0x1\n\tEFIVARFS_MAGIC                              = 0xde5e81e4\n\tEFS_SUPER_MAGIC                             = 0x414a53\n\tEI_CLASS                                    = 0x4\n\tEI_DATA                                     = 0x5\n\tEI_MAG0                                     = 0x0\n\tEI_MAG1                                     = 0x1\n\tEI_MAG2                                     = 0x2\n\tEI_MAG3                                     = 0x3\n\tEI_NIDENT                                   = 0x10\n\tEI_OSABI                                    = 0x7\n\tEI_PAD                                      = 0x8\n\tEI_VERSION                                  = 0x6\n\tELFCLASS32                                  = 0x1\n\tELFCLASS64                                  = 0x2\n\tELFCLASSNONE                                = 0x0\n\tELFCLASSNUM                                 = 0x3\n\tELFDATA2LSB                                 = 0x1\n\tELFDATA2MSB                                 = 0x2\n\tELFDATANONE                                 = 0x0\n\tELFMAG                                      = \"\\177ELF\"\n\tELFMAG0                                     = 0x7f\n\tELFMAG1                                     = 'E'\n\tELFMAG2                                     = 'L'\n\tELFMAG3                                     = 'F'\n\tELFOSABI_LINUX                              = 0x3\n\tELFOSABI_NONE                               = 0x0\n\tEM_386                                      = 0x3\n\tEM_486                                      = 0x6\n\tEM_68K                                      = 0x4\n\tEM_860                                      = 0x7\n\tEM_88K                                      = 0x5\n\tEM_AARCH64                                  = 0xb7\n\tEM_ALPHA                                    = 0x9026\n\tEM_ALTERA_NIOS2                             = 0x71\n\tEM_ARCOMPACT                                = 0x5d\n\tEM_ARCV2                                    = 0xc3\n\tEM_ARM                                      = 0x28\n\tEM_BLACKFIN                                 = 0x6a\n\tEM_BPF                                      = 0xf7\n\tEM_CRIS                                     = 0x4c\n\tEM_CSKY                                     = 0xfc\n\tEM_CYGNUS_M32R                              = 0x9041\n\tEM_CYGNUS_MN10300                           = 0xbeef\n\tEM_FRV                                      = 0x5441\n\tEM_H8_300                                   = 0x2e\n\tEM_HEXAGON                                  = 0xa4\n\tEM_IA_64                                    = 0x32\n\tEM_LOONGARCH                                = 0x102\n\tEM_M32                                      = 0x1\n\tEM_M32R                                     = 0x58\n\tEM_MICROBLAZE                               = 0xbd\n\tEM_MIPS                                     = 0x8\n\tEM_MIPS_RS3_LE                              = 0xa\n\tEM_MIPS_RS4_BE                              = 0xa\n\tEM_MN10300                                  = 0x59\n\tEM_NDS32                                    = 0xa7\n\tEM_NONE                                     = 0x0\n\tEM_OPENRISC                                 = 0x5c\n\tEM_PARISC                                   = 0xf\n\tEM_PPC                                      = 0x14\n\tEM_PPC64                                    = 0x15\n\tEM_RISCV                                    = 0xf3\n\tEM_S390                                     = 0x16\n\tEM_S390_OLD                                 = 0xa390\n\tEM_SH                                       = 0x2a\n\tEM_SPARC                                    = 0x2\n\tEM_SPARC32PLUS                              = 0x12\n\tEM_SPARCV9                                  = 0x2b\n\tEM_SPU                                      = 0x17\n\tEM_TILEGX                                   = 0xbf\n\tEM_TILEPRO                                  = 0xbc\n\tEM_TI_C6000                                 = 0x8c\n\tEM_UNICORE                                  = 0x6e\n\tEM_X86_64                                   = 0x3e\n\tEM_XTENSA                                   = 0x5e\n\tENCODING_DEFAULT                            = 0x0\n\tENCODING_FM_MARK                            = 0x3\n\tENCODING_FM_SPACE                           = 0x4\n\tENCODING_MANCHESTER                         = 0x5\n\tENCODING_NRZ                                = 0x1\n\tENCODING_NRZI                               = 0x2\n\tEPOLLERR                                    = 0x8\n\tEPOLLET                                     = 0x80000000\n\tEPOLLEXCLUSIVE                              = 0x10000000\n\tEPOLLHUP                                    = 0x10\n\tEPOLLIN                                     = 0x1\n\tEPOLLMSG                                    = 0x400\n\tEPOLLONESHOT                                = 0x40000000\n\tEPOLLOUT                                    = 0x4\n\tEPOLLPRI                                    = 0x2\n\tEPOLLRDBAND                                 = 0x80\n\tEPOLLRDHUP                                  = 0x2000\n\tEPOLLRDNORM                                 = 0x40\n\tEPOLLWAKEUP                                 = 0x20000000\n\tEPOLLWRBAND                                 = 0x200\n\tEPOLLWRNORM                                 = 0x100\n\tEPOLL_CTL_ADD                               = 0x1\n\tEPOLL_CTL_DEL                               = 0x2\n\tEPOLL_CTL_MOD                               = 0x3\n\tEPOLL_IOC_TYPE                              = 0x8a\n\tEROFS_SUPER_MAGIC_V1                        = 0xe0f5e1e2\n\tETHTOOL_BUSINFO_LEN                         = 0x20\n\tETHTOOL_EROMVERS_LEN                        = 0x20\n\tETHTOOL_FAMILY_NAME                         = \"ethtool\"\n\tETHTOOL_FAMILY_VERSION                      = 0x1\n\tETHTOOL_FEC_AUTO                            = 0x2\n\tETHTOOL_FEC_BASER                           = 0x10\n\tETHTOOL_FEC_LLRS                            = 0x20\n\tETHTOOL_FEC_NONE                            = 0x1\n\tETHTOOL_FEC_OFF                             = 0x4\n\tETHTOOL_FEC_RS                              = 0x8\n\tETHTOOL_FLAG_ALL                            = 0x7\n\tETHTOOL_FLASHDEV                            = 0x33\n\tETHTOOL_FLASH_MAX_FILENAME                  = 0x80\n\tETHTOOL_FWVERS_LEN                          = 0x20\n\tETHTOOL_F_COMPAT                            = 0x4\n\tETHTOOL_F_UNSUPPORTED                       = 0x1\n\tETHTOOL_F_WISH                              = 0x2\n\tETHTOOL_GCHANNELS                           = 0x3c\n\tETHTOOL_GCOALESCE                           = 0xe\n\tETHTOOL_GDRVINFO                            = 0x3\n\tETHTOOL_GEEE                                = 0x44\n\tETHTOOL_GEEPROM                             = 0xb\n\tETHTOOL_GENL_NAME                           = \"ethtool\"\n\tETHTOOL_GENL_VERSION                        = 0x1\n\tETHTOOL_GET_DUMP_DATA                       = 0x40\n\tETHTOOL_GET_DUMP_FLAG                       = 0x3f\n\tETHTOOL_GET_TS_INFO                         = 0x41\n\tETHTOOL_GFEATURES                           = 0x3a\n\tETHTOOL_GFECPARAM                           = 0x50\n\tETHTOOL_GFLAGS                              = 0x25\n\tETHTOOL_GGRO                                = 0x2b\n\tETHTOOL_GGSO                                = 0x23\n\tETHTOOL_GLINK                               = 0xa\n\tETHTOOL_GLINKSETTINGS                       = 0x4c\n\tETHTOOL_GMODULEEEPROM                       = 0x43\n\tETHTOOL_GMODULEINFO                         = 0x42\n\tETHTOOL_GMSGLVL                             = 0x7\n\tETHTOOL_GPAUSEPARAM                         = 0x12\n\tETHTOOL_GPERMADDR                           = 0x20\n\tETHTOOL_GPFLAGS                             = 0x27\n\tETHTOOL_GPHYSTATS                           = 0x4a\n\tETHTOOL_GREGS                               = 0x4\n\tETHTOOL_GRINGPARAM                          = 0x10\n\tETHTOOL_GRSSH                               = 0x46\n\tETHTOOL_GRXCLSRLALL                         = 0x30\n\tETHTOOL_GRXCLSRLCNT                         = 0x2e\n\tETHTOOL_GRXCLSRULE                          = 0x2f\n\tETHTOOL_GRXCSUM                             = 0x14\n\tETHTOOL_GRXFH                               = 0x29\n\tETHTOOL_GRXFHINDIR                          = 0x38\n\tETHTOOL_GRXNTUPLE                           = 0x36\n\tETHTOOL_GRXRINGS                            = 0x2d\n\tETHTOOL_GSET                                = 0x1\n\tETHTOOL_GSG                                 = 0x18\n\tETHTOOL_GSSET_INFO                          = 0x37\n\tETHTOOL_GSTATS                              = 0x1d\n\tETHTOOL_GSTRINGS                            = 0x1b\n\tETHTOOL_GTSO                                = 0x1e\n\tETHTOOL_GTUNABLE                            = 0x48\n\tETHTOOL_GTXCSUM                             = 0x16\n\tETHTOOL_GUFO                                = 0x21\n\tETHTOOL_GWOL                                = 0x5\n\tETHTOOL_MCGRP_MONITOR_NAME                  = \"monitor\"\n\tETHTOOL_NWAY_RST                            = 0x9\n\tETHTOOL_PERQUEUE                            = 0x4b\n\tETHTOOL_PHYS_ID                             = 0x1c\n\tETHTOOL_PHY_EDPD_DFLT_TX_MSECS              = 0xffff\n\tETHTOOL_PHY_EDPD_DISABLE                    = 0x0\n\tETHTOOL_PHY_EDPD_NO_TX                      = 0xfffe\n\tETHTOOL_PHY_FAST_LINK_DOWN_OFF              = 0xff\n\tETHTOOL_PHY_FAST_LINK_DOWN_ON               = 0x0\n\tETHTOOL_PHY_GTUNABLE                        = 0x4e\n\tETHTOOL_PHY_STUNABLE                        = 0x4f\n\tETHTOOL_RESET                               = 0x34\n\tETHTOOL_RXNTUPLE_ACTION_CLEAR               = -0x2\n\tETHTOOL_RXNTUPLE_ACTION_DROP                = -0x1\n\tETHTOOL_RX_FLOW_SPEC_RING                   = 0xffffffff\n\tETHTOOL_RX_FLOW_SPEC_RING_VF                = 0xff00000000\n\tETHTOOL_RX_FLOW_SPEC_RING_VF_OFF            = 0x20\n\tETHTOOL_SCHANNELS                           = 0x3d\n\tETHTOOL_SCOALESCE                           = 0xf\n\tETHTOOL_SEEE                                = 0x45\n\tETHTOOL_SEEPROM                             = 0xc\n\tETHTOOL_SET_DUMP                            = 0x3e\n\tETHTOOL_SFEATURES                           = 0x3b\n\tETHTOOL_SFECPARAM                           = 0x51\n\tETHTOOL_SFLAGS                              = 0x26\n\tETHTOOL_SGRO                                = 0x2c\n\tETHTOOL_SGSO                                = 0x24\n\tETHTOOL_SLINKSETTINGS                       = 0x4d\n\tETHTOOL_SMSGLVL                             = 0x8\n\tETHTOOL_SPAUSEPARAM                         = 0x13\n\tETHTOOL_SPFLAGS                             = 0x28\n\tETHTOOL_SRINGPARAM                          = 0x11\n\tETHTOOL_SRSSH                               = 0x47\n\tETHTOOL_SRXCLSRLDEL                         = 0x31\n\tETHTOOL_SRXCLSRLINS                         = 0x32\n\tETHTOOL_SRXCSUM                             = 0x15\n\tETHTOOL_SRXFH                               = 0x2a\n\tETHTOOL_SRXFHINDIR                          = 0x39\n\tETHTOOL_SRXNTUPLE                           = 0x35\n\tETHTOOL_SSET                                = 0x2\n\tETHTOOL_SSG                                 = 0x19\n\tETHTOOL_STSO                                = 0x1f\n\tETHTOOL_STUNABLE                            = 0x49\n\tETHTOOL_STXCSUM                             = 0x17\n\tETHTOOL_SUFO                                = 0x22\n\tETHTOOL_SWOL                                = 0x6\n\tETHTOOL_TEST                                = 0x1a\n\tETH_P_1588                                  = 0x88f7\n\tETH_P_8021AD                                = 0x88a8\n\tETH_P_8021AH                                = 0x88e7\n\tETH_P_8021Q                                 = 0x8100\n\tETH_P_80221                                 = 0x8917\n\tETH_P_802_2                                 = 0x4\n\tETH_P_802_3                                 = 0x1\n\tETH_P_802_3_MIN                             = 0x600\n\tETH_P_802_EX1                               = 0x88b5\n\tETH_P_AARP                                  = 0x80f3\n\tETH_P_AF_IUCV                               = 0xfbfb\n\tETH_P_ALL                                   = 0x3\n\tETH_P_AOE                                   = 0x88a2\n\tETH_P_ARCNET                                = 0x1a\n\tETH_P_ARP                                   = 0x806\n\tETH_P_ATALK                                 = 0x809b\n\tETH_P_ATMFATE                               = 0x8884\n\tETH_P_ATMMPOA                               = 0x884c\n\tETH_P_AX25                                  = 0x2\n\tETH_P_BATMAN                                = 0x4305\n\tETH_P_BPQ                                   = 0x8ff\n\tETH_P_CAIF                                  = 0xf7\n\tETH_P_CAN                                   = 0xc\n\tETH_P_CANFD                                 = 0xd\n\tETH_P_CANXL                                 = 0xe\n\tETH_P_CFM                                   = 0x8902\n\tETH_P_CONTROL                               = 0x16\n\tETH_P_CUST                                  = 0x6006\n\tETH_P_DDCMP                                 = 0x6\n\tETH_P_DEC                                   = 0x6000\n\tETH_P_DIAG                                  = 0x6005\n\tETH_P_DNA_DL                                = 0x6001\n\tETH_P_DNA_RC                                = 0x6002\n\tETH_P_DNA_RT                                = 0x6003\n\tETH_P_DSA                                   = 0x1b\n\tETH_P_DSA_8021Q                             = 0xdadb\n\tETH_P_DSA_A5PSW                             = 0xe001\n\tETH_P_ECONET                                = 0x18\n\tETH_P_EDSA                                  = 0xdada\n\tETH_P_ERSPAN                                = 0x88be\n\tETH_P_ERSPAN2                               = 0x22eb\n\tETH_P_ETHERCAT                              = 0x88a4\n\tETH_P_FCOE                                  = 0x8906\n\tETH_P_FIP                                   = 0x8914\n\tETH_P_HDLC                                  = 0x19\n\tETH_P_HSR                                   = 0x892f\n\tETH_P_IBOE                                  = 0x8915\n\tETH_P_IEEE802154                            = 0xf6\n\tETH_P_IEEEPUP                               = 0xa00\n\tETH_P_IEEEPUPAT                             = 0xa01\n\tETH_P_IFE                                   = 0xed3e\n\tETH_P_IP                                    = 0x800\n\tETH_P_IPV6                                  = 0x86dd\n\tETH_P_IPX                                   = 0x8137\n\tETH_P_IRDA                                  = 0x17\n\tETH_P_LAT                                   = 0x6004\n\tETH_P_LINK_CTL                              = 0x886c\n\tETH_P_LLDP                                  = 0x88cc\n\tETH_P_LOCALTALK                             = 0x9\n\tETH_P_LOOP                                  = 0x60\n\tETH_P_LOOPBACK                              = 0x9000\n\tETH_P_MACSEC                                = 0x88e5\n\tETH_P_MAP                                   = 0xf9\n\tETH_P_MCTP                                  = 0xfa\n\tETH_P_MOBITEX                               = 0x15\n\tETH_P_MPLS_MC                               = 0x8848\n\tETH_P_MPLS_UC                               = 0x8847\n\tETH_P_MRP                                   = 0x88e3\n\tETH_P_MVRP                                  = 0x88f5\n\tETH_P_NCSI                                  = 0x88f8\n\tETH_P_NSH                                   = 0x894f\n\tETH_P_PAE                                   = 0x888e\n\tETH_P_PAUSE                                 = 0x8808\n\tETH_P_PHONET                                = 0xf5\n\tETH_P_PPPTALK                               = 0x10\n\tETH_P_PPP_DISC                              = 0x8863\n\tETH_P_PPP_MP                                = 0x8\n\tETH_P_PPP_SES                               = 0x8864\n\tETH_P_PREAUTH                               = 0x88c7\n\tETH_P_PROFINET                              = 0x8892\n\tETH_P_PRP                                   = 0x88fb\n\tETH_P_PUP                                   = 0x200\n\tETH_P_PUPAT                                 = 0x201\n\tETH_P_QINQ1                                 = 0x9100\n\tETH_P_QINQ2                                 = 0x9200\n\tETH_P_QINQ3                                 = 0x9300\n\tETH_P_RARP                                  = 0x8035\n\tETH_P_REALTEK                               = 0x8899\n\tETH_P_SCA                                   = 0x6007\n\tETH_P_SLOW                                  = 0x8809\n\tETH_P_SNAP                                  = 0x5\n\tETH_P_TDLS                                  = 0x890d\n\tETH_P_TEB                                   = 0x6558\n\tETH_P_TIPC                                  = 0x88ca\n\tETH_P_TRAILER                               = 0x1c\n\tETH_P_TR_802_2                              = 0x11\n\tETH_P_TSN                                   = 0x22f0\n\tETH_P_WAN_PPP                               = 0x7\n\tETH_P_WCCP                                  = 0x883e\n\tETH_P_X25                                   = 0x805\n\tETH_P_XDSA                                  = 0xf8\n\tET_CORE                                     = 0x4\n\tET_DYN                                      = 0x3\n\tET_EXEC                                     = 0x2\n\tET_HIPROC                                   = 0xffff\n\tET_LOPROC                                   = 0xff00\n\tET_NONE                                     = 0x0\n\tET_REL                                      = 0x1\n\tEV_ABS                                      = 0x3\n\tEV_CNT                                      = 0x20\n\tEV_CURRENT                                  = 0x1\n\tEV_FF                                       = 0x15\n\tEV_FF_STATUS                                = 0x17\n\tEV_KEY                                      = 0x1\n\tEV_LED                                      = 0x11\n\tEV_MAX                                      = 0x1f\n\tEV_MSC                                      = 0x4\n\tEV_NONE                                     = 0x0\n\tEV_NUM                                      = 0x2\n\tEV_PWR                                      = 0x16\n\tEV_REL                                      = 0x2\n\tEV_REP                                      = 0x14\n\tEV_SND                                      = 0x12\n\tEV_SW                                       = 0x5\n\tEV_SYN                                      = 0x0\n\tEV_VERSION                                  = 0x10001\n\tEXABYTE_ENABLE_NEST                         = 0xf0\n\tEXFAT_SUPER_MAGIC                           = 0x2011bab0\n\tEXT2_SUPER_MAGIC                            = 0xef53\n\tEXT3_SUPER_MAGIC                            = 0xef53\n\tEXT4_SUPER_MAGIC                            = 0xef53\n\tEXTA                                        = 0xe\n\tEXTB                                        = 0xf\n\tF2FS_SUPER_MAGIC                            = 0xf2f52010\n\tFALLOC_FL_ALLOCATE_RANGE                    = 0x0\n\tFALLOC_FL_COLLAPSE_RANGE                    = 0x8\n\tFALLOC_FL_INSERT_RANGE                      = 0x20\n\tFALLOC_FL_KEEP_SIZE                         = 0x1\n\tFALLOC_FL_NO_HIDE_STALE                     = 0x4\n\tFALLOC_FL_PUNCH_HOLE                        = 0x2\n\tFALLOC_FL_UNSHARE_RANGE                     = 0x40\n\tFALLOC_FL_ZERO_RANGE                        = 0x10\n\tFANOTIFY_METADATA_VERSION                   = 0x3\n\tFAN_ACCESS                                  = 0x1\n\tFAN_ACCESS_PERM                             = 0x20000\n\tFAN_ALLOW                                   = 0x1\n\tFAN_ALL_CLASS_BITS                          = 0xc\n\tFAN_ALL_EVENTS                              = 0x3b\n\tFAN_ALL_INIT_FLAGS                          = 0x3f\n\tFAN_ALL_MARK_FLAGS                          = 0xff\n\tFAN_ALL_OUTGOING_EVENTS                     = 0x3403b\n\tFAN_ALL_PERM_EVENTS                         = 0x30000\n\tFAN_ATTRIB                                  = 0x4\n\tFAN_AUDIT                                   = 0x10\n\tFAN_CLASS_CONTENT                           = 0x4\n\tFAN_CLASS_NOTIF                             = 0x0\n\tFAN_CLASS_PRE_CONTENT                       = 0x8\n\tFAN_CLOEXEC                                 = 0x1\n\tFAN_CLOSE                                   = 0x18\n\tFAN_CLOSE_NOWRITE                           = 0x10\n\tFAN_CLOSE_WRITE                             = 0x8\n\tFAN_CREATE                                  = 0x100\n\tFAN_DELETE                                  = 0x200\n\tFAN_DELETE_SELF                             = 0x400\n\tFAN_DENY                                    = 0x2\n\tFAN_ENABLE_AUDIT                            = 0x40\n\tFAN_EPIDFD                                  = -0x2\n\tFAN_ERRNO_BITS                              = 0x8\n\tFAN_ERRNO_MASK                              = 0xff\n\tFAN_ERRNO_SHIFT                             = 0x18\n\tFAN_EVENT_INFO_TYPE_DFID                    = 0x3\n\tFAN_EVENT_INFO_TYPE_DFID_NAME               = 0x2\n\tFAN_EVENT_INFO_TYPE_ERROR                   = 0x5\n\tFAN_EVENT_INFO_TYPE_FID                     = 0x1\n\tFAN_EVENT_INFO_TYPE_MNT                     = 0x7\n\tFAN_EVENT_INFO_TYPE_NEW_DFID_NAME           = 0xc\n\tFAN_EVENT_INFO_TYPE_OLD_DFID_NAME           = 0xa\n\tFAN_EVENT_INFO_TYPE_PIDFD                   = 0x4\n\tFAN_EVENT_INFO_TYPE_RANGE                   = 0x6\n\tFAN_EVENT_METADATA_LEN                      = 0x18\n\tFAN_EVENT_ON_CHILD                          = 0x8000000\n\tFAN_FS_ERROR                                = 0x8000\n\tFAN_INFO                                    = 0x20\n\tFAN_MARK_ADD                                = 0x1\n\tFAN_MARK_DONT_FOLLOW                        = 0x4\n\tFAN_MARK_EVICTABLE                          = 0x200\n\tFAN_MARK_FILESYSTEM                         = 0x100\n\tFAN_MARK_FLUSH                              = 0x80\n\tFAN_MARK_IGNORE                             = 0x400\n\tFAN_MARK_IGNORED_MASK                       = 0x20\n\tFAN_MARK_IGNORED_SURV_MODIFY                = 0x40\n\tFAN_MARK_IGNORE_SURV                        = 0x440\n\tFAN_MARK_INODE                              = 0x0\n\tFAN_MARK_MNTNS                              = 0x110\n\tFAN_MARK_MOUNT                              = 0x10\n\tFAN_MARK_ONLYDIR                            = 0x8\n\tFAN_MARK_REMOVE                             = 0x2\n\tFAN_MNT_ATTACH                              = 0x1000000\n\tFAN_MNT_DETACH                              = 0x2000000\n\tFAN_MODIFY                                  = 0x2\n\tFAN_MOVE                                    = 0xc0\n\tFAN_MOVED_FROM                              = 0x40\n\tFAN_MOVED_TO                                = 0x80\n\tFAN_MOVE_SELF                               = 0x800\n\tFAN_NOFD                                    = -0x1\n\tFAN_NONBLOCK                                = 0x2\n\tFAN_NOPIDFD                                 = -0x1\n\tFAN_ONDIR                                   = 0x40000000\n\tFAN_OPEN                                    = 0x20\n\tFAN_OPEN_EXEC                               = 0x1000\n\tFAN_OPEN_EXEC_PERM                          = 0x40000\n\tFAN_OPEN_PERM                               = 0x10000\n\tFAN_PRE_ACCESS                              = 0x100000\n\tFAN_Q_OVERFLOW                              = 0x4000\n\tFAN_RENAME                                  = 0x10000000\n\tFAN_REPORT_DFID_NAME                        = 0xc00\n\tFAN_REPORT_DFID_NAME_TARGET                 = 0x1e00\n\tFAN_REPORT_DIR_FID                          = 0x400\n\tFAN_REPORT_FD_ERROR                         = 0x2000\n\tFAN_REPORT_FID                              = 0x200\n\tFAN_REPORT_MNT                              = 0x4000\n\tFAN_REPORT_NAME                             = 0x800\n\tFAN_REPORT_PIDFD                            = 0x80\n\tFAN_REPORT_TARGET_FID                       = 0x1000\n\tFAN_REPORT_TID                              = 0x100\n\tFAN_RESPONSE_INFO_AUDIT_RULE                = 0x1\n\tFAN_RESPONSE_INFO_NONE                      = 0x0\n\tFAN_UNLIMITED_MARKS                         = 0x20\n\tFAN_UNLIMITED_QUEUE                         = 0x10\n\tFD_CLOEXEC                                  = 0x1\n\tFD_SETSIZE                                  = 0x400\n\tFF0                                         = 0x0\n\tFIB_RULE_DEV_DETACHED                       = 0x8\n\tFIB_RULE_FIND_SADDR                         = 0x10000\n\tFIB_RULE_IIF_DETACHED                       = 0x8\n\tFIB_RULE_INVERT                             = 0x2\n\tFIB_RULE_OIF_DETACHED                       = 0x10\n\tFIB_RULE_PERMANENT                          = 0x1\n\tFIB_RULE_UNRESOLVED                         = 0x4\n\tFIDEDUPERANGE                               = 0xc0189436\n\tFSCRYPT_ADD_KEY_FLAG_HW_WRAPPED             = 0x1\n\tFSCRYPT_KEY_DESCRIPTOR_SIZE                 = 0x8\n\tFSCRYPT_KEY_DESC_PREFIX                     = \"fscrypt:\"\n\tFSCRYPT_KEY_DESC_PREFIX_SIZE                = 0x8\n\tFSCRYPT_KEY_IDENTIFIER_SIZE                 = 0x10\n\tFSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY  = 0x1\n\tFSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2\n\tFSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR            = 0x1\n\tFSCRYPT_KEY_SPEC_TYPE_IDENTIFIER            = 0x2\n\tFSCRYPT_KEY_STATUS_ABSENT                   = 0x1\n\tFSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF       = 0x1\n\tFSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED     = 0x3\n\tFSCRYPT_KEY_STATUS_PRESENT                  = 0x2\n\tFSCRYPT_MAX_KEY_SIZE                        = 0x40\n\tFSCRYPT_MODE_ADIANTUM                       = 0x9\n\tFSCRYPT_MODE_AES_128_CBC                    = 0x5\n\tFSCRYPT_MODE_AES_128_CTS                    = 0x6\n\tFSCRYPT_MODE_AES_256_CTS                    = 0x4\n\tFSCRYPT_MODE_AES_256_HCTR2                  = 0xa\n\tFSCRYPT_MODE_AES_256_XTS                    = 0x1\n\tFSCRYPT_MODE_SM4_CTS                        = 0x8\n\tFSCRYPT_MODE_SM4_XTS                        = 0x7\n\tFSCRYPT_POLICY_FLAGS_PAD_16                 = 0x2\n\tFSCRYPT_POLICY_FLAGS_PAD_32                 = 0x3\n\tFSCRYPT_POLICY_FLAGS_PAD_4                  = 0x0\n\tFSCRYPT_POLICY_FLAGS_PAD_8                  = 0x1\n\tFSCRYPT_POLICY_FLAGS_PAD_MASK               = 0x3\n\tFSCRYPT_POLICY_FLAG_DIRECT_KEY              = 0x4\n\tFSCRYPT_POLICY_FLAG_IV_INO_LBLK_32          = 0x10\n\tFSCRYPT_POLICY_FLAG_IV_INO_LBLK_64          = 0x8\n\tFSCRYPT_POLICY_V1                           = 0x0\n\tFSCRYPT_POLICY_V2                           = 0x2\n\tFS_ENCRYPTION_MODE_ADIANTUM                 = 0x9\n\tFS_ENCRYPTION_MODE_AES_128_CBC              = 0x5\n\tFS_ENCRYPTION_MODE_AES_128_CTS              = 0x6\n\tFS_ENCRYPTION_MODE_AES_256_CBC              = 0x3\n\tFS_ENCRYPTION_MODE_AES_256_CTS              = 0x4\n\tFS_ENCRYPTION_MODE_AES_256_GCM              = 0x2\n\tFS_ENCRYPTION_MODE_AES_256_XTS              = 0x1\n\tFS_ENCRYPTION_MODE_INVALID                  = 0x0\n\tFS_IOC_ADD_ENCRYPTION_KEY                   = 0xc0506617\n\tFS_IOC_GET_ENCRYPTION_KEY_STATUS            = 0xc080661a\n\tFS_IOC_GET_ENCRYPTION_POLICY_EX             = 0xc0096616\n\tFS_IOC_MEASURE_VERITY                       = 0xc0046686\n\tFS_IOC_READ_VERITY_METADATA                 = 0xc0286687\n\tFS_IOC_REMOVE_ENCRYPTION_KEY                = 0xc0406618\n\tFS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS      = 0xc0406619\n\tFS_KEY_DESCRIPTOR_SIZE                      = 0x8\n\tFS_KEY_DESC_PREFIX                          = \"fscrypt:\"\n\tFS_KEY_DESC_PREFIX_SIZE                     = 0x8\n\tFS_MAX_KEY_SIZE                             = 0x40\n\tFS_POLICY_FLAGS_PAD_16                      = 0x2\n\tFS_POLICY_FLAGS_PAD_32                      = 0x3\n\tFS_POLICY_FLAGS_PAD_4                       = 0x0\n\tFS_POLICY_FLAGS_PAD_8                       = 0x1\n\tFS_POLICY_FLAGS_PAD_MASK                    = 0x3\n\tFS_POLICY_FLAGS_VALID                       = 0x7\n\tFS_VERITY_FL                                = 0x100000\n\tFS_VERITY_HASH_ALG_SHA256                   = 0x1\n\tFS_VERITY_HASH_ALG_SHA512                   = 0x2\n\tFS_VERITY_METADATA_TYPE_DESCRIPTOR          = 0x2\n\tFS_VERITY_METADATA_TYPE_MERKLE_TREE         = 0x1\n\tFS_VERITY_METADATA_TYPE_SIGNATURE           = 0x3\n\tFUSE_SUPER_MAGIC                            = 0x65735546\n\tFUTEXFS_SUPER_MAGIC                         = 0xbad1dea\n\tF_ADD_SEALS                                 = 0x409\n\tF_CREATED_QUERY                             = 0x404\n\tF_DUPFD                                     = 0x0\n\tF_DUPFD_CLOEXEC                             = 0x406\n\tF_DUPFD_QUERY                               = 0x403\n\tF_EXLCK                                     = 0x4\n\tF_GETFD                                     = 0x1\n\tF_GETFL                                     = 0x3\n\tF_GETLEASE                                  = 0x401\n\tF_GETOWN_EX                                 = 0x10\n\tF_GETPIPE_SZ                                = 0x408\n\tF_GETSIG                                    = 0xb\n\tF_GET_FILE_RW_HINT                          = 0x40d\n\tF_GET_RW_HINT                               = 0x40b\n\tF_GET_SEALS                                 = 0x40a\n\tF_LOCK                                      = 0x1\n\tF_NOTIFY                                    = 0x402\n\tF_OFD_GETLK                                 = 0x24\n\tF_OFD_SETLK                                 = 0x25\n\tF_OFD_SETLKW                                = 0x26\n\tF_OK                                        = 0x0\n\tF_SEAL_EXEC                                 = 0x20\n\tF_SEAL_FUTURE_WRITE                         = 0x10\n\tF_SEAL_GROW                                 = 0x4\n\tF_SEAL_SEAL                                 = 0x1\n\tF_SEAL_SHRINK                               = 0x2\n\tF_SEAL_WRITE                                = 0x8\n\tF_SETFD                                     = 0x2\n\tF_SETFL                                     = 0x4\n\tF_SETLEASE                                  = 0x400\n\tF_SETOWN_EX                                 = 0xf\n\tF_SETPIPE_SZ                                = 0x407\n\tF_SETSIG                                    = 0xa\n\tF_SET_FILE_RW_HINT                          = 0x40e\n\tF_SET_RW_HINT                               = 0x40c\n\tF_SHLCK                                     = 0x8\n\tF_TEST                                      = 0x3\n\tF_TLOCK                                     = 0x2\n\tF_ULOCK                                     = 0x0\n\tGENL_ADMIN_PERM                             = 0x1\n\tGENL_CMD_CAP_DO                             = 0x2\n\tGENL_CMD_CAP_DUMP                           = 0x4\n\tGENL_CMD_CAP_HASPOL                         = 0x8\n\tGENL_HDRLEN                                 = 0x4\n\tGENL_ID_CTRL                                = 0x10\n\tGENL_ID_PMCRAID                             = 0x12\n\tGENL_ID_VFS_DQUOT                           = 0x11\n\tGENL_MAX_ID                                 = 0x3ff\n\tGENL_MIN_ID                                 = 0x10\n\tGENL_NAMSIZ                                 = 0x10\n\tGENL_START_ALLOC                            = 0x13\n\tGENL_UNS_ADMIN_PERM                         = 0x10\n\tGRND_INSECURE                               = 0x4\n\tGRND_NONBLOCK                               = 0x1\n\tGRND_RANDOM                                 = 0x2\n\tHDIO_DRIVE_CMD                              = 0x31f\n\tHDIO_DRIVE_CMD_AEB                          = 0x31e\n\tHDIO_DRIVE_CMD_HDR_SIZE                     = 0x4\n\tHDIO_DRIVE_HOB_HDR_SIZE                     = 0x8\n\tHDIO_DRIVE_RESET                            = 0x31c\n\tHDIO_DRIVE_TASK                             = 0x31e\n\tHDIO_DRIVE_TASKFILE                         = 0x31d\n\tHDIO_DRIVE_TASK_HDR_SIZE                    = 0x8\n\tHDIO_GETGEO                                 = 0x301\n\tHDIO_GET_32BIT                              = 0x309\n\tHDIO_GET_ACOUSTIC                           = 0x30f\n\tHDIO_GET_ADDRESS                            = 0x310\n\tHDIO_GET_BUSSTATE                           = 0x31a\n\tHDIO_GET_DMA                                = 0x30b\n\tHDIO_GET_IDENTITY                           = 0x30d\n\tHDIO_GET_KEEPSETTINGS                       = 0x308\n\tHDIO_GET_MULTCOUNT                          = 0x304\n\tHDIO_GET_NICE                               = 0x30c\n\tHDIO_GET_NOWERR                             = 0x30a\n\tHDIO_GET_QDMA                               = 0x305\n\tHDIO_GET_UNMASKINTR                         = 0x302\n\tHDIO_GET_WCACHE                             = 0x30e\n\tHDIO_OBSOLETE_IDENTITY                      = 0x307\n\tHDIO_SCAN_HWIF                              = 0x328\n\tHDIO_SET_32BIT                              = 0x324\n\tHDIO_SET_ACOUSTIC                           = 0x32c\n\tHDIO_SET_ADDRESS                            = 0x32f\n\tHDIO_SET_BUSSTATE                           = 0x32d\n\tHDIO_SET_DMA                                = 0x326\n\tHDIO_SET_KEEPSETTINGS                       = 0x323\n\tHDIO_SET_MULTCOUNT                          = 0x321\n\tHDIO_SET_NICE                               = 0x329\n\tHDIO_SET_NOWERR                             = 0x325\n\tHDIO_SET_PIO_MODE                           = 0x327\n\tHDIO_SET_QDMA                               = 0x32e\n\tHDIO_SET_UNMASKINTR                         = 0x322\n\tHDIO_SET_WCACHE                             = 0x32b\n\tHDIO_SET_XFER                               = 0x306\n\tHDIO_TRISTATE_HWIF                          = 0x31b\n\tHDIO_UNREGISTER_HWIF                        = 0x32a\n\tHID_MAX_DESCRIPTOR_SIZE                     = 0x1000\n\tHOSTFS_SUPER_MAGIC                          = 0xc0ffee\n\tHPFS_SUPER_MAGIC                            = 0xf995e849\n\tHUGETLBFS_MAGIC                             = 0x958458f6\n\tIBSHIFT                                     = 0x10\n\tICRNL                                       = 0x100\n\tIFA_F_DADFAILED                             = 0x8\n\tIFA_F_DEPRECATED                            = 0x20\n\tIFA_F_HOMEADDRESS                           = 0x10\n\tIFA_F_MANAGETEMPADDR                        = 0x100\n\tIFA_F_MCAUTOJOIN                            = 0x400\n\tIFA_F_NODAD                                 = 0x2\n\tIFA_F_NOPREFIXROUTE                         = 0x200\n\tIFA_F_OPTIMISTIC                            = 0x4\n\tIFA_F_PERMANENT                             = 0x80\n\tIFA_F_SECONDARY                             = 0x1\n\tIFA_F_STABLE_PRIVACY                        = 0x800\n\tIFA_F_TEMPORARY                             = 0x1\n\tIFA_F_TENTATIVE                             = 0x40\n\tIFA_MAX                                     = 0xb\n\tIFF_ALLMULTI                                = 0x200\n\tIFF_ATTACH_QUEUE                            = 0x200\n\tIFF_AUTOMEDIA                               = 0x4000\n\tIFF_BROADCAST                               = 0x2\n\tIFF_DEBUG                                   = 0x4\n\tIFF_DETACH_QUEUE                            = 0x400\n\tIFF_DORMANT                                 = 0x20000\n\tIFF_DYNAMIC                                 = 0x8000\n\tIFF_ECHO                                    = 0x40000\n\tIFF_LOOPBACK                                = 0x8\n\tIFF_LOWER_UP                                = 0x10000\n\tIFF_MASTER                                  = 0x400\n\tIFF_MULTICAST                               = 0x1000\n\tIFF_MULTI_QUEUE                             = 0x100\n\tIFF_NAPI                                    = 0x10\n\tIFF_NAPI_FRAGS                              = 0x20\n\tIFF_NOARP                                   = 0x80\n\tIFF_NOFILTER                                = 0x1000\n\tIFF_NOTRAILERS                              = 0x20\n\tIFF_NO_CARRIER                              = 0x40\n\tIFF_NO_PI                                   = 0x1000\n\tIFF_ONE_QUEUE                               = 0x2000\n\tIFF_PERSIST                                 = 0x800\n\tIFF_POINTOPOINT                             = 0x10\n\tIFF_PORTSEL                                 = 0x2000\n\tIFF_PROMISC                                 = 0x100\n\tIFF_RUNNING                                 = 0x40\n\tIFF_SLAVE                                   = 0x800\n\tIFF_TAP                                     = 0x2\n\tIFF_TUN                                     = 0x1\n\tIFF_TUN_EXCL                                = 0x8000\n\tIFF_UP                                      = 0x1\n\tIFF_VNET_HDR                                = 0x4000\n\tIFF_VOLATILE                                = 0x70c5a\n\tIFNAMSIZ                                    = 0x10\n\tIGNBRK                                      = 0x1\n\tIGNCR                                       = 0x80\n\tIGNPAR                                      = 0x4\n\tIMAXBEL                                     = 0x2000\n\tINLCR                                       = 0x40\n\tINPCK                                       = 0x10\n\tIN_ACCESS                                   = 0x1\n\tIN_ALL_EVENTS                               = 0xfff\n\tIN_ATTRIB                                   = 0x4\n\tIN_CLASSA_HOST                              = 0xffffff\n\tIN_CLASSA_MAX                               = 0x80\n\tIN_CLASSA_NET                               = 0xff000000\n\tIN_CLASSA_NSHIFT                            = 0x18\n\tIN_CLASSB_HOST                              = 0xffff\n\tIN_CLASSB_MAX                               = 0x10000\n\tIN_CLASSB_NET                               = 0xffff0000\n\tIN_CLASSB_NSHIFT                            = 0x10\n\tIN_CLASSC_HOST                              = 0xff\n\tIN_CLASSC_NET                               = 0xffffff00\n\tIN_CLASSC_NSHIFT                            = 0x8\n\tIN_CLOSE                                    = 0x18\n\tIN_CLOSE_NOWRITE                            = 0x10\n\tIN_CLOSE_WRITE                              = 0x8\n\tIN_CREATE                                   = 0x100\n\tIN_DELETE                                   = 0x200\n\tIN_DELETE_SELF                              = 0x400\n\tIN_DONT_FOLLOW                              = 0x2000000\n\tIN_EXCL_UNLINK                              = 0x4000000\n\tIN_IGNORED                                  = 0x8000\n\tIN_ISDIR                                    = 0x40000000\n\tIN_LOOPBACKNET                              = 0x7f\n\tIN_MASK_ADD                                 = 0x20000000\n\tIN_MASK_CREATE                              = 0x10000000\n\tIN_MODIFY                                   = 0x2\n\tIN_MOVE                                     = 0xc0\n\tIN_MOVED_FROM                               = 0x40\n\tIN_MOVED_TO                                 = 0x80\n\tIN_MOVE_SELF                                = 0x800\n\tIN_ONESHOT                                  = 0x80000000\n\tIN_ONLYDIR                                  = 0x1000000\n\tIN_OPEN                                     = 0x20\n\tIN_Q_OVERFLOW                               = 0x4000\n\tIN_UNMOUNT                                  = 0x2000\n\tIOCTL_MEI_CONNECT_CLIENT                    = 0xc0104801\n\tIOCTL_MEI_CONNECT_CLIENT_VTAG               = 0xc0144804\n\tIPPROTO_AH                                  = 0x33\n\tIPPROTO_BEETPH                              = 0x5e\n\tIPPROTO_COMP                                = 0x6c\n\tIPPROTO_DCCP                                = 0x21\n\tIPPROTO_DSTOPTS                             = 0x3c\n\tIPPROTO_EGP                                 = 0x8\n\tIPPROTO_ENCAP                               = 0x62\n\tIPPROTO_ESP                                 = 0x32\n\tIPPROTO_ETHERNET                            = 0x8f\n\tIPPROTO_FRAGMENT                            = 0x2c\n\tIPPROTO_GRE                                 = 0x2f\n\tIPPROTO_HOPOPTS                             = 0x0\n\tIPPROTO_ICMP                                = 0x1\n\tIPPROTO_ICMPV6                              = 0x3a\n\tIPPROTO_IDP                                 = 0x16\n\tIPPROTO_IGMP                                = 0x2\n\tIPPROTO_IP                                  = 0x0\n\tIPPROTO_IPIP                                = 0x4\n\tIPPROTO_IPV6                                = 0x29\n\tIPPROTO_L2TP                                = 0x73\n\tIPPROTO_MH                                  = 0x87\n\tIPPROTO_MPLS                                = 0x89\n\tIPPROTO_MPTCP                               = 0x106\n\tIPPROTO_MTP                                 = 0x5c\n\tIPPROTO_NONE                                = 0x3b\n\tIPPROTO_PIM                                 = 0x67\n\tIPPROTO_PUP                                 = 0xc\n\tIPPROTO_RAW                                 = 0xff\n\tIPPROTO_ROUTING                             = 0x2b\n\tIPPROTO_RSVP                                = 0x2e\n\tIPPROTO_SCTP                                = 0x84\n\tIPPROTO_SMC                                 = 0x100\n\tIPPROTO_TCP                                 = 0x6\n\tIPPROTO_TP                                  = 0x1d\n\tIPPROTO_UDP                                 = 0x11\n\tIPPROTO_UDPLITE                             = 0x88\n\tIPV6_2292DSTOPTS                            = 0x4\n\tIPV6_2292HOPLIMIT                           = 0x8\n\tIPV6_2292HOPOPTS                            = 0x3\n\tIPV6_2292PKTINFO                            = 0x2\n\tIPV6_2292PKTOPTIONS                         = 0x6\n\tIPV6_2292RTHDR                              = 0x5\n\tIPV6_ADDRFORM                               = 0x1\n\tIPV6_ADDR_PREFERENCES                       = 0x48\n\tIPV6_ADD_MEMBERSHIP                         = 0x14\n\tIPV6_AUTHHDR                                = 0xa\n\tIPV6_AUTOFLOWLABEL                          = 0x46\n\tIPV6_CHECKSUM                               = 0x7\n\tIPV6_DONTFRAG                               = 0x3e\n\tIPV6_DROP_MEMBERSHIP                        = 0x15\n\tIPV6_DSTOPTS                                = 0x3b\n\tIPV6_FREEBIND                               = 0x4e\n\tIPV6_HDRINCL                                = 0x24\n\tIPV6_HOPLIMIT                               = 0x34\n\tIPV6_HOPOPTS                                = 0x36\n\tIPV6_IPSEC_POLICY                           = 0x22\n\tIPV6_JOIN_ANYCAST                           = 0x1b\n\tIPV6_JOIN_GROUP                             = 0x14\n\tIPV6_LEAVE_ANYCAST                          = 0x1c\n\tIPV6_LEAVE_GROUP                            = 0x15\n\tIPV6_MINHOPCOUNT                            = 0x49\n\tIPV6_MTU                                    = 0x18\n\tIPV6_MTU_DISCOVER                           = 0x17\n\tIPV6_MULTICAST_ALL                          = 0x1d\n\tIPV6_MULTICAST_HOPS                         = 0x12\n\tIPV6_MULTICAST_IF                           = 0x11\n\tIPV6_MULTICAST_LOOP                         = 0x13\n\tIPV6_NEXTHOP                                = 0x9\n\tIPV6_ORIGDSTADDR                            = 0x4a\n\tIPV6_PATHMTU                                = 0x3d\n\tIPV6_PKTINFO                                = 0x32\n\tIPV6_PMTUDISC_DO                            = 0x2\n\tIPV6_PMTUDISC_DONT                          = 0x0\n\tIPV6_PMTUDISC_INTERFACE                     = 0x4\n\tIPV6_PMTUDISC_OMIT                          = 0x5\n\tIPV6_PMTUDISC_PROBE                         = 0x3\n\tIPV6_PMTUDISC_WANT                          = 0x1\n\tIPV6_RECVDSTOPTS                            = 0x3a\n\tIPV6_RECVERR                                = 0x19\n\tIPV6_RECVERR_RFC4884                        = 0x1f\n\tIPV6_RECVFRAGSIZE                           = 0x4d\n\tIPV6_RECVHOPLIMIT                           = 0x33\n\tIPV6_RECVHOPOPTS                            = 0x35\n\tIPV6_RECVORIGDSTADDR                        = 0x4a\n\tIPV6_RECVPATHMTU                            = 0x3c\n\tIPV6_RECVPKTINFO                            = 0x31\n\tIPV6_RECVRTHDR                              = 0x38\n\tIPV6_RECVTCLASS                             = 0x42\n\tIPV6_ROUTER_ALERT                           = 0x16\n\tIPV6_ROUTER_ALERT_ISOLATE                   = 0x1e\n\tIPV6_RTHDR                                  = 0x39\n\tIPV6_RTHDRDSTOPTS                           = 0x37\n\tIPV6_RTHDR_LOOSE                            = 0x0\n\tIPV6_RTHDR_STRICT                           = 0x1\n\tIPV6_RTHDR_TYPE_0                           = 0x0\n\tIPV6_RXDSTOPTS                              = 0x3b\n\tIPV6_RXHOPOPTS                              = 0x36\n\tIPV6_TCLASS                                 = 0x43\n\tIPV6_TRANSPARENT                            = 0x4b\n\tIPV6_UNICAST_HOPS                           = 0x10\n\tIPV6_UNICAST_IF                             = 0x4c\n\tIPV6_V6ONLY                                 = 0x1a\n\tIPV6_VERSION                                = 0x60\n\tIPV6_VERSION_MASK                           = 0xf0\n\tIPV6_XFRM_POLICY                            = 0x23\n\tIP_ADD_MEMBERSHIP                           = 0x23\n\tIP_ADD_SOURCE_MEMBERSHIP                    = 0x27\n\tIP_BIND_ADDRESS_NO_PORT                     = 0x18\n\tIP_BLOCK_SOURCE                             = 0x26\n\tIP_CHECKSUM                                 = 0x17\n\tIP_DEFAULT_MULTICAST_LOOP                   = 0x1\n\tIP_DEFAULT_MULTICAST_TTL                    = 0x1\n\tIP_DF                                       = 0x4000\n\tIP_DROP_MEMBERSHIP                          = 0x24\n\tIP_DROP_SOURCE_MEMBERSHIP                   = 0x28\n\tIP_FREEBIND                                 = 0xf\n\tIP_HDRINCL                                  = 0x3\n\tIP_IPSEC_POLICY                             = 0x10\n\tIP_LOCAL_PORT_RANGE                         = 0x33\n\tIP_MAXPACKET                                = 0xffff\n\tIP_MAX_MEMBERSHIPS                          = 0x14\n\tIP_MF                                       = 0x2000\n\tIP_MINTTL                                   = 0x15\n\tIP_MSFILTER                                 = 0x29\n\tIP_MSS                                      = 0x240\n\tIP_MTU                                      = 0xe\n\tIP_MTU_DISCOVER                             = 0xa\n\tIP_MULTICAST_ALL                            = 0x31\n\tIP_MULTICAST_IF                             = 0x20\n\tIP_MULTICAST_LOOP                           = 0x22\n\tIP_MULTICAST_TTL                            = 0x21\n\tIP_NODEFRAG                                 = 0x16\n\tIP_OFFMASK                                  = 0x1fff\n\tIP_OPTIONS                                  = 0x4\n\tIP_ORIGDSTADDR                              = 0x14\n\tIP_PASSSEC                                  = 0x12\n\tIP_PKTINFO                                  = 0x8\n\tIP_PKTOPTIONS                               = 0x9\n\tIP_PMTUDISC                                 = 0xa\n\tIP_PMTUDISC_DO                              = 0x2\n\tIP_PMTUDISC_DONT                            = 0x0\n\tIP_PMTUDISC_INTERFACE                       = 0x4\n\tIP_PMTUDISC_OMIT                            = 0x5\n\tIP_PMTUDISC_PROBE                           = 0x3\n\tIP_PMTUDISC_WANT                            = 0x1\n\tIP_PROTOCOL                                 = 0x34\n\tIP_RECVERR                                  = 0xb\n\tIP_RECVERR_RFC4884                          = 0x1a\n\tIP_RECVFRAGSIZE                             = 0x19\n\tIP_RECVOPTS                                 = 0x6\n\tIP_RECVORIGDSTADDR                          = 0x14\n\tIP_RECVRETOPTS                              = 0x7\n\tIP_RECVTOS                                  = 0xd\n\tIP_RECVTTL                                  = 0xc\n\tIP_RETOPTS                                  = 0x7\n\tIP_RF                                       = 0x8000\n\tIP_ROUTER_ALERT                             = 0x5\n\tIP_TOS                                      = 0x1\n\tIP_TRANSPARENT                              = 0x13\n\tIP_TTL                                      = 0x2\n\tIP_UNBLOCK_SOURCE                           = 0x25\n\tIP_UNICAST_IF                               = 0x32\n\tIP_XFRM_POLICY                              = 0x11\n\tISOFS_SUPER_MAGIC                           = 0x9660\n\tISTRIP                                      = 0x20\n\tITIMER_PROF                                 = 0x2\n\tITIMER_REAL                                 = 0x0\n\tITIMER_VIRTUAL                              = 0x1\n\tIUTF8                                       = 0x4000\n\tIXANY                                       = 0x800\n\tJFFS2_SUPER_MAGIC                           = 0x72b6\n\tKCMPROTO_CONNECTED                          = 0x0\n\tKCM_RECV_DISABLE                            = 0x1\n\tKEXEC_ARCH_386                              = 0x30000\n\tKEXEC_ARCH_68K                              = 0x40000\n\tKEXEC_ARCH_AARCH64                          = 0xb70000\n\tKEXEC_ARCH_ARM                              = 0x280000\n\tKEXEC_ARCH_DEFAULT                          = 0x0\n\tKEXEC_ARCH_IA_64                            = 0x320000\n\tKEXEC_ARCH_LOONGARCH                        = 0x1020000\n\tKEXEC_ARCH_MASK                             = 0xffff0000\n\tKEXEC_ARCH_MIPS                             = 0x80000\n\tKEXEC_ARCH_MIPS_LE                          = 0xa0000\n\tKEXEC_ARCH_PARISC                           = 0xf0000\n\tKEXEC_ARCH_PPC                              = 0x140000\n\tKEXEC_ARCH_PPC64                            = 0x150000\n\tKEXEC_ARCH_RISCV                            = 0xf30000\n\tKEXEC_ARCH_S390                             = 0x160000\n\tKEXEC_ARCH_SH                               = 0x2a0000\n\tKEXEC_ARCH_X86_64                           = 0x3e0000\n\tKEXEC_CRASH_HOTPLUG_SUPPORT                 = 0x8\n\tKEXEC_FILE_DEBUG                            = 0x8\n\tKEXEC_FILE_NO_INITRAMFS                     = 0x4\n\tKEXEC_FILE_ON_CRASH                         = 0x2\n\tKEXEC_FILE_UNLOAD                           = 0x1\n\tKEXEC_ON_CRASH                              = 0x1\n\tKEXEC_PRESERVE_CONTEXT                      = 0x2\n\tKEXEC_SEGMENT_MAX                           = 0x10\n\tKEXEC_UPDATE_ELFCOREHDR                     = 0x4\n\tKEYCTL_ASSUME_AUTHORITY                     = 0x10\n\tKEYCTL_CAPABILITIES                         = 0x1f\n\tKEYCTL_CAPS0_BIG_KEY                        = 0x10\n\tKEYCTL_CAPS0_CAPABILITIES                   = 0x1\n\tKEYCTL_CAPS0_DIFFIE_HELLMAN                 = 0x4\n\tKEYCTL_CAPS0_INVALIDATE                     = 0x20\n\tKEYCTL_CAPS0_MOVE                           = 0x80\n\tKEYCTL_CAPS0_PERSISTENT_KEYRINGS            = 0x2\n\tKEYCTL_CAPS0_PUBLIC_KEY                     = 0x8\n\tKEYCTL_CAPS0_RESTRICT_KEYRING               = 0x40\n\tKEYCTL_CAPS1_NOTIFICATIONS                  = 0x4\n\tKEYCTL_CAPS1_NS_KEYRING_NAME                = 0x1\n\tKEYCTL_CAPS1_NS_KEY_TAG                     = 0x2\n\tKEYCTL_CHOWN                                = 0x4\n\tKEYCTL_CLEAR                                = 0x7\n\tKEYCTL_DESCRIBE                             = 0x6\n\tKEYCTL_DH_COMPUTE                           = 0x17\n\tKEYCTL_GET_KEYRING_ID                       = 0x0\n\tKEYCTL_GET_PERSISTENT                       = 0x16\n\tKEYCTL_GET_SECURITY                         = 0x11\n\tKEYCTL_INSTANTIATE                          = 0xc\n\tKEYCTL_INSTANTIATE_IOV                      = 0x14\n\tKEYCTL_INVALIDATE                           = 0x15\n\tKEYCTL_JOIN_SESSION_KEYRING                 = 0x1\n\tKEYCTL_LINK                                 = 0x8\n\tKEYCTL_MOVE                                 = 0x1e\n\tKEYCTL_MOVE_EXCL                            = 0x1\n\tKEYCTL_NEGATE                               = 0xd\n\tKEYCTL_PKEY_DECRYPT                         = 0x1a\n\tKEYCTL_PKEY_ENCRYPT                         = 0x19\n\tKEYCTL_PKEY_QUERY                           = 0x18\n\tKEYCTL_PKEY_SIGN                            = 0x1b\n\tKEYCTL_PKEY_VERIFY                          = 0x1c\n\tKEYCTL_READ                                 = 0xb\n\tKEYCTL_REJECT                               = 0x13\n\tKEYCTL_RESTRICT_KEYRING                     = 0x1d\n\tKEYCTL_REVOKE                               = 0x3\n\tKEYCTL_SEARCH                               = 0xa\n\tKEYCTL_SESSION_TO_PARENT                    = 0x12\n\tKEYCTL_SETPERM                              = 0x5\n\tKEYCTL_SET_REQKEY_KEYRING                   = 0xe\n\tKEYCTL_SET_TIMEOUT                          = 0xf\n\tKEYCTL_SUPPORTS_DECRYPT                     = 0x2\n\tKEYCTL_SUPPORTS_ENCRYPT                     = 0x1\n\tKEYCTL_SUPPORTS_SIGN                        = 0x4\n\tKEYCTL_SUPPORTS_VERIFY                      = 0x8\n\tKEYCTL_UNLINK                               = 0x9\n\tKEYCTL_UPDATE                               = 0x2\n\tKEYCTL_WATCH_KEY                            = 0x20\n\tKEY_REQKEY_DEFL_DEFAULT                     = 0x0\n\tKEY_REQKEY_DEFL_GROUP_KEYRING               = 0x6\n\tKEY_REQKEY_DEFL_NO_CHANGE                   = -0x1\n\tKEY_REQKEY_DEFL_PROCESS_KEYRING             = 0x2\n\tKEY_REQKEY_DEFL_REQUESTOR_KEYRING           = 0x7\n\tKEY_REQKEY_DEFL_SESSION_KEYRING             = 0x3\n\tKEY_REQKEY_DEFL_THREAD_KEYRING              = 0x1\n\tKEY_REQKEY_DEFL_USER_KEYRING                = 0x4\n\tKEY_REQKEY_DEFL_USER_SESSION_KEYRING        = 0x5\n\tKEY_SPEC_GROUP_KEYRING                      = -0x6\n\tKEY_SPEC_PROCESS_KEYRING                    = -0x2\n\tKEY_SPEC_REQKEY_AUTH_KEY                    = -0x7\n\tKEY_SPEC_REQUESTOR_KEYRING                  = -0x8\n\tKEY_SPEC_SESSION_KEYRING                    = -0x3\n\tKEY_SPEC_THREAD_KEYRING                     = -0x1\n\tKEY_SPEC_USER_KEYRING                       = -0x4\n\tKEY_SPEC_USER_SESSION_KEYRING               = -0x5\n\tLANDLOCK_ACCESS_FS_EXECUTE                  = 0x1\n\tLANDLOCK_ACCESS_FS_IOCTL_DEV                = 0x8000\n\tLANDLOCK_ACCESS_FS_MAKE_BLOCK               = 0x800\n\tLANDLOCK_ACCESS_FS_MAKE_CHAR                = 0x40\n\tLANDLOCK_ACCESS_FS_MAKE_DIR                 = 0x80\n\tLANDLOCK_ACCESS_FS_MAKE_FIFO                = 0x400\n\tLANDLOCK_ACCESS_FS_MAKE_REG                 = 0x100\n\tLANDLOCK_ACCESS_FS_MAKE_SOCK                = 0x200\n\tLANDLOCK_ACCESS_FS_MAKE_SYM                 = 0x1000\n\tLANDLOCK_ACCESS_FS_READ_DIR                 = 0x8\n\tLANDLOCK_ACCESS_FS_READ_FILE                = 0x4\n\tLANDLOCK_ACCESS_FS_REFER                    = 0x2000\n\tLANDLOCK_ACCESS_FS_REMOVE_DIR               = 0x10\n\tLANDLOCK_ACCESS_FS_REMOVE_FILE              = 0x20\n\tLANDLOCK_ACCESS_FS_TRUNCATE                 = 0x4000\n\tLANDLOCK_ACCESS_FS_WRITE_FILE               = 0x2\n\tLANDLOCK_ACCESS_NET_BIND_TCP                = 0x1\n\tLANDLOCK_ACCESS_NET_CONNECT_TCP             = 0x2\n\tLANDLOCK_CREATE_RULESET_ERRATA              = 0x2\n\tLANDLOCK_CREATE_RULESET_VERSION             = 0x1\n\tLANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON      = 0x2\n\tLANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF    = 0x1\n\tLANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF   = 0x4\n\tLANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET         = 0x1\n\tLANDLOCK_SCOPE_SIGNAL                       = 0x2\n\tLINUX_REBOOT_CMD_CAD_OFF                    = 0x0\n\tLINUX_REBOOT_CMD_CAD_ON                     = 0x89abcdef\n\tLINUX_REBOOT_CMD_HALT                       = 0xcdef0123\n\tLINUX_REBOOT_CMD_KEXEC                      = 0x45584543\n\tLINUX_REBOOT_CMD_POWER_OFF                  = 0x4321fedc\n\tLINUX_REBOOT_CMD_RESTART                    = 0x1234567\n\tLINUX_REBOOT_CMD_RESTART2                   = 0xa1b2c3d4\n\tLINUX_REBOOT_CMD_SW_SUSPEND                 = 0xd000fce2\n\tLINUX_REBOOT_MAGIC1                         = 0xfee1dead\n\tLINUX_REBOOT_MAGIC2                         = 0x28121969\n\tLOCK_EX                                     = 0x2\n\tLOCK_NB                                     = 0x4\n\tLOCK_SH                                     = 0x1\n\tLOCK_UN                                     = 0x8\n\tLOOP_CLR_FD                                 = 0x4c01\n\tLOOP_CONFIGURE                              = 0x4c0a\n\tLOOP_CTL_ADD                                = 0x4c80\n\tLOOP_CTL_GET_FREE                           = 0x4c82\n\tLOOP_CTL_REMOVE                             = 0x4c81\n\tLOOP_GET_STATUS                             = 0x4c03\n\tLOOP_GET_STATUS64                           = 0x4c05\n\tLOOP_SET_BLOCK_SIZE                         = 0x4c09\n\tLOOP_SET_CAPACITY                           = 0x4c07\n\tLOOP_SET_DIRECT_IO                          = 0x4c08\n\tLOOP_SET_FD                                 = 0x4c00\n\tLOOP_SET_STATUS                             = 0x4c02\n\tLOOP_SET_STATUS64                           = 0x4c04\n\tLOOP_SET_STATUS_CLEARABLE_FLAGS             = 0x4\n\tLOOP_SET_STATUS_SETTABLE_FLAGS              = 0xc\n\tLO_KEY_SIZE                                 = 0x20\n\tLO_NAME_SIZE                                = 0x40\n\tLWTUNNEL_IP6_MAX                            = 0x8\n\tLWTUNNEL_IP_MAX                             = 0x8\n\tLWTUNNEL_IP_OPTS_MAX                        = 0x3\n\tLWTUNNEL_IP_OPT_ERSPAN_MAX                  = 0x4\n\tLWTUNNEL_IP_OPT_GENEVE_MAX                  = 0x3\n\tLWTUNNEL_IP_OPT_VXLAN_MAX                   = 0x1\n\tMADV_COLD                                   = 0x14\n\tMADV_COLLAPSE                               = 0x19\n\tMADV_DODUMP                                 = 0x11\n\tMADV_DOFORK                                 = 0xb\n\tMADV_DONTDUMP                               = 0x10\n\tMADV_DONTFORK                               = 0xa\n\tMADV_DONTNEED                               = 0x4\n\tMADV_DONTNEED_LOCKED                        = 0x18\n\tMADV_FREE                                   = 0x8\n\tMADV_HUGEPAGE                               = 0xe\n\tMADV_HWPOISON                               = 0x64\n\tMADV_KEEPONFORK                             = 0x13\n\tMADV_MERGEABLE                              = 0xc\n\tMADV_NOHUGEPAGE                             = 0xf\n\tMADV_NORMAL                                 = 0x0\n\tMADV_PAGEOUT                                = 0x15\n\tMADV_POPULATE_READ                          = 0x16\n\tMADV_POPULATE_WRITE                         = 0x17\n\tMADV_RANDOM                                 = 0x1\n\tMADV_REMOVE                                 = 0x9\n\tMADV_SEQUENTIAL                             = 0x2\n\tMADV_UNMERGEABLE                            = 0xd\n\tMADV_WILLNEED                               = 0x3\n\tMADV_WIPEONFORK                             = 0x12\n\tMAP_DROPPABLE                               = 0x8\n\tMAP_FILE                                    = 0x0\n\tMAP_FIXED                                   = 0x10\n\tMAP_FIXED_NOREPLACE                         = 0x100000\n\tMAP_HUGE_16GB                               = 0x88000000\n\tMAP_HUGE_16KB                               = 0x38000000\n\tMAP_HUGE_16MB                               = 0x60000000\n\tMAP_HUGE_1GB                                = 0x78000000\n\tMAP_HUGE_1MB                                = 0x50000000\n\tMAP_HUGE_256MB                              = 0x70000000\n\tMAP_HUGE_2GB                                = 0x7c000000\n\tMAP_HUGE_2MB                                = 0x54000000\n\tMAP_HUGE_32MB                               = 0x64000000\n\tMAP_HUGE_512KB                              = 0x4c000000\n\tMAP_HUGE_512MB                              = 0x74000000\n\tMAP_HUGE_64KB                               = 0x40000000\n\tMAP_HUGE_8MB                                = 0x5c000000\n\tMAP_HUGE_MASK                               = 0x3f\n\tMAP_HUGE_SHIFT                              = 0x1a\n\tMAP_PRIVATE                                 = 0x2\n\tMAP_SHARED                                  = 0x1\n\tMAP_SHARED_VALIDATE                         = 0x3\n\tMAP_TYPE                                    = 0xf\n\tMCAST_BLOCK_SOURCE                          = 0x2b\n\tMCAST_EXCLUDE                               = 0x0\n\tMCAST_INCLUDE                               = 0x1\n\tMCAST_JOIN_GROUP                            = 0x2a\n\tMCAST_JOIN_SOURCE_GROUP                     = 0x2e\n\tMCAST_LEAVE_GROUP                           = 0x2d\n\tMCAST_LEAVE_SOURCE_GROUP                    = 0x2f\n\tMCAST_MSFILTER                              = 0x30\n\tMCAST_UNBLOCK_SOURCE                        = 0x2c\n\tMEMGETREGIONINFO                            = 0xc0104d08\n\tMEMREADOOB64                                = 0xc0184d16\n\tMEMWRITE                                    = 0xc0304d18\n\tMEMWRITEOOB64                               = 0xc0184d15\n\tMFD_ALLOW_SEALING                           = 0x2\n\tMFD_CLOEXEC                                 = 0x1\n\tMFD_EXEC                                    = 0x10\n\tMFD_HUGETLB                                 = 0x4\n\tMFD_HUGE_16GB                               = 0x88000000\n\tMFD_HUGE_16MB                               = 0x60000000\n\tMFD_HUGE_1GB                                = 0x78000000\n\tMFD_HUGE_1MB                                = 0x50000000\n\tMFD_HUGE_256MB                              = 0x70000000\n\tMFD_HUGE_2GB                                = 0x7c000000\n\tMFD_HUGE_2MB                                = 0x54000000\n\tMFD_HUGE_32MB                               = 0x64000000\n\tMFD_HUGE_512KB                              = 0x4c000000\n\tMFD_HUGE_512MB                              = 0x74000000\n\tMFD_HUGE_64KB                               = 0x40000000\n\tMFD_HUGE_8MB                                = 0x5c000000\n\tMFD_HUGE_MASK                               = 0x3f\n\tMFD_HUGE_SHIFT                              = 0x1a\n\tMFD_NOEXEC_SEAL                             = 0x8\n\tMINIX2_SUPER_MAGIC                          = 0x2468\n\tMINIX2_SUPER_MAGIC2                         = 0x2478\n\tMINIX3_SUPER_MAGIC                          = 0x4d5a\n\tMINIX_SUPER_MAGIC                           = 0x137f\n\tMINIX_SUPER_MAGIC2                          = 0x138f\n\tMNT_DETACH                                  = 0x2\n\tMNT_EXPIRE                                  = 0x4\n\tMNT_FORCE                                   = 0x1\n\tMNT_ID_REQ_SIZE_VER0                        = 0x18\n\tMNT_ID_REQ_SIZE_VER1                        = 0x20\n\tMNT_NS_INFO_SIZE_VER0                       = 0x10\n\tMODULE_INIT_COMPRESSED_FILE                 = 0x4\n\tMODULE_INIT_IGNORE_MODVERSIONS              = 0x1\n\tMODULE_INIT_IGNORE_VERMAGIC                 = 0x2\n\tMOUNT_ATTR_IDMAP                            = 0x100000\n\tMOUNT_ATTR_NOATIME                          = 0x10\n\tMOUNT_ATTR_NODEV                            = 0x4\n\tMOUNT_ATTR_NODIRATIME                       = 0x80\n\tMOUNT_ATTR_NOEXEC                           = 0x8\n\tMOUNT_ATTR_NOSUID                           = 0x2\n\tMOUNT_ATTR_NOSYMFOLLOW                      = 0x200000\n\tMOUNT_ATTR_RDONLY                           = 0x1\n\tMOUNT_ATTR_RELATIME                         = 0x0\n\tMOUNT_ATTR_SIZE_VER0                        = 0x20\n\tMOUNT_ATTR_STRICTATIME                      = 0x20\n\tMOUNT_ATTR__ATIME                           = 0x70\n\tMREMAP_DONTUNMAP                            = 0x4\n\tMREMAP_FIXED                                = 0x2\n\tMREMAP_MAYMOVE                              = 0x1\n\tMSDOS_SUPER_MAGIC                           = 0x4d44\n\tMSG_BATCH                                   = 0x40000\n\tMSG_CMSG_CLOEXEC                            = 0x40000000\n\tMSG_CONFIRM                                 = 0x800\n\tMSG_CTRUNC                                  = 0x8\n\tMSG_DONTROUTE                               = 0x4\n\tMSG_DONTWAIT                                = 0x40\n\tMSG_EOR                                     = 0x80\n\tMSG_ERRQUEUE                                = 0x2000\n\tMSG_FASTOPEN                                = 0x20000000\n\tMSG_FIN                                     = 0x200\n\tMSG_MORE                                    = 0x8000\n\tMSG_NOSIGNAL                                = 0x4000\n\tMSG_OOB                                     = 0x1\n\tMSG_PEEK                                    = 0x2\n\tMSG_PROXY                                   = 0x10\n\tMSG_RST                                     = 0x1000\n\tMSG_SOCK_DEVMEM                             = 0x2000000\n\tMSG_SYN                                     = 0x400\n\tMSG_TRUNC                                   = 0x20\n\tMSG_TRYHARD                                 = 0x4\n\tMSG_WAITALL                                 = 0x100\n\tMSG_WAITFORONE                              = 0x10000\n\tMSG_ZEROCOPY                                = 0x4000000\n\tMS_ACTIVE                                   = 0x40000000\n\tMS_ASYNC                                    = 0x1\n\tMS_BIND                                     = 0x1000\n\tMS_BORN                                     = 0x20000000\n\tMS_DIRSYNC                                  = 0x80\n\tMS_INVALIDATE                               = 0x2\n\tMS_I_VERSION                                = 0x800000\n\tMS_KERNMOUNT                                = 0x400000\n\tMS_LAZYTIME                                 = 0x2000000\n\tMS_MANDLOCK                                 = 0x40\n\tMS_MGC_MSK                                  = 0xffff0000\n\tMS_MGC_VAL                                  = 0xc0ed0000\n\tMS_MOVE                                     = 0x2000\n\tMS_NOATIME                                  = 0x400\n\tMS_NODEV                                    = 0x4\n\tMS_NODIRATIME                               = 0x800\n\tMS_NOEXEC                                   = 0x8\n\tMS_NOREMOTELOCK                             = 0x8000000\n\tMS_NOSEC                                    = 0x10000000\n\tMS_NOSUID                                   = 0x2\n\tMS_NOSYMFOLLOW                              = 0x100\n\tMS_NOUSER                                   = -0x80000000\n\tMS_POSIXACL                                 = 0x10000\n\tMS_PRIVATE                                  = 0x40000\n\tMS_RDONLY                                   = 0x1\n\tMS_REC                                      = 0x4000\n\tMS_RELATIME                                 = 0x200000\n\tMS_REMOUNT                                  = 0x20\n\tMS_RMT_MASK                                 = 0x2800051\n\tMS_SHARED                                   = 0x100000\n\tMS_SILENT                                   = 0x8000\n\tMS_SLAVE                                    = 0x80000\n\tMS_STRICTATIME                              = 0x1000000\n\tMS_SUBMOUNT                                 = 0x4000000\n\tMS_SYNC                                     = 0x4\n\tMS_SYNCHRONOUS                              = 0x10\n\tMS_UNBINDABLE                               = 0x20000\n\tMS_VERBOSE                                  = 0x8000\n\tMTD_ABSENT                                  = 0x0\n\tMTD_BIT_WRITEABLE                           = 0x800\n\tMTD_CAP_NANDFLASH                           = 0x400\n\tMTD_CAP_NORFLASH                            = 0xc00\n\tMTD_CAP_NVRAM                               = 0x1c00\n\tMTD_CAP_RAM                                 = 0x1c00\n\tMTD_CAP_ROM                                 = 0x0\n\tMTD_DATAFLASH                               = 0x6\n\tMTD_INODE_FS_MAGIC                          = 0x11307854\n\tMTD_MAX_ECCPOS_ENTRIES                      = 0x40\n\tMTD_MAX_OOBFREE_ENTRIES                     = 0x8\n\tMTD_MLCNANDFLASH                            = 0x8\n\tMTD_NANDECC_AUTOPLACE                       = 0x2\n\tMTD_NANDECC_AUTOPL_USR                      = 0x4\n\tMTD_NANDECC_OFF                             = 0x0\n\tMTD_NANDECC_PLACE                           = 0x1\n\tMTD_NANDECC_PLACEONLY                       = 0x3\n\tMTD_NANDFLASH                               = 0x4\n\tMTD_NORFLASH                                = 0x3\n\tMTD_NO_ERASE                                = 0x1000\n\tMTD_OTP_FACTORY                             = 0x1\n\tMTD_OTP_OFF                                 = 0x0\n\tMTD_OTP_USER                                = 0x2\n\tMTD_POWERUP_LOCK                            = 0x2000\n\tMTD_RAM                                     = 0x1\n\tMTD_ROM                                     = 0x2\n\tMTD_SLC_ON_MLC_EMULATION                    = 0x4000\n\tMTD_UBIVOLUME                               = 0x7\n\tMTD_WRITEABLE                               = 0x400\n\tNAME_MAX                                    = 0xff\n\tNCP_SUPER_MAGIC                             = 0x564c\n\tNETLINK_ADD_MEMBERSHIP                      = 0x1\n\tNETLINK_AUDIT                               = 0x9\n\tNETLINK_BROADCAST_ERROR                     = 0x4\n\tNETLINK_CAP_ACK                             = 0xa\n\tNETLINK_CONNECTOR                           = 0xb\n\tNETLINK_CRYPTO                              = 0x15\n\tNETLINK_DNRTMSG                             = 0xe\n\tNETLINK_DROP_MEMBERSHIP                     = 0x2\n\tNETLINK_ECRYPTFS                            = 0x13\n\tNETLINK_EXT_ACK                             = 0xb\n\tNETLINK_FIB_LOOKUP                          = 0xa\n\tNETLINK_FIREWALL                            = 0x3\n\tNETLINK_GENERIC                             = 0x10\n\tNETLINK_GET_STRICT_CHK                      = 0xc\n\tNETLINK_INET_DIAG                           = 0x4\n\tNETLINK_IP6_FW                              = 0xd\n\tNETLINK_ISCSI                               = 0x8\n\tNETLINK_KOBJECT_UEVENT                      = 0xf\n\tNETLINK_LISTEN_ALL_NSID                     = 0x8\n\tNETLINK_LIST_MEMBERSHIPS                    = 0x9\n\tNETLINK_NETFILTER                           = 0xc\n\tNETLINK_NFLOG                               = 0x5\n\tNETLINK_NO_ENOBUFS                          = 0x5\n\tNETLINK_PKTINFO                             = 0x3\n\tNETLINK_RDMA                                = 0x14\n\tNETLINK_ROUTE                               = 0x0\n\tNETLINK_RX_RING                             = 0x6\n\tNETLINK_SCSITRANSPORT                       = 0x12\n\tNETLINK_SELINUX                             = 0x7\n\tNETLINK_SMC                                 = 0x16\n\tNETLINK_SOCK_DIAG                           = 0x4\n\tNETLINK_TX_RING                             = 0x7\n\tNETLINK_UNUSED                              = 0x1\n\tNETLINK_USERSOCK                            = 0x2\n\tNETLINK_XFRM                                = 0x6\n\tNETNSA_MAX                                  = 0x5\n\tNETNSA_NSID_NOT_ASSIGNED                    = -0x1\n\tNFC_ATR_REQ_GB_MAXSIZE                      = 0x30\n\tNFC_ATR_REQ_MAXSIZE                         = 0x40\n\tNFC_ATR_RES_GB_MAXSIZE                      = 0x2f\n\tNFC_ATR_RES_MAXSIZE                         = 0x40\n\tNFC_ATS_MAXSIZE                             = 0x14\n\tNFC_COMM_ACTIVE                             = 0x0\n\tNFC_COMM_PASSIVE                            = 0x1\n\tNFC_DEVICE_NAME_MAXSIZE                     = 0x8\n\tNFC_DIRECTION_RX                            = 0x0\n\tNFC_DIRECTION_TX                            = 0x1\n\tNFC_FIRMWARE_NAME_MAXSIZE                   = 0x20\n\tNFC_GB_MAXSIZE                              = 0x30\n\tNFC_GENL_MCAST_EVENT_NAME                   = \"events\"\n\tNFC_GENL_NAME                               = \"nfc\"\n\tNFC_GENL_VERSION                            = 0x1\n\tNFC_HEADER_SIZE                             = 0x1\n\tNFC_ISO15693_UID_MAXSIZE                    = 0x8\n\tNFC_LLCP_MAX_SERVICE_NAME                   = 0x3f\n\tNFC_LLCP_MIUX                               = 0x1\n\tNFC_LLCP_REMOTE_LTO                         = 0x3\n\tNFC_LLCP_REMOTE_MIU                         = 0x2\n\tNFC_LLCP_REMOTE_RW                          = 0x4\n\tNFC_LLCP_RW                                 = 0x0\n\tNFC_NFCID1_MAXSIZE                          = 0xa\n\tNFC_NFCID2_MAXSIZE                          = 0x8\n\tNFC_NFCID3_MAXSIZE                          = 0xa\n\tNFC_PROTO_FELICA                            = 0x3\n\tNFC_PROTO_FELICA_MASK                       = 0x8\n\tNFC_PROTO_ISO14443                          = 0x4\n\tNFC_PROTO_ISO14443_B                        = 0x6\n\tNFC_PROTO_ISO14443_B_MASK                   = 0x40\n\tNFC_PROTO_ISO14443_MASK                     = 0x10\n\tNFC_PROTO_ISO15693                          = 0x7\n\tNFC_PROTO_ISO15693_MASK                     = 0x80\n\tNFC_PROTO_JEWEL                             = 0x1\n\tNFC_PROTO_JEWEL_MASK                        = 0x2\n\tNFC_PROTO_MAX                               = 0x8\n\tNFC_PROTO_MIFARE                            = 0x2\n\tNFC_PROTO_MIFARE_MASK                       = 0x4\n\tNFC_PROTO_NFC_DEP                           = 0x5\n\tNFC_PROTO_NFC_DEP_MASK                      = 0x20\n\tNFC_RAW_HEADER_SIZE                         = 0x2\n\tNFC_RF_INITIATOR                            = 0x0\n\tNFC_RF_NONE                                 = 0x2\n\tNFC_RF_TARGET                               = 0x1\n\tNFC_SENSB_RES_MAXSIZE                       = 0xc\n\tNFC_SENSF_RES_MAXSIZE                       = 0x12\n\tNFC_SE_DISABLED                             = 0x0\n\tNFC_SE_EMBEDDED                             = 0x2\n\tNFC_SE_ENABLED                              = 0x1\n\tNFC_SE_UICC                                 = 0x1\n\tNFC_SOCKPROTO_LLCP                          = 0x1\n\tNFC_SOCKPROTO_MAX                           = 0x2\n\tNFC_SOCKPROTO_RAW                           = 0x0\n\tNFNETLINK_V0                                = 0x0\n\tNFNLGRP_ACCT_QUOTA                          = 0x8\n\tNFNLGRP_CONNTRACK_DESTROY                   = 0x3\n\tNFNLGRP_CONNTRACK_EXP_DESTROY               = 0x6\n\tNFNLGRP_CONNTRACK_EXP_NEW                   = 0x4\n\tNFNLGRP_CONNTRACK_EXP_UPDATE                = 0x5\n\tNFNLGRP_CONNTRACK_NEW                       = 0x1\n\tNFNLGRP_CONNTRACK_UPDATE                    = 0x2\n\tNFNLGRP_MAX                                 = 0x9\n\tNFNLGRP_NFTABLES                            = 0x7\n\tNFNLGRP_NFTRACE                             = 0x9\n\tNFNLGRP_NONE                                = 0x0\n\tNFNL_BATCH_MAX                              = 0x1\n\tNFNL_MSG_BATCH_BEGIN                        = 0x10\n\tNFNL_MSG_BATCH_END                          = 0x11\n\tNFNL_NFA_NEST                               = 0x8000\n\tNFNL_SUBSYS_ACCT                            = 0x7\n\tNFNL_SUBSYS_COUNT                           = 0xd\n\tNFNL_SUBSYS_CTHELPER                        = 0x9\n\tNFNL_SUBSYS_CTNETLINK                       = 0x1\n\tNFNL_SUBSYS_CTNETLINK_EXP                   = 0x2\n\tNFNL_SUBSYS_CTNETLINK_TIMEOUT               = 0x8\n\tNFNL_SUBSYS_HOOK                            = 0xc\n\tNFNL_SUBSYS_IPSET                           = 0x6\n\tNFNL_SUBSYS_NFTABLES                        = 0xa\n\tNFNL_SUBSYS_NFT_COMPAT                      = 0xb\n\tNFNL_SUBSYS_NONE                            = 0x0\n\tNFNL_SUBSYS_OSF                             = 0x5\n\tNFNL_SUBSYS_QUEUE                           = 0x3\n\tNFNL_SUBSYS_ULOG                            = 0x4\n\tNFS_SUPER_MAGIC                             = 0x6969\n\tNFT_BITWISE_BOOL                            = 0x0\n\tNFT_CHAIN_FLAGS                             = 0x7\n\tNFT_CHAIN_MAXNAMELEN                        = 0x100\n\tNFT_CT_MAX                                  = 0x17\n\tNFT_DATA_RESERVED_MASK                      = 0xffffff00\n\tNFT_DATA_VALUE_MAXLEN                       = 0x40\n\tNFT_EXTHDR_OP_MAX                           = 0x4\n\tNFT_FIB_RESULT_MAX                          = 0x3\n\tNFT_INNER_MASK                              = 0xf\n\tNFT_LOGLEVEL_MAX                            = 0x8\n\tNFT_NAME_MAXLEN                             = 0x100\n\tNFT_NG_MAX                                  = 0x1\n\tNFT_OBJECT_CONNLIMIT                        = 0x5\n\tNFT_OBJECT_COUNTER                          = 0x1\n\tNFT_OBJECT_CT_EXPECT                        = 0x9\n\tNFT_OBJECT_CT_HELPER                        = 0x3\n\tNFT_OBJECT_CT_TIMEOUT                       = 0x7\n\tNFT_OBJECT_LIMIT                            = 0x4\n\tNFT_OBJECT_MAX                              = 0xa\n\tNFT_OBJECT_QUOTA                            = 0x2\n\tNFT_OBJECT_SECMARK                          = 0x8\n\tNFT_OBJECT_SYNPROXY                         = 0xa\n\tNFT_OBJECT_TUNNEL                           = 0x6\n\tNFT_OBJECT_UNSPEC                           = 0x0\n\tNFT_OBJ_MAXNAMELEN                          = 0x100\n\tNFT_OSF_MAXGENRELEN                         = 0x10\n\tNFT_QUEUE_FLAG_BYPASS                       = 0x1\n\tNFT_QUEUE_FLAG_CPU_FANOUT                   = 0x2\n\tNFT_QUEUE_FLAG_MASK                         = 0x3\n\tNFT_REG32_COUNT                             = 0x10\n\tNFT_REG32_SIZE                              = 0x4\n\tNFT_REG_MAX                                 = 0x4\n\tNFT_REG_SIZE                                = 0x10\n\tNFT_REJECT_ICMPX_MAX                        = 0x3\n\tNFT_RT_MAX                                  = 0x4\n\tNFT_SECMARK_CTX_MAXLEN                      = 0x1000\n\tNFT_SET_MAXNAMELEN                          = 0x100\n\tNFT_SOCKET_MAX                              = 0x3\n\tNFT_TABLE_F_MASK                            = 0x7\n\tNFT_TABLE_MAXNAMELEN                        = 0x100\n\tNFT_TRACETYPE_MAX                           = 0x3\n\tNFT_TUNNEL_F_MASK                           = 0x7\n\tNFT_TUNNEL_MAX                              = 0x1\n\tNFT_TUNNEL_MODE_MAX                         = 0x2\n\tNFT_USERDATA_MAXLEN                         = 0x100\n\tNFT_XFRM_KEY_MAX                            = 0x6\n\tNF_NAT_RANGE_MAP_IPS                        = 0x1\n\tNF_NAT_RANGE_MASK                           = 0x7f\n\tNF_NAT_RANGE_NETMAP                         = 0x40\n\tNF_NAT_RANGE_PERSISTENT                     = 0x8\n\tNF_NAT_RANGE_PROTO_OFFSET                   = 0x20\n\tNF_NAT_RANGE_PROTO_RANDOM                   = 0x4\n\tNF_NAT_RANGE_PROTO_RANDOM_ALL               = 0x14\n\tNF_NAT_RANGE_PROTO_RANDOM_FULLY             = 0x10\n\tNF_NAT_RANGE_PROTO_SPECIFIED                = 0x2\n\tNILFS_SUPER_MAGIC                           = 0x3434\n\tNL0                                         = 0x0\n\tNL1                                         = 0x100\n\tNLA_ALIGNTO                                 = 0x4\n\tNLA_F_NESTED                                = 0x8000\n\tNLA_F_NET_BYTEORDER                         = 0x4000\n\tNLA_HDRLEN                                  = 0x4\n\tNLMSG_ALIGNTO                               = 0x4\n\tNLMSG_DONE                                  = 0x3\n\tNLMSG_ERROR                                 = 0x2\n\tNLMSG_HDRLEN                                = 0x10\n\tNLMSG_MIN_TYPE                              = 0x10\n\tNLMSG_NOOP                                  = 0x1\n\tNLMSG_OVERRUN                               = 0x4\n\tNLM_F_ACK                                   = 0x4\n\tNLM_F_ACK_TLVS                              = 0x200\n\tNLM_F_APPEND                                = 0x800\n\tNLM_F_ATOMIC                                = 0x400\n\tNLM_F_BULK                                  = 0x200\n\tNLM_F_CAPPED                                = 0x100\n\tNLM_F_CREATE                                = 0x400\n\tNLM_F_DUMP                                  = 0x300\n\tNLM_F_DUMP_FILTERED                         = 0x20\n\tNLM_F_DUMP_INTR                             = 0x10\n\tNLM_F_ECHO                                  = 0x8\n\tNLM_F_EXCL                                  = 0x200\n\tNLM_F_MATCH                                 = 0x200\n\tNLM_F_MULTI                                 = 0x2\n\tNLM_F_NONREC                                = 0x100\n\tNLM_F_REPLACE                               = 0x100\n\tNLM_F_REQUEST                               = 0x1\n\tNLM_F_ROOT                                  = 0x100\n\tNN_386_IOPERM                               = \"LINUX\"\n\tNN_386_TLS                                  = \"LINUX\"\n\tNN_ARC_V2                                   = \"LINUX\"\n\tNN_ARM_FPMR                                 = \"LINUX\"\n\tNN_ARM_GCS                                  = \"LINUX\"\n\tNN_ARM_HW_BREAK                             = \"LINUX\"\n\tNN_ARM_HW_WATCH                             = \"LINUX\"\n\tNN_ARM_PACA_KEYS                            = \"LINUX\"\n\tNN_ARM_PACG_KEYS                            = \"LINUX\"\n\tNN_ARM_PAC_ENABLED_KEYS                     = \"LINUX\"\n\tNN_ARM_PAC_MASK                             = \"LINUX\"\n\tNN_ARM_POE                                  = \"LINUX\"\n\tNN_ARM_SSVE                                 = \"LINUX\"\n\tNN_ARM_SVE                                  = \"LINUX\"\n\tNN_ARM_SYSTEM_CALL                          = \"LINUX\"\n\tNN_ARM_TAGGED_ADDR_CTRL                     = \"LINUX\"\n\tNN_ARM_TLS                                  = \"LINUX\"\n\tNN_ARM_VFP                                  = \"LINUX\"\n\tNN_ARM_ZA                                   = \"LINUX\"\n\tNN_ARM_ZT                                   = \"LINUX\"\n\tNN_AUXV                                     = \"CORE\"\n\tNN_FILE                                     = \"CORE\"\n\tNN_GNU_PROPERTY_TYPE_0                      = \"GNU\"\n\tNN_LOONGARCH_CPUCFG                         = \"LINUX\"\n\tNN_LOONGARCH_CSR                            = \"LINUX\"\n\tNN_LOONGARCH_HW_BREAK                       = \"LINUX\"\n\tNN_LOONGARCH_HW_WATCH                       = \"LINUX\"\n\tNN_LOONGARCH_LASX                           = \"LINUX\"\n\tNN_LOONGARCH_LBT                            = \"LINUX\"\n\tNN_LOONGARCH_LSX                            = \"LINUX\"\n\tNN_MIPS_DSP                                 = \"LINUX\"\n\tNN_MIPS_FP_MODE                             = \"LINUX\"\n\tNN_MIPS_MSA                                 = \"LINUX\"\n\tNN_PPC_DEXCR                                = \"LINUX\"\n\tNN_PPC_DSCR                                 = \"LINUX\"\n\tNN_PPC_EBB                                  = \"LINUX\"\n\tNN_PPC_HASHKEYR                             = \"LINUX\"\n\tNN_PPC_PKEY                                 = \"LINUX\"\n\tNN_PPC_PMU                                  = \"LINUX\"\n\tNN_PPC_PPR                                  = \"LINUX\"\n\tNN_PPC_SPE                                  = \"LINUX\"\n\tNN_PPC_TAR                                  = \"LINUX\"\n\tNN_PPC_TM_CDSCR                             = \"LINUX\"\n\tNN_PPC_TM_CFPR                              = \"LINUX\"\n\tNN_PPC_TM_CGPR                              = \"LINUX\"\n\tNN_PPC_TM_CPPR                              = \"LINUX\"\n\tNN_PPC_TM_CTAR                              = \"LINUX\"\n\tNN_PPC_TM_CVMX                              = \"LINUX\"\n\tNN_PPC_TM_CVSX                              = \"LINUX\"\n\tNN_PPC_TM_SPR                               = \"LINUX\"\n\tNN_PPC_VMX                                  = \"LINUX\"\n\tNN_PPC_VSX                                  = \"LINUX\"\n\tNN_PRFPREG                                  = \"CORE\"\n\tNN_PRPSINFO                                 = \"CORE\"\n\tNN_PRSTATUS                                 = \"CORE\"\n\tNN_PRXFPREG                                 = \"LINUX\"\n\tNN_RISCV_CSR                                = \"LINUX\"\n\tNN_RISCV_TAGGED_ADDR_CTRL                   = \"LINUX\"\n\tNN_RISCV_VECTOR                             = \"LINUX\"\n\tNN_S390_CTRS                                = \"LINUX\"\n\tNN_S390_GS_BC                               = \"LINUX\"\n\tNN_S390_GS_CB                               = \"LINUX\"\n\tNN_S390_HIGH_GPRS                           = \"LINUX\"\n\tNN_S390_LAST_BREAK                          = \"LINUX\"\n\tNN_S390_PREFIX                              = \"LINUX\"\n\tNN_S390_PV_CPU_DATA                         = \"LINUX\"\n\tNN_S390_RI_CB                               = \"LINUX\"\n\tNN_S390_SYSTEM_CALL                         = \"LINUX\"\n\tNN_S390_TDB                                 = \"LINUX\"\n\tNN_S390_TIMER                               = \"LINUX\"\n\tNN_S390_TODCMP                              = \"LINUX\"\n\tNN_S390_TODPREG                             = \"LINUX\"\n\tNN_S390_VXRS_HIGH                           = \"LINUX\"\n\tNN_S390_VXRS_LOW                            = \"LINUX\"\n\tNN_SIGINFO                                  = \"CORE\"\n\tNN_TASKSTRUCT                               = \"CORE\"\n\tNN_VMCOREDD                                 = \"LINUX\"\n\tNN_X86_SHSTK                                = \"LINUX\"\n\tNN_X86_XSAVE_LAYOUT                         = \"LINUX\"\n\tNN_X86_XSTATE                               = \"LINUX\"\n\tNSFS_MAGIC                                  = 0x6e736673\n\tNT_386_IOPERM                               = 0x201\n\tNT_386_TLS                                  = 0x200\n\tNT_ARC_V2                                   = 0x600\n\tNT_ARM_FPMR                                 = 0x40e\n\tNT_ARM_GCS                                  = 0x410\n\tNT_ARM_HW_BREAK                             = 0x402\n\tNT_ARM_HW_WATCH                             = 0x403\n\tNT_ARM_PACA_KEYS                            = 0x407\n\tNT_ARM_PACG_KEYS                            = 0x408\n\tNT_ARM_PAC_ENABLED_KEYS                     = 0x40a\n\tNT_ARM_PAC_MASK                             = 0x406\n\tNT_ARM_POE                                  = 0x40f\n\tNT_ARM_SSVE                                 = 0x40b\n\tNT_ARM_SVE                                  = 0x405\n\tNT_ARM_SYSTEM_CALL                          = 0x404\n\tNT_ARM_TAGGED_ADDR_CTRL                     = 0x409\n\tNT_ARM_TLS                                  = 0x401\n\tNT_ARM_VFP                                  = 0x400\n\tNT_ARM_ZA                                   = 0x40c\n\tNT_ARM_ZT                                   = 0x40d\n\tNT_AUXV                                     = 0x6\n\tNT_FILE                                     = 0x46494c45\n\tNT_GNU_PROPERTY_TYPE_0                      = 0x5\n\tNT_LOONGARCH_CPUCFG                         = 0xa00\n\tNT_LOONGARCH_CSR                            = 0xa01\n\tNT_LOONGARCH_HW_BREAK                       = 0xa05\n\tNT_LOONGARCH_HW_WATCH                       = 0xa06\n\tNT_LOONGARCH_LASX                           = 0xa03\n\tNT_LOONGARCH_LBT                            = 0xa04\n\tNT_LOONGARCH_LSX                            = 0xa02\n\tNT_MIPS_DSP                                 = 0x800\n\tNT_MIPS_FP_MODE                             = 0x801\n\tNT_MIPS_MSA                                 = 0x802\n\tNT_PPC_DEXCR                                = 0x111\n\tNT_PPC_DSCR                                 = 0x105\n\tNT_PPC_EBB                                  = 0x106\n\tNT_PPC_HASHKEYR                             = 0x112\n\tNT_PPC_PKEY                                 = 0x110\n\tNT_PPC_PMU                                  = 0x107\n\tNT_PPC_PPR                                  = 0x104\n\tNT_PPC_SPE                                  = 0x101\n\tNT_PPC_TAR                                  = 0x103\n\tNT_PPC_TM_CDSCR                             = 0x10f\n\tNT_PPC_TM_CFPR                              = 0x109\n\tNT_PPC_TM_CGPR                              = 0x108\n\tNT_PPC_TM_CPPR                              = 0x10e\n\tNT_PPC_TM_CTAR                              = 0x10d\n\tNT_PPC_TM_CVMX                              = 0x10a\n\tNT_PPC_TM_CVSX                              = 0x10b\n\tNT_PPC_TM_SPR                               = 0x10c\n\tNT_PPC_VMX                                  = 0x100\n\tNT_PPC_VSX                                  = 0x102\n\tNT_PRFPREG                                  = 0x2\n\tNT_PRPSINFO                                 = 0x3\n\tNT_PRSTATUS                                 = 0x1\n\tNT_PRXFPREG                                 = 0x46e62b7f\n\tNT_RISCV_CSR                                = 0x900\n\tNT_RISCV_TAGGED_ADDR_CTRL                   = 0x902\n\tNT_RISCV_VECTOR                             = 0x901\n\tNT_S390_CTRS                                = 0x304\n\tNT_S390_GS_BC                               = 0x30c\n\tNT_S390_GS_CB                               = 0x30b\n\tNT_S390_HIGH_GPRS                           = 0x300\n\tNT_S390_LAST_BREAK                          = 0x306\n\tNT_S390_PREFIX                              = 0x305\n\tNT_S390_PV_CPU_DATA                         = 0x30e\n\tNT_S390_RI_CB                               = 0x30d\n\tNT_S390_SYSTEM_CALL                         = 0x307\n\tNT_S390_TDB                                 = 0x308\n\tNT_S390_TIMER                               = 0x301\n\tNT_S390_TODCMP                              = 0x302\n\tNT_S390_TODPREG                             = 0x303\n\tNT_S390_VXRS_HIGH                           = 0x30a\n\tNT_S390_VXRS_LOW                            = 0x309\n\tNT_SIGINFO                                  = 0x53494749\n\tNT_TASKSTRUCT                               = 0x4\n\tNT_VMCOREDD                                 = 0x700\n\tNT_X86_SHSTK                                = 0x204\n\tNT_X86_XSAVE_LAYOUT                         = 0x205\n\tNT_X86_XSTATE                               = 0x202\n\tOCFS2_SUPER_MAGIC                           = 0x7461636f\n\tOCRNL                                       = 0x8\n\tOFDEL                                       = 0x80\n\tOFILL                                       = 0x40\n\tONLRET                                      = 0x20\n\tONOCR                                       = 0x10\n\tOPENPROM_SUPER_MAGIC                        = 0x9fa1\n\tOPOST                                       = 0x1\n\tOVERLAYFS_SUPER_MAGIC                       = 0x794c7630\n\tO_ACCMODE                                   = 0x3\n\tO_RDONLY                                    = 0x0\n\tO_RDWR                                      = 0x2\n\tO_WRONLY                                    = 0x1\n\tPACKET_ADD_MEMBERSHIP                       = 0x1\n\tPACKET_AUXDATA                              = 0x8\n\tPACKET_BROADCAST                            = 0x1\n\tPACKET_COPY_THRESH                          = 0x7\n\tPACKET_DROP_MEMBERSHIP                      = 0x2\n\tPACKET_FANOUT                               = 0x12\n\tPACKET_FANOUT_CBPF                          = 0x6\n\tPACKET_FANOUT_CPU                           = 0x2\n\tPACKET_FANOUT_DATA                          = 0x16\n\tPACKET_FANOUT_EBPF                          = 0x7\n\tPACKET_FANOUT_FLAG_DEFRAG                   = 0x8000\n\tPACKET_FANOUT_FLAG_IGNORE_OUTGOING          = 0x4000\n\tPACKET_FANOUT_FLAG_ROLLOVER                 = 0x1000\n\tPACKET_FANOUT_FLAG_UNIQUEID                 = 0x2000\n\tPACKET_FANOUT_HASH                          = 0x0\n\tPACKET_FANOUT_LB                            = 0x1\n\tPACKET_FANOUT_QM                            = 0x5\n\tPACKET_FANOUT_RND                           = 0x4\n\tPACKET_FANOUT_ROLLOVER                      = 0x3\n\tPACKET_FASTROUTE                            = 0x6\n\tPACKET_HDRLEN                               = 0xb\n\tPACKET_HOST                                 = 0x0\n\tPACKET_IGNORE_OUTGOING                      = 0x17\n\tPACKET_KERNEL                               = 0x7\n\tPACKET_LOOPBACK                             = 0x5\n\tPACKET_LOSS                                 = 0xe\n\tPACKET_MR_ALLMULTI                          = 0x2\n\tPACKET_MR_MULTICAST                         = 0x0\n\tPACKET_MR_PROMISC                           = 0x1\n\tPACKET_MR_UNICAST                           = 0x3\n\tPACKET_MULTICAST                            = 0x2\n\tPACKET_ORIGDEV                              = 0x9\n\tPACKET_OTHERHOST                            = 0x3\n\tPACKET_OUTGOING                             = 0x4\n\tPACKET_QDISC_BYPASS                         = 0x14\n\tPACKET_RECV_OUTPUT                          = 0x3\n\tPACKET_RESERVE                              = 0xc\n\tPACKET_ROLLOVER_STATS                       = 0x15\n\tPACKET_RX_RING                              = 0x5\n\tPACKET_STATISTICS                           = 0x6\n\tPACKET_TIMESTAMP                            = 0x11\n\tPACKET_TX_HAS_OFF                           = 0x13\n\tPACKET_TX_RING                              = 0xd\n\tPACKET_TX_TIMESTAMP                         = 0x10\n\tPACKET_USER                                 = 0x6\n\tPACKET_VERSION                              = 0xa\n\tPACKET_VNET_HDR                             = 0xf\n\tPACKET_VNET_HDR_SZ                          = 0x18\n\tPARITY_CRC16_PR0                            = 0x2\n\tPARITY_CRC16_PR0_CCITT                      = 0x4\n\tPARITY_CRC16_PR1                            = 0x3\n\tPARITY_CRC16_PR1_CCITT                      = 0x5\n\tPARITY_CRC32_PR0_CCITT                      = 0x6\n\tPARITY_CRC32_PR1_CCITT                      = 0x7\n\tPARITY_DEFAULT                              = 0x0\n\tPARITY_NONE                                 = 0x1\n\tPARMRK                                      = 0x8\n\tPERF_ATTR_SIZE_VER0                         = 0x40\n\tPERF_ATTR_SIZE_VER1                         = 0x48\n\tPERF_ATTR_SIZE_VER2                         = 0x50\n\tPERF_ATTR_SIZE_VER3                         = 0x60\n\tPERF_ATTR_SIZE_VER4                         = 0x68\n\tPERF_ATTR_SIZE_VER5                         = 0x70\n\tPERF_ATTR_SIZE_VER6                         = 0x78\n\tPERF_ATTR_SIZE_VER7                         = 0x80\n\tPERF_ATTR_SIZE_VER8                         = 0x88\n\tPERF_AUX_FLAG_COLLISION                     = 0x8\n\tPERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT    = 0x0\n\tPERF_AUX_FLAG_CORESIGHT_FORMAT_RAW          = 0x100\n\tPERF_AUX_FLAG_OVERWRITE                     = 0x2\n\tPERF_AUX_FLAG_PARTIAL                       = 0x4\n\tPERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK          = 0xff00\n\tPERF_AUX_FLAG_TRUNCATED                     = 0x1\n\tPERF_BRANCH_ENTRY_INFO_BITS_MAX             = 0x21\n\tPERF_BR_ARM64_DEBUG_DATA                    = 0x7\n\tPERF_BR_ARM64_DEBUG_EXIT                    = 0x5\n\tPERF_BR_ARM64_DEBUG_HALT                    = 0x4\n\tPERF_BR_ARM64_DEBUG_INST                    = 0x6\n\tPERF_BR_ARM64_FIQ                           = 0x3\n\tPERF_FLAG_FD_CLOEXEC                        = 0x8\n\tPERF_FLAG_FD_NO_GROUP                       = 0x1\n\tPERF_FLAG_FD_OUTPUT                         = 0x2\n\tPERF_FLAG_PID_CGROUP                        = 0x4\n\tPERF_HW_EVENT_MASK                          = 0xffffffff\n\tPERF_MAX_CONTEXTS_PER_STACK                 = 0x8\n\tPERF_MAX_STACK_DEPTH                        = 0x7f\n\tPERF_MEM_BLK_ADDR                           = 0x4\n\tPERF_MEM_BLK_DATA                           = 0x2\n\tPERF_MEM_BLK_NA                             = 0x1\n\tPERF_MEM_BLK_SHIFT                          = 0x28\n\tPERF_MEM_HOPS_0                             = 0x1\n\tPERF_MEM_HOPS_1                             = 0x2\n\tPERF_MEM_HOPS_2                             = 0x3\n\tPERF_MEM_HOPS_3                             = 0x4\n\tPERF_MEM_HOPS_SHIFT                         = 0x2b\n\tPERF_MEM_LOCK_LOCKED                        = 0x2\n\tPERF_MEM_LOCK_NA                            = 0x1\n\tPERF_MEM_LOCK_SHIFT                         = 0x18\n\tPERF_MEM_LVLNUM_ANY_CACHE                   = 0xb\n\tPERF_MEM_LVLNUM_CXL                         = 0x9\n\tPERF_MEM_LVLNUM_IO                          = 0xa\n\tPERF_MEM_LVLNUM_L1                          = 0x1\n\tPERF_MEM_LVLNUM_L2                          = 0x2\n\tPERF_MEM_LVLNUM_L2_MHB                      = 0x5\n\tPERF_MEM_LVLNUM_L3                          = 0x3\n\tPERF_MEM_LVLNUM_L4                          = 0x4\n\tPERF_MEM_LVLNUM_LFB                         = 0xc\n\tPERF_MEM_LVLNUM_MSC                         = 0x6\n\tPERF_MEM_LVLNUM_NA                          = 0xf\n\tPERF_MEM_LVLNUM_PMEM                        = 0xe\n\tPERF_MEM_LVLNUM_RAM                         = 0xd\n\tPERF_MEM_LVLNUM_SHIFT                       = 0x21\n\tPERF_MEM_LVLNUM_UNC                         = 0x8\n\tPERF_MEM_LVL_HIT                            = 0x2\n\tPERF_MEM_LVL_IO                             = 0x1000\n\tPERF_MEM_LVL_L1                             = 0x8\n\tPERF_MEM_LVL_L2                             = 0x20\n\tPERF_MEM_LVL_L3                             = 0x40\n\tPERF_MEM_LVL_LFB                            = 0x10\n\tPERF_MEM_LVL_LOC_RAM                        = 0x80\n\tPERF_MEM_LVL_MISS                           = 0x4\n\tPERF_MEM_LVL_NA                             = 0x1\n\tPERF_MEM_LVL_REM_CCE1                       = 0x400\n\tPERF_MEM_LVL_REM_CCE2                       = 0x800\n\tPERF_MEM_LVL_REM_RAM1                       = 0x100\n\tPERF_MEM_LVL_REM_RAM2                       = 0x200\n\tPERF_MEM_LVL_SHIFT                          = 0x5\n\tPERF_MEM_LVL_UNC                            = 0x2000\n\tPERF_MEM_OP_EXEC                            = 0x10\n\tPERF_MEM_OP_LOAD                            = 0x2\n\tPERF_MEM_OP_NA                              = 0x1\n\tPERF_MEM_OP_PFETCH                          = 0x8\n\tPERF_MEM_OP_SHIFT                           = 0x0\n\tPERF_MEM_OP_STORE                           = 0x4\n\tPERF_MEM_REMOTE_REMOTE                      = 0x1\n\tPERF_MEM_REMOTE_SHIFT                       = 0x25\n\tPERF_MEM_SNOOPX_FWD                         = 0x1\n\tPERF_MEM_SNOOPX_PEER                        = 0x2\n\tPERF_MEM_SNOOPX_SHIFT                       = 0x26\n\tPERF_MEM_SNOOP_HIT                          = 0x4\n\tPERF_MEM_SNOOP_HITM                         = 0x10\n\tPERF_MEM_SNOOP_MISS                         = 0x8\n\tPERF_MEM_SNOOP_NA                           = 0x1\n\tPERF_MEM_SNOOP_NONE                         = 0x2\n\tPERF_MEM_SNOOP_SHIFT                        = 0x13\n\tPERF_MEM_TLB_HIT                            = 0x2\n\tPERF_MEM_TLB_L1                             = 0x8\n\tPERF_MEM_TLB_L2                             = 0x10\n\tPERF_MEM_TLB_MISS                           = 0x4\n\tPERF_MEM_TLB_NA                             = 0x1\n\tPERF_MEM_TLB_OS                             = 0x40\n\tPERF_MEM_TLB_SHIFT                          = 0x1a\n\tPERF_MEM_TLB_WK                             = 0x20\n\tPERF_PMU_TYPE_SHIFT                         = 0x20\n\tPERF_RECORD_KSYMBOL_FLAGS_UNREGISTER        = 0x1\n\tPERF_RECORD_MISC_COMM_EXEC                  = 0x2000\n\tPERF_RECORD_MISC_CPUMODE_MASK               = 0x7\n\tPERF_RECORD_MISC_CPUMODE_UNKNOWN            = 0x0\n\tPERF_RECORD_MISC_EXACT_IP                   = 0x4000\n\tPERF_RECORD_MISC_EXT_RESERVED               = 0x8000\n\tPERF_RECORD_MISC_FORK_EXEC                  = 0x2000\n\tPERF_RECORD_MISC_GUEST_KERNEL               = 0x4\n\tPERF_RECORD_MISC_GUEST_USER                 = 0x5\n\tPERF_RECORD_MISC_HYPERVISOR                 = 0x3\n\tPERF_RECORD_MISC_KERNEL                     = 0x1\n\tPERF_RECORD_MISC_MMAP_BUILD_ID              = 0x4000\n\tPERF_RECORD_MISC_MMAP_DATA                  = 0x2000\n\tPERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT     = 0x1000\n\tPERF_RECORD_MISC_SWITCH_OUT                 = 0x2000\n\tPERF_RECORD_MISC_SWITCH_OUT_PREEMPT         = 0x4000\n\tPERF_RECORD_MISC_USER                       = 0x2\n\tPERF_SAMPLE_BRANCH_PLM_ALL                  = 0x7\n\tPERF_SAMPLE_WEIGHT_TYPE                     = 0x1004000\n\tPF_ALG                                      = 0x26\n\tPF_APPLETALK                                = 0x5\n\tPF_ASH                                      = 0x12\n\tPF_ATMPVC                                   = 0x8\n\tPF_ATMSVC                                   = 0x14\n\tPF_AX25                                     = 0x3\n\tPF_BLUETOOTH                                = 0x1f\n\tPF_BRIDGE                                   = 0x7\n\tPF_CAIF                                     = 0x25\n\tPF_CAN                                      = 0x1d\n\tPF_DECnet                                   = 0xc\n\tPF_ECONET                                   = 0x13\n\tPF_FILE                                     = 0x1\n\tPF_IB                                       = 0x1b\n\tPF_IEEE802154                               = 0x24\n\tPF_INET                                     = 0x2\n\tPF_INET6                                    = 0xa\n\tPF_IPX                                      = 0x4\n\tPF_IRDA                                     = 0x17\n\tPF_ISDN                                     = 0x22\n\tPF_IUCV                                     = 0x20\n\tPF_KCM                                      = 0x29\n\tPF_KEY                                      = 0xf\n\tPF_LLC                                      = 0x1a\n\tPF_LOCAL                                    = 0x1\n\tPF_MAX                                      = 0x2e\n\tPF_MCTP                                     = 0x2d\n\tPF_MPLS                                     = 0x1c\n\tPF_NETBEUI                                  = 0xd\n\tPF_NETLINK                                  = 0x10\n\tPF_NETROM                                   = 0x6\n\tPF_NFC                                      = 0x27\n\tPF_PACKET                                   = 0x11\n\tPF_PHONET                                   = 0x23\n\tPF_PPPOX                                    = 0x18\n\tPF_QIPCRTR                                  = 0x2a\n\tPF_R                                        = 0x4\n\tPF_RDS                                      = 0x15\n\tPF_ROSE                                     = 0xb\n\tPF_ROUTE                                    = 0x10\n\tPF_RXRPC                                    = 0x21\n\tPF_SECURITY                                 = 0xe\n\tPF_SMC                                      = 0x2b\n\tPF_SNA                                      = 0x16\n\tPF_TIPC                                     = 0x1e\n\tPF_UNIX                                     = 0x1\n\tPF_UNSPEC                                   = 0x0\n\tPF_VSOCK                                    = 0x28\n\tPF_W                                        = 0x2\n\tPF_WANPIPE                                  = 0x19\n\tPF_X                                        = 0x1\n\tPF_X25                                      = 0x9\n\tPF_XDP                                      = 0x2c\n\tPID_FS_MAGIC                                = 0x50494446\n\tPIPEFS_MAGIC                                = 0x50495045\n\tPPPIOCGNPMODE                               = 0xc008744c\n\tPPPIOCNEWUNIT                               = 0xc004743e\n\tPRIO_PGRP                                   = 0x1\n\tPRIO_PROCESS                                = 0x0\n\tPRIO_USER                                   = 0x2\n\tPROCFS_IOCTL_MAGIC                          = 'f'\n\tPROC_SUPER_MAGIC                            = 0x9fa0\n\tPROT_EXEC                                   = 0x4\n\tPROT_GROWSDOWN                              = 0x1000000\n\tPROT_GROWSUP                                = 0x2000000\n\tPROT_NONE                                   = 0x0\n\tPROT_READ                                   = 0x1\n\tPROT_WRITE                                  = 0x2\n\tPR_CAPBSET_DROP                             = 0x18\n\tPR_CAPBSET_READ                             = 0x17\n\tPR_CAP_AMBIENT                              = 0x2f\n\tPR_CAP_AMBIENT_CLEAR_ALL                    = 0x4\n\tPR_CAP_AMBIENT_IS_SET                       = 0x1\n\tPR_CAP_AMBIENT_LOWER                        = 0x3\n\tPR_CAP_AMBIENT_RAISE                        = 0x2\n\tPR_ENDIAN_BIG                               = 0x0\n\tPR_ENDIAN_LITTLE                            = 0x1\n\tPR_ENDIAN_PPC_LITTLE                        = 0x2\n\tPR_FPEMU_NOPRINT                            = 0x1\n\tPR_FPEMU_SIGFPE                             = 0x2\n\tPR_FP_EXC_ASYNC                             = 0x2\n\tPR_FP_EXC_DISABLED                          = 0x0\n\tPR_FP_EXC_DIV                               = 0x10000\n\tPR_FP_EXC_INV                               = 0x100000\n\tPR_FP_EXC_NONRECOV                          = 0x1\n\tPR_FP_EXC_OVF                               = 0x20000\n\tPR_FP_EXC_PRECISE                           = 0x3\n\tPR_FP_EXC_RES                               = 0x80000\n\tPR_FP_EXC_SW_ENABLE                         = 0x80\n\tPR_FP_EXC_UND                               = 0x40000\n\tPR_FP_MODE_FR                               = 0x1\n\tPR_FP_MODE_FRE                              = 0x2\n\tPR_FUTEX_HASH                               = 0x4e\n\tPR_FUTEX_HASH_GET_IMMUTABLE                 = 0x3\n\tPR_FUTEX_HASH_GET_SLOTS                     = 0x2\n\tPR_FUTEX_HASH_SET_SLOTS                     = 0x1\n\tPR_GET_AUXV                                 = 0x41555856\n\tPR_GET_CHILD_SUBREAPER                      = 0x25\n\tPR_GET_DUMPABLE                             = 0x3\n\tPR_GET_ENDIAN                               = 0x13\n\tPR_GET_FPEMU                                = 0x9\n\tPR_GET_FPEXC                                = 0xb\n\tPR_GET_FP_MODE                              = 0x2e\n\tPR_GET_IO_FLUSHER                           = 0x3a\n\tPR_GET_KEEPCAPS                             = 0x7\n\tPR_GET_MDWE                                 = 0x42\n\tPR_GET_MEMORY_MERGE                         = 0x44\n\tPR_GET_NAME                                 = 0x10\n\tPR_GET_NO_NEW_PRIVS                         = 0x27\n\tPR_GET_PDEATHSIG                            = 0x2\n\tPR_GET_SECCOMP                              = 0x15\n\tPR_GET_SECUREBITS                           = 0x1b\n\tPR_GET_SHADOW_STACK_STATUS                  = 0x4a\n\tPR_GET_SPECULATION_CTRL                     = 0x34\n\tPR_GET_TAGGED_ADDR_CTRL                     = 0x38\n\tPR_GET_THP_DISABLE                          = 0x2a\n\tPR_GET_TID_ADDRESS                          = 0x28\n\tPR_GET_TIMERSLACK                           = 0x1e\n\tPR_GET_TIMING                               = 0xd\n\tPR_GET_TSC                                  = 0x19\n\tPR_GET_UNALIGN                              = 0x5\n\tPR_LOCK_SHADOW_STACK_STATUS                 = 0x4c\n\tPR_MCE_KILL                                 = 0x21\n\tPR_MCE_KILL_CLEAR                           = 0x0\n\tPR_MCE_KILL_DEFAULT                         = 0x2\n\tPR_MCE_KILL_EARLY                           = 0x1\n\tPR_MCE_KILL_GET                             = 0x22\n\tPR_MCE_KILL_LATE                            = 0x0\n\tPR_MCE_KILL_SET                             = 0x1\n\tPR_MDWE_NO_INHERIT                          = 0x2\n\tPR_MDWE_REFUSE_EXEC_GAIN                    = 0x1\n\tPR_MPX_DISABLE_MANAGEMENT                   = 0x2c\n\tPR_MPX_ENABLE_MANAGEMENT                    = 0x2b\n\tPR_MTE_TAG_MASK                             = 0x7fff8\n\tPR_MTE_TAG_SHIFT                            = 0x3\n\tPR_MTE_TCF_ASYNC                            = 0x4\n\tPR_MTE_TCF_MASK                             = 0x6\n\tPR_MTE_TCF_NONE                             = 0x0\n\tPR_MTE_TCF_SHIFT                            = 0x1\n\tPR_MTE_TCF_SYNC                             = 0x2\n\tPR_PAC_APDAKEY                              = 0x4\n\tPR_PAC_APDBKEY                              = 0x8\n\tPR_PAC_APGAKEY                              = 0x10\n\tPR_PAC_APIAKEY                              = 0x1\n\tPR_PAC_APIBKEY                              = 0x2\n\tPR_PAC_GET_ENABLED_KEYS                     = 0x3d\n\tPR_PAC_RESET_KEYS                           = 0x36\n\tPR_PAC_SET_ENABLED_KEYS                     = 0x3c\n\tPR_PMLEN_MASK                               = 0x7f000000\n\tPR_PMLEN_SHIFT                              = 0x18\n\tPR_PPC_DEXCR_CTRL_CLEAR                     = 0x4\n\tPR_PPC_DEXCR_CTRL_CLEAR_ONEXEC              = 0x10\n\tPR_PPC_DEXCR_CTRL_EDITABLE                  = 0x1\n\tPR_PPC_DEXCR_CTRL_MASK                      = 0x1f\n\tPR_PPC_DEXCR_CTRL_SET                       = 0x2\n\tPR_PPC_DEXCR_CTRL_SET_ONEXEC                = 0x8\n\tPR_PPC_DEXCR_IBRTPD                         = 0x1\n\tPR_PPC_DEXCR_NPHIE                          = 0x3\n\tPR_PPC_DEXCR_SBHE                           = 0x0\n\tPR_PPC_DEXCR_SRAPD                          = 0x2\n\tPR_PPC_GET_DEXCR                            = 0x48\n\tPR_PPC_SET_DEXCR                            = 0x49\n\tPR_RISCV_CTX_SW_FENCEI_OFF                  = 0x1\n\tPR_RISCV_CTX_SW_FENCEI_ON                   = 0x0\n\tPR_RISCV_SCOPE_PER_PROCESS                  = 0x0\n\tPR_RISCV_SCOPE_PER_THREAD                   = 0x1\n\tPR_RISCV_SET_ICACHE_FLUSH_CTX               = 0x47\n\tPR_RISCV_V_GET_CONTROL                      = 0x46\n\tPR_RISCV_V_SET_CONTROL                      = 0x45\n\tPR_RISCV_V_VSTATE_CTRL_CUR_MASK             = 0x3\n\tPR_RISCV_V_VSTATE_CTRL_DEFAULT              = 0x0\n\tPR_RISCV_V_VSTATE_CTRL_INHERIT              = 0x10\n\tPR_RISCV_V_VSTATE_CTRL_MASK                 = 0x1f\n\tPR_RISCV_V_VSTATE_CTRL_NEXT_MASK            = 0xc\n\tPR_RISCV_V_VSTATE_CTRL_OFF                  = 0x1\n\tPR_RISCV_V_VSTATE_CTRL_ON                   = 0x2\n\tPR_SCHED_CORE                               = 0x3e\n\tPR_SCHED_CORE_CREATE                        = 0x1\n\tPR_SCHED_CORE_GET                           = 0x0\n\tPR_SCHED_CORE_MAX                           = 0x4\n\tPR_SCHED_CORE_SCOPE_PROCESS_GROUP           = 0x2\n\tPR_SCHED_CORE_SCOPE_THREAD                  = 0x0\n\tPR_SCHED_CORE_SCOPE_THREAD_GROUP            = 0x1\n\tPR_SCHED_CORE_SHARE_FROM                    = 0x3\n\tPR_SCHED_CORE_SHARE_TO                      = 0x2\n\tPR_SET_CHILD_SUBREAPER                      = 0x24\n\tPR_SET_DUMPABLE                             = 0x4\n\tPR_SET_ENDIAN                               = 0x14\n\tPR_SET_FPEMU                                = 0xa\n\tPR_SET_FPEXC                                = 0xc\n\tPR_SET_FP_MODE                              = 0x2d\n\tPR_SET_IO_FLUSHER                           = 0x39\n\tPR_SET_KEEPCAPS                             = 0x8\n\tPR_SET_MDWE                                 = 0x41\n\tPR_SET_MEMORY_MERGE                         = 0x43\n\tPR_SET_MM                                   = 0x23\n\tPR_SET_MM_ARG_END                           = 0x9\n\tPR_SET_MM_ARG_START                         = 0x8\n\tPR_SET_MM_AUXV                              = 0xc\n\tPR_SET_MM_BRK                               = 0x7\n\tPR_SET_MM_END_CODE                          = 0x2\n\tPR_SET_MM_END_DATA                          = 0x4\n\tPR_SET_MM_ENV_END                           = 0xb\n\tPR_SET_MM_ENV_START                         = 0xa\n\tPR_SET_MM_EXE_FILE                          = 0xd\n\tPR_SET_MM_MAP                               = 0xe\n\tPR_SET_MM_MAP_SIZE                          = 0xf\n\tPR_SET_MM_START_BRK                         = 0x6\n\tPR_SET_MM_START_CODE                        = 0x1\n\tPR_SET_MM_START_DATA                        = 0x3\n\tPR_SET_MM_START_STACK                       = 0x5\n\tPR_SET_NAME                                 = 0xf\n\tPR_SET_NO_NEW_PRIVS                         = 0x26\n\tPR_SET_PDEATHSIG                            = 0x1\n\tPR_SET_PTRACER                              = 0x59616d61\n\tPR_SET_SECCOMP                              = 0x16\n\tPR_SET_SECUREBITS                           = 0x1c\n\tPR_SET_SHADOW_STACK_STATUS                  = 0x4b\n\tPR_SET_SPECULATION_CTRL                     = 0x35\n\tPR_SET_SYSCALL_USER_DISPATCH                = 0x3b\n\tPR_SET_TAGGED_ADDR_CTRL                     = 0x37\n\tPR_SET_THP_DISABLE                          = 0x29\n\tPR_SET_TIMERSLACK                           = 0x1d\n\tPR_SET_TIMING                               = 0xe\n\tPR_SET_TSC                                  = 0x1a\n\tPR_SET_UNALIGN                              = 0x6\n\tPR_SET_VMA                                  = 0x53564d41\n\tPR_SET_VMA_ANON_NAME                        = 0x0\n\tPR_SHADOW_STACK_ENABLE                      = 0x1\n\tPR_SHADOW_STACK_PUSH                        = 0x4\n\tPR_SHADOW_STACK_WRITE                       = 0x2\n\tPR_SME_GET_VL                               = 0x40\n\tPR_SME_SET_VL                               = 0x3f\n\tPR_SME_SET_VL_ONEXEC                        = 0x40000\n\tPR_SME_VL_INHERIT                           = 0x20000\n\tPR_SME_VL_LEN_MASK                          = 0xffff\n\tPR_SPEC_DISABLE                             = 0x4\n\tPR_SPEC_DISABLE_NOEXEC                      = 0x10\n\tPR_SPEC_ENABLE                              = 0x2\n\tPR_SPEC_FORCE_DISABLE                       = 0x8\n\tPR_SPEC_INDIRECT_BRANCH                     = 0x1\n\tPR_SPEC_L1D_FLUSH                           = 0x2\n\tPR_SPEC_NOT_AFFECTED                        = 0x0\n\tPR_SPEC_PRCTL                               = 0x1\n\tPR_SPEC_STORE_BYPASS                        = 0x0\n\tPR_SVE_GET_VL                               = 0x33\n\tPR_SVE_SET_VL                               = 0x32\n\tPR_SVE_SET_VL_ONEXEC                        = 0x40000\n\tPR_SVE_VL_INHERIT                           = 0x20000\n\tPR_SVE_VL_LEN_MASK                          = 0xffff\n\tPR_SYS_DISPATCH_OFF                         = 0x0\n\tPR_SYS_DISPATCH_ON                          = 0x1\n\tPR_TAGGED_ADDR_ENABLE                       = 0x1\n\tPR_TASK_PERF_EVENTS_DISABLE                 = 0x1f\n\tPR_TASK_PERF_EVENTS_ENABLE                  = 0x20\n\tPR_TIMER_CREATE_RESTORE_IDS                 = 0x4d\n\tPR_TIMER_CREATE_RESTORE_IDS_GET             = 0x2\n\tPR_TIMER_CREATE_RESTORE_IDS_OFF             = 0x0\n\tPR_TIMER_CREATE_RESTORE_IDS_ON              = 0x1\n\tPR_TIMING_STATISTICAL                       = 0x0\n\tPR_TIMING_TIMESTAMP                         = 0x1\n\tPR_TSC_ENABLE                               = 0x1\n\tPR_TSC_SIGSEGV                              = 0x2\n\tPR_UNALIGN_NOPRINT                          = 0x1\n\tPR_UNALIGN_SIGBUS                           = 0x2\n\tPSTOREFS_MAGIC                              = 0x6165676c\n\tPTP_CLK_MAGIC                               = '='\n\tPTP_ENABLE_FEATURE                          = 0x1\n\tPTP_EXTTS_EDGES                             = 0x6\n\tPTP_EXTTS_EVENT_VALID                       = 0x1\n\tPTP_EXTTS_V1_VALID_FLAGS                    = 0x7\n\tPTP_EXTTS_VALID_FLAGS                       = 0x1f\n\tPTP_EXT_OFFSET                              = 0x10\n\tPTP_FALLING_EDGE                            = 0x4\n\tPTP_MAX_SAMPLES                             = 0x19\n\tPTP_PEROUT_DUTY_CYCLE                       = 0x2\n\tPTP_PEROUT_ONE_SHOT                         = 0x1\n\tPTP_PEROUT_PHASE                            = 0x4\n\tPTP_PEROUT_V1_VALID_FLAGS                   = 0x0\n\tPTP_PEROUT_VALID_FLAGS                      = 0x7\n\tPTP_PIN_GETFUNC                             = 0xc0603d06\n\tPTP_PIN_GETFUNC2                            = 0xc0603d0f\n\tPTP_RISING_EDGE                             = 0x2\n\tPTP_STRICT_FLAGS                            = 0x8\n\tPTP_SYS_OFFSET_EXTENDED                     = 0xc4c03d09\n\tPTP_SYS_OFFSET_EXTENDED2                    = 0xc4c03d12\n\tPTP_SYS_OFFSET_PRECISE                      = 0xc0403d08\n\tPTP_SYS_OFFSET_PRECISE2                     = 0xc0403d11\n\tPTRACE_ATTACH                               = 0x10\n\tPTRACE_CONT                                 = 0x7\n\tPTRACE_DETACH                               = 0x11\n\tPTRACE_EVENTMSG_SYSCALL_ENTRY               = 0x1\n\tPTRACE_EVENTMSG_SYSCALL_EXIT                = 0x2\n\tPTRACE_EVENT_CLONE                          = 0x3\n\tPTRACE_EVENT_EXEC                           = 0x4\n\tPTRACE_EVENT_EXIT                           = 0x6\n\tPTRACE_EVENT_FORK                           = 0x1\n\tPTRACE_EVENT_SECCOMP                        = 0x7\n\tPTRACE_EVENT_STOP                           = 0x80\n\tPTRACE_EVENT_VFORK                          = 0x2\n\tPTRACE_EVENT_VFORK_DONE                     = 0x5\n\tPTRACE_GETEVENTMSG                          = 0x4201\n\tPTRACE_GETREGS                              = 0xc\n\tPTRACE_GETREGSET                            = 0x4204\n\tPTRACE_GETSIGINFO                           = 0x4202\n\tPTRACE_GETSIGMASK                           = 0x420a\n\tPTRACE_GET_RSEQ_CONFIGURATION               = 0x420f\n\tPTRACE_GET_SYSCALL_INFO                     = 0x420e\n\tPTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG     = 0x4211\n\tPTRACE_INTERRUPT                            = 0x4207\n\tPTRACE_KILL                                 = 0x8\n\tPTRACE_LISTEN                               = 0x4208\n\tPTRACE_O_EXITKILL                           = 0x100000\n\tPTRACE_O_MASK                               = 0x3000ff\n\tPTRACE_O_SUSPEND_SECCOMP                    = 0x200000\n\tPTRACE_O_TRACECLONE                         = 0x8\n\tPTRACE_O_TRACEEXEC                          = 0x10\n\tPTRACE_O_TRACEEXIT                          = 0x40\n\tPTRACE_O_TRACEFORK                          = 0x2\n\tPTRACE_O_TRACESECCOMP                       = 0x80\n\tPTRACE_O_TRACESYSGOOD                       = 0x1\n\tPTRACE_O_TRACEVFORK                         = 0x4\n\tPTRACE_O_TRACEVFORKDONE                     = 0x20\n\tPTRACE_PEEKDATA                             = 0x2\n\tPTRACE_PEEKSIGINFO                          = 0x4209\n\tPTRACE_PEEKSIGINFO_SHARED                   = 0x1\n\tPTRACE_PEEKTEXT                             = 0x1\n\tPTRACE_PEEKUSR                              = 0x3\n\tPTRACE_POKEDATA                             = 0x5\n\tPTRACE_POKETEXT                             = 0x4\n\tPTRACE_POKEUSR                              = 0x6\n\tPTRACE_SECCOMP_GET_FILTER                   = 0x420c\n\tPTRACE_SECCOMP_GET_METADATA                 = 0x420d\n\tPTRACE_SEIZE                                = 0x4206\n\tPTRACE_SETOPTIONS                           = 0x4200\n\tPTRACE_SETREGS                              = 0xd\n\tPTRACE_SETREGSET                            = 0x4205\n\tPTRACE_SETSIGINFO                           = 0x4203\n\tPTRACE_SETSIGMASK                           = 0x420b\n\tPTRACE_SET_SYSCALL_INFO                     = 0x4212\n\tPTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG     = 0x4210\n\tPTRACE_SINGLESTEP                           = 0x9\n\tPTRACE_SYSCALL                              = 0x18\n\tPTRACE_SYSCALL_INFO_ENTRY                   = 0x1\n\tPTRACE_SYSCALL_INFO_EXIT                    = 0x2\n\tPTRACE_SYSCALL_INFO_NONE                    = 0x0\n\tPTRACE_SYSCALL_INFO_SECCOMP                 = 0x3\n\tPTRACE_TRACEME                              = 0x0\n\tPT_AARCH64_MEMTAG_MTE                       = 0x70000002\n\tPT_DYNAMIC                                  = 0x2\n\tPT_GNU_EH_FRAME                             = 0x6474e550\n\tPT_GNU_PROPERTY                             = 0x6474e553\n\tPT_GNU_RELRO                                = 0x6474e552\n\tPT_GNU_STACK                                = 0x6474e551\n\tPT_HIOS                                     = 0x6fffffff\n\tPT_HIPROC                                   = 0x7fffffff\n\tPT_INTERP                                   = 0x3\n\tPT_LOAD                                     = 0x1\n\tPT_LOOS                                     = 0x60000000\n\tPT_LOPROC                                   = 0x70000000\n\tPT_NOTE                                     = 0x4\n\tPT_NULL                                     = 0x0\n\tPT_PHDR                                     = 0x6\n\tPT_SHLIB                                    = 0x5\n\tPT_TLS                                      = 0x7\n\tP_ALL                                       = 0x0\n\tP_PGID                                      = 0x2\n\tP_PID                                       = 0x1\n\tP_PIDFD                                     = 0x3\n\tQNX4_SUPER_MAGIC                            = 0x2f\n\tQNX6_SUPER_MAGIC                            = 0x68191122\n\tRAMFS_MAGIC                                 = 0x858458f6\n\tRAW_PAYLOAD_DIGITAL                         = 0x3\n\tRAW_PAYLOAD_HCI                             = 0x2\n\tRAW_PAYLOAD_LLCP                            = 0x0\n\tRAW_PAYLOAD_NCI                             = 0x1\n\tRAW_PAYLOAD_PROPRIETARY                     = 0x4\n\tRDTGROUP_SUPER_MAGIC                        = 0x7655821\n\tREISERFS_SUPER_MAGIC                        = 0x52654973\n\tRENAME_EXCHANGE                             = 0x2\n\tRENAME_NOREPLACE                            = 0x1\n\tRENAME_WHITEOUT                             = 0x4\n\tRLIMIT_CORE                                 = 0x4\n\tRLIMIT_CPU                                  = 0x0\n\tRLIMIT_DATA                                 = 0x2\n\tRLIMIT_FSIZE                                = 0x1\n\tRLIMIT_LOCKS                                = 0xa\n\tRLIMIT_MSGQUEUE                             = 0xc\n\tRLIMIT_NICE                                 = 0xd\n\tRLIMIT_RTPRIO                               = 0xe\n\tRLIMIT_RTTIME                               = 0xf\n\tRLIMIT_SIGPENDING                           = 0xb\n\tRLIMIT_STACK                                = 0x3\n\tRLIM_INFINITY                               = 0xffffffffffffffff\n\tRTAX_ADVMSS                                 = 0x8\n\tRTAX_CC_ALGO                                = 0x10\n\tRTAX_CWND                                   = 0x7\n\tRTAX_FASTOPEN_NO_COOKIE                     = 0x11\n\tRTAX_FEATURES                               = 0xc\n\tRTAX_FEATURE_ALLFRAG                        = 0x8\n\tRTAX_FEATURE_ECN                            = 0x1\n\tRTAX_FEATURE_MASK                           = 0x1f\n\tRTAX_FEATURE_SACK                           = 0x2\n\tRTAX_FEATURE_TCP_USEC_TS                    = 0x10\n\tRTAX_FEATURE_TIMESTAMP                      = 0x4\n\tRTAX_HOPLIMIT                               = 0xa\n\tRTAX_INITCWND                               = 0xb\n\tRTAX_INITRWND                               = 0xe\n\tRTAX_LOCK                                   = 0x1\n\tRTAX_MAX                                    = 0x11\n\tRTAX_MTU                                    = 0x2\n\tRTAX_QUICKACK                               = 0xf\n\tRTAX_REORDERING                             = 0x9\n\tRTAX_RTO_MIN                                = 0xd\n\tRTAX_RTT                                    = 0x4\n\tRTAX_RTTVAR                                 = 0x5\n\tRTAX_SSTHRESH                               = 0x6\n\tRTAX_UNSPEC                                 = 0x0\n\tRTAX_WINDOW                                 = 0x3\n\tRTA_ALIGNTO                                 = 0x4\n\tRTA_MAX                                     = 0x1f\n\tRTCF_DIRECTSRC                              = 0x4000000\n\tRTCF_DOREDIRECT                             = 0x1000000\n\tRTCF_LOG                                    = 0x2000000\n\tRTCF_MASQ                                   = 0x400000\n\tRTCF_NAT                                    = 0x800000\n\tRTCF_VALVE                                  = 0x200000\n\tRTC_AF                                      = 0x20\n\tRTC_BSM_DIRECT                              = 0x1\n\tRTC_BSM_DISABLED                            = 0x0\n\tRTC_BSM_LEVEL                               = 0x2\n\tRTC_BSM_STANDBY                             = 0x3\n\tRTC_FEATURE_ALARM                           = 0x0\n\tRTC_FEATURE_ALARM_RES_2S                    = 0x3\n\tRTC_FEATURE_ALARM_RES_MINUTE                = 0x1\n\tRTC_FEATURE_ALARM_WAKEUP_ONLY               = 0x7\n\tRTC_FEATURE_BACKUP_SWITCH_MODE              = 0x6\n\tRTC_FEATURE_CNT                             = 0x8\n\tRTC_FEATURE_CORRECTION                      = 0x5\n\tRTC_FEATURE_NEED_WEEK_DAY                   = 0x2\n\tRTC_FEATURE_UPDATE_INTERRUPT                = 0x4\n\tRTC_IRQF                                    = 0x80\n\tRTC_MAX_FREQ                                = 0x2000\n\tRTC_PARAM_BACKUP_SWITCH_MODE                = 0x2\n\tRTC_PARAM_CORRECTION                        = 0x1\n\tRTC_PARAM_FEATURES                          = 0x0\n\tRTC_PF                                      = 0x40\n\tRTC_UF                                      = 0x10\n\tRTF_ADDRCLASSMASK                           = 0xf8000000\n\tRTF_ADDRCONF                                = 0x40000\n\tRTF_ALLONLINK                               = 0x20000\n\tRTF_BROADCAST                               = 0x10000000\n\tRTF_CACHE                                   = 0x1000000\n\tRTF_DEFAULT                                 = 0x10000\n\tRTF_DYNAMIC                                 = 0x10\n\tRTF_FLOW                                    = 0x2000000\n\tRTF_GATEWAY                                 = 0x2\n\tRTF_HOST                                    = 0x4\n\tRTF_INTERFACE                               = 0x40000000\n\tRTF_IRTT                                    = 0x100\n\tRTF_LINKRT                                  = 0x100000\n\tRTF_LOCAL                                   = 0x80000000\n\tRTF_MODIFIED                                = 0x20\n\tRTF_MSS                                     = 0x40\n\tRTF_MTU                                     = 0x40\n\tRTF_MULTICAST                               = 0x20000000\n\tRTF_NAT                                     = 0x8000000\n\tRTF_NOFORWARD                               = 0x1000\n\tRTF_NONEXTHOP                               = 0x200000\n\tRTF_NOPMTUDISC                              = 0x4000\n\tRTF_POLICY                                  = 0x4000000\n\tRTF_REINSTATE                               = 0x8\n\tRTF_REJECT                                  = 0x200\n\tRTF_STATIC                                  = 0x400\n\tRTF_THROW                                   = 0x2000\n\tRTF_UP                                      = 0x1\n\tRTF_WINDOW                                  = 0x80\n\tRTF_XRESOLVE                                = 0x800\n\tRTMGRP_DECnet_IFADDR                        = 0x1000\n\tRTMGRP_DECnet_ROUTE                         = 0x4000\n\tRTMGRP_IPV4_IFADDR                          = 0x10\n\tRTMGRP_IPV4_MROUTE                          = 0x20\n\tRTMGRP_IPV4_ROUTE                           = 0x40\n\tRTMGRP_IPV4_RULE                            = 0x80\n\tRTMGRP_IPV6_IFADDR                          = 0x100\n\tRTMGRP_IPV6_IFINFO                          = 0x800\n\tRTMGRP_IPV6_MROUTE                          = 0x200\n\tRTMGRP_IPV6_PREFIX                          = 0x20000\n\tRTMGRP_IPV6_ROUTE                           = 0x400\n\tRTMGRP_LINK                                 = 0x1\n\tRTMGRP_NEIGH                                = 0x4\n\tRTMGRP_NOTIFY                               = 0x2\n\tRTMGRP_TC                                   = 0x8\n\tRTM_BASE                                    = 0x10\n\tRTM_DELACTION                               = 0x31\n\tRTM_DELADDR                                 = 0x15\n\tRTM_DELADDRLABEL                            = 0x49\n\tRTM_DELANYCAST                              = 0x3d\n\tRTM_DELCHAIN                                = 0x65\n\tRTM_DELLINK                                 = 0x11\n\tRTM_DELLINKPROP                             = 0x6d\n\tRTM_DELMDB                                  = 0x55\n\tRTM_DELMULTICAST                            = 0x39\n\tRTM_DELNEIGH                                = 0x1d\n\tRTM_DELNETCONF                              = 0x51\n\tRTM_DELNEXTHOP                              = 0x69\n\tRTM_DELNEXTHOPBUCKET                        = 0x75\n\tRTM_DELNSID                                 = 0x59\n\tRTM_DELQDISC                                = 0x25\n\tRTM_DELROUTE                                = 0x19\n\tRTM_DELRULE                                 = 0x21\n\tRTM_DELTCLASS                               = 0x29\n\tRTM_DELTFILTER                              = 0x2d\n\tRTM_DELTUNNEL                               = 0x79\n\tRTM_DELVLAN                                 = 0x71\n\tRTM_F_CLONED                                = 0x200\n\tRTM_F_EQUALIZE                              = 0x400\n\tRTM_F_FIB_MATCH                             = 0x2000\n\tRTM_F_LOOKUP_TABLE                          = 0x1000\n\tRTM_F_NOTIFY                                = 0x100\n\tRTM_F_OFFLOAD                               = 0x4000\n\tRTM_F_OFFLOAD_FAILED                        = 0x20000000\n\tRTM_F_PREFIX                                = 0x800\n\tRTM_F_TRAP                                  = 0x8000\n\tRTM_GETACTION                               = 0x32\n\tRTM_GETADDR                                 = 0x16\n\tRTM_GETADDRLABEL                            = 0x4a\n\tRTM_GETANYCAST                              = 0x3e\n\tRTM_GETCHAIN                                = 0x66\n\tRTM_GETDCB                                  = 0x4e\n\tRTM_GETLINK                                 = 0x12\n\tRTM_GETLINKPROP                             = 0x6e\n\tRTM_GETMDB                                  = 0x56\n\tRTM_GETMULTICAST                            = 0x3a\n\tRTM_GETNEIGH                                = 0x1e\n\tRTM_GETNEIGHTBL                             = 0x42\n\tRTM_GETNETCONF                              = 0x52\n\tRTM_GETNEXTHOP                              = 0x6a\n\tRTM_GETNEXTHOPBUCKET                        = 0x76\n\tRTM_GETNSID                                 = 0x5a\n\tRTM_GETQDISC                                = 0x26\n\tRTM_GETROUTE                                = 0x1a\n\tRTM_GETRULE                                 = 0x22\n\tRTM_GETSTATS                                = 0x5e\n\tRTM_GETTCLASS                               = 0x2a\n\tRTM_GETTFILTER                              = 0x2e\n\tRTM_GETTUNNEL                               = 0x7a\n\tRTM_GETVLAN                                 = 0x72\n\tRTM_MAX                                     = 0x7b\n\tRTM_NEWACTION                               = 0x30\n\tRTM_NEWADDR                                 = 0x14\n\tRTM_NEWADDRLABEL                            = 0x48\n\tRTM_NEWANYCAST                              = 0x3c\n\tRTM_NEWCACHEREPORT                          = 0x60\n\tRTM_NEWCHAIN                                = 0x64\n\tRTM_NEWLINK                                 = 0x10\n\tRTM_NEWLINKPROP                             = 0x6c\n\tRTM_NEWMDB                                  = 0x54\n\tRTM_NEWMULTICAST                            = 0x38\n\tRTM_NEWNDUSEROPT                            = 0x44\n\tRTM_NEWNEIGH                                = 0x1c\n\tRTM_NEWNEIGHTBL                             = 0x40\n\tRTM_NEWNETCONF                              = 0x50\n\tRTM_NEWNEXTHOP                              = 0x68\n\tRTM_NEWNEXTHOPBUCKET                        = 0x74\n\tRTM_NEWNSID                                 = 0x58\n\tRTM_NEWPREFIX                               = 0x34\n\tRTM_NEWQDISC                                = 0x24\n\tRTM_NEWROUTE                                = 0x18\n\tRTM_NEWRULE                                 = 0x20\n\tRTM_NEWSTATS                                = 0x5c\n\tRTM_NEWTCLASS                               = 0x28\n\tRTM_NEWTFILTER                              = 0x2c\n\tRTM_NEWTUNNEL                               = 0x78\n\tRTM_NEWVLAN                                 = 0x70\n\tRTM_NR_FAMILIES                             = 0x1b\n\tRTM_NR_MSGTYPES                             = 0x6c\n\tRTM_SETDCB                                  = 0x4f\n\tRTM_SETLINK                                 = 0x13\n\tRTM_SETNEIGHTBL                             = 0x43\n\tRTM_SETSTATS                                = 0x5f\n\tRTNH_ALIGNTO                                = 0x4\n\tRTNH_COMPARE_MASK                           = 0x59\n\tRTNH_F_DEAD                                 = 0x1\n\tRTNH_F_LINKDOWN                             = 0x10\n\tRTNH_F_OFFLOAD                              = 0x8\n\tRTNH_F_ONLINK                               = 0x4\n\tRTNH_F_PERVASIVE                            = 0x2\n\tRTNH_F_TRAP                                 = 0x40\n\tRTNH_F_UNRESOLVED                           = 0x20\n\tRTN_MAX                                     = 0xb\n\tRTPROT_BABEL                                = 0x2a\n\tRTPROT_BGP                                  = 0xba\n\tRTPROT_BIRD                                 = 0xc\n\tRTPROT_BOOT                                 = 0x3\n\tRTPROT_DHCP                                 = 0x10\n\tRTPROT_DNROUTED                             = 0xd\n\tRTPROT_EIGRP                                = 0xc0\n\tRTPROT_GATED                                = 0x8\n\tRTPROT_ISIS                                 = 0xbb\n\tRTPROT_KEEPALIVED                           = 0x12\n\tRTPROT_KERNEL                               = 0x2\n\tRTPROT_MROUTED                              = 0x11\n\tRTPROT_MRT                                  = 0xa\n\tRTPROT_NTK                                  = 0xf\n\tRTPROT_OPENR                                = 0x63\n\tRTPROT_OSPF                                 = 0xbc\n\tRTPROT_OVN                                  = 0x54\n\tRTPROT_RA                                   = 0x9\n\tRTPROT_REDIRECT                             = 0x1\n\tRTPROT_RIP                                  = 0xbd\n\tRTPROT_STATIC                               = 0x4\n\tRTPROT_UNSPEC                               = 0x0\n\tRTPROT_XORP                                 = 0xe\n\tRTPROT_ZEBRA                                = 0xb\n\tRT_CLASS_DEFAULT                            = 0xfd\n\tRT_CLASS_LOCAL                              = 0xff\n\tRT_CLASS_MAIN                               = 0xfe\n\tRT_CLASS_MAX                                = 0xff\n\tRT_CLASS_UNSPEC                             = 0x0\n\tRUSAGE_CHILDREN                             = -0x1\n\tRUSAGE_SELF                                 = 0x0\n\tRUSAGE_THREAD                               = 0x1\n\tRWF_APPEND                                  = 0x10\n\tRWF_ATOMIC                                  = 0x40\n\tRWF_DONTCACHE                               = 0x80\n\tRWF_DSYNC                                   = 0x2\n\tRWF_HIPRI                                   = 0x1\n\tRWF_NOAPPEND                                = 0x20\n\tRWF_NOWAIT                                  = 0x8\n\tRWF_SUPPORTED                               = 0xff\n\tRWF_SYNC                                    = 0x4\n\tRWF_WRITE_LIFE_NOT_SET                      = 0x0\n\tSCHED_BATCH                                 = 0x3\n\tSCHED_DEADLINE                              = 0x6\n\tSCHED_EXT                                   = 0x7\n\tSCHED_FIFO                                  = 0x1\n\tSCHED_FLAG_ALL                              = 0x7f\n\tSCHED_FLAG_DL_OVERRUN                       = 0x4\n\tSCHED_FLAG_KEEP_ALL                         = 0x18\n\tSCHED_FLAG_KEEP_PARAMS                      = 0x10\n\tSCHED_FLAG_KEEP_POLICY                      = 0x8\n\tSCHED_FLAG_RECLAIM                          = 0x2\n\tSCHED_FLAG_RESET_ON_FORK                    = 0x1\n\tSCHED_FLAG_UTIL_CLAMP                       = 0x60\n\tSCHED_FLAG_UTIL_CLAMP_MAX                   = 0x40\n\tSCHED_FLAG_UTIL_CLAMP_MIN                   = 0x20\n\tSCHED_IDLE                                  = 0x5\n\tSCHED_NORMAL                                = 0x0\n\tSCHED_RESET_ON_FORK                         = 0x40000000\n\tSCHED_RR                                    = 0x2\n\tSCM_CREDENTIALS                             = 0x2\n\tSCM_PIDFD                                   = 0x4\n\tSCM_RIGHTS                                  = 0x1\n\tSCM_SECURITY                                = 0x3\n\tSCM_TIMESTAMP                               = 0x1d\n\tSC_LOG_FLUSH                                = 0x100000\n\tSECCOMP_ADDFD_FLAG_SEND                     = 0x2\n\tSECCOMP_ADDFD_FLAG_SETFD                    = 0x1\n\tSECCOMP_FILTER_FLAG_LOG                     = 0x2\n\tSECCOMP_FILTER_FLAG_NEW_LISTENER            = 0x8\n\tSECCOMP_FILTER_FLAG_SPEC_ALLOW              = 0x4\n\tSECCOMP_FILTER_FLAG_TSYNC                   = 0x1\n\tSECCOMP_FILTER_FLAG_TSYNC_ESRCH             = 0x10\n\tSECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV      = 0x20\n\tSECCOMP_GET_ACTION_AVAIL                    = 0x2\n\tSECCOMP_GET_NOTIF_SIZES                     = 0x3\n\tSECCOMP_IOCTL_NOTIF_RECV                    = 0xc0502100\n\tSECCOMP_IOCTL_NOTIF_SEND                    = 0xc0182101\n\tSECCOMP_IOC_MAGIC                           = '!'\n\tSECCOMP_MODE_DISABLED                       = 0x0\n\tSECCOMP_MODE_FILTER                         = 0x2\n\tSECCOMP_MODE_STRICT                         = 0x1\n\tSECCOMP_RET_ACTION                          = 0x7fff0000\n\tSECCOMP_RET_ACTION_FULL                     = 0xffff0000\n\tSECCOMP_RET_ALLOW                           = 0x7fff0000\n\tSECCOMP_RET_DATA                            = 0xffff\n\tSECCOMP_RET_ERRNO                           = 0x50000\n\tSECCOMP_RET_KILL                            = 0x0\n\tSECCOMP_RET_KILL_PROCESS                    = 0x80000000\n\tSECCOMP_RET_KILL_THREAD                     = 0x0\n\tSECCOMP_RET_LOG                             = 0x7ffc0000\n\tSECCOMP_RET_TRACE                           = 0x7ff00000\n\tSECCOMP_RET_TRAP                            = 0x30000\n\tSECCOMP_RET_USER_NOTIF                      = 0x7fc00000\n\tSECCOMP_SET_MODE_FILTER                     = 0x1\n\tSECCOMP_SET_MODE_STRICT                     = 0x0\n\tSECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP          = 0x1\n\tSECCOMP_USER_NOTIF_FLAG_CONTINUE            = 0x1\n\tSECRETMEM_MAGIC                             = 0x5345434d\n\tSECURITYFS_MAGIC                            = 0x73636673\n\tSEEK_CUR                                    = 0x1\n\tSEEK_DATA                                   = 0x3\n\tSEEK_END                                    = 0x2\n\tSEEK_HOLE                                   = 0x4\n\tSEEK_MAX                                    = 0x4\n\tSEEK_SET                                    = 0x0\n\tSELINUX_MAGIC                               = 0xf97cff8c\n\tSHF_ALLOC                                   = 0x2\n\tSHF_EXCLUDE                                 = 0x8000000\n\tSHF_EXECINSTR                               = 0x4\n\tSHF_GROUP                                   = 0x200\n\tSHF_INFO_LINK                               = 0x40\n\tSHF_LINK_ORDER                              = 0x80\n\tSHF_MASKOS                                  = 0xff00000\n\tSHF_MASKPROC                                = 0xf0000000\n\tSHF_MERGE                                   = 0x10\n\tSHF_ORDERED                                 = 0x4000000\n\tSHF_OS_NONCONFORMING                        = 0x100\n\tSHF_RELA_LIVEPATCH                          = 0x100000\n\tSHF_RO_AFTER_INIT                           = 0x200000\n\tSHF_STRINGS                                 = 0x20\n\tSHF_TLS                                     = 0x400\n\tSHF_WRITE                                   = 0x1\n\tSHN_ABS                                     = 0xfff1\n\tSHN_COMMON                                  = 0xfff2\n\tSHN_HIPROC                                  = 0xff1f\n\tSHN_HIRESERVE                               = 0xffff\n\tSHN_LIVEPATCH                               = 0xff20\n\tSHN_LOPROC                                  = 0xff00\n\tSHN_LORESERVE                               = 0xff00\n\tSHN_UNDEF                                   = 0x0\n\tSHT_DYNAMIC                                 = 0x6\n\tSHT_DYNSYM                                  = 0xb\n\tSHT_HASH                                    = 0x5\n\tSHT_HIPROC                                  = 0x7fffffff\n\tSHT_HIUSER                                  = 0xffffffff\n\tSHT_LOPROC                                  = 0x70000000\n\tSHT_LOUSER                                  = 0x80000000\n\tSHT_NOBITS                                  = 0x8\n\tSHT_NOTE                                    = 0x7\n\tSHT_NULL                                    = 0x0\n\tSHT_NUM                                     = 0xc\n\tSHT_PROGBITS                                = 0x1\n\tSHT_REL                                     = 0x9\n\tSHT_RELA                                    = 0x4\n\tSHT_SHLIB                                   = 0xa\n\tSHT_STRTAB                                  = 0x3\n\tSHT_SYMTAB                                  = 0x2\n\tSHUT_RD                                     = 0x0\n\tSHUT_RDWR                                   = 0x2\n\tSHUT_WR                                     = 0x1\n\tSIOCADDDLCI                                 = 0x8980\n\tSIOCADDMULTI                                = 0x8931\n\tSIOCADDRT                                   = 0x890b\n\tSIOCBONDCHANGEACTIVE                        = 0x8995\n\tSIOCBONDENSLAVE                             = 0x8990\n\tSIOCBONDINFOQUERY                           = 0x8994\n\tSIOCBONDRELEASE                             = 0x8991\n\tSIOCBONDSETHWADDR                           = 0x8992\n\tSIOCBONDSLAVEINFOQUERY                      = 0x8993\n\tSIOCBRADDBR                                 = 0x89a0\n\tSIOCBRADDIF                                 = 0x89a2\n\tSIOCBRDELBR                                 = 0x89a1\n\tSIOCBRDELIF                                 = 0x89a3\n\tSIOCDARP                                    = 0x8953\n\tSIOCDELDLCI                                 = 0x8981\n\tSIOCDELMULTI                                = 0x8932\n\tSIOCDELRT                                   = 0x890c\n\tSIOCDEVPRIVATE                              = 0x89f0\n\tSIOCDIFADDR                                 = 0x8936\n\tSIOCDRARP                                   = 0x8960\n\tSIOCETHTOOL                                 = 0x8946\n\tSIOCGARP                                    = 0x8954\n\tSIOCGETLINKNAME                             = 0x89e0\n\tSIOCGETNODEID                               = 0x89e1\n\tSIOCGHWTSTAMP                               = 0x89b1\n\tSIOCGIFADDR                                 = 0x8915\n\tSIOCGIFBR                                   = 0x8940\n\tSIOCGIFBRDADDR                              = 0x8919\n\tSIOCGIFCONF                                 = 0x8912\n\tSIOCGIFCOUNT                                = 0x8938\n\tSIOCGIFDSTADDR                              = 0x8917\n\tSIOCGIFENCAP                                = 0x8925\n\tSIOCGIFFLAGS                                = 0x8913\n\tSIOCGIFHWADDR                               = 0x8927\n\tSIOCGIFINDEX                                = 0x8933\n\tSIOCGIFMAP                                  = 0x8970\n\tSIOCGIFMEM                                  = 0x891f\n\tSIOCGIFMETRIC                               = 0x891d\n\tSIOCGIFMTU                                  = 0x8921\n\tSIOCGIFNAME                                 = 0x8910\n\tSIOCGIFNETMASK                              = 0x891b\n\tSIOCGIFPFLAGS                               = 0x8935\n\tSIOCGIFSLAVE                                = 0x8929\n\tSIOCGIFTXQLEN                               = 0x8942\n\tSIOCGIFVLAN                                 = 0x8982\n\tSIOCGMIIPHY                                 = 0x8947\n\tSIOCGMIIREG                                 = 0x8948\n\tSIOCGPPPCSTATS                              = 0x89f2\n\tSIOCGPPPSTATS                               = 0x89f0\n\tSIOCGPPPVER                                 = 0x89f1\n\tSIOCGRARP                                   = 0x8961\n\tSIOCGSKNS                                   = 0x894c\n\tSIOCGSTAMP                                  = 0x8906\n\tSIOCGSTAMPNS                                = 0x8907\n\tSIOCGSTAMPNS_OLD                            = 0x8907\n\tSIOCGSTAMP_OLD                              = 0x8906\n\tSIOCKCMATTACH                               = 0x89e0\n\tSIOCKCMCLONE                                = 0x89e2\n\tSIOCKCMUNATTACH                             = 0x89e1\n\tSIOCOUTQNSD                                 = 0x894b\n\tSIOCPROTOPRIVATE                            = 0x89e0\n\tSIOCRTMSG                                   = 0x890d\n\tSIOCSARP                                    = 0x8955\n\tSIOCSHWTSTAMP                               = 0x89b0\n\tSIOCSIFADDR                                 = 0x8916\n\tSIOCSIFBR                                   = 0x8941\n\tSIOCSIFBRDADDR                              = 0x891a\n\tSIOCSIFDSTADDR                              = 0x8918\n\tSIOCSIFENCAP                                = 0x8926\n\tSIOCSIFFLAGS                                = 0x8914\n\tSIOCSIFHWADDR                               = 0x8924\n\tSIOCSIFHWBROADCAST                          = 0x8937\n\tSIOCSIFLINK                                 = 0x8911\n\tSIOCSIFMAP                                  = 0x8971\n\tSIOCSIFMEM                                  = 0x8920\n\tSIOCSIFMETRIC                               = 0x891e\n\tSIOCSIFMTU                                  = 0x8922\n\tSIOCSIFNAME                                 = 0x8923\n\tSIOCSIFNETMASK                              = 0x891c\n\tSIOCSIFPFLAGS                               = 0x8934\n\tSIOCSIFSLAVE                                = 0x8930\n\tSIOCSIFTXQLEN                               = 0x8943\n\tSIOCSIFVLAN                                 = 0x8983\n\tSIOCSMIIREG                                 = 0x8949\n\tSIOCSRARP                                   = 0x8962\n\tSIOCWANDEV                                  = 0x894a\n\tSK_DIAG_BPF_STORAGE_MAX                     = 0x3\n\tSK_DIAG_BPF_STORAGE_REQ_MAX                 = 0x1\n\tSMACK_MAGIC                                 = 0x43415d53\n\tSMART_AUTOSAVE                              = 0xd2\n\tSMART_AUTO_OFFLINE                          = 0xdb\n\tSMART_DISABLE                               = 0xd9\n\tSMART_ENABLE                                = 0xd8\n\tSMART_HCYL_PASS                             = 0xc2\n\tSMART_IMMEDIATE_OFFLINE                     = 0xd4\n\tSMART_LCYL_PASS                             = 0x4f\n\tSMART_READ_LOG_SECTOR                       = 0xd5\n\tSMART_READ_THRESHOLDS                       = 0xd1\n\tSMART_READ_VALUES                           = 0xd0\n\tSMART_SAVE                                  = 0xd3\n\tSMART_STATUS                                = 0xda\n\tSMART_WRITE_LOG_SECTOR                      = 0xd6\n\tSMART_WRITE_THRESHOLDS                      = 0xd7\n\tSMB2_SUPER_MAGIC                            = 0xfe534d42\n\tSMB_SUPER_MAGIC                             = 0x517b\n\tSOCKFS_MAGIC                                = 0x534f434b\n\tSOCK_BUF_LOCK_MASK                          = 0x3\n\tSOCK_DCCP                                   = 0x6\n\tSOCK_DESTROY                                = 0x15\n\tSOCK_DIAG_BY_FAMILY                         = 0x14\n\tSOCK_IOC_TYPE                               = 0x89\n\tSOCK_PACKET                                 = 0xa\n\tSOCK_RAW                                    = 0x3\n\tSOCK_RCVBUF_LOCK                            = 0x2\n\tSOCK_RDM                                    = 0x4\n\tSOCK_SEQPACKET                              = 0x5\n\tSOCK_SNDBUF_LOCK                            = 0x1\n\tSOCK_TXREHASH_DEFAULT                       = 0xff\n\tSOCK_TXREHASH_DISABLED                      = 0x0\n\tSOCK_TXREHASH_ENABLED                       = 0x1\n\tSOL_AAL                                     = 0x109\n\tSOL_ALG                                     = 0x117\n\tSOL_ATM                                     = 0x108\n\tSOL_CAIF                                    = 0x116\n\tSOL_CAN_BASE                                = 0x64\n\tSOL_CAN_RAW                                 = 0x65\n\tSOL_DCCP                                    = 0x10d\n\tSOL_DECNET                                  = 0x105\n\tSOL_ICMPV6                                  = 0x3a\n\tSOL_IP                                      = 0x0\n\tSOL_IPV6                                    = 0x29\n\tSOL_IRDA                                    = 0x10a\n\tSOL_IUCV                                    = 0x115\n\tSOL_KCM                                     = 0x119\n\tSOL_LLC                                     = 0x10c\n\tSOL_MCTP                                    = 0x11d\n\tSOL_MPTCP                                   = 0x11c\n\tSOL_NETBEUI                                 = 0x10b\n\tSOL_NETLINK                                 = 0x10e\n\tSOL_NFC                                     = 0x118\n\tSOL_PACKET                                  = 0x107\n\tSOL_PNPIPE                                  = 0x113\n\tSOL_PPPOL2TP                                = 0x111\n\tSOL_RAW                                     = 0xff\n\tSOL_RDS                                     = 0x114\n\tSOL_RXRPC                                   = 0x110\n\tSOL_SMC                                     = 0x11e\n\tSOL_TCP                                     = 0x6\n\tSOL_TIPC                                    = 0x10f\n\tSOL_TLS                                     = 0x11a\n\tSOL_UDP                                     = 0x11\n\tSOL_VSOCK                                   = 0x11f\n\tSOL_X25                                     = 0x106\n\tSOL_XDP                                     = 0x11b\n\tSOMAXCONN                                   = 0x1000\n\tSO_ATTACH_FILTER                            = 0x1a\n\tSO_DEBUG                                    = 0x1\n\tSO_DETACH_BPF                               = 0x1b\n\tSO_DETACH_FILTER                            = 0x1b\n\tSO_EE_CODE_TXTIME_INVALID_PARAM             = 0x1\n\tSO_EE_CODE_TXTIME_MISSED                    = 0x2\n\tSO_EE_CODE_ZEROCOPY_COPIED                  = 0x1\n\tSO_EE_ORIGIN_ICMP                           = 0x2\n\tSO_EE_ORIGIN_ICMP6                          = 0x3\n\tSO_EE_ORIGIN_LOCAL                          = 0x1\n\tSO_EE_ORIGIN_NONE                           = 0x0\n\tSO_EE_ORIGIN_TIMESTAMPING                   = 0x4\n\tSO_EE_ORIGIN_TXSTATUS                       = 0x4\n\tSO_EE_ORIGIN_TXTIME                         = 0x6\n\tSO_EE_ORIGIN_ZEROCOPY                       = 0x5\n\tSO_EE_RFC4884_FLAG_INVALID                  = 0x1\n\tSO_GET_FILTER                               = 0x1a\n\tSO_NO_CHECK                                 = 0xb\n\tSO_PEERNAME                                 = 0x1c\n\tSO_PRIORITY                                 = 0xc\n\tSO_TIMESTAMP                                = 0x1d\n\tSO_TIMESTAMP_OLD                            = 0x1d\n\tSO_VM_SOCKETS_BUFFER_MAX_SIZE               = 0x2\n\tSO_VM_SOCKETS_BUFFER_MIN_SIZE               = 0x1\n\tSO_VM_SOCKETS_BUFFER_SIZE                   = 0x0\n\tSO_VM_SOCKETS_CONNECT_TIMEOUT               = 0x6\n\tSO_VM_SOCKETS_CONNECT_TIMEOUT_NEW           = 0x8\n\tSO_VM_SOCKETS_CONNECT_TIMEOUT_OLD           = 0x6\n\tSO_VM_SOCKETS_NONBLOCK_TXRX                 = 0x7\n\tSO_VM_SOCKETS_PEER_HOST_VM_ID               = 0x3\n\tSO_VM_SOCKETS_TRUSTED                       = 0x5\n\tSPLICE_F_GIFT                               = 0x8\n\tSPLICE_F_MORE                               = 0x4\n\tSPLICE_F_MOVE                               = 0x1\n\tSPLICE_F_NONBLOCK                           = 0x2\n\tSQUASHFS_MAGIC                              = 0x73717368\n\tSTACK_END_MAGIC                             = 0x57ac6e9d\n\tSTATX_ALL                                   = 0xfff\n\tSTATX_ATIME                                 = 0x20\n\tSTATX_ATTR_APPEND                           = 0x20\n\tSTATX_ATTR_AUTOMOUNT                        = 0x1000\n\tSTATX_ATTR_COMPRESSED                       = 0x4\n\tSTATX_ATTR_DAX                              = 0x200000\n\tSTATX_ATTR_ENCRYPTED                        = 0x800\n\tSTATX_ATTR_IMMUTABLE                        = 0x10\n\tSTATX_ATTR_MOUNT_ROOT                       = 0x2000\n\tSTATX_ATTR_NODUMP                           = 0x40\n\tSTATX_ATTR_VERITY                           = 0x100000\n\tSTATX_ATTR_WRITE_ATOMIC                     = 0x400000\n\tSTATX_BASIC_STATS                           = 0x7ff\n\tSTATX_BLOCKS                                = 0x400\n\tSTATX_BTIME                                 = 0x800\n\tSTATX_CTIME                                 = 0x80\n\tSTATX_DIOALIGN                              = 0x2000\n\tSTATX_DIO_READ_ALIGN                        = 0x20000\n\tSTATX_GID                                   = 0x10\n\tSTATX_INO                                   = 0x100\n\tSTATX_MNT_ID                                = 0x1000\n\tSTATX_MNT_ID_UNIQUE                         = 0x4000\n\tSTATX_MODE                                  = 0x2\n\tSTATX_MTIME                                 = 0x40\n\tSTATX_NLINK                                 = 0x4\n\tSTATX_SIZE                                  = 0x200\n\tSTATX_SUBVOL                                = 0x8000\n\tSTATX_TYPE                                  = 0x1\n\tSTATX_UID                                   = 0x8\n\tSTATX_WRITE_ATOMIC                          = 0x10000\n\tSTATX__RESERVED                             = 0x80000000\n\tSTB_GLOBAL                                  = 0x1\n\tSTB_LOCAL                                   = 0x0\n\tSTB_WEAK                                    = 0x2\n\tSTT_COMMON                                  = 0x5\n\tSTT_FILE                                    = 0x4\n\tSTT_FUNC                                    = 0x2\n\tSTT_NOTYPE                                  = 0x0\n\tSTT_OBJECT                                  = 0x1\n\tSTT_SECTION                                 = 0x3\n\tSTT_TLS                                     = 0x6\n\tSYNC_FILE_RANGE_WAIT_AFTER                  = 0x4\n\tSYNC_FILE_RANGE_WAIT_BEFORE                 = 0x1\n\tSYNC_FILE_RANGE_WRITE                       = 0x2\n\tSYNC_FILE_RANGE_WRITE_AND_WAIT              = 0x7\n\tSYSFS_MAGIC                                 = 0x62656572\n\tS_BLKSIZE                                   = 0x200\n\tS_IEXEC                                     = 0x40\n\tS_IFBLK                                     = 0x6000\n\tS_IFCHR                                     = 0x2000\n\tS_IFDIR                                     = 0x4000\n\tS_IFIFO                                     = 0x1000\n\tS_IFLNK                                     = 0xa000\n\tS_IFMT                                      = 0xf000\n\tS_IFREG                                     = 0x8000\n\tS_IFSOCK                                    = 0xc000\n\tS_IREAD                                     = 0x100\n\tS_IRGRP                                     = 0x20\n\tS_IROTH                                     = 0x4\n\tS_IRUSR                                     = 0x100\n\tS_IRWXG                                     = 0x38\n\tS_IRWXO                                     = 0x7\n\tS_IRWXU                                     = 0x1c0\n\tS_ISGID                                     = 0x400\n\tS_ISUID                                     = 0x800\n\tS_ISVTX                                     = 0x200\n\tS_IWGRP                                     = 0x10\n\tS_IWOTH                                     = 0x2\n\tS_IWRITE                                    = 0x80\n\tS_IWUSR                                     = 0x80\n\tS_IXGRP                                     = 0x8\n\tS_IXOTH                                     = 0x1\n\tS_IXUSR                                     = 0x40\n\tTAB0                                        = 0x0\n\tTASKSTATS_CMD_ATTR_MAX                      = 0x4\n\tTASKSTATS_CMD_MAX                           = 0x2\n\tTASKSTATS_GENL_NAME                         = \"TASKSTATS\"\n\tTASKSTATS_GENL_VERSION                      = 0x1\n\tTASKSTATS_TYPE_MAX                          = 0x6\n\tTASKSTATS_VERSION                           = 0x10\n\tTCIFLUSH                                    = 0x0\n\tTCIOFF                                      = 0x2\n\tTCIOFLUSH                                   = 0x2\n\tTCION                                       = 0x3\n\tTCOFLUSH                                    = 0x1\n\tTCOOFF                                      = 0x0\n\tTCOON                                       = 0x1\n\tTCPOPT_EOL                                  = 0x0\n\tTCPOPT_MAXSEG                               = 0x2\n\tTCPOPT_NOP                                  = 0x1\n\tTCPOPT_SACK                                 = 0x5\n\tTCPOPT_SACK_PERMITTED                       = 0x4\n\tTCPOPT_TIMESTAMP                            = 0x8\n\tTCPOPT_TSTAMP_HDR                           = 0x101080a\n\tTCPOPT_WINDOW                               = 0x3\n\tTCP_CC_INFO                                 = 0x1a\n\tTCP_CM_INQ                                  = 0x24\n\tTCP_CONGESTION                              = 0xd\n\tTCP_COOKIE_IN_ALWAYS                        = 0x1\n\tTCP_COOKIE_MAX                              = 0x10\n\tTCP_COOKIE_MIN                              = 0x8\n\tTCP_COOKIE_OUT_NEVER                        = 0x2\n\tTCP_COOKIE_PAIR_SIZE                        = 0x20\n\tTCP_COOKIE_TRANSACTIONS                     = 0xf\n\tTCP_CORK                                    = 0x3\n\tTCP_DEFER_ACCEPT                            = 0x9\n\tTCP_FASTOPEN                                = 0x17\n\tTCP_FASTOPEN_CONNECT                        = 0x1e\n\tTCP_FASTOPEN_KEY                            = 0x21\n\tTCP_FASTOPEN_NO_COOKIE                      = 0x22\n\tTCP_INFO                                    = 0xb\n\tTCP_INQ                                     = 0x24\n\tTCP_KEEPCNT                                 = 0x6\n\tTCP_KEEPIDLE                                = 0x4\n\tTCP_KEEPINTVL                               = 0x5\n\tTCP_LINGER2                                 = 0x8\n\tTCP_MAXSEG                                  = 0x2\n\tTCP_MAXWIN                                  = 0xffff\n\tTCP_MAX_WINSHIFT                            = 0xe\n\tTCP_MD5SIG                                  = 0xe\n\tTCP_MD5SIG_EXT                              = 0x20\n\tTCP_MD5SIG_FLAG_IFINDEX                     = 0x2\n\tTCP_MD5SIG_FLAG_PREFIX                      = 0x1\n\tTCP_MD5SIG_MAXKEYLEN                        = 0x50\n\tTCP_MSS                                     = 0x200\n\tTCP_MSS_DEFAULT                             = 0x218\n\tTCP_MSS_DESIRED                             = 0x4c4\n\tTCP_NODELAY                                 = 0x1\n\tTCP_NOTSENT_LOWAT                           = 0x19\n\tTCP_QUEUE_SEQ                               = 0x15\n\tTCP_QUICKACK                                = 0xc\n\tTCP_REPAIR                                  = 0x13\n\tTCP_REPAIR_OFF                              = 0x0\n\tTCP_REPAIR_OFF_NO_WP                        = -0x1\n\tTCP_REPAIR_ON                               = 0x1\n\tTCP_REPAIR_OPTIONS                          = 0x16\n\tTCP_REPAIR_QUEUE                            = 0x14\n\tTCP_REPAIR_WINDOW                           = 0x1d\n\tTCP_SAVED_SYN                               = 0x1c\n\tTCP_SAVE_SYN                                = 0x1b\n\tTCP_SYNCNT                                  = 0x7\n\tTCP_S_DATA_IN                               = 0x4\n\tTCP_S_DATA_OUT                              = 0x8\n\tTCP_THIN_DUPACK                             = 0x11\n\tTCP_THIN_LINEAR_TIMEOUTS                    = 0x10\n\tTCP_TIMESTAMP                               = 0x18\n\tTCP_TX_DELAY                                = 0x25\n\tTCP_ULP                                     = 0x1f\n\tTCP_USER_TIMEOUT                            = 0x12\n\tTCP_WINDOW_CLAMP                            = 0xa\n\tTCP_ZEROCOPY_RECEIVE                        = 0x23\n\tTFD_TIMER_ABSTIME                           = 0x1\n\tTFD_TIMER_CANCEL_ON_SET                     = 0x2\n\tTIMER_ABSTIME                               = 0x1\n\tTIOCM_DTR                                   = 0x2\n\tTIOCM_LE                                    = 0x1\n\tTIOCM_RTS                                   = 0x4\n\tTIOCPKT_DATA                                = 0x0\n\tTIOCPKT_DOSTOP                              = 0x20\n\tTIOCPKT_FLUSHREAD                           = 0x1\n\tTIOCPKT_FLUSHWRITE                          = 0x2\n\tTIOCPKT_IOCTL                               = 0x40\n\tTIOCPKT_NOSTOP                              = 0x10\n\tTIOCPKT_START                               = 0x8\n\tTIOCPKT_STOP                                = 0x4\n\tTIPC_ADDR_ID                                = 0x3\n\tTIPC_ADDR_MCAST                             = 0x1\n\tTIPC_ADDR_NAME                              = 0x2\n\tTIPC_ADDR_NAMESEQ                           = 0x1\n\tTIPC_AEAD_ALG_NAME                          = 0x20\n\tTIPC_AEAD_KEYLEN_MAX                        = 0x24\n\tTIPC_AEAD_KEYLEN_MIN                        = 0x14\n\tTIPC_AEAD_KEY_SIZE_MAX                      = 0x48\n\tTIPC_CFG_SRV                                = 0x0\n\tTIPC_CLUSTER_BITS                           = 0xc\n\tTIPC_CLUSTER_MASK                           = 0xfff000\n\tTIPC_CLUSTER_OFFSET                         = 0xc\n\tTIPC_CLUSTER_SIZE                           = 0xfff\n\tTIPC_CONN_SHUTDOWN                          = 0x5\n\tTIPC_CONN_TIMEOUT                           = 0x82\n\tTIPC_CRITICAL_IMPORTANCE                    = 0x3\n\tTIPC_DESTNAME                               = 0x3\n\tTIPC_DEST_DROPPABLE                         = 0x81\n\tTIPC_ERRINFO                                = 0x1\n\tTIPC_ERR_NO_NAME                            = 0x1\n\tTIPC_ERR_NO_NODE                            = 0x3\n\tTIPC_ERR_NO_PORT                            = 0x2\n\tTIPC_ERR_OVERLOAD                           = 0x4\n\tTIPC_GROUP_JOIN                             = 0x87\n\tTIPC_GROUP_LEAVE                            = 0x88\n\tTIPC_GROUP_LOOPBACK                         = 0x1\n\tTIPC_GROUP_MEMBER_EVTS                      = 0x2\n\tTIPC_HIGH_IMPORTANCE                        = 0x2\n\tTIPC_IMPORTANCE                             = 0x7f\n\tTIPC_LINK_STATE                             = 0x2\n\tTIPC_LOW_IMPORTANCE                         = 0x0\n\tTIPC_MAX_BEARER_NAME                        = 0x20\n\tTIPC_MAX_IF_NAME                            = 0x10\n\tTIPC_MAX_LINK_NAME                          = 0x44\n\tTIPC_MAX_MEDIA_NAME                         = 0x10\n\tTIPC_MAX_USER_MSG_SIZE                      = 0x101d0\n\tTIPC_MCAST_BROADCAST                        = 0x85\n\tTIPC_MCAST_REPLICAST                        = 0x86\n\tTIPC_MEDIUM_IMPORTANCE                      = 0x1\n\tTIPC_NODEID_LEN                             = 0x10\n\tTIPC_NODELAY                                = 0x8a\n\tTIPC_NODE_BITS                              = 0xc\n\tTIPC_NODE_MASK                              = 0xfff\n\tTIPC_NODE_OFFSET                            = 0x0\n\tTIPC_NODE_RECVQ_DEPTH                       = 0x83\n\tTIPC_NODE_SIZE                              = 0xfff\n\tTIPC_NODE_STATE                             = 0x0\n\tTIPC_OK                                     = 0x0\n\tTIPC_PUBLISHED                              = 0x1\n\tTIPC_REKEYING_NOW                           = 0xffffffff\n\tTIPC_RESERVED_TYPES                         = 0x40\n\tTIPC_RETDATA                                = 0x2\n\tTIPC_SERVICE_ADDR                           = 0x2\n\tTIPC_SERVICE_RANGE                          = 0x1\n\tTIPC_SOCKET_ADDR                            = 0x3\n\tTIPC_SOCK_RECVQ_DEPTH                       = 0x84\n\tTIPC_SOCK_RECVQ_USED                        = 0x89\n\tTIPC_SRC_DROPPABLE                          = 0x80\n\tTIPC_SUBSCR_TIMEOUT                         = 0x3\n\tTIPC_SUB_CANCEL                             = 0x4\n\tTIPC_SUB_PORTS                              = 0x1\n\tTIPC_SUB_SERVICE                            = 0x2\n\tTIPC_TOP_SRV                                = 0x1\n\tTIPC_WAIT_FOREVER                           = 0xffffffff\n\tTIPC_WITHDRAWN                              = 0x2\n\tTIPC_ZONE_BITS                              = 0x8\n\tTIPC_ZONE_CLUSTER_MASK                      = 0xfffff000\n\tTIPC_ZONE_MASK                              = 0xff000000\n\tTIPC_ZONE_OFFSET                            = 0x18\n\tTIPC_ZONE_SCOPE                             = 0x1\n\tTIPC_ZONE_SIZE                              = 0xff\n\tTMPFS_MAGIC                                 = 0x1021994\n\tTPACKET_ALIGNMENT                           = 0x10\n\tTPACKET_HDRLEN                              = 0x34\n\tTP_STATUS_AVAILABLE                         = 0x0\n\tTP_STATUS_BLK_TMO                           = 0x20\n\tTP_STATUS_COPY                              = 0x2\n\tTP_STATUS_CSUMNOTREADY                      = 0x8\n\tTP_STATUS_CSUM_VALID                        = 0x80\n\tTP_STATUS_GSO_TCP                           = 0x100\n\tTP_STATUS_KERNEL                            = 0x0\n\tTP_STATUS_LOSING                            = 0x4\n\tTP_STATUS_SENDING                           = 0x2\n\tTP_STATUS_SEND_REQUEST                      = 0x1\n\tTP_STATUS_TS_RAW_HARDWARE                   = 0x80000000\n\tTP_STATUS_TS_SOFTWARE                       = 0x20000000\n\tTP_STATUS_TS_SYS_HARDWARE                   = 0x40000000\n\tTP_STATUS_USER                              = 0x1\n\tTP_STATUS_VLAN_TPID_VALID                   = 0x40\n\tTP_STATUS_VLAN_VALID                        = 0x10\n\tTP_STATUS_WRONG_FORMAT                      = 0x4\n\tTRACEFS_MAGIC                               = 0x74726163\n\tTS_COMM_LEN                                 = 0x20\n\tUBI_IOCECNFO                                = 0xc01c6f06\n\tUDF_SUPER_MAGIC                             = 0x15013346\n\tUDP_CORK                                    = 0x1\n\tUDP_ENCAP                                   = 0x64\n\tUDP_ENCAP_ESPINUDP                          = 0x2\n\tUDP_ENCAP_ESPINUDP_NON_IKE                  = 0x1\n\tUDP_ENCAP_GTP0                              = 0x4\n\tUDP_ENCAP_GTP1U                             = 0x5\n\tUDP_ENCAP_L2TPINUDP                         = 0x3\n\tUDP_GRO                                     = 0x68\n\tUDP_NO_CHECK6_RX                            = 0x66\n\tUDP_NO_CHECK6_TX                            = 0x65\n\tUDP_SEGMENT                                 = 0x67\n\tUMOUNT_NOFOLLOW                             = 0x8\n\tUSBDEVICE_SUPER_MAGIC                       = 0x9fa2\n\tUTIME_NOW                                   = 0x3fffffff\n\tUTIME_OMIT                                  = 0x3ffffffe\n\tV9FS_MAGIC                                  = 0x1021997\n\tVERASE                                      = 0x2\n\tVER_FLG_BASE                                = 0x1\n\tVER_FLG_WEAK                                = 0x2\n\tVINTR                                       = 0x0\n\tVKILL                                       = 0x3\n\tVLNEXT                                      = 0xf\n\tVMADDR_CID_ANY                              = 0xffffffff\n\tVMADDR_CID_HOST                             = 0x2\n\tVMADDR_CID_HYPERVISOR                       = 0x0\n\tVMADDR_CID_LOCAL                            = 0x1\n\tVMADDR_FLAG_TO_HOST                         = 0x1\n\tVMADDR_PORT_ANY                             = 0xffffffff\n\tVM_SOCKETS_INVALID_VERSION                  = 0xffffffff\n\tVQUIT                                       = 0x1\n\tVT0                                         = 0x0\n\tWAKE_MAGIC                                  = 0x20\n\tWALL                                        = 0x40000000\n\tWCLONE                                      = 0x80000000\n\tWCONTINUED                                  = 0x8\n\tWDIOC_SETPRETIMEOUT                         = 0xc0045708\n\tWDIOC_SETTIMEOUT                            = 0xc0045706\n\tWDIOF_ALARMONLY                             = 0x400\n\tWDIOF_CARDRESET                             = 0x20\n\tWDIOF_EXTERN1                               = 0x4\n\tWDIOF_EXTERN2                               = 0x8\n\tWDIOF_FANFAULT                              = 0x2\n\tWDIOF_KEEPALIVEPING                         = 0x8000\n\tWDIOF_MAGICCLOSE                            = 0x100\n\tWDIOF_OVERHEAT                              = 0x1\n\tWDIOF_POWEROVER                             = 0x40\n\tWDIOF_POWERUNDER                            = 0x10\n\tWDIOF_PRETIMEOUT                            = 0x200\n\tWDIOF_SETTIMEOUT                            = 0x80\n\tWDIOF_UNKNOWN                               = -0x1\n\tWDIOS_DISABLECARD                           = 0x1\n\tWDIOS_ENABLECARD                            = 0x2\n\tWDIOS_TEMPPANIC                             = 0x4\n\tWDIOS_UNKNOWN                               = -0x1\n\tWEXITED                                     = 0x4\n\tWGALLOWEDIP_A_MAX                           = 0x4\n\tWGDEVICE_A_MAX                              = 0x8\n\tWGPEER_A_MAX                                = 0xa\n\tWG_CMD_MAX                                  = 0x1\n\tWG_GENL_NAME                                = \"wireguard\"\n\tWG_GENL_VERSION                             = 0x1\n\tWG_KEY_LEN                                  = 0x20\n\tWIN_ACKMEDIACHANGE                          = 0xdb\n\tWIN_CHECKPOWERMODE1                         = 0xe5\n\tWIN_CHECKPOWERMODE2                         = 0x98\n\tWIN_DEVICE_RESET                            = 0x8\n\tWIN_DIAGNOSE                                = 0x90\n\tWIN_DOORLOCK                                = 0xde\n\tWIN_DOORUNLOCK                              = 0xdf\n\tWIN_DOWNLOAD_MICROCODE                      = 0x92\n\tWIN_FLUSH_CACHE                             = 0xe7\n\tWIN_FLUSH_CACHE_EXT                         = 0xea\n\tWIN_FORMAT                                  = 0x50\n\tWIN_GETMEDIASTATUS                          = 0xda\n\tWIN_IDENTIFY                                = 0xec\n\tWIN_IDENTIFY_DMA                            = 0xee\n\tWIN_IDLEIMMEDIATE                           = 0xe1\n\tWIN_INIT                                    = 0x60\n\tWIN_MEDIAEJECT                              = 0xed\n\tWIN_MULTREAD                                = 0xc4\n\tWIN_MULTREAD_EXT                            = 0x29\n\tWIN_MULTWRITE                               = 0xc5\n\tWIN_MULTWRITE_EXT                           = 0x39\n\tWIN_NOP                                     = 0x0\n\tWIN_PACKETCMD                               = 0xa0\n\tWIN_PIDENTIFY                               = 0xa1\n\tWIN_POSTBOOT                                = 0xdc\n\tWIN_PREBOOT                                 = 0xdd\n\tWIN_QUEUED_SERVICE                          = 0xa2\n\tWIN_READ                                    = 0x20\n\tWIN_READDMA                                 = 0xc8\n\tWIN_READDMA_EXT                             = 0x25\n\tWIN_READDMA_ONCE                            = 0xc9\n\tWIN_READDMA_QUEUED                          = 0xc7\n\tWIN_READDMA_QUEUED_EXT                      = 0x26\n\tWIN_READ_BUFFER                             = 0xe4\n\tWIN_READ_EXT                                = 0x24\n\tWIN_READ_LONG                               = 0x22\n\tWIN_READ_LONG_ONCE                          = 0x23\n\tWIN_READ_NATIVE_MAX                         = 0xf8\n\tWIN_READ_NATIVE_MAX_EXT                     = 0x27\n\tWIN_READ_ONCE                               = 0x21\n\tWIN_RECAL                                   = 0x10\n\tWIN_RESTORE                                 = 0x10\n\tWIN_SECURITY_DISABLE                        = 0xf6\n\tWIN_SECURITY_ERASE_PREPARE                  = 0xf3\n\tWIN_SECURITY_ERASE_UNIT                     = 0xf4\n\tWIN_SECURITY_FREEZE_LOCK                    = 0xf5\n\tWIN_SECURITY_SET_PASS                       = 0xf1\n\tWIN_SECURITY_UNLOCK                         = 0xf2\n\tWIN_SEEK                                    = 0x70\n\tWIN_SETFEATURES                             = 0xef\n\tWIN_SETIDLE1                                = 0xe3\n\tWIN_SETIDLE2                                = 0x97\n\tWIN_SETMULT                                 = 0xc6\n\tWIN_SET_MAX                                 = 0xf9\n\tWIN_SET_MAX_EXT                             = 0x37\n\tWIN_SLEEPNOW1                               = 0xe6\n\tWIN_SLEEPNOW2                               = 0x99\n\tWIN_SMART                                   = 0xb0\n\tWIN_SPECIFY                                 = 0x91\n\tWIN_SRST                                    = 0x8\n\tWIN_STANDBY                                 = 0xe2\n\tWIN_STANDBY2                                = 0x96\n\tWIN_STANDBYNOW1                             = 0xe0\n\tWIN_STANDBYNOW2                             = 0x94\n\tWIN_VERIFY                                  = 0x40\n\tWIN_VERIFY_EXT                              = 0x42\n\tWIN_VERIFY_ONCE                             = 0x41\n\tWIN_WRITE                                   = 0x30\n\tWIN_WRITEDMA                                = 0xca\n\tWIN_WRITEDMA_EXT                            = 0x35\n\tWIN_WRITEDMA_ONCE                           = 0xcb\n\tWIN_WRITEDMA_QUEUED                         = 0xcc\n\tWIN_WRITEDMA_QUEUED_EXT                     = 0x36\n\tWIN_WRITE_BUFFER                            = 0xe8\n\tWIN_WRITE_EXT                               = 0x34\n\tWIN_WRITE_LONG                              = 0x32\n\tWIN_WRITE_LONG_ONCE                         = 0x33\n\tWIN_WRITE_ONCE                              = 0x31\n\tWIN_WRITE_SAME                              = 0xe9\n\tWIN_WRITE_VERIFY                            = 0x3c\n\tWNOHANG                                     = 0x1\n\tWNOTHREAD                                   = 0x20000000\n\tWNOWAIT                                     = 0x1000000\n\tWSTOPPED                                    = 0x2\n\tWUNTRACED                                   = 0x2\n\tXATTR_CREATE                                = 0x1\n\tXATTR_REPLACE                               = 0x2\n\tXDP_COPY                                    = 0x2\n\tXDP_FLAGS_DRV_MODE                          = 0x4\n\tXDP_FLAGS_HW_MODE                           = 0x8\n\tXDP_FLAGS_MASK                              = 0x1f\n\tXDP_FLAGS_MODES                             = 0xe\n\tXDP_FLAGS_REPLACE                           = 0x10\n\tXDP_FLAGS_SKB_MODE                          = 0x2\n\tXDP_FLAGS_UPDATE_IF_NOEXIST                 = 0x1\n\tXDP_MMAP_OFFSETS                            = 0x1\n\tXDP_OPTIONS                                 = 0x8\n\tXDP_OPTIONS_ZEROCOPY                        = 0x1\n\tXDP_PACKET_HEADROOM                         = 0x100\n\tXDP_PGOFF_RX_RING                           = 0x0\n\tXDP_PGOFF_TX_RING                           = 0x80000000\n\tXDP_PKT_CONTD                               = 0x1\n\tXDP_RING_NEED_WAKEUP                        = 0x1\n\tXDP_RX_RING                                 = 0x2\n\tXDP_SHARED_UMEM                             = 0x1\n\tXDP_STATISTICS                              = 0x7\n\tXDP_TXMD_FLAGS_CHECKSUM                     = 0x2\n\tXDP_TXMD_FLAGS_LAUNCH_TIME                  = 0x4\n\tXDP_TXMD_FLAGS_TIMESTAMP                    = 0x1\n\tXDP_TX_METADATA                             = 0x2\n\tXDP_TX_RING                                 = 0x3\n\tXDP_UMEM_COMPLETION_RING                    = 0x6\n\tXDP_UMEM_FILL_RING                          = 0x5\n\tXDP_UMEM_PGOFF_COMPLETION_RING              = 0x180000000\n\tXDP_UMEM_PGOFF_FILL_RING                    = 0x100000000\n\tXDP_UMEM_REG                                = 0x4\n\tXDP_UMEM_TX_METADATA_LEN                    = 0x4\n\tXDP_UMEM_TX_SW_CSUM                         = 0x2\n\tXDP_UMEM_UNALIGNED_CHUNK_FLAG               = 0x1\n\tXDP_USE_NEED_WAKEUP                         = 0x8\n\tXDP_USE_SG                                  = 0x10\n\tXDP_ZEROCOPY                                = 0x4\n\tXENFS_SUPER_MAGIC                           = 0xabba1974\n\tXFS_SUPER_MAGIC                             = 0x58465342\n\tZONEFS_MAGIC                                = 0x5a4f4653\n\t_HIDIOCGRAWNAME_LEN                         = 0x80\n\t_HIDIOCGRAWPHYS_LEN                         = 0x40\n\t_HIDIOCGRAWUNIQ_LEN                         = 0x40\n)\n\n// Errors\nconst (\n\tE2BIG       = syscall.Errno(0x7)\n\tEACCES      = syscall.Errno(0xd)\n\tEAGAIN      = syscall.Errno(0xb)\n\tEBADF       = syscall.Errno(0x9)\n\tEBUSY       = syscall.Errno(0x10)\n\tECHILD      = syscall.Errno(0xa)\n\tEDOM        = syscall.Errno(0x21)\n\tEEXIST      = syscall.Errno(0x11)\n\tEFAULT      = syscall.Errno(0xe)\n\tEFBIG       = syscall.Errno(0x1b)\n\tEINTR       = syscall.Errno(0x4)\n\tEINVAL      = syscall.Errno(0x16)\n\tEIO         = syscall.Errno(0x5)\n\tEISDIR      = syscall.Errno(0x15)\n\tEMFILE      = syscall.Errno(0x18)\n\tEMLINK      = syscall.Errno(0x1f)\n\tENFILE      = syscall.Errno(0x17)\n\tENODEV      = syscall.Errno(0x13)\n\tENOENT      = syscall.Errno(0x2)\n\tENOEXEC     = syscall.Errno(0x8)\n\tENOMEM      = syscall.Errno(0xc)\n\tENOSPC      = syscall.Errno(0x1c)\n\tENOTBLK     = syscall.Errno(0xf)\n\tENOTDIR     = syscall.Errno(0x14)\n\tENOTTY      = syscall.Errno(0x19)\n\tENXIO       = syscall.Errno(0x6)\n\tEPERM       = syscall.Errno(0x1)\n\tEPIPE       = syscall.Errno(0x20)\n\tERANGE      = syscall.Errno(0x22)\n\tEROFS       = syscall.Errno(0x1e)\n\tESPIPE      = syscall.Errno(0x1d)\n\tESRCH       = syscall.Errno(0x3)\n\tETXTBSY     = syscall.Errno(0x1a)\n\tEWOULDBLOCK = syscall.Errno(0xb)\n\tEXDEV       = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT = syscall.Signal(0x6)\n\tSIGALRM = syscall.Signal(0xe)\n\tSIGFPE  = syscall.Signal(0x8)\n\tSIGHUP  = syscall.Signal(0x1)\n\tSIGILL  = syscall.Signal(0x4)\n\tSIGINT  = syscall.Signal(0x2)\n\tSIGIOT  = syscall.Signal(0x6)\n\tSIGKILL = syscall.Signal(0x9)\n\tSIGPIPE = syscall.Signal(0xd)\n\tSIGQUIT = syscall.Signal(0x3)\n\tSIGSEGV = syscall.Signal(0xb)\n\tSIGTERM = syscall.Signal(0xf)\n\tSIGTRAP = syscall.Signal(0x5)\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_386.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/386/include -m32\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80041270\n\tBLKBSZSET                        = 0x40041271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80041272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFP_XSTATE_MAGIC2                 = 0x46505845\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80046601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40046602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0xc\n\tF_GETLK64                        = 0xc\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0xd\n\tF_SETLK64                        = 0xd\n\tF_SETLKW                         = 0xe\n\tF_SETLKW64                       = 0xe\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_32BIT                        = 0x40\n\tMAP_ABOVE4G                      = 0x80\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc03c4d1a\n\tMEMREADOOB                       = 0xc00c4d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc00c4d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x20\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x4000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x8000\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40042406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8008743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40087446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x400c744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40087447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETFPXREGS                = 0x12\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETFPXREGS                = 0x13\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SINGLEBLOCK               = 0x21\n\tPTRACE_SYSEMU                    = 0x1f\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x20\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8004700d\n\tRTC_EPOCH_SET                    = 0x4004700e\n\tRTC_IRQP_READ                    = 0x8004700b\n\tRTC_IRQP_SET                     = 0x4004700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x801c7011\n\tRTC_PLL_SET                      = 0x401c7012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x400854d5\n\tTUNDETACHFILTER                  = 0x400854d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x800854db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x20\n\tX86_FXSR_MAGIC                   = 0x0\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/amd64/include -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80081270\n\tBLKBSZSET                        = 0x40081271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80081272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFP_XSTATE_MAGIC2                 = 0x46505845\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0x5\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_32BIT                        = 0x40\n\tMAP_ABOVE4G                      = 0x80\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x4000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8010743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40107446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x4010744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40107447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_ARCH_PRCTL                = 0x1e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETFPXREGS                = 0x12\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETFPXREGS                = 0x13\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SINGLEBLOCK               = 0x21\n\tPTRACE_SYSEMU                    = 0x1f\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x20\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8008700d\n\tRTC_EPOCH_SET                    = 0x4008700e\n\tRTC_IRQP_READ                    = 0x8008700b\n\tRTC_IRQP_SET                     = 0x4008700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x80207011\n\tRTC_PLL_SET                      = 0x40207012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x401054d5\n\tTUNDETACHFILTER                  = 0x401054d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x801054db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_arm.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/arm/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80041270\n\tBLKBSZSET                        = 0x40041271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80041272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80046601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40046602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0xc\n\tF_GETLK64                        = 0xc\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0xd\n\tF_SETLK64                        = 0xd\n\tF_SETLKW                         = 0xe\n\tF_SETLKW64                       = 0xe\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc00c4d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc00c4d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x20\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x10000\n\tO_DIRECTORY                      = 0x4000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x20000\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x8000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x404000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40042406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8008743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40087446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x400c744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40087447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_GETCRUNCHREGS             = 0x19\n\tPTRACE_GETFDPIC                  = 0x1f\n\tPTRACE_GETFDPIC_EXEC             = 0x0\n\tPTRACE_GETFDPIC_INTERP           = 0x1\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETHBPREGS                = 0x1d\n\tPTRACE_GETVFPREGS                = 0x1b\n\tPTRACE_GETWMMXREGS               = 0x12\n\tPTRACE_GET_THREAD_AREA           = 0x16\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_SETCRUNCHREGS             = 0x1a\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETHBPREGS                = 0x1e\n\tPTRACE_SETVFPREGS                = 0x1c\n\tPTRACE_SETWMMXREGS               = 0x13\n\tPTRACE_SET_SYSCALL               = 0x17\n\tPT_DATA_ADDR                     = 0x10004\n\tPT_TEXT_ADDR                     = 0x10000\n\tPT_TEXT_END_ADDR                 = 0x10008\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8004700d\n\tRTC_EPOCH_SET                    = 0x4004700e\n\tRTC_IRQP_READ                    = 0x8004700b\n\tRTC_IRQP_SET                     = 0x4004700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x801c7011\n\tRTC_PLL_SET                      = 0x401c7012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x400854d5\n\tTUNDETACHFILTER                  = 0x400854d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x800854db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x20\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/arm64/include -fsigned-char\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80081270\n\tBLKBSZSET                        = 0x40081271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80081272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tESR_MAGIC                        = 0x45535201\n\tEXTPROC                          = 0x10000\n\tEXTRA_MAGIC                      = 0x45585401\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFPMR_MAGIC                       = 0x46504d52\n\tFPSIMD_MAGIC                     = 0x46508001\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0x5\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tGCS_MAGIC                        = 0x47435300\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x10000\n\tO_DIRECTORY                      = 0x4000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x8000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x404000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPOE_MAGIC                        = 0x504f4530\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8010743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40107446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x4010744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40107447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPROT_BTI                         = 0x10\n\tPROT_MTE                         = 0x20\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_PEEKMTETAGS               = 0x21\n\tPTRACE_POKEMTETAGS               = 0x22\n\tPTRACE_SYSEMU                    = 0x1f\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x20\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8008700d\n\tRTC_EPOCH_SET                    = 0x4008700e\n\tRTC_IRQP_READ                    = 0x8008700b\n\tRTC_IRQP_SET                     = 0x4008700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x80207011\n\tRTC_PLL_SET                      = 0x40207012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tSVE_MAGIC                        = 0x53564501\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTPIDR2_MAGIC                     = 0x54504902\n\tTUNATTACHFILTER                  = 0x401054d5\n\tTUNDETACHFILTER                  = 0x401054d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x801054db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\tZA_MAGIC                         = 0x54366345\n\tZT_MAGIC                         = 0x5a544e01\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/loong64/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build loong64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80081270\n\tBLKBSZSET                        = 0x40081271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80081272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFPU_CTX_MAGIC                    = 0x46505501\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0x5\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tLASX_CTX_MAGIC                   = 0x41535801\n\tLBT_CTX_MAGIC                    = 0x42540001\n\tLSX_CTX_MAGIC                    = 0x53580001\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x4000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8010743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40107446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x4010744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40107447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_SYSEMU                    = 0x1f\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x20\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8008700d\n\tRTC_EPOCH_SET                    = 0x4008700e\n\tRTC_IRQP_READ                    = 0x8008700b\n\tRTC_IRQP_SET                     = 0x4008700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x80207011\n\tRTC_PLL_SET                      = 0x40207012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x401054d5\n\tTUNDETACHFILTER                  = 0x401054d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x801054db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_mips.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/mips/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40041270\n\tBLKBSZSET                        = 0x80041271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40041272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x80\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x2000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40046601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80046602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0x21\n\tF_GETLK64                        = 0x21\n\tF_GETOWN                         = 0x17\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x22\n\tF_SETLK64                        = 0x22\n\tF_SETLKW                         = 0x23\n\tF_SETLKW64                       = 0x23\n\tF_SETOWN                         = 0x18\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x100\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x80\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x800\n\tMAP_ANONYMOUS                    = 0x800\n\tMAP_DENYWRITE                    = 0x2000\n\tMAP_EXECUTABLE                   = 0x4000\n\tMAP_GROWSDOWN                    = 0x1000\n\tMAP_HUGETLB                      = 0x80000\n\tMAP_LOCKED                       = 0x8000\n\tMAP_NONBLOCK                     = 0x20000\n\tMAP_NORESERVE                    = 0x400\n\tMAP_POPULATE                     = 0x10000\n\tMAP_RENAME                       = 0x800\n\tMAP_STACK                        = 0x40000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc00c4d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc00c4d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x20\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x8\n\tO_ASYNC                          = 0x1000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x100\n\tO_DIRECT                         = 0x8000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x10\n\tO_EXCL                           = 0x400\n\tO_FSYNC                          = 0x4010\n\tO_LARGEFILE                      = 0x2000\n\tO_NDELAY                         = 0x80\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x800\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x80\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x4010\n\tO_SYNC                           = 0x4010\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80042406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4008743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80087446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x800c744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80087447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPR_SET_PTRACER_ANY               = 0xffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_GET_THREAD_AREA_3264      = 0xc4\n\tPTRACE_GET_WATCH_REGS            = 0xd0\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_PEEKDATA_3264             = 0xc1\n\tPTRACE_PEEKTEXT_3264             = 0xc0\n\tPTRACE_POKEDATA_3264             = 0xc3\n\tPTRACE_POKETEXT_3264             = 0xc2\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SET_WATCH_REGS            = 0xd1\n\tRLIMIT_AS                        = 0x6\n\tRLIMIT_MEMLOCK                   = 0x9\n\tRLIMIT_NOFILE                    = 0x5\n\tRLIMIT_NPROC                     = 0x8\n\tRLIMIT_RSS                       = 0x7\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4004700d\n\tRTC_EPOCH_SET                    = 0x8004700e\n\tRTC_IRQP_READ                    = 0x4004700b\n\tRTC_IRQP_SET                     = 0x8004700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x401c7011\n\tRTC_PLL_SET                      = 0x801c7012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x80\n\tSIOCATMARK                       = 0x40047307\n\tSIOCGPGRP                        = 0x40047309\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x467f\n\tSIOCOUTQ                         = 0x7472\n\tSIOCSPGRP                        = 0x80047308\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x1\n\tSOCK_NONBLOCK                    = 0x80\n\tSOCK_STREAM                      = 0x2\n\tSOL_SOCKET                       = 0xffff\n\tSO_ACCEPTCONN                    = 0x1009\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x20\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x1029\n\tSO_DONTROUTE                     = 0x10\n\tSO_ERROR                         = 0x1007\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x8\n\tSO_LINGER                        = 0x80\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0x100\n\tSO_PASSCRED                      = 0x11\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x12\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1e\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x1028\n\tSO_RCVBUF                        = 0x1002\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x1004\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x1006\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x1006\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x4\n\tSO_REUSEPORT                     = 0x200\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x1001\n\tSO_SNDBUFFORCE                   = 0x1f\n\tSO_SNDLOWAT                      = 0x1003\n\tSO_SNDTIMEO                      = 0x1005\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x1005\n\tSO_STYLE                         = 0x1008\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x1008\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x5407\n\tTCGETA                           = 0x5401\n\tTCGETS                           = 0x540d\n\tTCGETS2                          = 0x4030542a\n\tTCSAFLUSH                        = 0x5410\n\tTCSBRK                           = 0x5405\n\tTCSBRKP                          = 0x5486\n\tTCSETA                           = 0x5402\n\tTCSETAF                          = 0x5404\n\tTCSETAW                          = 0x5403\n\tTCSETS                           = 0x540e\n\tTCSETS2                          = 0x8030542b\n\tTCSETSF                          = 0x5410\n\tTCSETSF2                         = 0x8030542d\n\tTCSETSW                          = 0x540f\n\tTCSETSW2                         = 0x8030542c\n\tTCXONC                           = 0x5406\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x80\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x80047478\n\tTIOCEXCL                         = 0x740d\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETD                         = 0x7400\n\tTIOCGETP                         = 0x7408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x5492\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x548b\n\tTIOCGLTC                         = 0x7474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x4020542e\n\tTIOCGSERIAL                      = 0x5484\n\tTIOCGSID                         = 0x7416\n\tTIOCGSOFTCAR                     = 0x5481\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x467f\n\tTIOCLINUX                        = 0x5483\n\tTIOCMBIC                         = 0x741c\n\tTIOCMBIS                         = 0x741b\n\tTIOCMGET                         = 0x741d\n\tTIOCMIWAIT                       = 0x5491\n\tTIOCMSET                         = 0x741a\n\tTIOCM_CAR                        = 0x100\n\tTIOCM_CD                         = 0x100\n\tTIOCM_CTS                        = 0x40\n\tTIOCM_DSR                        = 0x400\n\tTIOCM_RI                         = 0x200\n\tTIOCM_RNG                        = 0x200\n\tTIOCM_SR                         = 0x20\n\tTIOCM_ST                         = 0x10\n\tTIOCNOTTY                        = 0x5471\n\tTIOCNXCL                         = 0x740e\n\tTIOCOUTQ                         = 0x7472\n\tTIOCPKT                          = 0x5470\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x5480\n\tTIOCSERCONFIG                    = 0x5488\n\tTIOCSERGETLSR                    = 0x548e\n\tTIOCSERGETMULTI                  = 0x548f\n\tTIOCSERGSTRUCT                   = 0x548d\n\tTIOCSERGWILD                     = 0x5489\n\tTIOCSERSETMULTI                  = 0x5490\n\tTIOCSERSWILD                     = 0x548a\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x7401\n\tTIOCSETN                         = 0x740a\n\tTIOCSETP                         = 0x7409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x548c\n\tTIOCSLTC                         = 0x7475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0xc020542f\n\tTIOCSSERIAL                      = 0x5485\n\tTIOCSSOFTCAR                     = 0x5482\n\tTIOCSTI                          = 0x5472\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x8000\n\tTUNATTACHFILTER                  = 0x800854d5\n\tTUNDETACHFILTER                  = 0x800854d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x400854db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x10\n\tVEOL                             = 0x11\n\tVEOL2                            = 0x6\n\tVMIN                             = 0x4\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVSWTCH                           = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x20\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL   = syscall.Errno(0x7e)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x7c)\n\tEALREADY        = syscall.Errno(0x95)\n\tEBADE           = syscall.Errno(0x32)\n\tEBADFD          = syscall.Errno(0x51)\n\tEBADMSG         = syscall.Errno(0x4d)\n\tEBADR           = syscall.Errno(0x33)\n\tEBADRQC         = syscall.Errno(0x36)\n\tEBADSLT         = syscall.Errno(0x37)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x9e)\n\tECHRNG          = syscall.Errno(0x25)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x82)\n\tECONNREFUSED    = syscall.Errno(0x92)\n\tECONNRESET      = syscall.Errno(0x83)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDEADLOCK       = syscall.Errno(0x38)\n\tEDESTADDRREQ    = syscall.Errno(0x60)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x46d)\n\tEHOSTDOWN       = syscall.Errno(0x93)\n\tEHOSTUNREACH    = syscall.Errno(0x94)\n\tEHWPOISON       = syscall.Errno(0xa8)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x58)\n\tEINIT           = syscall.Errno(0x8d)\n\tEINPROGRESS     = syscall.Errno(0x96)\n\tEISCONN         = syscall.Errno(0x85)\n\tEISNAM          = syscall.Errno(0x8b)\n\tEKEYEXPIRED     = syscall.Errno(0xa2)\n\tEKEYREJECTED    = syscall.Errno(0xa4)\n\tEKEYREVOKED     = syscall.Errno(0xa3)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELIBACC         = syscall.Errno(0x53)\n\tELIBBAD         = syscall.Errno(0x54)\n\tELIBEXEC        = syscall.Errno(0x57)\n\tELIBMAX         = syscall.Errno(0x56)\n\tELIBSCN         = syscall.Errno(0x55)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x5a)\n\tEMEDIUMTYPE     = syscall.Errno(0xa0)\n\tEMSGSIZE        = syscall.Errno(0x61)\n\tEMULTIHOP       = syscall.Errno(0x4a)\n\tENAMETOOLONG    = syscall.Errno(0x4e)\n\tENAVAIL         = syscall.Errno(0x8a)\n\tENETDOWN        = syscall.Errno(0x7f)\n\tENETRESET       = syscall.Errno(0x81)\n\tENETUNREACH     = syscall.Errno(0x80)\n\tENOANO          = syscall.Errno(0x35)\n\tENOBUFS         = syscall.Errno(0x84)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0xa1)\n\tENOLCK          = syscall.Errno(0x2e)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x9f)\n\tENOMSG          = syscall.Errno(0x23)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x63)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x59)\n\tENOTCONN        = syscall.Errno(0x86)\n\tENOTEMPTY       = syscall.Errno(0x5d)\n\tENOTNAM         = syscall.Errno(0x89)\n\tENOTRECOVERABLE = syscall.Errno(0xa6)\n\tENOTSOCK        = syscall.Errno(0x5f)\n\tENOTSUP         = syscall.Errno(0x7a)\n\tENOTUNIQ        = syscall.Errno(0x50)\n\tEOPNOTSUPP      = syscall.Errno(0x7a)\n\tEOVERFLOW       = syscall.Errno(0x4f)\n\tEOWNERDEAD      = syscall.Errno(0xa5)\n\tEPFNOSUPPORT    = syscall.Errno(0x7b)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE      = syscall.Errno(0x62)\n\tEREMCHG         = syscall.Errno(0x52)\n\tEREMDEV         = syscall.Errno(0x8e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x8c)\n\tERESTART        = syscall.Errno(0x5b)\n\tERFKILL         = syscall.Errno(0xa7)\n\tESHUTDOWN       = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x97)\n\tESTRPIPE        = syscall.Errno(0x5c)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x91)\n\tETOOMANYREFS    = syscall.Errno(0x90)\n\tEUCLEAN         = syscall.Errno(0x87)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x5e)\n\tEXFULL          = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x12)\n\tSIGCLD    = syscall.Signal(0x12)\n\tSIGCONT   = syscall.Signal(0x19)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGIO     = syscall.Signal(0x16)\n\tSIGPOLL   = syscall.Signal(0x16)\n\tSIGPROF   = syscall.Signal(0x1d)\n\tSIGPWR    = syscall.Signal(0x13)\n\tSIGSTOP   = syscall.Signal(0x17)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTSTP   = syscall.Signal(0x18)\n\tSIGTTIN   = syscall.Signal(0x1a)\n\tSIGTTOU   = syscall.Signal(0x1b)\n\tSIGURG    = syscall.Signal(0x15)\n\tSIGUSR1   = syscall.Signal(0x10)\n\tSIGUSR2   = syscall.Signal(0x11)\n\tSIGVTALRM = syscall.Signal(0x1c)\n\tSIGWINCH  = syscall.Signal(0x14)\n\tSIGXCPU   = syscall.Signal(0x1e)\n\tSIGXFSZ   = syscall.Signal(0x1f)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{46, \"ENOLCK\", \"no locks available\"},\n\t{50, \"EBADE\", \"invalid exchange\"},\n\t{51, \"EBADR\", \"invalid request descriptor\"},\n\t{52, \"EXFULL\", \"exchange full\"},\n\t{53, \"ENOANO\", \"no anode\"},\n\t{54, \"EBADRQC\", \"invalid request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"bad message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{87, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{89, \"ENOSYS\", \"function not implemented\"},\n\t{90, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{91, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{92, \"ESTRPIPE\", \"streams pipe error\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"ENOTSUP\", \"operation not supported\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{135, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{137, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{138, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{139, \"EISNAM\", \"is a named type file\"},\n\t{140, \"EREMOTEIO\", \"remote I/O error\"},\n\t{141, \"EINIT\", \"unknown error 141\"},\n\t{142, \"EREMDEV\", \"unknown error 142\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale file handle\"},\n\t{158, \"ECANCELED\", \"operation canceled\"},\n\t{159, \"ENOMEDIUM\", \"no medium found\"},\n\t{160, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{161, \"ENOKEY\", \"required key not available\"},\n\t{162, \"EKEYEXPIRED\", \"key has expired\"},\n\t{163, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{164, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{165, \"EOWNERDEAD\", \"owner died\"},\n\t{166, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{167, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{168, \"EHWPOISON\", \"memory page has hardware error\"},\n\t{1133, \"EDQUOT\", \"disk quota exceeded\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGCHLD\", \"child exited\"},\n\t{19, \"SIGPWR\", \"power failure\"},\n\t{20, \"SIGWINCH\", \"window changed\"},\n\t{21, \"SIGURG\", \"urgent I/O condition\"},\n\t{22, \"SIGIO\", \"I/O possible\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{29, \"SIGPROF\", \"profiling timer expired\"},\n\t{30, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{31, \"SIGXFSZ\", \"file size limit exceeded\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/mips64/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40081270\n\tBLKBSZSET                        = 0x80081271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40081272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x80\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x2000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0xe\n\tF_GETLK64                        = 0xe\n\tF_GETOWN                         = 0x17\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x18\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x100\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x80\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x800\n\tMAP_ANONYMOUS                    = 0x800\n\tMAP_DENYWRITE                    = 0x2000\n\tMAP_EXECUTABLE                   = 0x4000\n\tMAP_GROWSDOWN                    = 0x1000\n\tMAP_HUGETLB                      = 0x80000\n\tMAP_LOCKED                       = 0x8000\n\tMAP_NONBLOCK                     = 0x20000\n\tMAP_NORESERVE                    = 0x400\n\tMAP_POPULATE                     = 0x10000\n\tMAP_RENAME                       = 0x800\n\tMAP_STACK                        = 0x40000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x8\n\tO_ASYNC                          = 0x1000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x100\n\tO_DIRECT                         = 0x8000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x10\n\tO_EXCL                           = 0x400\n\tO_FSYNC                          = 0x4010\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x80\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x800\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x80\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x4010\n\tO_SYNC                           = 0x4010\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4010743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80107446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x8010744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80107447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_GET_THREAD_AREA_3264      = 0xc4\n\tPTRACE_GET_WATCH_REGS            = 0xd0\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_PEEKDATA_3264             = 0xc1\n\tPTRACE_PEEKTEXT_3264             = 0xc0\n\tPTRACE_POKEDATA_3264             = 0xc3\n\tPTRACE_POKETEXT_3264             = 0xc2\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SET_WATCH_REGS            = 0xd1\n\tRLIMIT_AS                        = 0x6\n\tRLIMIT_MEMLOCK                   = 0x9\n\tRLIMIT_NOFILE                    = 0x5\n\tRLIMIT_NPROC                     = 0x8\n\tRLIMIT_RSS                       = 0x7\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4008700d\n\tRTC_EPOCH_SET                    = 0x8008700e\n\tRTC_IRQP_READ                    = 0x4008700b\n\tRTC_IRQP_SET                     = 0x8008700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x40207011\n\tRTC_PLL_SET                      = 0x80207012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x80\n\tSIOCATMARK                       = 0x40047307\n\tSIOCGPGRP                        = 0x40047309\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x467f\n\tSIOCOUTQ                         = 0x7472\n\tSIOCSPGRP                        = 0x80047308\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x1\n\tSOCK_NONBLOCK                    = 0x80\n\tSOCK_STREAM                      = 0x2\n\tSOL_SOCKET                       = 0xffff\n\tSO_ACCEPTCONN                    = 0x1009\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x20\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x1029\n\tSO_DONTROUTE                     = 0x10\n\tSO_ERROR                         = 0x1007\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x8\n\tSO_LINGER                        = 0x80\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0x100\n\tSO_PASSCRED                      = 0x11\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x12\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1e\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x1028\n\tSO_RCVBUF                        = 0x1002\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x1004\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x1006\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x1006\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x4\n\tSO_REUSEPORT                     = 0x200\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x1001\n\tSO_SNDBUFFORCE                   = 0x1f\n\tSO_SNDLOWAT                      = 0x1003\n\tSO_SNDTIMEO                      = 0x1005\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x1005\n\tSO_STYLE                         = 0x1008\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x1008\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x5407\n\tTCGETA                           = 0x5401\n\tTCGETS                           = 0x540d\n\tTCGETS2                          = 0x4030542a\n\tTCSAFLUSH                        = 0x5410\n\tTCSBRK                           = 0x5405\n\tTCSBRKP                          = 0x5486\n\tTCSETA                           = 0x5402\n\tTCSETAF                          = 0x5404\n\tTCSETAW                          = 0x5403\n\tTCSETS                           = 0x540e\n\tTCSETS2                          = 0x8030542b\n\tTCSETSF                          = 0x5410\n\tTCSETSF2                         = 0x8030542d\n\tTCSETSW                          = 0x540f\n\tTCSETSW2                         = 0x8030542c\n\tTCXONC                           = 0x5406\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x80\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x80047478\n\tTIOCEXCL                         = 0x740d\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETD                         = 0x7400\n\tTIOCGETP                         = 0x7408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x5492\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x548b\n\tTIOCGLTC                         = 0x7474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x4020542e\n\tTIOCGSERIAL                      = 0x5484\n\tTIOCGSID                         = 0x7416\n\tTIOCGSOFTCAR                     = 0x5481\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x467f\n\tTIOCLINUX                        = 0x5483\n\tTIOCMBIC                         = 0x741c\n\tTIOCMBIS                         = 0x741b\n\tTIOCMGET                         = 0x741d\n\tTIOCMIWAIT                       = 0x5491\n\tTIOCMSET                         = 0x741a\n\tTIOCM_CAR                        = 0x100\n\tTIOCM_CD                         = 0x100\n\tTIOCM_CTS                        = 0x40\n\tTIOCM_DSR                        = 0x400\n\tTIOCM_RI                         = 0x200\n\tTIOCM_RNG                        = 0x200\n\tTIOCM_SR                         = 0x20\n\tTIOCM_ST                         = 0x10\n\tTIOCNOTTY                        = 0x5471\n\tTIOCNXCL                         = 0x740e\n\tTIOCOUTQ                         = 0x7472\n\tTIOCPKT                          = 0x5470\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x5480\n\tTIOCSERCONFIG                    = 0x5488\n\tTIOCSERGETLSR                    = 0x548e\n\tTIOCSERGETMULTI                  = 0x548f\n\tTIOCSERGSTRUCT                   = 0x548d\n\tTIOCSERGWILD                     = 0x5489\n\tTIOCSERSETMULTI                  = 0x5490\n\tTIOCSERSWILD                     = 0x548a\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x7401\n\tTIOCSETN                         = 0x740a\n\tTIOCSETP                         = 0x7409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x548c\n\tTIOCSLTC                         = 0x7475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0xc020542f\n\tTIOCSSERIAL                      = 0x5485\n\tTIOCSSOFTCAR                     = 0x5482\n\tTIOCSTI                          = 0x5472\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x8000\n\tTUNATTACHFILTER                  = 0x801054d5\n\tTUNDETACHFILTER                  = 0x801054d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x401054db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x10\n\tVEOL                             = 0x11\n\tVEOL2                            = 0x6\n\tVMIN                             = 0x4\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVSWTCH                           = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL   = syscall.Errno(0x7e)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x7c)\n\tEALREADY        = syscall.Errno(0x95)\n\tEBADE           = syscall.Errno(0x32)\n\tEBADFD          = syscall.Errno(0x51)\n\tEBADMSG         = syscall.Errno(0x4d)\n\tEBADR           = syscall.Errno(0x33)\n\tEBADRQC         = syscall.Errno(0x36)\n\tEBADSLT         = syscall.Errno(0x37)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x9e)\n\tECHRNG          = syscall.Errno(0x25)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x82)\n\tECONNREFUSED    = syscall.Errno(0x92)\n\tECONNRESET      = syscall.Errno(0x83)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDEADLOCK       = syscall.Errno(0x38)\n\tEDESTADDRREQ    = syscall.Errno(0x60)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x46d)\n\tEHOSTDOWN       = syscall.Errno(0x93)\n\tEHOSTUNREACH    = syscall.Errno(0x94)\n\tEHWPOISON       = syscall.Errno(0xa8)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x58)\n\tEINIT           = syscall.Errno(0x8d)\n\tEINPROGRESS     = syscall.Errno(0x96)\n\tEISCONN         = syscall.Errno(0x85)\n\tEISNAM          = syscall.Errno(0x8b)\n\tEKEYEXPIRED     = syscall.Errno(0xa2)\n\tEKEYREJECTED    = syscall.Errno(0xa4)\n\tEKEYREVOKED     = syscall.Errno(0xa3)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELIBACC         = syscall.Errno(0x53)\n\tELIBBAD         = syscall.Errno(0x54)\n\tELIBEXEC        = syscall.Errno(0x57)\n\tELIBMAX         = syscall.Errno(0x56)\n\tELIBSCN         = syscall.Errno(0x55)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x5a)\n\tEMEDIUMTYPE     = syscall.Errno(0xa0)\n\tEMSGSIZE        = syscall.Errno(0x61)\n\tEMULTIHOP       = syscall.Errno(0x4a)\n\tENAMETOOLONG    = syscall.Errno(0x4e)\n\tENAVAIL         = syscall.Errno(0x8a)\n\tENETDOWN        = syscall.Errno(0x7f)\n\tENETRESET       = syscall.Errno(0x81)\n\tENETUNREACH     = syscall.Errno(0x80)\n\tENOANO          = syscall.Errno(0x35)\n\tENOBUFS         = syscall.Errno(0x84)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0xa1)\n\tENOLCK          = syscall.Errno(0x2e)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x9f)\n\tENOMSG          = syscall.Errno(0x23)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x63)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x59)\n\tENOTCONN        = syscall.Errno(0x86)\n\tENOTEMPTY       = syscall.Errno(0x5d)\n\tENOTNAM         = syscall.Errno(0x89)\n\tENOTRECOVERABLE = syscall.Errno(0xa6)\n\tENOTSOCK        = syscall.Errno(0x5f)\n\tENOTSUP         = syscall.Errno(0x7a)\n\tENOTUNIQ        = syscall.Errno(0x50)\n\tEOPNOTSUPP      = syscall.Errno(0x7a)\n\tEOVERFLOW       = syscall.Errno(0x4f)\n\tEOWNERDEAD      = syscall.Errno(0xa5)\n\tEPFNOSUPPORT    = syscall.Errno(0x7b)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE      = syscall.Errno(0x62)\n\tEREMCHG         = syscall.Errno(0x52)\n\tEREMDEV         = syscall.Errno(0x8e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x8c)\n\tERESTART        = syscall.Errno(0x5b)\n\tERFKILL         = syscall.Errno(0xa7)\n\tESHUTDOWN       = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x97)\n\tESTRPIPE        = syscall.Errno(0x5c)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x91)\n\tETOOMANYREFS    = syscall.Errno(0x90)\n\tEUCLEAN         = syscall.Errno(0x87)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x5e)\n\tEXFULL          = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x12)\n\tSIGCLD    = syscall.Signal(0x12)\n\tSIGCONT   = syscall.Signal(0x19)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGIO     = syscall.Signal(0x16)\n\tSIGPOLL   = syscall.Signal(0x16)\n\tSIGPROF   = syscall.Signal(0x1d)\n\tSIGPWR    = syscall.Signal(0x13)\n\tSIGSTOP   = syscall.Signal(0x17)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTSTP   = syscall.Signal(0x18)\n\tSIGTTIN   = syscall.Signal(0x1a)\n\tSIGTTOU   = syscall.Signal(0x1b)\n\tSIGURG    = syscall.Signal(0x15)\n\tSIGUSR1   = syscall.Signal(0x10)\n\tSIGUSR2   = syscall.Signal(0x11)\n\tSIGVTALRM = syscall.Signal(0x1c)\n\tSIGWINCH  = syscall.Signal(0x14)\n\tSIGXCPU   = syscall.Signal(0x1e)\n\tSIGXFSZ   = syscall.Signal(0x1f)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{46, \"ENOLCK\", \"no locks available\"},\n\t{50, \"EBADE\", \"invalid exchange\"},\n\t{51, \"EBADR\", \"invalid request descriptor\"},\n\t{52, \"EXFULL\", \"exchange full\"},\n\t{53, \"ENOANO\", \"no anode\"},\n\t{54, \"EBADRQC\", \"invalid request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"bad message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{87, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{89, \"ENOSYS\", \"function not implemented\"},\n\t{90, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{91, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{92, \"ESTRPIPE\", \"streams pipe error\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"ENOTSUP\", \"operation not supported\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{135, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{137, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{138, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{139, \"EISNAM\", \"is a named type file\"},\n\t{140, \"EREMOTEIO\", \"remote I/O error\"},\n\t{141, \"EINIT\", \"unknown error 141\"},\n\t{142, \"EREMDEV\", \"unknown error 142\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale file handle\"},\n\t{158, \"ECANCELED\", \"operation canceled\"},\n\t{159, \"ENOMEDIUM\", \"no medium found\"},\n\t{160, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{161, \"ENOKEY\", \"required key not available\"},\n\t{162, \"EKEYEXPIRED\", \"key has expired\"},\n\t{163, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{164, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{165, \"EOWNERDEAD\", \"owner died\"},\n\t{166, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{167, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{168, \"EHWPOISON\", \"memory page has hardware error\"},\n\t{1133, \"EDQUOT\", \"disk quota exceeded\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGCHLD\", \"child exited\"},\n\t{19, \"SIGPWR\", \"power failure\"},\n\t{20, \"SIGWINCH\", \"window changed\"},\n\t{21, \"SIGURG\", \"urgent I/O condition\"},\n\t{22, \"SIGIO\", \"I/O possible\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{29, \"SIGPROF\", \"profiling timer expired\"},\n\t{30, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{31, \"SIGXFSZ\", \"file size limit exceeded\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/mips64le/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64le && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40081270\n\tBLKBSZSET                        = 0x80081271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40081272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x80\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x2000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0xe\n\tF_GETLK64                        = 0xe\n\tF_GETOWN                         = 0x17\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x18\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x100\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x80\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x800\n\tMAP_ANONYMOUS                    = 0x800\n\tMAP_DENYWRITE                    = 0x2000\n\tMAP_EXECUTABLE                   = 0x4000\n\tMAP_GROWSDOWN                    = 0x1000\n\tMAP_HUGETLB                      = 0x80000\n\tMAP_LOCKED                       = 0x8000\n\tMAP_NONBLOCK                     = 0x20000\n\tMAP_NORESERVE                    = 0x400\n\tMAP_POPULATE                     = 0x10000\n\tMAP_RENAME                       = 0x800\n\tMAP_STACK                        = 0x40000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x8\n\tO_ASYNC                          = 0x1000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x100\n\tO_DIRECT                         = 0x8000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x10\n\tO_EXCL                           = 0x400\n\tO_FSYNC                          = 0x4010\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x80\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x800\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x80\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x4010\n\tO_SYNC                           = 0x4010\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4010743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80107446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x8010744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80107447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_GET_THREAD_AREA_3264      = 0xc4\n\tPTRACE_GET_WATCH_REGS            = 0xd0\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_PEEKDATA_3264             = 0xc1\n\tPTRACE_PEEKTEXT_3264             = 0xc0\n\tPTRACE_POKEDATA_3264             = 0xc3\n\tPTRACE_POKETEXT_3264             = 0xc2\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SET_WATCH_REGS            = 0xd1\n\tRLIMIT_AS                        = 0x6\n\tRLIMIT_MEMLOCK                   = 0x9\n\tRLIMIT_NOFILE                    = 0x5\n\tRLIMIT_NPROC                     = 0x8\n\tRLIMIT_RSS                       = 0x7\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4008700d\n\tRTC_EPOCH_SET                    = 0x8008700e\n\tRTC_IRQP_READ                    = 0x4008700b\n\tRTC_IRQP_SET                     = 0x8008700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x40207011\n\tRTC_PLL_SET                      = 0x80207012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x80\n\tSIOCATMARK                       = 0x40047307\n\tSIOCGPGRP                        = 0x40047309\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x467f\n\tSIOCOUTQ                         = 0x7472\n\tSIOCSPGRP                        = 0x80047308\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x1\n\tSOCK_NONBLOCK                    = 0x80\n\tSOCK_STREAM                      = 0x2\n\tSOL_SOCKET                       = 0xffff\n\tSO_ACCEPTCONN                    = 0x1009\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x20\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x1029\n\tSO_DONTROUTE                     = 0x10\n\tSO_ERROR                         = 0x1007\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x8\n\tSO_LINGER                        = 0x80\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0x100\n\tSO_PASSCRED                      = 0x11\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x12\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1e\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x1028\n\tSO_RCVBUF                        = 0x1002\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x1004\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x1006\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x1006\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x4\n\tSO_REUSEPORT                     = 0x200\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x1001\n\tSO_SNDBUFFORCE                   = 0x1f\n\tSO_SNDLOWAT                      = 0x1003\n\tSO_SNDTIMEO                      = 0x1005\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x1005\n\tSO_STYLE                         = 0x1008\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x1008\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x5407\n\tTCGETA                           = 0x5401\n\tTCGETS                           = 0x540d\n\tTCGETS2                          = 0x4030542a\n\tTCSAFLUSH                        = 0x5410\n\tTCSBRK                           = 0x5405\n\tTCSBRKP                          = 0x5486\n\tTCSETA                           = 0x5402\n\tTCSETAF                          = 0x5404\n\tTCSETAW                          = 0x5403\n\tTCSETS                           = 0x540e\n\tTCSETS2                          = 0x8030542b\n\tTCSETSF                          = 0x5410\n\tTCSETSF2                         = 0x8030542d\n\tTCSETSW                          = 0x540f\n\tTCSETSW2                         = 0x8030542c\n\tTCXONC                           = 0x5406\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x80\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x80047478\n\tTIOCEXCL                         = 0x740d\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETD                         = 0x7400\n\tTIOCGETP                         = 0x7408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x5492\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x548b\n\tTIOCGLTC                         = 0x7474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x4020542e\n\tTIOCGSERIAL                      = 0x5484\n\tTIOCGSID                         = 0x7416\n\tTIOCGSOFTCAR                     = 0x5481\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x467f\n\tTIOCLINUX                        = 0x5483\n\tTIOCMBIC                         = 0x741c\n\tTIOCMBIS                         = 0x741b\n\tTIOCMGET                         = 0x741d\n\tTIOCMIWAIT                       = 0x5491\n\tTIOCMSET                         = 0x741a\n\tTIOCM_CAR                        = 0x100\n\tTIOCM_CD                         = 0x100\n\tTIOCM_CTS                        = 0x40\n\tTIOCM_DSR                        = 0x400\n\tTIOCM_RI                         = 0x200\n\tTIOCM_RNG                        = 0x200\n\tTIOCM_SR                         = 0x20\n\tTIOCM_ST                         = 0x10\n\tTIOCNOTTY                        = 0x5471\n\tTIOCNXCL                         = 0x740e\n\tTIOCOUTQ                         = 0x7472\n\tTIOCPKT                          = 0x5470\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x5480\n\tTIOCSERCONFIG                    = 0x5488\n\tTIOCSERGETLSR                    = 0x548e\n\tTIOCSERGETMULTI                  = 0x548f\n\tTIOCSERGSTRUCT                   = 0x548d\n\tTIOCSERGWILD                     = 0x5489\n\tTIOCSERSETMULTI                  = 0x5490\n\tTIOCSERSWILD                     = 0x548a\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x7401\n\tTIOCSETN                         = 0x740a\n\tTIOCSETP                         = 0x7409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x548c\n\tTIOCSLTC                         = 0x7475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0xc020542f\n\tTIOCSSERIAL                      = 0x5485\n\tTIOCSSOFTCAR                     = 0x5482\n\tTIOCSTI                          = 0x5472\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x8000\n\tTUNATTACHFILTER                  = 0x801054d5\n\tTUNDETACHFILTER                  = 0x801054d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x401054db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x10\n\tVEOL                             = 0x11\n\tVEOL2                            = 0x6\n\tVMIN                             = 0x4\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVSWTCH                           = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL   = syscall.Errno(0x7e)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x7c)\n\tEALREADY        = syscall.Errno(0x95)\n\tEBADE           = syscall.Errno(0x32)\n\tEBADFD          = syscall.Errno(0x51)\n\tEBADMSG         = syscall.Errno(0x4d)\n\tEBADR           = syscall.Errno(0x33)\n\tEBADRQC         = syscall.Errno(0x36)\n\tEBADSLT         = syscall.Errno(0x37)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x9e)\n\tECHRNG          = syscall.Errno(0x25)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x82)\n\tECONNREFUSED    = syscall.Errno(0x92)\n\tECONNRESET      = syscall.Errno(0x83)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDEADLOCK       = syscall.Errno(0x38)\n\tEDESTADDRREQ    = syscall.Errno(0x60)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x46d)\n\tEHOSTDOWN       = syscall.Errno(0x93)\n\tEHOSTUNREACH    = syscall.Errno(0x94)\n\tEHWPOISON       = syscall.Errno(0xa8)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x58)\n\tEINIT           = syscall.Errno(0x8d)\n\tEINPROGRESS     = syscall.Errno(0x96)\n\tEISCONN         = syscall.Errno(0x85)\n\tEISNAM          = syscall.Errno(0x8b)\n\tEKEYEXPIRED     = syscall.Errno(0xa2)\n\tEKEYREJECTED    = syscall.Errno(0xa4)\n\tEKEYREVOKED     = syscall.Errno(0xa3)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELIBACC         = syscall.Errno(0x53)\n\tELIBBAD         = syscall.Errno(0x54)\n\tELIBEXEC        = syscall.Errno(0x57)\n\tELIBMAX         = syscall.Errno(0x56)\n\tELIBSCN         = syscall.Errno(0x55)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x5a)\n\tEMEDIUMTYPE     = syscall.Errno(0xa0)\n\tEMSGSIZE        = syscall.Errno(0x61)\n\tEMULTIHOP       = syscall.Errno(0x4a)\n\tENAMETOOLONG    = syscall.Errno(0x4e)\n\tENAVAIL         = syscall.Errno(0x8a)\n\tENETDOWN        = syscall.Errno(0x7f)\n\tENETRESET       = syscall.Errno(0x81)\n\tENETUNREACH     = syscall.Errno(0x80)\n\tENOANO          = syscall.Errno(0x35)\n\tENOBUFS         = syscall.Errno(0x84)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0xa1)\n\tENOLCK          = syscall.Errno(0x2e)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x9f)\n\tENOMSG          = syscall.Errno(0x23)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x63)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x59)\n\tENOTCONN        = syscall.Errno(0x86)\n\tENOTEMPTY       = syscall.Errno(0x5d)\n\tENOTNAM         = syscall.Errno(0x89)\n\tENOTRECOVERABLE = syscall.Errno(0xa6)\n\tENOTSOCK        = syscall.Errno(0x5f)\n\tENOTSUP         = syscall.Errno(0x7a)\n\tENOTUNIQ        = syscall.Errno(0x50)\n\tEOPNOTSUPP      = syscall.Errno(0x7a)\n\tEOVERFLOW       = syscall.Errno(0x4f)\n\tEOWNERDEAD      = syscall.Errno(0xa5)\n\tEPFNOSUPPORT    = syscall.Errno(0x7b)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE      = syscall.Errno(0x62)\n\tEREMCHG         = syscall.Errno(0x52)\n\tEREMDEV         = syscall.Errno(0x8e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x8c)\n\tERESTART        = syscall.Errno(0x5b)\n\tERFKILL         = syscall.Errno(0xa7)\n\tESHUTDOWN       = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x97)\n\tESTRPIPE        = syscall.Errno(0x5c)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x91)\n\tETOOMANYREFS    = syscall.Errno(0x90)\n\tEUCLEAN         = syscall.Errno(0x87)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x5e)\n\tEXFULL          = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x12)\n\tSIGCLD    = syscall.Signal(0x12)\n\tSIGCONT   = syscall.Signal(0x19)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGIO     = syscall.Signal(0x16)\n\tSIGPOLL   = syscall.Signal(0x16)\n\tSIGPROF   = syscall.Signal(0x1d)\n\tSIGPWR    = syscall.Signal(0x13)\n\tSIGSTOP   = syscall.Signal(0x17)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTSTP   = syscall.Signal(0x18)\n\tSIGTTIN   = syscall.Signal(0x1a)\n\tSIGTTOU   = syscall.Signal(0x1b)\n\tSIGURG    = syscall.Signal(0x15)\n\tSIGUSR1   = syscall.Signal(0x10)\n\tSIGUSR2   = syscall.Signal(0x11)\n\tSIGVTALRM = syscall.Signal(0x1c)\n\tSIGWINCH  = syscall.Signal(0x14)\n\tSIGXCPU   = syscall.Signal(0x1e)\n\tSIGXFSZ   = syscall.Signal(0x1f)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{46, \"ENOLCK\", \"no locks available\"},\n\t{50, \"EBADE\", \"invalid exchange\"},\n\t{51, \"EBADR\", \"invalid request descriptor\"},\n\t{52, \"EXFULL\", \"exchange full\"},\n\t{53, \"ENOANO\", \"no anode\"},\n\t{54, \"EBADRQC\", \"invalid request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"bad message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{87, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{89, \"ENOSYS\", \"function not implemented\"},\n\t{90, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{91, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{92, \"ESTRPIPE\", \"streams pipe error\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"ENOTSUP\", \"operation not supported\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{135, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{137, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{138, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{139, \"EISNAM\", \"is a named type file\"},\n\t{140, \"EREMOTEIO\", \"remote I/O error\"},\n\t{141, \"EINIT\", \"unknown error 141\"},\n\t{142, \"EREMDEV\", \"unknown error 142\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale file handle\"},\n\t{158, \"ECANCELED\", \"operation canceled\"},\n\t{159, \"ENOMEDIUM\", \"no medium found\"},\n\t{160, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{161, \"ENOKEY\", \"required key not available\"},\n\t{162, \"EKEYEXPIRED\", \"key has expired\"},\n\t{163, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{164, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{165, \"EOWNERDEAD\", \"owner died\"},\n\t{166, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{167, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{168, \"EHWPOISON\", \"memory page has hardware error\"},\n\t{1133, \"EDQUOT\", \"disk quota exceeded\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGCHLD\", \"child exited\"},\n\t{19, \"SIGPWR\", \"power failure\"},\n\t{20, \"SIGWINCH\", \"window changed\"},\n\t{21, \"SIGURG\", \"urgent I/O condition\"},\n\t{22, \"SIGIO\", \"I/O possible\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{29, \"SIGPROF\", \"profiling timer expired\"},\n\t{30, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{31, \"SIGXFSZ\", \"file size limit exceeded\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/mipsle/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mipsle && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40041270\n\tBLKBSZSET                        = 0x80041271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40041272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x80\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x2000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40046601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80046602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0x21\n\tF_GETLK64                        = 0x21\n\tF_GETOWN                         = 0x17\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x22\n\tF_SETLK64                        = 0x22\n\tF_SETLKW                         = 0x23\n\tF_SETLKW64                       = 0x23\n\tF_SETOWN                         = 0x18\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x100\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x80\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x800\n\tMAP_ANONYMOUS                    = 0x800\n\tMAP_DENYWRITE                    = 0x2000\n\tMAP_EXECUTABLE                   = 0x4000\n\tMAP_GROWSDOWN                    = 0x1000\n\tMAP_HUGETLB                      = 0x80000\n\tMAP_LOCKED                       = 0x8000\n\tMAP_NONBLOCK                     = 0x20000\n\tMAP_NORESERVE                    = 0x400\n\tMAP_POPULATE                     = 0x10000\n\tMAP_RENAME                       = 0x800\n\tMAP_STACK                        = 0x40000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc00c4d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc00c4d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x20\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x8\n\tO_ASYNC                          = 0x1000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x100\n\tO_DIRECT                         = 0x8000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x10\n\tO_EXCL                           = 0x400\n\tO_FSYNC                          = 0x4010\n\tO_LARGEFILE                      = 0x2000\n\tO_NDELAY                         = 0x80\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x800\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x80\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x4010\n\tO_SYNC                           = 0x4010\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80042406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4008743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80087446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x800c744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80087447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPR_SET_PTRACER_ANY               = 0xffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GET_THREAD_AREA           = 0x19\n\tPTRACE_GET_THREAD_AREA_3264      = 0xc4\n\tPTRACE_GET_WATCH_REGS            = 0xd0\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_PEEKDATA_3264             = 0xc1\n\tPTRACE_PEEKTEXT_3264             = 0xc0\n\tPTRACE_POKEDATA_3264             = 0xc3\n\tPTRACE_POKETEXT_3264             = 0xc2\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SET_THREAD_AREA           = 0x1a\n\tPTRACE_SET_WATCH_REGS            = 0xd1\n\tRLIMIT_AS                        = 0x6\n\tRLIMIT_MEMLOCK                   = 0x9\n\tRLIMIT_NOFILE                    = 0x5\n\tRLIMIT_NPROC                     = 0x8\n\tRLIMIT_RSS                       = 0x7\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4004700d\n\tRTC_EPOCH_SET                    = 0x8004700e\n\tRTC_IRQP_READ                    = 0x4004700b\n\tRTC_IRQP_SET                     = 0x8004700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x401c7011\n\tRTC_PLL_SET                      = 0x801c7012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x80\n\tSIOCATMARK                       = 0x40047307\n\tSIOCGPGRP                        = 0x40047309\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x467f\n\tSIOCOUTQ                         = 0x7472\n\tSIOCSPGRP                        = 0x80047308\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x1\n\tSOCK_NONBLOCK                    = 0x80\n\tSOCK_STREAM                      = 0x2\n\tSOL_SOCKET                       = 0xffff\n\tSO_ACCEPTCONN                    = 0x1009\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x20\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x1029\n\tSO_DONTROUTE                     = 0x10\n\tSO_ERROR                         = 0x1007\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x8\n\tSO_LINGER                        = 0x80\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0x100\n\tSO_PASSCRED                      = 0x11\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x12\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1e\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x1028\n\tSO_RCVBUF                        = 0x1002\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x1004\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x1006\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x1006\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x4\n\tSO_REUSEPORT                     = 0x200\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x1001\n\tSO_SNDBUFFORCE                   = 0x1f\n\tSO_SNDLOWAT                      = 0x1003\n\tSO_SNDTIMEO                      = 0x1005\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x1005\n\tSO_STYLE                         = 0x1008\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x1008\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x5407\n\tTCGETA                           = 0x5401\n\tTCGETS                           = 0x540d\n\tTCGETS2                          = 0x4030542a\n\tTCSAFLUSH                        = 0x5410\n\tTCSBRK                           = 0x5405\n\tTCSBRKP                          = 0x5486\n\tTCSETA                           = 0x5402\n\tTCSETAF                          = 0x5404\n\tTCSETAW                          = 0x5403\n\tTCSETS                           = 0x540e\n\tTCSETS2                          = 0x8030542b\n\tTCSETSF                          = 0x5410\n\tTCSETSF2                         = 0x8030542d\n\tTCSETSW                          = 0x540f\n\tTCSETSW2                         = 0x8030542c\n\tTCXONC                           = 0x5406\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x80\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x80047478\n\tTIOCEXCL                         = 0x740d\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETD                         = 0x7400\n\tTIOCGETP                         = 0x7408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x5492\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x548b\n\tTIOCGLTC                         = 0x7474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x4020542e\n\tTIOCGSERIAL                      = 0x5484\n\tTIOCGSID                         = 0x7416\n\tTIOCGSOFTCAR                     = 0x5481\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x467f\n\tTIOCLINUX                        = 0x5483\n\tTIOCMBIC                         = 0x741c\n\tTIOCMBIS                         = 0x741b\n\tTIOCMGET                         = 0x741d\n\tTIOCMIWAIT                       = 0x5491\n\tTIOCMSET                         = 0x741a\n\tTIOCM_CAR                        = 0x100\n\tTIOCM_CD                         = 0x100\n\tTIOCM_CTS                        = 0x40\n\tTIOCM_DSR                        = 0x400\n\tTIOCM_RI                         = 0x200\n\tTIOCM_RNG                        = 0x200\n\tTIOCM_SR                         = 0x20\n\tTIOCM_ST                         = 0x10\n\tTIOCNOTTY                        = 0x5471\n\tTIOCNXCL                         = 0x740e\n\tTIOCOUTQ                         = 0x7472\n\tTIOCPKT                          = 0x5470\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x5480\n\tTIOCSERCONFIG                    = 0x5488\n\tTIOCSERGETLSR                    = 0x548e\n\tTIOCSERGETMULTI                  = 0x548f\n\tTIOCSERGSTRUCT                   = 0x548d\n\tTIOCSERGWILD                     = 0x5489\n\tTIOCSERSETMULTI                  = 0x5490\n\tTIOCSERSWILD                     = 0x548a\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x7401\n\tTIOCSETN                         = 0x740a\n\tTIOCSETP                         = 0x7409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x548c\n\tTIOCSLTC                         = 0x7475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0xc020542f\n\tTIOCSSERIAL                      = 0x5485\n\tTIOCSSOFTCAR                     = 0x5482\n\tTIOCSTI                          = 0x5472\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x8000\n\tTUNATTACHFILTER                  = 0x800854d5\n\tTUNDETACHFILTER                  = 0x800854d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x400854db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x10\n\tVEOL                             = 0x11\n\tVEOL2                            = 0x6\n\tVMIN                             = 0x4\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVSWTCH                           = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x20\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL   = syscall.Errno(0x7e)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x7c)\n\tEALREADY        = syscall.Errno(0x95)\n\tEBADE           = syscall.Errno(0x32)\n\tEBADFD          = syscall.Errno(0x51)\n\tEBADMSG         = syscall.Errno(0x4d)\n\tEBADR           = syscall.Errno(0x33)\n\tEBADRQC         = syscall.Errno(0x36)\n\tEBADSLT         = syscall.Errno(0x37)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x9e)\n\tECHRNG          = syscall.Errno(0x25)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x82)\n\tECONNREFUSED    = syscall.Errno(0x92)\n\tECONNRESET      = syscall.Errno(0x83)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDEADLOCK       = syscall.Errno(0x38)\n\tEDESTADDRREQ    = syscall.Errno(0x60)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x46d)\n\tEHOSTDOWN       = syscall.Errno(0x93)\n\tEHOSTUNREACH    = syscall.Errno(0x94)\n\tEHWPOISON       = syscall.Errno(0xa8)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x58)\n\tEINIT           = syscall.Errno(0x8d)\n\tEINPROGRESS     = syscall.Errno(0x96)\n\tEISCONN         = syscall.Errno(0x85)\n\tEISNAM          = syscall.Errno(0x8b)\n\tEKEYEXPIRED     = syscall.Errno(0xa2)\n\tEKEYREJECTED    = syscall.Errno(0xa4)\n\tEKEYREVOKED     = syscall.Errno(0xa3)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELIBACC         = syscall.Errno(0x53)\n\tELIBBAD         = syscall.Errno(0x54)\n\tELIBEXEC        = syscall.Errno(0x57)\n\tELIBMAX         = syscall.Errno(0x56)\n\tELIBSCN         = syscall.Errno(0x55)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOOP           = syscall.Errno(0x5a)\n\tEMEDIUMTYPE     = syscall.Errno(0xa0)\n\tEMSGSIZE        = syscall.Errno(0x61)\n\tEMULTIHOP       = syscall.Errno(0x4a)\n\tENAMETOOLONG    = syscall.Errno(0x4e)\n\tENAVAIL         = syscall.Errno(0x8a)\n\tENETDOWN        = syscall.Errno(0x7f)\n\tENETRESET       = syscall.Errno(0x81)\n\tENETUNREACH     = syscall.Errno(0x80)\n\tENOANO          = syscall.Errno(0x35)\n\tENOBUFS         = syscall.Errno(0x84)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0xa1)\n\tENOLCK          = syscall.Errno(0x2e)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x9f)\n\tENOMSG          = syscall.Errno(0x23)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x63)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x59)\n\tENOTCONN        = syscall.Errno(0x86)\n\tENOTEMPTY       = syscall.Errno(0x5d)\n\tENOTNAM         = syscall.Errno(0x89)\n\tENOTRECOVERABLE = syscall.Errno(0xa6)\n\tENOTSOCK        = syscall.Errno(0x5f)\n\tENOTSUP         = syscall.Errno(0x7a)\n\tENOTUNIQ        = syscall.Errno(0x50)\n\tEOPNOTSUPP      = syscall.Errno(0x7a)\n\tEOVERFLOW       = syscall.Errno(0x4f)\n\tEOWNERDEAD      = syscall.Errno(0xa5)\n\tEPFNOSUPPORT    = syscall.Errno(0x7b)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE      = syscall.Errno(0x62)\n\tEREMCHG         = syscall.Errno(0x52)\n\tEREMDEV         = syscall.Errno(0x8e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x8c)\n\tERESTART        = syscall.Errno(0x5b)\n\tERFKILL         = syscall.Errno(0xa7)\n\tESHUTDOWN       = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x97)\n\tESTRPIPE        = syscall.Errno(0x5c)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x91)\n\tETOOMANYREFS    = syscall.Errno(0x90)\n\tEUCLEAN         = syscall.Errno(0x87)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x5e)\n\tEXFULL          = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x12)\n\tSIGCLD    = syscall.Signal(0x12)\n\tSIGCONT   = syscall.Signal(0x19)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGIO     = syscall.Signal(0x16)\n\tSIGPOLL   = syscall.Signal(0x16)\n\tSIGPROF   = syscall.Signal(0x1d)\n\tSIGPWR    = syscall.Signal(0x13)\n\tSIGSTOP   = syscall.Signal(0x17)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTSTP   = syscall.Signal(0x18)\n\tSIGTTIN   = syscall.Signal(0x1a)\n\tSIGTTOU   = syscall.Signal(0x1b)\n\tSIGURG    = syscall.Signal(0x15)\n\tSIGUSR1   = syscall.Signal(0x10)\n\tSIGUSR2   = syscall.Signal(0x11)\n\tSIGVTALRM = syscall.Signal(0x1c)\n\tSIGWINCH  = syscall.Signal(0x14)\n\tSIGXCPU   = syscall.Signal(0x1e)\n\tSIGXFSZ   = syscall.Signal(0x1f)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{46, \"ENOLCK\", \"no locks available\"},\n\t{50, \"EBADE\", \"invalid exchange\"},\n\t{51, \"EBADR\", \"invalid request descriptor\"},\n\t{52, \"EXFULL\", \"exchange full\"},\n\t{53, \"ENOANO\", \"no anode\"},\n\t{54, \"EBADRQC\", \"invalid request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"bad message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{87, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{89, \"ENOSYS\", \"function not implemented\"},\n\t{90, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{91, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{92, \"ESTRPIPE\", \"streams pipe error\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"ENOTSUP\", \"operation not supported\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{135, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{137, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{138, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{139, \"EISNAM\", \"is a named type file\"},\n\t{140, \"EREMOTEIO\", \"remote I/O error\"},\n\t{141, \"EINIT\", \"unknown error 141\"},\n\t{142, \"EREMDEV\", \"unknown error 142\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale file handle\"},\n\t{158, \"ECANCELED\", \"operation canceled\"},\n\t{159, \"ENOMEDIUM\", \"no medium found\"},\n\t{160, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{161, \"ENOKEY\", \"required key not available\"},\n\t{162, \"EKEYEXPIRED\", \"key has expired\"},\n\t{163, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{164, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{165, \"EOWNERDEAD\", \"owner died\"},\n\t{166, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{167, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{168, \"EHWPOISON\", \"memory page has hardware error\"},\n\t{1133, \"EDQUOT\", \"disk quota exceeded\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGCHLD\", \"child exited\"},\n\t{19, \"SIGPWR\", \"power failure\"},\n\t{20, \"SIGWINCH\", \"window changed\"},\n\t{21, \"SIGURG\", \"urgent I/O condition\"},\n\t{22, \"SIGIO\", \"I/O possible\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{29, \"SIGPROF\", \"profiling timer expired\"},\n\t{30, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{31, \"SIGXFSZ\", \"file size limit exceeded\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/ppc/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x17\n\tB115200                          = 0x11\n\tB1152000                         = 0x18\n\tB1500000                         = 0x19\n\tB2000000                         = 0x1a\n\tB230400                          = 0x12\n\tB2500000                         = 0x1b\n\tB3000000                         = 0x1c\n\tB3500000                         = 0x1d\n\tB4000000                         = 0x1e\n\tB460800                          = 0x13\n\tB500000                          = 0x14\n\tB57600                           = 0x10\n\tB576000                          = 0x15\n\tB921600                          = 0x16\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40041270\n\tBLKBSZSET                        = 0x80041271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40041272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1f\n\tBS1                              = 0x8000\n\tBSDLY                            = 0x8000\n\tCBAUD                            = 0xff\n\tCBAUDEX                          = 0x0\n\tCIBAUD                           = 0xff0000\n\tCLOCAL                           = 0x8000\n\tCR1                              = 0x1000\n\tCR2                              = 0x2000\n\tCR3                              = 0x3000\n\tCRDLY                            = 0x3000\n\tCREAD                            = 0x800\n\tCS6                              = 0x100\n\tCS7                              = 0x200\n\tCS8                              = 0x300\n\tCSIZE                            = 0x300\n\tCSTOPB                           = 0x400\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x40\n\tECHOE                            = 0x2\n\tECHOK                            = 0x4\n\tECHOKE                           = 0x1\n\tECHONL                           = 0x10\n\tECHOPRT                          = 0x20\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000000\n\tFF1                              = 0x4000\n\tFFDLY                            = 0x4000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x800000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40046601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80046602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0xc\n\tF_GETLK64                        = 0xc\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0xd\n\tF_SETLK64                        = 0xd\n\tF_SETLKW                         = 0xe\n\tF_SETLKW64                       = 0xe\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x4000\n\tICANON                           = 0x100\n\tIEXTEN                           = 0x400\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x80\n\tIUCLC                            = 0x1000\n\tIXOFF                            = 0x400\n\tIXON                             = 0x200\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x80\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x40\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x2000\n\tMCL_FUTURE                       = 0x4000\n\tMCL_ONFAULT                      = 0x8000\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc00c4d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc00c4d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x20\n\tNL2                              = 0x200\n\tNL3                              = 0x300\n\tNLDLY                            = 0x300\n\tNOFLSH                           = 0x80000000\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x4\n\tONLCR                            = 0x2\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x20000\n\tO_DIRECTORY                      = 0x4000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x10000\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x8000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x404000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x1000\n\tPARODD                           = 0x2000\n\tPENDIN                           = 0x20000000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40042407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc004240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80042406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4008743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80087446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x800c744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80087447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPROT_SAO                         = 0x10\n\tPR_SET_PTRACER_ANY               = 0xffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETEVRREGS                = 0x14\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETREGS64                 = 0x16\n\tPTRACE_GETVRREGS                 = 0x12\n\tPTRACE_GETVSRREGS                = 0x1b\n\tPTRACE_GET_DEBUGREG              = 0x19\n\tPTRACE_SETEVRREGS                = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETREGS64                 = 0x17\n\tPTRACE_SETVRREGS                 = 0x13\n\tPTRACE_SETVSRREGS                = 0x1c\n\tPTRACE_SET_DEBUGREG              = 0x1a\n\tPTRACE_SINGLEBLOCK               = 0x100\n\tPTRACE_SYSEMU                    = 0x1d\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x1e\n\tPT_CCR                           = 0x26\n\tPT_CTR                           = 0x23\n\tPT_DAR                           = 0x29\n\tPT_DSCR                          = 0x2c\n\tPT_DSISR                         = 0x2a\n\tPT_FPR0                          = 0x30\n\tPT_FPR31                         = 0x6e\n\tPT_FPSCR                         = 0x71\n\tPT_LNK                           = 0x24\n\tPT_MQ                            = 0x27\n\tPT_MSR                           = 0x21\n\tPT_NIP                           = 0x20\n\tPT_ORIG_R3                       = 0x22\n\tPT_R0                            = 0x0\n\tPT_R1                            = 0x1\n\tPT_R10                           = 0xa\n\tPT_R11                           = 0xb\n\tPT_R12                           = 0xc\n\tPT_R13                           = 0xd\n\tPT_R14                           = 0xe\n\tPT_R15                           = 0xf\n\tPT_R16                           = 0x10\n\tPT_R17                           = 0x11\n\tPT_R18                           = 0x12\n\tPT_R19                           = 0x13\n\tPT_R2                            = 0x2\n\tPT_R20                           = 0x14\n\tPT_R21                           = 0x15\n\tPT_R22                           = 0x16\n\tPT_R23                           = 0x17\n\tPT_R24                           = 0x18\n\tPT_R25                           = 0x19\n\tPT_R26                           = 0x1a\n\tPT_R27                           = 0x1b\n\tPT_R28                           = 0x1c\n\tPT_R29                           = 0x1d\n\tPT_R3                            = 0x3\n\tPT_R30                           = 0x1e\n\tPT_R31                           = 0x1f\n\tPT_R4                            = 0x4\n\tPT_R5                            = 0x5\n\tPT_R6                            = 0x6\n\tPT_R7                            = 0x7\n\tPT_R8                            = 0x8\n\tPT_R9                            = 0x9\n\tPT_REGS_COUNT                    = 0x2c\n\tPT_RESULT                        = 0x2b\n\tPT_TRAP                          = 0x28\n\tPT_XER                           = 0x25\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4004700d\n\tRTC_EPOCH_SET                    = 0x8004700e\n\tRTC_IRQP_READ                    = 0x4004700b\n\tRTC_IRQP_SET                     = 0x8004700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x401c7011\n\tRTC_PLL_SET                      = 0x801c7012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x4004667f\n\tSIOCOUTQ                         = 0x40047473\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x14\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x15\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x10\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x12\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x12\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x11\n\tSO_SNDTIMEO                      = 0x13\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x13\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x400\n\tTAB2                             = 0x800\n\tTAB3                             = 0xc00\n\tTABDLY                           = 0xc00\n\tTCFLSH                           = 0x2000741f\n\tTCGETA                           = 0x40147417\n\tTCGETS                           = 0x402c7413\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x2000741d\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x80147418\n\tTCSETAF                          = 0x8014741c\n\tTCSETAW                          = 0x80147419\n\tTCSETS                           = 0x802c7414\n\tTCSETSF                          = 0x802c7416\n\tTCSETSW                          = 0x802c7415\n\tTCXONC                           = 0x2000741e\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETC                         = 0x40067412\n\tTIOCGETD                         = 0x5424\n\tTIOCGETP                         = 0x40067408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGLTC                         = 0x40067474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x4004667f\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_LOOP                       = 0x8000\n\tTIOCM_OUT1                       = 0x2000\n\tTIOCM_OUT2                       = 0x4000\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x40047473\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETC                         = 0x80067411\n\tTIOCSETD                         = 0x5423\n\tTIOCSETN                         = 0x8006740a\n\tTIOCSETP                         = 0x80067409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSLTC                         = 0x80067475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTART                        = 0x2000746e\n\tTIOCSTI                          = 0x5412\n\tTIOCSTOP                         = 0x2000746f\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x400000\n\tTUNATTACHFILTER                  = 0x800854d5\n\tTUNDETACHFILTER                  = 0x800854d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x400854db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0x10\n\tVEOF                             = 0x4\n\tVEOL                             = 0x6\n\tVEOL2                            = 0x8\n\tVMIN                             = 0x5\n\tVREPRINT                         = 0xb\n\tVSTART                           = 0xd\n\tVSTOP                            = 0xe\n\tVSUSP                            = 0xc\n\tVSWTC                            = 0x9\n\tVT1                              = 0x10000\n\tVTDLY                            = 0x10000\n\tVTIME                            = 0x7\n\tVWERASE                          = 0xa\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x20\n\tXCASE                            = 0x4000\n\tXTABS                            = 0xc00\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x3a)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{58, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/ppc64/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x17\n\tB115200                          = 0x11\n\tB1152000                         = 0x18\n\tB1500000                         = 0x19\n\tB2000000                         = 0x1a\n\tB230400                          = 0x12\n\tB2500000                         = 0x1b\n\tB3000000                         = 0x1c\n\tB3500000                         = 0x1d\n\tB4000000                         = 0x1e\n\tB460800                          = 0x13\n\tB500000                          = 0x14\n\tB57600                           = 0x10\n\tB576000                          = 0x15\n\tB921600                          = 0x16\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40081270\n\tBLKBSZSET                        = 0x80081271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40081272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1f\n\tBS1                              = 0x8000\n\tBSDLY                            = 0x8000\n\tCBAUD                            = 0xff\n\tCBAUDEX                          = 0x0\n\tCIBAUD                           = 0xff0000\n\tCLOCAL                           = 0x8000\n\tCR1                              = 0x1000\n\tCR2                              = 0x2000\n\tCR3                              = 0x3000\n\tCRDLY                            = 0x3000\n\tCREAD                            = 0x800\n\tCS6                              = 0x100\n\tCS7                              = 0x200\n\tCS8                              = 0x300\n\tCSIZE                            = 0x300\n\tCSTOPB                           = 0x400\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x40\n\tECHOE                            = 0x2\n\tECHOK                            = 0x4\n\tECHOKE                           = 0x1\n\tECHONL                           = 0x10\n\tECHOPRT                          = 0x20\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000000\n\tFF1                              = 0x4000\n\tFFDLY                            = 0x4000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x800000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0xc\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0xd\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0xe\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x4000\n\tICANON                           = 0x100\n\tIEXTEN                           = 0x400\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x80\n\tIUCLC                            = 0x1000\n\tIXOFF                            = 0x400\n\tIXON                             = 0x200\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x80\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x40\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x2000\n\tMCL_FUTURE                       = 0x4000\n\tMCL_ONFAULT                      = 0x8000\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x40\n\tNL2                              = 0x200\n\tNL3                              = 0x300\n\tNLDLY                            = 0x300\n\tNOFLSH                           = 0x80000000\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x4\n\tONLCR                            = 0x2\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x20000\n\tO_DIRECTORY                      = 0x4000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x8000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x404000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x1000\n\tPARODD                           = 0x2000\n\tPENDIN                           = 0x20000000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4010743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80107446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x8010744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80107447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPROT_SAO                         = 0x10\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETEVRREGS                = 0x14\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETREGS64                 = 0x16\n\tPTRACE_GETVRREGS                 = 0x12\n\tPTRACE_GETVSRREGS                = 0x1b\n\tPTRACE_GET_DEBUGREG              = 0x19\n\tPTRACE_SETEVRREGS                = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETREGS64                 = 0x17\n\tPTRACE_SETVRREGS                 = 0x13\n\tPTRACE_SETVSRREGS                = 0x1c\n\tPTRACE_SET_DEBUGREG              = 0x1a\n\tPTRACE_SINGLEBLOCK               = 0x100\n\tPTRACE_SYSEMU                    = 0x1d\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x1e\n\tPT_CCR                           = 0x26\n\tPT_CTR                           = 0x23\n\tPT_DAR                           = 0x29\n\tPT_DSCR                          = 0x2c\n\tPT_DSISR                         = 0x2a\n\tPT_FPR0                          = 0x30\n\tPT_FPSCR                         = 0x50\n\tPT_LNK                           = 0x24\n\tPT_MSR                           = 0x21\n\tPT_NIP                           = 0x20\n\tPT_ORIG_R3                       = 0x22\n\tPT_R0                            = 0x0\n\tPT_R1                            = 0x1\n\tPT_R10                           = 0xa\n\tPT_R11                           = 0xb\n\tPT_R12                           = 0xc\n\tPT_R13                           = 0xd\n\tPT_R14                           = 0xe\n\tPT_R15                           = 0xf\n\tPT_R16                           = 0x10\n\tPT_R17                           = 0x11\n\tPT_R18                           = 0x12\n\tPT_R19                           = 0x13\n\tPT_R2                            = 0x2\n\tPT_R20                           = 0x14\n\tPT_R21                           = 0x15\n\tPT_R22                           = 0x16\n\tPT_R23                           = 0x17\n\tPT_R24                           = 0x18\n\tPT_R25                           = 0x19\n\tPT_R26                           = 0x1a\n\tPT_R27                           = 0x1b\n\tPT_R28                           = 0x1c\n\tPT_R29                           = 0x1d\n\tPT_R3                            = 0x3\n\tPT_R30                           = 0x1e\n\tPT_R31                           = 0x1f\n\tPT_R4                            = 0x4\n\tPT_R5                            = 0x5\n\tPT_R6                            = 0x6\n\tPT_R7                            = 0x7\n\tPT_R8                            = 0x8\n\tPT_R9                            = 0x9\n\tPT_REGS_COUNT                    = 0x2c\n\tPT_RESULT                        = 0x2b\n\tPT_SOFTE                         = 0x27\n\tPT_TRAP                          = 0x28\n\tPT_VR0                           = 0x52\n\tPT_VRSAVE                        = 0x94\n\tPT_VSCR                          = 0x93\n\tPT_VSR0                          = 0x96\n\tPT_VSR31                         = 0xd4\n\tPT_XER                           = 0x25\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4008700d\n\tRTC_EPOCH_SET                    = 0x8008700e\n\tRTC_IRQP_READ                    = 0x4008700b\n\tRTC_IRQP_SET                     = 0x8008700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x40207011\n\tRTC_PLL_SET                      = 0x80207012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x4004667f\n\tSIOCOUTQ                         = 0x40047473\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x14\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x15\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x10\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x12\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x12\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x11\n\tSO_SNDTIMEO                      = 0x13\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x13\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x400\n\tTAB2                             = 0x800\n\tTAB3                             = 0xc00\n\tTABDLY                           = 0xc00\n\tTCFLSH                           = 0x2000741f\n\tTCGETA                           = 0x40147417\n\tTCGETS                           = 0x402c7413\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x2000741d\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x80147418\n\tTCSETAF                          = 0x8014741c\n\tTCSETAW                          = 0x80147419\n\tTCSETS                           = 0x802c7414\n\tTCSETSF                          = 0x802c7416\n\tTCSETSW                          = 0x802c7415\n\tTCXONC                           = 0x2000741e\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETC                         = 0x40067412\n\tTIOCGETD                         = 0x5424\n\tTIOCGETP                         = 0x40067408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGLTC                         = 0x40067474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x4004667f\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_LOOP                       = 0x8000\n\tTIOCM_OUT1                       = 0x2000\n\tTIOCM_OUT2                       = 0x4000\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x40047473\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETC                         = 0x80067411\n\tTIOCSETD                         = 0x5423\n\tTIOCSETN                         = 0x8006740a\n\tTIOCSETP                         = 0x80067409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSLTC                         = 0x80067475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTART                        = 0x2000746e\n\tTIOCSTI                          = 0x5412\n\tTIOCSTOP                         = 0x2000746f\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x400000\n\tTUNATTACHFILTER                  = 0x801054d5\n\tTUNDETACHFILTER                  = 0x801054d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x401054db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0x10\n\tVEOF                             = 0x4\n\tVEOL                             = 0x6\n\tVEOL2                            = 0x8\n\tVMIN                             = 0x5\n\tVREPRINT                         = 0xb\n\tVSTART                           = 0xd\n\tVSTOP                            = 0xe\n\tVSUSP                            = 0xc\n\tVSWTC                            = 0x9\n\tVT1                              = 0x10000\n\tVTDLY                            = 0x10000\n\tVTIME                            = 0x7\n\tVWERASE                          = 0xa\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4000\n\tXTABS                            = 0xc00\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x3a)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{58, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/ppc64le/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64le && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x17\n\tB115200                          = 0x11\n\tB1152000                         = 0x18\n\tB1500000                         = 0x19\n\tB2000000                         = 0x1a\n\tB230400                          = 0x12\n\tB2500000                         = 0x1b\n\tB3000000                         = 0x1c\n\tB3500000                         = 0x1d\n\tB4000000                         = 0x1e\n\tB460800                          = 0x13\n\tB500000                          = 0x14\n\tB57600                           = 0x10\n\tB576000                          = 0x15\n\tB921600                          = 0x16\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40081270\n\tBLKBSZSET                        = 0x80081271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40081272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1f\n\tBS1                              = 0x8000\n\tBSDLY                            = 0x8000\n\tCBAUD                            = 0xff\n\tCBAUDEX                          = 0x0\n\tCIBAUD                           = 0xff0000\n\tCLOCAL                           = 0x8000\n\tCR1                              = 0x1000\n\tCR2                              = 0x2000\n\tCR3                              = 0x3000\n\tCRDLY                            = 0x3000\n\tCREAD                            = 0x800\n\tCS6                              = 0x100\n\tCS7                              = 0x200\n\tCS8                              = 0x300\n\tCSIZE                            = 0x300\n\tCSTOPB                           = 0x400\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x40\n\tECHOE                            = 0x2\n\tECHOK                            = 0x4\n\tECHOKE                           = 0x1\n\tECHONL                           = 0x10\n\tECHOPRT                          = 0x20\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000000\n\tFF1                              = 0x4000\n\tFFDLY                            = 0x4000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x800000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0xc\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0xd\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0xe\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x4000\n\tICANON                           = 0x100\n\tIEXTEN                           = 0x400\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x80\n\tIUCLC                            = 0x1000\n\tIXOFF                            = 0x400\n\tIXON                             = 0x200\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x80\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x40\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x2000\n\tMCL_FUTURE                       = 0x4000\n\tMCL_ONFAULT                      = 0x8000\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x40\n\tNL2                              = 0x200\n\tNL3                              = 0x300\n\tNLDLY                            = 0x300\n\tNOFLSH                           = 0x80000000\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x4\n\tONLCR                            = 0x2\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x20000\n\tO_DIRECTORY                      = 0x4000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x8000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x404000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x1000\n\tPARODD                           = 0x2000\n\tPENDIN                           = 0x20000000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4010743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80107446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x8010744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80107447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPROT_SAO                         = 0x10\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETEVRREGS                = 0x14\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETREGS64                 = 0x16\n\tPTRACE_GETVRREGS                 = 0x12\n\tPTRACE_GETVSRREGS                = 0x1b\n\tPTRACE_GET_DEBUGREG              = 0x19\n\tPTRACE_SETEVRREGS                = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETREGS64                 = 0x17\n\tPTRACE_SETVRREGS                 = 0x13\n\tPTRACE_SETVSRREGS                = 0x1c\n\tPTRACE_SET_DEBUGREG              = 0x1a\n\tPTRACE_SINGLEBLOCK               = 0x100\n\tPTRACE_SYSEMU                    = 0x1d\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x1e\n\tPT_CCR                           = 0x26\n\tPT_CTR                           = 0x23\n\tPT_DAR                           = 0x29\n\tPT_DSCR                          = 0x2c\n\tPT_DSISR                         = 0x2a\n\tPT_FPR0                          = 0x30\n\tPT_FPSCR                         = 0x50\n\tPT_LNK                           = 0x24\n\tPT_MSR                           = 0x21\n\tPT_NIP                           = 0x20\n\tPT_ORIG_R3                       = 0x22\n\tPT_R0                            = 0x0\n\tPT_R1                            = 0x1\n\tPT_R10                           = 0xa\n\tPT_R11                           = 0xb\n\tPT_R12                           = 0xc\n\tPT_R13                           = 0xd\n\tPT_R14                           = 0xe\n\tPT_R15                           = 0xf\n\tPT_R16                           = 0x10\n\tPT_R17                           = 0x11\n\tPT_R18                           = 0x12\n\tPT_R19                           = 0x13\n\tPT_R2                            = 0x2\n\tPT_R20                           = 0x14\n\tPT_R21                           = 0x15\n\tPT_R22                           = 0x16\n\tPT_R23                           = 0x17\n\tPT_R24                           = 0x18\n\tPT_R25                           = 0x19\n\tPT_R26                           = 0x1a\n\tPT_R27                           = 0x1b\n\tPT_R28                           = 0x1c\n\tPT_R29                           = 0x1d\n\tPT_R3                            = 0x3\n\tPT_R30                           = 0x1e\n\tPT_R31                           = 0x1f\n\tPT_R4                            = 0x4\n\tPT_R5                            = 0x5\n\tPT_R6                            = 0x6\n\tPT_R7                            = 0x7\n\tPT_R8                            = 0x8\n\tPT_R9                            = 0x9\n\tPT_REGS_COUNT                    = 0x2c\n\tPT_RESULT                        = 0x2b\n\tPT_SOFTE                         = 0x27\n\tPT_TRAP                          = 0x28\n\tPT_VR0                           = 0x52\n\tPT_VRSAVE                        = 0x94\n\tPT_VSCR                          = 0x93\n\tPT_VSR0                          = 0x96\n\tPT_VSR31                         = 0xd4\n\tPT_XER                           = 0x25\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4008700d\n\tRTC_EPOCH_SET                    = 0x8008700e\n\tRTC_IRQP_READ                    = 0x4008700b\n\tRTC_IRQP_SET                     = 0x8008700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x40207011\n\tRTC_PLL_SET                      = 0x80207012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x4004667f\n\tSIOCOUTQ                         = 0x40047473\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x14\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x15\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x10\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x12\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x12\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x11\n\tSO_SNDTIMEO                      = 0x13\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x13\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x400\n\tTAB2                             = 0x800\n\tTAB3                             = 0xc00\n\tTABDLY                           = 0xc00\n\tTCFLSH                           = 0x2000741f\n\tTCGETA                           = 0x40147417\n\tTCGETS                           = 0x402c7413\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x2000741d\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x80147418\n\tTCSETAF                          = 0x8014741c\n\tTCSETAW                          = 0x80147419\n\tTCSETS                           = 0x802c7414\n\tTCSETSF                          = 0x802c7416\n\tTCSETSW                          = 0x802c7415\n\tTCXONC                           = 0x2000741e\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETC                         = 0x40067412\n\tTIOCGETD                         = 0x5424\n\tTIOCGETP                         = 0x40067408\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x40285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGLTC                         = 0x40067474\n\tTIOCGPGRP                        = 0x40047477\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40045430\n\tTIOCGPTPEER                      = 0x20005441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x4004667f\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_LOOP                       = 0x8000\n\tTIOCM_OUT1                       = 0x2000\n\tTIOCM_OUT2                       = 0x4000\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x40047473\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETC                         = 0x80067411\n\tTIOCSETD                         = 0x5423\n\tTIOCSETN                         = 0x8006740a\n\tTIOCSETP                         = 0x80067409\n\tTIOCSIG                          = 0x80045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSLTC                         = 0x80067475\n\tTIOCSPGRP                        = 0x80047476\n\tTIOCSPTLCK                       = 0x80045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTART                        = 0x2000746e\n\tTIOCSTI                          = 0x5412\n\tTIOCSTOP                         = 0x2000746f\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x400000\n\tTUNATTACHFILTER                  = 0x801054d5\n\tTUNDETACHFILTER                  = 0x801054d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x401054db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0x10\n\tVEOF                             = 0x4\n\tVEOL                             = 0x6\n\tVEOL2                            = 0x8\n\tVMIN                             = 0x5\n\tVREPRINT                         = 0xb\n\tVSTART                           = 0xd\n\tVSTOP                            = 0xe\n\tVSUSP                            = 0xc\n\tVSWTC                            = 0x9\n\tVT1                              = 0x10000\n\tVTDLY                            = 0x10000\n\tVTIME                            = 0x7\n\tVWERASE                          = 0xa\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4000\n\tXTABS                            = 0xc00\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x3a)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{58, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/riscv64/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80081270\n\tBLKBSZSET                        = 0x40081271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80081272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0x5\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK              = 0xffff0f00\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x4000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8010743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40107446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x4010744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40107447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_GETFDPIC                  = 0x21\n\tPTRACE_GETFDPIC_EXEC             = 0x0\n\tPTRACE_GETFDPIC_INTERP           = 0x1\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8008700d\n\tRTC_EPOCH_SET                    = 0x4008700e\n\tRTC_IRQP_READ                    = 0x8008700b\n\tRTC_IRQP_SET                     = 0x4008700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x80207011\n\tRTC_PLL_SET                      = 0x40207012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x401054d5\n\tTUNDETACHFILTER                  = 0x401054d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x801054db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/s390x/include -fsigned-char\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build s390x && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x127a\n\tBLKBSZGET                        = 0x80081270\n\tBLKBSZSET                        = 0x40081271\n\tBLKDISCARD                       = 0x1277\n\tBLKDISCARDZEROES                 = 0x127c\n\tBLKFLSBUF                        = 0x1261\n\tBLKFRAGET                        = 0x1265\n\tBLKFRASET                        = 0x1264\n\tBLKGETDISKSEQ                    = 0x80081280\n\tBLKGETSIZE                       = 0x1260\n\tBLKGETSIZE64                     = 0x80081272\n\tBLKIOMIN                         = 0x1278\n\tBLKIOOPT                         = 0x1279\n\tBLKPBSZGET                       = 0x127b\n\tBLKRAGET                         = 0x1263\n\tBLKRASET                         = 0x1262\n\tBLKROGET                         = 0x125e\n\tBLKROSET                         = 0x125d\n\tBLKROTATIONAL                    = 0x127e\n\tBLKRRPART                        = 0x125f\n\tBLKSECDISCARD                    = 0x127d\n\tBLKSECTGET                       = 0x1267\n\tBLKSECTSET                       = 0x1266\n\tBLKSSZGET                        = 0x1268\n\tBLKZEROOUT                       = 0x127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0xfd12\n\tECCGETLAYOUT                     = 0x81484d11\n\tECCGETSTATS                      = 0x80104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x80000\n\tEFD_NONBLOCK                     = 0x800\n\tEPIOCGPARAMS                     = 0x80088a02\n\tEPIOCSPARAMS                     = 0x40088a01\n\tEPOLL_CLOEXEC                    = 0x80000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x40049409\n\tFICLONERANGE                     = 0x4020940d\n\tFLUSHO                           = 0x1000\n\tFS_IOC_ENABLE_VERITY             = 0x40806685\n\tFS_IOC_GETFLAGS                  = 0x80086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x8010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x400c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x40106614\n\tFS_IOC_SETFLAGS                  = 0x40086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x800c6613\n\tF_GETLK                          = 0x5\n\tF_GETLK64                        = 0x5\n\tF_GETOWN                         = 0x9\n\tF_RDLCK                          = 0x0\n\tF_SETLK                          = 0x6\n\tF_SETLK64                        = 0x6\n\tF_SETLKW                         = 0x7\n\tF_SETLKW64                       = 0x7\n\tF_SETOWN                         = 0x8\n\tF_UNLCK                          = 0x2\n\tF_WRLCK                          = 0x1\n\tHIDIOCGRAWINFO                   = 0x80084803\n\tHIDIOCGRDESC                     = 0x90044802\n\tHIDIOCGRDESCSIZE                 = 0x80044801\n\tHIDIOCREVOKE                     = 0x4004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x80000\n\tIN_NONBLOCK                      = 0x800\n\tIOCTL_MEI_NOTIFY_GET             = 0x80044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x40044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x7b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x100\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x2000\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x4000\n\tMAP_POPULATE                     = 0x8000\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x1\n\tMCL_FUTURE                       = 0x2\n\tMCL_ONFAULT                      = 0x4\n\tMEMERASE                         = 0x40084d02\n\tMEMERASE64                       = 0x40104d14\n\tMEMGETBADBLOCK                   = 0x40084d0b\n\tMEMGETINFO                       = 0x80204d01\n\tMEMGETOOBSEL                     = 0x80c84d0a\n\tMEMGETREGIONCOUNT                = 0x80044d07\n\tMEMISLOCKED                      = 0x80084d17\n\tMEMLOCK                          = 0x40084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x40084d0c\n\tMEMUNLOCK                        = 0x40084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x4d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x8008b705\n\tNS_GET_NSTYPE                    = 0xb703\n\tNS_GET_OWNER_UID                 = 0xb704\n\tNS_GET_PARENT                    = 0xb702\n\tNS_GET_PID_FROM_PIDNS            = 0x8004b706\n\tNS_GET_PID_IN_PIDNS              = 0x8004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x8004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x8004b709\n\tNS_GET_USERNS                    = 0xb701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x400c4d19\n\tOTPGETREGIONCOUNT                = 0x40044d0e\n\tOTPGETREGIONINFO                 = 0x400c4d0f\n\tOTPLOCK                          = 0x800c4d10\n\tOTPSELECT                        = 0x80044d0d\n\tO_APPEND                         = 0x400\n\tO_ASYNC                          = 0x2000\n\tO_CLOEXEC                        = 0x80000\n\tO_CREAT                          = 0x40\n\tO_DIRECT                         = 0x4000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x1000\n\tO_EXCL                           = 0x80\n\tO_FSYNC                          = 0x101000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x800\n\tO_NOATIME                        = 0x40000\n\tO_NOCTTY                         = 0x100\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x800\n\tO_PATH                           = 0x200000\n\tO_RSYNC                          = 0x101000\n\tO_SYNC                           = 0x101000\n\tO_TMPFILE                        = 0x410000\n\tO_TRUNC                          = 0x200\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x2401\n\tPERF_EVENT_IOC_ENABLE            = 0x2400\n\tPERF_EVENT_IOC_ID                = 0x80082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x40042409\n\tPERF_EVENT_IOC_PERIOD            = 0x40082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x2402\n\tPERF_EVENT_IOC_RESET             = 0x2403\n\tPERF_EVENT_IOC_SET_BPF           = 0x40042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x40082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x2405\n\tPPPIOCATTACH                     = 0x4004743d\n\tPPPIOCATTCHAN                    = 0x40047438\n\tPPPIOCBRIDGECHAN                 = 0x40047435\n\tPPPIOCCONNECT                    = 0x4004743a\n\tPPPIOCDETACH                     = 0x4004743c\n\tPPPIOCDISCONN                    = 0x7439\n\tPPPIOCGASYNCMAP                  = 0x80047458\n\tPPPIOCGCHAN                      = 0x80047437\n\tPPPIOCGDEBUG                     = 0x80047441\n\tPPPIOCGFLAGS                     = 0x8004745a\n\tPPPIOCGIDLE                      = 0x8010743f\n\tPPPIOCGIDLE32                    = 0x8008743f\n\tPPPIOCGIDLE64                    = 0x8010743f\n\tPPPIOCGL2TPSTATS                 = 0x80487436\n\tPPPIOCGMRU                       = 0x80047453\n\tPPPIOCGRASYNCMAP                 = 0x80047455\n\tPPPIOCGUNIT                      = 0x80047456\n\tPPPIOCGXASYNCMAP                 = 0x80207450\n\tPPPIOCSACTIVE                    = 0x40107446\n\tPPPIOCSASYNCMAP                  = 0x40047457\n\tPPPIOCSCOMPRESS                  = 0x4010744d\n\tPPPIOCSDEBUG                     = 0x40047440\n\tPPPIOCSFLAGS                     = 0x40047459\n\tPPPIOCSMAXCID                    = 0x40047451\n\tPPPIOCSMRRU                      = 0x4004743b\n\tPPPIOCSMRU                       = 0x40047452\n\tPPPIOCSNPMODE                    = 0x4008744b\n\tPPPIOCSPASS                      = 0x40107447\n\tPPPIOCSRASYNCMAP                 = 0x40047454\n\tPPPIOCSXASYNCMAP                 = 0x4020744f\n\tPPPIOCUNBRIDGECHAN               = 0x7434\n\tPPPIOCXFERUNIT                   = 0x744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x80503d01\n\tPTP_CLOCK_GETCAPS2               = 0x80503d0a\n\tPTP_ENABLE_PPS                   = 0x40043d04\n\tPTP_ENABLE_PPS2                  = 0x40043d0d\n\tPTP_EXTTS_REQUEST                = 0x40103d02\n\tPTP_EXTTS_REQUEST2               = 0x40103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x3d13\n\tPTP_MASK_EN_SINGLE               = 0x40043d14\n\tPTP_PEROUT_REQUEST               = 0x40383d03\n\tPTP_PEROUT_REQUEST2              = 0x40383d0c\n\tPTP_PIN_SETFUNC                  = 0x40603d07\n\tPTP_PIN_SETFUNC2                 = 0x40603d10\n\tPTP_SYS_OFFSET                   = 0x43403d05\n\tPTP_SYS_OFFSET2                  = 0x43403d0e\n\tPTRACE_DISABLE_TE                = 0x5010\n\tPTRACE_ENABLE_TE                 = 0x5009\n\tPTRACE_GET_LAST_BREAK            = 0x5006\n\tPTRACE_OLDSETOPTIONS             = 0x15\n\tPTRACE_PEEKDATA_AREA             = 0x5003\n\tPTRACE_PEEKTEXT_AREA             = 0x5002\n\tPTRACE_PEEKUSR_AREA              = 0x5000\n\tPTRACE_PEEK_SYSTEM_CALL          = 0x5007\n\tPTRACE_POKEDATA_AREA             = 0x5005\n\tPTRACE_POKETEXT_AREA             = 0x5004\n\tPTRACE_POKEUSR_AREA              = 0x5001\n\tPTRACE_POKE_SYSTEM_CALL          = 0x5008\n\tPTRACE_PROT                      = 0x15\n\tPTRACE_SINGLEBLOCK               = 0xc\n\tPTRACE_SYSEMU                    = 0x1f\n\tPTRACE_SYSEMU_SINGLESTEP         = 0x20\n\tPTRACE_TE_ABORT_RAND             = 0x5011\n\tPT_ACR0                          = 0x90\n\tPT_ACR1                          = 0x94\n\tPT_ACR10                         = 0xb8\n\tPT_ACR11                         = 0xbc\n\tPT_ACR12                         = 0xc0\n\tPT_ACR13                         = 0xc4\n\tPT_ACR14                         = 0xc8\n\tPT_ACR15                         = 0xcc\n\tPT_ACR2                          = 0x98\n\tPT_ACR3                          = 0x9c\n\tPT_ACR4                          = 0xa0\n\tPT_ACR5                          = 0xa4\n\tPT_ACR6                          = 0xa8\n\tPT_ACR7                          = 0xac\n\tPT_ACR8                          = 0xb0\n\tPT_ACR9                          = 0xb4\n\tPT_CR_10                         = 0x168\n\tPT_CR_11                         = 0x170\n\tPT_CR_9                          = 0x160\n\tPT_ENDREGS                       = 0x1af\n\tPT_FPC                           = 0xd8\n\tPT_FPR0                          = 0xe0\n\tPT_FPR1                          = 0xe8\n\tPT_FPR10                         = 0x130\n\tPT_FPR11                         = 0x138\n\tPT_FPR12                         = 0x140\n\tPT_FPR13                         = 0x148\n\tPT_FPR14                         = 0x150\n\tPT_FPR15                         = 0x158\n\tPT_FPR2                          = 0xf0\n\tPT_FPR3                          = 0xf8\n\tPT_FPR4                          = 0x100\n\tPT_FPR5                          = 0x108\n\tPT_FPR6                          = 0x110\n\tPT_FPR7                          = 0x118\n\tPT_FPR8                          = 0x120\n\tPT_FPR9                          = 0x128\n\tPT_GPR0                          = 0x10\n\tPT_GPR1                          = 0x18\n\tPT_GPR10                         = 0x60\n\tPT_GPR11                         = 0x68\n\tPT_GPR12                         = 0x70\n\tPT_GPR13                         = 0x78\n\tPT_GPR14                         = 0x80\n\tPT_GPR15                         = 0x88\n\tPT_GPR2                          = 0x20\n\tPT_GPR3                          = 0x28\n\tPT_GPR4                          = 0x30\n\tPT_GPR5                          = 0x38\n\tPT_GPR6                          = 0x40\n\tPT_GPR7                          = 0x48\n\tPT_GPR8                          = 0x50\n\tPT_GPR9                          = 0x58\n\tPT_IEEE_IP                       = 0x1a8\n\tPT_LASTOFF                       = 0x1a8\n\tPT_ORIGGPR2                      = 0xd0\n\tPT_PSWADDR                       = 0x8\n\tPT_PSWMASK                       = 0x0\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x7\n\tRLIMIT_NPROC                     = 0x6\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x40085203\n\tRNDADDTOENTCNT                   = 0x40045201\n\tRNDCLEARPOOL                     = 0x5206\n\tRNDGETENTCNT                     = 0x80045200\n\tRNDGETPOOL                       = 0x80085202\n\tRNDRESEEDCRNG                    = 0x5207\n\tRNDZAPENTCNT                     = 0x5204\n\tRTC_AIE_OFF                      = 0x7002\n\tRTC_AIE_ON                       = 0x7001\n\tRTC_ALM_READ                     = 0x80247008\n\tRTC_ALM_SET                      = 0x40247007\n\tRTC_EPOCH_READ                   = 0x8008700d\n\tRTC_EPOCH_SET                    = 0x4008700e\n\tRTC_IRQP_READ                    = 0x8008700b\n\tRTC_IRQP_SET                     = 0x4008700c\n\tRTC_PARAM_GET                    = 0x40187013\n\tRTC_PARAM_SET                    = 0x40187014\n\tRTC_PIE_OFF                      = 0x7006\n\tRTC_PIE_ON                       = 0x7005\n\tRTC_PLL_GET                      = 0x80207011\n\tRTC_PLL_SET                      = 0x40207012\n\tRTC_RD_TIME                      = 0x80247009\n\tRTC_SET_TIME                     = 0x4024700a\n\tRTC_UIE_OFF                      = 0x7004\n\tRTC_UIE_ON                       = 0x7003\n\tRTC_VL_CLR                       = 0x7014\n\tRTC_VL_READ                      = 0x80047013\n\tRTC_WIE_OFF                      = 0x7010\n\tRTC_WIE_ON                       = 0x700f\n\tRTC_WKALM_RD                     = 0x80287010\n\tRTC_WKALM_SET                    = 0x4028700f\n\tSCM_DEVMEM_DMABUF                = 0x4f\n\tSCM_DEVMEM_LINEAR                = 0x4e\n\tSCM_TIMESTAMPING                 = 0x25\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x36\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3a\n\tSCM_TIMESTAMPNS                  = 0x23\n\tSCM_TS_OPT_ID                    = 0x51\n\tSCM_TXTIME                       = 0x3d\n\tSCM_WIFI_STATUS                  = 0x29\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x40182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x40082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x40082104\n\tSFD_CLOEXEC                      = 0x80000\n\tSFD_NONBLOCK                     = 0x800\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x80108907\n\tSIOCGSTAMP_NEW                   = 0x80108906\n\tSIOCINQ                          = 0x541b\n\tSIOCOUTQ                         = 0x5411\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x80000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x800\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0x1\n\tSO_ACCEPTCONN                    = 0x1e\n\tSO_ATTACH_BPF                    = 0x32\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x33\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x34\n\tSO_BINDTODEVICE                  = 0x19\n\tSO_BINDTOIFINDEX                 = 0x3e\n\tSO_BPF_EXTENSIONS                = 0x30\n\tSO_BROADCAST                     = 0x6\n\tSO_BSDCOMPAT                     = 0xe\n\tSO_BUF_LOCK                      = 0x48\n\tSO_BUSY_POLL                     = 0x2e\n\tSO_BUSY_POLL_BUDGET              = 0x46\n\tSO_CNX_ADVICE                    = 0x35\n\tSO_COOKIE                        = 0x39\n\tSO_DETACH_REUSEPORT_BPF          = 0x44\n\tSO_DEVMEM_DMABUF                 = 0x4f\n\tSO_DEVMEM_DONTNEED               = 0x50\n\tSO_DEVMEM_LINEAR                 = 0x4e\n\tSO_DOMAIN                        = 0x27\n\tSO_DONTROUTE                     = 0x5\n\tSO_ERROR                         = 0x4\n\tSO_INCOMING_CPU                  = 0x31\n\tSO_INCOMING_NAPI_ID              = 0x38\n\tSO_KEEPALIVE                     = 0x9\n\tSO_LINGER                        = 0xd\n\tSO_LOCK_FILTER                   = 0x2c\n\tSO_MARK                          = 0x24\n\tSO_MAX_PACING_RATE               = 0x2f\n\tSO_MEMINFO                       = 0x37\n\tSO_NETNS_COOKIE                  = 0x47\n\tSO_NOFCS                         = 0x2b\n\tSO_OOBINLINE                     = 0xa\n\tSO_PASSCRED                      = 0x10\n\tSO_PASSPIDFD                     = 0x4c\n\tSO_PASSRIGHTS                    = 0x53\n\tSO_PASSSEC                       = 0x22\n\tSO_PEEK_OFF                      = 0x2a\n\tSO_PEERCRED                      = 0x11\n\tSO_PEERGROUPS                    = 0x3b\n\tSO_PEERPIDFD                     = 0x4d\n\tSO_PEERSEC                       = 0x1f\n\tSO_PREFER_BUSY_POLL              = 0x45\n\tSO_PROTOCOL                      = 0x26\n\tSO_RCVBUF                        = 0x8\n\tSO_RCVBUFFORCE                   = 0x21\n\tSO_RCVLOWAT                      = 0x12\n\tSO_RCVMARK                       = 0x4b\n\tSO_RCVPRIORITY                   = 0x52\n\tSO_RCVTIMEO                      = 0x14\n\tSO_RCVTIMEO_NEW                  = 0x42\n\tSO_RCVTIMEO_OLD                  = 0x14\n\tSO_RESERVE_MEM                   = 0x49\n\tSO_REUSEADDR                     = 0x2\n\tSO_REUSEPORT                     = 0xf\n\tSO_RXQ_OVFL                      = 0x28\n\tSO_SECURITY_AUTHENTICATION       = 0x16\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x18\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x17\n\tSO_SELECT_ERR_QUEUE              = 0x2d\n\tSO_SNDBUF                        = 0x7\n\tSO_SNDBUFFORCE                   = 0x20\n\tSO_SNDLOWAT                      = 0x13\n\tSO_SNDTIMEO                      = 0x15\n\tSO_SNDTIMEO_NEW                  = 0x43\n\tSO_SNDTIMEO_OLD                  = 0x15\n\tSO_TIMESTAMPING                  = 0x25\n\tSO_TIMESTAMPING_NEW              = 0x41\n\tSO_TIMESTAMPING_OLD              = 0x25\n\tSO_TIMESTAMPNS                   = 0x23\n\tSO_TIMESTAMPNS_NEW               = 0x40\n\tSO_TIMESTAMPNS_OLD               = 0x23\n\tSO_TIMESTAMP_NEW                 = 0x3f\n\tSO_TXREHASH                      = 0x4a\n\tSO_TXTIME                        = 0x3d\n\tSO_TYPE                          = 0x3\n\tSO_WIFI_STATUS                   = 0x29\n\tSO_ZEROCOPY                      = 0x3c\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x540b\n\tTCGETA                           = 0x5405\n\tTCGETS                           = 0x5401\n\tTCGETS2                          = 0x802c542a\n\tTCGETX                           = 0x5432\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x5409\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x5406\n\tTCSETAF                          = 0x5408\n\tTCSETAW                          = 0x5407\n\tTCSETS                           = 0x5402\n\tTCSETS2                          = 0x402c542b\n\tTCSETSF                          = 0x5404\n\tTCSETSF2                         = 0x402c542d\n\tTCSETSW                          = 0x5403\n\tTCSETSW2                         = 0x402c542c\n\tTCSETX                           = 0x5433\n\tTCSETXF                          = 0x5434\n\tTCSETXW                          = 0x5435\n\tTCXONC                           = 0x540a\n\tTFD_CLOEXEC                      = 0x80000\n\tTFD_NONBLOCK                     = 0x800\n\tTIOCCBRK                         = 0x5428\n\tTIOCCONS                         = 0x541d\n\tTIOCEXCL                         = 0x540c\n\tTIOCGDEV                         = 0x80045432\n\tTIOCGETD                         = 0x5424\n\tTIOCGEXCL                        = 0x80045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x80285442\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x540f\n\tTIOCGPKT                         = 0x80045438\n\tTIOCGPTLCK                       = 0x80045439\n\tTIOCGPTN                         = 0x80045430\n\tTIOCGPTPEER                      = 0x5441\n\tTIOCGRS485                       = 0x542e\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x5429\n\tTIOCGSOFTCAR                     = 0x5419\n\tTIOCGWINSZ                       = 0x5413\n\tTIOCINQ                          = 0x541b\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x5417\n\tTIOCMBIS                         = 0x5416\n\tTIOCMGET                         = 0x5415\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x5418\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x5422\n\tTIOCNXCL                         = 0x540d\n\tTIOCOUTQ                         = 0x5411\n\tTIOCPKT                          = 0x5420\n\tTIOCSBRK                         = 0x5427\n\tTIOCSCTTY                        = 0x540e\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSER_TEMT                     = 0x1\n\tTIOCSETD                         = 0x5423\n\tTIOCSIG                          = 0x40045436\n\tTIOCSISO7816                     = 0xc0285443\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x5410\n\tTIOCSPTLCK                       = 0x40045431\n\tTIOCSRS485                       = 0x542f\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x541a\n\tTIOCSTI                          = 0x5412\n\tTIOCSWINSZ                       = 0x5414\n\tTIOCVHANGUP                      = 0x5437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x401054d5\n\tTUNDETACHFILTER                  = 0x401054d6\n\tTUNGETDEVNETNS                   = 0x54e3\n\tTUNGETFEATURES                   = 0x800454cf\n\tTUNGETFILTER                     = 0x801054db\n\tTUNGETIFF                        = 0x800454d2\n\tTUNGETSNDBUF                     = 0x800454d3\n\tTUNGETVNETBE                     = 0x800454df\n\tTUNGETVNETHDRSZ                  = 0x800454d7\n\tTUNGETVNETLE                     = 0x800454dd\n\tTUNSETCARRIER                    = 0x400454e2\n\tTUNSETDEBUG                      = 0x400454c9\n\tTUNSETFILTEREBPF                 = 0x800454e1\n\tTUNSETGROUP                      = 0x400454ce\n\tTUNSETIFF                        = 0x400454ca\n\tTUNSETIFINDEX                    = 0x400454da\n\tTUNSETLINK                       = 0x400454cd\n\tTUNSETNOCSUM                     = 0x400454c8\n\tTUNSETOFFLOAD                    = 0x400454d0\n\tTUNSETOWNER                      = 0x400454cc\n\tTUNSETPERSIST                    = 0x400454cb\n\tTUNSETQUEUE                      = 0x400454d9\n\tTUNSETSNDBUF                     = 0x400454d4\n\tTUNSETSTEERINGEBPF               = 0x800454e0\n\tTUNSETTXFILTER                   = 0x400454d1\n\tTUNSETVNETBE                     = 0x400454de\n\tTUNSETVNETHDRSZ                  = 0x400454d8\n\tTUNSETVNETLE                     = 0x400454dc\n\tUBI_IOCATT                       = 0x40186f40\n\tUBI_IOCDET                       = 0x40046f41\n\tUBI_IOCEBCH                      = 0x40044f02\n\tUBI_IOCEBER                      = 0x40044f01\n\tUBI_IOCEBISMAP                   = 0x80044f05\n\tUBI_IOCEBMAP                     = 0x40084f03\n\tUBI_IOCEBUNMAP                   = 0x40044f04\n\tUBI_IOCMKVOL                     = 0x40986f00\n\tUBI_IOCRMVOL                     = 0x40046f01\n\tUBI_IOCRNVOL                     = 0x51106f03\n\tUBI_IOCRPEB                      = 0x40046f04\n\tUBI_IOCRSVOL                     = 0x400c6f02\n\tUBI_IOCSETVOLPROP                = 0x40104f06\n\tUBI_IOCSPEB                      = 0x40046f05\n\tUBI_IOCVOLCRBLK                  = 0x40804f07\n\tUBI_IOCVOLRMBLK                  = 0x4f08\n\tUBI_IOCVOLUP                     = 0x40084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x80045702\n\tWDIOC_GETPRETIMEOUT              = 0x80045709\n\tWDIOC_GETSTATUS                  = 0x80045701\n\tWDIOC_GETSUPPORT                 = 0x80285700\n\tWDIOC_GETTEMP                    = 0x80045703\n\tWDIOC_GETTIMELEFT                = 0x8004570a\n\tWDIOC_GETTIMEOUT                 = 0x80045707\n\tWDIOC_KEEPALIVE                  = 0x80045705\n\tWDIOC_SETOPTIONS                 = 0x80045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x80804804\n\t_HIDIOCGRAWPHYS                  = 0x80404805\n\t_HIDIOCGRAWUNIQ                  = 0x80404808\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x62)\n\tEADDRNOTAVAIL   = syscall.Errno(0x63)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x61)\n\tEALREADY        = syscall.Errno(0x72)\n\tEBADE           = syscall.Errno(0x34)\n\tEBADFD          = syscall.Errno(0x4d)\n\tEBADMSG         = syscall.Errno(0x4a)\n\tEBADR           = syscall.Errno(0x35)\n\tEBADRQC         = syscall.Errno(0x38)\n\tEBADSLT         = syscall.Errno(0x39)\n\tEBFONT          = syscall.Errno(0x3b)\n\tECANCELED       = syscall.Errno(0x7d)\n\tECHRNG          = syscall.Errno(0x2c)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x67)\n\tECONNREFUSED    = syscall.Errno(0x6f)\n\tECONNRESET      = syscall.Errno(0x68)\n\tEDEADLK         = syscall.Errno(0x23)\n\tEDEADLOCK       = syscall.Errno(0x23)\n\tEDESTADDRREQ    = syscall.Errno(0x59)\n\tEDOTDOT         = syscall.Errno(0x49)\n\tEDQUOT          = syscall.Errno(0x7a)\n\tEHOSTDOWN       = syscall.Errno(0x70)\n\tEHOSTUNREACH    = syscall.Errno(0x71)\n\tEHWPOISON       = syscall.Errno(0x85)\n\tEIDRM           = syscall.Errno(0x2b)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x73)\n\tEISCONN         = syscall.Errno(0x6a)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x7f)\n\tEKEYREJECTED    = syscall.Errno(0x81)\n\tEKEYREVOKED     = syscall.Errno(0x80)\n\tEL2HLT          = syscall.Errno(0x33)\n\tEL2NSYNC        = syscall.Errno(0x2d)\n\tEL3HLT          = syscall.Errno(0x2e)\n\tEL3RST          = syscall.Errno(0x2f)\n\tELIBACC         = syscall.Errno(0x4f)\n\tELIBBAD         = syscall.Errno(0x50)\n\tELIBEXEC        = syscall.Errno(0x53)\n\tELIBMAX         = syscall.Errno(0x52)\n\tELIBSCN         = syscall.Errno(0x51)\n\tELNRNG          = syscall.Errno(0x30)\n\tELOOP           = syscall.Errno(0x28)\n\tEMEDIUMTYPE     = syscall.Errno(0x7c)\n\tEMSGSIZE        = syscall.Errno(0x5a)\n\tEMULTIHOP       = syscall.Errno(0x48)\n\tENAMETOOLONG    = syscall.Errno(0x24)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x64)\n\tENETRESET       = syscall.Errno(0x66)\n\tENETUNREACH     = syscall.Errno(0x65)\n\tENOANO          = syscall.Errno(0x37)\n\tENOBUFS         = syscall.Errno(0x69)\n\tENOCSI          = syscall.Errno(0x32)\n\tENODATA         = syscall.Errno(0x3d)\n\tENOKEY          = syscall.Errno(0x7e)\n\tENOLCK          = syscall.Errno(0x25)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEDIUM       = syscall.Errno(0x7b)\n\tENOMSG          = syscall.Errno(0x2a)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x5c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x26)\n\tENOTCONN        = syscall.Errno(0x6b)\n\tENOTEMPTY       = syscall.Errno(0x27)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x83)\n\tENOTSOCK        = syscall.Errno(0x58)\n\tENOTSUP         = syscall.Errno(0x5f)\n\tENOTUNIQ        = syscall.Errno(0x4c)\n\tEOPNOTSUPP      = syscall.Errno(0x5f)\n\tEOVERFLOW       = syscall.Errno(0x4b)\n\tEOWNERDEAD      = syscall.Errno(0x82)\n\tEPFNOSUPPORT    = syscall.Errno(0x60)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x5d)\n\tEPROTOTYPE      = syscall.Errno(0x5b)\n\tEREMCHG         = syscall.Errno(0x4e)\n\tEREMOTE         = syscall.Errno(0x42)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x55)\n\tERFKILL         = syscall.Errno(0x84)\n\tESHUTDOWN       = syscall.Errno(0x6c)\n\tESOCKTNOSUPPORT = syscall.Errno(0x5e)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x74)\n\tESTRPIPE        = syscall.Errno(0x56)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x6e)\n\tETOOMANYREFS    = syscall.Errno(0x6d)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x31)\n\tEUSERS          = syscall.Errno(0x57)\n\tEXFULL          = syscall.Errno(0x36)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0x7)\n\tSIGCHLD   = syscall.Signal(0x11)\n\tSIGCLD    = syscall.Signal(0x11)\n\tSIGCONT   = syscall.Signal(0x12)\n\tSIGIO     = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x1d)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1e)\n\tSIGSTKFLT = syscall.Signal(0x10)\n\tSIGSTOP   = syscall.Signal(0x13)\n\tSIGSYS    = syscall.Signal(0x1f)\n\tSIGTSTP   = syscall.Signal(0x14)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x17)\n\tSIGUSR1   = syscall.Signal(0xa)\n\tSIGUSR2   = syscall.Signal(0xc)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{35, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{36, \"ENAMETOOLONG\", \"file name too long\"},\n\t{37, \"ENOLCK\", \"no locks available\"},\n\t{38, \"ENOSYS\", \"function not implemented\"},\n\t{39, \"ENOTEMPTY\", \"directory not empty\"},\n\t{40, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{42, \"ENOMSG\", \"no message of desired type\"},\n\t{43, \"EIDRM\", \"identifier removed\"},\n\t{44, \"ECHRNG\", \"channel number out of range\"},\n\t{45, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{46, \"EL3HLT\", \"level 3 halted\"},\n\t{47, \"EL3RST\", \"level 3 reset\"},\n\t{48, \"ELNRNG\", \"link number out of range\"},\n\t{49, \"EUNATCH\", \"protocol driver not attached\"},\n\t{50, \"ENOCSI\", \"no CSI structure available\"},\n\t{51, \"EL2HLT\", \"level 2 halted\"},\n\t{52, \"EBADE\", \"invalid exchange\"},\n\t{53, \"EBADR\", \"invalid request descriptor\"},\n\t{54, \"EXFULL\", \"exchange full\"},\n\t{55, \"ENOANO\", \"no anode\"},\n\t{56, \"EBADRQC\", \"invalid request code\"},\n\t{57, \"EBADSLT\", \"invalid slot\"},\n\t{59, \"EBFONT\", \"bad font file format\"},\n\t{60, \"ENOSTR\", \"device not a stream\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of streams resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"EMULTIHOP\", \"multihop attempted\"},\n\t{73, \"EDOTDOT\", \"RFS specific error\"},\n\t{74, \"EBADMSG\", \"bad message\"},\n\t{75, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{76, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{77, \"EBADFD\", \"file descriptor in bad state\"},\n\t{78, \"EREMCHG\", \"remote address changed\"},\n\t{79, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{80, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{81, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{82, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{83, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{84, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{85, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{86, \"ESTRPIPE\", \"streams pipe error\"},\n\t{87, \"EUSERS\", \"too many users\"},\n\t{88, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{89, \"EDESTADDRREQ\", \"destination address required\"},\n\t{90, \"EMSGSIZE\", \"message too long\"},\n\t{91, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{92, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{93, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{94, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{95, \"ENOTSUP\", \"operation not supported\"},\n\t{96, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{97, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{98, \"EADDRINUSE\", \"address already in use\"},\n\t{99, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{100, \"ENETDOWN\", \"network is down\"},\n\t{101, \"ENETUNREACH\", \"network is unreachable\"},\n\t{102, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{103, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{104, \"ECONNRESET\", \"connection reset by peer\"},\n\t{105, \"ENOBUFS\", \"no buffer space available\"},\n\t{106, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{107, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{108, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{109, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{110, \"ETIMEDOUT\", \"connection timed out\"},\n\t{111, \"ECONNREFUSED\", \"connection refused\"},\n\t{112, \"EHOSTDOWN\", \"host is down\"},\n\t{113, \"EHOSTUNREACH\", \"no route to host\"},\n\t{114, \"EALREADY\", \"operation already in progress\"},\n\t{115, \"EINPROGRESS\", \"operation now in progress\"},\n\t{116, \"ESTALE\", \"stale file handle\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EDQUOT\", \"disk quota exceeded\"},\n\t{123, \"ENOMEDIUM\", \"no medium found\"},\n\t{124, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{125, \"ECANCELED\", \"operation canceled\"},\n\t{126, \"ENOKEY\", \"required key not available\"},\n\t{127, \"EKEYEXPIRED\", \"key has expired\"},\n\t{128, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{129, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{130, \"EOWNERDEAD\", \"owner died\"},\n\t{131, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{132, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{133, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGBUS\", \"bus error\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGUSR1\", \"user defined signal 1\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGUSR2\", \"user defined signal 2\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGSTKFLT\", \"stack fault\"},\n\t{17, \"SIGCHLD\", \"child exited\"},\n\t{18, \"SIGCONT\", \"continued\"},\n\t{19, \"SIGSTOP\", \"stopped (signal)\"},\n\t{20, \"SIGTSTP\", \"stopped\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGURG\", \"urgent I/O condition\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGIO\", \"I/O possible\"},\n\t{30, \"SIGPWR\", \"power failure\"},\n\t{31, \"SIGSYS\", \"bad system call\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go",
    "content": "// mkerrors.sh -Wall -Werror -static -I/tmp/sparc64/include\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build sparc64 && linux\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tASI_LEON_DFLUSH                  = 0x11\n\tASI_LEON_IFLUSH                  = 0x10\n\tASI_LEON_MMUFLUSH                = 0x18\n\tB1000000                         = 0x1008\n\tB115200                          = 0x1002\n\tB1152000                         = 0x1009\n\tB1500000                         = 0x100a\n\tB2000000                         = 0x100b\n\tB230400                          = 0x1003\n\tB2500000                         = 0x100c\n\tB3000000                         = 0x100d\n\tB3500000                         = 0x100e\n\tB4000000                         = 0x100f\n\tB460800                          = 0x1004\n\tB500000                          = 0x1005\n\tB57600                           = 0x1001\n\tB576000                          = 0x1006\n\tB921600                          = 0x1007\n\tBLKALIGNOFF                      = 0x2000127a\n\tBLKBSZGET                        = 0x40081270\n\tBLKBSZSET                        = 0x80081271\n\tBLKDISCARD                       = 0x20001277\n\tBLKDISCARDZEROES                 = 0x2000127c\n\tBLKFLSBUF                        = 0x20001261\n\tBLKFRAGET                        = 0x20001265\n\tBLKFRASET                        = 0x20001264\n\tBLKGETDISKSEQ                    = 0x40081280\n\tBLKGETSIZE                       = 0x20001260\n\tBLKGETSIZE64                     = 0x40081272\n\tBLKIOMIN                         = 0x20001278\n\tBLKIOOPT                         = 0x20001279\n\tBLKPBSZGET                       = 0x2000127b\n\tBLKRAGET                         = 0x20001263\n\tBLKRASET                         = 0x20001262\n\tBLKROGET                         = 0x2000125e\n\tBLKROSET                         = 0x2000125d\n\tBLKROTATIONAL                    = 0x2000127e\n\tBLKRRPART                        = 0x2000125f\n\tBLKSECDISCARD                    = 0x2000127d\n\tBLKSECTGET                       = 0x20001267\n\tBLKSECTSET                       = 0x20001266\n\tBLKSSZGET                        = 0x20001268\n\tBLKZEROOUT                       = 0x2000127f\n\tBOTHER                           = 0x1000\n\tBS1                              = 0x2000\n\tBSDLY                            = 0x2000\n\tCBAUD                            = 0x100f\n\tCBAUDEX                          = 0x1000\n\tCIBAUD                           = 0x100f0000\n\tCLOCAL                           = 0x800\n\tCR1                              = 0x200\n\tCR2                              = 0x400\n\tCR3                              = 0x600\n\tCRDLY                            = 0x600\n\tCREAD                            = 0x80\n\tCS6                              = 0x10\n\tCS7                              = 0x20\n\tCS8                              = 0x30\n\tCSIZE                            = 0x30\n\tCSTOPB                           = 0x40\n\tDM_MPATH_PROBE_PATHS             = 0x2000fd12\n\tECCGETLAYOUT                     = 0x41484d11\n\tECCGETSTATS                      = 0x40104d12\n\tECHOCTL                          = 0x200\n\tECHOE                            = 0x10\n\tECHOK                            = 0x20\n\tECHOKE                           = 0x800\n\tECHONL                           = 0x40\n\tECHOPRT                          = 0x400\n\tEFD_CLOEXEC                      = 0x400000\n\tEFD_NONBLOCK                     = 0x4000\n\tEMT_TAGOVF                       = 0x1\n\tEPIOCGPARAMS                     = 0x40088a02\n\tEPIOCSPARAMS                     = 0x80088a01\n\tEPOLL_CLOEXEC                    = 0x400000\n\tEXTPROC                          = 0x10000\n\tFF1                              = 0x8000\n\tFFDLY                            = 0x8000\n\tFICLONE                          = 0x80049409\n\tFICLONERANGE                     = 0x8020940d\n\tFLUSHO                           = 0x1000\n\tFS_IOC_ENABLE_VERITY             = 0x80806685\n\tFS_IOC_GETFLAGS                  = 0x40086601\n\tFS_IOC_GET_ENCRYPTION_NONCE      = 0x4010661b\n\tFS_IOC_GET_ENCRYPTION_POLICY     = 0x800c6615\n\tFS_IOC_GET_ENCRYPTION_PWSALT     = 0x80106614\n\tFS_IOC_SETFLAGS                  = 0x80086602\n\tFS_IOC_SET_ENCRYPTION_POLICY     = 0x400c6613\n\tF_GETLK                          = 0x7\n\tF_GETLK64                        = 0x7\n\tF_GETOWN                         = 0x5\n\tF_RDLCK                          = 0x1\n\tF_SETLK                          = 0x8\n\tF_SETLK64                        = 0x8\n\tF_SETLKW                         = 0x9\n\tF_SETLKW64                       = 0x9\n\tF_SETOWN                         = 0x6\n\tF_UNLCK                          = 0x3\n\tF_WRLCK                          = 0x2\n\tHIDIOCGRAWINFO                   = 0x40084803\n\tHIDIOCGRDESC                     = 0x50044802\n\tHIDIOCGRDESCSIZE                 = 0x40044801\n\tHIDIOCREVOKE                     = 0x8004480d\n\tHUPCL                            = 0x400\n\tICANON                           = 0x2\n\tIEXTEN                           = 0x8000\n\tIN_CLOEXEC                       = 0x400000\n\tIN_NONBLOCK                      = 0x4000\n\tIOCTL_MEI_NOTIFY_GET             = 0x40044803\n\tIOCTL_MEI_NOTIFY_SET             = 0x80044802\n\tIOCTL_VM_SOCKETS_GET_LOCAL_CID   = 0x200007b9\n\tIPV6_FLOWINFO_MASK               = 0xfffffff\n\tIPV6_FLOWLABEL_MASK              = 0xfffff\n\tISIG                             = 0x1\n\tIUCLC                            = 0x200\n\tIXOFF                            = 0x1000\n\tIXON                             = 0x400\n\tMAP_ANON                         = 0x20\n\tMAP_ANONYMOUS                    = 0x20\n\tMAP_DENYWRITE                    = 0x800\n\tMAP_EXECUTABLE                   = 0x1000\n\tMAP_GROWSDOWN                    = 0x200\n\tMAP_HUGETLB                      = 0x40000\n\tMAP_LOCKED                       = 0x100\n\tMAP_NONBLOCK                     = 0x10000\n\tMAP_NORESERVE                    = 0x40\n\tMAP_POPULATE                     = 0x8000\n\tMAP_RENAME                       = 0x20\n\tMAP_STACK                        = 0x20000\n\tMAP_SYNC                         = 0x80000\n\tMCL_CURRENT                      = 0x2000\n\tMCL_FUTURE                       = 0x4000\n\tMCL_ONFAULT                      = 0x8000\n\tMEMERASE                         = 0x80084d02\n\tMEMERASE64                       = 0x80104d14\n\tMEMGETBADBLOCK                   = 0x80084d0b\n\tMEMGETINFO                       = 0x40204d01\n\tMEMGETOOBSEL                     = 0x40c84d0a\n\tMEMGETREGIONCOUNT                = 0x40044d07\n\tMEMISLOCKED                      = 0x40084d17\n\tMEMLOCK                          = 0x80084d05\n\tMEMREAD                          = 0xc0404d1a\n\tMEMREADOOB                       = 0xc0104d04\n\tMEMSETBADBLOCK                   = 0x80084d0c\n\tMEMUNLOCK                        = 0x80084d06\n\tMEMWRITEOOB                      = 0xc0104d03\n\tMTDFILEMODE                      = 0x20004d13\n\tNFDBITS                          = 0x40\n\tNLDLY                            = 0x100\n\tNOFLSH                           = 0x80\n\tNS_GET_MNTNS_ID                  = 0x4008b705\n\tNS_GET_NSTYPE                    = 0x2000b703\n\tNS_GET_OWNER_UID                 = 0x2000b704\n\tNS_GET_PARENT                    = 0x2000b702\n\tNS_GET_PID_FROM_PIDNS            = 0x4004b706\n\tNS_GET_PID_IN_PIDNS              = 0x4004b708\n\tNS_GET_TGID_FROM_PIDNS           = 0x4004b707\n\tNS_GET_TGID_IN_PIDNS             = 0x4004b709\n\tNS_GET_USERNS                    = 0x2000b701\n\tOLCUC                            = 0x2\n\tONLCR                            = 0x4\n\tOTPERASE                         = 0x800c4d19\n\tOTPGETREGIONCOUNT                = 0x80044d0e\n\tOTPGETREGIONINFO                 = 0x800c4d0f\n\tOTPLOCK                          = 0x400c4d10\n\tOTPSELECT                        = 0x40044d0d\n\tO_APPEND                         = 0x8\n\tO_ASYNC                          = 0x40\n\tO_CLOEXEC                        = 0x400000\n\tO_CREAT                          = 0x200\n\tO_DIRECT                         = 0x100000\n\tO_DIRECTORY                      = 0x10000\n\tO_DSYNC                          = 0x2000\n\tO_EXCL                           = 0x800\n\tO_FSYNC                          = 0x802000\n\tO_LARGEFILE                      = 0x0\n\tO_NDELAY                         = 0x4004\n\tO_NOATIME                        = 0x200000\n\tO_NOCTTY                         = 0x8000\n\tO_NOFOLLOW                       = 0x20000\n\tO_NONBLOCK                       = 0x4000\n\tO_PATH                           = 0x1000000\n\tO_RSYNC                          = 0x802000\n\tO_SYNC                           = 0x802000\n\tO_TMPFILE                        = 0x2010000\n\tO_TRUNC                          = 0x400\n\tPARENB                           = 0x100\n\tPARODD                           = 0x200\n\tPENDIN                           = 0x4000\n\tPERF_EVENT_IOC_DISABLE           = 0x20002401\n\tPERF_EVENT_IOC_ENABLE            = 0x20002400\n\tPERF_EVENT_IOC_ID                = 0x40082407\n\tPERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b\n\tPERF_EVENT_IOC_PAUSE_OUTPUT      = 0x80042409\n\tPERF_EVENT_IOC_PERIOD            = 0x80082404\n\tPERF_EVENT_IOC_QUERY_BPF         = 0xc008240a\n\tPERF_EVENT_IOC_REFRESH           = 0x20002402\n\tPERF_EVENT_IOC_RESET             = 0x20002403\n\tPERF_EVENT_IOC_SET_BPF           = 0x80042408\n\tPERF_EVENT_IOC_SET_FILTER        = 0x80082406\n\tPERF_EVENT_IOC_SET_OUTPUT        = 0x20002405\n\tPPPIOCATTACH                     = 0x8004743d\n\tPPPIOCATTCHAN                    = 0x80047438\n\tPPPIOCBRIDGECHAN                 = 0x80047435\n\tPPPIOCCONNECT                    = 0x8004743a\n\tPPPIOCDETACH                     = 0x8004743c\n\tPPPIOCDISCONN                    = 0x20007439\n\tPPPIOCGASYNCMAP                  = 0x40047458\n\tPPPIOCGCHAN                      = 0x40047437\n\tPPPIOCGDEBUG                     = 0x40047441\n\tPPPIOCGFLAGS                     = 0x4004745a\n\tPPPIOCGIDLE                      = 0x4010743f\n\tPPPIOCGIDLE32                    = 0x4008743f\n\tPPPIOCGIDLE64                    = 0x4010743f\n\tPPPIOCGL2TPSTATS                 = 0x40487436\n\tPPPIOCGMRU                       = 0x40047453\n\tPPPIOCGRASYNCMAP                 = 0x40047455\n\tPPPIOCGUNIT                      = 0x40047456\n\tPPPIOCGXASYNCMAP                 = 0x40207450\n\tPPPIOCSACTIVE                    = 0x80107446\n\tPPPIOCSASYNCMAP                  = 0x80047457\n\tPPPIOCSCOMPRESS                  = 0x8010744d\n\tPPPIOCSDEBUG                     = 0x80047440\n\tPPPIOCSFLAGS                     = 0x80047459\n\tPPPIOCSMAXCID                    = 0x80047451\n\tPPPIOCSMRRU                      = 0x8004743b\n\tPPPIOCSMRU                       = 0x80047452\n\tPPPIOCSNPMODE                    = 0x8008744b\n\tPPPIOCSPASS                      = 0x80107447\n\tPPPIOCSRASYNCMAP                 = 0x80047454\n\tPPPIOCSXASYNCMAP                 = 0x8020744f\n\tPPPIOCUNBRIDGECHAN               = 0x20007434\n\tPPPIOCXFERUNIT                   = 0x2000744e\n\tPR_SET_PTRACER_ANY               = 0xffffffffffffffff\n\tPTP_CLOCK_GETCAPS                = 0x40503d01\n\tPTP_CLOCK_GETCAPS2               = 0x40503d0a\n\tPTP_ENABLE_PPS                   = 0x80043d04\n\tPTP_ENABLE_PPS2                  = 0x80043d0d\n\tPTP_EXTTS_REQUEST                = 0x80103d02\n\tPTP_EXTTS_REQUEST2               = 0x80103d0b\n\tPTP_MASK_CLEAR_ALL               = 0x20003d13\n\tPTP_MASK_EN_SINGLE               = 0x80043d14\n\tPTP_PEROUT_REQUEST               = 0x80383d03\n\tPTP_PEROUT_REQUEST2              = 0x80383d0c\n\tPTP_PIN_SETFUNC                  = 0x80603d07\n\tPTP_PIN_SETFUNC2                 = 0x80603d10\n\tPTP_SYS_OFFSET                   = 0x83403d05\n\tPTP_SYS_OFFSET2                  = 0x83403d0e\n\tPTRACE_GETFPAREGS                = 0x14\n\tPTRACE_GETFPREGS                 = 0xe\n\tPTRACE_GETFPREGS64               = 0x19\n\tPTRACE_GETREGS64                 = 0x16\n\tPTRACE_READDATA                  = 0x10\n\tPTRACE_READTEXT                  = 0x12\n\tPTRACE_SETFPAREGS                = 0x15\n\tPTRACE_SETFPREGS                 = 0xf\n\tPTRACE_SETFPREGS64               = 0x1a\n\tPTRACE_SETREGS64                 = 0x17\n\tPTRACE_SPARC_DETACH              = 0xb\n\tPTRACE_WRITEDATA                 = 0x11\n\tPTRACE_WRITETEXT                 = 0x13\n\tPT_FP                            = 0x48\n\tPT_G0                            = 0x10\n\tPT_G1                            = 0x14\n\tPT_G2                            = 0x18\n\tPT_G3                            = 0x1c\n\tPT_G4                            = 0x20\n\tPT_G5                            = 0x24\n\tPT_G6                            = 0x28\n\tPT_G7                            = 0x2c\n\tPT_I0                            = 0x30\n\tPT_I1                            = 0x34\n\tPT_I2                            = 0x38\n\tPT_I3                            = 0x3c\n\tPT_I4                            = 0x40\n\tPT_I5                            = 0x44\n\tPT_I6                            = 0x48\n\tPT_I7                            = 0x4c\n\tPT_NPC                           = 0x8\n\tPT_PC                            = 0x4\n\tPT_PSR                           = 0x0\n\tPT_REGS_MAGIC                    = 0x57ac6c00\n\tPT_TNPC                          = 0x90\n\tPT_TPC                           = 0x88\n\tPT_TSTATE                        = 0x80\n\tPT_V9_FP                         = 0x70\n\tPT_V9_G0                         = 0x0\n\tPT_V9_G1                         = 0x8\n\tPT_V9_G2                         = 0x10\n\tPT_V9_G3                         = 0x18\n\tPT_V9_G4                         = 0x20\n\tPT_V9_G5                         = 0x28\n\tPT_V9_G6                         = 0x30\n\tPT_V9_G7                         = 0x38\n\tPT_V9_I0                         = 0x40\n\tPT_V9_I1                         = 0x48\n\tPT_V9_I2                         = 0x50\n\tPT_V9_I3                         = 0x58\n\tPT_V9_I4                         = 0x60\n\tPT_V9_I5                         = 0x68\n\tPT_V9_I6                         = 0x70\n\tPT_V9_I7                         = 0x78\n\tPT_V9_MAGIC                      = 0x9c\n\tPT_V9_TNPC                       = 0x90\n\tPT_V9_TPC                        = 0x88\n\tPT_V9_TSTATE                     = 0x80\n\tPT_V9_Y                          = 0x98\n\tPT_WIM                           = 0x10\n\tPT_Y                             = 0xc\n\tRLIMIT_AS                        = 0x9\n\tRLIMIT_MEMLOCK                   = 0x8\n\tRLIMIT_NOFILE                    = 0x6\n\tRLIMIT_NPROC                     = 0x7\n\tRLIMIT_RSS                       = 0x5\n\tRNDADDENTROPY                    = 0x80085203\n\tRNDADDTOENTCNT                   = 0x80045201\n\tRNDCLEARPOOL                     = 0x20005206\n\tRNDGETENTCNT                     = 0x40045200\n\tRNDGETPOOL                       = 0x40085202\n\tRNDRESEEDCRNG                    = 0x20005207\n\tRNDZAPENTCNT                     = 0x20005204\n\tRTC_AIE_OFF                      = 0x20007002\n\tRTC_AIE_ON                       = 0x20007001\n\tRTC_ALM_READ                     = 0x40247008\n\tRTC_ALM_SET                      = 0x80247007\n\tRTC_EPOCH_READ                   = 0x4008700d\n\tRTC_EPOCH_SET                    = 0x8008700e\n\tRTC_IRQP_READ                    = 0x4008700b\n\tRTC_IRQP_SET                     = 0x8008700c\n\tRTC_PARAM_GET                    = 0x80187013\n\tRTC_PARAM_SET                    = 0x80187014\n\tRTC_PIE_OFF                      = 0x20007006\n\tRTC_PIE_ON                       = 0x20007005\n\tRTC_PLL_GET                      = 0x40207011\n\tRTC_PLL_SET                      = 0x80207012\n\tRTC_RD_TIME                      = 0x40247009\n\tRTC_SET_TIME                     = 0x8024700a\n\tRTC_UIE_OFF                      = 0x20007004\n\tRTC_UIE_ON                       = 0x20007003\n\tRTC_VL_CLR                       = 0x20007014\n\tRTC_VL_READ                      = 0x40047013\n\tRTC_WIE_OFF                      = 0x20007010\n\tRTC_WIE_ON                       = 0x2000700f\n\tRTC_WKALM_RD                     = 0x40287010\n\tRTC_WKALM_SET                    = 0x8028700f\n\tSCM_DEVMEM_DMABUF                = 0x58\n\tSCM_DEVMEM_LINEAR                = 0x57\n\tSCM_TIMESTAMPING                 = 0x23\n\tSCM_TIMESTAMPING_OPT_STATS       = 0x38\n\tSCM_TIMESTAMPING_PKTINFO         = 0x3c\n\tSCM_TIMESTAMPNS                  = 0x21\n\tSCM_TS_OPT_ID                    = 0x5a\n\tSCM_TXTIME                       = 0x3f\n\tSCM_WIFI_STATUS                  = 0x25\n\tSECCOMP_IOCTL_NOTIF_ADDFD        = 0x80182103\n\tSECCOMP_IOCTL_NOTIF_ID_VALID     = 0x80082102\n\tSECCOMP_IOCTL_NOTIF_SET_FLAGS    = 0x80082104\n\tSFD_CLOEXEC                      = 0x400000\n\tSFD_NONBLOCK                     = 0x4000\n\tSF_FP                            = 0x38\n\tSF_I0                            = 0x20\n\tSF_I1                            = 0x24\n\tSF_I2                            = 0x28\n\tSF_I3                            = 0x2c\n\tSF_I4                            = 0x30\n\tSF_I5                            = 0x34\n\tSF_L0                            = 0x0\n\tSF_L1                            = 0x4\n\tSF_L2                            = 0x8\n\tSF_L3                            = 0xc\n\tSF_L4                            = 0x10\n\tSF_L5                            = 0x14\n\tSF_L6                            = 0x18\n\tSF_L7                            = 0x1c\n\tSF_PC                            = 0x3c\n\tSF_RETP                          = 0x40\n\tSF_V9_FP                         = 0x70\n\tSF_V9_I0                         = 0x40\n\tSF_V9_I1                         = 0x48\n\tSF_V9_I2                         = 0x50\n\tSF_V9_I3                         = 0x58\n\tSF_V9_I4                         = 0x60\n\tSF_V9_I5                         = 0x68\n\tSF_V9_L0                         = 0x0\n\tSF_V9_L1                         = 0x8\n\tSF_V9_L2                         = 0x10\n\tSF_V9_L3                         = 0x18\n\tSF_V9_L4                         = 0x20\n\tSF_V9_L5                         = 0x28\n\tSF_V9_L6                         = 0x30\n\tSF_V9_L7                         = 0x38\n\tSF_V9_PC                         = 0x78\n\tSF_V9_RETP                       = 0x80\n\tSF_V9_XARG0                      = 0x88\n\tSF_V9_XARG1                      = 0x90\n\tSF_V9_XARG2                      = 0x98\n\tSF_V9_XARG3                      = 0xa0\n\tSF_V9_XARG4                      = 0xa8\n\tSF_V9_XARG5                      = 0xb0\n\tSF_V9_XXARG                      = 0xb8\n\tSF_XARG0                         = 0x44\n\tSF_XARG1                         = 0x48\n\tSF_XARG2                         = 0x4c\n\tSF_XARG3                         = 0x50\n\tSF_XARG4                         = 0x54\n\tSF_XARG5                         = 0x58\n\tSF_XXARG                         = 0x5c\n\tSIOCATMARK                       = 0x8905\n\tSIOCGPGRP                        = 0x8904\n\tSIOCGSTAMPNS_NEW                 = 0x40108907\n\tSIOCGSTAMP_NEW                   = 0x40108906\n\tSIOCINQ                          = 0x4004667f\n\tSIOCOUTQ                         = 0x40047473\n\tSIOCSPGRP                        = 0x8902\n\tSOCK_CLOEXEC                     = 0x400000\n\tSOCK_DGRAM                       = 0x2\n\tSOCK_NONBLOCK                    = 0x4000\n\tSOCK_STREAM                      = 0x1\n\tSOL_SOCKET                       = 0xffff\n\tSO_ACCEPTCONN                    = 0x8000\n\tSO_ATTACH_BPF                    = 0x34\n\tSO_ATTACH_REUSEPORT_CBPF         = 0x35\n\tSO_ATTACH_REUSEPORT_EBPF         = 0x36\n\tSO_BINDTODEVICE                  = 0xd\n\tSO_BINDTOIFINDEX                 = 0x41\n\tSO_BPF_EXTENSIONS                = 0x32\n\tSO_BROADCAST                     = 0x20\n\tSO_BSDCOMPAT                     = 0x400\n\tSO_BUF_LOCK                      = 0x51\n\tSO_BUSY_POLL                     = 0x30\n\tSO_BUSY_POLL_BUDGET              = 0x49\n\tSO_CNX_ADVICE                    = 0x37\n\tSO_COOKIE                        = 0x3b\n\tSO_DETACH_REUSEPORT_BPF          = 0x47\n\tSO_DEVMEM_DMABUF                 = 0x58\n\tSO_DEVMEM_DONTNEED               = 0x59\n\tSO_DEVMEM_LINEAR                 = 0x57\n\tSO_DOMAIN                        = 0x1029\n\tSO_DONTROUTE                     = 0x10\n\tSO_ERROR                         = 0x1007\n\tSO_INCOMING_CPU                  = 0x33\n\tSO_INCOMING_NAPI_ID              = 0x3a\n\tSO_KEEPALIVE                     = 0x8\n\tSO_LINGER                        = 0x80\n\tSO_LOCK_FILTER                   = 0x28\n\tSO_MARK                          = 0x22\n\tSO_MAX_PACING_RATE               = 0x31\n\tSO_MEMINFO                       = 0x39\n\tSO_NETNS_COOKIE                  = 0x50\n\tSO_NOFCS                         = 0x27\n\tSO_OOBINLINE                     = 0x100\n\tSO_PASSCRED                      = 0x2\n\tSO_PASSPIDFD                     = 0x55\n\tSO_PASSRIGHTS                    = 0x5c\n\tSO_PASSSEC                       = 0x1f\n\tSO_PEEK_OFF                      = 0x26\n\tSO_PEERCRED                      = 0x40\n\tSO_PEERGROUPS                    = 0x3d\n\tSO_PEERPIDFD                     = 0x56\n\tSO_PEERSEC                       = 0x1e\n\tSO_PREFER_BUSY_POLL              = 0x48\n\tSO_PROTOCOL                      = 0x1028\n\tSO_RCVBUF                        = 0x1002\n\tSO_RCVBUFFORCE                   = 0x100b\n\tSO_RCVLOWAT                      = 0x800\n\tSO_RCVMARK                       = 0x54\n\tSO_RCVPRIORITY                   = 0x5b\n\tSO_RCVTIMEO                      = 0x2000\n\tSO_RCVTIMEO_NEW                  = 0x44\n\tSO_RCVTIMEO_OLD                  = 0x2000\n\tSO_RESERVE_MEM                   = 0x52\n\tSO_REUSEADDR                     = 0x4\n\tSO_REUSEPORT                     = 0x200\n\tSO_RXQ_OVFL                      = 0x24\n\tSO_SECURITY_AUTHENTICATION       = 0x5001\n\tSO_SECURITY_ENCRYPTION_NETWORK   = 0x5004\n\tSO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002\n\tSO_SELECT_ERR_QUEUE              = 0x29\n\tSO_SNDBUF                        = 0x1001\n\tSO_SNDBUFFORCE                   = 0x100a\n\tSO_SNDLOWAT                      = 0x1000\n\tSO_SNDTIMEO                      = 0x4000\n\tSO_SNDTIMEO_NEW                  = 0x45\n\tSO_SNDTIMEO_OLD                  = 0x4000\n\tSO_TIMESTAMPING                  = 0x23\n\tSO_TIMESTAMPING_NEW              = 0x43\n\tSO_TIMESTAMPING_OLD              = 0x23\n\tSO_TIMESTAMPNS                   = 0x21\n\tSO_TIMESTAMPNS_NEW               = 0x42\n\tSO_TIMESTAMPNS_OLD               = 0x21\n\tSO_TIMESTAMP_NEW                 = 0x46\n\tSO_TXREHASH                      = 0x53\n\tSO_TXTIME                        = 0x3f\n\tSO_TYPE                          = 0x1008\n\tSO_WIFI_STATUS                   = 0x25\n\tSO_ZEROCOPY                      = 0x3e\n\tTAB1                             = 0x800\n\tTAB2                             = 0x1000\n\tTAB3                             = 0x1800\n\tTABDLY                           = 0x1800\n\tTCFLSH                           = 0x20005407\n\tTCGETA                           = 0x40125401\n\tTCGETS                           = 0x40245408\n\tTCGETS2                          = 0x402c540c\n\tTCSAFLUSH                        = 0x2\n\tTCSBRK                           = 0x20005405\n\tTCSBRKP                          = 0x5425\n\tTCSETA                           = 0x80125402\n\tTCSETAF                          = 0x80125404\n\tTCSETAW                          = 0x80125403\n\tTCSETS                           = 0x80245409\n\tTCSETS2                          = 0x802c540d\n\tTCSETSF                          = 0x8024540b\n\tTCSETSF2                         = 0x802c540f\n\tTCSETSW                          = 0x8024540a\n\tTCSETSW2                         = 0x802c540e\n\tTCXONC                           = 0x20005406\n\tTFD_CLOEXEC                      = 0x400000\n\tTFD_NONBLOCK                     = 0x4000\n\tTIOCCBRK                         = 0x2000747a\n\tTIOCCONS                         = 0x20007424\n\tTIOCEXCL                         = 0x2000740d\n\tTIOCGDEV                         = 0x40045432\n\tTIOCGETD                         = 0x40047400\n\tTIOCGEXCL                        = 0x40045440\n\tTIOCGICOUNT                      = 0x545d\n\tTIOCGISO7816                     = 0x40285443\n\tTIOCGLCKTRMIOS                   = 0x5456\n\tTIOCGPGRP                        = 0x40047483\n\tTIOCGPKT                         = 0x40045438\n\tTIOCGPTLCK                       = 0x40045439\n\tTIOCGPTN                         = 0x40047486\n\tTIOCGPTPEER                      = 0x20007489\n\tTIOCGRS485                       = 0x40205441\n\tTIOCGSERIAL                      = 0x541e\n\tTIOCGSID                         = 0x40047485\n\tTIOCGSOFTCAR                     = 0x40047464\n\tTIOCGWINSZ                       = 0x40087468\n\tTIOCINQ                          = 0x4004667f\n\tTIOCLINUX                        = 0x541c\n\tTIOCMBIC                         = 0x8004746b\n\tTIOCMBIS                         = 0x8004746c\n\tTIOCMGET                         = 0x4004746a\n\tTIOCMIWAIT                       = 0x545c\n\tTIOCMSET                         = 0x8004746d\n\tTIOCM_CAR                        = 0x40\n\tTIOCM_CD                         = 0x40\n\tTIOCM_CTS                        = 0x20\n\tTIOCM_DSR                        = 0x100\n\tTIOCM_RI                         = 0x80\n\tTIOCM_RNG                        = 0x80\n\tTIOCM_SR                         = 0x10\n\tTIOCM_ST                         = 0x8\n\tTIOCNOTTY                        = 0x20007471\n\tTIOCNXCL                         = 0x2000740e\n\tTIOCOUTQ                         = 0x40047473\n\tTIOCPKT                          = 0x80047470\n\tTIOCSBRK                         = 0x2000747b\n\tTIOCSCTTY                        = 0x20007484\n\tTIOCSERCONFIG                    = 0x5453\n\tTIOCSERGETLSR                    = 0x5459\n\tTIOCSERGETMULTI                  = 0x545a\n\tTIOCSERGSTRUCT                   = 0x5458\n\tTIOCSERGWILD                     = 0x5454\n\tTIOCSERSETMULTI                  = 0x545b\n\tTIOCSERSWILD                     = 0x5455\n\tTIOCSETD                         = 0x80047401\n\tTIOCSIG                          = 0x80047488\n\tTIOCSISO7816                     = 0xc0285444\n\tTIOCSLCKTRMIOS                   = 0x5457\n\tTIOCSPGRP                        = 0x80047482\n\tTIOCSPTLCK                       = 0x80047487\n\tTIOCSRS485                       = 0xc0205442\n\tTIOCSSERIAL                      = 0x541f\n\tTIOCSSOFTCAR                     = 0x80047465\n\tTIOCSTART                        = 0x2000746e\n\tTIOCSTI                          = 0x80017472\n\tTIOCSTOP                         = 0x2000746f\n\tTIOCSWINSZ                       = 0x80087467\n\tTIOCVHANGUP                      = 0x20005437\n\tTOSTOP                           = 0x100\n\tTUNATTACHFILTER                  = 0x801054d5\n\tTUNDETACHFILTER                  = 0x801054d6\n\tTUNGETDEVNETNS                   = 0x200054e3\n\tTUNGETFEATURES                   = 0x400454cf\n\tTUNGETFILTER                     = 0x401054db\n\tTUNGETIFF                        = 0x400454d2\n\tTUNGETSNDBUF                     = 0x400454d3\n\tTUNGETVNETBE                     = 0x400454df\n\tTUNGETVNETHDRSZ                  = 0x400454d7\n\tTUNGETVNETLE                     = 0x400454dd\n\tTUNSETCARRIER                    = 0x800454e2\n\tTUNSETDEBUG                      = 0x800454c9\n\tTUNSETFILTEREBPF                 = 0x400454e1\n\tTUNSETGROUP                      = 0x800454ce\n\tTUNSETIFF                        = 0x800454ca\n\tTUNSETIFINDEX                    = 0x800454da\n\tTUNSETLINK                       = 0x800454cd\n\tTUNSETNOCSUM                     = 0x800454c8\n\tTUNSETOFFLOAD                    = 0x800454d0\n\tTUNSETOWNER                      = 0x800454cc\n\tTUNSETPERSIST                    = 0x800454cb\n\tTUNSETQUEUE                      = 0x800454d9\n\tTUNSETSNDBUF                     = 0x800454d4\n\tTUNSETSTEERINGEBPF               = 0x400454e0\n\tTUNSETTXFILTER                   = 0x800454d1\n\tTUNSETVNETBE                     = 0x800454de\n\tTUNSETVNETHDRSZ                  = 0x800454d8\n\tTUNSETVNETLE                     = 0x800454dc\n\tUBI_IOCATT                       = 0x80186f40\n\tUBI_IOCDET                       = 0x80046f41\n\tUBI_IOCEBCH                      = 0x80044f02\n\tUBI_IOCEBER                      = 0x80044f01\n\tUBI_IOCEBISMAP                   = 0x40044f05\n\tUBI_IOCEBMAP                     = 0x80084f03\n\tUBI_IOCEBUNMAP                   = 0x80044f04\n\tUBI_IOCMKVOL                     = 0x80986f00\n\tUBI_IOCRMVOL                     = 0x80046f01\n\tUBI_IOCRNVOL                     = 0x91106f03\n\tUBI_IOCRPEB                      = 0x80046f04\n\tUBI_IOCRSVOL                     = 0x800c6f02\n\tUBI_IOCSETVOLPROP                = 0x80104f06\n\tUBI_IOCSPEB                      = 0x80046f05\n\tUBI_IOCVOLCRBLK                  = 0x80804f07\n\tUBI_IOCVOLRMBLK                  = 0x20004f08\n\tUBI_IOCVOLUP                     = 0x80084f00\n\tVDISCARD                         = 0xd\n\tVEOF                             = 0x4\n\tVEOL                             = 0xb\n\tVEOL2                            = 0x10\n\tVMIN                             = 0x6\n\tVREPRINT                         = 0xc\n\tVSTART                           = 0x8\n\tVSTOP                            = 0x9\n\tVSUSP                            = 0xa\n\tVSWTC                            = 0x7\n\tVT1                              = 0x4000\n\tVTDLY                            = 0x4000\n\tVTIME                            = 0x5\n\tVWERASE                          = 0xe\n\tWDIOC_GETBOOTSTATUS              = 0x40045702\n\tWDIOC_GETPRETIMEOUT              = 0x40045709\n\tWDIOC_GETSTATUS                  = 0x40045701\n\tWDIOC_GETSUPPORT                 = 0x40285700\n\tWDIOC_GETTEMP                    = 0x40045703\n\tWDIOC_GETTIMELEFT                = 0x4004570a\n\tWDIOC_GETTIMEOUT                 = 0x40045707\n\tWDIOC_KEEPALIVE                  = 0x40045705\n\tWDIOC_SETOPTIONS                 = 0x40045704\n\tWORDSIZE                         = 0x40\n\tXCASE                            = 0x4\n\tXTABS                            = 0x1800\n\t_HIDIOCGRAWNAME                  = 0x40804804\n\t_HIDIOCGRAWPHYS                  = 0x40404805\n\t_HIDIOCGRAWUNIQ                  = 0x40404808\n\t__TIOCFLUSH                      = 0x80047410\n)\n\n// Errors\nconst (\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEADV            = syscall.Errno(0x53)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEALREADY        = syscall.Errno(0x25)\n\tEBADE           = syscall.Errno(0x66)\n\tEBADFD          = syscall.Errno(0x5d)\n\tEBADMSG         = syscall.Errno(0x4c)\n\tEBADR           = syscall.Errno(0x67)\n\tEBADRQC         = syscall.Errno(0x6a)\n\tEBADSLT         = syscall.Errno(0x6b)\n\tEBFONT          = syscall.Errno(0x6d)\n\tECANCELED       = syscall.Errno(0x7f)\n\tECHRNG          = syscall.Errno(0x5e)\n\tECOMM           = syscall.Errno(0x55)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0x4e)\n\tEDEADLOCK       = syscall.Errno(0x6c)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOTDOT         = syscall.Errno(0x58)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEHWPOISON       = syscall.Errno(0x87)\n\tEIDRM           = syscall.Errno(0x4d)\n\tEILSEQ          = syscall.Errno(0x7a)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISNAM          = syscall.Errno(0x78)\n\tEKEYEXPIRED     = syscall.Errno(0x81)\n\tEKEYREJECTED    = syscall.Errno(0x83)\n\tEKEYREVOKED     = syscall.Errno(0x82)\n\tEL2HLT          = syscall.Errno(0x65)\n\tEL2NSYNC        = syscall.Errno(0x5f)\n\tEL3HLT          = syscall.Errno(0x60)\n\tEL3RST          = syscall.Errno(0x61)\n\tELIBACC         = syscall.Errno(0x72)\n\tELIBBAD         = syscall.Errno(0x70)\n\tELIBEXEC        = syscall.Errno(0x6e)\n\tELIBMAX         = syscall.Errno(0x7b)\n\tELIBSCN         = syscall.Errno(0x7c)\n\tELNRNG          = syscall.Errno(0x62)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x7e)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x57)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENAVAIL         = syscall.Errno(0x77)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENOANO          = syscall.Errno(0x69)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENOCSI          = syscall.Errno(0x64)\n\tENODATA         = syscall.Errno(0x6f)\n\tENOKEY          = syscall.Errno(0x80)\n\tENOLCK          = syscall.Errno(0x4f)\n\tENOLINK         = syscall.Errno(0x52)\n\tENOMEDIUM       = syscall.Errno(0x7d)\n\tENOMSG          = syscall.Errno(0x4b)\n\tENONET          = syscall.Errno(0x50)\n\tENOPKG          = syscall.Errno(0x71)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSR           = syscall.Errno(0x4a)\n\tENOSTR          = syscall.Errno(0x48)\n\tENOSYS          = syscall.Errno(0x5a)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTNAM         = syscall.Errno(0x76)\n\tENOTRECOVERABLE = syscall.Errno(0x85)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x2d)\n\tENOTUNIQ        = syscall.Errno(0x73)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x5c)\n\tEOWNERDEAD      = syscall.Errno(0x84)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROTO          = syscall.Errno(0x56)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tEREMCHG         = syscall.Errno(0x59)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEREMOTEIO       = syscall.Errno(0x79)\n\tERESTART        = syscall.Errno(0x74)\n\tERFKILL         = syscall.Errno(0x86)\n\tERREMOTE        = syscall.Errno(0x51)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESRMNT          = syscall.Errno(0x54)\n\tESTALE          = syscall.Errno(0x46)\n\tESTRPIPE        = syscall.Errno(0x5b)\n\tETIME           = syscall.Errno(0x49)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tEUCLEAN         = syscall.Errno(0x75)\n\tEUNATCH         = syscall.Errno(0x63)\n\tEUSERS          = syscall.Errno(0x44)\n\tEXFULL          = syscall.Errno(0x68)\n)\n\n// Signals\nconst (\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCLD    = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGLOST   = syscall.Signal(0x1d)\n\tSIGPOLL   = syscall.Signal(0x17)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x1d)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device or resource busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"invalid cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"numerical result out of range\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"ENOTSUP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{57, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{58, \"ESHUTDOWN\", \"cannot send after transport endpoint shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{60, \"ETIMEDOUT\", \"connection timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale file handle\"},\n\t{71, \"EREMOTE\", \"object is remote\"},\n\t{72, \"ENOSTR\", \"device not a stream\"},\n\t{73, \"ETIME\", \"timer expired\"},\n\t{74, \"ENOSR\", \"out of streams resources\"},\n\t{75, \"ENOMSG\", \"no message of desired type\"},\n\t{76, \"EBADMSG\", \"bad message\"},\n\t{77, \"EIDRM\", \"identifier removed\"},\n\t{78, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{79, \"ENOLCK\", \"no locks available\"},\n\t{80, \"ENONET\", \"machine is not on the network\"},\n\t{81, \"ERREMOTE\", \"unknown error 81\"},\n\t{82, \"ENOLINK\", \"link has been severed\"},\n\t{83, \"EADV\", \"advertise error\"},\n\t{84, \"ESRMNT\", \"srmount error\"},\n\t{85, \"ECOMM\", \"communication error on send\"},\n\t{86, \"EPROTO\", \"protocol error\"},\n\t{87, \"EMULTIHOP\", \"multihop attempted\"},\n\t{88, \"EDOTDOT\", \"RFS specific error\"},\n\t{89, \"EREMCHG\", \"remote address changed\"},\n\t{90, \"ENOSYS\", \"function not implemented\"},\n\t{91, \"ESTRPIPE\", \"streams pipe error\"},\n\t{92, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{93, \"EBADFD\", \"file descriptor in bad state\"},\n\t{94, \"ECHRNG\", \"channel number out of range\"},\n\t{95, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{96, \"EL3HLT\", \"level 3 halted\"},\n\t{97, \"EL3RST\", \"level 3 reset\"},\n\t{98, \"ELNRNG\", \"link number out of range\"},\n\t{99, \"EUNATCH\", \"protocol driver not attached\"},\n\t{100, \"ENOCSI\", \"no CSI structure available\"},\n\t{101, \"EL2HLT\", \"level 2 halted\"},\n\t{102, \"EBADE\", \"invalid exchange\"},\n\t{103, \"EBADR\", \"invalid request descriptor\"},\n\t{104, \"EXFULL\", \"exchange full\"},\n\t{105, \"ENOANO\", \"no anode\"},\n\t{106, \"EBADRQC\", \"invalid request code\"},\n\t{107, \"EBADSLT\", \"invalid slot\"},\n\t{108, \"EDEADLOCK\", \"file locking deadlock error\"},\n\t{109, \"EBFONT\", \"bad font file format\"},\n\t{110, \"ELIBEXEC\", \"cannot exec a shared library directly\"},\n\t{111, \"ENODATA\", \"no data available\"},\n\t{112, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{113, \"ENOPKG\", \"package not installed\"},\n\t{114, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{115, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{116, \"ERESTART\", \"interrupted system call should be restarted\"},\n\t{117, \"EUCLEAN\", \"structure needs cleaning\"},\n\t{118, \"ENOTNAM\", \"not a XENIX named type file\"},\n\t{119, \"ENAVAIL\", \"no XENIX semaphores available\"},\n\t{120, \"EISNAM\", \"is a named type file\"},\n\t{121, \"EREMOTEIO\", \"remote I/O error\"},\n\t{122, \"EILSEQ\", \"invalid or incomplete multibyte or wide character\"},\n\t{123, \"ELIBMAX\", \"attempting to link in too many shared libraries\"},\n\t{124, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{125, \"ENOMEDIUM\", \"no medium found\"},\n\t{126, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{127, \"ECANCELED\", \"operation canceled\"},\n\t{128, \"ENOKEY\", \"required key not available\"},\n\t{129, \"EKEYEXPIRED\", \"key has expired\"},\n\t{130, \"EKEYREVOKED\", \"key has been revoked\"},\n\t{131, \"EKEYREJECTED\", \"key was rejected by service\"},\n\t{132, \"EOWNERDEAD\", \"owner died\"},\n\t{133, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{134, \"ERFKILL\", \"operation not possible due to RF-kill\"},\n\t{135, \"EHWPOISON\", \"memory page has hardware error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{6, \"SIGABRT\", \"aborted\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGLOST\", \"power failure\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go",
    "content": "// mkerrors.sh -m32\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && netbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m32 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_ARP                            = 0x1c\n\tAF_BLUETOOTH                      = 0x1f\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_HYLINK                         = 0xf\n\tAF_IEEE80211                      = 0x20\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x23\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OROUTE                         = 0x11\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x22\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tARPHRD_ARCNET                     = 0x7\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tARPHRD_STRIP                      = 0x17\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB460800                           = 0x70800\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB921600                           = 0xe1000\n\tB9600                             = 0x2580\n\tBIOCFEEDBACK                      = 0x8004427d\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc0084277\n\tBIOCGETIF                         = 0x4090426b\n\tBIOCGFEEDBACK                     = 0x4004427c\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRTIMEOUT                     = 0x400c427b\n\tBIOCGSEESENT                      = 0x40044278\n\tBIOCGSTATS                        = 0x4080426f\n\tBIOCGSTATSOLD                     = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDLT                          = 0x80044276\n\tBIOCSETF                          = 0x80084267\n\tBIOCSETIF                         = 0x8090426c\n\tBIOCSFEEDBACK                     = 0x8004427d\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRTIMEOUT                     = 0x800c427a\n\tBIOCSSEESENT                      = 0x80044279\n\tBIOCSTCPF                         = 0x80084272\n\tBIOCSUDPF                         = 0x80084273\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALIGNMENT32                   = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DFLTBUFSIZE                   = 0x100000\n\tBPF_DIV                           = 0x30\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x1000000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLONE_CSIGNAL                     = 0xff\n\tCLONE_FILES                       = 0x400\n\tCLONE_FS                          = 0x200\n\tCLONE_PID                         = 0x1000\n\tCLONE_PTRACE                      = 0x2000\n\tCLONE_SIGHAND                     = 0x800\n\tCLONE_VFORK                       = 0x4000\n\tCLONE_VM                          = 0x100\n\tCPUSTATES                         = 0x5\n\tCP_IDLE                           = 0x4\n\tCP_INTR                           = 0x3\n\tCP_NICE                           = 0x1\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0x14\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tCTL_QUERY                         = -0x2\n\tDIOCBSFLUSH                       = 0x20006478\n\tDLT_A429                          = 0xb8\n\tDLT_A653_ICM                      = 0xb9\n\tDLT_AIRONET_HEADER                = 0x78\n\tDLT_AOS                           = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394        = 0x8a\n\tDLT_ARCNET                        = 0x7\n\tDLT_ARCNET_LINUX                  = 0x81\n\tDLT_ATM_CLIP                      = 0x13\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AURORA                        = 0x7e\n\tDLT_AX25                          = 0x3\n\tDLT_AX25_KISS                     = 0xca\n\tDLT_BACNET_MS_TP                  = 0xa5\n\tDLT_BLUETOOTH_HCI_H4              = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9\n\tDLT_CAN20B                        = 0xbe\n\tDLT_CAN_SOCKETCAN                 = 0xe3\n\tDLT_CHAOS                         = 0x5\n\tDLT_CISCO_IOS                     = 0x76\n\tDLT_C_HDLC                        = 0x68\n\tDLT_C_HDLC_WITH_DIR               = 0xcd\n\tDLT_DECT                          = 0xdd\n\tDLT_DOCSIS                        = 0x8f\n\tDLT_ECONET                        = 0x73\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0x6d\n\tDLT_ERF                           = 0xc5\n\tDLT_ERF_ETH                       = 0xaf\n\tDLT_ERF_POS                       = 0xb0\n\tDLT_FC_2                          = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS        = 0xe1\n\tDLT_FDDI                          = 0xa\n\tDLT_FLEXRAY                       = 0xd2\n\tDLT_FRELAY                        = 0x6b\n\tDLT_FRELAY_WITH_DIR               = 0xce\n\tDLT_GCOM_SERIAL                   = 0xad\n\tDLT_GCOM_T1E1                     = 0xac\n\tDLT_GPF_F                         = 0xab\n\tDLT_GPF_T                         = 0xaa\n\tDLT_GPRS_LLC                      = 0xa9\n\tDLT_GSMTAP_ABIS                   = 0xda\n\tDLT_GSMTAP_UM                     = 0xd9\n\tDLT_HDLC                          = 0x10\n\tDLT_HHDLC                         = 0x79\n\tDLT_HIPPI                         = 0xf\n\tDLT_IBM_SN                        = 0x92\n\tDLT_IBM_SP                        = 0x91\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS          = 0xa3\n\tDLT_IEEE802_15_4                  = 0xc3\n\tDLT_IEEE802_15_4_LINUX            = 0xbf\n\tDLT_IEEE802_15_4_NONASK_PHY       = 0xd7\n\tDLT_IEEE802_16_MAC_CPS            = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1\n\tDLT_IPMB                          = 0xc7\n\tDLT_IPMB_LINUX                    = 0xd1\n\tDLT_IPNET                         = 0xe2\n\tDLT_IPV4                          = 0xe4\n\tDLT_IPV6                          = 0xe5\n\tDLT_IP_OVER_FC                    = 0x7a\n\tDLT_JUNIPER_ATM1                  = 0x89\n\tDLT_JUNIPER_ATM2                  = 0x87\n\tDLT_JUNIPER_CHDLC                 = 0xb5\n\tDLT_JUNIPER_ES                    = 0x84\n\tDLT_JUNIPER_ETHER                 = 0xb2\n\tDLT_JUNIPER_FRELAY                = 0xb4\n\tDLT_JUNIPER_GGSN                  = 0x85\n\tDLT_JUNIPER_ISM                   = 0xc2\n\tDLT_JUNIPER_MFR                   = 0x86\n\tDLT_JUNIPER_MLFR                  = 0x83\n\tDLT_JUNIPER_MLPPP                 = 0x82\n\tDLT_JUNIPER_MONITOR               = 0xa4\n\tDLT_JUNIPER_PIC_PEER              = 0xae\n\tDLT_JUNIPER_PPP                   = 0xb3\n\tDLT_JUNIPER_PPPOE                 = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM             = 0xa8\n\tDLT_JUNIPER_SERVICES              = 0x88\n\tDLT_JUNIPER_ST                    = 0xc8\n\tDLT_JUNIPER_VP                    = 0xb7\n\tDLT_LAPB_WITH_DIR                 = 0xcf\n\tDLT_LAPD                          = 0xcb\n\tDLT_LIN                           = 0xd4\n\tDLT_LINUX_EVDEV                   = 0xd8\n\tDLT_LINUX_IRDA                    = 0x90\n\tDLT_LINUX_LAPD                    = 0xb1\n\tDLT_LINUX_SLL                     = 0x71\n\tDLT_LOOP                          = 0x6c\n\tDLT_LTALK                         = 0x72\n\tDLT_MFR                           = 0xb6\n\tDLT_MOST                          = 0xd3\n\tDLT_MPLS                          = 0xdb\n\tDLT_MTP2                          = 0x8c\n\tDLT_MTP2_WITH_PHDR                = 0x8b\n\tDLT_MTP3                          = 0x8d\n\tDLT_NULL                          = 0x0\n\tDLT_PCI_EXP                       = 0x7d\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPI                           = 0xc0\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0xe\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_PPPD                      = 0xa6\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PPP_WITH_DIR                  = 0xcc\n\tDLT_PRISM_HEADER                  = 0x77\n\tDLT_PRONET                        = 0x4\n\tDLT_RAIF1                         = 0xc6\n\tDLT_RAW                           = 0xc\n\tDLT_RAWAF_MASK                    = 0x2240000\n\tDLT_RIO                           = 0x7c\n\tDLT_SCCP                          = 0x8e\n\tDLT_SITA                          = 0xc4\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xd\n\tDLT_SUNATM                        = 0x7b\n\tDLT_SYMANTEC_FIREWALL             = 0x63\n\tDLT_TZSP                          = 0x80\n\tDLT_USB                           = 0xba\n\tDLT_USB_LINUX                     = 0xbd\n\tDLT_USB_LINUX_MMAPPED             = 0xdc\n\tDLT_WIHART                        = 0xdf\n\tDLT_X2E_SERIAL                    = 0xd5\n\tDLT_X2E_XORAYA                    = 0xd6\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tDT_WHT                            = 0xe\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMUL_LINUX                        = 0x1\n\tEMUL_LINUX32                      = 0x5\n\tEMUL_MAXID                        = 0x6\n\tEN_SW_CTL_INF                     = 0x1000\n\tEN_SW_CTL_PREC                    = 0x300\n\tEN_SW_CTL_ROUND                   = 0xc00\n\tEN_SW_DATACHAIN                   = 0x80\n\tEN_SW_DENORM                      = 0x2\n\tEN_SW_INVOP                       = 0x1\n\tEN_SW_OVERFLOW                    = 0x8\n\tEN_SW_PRECLOSS                    = 0x20\n\tEN_SW_UNDERFLOW                   = 0x10\n\tEN_SW_ZERODIV                     = 0x4\n\tETHERCAP_JUMBO_MTU                = 0x4\n\tETHERCAP_VLAN_HWTAGGING           = 0x2\n\tETHERCAP_VLAN_MTU                 = 0x1\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERMTU_JUMBO                    = 0x2328\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PAE                     = 0x888e\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOWPROTOCOLS           = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MAX_LEN_JUMBO               = 0x233a\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_PPPOE_ENCAP_LEN             = 0x8\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = 0x2\n\tEVFILT_PROC                       = 0x4\n\tEVFILT_READ                       = 0x0\n\tEVFILT_SIGNAL                     = 0x5\n\tEVFILT_SYSCOUNT                   = 0x7\n\tEVFILT_TIMER                      = 0x6\n\tEVFILT_VNODE                      = 0x3\n\tEVFILT_WRITE                      = 0x1\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_SYSFLAGS                       = 0xf000\n\tEXTA                              = 0x4b00\n\tEXTATTR_CMD_START                 = 0x1\n\tEXTATTR_CMD_STOP                  = 0x2\n\tEXTATTR_NAMESPACE_SYSTEM          = 0x2\n\tEXTATTR_NAMESPACE_USER            = 0x1\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x100\n\tFLUSHO                            = 0x800000\n\tF_CLOSEM                          = 0xa\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xc\n\tF_FSCTL                           = -0x80000000\n\tF_FSDIRMASK                       = 0x70000000\n\tF_FSIN                            = 0x10000000\n\tF_FSINOUT                         = 0x30000000\n\tF_FSOUT                           = 0x20000000\n\tF_FSPRIV                          = 0x8000\n\tF_FSVOID                          = 0x40000000\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETNOSIGPIPE                    = 0xd\n\tF_GETOWN                          = 0x5\n\tF_MAXFD                           = 0xb\n\tF_OK                              = 0x0\n\tF_PARAM_MASK                      = 0xfff\n\tF_PARAM_MAX                       = 0xfff\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETNOSIGPIPE                    = 0xe\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFA_ROUTE                         = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8f52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_NOTRAILERS                    = 0x20\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf8\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf2\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf1\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_STF                           = 0xd7\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_IPV6_ICMP                 = 0x3a\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x34\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_VRRP                      = 0x70\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPSEC_POLICY                 = 0x1c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_EF                             = 0x8000\n\tIP_ERRORMTU                       = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPSEC_POLICY                   = 0x16\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0x14\n\tIP_MF                             = 0x2000\n\tIP_MINFRAGSIZE                    = 0x45\n\tIP_MINTTL                         = 0x18\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVIF                         = 0x14\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVTTL                        = 0x17\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ALIGNMENT_16MB                = 0x18000000\n\tMAP_ALIGNMENT_1TB                 = 0x28000000\n\tMAP_ALIGNMENT_256TB               = 0x30000000\n\tMAP_ALIGNMENT_4GB                 = 0x20000000\n\tMAP_ALIGNMENT_64KB                = 0x10000000\n\tMAP_ALIGNMENT_64PB                = 0x38000000\n\tMAP_ALIGNMENT_MASK                = -0x1000000\n\tMAP_ALIGNMENT_SHIFT               = 0x18\n\tMAP_ANON                          = 0x1000\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_HASSEMAPHORE                  = 0x200\n\tMAP_INHERIT                       = 0x80\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_DEFAULT               = 0x1\n\tMAP_INHERIT_DONATE_COPY           = 0x3\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_NORESERVE                     = 0x40\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x20\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x2000\n\tMAP_TRYFIXED                      = 0x400\n\tMAP_WIRED                         = 0x800\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_BASIC_FLAGS                   = 0xe782807f\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DISCARD                       = 0x800000\n\tMNT_EXKERB                        = 0x800\n\tMNT_EXNORESPORT                   = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXPUBLIC                      = 0x10000000\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_EXTATTR                       = 0x1000000\n\tMNT_FORCE                         = 0x80000\n\tMNT_GETARGS                       = 0x400000\n\tMNT_IGNORE                        = 0x100000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_LOG                           = 0x2000000\n\tMNT_NOATIME                       = 0x4000000\n\tMNT_NOCOREDUMP                    = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NODEVMTIME                    = 0x40000000\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_OP_FLAGS                      = 0x4d0000\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELATIME                      = 0x20000\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x80000000\n\tMNT_SYMPERM                       = 0x20000000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UNION                         = 0x20\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0xff90ffff\n\tMNT_WAIT                          = 0x1\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CONTROLMBUF                   = 0x2000000\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_IOVUSRSPACE                   = 0x4000000\n\tMSG_LENUSRSPACE                   = 0x8000000\n\tMSG_MCAST                         = 0x200\n\tMSG_NAMEMBUF                      = 0x1000000\n\tMSG_NBIO                          = 0x1000\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_USERFLAGS                     = 0xffffff\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x2\n\tMS_SYNC                           = 0x4\n\tNAME_MAX                          = 0x1ff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x5\n\tNET_RT_MAXID                      = 0x6\n\tNET_RT_OIFLIST                    = 0x4\n\tNET_RT_OOIFLIST                   = 0x3\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOFIOGETBMAP                       = 0xc004667a\n\tONLCR                             = 0x2\n\tONLRET                            = 0x40\n\tONOCR                             = 0x20\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tO_ACCMODE                         = 0x3\n\tO_ALT_IO                          = 0x40000\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x400000\n\tO_CREAT                           = 0x200\n\tO_DIRECT                          = 0x80000\n\tO_DIRECTORY                       = 0x200000\n\tO_DSYNC                           = 0x10000\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_NOSIGPIPE                       = 0x1000000\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x20000\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPRI_IOFLUSH                       = 0x7c\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_AS                         = 0xa\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BRD                          = 0x7\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_MAX                          = 0x9\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_TAG                          = 0x8\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BRD                           = 0x80\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_NETMASK                       = 0x4\n\tRTA_TAG                           = 0x100\n\tRTF_ANNOUNCE                      = 0x20000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_CLONED                        = 0x2000\n\tRTF_CLONING                       = 0x100\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_MASK                          = 0x80\n\tRTF_MODIFIED                      = 0x20\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_REJECT                        = 0x8\n\tRTF_SRC                           = 0x10000\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_XRESOLVE                      = 0x200\n\tRTM_ADD                           = 0x1\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDR                       = 0x15\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_GET                           = 0x4\n\tRTM_IEEE80211                     = 0x11\n\tRTM_IFANNOUNCE                    = 0x10\n\tRTM_IFINFO                        = 0x14\n\tRTM_LLINFO_UPD                    = 0x13\n\tRTM_LOCK                          = 0x8\n\tRTM_LOSING                        = 0x5\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_OIFINFO                       = 0xf\n\tRTM_OLDADD                        = 0x9\n\tRTM_OLDDEL                        = 0xa\n\tRTM_OOIFINFO                      = 0xe\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_RTTUNIT                       = 0xf4240\n\tRTM_SETGATE                       = 0x12\n\tRTM_VERSION                       = 0x4\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tSCM_CREDS                         = 0x4\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x8\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80906931\n\tSIOCADDRT                         = 0x8030720a\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCALIFADDR                      = 0x8118691c\n\tSIOCATMARK                        = 0x40047307\n\tSIOCDELMULTI                      = 0x80906932\n\tSIOCDELRT                         = 0x8030720b\n\tSIOCDIFADDR                       = 0x80906919\n\tSIOCDIFPHYADDR                    = 0x80906949\n\tSIOCDLIFADDR                      = 0x8118691e\n\tSIOCGDRVSPEC                      = 0xc01c697b\n\tSIOCGETPFSYNC                     = 0xc09069f8\n\tSIOCGETSGCNT                      = 0xc0147534\n\tSIOCGETVIFCNT                     = 0xc0147533\n\tSIOCGHIWAT                        = 0x40047301\n\tSIOCGIFADDR                       = 0xc0906921\n\tSIOCGIFADDRPREF                   = 0xc0946920\n\tSIOCGIFALIAS                      = 0xc040691b\n\tSIOCGIFBRDADDR                    = 0xc0906923\n\tSIOCGIFCAP                        = 0xc0206976\n\tSIOCGIFCONF                       = 0xc0086926\n\tSIOCGIFDATA                       = 0xc0946985\n\tSIOCGIFDLT                        = 0xc0906977\n\tSIOCGIFDSTADDR                    = 0xc0906922\n\tSIOCGIFFLAGS                      = 0xc0906911\n\tSIOCGIFGENERIC                    = 0xc090693a\n\tSIOCGIFMEDIA                      = 0xc0286936\n\tSIOCGIFMETRIC                     = 0xc0906917\n\tSIOCGIFMTU                        = 0xc090697e\n\tSIOCGIFNETMASK                    = 0xc0906925\n\tSIOCGIFPDSTADDR                   = 0xc0906948\n\tSIOCGIFPSRCADDR                   = 0xc0906947\n\tSIOCGLIFADDR                      = 0xc118691d\n\tSIOCGLIFPHYADDR                   = 0xc118694b\n\tSIOCGLINKSTR                      = 0xc01c6987\n\tSIOCGLOWAT                        = 0x40047303\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGVH                           = 0xc0906983\n\tSIOCIFCREATE                      = 0x8090697a\n\tSIOCIFDESTROY                     = 0x80906979\n\tSIOCIFGCLONERS                    = 0xc00c6978\n\tSIOCINITIFADDR                    = 0xc0446984\n\tSIOCSDRVSPEC                      = 0x801c697b\n\tSIOCSETPFSYNC                     = 0x809069f7\n\tSIOCSHIWAT                        = 0x80047300\n\tSIOCSIFADDR                       = 0x8090690c\n\tSIOCSIFADDRPREF                   = 0x8094691f\n\tSIOCSIFBRDADDR                    = 0x80906913\n\tSIOCSIFCAP                        = 0x80206975\n\tSIOCSIFDSTADDR                    = 0x8090690e\n\tSIOCSIFFLAGS                      = 0x80906910\n\tSIOCSIFGENERIC                    = 0x80906939\n\tSIOCSIFMEDIA                      = 0xc0906935\n\tSIOCSIFMETRIC                     = 0x80906918\n\tSIOCSIFMTU                        = 0x8090697f\n\tSIOCSIFNETMASK                    = 0x80906916\n\tSIOCSIFPHYADDR                    = 0x80406946\n\tSIOCSLIFPHYADDR                   = 0x8118694a\n\tSIOCSLINKSTR                      = 0x801c6988\n\tSIOCSLOWAT                        = 0x80047302\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSVH                           = 0xc0906982\n\tSIOCZIFDATA                       = 0xc0946986\n\tSOCK_CLOEXEC                      = 0x10000000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_FLAGS_MASK                   = 0xf0000000\n\tSOCK_NONBLOCK                     = 0x20000000\n\tSOCK_NOSIGPIPE                    = 0x40000000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_ACCEPTFILTER                   = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NOHEADER                       = 0x100a\n\tSO_NOSIGPIPE                      = 0x800\n\tSO_OOBINLINE                      = 0x100\n\tSO_OVERFLOWED                     = 0x1009\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x100c\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x100b\n\tSO_TIMESTAMP                      = 0x2000\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSYSCTL_VERSION                    = 0x1000000\n\tSYSCTL_VERS_0                     = 0x0\n\tSYSCTL_VERS_1                     = 0x1000000\n\tSYSCTL_VERS_MASK                  = 0xff000000\n\tS_ARCH1                           = 0x10000\n\tS_ARCH2                           = 0x20000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IFWHT                           = 0xe000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tS_LOGIN_SET                       = 0x1\n\tTCIFLUSH                          = 0x1\n\tTCIOFLUSH                         = 0x3\n\tTCOFLUSH                          = 0x2\n\tTCP_CONGCTL                       = 0x20\n\tTCP_KEEPCNT                       = 0x6\n\tTCP_KEEPIDLE                      = 0x3\n\tTCP_KEEPINIT                      = 0x7\n\tTCP_KEEPINTVL                     = 0x5\n\tTCP_MAXBURST                      = 0x4\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x10\n\tTCP_MINMSS                        = 0xd8\n\tTCP_MSS                           = 0x218\n\tTCP_NODELAY                       = 0x1\n\tTCSAFLUSH                         = 0x2\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCONS                          = 0x80047462\n\tTIOCDCDTIMESTAMP                  = 0x400c7458\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CDTRCTS                  = 0x10\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGLINED                        = 0x40207442\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGQSIZE                        = 0x40047481\n\tTIOCGRANTPT                       = 0x20007447\n\tTIOCGSID                          = 0x40047463\n\tTIOCGSIZE                         = 0x40087468\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCPTMGET                        = 0x40287446\n\tTIOCPTSNAME                       = 0x40287448\n\tTIOCRCVFRAME                      = 0x80047445\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x2000745f\n\tTIOCSLINED                        = 0x80207443\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSQSIZE                        = 0x80047480\n\tTIOCSSIZE                         = 0x80087467\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x80047465\n\tTIOCSTI                           = 0x80017472\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCXMTFRAME                      = 0x80047444\n\tTOSTOP                            = 0x400000\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALL                              = 0x8\n\tWALLSIG                           = 0x8\n\tWALTSIG                           = 0x4\n\tWCLONE                            = 0x4\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWNOWAIT                           = 0x10000\n\tWNOZOMBIE                         = 0x20000\n\tWOPTSCHECKED                      = 0x40000\n\tWSTOPPED                          = 0x7f\n\tWUNTRACED                         = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x58)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x57)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x55)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x60)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5e)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x59)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5f)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x5a)\n\tENOSTR          = syscall.Errno(0x5b)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x56)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x60)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x5c)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x20)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large or too small\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol option not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"connection timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EILSEQ\", \"illegal byte sequence\"},\n\t{86, \"ENOTSUP\", \"not supported\"},\n\t{87, \"ECANCELED\", \"operation Canceled\"},\n\t{88, \"EBADMSG\", \"bad or Corrupt message\"},\n\t{89, \"ENODATA\", \"no message available\"},\n\t{90, \"ENOSR\", \"no STREAM resources\"},\n\t{91, \"ENOSTR\", \"not a STREAM\"},\n\t{92, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EMULTIHOP\", \"multihop attempted\"},\n\t{95, \"ENOLINK\", \"link has been severed\"},\n\t{96, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPWR\", \"power fail/restart\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && netbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_ARP                            = 0x1c\n\tAF_BLUETOOTH                      = 0x1f\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_HYLINK                         = 0xf\n\tAF_IEEE80211                      = 0x20\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x23\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OROUTE                         = 0x11\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x22\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tARPHRD_ARCNET                     = 0x7\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tARPHRD_STRIP                      = 0x17\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB460800                           = 0x70800\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB921600                           = 0xe1000\n\tB9600                             = 0x2580\n\tBIOCFEEDBACK                      = 0x8004427d\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc0104277\n\tBIOCGETIF                         = 0x4090426b\n\tBIOCGFEEDBACK                     = 0x4004427c\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRTIMEOUT                     = 0x4010427b\n\tBIOCGSEESENT                      = 0x40044278\n\tBIOCGSTATS                        = 0x4080426f\n\tBIOCGSTATSOLD                     = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDLT                          = 0x80044276\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8090426c\n\tBIOCSFEEDBACK                     = 0x8004427d\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRTIMEOUT                     = 0x8010427a\n\tBIOCSSEESENT                      = 0x80044279\n\tBIOCSTCPF                         = 0x80104272\n\tBIOCSUDPF                         = 0x80104273\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x8\n\tBPF_ALIGNMENT32                   = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DFLTBUFSIZE                   = 0x100000\n\tBPF_DIV                           = 0x30\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x1000000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLONE_CSIGNAL                     = 0xff\n\tCLONE_FILES                       = 0x400\n\tCLONE_FS                          = 0x200\n\tCLONE_PID                         = 0x1000\n\tCLONE_PTRACE                      = 0x2000\n\tCLONE_SIGHAND                     = 0x800\n\tCLONE_VFORK                       = 0x4000\n\tCLONE_VM                          = 0x100\n\tCPUSTATES                         = 0x5\n\tCP_IDLE                           = 0x4\n\tCP_INTR                           = 0x3\n\tCP_NICE                           = 0x1\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0x14\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tCTL_QUERY                         = -0x2\n\tDIOCBSFLUSH                       = 0x20006478\n\tDLT_A429                          = 0xb8\n\tDLT_A653_ICM                      = 0xb9\n\tDLT_AIRONET_HEADER                = 0x78\n\tDLT_AOS                           = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394        = 0x8a\n\tDLT_ARCNET                        = 0x7\n\tDLT_ARCNET_LINUX                  = 0x81\n\tDLT_ATM_CLIP                      = 0x13\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AURORA                        = 0x7e\n\tDLT_AX25                          = 0x3\n\tDLT_AX25_KISS                     = 0xca\n\tDLT_BACNET_MS_TP                  = 0xa5\n\tDLT_BLUETOOTH_HCI_H4              = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9\n\tDLT_CAN20B                        = 0xbe\n\tDLT_CAN_SOCKETCAN                 = 0xe3\n\tDLT_CHAOS                         = 0x5\n\tDLT_CISCO_IOS                     = 0x76\n\tDLT_C_HDLC                        = 0x68\n\tDLT_C_HDLC_WITH_DIR               = 0xcd\n\tDLT_DECT                          = 0xdd\n\tDLT_DOCSIS                        = 0x8f\n\tDLT_ECONET                        = 0x73\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0x6d\n\tDLT_ERF                           = 0xc5\n\tDLT_ERF_ETH                       = 0xaf\n\tDLT_ERF_POS                       = 0xb0\n\tDLT_FC_2                          = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS        = 0xe1\n\tDLT_FDDI                          = 0xa\n\tDLT_FLEXRAY                       = 0xd2\n\tDLT_FRELAY                        = 0x6b\n\tDLT_FRELAY_WITH_DIR               = 0xce\n\tDLT_GCOM_SERIAL                   = 0xad\n\tDLT_GCOM_T1E1                     = 0xac\n\tDLT_GPF_F                         = 0xab\n\tDLT_GPF_T                         = 0xaa\n\tDLT_GPRS_LLC                      = 0xa9\n\tDLT_GSMTAP_ABIS                   = 0xda\n\tDLT_GSMTAP_UM                     = 0xd9\n\tDLT_HDLC                          = 0x10\n\tDLT_HHDLC                         = 0x79\n\tDLT_HIPPI                         = 0xf\n\tDLT_IBM_SN                        = 0x92\n\tDLT_IBM_SP                        = 0x91\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS          = 0xa3\n\tDLT_IEEE802_15_4                  = 0xc3\n\tDLT_IEEE802_15_4_LINUX            = 0xbf\n\tDLT_IEEE802_15_4_NONASK_PHY       = 0xd7\n\tDLT_IEEE802_16_MAC_CPS            = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1\n\tDLT_IPMB                          = 0xc7\n\tDLT_IPMB_LINUX                    = 0xd1\n\tDLT_IPNET                         = 0xe2\n\tDLT_IPV4                          = 0xe4\n\tDLT_IPV6                          = 0xe5\n\tDLT_IP_OVER_FC                    = 0x7a\n\tDLT_JUNIPER_ATM1                  = 0x89\n\tDLT_JUNIPER_ATM2                  = 0x87\n\tDLT_JUNIPER_CHDLC                 = 0xb5\n\tDLT_JUNIPER_ES                    = 0x84\n\tDLT_JUNIPER_ETHER                 = 0xb2\n\tDLT_JUNIPER_FRELAY                = 0xb4\n\tDLT_JUNIPER_GGSN                  = 0x85\n\tDLT_JUNIPER_ISM                   = 0xc2\n\tDLT_JUNIPER_MFR                   = 0x86\n\tDLT_JUNIPER_MLFR                  = 0x83\n\tDLT_JUNIPER_MLPPP                 = 0x82\n\tDLT_JUNIPER_MONITOR               = 0xa4\n\tDLT_JUNIPER_PIC_PEER              = 0xae\n\tDLT_JUNIPER_PPP                   = 0xb3\n\tDLT_JUNIPER_PPPOE                 = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM             = 0xa8\n\tDLT_JUNIPER_SERVICES              = 0x88\n\tDLT_JUNIPER_ST                    = 0xc8\n\tDLT_JUNIPER_VP                    = 0xb7\n\tDLT_LAPB_WITH_DIR                 = 0xcf\n\tDLT_LAPD                          = 0xcb\n\tDLT_LIN                           = 0xd4\n\tDLT_LINUX_EVDEV                   = 0xd8\n\tDLT_LINUX_IRDA                    = 0x90\n\tDLT_LINUX_LAPD                    = 0xb1\n\tDLT_LINUX_SLL                     = 0x71\n\tDLT_LOOP                          = 0x6c\n\tDLT_LTALK                         = 0x72\n\tDLT_MFR                           = 0xb6\n\tDLT_MOST                          = 0xd3\n\tDLT_MPLS                          = 0xdb\n\tDLT_MTP2                          = 0x8c\n\tDLT_MTP2_WITH_PHDR                = 0x8b\n\tDLT_MTP3                          = 0x8d\n\tDLT_NULL                          = 0x0\n\tDLT_PCI_EXP                       = 0x7d\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPI                           = 0xc0\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0xe\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_PPPD                      = 0xa6\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PPP_WITH_DIR                  = 0xcc\n\tDLT_PRISM_HEADER                  = 0x77\n\tDLT_PRONET                        = 0x4\n\tDLT_RAIF1                         = 0xc6\n\tDLT_RAW                           = 0xc\n\tDLT_RAWAF_MASK                    = 0x2240000\n\tDLT_RIO                           = 0x7c\n\tDLT_SCCP                          = 0x8e\n\tDLT_SITA                          = 0xc4\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xd\n\tDLT_SUNATM                        = 0x7b\n\tDLT_SYMANTEC_FIREWALL             = 0x63\n\tDLT_TZSP                          = 0x80\n\tDLT_USB                           = 0xba\n\tDLT_USB_LINUX                     = 0xbd\n\tDLT_USB_LINUX_MMAPPED             = 0xdc\n\tDLT_WIHART                        = 0xdf\n\tDLT_X2E_SERIAL                    = 0xd5\n\tDLT_X2E_XORAYA                    = 0xd6\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tDT_WHT                            = 0xe\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMUL_LINUX                        = 0x1\n\tEMUL_LINUX32                      = 0x5\n\tEMUL_MAXID                        = 0x6\n\tETHERCAP_JUMBO_MTU                = 0x4\n\tETHERCAP_VLAN_HWTAGGING           = 0x2\n\tETHERCAP_VLAN_MTU                 = 0x1\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERMTU_JUMBO                    = 0x2328\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PAE                     = 0x888e\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOWPROTOCOLS           = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MAX_LEN_JUMBO               = 0x233a\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_PPPOE_ENCAP_LEN             = 0x8\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = 0x2\n\tEVFILT_PROC                       = 0x4\n\tEVFILT_READ                       = 0x0\n\tEVFILT_SIGNAL                     = 0x5\n\tEVFILT_SYSCOUNT                   = 0x7\n\tEVFILT_TIMER                      = 0x6\n\tEVFILT_VNODE                      = 0x3\n\tEVFILT_WRITE                      = 0x1\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_SYSFLAGS                       = 0xf000\n\tEXTA                              = 0x4b00\n\tEXTATTR_CMD_START                 = 0x1\n\tEXTATTR_CMD_STOP                  = 0x2\n\tEXTATTR_NAMESPACE_SYSTEM          = 0x2\n\tEXTATTR_NAMESPACE_USER            = 0x1\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x100\n\tFLUSHO                            = 0x800000\n\tF_CLOSEM                          = 0xa\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xc\n\tF_FSCTL                           = -0x80000000\n\tF_FSDIRMASK                       = 0x70000000\n\tF_FSIN                            = 0x10000000\n\tF_FSINOUT                         = 0x30000000\n\tF_FSOUT                           = 0x20000000\n\tF_FSPRIV                          = 0x8000\n\tF_FSVOID                          = 0x40000000\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETNOSIGPIPE                    = 0xd\n\tF_GETOWN                          = 0x5\n\tF_MAXFD                           = 0xb\n\tF_OK                              = 0x0\n\tF_PARAM_MASK                      = 0xfff\n\tF_PARAM_MAX                       = 0xfff\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETNOSIGPIPE                    = 0xe\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFA_ROUTE                         = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8f52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_NOTRAILERS                    = 0x20\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf8\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf2\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf1\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_STF                           = 0xd7\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_IPV6_ICMP                 = 0x3a\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x34\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_VRRP                      = 0x70\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPSEC_POLICY                 = 0x1c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_EF                             = 0x8000\n\tIP_ERRORMTU                       = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPSEC_POLICY                   = 0x16\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0x14\n\tIP_MF                             = 0x2000\n\tIP_MINFRAGSIZE                    = 0x45\n\tIP_MINTTL                         = 0x18\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVIF                         = 0x14\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVTTL                        = 0x17\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ALIGNMENT_16MB                = 0x18000000\n\tMAP_ALIGNMENT_1TB                 = 0x28000000\n\tMAP_ALIGNMENT_256TB               = 0x30000000\n\tMAP_ALIGNMENT_4GB                 = 0x20000000\n\tMAP_ALIGNMENT_64KB                = 0x10000000\n\tMAP_ALIGNMENT_64PB                = 0x38000000\n\tMAP_ALIGNMENT_MASK                = -0x1000000\n\tMAP_ALIGNMENT_SHIFT               = 0x18\n\tMAP_ANON                          = 0x1000\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_HASSEMAPHORE                  = 0x200\n\tMAP_INHERIT                       = 0x80\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_DEFAULT               = 0x1\n\tMAP_INHERIT_DONATE_COPY           = 0x3\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_NORESERVE                     = 0x40\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x20\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x2000\n\tMAP_TRYFIXED                      = 0x400\n\tMAP_WIRED                         = 0x800\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_BASIC_FLAGS                   = 0xe782807f\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DISCARD                       = 0x800000\n\tMNT_EXKERB                        = 0x800\n\tMNT_EXNORESPORT                   = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXPUBLIC                      = 0x10000000\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_EXTATTR                       = 0x1000000\n\tMNT_FORCE                         = 0x80000\n\tMNT_GETARGS                       = 0x400000\n\tMNT_IGNORE                        = 0x100000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_LOG                           = 0x2000000\n\tMNT_NOATIME                       = 0x4000000\n\tMNT_NOCOREDUMP                    = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NODEVMTIME                    = 0x40000000\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_OP_FLAGS                      = 0x4d0000\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELATIME                      = 0x20000\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x80000000\n\tMNT_SYMPERM                       = 0x20000000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UNION                         = 0x20\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0xff90ffff\n\tMNT_WAIT                          = 0x1\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CONTROLMBUF                   = 0x2000000\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_IOVUSRSPACE                   = 0x4000000\n\tMSG_LENUSRSPACE                   = 0x8000000\n\tMSG_MCAST                         = 0x200\n\tMSG_NAMEMBUF                      = 0x1000000\n\tMSG_NBIO                          = 0x1000\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_USERFLAGS                     = 0xffffff\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x2\n\tMS_SYNC                           = 0x4\n\tNAME_MAX                          = 0x1ff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x5\n\tNET_RT_MAXID                      = 0x6\n\tNET_RT_OIFLIST                    = 0x4\n\tNET_RT_OOIFLIST                   = 0x3\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOFIOGETBMAP                       = 0xc004667a\n\tONLCR                             = 0x2\n\tONLRET                            = 0x40\n\tONOCR                             = 0x20\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tO_ACCMODE                         = 0x3\n\tO_ALT_IO                          = 0x40000\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x400000\n\tO_CREAT                           = 0x200\n\tO_DIRECT                          = 0x80000\n\tO_DIRECTORY                       = 0x200000\n\tO_DSYNC                           = 0x10000\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_NOSIGPIPE                       = 0x1000000\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x20000\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPRI_IOFLUSH                       = 0x7c\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_AS                         = 0xa\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BRD                          = 0x7\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_MAX                          = 0x9\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_TAG                          = 0x8\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BRD                           = 0x80\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_NETMASK                       = 0x4\n\tRTA_TAG                           = 0x100\n\tRTF_ANNOUNCE                      = 0x20000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_CLONED                        = 0x2000\n\tRTF_CLONING                       = 0x100\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_MASK                          = 0x80\n\tRTF_MODIFIED                      = 0x20\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_REJECT                        = 0x8\n\tRTF_SRC                           = 0x10000\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_XRESOLVE                      = 0x200\n\tRTM_ADD                           = 0x1\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDR                       = 0x15\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_GET                           = 0x4\n\tRTM_IEEE80211                     = 0x11\n\tRTM_IFANNOUNCE                    = 0x10\n\tRTM_IFINFO                        = 0x14\n\tRTM_LLINFO_UPD                    = 0x13\n\tRTM_LOCK                          = 0x8\n\tRTM_LOSING                        = 0x5\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_OIFINFO                       = 0xf\n\tRTM_OLDADD                        = 0x9\n\tRTM_OLDDEL                        = 0xa\n\tRTM_OOIFINFO                      = 0xe\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_RTTUNIT                       = 0xf4240\n\tRTM_SETGATE                       = 0x12\n\tRTM_VERSION                       = 0x4\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tSCM_CREDS                         = 0x4\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x8\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80906931\n\tSIOCADDRT                         = 0x8038720a\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCALIFADDR                      = 0x8118691c\n\tSIOCATMARK                        = 0x40047307\n\tSIOCDELMULTI                      = 0x80906932\n\tSIOCDELRT                         = 0x8038720b\n\tSIOCDIFADDR                       = 0x80906919\n\tSIOCDIFPHYADDR                    = 0x80906949\n\tSIOCDLIFADDR                      = 0x8118691e\n\tSIOCGDRVSPEC                      = 0xc028697b\n\tSIOCGETPFSYNC                     = 0xc09069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGHIWAT                        = 0x40047301\n\tSIOCGIFADDR                       = 0xc0906921\n\tSIOCGIFADDRPREF                   = 0xc0986920\n\tSIOCGIFALIAS                      = 0xc040691b\n\tSIOCGIFBRDADDR                    = 0xc0906923\n\tSIOCGIFCAP                        = 0xc0206976\n\tSIOCGIFCONF                       = 0xc0106926\n\tSIOCGIFDATA                       = 0xc0986985\n\tSIOCGIFDLT                        = 0xc0906977\n\tSIOCGIFDSTADDR                    = 0xc0906922\n\tSIOCGIFFLAGS                      = 0xc0906911\n\tSIOCGIFGENERIC                    = 0xc090693a\n\tSIOCGIFMEDIA                      = 0xc0306936\n\tSIOCGIFMETRIC                     = 0xc0906917\n\tSIOCGIFMTU                        = 0xc090697e\n\tSIOCGIFNETMASK                    = 0xc0906925\n\tSIOCGIFPDSTADDR                   = 0xc0906948\n\tSIOCGIFPSRCADDR                   = 0xc0906947\n\tSIOCGLIFADDR                      = 0xc118691d\n\tSIOCGLIFPHYADDR                   = 0xc118694b\n\tSIOCGLINKSTR                      = 0xc0286987\n\tSIOCGLOWAT                        = 0x40047303\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGVH                           = 0xc0906983\n\tSIOCIFCREATE                      = 0x8090697a\n\tSIOCIFDESTROY                     = 0x80906979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCINITIFADDR                    = 0xc0706984\n\tSIOCSDRVSPEC                      = 0x8028697b\n\tSIOCSETPFSYNC                     = 0x809069f7\n\tSIOCSHIWAT                        = 0x80047300\n\tSIOCSIFADDR                       = 0x8090690c\n\tSIOCSIFADDRPREF                   = 0x8098691f\n\tSIOCSIFBRDADDR                    = 0x80906913\n\tSIOCSIFCAP                        = 0x80206975\n\tSIOCSIFDSTADDR                    = 0x8090690e\n\tSIOCSIFFLAGS                      = 0x80906910\n\tSIOCSIFGENERIC                    = 0x80906939\n\tSIOCSIFMEDIA                      = 0xc0906935\n\tSIOCSIFMETRIC                     = 0x80906918\n\tSIOCSIFMTU                        = 0x8090697f\n\tSIOCSIFNETMASK                    = 0x80906916\n\tSIOCSIFPHYADDR                    = 0x80406946\n\tSIOCSLIFPHYADDR                   = 0x8118694a\n\tSIOCSLINKSTR                      = 0x80286988\n\tSIOCSLOWAT                        = 0x80047302\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSVH                           = 0xc0906982\n\tSIOCZIFDATA                       = 0xc0986986\n\tSOCK_CLOEXEC                      = 0x10000000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_FLAGS_MASK                   = 0xf0000000\n\tSOCK_NONBLOCK                     = 0x20000000\n\tSOCK_NOSIGPIPE                    = 0x40000000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_ACCEPTFILTER                   = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NOHEADER                       = 0x100a\n\tSO_NOSIGPIPE                      = 0x800\n\tSO_OOBINLINE                      = 0x100\n\tSO_OVERFLOWED                     = 0x1009\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x100c\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x100b\n\tSO_TIMESTAMP                      = 0x2000\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSYSCTL_VERSION                    = 0x1000000\n\tSYSCTL_VERS_0                     = 0x0\n\tSYSCTL_VERS_1                     = 0x1000000\n\tSYSCTL_VERS_MASK                  = 0xff000000\n\tS_ARCH1                           = 0x10000\n\tS_ARCH2                           = 0x20000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IFWHT                           = 0xe000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tS_LOGIN_SET                       = 0x1\n\tTCIFLUSH                          = 0x1\n\tTCIOFLUSH                         = 0x3\n\tTCOFLUSH                          = 0x2\n\tTCP_CONGCTL                       = 0x20\n\tTCP_KEEPCNT                       = 0x6\n\tTCP_KEEPIDLE                      = 0x3\n\tTCP_KEEPINIT                      = 0x7\n\tTCP_KEEPINTVL                     = 0x5\n\tTCP_MAXBURST                      = 0x4\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x10\n\tTCP_MINMSS                        = 0xd8\n\tTCP_MSS                           = 0x218\n\tTCP_NODELAY                       = 0x1\n\tTCSAFLUSH                         = 0x2\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCONS                          = 0x80047462\n\tTIOCDCDTIMESTAMP                  = 0x40107458\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CDTRCTS                  = 0x10\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGLINED                        = 0x40207442\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGQSIZE                        = 0x40047481\n\tTIOCGRANTPT                       = 0x20007447\n\tTIOCGSID                          = 0x40047463\n\tTIOCGSIZE                         = 0x40087468\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCPTMGET                        = 0x40287446\n\tTIOCPTSNAME                       = 0x40287448\n\tTIOCRCVFRAME                      = 0x80087445\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x2000745f\n\tTIOCSLINED                        = 0x80207443\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSQSIZE                        = 0x80047480\n\tTIOCSSIZE                         = 0x80087467\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x80047465\n\tTIOCSTI                           = 0x80017472\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCXMTFRAME                      = 0x80087444\n\tTOSTOP                            = 0x400000\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALL                              = 0x8\n\tWALLSIG                           = 0x8\n\tWALTSIG                           = 0x4\n\tWCLONE                            = 0x4\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWNOWAIT                           = 0x10000\n\tWNOZOMBIE                         = 0x20000\n\tWOPTSCHECKED                      = 0x40000\n\tWSTOPPED                          = 0x7f\n\tWUNTRACED                         = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x58)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x57)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x55)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x60)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5e)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x59)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5f)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x5a)\n\tENOSTR          = syscall.Errno(0x5b)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x56)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x60)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x5c)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x20)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large or too small\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol option not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"connection timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EILSEQ\", \"illegal byte sequence\"},\n\t{86, \"ENOTSUP\", \"not supported\"},\n\t{87, \"ECANCELED\", \"operation Canceled\"},\n\t{88, \"EBADMSG\", \"bad or Corrupt message\"},\n\t{89, \"ENODATA\", \"no message available\"},\n\t{90, \"ENOSR\", \"no STREAM resources\"},\n\t{91, \"ENOSTR\", \"not a STREAM\"},\n\t{92, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EMULTIHOP\", \"multihop attempted\"},\n\t{95, \"ENOLINK\", \"link has been severed\"},\n\t{96, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPWR\", \"power fail/restart\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go",
    "content": "// mkerrors.sh -marm\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && netbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -marm _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_ARP                            = 0x1c\n\tAF_BLUETOOTH                      = 0x1f\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_HYLINK                         = 0xf\n\tAF_IEEE80211                      = 0x20\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x23\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OROUTE                         = 0x11\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x22\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tARPHRD_ARCNET                     = 0x7\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tARPHRD_STRIP                      = 0x17\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB460800                           = 0x70800\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB921600                           = 0xe1000\n\tB9600                             = 0x2580\n\tBIOCFEEDBACK                      = 0x8004427d\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc0084277\n\tBIOCGETIF                         = 0x4090426b\n\tBIOCGFEEDBACK                     = 0x4004427c\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRTIMEOUT                     = 0x400c427b\n\tBIOCGSEESENT                      = 0x40044278\n\tBIOCGSTATS                        = 0x4080426f\n\tBIOCGSTATSOLD                     = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDLT                          = 0x80044276\n\tBIOCSETF                          = 0x80084267\n\tBIOCSETIF                         = 0x8090426c\n\tBIOCSFEEDBACK                     = 0x8004427d\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRTIMEOUT                     = 0x800c427a\n\tBIOCSSEESENT                      = 0x80044279\n\tBIOCSTCPF                         = 0x80084272\n\tBIOCSUDPF                         = 0x80084273\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALIGNMENT32                   = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DFLTBUFSIZE                   = 0x100000\n\tBPF_DIV                           = 0x30\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x1000000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCPUSTATES                         = 0x5\n\tCP_IDLE                           = 0x4\n\tCP_INTR                           = 0x3\n\tCP_NICE                           = 0x1\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0x14\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tCTL_QUERY                         = -0x2\n\tDIOCBSFLUSH                       = 0x20006478\n\tDLT_A429                          = 0xb8\n\tDLT_A653_ICM                      = 0xb9\n\tDLT_AIRONET_HEADER                = 0x78\n\tDLT_AOS                           = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394        = 0x8a\n\tDLT_ARCNET                        = 0x7\n\tDLT_ARCNET_LINUX                  = 0x81\n\tDLT_ATM_CLIP                      = 0x13\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AURORA                        = 0x7e\n\tDLT_AX25                          = 0x3\n\tDLT_AX25_KISS                     = 0xca\n\tDLT_BACNET_MS_TP                  = 0xa5\n\tDLT_BLUETOOTH_HCI_H4              = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9\n\tDLT_CAN20B                        = 0xbe\n\tDLT_CAN_SOCKETCAN                 = 0xe3\n\tDLT_CHAOS                         = 0x5\n\tDLT_CISCO_IOS                     = 0x76\n\tDLT_C_HDLC                        = 0x68\n\tDLT_C_HDLC_WITH_DIR               = 0xcd\n\tDLT_DECT                          = 0xdd\n\tDLT_DOCSIS                        = 0x8f\n\tDLT_ECONET                        = 0x73\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0x6d\n\tDLT_ERF                           = 0xc5\n\tDLT_ERF_ETH                       = 0xaf\n\tDLT_ERF_POS                       = 0xb0\n\tDLT_FC_2                          = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS        = 0xe1\n\tDLT_FDDI                          = 0xa\n\tDLT_FLEXRAY                       = 0xd2\n\tDLT_FRELAY                        = 0x6b\n\tDLT_FRELAY_WITH_DIR               = 0xce\n\tDLT_GCOM_SERIAL                   = 0xad\n\tDLT_GCOM_T1E1                     = 0xac\n\tDLT_GPF_F                         = 0xab\n\tDLT_GPF_T                         = 0xaa\n\tDLT_GPRS_LLC                      = 0xa9\n\tDLT_GSMTAP_ABIS                   = 0xda\n\tDLT_GSMTAP_UM                     = 0xd9\n\tDLT_HDLC                          = 0x10\n\tDLT_HHDLC                         = 0x79\n\tDLT_HIPPI                         = 0xf\n\tDLT_IBM_SN                        = 0x92\n\tDLT_IBM_SP                        = 0x91\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS          = 0xa3\n\tDLT_IEEE802_15_4                  = 0xc3\n\tDLT_IEEE802_15_4_LINUX            = 0xbf\n\tDLT_IEEE802_15_4_NONASK_PHY       = 0xd7\n\tDLT_IEEE802_16_MAC_CPS            = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1\n\tDLT_IPMB                          = 0xc7\n\tDLT_IPMB_LINUX                    = 0xd1\n\tDLT_IPNET                         = 0xe2\n\tDLT_IPV4                          = 0xe4\n\tDLT_IPV6                          = 0xe5\n\tDLT_IP_OVER_FC                    = 0x7a\n\tDLT_JUNIPER_ATM1                  = 0x89\n\tDLT_JUNIPER_ATM2                  = 0x87\n\tDLT_JUNIPER_CHDLC                 = 0xb5\n\tDLT_JUNIPER_ES                    = 0x84\n\tDLT_JUNIPER_ETHER                 = 0xb2\n\tDLT_JUNIPER_FRELAY                = 0xb4\n\tDLT_JUNIPER_GGSN                  = 0x85\n\tDLT_JUNIPER_ISM                   = 0xc2\n\tDLT_JUNIPER_MFR                   = 0x86\n\tDLT_JUNIPER_MLFR                  = 0x83\n\tDLT_JUNIPER_MLPPP                 = 0x82\n\tDLT_JUNIPER_MONITOR               = 0xa4\n\tDLT_JUNIPER_PIC_PEER              = 0xae\n\tDLT_JUNIPER_PPP                   = 0xb3\n\tDLT_JUNIPER_PPPOE                 = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM             = 0xa8\n\tDLT_JUNIPER_SERVICES              = 0x88\n\tDLT_JUNIPER_ST                    = 0xc8\n\tDLT_JUNIPER_VP                    = 0xb7\n\tDLT_LAPB_WITH_DIR                 = 0xcf\n\tDLT_LAPD                          = 0xcb\n\tDLT_LIN                           = 0xd4\n\tDLT_LINUX_EVDEV                   = 0xd8\n\tDLT_LINUX_IRDA                    = 0x90\n\tDLT_LINUX_LAPD                    = 0xb1\n\tDLT_LINUX_SLL                     = 0x71\n\tDLT_LOOP                          = 0x6c\n\tDLT_LTALK                         = 0x72\n\tDLT_MFR                           = 0xb6\n\tDLT_MOST                          = 0xd3\n\tDLT_MPLS                          = 0xdb\n\tDLT_MTP2                          = 0x8c\n\tDLT_MTP2_WITH_PHDR                = 0x8b\n\tDLT_MTP3                          = 0x8d\n\tDLT_NULL                          = 0x0\n\tDLT_PCI_EXP                       = 0x7d\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPI                           = 0xc0\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0xe\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_PPPD                      = 0xa6\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PPP_WITH_DIR                  = 0xcc\n\tDLT_PRISM_HEADER                  = 0x77\n\tDLT_PRONET                        = 0x4\n\tDLT_RAIF1                         = 0xc6\n\tDLT_RAW                           = 0xc\n\tDLT_RAWAF_MASK                    = 0x2240000\n\tDLT_RIO                           = 0x7c\n\tDLT_SCCP                          = 0x8e\n\tDLT_SITA                          = 0xc4\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xd\n\tDLT_SUNATM                        = 0x7b\n\tDLT_SYMANTEC_FIREWALL             = 0x63\n\tDLT_TZSP                          = 0x80\n\tDLT_USB                           = 0xba\n\tDLT_USB_LINUX                     = 0xbd\n\tDLT_USB_LINUX_MMAPPED             = 0xdc\n\tDLT_WIHART                        = 0xdf\n\tDLT_X2E_SERIAL                    = 0xd5\n\tDLT_X2E_XORAYA                    = 0xd6\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tDT_WHT                            = 0xe\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMUL_LINUX                        = 0x1\n\tEMUL_LINUX32                      = 0x5\n\tEMUL_MAXID                        = 0x6\n\tETHERCAP_JUMBO_MTU                = 0x4\n\tETHERCAP_VLAN_HWTAGGING           = 0x2\n\tETHERCAP_VLAN_MTU                 = 0x1\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERMTU_JUMBO                    = 0x2328\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PAE                     = 0x888e\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOWPROTOCOLS           = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MAX_LEN_JUMBO               = 0x233a\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_PPPOE_ENCAP_LEN             = 0x8\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = 0x2\n\tEVFILT_PROC                       = 0x4\n\tEVFILT_READ                       = 0x0\n\tEVFILT_SIGNAL                     = 0x5\n\tEVFILT_SYSCOUNT                   = 0x7\n\tEVFILT_TIMER                      = 0x6\n\tEVFILT_VNODE                      = 0x3\n\tEVFILT_WRITE                      = 0x1\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_SYSFLAGS                       = 0xf000\n\tEXTA                              = 0x4b00\n\tEXTATTR_CMD_START                 = 0x1\n\tEXTATTR_CMD_STOP                  = 0x2\n\tEXTATTR_NAMESPACE_SYSTEM          = 0x2\n\tEXTATTR_NAMESPACE_USER            = 0x1\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x100\n\tFLUSHO                            = 0x800000\n\tF_CLOSEM                          = 0xa\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xc\n\tF_FSCTL                           = -0x80000000\n\tF_FSDIRMASK                       = 0x70000000\n\tF_FSIN                            = 0x10000000\n\tF_FSINOUT                         = 0x30000000\n\tF_FSOUT                           = 0x20000000\n\tF_FSPRIV                          = 0x8000\n\tF_FSVOID                          = 0x40000000\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETNOSIGPIPE                    = 0xd\n\tF_GETOWN                          = 0x5\n\tF_MAXFD                           = 0xb\n\tF_OK                              = 0x0\n\tF_PARAM_MASK                      = 0xfff\n\tF_PARAM_MAX                       = 0xfff\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETNOSIGPIPE                    = 0xe\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFA_ROUTE                         = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8f52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_NOTRAILERS                    = 0x20\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf8\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf2\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf1\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_STF                           = 0xd7\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_IPV6_ICMP                 = 0x3a\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x34\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_VRRP                      = 0x70\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPSEC_POLICY                 = 0x1c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_EF                             = 0x8000\n\tIP_ERRORMTU                       = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPSEC_POLICY                   = 0x16\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0x14\n\tIP_MF                             = 0x2000\n\tIP_MINFRAGSIZE                    = 0x45\n\tIP_MINTTL                         = 0x18\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVIF                         = 0x14\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVTTL                        = 0x17\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ALIGNMENT_16MB                = 0x18000000\n\tMAP_ALIGNMENT_1TB                 = 0x28000000\n\tMAP_ALIGNMENT_256TB               = 0x30000000\n\tMAP_ALIGNMENT_4GB                 = 0x20000000\n\tMAP_ALIGNMENT_64KB                = 0x10000000\n\tMAP_ALIGNMENT_64PB                = 0x38000000\n\tMAP_ALIGNMENT_MASK                = -0x1000000\n\tMAP_ALIGNMENT_SHIFT               = 0x18\n\tMAP_ANON                          = 0x1000\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_HASSEMAPHORE                  = 0x200\n\tMAP_INHERIT                       = 0x80\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_DEFAULT               = 0x1\n\tMAP_INHERIT_DONATE_COPY           = 0x3\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_NORESERVE                     = 0x40\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x20\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x2000\n\tMAP_TRYFIXED                      = 0x400\n\tMAP_WIRED                         = 0x800\n\tMNT_ASYNC                         = 0x40\n\tMNT_BASIC_FLAGS                   = 0xe782807f\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DISCARD                       = 0x800000\n\tMNT_EXKERB                        = 0x800\n\tMNT_EXNORESPORT                   = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXPUBLIC                      = 0x10000000\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_EXTATTR                       = 0x1000000\n\tMNT_FORCE                         = 0x80000\n\tMNT_GETARGS                       = 0x400000\n\tMNT_IGNORE                        = 0x100000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_LOG                           = 0x2000000\n\tMNT_NOATIME                       = 0x4000000\n\tMNT_NOCOREDUMP                    = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NODEVMTIME                    = 0x40000000\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_OP_FLAGS                      = 0x4d0000\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELATIME                      = 0x20000\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x80000000\n\tMNT_SYMPERM                       = 0x20000000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UNION                         = 0x20\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0xff90ffff\n\tMNT_WAIT                          = 0x1\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CONTROLMBUF                   = 0x2000000\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_IOVUSRSPACE                   = 0x4000000\n\tMSG_LENUSRSPACE                   = 0x8000000\n\tMSG_MCAST                         = 0x200\n\tMSG_NAMEMBUF                      = 0x1000000\n\tMSG_NBIO                          = 0x1000\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_USERFLAGS                     = 0xffffff\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x2\n\tMS_SYNC                           = 0x4\n\tNAME_MAX                          = 0x1ff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x5\n\tNET_RT_MAXID                      = 0x6\n\tNET_RT_OIFLIST                    = 0x4\n\tNET_RT_OOIFLIST                   = 0x3\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOFIOGETBMAP                       = 0xc004667a\n\tONLCR                             = 0x2\n\tONLRET                            = 0x40\n\tONOCR                             = 0x20\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tO_ACCMODE                         = 0x3\n\tO_ALT_IO                          = 0x40000\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x400000\n\tO_CREAT                           = 0x200\n\tO_DIRECT                          = 0x80000\n\tO_DIRECTORY                       = 0x200000\n\tO_DSYNC                           = 0x10000\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_NOSIGPIPE                       = 0x1000000\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x20000\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tPRI_IOFLUSH                       = 0x7c\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tRLIMIT_AS                         = 0xa\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BRD                          = 0x7\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_MAX                          = 0x9\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_TAG                          = 0x8\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BRD                           = 0x80\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_NETMASK                       = 0x4\n\tRTA_TAG                           = 0x100\n\tRTF_ANNOUNCE                      = 0x20000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_CLONED                        = 0x2000\n\tRTF_CLONING                       = 0x100\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_MASK                          = 0x80\n\tRTF_MODIFIED                      = 0x20\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_REJECT                        = 0x8\n\tRTF_SRC                           = 0x10000\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_XRESOLVE                      = 0x200\n\tRTM_ADD                           = 0x1\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDR                       = 0x15\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_GET                           = 0x4\n\tRTM_IEEE80211                     = 0x11\n\tRTM_IFANNOUNCE                    = 0x10\n\tRTM_IFINFO                        = 0x14\n\tRTM_LLINFO_UPD                    = 0x13\n\tRTM_LOCK                          = 0x8\n\tRTM_LOSING                        = 0x5\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_OIFINFO                       = 0xf\n\tRTM_OLDADD                        = 0x9\n\tRTM_OLDDEL                        = 0xa\n\tRTM_OOIFINFO                      = 0xe\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_RTTUNIT                       = 0xf4240\n\tRTM_SETGATE                       = 0x12\n\tRTM_VERSION                       = 0x4\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tSCM_CREDS                         = 0x4\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x8\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80906931\n\tSIOCADDRT                         = 0x8030720a\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCALIFADDR                      = 0x8118691c\n\tSIOCATMARK                        = 0x40047307\n\tSIOCDELMULTI                      = 0x80906932\n\tSIOCDELRT                         = 0x8030720b\n\tSIOCDIFADDR                       = 0x80906919\n\tSIOCDIFPHYADDR                    = 0x80906949\n\tSIOCDLIFADDR                      = 0x8118691e\n\tSIOCGDRVSPEC                      = 0xc01c697b\n\tSIOCGETPFSYNC                     = 0xc09069f8\n\tSIOCGETSGCNT                      = 0xc0147534\n\tSIOCGETVIFCNT                     = 0xc0147533\n\tSIOCGHIWAT                        = 0x40047301\n\tSIOCGIFADDR                       = 0xc0906921\n\tSIOCGIFADDRPREF                   = 0xc0946920\n\tSIOCGIFALIAS                      = 0xc040691b\n\tSIOCGIFBRDADDR                    = 0xc0906923\n\tSIOCGIFCAP                        = 0xc0206976\n\tSIOCGIFCONF                       = 0xc0086926\n\tSIOCGIFDATA                       = 0xc0946985\n\tSIOCGIFDLT                        = 0xc0906977\n\tSIOCGIFDSTADDR                    = 0xc0906922\n\tSIOCGIFFLAGS                      = 0xc0906911\n\tSIOCGIFGENERIC                    = 0xc090693a\n\tSIOCGIFMEDIA                      = 0xc0286936\n\tSIOCGIFMETRIC                     = 0xc0906917\n\tSIOCGIFMTU                        = 0xc090697e\n\tSIOCGIFNETMASK                    = 0xc0906925\n\tSIOCGIFPDSTADDR                   = 0xc0906948\n\tSIOCGIFPSRCADDR                   = 0xc0906947\n\tSIOCGLIFADDR                      = 0xc118691d\n\tSIOCGLIFPHYADDR                   = 0xc118694b\n\tSIOCGLINKSTR                      = 0xc01c6987\n\tSIOCGLOWAT                        = 0x40047303\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGVH                           = 0xc0906983\n\tSIOCIFCREATE                      = 0x8090697a\n\tSIOCIFDESTROY                     = 0x80906979\n\tSIOCIFGCLONERS                    = 0xc00c6978\n\tSIOCINITIFADDR                    = 0xc0446984\n\tSIOCSDRVSPEC                      = 0x801c697b\n\tSIOCSETPFSYNC                     = 0x809069f7\n\tSIOCSHIWAT                        = 0x80047300\n\tSIOCSIFADDR                       = 0x8090690c\n\tSIOCSIFADDRPREF                   = 0x8094691f\n\tSIOCSIFBRDADDR                    = 0x80906913\n\tSIOCSIFCAP                        = 0x80206975\n\tSIOCSIFDSTADDR                    = 0x8090690e\n\tSIOCSIFFLAGS                      = 0x80906910\n\tSIOCSIFGENERIC                    = 0x80906939\n\tSIOCSIFMEDIA                      = 0xc0906935\n\tSIOCSIFMETRIC                     = 0x80906918\n\tSIOCSIFMTU                        = 0x8090697f\n\tSIOCSIFNETMASK                    = 0x80906916\n\tSIOCSIFPHYADDR                    = 0x80406946\n\tSIOCSLIFPHYADDR                   = 0x8118694a\n\tSIOCSLINKSTR                      = 0x801c6988\n\tSIOCSLOWAT                        = 0x80047302\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSVH                           = 0xc0906982\n\tSIOCZIFDATA                       = 0xc0946986\n\tSOCK_CLOEXEC                      = 0x10000000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_FLAGS_MASK                   = 0xf0000000\n\tSOCK_NONBLOCK                     = 0x20000000\n\tSOCK_NOSIGPIPE                    = 0x40000000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_ACCEPTFILTER                   = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NOHEADER                       = 0x100a\n\tSO_NOSIGPIPE                      = 0x800\n\tSO_OOBINLINE                      = 0x100\n\tSO_OVERFLOWED                     = 0x1009\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x100c\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x100b\n\tSO_TIMESTAMP                      = 0x2000\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSYSCTL_VERSION                    = 0x1000000\n\tSYSCTL_VERS_0                     = 0x0\n\tSYSCTL_VERS_1                     = 0x1000000\n\tSYSCTL_VERS_MASK                  = 0xff000000\n\tS_ARCH1                           = 0x10000\n\tS_ARCH2                           = 0x20000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IFWHT                           = 0xe000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFLUSH                         = 0x3\n\tTCOFLUSH                          = 0x2\n\tTCP_CONGCTL                       = 0x20\n\tTCP_KEEPCNT                       = 0x6\n\tTCP_KEEPIDLE                      = 0x3\n\tTCP_KEEPINIT                      = 0x7\n\tTCP_KEEPINTVL                     = 0x5\n\tTCP_MAXBURST                      = 0x4\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x10\n\tTCP_MINMSS                        = 0xd8\n\tTCP_MSS                           = 0x218\n\tTCP_NODELAY                       = 0x1\n\tTCSAFLUSH                         = 0x2\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCONS                          = 0x80047462\n\tTIOCDCDTIMESTAMP                  = 0x400c7458\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CDTRCTS                  = 0x10\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGLINED                        = 0x40207442\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGQSIZE                        = 0x40047481\n\tTIOCGRANTPT                       = 0x20007447\n\tTIOCGSID                          = 0x40047463\n\tTIOCGSIZE                         = 0x40087468\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCPTMGET                        = 0x48087446\n\tTIOCPTSNAME                       = 0x48087448\n\tTIOCRCVFRAME                      = 0x80047445\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x2000745f\n\tTIOCSLINED                        = 0x80207443\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSQSIZE                        = 0x80047480\n\tTIOCSSIZE                         = 0x80087467\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x80047465\n\tTIOCSTI                           = 0x80017472\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCXMTFRAME                      = 0x80047444\n\tTOSTOP                            = 0x400000\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALL                              = 0x8\n\tWALLSIG                           = 0x8\n\tWALTSIG                           = 0x4\n\tWCLONE                            = 0x4\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWNOWAIT                           = 0x10000\n\tWNOZOMBIE                         = 0x20000\n\tWOPTSCHECKED                      = 0x40000\n\tWSTOPPED                          = 0x7f\n\tWUNTRACED                         = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x58)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x57)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x55)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x60)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5e)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x59)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5f)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x5a)\n\tENOSTR          = syscall.Errno(0x5b)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x56)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x60)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x5c)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x20)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large or too small\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol option not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"connection timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EILSEQ\", \"illegal byte sequence\"},\n\t{86, \"ENOTSUP\", \"not supported\"},\n\t{87, \"ECANCELED\", \"operation Canceled\"},\n\t{88, \"EBADMSG\", \"bad or Corrupt message\"},\n\t{89, \"ENODATA\", \"no message available\"},\n\t{90, \"ENOSR\", \"no STREAM resources\"},\n\t{91, \"ENOSTR\", \"not a STREAM\"},\n\t{92, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EMULTIHOP\", \"multihop attempted\"},\n\t{95, \"ENOLINK\", \"link has been severed\"},\n\t{96, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPWR\", \"power fail/restart\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && netbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_ARP                            = 0x1c\n\tAF_BLUETOOTH                      = 0x1f\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_HYLINK                         = 0xf\n\tAF_IEEE80211                      = 0x20\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x23\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OROUTE                         = 0x11\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x22\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tARPHRD_ARCNET                     = 0x7\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tARPHRD_STRIP                      = 0x17\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB460800                           = 0x70800\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB921600                           = 0xe1000\n\tB9600                             = 0x2580\n\tBIOCFEEDBACK                      = 0x8004427d\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc0104277\n\tBIOCGETIF                         = 0x4090426b\n\tBIOCGFEEDBACK                     = 0x4004427c\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRTIMEOUT                     = 0x4010427b\n\tBIOCGSEESENT                      = 0x40044278\n\tBIOCGSTATS                        = 0x4080426f\n\tBIOCGSTATSOLD                     = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDLT                          = 0x80044276\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8090426c\n\tBIOCSFEEDBACK                     = 0x8004427d\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRTIMEOUT                     = 0x8010427a\n\tBIOCSSEESENT                      = 0x80044279\n\tBIOCSTCPF                         = 0x80104272\n\tBIOCSUDPF                         = 0x80104273\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x8\n\tBPF_ALIGNMENT32                   = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DFLTBUFSIZE                   = 0x100000\n\tBPF_DIV                           = 0x30\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x1000000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLONE_CSIGNAL                     = 0xff\n\tCLONE_FILES                       = 0x400\n\tCLONE_FS                          = 0x200\n\tCLONE_PID                         = 0x1000\n\tCLONE_PTRACE                      = 0x2000\n\tCLONE_SIGHAND                     = 0x800\n\tCLONE_VFORK                       = 0x4000\n\tCLONE_VM                          = 0x100\n\tCPUSTATES                         = 0x5\n\tCP_IDLE                           = 0x4\n\tCP_INTR                           = 0x3\n\tCP_NICE                           = 0x1\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0x14\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tCTL_QUERY                         = -0x2\n\tDIOCBSFLUSH                       = 0x20006478\n\tDLT_A429                          = 0xb8\n\tDLT_A653_ICM                      = 0xb9\n\tDLT_AIRONET_HEADER                = 0x78\n\tDLT_AOS                           = 0xde\n\tDLT_APPLE_IP_OVER_IEEE1394        = 0x8a\n\tDLT_ARCNET                        = 0x7\n\tDLT_ARCNET_LINUX                  = 0x81\n\tDLT_ATM_CLIP                      = 0x13\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AURORA                        = 0x7e\n\tDLT_AX25                          = 0x3\n\tDLT_AX25_KISS                     = 0xca\n\tDLT_BACNET_MS_TP                  = 0xa5\n\tDLT_BLUETOOTH_HCI_H4              = 0xbb\n\tDLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9\n\tDLT_CAN20B                        = 0xbe\n\tDLT_CAN_SOCKETCAN                 = 0xe3\n\tDLT_CHAOS                         = 0x5\n\tDLT_CISCO_IOS                     = 0x76\n\tDLT_C_HDLC                        = 0x68\n\tDLT_C_HDLC_WITH_DIR               = 0xcd\n\tDLT_DECT                          = 0xdd\n\tDLT_DOCSIS                        = 0x8f\n\tDLT_ECONET                        = 0x73\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0x6d\n\tDLT_ERF                           = 0xc5\n\tDLT_ERF_ETH                       = 0xaf\n\tDLT_ERF_POS                       = 0xb0\n\tDLT_FC_2                          = 0xe0\n\tDLT_FC_2_WITH_FRAME_DELIMS        = 0xe1\n\tDLT_FDDI                          = 0xa\n\tDLT_FLEXRAY                       = 0xd2\n\tDLT_FRELAY                        = 0x6b\n\tDLT_FRELAY_WITH_DIR               = 0xce\n\tDLT_GCOM_SERIAL                   = 0xad\n\tDLT_GCOM_T1E1                     = 0xac\n\tDLT_GPF_F                         = 0xab\n\tDLT_GPF_T                         = 0xaa\n\tDLT_GPRS_LLC                      = 0xa9\n\tDLT_GSMTAP_ABIS                   = 0xda\n\tDLT_GSMTAP_UM                     = 0xd9\n\tDLT_HDLC                          = 0x10\n\tDLT_HHDLC                         = 0x79\n\tDLT_HIPPI                         = 0xf\n\tDLT_IBM_SN                        = 0x92\n\tDLT_IBM_SP                        = 0x91\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS          = 0xa3\n\tDLT_IEEE802_15_4                  = 0xc3\n\tDLT_IEEE802_15_4_LINUX            = 0xbf\n\tDLT_IEEE802_15_4_NONASK_PHY       = 0xd7\n\tDLT_IEEE802_16_MAC_CPS            = 0xbc\n\tDLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1\n\tDLT_IPMB                          = 0xc7\n\tDLT_IPMB_LINUX                    = 0xd1\n\tDLT_IPNET                         = 0xe2\n\tDLT_IPV4                          = 0xe4\n\tDLT_IPV6                          = 0xe5\n\tDLT_IP_OVER_FC                    = 0x7a\n\tDLT_JUNIPER_ATM1                  = 0x89\n\tDLT_JUNIPER_ATM2                  = 0x87\n\tDLT_JUNIPER_CHDLC                 = 0xb5\n\tDLT_JUNIPER_ES                    = 0x84\n\tDLT_JUNIPER_ETHER                 = 0xb2\n\tDLT_JUNIPER_FRELAY                = 0xb4\n\tDLT_JUNIPER_GGSN                  = 0x85\n\tDLT_JUNIPER_ISM                   = 0xc2\n\tDLT_JUNIPER_MFR                   = 0x86\n\tDLT_JUNIPER_MLFR                  = 0x83\n\tDLT_JUNIPER_MLPPP                 = 0x82\n\tDLT_JUNIPER_MONITOR               = 0xa4\n\tDLT_JUNIPER_PIC_PEER              = 0xae\n\tDLT_JUNIPER_PPP                   = 0xb3\n\tDLT_JUNIPER_PPPOE                 = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM             = 0xa8\n\tDLT_JUNIPER_SERVICES              = 0x88\n\tDLT_JUNIPER_ST                    = 0xc8\n\tDLT_JUNIPER_VP                    = 0xb7\n\tDLT_LAPB_WITH_DIR                 = 0xcf\n\tDLT_LAPD                          = 0xcb\n\tDLT_LIN                           = 0xd4\n\tDLT_LINUX_EVDEV                   = 0xd8\n\tDLT_LINUX_IRDA                    = 0x90\n\tDLT_LINUX_LAPD                    = 0xb1\n\tDLT_LINUX_SLL                     = 0x71\n\tDLT_LOOP                          = 0x6c\n\tDLT_LTALK                         = 0x72\n\tDLT_MFR                           = 0xb6\n\tDLT_MOST                          = 0xd3\n\tDLT_MPLS                          = 0xdb\n\tDLT_MTP2                          = 0x8c\n\tDLT_MTP2_WITH_PHDR                = 0x8b\n\tDLT_MTP3                          = 0x8d\n\tDLT_NULL                          = 0x0\n\tDLT_PCI_EXP                       = 0x7d\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPI                           = 0xc0\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0xe\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_PPPD                      = 0xa6\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PPP_WITH_DIR                  = 0xcc\n\tDLT_PRISM_HEADER                  = 0x77\n\tDLT_PRONET                        = 0x4\n\tDLT_RAIF1                         = 0xc6\n\tDLT_RAW                           = 0xc\n\tDLT_RAWAF_MASK                    = 0x2240000\n\tDLT_RIO                           = 0x7c\n\tDLT_SCCP                          = 0x8e\n\tDLT_SITA                          = 0xc4\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xd\n\tDLT_SUNATM                        = 0x7b\n\tDLT_SYMANTEC_FIREWALL             = 0x63\n\tDLT_TZSP                          = 0x80\n\tDLT_USB                           = 0xba\n\tDLT_USB_LINUX                     = 0xbd\n\tDLT_USB_LINUX_MMAPPED             = 0xdc\n\tDLT_WIHART                        = 0xdf\n\tDLT_X2E_SERIAL                    = 0xd5\n\tDLT_X2E_XORAYA                    = 0xd6\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tDT_WHT                            = 0xe\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMUL_LINUX                        = 0x1\n\tEMUL_LINUX32                      = 0x5\n\tEMUL_MAXID                        = 0x6\n\tETHERCAP_JUMBO_MTU                = 0x4\n\tETHERCAP_VLAN_HWTAGGING           = 0x2\n\tETHERCAP_VLAN_MTU                 = 0x1\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERMTU_JUMBO                    = 0x2328\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PAE                     = 0x888e\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOWPROTOCOLS           = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MAX_LEN_JUMBO               = 0x233a\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_PPPOE_ENCAP_LEN             = 0x8\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = 0x2\n\tEVFILT_PROC                       = 0x4\n\tEVFILT_READ                       = 0x0\n\tEVFILT_SIGNAL                     = 0x5\n\tEVFILT_SYSCOUNT                   = 0x7\n\tEVFILT_TIMER                      = 0x6\n\tEVFILT_VNODE                      = 0x3\n\tEVFILT_WRITE                      = 0x1\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_SYSFLAGS                       = 0xf000\n\tEXTA                              = 0x4b00\n\tEXTATTR_CMD_START                 = 0x1\n\tEXTATTR_CMD_STOP                  = 0x2\n\tEXTATTR_NAMESPACE_SYSTEM          = 0x2\n\tEXTATTR_NAMESPACE_USER            = 0x1\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x100\n\tFLUSHO                            = 0x800000\n\tF_CLOSEM                          = 0xa\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xc\n\tF_FSCTL                           = -0x80000000\n\tF_FSDIRMASK                       = 0x70000000\n\tF_FSIN                            = 0x10000000\n\tF_FSINOUT                         = 0x30000000\n\tF_FSOUT                           = 0x20000000\n\tF_FSPRIV                          = 0x8000\n\tF_FSVOID                          = 0x40000000\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETNOSIGPIPE                    = 0xd\n\tF_GETOWN                          = 0x5\n\tF_MAXFD                           = 0xb\n\tF_OK                              = 0x0\n\tF_PARAM_MASK                      = 0xfff\n\tF_PARAM_MAX                       = 0xfff\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETNOSIGPIPE                    = 0xe\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFA_ROUTE                         = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8f52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_NOTRAILERS                    = 0x20\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf8\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf2\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf1\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_STF                           = 0xd7\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_IPV6_ICMP                 = 0x3a\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x34\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_VRRP                      = 0x70\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPSEC_POLICY                 = 0x1c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_EF                             = 0x8000\n\tIP_ERRORMTU                       = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPSEC_POLICY                   = 0x16\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0x14\n\tIP_MF                             = 0x2000\n\tIP_MINFRAGSIZE                    = 0x45\n\tIP_MINTTL                         = 0x18\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVIF                         = 0x14\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVTTL                        = 0x17\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ALIGNMENT_16MB                = 0x18000000\n\tMAP_ALIGNMENT_1TB                 = 0x28000000\n\tMAP_ALIGNMENT_256TB               = 0x30000000\n\tMAP_ALIGNMENT_4GB                 = 0x20000000\n\tMAP_ALIGNMENT_64KB                = 0x10000000\n\tMAP_ALIGNMENT_64PB                = 0x38000000\n\tMAP_ALIGNMENT_MASK                = -0x1000000\n\tMAP_ALIGNMENT_SHIFT               = 0x18\n\tMAP_ANON                          = 0x1000\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_HASSEMAPHORE                  = 0x200\n\tMAP_INHERIT                       = 0x80\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_DEFAULT               = 0x1\n\tMAP_INHERIT_DONATE_COPY           = 0x3\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_NORESERVE                     = 0x40\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x20\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x2000\n\tMAP_TRYFIXED                      = 0x400\n\tMAP_WIRED                         = 0x800\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_BASIC_FLAGS                   = 0xe782807f\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DISCARD                       = 0x800000\n\tMNT_EXKERB                        = 0x800\n\tMNT_EXNORESPORT                   = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXPUBLIC                      = 0x10000000\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_EXTATTR                       = 0x1000000\n\tMNT_FORCE                         = 0x80000\n\tMNT_GETARGS                       = 0x400000\n\tMNT_IGNORE                        = 0x100000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_LOG                           = 0x2000000\n\tMNT_NOATIME                       = 0x4000000\n\tMNT_NOCOREDUMP                    = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NODEVMTIME                    = 0x40000000\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_OP_FLAGS                      = 0x4d0000\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELATIME                      = 0x20000\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x80000000\n\tMNT_SYMPERM                       = 0x20000000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UNION                         = 0x20\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0xff90ffff\n\tMNT_WAIT                          = 0x1\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CONTROLMBUF                   = 0x2000000\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_IOVUSRSPACE                   = 0x4000000\n\tMSG_LENUSRSPACE                   = 0x8000000\n\tMSG_MCAST                         = 0x200\n\tMSG_NAMEMBUF                      = 0x1000000\n\tMSG_NBIO                          = 0x1000\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_USERFLAGS                     = 0xffffff\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x2\n\tMS_SYNC                           = 0x4\n\tNAME_MAX                          = 0x1ff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x5\n\tNET_RT_MAXID                      = 0x6\n\tNET_RT_OIFLIST                    = 0x4\n\tNET_RT_OOIFLIST                   = 0x3\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOFIOGETBMAP                       = 0xc004667a\n\tONLCR                             = 0x2\n\tONLRET                            = 0x40\n\tONOCR                             = 0x20\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tO_ACCMODE                         = 0x3\n\tO_ALT_IO                          = 0x40000\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x400000\n\tO_CREAT                           = 0x200\n\tO_DIRECT                          = 0x80000\n\tO_DIRECTORY                       = 0x200000\n\tO_DSYNC                           = 0x10000\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_NOSIGPIPE                       = 0x1000000\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x20000\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPRI_IOFLUSH                       = 0x7c\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_AS                         = 0xa\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BRD                          = 0x7\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_MAX                          = 0x9\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_TAG                          = 0x8\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BRD                           = 0x80\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_NETMASK                       = 0x4\n\tRTA_TAG                           = 0x100\n\tRTF_ANNOUNCE                      = 0x20000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_CLONED                        = 0x2000\n\tRTF_CLONING                       = 0x100\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_MASK                          = 0x80\n\tRTF_MODIFIED                      = 0x20\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_REJECT                        = 0x8\n\tRTF_SRC                           = 0x10000\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_XRESOLVE                      = 0x200\n\tRTM_ADD                           = 0x1\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDR                       = 0x15\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_GET                           = 0x4\n\tRTM_IEEE80211                     = 0x11\n\tRTM_IFANNOUNCE                    = 0x10\n\tRTM_IFINFO                        = 0x14\n\tRTM_LLINFO_UPD                    = 0x13\n\tRTM_LOCK                          = 0x8\n\tRTM_LOSING                        = 0x5\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_OIFINFO                       = 0xf\n\tRTM_OLDADD                        = 0x9\n\tRTM_OLDDEL                        = 0xa\n\tRTM_OOIFINFO                      = 0xe\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_RTTUNIT                       = 0xf4240\n\tRTM_SETGATE                       = 0x12\n\tRTM_VERSION                       = 0x4\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tSCM_CREDS                         = 0x4\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x8\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80906931\n\tSIOCADDRT                         = 0x8038720a\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCALIFADDR                      = 0x8118691c\n\tSIOCATMARK                        = 0x40047307\n\tSIOCDELMULTI                      = 0x80906932\n\tSIOCDELRT                         = 0x8038720b\n\tSIOCDIFADDR                       = 0x80906919\n\tSIOCDIFPHYADDR                    = 0x80906949\n\tSIOCDLIFADDR                      = 0x8118691e\n\tSIOCGDRVSPEC                      = 0xc028697b\n\tSIOCGETPFSYNC                     = 0xc09069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGHIWAT                        = 0x40047301\n\tSIOCGIFADDR                       = 0xc0906921\n\tSIOCGIFADDRPREF                   = 0xc0986920\n\tSIOCGIFALIAS                      = 0xc040691b\n\tSIOCGIFBRDADDR                    = 0xc0906923\n\tSIOCGIFCAP                        = 0xc0206976\n\tSIOCGIFCONF                       = 0xc0106926\n\tSIOCGIFDATA                       = 0xc0986985\n\tSIOCGIFDLT                        = 0xc0906977\n\tSIOCGIFDSTADDR                    = 0xc0906922\n\tSIOCGIFFLAGS                      = 0xc0906911\n\tSIOCGIFGENERIC                    = 0xc090693a\n\tSIOCGIFMEDIA                      = 0xc0306936\n\tSIOCGIFMETRIC                     = 0xc0906917\n\tSIOCGIFMTU                        = 0xc090697e\n\tSIOCGIFNETMASK                    = 0xc0906925\n\tSIOCGIFPDSTADDR                   = 0xc0906948\n\tSIOCGIFPSRCADDR                   = 0xc0906947\n\tSIOCGLIFADDR                      = 0xc118691d\n\tSIOCGLIFPHYADDR                   = 0xc118694b\n\tSIOCGLINKSTR                      = 0xc0286987\n\tSIOCGLOWAT                        = 0x40047303\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGVH                           = 0xc0906983\n\tSIOCIFCREATE                      = 0x8090697a\n\tSIOCIFDESTROY                     = 0x80906979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCINITIFADDR                    = 0xc0706984\n\tSIOCSDRVSPEC                      = 0x8028697b\n\tSIOCSETPFSYNC                     = 0x809069f7\n\tSIOCSHIWAT                        = 0x80047300\n\tSIOCSIFADDR                       = 0x8090690c\n\tSIOCSIFADDRPREF                   = 0x8098691f\n\tSIOCSIFBRDADDR                    = 0x80906913\n\tSIOCSIFCAP                        = 0x80206975\n\tSIOCSIFDSTADDR                    = 0x8090690e\n\tSIOCSIFFLAGS                      = 0x80906910\n\tSIOCSIFGENERIC                    = 0x80906939\n\tSIOCSIFMEDIA                      = 0xc0906935\n\tSIOCSIFMETRIC                     = 0x80906918\n\tSIOCSIFMTU                        = 0x8090697f\n\tSIOCSIFNETMASK                    = 0x80906916\n\tSIOCSIFPHYADDR                    = 0x80406946\n\tSIOCSLIFPHYADDR                   = 0x8118694a\n\tSIOCSLINKSTR                      = 0x80286988\n\tSIOCSLOWAT                        = 0x80047302\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSVH                           = 0xc0906982\n\tSIOCZIFDATA                       = 0xc0986986\n\tSOCK_CLOEXEC                      = 0x10000000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_FLAGS_MASK                   = 0xf0000000\n\tSOCK_NONBLOCK                     = 0x20000000\n\tSOCK_NOSIGPIPE                    = 0x40000000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_ACCEPTFILTER                   = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NOHEADER                       = 0x100a\n\tSO_NOSIGPIPE                      = 0x800\n\tSO_OOBINLINE                      = 0x100\n\tSO_OVERFLOWED                     = 0x1009\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x100c\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x100b\n\tSO_TIMESTAMP                      = 0x2000\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSYSCTL_VERSION                    = 0x1000000\n\tSYSCTL_VERS_0                     = 0x0\n\tSYSCTL_VERS_1                     = 0x1000000\n\tSYSCTL_VERS_MASK                  = 0xff000000\n\tS_ARCH1                           = 0x10000\n\tS_ARCH2                           = 0x20000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IFWHT                           = 0xe000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tS_LOGIN_SET                       = 0x1\n\tTCIFLUSH                          = 0x1\n\tTCIOFLUSH                         = 0x3\n\tTCOFLUSH                          = 0x2\n\tTCP_CONGCTL                       = 0x20\n\tTCP_KEEPCNT                       = 0x6\n\tTCP_KEEPIDLE                      = 0x3\n\tTCP_KEEPINIT                      = 0x7\n\tTCP_KEEPINTVL                     = 0x5\n\tTCP_MAXBURST                      = 0x4\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x10\n\tTCP_MINMSS                        = 0xd8\n\tTCP_MSS                           = 0x218\n\tTCP_NODELAY                       = 0x1\n\tTCSAFLUSH                         = 0x2\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCONS                          = 0x80047462\n\tTIOCDCDTIMESTAMP                  = 0x40107458\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CDTRCTS                  = 0x10\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGLINED                        = 0x40207442\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGQSIZE                        = 0x40047481\n\tTIOCGRANTPT                       = 0x20007447\n\tTIOCGSID                          = 0x40047463\n\tTIOCGSIZE                         = 0x40087468\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCPTMGET                        = 0x40287446\n\tTIOCPTSNAME                       = 0x40287448\n\tTIOCRCVFRAME                      = 0x80087445\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x2000745f\n\tTIOCSLINED                        = 0x80207443\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSQSIZE                        = 0x80047480\n\tTIOCSSIZE                         = 0x80087467\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x80047465\n\tTIOCSTI                           = 0x80017472\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCXMTFRAME                      = 0x80087444\n\tTOSTOP                            = 0x400000\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALL                              = 0x8\n\tWALLSIG                           = 0x8\n\tWALTSIG                           = 0x4\n\tWCLONE                            = 0x4\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWNOWAIT                           = 0x10000\n\tWNOZOMBIE                         = 0x20000\n\tWOPTSCHECKED                      = 0x40000\n\tWSTOPPED                          = 0x7f\n\tWUNTRACED                         = 0x2\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x58)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x57)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x52)\n\tEILSEQ          = syscall.Errno(0x55)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x60)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tEMULTIHOP       = syscall.Errno(0x5e)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x5d)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODATA         = syscall.Errno(0x59)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOLINK         = syscall.Errno(0x5f)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x53)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x5a)\n\tENOSTR          = syscall.Errno(0x5b)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x56)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x54)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x60)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIME           = syscall.Errno(0x5c)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGPWR    = syscall.Signal(0x20)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large or too small\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol option not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"connection timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disc quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC prog. not avail\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIDRM\", \"identifier removed\"},\n\t{83, \"ENOMSG\", \"no message of desired type\"},\n\t{84, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{85, \"EILSEQ\", \"illegal byte sequence\"},\n\t{86, \"ENOTSUP\", \"not supported\"},\n\t{87, \"ECANCELED\", \"operation Canceled\"},\n\t{88, \"EBADMSG\", \"bad or Corrupt message\"},\n\t{89, \"ENODATA\", \"no message available\"},\n\t{90, \"ENOSR\", \"no STREAM resources\"},\n\t{91, \"ENOSTR\", \"not a STREAM\"},\n\t{92, \"ETIME\", \"STREAM ioctl timeout\"},\n\t{93, \"ENOATTR\", \"attribute not found\"},\n\t{94, \"EMULTIHOP\", \"multihop attempted\"},\n\t{95, \"ENOLINK\", \"link has been severed\"},\n\t{96, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"stopped (signal)\"},\n\t{18, \"SIGTSTP\", \"stopped\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGPWR\", \"power fail/restart\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go",
    "content": "// mkerrors.sh -m32\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m32 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc008427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x400c426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80084267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80084277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x800c426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc100445d\n\tDIOCADDRULE                       = 0xccc84404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xccc8441a\n\tDIOCCLRIFFLAG                     = 0xc024445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0d04412\n\tDIOCCLRSTATUS                     = 0xc0244416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1084460\n\tDIOCGETQUEUE                      = 0xc100445f\n\tDIOCGETQUEUES                     = 0xc100445e\n\tDIOCGETRULE                       = 0xccc84407\n\tDIOCGETRULES                      = 0xccc84406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0084454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0084419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0244457\n\tDIOCKILLSRCNODES                  = 0xc068445b\n\tDIOCKILLSTATES                    = 0xc0d04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc084444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0844450\n\tDIOCRADDADDRS                     = 0xc44c4443\n\tDIOCRADDTABLES                    = 0xc44c443d\n\tDIOCRCLRADDRS                     = 0xc44c4442\n\tDIOCRCLRASTATS                    = 0xc44c4448\n\tDIOCRCLRTABLES                    = 0xc44c443c\n\tDIOCRCLRTSTATS                    = 0xc44c4441\n\tDIOCRDELADDRS                     = 0xc44c4444\n\tDIOCRDELTABLES                    = 0xc44c443e\n\tDIOCRGETADDRS                     = 0xc44c4446\n\tDIOCRGETASTATS                    = 0xc44c4447\n\tDIOCRGETTABLES                    = 0xc44c443f\n\tDIOCRGETTSTATS                    = 0xc44c4440\n\tDIOCRINADEFINE                    = 0xc44c444d\n\tDIOCRSETADDRS                     = 0xc44c4445\n\tDIOCRSETTFLAGS                    = 0xc44c444a\n\tDIOCRTSTADDRS                     = 0xc44c4449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0244459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0244414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc00c4451\n\tDIOCXCOMMIT                       = 0xc00c4452\n\tDIOCXROLLBACK                     = 0xc00c4453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80246987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x805c693c\n\tSIOCBRDGADDL                      = 0x805c6949\n\tSIOCBRDGADDS                      = 0x805c6941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x805c693d\n\tSIOCBRDGDELS                      = 0x805c6942\n\tSIOCBRDGFLUSH                     = 0x805c6948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc05c693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc03c6958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc028694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc05c6942\n\tSIOCBRDGRTS                       = 0xc0186943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x805c6955\n\tSIOCBRDGSIFFLGS                   = 0x805c693f\n\tSIOCBRDGSIFPRIO                   = 0x805c6954\n\tSIOCBRDGSIFPROT                   = 0x805c694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80246989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0147534\n\tSIOCGETVIFCNT                     = 0xc0147533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0086924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc024698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc024698d\n\tSIOCGIFGMEMB                      = 0xc024698a\n\tSIOCGIFGROUP                      = 0xc0246988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0386938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc00c6978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8024698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x400c745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n\t{28672, \"SIGSTKSZ\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc010427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80104277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc110445d\n\tDIOCADDRULE                       = 0xcd604404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcd60441a\n\tDIOCCLRIFFLAG                     = 0xc028445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0e04412\n\tDIOCCLRSTATUS                     = 0xc0284416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1204460\n\tDIOCGETQUEUE                      = 0xc110445f\n\tDIOCGETQUEUES                     = 0xc110445e\n\tDIOCGETRULE                       = 0xcd604407\n\tDIOCGETRULES                      = 0xcd604406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0104454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0104419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0284457\n\tDIOCKILLSRCNODES                  = 0xc080445b\n\tDIOCKILLSTATES                    = 0xc0e04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc4504443\n\tDIOCRADDTABLES                    = 0xc450443d\n\tDIOCRCLRADDRS                     = 0xc4504442\n\tDIOCRCLRASTATS                    = 0xc4504448\n\tDIOCRCLRTABLES                    = 0xc450443c\n\tDIOCRCLRTSTATS                    = 0xc4504441\n\tDIOCRDELADDRS                     = 0xc4504444\n\tDIOCRDELTABLES                    = 0xc450443e\n\tDIOCRGETADDRS                     = 0xc4504446\n\tDIOCRGETASTATS                    = 0xc4504447\n\tDIOCRGETTABLES                    = 0xc450443f\n\tDIOCRGETTSTATS                    = 0xc4504440\n\tDIOCRINADEFINE                    = 0xc450444d\n\tDIOCRSETADDRS                     = 0xc4504445\n\tDIOCRSETTFLAGS                    = 0xc450444a\n\tDIOCRTSTADDRS                     = 0xc4504449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0284459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0284414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc0104451\n\tDIOCXCOMMIT                       = 0xc0104452\n\tDIOCXROLLBACK                     = 0xc0104453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc030694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0206943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc028698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc028698d\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0406938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8028698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n\t{28672, \"SIGSTKSZ\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go",
    "content": "// mkerrors.sh\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc008427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80084267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80084277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc100445d\n\tDIOCADDRULE                       = 0xcce04404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcce0441a\n\tDIOCCLRIFFLAG                     = 0xc024445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0d04412\n\tDIOCCLRSTATUS                     = 0xc0244416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1084460\n\tDIOCGETQUEUE                      = 0xc100445f\n\tDIOCGETQUEUES                     = 0xc100445e\n\tDIOCGETRULE                       = 0xcce04407\n\tDIOCGETRULES                      = 0xcce04406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0084454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0084419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0244457\n\tDIOCKILLSRCNODES                  = 0xc068445b\n\tDIOCKILLSTATES                    = 0xc0d04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc44c4443\n\tDIOCRADDTABLES                    = 0xc44c443d\n\tDIOCRCLRADDRS                     = 0xc44c4442\n\tDIOCRCLRASTATS                    = 0xc44c4448\n\tDIOCRCLRTABLES                    = 0xc44c443c\n\tDIOCRCLRTSTATS                    = 0xc44c4441\n\tDIOCRDELADDRS                     = 0xc44c4444\n\tDIOCRDELTABLES                    = 0xc44c443e\n\tDIOCRGETADDRS                     = 0xc44c4446\n\tDIOCRGETASTATS                    = 0xc44c4447\n\tDIOCRGETTABLES                    = 0xc44c443f\n\tDIOCRGETTSTATS                    = 0xc44c4440\n\tDIOCRINADEFINE                    = 0xc44c444d\n\tDIOCRSETADDRS                     = 0xc44c4445\n\tDIOCRSETTFLAGS                    = 0xc44c444a\n\tDIOCRTSTADDRS                     = 0xc44c4449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0244459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0244414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc00c4451\n\tDIOCXCOMMIT                       = 0xc00c4452\n\tDIOCXROLLBACK                     = 0xc00c4453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80246987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc028694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0186943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80246989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0147534\n\tSIOCGETVIFCNT                     = 0xc0147533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0086924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc024698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc024698d\n\tSIOCGIFGMEMB                      = 0xc024698a\n\tSIOCGIFGROUP                      = 0xc0246988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0386938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc00c6978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8024698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n\t{28672, \"SIGSTKSZ\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc010427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80104277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc110445d\n\tDIOCADDRULE                       = 0xcd604404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcd60441a\n\tDIOCCLRIFFLAG                     = 0xc028445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0e04412\n\tDIOCCLRSTATUS                     = 0xc0284416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1204460\n\tDIOCGETQUEUE                      = 0xc110445f\n\tDIOCGETQUEUES                     = 0xc110445e\n\tDIOCGETRULE                       = 0xcd604407\n\tDIOCGETRULES                      = 0xcd604406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0104454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0104419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0284457\n\tDIOCKILLSRCNODES                  = 0xc080445b\n\tDIOCKILLSTATES                    = 0xc0e04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc4504443\n\tDIOCRADDTABLES                    = 0xc450443d\n\tDIOCRCLRADDRS                     = 0xc4504442\n\tDIOCRCLRASTATS                    = 0xc4504448\n\tDIOCRCLRTABLES                    = 0xc450443c\n\tDIOCRCLRTSTATS                    = 0xc4504441\n\tDIOCRDELADDRS                     = 0xc4504444\n\tDIOCRDELTABLES                    = 0xc450443e\n\tDIOCRGETADDRS                     = 0xc4504446\n\tDIOCRGETASTATS                    = 0xc4504447\n\tDIOCRGETTABLES                    = 0xc450443f\n\tDIOCRGETTSTATS                    = 0xc4504440\n\tDIOCRINADEFINE                    = 0xc450444d\n\tDIOCRSETADDRS                     = 0xc4504445\n\tDIOCRSETTFLAGS                    = 0xc450444a\n\tDIOCRTSTADDRS                     = 0xc4504449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0284459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0284414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc0104451\n\tDIOCXCOMMIT                       = 0xc0104452\n\tDIOCXROLLBACK                     = 0xc0104453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc030694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0206943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc028698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc028698d\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0406938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8028698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n\t{28672, \"SIGSTKSZ\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc010427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80104277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc110445d\n\tDIOCADDRULE                       = 0xcd604404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcd60441a\n\tDIOCCLRIFFLAG                     = 0xc028445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0e04412\n\tDIOCCLRSTATUS                     = 0xc0284416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1204460\n\tDIOCGETQUEUE                      = 0xc110445f\n\tDIOCGETQUEUES                     = 0xc110445e\n\tDIOCGETRULE                       = 0xcd604407\n\tDIOCGETRULES                      = 0xcd604406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0104454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0104419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0284457\n\tDIOCKILLSRCNODES                  = 0xc080445b\n\tDIOCKILLSTATES                    = 0xc0e04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc4504443\n\tDIOCRADDTABLES                    = 0xc450443d\n\tDIOCRCLRADDRS                     = 0xc4504442\n\tDIOCRCLRASTATS                    = 0xc4504448\n\tDIOCRCLRTABLES                    = 0xc450443c\n\tDIOCRCLRTSTATS                    = 0xc4504441\n\tDIOCRDELADDRS                     = 0xc4504444\n\tDIOCRDELTABLES                    = 0xc450443e\n\tDIOCRGETADDRS                     = 0xc4504446\n\tDIOCRGETASTATS                    = 0xc4504447\n\tDIOCRGETTABLES                    = 0xc450443f\n\tDIOCRGETTSTATS                    = 0xc4504440\n\tDIOCRINADEFINE                    = 0xc450444d\n\tDIOCRSETADDRS                     = 0xc4504445\n\tDIOCRSETTFLAGS                    = 0xc450444a\n\tDIOCRTSTADDRS                     = 0xc4504449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0284459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0284414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc0104451\n\tDIOCXCOMMIT                       = 0xc0104452\n\tDIOCXROLLBACK                     = 0xc0104453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xfffffff\n\tIPV6_FLOWLABEL_MASK               = 0xfffff\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc030694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0206943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc028698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc028698d\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0406938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8028698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGIOT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n\t{81920, \"SIGSTKSZ\", \"unknown signal\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc010427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80104277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc110445d\n\tDIOCADDRULE                       = 0xcd604404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcd60441a\n\tDIOCCLRIFFLAG                     = 0xc028445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0e04412\n\tDIOCCLRSTATUS                     = 0xc0284416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1204460\n\tDIOCGETQUEUE                      = 0xc110445f\n\tDIOCGETQUEUES                     = 0xc110445e\n\tDIOCGETRULE                       = 0xcd604407\n\tDIOCGETRULES                      = 0xcd604406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0104454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0104419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0284457\n\tDIOCKILLSRCNODES                  = 0xc080445b\n\tDIOCKILLSTATES                    = 0xc0e04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc4504443\n\tDIOCRADDTABLES                    = 0xc450443d\n\tDIOCRCLRADDRS                     = 0xc4504442\n\tDIOCRCLRASTATS                    = 0xc4504448\n\tDIOCRCLRTABLES                    = 0xc450443c\n\tDIOCRCLRTSTATS                    = 0xc4504441\n\tDIOCRDELADDRS                     = 0xc4504444\n\tDIOCRDELTABLES                    = 0xc450443e\n\tDIOCRGETADDRS                     = 0xc4504446\n\tDIOCRGETASTATS                    = 0xc4504447\n\tDIOCRGETTABLES                    = 0xc450443f\n\tDIOCRGETTSTATS                    = 0xc4504440\n\tDIOCRINADEFINE                    = 0xc450444d\n\tDIOCRSETADDRS                     = 0xc4504445\n\tDIOCRSETTFLAGS                    = 0xc450444a\n\tDIOCRTSTADDRS                     = 0xc4504449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0284459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0284414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc0104451\n\tDIOCXCOMMIT                       = 0xc0104452\n\tDIOCXROLLBACK                     = 0xc0104453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xfffffff\n\tIPV6_FLOWLABEL_MASK               = 0xfffff\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMSG_WAITFORONE                    = 0x1000\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc030694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0206943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc028698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc028698d\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0406938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8028698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGABRT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && openbsd\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_APPLETALK                      = 0x10\n\tAF_BLUETOOTH                      = 0x20\n\tAF_CCITT                          = 0xa\n\tAF_CHAOS                          = 0x5\n\tAF_CNT                            = 0x15\n\tAF_COIP                           = 0x14\n\tAF_DATAKIT                        = 0x9\n\tAF_DECnet                         = 0xc\n\tAF_DLI                            = 0xd\n\tAF_E164                           = 0x1a\n\tAF_ECMA                           = 0x8\n\tAF_ENCAP                          = 0x1c\n\tAF_HYLINK                         = 0xf\n\tAF_IMPLINK                        = 0x3\n\tAF_INET                           = 0x2\n\tAF_INET6                          = 0x18\n\tAF_IPX                            = 0x17\n\tAF_ISDN                           = 0x1a\n\tAF_ISO                            = 0x7\n\tAF_KEY                            = 0x1e\n\tAF_LAT                            = 0xe\n\tAF_LINK                           = 0x12\n\tAF_LOCAL                          = 0x1\n\tAF_MAX                            = 0x24\n\tAF_MPLS                           = 0x21\n\tAF_NATM                           = 0x1b\n\tAF_NS                             = 0x6\n\tAF_OSI                            = 0x7\n\tAF_PUP                            = 0x4\n\tAF_ROUTE                          = 0x11\n\tAF_SIP                            = 0x1d\n\tAF_SNA                            = 0xb\n\tAF_UNIX                           = 0x1\n\tAF_UNSPEC                         = 0x0\n\tALTWERASE                         = 0x200\n\tARPHRD_ETHER                      = 0x1\n\tARPHRD_FRELAY                     = 0xf\n\tARPHRD_IEEE1394                   = 0x18\n\tARPHRD_IEEE802                    = 0x6\n\tB0                                = 0x0\n\tB110                              = 0x6e\n\tB115200                           = 0x1c200\n\tB1200                             = 0x4b0\n\tB134                              = 0x86\n\tB14400                            = 0x3840\n\tB150                              = 0x96\n\tB1800                             = 0x708\n\tB19200                            = 0x4b00\n\tB200                              = 0xc8\n\tB230400                           = 0x38400\n\tB2400                             = 0x960\n\tB28800                            = 0x7080\n\tB300                              = 0x12c\n\tB38400                            = 0x9600\n\tB4800                             = 0x12c0\n\tB50                               = 0x32\n\tB57600                            = 0xe100\n\tB600                              = 0x258\n\tB7200                             = 0x1c20\n\tB75                               = 0x4b\n\tB76800                            = 0x12c00\n\tB9600                             = 0x2580\n\tBIOCFLUSH                         = 0x20004268\n\tBIOCGBLEN                         = 0x40044266\n\tBIOCGDIRFILT                      = 0x4004427c\n\tBIOCGDLT                          = 0x4004426a\n\tBIOCGDLTLIST                      = 0xc010427b\n\tBIOCGETIF                         = 0x4020426b\n\tBIOCGFILDROP                      = 0x40044278\n\tBIOCGHDRCMPLT                     = 0x40044274\n\tBIOCGRSIG                         = 0x40044273\n\tBIOCGRTIMEOUT                     = 0x4010426e\n\tBIOCGSTATS                        = 0x4008426f\n\tBIOCIMMEDIATE                     = 0x80044270\n\tBIOCLOCK                          = 0x20004276\n\tBIOCPROMISC                       = 0x20004269\n\tBIOCSBLEN                         = 0xc0044266\n\tBIOCSDIRFILT                      = 0x8004427d\n\tBIOCSDLT                          = 0x8004427a\n\tBIOCSETF                          = 0x80104267\n\tBIOCSETIF                         = 0x8020426c\n\tBIOCSETWF                         = 0x80104277\n\tBIOCSFILDROP                      = 0x80044279\n\tBIOCSHDRCMPLT                     = 0x80044275\n\tBIOCSRSIG                         = 0x80044272\n\tBIOCSRTIMEOUT                     = 0x8010426d\n\tBIOCVERSION                       = 0x40044271\n\tBPF_A                             = 0x10\n\tBPF_ABS                           = 0x20\n\tBPF_ADD                           = 0x0\n\tBPF_ALIGNMENT                     = 0x4\n\tBPF_ALU                           = 0x4\n\tBPF_AND                           = 0x50\n\tBPF_B                             = 0x10\n\tBPF_DIRECTION_IN                  = 0x1\n\tBPF_DIRECTION_OUT                 = 0x2\n\tBPF_DIV                           = 0x30\n\tBPF_FILDROP_CAPTURE               = 0x1\n\tBPF_FILDROP_DROP                  = 0x2\n\tBPF_FILDROP_PASS                  = 0x0\n\tBPF_F_DIR_IN                      = 0x10\n\tBPF_F_DIR_MASK                    = 0x30\n\tBPF_F_DIR_OUT                     = 0x20\n\tBPF_F_DIR_SHIFT                   = 0x4\n\tBPF_F_FLOWID                      = 0x8\n\tBPF_F_PRI_MASK                    = 0x7\n\tBPF_H                             = 0x8\n\tBPF_IMM                           = 0x0\n\tBPF_IND                           = 0x40\n\tBPF_JA                            = 0x0\n\tBPF_JEQ                           = 0x10\n\tBPF_JGE                           = 0x30\n\tBPF_JGT                           = 0x20\n\tBPF_JMP                           = 0x5\n\tBPF_JSET                          = 0x40\n\tBPF_K                             = 0x0\n\tBPF_LD                            = 0x0\n\tBPF_LDX                           = 0x1\n\tBPF_LEN                           = 0x80\n\tBPF_LSH                           = 0x60\n\tBPF_MAJOR_VERSION                 = 0x1\n\tBPF_MAXBUFSIZE                    = 0x200000\n\tBPF_MAXINSNS                      = 0x200\n\tBPF_MEM                           = 0x60\n\tBPF_MEMWORDS                      = 0x10\n\tBPF_MINBUFSIZE                    = 0x20\n\tBPF_MINOR_VERSION                 = 0x1\n\tBPF_MISC                          = 0x7\n\tBPF_MSH                           = 0xa0\n\tBPF_MUL                           = 0x20\n\tBPF_NEG                           = 0x80\n\tBPF_OR                            = 0x40\n\tBPF_RELEASE                       = 0x30bb6\n\tBPF_RET                           = 0x6\n\tBPF_RND                           = 0xc0\n\tBPF_RSH                           = 0x70\n\tBPF_ST                            = 0x2\n\tBPF_STX                           = 0x3\n\tBPF_SUB                           = 0x10\n\tBPF_TAX                           = 0x0\n\tBPF_TXA                           = 0x80\n\tBPF_W                             = 0x0\n\tBPF_X                             = 0x8\n\tBRKINT                            = 0x2\n\tCFLUSH                            = 0xf\n\tCLOCAL                            = 0x8000\n\tCLOCK_BOOTTIME                    = 0x6\n\tCLOCK_MONOTONIC                   = 0x3\n\tCLOCK_PROCESS_CPUTIME_ID          = 0x2\n\tCLOCK_REALTIME                    = 0x0\n\tCLOCK_THREAD_CPUTIME_ID           = 0x4\n\tCLOCK_UPTIME                      = 0x5\n\tCPUSTATES                         = 0x6\n\tCP_IDLE                           = 0x5\n\tCP_INTR                           = 0x4\n\tCP_NICE                           = 0x1\n\tCP_SPIN                           = 0x3\n\tCP_SYS                            = 0x2\n\tCP_USER                           = 0x0\n\tCREAD                             = 0x800\n\tCRTSCTS                           = 0x10000\n\tCS5                               = 0x0\n\tCS6                               = 0x100\n\tCS7                               = 0x200\n\tCS8                               = 0x300\n\tCSIZE                             = 0x300\n\tCSTART                            = 0x11\n\tCSTATUS                           = 0xff\n\tCSTOP                             = 0x13\n\tCSTOPB                            = 0x400\n\tCSUSP                             = 0x1a\n\tCTL_HW                            = 0x6\n\tCTL_KERN                          = 0x1\n\tCTL_MAXNAME                       = 0xc\n\tCTL_NET                           = 0x4\n\tDIOCADDQUEUE                      = 0xc110445d\n\tDIOCADDRULE                       = 0xcd604404\n\tDIOCADDSTATE                      = 0xc1084425\n\tDIOCCHANGERULE                    = 0xcd60441a\n\tDIOCCLRIFFLAG                     = 0xc028445a\n\tDIOCCLRSRCNODES                   = 0x20004455\n\tDIOCCLRSTATES                     = 0xc0e04412\n\tDIOCCLRSTATUS                     = 0xc0284416\n\tDIOCGETLIMIT                      = 0xc0084427\n\tDIOCGETQSTATS                     = 0xc1204460\n\tDIOCGETQUEUE                      = 0xc110445f\n\tDIOCGETQUEUES                     = 0xc110445e\n\tDIOCGETRULE                       = 0xcd604407\n\tDIOCGETRULES                      = 0xcd604406\n\tDIOCGETRULESET                    = 0xc444443b\n\tDIOCGETRULESETS                   = 0xc444443a\n\tDIOCGETSRCNODES                   = 0xc0104454\n\tDIOCGETSTATE                      = 0xc1084413\n\tDIOCGETSTATES                     = 0xc0104419\n\tDIOCGETSTATUS                     = 0xc1e84415\n\tDIOCGETSYNFLWATS                  = 0xc0084463\n\tDIOCGETTIMEOUT                    = 0xc008441e\n\tDIOCIGETIFACES                    = 0xc0284457\n\tDIOCKILLSRCNODES                  = 0xc080445b\n\tDIOCKILLSTATES                    = 0xc0e04429\n\tDIOCNATLOOK                       = 0xc0504417\n\tDIOCOSFPADD                       = 0xc088444f\n\tDIOCOSFPFLUSH                     = 0x2000444e\n\tDIOCOSFPGET                       = 0xc0884450\n\tDIOCRADDADDRS                     = 0xc4504443\n\tDIOCRADDTABLES                    = 0xc450443d\n\tDIOCRCLRADDRS                     = 0xc4504442\n\tDIOCRCLRASTATS                    = 0xc4504448\n\tDIOCRCLRTABLES                    = 0xc450443c\n\tDIOCRCLRTSTATS                    = 0xc4504441\n\tDIOCRDELADDRS                     = 0xc4504444\n\tDIOCRDELTABLES                    = 0xc450443e\n\tDIOCRGETADDRS                     = 0xc4504446\n\tDIOCRGETASTATS                    = 0xc4504447\n\tDIOCRGETTABLES                    = 0xc450443f\n\tDIOCRGETTSTATS                    = 0xc4504440\n\tDIOCRINADEFINE                    = 0xc450444d\n\tDIOCRSETADDRS                     = 0xc4504445\n\tDIOCRSETTFLAGS                    = 0xc450444a\n\tDIOCRTSTADDRS                     = 0xc4504449\n\tDIOCSETDEBUG                      = 0xc0044418\n\tDIOCSETHOSTID                     = 0xc0044456\n\tDIOCSETIFFLAG                     = 0xc0284459\n\tDIOCSETLIMIT                      = 0xc0084428\n\tDIOCSETREASS                      = 0xc004445c\n\tDIOCSETSTATUSIF                   = 0xc0284414\n\tDIOCSETSYNCOOKIES                 = 0xc0014462\n\tDIOCSETSYNFLWATS                  = 0xc0084461\n\tDIOCSETTIMEOUT                    = 0xc008441d\n\tDIOCSTART                         = 0x20004401\n\tDIOCSTOP                          = 0x20004402\n\tDIOCXBEGIN                        = 0xc0104451\n\tDIOCXCOMMIT                       = 0xc0104452\n\tDIOCXROLLBACK                     = 0xc0104453\n\tDLT_ARCNET                        = 0x7\n\tDLT_ATM_RFC1483                   = 0xb\n\tDLT_AX25                          = 0x3\n\tDLT_CHAOS                         = 0x5\n\tDLT_C_HDLC                        = 0x68\n\tDLT_EN10MB                        = 0x1\n\tDLT_EN3MB                         = 0x2\n\tDLT_ENC                           = 0xd\n\tDLT_FDDI                          = 0xa\n\tDLT_IEEE802                       = 0x6\n\tDLT_IEEE802_11                    = 0x69\n\tDLT_IEEE802_11_RADIO              = 0x7f\n\tDLT_LOOP                          = 0xc\n\tDLT_MPLS                          = 0xdb\n\tDLT_NULL                          = 0x0\n\tDLT_OPENFLOW                      = 0x10b\n\tDLT_PFLOG                         = 0x75\n\tDLT_PFSYNC                        = 0x12\n\tDLT_PPP                           = 0x9\n\tDLT_PPP_BSDOS                     = 0x10\n\tDLT_PPP_ETHER                     = 0x33\n\tDLT_PPP_SERIAL                    = 0x32\n\tDLT_PRONET                        = 0x4\n\tDLT_RAW                           = 0xe\n\tDLT_SLIP                          = 0x8\n\tDLT_SLIP_BSDOS                    = 0xf\n\tDLT_USBPCAP                       = 0xf9\n\tDLT_USER0                         = 0x93\n\tDLT_USER1                         = 0x94\n\tDLT_USER10                        = 0x9d\n\tDLT_USER11                        = 0x9e\n\tDLT_USER12                        = 0x9f\n\tDLT_USER13                        = 0xa0\n\tDLT_USER14                        = 0xa1\n\tDLT_USER15                        = 0xa2\n\tDLT_USER2                         = 0x95\n\tDLT_USER3                         = 0x96\n\tDLT_USER4                         = 0x97\n\tDLT_USER5                         = 0x98\n\tDLT_USER6                         = 0x99\n\tDLT_USER7                         = 0x9a\n\tDLT_USER8                         = 0x9b\n\tDLT_USER9                         = 0x9c\n\tDT_BLK                            = 0x6\n\tDT_CHR                            = 0x2\n\tDT_DIR                            = 0x4\n\tDT_FIFO                           = 0x1\n\tDT_LNK                            = 0xa\n\tDT_REG                            = 0x8\n\tDT_SOCK                           = 0xc\n\tDT_UNKNOWN                        = 0x0\n\tECHO                              = 0x8\n\tECHOCTL                           = 0x40\n\tECHOE                             = 0x2\n\tECHOK                             = 0x4\n\tECHOKE                            = 0x1\n\tECHONL                            = 0x10\n\tECHOPRT                           = 0x20\n\tEMT_TAGOVF                        = 0x1\n\tEMUL_ENABLED                      = 0x1\n\tEMUL_NATIVE                       = 0x2\n\tENDRUNDISC                        = 0x9\n\tETH64_8021_RSVD_MASK              = 0xfffffffffff0\n\tETH64_8021_RSVD_PREFIX            = 0x180c2000000\n\tETHERMIN                          = 0x2e\n\tETHERMTU                          = 0x5dc\n\tETHERTYPE_8023                    = 0x4\n\tETHERTYPE_AARP                    = 0x80f3\n\tETHERTYPE_ACCTON                  = 0x8390\n\tETHERTYPE_AEONIC                  = 0x8036\n\tETHERTYPE_ALPHA                   = 0x814a\n\tETHERTYPE_AMBER                   = 0x6008\n\tETHERTYPE_AMOEBA                  = 0x8145\n\tETHERTYPE_AOE                     = 0x88a2\n\tETHERTYPE_APOLLO                  = 0x80f7\n\tETHERTYPE_APOLLODOMAIN            = 0x8019\n\tETHERTYPE_APPLETALK               = 0x809b\n\tETHERTYPE_APPLITEK                = 0x80c7\n\tETHERTYPE_ARGONAUT                = 0x803a\n\tETHERTYPE_ARP                     = 0x806\n\tETHERTYPE_AT                      = 0x809b\n\tETHERTYPE_ATALK                   = 0x809b\n\tETHERTYPE_ATOMIC                  = 0x86df\n\tETHERTYPE_ATT                     = 0x8069\n\tETHERTYPE_ATTSTANFORD             = 0x8008\n\tETHERTYPE_AUTOPHON                = 0x806a\n\tETHERTYPE_AXIS                    = 0x8856\n\tETHERTYPE_BCLOOP                  = 0x9003\n\tETHERTYPE_BOFL                    = 0x8102\n\tETHERTYPE_CABLETRON               = 0x7034\n\tETHERTYPE_CHAOS                   = 0x804\n\tETHERTYPE_COMDESIGN               = 0x806c\n\tETHERTYPE_COMPUGRAPHIC            = 0x806d\n\tETHERTYPE_COUNTERPOINT            = 0x8062\n\tETHERTYPE_CRONUS                  = 0x8004\n\tETHERTYPE_CRONUSVLN               = 0x8003\n\tETHERTYPE_DCA                     = 0x1234\n\tETHERTYPE_DDE                     = 0x807b\n\tETHERTYPE_DEBNI                   = 0xaaaa\n\tETHERTYPE_DECAM                   = 0x8048\n\tETHERTYPE_DECCUST                 = 0x6006\n\tETHERTYPE_DECDIAG                 = 0x6005\n\tETHERTYPE_DECDNS                  = 0x803c\n\tETHERTYPE_DECDTS                  = 0x803e\n\tETHERTYPE_DECEXPER                = 0x6000\n\tETHERTYPE_DECLAST                 = 0x8041\n\tETHERTYPE_DECLTM                  = 0x803f\n\tETHERTYPE_DECMUMPS                = 0x6009\n\tETHERTYPE_DECNETBIOS              = 0x8040\n\tETHERTYPE_DELTACON                = 0x86de\n\tETHERTYPE_DIDDLE                  = 0x4321\n\tETHERTYPE_DLOG1                   = 0x660\n\tETHERTYPE_DLOG2                   = 0x661\n\tETHERTYPE_DN                      = 0x6003\n\tETHERTYPE_DOGFIGHT                = 0x1989\n\tETHERTYPE_DSMD                    = 0x8039\n\tETHERTYPE_EAPOL                   = 0x888e\n\tETHERTYPE_ECMA                    = 0x803\n\tETHERTYPE_ENCRYPT                 = 0x803d\n\tETHERTYPE_ES                      = 0x805d\n\tETHERTYPE_EXCELAN                 = 0x8010\n\tETHERTYPE_EXPERDATA               = 0x8049\n\tETHERTYPE_FLIP                    = 0x8146\n\tETHERTYPE_FLOWCONTROL             = 0x8808\n\tETHERTYPE_FRARP                   = 0x808\n\tETHERTYPE_GENDYN                  = 0x8068\n\tETHERTYPE_HAYES                   = 0x8130\n\tETHERTYPE_HIPPI_FP                = 0x8180\n\tETHERTYPE_HITACHI                 = 0x8820\n\tETHERTYPE_HP                      = 0x8005\n\tETHERTYPE_IEEEPUP                 = 0xa00\n\tETHERTYPE_IEEEPUPAT               = 0xa01\n\tETHERTYPE_IMLBL                   = 0x4c42\n\tETHERTYPE_IMLBLDIAG               = 0x424c\n\tETHERTYPE_IP                      = 0x800\n\tETHERTYPE_IPAS                    = 0x876c\n\tETHERTYPE_IPV6                    = 0x86dd\n\tETHERTYPE_IPX                     = 0x8137\n\tETHERTYPE_IPXNEW                  = 0x8037\n\tETHERTYPE_KALPANA                 = 0x8582\n\tETHERTYPE_LANBRIDGE               = 0x8038\n\tETHERTYPE_LANPROBE                = 0x8888\n\tETHERTYPE_LAT                     = 0x6004\n\tETHERTYPE_LBACK                   = 0x9000\n\tETHERTYPE_LITTLE                  = 0x8060\n\tETHERTYPE_LLDP                    = 0x88cc\n\tETHERTYPE_LOGICRAFT               = 0x8148\n\tETHERTYPE_LOOPBACK                = 0x9000\n\tETHERTYPE_MACSEC                  = 0x88e5\n\tETHERTYPE_MATRA                   = 0x807a\n\tETHERTYPE_MAX                     = 0xffff\n\tETHERTYPE_MERIT                   = 0x807c\n\tETHERTYPE_MICP                    = 0x873a\n\tETHERTYPE_MOPDL                   = 0x6001\n\tETHERTYPE_MOPRC                   = 0x6002\n\tETHERTYPE_MOTOROLA                = 0x818d\n\tETHERTYPE_MPLS                    = 0x8847\n\tETHERTYPE_MPLS_MCAST              = 0x8848\n\tETHERTYPE_MUMPS                   = 0x813f\n\tETHERTYPE_NBPCC                   = 0x3c04\n\tETHERTYPE_NBPCLAIM                = 0x3c09\n\tETHERTYPE_NBPCLREQ                = 0x3c05\n\tETHERTYPE_NBPCLRSP                = 0x3c06\n\tETHERTYPE_NBPCREQ                 = 0x3c02\n\tETHERTYPE_NBPCRSP                 = 0x3c03\n\tETHERTYPE_NBPDG                   = 0x3c07\n\tETHERTYPE_NBPDGB                  = 0x3c08\n\tETHERTYPE_NBPDLTE                 = 0x3c0a\n\tETHERTYPE_NBPRAR                  = 0x3c0c\n\tETHERTYPE_NBPRAS                  = 0x3c0b\n\tETHERTYPE_NBPRST                  = 0x3c0d\n\tETHERTYPE_NBPSCD                  = 0x3c01\n\tETHERTYPE_NBPVCD                  = 0x3c00\n\tETHERTYPE_NBS                     = 0x802\n\tETHERTYPE_NCD                     = 0x8149\n\tETHERTYPE_NESTAR                  = 0x8006\n\tETHERTYPE_NETBEUI                 = 0x8191\n\tETHERTYPE_NHRP                    = 0x2001\n\tETHERTYPE_NOVELL                  = 0x8138\n\tETHERTYPE_NS                      = 0x600\n\tETHERTYPE_NSAT                    = 0x601\n\tETHERTYPE_NSCOMPAT                = 0x807\n\tETHERTYPE_NSH                     = 0x984f\n\tETHERTYPE_NTRAILER                = 0x10\n\tETHERTYPE_OS9                     = 0x7007\n\tETHERTYPE_OS9NET                  = 0x7009\n\tETHERTYPE_PACER                   = 0x80c6\n\tETHERTYPE_PBB                     = 0x88e7\n\tETHERTYPE_PCS                     = 0x4242\n\tETHERTYPE_PLANNING                = 0x8044\n\tETHERTYPE_PPP                     = 0x880b\n\tETHERTYPE_PPPOE                   = 0x8864\n\tETHERTYPE_PPPOEDISC               = 0x8863\n\tETHERTYPE_PRIMENTS                = 0x7031\n\tETHERTYPE_PUP                     = 0x200\n\tETHERTYPE_PUPAT                   = 0x200\n\tETHERTYPE_QINQ                    = 0x88a8\n\tETHERTYPE_RACAL                   = 0x7030\n\tETHERTYPE_RATIONAL                = 0x8150\n\tETHERTYPE_RAWFR                   = 0x6559\n\tETHERTYPE_RCL                     = 0x1995\n\tETHERTYPE_RDP                     = 0x8739\n\tETHERTYPE_RETIX                   = 0x80f2\n\tETHERTYPE_REVARP                  = 0x8035\n\tETHERTYPE_SCA                     = 0x6007\n\tETHERTYPE_SECTRA                  = 0x86db\n\tETHERTYPE_SECUREDATA              = 0x876d\n\tETHERTYPE_SGITW                   = 0x817e\n\tETHERTYPE_SG_BOUNCE               = 0x8016\n\tETHERTYPE_SG_DIAG                 = 0x8013\n\tETHERTYPE_SG_NETGAMES             = 0x8014\n\tETHERTYPE_SG_RESV                 = 0x8015\n\tETHERTYPE_SIMNET                  = 0x5208\n\tETHERTYPE_SLOW                    = 0x8809\n\tETHERTYPE_SNA                     = 0x80d5\n\tETHERTYPE_SNMP                    = 0x814c\n\tETHERTYPE_SONIX                   = 0xfaf5\n\tETHERTYPE_SPIDER                  = 0x809f\n\tETHERTYPE_SPRITE                  = 0x500\n\tETHERTYPE_STP                     = 0x8181\n\tETHERTYPE_TALARIS                 = 0x812b\n\tETHERTYPE_TALARISMC               = 0x852b\n\tETHERTYPE_TCPCOMP                 = 0x876b\n\tETHERTYPE_TCPSM                   = 0x9002\n\tETHERTYPE_TEC                     = 0x814f\n\tETHERTYPE_TIGAN                   = 0x802f\n\tETHERTYPE_TRAIL                   = 0x1000\n\tETHERTYPE_TRANSETHER              = 0x6558\n\tETHERTYPE_TYMSHARE                = 0x802e\n\tETHERTYPE_UBBST                   = 0x7005\n\tETHERTYPE_UBDEBUG                 = 0x900\n\tETHERTYPE_UBDIAGLOOP              = 0x7002\n\tETHERTYPE_UBDL                    = 0x7000\n\tETHERTYPE_UBNIU                   = 0x7001\n\tETHERTYPE_UBNMC                   = 0x7003\n\tETHERTYPE_VALID                   = 0x1600\n\tETHERTYPE_VARIAN                  = 0x80dd\n\tETHERTYPE_VAXELN                  = 0x803b\n\tETHERTYPE_VEECO                   = 0x8067\n\tETHERTYPE_VEXP                    = 0x805b\n\tETHERTYPE_VGLAB                   = 0x8131\n\tETHERTYPE_VINES                   = 0xbad\n\tETHERTYPE_VINESECHO               = 0xbaf\n\tETHERTYPE_VINESLOOP               = 0xbae\n\tETHERTYPE_VITAL                   = 0xff00\n\tETHERTYPE_VLAN                    = 0x8100\n\tETHERTYPE_VLTLMAN                 = 0x8080\n\tETHERTYPE_VPROD                   = 0x805c\n\tETHERTYPE_VURESERVED              = 0x8147\n\tETHERTYPE_WATERLOO                = 0x8130\n\tETHERTYPE_WELLFLEET               = 0x8103\n\tETHERTYPE_X25                     = 0x805\n\tETHERTYPE_X75                     = 0x801\n\tETHERTYPE_XNSSM                   = 0x9001\n\tETHERTYPE_XTP                     = 0x817d\n\tETHER_ADDR_LEN                    = 0x6\n\tETHER_ALIGN                       = 0x2\n\tETHER_CRC_LEN                     = 0x4\n\tETHER_CRC_POLY_BE                 = 0x4c11db6\n\tETHER_CRC_POLY_LE                 = 0xedb88320\n\tETHER_HDR_LEN                     = 0xe\n\tETHER_MAX_DIX_LEN                 = 0x600\n\tETHER_MAX_HARDMTU_LEN             = 0xff9b\n\tETHER_MAX_LEN                     = 0x5ee\n\tETHER_MIN_LEN                     = 0x40\n\tETHER_TYPE_LEN                    = 0x2\n\tETHER_VLAN_ENCAP_LEN              = 0x4\n\tEVFILT_AIO                        = -0x3\n\tEVFILT_DEVICE                     = -0x8\n\tEVFILT_EXCEPT                     = -0x9\n\tEVFILT_PROC                       = -0x5\n\tEVFILT_READ                       = -0x1\n\tEVFILT_SIGNAL                     = -0x6\n\tEVFILT_SYSCOUNT                   = 0x9\n\tEVFILT_TIMER                      = -0x7\n\tEVFILT_VNODE                      = -0x4\n\tEVFILT_WRITE                      = -0x2\n\tEVL_ENCAPLEN                      = 0x4\n\tEVL_PRIO_BITS                     = 0xd\n\tEVL_PRIO_MAX                      = 0x7\n\tEVL_VLID_MASK                     = 0xfff\n\tEVL_VLID_MAX                      = 0xffe\n\tEVL_VLID_MIN                      = 0x1\n\tEVL_VLID_NULL                     = 0x0\n\tEV_ADD                            = 0x1\n\tEV_CLEAR                          = 0x20\n\tEV_DELETE                         = 0x2\n\tEV_DISABLE                        = 0x8\n\tEV_DISPATCH                       = 0x80\n\tEV_ENABLE                         = 0x4\n\tEV_EOF                            = 0x8000\n\tEV_ERROR                          = 0x4000\n\tEV_FLAG1                          = 0x2000\n\tEV_ONESHOT                        = 0x10\n\tEV_RECEIPT                        = 0x40\n\tEV_SYSFLAGS                       = 0xf800\n\tEXTA                              = 0x4b00\n\tEXTB                              = 0x9600\n\tEXTPROC                           = 0x800\n\tFD_CLOEXEC                        = 0x1\n\tFD_SETSIZE                        = 0x400\n\tFLUSHO                            = 0x800000\n\tF_DUPFD                           = 0x0\n\tF_DUPFD_CLOEXEC                   = 0xa\n\tF_GETFD                           = 0x1\n\tF_GETFL                           = 0x3\n\tF_GETLK                           = 0x7\n\tF_GETOWN                          = 0x5\n\tF_ISATTY                          = 0xb\n\tF_OK                              = 0x0\n\tF_RDLCK                           = 0x1\n\tF_SETFD                           = 0x2\n\tF_SETFL                           = 0x4\n\tF_SETLK                           = 0x8\n\tF_SETLKW                          = 0x9\n\tF_SETOWN                          = 0x6\n\tF_UNLCK                           = 0x2\n\tF_WRLCK                           = 0x3\n\tHUPCL                             = 0x4000\n\tHW_MACHINE                        = 0x1\n\tICANON                            = 0x100\n\tICMP6_FILTER                      = 0x12\n\tICRNL                             = 0x100\n\tIEXTEN                            = 0x400\n\tIFAN_ARRIVAL                      = 0x0\n\tIFAN_DEPARTURE                    = 0x1\n\tIFF_ALLMULTI                      = 0x200\n\tIFF_BROADCAST                     = 0x2\n\tIFF_CANTCHANGE                    = 0x8e52\n\tIFF_DEBUG                         = 0x4\n\tIFF_LINK0                         = 0x1000\n\tIFF_LINK1                         = 0x2000\n\tIFF_LINK2                         = 0x4000\n\tIFF_LOOPBACK                      = 0x8\n\tIFF_MULTICAST                     = 0x8000\n\tIFF_NOARP                         = 0x80\n\tIFF_OACTIVE                       = 0x400\n\tIFF_POINTOPOINT                   = 0x10\n\tIFF_PROMISC                       = 0x100\n\tIFF_RUNNING                       = 0x40\n\tIFF_SIMPLEX                       = 0x800\n\tIFF_STATICARP                     = 0x20\n\tIFF_UP                            = 0x1\n\tIFNAMSIZ                          = 0x10\n\tIFT_1822                          = 0x2\n\tIFT_A12MPPSWITCH                  = 0x82\n\tIFT_AAL2                          = 0xbb\n\tIFT_AAL5                          = 0x31\n\tIFT_ADSL                          = 0x5e\n\tIFT_AFLANE8023                    = 0x3b\n\tIFT_AFLANE8025                    = 0x3c\n\tIFT_ARAP                          = 0x58\n\tIFT_ARCNET                        = 0x23\n\tIFT_ARCNETPLUS                    = 0x24\n\tIFT_ASYNC                         = 0x54\n\tIFT_ATM                           = 0x25\n\tIFT_ATMDXI                        = 0x69\n\tIFT_ATMFUNI                       = 0x6a\n\tIFT_ATMIMA                        = 0x6b\n\tIFT_ATMLOGICAL                    = 0x50\n\tIFT_ATMRADIO                      = 0xbd\n\tIFT_ATMSUBINTERFACE               = 0x86\n\tIFT_ATMVCIENDPT                   = 0xc2\n\tIFT_ATMVIRTUAL                    = 0x95\n\tIFT_BGPPOLICYACCOUNTING           = 0xa2\n\tIFT_BLUETOOTH                     = 0xf8\n\tIFT_BRIDGE                        = 0xd1\n\tIFT_BSC                           = 0x53\n\tIFT_CARP                          = 0xf7\n\tIFT_CCTEMUL                       = 0x3d\n\tIFT_CEPT                          = 0x13\n\tIFT_CES                           = 0x85\n\tIFT_CHANNEL                       = 0x46\n\tIFT_CNR                           = 0x55\n\tIFT_COFFEE                        = 0x84\n\tIFT_COMPOSITELINK                 = 0x9b\n\tIFT_DCN                           = 0x8d\n\tIFT_DIGITALPOWERLINE              = 0x8a\n\tIFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba\n\tIFT_DLSW                          = 0x4a\n\tIFT_DOCSCABLEDOWNSTREAM           = 0x80\n\tIFT_DOCSCABLEMACLAYER             = 0x7f\n\tIFT_DOCSCABLEUPSTREAM             = 0x81\n\tIFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd\n\tIFT_DS0                           = 0x51\n\tIFT_DS0BUNDLE                     = 0x52\n\tIFT_DS1FDL                        = 0xaa\n\tIFT_DS3                           = 0x1e\n\tIFT_DTM                           = 0x8c\n\tIFT_DUMMY                         = 0xf1\n\tIFT_DVBASILN                      = 0xac\n\tIFT_DVBASIOUT                     = 0xad\n\tIFT_DVBRCCDOWNSTREAM              = 0x93\n\tIFT_DVBRCCMACLAYER                = 0x92\n\tIFT_DVBRCCUPSTREAM                = 0x94\n\tIFT_ECONET                        = 0xce\n\tIFT_ENC                           = 0xf4\n\tIFT_EON                           = 0x19\n\tIFT_EPLRS                         = 0x57\n\tIFT_ESCON                         = 0x49\n\tIFT_ETHER                         = 0x6\n\tIFT_FAITH                         = 0xf3\n\tIFT_FAST                          = 0x7d\n\tIFT_FASTETHER                     = 0x3e\n\tIFT_FASTETHERFX                   = 0x45\n\tIFT_FDDI                          = 0xf\n\tIFT_FIBRECHANNEL                  = 0x38\n\tIFT_FRAMERELAYINTERCONNECT        = 0x3a\n\tIFT_FRAMERELAYMPI                 = 0x5c\n\tIFT_FRDLCIENDPT                   = 0xc1\n\tIFT_FRELAY                        = 0x20\n\tIFT_FRELAYDCE                     = 0x2c\n\tIFT_FRF16MFRBUNDLE                = 0xa3\n\tIFT_FRFORWARD                     = 0x9e\n\tIFT_G703AT2MB                     = 0x43\n\tIFT_G703AT64K                     = 0x42\n\tIFT_GIF                           = 0xf0\n\tIFT_GIGABITETHERNET               = 0x75\n\tIFT_GR303IDT                      = 0xb2\n\tIFT_GR303RDT                      = 0xb1\n\tIFT_H323GATEKEEPER                = 0xa4\n\tIFT_H323PROXY                     = 0xa5\n\tIFT_HDH1822                       = 0x3\n\tIFT_HDLC                          = 0x76\n\tIFT_HDSL2                         = 0xa8\n\tIFT_HIPERLAN2                     = 0xb7\n\tIFT_HIPPI                         = 0x2f\n\tIFT_HIPPIINTERFACE                = 0x39\n\tIFT_HOSTPAD                       = 0x5a\n\tIFT_HSSI                          = 0x2e\n\tIFT_HY                            = 0xe\n\tIFT_IBM370PARCHAN                 = 0x48\n\tIFT_IDSL                          = 0x9a\n\tIFT_IEEE1394                      = 0x90\n\tIFT_IEEE80211                     = 0x47\n\tIFT_IEEE80212                     = 0x37\n\tIFT_IEEE8023ADLAG                 = 0xa1\n\tIFT_IFGSN                         = 0x91\n\tIFT_IMT                           = 0xbe\n\tIFT_INFINIBAND                    = 0xc7\n\tIFT_INTERLEAVE                    = 0x7c\n\tIFT_IP                            = 0x7e\n\tIFT_IPFORWARD                     = 0x8e\n\tIFT_IPOVERATM                     = 0x72\n\tIFT_IPOVERCDLC                    = 0x6d\n\tIFT_IPOVERCLAW                    = 0x6e\n\tIFT_IPSWITCH                      = 0x4e\n\tIFT_ISDN                          = 0x3f\n\tIFT_ISDNBASIC                     = 0x14\n\tIFT_ISDNPRIMARY                   = 0x15\n\tIFT_ISDNS                         = 0x4b\n\tIFT_ISDNU                         = 0x4c\n\tIFT_ISO88022LLC                   = 0x29\n\tIFT_ISO88023                      = 0x7\n\tIFT_ISO88024                      = 0x8\n\tIFT_ISO88025                      = 0x9\n\tIFT_ISO88025CRFPINT               = 0x62\n\tIFT_ISO88025DTR                   = 0x56\n\tIFT_ISO88025FIBER                 = 0x73\n\tIFT_ISO88026                      = 0xa\n\tIFT_ISUP                          = 0xb3\n\tIFT_L2VLAN                        = 0x87\n\tIFT_L3IPVLAN                      = 0x88\n\tIFT_L3IPXVLAN                     = 0x89\n\tIFT_LAPB                          = 0x10\n\tIFT_LAPD                          = 0x4d\n\tIFT_LAPF                          = 0x77\n\tIFT_LINEGROUP                     = 0xd2\n\tIFT_LOCALTALK                     = 0x2a\n\tIFT_LOOP                          = 0x18\n\tIFT_MBIM                          = 0xfa\n\tIFT_MEDIAMAILOVERIP               = 0x8b\n\tIFT_MFSIGLINK                     = 0xa7\n\tIFT_MIOX25                        = 0x26\n\tIFT_MODEM                         = 0x30\n\tIFT_MPC                           = 0x71\n\tIFT_MPLS                          = 0xa6\n\tIFT_MPLSTUNNEL                    = 0x96\n\tIFT_MSDSL                         = 0x8f\n\tIFT_MVL                           = 0xbf\n\tIFT_MYRINET                       = 0x63\n\tIFT_NFAS                          = 0xaf\n\tIFT_NSIP                          = 0x1b\n\tIFT_OPTICALCHANNEL                = 0xc3\n\tIFT_OPTICALTRANSPORT              = 0xc4\n\tIFT_OTHER                         = 0x1\n\tIFT_P10                           = 0xc\n\tIFT_P80                           = 0xd\n\tIFT_PARA                          = 0x22\n\tIFT_PFLOG                         = 0xf5\n\tIFT_PFLOW                         = 0xf9\n\tIFT_PFSYNC                        = 0xf6\n\tIFT_PLC                           = 0xae\n\tIFT_PON155                        = 0xcf\n\tIFT_PON622                        = 0xd0\n\tIFT_POS                           = 0xab\n\tIFT_PPP                           = 0x17\n\tIFT_PPPMULTILINKBUNDLE            = 0x6c\n\tIFT_PROPATM                       = 0xc5\n\tIFT_PROPBWAP2MP                   = 0xb8\n\tIFT_PROPCNLS                      = 0x59\n\tIFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5\n\tIFT_PROPDOCSWIRELESSMACLAYER      = 0xb4\n\tIFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6\n\tIFT_PROPMUX                       = 0x36\n\tIFT_PROPVIRTUAL                   = 0x35\n\tIFT_PROPWIRELESSP2P               = 0x9d\n\tIFT_PTPSERIAL                     = 0x16\n\tIFT_PVC                           = 0xf2\n\tIFT_Q2931                         = 0xc9\n\tIFT_QLLC                          = 0x44\n\tIFT_RADIOMAC                      = 0xbc\n\tIFT_RADSL                         = 0x5f\n\tIFT_REACHDSL                      = 0xc0\n\tIFT_RFC1483                       = 0x9f\n\tIFT_RS232                         = 0x21\n\tIFT_RSRB                          = 0x4f\n\tIFT_SDLC                          = 0x11\n\tIFT_SDSL                          = 0x60\n\tIFT_SHDSL                         = 0xa9\n\tIFT_SIP                           = 0x1f\n\tIFT_SIPSIG                        = 0xcc\n\tIFT_SIPTG                         = 0xcb\n\tIFT_SLIP                          = 0x1c\n\tIFT_SMDSDXI                       = 0x2b\n\tIFT_SMDSICIP                      = 0x34\n\tIFT_SONET                         = 0x27\n\tIFT_SONETOVERHEADCHANNEL          = 0xb9\n\tIFT_SONETPATH                     = 0x32\n\tIFT_SONETVT                       = 0x33\n\tIFT_SRP                           = 0x97\n\tIFT_SS7SIGLINK                    = 0x9c\n\tIFT_STACKTOSTACK                  = 0x6f\n\tIFT_STARLAN                       = 0xb\n\tIFT_T1                            = 0x12\n\tIFT_TDLC                          = 0x74\n\tIFT_TELINK                        = 0xc8\n\tIFT_TERMPAD                       = 0x5b\n\tIFT_TR008                         = 0xb0\n\tIFT_TRANSPHDLC                    = 0x7b\n\tIFT_TUNNEL                        = 0x83\n\tIFT_ULTRA                         = 0x1d\n\tIFT_USB                           = 0xa0\n\tIFT_V11                           = 0x40\n\tIFT_V35                           = 0x2d\n\tIFT_V36                           = 0x41\n\tIFT_V37                           = 0x78\n\tIFT_VDSL                          = 0x61\n\tIFT_VIRTUALIPADDRESS              = 0x70\n\tIFT_VIRTUALTG                     = 0xca\n\tIFT_VOICEDID                      = 0xd5\n\tIFT_VOICEEM                       = 0x64\n\tIFT_VOICEEMFGD                    = 0xd3\n\tIFT_VOICEENCAP                    = 0x67\n\tIFT_VOICEFGDEANA                  = 0xd4\n\tIFT_VOICEFXO                      = 0x65\n\tIFT_VOICEFXS                      = 0x66\n\tIFT_VOICEOVERATM                  = 0x98\n\tIFT_VOICEOVERCABLE                = 0xc6\n\tIFT_VOICEOVERFRAMERELAY           = 0x99\n\tIFT_VOICEOVERIP                   = 0x68\n\tIFT_WIREGUARD                     = 0xfb\n\tIFT_X213                          = 0x5d\n\tIFT_X25                           = 0x5\n\tIFT_X25DDN                        = 0x4\n\tIFT_X25HUNTGROUP                  = 0x7a\n\tIFT_X25MLP                        = 0x79\n\tIFT_X25PLE                        = 0x28\n\tIFT_XETHER                        = 0x1a\n\tIGNBRK                            = 0x1\n\tIGNCR                             = 0x80\n\tIGNPAR                            = 0x4\n\tIMAXBEL                           = 0x2000\n\tINLCR                             = 0x40\n\tINPCK                             = 0x10\n\tIN_CLASSA_HOST                    = 0xffffff\n\tIN_CLASSA_MAX                     = 0x80\n\tIN_CLASSA_NET                     = 0xff000000\n\tIN_CLASSA_NSHIFT                  = 0x18\n\tIN_CLASSB_HOST                    = 0xffff\n\tIN_CLASSB_MAX                     = 0x10000\n\tIN_CLASSB_NET                     = 0xffff0000\n\tIN_CLASSB_NSHIFT                  = 0x10\n\tIN_CLASSC_HOST                    = 0xff\n\tIN_CLASSC_NET                     = 0xffffff00\n\tIN_CLASSC_NSHIFT                  = 0x8\n\tIN_CLASSD_HOST                    = 0xfffffff\n\tIN_CLASSD_NET                     = 0xf0000000\n\tIN_CLASSD_NSHIFT                  = 0x1c\n\tIN_LOOPBACKNET                    = 0x7f\n\tIN_RFC3021_HOST                   = 0x1\n\tIN_RFC3021_NET                    = 0xfffffffe\n\tIN_RFC3021_NSHIFT                 = 0x1f\n\tIPPROTO_AH                        = 0x33\n\tIPPROTO_CARP                      = 0x70\n\tIPPROTO_DIVERT                    = 0x102\n\tIPPROTO_DONE                      = 0x101\n\tIPPROTO_DSTOPTS                   = 0x3c\n\tIPPROTO_EGP                       = 0x8\n\tIPPROTO_ENCAP                     = 0x62\n\tIPPROTO_EON                       = 0x50\n\tIPPROTO_ESP                       = 0x32\n\tIPPROTO_ETHERIP                   = 0x61\n\tIPPROTO_FRAGMENT                  = 0x2c\n\tIPPROTO_GGP                       = 0x3\n\tIPPROTO_GRE                       = 0x2f\n\tIPPROTO_HOPOPTS                   = 0x0\n\tIPPROTO_ICMP                      = 0x1\n\tIPPROTO_ICMPV6                    = 0x3a\n\tIPPROTO_IDP                       = 0x16\n\tIPPROTO_IGMP                      = 0x2\n\tIPPROTO_IP                        = 0x0\n\tIPPROTO_IPCOMP                    = 0x6c\n\tIPPROTO_IPIP                      = 0x4\n\tIPPROTO_IPV4                      = 0x4\n\tIPPROTO_IPV6                      = 0x29\n\tIPPROTO_MAX                       = 0x100\n\tIPPROTO_MAXID                     = 0x103\n\tIPPROTO_MOBILE                    = 0x37\n\tIPPROTO_MPLS                      = 0x89\n\tIPPROTO_NONE                      = 0x3b\n\tIPPROTO_PFSYNC                    = 0xf0\n\tIPPROTO_PIM                       = 0x67\n\tIPPROTO_PUP                       = 0xc\n\tIPPROTO_RAW                       = 0xff\n\tIPPROTO_ROUTING                   = 0x2b\n\tIPPROTO_RSVP                      = 0x2e\n\tIPPROTO_SCTP                      = 0x84\n\tIPPROTO_TCP                       = 0x6\n\tIPPROTO_TP                        = 0x1d\n\tIPPROTO_UDP                       = 0x11\n\tIPPROTO_UDPLITE                   = 0x88\n\tIPV6_AUTH_LEVEL                   = 0x35\n\tIPV6_AUTOFLOWLABEL                = 0x3b\n\tIPV6_CHECKSUM                     = 0x1a\n\tIPV6_DEFAULT_MULTICAST_HOPS       = 0x1\n\tIPV6_DEFAULT_MULTICAST_LOOP       = 0x1\n\tIPV6_DEFHLIM                      = 0x40\n\tIPV6_DONTFRAG                     = 0x3e\n\tIPV6_DSTOPTS                      = 0x32\n\tIPV6_ESP_NETWORK_LEVEL            = 0x37\n\tIPV6_ESP_TRANS_LEVEL              = 0x36\n\tIPV6_FAITH                        = 0x1d\n\tIPV6_FLOWINFO_MASK                = 0xffffff0f\n\tIPV6_FLOWLABEL_MASK               = 0xffff0f00\n\tIPV6_FRAGTTL                      = 0x78\n\tIPV6_HLIMDEC                      = 0x1\n\tIPV6_HOPLIMIT                     = 0x2f\n\tIPV6_HOPOPTS                      = 0x31\n\tIPV6_IPCOMP_LEVEL                 = 0x3c\n\tIPV6_JOIN_GROUP                   = 0xc\n\tIPV6_LEAVE_GROUP                  = 0xd\n\tIPV6_MAXHLIM                      = 0xff\n\tIPV6_MAXPACKET                    = 0xffff\n\tIPV6_MINHOPCOUNT                  = 0x41\n\tIPV6_MMTU                         = 0x500\n\tIPV6_MULTICAST_HOPS               = 0xa\n\tIPV6_MULTICAST_IF                 = 0x9\n\tIPV6_MULTICAST_LOOP               = 0xb\n\tIPV6_NEXTHOP                      = 0x30\n\tIPV6_OPTIONS                      = 0x1\n\tIPV6_PATHMTU                      = 0x2c\n\tIPV6_PIPEX                        = 0x3f\n\tIPV6_PKTINFO                      = 0x2e\n\tIPV6_PORTRANGE                    = 0xe\n\tIPV6_PORTRANGE_DEFAULT            = 0x0\n\tIPV6_PORTRANGE_HIGH               = 0x1\n\tIPV6_PORTRANGE_LOW                = 0x2\n\tIPV6_RECVDSTOPTS                  = 0x28\n\tIPV6_RECVDSTPORT                  = 0x40\n\tIPV6_RECVHOPLIMIT                 = 0x25\n\tIPV6_RECVHOPOPTS                  = 0x27\n\tIPV6_RECVPATHMTU                  = 0x2b\n\tIPV6_RECVPKTINFO                  = 0x24\n\tIPV6_RECVRTHDR                    = 0x26\n\tIPV6_RECVTCLASS                   = 0x39\n\tIPV6_RTABLE                       = 0x1021\n\tIPV6_RTHDR                        = 0x33\n\tIPV6_RTHDRDSTOPTS                 = 0x23\n\tIPV6_RTHDR_LOOSE                  = 0x0\n\tIPV6_RTHDR_STRICT                 = 0x1\n\tIPV6_RTHDR_TYPE_0                 = 0x0\n\tIPV6_SOCKOPT_RESERVED1            = 0x3\n\tIPV6_TCLASS                       = 0x3d\n\tIPV6_UNICAST_HOPS                 = 0x4\n\tIPV6_USE_MIN_MTU                  = 0x2a\n\tIPV6_V6ONLY                       = 0x1b\n\tIPV6_VERSION                      = 0x60\n\tIPV6_VERSION_MASK                 = 0xf0\n\tIP_ADD_MEMBERSHIP                 = 0xc\n\tIP_AUTH_LEVEL                     = 0x14\n\tIP_DEFAULT_MULTICAST_LOOP         = 0x1\n\tIP_DEFAULT_MULTICAST_TTL          = 0x1\n\tIP_DF                             = 0x4000\n\tIP_DROP_MEMBERSHIP                = 0xd\n\tIP_ESP_NETWORK_LEVEL              = 0x16\n\tIP_ESP_TRANS_LEVEL                = 0x15\n\tIP_HDRINCL                        = 0x2\n\tIP_IPCOMP_LEVEL                   = 0x1d\n\tIP_IPDEFTTL                       = 0x25\n\tIP_IPSECFLOWINFO                  = 0x24\n\tIP_IPSEC_LOCAL_AUTH               = 0x1b\n\tIP_IPSEC_LOCAL_CRED               = 0x19\n\tIP_IPSEC_LOCAL_ID                 = 0x17\n\tIP_IPSEC_REMOTE_AUTH              = 0x1c\n\tIP_IPSEC_REMOTE_CRED              = 0x1a\n\tIP_IPSEC_REMOTE_ID                = 0x18\n\tIP_MAXPACKET                      = 0xffff\n\tIP_MAX_MEMBERSHIPS                = 0xfff\n\tIP_MF                             = 0x2000\n\tIP_MINTTL                         = 0x20\n\tIP_MIN_MEMBERSHIPS                = 0xf\n\tIP_MSS                            = 0x240\n\tIP_MULTICAST_IF                   = 0x9\n\tIP_MULTICAST_LOOP                 = 0xb\n\tIP_MULTICAST_TTL                  = 0xa\n\tIP_OFFMASK                        = 0x1fff\n\tIP_OPTIONS                        = 0x1\n\tIP_PIPEX                          = 0x22\n\tIP_PORTRANGE                      = 0x13\n\tIP_PORTRANGE_DEFAULT              = 0x0\n\tIP_PORTRANGE_HIGH                 = 0x1\n\tIP_PORTRANGE_LOW                  = 0x2\n\tIP_RECVDSTADDR                    = 0x7\n\tIP_RECVDSTPORT                    = 0x21\n\tIP_RECVIF                         = 0x1e\n\tIP_RECVOPTS                       = 0x5\n\tIP_RECVRETOPTS                    = 0x6\n\tIP_RECVRTABLE                     = 0x23\n\tIP_RECVTTL                        = 0x1f\n\tIP_RETOPTS                        = 0x8\n\tIP_RF                             = 0x8000\n\tIP_RTABLE                         = 0x1021\n\tIP_SENDSRCADDR                    = 0x7\n\tIP_TOS                            = 0x3\n\tIP_TTL                            = 0x4\n\tISIG                              = 0x80\n\tISTRIP                            = 0x20\n\tITIMER_PROF                       = 0x2\n\tITIMER_REAL                       = 0x0\n\tITIMER_VIRTUAL                    = 0x1\n\tIUCLC                             = 0x1000\n\tIXANY                             = 0x800\n\tIXOFF                             = 0x400\n\tIXON                              = 0x200\n\tKERN_HOSTNAME                     = 0xa\n\tKERN_OSRELEASE                    = 0x2\n\tKERN_OSTYPE                       = 0x1\n\tKERN_VERSION                      = 0x4\n\tLCNT_OVERLOAD_FLUSH               = 0x6\n\tLOCK_EX                           = 0x2\n\tLOCK_NB                           = 0x4\n\tLOCK_SH                           = 0x1\n\tLOCK_UN                           = 0x8\n\tMADV_DONTNEED                     = 0x4\n\tMADV_FREE                         = 0x6\n\tMADV_NORMAL                       = 0x0\n\tMADV_RANDOM                       = 0x1\n\tMADV_SEQUENTIAL                   = 0x2\n\tMADV_SPACEAVAIL                   = 0x5\n\tMADV_WILLNEED                     = 0x3\n\tMAP_ANON                          = 0x1000\n\tMAP_ANONYMOUS                     = 0x1000\n\tMAP_CONCEAL                       = 0x8000\n\tMAP_COPY                          = 0x2\n\tMAP_FILE                          = 0x0\n\tMAP_FIXED                         = 0x10\n\tMAP_FLAGMASK                      = 0xfff7\n\tMAP_HASSEMAPHORE                  = 0x0\n\tMAP_INHERIT                       = 0x0\n\tMAP_INHERIT_COPY                  = 0x1\n\tMAP_INHERIT_NONE                  = 0x2\n\tMAP_INHERIT_SHARE                 = 0x0\n\tMAP_INHERIT_ZERO                  = 0x3\n\tMAP_NOEXTEND                      = 0x0\n\tMAP_NORESERVE                     = 0x0\n\tMAP_PRIVATE                       = 0x2\n\tMAP_RENAME                        = 0x0\n\tMAP_SHARED                        = 0x1\n\tMAP_STACK                         = 0x4000\n\tMAP_TRYFIXED                      = 0x0\n\tMCL_CURRENT                       = 0x1\n\tMCL_FUTURE                        = 0x2\n\tMNT_ASYNC                         = 0x40\n\tMNT_DEFEXPORTED                   = 0x200\n\tMNT_DELEXPORT                     = 0x20000\n\tMNT_DOOMED                        = 0x8000000\n\tMNT_EXPORTANON                    = 0x400\n\tMNT_EXPORTED                      = 0x100\n\tMNT_EXRDONLY                      = 0x80\n\tMNT_FORCE                         = 0x80000\n\tMNT_LAZY                          = 0x3\n\tMNT_LOCAL                         = 0x1000\n\tMNT_NOATIME                       = 0x8000\n\tMNT_NODEV                         = 0x10\n\tMNT_NOEXEC                        = 0x4\n\tMNT_NOPERM                        = 0x20\n\tMNT_NOSUID                        = 0x8\n\tMNT_NOWAIT                        = 0x2\n\tMNT_QUOTA                         = 0x2000\n\tMNT_RDONLY                        = 0x1\n\tMNT_RELOAD                        = 0x40000\n\tMNT_ROOTFS                        = 0x4000\n\tMNT_SOFTDEP                       = 0x4000000\n\tMNT_STALLED                       = 0x100000\n\tMNT_SWAPPABLE                     = 0x200000\n\tMNT_SYNCHRONOUS                   = 0x2\n\tMNT_UPDATE                        = 0x10000\n\tMNT_VISFLAGMASK                   = 0x400ffff\n\tMNT_WAIT                          = 0x1\n\tMNT_WANTRDWR                      = 0x2000000\n\tMNT_WXALLOWED                     = 0x800\n\tMOUNT_AFS                         = \"afs\"\n\tMOUNT_CD9660                      = \"cd9660\"\n\tMOUNT_EXT2FS                      = \"ext2fs\"\n\tMOUNT_FFS                         = \"ffs\"\n\tMOUNT_FUSEFS                      = \"fuse\"\n\tMOUNT_MFS                         = \"mfs\"\n\tMOUNT_MSDOS                       = \"msdos\"\n\tMOUNT_NCPFS                       = \"ncpfs\"\n\tMOUNT_NFS                         = \"nfs\"\n\tMOUNT_NTFS                        = \"ntfs\"\n\tMOUNT_TMPFS                       = \"tmpfs\"\n\tMOUNT_UDF                         = \"udf\"\n\tMOUNT_UFS                         = \"ffs\"\n\tMSG_BCAST                         = 0x100\n\tMSG_CMSG_CLOEXEC                  = 0x800\n\tMSG_CTRUNC                        = 0x20\n\tMSG_DONTROUTE                     = 0x4\n\tMSG_DONTWAIT                      = 0x80\n\tMSG_EOR                           = 0x8\n\tMSG_MCAST                         = 0x200\n\tMSG_NOSIGNAL                      = 0x400\n\tMSG_OOB                           = 0x1\n\tMSG_PEEK                          = 0x2\n\tMSG_TRUNC                         = 0x10\n\tMSG_WAITALL                       = 0x40\n\tMS_ASYNC                          = 0x1\n\tMS_INVALIDATE                     = 0x4\n\tMS_SYNC                           = 0x2\n\tNAME_MAX                          = 0xff\n\tNET_RT_DUMP                       = 0x1\n\tNET_RT_FLAGS                      = 0x2\n\tNET_RT_IFLIST                     = 0x3\n\tNET_RT_IFNAMES                    = 0x6\n\tNET_RT_MAXID                      = 0x8\n\tNET_RT_SOURCE                     = 0x7\n\tNET_RT_STATS                      = 0x4\n\tNET_RT_TABLE                      = 0x5\n\tNFDBITS                           = 0x20\n\tNOFLSH                            = 0x80000000\n\tNOKERNINFO                        = 0x2000000\n\tNOTE_ATTRIB                       = 0x8\n\tNOTE_CHANGE                       = 0x1\n\tNOTE_CHILD                        = 0x4\n\tNOTE_DELETE                       = 0x1\n\tNOTE_EOF                          = 0x2\n\tNOTE_EXEC                         = 0x20000000\n\tNOTE_EXIT                         = 0x80000000\n\tNOTE_EXTEND                       = 0x4\n\tNOTE_FORK                         = 0x40000000\n\tNOTE_LINK                         = 0x10\n\tNOTE_LOWAT                        = 0x1\n\tNOTE_OOB                          = 0x4\n\tNOTE_PCTRLMASK                    = 0xf0000000\n\tNOTE_PDATAMASK                    = 0xfffff\n\tNOTE_RENAME                       = 0x20\n\tNOTE_REVOKE                       = 0x40\n\tNOTE_TRACK                        = 0x1\n\tNOTE_TRACKERR                     = 0x2\n\tNOTE_TRUNCATE                     = 0x80\n\tNOTE_WRITE                        = 0x2\n\tOCRNL                             = 0x10\n\tOLCUC                             = 0x20\n\tONLCR                             = 0x2\n\tONLRET                            = 0x80\n\tONOCR                             = 0x40\n\tONOEOT                            = 0x8\n\tOPOST                             = 0x1\n\tOXTABS                            = 0x4\n\tO_ACCMODE                         = 0x3\n\tO_APPEND                          = 0x8\n\tO_ASYNC                           = 0x40\n\tO_CLOEXEC                         = 0x10000\n\tO_CREAT                           = 0x200\n\tO_DIRECTORY                       = 0x20000\n\tO_DSYNC                           = 0x80\n\tO_EXCL                            = 0x800\n\tO_EXLOCK                          = 0x20\n\tO_FSYNC                           = 0x80\n\tO_NDELAY                          = 0x4\n\tO_NOCTTY                          = 0x8000\n\tO_NOFOLLOW                        = 0x100\n\tO_NONBLOCK                        = 0x4\n\tO_RDONLY                          = 0x0\n\tO_RDWR                            = 0x2\n\tO_RSYNC                           = 0x80\n\tO_SHLOCK                          = 0x10\n\tO_SYNC                            = 0x80\n\tO_TRUNC                           = 0x400\n\tO_WRONLY                          = 0x1\n\tPARENB                            = 0x1000\n\tPARMRK                            = 0x8\n\tPARODD                            = 0x2000\n\tPENDIN                            = 0x20000000\n\tPF_FLUSH                          = 0x1\n\tPRIO_PGRP                         = 0x1\n\tPRIO_PROCESS                      = 0x0\n\tPRIO_USER                         = 0x2\n\tPROT_EXEC                         = 0x4\n\tPROT_NONE                         = 0x0\n\tPROT_READ                         = 0x1\n\tPROT_WRITE                        = 0x2\n\tRLIMIT_CORE                       = 0x4\n\tRLIMIT_CPU                        = 0x0\n\tRLIMIT_DATA                       = 0x2\n\tRLIMIT_FSIZE                      = 0x1\n\tRLIMIT_MEMLOCK                    = 0x6\n\tRLIMIT_NOFILE                     = 0x8\n\tRLIMIT_NPROC                      = 0x7\n\tRLIMIT_RSS                        = 0x5\n\tRLIMIT_STACK                      = 0x3\n\tRLIM_INFINITY                     = 0x7fffffffffffffff\n\tRTAX_AUTHOR                       = 0x6\n\tRTAX_BFD                          = 0xb\n\tRTAX_BRD                          = 0x7\n\tRTAX_DNS                          = 0xc\n\tRTAX_DST                          = 0x0\n\tRTAX_GATEWAY                      = 0x1\n\tRTAX_GENMASK                      = 0x3\n\tRTAX_IFA                          = 0x5\n\tRTAX_IFP                          = 0x4\n\tRTAX_LABEL                        = 0xa\n\tRTAX_MAX                          = 0xf\n\tRTAX_NETMASK                      = 0x2\n\tRTAX_SEARCH                       = 0xe\n\tRTAX_SRC                          = 0x8\n\tRTAX_SRCMASK                      = 0x9\n\tRTAX_STATIC                       = 0xd\n\tRTA_AUTHOR                        = 0x40\n\tRTA_BFD                           = 0x800\n\tRTA_BRD                           = 0x80\n\tRTA_DNS                           = 0x1000\n\tRTA_DST                           = 0x1\n\tRTA_GATEWAY                       = 0x2\n\tRTA_GENMASK                       = 0x8\n\tRTA_IFA                           = 0x20\n\tRTA_IFP                           = 0x10\n\tRTA_LABEL                         = 0x400\n\tRTA_NETMASK                       = 0x4\n\tRTA_SEARCH                        = 0x4000\n\tRTA_SRC                           = 0x100\n\tRTA_SRCMASK                       = 0x200\n\tRTA_STATIC                        = 0x2000\n\tRTF_ANNOUNCE                      = 0x4000\n\tRTF_BFD                           = 0x1000000\n\tRTF_BLACKHOLE                     = 0x1000\n\tRTF_BROADCAST                     = 0x400000\n\tRTF_CACHED                        = 0x20000\n\tRTF_CLONED                        = 0x10000\n\tRTF_CLONING                       = 0x100\n\tRTF_CONNECTED                     = 0x800000\n\tRTF_DONE                          = 0x40\n\tRTF_DYNAMIC                       = 0x10\n\tRTF_FMASK                         = 0x110fc08\n\tRTF_GATEWAY                       = 0x2\n\tRTF_HOST                          = 0x4\n\tRTF_LLINFO                        = 0x400\n\tRTF_LOCAL                         = 0x200000\n\tRTF_MODIFIED                      = 0x20\n\tRTF_MPATH                         = 0x40000\n\tRTF_MPLS                          = 0x100000\n\tRTF_MULTICAST                     = 0x200\n\tRTF_PERMANENT_ARP                 = 0x2000\n\tRTF_PROTO1                        = 0x8000\n\tRTF_PROTO2                        = 0x4000\n\tRTF_PROTO3                        = 0x2000\n\tRTF_REJECT                        = 0x8\n\tRTF_STATIC                        = 0x800\n\tRTF_UP                            = 0x1\n\tRTF_USETRAILERS                   = 0x8000\n\tRTM_80211INFO                     = 0x15\n\tRTM_ADD                           = 0x1\n\tRTM_BFD                           = 0x12\n\tRTM_CHANGE                        = 0x3\n\tRTM_CHGADDRATTR                   = 0x14\n\tRTM_DELADDR                       = 0xd\n\tRTM_DELETE                        = 0x2\n\tRTM_DESYNC                        = 0x10\n\tRTM_GET                           = 0x4\n\tRTM_IFANNOUNCE                    = 0xf\n\tRTM_IFINFO                        = 0xe\n\tRTM_INVALIDATE                    = 0x11\n\tRTM_LOSING                        = 0x5\n\tRTM_MAXSIZE                       = 0x800\n\tRTM_MISS                          = 0x7\n\tRTM_NEWADDR                       = 0xc\n\tRTM_PROPOSAL                      = 0x13\n\tRTM_REDIRECT                      = 0x6\n\tRTM_RESOLVE                       = 0xb\n\tRTM_SOURCE                        = 0x16\n\tRTM_VERSION                       = 0x5\n\tRTV_EXPIRE                        = 0x4\n\tRTV_HOPCOUNT                      = 0x2\n\tRTV_MTU                           = 0x1\n\tRTV_RPIPE                         = 0x8\n\tRTV_RTT                           = 0x40\n\tRTV_RTTVAR                        = 0x80\n\tRTV_SPIPE                         = 0x10\n\tRTV_SSTHRESH                      = 0x20\n\tRT_TABLEID_BITS                   = 0x8\n\tRT_TABLEID_MASK                   = 0xff\n\tRT_TABLEID_MAX                    = 0xff\n\tRUSAGE_CHILDREN                   = -0x1\n\tRUSAGE_SELF                       = 0x0\n\tRUSAGE_THREAD                     = 0x1\n\tSCM_RIGHTS                        = 0x1\n\tSCM_TIMESTAMP                     = 0x4\n\tSEEK_CUR                          = 0x1\n\tSEEK_END                          = 0x2\n\tSEEK_SET                          = 0x0\n\tSHUT_RD                           = 0x0\n\tSHUT_RDWR                         = 0x2\n\tSHUT_WR                           = 0x1\n\tSIOCADDMULTI                      = 0x80206931\n\tSIOCAIFADDR                       = 0x8040691a\n\tSIOCAIFGROUP                      = 0x80286987\n\tSIOCATMARK                        = 0x40047307\n\tSIOCBRDGADD                       = 0x8060693c\n\tSIOCBRDGADDL                      = 0x80606949\n\tSIOCBRDGADDS                      = 0x80606941\n\tSIOCBRDGARL                       = 0x808c694d\n\tSIOCBRDGDADDR                     = 0x81286947\n\tSIOCBRDGDEL                       = 0x8060693d\n\tSIOCBRDGDELS                      = 0x80606942\n\tSIOCBRDGFLUSH                     = 0x80606948\n\tSIOCBRDGFRL                       = 0x808c694e\n\tSIOCBRDGGCACHE                    = 0xc0146941\n\tSIOCBRDGGFD                       = 0xc0146952\n\tSIOCBRDGGHT                       = 0xc0146951\n\tSIOCBRDGGIFFLGS                   = 0xc060693e\n\tSIOCBRDGGMA                       = 0xc0146953\n\tSIOCBRDGGPARAM                    = 0xc0406958\n\tSIOCBRDGGPRI                      = 0xc0146950\n\tSIOCBRDGGRL                       = 0xc030694f\n\tSIOCBRDGGTO                       = 0xc0146946\n\tSIOCBRDGIFS                       = 0xc0606942\n\tSIOCBRDGRTS                       = 0xc0206943\n\tSIOCBRDGSADDR                     = 0xc1286944\n\tSIOCBRDGSCACHE                    = 0x80146940\n\tSIOCBRDGSFD                       = 0x80146952\n\tSIOCBRDGSHT                       = 0x80146951\n\tSIOCBRDGSIFCOST                   = 0x80606955\n\tSIOCBRDGSIFFLGS                   = 0x8060693f\n\tSIOCBRDGSIFPRIO                   = 0x80606954\n\tSIOCBRDGSIFPROT                   = 0x8060694a\n\tSIOCBRDGSMA                       = 0x80146953\n\tSIOCBRDGSPRI                      = 0x80146950\n\tSIOCBRDGSPROTO                    = 0x8014695a\n\tSIOCBRDGSTO                       = 0x80146945\n\tSIOCBRDGSTXHC                     = 0x80146959\n\tSIOCDELLABEL                      = 0x80206997\n\tSIOCDELMULTI                      = 0x80206932\n\tSIOCDIFADDR                       = 0x80206919\n\tSIOCDIFGROUP                      = 0x80286989\n\tSIOCDIFPARENT                     = 0x802069b4\n\tSIOCDIFPHYADDR                    = 0x80206949\n\tSIOCDPWE3NEIGHBOR                 = 0x802069de\n\tSIOCDVNETID                       = 0x802069af\n\tSIOCGETKALIVE                     = 0xc01869a4\n\tSIOCGETLABEL                      = 0x8020699a\n\tSIOCGETMPWCFG                     = 0xc02069ae\n\tSIOCGETPFLOW                      = 0xc02069fe\n\tSIOCGETPFSYNC                     = 0xc02069f8\n\tSIOCGETSGCNT                      = 0xc0207534\n\tSIOCGETVIFCNT                     = 0xc0287533\n\tSIOCGETVLAN                       = 0xc0206990\n\tSIOCGIFADDR                       = 0xc0206921\n\tSIOCGIFBRDADDR                    = 0xc0206923\n\tSIOCGIFCONF                       = 0xc0106924\n\tSIOCGIFDATA                       = 0xc020691b\n\tSIOCGIFDESCR                      = 0xc0206981\n\tSIOCGIFDSTADDR                    = 0xc0206922\n\tSIOCGIFFLAGS                      = 0xc0206911\n\tSIOCGIFGATTR                      = 0xc028698b\n\tSIOCGIFGENERIC                    = 0xc020693a\n\tSIOCGIFGLIST                      = 0xc028698d\n\tSIOCGIFGMEMB                      = 0xc028698a\n\tSIOCGIFGROUP                      = 0xc0286988\n\tSIOCGIFHARDMTU                    = 0xc02069a5\n\tSIOCGIFLLPRIO                     = 0xc02069b6\n\tSIOCGIFMEDIA                      = 0xc0406938\n\tSIOCGIFMETRIC                     = 0xc0206917\n\tSIOCGIFMTU                        = 0xc020697e\n\tSIOCGIFNETMASK                    = 0xc0206925\n\tSIOCGIFPAIR                       = 0xc02069b1\n\tSIOCGIFPARENT                     = 0xc02069b3\n\tSIOCGIFPRIORITY                   = 0xc020699c\n\tSIOCGIFRDOMAIN                    = 0xc02069a0\n\tSIOCGIFRTLABEL                    = 0xc0206983\n\tSIOCGIFRXR                        = 0x802069aa\n\tSIOCGIFSFFPAGE                    = 0xc1126939\n\tSIOCGIFXFLAGS                     = 0xc020699e\n\tSIOCGLIFPHYADDR                   = 0xc218694b\n\tSIOCGLIFPHYDF                     = 0xc02069c2\n\tSIOCGLIFPHYECN                    = 0xc02069c8\n\tSIOCGLIFPHYRTABLE                 = 0xc02069a2\n\tSIOCGLIFPHYTTL                    = 0xc02069a9\n\tSIOCGPGRP                         = 0x40047309\n\tSIOCGPWE3                         = 0xc0206998\n\tSIOCGPWE3CTRLWORD                 = 0xc02069dc\n\tSIOCGPWE3FAT                      = 0xc02069dd\n\tSIOCGPWE3NEIGHBOR                 = 0xc21869de\n\tSIOCGRXHPRIO                      = 0xc02069db\n\tSIOCGSPPPPARAMS                   = 0xc0206994\n\tSIOCGTXHPRIO                      = 0xc02069c6\n\tSIOCGUMBINFO                      = 0xc02069be\n\tSIOCGUMBPARAM                     = 0xc02069c0\n\tSIOCGVH                           = 0xc02069f6\n\tSIOCGVNETFLOWID                   = 0xc02069c4\n\tSIOCGVNETID                       = 0xc02069a7\n\tSIOCIFAFATTACH                    = 0x801169ab\n\tSIOCIFAFDETACH                    = 0x801169ac\n\tSIOCIFCREATE                      = 0x8020697a\n\tSIOCIFDESTROY                     = 0x80206979\n\tSIOCIFGCLONERS                    = 0xc0106978\n\tSIOCSETKALIVE                     = 0x801869a3\n\tSIOCSETLABEL                      = 0x80206999\n\tSIOCSETMPWCFG                     = 0x802069ad\n\tSIOCSETPFLOW                      = 0x802069fd\n\tSIOCSETPFSYNC                     = 0x802069f7\n\tSIOCSETVLAN                       = 0x8020698f\n\tSIOCSIFADDR                       = 0x8020690c\n\tSIOCSIFBRDADDR                    = 0x80206913\n\tSIOCSIFDESCR                      = 0x80206980\n\tSIOCSIFDSTADDR                    = 0x8020690e\n\tSIOCSIFFLAGS                      = 0x80206910\n\tSIOCSIFGATTR                      = 0x8028698c\n\tSIOCSIFGENERIC                    = 0x80206939\n\tSIOCSIFLLADDR                     = 0x8020691f\n\tSIOCSIFLLPRIO                     = 0x802069b5\n\tSIOCSIFMEDIA                      = 0xc0206937\n\tSIOCSIFMETRIC                     = 0x80206918\n\tSIOCSIFMTU                        = 0x8020697f\n\tSIOCSIFNETMASK                    = 0x80206916\n\tSIOCSIFPAIR                       = 0x802069b0\n\tSIOCSIFPARENT                     = 0x802069b2\n\tSIOCSIFPRIORITY                   = 0x8020699b\n\tSIOCSIFRDOMAIN                    = 0x8020699f\n\tSIOCSIFRTLABEL                    = 0x80206982\n\tSIOCSIFXFLAGS                     = 0x8020699d\n\tSIOCSLIFPHYADDR                   = 0x8218694a\n\tSIOCSLIFPHYDF                     = 0x802069c1\n\tSIOCSLIFPHYECN                    = 0x802069c7\n\tSIOCSLIFPHYRTABLE                 = 0x802069a1\n\tSIOCSLIFPHYTTL                    = 0x802069a8\n\tSIOCSPGRP                         = 0x80047308\n\tSIOCSPWE3CTRLWORD                 = 0x802069dc\n\tSIOCSPWE3FAT                      = 0x802069dd\n\tSIOCSPWE3NEIGHBOR                 = 0x821869de\n\tSIOCSRXHPRIO                      = 0x802069db\n\tSIOCSSPPPPARAMS                   = 0x80206993\n\tSIOCSTXHPRIO                      = 0x802069c5\n\tSIOCSUMBPARAM                     = 0x802069bf\n\tSIOCSVH                           = 0xc02069f5\n\tSIOCSVNETFLOWID                   = 0x802069c3\n\tSIOCSVNETID                       = 0x802069a6\n\tSOCK_CLOEXEC                      = 0x8000\n\tSOCK_DGRAM                        = 0x2\n\tSOCK_DNS                          = 0x1000\n\tSOCK_NONBLOCK                     = 0x4000\n\tSOCK_RAW                          = 0x3\n\tSOCK_RDM                          = 0x4\n\tSOCK_SEQPACKET                    = 0x5\n\tSOCK_STREAM                       = 0x1\n\tSOL_SOCKET                        = 0xffff\n\tSOMAXCONN                         = 0x80\n\tSO_ACCEPTCONN                     = 0x2\n\tSO_BINDANY                        = 0x1000\n\tSO_BROADCAST                      = 0x20\n\tSO_DEBUG                          = 0x1\n\tSO_DOMAIN                         = 0x1024\n\tSO_DONTROUTE                      = 0x10\n\tSO_ERROR                          = 0x1007\n\tSO_KEEPALIVE                      = 0x8\n\tSO_LINGER                         = 0x80\n\tSO_NETPROC                        = 0x1020\n\tSO_OOBINLINE                      = 0x100\n\tSO_PEERCRED                       = 0x1022\n\tSO_PROTOCOL                       = 0x1025\n\tSO_RCVBUF                         = 0x1002\n\tSO_RCVLOWAT                       = 0x1004\n\tSO_RCVTIMEO                       = 0x1006\n\tSO_REUSEADDR                      = 0x4\n\tSO_REUSEPORT                      = 0x200\n\tSO_RTABLE                         = 0x1021\n\tSO_SNDBUF                         = 0x1001\n\tSO_SNDLOWAT                       = 0x1003\n\tSO_SNDTIMEO                       = 0x1005\n\tSO_SPLICE                         = 0x1023\n\tSO_TIMESTAMP                      = 0x800\n\tSO_TYPE                           = 0x1008\n\tSO_USELOOPBACK                    = 0x40\n\tSO_ZEROIZE                        = 0x2000\n\tS_BLKSIZE                         = 0x200\n\tS_IEXEC                           = 0x40\n\tS_IFBLK                           = 0x6000\n\tS_IFCHR                           = 0x2000\n\tS_IFDIR                           = 0x4000\n\tS_IFIFO                           = 0x1000\n\tS_IFLNK                           = 0xa000\n\tS_IFMT                            = 0xf000\n\tS_IFREG                           = 0x8000\n\tS_IFSOCK                          = 0xc000\n\tS_IREAD                           = 0x100\n\tS_IRGRP                           = 0x20\n\tS_IROTH                           = 0x4\n\tS_IRUSR                           = 0x100\n\tS_IRWXG                           = 0x38\n\tS_IRWXO                           = 0x7\n\tS_IRWXU                           = 0x1c0\n\tS_ISGID                           = 0x400\n\tS_ISTXT                           = 0x200\n\tS_ISUID                           = 0x800\n\tS_ISVTX                           = 0x200\n\tS_IWGRP                           = 0x10\n\tS_IWOTH                           = 0x2\n\tS_IWRITE                          = 0x80\n\tS_IWUSR                           = 0x80\n\tS_IXGRP                           = 0x8\n\tS_IXOTH                           = 0x1\n\tS_IXUSR                           = 0x40\n\tTCIFLUSH                          = 0x1\n\tTCIOFF                            = 0x3\n\tTCIOFLUSH                         = 0x3\n\tTCION                             = 0x4\n\tTCOFLUSH                          = 0x2\n\tTCOOFF                            = 0x1\n\tTCOON                             = 0x2\n\tTCPOPT_EOL                        = 0x0\n\tTCPOPT_MAXSEG                     = 0x2\n\tTCPOPT_NOP                        = 0x1\n\tTCPOPT_SACK                       = 0x5\n\tTCPOPT_SACK_HDR                   = 0x1010500\n\tTCPOPT_SACK_PERMITTED             = 0x4\n\tTCPOPT_SACK_PERMIT_HDR            = 0x1010402\n\tTCPOPT_SIGNATURE                  = 0x13\n\tTCPOPT_TIMESTAMP                  = 0x8\n\tTCPOPT_TSTAMP_HDR                 = 0x101080a\n\tTCPOPT_WINDOW                     = 0x3\n\tTCP_INFO                          = 0x9\n\tTCP_MAXSEG                        = 0x2\n\tTCP_MAXWIN                        = 0xffff\n\tTCP_MAX_SACK                      = 0x3\n\tTCP_MAX_WINSHIFT                  = 0xe\n\tTCP_MD5SIG                        = 0x4\n\tTCP_MSS                           = 0x200\n\tTCP_NODELAY                       = 0x1\n\tTCP_NOPUSH                        = 0x10\n\tTCP_SACKHOLE_LIMIT                = 0x80\n\tTCP_SACK_ENABLE                   = 0x8\n\tTCSAFLUSH                         = 0x2\n\tTIMER_ABSTIME                     = 0x1\n\tTIMER_RELTIME                     = 0x0\n\tTIOCCBRK                          = 0x2000747a\n\tTIOCCDTR                          = 0x20007478\n\tTIOCCHKVERAUTH                    = 0x2000741e\n\tTIOCCLRVERAUTH                    = 0x2000741d\n\tTIOCCONS                          = 0x80047462\n\tTIOCDRAIN                         = 0x2000745e\n\tTIOCEXCL                          = 0x2000740d\n\tTIOCEXT                           = 0x80047460\n\tTIOCFLAG_CLOCAL                   = 0x2\n\tTIOCFLAG_CRTSCTS                  = 0x4\n\tTIOCFLAG_MDMBUF                   = 0x8\n\tTIOCFLAG_PPS                      = 0x10\n\tTIOCFLAG_SOFTCAR                  = 0x1\n\tTIOCFLUSH                         = 0x80047410\n\tTIOCGETA                          = 0x402c7413\n\tTIOCGETD                          = 0x4004741a\n\tTIOCGFLAGS                        = 0x4004745d\n\tTIOCGPGRP                         = 0x40047477\n\tTIOCGSID                          = 0x40047463\n\tTIOCGTSTAMP                       = 0x4010745b\n\tTIOCGWINSZ                        = 0x40087468\n\tTIOCMBIC                          = 0x8004746b\n\tTIOCMBIS                          = 0x8004746c\n\tTIOCMGET                          = 0x4004746a\n\tTIOCMODG                          = 0x4004746a\n\tTIOCMODS                          = 0x8004746d\n\tTIOCMSET                          = 0x8004746d\n\tTIOCM_CAR                         = 0x40\n\tTIOCM_CD                          = 0x40\n\tTIOCM_CTS                         = 0x20\n\tTIOCM_DSR                         = 0x100\n\tTIOCM_DTR                         = 0x2\n\tTIOCM_LE                          = 0x1\n\tTIOCM_RI                          = 0x80\n\tTIOCM_RNG                         = 0x80\n\tTIOCM_RTS                         = 0x4\n\tTIOCM_SR                          = 0x10\n\tTIOCM_ST                          = 0x8\n\tTIOCNOTTY                         = 0x20007471\n\tTIOCNXCL                          = 0x2000740e\n\tTIOCOUTQ                          = 0x40047473\n\tTIOCPKT                           = 0x80047470\n\tTIOCPKT_DATA                      = 0x0\n\tTIOCPKT_DOSTOP                    = 0x20\n\tTIOCPKT_FLUSHREAD                 = 0x1\n\tTIOCPKT_FLUSHWRITE                = 0x2\n\tTIOCPKT_IOCTL                     = 0x40\n\tTIOCPKT_NOSTOP                    = 0x10\n\tTIOCPKT_START                     = 0x8\n\tTIOCPKT_STOP                      = 0x4\n\tTIOCREMOTE                        = 0x80047469\n\tTIOCSBRK                          = 0x2000747b\n\tTIOCSCTTY                         = 0x20007461\n\tTIOCSDTR                          = 0x20007479\n\tTIOCSETA                          = 0x802c7414\n\tTIOCSETAF                         = 0x802c7416\n\tTIOCSETAW                         = 0x802c7415\n\tTIOCSETD                          = 0x8004741b\n\tTIOCSETVERAUTH                    = 0x8004741c\n\tTIOCSFLAGS                        = 0x8004745c\n\tTIOCSIG                           = 0x8004745f\n\tTIOCSPGRP                         = 0x80047476\n\tTIOCSTART                         = 0x2000746e\n\tTIOCSTAT                          = 0x20007465\n\tTIOCSTOP                          = 0x2000746f\n\tTIOCSTSTAMP                       = 0x8008745a\n\tTIOCSWINSZ                        = 0x80087467\n\tTIOCUCNTL                         = 0x80047466\n\tTIOCUCNTL_CBRK                    = 0x7a\n\tTIOCUCNTL_SBRK                    = 0x7b\n\tTOSTOP                            = 0x400000\n\tUTIME_NOW                         = -0x2\n\tUTIME_OMIT                        = -0x1\n\tVDISCARD                          = 0xf\n\tVDSUSP                            = 0xb\n\tVEOF                              = 0x0\n\tVEOL                              = 0x1\n\tVEOL2                             = 0x2\n\tVERASE                            = 0x3\n\tVINTR                             = 0x8\n\tVKILL                             = 0x5\n\tVLNEXT                            = 0xe\n\tVMIN                              = 0x10\n\tVM_ANONMIN                        = 0x7\n\tVM_LOADAVG                        = 0x2\n\tVM_MALLOC_CONF                    = 0xc\n\tVM_MAXID                          = 0xd\n\tVM_MAXSLP                         = 0xa\n\tVM_METER                          = 0x1\n\tVM_NKMEMPAGES                     = 0x6\n\tVM_PSSTRINGS                      = 0x3\n\tVM_SWAPENCRYPT                    = 0x5\n\tVM_USPACE                         = 0xb\n\tVM_UVMEXP                         = 0x4\n\tVM_VNODEMIN                       = 0x9\n\tVM_VTEXTMIN                       = 0x8\n\tVQUIT                             = 0x9\n\tVREPRINT                          = 0x6\n\tVSTART                            = 0xc\n\tVSTATUS                           = 0x12\n\tVSTOP                             = 0xd\n\tVSUSP                             = 0xa\n\tVTIME                             = 0x11\n\tVWERASE                           = 0x4\n\tWALTSIG                           = 0x4\n\tWCONTINUED                        = 0x8\n\tWCOREFLAG                         = 0x80\n\tWNOHANG                           = 0x1\n\tWUNTRACED                         = 0x2\n\tXCASE                             = 0x1000000\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x30)\n\tEADDRNOTAVAIL   = syscall.Errno(0x31)\n\tEAFNOSUPPORT    = syscall.Errno(0x2f)\n\tEAGAIN          = syscall.Errno(0x23)\n\tEALREADY        = syscall.Errno(0x25)\n\tEAUTH           = syscall.Errno(0x50)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADMSG         = syscall.Errno(0x5c)\n\tEBADRPC         = syscall.Errno(0x48)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x58)\n\tECHILD          = syscall.Errno(0xa)\n\tECONNABORTED    = syscall.Errno(0x35)\n\tECONNREFUSED    = syscall.Errno(0x3d)\n\tECONNRESET      = syscall.Errno(0x36)\n\tEDEADLK         = syscall.Errno(0xb)\n\tEDESTADDRREQ    = syscall.Errno(0x27)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x45)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEFTYPE          = syscall.Errno(0x4f)\n\tEHOSTDOWN       = syscall.Errno(0x40)\n\tEHOSTUNREACH    = syscall.Errno(0x41)\n\tEIDRM           = syscall.Errno(0x59)\n\tEILSEQ          = syscall.Errno(0x54)\n\tEINPROGRESS     = syscall.Errno(0x24)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEIPSEC          = syscall.Errno(0x52)\n\tEISCONN         = syscall.Errno(0x38)\n\tEISDIR          = syscall.Errno(0x15)\n\tELAST           = syscall.Errno(0x5f)\n\tELOOP           = syscall.Errno(0x3e)\n\tEMEDIUMTYPE     = syscall.Errno(0x56)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x28)\n\tENAMETOOLONG    = syscall.Errno(0x3f)\n\tENEEDAUTH       = syscall.Errno(0x51)\n\tENETDOWN        = syscall.Errno(0x32)\n\tENETRESET       = syscall.Errno(0x34)\n\tENETUNREACH     = syscall.Errno(0x33)\n\tENFILE          = syscall.Errno(0x17)\n\tENOATTR         = syscall.Errno(0x53)\n\tENOBUFS         = syscall.Errno(0x37)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x4d)\n\tENOMEDIUM       = syscall.Errno(0x55)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x5a)\n\tENOPROTOOPT     = syscall.Errno(0x2a)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSYS          = syscall.Errno(0x4e)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x39)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x42)\n\tENOTRECOVERABLE = syscall.Errno(0x5d)\n\tENOTSOCK        = syscall.Errno(0x26)\n\tENOTSUP         = syscall.Errno(0x5b)\n\tENOTTY          = syscall.Errno(0x19)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x2d)\n\tEOVERFLOW       = syscall.Errno(0x57)\n\tEOWNERDEAD      = syscall.Errno(0x5e)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x2e)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROCLIM        = syscall.Errno(0x43)\n\tEPROCUNAVAIL    = syscall.Errno(0x4c)\n\tEPROGMISMATCH   = syscall.Errno(0x4b)\n\tEPROGUNAVAIL    = syscall.Errno(0x4a)\n\tEPROTO          = syscall.Errno(0x5f)\n\tEPROTONOSUPPORT = syscall.Errno(0x2b)\n\tEPROTOTYPE      = syscall.Errno(0x29)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMOTE         = syscall.Errno(0x47)\n\tEROFS           = syscall.Errno(0x1e)\n\tERPCMISMATCH    = syscall.Errno(0x49)\n\tESHUTDOWN       = syscall.Errno(0x3a)\n\tESOCKTNOSUPPORT = syscall.Errno(0x2c)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESTALE          = syscall.Errno(0x46)\n\tETIMEDOUT       = syscall.Errno(0x3c)\n\tETOOMANYREFS    = syscall.Errno(0x3b)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUSERS          = syscall.Errno(0x44)\n\tEWOULDBLOCK     = syscall.Errno(0x23)\n\tEXDEV           = syscall.Errno(0x12)\n)\n\n// Signals\nconst (\n\tSIGABRT   = syscall.Signal(0x6)\n\tSIGALRM   = syscall.Signal(0xe)\n\tSIGBUS    = syscall.Signal(0xa)\n\tSIGCHLD   = syscall.Signal(0x14)\n\tSIGCONT   = syscall.Signal(0x13)\n\tSIGEMT    = syscall.Signal(0x7)\n\tSIGFPE    = syscall.Signal(0x8)\n\tSIGHUP    = syscall.Signal(0x1)\n\tSIGILL    = syscall.Signal(0x4)\n\tSIGINFO   = syscall.Signal(0x1d)\n\tSIGINT    = syscall.Signal(0x2)\n\tSIGIO     = syscall.Signal(0x17)\n\tSIGIOT    = syscall.Signal(0x6)\n\tSIGKILL   = syscall.Signal(0x9)\n\tSIGPIPE   = syscall.Signal(0xd)\n\tSIGPROF   = syscall.Signal(0x1b)\n\tSIGQUIT   = syscall.Signal(0x3)\n\tSIGSEGV   = syscall.Signal(0xb)\n\tSIGSTOP   = syscall.Signal(0x11)\n\tSIGSYS    = syscall.Signal(0xc)\n\tSIGTERM   = syscall.Signal(0xf)\n\tSIGTHR    = syscall.Signal(0x20)\n\tSIGTRAP   = syscall.Signal(0x5)\n\tSIGTSTP   = syscall.Signal(0x12)\n\tSIGTTIN   = syscall.Signal(0x15)\n\tSIGTTOU   = syscall.Signal(0x16)\n\tSIGURG    = syscall.Signal(0x10)\n\tSIGUSR1   = syscall.Signal(0x1e)\n\tSIGUSR2   = syscall.Signal(0x1f)\n\tSIGVTALRM = syscall.Signal(0x1a)\n\tSIGWINCH  = syscall.Signal(0x1c)\n\tSIGXCPU   = syscall.Signal(0x18)\n\tSIGXFSZ   = syscall.Signal(0x19)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"operation not permitted\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"input/output error\"},\n\t{6, \"ENXIO\", \"device not configured\"},\n\t{7, \"E2BIG\", \"argument list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file descriptor\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EDEADLK\", \"resource deadlock avoided\"},\n\t{12, \"ENOMEM\", \"cannot allocate memory\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"operation not supported by device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"too many open files in system\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"numerical argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{36, \"EINPROGRESS\", \"operation now in progress\"},\n\t{37, \"EALREADY\", \"operation already in progress\"},\n\t{38, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{39, \"EDESTADDRREQ\", \"destination address required\"},\n\t{40, \"EMSGSIZE\", \"message too long\"},\n\t{41, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{42, \"ENOPROTOOPT\", \"protocol not available\"},\n\t{43, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{44, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{45, \"EOPNOTSUPP\", \"operation not supported\"},\n\t{46, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{47, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{48, \"EADDRINUSE\", \"address already in use\"},\n\t{49, \"EADDRNOTAVAIL\", \"can't assign requested address\"},\n\t{50, \"ENETDOWN\", \"network is down\"},\n\t{51, \"ENETUNREACH\", \"network is unreachable\"},\n\t{52, \"ENETRESET\", \"network dropped connection on reset\"},\n\t{53, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{54, \"ECONNRESET\", \"connection reset by peer\"},\n\t{55, \"ENOBUFS\", \"no buffer space available\"},\n\t{56, \"EISCONN\", \"socket is already connected\"},\n\t{57, \"ENOTCONN\", \"socket is not connected\"},\n\t{58, \"ESHUTDOWN\", \"can't send after socket shutdown\"},\n\t{59, \"ETOOMANYREFS\", \"too many references: can't splice\"},\n\t{60, \"ETIMEDOUT\", \"operation timed out\"},\n\t{61, \"ECONNREFUSED\", \"connection refused\"},\n\t{62, \"ELOOP\", \"too many levels of symbolic links\"},\n\t{63, \"ENAMETOOLONG\", \"file name too long\"},\n\t{64, \"EHOSTDOWN\", \"host is down\"},\n\t{65, \"EHOSTUNREACH\", \"no route to host\"},\n\t{66, \"ENOTEMPTY\", \"directory not empty\"},\n\t{67, \"EPROCLIM\", \"too many processes\"},\n\t{68, \"EUSERS\", \"too many users\"},\n\t{69, \"EDQUOT\", \"disk quota exceeded\"},\n\t{70, \"ESTALE\", \"stale NFS file handle\"},\n\t{71, \"EREMOTE\", \"too many levels of remote in path\"},\n\t{72, \"EBADRPC\", \"RPC struct is bad\"},\n\t{73, \"ERPCMISMATCH\", \"RPC version wrong\"},\n\t{74, \"EPROGUNAVAIL\", \"RPC program not available\"},\n\t{75, \"EPROGMISMATCH\", \"program version wrong\"},\n\t{76, \"EPROCUNAVAIL\", \"bad procedure for program\"},\n\t{77, \"ENOLCK\", \"no locks available\"},\n\t{78, \"ENOSYS\", \"function not implemented\"},\n\t{79, \"EFTYPE\", \"inappropriate file type or format\"},\n\t{80, \"EAUTH\", \"authentication error\"},\n\t{81, \"ENEEDAUTH\", \"need authenticator\"},\n\t{82, \"EIPSEC\", \"IPsec processing failure\"},\n\t{83, \"ENOATTR\", \"attribute not found\"},\n\t{84, \"EILSEQ\", \"illegal byte sequence\"},\n\t{85, \"ENOMEDIUM\", \"no medium found\"},\n\t{86, \"EMEDIUMTYPE\", \"wrong medium type\"},\n\t{87, \"EOVERFLOW\", \"value too large to be stored in data type\"},\n\t{88, \"ECANCELED\", \"operation canceled\"},\n\t{89, \"EIDRM\", \"identifier removed\"},\n\t{90, \"ENOMSG\", \"no message of desired type\"},\n\t{91, \"ENOTSUP\", \"not supported\"},\n\t{92, \"EBADMSG\", \"bad message\"},\n\t{93, \"ENOTRECOVERABLE\", \"state not recoverable\"},\n\t{94, \"EOWNERDEAD\", \"previous owner died\"},\n\t{95, \"ELAST\", \"protocol error\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGTRAP\", \"trace/BPT trap\"},\n\t{6, \"SIGABRT\", \"abort trap\"},\n\t{7, \"SIGEMT\", \"EMT trap\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad system call\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGURG\", \"urgent I/O condition\"},\n\t{17, \"SIGSTOP\", \"suspended (signal)\"},\n\t{18, \"SIGTSTP\", \"suspended\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGXCPU\", \"cputime limit exceeded\"},\n\t{25, \"SIGXFSZ\", \"filesize limit exceeded\"},\n\t{26, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{27, \"SIGPROF\", \"profiling timer expired\"},\n\t{28, \"SIGWINCH\", \"window size changes\"},\n\t{29, \"SIGINFO\", \"information request\"},\n\t{30, \"SIGUSR1\", \"user defined signal 1\"},\n\t{31, \"SIGUSR2\", \"user defined signal 2\"},\n\t{32, \"SIGTHR\", \"thread AST\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go",
    "content": "// mkerrors.sh -m64\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && solaris\n\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs -- -m64 _const.go\n\npackage unix\n\nimport \"syscall\"\n\nconst (\n\tAF_802                        = 0x12\n\tAF_APPLETALK                  = 0x10\n\tAF_CCITT                      = 0xa\n\tAF_CHAOS                      = 0x5\n\tAF_DATAKIT                    = 0x9\n\tAF_DECnet                     = 0xc\n\tAF_DLI                        = 0xd\n\tAF_ECMA                       = 0x8\n\tAF_FILE                       = 0x1\n\tAF_GOSIP                      = 0x16\n\tAF_HYLINK                     = 0xf\n\tAF_IMPLINK                    = 0x3\n\tAF_INET                       = 0x2\n\tAF_INET6                      = 0x1a\n\tAF_INET_OFFLOAD               = 0x1e\n\tAF_IPX                        = 0x17\n\tAF_KEY                        = 0x1b\n\tAF_LAT                        = 0xe\n\tAF_LINK                       = 0x19\n\tAF_LOCAL                      = 0x1\n\tAF_MAX                        = 0x20\n\tAF_NBS                        = 0x7\n\tAF_NCA                        = 0x1c\n\tAF_NIT                        = 0x11\n\tAF_NS                         = 0x6\n\tAF_OSI                        = 0x13\n\tAF_OSINET                     = 0x15\n\tAF_PACKET                     = 0x20\n\tAF_POLICY                     = 0x1d\n\tAF_PUP                        = 0x4\n\tAF_ROUTE                      = 0x18\n\tAF_SNA                        = 0xb\n\tAF_TRILL                      = 0x1f\n\tAF_UNIX                       = 0x1\n\tAF_UNSPEC                     = 0x0\n\tAF_X25                        = 0x14\n\tARPHRD_ARCNET                 = 0x7\n\tARPHRD_ATM                    = 0x10\n\tARPHRD_AX25                   = 0x3\n\tARPHRD_CHAOS                  = 0x5\n\tARPHRD_EETHER                 = 0x2\n\tARPHRD_ETHER                  = 0x1\n\tARPHRD_FC                     = 0x12\n\tARPHRD_FRAME                  = 0xf\n\tARPHRD_HDLC                   = 0x11\n\tARPHRD_IB                     = 0x20\n\tARPHRD_IEEE802                = 0x6\n\tARPHRD_IPATM                  = 0x13\n\tARPHRD_METRICOM               = 0x17\n\tARPHRD_TUNNEL                 = 0x1f\n\tB0                            = 0x0\n\tB110                          = 0x3\n\tB115200                       = 0x12\n\tB1200                         = 0x9\n\tB134                          = 0x4\n\tB150                          = 0x5\n\tB153600                       = 0x13\n\tB1800                         = 0xa\n\tB19200                        = 0xe\n\tB200                          = 0x6\n\tB230400                       = 0x14\n\tB2400                         = 0xb\n\tB300                          = 0x7\n\tB307200                       = 0x15\n\tB38400                        = 0xf\n\tB460800                       = 0x16\n\tB4800                         = 0xc\n\tB50                           = 0x1\n\tB57600                        = 0x10\n\tB600                          = 0x8\n\tB75                           = 0x2\n\tB76800                        = 0x11\n\tB921600                       = 0x17\n\tB9600                         = 0xd\n\tBIOCFLUSH                     = 0x20004268\n\tBIOCGBLEN                     = 0x40044266\n\tBIOCGDLT                      = 0x4004426a\n\tBIOCGDLTLIST                  = -0x3fefbd89\n\tBIOCGDLTLIST32                = -0x3ff7bd89\n\tBIOCGETIF                     = 0x4020426b\n\tBIOCGETLIF                    = 0x4078426b\n\tBIOCGHDRCMPLT                 = 0x40044274\n\tBIOCGRTIMEOUT                 = 0x4010427b\n\tBIOCGRTIMEOUT32               = 0x4008427b\n\tBIOCGSEESENT                  = 0x40044278\n\tBIOCGSTATS                    = 0x4080426f\n\tBIOCGSTATSOLD                 = 0x4008426f\n\tBIOCIMMEDIATE                 = -0x7ffbbd90\n\tBIOCPROMISC                   = 0x20004269\n\tBIOCSBLEN                     = -0x3ffbbd9a\n\tBIOCSDLT                      = -0x7ffbbd8a\n\tBIOCSETF                      = -0x7fefbd99\n\tBIOCSETF32                    = -0x7ff7bd99\n\tBIOCSETIF                     = -0x7fdfbd94\n\tBIOCSETLIF                    = -0x7f87bd94\n\tBIOCSHDRCMPLT                 = -0x7ffbbd8b\n\tBIOCSRTIMEOUT                 = -0x7fefbd86\n\tBIOCSRTIMEOUT32               = -0x7ff7bd86\n\tBIOCSSEESENT                  = -0x7ffbbd87\n\tBIOCSTCPF                     = -0x7fefbd8e\n\tBIOCSUDPF                     = -0x7fefbd8d\n\tBIOCVERSION                   = 0x40044271\n\tBPF_A                         = 0x10\n\tBPF_ABS                       = 0x20\n\tBPF_ADD                       = 0x0\n\tBPF_ALIGNMENT                 = 0x4\n\tBPF_ALU                       = 0x4\n\tBPF_AND                       = 0x50\n\tBPF_B                         = 0x10\n\tBPF_DFLTBUFSIZE               = 0x100000\n\tBPF_DIV                       = 0x30\n\tBPF_H                         = 0x8\n\tBPF_IMM                       = 0x0\n\tBPF_IND                       = 0x40\n\tBPF_JA                        = 0x0\n\tBPF_JEQ                       = 0x10\n\tBPF_JGE                       = 0x30\n\tBPF_JGT                       = 0x20\n\tBPF_JMP                       = 0x5\n\tBPF_JSET                      = 0x40\n\tBPF_K                         = 0x0\n\tBPF_LD                        = 0x0\n\tBPF_LDX                       = 0x1\n\tBPF_LEN                       = 0x80\n\tBPF_LSH                       = 0x60\n\tBPF_MAJOR_VERSION             = 0x1\n\tBPF_MAXBUFSIZE                = 0x1000000\n\tBPF_MAXINSNS                  = 0x200\n\tBPF_MEM                       = 0x60\n\tBPF_MEMWORDS                  = 0x10\n\tBPF_MINBUFSIZE                = 0x20\n\tBPF_MINOR_VERSION             = 0x1\n\tBPF_MISC                      = 0x7\n\tBPF_MSH                       = 0xa0\n\tBPF_MUL                       = 0x20\n\tBPF_NEG                       = 0x80\n\tBPF_OR                        = 0x40\n\tBPF_RELEASE                   = 0x30bb6\n\tBPF_RET                       = 0x6\n\tBPF_RSH                       = 0x70\n\tBPF_ST                        = 0x2\n\tBPF_STX                       = 0x3\n\tBPF_SUB                       = 0x10\n\tBPF_TAX                       = 0x0\n\tBPF_TXA                       = 0x80\n\tBPF_W                         = 0x0\n\tBPF_X                         = 0x8\n\tBRKINT                        = 0x2\n\tBS0                           = 0x0\n\tBS1                           = 0x2000\n\tBSDLY                         = 0x2000\n\tCBAUD                         = 0xf\n\tCFLUSH                        = 0xf\n\tCIBAUD                        = 0xf0000\n\tCLOCAL                        = 0x800\n\tCLOCK_HIGHRES                 = 0x4\n\tCLOCK_LEVEL                   = 0xa\n\tCLOCK_MONOTONIC               = 0x4\n\tCLOCK_PROCESS_CPUTIME_ID      = 0x5\n\tCLOCK_PROF                    = 0x2\n\tCLOCK_REALTIME                = 0x3\n\tCLOCK_THREAD_CPUTIME_ID       = 0x2\n\tCLOCK_VIRTUAL                 = 0x1\n\tCR0                           = 0x0\n\tCR1                           = 0x200\n\tCR2                           = 0x400\n\tCR3                           = 0x600\n\tCRDLY                         = 0x600\n\tCREAD                         = 0x80\n\tCRTSCTS                       = 0x80000000\n\tCS5                           = 0x0\n\tCS6                           = 0x10\n\tCS7                           = 0x20\n\tCS8                           = 0x30\n\tCSIZE                         = 0x30\n\tCSTART                        = 0x11\n\tCSTATUS                       = 0x14\n\tCSTOP                         = 0x13\n\tCSTOPB                        = 0x40\n\tCSUSP                         = 0x1a\n\tCSWTCH                        = 0x1a\n\tDIOC                          = 0x6400\n\tDIOCGETB                      = 0x6402\n\tDIOCGETC                      = 0x6401\n\tDIOCGETP                      = 0x6408\n\tDIOCSETE                      = 0x6403\n\tDIOCSETP                      = 0x6409\n\tDLT_AIRONET_HEADER            = 0x78\n\tDLT_APPLE_IP_OVER_IEEE1394    = 0x8a\n\tDLT_ARCNET                    = 0x7\n\tDLT_ARCNET_LINUX              = 0x81\n\tDLT_ATM_CLIP                  = 0x13\n\tDLT_ATM_RFC1483               = 0xb\n\tDLT_AURORA                    = 0x7e\n\tDLT_AX25                      = 0x3\n\tDLT_BACNET_MS_TP              = 0xa5\n\tDLT_CHAOS                     = 0x5\n\tDLT_CISCO_IOS                 = 0x76\n\tDLT_C_HDLC                    = 0x68\n\tDLT_DOCSIS                    = 0x8f\n\tDLT_ECONET                    = 0x73\n\tDLT_EN10MB                    = 0x1\n\tDLT_EN3MB                     = 0x2\n\tDLT_ENC                       = 0x6d\n\tDLT_ERF_ETH                   = 0xaf\n\tDLT_ERF_POS                   = 0xb0\n\tDLT_FDDI                      = 0xa\n\tDLT_FRELAY                    = 0x6b\n\tDLT_GCOM_SERIAL               = 0xad\n\tDLT_GCOM_T1E1                 = 0xac\n\tDLT_GPF_F                     = 0xab\n\tDLT_GPF_T                     = 0xaa\n\tDLT_GPRS_LLC                  = 0xa9\n\tDLT_HDLC                      = 0x10\n\tDLT_HHDLC                     = 0x79\n\tDLT_HIPPI                     = 0xf\n\tDLT_IBM_SN                    = 0x92\n\tDLT_IBM_SP                    = 0x91\n\tDLT_IEEE802                   = 0x6\n\tDLT_IEEE802_11                = 0x69\n\tDLT_IEEE802_11_RADIO          = 0x7f\n\tDLT_IEEE802_11_RADIO_AVS      = 0xa3\n\tDLT_IPNET                     = 0xe2\n\tDLT_IPOIB                     = 0xa2\n\tDLT_IP_OVER_FC                = 0x7a\n\tDLT_JUNIPER_ATM1              = 0x89\n\tDLT_JUNIPER_ATM2              = 0x87\n\tDLT_JUNIPER_CHDLC             = 0xb5\n\tDLT_JUNIPER_ES                = 0x84\n\tDLT_JUNIPER_ETHER             = 0xb2\n\tDLT_JUNIPER_FRELAY            = 0xb4\n\tDLT_JUNIPER_GGSN              = 0x85\n\tDLT_JUNIPER_MFR               = 0x86\n\tDLT_JUNIPER_MLFR              = 0x83\n\tDLT_JUNIPER_MLPPP             = 0x82\n\tDLT_JUNIPER_MONITOR           = 0xa4\n\tDLT_JUNIPER_PIC_PEER          = 0xae\n\tDLT_JUNIPER_PPP               = 0xb3\n\tDLT_JUNIPER_PPPOE             = 0xa7\n\tDLT_JUNIPER_PPPOE_ATM         = 0xa8\n\tDLT_JUNIPER_SERVICES          = 0x88\n\tDLT_LINUX_IRDA                = 0x90\n\tDLT_LINUX_LAPD                = 0xb1\n\tDLT_LINUX_SLL                 = 0x71\n\tDLT_LOOP                      = 0x6c\n\tDLT_LTALK                     = 0x72\n\tDLT_MTP2                      = 0x8c\n\tDLT_MTP2_WITH_PHDR            = 0x8b\n\tDLT_MTP3                      = 0x8d\n\tDLT_NULL                      = 0x0\n\tDLT_PCI_EXP                   = 0x7d\n\tDLT_PFLOG                     = 0x75\n\tDLT_PFSYNC                    = 0x12\n\tDLT_PPP                       = 0x9\n\tDLT_PPP_BSDOS                 = 0xe\n\tDLT_PPP_PPPD                  = 0xa6\n\tDLT_PRISM_HEADER              = 0x77\n\tDLT_PRONET                    = 0x4\n\tDLT_RAW                       = 0xc\n\tDLT_RAWAF_MASK                = 0x2240000\n\tDLT_RIO                       = 0x7c\n\tDLT_SCCP                      = 0x8e\n\tDLT_SLIP                      = 0x8\n\tDLT_SLIP_BSDOS                = 0xd\n\tDLT_SUNATM                    = 0x7b\n\tDLT_SYMANTEC_FIREWALL         = 0x63\n\tDLT_TZSP                      = 0x80\n\tECHO                          = 0x8\n\tECHOCTL                       = 0x200\n\tECHOE                         = 0x10\n\tECHOK                         = 0x20\n\tECHOKE                        = 0x800\n\tECHONL                        = 0x40\n\tECHOPRT                       = 0x400\n\tEMPTY_SET                     = 0x0\n\tEMT_CPCOVF                    = 0x1\n\tEQUALITY_CHECK                = 0x0\n\tEXTA                          = 0xe\n\tEXTB                          = 0xf\n\tFD_CLOEXEC                    = 0x1\n\tFD_NFDBITS                    = 0x40\n\tFD_SETSIZE                    = 0x10000\n\tFF0                           = 0x0\n\tFF1                           = 0x8000\n\tFFDLY                         = 0x8000\n\tFIORDCHK                      = 0x6603\n\tFLUSHALL                      = 0x1\n\tFLUSHDATA                     = 0x0\n\tFLUSHO                        = 0x2000\n\tF_ALLOCSP                     = 0xa\n\tF_ALLOCSP64                   = 0xa\n\tF_BADFD                       = 0x2e\n\tF_BLKSIZE                     = 0x13\n\tF_BLOCKS                      = 0x12\n\tF_CHKFL                       = 0x8\n\tF_COMPAT                      = 0x8\n\tF_DUP2FD                      = 0x9\n\tF_DUP2FD_CLOEXEC              = 0x24\n\tF_DUPFD                       = 0x0\n\tF_DUPFD_CLOEXEC               = 0x25\n\tF_FLOCK                       = 0x35\n\tF_FLOCK64                     = 0x35\n\tF_FLOCKW                      = 0x36\n\tF_FLOCKW64                    = 0x36\n\tF_FREESP                      = 0xb\n\tF_FREESP64                    = 0xb\n\tF_GETFD                       = 0x1\n\tF_GETFL                       = 0x3\n\tF_GETLK                       = 0xe\n\tF_GETLK64                     = 0xe\n\tF_GETOWN                      = 0x17\n\tF_GETXFL                      = 0x2d\n\tF_HASREMOTELOCKS              = 0x1a\n\tF_ISSTREAM                    = 0xd\n\tF_MANDDNY                     = 0x10\n\tF_MDACC                       = 0x20\n\tF_NODNY                       = 0x0\n\tF_NPRIV                       = 0x10\n\tF_OFD_GETLK                   = 0x2f\n\tF_OFD_GETLK64                 = 0x2f\n\tF_OFD_SETLK                   = 0x30\n\tF_OFD_SETLK64                 = 0x30\n\tF_OFD_SETLKW                  = 0x31\n\tF_OFD_SETLKW64                = 0x31\n\tF_PRIV                        = 0xf\n\tF_QUOTACTL                    = 0x11\n\tF_RDACC                       = 0x1\n\tF_RDDNY                       = 0x1\n\tF_RDLCK                       = 0x1\n\tF_REVOKE                      = 0x19\n\tF_RMACC                       = 0x4\n\tF_RMDNY                       = 0x4\n\tF_RWACC                       = 0x3\n\tF_RWDNY                       = 0x3\n\tF_SETFD                       = 0x2\n\tF_SETFL                       = 0x4\n\tF_SETLK                       = 0x6\n\tF_SETLK64                     = 0x6\n\tF_SETLK64_NBMAND              = 0x2a\n\tF_SETLKW                      = 0x7\n\tF_SETLKW64                    = 0x7\n\tF_SETLK_NBMAND                = 0x2a\n\tF_SETOWN                      = 0x18\n\tF_SHARE                       = 0x28\n\tF_SHARE_NBMAND                = 0x2b\n\tF_UNLCK                       = 0x3\n\tF_UNLKSYS                     = 0x4\n\tF_UNSHARE                     = 0x29\n\tF_WRACC                       = 0x2\n\tF_WRDNY                       = 0x2\n\tF_WRLCK                       = 0x2\n\tHUPCL                         = 0x400\n\tIBSHIFT                       = 0x10\n\tICANON                        = 0x2\n\tICMP6_FILTER                  = 0x1\n\tICRNL                         = 0x100\n\tIEXTEN                        = 0x8000\n\tIFF_ADDRCONF                  = 0x80000\n\tIFF_ALLMULTI                  = 0x200\n\tIFF_ANYCAST                   = 0x400000\n\tIFF_BROADCAST                 = 0x2\n\tIFF_CANTCHANGE                = 0x7f203003b5a\n\tIFF_COS_ENABLED               = 0x200000000\n\tIFF_DEBUG                     = 0x4\n\tIFF_DEPRECATED                = 0x40000\n\tIFF_DHCPRUNNING               = 0x4000\n\tIFF_DUPLICATE                 = 0x4000000000\n\tIFF_FAILED                    = 0x10000000\n\tIFF_FIXEDMTU                  = 0x1000000000\n\tIFF_INACTIVE                  = 0x40000000\n\tIFF_INTELLIGENT               = 0x400\n\tIFF_IPMP                      = 0x8000000000\n\tIFF_IPMP_CANTCHANGE           = 0x10000000\n\tIFF_IPMP_INVALID              = 0x1ec200080\n\tIFF_IPV4                      = 0x1000000\n\tIFF_IPV6                      = 0x2000000\n\tIFF_L3PROTECT                 = 0x40000000000\n\tIFF_LOOPBACK                  = 0x8\n\tIFF_MULTICAST                 = 0x800\n\tIFF_MULTI_BCAST               = 0x1000\n\tIFF_NOACCEPT                  = 0x4000000\n\tIFF_NOARP                     = 0x80\n\tIFF_NOFAILOVER                = 0x8000000\n\tIFF_NOLINKLOCAL               = 0x20000000000\n\tIFF_NOLOCAL                   = 0x20000\n\tIFF_NONUD                     = 0x200000\n\tIFF_NORTEXCH                  = 0x800000\n\tIFF_NOTRAILERS                = 0x20\n\tIFF_NOXMIT                    = 0x10000\n\tIFF_OFFLINE                   = 0x80000000\n\tIFF_POINTOPOINT               = 0x10\n\tIFF_PREFERRED                 = 0x400000000\n\tIFF_PRIVATE                   = 0x8000\n\tIFF_PROMISC                   = 0x100\n\tIFF_ROUTER                    = 0x100000\n\tIFF_RUNNING                   = 0x40\n\tIFF_STANDBY                   = 0x20000000\n\tIFF_TEMPORARY                 = 0x800000000\n\tIFF_UNNUMBERED                = 0x2000\n\tIFF_UP                        = 0x1\n\tIFF_VIRTUAL                   = 0x2000000000\n\tIFF_VRRP                      = 0x10000000000\n\tIFF_XRESOLV                   = 0x100000000\n\tIFNAMSIZ                      = 0x10\n\tIFT_1822                      = 0x2\n\tIFT_6TO4                      = 0xca\n\tIFT_AAL5                      = 0x31\n\tIFT_ARCNET                    = 0x23\n\tIFT_ARCNETPLUS                = 0x24\n\tIFT_ATM                       = 0x25\n\tIFT_CEPT                      = 0x13\n\tIFT_DS3                       = 0x1e\n\tIFT_EON                       = 0x19\n\tIFT_ETHER                     = 0x6\n\tIFT_FDDI                      = 0xf\n\tIFT_FRELAY                    = 0x20\n\tIFT_FRELAYDCE                 = 0x2c\n\tIFT_HDH1822                   = 0x3\n\tIFT_HIPPI                     = 0x2f\n\tIFT_HSSI                      = 0x2e\n\tIFT_HY                        = 0xe\n\tIFT_IB                        = 0xc7\n\tIFT_IPV4                      = 0xc8\n\tIFT_IPV6                      = 0xc9\n\tIFT_ISDNBASIC                 = 0x14\n\tIFT_ISDNPRIMARY               = 0x15\n\tIFT_ISO88022LLC               = 0x29\n\tIFT_ISO88023                  = 0x7\n\tIFT_ISO88024                  = 0x8\n\tIFT_ISO88025                  = 0x9\n\tIFT_ISO88026                  = 0xa\n\tIFT_LAPB                      = 0x10\n\tIFT_LOCALTALK                 = 0x2a\n\tIFT_LOOP                      = 0x18\n\tIFT_MIOX25                    = 0x26\n\tIFT_MODEM                     = 0x30\n\tIFT_NSIP                      = 0x1b\n\tIFT_OTHER                     = 0x1\n\tIFT_P10                       = 0xc\n\tIFT_P80                       = 0xd\n\tIFT_PARA                      = 0x22\n\tIFT_PPP                       = 0x17\n\tIFT_PROPMUX                   = 0x36\n\tIFT_PROPVIRTUAL               = 0x35\n\tIFT_PTPSERIAL                 = 0x16\n\tIFT_RS232                     = 0x21\n\tIFT_SDLC                      = 0x11\n\tIFT_SIP                       = 0x1f\n\tIFT_SLIP                      = 0x1c\n\tIFT_SMDSDXI                   = 0x2b\n\tIFT_SMDSICIP                  = 0x34\n\tIFT_SONET                     = 0x27\n\tIFT_SONETPATH                 = 0x32\n\tIFT_SONETVT                   = 0x33\n\tIFT_STARLAN                   = 0xb\n\tIFT_T1                        = 0x12\n\tIFT_ULTRA                     = 0x1d\n\tIFT_V35                       = 0x2d\n\tIFT_X25                       = 0x5\n\tIFT_X25DDN                    = 0x4\n\tIFT_X25PLE                    = 0x28\n\tIFT_XETHER                    = 0x1a\n\tIGNBRK                        = 0x1\n\tIGNCR                         = 0x80\n\tIGNPAR                        = 0x4\n\tIMAXBEL                       = 0x2000\n\tINLCR                         = 0x40\n\tINPCK                         = 0x10\n\tIN_AUTOCONF_MASK              = 0xffff0000\n\tIN_AUTOCONF_NET               = 0xa9fe0000\n\tIN_CLASSA_HOST                = 0xffffff\n\tIN_CLASSA_MAX                 = 0x80\n\tIN_CLASSA_NET                 = 0xff000000\n\tIN_CLASSA_NSHIFT              = 0x18\n\tIN_CLASSB_HOST                = 0xffff\n\tIN_CLASSB_MAX                 = 0x10000\n\tIN_CLASSB_NET                 = 0xffff0000\n\tIN_CLASSB_NSHIFT              = 0x10\n\tIN_CLASSC_HOST                = 0xff\n\tIN_CLASSC_NET                 = 0xffffff00\n\tIN_CLASSC_NSHIFT              = 0x8\n\tIN_CLASSD_HOST                = 0xfffffff\n\tIN_CLASSD_NET                 = 0xf0000000\n\tIN_CLASSD_NSHIFT              = 0x1c\n\tIN_CLASSE_NET                 = 0xffffffff\n\tIN_LOOPBACKNET                = 0x7f\n\tIN_PRIVATE12_MASK             = 0xfff00000\n\tIN_PRIVATE12_NET              = 0xac100000\n\tIN_PRIVATE16_MASK             = 0xffff0000\n\tIN_PRIVATE16_NET              = 0xc0a80000\n\tIN_PRIVATE8_MASK              = 0xff000000\n\tIN_PRIVATE8_NET               = 0xa000000\n\tIPPROTO_AH                    = 0x33\n\tIPPROTO_DSTOPTS               = 0x3c\n\tIPPROTO_EGP                   = 0x8\n\tIPPROTO_ENCAP                 = 0x4\n\tIPPROTO_EON                   = 0x50\n\tIPPROTO_ESP                   = 0x32\n\tIPPROTO_FRAGMENT              = 0x2c\n\tIPPROTO_GGP                   = 0x3\n\tIPPROTO_HELLO                 = 0x3f\n\tIPPROTO_HOPOPTS               = 0x0\n\tIPPROTO_ICMP                  = 0x1\n\tIPPROTO_ICMPV6                = 0x3a\n\tIPPROTO_IDP                   = 0x16\n\tIPPROTO_IGMP                  = 0x2\n\tIPPROTO_IP                    = 0x0\n\tIPPROTO_IPV6                  = 0x29\n\tIPPROTO_MAX                   = 0x100\n\tIPPROTO_ND                    = 0x4d\n\tIPPROTO_NONE                  = 0x3b\n\tIPPROTO_OSPF                  = 0x59\n\tIPPROTO_PIM                   = 0x67\n\tIPPROTO_PUP                   = 0xc\n\tIPPROTO_RAW                   = 0xff\n\tIPPROTO_ROUTING               = 0x2b\n\tIPPROTO_RSVP                  = 0x2e\n\tIPPROTO_SCTP                  = 0x84\n\tIPPROTO_TCP                   = 0x6\n\tIPPROTO_UDP                   = 0x11\n\tIPV6_ADD_MEMBERSHIP           = 0x9\n\tIPV6_BOUND_IF                 = 0x41\n\tIPV6_CHECKSUM                 = 0x18\n\tIPV6_DONTFRAG                 = 0x21\n\tIPV6_DROP_MEMBERSHIP          = 0xa\n\tIPV6_DSTOPTS                  = 0xf\n\tIPV6_FLOWINFO_FLOWLABEL       = 0xffff0f00\n\tIPV6_FLOWINFO_TCLASS          = 0xf00f\n\tIPV6_HOPLIMIT                 = 0xc\n\tIPV6_HOPOPTS                  = 0xe\n\tIPV6_JOIN_GROUP               = 0x9\n\tIPV6_LEAVE_GROUP              = 0xa\n\tIPV6_MULTICAST_HOPS           = 0x7\n\tIPV6_MULTICAST_IF             = 0x6\n\tIPV6_MULTICAST_LOOP           = 0x8\n\tIPV6_NEXTHOP                  = 0xd\n\tIPV6_PAD1_OPT                 = 0x0\n\tIPV6_PATHMTU                  = 0x25\n\tIPV6_PKTINFO                  = 0xb\n\tIPV6_PREFER_SRC_CGA           = 0x20\n\tIPV6_PREFER_SRC_CGADEFAULT    = 0x10\n\tIPV6_PREFER_SRC_CGAMASK       = 0x30\n\tIPV6_PREFER_SRC_COA           = 0x2\n\tIPV6_PREFER_SRC_DEFAULT       = 0x15\n\tIPV6_PREFER_SRC_HOME          = 0x1\n\tIPV6_PREFER_SRC_MASK          = 0x3f\n\tIPV6_PREFER_SRC_MIPDEFAULT    = 0x1\n\tIPV6_PREFER_SRC_MIPMASK       = 0x3\n\tIPV6_PREFER_SRC_NONCGA        = 0x10\n\tIPV6_PREFER_SRC_PUBLIC        = 0x4\n\tIPV6_PREFER_SRC_TMP           = 0x8\n\tIPV6_PREFER_SRC_TMPDEFAULT    = 0x4\n\tIPV6_PREFER_SRC_TMPMASK       = 0xc\n\tIPV6_RECVDSTOPTS              = 0x28\n\tIPV6_RECVHOPLIMIT             = 0x13\n\tIPV6_RECVHOPOPTS              = 0x14\n\tIPV6_RECVPATHMTU              = 0x24\n\tIPV6_RECVPKTINFO              = 0x12\n\tIPV6_RECVRTHDR                = 0x16\n\tIPV6_RECVRTHDRDSTOPTS         = 0x17\n\tIPV6_RECVTCLASS               = 0x19\n\tIPV6_RTHDR                    = 0x10\n\tIPV6_RTHDRDSTOPTS             = 0x11\n\tIPV6_RTHDR_TYPE_0             = 0x0\n\tIPV6_SEC_OPT                  = 0x22\n\tIPV6_SRC_PREFERENCES          = 0x23\n\tIPV6_TCLASS                   = 0x26\n\tIPV6_UNICAST_HOPS             = 0x5\n\tIPV6_UNSPEC_SRC               = 0x42\n\tIPV6_USE_MIN_MTU              = 0x20\n\tIPV6_V6ONLY                   = 0x27\n\tIP_ADD_MEMBERSHIP             = 0x13\n\tIP_ADD_SOURCE_MEMBERSHIP      = 0x17\n\tIP_BLOCK_SOURCE               = 0x15\n\tIP_BOUND_IF                   = 0x41\n\tIP_BROADCAST                  = 0x106\n\tIP_BROADCAST_TTL              = 0x43\n\tIP_DEFAULT_MULTICAST_LOOP     = 0x1\n\tIP_DEFAULT_MULTICAST_TTL      = 0x1\n\tIP_DF                         = 0x4000\n\tIP_DHCPINIT_IF                = 0x45\n\tIP_DONTFRAG                   = 0x1b\n\tIP_DONTROUTE                  = 0x105\n\tIP_DROP_MEMBERSHIP            = 0x14\n\tIP_DROP_SOURCE_MEMBERSHIP     = 0x18\n\tIP_HDRINCL                    = 0x2\n\tIP_MAXPACKET                  = 0xffff\n\tIP_MF                         = 0x2000\n\tIP_MSS                        = 0x240\n\tIP_MULTICAST_IF               = 0x10\n\tIP_MULTICAST_LOOP             = 0x12\n\tIP_MULTICAST_TTL              = 0x11\n\tIP_NEXTHOP                    = 0x19\n\tIP_OPTIONS                    = 0x1\n\tIP_PKTINFO                    = 0x1a\n\tIP_RECVDSTADDR                = 0x7\n\tIP_RECVIF                     = 0x9\n\tIP_RECVOPTS                   = 0x5\n\tIP_RECVPKTINFO                = 0x1a\n\tIP_RECVRETOPTS                = 0x6\n\tIP_RECVSLLA                   = 0xa\n\tIP_RECVTOS                    = 0xc\n\tIP_RECVTTL                    = 0xb\n\tIP_RETOPTS                    = 0x8\n\tIP_REUSEADDR                  = 0x104\n\tIP_SEC_OPT                    = 0x22\n\tIP_TOS                        = 0x3\n\tIP_TTL                        = 0x4\n\tIP_UNBLOCK_SOURCE             = 0x16\n\tIP_UNSPEC_SRC                 = 0x42\n\tISIG                          = 0x1\n\tISTRIP                        = 0x20\n\tIUCLC                         = 0x200\n\tIXANY                         = 0x800\n\tIXOFF                         = 0x1000\n\tIXON                          = 0x400\n\tLOCK_EX                       = 0x2\n\tLOCK_NB                       = 0x4\n\tLOCK_SH                       = 0x1\n\tLOCK_UN                       = 0x8\n\tMADV_ACCESS_DEFAULT           = 0x6\n\tMADV_ACCESS_LWP               = 0x7\n\tMADV_ACCESS_MANY              = 0x8\n\tMADV_DONTNEED                 = 0x4\n\tMADV_FREE                     = 0x5\n\tMADV_NORMAL                   = 0x0\n\tMADV_PURGE                    = 0x9\n\tMADV_RANDOM                   = 0x1\n\tMADV_SEQUENTIAL               = 0x2\n\tMADV_WILLNEED                 = 0x3\n\tMAP_32BIT                     = 0x80\n\tMAP_ALIGN                     = 0x200\n\tMAP_ANON                      = 0x100\n\tMAP_ANONYMOUS                 = 0x100\n\tMAP_FILE                      = 0x0\n\tMAP_FIXED                     = 0x10\n\tMAP_INITDATA                  = 0x800\n\tMAP_NORESERVE                 = 0x40\n\tMAP_PRIVATE                   = 0x2\n\tMAP_RENAME                    = 0x20\n\tMAP_SHARED                    = 0x1\n\tMAP_TEXT                      = 0x400\n\tMAP_TYPE                      = 0xf\n\tMCAST_BLOCK_SOURCE            = 0x2b\n\tMCAST_EXCLUDE                 = 0x2\n\tMCAST_INCLUDE                 = 0x1\n\tMCAST_JOIN_GROUP              = 0x29\n\tMCAST_JOIN_SOURCE_GROUP       = 0x2d\n\tMCAST_LEAVE_GROUP             = 0x2a\n\tMCAST_LEAVE_SOURCE_GROUP      = 0x2e\n\tMCAST_UNBLOCK_SOURCE          = 0x2c\n\tMCL_CURRENT                   = 0x1\n\tMCL_FUTURE                    = 0x2\n\tMSG_CTRUNC                    = 0x10\n\tMSG_DONTROUTE                 = 0x4\n\tMSG_DONTWAIT                  = 0x80\n\tMSG_DUPCTRL                   = 0x800\n\tMSG_EOR                       = 0x8\n\tMSG_MAXIOVLEN                 = 0x10\n\tMSG_NOSIGNAL                  = 0x200\n\tMSG_NOTIFICATION              = 0x100\n\tMSG_OOB                       = 0x1\n\tMSG_PEEK                      = 0x2\n\tMSG_TRUNC                     = 0x20\n\tMSG_WAITALL                   = 0x40\n\tMSG_XPG4_2                    = 0x8000\n\tMS_ASYNC                      = 0x1\n\tMS_INVALIDATE                 = 0x2\n\tMS_OLDSYNC                    = 0x0\n\tMS_SYNC                       = 0x4\n\tM_FLUSH                       = 0x86\n\tNAME_MAX                      = 0xff\n\tNEWDEV                        = 0x1\n\tNFDBITS                       = 0x40\n\tNL0                           = 0x0\n\tNL1                           = 0x100\n\tNLDLY                         = 0x100\n\tNOFLSH                        = 0x80\n\tOCRNL                         = 0x8\n\tOFDEL                         = 0x80\n\tOFILL                         = 0x40\n\tOLCUC                         = 0x2\n\tOLDDEV                        = 0x0\n\tONBITSMAJOR                   = 0x7\n\tONBITSMINOR                   = 0x8\n\tONLCR                         = 0x4\n\tONLRET                        = 0x20\n\tONOCR                         = 0x10\n\tOPENFAIL                      = -0x1\n\tOPOST                         = 0x1\n\tO_ACCMODE                     = 0x600003\n\tO_APPEND                      = 0x8\n\tO_CLOEXEC                     = 0x800000\n\tO_CREAT                       = 0x100\n\tO_DIRECT                      = 0x2000000\n\tO_DIRECTORY                   = 0x1000000\n\tO_DSYNC                       = 0x40\n\tO_EXCL                        = 0x400\n\tO_EXEC                        = 0x400000\n\tO_LARGEFILE                   = 0x2000\n\tO_NDELAY                      = 0x4\n\tO_NOCTTY                      = 0x800\n\tO_NOFOLLOW                    = 0x20000\n\tO_NOLINKS                     = 0x40000\n\tO_NONBLOCK                    = 0x80\n\tO_RDONLY                      = 0x0\n\tO_RDWR                        = 0x2\n\tO_RSYNC                       = 0x8000\n\tO_SEARCH                      = 0x200000\n\tO_SIOCGIFCONF                 = -0x3ff796ec\n\tO_SIOCGLIFCONF                = -0x3fef9688\n\tO_SYNC                        = 0x10\n\tO_TRUNC                       = 0x200\n\tO_WRONLY                      = 0x1\n\tO_XATTR                       = 0x4000\n\tPARENB                        = 0x100\n\tPAREXT                        = 0x100000\n\tPARMRK                        = 0x8\n\tPARODD                        = 0x200\n\tPENDIN                        = 0x4000\n\tPRIO_PGRP                     = 0x1\n\tPRIO_PROCESS                  = 0x0\n\tPRIO_USER                     = 0x2\n\tPROT_EXEC                     = 0x4\n\tPROT_NONE                     = 0x0\n\tPROT_READ                     = 0x1\n\tPROT_WRITE                    = 0x2\n\tRLIMIT_AS                     = 0x6\n\tRLIMIT_CORE                   = 0x4\n\tRLIMIT_CPU                    = 0x0\n\tRLIMIT_DATA                   = 0x2\n\tRLIMIT_FSIZE                  = 0x1\n\tRLIMIT_NOFILE                 = 0x5\n\tRLIMIT_STACK                  = 0x3\n\tRLIM_INFINITY                 = 0xfffffffffffffffd\n\tRTAX_AUTHOR                   = 0x6\n\tRTAX_BRD                      = 0x7\n\tRTAX_DST                      = 0x0\n\tRTAX_GATEWAY                  = 0x1\n\tRTAX_GENMASK                  = 0x3\n\tRTAX_IFA                      = 0x5\n\tRTAX_IFP                      = 0x4\n\tRTAX_MAX                      = 0x9\n\tRTAX_NETMASK                  = 0x2\n\tRTAX_SRC                      = 0x8\n\tRTA_AUTHOR                    = 0x40\n\tRTA_BRD                       = 0x80\n\tRTA_DST                       = 0x1\n\tRTA_GATEWAY                   = 0x2\n\tRTA_GENMASK                   = 0x8\n\tRTA_IFA                       = 0x20\n\tRTA_IFP                       = 0x10\n\tRTA_NETMASK                   = 0x4\n\tRTA_NUMBITS                   = 0x9\n\tRTA_SRC                       = 0x100\n\tRTF_BLACKHOLE                 = 0x1000\n\tRTF_CLONING                   = 0x100\n\tRTF_DONE                      = 0x40\n\tRTF_DYNAMIC                   = 0x10\n\tRTF_GATEWAY                   = 0x2\n\tRTF_HOST                      = 0x4\n\tRTF_INDIRECT                  = 0x40000\n\tRTF_KERNEL                    = 0x80000\n\tRTF_LLINFO                    = 0x400\n\tRTF_MASK                      = 0x80\n\tRTF_MODIFIED                  = 0x20\n\tRTF_MULTIRT                   = 0x10000\n\tRTF_PRIVATE                   = 0x2000\n\tRTF_PROTO1                    = 0x8000\n\tRTF_PROTO2                    = 0x4000\n\tRTF_REJECT                    = 0x8\n\tRTF_SETSRC                    = 0x20000\n\tRTF_STATIC                    = 0x800\n\tRTF_UP                        = 0x1\n\tRTF_XRESOLVE                  = 0x200\n\tRTF_ZONE                      = 0x100000\n\tRTM_ADD                       = 0x1\n\tRTM_CHANGE                    = 0x3\n\tRTM_CHGADDR                   = 0xf\n\tRTM_DELADDR                   = 0xd\n\tRTM_DELETE                    = 0x2\n\tRTM_FREEADDR                  = 0x10\n\tRTM_GET                       = 0x4\n\tRTM_IFINFO                    = 0xe\n\tRTM_LOCK                      = 0x8\n\tRTM_LOSING                    = 0x5\n\tRTM_MISS                      = 0x7\n\tRTM_NEWADDR                   = 0xc\n\tRTM_OLDADD                    = 0x9\n\tRTM_OLDDEL                    = 0xa\n\tRTM_REDIRECT                  = 0x6\n\tRTM_RESOLVE                   = 0xb\n\tRTM_VERSION                   = 0x3\n\tRTV_EXPIRE                    = 0x4\n\tRTV_HOPCOUNT                  = 0x2\n\tRTV_MTU                       = 0x1\n\tRTV_RPIPE                     = 0x8\n\tRTV_RTT                       = 0x40\n\tRTV_RTTVAR                    = 0x80\n\tRTV_SPIPE                     = 0x10\n\tRTV_SSTHRESH                  = 0x20\n\tRT_AWARE                      = 0x1\n\tRUSAGE_CHILDREN               = -0x1\n\tRUSAGE_SELF                   = 0x0\n\tSCM_RIGHTS                    = 0x1010\n\tSCM_TIMESTAMP                 = 0x1013\n\tSCM_UCRED                     = 0x1012\n\tSHUT_RD                       = 0x0\n\tSHUT_RDWR                     = 0x2\n\tSHUT_WR                       = 0x1\n\tSIG2STR_MAX                   = 0x20\n\tSIOCADDMULTI                  = -0x7fdf96cf\n\tSIOCADDRT                     = -0x7fcf8df6\n\tSIOCATMARK                    = 0x40047307\n\tSIOCDARP                      = -0x7fdb96e0\n\tSIOCDELMULTI                  = -0x7fdf96ce\n\tSIOCDELRT                     = -0x7fcf8df5\n\tSIOCDXARP                     = -0x7fff9658\n\tSIOCGARP                      = -0x3fdb96e1\n\tSIOCGDSTINFO                  = -0x3fff965c\n\tSIOCGENADDR                   = -0x3fdf96ab\n\tSIOCGENPSTATS                 = -0x3fdf96c7\n\tSIOCGETLSGCNT                 = -0x3fef8deb\n\tSIOCGETNAME                   = 0x40107334\n\tSIOCGETPEER                   = 0x40107335\n\tSIOCGETPROP                   = -0x3fff8f44\n\tSIOCGETSGCNT                  = -0x3feb8deb\n\tSIOCGETSYNC                   = -0x3fdf96d3\n\tSIOCGETVIFCNT                 = -0x3feb8dec\n\tSIOCGHIWAT                    = 0x40047301\n\tSIOCGIFADDR                   = -0x3fdf96f3\n\tSIOCGIFBRDADDR                = -0x3fdf96e9\n\tSIOCGIFCONF                   = -0x3ff796a4\n\tSIOCGIFDSTADDR                = -0x3fdf96f1\n\tSIOCGIFFLAGS                  = -0x3fdf96ef\n\tSIOCGIFHWADDR                 = -0x3fdf9647\n\tSIOCGIFINDEX                  = -0x3fdf96a6\n\tSIOCGIFMEM                    = -0x3fdf96ed\n\tSIOCGIFMETRIC                 = -0x3fdf96e5\n\tSIOCGIFMTU                    = -0x3fdf96ea\n\tSIOCGIFMUXID                  = -0x3fdf96a8\n\tSIOCGIFNETMASK                = -0x3fdf96e7\n\tSIOCGIFNUM                    = 0x40046957\n\tSIOCGIP6ADDRPOLICY            = -0x3fff965e\n\tSIOCGIPMSFILTER               = -0x3ffb964c\n\tSIOCGLIFADDR                  = -0x3f87968f\n\tSIOCGLIFBINDING               = -0x3f879666\n\tSIOCGLIFBRDADDR               = -0x3f879685\n\tSIOCGLIFCONF                  = -0x3fef965b\n\tSIOCGLIFDADSTATE              = -0x3f879642\n\tSIOCGLIFDSTADDR               = -0x3f87968d\n\tSIOCGLIFFLAGS                 = -0x3f87968b\n\tSIOCGLIFGROUPINFO             = -0x3f4b9663\n\tSIOCGLIFGROUPNAME             = -0x3f879664\n\tSIOCGLIFHWADDR                = -0x3f879640\n\tSIOCGLIFINDEX                 = -0x3f87967b\n\tSIOCGLIFLNKINFO               = -0x3f879674\n\tSIOCGLIFMETRIC                = -0x3f879681\n\tSIOCGLIFMTU                   = -0x3f879686\n\tSIOCGLIFMUXID                 = -0x3f87967d\n\tSIOCGLIFNETMASK               = -0x3f879683\n\tSIOCGLIFNUM                   = -0x3ff3967e\n\tSIOCGLIFSRCOF                 = -0x3fef964f\n\tSIOCGLIFSUBNET                = -0x3f879676\n\tSIOCGLIFTOKEN                 = -0x3f879678\n\tSIOCGLIFUSESRC                = -0x3f879651\n\tSIOCGLIFZONE                  = -0x3f879656\n\tSIOCGLOWAT                    = 0x40047303\n\tSIOCGMSFILTER                 = -0x3ffb964e\n\tSIOCGPGRP                     = 0x40047309\n\tSIOCGSTAMP                    = -0x3fef9646\n\tSIOCGXARP                     = -0x3fff9659\n\tSIOCIFDETACH                  = -0x7fdf96c8\n\tSIOCILB                       = -0x3ffb9645\n\tSIOCLIFADDIF                  = -0x3f879691\n\tSIOCLIFDELND                  = -0x7f879673\n\tSIOCLIFGETND                  = -0x3f879672\n\tSIOCLIFREMOVEIF               = -0x7f879692\n\tSIOCLIFSETND                  = -0x7f879671\n\tSIOCLOWER                     = -0x7fdf96d7\n\tSIOCSARP                      = -0x7fdb96e2\n\tSIOCSCTPGOPT                  = -0x3fef9653\n\tSIOCSCTPPEELOFF               = -0x3ffb9652\n\tSIOCSCTPSOPT                  = -0x7fef9654\n\tSIOCSENABLESDP                = -0x3ffb9649\n\tSIOCSETPROP                   = -0x7ffb8f43\n\tSIOCSETSYNC                   = -0x7fdf96d4\n\tSIOCSHIWAT                    = -0x7ffb8d00\n\tSIOCSIFADDR                   = -0x7fdf96f4\n\tSIOCSIFBRDADDR                = -0x7fdf96e8\n\tSIOCSIFDSTADDR                = -0x7fdf96f2\n\tSIOCSIFFLAGS                  = -0x7fdf96f0\n\tSIOCSIFINDEX                  = -0x7fdf96a5\n\tSIOCSIFMEM                    = -0x7fdf96ee\n\tSIOCSIFMETRIC                 = -0x7fdf96e4\n\tSIOCSIFMTU                    = -0x7fdf96eb\n\tSIOCSIFMUXID                  = -0x7fdf96a7\n\tSIOCSIFNAME                   = -0x7fdf96b7\n\tSIOCSIFNETMASK                = -0x7fdf96e6\n\tSIOCSIP6ADDRPOLICY            = -0x7fff965d\n\tSIOCSIPMSFILTER               = -0x7ffb964b\n\tSIOCSLGETREQ                  = -0x3fdf96b9\n\tSIOCSLIFADDR                  = -0x7f879690\n\tSIOCSLIFBRDADDR               = -0x7f879684\n\tSIOCSLIFDSTADDR               = -0x7f87968e\n\tSIOCSLIFFLAGS                 = -0x7f87968c\n\tSIOCSLIFGROUPNAME             = -0x7f879665\n\tSIOCSLIFINDEX                 = -0x7f87967a\n\tSIOCSLIFLNKINFO               = -0x7f879675\n\tSIOCSLIFMETRIC                = -0x7f879680\n\tSIOCSLIFMTU                   = -0x7f879687\n\tSIOCSLIFMUXID                 = -0x7f87967c\n\tSIOCSLIFNAME                  = -0x3f87967f\n\tSIOCSLIFNETMASK               = -0x7f879682\n\tSIOCSLIFPREFIX                = -0x3f879641\n\tSIOCSLIFSUBNET                = -0x7f879677\n\tSIOCSLIFTOKEN                 = -0x7f879679\n\tSIOCSLIFUSESRC                = -0x7f879650\n\tSIOCSLIFZONE                  = -0x7f879655\n\tSIOCSLOWAT                    = -0x7ffb8cfe\n\tSIOCSLSTAT                    = -0x7fdf96b8\n\tSIOCSMSFILTER                 = -0x7ffb964d\n\tSIOCSPGRP                     = -0x7ffb8cf8\n\tSIOCSPROMISC                  = -0x7ffb96d0\n\tSIOCSQPTR                     = -0x3ffb9648\n\tSIOCSSDSTATS                  = -0x3fdf96d2\n\tSIOCSSESTATS                  = -0x3fdf96d1\n\tSIOCSXARP                     = -0x7fff965a\n\tSIOCTMYADDR                   = -0x3ff79670\n\tSIOCTMYSITE                   = -0x3ff7966e\n\tSIOCTONLINK                   = -0x3ff7966f\n\tSIOCUPPER                     = -0x7fdf96d8\n\tSIOCX25RCV                    = -0x3fdf96c4\n\tSIOCX25TBL                    = -0x3fdf96c3\n\tSIOCX25XMT                    = -0x3fdf96c5\n\tSIOCXPROTO                    = 0x20007337\n\tSOCK_CLOEXEC                  = 0x80000\n\tSOCK_DGRAM                    = 0x1\n\tSOCK_NDELAY                   = 0x200000\n\tSOCK_NONBLOCK                 = 0x100000\n\tSOCK_RAW                      = 0x4\n\tSOCK_RDM                      = 0x5\n\tSOCK_SEQPACKET                = 0x6\n\tSOCK_STREAM                   = 0x2\n\tSOCK_TYPE_MASK                = 0xffff\n\tSOL_FILTER                    = 0xfffc\n\tSOL_PACKET                    = 0xfffd\n\tSOL_ROUTE                     = 0xfffe\n\tSOL_SOCKET                    = 0xffff\n\tSOMAXCONN                     = 0x80\n\tSO_ACCEPTCONN                 = 0x2\n\tSO_ALL                        = 0x3f\n\tSO_ALLZONES                   = 0x1014\n\tSO_ANON_MLP                   = 0x100a\n\tSO_ATTACH_FILTER              = 0x40000001\n\tSO_BAND                       = 0x4000\n\tSO_BROADCAST                  = 0x20\n\tSO_COPYOPT                    = 0x80000\n\tSO_DEBUG                      = 0x1\n\tSO_DELIM                      = 0x8000\n\tSO_DETACH_FILTER              = 0x40000002\n\tSO_DGRAM_ERRIND               = 0x200\n\tSO_DOMAIN                     = 0x100c\n\tSO_DONTLINGER                 = -0x81\n\tSO_DONTROUTE                  = 0x10\n\tSO_ERROPT                     = 0x40000\n\tSO_ERROR                      = 0x1007\n\tSO_EXCLBIND                   = 0x1015\n\tSO_HIWAT                      = 0x10\n\tSO_ISNTTY                     = 0x800\n\tSO_ISTTY                      = 0x400\n\tSO_KEEPALIVE                  = 0x8\n\tSO_LINGER                     = 0x80\n\tSO_LOWAT                      = 0x20\n\tSO_MAC_EXEMPT                 = 0x100b\n\tSO_MAC_IMPLICIT               = 0x1016\n\tSO_MAXBLK                     = 0x100000\n\tSO_MAXPSZ                     = 0x8\n\tSO_MINPSZ                     = 0x4\n\tSO_MREADOFF                   = 0x80\n\tSO_MREADON                    = 0x40\n\tSO_NDELOFF                    = 0x200\n\tSO_NDELON                     = 0x100\n\tSO_NODELIM                    = 0x10000\n\tSO_OOBINLINE                  = 0x100\n\tSO_PROTOTYPE                  = 0x1009\n\tSO_RCVBUF                     = 0x1002\n\tSO_RCVLOWAT                   = 0x1004\n\tSO_RCVPSH                     = 0x100d\n\tSO_RCVTIMEO                   = 0x1006\n\tSO_READOPT                    = 0x1\n\tSO_RECVUCRED                  = 0x400\n\tSO_REUSEADDR                  = 0x4\n\tSO_SECATTR                    = 0x1011\n\tSO_SNDBUF                     = 0x1001\n\tSO_SNDLOWAT                   = 0x1003\n\tSO_SNDTIMEO                   = 0x1005\n\tSO_STRHOLD                    = 0x20000\n\tSO_TAIL                       = 0x200000\n\tSO_TIMESTAMP                  = 0x1013\n\tSO_TONSTOP                    = 0x2000\n\tSO_TOSTOP                     = 0x1000\n\tSO_TYPE                       = 0x1008\n\tSO_USELOOPBACK                = 0x40\n\tSO_VRRP                       = 0x1017\n\tSO_WROFF                      = 0x2\n\tS_ENFMT                       = 0x400\n\tS_IAMB                        = 0x1ff\n\tS_IEXEC                       = 0x40\n\tS_IFBLK                       = 0x6000\n\tS_IFCHR                       = 0x2000\n\tS_IFDIR                       = 0x4000\n\tS_IFDOOR                      = 0xd000\n\tS_IFIFO                       = 0x1000\n\tS_IFLNK                       = 0xa000\n\tS_IFMT                        = 0xf000\n\tS_IFNAM                       = 0x5000\n\tS_IFPORT                      = 0xe000\n\tS_IFREG                       = 0x8000\n\tS_IFSOCK                      = 0xc000\n\tS_INSEM                       = 0x1\n\tS_INSHD                       = 0x2\n\tS_IREAD                       = 0x100\n\tS_IRGRP                       = 0x20\n\tS_IROTH                       = 0x4\n\tS_IRUSR                       = 0x100\n\tS_IRWXG                       = 0x38\n\tS_IRWXO                       = 0x7\n\tS_IRWXU                       = 0x1c0\n\tS_ISGID                       = 0x400\n\tS_ISUID                       = 0x800\n\tS_ISVTX                       = 0x200\n\tS_IWGRP                       = 0x10\n\tS_IWOTH                       = 0x2\n\tS_IWRITE                      = 0x80\n\tS_IWUSR                       = 0x80\n\tS_IXGRP                       = 0x8\n\tS_IXOTH                       = 0x1\n\tS_IXUSR                       = 0x40\n\tTAB0                          = 0x0\n\tTAB1                          = 0x800\n\tTAB2                          = 0x1000\n\tTAB3                          = 0x1800\n\tTABDLY                        = 0x1800\n\tTCFLSH                        = 0x5407\n\tTCGETA                        = 0x5401\n\tTCGETS                        = 0x540d\n\tTCIFLUSH                      = 0x0\n\tTCIOFF                        = 0x2\n\tTCIOFLUSH                     = 0x2\n\tTCION                         = 0x3\n\tTCOFLUSH                      = 0x1\n\tTCOOFF                        = 0x0\n\tTCOON                         = 0x1\n\tTCP_ABORT_THRESHOLD           = 0x11\n\tTCP_ANONPRIVBIND              = 0x20\n\tTCP_CONGESTION                = 0x25\n\tTCP_CONN_ABORT_THRESHOLD      = 0x13\n\tTCP_CONN_NOTIFY_THRESHOLD     = 0x12\n\tTCP_CORK                      = 0x18\n\tTCP_EXCLBIND                  = 0x21\n\tTCP_INIT_CWND                 = 0x15\n\tTCP_KEEPALIVE                 = 0x8\n\tTCP_KEEPALIVE_ABORT_THRESHOLD = 0x17\n\tTCP_KEEPALIVE_THRESHOLD       = 0x16\n\tTCP_KEEPCNT                   = 0x23\n\tTCP_KEEPIDLE                  = 0x22\n\tTCP_KEEPINTVL                 = 0x24\n\tTCP_LINGER2                   = 0x1c\n\tTCP_MAXSEG                    = 0x2\n\tTCP_MSS                       = 0x218\n\tTCP_NODELAY                   = 0x1\n\tTCP_NOTIFY_THRESHOLD          = 0x10\n\tTCP_RECVDSTADDR               = 0x14\n\tTCP_RTO_INITIAL               = 0x19\n\tTCP_RTO_MAX                   = 0x1b\n\tTCP_RTO_MIN                   = 0x1a\n\tTCSAFLUSH                     = 0x5410\n\tTCSBRK                        = 0x5405\n\tTCSETA                        = 0x5402\n\tTCSETAF                       = 0x5404\n\tTCSETAW                       = 0x5403\n\tTCSETS                        = 0x540e\n\tTCSETSF                       = 0x5410\n\tTCSETSW                       = 0x540f\n\tTCXONC                        = 0x5406\n\tTIMER_ABSTIME                 = 0x1\n\tTIMER_RELTIME                 = 0x0\n\tTIOC                          = 0x5400\n\tTIOCCBRK                      = 0x747a\n\tTIOCCDTR                      = 0x7478\n\tTIOCCILOOP                    = 0x746c\n\tTIOCEXCL                      = 0x740d\n\tTIOCFLUSH                     = 0x7410\n\tTIOCGETC                      = 0x7412\n\tTIOCGETD                      = 0x7400\n\tTIOCGETP                      = 0x7408\n\tTIOCGLTC                      = 0x7474\n\tTIOCGPGRP                     = 0x7414\n\tTIOCGPPS                      = 0x547d\n\tTIOCGPPSEV                    = 0x547f\n\tTIOCGSID                      = 0x7416\n\tTIOCGSOFTCAR                  = 0x5469\n\tTIOCGWINSZ                    = 0x5468\n\tTIOCHPCL                      = 0x7402\n\tTIOCKBOF                      = 0x5409\n\tTIOCKBON                      = 0x5408\n\tTIOCLBIC                      = 0x747e\n\tTIOCLBIS                      = 0x747f\n\tTIOCLGET                      = 0x747c\n\tTIOCLSET                      = 0x747d\n\tTIOCMBIC                      = 0x741c\n\tTIOCMBIS                      = 0x741b\n\tTIOCMGET                      = 0x741d\n\tTIOCMSET                      = 0x741a\n\tTIOCM_CAR                     = 0x40\n\tTIOCM_CD                      = 0x40\n\tTIOCM_CTS                     = 0x20\n\tTIOCM_DSR                     = 0x100\n\tTIOCM_DTR                     = 0x2\n\tTIOCM_LE                      = 0x1\n\tTIOCM_RI                      = 0x80\n\tTIOCM_RNG                     = 0x80\n\tTIOCM_RTS                     = 0x4\n\tTIOCM_SR                      = 0x10\n\tTIOCM_ST                      = 0x8\n\tTIOCNOTTY                     = 0x7471\n\tTIOCNXCL                      = 0x740e\n\tTIOCOUTQ                      = 0x7473\n\tTIOCREMOTE                    = 0x741e\n\tTIOCSBRK                      = 0x747b\n\tTIOCSCTTY                     = 0x7484\n\tTIOCSDTR                      = 0x7479\n\tTIOCSETC                      = 0x7411\n\tTIOCSETD                      = 0x7401\n\tTIOCSETN                      = 0x740a\n\tTIOCSETP                      = 0x7409\n\tTIOCSIGNAL                    = 0x741f\n\tTIOCSILOOP                    = 0x746d\n\tTIOCSLTC                      = 0x7475\n\tTIOCSPGRP                     = 0x7415\n\tTIOCSPPS                      = 0x547e\n\tTIOCSSOFTCAR                  = 0x546a\n\tTIOCSTART                     = 0x746e\n\tTIOCSTI                       = 0x7417\n\tTIOCSTOP                      = 0x746f\n\tTIOCSWINSZ                    = 0x5467\n\tTOSTOP                        = 0x100\n\tUTIME_NOW                     = -0x1\n\tUTIME_OMIT                    = -0x2\n\tVCEOF                         = 0x8\n\tVCEOL                         = 0x9\n\tVDISCARD                      = 0xd\n\tVDSUSP                        = 0xb\n\tVEOF                          = 0x4\n\tVEOL                          = 0x5\n\tVEOL2                         = 0x6\n\tVERASE                        = 0x2\n\tVERASE2                       = 0x11\n\tVINTR                         = 0x0\n\tVKILL                         = 0x3\n\tVLNEXT                        = 0xf\n\tVMIN                          = 0x4\n\tVQUIT                         = 0x1\n\tVREPRINT                      = 0xc\n\tVSTART                        = 0x8\n\tVSTATUS                       = 0x10\n\tVSTOP                         = 0x9\n\tVSUSP                         = 0xa\n\tVSWTCH                        = 0x7\n\tVT0                           = 0x0\n\tVT1                           = 0x4000\n\tVTDLY                         = 0x4000\n\tVTIME                         = 0x5\n\tVWERASE                       = 0xe\n\tWCONTFLG                      = 0xffff\n\tWCONTINUED                    = 0x8\n\tWCOREFLG                      = 0x80\n\tWEXITED                       = 0x1\n\tWNOHANG                       = 0x40\n\tWNOWAIT                       = 0x80\n\tWOPTMASK                      = 0xcf\n\tWRAP                          = 0x20000\n\tWSIGMASK                      = 0x7f\n\tWSTOPFLG                      = 0x7f\n\tWSTOPPED                      = 0x4\n\tWTRAPPED                      = 0x2\n\tWUNTRACED                     = 0x4\n\tXCASE                         = 0x4\n\tXTABS                         = 0x1800\n)\n\n// Errors\nconst (\n\tE2BIG           = syscall.Errno(0x7)\n\tEACCES          = syscall.Errno(0xd)\n\tEADDRINUSE      = syscall.Errno(0x7d)\n\tEADDRNOTAVAIL   = syscall.Errno(0x7e)\n\tEADV            = syscall.Errno(0x44)\n\tEAFNOSUPPORT    = syscall.Errno(0x7c)\n\tEAGAIN          = syscall.Errno(0xb)\n\tEALREADY        = syscall.Errno(0x95)\n\tEBADE           = syscall.Errno(0x32)\n\tEBADF           = syscall.Errno(0x9)\n\tEBADFD          = syscall.Errno(0x51)\n\tEBADMSG         = syscall.Errno(0x4d)\n\tEBADR           = syscall.Errno(0x33)\n\tEBADRQC         = syscall.Errno(0x36)\n\tEBADSLT         = syscall.Errno(0x37)\n\tEBFONT          = syscall.Errno(0x39)\n\tEBUSY           = syscall.Errno(0x10)\n\tECANCELED       = syscall.Errno(0x2f)\n\tECHILD          = syscall.Errno(0xa)\n\tECHRNG          = syscall.Errno(0x25)\n\tECOMM           = syscall.Errno(0x46)\n\tECONNABORTED    = syscall.Errno(0x82)\n\tECONNREFUSED    = syscall.Errno(0x92)\n\tECONNRESET      = syscall.Errno(0x83)\n\tEDEADLK         = syscall.Errno(0x2d)\n\tEDEADLOCK       = syscall.Errno(0x38)\n\tEDESTADDRREQ    = syscall.Errno(0x60)\n\tEDOM            = syscall.Errno(0x21)\n\tEDQUOT          = syscall.Errno(0x31)\n\tEEXIST          = syscall.Errno(0x11)\n\tEFAULT          = syscall.Errno(0xe)\n\tEFBIG           = syscall.Errno(0x1b)\n\tEHOSTDOWN       = syscall.Errno(0x93)\n\tEHOSTUNREACH    = syscall.Errno(0x94)\n\tEIDRM           = syscall.Errno(0x24)\n\tEILSEQ          = syscall.Errno(0x58)\n\tEINPROGRESS     = syscall.Errno(0x96)\n\tEINTR           = syscall.Errno(0x4)\n\tEINVAL          = syscall.Errno(0x16)\n\tEIO             = syscall.Errno(0x5)\n\tEISCONN         = syscall.Errno(0x85)\n\tEISDIR          = syscall.Errno(0x15)\n\tEL2HLT          = syscall.Errno(0x2c)\n\tEL2NSYNC        = syscall.Errno(0x26)\n\tEL3HLT          = syscall.Errno(0x27)\n\tEL3RST          = syscall.Errno(0x28)\n\tELIBACC         = syscall.Errno(0x53)\n\tELIBBAD         = syscall.Errno(0x54)\n\tELIBEXEC        = syscall.Errno(0x57)\n\tELIBMAX         = syscall.Errno(0x56)\n\tELIBSCN         = syscall.Errno(0x55)\n\tELNRNG          = syscall.Errno(0x29)\n\tELOCKUNMAPPED   = syscall.Errno(0x48)\n\tELOOP           = syscall.Errno(0x5a)\n\tEMFILE          = syscall.Errno(0x18)\n\tEMLINK          = syscall.Errno(0x1f)\n\tEMSGSIZE        = syscall.Errno(0x61)\n\tEMULTIHOP       = syscall.Errno(0x4a)\n\tENAMETOOLONG    = syscall.Errno(0x4e)\n\tENETDOWN        = syscall.Errno(0x7f)\n\tENETRESET       = syscall.Errno(0x81)\n\tENETUNREACH     = syscall.Errno(0x80)\n\tENFILE          = syscall.Errno(0x17)\n\tENOANO          = syscall.Errno(0x35)\n\tENOBUFS         = syscall.Errno(0x84)\n\tENOCSI          = syscall.Errno(0x2b)\n\tENODATA         = syscall.Errno(0x3d)\n\tENODEV          = syscall.Errno(0x13)\n\tENOENT          = syscall.Errno(0x2)\n\tENOEXEC         = syscall.Errno(0x8)\n\tENOLCK          = syscall.Errno(0x2e)\n\tENOLINK         = syscall.Errno(0x43)\n\tENOMEM          = syscall.Errno(0xc)\n\tENOMSG          = syscall.Errno(0x23)\n\tENONET          = syscall.Errno(0x40)\n\tENOPKG          = syscall.Errno(0x41)\n\tENOPROTOOPT     = syscall.Errno(0x63)\n\tENOSPC          = syscall.Errno(0x1c)\n\tENOSR           = syscall.Errno(0x3f)\n\tENOSTR          = syscall.Errno(0x3c)\n\tENOSYS          = syscall.Errno(0x59)\n\tENOTACTIVE      = syscall.Errno(0x49)\n\tENOTBLK         = syscall.Errno(0xf)\n\tENOTCONN        = syscall.Errno(0x86)\n\tENOTDIR         = syscall.Errno(0x14)\n\tENOTEMPTY       = syscall.Errno(0x5d)\n\tENOTRECOVERABLE = syscall.Errno(0x3b)\n\tENOTSOCK        = syscall.Errno(0x5f)\n\tENOTSUP         = syscall.Errno(0x30)\n\tENOTTY          = syscall.Errno(0x19)\n\tENOTUNIQ        = syscall.Errno(0x50)\n\tENXIO           = syscall.Errno(0x6)\n\tEOPNOTSUPP      = syscall.Errno(0x7a)\n\tEOVERFLOW       = syscall.Errno(0x4f)\n\tEOWNERDEAD      = syscall.Errno(0x3a)\n\tEPERM           = syscall.Errno(0x1)\n\tEPFNOSUPPORT    = syscall.Errno(0x7b)\n\tEPIPE           = syscall.Errno(0x20)\n\tEPROTO          = syscall.Errno(0x47)\n\tEPROTONOSUPPORT = syscall.Errno(0x78)\n\tEPROTOTYPE      = syscall.Errno(0x62)\n\tERANGE          = syscall.Errno(0x22)\n\tEREMCHG         = syscall.Errno(0x52)\n\tEREMOTE         = syscall.Errno(0x42)\n\tERESTART        = syscall.Errno(0x5b)\n\tEROFS           = syscall.Errno(0x1e)\n\tESHUTDOWN       = syscall.Errno(0x8f)\n\tESOCKTNOSUPPORT = syscall.Errno(0x79)\n\tESPIPE          = syscall.Errno(0x1d)\n\tESRCH           = syscall.Errno(0x3)\n\tESRMNT          = syscall.Errno(0x45)\n\tESTALE          = syscall.Errno(0x97)\n\tESTRPIPE        = syscall.Errno(0x5c)\n\tETIME           = syscall.Errno(0x3e)\n\tETIMEDOUT       = syscall.Errno(0x91)\n\tETOOMANYREFS    = syscall.Errno(0x90)\n\tETXTBSY         = syscall.Errno(0x1a)\n\tEUNATCH         = syscall.Errno(0x2a)\n\tEUSERS          = syscall.Errno(0x5e)\n\tEWOULDBLOCK     = syscall.Errno(0xb)\n\tEXDEV           = syscall.Errno(0x12)\n\tEXFULL          = syscall.Errno(0x34)\n)\n\n// Signals\nconst (\n\tSIGABRT    = syscall.Signal(0x6)\n\tSIGALRM    = syscall.Signal(0xe)\n\tSIGBUS     = syscall.Signal(0xa)\n\tSIGCANCEL  = syscall.Signal(0x24)\n\tSIGCHLD    = syscall.Signal(0x12)\n\tSIGCLD     = syscall.Signal(0x12)\n\tSIGCONT    = syscall.Signal(0x19)\n\tSIGEMT     = syscall.Signal(0x7)\n\tSIGFPE     = syscall.Signal(0x8)\n\tSIGFREEZE  = syscall.Signal(0x22)\n\tSIGHUP     = syscall.Signal(0x1)\n\tSIGILL     = syscall.Signal(0x4)\n\tSIGINFO    = syscall.Signal(0x29)\n\tSIGINT     = syscall.Signal(0x2)\n\tSIGIO      = syscall.Signal(0x16)\n\tSIGIOT     = syscall.Signal(0x6)\n\tSIGJVM1    = syscall.Signal(0x27)\n\tSIGJVM2    = syscall.Signal(0x28)\n\tSIGKILL    = syscall.Signal(0x9)\n\tSIGLOST    = syscall.Signal(0x25)\n\tSIGLWP     = syscall.Signal(0x21)\n\tSIGPIPE    = syscall.Signal(0xd)\n\tSIGPOLL    = syscall.Signal(0x16)\n\tSIGPROF    = syscall.Signal(0x1d)\n\tSIGPWR     = syscall.Signal(0x13)\n\tSIGQUIT    = syscall.Signal(0x3)\n\tSIGSEGV    = syscall.Signal(0xb)\n\tSIGSTOP    = syscall.Signal(0x17)\n\tSIGSYS     = syscall.Signal(0xc)\n\tSIGTERM    = syscall.Signal(0xf)\n\tSIGTHAW    = syscall.Signal(0x23)\n\tSIGTRAP    = syscall.Signal(0x5)\n\tSIGTSTP    = syscall.Signal(0x18)\n\tSIGTTIN    = syscall.Signal(0x1a)\n\tSIGTTOU    = syscall.Signal(0x1b)\n\tSIGURG     = syscall.Signal(0x15)\n\tSIGUSR1    = syscall.Signal(0x10)\n\tSIGUSR2    = syscall.Signal(0x11)\n\tSIGVTALRM  = syscall.Signal(0x1c)\n\tSIGWAITING = syscall.Signal(0x20)\n\tSIGWINCH   = syscall.Signal(0x14)\n\tSIGXCPU    = syscall.Signal(0x1e)\n\tSIGXFSZ    = syscall.Signal(0x1f)\n\tSIGXRES    = syscall.Signal(0x26)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  syscall.Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EPERM\", \"not owner\"},\n\t{2, \"ENOENT\", \"no such file or directory\"},\n\t{3, \"ESRCH\", \"no such process\"},\n\t{4, \"EINTR\", \"interrupted system call\"},\n\t{5, \"EIO\", \"I/O error\"},\n\t{6, \"ENXIO\", \"no such device or address\"},\n\t{7, \"E2BIG\", \"arg list too long\"},\n\t{8, \"ENOEXEC\", \"exec format error\"},\n\t{9, \"EBADF\", \"bad file number\"},\n\t{10, \"ECHILD\", \"no child processes\"},\n\t{11, \"EAGAIN\", \"resource temporarily unavailable\"},\n\t{12, \"ENOMEM\", \"not enough space\"},\n\t{13, \"EACCES\", \"permission denied\"},\n\t{14, \"EFAULT\", \"bad address\"},\n\t{15, \"ENOTBLK\", \"block device required\"},\n\t{16, \"EBUSY\", \"device busy\"},\n\t{17, \"EEXIST\", \"file exists\"},\n\t{18, \"EXDEV\", \"cross-device link\"},\n\t{19, \"ENODEV\", \"no such device\"},\n\t{20, \"ENOTDIR\", \"not a directory\"},\n\t{21, \"EISDIR\", \"is a directory\"},\n\t{22, \"EINVAL\", \"invalid argument\"},\n\t{23, \"ENFILE\", \"file table overflow\"},\n\t{24, \"EMFILE\", \"too many open files\"},\n\t{25, \"ENOTTY\", \"inappropriate ioctl for device\"},\n\t{26, \"ETXTBSY\", \"text file busy\"},\n\t{27, \"EFBIG\", \"file too large\"},\n\t{28, \"ENOSPC\", \"no space left on device\"},\n\t{29, \"ESPIPE\", \"illegal seek\"},\n\t{30, \"EROFS\", \"read-only file system\"},\n\t{31, \"EMLINK\", \"too many links\"},\n\t{32, \"EPIPE\", \"broken pipe\"},\n\t{33, \"EDOM\", \"argument out of domain\"},\n\t{34, \"ERANGE\", \"result too large\"},\n\t{35, \"ENOMSG\", \"no message of desired type\"},\n\t{36, \"EIDRM\", \"identifier removed\"},\n\t{37, \"ECHRNG\", \"channel number out of range\"},\n\t{38, \"EL2NSYNC\", \"level 2 not synchronized\"},\n\t{39, \"EL3HLT\", \"level 3 halted\"},\n\t{40, \"EL3RST\", \"level 3 reset\"},\n\t{41, \"ELNRNG\", \"link number out of range\"},\n\t{42, \"EUNATCH\", \"protocol driver not attached\"},\n\t{43, \"ENOCSI\", \"no CSI structure available\"},\n\t{44, \"EL2HLT\", \"level 2 halted\"},\n\t{45, \"EDEADLK\", \"deadlock situation detected/avoided\"},\n\t{46, \"ENOLCK\", \"no record locks available\"},\n\t{47, \"ECANCELED\", \"operation canceled\"},\n\t{48, \"ENOTSUP\", \"operation not supported\"},\n\t{49, \"EDQUOT\", \"disc quota exceeded\"},\n\t{50, \"EBADE\", \"bad exchange descriptor\"},\n\t{51, \"EBADR\", \"bad request descriptor\"},\n\t{52, \"EXFULL\", \"message tables full\"},\n\t{53, \"ENOANO\", \"anode table overflow\"},\n\t{54, \"EBADRQC\", \"bad request code\"},\n\t{55, \"EBADSLT\", \"invalid slot\"},\n\t{56, \"EDEADLOCK\", \"file locking deadlock\"},\n\t{57, \"EBFONT\", \"bad font file format\"},\n\t{58, \"EOWNERDEAD\", \"owner of the lock died\"},\n\t{59, \"ENOTRECOVERABLE\", \"lock is not recoverable\"},\n\t{60, \"ENOSTR\", \"not a stream device\"},\n\t{61, \"ENODATA\", \"no data available\"},\n\t{62, \"ETIME\", \"timer expired\"},\n\t{63, \"ENOSR\", \"out of stream resources\"},\n\t{64, \"ENONET\", \"machine is not on the network\"},\n\t{65, \"ENOPKG\", \"package not installed\"},\n\t{66, \"EREMOTE\", \"object is remote\"},\n\t{67, \"ENOLINK\", \"link has been severed\"},\n\t{68, \"EADV\", \"advertise error\"},\n\t{69, \"ESRMNT\", \"srmount error\"},\n\t{70, \"ECOMM\", \"communication error on send\"},\n\t{71, \"EPROTO\", \"protocol error\"},\n\t{72, \"ELOCKUNMAPPED\", \"locked lock was unmapped \"},\n\t{73, \"ENOTACTIVE\", \"facility is not active\"},\n\t{74, \"EMULTIHOP\", \"multihop attempted\"},\n\t{77, \"EBADMSG\", \"not a data message\"},\n\t{78, \"ENAMETOOLONG\", \"file name too long\"},\n\t{79, \"EOVERFLOW\", \"value too large for defined data type\"},\n\t{80, \"ENOTUNIQ\", \"name not unique on network\"},\n\t{81, \"EBADFD\", \"file descriptor in bad state\"},\n\t{82, \"EREMCHG\", \"remote address changed\"},\n\t{83, \"ELIBACC\", \"can not access a needed shared library\"},\n\t{84, \"ELIBBAD\", \"accessing a corrupted shared library\"},\n\t{85, \"ELIBSCN\", \".lib section in a.out corrupted\"},\n\t{86, \"ELIBMAX\", \"attempting to link in more shared libraries than system limit\"},\n\t{87, \"ELIBEXEC\", \"can not exec a shared library directly\"},\n\t{88, \"EILSEQ\", \"illegal byte sequence\"},\n\t{89, \"ENOSYS\", \"operation not applicable\"},\n\t{90, \"ELOOP\", \"number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS\"},\n\t{91, \"ERESTART\", \"error 91\"},\n\t{92, \"ESTRPIPE\", \"error 92\"},\n\t{93, \"ENOTEMPTY\", \"directory not empty\"},\n\t{94, \"EUSERS\", \"too many users\"},\n\t{95, \"ENOTSOCK\", \"socket operation on non-socket\"},\n\t{96, \"EDESTADDRREQ\", \"destination address required\"},\n\t{97, \"EMSGSIZE\", \"message too long\"},\n\t{98, \"EPROTOTYPE\", \"protocol wrong type for socket\"},\n\t{99, \"ENOPROTOOPT\", \"option not supported by protocol\"},\n\t{120, \"EPROTONOSUPPORT\", \"protocol not supported\"},\n\t{121, \"ESOCKTNOSUPPORT\", \"socket type not supported\"},\n\t{122, \"EOPNOTSUPP\", \"operation not supported on transport endpoint\"},\n\t{123, \"EPFNOSUPPORT\", \"protocol family not supported\"},\n\t{124, \"EAFNOSUPPORT\", \"address family not supported by protocol family\"},\n\t{125, \"EADDRINUSE\", \"address already in use\"},\n\t{126, \"EADDRNOTAVAIL\", \"cannot assign requested address\"},\n\t{127, \"ENETDOWN\", \"network is down\"},\n\t{128, \"ENETUNREACH\", \"network is unreachable\"},\n\t{129, \"ENETRESET\", \"network dropped connection because of reset\"},\n\t{130, \"ECONNABORTED\", \"software caused connection abort\"},\n\t{131, \"ECONNRESET\", \"connection reset by peer\"},\n\t{132, \"ENOBUFS\", \"no buffer space available\"},\n\t{133, \"EISCONN\", \"transport endpoint is already connected\"},\n\t{134, \"ENOTCONN\", \"transport endpoint is not connected\"},\n\t{143, \"ESHUTDOWN\", \"cannot send after socket shutdown\"},\n\t{144, \"ETOOMANYREFS\", \"too many references: cannot splice\"},\n\t{145, \"ETIMEDOUT\", \"connection timed out\"},\n\t{146, \"ECONNREFUSED\", \"connection refused\"},\n\t{147, \"EHOSTDOWN\", \"host is down\"},\n\t{148, \"EHOSTUNREACH\", \"no route to host\"},\n\t{149, \"EALREADY\", \"operation already in progress\"},\n\t{150, \"EINPROGRESS\", \"operation now in progress\"},\n\t{151, \"ESTALE\", \"stale NFS file handle\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  syscall.Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGQUIT\", \"quit\"},\n\t{4, \"SIGILL\", \"illegal Instruction\"},\n\t{5, \"SIGTRAP\", \"trace/Breakpoint Trap\"},\n\t{6, \"SIGABRT\", \"abort\"},\n\t{7, \"SIGEMT\", \"emulation Trap\"},\n\t{8, \"SIGFPE\", \"arithmetic Exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus Error\"},\n\t{11, \"SIGSEGV\", \"segmentation Fault\"},\n\t{12, \"SIGSYS\", \"bad System Call\"},\n\t{13, \"SIGPIPE\", \"broken Pipe\"},\n\t{14, \"SIGALRM\", \"alarm Clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user Signal 1\"},\n\t{17, \"SIGUSR2\", \"user Signal 2\"},\n\t{18, \"SIGCHLD\", \"child Status Changed\"},\n\t{19, \"SIGPWR\", \"power-Fail/Restart\"},\n\t{20, \"SIGWINCH\", \"window Size Change\"},\n\t{21, \"SIGURG\", \"urgent Socket Condition\"},\n\t{22, \"SIGIO\", \"pollable Event\"},\n\t{23, \"SIGSTOP\", \"stopped (signal)\"},\n\t{24, \"SIGTSTP\", \"stopped (user)\"},\n\t{25, \"SIGCONT\", \"continued\"},\n\t{26, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{27, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{28, \"SIGVTALRM\", \"virtual Timer Expired\"},\n\t{29, \"SIGPROF\", \"profiling Timer Expired\"},\n\t{30, \"SIGXCPU\", \"cpu Limit Exceeded\"},\n\t{31, \"SIGXFSZ\", \"file Size Limit Exceeded\"},\n\t{32, \"SIGWAITING\", \"no runnable lwp\"},\n\t{33, \"SIGLWP\", \"inter-lwp signal\"},\n\t{34, \"SIGFREEZE\", \"checkpoint Freeze\"},\n\t{35, \"SIGTHAW\", \"checkpoint Thaw\"},\n\t{36, \"SIGCANCEL\", \"thread Cancellation\"},\n\t{37, \"SIGLOST\", \"resource Lost\"},\n\t{38, \"SIGXRES\", \"resource Control Exceeded\"},\n\t{39, \"SIGJVM1\", \"reserved for JVM 1\"},\n\t{40, \"SIGJVM2\", \"reserved for JVM 2\"},\n\t{41, \"SIGINFO\", \"information Request\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x\n\n// Hand edited based on zerrors_linux_s390x.go\n// TODO: auto-generate.\n\npackage unix\n\nconst (\n\tBRKINT                   = 0x0001\n\tCLOCAL                   = 0x1\n\tCLOCK_MONOTONIC          = 0x1\n\tCLOCK_PROCESS_CPUTIME_ID = 0x2\n\tCLOCK_REALTIME           = 0x0\n\tCLOCK_THREAD_CPUTIME_ID  = 0x3\n\tCLONE_NEWIPC             = 0x08000000\n\tCLONE_NEWNET             = 0x40000000\n\tCLONE_NEWNS              = 0x00020000\n\tCLONE_NEWPID             = 0x20000000\n\tCLONE_NEWUTS             = 0x04000000\n\tCLONE_PARENT             = 0x00008000\n\tCS8                      = 0x0030\n\tCSIZE                    = 0x0030\n\tECHO                     = 0x00000008\n\tECHONL                   = 0x00000001\n\tEFD_SEMAPHORE            = 0x00002000\n\tEFD_CLOEXEC              = 0x00001000\n\tEFD_NONBLOCK             = 0x00000004\n\tEPOLL_CLOEXEC            = 0x00001000\n\tEPOLL_CTL_ADD            = 0\n\tEPOLL_CTL_MOD            = 1\n\tEPOLL_CTL_DEL            = 2\n\tEPOLLRDNORM              = 0x0001\n\tEPOLLRDBAND              = 0x0002\n\tEPOLLIN                  = 0x0003\n\tEPOLLOUT                 = 0x0004\n\tEPOLLWRBAND              = 0x0008\n\tEPOLLPRI                 = 0x0010\n\tEPOLLERR                 = 0x0020\n\tEPOLLHUP                 = 0x0040\n\tEPOLLEXCLUSIVE           = 0x20000000\n\tEPOLLONESHOT             = 0x40000000\n\tFD_CLOEXEC               = 0x01\n\tFD_CLOFORK               = 0x02\n\tFD_SETSIZE               = 0x800\n\tFNDELAY                  = 0x04\n\tF_CLOSFD                 = 9\n\tF_CONTROL_CVT            = 13\n\tF_DUPFD                  = 0\n\tF_DUPFD2                 = 8\n\tF_GETFD                  = 1\n\tF_GETFL                  = 259\n\tF_GETLK                  = 5\n\tF_GETOWN                 = 10\n\tF_OK                     = 0x0\n\tF_RDLCK                  = 1\n\tF_SETFD                  = 2\n\tF_SETFL                  = 4\n\tF_SETLK                  = 6\n\tF_SETLKW                 = 7\n\tF_SETOWN                 = 11\n\tF_SETTAG                 = 12\n\tF_UNLCK                  = 3\n\tF_WRLCK                  = 2\n\tFSTYPE_ZFS               = 0xe9 //\"Z\"\n\tFSTYPE_HFS               = 0xc8 //\"H\"\n\tFSTYPE_NFS               = 0xd5 //\"N\"\n\tFSTYPE_TFS               = 0xe3 //\"T\"\n\tFSTYPE_AUTOMOUNT         = 0xc1 //\"A\"\n\tGRND_NONBLOCK            = 1\n\tGRND_RANDOM              = 2\n\tHUPCL                    = 0x0100 // Hang up on last close\n\tIN_CLOEXEC               = 0x00001000\n\tIN_NONBLOCK              = 0x00000004\n\tIN_ACCESS                = 0x00000001\n\tIN_MODIFY                = 0x00000002\n\tIN_ATTRIB                = 0x00000004\n\tIN_CLOSE_WRITE           = 0x00000008\n\tIN_CLOSE_NOWRITE         = 0x00000010\n\tIN_OPEN                  = 0x00000020\n\tIN_MOVED_FROM            = 0x00000040\n\tIN_MOVED_TO              = 0x00000080\n\tIN_CREATE                = 0x00000100\n\tIN_DELETE                = 0x00000200\n\tIN_DELETE_SELF           = 0x00000400\n\tIN_MOVE_SELF             = 0x00000800\n\tIN_UNMOUNT               = 0x00002000\n\tIN_Q_OVERFLOW            = 0x00004000\n\tIN_IGNORED               = 0x00008000\n\tIN_CLOSE                 = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)\n\tIN_MOVE                  = (IN_MOVED_FROM | IN_MOVED_TO)\n\tIN_ALL_EVENTS            = (IN_ACCESS | IN_MODIFY | IN_ATTRIB |\n\t\tIN_CLOSE | IN_OPEN | IN_MOVE |\n\t\tIN_CREATE | IN_DELETE | IN_DELETE_SELF |\n\t\tIN_MOVE_SELF)\n\tIN_ONLYDIR                      = 0x01000000\n\tIN_DONT_FOLLOW                  = 0x02000000\n\tIN_EXCL_UNLINK                  = 0x04000000\n\tIN_MASK_CREATE                  = 0x10000000\n\tIN_MASK_ADD                     = 0x20000000\n\tIN_ISDIR                        = 0x40000000\n\tIN_ONESHOT                      = 0x80000000\n\tIP6F_MORE_FRAG                  = 0x0001\n\tIP6F_OFF_MASK                   = 0xfff8\n\tIP6F_RESERVED_MASK              = 0x0006\n\tIP6OPT_JUMBO                    = 0xc2\n\tIP6OPT_JUMBO_LEN                = 6\n\tIP6OPT_MUTABLE                  = 0x20\n\tIP6OPT_NSAP_ADDR                = 0xc3\n\tIP6OPT_PAD1                     = 0x00\n\tIP6OPT_PADN                     = 0x01\n\tIP6OPT_ROUTER_ALERT             = 0x05\n\tIP6OPT_TUNNEL_LIMIT             = 0x04\n\tIP6OPT_TYPE_DISCARD             = 0x40\n\tIP6OPT_TYPE_FORCEICMP           = 0x80\n\tIP6OPT_TYPE_ICMP                = 0xc0\n\tIP6OPT_TYPE_SKIP                = 0x00\n\tIP6_ALERT_AN                    = 0x0002\n\tIP6_ALERT_MLD                   = 0x0000\n\tIP6_ALERT_RSVP                  = 0x0001\n\tIPPORT_RESERVED                 = 1024\n\tIPPORT_USERRESERVED             = 5000\n\tIPPROTO_AH                      = 51\n\tSOL_AH                          = 51\n\tIPPROTO_DSTOPTS                 = 60\n\tSOL_DSTOPTS                     = 60\n\tIPPROTO_EGP                     = 8\n\tSOL_EGP                         = 8\n\tIPPROTO_ESP                     = 50\n\tSOL_ESP                         = 50\n\tIPPROTO_FRAGMENT                = 44\n\tSOL_FRAGMENT                    = 44\n\tIPPROTO_GGP                     = 2\n\tSOL_GGP                         = 2\n\tIPPROTO_HOPOPTS                 = 0\n\tSOL_HOPOPTS                     = 0\n\tIPPROTO_ICMP                    = 1\n\tSOL_ICMP                        = 1\n\tIPPROTO_ICMPV6                  = 58\n\tSOL_ICMPV6                      = 58\n\tIPPROTO_IDP                     = 22\n\tSOL_IDP                         = 22\n\tIPPROTO_IP                      = 0\n\tSOL_IP                          = 0\n\tIPPROTO_IPV6                    = 41\n\tSOL_IPV6                        = 41\n\tIPPROTO_MAX                     = 256\n\tSOL_MAX                         = 256\n\tIPPROTO_NONE                    = 59\n\tSOL_NONE                        = 59\n\tIPPROTO_PUP                     = 12\n\tSOL_PUP                         = 12\n\tIPPROTO_RAW                     = 255\n\tSOL_RAW                         = 255\n\tIPPROTO_ROUTING                 = 43\n\tSOL_ROUTING                     = 43\n\tIPPROTO_TCP                     = 6\n\tSOL_TCP                         = 6\n\tIPPROTO_UDP                     = 17\n\tSOL_UDP                         = 17\n\tIPV6_ADDR_PREFERENCES           = 32\n\tIPV6_CHECKSUM                   = 19\n\tIPV6_DONTFRAG                   = 29\n\tIPV6_DSTOPTS                    = 23\n\tIPV6_HOPLIMIT                   = 11\n\tIPV6_HOPOPTS                    = 22\n\tIPV6_JOIN_GROUP                 = 5\n\tIPV6_LEAVE_GROUP                = 6\n\tIPV6_MULTICAST_HOPS             = 9\n\tIPV6_MULTICAST_IF               = 7\n\tIPV6_MULTICAST_LOOP             = 4\n\tIPV6_NEXTHOP                    = 20\n\tIPV6_PATHMTU                    = 12\n\tIPV6_PKTINFO                    = 13\n\tIPV6_PREFER_SRC_CGA             = 0x10\n\tIPV6_PREFER_SRC_COA             = 0x02\n\tIPV6_PREFER_SRC_HOME            = 0x01\n\tIPV6_PREFER_SRC_NONCGA          = 0x20\n\tIPV6_PREFER_SRC_PUBLIC          = 0x08\n\tIPV6_PREFER_SRC_TMP             = 0x04\n\tIPV6_RECVDSTOPTS                = 28\n\tIPV6_RECVHOPLIMIT               = 14\n\tIPV6_RECVHOPOPTS                = 26\n\tIPV6_RECVPATHMTU                = 16\n\tIPV6_RECVPKTINFO                = 15\n\tIPV6_RECVRTHDR                  = 25\n\tIPV6_RECVTCLASS                 = 31\n\tIPV6_RTHDR                      = 21\n\tIPV6_RTHDRDSTOPTS               = 24\n\tIPV6_RTHDR_TYPE_0               = 0\n\tIPV6_TCLASS                     = 30\n\tIPV6_UNICAST_HOPS               = 3\n\tIPV6_USE_MIN_MTU                = 18\n\tIPV6_V6ONLY                     = 10\n\tIP_ADD_MEMBERSHIP               = 5\n\tIP_ADD_SOURCE_MEMBERSHIP        = 12\n\tIP_BLOCK_SOURCE                 = 10\n\tIP_DEFAULT_MULTICAST_LOOP       = 1\n\tIP_DEFAULT_MULTICAST_TTL        = 1\n\tIP_DROP_MEMBERSHIP              = 6\n\tIP_DROP_SOURCE_MEMBERSHIP       = 13\n\tIP_MAX_MEMBERSHIPS              = 20\n\tIP_MULTICAST_IF                 = 7\n\tIP_MULTICAST_LOOP               = 4\n\tIP_MULTICAST_TTL                = 3\n\tIP_OPTIONS                      = 1\n\tIP_PKTINFO                      = 101\n\tIP_RECVPKTINFO                  = 102\n\tIP_TOS                          = 2\n\tIP_TTL                          = 14\n\tIP_UNBLOCK_SOURCE               = 11\n\tICMP6_FILTER                    = 1\n\tMCAST_INCLUDE                   = 0\n\tMCAST_EXCLUDE                   = 1\n\tMCAST_JOIN_GROUP                = 40\n\tMCAST_LEAVE_GROUP               = 41\n\tMCAST_JOIN_SOURCE_GROUP         = 42\n\tMCAST_LEAVE_SOURCE_GROUP        = 43\n\tMCAST_BLOCK_SOURCE              = 44\n\tMCAST_UNBLOCK_SOURCE            = 46\n\tICANON                          = 0x0010\n\tICRNL                           = 0x0002\n\tIEXTEN                          = 0x0020\n\tIGNBRK                          = 0x0004\n\tIGNCR                           = 0x0008\n\tINLCR                           = 0x0020\n\tISIG                            = 0x0040\n\tISTRIP                          = 0x0080\n\tIXON                            = 0x0200\n\tIXOFF                           = 0x0100\n\tLOCK_SH                         = 0x1\n\tLOCK_EX                         = 0x2\n\tLOCK_NB                         = 0x4\n\tLOCK_UN                         = 0x8\n\tPOLLIN                          = 0x0003\n\tPOLLOUT                         = 0x0004\n\tPOLLPRI                         = 0x0010\n\tPOLLERR                         = 0x0020\n\tPOLLHUP                         = 0x0040\n\tPOLLNVAL                        = 0x0080\n\tPROT_READ                       = 0x1 // mmap - page can be read\n\tPROT_WRITE                      = 0x2 // page can be written\n\tPROT_NONE                       = 0x4 // can't be accessed\n\tPROT_EXEC                       = 0x8 // can be executed\n\tMAP_PRIVATE                     = 0x1 // changes are private\n\tMAP_SHARED                      = 0x2 // changes are shared\n\tMAP_FIXED                       = 0x4 // place exactly\n\t__MAP_MEGA                      = 0x8\n\t__MAP_64                        = 0x10\n\tMAP_ANON                        = 0x20\n\tMAP_ANONYMOUS                   = 0x20\n\tMS_SYNC                         = 0x1 // msync - synchronous writes\n\tMS_ASYNC                        = 0x2 // asynchronous writes\n\tMS_INVALIDATE                   = 0x4 // invalidate mappings\n\tMS_BIND                         = 0x00001000\n\tMS_MOVE                         = 0x00002000\n\tMS_NOSUID                       = 0x00000002\n\tMS_PRIVATE                      = 0x00040000\n\tMS_REC                          = 0x00004000\n\tMS_REMOUNT                      = 0x00008000\n\tMS_RDONLY                       = 0x00000001\n\tMS_UNBINDABLE                   = 0x00020000\n\tMNT_DETACH                      = 0x00000004\n\tZOSDSFS_SUPER_MAGIC             = 0x44534653 // zOS DSFS\n\tNFS_SUPER_MAGIC                 = 0x6969     // NFS\n\tNSFS_MAGIC                      = 0x6e736673 // PROCNS\n\tPROC_SUPER_MAGIC                = 0x9fa0     // proc FS\n\tZOSTFS_SUPER_MAGIC              = 0x544653   // zOS TFS\n\tZOSUFS_SUPER_MAGIC              = 0x554653   // zOS UFS\n\tZOSZFS_SUPER_MAGIC              = 0x5A4653   // zOS ZFS\n\tMTM_RDONLY                      = 0x80000000\n\tMTM_RDWR                        = 0x40000000\n\tMTM_UMOUNT                      = 0x10000000\n\tMTM_IMMED                       = 0x08000000\n\tMTM_FORCE                       = 0x04000000\n\tMTM_DRAIN                       = 0x02000000\n\tMTM_RESET                       = 0x01000000\n\tMTM_SAMEMODE                    = 0x00100000\n\tMTM_UNQSEFORCE                  = 0x00040000\n\tMTM_NOSUID                      = 0x00000400\n\tMTM_SYNCHONLY                   = 0x00000200\n\tMTM_REMOUNT                     = 0x00000100\n\tMTM_NOSECURITY                  = 0x00000080\n\tNFDBITS                         = 0x20\n\tONLRET                          = 0x0020 // NL performs CR function\n\tO_ACCMODE                       = 0x03\n\tO_APPEND                        = 0x08\n\tO_ASYNCSIG                      = 0x0200\n\tO_CREAT                         = 0x80\n\tO_DIRECT                        = 0x00002000\n\tO_NOFOLLOW                      = 0x00004000\n\tO_DIRECTORY                     = 0x00008000\n\tO_PATH                          = 0x00080000\n\tO_CLOEXEC                       = 0x00001000\n\tO_EXCL                          = 0x40\n\tO_GETFL                         = 0x0F\n\tO_LARGEFILE                     = 0x0400\n\tO_NDELAY                        = 0x4\n\tO_NONBLOCK                      = 0x04\n\tO_RDONLY                        = 0x02\n\tO_RDWR                          = 0x03\n\tO_SYNC                          = 0x0100\n\tO_TRUNC                         = 0x10\n\tO_WRONLY                        = 0x01\n\tO_NOCTTY                        = 0x20\n\tOPOST                           = 0x0001\n\tONLCR                           = 0x0004\n\tPARENB                          = 0x0200\n\tPARMRK                          = 0x0400\n\tQUERYCVT                        = 3\n\tRUSAGE_CHILDREN                 = -0x1\n\tRUSAGE_SELF                     = 0x0 // RUSAGE_THREAD unsupported on z/OS\n\tSEEK_CUR                        = 1\n\tSEEK_END                        = 2\n\tSEEK_SET                        = 0\n\tSETAUTOCVTALL                   = 5\n\tSETAUTOCVTON                    = 2\n\tSETCVTALL                       = 4\n\tSETCVTOFF                       = 0\n\tSETCVTON                        = 1\n\tAF_APPLETALK                    = 16\n\tAF_CCITT                        = 10\n\tAF_CHAOS                        = 5\n\tAF_DATAKIT                      = 9\n\tAF_DLI                          = 13\n\tAF_ECMA                         = 8\n\tAF_HYLINK                       = 15\n\tAF_IMPLINK                      = 3\n\tAF_INET                         = 2\n\tAF_INET6                        = 19\n\tAF_INTF                         = 20\n\tAF_IUCV                         = 17\n\tAF_LAT                          = 14\n\tAF_LINK                         = 18\n\tAF_LOCAL                        = AF_UNIX // AF_LOCAL is an alias for AF_UNIX\n\tAF_MAX                          = 30\n\tAF_NBS                          = 7\n\tAF_NDD                          = 23\n\tAF_NETWARE                      = 22\n\tAF_NS                           = 6\n\tAF_PUP                          = 4\n\tAF_RIF                          = 21\n\tAF_ROUTE                        = 20\n\tAF_SNA                          = 11\n\tAF_UNIX                         = 1\n\tAF_UNSPEC                       = 0\n\tIBMTCP_IMAGE                    = 1\n\tMSG_ACK_EXPECTED                = 0x10\n\tMSG_ACK_GEN                     = 0x40\n\tMSG_ACK_TIMEOUT                 = 0x20\n\tMSG_CONNTERM                    = 0x80\n\tMSG_CTRUNC                      = 0x20\n\tMSG_DONTROUTE                   = 0x4\n\tMSG_EOF                         = 0x8000\n\tMSG_EOR                         = 0x8\n\tMSG_MAXIOVLEN                   = 16\n\tMSG_NONBLOCK                    = 0x4000\n\tMSG_OOB                         = 0x1\n\tMSG_PEEK                        = 0x2\n\tMSG_TRUNC                       = 0x10\n\tMSG_WAITALL                     = 0x40\n\tPRIO_PROCESS                    = 1\n\tPRIO_PGRP                       = 2\n\tPRIO_USER                       = 3\n\tRLIMIT_CPU                      = 0\n\tRLIMIT_FSIZE                    = 1\n\tRLIMIT_DATA                     = 2\n\tRLIMIT_STACK                    = 3\n\tRLIMIT_CORE                     = 4\n\tRLIMIT_AS                       = 5\n\tRLIMIT_NOFILE                   = 6\n\tRLIMIT_MEMLIMIT                 = 7\n\tRLIMIT_MEMLOCK                  = 0x8\n\tRLIM_INFINITY                   = 2147483647\n\tSCHED_FIFO                      = 0x2\n\tSCM_CREDENTIALS                 = 0x2\n\tSCM_RIGHTS                      = 0x01\n\tSF_CLOSE                        = 0x00000002\n\tSF_REUSE                        = 0x00000001\n\tSHM_RND                         = 0x2\n\tSHM_RDONLY                      = 0x1\n\tSHMLBA                          = 0x1000\n\tIPC_STAT                        = 0x3\n\tIPC_SET                         = 0x2\n\tIPC_RMID                        = 0x1\n\tIPC_PRIVATE                     = 0x0\n\tIPC_CREAT                       = 0x1000000\n\t__IPC_MEGA                      = 0x4000000\n\t__IPC_SHAREAS                   = 0x20000000\n\t__IPC_BELOWBAR                  = 0x10000000\n\tIPC_EXCL                        = 0x2000000\n\t__IPC_GIGA                      = 0x8000000\n\tSHUT_RD                         = 0\n\tSHUT_RDWR                       = 2\n\tSHUT_WR                         = 1\n\tSOCK_CLOEXEC                    = 0x00001000\n\tSOCK_CONN_DGRAM                 = 6\n\tSOCK_DGRAM                      = 2\n\tSOCK_NONBLOCK                   = 0x800\n\tSOCK_RAW                        = 3\n\tSOCK_RDM                        = 4\n\tSOCK_SEQPACKET                  = 5\n\tSOCK_STREAM                     = 1\n\tSOL_SOCKET                      = 0xffff\n\tSOMAXCONN                       = 10\n\tSO_ACCEPTCONN                   = 0x0002\n\tSO_ACCEPTECONNABORTED           = 0x0006\n\tSO_ACKNOW                       = 0x7700\n\tSO_BROADCAST                    = 0x0020\n\tSO_BULKMODE                     = 0x8000\n\tSO_CKSUMRECV                    = 0x0800\n\tSO_CLOSE                        = 0x01\n\tSO_CLUSTERCONNTYPE              = 0x00004001\n\tSO_CLUSTERCONNTYPE_INTERNAL     = 8\n\tSO_CLUSTERCONNTYPE_NOCONN       = 0\n\tSO_CLUSTERCONNTYPE_NONE         = 1\n\tSO_CLUSTERCONNTYPE_SAME_CLUSTER = 2\n\tSO_CLUSTERCONNTYPE_SAME_IMAGE   = 4\n\tSO_DEBUG                        = 0x0001\n\tSO_DONTROUTE                    = 0x0010\n\tSO_ERROR                        = 0x1007\n\tSO_IGNOREINCOMINGPUSH           = 0x1\n\tSO_IGNORESOURCEVIPA             = 0x0002\n\tSO_KEEPALIVE                    = 0x0008\n\tSO_LINGER                       = 0x0080\n\tSO_NONBLOCKLOCAL                = 0x8001\n\tSO_NOREUSEADDR                  = 0x1000\n\tSO_OOBINLINE                    = 0x0100\n\tSO_OPTACK                       = 0x8004\n\tSO_OPTMSS                       = 0x8003\n\tSO_RCVBUF                       = 0x1002\n\tSO_RCVLOWAT                     = 0x1004\n\tSO_RCVTIMEO                     = 0x1006\n\tSO_REUSEADDR                    = 0x0004\n\tSO_REUSEPORT                    = 0x0200\n\tSO_SECINFO                      = 0x00004002\n\tSO_SET                          = 0x0200\n\tSO_SNDBUF                       = 0x1001\n\tSO_SNDLOWAT                     = 0x1003\n\tSO_SNDTIMEO                     = 0x1005\n\tSO_TYPE                         = 0x1008\n\tSO_UNSET                        = 0x0400\n\tSO_USELOOPBACK                  = 0x0040\n\tSO_USE_IFBUFS                   = 0x0400\n\tS_ISUID                         = 0x0800\n\tS_ISGID                         = 0x0400\n\tS_ISVTX                         = 0x0200\n\tS_IRUSR                         = 0x0100\n\tS_IWUSR                         = 0x0080\n\tS_IXUSR                         = 0x0040\n\tS_IRWXU                         = 0x01C0\n\tS_IRGRP                         = 0x0020\n\tS_IWGRP                         = 0x0010\n\tS_IXGRP                         = 0x0008\n\tS_IRWXG                         = 0x0038\n\tS_IROTH                         = 0x0004\n\tS_IWOTH                         = 0x0002\n\tS_IXOTH                         = 0x0001\n\tS_IRWXO                         = 0x0007\n\tS_IREAD                         = S_IRUSR\n\tS_IWRITE                        = S_IWUSR\n\tS_IEXEC                         = S_IXUSR\n\tS_IFDIR                         = 0x01000000\n\tS_IFCHR                         = 0x02000000\n\tS_IFREG                         = 0x03000000\n\tS_IFFIFO                        = 0x04000000\n\tS_IFIFO                         = 0x04000000\n\tS_IFLNK                         = 0x05000000\n\tS_IFBLK                         = 0x06000000\n\tS_IFSOCK                        = 0x07000000\n\tS_IFVMEXTL                      = 0xFE000000\n\tS_IFVMEXTL_EXEC                 = 0x00010000\n\tS_IFVMEXTL_DATA                 = 0x00020000\n\tS_IFVMEXTL_MEL                  = 0x00030000\n\tS_IFEXTL                        = 0x00000001\n\tS_IFPROGCTL                     = 0x00000002\n\tS_IFAPFCTL                      = 0x00000004\n\tS_IFNOSHARE                     = 0x00000008\n\tS_IFSHARELIB                    = 0x00000010\n\tS_IFMT                          = 0xFF000000\n\tS_IFMST                         = 0x00FF0000\n\tTCP_KEEPALIVE                   = 0x8\n\tTCP_NODELAY                     = 0x1\n\tTIOCGWINSZ                      = 0x4008a368\n\tTIOCSWINSZ                      = 0x8008a367\n\tTIOCSBRK                        = 0x2000a77b\n\tTIOCCBRK                        = 0x2000a77a\n\tTIOCSTI                         = 0x8001a772\n\tTIOCGPGRP                       = 0x4004a777 // _IOR(167, 119, int)\n\tTCSANOW                         = 0\n\tTCSETS                          = 0 // equivalent to TCSANOW for tcsetattr\n\tTCSADRAIN                       = 1\n\tTCSETSW                         = 1 // equivalent to TCSADRAIN for tcsetattr\n\tTCSAFLUSH                       = 2\n\tTCSETSF                         = 2 // equivalent to TCSAFLUSH for tcsetattr\n\tTCGETS                          = 3 // not defined in ioctl.h -- zos golang only\n\tTCIFLUSH                        = 0\n\tTCOFLUSH                        = 1\n\tTCIOFLUSH                       = 2\n\tTCOOFF                          = 0\n\tTCOON                           = 1\n\tTCIOFF                          = 2\n\tTCION                           = 3\n\tTIOCSPGRP                       = 0x8004a776\n\tTIOCNOTTY                       = 0x2000a771\n\tTIOCEXCL                        = 0x2000a70d\n\tTIOCNXCL                        = 0x2000a70e\n\tTIOCGETD                        = 0x4004a700\n\tTIOCSETD                        = 0x8004a701\n\tTIOCPKT                         = 0x8004a770\n\tTIOCSTOP                        = 0x2000a76f\n\tTIOCSTART                       = 0x2000a76e\n\tTIOCUCNTL                       = 0x8004a766\n\tTIOCREMOTE                      = 0x8004a769\n\tTIOCMGET                        = 0x4004a76a\n\tTIOCMSET                        = 0x8004a76d\n\tTIOCMBIC                        = 0x8004a76b\n\tTIOCMBIS                        = 0x8004a76c\n\tVINTR                           = 0\n\tVQUIT                           = 1\n\tVERASE                          = 2\n\tVKILL                           = 3\n\tVEOF                            = 4\n\tVEOL                            = 5\n\tVMIN                            = 6\n\tVSTART                          = 7\n\tVSTOP                           = 8\n\tVSUSP                           = 9\n\tVTIME                           = 10\n\tWCONTINUED                      = 0x4\n\tWEXITED                         = 0x8\n\tWNOHANG                         = 0x1\n\tWNOWAIT                         = 0x20\n\tWSTOPPED                        = 0x10\n\tWUNTRACED                       = 0x2\n\t_BPX_SWAP                       = 1\n\t_BPX_NONSWAP                    = 2\n\tMCL_CURRENT                     = 1  // for Linux compatibility -- no zos semantics\n\tMCL_FUTURE                      = 2  // for Linux compatibility -- no zos semantics\n\tMCL_ONFAULT                     = 3  // for Linux compatibility -- no zos semantics\n\tMADV_NORMAL                     = 0  // for Linux compatibility -- no zos semantics\n\tMADV_RANDOM                     = 1  // for Linux compatibility -- no zos semantics\n\tMADV_SEQUENTIAL                 = 2  // for Linux compatibility -- no zos semantics\n\tMADV_WILLNEED                   = 3  // for Linux compatibility -- no zos semantics\n\tMADV_REMOVE                     = 4  // for Linux compatibility -- no zos semantics\n\tMADV_DONTFORK                   = 5  // for Linux compatibility -- no zos semantics\n\tMADV_DOFORK                     = 6  // for Linux compatibility -- no zos semantics\n\tMADV_HWPOISON                   = 7  // for Linux compatibility -- no zos semantics\n\tMADV_MERGEABLE                  = 8  // for Linux compatibility -- no zos semantics\n\tMADV_UNMERGEABLE                = 9  // for Linux compatibility -- no zos semantics\n\tMADV_SOFT_OFFLINE               = 10 // for Linux compatibility -- no zos semantics\n\tMADV_HUGEPAGE                   = 11 // for Linux compatibility -- no zos semantics\n\tMADV_NOHUGEPAGE                 = 12 // for Linux compatibility -- no zos semantics\n\tMADV_DONTDUMP                   = 13 // for Linux compatibility -- no zos semantics\n\tMADV_DODUMP                     = 14 // for Linux compatibility -- no zos semantics\n\tMADV_FREE                       = 15 // for Linux compatibility -- no zos semantics\n\tMADV_WIPEONFORK                 = 16 // for Linux compatibility -- no zos semantics\n\tMADV_KEEPONFORK                 = 17 // for Linux compatibility -- no zos semantics\n\tAT_SYMLINK_FOLLOW               = 0x400\n\tAT_SYMLINK_NOFOLLOW             = 0x100\n\tXATTR_CREATE                    = 0x1\n\tXATTR_REPLACE                   = 0x2\n\tP_PID                           = 0\n\tP_PGID                          = 1\n\tP_ALL                           = 2\n\tPR_SET_NAME                     = 15\n\tPR_GET_NAME                     = 16\n\tPR_SET_NO_NEW_PRIVS             = 38\n\tPR_GET_NO_NEW_PRIVS             = 39\n\tPR_SET_DUMPABLE                 = 4\n\tPR_GET_DUMPABLE                 = 3\n\tPR_SET_PDEATHSIG                = 1\n\tPR_GET_PDEATHSIG                = 2\n\tPR_SET_CHILD_SUBREAPER          = 36\n\tPR_GET_CHILD_SUBREAPER          = 37\n\tAT_FDCWD                        = -100\n\tAT_EACCESS                      = 0x200\n\tAT_EMPTY_PATH                   = 0x1000\n\tAT_REMOVEDIR                    = 0x200\n\tRENAME_NOREPLACE                = 1 << 0\n\tST_RDONLY                       = 1\n\tST_NOSUID                       = 2\n)\n\nconst (\n\tEDOM               = Errno(1)\n\tERANGE             = Errno(2)\n\tEACCES             = Errno(111)\n\tEAGAIN             = Errno(112)\n\tEBADF              = Errno(113)\n\tEBUSY              = Errno(114)\n\tECHILD             = Errno(115)\n\tEDEADLK            = Errno(116)\n\tEEXIST             = Errno(117)\n\tEFAULT             = Errno(118)\n\tEFBIG              = Errno(119)\n\tEINTR              = Errno(120)\n\tEINVAL             = Errno(121)\n\tEIO                = Errno(122)\n\tEISDIR             = Errno(123)\n\tEMFILE             = Errno(124)\n\tEMLINK             = Errno(125)\n\tENAMETOOLONG       = Errno(126)\n\tENFILE             = Errno(127)\n\tENOATTR            = Errno(265)\n\tENODEV             = Errno(128)\n\tENOENT             = Errno(129)\n\tENOEXEC            = Errno(130)\n\tENOLCK             = Errno(131)\n\tENOMEM             = Errno(132)\n\tENOSPC             = Errno(133)\n\tENOSYS             = Errno(134)\n\tENOTDIR            = Errno(135)\n\tENOTEMPTY          = Errno(136)\n\tENOTTY             = Errno(137)\n\tENXIO              = Errno(138)\n\tEPERM              = Errno(139)\n\tEPIPE              = Errno(140)\n\tEROFS              = Errno(141)\n\tESPIPE             = Errno(142)\n\tESRCH              = Errno(143)\n\tEXDEV              = Errno(144)\n\tE2BIG              = Errno(145)\n\tELOOP              = Errno(146)\n\tEILSEQ             = Errno(147)\n\tENODATA            = Errno(148)\n\tEOVERFLOW          = Errno(149)\n\tEMVSNOTUP          = Errno(150)\n\tECMSSTORAGE        = Errno(151)\n\tEMVSDYNALC         = Errno(151)\n\tEMVSCVAF           = Errno(152)\n\tEMVSCATLG          = Errno(153)\n\tECMSINITIAL        = Errno(156)\n\tEMVSINITIAL        = Errno(156)\n\tECMSERR            = Errno(157)\n\tEMVSERR            = Errno(157)\n\tEMVSPARM           = Errno(158)\n\tECMSPFSFILE        = Errno(159)\n\tEMVSPFSFILE        = Errno(159)\n\tEMVSBADCHAR        = Errno(160)\n\tECMSPFSPERM        = Errno(162)\n\tEMVSPFSPERM        = Errno(162)\n\tEMVSSAFEXTRERR     = Errno(163)\n\tEMVSSAF2ERR        = Errno(164)\n\tEMVSTODNOTSET      = Errno(165)\n\tEMVSPATHOPTS       = Errno(166)\n\tEMVSNORTL          = Errno(167)\n\tEMVSEXPIRE         = Errno(168)\n\tEMVSPASSWORD       = Errno(169)\n\tEMVSWLMERROR       = Errno(170)\n\tEMVSCPLERROR       = Errno(171)\n\tEMVSARMERROR       = Errno(172)\n\tELENOFORK          = Errno(200)\n\tELEMSGERR          = Errno(201)\n\tEFPMASKINV         = Errno(202)\n\tEFPMODEINV         = Errno(203)\n\tEBUFLEN            = Errno(227)\n\tEEXTLINK           = Errno(228)\n\tENODD              = Errno(229)\n\tECMSESMERR         = Errno(230)\n\tECPERR             = Errno(231)\n\tELEMULTITHREAD     = Errno(232)\n\tELEFENCE           = Errno(244)\n\tEBADDATA           = Errno(245)\n\tEUNKNOWN           = Errno(246)\n\tENOTSUP            = Errno(247)\n\tEBADNAME           = Errno(248)\n\tENOTSAFE           = Errno(249)\n\tELEMULTITHREADFORK = Errno(257)\n\tECUNNOENV          = Errno(258)\n\tECUNNOCONV         = Errno(259)\n\tECUNNOTALIGNED     = Errno(260)\n\tECUNERR            = Errno(262)\n\tEIBMBADCALL        = Errno(1000)\n\tEIBMBADPARM        = Errno(1001)\n\tEIBMSOCKOUTOFRANGE = Errno(1002)\n\tEIBMSOCKINUSE      = Errno(1003)\n\tEIBMIUCVERR        = Errno(1004)\n\tEOFFLOADboxERROR   = Errno(1005)\n\tEOFFLOADboxRESTART = Errno(1006)\n\tEOFFLOADboxDOWN    = Errno(1007)\n\tEIBMCONFLICT       = Errno(1008)\n\tEIBMCANCELLED      = Errno(1009)\n\tEIBMBADTCPNAME     = Errno(1011)\n\tENOTBLK            = Errno(1100)\n\tETXTBSY            = Errno(1101)\n\tEWOULDBLOCK        = Errno(1102)\n\tEINPROGRESS        = Errno(1103)\n\tEALREADY           = Errno(1104)\n\tENOTSOCK           = Errno(1105)\n\tEDESTADDRREQ       = Errno(1106)\n\tEMSGSIZE           = Errno(1107)\n\tEPROTOTYPE         = Errno(1108)\n\tENOPROTOOPT        = Errno(1109)\n\tEPROTONOSUPPORT    = Errno(1110)\n\tESOCKTNOSUPPORT    = Errno(1111)\n\tEOPNOTSUPP         = Errno(1112)\n\tEPFNOSUPPORT       = Errno(1113)\n\tEAFNOSUPPORT       = Errno(1114)\n\tEADDRINUSE         = Errno(1115)\n\tEADDRNOTAVAIL      = Errno(1116)\n\tENETDOWN           = Errno(1117)\n\tENETUNREACH        = Errno(1118)\n\tENETRESET          = Errno(1119)\n\tECONNABORTED       = Errno(1120)\n\tECONNRESET         = Errno(1121)\n\tENOBUFS            = Errno(1122)\n\tEISCONN            = Errno(1123)\n\tENOTCONN           = Errno(1124)\n\tESHUTDOWN          = Errno(1125)\n\tETOOMANYREFS       = Errno(1126)\n\tETIMEDOUT          = Errno(1127)\n\tECONNREFUSED       = Errno(1128)\n\tEHOSTDOWN          = Errno(1129)\n\tEHOSTUNREACH       = Errno(1130)\n\tEPROCLIM           = Errno(1131)\n\tEUSERS             = Errno(1132)\n\tEDQUOT             = Errno(1133)\n\tESTALE             = Errno(1134)\n\tEREMOTE            = Errno(1135)\n\tENOSTR             = Errno(1136)\n\tETIME              = Errno(1137)\n\tENOSR              = Errno(1138)\n\tENOMSG             = Errno(1139)\n\tEBADMSG            = Errno(1140)\n\tEIDRM              = Errno(1141)\n\tENONET             = Errno(1142)\n\tERREMOTE           = Errno(1143)\n\tENOLINK            = Errno(1144)\n\tEADV               = Errno(1145)\n\tESRMNT             = Errno(1146)\n\tECOMM              = Errno(1147)\n\tEPROTO             = Errno(1148)\n\tEMULTIHOP          = Errno(1149)\n\tEDOTDOT            = Errno(1150)\n\tEREMCHG            = Errno(1151)\n\tECANCELED          = Errno(1152)\n\tEINTRNODATA        = Errno(1159)\n\tENOREUSE           = Errno(1160)\n\tENOMOVE            = Errno(1161)\n)\n\n// Signals\nconst (\n\tSIGHUP    = Signal(1)\n\tSIGINT    = Signal(2)\n\tSIGABRT   = Signal(3)\n\tSIGILL    = Signal(4)\n\tSIGPOLL   = Signal(5)\n\tSIGURG    = Signal(6)\n\tSIGSTOP   = Signal(7)\n\tSIGFPE    = Signal(8)\n\tSIGKILL   = Signal(9)\n\tSIGBUS    = Signal(10)\n\tSIGSEGV   = Signal(11)\n\tSIGSYS    = Signal(12)\n\tSIGPIPE   = Signal(13)\n\tSIGALRM   = Signal(14)\n\tSIGTERM   = Signal(15)\n\tSIGUSR1   = Signal(16)\n\tSIGUSR2   = Signal(17)\n\tSIGABND   = Signal(18)\n\tSIGCONT   = Signal(19)\n\tSIGCHLD   = Signal(20)\n\tSIGTTIN   = Signal(21)\n\tSIGTTOU   = Signal(22)\n\tSIGIO     = Signal(23)\n\tSIGQUIT   = Signal(24)\n\tSIGTSTP   = Signal(25)\n\tSIGTRAP   = Signal(26)\n\tSIGIOERR  = Signal(27)\n\tSIGWINCH  = Signal(28)\n\tSIGXCPU   = Signal(29)\n\tSIGXFSZ   = Signal(30)\n\tSIGVTALRM = Signal(31)\n\tSIGPROF   = Signal(32)\n\tSIGDANGER = Signal(33)\n\tSIGTHSTOP = Signal(34)\n\tSIGTHCONT = Signal(35)\n\tSIGTRACE  = Signal(37)\n\tSIGDCE    = Signal(38)\n\tSIGDUMP   = Signal(39)\n)\n\n// Error table\nvar errorList = [...]struct {\n\tnum  Errno\n\tname string\n\tdesc string\n}{\n\t{1, \"EDC5001I\", \"A domain error occurred.\"},\n\t{2, \"EDC5002I\", \"A range error occurred.\"},\n\t{111, \"EDC5111I\", \"Permission denied.\"},\n\t{112, \"EDC5112I\", \"Resource temporarily unavailable.\"},\n\t{113, \"EDC5113I\", \"Bad file descriptor.\"},\n\t{114, \"EDC5114I\", \"Resource busy.\"},\n\t{115, \"EDC5115I\", \"No child processes.\"},\n\t{116, \"EDC5116I\", \"Resource deadlock avoided.\"},\n\t{117, \"EDC5117I\", \"File exists.\"},\n\t{118, \"EDC5118I\", \"Incorrect address.\"},\n\t{119, \"EDC5119I\", \"File too large.\"},\n\t{120, \"EDC5120I\", \"Interrupted function call.\"},\n\t{121, \"EDC5121I\", \"Invalid argument.\"},\n\t{122, \"EDC5122I\", \"Input/output error.\"},\n\t{123, \"EDC5123I\", \"Is a directory.\"},\n\t{124, \"EDC5124I\", \"Too many open files.\"},\n\t{125, \"EDC5125I\", \"Too many links.\"},\n\t{126, \"EDC5126I\", \"Filename too long.\"},\n\t{127, \"EDC5127I\", \"Too many open files in system.\"},\n\t{128, \"EDC5128I\", \"No such device.\"},\n\t{129, \"EDC5129I\", \"No such file or directory.\"},\n\t{130, \"EDC5130I\", \"Exec format error.\"},\n\t{131, \"EDC5131I\", \"No locks available.\"},\n\t{132, \"EDC5132I\", \"Not enough memory.\"},\n\t{133, \"EDC5133I\", \"No space left on device.\"},\n\t{134, \"EDC5134I\", \"Function not implemented.\"},\n\t{135, \"EDC5135I\", \"Not a directory.\"},\n\t{136, \"EDC5136I\", \"Directory not empty.\"},\n\t{137, \"EDC5137I\", \"Inappropriate I/O control operation.\"},\n\t{138, \"EDC5138I\", \"No such device or address.\"},\n\t{139, \"EDC5139I\", \"Operation not permitted.\"},\n\t{140, \"EDC5140I\", \"Broken pipe.\"},\n\t{141, \"EDC5141I\", \"Read-only file system.\"},\n\t{142, \"EDC5142I\", \"Invalid seek.\"},\n\t{143, \"EDC5143I\", \"No such process.\"},\n\t{144, \"EDC5144I\", \"Improper link.\"},\n\t{145, \"EDC5145I\", \"The parameter list is too long, or the message to receive was too large for the buffer.\"},\n\t{146, \"EDC5146I\", \"Too many levels of symbolic links.\"},\n\t{147, \"EDC5147I\", \"Illegal byte sequence.\"},\n\t{148, \"EDC5148I\", \"The named attribute or data not available.\"},\n\t{149, \"EDC5149I\", \"Value Overflow Error.\"},\n\t{150, \"EDC5150I\", \"UNIX System Services is not active.\"},\n\t{151, \"EDC5151I\", \"Dynamic allocation error.\"},\n\t{152, \"EDC5152I\", \"Common VTOC access facility (CVAF) error.\"},\n\t{153, \"EDC5153I\", \"Catalog obtain error.\"},\n\t{156, \"EDC5156I\", \"Process initialization error.\"},\n\t{157, \"EDC5157I\", \"An internal error has occurred.\"},\n\t{158, \"EDC5158I\", \"Bad parameters were passed to the service.\"},\n\t{159, \"EDC5159I\", \"The Physical File System encountered a permanent file error.\"},\n\t{160, \"EDC5160I\", \"Bad character in environment variable name.\"},\n\t{162, \"EDC5162I\", \"The Physical File System encountered a system error.\"},\n\t{163, \"EDC5163I\", \"SAF/RACF extract error.\"},\n\t{164, \"EDC5164I\", \"SAF/RACF error.\"},\n\t{165, \"EDC5165I\", \"System TOD clock not set.\"},\n\t{166, \"EDC5166I\", \"Access mode argument on function call conflicts with PATHOPTS parameter on JCL DD statement.\"},\n\t{167, \"EDC5167I\", \"Access to the UNIX System Services version of the C RTL is denied.\"},\n\t{168, \"EDC5168I\", \"Password has expired.\"},\n\t{169, \"EDC5169I\", \"Password is invalid.\"},\n\t{170, \"EDC5170I\", \"An error was encountered with WLM.\"},\n\t{171, \"EDC5171I\", \"An error was encountered with CPL.\"},\n\t{172, \"EDC5172I\", \"An error was encountered with Application Response Measurement (ARM) component.\"},\n\t{200, \"EDC5200I\", \"The application contains a Language Environment member language that cannot tolerate a fork().\"},\n\t{201, \"EDC5201I\", \"The Language Environment message file was not found in the hierarchical file system.\"},\n\t{202, \"EDC5202E\", \"DLL facilities are not supported under SPC environment.\"},\n\t{203, \"EDC5203E\", \"DLL facilities are not supported under POSIX environment.\"},\n\t{227, \"EDC5227I\", \"Buffer is not long enough to contain a path definition\"},\n\t{228, \"EDC5228I\", \"The file referred to is an external link\"},\n\t{229, \"EDC5229I\", \"No path definition for ddname in effect\"},\n\t{230, \"EDC5230I\", \"ESM error.\"},\n\t{231, \"EDC5231I\", \"CP or the external security manager had an error\"},\n\t{232, \"EDC5232I\", \"The function failed because it was invoked from a multithread environment.\"},\n\t{244, \"EDC5244I\", \"The program, module or DLL is not supported in this environment.\"},\n\t{245, \"EDC5245I\", \"Data is not valid.\"},\n\t{246, \"EDC5246I\", \"Unknown system state.\"},\n\t{247, \"EDC5247I\", \"Operation not supported.\"},\n\t{248, \"EDC5248I\", \"The object name specified is not correct.\"},\n\t{249, \"EDC5249I\", \"The function is not allowed.\"},\n\t{257, \"EDC5257I\", \"Function cannot be called in the child process of a fork() from a multithreaded process until exec() is called.\"},\n\t{258, \"EDC5258I\", \"A CUN_RS_NO_UNI_ENV error was issued by Unicode Services.\"},\n\t{259, \"EDC5259I\", \"A CUN_RS_NO_CONVERSION error was issued by Unicode Services.\"},\n\t{260, \"EDC5260I\", \"A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services.\"},\n\t{262, \"EDC5262I\", \"An iconv() function encountered an unexpected error while using Unicode Services.\"},\n\t{265, \"EDC5265I\", \"The named attribute not available.\"},\n\t{1000, \"EDC8000I\", \"A bad socket-call constant was found in the IUCV header.\"},\n\t{1001, \"EDC8001I\", \"An error was found in the IUCV header.\"},\n\t{1002, \"EDC8002I\", \"A socket descriptor is out of range.\"},\n\t{1003, \"EDC8003I\", \"A socket descriptor is in use.\"},\n\t{1004, \"EDC8004I\", \"Request failed because of an IUCV error.\"},\n\t{1005, \"EDC8005I\", \"Offload box error.\"},\n\t{1006, \"EDC8006I\", \"Offload box restarted.\"},\n\t{1007, \"EDC8007I\", \"Offload box down.\"},\n\t{1008, \"EDC8008I\", \"Already a conflicting call outstanding on socket.\"},\n\t{1009, \"EDC8009I\", \"Request cancelled using a SOCKcallCANCEL request.\"},\n\t{1011, \"EDC8011I\", \"A name of a PFS was specified that either is not configured or is not a Sockets PFS.\"},\n\t{1100, \"EDC8100I\", \"Block device required.\"},\n\t{1101, \"EDC8101I\", \"Text file busy.\"},\n\t{1102, \"EDC8102I\", \"Operation would block.\"},\n\t{1103, \"EDC8103I\", \"Operation now in progress.\"},\n\t{1104, \"EDC8104I\", \"Connection already in progress.\"},\n\t{1105, \"EDC8105I\", \"Socket operation on non-socket.\"},\n\t{1106, \"EDC8106I\", \"Destination address required.\"},\n\t{1107, \"EDC8107I\", \"Message too long.\"},\n\t{1108, \"EDC8108I\", \"Protocol wrong type for socket.\"},\n\t{1109, \"EDC8109I\", \"Protocol not available.\"},\n\t{1110, \"EDC8110I\", \"Protocol not supported.\"},\n\t{1111, \"EDC8111I\", \"Socket type not supported.\"},\n\t{1112, \"EDC8112I\", \"Operation not supported on socket.\"},\n\t{1113, \"EDC8113I\", \"Protocol family not supported.\"},\n\t{1114, \"EDC8114I\", \"Address family not supported.\"},\n\t{1115, \"EDC8115I\", \"Address already in use.\"},\n\t{1116, \"EDC8116I\", \"Address not available.\"},\n\t{1117, \"EDC8117I\", \"Network is down.\"},\n\t{1118, \"EDC8118I\", \"Network is unreachable.\"},\n\t{1119, \"EDC8119I\", \"Network dropped connection on reset.\"},\n\t{1120, \"EDC8120I\", \"Connection ended abnormally.\"},\n\t{1121, \"EDC8121I\", \"Connection reset.\"},\n\t{1122, \"EDC8122I\", \"No buffer space available.\"},\n\t{1123, \"EDC8123I\", \"Socket already connected.\"},\n\t{1124, \"EDC8124I\", \"Socket not connected.\"},\n\t{1125, \"EDC8125I\", \"Can't send after socket shutdown.\"},\n\t{1126, \"EDC8126I\", \"Too many references; can't splice.\"},\n\t{1127, \"EDC8127I\", \"Connection timed out.\"},\n\t{1128, \"EDC8128I\", \"Connection refused.\"},\n\t{1129, \"EDC8129I\", \"Host is not available.\"},\n\t{1130, \"EDC8130I\", \"Host cannot be reached.\"},\n\t{1131, \"EDC8131I\", \"Too many processes.\"},\n\t{1132, \"EDC8132I\", \"Too many users.\"},\n\t{1133, \"EDC8133I\", \"Disk quota exceeded.\"},\n\t{1134, \"EDC8134I\", \"Stale file handle.\"},\n\t{1135, \"\", \"\"},\n\t{1136, \"EDC8136I\", \"File is not a STREAM.\"},\n\t{1137, \"EDC8137I\", \"STREAMS ioctl() timeout.\"},\n\t{1138, \"EDC8138I\", \"No STREAMS resources.\"},\n\t{1139, \"EDC8139I\", \"The message identified by set_id and msg_id is not in the message catalog.\"},\n\t{1140, \"EDC8140I\", \"Bad message.\"},\n\t{1141, \"EDC8141I\", \"Identifier removed.\"},\n\t{1142, \"\", \"\"},\n\t{1143, \"\", \"\"},\n\t{1144, \"EDC8144I\", \"The link has been severed.\"},\n\t{1145, \"\", \"\"},\n\t{1146, \"\", \"\"},\n\t{1147, \"\", \"\"},\n\t{1148, \"EDC8148I\", \"Protocol error.\"},\n\t{1149, \"EDC8149I\", \"Multihop not allowed.\"},\n\t{1150, \"\", \"\"},\n\t{1151, \"\", \"\"},\n\t{1152, \"EDC8152I\", \"The asynchronous I/O request has been canceled.\"},\n\t{1159, \"EDC8159I\", \"Function call was interrupted before any data was received.\"},\n\t{1160, \"EDC8160I\", \"Socket reuse is not supported.\"},\n\t{1161, \"EDC8161I\", \"The file system cannot currently be moved.\"},\n}\n\n// Signal table\nvar signalList = [...]struct {\n\tnum  Signal\n\tname string\n\tdesc string\n}{\n\t{1, \"SIGHUP\", \"hangup\"},\n\t{2, \"SIGINT\", \"interrupt\"},\n\t{3, \"SIGABT\", \"aborted\"},\n\t{4, \"SIGILL\", \"illegal instruction\"},\n\t{5, \"SIGPOLL\", \"pollable event\"},\n\t{6, \"SIGURG\", \"urgent I/O condition\"},\n\t{7, \"SIGSTOP\", \"stop process\"},\n\t{8, \"SIGFPE\", \"floating point exception\"},\n\t{9, \"SIGKILL\", \"killed\"},\n\t{10, \"SIGBUS\", \"bus error\"},\n\t{11, \"SIGSEGV\", \"segmentation fault\"},\n\t{12, \"SIGSYS\", \"bad argument to routine\"},\n\t{13, \"SIGPIPE\", \"broken pipe\"},\n\t{14, \"SIGALRM\", \"alarm clock\"},\n\t{15, \"SIGTERM\", \"terminated\"},\n\t{16, \"SIGUSR1\", \"user defined signal 1\"},\n\t{17, \"SIGUSR2\", \"user defined signal 2\"},\n\t{18, \"SIGABND\", \"abend\"},\n\t{19, \"SIGCONT\", \"continued\"},\n\t{20, \"SIGCHLD\", \"child exited\"},\n\t{21, \"SIGTTIN\", \"stopped (tty input)\"},\n\t{22, \"SIGTTOU\", \"stopped (tty output)\"},\n\t{23, \"SIGIO\", \"I/O possible\"},\n\t{24, \"SIGQUIT\", \"quit\"},\n\t{25, \"SIGTSTP\", \"stopped\"},\n\t{26, \"SIGTRAP\", \"trace/breakpoint trap\"},\n\t{27, \"SIGIOER\", \"I/O error\"},\n\t{28, \"SIGWINCH\", \"window changed\"},\n\t{29, \"SIGXCPU\", \"CPU time limit exceeded\"},\n\t{30, \"SIGXFSZ\", \"file size limit exceeded\"},\n\t{31, \"SIGVTALRM\", \"virtual timer expired\"},\n\t{32, \"SIGPROF\", \"profiling timer expired\"},\n\t{33, \"SIGDANGER\", \"danger\"},\n\t{34, \"SIGTHSTOP\", \"stop thread\"},\n\t{35, \"SIGTHCONT\", \"continue thread\"},\n\t{37, \"SIGTRACE\", \"trace\"},\n\t{38, \"\", \"DCE\"},\n\t{39, \"SIGDUMP\", \"dump\"},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go",
    "content": "// Code generated by linux/mkall.go generatePtracePair(\"arm\", \"arm64\"). DO NOT EDIT.\n\n//go:build linux && (arm || arm64)\n\npackage unix\n\nimport \"unsafe\"\n\n// PtraceRegsArm is the registers used by arm binaries.\ntype PtraceRegsArm struct {\n\tUregs [18]uint32\n}\n\n// PtraceGetRegsArm fetches the registers used by arm binaries.\nfunc PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsArm sets the registers used by arm binaries.\nfunc PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n\n// PtraceRegsArm64 is the registers used by arm64 binaries.\ntype PtraceRegsArm64 struct {\n\tRegs   [31]uint64\n\tSp     uint64\n\tPc     uint64\n\tPstate uint64\n}\n\n// PtraceGetRegsArm64 fetches the registers used by arm64 binaries.\nfunc PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsArm64 sets the registers used by arm64 binaries.\nfunc PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go",
    "content": "// Code generated by linux/mkall.go generatePtraceRegSet(\"arm64\"). DO NOT EDIT.\n\npackage unix\n\nimport \"unsafe\"\n\n// PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.\nfunc PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {\n\tiovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}\n\treturn ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))\n}\n\n// PtraceSetRegSetArm64 sets the registers used by arm64 binaries.\nfunc PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {\n\tiovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}\n\treturn ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go",
    "content": "// Code generated by linux/mkall.go generatePtracePair(\"mips\", \"mips64\"). DO NOT EDIT.\n\n//go:build linux && (mips || mips64)\n\npackage unix\n\nimport \"unsafe\"\n\n// PtraceRegsMips is the registers used by mips binaries.\ntype PtraceRegsMips struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\n// PtraceGetRegsMips fetches the registers used by mips binaries.\nfunc PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsMips sets the registers used by mips binaries.\nfunc PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n\n// PtraceRegsMips64 is the registers used by mips64 binaries.\ntype PtraceRegsMips64 struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\n// PtraceGetRegsMips64 fetches the registers used by mips64 binaries.\nfunc PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsMips64 sets the registers used by mips64 binaries.\nfunc PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go",
    "content": "// Code generated by linux/mkall.go generatePtracePair(\"mipsle\", \"mips64le\"). DO NOT EDIT.\n\n//go:build linux && (mipsle || mips64le)\n\npackage unix\n\nimport \"unsafe\"\n\n// PtraceRegsMipsle is the registers used by mipsle binaries.\ntype PtraceRegsMipsle struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\n// PtraceGetRegsMipsle fetches the registers used by mipsle binaries.\nfunc PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsMipsle sets the registers used by mipsle binaries.\nfunc PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n\n// PtraceRegsMips64le is the registers used by mips64le binaries.\ntype PtraceRegsMips64le struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\n// PtraceGetRegsMips64le fetches the registers used by mips64le binaries.\nfunc PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsMips64le sets the registers used by mips64le binaries.\nfunc PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zptrace_x86_linux.go",
    "content": "// Code generated by linux/mkall.go generatePtracePair(\"386\", \"amd64\"). DO NOT EDIT.\n\n//go:build linux && (386 || amd64)\n\npackage unix\n\nimport \"unsafe\"\n\n// PtraceRegs386 is the registers used by 386 binaries.\ntype PtraceRegs386 struct {\n\tEbx      int32\n\tEcx      int32\n\tEdx      int32\n\tEsi      int32\n\tEdi      int32\n\tEbp      int32\n\tEax      int32\n\tXds      int32\n\tXes      int32\n\tXfs      int32\n\tXgs      int32\n\tOrig_eax int32\n\tEip      int32\n\tXcs      int32\n\tEflags   int32\n\tEsp      int32\n\tXss      int32\n}\n\n// PtraceGetRegs386 fetches the registers used by 386 binaries.\nfunc PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegs386 sets the registers used by 386 binaries.\nfunc PtraceSetRegs386(pid int, regs *PtraceRegs386) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n\n// PtraceRegsAmd64 is the registers used by amd64 binaries.\ntype PtraceRegsAmd64 struct {\n\tR15      uint64\n\tR14      uint64\n\tR13      uint64\n\tR12      uint64\n\tRbp      uint64\n\tRbx      uint64\n\tR11      uint64\n\tR10      uint64\n\tR9       uint64\n\tR8       uint64\n\tRax      uint64\n\tRcx      uint64\n\tRdx      uint64\n\tRsi      uint64\n\tRdi      uint64\n\tOrig_rax uint64\n\tRip      uint64\n\tCs       uint64\n\tEflags   uint64\n\tRsp      uint64\n\tSs       uint64\n\tFs_base  uint64\n\tGs_base  uint64\n\tDs       uint64\n\tEs       uint64\n\tFs       uint64\n\tGs       uint64\n}\n\n// PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.\nfunc PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {\n\treturn ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))\n}\n\n// PtraceSetRegsAmd64 sets the registers used by amd64 binaries.\nfunc PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {\n\treturn ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s",
    "content": "// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build zos && s390x\n#include \"textflag.h\"\n\n//  provide the address of function variable to be fixed up.\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Flistxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fremovexattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fgetxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fsetxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_accept4Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·accept4(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_RemovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Removexattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_Dup3Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Dup3(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_DirfdAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Dirfd(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EpollCreateAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·EpollCreate(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EpollCreate1Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·EpollCreate1(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EpollCtlAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·EpollCtl(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EpollPwaitAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·EpollPwait(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EpollWaitAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·EpollWait(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_EventfdAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Eventfd(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FaccessatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Faccessat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FchmodatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fchmodat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FchownatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fchownat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FdatasyncAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fdatasync(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_fstatatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·fstatat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Lgetxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Lsetxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FstatfsAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Fstatfs(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FutimesAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Futimes(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_FutimesatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Futimesat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_GetrandomAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Getrandom(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_InotifyInitAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·InotifyInit(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_InotifyInit1Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·InotifyInit1(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_InotifyAddWatchAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·InotifyAddWatch(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_InotifyRmWatchAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·InotifyRmWatch(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_ListxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Listxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Llistxattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Lremovexattr(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LutimesAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Lutimes(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_StatfsAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Statfs(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_SyncfsAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Syncfs(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_UnshareAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Unshare(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_LinkatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Linkat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_MkdiratAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Mkdirat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_MknodatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Mknodat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_PivotRootAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·PivotRoot(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_PrctlAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Prctl(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_PrlimitAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Prlimit(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_RenameatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Renameat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_Renameat2Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Renameat2(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_SethostnameAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Sethostname(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Setns(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Symlinkat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_UnlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·Unlinkat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_openatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·openat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_openat2Addr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·openat2(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nTEXT ·get_utimensatAddr(SB), NOSPLIT|NOFRAME, $0-8\n\tMOVD $·utimensat(SB), R8\n\tMOVD R8, ret+0(FP)\n\tRET\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go",
    "content": "// go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build aix && ppc\n\npackage unix\n\n/*\n#include <stdint.h>\n#include <stddef.h>\nint utimes(uintptr_t, uintptr_t);\nint utimensat(int, uintptr_t, uintptr_t, int);\nint getcwd(uintptr_t, size_t);\nint accept(int, uintptr_t, uintptr_t);\nint getdirent(int, uintptr_t, size_t);\nint wait4(int, uintptr_t, int, uintptr_t);\nint ioctl(int, int, uintptr_t);\nint fcntl(uintptr_t, int, uintptr_t);\nint fsync_range(int, int, long long, long long);\nint acct(uintptr_t);\nint chdir(uintptr_t);\nint chroot(uintptr_t);\nint close(int);\nint dup(int);\nvoid exit(int);\nint faccessat(int, uintptr_t, unsigned int, int);\nint fchdir(int);\nint fchmod(int, unsigned int);\nint fchmodat(int, uintptr_t, unsigned int, int);\nint fchownat(int, uintptr_t, int, int, int);\nint fdatasync(int);\nint getpgid(int);\nint getpgrp();\nint getpid();\nint getppid();\nint getpriority(int, int);\nint getrusage(int, uintptr_t);\nint getsid(int);\nint kill(int, int);\nint syslog(int, uintptr_t, size_t);\nint mkdir(int, uintptr_t, unsigned int);\nint mkdirat(int, uintptr_t, unsigned int);\nint mkfifo(uintptr_t, unsigned int);\nint mknod(uintptr_t, unsigned int, int);\nint mknodat(int, uintptr_t, unsigned int, int);\nint nanosleep(uintptr_t, uintptr_t);\nint open64(uintptr_t, int, unsigned int);\nint openat(int, uintptr_t, int, unsigned int);\nint read(int, uintptr_t, size_t);\nint readlink(uintptr_t, uintptr_t, size_t);\nint renameat(int, uintptr_t, int, uintptr_t);\nint setdomainname(uintptr_t, size_t);\nint sethostname(uintptr_t, size_t);\nint setpgid(int, int);\nint setsid();\nint settimeofday(uintptr_t);\nint setuid(int);\nint setgid(int);\nint setpriority(int, int, int);\nint statx(int, uintptr_t, int, int, uintptr_t);\nint sync();\nuintptr_t times(uintptr_t);\nint umask(int);\nint uname(uintptr_t);\nint unlink(uintptr_t);\nint unlinkat(int, uintptr_t, int);\nint ustat(int, uintptr_t);\nint write(int, uintptr_t, size_t);\nint dup2(int, int);\nint posix_fadvise64(int, long long, long long, int);\nint fchown(int, int, int);\nint fstat(int, uintptr_t);\nint fstatat(int, uintptr_t, uintptr_t, int);\nint fstatfs(int, uintptr_t);\nint ftruncate(int, long long);\nint getegid();\nint geteuid();\nint getgid();\nint getuid();\nint lchown(uintptr_t, int, int);\nint listen(int, int);\nint lstat(uintptr_t, uintptr_t);\nint pause();\nint pread64(int, uintptr_t, size_t, long long);\nint pwrite64(int, uintptr_t, size_t, long long);\n#define c_select select\nint select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);\nint pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);\nint setregid(int, int);\nint setreuid(int, int);\nint shutdown(int, int);\nlong long splice(int, uintptr_t, int, uintptr_t, int, int);\nint stat(uintptr_t, uintptr_t);\nint statfs(uintptr_t, uintptr_t);\nint truncate(uintptr_t, long long);\nint bind(int, uintptr_t, uintptr_t);\nint connect(int, uintptr_t, uintptr_t);\nint getgroups(int, uintptr_t);\nint setgroups(int, uintptr_t);\nint getsockopt(int, int, int, uintptr_t, uintptr_t);\nint setsockopt(int, int, int, uintptr_t, uintptr_t);\nint socket(int, int, int);\nint socketpair(int, int, int, uintptr_t);\nint getpeername(int, uintptr_t, uintptr_t);\nint getsockname(int, uintptr_t, uintptr_t);\nint recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);\nint sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);\nint nrecvmsg(int, uintptr_t, int);\nint nsendmsg(int, uintptr_t, int);\nint munmap(uintptr_t, uintptr_t);\nint madvise(uintptr_t, size_t, int);\nint mprotect(uintptr_t, size_t, int);\nint mlock(uintptr_t, size_t);\nint mlockall(int);\nint msync(uintptr_t, size_t, int);\nint munlock(uintptr_t, size_t);\nint munlockall();\nint pipe(uintptr_t);\nint poll(uintptr_t, int, int);\nint gettimeofday(uintptr_t, uintptr_t);\nint time(uintptr_t);\nint utime(uintptr_t, uintptr_t);\nunsigned long long getsystemcfg(int);\nint umount(uintptr_t);\nint getrlimit64(int, uintptr_t);\nlong long lseek64(int, long long, int);\nuintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);\n\n*/\nimport \"C\"\nimport (\n\t\"unsafe\"\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getcwd(buf []byte) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(buf)\n\tr0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))\n\tfd = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirent(fd int, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(buf)\n\tr0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {\n\tr0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))\n\twpid = Pid_t(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req int, arg uintptr) (err error) {\n\tr0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {\n\tr0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg)))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {\n\tr0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))\n\tr = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {\n\tr0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))\n\tval = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fsyncRange(fd int, how int, start int64, length int64) (err error) {\n\tr0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Acct(path string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.acct(C.uintptr_t(_p0))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.chdir(C.uintptr_t(_p0))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.chroot(C.uintptr_t(_p0))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\tr0, er := C.close(C.int(fd))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int) (fd int, err error) {\n\tr0, er := C.dup(C.int(oldfd))\n\tfd = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tC.exit(C.int(code))\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\tr0, er := C.fchdir(C.int(fd))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\tr0, er := C.fchmod(C.int(fd), C.uint(mode))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fdatasync(fd int) (err error) {\n\tr0, er := C.fdatasync(C.int(fd))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, er := C.getpgid(C.int(pid))\n\tpgid = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pid int) {\n\tr0, _ := C.getpgrp()\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _ := C.getpid()\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _ := C.getppid()\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, er := C.getpriority(C.int(which), C.int(who))\n\tprio = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\tr0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, er := C.getsid(C.int(pid))\n\tsid = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, sig Signal) (err error) {\n\tr0, er := C.kill(C.int(pid), C.int(sig))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Klogctl(typ int, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(buf)\n\tr0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(dirfd int, path string, mode uint32) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\tr0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm))\n\tfd = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode))\n\tfd = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tvar _p1 *byte\n\tif len(buf) > 0 {\n\t\t_p1 = &buf[0]\n\t}\n\tvar _p2 int\n\t_p2 = len(buf)\n\tr0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(oldpath)))\n\t_p1 := uintptr(unsafe.Pointer(C.CString(newpath)))\n\tr0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setdomainname(p []byte) (err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sethostname(p []byte) (err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\tr0, er := C.setpgid(C.int(pid), C.int(pgid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, er := C.setsid()\n\tpid = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tv *Timeval) (err error) {\n\tr0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\tr0, er := C.setuid(C.int(uid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(uid int) (err error) {\n\tr0, er := C.setgid(C.int(uid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\tr0, er := C.setpriority(C.int(which), C.int(who), C.int(prio))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() {\n\tC.sync()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Times(tms *Tms) (ticks uintptr, err error) {\n\tr0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms))))\n\tticks = uintptr(r0)\n\tif uintptr(r0) == ^uintptr(0) && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(mask int) (oldmask int) {\n\tr0, _ := C.umask(C.int(mask))\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Uname(buf *Utsname) (err error) {\n\tr0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.unlink(C.uintptr_t(_p0))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\tr0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(oldfd int, newfd int) (err error) {\n\tr0, er := C.dup2(C.int(oldfd), C.int(newfd))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\tr0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\tr0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstat(fd int, stat *Stat_t) (err error) {\n\tr0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\tr0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\tr0, er := C.ftruncate(C.int(fd), C.longlong(length))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := C.getegid()\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := C.geteuid()\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := C.getgid()\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := C.getuid()\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\tr0, er := C.listen(C.int(s), C.int(n))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc lstat(path string, stat *Stat_t) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\tr0, er := C.pause()\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, er := C.c_select(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask))))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\tr0, er := C.setregid(C.int(rgid), C.int(egid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\tr0, er := C.setreuid(C.int(ruid), C.int(euid))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\tr0, er := C.shutdown(C.int(fd), C.int(how))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags))\n\tn = int64(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, statptr *Stat_t) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(statptr))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\tr0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\tr0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen)))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))\n\tnn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\tr0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\tr0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\tr0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, er := C.socket(C.int(domain), C.int(typ), C.int(proto))\n\tfd = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\tr0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\tr0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\tr0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(p)\n\tr0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen))))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(buf)\n\tr0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen)))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, er := C.nrecvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, er := C.nsendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\tr0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, advice int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(b)\n\tr0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(b)\n\tr0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(b)\n\tr0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\tr0, er := C.mlockall(C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(b)\n\tr0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\tvar _p1 int\n\t_p1 = len(b)\n\tr0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\tr0, er := C.munlockall()\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (err error) {\n\tr0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout))\n\tn = int(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc gettimeofday(tv *Timeval, tzp *Timezone) (err error) {\n\tr0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t))))\n\ttt = Time_t(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(path)))\n\tr0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsystemcfg(label int) (n uint64) {\n\tr0, _ := C.getsystemcfg(C.int(label))\n\tn = uint64(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc umount(target string) (err error) {\n\t_p0 := uintptr(unsafe.Pointer(C.CString(target)))\n\tr0, er := C.umount(C.uintptr_t(_p0))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\tr0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))\n\toff = int64(r0)\n\tif r0 == -1 && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, er := C.mmap(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset))\n\txaddr = uintptr(r0)\n\tif uintptr(r0) == ^uintptr(0) && er != nil {\n\t\terr = er\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go",
    "content": "// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build aix && ppc64\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callutimes(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callutimensat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), flag)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getcwd(buf []byte) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\t_, e1 := callgetcwd(uintptr(unsafe.Pointer(_p0)), len(buf))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, e1 := callaccept(s, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirent(fd int, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, e1 := callgetdirent(fd, uintptr(unsafe.Pointer(_p0)), len(buf))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) {\n\tr0, e1 := callwait4(int(pid), uintptr(unsafe.Pointer(status)), options, uintptr(unsafe.Pointer(rusage)))\n\twpid = Pid_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req int, arg uintptr) (err error) {\n\t_, e1 := callioctl(fd, req, arg)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {\n\t_, e1 := callioctl_ptr(fd, req, arg)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) {\n\tr0, e1 := callfcntl(fd, cmd, uintptr(arg))\n\tr = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) {\n\t_, e1 := callfcntl(fd, cmd, uintptr(unsafe.Pointer(lk)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, e1 := callfcntl(uintptr(fd), cmd, uintptr(arg))\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fsyncRange(fd int, how int, start int64, length int64) (err error) {\n\t_, e1 := callfsync_range(fd, how, start, length)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Acct(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callacct(uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callchdir(uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callchroot(uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, e1 := callclose(fd)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int) (fd int, err error) {\n\tr0, e1 := calldup(oldfd)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tcallexit(code)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callfaccessat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, e1 := callfchdir(fd)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, e1 := callfchmod(fd, mode)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callfchmodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callfchownat(dirfd, uintptr(unsafe.Pointer(_p0)), uid, gid, flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fdatasync(fd int) (err error) {\n\t_, e1 := callfdatasync(fd)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, e1 := callgetpgid(pid)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pid int) {\n\tr0, _ := callgetpgrp()\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _ := callgetpid()\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _ := callgetppid()\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, e1 := callgetpriority(which, who)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, e1 := callgetrusage(who, uintptr(unsafe.Pointer(rusage)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, e1 := callgetsid(pid)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, sig Signal) (err error) {\n\t_, e1 := callkill(pid, int(sig))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Klogctl(typ int, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, e1 := callsyslog(typ, uintptr(unsafe.Pointer(_p0)), len(buf))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callmkdir(dirfd, uintptr(unsafe.Pointer(_p0)), mode)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callmkdirat(dirfd, uintptr(unsafe.Pointer(_p0)), mode)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callmkfifo(uintptr(unsafe.Pointer(_p0)), mode)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callmknod(uintptr(unsafe.Pointer(_p0)), mode, dev)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callmknodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, dev)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, e1 := callnanosleep(uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, e1 := callopen64(uintptr(unsafe.Pointer(_p0)), mode, perm)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, e1 := callopenat(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mode)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, e1 := callread(fd, uintptr(unsafe.Pointer(_p0)), len(p))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\tif len(buf) > 0 {\n\t\t_p1 = &buf[0]\n\t}\n\tr0, e1 := callreadlink(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), len(buf))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callrenameat(olddirfd, uintptr(unsafe.Pointer(_p0)), newdirfd, uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setdomainname(p []byte) (err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\t_, e1 := callsetdomainname(uintptr(unsafe.Pointer(_p0)), len(p))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sethostname(p []byte) (err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\t_, e1 := callsethostname(uintptr(unsafe.Pointer(_p0)), len(p))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, e1 := callsetpgid(pid, pgid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, e1 := callsetsid()\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tv *Timeval) (err error) {\n\t_, e1 := callsettimeofday(uintptr(unsafe.Pointer(tv)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, e1 := callsetuid(uid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(uid int) (err error) {\n\t_, e1 := callsetgid(uid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, e1 := callsetpriority(which, who, prio)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callstatx(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mask, uintptr(unsafe.Pointer(stat)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() {\n\tcallsync()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Times(tms *Tms) (ticks uintptr, err error) {\n\tr0, e1 := calltimes(uintptr(unsafe.Pointer(tms)))\n\tticks = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(mask int) (oldmask int) {\n\tr0, _ := callumask(mask)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Uname(buf *Utsname) (err error) {\n\t_, e1 := calluname(uintptr(unsafe.Pointer(buf)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callunlink(uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callunlinkat(dirfd, uintptr(unsafe.Pointer(_p0)), flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, e1 := callustat(dev, uintptr(unsafe.Pointer(ubuf)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, e1 := callwrite(fd, uintptr(unsafe.Pointer(_p0)), len(p))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(oldfd int, newfd int) (err error) {\n\t_, e1 := calldup2(oldfd, newfd)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, e1 := callposix_fadvise64(fd, offset, length, advice)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, e1 := callfchown(fd, uid, gid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstat(fd int, stat *Stat_t) (err error) {\n\t_, e1 := callfstat(fd, uintptr(unsafe.Pointer(stat)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callfstatat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, e1 := callfstatfs(fd, uintptr(unsafe.Pointer(buf)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, e1 := callftruncate(fd, length)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := callgetegid()\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := callgeteuid()\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := callgetgid()\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := callgetuid()\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := calllchown(uintptr(unsafe.Pointer(_p0)), uid, gid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, e1 := calllisten(s, n)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := calllstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, e1 := callpause()\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, e1 := callpread64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, e1 := callpwrite64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, e1 := callselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, e1 := callsetregid(rgid, egid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, e1 := callsetreuid(ruid, euid)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, e1 := callshutdown(fd, how)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, e1 := callsplice(rfd, uintptr(unsafe.Pointer(roff)), wfd, uintptr(unsafe.Pointer(woff)), len, flags)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, statptr *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statptr)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callstatfs(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := calltruncate(uintptr(unsafe.Pointer(_p0)), length)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, e1 := callbind(s, uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, e1 := callconnect(s, uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, e1 := callgetgroups(n, uintptr(unsafe.Pointer(list)))\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, e1 := callsetgroups(n, uintptr(unsafe.Pointer(list)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, e1 := callgetsockopt(s, level, name, uintptr(val), uintptr(unsafe.Pointer(vallen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, e1 := callsetsockopt(s, level, name, uintptr(val), vallen)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, e1 := callsocket(domain, typ, proto)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, e1 := callsocketpair(domain, typ, proto, uintptr(unsafe.Pointer(fd)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, e1 := callgetpeername(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, e1 := callgetsockname(fd, uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, e1 := callrecvfrom(fd, uintptr(unsafe.Pointer(_p0)), len(p), flags, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\t_, e1 := callsendto(s, uintptr(unsafe.Pointer(_p0)), len(buf), flags, uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, e1 := callnrecvmsg(s, uintptr(unsafe.Pointer(msg)), flags)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, e1 := callnsendmsg(s, uintptr(unsafe.Pointer(msg)), flags)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, e1 := callmunmap(addr, length)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, advice int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, e1 := callmadvise(uintptr(unsafe.Pointer(_p0)), len(b), advice)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, e1 := callmprotect(uintptr(unsafe.Pointer(_p0)), len(b), prot)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, e1 := callmlock(uintptr(unsafe.Pointer(_p0)), len(b))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, e1 := callmlockall(flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, e1 := callmsync(uintptr(unsafe.Pointer(_p0)), len(b), flags)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, e1 := callmunlock(uintptr(unsafe.Pointer(_p0)), len(b))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, e1 := callmunlockall()\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (err error) {\n\t_, e1 := callpipe(uintptr(unsafe.Pointer(p)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, e1 := callpoll(uintptr(unsafe.Pointer(fds)), nfds, timeout)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc gettimeofday(tv *Timeval, tzp *Timezone) (err error) {\n\t_, e1 := callgettimeofday(uintptr(unsafe.Pointer(tv)), uintptr(unsafe.Pointer(tzp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, e1 := calltime(uintptr(unsafe.Pointer(t)))\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callutime(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsystemcfg(label int) (n uint64) {\n\tr0, _ := callgetsystemcfg(label)\n\tn = uint64(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc umount(target string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, e1 := callumount(uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, e1 := calllseek(fd, offset, whence)\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, e1 := callmmap64(addr, length, prot, flags, fd, offset)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go",
    "content": "// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build aix && ppc64 && gc\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_accept accept \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getdirent getdirent \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fsync_range fsync_range \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_acct acct \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_chdir chdir \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_chroot chroot \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_close close \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_dup dup \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_exit exit \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fdatasync fdatasync \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getpid getpid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getppid getppid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getsid getsid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_kill kill \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_syslog syslog \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mknod mknod \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_open64 open64 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_openat openat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_read read \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_readlink readlink \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_renameat renameat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setdomainname setdomainname \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_sethostname sethostname \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setsid setsid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setuid setuid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setgid setgid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_statx statx \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_sync sync \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_times times \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_umask umask \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_uname uname \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_unlink unlink \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_ustat ustat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_write write \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_posix_fadvise64 posix_fadvise64 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fchown fchown \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fstat fstat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getegid getegid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getgid getgid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getuid getuid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_lchown lchown \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_listen listen \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_lstat lstat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_pause pause \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_pread64 pread64 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_pwrite64 pwrite64 \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_select select \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_pselect pselect \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setregid setregid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_splice splice \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_stat stat \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_statfs statfs \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_truncate truncate \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_bind bind \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_connect connect \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_socket socket \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_sendto sendto \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_nrecvmsg nrecvmsg \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_nsendmsg nsendmsg \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_munmap munmap \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_madvise madvise \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mlock mlock \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_msync msync \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_munlock munlock \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_pipe pipe \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_poll poll \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_time time \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_utime utime \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_umount umount \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_lseek lseek \"libc.a/shr_64.o\"\n//go:cgo_import_dynamic libc_mmap64 mmap64 \"libc.a/shr_64.o\"\n\n//go:linkname libc_utimes libc_utimes\n//go:linkname libc_utimensat libc_utimensat\n//go:linkname libc_getcwd libc_getcwd\n//go:linkname libc_accept libc_accept\n//go:linkname libc_getdirent libc_getdirent\n//go:linkname libc_wait4 libc_wait4\n//go:linkname libc_ioctl libc_ioctl\n//go:linkname libc_fcntl libc_fcntl\n//go:linkname libc_fsync_range libc_fsync_range\n//go:linkname libc_acct libc_acct\n//go:linkname libc_chdir libc_chdir\n//go:linkname libc_chroot libc_chroot\n//go:linkname libc_close libc_close\n//go:linkname libc_dup libc_dup\n//go:linkname libc_exit libc_exit\n//go:linkname libc_faccessat libc_faccessat\n//go:linkname libc_fchdir libc_fchdir\n//go:linkname libc_fchmod libc_fchmod\n//go:linkname libc_fchmodat libc_fchmodat\n//go:linkname libc_fchownat libc_fchownat\n//go:linkname libc_fdatasync libc_fdatasync\n//go:linkname libc_getpgid libc_getpgid\n//go:linkname libc_getpgrp libc_getpgrp\n//go:linkname libc_getpid libc_getpid\n//go:linkname libc_getppid libc_getppid\n//go:linkname libc_getpriority libc_getpriority\n//go:linkname libc_getrusage libc_getrusage\n//go:linkname libc_getsid libc_getsid\n//go:linkname libc_kill libc_kill\n//go:linkname libc_syslog libc_syslog\n//go:linkname libc_mkdir libc_mkdir\n//go:linkname libc_mkdirat libc_mkdirat\n//go:linkname libc_mkfifo libc_mkfifo\n//go:linkname libc_mknod libc_mknod\n//go:linkname libc_mknodat libc_mknodat\n//go:linkname libc_nanosleep libc_nanosleep\n//go:linkname libc_open64 libc_open64\n//go:linkname libc_openat libc_openat\n//go:linkname libc_read libc_read\n//go:linkname libc_readlink libc_readlink\n//go:linkname libc_renameat libc_renameat\n//go:linkname libc_setdomainname libc_setdomainname\n//go:linkname libc_sethostname libc_sethostname\n//go:linkname libc_setpgid libc_setpgid\n//go:linkname libc_setsid libc_setsid\n//go:linkname libc_settimeofday libc_settimeofday\n//go:linkname libc_setuid libc_setuid\n//go:linkname libc_setgid libc_setgid\n//go:linkname libc_setpriority libc_setpriority\n//go:linkname libc_statx libc_statx\n//go:linkname libc_sync libc_sync\n//go:linkname libc_times libc_times\n//go:linkname libc_umask libc_umask\n//go:linkname libc_uname libc_uname\n//go:linkname libc_unlink libc_unlink\n//go:linkname libc_unlinkat libc_unlinkat\n//go:linkname libc_ustat libc_ustat\n//go:linkname libc_write libc_write\n//go:linkname libc_dup2 libc_dup2\n//go:linkname libc_posix_fadvise64 libc_posix_fadvise64\n//go:linkname libc_fchown libc_fchown\n//go:linkname libc_fstat libc_fstat\n//go:linkname libc_fstatat libc_fstatat\n//go:linkname libc_fstatfs libc_fstatfs\n//go:linkname libc_ftruncate libc_ftruncate\n//go:linkname libc_getegid libc_getegid\n//go:linkname libc_geteuid libc_geteuid\n//go:linkname libc_getgid libc_getgid\n//go:linkname libc_getuid libc_getuid\n//go:linkname libc_lchown libc_lchown\n//go:linkname libc_listen libc_listen\n//go:linkname libc_lstat libc_lstat\n//go:linkname libc_pause libc_pause\n//go:linkname libc_pread64 libc_pread64\n//go:linkname libc_pwrite64 libc_pwrite64\n//go:linkname libc_select libc_select\n//go:linkname libc_pselect libc_pselect\n//go:linkname libc_setregid libc_setregid\n//go:linkname libc_setreuid libc_setreuid\n//go:linkname libc_shutdown libc_shutdown\n//go:linkname libc_splice libc_splice\n//go:linkname libc_stat libc_stat\n//go:linkname libc_statfs libc_statfs\n//go:linkname libc_truncate libc_truncate\n//go:linkname libc_bind libc_bind\n//go:linkname libc_connect libc_connect\n//go:linkname libc_getgroups libc_getgroups\n//go:linkname libc_setgroups libc_setgroups\n//go:linkname libc_getsockopt libc_getsockopt\n//go:linkname libc_setsockopt libc_setsockopt\n//go:linkname libc_socket libc_socket\n//go:linkname libc_socketpair libc_socketpair\n//go:linkname libc_getpeername libc_getpeername\n//go:linkname libc_getsockname libc_getsockname\n//go:linkname libc_recvfrom libc_recvfrom\n//go:linkname libc_sendto libc_sendto\n//go:linkname libc_nrecvmsg libc_nrecvmsg\n//go:linkname libc_nsendmsg libc_nsendmsg\n//go:linkname libc_munmap libc_munmap\n//go:linkname libc_madvise libc_madvise\n//go:linkname libc_mprotect libc_mprotect\n//go:linkname libc_mlock libc_mlock\n//go:linkname libc_mlockall libc_mlockall\n//go:linkname libc_msync libc_msync\n//go:linkname libc_munlock libc_munlock\n//go:linkname libc_munlockall libc_munlockall\n//go:linkname libc_pipe libc_pipe\n//go:linkname libc_poll libc_poll\n//go:linkname libc_gettimeofday libc_gettimeofday\n//go:linkname libc_time libc_time\n//go:linkname libc_utime libc_utime\n//go:linkname libc_getsystemcfg libc_getsystemcfg\n//go:linkname libc_umount libc_umount\n//go:linkname libc_getrlimit libc_getrlimit\n//go:linkname libc_lseek libc_lseek\n//go:linkname libc_mmap64 libc_mmap64\n\ntype syscallFunc uintptr\n\nvar (\n\tlibc_utimes,\n\tlibc_utimensat,\n\tlibc_getcwd,\n\tlibc_accept,\n\tlibc_getdirent,\n\tlibc_wait4,\n\tlibc_ioctl,\n\tlibc_fcntl,\n\tlibc_fsync_range,\n\tlibc_acct,\n\tlibc_chdir,\n\tlibc_chroot,\n\tlibc_close,\n\tlibc_dup,\n\tlibc_exit,\n\tlibc_faccessat,\n\tlibc_fchdir,\n\tlibc_fchmod,\n\tlibc_fchmodat,\n\tlibc_fchownat,\n\tlibc_fdatasync,\n\tlibc_getpgid,\n\tlibc_getpgrp,\n\tlibc_getpid,\n\tlibc_getppid,\n\tlibc_getpriority,\n\tlibc_getrusage,\n\tlibc_getsid,\n\tlibc_kill,\n\tlibc_syslog,\n\tlibc_mkdir,\n\tlibc_mkdirat,\n\tlibc_mkfifo,\n\tlibc_mknod,\n\tlibc_mknodat,\n\tlibc_nanosleep,\n\tlibc_open64,\n\tlibc_openat,\n\tlibc_read,\n\tlibc_readlink,\n\tlibc_renameat,\n\tlibc_setdomainname,\n\tlibc_sethostname,\n\tlibc_setpgid,\n\tlibc_setsid,\n\tlibc_settimeofday,\n\tlibc_setuid,\n\tlibc_setgid,\n\tlibc_setpriority,\n\tlibc_statx,\n\tlibc_sync,\n\tlibc_times,\n\tlibc_umask,\n\tlibc_uname,\n\tlibc_unlink,\n\tlibc_unlinkat,\n\tlibc_ustat,\n\tlibc_write,\n\tlibc_dup2,\n\tlibc_posix_fadvise64,\n\tlibc_fchown,\n\tlibc_fstat,\n\tlibc_fstatat,\n\tlibc_fstatfs,\n\tlibc_ftruncate,\n\tlibc_getegid,\n\tlibc_geteuid,\n\tlibc_getgid,\n\tlibc_getuid,\n\tlibc_lchown,\n\tlibc_listen,\n\tlibc_lstat,\n\tlibc_pause,\n\tlibc_pread64,\n\tlibc_pwrite64,\n\tlibc_select,\n\tlibc_pselect,\n\tlibc_setregid,\n\tlibc_setreuid,\n\tlibc_shutdown,\n\tlibc_splice,\n\tlibc_stat,\n\tlibc_statfs,\n\tlibc_truncate,\n\tlibc_bind,\n\tlibc_connect,\n\tlibc_getgroups,\n\tlibc_setgroups,\n\tlibc_getsockopt,\n\tlibc_setsockopt,\n\tlibc_socket,\n\tlibc_socketpair,\n\tlibc_getpeername,\n\tlibc_getsockname,\n\tlibc_recvfrom,\n\tlibc_sendto,\n\tlibc_nrecvmsg,\n\tlibc_nsendmsg,\n\tlibc_munmap,\n\tlibc_madvise,\n\tlibc_mprotect,\n\tlibc_mlock,\n\tlibc_mlockall,\n\tlibc_msync,\n\tlibc_munlock,\n\tlibc_munlockall,\n\tlibc_pipe,\n\tlibc_poll,\n\tlibc_gettimeofday,\n\tlibc_time,\n\tlibc_utime,\n\tlibc_getsystemcfg,\n\tlibc_umount,\n\tlibc_getrlimit,\n\tlibc_lseek,\n\tlibc_mmap64 syscallFunc\n)\n\n// Implemented in runtime/syscall_aix.go.\nfunc rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\nfunc syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimes)), 2, _p0, times, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimensat)), 4, uintptr(dirfd), _p0, times, uintptr(flag), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getcwd)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), rsa, addrlen, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getdirent)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_wait4)), 4, uintptr(pid), status, uintptr(options), rusage, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), arg, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, fd, uintptr(cmd), arg, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chdir)), 1, _p0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chroot)), 1, _p0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callclose(fd int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_close)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calldup(oldfd int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup)), 1, uintptr(oldfd), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callexit(code int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_exit)), 1, uintptr(code), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_faccessat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchdir(fd int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchownat)), 5, uintptr(dirfd), _p0, uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfdatasync(fd int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpgid(pid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpgrp() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpgrp)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetppid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getppid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpriority(which int, who int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrusage)), 2, uintptr(who), rusage, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsid(pid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsid)), 1, uintptr(pid), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callkill(pid int, sig int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_kill)), 2, uintptr(pid), uintptr(sig), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_syslog)), 3, uintptr(typ), _p0, uintptr(_lenp0), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdir)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdirat)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkfifo)), 2, _p0, uintptr(mode), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknod)), 3, _p0, uintptr(mode), uintptr(dev), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(dev), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nanosleep)), 2, time, leftover, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_open64)), 3, _p0, uintptr(mode), uintptr(perm), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_openat)), 4, uintptr(dirfd), _p0, uintptr(flags), uintptr(mode), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_readlink)), 3, _p0, _p1, uintptr(_lenp1), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_renameat)), 4, uintptr(olddirfd), _p0, uintptr(newdirfd), _p1, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setdomainname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sethostname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetsid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setsid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_settimeofday)), 1, tv, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetuid(uid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetgid(uid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setgid)), 1, uintptr(uid), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statx)), 5, uintptr(dirfd), _p0, uintptr(flags), uintptr(mask), stat, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsync() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sync)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltimes(tms uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_times)), 1, tms, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callumask(mask int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_umask)), 1, uintptr(mask), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calluname(buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_uname)), 1, buf, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlink)), 1, _p0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlinkat)), 3, uintptr(dirfd), _p0, uintptr(flags), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ustat)), 2, uintptr(dev), ubuf, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_posix_fadvise64)), 4, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstat)), 2, uintptr(fd), stat, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatat)), 4, uintptr(dirfd), _p0, stat, uintptr(flags), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatfs)), 2, uintptr(fd), buf, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetegid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getegid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgeteuid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_geteuid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetgid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetuid() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getuid)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lchown)), 3, _p0, uintptr(uid), uintptr(gid), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllisten(s int, n int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_listen)), 2, uintptr(s), uintptr(n), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lstat)), 2, _p0, stat, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpause() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pause)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pread64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pwrite64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_select)), 5, uintptr(nfd), r, w, e, timeout, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pselect)), 6, uintptr(nfd), r, w, e, timeout, sigmask)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callshutdown(fd int, how int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_splice)), 6, uintptr(rfd), roff, uintptr(wfd), woff, uintptr(len), uintptr(flags))\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstat(_p0 uintptr, statptr uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_stat)), 2, _p0, statptr, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statfs)), 2, _p0, buf, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_truncate)), 2, _p0, uintptr(length), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_bind)), 3, uintptr(s), addr, addrlen, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_connect)), 3, uintptr(s), addr, addrlen, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(n), list, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(n), list, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), fd, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), _p0, uintptr(_lenp0), uintptr(flags), from, fromlen)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sendto)), 6, uintptr(s), _p0, uintptr(_lenp0), uintptr(flags), to, addrlen)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nrecvmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nsendmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, addr, length, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_madvise)), 3, _p0, uintptr(_lenp0), uintptr(advice), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mprotect)), 3, _p0, uintptr(_lenp0), uintptr(prot), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmlockall(flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_msync)), 3, _p0, uintptr(_lenp0), uintptr(flags), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunlockall() (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlockall)), 0, 0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpipe(p uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_pipe)), 1, p, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_poll)), 3, fds, uintptr(nfds), uintptr(timeout), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_gettimeofday)), 2, tv, tzp, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltime(t uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_time)), 1, t, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utime)), 2, _p0, buf, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callumount(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_umount)), 1, _p0, 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mmap64)), 6, addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go",
    "content": "// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build aix && ppc64 && gccgo\n\npackage unix\n\n/*\n#include <stdint.h>\nint utimes(uintptr_t, uintptr_t);\nint utimensat(int, uintptr_t, uintptr_t, int);\nint getcwd(uintptr_t, size_t);\nint accept(int, uintptr_t, uintptr_t);\nint getdirent(int, uintptr_t, size_t);\nint wait4(int, uintptr_t, int, uintptr_t);\nint ioctl(int, int, uintptr_t);\nint fcntl(uintptr_t, int, uintptr_t);\nint fsync_range(int, int, long long, long long);\nint acct(uintptr_t);\nint chdir(uintptr_t);\nint chroot(uintptr_t);\nint close(int);\nint dup(int);\nvoid exit(int);\nint faccessat(int, uintptr_t, unsigned int, int);\nint fchdir(int);\nint fchmod(int, unsigned int);\nint fchmodat(int, uintptr_t, unsigned int, int);\nint fchownat(int, uintptr_t, int, int, int);\nint fdatasync(int);\nint getpgid(int);\nint getpgrp();\nint getpid();\nint getppid();\nint getpriority(int, int);\nint getrusage(int, uintptr_t);\nint getsid(int);\nint kill(int, int);\nint syslog(int, uintptr_t, size_t);\nint mkdir(int, uintptr_t, unsigned int);\nint mkdirat(int, uintptr_t, unsigned int);\nint mkfifo(uintptr_t, unsigned int);\nint mknod(uintptr_t, unsigned int, int);\nint mknodat(int, uintptr_t, unsigned int, int);\nint nanosleep(uintptr_t, uintptr_t);\nint open64(uintptr_t, int, unsigned int);\nint openat(int, uintptr_t, int, unsigned int);\nint read(int, uintptr_t, size_t);\nint readlink(uintptr_t, uintptr_t, size_t);\nint renameat(int, uintptr_t, int, uintptr_t);\nint setdomainname(uintptr_t, size_t);\nint sethostname(uintptr_t, size_t);\nint setpgid(int, int);\nint setsid();\nint settimeofday(uintptr_t);\nint setuid(int);\nint setgid(int);\nint setpriority(int, int, int);\nint statx(int, uintptr_t, int, int, uintptr_t);\nint sync();\nuintptr_t times(uintptr_t);\nint umask(int);\nint uname(uintptr_t);\nint unlink(uintptr_t);\nint unlinkat(int, uintptr_t, int);\nint ustat(int, uintptr_t);\nint write(int, uintptr_t, size_t);\nint dup2(int, int);\nint posix_fadvise64(int, long long, long long, int);\nint fchown(int, int, int);\nint fstat(int, uintptr_t);\nint fstatat(int, uintptr_t, uintptr_t, int);\nint fstatfs(int, uintptr_t);\nint ftruncate(int, long long);\nint getegid();\nint geteuid();\nint getgid();\nint getuid();\nint lchown(uintptr_t, int, int);\nint listen(int, int);\nint lstat(uintptr_t, uintptr_t);\nint pause();\nint pread64(int, uintptr_t, size_t, long long);\nint pwrite64(int, uintptr_t, size_t, long long);\n#define c_select select\nint select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);\nint pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);\nint setregid(int, int);\nint setreuid(int, int);\nint shutdown(int, int);\nlong long splice(int, uintptr_t, int, uintptr_t, int, int);\nint stat(uintptr_t, uintptr_t);\nint statfs(uintptr_t, uintptr_t);\nint truncate(uintptr_t, long long);\nint bind(int, uintptr_t, uintptr_t);\nint connect(int, uintptr_t, uintptr_t);\nint getgroups(int, uintptr_t);\nint setgroups(int, uintptr_t);\nint getsockopt(int, int, int, uintptr_t, uintptr_t);\nint setsockopt(int, int, int, uintptr_t, uintptr_t);\nint socket(int, int, int);\nint socketpair(int, int, int, uintptr_t);\nint getpeername(int, uintptr_t, uintptr_t);\nint getsockname(int, uintptr_t, uintptr_t);\nint recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);\nint sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t);\nint nrecvmsg(int, uintptr_t, int);\nint nsendmsg(int, uintptr_t, int);\nint munmap(uintptr_t, uintptr_t);\nint madvise(uintptr_t, size_t, int);\nint mprotect(uintptr_t, size_t, int);\nint mlock(uintptr_t, size_t);\nint mlockall(int);\nint msync(uintptr_t, size_t, int);\nint munlock(uintptr_t, size_t);\nint munlockall();\nint pipe(uintptr_t);\nint poll(uintptr_t, int, int);\nint gettimeofday(uintptr_t, uintptr_t);\nint time(uintptr_t);\nint utime(uintptr_t, uintptr_t);\nunsigned long long getsystemcfg(int);\nint umount(uintptr_t);\nint getrlimit(int, uintptr_t);\nlong long lseek(int, long long, int);\nuintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);\n\n*/\nimport \"C\"\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.utimes(C.uintptr_t(_p0), C.uintptr_t(times)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(times), C.int(flag)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getcwd(C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.accept(C.int(s), C.uintptr_t(rsa), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getdirent(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.wait4(C.int(pid), C.uintptr_t(status), C.int(options), C.uintptr_t(rusage)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.acct(C.uintptr_t(_p0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.chdir(C.uintptr_t(_p0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.chroot(C.uintptr_t(_p0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callclose(fd int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.close(C.int(fd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calldup(oldfd int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.dup(C.int(oldfd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callexit(code int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.exit(C.int(code)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchdir(fd int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fchdir(C.int(fd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fchmod(C.int(fd), C.uint(mode)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfdatasync(fd int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fdatasync(C.int(fd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpgid(pid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getpgid(C.int(pid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpgrp() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getpgrp())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getpid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetppid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getppid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpriority(which int, who int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getpriority(C.int(which), C.int(who)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getrusage(C.int(who), C.uintptr_t(rusage)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsid(pid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getsid(C.int(pid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callkill(pid int, sig int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.kill(C.int(pid), C.int(sig)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.syslog(C.int(typ), C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mkfifo(C.uintptr_t(_p0), C.uint(mode)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.nanosleep(C.uintptr_t(time), C.uintptr_t(leftover)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.read(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.readlink(C.uintptr_t(_p0), C.uintptr_t(_p1), C.size_t(_lenp1)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setdomainname(C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.sethostname(C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setpgid(C.int(pid), C.int(pgid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetsid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setsid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.settimeofday(C.uintptr_t(tv)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetuid(uid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setuid(C.int(uid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetgid(uid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setgid(C.int(uid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setpriority(C.int(which), C.int(who), C.int(prio)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(stat)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsync() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.sync())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltimes(tms uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.times(C.uintptr_t(tms)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callumask(mask int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.umask(C.int(mask)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calluname(buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.uname(C.uintptr_t(buf)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.unlink(C.uintptr_t(_p0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.ustat(C.int(dev), C.uintptr_t(ubuf)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.write(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.dup2(C.int(oldfd), C.int(newfd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fchown(C.int(fd), C.int(uid), C.int(gid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fstat(C.int(fd), C.uintptr_t(stat)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(stat), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.fstatfs(C.int(fd), C.uintptr_t(buf)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.ftruncate(C.int(fd), C.longlong(length)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetegid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getegid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgeteuid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.geteuid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetgid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getgid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetuid() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getuid())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllisten(s int, n int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.listen(C.int(s), C.int(n)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.lstat(C.uintptr_t(_p0), C.uintptr_t(stat)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpause() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.pause())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.pread64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.pwrite64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.c_select(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.pselect(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout), C.uintptr_t(sigmask)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setregid(C.int(rgid), C.int(egid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setreuid(C.int(ruid), C.int(euid)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callshutdown(fd int, how int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.shutdown(C.int(fd), C.int(how)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.splice(C.int(rfd), C.uintptr_t(roff), C.int(wfd), C.uintptr_t(woff), C.int(len), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstat(_p0 uintptr, statptr uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.stat(C.uintptr_t(_p0), C.uintptr_t(statptr)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.statfs(C.uintptr_t(_p0), C.uintptr_t(buf)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.truncate(C.uintptr_t(_p0), C.longlong(length)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.bind(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.connect(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getgroups(C.int(n), C.uintptr_t(list)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setgroups(C.int(n), C.uintptr_t(list)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.socket(C.int(domain), C.int(typ), C.int(proto)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(fd)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getpeername(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getsockname(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.recvfrom(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(from), C.uintptr_t(fromlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.sendto(C.int(s), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(to), C.uintptr_t(addrlen)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.nrecvmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.nsendmsg(C.int(s), C.uintptr_t(msg), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.munmap(C.uintptr_t(addr), C.uintptr_t(length)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.madvise(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(advice)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mprotect(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(prot)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mlock(C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmlockall(flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mlockall(C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.msync(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.munlock(C.uintptr_t(_p0), C.size_t(_lenp0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmunlockall() (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.munlockall())\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpipe(p uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.pipe(C.uintptr_t(p)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.poll(C.uintptr_t(fds), C.int(nfds), C.int(timeout)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.gettimeofday(C.uintptr_t(tv), C.uintptr_t(tzp)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calltime(t uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.time(C.uintptr_t(t)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.utime(C.uintptr_t(_p0), C.uintptr_t(buf)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getsystemcfg(C.int(label)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callumount(_p0 uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.umount(C.uintptr_t(_p0)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) {\n\tr1 = uintptr(C.mmap64(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset)))\n\te1 = syscall.GetErrno()\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go",
    "content": "// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build darwin && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc closedir(dir uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_closedir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_closedir closedir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {\n\tr0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))\n\tres = Errno(r0)\n\treturn\n}\n\nvar libc_readdir_r_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readdir_r readdir_r \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe pipe \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getxattr getxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fgetxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fgetxattr fgetxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setxattr setxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsetxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsetxattr fsetxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc removexattr(path string, attr string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_removexattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_removexattr removexattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fremovexattr(fd int, attr string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fremovexattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fremovexattr fremovexattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc listxattr(path string, dest *byte, size int, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listxattr listxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flistxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flistxattr flistxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kill(pid int, signum int, posix int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc renamexNp(from string, to string, flag uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renamex_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renamex_np renamex_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameatx_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameatx_np renameatx_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pthread_chdir_np(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pthread_chdir_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pthread_fchdir_np(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pthread_fchdir_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iov) > 0 {\n\t\t_p0 = unsafe.Pointer(&iov[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connectx_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connectx connectx \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendfile_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendfile sendfile \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmat shmat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))\n\tresult = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmctl shmctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmdt(addr uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmdt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmdt shmdt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmget(key int, size int, flag int) (id int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))\n\tid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmget_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmget shmget \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Clonefile(src string, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(src)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clonefile_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clonefile clonefile \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(src)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clonefileat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clonefileat clonefileat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exchangedata(path1 string, path2 string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path1)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(path2)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_exchangedata_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exchangedata exchangedata \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fclonefileat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fclonefileat fclonefileat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\nvar libc_getdtablesize_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdtablesize getdtablesize \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(attrBuf) > 0 {\n\t\t_p1 = unsafe.Pointer(&attrBuf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setattrlist_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setattrlist setattrlist \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setprivexec(flag int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setprivexec_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setprivexec setprivexec \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_undelete_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_undelete undelete \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readv(fd int, iovecs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readv_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readv readv \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_preadv_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_preadv preadv \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc writev(fd int, iovecs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_writev_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_writev writev \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwritev_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwritev pwritev \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat64 fstat64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat64 fstatat64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat64_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat64 getfsstat64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat64 lstat64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ptrace_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ptrace ptrace \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat64 stat64 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs64_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs64 statfs64 \"/usr/lib/libSystem.B.dylib\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s",
    "content": "// go run mkasm.go darwin amd64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fdopendir(SB)\nGLOBL\t·libc_fdopendir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_closedir(SB)\nGLOBL\t·libc_closedir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)\n\nTEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readdir_r(SB)\nGLOBL\t·libc_readdir_r_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)\n\nTEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe(SB)\nGLOBL\t·libc_pipe_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)\n\nTEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getxattr(SB)\nGLOBL\t·libc_getxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)\n\nTEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fgetxattr(SB)\nGLOBL\t·libc_fgetxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)\n\nTEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setxattr(SB)\nGLOBL\t·libc_setxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)\n\nTEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsetxattr(SB)\nGLOBL\t·libc_fsetxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)\n\nTEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_removexattr(SB)\nGLOBL\t·libc_removexattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)\n\nTEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fremovexattr(SB)\nGLOBL\t·libc_fremovexattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)\n\nTEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listxattr(SB)\nGLOBL\t·libc_listxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)\n\nTEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flistxattr(SB)\nGLOBL\t·libc_flistxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renamex_np(SB)\nGLOBL\t·libc_renamex_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)\n\nTEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameatx_np(SB)\nGLOBL\t·libc_renameatx_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pthread_chdir_np(SB)\nGLOBL\t·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)\n\nTEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pthread_fchdir_np(SB)\nGLOBL\t·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)\n\nTEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connectx(SB)\nGLOBL\t·libc_connectx_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)\n\nTEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendfile(SB)\nGLOBL\t·libc_sendfile_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)\n\nTEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmat(SB)\nGLOBL\t·libc_shmat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)\n\nTEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmctl(SB)\nGLOBL\t·libc_shmctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)\n\nTEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmdt(SB)\nGLOBL\t·libc_shmdt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)\n\nTEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmget(SB)\nGLOBL\t·libc_shmget_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clonefile(SB)\nGLOBL\t·libc_clonefile_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)\n\nTEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clonefileat(SB)\nGLOBL\t·libc_clonefileat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exchangedata(SB)\nGLOBL\t·libc_exchangedata_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fclonefileat(SB)\nGLOBL\t·libc_fclonefileat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdtablesize(SB)\nGLOBL\t·libc_getdtablesize_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setattrlist(SB)\nGLOBL\t·libc_setattrlist_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setprivexec(SB)\nGLOBL\t·libc_setprivexec_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_undelete(SB)\nGLOBL\t·libc_undelete_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readv(SB)\nGLOBL\t·libc_readv_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)\n\nTEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_preadv(SB)\nGLOBL\t·libc_preadv_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)\n\nTEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_writev(SB)\nGLOBL\t·libc_writev_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)\n\nTEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwritev(SB)\nGLOBL\t·libc_pwritev_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)\n\nTEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat64(SB)\nGLOBL\t·libc_fstat64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat64_trampoline_addr(SB)/8, $libc_fstat64_trampoline<>(SB)\n\nTEXT libc_fstatat64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat64(SB)\nGLOBL\t·libc_fstatat64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat64_trampoline_addr(SB)/8, $libc_fstatat64_trampoline<>(SB)\n\nTEXT libc_fstatfs64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs64(SB)\nGLOBL\t·libc_fstatfs64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs64_trampoline_addr(SB)/8, $libc_fstatfs64_trampoline<>(SB)\n\nTEXT libc_getfsstat64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat64(SB)\nGLOBL\t·libc_getfsstat64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat64_trampoline_addr(SB)/8, $libc_getfsstat64_trampoline<>(SB)\n\nTEXT libc_lstat64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat64(SB)\nGLOBL\t·libc_lstat64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat64_trampoline_addr(SB)/8, $libc_lstat64_trampoline<>(SB)\n\nTEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ptrace(SB)\nGLOBL\t·libc_ptrace_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)\n\nTEXT libc_stat64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat64(SB)\nGLOBL\t·libc_stat64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat64_trampoline_addr(SB)/8, $libc_stat64_trampoline<>(SB)\n\nTEXT libc_statfs64_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs64(SB)\nGLOBL\t·libc_statfs64_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs64_trampoline_addr(SB)/8, $libc_statfs64_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go",
    "content": "// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build darwin && arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc closedir(dir uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_closedir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_closedir closedir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {\n\tr0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))\n\tres = Errno(r0)\n\treturn\n}\n\nvar libc_readdir_r_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readdir_r readdir_r \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe pipe \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getxattr getxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fgetxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fgetxattr fgetxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setxattr setxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsetxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsetxattr fsetxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc removexattr(path string, attr string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_removexattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_removexattr removexattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fremovexattr(fd int, attr string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fremovexattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fremovexattr fremovexattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc listxattr(path string, dest *byte, size int, options int) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listxattr listxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flistxattr_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flistxattr flistxattr \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kill(pid int, signum int, posix int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc renamexNp(from string, to string, flag uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renamex_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renamex_np renamex_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameatx_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameatx_np renameatx_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pthread_chdir_np(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pthread_chdir_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pthread_fchdir_np(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pthread_fchdir_np_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iov) > 0 {\n\t\t_p0 = unsafe.Pointer(&iov[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connectx_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connectx connectx \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendfile_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendfile sendfile \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmat shmat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))\n\tresult = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmctl shmctl \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmdt(addr uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmdt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmdt shmdt \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmget(key int, size int, flag int) (id int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))\n\tid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shmget_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shmget shmget \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Clonefile(src string, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(src)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clonefile_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clonefile clonefile \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(src)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clonefileat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clonefileat clonefileat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exchangedata(path1 string, path2 string, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path1)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(path2)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_exchangedata_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exchangedata exchangedata \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(dst)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fclonefileat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fclonefileat fclonefileat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\nvar libc_getdtablesize_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdtablesize getdtablesize \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(attrBuf) > 0 {\n\t\t_p1 = unsafe.Pointer(&attrBuf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setattrlist_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setattrlist setattrlist \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setprivexec(flag int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setprivexec_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setprivexec setprivexec \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_undelete_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_undelete undelete \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readv(fd int, iovecs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readv_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readv readv \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_preadv_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_preadv preadv \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc writev(fd int, iovecs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_writev_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_writev writev \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovecs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovecs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwritev_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwritev pwritev \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ptrace_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ptrace ptrace \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"/usr/lib/libSystem.B.dylib\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"/usr/lib/libSystem.B.dylib\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s",
    "content": "// go run mkasm.go darwin arm64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fdopendir(SB)\nGLOBL\t·libc_fdopendir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_closedir(SB)\nGLOBL\t·libc_closedir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)\n\nTEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readdir_r(SB)\nGLOBL\t·libc_readdir_r_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)\n\nTEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe(SB)\nGLOBL\t·libc_pipe_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB)\n\nTEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getxattr(SB)\nGLOBL\t·libc_getxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB)\n\nTEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fgetxattr(SB)\nGLOBL\t·libc_fgetxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB)\n\nTEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setxattr(SB)\nGLOBL\t·libc_setxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB)\n\nTEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsetxattr(SB)\nGLOBL\t·libc_fsetxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB)\n\nTEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_removexattr(SB)\nGLOBL\t·libc_removexattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB)\n\nTEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fremovexattr(SB)\nGLOBL\t·libc_fremovexattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB)\n\nTEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listxattr(SB)\nGLOBL\t·libc_listxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB)\n\nTEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flistxattr(SB)\nGLOBL\t·libc_flistxattr_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renamex_np(SB)\nGLOBL\t·libc_renamex_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)\n\nTEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameatx_np(SB)\nGLOBL\t·libc_renameatx_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pthread_chdir_np(SB)\nGLOBL\t·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)\n\nTEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pthread_fchdir_np(SB)\nGLOBL\t·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)\n\nTEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connectx(SB)\nGLOBL\t·libc_connectx_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB)\n\nTEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendfile(SB)\nGLOBL\t·libc_sendfile_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)\n\nTEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmat(SB)\nGLOBL\t·libc_shmat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)\n\nTEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmctl(SB)\nGLOBL\t·libc_shmctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)\n\nTEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmdt(SB)\nGLOBL\t·libc_shmdt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)\n\nTEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shmget(SB)\nGLOBL\t·libc_shmget_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clonefile(SB)\nGLOBL\t·libc_clonefile_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB)\n\nTEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clonefileat(SB)\nGLOBL\t·libc_clonefileat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exchangedata(SB)\nGLOBL\t·libc_exchangedata_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fclonefileat(SB)\nGLOBL\t·libc_fclonefileat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdtablesize(SB)\nGLOBL\t·libc_getdtablesize_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setattrlist(SB)\nGLOBL\t·libc_setattrlist_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setprivexec(SB)\nGLOBL\t·libc_setprivexec_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_undelete(SB)\nGLOBL\t·libc_undelete_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readv(SB)\nGLOBL\t·libc_readv_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)\n\nTEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_preadv(SB)\nGLOBL\t·libc_preadv_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)\n\nTEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_writev(SB)\nGLOBL\t·libc_writev_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)\n\nTEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwritev(SB)\nGLOBL\t·libc_pwritev_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ptrace(SB)\nGLOBL\t·libc_ptrace_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go",
    "content": "// go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build dragonfly && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe() (r int, w int, err error) {\n\tr0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)\n\tr = int(r0)\n\tw = int(r1)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (r int, w int, err error) {\n\tr0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tr = int(r0)\n\tw = int(r1)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go",
    "content": "// go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build freebsd && 386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CapEnter() (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsGet(version int, fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsLimit(fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go",
    "content": "// go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build freebsd && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CapEnter() (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsGet(version int, fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsLimit(fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go",
    "content": "// go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build freebsd && arm\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CapEnter() (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsGet(version int, fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsLimit(fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, uintptr(dev), uintptr(dev>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go",
    "content": "// go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build freebsd && arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CapEnter() (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsGet(version int, fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsLimit(fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go",
    "content": "// go run mksyscall.go -tags freebsd,riscv64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_riscv64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build freebsd && riscv64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CapEnter() (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsGet(version int, fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc capRightsLimit(fd int, rightsp *CapRights) (err error) {\n\t_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdtablesize() (size int) {\n\tr0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)\n\tsize = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Undelete(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go",
    "content": "// go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build illumos && amd64\n\npackage unix\n\nimport (\n\t\"unsafe\"\n)\n\n//go:cgo_import_dynamic libc_readv readv \"libc.so\"\n//go:cgo_import_dynamic libc_preadv preadv \"libc.so\"\n//go:cgo_import_dynamic libc_writev writev \"libc.so\"\n//go:cgo_import_dynamic libc_pwritev pwritev \"libc.so\"\n//go:cgo_import_dynamic libc_accept4 accept4 \"libsocket.so\"\n\n//go:linkname procreadv libc_readv\n//go:linkname procpreadv libc_preadv\n//go:linkname procwritev libc_writev\n//go:linkname procpwritev libc_pwritev\n//go:linkname procaccept4 libc_accept4\n\nvar (\n\tprocreadv,\n\tprocpreadv,\n\tprocwritev,\n\tprocpwritev,\n\tprocaccept4 syscallFunc\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readv(fd int, iovs []Iovec) (n int, err error) {\n\tvar _p0 *Iovec\n\tif len(iovs) > 0 {\n\t\t_p0 = &iovs[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc preadv(fd int, iovs []Iovec, off int64) (n int, err error) {\n\tvar _p0 *Iovec\n\tif len(iovs) > 0 {\n\t\t_p0 = &iovs[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc writev(fd int, iovs []Iovec) (n int, err error) {\n\tvar _p0 *Iovec\n\tif len(iovs) > 0 {\n\t\t_p0 = &iovs[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {\n\tvar _p0 *Iovec\n\tif len(iovs) > 0 {\n\t\t_p0 = &iovs[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux.go",
    "content": "// Code generated by mkmerge; DO NOT EDIT.\n\n//go:build linux\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fchmodat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {\n\t_, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlJoin(cmd int, arg2 string) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(arg2)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(arg3)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(arg4)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(payload) > 0 {\n\t\t_p0 = unsafe.Pointer(&payload[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(keyType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(restriction)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc keyctlRestrictKeyring(cmd int, arg2 int) (err error) {\n\t_, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(arg)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(source)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 *byte\n\t_p2, err = BytePtrFromString(fstype)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(pathname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Acct(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(keyType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(description)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(payload) > 0 {\n\t\t_p2 = unsafe.Pointer(&payload[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)\n\tid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtimex(buf *Timex) (state int, err error) {\n\tr0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)\n\tstate = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Capget(hdr *CapUserHeader, data *CapUserData) (err error) {\n\t_, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Capset(hdr *CapUserHeader, data *CapUserData) (err error) {\n\t_, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockAdjtime(clockid int32, buf *Timex) (state int, err error) {\n\tr0, _, e1 := Syscall(SYS_CLOCK_ADJTIME, uintptr(clockid), uintptr(unsafe.Pointer(buf)), 0)\n\tstate = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGetres(clockid int32, res *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockSettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_SETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {\n\t_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CloseRange(first uint, last uint, flags uint) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc DeleteModule(name string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(oldfd int, newfd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollCreate1(flag int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Eventfd(initval uint, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fdatasync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FinitModule(fd int, params string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(params)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flistxattr(fd int, dest []byte) (sz int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p0 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fremovexattr(fd int, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))\n\tfsfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsopen(fsName string, flags int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsName)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fspick(dirfd int, pathName string, flags int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(pathName)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettid() (tid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)\n\ttid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getxattr(path string, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p2 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc InitModule(moduleImage []byte, params string) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(moduleImage) > 0 {\n\t\t_p0 = unsafe.Pointer(&moduleImage[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(params)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(pathname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))\n\twatchdesc = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc InotifyInit1(flags int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)\n\tsuccess = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, sig syscall.Signal) (err error) {\n\t_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Klogctl(typ int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p2 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listxattr(path string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Llistxattr(path string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))\n\tsz = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lremovexattr(path string, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lsetxattr(path string, attr string, data []byte, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(data) > 0 {\n\t\t_p2 = unsafe.Pointer(&data[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc MemfdCreate(name string, flags int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fromPathName)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(toPathName)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc OpenTree(dfd int, fileName string, flags uint) (r int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fileName)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tr = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc PivotRoot(newroot string, putold string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(newroot)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(putold)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Removexattr(path string, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(keyType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(description)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 *byte\n\t_p2, err = BytePtrFromString(callback)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)\n\tid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setdomainname(p []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sethostname(p []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setns(fd int, nstype int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setxattr(path string, attr string, data []byte, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(data) > 0 {\n\t\t_p2 = unsafe.Pointer(&data[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)\n\tnewfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() {\n\tSyscallNoError(SYS_SYNC, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Syncfs(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sysinfo(info *Sysinfo_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc TimerfdCreate(clockid int, flags int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {\n\t_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {\n\t_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Times(tms *Tms) (ticks uintptr, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)\n\tticks = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(mask int) (oldmask int) {\n\tr0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Uname(buf *Utsname) (err error) {\n\t_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(target string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unshare(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc exitThread(code int) (err error) {\n\t_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readv(fd int, iovs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc writev(fd int, iovs []Iovec) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(iovs) > 0 {\n\t\t_p0 = unsafe.Pointer(&iovs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldaddr), uintptr(oldlength), uintptr(newlength), uintptr(flags), uintptr(newaddr), 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, advice int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc faccessat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(pathname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(localIov) > 0 {\n\t\t_p0 = unsafe.Pointer(&localIov[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(remoteIov) > 0 {\n\t\t_p1 = unsafe.Pointer(&remoteIov[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(localIov) > 0 {\n\t\t_p0 = unsafe.Pointer(&localIov[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(remoteIov) > 0 {\n\t\t_p1 = unsafe.Pointer(&remoteIov[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc PidfdOpen(pid int, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {\n\tr0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))\n\tresult = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmdt(addr uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmget(key int, size int, flag int) (id int, err error) {\n\tr0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))\n\tid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getitimer(which int, currValue *Itimerval) (err error) {\n\t_, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) {\n\t_, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tRawSyscallNoError(SYS_GETRESUID, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tRawSyscallNoError(SYS_GETRESGID, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) {\n\t_, _, e1 := Syscall(SYS_SCHED_SETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) {\n\t_, _, e1 := Syscall6(SYS_SCHED_GETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(size), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) {\n\t_, _, e1 := Syscall6(SYS_CACHESTAT, uintptr(fd), uintptr(unsafe.Pointer(crange)), uintptr(unsafe.Pointer(cstat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mseal(b []byte, flags uint) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setMemPolicy(mode int, mask *CPUSet, size int) (err error) {\n\t_, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_386.go",
    "content": "// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && 386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go",
    "content": "// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc MemfdSecret(flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go",
    "content": "// go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && arm\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go",
    "content": "// go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc MemfdSecret(flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go",
    "content": "// go run mksyscall.go -tags linux,loong64 syscall_linux.go syscall_linux_loong64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && loong64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go",
    "content": "// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && mips\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r0)<<32 | int64(r1))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length>>32), uintptr(length), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset>>32), uintptr(offset))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset>>32), uintptr(offset))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall9(SYS_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length>>32), uintptr(length), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go",
    "content": "// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && mips64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstat(fd int, st *stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc lstat(path string, st *stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, st *stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go",
    "content": "// go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && mips64le\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstat(fd int, st *stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc lstat(path string, st *stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, st *stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go",
    "content": "// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && mipsle\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall9(SYS_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go",
    "content": "// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && ppc\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r0)<<32 | int64(r1))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length>>32), uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc syncFileRange2(fd int, flags int, off int64, n int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go",
    "content": "// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && ppc64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc syncFileRange2(fd int, flags int, off int64, n int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go",
    "content": "// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && ppc64le\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc syncFileRange2(fd int, flags int, off int64, n int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go",
    "content": "// go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && riscv64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc MemfdSecret(flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(pairs) > 0 {\n\t\t_p0 = unsafe.Pointer(&pairs[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_RISCV_HWPROBE, uintptr(_p0), uintptr(len(pairs)), uintptr(cpuCount), uintptr(unsafe.Pointer(cpus)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go",
    "content": "// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && s390x\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(cmdline)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go",
    "content": "// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build linux && sparc64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, buf *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\tr0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))\n\toff = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tr0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Alarm(seconds uint) (remaining uint, err error) {\n\tr0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)\n\tremaining = uint(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go",
    "content": "// go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build netbsd && 386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statvfs1(path string, buf *Statvfs_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go",
    "content": "// go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build netbsd && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statvfs1(path string, buf *Statvfs_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go",
    "content": "// go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build netbsd && arm\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statvfs1(path string, buf *Statvfs_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go",
    "content": "// go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build netbsd && arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attrname)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statvfs1(path string, buf *Statvfs_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0)\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go",
    "content": "// go run mksyscall.go -l32 -openbsd -libc -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && 386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s",
    "content": "// go run mkasm.go openbsd 386\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go",
    "content": "// go run mksyscall.go -openbsd -libc -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s",
    "content": "// go run mkasm.go openbsd amd64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go",
    "content": "// go run mksyscall.go -l32 -openbsd -arm -libc -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && arm\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_ftruncate_trampoline_addr, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)\n\tnewoffset = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s",
    "content": "// go run mkasm.go openbsd arm\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $4\nDATA\t·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go",
    "content": "// go run mksyscall.go -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s",
    "content": "// go run mkasm.go openbsd arm64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go",
    "content": "// go run mksyscall.go -openbsd -libc -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && mips64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s",
    "content": "// go run mkasm.go openbsd mips64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go",
    "content": "// go run mksyscall.go -openbsd -libc -tags openbsd,ppc64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_ppc64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && ppc64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s",
    "content": "// go run mkasm.go openbsd ppc64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getgroups(SB)\n\tRET\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setgroups(SB)\n\tRET\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_wait4(SB)\n\tRET\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_accept(SB)\n\tRET\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_bind(SB)\n\tRET\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_connect(SB)\n\tRET\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_socket(SB)\n\tRET\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getsockopt(SB)\n\tRET\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setsockopt(SB)\n\tRET\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getpeername(SB)\n\tRET\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getsockname(SB)\n\tRET\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_shutdown(SB)\n\tRET\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_socketpair(SB)\n\tRET\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_recvfrom(SB)\n\tRET\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_sendto(SB)\n\tRET\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_recvmsg(SB)\n\tRET\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_sendmsg(SB)\n\tRET\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_kevent(SB)\n\tRET\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_utimes(SB)\n\tRET\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_futimes(SB)\n\tRET\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_poll(SB)\n\tRET\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_madvise(SB)\n\tRET\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mlock(SB)\n\tRET\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mlockall(SB)\n\tRET\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mprotect(SB)\n\tRET\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_msync(SB)\n\tRET\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_munlock(SB)\n\tRET\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_munlockall(SB)\n\tRET\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_pipe2(SB)\n\tRET\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getdents(SB)\n\tRET\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getcwd(SB)\n\tRET\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getresuid(SB)\n\tRET\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getresgid(SB)\n\tRET\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_ioctl(SB)\n\tRET\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_sysctl(SB)\n\tRET\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fcntl(SB)\n\tRET\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_ppoll(SB)\n\tRET\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_access(SB)\n\tRET\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_adjtime(SB)\n\tRET\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_chdir(SB)\n\tRET\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_chflags(SB)\n\tRET\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_chmod(SB)\n\tRET\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_chown(SB)\n\tRET\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_chroot(SB)\n\tRET\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_clock_gettime(SB)\n\tRET\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_close(SB)\n\tRET\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_dup(SB)\n\tRET\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_dup2(SB)\n\tRET\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_dup3(SB)\n\tRET\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_exit(SB)\n\tRET\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_faccessat(SB)\n\tRET\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchdir(SB)\n\tRET\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchflags(SB)\n\tRET\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchmod(SB)\n\tRET\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchmodat(SB)\n\tRET\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchown(SB)\n\tRET\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fchownat(SB)\n\tRET\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_flock(SB)\n\tRET\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fpathconf(SB)\n\tRET\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fstat(SB)\n\tRET\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fstatat(SB)\n\tRET\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fstatfs(SB)\n\tRET\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_fsync(SB)\n\tRET\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_ftruncate(SB)\n\tRET\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getegid(SB)\n\tRET\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_geteuid(SB)\n\tRET\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getgid(SB)\n\tRET\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getpgid(SB)\n\tRET\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getpgrp(SB)\n\tRET\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getpid(SB)\n\tRET\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getppid(SB)\n\tRET\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getpriority(SB)\n\tRET\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getrlimit(SB)\n\tRET\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getrtable(SB)\n\tRET\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getrusage(SB)\n\tRET\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getsid(SB)\n\tRET\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_gettimeofday(SB)\n\tRET\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getuid(SB)\n\tRET\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_issetugid(SB)\n\tRET\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_kill(SB)\n\tRET\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_kqueue(SB)\n\tRET\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_lchown(SB)\n\tRET\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_link(SB)\n\tRET\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_linkat(SB)\n\tRET\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_listen(SB)\n\tRET\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_lstat(SB)\n\tRET\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mkdir(SB)\n\tRET\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mkdirat(SB)\n\tRET\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mkfifo(SB)\n\tRET\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mkfifoat(SB)\n\tRET\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mknod(SB)\n\tRET\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mknodat(SB)\n\tRET\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mount(SB)\n\tRET\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_nanosleep(SB)\n\tRET\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_open(SB)\n\tRET\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_openat(SB)\n\tRET\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_pathconf(SB)\n\tRET\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_pread(SB)\n\tRET\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_pwrite(SB)\n\tRET\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_read(SB)\n\tRET\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_readlink(SB)\n\tRET\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_readlinkat(SB)\n\tRET\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_rename(SB)\n\tRET\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_renameat(SB)\n\tRET\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_revoke(SB)\n\tRET\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_rmdir(SB)\n\tRET\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_lseek(SB)\n\tRET\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_select(SB)\n\tRET\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setegid(SB)\n\tRET\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_seteuid(SB)\n\tRET\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setgid(SB)\n\tRET\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setlogin(SB)\n\tRET\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setpgid(SB)\n\tRET\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setpriority(SB)\n\tRET\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setregid(SB)\n\tRET\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setreuid(SB)\n\tRET\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setresgid(SB)\n\tRET\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setresuid(SB)\n\tRET\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setrtable(SB)\n\tRET\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setsid(SB)\n\tRET\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_settimeofday(SB)\n\tRET\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_setuid(SB)\n\tRET\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_stat(SB)\n\tRET\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_statfs(SB)\n\tRET\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_symlink(SB)\n\tRET\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_symlinkat(SB)\n\tRET\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_sync(SB)\n\tRET\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_truncate(SB)\n\tRET\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_umask(SB)\n\tRET\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_unlink(SB)\n\tRET\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_unlinkat(SB)\n\tRET\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_unmount(SB)\n\tRET\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_write(SB)\n\tRET\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_mmap(SB)\n\tRET\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_munmap(SB)\n\tRET\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_getfsstat(SB)\n\tRET\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_utimensat(SB)\n\tRET\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_pledge(SB)\n\tRET\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tCALL\tlibc_unveil(SB)\n\tRET\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go",
    "content": "// go run mksyscall.go -openbsd -libc -tags openbsd,riscv64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_riscv64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build openbsd && riscv64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgroups_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_wait4_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_accept_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_accept accept \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_bind_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_bind bind \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_connect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_connect connect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socket_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socket socket \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockopt getsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsockopt_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpeername_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpeername getpeername \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsockname_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsockname getsockname \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_shutdown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_shutdown shutdown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_socketpair_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_socketpair socketpair \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvfrom_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendto_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendto sendto \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_recvmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_recvmsg recvmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sendmsg_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sendmsg sendmsg \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kevent_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kevent kevent \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_futimes_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_futimes futimes \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_poll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_madvise_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mprotect_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_msync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munlockall_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pipe2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getdents_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getcwd_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {\n\tsyscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))\n\treturn\n}\n\nvar libc_getresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresuid getresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {\n\tsyscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))\n\treturn\n}\n\nvar libc_getresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getresgid getresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ioctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sysctl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sysctl sysctl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fcntl_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ppoll_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ppoll ppoll \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_access_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_adjtime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chflags chflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_chroot_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_clock_gettime_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_clock_gettime clock_gettime \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_close_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup2_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup3(from int, to int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_dup3_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_dup3 dup3 \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsyscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)\n\treturn\n}\n\nvar libc_exit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_faccessat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchflags_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchflags fchflags \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchmodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fchownat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_flock_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fpathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fstatfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fstatfs fstatfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_fsync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_ftruncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\nvar libc_getegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_geteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\nvar libc_getgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\nvar libc_getpgrp_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\nvar libc_getpid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\nvar libc_getppid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrlimit_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrtable getrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getrusage_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_gettimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\nvar libc_getuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\nvar libc_issetugid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_issetugid issetugid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kill_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_kqueue_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_kqueue kqueue \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lchown_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_link_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_linkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_linkat linkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_listen_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_listen listen \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkdirat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifo_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mkfifoat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknod_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mknodat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(fsType)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(dir)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mount mount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_nanosleep_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_open_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_openat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pathconf_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pread_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pwrite_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_read_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_readlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_readlinkat readlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rename_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_renameat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_revoke_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_revoke revoke \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_rmdir_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_lseek_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_select_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setegid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_seteuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setlogin_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setlogin setlogin \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setpriority_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setregid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setreuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresgid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresgid setresgid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setresuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setresuid setresuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setrtable_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setrtable setrtable \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setsid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_settimeofday_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_settimeofday settimeofday \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_setuid_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_stat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_statfs_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_statfs statfs \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_symlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_symlinkat symlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_sync_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_truncate_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\nvar libc_umask_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlink_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unlinkat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unmount_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unmount unmount \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_write_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_mmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_munmap_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {\n\tr0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_getfsstat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_getfsstat getfsstat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_utimensat_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pledge(promises *byte, execpromises *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_pledge_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_pledge pledge \"libc.so\"\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unveil(path *byte, flags *byte) (err error) {\n\t_, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nvar libc_unveil_trampoline_addr uintptr\n\n//go:cgo_import_dynamic libc_unveil unveil \"libc.so\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s",
    "content": "// go run mkasm.go openbsd riscv64\n// Code generated by the command above; DO NOT EDIT.\n\n#include \"textflag.h\"\n\nTEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgroups(SB)\nGLOBL\t·libc_getgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)\n\nTEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgroups(SB)\nGLOBL\t·libc_setgroups_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)\n\nTEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_wait4(SB)\nGLOBL\t·libc_wait4_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)\n\nTEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_accept(SB)\nGLOBL\t·libc_accept_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)\n\nTEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_bind(SB)\nGLOBL\t·libc_bind_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)\n\nTEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_connect(SB)\nGLOBL\t·libc_connect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)\n\nTEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socket(SB)\nGLOBL\t·libc_socket_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)\n\nTEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockopt(SB)\nGLOBL\t·libc_getsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)\n\nTEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsockopt(SB)\nGLOBL\t·libc_setsockopt_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)\n\nTEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpeername(SB)\nGLOBL\t·libc_getpeername_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)\n\nTEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsockname(SB)\nGLOBL\t·libc_getsockname_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)\n\nTEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_shutdown(SB)\nGLOBL\t·libc_shutdown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)\n\nTEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_socketpair(SB)\nGLOBL\t·libc_socketpair_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)\n\nTEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvfrom(SB)\nGLOBL\t·libc_recvfrom_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)\n\nTEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendto(SB)\nGLOBL\t·libc_sendto_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)\n\nTEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_recvmsg(SB)\nGLOBL\t·libc_recvmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)\n\nTEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sendmsg(SB)\nGLOBL\t·libc_sendmsg_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)\n\nTEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kevent(SB)\nGLOBL\t·libc_kevent_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)\n\nTEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimes(SB)\nGLOBL\t·libc_utimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)\n\nTEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_futimes(SB)\nGLOBL\t·libc_futimes_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)\n\nTEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_poll(SB)\nGLOBL\t·libc_poll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)\n\nTEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_madvise(SB)\nGLOBL\t·libc_madvise_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)\n\nTEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlock(SB)\nGLOBL\t·libc_mlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)\n\nTEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mlockall(SB)\nGLOBL\t·libc_mlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)\n\nTEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mprotect(SB)\nGLOBL\t·libc_mprotect_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)\n\nTEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_msync(SB)\nGLOBL\t·libc_msync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)\n\nTEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlock(SB)\nGLOBL\t·libc_munlock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)\n\nTEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munlockall(SB)\nGLOBL\t·libc_munlockall_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)\n\nTEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pipe2(SB)\nGLOBL\t·libc_pipe2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)\n\nTEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getdents(SB)\nGLOBL\t·libc_getdents_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)\n\nTEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getcwd(SB)\nGLOBL\t·libc_getcwd_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)\n\nTEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresuid(SB)\nGLOBL\t·libc_getresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)\n\nTEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getresgid(SB)\nGLOBL\t·libc_getresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)\n\nTEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ioctl(SB)\nGLOBL\t·libc_ioctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)\n\nTEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sysctl(SB)\nGLOBL\t·libc_sysctl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)\n\nTEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fcntl(SB)\nGLOBL\t·libc_fcntl_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB)\n\nTEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ppoll(SB)\nGLOBL\t·libc_ppoll_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)\n\nTEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_access(SB)\nGLOBL\t·libc_access_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)\n\nTEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_adjtime(SB)\nGLOBL\t·libc_adjtime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)\n\nTEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chdir(SB)\nGLOBL\t·libc_chdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)\n\nTEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chflags(SB)\nGLOBL\t·libc_chflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)\n\nTEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chmod(SB)\nGLOBL\t·libc_chmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)\n\nTEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chown(SB)\nGLOBL\t·libc_chown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)\n\nTEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_chroot(SB)\nGLOBL\t·libc_chroot_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)\n\nTEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_clock_gettime(SB)\nGLOBL\t·libc_clock_gettime_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB)\n\nTEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_close(SB)\nGLOBL\t·libc_close_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)\n\nTEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup(SB)\nGLOBL\t·libc_dup_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)\n\nTEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup2(SB)\nGLOBL\t·libc_dup2_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)\n\nTEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_dup3(SB)\nGLOBL\t·libc_dup3_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)\n\nTEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_exit(SB)\nGLOBL\t·libc_exit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)\n\nTEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_faccessat(SB)\nGLOBL\t·libc_faccessat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)\n\nTEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchdir(SB)\nGLOBL\t·libc_fchdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)\n\nTEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchflags(SB)\nGLOBL\t·libc_fchflags_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)\n\nTEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmod(SB)\nGLOBL\t·libc_fchmod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)\n\nTEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchmodat(SB)\nGLOBL\t·libc_fchmodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)\n\nTEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchown(SB)\nGLOBL\t·libc_fchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)\n\nTEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fchownat(SB)\nGLOBL\t·libc_fchownat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)\n\nTEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_flock(SB)\nGLOBL\t·libc_flock_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)\n\nTEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fpathconf(SB)\nGLOBL\t·libc_fpathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)\n\nTEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstat(SB)\nGLOBL\t·libc_fstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)\n\nTEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatat(SB)\nGLOBL\t·libc_fstatat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)\n\nTEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fstatfs(SB)\nGLOBL\t·libc_fstatfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)\n\nTEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_fsync(SB)\nGLOBL\t·libc_fsync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)\n\nTEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_ftruncate(SB)\nGLOBL\t·libc_ftruncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)\n\nTEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getegid(SB)\nGLOBL\t·libc_getegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)\n\nTEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_geteuid(SB)\nGLOBL\t·libc_geteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)\n\nTEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getgid(SB)\nGLOBL\t·libc_getgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)\n\nTEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgid(SB)\nGLOBL\t·libc_getpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)\n\nTEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpgrp(SB)\nGLOBL\t·libc_getpgrp_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)\n\nTEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpid(SB)\nGLOBL\t·libc_getpid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)\n\nTEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getppid(SB)\nGLOBL\t·libc_getppid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)\n\nTEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getpriority(SB)\nGLOBL\t·libc_getpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)\n\nTEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrlimit(SB)\nGLOBL\t·libc_getrlimit_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)\n\nTEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrtable(SB)\nGLOBL\t·libc_getrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)\n\nTEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getrusage(SB)\nGLOBL\t·libc_getrusage_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)\n\nTEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getsid(SB)\nGLOBL\t·libc_getsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)\n\nTEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_gettimeofday(SB)\nGLOBL\t·libc_gettimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)\n\nTEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getuid(SB)\nGLOBL\t·libc_getuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)\n\nTEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_issetugid(SB)\nGLOBL\t·libc_issetugid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)\n\nTEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kill(SB)\nGLOBL\t·libc_kill_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)\n\nTEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_kqueue(SB)\nGLOBL\t·libc_kqueue_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)\n\nTEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lchown(SB)\nGLOBL\t·libc_lchown_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)\n\nTEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_link(SB)\nGLOBL\t·libc_link_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)\n\nTEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_linkat(SB)\nGLOBL\t·libc_linkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)\n\nTEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_listen(SB)\nGLOBL\t·libc_listen_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)\n\nTEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lstat(SB)\nGLOBL\t·libc_lstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)\n\nTEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdir(SB)\nGLOBL\t·libc_mkdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)\n\nTEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkdirat(SB)\nGLOBL\t·libc_mkdirat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)\n\nTEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifo(SB)\nGLOBL\t·libc_mkfifo_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)\n\nTEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mkfifoat(SB)\nGLOBL\t·libc_mkfifoat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)\n\nTEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknod(SB)\nGLOBL\t·libc_mknod_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)\n\nTEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mknodat(SB)\nGLOBL\t·libc_mknodat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)\n\nTEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mount(SB)\nGLOBL\t·libc_mount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)\n\nTEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_nanosleep(SB)\nGLOBL\t·libc_nanosleep_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)\n\nTEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_open(SB)\nGLOBL\t·libc_open_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)\n\nTEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_openat(SB)\nGLOBL\t·libc_openat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)\n\nTEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pathconf(SB)\nGLOBL\t·libc_pathconf_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)\n\nTEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pread(SB)\nGLOBL\t·libc_pread_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)\n\nTEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pwrite(SB)\nGLOBL\t·libc_pwrite_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)\n\nTEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_read(SB)\nGLOBL\t·libc_read_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)\n\nTEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlink(SB)\nGLOBL\t·libc_readlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)\n\nTEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_readlinkat(SB)\nGLOBL\t·libc_readlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)\n\nTEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rename(SB)\nGLOBL\t·libc_rename_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)\n\nTEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_renameat(SB)\nGLOBL\t·libc_renameat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)\n\nTEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_revoke(SB)\nGLOBL\t·libc_revoke_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)\n\nTEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_rmdir(SB)\nGLOBL\t·libc_rmdir_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)\n\nTEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_lseek(SB)\nGLOBL\t·libc_lseek_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)\n\nTEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_select(SB)\nGLOBL\t·libc_select_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)\n\nTEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setegid(SB)\nGLOBL\t·libc_setegid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)\n\nTEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_seteuid(SB)\nGLOBL\t·libc_seteuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)\n\nTEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setgid(SB)\nGLOBL\t·libc_setgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)\n\nTEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setlogin(SB)\nGLOBL\t·libc_setlogin_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)\n\nTEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpgid(SB)\nGLOBL\t·libc_setpgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)\n\nTEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setpriority(SB)\nGLOBL\t·libc_setpriority_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)\n\nTEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setregid(SB)\nGLOBL\t·libc_setregid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)\n\nTEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setreuid(SB)\nGLOBL\t·libc_setreuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)\n\nTEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresgid(SB)\nGLOBL\t·libc_setresgid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)\n\nTEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setresuid(SB)\nGLOBL\t·libc_setresuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)\n\nTEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setrtable(SB)\nGLOBL\t·libc_setrtable_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)\n\nTEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setsid(SB)\nGLOBL\t·libc_setsid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)\n\nTEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_settimeofday(SB)\nGLOBL\t·libc_settimeofday_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)\n\nTEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_setuid(SB)\nGLOBL\t·libc_setuid_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)\n\nTEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_stat(SB)\nGLOBL\t·libc_stat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)\n\nTEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_statfs(SB)\nGLOBL\t·libc_statfs_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)\n\nTEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlink(SB)\nGLOBL\t·libc_symlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)\n\nTEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_symlinkat(SB)\nGLOBL\t·libc_symlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)\n\nTEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_sync(SB)\nGLOBL\t·libc_sync_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)\n\nTEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_truncate(SB)\nGLOBL\t·libc_truncate_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)\n\nTEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_umask(SB)\nGLOBL\t·libc_umask_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)\n\nTEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlink(SB)\nGLOBL\t·libc_unlink_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)\n\nTEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unlinkat(SB)\nGLOBL\t·libc_unlinkat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)\n\nTEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unmount(SB)\nGLOBL\t·libc_unmount_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)\n\nTEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_write(SB)\nGLOBL\t·libc_write_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)\n\nTEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_mmap(SB)\nGLOBL\t·libc_mmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)\n\nTEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_munmap(SB)\nGLOBL\t·libc_munmap_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)\n\nTEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_getfsstat(SB)\nGLOBL\t·libc_getfsstat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB)\n\nTEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_utimensat(SB)\nGLOBL\t·libc_utimensat_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)\n\nTEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_pledge(SB)\nGLOBL\t·libc_pledge_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB)\n\nTEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0\n\tJMP\tlibc_unveil(SB)\nGLOBL\t·libc_unveil_trampoline_addr(SB), RODATA, $8\nDATA\t·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go",
    "content": "// go run mksyscall_solaris.go -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build solaris && amd64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n//go:cgo_import_dynamic libc_pipe pipe \"libc.so\"\n//go:cgo_import_dynamic libc_pipe2 pipe2 \"libc.so\"\n//go:cgo_import_dynamic libc_getsockname getsockname \"libsocket.so\"\n//go:cgo_import_dynamic libc_getcwd getcwd \"libc.so\"\n//go:cgo_import_dynamic libc_getgroups getgroups \"libc.so\"\n//go:cgo_import_dynamic libc_setgroups setgroups \"libc.so\"\n//go:cgo_import_dynamic libc_wait4 wait4 \"libc.so\"\n//go:cgo_import_dynamic libc_gethostname gethostname \"libc.so\"\n//go:cgo_import_dynamic libc_utimes utimes \"libc.so\"\n//go:cgo_import_dynamic libc_utimensat utimensat \"libc.so\"\n//go:cgo_import_dynamic libc_fcntl fcntl \"libc.so\"\n//go:cgo_import_dynamic libc_futimesat futimesat \"libc.so\"\n//go:cgo_import_dynamic libc_accept accept \"libsocket.so\"\n//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg \"libsocket.so\"\n//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg \"libsocket.so\"\n//go:cgo_import_dynamic libc_acct acct \"libc.so\"\n//go:cgo_import_dynamic libc___makedev __makedev \"libc.so\"\n//go:cgo_import_dynamic libc___major __major \"libc.so\"\n//go:cgo_import_dynamic libc___minor __minor \"libc.so\"\n//go:cgo_import_dynamic libc_ioctl ioctl \"libc.so\"\n//go:cgo_import_dynamic libc_poll poll \"libc.so\"\n//go:cgo_import_dynamic libc_access access \"libc.so\"\n//go:cgo_import_dynamic libc_adjtime adjtime \"libc.so\"\n//go:cgo_import_dynamic libc_chdir chdir \"libc.so\"\n//go:cgo_import_dynamic libc_chmod chmod \"libc.so\"\n//go:cgo_import_dynamic libc_chown chown \"libc.so\"\n//go:cgo_import_dynamic libc_chroot chroot \"libc.so\"\n//go:cgo_import_dynamic libc_clockgettime clockgettime \"libc.so\"\n//go:cgo_import_dynamic libc_close close \"libc.so\"\n//go:cgo_import_dynamic libc_creat creat \"libc.so\"\n//go:cgo_import_dynamic libc_dup dup \"libc.so\"\n//go:cgo_import_dynamic libc_dup2 dup2 \"libc.so\"\n//go:cgo_import_dynamic libc_exit exit \"libc.so\"\n//go:cgo_import_dynamic libc_faccessat faccessat \"libc.so\"\n//go:cgo_import_dynamic libc_fchdir fchdir \"libc.so\"\n//go:cgo_import_dynamic libc_fchmod fchmod \"libc.so\"\n//go:cgo_import_dynamic libc_fchmodat fchmodat \"libc.so\"\n//go:cgo_import_dynamic libc_fchown fchown \"libc.so\"\n//go:cgo_import_dynamic libc_fchownat fchownat \"libc.so\"\n//go:cgo_import_dynamic libc_fdatasync fdatasync \"libc.so\"\n//go:cgo_import_dynamic libc_flock flock \"libc.so\"\n//go:cgo_import_dynamic libc_fpathconf fpathconf \"libc.so\"\n//go:cgo_import_dynamic libc_fstat fstat \"libc.so\"\n//go:cgo_import_dynamic libc_fstatat fstatat \"libc.so\"\n//go:cgo_import_dynamic libc_fstatvfs fstatvfs \"libc.so\"\n//go:cgo_import_dynamic libc_getdents getdents \"libc.so\"\n//go:cgo_import_dynamic libc_getgid getgid \"libc.so\"\n//go:cgo_import_dynamic libc_getpid getpid \"libc.so\"\n//go:cgo_import_dynamic libc_getpgid getpgid \"libc.so\"\n//go:cgo_import_dynamic libc_getpgrp getpgrp \"libc.so\"\n//go:cgo_import_dynamic libc_geteuid geteuid \"libc.so\"\n//go:cgo_import_dynamic libc_getegid getegid \"libc.so\"\n//go:cgo_import_dynamic libc_getppid getppid \"libc.so\"\n//go:cgo_import_dynamic libc_getpriority getpriority \"libc.so\"\n//go:cgo_import_dynamic libc_getrlimit getrlimit \"libc.so\"\n//go:cgo_import_dynamic libc_getrusage getrusage \"libc.so\"\n//go:cgo_import_dynamic libc_getsid getsid \"libc.so\"\n//go:cgo_import_dynamic libc_gettimeofday gettimeofday \"libc.so\"\n//go:cgo_import_dynamic libc_getuid getuid \"libc.so\"\n//go:cgo_import_dynamic libc_kill kill \"libc.so\"\n//go:cgo_import_dynamic libc_lchown lchown \"libc.so\"\n//go:cgo_import_dynamic libc_link link \"libc.so\"\n//go:cgo_import_dynamic libc___xnet_listen __xnet_listen \"libsocket.so\"\n//go:cgo_import_dynamic libc_lstat lstat \"libc.so\"\n//go:cgo_import_dynamic libc_madvise madvise \"libc.so\"\n//go:cgo_import_dynamic libc_mkdir mkdir \"libc.so\"\n//go:cgo_import_dynamic libc_mkdirat mkdirat \"libc.so\"\n//go:cgo_import_dynamic libc_mkfifo mkfifo \"libc.so\"\n//go:cgo_import_dynamic libc_mkfifoat mkfifoat \"libc.so\"\n//go:cgo_import_dynamic libc_mknod mknod \"libc.so\"\n//go:cgo_import_dynamic libc_mknodat mknodat \"libc.so\"\n//go:cgo_import_dynamic libc_mlock mlock \"libc.so\"\n//go:cgo_import_dynamic libc_mlockall mlockall \"libc.so\"\n//go:cgo_import_dynamic libc_mprotect mprotect \"libc.so\"\n//go:cgo_import_dynamic libc_msync msync \"libc.so\"\n//go:cgo_import_dynamic libc_munlock munlock \"libc.so\"\n//go:cgo_import_dynamic libc_munlockall munlockall \"libc.so\"\n//go:cgo_import_dynamic libc_nanosleep nanosleep \"libc.so\"\n//go:cgo_import_dynamic libc_open open \"libc.so\"\n//go:cgo_import_dynamic libc_openat openat \"libc.so\"\n//go:cgo_import_dynamic libc_pathconf pathconf \"libc.so\"\n//go:cgo_import_dynamic libc_pause pause \"libc.so\"\n//go:cgo_import_dynamic libc_pread pread \"libc.so\"\n//go:cgo_import_dynamic libc_pwrite pwrite \"libc.so\"\n//go:cgo_import_dynamic libc_read read \"libc.so\"\n//go:cgo_import_dynamic libc_readlink readlink \"libc.so\"\n//go:cgo_import_dynamic libc_rename rename \"libc.so\"\n//go:cgo_import_dynamic libc_renameat renameat \"libc.so\"\n//go:cgo_import_dynamic libc_rmdir rmdir \"libc.so\"\n//go:cgo_import_dynamic libc_lseek lseek \"libc.so\"\n//go:cgo_import_dynamic libc_select select \"libc.so\"\n//go:cgo_import_dynamic libc_setegid setegid \"libc.so\"\n//go:cgo_import_dynamic libc_seteuid seteuid \"libc.so\"\n//go:cgo_import_dynamic libc_setgid setgid \"libc.so\"\n//go:cgo_import_dynamic libc_sethostname sethostname \"libc.so\"\n//go:cgo_import_dynamic libc_setpgid setpgid \"libc.so\"\n//go:cgo_import_dynamic libc_setpriority setpriority \"libc.so\"\n//go:cgo_import_dynamic libc_setregid setregid \"libc.so\"\n//go:cgo_import_dynamic libc_setreuid setreuid \"libc.so\"\n//go:cgo_import_dynamic libc_setsid setsid \"libc.so\"\n//go:cgo_import_dynamic libc_setuid setuid \"libc.so\"\n//go:cgo_import_dynamic libc_shutdown shutdown \"libsocket.so\"\n//go:cgo_import_dynamic libc_stat stat \"libc.so\"\n//go:cgo_import_dynamic libc_statvfs statvfs \"libc.so\"\n//go:cgo_import_dynamic libc_symlink symlink \"libc.so\"\n//go:cgo_import_dynamic libc_sync sync \"libc.so\"\n//go:cgo_import_dynamic libc_sysconf sysconf \"libc.so\"\n//go:cgo_import_dynamic libc_times times \"libc.so\"\n//go:cgo_import_dynamic libc_truncate truncate \"libc.so\"\n//go:cgo_import_dynamic libc_fsync fsync \"libc.so\"\n//go:cgo_import_dynamic libc_ftruncate ftruncate \"libc.so\"\n//go:cgo_import_dynamic libc_umask umask \"libc.so\"\n//go:cgo_import_dynamic libc_uname uname \"libc.so\"\n//go:cgo_import_dynamic libc_umount umount \"libc.so\"\n//go:cgo_import_dynamic libc_unlink unlink \"libc.so\"\n//go:cgo_import_dynamic libc_unlinkat unlinkat \"libc.so\"\n//go:cgo_import_dynamic libc_ustat ustat \"libc.so\"\n//go:cgo_import_dynamic libc_utime utime \"libc.so\"\n//go:cgo_import_dynamic libc___xnet_bind __xnet_bind \"libsocket.so\"\n//go:cgo_import_dynamic libc___xnet_connect __xnet_connect \"libsocket.so\"\n//go:cgo_import_dynamic libc_mmap mmap \"libc.so\"\n//go:cgo_import_dynamic libc_munmap munmap \"libc.so\"\n//go:cgo_import_dynamic libc_sendfile sendfile \"libsendfile.so\"\n//go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto \"libsocket.so\"\n//go:cgo_import_dynamic libc___xnet_socket __xnet_socket \"libsocket.so\"\n//go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair \"libsocket.so\"\n//go:cgo_import_dynamic libc_write write \"libc.so\"\n//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt \"libsocket.so\"\n//go:cgo_import_dynamic libc_getpeername getpeername \"libsocket.so\"\n//go:cgo_import_dynamic libc_setsockopt setsockopt \"libsocket.so\"\n//go:cgo_import_dynamic libc_recvfrom recvfrom \"libsocket.so\"\n//go:cgo_import_dynamic libc_getpeerucred getpeerucred \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_get ucred_get \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_geteuid ucred_geteuid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getegid ucred_getegid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getruid ucred_getruid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getrgid ucred_getrgid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getsuid ucred_getsuid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getsgid ucred_getsgid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_getpid ucred_getpid \"libc.so\"\n//go:cgo_import_dynamic libc_ucred_free ucred_free \"libc.so\"\n//go:cgo_import_dynamic libc_port_create port_create \"libc.so\"\n//go:cgo_import_dynamic libc_port_associate port_associate \"libc.so\"\n//go:cgo_import_dynamic libc_port_dissociate port_dissociate \"libc.so\"\n//go:cgo_import_dynamic libc_port_get port_get \"libc.so\"\n//go:cgo_import_dynamic libc_port_getn port_getn \"libc.so\"\n//go:cgo_import_dynamic libc_putmsg putmsg \"libc.so\"\n//go:cgo_import_dynamic libc_getmsg getmsg \"libc.so\"\n\n//go:linkname procpipe libc_pipe\n//go:linkname procpipe2 libc_pipe2\n//go:linkname procgetsockname libc_getsockname\n//go:linkname procGetcwd libc_getcwd\n//go:linkname procgetgroups libc_getgroups\n//go:linkname procsetgroups libc_setgroups\n//go:linkname procwait4 libc_wait4\n//go:linkname procgethostname libc_gethostname\n//go:linkname procutimes libc_utimes\n//go:linkname procutimensat libc_utimensat\n//go:linkname procfcntl libc_fcntl\n//go:linkname procfutimesat libc_futimesat\n//go:linkname procaccept libc_accept\n//go:linkname proc__xnet_recvmsg libc___xnet_recvmsg\n//go:linkname proc__xnet_sendmsg libc___xnet_sendmsg\n//go:linkname procacct libc_acct\n//go:linkname proc__makedev libc___makedev\n//go:linkname proc__major libc___major\n//go:linkname proc__minor libc___minor\n//go:linkname procioctl libc_ioctl\n//go:linkname procpoll libc_poll\n//go:linkname procAccess libc_access\n//go:linkname procAdjtime libc_adjtime\n//go:linkname procChdir libc_chdir\n//go:linkname procChmod libc_chmod\n//go:linkname procChown libc_chown\n//go:linkname procChroot libc_chroot\n//go:linkname procClockGettime libc_clockgettime\n//go:linkname procClose libc_close\n//go:linkname procCreat libc_creat\n//go:linkname procDup libc_dup\n//go:linkname procDup2 libc_dup2\n//go:linkname procExit libc_exit\n//go:linkname procFaccessat libc_faccessat\n//go:linkname procFchdir libc_fchdir\n//go:linkname procFchmod libc_fchmod\n//go:linkname procFchmodat libc_fchmodat\n//go:linkname procFchown libc_fchown\n//go:linkname procFchownat libc_fchownat\n//go:linkname procFdatasync libc_fdatasync\n//go:linkname procFlock libc_flock\n//go:linkname procFpathconf libc_fpathconf\n//go:linkname procFstat libc_fstat\n//go:linkname procFstatat libc_fstatat\n//go:linkname procFstatvfs libc_fstatvfs\n//go:linkname procGetdents libc_getdents\n//go:linkname procGetgid libc_getgid\n//go:linkname procGetpid libc_getpid\n//go:linkname procGetpgid libc_getpgid\n//go:linkname procGetpgrp libc_getpgrp\n//go:linkname procGeteuid libc_geteuid\n//go:linkname procGetegid libc_getegid\n//go:linkname procGetppid libc_getppid\n//go:linkname procGetpriority libc_getpriority\n//go:linkname procGetrlimit libc_getrlimit\n//go:linkname procGetrusage libc_getrusage\n//go:linkname procGetsid libc_getsid\n//go:linkname procGettimeofday libc_gettimeofday\n//go:linkname procGetuid libc_getuid\n//go:linkname procKill libc_kill\n//go:linkname procLchown libc_lchown\n//go:linkname procLink libc_link\n//go:linkname proc__xnet_listen libc___xnet_listen\n//go:linkname procLstat libc_lstat\n//go:linkname procMadvise libc_madvise\n//go:linkname procMkdir libc_mkdir\n//go:linkname procMkdirat libc_mkdirat\n//go:linkname procMkfifo libc_mkfifo\n//go:linkname procMkfifoat libc_mkfifoat\n//go:linkname procMknod libc_mknod\n//go:linkname procMknodat libc_mknodat\n//go:linkname procMlock libc_mlock\n//go:linkname procMlockall libc_mlockall\n//go:linkname procMprotect libc_mprotect\n//go:linkname procMsync libc_msync\n//go:linkname procMunlock libc_munlock\n//go:linkname procMunlockall libc_munlockall\n//go:linkname procNanosleep libc_nanosleep\n//go:linkname procOpen libc_open\n//go:linkname procOpenat libc_openat\n//go:linkname procPathconf libc_pathconf\n//go:linkname procPause libc_pause\n//go:linkname procpread libc_pread\n//go:linkname procpwrite libc_pwrite\n//go:linkname procread libc_read\n//go:linkname procReadlink libc_readlink\n//go:linkname procRename libc_rename\n//go:linkname procRenameat libc_renameat\n//go:linkname procRmdir libc_rmdir\n//go:linkname proclseek libc_lseek\n//go:linkname procSelect libc_select\n//go:linkname procSetegid libc_setegid\n//go:linkname procSeteuid libc_seteuid\n//go:linkname procSetgid libc_setgid\n//go:linkname procSethostname libc_sethostname\n//go:linkname procSetpgid libc_setpgid\n//go:linkname procSetpriority libc_setpriority\n//go:linkname procSetregid libc_setregid\n//go:linkname procSetreuid libc_setreuid\n//go:linkname procSetsid libc_setsid\n//go:linkname procSetuid libc_setuid\n//go:linkname procshutdown libc_shutdown\n//go:linkname procStat libc_stat\n//go:linkname procStatvfs libc_statvfs\n//go:linkname procSymlink libc_symlink\n//go:linkname procSync libc_sync\n//go:linkname procSysconf libc_sysconf\n//go:linkname procTimes libc_times\n//go:linkname procTruncate libc_truncate\n//go:linkname procFsync libc_fsync\n//go:linkname procFtruncate libc_ftruncate\n//go:linkname procUmask libc_umask\n//go:linkname procUname libc_uname\n//go:linkname procumount libc_umount\n//go:linkname procUnlink libc_unlink\n//go:linkname procUnlinkat libc_unlinkat\n//go:linkname procUstat libc_ustat\n//go:linkname procUtime libc_utime\n//go:linkname proc__xnet_bind libc___xnet_bind\n//go:linkname proc__xnet_connect libc___xnet_connect\n//go:linkname procmmap libc_mmap\n//go:linkname procmunmap libc_munmap\n//go:linkname procsendfile libc_sendfile\n//go:linkname proc__xnet_sendto libc___xnet_sendto\n//go:linkname proc__xnet_socket libc___xnet_socket\n//go:linkname proc__xnet_socketpair libc___xnet_socketpair\n//go:linkname procwrite libc_write\n//go:linkname proc__xnet_getsockopt libc___xnet_getsockopt\n//go:linkname procgetpeername libc_getpeername\n//go:linkname procsetsockopt libc_setsockopt\n//go:linkname procrecvfrom libc_recvfrom\n//go:linkname procgetpeerucred libc_getpeerucred\n//go:linkname procucred_get libc_ucred_get\n//go:linkname procucred_geteuid libc_ucred_geteuid\n//go:linkname procucred_getegid libc_ucred_getegid\n//go:linkname procucred_getruid libc_ucred_getruid\n//go:linkname procucred_getrgid libc_ucred_getrgid\n//go:linkname procucred_getsuid libc_ucred_getsuid\n//go:linkname procucred_getsgid libc_ucred_getsgid\n//go:linkname procucred_getpid libc_ucred_getpid\n//go:linkname procucred_free libc_ucred_free\n//go:linkname procport_create libc_port_create\n//go:linkname procport_associate libc_port_associate\n//go:linkname procport_dissociate libc_port_dissociate\n//go:linkname procport_get libc_port_get\n//go:linkname procport_getn libc_port_getn\n//go:linkname procputmsg libc_putmsg\n//go:linkname procgetmsg libc_getmsg\n\nvar (\n\tprocpipe,\n\tprocpipe2,\n\tprocgetsockname,\n\tprocGetcwd,\n\tprocgetgroups,\n\tprocsetgroups,\n\tprocwait4,\n\tprocgethostname,\n\tprocutimes,\n\tprocutimensat,\n\tprocfcntl,\n\tprocfutimesat,\n\tprocaccept,\n\tproc__xnet_recvmsg,\n\tproc__xnet_sendmsg,\n\tprocacct,\n\tproc__makedev,\n\tproc__major,\n\tproc__minor,\n\tprocioctl,\n\tprocpoll,\n\tprocAccess,\n\tprocAdjtime,\n\tprocChdir,\n\tprocChmod,\n\tprocChown,\n\tprocChroot,\n\tprocClockGettime,\n\tprocClose,\n\tprocCreat,\n\tprocDup,\n\tprocDup2,\n\tprocExit,\n\tprocFaccessat,\n\tprocFchdir,\n\tprocFchmod,\n\tprocFchmodat,\n\tprocFchown,\n\tprocFchownat,\n\tprocFdatasync,\n\tprocFlock,\n\tprocFpathconf,\n\tprocFstat,\n\tprocFstatat,\n\tprocFstatvfs,\n\tprocGetdents,\n\tprocGetgid,\n\tprocGetpid,\n\tprocGetpgid,\n\tprocGetpgrp,\n\tprocGeteuid,\n\tprocGetegid,\n\tprocGetppid,\n\tprocGetpriority,\n\tprocGetrlimit,\n\tprocGetrusage,\n\tprocGetsid,\n\tprocGettimeofday,\n\tprocGetuid,\n\tprocKill,\n\tprocLchown,\n\tprocLink,\n\tproc__xnet_listen,\n\tprocLstat,\n\tprocMadvise,\n\tprocMkdir,\n\tprocMkdirat,\n\tprocMkfifo,\n\tprocMkfifoat,\n\tprocMknod,\n\tprocMknodat,\n\tprocMlock,\n\tprocMlockall,\n\tprocMprotect,\n\tprocMsync,\n\tprocMunlock,\n\tprocMunlockall,\n\tprocNanosleep,\n\tprocOpen,\n\tprocOpenat,\n\tprocPathconf,\n\tprocPause,\n\tprocpread,\n\tprocpwrite,\n\tprocread,\n\tprocReadlink,\n\tprocRename,\n\tprocRenameat,\n\tprocRmdir,\n\tproclseek,\n\tprocSelect,\n\tprocSetegid,\n\tprocSeteuid,\n\tprocSetgid,\n\tprocSethostname,\n\tprocSetpgid,\n\tprocSetpriority,\n\tprocSetregid,\n\tprocSetreuid,\n\tprocSetsid,\n\tprocSetuid,\n\tprocshutdown,\n\tprocStat,\n\tprocStatvfs,\n\tprocSymlink,\n\tprocSync,\n\tprocSysconf,\n\tprocTimes,\n\tprocTruncate,\n\tprocFsync,\n\tprocFtruncate,\n\tprocUmask,\n\tprocUname,\n\tprocumount,\n\tprocUnlink,\n\tprocUnlinkat,\n\tprocUstat,\n\tprocUtime,\n\tproc__xnet_bind,\n\tproc__xnet_connect,\n\tprocmmap,\n\tprocmunmap,\n\tprocsendfile,\n\tproc__xnet_sendto,\n\tproc__xnet_socket,\n\tproc__xnet_socketpair,\n\tprocwrite,\n\tproc__xnet_getsockopt,\n\tprocgetpeername,\n\tprocsetsockopt,\n\tprocrecvfrom,\n\tprocgetpeerucred,\n\tprocucred_get,\n\tprocucred_geteuid,\n\tprocucred_getegid,\n\tprocucred_getruid,\n\tprocucred_getrgid,\n\tprocucred_getsuid,\n\tprocucred_getsgid,\n\tprocucred_getpid,\n\tprocucred_free,\n\tprocport_create,\n\tprocport_associate,\n\tprocport_dissociate,\n\tprocport_get,\n\tprocport_getn,\n\tprocputmsg,\n\tprocgetmsg syscallFunc\n)\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (n int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe2(p *[2]_C_int, flags int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int32(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc gethostname(buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc acct(path *byte) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc __makedev(version int, major uint, minor uint) (val uint64) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0)\n\tval = uint64(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc __major(version int, dev uint64) (val uint) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)\n\tval = uint(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc __minor(version int, dev uint64) (val uint) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)\n\tval = uint(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlRet(fd int, req int, arg uintptr) (ret int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)\n\tret = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ClockGettime(clockid int32, time *Timespec) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClockGettime)), 2, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Creat(path string, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(oldfd int, newfd int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tsysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fdatasync(fd int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgid int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetsid)), 1, uintptr(pid), 0, 0, 0, 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, advice int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 *byte\n\tif len(b) > 0 {\n\t\t_p0 = &b[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\tif len(buf) > 0 {\n\t\t_p1 = &buf[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sethostname(p []byte) (err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statvfs(path string, vfsstat *Statvfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sysconf(which int) (n int64, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 0, 0)\n\tn = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Times(tms *Tms) (ticks uintptr, err error) {\n\tr0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)\n\tticks = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(mask int) (oldmask int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Uname(buf *Utsname) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(target string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(target)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 *byte\n\tif len(p) > 0 {\n\t\t_p0 = &p[0]\n\t}\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeerucred(fd uintptr, ucred *uintptr) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetpeerucred)), 2, uintptr(fd), uintptr(unsafe.Pointer(ucred)), 0, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGet(pid int) (ucred uintptr, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procucred_get)), 1, uintptr(pid), 0, 0, 0, 0, 0)\n\tucred = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGeteuid(ucred uintptr) (uid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_geteuid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetegid(ucred uintptr) (gid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getegid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetruid(ucred uintptr) (uid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getruid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetrgid(ucred uintptr) (gid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getrgid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetsuid(ucred uintptr) (uid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getsuid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetsgid(ucred uintptr) (gid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getsgid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredGetpid(ucred uintptr) (pid int) {\n\tr0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getpid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ucredFree(ucred uintptr) {\n\tsysvicall6(uintptr(unsafe.Pointer(&procucred_free)), 1, uintptr(ucred), 0, 0, 0, 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc port_create() (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc port_dissociate(port int, source int, object uintptr) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {\n\t_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go",
    "content": "// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build zos && s390x\n\npackage unix\n\nimport (\n\t\"runtime\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg))\n\truntime.ExitSyscall()\n\tval = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Flistxattr(fd int, dest []byte) (sz int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p0 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FLISTXATTR_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(dest)))\n\truntime.ExitSyscall()\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FlistxattrAddr() *(func(fd int, dest []byte) (sz int, err error))\n\nvar Flistxattr = enter_Flistxattr\n\nfunc enter_Flistxattr(fd int, dest []byte) (sz int, err error) {\n\tfuncref := get_FlistxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FLISTXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Flistxattr\n\t} else {\n\t\t*funcref = error_Flistxattr\n\t}\n\treturn (*funcref)(fd, dest)\n}\n\nfunc error_Flistxattr(fd int, dest []byte) (sz int, err error) {\n\tsz = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fremovexattr(fd int, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FremovexattrAddr() *(func(fd int, attr string) (err error))\n\nvar Fremovexattr = enter_Fremovexattr\n\nfunc enter_Fremovexattr(fd int, attr string) (err error) {\n\tfuncref := get_FremovexattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Fremovexattr\n\t} else {\n\t\t*funcref = error_Fremovexattr\n\t}\n\treturn (*funcref)(fd, attr)\n}\n\nfunc error_Fremovexattr(fd int, attr string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_READ<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FGETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))\n\truntime.ExitSyscall()\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FgetxattrAddr() *(func(fd int, attr string, dest []byte) (sz int, err error))\n\nvar Fgetxattr = enter_Fgetxattr\n\nfunc enter_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\tfuncref := get_FgetxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FGETXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Fgetxattr\n\t} else {\n\t\t*funcref = error_Fgetxattr\n\t}\n\treturn (*funcref)(fd, attr, dest)\n}\n\nfunc error_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {\n\tsz = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(data) > 0 {\n\t\t_p1 = unsafe.Pointer(&data[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(data)), uintptr(flag))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FsetxattrAddr() *(func(fd int, attr string, data []byte, flag int) (err error))\n\nvar Fsetxattr = enter_Fsetxattr\n\nfunc enter_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) {\n\tfuncref := get_FsetxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FSETXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Fsetxattr\n\t} else {\n\t\t*funcref = error_Fsetxattr\n\t}\n\treturn (*funcref)(fd, attr, data, flag)\n}\n\nfunc error_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT4_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_accept4Addr() *(func(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error))\n\nvar accept4 = enter_accept4\n\nfunc enter_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tfuncref := get_accept4Addr()\n\tif funcptrtest(GetZosLibVec()+SYS___ACCEPT4_A<<4, \"\") == 0 {\n\t\t*funcref = impl_accept4\n\t} else {\n\t\t*funcref = error_accept4\n\t}\n\treturn (*funcref)(s, rsa, addrlen, flags)\n}\n\nfunc error_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___BIND_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONNECT_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list)))\n\tnn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKET<<4, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKETPAIR<<4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETPEERNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETSOCKNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Removexattr(path string, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_RemovexattrAddr() *(func(path string, attr string) (err error))\n\nvar Removexattr = enter_Removexattr\n\nfunc enter_Removexattr(path string, attr string) (err error) {\n\tfuncref := get_RemovexattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Removexattr\n\t} else {\n\t\t*funcref = error_Removexattr\n\t}\n\treturn (*funcref)(path, attr)\n}\n\nfunc error_Removexattr(path string, attr string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVFROM_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDTO_A<<4, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MMAP<<4, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))\n\truntime.ExitSyscall()\n\tret = uintptr(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MUNMAP<<4, uintptr(addr), uintptr(length))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req int, arg uintptr) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMAT<<4, uintptr(id), uintptr(addr), uintptr(flag))\n\truntime.ExitSyscall()\n\tret = uintptr(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMCTL64<<4, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))\n\truntime.ExitSyscall()\n\tresult = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmdt(addr uintptr) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMDT<<4, uintptr(addr))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc shmget(key int, size int, flag int) (id int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMGET<<4, uintptr(key), uintptr(size), uintptr(flag))\n\truntime.ExitSyscall()\n\tid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCESS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHDIR_A<<4, uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHMOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Creat(path string, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CREAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(oldfd int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP<<4, uintptr(oldfd))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(oldfd int, newfd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP2<<4, uintptr(oldfd), uintptr(newfd))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Dup3(oldfd int, newfd int, flags int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP3<<4, uintptr(oldfd), uintptr(newfd), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_Dup3Addr() *(func(oldfd int, newfd int, flags int) (err error))\n\nvar Dup3 = enter_Dup3\n\nfunc enter_Dup3(oldfd int, newfd int, flags int) (err error) {\n\tfuncref := get_Dup3Addr()\n\tif funcptrtest(GetZosLibVec()+SYS_DUP3<<4, \"\") == 0 {\n\t\t*funcref = impl_Dup3\n\t} else {\n\t\t*funcref = error_Dup3\n\t}\n\treturn (*funcref)(oldfd, newfd, flags)\n}\n\nfunc error_Dup3(oldfd int, newfd int, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Dirfd(dirp uintptr) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DIRFD<<4, uintptr(dirp))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_DirfdAddr() *(func(dirp uintptr) (fd int, err error))\n\nvar Dirfd = enter_Dirfd\n\nfunc enter_Dirfd(dirp uintptr) (fd int, err error) {\n\tfuncref := get_DirfdAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_DIRFD<<4, \"\") == 0 {\n\t\t*funcref = impl_Dirfd\n\t} else {\n\t\t*funcref = error_Dirfd\n\t}\n\treturn (*funcref)(dirp)\n}\n\nfunc error_Dirfd(dirp uintptr) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_EpollCreate(size int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE<<4, uintptr(size))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EpollCreateAddr() *(func(size int) (fd int, err error))\n\nvar EpollCreate = enter_EpollCreate\n\nfunc enter_EpollCreate(size int) (fd int, err error) {\n\tfuncref := get_EpollCreateAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE<<4, \"\") == 0 {\n\t\t*funcref = impl_EpollCreate\n\t} else {\n\t\t*funcref = error_EpollCreate\n\t}\n\treturn (*funcref)(size)\n}\n\nfunc error_EpollCreate(size int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_EpollCreate1(flags int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, uintptr(flags))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EpollCreate1Addr() *(func(flags int) (fd int, err error))\n\nvar EpollCreate1 = enter_EpollCreate1\n\nfunc enter_EpollCreate1(flags int) (fd int, err error) {\n\tfuncref := get_EpollCreate1Addr()\n\tif funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, \"\") == 0 {\n\t\t*funcref = impl_EpollCreate1\n\t} else {\n\t\t*funcref = error_EpollCreate1\n\t}\n\treturn (*funcref)(flags)\n}\n\nfunc error_EpollCreate1(flags int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CTL<<4, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EpollCtlAddr() *(func(epfd int, op int, fd int, event *EpollEvent) (err error))\n\nvar EpollCtl = enter_EpollCtl\n\nfunc enter_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {\n\tfuncref := get_EpollCtlAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_EPOLL_CTL<<4, \"\") == 0 {\n\t\t*funcref = impl_EpollCtl\n\t} else {\n\t\t*funcref = error_EpollCtl\n\t}\n\treturn (*funcref)(epfd, op, fd, event)\n}\n\nfunc error_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), uintptr(unsafe.Pointer(sigmask)))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EpollPwaitAddr() *(func(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error))\n\nvar EpollPwait = enter_EpollPwait\n\nfunc enter_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) {\n\tfuncref := get_EpollPwaitAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, \"\") == 0 {\n\t\t*funcref = impl_EpollPwait\n\t} else {\n\t\t*funcref = error_EpollPwait\n\t}\n\treturn (*funcref)(epfd, events, msec, sigmask)\n}\n\nfunc error_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) {\n\tn = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_WAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EpollWaitAddr() *(func(epfd int, events []EpollEvent, msec int) (n int, err error))\n\nvar EpollWait = enter_EpollWait\n\nfunc enter_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tfuncref := get_EpollWaitAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_EPOLL_WAIT<<4, \"\") == 0 {\n\t\t*funcref = impl_EpollWait\n\t} else {\n\t\t*funcref = error_EpollWait\n\t}\n\treturn (*funcref)(epfd, events, msec)\n}\n\nfunc error_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tn = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Errno2() (er2 int) {\n\truntime.EnterSyscall()\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERRNO2<<4)\n\truntime.ExitSyscall()\n\ter2 = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Eventfd(initval uint, flags int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EVENTFD<<4, uintptr(initval), uintptr(flags))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_EventfdAddr() *(func(initval uint, flags int) (fd int, err error))\n\nvar Eventfd = enter_Eventfd\n\nfunc enter_Eventfd(initval uint, flags int) (fd int, err error) {\n\tfuncref := get_EventfdAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_EVENTFD<<4, \"\") == 0 {\n\t\t*funcref = impl_Eventfd\n\t} else {\n\t\t*funcref = error_Eventfd\n\t}\n\treturn (*funcref)(initval, flags)\n}\n\nfunc error_Eventfd(initval uint, flags int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\truntime.EnterSyscall()\n\tCallLeFuncWithErr(GetZosLibVec()+SYS_EXIT<<4, uintptr(code))\n\truntime.ExitSyscall()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FACCESSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FaccessatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error))\n\nvar Faccessat = enter_Faccessat\n\nfunc enter_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tfuncref := get_FaccessatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FACCESSAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Faccessat\n\t} else {\n\t\t*funcref = error_Faccessat\n\t}\n\treturn (*funcref)(dirfd, path, mode, flags)\n}\n\nfunc error_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHDIR<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHMOD<<4, uintptr(fd), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHMODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FchmodatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error))\n\nvar Fchmodat = enter_Fchmodat\n\nfunc enter_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tfuncref := get_FchmodatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FCHMODAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Fchmodat\n\t} else {\n\t\t*funcref = error_Fchmodat\n\t}\n\treturn (*funcref)(dirfd, path, mode, flags)\n}\n\nfunc error_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHOWN<<4, uintptr(fd), uintptr(uid), uintptr(gid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHOWNAT_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FchownatAddr() *(func(fd int, path string, uid int, gid int, flags int) (err error))\n\nvar Fchownat = enter_Fchownat\n\nfunc enter_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) {\n\tfuncref := get_FchownatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FCHOWNAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Fchownat\n\t} else {\n\t\t*funcref = error_Fchownat\n\t}\n\treturn (*funcref)(fd, path, uid, gid, flags)\n}\n\nfunc error_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg))\n\truntime.ExitSyscall()\n\tretval = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fdatasync(fd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FDATASYNC<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FdatasyncAddr() *(func(fd int) (err error))\n\nvar Fdatasync = enter_Fdatasync\n\nfunc enter_Fdatasync(fd int) (err error) {\n\tfuncref := get_FdatasyncAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_FDATASYNC<<4, \"\") == 0 {\n\t\t*funcref = impl_Fdatasync\n\t} else {\n\t\t*funcref = error_Fdatasync\n\t}\n\treturn (*funcref)(fd)\n}\n\nfunc error_Fdatasync(fd int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fstat(fd int, stat *Stat_LE_t) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTAT<<4, uintptr(fd), uintptr(unsafe.Pointer(stat)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSTATAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_fstatatAddr() *(func(dirfd int, path string, stat *Stat_LE_t, flags int) (err error))\n\nvar fstatat = enter_fstatat\n\nfunc enter_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) {\n\tfuncref := get_fstatatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FSTATAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_fstatat\n\t} else {\n\t\t*funcref = error_fstatat\n\t}\n\treturn (*funcref)(dirfd, path, stat, flags)\n}\n\nfunc error_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p2 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LGETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)))\n\truntime.ExitSyscall()\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LgetxattrAddr() *(func(link string, attr string, dest []byte) (sz int, err error))\n\nvar Lgetxattr = enter_Lgetxattr\n\nfunc enter_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {\n\tfuncref := get_LgetxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LGETXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Lgetxattr\n\t} else {\n\t\t*funcref = error_Lgetxattr\n\t}\n\treturn (*funcref)(link, attr, dest)\n}\n\nfunc error_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {\n\tsz = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Lsetxattr(path string, attr string, data []byte, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 unsafe.Pointer\n\tif len(data) > 0 {\n\t\t_p2 = unsafe.Pointer(&data[0])\n\t} else {\n\t\t_p2 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LsetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error))\n\nvar Lsetxattr = enter_Lsetxattr\n\nfunc enter_Lsetxattr(path string, attr string, data []byte, flags int) (err error) {\n\tfuncref := get_LsetxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LSETXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Lsetxattr\n\t} else {\n\t\t*funcref = error_Lsetxattr\n\t}\n\treturn (*funcref)(path, attr, data, flags)\n}\n\nfunc error_Lsetxattr(path string, attr string, data []byte, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Fstatfs(fd int, buf *Statfs_t) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATFS<<4, uintptr(fd), uintptr(unsafe.Pointer(buf)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FstatfsAddr() *(func(fd int, buf *Statfs_t) (err error))\n\nvar Fstatfs = enter_Fstatfs\n\nfunc enter_Fstatfs(fd int, buf *Statfs_t) (err error) {\n\tfuncref := get_FstatfsAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_FSTATFS<<4, \"\") == 0 {\n\t\t*funcref = impl_Fstatfs\n\t} else {\n\t\t*funcref = error_Fstatfs\n\t}\n\treturn (*funcref)(fd, buf)\n}\n\nfunc error_Fstatfs(fd int, buf *Statfs_t) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatvfs(fd int, stat *Statvfs_t) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATVFS<<4, uintptr(fd), uintptr(unsafe.Pointer(stat)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSYNC<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Futimes(fd int, tv []Timeval) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(tv) > 0 {\n\t\t_p0 = unsafe.Pointer(&tv[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FUTIMES<<4, uintptr(fd), uintptr(_p0), uintptr(len(tv)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FutimesAddr() *(func(fd int, tv []Timeval) (err error))\n\nvar Futimes = enter_Futimes\n\nfunc enter_Futimes(fd int, tv []Timeval) (err error) {\n\tfuncref := get_FutimesAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_FUTIMES<<4, \"\") == 0 {\n\t\t*funcref = impl_Futimes\n\t} else {\n\t\t*funcref = error_Futimes\n\t}\n\treturn (*funcref)(fd, tv)\n}\n\nfunc error_Futimes(fd int, tv []Timeval) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Futimesat(dirfd int, path string, tv []Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(tv) > 0 {\n\t\t_p1 = unsafe.Pointer(&tv[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FUTIMESAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_FutimesatAddr() *(func(dirfd int, path string, tv []Timeval) (err error))\n\nvar Futimesat = enter_Futimesat\n\nfunc enter_Futimesat(dirfd int, path string, tv []Timeval) (err error) {\n\tfuncref := get_FutimesatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___FUTIMESAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Futimesat\n\t} else {\n\t\t*funcref = error_Futimesat\n\t}\n\treturn (*funcref)(dirfd, path, tv)\n}\n\nfunc error_Futimesat(dirfd int, path string, tv []Timeval) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FTRUNCATE<<4, uintptr(fd), uintptr(length))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Getrandom(buf []byte, flags int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRANDOM<<4, uintptr(_p0), uintptr(len(buf)), uintptr(flags))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_GetrandomAddr() *(func(buf []byte, flags int) (n int, err error))\n\nvar Getrandom = enter_Getrandom\n\nfunc enter_Getrandom(buf []byte, flags int) (n int, err error) {\n\tfuncref := get_GetrandomAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_GETRANDOM<<4, \"\") == 0 {\n\t\t*funcref = impl_Getrandom\n\t} else {\n\t\t*funcref = error_Getrandom\n\t}\n\treturn (*funcref)(buf, flags)\n}\n\nfunc error_Getrandom(buf []byte, flags int) (n int, err error) {\n\tn = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_InotifyInit() (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_INOTIFY_INIT<<4)\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_InotifyInitAddr() *(func() (fd int, err error))\n\nvar InotifyInit = enter_InotifyInit\n\nfunc enter_InotifyInit() (fd int, err error) {\n\tfuncref := get_InotifyInitAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT<<4, \"\") == 0 {\n\t\t*funcref = impl_InotifyInit\n\t} else {\n\t\t*funcref = error_InotifyInit\n\t}\n\treturn (*funcref)()\n}\n\nfunc error_InotifyInit() (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_InotifyInit1(flags int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, uintptr(flags))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_InotifyInit1Addr() *(func(flags int) (fd int, err error))\n\nvar InotifyInit1 = enter_InotifyInit1\n\nfunc enter_InotifyInit1(flags int) (fd int, err error) {\n\tfuncref := get_InotifyInit1Addr()\n\tif funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, \"\") == 0 {\n\t\t*funcref = impl_InotifyInit1\n\t} else {\n\t\t*funcref = error_InotifyInit1\n\t}\n\treturn (*funcref)(flags)\n}\n\nfunc error_InotifyInit1(flags int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(pathname)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))\n\truntime.ExitSyscall()\n\twatchdesc = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_InotifyAddWatchAddr() *(func(fd int, pathname string, mask uint32) (watchdesc int, err error))\n\nvar InotifyAddWatch = enter_InotifyAddWatch\n\nfunc enter_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {\n\tfuncref := get_InotifyAddWatchAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, \"\") == 0 {\n\t\t*funcref = impl_InotifyAddWatch\n\t} else {\n\t\t*funcref = error_InotifyAddWatch\n\t}\n\treturn (*funcref)(fd, pathname, mask)\n}\n\nfunc error_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {\n\twatchdesc = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, uintptr(fd), uintptr(watchdesc))\n\truntime.ExitSyscall()\n\tsuccess = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_InotifyRmWatchAddr() *(func(fd int, watchdesc uint32) (success int, err error))\n\nvar InotifyRmWatch = enter_InotifyRmWatch\n\nfunc enter_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {\n\tfuncref := get_InotifyRmWatchAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, \"\") == 0 {\n\t\t*funcref = impl_InotifyRmWatch\n\t} else {\n\t\t*funcref = error_InotifyRmWatch\n\t}\n\treturn (*funcref)(fd, watchdesc)\n}\n\nfunc error_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {\n\tsuccess = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Listxattr(path string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))\n\truntime.ExitSyscall()\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_ListxattrAddr() *(func(path string, dest []byte) (sz int, err error))\n\nvar Listxattr = enter_Listxattr\n\nfunc enter_Listxattr(path string, dest []byte) (sz int, err error) {\n\tfuncref := get_ListxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LISTXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Listxattr\n\t} else {\n\t\t*funcref = error_Listxattr\n\t}\n\treturn (*funcref)(path, dest)\n}\n\nfunc error_Listxattr(path string, dest []byte) (sz int, err error) {\n\tsz = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Llistxattr(path string, dest []byte) (sz int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(dest) > 0 {\n\t\t_p1 = unsafe.Pointer(&dest[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LLISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))\n\truntime.ExitSyscall()\n\tsz = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LlistxattrAddr() *(func(path string, dest []byte) (sz int, err error))\n\nvar Llistxattr = enter_Llistxattr\n\nfunc enter_Llistxattr(path string, dest []byte) (sz int, err error) {\n\tfuncref := get_LlistxattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LLISTXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Llistxattr\n\t} else {\n\t\t*funcref = error_Llistxattr\n\t}\n\treturn (*funcref)(path, dest)\n}\n\nfunc error_Llistxattr(path string, dest []byte) (sz int, err error) {\n\tsz = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Lremovexattr(path string, attr string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(attr)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LremovexattrAddr() *(func(path string, attr string) (err error))\n\nvar Lremovexattr = enter_Lremovexattr\n\nfunc enter_Lremovexattr(path string, attr string) (err error) {\n\tfuncref := get_LremovexattrAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Lremovexattr\n\t} else {\n\t\t*funcref = error_Lremovexattr\n\t}\n\treturn (*funcref)(path, attr)\n}\n\nfunc error_Lremovexattr(path string, attr string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Lutimes(path string, tv []Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(tv) > 0 {\n\t\t_p1 = unsafe.Pointer(&tv[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LUTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LutimesAddr() *(func(path string, tv []Timeval) (err error))\n\nvar Lutimes = enter_Lutimes\n\nfunc enter_Lutimes(path string, tv []Timeval) (err error) {\n\tfuncref := get_LutimesAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LUTIMES_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Lutimes\n\t} else {\n\t\t*funcref = error_Lutimes\n\t}\n\treturn (*funcref)(path, tv)\n}\n\nfunc error_Lutimes(path string, tv []Timeval) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MPROTECT<<4, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MSYNC<<4, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONSOLE2<<4, uintptr(unsafe.Pointer(cmsg)), uintptr(unsafe.Pointer(modstr)), uintptr(unsafe.Pointer(concmd)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Poll(fds []PollFd, timeout int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(fds) > 0 {\n\t\t_p0 = unsafe.Pointer(&fds[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POLL<<4, uintptr(_p0), uintptr(len(fds)), uintptr(timeout))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_R_A<<4, uintptr(dirp), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Statfs(path string, buf *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STATFS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_StatfsAddr() *(func(path string, buf *Statfs_t) (err error))\n\nvar Statfs = enter_Statfs\n\nfunc enter_Statfs(path string, buf *Statfs_t) (err error) {\n\tfuncref := get_StatfsAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___STATFS_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Statfs\n\t} else {\n\t\t*funcref = error_Statfs\n\t}\n\treturn (*funcref)(path, buf)\n}\n\nfunc error_Statfs(path string, buf *Statfs_t) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Syncfs(fd int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SYNCFS<<4, uintptr(fd))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_SyncfsAddr() *(func(fd int) (err error))\n\nvar Syncfs = enter_Syncfs\n\nfunc enter_Syncfs(fd int) (err error) {\n\tfuncref := get_SyncfsAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_SYNCFS<<4, \"\") == 0 {\n\t\t*funcref = impl_Syncfs\n\t} else {\n\t\t*funcref = error_Syncfs\n\t}\n\treturn (*funcref)(fd)\n}\n\nfunc error_Syncfs(fd int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Times(tms *Tms) (ticks uintptr, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TIMES<<4, uintptr(unsafe.Pointer(tms)))\n\truntime.ExitSyscall()\n\tticks = uintptr(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc W_Getmntent(buff *byte, size int) (lastsys int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_GETMNTENT<<4, uintptr(unsafe.Pointer(buff)), uintptr(size))\n\truntime.ExitSyscall()\n\tlastsys = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc W_Getmntent_A(buff *byte, size int) (lastsys int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___W_GETMNTENT_A<<4, uintptr(unsafe.Pointer(buff)), uintptr(size))\n\truntime.ExitSyscall()\n\tlastsys = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(filesystem)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p2 *byte\n\t_p2, err = BytePtrFromString(fstype)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p3 *byte\n\t_p3, err = BytePtrFromString(parm)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc unmount_LE(filesystem string, mtm int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(filesystem)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mtm))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHROOT_A<<4, uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SELECT<<4, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)))\n\truntime.ExitSyscall()\n\tret = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Uname(buf *Utsname) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____OSNAME_A<<4, uintptr(unsafe.Pointer(buf)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Unshare(flags int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNSHARE<<4, uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_UnshareAddr() *(func(flags int) (err error))\n\nvar Unshare = enter_Unshare\n\nfunc enter_Unshare(flags int) (err error) {\n\tfuncref := get_UnshareAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_UNSHARE<<4, \"\") == 0 {\n\t\t*funcref = impl_Unshare\n\t} else {\n\t\t*funcref = error_Unshare\n\t}\n\treturn (*funcref)(flags)\n}\n\nfunc error_Unshare(flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gethostname(buf []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(buf)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETGID<<4)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPID<<4)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPGID<<4, uintptr(pid))\n\tpgid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (pid int) {\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPPID<<4)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPRIORITY<<4, uintptr(which), uintptr(who))\n\truntime.ExitSyscall()\n\tprio = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(resource int, rlim *Rlimit) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(rlim)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrusage(who int, rusage *rusage_zos) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRUSAGE<<4, uintptr(who), uintptr(unsafe.Pointer(rusage)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\truntime.EnterSyscall()\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEGID<<4)\n\truntime.ExitSyscall()\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\truntime.EnterSyscall()\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEUID<<4)\n\truntime.ExitSyscall()\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSID<<4, uintptr(pid))\n\tsid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETUID<<4)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, sig Signal) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_KILL<<4, uintptr(pid), uintptr(sig))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LCHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldPath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newPath)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINKAT_A<<4, uintptr(oldDirFd), uintptr(unsafe.Pointer(_p0)), uintptr(newDirFd), uintptr(unsafe.Pointer(_p1)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_LinkatAddr() *(func(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error))\n\nvar Linkat = enter_Linkat\n\nfunc enter_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) {\n\tfuncref := get_LinkatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___LINKAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Linkat\n\t} else {\n\t\t*funcref = error_Linkat\n\t}\n\treturn (*funcref)(oldDirFd, oldPath, newDirFd, newPath, flags)\n}\n\nfunc error_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, n int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LISTEN<<4, uintptr(s), uintptr(n))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc lstat(path string, stat *Stat_LE_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSTAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIRAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_MkdiratAddr() *(func(dirfd int, path string, mode uint32) (err error))\n\nvar Mkdirat = enter_Mkdirat\n\nfunc enter_Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tfuncref := get_MkdiratAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___MKDIRAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Mkdirat\n\t} else {\n\t\t*funcref = error_Mkdirat\n\t}\n\treturn (*funcref)(dirfd, path, mode)\n}\n\nfunc error_Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFO_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_MknodatAddr() *(func(dirfd int, path string, mode uint32, dev int) (err error))\n\nvar Mknodat = enter_Mknodat\n\nfunc enter_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tfuncref := get_MknodatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___MKNODAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Mknodat\n\t} else {\n\t\t*funcref = error_Mknodat\n\t}\n\treturn (*funcref)(dirfd, path, mode, dev)\n}\n\nfunc error_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_PivotRoot(newroot string, oldroot string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(newroot)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(oldroot)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_PivotRootAddr() *(func(newroot string, oldroot string) (err error))\n\nvar PivotRoot = enter_PivotRoot\n\nfunc enter_PivotRoot(newroot string, oldroot string) (err error) {\n\tfuncref := get_PivotRootAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_PivotRoot\n\t} else {\n\t\t*funcref = error_PivotRoot\n\t}\n\treturn (*funcref)(newroot, oldroot)\n}\n\nfunc error_PivotRoot(newroot string, oldroot string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PREAD<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PWRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset))\n\truntime.ExitSyscall()\n\tn = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PRCTL_A<<4, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_PrctlAddr() *(func(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error))\n\nvar Prctl = enter_Prctl\n\nfunc enter_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {\n\tfuncref := get_PrctlAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___PRCTL_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Prctl\n\t} else {\n\t\t*funcref = error_Prctl\n\t}\n\treturn (*funcref)(option, arg2, arg3, arg4, arg5)\n}\n\nfunc error_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PRLIMIT<<4, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_PrlimitAddr() *(func(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error))\n\nvar Prlimit = enter_Prlimit\n\nfunc enter_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {\n\tfuncref := get_PrlimitAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_PRLIMIT<<4, \"\") == 0 {\n\t\t*funcref = impl_Prlimit\n\t} else {\n\t\t*funcref = error_Prlimit\n\t}\n\treturn (*funcref)(pid, resource, newlimit, old)\n}\n\nfunc error_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_RenameatAddr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string) (err error))\n\nvar Renameat = enter_Renameat\n\nfunc enter_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tfuncref := get_RenameatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___RENAMEAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Renameat\n\t} else {\n\t\t*funcref = error_Renameat\n\t}\n\treturn (*funcref)(olddirfd, oldpath, newdirfd, newpath)\n}\n\nfunc error_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT2_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_Renameat2Addr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error))\n\nvar Renameat2 = enter_Renameat2\n\nfunc enter_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {\n\tfuncref := get_Renameat2Addr()\n\tif funcptrtest(GetZosLibVec()+SYS___RENAMEAT2_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Renameat2\n\t} else {\n\t\t*funcref = error_Renameat2\n\t}\n\treturn (*funcref)(olddirfd, oldpath, newdirfd, newpath, flags)\n}\n\nfunc error_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RMDIR_A<<4, uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (off int64, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LSEEK<<4, uintptr(fd), uintptr(offset), uintptr(whence))\n\truntime.ExitSyscall()\n\toff = int64(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEGID<<4, uintptr(egid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEUID<<4, uintptr(euid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Sethostname(p []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(p)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_SethostnameAddr() *(func(p []byte) (err error))\n\nvar Sethostname = enter_Sethostname\n\nfunc enter_Sethostname(p []byte) (err error) {\n\tfuncref := get_SethostnameAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Sethostname\n\t} else {\n\t\t*funcref = error_Sethostname\n\t}\n\treturn (*funcref)(p)\n}\n\nfunc error_Sethostname(p []byte) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Setns(fd int, nstype int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETNS<<4, uintptr(fd), uintptr(nstype))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_SetnsAddr() *(func(fd int, nstype int) (err error))\n\nvar Setns = enter_Setns\n\nfunc enter_Setns(fd int, nstype int) (err error) {\n\tfuncref := get_SetnsAddr()\n\tif funcptrtest(GetZosLibVec()+SYS_SETNS<<4, \"\") == 0 {\n\t\t*funcref = impl_Setns\n\t} else {\n\t\t*funcref = error_Setns\n\t}\n\treturn (*funcref)(fd, nstype)\n}\n\nfunc error_Setns(fd int, nstype int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPRIORITY<<4, uintptr(which), uintptr(who), uintptr(prio))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPGID<<4, uintptr(pid), uintptr(pgid))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrlimit(resource int, lim *Rlimit) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(lim)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREGID<<4, uintptr(rgid), uintptr(egid))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREUID<<4, uintptr(ruid), uintptr(euid))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_SETSID<<4)\n\tpid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETUID<<4, uintptr(uid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(uid int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGID<<4, uintptr(uid))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(fd int, how int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHUTDOWN<<4, uintptr(fd), uintptr(how))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc stat(path string, statLE *Stat_LE_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Symlinkat(oldPath string, dirfd int, newPath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldPath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newPath)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINKAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(dirfd), uintptr(unsafe.Pointer(_p1)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_SymlinkatAddr() *(func(oldPath string, dirfd int, newPath string) (err error))\n\nvar Symlinkat = enter_Symlinkat\n\nfunc enter_Symlinkat(oldPath string, dirfd int, newPath string) (err error) {\n\tfuncref := get_SymlinkatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___SYMLINKAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Symlinkat\n\t} else {\n\t\t*funcref = error_Symlinkat\n\t}\n\treturn (*funcref)(oldPath, dirfd, newPath)\n}\n\nfunc error_Symlinkat(oldPath string, dirfd int, newPath string) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() {\n\truntime.EnterSyscall()\n\tCallLeFuncWithErr(GetZosLibVec() + SYS_SYNC<<4)\n\truntime.ExitSyscall()\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___TRUNCATE_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(length))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tcgetattr(fildes int, termptr *Termios) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCGETATTR<<4, uintptr(fildes), uintptr(unsafe.Pointer(termptr)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tcsetattr(fildes int, when int, termptr *Termios) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCSETATTR<<4, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(mask int) (oldmask int) {\n\truntime.EnterSyscall()\n\tr0, _, _ := CallLeFuncWithErr(GetZosLibVec()+SYS_UMASK<<4, uintptr(mask))\n\truntime.ExitSyscall()\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINK_A<<4, uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_UnlinkatAddr() *(func(dirfd int, path string, flags int) (err error))\n\nvar Unlinkat = enter_Unlinkat\n\nfunc enter_Unlinkat(dirfd int, path string, flags int) (err error) {\n\tfuncref := get_UnlinkatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___UNLINKAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_Unlinkat\n\t} else {\n\t\t*funcref = error_Unlinkat\n\t}\n\treturn (*funcref)(dirfd, path, flags)\n}\n\nfunc error_Unlinkat(dirfd int, path string, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, utim *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPEN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_openatAddr() *(func(dirfd int, path string, flags int, mode uint32) (fd int, err error))\n\nvar openat = enter_openat\n\nfunc enter_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tfuncref := get_openatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___OPENAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_openat\n\t} else {\n\t\t*funcref = error_openat\n\t}\n\treturn (*funcref)(dirfd, path, flags, mode)\n}\n\nfunc error_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT2_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_openat2Addr() *(func(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error))\n\nvar openat2 = enter_openat2\n\nfunc enter_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {\n\tfuncref := get_openat2Addr()\n\tif funcptrtest(GetZosLibVec()+SYS___OPENAT2_A<<4, \"\") == 0 {\n\t\t*funcref = impl_openat2\n\t} else {\n\t\t*funcref = error_openat2\n\t}\n\treturn (*funcref)(dirfd, path, open_how, size)\n}\n\nfunc error_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {\n\tfd = -1\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc remove(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_REMOVE<<4, uintptr(unsafe.Pointer(_p0)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc waitid(idType int, id int, info *Siginfo, options int) (err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITID<<4, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITPID<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options))\n\truntime.ExitSyscall()\n\twpid = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc gettimeofday(tv *timeval_zos) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETTIMEOFDAY<<4, uintptr(unsafe.Pointer(tv)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (err error) {\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE<<4, uintptr(unsafe.Pointer(p)))\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc impl_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMENSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(ts)), uintptr(flags))\n\truntime.ExitSyscall()\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n//go:nosplit\nfunc get_utimensatAddr() *(func(dirfd int, path string, ts *[2]Timespec, flags int) (err error))\n\nvar utimensat = enter_utimensat\n\nfunc enter_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) {\n\tfuncref := get_utimensatAddr()\n\tif funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, \"\") == 0 {\n\t\t*funcref = impl_utimensat\n\t} else {\n\t\t*funcref = error_utimensat\n\t}\n\treturn (*funcref)(dirfd, path, ts, flags)\n}\n\nfunc error_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) {\n\terr = ENOSYS\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Posix_openpt(oflag int) (fd int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POSIX_OPENPT<<4, uintptr(oflag))\n\truntime.ExitSyscall()\n\tfd = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Grantpt(fildes int) (rc int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GRANTPT<<4, uintptr(fildes))\n\truntime.ExitSyscall()\n\trc = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlockpt(fildes int) (rc int, err error) {\n\truntime.EnterSyscall()\n\tr0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNLOCKPT<<4, uintptr(fildes))\n\truntime.ExitSyscall()\n\trc = int(r0)\n\tif int64(r0) == -1 {\n\t\terr = errnoErr2(e1, e2)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build 386 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build amd64 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build arm && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build arm64 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build mips64 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build ppc64 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go",
    "content": "// go run mksysctl_openbsd.go\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build riscv64 && openbsd\n\npackage unix\n\ntype mibentry struct {\n\tctlname string\n\tctloid  []_C_int\n}\n\nvar sysctlMib = []mibentry{\n\t{\"ddb.console\", []_C_int{9, 6}},\n\t{\"ddb.log\", []_C_int{9, 7}},\n\t{\"ddb.max_line\", []_C_int{9, 3}},\n\t{\"ddb.max_width\", []_C_int{9, 2}},\n\t{\"ddb.panic\", []_C_int{9, 5}},\n\t{\"ddb.profile\", []_C_int{9, 9}},\n\t{\"ddb.radix\", []_C_int{9, 1}},\n\t{\"ddb.tab_stop_width\", []_C_int{9, 4}},\n\t{\"ddb.trigger\", []_C_int{9, 8}},\n\t{\"fs.posix.setuid\", []_C_int{3, 1, 1}},\n\t{\"hw.allowpowerdown\", []_C_int{6, 22}},\n\t{\"hw.byteorder\", []_C_int{6, 4}},\n\t{\"hw.cpuspeed\", []_C_int{6, 12}},\n\t{\"hw.diskcount\", []_C_int{6, 10}},\n\t{\"hw.disknames\", []_C_int{6, 8}},\n\t{\"hw.diskstats\", []_C_int{6, 9}},\n\t{\"hw.machine\", []_C_int{6, 1}},\n\t{\"hw.model\", []_C_int{6, 2}},\n\t{\"hw.ncpu\", []_C_int{6, 3}},\n\t{\"hw.ncpufound\", []_C_int{6, 21}},\n\t{\"hw.ncpuonline\", []_C_int{6, 25}},\n\t{\"hw.pagesize\", []_C_int{6, 7}},\n\t{\"hw.perfpolicy\", []_C_int{6, 23}},\n\t{\"hw.physmem\", []_C_int{6, 19}},\n\t{\"hw.power\", []_C_int{6, 26}},\n\t{\"hw.product\", []_C_int{6, 15}},\n\t{\"hw.serialno\", []_C_int{6, 17}},\n\t{\"hw.setperf\", []_C_int{6, 13}},\n\t{\"hw.smt\", []_C_int{6, 24}},\n\t{\"hw.usermem\", []_C_int{6, 20}},\n\t{\"hw.uuid\", []_C_int{6, 18}},\n\t{\"hw.vendor\", []_C_int{6, 14}},\n\t{\"hw.version\", []_C_int{6, 16}},\n\t{\"kern.allowdt\", []_C_int{1, 65}},\n\t{\"kern.allowkmem\", []_C_int{1, 52}},\n\t{\"kern.argmax\", []_C_int{1, 8}},\n\t{\"kern.audio\", []_C_int{1, 84}},\n\t{\"kern.boottime\", []_C_int{1, 21}},\n\t{\"kern.bufcachepercent\", []_C_int{1, 72}},\n\t{\"kern.ccpu\", []_C_int{1, 45}},\n\t{\"kern.clockrate\", []_C_int{1, 12}},\n\t{\"kern.consbuf\", []_C_int{1, 83}},\n\t{\"kern.consbufsize\", []_C_int{1, 82}},\n\t{\"kern.consdev\", []_C_int{1, 75}},\n\t{\"kern.cp_time\", []_C_int{1, 40}},\n\t{\"kern.cp_time2\", []_C_int{1, 71}},\n\t{\"kern.cpustats\", []_C_int{1, 85}},\n\t{\"kern.domainname\", []_C_int{1, 22}},\n\t{\"kern.file\", []_C_int{1, 73}},\n\t{\"kern.forkstat\", []_C_int{1, 42}},\n\t{\"kern.fscale\", []_C_int{1, 46}},\n\t{\"kern.fsync\", []_C_int{1, 33}},\n\t{\"kern.global_ptrace\", []_C_int{1, 81}},\n\t{\"kern.hostid\", []_C_int{1, 11}},\n\t{\"kern.hostname\", []_C_int{1, 10}},\n\t{\"kern.intrcnt.nintrcnt\", []_C_int{1, 63, 1}},\n\t{\"kern.job_control\", []_C_int{1, 19}},\n\t{\"kern.malloc.buckets\", []_C_int{1, 39, 1}},\n\t{\"kern.malloc.kmemnames\", []_C_int{1, 39, 3}},\n\t{\"kern.maxclusters\", []_C_int{1, 67}},\n\t{\"kern.maxfiles\", []_C_int{1, 7}},\n\t{\"kern.maxlocksperuid\", []_C_int{1, 70}},\n\t{\"kern.maxpartitions\", []_C_int{1, 23}},\n\t{\"kern.maxproc\", []_C_int{1, 6}},\n\t{\"kern.maxthread\", []_C_int{1, 25}},\n\t{\"kern.maxvnodes\", []_C_int{1, 5}},\n\t{\"kern.mbstat\", []_C_int{1, 59}},\n\t{\"kern.msgbuf\", []_C_int{1, 48}},\n\t{\"kern.msgbufsize\", []_C_int{1, 38}},\n\t{\"kern.nchstats\", []_C_int{1, 41}},\n\t{\"kern.netlivelocks\", []_C_int{1, 76}},\n\t{\"kern.nfiles\", []_C_int{1, 56}},\n\t{\"kern.ngroups\", []_C_int{1, 18}},\n\t{\"kern.nosuidcoredump\", []_C_int{1, 32}},\n\t{\"kern.nprocs\", []_C_int{1, 47}},\n\t{\"kern.nselcoll\", []_C_int{1, 43}},\n\t{\"kern.nthreads\", []_C_int{1, 26}},\n\t{\"kern.numvnodes\", []_C_int{1, 58}},\n\t{\"kern.osrelease\", []_C_int{1, 2}},\n\t{\"kern.osrevision\", []_C_int{1, 3}},\n\t{\"kern.ostype\", []_C_int{1, 1}},\n\t{\"kern.osversion\", []_C_int{1, 27}},\n\t{\"kern.pfstatus\", []_C_int{1, 86}},\n\t{\"kern.pool_debug\", []_C_int{1, 77}},\n\t{\"kern.posix1version\", []_C_int{1, 17}},\n\t{\"kern.proc\", []_C_int{1, 66}},\n\t{\"kern.rawpartition\", []_C_int{1, 24}},\n\t{\"kern.saved_ids\", []_C_int{1, 20}},\n\t{\"kern.securelevel\", []_C_int{1, 9}},\n\t{\"kern.seminfo\", []_C_int{1, 61}},\n\t{\"kern.shminfo\", []_C_int{1, 62}},\n\t{\"kern.somaxconn\", []_C_int{1, 28}},\n\t{\"kern.sominconn\", []_C_int{1, 29}},\n\t{\"kern.splassert\", []_C_int{1, 54}},\n\t{\"kern.stackgap_random\", []_C_int{1, 50}},\n\t{\"kern.sysvipc_info\", []_C_int{1, 51}},\n\t{\"kern.sysvmsg\", []_C_int{1, 34}},\n\t{\"kern.sysvsem\", []_C_int{1, 35}},\n\t{\"kern.sysvshm\", []_C_int{1, 36}},\n\t{\"kern.timecounter.choice\", []_C_int{1, 69, 4}},\n\t{\"kern.timecounter.hardware\", []_C_int{1, 69, 3}},\n\t{\"kern.timecounter.tick\", []_C_int{1, 69, 1}},\n\t{\"kern.timecounter.timestepwarnings\", []_C_int{1, 69, 2}},\n\t{\"kern.timeout_stats\", []_C_int{1, 87}},\n\t{\"kern.tty.tk_cancc\", []_C_int{1, 44, 4}},\n\t{\"kern.tty.tk_nin\", []_C_int{1, 44, 1}},\n\t{\"kern.tty.tk_nout\", []_C_int{1, 44, 2}},\n\t{\"kern.tty.tk_rawcc\", []_C_int{1, 44, 3}},\n\t{\"kern.tty.ttyinfo\", []_C_int{1, 44, 5}},\n\t{\"kern.ttycount\", []_C_int{1, 57}},\n\t{\"kern.utc_offset\", []_C_int{1, 88}},\n\t{\"kern.version\", []_C_int{1, 4}},\n\t{\"kern.video\", []_C_int{1, 89}},\n\t{\"kern.watchdog.auto\", []_C_int{1, 64, 2}},\n\t{\"kern.watchdog.period\", []_C_int{1, 64, 1}},\n\t{\"kern.witnesswatch\", []_C_int{1, 53}},\n\t{\"kern.wxabort\", []_C_int{1, 74}},\n\t{\"net.bpf.bufsize\", []_C_int{4, 31, 1}},\n\t{\"net.bpf.maxbufsize\", []_C_int{4, 31, 2}},\n\t{\"net.inet.ah.enable\", []_C_int{4, 2, 51, 1}},\n\t{\"net.inet.ah.stats\", []_C_int{4, 2, 51, 2}},\n\t{\"net.inet.carp.allow\", []_C_int{4, 2, 112, 1}},\n\t{\"net.inet.carp.log\", []_C_int{4, 2, 112, 3}},\n\t{\"net.inet.carp.preempt\", []_C_int{4, 2, 112, 2}},\n\t{\"net.inet.carp.stats\", []_C_int{4, 2, 112, 4}},\n\t{\"net.inet.divert.recvspace\", []_C_int{4, 2, 258, 1}},\n\t{\"net.inet.divert.sendspace\", []_C_int{4, 2, 258, 2}},\n\t{\"net.inet.divert.stats\", []_C_int{4, 2, 258, 3}},\n\t{\"net.inet.esp.enable\", []_C_int{4, 2, 50, 1}},\n\t{\"net.inet.esp.stats\", []_C_int{4, 2, 50, 4}},\n\t{\"net.inet.esp.udpencap\", []_C_int{4, 2, 50, 2}},\n\t{\"net.inet.esp.udpencap_port\", []_C_int{4, 2, 50, 3}},\n\t{\"net.inet.etherip.allow\", []_C_int{4, 2, 97, 1}},\n\t{\"net.inet.etherip.stats\", []_C_int{4, 2, 97, 2}},\n\t{\"net.inet.gre.allow\", []_C_int{4, 2, 47, 1}},\n\t{\"net.inet.gre.wccp\", []_C_int{4, 2, 47, 2}},\n\t{\"net.inet.icmp.bmcastecho\", []_C_int{4, 2, 1, 2}},\n\t{\"net.inet.icmp.errppslimit\", []_C_int{4, 2, 1, 3}},\n\t{\"net.inet.icmp.maskrepl\", []_C_int{4, 2, 1, 1}},\n\t{\"net.inet.icmp.rediraccept\", []_C_int{4, 2, 1, 4}},\n\t{\"net.inet.icmp.redirtimeout\", []_C_int{4, 2, 1, 5}},\n\t{\"net.inet.icmp.stats\", []_C_int{4, 2, 1, 7}},\n\t{\"net.inet.icmp.tstamprepl\", []_C_int{4, 2, 1, 6}},\n\t{\"net.inet.igmp.stats\", []_C_int{4, 2, 2, 1}},\n\t{\"net.inet.ip.arpdown\", []_C_int{4, 2, 0, 40}},\n\t{\"net.inet.ip.arpqueued\", []_C_int{4, 2, 0, 36}},\n\t{\"net.inet.ip.arptimeout\", []_C_int{4, 2, 0, 39}},\n\t{\"net.inet.ip.encdebug\", []_C_int{4, 2, 0, 12}},\n\t{\"net.inet.ip.forwarding\", []_C_int{4, 2, 0, 1}},\n\t{\"net.inet.ip.ifq.congestion\", []_C_int{4, 2, 0, 30, 4}},\n\t{\"net.inet.ip.ifq.drops\", []_C_int{4, 2, 0, 30, 3}},\n\t{\"net.inet.ip.ifq.len\", []_C_int{4, 2, 0, 30, 1}},\n\t{\"net.inet.ip.ifq.maxlen\", []_C_int{4, 2, 0, 30, 2}},\n\t{\"net.inet.ip.maxqueue\", []_C_int{4, 2, 0, 11}},\n\t{\"net.inet.ip.mforwarding\", []_C_int{4, 2, 0, 31}},\n\t{\"net.inet.ip.mrtmfc\", []_C_int{4, 2, 0, 37}},\n\t{\"net.inet.ip.mrtproto\", []_C_int{4, 2, 0, 34}},\n\t{\"net.inet.ip.mrtstats\", []_C_int{4, 2, 0, 35}},\n\t{\"net.inet.ip.mrtvif\", []_C_int{4, 2, 0, 38}},\n\t{\"net.inet.ip.mtu\", []_C_int{4, 2, 0, 4}},\n\t{\"net.inet.ip.mtudisc\", []_C_int{4, 2, 0, 27}},\n\t{\"net.inet.ip.mtudisctimeout\", []_C_int{4, 2, 0, 28}},\n\t{\"net.inet.ip.multipath\", []_C_int{4, 2, 0, 32}},\n\t{\"net.inet.ip.portfirst\", []_C_int{4, 2, 0, 7}},\n\t{\"net.inet.ip.porthifirst\", []_C_int{4, 2, 0, 9}},\n\t{\"net.inet.ip.porthilast\", []_C_int{4, 2, 0, 10}},\n\t{\"net.inet.ip.portlast\", []_C_int{4, 2, 0, 8}},\n\t{\"net.inet.ip.redirect\", []_C_int{4, 2, 0, 2}},\n\t{\"net.inet.ip.sourceroute\", []_C_int{4, 2, 0, 5}},\n\t{\"net.inet.ip.stats\", []_C_int{4, 2, 0, 33}},\n\t{\"net.inet.ip.ttl\", []_C_int{4, 2, 0, 3}},\n\t{\"net.inet.ipcomp.enable\", []_C_int{4, 2, 108, 1}},\n\t{\"net.inet.ipcomp.stats\", []_C_int{4, 2, 108, 2}},\n\t{\"net.inet.ipip.allow\", []_C_int{4, 2, 4, 1}},\n\t{\"net.inet.ipip.stats\", []_C_int{4, 2, 4, 2}},\n\t{\"net.inet.pfsync.stats\", []_C_int{4, 2, 240, 1}},\n\t{\"net.inet.tcp.ackonpush\", []_C_int{4, 2, 6, 13}},\n\t{\"net.inet.tcp.always_keepalive\", []_C_int{4, 2, 6, 22}},\n\t{\"net.inet.tcp.baddynamic\", []_C_int{4, 2, 6, 6}},\n\t{\"net.inet.tcp.drop\", []_C_int{4, 2, 6, 19}},\n\t{\"net.inet.tcp.ecn\", []_C_int{4, 2, 6, 14}},\n\t{\"net.inet.tcp.ident\", []_C_int{4, 2, 6, 9}},\n\t{\"net.inet.tcp.keepidle\", []_C_int{4, 2, 6, 3}},\n\t{\"net.inet.tcp.keepinittime\", []_C_int{4, 2, 6, 2}},\n\t{\"net.inet.tcp.keepintvl\", []_C_int{4, 2, 6, 4}},\n\t{\"net.inet.tcp.mssdflt\", []_C_int{4, 2, 6, 11}},\n\t{\"net.inet.tcp.reasslimit\", []_C_int{4, 2, 6, 18}},\n\t{\"net.inet.tcp.rfc1323\", []_C_int{4, 2, 6, 1}},\n\t{\"net.inet.tcp.rfc3390\", []_C_int{4, 2, 6, 17}},\n\t{\"net.inet.tcp.rootonly\", []_C_int{4, 2, 6, 24}},\n\t{\"net.inet.tcp.rstppslimit\", []_C_int{4, 2, 6, 12}},\n\t{\"net.inet.tcp.sack\", []_C_int{4, 2, 6, 10}},\n\t{\"net.inet.tcp.sackholelimit\", []_C_int{4, 2, 6, 20}},\n\t{\"net.inet.tcp.slowhz\", []_C_int{4, 2, 6, 5}},\n\t{\"net.inet.tcp.stats\", []_C_int{4, 2, 6, 21}},\n\t{\"net.inet.tcp.synbucketlimit\", []_C_int{4, 2, 6, 16}},\n\t{\"net.inet.tcp.syncachelimit\", []_C_int{4, 2, 6, 15}},\n\t{\"net.inet.tcp.synhashsize\", []_C_int{4, 2, 6, 25}},\n\t{\"net.inet.tcp.synuselimit\", []_C_int{4, 2, 6, 23}},\n\t{\"net.inet.udp.baddynamic\", []_C_int{4, 2, 17, 2}},\n\t{\"net.inet.udp.checksum\", []_C_int{4, 2, 17, 1}},\n\t{\"net.inet.udp.recvspace\", []_C_int{4, 2, 17, 3}},\n\t{\"net.inet.udp.rootonly\", []_C_int{4, 2, 17, 6}},\n\t{\"net.inet.udp.sendspace\", []_C_int{4, 2, 17, 4}},\n\t{\"net.inet.udp.stats\", []_C_int{4, 2, 17, 5}},\n\t{\"net.inet6.divert.recvspace\", []_C_int{4, 24, 86, 1}},\n\t{\"net.inet6.divert.sendspace\", []_C_int{4, 24, 86, 2}},\n\t{\"net.inet6.divert.stats\", []_C_int{4, 24, 86, 3}},\n\t{\"net.inet6.icmp6.errppslimit\", []_C_int{4, 24, 30, 14}},\n\t{\"net.inet6.icmp6.mtudisc_hiwat\", []_C_int{4, 24, 30, 16}},\n\t{\"net.inet6.icmp6.mtudisc_lowat\", []_C_int{4, 24, 30, 17}},\n\t{\"net.inet6.icmp6.nd6_debug\", []_C_int{4, 24, 30, 18}},\n\t{\"net.inet6.icmp6.nd6_delay\", []_C_int{4, 24, 30, 8}},\n\t{\"net.inet6.icmp6.nd6_maxnudhint\", []_C_int{4, 24, 30, 15}},\n\t{\"net.inet6.icmp6.nd6_mmaxtries\", []_C_int{4, 24, 30, 10}},\n\t{\"net.inet6.icmp6.nd6_umaxtries\", []_C_int{4, 24, 30, 9}},\n\t{\"net.inet6.icmp6.redirtimeout\", []_C_int{4, 24, 30, 3}},\n\t{\"net.inet6.ip6.auto_flowlabel\", []_C_int{4, 24, 17, 17}},\n\t{\"net.inet6.ip6.dad_count\", []_C_int{4, 24, 17, 16}},\n\t{\"net.inet6.ip6.dad_pending\", []_C_int{4, 24, 17, 49}},\n\t{\"net.inet6.ip6.defmcasthlim\", []_C_int{4, 24, 17, 18}},\n\t{\"net.inet6.ip6.forwarding\", []_C_int{4, 24, 17, 1}},\n\t{\"net.inet6.ip6.forwsrcrt\", []_C_int{4, 24, 17, 5}},\n\t{\"net.inet6.ip6.hdrnestlimit\", []_C_int{4, 24, 17, 15}},\n\t{\"net.inet6.ip6.hlim\", []_C_int{4, 24, 17, 3}},\n\t{\"net.inet6.ip6.log_interval\", []_C_int{4, 24, 17, 14}},\n\t{\"net.inet6.ip6.maxdynroutes\", []_C_int{4, 24, 17, 48}},\n\t{\"net.inet6.ip6.maxfragpackets\", []_C_int{4, 24, 17, 9}},\n\t{\"net.inet6.ip6.maxfrags\", []_C_int{4, 24, 17, 41}},\n\t{\"net.inet6.ip6.mforwarding\", []_C_int{4, 24, 17, 42}},\n\t{\"net.inet6.ip6.mrtmfc\", []_C_int{4, 24, 17, 53}},\n\t{\"net.inet6.ip6.mrtmif\", []_C_int{4, 24, 17, 52}},\n\t{\"net.inet6.ip6.mrtproto\", []_C_int{4, 24, 17, 8}},\n\t{\"net.inet6.ip6.mtudisctimeout\", []_C_int{4, 24, 17, 50}},\n\t{\"net.inet6.ip6.multicast_mtudisc\", []_C_int{4, 24, 17, 44}},\n\t{\"net.inet6.ip6.multipath\", []_C_int{4, 24, 17, 43}},\n\t{\"net.inet6.ip6.neighborgcthresh\", []_C_int{4, 24, 17, 45}},\n\t{\"net.inet6.ip6.redirect\", []_C_int{4, 24, 17, 2}},\n\t{\"net.inet6.ip6.soiikey\", []_C_int{4, 24, 17, 54}},\n\t{\"net.inet6.ip6.sourcecheck\", []_C_int{4, 24, 17, 10}},\n\t{\"net.inet6.ip6.sourcecheck_logint\", []_C_int{4, 24, 17, 11}},\n\t{\"net.inet6.ip6.use_deprecated\", []_C_int{4, 24, 17, 21}},\n\t{\"net.key.sadb_dump\", []_C_int{4, 30, 1}},\n\t{\"net.key.spd_dump\", []_C_int{4, 30, 2}},\n\t{\"net.mpls.ifq.congestion\", []_C_int{4, 33, 3, 4}},\n\t{\"net.mpls.ifq.drops\", []_C_int{4, 33, 3, 3}},\n\t{\"net.mpls.ifq.len\", []_C_int{4, 33, 3, 1}},\n\t{\"net.mpls.ifq.maxlen\", []_C_int{4, 33, 3, 2}},\n\t{\"net.mpls.mapttl_ip\", []_C_int{4, 33, 5}},\n\t{\"net.mpls.mapttl_ip6\", []_C_int{4, 33, 6}},\n\t{\"net.mpls.ttl\", []_C_int{4, 33, 2}},\n\t{\"net.pflow.stats\", []_C_int{4, 34, 1}},\n\t{\"net.pipex.enable\", []_C_int{4, 35, 1}},\n\t{\"vm.anonmin\", []_C_int{2, 7}},\n\t{\"vm.loadavg\", []_C_int{2, 2}},\n\t{\"vm.malloc_conf\", []_C_int{2, 12}},\n\t{\"vm.maxslp\", []_C_int{2, 10}},\n\t{\"vm.nkmempages\", []_C_int{2, 6}},\n\t{\"vm.psstrings\", []_C_int{2, 3}},\n\t{\"vm.swapencrypt.enable\", []_C_int{2, 5, 0}},\n\t{\"vm.swapencrypt.keyscreated\", []_C_int{2, 5, 1}},\n\t{\"vm.swapencrypt.keysdeleted\", []_C_int{2, 5, 2}},\n\t{\"vm.uspace\", []_C_int{2, 11}},\n\t{\"vm.uvmexp\", []_C_int{2, 4}},\n\t{\"vm.vmmeter\", []_C_int{2, 1}},\n\t{\"vm.vnodemin\", []_C_int{2, 9}},\n\t{\"vm.vtextmin\", []_C_int{2, 8}},\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go",
    "content": "// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/syscall.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && darwin\n\npackage unix\n\n// Deprecated: Use libSystem wrappers instead of direct syscalls.\nconst (\n\tSYS_SYSCALL                        = 0\n\tSYS_EXIT                           = 1\n\tSYS_FORK                           = 2\n\tSYS_READ                           = 3\n\tSYS_WRITE                          = 4\n\tSYS_OPEN                           = 5\n\tSYS_CLOSE                          = 6\n\tSYS_WAIT4                          = 7\n\tSYS_LINK                           = 9\n\tSYS_UNLINK                         = 10\n\tSYS_CHDIR                          = 12\n\tSYS_FCHDIR                         = 13\n\tSYS_MKNOD                          = 14\n\tSYS_CHMOD                          = 15\n\tSYS_CHOWN                          = 16\n\tSYS_GETFSSTAT                      = 18\n\tSYS_GETPID                         = 20\n\tSYS_SETUID                         = 23\n\tSYS_GETUID                         = 24\n\tSYS_GETEUID                        = 25\n\tSYS_PTRACE                         = 26\n\tSYS_RECVMSG                        = 27\n\tSYS_SENDMSG                        = 28\n\tSYS_RECVFROM                       = 29\n\tSYS_ACCEPT                         = 30\n\tSYS_GETPEERNAME                    = 31\n\tSYS_GETSOCKNAME                    = 32\n\tSYS_ACCESS                         = 33\n\tSYS_CHFLAGS                        = 34\n\tSYS_FCHFLAGS                       = 35\n\tSYS_SYNC                           = 36\n\tSYS_KILL                           = 37\n\tSYS_GETPPID                        = 39\n\tSYS_DUP                            = 41\n\tSYS_PIPE                           = 42\n\tSYS_GETEGID                        = 43\n\tSYS_SIGACTION                      = 46\n\tSYS_GETGID                         = 47\n\tSYS_SIGPROCMASK                    = 48\n\tSYS_GETLOGIN                       = 49\n\tSYS_SETLOGIN                       = 50\n\tSYS_ACCT                           = 51\n\tSYS_SIGPENDING                     = 52\n\tSYS_SIGALTSTACK                    = 53\n\tSYS_IOCTL                          = 54\n\tSYS_REBOOT                         = 55\n\tSYS_REVOKE                         = 56\n\tSYS_SYMLINK                        = 57\n\tSYS_READLINK                       = 58\n\tSYS_EXECVE                         = 59\n\tSYS_UMASK                          = 60\n\tSYS_CHROOT                         = 61\n\tSYS_MSYNC                          = 65\n\tSYS_VFORK                          = 66\n\tSYS_MUNMAP                         = 73\n\tSYS_MPROTECT                       = 74\n\tSYS_MADVISE                        = 75\n\tSYS_MINCORE                        = 78\n\tSYS_GETGROUPS                      = 79\n\tSYS_SETGROUPS                      = 80\n\tSYS_GETPGRP                        = 81\n\tSYS_SETPGID                        = 82\n\tSYS_SETITIMER                      = 83\n\tSYS_SWAPON                         = 85\n\tSYS_GETITIMER                      = 86\n\tSYS_GETDTABLESIZE                  = 89\n\tSYS_DUP2                           = 90\n\tSYS_FCNTL                          = 92\n\tSYS_SELECT                         = 93\n\tSYS_FSYNC                          = 95\n\tSYS_SETPRIORITY                    = 96\n\tSYS_SOCKET                         = 97\n\tSYS_CONNECT                        = 98\n\tSYS_GETPRIORITY                    = 100\n\tSYS_BIND                           = 104\n\tSYS_SETSOCKOPT                     = 105\n\tSYS_LISTEN                         = 106\n\tSYS_SIGSUSPEND                     = 111\n\tSYS_GETTIMEOFDAY                   = 116\n\tSYS_GETRUSAGE                      = 117\n\tSYS_GETSOCKOPT                     = 118\n\tSYS_READV                          = 120\n\tSYS_WRITEV                         = 121\n\tSYS_SETTIMEOFDAY                   = 122\n\tSYS_FCHOWN                         = 123\n\tSYS_FCHMOD                         = 124\n\tSYS_SETREUID                       = 126\n\tSYS_SETREGID                       = 127\n\tSYS_RENAME                         = 128\n\tSYS_FLOCK                          = 131\n\tSYS_MKFIFO                         = 132\n\tSYS_SENDTO                         = 133\n\tSYS_SHUTDOWN                       = 134\n\tSYS_SOCKETPAIR                     = 135\n\tSYS_MKDIR                          = 136\n\tSYS_RMDIR                          = 137\n\tSYS_UTIMES                         = 138\n\tSYS_FUTIMES                        = 139\n\tSYS_ADJTIME                        = 140\n\tSYS_GETHOSTUUID                    = 142\n\tSYS_SETSID                         = 147\n\tSYS_GETPGID                        = 151\n\tSYS_SETPRIVEXEC                    = 152\n\tSYS_PREAD                          = 153\n\tSYS_PWRITE                         = 154\n\tSYS_NFSSVC                         = 155\n\tSYS_STATFS                         = 157\n\tSYS_FSTATFS                        = 158\n\tSYS_UNMOUNT                        = 159\n\tSYS_GETFH                          = 161\n\tSYS_QUOTACTL                       = 165\n\tSYS_MOUNT                          = 167\n\tSYS_CSOPS                          = 169\n\tSYS_CSOPS_AUDITTOKEN               = 170\n\tSYS_WAITID                         = 173\n\tSYS_KDEBUG_TYPEFILTER              = 177\n\tSYS_KDEBUG_TRACE_STRING            = 178\n\tSYS_KDEBUG_TRACE64                 = 179\n\tSYS_KDEBUG_TRACE                   = 180\n\tSYS_SETGID                         = 181\n\tSYS_SETEGID                        = 182\n\tSYS_SETEUID                        = 183\n\tSYS_SIGRETURN                      = 184\n\tSYS_THREAD_SELFCOUNTS              = 186\n\tSYS_FDATASYNC                      = 187\n\tSYS_STAT                           = 188\n\tSYS_FSTAT                          = 189\n\tSYS_LSTAT                          = 190\n\tSYS_PATHCONF                       = 191\n\tSYS_FPATHCONF                      = 192\n\tSYS_GETRLIMIT                      = 194\n\tSYS_SETRLIMIT                      = 195\n\tSYS_GETDIRENTRIES                  = 196\n\tSYS_MMAP                           = 197\n\tSYS_LSEEK                          = 199\n\tSYS_TRUNCATE                       = 200\n\tSYS_FTRUNCATE                      = 201\n\tSYS_SYSCTL                         = 202\n\tSYS_MLOCK                          = 203\n\tSYS_MUNLOCK                        = 204\n\tSYS_UNDELETE                       = 205\n\tSYS_OPEN_DPROTECTED_NP             = 216\n\tSYS_GETATTRLIST                    = 220\n\tSYS_SETATTRLIST                    = 221\n\tSYS_GETDIRENTRIESATTR              = 222\n\tSYS_EXCHANGEDATA                   = 223\n\tSYS_SEARCHFS                       = 225\n\tSYS_DELETE                         = 226\n\tSYS_COPYFILE                       = 227\n\tSYS_FGETATTRLIST                   = 228\n\tSYS_FSETATTRLIST                   = 229\n\tSYS_POLL                           = 230\n\tSYS_WATCHEVENT                     = 231\n\tSYS_WAITEVENT                      = 232\n\tSYS_MODWATCH                       = 233\n\tSYS_GETXATTR                       = 234\n\tSYS_FGETXATTR                      = 235\n\tSYS_SETXATTR                       = 236\n\tSYS_FSETXATTR                      = 237\n\tSYS_REMOVEXATTR                    = 238\n\tSYS_FREMOVEXATTR                   = 239\n\tSYS_LISTXATTR                      = 240\n\tSYS_FLISTXATTR                     = 241\n\tSYS_FSCTL                          = 242\n\tSYS_INITGROUPS                     = 243\n\tSYS_POSIX_SPAWN                    = 244\n\tSYS_FFSCTL                         = 245\n\tSYS_NFSCLNT                        = 247\n\tSYS_FHOPEN                         = 248\n\tSYS_MINHERIT                       = 250\n\tSYS_SEMSYS                         = 251\n\tSYS_MSGSYS                         = 252\n\tSYS_SHMSYS                         = 253\n\tSYS_SEMCTL                         = 254\n\tSYS_SEMGET                         = 255\n\tSYS_SEMOP                          = 256\n\tSYS_MSGCTL                         = 258\n\tSYS_MSGGET                         = 259\n\tSYS_MSGSND                         = 260\n\tSYS_MSGRCV                         = 261\n\tSYS_SHMAT                          = 262\n\tSYS_SHMCTL                         = 263\n\tSYS_SHMDT                          = 264\n\tSYS_SHMGET                         = 265\n\tSYS_SHM_OPEN                       = 266\n\tSYS_SHM_UNLINK                     = 267\n\tSYS_SEM_OPEN                       = 268\n\tSYS_SEM_CLOSE                      = 269\n\tSYS_SEM_UNLINK                     = 270\n\tSYS_SEM_WAIT                       = 271\n\tSYS_SEM_TRYWAIT                    = 272\n\tSYS_SEM_POST                       = 273\n\tSYS_SYSCTLBYNAME                   = 274\n\tSYS_OPEN_EXTENDED                  = 277\n\tSYS_UMASK_EXTENDED                 = 278\n\tSYS_STAT_EXTENDED                  = 279\n\tSYS_LSTAT_EXTENDED                 = 280\n\tSYS_FSTAT_EXTENDED                 = 281\n\tSYS_CHMOD_EXTENDED                 = 282\n\tSYS_FCHMOD_EXTENDED                = 283\n\tSYS_ACCESS_EXTENDED                = 284\n\tSYS_SETTID                         = 285\n\tSYS_GETTID                         = 286\n\tSYS_SETSGROUPS                     = 287\n\tSYS_GETSGROUPS                     = 288\n\tSYS_SETWGROUPS                     = 289\n\tSYS_GETWGROUPS                     = 290\n\tSYS_MKFIFO_EXTENDED                = 291\n\tSYS_MKDIR_EXTENDED                 = 292\n\tSYS_IDENTITYSVC                    = 293\n\tSYS_SHARED_REGION_CHECK_NP         = 294\n\tSYS_VM_PRESSURE_MONITOR            = 296\n\tSYS_PSYNCH_RW_LONGRDLOCK           = 297\n\tSYS_PSYNCH_RW_YIELDWRLOCK          = 298\n\tSYS_PSYNCH_RW_DOWNGRADE            = 299\n\tSYS_PSYNCH_RW_UPGRADE              = 300\n\tSYS_PSYNCH_MUTEXWAIT               = 301\n\tSYS_PSYNCH_MUTEXDROP               = 302\n\tSYS_PSYNCH_CVBROAD                 = 303\n\tSYS_PSYNCH_CVSIGNAL                = 304\n\tSYS_PSYNCH_CVWAIT                  = 305\n\tSYS_PSYNCH_RW_RDLOCK               = 306\n\tSYS_PSYNCH_RW_WRLOCK               = 307\n\tSYS_PSYNCH_RW_UNLOCK               = 308\n\tSYS_PSYNCH_RW_UNLOCK2              = 309\n\tSYS_GETSID                         = 310\n\tSYS_SETTID_WITH_PID                = 311\n\tSYS_PSYNCH_CVCLRPREPOST            = 312\n\tSYS_AIO_FSYNC                      = 313\n\tSYS_AIO_RETURN                     = 314\n\tSYS_AIO_SUSPEND                    = 315\n\tSYS_AIO_CANCEL                     = 316\n\tSYS_AIO_ERROR                      = 317\n\tSYS_AIO_READ                       = 318\n\tSYS_AIO_WRITE                      = 319\n\tSYS_LIO_LISTIO                     = 320\n\tSYS_IOPOLICYSYS                    = 322\n\tSYS_PROCESS_POLICY                 = 323\n\tSYS_MLOCKALL                       = 324\n\tSYS_MUNLOCKALL                     = 325\n\tSYS_ISSETUGID                      = 327\n\tSYS___PTHREAD_KILL                 = 328\n\tSYS___PTHREAD_SIGMASK              = 329\n\tSYS___SIGWAIT                      = 330\n\tSYS___DISABLE_THREADSIGNAL         = 331\n\tSYS___PTHREAD_MARKCANCEL           = 332\n\tSYS___PTHREAD_CANCELED             = 333\n\tSYS___SEMWAIT_SIGNAL               = 334\n\tSYS_PROC_INFO                      = 336\n\tSYS_SENDFILE                       = 337\n\tSYS_STAT64                         = 338\n\tSYS_FSTAT64                        = 339\n\tSYS_LSTAT64                        = 340\n\tSYS_STAT64_EXTENDED                = 341\n\tSYS_LSTAT64_EXTENDED               = 342\n\tSYS_FSTAT64_EXTENDED               = 343\n\tSYS_GETDIRENTRIES64                = 344\n\tSYS_STATFS64                       = 345\n\tSYS_FSTATFS64                      = 346\n\tSYS_GETFSSTAT64                    = 347\n\tSYS___PTHREAD_CHDIR                = 348\n\tSYS___PTHREAD_FCHDIR               = 349\n\tSYS_AUDIT                          = 350\n\tSYS_AUDITON                        = 351\n\tSYS_GETAUID                        = 353\n\tSYS_SETAUID                        = 354\n\tSYS_GETAUDIT_ADDR                  = 357\n\tSYS_SETAUDIT_ADDR                  = 358\n\tSYS_AUDITCTL                       = 359\n\tSYS_BSDTHREAD_CREATE               = 360\n\tSYS_BSDTHREAD_TERMINATE            = 361\n\tSYS_KQUEUE                         = 362\n\tSYS_KEVENT                         = 363\n\tSYS_LCHOWN                         = 364\n\tSYS_BSDTHREAD_REGISTER             = 366\n\tSYS_WORKQ_OPEN                     = 367\n\tSYS_WORKQ_KERNRETURN               = 368\n\tSYS_KEVENT64                       = 369\n\tSYS___OLD_SEMWAIT_SIGNAL           = 370\n\tSYS___OLD_SEMWAIT_SIGNAL_NOCANCEL  = 371\n\tSYS_THREAD_SELFID                  = 372\n\tSYS_LEDGER                         = 373\n\tSYS_KEVENT_QOS                     = 374\n\tSYS_KEVENT_ID                      = 375\n\tSYS___MAC_EXECVE                   = 380\n\tSYS___MAC_SYSCALL                  = 381\n\tSYS___MAC_GET_FILE                 = 382\n\tSYS___MAC_SET_FILE                 = 383\n\tSYS___MAC_GET_LINK                 = 384\n\tSYS___MAC_SET_LINK                 = 385\n\tSYS___MAC_GET_PROC                 = 386\n\tSYS___MAC_SET_PROC                 = 387\n\tSYS___MAC_GET_FD                   = 388\n\tSYS___MAC_SET_FD                   = 389\n\tSYS___MAC_GET_PID                  = 390\n\tSYS_PSELECT                        = 394\n\tSYS_PSELECT_NOCANCEL               = 395\n\tSYS_READ_NOCANCEL                  = 396\n\tSYS_WRITE_NOCANCEL                 = 397\n\tSYS_OPEN_NOCANCEL                  = 398\n\tSYS_CLOSE_NOCANCEL                 = 399\n\tSYS_WAIT4_NOCANCEL                 = 400\n\tSYS_RECVMSG_NOCANCEL               = 401\n\tSYS_SENDMSG_NOCANCEL               = 402\n\tSYS_RECVFROM_NOCANCEL              = 403\n\tSYS_ACCEPT_NOCANCEL                = 404\n\tSYS_MSYNC_NOCANCEL                 = 405\n\tSYS_FCNTL_NOCANCEL                 = 406\n\tSYS_SELECT_NOCANCEL                = 407\n\tSYS_FSYNC_NOCANCEL                 = 408\n\tSYS_CONNECT_NOCANCEL               = 409\n\tSYS_SIGSUSPEND_NOCANCEL            = 410\n\tSYS_READV_NOCANCEL                 = 411\n\tSYS_WRITEV_NOCANCEL                = 412\n\tSYS_SENDTO_NOCANCEL                = 413\n\tSYS_PREAD_NOCANCEL                 = 414\n\tSYS_PWRITE_NOCANCEL                = 415\n\tSYS_WAITID_NOCANCEL                = 416\n\tSYS_POLL_NOCANCEL                  = 417\n\tSYS_MSGSND_NOCANCEL                = 418\n\tSYS_MSGRCV_NOCANCEL                = 419\n\tSYS_SEM_WAIT_NOCANCEL              = 420\n\tSYS_AIO_SUSPEND_NOCANCEL           = 421\n\tSYS___SIGWAIT_NOCANCEL             = 422\n\tSYS___SEMWAIT_SIGNAL_NOCANCEL      = 423\n\tSYS___MAC_MOUNT                    = 424\n\tSYS___MAC_GET_MOUNT                = 425\n\tSYS___MAC_GETFSSTAT                = 426\n\tSYS_FSGETPATH                      = 427\n\tSYS_AUDIT_SESSION_SELF             = 428\n\tSYS_AUDIT_SESSION_JOIN             = 429\n\tSYS_FILEPORT_MAKEPORT              = 430\n\tSYS_FILEPORT_MAKEFD                = 431\n\tSYS_AUDIT_SESSION_PORT             = 432\n\tSYS_PID_SUSPEND                    = 433\n\tSYS_PID_RESUME                     = 434\n\tSYS_PID_HIBERNATE                  = 435\n\tSYS_PID_SHUTDOWN_SOCKETS           = 436\n\tSYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438\n\tSYS_KAS_INFO                       = 439\n\tSYS_MEMORYSTATUS_CONTROL           = 440\n\tSYS_GUARDED_OPEN_NP                = 441\n\tSYS_GUARDED_CLOSE_NP               = 442\n\tSYS_GUARDED_KQUEUE_NP              = 443\n\tSYS_CHANGE_FDGUARD_NP              = 444\n\tSYS_USRCTL                         = 445\n\tSYS_PROC_RLIMIT_CONTROL            = 446\n\tSYS_CONNECTX                       = 447\n\tSYS_DISCONNECTX                    = 448\n\tSYS_PEELOFF                        = 449\n\tSYS_SOCKET_DELEGATE                = 450\n\tSYS_TELEMETRY                      = 451\n\tSYS_PROC_UUID_POLICY               = 452\n\tSYS_MEMORYSTATUS_GET_LEVEL         = 453\n\tSYS_SYSTEM_OVERRIDE                = 454\n\tSYS_VFS_PURGE                      = 455\n\tSYS_SFI_CTL                        = 456\n\tSYS_SFI_PIDCTL                     = 457\n\tSYS_COALITION                      = 458\n\tSYS_COALITION_INFO                 = 459\n\tSYS_NECP_MATCH_POLICY              = 460\n\tSYS_GETATTRLISTBULK                = 461\n\tSYS_CLONEFILEAT                    = 462\n\tSYS_OPENAT                         = 463\n\tSYS_OPENAT_NOCANCEL                = 464\n\tSYS_RENAMEAT                       = 465\n\tSYS_FACCESSAT                      = 466\n\tSYS_FCHMODAT                       = 467\n\tSYS_FCHOWNAT                       = 468\n\tSYS_FSTATAT                        = 469\n\tSYS_FSTATAT64                      = 470\n\tSYS_LINKAT                         = 471\n\tSYS_UNLINKAT                       = 472\n\tSYS_READLINKAT                     = 473\n\tSYS_SYMLINKAT                      = 474\n\tSYS_MKDIRAT                        = 475\n\tSYS_GETATTRLISTAT                  = 476\n\tSYS_PROC_TRACE_LOG                 = 477\n\tSYS_BSDTHREAD_CTL                  = 478\n\tSYS_OPENBYID_NP                    = 479\n\tSYS_RECVMSG_X                      = 480\n\tSYS_SENDMSG_X                      = 481\n\tSYS_THREAD_SELFUSAGE               = 482\n\tSYS_CSRCTL                         = 483\n\tSYS_GUARDED_OPEN_DPROTECTED_NP     = 484\n\tSYS_GUARDED_WRITE_NP               = 485\n\tSYS_GUARDED_PWRITE_NP              = 486\n\tSYS_GUARDED_WRITEV_NP              = 487\n\tSYS_RENAMEATX_NP                   = 488\n\tSYS_MREMAP_ENCRYPTED               = 489\n\tSYS_NETAGENT_TRIGGER               = 490\n\tSYS_STACK_SNAPSHOT_WITH_CONFIG     = 491\n\tSYS_MICROSTACKSHOT                 = 492\n\tSYS_GRAB_PGO_DATA                  = 493\n\tSYS_PERSONA                        = 494\n\tSYS_WORK_INTERVAL_CTL              = 499\n\tSYS_GETENTROPY                     = 500\n\tSYS_NECP_OPEN                      = 501\n\tSYS_NECP_CLIENT_ACTION             = 502\n\tSYS___NEXUS_OPEN                   = 503\n\tSYS___NEXUS_REGISTER               = 504\n\tSYS___NEXUS_DEREGISTER             = 505\n\tSYS___NEXUS_CREATE                 = 506\n\tSYS___NEXUS_DESTROY                = 507\n\tSYS___NEXUS_GET_OPT                = 508\n\tSYS___NEXUS_SET_OPT                = 509\n\tSYS___CHANNEL_OPEN                 = 510\n\tSYS___CHANNEL_GET_INFO             = 511\n\tSYS___CHANNEL_SYNC                 = 512\n\tSYS___CHANNEL_GET_OPT              = 513\n\tSYS___CHANNEL_SET_OPT              = 514\n\tSYS_ULOCK_WAIT                     = 515\n\tSYS_ULOCK_WAKE                     = 516\n\tSYS_FCLONEFILEAT                   = 517\n\tSYS_FS_SNAPSHOT                    = 518\n\tSYS_TERMINATE_WITH_PAYLOAD         = 520\n\tSYS_ABORT_WITH_PAYLOAD             = 521\n\tSYS_NECP_SESSION_OPEN              = 522\n\tSYS_NECP_SESSION_ACTION            = 523\n\tSYS_SETATTRLISTAT                  = 524\n\tSYS_NET_QOS_GUIDELINE              = 525\n\tSYS_FMOUNT                         = 526\n\tSYS_NTP_ADJTIME                    = 527\n\tSYS_NTP_GETTIME                    = 528\n\tSYS_OS_FAULT_WITH_PAYLOAD          = 529\n\tSYS_KQUEUE_WORKLOOP_CTL            = 530\n\tSYS___MACH_BRIDGE_REMOTE_TIME      = 531\n\tSYS_MAXSYSCALL                     = 532\n\tSYS_INVALID                        = 63\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go",
    "content": "// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && darwin\n\npackage unix\n\n// Deprecated: Use libSystem wrappers instead of direct syscalls.\nconst (\n\tSYS_SYSCALL                        = 0\n\tSYS_EXIT                           = 1\n\tSYS_FORK                           = 2\n\tSYS_READ                           = 3\n\tSYS_WRITE                          = 4\n\tSYS_OPEN                           = 5\n\tSYS_CLOSE                          = 6\n\tSYS_WAIT4                          = 7\n\tSYS_LINK                           = 9\n\tSYS_UNLINK                         = 10\n\tSYS_CHDIR                          = 12\n\tSYS_FCHDIR                         = 13\n\tSYS_MKNOD                          = 14\n\tSYS_CHMOD                          = 15\n\tSYS_CHOWN                          = 16\n\tSYS_GETFSSTAT                      = 18\n\tSYS_GETPID                         = 20\n\tSYS_SETUID                         = 23\n\tSYS_GETUID                         = 24\n\tSYS_GETEUID                        = 25\n\tSYS_PTRACE                         = 26\n\tSYS_RECVMSG                        = 27\n\tSYS_SENDMSG                        = 28\n\tSYS_RECVFROM                       = 29\n\tSYS_ACCEPT                         = 30\n\tSYS_GETPEERNAME                    = 31\n\tSYS_GETSOCKNAME                    = 32\n\tSYS_ACCESS                         = 33\n\tSYS_CHFLAGS                        = 34\n\tSYS_FCHFLAGS                       = 35\n\tSYS_SYNC                           = 36\n\tSYS_KILL                           = 37\n\tSYS_GETPPID                        = 39\n\tSYS_DUP                            = 41\n\tSYS_PIPE                           = 42\n\tSYS_GETEGID                        = 43\n\tSYS_SIGACTION                      = 46\n\tSYS_GETGID                         = 47\n\tSYS_SIGPROCMASK                    = 48\n\tSYS_GETLOGIN                       = 49\n\tSYS_SETLOGIN                       = 50\n\tSYS_ACCT                           = 51\n\tSYS_SIGPENDING                     = 52\n\tSYS_SIGALTSTACK                    = 53\n\tSYS_IOCTL                          = 54\n\tSYS_REBOOT                         = 55\n\tSYS_REVOKE                         = 56\n\tSYS_SYMLINK                        = 57\n\tSYS_READLINK                       = 58\n\tSYS_EXECVE                         = 59\n\tSYS_UMASK                          = 60\n\tSYS_CHROOT                         = 61\n\tSYS_MSYNC                          = 65\n\tSYS_VFORK                          = 66\n\tSYS_MUNMAP                         = 73\n\tSYS_MPROTECT                       = 74\n\tSYS_MADVISE                        = 75\n\tSYS_MINCORE                        = 78\n\tSYS_GETGROUPS                      = 79\n\tSYS_SETGROUPS                      = 80\n\tSYS_GETPGRP                        = 81\n\tSYS_SETPGID                        = 82\n\tSYS_SETITIMER                      = 83\n\tSYS_SWAPON                         = 85\n\tSYS_GETITIMER                      = 86\n\tSYS_GETDTABLESIZE                  = 89\n\tSYS_DUP2                           = 90\n\tSYS_FCNTL                          = 92\n\tSYS_SELECT                         = 93\n\tSYS_FSYNC                          = 95\n\tSYS_SETPRIORITY                    = 96\n\tSYS_SOCKET                         = 97\n\tSYS_CONNECT                        = 98\n\tSYS_GETPRIORITY                    = 100\n\tSYS_BIND                           = 104\n\tSYS_SETSOCKOPT                     = 105\n\tSYS_LISTEN                         = 106\n\tSYS_SIGSUSPEND                     = 111\n\tSYS_GETTIMEOFDAY                   = 116\n\tSYS_GETRUSAGE                      = 117\n\tSYS_GETSOCKOPT                     = 118\n\tSYS_READV                          = 120\n\tSYS_WRITEV                         = 121\n\tSYS_SETTIMEOFDAY                   = 122\n\tSYS_FCHOWN                         = 123\n\tSYS_FCHMOD                         = 124\n\tSYS_SETREUID                       = 126\n\tSYS_SETREGID                       = 127\n\tSYS_RENAME                         = 128\n\tSYS_FLOCK                          = 131\n\tSYS_MKFIFO                         = 132\n\tSYS_SENDTO                         = 133\n\tSYS_SHUTDOWN                       = 134\n\tSYS_SOCKETPAIR                     = 135\n\tSYS_MKDIR                          = 136\n\tSYS_RMDIR                          = 137\n\tSYS_UTIMES                         = 138\n\tSYS_FUTIMES                        = 139\n\tSYS_ADJTIME                        = 140\n\tSYS_GETHOSTUUID                    = 142\n\tSYS_SETSID                         = 147\n\tSYS_GETPGID                        = 151\n\tSYS_SETPRIVEXEC                    = 152\n\tSYS_PREAD                          = 153\n\tSYS_PWRITE                         = 154\n\tSYS_NFSSVC                         = 155\n\tSYS_STATFS                         = 157\n\tSYS_FSTATFS                        = 158\n\tSYS_UNMOUNT                        = 159\n\tSYS_GETFH                          = 161\n\tSYS_QUOTACTL                       = 165\n\tSYS_MOUNT                          = 167\n\tSYS_CSOPS                          = 169\n\tSYS_CSOPS_AUDITTOKEN               = 170\n\tSYS_WAITID                         = 173\n\tSYS_KDEBUG_TYPEFILTER              = 177\n\tSYS_KDEBUG_TRACE_STRING            = 178\n\tSYS_KDEBUG_TRACE64                 = 179\n\tSYS_KDEBUG_TRACE                   = 180\n\tSYS_SETGID                         = 181\n\tSYS_SETEGID                        = 182\n\tSYS_SETEUID                        = 183\n\tSYS_SIGRETURN                      = 184\n\tSYS_THREAD_SELFCOUNTS              = 186\n\tSYS_FDATASYNC                      = 187\n\tSYS_STAT                           = 188\n\tSYS_FSTAT                          = 189\n\tSYS_LSTAT                          = 190\n\tSYS_PATHCONF                       = 191\n\tSYS_FPATHCONF                      = 192\n\tSYS_GETRLIMIT                      = 194\n\tSYS_SETRLIMIT                      = 195\n\tSYS_GETDIRENTRIES                  = 196\n\tSYS_MMAP                           = 197\n\tSYS_LSEEK                          = 199\n\tSYS_TRUNCATE                       = 200\n\tSYS_FTRUNCATE                      = 201\n\tSYS_SYSCTL                         = 202\n\tSYS_MLOCK                          = 203\n\tSYS_MUNLOCK                        = 204\n\tSYS_UNDELETE                       = 205\n\tSYS_OPEN_DPROTECTED_NP             = 216\n\tSYS_GETATTRLIST                    = 220\n\tSYS_SETATTRLIST                    = 221\n\tSYS_GETDIRENTRIESATTR              = 222\n\tSYS_EXCHANGEDATA                   = 223\n\tSYS_SEARCHFS                       = 225\n\tSYS_DELETE                         = 226\n\tSYS_COPYFILE                       = 227\n\tSYS_FGETATTRLIST                   = 228\n\tSYS_FSETATTRLIST                   = 229\n\tSYS_POLL                           = 230\n\tSYS_WATCHEVENT                     = 231\n\tSYS_WAITEVENT                      = 232\n\tSYS_MODWATCH                       = 233\n\tSYS_GETXATTR                       = 234\n\tSYS_FGETXATTR                      = 235\n\tSYS_SETXATTR                       = 236\n\tSYS_FSETXATTR                      = 237\n\tSYS_REMOVEXATTR                    = 238\n\tSYS_FREMOVEXATTR                   = 239\n\tSYS_LISTXATTR                      = 240\n\tSYS_FLISTXATTR                     = 241\n\tSYS_FSCTL                          = 242\n\tSYS_INITGROUPS                     = 243\n\tSYS_POSIX_SPAWN                    = 244\n\tSYS_FFSCTL                         = 245\n\tSYS_NFSCLNT                        = 247\n\tSYS_FHOPEN                         = 248\n\tSYS_MINHERIT                       = 250\n\tSYS_SEMSYS                         = 251\n\tSYS_MSGSYS                         = 252\n\tSYS_SHMSYS                         = 253\n\tSYS_SEMCTL                         = 254\n\tSYS_SEMGET                         = 255\n\tSYS_SEMOP                          = 256\n\tSYS_MSGCTL                         = 258\n\tSYS_MSGGET                         = 259\n\tSYS_MSGSND                         = 260\n\tSYS_MSGRCV                         = 261\n\tSYS_SHMAT                          = 262\n\tSYS_SHMCTL                         = 263\n\tSYS_SHMDT                          = 264\n\tSYS_SHMGET                         = 265\n\tSYS_SHM_OPEN                       = 266\n\tSYS_SHM_UNLINK                     = 267\n\tSYS_SEM_OPEN                       = 268\n\tSYS_SEM_CLOSE                      = 269\n\tSYS_SEM_UNLINK                     = 270\n\tSYS_SEM_WAIT                       = 271\n\tSYS_SEM_TRYWAIT                    = 272\n\tSYS_SEM_POST                       = 273\n\tSYS_SYSCTLBYNAME                   = 274\n\tSYS_OPEN_EXTENDED                  = 277\n\tSYS_UMASK_EXTENDED                 = 278\n\tSYS_STAT_EXTENDED                  = 279\n\tSYS_LSTAT_EXTENDED                 = 280\n\tSYS_FSTAT_EXTENDED                 = 281\n\tSYS_CHMOD_EXTENDED                 = 282\n\tSYS_FCHMOD_EXTENDED                = 283\n\tSYS_ACCESS_EXTENDED                = 284\n\tSYS_SETTID                         = 285\n\tSYS_GETTID                         = 286\n\tSYS_SETSGROUPS                     = 287\n\tSYS_GETSGROUPS                     = 288\n\tSYS_SETWGROUPS                     = 289\n\tSYS_GETWGROUPS                     = 290\n\tSYS_MKFIFO_EXTENDED                = 291\n\tSYS_MKDIR_EXTENDED                 = 292\n\tSYS_IDENTITYSVC                    = 293\n\tSYS_SHARED_REGION_CHECK_NP         = 294\n\tSYS_VM_PRESSURE_MONITOR            = 296\n\tSYS_PSYNCH_RW_LONGRDLOCK           = 297\n\tSYS_PSYNCH_RW_YIELDWRLOCK          = 298\n\tSYS_PSYNCH_RW_DOWNGRADE            = 299\n\tSYS_PSYNCH_RW_UPGRADE              = 300\n\tSYS_PSYNCH_MUTEXWAIT               = 301\n\tSYS_PSYNCH_MUTEXDROP               = 302\n\tSYS_PSYNCH_CVBROAD                 = 303\n\tSYS_PSYNCH_CVSIGNAL                = 304\n\tSYS_PSYNCH_CVWAIT                  = 305\n\tSYS_PSYNCH_RW_RDLOCK               = 306\n\tSYS_PSYNCH_RW_WRLOCK               = 307\n\tSYS_PSYNCH_RW_UNLOCK               = 308\n\tSYS_PSYNCH_RW_UNLOCK2              = 309\n\tSYS_GETSID                         = 310\n\tSYS_SETTID_WITH_PID                = 311\n\tSYS_PSYNCH_CVCLRPREPOST            = 312\n\tSYS_AIO_FSYNC                      = 313\n\tSYS_AIO_RETURN                     = 314\n\tSYS_AIO_SUSPEND                    = 315\n\tSYS_AIO_CANCEL                     = 316\n\tSYS_AIO_ERROR                      = 317\n\tSYS_AIO_READ                       = 318\n\tSYS_AIO_WRITE                      = 319\n\tSYS_LIO_LISTIO                     = 320\n\tSYS_IOPOLICYSYS                    = 322\n\tSYS_PROCESS_POLICY                 = 323\n\tSYS_MLOCKALL                       = 324\n\tSYS_MUNLOCKALL                     = 325\n\tSYS_ISSETUGID                      = 327\n\tSYS___PTHREAD_KILL                 = 328\n\tSYS___PTHREAD_SIGMASK              = 329\n\tSYS___SIGWAIT                      = 330\n\tSYS___DISABLE_THREADSIGNAL         = 331\n\tSYS___PTHREAD_MARKCANCEL           = 332\n\tSYS___PTHREAD_CANCELED             = 333\n\tSYS___SEMWAIT_SIGNAL               = 334\n\tSYS_PROC_INFO                      = 336\n\tSYS_SENDFILE                       = 337\n\tSYS_STAT64                         = 338\n\tSYS_FSTAT64                        = 339\n\tSYS_LSTAT64                        = 340\n\tSYS_STAT64_EXTENDED                = 341\n\tSYS_LSTAT64_EXTENDED               = 342\n\tSYS_FSTAT64_EXTENDED               = 343\n\tSYS_GETDIRENTRIES64                = 344\n\tSYS_STATFS64                       = 345\n\tSYS_FSTATFS64                      = 346\n\tSYS_GETFSSTAT64                    = 347\n\tSYS___PTHREAD_CHDIR                = 348\n\tSYS___PTHREAD_FCHDIR               = 349\n\tSYS_AUDIT                          = 350\n\tSYS_AUDITON                        = 351\n\tSYS_GETAUID                        = 353\n\tSYS_SETAUID                        = 354\n\tSYS_GETAUDIT_ADDR                  = 357\n\tSYS_SETAUDIT_ADDR                  = 358\n\tSYS_AUDITCTL                       = 359\n\tSYS_BSDTHREAD_CREATE               = 360\n\tSYS_BSDTHREAD_TERMINATE            = 361\n\tSYS_KQUEUE                         = 362\n\tSYS_KEVENT                         = 363\n\tSYS_LCHOWN                         = 364\n\tSYS_BSDTHREAD_REGISTER             = 366\n\tSYS_WORKQ_OPEN                     = 367\n\tSYS_WORKQ_KERNRETURN               = 368\n\tSYS_KEVENT64                       = 369\n\tSYS___OLD_SEMWAIT_SIGNAL           = 370\n\tSYS___OLD_SEMWAIT_SIGNAL_NOCANCEL  = 371\n\tSYS_THREAD_SELFID                  = 372\n\tSYS_LEDGER                         = 373\n\tSYS_KEVENT_QOS                     = 374\n\tSYS_KEVENT_ID                      = 375\n\tSYS___MAC_EXECVE                   = 380\n\tSYS___MAC_SYSCALL                  = 381\n\tSYS___MAC_GET_FILE                 = 382\n\tSYS___MAC_SET_FILE                 = 383\n\tSYS___MAC_GET_LINK                 = 384\n\tSYS___MAC_SET_LINK                 = 385\n\tSYS___MAC_GET_PROC                 = 386\n\tSYS___MAC_SET_PROC                 = 387\n\tSYS___MAC_GET_FD                   = 388\n\tSYS___MAC_SET_FD                   = 389\n\tSYS___MAC_GET_PID                  = 390\n\tSYS_PSELECT                        = 394\n\tSYS_PSELECT_NOCANCEL               = 395\n\tSYS_READ_NOCANCEL                  = 396\n\tSYS_WRITE_NOCANCEL                 = 397\n\tSYS_OPEN_NOCANCEL                  = 398\n\tSYS_CLOSE_NOCANCEL                 = 399\n\tSYS_WAIT4_NOCANCEL                 = 400\n\tSYS_RECVMSG_NOCANCEL               = 401\n\tSYS_SENDMSG_NOCANCEL               = 402\n\tSYS_RECVFROM_NOCANCEL              = 403\n\tSYS_ACCEPT_NOCANCEL                = 404\n\tSYS_MSYNC_NOCANCEL                 = 405\n\tSYS_FCNTL_NOCANCEL                 = 406\n\tSYS_SELECT_NOCANCEL                = 407\n\tSYS_FSYNC_NOCANCEL                 = 408\n\tSYS_CONNECT_NOCANCEL               = 409\n\tSYS_SIGSUSPEND_NOCANCEL            = 410\n\tSYS_READV_NOCANCEL                 = 411\n\tSYS_WRITEV_NOCANCEL                = 412\n\tSYS_SENDTO_NOCANCEL                = 413\n\tSYS_PREAD_NOCANCEL                 = 414\n\tSYS_PWRITE_NOCANCEL                = 415\n\tSYS_WAITID_NOCANCEL                = 416\n\tSYS_POLL_NOCANCEL                  = 417\n\tSYS_MSGSND_NOCANCEL                = 418\n\tSYS_MSGRCV_NOCANCEL                = 419\n\tSYS_SEM_WAIT_NOCANCEL              = 420\n\tSYS_AIO_SUSPEND_NOCANCEL           = 421\n\tSYS___SIGWAIT_NOCANCEL             = 422\n\tSYS___SEMWAIT_SIGNAL_NOCANCEL      = 423\n\tSYS___MAC_MOUNT                    = 424\n\tSYS___MAC_GET_MOUNT                = 425\n\tSYS___MAC_GETFSSTAT                = 426\n\tSYS_FSGETPATH                      = 427\n\tSYS_AUDIT_SESSION_SELF             = 428\n\tSYS_AUDIT_SESSION_JOIN             = 429\n\tSYS_FILEPORT_MAKEPORT              = 430\n\tSYS_FILEPORT_MAKEFD                = 431\n\tSYS_AUDIT_SESSION_PORT             = 432\n\tSYS_PID_SUSPEND                    = 433\n\tSYS_PID_RESUME                     = 434\n\tSYS_PID_HIBERNATE                  = 435\n\tSYS_PID_SHUTDOWN_SOCKETS           = 436\n\tSYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438\n\tSYS_KAS_INFO                       = 439\n\tSYS_MEMORYSTATUS_CONTROL           = 440\n\tSYS_GUARDED_OPEN_NP                = 441\n\tSYS_GUARDED_CLOSE_NP               = 442\n\tSYS_GUARDED_KQUEUE_NP              = 443\n\tSYS_CHANGE_FDGUARD_NP              = 444\n\tSYS_USRCTL                         = 445\n\tSYS_PROC_RLIMIT_CONTROL            = 446\n\tSYS_CONNECTX                       = 447\n\tSYS_DISCONNECTX                    = 448\n\tSYS_PEELOFF                        = 449\n\tSYS_SOCKET_DELEGATE                = 450\n\tSYS_TELEMETRY                      = 451\n\tSYS_PROC_UUID_POLICY               = 452\n\tSYS_MEMORYSTATUS_GET_LEVEL         = 453\n\tSYS_SYSTEM_OVERRIDE                = 454\n\tSYS_VFS_PURGE                      = 455\n\tSYS_SFI_CTL                        = 456\n\tSYS_SFI_PIDCTL                     = 457\n\tSYS_COALITION                      = 458\n\tSYS_COALITION_INFO                 = 459\n\tSYS_NECP_MATCH_POLICY              = 460\n\tSYS_GETATTRLISTBULK                = 461\n\tSYS_CLONEFILEAT                    = 462\n\tSYS_OPENAT                         = 463\n\tSYS_OPENAT_NOCANCEL                = 464\n\tSYS_RENAMEAT                       = 465\n\tSYS_FACCESSAT                      = 466\n\tSYS_FCHMODAT                       = 467\n\tSYS_FCHOWNAT                       = 468\n\tSYS_FSTATAT                        = 469\n\tSYS_FSTATAT64                      = 470\n\tSYS_LINKAT                         = 471\n\tSYS_UNLINKAT                       = 472\n\tSYS_READLINKAT                     = 473\n\tSYS_SYMLINKAT                      = 474\n\tSYS_MKDIRAT                        = 475\n\tSYS_GETATTRLISTAT                  = 476\n\tSYS_PROC_TRACE_LOG                 = 477\n\tSYS_BSDTHREAD_CTL                  = 478\n\tSYS_OPENBYID_NP                    = 479\n\tSYS_RECVMSG_X                      = 480\n\tSYS_SENDMSG_X                      = 481\n\tSYS_THREAD_SELFUSAGE               = 482\n\tSYS_CSRCTL                         = 483\n\tSYS_GUARDED_OPEN_DPROTECTED_NP     = 484\n\tSYS_GUARDED_WRITE_NP               = 485\n\tSYS_GUARDED_PWRITE_NP              = 486\n\tSYS_GUARDED_WRITEV_NP              = 487\n\tSYS_RENAMEATX_NP                   = 488\n\tSYS_MREMAP_ENCRYPTED               = 489\n\tSYS_NETAGENT_TRIGGER               = 490\n\tSYS_STACK_SNAPSHOT_WITH_CONFIG     = 491\n\tSYS_MICROSTACKSHOT                 = 492\n\tSYS_GRAB_PGO_DATA                  = 493\n\tSYS_PERSONA                        = 494\n\tSYS_WORK_INTERVAL_CTL              = 499\n\tSYS_GETENTROPY                     = 500\n\tSYS_NECP_OPEN                      = 501\n\tSYS_NECP_CLIENT_ACTION             = 502\n\tSYS___NEXUS_OPEN                   = 503\n\tSYS___NEXUS_REGISTER               = 504\n\tSYS___NEXUS_DEREGISTER             = 505\n\tSYS___NEXUS_CREATE                 = 506\n\tSYS___NEXUS_DESTROY                = 507\n\tSYS___NEXUS_GET_OPT                = 508\n\tSYS___NEXUS_SET_OPT                = 509\n\tSYS___CHANNEL_OPEN                 = 510\n\tSYS___CHANNEL_GET_INFO             = 511\n\tSYS___CHANNEL_SYNC                 = 512\n\tSYS___CHANNEL_GET_OPT              = 513\n\tSYS___CHANNEL_SET_OPT              = 514\n\tSYS_ULOCK_WAIT                     = 515\n\tSYS_ULOCK_WAKE                     = 516\n\tSYS_FCLONEFILEAT                   = 517\n\tSYS_FS_SNAPSHOT                    = 518\n\tSYS_TERMINATE_WITH_PAYLOAD         = 520\n\tSYS_ABORT_WITH_PAYLOAD             = 521\n\tSYS_NECP_SESSION_OPEN              = 522\n\tSYS_NECP_SESSION_ACTION            = 523\n\tSYS_SETATTRLISTAT                  = 524\n\tSYS_NET_QOS_GUIDELINE              = 525\n\tSYS_FMOUNT                         = 526\n\tSYS_NTP_ADJTIME                    = 527\n\tSYS_NTP_GETTIME                    = 528\n\tSYS_OS_FAULT_WITH_PAYLOAD          = 529\n\tSYS_MAXSYSCALL                     = 530\n\tSYS_INVALID                        = 63\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go",
    "content": "// go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && dragonfly\n\npackage unix\n\nconst (\n\tSYS_EXIT  = 1 // { void exit(int rval); }\n\tSYS_FORK  = 2 // { int fork(void); }\n\tSYS_READ  = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN  = 5 // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE = 6 // { int close(int fd); }\n\tSYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int\n\t// SYS_NOSYS = 8;  // { int nosys(void); } __nosys nosys_args int\n\tSYS_LINK                   = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                 = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                  = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                 = 13  // { int fchdir(int fd); }\n\tSYS_MKNOD                  = 14  // { int mknod(char *path, int mode, int dev); }\n\tSYS_CHMOD                  = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                  = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_OBREAK                 = 17  // { int obreak(char *nsize); } break obreak_args int\n\tSYS_GETFSSTAT              = 18  // { int getfsstat(struct statfs *buf, long bufsize, int flags); }\n\tSYS_GETPID                 = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                  = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                 = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                 = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                 = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                = 28  // { int sendmsg(int s, caddr_t msg, int flags); }\n\tSYS_RECVFROM               = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }\n\tSYS_ACCEPT                 = 30  // { int accept(int s, caddr_t name, int *anamelen); }\n\tSYS_GETPEERNAME            = 31  // { int getpeername(int fdes, caddr_t asa, int *alen); }\n\tSYS_GETSOCKNAME            = 32  // { int getsockname(int fdes, caddr_t asa, int *alen); }\n\tSYS_ACCESS                 = 33  // { int access(char *path, int flags); }\n\tSYS_CHFLAGS                = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS               = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                   = 36  // { int sync(void); }\n\tSYS_KILL                   = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                = 39  // { pid_t getppid(void); }\n\tSYS_DUP                    = 41  // { int dup(int fd); }\n\tSYS_PIPE                   = 42  // { int pipe(void); }\n\tSYS_GETEGID                = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                 = 44  // { int profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE                 = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                 = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN               = 49  // { int getlogin(char *namebuf, size_t namelen); }\n\tSYS_SETLOGIN               = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                   = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK            = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                  = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                 = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                 = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK               = 58  // { int readlink(char *path, char *buf, int count); }\n\tSYS_EXECVE                 = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                  = 60  // { int umask(int newmask); } umask umask_args int\n\tSYS_CHROOT                 = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                  = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                  = 66  // { pid_t vfork(void); }\n\tSYS_SBRK                   = 69  // { caddr_t sbrk(size_t incr); }\n\tSYS_SSTK                   = 70  // { int sstk(size_t incr); }\n\tSYS_MUNMAP                 = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT               = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS              = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS              = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER              = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                 = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER              = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE          = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                   = 90  // { int dup2(int from, int to); }\n\tSYS_FCNTL                  = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                 = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                  = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY            = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                 = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY            = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                   = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT             = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                 = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY           = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE              = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT             = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                  = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                 = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY           = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                 = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                 = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID               = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID               = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                 = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                  = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                 = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                 = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN               = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR             = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                  = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                  = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                 = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                 = 147 // { int setsid(void); }\n\tSYS_QUOTACTL               = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_STATFS                 = 157 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                = 158 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFH                  = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                 = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_EXTPREAD               = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }\n\tSYS_EXTPWRITE              = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }\n\tSYS_NTP_ADJTIME            = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                 = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF               = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF              = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT              = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT              = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS_MMAP                   = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }\n\tSYS_LSEEK                  = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE               = 200 // { int truncate(char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE              = 201 // { int ftruncate(int fd, int pad, off_t length); }\n\tSYS___SYSCTL               = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                  = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE               = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                   = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS___SEMCTL               = 220 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SEMGET                 = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                  = 222 // { int semop(int semid, struct sembuf *sops, u_int nsops); }\n\tSYS_MSGCTL                 = 224 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_MSGGET                 = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                 = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                 = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                  = 228 // { caddr_t shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMCTL                 = 229 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_SHMDT                  = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                 = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME          = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME          = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES           = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_NANOSLEEP              = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_MINHERIT               = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                  = 251 // { int rfork(int flags); }\n\tSYS_OPENBSD_POLL           = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID              = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                 = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_LCHMOD                 = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_EXTPREADV              = 289 // { ssize_t extpreadv(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }\n\tSYS_EXTPWRITEV             = 290 // { ssize_t extpwritev(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); }\n\tSYS_FHSTATFS               = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_FHOPEN                 = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT               = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD              = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }\n\tSYS_KLDFIRSTMOD            = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                 = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID              = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID              = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN             = 314 // { int aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND            = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL             = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR              = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_AIO_READ               = 318 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE              = 319 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO             = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_YIELD                  = 321 // { int yield(void); }\n\tSYS_MLOCKALL               = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL             = 325 // { int munlockall(void); }\n\tSYS___GETCWD               = 326 // { int __getcwd(u_char *buf, u_int buflen); }\n\tSYS_SCHED_SETPARAM         = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM         = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER     = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER     = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD            = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL  = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                 = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                 = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                   = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK            = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND             = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGACTION              = 342 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGPENDING             = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGRETURN              = 344 // { int sigreturn(ucontext_t *sigcntxp); }\n\tSYS_SIGTIMEDWAIT           = 345 // { int sigtimedwait(const sigset_t *set,siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO            = 346 // { int sigwaitinfo(const sigset_t *set,siginfo_t *info); }\n\tSYS___ACL_GET_FILE         = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE         = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD           = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD           = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE      = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD        = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE    = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD      = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL             = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE       = 356 // { int extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE       = 357 // { int extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE    = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE       = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID              = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID              = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                 = 362 // { int kqueue(void); }\n\tSYS_KEVENT                 = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_KENV                   = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS               = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE               = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_VARSYM_SET             = 450 // { int varsym_set(int level, const char *name, const char *data); }\n\tSYS_VARSYM_GET             = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }\n\tSYS_VARSYM_LIST            = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }\n\tSYS_EXEC_SYS_REGISTER      = 465 // { int exec_sys_register(void *entry); }\n\tSYS_EXEC_SYS_UNREGISTER    = 466 // { int exec_sys_unregister(int id); }\n\tSYS_SYS_CHECKPOINT         = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }\n\tSYS_MOUNTCTL               = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }\n\tSYS_UMTX_SLEEP             = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }\n\tSYS_UMTX_WAKEUP            = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }\n\tSYS_JAIL_ATTACH            = 471 // { int jail_attach(int jid); }\n\tSYS_SET_TLS_AREA           = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }\n\tSYS_GET_TLS_AREA           = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }\n\tSYS_CLOSEFROM              = 474 // { int closefrom(int fd); }\n\tSYS_STAT                   = 475 // { int stat(const char *path, struct stat *ub); }\n\tSYS_FSTAT                  = 476 // { int fstat(int fd, struct stat *sb); }\n\tSYS_LSTAT                  = 477 // { int lstat(const char *path, struct stat *ub); }\n\tSYS_FHSTAT                 = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES          = 479 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }\n\tSYS_GETDENTS               = 480 // { int getdents(int fd, char *buf, size_t count); }\n\tSYS_USCHED_SET             = 481 // { int usched_set(pid_t pid, int cmd, void *data, int bytes); }\n\tSYS_EXTACCEPT              = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }\n\tSYS_EXTCONNECT             = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }\n\tSYS_MCONTROL               = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }\n\tSYS_VMSPACE_CREATE         = 486 // { int vmspace_create(void *id, int type, void *data); }\n\tSYS_VMSPACE_DESTROY        = 487 // { int vmspace_destroy(void *id); }\n\tSYS_VMSPACE_CTL            = 488 // { int vmspace_ctl(void *id, int cmd, \t\tstruct trapframe *tframe,\tstruct vextframe *vframe); }\n\tSYS_VMSPACE_MMAP           = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, int prot, int flags, int fd, off_t offset); }\n\tSYS_VMSPACE_MUNMAP         = 490 // { int vmspace_munmap(void *id, void *addr,\tsize_t len); }\n\tSYS_VMSPACE_MCONTROL       = 491 // { int vmspace_mcontrol(void *id, void *addr, \tsize_t len, int behav, off_t value); }\n\tSYS_VMSPACE_PREAD          = 492 // { ssize_t vmspace_pread(void *id, void *buf, size_t nbyte, int flags, off_t offset); }\n\tSYS_VMSPACE_PWRITE         = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, size_t nbyte, int flags, off_t offset); }\n\tSYS_EXTEXIT                = 494 // { void extexit(int how, int status, void *addr); }\n\tSYS_LWP_CREATE             = 495 // { int lwp_create(struct lwp_params *params); }\n\tSYS_LWP_GETTID             = 496 // { lwpid_t lwp_gettid(void); }\n\tSYS_LWP_KILL               = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }\n\tSYS_LWP_RTPRIO             = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }\n\tSYS_PSELECT                = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts,    const sigset_t *sigmask); }\n\tSYS_STATVFS                = 500 // { int statvfs(const char *path, struct statvfs *buf); }\n\tSYS_FSTATVFS               = 501 // { int fstatvfs(int fd, struct statvfs *buf); }\n\tSYS_FHSTATVFS              = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }\n\tSYS_GETVFSSTAT             = 503 // { int getvfsstat(struct statfs *buf,          struct statvfs *vbuf, long vbufsize, int flags); }\n\tSYS_OPENAT                 = 504 // { int openat(int fd, char *path, int flags, int mode); }\n\tSYS_FSTATAT                = 505 // { int fstatat(int fd, char *path, \tstruct stat *sb, int flags); }\n\tSYS_FCHMODAT               = 506 // { int fchmodat(int fd, char *path, int mode, int flags); }\n\tSYS_FCHOWNAT               = 507 // { int fchownat(int fd, char *path, int uid, int gid, int flags); }\n\tSYS_UNLINKAT               = 508 // { int unlinkat(int fd, char *path, int flags); }\n\tSYS_FACCESSAT              = 509 // { int faccessat(int fd, char *path, int amode, int flags); }\n\tSYS_MQ_OPEN                = 510 // { mqd_t mq_open(const char * name, int oflag, mode_t mode, struct mq_attr *attr); }\n\tSYS_MQ_CLOSE               = 511 // { int mq_close(mqd_t mqdes); }\n\tSYS_MQ_UNLINK              = 512 // { int mq_unlink(const char *name); }\n\tSYS_MQ_GETATTR             = 513 // { int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); }\n\tSYS_MQ_SETATTR             = 514 // { int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat); }\n\tSYS_MQ_NOTIFY              = 515 // { int mq_notify(mqd_t mqdes, const struct sigevent *notification); }\n\tSYS_MQ_SEND                = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); }\n\tSYS_MQ_RECEIVE             = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); }\n\tSYS_MQ_TIMEDSEND           = 518 // { int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_MQ_TIMEDRECEIVE        = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_IOPRIO_SET             = 520 // { int ioprio_set(int which, int who, int prio); }\n\tSYS_IOPRIO_GET             = 521 // { int ioprio_get(int which, int who); }\n\tSYS_CHROOT_KERNEL          = 522 // { int chroot_kernel(char *path); }\n\tSYS_RENAMEAT               = 523 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_MKDIRAT                = 524 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT               = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_MKNODAT                = 526 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_READLINKAT             = 527 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_SYMLINKAT              = 528 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_SWAPOFF                = 529 // { int swapoff(char *name); }\n\tSYS_VQUOTACTL              = 530 // { int vquotactl(const char *path, struct plistref *pref); }\n\tSYS_LINKAT                 = 531 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flags); }\n\tSYS_EACCESS                = 532 // { int eaccess(char *path, int flags); }\n\tSYS_LPATHCONF              = 533 // { int lpathconf(char *path, int name); }\n\tSYS_VMM_GUEST_CTL          = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }\n\tSYS_VMM_GUEST_SYNC_ADDR    = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }\n\tSYS_PROCCTL                = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); }\n\tSYS_CHFLAGSAT              = 537 // { int chflagsat(int fd, const char *path, u_long flags, int atflags);}\n\tSYS_PIPE2                  = 538 // { int pipe2(int *fildes, int flags); }\n\tSYS_UTIMENSAT              = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }\n\tSYS_FUTIMENS               = 540 // { int futimens(int fd, const struct timespec *ts); }\n\tSYS_ACCEPT4                = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); }\n\tSYS_LWP_SETNAME            = 542 // { int lwp_setname(lwpid_t tid, const char *name); }\n\tSYS_PPOLL                  = 543 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *sigmask); }\n\tSYS_LWP_SETAFFINITY        = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }\n\tSYS_LWP_GETAFFINITY        = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }\n\tSYS_LWP_CREATE2            = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }\n\tSYS_GETCPUCLOCKID          = 547 // { int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); }\n\tSYS_WAIT6                  = 548 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_LWP_GETNAME            = 549 // { int lwp_getname(lwpid_t tid, char *name, size_t len); }\n\tSYS_GETRANDOM              = 550 // { ssize_t getrandom(void *buf, size_t len, unsigned flags); }\n\tSYS___REALPATH             = 551 // { ssize_t __realpath(const char *path, char *buf, size_t len); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go",
    "content": "// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && freebsd\n\npackage unix\n\nconst (\n\t// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int\n\tSYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void\n\tSYS_FORK                     = 2   // { int fork(void); }\n\tSYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE                    = 6   // { int close(int fd); }\n\tSYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }\n\tSYS_LINK                     = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                   = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                    = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                   = 13  // { int fchdir(int fd); }\n\tSYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_BREAK                    = 17  // { caddr_t break(char *nsize); }\n\tSYS_GETPID                   = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                   = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                   = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                  = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }\n\tSYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }\n\tSYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_ACCESS                   = 33  // { int access(char *path, int amode); }\n\tSYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                     = 36  // { int sync(void); }\n\tSYS_KILL                     = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                  = 39  // { pid_t getppid(void); }\n\tSYS_DUP                      = 41  // { int dup(u_int fd); }\n\tSYS_GETEGID                  = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }\n\tSYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                   = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }\n\tSYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                     = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                   = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                   = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }\n\tSYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                    = 60  // { int umask(int newmask); }\n\tSYS_CHROOT                   = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                    = 66  // { int vfork(void); }\n\tSYS_SBRK                     = 69  // { int sbrk(int incr); }\n\tSYS_SSTK                     = 70  // { int sstk(int incr); }\n\tSYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                  = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                   = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }\n\tSYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                    = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                   = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                   = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                    = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                    = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                   = 147 // { int setsid(void); }\n\tSYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }\n\tSYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }\n\tSYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }\n\tSYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }\n\tSYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }\n\tSYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }\n\tSYS_SETFIB                   = 175 // { int setfib(int fibnum); }\n\tSYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                   = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                  = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE                 = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }\n\tSYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }\n\tSYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }\n\tSYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }\n\tSYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }\n\tSYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }\n\tSYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }\n\tSYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }\n\tSYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                    = 251 // { int rfork(int flags); }\n\tSYS_ISSETUGID                = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                  = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT                 = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                  = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                  = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                  = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }\n\tSYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                   = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_YIELD                    = 321 // { int yield(void); }\n\tSYS_MLOCKALL                 = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL               = 325 // { int munlockall(void); }\n\tSYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }\n\tSYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD              = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                     = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }\n\tSYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                   = 362 // { int kqueue(void); }\n\tSYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS___SETUGID                = 374 // { int __setugid(int flag); }\n\tSYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }\n\tSYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }\n\tSYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }\n\tSYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }\n\tSYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }\n\tSYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }\n\tSYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }\n\tSYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }\n\tSYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }\n\tSYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }\n\tSYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }\n\tSYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }\n\tSYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }\n\tSYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }\n\tSYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }\n\tSYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }\n\tSYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }\n\tSYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }\n\tSYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }\n\tSYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }\n\tSYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }\n\tSYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }\n\tSYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }\n\tSYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }\n\tSYS_THR_SELF                 = 432 // { int thr_self(long *id); }\n\tSYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }\n\tSYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }\n\tSYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }\n\tSYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }\n\tSYS_THR_WAKE                 = 443 // { int thr_wake(long id); }\n\tSYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }\n\tSYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }\n\tSYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }\n\tSYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }\n\tSYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }\n\tSYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }\n\tSYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }\n\tSYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_AUDITCTL                 = 453 // { int auditctl(char *path); }\n\tSYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }\n\tSYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }\n\tSYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }\n\tSYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }\n\tSYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }\n\tSYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }\n\tSYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }\n\tSYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }\n\tSYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }\n\tSYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }\n\tSYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }\n\tSYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }\n\tSYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }\n\tSYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }\n\tSYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }\n\tSYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }\n\tSYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }\n\tSYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }\n\tSYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }\n\tSYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }\n\tSYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }\n\tSYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }\n\tSYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }\n\tSYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }\n\tSYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }\n\tSYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }\n\tSYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }\n\tSYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }\n\tSYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }\n\tSYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }\n\tSYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }\n\tSYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }\n\tSYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }\n\tSYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }\n\tSYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }\n\tSYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }\n\tSYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }\n\tSYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }\n\tSYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_ENTER                = 516 // { int cap_enter(void); }\n\tSYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }\n\tSYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }\n\tSYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }\n\tSYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }\n\tSYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }\n\tSYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }\n\tSYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }\n\tSYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }\n\tSYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }\n\tSYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }\n\tSYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }\n\tSYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }\n\tSYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }\n\tSYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }\n\tSYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }\n\tSYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }\n\tSYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }\n\tSYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }\n\tSYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }\n\tSYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }\n\tSYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }\n\tSYS_FDATASYNC                = 550 // { int fdatasync(int fd); }\n\tSYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }\n\tSYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }\n\tSYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }\n\tSYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }\n\tSYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }\n\tSYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }\n\tSYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }\n\tSYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }\n\tSYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }\n\tSYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }\n\tSYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }\n\tSYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go",
    "content": "// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && freebsd\n\npackage unix\n\nconst (\n\t// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int\n\tSYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void\n\tSYS_FORK                     = 2   // { int fork(void); }\n\tSYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE                    = 6   // { int close(int fd); }\n\tSYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }\n\tSYS_LINK                     = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                   = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                    = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                   = 13  // { int fchdir(int fd); }\n\tSYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_BREAK                    = 17  // { caddr_t break(char *nsize); }\n\tSYS_GETPID                   = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                   = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                   = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                  = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }\n\tSYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }\n\tSYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_ACCESS                   = 33  // { int access(char *path, int amode); }\n\tSYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                     = 36  // { int sync(void); }\n\tSYS_KILL                     = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                  = 39  // { pid_t getppid(void); }\n\tSYS_DUP                      = 41  // { int dup(u_int fd); }\n\tSYS_GETEGID                  = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }\n\tSYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                   = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }\n\tSYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                     = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                   = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                   = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }\n\tSYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                    = 60  // { int umask(int newmask); }\n\tSYS_CHROOT                   = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                    = 66  // { int vfork(void); }\n\tSYS_SBRK                     = 69  // { int sbrk(int incr); }\n\tSYS_SSTK                     = 70  // { int sstk(int incr); }\n\tSYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                  = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                   = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }\n\tSYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                    = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                   = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                   = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                    = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                    = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                   = 147 // { int setsid(void); }\n\tSYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }\n\tSYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }\n\tSYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }\n\tSYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }\n\tSYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }\n\tSYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }\n\tSYS_SETFIB                   = 175 // { int setfib(int fibnum); }\n\tSYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                   = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                  = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE                 = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }\n\tSYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }\n\tSYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }\n\tSYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }\n\tSYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }\n\tSYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }\n\tSYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }\n\tSYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }\n\tSYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                    = 251 // { int rfork(int flags); }\n\tSYS_ISSETUGID                = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                  = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT                 = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                  = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                  = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                  = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }\n\tSYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                   = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_YIELD                    = 321 // { int yield(void); }\n\tSYS_MLOCKALL                 = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL               = 325 // { int munlockall(void); }\n\tSYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }\n\tSYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD              = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                     = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }\n\tSYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                   = 362 // { int kqueue(void); }\n\tSYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS___SETUGID                = 374 // { int __setugid(int flag); }\n\tSYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }\n\tSYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }\n\tSYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }\n\tSYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }\n\tSYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }\n\tSYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }\n\tSYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }\n\tSYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }\n\tSYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }\n\tSYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }\n\tSYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }\n\tSYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }\n\tSYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }\n\tSYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }\n\tSYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }\n\tSYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }\n\tSYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }\n\tSYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }\n\tSYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }\n\tSYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }\n\tSYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }\n\tSYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }\n\tSYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }\n\tSYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }\n\tSYS_THR_SELF                 = 432 // { int thr_self(long *id); }\n\tSYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }\n\tSYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }\n\tSYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }\n\tSYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }\n\tSYS_THR_WAKE                 = 443 // { int thr_wake(long id); }\n\tSYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }\n\tSYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }\n\tSYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }\n\tSYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }\n\tSYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }\n\tSYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }\n\tSYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }\n\tSYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_AUDITCTL                 = 453 // { int auditctl(char *path); }\n\tSYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }\n\tSYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }\n\tSYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }\n\tSYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }\n\tSYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }\n\tSYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }\n\tSYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }\n\tSYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }\n\tSYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }\n\tSYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }\n\tSYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }\n\tSYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }\n\tSYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }\n\tSYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }\n\tSYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }\n\tSYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }\n\tSYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }\n\tSYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }\n\tSYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }\n\tSYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }\n\tSYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }\n\tSYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }\n\tSYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }\n\tSYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }\n\tSYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }\n\tSYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }\n\tSYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }\n\tSYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }\n\tSYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }\n\tSYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }\n\tSYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }\n\tSYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }\n\tSYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }\n\tSYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }\n\tSYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }\n\tSYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }\n\tSYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }\n\tSYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }\n\tSYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_ENTER                = 516 // { int cap_enter(void); }\n\tSYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }\n\tSYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }\n\tSYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }\n\tSYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }\n\tSYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }\n\tSYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }\n\tSYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }\n\tSYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }\n\tSYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }\n\tSYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }\n\tSYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }\n\tSYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }\n\tSYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }\n\tSYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }\n\tSYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }\n\tSYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }\n\tSYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }\n\tSYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }\n\tSYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }\n\tSYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }\n\tSYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }\n\tSYS_FDATASYNC                = 550 // { int fdatasync(int fd); }\n\tSYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }\n\tSYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }\n\tSYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }\n\tSYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }\n\tSYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }\n\tSYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }\n\tSYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }\n\tSYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }\n\tSYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }\n\tSYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }\n\tSYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }\n\tSYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go",
    "content": "// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && freebsd\n\npackage unix\n\nconst (\n\t// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int\n\tSYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void\n\tSYS_FORK                     = 2   // { int fork(void); }\n\tSYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE                    = 6   // { int close(int fd); }\n\tSYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }\n\tSYS_LINK                     = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                   = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                    = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                   = 13  // { int fchdir(int fd); }\n\tSYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_BREAK                    = 17  // { caddr_t break(char *nsize); }\n\tSYS_GETPID                   = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                   = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                   = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                  = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }\n\tSYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }\n\tSYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_ACCESS                   = 33  // { int access(char *path, int amode); }\n\tSYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                     = 36  // { int sync(void); }\n\tSYS_KILL                     = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                  = 39  // { pid_t getppid(void); }\n\tSYS_DUP                      = 41  // { int dup(u_int fd); }\n\tSYS_GETEGID                  = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }\n\tSYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                   = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }\n\tSYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                     = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                   = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                   = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }\n\tSYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                    = 60  // { int umask(int newmask); }\n\tSYS_CHROOT                   = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                    = 66  // { int vfork(void); }\n\tSYS_SBRK                     = 69  // { int sbrk(int incr); }\n\tSYS_SSTK                     = 70  // { int sstk(int incr); }\n\tSYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                  = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                   = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }\n\tSYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                    = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                   = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                   = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                    = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                    = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                   = 147 // { int setsid(void); }\n\tSYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }\n\tSYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }\n\tSYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }\n\tSYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }\n\tSYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }\n\tSYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }\n\tSYS_SETFIB                   = 175 // { int setfib(int fibnum); }\n\tSYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                   = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                  = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE                 = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }\n\tSYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }\n\tSYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }\n\tSYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }\n\tSYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }\n\tSYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }\n\tSYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }\n\tSYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }\n\tSYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                    = 251 // { int rfork(int flags); }\n\tSYS_ISSETUGID                = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                  = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT                 = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                  = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                  = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                  = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }\n\tSYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                   = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_YIELD                    = 321 // { int yield(void); }\n\tSYS_MLOCKALL                 = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL               = 325 // { int munlockall(void); }\n\tSYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }\n\tSYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD              = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                     = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }\n\tSYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                   = 362 // { int kqueue(void); }\n\tSYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS___SETUGID                = 374 // { int __setugid(int flag); }\n\tSYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }\n\tSYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }\n\tSYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }\n\tSYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }\n\tSYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }\n\tSYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }\n\tSYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }\n\tSYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }\n\tSYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }\n\tSYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }\n\tSYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }\n\tSYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }\n\tSYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }\n\tSYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }\n\tSYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }\n\tSYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }\n\tSYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }\n\tSYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }\n\tSYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }\n\tSYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }\n\tSYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }\n\tSYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }\n\tSYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }\n\tSYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }\n\tSYS_THR_SELF                 = 432 // { int thr_self(long *id); }\n\tSYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }\n\tSYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }\n\tSYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }\n\tSYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }\n\tSYS_THR_WAKE                 = 443 // { int thr_wake(long id); }\n\tSYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }\n\tSYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }\n\tSYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }\n\tSYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }\n\tSYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }\n\tSYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }\n\tSYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }\n\tSYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_AUDITCTL                 = 453 // { int auditctl(char *path); }\n\tSYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }\n\tSYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }\n\tSYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }\n\tSYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }\n\tSYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }\n\tSYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }\n\tSYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }\n\tSYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }\n\tSYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }\n\tSYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }\n\tSYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }\n\tSYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }\n\tSYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }\n\tSYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }\n\tSYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }\n\tSYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }\n\tSYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }\n\tSYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }\n\tSYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }\n\tSYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }\n\tSYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }\n\tSYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }\n\tSYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }\n\tSYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }\n\tSYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }\n\tSYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }\n\tSYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }\n\tSYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }\n\tSYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }\n\tSYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }\n\tSYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }\n\tSYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }\n\tSYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }\n\tSYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }\n\tSYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }\n\tSYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }\n\tSYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }\n\tSYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }\n\tSYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_ENTER                = 516 // { int cap_enter(void); }\n\tSYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }\n\tSYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }\n\tSYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }\n\tSYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }\n\tSYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }\n\tSYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }\n\tSYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }\n\tSYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }\n\tSYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }\n\tSYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }\n\tSYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }\n\tSYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }\n\tSYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }\n\tSYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }\n\tSYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }\n\tSYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }\n\tSYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }\n\tSYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }\n\tSYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }\n\tSYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }\n\tSYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }\n\tSYS_FDATASYNC                = 550 // { int fdatasync(int fd); }\n\tSYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }\n\tSYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }\n\tSYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }\n\tSYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }\n\tSYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }\n\tSYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }\n\tSYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }\n\tSYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }\n\tSYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }\n\tSYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }\n\tSYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }\n\tSYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go",
    "content": "// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && freebsd\n\npackage unix\n\nconst (\n\t// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int\n\tSYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void\n\tSYS_FORK                     = 2   // { int fork(void); }\n\tSYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE                    = 6   // { int close(int fd); }\n\tSYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }\n\tSYS_LINK                     = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                   = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                    = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                   = 13  // { int fchdir(int fd); }\n\tSYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_BREAK                    = 17  // { caddr_t break(char *nsize); }\n\tSYS_GETPID                   = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                   = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                   = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                  = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }\n\tSYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }\n\tSYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_ACCESS                   = 33  // { int access(char *path, int amode); }\n\tSYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                     = 36  // { int sync(void); }\n\tSYS_KILL                     = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                  = 39  // { pid_t getppid(void); }\n\tSYS_DUP                      = 41  // { int dup(u_int fd); }\n\tSYS_GETEGID                  = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }\n\tSYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                   = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }\n\tSYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                     = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                   = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                   = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }\n\tSYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                    = 60  // { int umask(int newmask); }\n\tSYS_CHROOT                   = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                    = 66  // { int vfork(void); }\n\tSYS_SBRK                     = 69  // { int sbrk(int incr); }\n\tSYS_SSTK                     = 70  // { int sstk(int incr); }\n\tSYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                  = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                   = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }\n\tSYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                    = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                   = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                   = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                    = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                    = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                   = 147 // { int setsid(void); }\n\tSYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }\n\tSYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }\n\tSYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }\n\tSYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }\n\tSYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }\n\tSYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }\n\tSYS_SETFIB                   = 175 // { int setfib(int fibnum); }\n\tSYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                   = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                  = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE                 = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }\n\tSYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }\n\tSYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }\n\tSYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }\n\tSYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }\n\tSYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }\n\tSYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }\n\tSYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }\n\tSYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                    = 251 // { int rfork(int flags); }\n\tSYS_ISSETUGID                = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                  = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT                 = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                  = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                  = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                  = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }\n\tSYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                   = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_YIELD                    = 321 // { int yield(void); }\n\tSYS_MLOCKALL                 = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL               = 325 // { int munlockall(void); }\n\tSYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }\n\tSYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD              = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                     = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }\n\tSYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                   = 362 // { int kqueue(void); }\n\tSYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS___SETUGID                = 374 // { int __setugid(int flag); }\n\tSYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }\n\tSYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }\n\tSYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }\n\tSYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }\n\tSYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }\n\tSYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }\n\tSYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }\n\tSYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }\n\tSYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }\n\tSYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }\n\tSYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }\n\tSYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }\n\tSYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }\n\tSYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }\n\tSYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }\n\tSYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }\n\tSYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }\n\tSYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }\n\tSYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }\n\tSYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }\n\tSYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }\n\tSYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }\n\tSYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }\n\tSYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }\n\tSYS_THR_SELF                 = 432 // { int thr_self(long *id); }\n\tSYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }\n\tSYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }\n\tSYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }\n\tSYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }\n\tSYS_THR_WAKE                 = 443 // { int thr_wake(long id); }\n\tSYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }\n\tSYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }\n\tSYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }\n\tSYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }\n\tSYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }\n\tSYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }\n\tSYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }\n\tSYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_AUDITCTL                 = 453 // { int auditctl(char *path); }\n\tSYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }\n\tSYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }\n\tSYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }\n\tSYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }\n\tSYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }\n\tSYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }\n\tSYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }\n\tSYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }\n\tSYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }\n\tSYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }\n\tSYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }\n\tSYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }\n\tSYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }\n\tSYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }\n\tSYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }\n\tSYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }\n\tSYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }\n\tSYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }\n\tSYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }\n\tSYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }\n\tSYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }\n\tSYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }\n\tSYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }\n\tSYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }\n\tSYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }\n\tSYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }\n\tSYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }\n\tSYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }\n\tSYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }\n\tSYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }\n\tSYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }\n\tSYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }\n\tSYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }\n\tSYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }\n\tSYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }\n\tSYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }\n\tSYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }\n\tSYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }\n\tSYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_ENTER                = 516 // { int cap_enter(void); }\n\tSYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }\n\tSYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }\n\tSYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }\n\tSYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }\n\tSYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }\n\tSYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }\n\tSYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }\n\tSYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }\n\tSYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }\n\tSYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }\n\tSYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }\n\tSYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }\n\tSYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }\n\tSYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }\n\tSYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }\n\tSYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }\n\tSYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }\n\tSYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }\n\tSYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }\n\tSYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }\n\tSYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }\n\tSYS_FDATASYNC                = 550 // { int fdatasync(int fd); }\n\tSYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }\n\tSYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }\n\tSYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }\n\tSYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }\n\tSYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }\n\tSYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }\n\tSYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }\n\tSYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }\n\tSYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }\n\tSYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }\n\tSYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }\n\tSYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go",
    "content": "// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && freebsd\n\npackage unix\n\nconst (\n\t// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int\n\tSYS_EXIT                     = 1   // { void sys_exit(int rval); } exit sys_exit_args void\n\tSYS_FORK                     = 2   // { int fork(void); }\n\tSYS_READ                     = 3   // { ssize_t read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                    = 4   // { ssize_t write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                     = 5   // { int open(char *path, int flags, int mode); }\n\tSYS_CLOSE                    = 6   // { int close(int fd); }\n\tSYS_WAIT4                    = 7   // { int wait4(int pid, int *status, int options, struct rusage *rusage); }\n\tSYS_LINK                     = 9   // { int link(char *path, char *link); }\n\tSYS_UNLINK                   = 10  // { int unlink(char *path); }\n\tSYS_CHDIR                    = 12  // { int chdir(char *path); }\n\tSYS_FCHDIR                   = 13  // { int fchdir(int fd); }\n\tSYS_CHMOD                    = 15  // { int chmod(char *path, int mode); }\n\tSYS_CHOWN                    = 16  // { int chown(char *path, int uid, int gid); }\n\tSYS_BREAK                    = 17  // { caddr_t break(char *nsize); }\n\tSYS_GETPID                   = 20  // { pid_t getpid(void); }\n\tSYS_MOUNT                    = 21  // { int mount(char *type, char *path, int flags, caddr_t data); }\n\tSYS_UNMOUNT                  = 22  // { int unmount(char *path, int flags); }\n\tSYS_SETUID                   = 23  // { int setuid(uid_t uid); }\n\tSYS_GETUID                   = 24  // { uid_t getuid(void); }\n\tSYS_GETEUID                  = 25  // { uid_t geteuid(void); }\n\tSYS_PTRACE                   = 26  // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG                  = 27  // { int recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG                  = 28  // { int sendmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_RECVFROM                 = 29  // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); }\n\tSYS_ACCEPT                   = 30  // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); }\n\tSYS_GETPEERNAME              = 31  // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_GETSOCKNAME              = 32  // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); }\n\tSYS_ACCESS                   = 33  // { int access(char *path, int amode); }\n\tSYS_CHFLAGS                  = 34  // { int chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS                 = 35  // { int fchflags(int fd, u_long flags); }\n\tSYS_SYNC                     = 36  // { int sync(void); }\n\tSYS_KILL                     = 37  // { int kill(int pid, int signum); }\n\tSYS_GETPPID                  = 39  // { pid_t getppid(void); }\n\tSYS_DUP                      = 41  // { int dup(u_int fd); }\n\tSYS_GETEGID                  = 43  // { gid_t getegid(void); }\n\tSYS_PROFIL                   = 44  // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }\n\tSYS_KTRACE                   = 45  // { int ktrace(const char *fname, int ops, int facs, int pid); }\n\tSYS_GETGID                   = 47  // { gid_t getgid(void); }\n\tSYS_GETLOGIN                 = 49  // { int getlogin(char *namebuf, u_int namelen); }\n\tSYS_SETLOGIN                 = 50  // { int setlogin(char *namebuf); }\n\tSYS_ACCT                     = 51  // { int acct(char *path); }\n\tSYS_SIGALTSTACK              = 53  // { int sigaltstack(stack_t *ss, stack_t *oss); }\n\tSYS_IOCTL                    = 54  // { int ioctl(int fd, u_long com, caddr_t data); }\n\tSYS_REBOOT                   = 55  // { int reboot(int opt); }\n\tSYS_REVOKE                   = 56  // { int revoke(char *path); }\n\tSYS_SYMLINK                  = 57  // { int symlink(char *path, char *link); }\n\tSYS_READLINK                 = 58  // { ssize_t readlink(char *path, char *buf, size_t count); }\n\tSYS_EXECVE                   = 59  // { int execve(char *fname, char **argv, char **envv); }\n\tSYS_UMASK                    = 60  // { int umask(int newmask); }\n\tSYS_CHROOT                   = 61  // { int chroot(char *path); }\n\tSYS_MSYNC                    = 65  // { int msync(void *addr, size_t len, int flags); }\n\tSYS_VFORK                    = 66  // { int vfork(void); }\n\tSYS_SBRK                     = 69  // { int sbrk(int incr); }\n\tSYS_SSTK                     = 70  // { int sstk(int incr); }\n\tSYS_MUNMAP                   = 73  // { int munmap(void *addr, size_t len); }\n\tSYS_MPROTECT                 = 74  // { int mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE                  = 75  // { int madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE                  = 78  // { int mincore(const void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS                = 79  // { int getgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS                = 80  // { int setgroups(u_int gidsetsize, gid_t *gidset); }\n\tSYS_GETPGRP                  = 81  // { int getpgrp(void); }\n\tSYS_SETPGID                  = 82  // { int setpgid(int pid, int pgid); }\n\tSYS_SETITIMER                = 83  // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_SWAPON                   = 85  // { int swapon(char *name); }\n\tSYS_GETITIMER                = 86  // { int getitimer(u_int which, struct itimerval *itv); }\n\tSYS_GETDTABLESIZE            = 89  // { int getdtablesize(void); }\n\tSYS_DUP2                     = 90  // { int dup2(u_int from, u_int to); }\n\tSYS_FCNTL                    = 92  // { int fcntl(int fd, int cmd, long arg); }\n\tSYS_SELECT                   = 93  // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_FSYNC                    = 95  // { int fsync(int fd); }\n\tSYS_SETPRIORITY              = 96  // { int setpriority(int which, int who, int prio); }\n\tSYS_SOCKET                   = 97  // { int socket(int domain, int type, int protocol); }\n\tSYS_CONNECT                  = 98  // { int connect(int s, caddr_t name, int namelen); }\n\tSYS_GETPRIORITY              = 100 // { int getpriority(int which, int who); }\n\tSYS_BIND                     = 104 // { int bind(int s, caddr_t name, int namelen); }\n\tSYS_SETSOCKOPT               = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }\n\tSYS_LISTEN                   = 106 // { int listen(int s, int backlog); }\n\tSYS_GETTIMEOFDAY             = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_GETRUSAGE                = 117 // { int getrusage(int who, struct rusage *rusage); }\n\tSYS_GETSOCKOPT               = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); }\n\tSYS_READV                    = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_WRITEV                   = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }\n\tSYS_SETTIMEOFDAY             = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }\n\tSYS_FCHOWN                   = 123 // { int fchown(int fd, int uid, int gid); }\n\tSYS_FCHMOD                   = 124 // { int fchmod(int fd, int mode); }\n\tSYS_SETREUID                 = 126 // { int setreuid(int ruid, int euid); }\n\tSYS_SETREGID                 = 127 // { int setregid(int rgid, int egid); }\n\tSYS_RENAME                   = 128 // { int rename(char *from, char *to); }\n\tSYS_FLOCK                    = 131 // { int flock(int fd, int how); }\n\tSYS_MKFIFO                   = 132 // { int mkfifo(char *path, int mode); }\n\tSYS_SENDTO                   = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }\n\tSYS_SHUTDOWN                 = 134 // { int shutdown(int s, int how); }\n\tSYS_SOCKETPAIR               = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                    = 136 // { int mkdir(char *path, int mode); }\n\tSYS_RMDIR                    = 137 // { int rmdir(char *path); }\n\tSYS_UTIMES                   = 138 // { int utimes(char *path, struct timeval *tptr); }\n\tSYS_ADJTIME                  = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }\n\tSYS_SETSID                   = 147 // { int setsid(void); }\n\tSYS_QUOTACTL                 = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }\n\tSYS_NLM_SYSCALL              = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); }\n\tSYS_NFSSVC                   = 155 // { int nfssvc(int flag, caddr_t argp); }\n\tSYS_LGETFH                   = 160 // { int lgetfh(char *fname, struct fhandle *fhp); }\n\tSYS_GETFH                    = 161 // { int getfh(char *fname, struct fhandle *fhp); }\n\tSYS_SYSARCH                  = 165 // { int sysarch(int op, char *parms); }\n\tSYS_RTPRIO                   = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }\n\tSYS_SEMSYS                   = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); }\n\tSYS_MSGSYS                   = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); }\n\tSYS_SHMSYS                   = 171 // { int shmsys(int which, int a2, int a3, int a4); }\n\tSYS_SETFIB                   = 175 // { int setfib(int fibnum); }\n\tSYS_NTP_ADJTIME              = 176 // { int ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID                   = 181 // { int setgid(gid_t gid); }\n\tSYS_SETEGID                  = 182 // { int setegid(gid_t egid); }\n\tSYS_SETEUID                  = 183 // { int seteuid(uid_t euid); }\n\tSYS_PATHCONF                 = 191 // { int pathconf(char *path, int name); }\n\tSYS_FPATHCONF                = 192 // { int fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT                = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int\n\tSYS_SETRLIMIT                = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int\n\tSYS___SYSCTL                 = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int\n\tSYS_MLOCK                    = 203 // { int mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK                  = 204 // { int munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE                 = 205 // { int undelete(char *path); }\n\tSYS_FUTIMES                  = 206 // { int futimes(int fd, struct timeval *tptr); }\n\tSYS_GETPGID                  = 207 // { int getpgid(pid_t pid); }\n\tSYS_POLL                     = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET                   = 221 // { int semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                    = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_MSGGET                   = 225 // { int msgget(key_t key, int msgflg); }\n\tSYS_MSGSND                   = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV                   = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                    = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                    = 230 // { int shmdt(const void *shmaddr); }\n\tSYS_SHMGET                   = 231 // { int shmget(key_t key, size_t size, int shmflg); }\n\tSYS_CLOCK_GETTIME            = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME            = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES             = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_KTIMER_CREATE            = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }\n\tSYS_KTIMER_DELETE            = 236 // { int ktimer_delete(int timerid); }\n\tSYS_KTIMER_SETTIME           = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_KTIMER_GETTIME           = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); }\n\tSYS_KTIMER_GETOVERRUN        = 239 // { int ktimer_getoverrun(int timerid); }\n\tSYS_NANOSLEEP                = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FFCLOCK_GETCOUNTER       = 241 // { int ffclock_getcounter(ffcounter *ffcount); }\n\tSYS_FFCLOCK_SETESTIMATE      = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }\n\tSYS_FFCLOCK_GETESTIMATE      = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }\n\tSYS_CLOCK_NANOSLEEP          = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_CLOCK_GETCPUCLOCKID2     = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }\n\tSYS_NTP_GETTIME              = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_MINHERIT                 = 250 // { int minherit(void *addr, size_t len, int inherit); }\n\tSYS_RFORK                    = 251 // { int rfork(int flags); }\n\tSYS_ISSETUGID                = 253 // { int issetugid(void); }\n\tSYS_LCHOWN                   = 254 // { int lchown(char *path, int uid, int gid); }\n\tSYS_AIO_READ                 = 255 // { int aio_read(struct aiocb *aiocbp); }\n\tSYS_AIO_WRITE                = 256 // { int aio_write(struct aiocb *aiocbp); }\n\tSYS_LIO_LISTIO               = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }\n\tSYS_LCHMOD                   = 274 // { int lchmod(char *path, mode_t mode); }\n\tSYS_LUTIMES                  = 276 // { int lutimes(char *path, struct timeval *tptr); }\n\tSYS_PREADV                   = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_PWRITEV                  = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }\n\tSYS_FHOPEN                   = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }\n\tSYS_MODNEXT                  = 300 // { int modnext(int modid); }\n\tSYS_MODSTAT                  = 301 // { int modstat(int modid, struct module_stat* stat); }\n\tSYS_MODFNEXT                 = 302 // { int modfnext(int modid); }\n\tSYS_MODFIND                  = 303 // { int modfind(const char *name); }\n\tSYS_KLDLOAD                  = 304 // { int kldload(const char *file); }\n\tSYS_KLDUNLOAD                = 305 // { int kldunload(int fileid); }\n\tSYS_KLDFIND                  = 306 // { int kldfind(const char *file); }\n\tSYS_KLDNEXT                  = 307 // { int kldnext(int fileid); }\n\tSYS_KLDSTAT                  = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }\n\tSYS_KLDFIRSTMOD              = 309 // { int kldfirstmod(int fileid); }\n\tSYS_GETSID                   = 310 // { int getsid(pid_t pid); }\n\tSYS_SETRESUID                = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_SETRESGID                = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_AIO_RETURN               = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }\n\tSYS_AIO_SUSPEND              = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }\n\tSYS_AIO_CANCEL               = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }\n\tSYS_AIO_ERROR                = 317 // { int aio_error(struct aiocb *aiocbp); }\n\tSYS_YIELD                    = 321 // { int yield(void); }\n\tSYS_MLOCKALL                 = 324 // { int mlockall(int how); }\n\tSYS_MUNLOCKALL               = 325 // { int munlockall(void); }\n\tSYS___GETCWD                 = 326 // { int __getcwd(char *buf, size_t buflen); }\n\tSYS_SCHED_SETPARAM           = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }\n\tSYS_SCHED_GETPARAM           = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }\n\tSYS_SCHED_SETSCHEDULER       = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }\n\tSYS_SCHED_GETSCHEDULER       = 330 // { int sched_getscheduler (pid_t pid); }\n\tSYS_SCHED_YIELD              = 331 // { int sched_yield (void); }\n\tSYS_SCHED_GET_PRIORITY_MAX   = 332 // { int sched_get_priority_max (int policy); }\n\tSYS_SCHED_GET_PRIORITY_MIN   = 333 // { int sched_get_priority_min (int policy); }\n\tSYS_SCHED_RR_GET_INTERVAL    = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }\n\tSYS_UTRACE                   = 335 // { int utrace(const void *addr, size_t len); }\n\tSYS_KLDSYM                   = 337 // { int kldsym(int fileid, int cmd, void *data); }\n\tSYS_JAIL                     = 338 // { int jail(struct jail *jail); }\n\tSYS_SIGPROCMASK              = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }\n\tSYS_SIGSUSPEND               = 341 // { int sigsuspend(const sigset_t *sigmask); }\n\tSYS_SIGPENDING               = 343 // { int sigpending(sigset_t *set); }\n\tSYS_SIGTIMEDWAIT             = 345 // { int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout); }\n\tSYS_SIGWAITINFO              = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); }\n\tSYS___ACL_GET_FILE           = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FILE           = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_GET_FD             = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_FD             = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_FILE        = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }\n\tSYS___ACL_DELETE_FD          = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_FILE      = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_ACLCHECK_FD        = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }\n\tSYS_EXTATTRCTL               = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE         = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE         = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE      = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_AIO_WAITCOMPLETE         = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }\n\tSYS_GETRESUID                = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_GETRESGID                = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_KQUEUE                   = 362 // { int kqueue(void); }\n\tSYS_EXTATTR_SET_FD           = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD           = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD        = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS___SETUGID                = 374 // { int __setugid(int flag); }\n\tSYS_EACCESS                  = 376 // { int eaccess(char *path, int amode); }\n\tSYS_NMOUNT                   = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS___MAC_GET_PROC           = 384 // { int __mac_get_proc(struct mac *mac_p); }\n\tSYS___MAC_SET_PROC           = 385 // { int __mac_set_proc(struct mac *mac_p); }\n\tSYS___MAC_GET_FD             = 386 // { int __mac_get_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_GET_FILE           = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_FD             = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); }\n\tSYS___MAC_SET_FILE           = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); }\n\tSYS_KENV                     = 390 // { int kenv(int what, const char *name, char *value, int len); }\n\tSYS_LCHFLAGS                 = 391 // { int lchflags(const char *path, u_long flags); }\n\tSYS_UUIDGEN                  = 392 // { int uuidgen(struct uuid *store, int count); }\n\tSYS_SENDFILE                 = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }\n\tSYS_MAC_SYSCALL              = 394 // { int mac_syscall(const char *policy, int call, void *arg); }\n\tSYS_KSEM_CLOSE               = 400 // { int ksem_close(semid_t id); }\n\tSYS_KSEM_POST                = 401 // { int ksem_post(semid_t id); }\n\tSYS_KSEM_WAIT                = 402 // { int ksem_wait(semid_t id); }\n\tSYS_KSEM_TRYWAIT             = 403 // { int ksem_trywait(semid_t id); }\n\tSYS_KSEM_INIT                = 404 // { int ksem_init(semid_t *idp, unsigned int value); }\n\tSYS_KSEM_OPEN                = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); }\n\tSYS_KSEM_UNLINK              = 406 // { int ksem_unlink(const char *name); }\n\tSYS_KSEM_GETVALUE            = 407 // { int ksem_getvalue(semid_t id, int *val); }\n\tSYS_KSEM_DESTROY             = 408 // { int ksem_destroy(semid_t id); }\n\tSYS___MAC_GET_PID            = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }\n\tSYS___MAC_GET_LINK           = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }\n\tSYS___MAC_SET_LINK           = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }\n\tSYS_EXTATTR_SET_LINK         = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK         = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK      = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS___MAC_EXECVE             = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }\n\tSYS_SIGACTION                = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }\n\tSYS_SIGRETURN                = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }\n\tSYS_GETCONTEXT               = 421 // { int getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT               = 422 // { int setcontext(const struct __ucontext *ucp); }\n\tSYS_SWAPCONTEXT              = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }\n\tSYS_SWAPOFF                  = 424 // { int swapoff(const char *name); }\n\tSYS___ACL_GET_LINK           = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_SET_LINK           = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS___ACL_DELETE_LINK        = 427 // { int __acl_delete_link(const char *path, acl_type_t type); }\n\tSYS___ACL_ACLCHECK_LINK      = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); }\n\tSYS_SIGWAIT                  = 429 // { int sigwait(const sigset_t *set, int *sig); }\n\tSYS_THR_CREATE               = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); }\n\tSYS_THR_EXIT                 = 431 // { void thr_exit(long *state); }\n\tSYS_THR_SELF                 = 432 // { int thr_self(long *id); }\n\tSYS_THR_KILL                 = 433 // { int thr_kill(long id, int sig); }\n\tSYS_JAIL_ATTACH              = 436 // { int jail_attach(int jid); }\n\tSYS_EXTATTR_LIST_FD          = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE        = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK        = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_KSEM_TIMEDWAIT           = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }\n\tSYS_THR_SUSPEND              = 442 // { int thr_suspend(const struct timespec *timeout); }\n\tSYS_THR_WAKE                 = 443 // { int thr_wake(long id); }\n\tSYS_KLDUNLOADF               = 444 // { int kldunloadf(int fileid, int flags); }\n\tSYS_AUDIT                    = 445 // { int audit(const void *record, u_int length); }\n\tSYS_AUDITON                  = 446 // { int auditon(int cmd, void *data, u_int length); }\n\tSYS_GETAUID                  = 447 // { int getauid(uid_t *auid); }\n\tSYS_SETAUID                  = 448 // { int setauid(uid_t *auid); }\n\tSYS_GETAUDIT                 = 449 // { int getaudit(struct auditinfo *auditinfo); }\n\tSYS_SETAUDIT                 = 450 // { int setaudit(struct auditinfo *auditinfo); }\n\tSYS_GETAUDIT_ADDR            = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_SETAUDIT_ADDR            = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }\n\tSYS_AUDITCTL                 = 453 // { int auditctl(char *path); }\n\tSYS__UMTX_OP                 = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }\n\tSYS_THR_NEW                  = 455 // { int thr_new(struct thr_param *param, int param_size); }\n\tSYS_SIGQUEUE                 = 456 // { int sigqueue(pid_t pid, int signum, void *value); }\n\tSYS_KMQ_OPEN                 = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }\n\tSYS_KMQ_SETATTR              = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }\n\tSYS_KMQ_TIMEDRECEIVE         = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_TIMEDSEND            = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }\n\tSYS_KMQ_NOTIFY               = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }\n\tSYS_KMQ_UNLINK               = 462 // { int kmq_unlink(const char *path); }\n\tSYS_ABORT2                   = 463 // { int abort2(const char *why, int nargs, void **args); }\n\tSYS_THR_SET_NAME             = 464 // { int thr_set_name(long id, const char *name); }\n\tSYS_AIO_FSYNC                = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); }\n\tSYS_RTPRIO_THREAD            = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); }\n\tSYS_SCTP_PEELOFF             = 471 // { int sctp_peeloff(int sd, uint32_t name); }\n\tSYS_SCTP_GENERIC_SENDMSG     = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }\n\tSYS_SCTP_GENERIC_RECVMSG     = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }\n\tSYS_PREAD                    = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }\n\tSYS_PWRITE                   = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }\n\tSYS_MMAP                     = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }\n\tSYS_LSEEK                    = 478 // { off_t lseek(int fd, off_t offset, int whence); }\n\tSYS_TRUNCATE                 = 479 // { int truncate(char *path, off_t length); }\n\tSYS_FTRUNCATE                = 480 // { int ftruncate(int fd, off_t length); }\n\tSYS_THR_KILL2                = 481 // { int thr_kill2(pid_t pid, long id, int sig); }\n\tSYS_SHM_OPEN                 = 482 // { int shm_open(const char *path, int flags, mode_t mode); }\n\tSYS_SHM_UNLINK               = 483 // { int shm_unlink(const char *path); }\n\tSYS_CPUSET                   = 484 // { int cpuset(cpusetid_t *setid); }\n\tSYS_CPUSET_SETID             = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, cpusetid_t setid); }\n\tSYS_CPUSET_GETID             = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); }\n\tSYS_CPUSET_GETAFFINITY       = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); }\n\tSYS_CPUSET_SETAFFINITY       = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); }\n\tSYS_FACCESSAT                = 489 // { int faccessat(int fd, char *path, int amode, int flag); }\n\tSYS_FCHMODAT                 = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT                 = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_FEXECVE                  = 492 // { int fexecve(int fd, char **argv, char **envv); }\n\tSYS_FUTIMESAT                = 494 // { int futimesat(int fd, char *path, struct timeval *times); }\n\tSYS_LINKAT                   = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }\n\tSYS_MKDIRAT                  = 496 // { int mkdirat(int fd, char *path, mode_t mode); }\n\tSYS_MKFIFOAT                 = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }\n\tSYS_OPENAT                   = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }\n\tSYS_READLINKAT               = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }\n\tSYS_RENAMEAT                 = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }\n\tSYS_SYMLINKAT                = 502 // { int symlinkat(char *path1, int fd, char *path2); }\n\tSYS_UNLINKAT                 = 503 // { int unlinkat(int fd, char *path, int flag); }\n\tSYS_POSIX_OPENPT             = 504 // { int posix_openpt(int flags); }\n\tSYS_GSSD_SYSCALL             = 505 // { int gssd_syscall(char *path); }\n\tSYS_JAIL_GET                 = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_SET                 = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); }\n\tSYS_JAIL_REMOVE              = 508 // { int jail_remove(int jid); }\n\tSYS_CLOSEFROM                = 509 // { int closefrom(int lowfd); }\n\tSYS___SEMCTL                 = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_MSGCTL                   = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SHMCTL                   = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_LPATHCONF                = 513 // { int lpathconf(char *path, int name); }\n\tSYS___CAP_RIGHTS_GET         = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_ENTER                = 516 // { int cap_enter(void); }\n\tSYS_CAP_GETMODE              = 517 // { int cap_getmode(u_int *modep); }\n\tSYS_PDFORK                   = 518 // { int pdfork(int *fdp, int flags); }\n\tSYS_PDKILL                   = 519 // { int pdkill(int fd, int signum); }\n\tSYS_PDGETPID                 = 520 // { int pdgetpid(int fd, pid_t *pidp); }\n\tSYS_PSELECT                  = 522 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); }\n\tSYS_GETLOGINCLASS            = 523 // { int getloginclass(char *namebuf, size_t namelen); }\n\tSYS_SETLOGINCLASS            = 524 // { int setloginclass(const char *namebuf); }\n\tSYS_RCTL_GET_RACCT           = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_RULES           = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_GET_LIMITS          = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_ADD_RULE            = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_RCTL_REMOVE_RULE         = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); }\n\tSYS_POSIX_FALLOCATE          = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); }\n\tSYS_POSIX_FADVISE            = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); }\n\tSYS_WAIT6                    = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); }\n\tSYS_CAP_RIGHTS_LIMIT         = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); }\n\tSYS_CAP_IOCTLS_LIMIT         = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); }\n\tSYS_CAP_IOCTLS_GET           = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); }\n\tSYS_CAP_FCNTLS_LIMIT         = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); }\n\tSYS_CAP_FCNTLS_GET           = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); }\n\tSYS_BINDAT                   = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CONNECTAT                = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); }\n\tSYS_CHFLAGSAT                = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); }\n\tSYS_ACCEPT4                  = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); }\n\tSYS_PIPE2                    = 542 // { int pipe2(int *fildes, int flags); }\n\tSYS_AIO_MLOCK                = 543 // { int aio_mlock(struct aiocb *aiocbp); }\n\tSYS_PROCCTL                  = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); }\n\tSYS_PPOLL                    = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }\n\tSYS_FUTIMENS                 = 546 // { int futimens(int fd, struct timespec *times); }\n\tSYS_UTIMENSAT                = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }\n\tSYS_FDATASYNC                = 550 // { int fdatasync(int fd); }\n\tSYS_FSTAT                    = 551 // { int fstat(int fd, struct stat *sb); }\n\tSYS_FSTATAT                  = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }\n\tSYS_FHSTAT                   = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }\n\tSYS_GETDIRENTRIES            = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }\n\tSYS_STATFS                   = 555 // { int statfs(char *path, struct statfs *buf); }\n\tSYS_FSTATFS                  = 556 // { int fstatfs(int fd, struct statfs *buf); }\n\tSYS_GETFSSTAT                = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }\n\tSYS_FHSTATFS                 = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }\n\tSYS_MKNODAT                  = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }\n\tSYS_KEVENT                   = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_CPUSET_GETDOMAIN         = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }\n\tSYS_CPUSET_SETDOMAIN         = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }\n\tSYS_GETRANDOM                = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }\n\tSYS_GETFHAT                  = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }\n\tSYS_FHLINK                   = 565 // { int fhlink(struct fhandle *fhp, const char *to); }\n\tSYS_FHLINKAT                 = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }\n\tSYS_FHREADLINK               = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }\n\tSYS___SYSCTLBYNAME           = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_CLOSE_RANGE              = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_386.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/386/include -m32 /tmp/386/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL              = 0\n\tSYS_EXIT                         = 1\n\tSYS_FORK                         = 2\n\tSYS_READ                         = 3\n\tSYS_WRITE                        = 4\n\tSYS_OPEN                         = 5\n\tSYS_CLOSE                        = 6\n\tSYS_WAITPID                      = 7\n\tSYS_CREAT                        = 8\n\tSYS_LINK                         = 9\n\tSYS_UNLINK                       = 10\n\tSYS_EXECVE                       = 11\n\tSYS_CHDIR                        = 12\n\tSYS_TIME                         = 13\n\tSYS_MKNOD                        = 14\n\tSYS_CHMOD                        = 15\n\tSYS_LCHOWN                       = 16\n\tSYS_BREAK                        = 17\n\tSYS_OLDSTAT                      = 18\n\tSYS_LSEEK                        = 19\n\tSYS_GETPID                       = 20\n\tSYS_MOUNT                        = 21\n\tSYS_UMOUNT                       = 22\n\tSYS_SETUID                       = 23\n\tSYS_GETUID                       = 24\n\tSYS_STIME                        = 25\n\tSYS_PTRACE                       = 26\n\tSYS_ALARM                        = 27\n\tSYS_OLDFSTAT                     = 28\n\tSYS_PAUSE                        = 29\n\tSYS_UTIME                        = 30\n\tSYS_STTY                         = 31\n\tSYS_GTTY                         = 32\n\tSYS_ACCESS                       = 33\n\tSYS_NICE                         = 34\n\tSYS_FTIME                        = 35\n\tSYS_SYNC                         = 36\n\tSYS_KILL                         = 37\n\tSYS_RENAME                       = 38\n\tSYS_MKDIR                        = 39\n\tSYS_RMDIR                        = 40\n\tSYS_DUP                          = 41\n\tSYS_PIPE                         = 42\n\tSYS_TIMES                        = 43\n\tSYS_PROF                         = 44\n\tSYS_BRK                          = 45\n\tSYS_SETGID                       = 46\n\tSYS_GETGID                       = 47\n\tSYS_SIGNAL                       = 48\n\tSYS_GETEUID                      = 49\n\tSYS_GETEGID                      = 50\n\tSYS_ACCT                         = 51\n\tSYS_UMOUNT2                      = 52\n\tSYS_LOCK                         = 53\n\tSYS_IOCTL                        = 54\n\tSYS_FCNTL                        = 55\n\tSYS_MPX                          = 56\n\tSYS_SETPGID                      = 57\n\tSYS_ULIMIT                       = 58\n\tSYS_OLDOLDUNAME                  = 59\n\tSYS_UMASK                        = 60\n\tSYS_CHROOT                       = 61\n\tSYS_USTAT                        = 62\n\tSYS_DUP2                         = 63\n\tSYS_GETPPID                      = 64\n\tSYS_GETPGRP                      = 65\n\tSYS_SETSID                       = 66\n\tSYS_SIGACTION                    = 67\n\tSYS_SGETMASK                     = 68\n\tSYS_SSETMASK                     = 69\n\tSYS_SETREUID                     = 70\n\tSYS_SETREGID                     = 71\n\tSYS_SIGSUSPEND                   = 72\n\tSYS_SIGPENDING                   = 73\n\tSYS_SETHOSTNAME                  = 74\n\tSYS_SETRLIMIT                    = 75\n\tSYS_GETRLIMIT                    = 76\n\tSYS_GETRUSAGE                    = 77\n\tSYS_GETTIMEOFDAY                 = 78\n\tSYS_SETTIMEOFDAY                 = 79\n\tSYS_GETGROUPS                    = 80\n\tSYS_SETGROUPS                    = 81\n\tSYS_SELECT                       = 82\n\tSYS_SYMLINK                      = 83\n\tSYS_OLDLSTAT                     = 84\n\tSYS_READLINK                     = 85\n\tSYS_USELIB                       = 86\n\tSYS_SWAPON                       = 87\n\tSYS_REBOOT                       = 88\n\tSYS_READDIR                      = 89\n\tSYS_MMAP                         = 90\n\tSYS_MUNMAP                       = 91\n\tSYS_TRUNCATE                     = 92\n\tSYS_FTRUNCATE                    = 93\n\tSYS_FCHMOD                       = 94\n\tSYS_FCHOWN                       = 95\n\tSYS_GETPRIORITY                  = 96\n\tSYS_SETPRIORITY                  = 97\n\tSYS_PROFIL                       = 98\n\tSYS_STATFS                       = 99\n\tSYS_FSTATFS                      = 100\n\tSYS_IOPERM                       = 101\n\tSYS_SOCKETCALL                   = 102\n\tSYS_SYSLOG                       = 103\n\tSYS_SETITIMER                    = 104\n\tSYS_GETITIMER                    = 105\n\tSYS_STAT                         = 106\n\tSYS_LSTAT                        = 107\n\tSYS_FSTAT                        = 108\n\tSYS_OLDUNAME                     = 109\n\tSYS_IOPL                         = 110\n\tSYS_VHANGUP                      = 111\n\tSYS_IDLE                         = 112\n\tSYS_VM86OLD                      = 113\n\tSYS_WAIT4                        = 114\n\tSYS_SWAPOFF                      = 115\n\tSYS_SYSINFO                      = 116\n\tSYS_IPC                          = 117\n\tSYS_FSYNC                        = 118\n\tSYS_SIGRETURN                    = 119\n\tSYS_CLONE                        = 120\n\tSYS_SETDOMAINNAME                = 121\n\tSYS_UNAME                        = 122\n\tSYS_MODIFY_LDT                   = 123\n\tSYS_ADJTIMEX                     = 124\n\tSYS_MPROTECT                     = 125\n\tSYS_SIGPROCMASK                  = 126\n\tSYS_CREATE_MODULE                = 127\n\tSYS_INIT_MODULE                  = 128\n\tSYS_DELETE_MODULE                = 129\n\tSYS_GET_KERNEL_SYMS              = 130\n\tSYS_QUOTACTL                     = 131\n\tSYS_GETPGID                      = 132\n\tSYS_FCHDIR                       = 133\n\tSYS_BDFLUSH                      = 134\n\tSYS_SYSFS                        = 135\n\tSYS_PERSONALITY                  = 136\n\tSYS_AFS_SYSCALL                  = 137\n\tSYS_SETFSUID                     = 138\n\tSYS_SETFSGID                     = 139\n\tSYS__LLSEEK                      = 140\n\tSYS_GETDENTS                     = 141\n\tSYS__NEWSELECT                   = 142\n\tSYS_FLOCK                        = 143\n\tSYS_MSYNC                        = 144\n\tSYS_READV                        = 145\n\tSYS_WRITEV                       = 146\n\tSYS_GETSID                       = 147\n\tSYS_FDATASYNC                    = 148\n\tSYS__SYSCTL                      = 149\n\tSYS_MLOCK                        = 150\n\tSYS_MUNLOCK                      = 151\n\tSYS_MLOCKALL                     = 152\n\tSYS_MUNLOCKALL                   = 153\n\tSYS_SCHED_SETPARAM               = 154\n\tSYS_SCHED_GETPARAM               = 155\n\tSYS_SCHED_SETSCHEDULER           = 156\n\tSYS_SCHED_GETSCHEDULER           = 157\n\tSYS_SCHED_YIELD                  = 158\n\tSYS_SCHED_GET_PRIORITY_MAX       = 159\n\tSYS_SCHED_GET_PRIORITY_MIN       = 160\n\tSYS_SCHED_RR_GET_INTERVAL        = 161\n\tSYS_NANOSLEEP                    = 162\n\tSYS_MREMAP                       = 163\n\tSYS_SETRESUID                    = 164\n\tSYS_GETRESUID                    = 165\n\tSYS_VM86                         = 166\n\tSYS_QUERY_MODULE                 = 167\n\tSYS_POLL                         = 168\n\tSYS_NFSSERVCTL                   = 169\n\tSYS_SETRESGID                    = 170\n\tSYS_GETRESGID                    = 171\n\tSYS_PRCTL                        = 172\n\tSYS_RT_SIGRETURN                 = 173\n\tSYS_RT_SIGACTION                 = 174\n\tSYS_RT_SIGPROCMASK               = 175\n\tSYS_RT_SIGPENDING                = 176\n\tSYS_RT_SIGTIMEDWAIT              = 177\n\tSYS_RT_SIGQUEUEINFO              = 178\n\tSYS_RT_SIGSUSPEND                = 179\n\tSYS_PREAD64                      = 180\n\tSYS_PWRITE64                     = 181\n\tSYS_CHOWN                        = 182\n\tSYS_GETCWD                       = 183\n\tSYS_CAPGET                       = 184\n\tSYS_CAPSET                       = 185\n\tSYS_SIGALTSTACK                  = 186\n\tSYS_SENDFILE                     = 187\n\tSYS_GETPMSG                      = 188\n\tSYS_PUTPMSG                      = 189\n\tSYS_VFORK                        = 190\n\tSYS_UGETRLIMIT                   = 191\n\tSYS_MMAP2                        = 192\n\tSYS_TRUNCATE64                   = 193\n\tSYS_FTRUNCATE64                  = 194\n\tSYS_STAT64                       = 195\n\tSYS_LSTAT64                      = 196\n\tSYS_FSTAT64                      = 197\n\tSYS_LCHOWN32                     = 198\n\tSYS_GETUID32                     = 199\n\tSYS_GETGID32                     = 200\n\tSYS_GETEUID32                    = 201\n\tSYS_GETEGID32                    = 202\n\tSYS_SETREUID32                   = 203\n\tSYS_SETREGID32                   = 204\n\tSYS_GETGROUPS32                  = 205\n\tSYS_SETGROUPS32                  = 206\n\tSYS_FCHOWN32                     = 207\n\tSYS_SETRESUID32                  = 208\n\tSYS_GETRESUID32                  = 209\n\tSYS_SETRESGID32                  = 210\n\tSYS_GETRESGID32                  = 211\n\tSYS_CHOWN32                      = 212\n\tSYS_SETUID32                     = 213\n\tSYS_SETGID32                     = 214\n\tSYS_SETFSUID32                   = 215\n\tSYS_SETFSGID32                   = 216\n\tSYS_PIVOT_ROOT                   = 217\n\tSYS_MINCORE                      = 218\n\tSYS_MADVISE                      = 219\n\tSYS_GETDENTS64                   = 220\n\tSYS_FCNTL64                      = 221\n\tSYS_GETTID                       = 224\n\tSYS_READAHEAD                    = 225\n\tSYS_SETXATTR                     = 226\n\tSYS_LSETXATTR                    = 227\n\tSYS_FSETXATTR                    = 228\n\tSYS_GETXATTR                     = 229\n\tSYS_LGETXATTR                    = 230\n\tSYS_FGETXATTR                    = 231\n\tSYS_LISTXATTR                    = 232\n\tSYS_LLISTXATTR                   = 233\n\tSYS_FLISTXATTR                   = 234\n\tSYS_REMOVEXATTR                  = 235\n\tSYS_LREMOVEXATTR                 = 236\n\tSYS_FREMOVEXATTR                 = 237\n\tSYS_TKILL                        = 238\n\tSYS_SENDFILE64                   = 239\n\tSYS_FUTEX                        = 240\n\tSYS_SCHED_SETAFFINITY            = 241\n\tSYS_SCHED_GETAFFINITY            = 242\n\tSYS_SET_THREAD_AREA              = 243\n\tSYS_GET_THREAD_AREA              = 244\n\tSYS_IO_SETUP                     = 245\n\tSYS_IO_DESTROY                   = 246\n\tSYS_IO_GETEVENTS                 = 247\n\tSYS_IO_SUBMIT                    = 248\n\tSYS_IO_CANCEL                    = 249\n\tSYS_FADVISE64                    = 250\n\tSYS_EXIT_GROUP                   = 252\n\tSYS_LOOKUP_DCOOKIE               = 253\n\tSYS_EPOLL_CREATE                 = 254\n\tSYS_EPOLL_CTL                    = 255\n\tSYS_EPOLL_WAIT                   = 256\n\tSYS_REMAP_FILE_PAGES             = 257\n\tSYS_SET_TID_ADDRESS              = 258\n\tSYS_TIMER_CREATE                 = 259\n\tSYS_TIMER_SETTIME                = 260\n\tSYS_TIMER_GETTIME                = 261\n\tSYS_TIMER_GETOVERRUN             = 262\n\tSYS_TIMER_DELETE                 = 263\n\tSYS_CLOCK_SETTIME                = 264\n\tSYS_CLOCK_GETTIME                = 265\n\tSYS_CLOCK_GETRES                 = 266\n\tSYS_CLOCK_NANOSLEEP              = 267\n\tSYS_STATFS64                     = 268\n\tSYS_FSTATFS64                    = 269\n\tSYS_TGKILL                       = 270\n\tSYS_UTIMES                       = 271\n\tSYS_FADVISE64_64                 = 272\n\tSYS_VSERVER                      = 273\n\tSYS_MBIND                        = 274\n\tSYS_GET_MEMPOLICY                = 275\n\tSYS_SET_MEMPOLICY                = 276\n\tSYS_MQ_OPEN                      = 277\n\tSYS_MQ_UNLINK                    = 278\n\tSYS_MQ_TIMEDSEND                 = 279\n\tSYS_MQ_TIMEDRECEIVE              = 280\n\tSYS_MQ_NOTIFY                    = 281\n\tSYS_MQ_GETSETATTR                = 282\n\tSYS_KEXEC_LOAD                   = 283\n\tSYS_WAITID                       = 284\n\tSYS_ADD_KEY                      = 286\n\tSYS_REQUEST_KEY                  = 287\n\tSYS_KEYCTL                       = 288\n\tSYS_IOPRIO_SET                   = 289\n\tSYS_IOPRIO_GET                   = 290\n\tSYS_INOTIFY_INIT                 = 291\n\tSYS_INOTIFY_ADD_WATCH            = 292\n\tSYS_INOTIFY_RM_WATCH             = 293\n\tSYS_MIGRATE_PAGES                = 294\n\tSYS_OPENAT                       = 295\n\tSYS_MKDIRAT                      = 296\n\tSYS_MKNODAT                      = 297\n\tSYS_FCHOWNAT                     = 298\n\tSYS_FUTIMESAT                    = 299\n\tSYS_FSTATAT64                    = 300\n\tSYS_UNLINKAT                     = 301\n\tSYS_RENAMEAT                     = 302\n\tSYS_LINKAT                       = 303\n\tSYS_SYMLINKAT                    = 304\n\tSYS_READLINKAT                   = 305\n\tSYS_FCHMODAT                     = 306\n\tSYS_FACCESSAT                    = 307\n\tSYS_PSELECT6                     = 308\n\tSYS_PPOLL                        = 309\n\tSYS_UNSHARE                      = 310\n\tSYS_SET_ROBUST_LIST              = 311\n\tSYS_GET_ROBUST_LIST              = 312\n\tSYS_SPLICE                       = 313\n\tSYS_SYNC_FILE_RANGE              = 314\n\tSYS_TEE                          = 315\n\tSYS_VMSPLICE                     = 316\n\tSYS_MOVE_PAGES                   = 317\n\tSYS_GETCPU                       = 318\n\tSYS_EPOLL_PWAIT                  = 319\n\tSYS_UTIMENSAT                    = 320\n\tSYS_SIGNALFD                     = 321\n\tSYS_TIMERFD_CREATE               = 322\n\tSYS_EVENTFD                      = 323\n\tSYS_FALLOCATE                    = 324\n\tSYS_TIMERFD_SETTIME              = 325\n\tSYS_TIMERFD_GETTIME              = 326\n\tSYS_SIGNALFD4                    = 327\n\tSYS_EVENTFD2                     = 328\n\tSYS_EPOLL_CREATE1                = 329\n\tSYS_DUP3                         = 330\n\tSYS_PIPE2                        = 331\n\tSYS_INOTIFY_INIT1                = 332\n\tSYS_PREADV                       = 333\n\tSYS_PWRITEV                      = 334\n\tSYS_RT_TGSIGQUEUEINFO            = 335\n\tSYS_PERF_EVENT_OPEN              = 336\n\tSYS_RECVMMSG                     = 337\n\tSYS_FANOTIFY_INIT                = 338\n\tSYS_FANOTIFY_MARK                = 339\n\tSYS_PRLIMIT64                    = 340\n\tSYS_NAME_TO_HANDLE_AT            = 341\n\tSYS_OPEN_BY_HANDLE_AT            = 342\n\tSYS_CLOCK_ADJTIME                = 343\n\tSYS_SYNCFS                       = 344\n\tSYS_SENDMMSG                     = 345\n\tSYS_SETNS                        = 346\n\tSYS_PROCESS_VM_READV             = 347\n\tSYS_PROCESS_VM_WRITEV            = 348\n\tSYS_KCMP                         = 349\n\tSYS_FINIT_MODULE                 = 350\n\tSYS_SCHED_SETATTR                = 351\n\tSYS_SCHED_GETATTR                = 352\n\tSYS_RENAMEAT2                    = 353\n\tSYS_SECCOMP                      = 354\n\tSYS_GETRANDOM                    = 355\n\tSYS_MEMFD_CREATE                 = 356\n\tSYS_BPF                          = 357\n\tSYS_EXECVEAT                     = 358\n\tSYS_SOCKET                       = 359\n\tSYS_SOCKETPAIR                   = 360\n\tSYS_BIND                         = 361\n\tSYS_CONNECT                      = 362\n\tSYS_LISTEN                       = 363\n\tSYS_ACCEPT4                      = 364\n\tSYS_GETSOCKOPT                   = 365\n\tSYS_SETSOCKOPT                   = 366\n\tSYS_GETSOCKNAME                  = 367\n\tSYS_GETPEERNAME                  = 368\n\tSYS_SENDTO                       = 369\n\tSYS_SENDMSG                      = 370\n\tSYS_RECVFROM                     = 371\n\tSYS_RECVMSG                      = 372\n\tSYS_SHUTDOWN                     = 373\n\tSYS_USERFAULTFD                  = 374\n\tSYS_MEMBARRIER                   = 375\n\tSYS_MLOCK2                       = 376\n\tSYS_COPY_FILE_RANGE              = 377\n\tSYS_PREADV2                      = 378\n\tSYS_PWRITEV2                     = 379\n\tSYS_PKEY_MPROTECT                = 380\n\tSYS_PKEY_ALLOC                   = 381\n\tSYS_PKEY_FREE                    = 382\n\tSYS_STATX                        = 383\n\tSYS_ARCH_PRCTL                   = 384\n\tSYS_IO_PGETEVENTS                = 385\n\tSYS_RSEQ                         = 386\n\tSYS_SEMGET                       = 393\n\tSYS_SEMCTL                       = 394\n\tSYS_SHMGET                       = 395\n\tSYS_SHMCTL                       = 396\n\tSYS_SHMAT                        = 397\n\tSYS_SHMDT                        = 398\n\tSYS_MSGGET                       = 399\n\tSYS_MSGSND                       = 400\n\tSYS_MSGRCV                       = 401\n\tSYS_MSGCTL                       = 402\n\tSYS_CLOCK_GETTIME64              = 403\n\tSYS_CLOCK_SETTIME64              = 404\n\tSYS_CLOCK_ADJTIME64              = 405\n\tSYS_CLOCK_GETRES_TIME64          = 406\n\tSYS_CLOCK_NANOSLEEP_TIME64       = 407\n\tSYS_TIMER_GETTIME64              = 408\n\tSYS_TIMER_SETTIME64              = 409\n\tSYS_TIMERFD_GETTIME64            = 410\n\tSYS_TIMERFD_SETTIME64            = 411\n\tSYS_UTIMENSAT_TIME64             = 412\n\tSYS_PSELECT6_TIME64              = 413\n\tSYS_PPOLL_TIME64                 = 414\n\tSYS_IO_PGETEVENTS_TIME64         = 416\n\tSYS_RECVMMSG_TIME64              = 417\n\tSYS_MQ_TIMEDSEND_TIME64          = 418\n\tSYS_MQ_TIMEDRECEIVE_TIME64       = 419\n\tSYS_SEMTIMEDOP_TIME64            = 420\n\tSYS_RT_SIGTIMEDWAIT_TIME64       = 421\n\tSYS_FUTEX_TIME64                 = 422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 423\n\tSYS_PIDFD_SEND_SIGNAL            = 424\n\tSYS_IO_URING_SETUP               = 425\n\tSYS_IO_URING_ENTER               = 426\n\tSYS_IO_URING_REGISTER            = 427\n\tSYS_OPEN_TREE                    = 428\n\tSYS_MOVE_MOUNT                   = 429\n\tSYS_FSOPEN                       = 430\n\tSYS_FSCONFIG                     = 431\n\tSYS_FSMOUNT                      = 432\n\tSYS_FSPICK                       = 433\n\tSYS_PIDFD_OPEN                   = 434\n\tSYS_CLONE3                       = 435\n\tSYS_CLOSE_RANGE                  = 436\n\tSYS_OPENAT2                      = 437\n\tSYS_PIDFD_GETFD                  = 438\n\tSYS_FACCESSAT2                   = 439\n\tSYS_PROCESS_MADVISE              = 440\n\tSYS_EPOLL_PWAIT2                 = 441\n\tSYS_MOUNT_SETATTR                = 442\n\tSYS_QUOTACTL_FD                  = 443\n\tSYS_LANDLOCK_CREATE_RULESET      = 444\n\tSYS_LANDLOCK_ADD_RULE            = 445\n\tSYS_LANDLOCK_RESTRICT_SELF       = 446\n\tSYS_MEMFD_SECRET                 = 447\n\tSYS_PROCESS_MRELEASE             = 448\n\tSYS_FUTEX_WAITV                  = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE      = 450\n\tSYS_CACHESTAT                    = 451\n\tSYS_FCHMODAT2                    = 452\n\tSYS_MAP_SHADOW_STACK             = 453\n\tSYS_FUTEX_WAKE                   = 454\n\tSYS_FUTEX_WAIT                   = 455\n\tSYS_FUTEX_REQUEUE                = 456\n\tSYS_STATMOUNT                    = 457\n\tSYS_LISTMOUNT                    = 458\n\tSYS_LSM_GET_SELF_ATTR            = 459\n\tSYS_LSM_SET_SELF_ATTR            = 460\n\tSYS_LSM_LIST_MODULES             = 461\n\tSYS_MSEAL                        = 462\n\tSYS_SETXATTRAT                   = 463\n\tSYS_GETXATTRAT                   = 464\n\tSYS_LISTXATTRAT                  = 465\n\tSYS_REMOVEXATTRAT                = 466\n\tSYS_OPEN_TREE_ATTR               = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/amd64/include -m64 /tmp/amd64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && linux\n\npackage unix\n\nconst (\n\tSYS_READ                    = 0\n\tSYS_WRITE                   = 1\n\tSYS_OPEN                    = 2\n\tSYS_CLOSE                   = 3\n\tSYS_STAT                    = 4\n\tSYS_FSTAT                   = 5\n\tSYS_LSTAT                   = 6\n\tSYS_POLL                    = 7\n\tSYS_LSEEK                   = 8\n\tSYS_MMAP                    = 9\n\tSYS_MPROTECT                = 10\n\tSYS_MUNMAP                  = 11\n\tSYS_BRK                     = 12\n\tSYS_RT_SIGACTION            = 13\n\tSYS_RT_SIGPROCMASK          = 14\n\tSYS_RT_SIGRETURN            = 15\n\tSYS_IOCTL                   = 16\n\tSYS_PREAD64                 = 17\n\tSYS_PWRITE64                = 18\n\tSYS_READV                   = 19\n\tSYS_WRITEV                  = 20\n\tSYS_ACCESS                  = 21\n\tSYS_PIPE                    = 22\n\tSYS_SELECT                  = 23\n\tSYS_SCHED_YIELD             = 24\n\tSYS_MREMAP                  = 25\n\tSYS_MSYNC                   = 26\n\tSYS_MINCORE                 = 27\n\tSYS_MADVISE                 = 28\n\tSYS_SHMGET                  = 29\n\tSYS_SHMAT                   = 30\n\tSYS_SHMCTL                  = 31\n\tSYS_DUP                     = 32\n\tSYS_DUP2                    = 33\n\tSYS_PAUSE                   = 34\n\tSYS_NANOSLEEP               = 35\n\tSYS_GETITIMER               = 36\n\tSYS_ALARM                   = 37\n\tSYS_SETITIMER               = 38\n\tSYS_GETPID                  = 39\n\tSYS_SENDFILE                = 40\n\tSYS_SOCKET                  = 41\n\tSYS_CONNECT                 = 42\n\tSYS_ACCEPT                  = 43\n\tSYS_SENDTO                  = 44\n\tSYS_RECVFROM                = 45\n\tSYS_SENDMSG                 = 46\n\tSYS_RECVMSG                 = 47\n\tSYS_SHUTDOWN                = 48\n\tSYS_BIND                    = 49\n\tSYS_LISTEN                  = 50\n\tSYS_GETSOCKNAME             = 51\n\tSYS_GETPEERNAME             = 52\n\tSYS_SOCKETPAIR              = 53\n\tSYS_SETSOCKOPT              = 54\n\tSYS_GETSOCKOPT              = 55\n\tSYS_CLONE                   = 56\n\tSYS_FORK                    = 57\n\tSYS_VFORK                   = 58\n\tSYS_EXECVE                  = 59\n\tSYS_EXIT                    = 60\n\tSYS_WAIT4                   = 61\n\tSYS_KILL                    = 62\n\tSYS_UNAME                   = 63\n\tSYS_SEMGET                  = 64\n\tSYS_SEMOP                   = 65\n\tSYS_SEMCTL                  = 66\n\tSYS_SHMDT                   = 67\n\tSYS_MSGGET                  = 68\n\tSYS_MSGSND                  = 69\n\tSYS_MSGRCV                  = 70\n\tSYS_MSGCTL                  = 71\n\tSYS_FCNTL                   = 72\n\tSYS_FLOCK                   = 73\n\tSYS_FSYNC                   = 74\n\tSYS_FDATASYNC               = 75\n\tSYS_TRUNCATE                = 76\n\tSYS_FTRUNCATE               = 77\n\tSYS_GETDENTS                = 78\n\tSYS_GETCWD                  = 79\n\tSYS_CHDIR                   = 80\n\tSYS_FCHDIR                  = 81\n\tSYS_RENAME                  = 82\n\tSYS_MKDIR                   = 83\n\tSYS_RMDIR                   = 84\n\tSYS_CREAT                   = 85\n\tSYS_LINK                    = 86\n\tSYS_UNLINK                  = 87\n\tSYS_SYMLINK                 = 88\n\tSYS_READLINK                = 89\n\tSYS_CHMOD                   = 90\n\tSYS_FCHMOD                  = 91\n\tSYS_CHOWN                   = 92\n\tSYS_FCHOWN                  = 93\n\tSYS_LCHOWN                  = 94\n\tSYS_UMASK                   = 95\n\tSYS_GETTIMEOFDAY            = 96\n\tSYS_GETRLIMIT               = 97\n\tSYS_GETRUSAGE               = 98\n\tSYS_SYSINFO                 = 99\n\tSYS_TIMES                   = 100\n\tSYS_PTRACE                  = 101\n\tSYS_GETUID                  = 102\n\tSYS_SYSLOG                  = 103\n\tSYS_GETGID                  = 104\n\tSYS_SETUID                  = 105\n\tSYS_SETGID                  = 106\n\tSYS_GETEUID                 = 107\n\tSYS_GETEGID                 = 108\n\tSYS_SETPGID                 = 109\n\tSYS_GETPPID                 = 110\n\tSYS_GETPGRP                 = 111\n\tSYS_SETSID                  = 112\n\tSYS_SETREUID                = 113\n\tSYS_SETREGID                = 114\n\tSYS_GETGROUPS               = 115\n\tSYS_SETGROUPS               = 116\n\tSYS_SETRESUID               = 117\n\tSYS_GETRESUID               = 118\n\tSYS_SETRESGID               = 119\n\tSYS_GETRESGID               = 120\n\tSYS_GETPGID                 = 121\n\tSYS_SETFSUID                = 122\n\tSYS_SETFSGID                = 123\n\tSYS_GETSID                  = 124\n\tSYS_CAPGET                  = 125\n\tSYS_CAPSET                  = 126\n\tSYS_RT_SIGPENDING           = 127\n\tSYS_RT_SIGTIMEDWAIT         = 128\n\tSYS_RT_SIGQUEUEINFO         = 129\n\tSYS_RT_SIGSUSPEND           = 130\n\tSYS_SIGALTSTACK             = 131\n\tSYS_UTIME                   = 132\n\tSYS_MKNOD                   = 133\n\tSYS_USELIB                  = 134\n\tSYS_PERSONALITY             = 135\n\tSYS_USTAT                   = 136\n\tSYS_STATFS                  = 137\n\tSYS_FSTATFS                 = 138\n\tSYS_SYSFS                   = 139\n\tSYS_GETPRIORITY             = 140\n\tSYS_SETPRIORITY             = 141\n\tSYS_SCHED_SETPARAM          = 142\n\tSYS_SCHED_GETPARAM          = 143\n\tSYS_SCHED_SETSCHEDULER      = 144\n\tSYS_SCHED_GETSCHEDULER      = 145\n\tSYS_SCHED_GET_PRIORITY_MAX  = 146\n\tSYS_SCHED_GET_PRIORITY_MIN  = 147\n\tSYS_SCHED_RR_GET_INTERVAL   = 148\n\tSYS_MLOCK                   = 149\n\tSYS_MUNLOCK                 = 150\n\tSYS_MLOCKALL                = 151\n\tSYS_MUNLOCKALL              = 152\n\tSYS_VHANGUP                 = 153\n\tSYS_MODIFY_LDT              = 154\n\tSYS_PIVOT_ROOT              = 155\n\tSYS__SYSCTL                 = 156\n\tSYS_PRCTL                   = 157\n\tSYS_ARCH_PRCTL              = 158\n\tSYS_ADJTIMEX                = 159\n\tSYS_SETRLIMIT               = 160\n\tSYS_CHROOT                  = 161\n\tSYS_SYNC                    = 162\n\tSYS_ACCT                    = 163\n\tSYS_SETTIMEOFDAY            = 164\n\tSYS_MOUNT                   = 165\n\tSYS_UMOUNT2                 = 166\n\tSYS_SWAPON                  = 167\n\tSYS_SWAPOFF                 = 168\n\tSYS_REBOOT                  = 169\n\tSYS_SETHOSTNAME             = 170\n\tSYS_SETDOMAINNAME           = 171\n\tSYS_IOPL                    = 172\n\tSYS_IOPERM                  = 173\n\tSYS_CREATE_MODULE           = 174\n\tSYS_INIT_MODULE             = 175\n\tSYS_DELETE_MODULE           = 176\n\tSYS_GET_KERNEL_SYMS         = 177\n\tSYS_QUERY_MODULE            = 178\n\tSYS_QUOTACTL                = 179\n\tSYS_NFSSERVCTL              = 180\n\tSYS_GETPMSG                 = 181\n\tSYS_PUTPMSG                 = 182\n\tSYS_AFS_SYSCALL             = 183\n\tSYS_TUXCALL                 = 184\n\tSYS_SECURITY                = 185\n\tSYS_GETTID                  = 186\n\tSYS_READAHEAD               = 187\n\tSYS_SETXATTR                = 188\n\tSYS_LSETXATTR               = 189\n\tSYS_FSETXATTR               = 190\n\tSYS_GETXATTR                = 191\n\tSYS_LGETXATTR               = 192\n\tSYS_FGETXATTR               = 193\n\tSYS_LISTXATTR               = 194\n\tSYS_LLISTXATTR              = 195\n\tSYS_FLISTXATTR              = 196\n\tSYS_REMOVEXATTR             = 197\n\tSYS_LREMOVEXATTR            = 198\n\tSYS_FREMOVEXATTR            = 199\n\tSYS_TKILL                   = 200\n\tSYS_TIME                    = 201\n\tSYS_FUTEX                   = 202\n\tSYS_SCHED_SETAFFINITY       = 203\n\tSYS_SCHED_GETAFFINITY       = 204\n\tSYS_SET_THREAD_AREA         = 205\n\tSYS_IO_SETUP                = 206\n\tSYS_IO_DESTROY              = 207\n\tSYS_IO_GETEVENTS            = 208\n\tSYS_IO_SUBMIT               = 209\n\tSYS_IO_CANCEL               = 210\n\tSYS_GET_THREAD_AREA         = 211\n\tSYS_LOOKUP_DCOOKIE          = 212\n\tSYS_EPOLL_CREATE            = 213\n\tSYS_EPOLL_CTL_OLD           = 214\n\tSYS_EPOLL_WAIT_OLD          = 215\n\tSYS_REMAP_FILE_PAGES        = 216\n\tSYS_GETDENTS64              = 217\n\tSYS_SET_TID_ADDRESS         = 218\n\tSYS_RESTART_SYSCALL         = 219\n\tSYS_SEMTIMEDOP              = 220\n\tSYS_FADVISE64               = 221\n\tSYS_TIMER_CREATE            = 222\n\tSYS_TIMER_SETTIME           = 223\n\tSYS_TIMER_GETTIME           = 224\n\tSYS_TIMER_GETOVERRUN        = 225\n\tSYS_TIMER_DELETE            = 226\n\tSYS_CLOCK_SETTIME           = 227\n\tSYS_CLOCK_GETTIME           = 228\n\tSYS_CLOCK_GETRES            = 229\n\tSYS_CLOCK_NANOSLEEP         = 230\n\tSYS_EXIT_GROUP              = 231\n\tSYS_EPOLL_WAIT              = 232\n\tSYS_EPOLL_CTL               = 233\n\tSYS_TGKILL                  = 234\n\tSYS_UTIMES                  = 235\n\tSYS_VSERVER                 = 236\n\tSYS_MBIND                   = 237\n\tSYS_SET_MEMPOLICY           = 238\n\tSYS_GET_MEMPOLICY           = 239\n\tSYS_MQ_OPEN                 = 240\n\tSYS_MQ_UNLINK               = 241\n\tSYS_MQ_TIMEDSEND            = 242\n\tSYS_MQ_TIMEDRECEIVE         = 243\n\tSYS_MQ_NOTIFY               = 244\n\tSYS_MQ_GETSETATTR           = 245\n\tSYS_KEXEC_LOAD              = 246\n\tSYS_WAITID                  = 247\n\tSYS_ADD_KEY                 = 248\n\tSYS_REQUEST_KEY             = 249\n\tSYS_KEYCTL                  = 250\n\tSYS_IOPRIO_SET              = 251\n\tSYS_IOPRIO_GET              = 252\n\tSYS_INOTIFY_INIT            = 253\n\tSYS_INOTIFY_ADD_WATCH       = 254\n\tSYS_INOTIFY_RM_WATCH        = 255\n\tSYS_MIGRATE_PAGES           = 256\n\tSYS_OPENAT                  = 257\n\tSYS_MKDIRAT                 = 258\n\tSYS_MKNODAT                 = 259\n\tSYS_FCHOWNAT                = 260\n\tSYS_FUTIMESAT               = 261\n\tSYS_NEWFSTATAT              = 262\n\tSYS_UNLINKAT                = 263\n\tSYS_RENAMEAT                = 264\n\tSYS_LINKAT                  = 265\n\tSYS_SYMLINKAT               = 266\n\tSYS_READLINKAT              = 267\n\tSYS_FCHMODAT                = 268\n\tSYS_FACCESSAT               = 269\n\tSYS_PSELECT6                = 270\n\tSYS_PPOLL                   = 271\n\tSYS_UNSHARE                 = 272\n\tSYS_SET_ROBUST_LIST         = 273\n\tSYS_GET_ROBUST_LIST         = 274\n\tSYS_SPLICE                  = 275\n\tSYS_TEE                     = 276\n\tSYS_SYNC_FILE_RANGE         = 277\n\tSYS_VMSPLICE                = 278\n\tSYS_MOVE_PAGES              = 279\n\tSYS_UTIMENSAT               = 280\n\tSYS_EPOLL_PWAIT             = 281\n\tSYS_SIGNALFD                = 282\n\tSYS_TIMERFD_CREATE          = 283\n\tSYS_EVENTFD                 = 284\n\tSYS_FALLOCATE               = 285\n\tSYS_TIMERFD_SETTIME         = 286\n\tSYS_TIMERFD_GETTIME         = 287\n\tSYS_ACCEPT4                 = 288\n\tSYS_SIGNALFD4               = 289\n\tSYS_EVENTFD2                = 290\n\tSYS_EPOLL_CREATE1           = 291\n\tSYS_DUP3                    = 292\n\tSYS_PIPE2                   = 293\n\tSYS_INOTIFY_INIT1           = 294\n\tSYS_PREADV                  = 295\n\tSYS_PWRITEV                 = 296\n\tSYS_RT_TGSIGQUEUEINFO       = 297\n\tSYS_PERF_EVENT_OPEN         = 298\n\tSYS_RECVMMSG                = 299\n\tSYS_FANOTIFY_INIT           = 300\n\tSYS_FANOTIFY_MARK           = 301\n\tSYS_PRLIMIT64               = 302\n\tSYS_NAME_TO_HANDLE_AT       = 303\n\tSYS_OPEN_BY_HANDLE_AT       = 304\n\tSYS_CLOCK_ADJTIME           = 305\n\tSYS_SYNCFS                  = 306\n\tSYS_SENDMMSG                = 307\n\tSYS_SETNS                   = 308\n\tSYS_GETCPU                  = 309\n\tSYS_PROCESS_VM_READV        = 310\n\tSYS_PROCESS_VM_WRITEV       = 311\n\tSYS_KCMP                    = 312\n\tSYS_FINIT_MODULE            = 313\n\tSYS_SCHED_SETATTR           = 314\n\tSYS_SCHED_GETATTR           = 315\n\tSYS_RENAMEAT2               = 316\n\tSYS_SECCOMP                 = 317\n\tSYS_GETRANDOM               = 318\n\tSYS_MEMFD_CREATE            = 319\n\tSYS_KEXEC_FILE_LOAD         = 320\n\tSYS_BPF                     = 321\n\tSYS_EXECVEAT                = 322\n\tSYS_USERFAULTFD             = 323\n\tSYS_MEMBARRIER              = 324\n\tSYS_MLOCK2                  = 325\n\tSYS_COPY_FILE_RANGE         = 326\n\tSYS_PREADV2                 = 327\n\tSYS_PWRITEV2                = 328\n\tSYS_PKEY_MPROTECT           = 329\n\tSYS_PKEY_ALLOC              = 330\n\tSYS_PKEY_FREE               = 331\n\tSYS_STATX                   = 332\n\tSYS_IO_PGETEVENTS           = 333\n\tSYS_RSEQ                    = 334\n\tSYS_URETPROBE               = 335\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_MEMFD_SECRET            = 447\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm/include /tmp/arm/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && linux\n\npackage unix\n\nconst (\n\tSYS_SYSCALL_MASK                 = 0\n\tSYS_RESTART_SYSCALL              = 0\n\tSYS_EXIT                         = 1\n\tSYS_FORK                         = 2\n\tSYS_READ                         = 3\n\tSYS_WRITE                        = 4\n\tSYS_OPEN                         = 5\n\tSYS_CLOSE                        = 6\n\tSYS_CREAT                        = 8\n\tSYS_LINK                         = 9\n\tSYS_UNLINK                       = 10\n\tSYS_EXECVE                       = 11\n\tSYS_CHDIR                        = 12\n\tSYS_MKNOD                        = 14\n\tSYS_CHMOD                        = 15\n\tSYS_LCHOWN                       = 16\n\tSYS_LSEEK                        = 19\n\tSYS_GETPID                       = 20\n\tSYS_MOUNT                        = 21\n\tSYS_SETUID                       = 23\n\tSYS_GETUID                       = 24\n\tSYS_PTRACE                       = 26\n\tSYS_PAUSE                        = 29\n\tSYS_ACCESS                       = 33\n\tSYS_NICE                         = 34\n\tSYS_SYNC                         = 36\n\tSYS_KILL                         = 37\n\tSYS_RENAME                       = 38\n\tSYS_MKDIR                        = 39\n\tSYS_RMDIR                        = 40\n\tSYS_DUP                          = 41\n\tSYS_PIPE                         = 42\n\tSYS_TIMES                        = 43\n\tSYS_BRK                          = 45\n\tSYS_SETGID                       = 46\n\tSYS_GETGID                       = 47\n\tSYS_GETEUID                      = 49\n\tSYS_GETEGID                      = 50\n\tSYS_ACCT                         = 51\n\tSYS_UMOUNT2                      = 52\n\tSYS_IOCTL                        = 54\n\tSYS_FCNTL                        = 55\n\tSYS_SETPGID                      = 57\n\tSYS_UMASK                        = 60\n\tSYS_CHROOT                       = 61\n\tSYS_USTAT                        = 62\n\tSYS_DUP2                         = 63\n\tSYS_GETPPID                      = 64\n\tSYS_GETPGRP                      = 65\n\tSYS_SETSID                       = 66\n\tSYS_SIGACTION                    = 67\n\tSYS_SETREUID                     = 70\n\tSYS_SETREGID                     = 71\n\tSYS_SIGSUSPEND                   = 72\n\tSYS_SIGPENDING                   = 73\n\tSYS_SETHOSTNAME                  = 74\n\tSYS_SETRLIMIT                    = 75\n\tSYS_GETRUSAGE                    = 77\n\tSYS_GETTIMEOFDAY                 = 78\n\tSYS_SETTIMEOFDAY                 = 79\n\tSYS_GETGROUPS                    = 80\n\tSYS_SETGROUPS                    = 81\n\tSYS_SYMLINK                      = 83\n\tSYS_READLINK                     = 85\n\tSYS_USELIB                       = 86\n\tSYS_SWAPON                       = 87\n\tSYS_REBOOT                       = 88\n\tSYS_MUNMAP                       = 91\n\tSYS_TRUNCATE                     = 92\n\tSYS_FTRUNCATE                    = 93\n\tSYS_FCHMOD                       = 94\n\tSYS_FCHOWN                       = 95\n\tSYS_GETPRIORITY                  = 96\n\tSYS_SETPRIORITY                  = 97\n\tSYS_STATFS                       = 99\n\tSYS_FSTATFS                      = 100\n\tSYS_SYSLOG                       = 103\n\tSYS_SETITIMER                    = 104\n\tSYS_GETITIMER                    = 105\n\tSYS_STAT                         = 106\n\tSYS_LSTAT                        = 107\n\tSYS_FSTAT                        = 108\n\tSYS_VHANGUP                      = 111\n\tSYS_WAIT4                        = 114\n\tSYS_SWAPOFF                      = 115\n\tSYS_SYSINFO                      = 116\n\tSYS_FSYNC                        = 118\n\tSYS_SIGRETURN                    = 119\n\tSYS_CLONE                        = 120\n\tSYS_SETDOMAINNAME                = 121\n\tSYS_UNAME                        = 122\n\tSYS_ADJTIMEX                     = 124\n\tSYS_MPROTECT                     = 125\n\tSYS_SIGPROCMASK                  = 126\n\tSYS_INIT_MODULE                  = 128\n\tSYS_DELETE_MODULE                = 129\n\tSYS_QUOTACTL                     = 131\n\tSYS_GETPGID                      = 132\n\tSYS_FCHDIR                       = 133\n\tSYS_BDFLUSH                      = 134\n\tSYS_SYSFS                        = 135\n\tSYS_PERSONALITY                  = 136\n\tSYS_SETFSUID                     = 138\n\tSYS_SETFSGID                     = 139\n\tSYS__LLSEEK                      = 140\n\tSYS_GETDENTS                     = 141\n\tSYS__NEWSELECT                   = 142\n\tSYS_FLOCK                        = 143\n\tSYS_MSYNC                        = 144\n\tSYS_READV                        = 145\n\tSYS_WRITEV                       = 146\n\tSYS_GETSID                       = 147\n\tSYS_FDATASYNC                    = 148\n\tSYS__SYSCTL                      = 149\n\tSYS_MLOCK                        = 150\n\tSYS_MUNLOCK                      = 151\n\tSYS_MLOCKALL                     = 152\n\tSYS_MUNLOCKALL                   = 153\n\tSYS_SCHED_SETPARAM               = 154\n\tSYS_SCHED_GETPARAM               = 155\n\tSYS_SCHED_SETSCHEDULER           = 156\n\tSYS_SCHED_GETSCHEDULER           = 157\n\tSYS_SCHED_YIELD                  = 158\n\tSYS_SCHED_GET_PRIORITY_MAX       = 159\n\tSYS_SCHED_GET_PRIORITY_MIN       = 160\n\tSYS_SCHED_RR_GET_INTERVAL        = 161\n\tSYS_NANOSLEEP                    = 162\n\tSYS_MREMAP                       = 163\n\tSYS_SETRESUID                    = 164\n\tSYS_GETRESUID                    = 165\n\tSYS_POLL                         = 168\n\tSYS_NFSSERVCTL                   = 169\n\tSYS_SETRESGID                    = 170\n\tSYS_GETRESGID                    = 171\n\tSYS_PRCTL                        = 172\n\tSYS_RT_SIGRETURN                 = 173\n\tSYS_RT_SIGACTION                 = 174\n\tSYS_RT_SIGPROCMASK               = 175\n\tSYS_RT_SIGPENDING                = 176\n\tSYS_RT_SIGTIMEDWAIT              = 177\n\tSYS_RT_SIGQUEUEINFO              = 178\n\tSYS_RT_SIGSUSPEND                = 179\n\tSYS_PREAD64                      = 180\n\tSYS_PWRITE64                     = 181\n\tSYS_CHOWN                        = 182\n\tSYS_GETCWD                       = 183\n\tSYS_CAPGET                       = 184\n\tSYS_CAPSET                       = 185\n\tSYS_SIGALTSTACK                  = 186\n\tSYS_SENDFILE                     = 187\n\tSYS_VFORK                        = 190\n\tSYS_UGETRLIMIT                   = 191\n\tSYS_MMAP2                        = 192\n\tSYS_TRUNCATE64                   = 193\n\tSYS_FTRUNCATE64                  = 194\n\tSYS_STAT64                       = 195\n\tSYS_LSTAT64                      = 196\n\tSYS_FSTAT64                      = 197\n\tSYS_LCHOWN32                     = 198\n\tSYS_GETUID32                     = 199\n\tSYS_GETGID32                     = 200\n\tSYS_GETEUID32                    = 201\n\tSYS_GETEGID32                    = 202\n\tSYS_SETREUID32                   = 203\n\tSYS_SETREGID32                   = 204\n\tSYS_GETGROUPS32                  = 205\n\tSYS_SETGROUPS32                  = 206\n\tSYS_FCHOWN32                     = 207\n\tSYS_SETRESUID32                  = 208\n\tSYS_GETRESUID32                  = 209\n\tSYS_SETRESGID32                  = 210\n\tSYS_GETRESGID32                  = 211\n\tSYS_CHOWN32                      = 212\n\tSYS_SETUID32                     = 213\n\tSYS_SETGID32                     = 214\n\tSYS_SETFSUID32                   = 215\n\tSYS_SETFSGID32                   = 216\n\tSYS_GETDENTS64                   = 217\n\tSYS_PIVOT_ROOT                   = 218\n\tSYS_MINCORE                      = 219\n\tSYS_MADVISE                      = 220\n\tSYS_FCNTL64                      = 221\n\tSYS_GETTID                       = 224\n\tSYS_READAHEAD                    = 225\n\tSYS_SETXATTR                     = 226\n\tSYS_LSETXATTR                    = 227\n\tSYS_FSETXATTR                    = 228\n\tSYS_GETXATTR                     = 229\n\tSYS_LGETXATTR                    = 230\n\tSYS_FGETXATTR                    = 231\n\tSYS_LISTXATTR                    = 232\n\tSYS_LLISTXATTR                   = 233\n\tSYS_FLISTXATTR                   = 234\n\tSYS_REMOVEXATTR                  = 235\n\tSYS_LREMOVEXATTR                 = 236\n\tSYS_FREMOVEXATTR                 = 237\n\tSYS_TKILL                        = 238\n\tSYS_SENDFILE64                   = 239\n\tSYS_FUTEX                        = 240\n\tSYS_SCHED_SETAFFINITY            = 241\n\tSYS_SCHED_GETAFFINITY            = 242\n\tSYS_IO_SETUP                     = 243\n\tSYS_IO_DESTROY                   = 244\n\tSYS_IO_GETEVENTS                 = 245\n\tSYS_IO_SUBMIT                    = 246\n\tSYS_IO_CANCEL                    = 247\n\tSYS_EXIT_GROUP                   = 248\n\tSYS_LOOKUP_DCOOKIE               = 249\n\tSYS_EPOLL_CREATE                 = 250\n\tSYS_EPOLL_CTL                    = 251\n\tSYS_EPOLL_WAIT                   = 252\n\tSYS_REMAP_FILE_PAGES             = 253\n\tSYS_SET_TID_ADDRESS              = 256\n\tSYS_TIMER_CREATE                 = 257\n\tSYS_TIMER_SETTIME                = 258\n\tSYS_TIMER_GETTIME                = 259\n\tSYS_TIMER_GETOVERRUN             = 260\n\tSYS_TIMER_DELETE                 = 261\n\tSYS_CLOCK_SETTIME                = 262\n\tSYS_CLOCK_GETTIME                = 263\n\tSYS_CLOCK_GETRES                 = 264\n\tSYS_CLOCK_NANOSLEEP              = 265\n\tSYS_STATFS64                     = 266\n\tSYS_FSTATFS64                    = 267\n\tSYS_TGKILL                       = 268\n\tSYS_UTIMES                       = 269\n\tSYS_ARM_FADVISE64_64             = 270\n\tSYS_PCICONFIG_IOBASE             = 271\n\tSYS_PCICONFIG_READ               = 272\n\tSYS_PCICONFIG_WRITE              = 273\n\tSYS_MQ_OPEN                      = 274\n\tSYS_MQ_UNLINK                    = 275\n\tSYS_MQ_TIMEDSEND                 = 276\n\tSYS_MQ_TIMEDRECEIVE              = 277\n\tSYS_MQ_NOTIFY                    = 278\n\tSYS_MQ_GETSETATTR                = 279\n\tSYS_WAITID                       = 280\n\tSYS_SOCKET                       = 281\n\tSYS_BIND                         = 282\n\tSYS_CONNECT                      = 283\n\tSYS_LISTEN                       = 284\n\tSYS_ACCEPT                       = 285\n\tSYS_GETSOCKNAME                  = 286\n\tSYS_GETPEERNAME                  = 287\n\tSYS_SOCKETPAIR                   = 288\n\tSYS_SEND                         = 289\n\tSYS_SENDTO                       = 290\n\tSYS_RECV                         = 291\n\tSYS_RECVFROM                     = 292\n\tSYS_SHUTDOWN                     = 293\n\tSYS_SETSOCKOPT                   = 294\n\tSYS_GETSOCKOPT                   = 295\n\tSYS_SENDMSG                      = 296\n\tSYS_RECVMSG                      = 297\n\tSYS_SEMOP                        = 298\n\tSYS_SEMGET                       = 299\n\tSYS_SEMCTL                       = 300\n\tSYS_MSGSND                       = 301\n\tSYS_MSGRCV                       = 302\n\tSYS_MSGGET                       = 303\n\tSYS_MSGCTL                       = 304\n\tSYS_SHMAT                        = 305\n\tSYS_SHMDT                        = 306\n\tSYS_SHMGET                       = 307\n\tSYS_SHMCTL                       = 308\n\tSYS_ADD_KEY                      = 309\n\tSYS_REQUEST_KEY                  = 310\n\tSYS_KEYCTL                       = 311\n\tSYS_SEMTIMEDOP                   = 312\n\tSYS_VSERVER                      = 313\n\tSYS_IOPRIO_SET                   = 314\n\tSYS_IOPRIO_GET                   = 315\n\tSYS_INOTIFY_INIT                 = 316\n\tSYS_INOTIFY_ADD_WATCH            = 317\n\tSYS_INOTIFY_RM_WATCH             = 318\n\tSYS_MBIND                        = 319\n\tSYS_GET_MEMPOLICY                = 320\n\tSYS_SET_MEMPOLICY                = 321\n\tSYS_OPENAT                       = 322\n\tSYS_MKDIRAT                      = 323\n\tSYS_MKNODAT                      = 324\n\tSYS_FCHOWNAT                     = 325\n\tSYS_FUTIMESAT                    = 326\n\tSYS_FSTATAT64                    = 327\n\tSYS_UNLINKAT                     = 328\n\tSYS_RENAMEAT                     = 329\n\tSYS_LINKAT                       = 330\n\tSYS_SYMLINKAT                    = 331\n\tSYS_READLINKAT                   = 332\n\tSYS_FCHMODAT                     = 333\n\tSYS_FACCESSAT                    = 334\n\tSYS_PSELECT6                     = 335\n\tSYS_PPOLL                        = 336\n\tSYS_UNSHARE                      = 337\n\tSYS_SET_ROBUST_LIST              = 338\n\tSYS_GET_ROBUST_LIST              = 339\n\tSYS_SPLICE                       = 340\n\tSYS_ARM_SYNC_FILE_RANGE          = 341\n\tSYS_TEE                          = 342\n\tSYS_VMSPLICE                     = 343\n\tSYS_MOVE_PAGES                   = 344\n\tSYS_GETCPU                       = 345\n\tSYS_EPOLL_PWAIT                  = 346\n\tSYS_KEXEC_LOAD                   = 347\n\tSYS_UTIMENSAT                    = 348\n\tSYS_SIGNALFD                     = 349\n\tSYS_TIMERFD_CREATE               = 350\n\tSYS_EVENTFD                      = 351\n\tSYS_FALLOCATE                    = 352\n\tSYS_TIMERFD_SETTIME              = 353\n\tSYS_TIMERFD_GETTIME              = 354\n\tSYS_SIGNALFD4                    = 355\n\tSYS_EVENTFD2                     = 356\n\tSYS_EPOLL_CREATE1                = 357\n\tSYS_DUP3                         = 358\n\tSYS_PIPE2                        = 359\n\tSYS_INOTIFY_INIT1                = 360\n\tSYS_PREADV                       = 361\n\tSYS_PWRITEV                      = 362\n\tSYS_RT_TGSIGQUEUEINFO            = 363\n\tSYS_PERF_EVENT_OPEN              = 364\n\tSYS_RECVMMSG                     = 365\n\tSYS_ACCEPT4                      = 366\n\tSYS_FANOTIFY_INIT                = 367\n\tSYS_FANOTIFY_MARK                = 368\n\tSYS_PRLIMIT64                    = 369\n\tSYS_NAME_TO_HANDLE_AT            = 370\n\tSYS_OPEN_BY_HANDLE_AT            = 371\n\tSYS_CLOCK_ADJTIME                = 372\n\tSYS_SYNCFS                       = 373\n\tSYS_SENDMMSG                     = 374\n\tSYS_SETNS                        = 375\n\tSYS_PROCESS_VM_READV             = 376\n\tSYS_PROCESS_VM_WRITEV            = 377\n\tSYS_KCMP                         = 378\n\tSYS_FINIT_MODULE                 = 379\n\tSYS_SCHED_SETATTR                = 380\n\tSYS_SCHED_GETATTR                = 381\n\tSYS_RENAMEAT2                    = 382\n\tSYS_SECCOMP                      = 383\n\tSYS_GETRANDOM                    = 384\n\tSYS_MEMFD_CREATE                 = 385\n\tSYS_BPF                          = 386\n\tSYS_EXECVEAT                     = 387\n\tSYS_USERFAULTFD                  = 388\n\tSYS_MEMBARRIER                   = 389\n\tSYS_MLOCK2                       = 390\n\tSYS_COPY_FILE_RANGE              = 391\n\tSYS_PREADV2                      = 392\n\tSYS_PWRITEV2                     = 393\n\tSYS_PKEY_MPROTECT                = 394\n\tSYS_PKEY_ALLOC                   = 395\n\tSYS_PKEY_FREE                    = 396\n\tSYS_STATX                        = 397\n\tSYS_RSEQ                         = 398\n\tSYS_IO_PGETEVENTS                = 399\n\tSYS_MIGRATE_PAGES                = 400\n\tSYS_KEXEC_FILE_LOAD              = 401\n\tSYS_CLOCK_GETTIME64              = 403\n\tSYS_CLOCK_SETTIME64              = 404\n\tSYS_CLOCK_ADJTIME64              = 405\n\tSYS_CLOCK_GETRES_TIME64          = 406\n\tSYS_CLOCK_NANOSLEEP_TIME64       = 407\n\tSYS_TIMER_GETTIME64              = 408\n\tSYS_TIMER_SETTIME64              = 409\n\tSYS_TIMERFD_GETTIME64            = 410\n\tSYS_TIMERFD_SETTIME64            = 411\n\tSYS_UTIMENSAT_TIME64             = 412\n\tSYS_PSELECT6_TIME64              = 413\n\tSYS_PPOLL_TIME64                 = 414\n\tSYS_IO_PGETEVENTS_TIME64         = 416\n\tSYS_RECVMMSG_TIME64              = 417\n\tSYS_MQ_TIMEDSEND_TIME64          = 418\n\tSYS_MQ_TIMEDRECEIVE_TIME64       = 419\n\tSYS_SEMTIMEDOP_TIME64            = 420\n\tSYS_RT_SIGTIMEDWAIT_TIME64       = 421\n\tSYS_FUTEX_TIME64                 = 422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 423\n\tSYS_PIDFD_SEND_SIGNAL            = 424\n\tSYS_IO_URING_SETUP               = 425\n\tSYS_IO_URING_ENTER               = 426\n\tSYS_IO_URING_REGISTER            = 427\n\tSYS_OPEN_TREE                    = 428\n\tSYS_MOVE_MOUNT                   = 429\n\tSYS_FSOPEN                       = 430\n\tSYS_FSCONFIG                     = 431\n\tSYS_FSMOUNT                      = 432\n\tSYS_FSPICK                       = 433\n\tSYS_PIDFD_OPEN                   = 434\n\tSYS_CLONE3                       = 435\n\tSYS_CLOSE_RANGE                  = 436\n\tSYS_OPENAT2                      = 437\n\tSYS_PIDFD_GETFD                  = 438\n\tSYS_FACCESSAT2                   = 439\n\tSYS_PROCESS_MADVISE              = 440\n\tSYS_EPOLL_PWAIT2                 = 441\n\tSYS_MOUNT_SETATTR                = 442\n\tSYS_QUOTACTL_FD                  = 443\n\tSYS_LANDLOCK_CREATE_RULESET      = 444\n\tSYS_LANDLOCK_ADD_RULE            = 445\n\tSYS_LANDLOCK_RESTRICT_SELF       = 446\n\tSYS_PROCESS_MRELEASE             = 448\n\tSYS_FUTEX_WAITV                  = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE      = 450\n\tSYS_CACHESTAT                    = 451\n\tSYS_FCHMODAT2                    = 452\n\tSYS_MAP_SHADOW_STACK             = 453\n\tSYS_FUTEX_WAKE                   = 454\n\tSYS_FUTEX_WAIT                   = 455\n\tSYS_FUTEX_REQUEUE                = 456\n\tSYS_STATMOUNT                    = 457\n\tSYS_LISTMOUNT                    = 458\n\tSYS_LSM_GET_SELF_ATTR            = 459\n\tSYS_LSM_SET_SELF_ATTR            = 460\n\tSYS_LSM_LIST_MODULES             = 461\n\tSYS_MSEAL                        = 462\n\tSYS_SETXATTRAT                   = 463\n\tSYS_GETXATTRAT                   = 464\n\tSYS_LISTXATTRAT                  = 465\n\tSYS_REMOVEXATTRAT                = 466\n\tSYS_OPEN_TREE_ATTR               = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm64/include -fsigned-char /tmp/arm64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && linux\n\npackage unix\n\nconst (\n\tSYS_IO_SETUP                = 0\n\tSYS_IO_DESTROY              = 1\n\tSYS_IO_SUBMIT               = 2\n\tSYS_IO_CANCEL               = 3\n\tSYS_IO_GETEVENTS            = 4\n\tSYS_SETXATTR                = 5\n\tSYS_LSETXATTR               = 6\n\tSYS_FSETXATTR               = 7\n\tSYS_GETXATTR                = 8\n\tSYS_LGETXATTR               = 9\n\tSYS_FGETXATTR               = 10\n\tSYS_LISTXATTR               = 11\n\tSYS_LLISTXATTR              = 12\n\tSYS_FLISTXATTR              = 13\n\tSYS_REMOVEXATTR             = 14\n\tSYS_LREMOVEXATTR            = 15\n\tSYS_FREMOVEXATTR            = 16\n\tSYS_GETCWD                  = 17\n\tSYS_LOOKUP_DCOOKIE          = 18\n\tSYS_EVENTFD2                = 19\n\tSYS_EPOLL_CREATE1           = 20\n\tSYS_EPOLL_CTL               = 21\n\tSYS_EPOLL_PWAIT             = 22\n\tSYS_DUP                     = 23\n\tSYS_DUP3                    = 24\n\tSYS_FCNTL                   = 25\n\tSYS_INOTIFY_INIT1           = 26\n\tSYS_INOTIFY_ADD_WATCH       = 27\n\tSYS_INOTIFY_RM_WATCH        = 28\n\tSYS_IOCTL                   = 29\n\tSYS_IOPRIO_SET              = 30\n\tSYS_IOPRIO_GET              = 31\n\tSYS_FLOCK                   = 32\n\tSYS_MKNODAT                 = 33\n\tSYS_MKDIRAT                 = 34\n\tSYS_UNLINKAT                = 35\n\tSYS_SYMLINKAT               = 36\n\tSYS_LINKAT                  = 37\n\tSYS_RENAMEAT                = 38\n\tSYS_UMOUNT2                 = 39\n\tSYS_MOUNT                   = 40\n\tSYS_PIVOT_ROOT              = 41\n\tSYS_NFSSERVCTL              = 42\n\tSYS_STATFS                  = 43\n\tSYS_FSTATFS                 = 44\n\tSYS_TRUNCATE                = 45\n\tSYS_FTRUNCATE               = 46\n\tSYS_FALLOCATE               = 47\n\tSYS_FACCESSAT               = 48\n\tSYS_CHDIR                   = 49\n\tSYS_FCHDIR                  = 50\n\tSYS_CHROOT                  = 51\n\tSYS_FCHMOD                  = 52\n\tSYS_FCHMODAT                = 53\n\tSYS_FCHOWNAT                = 54\n\tSYS_FCHOWN                  = 55\n\tSYS_OPENAT                  = 56\n\tSYS_CLOSE                   = 57\n\tSYS_VHANGUP                 = 58\n\tSYS_PIPE2                   = 59\n\tSYS_QUOTACTL                = 60\n\tSYS_GETDENTS64              = 61\n\tSYS_LSEEK                   = 62\n\tSYS_READ                    = 63\n\tSYS_WRITE                   = 64\n\tSYS_READV                   = 65\n\tSYS_WRITEV                  = 66\n\tSYS_PREAD64                 = 67\n\tSYS_PWRITE64                = 68\n\tSYS_PREADV                  = 69\n\tSYS_PWRITEV                 = 70\n\tSYS_SENDFILE                = 71\n\tSYS_PSELECT6                = 72\n\tSYS_PPOLL                   = 73\n\tSYS_SIGNALFD4               = 74\n\tSYS_VMSPLICE                = 75\n\tSYS_SPLICE                  = 76\n\tSYS_TEE                     = 77\n\tSYS_READLINKAT              = 78\n\tSYS_NEWFSTATAT              = 79\n\tSYS_FSTAT                   = 80\n\tSYS_SYNC                    = 81\n\tSYS_FSYNC                   = 82\n\tSYS_FDATASYNC               = 83\n\tSYS_SYNC_FILE_RANGE         = 84\n\tSYS_TIMERFD_CREATE          = 85\n\tSYS_TIMERFD_SETTIME         = 86\n\tSYS_TIMERFD_GETTIME         = 87\n\tSYS_UTIMENSAT               = 88\n\tSYS_ACCT                    = 89\n\tSYS_CAPGET                  = 90\n\tSYS_CAPSET                  = 91\n\tSYS_PERSONALITY             = 92\n\tSYS_EXIT                    = 93\n\tSYS_EXIT_GROUP              = 94\n\tSYS_WAITID                  = 95\n\tSYS_SET_TID_ADDRESS         = 96\n\tSYS_UNSHARE                 = 97\n\tSYS_FUTEX                   = 98\n\tSYS_SET_ROBUST_LIST         = 99\n\tSYS_GET_ROBUST_LIST         = 100\n\tSYS_NANOSLEEP               = 101\n\tSYS_GETITIMER               = 102\n\tSYS_SETITIMER               = 103\n\tSYS_KEXEC_LOAD              = 104\n\tSYS_INIT_MODULE             = 105\n\tSYS_DELETE_MODULE           = 106\n\tSYS_TIMER_CREATE            = 107\n\tSYS_TIMER_GETTIME           = 108\n\tSYS_TIMER_GETOVERRUN        = 109\n\tSYS_TIMER_SETTIME           = 110\n\tSYS_TIMER_DELETE            = 111\n\tSYS_CLOCK_SETTIME           = 112\n\tSYS_CLOCK_GETTIME           = 113\n\tSYS_CLOCK_GETRES            = 114\n\tSYS_CLOCK_NANOSLEEP         = 115\n\tSYS_SYSLOG                  = 116\n\tSYS_PTRACE                  = 117\n\tSYS_SCHED_SETPARAM          = 118\n\tSYS_SCHED_SETSCHEDULER      = 119\n\tSYS_SCHED_GETSCHEDULER      = 120\n\tSYS_SCHED_GETPARAM          = 121\n\tSYS_SCHED_SETAFFINITY       = 122\n\tSYS_SCHED_GETAFFINITY       = 123\n\tSYS_SCHED_YIELD             = 124\n\tSYS_SCHED_GET_PRIORITY_MAX  = 125\n\tSYS_SCHED_GET_PRIORITY_MIN  = 126\n\tSYS_SCHED_RR_GET_INTERVAL   = 127\n\tSYS_RESTART_SYSCALL         = 128\n\tSYS_KILL                    = 129\n\tSYS_TKILL                   = 130\n\tSYS_TGKILL                  = 131\n\tSYS_SIGALTSTACK             = 132\n\tSYS_RT_SIGSUSPEND           = 133\n\tSYS_RT_SIGACTION            = 134\n\tSYS_RT_SIGPROCMASK          = 135\n\tSYS_RT_SIGPENDING           = 136\n\tSYS_RT_SIGTIMEDWAIT         = 137\n\tSYS_RT_SIGQUEUEINFO         = 138\n\tSYS_RT_SIGRETURN            = 139\n\tSYS_SETPRIORITY             = 140\n\tSYS_GETPRIORITY             = 141\n\tSYS_REBOOT                  = 142\n\tSYS_SETREGID                = 143\n\tSYS_SETGID                  = 144\n\tSYS_SETREUID                = 145\n\tSYS_SETUID                  = 146\n\tSYS_SETRESUID               = 147\n\tSYS_GETRESUID               = 148\n\tSYS_SETRESGID               = 149\n\tSYS_GETRESGID               = 150\n\tSYS_SETFSUID                = 151\n\tSYS_SETFSGID                = 152\n\tSYS_TIMES                   = 153\n\tSYS_SETPGID                 = 154\n\tSYS_GETPGID                 = 155\n\tSYS_GETSID                  = 156\n\tSYS_SETSID                  = 157\n\tSYS_GETGROUPS               = 158\n\tSYS_SETGROUPS               = 159\n\tSYS_UNAME                   = 160\n\tSYS_SETHOSTNAME             = 161\n\tSYS_SETDOMAINNAME           = 162\n\tSYS_GETRLIMIT               = 163\n\tSYS_SETRLIMIT               = 164\n\tSYS_GETRUSAGE               = 165\n\tSYS_UMASK                   = 166\n\tSYS_PRCTL                   = 167\n\tSYS_GETCPU                  = 168\n\tSYS_GETTIMEOFDAY            = 169\n\tSYS_SETTIMEOFDAY            = 170\n\tSYS_ADJTIMEX                = 171\n\tSYS_GETPID                  = 172\n\tSYS_GETPPID                 = 173\n\tSYS_GETUID                  = 174\n\tSYS_GETEUID                 = 175\n\tSYS_GETGID                  = 176\n\tSYS_GETEGID                 = 177\n\tSYS_GETTID                  = 178\n\tSYS_SYSINFO                 = 179\n\tSYS_MQ_OPEN                 = 180\n\tSYS_MQ_UNLINK               = 181\n\tSYS_MQ_TIMEDSEND            = 182\n\tSYS_MQ_TIMEDRECEIVE         = 183\n\tSYS_MQ_NOTIFY               = 184\n\tSYS_MQ_GETSETATTR           = 185\n\tSYS_MSGGET                  = 186\n\tSYS_MSGCTL                  = 187\n\tSYS_MSGRCV                  = 188\n\tSYS_MSGSND                  = 189\n\tSYS_SEMGET                  = 190\n\tSYS_SEMCTL                  = 191\n\tSYS_SEMTIMEDOP              = 192\n\tSYS_SEMOP                   = 193\n\tSYS_SHMGET                  = 194\n\tSYS_SHMCTL                  = 195\n\tSYS_SHMAT                   = 196\n\tSYS_SHMDT                   = 197\n\tSYS_SOCKET                  = 198\n\tSYS_SOCKETPAIR              = 199\n\tSYS_BIND                    = 200\n\tSYS_LISTEN                  = 201\n\tSYS_ACCEPT                  = 202\n\tSYS_CONNECT                 = 203\n\tSYS_GETSOCKNAME             = 204\n\tSYS_GETPEERNAME             = 205\n\tSYS_SENDTO                  = 206\n\tSYS_RECVFROM                = 207\n\tSYS_SETSOCKOPT              = 208\n\tSYS_GETSOCKOPT              = 209\n\tSYS_SHUTDOWN                = 210\n\tSYS_SENDMSG                 = 211\n\tSYS_RECVMSG                 = 212\n\tSYS_READAHEAD               = 213\n\tSYS_BRK                     = 214\n\tSYS_MUNMAP                  = 215\n\tSYS_MREMAP                  = 216\n\tSYS_ADD_KEY                 = 217\n\tSYS_REQUEST_KEY             = 218\n\tSYS_KEYCTL                  = 219\n\tSYS_CLONE                   = 220\n\tSYS_EXECVE                  = 221\n\tSYS_MMAP                    = 222\n\tSYS_FADVISE64               = 223\n\tSYS_SWAPON                  = 224\n\tSYS_SWAPOFF                 = 225\n\tSYS_MPROTECT                = 226\n\tSYS_MSYNC                   = 227\n\tSYS_MLOCK                   = 228\n\tSYS_MUNLOCK                 = 229\n\tSYS_MLOCKALL                = 230\n\tSYS_MUNLOCKALL              = 231\n\tSYS_MINCORE                 = 232\n\tSYS_MADVISE                 = 233\n\tSYS_REMAP_FILE_PAGES        = 234\n\tSYS_MBIND                   = 235\n\tSYS_GET_MEMPOLICY           = 236\n\tSYS_SET_MEMPOLICY           = 237\n\tSYS_MIGRATE_PAGES           = 238\n\tSYS_MOVE_PAGES              = 239\n\tSYS_RT_TGSIGQUEUEINFO       = 240\n\tSYS_PERF_EVENT_OPEN         = 241\n\tSYS_ACCEPT4                 = 242\n\tSYS_RECVMMSG                = 243\n\tSYS_ARCH_SPECIFIC_SYSCALL   = 244\n\tSYS_WAIT4                   = 260\n\tSYS_PRLIMIT64               = 261\n\tSYS_FANOTIFY_INIT           = 262\n\tSYS_FANOTIFY_MARK           = 263\n\tSYS_NAME_TO_HANDLE_AT       = 264\n\tSYS_OPEN_BY_HANDLE_AT       = 265\n\tSYS_CLOCK_ADJTIME           = 266\n\tSYS_SYNCFS                  = 267\n\tSYS_SETNS                   = 268\n\tSYS_SENDMMSG                = 269\n\tSYS_PROCESS_VM_READV        = 270\n\tSYS_PROCESS_VM_WRITEV       = 271\n\tSYS_KCMP                    = 272\n\tSYS_FINIT_MODULE            = 273\n\tSYS_SCHED_SETATTR           = 274\n\tSYS_SCHED_GETATTR           = 275\n\tSYS_RENAMEAT2               = 276\n\tSYS_SECCOMP                 = 277\n\tSYS_GETRANDOM               = 278\n\tSYS_MEMFD_CREATE            = 279\n\tSYS_BPF                     = 280\n\tSYS_EXECVEAT                = 281\n\tSYS_USERFAULTFD             = 282\n\tSYS_MEMBARRIER              = 283\n\tSYS_MLOCK2                  = 284\n\tSYS_COPY_FILE_RANGE         = 285\n\tSYS_PREADV2                 = 286\n\tSYS_PWRITEV2                = 287\n\tSYS_PKEY_MPROTECT           = 288\n\tSYS_PKEY_ALLOC              = 289\n\tSYS_PKEY_FREE               = 290\n\tSYS_STATX                   = 291\n\tSYS_IO_PGETEVENTS           = 292\n\tSYS_RSEQ                    = 293\n\tSYS_KEXEC_FILE_LOAD         = 294\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_MEMFD_SECRET            = 447\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/loong64/include /tmp/loong64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build loong64 && linux\n\npackage unix\n\nconst (\n\tSYS_IO_SETUP                = 0\n\tSYS_IO_DESTROY              = 1\n\tSYS_IO_SUBMIT               = 2\n\tSYS_IO_CANCEL               = 3\n\tSYS_IO_GETEVENTS            = 4\n\tSYS_SETXATTR                = 5\n\tSYS_LSETXATTR               = 6\n\tSYS_FSETXATTR               = 7\n\tSYS_GETXATTR                = 8\n\tSYS_LGETXATTR               = 9\n\tSYS_FGETXATTR               = 10\n\tSYS_LISTXATTR               = 11\n\tSYS_LLISTXATTR              = 12\n\tSYS_FLISTXATTR              = 13\n\tSYS_REMOVEXATTR             = 14\n\tSYS_LREMOVEXATTR            = 15\n\tSYS_FREMOVEXATTR            = 16\n\tSYS_GETCWD                  = 17\n\tSYS_LOOKUP_DCOOKIE          = 18\n\tSYS_EVENTFD2                = 19\n\tSYS_EPOLL_CREATE1           = 20\n\tSYS_EPOLL_CTL               = 21\n\tSYS_EPOLL_PWAIT             = 22\n\tSYS_DUP                     = 23\n\tSYS_DUP3                    = 24\n\tSYS_FCNTL                   = 25\n\tSYS_INOTIFY_INIT1           = 26\n\tSYS_INOTIFY_ADD_WATCH       = 27\n\tSYS_INOTIFY_RM_WATCH        = 28\n\tSYS_IOCTL                   = 29\n\tSYS_IOPRIO_SET              = 30\n\tSYS_IOPRIO_GET              = 31\n\tSYS_FLOCK                   = 32\n\tSYS_MKNODAT                 = 33\n\tSYS_MKDIRAT                 = 34\n\tSYS_UNLINKAT                = 35\n\tSYS_SYMLINKAT               = 36\n\tSYS_LINKAT                  = 37\n\tSYS_UMOUNT2                 = 39\n\tSYS_MOUNT                   = 40\n\tSYS_PIVOT_ROOT              = 41\n\tSYS_NFSSERVCTL              = 42\n\tSYS_STATFS                  = 43\n\tSYS_FSTATFS                 = 44\n\tSYS_TRUNCATE                = 45\n\tSYS_FTRUNCATE               = 46\n\tSYS_FALLOCATE               = 47\n\tSYS_FACCESSAT               = 48\n\tSYS_CHDIR                   = 49\n\tSYS_FCHDIR                  = 50\n\tSYS_CHROOT                  = 51\n\tSYS_FCHMOD                  = 52\n\tSYS_FCHMODAT                = 53\n\tSYS_FCHOWNAT                = 54\n\tSYS_FCHOWN                  = 55\n\tSYS_OPENAT                  = 56\n\tSYS_CLOSE                   = 57\n\tSYS_VHANGUP                 = 58\n\tSYS_PIPE2                   = 59\n\tSYS_QUOTACTL                = 60\n\tSYS_GETDENTS64              = 61\n\tSYS_LSEEK                   = 62\n\tSYS_READ                    = 63\n\tSYS_WRITE                   = 64\n\tSYS_READV                   = 65\n\tSYS_WRITEV                  = 66\n\tSYS_PREAD64                 = 67\n\tSYS_PWRITE64                = 68\n\tSYS_PREADV                  = 69\n\tSYS_PWRITEV                 = 70\n\tSYS_SENDFILE                = 71\n\tSYS_PSELECT6                = 72\n\tSYS_PPOLL                   = 73\n\tSYS_SIGNALFD4               = 74\n\tSYS_VMSPLICE                = 75\n\tSYS_SPLICE                  = 76\n\tSYS_TEE                     = 77\n\tSYS_READLINKAT              = 78\n\tSYS_NEWFSTATAT              = 79\n\tSYS_FSTAT                   = 80\n\tSYS_SYNC                    = 81\n\tSYS_FSYNC                   = 82\n\tSYS_FDATASYNC               = 83\n\tSYS_SYNC_FILE_RANGE         = 84\n\tSYS_TIMERFD_CREATE          = 85\n\tSYS_TIMERFD_SETTIME         = 86\n\tSYS_TIMERFD_GETTIME         = 87\n\tSYS_UTIMENSAT               = 88\n\tSYS_ACCT                    = 89\n\tSYS_CAPGET                  = 90\n\tSYS_CAPSET                  = 91\n\tSYS_PERSONALITY             = 92\n\tSYS_EXIT                    = 93\n\tSYS_EXIT_GROUP              = 94\n\tSYS_WAITID                  = 95\n\tSYS_SET_TID_ADDRESS         = 96\n\tSYS_UNSHARE                 = 97\n\tSYS_FUTEX                   = 98\n\tSYS_SET_ROBUST_LIST         = 99\n\tSYS_GET_ROBUST_LIST         = 100\n\tSYS_NANOSLEEP               = 101\n\tSYS_GETITIMER               = 102\n\tSYS_SETITIMER               = 103\n\tSYS_KEXEC_LOAD              = 104\n\tSYS_INIT_MODULE             = 105\n\tSYS_DELETE_MODULE           = 106\n\tSYS_TIMER_CREATE            = 107\n\tSYS_TIMER_GETTIME           = 108\n\tSYS_TIMER_GETOVERRUN        = 109\n\tSYS_TIMER_SETTIME           = 110\n\tSYS_TIMER_DELETE            = 111\n\tSYS_CLOCK_SETTIME           = 112\n\tSYS_CLOCK_GETTIME           = 113\n\tSYS_CLOCK_GETRES            = 114\n\tSYS_CLOCK_NANOSLEEP         = 115\n\tSYS_SYSLOG                  = 116\n\tSYS_PTRACE                  = 117\n\tSYS_SCHED_SETPARAM          = 118\n\tSYS_SCHED_SETSCHEDULER      = 119\n\tSYS_SCHED_GETSCHEDULER      = 120\n\tSYS_SCHED_GETPARAM          = 121\n\tSYS_SCHED_SETAFFINITY       = 122\n\tSYS_SCHED_GETAFFINITY       = 123\n\tSYS_SCHED_YIELD             = 124\n\tSYS_SCHED_GET_PRIORITY_MAX  = 125\n\tSYS_SCHED_GET_PRIORITY_MIN  = 126\n\tSYS_SCHED_RR_GET_INTERVAL   = 127\n\tSYS_RESTART_SYSCALL         = 128\n\tSYS_KILL                    = 129\n\tSYS_TKILL                   = 130\n\tSYS_TGKILL                  = 131\n\tSYS_SIGALTSTACK             = 132\n\tSYS_RT_SIGSUSPEND           = 133\n\tSYS_RT_SIGACTION            = 134\n\tSYS_RT_SIGPROCMASK          = 135\n\tSYS_RT_SIGPENDING           = 136\n\tSYS_RT_SIGTIMEDWAIT         = 137\n\tSYS_RT_SIGQUEUEINFO         = 138\n\tSYS_RT_SIGRETURN            = 139\n\tSYS_SETPRIORITY             = 140\n\tSYS_GETPRIORITY             = 141\n\tSYS_REBOOT                  = 142\n\tSYS_SETREGID                = 143\n\tSYS_SETGID                  = 144\n\tSYS_SETREUID                = 145\n\tSYS_SETUID                  = 146\n\tSYS_SETRESUID               = 147\n\tSYS_GETRESUID               = 148\n\tSYS_SETRESGID               = 149\n\tSYS_GETRESGID               = 150\n\tSYS_SETFSUID                = 151\n\tSYS_SETFSGID                = 152\n\tSYS_TIMES                   = 153\n\tSYS_SETPGID                 = 154\n\tSYS_GETPGID                 = 155\n\tSYS_GETSID                  = 156\n\tSYS_SETSID                  = 157\n\tSYS_GETGROUPS               = 158\n\tSYS_SETGROUPS               = 159\n\tSYS_UNAME                   = 160\n\tSYS_SETHOSTNAME             = 161\n\tSYS_SETDOMAINNAME           = 162\n\tSYS_GETRUSAGE               = 165\n\tSYS_UMASK                   = 166\n\tSYS_PRCTL                   = 167\n\tSYS_GETCPU                  = 168\n\tSYS_GETTIMEOFDAY            = 169\n\tSYS_SETTIMEOFDAY            = 170\n\tSYS_ADJTIMEX                = 171\n\tSYS_GETPID                  = 172\n\tSYS_GETPPID                 = 173\n\tSYS_GETUID                  = 174\n\tSYS_GETEUID                 = 175\n\tSYS_GETGID                  = 176\n\tSYS_GETEGID                 = 177\n\tSYS_GETTID                  = 178\n\tSYS_SYSINFO                 = 179\n\tSYS_MQ_OPEN                 = 180\n\tSYS_MQ_UNLINK               = 181\n\tSYS_MQ_TIMEDSEND            = 182\n\tSYS_MQ_TIMEDRECEIVE         = 183\n\tSYS_MQ_NOTIFY               = 184\n\tSYS_MQ_GETSETATTR           = 185\n\tSYS_MSGGET                  = 186\n\tSYS_MSGCTL                  = 187\n\tSYS_MSGRCV                  = 188\n\tSYS_MSGSND                  = 189\n\tSYS_SEMGET                  = 190\n\tSYS_SEMCTL                  = 191\n\tSYS_SEMTIMEDOP              = 192\n\tSYS_SEMOP                   = 193\n\tSYS_SHMGET                  = 194\n\tSYS_SHMCTL                  = 195\n\tSYS_SHMAT                   = 196\n\tSYS_SHMDT                   = 197\n\tSYS_SOCKET                  = 198\n\tSYS_SOCKETPAIR              = 199\n\tSYS_BIND                    = 200\n\tSYS_LISTEN                  = 201\n\tSYS_ACCEPT                  = 202\n\tSYS_CONNECT                 = 203\n\tSYS_GETSOCKNAME             = 204\n\tSYS_GETPEERNAME             = 205\n\tSYS_SENDTO                  = 206\n\tSYS_RECVFROM                = 207\n\tSYS_SETSOCKOPT              = 208\n\tSYS_GETSOCKOPT              = 209\n\tSYS_SHUTDOWN                = 210\n\tSYS_SENDMSG                 = 211\n\tSYS_RECVMSG                 = 212\n\tSYS_READAHEAD               = 213\n\tSYS_BRK                     = 214\n\tSYS_MUNMAP                  = 215\n\tSYS_MREMAP                  = 216\n\tSYS_ADD_KEY                 = 217\n\tSYS_REQUEST_KEY             = 218\n\tSYS_KEYCTL                  = 219\n\tSYS_CLONE                   = 220\n\tSYS_EXECVE                  = 221\n\tSYS_MMAP                    = 222\n\tSYS_FADVISE64               = 223\n\tSYS_SWAPON                  = 224\n\tSYS_SWAPOFF                 = 225\n\tSYS_MPROTECT                = 226\n\tSYS_MSYNC                   = 227\n\tSYS_MLOCK                   = 228\n\tSYS_MUNLOCK                 = 229\n\tSYS_MLOCKALL                = 230\n\tSYS_MUNLOCKALL              = 231\n\tSYS_MINCORE                 = 232\n\tSYS_MADVISE                 = 233\n\tSYS_REMAP_FILE_PAGES        = 234\n\tSYS_MBIND                   = 235\n\tSYS_GET_MEMPOLICY           = 236\n\tSYS_SET_MEMPOLICY           = 237\n\tSYS_MIGRATE_PAGES           = 238\n\tSYS_MOVE_PAGES              = 239\n\tSYS_RT_TGSIGQUEUEINFO       = 240\n\tSYS_PERF_EVENT_OPEN         = 241\n\tSYS_ACCEPT4                 = 242\n\tSYS_RECVMMSG                = 243\n\tSYS_ARCH_SPECIFIC_SYSCALL   = 244\n\tSYS_WAIT4                   = 260\n\tSYS_PRLIMIT64               = 261\n\tSYS_FANOTIFY_INIT           = 262\n\tSYS_FANOTIFY_MARK           = 263\n\tSYS_NAME_TO_HANDLE_AT       = 264\n\tSYS_OPEN_BY_HANDLE_AT       = 265\n\tSYS_CLOCK_ADJTIME           = 266\n\tSYS_SYNCFS                  = 267\n\tSYS_SETNS                   = 268\n\tSYS_SENDMMSG                = 269\n\tSYS_PROCESS_VM_READV        = 270\n\tSYS_PROCESS_VM_WRITEV       = 271\n\tSYS_KCMP                    = 272\n\tSYS_FINIT_MODULE            = 273\n\tSYS_SCHED_SETATTR           = 274\n\tSYS_SCHED_GETATTR           = 275\n\tSYS_RENAMEAT2               = 276\n\tSYS_SECCOMP                 = 277\n\tSYS_GETRANDOM               = 278\n\tSYS_MEMFD_CREATE            = 279\n\tSYS_BPF                     = 280\n\tSYS_EXECVEAT                = 281\n\tSYS_USERFAULTFD             = 282\n\tSYS_MEMBARRIER              = 283\n\tSYS_MLOCK2                  = 284\n\tSYS_COPY_FILE_RANGE         = 285\n\tSYS_PREADV2                 = 286\n\tSYS_PWRITEV2                = 287\n\tSYS_PKEY_MPROTECT           = 288\n\tSYS_PKEY_ALLOC              = 289\n\tSYS_PKEY_FREE               = 290\n\tSYS_STATX                   = 291\n\tSYS_IO_PGETEVENTS           = 292\n\tSYS_RSEQ                    = 293\n\tSYS_KEXEC_FILE_LOAD         = 294\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips/include /tmp/mips/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips && linux\n\npackage unix\n\nconst (\n\tSYS_SYSCALL                      = 4000\n\tSYS_EXIT                         = 4001\n\tSYS_FORK                         = 4002\n\tSYS_READ                         = 4003\n\tSYS_WRITE                        = 4004\n\tSYS_OPEN                         = 4005\n\tSYS_CLOSE                        = 4006\n\tSYS_WAITPID                      = 4007\n\tSYS_CREAT                        = 4008\n\tSYS_LINK                         = 4009\n\tSYS_UNLINK                       = 4010\n\tSYS_EXECVE                       = 4011\n\tSYS_CHDIR                        = 4012\n\tSYS_TIME                         = 4013\n\tSYS_MKNOD                        = 4014\n\tSYS_CHMOD                        = 4015\n\tSYS_LCHOWN                       = 4016\n\tSYS_BREAK                        = 4017\n\tSYS_UNUSED18                     = 4018\n\tSYS_LSEEK                        = 4019\n\tSYS_GETPID                       = 4020\n\tSYS_MOUNT                        = 4021\n\tSYS_UMOUNT                       = 4022\n\tSYS_SETUID                       = 4023\n\tSYS_GETUID                       = 4024\n\tSYS_STIME                        = 4025\n\tSYS_PTRACE                       = 4026\n\tSYS_ALARM                        = 4027\n\tSYS_UNUSED28                     = 4028\n\tSYS_PAUSE                        = 4029\n\tSYS_UTIME                        = 4030\n\tSYS_STTY                         = 4031\n\tSYS_GTTY                         = 4032\n\tSYS_ACCESS                       = 4033\n\tSYS_NICE                         = 4034\n\tSYS_FTIME                        = 4035\n\tSYS_SYNC                         = 4036\n\tSYS_KILL                         = 4037\n\tSYS_RENAME                       = 4038\n\tSYS_MKDIR                        = 4039\n\tSYS_RMDIR                        = 4040\n\tSYS_DUP                          = 4041\n\tSYS_PIPE                         = 4042\n\tSYS_TIMES                        = 4043\n\tSYS_PROF                         = 4044\n\tSYS_BRK                          = 4045\n\tSYS_SETGID                       = 4046\n\tSYS_GETGID                       = 4047\n\tSYS_SIGNAL                       = 4048\n\tSYS_GETEUID                      = 4049\n\tSYS_GETEGID                      = 4050\n\tSYS_ACCT                         = 4051\n\tSYS_UMOUNT2                      = 4052\n\tSYS_LOCK                         = 4053\n\tSYS_IOCTL                        = 4054\n\tSYS_FCNTL                        = 4055\n\tSYS_MPX                          = 4056\n\tSYS_SETPGID                      = 4057\n\tSYS_ULIMIT                       = 4058\n\tSYS_UNUSED59                     = 4059\n\tSYS_UMASK                        = 4060\n\tSYS_CHROOT                       = 4061\n\tSYS_USTAT                        = 4062\n\tSYS_DUP2                         = 4063\n\tSYS_GETPPID                      = 4064\n\tSYS_GETPGRP                      = 4065\n\tSYS_SETSID                       = 4066\n\tSYS_SIGACTION                    = 4067\n\tSYS_SGETMASK                     = 4068\n\tSYS_SSETMASK                     = 4069\n\tSYS_SETREUID                     = 4070\n\tSYS_SETREGID                     = 4071\n\tSYS_SIGSUSPEND                   = 4072\n\tSYS_SIGPENDING                   = 4073\n\tSYS_SETHOSTNAME                  = 4074\n\tSYS_SETRLIMIT                    = 4075\n\tSYS_GETRLIMIT                    = 4076\n\tSYS_GETRUSAGE                    = 4077\n\tSYS_GETTIMEOFDAY                 = 4078\n\tSYS_SETTIMEOFDAY                 = 4079\n\tSYS_GETGROUPS                    = 4080\n\tSYS_SETGROUPS                    = 4081\n\tSYS_RESERVED82                   = 4082\n\tSYS_SYMLINK                      = 4083\n\tSYS_UNUSED84                     = 4084\n\tSYS_READLINK                     = 4085\n\tSYS_USELIB                       = 4086\n\tSYS_SWAPON                       = 4087\n\tSYS_REBOOT                       = 4088\n\tSYS_READDIR                      = 4089\n\tSYS_MMAP                         = 4090\n\tSYS_MUNMAP                       = 4091\n\tSYS_TRUNCATE                     = 4092\n\tSYS_FTRUNCATE                    = 4093\n\tSYS_FCHMOD                       = 4094\n\tSYS_FCHOWN                       = 4095\n\tSYS_GETPRIORITY                  = 4096\n\tSYS_SETPRIORITY                  = 4097\n\tSYS_PROFIL                       = 4098\n\tSYS_STATFS                       = 4099\n\tSYS_FSTATFS                      = 4100\n\tSYS_IOPERM                       = 4101\n\tSYS_SOCKETCALL                   = 4102\n\tSYS_SYSLOG                       = 4103\n\tSYS_SETITIMER                    = 4104\n\tSYS_GETITIMER                    = 4105\n\tSYS_STAT                         = 4106\n\tSYS_LSTAT                        = 4107\n\tSYS_FSTAT                        = 4108\n\tSYS_UNUSED109                    = 4109\n\tSYS_IOPL                         = 4110\n\tSYS_VHANGUP                      = 4111\n\tSYS_IDLE                         = 4112\n\tSYS_VM86                         = 4113\n\tSYS_WAIT4                        = 4114\n\tSYS_SWAPOFF                      = 4115\n\tSYS_SYSINFO                      = 4116\n\tSYS_IPC                          = 4117\n\tSYS_FSYNC                        = 4118\n\tSYS_SIGRETURN                    = 4119\n\tSYS_CLONE                        = 4120\n\tSYS_SETDOMAINNAME                = 4121\n\tSYS_UNAME                        = 4122\n\tSYS_MODIFY_LDT                   = 4123\n\tSYS_ADJTIMEX                     = 4124\n\tSYS_MPROTECT                     = 4125\n\tSYS_SIGPROCMASK                  = 4126\n\tSYS_CREATE_MODULE                = 4127\n\tSYS_INIT_MODULE                  = 4128\n\tSYS_DELETE_MODULE                = 4129\n\tSYS_GET_KERNEL_SYMS              = 4130\n\tSYS_QUOTACTL                     = 4131\n\tSYS_GETPGID                      = 4132\n\tSYS_FCHDIR                       = 4133\n\tSYS_BDFLUSH                      = 4134\n\tSYS_SYSFS                        = 4135\n\tSYS_PERSONALITY                  = 4136\n\tSYS_AFS_SYSCALL                  = 4137\n\tSYS_SETFSUID                     = 4138\n\tSYS_SETFSGID                     = 4139\n\tSYS__LLSEEK                      = 4140\n\tSYS_GETDENTS                     = 4141\n\tSYS__NEWSELECT                   = 4142\n\tSYS_FLOCK                        = 4143\n\tSYS_MSYNC                        = 4144\n\tSYS_READV                        = 4145\n\tSYS_WRITEV                       = 4146\n\tSYS_CACHEFLUSH                   = 4147\n\tSYS_CACHECTL                     = 4148\n\tSYS_SYSMIPS                      = 4149\n\tSYS_UNUSED150                    = 4150\n\tSYS_GETSID                       = 4151\n\tSYS_FDATASYNC                    = 4152\n\tSYS__SYSCTL                      = 4153\n\tSYS_MLOCK                        = 4154\n\tSYS_MUNLOCK                      = 4155\n\tSYS_MLOCKALL                     = 4156\n\tSYS_MUNLOCKALL                   = 4157\n\tSYS_SCHED_SETPARAM               = 4158\n\tSYS_SCHED_GETPARAM               = 4159\n\tSYS_SCHED_SETSCHEDULER           = 4160\n\tSYS_SCHED_GETSCHEDULER           = 4161\n\tSYS_SCHED_YIELD                  = 4162\n\tSYS_SCHED_GET_PRIORITY_MAX       = 4163\n\tSYS_SCHED_GET_PRIORITY_MIN       = 4164\n\tSYS_SCHED_RR_GET_INTERVAL        = 4165\n\tSYS_NANOSLEEP                    = 4166\n\tSYS_MREMAP                       = 4167\n\tSYS_ACCEPT                       = 4168\n\tSYS_BIND                         = 4169\n\tSYS_CONNECT                      = 4170\n\tSYS_GETPEERNAME                  = 4171\n\tSYS_GETSOCKNAME                  = 4172\n\tSYS_GETSOCKOPT                   = 4173\n\tSYS_LISTEN                       = 4174\n\tSYS_RECV                         = 4175\n\tSYS_RECVFROM                     = 4176\n\tSYS_RECVMSG                      = 4177\n\tSYS_SEND                         = 4178\n\tSYS_SENDMSG                      = 4179\n\tSYS_SENDTO                       = 4180\n\tSYS_SETSOCKOPT                   = 4181\n\tSYS_SHUTDOWN                     = 4182\n\tSYS_SOCKET                       = 4183\n\tSYS_SOCKETPAIR                   = 4184\n\tSYS_SETRESUID                    = 4185\n\tSYS_GETRESUID                    = 4186\n\tSYS_QUERY_MODULE                 = 4187\n\tSYS_POLL                         = 4188\n\tSYS_NFSSERVCTL                   = 4189\n\tSYS_SETRESGID                    = 4190\n\tSYS_GETRESGID                    = 4191\n\tSYS_PRCTL                        = 4192\n\tSYS_RT_SIGRETURN                 = 4193\n\tSYS_RT_SIGACTION                 = 4194\n\tSYS_RT_SIGPROCMASK               = 4195\n\tSYS_RT_SIGPENDING                = 4196\n\tSYS_RT_SIGTIMEDWAIT              = 4197\n\tSYS_RT_SIGQUEUEINFO              = 4198\n\tSYS_RT_SIGSUSPEND                = 4199\n\tSYS_PREAD64                      = 4200\n\tSYS_PWRITE64                     = 4201\n\tSYS_CHOWN                        = 4202\n\tSYS_GETCWD                       = 4203\n\tSYS_CAPGET                       = 4204\n\tSYS_CAPSET                       = 4205\n\tSYS_SIGALTSTACK                  = 4206\n\tSYS_SENDFILE                     = 4207\n\tSYS_GETPMSG                      = 4208\n\tSYS_PUTPMSG                      = 4209\n\tSYS_MMAP2                        = 4210\n\tSYS_TRUNCATE64                   = 4211\n\tSYS_FTRUNCATE64                  = 4212\n\tSYS_STAT64                       = 4213\n\tSYS_LSTAT64                      = 4214\n\tSYS_FSTAT64                      = 4215\n\tSYS_PIVOT_ROOT                   = 4216\n\tSYS_MINCORE                      = 4217\n\tSYS_MADVISE                      = 4218\n\tSYS_GETDENTS64                   = 4219\n\tSYS_FCNTL64                      = 4220\n\tSYS_RESERVED221                  = 4221\n\tSYS_GETTID                       = 4222\n\tSYS_READAHEAD                    = 4223\n\tSYS_SETXATTR                     = 4224\n\tSYS_LSETXATTR                    = 4225\n\tSYS_FSETXATTR                    = 4226\n\tSYS_GETXATTR                     = 4227\n\tSYS_LGETXATTR                    = 4228\n\tSYS_FGETXATTR                    = 4229\n\tSYS_LISTXATTR                    = 4230\n\tSYS_LLISTXATTR                   = 4231\n\tSYS_FLISTXATTR                   = 4232\n\tSYS_REMOVEXATTR                  = 4233\n\tSYS_LREMOVEXATTR                 = 4234\n\tSYS_FREMOVEXATTR                 = 4235\n\tSYS_TKILL                        = 4236\n\tSYS_SENDFILE64                   = 4237\n\tSYS_FUTEX                        = 4238\n\tSYS_SCHED_SETAFFINITY            = 4239\n\tSYS_SCHED_GETAFFINITY            = 4240\n\tSYS_IO_SETUP                     = 4241\n\tSYS_IO_DESTROY                   = 4242\n\tSYS_IO_GETEVENTS                 = 4243\n\tSYS_IO_SUBMIT                    = 4244\n\tSYS_IO_CANCEL                    = 4245\n\tSYS_EXIT_GROUP                   = 4246\n\tSYS_LOOKUP_DCOOKIE               = 4247\n\tSYS_EPOLL_CREATE                 = 4248\n\tSYS_EPOLL_CTL                    = 4249\n\tSYS_EPOLL_WAIT                   = 4250\n\tSYS_REMAP_FILE_PAGES             = 4251\n\tSYS_SET_TID_ADDRESS              = 4252\n\tSYS_RESTART_SYSCALL              = 4253\n\tSYS_FADVISE64                    = 4254\n\tSYS_STATFS64                     = 4255\n\tSYS_FSTATFS64                    = 4256\n\tSYS_TIMER_CREATE                 = 4257\n\tSYS_TIMER_SETTIME                = 4258\n\tSYS_TIMER_GETTIME                = 4259\n\tSYS_TIMER_GETOVERRUN             = 4260\n\tSYS_TIMER_DELETE                 = 4261\n\tSYS_CLOCK_SETTIME                = 4262\n\tSYS_CLOCK_GETTIME                = 4263\n\tSYS_CLOCK_GETRES                 = 4264\n\tSYS_CLOCK_NANOSLEEP              = 4265\n\tSYS_TGKILL                       = 4266\n\tSYS_UTIMES                       = 4267\n\tSYS_MBIND                        = 4268\n\tSYS_GET_MEMPOLICY                = 4269\n\tSYS_SET_MEMPOLICY                = 4270\n\tSYS_MQ_OPEN                      = 4271\n\tSYS_MQ_UNLINK                    = 4272\n\tSYS_MQ_TIMEDSEND                 = 4273\n\tSYS_MQ_TIMEDRECEIVE              = 4274\n\tSYS_MQ_NOTIFY                    = 4275\n\tSYS_MQ_GETSETATTR                = 4276\n\tSYS_VSERVER                      = 4277\n\tSYS_WAITID                       = 4278\n\tSYS_ADD_KEY                      = 4280\n\tSYS_REQUEST_KEY                  = 4281\n\tSYS_KEYCTL                       = 4282\n\tSYS_SET_THREAD_AREA              = 4283\n\tSYS_INOTIFY_INIT                 = 4284\n\tSYS_INOTIFY_ADD_WATCH            = 4285\n\tSYS_INOTIFY_RM_WATCH             = 4286\n\tSYS_MIGRATE_PAGES                = 4287\n\tSYS_OPENAT                       = 4288\n\tSYS_MKDIRAT                      = 4289\n\tSYS_MKNODAT                      = 4290\n\tSYS_FCHOWNAT                     = 4291\n\tSYS_FUTIMESAT                    = 4292\n\tSYS_FSTATAT64                    = 4293\n\tSYS_UNLINKAT                     = 4294\n\tSYS_RENAMEAT                     = 4295\n\tSYS_LINKAT                       = 4296\n\tSYS_SYMLINKAT                    = 4297\n\tSYS_READLINKAT                   = 4298\n\tSYS_FCHMODAT                     = 4299\n\tSYS_FACCESSAT                    = 4300\n\tSYS_PSELECT6                     = 4301\n\tSYS_PPOLL                        = 4302\n\tSYS_UNSHARE                      = 4303\n\tSYS_SPLICE                       = 4304\n\tSYS_SYNC_FILE_RANGE              = 4305\n\tSYS_TEE                          = 4306\n\tSYS_VMSPLICE                     = 4307\n\tSYS_MOVE_PAGES                   = 4308\n\tSYS_SET_ROBUST_LIST              = 4309\n\tSYS_GET_ROBUST_LIST              = 4310\n\tSYS_KEXEC_LOAD                   = 4311\n\tSYS_GETCPU                       = 4312\n\tSYS_EPOLL_PWAIT                  = 4313\n\tSYS_IOPRIO_SET                   = 4314\n\tSYS_IOPRIO_GET                   = 4315\n\tSYS_UTIMENSAT                    = 4316\n\tSYS_SIGNALFD                     = 4317\n\tSYS_TIMERFD                      = 4318\n\tSYS_EVENTFD                      = 4319\n\tSYS_FALLOCATE                    = 4320\n\tSYS_TIMERFD_CREATE               = 4321\n\tSYS_TIMERFD_GETTIME              = 4322\n\tSYS_TIMERFD_SETTIME              = 4323\n\tSYS_SIGNALFD4                    = 4324\n\tSYS_EVENTFD2                     = 4325\n\tSYS_EPOLL_CREATE1                = 4326\n\tSYS_DUP3                         = 4327\n\tSYS_PIPE2                        = 4328\n\tSYS_INOTIFY_INIT1                = 4329\n\tSYS_PREADV                       = 4330\n\tSYS_PWRITEV                      = 4331\n\tSYS_RT_TGSIGQUEUEINFO            = 4332\n\tSYS_PERF_EVENT_OPEN              = 4333\n\tSYS_ACCEPT4                      = 4334\n\tSYS_RECVMMSG                     = 4335\n\tSYS_FANOTIFY_INIT                = 4336\n\tSYS_FANOTIFY_MARK                = 4337\n\tSYS_PRLIMIT64                    = 4338\n\tSYS_NAME_TO_HANDLE_AT            = 4339\n\tSYS_OPEN_BY_HANDLE_AT            = 4340\n\tSYS_CLOCK_ADJTIME                = 4341\n\tSYS_SYNCFS                       = 4342\n\tSYS_SENDMMSG                     = 4343\n\tSYS_SETNS                        = 4344\n\tSYS_PROCESS_VM_READV             = 4345\n\tSYS_PROCESS_VM_WRITEV            = 4346\n\tSYS_KCMP                         = 4347\n\tSYS_FINIT_MODULE                 = 4348\n\tSYS_SCHED_SETATTR                = 4349\n\tSYS_SCHED_GETATTR                = 4350\n\tSYS_RENAMEAT2                    = 4351\n\tSYS_SECCOMP                      = 4352\n\tSYS_GETRANDOM                    = 4353\n\tSYS_MEMFD_CREATE                 = 4354\n\tSYS_BPF                          = 4355\n\tSYS_EXECVEAT                     = 4356\n\tSYS_USERFAULTFD                  = 4357\n\tSYS_MEMBARRIER                   = 4358\n\tSYS_MLOCK2                       = 4359\n\tSYS_COPY_FILE_RANGE              = 4360\n\tSYS_PREADV2                      = 4361\n\tSYS_PWRITEV2                     = 4362\n\tSYS_PKEY_MPROTECT                = 4363\n\tSYS_PKEY_ALLOC                   = 4364\n\tSYS_PKEY_FREE                    = 4365\n\tSYS_STATX                        = 4366\n\tSYS_RSEQ                         = 4367\n\tSYS_IO_PGETEVENTS                = 4368\n\tSYS_SEMGET                       = 4393\n\tSYS_SEMCTL                       = 4394\n\tSYS_SHMGET                       = 4395\n\tSYS_SHMCTL                       = 4396\n\tSYS_SHMAT                        = 4397\n\tSYS_SHMDT                        = 4398\n\tSYS_MSGGET                       = 4399\n\tSYS_MSGSND                       = 4400\n\tSYS_MSGRCV                       = 4401\n\tSYS_MSGCTL                       = 4402\n\tSYS_CLOCK_GETTIME64              = 4403\n\tSYS_CLOCK_SETTIME64              = 4404\n\tSYS_CLOCK_ADJTIME64              = 4405\n\tSYS_CLOCK_GETRES_TIME64          = 4406\n\tSYS_CLOCK_NANOSLEEP_TIME64       = 4407\n\tSYS_TIMER_GETTIME64              = 4408\n\tSYS_TIMER_SETTIME64              = 4409\n\tSYS_TIMERFD_GETTIME64            = 4410\n\tSYS_TIMERFD_SETTIME64            = 4411\n\tSYS_UTIMENSAT_TIME64             = 4412\n\tSYS_PSELECT6_TIME64              = 4413\n\tSYS_PPOLL_TIME64                 = 4414\n\tSYS_IO_PGETEVENTS_TIME64         = 4416\n\tSYS_RECVMMSG_TIME64              = 4417\n\tSYS_MQ_TIMEDSEND_TIME64          = 4418\n\tSYS_MQ_TIMEDRECEIVE_TIME64       = 4419\n\tSYS_SEMTIMEDOP_TIME64            = 4420\n\tSYS_RT_SIGTIMEDWAIT_TIME64       = 4421\n\tSYS_FUTEX_TIME64                 = 4422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 4423\n\tSYS_PIDFD_SEND_SIGNAL            = 4424\n\tSYS_IO_URING_SETUP               = 4425\n\tSYS_IO_URING_ENTER               = 4426\n\tSYS_IO_URING_REGISTER            = 4427\n\tSYS_OPEN_TREE                    = 4428\n\tSYS_MOVE_MOUNT                   = 4429\n\tSYS_FSOPEN                       = 4430\n\tSYS_FSCONFIG                     = 4431\n\tSYS_FSMOUNT                      = 4432\n\tSYS_FSPICK                       = 4433\n\tSYS_PIDFD_OPEN                   = 4434\n\tSYS_CLONE3                       = 4435\n\tSYS_CLOSE_RANGE                  = 4436\n\tSYS_OPENAT2                      = 4437\n\tSYS_PIDFD_GETFD                  = 4438\n\tSYS_FACCESSAT2                   = 4439\n\tSYS_PROCESS_MADVISE              = 4440\n\tSYS_EPOLL_PWAIT2                 = 4441\n\tSYS_MOUNT_SETATTR                = 4442\n\tSYS_QUOTACTL_FD                  = 4443\n\tSYS_LANDLOCK_CREATE_RULESET      = 4444\n\tSYS_LANDLOCK_ADD_RULE            = 4445\n\tSYS_LANDLOCK_RESTRICT_SELF       = 4446\n\tSYS_PROCESS_MRELEASE             = 4448\n\tSYS_FUTEX_WAITV                  = 4449\n\tSYS_SET_MEMPOLICY_HOME_NODE      = 4450\n\tSYS_CACHESTAT                    = 4451\n\tSYS_FCHMODAT2                    = 4452\n\tSYS_MAP_SHADOW_STACK             = 4453\n\tSYS_FUTEX_WAKE                   = 4454\n\tSYS_FUTEX_WAIT                   = 4455\n\tSYS_FUTEX_REQUEUE                = 4456\n\tSYS_STATMOUNT                    = 4457\n\tSYS_LISTMOUNT                    = 4458\n\tSYS_LSM_GET_SELF_ATTR            = 4459\n\tSYS_LSM_SET_SELF_ATTR            = 4460\n\tSYS_LSM_LIST_MODULES             = 4461\n\tSYS_MSEAL                        = 4462\n\tSYS_SETXATTRAT                   = 4463\n\tSYS_GETXATTRAT                   = 4464\n\tSYS_LISTXATTRAT                  = 4465\n\tSYS_REMOVEXATTRAT                = 4466\n\tSYS_OPEN_TREE_ATTR               = 4467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64/include /tmp/mips64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && linux\n\npackage unix\n\nconst (\n\tSYS_READ                    = 5000\n\tSYS_WRITE                   = 5001\n\tSYS_OPEN                    = 5002\n\tSYS_CLOSE                   = 5003\n\tSYS_STAT                    = 5004\n\tSYS_FSTAT                   = 5005\n\tSYS_LSTAT                   = 5006\n\tSYS_POLL                    = 5007\n\tSYS_LSEEK                   = 5008\n\tSYS_MMAP                    = 5009\n\tSYS_MPROTECT                = 5010\n\tSYS_MUNMAP                  = 5011\n\tSYS_BRK                     = 5012\n\tSYS_RT_SIGACTION            = 5013\n\tSYS_RT_SIGPROCMASK          = 5014\n\tSYS_IOCTL                   = 5015\n\tSYS_PREAD64                 = 5016\n\tSYS_PWRITE64                = 5017\n\tSYS_READV                   = 5018\n\tSYS_WRITEV                  = 5019\n\tSYS_ACCESS                  = 5020\n\tSYS_PIPE                    = 5021\n\tSYS__NEWSELECT              = 5022\n\tSYS_SCHED_YIELD             = 5023\n\tSYS_MREMAP                  = 5024\n\tSYS_MSYNC                   = 5025\n\tSYS_MINCORE                 = 5026\n\tSYS_MADVISE                 = 5027\n\tSYS_SHMGET                  = 5028\n\tSYS_SHMAT                   = 5029\n\tSYS_SHMCTL                  = 5030\n\tSYS_DUP                     = 5031\n\tSYS_DUP2                    = 5032\n\tSYS_PAUSE                   = 5033\n\tSYS_NANOSLEEP               = 5034\n\tSYS_GETITIMER               = 5035\n\tSYS_SETITIMER               = 5036\n\tSYS_ALARM                   = 5037\n\tSYS_GETPID                  = 5038\n\tSYS_SENDFILE                = 5039\n\tSYS_SOCKET                  = 5040\n\tSYS_CONNECT                 = 5041\n\tSYS_ACCEPT                  = 5042\n\tSYS_SENDTO                  = 5043\n\tSYS_RECVFROM                = 5044\n\tSYS_SENDMSG                 = 5045\n\tSYS_RECVMSG                 = 5046\n\tSYS_SHUTDOWN                = 5047\n\tSYS_BIND                    = 5048\n\tSYS_LISTEN                  = 5049\n\tSYS_GETSOCKNAME             = 5050\n\tSYS_GETPEERNAME             = 5051\n\tSYS_SOCKETPAIR              = 5052\n\tSYS_SETSOCKOPT              = 5053\n\tSYS_GETSOCKOPT              = 5054\n\tSYS_CLONE                   = 5055\n\tSYS_FORK                    = 5056\n\tSYS_EXECVE                  = 5057\n\tSYS_EXIT                    = 5058\n\tSYS_WAIT4                   = 5059\n\tSYS_KILL                    = 5060\n\tSYS_UNAME                   = 5061\n\tSYS_SEMGET                  = 5062\n\tSYS_SEMOP                   = 5063\n\tSYS_SEMCTL                  = 5064\n\tSYS_SHMDT                   = 5065\n\tSYS_MSGGET                  = 5066\n\tSYS_MSGSND                  = 5067\n\tSYS_MSGRCV                  = 5068\n\tSYS_MSGCTL                  = 5069\n\tSYS_FCNTL                   = 5070\n\tSYS_FLOCK                   = 5071\n\tSYS_FSYNC                   = 5072\n\tSYS_FDATASYNC               = 5073\n\tSYS_TRUNCATE                = 5074\n\tSYS_FTRUNCATE               = 5075\n\tSYS_GETDENTS                = 5076\n\tSYS_GETCWD                  = 5077\n\tSYS_CHDIR                   = 5078\n\tSYS_FCHDIR                  = 5079\n\tSYS_RENAME                  = 5080\n\tSYS_MKDIR                   = 5081\n\tSYS_RMDIR                   = 5082\n\tSYS_CREAT                   = 5083\n\tSYS_LINK                    = 5084\n\tSYS_UNLINK                  = 5085\n\tSYS_SYMLINK                 = 5086\n\tSYS_READLINK                = 5087\n\tSYS_CHMOD                   = 5088\n\tSYS_FCHMOD                  = 5089\n\tSYS_CHOWN                   = 5090\n\tSYS_FCHOWN                  = 5091\n\tSYS_LCHOWN                  = 5092\n\tSYS_UMASK                   = 5093\n\tSYS_GETTIMEOFDAY            = 5094\n\tSYS_GETRLIMIT               = 5095\n\tSYS_GETRUSAGE               = 5096\n\tSYS_SYSINFO                 = 5097\n\tSYS_TIMES                   = 5098\n\tSYS_PTRACE                  = 5099\n\tSYS_GETUID                  = 5100\n\tSYS_SYSLOG                  = 5101\n\tSYS_GETGID                  = 5102\n\tSYS_SETUID                  = 5103\n\tSYS_SETGID                  = 5104\n\tSYS_GETEUID                 = 5105\n\tSYS_GETEGID                 = 5106\n\tSYS_SETPGID                 = 5107\n\tSYS_GETPPID                 = 5108\n\tSYS_GETPGRP                 = 5109\n\tSYS_SETSID                  = 5110\n\tSYS_SETREUID                = 5111\n\tSYS_SETREGID                = 5112\n\tSYS_GETGROUPS               = 5113\n\tSYS_SETGROUPS               = 5114\n\tSYS_SETRESUID               = 5115\n\tSYS_GETRESUID               = 5116\n\tSYS_SETRESGID               = 5117\n\tSYS_GETRESGID               = 5118\n\tSYS_GETPGID                 = 5119\n\tSYS_SETFSUID                = 5120\n\tSYS_SETFSGID                = 5121\n\tSYS_GETSID                  = 5122\n\tSYS_CAPGET                  = 5123\n\tSYS_CAPSET                  = 5124\n\tSYS_RT_SIGPENDING           = 5125\n\tSYS_RT_SIGTIMEDWAIT         = 5126\n\tSYS_RT_SIGQUEUEINFO         = 5127\n\tSYS_RT_SIGSUSPEND           = 5128\n\tSYS_SIGALTSTACK             = 5129\n\tSYS_UTIME                   = 5130\n\tSYS_MKNOD                   = 5131\n\tSYS_PERSONALITY             = 5132\n\tSYS_USTAT                   = 5133\n\tSYS_STATFS                  = 5134\n\tSYS_FSTATFS                 = 5135\n\tSYS_SYSFS                   = 5136\n\tSYS_GETPRIORITY             = 5137\n\tSYS_SETPRIORITY             = 5138\n\tSYS_SCHED_SETPARAM          = 5139\n\tSYS_SCHED_GETPARAM          = 5140\n\tSYS_SCHED_SETSCHEDULER      = 5141\n\tSYS_SCHED_GETSCHEDULER      = 5142\n\tSYS_SCHED_GET_PRIORITY_MAX  = 5143\n\tSYS_SCHED_GET_PRIORITY_MIN  = 5144\n\tSYS_SCHED_RR_GET_INTERVAL   = 5145\n\tSYS_MLOCK                   = 5146\n\tSYS_MUNLOCK                 = 5147\n\tSYS_MLOCKALL                = 5148\n\tSYS_MUNLOCKALL              = 5149\n\tSYS_VHANGUP                 = 5150\n\tSYS_PIVOT_ROOT              = 5151\n\tSYS__SYSCTL                 = 5152\n\tSYS_PRCTL                   = 5153\n\tSYS_ADJTIMEX                = 5154\n\tSYS_SETRLIMIT               = 5155\n\tSYS_CHROOT                  = 5156\n\tSYS_SYNC                    = 5157\n\tSYS_ACCT                    = 5158\n\tSYS_SETTIMEOFDAY            = 5159\n\tSYS_MOUNT                   = 5160\n\tSYS_UMOUNT2                 = 5161\n\tSYS_SWAPON                  = 5162\n\tSYS_SWAPOFF                 = 5163\n\tSYS_REBOOT                  = 5164\n\tSYS_SETHOSTNAME             = 5165\n\tSYS_SETDOMAINNAME           = 5166\n\tSYS_CREATE_MODULE           = 5167\n\tSYS_INIT_MODULE             = 5168\n\tSYS_DELETE_MODULE           = 5169\n\tSYS_GET_KERNEL_SYMS         = 5170\n\tSYS_QUERY_MODULE            = 5171\n\tSYS_QUOTACTL                = 5172\n\tSYS_NFSSERVCTL              = 5173\n\tSYS_GETPMSG                 = 5174\n\tSYS_PUTPMSG                 = 5175\n\tSYS_AFS_SYSCALL             = 5176\n\tSYS_RESERVED177             = 5177\n\tSYS_GETTID                  = 5178\n\tSYS_READAHEAD               = 5179\n\tSYS_SETXATTR                = 5180\n\tSYS_LSETXATTR               = 5181\n\tSYS_FSETXATTR               = 5182\n\tSYS_GETXATTR                = 5183\n\tSYS_LGETXATTR               = 5184\n\tSYS_FGETXATTR               = 5185\n\tSYS_LISTXATTR               = 5186\n\tSYS_LLISTXATTR              = 5187\n\tSYS_FLISTXATTR              = 5188\n\tSYS_REMOVEXATTR             = 5189\n\tSYS_LREMOVEXATTR            = 5190\n\tSYS_FREMOVEXATTR            = 5191\n\tSYS_TKILL                   = 5192\n\tSYS_RESERVED193             = 5193\n\tSYS_FUTEX                   = 5194\n\tSYS_SCHED_SETAFFINITY       = 5195\n\tSYS_SCHED_GETAFFINITY       = 5196\n\tSYS_CACHEFLUSH              = 5197\n\tSYS_CACHECTL                = 5198\n\tSYS_SYSMIPS                 = 5199\n\tSYS_IO_SETUP                = 5200\n\tSYS_IO_DESTROY              = 5201\n\tSYS_IO_GETEVENTS            = 5202\n\tSYS_IO_SUBMIT               = 5203\n\tSYS_IO_CANCEL               = 5204\n\tSYS_EXIT_GROUP              = 5205\n\tSYS_LOOKUP_DCOOKIE          = 5206\n\tSYS_EPOLL_CREATE            = 5207\n\tSYS_EPOLL_CTL               = 5208\n\tSYS_EPOLL_WAIT              = 5209\n\tSYS_REMAP_FILE_PAGES        = 5210\n\tSYS_RT_SIGRETURN            = 5211\n\tSYS_SET_TID_ADDRESS         = 5212\n\tSYS_RESTART_SYSCALL         = 5213\n\tSYS_SEMTIMEDOP              = 5214\n\tSYS_FADVISE64               = 5215\n\tSYS_TIMER_CREATE            = 5216\n\tSYS_TIMER_SETTIME           = 5217\n\tSYS_TIMER_GETTIME           = 5218\n\tSYS_TIMER_GETOVERRUN        = 5219\n\tSYS_TIMER_DELETE            = 5220\n\tSYS_CLOCK_SETTIME           = 5221\n\tSYS_CLOCK_GETTIME           = 5222\n\tSYS_CLOCK_GETRES            = 5223\n\tSYS_CLOCK_NANOSLEEP         = 5224\n\tSYS_TGKILL                  = 5225\n\tSYS_UTIMES                  = 5226\n\tSYS_MBIND                   = 5227\n\tSYS_GET_MEMPOLICY           = 5228\n\tSYS_SET_MEMPOLICY           = 5229\n\tSYS_MQ_OPEN                 = 5230\n\tSYS_MQ_UNLINK               = 5231\n\tSYS_MQ_TIMEDSEND            = 5232\n\tSYS_MQ_TIMEDRECEIVE         = 5233\n\tSYS_MQ_NOTIFY               = 5234\n\tSYS_MQ_GETSETATTR           = 5235\n\tSYS_VSERVER                 = 5236\n\tSYS_WAITID                  = 5237\n\tSYS_ADD_KEY                 = 5239\n\tSYS_REQUEST_KEY             = 5240\n\tSYS_KEYCTL                  = 5241\n\tSYS_SET_THREAD_AREA         = 5242\n\tSYS_INOTIFY_INIT            = 5243\n\tSYS_INOTIFY_ADD_WATCH       = 5244\n\tSYS_INOTIFY_RM_WATCH        = 5245\n\tSYS_MIGRATE_PAGES           = 5246\n\tSYS_OPENAT                  = 5247\n\tSYS_MKDIRAT                 = 5248\n\tSYS_MKNODAT                 = 5249\n\tSYS_FCHOWNAT                = 5250\n\tSYS_FUTIMESAT               = 5251\n\tSYS_NEWFSTATAT              = 5252\n\tSYS_UNLINKAT                = 5253\n\tSYS_RENAMEAT                = 5254\n\tSYS_LINKAT                  = 5255\n\tSYS_SYMLINKAT               = 5256\n\tSYS_READLINKAT              = 5257\n\tSYS_FCHMODAT                = 5258\n\tSYS_FACCESSAT               = 5259\n\tSYS_PSELECT6                = 5260\n\tSYS_PPOLL                   = 5261\n\tSYS_UNSHARE                 = 5262\n\tSYS_SPLICE                  = 5263\n\tSYS_SYNC_FILE_RANGE         = 5264\n\tSYS_TEE                     = 5265\n\tSYS_VMSPLICE                = 5266\n\tSYS_MOVE_PAGES              = 5267\n\tSYS_SET_ROBUST_LIST         = 5268\n\tSYS_GET_ROBUST_LIST         = 5269\n\tSYS_KEXEC_LOAD              = 5270\n\tSYS_GETCPU                  = 5271\n\tSYS_EPOLL_PWAIT             = 5272\n\tSYS_IOPRIO_SET              = 5273\n\tSYS_IOPRIO_GET              = 5274\n\tSYS_UTIMENSAT               = 5275\n\tSYS_SIGNALFD                = 5276\n\tSYS_TIMERFD                 = 5277\n\tSYS_EVENTFD                 = 5278\n\tSYS_FALLOCATE               = 5279\n\tSYS_TIMERFD_CREATE          = 5280\n\tSYS_TIMERFD_GETTIME         = 5281\n\tSYS_TIMERFD_SETTIME         = 5282\n\tSYS_SIGNALFD4               = 5283\n\tSYS_EVENTFD2                = 5284\n\tSYS_EPOLL_CREATE1           = 5285\n\tSYS_DUP3                    = 5286\n\tSYS_PIPE2                   = 5287\n\tSYS_INOTIFY_INIT1           = 5288\n\tSYS_PREADV                  = 5289\n\tSYS_PWRITEV                 = 5290\n\tSYS_RT_TGSIGQUEUEINFO       = 5291\n\tSYS_PERF_EVENT_OPEN         = 5292\n\tSYS_ACCEPT4                 = 5293\n\tSYS_RECVMMSG                = 5294\n\tSYS_FANOTIFY_INIT           = 5295\n\tSYS_FANOTIFY_MARK           = 5296\n\tSYS_PRLIMIT64               = 5297\n\tSYS_NAME_TO_HANDLE_AT       = 5298\n\tSYS_OPEN_BY_HANDLE_AT       = 5299\n\tSYS_CLOCK_ADJTIME           = 5300\n\tSYS_SYNCFS                  = 5301\n\tSYS_SENDMMSG                = 5302\n\tSYS_SETNS                   = 5303\n\tSYS_PROCESS_VM_READV        = 5304\n\tSYS_PROCESS_VM_WRITEV       = 5305\n\tSYS_KCMP                    = 5306\n\tSYS_FINIT_MODULE            = 5307\n\tSYS_GETDENTS64              = 5308\n\tSYS_SCHED_SETATTR           = 5309\n\tSYS_SCHED_GETATTR           = 5310\n\tSYS_RENAMEAT2               = 5311\n\tSYS_SECCOMP                 = 5312\n\tSYS_GETRANDOM               = 5313\n\tSYS_MEMFD_CREATE            = 5314\n\tSYS_BPF                     = 5315\n\tSYS_EXECVEAT                = 5316\n\tSYS_USERFAULTFD             = 5317\n\tSYS_MEMBARRIER              = 5318\n\tSYS_MLOCK2                  = 5319\n\tSYS_COPY_FILE_RANGE         = 5320\n\tSYS_PREADV2                 = 5321\n\tSYS_PWRITEV2                = 5322\n\tSYS_PKEY_MPROTECT           = 5323\n\tSYS_PKEY_ALLOC              = 5324\n\tSYS_PKEY_FREE               = 5325\n\tSYS_STATX                   = 5326\n\tSYS_RSEQ                    = 5327\n\tSYS_IO_PGETEVENTS           = 5328\n\tSYS_PIDFD_SEND_SIGNAL       = 5424\n\tSYS_IO_URING_SETUP          = 5425\n\tSYS_IO_URING_ENTER          = 5426\n\tSYS_IO_URING_REGISTER       = 5427\n\tSYS_OPEN_TREE               = 5428\n\tSYS_MOVE_MOUNT              = 5429\n\tSYS_FSOPEN                  = 5430\n\tSYS_FSCONFIG                = 5431\n\tSYS_FSMOUNT                 = 5432\n\tSYS_FSPICK                  = 5433\n\tSYS_PIDFD_OPEN              = 5434\n\tSYS_CLONE3                  = 5435\n\tSYS_CLOSE_RANGE             = 5436\n\tSYS_OPENAT2                 = 5437\n\tSYS_PIDFD_GETFD             = 5438\n\tSYS_FACCESSAT2              = 5439\n\tSYS_PROCESS_MADVISE         = 5440\n\tSYS_EPOLL_PWAIT2            = 5441\n\tSYS_MOUNT_SETATTR           = 5442\n\tSYS_QUOTACTL_FD             = 5443\n\tSYS_LANDLOCK_CREATE_RULESET = 5444\n\tSYS_LANDLOCK_ADD_RULE       = 5445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 5446\n\tSYS_PROCESS_MRELEASE        = 5448\n\tSYS_FUTEX_WAITV             = 5449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 5450\n\tSYS_CACHESTAT               = 5451\n\tSYS_FCHMODAT2               = 5452\n\tSYS_MAP_SHADOW_STACK        = 5453\n\tSYS_FUTEX_WAKE              = 5454\n\tSYS_FUTEX_WAIT              = 5455\n\tSYS_FUTEX_REQUEUE           = 5456\n\tSYS_STATMOUNT               = 5457\n\tSYS_LISTMOUNT               = 5458\n\tSYS_LSM_GET_SELF_ATTR       = 5459\n\tSYS_LSM_SET_SELF_ATTR       = 5460\n\tSYS_LSM_LIST_MODULES        = 5461\n\tSYS_MSEAL                   = 5462\n\tSYS_SETXATTRAT              = 5463\n\tSYS_GETXATTRAT              = 5464\n\tSYS_LISTXATTRAT             = 5465\n\tSYS_REMOVEXATTRAT           = 5466\n\tSYS_OPEN_TREE_ATTR          = 5467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64le/include /tmp/mips64le/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64le && linux\n\npackage unix\n\nconst (\n\tSYS_READ                    = 5000\n\tSYS_WRITE                   = 5001\n\tSYS_OPEN                    = 5002\n\tSYS_CLOSE                   = 5003\n\tSYS_STAT                    = 5004\n\tSYS_FSTAT                   = 5005\n\tSYS_LSTAT                   = 5006\n\tSYS_POLL                    = 5007\n\tSYS_LSEEK                   = 5008\n\tSYS_MMAP                    = 5009\n\tSYS_MPROTECT                = 5010\n\tSYS_MUNMAP                  = 5011\n\tSYS_BRK                     = 5012\n\tSYS_RT_SIGACTION            = 5013\n\tSYS_RT_SIGPROCMASK          = 5014\n\tSYS_IOCTL                   = 5015\n\tSYS_PREAD64                 = 5016\n\tSYS_PWRITE64                = 5017\n\tSYS_READV                   = 5018\n\tSYS_WRITEV                  = 5019\n\tSYS_ACCESS                  = 5020\n\tSYS_PIPE                    = 5021\n\tSYS__NEWSELECT              = 5022\n\tSYS_SCHED_YIELD             = 5023\n\tSYS_MREMAP                  = 5024\n\tSYS_MSYNC                   = 5025\n\tSYS_MINCORE                 = 5026\n\tSYS_MADVISE                 = 5027\n\tSYS_SHMGET                  = 5028\n\tSYS_SHMAT                   = 5029\n\tSYS_SHMCTL                  = 5030\n\tSYS_DUP                     = 5031\n\tSYS_DUP2                    = 5032\n\tSYS_PAUSE                   = 5033\n\tSYS_NANOSLEEP               = 5034\n\tSYS_GETITIMER               = 5035\n\tSYS_SETITIMER               = 5036\n\tSYS_ALARM                   = 5037\n\tSYS_GETPID                  = 5038\n\tSYS_SENDFILE                = 5039\n\tSYS_SOCKET                  = 5040\n\tSYS_CONNECT                 = 5041\n\tSYS_ACCEPT                  = 5042\n\tSYS_SENDTO                  = 5043\n\tSYS_RECVFROM                = 5044\n\tSYS_SENDMSG                 = 5045\n\tSYS_RECVMSG                 = 5046\n\tSYS_SHUTDOWN                = 5047\n\tSYS_BIND                    = 5048\n\tSYS_LISTEN                  = 5049\n\tSYS_GETSOCKNAME             = 5050\n\tSYS_GETPEERNAME             = 5051\n\tSYS_SOCKETPAIR              = 5052\n\tSYS_SETSOCKOPT              = 5053\n\tSYS_GETSOCKOPT              = 5054\n\tSYS_CLONE                   = 5055\n\tSYS_FORK                    = 5056\n\tSYS_EXECVE                  = 5057\n\tSYS_EXIT                    = 5058\n\tSYS_WAIT4                   = 5059\n\tSYS_KILL                    = 5060\n\tSYS_UNAME                   = 5061\n\tSYS_SEMGET                  = 5062\n\tSYS_SEMOP                   = 5063\n\tSYS_SEMCTL                  = 5064\n\tSYS_SHMDT                   = 5065\n\tSYS_MSGGET                  = 5066\n\tSYS_MSGSND                  = 5067\n\tSYS_MSGRCV                  = 5068\n\tSYS_MSGCTL                  = 5069\n\tSYS_FCNTL                   = 5070\n\tSYS_FLOCK                   = 5071\n\tSYS_FSYNC                   = 5072\n\tSYS_FDATASYNC               = 5073\n\tSYS_TRUNCATE                = 5074\n\tSYS_FTRUNCATE               = 5075\n\tSYS_GETDENTS                = 5076\n\tSYS_GETCWD                  = 5077\n\tSYS_CHDIR                   = 5078\n\tSYS_FCHDIR                  = 5079\n\tSYS_RENAME                  = 5080\n\tSYS_MKDIR                   = 5081\n\tSYS_RMDIR                   = 5082\n\tSYS_CREAT                   = 5083\n\tSYS_LINK                    = 5084\n\tSYS_UNLINK                  = 5085\n\tSYS_SYMLINK                 = 5086\n\tSYS_READLINK                = 5087\n\tSYS_CHMOD                   = 5088\n\tSYS_FCHMOD                  = 5089\n\tSYS_CHOWN                   = 5090\n\tSYS_FCHOWN                  = 5091\n\tSYS_LCHOWN                  = 5092\n\tSYS_UMASK                   = 5093\n\tSYS_GETTIMEOFDAY            = 5094\n\tSYS_GETRLIMIT               = 5095\n\tSYS_GETRUSAGE               = 5096\n\tSYS_SYSINFO                 = 5097\n\tSYS_TIMES                   = 5098\n\tSYS_PTRACE                  = 5099\n\tSYS_GETUID                  = 5100\n\tSYS_SYSLOG                  = 5101\n\tSYS_GETGID                  = 5102\n\tSYS_SETUID                  = 5103\n\tSYS_SETGID                  = 5104\n\tSYS_GETEUID                 = 5105\n\tSYS_GETEGID                 = 5106\n\tSYS_SETPGID                 = 5107\n\tSYS_GETPPID                 = 5108\n\tSYS_GETPGRP                 = 5109\n\tSYS_SETSID                  = 5110\n\tSYS_SETREUID                = 5111\n\tSYS_SETREGID                = 5112\n\tSYS_GETGROUPS               = 5113\n\tSYS_SETGROUPS               = 5114\n\tSYS_SETRESUID               = 5115\n\tSYS_GETRESUID               = 5116\n\tSYS_SETRESGID               = 5117\n\tSYS_GETRESGID               = 5118\n\tSYS_GETPGID                 = 5119\n\tSYS_SETFSUID                = 5120\n\tSYS_SETFSGID                = 5121\n\tSYS_GETSID                  = 5122\n\tSYS_CAPGET                  = 5123\n\tSYS_CAPSET                  = 5124\n\tSYS_RT_SIGPENDING           = 5125\n\tSYS_RT_SIGTIMEDWAIT         = 5126\n\tSYS_RT_SIGQUEUEINFO         = 5127\n\tSYS_RT_SIGSUSPEND           = 5128\n\tSYS_SIGALTSTACK             = 5129\n\tSYS_UTIME                   = 5130\n\tSYS_MKNOD                   = 5131\n\tSYS_PERSONALITY             = 5132\n\tSYS_USTAT                   = 5133\n\tSYS_STATFS                  = 5134\n\tSYS_FSTATFS                 = 5135\n\tSYS_SYSFS                   = 5136\n\tSYS_GETPRIORITY             = 5137\n\tSYS_SETPRIORITY             = 5138\n\tSYS_SCHED_SETPARAM          = 5139\n\tSYS_SCHED_GETPARAM          = 5140\n\tSYS_SCHED_SETSCHEDULER      = 5141\n\tSYS_SCHED_GETSCHEDULER      = 5142\n\tSYS_SCHED_GET_PRIORITY_MAX  = 5143\n\tSYS_SCHED_GET_PRIORITY_MIN  = 5144\n\tSYS_SCHED_RR_GET_INTERVAL   = 5145\n\tSYS_MLOCK                   = 5146\n\tSYS_MUNLOCK                 = 5147\n\tSYS_MLOCKALL                = 5148\n\tSYS_MUNLOCKALL              = 5149\n\tSYS_VHANGUP                 = 5150\n\tSYS_PIVOT_ROOT              = 5151\n\tSYS__SYSCTL                 = 5152\n\tSYS_PRCTL                   = 5153\n\tSYS_ADJTIMEX                = 5154\n\tSYS_SETRLIMIT               = 5155\n\tSYS_CHROOT                  = 5156\n\tSYS_SYNC                    = 5157\n\tSYS_ACCT                    = 5158\n\tSYS_SETTIMEOFDAY            = 5159\n\tSYS_MOUNT                   = 5160\n\tSYS_UMOUNT2                 = 5161\n\tSYS_SWAPON                  = 5162\n\tSYS_SWAPOFF                 = 5163\n\tSYS_REBOOT                  = 5164\n\tSYS_SETHOSTNAME             = 5165\n\tSYS_SETDOMAINNAME           = 5166\n\tSYS_CREATE_MODULE           = 5167\n\tSYS_INIT_MODULE             = 5168\n\tSYS_DELETE_MODULE           = 5169\n\tSYS_GET_KERNEL_SYMS         = 5170\n\tSYS_QUERY_MODULE            = 5171\n\tSYS_QUOTACTL                = 5172\n\tSYS_NFSSERVCTL              = 5173\n\tSYS_GETPMSG                 = 5174\n\tSYS_PUTPMSG                 = 5175\n\tSYS_AFS_SYSCALL             = 5176\n\tSYS_RESERVED177             = 5177\n\tSYS_GETTID                  = 5178\n\tSYS_READAHEAD               = 5179\n\tSYS_SETXATTR                = 5180\n\tSYS_LSETXATTR               = 5181\n\tSYS_FSETXATTR               = 5182\n\tSYS_GETXATTR                = 5183\n\tSYS_LGETXATTR               = 5184\n\tSYS_FGETXATTR               = 5185\n\tSYS_LISTXATTR               = 5186\n\tSYS_LLISTXATTR              = 5187\n\tSYS_FLISTXATTR              = 5188\n\tSYS_REMOVEXATTR             = 5189\n\tSYS_LREMOVEXATTR            = 5190\n\tSYS_FREMOVEXATTR            = 5191\n\tSYS_TKILL                   = 5192\n\tSYS_RESERVED193             = 5193\n\tSYS_FUTEX                   = 5194\n\tSYS_SCHED_SETAFFINITY       = 5195\n\tSYS_SCHED_GETAFFINITY       = 5196\n\tSYS_CACHEFLUSH              = 5197\n\tSYS_CACHECTL                = 5198\n\tSYS_SYSMIPS                 = 5199\n\tSYS_IO_SETUP                = 5200\n\tSYS_IO_DESTROY              = 5201\n\tSYS_IO_GETEVENTS            = 5202\n\tSYS_IO_SUBMIT               = 5203\n\tSYS_IO_CANCEL               = 5204\n\tSYS_EXIT_GROUP              = 5205\n\tSYS_LOOKUP_DCOOKIE          = 5206\n\tSYS_EPOLL_CREATE            = 5207\n\tSYS_EPOLL_CTL               = 5208\n\tSYS_EPOLL_WAIT              = 5209\n\tSYS_REMAP_FILE_PAGES        = 5210\n\tSYS_RT_SIGRETURN            = 5211\n\tSYS_SET_TID_ADDRESS         = 5212\n\tSYS_RESTART_SYSCALL         = 5213\n\tSYS_SEMTIMEDOP              = 5214\n\tSYS_FADVISE64               = 5215\n\tSYS_TIMER_CREATE            = 5216\n\tSYS_TIMER_SETTIME           = 5217\n\tSYS_TIMER_GETTIME           = 5218\n\tSYS_TIMER_GETOVERRUN        = 5219\n\tSYS_TIMER_DELETE            = 5220\n\tSYS_CLOCK_SETTIME           = 5221\n\tSYS_CLOCK_GETTIME           = 5222\n\tSYS_CLOCK_GETRES            = 5223\n\tSYS_CLOCK_NANOSLEEP         = 5224\n\tSYS_TGKILL                  = 5225\n\tSYS_UTIMES                  = 5226\n\tSYS_MBIND                   = 5227\n\tSYS_GET_MEMPOLICY           = 5228\n\tSYS_SET_MEMPOLICY           = 5229\n\tSYS_MQ_OPEN                 = 5230\n\tSYS_MQ_UNLINK               = 5231\n\tSYS_MQ_TIMEDSEND            = 5232\n\tSYS_MQ_TIMEDRECEIVE         = 5233\n\tSYS_MQ_NOTIFY               = 5234\n\tSYS_MQ_GETSETATTR           = 5235\n\tSYS_VSERVER                 = 5236\n\tSYS_WAITID                  = 5237\n\tSYS_ADD_KEY                 = 5239\n\tSYS_REQUEST_KEY             = 5240\n\tSYS_KEYCTL                  = 5241\n\tSYS_SET_THREAD_AREA         = 5242\n\tSYS_INOTIFY_INIT            = 5243\n\tSYS_INOTIFY_ADD_WATCH       = 5244\n\tSYS_INOTIFY_RM_WATCH        = 5245\n\tSYS_MIGRATE_PAGES           = 5246\n\tSYS_OPENAT                  = 5247\n\tSYS_MKDIRAT                 = 5248\n\tSYS_MKNODAT                 = 5249\n\tSYS_FCHOWNAT                = 5250\n\tSYS_FUTIMESAT               = 5251\n\tSYS_NEWFSTATAT              = 5252\n\tSYS_UNLINKAT                = 5253\n\tSYS_RENAMEAT                = 5254\n\tSYS_LINKAT                  = 5255\n\tSYS_SYMLINKAT               = 5256\n\tSYS_READLINKAT              = 5257\n\tSYS_FCHMODAT                = 5258\n\tSYS_FACCESSAT               = 5259\n\tSYS_PSELECT6                = 5260\n\tSYS_PPOLL                   = 5261\n\tSYS_UNSHARE                 = 5262\n\tSYS_SPLICE                  = 5263\n\tSYS_SYNC_FILE_RANGE         = 5264\n\tSYS_TEE                     = 5265\n\tSYS_VMSPLICE                = 5266\n\tSYS_MOVE_PAGES              = 5267\n\tSYS_SET_ROBUST_LIST         = 5268\n\tSYS_GET_ROBUST_LIST         = 5269\n\tSYS_KEXEC_LOAD              = 5270\n\tSYS_GETCPU                  = 5271\n\tSYS_EPOLL_PWAIT             = 5272\n\tSYS_IOPRIO_SET              = 5273\n\tSYS_IOPRIO_GET              = 5274\n\tSYS_UTIMENSAT               = 5275\n\tSYS_SIGNALFD                = 5276\n\tSYS_TIMERFD                 = 5277\n\tSYS_EVENTFD                 = 5278\n\tSYS_FALLOCATE               = 5279\n\tSYS_TIMERFD_CREATE          = 5280\n\tSYS_TIMERFD_GETTIME         = 5281\n\tSYS_TIMERFD_SETTIME         = 5282\n\tSYS_SIGNALFD4               = 5283\n\tSYS_EVENTFD2                = 5284\n\tSYS_EPOLL_CREATE1           = 5285\n\tSYS_DUP3                    = 5286\n\tSYS_PIPE2                   = 5287\n\tSYS_INOTIFY_INIT1           = 5288\n\tSYS_PREADV                  = 5289\n\tSYS_PWRITEV                 = 5290\n\tSYS_RT_TGSIGQUEUEINFO       = 5291\n\tSYS_PERF_EVENT_OPEN         = 5292\n\tSYS_ACCEPT4                 = 5293\n\tSYS_RECVMMSG                = 5294\n\tSYS_FANOTIFY_INIT           = 5295\n\tSYS_FANOTIFY_MARK           = 5296\n\tSYS_PRLIMIT64               = 5297\n\tSYS_NAME_TO_HANDLE_AT       = 5298\n\tSYS_OPEN_BY_HANDLE_AT       = 5299\n\tSYS_CLOCK_ADJTIME           = 5300\n\tSYS_SYNCFS                  = 5301\n\tSYS_SENDMMSG                = 5302\n\tSYS_SETNS                   = 5303\n\tSYS_PROCESS_VM_READV        = 5304\n\tSYS_PROCESS_VM_WRITEV       = 5305\n\tSYS_KCMP                    = 5306\n\tSYS_FINIT_MODULE            = 5307\n\tSYS_GETDENTS64              = 5308\n\tSYS_SCHED_SETATTR           = 5309\n\tSYS_SCHED_GETATTR           = 5310\n\tSYS_RENAMEAT2               = 5311\n\tSYS_SECCOMP                 = 5312\n\tSYS_GETRANDOM               = 5313\n\tSYS_MEMFD_CREATE            = 5314\n\tSYS_BPF                     = 5315\n\tSYS_EXECVEAT                = 5316\n\tSYS_USERFAULTFD             = 5317\n\tSYS_MEMBARRIER              = 5318\n\tSYS_MLOCK2                  = 5319\n\tSYS_COPY_FILE_RANGE         = 5320\n\tSYS_PREADV2                 = 5321\n\tSYS_PWRITEV2                = 5322\n\tSYS_PKEY_MPROTECT           = 5323\n\tSYS_PKEY_ALLOC              = 5324\n\tSYS_PKEY_FREE               = 5325\n\tSYS_STATX                   = 5326\n\tSYS_RSEQ                    = 5327\n\tSYS_IO_PGETEVENTS           = 5328\n\tSYS_PIDFD_SEND_SIGNAL       = 5424\n\tSYS_IO_URING_SETUP          = 5425\n\tSYS_IO_URING_ENTER          = 5426\n\tSYS_IO_URING_REGISTER       = 5427\n\tSYS_OPEN_TREE               = 5428\n\tSYS_MOVE_MOUNT              = 5429\n\tSYS_FSOPEN                  = 5430\n\tSYS_FSCONFIG                = 5431\n\tSYS_FSMOUNT                 = 5432\n\tSYS_FSPICK                  = 5433\n\tSYS_PIDFD_OPEN              = 5434\n\tSYS_CLONE3                  = 5435\n\tSYS_CLOSE_RANGE             = 5436\n\tSYS_OPENAT2                 = 5437\n\tSYS_PIDFD_GETFD             = 5438\n\tSYS_FACCESSAT2              = 5439\n\tSYS_PROCESS_MADVISE         = 5440\n\tSYS_EPOLL_PWAIT2            = 5441\n\tSYS_MOUNT_SETATTR           = 5442\n\tSYS_QUOTACTL_FD             = 5443\n\tSYS_LANDLOCK_CREATE_RULESET = 5444\n\tSYS_LANDLOCK_ADD_RULE       = 5445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 5446\n\tSYS_PROCESS_MRELEASE        = 5448\n\tSYS_FUTEX_WAITV             = 5449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 5450\n\tSYS_CACHESTAT               = 5451\n\tSYS_FCHMODAT2               = 5452\n\tSYS_MAP_SHADOW_STACK        = 5453\n\tSYS_FUTEX_WAKE              = 5454\n\tSYS_FUTEX_WAIT              = 5455\n\tSYS_FUTEX_REQUEUE           = 5456\n\tSYS_STATMOUNT               = 5457\n\tSYS_LISTMOUNT               = 5458\n\tSYS_LSM_GET_SELF_ATTR       = 5459\n\tSYS_LSM_SET_SELF_ATTR       = 5460\n\tSYS_LSM_LIST_MODULES        = 5461\n\tSYS_MSEAL                   = 5462\n\tSYS_SETXATTRAT              = 5463\n\tSYS_GETXATTRAT              = 5464\n\tSYS_LISTXATTRAT             = 5465\n\tSYS_REMOVEXATTRAT           = 5466\n\tSYS_OPEN_TREE_ATTR          = 5467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mipsle/include /tmp/mipsle/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mipsle && linux\n\npackage unix\n\nconst (\n\tSYS_SYSCALL                      = 4000\n\tSYS_EXIT                         = 4001\n\tSYS_FORK                         = 4002\n\tSYS_READ                         = 4003\n\tSYS_WRITE                        = 4004\n\tSYS_OPEN                         = 4005\n\tSYS_CLOSE                        = 4006\n\tSYS_WAITPID                      = 4007\n\tSYS_CREAT                        = 4008\n\tSYS_LINK                         = 4009\n\tSYS_UNLINK                       = 4010\n\tSYS_EXECVE                       = 4011\n\tSYS_CHDIR                        = 4012\n\tSYS_TIME                         = 4013\n\tSYS_MKNOD                        = 4014\n\tSYS_CHMOD                        = 4015\n\tSYS_LCHOWN                       = 4016\n\tSYS_BREAK                        = 4017\n\tSYS_UNUSED18                     = 4018\n\tSYS_LSEEK                        = 4019\n\tSYS_GETPID                       = 4020\n\tSYS_MOUNT                        = 4021\n\tSYS_UMOUNT                       = 4022\n\tSYS_SETUID                       = 4023\n\tSYS_GETUID                       = 4024\n\tSYS_STIME                        = 4025\n\tSYS_PTRACE                       = 4026\n\tSYS_ALARM                        = 4027\n\tSYS_UNUSED28                     = 4028\n\tSYS_PAUSE                        = 4029\n\tSYS_UTIME                        = 4030\n\tSYS_STTY                         = 4031\n\tSYS_GTTY                         = 4032\n\tSYS_ACCESS                       = 4033\n\tSYS_NICE                         = 4034\n\tSYS_FTIME                        = 4035\n\tSYS_SYNC                         = 4036\n\tSYS_KILL                         = 4037\n\tSYS_RENAME                       = 4038\n\tSYS_MKDIR                        = 4039\n\tSYS_RMDIR                        = 4040\n\tSYS_DUP                          = 4041\n\tSYS_PIPE                         = 4042\n\tSYS_TIMES                        = 4043\n\tSYS_PROF                         = 4044\n\tSYS_BRK                          = 4045\n\tSYS_SETGID                       = 4046\n\tSYS_GETGID                       = 4047\n\tSYS_SIGNAL                       = 4048\n\tSYS_GETEUID                      = 4049\n\tSYS_GETEGID                      = 4050\n\tSYS_ACCT                         = 4051\n\tSYS_UMOUNT2                      = 4052\n\tSYS_LOCK                         = 4053\n\tSYS_IOCTL                        = 4054\n\tSYS_FCNTL                        = 4055\n\tSYS_MPX                          = 4056\n\tSYS_SETPGID                      = 4057\n\tSYS_ULIMIT                       = 4058\n\tSYS_UNUSED59                     = 4059\n\tSYS_UMASK                        = 4060\n\tSYS_CHROOT                       = 4061\n\tSYS_USTAT                        = 4062\n\tSYS_DUP2                         = 4063\n\tSYS_GETPPID                      = 4064\n\tSYS_GETPGRP                      = 4065\n\tSYS_SETSID                       = 4066\n\tSYS_SIGACTION                    = 4067\n\tSYS_SGETMASK                     = 4068\n\tSYS_SSETMASK                     = 4069\n\tSYS_SETREUID                     = 4070\n\tSYS_SETREGID                     = 4071\n\tSYS_SIGSUSPEND                   = 4072\n\tSYS_SIGPENDING                   = 4073\n\tSYS_SETHOSTNAME                  = 4074\n\tSYS_SETRLIMIT                    = 4075\n\tSYS_GETRLIMIT                    = 4076\n\tSYS_GETRUSAGE                    = 4077\n\tSYS_GETTIMEOFDAY                 = 4078\n\tSYS_SETTIMEOFDAY                 = 4079\n\tSYS_GETGROUPS                    = 4080\n\tSYS_SETGROUPS                    = 4081\n\tSYS_RESERVED82                   = 4082\n\tSYS_SYMLINK                      = 4083\n\tSYS_UNUSED84                     = 4084\n\tSYS_READLINK                     = 4085\n\tSYS_USELIB                       = 4086\n\tSYS_SWAPON                       = 4087\n\tSYS_REBOOT                       = 4088\n\tSYS_READDIR                      = 4089\n\tSYS_MMAP                         = 4090\n\tSYS_MUNMAP                       = 4091\n\tSYS_TRUNCATE                     = 4092\n\tSYS_FTRUNCATE                    = 4093\n\tSYS_FCHMOD                       = 4094\n\tSYS_FCHOWN                       = 4095\n\tSYS_GETPRIORITY                  = 4096\n\tSYS_SETPRIORITY                  = 4097\n\tSYS_PROFIL                       = 4098\n\tSYS_STATFS                       = 4099\n\tSYS_FSTATFS                      = 4100\n\tSYS_IOPERM                       = 4101\n\tSYS_SOCKETCALL                   = 4102\n\tSYS_SYSLOG                       = 4103\n\tSYS_SETITIMER                    = 4104\n\tSYS_GETITIMER                    = 4105\n\tSYS_STAT                         = 4106\n\tSYS_LSTAT                        = 4107\n\tSYS_FSTAT                        = 4108\n\tSYS_UNUSED109                    = 4109\n\tSYS_IOPL                         = 4110\n\tSYS_VHANGUP                      = 4111\n\tSYS_IDLE                         = 4112\n\tSYS_VM86                         = 4113\n\tSYS_WAIT4                        = 4114\n\tSYS_SWAPOFF                      = 4115\n\tSYS_SYSINFO                      = 4116\n\tSYS_IPC                          = 4117\n\tSYS_FSYNC                        = 4118\n\tSYS_SIGRETURN                    = 4119\n\tSYS_CLONE                        = 4120\n\tSYS_SETDOMAINNAME                = 4121\n\tSYS_UNAME                        = 4122\n\tSYS_MODIFY_LDT                   = 4123\n\tSYS_ADJTIMEX                     = 4124\n\tSYS_MPROTECT                     = 4125\n\tSYS_SIGPROCMASK                  = 4126\n\tSYS_CREATE_MODULE                = 4127\n\tSYS_INIT_MODULE                  = 4128\n\tSYS_DELETE_MODULE                = 4129\n\tSYS_GET_KERNEL_SYMS              = 4130\n\tSYS_QUOTACTL                     = 4131\n\tSYS_GETPGID                      = 4132\n\tSYS_FCHDIR                       = 4133\n\tSYS_BDFLUSH                      = 4134\n\tSYS_SYSFS                        = 4135\n\tSYS_PERSONALITY                  = 4136\n\tSYS_AFS_SYSCALL                  = 4137\n\tSYS_SETFSUID                     = 4138\n\tSYS_SETFSGID                     = 4139\n\tSYS__LLSEEK                      = 4140\n\tSYS_GETDENTS                     = 4141\n\tSYS__NEWSELECT                   = 4142\n\tSYS_FLOCK                        = 4143\n\tSYS_MSYNC                        = 4144\n\tSYS_READV                        = 4145\n\tSYS_WRITEV                       = 4146\n\tSYS_CACHEFLUSH                   = 4147\n\tSYS_CACHECTL                     = 4148\n\tSYS_SYSMIPS                      = 4149\n\tSYS_UNUSED150                    = 4150\n\tSYS_GETSID                       = 4151\n\tSYS_FDATASYNC                    = 4152\n\tSYS__SYSCTL                      = 4153\n\tSYS_MLOCK                        = 4154\n\tSYS_MUNLOCK                      = 4155\n\tSYS_MLOCKALL                     = 4156\n\tSYS_MUNLOCKALL                   = 4157\n\tSYS_SCHED_SETPARAM               = 4158\n\tSYS_SCHED_GETPARAM               = 4159\n\tSYS_SCHED_SETSCHEDULER           = 4160\n\tSYS_SCHED_GETSCHEDULER           = 4161\n\tSYS_SCHED_YIELD                  = 4162\n\tSYS_SCHED_GET_PRIORITY_MAX       = 4163\n\tSYS_SCHED_GET_PRIORITY_MIN       = 4164\n\tSYS_SCHED_RR_GET_INTERVAL        = 4165\n\tSYS_NANOSLEEP                    = 4166\n\tSYS_MREMAP                       = 4167\n\tSYS_ACCEPT                       = 4168\n\tSYS_BIND                         = 4169\n\tSYS_CONNECT                      = 4170\n\tSYS_GETPEERNAME                  = 4171\n\tSYS_GETSOCKNAME                  = 4172\n\tSYS_GETSOCKOPT                   = 4173\n\tSYS_LISTEN                       = 4174\n\tSYS_RECV                         = 4175\n\tSYS_RECVFROM                     = 4176\n\tSYS_RECVMSG                      = 4177\n\tSYS_SEND                         = 4178\n\tSYS_SENDMSG                      = 4179\n\tSYS_SENDTO                       = 4180\n\tSYS_SETSOCKOPT                   = 4181\n\tSYS_SHUTDOWN                     = 4182\n\tSYS_SOCKET                       = 4183\n\tSYS_SOCKETPAIR                   = 4184\n\tSYS_SETRESUID                    = 4185\n\tSYS_GETRESUID                    = 4186\n\tSYS_QUERY_MODULE                 = 4187\n\tSYS_POLL                         = 4188\n\tSYS_NFSSERVCTL                   = 4189\n\tSYS_SETRESGID                    = 4190\n\tSYS_GETRESGID                    = 4191\n\tSYS_PRCTL                        = 4192\n\tSYS_RT_SIGRETURN                 = 4193\n\tSYS_RT_SIGACTION                 = 4194\n\tSYS_RT_SIGPROCMASK               = 4195\n\tSYS_RT_SIGPENDING                = 4196\n\tSYS_RT_SIGTIMEDWAIT              = 4197\n\tSYS_RT_SIGQUEUEINFO              = 4198\n\tSYS_RT_SIGSUSPEND                = 4199\n\tSYS_PREAD64                      = 4200\n\tSYS_PWRITE64                     = 4201\n\tSYS_CHOWN                        = 4202\n\tSYS_GETCWD                       = 4203\n\tSYS_CAPGET                       = 4204\n\tSYS_CAPSET                       = 4205\n\tSYS_SIGALTSTACK                  = 4206\n\tSYS_SENDFILE                     = 4207\n\tSYS_GETPMSG                      = 4208\n\tSYS_PUTPMSG                      = 4209\n\tSYS_MMAP2                        = 4210\n\tSYS_TRUNCATE64                   = 4211\n\tSYS_FTRUNCATE64                  = 4212\n\tSYS_STAT64                       = 4213\n\tSYS_LSTAT64                      = 4214\n\tSYS_FSTAT64                      = 4215\n\tSYS_PIVOT_ROOT                   = 4216\n\tSYS_MINCORE                      = 4217\n\tSYS_MADVISE                      = 4218\n\tSYS_GETDENTS64                   = 4219\n\tSYS_FCNTL64                      = 4220\n\tSYS_RESERVED221                  = 4221\n\tSYS_GETTID                       = 4222\n\tSYS_READAHEAD                    = 4223\n\tSYS_SETXATTR                     = 4224\n\tSYS_LSETXATTR                    = 4225\n\tSYS_FSETXATTR                    = 4226\n\tSYS_GETXATTR                     = 4227\n\tSYS_LGETXATTR                    = 4228\n\tSYS_FGETXATTR                    = 4229\n\tSYS_LISTXATTR                    = 4230\n\tSYS_LLISTXATTR                   = 4231\n\tSYS_FLISTXATTR                   = 4232\n\tSYS_REMOVEXATTR                  = 4233\n\tSYS_LREMOVEXATTR                 = 4234\n\tSYS_FREMOVEXATTR                 = 4235\n\tSYS_TKILL                        = 4236\n\tSYS_SENDFILE64                   = 4237\n\tSYS_FUTEX                        = 4238\n\tSYS_SCHED_SETAFFINITY            = 4239\n\tSYS_SCHED_GETAFFINITY            = 4240\n\tSYS_IO_SETUP                     = 4241\n\tSYS_IO_DESTROY                   = 4242\n\tSYS_IO_GETEVENTS                 = 4243\n\tSYS_IO_SUBMIT                    = 4244\n\tSYS_IO_CANCEL                    = 4245\n\tSYS_EXIT_GROUP                   = 4246\n\tSYS_LOOKUP_DCOOKIE               = 4247\n\tSYS_EPOLL_CREATE                 = 4248\n\tSYS_EPOLL_CTL                    = 4249\n\tSYS_EPOLL_WAIT                   = 4250\n\tSYS_REMAP_FILE_PAGES             = 4251\n\tSYS_SET_TID_ADDRESS              = 4252\n\tSYS_RESTART_SYSCALL              = 4253\n\tSYS_FADVISE64                    = 4254\n\tSYS_STATFS64                     = 4255\n\tSYS_FSTATFS64                    = 4256\n\tSYS_TIMER_CREATE                 = 4257\n\tSYS_TIMER_SETTIME                = 4258\n\tSYS_TIMER_GETTIME                = 4259\n\tSYS_TIMER_GETOVERRUN             = 4260\n\tSYS_TIMER_DELETE                 = 4261\n\tSYS_CLOCK_SETTIME                = 4262\n\tSYS_CLOCK_GETTIME                = 4263\n\tSYS_CLOCK_GETRES                 = 4264\n\tSYS_CLOCK_NANOSLEEP              = 4265\n\tSYS_TGKILL                       = 4266\n\tSYS_UTIMES                       = 4267\n\tSYS_MBIND                        = 4268\n\tSYS_GET_MEMPOLICY                = 4269\n\tSYS_SET_MEMPOLICY                = 4270\n\tSYS_MQ_OPEN                      = 4271\n\tSYS_MQ_UNLINK                    = 4272\n\tSYS_MQ_TIMEDSEND                 = 4273\n\tSYS_MQ_TIMEDRECEIVE              = 4274\n\tSYS_MQ_NOTIFY                    = 4275\n\tSYS_MQ_GETSETATTR                = 4276\n\tSYS_VSERVER                      = 4277\n\tSYS_WAITID                       = 4278\n\tSYS_ADD_KEY                      = 4280\n\tSYS_REQUEST_KEY                  = 4281\n\tSYS_KEYCTL                       = 4282\n\tSYS_SET_THREAD_AREA              = 4283\n\tSYS_INOTIFY_INIT                 = 4284\n\tSYS_INOTIFY_ADD_WATCH            = 4285\n\tSYS_INOTIFY_RM_WATCH             = 4286\n\tSYS_MIGRATE_PAGES                = 4287\n\tSYS_OPENAT                       = 4288\n\tSYS_MKDIRAT                      = 4289\n\tSYS_MKNODAT                      = 4290\n\tSYS_FCHOWNAT                     = 4291\n\tSYS_FUTIMESAT                    = 4292\n\tSYS_FSTATAT64                    = 4293\n\tSYS_UNLINKAT                     = 4294\n\tSYS_RENAMEAT                     = 4295\n\tSYS_LINKAT                       = 4296\n\tSYS_SYMLINKAT                    = 4297\n\tSYS_READLINKAT                   = 4298\n\tSYS_FCHMODAT                     = 4299\n\tSYS_FACCESSAT                    = 4300\n\tSYS_PSELECT6                     = 4301\n\tSYS_PPOLL                        = 4302\n\tSYS_UNSHARE                      = 4303\n\tSYS_SPLICE                       = 4304\n\tSYS_SYNC_FILE_RANGE              = 4305\n\tSYS_TEE                          = 4306\n\tSYS_VMSPLICE                     = 4307\n\tSYS_MOVE_PAGES                   = 4308\n\tSYS_SET_ROBUST_LIST              = 4309\n\tSYS_GET_ROBUST_LIST              = 4310\n\tSYS_KEXEC_LOAD                   = 4311\n\tSYS_GETCPU                       = 4312\n\tSYS_EPOLL_PWAIT                  = 4313\n\tSYS_IOPRIO_SET                   = 4314\n\tSYS_IOPRIO_GET                   = 4315\n\tSYS_UTIMENSAT                    = 4316\n\tSYS_SIGNALFD                     = 4317\n\tSYS_TIMERFD                      = 4318\n\tSYS_EVENTFD                      = 4319\n\tSYS_FALLOCATE                    = 4320\n\tSYS_TIMERFD_CREATE               = 4321\n\tSYS_TIMERFD_GETTIME              = 4322\n\tSYS_TIMERFD_SETTIME              = 4323\n\tSYS_SIGNALFD4                    = 4324\n\tSYS_EVENTFD2                     = 4325\n\tSYS_EPOLL_CREATE1                = 4326\n\tSYS_DUP3                         = 4327\n\tSYS_PIPE2                        = 4328\n\tSYS_INOTIFY_INIT1                = 4329\n\tSYS_PREADV                       = 4330\n\tSYS_PWRITEV                      = 4331\n\tSYS_RT_TGSIGQUEUEINFO            = 4332\n\tSYS_PERF_EVENT_OPEN              = 4333\n\tSYS_ACCEPT4                      = 4334\n\tSYS_RECVMMSG                     = 4335\n\tSYS_FANOTIFY_INIT                = 4336\n\tSYS_FANOTIFY_MARK                = 4337\n\tSYS_PRLIMIT64                    = 4338\n\tSYS_NAME_TO_HANDLE_AT            = 4339\n\tSYS_OPEN_BY_HANDLE_AT            = 4340\n\tSYS_CLOCK_ADJTIME                = 4341\n\tSYS_SYNCFS                       = 4342\n\tSYS_SENDMMSG                     = 4343\n\tSYS_SETNS                        = 4344\n\tSYS_PROCESS_VM_READV             = 4345\n\tSYS_PROCESS_VM_WRITEV            = 4346\n\tSYS_KCMP                         = 4347\n\tSYS_FINIT_MODULE                 = 4348\n\tSYS_SCHED_SETATTR                = 4349\n\tSYS_SCHED_GETATTR                = 4350\n\tSYS_RENAMEAT2                    = 4351\n\tSYS_SECCOMP                      = 4352\n\tSYS_GETRANDOM                    = 4353\n\tSYS_MEMFD_CREATE                 = 4354\n\tSYS_BPF                          = 4355\n\tSYS_EXECVEAT                     = 4356\n\tSYS_USERFAULTFD                  = 4357\n\tSYS_MEMBARRIER                   = 4358\n\tSYS_MLOCK2                       = 4359\n\tSYS_COPY_FILE_RANGE              = 4360\n\tSYS_PREADV2                      = 4361\n\tSYS_PWRITEV2                     = 4362\n\tSYS_PKEY_MPROTECT                = 4363\n\tSYS_PKEY_ALLOC                   = 4364\n\tSYS_PKEY_FREE                    = 4365\n\tSYS_STATX                        = 4366\n\tSYS_RSEQ                         = 4367\n\tSYS_IO_PGETEVENTS                = 4368\n\tSYS_SEMGET                       = 4393\n\tSYS_SEMCTL                       = 4394\n\tSYS_SHMGET                       = 4395\n\tSYS_SHMCTL                       = 4396\n\tSYS_SHMAT                        = 4397\n\tSYS_SHMDT                        = 4398\n\tSYS_MSGGET                       = 4399\n\tSYS_MSGSND                       = 4400\n\tSYS_MSGRCV                       = 4401\n\tSYS_MSGCTL                       = 4402\n\tSYS_CLOCK_GETTIME64              = 4403\n\tSYS_CLOCK_SETTIME64              = 4404\n\tSYS_CLOCK_ADJTIME64              = 4405\n\tSYS_CLOCK_GETRES_TIME64          = 4406\n\tSYS_CLOCK_NANOSLEEP_TIME64       = 4407\n\tSYS_TIMER_GETTIME64              = 4408\n\tSYS_TIMER_SETTIME64              = 4409\n\tSYS_TIMERFD_GETTIME64            = 4410\n\tSYS_TIMERFD_SETTIME64            = 4411\n\tSYS_UTIMENSAT_TIME64             = 4412\n\tSYS_PSELECT6_TIME64              = 4413\n\tSYS_PPOLL_TIME64                 = 4414\n\tSYS_IO_PGETEVENTS_TIME64         = 4416\n\tSYS_RECVMMSG_TIME64              = 4417\n\tSYS_MQ_TIMEDSEND_TIME64          = 4418\n\tSYS_MQ_TIMEDRECEIVE_TIME64       = 4419\n\tSYS_SEMTIMEDOP_TIME64            = 4420\n\tSYS_RT_SIGTIMEDWAIT_TIME64       = 4421\n\tSYS_FUTEX_TIME64                 = 4422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 4423\n\tSYS_PIDFD_SEND_SIGNAL            = 4424\n\tSYS_IO_URING_SETUP               = 4425\n\tSYS_IO_URING_ENTER               = 4426\n\tSYS_IO_URING_REGISTER            = 4427\n\tSYS_OPEN_TREE                    = 4428\n\tSYS_MOVE_MOUNT                   = 4429\n\tSYS_FSOPEN                       = 4430\n\tSYS_FSCONFIG                     = 4431\n\tSYS_FSMOUNT                      = 4432\n\tSYS_FSPICK                       = 4433\n\tSYS_PIDFD_OPEN                   = 4434\n\tSYS_CLONE3                       = 4435\n\tSYS_CLOSE_RANGE                  = 4436\n\tSYS_OPENAT2                      = 4437\n\tSYS_PIDFD_GETFD                  = 4438\n\tSYS_FACCESSAT2                   = 4439\n\tSYS_PROCESS_MADVISE              = 4440\n\tSYS_EPOLL_PWAIT2                 = 4441\n\tSYS_MOUNT_SETATTR                = 4442\n\tSYS_QUOTACTL_FD                  = 4443\n\tSYS_LANDLOCK_CREATE_RULESET      = 4444\n\tSYS_LANDLOCK_ADD_RULE            = 4445\n\tSYS_LANDLOCK_RESTRICT_SELF       = 4446\n\tSYS_PROCESS_MRELEASE             = 4448\n\tSYS_FUTEX_WAITV                  = 4449\n\tSYS_SET_MEMPOLICY_HOME_NODE      = 4450\n\tSYS_CACHESTAT                    = 4451\n\tSYS_FCHMODAT2                    = 4452\n\tSYS_MAP_SHADOW_STACK             = 4453\n\tSYS_FUTEX_WAKE                   = 4454\n\tSYS_FUTEX_WAIT                   = 4455\n\tSYS_FUTEX_REQUEUE                = 4456\n\tSYS_STATMOUNT                    = 4457\n\tSYS_LISTMOUNT                    = 4458\n\tSYS_LSM_GET_SELF_ATTR            = 4459\n\tSYS_LSM_SET_SELF_ATTR            = 4460\n\tSYS_LSM_LIST_MODULES             = 4461\n\tSYS_MSEAL                        = 4462\n\tSYS_SETXATTRAT                   = 4463\n\tSYS_GETXATTRAT                   = 4464\n\tSYS_LISTXATTRAT                  = 4465\n\tSYS_REMOVEXATTRAT                = 4466\n\tSYS_OPEN_TREE_ATTR               = 4467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc/include /tmp/ppc/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc && linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL              = 0\n\tSYS_EXIT                         = 1\n\tSYS_FORK                         = 2\n\tSYS_READ                         = 3\n\tSYS_WRITE                        = 4\n\tSYS_OPEN                         = 5\n\tSYS_CLOSE                        = 6\n\tSYS_WAITPID                      = 7\n\tSYS_CREAT                        = 8\n\tSYS_LINK                         = 9\n\tSYS_UNLINK                       = 10\n\tSYS_EXECVE                       = 11\n\tSYS_CHDIR                        = 12\n\tSYS_TIME                         = 13\n\tSYS_MKNOD                        = 14\n\tSYS_CHMOD                        = 15\n\tSYS_LCHOWN                       = 16\n\tSYS_BREAK                        = 17\n\tSYS_OLDSTAT                      = 18\n\tSYS_LSEEK                        = 19\n\tSYS_GETPID                       = 20\n\tSYS_MOUNT                        = 21\n\tSYS_UMOUNT                       = 22\n\tSYS_SETUID                       = 23\n\tSYS_GETUID                       = 24\n\tSYS_STIME                        = 25\n\tSYS_PTRACE                       = 26\n\tSYS_ALARM                        = 27\n\tSYS_OLDFSTAT                     = 28\n\tSYS_PAUSE                        = 29\n\tSYS_UTIME                        = 30\n\tSYS_STTY                         = 31\n\tSYS_GTTY                         = 32\n\tSYS_ACCESS                       = 33\n\tSYS_NICE                         = 34\n\tSYS_FTIME                        = 35\n\tSYS_SYNC                         = 36\n\tSYS_KILL                         = 37\n\tSYS_RENAME                       = 38\n\tSYS_MKDIR                        = 39\n\tSYS_RMDIR                        = 40\n\tSYS_DUP                          = 41\n\tSYS_PIPE                         = 42\n\tSYS_TIMES                        = 43\n\tSYS_PROF                         = 44\n\tSYS_BRK                          = 45\n\tSYS_SETGID                       = 46\n\tSYS_GETGID                       = 47\n\tSYS_SIGNAL                       = 48\n\tSYS_GETEUID                      = 49\n\tSYS_GETEGID                      = 50\n\tSYS_ACCT                         = 51\n\tSYS_UMOUNT2                      = 52\n\tSYS_LOCK                         = 53\n\tSYS_IOCTL                        = 54\n\tSYS_FCNTL                        = 55\n\tSYS_MPX                          = 56\n\tSYS_SETPGID                      = 57\n\tSYS_ULIMIT                       = 58\n\tSYS_OLDOLDUNAME                  = 59\n\tSYS_UMASK                        = 60\n\tSYS_CHROOT                       = 61\n\tSYS_USTAT                        = 62\n\tSYS_DUP2                         = 63\n\tSYS_GETPPID                      = 64\n\tSYS_GETPGRP                      = 65\n\tSYS_SETSID                       = 66\n\tSYS_SIGACTION                    = 67\n\tSYS_SGETMASK                     = 68\n\tSYS_SSETMASK                     = 69\n\tSYS_SETREUID                     = 70\n\tSYS_SETREGID                     = 71\n\tSYS_SIGSUSPEND                   = 72\n\tSYS_SIGPENDING                   = 73\n\tSYS_SETHOSTNAME                  = 74\n\tSYS_SETRLIMIT                    = 75\n\tSYS_GETRLIMIT                    = 76\n\tSYS_GETRUSAGE                    = 77\n\tSYS_GETTIMEOFDAY                 = 78\n\tSYS_SETTIMEOFDAY                 = 79\n\tSYS_GETGROUPS                    = 80\n\tSYS_SETGROUPS                    = 81\n\tSYS_SELECT                       = 82\n\tSYS_SYMLINK                      = 83\n\tSYS_OLDLSTAT                     = 84\n\tSYS_READLINK                     = 85\n\tSYS_USELIB                       = 86\n\tSYS_SWAPON                       = 87\n\tSYS_REBOOT                       = 88\n\tSYS_READDIR                      = 89\n\tSYS_MMAP                         = 90\n\tSYS_MUNMAP                       = 91\n\tSYS_TRUNCATE                     = 92\n\tSYS_FTRUNCATE                    = 93\n\tSYS_FCHMOD                       = 94\n\tSYS_FCHOWN                       = 95\n\tSYS_GETPRIORITY                  = 96\n\tSYS_SETPRIORITY                  = 97\n\tSYS_PROFIL                       = 98\n\tSYS_STATFS                       = 99\n\tSYS_FSTATFS                      = 100\n\tSYS_IOPERM                       = 101\n\tSYS_SOCKETCALL                   = 102\n\tSYS_SYSLOG                       = 103\n\tSYS_SETITIMER                    = 104\n\tSYS_GETITIMER                    = 105\n\tSYS_STAT                         = 106\n\tSYS_LSTAT                        = 107\n\tSYS_FSTAT                        = 108\n\tSYS_OLDUNAME                     = 109\n\tSYS_IOPL                         = 110\n\tSYS_VHANGUP                      = 111\n\tSYS_IDLE                         = 112\n\tSYS_VM86                         = 113\n\tSYS_WAIT4                        = 114\n\tSYS_SWAPOFF                      = 115\n\tSYS_SYSINFO                      = 116\n\tSYS_IPC                          = 117\n\tSYS_FSYNC                        = 118\n\tSYS_SIGRETURN                    = 119\n\tSYS_CLONE                        = 120\n\tSYS_SETDOMAINNAME                = 121\n\tSYS_UNAME                        = 122\n\tSYS_MODIFY_LDT                   = 123\n\tSYS_ADJTIMEX                     = 124\n\tSYS_MPROTECT                     = 125\n\tSYS_SIGPROCMASK                  = 126\n\tSYS_CREATE_MODULE                = 127\n\tSYS_INIT_MODULE                  = 128\n\tSYS_DELETE_MODULE                = 129\n\tSYS_GET_KERNEL_SYMS              = 130\n\tSYS_QUOTACTL                     = 131\n\tSYS_GETPGID                      = 132\n\tSYS_FCHDIR                       = 133\n\tSYS_BDFLUSH                      = 134\n\tSYS_SYSFS                        = 135\n\tSYS_PERSONALITY                  = 136\n\tSYS_AFS_SYSCALL                  = 137\n\tSYS_SETFSUID                     = 138\n\tSYS_SETFSGID                     = 139\n\tSYS__LLSEEK                      = 140\n\tSYS_GETDENTS                     = 141\n\tSYS__NEWSELECT                   = 142\n\tSYS_FLOCK                        = 143\n\tSYS_MSYNC                        = 144\n\tSYS_READV                        = 145\n\tSYS_WRITEV                       = 146\n\tSYS_GETSID                       = 147\n\tSYS_FDATASYNC                    = 148\n\tSYS__SYSCTL                      = 149\n\tSYS_MLOCK                        = 150\n\tSYS_MUNLOCK                      = 151\n\tSYS_MLOCKALL                     = 152\n\tSYS_MUNLOCKALL                   = 153\n\tSYS_SCHED_SETPARAM               = 154\n\tSYS_SCHED_GETPARAM               = 155\n\tSYS_SCHED_SETSCHEDULER           = 156\n\tSYS_SCHED_GETSCHEDULER           = 157\n\tSYS_SCHED_YIELD                  = 158\n\tSYS_SCHED_GET_PRIORITY_MAX       = 159\n\tSYS_SCHED_GET_PRIORITY_MIN       = 160\n\tSYS_SCHED_RR_GET_INTERVAL        = 161\n\tSYS_NANOSLEEP                    = 162\n\tSYS_MREMAP                       = 163\n\tSYS_SETRESUID                    = 164\n\tSYS_GETRESUID                    = 165\n\tSYS_QUERY_MODULE                 = 166\n\tSYS_POLL                         = 167\n\tSYS_NFSSERVCTL                   = 168\n\tSYS_SETRESGID                    = 169\n\tSYS_GETRESGID                    = 170\n\tSYS_PRCTL                        = 171\n\tSYS_RT_SIGRETURN                 = 172\n\tSYS_RT_SIGACTION                 = 173\n\tSYS_RT_SIGPROCMASK               = 174\n\tSYS_RT_SIGPENDING                = 175\n\tSYS_RT_SIGTIMEDWAIT              = 176\n\tSYS_RT_SIGQUEUEINFO              = 177\n\tSYS_RT_SIGSUSPEND                = 178\n\tSYS_PREAD64                      = 179\n\tSYS_PWRITE64                     = 180\n\tSYS_CHOWN                        = 181\n\tSYS_GETCWD                       = 182\n\tSYS_CAPGET                       = 183\n\tSYS_CAPSET                       = 184\n\tSYS_SIGALTSTACK                  = 185\n\tSYS_SENDFILE                     = 186\n\tSYS_GETPMSG                      = 187\n\tSYS_PUTPMSG                      = 188\n\tSYS_VFORK                        = 189\n\tSYS_UGETRLIMIT                   = 190\n\tSYS_READAHEAD                    = 191\n\tSYS_MMAP2                        = 192\n\tSYS_TRUNCATE64                   = 193\n\tSYS_FTRUNCATE64                  = 194\n\tSYS_STAT64                       = 195\n\tSYS_LSTAT64                      = 196\n\tSYS_FSTAT64                      = 197\n\tSYS_PCICONFIG_READ               = 198\n\tSYS_PCICONFIG_WRITE              = 199\n\tSYS_PCICONFIG_IOBASE             = 200\n\tSYS_MULTIPLEXER                  = 201\n\tSYS_GETDENTS64                   = 202\n\tSYS_PIVOT_ROOT                   = 203\n\tSYS_FCNTL64                      = 204\n\tSYS_MADVISE                      = 205\n\tSYS_MINCORE                      = 206\n\tSYS_GETTID                       = 207\n\tSYS_TKILL                        = 208\n\tSYS_SETXATTR                     = 209\n\tSYS_LSETXATTR                    = 210\n\tSYS_FSETXATTR                    = 211\n\tSYS_GETXATTR                     = 212\n\tSYS_LGETXATTR                    = 213\n\tSYS_FGETXATTR                    = 214\n\tSYS_LISTXATTR                    = 215\n\tSYS_LLISTXATTR                   = 216\n\tSYS_FLISTXATTR                   = 217\n\tSYS_REMOVEXATTR                  = 218\n\tSYS_LREMOVEXATTR                 = 219\n\tSYS_FREMOVEXATTR                 = 220\n\tSYS_FUTEX                        = 221\n\tSYS_SCHED_SETAFFINITY            = 222\n\tSYS_SCHED_GETAFFINITY            = 223\n\tSYS_TUXCALL                      = 225\n\tSYS_SENDFILE64                   = 226\n\tSYS_IO_SETUP                     = 227\n\tSYS_IO_DESTROY                   = 228\n\tSYS_IO_GETEVENTS                 = 229\n\tSYS_IO_SUBMIT                    = 230\n\tSYS_IO_CANCEL                    = 231\n\tSYS_SET_TID_ADDRESS              = 232\n\tSYS_FADVISE64                    = 233\n\tSYS_EXIT_GROUP                   = 234\n\tSYS_LOOKUP_DCOOKIE               = 235\n\tSYS_EPOLL_CREATE                 = 236\n\tSYS_EPOLL_CTL                    = 237\n\tSYS_EPOLL_WAIT                   = 238\n\tSYS_REMAP_FILE_PAGES             = 239\n\tSYS_TIMER_CREATE                 = 240\n\tSYS_TIMER_SETTIME                = 241\n\tSYS_TIMER_GETTIME                = 242\n\tSYS_TIMER_GETOVERRUN             = 243\n\tSYS_TIMER_DELETE                 = 244\n\tSYS_CLOCK_SETTIME                = 245\n\tSYS_CLOCK_GETTIME                = 246\n\tSYS_CLOCK_GETRES                 = 247\n\tSYS_CLOCK_NANOSLEEP              = 248\n\tSYS_SWAPCONTEXT                  = 249\n\tSYS_TGKILL                       = 250\n\tSYS_UTIMES                       = 251\n\tSYS_STATFS64                     = 252\n\tSYS_FSTATFS64                    = 253\n\tSYS_FADVISE64_64                 = 254\n\tSYS_RTAS                         = 255\n\tSYS_SYS_DEBUG_SETCONTEXT         = 256\n\tSYS_MIGRATE_PAGES                = 258\n\tSYS_MBIND                        = 259\n\tSYS_GET_MEMPOLICY                = 260\n\tSYS_SET_MEMPOLICY                = 261\n\tSYS_MQ_OPEN                      = 262\n\tSYS_MQ_UNLINK                    = 263\n\tSYS_MQ_TIMEDSEND                 = 264\n\tSYS_MQ_TIMEDRECEIVE              = 265\n\tSYS_MQ_NOTIFY                    = 266\n\tSYS_MQ_GETSETATTR                = 267\n\tSYS_KEXEC_LOAD                   = 268\n\tSYS_ADD_KEY                      = 269\n\tSYS_REQUEST_KEY                  = 270\n\tSYS_KEYCTL                       = 271\n\tSYS_WAITID                       = 272\n\tSYS_IOPRIO_SET                   = 273\n\tSYS_IOPRIO_GET                   = 274\n\tSYS_INOTIFY_INIT                 = 275\n\tSYS_INOTIFY_ADD_WATCH            = 276\n\tSYS_INOTIFY_RM_WATCH             = 277\n\tSYS_SPU_RUN                      = 278\n\tSYS_SPU_CREATE                   = 279\n\tSYS_PSELECT6                     = 280\n\tSYS_PPOLL                        = 281\n\tSYS_UNSHARE                      = 282\n\tSYS_SPLICE                       = 283\n\tSYS_TEE                          = 284\n\tSYS_VMSPLICE                     = 285\n\tSYS_OPENAT                       = 286\n\tSYS_MKDIRAT                      = 287\n\tSYS_MKNODAT                      = 288\n\tSYS_FCHOWNAT                     = 289\n\tSYS_FUTIMESAT                    = 290\n\tSYS_FSTATAT64                    = 291\n\tSYS_UNLINKAT                     = 292\n\tSYS_RENAMEAT                     = 293\n\tSYS_LINKAT                       = 294\n\tSYS_SYMLINKAT                    = 295\n\tSYS_READLINKAT                   = 296\n\tSYS_FCHMODAT                     = 297\n\tSYS_FACCESSAT                    = 298\n\tSYS_GET_ROBUST_LIST              = 299\n\tSYS_SET_ROBUST_LIST              = 300\n\tSYS_MOVE_PAGES                   = 301\n\tSYS_GETCPU                       = 302\n\tSYS_EPOLL_PWAIT                  = 303\n\tSYS_UTIMENSAT                    = 304\n\tSYS_SIGNALFD                     = 305\n\tSYS_TIMERFD_CREATE               = 306\n\tSYS_EVENTFD                      = 307\n\tSYS_SYNC_FILE_RANGE2             = 308\n\tSYS_FALLOCATE                    = 309\n\tSYS_SUBPAGE_PROT                 = 310\n\tSYS_TIMERFD_SETTIME              = 311\n\tSYS_TIMERFD_GETTIME              = 312\n\tSYS_SIGNALFD4                    = 313\n\tSYS_EVENTFD2                     = 314\n\tSYS_EPOLL_CREATE1                = 315\n\tSYS_DUP3                         = 316\n\tSYS_PIPE2                        = 317\n\tSYS_INOTIFY_INIT1                = 318\n\tSYS_PERF_EVENT_OPEN              = 319\n\tSYS_PREADV                       = 320\n\tSYS_PWRITEV                      = 321\n\tSYS_RT_TGSIGQUEUEINFO            = 322\n\tSYS_FANOTIFY_INIT                = 323\n\tSYS_FANOTIFY_MARK                = 324\n\tSYS_PRLIMIT64                    = 325\n\tSYS_SOCKET                       = 326\n\tSYS_BIND                         = 327\n\tSYS_CONNECT                      = 328\n\tSYS_LISTEN                       = 329\n\tSYS_ACCEPT                       = 330\n\tSYS_GETSOCKNAME                  = 331\n\tSYS_GETPEERNAME                  = 332\n\tSYS_SOCKETPAIR                   = 333\n\tSYS_SEND                         = 334\n\tSYS_SENDTO                       = 335\n\tSYS_RECV                         = 336\n\tSYS_RECVFROM                     = 337\n\tSYS_SHUTDOWN                     = 338\n\tSYS_SETSOCKOPT                   = 339\n\tSYS_GETSOCKOPT                   = 340\n\tSYS_SENDMSG                      = 341\n\tSYS_RECVMSG                      = 342\n\tSYS_RECVMMSG                     = 343\n\tSYS_ACCEPT4                      = 344\n\tSYS_NAME_TO_HANDLE_AT            = 345\n\tSYS_OPEN_BY_HANDLE_AT            = 346\n\tSYS_CLOCK_ADJTIME                = 347\n\tSYS_SYNCFS                       = 348\n\tSYS_SENDMMSG                     = 349\n\tSYS_SETNS                        = 350\n\tSYS_PROCESS_VM_READV             = 351\n\tSYS_PROCESS_VM_WRITEV            = 352\n\tSYS_FINIT_MODULE                 = 353\n\tSYS_KCMP                         = 354\n\tSYS_SCHED_SETATTR                = 355\n\tSYS_SCHED_GETATTR                = 356\n\tSYS_RENAMEAT2                    = 357\n\tSYS_SECCOMP                      = 358\n\tSYS_GETRANDOM                    = 359\n\tSYS_MEMFD_CREATE                 = 360\n\tSYS_BPF                          = 361\n\tSYS_EXECVEAT                     = 362\n\tSYS_SWITCH_ENDIAN                = 363\n\tSYS_USERFAULTFD                  = 364\n\tSYS_MEMBARRIER                   = 365\n\tSYS_MLOCK2                       = 378\n\tSYS_COPY_FILE_RANGE              = 379\n\tSYS_PREADV2                      = 380\n\tSYS_PWRITEV2                     = 381\n\tSYS_KEXEC_FILE_LOAD              = 382\n\tSYS_STATX                        = 383\n\tSYS_PKEY_ALLOC                   = 384\n\tSYS_PKEY_FREE                    = 385\n\tSYS_PKEY_MPROTECT                = 386\n\tSYS_RSEQ                         = 387\n\tSYS_IO_PGETEVENTS                = 388\n\tSYS_SEMGET                       = 393\n\tSYS_SEMCTL                       = 394\n\tSYS_SHMGET                       = 395\n\tSYS_SHMCTL                       = 396\n\tSYS_SHMAT                        = 397\n\tSYS_SHMDT                        = 398\n\tSYS_MSGGET                       = 399\n\tSYS_MSGSND                       = 400\n\tSYS_MSGRCV                       = 401\n\tSYS_MSGCTL                       = 402\n\tSYS_CLOCK_GETTIME64              = 403\n\tSYS_CLOCK_SETTIME64              = 404\n\tSYS_CLOCK_ADJTIME64              = 405\n\tSYS_CLOCK_GETRES_TIME64          = 406\n\tSYS_CLOCK_NANOSLEEP_TIME64       = 407\n\tSYS_TIMER_GETTIME64              = 408\n\tSYS_TIMER_SETTIME64              = 409\n\tSYS_TIMERFD_GETTIME64            = 410\n\tSYS_TIMERFD_SETTIME64            = 411\n\tSYS_UTIMENSAT_TIME64             = 412\n\tSYS_PSELECT6_TIME64              = 413\n\tSYS_PPOLL_TIME64                 = 414\n\tSYS_IO_PGETEVENTS_TIME64         = 416\n\tSYS_RECVMMSG_TIME64              = 417\n\tSYS_MQ_TIMEDSEND_TIME64          = 418\n\tSYS_MQ_TIMEDRECEIVE_TIME64       = 419\n\tSYS_SEMTIMEDOP_TIME64            = 420\n\tSYS_RT_SIGTIMEDWAIT_TIME64       = 421\n\tSYS_FUTEX_TIME64                 = 422\n\tSYS_SCHED_RR_GET_INTERVAL_TIME64 = 423\n\tSYS_PIDFD_SEND_SIGNAL            = 424\n\tSYS_IO_URING_SETUP               = 425\n\tSYS_IO_URING_ENTER               = 426\n\tSYS_IO_URING_REGISTER            = 427\n\tSYS_OPEN_TREE                    = 428\n\tSYS_MOVE_MOUNT                   = 429\n\tSYS_FSOPEN                       = 430\n\tSYS_FSCONFIG                     = 431\n\tSYS_FSMOUNT                      = 432\n\tSYS_FSPICK                       = 433\n\tSYS_PIDFD_OPEN                   = 434\n\tSYS_CLONE3                       = 435\n\tSYS_CLOSE_RANGE                  = 436\n\tSYS_OPENAT2                      = 437\n\tSYS_PIDFD_GETFD                  = 438\n\tSYS_FACCESSAT2                   = 439\n\tSYS_PROCESS_MADVISE              = 440\n\tSYS_EPOLL_PWAIT2                 = 441\n\tSYS_MOUNT_SETATTR                = 442\n\tSYS_QUOTACTL_FD                  = 443\n\tSYS_LANDLOCK_CREATE_RULESET      = 444\n\tSYS_LANDLOCK_ADD_RULE            = 445\n\tSYS_LANDLOCK_RESTRICT_SELF       = 446\n\tSYS_PROCESS_MRELEASE             = 448\n\tSYS_FUTEX_WAITV                  = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE      = 450\n\tSYS_CACHESTAT                    = 451\n\tSYS_FCHMODAT2                    = 452\n\tSYS_MAP_SHADOW_STACK             = 453\n\tSYS_FUTEX_WAKE                   = 454\n\tSYS_FUTEX_WAIT                   = 455\n\tSYS_FUTEX_REQUEUE                = 456\n\tSYS_STATMOUNT                    = 457\n\tSYS_LISTMOUNT                    = 458\n\tSYS_LSM_GET_SELF_ATTR            = 459\n\tSYS_LSM_SET_SELF_ATTR            = 460\n\tSYS_LSM_LIST_MODULES             = 461\n\tSYS_MSEAL                        = 462\n\tSYS_SETXATTRAT                   = 463\n\tSYS_GETXATTRAT                   = 464\n\tSYS_LISTXATTRAT                  = 465\n\tSYS_REMOVEXATTRAT                = 466\n\tSYS_OPEN_TREE_ATTR               = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64/include /tmp/ppc64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL         = 0\n\tSYS_EXIT                    = 1\n\tSYS_FORK                    = 2\n\tSYS_READ                    = 3\n\tSYS_WRITE                   = 4\n\tSYS_OPEN                    = 5\n\tSYS_CLOSE                   = 6\n\tSYS_WAITPID                 = 7\n\tSYS_CREAT                   = 8\n\tSYS_LINK                    = 9\n\tSYS_UNLINK                  = 10\n\tSYS_EXECVE                  = 11\n\tSYS_CHDIR                   = 12\n\tSYS_TIME                    = 13\n\tSYS_MKNOD                   = 14\n\tSYS_CHMOD                   = 15\n\tSYS_LCHOWN                  = 16\n\tSYS_BREAK                   = 17\n\tSYS_OLDSTAT                 = 18\n\tSYS_LSEEK                   = 19\n\tSYS_GETPID                  = 20\n\tSYS_MOUNT                   = 21\n\tSYS_UMOUNT                  = 22\n\tSYS_SETUID                  = 23\n\tSYS_GETUID                  = 24\n\tSYS_STIME                   = 25\n\tSYS_PTRACE                  = 26\n\tSYS_ALARM                   = 27\n\tSYS_OLDFSTAT                = 28\n\tSYS_PAUSE                   = 29\n\tSYS_UTIME                   = 30\n\tSYS_STTY                    = 31\n\tSYS_GTTY                    = 32\n\tSYS_ACCESS                  = 33\n\tSYS_NICE                    = 34\n\tSYS_FTIME                   = 35\n\tSYS_SYNC                    = 36\n\tSYS_KILL                    = 37\n\tSYS_RENAME                  = 38\n\tSYS_MKDIR                   = 39\n\tSYS_RMDIR                   = 40\n\tSYS_DUP                     = 41\n\tSYS_PIPE                    = 42\n\tSYS_TIMES                   = 43\n\tSYS_PROF                    = 44\n\tSYS_BRK                     = 45\n\tSYS_SETGID                  = 46\n\tSYS_GETGID                  = 47\n\tSYS_SIGNAL                  = 48\n\tSYS_GETEUID                 = 49\n\tSYS_GETEGID                 = 50\n\tSYS_ACCT                    = 51\n\tSYS_UMOUNT2                 = 52\n\tSYS_LOCK                    = 53\n\tSYS_IOCTL                   = 54\n\tSYS_FCNTL                   = 55\n\tSYS_MPX                     = 56\n\tSYS_SETPGID                 = 57\n\tSYS_ULIMIT                  = 58\n\tSYS_OLDOLDUNAME             = 59\n\tSYS_UMASK                   = 60\n\tSYS_CHROOT                  = 61\n\tSYS_USTAT                   = 62\n\tSYS_DUP2                    = 63\n\tSYS_GETPPID                 = 64\n\tSYS_GETPGRP                 = 65\n\tSYS_SETSID                  = 66\n\tSYS_SIGACTION               = 67\n\tSYS_SGETMASK                = 68\n\tSYS_SSETMASK                = 69\n\tSYS_SETREUID                = 70\n\tSYS_SETREGID                = 71\n\tSYS_SIGSUSPEND              = 72\n\tSYS_SIGPENDING              = 73\n\tSYS_SETHOSTNAME             = 74\n\tSYS_SETRLIMIT               = 75\n\tSYS_GETRLIMIT               = 76\n\tSYS_GETRUSAGE               = 77\n\tSYS_GETTIMEOFDAY            = 78\n\tSYS_SETTIMEOFDAY            = 79\n\tSYS_GETGROUPS               = 80\n\tSYS_SETGROUPS               = 81\n\tSYS_SELECT                  = 82\n\tSYS_SYMLINK                 = 83\n\tSYS_OLDLSTAT                = 84\n\tSYS_READLINK                = 85\n\tSYS_USELIB                  = 86\n\tSYS_SWAPON                  = 87\n\tSYS_REBOOT                  = 88\n\tSYS_READDIR                 = 89\n\tSYS_MMAP                    = 90\n\tSYS_MUNMAP                  = 91\n\tSYS_TRUNCATE                = 92\n\tSYS_FTRUNCATE               = 93\n\tSYS_FCHMOD                  = 94\n\tSYS_FCHOWN                  = 95\n\tSYS_GETPRIORITY             = 96\n\tSYS_SETPRIORITY             = 97\n\tSYS_PROFIL                  = 98\n\tSYS_STATFS                  = 99\n\tSYS_FSTATFS                 = 100\n\tSYS_IOPERM                  = 101\n\tSYS_SOCKETCALL              = 102\n\tSYS_SYSLOG                  = 103\n\tSYS_SETITIMER               = 104\n\tSYS_GETITIMER               = 105\n\tSYS_STAT                    = 106\n\tSYS_LSTAT                   = 107\n\tSYS_FSTAT                   = 108\n\tSYS_OLDUNAME                = 109\n\tSYS_IOPL                    = 110\n\tSYS_VHANGUP                 = 111\n\tSYS_IDLE                    = 112\n\tSYS_VM86                    = 113\n\tSYS_WAIT4                   = 114\n\tSYS_SWAPOFF                 = 115\n\tSYS_SYSINFO                 = 116\n\tSYS_IPC                     = 117\n\tSYS_FSYNC                   = 118\n\tSYS_SIGRETURN               = 119\n\tSYS_CLONE                   = 120\n\tSYS_SETDOMAINNAME           = 121\n\tSYS_UNAME                   = 122\n\tSYS_MODIFY_LDT              = 123\n\tSYS_ADJTIMEX                = 124\n\tSYS_MPROTECT                = 125\n\tSYS_SIGPROCMASK             = 126\n\tSYS_CREATE_MODULE           = 127\n\tSYS_INIT_MODULE             = 128\n\tSYS_DELETE_MODULE           = 129\n\tSYS_GET_KERNEL_SYMS         = 130\n\tSYS_QUOTACTL                = 131\n\tSYS_GETPGID                 = 132\n\tSYS_FCHDIR                  = 133\n\tSYS_BDFLUSH                 = 134\n\tSYS_SYSFS                   = 135\n\tSYS_PERSONALITY             = 136\n\tSYS_AFS_SYSCALL             = 137\n\tSYS_SETFSUID                = 138\n\tSYS_SETFSGID                = 139\n\tSYS__LLSEEK                 = 140\n\tSYS_GETDENTS                = 141\n\tSYS__NEWSELECT              = 142\n\tSYS_FLOCK                   = 143\n\tSYS_MSYNC                   = 144\n\tSYS_READV                   = 145\n\tSYS_WRITEV                  = 146\n\tSYS_GETSID                  = 147\n\tSYS_FDATASYNC               = 148\n\tSYS__SYSCTL                 = 149\n\tSYS_MLOCK                   = 150\n\tSYS_MUNLOCK                 = 151\n\tSYS_MLOCKALL                = 152\n\tSYS_MUNLOCKALL              = 153\n\tSYS_SCHED_SETPARAM          = 154\n\tSYS_SCHED_GETPARAM          = 155\n\tSYS_SCHED_SETSCHEDULER      = 156\n\tSYS_SCHED_GETSCHEDULER      = 157\n\tSYS_SCHED_YIELD             = 158\n\tSYS_SCHED_GET_PRIORITY_MAX  = 159\n\tSYS_SCHED_GET_PRIORITY_MIN  = 160\n\tSYS_SCHED_RR_GET_INTERVAL   = 161\n\tSYS_NANOSLEEP               = 162\n\tSYS_MREMAP                  = 163\n\tSYS_SETRESUID               = 164\n\tSYS_GETRESUID               = 165\n\tSYS_QUERY_MODULE            = 166\n\tSYS_POLL                    = 167\n\tSYS_NFSSERVCTL              = 168\n\tSYS_SETRESGID               = 169\n\tSYS_GETRESGID               = 170\n\tSYS_PRCTL                   = 171\n\tSYS_RT_SIGRETURN            = 172\n\tSYS_RT_SIGACTION            = 173\n\tSYS_RT_SIGPROCMASK          = 174\n\tSYS_RT_SIGPENDING           = 175\n\tSYS_RT_SIGTIMEDWAIT         = 176\n\tSYS_RT_SIGQUEUEINFO         = 177\n\tSYS_RT_SIGSUSPEND           = 178\n\tSYS_PREAD64                 = 179\n\tSYS_PWRITE64                = 180\n\tSYS_CHOWN                   = 181\n\tSYS_GETCWD                  = 182\n\tSYS_CAPGET                  = 183\n\tSYS_CAPSET                  = 184\n\tSYS_SIGALTSTACK             = 185\n\tSYS_SENDFILE                = 186\n\tSYS_GETPMSG                 = 187\n\tSYS_PUTPMSG                 = 188\n\tSYS_VFORK                   = 189\n\tSYS_UGETRLIMIT              = 190\n\tSYS_READAHEAD               = 191\n\tSYS_PCICONFIG_READ          = 198\n\tSYS_PCICONFIG_WRITE         = 199\n\tSYS_PCICONFIG_IOBASE        = 200\n\tSYS_MULTIPLEXER             = 201\n\tSYS_GETDENTS64              = 202\n\tSYS_PIVOT_ROOT              = 203\n\tSYS_MADVISE                 = 205\n\tSYS_MINCORE                 = 206\n\tSYS_GETTID                  = 207\n\tSYS_TKILL                   = 208\n\tSYS_SETXATTR                = 209\n\tSYS_LSETXATTR               = 210\n\tSYS_FSETXATTR               = 211\n\tSYS_GETXATTR                = 212\n\tSYS_LGETXATTR               = 213\n\tSYS_FGETXATTR               = 214\n\tSYS_LISTXATTR               = 215\n\tSYS_LLISTXATTR              = 216\n\tSYS_FLISTXATTR              = 217\n\tSYS_REMOVEXATTR             = 218\n\tSYS_LREMOVEXATTR            = 219\n\tSYS_FREMOVEXATTR            = 220\n\tSYS_FUTEX                   = 221\n\tSYS_SCHED_SETAFFINITY       = 222\n\tSYS_SCHED_GETAFFINITY       = 223\n\tSYS_TUXCALL                 = 225\n\tSYS_IO_SETUP                = 227\n\tSYS_IO_DESTROY              = 228\n\tSYS_IO_GETEVENTS            = 229\n\tSYS_IO_SUBMIT               = 230\n\tSYS_IO_CANCEL               = 231\n\tSYS_SET_TID_ADDRESS         = 232\n\tSYS_FADVISE64               = 233\n\tSYS_EXIT_GROUP              = 234\n\tSYS_LOOKUP_DCOOKIE          = 235\n\tSYS_EPOLL_CREATE            = 236\n\tSYS_EPOLL_CTL               = 237\n\tSYS_EPOLL_WAIT              = 238\n\tSYS_REMAP_FILE_PAGES        = 239\n\tSYS_TIMER_CREATE            = 240\n\tSYS_TIMER_SETTIME           = 241\n\tSYS_TIMER_GETTIME           = 242\n\tSYS_TIMER_GETOVERRUN        = 243\n\tSYS_TIMER_DELETE            = 244\n\tSYS_CLOCK_SETTIME           = 245\n\tSYS_CLOCK_GETTIME           = 246\n\tSYS_CLOCK_GETRES            = 247\n\tSYS_CLOCK_NANOSLEEP         = 248\n\tSYS_SWAPCONTEXT             = 249\n\tSYS_TGKILL                  = 250\n\tSYS_UTIMES                  = 251\n\tSYS_STATFS64                = 252\n\tSYS_FSTATFS64               = 253\n\tSYS_RTAS                    = 255\n\tSYS_SYS_DEBUG_SETCONTEXT    = 256\n\tSYS_MIGRATE_PAGES           = 258\n\tSYS_MBIND                   = 259\n\tSYS_GET_MEMPOLICY           = 260\n\tSYS_SET_MEMPOLICY           = 261\n\tSYS_MQ_OPEN                 = 262\n\tSYS_MQ_UNLINK               = 263\n\tSYS_MQ_TIMEDSEND            = 264\n\tSYS_MQ_TIMEDRECEIVE         = 265\n\tSYS_MQ_NOTIFY               = 266\n\tSYS_MQ_GETSETATTR           = 267\n\tSYS_KEXEC_LOAD              = 268\n\tSYS_ADD_KEY                 = 269\n\tSYS_REQUEST_KEY             = 270\n\tSYS_KEYCTL                  = 271\n\tSYS_WAITID                  = 272\n\tSYS_IOPRIO_SET              = 273\n\tSYS_IOPRIO_GET              = 274\n\tSYS_INOTIFY_INIT            = 275\n\tSYS_INOTIFY_ADD_WATCH       = 276\n\tSYS_INOTIFY_RM_WATCH        = 277\n\tSYS_SPU_RUN                 = 278\n\tSYS_SPU_CREATE              = 279\n\tSYS_PSELECT6                = 280\n\tSYS_PPOLL                   = 281\n\tSYS_UNSHARE                 = 282\n\tSYS_SPLICE                  = 283\n\tSYS_TEE                     = 284\n\tSYS_VMSPLICE                = 285\n\tSYS_OPENAT                  = 286\n\tSYS_MKDIRAT                 = 287\n\tSYS_MKNODAT                 = 288\n\tSYS_FCHOWNAT                = 289\n\tSYS_FUTIMESAT               = 290\n\tSYS_NEWFSTATAT              = 291\n\tSYS_UNLINKAT                = 292\n\tSYS_RENAMEAT                = 293\n\tSYS_LINKAT                  = 294\n\tSYS_SYMLINKAT               = 295\n\tSYS_READLINKAT              = 296\n\tSYS_FCHMODAT                = 297\n\tSYS_FACCESSAT               = 298\n\tSYS_GET_ROBUST_LIST         = 299\n\tSYS_SET_ROBUST_LIST         = 300\n\tSYS_MOVE_PAGES              = 301\n\tSYS_GETCPU                  = 302\n\tSYS_EPOLL_PWAIT             = 303\n\tSYS_UTIMENSAT               = 304\n\tSYS_SIGNALFD                = 305\n\tSYS_TIMERFD_CREATE          = 306\n\tSYS_EVENTFD                 = 307\n\tSYS_SYNC_FILE_RANGE2        = 308\n\tSYS_FALLOCATE               = 309\n\tSYS_SUBPAGE_PROT            = 310\n\tSYS_TIMERFD_SETTIME         = 311\n\tSYS_TIMERFD_GETTIME         = 312\n\tSYS_SIGNALFD4               = 313\n\tSYS_EVENTFD2                = 314\n\tSYS_EPOLL_CREATE1           = 315\n\tSYS_DUP3                    = 316\n\tSYS_PIPE2                   = 317\n\tSYS_INOTIFY_INIT1           = 318\n\tSYS_PERF_EVENT_OPEN         = 319\n\tSYS_PREADV                  = 320\n\tSYS_PWRITEV                 = 321\n\tSYS_RT_TGSIGQUEUEINFO       = 322\n\tSYS_FANOTIFY_INIT           = 323\n\tSYS_FANOTIFY_MARK           = 324\n\tSYS_PRLIMIT64               = 325\n\tSYS_SOCKET                  = 326\n\tSYS_BIND                    = 327\n\tSYS_CONNECT                 = 328\n\tSYS_LISTEN                  = 329\n\tSYS_ACCEPT                  = 330\n\tSYS_GETSOCKNAME             = 331\n\tSYS_GETPEERNAME             = 332\n\tSYS_SOCKETPAIR              = 333\n\tSYS_SEND                    = 334\n\tSYS_SENDTO                  = 335\n\tSYS_RECV                    = 336\n\tSYS_RECVFROM                = 337\n\tSYS_SHUTDOWN                = 338\n\tSYS_SETSOCKOPT              = 339\n\tSYS_GETSOCKOPT              = 340\n\tSYS_SENDMSG                 = 341\n\tSYS_RECVMSG                 = 342\n\tSYS_RECVMMSG                = 343\n\tSYS_ACCEPT4                 = 344\n\tSYS_NAME_TO_HANDLE_AT       = 345\n\tSYS_OPEN_BY_HANDLE_AT       = 346\n\tSYS_CLOCK_ADJTIME           = 347\n\tSYS_SYNCFS                  = 348\n\tSYS_SENDMMSG                = 349\n\tSYS_SETNS                   = 350\n\tSYS_PROCESS_VM_READV        = 351\n\tSYS_PROCESS_VM_WRITEV       = 352\n\tSYS_FINIT_MODULE            = 353\n\tSYS_KCMP                    = 354\n\tSYS_SCHED_SETATTR           = 355\n\tSYS_SCHED_GETATTR           = 356\n\tSYS_RENAMEAT2               = 357\n\tSYS_SECCOMP                 = 358\n\tSYS_GETRANDOM               = 359\n\tSYS_MEMFD_CREATE            = 360\n\tSYS_BPF                     = 361\n\tSYS_EXECVEAT                = 362\n\tSYS_SWITCH_ENDIAN           = 363\n\tSYS_USERFAULTFD             = 364\n\tSYS_MEMBARRIER              = 365\n\tSYS_MLOCK2                  = 378\n\tSYS_COPY_FILE_RANGE         = 379\n\tSYS_PREADV2                 = 380\n\tSYS_PWRITEV2                = 381\n\tSYS_KEXEC_FILE_LOAD         = 382\n\tSYS_STATX                   = 383\n\tSYS_PKEY_ALLOC              = 384\n\tSYS_PKEY_FREE               = 385\n\tSYS_PKEY_MPROTECT           = 386\n\tSYS_RSEQ                    = 387\n\tSYS_IO_PGETEVENTS           = 388\n\tSYS_SEMTIMEDOP              = 392\n\tSYS_SEMGET                  = 393\n\tSYS_SEMCTL                  = 394\n\tSYS_SHMGET                  = 395\n\tSYS_SHMCTL                  = 396\n\tSYS_SHMAT                   = 397\n\tSYS_SHMDT                   = 398\n\tSYS_MSGGET                  = 399\n\tSYS_MSGSND                  = 400\n\tSYS_MSGRCV                  = 401\n\tSYS_MSGCTL                  = 402\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64le/include /tmp/ppc64le/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64le && linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL         = 0\n\tSYS_EXIT                    = 1\n\tSYS_FORK                    = 2\n\tSYS_READ                    = 3\n\tSYS_WRITE                   = 4\n\tSYS_OPEN                    = 5\n\tSYS_CLOSE                   = 6\n\tSYS_WAITPID                 = 7\n\tSYS_CREAT                   = 8\n\tSYS_LINK                    = 9\n\tSYS_UNLINK                  = 10\n\tSYS_EXECVE                  = 11\n\tSYS_CHDIR                   = 12\n\tSYS_TIME                    = 13\n\tSYS_MKNOD                   = 14\n\tSYS_CHMOD                   = 15\n\tSYS_LCHOWN                  = 16\n\tSYS_BREAK                   = 17\n\tSYS_OLDSTAT                 = 18\n\tSYS_LSEEK                   = 19\n\tSYS_GETPID                  = 20\n\tSYS_MOUNT                   = 21\n\tSYS_UMOUNT                  = 22\n\tSYS_SETUID                  = 23\n\tSYS_GETUID                  = 24\n\tSYS_STIME                   = 25\n\tSYS_PTRACE                  = 26\n\tSYS_ALARM                   = 27\n\tSYS_OLDFSTAT                = 28\n\tSYS_PAUSE                   = 29\n\tSYS_UTIME                   = 30\n\tSYS_STTY                    = 31\n\tSYS_GTTY                    = 32\n\tSYS_ACCESS                  = 33\n\tSYS_NICE                    = 34\n\tSYS_FTIME                   = 35\n\tSYS_SYNC                    = 36\n\tSYS_KILL                    = 37\n\tSYS_RENAME                  = 38\n\tSYS_MKDIR                   = 39\n\tSYS_RMDIR                   = 40\n\tSYS_DUP                     = 41\n\tSYS_PIPE                    = 42\n\tSYS_TIMES                   = 43\n\tSYS_PROF                    = 44\n\tSYS_BRK                     = 45\n\tSYS_SETGID                  = 46\n\tSYS_GETGID                  = 47\n\tSYS_SIGNAL                  = 48\n\tSYS_GETEUID                 = 49\n\tSYS_GETEGID                 = 50\n\tSYS_ACCT                    = 51\n\tSYS_UMOUNT2                 = 52\n\tSYS_LOCK                    = 53\n\tSYS_IOCTL                   = 54\n\tSYS_FCNTL                   = 55\n\tSYS_MPX                     = 56\n\tSYS_SETPGID                 = 57\n\tSYS_ULIMIT                  = 58\n\tSYS_OLDOLDUNAME             = 59\n\tSYS_UMASK                   = 60\n\tSYS_CHROOT                  = 61\n\tSYS_USTAT                   = 62\n\tSYS_DUP2                    = 63\n\tSYS_GETPPID                 = 64\n\tSYS_GETPGRP                 = 65\n\tSYS_SETSID                  = 66\n\tSYS_SIGACTION               = 67\n\tSYS_SGETMASK                = 68\n\tSYS_SSETMASK                = 69\n\tSYS_SETREUID                = 70\n\tSYS_SETREGID                = 71\n\tSYS_SIGSUSPEND              = 72\n\tSYS_SIGPENDING              = 73\n\tSYS_SETHOSTNAME             = 74\n\tSYS_SETRLIMIT               = 75\n\tSYS_GETRLIMIT               = 76\n\tSYS_GETRUSAGE               = 77\n\tSYS_GETTIMEOFDAY            = 78\n\tSYS_SETTIMEOFDAY            = 79\n\tSYS_GETGROUPS               = 80\n\tSYS_SETGROUPS               = 81\n\tSYS_SELECT                  = 82\n\tSYS_SYMLINK                 = 83\n\tSYS_OLDLSTAT                = 84\n\tSYS_READLINK                = 85\n\tSYS_USELIB                  = 86\n\tSYS_SWAPON                  = 87\n\tSYS_REBOOT                  = 88\n\tSYS_READDIR                 = 89\n\tSYS_MMAP                    = 90\n\tSYS_MUNMAP                  = 91\n\tSYS_TRUNCATE                = 92\n\tSYS_FTRUNCATE               = 93\n\tSYS_FCHMOD                  = 94\n\tSYS_FCHOWN                  = 95\n\tSYS_GETPRIORITY             = 96\n\tSYS_SETPRIORITY             = 97\n\tSYS_PROFIL                  = 98\n\tSYS_STATFS                  = 99\n\tSYS_FSTATFS                 = 100\n\tSYS_IOPERM                  = 101\n\tSYS_SOCKETCALL              = 102\n\tSYS_SYSLOG                  = 103\n\tSYS_SETITIMER               = 104\n\tSYS_GETITIMER               = 105\n\tSYS_STAT                    = 106\n\tSYS_LSTAT                   = 107\n\tSYS_FSTAT                   = 108\n\tSYS_OLDUNAME                = 109\n\tSYS_IOPL                    = 110\n\tSYS_VHANGUP                 = 111\n\tSYS_IDLE                    = 112\n\tSYS_VM86                    = 113\n\tSYS_WAIT4                   = 114\n\tSYS_SWAPOFF                 = 115\n\tSYS_SYSINFO                 = 116\n\tSYS_IPC                     = 117\n\tSYS_FSYNC                   = 118\n\tSYS_SIGRETURN               = 119\n\tSYS_CLONE                   = 120\n\tSYS_SETDOMAINNAME           = 121\n\tSYS_UNAME                   = 122\n\tSYS_MODIFY_LDT              = 123\n\tSYS_ADJTIMEX                = 124\n\tSYS_MPROTECT                = 125\n\tSYS_SIGPROCMASK             = 126\n\tSYS_CREATE_MODULE           = 127\n\tSYS_INIT_MODULE             = 128\n\tSYS_DELETE_MODULE           = 129\n\tSYS_GET_KERNEL_SYMS         = 130\n\tSYS_QUOTACTL                = 131\n\tSYS_GETPGID                 = 132\n\tSYS_FCHDIR                  = 133\n\tSYS_BDFLUSH                 = 134\n\tSYS_SYSFS                   = 135\n\tSYS_PERSONALITY             = 136\n\tSYS_AFS_SYSCALL             = 137\n\tSYS_SETFSUID                = 138\n\tSYS_SETFSGID                = 139\n\tSYS__LLSEEK                 = 140\n\tSYS_GETDENTS                = 141\n\tSYS__NEWSELECT              = 142\n\tSYS_FLOCK                   = 143\n\tSYS_MSYNC                   = 144\n\tSYS_READV                   = 145\n\tSYS_WRITEV                  = 146\n\tSYS_GETSID                  = 147\n\tSYS_FDATASYNC               = 148\n\tSYS__SYSCTL                 = 149\n\tSYS_MLOCK                   = 150\n\tSYS_MUNLOCK                 = 151\n\tSYS_MLOCKALL                = 152\n\tSYS_MUNLOCKALL              = 153\n\tSYS_SCHED_SETPARAM          = 154\n\tSYS_SCHED_GETPARAM          = 155\n\tSYS_SCHED_SETSCHEDULER      = 156\n\tSYS_SCHED_GETSCHEDULER      = 157\n\tSYS_SCHED_YIELD             = 158\n\tSYS_SCHED_GET_PRIORITY_MAX  = 159\n\tSYS_SCHED_GET_PRIORITY_MIN  = 160\n\tSYS_SCHED_RR_GET_INTERVAL   = 161\n\tSYS_NANOSLEEP               = 162\n\tSYS_MREMAP                  = 163\n\tSYS_SETRESUID               = 164\n\tSYS_GETRESUID               = 165\n\tSYS_QUERY_MODULE            = 166\n\tSYS_POLL                    = 167\n\tSYS_NFSSERVCTL              = 168\n\tSYS_SETRESGID               = 169\n\tSYS_GETRESGID               = 170\n\tSYS_PRCTL                   = 171\n\tSYS_RT_SIGRETURN            = 172\n\tSYS_RT_SIGACTION            = 173\n\tSYS_RT_SIGPROCMASK          = 174\n\tSYS_RT_SIGPENDING           = 175\n\tSYS_RT_SIGTIMEDWAIT         = 176\n\tSYS_RT_SIGQUEUEINFO         = 177\n\tSYS_RT_SIGSUSPEND           = 178\n\tSYS_PREAD64                 = 179\n\tSYS_PWRITE64                = 180\n\tSYS_CHOWN                   = 181\n\tSYS_GETCWD                  = 182\n\tSYS_CAPGET                  = 183\n\tSYS_CAPSET                  = 184\n\tSYS_SIGALTSTACK             = 185\n\tSYS_SENDFILE                = 186\n\tSYS_GETPMSG                 = 187\n\tSYS_PUTPMSG                 = 188\n\tSYS_VFORK                   = 189\n\tSYS_UGETRLIMIT              = 190\n\tSYS_READAHEAD               = 191\n\tSYS_PCICONFIG_READ          = 198\n\tSYS_PCICONFIG_WRITE         = 199\n\tSYS_PCICONFIG_IOBASE        = 200\n\tSYS_MULTIPLEXER             = 201\n\tSYS_GETDENTS64              = 202\n\tSYS_PIVOT_ROOT              = 203\n\tSYS_MADVISE                 = 205\n\tSYS_MINCORE                 = 206\n\tSYS_GETTID                  = 207\n\tSYS_TKILL                   = 208\n\tSYS_SETXATTR                = 209\n\tSYS_LSETXATTR               = 210\n\tSYS_FSETXATTR               = 211\n\tSYS_GETXATTR                = 212\n\tSYS_LGETXATTR               = 213\n\tSYS_FGETXATTR               = 214\n\tSYS_LISTXATTR               = 215\n\tSYS_LLISTXATTR              = 216\n\tSYS_FLISTXATTR              = 217\n\tSYS_REMOVEXATTR             = 218\n\tSYS_LREMOVEXATTR            = 219\n\tSYS_FREMOVEXATTR            = 220\n\tSYS_FUTEX                   = 221\n\tSYS_SCHED_SETAFFINITY       = 222\n\tSYS_SCHED_GETAFFINITY       = 223\n\tSYS_TUXCALL                 = 225\n\tSYS_IO_SETUP                = 227\n\tSYS_IO_DESTROY              = 228\n\tSYS_IO_GETEVENTS            = 229\n\tSYS_IO_SUBMIT               = 230\n\tSYS_IO_CANCEL               = 231\n\tSYS_SET_TID_ADDRESS         = 232\n\tSYS_FADVISE64               = 233\n\tSYS_EXIT_GROUP              = 234\n\tSYS_LOOKUP_DCOOKIE          = 235\n\tSYS_EPOLL_CREATE            = 236\n\tSYS_EPOLL_CTL               = 237\n\tSYS_EPOLL_WAIT              = 238\n\tSYS_REMAP_FILE_PAGES        = 239\n\tSYS_TIMER_CREATE            = 240\n\tSYS_TIMER_SETTIME           = 241\n\tSYS_TIMER_GETTIME           = 242\n\tSYS_TIMER_GETOVERRUN        = 243\n\tSYS_TIMER_DELETE            = 244\n\tSYS_CLOCK_SETTIME           = 245\n\tSYS_CLOCK_GETTIME           = 246\n\tSYS_CLOCK_GETRES            = 247\n\tSYS_CLOCK_NANOSLEEP         = 248\n\tSYS_SWAPCONTEXT             = 249\n\tSYS_TGKILL                  = 250\n\tSYS_UTIMES                  = 251\n\tSYS_STATFS64                = 252\n\tSYS_FSTATFS64               = 253\n\tSYS_RTAS                    = 255\n\tSYS_SYS_DEBUG_SETCONTEXT    = 256\n\tSYS_MIGRATE_PAGES           = 258\n\tSYS_MBIND                   = 259\n\tSYS_GET_MEMPOLICY           = 260\n\tSYS_SET_MEMPOLICY           = 261\n\tSYS_MQ_OPEN                 = 262\n\tSYS_MQ_UNLINK               = 263\n\tSYS_MQ_TIMEDSEND            = 264\n\tSYS_MQ_TIMEDRECEIVE         = 265\n\tSYS_MQ_NOTIFY               = 266\n\tSYS_MQ_GETSETATTR           = 267\n\tSYS_KEXEC_LOAD              = 268\n\tSYS_ADD_KEY                 = 269\n\tSYS_REQUEST_KEY             = 270\n\tSYS_KEYCTL                  = 271\n\tSYS_WAITID                  = 272\n\tSYS_IOPRIO_SET              = 273\n\tSYS_IOPRIO_GET              = 274\n\tSYS_INOTIFY_INIT            = 275\n\tSYS_INOTIFY_ADD_WATCH       = 276\n\tSYS_INOTIFY_RM_WATCH        = 277\n\tSYS_SPU_RUN                 = 278\n\tSYS_SPU_CREATE              = 279\n\tSYS_PSELECT6                = 280\n\tSYS_PPOLL                   = 281\n\tSYS_UNSHARE                 = 282\n\tSYS_SPLICE                  = 283\n\tSYS_TEE                     = 284\n\tSYS_VMSPLICE                = 285\n\tSYS_OPENAT                  = 286\n\tSYS_MKDIRAT                 = 287\n\tSYS_MKNODAT                 = 288\n\tSYS_FCHOWNAT                = 289\n\tSYS_FUTIMESAT               = 290\n\tSYS_NEWFSTATAT              = 291\n\tSYS_UNLINKAT                = 292\n\tSYS_RENAMEAT                = 293\n\tSYS_LINKAT                  = 294\n\tSYS_SYMLINKAT               = 295\n\tSYS_READLINKAT              = 296\n\tSYS_FCHMODAT                = 297\n\tSYS_FACCESSAT               = 298\n\tSYS_GET_ROBUST_LIST         = 299\n\tSYS_SET_ROBUST_LIST         = 300\n\tSYS_MOVE_PAGES              = 301\n\tSYS_GETCPU                  = 302\n\tSYS_EPOLL_PWAIT             = 303\n\tSYS_UTIMENSAT               = 304\n\tSYS_SIGNALFD                = 305\n\tSYS_TIMERFD_CREATE          = 306\n\tSYS_EVENTFD                 = 307\n\tSYS_SYNC_FILE_RANGE2        = 308\n\tSYS_FALLOCATE               = 309\n\tSYS_SUBPAGE_PROT            = 310\n\tSYS_TIMERFD_SETTIME         = 311\n\tSYS_TIMERFD_GETTIME         = 312\n\tSYS_SIGNALFD4               = 313\n\tSYS_EVENTFD2                = 314\n\tSYS_EPOLL_CREATE1           = 315\n\tSYS_DUP3                    = 316\n\tSYS_PIPE2                   = 317\n\tSYS_INOTIFY_INIT1           = 318\n\tSYS_PERF_EVENT_OPEN         = 319\n\tSYS_PREADV                  = 320\n\tSYS_PWRITEV                 = 321\n\tSYS_RT_TGSIGQUEUEINFO       = 322\n\tSYS_FANOTIFY_INIT           = 323\n\tSYS_FANOTIFY_MARK           = 324\n\tSYS_PRLIMIT64               = 325\n\tSYS_SOCKET                  = 326\n\tSYS_BIND                    = 327\n\tSYS_CONNECT                 = 328\n\tSYS_LISTEN                  = 329\n\tSYS_ACCEPT                  = 330\n\tSYS_GETSOCKNAME             = 331\n\tSYS_GETPEERNAME             = 332\n\tSYS_SOCKETPAIR              = 333\n\tSYS_SEND                    = 334\n\tSYS_SENDTO                  = 335\n\tSYS_RECV                    = 336\n\tSYS_RECVFROM                = 337\n\tSYS_SHUTDOWN                = 338\n\tSYS_SETSOCKOPT              = 339\n\tSYS_GETSOCKOPT              = 340\n\tSYS_SENDMSG                 = 341\n\tSYS_RECVMSG                 = 342\n\tSYS_RECVMMSG                = 343\n\tSYS_ACCEPT4                 = 344\n\tSYS_NAME_TO_HANDLE_AT       = 345\n\tSYS_OPEN_BY_HANDLE_AT       = 346\n\tSYS_CLOCK_ADJTIME           = 347\n\tSYS_SYNCFS                  = 348\n\tSYS_SENDMMSG                = 349\n\tSYS_SETNS                   = 350\n\tSYS_PROCESS_VM_READV        = 351\n\tSYS_PROCESS_VM_WRITEV       = 352\n\tSYS_FINIT_MODULE            = 353\n\tSYS_KCMP                    = 354\n\tSYS_SCHED_SETATTR           = 355\n\tSYS_SCHED_GETATTR           = 356\n\tSYS_RENAMEAT2               = 357\n\tSYS_SECCOMP                 = 358\n\tSYS_GETRANDOM               = 359\n\tSYS_MEMFD_CREATE            = 360\n\tSYS_BPF                     = 361\n\tSYS_EXECVEAT                = 362\n\tSYS_SWITCH_ENDIAN           = 363\n\tSYS_USERFAULTFD             = 364\n\tSYS_MEMBARRIER              = 365\n\tSYS_MLOCK2                  = 378\n\tSYS_COPY_FILE_RANGE         = 379\n\tSYS_PREADV2                 = 380\n\tSYS_PWRITEV2                = 381\n\tSYS_KEXEC_FILE_LOAD         = 382\n\tSYS_STATX                   = 383\n\tSYS_PKEY_ALLOC              = 384\n\tSYS_PKEY_FREE               = 385\n\tSYS_PKEY_MPROTECT           = 386\n\tSYS_RSEQ                    = 387\n\tSYS_IO_PGETEVENTS           = 388\n\tSYS_SEMTIMEDOP              = 392\n\tSYS_SEMGET                  = 393\n\tSYS_SEMCTL                  = 394\n\tSYS_SHMGET                  = 395\n\tSYS_SHMCTL                  = 396\n\tSYS_SHMAT                   = 397\n\tSYS_SHMDT                   = 398\n\tSYS_MSGGET                  = 399\n\tSYS_MSGSND                  = 400\n\tSYS_MSGRCV                  = 401\n\tSYS_MSGCTL                  = 402\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/riscv64/include /tmp/riscv64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && linux\n\npackage unix\n\nconst (\n\tSYS_IO_SETUP                = 0\n\tSYS_IO_DESTROY              = 1\n\tSYS_IO_SUBMIT               = 2\n\tSYS_IO_CANCEL               = 3\n\tSYS_IO_GETEVENTS            = 4\n\tSYS_SETXATTR                = 5\n\tSYS_LSETXATTR               = 6\n\tSYS_FSETXATTR               = 7\n\tSYS_GETXATTR                = 8\n\tSYS_LGETXATTR               = 9\n\tSYS_FGETXATTR               = 10\n\tSYS_LISTXATTR               = 11\n\tSYS_LLISTXATTR              = 12\n\tSYS_FLISTXATTR              = 13\n\tSYS_REMOVEXATTR             = 14\n\tSYS_LREMOVEXATTR            = 15\n\tSYS_FREMOVEXATTR            = 16\n\tSYS_GETCWD                  = 17\n\tSYS_LOOKUP_DCOOKIE          = 18\n\tSYS_EVENTFD2                = 19\n\tSYS_EPOLL_CREATE1           = 20\n\tSYS_EPOLL_CTL               = 21\n\tSYS_EPOLL_PWAIT             = 22\n\tSYS_DUP                     = 23\n\tSYS_DUP3                    = 24\n\tSYS_FCNTL                   = 25\n\tSYS_INOTIFY_INIT1           = 26\n\tSYS_INOTIFY_ADD_WATCH       = 27\n\tSYS_INOTIFY_RM_WATCH        = 28\n\tSYS_IOCTL                   = 29\n\tSYS_IOPRIO_SET              = 30\n\tSYS_IOPRIO_GET              = 31\n\tSYS_FLOCK                   = 32\n\tSYS_MKNODAT                 = 33\n\tSYS_MKDIRAT                 = 34\n\tSYS_UNLINKAT                = 35\n\tSYS_SYMLINKAT               = 36\n\tSYS_LINKAT                  = 37\n\tSYS_UMOUNT2                 = 39\n\tSYS_MOUNT                   = 40\n\tSYS_PIVOT_ROOT              = 41\n\tSYS_NFSSERVCTL              = 42\n\tSYS_STATFS                  = 43\n\tSYS_FSTATFS                 = 44\n\tSYS_TRUNCATE                = 45\n\tSYS_FTRUNCATE               = 46\n\tSYS_FALLOCATE               = 47\n\tSYS_FACCESSAT               = 48\n\tSYS_CHDIR                   = 49\n\tSYS_FCHDIR                  = 50\n\tSYS_CHROOT                  = 51\n\tSYS_FCHMOD                  = 52\n\tSYS_FCHMODAT                = 53\n\tSYS_FCHOWNAT                = 54\n\tSYS_FCHOWN                  = 55\n\tSYS_OPENAT                  = 56\n\tSYS_CLOSE                   = 57\n\tSYS_VHANGUP                 = 58\n\tSYS_PIPE2                   = 59\n\tSYS_QUOTACTL                = 60\n\tSYS_GETDENTS64              = 61\n\tSYS_LSEEK                   = 62\n\tSYS_READ                    = 63\n\tSYS_WRITE                   = 64\n\tSYS_READV                   = 65\n\tSYS_WRITEV                  = 66\n\tSYS_PREAD64                 = 67\n\tSYS_PWRITE64                = 68\n\tSYS_PREADV                  = 69\n\tSYS_PWRITEV                 = 70\n\tSYS_SENDFILE                = 71\n\tSYS_PSELECT6                = 72\n\tSYS_PPOLL                   = 73\n\tSYS_SIGNALFD4               = 74\n\tSYS_VMSPLICE                = 75\n\tSYS_SPLICE                  = 76\n\tSYS_TEE                     = 77\n\tSYS_READLINKAT              = 78\n\tSYS_NEWFSTATAT              = 79\n\tSYS_FSTAT                   = 80\n\tSYS_SYNC                    = 81\n\tSYS_FSYNC                   = 82\n\tSYS_FDATASYNC               = 83\n\tSYS_SYNC_FILE_RANGE         = 84\n\tSYS_TIMERFD_CREATE          = 85\n\tSYS_TIMERFD_SETTIME         = 86\n\tSYS_TIMERFD_GETTIME         = 87\n\tSYS_UTIMENSAT               = 88\n\tSYS_ACCT                    = 89\n\tSYS_CAPGET                  = 90\n\tSYS_CAPSET                  = 91\n\tSYS_PERSONALITY             = 92\n\tSYS_EXIT                    = 93\n\tSYS_EXIT_GROUP              = 94\n\tSYS_WAITID                  = 95\n\tSYS_SET_TID_ADDRESS         = 96\n\tSYS_UNSHARE                 = 97\n\tSYS_FUTEX                   = 98\n\tSYS_SET_ROBUST_LIST         = 99\n\tSYS_GET_ROBUST_LIST         = 100\n\tSYS_NANOSLEEP               = 101\n\tSYS_GETITIMER               = 102\n\tSYS_SETITIMER               = 103\n\tSYS_KEXEC_LOAD              = 104\n\tSYS_INIT_MODULE             = 105\n\tSYS_DELETE_MODULE           = 106\n\tSYS_TIMER_CREATE            = 107\n\tSYS_TIMER_GETTIME           = 108\n\tSYS_TIMER_GETOVERRUN        = 109\n\tSYS_TIMER_SETTIME           = 110\n\tSYS_TIMER_DELETE            = 111\n\tSYS_CLOCK_SETTIME           = 112\n\tSYS_CLOCK_GETTIME           = 113\n\tSYS_CLOCK_GETRES            = 114\n\tSYS_CLOCK_NANOSLEEP         = 115\n\tSYS_SYSLOG                  = 116\n\tSYS_PTRACE                  = 117\n\tSYS_SCHED_SETPARAM          = 118\n\tSYS_SCHED_SETSCHEDULER      = 119\n\tSYS_SCHED_GETSCHEDULER      = 120\n\tSYS_SCHED_GETPARAM          = 121\n\tSYS_SCHED_SETAFFINITY       = 122\n\tSYS_SCHED_GETAFFINITY       = 123\n\tSYS_SCHED_YIELD             = 124\n\tSYS_SCHED_GET_PRIORITY_MAX  = 125\n\tSYS_SCHED_GET_PRIORITY_MIN  = 126\n\tSYS_SCHED_RR_GET_INTERVAL   = 127\n\tSYS_RESTART_SYSCALL         = 128\n\tSYS_KILL                    = 129\n\tSYS_TKILL                   = 130\n\tSYS_TGKILL                  = 131\n\tSYS_SIGALTSTACK             = 132\n\tSYS_RT_SIGSUSPEND           = 133\n\tSYS_RT_SIGACTION            = 134\n\tSYS_RT_SIGPROCMASK          = 135\n\tSYS_RT_SIGPENDING           = 136\n\tSYS_RT_SIGTIMEDWAIT         = 137\n\tSYS_RT_SIGQUEUEINFO         = 138\n\tSYS_RT_SIGRETURN            = 139\n\tSYS_SETPRIORITY             = 140\n\tSYS_GETPRIORITY             = 141\n\tSYS_REBOOT                  = 142\n\tSYS_SETREGID                = 143\n\tSYS_SETGID                  = 144\n\tSYS_SETREUID                = 145\n\tSYS_SETUID                  = 146\n\tSYS_SETRESUID               = 147\n\tSYS_GETRESUID               = 148\n\tSYS_SETRESGID               = 149\n\tSYS_GETRESGID               = 150\n\tSYS_SETFSUID                = 151\n\tSYS_SETFSGID                = 152\n\tSYS_TIMES                   = 153\n\tSYS_SETPGID                 = 154\n\tSYS_GETPGID                 = 155\n\tSYS_GETSID                  = 156\n\tSYS_SETSID                  = 157\n\tSYS_GETGROUPS               = 158\n\tSYS_SETGROUPS               = 159\n\tSYS_UNAME                   = 160\n\tSYS_SETHOSTNAME             = 161\n\tSYS_SETDOMAINNAME           = 162\n\tSYS_GETRLIMIT               = 163\n\tSYS_SETRLIMIT               = 164\n\tSYS_GETRUSAGE               = 165\n\tSYS_UMASK                   = 166\n\tSYS_PRCTL                   = 167\n\tSYS_GETCPU                  = 168\n\tSYS_GETTIMEOFDAY            = 169\n\tSYS_SETTIMEOFDAY            = 170\n\tSYS_ADJTIMEX                = 171\n\tSYS_GETPID                  = 172\n\tSYS_GETPPID                 = 173\n\tSYS_GETUID                  = 174\n\tSYS_GETEUID                 = 175\n\tSYS_GETGID                  = 176\n\tSYS_GETEGID                 = 177\n\tSYS_GETTID                  = 178\n\tSYS_SYSINFO                 = 179\n\tSYS_MQ_OPEN                 = 180\n\tSYS_MQ_UNLINK               = 181\n\tSYS_MQ_TIMEDSEND            = 182\n\tSYS_MQ_TIMEDRECEIVE         = 183\n\tSYS_MQ_NOTIFY               = 184\n\tSYS_MQ_GETSETATTR           = 185\n\tSYS_MSGGET                  = 186\n\tSYS_MSGCTL                  = 187\n\tSYS_MSGRCV                  = 188\n\tSYS_MSGSND                  = 189\n\tSYS_SEMGET                  = 190\n\tSYS_SEMCTL                  = 191\n\tSYS_SEMTIMEDOP              = 192\n\tSYS_SEMOP                   = 193\n\tSYS_SHMGET                  = 194\n\tSYS_SHMCTL                  = 195\n\tSYS_SHMAT                   = 196\n\tSYS_SHMDT                   = 197\n\tSYS_SOCKET                  = 198\n\tSYS_SOCKETPAIR              = 199\n\tSYS_BIND                    = 200\n\tSYS_LISTEN                  = 201\n\tSYS_ACCEPT                  = 202\n\tSYS_CONNECT                 = 203\n\tSYS_GETSOCKNAME             = 204\n\tSYS_GETPEERNAME             = 205\n\tSYS_SENDTO                  = 206\n\tSYS_RECVFROM                = 207\n\tSYS_SETSOCKOPT              = 208\n\tSYS_GETSOCKOPT              = 209\n\tSYS_SHUTDOWN                = 210\n\tSYS_SENDMSG                 = 211\n\tSYS_RECVMSG                 = 212\n\tSYS_READAHEAD               = 213\n\tSYS_BRK                     = 214\n\tSYS_MUNMAP                  = 215\n\tSYS_MREMAP                  = 216\n\tSYS_ADD_KEY                 = 217\n\tSYS_REQUEST_KEY             = 218\n\tSYS_KEYCTL                  = 219\n\tSYS_CLONE                   = 220\n\tSYS_EXECVE                  = 221\n\tSYS_MMAP                    = 222\n\tSYS_FADVISE64               = 223\n\tSYS_SWAPON                  = 224\n\tSYS_SWAPOFF                 = 225\n\tSYS_MPROTECT                = 226\n\tSYS_MSYNC                   = 227\n\tSYS_MLOCK                   = 228\n\tSYS_MUNLOCK                 = 229\n\tSYS_MLOCKALL                = 230\n\tSYS_MUNLOCKALL              = 231\n\tSYS_MINCORE                 = 232\n\tSYS_MADVISE                 = 233\n\tSYS_REMAP_FILE_PAGES        = 234\n\tSYS_MBIND                   = 235\n\tSYS_GET_MEMPOLICY           = 236\n\tSYS_SET_MEMPOLICY           = 237\n\tSYS_MIGRATE_PAGES           = 238\n\tSYS_MOVE_PAGES              = 239\n\tSYS_RT_TGSIGQUEUEINFO       = 240\n\tSYS_PERF_EVENT_OPEN         = 241\n\tSYS_ACCEPT4                 = 242\n\tSYS_RECVMMSG                = 243\n\tSYS_ARCH_SPECIFIC_SYSCALL   = 244\n\tSYS_RISCV_HWPROBE           = 258\n\tSYS_RISCV_FLUSH_ICACHE      = 259\n\tSYS_WAIT4                   = 260\n\tSYS_PRLIMIT64               = 261\n\tSYS_FANOTIFY_INIT           = 262\n\tSYS_FANOTIFY_MARK           = 263\n\tSYS_NAME_TO_HANDLE_AT       = 264\n\tSYS_OPEN_BY_HANDLE_AT       = 265\n\tSYS_CLOCK_ADJTIME           = 266\n\tSYS_SYNCFS                  = 267\n\tSYS_SETNS                   = 268\n\tSYS_SENDMMSG                = 269\n\tSYS_PROCESS_VM_READV        = 270\n\tSYS_PROCESS_VM_WRITEV       = 271\n\tSYS_KCMP                    = 272\n\tSYS_FINIT_MODULE            = 273\n\tSYS_SCHED_SETATTR           = 274\n\tSYS_SCHED_GETATTR           = 275\n\tSYS_RENAMEAT2               = 276\n\tSYS_SECCOMP                 = 277\n\tSYS_GETRANDOM               = 278\n\tSYS_MEMFD_CREATE            = 279\n\tSYS_BPF                     = 280\n\tSYS_EXECVEAT                = 281\n\tSYS_USERFAULTFD             = 282\n\tSYS_MEMBARRIER              = 283\n\tSYS_MLOCK2                  = 284\n\tSYS_COPY_FILE_RANGE         = 285\n\tSYS_PREADV2                 = 286\n\tSYS_PWRITEV2                = 287\n\tSYS_PKEY_MPROTECT           = 288\n\tSYS_PKEY_ALLOC              = 289\n\tSYS_PKEY_FREE               = 290\n\tSYS_STATX                   = 291\n\tSYS_IO_PGETEVENTS           = 292\n\tSYS_RSEQ                    = 293\n\tSYS_KEXEC_FILE_LOAD         = 294\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_MEMFD_SECRET            = 447\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/s390x/include -fsigned-char /tmp/s390x/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build s390x && linux\n\npackage unix\n\nconst (\n\tSYS_EXIT                    = 1\n\tSYS_FORK                    = 2\n\tSYS_READ                    = 3\n\tSYS_WRITE                   = 4\n\tSYS_OPEN                    = 5\n\tSYS_CLOSE                   = 6\n\tSYS_RESTART_SYSCALL         = 7\n\tSYS_CREAT                   = 8\n\tSYS_LINK                    = 9\n\tSYS_UNLINK                  = 10\n\tSYS_EXECVE                  = 11\n\tSYS_CHDIR                   = 12\n\tSYS_MKNOD                   = 14\n\tSYS_CHMOD                   = 15\n\tSYS_LSEEK                   = 19\n\tSYS_GETPID                  = 20\n\tSYS_MOUNT                   = 21\n\tSYS_UMOUNT                  = 22\n\tSYS_PTRACE                  = 26\n\tSYS_ALARM                   = 27\n\tSYS_PAUSE                   = 29\n\tSYS_UTIME                   = 30\n\tSYS_ACCESS                  = 33\n\tSYS_NICE                    = 34\n\tSYS_SYNC                    = 36\n\tSYS_KILL                    = 37\n\tSYS_RENAME                  = 38\n\tSYS_MKDIR                   = 39\n\tSYS_RMDIR                   = 40\n\tSYS_DUP                     = 41\n\tSYS_PIPE                    = 42\n\tSYS_TIMES                   = 43\n\tSYS_BRK                     = 45\n\tSYS_SIGNAL                  = 48\n\tSYS_ACCT                    = 51\n\tSYS_UMOUNT2                 = 52\n\tSYS_IOCTL                   = 54\n\tSYS_FCNTL                   = 55\n\tSYS_SETPGID                 = 57\n\tSYS_UMASK                   = 60\n\tSYS_CHROOT                  = 61\n\tSYS_USTAT                   = 62\n\tSYS_DUP2                    = 63\n\tSYS_GETPPID                 = 64\n\tSYS_GETPGRP                 = 65\n\tSYS_SETSID                  = 66\n\tSYS_SIGACTION               = 67\n\tSYS_SIGSUSPEND              = 72\n\tSYS_SIGPENDING              = 73\n\tSYS_SETHOSTNAME             = 74\n\tSYS_SETRLIMIT               = 75\n\tSYS_GETRUSAGE               = 77\n\tSYS_GETTIMEOFDAY            = 78\n\tSYS_SETTIMEOFDAY            = 79\n\tSYS_SYMLINK                 = 83\n\tSYS_READLINK                = 85\n\tSYS_USELIB                  = 86\n\tSYS_SWAPON                  = 87\n\tSYS_REBOOT                  = 88\n\tSYS_READDIR                 = 89\n\tSYS_MMAP                    = 90\n\tSYS_MUNMAP                  = 91\n\tSYS_TRUNCATE                = 92\n\tSYS_FTRUNCATE               = 93\n\tSYS_FCHMOD                  = 94\n\tSYS_GETPRIORITY             = 96\n\tSYS_SETPRIORITY             = 97\n\tSYS_STATFS                  = 99\n\tSYS_FSTATFS                 = 100\n\tSYS_SOCKETCALL              = 102\n\tSYS_SYSLOG                  = 103\n\tSYS_SETITIMER               = 104\n\tSYS_GETITIMER               = 105\n\tSYS_STAT                    = 106\n\tSYS_LSTAT                   = 107\n\tSYS_FSTAT                   = 108\n\tSYS_LOOKUP_DCOOKIE          = 110\n\tSYS_VHANGUP                 = 111\n\tSYS_IDLE                    = 112\n\tSYS_WAIT4                   = 114\n\tSYS_SWAPOFF                 = 115\n\tSYS_SYSINFO                 = 116\n\tSYS_IPC                     = 117\n\tSYS_FSYNC                   = 118\n\tSYS_SIGRETURN               = 119\n\tSYS_CLONE                   = 120\n\tSYS_SETDOMAINNAME           = 121\n\tSYS_UNAME                   = 122\n\tSYS_ADJTIMEX                = 124\n\tSYS_MPROTECT                = 125\n\tSYS_SIGPROCMASK             = 126\n\tSYS_CREATE_MODULE           = 127\n\tSYS_INIT_MODULE             = 128\n\tSYS_DELETE_MODULE           = 129\n\tSYS_GET_KERNEL_SYMS         = 130\n\tSYS_QUOTACTL                = 131\n\tSYS_GETPGID                 = 132\n\tSYS_FCHDIR                  = 133\n\tSYS_BDFLUSH                 = 134\n\tSYS_SYSFS                   = 135\n\tSYS_PERSONALITY             = 136\n\tSYS_AFS_SYSCALL             = 137\n\tSYS_GETDENTS                = 141\n\tSYS_SELECT                  = 142\n\tSYS_FLOCK                   = 143\n\tSYS_MSYNC                   = 144\n\tSYS_READV                   = 145\n\tSYS_WRITEV                  = 146\n\tSYS_GETSID                  = 147\n\tSYS_FDATASYNC               = 148\n\tSYS__SYSCTL                 = 149\n\tSYS_MLOCK                   = 150\n\tSYS_MUNLOCK                 = 151\n\tSYS_MLOCKALL                = 152\n\tSYS_MUNLOCKALL              = 153\n\tSYS_SCHED_SETPARAM          = 154\n\tSYS_SCHED_GETPARAM          = 155\n\tSYS_SCHED_SETSCHEDULER      = 156\n\tSYS_SCHED_GETSCHEDULER      = 157\n\tSYS_SCHED_YIELD             = 158\n\tSYS_SCHED_GET_PRIORITY_MAX  = 159\n\tSYS_SCHED_GET_PRIORITY_MIN  = 160\n\tSYS_SCHED_RR_GET_INTERVAL   = 161\n\tSYS_NANOSLEEP               = 162\n\tSYS_MREMAP                  = 163\n\tSYS_QUERY_MODULE            = 167\n\tSYS_POLL                    = 168\n\tSYS_NFSSERVCTL              = 169\n\tSYS_PRCTL                   = 172\n\tSYS_RT_SIGRETURN            = 173\n\tSYS_RT_SIGACTION            = 174\n\tSYS_RT_SIGPROCMASK          = 175\n\tSYS_RT_SIGPENDING           = 176\n\tSYS_RT_SIGTIMEDWAIT         = 177\n\tSYS_RT_SIGQUEUEINFO         = 178\n\tSYS_RT_SIGSUSPEND           = 179\n\tSYS_PREAD64                 = 180\n\tSYS_PWRITE64                = 181\n\tSYS_GETCWD                  = 183\n\tSYS_CAPGET                  = 184\n\tSYS_CAPSET                  = 185\n\tSYS_SIGALTSTACK             = 186\n\tSYS_SENDFILE                = 187\n\tSYS_GETPMSG                 = 188\n\tSYS_PUTPMSG                 = 189\n\tSYS_VFORK                   = 190\n\tSYS_GETRLIMIT               = 191\n\tSYS_LCHOWN                  = 198\n\tSYS_GETUID                  = 199\n\tSYS_GETGID                  = 200\n\tSYS_GETEUID                 = 201\n\tSYS_GETEGID                 = 202\n\tSYS_SETREUID                = 203\n\tSYS_SETREGID                = 204\n\tSYS_GETGROUPS               = 205\n\tSYS_SETGROUPS               = 206\n\tSYS_FCHOWN                  = 207\n\tSYS_SETRESUID               = 208\n\tSYS_GETRESUID               = 209\n\tSYS_SETRESGID               = 210\n\tSYS_GETRESGID               = 211\n\tSYS_CHOWN                   = 212\n\tSYS_SETUID                  = 213\n\tSYS_SETGID                  = 214\n\tSYS_SETFSUID                = 215\n\tSYS_SETFSGID                = 216\n\tSYS_PIVOT_ROOT              = 217\n\tSYS_MINCORE                 = 218\n\tSYS_MADVISE                 = 219\n\tSYS_GETDENTS64              = 220\n\tSYS_READAHEAD               = 222\n\tSYS_SETXATTR                = 224\n\tSYS_LSETXATTR               = 225\n\tSYS_FSETXATTR               = 226\n\tSYS_GETXATTR                = 227\n\tSYS_LGETXATTR               = 228\n\tSYS_FGETXATTR               = 229\n\tSYS_LISTXATTR               = 230\n\tSYS_LLISTXATTR              = 231\n\tSYS_FLISTXATTR              = 232\n\tSYS_REMOVEXATTR             = 233\n\tSYS_LREMOVEXATTR            = 234\n\tSYS_FREMOVEXATTR            = 235\n\tSYS_GETTID                  = 236\n\tSYS_TKILL                   = 237\n\tSYS_FUTEX                   = 238\n\tSYS_SCHED_SETAFFINITY       = 239\n\tSYS_SCHED_GETAFFINITY       = 240\n\tSYS_TGKILL                  = 241\n\tSYS_IO_SETUP                = 243\n\tSYS_IO_DESTROY              = 244\n\tSYS_IO_GETEVENTS            = 245\n\tSYS_IO_SUBMIT               = 246\n\tSYS_IO_CANCEL               = 247\n\tSYS_EXIT_GROUP              = 248\n\tSYS_EPOLL_CREATE            = 249\n\tSYS_EPOLL_CTL               = 250\n\tSYS_EPOLL_WAIT              = 251\n\tSYS_SET_TID_ADDRESS         = 252\n\tSYS_FADVISE64               = 253\n\tSYS_TIMER_CREATE            = 254\n\tSYS_TIMER_SETTIME           = 255\n\tSYS_TIMER_GETTIME           = 256\n\tSYS_TIMER_GETOVERRUN        = 257\n\tSYS_TIMER_DELETE            = 258\n\tSYS_CLOCK_SETTIME           = 259\n\tSYS_CLOCK_GETTIME           = 260\n\tSYS_CLOCK_GETRES            = 261\n\tSYS_CLOCK_NANOSLEEP         = 262\n\tSYS_STATFS64                = 265\n\tSYS_FSTATFS64               = 266\n\tSYS_REMAP_FILE_PAGES        = 267\n\tSYS_MBIND                   = 268\n\tSYS_GET_MEMPOLICY           = 269\n\tSYS_SET_MEMPOLICY           = 270\n\tSYS_MQ_OPEN                 = 271\n\tSYS_MQ_UNLINK               = 272\n\tSYS_MQ_TIMEDSEND            = 273\n\tSYS_MQ_TIMEDRECEIVE         = 274\n\tSYS_MQ_NOTIFY               = 275\n\tSYS_MQ_GETSETATTR           = 276\n\tSYS_KEXEC_LOAD              = 277\n\tSYS_ADD_KEY                 = 278\n\tSYS_REQUEST_KEY             = 279\n\tSYS_KEYCTL                  = 280\n\tSYS_WAITID                  = 281\n\tSYS_IOPRIO_SET              = 282\n\tSYS_IOPRIO_GET              = 283\n\tSYS_INOTIFY_INIT            = 284\n\tSYS_INOTIFY_ADD_WATCH       = 285\n\tSYS_INOTIFY_RM_WATCH        = 286\n\tSYS_MIGRATE_PAGES           = 287\n\tSYS_OPENAT                  = 288\n\tSYS_MKDIRAT                 = 289\n\tSYS_MKNODAT                 = 290\n\tSYS_FCHOWNAT                = 291\n\tSYS_FUTIMESAT               = 292\n\tSYS_NEWFSTATAT              = 293\n\tSYS_UNLINKAT                = 294\n\tSYS_RENAMEAT                = 295\n\tSYS_LINKAT                  = 296\n\tSYS_SYMLINKAT               = 297\n\tSYS_READLINKAT              = 298\n\tSYS_FCHMODAT                = 299\n\tSYS_FACCESSAT               = 300\n\tSYS_PSELECT6                = 301\n\tSYS_PPOLL                   = 302\n\tSYS_UNSHARE                 = 303\n\tSYS_SET_ROBUST_LIST         = 304\n\tSYS_GET_ROBUST_LIST         = 305\n\tSYS_SPLICE                  = 306\n\tSYS_SYNC_FILE_RANGE         = 307\n\tSYS_TEE                     = 308\n\tSYS_VMSPLICE                = 309\n\tSYS_MOVE_PAGES              = 310\n\tSYS_GETCPU                  = 311\n\tSYS_EPOLL_PWAIT             = 312\n\tSYS_UTIMES                  = 313\n\tSYS_FALLOCATE               = 314\n\tSYS_UTIMENSAT               = 315\n\tSYS_SIGNALFD                = 316\n\tSYS_TIMERFD                 = 317\n\tSYS_EVENTFD                 = 318\n\tSYS_TIMERFD_CREATE          = 319\n\tSYS_TIMERFD_SETTIME         = 320\n\tSYS_TIMERFD_GETTIME         = 321\n\tSYS_SIGNALFD4               = 322\n\tSYS_EVENTFD2                = 323\n\tSYS_INOTIFY_INIT1           = 324\n\tSYS_PIPE2                   = 325\n\tSYS_DUP3                    = 326\n\tSYS_EPOLL_CREATE1           = 327\n\tSYS_PREADV                  = 328\n\tSYS_PWRITEV                 = 329\n\tSYS_RT_TGSIGQUEUEINFO       = 330\n\tSYS_PERF_EVENT_OPEN         = 331\n\tSYS_FANOTIFY_INIT           = 332\n\tSYS_FANOTIFY_MARK           = 333\n\tSYS_PRLIMIT64               = 334\n\tSYS_NAME_TO_HANDLE_AT       = 335\n\tSYS_OPEN_BY_HANDLE_AT       = 336\n\tSYS_CLOCK_ADJTIME           = 337\n\tSYS_SYNCFS                  = 338\n\tSYS_SETNS                   = 339\n\tSYS_PROCESS_VM_READV        = 340\n\tSYS_PROCESS_VM_WRITEV       = 341\n\tSYS_S390_RUNTIME_INSTR      = 342\n\tSYS_KCMP                    = 343\n\tSYS_FINIT_MODULE            = 344\n\tSYS_SCHED_SETATTR           = 345\n\tSYS_SCHED_GETATTR           = 346\n\tSYS_RENAMEAT2               = 347\n\tSYS_SECCOMP                 = 348\n\tSYS_GETRANDOM               = 349\n\tSYS_MEMFD_CREATE            = 350\n\tSYS_BPF                     = 351\n\tSYS_S390_PCI_MMIO_WRITE     = 352\n\tSYS_S390_PCI_MMIO_READ      = 353\n\tSYS_EXECVEAT                = 354\n\tSYS_USERFAULTFD             = 355\n\tSYS_MEMBARRIER              = 356\n\tSYS_RECVMMSG                = 357\n\tSYS_SENDMMSG                = 358\n\tSYS_SOCKET                  = 359\n\tSYS_SOCKETPAIR              = 360\n\tSYS_BIND                    = 361\n\tSYS_CONNECT                 = 362\n\tSYS_LISTEN                  = 363\n\tSYS_ACCEPT4                 = 364\n\tSYS_GETSOCKOPT              = 365\n\tSYS_SETSOCKOPT              = 366\n\tSYS_GETSOCKNAME             = 367\n\tSYS_GETPEERNAME             = 368\n\tSYS_SENDTO                  = 369\n\tSYS_SENDMSG                 = 370\n\tSYS_RECVFROM                = 371\n\tSYS_RECVMSG                 = 372\n\tSYS_SHUTDOWN                = 373\n\tSYS_MLOCK2                  = 374\n\tSYS_COPY_FILE_RANGE         = 375\n\tSYS_PREADV2                 = 376\n\tSYS_PWRITEV2                = 377\n\tSYS_S390_GUARDED_STORAGE    = 378\n\tSYS_STATX                   = 379\n\tSYS_S390_STHYI              = 380\n\tSYS_KEXEC_FILE_LOAD         = 381\n\tSYS_IO_PGETEVENTS           = 382\n\tSYS_RSEQ                    = 383\n\tSYS_PKEY_MPROTECT           = 384\n\tSYS_PKEY_ALLOC              = 385\n\tSYS_PKEY_FREE               = 386\n\tSYS_SEMTIMEDOP              = 392\n\tSYS_SEMGET                  = 393\n\tSYS_SEMCTL                  = 394\n\tSYS_SHMGET                  = 395\n\tSYS_SHMCTL                  = 396\n\tSYS_SHMAT                   = 397\n\tSYS_SHMDT                   = 398\n\tSYS_MSGGET                  = 399\n\tSYS_MSGSND                  = 400\n\tSYS_MSGRCV                  = 401\n\tSYS_MSGCTL                  = 402\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLONE3                  = 435\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_MEMFD_SECRET            = 447\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go",
    "content": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/sparc64/include /tmp/sparc64/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build sparc64 && linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL         = 0\n\tSYS_EXIT                    = 1\n\tSYS_FORK                    = 2\n\tSYS_READ                    = 3\n\tSYS_WRITE                   = 4\n\tSYS_OPEN                    = 5\n\tSYS_CLOSE                   = 6\n\tSYS_WAIT4                   = 7\n\tSYS_CREAT                   = 8\n\tSYS_LINK                    = 9\n\tSYS_UNLINK                  = 10\n\tSYS_EXECV                   = 11\n\tSYS_CHDIR                   = 12\n\tSYS_CHOWN                   = 13\n\tSYS_MKNOD                   = 14\n\tSYS_CHMOD                   = 15\n\tSYS_LCHOWN                  = 16\n\tSYS_BRK                     = 17\n\tSYS_PERFCTR                 = 18\n\tSYS_LSEEK                   = 19\n\tSYS_GETPID                  = 20\n\tSYS_CAPGET                  = 21\n\tSYS_CAPSET                  = 22\n\tSYS_SETUID                  = 23\n\tSYS_GETUID                  = 24\n\tSYS_VMSPLICE                = 25\n\tSYS_PTRACE                  = 26\n\tSYS_ALARM                   = 27\n\tSYS_SIGALTSTACK             = 28\n\tSYS_PAUSE                   = 29\n\tSYS_UTIME                   = 30\n\tSYS_ACCESS                  = 33\n\tSYS_NICE                    = 34\n\tSYS_SYNC                    = 36\n\tSYS_KILL                    = 37\n\tSYS_STAT                    = 38\n\tSYS_SENDFILE                = 39\n\tSYS_LSTAT                   = 40\n\tSYS_DUP                     = 41\n\tSYS_PIPE                    = 42\n\tSYS_TIMES                   = 43\n\tSYS_UMOUNT2                 = 45\n\tSYS_SETGID                  = 46\n\tSYS_GETGID                  = 47\n\tSYS_SIGNAL                  = 48\n\tSYS_GETEUID                 = 49\n\tSYS_GETEGID                 = 50\n\tSYS_ACCT                    = 51\n\tSYS_MEMORY_ORDERING         = 52\n\tSYS_IOCTL                   = 54\n\tSYS_REBOOT                  = 55\n\tSYS_SYMLINK                 = 57\n\tSYS_READLINK                = 58\n\tSYS_EXECVE                  = 59\n\tSYS_UMASK                   = 60\n\tSYS_CHROOT                  = 61\n\tSYS_FSTAT                   = 62\n\tSYS_FSTAT64                 = 63\n\tSYS_GETPAGESIZE             = 64\n\tSYS_MSYNC                   = 65\n\tSYS_VFORK                   = 66\n\tSYS_PREAD64                 = 67\n\tSYS_PWRITE64                = 68\n\tSYS_MMAP                    = 71\n\tSYS_MUNMAP                  = 73\n\tSYS_MPROTECT                = 74\n\tSYS_MADVISE                 = 75\n\tSYS_VHANGUP                 = 76\n\tSYS_MINCORE                 = 78\n\tSYS_GETGROUPS               = 79\n\tSYS_SETGROUPS               = 80\n\tSYS_GETPGRP                 = 81\n\tSYS_SETITIMER               = 83\n\tSYS_SWAPON                  = 85\n\tSYS_GETITIMER               = 86\n\tSYS_SETHOSTNAME             = 88\n\tSYS_DUP2                    = 90\n\tSYS_FCNTL                   = 92\n\tSYS_SELECT                  = 93\n\tSYS_FSYNC                   = 95\n\tSYS_SETPRIORITY             = 96\n\tSYS_SOCKET                  = 97\n\tSYS_CONNECT                 = 98\n\tSYS_ACCEPT                  = 99\n\tSYS_GETPRIORITY             = 100\n\tSYS_RT_SIGRETURN            = 101\n\tSYS_RT_SIGACTION            = 102\n\tSYS_RT_SIGPROCMASK          = 103\n\tSYS_RT_SIGPENDING           = 104\n\tSYS_RT_SIGTIMEDWAIT         = 105\n\tSYS_RT_SIGQUEUEINFO         = 106\n\tSYS_RT_SIGSUSPEND           = 107\n\tSYS_SETRESUID               = 108\n\tSYS_GETRESUID               = 109\n\tSYS_SETRESGID               = 110\n\tSYS_GETRESGID               = 111\n\tSYS_RECVMSG                 = 113\n\tSYS_SENDMSG                 = 114\n\tSYS_GETTIMEOFDAY            = 116\n\tSYS_GETRUSAGE               = 117\n\tSYS_GETSOCKOPT              = 118\n\tSYS_GETCWD                  = 119\n\tSYS_READV                   = 120\n\tSYS_WRITEV                  = 121\n\tSYS_SETTIMEOFDAY            = 122\n\tSYS_FCHOWN                  = 123\n\tSYS_FCHMOD                  = 124\n\tSYS_RECVFROM                = 125\n\tSYS_SETREUID                = 126\n\tSYS_SETREGID                = 127\n\tSYS_RENAME                  = 128\n\tSYS_TRUNCATE                = 129\n\tSYS_FTRUNCATE               = 130\n\tSYS_FLOCK                   = 131\n\tSYS_LSTAT64                 = 132\n\tSYS_SENDTO                  = 133\n\tSYS_SHUTDOWN                = 134\n\tSYS_SOCKETPAIR              = 135\n\tSYS_MKDIR                   = 136\n\tSYS_RMDIR                   = 137\n\tSYS_UTIMES                  = 138\n\tSYS_STAT64                  = 139\n\tSYS_SENDFILE64              = 140\n\tSYS_GETPEERNAME             = 141\n\tSYS_FUTEX                   = 142\n\tSYS_GETTID                  = 143\n\tSYS_GETRLIMIT               = 144\n\tSYS_SETRLIMIT               = 145\n\tSYS_PIVOT_ROOT              = 146\n\tSYS_PRCTL                   = 147\n\tSYS_PCICONFIG_READ          = 148\n\tSYS_PCICONFIG_WRITE         = 149\n\tSYS_GETSOCKNAME             = 150\n\tSYS_INOTIFY_INIT            = 151\n\tSYS_INOTIFY_ADD_WATCH       = 152\n\tSYS_POLL                    = 153\n\tSYS_GETDENTS64              = 154\n\tSYS_INOTIFY_RM_WATCH        = 156\n\tSYS_STATFS                  = 157\n\tSYS_FSTATFS                 = 158\n\tSYS_UMOUNT                  = 159\n\tSYS_SCHED_SET_AFFINITY      = 160\n\tSYS_SCHED_GET_AFFINITY      = 161\n\tSYS_GETDOMAINNAME           = 162\n\tSYS_SETDOMAINNAME           = 163\n\tSYS_UTRAP_INSTALL           = 164\n\tSYS_QUOTACTL                = 165\n\tSYS_SET_TID_ADDRESS         = 166\n\tSYS_MOUNT                   = 167\n\tSYS_USTAT                   = 168\n\tSYS_SETXATTR                = 169\n\tSYS_LSETXATTR               = 170\n\tSYS_FSETXATTR               = 171\n\tSYS_GETXATTR                = 172\n\tSYS_LGETXATTR               = 173\n\tSYS_GETDENTS                = 174\n\tSYS_SETSID                  = 175\n\tSYS_FCHDIR                  = 176\n\tSYS_FGETXATTR               = 177\n\tSYS_LISTXATTR               = 178\n\tSYS_LLISTXATTR              = 179\n\tSYS_FLISTXATTR              = 180\n\tSYS_REMOVEXATTR             = 181\n\tSYS_LREMOVEXATTR            = 182\n\tSYS_SIGPENDING              = 183\n\tSYS_QUERY_MODULE            = 184\n\tSYS_SETPGID                 = 185\n\tSYS_FREMOVEXATTR            = 186\n\tSYS_TKILL                   = 187\n\tSYS_EXIT_GROUP              = 188\n\tSYS_UNAME                   = 189\n\tSYS_INIT_MODULE             = 190\n\tSYS_PERSONALITY             = 191\n\tSYS_REMAP_FILE_PAGES        = 192\n\tSYS_EPOLL_CREATE            = 193\n\tSYS_EPOLL_CTL               = 194\n\tSYS_EPOLL_WAIT              = 195\n\tSYS_IOPRIO_SET              = 196\n\tSYS_GETPPID                 = 197\n\tSYS_SIGACTION               = 198\n\tSYS_SGETMASK                = 199\n\tSYS_SSETMASK                = 200\n\tSYS_SIGSUSPEND              = 201\n\tSYS_OLDLSTAT                = 202\n\tSYS_USELIB                  = 203\n\tSYS_READDIR                 = 204\n\tSYS_READAHEAD               = 205\n\tSYS_SOCKETCALL              = 206\n\tSYS_SYSLOG                  = 207\n\tSYS_LOOKUP_DCOOKIE          = 208\n\tSYS_FADVISE64               = 209\n\tSYS_FADVISE64_64            = 210\n\tSYS_TGKILL                  = 211\n\tSYS_WAITPID                 = 212\n\tSYS_SWAPOFF                 = 213\n\tSYS_SYSINFO                 = 214\n\tSYS_IPC                     = 215\n\tSYS_SIGRETURN               = 216\n\tSYS_CLONE                   = 217\n\tSYS_IOPRIO_GET              = 218\n\tSYS_ADJTIMEX                = 219\n\tSYS_SIGPROCMASK             = 220\n\tSYS_CREATE_MODULE           = 221\n\tSYS_DELETE_MODULE           = 222\n\tSYS_GET_KERNEL_SYMS         = 223\n\tSYS_GETPGID                 = 224\n\tSYS_BDFLUSH                 = 225\n\tSYS_SYSFS                   = 226\n\tSYS_AFS_SYSCALL             = 227\n\tSYS_SETFSUID                = 228\n\tSYS_SETFSGID                = 229\n\tSYS__NEWSELECT              = 230\n\tSYS_SPLICE                  = 232\n\tSYS_STIME                   = 233\n\tSYS_STATFS64                = 234\n\tSYS_FSTATFS64               = 235\n\tSYS__LLSEEK                 = 236\n\tSYS_MLOCK                   = 237\n\tSYS_MUNLOCK                 = 238\n\tSYS_MLOCKALL                = 239\n\tSYS_MUNLOCKALL              = 240\n\tSYS_SCHED_SETPARAM          = 241\n\tSYS_SCHED_GETPARAM          = 242\n\tSYS_SCHED_SETSCHEDULER      = 243\n\tSYS_SCHED_GETSCHEDULER      = 244\n\tSYS_SCHED_YIELD             = 245\n\tSYS_SCHED_GET_PRIORITY_MAX  = 246\n\tSYS_SCHED_GET_PRIORITY_MIN  = 247\n\tSYS_SCHED_RR_GET_INTERVAL   = 248\n\tSYS_NANOSLEEP               = 249\n\tSYS_MREMAP                  = 250\n\tSYS__SYSCTL                 = 251\n\tSYS_GETSID                  = 252\n\tSYS_FDATASYNC               = 253\n\tSYS_NFSSERVCTL              = 254\n\tSYS_SYNC_FILE_RANGE         = 255\n\tSYS_CLOCK_SETTIME           = 256\n\tSYS_CLOCK_GETTIME           = 257\n\tSYS_CLOCK_GETRES            = 258\n\tSYS_CLOCK_NANOSLEEP         = 259\n\tSYS_SCHED_GETAFFINITY       = 260\n\tSYS_SCHED_SETAFFINITY       = 261\n\tSYS_TIMER_SETTIME           = 262\n\tSYS_TIMER_GETTIME           = 263\n\tSYS_TIMER_GETOVERRUN        = 264\n\tSYS_TIMER_DELETE            = 265\n\tSYS_TIMER_CREATE            = 266\n\tSYS_VSERVER                 = 267\n\tSYS_IO_SETUP                = 268\n\tSYS_IO_DESTROY              = 269\n\tSYS_IO_SUBMIT               = 270\n\tSYS_IO_CANCEL               = 271\n\tSYS_IO_GETEVENTS            = 272\n\tSYS_MQ_OPEN                 = 273\n\tSYS_MQ_UNLINK               = 274\n\tSYS_MQ_TIMEDSEND            = 275\n\tSYS_MQ_TIMEDRECEIVE         = 276\n\tSYS_MQ_NOTIFY               = 277\n\tSYS_MQ_GETSETATTR           = 278\n\tSYS_WAITID                  = 279\n\tSYS_TEE                     = 280\n\tSYS_ADD_KEY                 = 281\n\tSYS_REQUEST_KEY             = 282\n\tSYS_KEYCTL                  = 283\n\tSYS_OPENAT                  = 284\n\tSYS_MKDIRAT                 = 285\n\tSYS_MKNODAT                 = 286\n\tSYS_FCHOWNAT                = 287\n\tSYS_FUTIMESAT               = 288\n\tSYS_FSTATAT64               = 289\n\tSYS_UNLINKAT                = 290\n\tSYS_RENAMEAT                = 291\n\tSYS_LINKAT                  = 292\n\tSYS_SYMLINKAT               = 293\n\tSYS_READLINKAT              = 294\n\tSYS_FCHMODAT                = 295\n\tSYS_FACCESSAT               = 296\n\tSYS_PSELECT6                = 297\n\tSYS_PPOLL                   = 298\n\tSYS_UNSHARE                 = 299\n\tSYS_SET_ROBUST_LIST         = 300\n\tSYS_GET_ROBUST_LIST         = 301\n\tSYS_MIGRATE_PAGES           = 302\n\tSYS_MBIND                   = 303\n\tSYS_GET_MEMPOLICY           = 304\n\tSYS_SET_MEMPOLICY           = 305\n\tSYS_KEXEC_LOAD              = 306\n\tSYS_MOVE_PAGES              = 307\n\tSYS_GETCPU                  = 308\n\tSYS_EPOLL_PWAIT             = 309\n\tSYS_UTIMENSAT               = 310\n\tSYS_SIGNALFD                = 311\n\tSYS_TIMERFD_CREATE          = 312\n\tSYS_EVENTFD                 = 313\n\tSYS_FALLOCATE               = 314\n\tSYS_TIMERFD_SETTIME         = 315\n\tSYS_TIMERFD_GETTIME         = 316\n\tSYS_SIGNALFD4               = 317\n\tSYS_EVENTFD2                = 318\n\tSYS_EPOLL_CREATE1           = 319\n\tSYS_DUP3                    = 320\n\tSYS_PIPE2                   = 321\n\tSYS_INOTIFY_INIT1           = 322\n\tSYS_ACCEPT4                 = 323\n\tSYS_PREADV                  = 324\n\tSYS_PWRITEV                 = 325\n\tSYS_RT_TGSIGQUEUEINFO       = 326\n\tSYS_PERF_EVENT_OPEN         = 327\n\tSYS_RECVMMSG                = 328\n\tSYS_FANOTIFY_INIT           = 329\n\tSYS_FANOTIFY_MARK           = 330\n\tSYS_PRLIMIT64               = 331\n\tSYS_NAME_TO_HANDLE_AT       = 332\n\tSYS_OPEN_BY_HANDLE_AT       = 333\n\tSYS_CLOCK_ADJTIME           = 334\n\tSYS_SYNCFS                  = 335\n\tSYS_SENDMMSG                = 336\n\tSYS_SETNS                   = 337\n\tSYS_PROCESS_VM_READV        = 338\n\tSYS_PROCESS_VM_WRITEV       = 339\n\tSYS_KERN_FEATURES           = 340\n\tSYS_KCMP                    = 341\n\tSYS_FINIT_MODULE            = 342\n\tSYS_SCHED_SETATTR           = 343\n\tSYS_SCHED_GETATTR           = 344\n\tSYS_RENAMEAT2               = 345\n\tSYS_SECCOMP                 = 346\n\tSYS_GETRANDOM               = 347\n\tSYS_MEMFD_CREATE            = 348\n\tSYS_BPF                     = 349\n\tSYS_EXECVEAT                = 350\n\tSYS_MEMBARRIER              = 351\n\tSYS_USERFAULTFD             = 352\n\tSYS_BIND                    = 353\n\tSYS_LISTEN                  = 354\n\tSYS_SETSOCKOPT              = 355\n\tSYS_MLOCK2                  = 356\n\tSYS_COPY_FILE_RANGE         = 357\n\tSYS_PREADV2                 = 358\n\tSYS_PWRITEV2                = 359\n\tSYS_STATX                   = 360\n\tSYS_IO_PGETEVENTS           = 361\n\tSYS_PKEY_MPROTECT           = 362\n\tSYS_PKEY_ALLOC              = 363\n\tSYS_PKEY_FREE               = 364\n\tSYS_RSEQ                    = 365\n\tSYS_SEMTIMEDOP              = 392\n\tSYS_SEMGET                  = 393\n\tSYS_SEMCTL                  = 394\n\tSYS_SHMGET                  = 395\n\tSYS_SHMCTL                  = 396\n\tSYS_SHMAT                   = 397\n\tSYS_SHMDT                   = 398\n\tSYS_MSGGET                  = 399\n\tSYS_MSGSND                  = 400\n\tSYS_MSGRCV                  = 401\n\tSYS_MSGCTL                  = 402\n\tSYS_PIDFD_SEND_SIGNAL       = 424\n\tSYS_IO_URING_SETUP          = 425\n\tSYS_IO_URING_ENTER          = 426\n\tSYS_IO_URING_REGISTER       = 427\n\tSYS_OPEN_TREE               = 428\n\tSYS_MOVE_MOUNT              = 429\n\tSYS_FSOPEN                  = 430\n\tSYS_FSCONFIG                = 431\n\tSYS_FSMOUNT                 = 432\n\tSYS_FSPICK                  = 433\n\tSYS_PIDFD_OPEN              = 434\n\tSYS_CLOSE_RANGE             = 436\n\tSYS_OPENAT2                 = 437\n\tSYS_PIDFD_GETFD             = 438\n\tSYS_FACCESSAT2              = 439\n\tSYS_PROCESS_MADVISE         = 440\n\tSYS_EPOLL_PWAIT2            = 441\n\tSYS_MOUNT_SETATTR           = 442\n\tSYS_QUOTACTL_FD             = 443\n\tSYS_LANDLOCK_CREATE_RULESET = 444\n\tSYS_LANDLOCK_ADD_RULE       = 445\n\tSYS_LANDLOCK_RESTRICT_SELF  = 446\n\tSYS_PROCESS_MRELEASE        = 448\n\tSYS_FUTEX_WAITV             = 449\n\tSYS_SET_MEMPOLICY_HOME_NODE = 450\n\tSYS_CACHESTAT               = 451\n\tSYS_FCHMODAT2               = 452\n\tSYS_MAP_SHADOW_STACK        = 453\n\tSYS_FUTEX_WAKE              = 454\n\tSYS_FUTEX_WAIT              = 455\n\tSYS_FUTEX_REQUEUE           = 456\n\tSYS_STATMOUNT               = 457\n\tSYS_LISTMOUNT               = 458\n\tSYS_LSM_GET_SELF_ATTR       = 459\n\tSYS_LSM_SET_SELF_ATTR       = 460\n\tSYS_LSM_LIST_MODULES        = 461\n\tSYS_MSEAL                   = 462\n\tSYS_SETXATTRAT              = 463\n\tSYS_GETXATTRAT              = 464\n\tSYS_LISTXATTRAT             = 465\n\tSYS_REMOVEXATTRAT           = 466\n\tSYS_OPEN_TREE_ATTR          = 467\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go",
    "content": "// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && netbsd\n\npackage unix\n\nconst (\n\tSYS_EXIT                 = 1   // { void|sys||exit(int rval); }\n\tSYS_FORK                 = 2   // { int|sys||fork(void); }\n\tSYS_READ                 = 3   // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                = 4   // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                 = 5   // { int|sys||open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE                = 6   // { int|sys||close(int fd); }\n\tSYS_LINK                 = 9   // { int|sys||link(const char *path, const char *link); }\n\tSYS_UNLINK               = 10  // { int|sys||unlink(const char *path); }\n\tSYS_CHDIR                = 12  // { int|sys||chdir(const char *path); }\n\tSYS_FCHDIR               = 13  // { int|sys||fchdir(int fd); }\n\tSYS_CHMOD                = 15  // { int|sys||chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN                = 16  // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_BREAK                = 17  // { int|sys||obreak(char *nsize); }\n\tSYS_GETPID               = 20  // { pid_t|sys||getpid_with_ppid(void); }\n\tSYS_UNMOUNT              = 22  // { int|sys||unmount(const char *path, int flags); }\n\tSYS_SETUID               = 23  // { int|sys||setuid(uid_t uid); }\n\tSYS_GETUID               = 24  // { uid_t|sys||getuid_with_euid(void); }\n\tSYS_GETEUID              = 25  // { uid_t|sys||geteuid(void); }\n\tSYS_PTRACE               = 26  // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }\n\tSYS_RECVMSG              = 27  // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG              = 28  // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM             = 29  // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT               = 30  // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME          = 31  // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME          = 32  // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS               = 33  // { int|sys||access(const char *path, int flags); }\n\tSYS_CHFLAGS              = 34  // { int|sys||chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS             = 35  // { int|sys||fchflags(int fd, u_long flags); }\n\tSYS_SYNC                 = 36  // { void|sys||sync(void); }\n\tSYS_KILL                 = 37  // { int|sys||kill(pid_t pid, int signum); }\n\tSYS_GETPPID              = 39  // { pid_t|sys||getppid(void); }\n\tSYS_DUP                  = 41  // { int|sys||dup(int fd); }\n\tSYS_PIPE                 = 42  // { int|sys||pipe(void); }\n\tSYS_GETEGID              = 43  // { gid_t|sys||getegid(void); }\n\tSYS_PROFIL               = 44  // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE               = 45  // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_GETGID               = 47  // { gid_t|sys||getgid_with_egid(void); }\n\tSYS___GETLOGIN           = 49  // { int|sys||__getlogin(char *namebuf, size_t namelen); }\n\tSYS___SETLOGIN           = 50  // { int|sys||__setlogin(const char *namebuf); }\n\tSYS_ACCT                 = 51  // { int|sys||acct(const char *path); }\n\tSYS_IOCTL                = 54  // { int|sys||ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REVOKE               = 56  // { int|sys||revoke(const char *path); }\n\tSYS_SYMLINK              = 57  // { int|sys||symlink(const char *path, const char *link); }\n\tSYS_READLINK             = 58  // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE               = 59  // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK                = 60  // { mode_t|sys||umask(mode_t newmask); }\n\tSYS_CHROOT               = 61  // { int|sys||chroot(const char *path); }\n\tSYS_VFORK                = 66  // { int|sys||vfork(void); }\n\tSYS_SBRK                 = 69  // { int|sys||sbrk(intptr_t incr); }\n\tSYS_SSTK                 = 70  // { int|sys||sstk(int incr); }\n\tSYS_VADVISE              = 72  // { int|sys||ovadvise(int anom); }\n\tSYS_MUNMAP               = 73  // { int|sys||munmap(void *addr, size_t len); }\n\tSYS_MPROTECT             = 74  // { int|sys||mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE              = 75  // { int|sys||madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE              = 78  // { int|sys||mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS            = 79  // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS            = 80  // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP              = 81  // { int|sys||getpgrp(void); }\n\tSYS_SETPGID              = 82  // { int|sys||setpgid(pid_t pid, pid_t pgid); }\n\tSYS_DUP2                 = 90  // { int|sys||dup2(int from, int to); }\n\tSYS_FCNTL                = 92  // { int|sys||fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_FSYNC                = 95  // { int|sys||fsync(int fd); }\n\tSYS_SETPRIORITY          = 96  // { int|sys||setpriority(int which, id_t who, int prio); }\n\tSYS_CONNECT              = 98  // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETPRIORITY          = 100 // { int|sys||getpriority(int which, id_t who); }\n\tSYS_BIND                 = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT           = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN               = 106 // { int|sys||listen(int s, int backlog); }\n\tSYS_GETSOCKOPT           = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_READV                = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV               = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_FCHOWN               = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD               = 124 // { int|sys||fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID             = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID             = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME               = 128 // { int|sys||rename(const char *from, const char *to); }\n\tSYS_FLOCK                = 131 // { int|sys||flock(int fd, int how); }\n\tSYS_MKFIFO               = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO               = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN             = 134 // { int|sys||shutdown(int s, int how); }\n\tSYS_SOCKETPAIR           = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                = 136 // { int|sys||mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR                = 137 // { int|sys||rmdir(const char *path); }\n\tSYS_SETSID               = 147 // { int|sys||setsid(void); }\n\tSYS_SYSARCH              = 165 // { int|sys||sysarch(int op, void *parms); }\n\tSYS_PREAD                = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_PWRITE               = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_NTP_ADJTIME          = 176 // { int|sys||ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID               = 181 // { int|sys||setgid(gid_t gid); }\n\tSYS_SETEGID              = 182 // { int|sys||setegid(gid_t egid); }\n\tSYS_SETEUID              = 183 // { int|sys||seteuid(uid_t euid); }\n\tSYS_PATHCONF             = 191 // { long|sys||pathconf(const char *path, int name); }\n\tSYS_FPATHCONF            = 192 // { long|sys||fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT            = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT            = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP                 = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }\n\tSYS_LSEEK                = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }\n\tSYS_TRUNCATE             = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }\n\tSYS_FTRUNCATE            = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }\n\tSYS___SYSCTL             = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }\n\tSYS_MLOCK                = 203 // { int|sys||mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK              = 204 // { int|sys||munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE             = 205 // { int|sys||undelete(const char *path); }\n\tSYS_GETPGID              = 207 // { pid_t|sys||getpgid(pid_t pid); }\n\tSYS_REBOOT               = 208 // { int|sys||reboot(int opt, char *bootstr); }\n\tSYS_POLL                 = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET               = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_SEMCONFIG            = 223 // { int|sys||semconfig(int flag); }\n\tSYS_MSGGET               = 225 // { int|sys||msgget(key_t key, int msgflg); }\n\tSYS_MSGSND               = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV               = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                = 230 // { int|sys||shmdt(const void *shmaddr); }\n\tSYS_SHMGET               = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }\n\tSYS_TIMER_CREATE         = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }\n\tSYS_TIMER_DELETE         = 236 // { int|sys||timer_delete(timer_t timerid); }\n\tSYS_TIMER_GETOVERRUN     = 239 // { int|sys||timer_getoverrun(timer_t timerid); }\n\tSYS_FDATASYNC            = 241 // { int|sys||fdatasync(int fd); }\n\tSYS_MLOCKALL             = 242 // { int|sys||mlockall(int flags); }\n\tSYS_MUNLOCKALL           = 243 // { int|sys||munlockall(void); }\n\tSYS_SIGQUEUEINFO         = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }\n\tSYS_MODCTL               = 246 // { int|sys||modctl(int cmd, void *arg); }\n\tSYS___POSIX_RENAME       = 270 // { int|sys||__posix_rename(const char *from, const char *to); }\n\tSYS_SWAPCTL              = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }\n\tSYS_MINHERIT             = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }\n\tSYS_LCHMOD               = 274 // { int|sys||lchmod(const char *path, mode_t mode); }\n\tSYS_LCHOWN               = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_MSYNC                = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }\n\tSYS___POSIX_CHOWN        = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS___POSIX_FCHOWN       = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS___POSIX_LCHOWN       = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID               = 286 // { pid_t|sys||getsid(pid_t pid); }\n\tSYS___CLONE              = 287 // { pid_t|sys||__clone(int flags, void *stack); }\n\tSYS_FKTRACE              = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }\n\tSYS_PREADV               = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS_PWRITEV              = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS___GETCWD             = 296 // { int|sys||__getcwd(char *bufp, size_t length); }\n\tSYS_FCHROOT              = 297 // { int|sys||fchroot(int fd); }\n\tSYS_LCHFLAGS             = 304 // { int|sys||lchflags(const char *path, u_long flags); }\n\tSYS_ISSETUGID            = 305 // { int|sys||issetugid(void); }\n\tSYS_UTRACE               = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }\n\tSYS_GETCONTEXT           = 307 // { int|sys||getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT           = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }\n\tSYS__LWP_CREATE          = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }\n\tSYS__LWP_EXIT            = 310 // { int|sys||_lwp_exit(void); }\n\tSYS__LWP_SELF            = 311 // { lwpid_t|sys||_lwp_self(void); }\n\tSYS__LWP_WAIT            = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }\n\tSYS__LWP_SUSPEND         = 313 // { int|sys||_lwp_suspend(lwpid_t target); }\n\tSYS__LWP_CONTINUE        = 314 // { int|sys||_lwp_continue(lwpid_t target); }\n\tSYS__LWP_WAKEUP          = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }\n\tSYS__LWP_GETPRIVATE      = 316 // { void *|sys||_lwp_getprivate(void); }\n\tSYS__LWP_SETPRIVATE      = 317 // { void|sys||_lwp_setprivate(void *ptr); }\n\tSYS__LWP_KILL            = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }\n\tSYS__LWP_DETACH          = 319 // { int|sys||_lwp_detach(lwpid_t target); }\n\tSYS__LWP_UNPARK          = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }\n\tSYS__LWP_UNPARK_ALL      = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }\n\tSYS__LWP_SETNAME         = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }\n\tSYS__LWP_GETNAME         = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }\n\tSYS__LWP_CTL             = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }\n\tSYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }\n\tSYS_PMC_GET_INFO         = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }\n\tSYS_PMC_CONTROL          = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }\n\tSYS_RASCTL               = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }\n\tSYS_KQUEUE               = 344 // { int|sys||kqueue(void); }\n\tSYS__SCHED_SETPARAM      = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }\n\tSYS__SCHED_GETPARAM      = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }\n\tSYS__SCHED_SETAFFINITY   = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }\n\tSYS__SCHED_GETAFFINITY   = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }\n\tSYS_SCHED_YIELD          = 350 // { int|sys||sched_yield(void); }\n\tSYS_FSYNC_RANGE          = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }\n\tSYS_UUIDGEN              = 355 // { int|sys||uuidgen(struct uuid *store, int count); }\n\tSYS_GETVFSSTAT           = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }\n\tSYS_STATVFS1             = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }\n\tSYS_FSTATVFS1            = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }\n\tSYS_EXTATTRCTL           = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE     = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE     = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE  = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FD       = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD       = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD    = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_LINK     = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK     = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK  = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_LIST_FD      = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE    = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK    = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_SETXATTR             = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_LSETXATTR            = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_FSETXATTR            = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }\n\tSYS_GETXATTR             = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_LGETXATTR            = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_FGETXATTR            = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }\n\tSYS_LISTXATTR            = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }\n\tSYS_LLISTXATTR           = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }\n\tSYS_FLISTXATTR           = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }\n\tSYS_REMOVEXATTR          = 384 // { int|sys||removexattr(const char *path, const char *name); }\n\tSYS_LREMOVEXATTR         = 385 // { int|sys||lremovexattr(const char *path, const char *name); }\n\tSYS_FREMOVEXATTR         = 386 // { int|sys||fremovexattr(int fd, const char *name); }\n\tSYS_GETDENTS             = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }\n\tSYS_SOCKET               = 394 // { int|sys|30|socket(int domain, int type, int protocol); }\n\tSYS_GETFH                = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }\n\tSYS_MOUNT                = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }\n\tSYS_MREMAP               = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }\n\tSYS_PSET_CREATE          = 412 // { int|sys||pset_create(psetid_t *psid); }\n\tSYS_PSET_DESTROY         = 413 // { int|sys||pset_destroy(psetid_t psid); }\n\tSYS_PSET_ASSIGN          = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }\n\tSYS__PSET_BIND           = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }\n\tSYS_POSIX_FADVISE        = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }\n\tSYS_SELECT               = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_GETTIMEOFDAY         = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }\n\tSYS_SETTIMEOFDAY         = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }\n\tSYS_UTIMES               = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }\n\tSYS_ADJTIME              = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_FUTIMES              = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }\n\tSYS_LUTIMES              = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }\n\tSYS_SETITIMER            = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER            = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }\n\tSYS_CLOCK_GETTIME        = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME        = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES         = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_NANOSLEEP            = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS___SIGTIMEDWAIT       = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }\n\tSYS__LWP_PARK            = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }\n\tSYS_KEVENT               = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }\n\tSYS_PSELECT              = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_POLLTS               = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_STAT                 = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }\n\tSYS_FSTAT                = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }\n\tSYS_LSTAT                = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }\n\tSYS___SEMCTL             = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }\n\tSYS_SHMCTL               = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL               = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_GETRUSAGE            = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }\n\tSYS_TIMER_SETTIME        = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_TIMER_GETTIME        = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }\n\tSYS_NTP_GETTIME          = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_WAIT4                = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_MKNOD                = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_FHSTAT               = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }\n\tSYS_PIPE2                = 453 // { int|sys||pipe2(int *fildes, int flags); }\n\tSYS_DUP3                 = 454 // { int|sys||dup3(int from, int to, int flags); }\n\tSYS_KQUEUE1              = 455 // { int|sys||kqueue1(int flags); }\n\tSYS_PACCEPT              = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }\n\tSYS_LINKAT               = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }\n\tSYS_RENAMEAT             = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_MKFIFOAT             = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT              = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }\n\tSYS_MKDIRAT              = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_FACCESSAT            = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT             = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT             = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }\n\tSYS_FEXECVE              = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }\n\tSYS_FSTATAT              = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_UTIMENSAT            = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }\n\tSYS_OPENAT               = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }\n\tSYS_READLINKAT           = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }\n\tSYS_SYMLINKAT            = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }\n\tSYS_UNLINKAT             = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }\n\tSYS_FUTIMENS             = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }\n\tSYS___QUOTACTL           = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }\n\tSYS_POSIX_SPAWN          = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }\n\tSYS_RECVMMSG             = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }\n\tSYS_SENDMMSG             = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go",
    "content": "// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && netbsd\n\npackage unix\n\nconst (\n\tSYS_EXIT                 = 1   // { void|sys||exit(int rval); }\n\tSYS_FORK                 = 2   // { int|sys||fork(void); }\n\tSYS_READ                 = 3   // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                = 4   // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                 = 5   // { int|sys||open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE                = 6   // { int|sys||close(int fd); }\n\tSYS_LINK                 = 9   // { int|sys||link(const char *path, const char *link); }\n\tSYS_UNLINK               = 10  // { int|sys||unlink(const char *path); }\n\tSYS_CHDIR                = 12  // { int|sys||chdir(const char *path); }\n\tSYS_FCHDIR               = 13  // { int|sys||fchdir(int fd); }\n\tSYS_CHMOD                = 15  // { int|sys||chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN                = 16  // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_BREAK                = 17  // { int|sys||obreak(char *nsize); }\n\tSYS_GETPID               = 20  // { pid_t|sys||getpid_with_ppid(void); }\n\tSYS_UNMOUNT              = 22  // { int|sys||unmount(const char *path, int flags); }\n\tSYS_SETUID               = 23  // { int|sys||setuid(uid_t uid); }\n\tSYS_GETUID               = 24  // { uid_t|sys||getuid_with_euid(void); }\n\tSYS_GETEUID              = 25  // { uid_t|sys||geteuid(void); }\n\tSYS_PTRACE               = 26  // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }\n\tSYS_RECVMSG              = 27  // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG              = 28  // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM             = 29  // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT               = 30  // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME          = 31  // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME          = 32  // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS               = 33  // { int|sys||access(const char *path, int flags); }\n\tSYS_CHFLAGS              = 34  // { int|sys||chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS             = 35  // { int|sys||fchflags(int fd, u_long flags); }\n\tSYS_SYNC                 = 36  // { void|sys||sync(void); }\n\tSYS_KILL                 = 37  // { int|sys||kill(pid_t pid, int signum); }\n\tSYS_GETPPID              = 39  // { pid_t|sys||getppid(void); }\n\tSYS_DUP                  = 41  // { int|sys||dup(int fd); }\n\tSYS_PIPE                 = 42  // { int|sys||pipe(void); }\n\tSYS_GETEGID              = 43  // { gid_t|sys||getegid(void); }\n\tSYS_PROFIL               = 44  // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE               = 45  // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_GETGID               = 47  // { gid_t|sys||getgid_with_egid(void); }\n\tSYS___GETLOGIN           = 49  // { int|sys||__getlogin(char *namebuf, size_t namelen); }\n\tSYS___SETLOGIN           = 50  // { int|sys||__setlogin(const char *namebuf); }\n\tSYS_ACCT                 = 51  // { int|sys||acct(const char *path); }\n\tSYS_IOCTL                = 54  // { int|sys||ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REVOKE               = 56  // { int|sys||revoke(const char *path); }\n\tSYS_SYMLINK              = 57  // { int|sys||symlink(const char *path, const char *link); }\n\tSYS_READLINK             = 58  // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE               = 59  // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK                = 60  // { mode_t|sys||umask(mode_t newmask); }\n\tSYS_CHROOT               = 61  // { int|sys||chroot(const char *path); }\n\tSYS_VFORK                = 66  // { int|sys||vfork(void); }\n\tSYS_SBRK                 = 69  // { int|sys||sbrk(intptr_t incr); }\n\tSYS_SSTK                 = 70  // { int|sys||sstk(int incr); }\n\tSYS_VADVISE              = 72  // { int|sys||ovadvise(int anom); }\n\tSYS_MUNMAP               = 73  // { int|sys||munmap(void *addr, size_t len); }\n\tSYS_MPROTECT             = 74  // { int|sys||mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE              = 75  // { int|sys||madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE              = 78  // { int|sys||mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS            = 79  // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS            = 80  // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP              = 81  // { int|sys||getpgrp(void); }\n\tSYS_SETPGID              = 82  // { int|sys||setpgid(pid_t pid, pid_t pgid); }\n\tSYS_DUP2                 = 90  // { int|sys||dup2(int from, int to); }\n\tSYS_FCNTL                = 92  // { int|sys||fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_FSYNC                = 95  // { int|sys||fsync(int fd); }\n\tSYS_SETPRIORITY          = 96  // { int|sys||setpriority(int which, id_t who, int prio); }\n\tSYS_CONNECT              = 98  // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETPRIORITY          = 100 // { int|sys||getpriority(int which, id_t who); }\n\tSYS_BIND                 = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT           = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN               = 106 // { int|sys||listen(int s, int backlog); }\n\tSYS_GETSOCKOPT           = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_READV                = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV               = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_FCHOWN               = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD               = 124 // { int|sys||fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID             = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID             = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME               = 128 // { int|sys||rename(const char *from, const char *to); }\n\tSYS_FLOCK                = 131 // { int|sys||flock(int fd, int how); }\n\tSYS_MKFIFO               = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO               = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN             = 134 // { int|sys||shutdown(int s, int how); }\n\tSYS_SOCKETPAIR           = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                = 136 // { int|sys||mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR                = 137 // { int|sys||rmdir(const char *path); }\n\tSYS_SETSID               = 147 // { int|sys||setsid(void); }\n\tSYS_SYSARCH              = 165 // { int|sys||sysarch(int op, void *parms); }\n\tSYS_PREAD                = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_PWRITE               = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_NTP_ADJTIME          = 176 // { int|sys||ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID               = 181 // { int|sys||setgid(gid_t gid); }\n\tSYS_SETEGID              = 182 // { int|sys||setegid(gid_t egid); }\n\tSYS_SETEUID              = 183 // { int|sys||seteuid(uid_t euid); }\n\tSYS_PATHCONF             = 191 // { long|sys||pathconf(const char *path, int name); }\n\tSYS_FPATHCONF            = 192 // { long|sys||fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT            = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT            = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP                 = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }\n\tSYS_LSEEK                = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }\n\tSYS_TRUNCATE             = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }\n\tSYS_FTRUNCATE            = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }\n\tSYS___SYSCTL             = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }\n\tSYS_MLOCK                = 203 // { int|sys||mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK              = 204 // { int|sys||munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE             = 205 // { int|sys||undelete(const char *path); }\n\tSYS_GETPGID              = 207 // { pid_t|sys||getpgid(pid_t pid); }\n\tSYS_REBOOT               = 208 // { int|sys||reboot(int opt, char *bootstr); }\n\tSYS_POLL                 = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET               = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_SEMCONFIG            = 223 // { int|sys||semconfig(int flag); }\n\tSYS_MSGGET               = 225 // { int|sys||msgget(key_t key, int msgflg); }\n\tSYS_MSGSND               = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV               = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                = 230 // { int|sys||shmdt(const void *shmaddr); }\n\tSYS_SHMGET               = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }\n\tSYS_TIMER_CREATE         = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }\n\tSYS_TIMER_DELETE         = 236 // { int|sys||timer_delete(timer_t timerid); }\n\tSYS_TIMER_GETOVERRUN     = 239 // { int|sys||timer_getoverrun(timer_t timerid); }\n\tSYS_FDATASYNC            = 241 // { int|sys||fdatasync(int fd); }\n\tSYS_MLOCKALL             = 242 // { int|sys||mlockall(int flags); }\n\tSYS_MUNLOCKALL           = 243 // { int|sys||munlockall(void); }\n\tSYS_SIGQUEUEINFO         = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }\n\tSYS_MODCTL               = 246 // { int|sys||modctl(int cmd, void *arg); }\n\tSYS___POSIX_RENAME       = 270 // { int|sys||__posix_rename(const char *from, const char *to); }\n\tSYS_SWAPCTL              = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }\n\tSYS_MINHERIT             = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }\n\tSYS_LCHMOD               = 274 // { int|sys||lchmod(const char *path, mode_t mode); }\n\tSYS_LCHOWN               = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_MSYNC                = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }\n\tSYS___POSIX_CHOWN        = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS___POSIX_FCHOWN       = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS___POSIX_LCHOWN       = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID               = 286 // { pid_t|sys||getsid(pid_t pid); }\n\tSYS___CLONE              = 287 // { pid_t|sys||__clone(int flags, void *stack); }\n\tSYS_FKTRACE              = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }\n\tSYS_PREADV               = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS_PWRITEV              = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS___GETCWD             = 296 // { int|sys||__getcwd(char *bufp, size_t length); }\n\tSYS_FCHROOT              = 297 // { int|sys||fchroot(int fd); }\n\tSYS_LCHFLAGS             = 304 // { int|sys||lchflags(const char *path, u_long flags); }\n\tSYS_ISSETUGID            = 305 // { int|sys||issetugid(void); }\n\tSYS_UTRACE               = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }\n\tSYS_GETCONTEXT           = 307 // { int|sys||getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT           = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }\n\tSYS__LWP_CREATE          = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }\n\tSYS__LWP_EXIT            = 310 // { int|sys||_lwp_exit(void); }\n\tSYS__LWP_SELF            = 311 // { lwpid_t|sys||_lwp_self(void); }\n\tSYS__LWP_WAIT            = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }\n\tSYS__LWP_SUSPEND         = 313 // { int|sys||_lwp_suspend(lwpid_t target); }\n\tSYS__LWP_CONTINUE        = 314 // { int|sys||_lwp_continue(lwpid_t target); }\n\tSYS__LWP_WAKEUP          = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }\n\tSYS__LWP_GETPRIVATE      = 316 // { void *|sys||_lwp_getprivate(void); }\n\tSYS__LWP_SETPRIVATE      = 317 // { void|sys||_lwp_setprivate(void *ptr); }\n\tSYS__LWP_KILL            = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }\n\tSYS__LWP_DETACH          = 319 // { int|sys||_lwp_detach(lwpid_t target); }\n\tSYS__LWP_UNPARK          = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }\n\tSYS__LWP_UNPARK_ALL      = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }\n\tSYS__LWP_SETNAME         = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }\n\tSYS__LWP_GETNAME         = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }\n\tSYS__LWP_CTL             = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }\n\tSYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }\n\tSYS_PMC_GET_INFO         = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }\n\tSYS_PMC_CONTROL          = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }\n\tSYS_RASCTL               = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }\n\tSYS_KQUEUE               = 344 // { int|sys||kqueue(void); }\n\tSYS__SCHED_SETPARAM      = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }\n\tSYS__SCHED_GETPARAM      = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }\n\tSYS__SCHED_SETAFFINITY   = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }\n\tSYS__SCHED_GETAFFINITY   = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }\n\tSYS_SCHED_YIELD          = 350 // { int|sys||sched_yield(void); }\n\tSYS_FSYNC_RANGE          = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }\n\tSYS_UUIDGEN              = 355 // { int|sys||uuidgen(struct uuid *store, int count); }\n\tSYS_GETVFSSTAT           = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }\n\tSYS_STATVFS1             = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }\n\tSYS_FSTATVFS1            = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }\n\tSYS_EXTATTRCTL           = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE     = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE     = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE  = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FD       = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD       = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD    = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_LINK     = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK     = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK  = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_LIST_FD      = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE    = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK    = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_SETXATTR             = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_LSETXATTR            = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_FSETXATTR            = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }\n\tSYS_GETXATTR             = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_LGETXATTR            = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_FGETXATTR            = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }\n\tSYS_LISTXATTR            = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }\n\tSYS_LLISTXATTR           = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }\n\tSYS_FLISTXATTR           = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }\n\tSYS_REMOVEXATTR          = 384 // { int|sys||removexattr(const char *path, const char *name); }\n\tSYS_LREMOVEXATTR         = 385 // { int|sys||lremovexattr(const char *path, const char *name); }\n\tSYS_FREMOVEXATTR         = 386 // { int|sys||fremovexattr(int fd, const char *name); }\n\tSYS_GETDENTS             = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }\n\tSYS_SOCKET               = 394 // { int|sys|30|socket(int domain, int type, int protocol); }\n\tSYS_GETFH                = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }\n\tSYS_MOUNT                = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }\n\tSYS_MREMAP               = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }\n\tSYS_PSET_CREATE          = 412 // { int|sys||pset_create(psetid_t *psid); }\n\tSYS_PSET_DESTROY         = 413 // { int|sys||pset_destroy(psetid_t psid); }\n\tSYS_PSET_ASSIGN          = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }\n\tSYS__PSET_BIND           = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }\n\tSYS_POSIX_FADVISE        = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }\n\tSYS_SELECT               = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_GETTIMEOFDAY         = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }\n\tSYS_SETTIMEOFDAY         = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }\n\tSYS_UTIMES               = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }\n\tSYS_ADJTIME              = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_FUTIMES              = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }\n\tSYS_LUTIMES              = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }\n\tSYS_SETITIMER            = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER            = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }\n\tSYS_CLOCK_GETTIME        = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME        = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES         = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_NANOSLEEP            = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS___SIGTIMEDWAIT       = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }\n\tSYS__LWP_PARK            = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }\n\tSYS_KEVENT               = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }\n\tSYS_PSELECT              = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_POLLTS               = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_STAT                 = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }\n\tSYS_FSTAT                = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }\n\tSYS_LSTAT                = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }\n\tSYS___SEMCTL             = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }\n\tSYS_SHMCTL               = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL               = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_GETRUSAGE            = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }\n\tSYS_TIMER_SETTIME        = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_TIMER_GETTIME        = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }\n\tSYS_NTP_GETTIME          = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_WAIT4                = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_MKNOD                = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_FHSTAT               = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }\n\tSYS_PIPE2                = 453 // { int|sys||pipe2(int *fildes, int flags); }\n\tSYS_DUP3                 = 454 // { int|sys||dup3(int from, int to, int flags); }\n\tSYS_KQUEUE1              = 455 // { int|sys||kqueue1(int flags); }\n\tSYS_PACCEPT              = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }\n\tSYS_LINKAT               = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }\n\tSYS_RENAMEAT             = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_MKFIFOAT             = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT              = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }\n\tSYS_MKDIRAT              = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_FACCESSAT            = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT             = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT             = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }\n\tSYS_FEXECVE              = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }\n\tSYS_FSTATAT              = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_UTIMENSAT            = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }\n\tSYS_OPENAT               = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }\n\tSYS_READLINKAT           = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }\n\tSYS_SYMLINKAT            = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }\n\tSYS_UNLINKAT             = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }\n\tSYS_FUTIMENS             = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }\n\tSYS___QUOTACTL           = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }\n\tSYS_POSIX_SPAWN          = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }\n\tSYS_RECVMMSG             = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }\n\tSYS_SENDMMSG             = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go",
    "content": "// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && netbsd\n\npackage unix\n\nconst (\n\tSYS_EXIT                 = 1   // { void|sys||exit(int rval); }\n\tSYS_FORK                 = 2   // { int|sys||fork(void); }\n\tSYS_READ                 = 3   // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                = 4   // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                 = 5   // { int|sys||open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE                = 6   // { int|sys||close(int fd); }\n\tSYS_LINK                 = 9   // { int|sys||link(const char *path, const char *link); }\n\tSYS_UNLINK               = 10  // { int|sys||unlink(const char *path); }\n\tSYS_CHDIR                = 12  // { int|sys||chdir(const char *path); }\n\tSYS_FCHDIR               = 13  // { int|sys||fchdir(int fd); }\n\tSYS_CHMOD                = 15  // { int|sys||chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN                = 16  // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_BREAK                = 17  // { int|sys||obreak(char *nsize); }\n\tSYS_GETPID               = 20  // { pid_t|sys||getpid_with_ppid(void); }\n\tSYS_UNMOUNT              = 22  // { int|sys||unmount(const char *path, int flags); }\n\tSYS_SETUID               = 23  // { int|sys||setuid(uid_t uid); }\n\tSYS_GETUID               = 24  // { uid_t|sys||getuid_with_euid(void); }\n\tSYS_GETEUID              = 25  // { uid_t|sys||geteuid(void); }\n\tSYS_PTRACE               = 26  // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }\n\tSYS_RECVMSG              = 27  // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG              = 28  // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM             = 29  // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT               = 30  // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME          = 31  // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME          = 32  // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS               = 33  // { int|sys||access(const char *path, int flags); }\n\tSYS_CHFLAGS              = 34  // { int|sys||chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS             = 35  // { int|sys||fchflags(int fd, u_long flags); }\n\tSYS_SYNC                 = 36  // { void|sys||sync(void); }\n\tSYS_KILL                 = 37  // { int|sys||kill(pid_t pid, int signum); }\n\tSYS_GETPPID              = 39  // { pid_t|sys||getppid(void); }\n\tSYS_DUP                  = 41  // { int|sys||dup(int fd); }\n\tSYS_PIPE                 = 42  // { int|sys||pipe(void); }\n\tSYS_GETEGID              = 43  // { gid_t|sys||getegid(void); }\n\tSYS_PROFIL               = 44  // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE               = 45  // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_GETGID               = 47  // { gid_t|sys||getgid_with_egid(void); }\n\tSYS___GETLOGIN           = 49  // { int|sys||__getlogin(char *namebuf, size_t namelen); }\n\tSYS___SETLOGIN           = 50  // { int|sys||__setlogin(const char *namebuf); }\n\tSYS_ACCT                 = 51  // { int|sys||acct(const char *path); }\n\tSYS_IOCTL                = 54  // { int|sys||ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REVOKE               = 56  // { int|sys||revoke(const char *path); }\n\tSYS_SYMLINK              = 57  // { int|sys||symlink(const char *path, const char *link); }\n\tSYS_READLINK             = 58  // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE               = 59  // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK                = 60  // { mode_t|sys||umask(mode_t newmask); }\n\tSYS_CHROOT               = 61  // { int|sys||chroot(const char *path); }\n\tSYS_VFORK                = 66  // { int|sys||vfork(void); }\n\tSYS_SBRK                 = 69  // { int|sys||sbrk(intptr_t incr); }\n\tSYS_SSTK                 = 70  // { int|sys||sstk(int incr); }\n\tSYS_VADVISE              = 72  // { int|sys||ovadvise(int anom); }\n\tSYS_MUNMAP               = 73  // { int|sys||munmap(void *addr, size_t len); }\n\tSYS_MPROTECT             = 74  // { int|sys||mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE              = 75  // { int|sys||madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE              = 78  // { int|sys||mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS            = 79  // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS            = 80  // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP              = 81  // { int|sys||getpgrp(void); }\n\tSYS_SETPGID              = 82  // { int|sys||setpgid(pid_t pid, pid_t pgid); }\n\tSYS_DUP2                 = 90  // { int|sys||dup2(int from, int to); }\n\tSYS_FCNTL                = 92  // { int|sys||fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_FSYNC                = 95  // { int|sys||fsync(int fd); }\n\tSYS_SETPRIORITY          = 96  // { int|sys||setpriority(int which, id_t who, int prio); }\n\tSYS_CONNECT              = 98  // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETPRIORITY          = 100 // { int|sys||getpriority(int which, id_t who); }\n\tSYS_BIND                 = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT           = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN               = 106 // { int|sys||listen(int s, int backlog); }\n\tSYS_GETSOCKOPT           = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_READV                = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV               = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_FCHOWN               = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD               = 124 // { int|sys||fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID             = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID             = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME               = 128 // { int|sys||rename(const char *from, const char *to); }\n\tSYS_FLOCK                = 131 // { int|sys||flock(int fd, int how); }\n\tSYS_MKFIFO               = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO               = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN             = 134 // { int|sys||shutdown(int s, int how); }\n\tSYS_SOCKETPAIR           = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                = 136 // { int|sys||mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR                = 137 // { int|sys||rmdir(const char *path); }\n\tSYS_SETSID               = 147 // { int|sys||setsid(void); }\n\tSYS_SYSARCH              = 165 // { int|sys||sysarch(int op, void *parms); }\n\tSYS_PREAD                = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_PWRITE               = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_NTP_ADJTIME          = 176 // { int|sys||ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID               = 181 // { int|sys||setgid(gid_t gid); }\n\tSYS_SETEGID              = 182 // { int|sys||setegid(gid_t egid); }\n\tSYS_SETEUID              = 183 // { int|sys||seteuid(uid_t euid); }\n\tSYS_PATHCONF             = 191 // { long|sys||pathconf(const char *path, int name); }\n\tSYS_FPATHCONF            = 192 // { long|sys||fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT            = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT            = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP                 = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }\n\tSYS_LSEEK                = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }\n\tSYS_TRUNCATE             = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }\n\tSYS_FTRUNCATE            = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }\n\tSYS___SYSCTL             = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }\n\tSYS_MLOCK                = 203 // { int|sys||mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK              = 204 // { int|sys||munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE             = 205 // { int|sys||undelete(const char *path); }\n\tSYS_GETPGID              = 207 // { pid_t|sys||getpgid(pid_t pid); }\n\tSYS_REBOOT               = 208 // { int|sys||reboot(int opt, char *bootstr); }\n\tSYS_POLL                 = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET               = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_SEMCONFIG            = 223 // { int|sys||semconfig(int flag); }\n\tSYS_MSGGET               = 225 // { int|sys||msgget(key_t key, int msgflg); }\n\tSYS_MSGSND               = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV               = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                = 230 // { int|sys||shmdt(const void *shmaddr); }\n\tSYS_SHMGET               = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }\n\tSYS_TIMER_CREATE         = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }\n\tSYS_TIMER_DELETE         = 236 // { int|sys||timer_delete(timer_t timerid); }\n\tSYS_TIMER_GETOVERRUN     = 239 // { int|sys||timer_getoverrun(timer_t timerid); }\n\tSYS_FDATASYNC            = 241 // { int|sys||fdatasync(int fd); }\n\tSYS_MLOCKALL             = 242 // { int|sys||mlockall(int flags); }\n\tSYS_MUNLOCKALL           = 243 // { int|sys||munlockall(void); }\n\tSYS_SIGQUEUEINFO         = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }\n\tSYS_MODCTL               = 246 // { int|sys||modctl(int cmd, void *arg); }\n\tSYS___POSIX_RENAME       = 270 // { int|sys||__posix_rename(const char *from, const char *to); }\n\tSYS_SWAPCTL              = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }\n\tSYS_MINHERIT             = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }\n\tSYS_LCHMOD               = 274 // { int|sys||lchmod(const char *path, mode_t mode); }\n\tSYS_LCHOWN               = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_MSYNC                = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }\n\tSYS___POSIX_CHOWN        = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS___POSIX_FCHOWN       = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS___POSIX_LCHOWN       = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID               = 286 // { pid_t|sys||getsid(pid_t pid); }\n\tSYS___CLONE              = 287 // { pid_t|sys||__clone(int flags, void *stack); }\n\tSYS_FKTRACE              = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }\n\tSYS_PREADV               = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS_PWRITEV              = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS___GETCWD             = 296 // { int|sys||__getcwd(char *bufp, size_t length); }\n\tSYS_FCHROOT              = 297 // { int|sys||fchroot(int fd); }\n\tSYS_LCHFLAGS             = 304 // { int|sys||lchflags(const char *path, u_long flags); }\n\tSYS_ISSETUGID            = 305 // { int|sys||issetugid(void); }\n\tSYS_UTRACE               = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }\n\tSYS_GETCONTEXT           = 307 // { int|sys||getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT           = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }\n\tSYS__LWP_CREATE          = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }\n\tSYS__LWP_EXIT            = 310 // { int|sys||_lwp_exit(void); }\n\tSYS__LWP_SELF            = 311 // { lwpid_t|sys||_lwp_self(void); }\n\tSYS__LWP_WAIT            = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }\n\tSYS__LWP_SUSPEND         = 313 // { int|sys||_lwp_suspend(lwpid_t target); }\n\tSYS__LWP_CONTINUE        = 314 // { int|sys||_lwp_continue(lwpid_t target); }\n\tSYS__LWP_WAKEUP          = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }\n\tSYS__LWP_GETPRIVATE      = 316 // { void *|sys||_lwp_getprivate(void); }\n\tSYS__LWP_SETPRIVATE      = 317 // { void|sys||_lwp_setprivate(void *ptr); }\n\tSYS__LWP_KILL            = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }\n\tSYS__LWP_DETACH          = 319 // { int|sys||_lwp_detach(lwpid_t target); }\n\tSYS__LWP_UNPARK          = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }\n\tSYS__LWP_UNPARK_ALL      = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }\n\tSYS__LWP_SETNAME         = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }\n\tSYS__LWP_GETNAME         = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }\n\tSYS__LWP_CTL             = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }\n\tSYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }\n\tSYS_PMC_GET_INFO         = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }\n\tSYS_PMC_CONTROL          = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }\n\tSYS_RASCTL               = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }\n\tSYS_KQUEUE               = 344 // { int|sys||kqueue(void); }\n\tSYS__SCHED_SETPARAM      = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }\n\tSYS__SCHED_GETPARAM      = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }\n\tSYS__SCHED_SETAFFINITY   = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }\n\tSYS__SCHED_GETAFFINITY   = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }\n\tSYS_SCHED_YIELD          = 350 // { int|sys||sched_yield(void); }\n\tSYS_FSYNC_RANGE          = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }\n\tSYS_UUIDGEN              = 355 // { int|sys||uuidgen(struct uuid *store, int count); }\n\tSYS_GETVFSSTAT           = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }\n\tSYS_STATVFS1             = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }\n\tSYS_FSTATVFS1            = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }\n\tSYS_EXTATTRCTL           = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE     = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE     = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE  = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FD       = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD       = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD    = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_LINK     = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK     = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK  = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_LIST_FD      = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE    = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK    = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_SETXATTR             = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_LSETXATTR            = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_FSETXATTR            = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }\n\tSYS_GETXATTR             = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_LGETXATTR            = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_FGETXATTR            = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }\n\tSYS_LISTXATTR            = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }\n\tSYS_LLISTXATTR           = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }\n\tSYS_FLISTXATTR           = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }\n\tSYS_REMOVEXATTR          = 384 // { int|sys||removexattr(const char *path, const char *name); }\n\tSYS_LREMOVEXATTR         = 385 // { int|sys||lremovexattr(const char *path, const char *name); }\n\tSYS_FREMOVEXATTR         = 386 // { int|sys||fremovexattr(int fd, const char *name); }\n\tSYS_GETDENTS             = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }\n\tSYS_SOCKET               = 394 // { int|sys|30|socket(int domain, int type, int protocol); }\n\tSYS_GETFH                = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }\n\tSYS_MOUNT                = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }\n\tSYS_MREMAP               = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }\n\tSYS_PSET_CREATE          = 412 // { int|sys||pset_create(psetid_t *psid); }\n\tSYS_PSET_DESTROY         = 413 // { int|sys||pset_destroy(psetid_t psid); }\n\tSYS_PSET_ASSIGN          = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }\n\tSYS__PSET_BIND           = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }\n\tSYS_POSIX_FADVISE        = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }\n\tSYS_SELECT               = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_GETTIMEOFDAY         = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }\n\tSYS_SETTIMEOFDAY         = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }\n\tSYS_UTIMES               = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }\n\tSYS_ADJTIME              = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_FUTIMES              = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }\n\tSYS_LUTIMES              = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }\n\tSYS_SETITIMER            = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER            = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }\n\tSYS_CLOCK_GETTIME        = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME        = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES         = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_NANOSLEEP            = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS___SIGTIMEDWAIT       = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }\n\tSYS__LWP_PARK            = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }\n\tSYS_KEVENT               = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }\n\tSYS_PSELECT              = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_POLLTS               = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_STAT                 = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }\n\tSYS_FSTAT                = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }\n\tSYS_LSTAT                = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }\n\tSYS___SEMCTL             = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }\n\tSYS_SHMCTL               = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL               = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_GETRUSAGE            = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }\n\tSYS_TIMER_SETTIME        = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_TIMER_GETTIME        = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }\n\tSYS_NTP_GETTIME          = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_WAIT4                = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_MKNOD                = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_FHSTAT               = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }\n\tSYS_PIPE2                = 453 // { int|sys||pipe2(int *fildes, int flags); }\n\tSYS_DUP3                 = 454 // { int|sys||dup3(int from, int to, int flags); }\n\tSYS_KQUEUE1              = 455 // { int|sys||kqueue1(int flags); }\n\tSYS_PACCEPT              = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }\n\tSYS_LINKAT               = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }\n\tSYS_RENAMEAT             = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_MKFIFOAT             = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT              = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }\n\tSYS_MKDIRAT              = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_FACCESSAT            = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT             = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT             = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }\n\tSYS_FEXECVE              = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }\n\tSYS_FSTATAT              = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_UTIMENSAT            = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }\n\tSYS_OPENAT               = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }\n\tSYS_READLINKAT           = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }\n\tSYS_SYMLINKAT            = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }\n\tSYS_UNLINKAT             = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }\n\tSYS_FUTIMENS             = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }\n\tSYS___QUOTACTL           = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }\n\tSYS_POSIX_SPAWN          = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }\n\tSYS_RECVMMSG             = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }\n\tSYS_SENDMMSG             = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go",
    "content": "// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; DO NOT EDIT.\n\n//go:build arm64 && netbsd\n\npackage unix\n\nconst (\n\tSYS_EXIT                 = 1   // { void|sys||exit(int rval); }\n\tSYS_FORK                 = 2   // { int|sys||fork(void); }\n\tSYS_READ                 = 3   // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE                = 4   // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN                 = 5   // { int|sys||open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE                = 6   // { int|sys||close(int fd); }\n\tSYS_LINK                 = 9   // { int|sys||link(const char *path, const char *link); }\n\tSYS_UNLINK               = 10  // { int|sys||unlink(const char *path); }\n\tSYS_CHDIR                = 12  // { int|sys||chdir(const char *path); }\n\tSYS_FCHDIR               = 13  // { int|sys||fchdir(int fd); }\n\tSYS_CHMOD                = 15  // { int|sys||chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN                = 16  // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_BREAK                = 17  // { int|sys||obreak(char *nsize); }\n\tSYS_GETPID               = 20  // { pid_t|sys||getpid_with_ppid(void); }\n\tSYS_UNMOUNT              = 22  // { int|sys||unmount(const char *path, int flags); }\n\tSYS_SETUID               = 23  // { int|sys||setuid(uid_t uid); }\n\tSYS_GETUID               = 24  // { uid_t|sys||getuid_with_euid(void); }\n\tSYS_GETEUID              = 25  // { uid_t|sys||geteuid(void); }\n\tSYS_PTRACE               = 26  // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }\n\tSYS_RECVMSG              = 27  // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG              = 28  // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM             = 29  // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT               = 30  // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME          = 31  // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME          = 32  // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS               = 33  // { int|sys||access(const char *path, int flags); }\n\tSYS_CHFLAGS              = 34  // { int|sys||chflags(const char *path, u_long flags); }\n\tSYS_FCHFLAGS             = 35  // { int|sys||fchflags(int fd, u_long flags); }\n\tSYS_SYNC                 = 36  // { void|sys||sync(void); }\n\tSYS_KILL                 = 37  // { int|sys||kill(pid_t pid, int signum); }\n\tSYS_GETPPID              = 39  // { pid_t|sys||getppid(void); }\n\tSYS_DUP                  = 41  // { int|sys||dup(int fd); }\n\tSYS_PIPE                 = 42  // { int|sys||pipe(void); }\n\tSYS_GETEGID              = 43  // { gid_t|sys||getegid(void); }\n\tSYS_PROFIL               = 44  // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE               = 45  // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_GETGID               = 47  // { gid_t|sys||getgid_with_egid(void); }\n\tSYS___GETLOGIN           = 49  // { int|sys||__getlogin(char *namebuf, size_t namelen); }\n\tSYS___SETLOGIN           = 50  // { int|sys||__setlogin(const char *namebuf); }\n\tSYS_ACCT                 = 51  // { int|sys||acct(const char *path); }\n\tSYS_IOCTL                = 54  // { int|sys||ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REVOKE               = 56  // { int|sys||revoke(const char *path); }\n\tSYS_SYMLINK              = 57  // { int|sys||symlink(const char *path, const char *link); }\n\tSYS_READLINK             = 58  // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE               = 59  // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK                = 60  // { mode_t|sys||umask(mode_t newmask); }\n\tSYS_CHROOT               = 61  // { int|sys||chroot(const char *path); }\n\tSYS_VFORK                = 66  // { int|sys||vfork(void); }\n\tSYS_SBRK                 = 69  // { int|sys||sbrk(intptr_t incr); }\n\tSYS_SSTK                 = 70  // { int|sys||sstk(int incr); }\n\tSYS_VADVISE              = 72  // { int|sys||ovadvise(int anom); }\n\tSYS_MUNMAP               = 73  // { int|sys||munmap(void *addr, size_t len); }\n\tSYS_MPROTECT             = 74  // { int|sys||mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE              = 75  // { int|sys||madvise(void *addr, size_t len, int behav); }\n\tSYS_MINCORE              = 78  // { int|sys||mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS            = 79  // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS            = 80  // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP              = 81  // { int|sys||getpgrp(void); }\n\tSYS_SETPGID              = 82  // { int|sys||setpgid(pid_t pid, pid_t pgid); }\n\tSYS_DUP2                 = 90  // { int|sys||dup2(int from, int to); }\n\tSYS_FCNTL                = 92  // { int|sys||fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_FSYNC                = 95  // { int|sys||fsync(int fd); }\n\tSYS_SETPRIORITY          = 96  // { int|sys||setpriority(int which, id_t who, int prio); }\n\tSYS_CONNECT              = 98  // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETPRIORITY          = 100 // { int|sys||getpriority(int which, id_t who); }\n\tSYS_BIND                 = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT           = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN               = 106 // { int|sys||listen(int s, int backlog); }\n\tSYS_GETSOCKOPT           = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_READV                = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV               = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_FCHOWN               = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD               = 124 // { int|sys||fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID             = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID             = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME               = 128 // { int|sys||rename(const char *from, const char *to); }\n\tSYS_FLOCK                = 131 // { int|sys||flock(int fd, int how); }\n\tSYS_MKFIFO               = 132 // { int|sys||mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO               = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN             = 134 // { int|sys||shutdown(int s, int how); }\n\tSYS_SOCKETPAIR           = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR                = 136 // { int|sys||mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR                = 137 // { int|sys||rmdir(const char *path); }\n\tSYS_SETSID               = 147 // { int|sys||setsid(void); }\n\tSYS_SYSARCH              = 165 // { int|sys||sysarch(int op, void *parms); }\n\tSYS_PREAD                = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_PWRITE               = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }\n\tSYS_NTP_ADJTIME          = 176 // { int|sys||ntp_adjtime(struct timex *tp); }\n\tSYS_SETGID               = 181 // { int|sys||setgid(gid_t gid); }\n\tSYS_SETEGID              = 182 // { int|sys||setegid(gid_t egid); }\n\tSYS_SETEUID              = 183 // { int|sys||seteuid(uid_t euid); }\n\tSYS_PATHCONF             = 191 // { long|sys||pathconf(const char *path, int name); }\n\tSYS_FPATHCONF            = 192 // { long|sys||fpathconf(int fd, int name); }\n\tSYS_GETRLIMIT            = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT            = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP                 = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }\n\tSYS_LSEEK                = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }\n\tSYS_TRUNCATE             = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }\n\tSYS_FTRUNCATE            = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }\n\tSYS___SYSCTL             = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }\n\tSYS_MLOCK                = 203 // { int|sys||mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK              = 204 // { int|sys||munlock(const void *addr, size_t len); }\n\tSYS_UNDELETE             = 205 // { int|sys||undelete(const char *path); }\n\tSYS_GETPGID              = 207 // { pid_t|sys||getpgid(pid_t pid); }\n\tSYS_REBOOT               = 208 // { int|sys||reboot(int opt, char *bootstr); }\n\tSYS_POLL                 = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_SEMGET               = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }\n\tSYS_SEMOP                = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_SEMCONFIG            = 223 // { int|sys||semconfig(int flag); }\n\tSYS_MSGGET               = 225 // { int|sys||msgget(key_t key, int msgflg); }\n\tSYS_MSGSND               = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV               = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT                = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT                = 230 // { int|sys||shmdt(const void *shmaddr); }\n\tSYS_SHMGET               = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }\n\tSYS_TIMER_CREATE         = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }\n\tSYS_TIMER_DELETE         = 236 // { int|sys||timer_delete(timer_t timerid); }\n\tSYS_TIMER_GETOVERRUN     = 239 // { int|sys||timer_getoverrun(timer_t timerid); }\n\tSYS_FDATASYNC            = 241 // { int|sys||fdatasync(int fd); }\n\tSYS_MLOCKALL             = 242 // { int|sys||mlockall(int flags); }\n\tSYS_MUNLOCKALL           = 243 // { int|sys||munlockall(void); }\n\tSYS_SIGQUEUEINFO         = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }\n\tSYS_MODCTL               = 246 // { int|sys||modctl(int cmd, void *arg); }\n\tSYS___POSIX_RENAME       = 270 // { int|sys||__posix_rename(const char *from, const char *to); }\n\tSYS_SWAPCTL              = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }\n\tSYS_MINHERIT             = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }\n\tSYS_LCHMOD               = 274 // { int|sys||lchmod(const char *path, mode_t mode); }\n\tSYS_LCHOWN               = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_MSYNC                = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }\n\tSYS___POSIX_CHOWN        = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS___POSIX_FCHOWN       = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS___POSIX_LCHOWN       = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID               = 286 // { pid_t|sys||getsid(pid_t pid); }\n\tSYS___CLONE              = 287 // { pid_t|sys||__clone(int flags, void *stack); }\n\tSYS_FKTRACE              = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }\n\tSYS_PREADV               = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS_PWRITEV              = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }\n\tSYS___GETCWD             = 296 // { int|sys||__getcwd(char *bufp, size_t length); }\n\tSYS_FCHROOT              = 297 // { int|sys||fchroot(int fd); }\n\tSYS_LCHFLAGS             = 304 // { int|sys||lchflags(const char *path, u_long flags); }\n\tSYS_ISSETUGID            = 305 // { int|sys||issetugid(void); }\n\tSYS_UTRACE               = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }\n\tSYS_GETCONTEXT           = 307 // { int|sys||getcontext(struct __ucontext *ucp); }\n\tSYS_SETCONTEXT           = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }\n\tSYS__LWP_CREATE          = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }\n\tSYS__LWP_EXIT            = 310 // { int|sys||_lwp_exit(void); }\n\tSYS__LWP_SELF            = 311 // { lwpid_t|sys||_lwp_self(void); }\n\tSYS__LWP_WAIT            = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }\n\tSYS__LWP_SUSPEND         = 313 // { int|sys||_lwp_suspend(lwpid_t target); }\n\tSYS__LWP_CONTINUE        = 314 // { int|sys||_lwp_continue(lwpid_t target); }\n\tSYS__LWP_WAKEUP          = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }\n\tSYS__LWP_GETPRIVATE      = 316 // { void *|sys||_lwp_getprivate(void); }\n\tSYS__LWP_SETPRIVATE      = 317 // { void|sys||_lwp_setprivate(void *ptr); }\n\tSYS__LWP_KILL            = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }\n\tSYS__LWP_DETACH          = 319 // { int|sys||_lwp_detach(lwpid_t target); }\n\tSYS__LWP_UNPARK          = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }\n\tSYS__LWP_UNPARK_ALL      = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }\n\tSYS__LWP_SETNAME         = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }\n\tSYS__LWP_GETNAME         = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }\n\tSYS__LWP_CTL             = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }\n\tSYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }\n\tSYS_PMC_GET_INFO         = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }\n\tSYS_PMC_CONTROL          = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }\n\tSYS_RASCTL               = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }\n\tSYS_KQUEUE               = 344 // { int|sys||kqueue(void); }\n\tSYS__SCHED_SETPARAM      = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }\n\tSYS__SCHED_GETPARAM      = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }\n\tSYS__SCHED_SETAFFINITY   = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }\n\tSYS__SCHED_GETAFFINITY   = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }\n\tSYS_SCHED_YIELD          = 350 // { int|sys||sched_yield(void); }\n\tSYS_FSYNC_RANGE          = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }\n\tSYS_UUIDGEN              = 355 // { int|sys||uuidgen(struct uuid *store, int count); }\n\tSYS_GETVFSSTAT           = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }\n\tSYS_STATVFS1             = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }\n\tSYS_FSTATVFS1            = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }\n\tSYS_EXTATTRCTL           = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FILE     = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FILE     = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FILE  = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_FD       = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_FD       = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_FD    = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_SET_LINK     = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }\n\tSYS_EXTATTR_GET_LINK     = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }\n\tSYS_EXTATTR_DELETE_LINK  = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }\n\tSYS_EXTATTR_LIST_FD      = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_FILE    = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_EXTATTR_LIST_LINK    = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }\n\tSYS_SETXATTR             = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_LSETXATTR            = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }\n\tSYS_FSETXATTR            = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }\n\tSYS_GETXATTR             = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_LGETXATTR            = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }\n\tSYS_FGETXATTR            = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }\n\tSYS_LISTXATTR            = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }\n\tSYS_LLISTXATTR           = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }\n\tSYS_FLISTXATTR           = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }\n\tSYS_REMOVEXATTR          = 384 // { int|sys||removexattr(const char *path, const char *name); }\n\tSYS_LREMOVEXATTR         = 385 // { int|sys||lremovexattr(const char *path, const char *name); }\n\tSYS_FREMOVEXATTR         = 386 // { int|sys||fremovexattr(int fd, const char *name); }\n\tSYS_GETDENTS             = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }\n\tSYS_SOCKET               = 394 // { int|sys|30|socket(int domain, int type, int protocol); }\n\tSYS_GETFH                = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }\n\tSYS_MOUNT                = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }\n\tSYS_MREMAP               = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }\n\tSYS_PSET_CREATE          = 412 // { int|sys||pset_create(psetid_t *psid); }\n\tSYS_PSET_DESTROY         = 413 // { int|sys||pset_destroy(psetid_t psid); }\n\tSYS_PSET_ASSIGN          = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }\n\tSYS__PSET_BIND           = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }\n\tSYS_POSIX_FADVISE        = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }\n\tSYS_SELECT               = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_GETTIMEOFDAY         = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }\n\tSYS_SETTIMEOFDAY         = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }\n\tSYS_UTIMES               = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }\n\tSYS_ADJTIME              = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_FUTIMES              = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }\n\tSYS_LUTIMES              = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }\n\tSYS_SETITIMER            = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER            = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }\n\tSYS_CLOCK_GETTIME        = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME        = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES         = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_NANOSLEEP            = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS___SIGTIMEDWAIT       = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }\n\tSYS__LWP_PARK            = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }\n\tSYS_KEVENT               = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }\n\tSYS_PSELECT              = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_POLLTS               = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_STAT                 = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }\n\tSYS_FSTAT                = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }\n\tSYS_LSTAT                = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }\n\tSYS___SEMCTL             = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }\n\tSYS_SHMCTL               = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL               = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_GETRUSAGE            = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }\n\tSYS_TIMER_SETTIME        = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }\n\tSYS_TIMER_GETTIME        = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }\n\tSYS_NTP_GETTIME          = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }\n\tSYS_WAIT4                = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_MKNOD                = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_FHSTAT               = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }\n\tSYS_PIPE2                = 453 // { int|sys||pipe2(int *fildes, int flags); }\n\tSYS_DUP3                 = 454 // { int|sys||dup3(int from, int to, int flags); }\n\tSYS_KQUEUE1              = 455 // { int|sys||kqueue1(int flags); }\n\tSYS_PACCEPT              = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }\n\tSYS_LINKAT               = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }\n\tSYS_RENAMEAT             = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_MKFIFOAT             = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT              = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }\n\tSYS_MKDIRAT              = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_FACCESSAT            = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT             = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT             = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }\n\tSYS_FEXECVE              = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }\n\tSYS_FSTATAT              = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_UTIMENSAT            = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }\n\tSYS_OPENAT               = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }\n\tSYS_READLINKAT           = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }\n\tSYS_SYMLINKAT            = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }\n\tSYS_UNLINKAT             = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }\n\tSYS_FUTIMENS             = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }\n\tSYS___QUOTACTL           = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }\n\tSYS_POSIX_SPAWN          = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }\n\tSYS_RECVMMSG             = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }\n\tSYS_SENDMMSG             = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_MINCORE        = 78  // { int sys_mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_MINCORE        = 78  // { int sys_mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_MINCORE        = 78  // { int sys_mincore(void *addr, size_t len, char *vec); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_MSYSCALL       = 37  // { int sys_msyscall(void *addr, size_t len); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS___REALPATH     = 115 // { int sys___realpath(const char *pathname, char *resolved); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS___TMPFD        = 164 // { int sys___tmpfd(int flags); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && openbsd\n\npackage unix\n\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go",
    "content": "// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && openbsd\n\npackage unix\n\n// Deprecated: Use libc wrappers instead of direct syscalls.\nconst (\n\tSYS_EXIT           = 1   // { void sys_exit(int rval); }\n\tSYS_FORK           = 2   // { int sys_fork(void); }\n\tSYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }\n\tSYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }\n\tSYS_OPEN           = 5   // { int sys_open(const char *path, int flags, ... mode_t mode); }\n\tSYS_CLOSE          = 6   // { int sys_close(int fd); }\n\tSYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }\n\tSYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, size_t psize); }\n\tSYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }\n\tSYS_UNLINK         = 10  // { int sys_unlink(const char *path); }\n\tSYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }\n\tSYS_CHDIR          = 12  // { int sys_chdir(const char *path); }\n\tSYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }\n\tSYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }\n\tSYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }\n\tSYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break\n\tSYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }\n\tSYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, struct rusage *rusage); }\n\tSYS_GETPID         = 20  // { pid_t sys_getpid(void); }\n\tSYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, int flags, void *data); }\n\tSYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }\n\tSYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }\n\tSYS_GETUID         = 24  // { uid_t sys_getuid(void); }\n\tSYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }\n\tSYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }\n\tSYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }\n\tSYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }\n\tSYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }\n\tSYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }\n\tSYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }\n\tSYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }\n\tSYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }\n\tSYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }\n\tSYS_SYNC           = 36  // { void sys_sync(void); }\n\tSYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }\n\tSYS_GETPPID        = 39  // { pid_t sys_getppid(void); }\n\tSYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }\n\tSYS_DUP            = 41  // { int sys_dup(int fd); }\n\tSYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }\n\tSYS_GETEGID        = 43  // { gid_t sys_getegid(void); }\n\tSYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }\n\tSYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }\n\tSYS_SIGACTION      = 46  // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }\n\tSYS_GETGID         = 47  // { gid_t sys_getgid(void); }\n\tSYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }\n\tSYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }\n\tSYS_ACCT           = 51  // { int sys_acct(const char *path); }\n\tSYS_SIGPENDING     = 52  // { int sys_sigpending(void); }\n\tSYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }\n\tSYS_IOCTL          = 54  // { int sys_ioctl(int fd, u_long com, ... void *data); }\n\tSYS_REBOOT         = 55  // { int sys_reboot(int opt); }\n\tSYS_REVOKE         = 56  // { int sys_revoke(const char *path); }\n\tSYS_SYMLINK        = 57  // { int sys_symlink(const char *path, const char *link); }\n\tSYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }\n\tSYS_EXECVE         = 59  // { int sys_execve(const char *path, char * const *argp, char * const *envp); }\n\tSYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }\n\tSYS_CHROOT         = 61  // { int sys_chroot(const char *path); }\n\tSYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }\n\tSYS_STATFS         = 63  // { int sys_statfs(const char *path, struct statfs *buf); }\n\tSYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }\n\tSYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }\n\tSYS_VFORK          = 66  // { int sys_vfork(void); }\n\tSYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }\n\tSYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }\n\tSYS_SETITIMER      = 69  // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }\n\tSYS_GETITIMER      = 70  // { int sys_getitimer(int which, struct itimerval *itv); }\n\tSYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }\n\tSYS_KEVENT         = 72  // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }\n\tSYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }\n\tSYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, int prot); }\n\tSYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, int behav); }\n\tSYS_UTIMES         = 76  // { int sys_utimes(const char *path, const struct timeval *tptr); }\n\tSYS_FUTIMES        = 77  // { int sys_futimes(int fd, const struct timeval *tptr); }\n\tSYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, gid_t *gidset); }\n\tSYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }\n\tSYS_GETPGRP        = 81  // { int sys_getpgrp(void); }\n\tSYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }\n\tSYS_FUTEX          = 83  // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }\n\tSYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }\n\tSYS_FUTIMENS       = 85  // { int sys_futimens(int fd, const struct timespec *times); }\n\tSYS_KBIND          = 86  // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }\n\tSYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }\n\tSYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }\n\tSYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }\n\tSYS_DUP2           = 90  // { int sys_dup2(int from, int to); }\n\tSYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }\n\tSYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }\n\tSYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }\n\tSYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }\n\tSYS_FSYNC          = 95  // { int sys_fsync(int fd); }\n\tSYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }\n\tSYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }\n\tSYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }\n\tSYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }\n\tSYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }\n\tSYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }\n\tSYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }\n\tSYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }\n\tSYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }\n\tSYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }\n\tSYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }\n\tSYS_PLEDGE         = 108 // { int sys_pledge(const char *promises, const char *execpromises); }\n\tSYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }\n\tSYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }\n\tSYS_SENDSYSLOG     = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }\n\tSYS_UNVEIL         = 114 // { int sys_unveil(const char *path, const char *permissions); }\n\tSYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }\n\tSYS_THRKILL        = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }\n\tSYS_READV          = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }\n\tSYS_KILL           = 122 // { int sys_kill(int pid, int signum); }\n\tSYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }\n\tSYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }\n\tSYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }\n\tSYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }\n\tSYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }\n\tSYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }\n\tSYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }\n\tSYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }\n\tSYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }\n\tSYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }\n\tSYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }\n\tSYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }\n\tSYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }\n\tSYS_GETLOGIN_R     = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }\n\tSYS_SETSID         = 147 // { int sys_setsid(void); }\n\tSYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }\n\tSYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }\n\tSYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }\n\tSYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }\n\tSYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }\n\tSYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }\n\tSYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }\n\tSYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }\n\tSYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }\n\tSYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }\n\tSYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }\n\tSYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }\n\tSYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }\n\tSYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }\n\tSYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, off_t length); }\n\tSYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }\n\tSYS_SYSCTL         = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }\n\tSYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }\n\tSYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }\n\tSYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }\n\tSYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }\n\tSYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }\n\tSYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }\n\tSYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }\n\tSYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }\n\tSYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }\n\tSYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }\n\tSYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }\n\tSYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }\n\tSYS_ISSETUGID      = 253 // { int sys_issetugid(void); }\n\tSYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }\n\tSYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }\n\tSYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }\n\tSYS_PIPE           = 263 // { int sys_pipe(int *fdp); }\n\tSYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }\n\tSYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }\n\tSYS_KQUEUE         = 269 // { int sys_kqueue(void); }\n\tSYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }\n\tSYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }\n\tSYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }\n\tSYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }\n\tSYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }\n\tSYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }\n\tSYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }\n\tSYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }\n\tSYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }\n\tSYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }\n\tSYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }\n\tSYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }\n\tSYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }\n\tSYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }\n\tSYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }\n\tSYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }\n\tSYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }\n\tSYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }\n\tSYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }\n\tSYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }\n\tSYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }\n\tSYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }\n\tSYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }\n\tSYS_GETRTABLE      = 311 // { int sys_getrtable(void); }\n\tSYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }\n\tSYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }\n\tSYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }\n\tSYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }\n\tSYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }\n\tSYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }\n\tSYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }\n\tSYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }\n\tSYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }\n\tSYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }\n\tSYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }\n\tSYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }\n\tSYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }\n\tSYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go",
    "content": "// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build zos && s390x\n\npackage unix\n\nconst (\n\tSYS_LOG                             = 0x17  // 23\n\tSYS_COSH                            = 0x18  // 24\n\tSYS_TANH                            = 0x19  // 25\n\tSYS_EXP                             = 0x1A  // 26\n\tSYS_MODF                            = 0x1B  // 27\n\tSYS_LOG10                           = 0x1C  // 28\n\tSYS_FREXP                           = 0x1D  // 29\n\tSYS_LDEXP                           = 0x1E  // 30\n\tSYS_CEIL                            = 0x1F  // 31\n\tSYS_POW                             = 0x20  // 32\n\tSYS_SQRT                            = 0x21  // 33\n\tSYS_FLOOR                           = 0x22  // 34\n\tSYS_J1                              = 0x23  // 35\n\tSYS_FABS                            = 0x24  // 36\n\tSYS_FMOD                            = 0x25  // 37\n\tSYS_J0                              = 0x26  // 38\n\tSYS_YN                              = 0x27  // 39\n\tSYS_JN                              = 0x28  // 40\n\tSYS_Y0                              = 0x29  // 41\n\tSYS_Y1                              = 0x2A  // 42\n\tSYS_HYPOT                           = 0x2B  // 43\n\tSYS_ERF                             = 0x2C  // 44\n\tSYS_ERFC                            = 0x2D  // 45\n\tSYS_GAMMA                           = 0x2E  // 46\n\tSYS_ISALPHA                         = 0x30  // 48\n\tSYS_ISALNUM                         = 0x31  // 49\n\tSYS_ISLOWER                         = 0x32  // 50\n\tSYS_ISCNTRL                         = 0x33  // 51\n\tSYS_ISDIGIT                         = 0x34  // 52\n\tSYS_ISGRAPH                         = 0x35  // 53\n\tSYS_ISUPPER                         = 0x36  // 54\n\tSYS_ISPRINT                         = 0x37  // 55\n\tSYS_ISPUNCT                         = 0x38  // 56\n\tSYS_ISSPACE                         = 0x39  // 57\n\tSYS_SETLOCAL                        = 0x3A  // 58\n\tSYS_SETLOCALE                       = 0x3A  // 58\n\tSYS_ISXDIGIT                        = 0x3B  // 59\n\tSYS_TOLOWER                         = 0x3C  // 60\n\tSYS_TOUPPER                         = 0x3D  // 61\n\tSYS_ASIN                            = 0x3E  // 62\n\tSYS_SIN                             = 0x3F  // 63\n\tSYS_COS                             = 0x40  // 64\n\tSYS_TAN                             = 0x41  // 65\n\tSYS_SINH                            = 0x42  // 66\n\tSYS_ACOS                            = 0x43  // 67\n\tSYS_ATAN                            = 0x44  // 68\n\tSYS_ATAN2                           = 0x45  // 69\n\tSYS_FTELL                           = 0x46  // 70\n\tSYS_FGETPOS                         = 0x47  // 71\n\tSYS_FSEEK                           = 0x48  // 72\n\tSYS_FSETPOS                         = 0x49  // 73\n\tSYS_FERROR                          = 0x4A  // 74\n\tSYS_REWIND                          = 0x4B  // 75\n\tSYS_CLEARERR                        = 0x4C  // 76\n\tSYS_FEOF                            = 0x4D  // 77\n\tSYS_ATOL                            = 0x4E  // 78\n\tSYS_PERROR                          = 0x4F  // 79\n\tSYS_ATOF                            = 0x50  // 80\n\tSYS_ATOI                            = 0x51  // 81\n\tSYS_RAND                            = 0x52  // 82\n\tSYS_STRTOD                          = 0x53  // 83\n\tSYS_STRTOL                          = 0x54  // 84\n\tSYS_STRTOUL                         = 0x55  // 85\n\tSYS_MALLOC                          = 0x56  // 86\n\tSYS_SRAND                           = 0x57  // 87\n\tSYS_CALLOC                          = 0x58  // 88\n\tSYS_FREE                            = 0x59  // 89\n\tSYS_EXIT                            = 0x5A  // 90\n\tSYS_REALLOC                         = 0x5B  // 91\n\tSYS_ABORT                           = 0x5C  // 92\n\tSYS___ABORT                         = 0x5C  // 92\n\tSYS_ATEXIT                          = 0x5D  // 93\n\tSYS_RAISE                           = 0x5E  // 94\n\tSYS_SETJMP                          = 0x5F  // 95\n\tSYS_LONGJMP                         = 0x60  // 96\n\tSYS_SIGNAL                          = 0x61  // 97\n\tSYS_TMPNAM                          = 0x62  // 98\n\tSYS_REMOVE                          = 0x63  // 99\n\tSYS_RENAME                          = 0x64  // 100\n\tSYS_TMPFILE                         = 0x65  // 101\n\tSYS_FREOPEN                         = 0x66  // 102\n\tSYS_FCLOSE                          = 0x67  // 103\n\tSYS_FFLUSH                          = 0x68  // 104\n\tSYS_FOPEN                           = 0x69  // 105\n\tSYS_FSCANF                          = 0x6A  // 106\n\tSYS_SETBUF                          = 0x6B  // 107\n\tSYS_SETVBUF                         = 0x6C  // 108\n\tSYS_FPRINTF                         = 0x6D  // 109\n\tSYS_SSCANF                          = 0x6E  // 110\n\tSYS_PRINTF                          = 0x6F  // 111\n\tSYS_SCANF                           = 0x70  // 112\n\tSYS_SPRINTF                         = 0x71  // 113\n\tSYS_FGETC                           = 0x72  // 114\n\tSYS_VFPRINTF                        = 0x73  // 115\n\tSYS_VPRINTF                         = 0x74  // 116\n\tSYS_VSPRINTF                        = 0x75  // 117\n\tSYS_GETC                            = 0x76  // 118\n\tSYS_FGETS                           = 0x77  // 119\n\tSYS_FPUTC                           = 0x78  // 120\n\tSYS_FPUTS                           = 0x79  // 121\n\tSYS_PUTCHAR                         = 0x7A  // 122\n\tSYS_GETCHAR                         = 0x7B  // 123\n\tSYS_GETS                            = 0x7C  // 124\n\tSYS_PUTC                            = 0x7D  // 125\n\tSYS_FWRITE                          = 0x7E  // 126\n\tSYS_PUTS                            = 0x7F  // 127\n\tSYS_UNGETC                          = 0x80  // 128\n\tSYS_FREAD                           = 0x81  // 129\n\tSYS_WCSTOMBS                        = 0x82  // 130\n\tSYS_MBTOWC                          = 0x83  // 131\n\tSYS_WCTOMB                          = 0x84  // 132\n\tSYS_MBSTOWCS                        = 0x85  // 133\n\tSYS_WCSCPY                          = 0x86  // 134\n\tSYS_WCSCAT                          = 0x87  // 135\n\tSYS_WCSCHR                          = 0x88  // 136\n\tSYS_WCSCMP                          = 0x89  // 137\n\tSYS_WCSNCMP                         = 0x8A  // 138\n\tSYS_WCSCSPN                         = 0x8B  // 139\n\tSYS_WCSLEN                          = 0x8C  // 140\n\tSYS_WCSNCAT                         = 0x8D  // 141\n\tSYS_WCSSPN                          = 0x8E  // 142\n\tSYS_WCSNCPY                         = 0x8F  // 143\n\tSYS_ABS                             = 0x90  // 144\n\tSYS_DIV                             = 0x91  // 145\n\tSYS_LABS                            = 0x92  // 146\n\tSYS_STRNCPY                         = 0x93  // 147\n\tSYS_MEMCPY                          = 0x94  // 148\n\tSYS_MEMMOVE                         = 0x95  // 149\n\tSYS_STRCPY                          = 0x96  // 150\n\tSYS_STRCMP                          = 0x97  // 151\n\tSYS_STRCAT                          = 0x98  // 152\n\tSYS_STRNCAT                         = 0x99  // 153\n\tSYS_MEMCMP                          = 0x9A  // 154\n\tSYS_MEMCHR                          = 0x9B  // 155\n\tSYS_STRCOLL                         = 0x9C  // 156\n\tSYS_STRNCMP                         = 0x9D  // 157\n\tSYS_STRXFRM                         = 0x9E  // 158\n\tSYS_STRRCHR                         = 0x9F  // 159\n\tSYS_STRCHR                          = 0xA0  // 160\n\tSYS_STRCSPN                         = 0xA1  // 161\n\tSYS_STRPBRK                         = 0xA2  // 162\n\tSYS_MEMSET                          = 0xA3  // 163\n\tSYS_STRSPN                          = 0xA4  // 164\n\tSYS_STRSTR                          = 0xA5  // 165\n\tSYS_STRTOK                          = 0xA6  // 166\n\tSYS_DIFFTIME                        = 0xA7  // 167\n\tSYS_STRERROR                        = 0xA8  // 168\n\tSYS_STRLEN                          = 0xA9  // 169\n\tSYS_CLOCK                           = 0xAA  // 170\n\tSYS_CTIME                           = 0xAB  // 171\n\tSYS_MKTIME                          = 0xAC  // 172\n\tSYS_TIME                            = 0xAD  // 173\n\tSYS_ASCTIME                         = 0xAE  // 174\n\tSYS_MBLEN                           = 0xAF  // 175\n\tSYS_GMTIME                          = 0xB0  // 176\n\tSYS_LOCALTIM                        = 0xB1  // 177\n\tSYS_LOCALTIME                       = 0xB1  // 177\n\tSYS_STRFTIME                        = 0xB2  // 178\n\tSYS___GETCB                         = 0xB4  // 180\n\tSYS_FUPDATE                         = 0xB5  // 181\n\tSYS___FUPDT                         = 0xB5  // 181\n\tSYS_CLRMEMF                         = 0xBD  // 189\n\tSYS___CLRMF                         = 0xBD  // 189\n\tSYS_FETCHEP                         = 0xBF  // 191\n\tSYS___FTCHEP                        = 0xBF  // 191\n\tSYS_FLDATA                          = 0xC1  // 193\n\tSYS___FLDATA                        = 0xC1  // 193\n\tSYS_DYNFREE                         = 0xC2  // 194\n\tSYS___DYNFRE                        = 0xC2  // 194\n\tSYS_DYNALLOC                        = 0xC3  // 195\n\tSYS___DYNALL                        = 0xC3  // 195\n\tSYS___CDUMP                         = 0xC4  // 196\n\tSYS_CSNAP                           = 0xC5  // 197\n\tSYS___CSNAP                         = 0xC5  // 197\n\tSYS_CTRACE                          = 0xC6  // 198\n\tSYS___CTRACE                        = 0xC6  // 198\n\tSYS___CTEST                         = 0xC7  // 199\n\tSYS_SETENV                          = 0xC8  // 200\n\tSYS___SETENV                        = 0xC8  // 200\n\tSYS_CLEARENV                        = 0xC9  // 201\n\tSYS___CLRENV                        = 0xC9  // 201\n\tSYS___REGCOMP_STD                   = 0xEA  // 234\n\tSYS_NL_LANGINFO                     = 0xFC  // 252\n\tSYS_GETSYNTX                        = 0xFD  // 253\n\tSYS_ISBLANK                         = 0xFE  // 254\n\tSYS___ISBLNK                        = 0xFE  // 254\n\tSYS_ISWALNUM                        = 0xFF  // 255\n\tSYS_ISWALPHA                        = 0x100 // 256\n\tSYS_ISWBLANK                        = 0x101 // 257\n\tSYS___ISWBLK                        = 0x101 // 257\n\tSYS_ISWCNTRL                        = 0x102 // 258\n\tSYS_ISWDIGIT                        = 0x103 // 259\n\tSYS_ISWGRAPH                        = 0x104 // 260\n\tSYS_ISWLOWER                        = 0x105 // 261\n\tSYS_ISWPRINT                        = 0x106 // 262\n\tSYS_ISWPUNCT                        = 0x107 // 263\n\tSYS_ISWSPACE                        = 0x108 // 264\n\tSYS_ISWUPPER                        = 0x109 // 265\n\tSYS_ISWXDIGI                        = 0x10A // 266\n\tSYS_ISWXDIGIT                       = 0x10A // 266\n\tSYS_WCTYPE                          = 0x10B // 267\n\tSYS_ISWCTYPE                        = 0x10C // 268\n\tSYS_TOWLOWER                        = 0x10D // 269\n\tSYS_TOWUPPER                        = 0x10E // 270\n\tSYS_MBSINIT                         = 0x10F // 271\n\tSYS_WCTOB                           = 0x110 // 272\n\tSYS_MBRLEN                          = 0x111 // 273\n\tSYS_MBRTOWC                         = 0x112 // 274\n\tSYS_MBSRTOWC                        = 0x113 // 275\n\tSYS_MBSRTOWCS                       = 0x113 // 275\n\tSYS_WCRTOMB                         = 0x114 // 276\n\tSYS_WCSRTOMB                        = 0x115 // 277\n\tSYS_WCSRTOMBS                       = 0x115 // 277\n\tSYS___CSID                          = 0x116 // 278\n\tSYS___WCSID                         = 0x117 // 279\n\tSYS_STRPTIME                        = 0x118 // 280\n\tSYS___STRPTM                        = 0x118 // 280\n\tSYS_STRFMON                         = 0x119 // 281\n\tSYS___RPMTCH                        = 0x11A // 282\n\tSYS_WCSSTR                          = 0x11B // 283\n\tSYS_WCSTOK                          = 0x12C // 300\n\tSYS_WCSTOL                          = 0x12D // 301\n\tSYS_WCSTOD                          = 0x12E // 302\n\tSYS_WCSTOUL                         = 0x12F // 303\n\tSYS_WCSCOLL                         = 0x130 // 304\n\tSYS_WCSXFRM                         = 0x131 // 305\n\tSYS_WCSWIDTH                        = 0x132 // 306\n\tSYS_WCWIDTH                         = 0x133 // 307\n\tSYS_WCSFTIME                        = 0x134 // 308\n\tSYS_SWPRINTF                        = 0x135 // 309\n\tSYS_VSWPRINT                        = 0x136 // 310\n\tSYS_VSWPRINTF                       = 0x136 // 310\n\tSYS_SWSCANF                         = 0x137 // 311\n\tSYS_REGCOMP                         = 0x138 // 312\n\tSYS_REGEXEC                         = 0x139 // 313\n\tSYS_REGFREE                         = 0x13A // 314\n\tSYS_REGERROR                        = 0x13B // 315\n\tSYS_FGETWC                          = 0x13C // 316\n\tSYS_FGETWS                          = 0x13D // 317\n\tSYS_FPUTWC                          = 0x13E // 318\n\tSYS_FPUTWS                          = 0x13F // 319\n\tSYS_GETWC                           = 0x140 // 320\n\tSYS_GETWCHAR                        = 0x141 // 321\n\tSYS_PUTWC                           = 0x142 // 322\n\tSYS_PUTWCHAR                        = 0x143 // 323\n\tSYS_UNGETWC                         = 0x144 // 324\n\tSYS_ICONV_OPEN                      = 0x145 // 325\n\tSYS_ICONV                           = 0x146 // 326\n\tSYS_ICONV_CLOSE                     = 0x147 // 327\n\tSYS_ISMCCOLLEL                      = 0x14C // 332\n\tSYS_STRTOCOLL                       = 0x14D // 333\n\tSYS_COLLTOSTR                       = 0x14E // 334\n\tSYS_COLLEQUIV                       = 0x14F // 335\n\tSYS_COLLRANGE                       = 0x150 // 336\n\tSYS_CCLASS                          = 0x151 // 337\n\tSYS_COLLORDER                       = 0x152 // 338\n\tSYS___DEMANGLE                      = 0x154 // 340\n\tSYS_FDOPEN                          = 0x155 // 341\n\tSYS___ERRNO                         = 0x156 // 342\n\tSYS___ERRNO2                        = 0x157 // 343\n\tSYS___TERROR                        = 0x158 // 344\n\tSYS_MAXCOLL                         = 0x169 // 361\n\tSYS_GETMCCOLL                       = 0x16A // 362\n\tSYS_GETWMCCOLL                      = 0x16B // 363\n\tSYS___ERR2AD                        = 0x16C // 364\n\tSYS_DLLQUERYFN                      = 0x16D // 365\n\tSYS_DLLQUERYVAR                     = 0x16E // 366\n\tSYS_DLLFREE                         = 0x16F // 367\n\tSYS_DLLLOAD                         = 0x170 // 368\n\tSYS__EXIT                           = 0x174 // 372\n\tSYS_ACCESS                          = 0x175 // 373\n\tSYS_ALARM                           = 0x176 // 374\n\tSYS_CFGETISPEED                     = 0x177 // 375\n\tSYS_CFGETOSPEED                     = 0x178 // 376\n\tSYS_CFSETISPEED                     = 0x179 // 377\n\tSYS_CFSETOSPEED                     = 0x17A // 378\n\tSYS_CHDIR                           = 0x17B // 379\n\tSYS_CHMOD                           = 0x17C // 380\n\tSYS_CHOWN                           = 0x17D // 381\n\tSYS_CLOSE                           = 0x17E // 382\n\tSYS_CLOSEDIR                        = 0x17F // 383\n\tSYS_CREAT                           = 0x180 // 384\n\tSYS_CTERMID                         = 0x181 // 385\n\tSYS_DUP                             = 0x182 // 386\n\tSYS_DUP2                            = 0x183 // 387\n\tSYS_EXECL                           = 0x184 // 388\n\tSYS_EXECLE                          = 0x185 // 389\n\tSYS_EXECLP                          = 0x186 // 390\n\tSYS_EXECV                           = 0x187 // 391\n\tSYS_EXECVE                          = 0x188 // 392\n\tSYS_EXECVP                          = 0x189 // 393\n\tSYS_FCHMOD                          = 0x18A // 394\n\tSYS_FCHOWN                          = 0x18B // 395\n\tSYS_FCNTL                           = 0x18C // 396\n\tSYS_FILENO                          = 0x18D // 397\n\tSYS_FORK                            = 0x18E // 398\n\tSYS_FPATHCONF                       = 0x18F // 399\n\tSYS_FSTAT                           = 0x190 // 400\n\tSYS_FSYNC                           = 0x191 // 401\n\tSYS_FTRUNCATE                       = 0x192 // 402\n\tSYS_GETCWD                          = 0x193 // 403\n\tSYS_GETEGID                         = 0x194 // 404\n\tSYS_GETEUID                         = 0x195 // 405\n\tSYS_GETGID                          = 0x196 // 406\n\tSYS_GETGRGID                        = 0x197 // 407\n\tSYS_GETGRNAM                        = 0x198 // 408\n\tSYS_GETGROUPS                       = 0x199 // 409\n\tSYS_GETLOGIN                        = 0x19A // 410\n\tSYS_W_GETMNTENT                     = 0x19B // 411\n\tSYS_GETPGRP                         = 0x19C // 412\n\tSYS_GETPID                          = 0x19D // 413\n\tSYS_GETPPID                         = 0x19E // 414\n\tSYS_GETPWNAM                        = 0x19F // 415\n\tSYS_GETPWUID                        = 0x1A0 // 416\n\tSYS_GETUID                          = 0x1A1 // 417\n\tSYS_W_IOCTL                         = 0x1A2 // 418\n\tSYS_ISATTY                          = 0x1A3 // 419\n\tSYS_KILL                            = 0x1A4 // 420\n\tSYS_LINK                            = 0x1A5 // 421\n\tSYS_LSEEK                           = 0x1A6 // 422\n\tSYS_LSTAT                           = 0x1A7 // 423\n\tSYS_MKDIR                           = 0x1A8 // 424\n\tSYS_MKFIFO                          = 0x1A9 // 425\n\tSYS_MKNOD                           = 0x1AA // 426\n\tSYS_MOUNT                           = 0x1AB // 427\n\tSYS_OPEN                            = 0x1AC // 428\n\tSYS_OPENDIR                         = 0x1AD // 429\n\tSYS_PATHCONF                        = 0x1AE // 430\n\tSYS_PAUSE                           = 0x1AF // 431\n\tSYS_PIPE                            = 0x1B0 // 432\n\tSYS_W_GETPSENT                      = 0x1B1 // 433\n\tSYS_READ                            = 0x1B2 // 434\n\tSYS_READDIR                         = 0x1B3 // 435\n\tSYS_READLINK                        = 0x1B4 // 436\n\tSYS_REWINDDIR                       = 0x1B5 // 437\n\tSYS_RMDIR                           = 0x1B6 // 438\n\tSYS_SETEGID                         = 0x1B7 // 439\n\tSYS_SETEUID                         = 0x1B8 // 440\n\tSYS_SETGID                          = 0x1B9 // 441\n\tSYS_SETPGID                         = 0x1BA // 442\n\tSYS_SETSID                          = 0x1BB // 443\n\tSYS_SETUID                          = 0x1BC // 444\n\tSYS_SIGACTION                       = 0x1BD // 445\n\tSYS_SIGADDSET                       = 0x1BE // 446\n\tSYS_SIGDELSET                       = 0x1BF // 447\n\tSYS_SIGEMPTYSET                     = 0x1C0 // 448\n\tSYS_SIGFILLSET                      = 0x1C1 // 449\n\tSYS_SIGISMEMBER                     = 0x1C2 // 450\n\tSYS_SIGLONGJMP                      = 0x1C3 // 451\n\tSYS_SIGPENDING                      = 0x1C4 // 452\n\tSYS_SIGPROCMASK                     = 0x1C5 // 453\n\tSYS_SIGSETJMP                       = 0x1C6 // 454\n\tSYS_SIGSUSPEND                      = 0x1C7 // 455\n\tSYS_SLEEP                           = 0x1C8 // 456\n\tSYS_STAT                            = 0x1C9 // 457\n\tSYS_W_STATFS                        = 0x1CA // 458\n\tSYS_SYMLINK                         = 0x1CB // 459\n\tSYS_SYSCONF                         = 0x1CC // 460\n\tSYS_TCDRAIN                         = 0x1CD // 461\n\tSYS_TCFLOW                          = 0x1CE // 462\n\tSYS_TCFLUSH                         = 0x1CF // 463\n\tSYS_TCGETATTR                       = 0x1D0 // 464\n\tSYS_TCGETPGRP                       = 0x1D1 // 465\n\tSYS_TCSENDBREAK                     = 0x1D2 // 466\n\tSYS_TCSETATTR                       = 0x1D3 // 467\n\tSYS_TCSETPGRP                       = 0x1D4 // 468\n\tSYS_TIMES                           = 0x1D5 // 469\n\tSYS_TTYNAME                         = 0x1D6 // 470\n\tSYS_TZSET                           = 0x1D7 // 471\n\tSYS_UMASK                           = 0x1D8 // 472\n\tSYS_UMOUNT                          = 0x1D9 // 473\n\tSYS_UNAME                           = 0x1DA // 474\n\tSYS_UNLINK                          = 0x1DB // 475\n\tSYS_UTIME                           = 0x1DC // 476\n\tSYS_WAIT                            = 0x1DD // 477\n\tSYS_WAITPID                         = 0x1DE // 478\n\tSYS_WRITE                           = 0x1DF // 479\n\tSYS_CHAUDIT                         = 0x1E0 // 480\n\tSYS_FCHAUDIT                        = 0x1E1 // 481\n\tSYS_GETGROUPSBYNAME                 = 0x1E2 // 482\n\tSYS_SIGWAIT                         = 0x1E3 // 483\n\tSYS_PTHREAD_EXIT                    = 0x1E4 // 484\n\tSYS_PTHREAD_KILL                    = 0x1E5 // 485\n\tSYS_PTHREAD_ATTR_INIT               = 0x1E6 // 486\n\tSYS_PTHREAD_ATTR_DESTROY            = 0x1E7 // 487\n\tSYS_PTHREAD_ATTR_SETSTACKSIZE       = 0x1E8 // 488\n\tSYS_PTHREAD_ATTR_GETSTACKSIZE       = 0x1E9 // 489\n\tSYS_PTHREAD_ATTR_SETDETACHSTATE     = 0x1EA // 490\n\tSYS_PTHREAD_ATTR_GETDETACHSTATE     = 0x1EB // 491\n\tSYS_PTHREAD_ATTR_SETWEIGHT_NP       = 0x1EC // 492\n\tSYS_PTHREAD_ATTR_GETWEIGHT_NP       = 0x1ED // 493\n\tSYS_PTHREAD_CANCEL                  = 0x1EE // 494\n\tSYS_PTHREAD_CLEANUP_PUSH            = 0x1EF // 495\n\tSYS_PTHREAD_CLEANUP_POP             = 0x1F0 // 496\n\tSYS_PTHREAD_CONDATTR_INIT           = 0x1F1 // 497\n\tSYS_PTHREAD_CONDATTR_DESTROY        = 0x1F2 // 498\n\tSYS_PTHREAD_COND_INIT               = 0x1F3 // 499\n\tSYS_PTHREAD_COND_DESTROY            = 0x1F4 // 500\n\tSYS_PTHREAD_COND_SIGNAL             = 0x1F5 // 501\n\tSYS_PTHREAD_COND_BROADCAST          = 0x1F6 // 502\n\tSYS_PTHREAD_COND_WAIT               = 0x1F7 // 503\n\tSYS_PTHREAD_COND_TIMEDWAIT          = 0x1F8 // 504\n\tSYS_PTHREAD_CREATE                  = 0x1F9 // 505\n\tSYS_PTHREAD_DETACH                  = 0x1FA // 506\n\tSYS_PTHREAD_EQUAL                   = 0x1FB // 507\n\tSYS_PTHREAD_GETSPECIFIC             = 0x1FC // 508\n\tSYS_PTHREAD_JOIN                    = 0x1FD // 509\n\tSYS_PTHREAD_KEY_CREATE              = 0x1FE // 510\n\tSYS_PTHREAD_MUTEXATTR_INIT          = 0x1FF // 511\n\tSYS_PTHREAD_MUTEXATTR_DESTROY       = 0x200 // 512\n\tSYS_PTHREAD_MUTEXATTR_SETKIND_NP    = 0x201 // 513\n\tSYS_PTHREAD_MUTEXATTR_GETKIND_NP    = 0x202 // 514\n\tSYS_PTHREAD_MUTEX_INIT              = 0x203 // 515\n\tSYS_PTHREAD_MUTEX_DESTROY           = 0x204 // 516\n\tSYS_PTHREAD_MUTEX_LOCK              = 0x205 // 517\n\tSYS_PTHREAD_MUTEX_TRYLOCK           = 0x206 // 518\n\tSYS_PTHREAD_MUTEX_UNLOCK            = 0x207 // 519\n\tSYS_PTHREAD_ONCE                    = 0x209 // 521\n\tSYS_PTHREAD_SELF                    = 0x20A // 522\n\tSYS_PTHREAD_SETINTR                 = 0x20B // 523\n\tSYS_PTHREAD_SETINTRTYPE             = 0x20C // 524\n\tSYS_PTHREAD_SETSPECIFIC             = 0x20D // 525\n\tSYS_PTHREAD_TESTINTR                = 0x20E // 526\n\tSYS_PTHREAD_YIELD                   = 0x20F // 527\n\tSYS_TW_OPEN                         = 0x210 // 528\n\tSYS_TW_FCNTL                        = 0x211 // 529\n\tSYS_PTHREAD_JOIN_D4_NP              = 0x212 // 530\n\tSYS_PTHREAD_CONDATTR_SETKIND_NP     = 0x213 // 531\n\tSYS_PTHREAD_CONDATTR_GETKIND_NP     = 0x214 // 532\n\tSYS_EXTLINK_NP                      = 0x215 // 533\n\tSYS___PASSWD                        = 0x216 // 534\n\tSYS_SETGROUPS                       = 0x217 // 535\n\tSYS_INITGROUPS                      = 0x218 // 536\n\tSYS_WCSPBRK                         = 0x23F // 575\n\tSYS_WCSRCHR                         = 0x240 // 576\n\tSYS_SVC99                           = 0x241 // 577\n\tSYS___SVC99                         = 0x241 // 577\n\tSYS_WCSWCS                          = 0x242 // 578\n\tSYS_LOCALECO                        = 0x243 // 579\n\tSYS_LOCALECONV                      = 0x243 // 579\n\tSYS___LIBREL                        = 0x244 // 580\n\tSYS_RELEASE                         = 0x245 // 581\n\tSYS___RLSE                          = 0x245 // 581\n\tSYS_FLOCATE                         = 0x246 // 582\n\tSYS___FLOCT                         = 0x246 // 582\n\tSYS_FDELREC                         = 0x247 // 583\n\tSYS___FDLREC                        = 0x247 // 583\n\tSYS_FETCH                           = 0x248 // 584\n\tSYS___FETCH                         = 0x248 // 584\n\tSYS_QSORT                           = 0x249 // 585\n\tSYS_GETENV                          = 0x24A // 586\n\tSYS_SYSTEM                          = 0x24B // 587\n\tSYS_BSEARCH                         = 0x24C // 588\n\tSYS_LDIV                            = 0x24D // 589\n\tSYS___THROW                         = 0x25E // 606\n\tSYS___RETHROW                       = 0x25F // 607\n\tSYS___CLEANUPCATCH                  = 0x260 // 608\n\tSYS___CATCHMATCH                    = 0x261 // 609\n\tSYS___CLEAN2UPCATCH                 = 0x262 // 610\n\tSYS_PUTENV                          = 0x26A // 618\n\tSYS___GETENV                        = 0x26F // 623\n\tSYS_GETPRIORITY                     = 0x270 // 624\n\tSYS_NICE                            = 0x271 // 625\n\tSYS_SETPRIORITY                     = 0x272 // 626\n\tSYS_GETITIMER                       = 0x273 // 627\n\tSYS_SETITIMER                       = 0x274 // 628\n\tSYS_MSGCTL                          = 0x275 // 629\n\tSYS_MSGGET                          = 0x276 // 630\n\tSYS_MSGRCV                          = 0x277 // 631\n\tSYS_MSGSND                          = 0x278 // 632\n\tSYS_MSGXRCV                         = 0x279 // 633\n\tSYS___MSGXR                         = 0x279 // 633\n\tSYS_SEMCTL                          = 0x27A // 634\n\tSYS_SEMGET                          = 0x27B // 635\n\tSYS_SEMOP                           = 0x27C // 636\n\tSYS_SHMAT                           = 0x27D // 637\n\tSYS_SHMCTL                          = 0x27E // 638\n\tSYS_SHMDT                           = 0x27F // 639\n\tSYS_SHMGET                          = 0x280 // 640\n\tSYS___GETIPC                        = 0x281 // 641\n\tSYS_SETGRENT                        = 0x282 // 642\n\tSYS_GETGRENT                        = 0x283 // 643\n\tSYS_ENDGRENT                        = 0x284 // 644\n\tSYS_SETPWENT                        = 0x285 // 645\n\tSYS_GETPWENT                        = 0x286 // 646\n\tSYS_ENDPWENT                        = 0x287 // 647\n\tSYS_BSD_SIGNAL                      = 0x288 // 648\n\tSYS_KILLPG                          = 0x289 // 649\n\tSYS_SIGALTSTACK                     = 0x28A // 650\n\tSYS_SIGHOLD                         = 0x28B // 651\n\tSYS_SIGIGNORE                       = 0x28C // 652\n\tSYS_SIGINTERRUPT                    = 0x28D // 653\n\tSYS_SIGPAUSE                        = 0x28E // 654\n\tSYS_SIGRELSE                        = 0x28F // 655\n\tSYS_SIGSET                          = 0x290 // 656\n\tSYS_SIGSTACK                        = 0x291 // 657\n\tSYS_GETRLIMIT                       = 0x292 // 658\n\tSYS_SETRLIMIT                       = 0x293 // 659\n\tSYS_GETRUSAGE                       = 0x294 // 660\n\tSYS_MMAP                            = 0x295 // 661\n\tSYS_MPROTECT                        = 0x296 // 662\n\tSYS_MSYNC                           = 0x297 // 663\n\tSYS_MUNMAP                          = 0x298 // 664\n\tSYS_CONFSTR                         = 0x299 // 665\n\tSYS_GETOPT                          = 0x29A // 666\n\tSYS_LCHOWN                          = 0x29B // 667\n\tSYS_TRUNCATE                        = 0x29C // 668\n\tSYS_GETSUBOPT                       = 0x29D // 669\n\tSYS_SETPGRP                         = 0x29E // 670\n\tSYS___GDERR                         = 0x29F // 671\n\tSYS___TZONE                         = 0x2A0 // 672\n\tSYS___DLGHT                         = 0x2A1 // 673\n\tSYS___OPARGF                        = 0x2A2 // 674\n\tSYS___OPOPTF                        = 0x2A3 // 675\n\tSYS___OPINDF                        = 0x2A4 // 676\n\tSYS___OPERRF                        = 0x2A5 // 677\n\tSYS_GETDATE                         = 0x2A6 // 678\n\tSYS_WAIT3                           = 0x2A7 // 679\n\tSYS_WAITID                          = 0x2A8 // 680\n\tSYS___CATTRM                        = 0x2A9 // 681\n\tSYS___GDTRM                         = 0x2AA // 682\n\tSYS___RNDTRM                        = 0x2AB // 683\n\tSYS_CRYPT                           = 0x2AC // 684\n\tSYS_ENCRYPT                         = 0x2AD // 685\n\tSYS_SETKEY                          = 0x2AE // 686\n\tSYS___CNVBLK                        = 0x2AF // 687\n\tSYS___CRYTRM                        = 0x2B0 // 688\n\tSYS___ECRTRM                        = 0x2B1 // 689\n\tSYS_DRAND48                         = 0x2B2 // 690\n\tSYS_ERAND48                         = 0x2B3 // 691\n\tSYS_FSTATVFS                        = 0x2B4 // 692\n\tSYS_STATVFS                         = 0x2B5 // 693\n\tSYS_CATCLOSE                        = 0x2B6 // 694\n\tSYS_CATGETS                         = 0x2B7 // 695\n\tSYS_CATOPEN                         = 0x2B8 // 696\n\tSYS_BCMP                            = 0x2B9 // 697\n\tSYS_BCOPY                           = 0x2BA // 698\n\tSYS_BZERO                           = 0x2BB // 699\n\tSYS_FFS                             = 0x2BC // 700\n\tSYS_INDEX                           = 0x2BD // 701\n\tSYS_RINDEX                          = 0x2BE // 702\n\tSYS_STRCASECMP                      = 0x2BF // 703\n\tSYS_STRDUP                          = 0x2C0 // 704\n\tSYS_STRNCASECMP                     = 0x2C1 // 705\n\tSYS_INITSTATE                       = 0x2C2 // 706\n\tSYS_SETSTATE                        = 0x2C3 // 707\n\tSYS_RANDOM                          = 0x2C4 // 708\n\tSYS_SRANDOM                         = 0x2C5 // 709\n\tSYS_HCREATE                         = 0x2C6 // 710\n\tSYS_HDESTROY                        = 0x2C7 // 711\n\tSYS_HSEARCH                         = 0x2C8 // 712\n\tSYS_LFIND                           = 0x2C9 // 713\n\tSYS_LSEARCH                         = 0x2CA // 714\n\tSYS_TDELETE                         = 0x2CB // 715\n\tSYS_TFIND                           = 0x2CC // 716\n\tSYS_TSEARCH                         = 0x2CD // 717\n\tSYS_TWALK                           = 0x2CE // 718\n\tSYS_INSQUE                          = 0x2CF // 719\n\tSYS_REMQUE                          = 0x2D0 // 720\n\tSYS_POPEN                           = 0x2D1 // 721\n\tSYS_PCLOSE                          = 0x2D2 // 722\n\tSYS_SWAB                            = 0x2D3 // 723\n\tSYS_MEMCCPY                         = 0x2D4 // 724\n\tSYS_GETPAGESIZE                     = 0x2D8 // 728\n\tSYS_FCHDIR                          = 0x2D9 // 729\n\tSYS___OCLCK                         = 0x2DA // 730\n\tSYS___ATOE                          = 0x2DB // 731\n\tSYS___ATOE_L                        = 0x2DC // 732\n\tSYS___ETOA                          = 0x2DD // 733\n\tSYS___ETOA_L                        = 0x2DE // 734\n\tSYS_SETUTXENT                       = 0x2DF // 735\n\tSYS_GETUTXENT                       = 0x2E0 // 736\n\tSYS_ENDUTXENT                       = 0x2E1 // 737\n\tSYS_GETUTXID                        = 0x2E2 // 738\n\tSYS_GETUTXLINE                      = 0x2E3 // 739\n\tSYS_PUTUTXLINE                      = 0x2E4 // 740\n\tSYS_FMTMSG                          = 0x2E5 // 741\n\tSYS_JRAND48                         = 0x2E6 // 742\n\tSYS_LRAND48                         = 0x2E7 // 743\n\tSYS_MRAND48                         = 0x2E8 // 744\n\tSYS_NRAND48                         = 0x2E9 // 745\n\tSYS_LCONG48                         = 0x2EA // 746\n\tSYS_SRAND48                         = 0x2EB // 747\n\tSYS_SEED48                          = 0x2EC // 748\n\tSYS_ISASCII                         = 0x2ED // 749\n\tSYS_TOASCII                         = 0x2EE // 750\n\tSYS_A64L                            = 0x2EF // 751\n\tSYS_L64A                            = 0x2F0 // 752\n\tSYS_UALARM                          = 0x2F1 // 753\n\tSYS_USLEEP                          = 0x2F2 // 754\n\tSYS___UTXTRM                        = 0x2F3 // 755\n\tSYS___SRCTRM                        = 0x2F4 // 756\n\tSYS_FTIME                           = 0x2F5 // 757\n\tSYS_GETTIMEOFDAY                    = 0x2F6 // 758\n\tSYS_DBM_CLEARERR                    = 0x2F7 // 759\n\tSYS_DBM_CLOSE                       = 0x2F8 // 760\n\tSYS_DBM_DELETE                      = 0x2F9 // 761\n\tSYS_DBM_ERROR                       = 0x2FA // 762\n\tSYS_DBM_FETCH                       = 0x2FB // 763\n\tSYS_DBM_FIRSTKEY                    = 0x2FC // 764\n\tSYS_DBM_NEXTKEY                     = 0x2FD // 765\n\tSYS_DBM_OPEN                        = 0x2FE // 766\n\tSYS_DBM_STORE                       = 0x2FF // 767\n\tSYS___NDMTRM                        = 0x300 // 768\n\tSYS_FTOK                            = 0x301 // 769\n\tSYS_BASENAME                        = 0x302 // 770\n\tSYS_DIRNAME                         = 0x303 // 771\n\tSYS_GETDTABLESIZE                   = 0x304 // 772\n\tSYS_MKSTEMP                         = 0x305 // 773\n\tSYS_MKTEMP                          = 0x306 // 774\n\tSYS_NFTW                            = 0x307 // 775\n\tSYS_GETWD                           = 0x308 // 776\n\tSYS_LOCKF                           = 0x309 // 777\n\tSYS__LONGJMP                        = 0x30D // 781\n\tSYS__SETJMP                         = 0x30E // 782\n\tSYS_VFORK                           = 0x30F // 783\n\tSYS_WORDEXP                         = 0x310 // 784\n\tSYS_WORDFREE                        = 0x311 // 785\n\tSYS_GETPGID                         = 0x312 // 786\n\tSYS_GETSID                          = 0x313 // 787\n\tSYS___UTMPXNAME                     = 0x314 // 788\n\tSYS_CUSERID                         = 0x315 // 789\n\tSYS_GETPASS                         = 0x316 // 790\n\tSYS_FNMATCH                         = 0x317 // 791\n\tSYS_FTW                             = 0x318 // 792\n\tSYS_GETW                            = 0x319 // 793\n\tSYS_GLOB                            = 0x31A // 794\n\tSYS_GLOBFREE                        = 0x31B // 795\n\tSYS_PUTW                            = 0x31C // 796\n\tSYS_SEEKDIR                         = 0x31D // 797\n\tSYS_TELLDIR                         = 0x31E // 798\n\tSYS_TEMPNAM                         = 0x31F // 799\n\tSYS_ACOSH                           = 0x320 // 800\n\tSYS_ASINH                           = 0x321 // 801\n\tSYS_ATANH                           = 0x322 // 802\n\tSYS_CBRT                            = 0x323 // 803\n\tSYS_EXPM1                           = 0x324 // 804\n\tSYS_ILOGB                           = 0x325 // 805\n\tSYS_LOGB                            = 0x326 // 806\n\tSYS_LOG1P                           = 0x327 // 807\n\tSYS_NEXTAFTER                       = 0x328 // 808\n\tSYS_RINT                            = 0x329 // 809\n\tSYS_REMAINDER                       = 0x32A // 810\n\tSYS_SCALB                           = 0x32B // 811\n\tSYS_LGAMMA                          = 0x32C // 812\n\tSYS_TTYSLOT                         = 0x32D // 813\n\tSYS_GETTIMEOFDAY_R                  = 0x32E // 814\n\tSYS_SYNC                            = 0x32F // 815\n\tSYS_SPAWN                           = 0x330 // 816\n\tSYS_SPAWNP                          = 0x331 // 817\n\tSYS_GETLOGIN_UU                     = 0x332 // 818\n\tSYS_ECVT                            = 0x333 // 819\n\tSYS_FCVT                            = 0x334 // 820\n\tSYS_GCVT                            = 0x335 // 821\n\tSYS_ACCEPT                          = 0x336 // 822\n\tSYS_BIND                            = 0x337 // 823\n\tSYS_CONNECT                         = 0x338 // 824\n\tSYS_ENDHOSTENT                      = 0x339 // 825\n\tSYS_ENDPROTOENT                     = 0x33A // 826\n\tSYS_ENDSERVENT                      = 0x33B // 827\n\tSYS_GETHOSTBYADDR_R                 = 0x33C // 828\n\tSYS_GETHOSTBYADDR                   = 0x33D // 829\n\tSYS_GETHOSTBYNAME_R                 = 0x33E // 830\n\tSYS_GETHOSTBYNAME                   = 0x33F // 831\n\tSYS_GETHOSTENT                      = 0x340 // 832\n\tSYS_GETHOSTID                       = 0x341 // 833\n\tSYS_GETHOSTNAME                     = 0x342 // 834\n\tSYS_GETNETBYADDR                    = 0x343 // 835\n\tSYS_GETNETBYNAME                    = 0x344 // 836\n\tSYS_GETNETENT                       = 0x345 // 837\n\tSYS_GETPEERNAME                     = 0x346 // 838\n\tSYS_GETPROTOBYNAME                  = 0x347 // 839\n\tSYS_GETPROTOBYNUMBER                = 0x348 // 840\n\tSYS_GETPROTOENT                     = 0x349 // 841\n\tSYS_GETSERVBYNAME                   = 0x34A // 842\n\tSYS_GETSERVBYPORT                   = 0x34B // 843\n\tSYS_GETSERVENT                      = 0x34C // 844\n\tSYS_GETSOCKNAME                     = 0x34D // 845\n\tSYS_GETSOCKOPT                      = 0x34E // 846\n\tSYS_INET_ADDR                       = 0x34F // 847\n\tSYS_INET_LNAOF                      = 0x350 // 848\n\tSYS_INET_MAKEADDR                   = 0x351 // 849\n\tSYS_INET_NETOF                      = 0x352 // 850\n\tSYS_INET_NETWORK                    = 0x353 // 851\n\tSYS_INET_NTOA                       = 0x354 // 852\n\tSYS_IOCTL                           = 0x355 // 853\n\tSYS_LISTEN                          = 0x356 // 854\n\tSYS_READV                           = 0x357 // 855\n\tSYS_RECV                            = 0x358 // 856\n\tSYS_RECVFROM                        = 0x359 // 857\n\tSYS_SELECT                          = 0x35B // 859\n\tSYS_SELECTEX                        = 0x35C // 860\n\tSYS_SEND                            = 0x35D // 861\n\tSYS_SENDTO                          = 0x35F // 863\n\tSYS_SETHOSTENT                      = 0x360 // 864\n\tSYS_SETNETENT                       = 0x361 // 865\n\tSYS_SETPEER                         = 0x362 // 866\n\tSYS_SETPROTOENT                     = 0x363 // 867\n\tSYS_SETSERVENT                      = 0x364 // 868\n\tSYS_SETSOCKOPT                      = 0x365 // 869\n\tSYS_SHUTDOWN                        = 0x366 // 870\n\tSYS_SOCKET                          = 0x367 // 871\n\tSYS_SOCKETPAIR                      = 0x368 // 872\n\tSYS_WRITEV                          = 0x369 // 873\n\tSYS_CHROOT                          = 0x36A // 874\n\tSYS_W_STATVFS                       = 0x36B // 875\n\tSYS_ULIMIT                          = 0x36C // 876\n\tSYS_ISNAN                           = 0x36D // 877\n\tSYS_UTIMES                          = 0x36E // 878\n\tSYS___H_ERRNO                       = 0x36F // 879\n\tSYS_ENDNETENT                       = 0x370 // 880\n\tSYS_CLOSELOG                        = 0x371 // 881\n\tSYS_OPENLOG                         = 0x372 // 882\n\tSYS_SETLOGMASK                      = 0x373 // 883\n\tSYS_SYSLOG                          = 0x374 // 884\n\tSYS_PTSNAME                         = 0x375 // 885\n\tSYS_SETREUID                        = 0x376 // 886\n\tSYS_SETREGID                        = 0x377 // 887\n\tSYS_REALPATH                        = 0x378 // 888\n\tSYS___SIGNGAM                       = 0x379 // 889\n\tSYS_GRANTPT                         = 0x37A // 890\n\tSYS_UNLOCKPT                        = 0x37B // 891\n\tSYS_TCGETSID                        = 0x37C // 892\n\tSYS___TCGETCP                       = 0x37D // 893\n\tSYS___TCSETCP                       = 0x37E // 894\n\tSYS___TCSETTABLES                   = 0x37F // 895\n\tSYS_POLL                            = 0x380 // 896\n\tSYS_REXEC                           = 0x381 // 897\n\tSYS___ISASCII2                      = 0x382 // 898\n\tSYS___TOASCII2                      = 0x383 // 899\n\tSYS_CHPRIORITY                      = 0x384 // 900\n\tSYS_PTHREAD_ATTR_SETSYNCTYPE_NP     = 0x385 // 901\n\tSYS_PTHREAD_ATTR_GETSYNCTYPE_NP     = 0x386 // 902\n\tSYS_PTHREAD_SET_LIMIT_NP            = 0x387 // 903\n\tSYS___STNETENT                      = 0x388 // 904\n\tSYS___STPROTOENT                    = 0x389 // 905\n\tSYS___STSERVENT                     = 0x38A // 906\n\tSYS___STHOSTENT                     = 0x38B // 907\n\tSYS_NLIST                           = 0x38C // 908\n\tSYS___IPDBCS                        = 0x38D // 909\n\tSYS___IPDSPX                        = 0x38E // 910\n\tSYS___IPMSGC                        = 0x38F // 911\n\tSYS___SELECT1                       = 0x390 // 912\n\tSYS_PTHREAD_SECURITY_NP             = 0x391 // 913\n\tSYS___CHECK_RESOURCE_AUTH_NP        = 0x392 // 914\n\tSYS___CONVERT_ID_NP                 = 0x393 // 915\n\tSYS___OPENVMREL                     = 0x394 // 916\n\tSYS_WMEMCHR                         = 0x395 // 917\n\tSYS_WMEMCMP                         = 0x396 // 918\n\tSYS_WMEMCPY                         = 0x397 // 919\n\tSYS_WMEMMOVE                        = 0x398 // 920\n\tSYS_WMEMSET                         = 0x399 // 921\n\tSYS___FPUTWC                        = 0x400 // 1024\n\tSYS___PUTWC                         = 0x401 // 1025\n\tSYS___PWCHAR                        = 0x402 // 1026\n\tSYS___WCSFTM                        = 0x403 // 1027\n\tSYS___WCSTOK                        = 0x404 // 1028\n\tSYS___WCWDTH                        = 0x405 // 1029\n\tSYS_T_ACCEPT                        = 0x409 // 1033\n\tSYS_T_ALLOC                         = 0x40A // 1034\n\tSYS_T_BIND                          = 0x40B // 1035\n\tSYS_T_CLOSE                         = 0x40C // 1036\n\tSYS_T_CONNECT                       = 0x40D // 1037\n\tSYS_T_ERROR                         = 0x40E // 1038\n\tSYS_T_FREE                          = 0x40F // 1039\n\tSYS_T_GETINFO                       = 0x410 // 1040\n\tSYS_T_GETPROTADDR                   = 0x411 // 1041\n\tSYS_T_GETSTATE                      = 0x412 // 1042\n\tSYS_T_LISTEN                        = 0x413 // 1043\n\tSYS_T_LOOK                          = 0x414 // 1044\n\tSYS_T_OPEN                          = 0x415 // 1045\n\tSYS_T_OPTMGMT                       = 0x416 // 1046\n\tSYS_T_RCV                           = 0x417 // 1047\n\tSYS_T_RCVCONNECT                    = 0x418 // 1048\n\tSYS_T_RCVDIS                        = 0x419 // 1049\n\tSYS_T_RCVREL                        = 0x41A // 1050\n\tSYS_T_RCVUDATA                      = 0x41B // 1051\n\tSYS_T_RCVUDERR                      = 0x41C // 1052\n\tSYS_T_SND                           = 0x41D // 1053\n\tSYS_T_SNDDIS                        = 0x41E // 1054\n\tSYS_T_SNDREL                        = 0x41F // 1055\n\tSYS_T_SNDUDATA                      = 0x420 // 1056\n\tSYS_T_STRERROR                      = 0x421 // 1057\n\tSYS_T_SYNC                          = 0x422 // 1058\n\tSYS_T_UNBIND                        = 0x423 // 1059\n\tSYS___T_ERRNO                       = 0x424 // 1060\n\tSYS___RECVMSG2                      = 0x425 // 1061\n\tSYS___SENDMSG2                      = 0x426 // 1062\n\tSYS_FATTACH                         = 0x427 // 1063\n\tSYS_FDETACH                         = 0x428 // 1064\n\tSYS_GETMSG                          = 0x429 // 1065\n\tSYS_GETPMSG                         = 0x42A // 1066\n\tSYS_ISASTREAM                       = 0x42B // 1067\n\tSYS_PUTMSG                          = 0x42C // 1068\n\tSYS_PUTPMSG                         = 0x42D // 1069\n\tSYS___ISPOSIXON                     = 0x42E // 1070\n\tSYS___OPENMVSREL                    = 0x42F // 1071\n\tSYS_GETCONTEXT                      = 0x430 // 1072\n\tSYS_SETCONTEXT                      = 0x431 // 1073\n\tSYS_MAKECONTEXT                     = 0x432 // 1074\n\tSYS_SWAPCONTEXT                     = 0x433 // 1075\n\tSYS_PTHREAD_GETSPECIFIC_D8_NP       = 0x434 // 1076\n\tSYS_GETCLIENTID                     = 0x470 // 1136\n\tSYS___GETCLIENTID                   = 0x471 // 1137\n\tSYS_GETSTABLESIZE                   = 0x472 // 1138\n\tSYS_GETIBMOPT                       = 0x473 // 1139\n\tSYS_GETIBMSOCKOPT                   = 0x474 // 1140\n\tSYS_GIVESOCKET                      = 0x475 // 1141\n\tSYS_IBMSFLUSH                       = 0x476 // 1142\n\tSYS_MAXDESC                         = 0x477 // 1143\n\tSYS_SETIBMOPT                       = 0x478 // 1144\n\tSYS_SETIBMSOCKOPT                   = 0x479 // 1145\n\tSYS_SOCK_DEBUG                      = 0x47A // 1146\n\tSYS_SOCK_DO_TESTSTOR                = 0x47D // 1149\n\tSYS_TAKESOCKET                      = 0x47E // 1150\n\tSYS___SERVER_INIT                   = 0x47F // 1151\n\tSYS___SERVER_PWU                    = 0x480 // 1152\n\tSYS_PTHREAD_TAG_NP                  = 0x481 // 1153\n\tSYS___CONSOLE                       = 0x482 // 1154\n\tSYS___WSINIT                        = 0x483 // 1155\n\tSYS___IPTCPN                        = 0x489 // 1161\n\tSYS___SMF_RECORD                    = 0x48A // 1162\n\tSYS___IPHOST                        = 0x48B // 1163\n\tSYS___IPNODE                        = 0x48C // 1164\n\tSYS___SERVER_CLASSIFY_CREATE        = 0x48D // 1165\n\tSYS___SERVER_CLASSIFY_DESTROY       = 0x48E // 1166\n\tSYS___SERVER_CLASSIFY_RESET         = 0x48F // 1167\n\tSYS___SERVER_CLASSIFY               = 0x490 // 1168\n\tSYS___HEAPRPT                       = 0x496 // 1174\n\tSYS___FNWSA                         = 0x49B // 1179\n\tSYS___SPAWN2                        = 0x49D // 1181\n\tSYS___SPAWNP2                       = 0x49E // 1182\n\tSYS___GDRR                          = 0x4A1 // 1185\n\tSYS___HRRNO                         = 0x4A2 // 1186\n\tSYS___OPRG                          = 0x4A3 // 1187\n\tSYS___OPRR                          = 0x4A4 // 1188\n\tSYS___OPND                          = 0x4A5 // 1189\n\tSYS___OPPT                          = 0x4A6 // 1190\n\tSYS___SIGGM                         = 0x4A7 // 1191\n\tSYS___DGHT                          = 0x4A8 // 1192\n\tSYS___TZNE                          = 0x4A9 // 1193\n\tSYS___TZZN                          = 0x4AA // 1194\n\tSYS___TRRNO                         = 0x4AF // 1199\n\tSYS___ENVN                          = 0x4B0 // 1200\n\tSYS___MLOCKALL                      = 0x4B1 // 1201\n\tSYS_CREATEWO                        = 0x4B2 // 1202\n\tSYS_CREATEWORKUNIT                  = 0x4B2 // 1202\n\tSYS_CONTINUE                        = 0x4B3 // 1203\n\tSYS_CONTINUEWORKUNIT                = 0x4B3 // 1203\n\tSYS_CONNECTW                        = 0x4B4 // 1204\n\tSYS_CONNECTWORKMGR                  = 0x4B4 // 1204\n\tSYS_CONNECTS                        = 0x4B5 // 1205\n\tSYS_CONNECTSERVER                   = 0x4B5 // 1205\n\tSYS_DISCONNE                        = 0x4B6 // 1206\n\tSYS_DISCONNECTSERVER                = 0x4B6 // 1206\n\tSYS_JOINWORK                        = 0x4B7 // 1207\n\tSYS_JOINWORKUNIT                    = 0x4B7 // 1207\n\tSYS_LEAVEWOR                        = 0x4B8 // 1208\n\tSYS_LEAVEWORKUNIT                   = 0x4B8 // 1208\n\tSYS_DELETEWO                        = 0x4B9 // 1209\n\tSYS_DELETEWORKUNIT                  = 0x4B9 // 1209\n\tSYS_QUERYMET                        = 0x4BA // 1210\n\tSYS_QUERYMETRICS                    = 0x4BA // 1210\n\tSYS_QUERYSCH                        = 0x4BB // 1211\n\tSYS_QUERYSCHENV                     = 0x4BB // 1211\n\tSYS_CHECKSCH                        = 0x4BC // 1212\n\tSYS_CHECKSCHENV                     = 0x4BC // 1212\n\tSYS___PID_AFFINITY                  = 0x4BD // 1213\n\tSYS___ASINH_B                       = 0x4BE // 1214\n\tSYS___ATAN_B                        = 0x4BF // 1215\n\tSYS___CBRT_B                        = 0x4C0 // 1216\n\tSYS___CEIL_B                        = 0x4C1 // 1217\n\tSYS_COPYSIGN                        = 0x4C2 // 1218\n\tSYS___COS_B                         = 0x4C3 // 1219\n\tSYS___ERF_B                         = 0x4C4 // 1220\n\tSYS___ERFC_B                        = 0x4C5 // 1221\n\tSYS___EXPM1_B                       = 0x4C6 // 1222\n\tSYS___FABS_B                        = 0x4C7 // 1223\n\tSYS_FINITE                          = 0x4C8 // 1224\n\tSYS___FLOOR_B                       = 0x4C9 // 1225\n\tSYS___FREXP_B                       = 0x4CA // 1226\n\tSYS___ILOGB_B                       = 0x4CB // 1227\n\tSYS___ISNAN_B                       = 0x4CC // 1228\n\tSYS___LDEXP_B                       = 0x4CD // 1229\n\tSYS___LOG1P_B                       = 0x4CE // 1230\n\tSYS___LOGB_B                        = 0x4CF // 1231\n\tSYS_MATHERR                         = 0x4D0 // 1232\n\tSYS___MODF_B                        = 0x4D1 // 1233\n\tSYS___NEXTAFTER_B                   = 0x4D2 // 1234\n\tSYS___RINT_B                        = 0x4D3 // 1235\n\tSYS_SCALBN                          = 0x4D4 // 1236\n\tSYS_SIGNIFIC                        = 0x4D5 // 1237\n\tSYS_SIGNIFICAND                     = 0x4D5 // 1237\n\tSYS___SIN_B                         = 0x4D6 // 1238\n\tSYS___TAN_B                         = 0x4D7 // 1239\n\tSYS___TANH_B                        = 0x4D8 // 1240\n\tSYS___ACOS_B                        = 0x4D9 // 1241\n\tSYS___ACOSH_B                       = 0x4DA // 1242\n\tSYS___ASIN_B                        = 0x4DB // 1243\n\tSYS___ATAN2_B                       = 0x4DC // 1244\n\tSYS___ATANH_B                       = 0x4DD // 1245\n\tSYS___COSH_B                        = 0x4DE // 1246\n\tSYS___EXP_B                         = 0x4DF // 1247\n\tSYS___FMOD_B                        = 0x4E0 // 1248\n\tSYS___GAMMA_B                       = 0x4E1 // 1249\n\tSYS_GAMMA_R                         = 0x4E2 // 1250\n\tSYS___HYPOT_B                       = 0x4E3 // 1251\n\tSYS___J0_B                          = 0x4E4 // 1252\n\tSYS___Y0_B                          = 0x4E5 // 1253\n\tSYS___J1_B                          = 0x4E6 // 1254\n\tSYS___Y1_B                          = 0x4E7 // 1255\n\tSYS___JN_B                          = 0x4E8 // 1256\n\tSYS___YN_B                          = 0x4E9 // 1257\n\tSYS___LGAMMA_B                      = 0x4EA // 1258\n\tSYS_LGAMMA_R                        = 0x4EB // 1259\n\tSYS___LOG_B                         = 0x4EC // 1260\n\tSYS___LOG10_B                       = 0x4ED // 1261\n\tSYS___POW_B                         = 0x4EE // 1262\n\tSYS___REMAINDER_B                   = 0x4EF // 1263\n\tSYS___SCALB_B                       = 0x4F0 // 1264\n\tSYS___SINH_B                        = 0x4F1 // 1265\n\tSYS___SQRT_B                        = 0x4F2 // 1266\n\tSYS___OPENDIR2                      = 0x4F3 // 1267\n\tSYS___READDIR2                      = 0x4F4 // 1268\n\tSYS___LOGIN                         = 0x4F5 // 1269\n\tSYS___OPEN_STAT                     = 0x4F6 // 1270\n\tSYS_ACCEPT_AND_RECV                 = 0x4F7 // 1271\n\tSYS___FP_SETMODE                    = 0x4F8 // 1272\n\tSYS___SIGACTIONSET                  = 0x4FB // 1275\n\tSYS___UCREATE                       = 0x4FC // 1276\n\tSYS___UMALLOC                       = 0x4FD // 1277\n\tSYS___UFREE                         = 0x4FE // 1278\n\tSYS___UHEAPREPORT                   = 0x4FF // 1279\n\tSYS___ISBFP                         = 0x500 // 1280\n\tSYS___FP_CAST                       = 0x501 // 1281\n\tSYS___CERTIFICATE                   = 0x502 // 1282\n\tSYS_SEND_FILE                       = 0x503 // 1283\n\tSYS_AIO_CANCEL                      = 0x504 // 1284\n\tSYS_AIO_ERROR                       = 0x505 // 1285\n\tSYS_AIO_READ                        = 0x506 // 1286\n\tSYS_AIO_RETURN                      = 0x507 // 1287\n\tSYS_AIO_SUSPEND                     = 0x508 // 1288\n\tSYS_AIO_WRITE                       = 0x509 // 1289\n\tSYS_PTHREAD_MUTEXATTR_GETPSHARED    = 0x50A // 1290\n\tSYS_PTHREAD_MUTEXATTR_SETPSHARED    = 0x50B // 1291\n\tSYS_PTHREAD_RWLOCK_DESTROY          = 0x50C // 1292\n\tSYS_PTHREAD_RWLOCK_INIT             = 0x50D // 1293\n\tSYS_PTHREAD_RWLOCK_RDLOCK           = 0x50E // 1294\n\tSYS_PTHREAD_RWLOCK_TRYRDLOCK        = 0x50F // 1295\n\tSYS_PTHREAD_RWLOCK_TRYWRLOCK        = 0x510 // 1296\n\tSYS_PTHREAD_RWLOCK_UNLOCK           = 0x511 // 1297\n\tSYS_PTHREAD_RWLOCK_WRLOCK           = 0x512 // 1298\n\tSYS_PTHREAD_RWLOCKATTR_GETPSHARED   = 0x513 // 1299\n\tSYS_PTHREAD_RWLOCKATTR_SETPSHARED   = 0x514 // 1300\n\tSYS_PTHREAD_RWLOCKATTR_INIT         = 0x515 // 1301\n\tSYS_PTHREAD_RWLOCKATTR_DESTROY      = 0x516 // 1302\n\tSYS___CTTBL                         = 0x517 // 1303\n\tSYS_PTHREAD_MUTEXATTR_SETTYPE       = 0x518 // 1304\n\tSYS_PTHREAD_MUTEXATTR_GETTYPE       = 0x519 // 1305\n\tSYS___FP_CLR_FLAG                   = 0x51A // 1306\n\tSYS___FP_READ_FLAG                  = 0x51B // 1307\n\tSYS___FP_RAISE_XCP                  = 0x51C // 1308\n\tSYS___FP_CLASS                      = 0x51D // 1309\n\tSYS___FP_FINITE                     = 0x51E // 1310\n\tSYS___FP_ISNAN                      = 0x51F // 1311\n\tSYS___FP_UNORDERED                  = 0x520 // 1312\n\tSYS___FP_READ_RND                   = 0x521 // 1313\n\tSYS___FP_READ_RND_B                 = 0x522 // 1314\n\tSYS___FP_SWAP_RND                   = 0x523 // 1315\n\tSYS___FP_SWAP_RND_B                 = 0x524 // 1316\n\tSYS___FP_LEVEL                      = 0x525 // 1317\n\tSYS___FP_BTOH                       = 0x526 // 1318\n\tSYS___FP_HTOB                       = 0x527 // 1319\n\tSYS___FPC_RD                        = 0x528 // 1320\n\tSYS___FPC_WR                        = 0x529 // 1321\n\tSYS___FPC_RW                        = 0x52A // 1322\n\tSYS___FPC_SM                        = 0x52B // 1323\n\tSYS___FPC_RS                        = 0x52C // 1324\n\tSYS_SIGTIMEDWAIT                    = 0x52D // 1325\n\tSYS_SIGWAITINFO                     = 0x52E // 1326\n\tSYS___CHKBFP                        = 0x52F // 1327\n\tSYS___W_PIOCTL                      = 0x59E // 1438\n\tSYS___OSENV                         = 0x59F // 1439\n\tSYS_EXPORTWO                        = 0x5A1 // 1441\n\tSYS_EXPORTWORKUNIT                  = 0x5A1 // 1441\n\tSYS_UNDOEXPO                        = 0x5A2 // 1442\n\tSYS_UNDOEXPORTWORKUNIT              = 0x5A2 // 1442\n\tSYS_IMPORTWO                        = 0x5A3 // 1443\n\tSYS_IMPORTWORKUNIT                  = 0x5A3 // 1443\n\tSYS_UNDOIMPO                        = 0x5A4 // 1444\n\tSYS_UNDOIMPORTWORKUNIT              = 0x5A4 // 1444\n\tSYS_EXTRACTW                        = 0x5A5 // 1445\n\tSYS_EXTRACTWORKUNIT                 = 0x5A5 // 1445\n\tSYS___CPL                           = 0x5A6 // 1446\n\tSYS___MAP_INIT                      = 0x5A7 // 1447\n\tSYS___MAP_SERVICE                   = 0x5A8 // 1448\n\tSYS_SIGQUEUE                        = 0x5A9 // 1449\n\tSYS___MOUNT                         = 0x5AA // 1450\n\tSYS___GETUSERID                     = 0x5AB // 1451\n\tSYS___IPDOMAINNAME                  = 0x5AC // 1452\n\tSYS_QUERYENC                        = 0x5AD // 1453\n\tSYS_QUERYWORKUNITCLASSIFICATION     = 0x5AD // 1453\n\tSYS_CONNECTE                        = 0x5AE // 1454\n\tSYS_CONNECTEXPORTIMPORT             = 0x5AE // 1454\n\tSYS___FP_SWAPMODE                   = 0x5AF // 1455\n\tSYS_STRTOLL                         = 0x5B0 // 1456\n\tSYS_STRTOULL                        = 0x5B1 // 1457\n\tSYS___DSA_PREV                      = 0x5B2 // 1458\n\tSYS___EP_FIND                       = 0x5B3 // 1459\n\tSYS___SERVER_THREADS_QUERY          = 0x5B4 // 1460\n\tSYS___MSGRCV_TIMED                  = 0x5B7 // 1463\n\tSYS___SEMOP_TIMED                   = 0x5B8 // 1464\n\tSYS___GET_CPUID                     = 0x5B9 // 1465\n\tSYS___GET_SYSTEM_SETTINGS           = 0x5BA // 1466\n\tSYS_FTELLO                          = 0x5C8 // 1480\n\tSYS_FSEEKO                          = 0x5C9 // 1481\n\tSYS_LLDIV                           = 0x5CB // 1483\n\tSYS_WCSTOLL                         = 0x5CC // 1484\n\tSYS_WCSTOULL                        = 0x5CD // 1485\n\tSYS_LLABS                           = 0x5CE // 1486\n\tSYS___CONSOLE2                      = 0x5D2 // 1490\n\tSYS_INET_NTOP                       = 0x5D3 // 1491\n\tSYS_INET_PTON                       = 0x5D4 // 1492\n\tSYS___RES                           = 0x5D6 // 1494\n\tSYS_RES_MKQUERY                     = 0x5D7 // 1495\n\tSYS_RES_INIT                        = 0x5D8 // 1496\n\tSYS_RES_QUERY                       = 0x5D9 // 1497\n\tSYS_RES_SEARCH                      = 0x5DA // 1498\n\tSYS_RES_SEND                        = 0x5DB // 1499\n\tSYS_RES_QUERYDOMAIN                 = 0x5DC // 1500\n\tSYS_DN_EXPAND                       = 0x5DD // 1501\n\tSYS_DN_SKIPNAME                     = 0x5DE // 1502\n\tSYS_DN_COMP                         = 0x5DF // 1503\n\tSYS_ASCTIME_R                       = 0x5E0 // 1504\n\tSYS_CTIME_R                         = 0x5E1 // 1505\n\tSYS_GMTIME_R                        = 0x5E2 // 1506\n\tSYS_LOCALTIME_R                     = 0x5E3 // 1507\n\tSYS_RAND_R                          = 0x5E4 // 1508\n\tSYS_STRTOK_R                        = 0x5E5 // 1509\n\tSYS_READDIR_R                       = 0x5E6 // 1510\n\tSYS_GETGRGID_R                      = 0x5E7 // 1511\n\tSYS_GETGRNAM_R                      = 0x5E8 // 1512\n\tSYS_GETLOGIN_R                      = 0x5E9 // 1513\n\tSYS_GETPWNAM_R                      = 0x5EA // 1514\n\tSYS_GETPWUID_R                      = 0x5EB // 1515\n\tSYS_TTYNAME_R                       = 0x5EC // 1516\n\tSYS_PTHREAD_ATFORK                  = 0x5ED // 1517\n\tSYS_PTHREAD_ATTR_GETGUARDSIZE       = 0x5EE // 1518\n\tSYS_PTHREAD_ATTR_GETSTACKADDR       = 0x5EF // 1519\n\tSYS_PTHREAD_ATTR_SETGUARDSIZE       = 0x5F0 // 1520\n\tSYS_PTHREAD_ATTR_SETSTACKADDR       = 0x5F1 // 1521\n\tSYS_PTHREAD_CONDATTR_GETPSHARED     = 0x5F2 // 1522\n\tSYS_PTHREAD_CONDATTR_SETPSHARED     = 0x5F3 // 1523\n\tSYS_PTHREAD_GETCONCURRENCY          = 0x5F4 // 1524\n\tSYS_PTHREAD_KEY_DELETE              = 0x5F5 // 1525\n\tSYS_PTHREAD_SETCONCURRENCY          = 0x5F6 // 1526\n\tSYS_PTHREAD_SIGMASK                 = 0x5F7 // 1527\n\tSYS___DISCARDDATA                   = 0x5F8 // 1528\n\tSYS_PTHREAD_ATTR_GETSCHEDPARAM      = 0x5F9 // 1529\n\tSYS_PTHREAD_ATTR_SETSCHEDPARAM      = 0x5FA // 1530\n\tSYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB // 1531\n\tSYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC // 1532\n\tSYS_PTHREAD_DETACH_U98              = 0x5FD // 1533\n\tSYS_PTHREAD_GETSPECIFIC_U98         = 0x5FE // 1534\n\tSYS_PTHREAD_SETCANCELSTATE          = 0x5FF // 1535\n\tSYS_PTHREAD_SETCANCELTYPE           = 0x600 // 1536\n\tSYS_PTHREAD_TESTCANCEL              = 0x601 // 1537\n\tSYS___ATANF_B                       = 0x602 // 1538\n\tSYS___ATANL_B                       = 0x603 // 1539\n\tSYS___CEILF_B                       = 0x604 // 1540\n\tSYS___CEILL_B                       = 0x605 // 1541\n\tSYS___COSF_B                        = 0x606 // 1542\n\tSYS___COSL_B                        = 0x607 // 1543\n\tSYS___FABSF_B                       = 0x608 // 1544\n\tSYS___FABSL_B                       = 0x609 // 1545\n\tSYS___FLOORF_B                      = 0x60A // 1546\n\tSYS___FLOORL_B                      = 0x60B // 1547\n\tSYS___FREXPF_B                      = 0x60C // 1548\n\tSYS___FREXPL_B                      = 0x60D // 1549\n\tSYS___LDEXPF_B                      = 0x60E // 1550\n\tSYS___LDEXPL_B                      = 0x60F // 1551\n\tSYS___SINF_B                        = 0x610 // 1552\n\tSYS___SINL_B                        = 0x611 // 1553\n\tSYS___TANF_B                        = 0x612 // 1554\n\tSYS___TANL_B                        = 0x613 // 1555\n\tSYS___TANHF_B                       = 0x614 // 1556\n\tSYS___TANHL_B                       = 0x615 // 1557\n\tSYS___ACOSF_B                       = 0x616 // 1558\n\tSYS___ACOSL_B                       = 0x617 // 1559\n\tSYS___ASINF_B                       = 0x618 // 1560\n\tSYS___ASINL_B                       = 0x619 // 1561\n\tSYS___ATAN2F_B                      = 0x61A // 1562\n\tSYS___ATAN2L_B                      = 0x61B // 1563\n\tSYS___COSHF_B                       = 0x61C // 1564\n\tSYS___COSHL_B                       = 0x61D // 1565\n\tSYS___EXPF_B                        = 0x61E // 1566\n\tSYS___EXPL_B                        = 0x61F // 1567\n\tSYS___LOGF_B                        = 0x620 // 1568\n\tSYS___LOGL_B                        = 0x621 // 1569\n\tSYS___LOG10F_B                      = 0x622 // 1570\n\tSYS___LOG10L_B                      = 0x623 // 1571\n\tSYS___POWF_B                        = 0x624 // 1572\n\tSYS___POWL_B                        = 0x625 // 1573\n\tSYS___SINHF_B                       = 0x626 // 1574\n\tSYS___SINHL_B                       = 0x627 // 1575\n\tSYS___SQRTF_B                       = 0x628 // 1576\n\tSYS___SQRTL_B                       = 0x629 // 1577\n\tSYS___ABSF_B                        = 0x62A // 1578\n\tSYS___ABS_B                         = 0x62B // 1579\n\tSYS___ABSL_B                        = 0x62C // 1580\n\tSYS___FMODF_B                       = 0x62D // 1581\n\tSYS___FMODL_B                       = 0x62E // 1582\n\tSYS___MODFF_B                       = 0x62F // 1583\n\tSYS___MODFL_B                       = 0x630 // 1584\n\tSYS_ABSF                            = 0x631 // 1585\n\tSYS_ABSL                            = 0x632 // 1586\n\tSYS_ACOSF                           = 0x633 // 1587\n\tSYS_ACOSL                           = 0x634 // 1588\n\tSYS_ASINF                           = 0x635 // 1589\n\tSYS_ASINL                           = 0x636 // 1590\n\tSYS_ATAN2F                          = 0x637 // 1591\n\tSYS_ATAN2L                          = 0x638 // 1592\n\tSYS_ATANF                           = 0x639 // 1593\n\tSYS_ATANL                           = 0x63A // 1594\n\tSYS_CEILF                           = 0x63B // 1595\n\tSYS_CEILL                           = 0x63C // 1596\n\tSYS_COSF                            = 0x63D // 1597\n\tSYS_COSL                            = 0x63E // 1598\n\tSYS_COSHF                           = 0x63F // 1599\n\tSYS_COSHL                           = 0x640 // 1600\n\tSYS_EXPF                            = 0x641 // 1601\n\tSYS_EXPL                            = 0x642 // 1602\n\tSYS_TANHF                           = 0x643 // 1603\n\tSYS_TANHL                           = 0x644 // 1604\n\tSYS_LOG10F                          = 0x645 // 1605\n\tSYS_LOG10L                          = 0x646 // 1606\n\tSYS_LOGF                            = 0x647 // 1607\n\tSYS_LOGL                            = 0x648 // 1608\n\tSYS_POWF                            = 0x649 // 1609\n\tSYS_POWL                            = 0x64A // 1610\n\tSYS_SINF                            = 0x64B // 1611\n\tSYS_SINL                            = 0x64C // 1612\n\tSYS_SQRTF                           = 0x64D // 1613\n\tSYS_SQRTL                           = 0x64E // 1614\n\tSYS_SINHF                           = 0x64F // 1615\n\tSYS_SINHL                           = 0x650 // 1616\n\tSYS_TANF                            = 0x651 // 1617\n\tSYS_TANL                            = 0x652 // 1618\n\tSYS_FABSF                           = 0x653 // 1619\n\tSYS_FABSL                           = 0x654 // 1620\n\tSYS_FLOORF                          = 0x655 // 1621\n\tSYS_FLOORL                          = 0x656 // 1622\n\tSYS_FMODF                           = 0x657 // 1623\n\tSYS_FMODL                           = 0x658 // 1624\n\tSYS_FREXPF                          = 0x659 // 1625\n\tSYS_FREXPL                          = 0x65A // 1626\n\tSYS_LDEXPF                          = 0x65B // 1627\n\tSYS_LDEXPL                          = 0x65C // 1628\n\tSYS_MODFF                           = 0x65D // 1629\n\tSYS_MODFL                           = 0x65E // 1630\n\tSYS_BTOWC                           = 0x65F // 1631\n\tSYS___CHATTR                        = 0x660 // 1632\n\tSYS___FCHATTR                       = 0x661 // 1633\n\tSYS___TOCCSID                       = 0x662 // 1634\n\tSYS___CSNAMETYPE                    = 0x663 // 1635\n\tSYS___TOCSNAME                      = 0x664 // 1636\n\tSYS___CCSIDTYPE                     = 0x665 // 1637\n\tSYS___AE_CORRESTBL_QUERY            = 0x666 // 1638\n\tSYS___AE_AUTOCONVERT_STATE          = 0x667 // 1639\n\tSYS_DN_FIND                         = 0x668 // 1640\n\tSYS___GETHOSTBYADDR_A               = 0x669 // 1641\n\tSYS___GETHOSTBYNAME_A               = 0x66A // 1642\n\tSYS___RES_INIT_A                    = 0x66B // 1643\n\tSYS___GETHOSTBYADDR_R_A             = 0x66C // 1644\n\tSYS___GETHOSTBYNAME_R_A             = 0x66D // 1645\n\tSYS___CHARMAP_INIT_A                = 0x66E // 1646\n\tSYS___MBLEN_A                       = 0x66F // 1647\n\tSYS___MBLEN_SB_A                    = 0x670 // 1648\n\tSYS___MBLEN_STD_A                   = 0x671 // 1649\n\tSYS___MBLEN_UTF                     = 0x672 // 1650\n\tSYS___MBSTOWCS_A                    = 0x673 // 1651\n\tSYS___MBSTOWCS_STD_A                = 0x674 // 1652\n\tSYS___MBTOWC_A                      = 0x675 // 1653\n\tSYS___MBTOWC_ISO1                   = 0x676 // 1654\n\tSYS___MBTOWC_SBCS                   = 0x677 // 1655\n\tSYS___MBTOWC_MBCS                   = 0x678 // 1656\n\tSYS___MBTOWC_UTF                    = 0x679 // 1657\n\tSYS___WCSTOMBS_A                    = 0x67A // 1658\n\tSYS___WCSTOMBS_STD_A                = 0x67B // 1659\n\tSYS___WCSWIDTH_A                    = 0x67C // 1660\n\tSYS___GETGRGID_R_A                  = 0x67D // 1661\n\tSYS___WCSWIDTH_STD_A                = 0x67E // 1662\n\tSYS___WCSWIDTH_ASIA                 = 0x67F // 1663\n\tSYS___CSID_A                        = 0x680 // 1664\n\tSYS___CSID_STD_A                    = 0x681 // 1665\n\tSYS___WCSID_A                       = 0x682 // 1666\n\tSYS___WCSID_STD_A                   = 0x683 // 1667\n\tSYS___WCTOMB_A                      = 0x684 // 1668\n\tSYS___WCTOMB_ISO1                   = 0x685 // 1669\n\tSYS___WCTOMB_STD_A                  = 0x686 // 1670\n\tSYS___WCTOMB_UTF                    = 0x687 // 1671\n\tSYS___WCWIDTH_A                     = 0x688 // 1672\n\tSYS___GETGRNAM_R_A                  = 0x689 // 1673\n\tSYS___WCWIDTH_STD_A                 = 0x68A // 1674\n\tSYS___WCWIDTH_ASIA                  = 0x68B // 1675\n\tSYS___GETPWNAM_R_A                  = 0x68C // 1676\n\tSYS___GETPWUID_R_A                  = 0x68D // 1677\n\tSYS___GETLOGIN_R_A                  = 0x68E // 1678\n\tSYS___TTYNAME_R_A                   = 0x68F // 1679\n\tSYS___READDIR_R_A                   = 0x690 // 1680\n\tSYS___E2A_S                         = 0x691 // 1681\n\tSYS___FNMATCH_A                     = 0x692 // 1682\n\tSYS___FNMATCH_C_A                   = 0x693 // 1683\n\tSYS___EXECL_A                       = 0x694 // 1684\n\tSYS___FNMATCH_STD_A                 = 0x695 // 1685\n\tSYS___REGCOMP_A                     = 0x696 // 1686\n\tSYS___REGCOMP_STD_A                 = 0x697 // 1687\n\tSYS___REGERROR_A                    = 0x698 // 1688\n\tSYS___REGERROR_STD_A                = 0x699 // 1689\n\tSYS___REGEXEC_A                     = 0x69A // 1690\n\tSYS___REGEXEC_STD_A                 = 0x69B // 1691\n\tSYS___REGFREE_A                     = 0x69C // 1692\n\tSYS___REGFREE_STD_A                 = 0x69D // 1693\n\tSYS___STRCOLL_A                     = 0x69E // 1694\n\tSYS___STRCOLL_C_A                   = 0x69F // 1695\n\tSYS___EXECLE_A                      = 0x6A0 // 1696\n\tSYS___STRCOLL_STD_A                 = 0x6A1 // 1697\n\tSYS___STRXFRM_A                     = 0x6A2 // 1698\n\tSYS___STRXFRM_C_A                   = 0x6A3 // 1699\n\tSYS___EXECLP_A                      = 0x6A4 // 1700\n\tSYS___STRXFRM_STD_A                 = 0x6A5 // 1701\n\tSYS___WCSCOLL_A                     = 0x6A6 // 1702\n\tSYS___WCSCOLL_C_A                   = 0x6A7 // 1703\n\tSYS___WCSCOLL_STD_A                 = 0x6A8 // 1704\n\tSYS___WCSXFRM_A                     = 0x6A9 // 1705\n\tSYS___WCSXFRM_C_A                   = 0x6AA // 1706\n\tSYS___WCSXFRM_STD_A                 = 0x6AB // 1707\n\tSYS___COLLATE_INIT_A                = 0x6AC // 1708\n\tSYS___WCTYPE_A                      = 0x6AD // 1709\n\tSYS___GET_WCTYPE_STD_A              = 0x6AE // 1710\n\tSYS___CTYPE_INIT_A                  = 0x6AF // 1711\n\tSYS___ISWCTYPE_A                    = 0x6B0 // 1712\n\tSYS___EXECV_A                       = 0x6B1 // 1713\n\tSYS___IS_WCTYPE_STD_A               = 0x6B2 // 1714\n\tSYS___TOWLOWER_A                    = 0x6B3 // 1715\n\tSYS___TOWLOWER_STD_A                = 0x6B4 // 1716\n\tSYS___TOWUPPER_A                    = 0x6B5 // 1717\n\tSYS___TOWUPPER_STD_A                = 0x6B6 // 1718\n\tSYS___LOCALE_INIT_A                 = 0x6B7 // 1719\n\tSYS___LOCALECONV_A                  = 0x6B8 // 1720\n\tSYS___LOCALECONV_STD_A              = 0x6B9 // 1721\n\tSYS___NL_LANGINFO_A                 = 0x6BA // 1722\n\tSYS___NL_LNAGINFO_STD_A             = 0x6BB // 1723\n\tSYS___MONETARY_INIT_A               = 0x6BC // 1724\n\tSYS___STRFMON_A                     = 0x6BD // 1725\n\tSYS___STRFMON_STD_A                 = 0x6BE // 1726\n\tSYS___GETADDRINFO_A                 = 0x6BF // 1727\n\tSYS___CATGETS_A                     = 0x6C0 // 1728\n\tSYS___EXECVE_A                      = 0x6C1 // 1729\n\tSYS___EXECVP_A                      = 0x6C2 // 1730\n\tSYS___SPAWN_A                       = 0x6C3 // 1731\n\tSYS___GETNAMEINFO_A                 = 0x6C4 // 1732\n\tSYS___SPAWNP_A                      = 0x6C5 // 1733\n\tSYS___NUMERIC_INIT_A                = 0x6C6 // 1734\n\tSYS___RESP_INIT_A                   = 0x6C7 // 1735\n\tSYS___RPMATCH_A                     = 0x6C8 // 1736\n\tSYS___RPMATCH_C_A                   = 0x6C9 // 1737\n\tSYS___RPMATCH_STD_A                 = 0x6CA // 1738\n\tSYS___TIME_INIT_A                   = 0x6CB // 1739\n\tSYS___STRFTIME_A                    = 0x6CC // 1740\n\tSYS___STRFTIME_STD_A                = 0x6CD // 1741\n\tSYS___STRPTIME_A                    = 0x6CE // 1742\n\tSYS___STRPTIME_STD_A                = 0x6CF // 1743\n\tSYS___WCSFTIME_A                    = 0x6D0 // 1744\n\tSYS___WCSFTIME_STD_A                = 0x6D1 // 1745\n\tSYS_____SPAWN2_A                    = 0x6D2 // 1746\n\tSYS_____SPAWNP2_A                   = 0x6D3 // 1747\n\tSYS___SYNTAX_INIT_A                 = 0x6D4 // 1748\n\tSYS___TOD_INIT_A                    = 0x6D5 // 1749\n\tSYS___NL_CSINFO_A                   = 0x6D6 // 1750\n\tSYS___NL_MONINFO_A                  = 0x6D7 // 1751\n\tSYS___NL_NUMINFO_A                  = 0x6D8 // 1752\n\tSYS___NL_RESPINFO_A                 = 0x6D9 // 1753\n\tSYS___NL_TIMINFO_A                  = 0x6DA // 1754\n\tSYS___IF_NAMETOINDEX_A              = 0x6DB // 1755\n\tSYS___IF_INDEXTONAME_A              = 0x6DC // 1756\n\tSYS___PRINTF_A                      = 0x6DD // 1757\n\tSYS___ICONV_OPEN_A                  = 0x6DE // 1758\n\tSYS___DLLLOAD_A                     = 0x6DF // 1759\n\tSYS___DLLQUERYFN_A                  = 0x6E0 // 1760\n\tSYS___DLLQUERYVAR_A                 = 0x6E1 // 1761\n\tSYS_____CHATTR_A                    = 0x6E2 // 1762\n\tSYS___E2A_L                         = 0x6E3 // 1763\n\tSYS_____TOCCSID_A                   = 0x6E4 // 1764\n\tSYS_____TOCSNAME_A                  = 0x6E5 // 1765\n\tSYS_____CCSIDTYPE_A                 = 0x6E6 // 1766\n\tSYS_____CSNAMETYPE_A                = 0x6E7 // 1767\n\tSYS___CHMOD_A                       = 0x6E8 // 1768\n\tSYS___MKDIR_A                       = 0x6E9 // 1769\n\tSYS___STAT_A                        = 0x6EA // 1770\n\tSYS___STAT_O_A                      = 0x6EB // 1771\n\tSYS___MKFIFO_A                      = 0x6EC // 1772\n\tSYS_____OPEN_STAT_A                 = 0x6ED // 1773\n\tSYS___LSTAT_A                       = 0x6EE // 1774\n\tSYS___LSTAT_O_A                     = 0x6EF // 1775\n\tSYS___MKNOD_A                       = 0x6F0 // 1776\n\tSYS___MOUNT_A                       = 0x6F1 // 1777\n\tSYS___UMOUNT_A                      = 0x6F2 // 1778\n\tSYS___CHAUDIT_A                     = 0x6F4 // 1780\n\tSYS___W_GETMNTENT_A                 = 0x6F5 // 1781\n\tSYS___CREAT_A                       = 0x6F6 // 1782\n\tSYS___OPEN_A                        = 0x6F7 // 1783\n\tSYS___SETLOCALE_A                   = 0x6F9 // 1785\n\tSYS___FPRINTF_A                     = 0x6FA // 1786\n\tSYS___SPRINTF_A                     = 0x6FB // 1787\n\tSYS___VFPRINTF_A                    = 0x6FC // 1788\n\tSYS___VPRINTF_A                     = 0x6FD // 1789\n\tSYS___VSPRINTF_A                    = 0x6FE // 1790\n\tSYS___VSWPRINTF_A                   = 0x6FF // 1791\n\tSYS___SWPRINTF_A                    = 0x700 // 1792\n\tSYS___FSCANF_A                      = 0x701 // 1793\n\tSYS___SCANF_A                       = 0x702 // 1794\n\tSYS___SSCANF_A                      = 0x703 // 1795\n\tSYS___SWSCANF_A                     = 0x704 // 1796\n\tSYS___ATOF_A                        = 0x705 // 1797\n\tSYS___ATOI_A                        = 0x706 // 1798\n\tSYS___ATOL_A                        = 0x707 // 1799\n\tSYS___STRTOD_A                      = 0x708 // 1800\n\tSYS___STRTOL_A                      = 0x709 // 1801\n\tSYS___STRTOUL_A                     = 0x70A // 1802\n\tSYS_____AE_CORRESTBL_QUERY_A        = 0x70B // 1803\n\tSYS___A64L_A                        = 0x70C // 1804\n\tSYS___ECVT_A                        = 0x70D // 1805\n\tSYS___FCVT_A                        = 0x70E // 1806\n\tSYS___GCVT_A                        = 0x70F // 1807\n\tSYS___L64A_A                        = 0x710 // 1808\n\tSYS___STRERROR_A                    = 0x711 // 1809\n\tSYS___PERROR_A                      = 0x712 // 1810\n\tSYS___FETCH_A                       = 0x713 // 1811\n\tSYS___GETENV_A                      = 0x714 // 1812\n\tSYS___MKSTEMP_A                     = 0x717 // 1815\n\tSYS___PTSNAME_A                     = 0x718 // 1816\n\tSYS___PUTENV_A                      = 0x719 // 1817\n\tSYS___REALPATH_A                    = 0x71A // 1818\n\tSYS___SETENV_A                      = 0x71B // 1819\n\tSYS___SYSTEM_A                      = 0x71C // 1820\n\tSYS___GETOPT_A                      = 0x71D // 1821\n\tSYS___CATOPEN_A                     = 0x71E // 1822\n\tSYS___ACCESS_A                      = 0x71F // 1823\n\tSYS___CHDIR_A                       = 0x720 // 1824\n\tSYS___CHOWN_A                       = 0x721 // 1825\n\tSYS___CHROOT_A                      = 0x722 // 1826\n\tSYS___GETCWD_A                      = 0x723 // 1827\n\tSYS___GETWD_A                       = 0x724 // 1828\n\tSYS___LCHOWN_A                      = 0x725 // 1829\n\tSYS___LINK_A                        = 0x726 // 1830\n\tSYS___PATHCONF_A                    = 0x727 // 1831\n\tSYS___IF_NAMEINDEX_A                = 0x728 // 1832\n\tSYS___READLINK_A                    = 0x729 // 1833\n\tSYS___RMDIR_A                       = 0x72A // 1834\n\tSYS___STATVFS_A                     = 0x72B // 1835\n\tSYS___SYMLINK_A                     = 0x72C // 1836\n\tSYS___TRUNCATE_A                    = 0x72D // 1837\n\tSYS___UNLINK_A                      = 0x72E // 1838\n\tSYS___GAI_STRERROR_A                = 0x72F // 1839\n\tSYS___EXTLINK_NP_A                  = 0x730 // 1840\n\tSYS___ISALNUM_A                     = 0x731 // 1841\n\tSYS___ISALPHA_A                     = 0x732 // 1842\n\tSYS___A2E_S                         = 0x733 // 1843\n\tSYS___ISCNTRL_A                     = 0x734 // 1844\n\tSYS___ISDIGIT_A                     = 0x735 // 1845\n\tSYS___ISGRAPH_A                     = 0x736 // 1846\n\tSYS___ISLOWER_A                     = 0x737 // 1847\n\tSYS___ISPRINT_A                     = 0x738 // 1848\n\tSYS___ISPUNCT_A                     = 0x739 // 1849\n\tSYS___ISSPACE_A                     = 0x73A // 1850\n\tSYS___ISUPPER_A                     = 0x73B // 1851\n\tSYS___ISXDIGIT_A                    = 0x73C // 1852\n\tSYS___TOLOWER_A                     = 0x73D // 1853\n\tSYS___TOUPPER_A                     = 0x73E // 1854\n\tSYS___ISWALNUM_A                    = 0x73F // 1855\n\tSYS___ISWALPHA_A                    = 0x740 // 1856\n\tSYS___A2E_L                         = 0x741 // 1857\n\tSYS___ISWCNTRL_A                    = 0x742 // 1858\n\tSYS___ISWDIGIT_A                    = 0x743 // 1859\n\tSYS___ISWGRAPH_A                    = 0x744 // 1860\n\tSYS___ISWLOWER_A                    = 0x745 // 1861\n\tSYS___ISWPRINT_A                    = 0x746 // 1862\n\tSYS___ISWPUNCT_A                    = 0x747 // 1863\n\tSYS___ISWSPACE_A                    = 0x748 // 1864\n\tSYS___ISWUPPER_A                    = 0x749 // 1865\n\tSYS___ISWXDIGIT_A                   = 0x74A // 1866\n\tSYS___CONFSTR_A                     = 0x74B // 1867\n\tSYS___FTOK_A                        = 0x74C // 1868\n\tSYS___MKTEMP_A                      = 0x74D // 1869\n\tSYS___FDOPEN_A                      = 0x74E // 1870\n\tSYS___FLDATA_A                      = 0x74F // 1871\n\tSYS___REMOVE_A                      = 0x750 // 1872\n\tSYS___RENAME_A                      = 0x751 // 1873\n\tSYS___TMPNAM_A                      = 0x752 // 1874\n\tSYS___FOPEN_A                       = 0x753 // 1875\n\tSYS___FREOPEN_A                     = 0x754 // 1876\n\tSYS___CUSERID_A                     = 0x755 // 1877\n\tSYS___POPEN_A                       = 0x756 // 1878\n\tSYS___TEMPNAM_A                     = 0x757 // 1879\n\tSYS___FTW_A                         = 0x758 // 1880\n\tSYS___GETGRENT_A                    = 0x759 // 1881\n\tSYS___GETGRGID_A                    = 0x75A // 1882\n\tSYS___GETGRNAM_A                    = 0x75B // 1883\n\tSYS___GETGROUPSBYNAME_A             = 0x75C // 1884\n\tSYS___GETHOSTENT_A                  = 0x75D // 1885\n\tSYS___GETHOSTNAME_A                 = 0x75E // 1886\n\tSYS___GETLOGIN_A                    = 0x75F // 1887\n\tSYS___INET_NTOP_A                   = 0x760 // 1888\n\tSYS___GETPASS_A                     = 0x761 // 1889\n\tSYS___GETPWENT_A                    = 0x762 // 1890\n\tSYS___GETPWNAM_A                    = 0x763 // 1891\n\tSYS___GETPWUID_A                    = 0x764 // 1892\n\tSYS_____CHECK_RESOURCE_AUTH_NP_A    = 0x765 // 1893\n\tSYS___CHECKSCHENV_A                 = 0x766 // 1894\n\tSYS___CONNECTSERVER_A               = 0x767 // 1895\n\tSYS___CONNECTWORKMGR_A              = 0x768 // 1896\n\tSYS_____CONSOLE_A                   = 0x769 // 1897\n\tSYS___CREATEWORKUNIT_A              = 0x76A // 1898\n\tSYS___CTERMID_A                     = 0x76B // 1899\n\tSYS___FMTMSG_A                      = 0x76C // 1900\n\tSYS___INITGROUPS_A                  = 0x76D // 1901\n\tSYS_____LOGIN_A                     = 0x76E // 1902\n\tSYS___MSGRCV_A                      = 0x76F // 1903\n\tSYS___MSGSND_A                      = 0x770 // 1904\n\tSYS___MSGXRCV_A                     = 0x771 // 1905\n\tSYS___NFTW_A                        = 0x772 // 1906\n\tSYS_____PASSWD_A                    = 0x773 // 1907\n\tSYS___PTHREAD_SECURITY_NP_A         = 0x774 // 1908\n\tSYS___QUERYMETRICS_A                = 0x775 // 1909\n\tSYS___QUERYSCHENV                   = 0x776 // 1910\n\tSYS___READV_A                       = 0x777 // 1911\n\tSYS_____SERVER_CLASSIFY_A           = 0x778 // 1912\n\tSYS_____SERVER_INIT_A               = 0x779 // 1913\n\tSYS_____SERVER_PWU_A                = 0x77A // 1914\n\tSYS___STRCASECMP_A                  = 0x77B // 1915\n\tSYS___STRNCASECMP_A                 = 0x77C // 1916\n\tSYS___TTYNAME_A                     = 0x77D // 1917\n\tSYS___UNAME_A                       = 0x77E // 1918\n\tSYS___UTIMES_A                      = 0x77F // 1919\n\tSYS___W_GETPSENT_A                  = 0x780 // 1920\n\tSYS___WRITEV_A                      = 0x781 // 1921\n\tSYS___W_STATFS_A                    = 0x782 // 1922\n\tSYS___W_STATVFS_A                   = 0x783 // 1923\n\tSYS___FPUTC_A                       = 0x784 // 1924\n\tSYS___PUTCHAR_A                     = 0x785 // 1925\n\tSYS___PUTS_A                        = 0x786 // 1926\n\tSYS___FGETS_A                       = 0x787 // 1927\n\tSYS___GETS_A                        = 0x788 // 1928\n\tSYS___FPUTS_A                       = 0x789 // 1929\n\tSYS___FREAD_A                       = 0x78A // 1930\n\tSYS___FWRITE_A                      = 0x78B // 1931\n\tSYS___OPEN_O_A                      = 0x78C // 1932\n\tSYS___ISASCII                       = 0x78D // 1933\n\tSYS___CREAT_O_A                     = 0x78E // 1934\n\tSYS___ENVNA                         = 0x78F // 1935\n\tSYS___PUTC_A                        = 0x790 // 1936\n\tSYS___AE_THREAD_SETMODE             = 0x791 // 1937\n\tSYS___AE_THREAD_SWAPMODE            = 0x792 // 1938\n\tSYS___GETNETBYADDR_A                = 0x793 // 1939\n\tSYS___GETNETBYNAME_A                = 0x794 // 1940\n\tSYS___GETNETENT_A                   = 0x795 // 1941\n\tSYS___GETPROTOBYNAME_A              = 0x796 // 1942\n\tSYS___GETPROTOBYNUMBER_A            = 0x797 // 1943\n\tSYS___GETPROTOENT_A                 = 0x798 // 1944\n\tSYS___GETSERVBYNAME_A               = 0x799 // 1945\n\tSYS___GETSERVBYPORT_A               = 0x79A // 1946\n\tSYS___GETSERVENT_A                  = 0x79B // 1947\n\tSYS___ASCTIME_A                     = 0x79C // 1948\n\tSYS___CTIME_A                       = 0x79D // 1949\n\tSYS___GETDATE_A                     = 0x79E // 1950\n\tSYS___TZSET_A                       = 0x79F // 1951\n\tSYS___UTIME_A                       = 0x7A0 // 1952\n\tSYS___ASCTIME_R_A                   = 0x7A1 // 1953\n\tSYS___CTIME_R_A                     = 0x7A2 // 1954\n\tSYS___STRTOLL_A                     = 0x7A3 // 1955\n\tSYS___STRTOULL_A                    = 0x7A4 // 1956\n\tSYS___FPUTWC_A                      = 0x7A5 // 1957\n\tSYS___PUTWC_A                       = 0x7A6 // 1958\n\tSYS___PUTWCHAR_A                    = 0x7A7 // 1959\n\tSYS___FPUTWS_A                      = 0x7A8 // 1960\n\tSYS___UNGETWC_A                     = 0x7A9 // 1961\n\tSYS___FGETWC_A                      = 0x7AA // 1962\n\tSYS___GETWC_A                       = 0x7AB // 1963\n\tSYS___GETWCHAR_A                    = 0x7AC // 1964\n\tSYS___FGETWS_A                      = 0x7AD // 1965\n\tSYS___GETTIMEOFDAY_A                = 0x7AE // 1966\n\tSYS___GMTIME_A                      = 0x7AF // 1967\n\tSYS___GMTIME_R_A                    = 0x7B0 // 1968\n\tSYS___LOCALTIME_A                   = 0x7B1 // 1969\n\tSYS___LOCALTIME_R_A                 = 0x7B2 // 1970\n\tSYS___MKTIME_A                      = 0x7B3 // 1971\n\tSYS___TZZNA                         = 0x7B4 // 1972\n\tSYS_UNATEXIT                        = 0x7B5 // 1973\n\tSYS___CEE3DMP_A                     = 0x7B6 // 1974\n\tSYS___CDUMP_A                       = 0x7B7 // 1975\n\tSYS___CSNAP_A                       = 0x7B8 // 1976\n\tSYS___CTEST_A                       = 0x7B9 // 1977\n\tSYS___CTRACE_A                      = 0x7BA // 1978\n\tSYS___VSWPRNTF2_A                   = 0x7BB // 1979\n\tSYS___INET_PTON_A                   = 0x7BC // 1980\n\tSYS___SYSLOG_A                      = 0x7BD // 1981\n\tSYS___CRYPT_A                       = 0x7BE // 1982\n\tSYS_____OPENDIR2_A                  = 0x7BF // 1983\n\tSYS_____READDIR2_A                  = 0x7C0 // 1984\n\tSYS___OPENDIR_A                     = 0x7C2 // 1986\n\tSYS___READDIR_A                     = 0x7C3 // 1987\n\tSYS_PREAD                           = 0x7C7 // 1991\n\tSYS_PWRITE                          = 0x7C8 // 1992\n\tSYS_M_CREATE_LAYOUT                 = 0x7C9 // 1993\n\tSYS_M_DESTROY_LAYOUT                = 0x7CA // 1994\n\tSYS_M_GETVALUES_LAYOUT              = 0x7CB // 1995\n\tSYS_M_SETVALUES_LAYOUT              = 0x7CC // 1996\n\tSYS_M_TRANSFORM_LAYOUT              = 0x7CD // 1997\n\tSYS_M_WTRANSFORM_LAYOUT             = 0x7CE // 1998\n\tSYS_FWPRINTF                        = 0x7D1 // 2001\n\tSYS_WPRINTF                         = 0x7D2 // 2002\n\tSYS_VFWPRINT                        = 0x7D3 // 2003\n\tSYS_VFWPRINTF                       = 0x7D3 // 2003\n\tSYS_VWPRINTF                        = 0x7D4 // 2004\n\tSYS_FWSCANF                         = 0x7D5 // 2005\n\tSYS_WSCANF                          = 0x7D6 // 2006\n\tSYS_WCTRANS                         = 0x7D7 // 2007\n\tSYS_TOWCTRAN                        = 0x7D8 // 2008\n\tSYS_TOWCTRANS                       = 0x7D8 // 2008\n\tSYS___WCSTOD_A                      = 0x7D9 // 2009\n\tSYS___WCSTOL_A                      = 0x7DA // 2010\n\tSYS___WCSTOUL_A                     = 0x7DB // 2011\n\tSYS___BASENAME_A                    = 0x7DC // 2012\n\tSYS___DIRNAME_A                     = 0x7DD // 2013\n\tSYS___GLOB_A                        = 0x7DE // 2014\n\tSYS_FWIDE                           = 0x7DF // 2015\n\tSYS___OSNAME                        = 0x7E0 // 2016\n\tSYS_____OSNAME_A                    = 0x7E1 // 2017\n\tSYS___BTOWC_A                       = 0x7E4 // 2020\n\tSYS___WCTOB_A                       = 0x7E5 // 2021\n\tSYS___DBM_OPEN_A                    = 0x7E6 // 2022\n\tSYS___VFPRINTF2_A                   = 0x7E7 // 2023\n\tSYS___VPRINTF2_A                    = 0x7E8 // 2024\n\tSYS___VSPRINTF2_A                   = 0x7E9 // 2025\n\tSYS___CEIL_H                        = 0x7EA // 2026\n\tSYS___FLOOR_H                       = 0x7EB // 2027\n\tSYS___MODF_H                        = 0x7EC // 2028\n\tSYS___FABS_H                        = 0x7ED // 2029\n\tSYS___J0_H                          = 0x7EE // 2030\n\tSYS___J1_H                          = 0x7EF // 2031\n\tSYS___JN_H                          = 0x7F0 // 2032\n\tSYS___Y0_H                          = 0x7F1 // 2033\n\tSYS___Y1_H                          = 0x7F2 // 2034\n\tSYS___YN_H                          = 0x7F3 // 2035\n\tSYS___CEILF_H                       = 0x7F4 // 2036\n\tSYS___CEILL_H                       = 0x7F5 // 2037\n\tSYS___FLOORF_H                      = 0x7F6 // 2038\n\tSYS___FLOORL_H                      = 0x7F7 // 2039\n\tSYS___MODFF_H                       = 0x7F8 // 2040\n\tSYS___MODFL_H                       = 0x7F9 // 2041\n\tSYS___FABSF_H                       = 0x7FA // 2042\n\tSYS___FABSL_H                       = 0x7FB // 2043\n\tSYS___MALLOC24                      = 0x7FC // 2044\n\tSYS___MALLOC31                      = 0x7FD // 2045\n\tSYS_ACL_INIT                        = 0x7FE // 2046\n\tSYS_ACL_FREE                        = 0x7FF // 2047\n\tSYS_ACL_FIRST_ENTRY                 = 0x800 // 2048\n\tSYS_ACL_GET_ENTRY                   = 0x801 // 2049\n\tSYS_ACL_VALID                       = 0x802 // 2050\n\tSYS_ACL_CREATE_ENTRY                = 0x803 // 2051\n\tSYS_ACL_DELETE_ENTRY                = 0x804 // 2052\n\tSYS_ACL_UPDATE_ENTRY                = 0x805 // 2053\n\tSYS_ACL_DELETE_FD                   = 0x806 // 2054\n\tSYS_ACL_DELETE_FILE                 = 0x807 // 2055\n\tSYS_ACL_GET_FD                      = 0x808 // 2056\n\tSYS_ACL_GET_FILE                    = 0x809 // 2057\n\tSYS_ACL_SET_FD                      = 0x80A // 2058\n\tSYS_ACL_SET_FILE                    = 0x80B // 2059\n\tSYS_ACL_FROM_TEXT                   = 0x80C // 2060\n\tSYS_ACL_TO_TEXT                     = 0x80D // 2061\n\tSYS_ACL_SORT                        = 0x80E // 2062\n\tSYS___SHUTDOWN_REGISTRATION         = 0x80F // 2063\n\tSYS___ERFL_B                        = 0x810 // 2064\n\tSYS___ERFCL_B                       = 0x811 // 2065\n\tSYS___LGAMMAL_B                     = 0x812 // 2066\n\tSYS___SETHOOKEVENTS                 = 0x813 // 2067\n\tSYS_IF_NAMETOINDEX                  = 0x814 // 2068\n\tSYS_IF_INDEXTONAME                  = 0x815 // 2069\n\tSYS_IF_NAMEINDEX                    = 0x816 // 2070\n\tSYS_IF_FREENAMEINDEX                = 0x817 // 2071\n\tSYS_GETADDRINFO                     = 0x818 // 2072\n\tSYS_GETNAMEINFO                     = 0x819 // 2073\n\tSYS_FREEADDRINFO                    = 0x81A // 2074\n\tSYS_GAI_STRERROR                    = 0x81B // 2075\n\tSYS_REXEC_AF                        = 0x81C // 2076\n\tSYS___POE                           = 0x81D // 2077\n\tSYS___DYNALLOC_A                    = 0x81F // 2079\n\tSYS___DYNFREE_A                     = 0x820 // 2080\n\tSYS___RES_QUERY_A                   = 0x821 // 2081\n\tSYS___RES_SEARCH_A                  = 0x822 // 2082\n\tSYS___RES_QUERYDOMAIN_A             = 0x823 // 2083\n\tSYS___RES_MKQUERY_A                 = 0x824 // 2084\n\tSYS___RES_SEND_A                    = 0x825 // 2085\n\tSYS___DN_EXPAND_A                   = 0x826 // 2086\n\tSYS___DN_SKIPNAME_A                 = 0x827 // 2087\n\tSYS___DN_COMP_A                     = 0x828 // 2088\n\tSYS___DN_FIND_A                     = 0x829 // 2089\n\tSYS___NLIST_A                       = 0x82A // 2090\n\tSYS_____TCGETCP_A                   = 0x82B // 2091\n\tSYS_____TCSETCP_A                   = 0x82C // 2092\n\tSYS_____W_PIOCTL_A                  = 0x82E // 2094\n\tSYS___INET_ADDR_A                   = 0x82F // 2095\n\tSYS___INET_NTOA_A                   = 0x830 // 2096\n\tSYS___INET_NETWORK_A                = 0x831 // 2097\n\tSYS___ACCEPT_A                      = 0x832 // 2098\n\tSYS___ACCEPT_AND_RECV_A             = 0x833 // 2099\n\tSYS___BIND_A                        = 0x834 // 2100\n\tSYS___CONNECT_A                     = 0x835 // 2101\n\tSYS___GETPEERNAME_A                 = 0x836 // 2102\n\tSYS___GETSOCKNAME_A                 = 0x837 // 2103\n\tSYS___RECVFROM_A                    = 0x838 // 2104\n\tSYS___SENDTO_A                      = 0x839 // 2105\n\tSYS___SENDMSG_A                     = 0x83A // 2106\n\tSYS___RECVMSG_A                     = 0x83B // 2107\n\tSYS_____LCHATTR_A                   = 0x83C // 2108\n\tSYS___CABEND                        = 0x83D // 2109\n\tSYS___LE_CIB_GET                    = 0x83E // 2110\n\tSYS___SET_LAA_FOR_JIT               = 0x83F // 2111\n\tSYS___LCHATTR                       = 0x840 // 2112\n\tSYS___WRITEDOWN                     = 0x841 // 2113\n\tSYS_PTHREAD_MUTEX_INIT2             = 0x842 // 2114\n\tSYS___ACOSHF_B                      = 0x843 // 2115\n\tSYS___ACOSHL_B                      = 0x844 // 2116\n\tSYS___ASINHF_B                      = 0x845 // 2117\n\tSYS___ASINHL_B                      = 0x846 // 2118\n\tSYS___ATANHF_B                      = 0x847 // 2119\n\tSYS___ATANHL_B                      = 0x848 // 2120\n\tSYS___CBRTF_B                       = 0x849 // 2121\n\tSYS___CBRTL_B                       = 0x84A // 2122\n\tSYS___COPYSIGNF_B                   = 0x84B // 2123\n\tSYS___COPYSIGNL_B                   = 0x84C // 2124\n\tSYS___COTANF_B                      = 0x84D // 2125\n\tSYS___COTAN_B                       = 0x84E // 2126\n\tSYS___COTANL_B                      = 0x84F // 2127\n\tSYS___EXP2F_B                       = 0x850 // 2128\n\tSYS___EXP2L_B                       = 0x851 // 2129\n\tSYS___EXPM1F_B                      = 0x852 // 2130\n\tSYS___EXPM1L_B                      = 0x853 // 2131\n\tSYS___FDIMF_B                       = 0x854 // 2132\n\tSYS___FDIM_B                        = 0x855 // 2133\n\tSYS___FDIML_B                       = 0x856 // 2134\n\tSYS___HYPOTF_B                      = 0x857 // 2135\n\tSYS___HYPOTL_B                      = 0x858 // 2136\n\tSYS___LOG1PF_B                      = 0x859 // 2137\n\tSYS___LOG1PL_B                      = 0x85A // 2138\n\tSYS___LOG2F_B                       = 0x85B // 2139\n\tSYS___LOG2_B                        = 0x85C // 2140\n\tSYS___LOG2L_B                       = 0x85D // 2141\n\tSYS___REMAINDERF_B                  = 0x85E // 2142\n\tSYS___REMAINDERL_B                  = 0x85F // 2143\n\tSYS___REMQUOF_B                     = 0x860 // 2144\n\tSYS___REMQUO_B                      = 0x861 // 2145\n\tSYS___REMQUOL_B                     = 0x862 // 2146\n\tSYS___TGAMMAF_B                     = 0x863 // 2147\n\tSYS___TGAMMA_B                      = 0x864 // 2148\n\tSYS___TGAMMAL_B                     = 0x865 // 2149\n\tSYS___TRUNCF_B                      = 0x866 // 2150\n\tSYS___TRUNC_B                       = 0x867 // 2151\n\tSYS___TRUNCL_B                      = 0x868 // 2152\n\tSYS___LGAMMAF_B                     = 0x869 // 2153\n\tSYS___LROUNDF_B                     = 0x86A // 2154\n\tSYS___LROUND_B                      = 0x86B // 2155\n\tSYS___ERFF_B                        = 0x86C // 2156\n\tSYS___ERFCF_B                       = 0x86D // 2157\n\tSYS_ACOSHF                          = 0x86E // 2158\n\tSYS_ACOSHL                          = 0x86F // 2159\n\tSYS_ASINHF                          = 0x870 // 2160\n\tSYS_ASINHL                          = 0x871 // 2161\n\tSYS_ATANHF                          = 0x872 // 2162\n\tSYS_ATANHL                          = 0x873 // 2163\n\tSYS_CBRTF                           = 0x874 // 2164\n\tSYS_CBRTL                           = 0x875 // 2165\n\tSYS_COPYSIGNF                       = 0x876 // 2166\n\tSYS_CPYSIGNF                        = 0x876 // 2166\n\tSYS_COPYSIGNL                       = 0x877 // 2167\n\tSYS_CPYSIGNL                        = 0x877 // 2167\n\tSYS_COTANF                          = 0x878 // 2168\n\tSYS___COTANF                        = 0x878 // 2168\n\tSYS_COTAN                           = 0x879 // 2169\n\tSYS___COTAN                         = 0x879 // 2169\n\tSYS_COTANL                          = 0x87A // 2170\n\tSYS___COTANL                        = 0x87A // 2170\n\tSYS_EXP2F                           = 0x87B // 2171\n\tSYS_EXP2L                           = 0x87C // 2172\n\tSYS_EXPM1F                          = 0x87D // 2173\n\tSYS_EXPM1L                          = 0x87E // 2174\n\tSYS_FDIMF                           = 0x87F // 2175\n\tSYS_FDIM                            = 0x881 // 2177\n\tSYS_FDIML                           = 0x882 // 2178\n\tSYS_HYPOTF                          = 0x883 // 2179\n\tSYS_HYPOTL                          = 0x884 // 2180\n\tSYS_LOG1PF                          = 0x885 // 2181\n\tSYS_LOG1PL                          = 0x886 // 2182\n\tSYS_LOG2F                           = 0x887 // 2183\n\tSYS_LOG2                            = 0x888 // 2184\n\tSYS_LOG2L                           = 0x889 // 2185\n\tSYS_REMAINDERF                      = 0x88A // 2186\n\tSYS_REMAINDF                        = 0x88A // 2186\n\tSYS_REMAINDERL                      = 0x88B // 2187\n\tSYS_REMAINDL                        = 0x88B // 2187\n\tSYS_REMQUOF                         = 0x88C // 2188\n\tSYS_REMQUO                          = 0x88D // 2189\n\tSYS_REMQUOL                         = 0x88E // 2190\n\tSYS_TGAMMAF                         = 0x88F // 2191\n\tSYS_TGAMMA                          = 0x890 // 2192\n\tSYS_TGAMMAL                         = 0x891 // 2193\n\tSYS_TRUNCF                          = 0x892 // 2194\n\tSYS_TRUNC                           = 0x893 // 2195\n\tSYS_TRUNCL                          = 0x894 // 2196\n\tSYS_LGAMMAF                         = 0x895 // 2197\n\tSYS_LGAMMAL                         = 0x896 // 2198\n\tSYS_LROUNDF                         = 0x897 // 2199\n\tSYS_LROUND                          = 0x898 // 2200\n\tSYS_ERFF                            = 0x899 // 2201\n\tSYS_ERFL                            = 0x89A // 2202\n\tSYS_ERFCF                           = 0x89B // 2203\n\tSYS_ERFCL                           = 0x89C // 2204\n\tSYS___EXP2_B                        = 0x89D // 2205\n\tSYS_EXP2                            = 0x89E // 2206\n\tSYS___FAR_JUMP                      = 0x89F // 2207\n\tSYS___TCGETATTR_A                   = 0x8A1 // 2209\n\tSYS___TCSETATTR_A                   = 0x8A2 // 2210\n\tSYS___SUPERKILL                     = 0x8A4 // 2212\n\tSYS___LE_CONDITION_TOKEN_BUILD      = 0x8A5 // 2213\n\tSYS___LE_MSG_ADD_INSERT             = 0x8A6 // 2214\n\tSYS___LE_MSG_GET                    = 0x8A7 // 2215\n\tSYS___LE_MSG_GET_AND_WRITE          = 0x8A8 // 2216\n\tSYS___LE_MSG_WRITE                  = 0x8A9 // 2217\n\tSYS___ITOA                          = 0x8AA // 2218\n\tSYS___UTOA                          = 0x8AB // 2219\n\tSYS___LTOA                          = 0x8AC // 2220\n\tSYS___ULTOA                         = 0x8AD // 2221\n\tSYS___LLTOA                         = 0x8AE // 2222\n\tSYS___ULLTOA                        = 0x8AF // 2223\n\tSYS___ITOA_A                        = 0x8B0 // 2224\n\tSYS___UTOA_A                        = 0x8B1 // 2225\n\tSYS___LTOA_A                        = 0x8B2 // 2226\n\tSYS___ULTOA_A                       = 0x8B3 // 2227\n\tSYS___LLTOA_A                       = 0x8B4 // 2228\n\tSYS___ULLTOA_A                      = 0x8B5 // 2229\n\tSYS_____GETENV_A                    = 0x8C3 // 2243\n\tSYS___REXEC_A                       = 0x8C4 // 2244\n\tSYS___REXEC_AF_A                    = 0x8C5 // 2245\n\tSYS___GETUTXENT_A                   = 0x8C6 // 2246\n\tSYS___GETUTXID_A                    = 0x8C7 // 2247\n\tSYS___GETUTXLINE_A                  = 0x8C8 // 2248\n\tSYS___PUTUTXLINE_A                  = 0x8C9 // 2249\n\tSYS_____UTMPXNAME_A                 = 0x8CA // 2250\n\tSYS___PUTC_UNLOCKED_A               = 0x8CB // 2251\n\tSYS___PUTCHAR_UNLOCKED_A            = 0x8CC // 2252\n\tSYS___SNPRINTF_A                    = 0x8CD // 2253\n\tSYS___VSNPRINTF_A                   = 0x8CE // 2254\n\tSYS___DLOPEN_A                      = 0x8D0 // 2256\n\tSYS___DLSYM_A                       = 0x8D1 // 2257\n\tSYS___DLERROR_A                     = 0x8D2 // 2258\n\tSYS_FLOCKFILE                       = 0x8D3 // 2259\n\tSYS_FTRYLOCKFILE                    = 0x8D4 // 2260\n\tSYS_FUNLOCKFILE                     = 0x8D5 // 2261\n\tSYS_GETC_UNLOCKED                   = 0x8D6 // 2262\n\tSYS_GETCHAR_UNLOCKED                = 0x8D7 // 2263\n\tSYS_PUTC_UNLOCKED                   = 0x8D8 // 2264\n\tSYS_PUTCHAR_UNLOCKED                = 0x8D9 // 2265\n\tSYS_SNPRINTF                        = 0x8DA // 2266\n\tSYS_VSNPRINTF                       = 0x8DB // 2267\n\tSYS_DLOPEN                          = 0x8DD // 2269\n\tSYS_DLSYM                           = 0x8DE // 2270\n\tSYS_DLCLOSE                         = 0x8DF // 2271\n\tSYS_DLERROR                         = 0x8E0 // 2272\n\tSYS___SET_EXCEPTION_HANDLER         = 0x8E2 // 2274\n\tSYS___RESET_EXCEPTION_HANDLER       = 0x8E3 // 2275\n\tSYS___VHM_EVENT                     = 0x8E4 // 2276\n\tSYS___ABS_H                         = 0x8E6 // 2278\n\tSYS___ABSF_H                        = 0x8E7 // 2279\n\tSYS___ABSL_H                        = 0x8E8 // 2280\n\tSYS___ACOS_H                        = 0x8E9 // 2281\n\tSYS___ACOSF_H                       = 0x8EA // 2282\n\tSYS___ACOSL_H                       = 0x8EB // 2283\n\tSYS___ACOSH_H                       = 0x8EC // 2284\n\tSYS___ASIN_H                        = 0x8ED // 2285\n\tSYS___ASINF_H                       = 0x8EE // 2286\n\tSYS___ASINL_H                       = 0x8EF // 2287\n\tSYS___ASINH_H                       = 0x8F0 // 2288\n\tSYS___ATAN_H                        = 0x8F1 // 2289\n\tSYS___ATANF_H                       = 0x8F2 // 2290\n\tSYS___ATANL_H                       = 0x8F3 // 2291\n\tSYS___ATANH_H                       = 0x8F4 // 2292\n\tSYS___ATANHF_H                      = 0x8F5 // 2293\n\tSYS___ATANHL_H                      = 0x8F6 // 2294\n\tSYS___ATAN2_H                       = 0x8F7 // 2295\n\tSYS___ATAN2F_H                      = 0x8F8 // 2296\n\tSYS___ATAN2L_H                      = 0x8F9 // 2297\n\tSYS___CBRT_H                        = 0x8FA // 2298\n\tSYS___COPYSIGNF_H                   = 0x8FB // 2299\n\tSYS___COPYSIGNL_H                   = 0x8FC // 2300\n\tSYS___COS_H                         = 0x8FD // 2301\n\tSYS___COSF_H                        = 0x8FE // 2302\n\tSYS___COSL_H                        = 0x8FF // 2303\n\tSYS___COSHF_H                       = 0x900 // 2304\n\tSYS___COSHL_H                       = 0x901 // 2305\n\tSYS___COTAN_H                       = 0x902 // 2306\n\tSYS___COTANF_H                      = 0x903 // 2307\n\tSYS___COTANL_H                      = 0x904 // 2308\n\tSYS___ERF_H                         = 0x905 // 2309\n\tSYS___ERFF_H                        = 0x906 // 2310\n\tSYS___ERFL_H                        = 0x907 // 2311\n\tSYS___ERFC_H                        = 0x908 // 2312\n\tSYS___ERFCF_H                       = 0x909 // 2313\n\tSYS___ERFCL_H                       = 0x90A // 2314\n\tSYS___EXP_H                         = 0x90B // 2315\n\tSYS___EXPF_H                        = 0x90C // 2316\n\tSYS___EXPL_H                        = 0x90D // 2317\n\tSYS___EXPM1_H                       = 0x90E // 2318\n\tSYS___FDIM_H                        = 0x90F // 2319\n\tSYS___FDIMF_H                       = 0x910 // 2320\n\tSYS___FDIML_H                       = 0x911 // 2321\n\tSYS___FMOD_H                        = 0x912 // 2322\n\tSYS___FMODF_H                       = 0x913 // 2323\n\tSYS___FMODL_H                       = 0x914 // 2324\n\tSYS___GAMMA_H                       = 0x915 // 2325\n\tSYS___HYPOT_H                       = 0x916 // 2326\n\tSYS___ILOGB_H                       = 0x917 // 2327\n\tSYS___LGAMMA_H                      = 0x918 // 2328\n\tSYS___LGAMMAF_H                     = 0x919 // 2329\n\tSYS___LOG_H                         = 0x91A // 2330\n\tSYS___LOGF_H                        = 0x91B // 2331\n\tSYS___LOGL_H                        = 0x91C // 2332\n\tSYS___LOGB_H                        = 0x91D // 2333\n\tSYS___LOG2_H                        = 0x91E // 2334\n\tSYS___LOG2F_H                       = 0x91F // 2335\n\tSYS___LOG2L_H                       = 0x920 // 2336\n\tSYS___LOG1P_H                       = 0x921 // 2337\n\tSYS___LOG10_H                       = 0x922 // 2338\n\tSYS___LOG10F_H                      = 0x923 // 2339\n\tSYS___LOG10L_H                      = 0x924 // 2340\n\tSYS___LROUND_H                      = 0x925 // 2341\n\tSYS___LROUNDF_H                     = 0x926 // 2342\n\tSYS___NEXTAFTER_H                   = 0x927 // 2343\n\tSYS___POW_H                         = 0x928 // 2344\n\tSYS___POWF_H                        = 0x929 // 2345\n\tSYS___POWL_H                        = 0x92A // 2346\n\tSYS___REMAINDER_H                   = 0x92B // 2347\n\tSYS___RINT_H                        = 0x92C // 2348\n\tSYS___SCALB_H                       = 0x92D // 2349\n\tSYS___SIN_H                         = 0x92E // 2350\n\tSYS___SINF_H                        = 0x92F // 2351\n\tSYS___SINL_H                        = 0x930 // 2352\n\tSYS___SINH_H                        = 0x931 // 2353\n\tSYS___SINHF_H                       = 0x932 // 2354\n\tSYS___SINHL_H                       = 0x933 // 2355\n\tSYS___SQRT_H                        = 0x934 // 2356\n\tSYS___SQRTF_H                       = 0x935 // 2357\n\tSYS___SQRTL_H                       = 0x936 // 2358\n\tSYS___TAN_H                         = 0x937 // 2359\n\tSYS___TANF_H                        = 0x938 // 2360\n\tSYS___TANL_H                        = 0x939 // 2361\n\tSYS___TANH_H                        = 0x93A // 2362\n\tSYS___TANHF_H                       = 0x93B // 2363\n\tSYS___TANHL_H                       = 0x93C // 2364\n\tSYS___TGAMMA_H                      = 0x93D // 2365\n\tSYS___TGAMMAF_H                     = 0x93E // 2366\n\tSYS___TRUNC_H                       = 0x93F // 2367\n\tSYS___TRUNCF_H                      = 0x940 // 2368\n\tSYS___TRUNCL_H                      = 0x941 // 2369\n\tSYS___COSH_H                        = 0x942 // 2370\n\tSYS___LE_DEBUG_SET_RESUME_MCH       = 0x943 // 2371\n\tSYS_VFSCANF                         = 0x944 // 2372\n\tSYS_VSCANF                          = 0x946 // 2374\n\tSYS_VSSCANF                         = 0x948 // 2376\n\tSYS_VFWSCANF                        = 0x94A // 2378\n\tSYS_VWSCANF                         = 0x94C // 2380\n\tSYS_VSWSCANF                        = 0x94E // 2382\n\tSYS_IMAXABS                         = 0x950 // 2384\n\tSYS_IMAXDIV                         = 0x951 // 2385\n\tSYS_STRTOIMAX                       = 0x952 // 2386\n\tSYS_STRTOUMAX                       = 0x953 // 2387\n\tSYS_WCSTOIMAX                       = 0x954 // 2388\n\tSYS_WCSTOUMAX                       = 0x955 // 2389\n\tSYS_ATOLL                           = 0x956 // 2390\n\tSYS_STRTOF                          = 0x957 // 2391\n\tSYS_STRTOLD                         = 0x958 // 2392\n\tSYS_WCSTOF                          = 0x959 // 2393\n\tSYS_WCSTOLD                         = 0x95A // 2394\n\tSYS_INET6_RTH_SPACE                 = 0x95B // 2395\n\tSYS_INET6_RTH_INIT                  = 0x95C // 2396\n\tSYS_INET6_RTH_ADD                   = 0x95D // 2397\n\tSYS_INET6_RTH_REVERSE               = 0x95E // 2398\n\tSYS_INET6_RTH_SEGMENTS              = 0x95F // 2399\n\tSYS_INET6_RTH_GETADDR               = 0x960 // 2400\n\tSYS_INET6_OPT_INIT                  = 0x961 // 2401\n\tSYS_INET6_OPT_APPEND                = 0x962 // 2402\n\tSYS_INET6_OPT_FINISH                = 0x963 // 2403\n\tSYS_INET6_OPT_SET_VAL               = 0x964 // 2404\n\tSYS_INET6_OPT_NEXT                  = 0x965 // 2405\n\tSYS_INET6_OPT_FIND                  = 0x966 // 2406\n\tSYS_INET6_OPT_GET_VAL               = 0x967 // 2407\n\tSYS___POW_I                         = 0x987 // 2439\n\tSYS___POW_I_B                       = 0x988 // 2440\n\tSYS___POW_I_H                       = 0x989 // 2441\n\tSYS___POW_II                        = 0x98A // 2442\n\tSYS___POW_II_B                      = 0x98B // 2443\n\tSYS___POW_II_H                      = 0x98C // 2444\n\tSYS_CABS                            = 0x98E // 2446\n\tSYS___CABS_B                        = 0x98F // 2447\n\tSYS___CABS_H                        = 0x990 // 2448\n\tSYS_CABSF                           = 0x991 // 2449\n\tSYS___CABSF_B                       = 0x992 // 2450\n\tSYS___CABSF_H                       = 0x993 // 2451\n\tSYS_CABSL                           = 0x994 // 2452\n\tSYS___CABSL_B                       = 0x995 // 2453\n\tSYS___CABSL_H                       = 0x996 // 2454\n\tSYS_CACOS                           = 0x997 // 2455\n\tSYS___CACOS_B                       = 0x998 // 2456\n\tSYS___CACOS_H                       = 0x999 // 2457\n\tSYS_CACOSF                          = 0x99A // 2458\n\tSYS___CACOSF_B                      = 0x99B // 2459\n\tSYS___CACOSF_H                      = 0x99C // 2460\n\tSYS_CACOSL                          = 0x99D // 2461\n\tSYS___CACOSL_B                      = 0x99E // 2462\n\tSYS___CACOSL_H                      = 0x99F // 2463\n\tSYS_CACOSH                          = 0x9A0 // 2464\n\tSYS___CACOSH_B                      = 0x9A1 // 2465\n\tSYS___CACOSH_H                      = 0x9A2 // 2466\n\tSYS_CACOSHF                         = 0x9A3 // 2467\n\tSYS___CACOSHF_B                     = 0x9A4 // 2468\n\tSYS___CACOSHF_H                     = 0x9A5 // 2469\n\tSYS_CACOSHL                         = 0x9A6 // 2470\n\tSYS___CACOSHL_B                     = 0x9A7 // 2471\n\tSYS___CACOSHL_H                     = 0x9A8 // 2472\n\tSYS_CARG                            = 0x9A9 // 2473\n\tSYS___CARG_B                        = 0x9AA // 2474\n\tSYS___CARG_H                        = 0x9AB // 2475\n\tSYS_CARGF                           = 0x9AC // 2476\n\tSYS___CARGF_B                       = 0x9AD // 2477\n\tSYS___CARGF_H                       = 0x9AE // 2478\n\tSYS_CARGL                           = 0x9AF // 2479\n\tSYS___CARGL_B                       = 0x9B0 // 2480\n\tSYS___CARGL_H                       = 0x9B1 // 2481\n\tSYS_CASIN                           = 0x9B2 // 2482\n\tSYS___CASIN_B                       = 0x9B3 // 2483\n\tSYS___CASIN_H                       = 0x9B4 // 2484\n\tSYS_CASINF                          = 0x9B5 // 2485\n\tSYS___CASINF_B                      = 0x9B6 // 2486\n\tSYS___CASINF_H                      = 0x9B7 // 2487\n\tSYS_CASINL                          = 0x9B8 // 2488\n\tSYS___CASINL_B                      = 0x9B9 // 2489\n\tSYS___CASINL_H                      = 0x9BA // 2490\n\tSYS_CASINH                          = 0x9BB // 2491\n\tSYS___CASINH_B                      = 0x9BC // 2492\n\tSYS___CASINH_H                      = 0x9BD // 2493\n\tSYS_CASINHF                         = 0x9BE // 2494\n\tSYS___CASINHF_B                     = 0x9BF // 2495\n\tSYS___CASINHF_H                     = 0x9C0 // 2496\n\tSYS_CASINHL                         = 0x9C1 // 2497\n\tSYS___CASINHL_B                     = 0x9C2 // 2498\n\tSYS___CASINHL_H                     = 0x9C3 // 2499\n\tSYS_CATAN                           = 0x9C4 // 2500\n\tSYS___CATAN_B                       = 0x9C5 // 2501\n\tSYS___CATAN_H                       = 0x9C6 // 2502\n\tSYS_CATANF                          = 0x9C7 // 2503\n\tSYS___CATANF_B                      = 0x9C8 // 2504\n\tSYS___CATANF_H                      = 0x9C9 // 2505\n\tSYS_CATANL                          = 0x9CA // 2506\n\tSYS___CATANL_B                      = 0x9CB // 2507\n\tSYS___CATANL_H                      = 0x9CC // 2508\n\tSYS_CATANH                          = 0x9CD // 2509\n\tSYS___CATANH_B                      = 0x9CE // 2510\n\tSYS___CATANH_H                      = 0x9CF // 2511\n\tSYS_CATANHF                         = 0x9D0 // 2512\n\tSYS___CATANHF_B                     = 0x9D1 // 2513\n\tSYS___CATANHF_H                     = 0x9D2 // 2514\n\tSYS_CATANHL                         = 0x9D3 // 2515\n\tSYS___CATANHL_B                     = 0x9D4 // 2516\n\tSYS___CATANHL_H                     = 0x9D5 // 2517\n\tSYS_CCOS                            = 0x9D6 // 2518\n\tSYS___CCOS_B                        = 0x9D7 // 2519\n\tSYS___CCOS_H                        = 0x9D8 // 2520\n\tSYS_CCOSF                           = 0x9D9 // 2521\n\tSYS___CCOSF_B                       = 0x9DA // 2522\n\tSYS___CCOSF_H                       = 0x9DB // 2523\n\tSYS_CCOSL                           = 0x9DC // 2524\n\tSYS___CCOSL_B                       = 0x9DD // 2525\n\tSYS___CCOSL_H                       = 0x9DE // 2526\n\tSYS_CCOSH                           = 0x9DF // 2527\n\tSYS___CCOSH_B                       = 0x9E0 // 2528\n\tSYS___CCOSH_H                       = 0x9E1 // 2529\n\tSYS_CCOSHF                          = 0x9E2 // 2530\n\tSYS___CCOSHF_B                      = 0x9E3 // 2531\n\tSYS___CCOSHF_H                      = 0x9E4 // 2532\n\tSYS_CCOSHL                          = 0x9E5 // 2533\n\tSYS___CCOSHL_B                      = 0x9E6 // 2534\n\tSYS___CCOSHL_H                      = 0x9E7 // 2535\n\tSYS_CEXP                            = 0x9E8 // 2536\n\tSYS___CEXP_B                        = 0x9E9 // 2537\n\tSYS___CEXP_H                        = 0x9EA // 2538\n\tSYS_CEXPF                           = 0x9EB // 2539\n\tSYS___CEXPF_B                       = 0x9EC // 2540\n\tSYS___CEXPF_H                       = 0x9ED // 2541\n\tSYS_CEXPL                           = 0x9EE // 2542\n\tSYS___CEXPL_B                       = 0x9EF // 2543\n\tSYS___CEXPL_H                       = 0x9F0 // 2544\n\tSYS_CIMAG                           = 0x9F1 // 2545\n\tSYS___CIMAG_B                       = 0x9F2 // 2546\n\tSYS___CIMAG_H                       = 0x9F3 // 2547\n\tSYS_CIMAGF                          = 0x9F4 // 2548\n\tSYS___CIMAGF_B                      = 0x9F5 // 2549\n\tSYS___CIMAGF_H                      = 0x9F6 // 2550\n\tSYS_CIMAGL                          = 0x9F7 // 2551\n\tSYS___CIMAGL_B                      = 0x9F8 // 2552\n\tSYS___CIMAGL_H                      = 0x9F9 // 2553\n\tSYS___CLOG                          = 0x9FA // 2554\n\tSYS___CLOG_B                        = 0x9FB // 2555\n\tSYS___CLOG_H                        = 0x9FC // 2556\n\tSYS_CLOGF                           = 0x9FD // 2557\n\tSYS___CLOGF_B                       = 0x9FE // 2558\n\tSYS___CLOGF_H                       = 0x9FF // 2559\n\tSYS_CLOGL                           = 0xA00 // 2560\n\tSYS___CLOGL_B                       = 0xA01 // 2561\n\tSYS___CLOGL_H                       = 0xA02 // 2562\n\tSYS_CONJ                            = 0xA03 // 2563\n\tSYS___CONJ_B                        = 0xA04 // 2564\n\tSYS___CONJ_H                        = 0xA05 // 2565\n\tSYS_CONJF                           = 0xA06 // 2566\n\tSYS___CONJF_B                       = 0xA07 // 2567\n\tSYS___CONJF_H                       = 0xA08 // 2568\n\tSYS_CONJL                           = 0xA09 // 2569\n\tSYS___CONJL_B                       = 0xA0A // 2570\n\tSYS___CONJL_H                       = 0xA0B // 2571\n\tSYS_CPOW                            = 0xA0C // 2572\n\tSYS___CPOW_B                        = 0xA0D // 2573\n\tSYS___CPOW_H                        = 0xA0E // 2574\n\tSYS_CPOWF                           = 0xA0F // 2575\n\tSYS___CPOWF_B                       = 0xA10 // 2576\n\tSYS___CPOWF_H                       = 0xA11 // 2577\n\tSYS_CPOWL                           = 0xA12 // 2578\n\tSYS___CPOWL_B                       = 0xA13 // 2579\n\tSYS___CPOWL_H                       = 0xA14 // 2580\n\tSYS_CPROJ                           = 0xA15 // 2581\n\tSYS___CPROJ_B                       = 0xA16 // 2582\n\tSYS___CPROJ_H                       = 0xA17 // 2583\n\tSYS_CPROJF                          = 0xA18 // 2584\n\tSYS___CPROJF_B                      = 0xA19 // 2585\n\tSYS___CPROJF_H                      = 0xA1A // 2586\n\tSYS_CPROJL                          = 0xA1B // 2587\n\tSYS___CPROJL_B                      = 0xA1C // 2588\n\tSYS___CPROJL_H                      = 0xA1D // 2589\n\tSYS_CREAL                           = 0xA1E // 2590\n\tSYS___CREAL_B                       = 0xA1F // 2591\n\tSYS___CREAL_H                       = 0xA20 // 2592\n\tSYS_CREALF                          = 0xA21 // 2593\n\tSYS___CREALF_B                      = 0xA22 // 2594\n\tSYS___CREALF_H                      = 0xA23 // 2595\n\tSYS_CREALL                          = 0xA24 // 2596\n\tSYS___CREALL_B                      = 0xA25 // 2597\n\tSYS___CREALL_H                      = 0xA26 // 2598\n\tSYS_CSIN                            = 0xA27 // 2599\n\tSYS___CSIN_B                        = 0xA28 // 2600\n\tSYS___CSIN_H                        = 0xA29 // 2601\n\tSYS_CSINF                           = 0xA2A // 2602\n\tSYS___CSINF_B                       = 0xA2B // 2603\n\tSYS___CSINF_H                       = 0xA2C // 2604\n\tSYS_CSINL                           = 0xA2D // 2605\n\tSYS___CSINL_B                       = 0xA2E // 2606\n\tSYS___CSINL_H                       = 0xA2F // 2607\n\tSYS_CSINH                           = 0xA30 // 2608\n\tSYS___CSINH_B                       = 0xA31 // 2609\n\tSYS___CSINH_H                       = 0xA32 // 2610\n\tSYS_CSINHF                          = 0xA33 // 2611\n\tSYS___CSINHF_B                      = 0xA34 // 2612\n\tSYS___CSINHF_H                      = 0xA35 // 2613\n\tSYS_CSINHL                          = 0xA36 // 2614\n\tSYS___CSINHL_B                      = 0xA37 // 2615\n\tSYS___CSINHL_H                      = 0xA38 // 2616\n\tSYS_CSQRT                           = 0xA39 // 2617\n\tSYS___CSQRT_B                       = 0xA3A // 2618\n\tSYS___CSQRT_H                       = 0xA3B // 2619\n\tSYS_CSQRTF                          = 0xA3C // 2620\n\tSYS___CSQRTF_B                      = 0xA3D // 2621\n\tSYS___CSQRTF_H                      = 0xA3E // 2622\n\tSYS_CSQRTL                          = 0xA3F // 2623\n\tSYS___CSQRTL_B                      = 0xA40 // 2624\n\tSYS___CSQRTL_H                      = 0xA41 // 2625\n\tSYS_CTAN                            = 0xA42 // 2626\n\tSYS___CTAN_B                        = 0xA43 // 2627\n\tSYS___CTAN_H                        = 0xA44 // 2628\n\tSYS_CTANF                           = 0xA45 // 2629\n\tSYS___CTANF_B                       = 0xA46 // 2630\n\tSYS___CTANF_H                       = 0xA47 // 2631\n\tSYS_CTANL                           = 0xA48 // 2632\n\tSYS___CTANL_B                       = 0xA49 // 2633\n\tSYS___CTANL_H                       = 0xA4A // 2634\n\tSYS_CTANH                           = 0xA4B // 2635\n\tSYS___CTANH_B                       = 0xA4C // 2636\n\tSYS___CTANH_H                       = 0xA4D // 2637\n\tSYS_CTANHF                          = 0xA4E // 2638\n\tSYS___CTANHF_B                      = 0xA4F // 2639\n\tSYS___CTANHF_H                      = 0xA50 // 2640\n\tSYS_CTANHL                          = 0xA51 // 2641\n\tSYS___CTANHL_B                      = 0xA52 // 2642\n\tSYS___CTANHL_H                      = 0xA53 // 2643\n\tSYS___ACOSHF_H                      = 0xA54 // 2644\n\tSYS___ACOSHL_H                      = 0xA55 // 2645\n\tSYS___ASINHF_H                      = 0xA56 // 2646\n\tSYS___ASINHL_H                      = 0xA57 // 2647\n\tSYS___CBRTF_H                       = 0xA58 // 2648\n\tSYS___CBRTL_H                       = 0xA59 // 2649\n\tSYS___COPYSIGN_B                    = 0xA5A // 2650\n\tSYS___EXPM1F_H                      = 0xA5B // 2651\n\tSYS___EXPM1L_H                      = 0xA5C // 2652\n\tSYS___EXP2_H                        = 0xA5D // 2653\n\tSYS___EXP2F_H                       = 0xA5E // 2654\n\tSYS___EXP2L_H                       = 0xA5F // 2655\n\tSYS___LOG1PF_H                      = 0xA60 // 2656\n\tSYS___LOG1PL_H                      = 0xA61 // 2657\n\tSYS___LGAMMAL_H                     = 0xA62 // 2658\n\tSYS_FMA                             = 0xA63 // 2659\n\tSYS___FMA_B                         = 0xA64 // 2660\n\tSYS___FMA_H                         = 0xA65 // 2661\n\tSYS_FMAF                            = 0xA66 // 2662\n\tSYS___FMAF_B                        = 0xA67 // 2663\n\tSYS___FMAF_H                        = 0xA68 // 2664\n\tSYS_FMAL                            = 0xA69 // 2665\n\tSYS___FMAL_B                        = 0xA6A // 2666\n\tSYS___FMAL_H                        = 0xA6B // 2667\n\tSYS_FMAX                            = 0xA6C // 2668\n\tSYS___FMAX_B                        = 0xA6D // 2669\n\tSYS___FMAX_H                        = 0xA6E // 2670\n\tSYS_FMAXF                           = 0xA6F // 2671\n\tSYS___FMAXF_B                       = 0xA70 // 2672\n\tSYS___FMAXF_H                       = 0xA71 // 2673\n\tSYS_FMAXL                           = 0xA72 // 2674\n\tSYS___FMAXL_B                       = 0xA73 // 2675\n\tSYS___FMAXL_H                       = 0xA74 // 2676\n\tSYS_FMIN                            = 0xA75 // 2677\n\tSYS___FMIN_B                        = 0xA76 // 2678\n\tSYS___FMIN_H                        = 0xA77 // 2679\n\tSYS_FMINF                           = 0xA78 // 2680\n\tSYS___FMINF_B                       = 0xA79 // 2681\n\tSYS___FMINF_H                       = 0xA7A // 2682\n\tSYS_FMINL                           = 0xA7B // 2683\n\tSYS___FMINL_B                       = 0xA7C // 2684\n\tSYS___FMINL_H                       = 0xA7D // 2685\n\tSYS_ILOGBF                          = 0xA7E // 2686\n\tSYS___ILOGBF_B                      = 0xA7F // 2687\n\tSYS___ILOGBF_H                      = 0xA80 // 2688\n\tSYS_ILOGBL                          = 0xA81 // 2689\n\tSYS___ILOGBL_B                      = 0xA82 // 2690\n\tSYS___ILOGBL_H                      = 0xA83 // 2691\n\tSYS_LLRINT                          = 0xA84 // 2692\n\tSYS___LLRINT_B                      = 0xA85 // 2693\n\tSYS___LLRINT_H                      = 0xA86 // 2694\n\tSYS_LLRINTF                         = 0xA87 // 2695\n\tSYS___LLRINTF_B                     = 0xA88 // 2696\n\tSYS___LLRINTF_H                     = 0xA89 // 2697\n\tSYS_LLRINTL                         = 0xA8A // 2698\n\tSYS___LLRINTL_B                     = 0xA8B // 2699\n\tSYS___LLRINTL_H                     = 0xA8C // 2700\n\tSYS_LLROUND                         = 0xA8D // 2701\n\tSYS___LLROUND_B                     = 0xA8E // 2702\n\tSYS___LLROUND_H                     = 0xA8F // 2703\n\tSYS_LLROUNDF                        = 0xA90 // 2704\n\tSYS___LLROUNDF_B                    = 0xA91 // 2705\n\tSYS___LLROUNDF_H                    = 0xA92 // 2706\n\tSYS_LLROUNDL                        = 0xA93 // 2707\n\tSYS___LLROUNDL_B                    = 0xA94 // 2708\n\tSYS___LLROUNDL_H                    = 0xA95 // 2709\n\tSYS_LOGBF                           = 0xA96 // 2710\n\tSYS___LOGBF_B                       = 0xA97 // 2711\n\tSYS___LOGBF_H                       = 0xA98 // 2712\n\tSYS_LOGBL                           = 0xA99 // 2713\n\tSYS___LOGBL_B                       = 0xA9A // 2714\n\tSYS___LOGBL_H                       = 0xA9B // 2715\n\tSYS_LRINT                           = 0xA9C // 2716\n\tSYS___LRINT_B                       = 0xA9D // 2717\n\tSYS___LRINT_H                       = 0xA9E // 2718\n\tSYS_LRINTF                          = 0xA9F // 2719\n\tSYS___LRINTF_B                      = 0xAA0 // 2720\n\tSYS___LRINTF_H                      = 0xAA1 // 2721\n\tSYS_LRINTL                          = 0xAA2 // 2722\n\tSYS___LRINTL_B                      = 0xAA3 // 2723\n\tSYS___LRINTL_H                      = 0xAA4 // 2724\n\tSYS_LROUNDL                         = 0xAA5 // 2725\n\tSYS___LROUNDL_B                     = 0xAA6 // 2726\n\tSYS___LROUNDL_H                     = 0xAA7 // 2727\n\tSYS_NAN                             = 0xAA8 // 2728\n\tSYS___NAN_B                         = 0xAA9 // 2729\n\tSYS_NANF                            = 0xAAA // 2730\n\tSYS___NANF_B                        = 0xAAB // 2731\n\tSYS_NANL                            = 0xAAC // 2732\n\tSYS___NANL_B                        = 0xAAD // 2733\n\tSYS_NEARBYINT                       = 0xAAE // 2734\n\tSYS___NEARBYINT_B                   = 0xAAF // 2735\n\tSYS___NEARBYINT_H                   = 0xAB0 // 2736\n\tSYS_NEARBYINTF                      = 0xAB1 // 2737\n\tSYS___NEARBYINTF_B                  = 0xAB2 // 2738\n\tSYS___NEARBYINTF_H                  = 0xAB3 // 2739\n\tSYS_NEARBYINTL                      = 0xAB4 // 2740\n\tSYS___NEARBYINTL_B                  = 0xAB5 // 2741\n\tSYS___NEARBYINTL_H                  = 0xAB6 // 2742\n\tSYS_NEXTAFTERF                      = 0xAB7 // 2743\n\tSYS___NEXTAFTERF_B                  = 0xAB8 // 2744\n\tSYS___NEXTAFTERF_H                  = 0xAB9 // 2745\n\tSYS_NEXTAFTERL                      = 0xABA // 2746\n\tSYS___NEXTAFTERL_B                  = 0xABB // 2747\n\tSYS___NEXTAFTERL_H                  = 0xABC // 2748\n\tSYS_NEXTTOWARD                      = 0xABD // 2749\n\tSYS___NEXTTOWARD_B                  = 0xABE // 2750\n\tSYS___NEXTTOWARD_H                  = 0xABF // 2751\n\tSYS_NEXTTOWARDF                     = 0xAC0 // 2752\n\tSYS___NEXTTOWARDF_B                 = 0xAC1 // 2753\n\tSYS___NEXTTOWARDF_H                 = 0xAC2 // 2754\n\tSYS_NEXTTOWARDL                     = 0xAC3 // 2755\n\tSYS___NEXTTOWARDL_B                 = 0xAC4 // 2756\n\tSYS___NEXTTOWARDL_H                 = 0xAC5 // 2757\n\tSYS___REMAINDERF_H                  = 0xAC6 // 2758\n\tSYS___REMAINDERL_H                  = 0xAC7 // 2759\n\tSYS___REMQUO_H                      = 0xAC8 // 2760\n\tSYS___REMQUOF_H                     = 0xAC9 // 2761\n\tSYS___REMQUOL_H                     = 0xACA // 2762\n\tSYS_RINTF                           = 0xACB // 2763\n\tSYS___RINTF_B                       = 0xACC // 2764\n\tSYS_RINTL                           = 0xACD // 2765\n\tSYS___RINTL_B                       = 0xACE // 2766\n\tSYS_ROUND                           = 0xACF // 2767\n\tSYS___ROUND_B                       = 0xAD0 // 2768\n\tSYS___ROUND_H                       = 0xAD1 // 2769\n\tSYS_ROUNDF                          = 0xAD2 // 2770\n\tSYS___ROUNDF_B                      = 0xAD3 // 2771\n\tSYS___ROUNDF_H                      = 0xAD4 // 2772\n\tSYS_ROUNDL                          = 0xAD5 // 2773\n\tSYS___ROUNDL_B                      = 0xAD6 // 2774\n\tSYS___ROUNDL_H                      = 0xAD7 // 2775\n\tSYS_SCALBLN                         = 0xAD8 // 2776\n\tSYS___SCALBLN_B                     = 0xAD9 // 2777\n\tSYS___SCALBLN_H                     = 0xADA // 2778\n\tSYS_SCALBLNF                        = 0xADB // 2779\n\tSYS___SCALBLNF_B                    = 0xADC // 2780\n\tSYS___SCALBLNF_H                    = 0xADD // 2781\n\tSYS_SCALBLNL                        = 0xADE // 2782\n\tSYS___SCALBLNL_B                    = 0xADF // 2783\n\tSYS___SCALBLNL_H                    = 0xAE0 // 2784\n\tSYS___SCALBN_B                      = 0xAE1 // 2785\n\tSYS___SCALBN_H                      = 0xAE2 // 2786\n\tSYS_SCALBNF                         = 0xAE3 // 2787\n\tSYS___SCALBNF_B                     = 0xAE4 // 2788\n\tSYS___SCALBNF_H                     = 0xAE5 // 2789\n\tSYS_SCALBNL                         = 0xAE6 // 2790\n\tSYS___SCALBNL_B                     = 0xAE7 // 2791\n\tSYS___SCALBNL_H                     = 0xAE8 // 2792\n\tSYS___TGAMMAL_H                     = 0xAE9 // 2793\n\tSYS_FECLEAREXCEPT                   = 0xAEA // 2794\n\tSYS_FEGETENV                        = 0xAEB // 2795\n\tSYS_FEGETEXCEPTFLAG                 = 0xAEC // 2796\n\tSYS_FEGETROUND                      = 0xAED // 2797\n\tSYS_FEHOLDEXCEPT                    = 0xAEE // 2798\n\tSYS_FERAISEEXCEPT                   = 0xAEF // 2799\n\tSYS_FESETENV                        = 0xAF0 // 2800\n\tSYS_FESETEXCEPTFLAG                 = 0xAF1 // 2801\n\tSYS_FESETROUND                      = 0xAF2 // 2802\n\tSYS_FETESTEXCEPT                    = 0xAF3 // 2803\n\tSYS_FEUPDATEENV                     = 0xAF4 // 2804\n\tSYS___COPYSIGN_H                    = 0xAF5 // 2805\n\tSYS___HYPOTF_H                      = 0xAF6 // 2806\n\tSYS___HYPOTL_H                      = 0xAF7 // 2807\n\tSYS___CLASS                         = 0xAFA // 2810\n\tSYS___CLASS_B                       = 0xAFB // 2811\n\tSYS___CLASS_H                       = 0xAFC // 2812\n\tSYS___ISBLANK_A                     = 0xB2E // 2862\n\tSYS___ISWBLANK_A                    = 0xB2F // 2863\n\tSYS___LROUND_FIXUP                  = 0xB30 // 2864\n\tSYS___LROUNDF_FIXUP                 = 0xB31 // 2865\n\tSYS_SCHED_YIELD                     = 0xB32 // 2866\n\tSYS_STRERROR_R                      = 0xB33 // 2867\n\tSYS_UNSETENV                        = 0xB34 // 2868\n\tSYS___LGAMMA_H_C99                  = 0xB38 // 2872\n\tSYS___LGAMMA_B_C99                  = 0xB39 // 2873\n\tSYS___LGAMMA_R_C99                  = 0xB3A // 2874\n\tSYS___FTELL2                        = 0xB3B // 2875\n\tSYS___FSEEK2                        = 0xB3C // 2876\n\tSYS___STATIC_REINIT                 = 0xB3D // 2877\n\tSYS_PTHREAD_ATTR_GETSTACK           = 0xB3E // 2878\n\tSYS_PTHREAD_ATTR_SETSTACK           = 0xB3F // 2879\n\tSYS___TGAMMA_H_C99                  = 0xB78 // 2936\n\tSYS___TGAMMAF_H_C99                 = 0xB79 // 2937\n\tSYS___LE_TRACEBACK                  = 0xB7A // 2938\n\tSYS___MUST_STAY_CLEAN               = 0xB7C // 2940\n\tSYS___O_ENV                         = 0xB7D // 2941\n\tSYS_ACOSD32                         = 0xB7E // 2942\n\tSYS_ACOSD64                         = 0xB7F // 2943\n\tSYS_ACOSD128                        = 0xB80 // 2944\n\tSYS_ACOSHD32                        = 0xB81 // 2945\n\tSYS_ACOSHD64                        = 0xB82 // 2946\n\tSYS_ACOSHD128                       = 0xB83 // 2947\n\tSYS_ASIND32                         = 0xB84 // 2948\n\tSYS_ASIND64                         = 0xB85 // 2949\n\tSYS_ASIND128                        = 0xB86 // 2950\n\tSYS_ASINHD32                        = 0xB87 // 2951\n\tSYS_ASINHD64                        = 0xB88 // 2952\n\tSYS_ASINHD128                       = 0xB89 // 2953\n\tSYS_ATAND32                         = 0xB8A // 2954\n\tSYS_ATAND64                         = 0xB8B // 2955\n\tSYS_ATAND128                        = 0xB8C // 2956\n\tSYS_ATAN2D32                        = 0xB8D // 2957\n\tSYS_ATAN2D64                        = 0xB8E // 2958\n\tSYS_ATAN2D128                       = 0xB8F // 2959\n\tSYS_ATANHD32                        = 0xB90 // 2960\n\tSYS_ATANHD64                        = 0xB91 // 2961\n\tSYS_ATANHD128                       = 0xB92 // 2962\n\tSYS_CBRTD32                         = 0xB93 // 2963\n\tSYS_CBRTD64                         = 0xB94 // 2964\n\tSYS_CBRTD128                        = 0xB95 // 2965\n\tSYS_CEILD32                         = 0xB96 // 2966\n\tSYS_CEILD64                         = 0xB97 // 2967\n\tSYS_CEILD128                        = 0xB98 // 2968\n\tSYS___CLASS2                        = 0xB99 // 2969\n\tSYS___CLASS2_B                      = 0xB9A // 2970\n\tSYS___CLASS2_H                      = 0xB9B // 2971\n\tSYS_COPYSIGND32                     = 0xB9C // 2972\n\tSYS_COPYSIGND64                     = 0xB9D // 2973\n\tSYS_COPYSIGND128                    = 0xB9E // 2974\n\tSYS_COSD32                          = 0xB9F // 2975\n\tSYS_COSD64                          = 0xBA0 // 2976\n\tSYS_COSD128                         = 0xBA1 // 2977\n\tSYS_COSHD32                         = 0xBA2 // 2978\n\tSYS_COSHD64                         = 0xBA3 // 2979\n\tSYS_COSHD128                        = 0xBA4 // 2980\n\tSYS_ERFD32                          = 0xBA5 // 2981\n\tSYS_ERFD64                          = 0xBA6 // 2982\n\tSYS_ERFD128                         = 0xBA7 // 2983\n\tSYS_ERFCD32                         = 0xBA8 // 2984\n\tSYS_ERFCD64                         = 0xBA9 // 2985\n\tSYS_ERFCD128                        = 0xBAA // 2986\n\tSYS_EXPD32                          = 0xBAB // 2987\n\tSYS_EXPD64                          = 0xBAC // 2988\n\tSYS_EXPD128                         = 0xBAD // 2989\n\tSYS_EXP2D32                         = 0xBAE // 2990\n\tSYS_EXP2D64                         = 0xBAF // 2991\n\tSYS_EXP2D128                        = 0xBB0 // 2992\n\tSYS_EXPM1D32                        = 0xBB1 // 2993\n\tSYS_EXPM1D64                        = 0xBB2 // 2994\n\tSYS_EXPM1D128                       = 0xBB3 // 2995\n\tSYS_FABSD32                         = 0xBB4 // 2996\n\tSYS_FABSD64                         = 0xBB5 // 2997\n\tSYS_FABSD128                        = 0xBB6 // 2998\n\tSYS_FDIMD32                         = 0xBB7 // 2999\n\tSYS_FDIMD64                         = 0xBB8 // 3000\n\tSYS_FDIMD128                        = 0xBB9 // 3001\n\tSYS_FE_DEC_GETROUND                 = 0xBBA // 3002\n\tSYS_FE_DEC_SETROUND                 = 0xBBB // 3003\n\tSYS_FLOORD32                        = 0xBBC // 3004\n\tSYS_FLOORD64                        = 0xBBD // 3005\n\tSYS_FLOORD128                       = 0xBBE // 3006\n\tSYS_FMAD32                          = 0xBBF // 3007\n\tSYS_FMAD64                          = 0xBC0 // 3008\n\tSYS_FMAD128                         = 0xBC1 // 3009\n\tSYS_FMAXD32                         = 0xBC2 // 3010\n\tSYS_FMAXD64                         = 0xBC3 // 3011\n\tSYS_FMAXD128                        = 0xBC4 // 3012\n\tSYS_FMIND32                         = 0xBC5 // 3013\n\tSYS_FMIND64                         = 0xBC6 // 3014\n\tSYS_FMIND128                        = 0xBC7 // 3015\n\tSYS_FMODD32                         = 0xBC8 // 3016\n\tSYS_FMODD64                         = 0xBC9 // 3017\n\tSYS_FMODD128                        = 0xBCA // 3018\n\tSYS___FP_CAST_D                     = 0xBCB // 3019\n\tSYS_FREXPD32                        = 0xBCC // 3020\n\tSYS_FREXPD64                        = 0xBCD // 3021\n\tSYS_FREXPD128                       = 0xBCE // 3022\n\tSYS_HYPOTD32                        = 0xBCF // 3023\n\tSYS_HYPOTD64                        = 0xBD0 // 3024\n\tSYS_HYPOTD128                       = 0xBD1 // 3025\n\tSYS_ILOGBD32                        = 0xBD2 // 3026\n\tSYS_ILOGBD64                        = 0xBD3 // 3027\n\tSYS_ILOGBD128                       = 0xBD4 // 3028\n\tSYS_LDEXPD32                        = 0xBD5 // 3029\n\tSYS_LDEXPD64                        = 0xBD6 // 3030\n\tSYS_LDEXPD128                       = 0xBD7 // 3031\n\tSYS_LGAMMAD32                       = 0xBD8 // 3032\n\tSYS_LGAMMAD64                       = 0xBD9 // 3033\n\tSYS_LGAMMAD128                      = 0xBDA // 3034\n\tSYS_LLRINTD32                       = 0xBDB // 3035\n\tSYS_LLRINTD64                       = 0xBDC // 3036\n\tSYS_LLRINTD128                      = 0xBDD // 3037\n\tSYS_LLROUNDD32                      = 0xBDE // 3038\n\tSYS_LLROUNDD64                      = 0xBDF // 3039\n\tSYS_LLROUNDD128                     = 0xBE0 // 3040\n\tSYS_LOGD32                          = 0xBE1 // 3041\n\tSYS_LOGD64                          = 0xBE2 // 3042\n\tSYS_LOGD128                         = 0xBE3 // 3043\n\tSYS_LOG10D32                        = 0xBE4 // 3044\n\tSYS_LOG10D64                        = 0xBE5 // 3045\n\tSYS_LOG10D128                       = 0xBE6 // 3046\n\tSYS_LOG1PD32                        = 0xBE7 // 3047\n\tSYS_LOG1PD64                        = 0xBE8 // 3048\n\tSYS_LOG1PD128                       = 0xBE9 // 3049\n\tSYS_LOG2D32                         = 0xBEA // 3050\n\tSYS_LOG2D64                         = 0xBEB // 3051\n\tSYS_LOG2D128                        = 0xBEC // 3052\n\tSYS_LOGBD32                         = 0xBED // 3053\n\tSYS_LOGBD64                         = 0xBEE // 3054\n\tSYS_LOGBD128                        = 0xBEF // 3055\n\tSYS_LRINTD32                        = 0xBF0 // 3056\n\tSYS_LRINTD64                        = 0xBF1 // 3057\n\tSYS_LRINTD128                       = 0xBF2 // 3058\n\tSYS_LROUNDD32                       = 0xBF3 // 3059\n\tSYS_LROUNDD64                       = 0xBF4 // 3060\n\tSYS_LROUNDD128                      = 0xBF5 // 3061\n\tSYS_MODFD32                         = 0xBF6 // 3062\n\tSYS_MODFD64                         = 0xBF7 // 3063\n\tSYS_MODFD128                        = 0xBF8 // 3064\n\tSYS_NAND32                          = 0xBF9 // 3065\n\tSYS_NAND64                          = 0xBFA // 3066\n\tSYS_NAND128                         = 0xBFB // 3067\n\tSYS_NEARBYINTD32                    = 0xBFC // 3068\n\tSYS_NEARBYINTD64                    = 0xBFD // 3069\n\tSYS_NEARBYINTD128                   = 0xBFE // 3070\n\tSYS_NEXTAFTERD32                    = 0xBFF // 3071\n\tSYS_NEXTAFTERD64                    = 0xC00 // 3072\n\tSYS_NEXTAFTERD128                   = 0xC01 // 3073\n\tSYS_NEXTTOWARDD32                   = 0xC02 // 3074\n\tSYS_NEXTTOWARDD64                   = 0xC03 // 3075\n\tSYS_NEXTTOWARDD128                  = 0xC04 // 3076\n\tSYS_POWD32                          = 0xC05 // 3077\n\tSYS_POWD64                          = 0xC06 // 3078\n\tSYS_POWD128                         = 0xC07 // 3079\n\tSYS_QUANTIZED32                     = 0xC08 // 3080\n\tSYS_QUANTIZED64                     = 0xC09 // 3081\n\tSYS_QUANTIZED128                    = 0xC0A // 3082\n\tSYS_REMAINDERD32                    = 0xC0B // 3083\n\tSYS_REMAINDERD64                    = 0xC0C // 3084\n\tSYS_REMAINDERD128                   = 0xC0D // 3085\n\tSYS___REMQUOD32                     = 0xC0E // 3086\n\tSYS___REMQUOD64                     = 0xC0F // 3087\n\tSYS___REMQUOD128                    = 0xC10 // 3088\n\tSYS_RINTD32                         = 0xC11 // 3089\n\tSYS_RINTD64                         = 0xC12 // 3090\n\tSYS_RINTD128                        = 0xC13 // 3091\n\tSYS_ROUNDD32                        = 0xC14 // 3092\n\tSYS_ROUNDD64                        = 0xC15 // 3093\n\tSYS_ROUNDD128                       = 0xC16 // 3094\n\tSYS_SAMEQUANTUMD32                  = 0xC17 // 3095\n\tSYS_SAMEQUANTUMD64                  = 0xC18 // 3096\n\tSYS_SAMEQUANTUMD128                 = 0xC19 // 3097\n\tSYS_SCALBLND32                      = 0xC1A // 3098\n\tSYS_SCALBLND64                      = 0xC1B // 3099\n\tSYS_SCALBLND128                     = 0xC1C // 3100\n\tSYS_SCALBND32                       = 0xC1D // 3101\n\tSYS_SCALBND64                       = 0xC1E // 3102\n\tSYS_SCALBND128                      = 0xC1F // 3103\n\tSYS_SIND32                          = 0xC20 // 3104\n\tSYS_SIND64                          = 0xC21 // 3105\n\tSYS_SIND128                         = 0xC22 // 3106\n\tSYS_SINHD32                         = 0xC23 // 3107\n\tSYS_SINHD64                         = 0xC24 // 3108\n\tSYS_SINHD128                        = 0xC25 // 3109\n\tSYS_SQRTD32                         = 0xC26 // 3110\n\tSYS_SQRTD64                         = 0xC27 // 3111\n\tSYS_SQRTD128                        = 0xC28 // 3112\n\tSYS_STRTOD32                        = 0xC29 // 3113\n\tSYS_STRTOD64                        = 0xC2A // 3114\n\tSYS_STRTOD128                       = 0xC2B // 3115\n\tSYS_TAND32                          = 0xC2C // 3116\n\tSYS_TAND64                          = 0xC2D // 3117\n\tSYS_TAND128                         = 0xC2E // 3118\n\tSYS_TANHD32                         = 0xC2F // 3119\n\tSYS_TANHD64                         = 0xC30 // 3120\n\tSYS_TANHD128                        = 0xC31 // 3121\n\tSYS_TGAMMAD32                       = 0xC32 // 3122\n\tSYS_TGAMMAD64                       = 0xC33 // 3123\n\tSYS_TGAMMAD128                      = 0xC34 // 3124\n\tSYS_TRUNCD32                        = 0xC3E // 3134\n\tSYS_TRUNCD64                        = 0xC3F // 3135\n\tSYS_TRUNCD128                       = 0xC40 // 3136\n\tSYS_WCSTOD32                        = 0xC41 // 3137\n\tSYS_WCSTOD64                        = 0xC42 // 3138\n\tSYS_WCSTOD128                       = 0xC43 // 3139\n\tSYS___CODEPAGE_INFO                 = 0xC64 // 3172\n\tSYS_POSIX_OPENPT                    = 0xC66 // 3174\n\tSYS_PSELECT                         = 0xC67 // 3175\n\tSYS_SOCKATMARK                      = 0xC68 // 3176\n\tSYS_AIO_FSYNC                       = 0xC69 // 3177\n\tSYS_LIO_LISTIO                      = 0xC6A // 3178\n\tSYS___ATANPID32                     = 0xC6B // 3179\n\tSYS___ATANPID64                     = 0xC6C // 3180\n\tSYS___ATANPID128                    = 0xC6D // 3181\n\tSYS___COSPID32                      = 0xC6E // 3182\n\tSYS___COSPID64                      = 0xC6F // 3183\n\tSYS___COSPID128                     = 0xC70 // 3184\n\tSYS___SINPID32                      = 0xC71 // 3185\n\tSYS___SINPID64                      = 0xC72 // 3186\n\tSYS___SINPID128                     = 0xC73 // 3187\n\tSYS_SETIPV4SOURCEFILTER             = 0xC76 // 3190\n\tSYS_GETIPV4SOURCEFILTER             = 0xC77 // 3191\n\tSYS_SETSOURCEFILTER                 = 0xC78 // 3192\n\tSYS_GETSOURCEFILTER                 = 0xC79 // 3193\n\tSYS_FWRITE_UNLOCKED                 = 0xC7A // 3194\n\tSYS_FREAD_UNLOCKED                  = 0xC7B // 3195\n\tSYS_FGETS_UNLOCKED                  = 0xC7C // 3196\n\tSYS_GETS_UNLOCKED                   = 0xC7D // 3197\n\tSYS_FPUTS_UNLOCKED                  = 0xC7E // 3198\n\tSYS_PUTS_UNLOCKED                   = 0xC7F // 3199\n\tSYS_FGETC_UNLOCKED                  = 0xC80 // 3200\n\tSYS_FPUTC_UNLOCKED                  = 0xC81 // 3201\n\tSYS_DLADDR                          = 0xC82 // 3202\n\tSYS_SHM_OPEN                        = 0xC8C // 3212\n\tSYS_SHM_UNLINK                      = 0xC8D // 3213\n\tSYS___CLASS2F                       = 0xC91 // 3217\n\tSYS___CLASS2L                       = 0xC92 // 3218\n\tSYS___CLASS2F_B                     = 0xC93 // 3219\n\tSYS___CLASS2F_H                     = 0xC94 // 3220\n\tSYS___CLASS2L_B                     = 0xC95 // 3221\n\tSYS___CLASS2L_H                     = 0xC96 // 3222\n\tSYS___CLASS2D32                     = 0xC97 // 3223\n\tSYS___CLASS2D64                     = 0xC98 // 3224\n\tSYS___CLASS2D128                    = 0xC99 // 3225\n\tSYS___TOCSNAME2                     = 0xC9A // 3226\n\tSYS___D1TOP                         = 0xC9B // 3227\n\tSYS___D2TOP                         = 0xC9C // 3228\n\tSYS___D4TOP                         = 0xC9D // 3229\n\tSYS___PTOD1                         = 0xC9E // 3230\n\tSYS___PTOD2                         = 0xC9F // 3231\n\tSYS___PTOD4                         = 0xCA0 // 3232\n\tSYS_CLEARERR_UNLOCKED               = 0xCA1 // 3233\n\tSYS_FDELREC_UNLOCKED                = 0xCA2 // 3234\n\tSYS_FEOF_UNLOCKED                   = 0xCA3 // 3235\n\tSYS_FERROR_UNLOCKED                 = 0xCA4 // 3236\n\tSYS_FFLUSH_UNLOCKED                 = 0xCA5 // 3237\n\tSYS_FGETPOS_UNLOCKED                = 0xCA6 // 3238\n\tSYS_FGETWC_UNLOCKED                 = 0xCA7 // 3239\n\tSYS_FGETWS_UNLOCKED                 = 0xCA8 // 3240\n\tSYS_FILENO_UNLOCKED                 = 0xCA9 // 3241\n\tSYS_FLDATA_UNLOCKED                 = 0xCAA // 3242\n\tSYS_FLOCATE_UNLOCKED                = 0xCAB // 3243\n\tSYS_FPRINTF_UNLOCKED                = 0xCAC // 3244\n\tSYS_FPUTWC_UNLOCKED                 = 0xCAD // 3245\n\tSYS_FPUTWS_UNLOCKED                 = 0xCAE // 3246\n\tSYS_FSCANF_UNLOCKED                 = 0xCAF // 3247\n\tSYS_FSEEK_UNLOCKED                  = 0xCB0 // 3248\n\tSYS_FSEEKO_UNLOCKED                 = 0xCB1 // 3249\n\tSYS_FSETPOS_UNLOCKED                = 0xCB3 // 3251\n\tSYS_FTELL_UNLOCKED                  = 0xCB4 // 3252\n\tSYS_FTELLO_UNLOCKED                 = 0xCB5 // 3253\n\tSYS_FUPDATE_UNLOCKED                = 0xCB7 // 3255\n\tSYS_FWIDE_UNLOCKED                  = 0xCB8 // 3256\n\tSYS_FWPRINTF_UNLOCKED               = 0xCB9 // 3257\n\tSYS_FWSCANF_UNLOCKED                = 0xCBA // 3258\n\tSYS_GETWC_UNLOCKED                  = 0xCBB // 3259\n\tSYS_GETWCHAR_UNLOCKED               = 0xCBC // 3260\n\tSYS_PERROR_UNLOCKED                 = 0xCBD // 3261\n\tSYS_PRINTF_UNLOCKED                 = 0xCBE // 3262\n\tSYS_PUTWC_UNLOCKED                  = 0xCBF // 3263\n\tSYS_PUTWCHAR_UNLOCKED               = 0xCC0 // 3264\n\tSYS_REWIND_UNLOCKED                 = 0xCC1 // 3265\n\tSYS_SCANF_UNLOCKED                  = 0xCC2 // 3266\n\tSYS_UNGETC_UNLOCKED                 = 0xCC3 // 3267\n\tSYS_UNGETWC_UNLOCKED                = 0xCC4 // 3268\n\tSYS_VFPRINTF_UNLOCKED               = 0xCC5 // 3269\n\tSYS_VFSCANF_UNLOCKED                = 0xCC7 // 3271\n\tSYS_VFWPRINTF_UNLOCKED              = 0xCC9 // 3273\n\tSYS_VFWSCANF_UNLOCKED               = 0xCCB // 3275\n\tSYS_VPRINTF_UNLOCKED                = 0xCCD // 3277\n\tSYS_VSCANF_UNLOCKED                 = 0xCCF // 3279\n\tSYS_VWPRINTF_UNLOCKED               = 0xCD1 // 3281\n\tSYS_VWSCANF_UNLOCKED                = 0xCD3 // 3283\n\tSYS_WPRINTF_UNLOCKED                = 0xCD5 // 3285\n\tSYS_WSCANF_UNLOCKED                 = 0xCD6 // 3286\n\tSYS_ASCTIME64                       = 0xCD7 // 3287\n\tSYS_ASCTIME64_R                     = 0xCD8 // 3288\n\tSYS_CTIME64                         = 0xCD9 // 3289\n\tSYS_CTIME64_R                       = 0xCDA // 3290\n\tSYS_DIFFTIME64                      = 0xCDB // 3291\n\tSYS_GMTIME64                        = 0xCDC // 3292\n\tSYS_GMTIME64_R                      = 0xCDD // 3293\n\tSYS_LOCALTIME64                     = 0xCDE // 3294\n\tSYS_LOCALTIME64_R                   = 0xCDF // 3295\n\tSYS_MKTIME64                        = 0xCE0 // 3296\n\tSYS_TIME64                          = 0xCE1 // 3297\n\tSYS___LOGIN_APPLID                  = 0xCE2 // 3298\n\tSYS___PASSWD_APPLID                 = 0xCE3 // 3299\n\tSYS_PTHREAD_SECURITY_APPLID_NP      = 0xCE4 // 3300\n\tSYS___GETTHENT                      = 0xCE5 // 3301\n\tSYS_FREEIFADDRS                     = 0xCE6 // 3302\n\tSYS_GETIFADDRS                      = 0xCE7 // 3303\n\tSYS_POSIX_FALLOCATE                 = 0xCE8 // 3304\n\tSYS_POSIX_MEMALIGN                  = 0xCE9 // 3305\n\tSYS_SIZEOF_ALLOC                    = 0xCEA // 3306\n\tSYS_RESIZE_ALLOC                    = 0xCEB // 3307\n\tSYS_FREAD_NOUPDATE                  = 0xCEC // 3308\n\tSYS_FREAD_NOUPDATE_UNLOCKED         = 0xCED // 3309\n\tSYS_FGETPOS64                       = 0xCEE // 3310\n\tSYS_FSEEK64                         = 0xCEF // 3311\n\tSYS_FSEEKO64                        = 0xCF0 // 3312\n\tSYS_FSETPOS64                       = 0xCF1 // 3313\n\tSYS_FTELL64                         = 0xCF2 // 3314\n\tSYS_FTELLO64                        = 0xCF3 // 3315\n\tSYS_FGETPOS64_UNLOCKED              = 0xCF4 // 3316\n\tSYS_FSEEK64_UNLOCKED                = 0xCF5 // 3317\n\tSYS_FSEEKO64_UNLOCKED               = 0xCF6 // 3318\n\tSYS_FSETPOS64_UNLOCKED              = 0xCF7 // 3319\n\tSYS_FTELL64_UNLOCKED                = 0xCF8 // 3320\n\tSYS_FTELLO64_UNLOCKED               = 0xCF9 // 3321\n\tSYS_FOPEN_UNLOCKED                  = 0xCFA // 3322\n\tSYS_FREOPEN_UNLOCKED                = 0xCFB // 3323\n\tSYS_FDOPEN_UNLOCKED                 = 0xCFC // 3324\n\tSYS_TMPFILE_UNLOCKED                = 0xCFD // 3325\n\tSYS___MOSERVICES                    = 0xD3D // 3389\n\tSYS___GETTOD                        = 0xD3E // 3390\n\tSYS_C16RTOMB                        = 0xD40 // 3392\n\tSYS_C32RTOMB                        = 0xD41 // 3393\n\tSYS_MBRTOC16                        = 0xD42 // 3394\n\tSYS_MBRTOC32                        = 0xD43 // 3395\n\tSYS_QUANTEXPD32                     = 0xD44 // 3396\n\tSYS_QUANTEXPD64                     = 0xD45 // 3397\n\tSYS_QUANTEXPD128                    = 0xD46 // 3398\n\tSYS___LOCALE_CTL                    = 0xD47 // 3399\n\tSYS___SMF_RECORD2                   = 0xD48 // 3400\n\tSYS_FOPEN64                         = 0xD49 // 3401\n\tSYS_FOPEN64_UNLOCKED                = 0xD4A // 3402\n\tSYS_FREOPEN64                       = 0xD4B // 3403\n\tSYS_FREOPEN64_UNLOCKED              = 0xD4C // 3404\n\tSYS_TMPFILE64                       = 0xD4D // 3405\n\tSYS_TMPFILE64_UNLOCKED              = 0xD4E // 3406\n\tSYS_GETDATE64                       = 0xD4F // 3407\n\tSYS_GETTIMEOFDAY64                  = 0xD50 // 3408\n\tSYS_BIND2ADDRSEL                    = 0xD59 // 3417\n\tSYS_INET6_IS_SRCADDR                = 0xD5A // 3418\n\tSYS___GETGRGID1                     = 0xD5B // 3419\n\tSYS___GETGRNAM1                     = 0xD5C // 3420\n\tSYS___FBUFSIZE                      = 0xD60 // 3424\n\tSYS___FPENDING                      = 0xD61 // 3425\n\tSYS___FLBF                          = 0xD62 // 3426\n\tSYS___FREADABLE                     = 0xD63 // 3427\n\tSYS___FWRITABLE                     = 0xD64 // 3428\n\tSYS___FREADING                      = 0xD65 // 3429\n\tSYS___FWRITING                      = 0xD66 // 3430\n\tSYS___FSETLOCKING                   = 0xD67 // 3431\n\tSYS__FLUSHLBF                       = 0xD68 // 3432\n\tSYS___FPURGE                        = 0xD69 // 3433\n\tSYS___FREADAHEAD                    = 0xD6A // 3434\n\tSYS___FSETERR                       = 0xD6B // 3435\n\tSYS___FPENDING_UNLOCKED             = 0xD6C // 3436\n\tSYS___FREADING_UNLOCKED             = 0xD6D // 3437\n\tSYS___FWRITING_UNLOCKED             = 0xD6E // 3438\n\tSYS__FLUSHLBF_UNLOCKED              = 0xD6F // 3439\n\tSYS___FPURGE_UNLOCKED               = 0xD70 // 3440\n\tSYS___FREADAHEAD_UNLOCKED           = 0xD71 // 3441\n\tSYS___LE_CEEGTJS                    = 0xD72 // 3442\n\tSYS___LE_RECORD_DUMP                = 0xD73 // 3443\n\tSYS_FSTAT64                         = 0xD74 // 3444\n\tSYS_LSTAT64                         = 0xD75 // 3445\n\tSYS_STAT64                          = 0xD76 // 3446\n\tSYS___READDIR2_64                   = 0xD77 // 3447\n\tSYS___OPEN_STAT64                   = 0xD78 // 3448\n\tSYS_FTW64                           = 0xD79 // 3449\n\tSYS_NFTW64                          = 0xD7A // 3450\n\tSYS_UTIME64                         = 0xD7B // 3451\n\tSYS_UTIMES64                        = 0xD7C // 3452\n\tSYS___GETIPC64                      = 0xD7D // 3453\n\tSYS_MSGCTL64                        = 0xD7E // 3454\n\tSYS_SEMCTL64                        = 0xD7F // 3455\n\tSYS_SHMCTL64                        = 0xD80 // 3456\n\tSYS_MSGXRCV64                       = 0xD81 // 3457\n\tSYS___MGXR64                        = 0xD81 // 3457\n\tSYS_W_GETPSENT64                    = 0xD82 // 3458\n\tSYS_PTHREAD_COND_TIMEDWAIT64        = 0xD83 // 3459\n\tSYS_FTIME64                         = 0xD85 // 3461\n\tSYS_GETUTXENT64                     = 0xD86 // 3462\n\tSYS_GETUTXID64                      = 0xD87 // 3463\n\tSYS_GETUTXLINE64                    = 0xD88 // 3464\n\tSYS_PUTUTXLINE64                    = 0xD89 // 3465\n\tSYS_NEWLOCALE                       = 0xD8A // 3466\n\tSYS_FREELOCALE                      = 0xD8B // 3467\n\tSYS_USELOCALE                       = 0xD8C // 3468\n\tSYS_DUPLOCALE                       = 0xD8D // 3469\n\tSYS___CHATTR64                      = 0xD9C // 3484\n\tSYS___LCHATTR64                     = 0xD9D // 3485\n\tSYS___FCHATTR64                     = 0xD9E // 3486\n\tSYS_____CHATTR64_A                  = 0xD9F // 3487\n\tSYS_____LCHATTR64_A                 = 0xDA0 // 3488\n\tSYS___LE_CEEUSGD                    = 0xDA1 // 3489\n\tSYS___LE_IFAM_CON                   = 0xDA2 // 3490\n\tSYS___LE_IFAM_DSC                   = 0xDA3 // 3491\n\tSYS___LE_IFAM_GET                   = 0xDA4 // 3492\n\tSYS___LE_IFAM_QRY                   = 0xDA5 // 3493\n\tSYS_ALIGNED_ALLOC                   = 0xDA6 // 3494\n\tSYS_ACCEPT4                         = 0xDA7 // 3495\n\tSYS___ACCEPT4_A                     = 0xDA8 // 3496\n\tSYS_COPYFILERANGE                   = 0xDA9 // 3497\n\tSYS_GETLINE                         = 0xDAA // 3498\n\tSYS___GETLINE_A                     = 0xDAB // 3499\n\tSYS_DIRFD                           = 0xDAC // 3500\n\tSYS_CLOCK_GETTIME                   = 0xDAD // 3501\n\tSYS_DUP3                            = 0xDAE // 3502\n\tSYS_EPOLL_CREATE                    = 0xDAF // 3503\n\tSYS_EPOLL_CREATE1                   = 0xDB0 // 3504\n\tSYS_EPOLL_CTL                       = 0xDB1 // 3505\n\tSYS_EPOLL_WAIT                      = 0xDB2 // 3506\n\tSYS_EPOLL_PWAIT                     = 0xDB3 // 3507\n\tSYS_EVENTFD                         = 0xDB4 // 3508\n\tSYS_STATFS                          = 0xDB5 // 3509\n\tSYS___STATFS_A                      = 0xDB6 // 3510\n\tSYS_FSTATFS                         = 0xDB7 // 3511\n\tSYS_INOTIFY_INIT                    = 0xDB8 // 3512\n\tSYS_INOTIFY_INIT1                   = 0xDB9 // 3513\n\tSYS_INOTIFY_ADD_WATCH               = 0xDBA // 3514\n\tSYS___INOTIFY_ADD_WATCH_A           = 0xDBB // 3515\n\tSYS_INOTIFY_RM_WATCH                = 0xDBC // 3516\n\tSYS_PIPE2                           = 0xDBD // 3517\n\tSYS_PIVOT_ROOT                      = 0xDBE // 3518\n\tSYS___PIVOT_ROOT_A                  = 0xDBF // 3519\n\tSYS_PRCTL                           = 0xDC0 // 3520\n\tSYS_PRLIMIT                         = 0xDC1 // 3521\n\tSYS_SETHOSTNAME                     = 0xDC2 // 3522\n\tSYS___SETHOSTNAME_A                 = 0xDC3 // 3523\n\tSYS_SETRESUID                       = 0xDC4 // 3524\n\tSYS_SETRESGID                       = 0xDC5 // 3525\n\tSYS_PTHREAD_CONDATTR_GETCLOCK       = 0xDC6 // 3526\n\tSYS_FLOCK                           = 0xDC7 // 3527\n\tSYS_FGETXATTR                       = 0xDC8 // 3528\n\tSYS___FGETXATTR_A                   = 0xDC9 // 3529\n\tSYS_FLISTXATTR                      = 0xDCA // 3530\n\tSYS___FLISTXATTR_A                  = 0xDCB // 3531\n\tSYS_FREMOVEXATTR                    = 0xDCC // 3532\n\tSYS___FREMOVEXATTR_A                = 0xDCD // 3533\n\tSYS_FSETXATTR                       = 0xDCE // 3534\n\tSYS___FSETXATTR_A                   = 0xDCF // 3535\n\tSYS_GETXATTR                        = 0xDD0 // 3536\n\tSYS___GETXATTR_A                    = 0xDD1 // 3537\n\tSYS_LGETXATTR                       = 0xDD2 // 3538\n\tSYS___LGETXATTR_A                   = 0xDD3 // 3539\n\tSYS_LISTXATTR                       = 0xDD4 // 3540\n\tSYS___LISTXATTR_A                   = 0xDD5 // 3541\n\tSYS_LLISTXATTR                      = 0xDD6 // 3542\n\tSYS___LLISTXATTR_A                  = 0xDD7 // 3543\n\tSYS_LREMOVEXATTR                    = 0xDD8 // 3544\n\tSYS___LREMOVEXATTR_A                = 0xDD9 // 3545\n\tSYS_LSETXATTR                       = 0xDDA // 3546\n\tSYS___LSETXATTR_A                   = 0xDDB // 3547\n\tSYS_REMOVEXATTR                     = 0xDDC // 3548\n\tSYS___REMOVEXATTR_A                 = 0xDDD // 3549\n\tSYS_SETXATTR                        = 0xDDE // 3550\n\tSYS___SETXATTR_A                    = 0xDDF // 3551\n\tSYS_FDATASYNC                       = 0xDE0 // 3552\n\tSYS_SYNCFS                          = 0xDE1 // 3553\n\tSYS_FUTIMES                         = 0xDE2 // 3554\n\tSYS_FUTIMESAT                       = 0xDE3 // 3555\n\tSYS___FUTIMESAT_A                   = 0xDE4 // 3556\n\tSYS_LUTIMES                         = 0xDE5 // 3557\n\tSYS___LUTIMES_A                     = 0xDE6 // 3558\n\tSYS_INET_ATON                       = 0xDE7 // 3559\n\tSYS_GETRANDOM                       = 0xDE8 // 3560\n\tSYS_GETTID                          = 0xDE9 // 3561\n\tSYS_MEMFD_CREATE                    = 0xDEA // 3562\n\tSYS___MEMFD_CREATE_A                = 0xDEB // 3563\n\tSYS_FACCESSAT                       = 0xDEC // 3564\n\tSYS___FACCESSAT_A                   = 0xDED // 3565\n\tSYS_FCHMODAT                        = 0xDEE // 3566\n\tSYS___FCHMODAT_A                    = 0xDEF // 3567\n\tSYS_FCHOWNAT                        = 0xDF0 // 3568\n\tSYS___FCHOWNAT_A                    = 0xDF1 // 3569\n\tSYS_FSTATAT                         = 0xDF2 // 3570\n\tSYS___FSTATAT_A                     = 0xDF3 // 3571\n\tSYS_LINKAT                          = 0xDF4 // 3572\n\tSYS___LINKAT_A                      = 0xDF5 // 3573\n\tSYS_MKDIRAT                         = 0xDF6 // 3574\n\tSYS___MKDIRAT_A                     = 0xDF7 // 3575\n\tSYS_MKFIFOAT                        = 0xDF8 // 3576\n\tSYS___MKFIFOAT_A                    = 0xDF9 // 3577\n\tSYS_MKNODAT                         = 0xDFA // 3578\n\tSYS___MKNODAT_A                     = 0xDFB // 3579\n\tSYS_OPENAT                          = 0xDFC // 3580\n\tSYS___OPENAT_A                      = 0xDFD // 3581\n\tSYS_READLINKAT                      = 0xDFE // 3582\n\tSYS___READLINKAT_A                  = 0xDFF // 3583\n\tSYS_RENAMEAT                        = 0xE00 // 3584\n\tSYS___RENAMEAT_A                    = 0xE01 // 3585\n\tSYS_RENAMEAT2                       = 0xE02 // 3586\n\tSYS___RENAMEAT2_A                   = 0xE03 // 3587\n\tSYS_SYMLINKAT                       = 0xE04 // 3588\n\tSYS___SYMLINKAT_A                   = 0xE05 // 3589\n\tSYS_UNLINKAT                        = 0xE06 // 3590\n\tSYS___UNLINKAT_A                    = 0xE07 // 3591\n\tSYS_SYSINFO                         = 0xE08 // 3592\n\tSYS_WAIT4                           = 0xE0A // 3594\n\tSYS_CLONE                           = 0xE0B // 3595\n\tSYS_UNSHARE                         = 0xE0C // 3596\n\tSYS_SETNS                           = 0xE0D // 3597\n\tSYS_CAPGET                          = 0xE0E // 3598\n\tSYS_CAPSET                          = 0xE0F // 3599\n\tSYS_STRCHRNUL                       = 0xE10 // 3600\n\tSYS_PTHREAD_CONDATTR_SETCLOCK       = 0xE12 // 3602\n\tSYS_OPEN_BY_HANDLE_AT               = 0xE13 // 3603\n\tSYS___OPEN_BY_HANDLE_AT_A           = 0xE14 // 3604\n\tSYS___INET_ATON_A                   = 0xE15 // 3605\n\tSYS_MOUNT1                          = 0xE16 // 3606\n\tSYS___MOUNT1_A                      = 0xE17 // 3607\n\tSYS_UMOUNT1                         = 0xE18 // 3608\n\tSYS___UMOUNT1_A                     = 0xE19 // 3609\n\tSYS_UMOUNT2                         = 0xE1A // 3610\n\tSYS___UMOUNT2_A                     = 0xE1B // 3611\n\tSYS___PRCTL_A                       = 0xE1C // 3612\n\tSYS_LOCALTIME_R2                    = 0xE1D // 3613\n\tSYS___LOCALTIME_R2_A                = 0xE1E // 3614\n\tSYS_OPENAT2                         = 0xE1F // 3615\n\tSYS___OPENAT2_A                     = 0xE20 // 3616\n\tSYS___LE_CEEMICT                    = 0xE21 // 3617\n\tSYS_GETENTROPY                      = 0xE22 // 3618\n\tSYS_NANOSLEEP                       = 0xE23 // 3619\n\tSYS_UTIMENSAT                       = 0xE24 // 3620\n\tSYS___UTIMENSAT_A                   = 0xE25 // 3621\n\tSYS_ASPRINTF                        = 0xE26 // 3622\n\tSYS___ASPRINTF_A                    = 0xE27 // 3623\n\tSYS_VASPRINTF                       = 0xE28 // 3624\n\tSYS___VASPRINTF_A                   = 0xE29 // 3625\n\tSYS_DPRINTF                         = 0xE2A // 3626\n\tSYS___DPRINTF_A                     = 0xE2B // 3627\n\tSYS_GETOPT_LONG                     = 0xE2C // 3628\n\tSYS___GETOPT_LONG_A                 = 0xE2D // 3629\n\tSYS_PSIGNAL                         = 0xE2E // 3630\n\tSYS___PSIGNAL_A                     = 0xE2F // 3631\n\tSYS_PSIGNAL_UNLOCKED                = 0xE30 // 3632\n\tSYS___PSIGNAL_UNLOCKED_A            = 0xE31 // 3633\n\tSYS_FSTATAT_O                       = 0xE32 // 3634\n\tSYS___FSTATAT_O_A                   = 0xE33 // 3635\n\tSYS_FSTATAT64                       = 0xE34 // 3636\n\tSYS___FSTATAT64_A                   = 0xE35 // 3637\n\tSYS___CHATTRAT                      = 0xE36 // 3638\n\tSYS_____CHATTRAT_A                  = 0xE37 // 3639\n\tSYS___CHATTRAT64                    = 0xE38 // 3640\n\tSYS_____CHATTRAT64_A                = 0xE39 // 3641\n\tSYS_MADVISE                         = 0xE3A // 3642\n\tSYS___AUTHENTICATE                  = 0xE3B // 3643\n\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go",
    "content": "// cgo -godefs types_aix.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc && aix\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n\tPathMax        = 0x3ff\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype off64 int64\ntype off int32\ntype Mode_t uint32\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timeval32 struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct{}\n\ntype Time_t int32\n\ntype Tms struct{}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Timezone struct {\n\tMinuteswest int32\n\tDsttime     int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype Pid_t int32\n\ntype _Gid_t uint32\n\ntype dev_t uint32\n\ntype Stat_t struct {\n\tDev      uint32\n\tIno      uint32\n\tMode     uint32\n\tNlink    int16\n\tFlag     uint16\n\tUid      uint32\n\tGid      uint32\n\tRdev     uint32\n\tSize     int32\n\tAtim     Timespec\n\tMtim     Timespec\n\tCtim     Timespec\n\tBlksize  int32\n\tBlocks   int32\n\tVfstype  int32\n\tVfs      uint32\n\tType     uint32\n\tGen      uint32\n\tReserved [9]uint32\n}\n\ntype StatxTimestamp struct{}\n\ntype Statx_t struct{}\n\ntype Dirent struct {\n\tOffset uint32\n\tIno    uint32\n\tReclen uint16\n\tNamlen uint16\n\tName   [256]uint8\n}\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]uint8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [1023]uint8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [120]uint8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [1012]uint8\n}\n\ntype _Socklen uint32\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x404\n\tSizeofSockaddrUnix     = 0x401\n\tSizeofSockaddrDatalink = 0x80\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tSizeofIfMsghdr = 0x10\n)\n\ntype IfMsgHdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tAddrlen uint8\n\t_       [1]byte\n}\n\ntype FdSet struct {\n\tBits [2048]int32\n}\n\ntype Utsname struct {\n\tSysname  [32]byte\n\tNodename [32]byte\n\tRelease  [32]byte\n\tVersion  [32]byte\n\tMachine  [32]byte\n}\n\ntype Ustat_t struct{}\n\ntype Sigset_t struct {\n\tLosigs uint32\n\tHisigs uint32\n}\n\nconst (\n\tAT_FDCWD            = -0x2\n\tAT_REMOVEDIR        = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x1\n)\n\ntype Termios struct {\n\tIflag uint32\n\tOflag uint32\n\tCflag uint32\n\tLflag uint32\n\tCc    [16]uint8\n}\n\ntype Termio struct {\n\tIflag uint16\n\tOflag uint16\n\tCflag uint16\n\tLflag uint16\n\tLine  uint8\n\tCc    [8]uint8\n\t_     [1]byte\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  uint16\n\tRevents uint16\n}\n\nconst (\n\tPOLLERR    = 0x4000\n\tPOLLHUP    = 0x2000\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x8000\n\tPOLLOUT    = 0x2\n\tPOLLPRI    = 0x4\n\tPOLLRDBAND = 0x20\n\tPOLLRDNORM = 0x10\n\tPOLLWRBAND = 0x40\n\tPOLLWRNORM = 0x2\n)\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tSysid  uint32\n\tPid    int32\n\tVfs    int32\n\tStart  int64\n\tLen    int64\n}\n\ntype Fsid_t struct {\n\tVal [2]uint32\n}\ntype Fsid64_t struct {\n\tVal [2]uint64\n}\n\ntype Statfs_t struct {\n\tVersion   int32\n\tType      int32\n\tBsize     uint32\n\tBlocks    uint32\n\tBfree     uint32\n\tBavail    uint32\n\tFiles     uint32\n\tFfree     uint32\n\tFsid      Fsid_t\n\tVfstype   int32\n\tFsize     uint32\n\tVfsnumber int32\n\tVfsoff    int32\n\tVfslen    int32\n\tVfsvers   int32\n\tFname     [32]uint8\n\tFpack     [32]uint8\n\tName_max  int32\n}\n\nconst RNDGETENTCNT = 0x80045200\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go",
    "content": "// cgo -godefs types_aix.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && aix\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n\tPathMax        = 0x3ff\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype off64 int64\ntype off int64\ntype Mode_t uint32\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Timeval32 struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct{}\n\ntype Time_t int64\n\ntype Tms struct{}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Timezone struct {\n\tMinuteswest int32\n\tDsttime     int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype Pid_t int32\n\ntype _Gid_t uint32\n\ntype dev_t uint64\n\ntype Stat_t struct {\n\tDev      uint64\n\tIno      uint64\n\tMode     uint32\n\tNlink    int16\n\tFlag     uint16\n\tUid      uint32\n\tGid      uint32\n\tRdev     uint64\n\tSsize    int32\n\tAtim     Timespec\n\tMtim     Timespec\n\tCtim     Timespec\n\tBlksize  int64\n\tBlocks   int64\n\tVfstype  int32\n\tVfs      uint32\n\tType     uint32\n\tGen      uint32\n\tReserved [9]uint32\n\tPadto_ll uint32\n\tSize     int64\n}\n\ntype StatxTimestamp struct{}\n\ntype Statx_t struct{}\n\ntype Dirent struct {\n\tOffset uint64\n\tIno    uint64\n\tReclen uint16\n\tNamlen uint16\n\tName   [256]uint8\n\t_      [4]byte\n}\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]uint8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [1023]uint8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [120]uint8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [1012]uint8\n}\n\ntype _Socklen uint32\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x404\n\tSizeofSockaddrUnix     = 0x401\n\tSizeofSockaddrDatalink = 0x80\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tSizeofIfMsghdr = 0x10\n)\n\ntype IfMsgHdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tAddrlen uint8\n\t_       [1]byte\n}\n\ntype FdSet struct {\n\tBits [1024]int64\n}\n\ntype Utsname struct {\n\tSysname  [32]byte\n\tNodename [32]byte\n\tRelease  [32]byte\n\tVersion  [32]byte\n\tMachine  [32]byte\n}\n\ntype Ustat_t struct{}\n\ntype Sigset_t struct {\n\tSet [4]uint64\n}\n\nconst (\n\tAT_FDCWD            = -0x2\n\tAT_REMOVEDIR        = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x1\n)\n\ntype Termios struct {\n\tIflag uint32\n\tOflag uint32\n\tCflag uint32\n\tLflag uint32\n\tCc    [16]uint8\n}\n\ntype Termio struct {\n\tIflag uint16\n\tOflag uint16\n\tCflag uint16\n\tLflag uint16\n\tLine  uint8\n\tCc    [8]uint8\n\t_     [1]byte\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  uint16\n\tRevents uint16\n}\n\nconst (\n\tPOLLERR    = 0x4000\n\tPOLLHUP    = 0x2000\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x8000\n\tPOLLOUT    = 0x2\n\tPOLLPRI    = 0x4\n\tPOLLRDBAND = 0x20\n\tPOLLRDNORM = 0x10\n\tPOLLWRBAND = 0x40\n\tPOLLWRNORM = 0x2\n)\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tSysid  uint32\n\tPid    int32\n\tVfs    int32\n\tStart  int64\n\tLen    int64\n}\n\ntype Fsid_t struct {\n\tVal [2]uint32\n}\ntype Fsid64_t struct {\n\tVal [2]uint64\n}\n\ntype Statfs_t struct {\n\tVersion   int32\n\tType      int32\n\tBsize     uint64\n\tBlocks    uint64\n\tBfree     uint64\n\tBavail    uint64\n\tFiles     uint64\n\tFfree     uint64\n\tFsid      Fsid64_t\n\tVfstype   int32\n\tFsize     uint64\n\tVfsnumber int32\n\tVfsoff    int32\n\tVfslen    int32\n\tVfsvers   int32\n\tFname     [32]uint8\n\tFpack     [32]uint8\n\tName_max  int32\n\t_         [4]byte\n}\n\nconst RNDGETENTCNT = 0x80045200\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go",
    "content": "// cgo -godefs types_darwin.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && darwin\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Timeval32 struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     int32\n\tMode    uint16\n\tNlink   uint16\n\tIno     uint64\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\tLspare  int32\n\tQspare  [2]int64\n}\n\ntype Statfs_t struct {\n\tBsize       uint32\n\tIosize      int32\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFsid        Fsid\n\tOwner       uint32\n\tType        uint32\n\tFlags       uint32\n\tFssubtype   uint32\n\tFstypename  [16]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n\tFlags_ext   uint32\n\tReserved    [7]uint32\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Fstore_t struct {\n\tFlags      uint32\n\tPosmode    int32\n\tOffset     int64\n\tLength     int64\n\tBytesalloc int64\n}\n\ntype Radvisory_t struct {\n\tOffset int64\n\tCount  int32\n\t_      [4]byte\n}\n\ntype Fbootstraptransfer_t struct {\n\tOffset int64\n\tLength uint64\n\tBuffer *byte\n}\n\ntype Log2phys_t struct {\n\tFlags uint32\n\t_     [16]byte\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\ntype Dirent struct {\n\tIno     uint64\n\tSeekoff uint64\n\tReclen  uint16\n\tNamlen  uint16\n\tType    uint8\n\tName    [1024]int8\n\t_       [3]byte\n}\n\ntype Attrlist struct {\n\tBitmapcount uint16\n\tReserved    uint16\n\tCommonattr  uint32\n\tVolattr     uint32\n\tDirattr     uint32\n\tFileattr    uint32\n\tForkattr    uint32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype RawSockaddrCtl struct {\n\tSc_len      uint8\n\tSc_family   uint8\n\tSs_sysaddr  uint16\n\tSc_id       uint32\n\tSc_unit     uint32\n\tSc_reserved [5]uint32\n}\n\ntype RawSockaddrVM struct {\n\tLen       uint8\n\tFamily    uint8\n\tReserved1 uint16\n\tPort      uint32\n\tCid       uint32\n}\n\ntype XVSockPCB struct {\n\tXv_len           uint32\n\tXv_vsockpp       uint64\n\tXvp_local_cid    uint32\n\tXvp_local_port   uint32\n\tXvp_remote_cid   uint32\n\tXvp_remote_port  uint32\n\tXvp_rxcnt        uint32\n\tXvp_txcnt        uint32\n\tXvp_peer_rxhiwat uint32\n\tXvp_peer_rxcnt   uint32\n\tXvp_last_pid     int32\n\tXvp_gencnt       uint64\n\tXv_socket        XSocket\n\t_                [4]byte\n}\n\ntype XSocket struct {\n\tXso_len      uint32\n\tXso_so       uint32\n\tSo_type      int16\n\tSo_options   int16\n\tSo_linger    int16\n\tSo_state     int16\n\tSo_pcb       uint32\n\tXso_protocol int32\n\tXso_family   int32\n\tSo_qlen      int16\n\tSo_incqlen   int16\n\tSo_qlimit    int16\n\tSo_timeo     int16\n\tSo_error     uint16\n\tSo_pgid      int32\n\tSo_oobmark   uint32\n\tSo_rcv       XSockbuf\n\tSo_snd       XSockbuf\n\tSo_uid       uint32\n}\n\ntype XSocket64 struct {\n\tXso_len      uint32\n\t_            [8]byte\n\tSo_type      int16\n\tSo_options   int16\n\tSo_linger    int16\n\tSo_state     int16\n\t_            [8]byte\n\tXso_protocol int32\n\tXso_family   int32\n\tSo_qlen      int16\n\tSo_incqlen   int16\n\tSo_qlimit    int16\n\tSo_timeo     int16\n\tSo_error     uint16\n\tSo_pgid      int32\n\tSo_oobmark   uint32\n\tSo_rcv       XSockbuf\n\tSo_snd       XSockbuf\n\tSo_uid       uint32\n}\n\ntype XSockbuf struct {\n\tCc    uint32\n\tHiwat uint32\n\tMbcnt uint32\n\tMbmax uint32\n\tLowat int32\n\tFlags int16\n\tTimeo int16\n}\n\ntype XVSockPgen struct {\n\tLen   uint32\n\tCount uint64\n\tGen   uint64\n\tSogen uint64\n}\n\ntype _Socklen uint32\n\ntype SaeAssocID uint32\n\ntype SaeConnID uint32\n\ntype SaEndpoints struct {\n\tSrcif      uint32\n\tSrcaddr    *RawSockaddr\n\tSrcaddrlen uint32\n\tDstaddr    *RawSockaddr\n\tDstaddrlen uint32\n\t_          [4]byte\n}\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet4Pktinfo struct {\n\tIfindex  uint32\n\tSpec_dst [4]byte /* in_addr */\n\tAddr     [4]byte /* in_addr */\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\ntype TCPConnectionInfo struct {\n\tState               uint8\n\tSnd_wscale          uint8\n\tRcv_wscale          uint8\n\t_                   uint8\n\tOptions             uint32\n\tFlags               uint32\n\tRto                 uint32\n\tMaxseg              uint32\n\tSnd_ssthresh        uint32\n\tSnd_cwnd            uint32\n\tSnd_wnd             uint32\n\tSnd_sbbytes         uint32\n\tRcv_wnd             uint32\n\tRttcur              uint32\n\tSrtt                uint32\n\tRttvar              uint32\n\tTxpackets           uint64\n\tTxbytes             uint64\n\tTxretransmitbytes   uint64\n\tRxpackets           uint64\n\tRxbytes             uint64\n\tRxoutoforderbytes   uint64\n\tTxretransmitpackets uint64\n}\n\nconst (\n\tSizeofSockaddrInet4     = 0x10\n\tSizeofSockaddrInet6     = 0x1c\n\tSizeofSockaddrAny       = 0x6c\n\tSizeofSockaddrUnix      = 0x6a\n\tSizeofSockaddrDatalink  = 0x14\n\tSizeofSockaddrCtl       = 0x20\n\tSizeofSockaddrVM        = 0xc\n\tSizeofXvsockpcb         = 0xa8\n\tSizeofXSocket           = 0x64\n\tSizeofXSockbuf          = 0x18\n\tSizeofXVSockPgen        = 0x20\n\tSizeofXucred            = 0x4c\n\tSizeofLinger            = 0x8\n\tSizeofIovec             = 0x10\n\tSizeofIPMreq            = 0x8\n\tSizeofIPMreqn           = 0xc\n\tSizeofIPv6Mreq          = 0x14\n\tSizeofMsghdr            = 0x30\n\tSizeofCmsghdr           = 0xc\n\tSizeofInet4Pktinfo      = 0xc\n\tSizeofInet6Pktinfo      = 0x14\n\tSizeofIPv6MTUInfo       = 0x20\n\tSizeofICMPv6Filter      = 0x20\n\tSizeofTCPConnectionInfo = 0x70\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\nconst (\n\tSizeofIfMsghdr    = 0x70\n\tSizeofIfMsghdr2   = 0xa0\n\tSizeofIfData      = 0x60\n\tSizeofIfData64    = 0x80\n\tSizeofIfaMsghdr   = 0x14\n\tSizeofIfmaMsghdr  = 0x10\n\tSizeofIfmaMsghdr2 = 0x14\n\tSizeofRtMsghdr    = 0x5c\n\tSizeofRtMsghdr2   = 0x5c\n\tSizeofRtMetrics   = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype IfMsghdr2 struct {\n\tMsglen     uint16\n\tVersion    uint8\n\tType       uint8\n\tAddrs      int32\n\tFlags      int32\n\tIndex      uint16\n\tSnd_len    int32\n\tSnd_maxlen int32\n\tSnd_drops  int32\n\tTimer      int32\n\tData       IfData64\n}\n\ntype IfData struct {\n\tType       uint8\n\tTypelen    uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tRecvquota  uint8\n\tXmitquota  uint8\n\tUnused1    uint8\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint32\n\tIpackets   uint32\n\tIerrors    uint32\n\tOpackets   uint32\n\tOerrors    uint32\n\tCollisions uint32\n\tIbytes     uint32\n\tObytes     uint32\n\tImcasts    uint32\n\tOmcasts    uint32\n\tIqdrops    uint32\n\tNoproto    uint32\n\tRecvtiming uint32\n\tXmittiming uint32\n\tLastchange Timeval32\n\tUnused2    uint32\n\tHwassist   uint32\n\tReserved1  uint32\n\tReserved2  uint32\n}\n\ntype IfData64 struct {\n\tType       uint8\n\tTypelen    uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tRecvquota  uint8\n\tXmitquota  uint8\n\tUnused1    uint8\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tRecvtiming uint32\n\tXmittiming uint32\n\tLastchange Timeval32\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       [2]byte\n}\n\ntype IfmaMsghdr2 struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tAddrs    int32\n\tFlags    int32\n\tIndex    uint16\n\tRefcount int32\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tUse     int32\n\tInits   uint32\n\tRmx     RtMetrics\n}\n\ntype RtMsghdr2 struct {\n\tMsglen      uint16\n\tVersion     uint8\n\tType        uint8\n\tIndex       uint16\n\tFlags       int32\n\tAddrs       int32\n\tRefcnt      int32\n\tParentflags int32\n\tReserved    int32\n\tUse         int32\n\tInits       uint32\n\tRmx         RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint32\n\tMtu      uint32\n\tHopcount uint32\n\tExpire   int32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPksent   uint32\n\tState    uint32\n\tFiller   [3]uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x14\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval32\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [2]byte\n}\n\ntype Termios struct {\n\tIflag  uint64\n\tOflag  uint64\n\tCflag  uint64\n\tLflag  uint64\n\tCc     [20]uint8\n\tIspeed uint64\n\tOspeed uint64\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x2\n\tAT_REMOVEDIR        = 0x80\n\tAT_SYMLINK_FOLLOW   = 0x40\n\tAT_SYMLINK_NOFOLLOW = 0x20\n\tAT_EACCESS          = 0x10\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n\ntype CtlInfo struct {\n\tId   uint32\n\tName [96]byte\n}\n\nconst SizeofKinfoProc = 0x288\n\ntype Eproc struct {\n\tPaddr   uintptr\n\tSess    uintptr\n\tPcred   Pcred\n\tUcred   Ucred\n\tVm      Vmspace\n\tPpid    int32\n\tPgid    int32\n\tJobc    int16\n\tTdev    int32\n\tTpgid   int32\n\tTsess   uintptr\n\tWmesg   [8]byte\n\tXsize   int32\n\tXrssize int16\n\tXccount int16\n\tXswrss  int16\n\tFlag    int32\n\tLogin   [12]byte\n\tSpare   [4]int32\n\t_       [4]byte\n}\n\ntype ExternProc struct {\n\tP_starttime Timeval\n\tP_vmspace   *Vmspace\n\tP_sigacts   uintptr\n\tP_flag      int32\n\tP_stat      int8\n\tP_pid       int32\n\tP_oppid     int32\n\tP_dupfd     int32\n\tUser_stack  *int8\n\tExit_thread *byte\n\tP_debugger  int32\n\tSigwait     int32\n\tP_estcpu    uint32\n\tP_cpticks   int32\n\tP_pctcpu    uint32\n\tP_wchan     *byte\n\tP_wmesg     *int8\n\tP_swtime    uint32\n\tP_slptime   uint32\n\tP_realtimer Itimerval\n\tP_rtime     Timeval\n\tP_uticks    uint64\n\tP_sticks    uint64\n\tP_iticks    uint64\n\tP_traceflag int32\n\tP_tracep    uintptr\n\tP_siglist   int32\n\tP_textvp    uintptr\n\tP_holdcnt   int32\n\tP_sigmask   uint32\n\tP_sigignore uint32\n\tP_sigcatch  uint32\n\tP_priority  uint8\n\tP_usrpri    uint8\n\tP_nice      int8\n\tP_comm      [17]byte\n\tP_pgrp      uintptr\n\tP_addr      uintptr\n\tP_xstat     uint16\n\tP_acflag    uint16\n\tP_ru        *Rusage\n}\n\ntype Itimerval struct {\n\tInterval Timeval\n\tValue    Timeval\n}\n\ntype KinfoProc struct {\n\tProc  ExternProc\n\tEproc Eproc\n}\n\ntype Vmspace struct {\n\tDummy  int32\n\tDummy2 *int8\n\tDummy3 [5]int32\n\tDummy4 [3]*int8\n}\n\ntype Pcred struct {\n\tPc_lock  [72]int8\n\tPc_ucred uintptr\n\tP_ruid   uint32\n\tP_svuid  uint32\n\tP_rgid   uint32\n\tP_svgid  uint32\n\tP_refcnt int32\n\t_        [4]byte\n}\n\ntype Ucred struct {\n\tRef     int32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n}\n\ntype SysvIpcPerm struct {\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint16\n\t_    uint16\n\t_    int32\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tLpid   int32\n\tCpid   int32\n\tNattch uint16\n\t_      [34]byte\n}\n\nconst (\n\tIPC_CREAT   = 0x200\n\tIPC_EXCL    = 0x400\n\tIPC_NOWAIT  = 0x800\n\tIPC_PRIVATE = 0x0\n)\n\nconst (\n\tIPC_RMID = 0x0\n\tIPC_SET  = 0x1\n\tIPC_STAT = 0x2\n)\n\nconst (\n\tSHM_RDONLY = 0x1000\n\tSHM_RND    = 0x2000\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go",
    "content": "// cgo -godefs types_darwin.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && darwin\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Timeval32 struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     int32\n\tMode    uint16\n\tNlink   uint16\n\tIno     uint64\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\tLspare  int32\n\tQspare  [2]int64\n}\n\ntype Statfs_t struct {\n\tBsize       uint32\n\tIosize      int32\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFsid        Fsid\n\tOwner       uint32\n\tType        uint32\n\tFlags       uint32\n\tFssubtype   uint32\n\tFstypename  [16]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n\tFlags_ext   uint32\n\tReserved    [7]uint32\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Fstore_t struct {\n\tFlags      uint32\n\tPosmode    int32\n\tOffset     int64\n\tLength     int64\n\tBytesalloc int64\n}\n\ntype Radvisory_t struct {\n\tOffset int64\n\tCount  int32\n\t_      [4]byte\n}\n\ntype Fbootstraptransfer_t struct {\n\tOffset int64\n\tLength uint64\n\tBuffer *byte\n}\n\ntype Log2phys_t struct {\n\tFlags uint32\n\t_     [16]byte\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\ntype Dirent struct {\n\tIno     uint64\n\tSeekoff uint64\n\tReclen  uint16\n\tNamlen  uint16\n\tType    uint8\n\tName    [1024]int8\n\t_       [3]byte\n}\n\ntype Attrlist struct {\n\tBitmapcount uint16\n\tReserved    uint16\n\tCommonattr  uint32\n\tVolattr     uint32\n\tDirattr     uint32\n\tFileattr    uint32\n\tForkattr    uint32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype RawSockaddrCtl struct {\n\tSc_len      uint8\n\tSc_family   uint8\n\tSs_sysaddr  uint16\n\tSc_id       uint32\n\tSc_unit     uint32\n\tSc_reserved [5]uint32\n}\n\ntype RawSockaddrVM struct {\n\tLen       uint8\n\tFamily    uint8\n\tReserved1 uint16\n\tPort      uint32\n\tCid       uint32\n}\n\ntype XVSockPCB struct {\n\tXv_len           uint32\n\tXv_vsockpp       uint64\n\tXvp_local_cid    uint32\n\tXvp_local_port   uint32\n\tXvp_remote_cid   uint32\n\tXvp_remote_port  uint32\n\tXvp_rxcnt        uint32\n\tXvp_txcnt        uint32\n\tXvp_peer_rxhiwat uint32\n\tXvp_peer_rxcnt   uint32\n\tXvp_last_pid     int32\n\tXvp_gencnt       uint64\n\tXv_socket        XSocket\n\t_                [4]byte\n}\n\ntype XSocket struct {\n\tXso_len      uint32\n\tXso_so       uint32\n\tSo_type      int16\n\tSo_options   int16\n\tSo_linger    int16\n\tSo_state     int16\n\tSo_pcb       uint32\n\tXso_protocol int32\n\tXso_family   int32\n\tSo_qlen      int16\n\tSo_incqlen   int16\n\tSo_qlimit    int16\n\tSo_timeo     int16\n\tSo_error     uint16\n\tSo_pgid      int32\n\tSo_oobmark   uint32\n\tSo_rcv       XSockbuf\n\tSo_snd       XSockbuf\n\tSo_uid       uint32\n}\n\ntype XSocket64 struct {\n\tXso_len      uint32\n\t_            [8]byte\n\tSo_type      int16\n\tSo_options   int16\n\tSo_linger    int16\n\tSo_state     int16\n\t_            [8]byte\n\tXso_protocol int32\n\tXso_family   int32\n\tSo_qlen      int16\n\tSo_incqlen   int16\n\tSo_qlimit    int16\n\tSo_timeo     int16\n\tSo_error     uint16\n\tSo_pgid      int32\n\tSo_oobmark   uint32\n\tSo_rcv       XSockbuf\n\tSo_snd       XSockbuf\n\tSo_uid       uint32\n}\n\ntype XSockbuf struct {\n\tCc    uint32\n\tHiwat uint32\n\tMbcnt uint32\n\tMbmax uint32\n\tLowat int32\n\tFlags int16\n\tTimeo int16\n}\n\ntype XVSockPgen struct {\n\tLen   uint32\n\tCount uint64\n\tGen   uint64\n\tSogen uint64\n}\n\ntype _Socklen uint32\n\ntype SaeAssocID uint32\n\ntype SaeConnID uint32\n\ntype SaEndpoints struct {\n\tSrcif      uint32\n\tSrcaddr    *RawSockaddr\n\tSrcaddrlen uint32\n\tDstaddr    *RawSockaddr\n\tDstaddrlen uint32\n\t_          [4]byte\n}\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet4Pktinfo struct {\n\tIfindex  uint32\n\tSpec_dst [4]byte /* in_addr */\n\tAddr     [4]byte /* in_addr */\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\ntype TCPConnectionInfo struct {\n\tState               uint8\n\tSnd_wscale          uint8\n\tRcv_wscale          uint8\n\t_                   uint8\n\tOptions             uint32\n\tFlags               uint32\n\tRto                 uint32\n\tMaxseg              uint32\n\tSnd_ssthresh        uint32\n\tSnd_cwnd            uint32\n\tSnd_wnd             uint32\n\tSnd_sbbytes         uint32\n\tRcv_wnd             uint32\n\tRttcur              uint32\n\tSrtt                uint32\n\tRttvar              uint32\n\tTxpackets           uint64\n\tTxbytes             uint64\n\tTxretransmitbytes   uint64\n\tRxpackets           uint64\n\tRxbytes             uint64\n\tRxoutoforderbytes   uint64\n\tTxretransmitpackets uint64\n}\n\nconst (\n\tSizeofSockaddrInet4     = 0x10\n\tSizeofSockaddrInet6     = 0x1c\n\tSizeofSockaddrAny       = 0x6c\n\tSizeofSockaddrUnix      = 0x6a\n\tSizeofSockaddrDatalink  = 0x14\n\tSizeofSockaddrCtl       = 0x20\n\tSizeofSockaddrVM        = 0xc\n\tSizeofXvsockpcb         = 0xa8\n\tSizeofXSocket           = 0x64\n\tSizeofXSockbuf          = 0x18\n\tSizeofXVSockPgen        = 0x20\n\tSizeofXucred            = 0x4c\n\tSizeofLinger            = 0x8\n\tSizeofIovec             = 0x10\n\tSizeofIPMreq            = 0x8\n\tSizeofIPMreqn           = 0xc\n\tSizeofIPv6Mreq          = 0x14\n\tSizeofMsghdr            = 0x30\n\tSizeofCmsghdr           = 0xc\n\tSizeofInet4Pktinfo      = 0xc\n\tSizeofInet6Pktinfo      = 0x14\n\tSizeofIPv6MTUInfo       = 0x20\n\tSizeofICMPv6Filter      = 0x20\n\tSizeofTCPConnectionInfo = 0x70\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\nconst (\n\tSizeofIfMsghdr    = 0x70\n\tSizeofIfMsghdr2   = 0xa0\n\tSizeofIfData      = 0x60\n\tSizeofIfData64    = 0x80\n\tSizeofIfaMsghdr   = 0x14\n\tSizeofIfmaMsghdr  = 0x10\n\tSizeofIfmaMsghdr2 = 0x14\n\tSizeofRtMsghdr    = 0x5c\n\tSizeofRtMsghdr2   = 0x5c\n\tSizeofRtMetrics   = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype IfMsghdr2 struct {\n\tMsglen     uint16\n\tVersion    uint8\n\tType       uint8\n\tAddrs      int32\n\tFlags      int32\n\tIndex      uint16\n\tSnd_len    int32\n\tSnd_maxlen int32\n\tSnd_drops  int32\n\tTimer      int32\n\tData       IfData64\n}\n\ntype IfData struct {\n\tType       uint8\n\tTypelen    uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tRecvquota  uint8\n\tXmitquota  uint8\n\tUnused1    uint8\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint32\n\tIpackets   uint32\n\tIerrors    uint32\n\tOpackets   uint32\n\tOerrors    uint32\n\tCollisions uint32\n\tIbytes     uint32\n\tObytes     uint32\n\tImcasts    uint32\n\tOmcasts    uint32\n\tIqdrops    uint32\n\tNoproto    uint32\n\tRecvtiming uint32\n\tXmittiming uint32\n\tLastchange Timeval32\n\tUnused2    uint32\n\tHwassist   uint32\n\tReserved1  uint32\n\tReserved2  uint32\n}\n\ntype IfData64 struct {\n\tType       uint8\n\tTypelen    uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tRecvquota  uint8\n\tXmitquota  uint8\n\tUnused1    uint8\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tRecvtiming uint32\n\tXmittiming uint32\n\tLastchange Timeval32\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       [2]byte\n}\n\ntype IfmaMsghdr2 struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tAddrs    int32\n\tFlags    int32\n\tIndex    uint16\n\tRefcount int32\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tUse     int32\n\tInits   uint32\n\tRmx     RtMetrics\n}\n\ntype RtMsghdr2 struct {\n\tMsglen      uint16\n\tVersion     uint8\n\tType        uint8\n\tIndex       uint16\n\tFlags       int32\n\tAddrs       int32\n\tRefcnt      int32\n\tParentflags int32\n\tReserved    int32\n\tUse         int32\n\tInits       uint32\n\tRmx         RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint32\n\tMtu      uint32\n\tHopcount uint32\n\tExpire   int32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPksent   uint32\n\tState    uint32\n\tFiller   [3]uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x14\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval32\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [2]byte\n}\n\ntype Termios struct {\n\tIflag  uint64\n\tOflag  uint64\n\tCflag  uint64\n\tLflag  uint64\n\tCc     [20]uint8\n\tIspeed uint64\n\tOspeed uint64\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x2\n\tAT_REMOVEDIR        = 0x80\n\tAT_SYMLINK_FOLLOW   = 0x40\n\tAT_SYMLINK_NOFOLLOW = 0x20\n\tAT_EACCESS          = 0x10\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n\ntype CtlInfo struct {\n\tId   uint32\n\tName [96]byte\n}\n\nconst SizeofKinfoProc = 0x288\n\ntype Eproc struct {\n\tPaddr   uintptr\n\tSess    uintptr\n\tPcred   Pcred\n\tUcred   Ucred\n\tVm      Vmspace\n\tPpid    int32\n\tPgid    int32\n\tJobc    int16\n\tTdev    int32\n\tTpgid   int32\n\tTsess   uintptr\n\tWmesg   [8]byte\n\tXsize   int32\n\tXrssize int16\n\tXccount int16\n\tXswrss  int16\n\tFlag    int32\n\tLogin   [12]byte\n\tSpare   [4]int32\n\t_       [4]byte\n}\n\ntype ExternProc struct {\n\tP_starttime Timeval\n\tP_vmspace   *Vmspace\n\tP_sigacts   uintptr\n\tP_flag      int32\n\tP_stat      int8\n\tP_pid       int32\n\tP_oppid     int32\n\tP_dupfd     int32\n\tUser_stack  *int8\n\tExit_thread *byte\n\tP_debugger  int32\n\tSigwait     int32\n\tP_estcpu    uint32\n\tP_cpticks   int32\n\tP_pctcpu    uint32\n\tP_wchan     *byte\n\tP_wmesg     *int8\n\tP_swtime    uint32\n\tP_slptime   uint32\n\tP_realtimer Itimerval\n\tP_rtime     Timeval\n\tP_uticks    uint64\n\tP_sticks    uint64\n\tP_iticks    uint64\n\tP_traceflag int32\n\tP_tracep    uintptr\n\tP_siglist   int32\n\tP_textvp    uintptr\n\tP_holdcnt   int32\n\tP_sigmask   uint32\n\tP_sigignore uint32\n\tP_sigcatch  uint32\n\tP_priority  uint8\n\tP_usrpri    uint8\n\tP_nice      int8\n\tP_comm      [17]byte\n\tP_pgrp      uintptr\n\tP_addr      uintptr\n\tP_xstat     uint16\n\tP_acflag    uint16\n\tP_ru        *Rusage\n}\n\ntype Itimerval struct {\n\tInterval Timeval\n\tValue    Timeval\n}\n\ntype KinfoProc struct {\n\tProc  ExternProc\n\tEproc Eproc\n}\n\ntype Vmspace struct {\n\tDummy  int32\n\tDummy2 *int8\n\tDummy3 [5]int32\n\tDummy4 [3]*int8\n}\n\ntype Pcred struct {\n\tPc_lock  [72]int8\n\tPc_ucred uintptr\n\tP_ruid   uint32\n\tP_svuid  uint32\n\tP_rgid   uint32\n\tP_svgid  uint32\n\tP_refcnt int32\n\t_        [4]byte\n}\n\ntype Ucred struct {\n\tRef     int32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n}\n\ntype SysvIpcPerm struct {\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint16\n\t_    uint16\n\t_    int32\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tLpid   int32\n\tCpid   int32\n\tNattch uint16\n\t_      [34]byte\n}\n\nconst (\n\tIPC_CREAT   = 0x200\n\tIPC_EXCL    = 0x400\n\tIPC_NOWAIT  = 0x800\n\tIPC_PRIVATE = 0x0\n)\n\nconst (\n\tIPC_RMID = 0x0\n\tIPC_SET  = 0x1\n\tIPC_STAT = 0x2\n)\n\nconst (\n\tSHM_RDONLY = 0x1000\n\tSHM_RND    = 0x2000\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go",
    "content": "// cgo -godefs types_dragonfly.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && dragonfly\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tIno     uint64\n\tNlink   uint32\n\tDev     uint32\n\tMode    uint16\n\t_1      uint16\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\t_       uint32\n\tFlags   uint32\n\tGen     uint32\n\tLspare  int32\n\tBlksize int64\n\tQspare2 int64\n}\n\ntype Statfs_t struct {\n\tSpare2      int64\n\tBsize       int64\n\tIosize      int64\n\tBlocks      int64\n\tBfree       int64\n\tBavail      int64\n\tFiles       int64\n\tFfree       int64\n\tFsid        Fsid\n\tOwner       uint32\n\tType        int32\n\tFlags       int32\n\tSyncwrites  int64\n\tAsyncwrites int64\n\tFstypename  [16]byte\n\tMntonname   [80]byte\n\tSyncreads   int64\n\tAsyncreads  int64\n\tSpares1     int16\n\tMntfromname [80]byte\n\tSpares2     int16\n\tSpare       [2]int64\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno  uint64\n\tNamlen  uint16\n\tType    uint8\n\tUnused1 uint8\n\tUnused2 uint32\n\tName    [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n\tRcf    uint16\n\tRoute  [16]uint16\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [16]uint64\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xb0\n\tSizeofIfData           = 0xa0\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x98\n\tSizeofRtMetrics        = 0x70\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tRecvquota  uint8\n\tXmitquota  uint8\n\tMtu        uint64\n\tMetric     uint64\n\tLink_state uint64\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\tOqdrops    uint64\n\tLastchange Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tIndex     uint16\n\tFlags     int32\n\tAddrs     int32\n\tAddrflags int32\n\tMetric    int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tUse     int32\n\tInits   uint64\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks     uint64\n\tMtu       uint64\n\tPksent    uint64\n\tExpire    uint64\n\tSendpipe  uint64\n\tSsthresh  uint64\n\tRtt       uint64\n\tRttvar    uint64\n\tRecvpipe  uint64\n\tHopcount  uint64\n\tMssopt    uint16\n\tPad       uint16\n\tMsl       uint64\n\tIwmaxsegs uint64\n\tIwcapsegs uint64\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [6]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = 0xfffafdcd\n\tAT_SYMLINK_NOFOLLOW = 0x1\n\tAT_REMOVEDIR        = 0x2\n\tAT_EACCESS          = 0x4\n\tAT_SYMLINK_FOLLOW   = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Utsname struct {\n\tSysname  [32]byte\n\tNodename [32]byte\n\tRelease  [32]byte\n\tVersion  [32]byte\n\tMachine  [32]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go",
    "content": "// cgo -godefs types_freebsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && freebsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Time_t int32\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\nconst (\n\t_statfsVersion = 0x20140518\n\t_dirblksiz     = 0x400\n)\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint16\n\t_0      int16\n\tUid     uint32\n\tGid     uint32\n\t_1      int32\n\tRdev    uint64\n\t_       int32\n\tAtim    Timespec\n\t_       int32\n\tMtim    Timespec\n\t_       int32\n\tCtim    Timespec\n\t_       int32\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint64\n\tSpare   [10]uint64\n}\n\ntype Statfs_t struct {\n\tVersion     uint32\n\tType        uint32\n\tFlags       uint64\n\tBsize       uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      int64\n\tFiles       uint64\n\tFfree       int64\n\tSyncwrites  uint64\n\tAsyncwrites uint64\n\tSyncreads   uint64\n\tAsyncreads  uint64\n\tSpare       [10]uint64\n\tNamemax     uint32\n\tOwner       uint32\n\tFsid        Fsid\n\tCharspare   [80]int8\n\tFstypename  [16]byte\n\tMntfromname [1024]byte\n\tMntonname   [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n\tSysid  int32\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tPad0   uint8\n\tNamlen uint16\n\tPad1   uint16\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n\t_       *byte\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofXucred           = 0x50\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPMreqn          = 0xc\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype PtraceLwpInfoStruct struct {\n\tLwpid        int32\n\tEvent        int32\n\tFlags        int32\n\tSigmask      Sigset_t\n\tSiglist      Sigset_t\n\tSiginfo      __PtraceSiginfo\n\tTdname       [20]int8\n\tChild_pid    int32\n\tSyscall_code uint32\n\tSyscall_narg uint32\n}\n\ntype __Siginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   *byte\n\tValue  [4]byte\n\t_      [32]byte\n}\ntype __PtraceSiginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   uintptr\n\tValue  [4]byte\n\t_      [32]byte\n}\n\ntype Sigset_t struct {\n\tVal [4]uint32\n}\n\ntype Reg struct {\n\tFs     uint32\n\tEs     uint32\n\tDs     uint32\n\tEdi    uint32\n\tEsi    uint32\n\tEbp    uint32\n\tIsp    uint32\n\tEbx    uint32\n\tEdx    uint32\n\tEcx    uint32\n\tEax    uint32\n\tTrapno uint32\n\tErr    uint32\n\tEip    uint32\n\tCs     uint32\n\tEflags uint32\n\tEsp    uint32\n\tSs     uint32\n\tGs     uint32\n}\n\ntype FpReg struct {\n\tEnv   [7]uint32\n\tAcc   [8][10]uint8\n\tEx_sw uint32\n\tPad   [64]uint8\n}\n\ntype FpExtendedPrecision struct{}\n\ntype PtraceIoDesc struct {\n\tOp   int32\n\tOffs uintptr\n\tAddr *byte\n\tLen  uint32\n}\n\ntype Kevent_t struct {\n\tIdent  uint32\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n\tExt    [4]uint64\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tsizeofIfMsghdr         = 0xa8\n\tSizeofIfMsghdr         = 0x60\n\tsizeofIfData           = 0x98\n\tSizeofIfData           = 0x50\n\tSizeofIfaMsghdr        = 0x14\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x5c\n\tSizeofRtMetrics        = 0x38\n)\n\ntype ifMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tData    ifData\n}\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype ifData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tLink_state uint8\n\tVhid       uint8\n\tDatalen    uint16\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tOqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\t_          [8]byte\n\t_          [16]byte\n}\n\ntype IfData struct {\n\tType        uint8\n\tPhysical    uint8\n\tAddrlen     uint8\n\tHdrlen      uint8\n\tLink_state  uint8\n\tSpare_char1 uint8\n\tSpare_char2 uint8\n\tDatalen     uint8\n\tMtu         uint32\n\tMetric      uint32\n\tBaudrate    uint32\n\tIpackets    uint32\n\tIerrors     uint32\n\tOpackets    uint32\n\tOerrors     uint32\n\tCollisions  uint32\n\tIbytes      uint32\n\tObytes      uint32\n\tImcasts     uint32\n\tOmcasts     uint32\n\tIqdrops     uint32\n\tNoproto     uint32\n\tHwassist    uint32\n\tEpoch       int32\n\tLastchange  Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\t_       uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tFmask   int32\n\tInits   uint32\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint32\n\tMtu      uint32\n\tHopcount uint32\n\tExpire   uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPksent   uint32\n\tWeight   uint32\n\tFiller   [3]uint32\n}\n\nconst (\n\tSizeofBpfVersion    = 0x4\n\tSizeofBpfStat       = 0x8\n\tSizeofBpfZbuf       = 0xc\n\tSizeofBpfProgram    = 0x8\n\tSizeofBpfInsn       = 0x8\n\tSizeofBpfHdr        = 0x14\n\tSizeofBpfZbufHeader = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfZbuf struct {\n\tBufa   *byte\n\tBufb   *byte\n\tBuflen uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [2]byte\n}\n\ntype BpfZbufHeader struct {\n\tKernel_gen uint32\n\tKernel_len uint32\n\tUser_gen   uint32\n\t_          [5]uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR      = 0x8\n\tPOLLHUP      = 0x10\n\tPOLLIN       = 0x1\n\tPOLLINIGNEOF = 0x2000\n\tPOLLNVAL     = 0x20\n\tPOLLOUT      = 0x4\n\tPOLLPRI      = 0x2\n\tPOLLRDBAND   = 0x80\n\tPOLLRDNORM   = 0x40\n\tPOLLWRBAND   = 0x100\n\tPOLLWRNORM   = 0x4\n\tPOLLRDHUP    = 0x4000\n)\n\ntype CapRights struct {\n\tRights [2]uint64\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tSpare  int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go",
    "content": "// cgo -godefs types_freebsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && freebsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Time_t int64\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\nconst (\n\t_statfsVersion = 0x20140518\n\t_dirblksiz     = 0x400\n)\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint16\n\t_0      int16\n\tUid     uint32\n\tGid     uint32\n\t_1      int32\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint64\n\tSpare   [10]uint64\n}\n\ntype Statfs_t struct {\n\tVersion     uint32\n\tType        uint32\n\tFlags       uint64\n\tBsize       uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      int64\n\tFiles       uint64\n\tFfree       int64\n\tSyncwrites  uint64\n\tAsyncwrites uint64\n\tSyncreads   uint64\n\tAsyncreads  uint64\n\tSpare       [10]uint64\n\tNamemax     uint32\n\tOwner       uint32\n\tFsid        Fsid\n\tCharspare   [80]int8\n\tFstypename  [16]byte\n\tMntfromname [1024]byte\n\tMntonname   [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n\tSysid  int32\n\t_      [4]byte\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tPad0   uint8\n\tNamlen uint16\n\tPad1   uint16\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n\t_       *byte\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofXucred           = 0x58\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPMreqn          = 0xc\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype PtraceLwpInfoStruct struct {\n\tLwpid        int32\n\tEvent        int32\n\tFlags        int32\n\tSigmask      Sigset_t\n\tSiglist      Sigset_t\n\tSiginfo      __PtraceSiginfo\n\tTdname       [20]int8\n\tChild_pid    int32\n\tSyscall_code uint32\n\tSyscall_narg uint32\n}\n\ntype __Siginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   *byte\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype __PtraceSiginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   uintptr\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype Sigset_t struct {\n\tVal [4]uint32\n}\n\ntype Reg struct {\n\tR15    int64\n\tR14    int64\n\tR13    int64\n\tR12    int64\n\tR11    int64\n\tR10    int64\n\tR9     int64\n\tR8     int64\n\tRdi    int64\n\tRsi    int64\n\tRbp    int64\n\tRbx    int64\n\tRdx    int64\n\tRcx    int64\n\tRax    int64\n\tTrapno uint32\n\tFs     uint16\n\tGs     uint16\n\tErr    uint32\n\tEs     uint16\n\tDs     uint16\n\tRip    int64\n\tCs     int64\n\tRflags int64\n\tRsp    int64\n\tSs     int64\n}\n\ntype FpReg struct {\n\tEnv   [4]uint64\n\tAcc   [8][16]uint8\n\tXacc  [16][16]uint8\n\tSpare [12]uint64\n}\n\ntype FpExtendedPrecision struct{}\n\ntype PtraceIoDesc struct {\n\tOp   int32\n\tOffs uintptr\n\tAddr *byte\n\tLen  uint64\n}\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n\tExt    [4]uint64\n}\n\ntype FdSet struct {\n\tBits [16]uint64\n}\n\nconst (\n\tsizeofIfMsghdr         = 0xa8\n\tSizeofIfMsghdr         = 0xa8\n\tsizeofIfData           = 0x98\n\tSizeofIfData           = 0x98\n\tSizeofIfaMsghdr        = 0x14\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x98\n\tSizeofRtMetrics        = 0x70\n)\n\ntype ifMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tData    ifData\n}\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype ifData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tLink_state uint8\n\tVhid       uint8\n\tDatalen    uint16\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tOqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\t_          [8]byte\n\t_          [16]byte\n}\n\ntype IfData struct {\n\tType        uint8\n\tPhysical    uint8\n\tAddrlen     uint8\n\tHdrlen      uint8\n\tLink_state  uint8\n\tSpare_char1 uint8\n\tSpare_char2 uint8\n\tDatalen     uint8\n\tMtu         uint64\n\tMetric      uint64\n\tBaudrate    uint64\n\tIpackets    uint64\n\tIerrors     uint64\n\tOpackets    uint64\n\tOerrors     uint64\n\tCollisions  uint64\n\tIbytes      uint64\n\tObytes      uint64\n\tImcasts     uint64\n\tOmcasts     uint64\n\tIqdrops     uint64\n\tNoproto     uint64\n\tHwassist    uint64\n\tEpoch       int64\n\tLastchange  Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\t_       uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tFmask   int32\n\tInits   uint64\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tExpire   uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tPksent   uint64\n\tWeight   uint64\n\tFiller   [3]uint64\n}\n\nconst (\n\tSizeofBpfVersion    = 0x4\n\tSizeofBpfStat       = 0x8\n\tSizeofBpfZbuf       = 0x18\n\tSizeofBpfProgram    = 0x10\n\tSizeofBpfInsn       = 0x8\n\tSizeofBpfHdr        = 0x20\n\tSizeofBpfZbufHeader = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfZbuf struct {\n\tBufa   *byte\n\tBufb   *byte\n\tBuflen uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [6]byte\n}\n\ntype BpfZbufHeader struct {\n\tKernel_gen uint32\n\tKernel_len uint32\n\tUser_gen   uint32\n\t_          [5]uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR      = 0x8\n\tPOLLHUP      = 0x10\n\tPOLLIN       = 0x1\n\tPOLLINIGNEOF = 0x2000\n\tPOLLNVAL     = 0x20\n\tPOLLOUT      = 0x4\n\tPOLLPRI      = 0x2\n\tPOLLRDBAND   = 0x80\n\tPOLLRDNORM   = 0x40\n\tPOLLWRBAND   = 0x100\n\tPOLLWRNORM   = 0x4\n\tPOLLRDHUP    = 0x4000\n)\n\ntype CapRights struct {\n\tRights [2]uint64\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tSpare  int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go",
    "content": "// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && freebsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int32\n\t_    [4]byte\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Time_t int64\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\nconst (\n\t_statfsVersion = 0x20140518\n\t_dirblksiz     = 0x400\n)\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint16\n\t_0      int16\n\tUid     uint32\n\tGid     uint32\n\t_1      int32\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint64\n\tSpare   [10]uint64\n}\n\ntype Statfs_t struct {\n\tVersion     uint32\n\tType        uint32\n\tFlags       uint64\n\tBsize       uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      int64\n\tFiles       uint64\n\tFfree       int64\n\tSyncwrites  uint64\n\tAsyncwrites uint64\n\tSyncreads   uint64\n\tAsyncreads  uint64\n\tSpare       [10]uint64\n\tNamemax     uint32\n\tOwner       uint32\n\tFsid        Fsid\n\tCharspare   [80]int8\n\tFstypename  [16]byte\n\tMntfromname [1024]byte\n\tMntonname   [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n\tSysid  int32\n\t_      [4]byte\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tPad0   uint8\n\tNamlen uint16\n\tPad1   uint16\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n\t_       *byte\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofXucred           = 0x50\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPMreqn          = 0xc\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype PtraceLwpInfoStruct struct {\n\tLwpid        int32\n\tEvent        int32\n\tFlags        int32\n\tSigmask      Sigset_t\n\tSiglist      Sigset_t\n\tSiginfo      __PtraceSiginfo\n\tTdname       [20]int8\n\tChild_pid    int32\n\tSyscall_code uint32\n\tSyscall_narg uint32\n}\n\ntype __Siginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   *byte\n\tValue  [4]byte\n\t_      [32]byte\n}\n\ntype __PtraceSiginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   uintptr\n\tValue  [4]byte\n\t_      [32]byte\n}\n\ntype Sigset_t struct {\n\tVal [4]uint32\n}\n\ntype Reg struct {\n\tR    [13]uint32\n\tSp   uint32\n\tLr   uint32\n\tPc   uint32\n\tCpsr uint32\n}\n\ntype FpReg struct {\n\tFpsr uint32\n\tFpr  [8]FpExtendedPrecision\n}\n\ntype FpExtendedPrecision struct {\n\tExponent    uint32\n\tMantissa_hi uint32\n\tMantissa_lo uint32\n}\n\ntype PtraceIoDesc struct {\n\tOp   int32\n\tOffs uintptr\n\tAddr *byte\n\tLen  uint32\n}\n\ntype Kevent_t struct {\n\tIdent  uint32\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\t_      [4]byte\n\tData   int64\n\tUdata  *byte\n\t_      [4]byte\n\tExt    [4]uint64\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tsizeofIfMsghdr         = 0xa8\n\tSizeofIfMsghdr         = 0x70\n\tsizeofIfData           = 0x98\n\tSizeofIfData           = 0x60\n\tSizeofIfaMsghdr        = 0x14\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x5c\n\tSizeofRtMetrics        = 0x38\n)\n\ntype ifMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tData    ifData\n}\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype ifData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tLink_state uint8\n\tVhid       uint8\n\tDatalen    uint16\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tOqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\t_          [8]byte\n\t_          [16]byte\n}\n\ntype IfData struct {\n\tType        uint8\n\tPhysical    uint8\n\tAddrlen     uint8\n\tHdrlen      uint8\n\tLink_state  uint8\n\tSpare_char1 uint8\n\tSpare_char2 uint8\n\tDatalen     uint8\n\tMtu         uint32\n\tMetric      uint32\n\tBaudrate    uint32\n\tIpackets    uint32\n\tIerrors     uint32\n\tOpackets    uint32\n\tOerrors     uint32\n\tCollisions  uint32\n\tIbytes      uint32\n\tObytes      uint32\n\tImcasts     uint32\n\tOmcasts     uint32\n\tIqdrops     uint32\n\tNoproto     uint32\n\tHwassist    uint32\n\t_           [4]byte\n\tEpoch       int64\n\tLastchange  Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\t_       uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tFmask   int32\n\tInits   uint32\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint32\n\tMtu      uint32\n\tHopcount uint32\n\tExpire   uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPksent   uint32\n\tWeight   uint32\n\tFiller   [3]uint32\n}\n\nconst (\n\tSizeofBpfVersion    = 0x4\n\tSizeofBpfStat       = 0x8\n\tSizeofBpfZbuf       = 0xc\n\tSizeofBpfProgram    = 0x8\n\tSizeofBpfInsn       = 0x8\n\tSizeofBpfHdr        = 0x20\n\tSizeofBpfZbufHeader = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfZbuf struct {\n\tBufa   *byte\n\tBufb   *byte\n\tBuflen uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [6]byte\n}\n\ntype BpfZbufHeader struct {\n\tKernel_gen uint32\n\tKernel_len uint32\n\tUser_gen   uint32\n\t_          [5]uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR      = 0x8\n\tPOLLHUP      = 0x10\n\tPOLLIN       = 0x1\n\tPOLLINIGNEOF = 0x2000\n\tPOLLNVAL     = 0x20\n\tPOLLOUT      = 0x4\n\tPOLLPRI      = 0x2\n\tPOLLRDBAND   = 0x80\n\tPOLLRDNORM   = 0x40\n\tPOLLWRBAND   = 0x100\n\tPOLLWRNORM   = 0x4\n\tPOLLRDHUP    = 0x4000\n)\n\ntype CapRights struct {\n\tRights [2]uint64\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tSpare  int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go",
    "content": "// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && freebsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Time_t int64\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\nconst (\n\t_statfsVersion = 0x20140518\n\t_dirblksiz     = 0x400\n)\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint16\n\t_0      int16\n\tUid     uint32\n\tGid     uint32\n\t_1      int32\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint64\n\tSpare   [10]uint64\n}\n\ntype Statfs_t struct {\n\tVersion     uint32\n\tType        uint32\n\tFlags       uint64\n\tBsize       uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      int64\n\tFiles       uint64\n\tFfree       int64\n\tSyncwrites  uint64\n\tAsyncwrites uint64\n\tSyncreads   uint64\n\tAsyncreads  uint64\n\tSpare       [10]uint64\n\tNamemax     uint32\n\tOwner       uint32\n\tFsid        Fsid\n\tCharspare   [80]int8\n\tFstypename  [16]byte\n\tMntfromname [1024]byte\n\tMntonname   [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n\tSysid  int32\n\t_      [4]byte\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tPad0   uint8\n\tNamlen uint16\n\tPad1   uint16\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n\t_       *byte\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofXucred           = 0x58\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPMreqn          = 0xc\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype PtraceLwpInfoStruct struct {\n\tLwpid        int32\n\tEvent        int32\n\tFlags        int32\n\tSigmask      Sigset_t\n\tSiglist      Sigset_t\n\tSiginfo      __PtraceSiginfo\n\tTdname       [20]int8\n\tChild_pid    int32\n\tSyscall_code uint32\n\tSyscall_narg uint32\n}\n\ntype __Siginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   *byte\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype __PtraceSiginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   uintptr\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype Sigset_t struct {\n\tVal [4]uint32\n}\n\ntype Reg struct {\n\tX    [30]uint64\n\tLr   uint64\n\tSp   uint64\n\tElr  uint64\n\tSpsr uint32\n\t_    [4]byte\n}\n\ntype FpReg struct {\n\tQ  [32][16]uint8\n\tSr uint32\n\tCr uint32\n\t_  [8]byte\n}\n\ntype FpExtendedPrecision struct{}\n\ntype PtraceIoDesc struct {\n\tOp   int32\n\tOffs uintptr\n\tAddr *byte\n\tLen  uint64\n}\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n\tExt    [4]uint64\n}\n\ntype FdSet struct {\n\tBits [16]uint64\n}\n\nconst (\n\tsizeofIfMsghdr         = 0xa8\n\tSizeofIfMsghdr         = 0xa8\n\tsizeofIfData           = 0x98\n\tSizeofIfData           = 0x98\n\tSizeofIfaMsghdr        = 0x14\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x98\n\tSizeofRtMetrics        = 0x70\n)\n\ntype ifMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tData    ifData\n}\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype ifData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tLink_state uint8\n\tVhid       uint8\n\tDatalen    uint16\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tOqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\t_          [8]byte\n\t_          [16]byte\n}\n\ntype IfData struct {\n\tType        uint8\n\tPhysical    uint8\n\tAddrlen     uint8\n\tHdrlen      uint8\n\tLink_state  uint8\n\tSpare_char1 uint8\n\tSpare_char2 uint8\n\tDatalen     uint8\n\tMtu         uint64\n\tMetric      uint64\n\tBaudrate    uint64\n\tIpackets    uint64\n\tIerrors     uint64\n\tOpackets    uint64\n\tOerrors     uint64\n\tCollisions  uint64\n\tIbytes      uint64\n\tObytes      uint64\n\tImcasts     uint64\n\tOmcasts     uint64\n\tIqdrops     uint64\n\tNoproto     uint64\n\tHwassist    uint64\n\tEpoch       int64\n\tLastchange  Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\t_       uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tFmask   int32\n\tInits   uint64\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tExpire   uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tPksent   uint64\n\tWeight   uint64\n\tFiller   [3]uint64\n}\n\nconst (\n\tSizeofBpfVersion    = 0x4\n\tSizeofBpfStat       = 0x8\n\tSizeofBpfZbuf       = 0x18\n\tSizeofBpfProgram    = 0x10\n\tSizeofBpfInsn       = 0x8\n\tSizeofBpfHdr        = 0x20\n\tSizeofBpfZbufHeader = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfZbuf struct {\n\tBufa   *byte\n\tBufb   *byte\n\tBuflen uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [6]byte\n}\n\ntype BpfZbufHeader struct {\n\tKernel_gen uint32\n\tKernel_len uint32\n\tUser_gen   uint32\n\t_          [5]uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR      = 0x8\n\tPOLLHUP      = 0x10\n\tPOLLIN       = 0x1\n\tPOLLINIGNEOF = 0x2000\n\tPOLLNVAL     = 0x20\n\tPOLLOUT      = 0x4\n\tPOLLPRI      = 0x2\n\tPOLLRDBAND   = 0x80\n\tPOLLRDNORM   = 0x40\n\tPOLLWRBAND   = 0x100\n\tPOLLWRNORM   = 0x4\n\tPOLLRDHUP    = 0x4000\n)\n\ntype CapRights struct {\n\tRights [2]uint64\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tSpare  int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go",
    "content": "// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && freebsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Time_t int64\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur int64\n\tMax int64\n}\n\ntype _Gid_t uint32\n\nconst (\n\t_statfsVersion = 0x20140518\n\t_dirblksiz     = 0x400\n)\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint16\n\t_0      int16\n\tUid     uint32\n\tGid     uint32\n\t_1      int32\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint64\n\tSpare   [10]uint64\n}\n\ntype Statfs_t struct {\n\tVersion     uint32\n\tType        uint32\n\tFlags       uint64\n\tBsize       uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      int64\n\tFiles       uint64\n\tFfree       int64\n\tSyncwrites  uint64\n\tAsyncwrites uint64\n\tSyncreads   uint64\n\tAsyncreads  uint64\n\tSpare       [10]uint64\n\tNamemax     uint32\n\tOwner       uint32\n\tFsid        Fsid\n\tCharspare   [80]int8\n\tFstypename  [16]byte\n\tMntfromname [1024]byte\n\tMntonname   [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n\tSysid  int32\n\t_      [4]byte\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tPad0   uint8\n\tNamlen uint16\n\tPad1   uint16\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [46]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Xucred struct {\n\tVersion uint32\n\tUid     uint32\n\tNgroups int16\n\tGroups  [16]uint32\n\t_       *byte\n}\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x36\n\tSizeofXucred           = 0x58\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPMreqn          = 0xc\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype PtraceLwpInfoStruct struct {\n\tLwpid        int32\n\tEvent        int32\n\tFlags        int32\n\tSigmask      Sigset_t\n\tSiglist      Sigset_t\n\tSiginfo      __PtraceSiginfo\n\tTdname       [20]int8\n\tChild_pid    int32\n\tSyscall_code uint32\n\tSyscall_narg uint32\n}\n\ntype __Siginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   *byte\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype __PtraceSiginfo struct {\n\tSigno  int32\n\tErrno  int32\n\tCode   int32\n\tPid    int32\n\tUid    uint32\n\tStatus int32\n\tAddr   uintptr\n\tValue  [8]byte\n\t_      [40]byte\n}\n\ntype Sigset_t struct {\n\tVal [4]uint32\n}\n\ntype Reg struct {\n\tRa      uint64\n\tSp      uint64\n\tGp      uint64\n\tTp      uint64\n\tT       [7]uint64\n\tS       [12]uint64\n\tA       [8]uint64\n\tSepc    uint64\n\tSstatus uint64\n}\n\ntype FpReg struct {\n\tX    [32][2]uint64\n\tFcsr uint64\n}\n\ntype FpExtendedPrecision struct{}\n\ntype PtraceIoDesc struct {\n\tOp   int32\n\tOffs uintptr\n\tAddr *byte\n\tLen  uint64\n}\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n\tExt    [4]uint64\n}\n\ntype FdSet struct {\n\tBits [16]uint64\n}\n\nconst (\n\tsizeofIfMsghdr         = 0xa8\n\tSizeofIfMsghdr         = 0xa8\n\tsizeofIfData           = 0x98\n\tSizeofIfData           = 0x98\n\tSizeofIfaMsghdr        = 0x14\n\tSizeofIfmaMsghdr       = 0x10\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x98\n\tSizeofRtMetrics        = 0x70\n)\n\ntype ifMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tData    ifData\n}\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype ifData struct {\n\tType       uint8\n\tPhysical   uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tLink_state uint8\n\tVhid       uint8\n\tDatalen    uint16\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tOqdrops    uint64\n\tNoproto    uint64\n\tHwassist   uint64\n\t_          [8]byte\n\t_          [16]byte\n}\n\ntype IfData struct {\n\tType        uint8\n\tPhysical    uint8\n\tAddrlen     uint8\n\tHdrlen      uint8\n\tLink_state  uint8\n\tSpare_char1 uint8\n\tSpare_char2 uint8\n\tDatalen     uint8\n\tMtu         uint64\n\tMetric      uint64\n\tBaudrate    uint64\n\tIpackets    uint64\n\tIerrors     uint64\n\tOpackets    uint64\n\tOerrors     uint64\n\tCollisions  uint64\n\tIbytes      uint64\n\tObytes      uint64\n\tImcasts     uint64\n\tOmcasts     uint64\n\tIqdrops     uint64\n\tNoproto     uint64\n\tHwassist    uint64\n\tEpoch       int64\n\tLastchange  Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n\tMetric  int32\n}\n\ntype IfmaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\t_       uint16\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\t_       uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tFmask   int32\n\tInits   uint64\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tExpire   uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tPksent   uint64\n\tWeight   uint64\n\tNhidx    uint64\n\tFiller   [2]uint64\n}\n\nconst (\n\tSizeofBpfVersion    = 0x4\n\tSizeofBpfStat       = 0x8\n\tSizeofBpfZbuf       = 0x18\n\tSizeofBpfProgram    = 0x10\n\tSizeofBpfInsn       = 0x8\n\tSizeofBpfHdr        = 0x20\n\tSizeofBpfZbufHeader = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfZbuf struct {\n\tBufa   *byte\n\tBufb   *byte\n\tBuflen uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  Timeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [6]byte\n}\n\ntype BpfZbufHeader struct {\n\tKernel_gen uint32\n\tKernel_len uint32\n\tUser_gen   uint32\n\t_          [5]uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR      = 0x8\n\tPOLLHUP      = 0x10\n\tPOLLIN       = 0x1\n\tPOLLINIGNEOF = 0x2000\n\tPOLLNVAL     = 0x20\n\tPOLLOUT      = 0x4\n\tPOLLPRI      = 0x2\n\tPOLLRDBAND   = 0x80\n\tPOLLRDNORM   = 0x40\n\tPOLLWRBAND   = 0x100\n\tPOLLWRNORM   = 0x4\n\tPOLLRDHUP    = 0x4000\n)\n\ntype CapRights struct {\n\tRights [2]uint64\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tSpare  int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux.go",
    "content": "// Code generated by mkmerge; DO NOT EDIT.\n\n//go:build linux\n\npackage unix\n\nconst (\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLongLong = 0x8\n\tPathMax        = 0x1000\n)\n\ntype (\n\t_C_short int16\n\t_C_int   int32\n\n\t_C_long_long int64\n)\n\ntype ItimerSpec struct {\n\tInterval Timespec\n\tValue    Timespec\n}\n\ntype Itimerval struct {\n\tInterval Timeval\n\tValue    Timeval\n}\n\nconst (\n\tADJ_OFFSET            = 0x1\n\tADJ_FREQUENCY         = 0x2\n\tADJ_MAXERROR          = 0x4\n\tADJ_ESTERROR          = 0x8\n\tADJ_STATUS            = 0x10\n\tADJ_TIMECONST         = 0x20\n\tADJ_TAI               = 0x80\n\tADJ_SETOFFSET         = 0x100\n\tADJ_MICRO             = 0x1000\n\tADJ_NANO              = 0x2000\n\tADJ_TICK              = 0x4000\n\tADJ_OFFSET_SINGLESHOT = 0x8001\n\tADJ_OFFSET_SS_READ    = 0xa001\n)\n\nconst (\n\tSTA_PLL       = 0x1\n\tSTA_PPSFREQ   = 0x2\n\tSTA_PPSTIME   = 0x4\n\tSTA_FLL       = 0x8\n\tSTA_INS       = 0x10\n\tSTA_DEL       = 0x20\n\tSTA_UNSYNC    = 0x40\n\tSTA_FREQHOLD  = 0x80\n\tSTA_PPSSIGNAL = 0x100\n\tSTA_PPSJITTER = 0x200\n\tSTA_PPSWANDER = 0x400\n\tSTA_PPSERROR  = 0x800\n\tSTA_CLOCKERR  = 0x1000\n\tSTA_NANO      = 0x2000\n\tSTA_MODE      = 0x4000\n\tSTA_CLK       = 0x8000\n)\n\nconst (\n\tTIME_OK    = 0x0\n\tTIME_INS   = 0x1\n\tTIME_DEL   = 0x2\n\tTIME_OOP   = 0x3\n\tTIME_WAIT  = 0x4\n\tTIME_ERROR = 0x5\n\tTIME_BAD   = 0x5\n)\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype StatxTimestamp struct {\n\tSec  int64\n\tNsec uint32\n\t_    int32\n}\n\ntype Statx_t struct {\n\tMask                      uint32\n\tBlksize                   uint32\n\tAttributes                uint64\n\tNlink                     uint32\n\tUid                       uint32\n\tGid                       uint32\n\tMode                      uint16\n\t_                         [1]uint16\n\tIno                       uint64\n\tSize                      uint64\n\tBlocks                    uint64\n\tAttributes_mask           uint64\n\tAtime                     StatxTimestamp\n\tBtime                     StatxTimestamp\n\tCtime                     StatxTimestamp\n\tMtime                     StatxTimestamp\n\tRdev_major                uint32\n\tRdev_minor                uint32\n\tDev_major                 uint32\n\tDev_minor                 uint32\n\tMnt_id                    uint64\n\tDio_mem_align             uint32\n\tDio_offset_align          uint32\n\tSubvol                    uint64\n\tAtomic_write_unit_min     uint32\n\tAtomic_write_unit_max     uint32\n\tAtomic_write_segments_max uint32\n\tDio_read_offset_align     uint32\n\tAtomic_write_unit_max_opt uint32\n\t_                         [1]uint32\n\t_                         [8]uint64\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\ntype FileCloneRange struct {\n\tSrc_fd      int64\n\tSrc_offset  uint64\n\tSrc_length  uint64\n\tDest_offset uint64\n}\n\ntype RawFileDedupeRange struct {\n\tSrc_offset uint64\n\tSrc_length uint64\n\tDest_count uint16\n\tReserved1  uint16\n\tReserved2  uint32\n}\n\ntype RawFileDedupeRangeInfo struct {\n\tDest_fd       int64\n\tDest_offset   uint64\n\tBytes_deduped uint64\n\tStatus        int32\n\tReserved      uint32\n}\n\nconst (\n\tSizeofRawFileDedupeRange     = 0x18\n\tSizeofRawFileDedupeRangeInfo = 0x20\n\tFILE_DEDUPE_RANGE_SAME       = 0x0\n\tFILE_DEDUPE_RANGE_DIFFERS    = 0x1\n)\n\ntype FscryptPolicy struct {\n\tVersion                   uint8\n\tContents_encryption_mode  uint8\n\tFilenames_encryption_mode uint8\n\tFlags                     uint8\n\tMaster_key_descriptor     [8]uint8\n}\n\ntype FscryptKey struct {\n\tMode uint32\n\tRaw  [64]uint8\n\tSize uint32\n}\n\ntype FscryptPolicyV1 struct {\n\tVersion                   uint8\n\tContents_encryption_mode  uint8\n\tFilenames_encryption_mode uint8\n\tFlags                     uint8\n\tMaster_key_descriptor     [8]uint8\n}\n\ntype FscryptPolicyV2 struct {\n\tVersion                   uint8\n\tContents_encryption_mode  uint8\n\tFilenames_encryption_mode uint8\n\tFlags                     uint8\n\tLog2_data_unit_size       uint8\n\t_                         [3]uint8\n\tMaster_key_identifier     [16]uint8\n}\n\ntype FscryptGetPolicyExArg struct {\n\tSize   uint64\n\tPolicy [24]byte\n}\n\ntype FscryptKeySpecifier struct {\n\tType uint32\n\t_    uint32\n\tU    [32]byte\n}\n\ntype FscryptAddKeyArg struct {\n\tKey_spec FscryptKeySpecifier\n\tRaw_size uint32\n\tKey_id   uint32\n\tFlags    uint32\n\t_        [7]uint32\n}\n\ntype FscryptRemoveKeyArg struct {\n\tKey_spec             FscryptKeySpecifier\n\tRemoval_status_flags uint32\n\t_                    [5]uint32\n}\n\ntype FscryptGetKeyStatusArg struct {\n\tKey_spec     FscryptKeySpecifier\n\t_            [6]uint32\n\tStatus       uint32\n\tStatus_flags uint32\n\tUser_count   uint32\n\t_            [13]uint32\n}\n\ntype DmIoctl struct {\n\tVersion      [3]uint32\n\tData_size    uint32\n\tData_start   uint32\n\tTarget_count uint32\n\tOpen_count   int32\n\tFlags        uint32\n\tEvent_nr     uint32\n\t_            uint32\n\tDev          uint64\n\tName         [128]byte\n\tUuid         [129]byte\n\tData         [7]byte\n}\n\ntype DmTargetSpec struct {\n\tSector_start uint64\n\tLength       uint64\n\tStatus       int32\n\tNext         uint32\n\tTarget_type  [16]byte\n}\n\ntype DmTargetDeps struct {\n\tCount uint32\n\t_     uint32\n}\n\ntype DmTargetVersions struct {\n\tNext    uint32\n\tVersion [3]uint32\n}\n\ntype DmTargetMsg struct {\n\tSector uint64\n}\n\nconst (\n\tSizeofDmIoctl      = 0x138\n\tSizeofDmTargetSpec = 0x28\n)\n\ntype KeyctlDHParams struct {\n\tPrivate int32\n\tPrime   int32\n\tBase    int32\n}\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n)\n\ntype RawSockaddrInet4 struct {\n\tFamily uint16\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]uint8\n}\n\ntype RawSockaddrInet6 struct {\n\tFamily   uint16\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tFamily uint16\n\tPath   [108]int8\n}\n\ntype RawSockaddrLinklayer struct {\n\tFamily   uint16\n\tProtocol uint16\n\tIfindex  int32\n\tHatype   uint16\n\tPkttype  uint8\n\tHalen    uint8\n\tAddr     [8]uint8\n}\n\ntype RawSockaddrNetlink struct {\n\tFamily uint16\n\tPad    uint16\n\tPid    uint32\n\tGroups uint32\n}\n\ntype RawSockaddrHCI struct {\n\tFamily  uint16\n\tDev     uint16\n\tChannel uint16\n}\n\ntype RawSockaddrL2 struct {\n\tFamily      uint16\n\tPsm         uint16\n\tBdaddr      [6]uint8\n\tCid         uint16\n\tBdaddr_type uint8\n\t_           [1]byte\n}\n\ntype RawSockaddrRFCOMM struct {\n\tFamily  uint16\n\tBdaddr  [6]uint8\n\tChannel uint8\n\t_       [1]byte\n}\n\ntype RawSockaddrCAN struct {\n\tFamily  uint16\n\tIfindex int32\n\tAddr    [16]byte\n}\n\ntype RawSockaddrALG struct {\n\tFamily uint16\n\tType   [14]uint8\n\tFeat   uint32\n\tMask   uint32\n\tName   [64]uint8\n}\n\ntype RawSockaddrVM struct {\n\tFamily    uint16\n\tReserved1 uint16\n\tPort      uint32\n\tCid       uint32\n\tFlags     uint8\n\tZero      [3]uint8\n}\n\ntype RawSockaddrXDP struct {\n\tFamily         uint16\n\tFlags          uint16\n\tIfindex        uint32\n\tQueue_id       uint32\n\tShared_umem_fd uint32\n}\n\ntype RawSockaddrPPPoX [0x1e]byte\n\ntype RawSockaddrTIPC struct {\n\tFamily   uint16\n\tAddrtype uint8\n\tScope    int8\n\tAddr     [12]byte\n}\n\ntype RawSockaddrL2TPIP struct {\n\tFamily  uint16\n\tUnused  uint16\n\tAddr    [4]byte /* in_addr */\n\tConn_id uint32\n\t_       [4]uint8\n}\n\ntype RawSockaddrL2TPIP6 struct {\n\tFamily   uint16\n\tUnused   uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n\tConn_id  uint32\n}\n\ntype RawSockaddrIUCV struct {\n\tFamily  uint16\n\tPort    uint16\n\tAddr    uint32\n\tNodeid  [8]int8\n\tUser_id [8]int8\n\tName    [8]int8\n}\n\ntype RawSockaddrNFC struct {\n\tSa_family    uint16\n\tDev_idx      uint32\n\tTarget_idx   uint32\n\tNfc_protocol uint32\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPMreqn struct {\n\tMultiaddr [4]byte /* in_addr */\n\tAddress   [4]byte /* in_addr */\n\tIfindex   int32\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype PacketMreq struct {\n\tIfindex int32\n\tType    uint16\n\tAlen    uint16\n\tAddress [8]uint8\n}\n\ntype Inet4Pktinfo struct {\n\tIfindex  int32\n\tSpec_dst [4]byte /* in_addr */\n\tAddr     [4]byte /* in_addr */\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tData [8]uint32\n}\n\ntype Ucred struct {\n\tPid int32\n\tUid uint32\n\tGid uint32\n}\n\ntype TCPInfo struct {\n\tState                uint8\n\tCa_state             uint8\n\tRetransmits          uint8\n\tProbes               uint8\n\tBackoff              uint8\n\tOptions              uint8\n\tRto                  uint32\n\tAto                  uint32\n\tSnd_mss              uint32\n\tRcv_mss              uint32\n\tUnacked              uint32\n\tSacked               uint32\n\tLost                 uint32\n\tRetrans              uint32\n\tFackets              uint32\n\tLast_data_sent       uint32\n\tLast_ack_sent        uint32\n\tLast_data_recv       uint32\n\tLast_ack_recv        uint32\n\tPmtu                 uint32\n\tRcv_ssthresh         uint32\n\tRtt                  uint32\n\tRttvar               uint32\n\tSnd_ssthresh         uint32\n\tSnd_cwnd             uint32\n\tAdvmss               uint32\n\tReordering           uint32\n\tRcv_rtt              uint32\n\tRcv_space            uint32\n\tTotal_retrans        uint32\n\tPacing_rate          uint64\n\tMax_pacing_rate      uint64\n\tBytes_acked          uint64\n\tBytes_received       uint64\n\tSegs_out             uint32\n\tSegs_in              uint32\n\tNotsent_bytes        uint32\n\tMin_rtt              uint32\n\tData_segs_in         uint32\n\tData_segs_out        uint32\n\tDelivery_rate        uint64\n\tBusy_time            uint64\n\tRwnd_limited         uint64\n\tSndbuf_limited       uint64\n\tDelivered            uint32\n\tDelivered_ce         uint32\n\tBytes_sent           uint64\n\tBytes_retrans        uint64\n\tDsack_dups           uint32\n\tReord_seen           uint32\n\tRcv_ooopack          uint32\n\tSnd_wnd              uint32\n\tRcv_wnd              uint32\n\tRehash               uint32\n\tTotal_rto            uint16\n\tTotal_rto_recoveries uint16\n\tTotal_rto_time       uint32\n}\n\ntype TCPVegasInfo struct {\n\tEnabled uint32\n\tRttcnt  uint32\n\tRtt     uint32\n\tMinrtt  uint32\n}\n\ntype TCPDCTCPInfo struct {\n\tEnabled  uint16\n\tCe_state uint16\n\tAlpha    uint32\n\tAb_ecn   uint32\n\tAb_tot   uint32\n}\n\ntype TCPBBRInfo struct {\n\tBw_lo       uint32\n\tBw_hi       uint32\n\tMin_rtt     uint32\n\tPacing_gain uint32\n\tCwnd_gain   uint32\n}\n\ntype CanFilter struct {\n\tId   uint32\n\tMask uint32\n}\n\ntype TCPRepairOpt struct {\n\tCode uint32\n\tVal  uint32\n}\n\nconst (\n\tSizeofSockaddrInet4     = 0x10\n\tSizeofSockaddrInet6     = 0x1c\n\tSizeofSockaddrAny       = 0x70\n\tSizeofSockaddrUnix      = 0x6e\n\tSizeofSockaddrLinklayer = 0x14\n\tSizeofSockaddrNetlink   = 0xc\n\tSizeofSockaddrHCI       = 0x6\n\tSizeofSockaddrL2        = 0xe\n\tSizeofSockaddrRFCOMM    = 0xa\n\tSizeofSockaddrCAN       = 0x18\n\tSizeofSockaddrALG       = 0x58\n\tSizeofSockaddrVM        = 0x10\n\tSizeofSockaddrXDP       = 0x10\n\tSizeofSockaddrPPPoX     = 0x1e\n\tSizeofSockaddrTIPC      = 0x10\n\tSizeofSockaddrL2TPIP    = 0x10\n\tSizeofSockaddrL2TPIP6   = 0x20\n\tSizeofSockaddrIUCV      = 0x20\n\tSizeofSockaddrNFC       = 0x10\n\tSizeofLinger            = 0x8\n\tSizeofIPMreq            = 0x8\n\tSizeofIPMreqn           = 0xc\n\tSizeofIPv6Mreq          = 0x14\n\tSizeofPacketMreq        = 0x10\n\tSizeofInet4Pktinfo      = 0xc\n\tSizeofInet6Pktinfo      = 0x14\n\tSizeofIPv6MTUInfo       = 0x20\n\tSizeofICMPv6Filter      = 0x20\n\tSizeofUcred             = 0xc\n\tSizeofTCPInfo           = 0xf8\n\tSizeofTCPCCInfo         = 0x14\n\tSizeofCanFilter         = 0x8\n\tSizeofTCPRepairOpt      = 0x8\n)\n\nconst (\n\tNDA_UNSPEC            = 0x0\n\tNDA_DST               = 0x1\n\tNDA_LLADDR            = 0x2\n\tNDA_CACHEINFO         = 0x3\n\tNDA_PROBES            = 0x4\n\tNDA_VLAN              = 0x5\n\tNDA_PORT              = 0x6\n\tNDA_VNI               = 0x7\n\tNDA_IFINDEX           = 0x8\n\tNDA_MASTER            = 0x9\n\tNDA_LINK_NETNSID      = 0xa\n\tNDA_SRC_VNI           = 0xb\n\tNTF_USE               = 0x1\n\tNTF_SELF              = 0x2\n\tNTF_MASTER            = 0x4\n\tNTF_PROXY             = 0x8\n\tNTF_EXT_LEARNED       = 0x10\n\tNTF_OFFLOADED         = 0x20\n\tNTF_ROUTER            = 0x80\n\tNUD_INCOMPLETE        = 0x1\n\tNUD_REACHABLE         = 0x2\n\tNUD_STALE             = 0x4\n\tNUD_DELAY             = 0x8\n\tNUD_PROBE             = 0x10\n\tNUD_FAILED            = 0x20\n\tNUD_NOARP             = 0x40\n\tNUD_PERMANENT         = 0x80\n\tNUD_NONE              = 0x0\n\tIFA_UNSPEC            = 0x0\n\tIFA_ADDRESS           = 0x1\n\tIFA_LOCAL             = 0x2\n\tIFA_LABEL             = 0x3\n\tIFA_BROADCAST         = 0x4\n\tIFA_ANYCAST           = 0x5\n\tIFA_CACHEINFO         = 0x6\n\tIFA_MULTICAST         = 0x7\n\tIFA_FLAGS             = 0x8\n\tIFA_RT_PRIORITY       = 0x9\n\tIFA_TARGET_NETNSID    = 0xa\n\tIFAL_LABEL            = 0x2\n\tIFAL_ADDRESS          = 0x1\n\tRT_SCOPE_UNIVERSE     = 0x0\n\tRT_SCOPE_SITE         = 0xc8\n\tRT_SCOPE_LINK         = 0xfd\n\tRT_SCOPE_HOST         = 0xfe\n\tRT_SCOPE_NOWHERE      = 0xff\n\tRT_TABLE_UNSPEC       = 0x0\n\tRT_TABLE_COMPAT       = 0xfc\n\tRT_TABLE_DEFAULT      = 0xfd\n\tRT_TABLE_MAIN         = 0xfe\n\tRT_TABLE_LOCAL        = 0xff\n\tRT_TABLE_MAX          = 0xffffffff\n\tRTA_UNSPEC            = 0x0\n\tRTA_DST               = 0x1\n\tRTA_SRC               = 0x2\n\tRTA_IIF               = 0x3\n\tRTA_OIF               = 0x4\n\tRTA_GATEWAY           = 0x5\n\tRTA_PRIORITY          = 0x6\n\tRTA_PREFSRC           = 0x7\n\tRTA_METRICS           = 0x8\n\tRTA_MULTIPATH         = 0x9\n\tRTA_FLOW              = 0xb\n\tRTA_CACHEINFO         = 0xc\n\tRTA_TABLE             = 0xf\n\tRTA_MARK              = 0x10\n\tRTA_MFC_STATS         = 0x11\n\tRTA_VIA               = 0x12\n\tRTA_NEWDST            = 0x13\n\tRTA_PREF              = 0x14\n\tRTA_ENCAP_TYPE        = 0x15\n\tRTA_ENCAP             = 0x16\n\tRTA_EXPIRES           = 0x17\n\tRTA_PAD               = 0x18\n\tRTA_UID               = 0x19\n\tRTA_TTL_PROPAGATE     = 0x1a\n\tRTA_IP_PROTO          = 0x1b\n\tRTA_SPORT             = 0x1c\n\tRTA_DPORT             = 0x1d\n\tRTN_UNSPEC            = 0x0\n\tRTN_UNICAST           = 0x1\n\tRTN_LOCAL             = 0x2\n\tRTN_BROADCAST         = 0x3\n\tRTN_ANYCAST           = 0x4\n\tRTN_MULTICAST         = 0x5\n\tRTN_BLACKHOLE         = 0x6\n\tRTN_UNREACHABLE       = 0x7\n\tRTN_PROHIBIT          = 0x8\n\tRTN_THROW             = 0x9\n\tRTN_NAT               = 0xa\n\tRTN_XRESOLVE          = 0xb\n\tPREFIX_UNSPEC         = 0x0\n\tPREFIX_ADDRESS        = 0x1\n\tPREFIX_CACHEINFO      = 0x2\n\tSizeofNlMsghdr        = 0x10\n\tSizeofNlMsgerr        = 0x14\n\tSizeofRtGenmsg        = 0x1\n\tSizeofNlAttr          = 0x4\n\tSizeofRtAttr          = 0x4\n\tSizeofIfInfomsg       = 0x10\n\tSizeofPrefixmsg       = 0xc\n\tSizeofPrefixCacheinfo = 0x8\n\tSizeofIfAddrmsg       = 0x8\n\tSizeofIfAddrlblmsg    = 0xc\n\tSizeofIfaCacheinfo    = 0x10\n\tSizeofRtMsg           = 0xc\n\tSizeofRtNexthop       = 0x8\n\tSizeofNdUseroptmsg    = 0x10\n\tSizeofNdMsg           = 0xc\n)\n\ntype NlMsghdr struct {\n\tLen   uint32\n\tType  uint16\n\tFlags uint16\n\tSeq   uint32\n\tPid   uint32\n}\n\ntype NlMsgerr struct {\n\tError int32\n\tMsg   NlMsghdr\n}\n\ntype RtGenmsg struct {\n\tFamily uint8\n}\n\ntype NlAttr struct {\n\tLen  uint16\n\tType uint16\n}\n\ntype RtAttr struct {\n\tLen  uint16\n\tType uint16\n}\n\ntype IfInfomsg struct {\n\tFamily uint8\n\t_      uint8\n\tType   uint16\n\tIndex  int32\n\tFlags  uint32\n\tChange uint32\n}\n\ntype Prefixmsg struct {\n\tFamily  uint8\n\tPad1    uint8\n\tPad2    uint16\n\tIfindex int32\n\tType    uint8\n\tLen     uint8\n\tFlags   uint8\n\tPad3    uint8\n}\n\ntype PrefixCacheinfo struct {\n\tPreferred_time uint32\n\tValid_time     uint32\n}\n\ntype IfAddrmsg struct {\n\tFamily    uint8\n\tPrefixlen uint8\n\tFlags     uint8\n\tScope     uint8\n\tIndex     uint32\n}\n\ntype IfAddrlblmsg struct {\n\tFamily    uint8\n\t_         uint8\n\tPrefixlen uint8\n\tFlags     uint8\n\tIndex     uint32\n\tSeq       uint32\n}\n\ntype IfaCacheinfo struct {\n\tPrefered uint32\n\tValid    uint32\n\tCstamp   uint32\n\tTstamp   uint32\n}\n\ntype RtMsg struct {\n\tFamily   uint8\n\tDst_len  uint8\n\tSrc_len  uint8\n\tTos      uint8\n\tTable    uint8\n\tProtocol uint8\n\tScope    uint8\n\tType     uint8\n\tFlags    uint32\n}\n\ntype RtNexthop struct {\n\tLen     uint16\n\tFlags   uint8\n\tHops    uint8\n\tIfindex int32\n}\n\ntype NdUseroptmsg struct {\n\tFamily    uint8\n\tPad1      uint8\n\tOpts_len  uint16\n\tIfindex   int32\n\tIcmp_type uint8\n\tIcmp_code uint8\n\tPad2      uint16\n\tPad3      uint32\n}\n\ntype NdMsg struct {\n\tFamily  uint8\n\tPad1    uint8\n\tPad2    uint16\n\tIfindex int32\n\tState   uint16\n\tFlags   uint8\n\tType    uint8\n}\n\nconst (\n\tICMP_FILTER = 0x1\n\n\tICMPV6_FILTER             = 0x1\n\tICMPV6_FILTER_BLOCK       = 0x1\n\tICMPV6_FILTER_BLOCKOTHERS = 0x3\n\tICMPV6_FILTER_PASS        = 0x2\n\tICMPV6_FILTER_PASSONLY    = 0x4\n)\n\nconst (\n\tSizeofSockFilter = 0x8\n)\n\ntype SockFilter struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype SockFprog struct {\n\tLen    uint16\n\tFilter *SockFilter\n}\n\ntype InotifyEvent struct {\n\tWd     int32\n\tMask   uint32\n\tCookie uint32\n\tLen    uint32\n}\n\nconst SizeofInotifyEvent = 0x10\n\nconst SI_LOAD_SHIFT = 0x10\n\ntype Utsname struct {\n\tSysname    [65]byte\n\tNodename   [65]byte\n\tRelease    [65]byte\n\tVersion    [65]byte\n\tMachine    [65]byte\n\tDomainname [65]byte\n}\n\nconst (\n\tAT_EMPTY_PATH   = 0x1000\n\tAT_FDCWD        = -0x64\n\tAT_NO_AUTOMOUNT = 0x800\n\tAT_REMOVEDIR    = 0x200\n\n\tAT_STATX_SYNC_AS_STAT = 0x0\n\tAT_STATX_FORCE_SYNC   = 0x2000\n\tAT_STATX_DONT_SYNC    = 0x4000\n\n\tAT_RECURSIVE = 0x8000\n\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_SYMLINK_NOFOLLOW = 0x100\n\n\tAT_EACCESS = 0x200\n\n\tOPEN_TREE_CLONE = 0x1\n\n\tMOVE_MOUNT_F_SYMLINKS   = 0x1\n\tMOVE_MOUNT_F_AUTOMOUNTS = 0x2\n\tMOVE_MOUNT_F_EMPTY_PATH = 0x4\n\tMOVE_MOUNT_T_SYMLINKS   = 0x10\n\tMOVE_MOUNT_T_AUTOMOUNTS = 0x20\n\tMOVE_MOUNT_T_EMPTY_PATH = 0x40\n\tMOVE_MOUNT_SET_GROUP    = 0x100\n\n\tFSOPEN_CLOEXEC = 0x1\n\n\tFSPICK_CLOEXEC          = 0x1\n\tFSPICK_SYMLINK_NOFOLLOW = 0x2\n\tFSPICK_NO_AUTOMOUNT     = 0x4\n\tFSPICK_EMPTY_PATH       = 0x8\n\n\tFSMOUNT_CLOEXEC = 0x1\n\n\tFSCONFIG_SET_FLAG        = 0x0\n\tFSCONFIG_SET_STRING      = 0x1\n\tFSCONFIG_SET_BINARY      = 0x2\n\tFSCONFIG_SET_PATH        = 0x3\n\tFSCONFIG_SET_PATH_EMPTY  = 0x4\n\tFSCONFIG_SET_FD          = 0x5\n\tFSCONFIG_CMD_CREATE      = 0x6\n\tFSCONFIG_CMD_RECONFIGURE = 0x7\n)\n\ntype OpenHow struct {\n\tFlags   uint64\n\tMode    uint64\n\tResolve uint64\n}\n\nconst SizeofOpenHow = 0x18\n\nconst (\n\tRESOLVE_BENEATH       = 0x8\n\tRESOLVE_IN_ROOT       = 0x10\n\tRESOLVE_NO_MAGICLINKS = 0x2\n\tRESOLVE_NO_SYMLINKS   = 0x4\n\tRESOLVE_NO_XDEV       = 0x1\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLIN   = 0x1\n\tPOLLPRI  = 0x2\n\tPOLLOUT  = 0x4\n\tPOLLERR  = 0x8\n\tPOLLHUP  = 0x10\n\tPOLLNVAL = 0x20\n)\n\ntype sigset_argpack struct {\n\tss    *Sigset_t\n\tssLen uintptr\n}\n\ntype SignalfdSiginfo struct {\n\tSigno     uint32\n\tErrno     int32\n\tCode      int32\n\tPid       uint32\n\tUid       uint32\n\tFd        int32\n\tTid       uint32\n\tBand      uint32\n\tOverrun   uint32\n\tTrapno    uint32\n\tStatus    int32\n\tInt       int32\n\tPtr       uint64\n\tUtime     uint64\n\tStime     uint64\n\tAddr      uint64\n\tAddr_lsb  uint16\n\t_         uint16\n\tSyscall   int32\n\tCall_addr uint64\n\tArch      uint32\n\t_         [28]uint8\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tTASKSTATS_CMD_UNSPEC                  = 0x0\n\tTASKSTATS_CMD_GET                     = 0x1\n\tTASKSTATS_CMD_NEW                     = 0x2\n\tTASKSTATS_TYPE_UNSPEC                 = 0x0\n\tTASKSTATS_TYPE_PID                    = 0x1\n\tTASKSTATS_TYPE_TGID                   = 0x2\n\tTASKSTATS_TYPE_STATS                  = 0x3\n\tTASKSTATS_TYPE_AGGR_PID               = 0x4\n\tTASKSTATS_TYPE_AGGR_TGID              = 0x5\n\tTASKSTATS_TYPE_NULL                   = 0x6\n\tTASKSTATS_CMD_ATTR_UNSPEC             = 0x0\n\tTASKSTATS_CMD_ATTR_PID                = 0x1\n\tTASKSTATS_CMD_ATTR_TGID               = 0x2\n\tTASKSTATS_CMD_ATTR_REGISTER_CPUMASK   = 0x3\n\tTASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4\n)\n\ntype CGroupStats struct {\n\tSleeping        uint64\n\tRunning         uint64\n\tStopped         uint64\n\tUninterruptible uint64\n\tIo_wait         uint64\n}\n\nconst (\n\tCGROUPSTATS_CMD_UNSPEC        = 0x3\n\tCGROUPSTATS_CMD_GET           = 0x4\n\tCGROUPSTATS_CMD_NEW           = 0x5\n\tCGROUPSTATS_TYPE_UNSPEC       = 0x0\n\tCGROUPSTATS_TYPE_CGROUP_STATS = 0x1\n\tCGROUPSTATS_CMD_ATTR_UNSPEC   = 0x0\n\tCGROUPSTATS_CMD_ATTR_FD       = 0x1\n)\n\ntype Genlmsghdr struct {\n\tCmd      uint8\n\tVersion  uint8\n\tReserved uint16\n}\n\nconst (\n\tCTRL_CMD_UNSPEC            = 0x0\n\tCTRL_CMD_NEWFAMILY         = 0x1\n\tCTRL_CMD_DELFAMILY         = 0x2\n\tCTRL_CMD_GETFAMILY         = 0x3\n\tCTRL_CMD_NEWOPS            = 0x4\n\tCTRL_CMD_DELOPS            = 0x5\n\tCTRL_CMD_GETOPS            = 0x6\n\tCTRL_CMD_NEWMCAST_GRP      = 0x7\n\tCTRL_CMD_DELMCAST_GRP      = 0x8\n\tCTRL_CMD_GETMCAST_GRP      = 0x9\n\tCTRL_CMD_GETPOLICY         = 0xa\n\tCTRL_ATTR_UNSPEC           = 0x0\n\tCTRL_ATTR_FAMILY_ID        = 0x1\n\tCTRL_ATTR_FAMILY_NAME      = 0x2\n\tCTRL_ATTR_VERSION          = 0x3\n\tCTRL_ATTR_HDRSIZE          = 0x4\n\tCTRL_ATTR_MAXATTR          = 0x5\n\tCTRL_ATTR_OPS              = 0x6\n\tCTRL_ATTR_MCAST_GROUPS     = 0x7\n\tCTRL_ATTR_POLICY           = 0x8\n\tCTRL_ATTR_OP_POLICY        = 0x9\n\tCTRL_ATTR_OP               = 0xa\n\tCTRL_ATTR_OP_UNSPEC        = 0x0\n\tCTRL_ATTR_OP_ID            = 0x1\n\tCTRL_ATTR_OP_FLAGS         = 0x2\n\tCTRL_ATTR_MCAST_GRP_UNSPEC = 0x0\n\tCTRL_ATTR_MCAST_GRP_NAME   = 0x1\n\tCTRL_ATTR_MCAST_GRP_ID     = 0x2\n\tCTRL_ATTR_POLICY_UNSPEC    = 0x0\n\tCTRL_ATTR_POLICY_DO        = 0x1\n\tCTRL_ATTR_POLICY_DUMP      = 0x2\n\tCTRL_ATTR_POLICY_DUMP_MAX  = 0x2\n)\n\nconst (\n\t_CPU_SETSIZE = 0x400\n)\n\nconst (\n\tBDADDR_BREDR     = 0x0\n\tBDADDR_LE_PUBLIC = 0x1\n\tBDADDR_LE_RANDOM = 0x2\n)\n\ntype PerfEventAttr struct {\n\tType               uint32\n\tSize               uint32\n\tConfig             uint64\n\tSample             uint64\n\tSample_type        uint64\n\tRead_format        uint64\n\tBits               uint64\n\tWakeup             uint32\n\tBp_type            uint32\n\tExt1               uint64\n\tExt2               uint64\n\tBranch_sample_type uint64\n\tSample_regs_user   uint64\n\tSample_stack_user  uint32\n\tClockid            int32\n\tSample_regs_intr   uint64\n\tAux_watermark      uint32\n\tSample_max_stack   uint16\n\t_                  uint16\n\tAux_sample_size    uint32\n\t_                  uint32\n\tSig_data           uint64\n}\n\ntype PerfEventMmapPage struct {\n\tVersion        uint32\n\tCompat_version uint32\n\tLock           uint32\n\tIndex          uint32\n\tOffset         int64\n\tTime_enabled   uint64\n\tTime_running   uint64\n\tCapabilities   uint64\n\tPmc_width      uint16\n\tTime_shift     uint16\n\tTime_mult      uint32\n\tTime_offset    uint64\n\tTime_zero      uint64\n\tSize           uint32\n\t_              uint32\n\tTime_cycles    uint64\n\tTime_mask      uint64\n\t_              [928]uint8\n\tData_head      uint64\n\tData_tail      uint64\n\tData_offset    uint64\n\tData_size      uint64\n\tAux_head       uint64\n\tAux_tail       uint64\n\tAux_offset     uint64\n\tAux_size       uint64\n}\n\nconst (\n\tPerfBitDisabled               uint64 = CBitFieldMaskBit0\n\tPerfBitInherit                       = CBitFieldMaskBit1\n\tPerfBitPinned                        = CBitFieldMaskBit2\n\tPerfBitExclusive                     = CBitFieldMaskBit3\n\tPerfBitExcludeUser                   = CBitFieldMaskBit4\n\tPerfBitExcludeKernel                 = CBitFieldMaskBit5\n\tPerfBitExcludeHv                     = CBitFieldMaskBit6\n\tPerfBitExcludeIdle                   = CBitFieldMaskBit7\n\tPerfBitMmap                          = CBitFieldMaskBit8\n\tPerfBitComm                          = CBitFieldMaskBit9\n\tPerfBitFreq                          = CBitFieldMaskBit10\n\tPerfBitInheritStat                   = CBitFieldMaskBit11\n\tPerfBitEnableOnExec                  = CBitFieldMaskBit12\n\tPerfBitTask                          = CBitFieldMaskBit13\n\tPerfBitWatermark                     = CBitFieldMaskBit14\n\tPerfBitPreciseIPBit1                 = CBitFieldMaskBit15\n\tPerfBitPreciseIPBit2                 = CBitFieldMaskBit16\n\tPerfBitMmapData                      = CBitFieldMaskBit17\n\tPerfBitSampleIDAll                   = CBitFieldMaskBit18\n\tPerfBitExcludeHost                   = CBitFieldMaskBit19\n\tPerfBitExcludeGuest                  = CBitFieldMaskBit20\n\tPerfBitExcludeCallchainKernel        = CBitFieldMaskBit21\n\tPerfBitExcludeCallchainUser          = CBitFieldMaskBit22\n\tPerfBitMmap2                         = CBitFieldMaskBit23\n\tPerfBitCommExec                      = CBitFieldMaskBit24\n\tPerfBitUseClockID                    = CBitFieldMaskBit25\n\tPerfBitContextSwitch                 = CBitFieldMaskBit26\n\tPerfBitWriteBackward                 = CBitFieldMaskBit27\n)\n\nconst (\n\tPERF_TYPE_HARDWARE                    = 0x0\n\tPERF_TYPE_SOFTWARE                    = 0x1\n\tPERF_TYPE_TRACEPOINT                  = 0x2\n\tPERF_TYPE_HW_CACHE                    = 0x3\n\tPERF_TYPE_RAW                         = 0x4\n\tPERF_TYPE_BREAKPOINT                  = 0x5\n\tPERF_TYPE_MAX                         = 0x6\n\tPERF_COUNT_HW_CPU_CYCLES              = 0x0\n\tPERF_COUNT_HW_INSTRUCTIONS            = 0x1\n\tPERF_COUNT_HW_CACHE_REFERENCES        = 0x2\n\tPERF_COUNT_HW_CACHE_MISSES            = 0x3\n\tPERF_COUNT_HW_BRANCH_INSTRUCTIONS     = 0x4\n\tPERF_COUNT_HW_BRANCH_MISSES           = 0x5\n\tPERF_COUNT_HW_BUS_CYCLES              = 0x6\n\tPERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7\n\tPERF_COUNT_HW_STALLED_CYCLES_BACKEND  = 0x8\n\tPERF_COUNT_HW_REF_CPU_CYCLES          = 0x9\n\tPERF_COUNT_HW_MAX                     = 0xa\n\tPERF_COUNT_HW_CACHE_L1D               = 0x0\n\tPERF_COUNT_HW_CACHE_L1I               = 0x1\n\tPERF_COUNT_HW_CACHE_LL                = 0x2\n\tPERF_COUNT_HW_CACHE_DTLB              = 0x3\n\tPERF_COUNT_HW_CACHE_ITLB              = 0x4\n\tPERF_COUNT_HW_CACHE_BPU               = 0x5\n\tPERF_COUNT_HW_CACHE_NODE              = 0x6\n\tPERF_COUNT_HW_CACHE_MAX               = 0x7\n\tPERF_COUNT_HW_CACHE_OP_READ           = 0x0\n\tPERF_COUNT_HW_CACHE_OP_WRITE          = 0x1\n\tPERF_COUNT_HW_CACHE_OP_PREFETCH       = 0x2\n\tPERF_COUNT_HW_CACHE_OP_MAX            = 0x3\n\tPERF_COUNT_HW_CACHE_RESULT_ACCESS     = 0x0\n\tPERF_COUNT_HW_CACHE_RESULT_MISS       = 0x1\n\tPERF_COUNT_HW_CACHE_RESULT_MAX        = 0x2\n\tPERF_COUNT_SW_CPU_CLOCK               = 0x0\n\tPERF_COUNT_SW_TASK_CLOCK              = 0x1\n\tPERF_COUNT_SW_PAGE_FAULTS             = 0x2\n\tPERF_COUNT_SW_CONTEXT_SWITCHES        = 0x3\n\tPERF_COUNT_SW_CPU_MIGRATIONS          = 0x4\n\tPERF_COUNT_SW_PAGE_FAULTS_MIN         = 0x5\n\tPERF_COUNT_SW_PAGE_FAULTS_MAJ         = 0x6\n\tPERF_COUNT_SW_ALIGNMENT_FAULTS        = 0x7\n\tPERF_COUNT_SW_EMULATION_FAULTS        = 0x8\n\tPERF_COUNT_SW_DUMMY                   = 0x9\n\tPERF_COUNT_SW_BPF_OUTPUT              = 0xa\n\tPERF_COUNT_SW_MAX                     = 0xc\n\tPERF_SAMPLE_IP                        = 0x1\n\tPERF_SAMPLE_TID                       = 0x2\n\tPERF_SAMPLE_TIME                      = 0x4\n\tPERF_SAMPLE_ADDR                      = 0x8\n\tPERF_SAMPLE_READ                      = 0x10\n\tPERF_SAMPLE_CALLCHAIN                 = 0x20\n\tPERF_SAMPLE_ID                        = 0x40\n\tPERF_SAMPLE_CPU                       = 0x80\n\tPERF_SAMPLE_PERIOD                    = 0x100\n\tPERF_SAMPLE_STREAM_ID                 = 0x200\n\tPERF_SAMPLE_RAW                       = 0x400\n\tPERF_SAMPLE_BRANCH_STACK              = 0x800\n\tPERF_SAMPLE_REGS_USER                 = 0x1000\n\tPERF_SAMPLE_STACK_USER                = 0x2000\n\tPERF_SAMPLE_WEIGHT                    = 0x4000\n\tPERF_SAMPLE_DATA_SRC                  = 0x8000\n\tPERF_SAMPLE_IDENTIFIER                = 0x10000\n\tPERF_SAMPLE_TRANSACTION               = 0x20000\n\tPERF_SAMPLE_REGS_INTR                 = 0x40000\n\tPERF_SAMPLE_PHYS_ADDR                 = 0x80000\n\tPERF_SAMPLE_AUX                       = 0x100000\n\tPERF_SAMPLE_CGROUP                    = 0x200000\n\tPERF_SAMPLE_DATA_PAGE_SIZE            = 0x400000\n\tPERF_SAMPLE_CODE_PAGE_SIZE            = 0x800000\n\tPERF_SAMPLE_WEIGHT_STRUCT             = 0x1000000\n\tPERF_SAMPLE_MAX                       = 0x2000000\n\tPERF_SAMPLE_BRANCH_USER_SHIFT         = 0x0\n\tPERF_SAMPLE_BRANCH_KERNEL_SHIFT       = 0x1\n\tPERF_SAMPLE_BRANCH_HV_SHIFT           = 0x2\n\tPERF_SAMPLE_BRANCH_ANY_SHIFT          = 0x3\n\tPERF_SAMPLE_BRANCH_ANY_CALL_SHIFT     = 0x4\n\tPERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT   = 0x5\n\tPERF_SAMPLE_BRANCH_IND_CALL_SHIFT     = 0x6\n\tPERF_SAMPLE_BRANCH_ABORT_TX_SHIFT     = 0x7\n\tPERF_SAMPLE_BRANCH_IN_TX_SHIFT        = 0x8\n\tPERF_SAMPLE_BRANCH_NO_TX_SHIFT        = 0x9\n\tPERF_SAMPLE_BRANCH_COND_SHIFT         = 0xa\n\tPERF_SAMPLE_BRANCH_CALL_STACK_SHIFT   = 0xb\n\tPERF_SAMPLE_BRANCH_IND_JUMP_SHIFT     = 0xc\n\tPERF_SAMPLE_BRANCH_CALL_SHIFT         = 0xd\n\tPERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT     = 0xe\n\tPERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT    = 0xf\n\tPERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT    = 0x10\n\tPERF_SAMPLE_BRANCH_HW_INDEX_SHIFT     = 0x11\n\tPERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT    = 0x12\n\tPERF_SAMPLE_BRANCH_COUNTERS           = 0x80000\n\tPERF_SAMPLE_BRANCH_MAX_SHIFT          = 0x14\n\tPERF_SAMPLE_BRANCH_USER               = 0x1\n\tPERF_SAMPLE_BRANCH_KERNEL             = 0x2\n\tPERF_SAMPLE_BRANCH_HV                 = 0x4\n\tPERF_SAMPLE_BRANCH_ANY                = 0x8\n\tPERF_SAMPLE_BRANCH_ANY_CALL           = 0x10\n\tPERF_SAMPLE_BRANCH_ANY_RETURN         = 0x20\n\tPERF_SAMPLE_BRANCH_IND_CALL           = 0x40\n\tPERF_SAMPLE_BRANCH_ABORT_TX           = 0x80\n\tPERF_SAMPLE_BRANCH_IN_TX              = 0x100\n\tPERF_SAMPLE_BRANCH_NO_TX              = 0x200\n\tPERF_SAMPLE_BRANCH_COND               = 0x400\n\tPERF_SAMPLE_BRANCH_CALL_STACK         = 0x800\n\tPERF_SAMPLE_BRANCH_IND_JUMP           = 0x1000\n\tPERF_SAMPLE_BRANCH_CALL               = 0x2000\n\tPERF_SAMPLE_BRANCH_NO_FLAGS           = 0x4000\n\tPERF_SAMPLE_BRANCH_NO_CYCLES          = 0x8000\n\tPERF_SAMPLE_BRANCH_TYPE_SAVE          = 0x10000\n\tPERF_SAMPLE_BRANCH_HW_INDEX           = 0x20000\n\tPERF_SAMPLE_BRANCH_PRIV_SAVE          = 0x40000\n\tPERF_SAMPLE_BRANCH_MAX                = 0x100000\n\tPERF_BR_UNKNOWN                       = 0x0\n\tPERF_BR_COND                          = 0x1\n\tPERF_BR_UNCOND                        = 0x2\n\tPERF_BR_IND                           = 0x3\n\tPERF_BR_CALL                          = 0x4\n\tPERF_BR_IND_CALL                      = 0x5\n\tPERF_BR_RET                           = 0x6\n\tPERF_BR_SYSCALL                       = 0x7\n\tPERF_BR_SYSRET                        = 0x8\n\tPERF_BR_COND_CALL                     = 0x9\n\tPERF_BR_COND_RET                      = 0xa\n\tPERF_BR_ERET                          = 0xb\n\tPERF_BR_IRQ                           = 0xc\n\tPERF_BR_SERROR                        = 0xd\n\tPERF_BR_NO_TX                         = 0xe\n\tPERF_BR_EXTEND_ABI                    = 0xf\n\tPERF_BR_MAX                           = 0x10\n\tPERF_SAMPLE_REGS_ABI_NONE             = 0x0\n\tPERF_SAMPLE_REGS_ABI_32               = 0x1\n\tPERF_SAMPLE_REGS_ABI_64               = 0x2\n\tPERF_TXN_ELISION                      = 0x1\n\tPERF_TXN_TRANSACTION                  = 0x2\n\tPERF_TXN_SYNC                         = 0x4\n\tPERF_TXN_ASYNC                        = 0x8\n\tPERF_TXN_RETRY                        = 0x10\n\tPERF_TXN_CONFLICT                     = 0x20\n\tPERF_TXN_CAPACITY_WRITE               = 0x40\n\tPERF_TXN_CAPACITY_READ                = 0x80\n\tPERF_TXN_MAX                          = 0x100\n\tPERF_TXN_ABORT_MASK                   = -0x100000000\n\tPERF_TXN_ABORT_SHIFT                  = 0x20\n\tPERF_FORMAT_TOTAL_TIME_ENABLED        = 0x1\n\tPERF_FORMAT_TOTAL_TIME_RUNNING        = 0x2\n\tPERF_FORMAT_ID                        = 0x4\n\tPERF_FORMAT_GROUP                     = 0x8\n\tPERF_FORMAT_LOST                      = 0x10\n\tPERF_FORMAT_MAX                       = 0x20\n\tPERF_IOC_FLAG_GROUP                   = 0x1\n\tPERF_RECORD_MMAP                      = 0x1\n\tPERF_RECORD_LOST                      = 0x2\n\tPERF_RECORD_COMM                      = 0x3\n\tPERF_RECORD_EXIT                      = 0x4\n\tPERF_RECORD_THROTTLE                  = 0x5\n\tPERF_RECORD_UNTHROTTLE                = 0x6\n\tPERF_RECORD_FORK                      = 0x7\n\tPERF_RECORD_READ                      = 0x8\n\tPERF_RECORD_SAMPLE                    = 0x9\n\tPERF_RECORD_MMAP2                     = 0xa\n\tPERF_RECORD_AUX                       = 0xb\n\tPERF_RECORD_ITRACE_START              = 0xc\n\tPERF_RECORD_LOST_SAMPLES              = 0xd\n\tPERF_RECORD_SWITCH                    = 0xe\n\tPERF_RECORD_SWITCH_CPU_WIDE           = 0xf\n\tPERF_RECORD_NAMESPACES                = 0x10\n\tPERF_RECORD_KSYMBOL                   = 0x11\n\tPERF_RECORD_BPF_EVENT                 = 0x12\n\tPERF_RECORD_CGROUP                    = 0x13\n\tPERF_RECORD_TEXT_POKE                 = 0x14\n\tPERF_RECORD_AUX_OUTPUT_HW_ID          = 0x15\n\tPERF_RECORD_MAX                       = 0x16\n\tPERF_RECORD_KSYMBOL_TYPE_UNKNOWN      = 0x0\n\tPERF_RECORD_KSYMBOL_TYPE_BPF          = 0x1\n\tPERF_RECORD_KSYMBOL_TYPE_OOL          = 0x2\n\tPERF_RECORD_KSYMBOL_TYPE_MAX          = 0x3\n\tPERF_BPF_EVENT_UNKNOWN                = 0x0\n\tPERF_BPF_EVENT_PROG_LOAD              = 0x1\n\tPERF_BPF_EVENT_PROG_UNLOAD            = 0x2\n\tPERF_BPF_EVENT_MAX                    = 0x3\n\tPERF_CONTEXT_HV                       = -0x20\n\tPERF_CONTEXT_KERNEL                   = -0x80\n\tPERF_CONTEXT_USER                     = -0x200\n\tPERF_CONTEXT_GUEST                    = -0x800\n\tPERF_CONTEXT_GUEST_KERNEL             = -0x880\n\tPERF_CONTEXT_GUEST_USER               = -0xa00\n\tPERF_CONTEXT_MAX                      = -0xfff\n)\n\ntype TCPMD5Sig struct {\n\tAddr      SockaddrStorage\n\tFlags     uint8\n\tPrefixlen uint8\n\tKeylen    uint16\n\tIfindex   int32\n\tKey       [80]uint8\n}\n\ntype HDDriveCmdHdr struct {\n\tCommand uint8\n\tNumber  uint8\n\tFeature uint8\n\tCount   uint8\n}\n\ntype HDDriveID struct {\n\tConfig         uint16\n\tCyls           uint16\n\tReserved2      uint16\n\tHeads          uint16\n\tTrack_bytes    uint16\n\tSector_bytes   uint16\n\tSectors        uint16\n\tVendor0        uint16\n\tVendor1        uint16\n\tVendor2        uint16\n\tSerial_no      [20]uint8\n\tBuf_type       uint16\n\tBuf_size       uint16\n\tEcc_bytes      uint16\n\tFw_rev         [8]uint8\n\tModel          [40]uint8\n\tMax_multsect   uint8\n\tVendor3        uint8\n\tDword_io       uint16\n\tVendor4        uint8\n\tCapability     uint8\n\tReserved50     uint16\n\tVendor5        uint8\n\tTPIO           uint8\n\tVendor6        uint8\n\tTDMA           uint8\n\tField_valid    uint16\n\tCur_cyls       uint16\n\tCur_heads      uint16\n\tCur_sectors    uint16\n\tCur_capacity0  uint16\n\tCur_capacity1  uint16\n\tMultsect       uint8\n\tMultsect_valid uint8\n\tLba_capacity   uint32\n\tDma_1word      uint16\n\tDma_mword      uint16\n\tEide_pio_modes uint16\n\tEide_dma_min   uint16\n\tEide_dma_time  uint16\n\tEide_pio       uint16\n\tEide_pio_iordy uint16\n\tWords69_70     [2]uint16\n\tWords71_74     [4]uint16\n\tQueue_depth    uint16\n\tWords76_79     [4]uint16\n\tMajor_rev_num  uint16\n\tMinor_rev_num  uint16\n\tCommand_set_1  uint16\n\tCommand_set_2  uint16\n\tCfsse          uint16\n\tCfs_enable_1   uint16\n\tCfs_enable_2   uint16\n\tCsf_default    uint16\n\tDma_ultra      uint16\n\tTrseuc         uint16\n\tTrsEuc         uint16\n\tCurAPMvalues   uint16\n\tMprc           uint16\n\tHw_config      uint16\n\tAcoustic       uint16\n\tMsrqs          uint16\n\tSxfert         uint16\n\tSal            uint16\n\tSpg            uint32\n\tLba_capacity_2 uint64\n\tWords104_125   [22]uint16\n\tLast_lun       uint16\n\tWord127        uint16\n\tDlf            uint16\n\tCsfo           uint16\n\tWords130_155   [26]uint16\n\tWord156        uint16\n\tWords157_159   [3]uint16\n\tCfa_power      uint16\n\tWords161_175   [15]uint16\n\tWords176_205   [30]uint16\n\tWords206_254   [49]uint16\n\tIntegrity_word uint16\n}\n\nconst (\n\tST_MANDLOCK    = 0x40\n\tST_NOATIME     = 0x400\n\tST_NODEV       = 0x4\n\tST_NODIRATIME  = 0x800\n\tST_NOEXEC      = 0x8\n\tST_NOSUID      = 0x2\n\tST_RDONLY      = 0x1\n\tST_RELATIME    = 0x1000\n\tST_SYNCHRONOUS = 0x10\n)\n\ntype Tpacket2Hdr struct {\n\tStatus    uint32\n\tLen       uint32\n\tSnaplen   uint32\n\tMac       uint16\n\tNet       uint16\n\tSec       uint32\n\tNsec      uint32\n\tVlan_tci  uint16\n\tVlan_tpid uint16\n\t_         [4]uint8\n}\n\ntype Tpacket3Hdr struct {\n\tNext_offset uint32\n\tSec         uint32\n\tNsec        uint32\n\tSnaplen     uint32\n\tLen         uint32\n\tStatus      uint32\n\tMac         uint16\n\tNet         uint16\n\tHv1         TpacketHdrVariant1\n\t_           [8]uint8\n}\n\ntype TpacketHdrVariant1 struct {\n\tRxhash    uint32\n\tVlan_tci  uint32\n\tVlan_tpid uint16\n\t_         uint16\n}\n\ntype TpacketBlockDesc struct {\n\tVersion uint32\n\tTo_priv uint32\n\tHdr     [40]byte\n}\n\ntype TpacketBDTS struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype TpacketHdrV1 struct {\n\tBlock_status        uint32\n\tNum_pkts            uint32\n\tOffset_to_first_pkt uint32\n\tBlk_len             uint32\n\tSeq_num             uint64\n\tTs_first_pkt        TpacketBDTS\n\tTs_last_pkt         TpacketBDTS\n}\n\ntype TpacketReq struct {\n\tBlock_size uint32\n\tBlock_nr   uint32\n\tFrame_size uint32\n\tFrame_nr   uint32\n}\n\ntype TpacketReq3 struct {\n\tBlock_size       uint32\n\tBlock_nr         uint32\n\tFrame_size       uint32\n\tFrame_nr         uint32\n\tRetire_blk_tov   uint32\n\tSizeof_priv      uint32\n\tFeature_req_word uint32\n}\n\ntype TpacketStats struct {\n\tPackets uint32\n\tDrops   uint32\n}\n\ntype TpacketStatsV3 struct {\n\tPackets      uint32\n\tDrops        uint32\n\tFreeze_q_cnt uint32\n}\n\ntype TpacketAuxdata struct {\n\tStatus    uint32\n\tLen       uint32\n\tSnaplen   uint32\n\tMac       uint16\n\tNet       uint16\n\tVlan_tci  uint16\n\tVlan_tpid uint16\n}\n\nconst (\n\tTPACKET_V1 = 0x0\n\tTPACKET_V2 = 0x1\n\tTPACKET_V3 = 0x2\n)\n\nconst (\n\tSizeofTpacket2Hdr = 0x20\n\tSizeofTpacket3Hdr = 0x30\n\n\tSizeofTpacketStats   = 0x8\n\tSizeofTpacketStatsV3 = 0xc\n)\n\nconst (\n\tIFLA_UNSPEC                                = 0x0\n\tIFLA_ADDRESS                               = 0x1\n\tIFLA_BROADCAST                             = 0x2\n\tIFLA_IFNAME                                = 0x3\n\tIFLA_MTU                                   = 0x4\n\tIFLA_LINK                                  = 0x5\n\tIFLA_QDISC                                 = 0x6\n\tIFLA_STATS                                 = 0x7\n\tIFLA_COST                                  = 0x8\n\tIFLA_PRIORITY                              = 0x9\n\tIFLA_MASTER                                = 0xa\n\tIFLA_WIRELESS                              = 0xb\n\tIFLA_PROTINFO                              = 0xc\n\tIFLA_TXQLEN                                = 0xd\n\tIFLA_MAP                                   = 0xe\n\tIFLA_WEIGHT                                = 0xf\n\tIFLA_OPERSTATE                             = 0x10\n\tIFLA_LINKMODE                              = 0x11\n\tIFLA_LINKINFO                              = 0x12\n\tIFLA_NET_NS_PID                            = 0x13\n\tIFLA_IFALIAS                               = 0x14\n\tIFLA_NUM_VF                                = 0x15\n\tIFLA_VFINFO_LIST                           = 0x16\n\tIFLA_STATS64                               = 0x17\n\tIFLA_VF_PORTS                              = 0x18\n\tIFLA_PORT_SELF                             = 0x19\n\tIFLA_AF_SPEC                               = 0x1a\n\tIFLA_GROUP                                 = 0x1b\n\tIFLA_NET_NS_FD                             = 0x1c\n\tIFLA_EXT_MASK                              = 0x1d\n\tIFLA_PROMISCUITY                           = 0x1e\n\tIFLA_NUM_TX_QUEUES                         = 0x1f\n\tIFLA_NUM_RX_QUEUES                         = 0x20\n\tIFLA_CARRIER                               = 0x21\n\tIFLA_PHYS_PORT_ID                          = 0x22\n\tIFLA_CARRIER_CHANGES                       = 0x23\n\tIFLA_PHYS_SWITCH_ID                        = 0x24\n\tIFLA_LINK_NETNSID                          = 0x25\n\tIFLA_PHYS_PORT_NAME                        = 0x26\n\tIFLA_PROTO_DOWN                            = 0x27\n\tIFLA_GSO_MAX_SEGS                          = 0x28\n\tIFLA_GSO_MAX_SIZE                          = 0x29\n\tIFLA_PAD                                   = 0x2a\n\tIFLA_XDP                                   = 0x2b\n\tIFLA_EVENT                                 = 0x2c\n\tIFLA_NEW_NETNSID                           = 0x2d\n\tIFLA_IF_NETNSID                            = 0x2e\n\tIFLA_TARGET_NETNSID                        = 0x2e\n\tIFLA_CARRIER_UP_COUNT                      = 0x2f\n\tIFLA_CARRIER_DOWN_COUNT                    = 0x30\n\tIFLA_NEW_IFINDEX                           = 0x31\n\tIFLA_MIN_MTU                               = 0x32\n\tIFLA_MAX_MTU                               = 0x33\n\tIFLA_PROP_LIST                             = 0x34\n\tIFLA_ALT_IFNAME                            = 0x35\n\tIFLA_PERM_ADDRESS                          = 0x36\n\tIFLA_PROTO_DOWN_REASON                     = 0x37\n\tIFLA_PARENT_DEV_NAME                       = 0x38\n\tIFLA_PARENT_DEV_BUS_NAME                   = 0x39\n\tIFLA_GRO_MAX_SIZE                          = 0x3a\n\tIFLA_TSO_MAX_SIZE                          = 0x3b\n\tIFLA_TSO_MAX_SEGS                          = 0x3c\n\tIFLA_ALLMULTI                              = 0x3d\n\tIFLA_DEVLINK_PORT                          = 0x3e\n\tIFLA_GSO_IPV4_MAX_SIZE                     = 0x3f\n\tIFLA_GRO_IPV4_MAX_SIZE                     = 0x40\n\tIFLA_DPLL_PIN                              = 0x41\n\tIFLA_PROTO_DOWN_REASON_UNSPEC              = 0x0\n\tIFLA_PROTO_DOWN_REASON_MASK                = 0x1\n\tIFLA_PROTO_DOWN_REASON_VALUE               = 0x2\n\tIFLA_PROTO_DOWN_REASON_MAX                 = 0x2\n\tIFLA_INET_UNSPEC                           = 0x0\n\tIFLA_INET_CONF                             = 0x1\n\tIFLA_INET6_UNSPEC                          = 0x0\n\tIFLA_INET6_FLAGS                           = 0x1\n\tIFLA_INET6_CONF                            = 0x2\n\tIFLA_INET6_STATS                           = 0x3\n\tIFLA_INET6_MCAST                           = 0x4\n\tIFLA_INET6_CACHEINFO                       = 0x5\n\tIFLA_INET6_ICMP6STATS                      = 0x6\n\tIFLA_INET6_TOKEN                           = 0x7\n\tIFLA_INET6_ADDR_GEN_MODE                   = 0x8\n\tIFLA_INET6_RA_MTU                          = 0x9\n\tIFLA_BR_UNSPEC                             = 0x0\n\tIFLA_BR_FORWARD_DELAY                      = 0x1\n\tIFLA_BR_HELLO_TIME                         = 0x2\n\tIFLA_BR_MAX_AGE                            = 0x3\n\tIFLA_BR_AGEING_TIME                        = 0x4\n\tIFLA_BR_STP_STATE                          = 0x5\n\tIFLA_BR_PRIORITY                           = 0x6\n\tIFLA_BR_VLAN_FILTERING                     = 0x7\n\tIFLA_BR_VLAN_PROTOCOL                      = 0x8\n\tIFLA_BR_GROUP_FWD_MASK                     = 0x9\n\tIFLA_BR_ROOT_ID                            = 0xa\n\tIFLA_BR_BRIDGE_ID                          = 0xb\n\tIFLA_BR_ROOT_PORT                          = 0xc\n\tIFLA_BR_ROOT_PATH_COST                     = 0xd\n\tIFLA_BR_TOPOLOGY_CHANGE                    = 0xe\n\tIFLA_BR_TOPOLOGY_CHANGE_DETECTED           = 0xf\n\tIFLA_BR_HELLO_TIMER                        = 0x10\n\tIFLA_BR_TCN_TIMER                          = 0x11\n\tIFLA_BR_TOPOLOGY_CHANGE_TIMER              = 0x12\n\tIFLA_BR_GC_TIMER                           = 0x13\n\tIFLA_BR_GROUP_ADDR                         = 0x14\n\tIFLA_BR_FDB_FLUSH                          = 0x15\n\tIFLA_BR_MCAST_ROUTER                       = 0x16\n\tIFLA_BR_MCAST_SNOOPING                     = 0x17\n\tIFLA_BR_MCAST_QUERY_USE_IFADDR             = 0x18\n\tIFLA_BR_MCAST_QUERIER                      = 0x19\n\tIFLA_BR_MCAST_HASH_ELASTICITY              = 0x1a\n\tIFLA_BR_MCAST_HASH_MAX                     = 0x1b\n\tIFLA_BR_MCAST_LAST_MEMBER_CNT              = 0x1c\n\tIFLA_BR_MCAST_STARTUP_QUERY_CNT            = 0x1d\n\tIFLA_BR_MCAST_LAST_MEMBER_INTVL            = 0x1e\n\tIFLA_BR_MCAST_MEMBERSHIP_INTVL             = 0x1f\n\tIFLA_BR_MCAST_QUERIER_INTVL                = 0x20\n\tIFLA_BR_MCAST_QUERY_INTVL                  = 0x21\n\tIFLA_BR_MCAST_QUERY_RESPONSE_INTVL         = 0x22\n\tIFLA_BR_MCAST_STARTUP_QUERY_INTVL          = 0x23\n\tIFLA_BR_NF_CALL_IPTABLES                   = 0x24\n\tIFLA_BR_NF_CALL_IP6TABLES                  = 0x25\n\tIFLA_BR_NF_CALL_ARPTABLES                  = 0x26\n\tIFLA_BR_VLAN_DEFAULT_PVID                  = 0x27\n\tIFLA_BR_PAD                                = 0x28\n\tIFLA_BR_VLAN_STATS_ENABLED                 = 0x29\n\tIFLA_BR_MCAST_STATS_ENABLED                = 0x2a\n\tIFLA_BR_MCAST_IGMP_VERSION                 = 0x2b\n\tIFLA_BR_MCAST_MLD_VERSION                  = 0x2c\n\tIFLA_BR_VLAN_STATS_PER_PORT                = 0x2d\n\tIFLA_BR_MULTI_BOOLOPT                      = 0x2e\n\tIFLA_BR_MCAST_QUERIER_STATE                = 0x2f\n\tIFLA_BR_FDB_N_LEARNED                      = 0x30\n\tIFLA_BR_FDB_MAX_LEARNED                    = 0x31\n\tIFLA_BRPORT_UNSPEC                         = 0x0\n\tIFLA_BRPORT_STATE                          = 0x1\n\tIFLA_BRPORT_PRIORITY                       = 0x2\n\tIFLA_BRPORT_COST                           = 0x3\n\tIFLA_BRPORT_MODE                           = 0x4\n\tIFLA_BRPORT_GUARD                          = 0x5\n\tIFLA_BRPORT_PROTECT                        = 0x6\n\tIFLA_BRPORT_FAST_LEAVE                     = 0x7\n\tIFLA_BRPORT_LEARNING                       = 0x8\n\tIFLA_BRPORT_UNICAST_FLOOD                  = 0x9\n\tIFLA_BRPORT_PROXYARP                       = 0xa\n\tIFLA_BRPORT_LEARNING_SYNC                  = 0xb\n\tIFLA_BRPORT_PROXYARP_WIFI                  = 0xc\n\tIFLA_BRPORT_ROOT_ID                        = 0xd\n\tIFLA_BRPORT_BRIDGE_ID                      = 0xe\n\tIFLA_BRPORT_DESIGNATED_PORT                = 0xf\n\tIFLA_BRPORT_DESIGNATED_COST                = 0x10\n\tIFLA_BRPORT_ID                             = 0x11\n\tIFLA_BRPORT_NO                             = 0x12\n\tIFLA_BRPORT_TOPOLOGY_CHANGE_ACK            = 0x13\n\tIFLA_BRPORT_CONFIG_PENDING                 = 0x14\n\tIFLA_BRPORT_MESSAGE_AGE_TIMER              = 0x15\n\tIFLA_BRPORT_FORWARD_DELAY_TIMER            = 0x16\n\tIFLA_BRPORT_HOLD_TIMER                     = 0x17\n\tIFLA_BRPORT_FLUSH                          = 0x18\n\tIFLA_BRPORT_MULTICAST_ROUTER               = 0x19\n\tIFLA_BRPORT_PAD                            = 0x1a\n\tIFLA_BRPORT_MCAST_FLOOD                    = 0x1b\n\tIFLA_BRPORT_MCAST_TO_UCAST                 = 0x1c\n\tIFLA_BRPORT_VLAN_TUNNEL                    = 0x1d\n\tIFLA_BRPORT_BCAST_FLOOD                    = 0x1e\n\tIFLA_BRPORT_GROUP_FWD_MASK                 = 0x1f\n\tIFLA_BRPORT_NEIGH_SUPPRESS                 = 0x20\n\tIFLA_BRPORT_ISOLATED                       = 0x21\n\tIFLA_BRPORT_BACKUP_PORT                    = 0x22\n\tIFLA_BRPORT_MRP_RING_OPEN                  = 0x23\n\tIFLA_BRPORT_MRP_IN_OPEN                    = 0x24\n\tIFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT          = 0x25\n\tIFLA_BRPORT_MCAST_EHT_HOSTS_CNT            = 0x26\n\tIFLA_BRPORT_LOCKED                         = 0x27\n\tIFLA_BRPORT_MAB                            = 0x28\n\tIFLA_BRPORT_MCAST_N_GROUPS                 = 0x29\n\tIFLA_BRPORT_MCAST_MAX_GROUPS               = 0x2a\n\tIFLA_BRPORT_NEIGH_VLAN_SUPPRESS            = 0x2b\n\tIFLA_BRPORT_BACKUP_NHID                    = 0x2c\n\tIFLA_INFO_UNSPEC                           = 0x0\n\tIFLA_INFO_KIND                             = 0x1\n\tIFLA_INFO_DATA                             = 0x2\n\tIFLA_INFO_XSTATS                           = 0x3\n\tIFLA_INFO_SLAVE_KIND                       = 0x4\n\tIFLA_INFO_SLAVE_DATA                       = 0x5\n\tIFLA_VLAN_UNSPEC                           = 0x0\n\tIFLA_VLAN_ID                               = 0x1\n\tIFLA_VLAN_FLAGS                            = 0x2\n\tIFLA_VLAN_EGRESS_QOS                       = 0x3\n\tIFLA_VLAN_INGRESS_QOS                      = 0x4\n\tIFLA_VLAN_PROTOCOL                         = 0x5\n\tIFLA_VLAN_QOS_UNSPEC                       = 0x0\n\tIFLA_VLAN_QOS_MAPPING                      = 0x1\n\tIFLA_MACVLAN_UNSPEC                        = 0x0\n\tIFLA_MACVLAN_MODE                          = 0x1\n\tIFLA_MACVLAN_FLAGS                         = 0x2\n\tIFLA_MACVLAN_MACADDR_MODE                  = 0x3\n\tIFLA_MACVLAN_MACADDR                       = 0x4\n\tIFLA_MACVLAN_MACADDR_DATA                  = 0x5\n\tIFLA_MACVLAN_MACADDR_COUNT                 = 0x6\n\tIFLA_MACVLAN_BC_QUEUE_LEN                  = 0x7\n\tIFLA_MACVLAN_BC_QUEUE_LEN_USED             = 0x8\n\tIFLA_MACVLAN_BC_CUTOFF                     = 0x9\n\tIFLA_VRF_UNSPEC                            = 0x0\n\tIFLA_VRF_TABLE                             = 0x1\n\tIFLA_VRF_PORT_UNSPEC                       = 0x0\n\tIFLA_VRF_PORT_TABLE                        = 0x1\n\tIFLA_MACSEC_UNSPEC                         = 0x0\n\tIFLA_MACSEC_SCI                            = 0x1\n\tIFLA_MACSEC_PORT                           = 0x2\n\tIFLA_MACSEC_ICV_LEN                        = 0x3\n\tIFLA_MACSEC_CIPHER_SUITE                   = 0x4\n\tIFLA_MACSEC_WINDOW                         = 0x5\n\tIFLA_MACSEC_ENCODING_SA                    = 0x6\n\tIFLA_MACSEC_ENCRYPT                        = 0x7\n\tIFLA_MACSEC_PROTECT                        = 0x8\n\tIFLA_MACSEC_INC_SCI                        = 0x9\n\tIFLA_MACSEC_ES                             = 0xa\n\tIFLA_MACSEC_SCB                            = 0xb\n\tIFLA_MACSEC_REPLAY_PROTECT                 = 0xc\n\tIFLA_MACSEC_VALIDATION                     = 0xd\n\tIFLA_MACSEC_PAD                            = 0xe\n\tIFLA_MACSEC_OFFLOAD                        = 0xf\n\tIFLA_XFRM_UNSPEC                           = 0x0\n\tIFLA_XFRM_LINK                             = 0x1\n\tIFLA_XFRM_IF_ID                            = 0x2\n\tIFLA_XFRM_COLLECT_METADATA                 = 0x3\n\tIFLA_IPVLAN_UNSPEC                         = 0x0\n\tIFLA_IPVLAN_MODE                           = 0x1\n\tIFLA_IPVLAN_FLAGS                          = 0x2\n\tIFLA_NETKIT_UNSPEC                         = 0x0\n\tIFLA_NETKIT_PEER_INFO                      = 0x1\n\tIFLA_NETKIT_PRIMARY                        = 0x2\n\tIFLA_NETKIT_POLICY                         = 0x3\n\tIFLA_NETKIT_PEER_POLICY                    = 0x4\n\tIFLA_NETKIT_MODE                           = 0x5\n\tIFLA_VXLAN_UNSPEC                          = 0x0\n\tIFLA_VXLAN_ID                              = 0x1\n\tIFLA_VXLAN_GROUP                           = 0x2\n\tIFLA_VXLAN_LINK                            = 0x3\n\tIFLA_VXLAN_LOCAL                           = 0x4\n\tIFLA_VXLAN_TTL                             = 0x5\n\tIFLA_VXLAN_TOS                             = 0x6\n\tIFLA_VXLAN_LEARNING                        = 0x7\n\tIFLA_VXLAN_AGEING                          = 0x8\n\tIFLA_VXLAN_LIMIT                           = 0x9\n\tIFLA_VXLAN_PORT_RANGE                      = 0xa\n\tIFLA_VXLAN_PROXY                           = 0xb\n\tIFLA_VXLAN_RSC                             = 0xc\n\tIFLA_VXLAN_L2MISS                          = 0xd\n\tIFLA_VXLAN_L3MISS                          = 0xe\n\tIFLA_VXLAN_PORT                            = 0xf\n\tIFLA_VXLAN_GROUP6                          = 0x10\n\tIFLA_VXLAN_LOCAL6                          = 0x11\n\tIFLA_VXLAN_UDP_CSUM                        = 0x12\n\tIFLA_VXLAN_UDP_ZERO_CSUM6_TX               = 0x13\n\tIFLA_VXLAN_UDP_ZERO_CSUM6_RX               = 0x14\n\tIFLA_VXLAN_REMCSUM_TX                      = 0x15\n\tIFLA_VXLAN_REMCSUM_RX                      = 0x16\n\tIFLA_VXLAN_GBP                             = 0x17\n\tIFLA_VXLAN_REMCSUM_NOPARTIAL               = 0x18\n\tIFLA_VXLAN_COLLECT_METADATA                = 0x19\n\tIFLA_VXLAN_LABEL                           = 0x1a\n\tIFLA_VXLAN_GPE                             = 0x1b\n\tIFLA_VXLAN_TTL_INHERIT                     = 0x1c\n\tIFLA_VXLAN_DF                              = 0x1d\n\tIFLA_VXLAN_VNIFILTER                       = 0x1e\n\tIFLA_VXLAN_LOCALBYPASS                     = 0x1f\n\tIFLA_VXLAN_LABEL_POLICY                    = 0x20\n\tIFLA_GENEVE_UNSPEC                         = 0x0\n\tIFLA_GENEVE_ID                             = 0x1\n\tIFLA_GENEVE_REMOTE                         = 0x2\n\tIFLA_GENEVE_TTL                            = 0x3\n\tIFLA_GENEVE_TOS                            = 0x4\n\tIFLA_GENEVE_PORT                           = 0x5\n\tIFLA_GENEVE_COLLECT_METADATA               = 0x6\n\tIFLA_GENEVE_REMOTE6                        = 0x7\n\tIFLA_GENEVE_UDP_CSUM                       = 0x8\n\tIFLA_GENEVE_UDP_ZERO_CSUM6_TX              = 0x9\n\tIFLA_GENEVE_UDP_ZERO_CSUM6_RX              = 0xa\n\tIFLA_GENEVE_LABEL                          = 0xb\n\tIFLA_GENEVE_TTL_INHERIT                    = 0xc\n\tIFLA_GENEVE_DF                             = 0xd\n\tIFLA_GENEVE_INNER_PROTO_INHERIT            = 0xe\n\tIFLA_BAREUDP_UNSPEC                        = 0x0\n\tIFLA_BAREUDP_PORT                          = 0x1\n\tIFLA_BAREUDP_ETHERTYPE                     = 0x2\n\tIFLA_BAREUDP_SRCPORT_MIN                   = 0x3\n\tIFLA_BAREUDP_MULTIPROTO_MODE               = 0x4\n\tIFLA_PPP_UNSPEC                            = 0x0\n\tIFLA_PPP_DEV_FD                            = 0x1\n\tIFLA_GTP_UNSPEC                            = 0x0\n\tIFLA_GTP_FD0                               = 0x1\n\tIFLA_GTP_FD1                               = 0x2\n\tIFLA_GTP_PDP_HASHSIZE                      = 0x3\n\tIFLA_GTP_ROLE                              = 0x4\n\tIFLA_GTP_CREATE_SOCKETS                    = 0x5\n\tIFLA_GTP_RESTART_COUNT                     = 0x6\n\tIFLA_GTP_LOCAL                             = 0x7\n\tIFLA_GTP_LOCAL6                            = 0x8\n\tIFLA_BOND_UNSPEC                           = 0x0\n\tIFLA_BOND_MODE                             = 0x1\n\tIFLA_BOND_ACTIVE_SLAVE                     = 0x2\n\tIFLA_BOND_MIIMON                           = 0x3\n\tIFLA_BOND_UPDELAY                          = 0x4\n\tIFLA_BOND_DOWNDELAY                        = 0x5\n\tIFLA_BOND_USE_CARRIER                      = 0x6\n\tIFLA_BOND_ARP_INTERVAL                     = 0x7\n\tIFLA_BOND_ARP_IP_TARGET                    = 0x8\n\tIFLA_BOND_ARP_VALIDATE                     = 0x9\n\tIFLA_BOND_ARP_ALL_TARGETS                  = 0xa\n\tIFLA_BOND_PRIMARY                          = 0xb\n\tIFLA_BOND_PRIMARY_RESELECT                 = 0xc\n\tIFLA_BOND_FAIL_OVER_MAC                    = 0xd\n\tIFLA_BOND_XMIT_HASH_POLICY                 = 0xe\n\tIFLA_BOND_RESEND_IGMP                      = 0xf\n\tIFLA_BOND_NUM_PEER_NOTIF                   = 0x10\n\tIFLA_BOND_ALL_SLAVES_ACTIVE                = 0x11\n\tIFLA_BOND_MIN_LINKS                        = 0x12\n\tIFLA_BOND_LP_INTERVAL                      = 0x13\n\tIFLA_BOND_PACKETS_PER_SLAVE                = 0x14\n\tIFLA_BOND_AD_LACP_RATE                     = 0x15\n\tIFLA_BOND_AD_SELECT                        = 0x16\n\tIFLA_BOND_AD_INFO                          = 0x17\n\tIFLA_BOND_AD_ACTOR_SYS_PRIO                = 0x18\n\tIFLA_BOND_AD_USER_PORT_KEY                 = 0x19\n\tIFLA_BOND_AD_ACTOR_SYSTEM                  = 0x1a\n\tIFLA_BOND_TLB_DYNAMIC_LB                   = 0x1b\n\tIFLA_BOND_PEER_NOTIF_DELAY                 = 0x1c\n\tIFLA_BOND_AD_LACP_ACTIVE                   = 0x1d\n\tIFLA_BOND_MISSED_MAX                       = 0x1e\n\tIFLA_BOND_NS_IP6_TARGET                    = 0x1f\n\tIFLA_BOND_COUPLED_CONTROL                  = 0x20\n\tIFLA_BOND_AD_INFO_UNSPEC                   = 0x0\n\tIFLA_BOND_AD_INFO_AGGREGATOR               = 0x1\n\tIFLA_BOND_AD_INFO_NUM_PORTS                = 0x2\n\tIFLA_BOND_AD_INFO_ACTOR_KEY                = 0x3\n\tIFLA_BOND_AD_INFO_PARTNER_KEY              = 0x4\n\tIFLA_BOND_AD_INFO_PARTNER_MAC              = 0x5\n\tIFLA_BOND_SLAVE_UNSPEC                     = 0x0\n\tIFLA_BOND_SLAVE_STATE                      = 0x1\n\tIFLA_BOND_SLAVE_MII_STATUS                 = 0x2\n\tIFLA_BOND_SLAVE_LINK_FAILURE_COUNT         = 0x3\n\tIFLA_BOND_SLAVE_PERM_HWADDR                = 0x4\n\tIFLA_BOND_SLAVE_QUEUE_ID                   = 0x5\n\tIFLA_BOND_SLAVE_AD_AGGREGATOR_ID           = 0x6\n\tIFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE   = 0x7\n\tIFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8\n\tIFLA_BOND_SLAVE_PRIO                       = 0x9\n\tIFLA_VF_INFO_UNSPEC                        = 0x0\n\tIFLA_VF_INFO                               = 0x1\n\tIFLA_VF_UNSPEC                             = 0x0\n\tIFLA_VF_MAC                                = 0x1\n\tIFLA_VF_VLAN                               = 0x2\n\tIFLA_VF_TX_RATE                            = 0x3\n\tIFLA_VF_SPOOFCHK                           = 0x4\n\tIFLA_VF_LINK_STATE                         = 0x5\n\tIFLA_VF_RATE                               = 0x6\n\tIFLA_VF_RSS_QUERY_EN                       = 0x7\n\tIFLA_VF_STATS                              = 0x8\n\tIFLA_VF_TRUST                              = 0x9\n\tIFLA_VF_IB_NODE_GUID                       = 0xa\n\tIFLA_VF_IB_PORT_GUID                       = 0xb\n\tIFLA_VF_VLAN_LIST                          = 0xc\n\tIFLA_VF_BROADCAST                          = 0xd\n\tIFLA_VF_VLAN_INFO_UNSPEC                   = 0x0\n\tIFLA_VF_VLAN_INFO                          = 0x1\n\tIFLA_VF_LINK_STATE_AUTO                    = 0x0\n\tIFLA_VF_LINK_STATE_ENABLE                  = 0x1\n\tIFLA_VF_LINK_STATE_DISABLE                 = 0x2\n\tIFLA_VF_STATS_RX_PACKETS                   = 0x0\n\tIFLA_VF_STATS_TX_PACKETS                   = 0x1\n\tIFLA_VF_STATS_RX_BYTES                     = 0x2\n\tIFLA_VF_STATS_TX_BYTES                     = 0x3\n\tIFLA_VF_STATS_BROADCAST                    = 0x4\n\tIFLA_VF_STATS_MULTICAST                    = 0x5\n\tIFLA_VF_STATS_PAD                          = 0x6\n\tIFLA_VF_STATS_RX_DROPPED                   = 0x7\n\tIFLA_VF_STATS_TX_DROPPED                   = 0x8\n\tIFLA_VF_PORT_UNSPEC                        = 0x0\n\tIFLA_VF_PORT                               = 0x1\n\tIFLA_PORT_UNSPEC                           = 0x0\n\tIFLA_PORT_VF                               = 0x1\n\tIFLA_PORT_PROFILE                          = 0x2\n\tIFLA_PORT_VSI_TYPE                         = 0x3\n\tIFLA_PORT_INSTANCE_UUID                    = 0x4\n\tIFLA_PORT_HOST_UUID                        = 0x5\n\tIFLA_PORT_REQUEST                          = 0x6\n\tIFLA_PORT_RESPONSE                         = 0x7\n\tIFLA_IPOIB_UNSPEC                          = 0x0\n\tIFLA_IPOIB_PKEY                            = 0x1\n\tIFLA_IPOIB_MODE                            = 0x2\n\tIFLA_IPOIB_UMCAST                          = 0x3\n\tIFLA_HSR_UNSPEC                            = 0x0\n\tIFLA_HSR_SLAVE1                            = 0x1\n\tIFLA_HSR_SLAVE2                            = 0x2\n\tIFLA_HSR_MULTICAST_SPEC                    = 0x3\n\tIFLA_HSR_SUPERVISION_ADDR                  = 0x4\n\tIFLA_HSR_SEQ_NR                            = 0x5\n\tIFLA_HSR_VERSION                           = 0x6\n\tIFLA_HSR_PROTOCOL                          = 0x7\n\tIFLA_HSR_INTERLINK                         = 0x8\n\tIFLA_STATS_UNSPEC                          = 0x0\n\tIFLA_STATS_LINK_64                         = 0x1\n\tIFLA_STATS_LINK_XSTATS                     = 0x2\n\tIFLA_STATS_LINK_XSTATS_SLAVE               = 0x3\n\tIFLA_STATS_LINK_OFFLOAD_XSTATS             = 0x4\n\tIFLA_STATS_AF_SPEC                         = 0x5\n\tIFLA_STATS_GETSET_UNSPEC                   = 0x0\n\tIFLA_STATS_GET_FILTERS                     = 0x1\n\tIFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS     = 0x2\n\tIFLA_OFFLOAD_XSTATS_UNSPEC                 = 0x0\n\tIFLA_OFFLOAD_XSTATS_CPU_HIT                = 0x1\n\tIFLA_OFFLOAD_XSTATS_HW_S_INFO              = 0x2\n\tIFLA_OFFLOAD_XSTATS_L3_STATS               = 0x3\n\tIFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC       = 0x0\n\tIFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST      = 0x1\n\tIFLA_OFFLOAD_XSTATS_HW_S_INFO_USED         = 0x2\n\tIFLA_XDP_UNSPEC                            = 0x0\n\tIFLA_XDP_FD                                = 0x1\n\tIFLA_XDP_ATTACHED                          = 0x2\n\tIFLA_XDP_FLAGS                             = 0x3\n\tIFLA_XDP_PROG_ID                           = 0x4\n\tIFLA_XDP_DRV_PROG_ID                       = 0x5\n\tIFLA_XDP_SKB_PROG_ID                       = 0x6\n\tIFLA_XDP_HW_PROG_ID                        = 0x7\n\tIFLA_XDP_EXPECTED_FD                       = 0x8\n\tIFLA_EVENT_NONE                            = 0x0\n\tIFLA_EVENT_REBOOT                          = 0x1\n\tIFLA_EVENT_FEATURES                        = 0x2\n\tIFLA_EVENT_BONDING_FAILOVER                = 0x3\n\tIFLA_EVENT_NOTIFY_PEERS                    = 0x4\n\tIFLA_EVENT_IGMP_RESEND                     = 0x5\n\tIFLA_EVENT_BONDING_OPTIONS                 = 0x6\n\tIFLA_TUN_UNSPEC                            = 0x0\n\tIFLA_TUN_OWNER                             = 0x1\n\tIFLA_TUN_GROUP                             = 0x2\n\tIFLA_TUN_TYPE                              = 0x3\n\tIFLA_TUN_PI                                = 0x4\n\tIFLA_TUN_VNET_HDR                          = 0x5\n\tIFLA_TUN_PERSIST                           = 0x6\n\tIFLA_TUN_MULTI_QUEUE                       = 0x7\n\tIFLA_TUN_NUM_QUEUES                        = 0x8\n\tIFLA_TUN_NUM_DISABLED_QUEUES               = 0x9\n\tIFLA_RMNET_UNSPEC                          = 0x0\n\tIFLA_RMNET_MUX_ID                          = 0x1\n\tIFLA_RMNET_FLAGS                           = 0x2\n\tIFLA_MCTP_UNSPEC                           = 0x0\n\tIFLA_MCTP_NET                              = 0x1\n\tIFLA_DSA_UNSPEC                            = 0x0\n\tIFLA_DSA_CONDUIT                           = 0x1\n\tIFLA_DSA_MASTER                            = 0x1\n)\n\nconst (\n\tNETKIT_NEXT     = -0x1\n\tNETKIT_PASS     = 0x0\n\tNETKIT_DROP     = 0x2\n\tNETKIT_REDIRECT = 0x7\n\tNETKIT_L2       = 0x0\n\tNETKIT_L3       = 0x1\n)\n\nconst (\n\tNF_INET_PRE_ROUTING  = 0x0\n\tNF_INET_LOCAL_IN     = 0x1\n\tNF_INET_FORWARD      = 0x2\n\tNF_INET_LOCAL_OUT    = 0x3\n\tNF_INET_POST_ROUTING = 0x4\n\tNF_INET_NUMHOOKS     = 0x5\n)\n\nconst (\n\tNF_NETDEV_INGRESS  = 0x0\n\tNF_NETDEV_EGRESS   = 0x1\n\tNF_NETDEV_NUMHOOKS = 0x2\n)\n\nconst (\n\tNFPROTO_UNSPEC   = 0x0\n\tNFPROTO_INET     = 0x1\n\tNFPROTO_IPV4     = 0x2\n\tNFPROTO_ARP      = 0x3\n\tNFPROTO_NETDEV   = 0x5\n\tNFPROTO_BRIDGE   = 0x7\n\tNFPROTO_IPV6     = 0xa\n\tNFPROTO_DECNET   = 0xc\n\tNFPROTO_NUMPROTO = 0xd\n)\n\nconst SO_ORIGINAL_DST = 0x50\n\ntype Nfgenmsg struct {\n\tNfgen_family uint8\n\tVersion      uint8\n\tRes_id       uint16\n}\n\nconst (\n\tNFNL_BATCH_UNSPEC = 0x0\n\tNFNL_BATCH_GENID  = 0x1\n)\n\nconst (\n\tNFT_REG_VERDICT                   = 0x0\n\tNFT_REG_1                         = 0x1\n\tNFT_REG_2                         = 0x2\n\tNFT_REG_3                         = 0x3\n\tNFT_REG_4                         = 0x4\n\tNFT_REG32_00                      = 0x8\n\tNFT_REG32_01                      = 0x9\n\tNFT_REG32_02                      = 0xa\n\tNFT_REG32_03                      = 0xb\n\tNFT_REG32_04                      = 0xc\n\tNFT_REG32_05                      = 0xd\n\tNFT_REG32_06                      = 0xe\n\tNFT_REG32_07                      = 0xf\n\tNFT_REG32_08                      = 0x10\n\tNFT_REG32_09                      = 0x11\n\tNFT_REG32_10                      = 0x12\n\tNFT_REG32_11                      = 0x13\n\tNFT_REG32_12                      = 0x14\n\tNFT_REG32_13                      = 0x15\n\tNFT_REG32_14                      = 0x16\n\tNFT_REG32_15                      = 0x17\n\tNFT_CONTINUE                      = -0x1\n\tNFT_BREAK                         = -0x2\n\tNFT_JUMP                          = -0x3\n\tNFT_GOTO                          = -0x4\n\tNFT_RETURN                        = -0x5\n\tNFT_MSG_NEWTABLE                  = 0x0\n\tNFT_MSG_GETTABLE                  = 0x1\n\tNFT_MSG_DELTABLE                  = 0x2\n\tNFT_MSG_NEWCHAIN                  = 0x3\n\tNFT_MSG_GETCHAIN                  = 0x4\n\tNFT_MSG_DELCHAIN                  = 0x5\n\tNFT_MSG_NEWRULE                   = 0x6\n\tNFT_MSG_GETRULE                   = 0x7\n\tNFT_MSG_DELRULE                   = 0x8\n\tNFT_MSG_NEWSET                    = 0x9\n\tNFT_MSG_GETSET                    = 0xa\n\tNFT_MSG_DELSET                    = 0xb\n\tNFT_MSG_NEWSETELEM                = 0xc\n\tNFT_MSG_GETSETELEM                = 0xd\n\tNFT_MSG_DELSETELEM                = 0xe\n\tNFT_MSG_NEWGEN                    = 0xf\n\tNFT_MSG_GETGEN                    = 0x10\n\tNFT_MSG_TRACE                     = 0x11\n\tNFT_MSG_NEWOBJ                    = 0x12\n\tNFT_MSG_GETOBJ                    = 0x13\n\tNFT_MSG_DELOBJ                    = 0x14\n\tNFT_MSG_GETOBJ_RESET              = 0x15\n\tNFT_MSG_NEWFLOWTABLE              = 0x16\n\tNFT_MSG_GETFLOWTABLE              = 0x17\n\tNFT_MSG_DELFLOWTABLE              = 0x18\n\tNFT_MSG_GETRULE_RESET             = 0x19\n\tNFT_MSG_MAX                       = 0x22\n\tNFTA_LIST_UNSPEC                  = 0x0\n\tNFTA_LIST_ELEM                    = 0x1\n\tNFTA_HOOK_UNSPEC                  = 0x0\n\tNFTA_HOOK_HOOKNUM                 = 0x1\n\tNFTA_HOOK_PRIORITY                = 0x2\n\tNFTA_HOOK_DEV                     = 0x3\n\tNFT_TABLE_F_DORMANT               = 0x1\n\tNFTA_TABLE_UNSPEC                 = 0x0\n\tNFTA_TABLE_NAME                   = 0x1\n\tNFTA_TABLE_FLAGS                  = 0x2\n\tNFTA_TABLE_USE                    = 0x3\n\tNFTA_CHAIN_UNSPEC                 = 0x0\n\tNFTA_CHAIN_TABLE                  = 0x1\n\tNFTA_CHAIN_HANDLE                 = 0x2\n\tNFTA_CHAIN_NAME                   = 0x3\n\tNFTA_CHAIN_HOOK                   = 0x4\n\tNFTA_CHAIN_POLICY                 = 0x5\n\tNFTA_CHAIN_USE                    = 0x6\n\tNFTA_CHAIN_TYPE                   = 0x7\n\tNFTA_CHAIN_COUNTERS               = 0x8\n\tNFTA_CHAIN_PAD                    = 0x9\n\tNFTA_RULE_UNSPEC                  = 0x0\n\tNFTA_RULE_TABLE                   = 0x1\n\tNFTA_RULE_CHAIN                   = 0x2\n\tNFTA_RULE_HANDLE                  = 0x3\n\tNFTA_RULE_EXPRESSIONS             = 0x4\n\tNFTA_RULE_COMPAT                  = 0x5\n\tNFTA_RULE_POSITION                = 0x6\n\tNFTA_RULE_USERDATA                = 0x7\n\tNFTA_RULE_PAD                     = 0x8\n\tNFTA_RULE_ID                      = 0x9\n\tNFT_RULE_COMPAT_F_INV             = 0x2\n\tNFT_RULE_COMPAT_F_MASK            = 0x2\n\tNFTA_RULE_COMPAT_UNSPEC           = 0x0\n\tNFTA_RULE_COMPAT_PROTO            = 0x1\n\tNFTA_RULE_COMPAT_FLAGS            = 0x2\n\tNFT_SET_ANONYMOUS                 = 0x1\n\tNFT_SET_CONSTANT                  = 0x2\n\tNFT_SET_INTERVAL                  = 0x4\n\tNFT_SET_MAP                       = 0x8\n\tNFT_SET_TIMEOUT                   = 0x10\n\tNFT_SET_EVAL                      = 0x20\n\tNFT_SET_OBJECT                    = 0x40\n\tNFT_SET_POL_PERFORMANCE           = 0x0\n\tNFT_SET_POL_MEMORY                = 0x1\n\tNFTA_SET_DESC_UNSPEC              = 0x0\n\tNFTA_SET_DESC_SIZE                = 0x1\n\tNFTA_SET_UNSPEC                   = 0x0\n\tNFTA_SET_TABLE                    = 0x1\n\tNFTA_SET_NAME                     = 0x2\n\tNFTA_SET_FLAGS                    = 0x3\n\tNFTA_SET_KEY_TYPE                 = 0x4\n\tNFTA_SET_KEY_LEN                  = 0x5\n\tNFTA_SET_DATA_TYPE                = 0x6\n\tNFTA_SET_DATA_LEN                 = 0x7\n\tNFTA_SET_POLICY                   = 0x8\n\tNFTA_SET_DESC                     = 0x9\n\tNFTA_SET_ID                       = 0xa\n\tNFTA_SET_TIMEOUT                  = 0xb\n\tNFTA_SET_GC_INTERVAL              = 0xc\n\tNFTA_SET_USERDATA                 = 0xd\n\tNFTA_SET_PAD                      = 0xe\n\tNFTA_SET_OBJ_TYPE                 = 0xf\n\tNFT_SET_ELEM_INTERVAL_END         = 0x1\n\tNFTA_SET_ELEM_UNSPEC              = 0x0\n\tNFTA_SET_ELEM_KEY                 = 0x1\n\tNFTA_SET_ELEM_DATA                = 0x2\n\tNFTA_SET_ELEM_FLAGS               = 0x3\n\tNFTA_SET_ELEM_TIMEOUT             = 0x4\n\tNFTA_SET_ELEM_EXPIRATION          = 0x5\n\tNFTA_SET_ELEM_USERDATA            = 0x6\n\tNFTA_SET_ELEM_EXPR                = 0x7\n\tNFTA_SET_ELEM_PAD                 = 0x8\n\tNFTA_SET_ELEM_OBJREF              = 0x9\n\tNFTA_SET_ELEM_LIST_UNSPEC         = 0x0\n\tNFTA_SET_ELEM_LIST_TABLE          = 0x1\n\tNFTA_SET_ELEM_LIST_SET            = 0x2\n\tNFTA_SET_ELEM_LIST_ELEMENTS       = 0x3\n\tNFTA_SET_ELEM_LIST_SET_ID         = 0x4\n\tNFT_DATA_VALUE                    = 0x0\n\tNFT_DATA_VERDICT                  = 0xffffff00\n\tNFTA_DATA_UNSPEC                  = 0x0\n\tNFTA_DATA_VALUE                   = 0x1\n\tNFTA_DATA_VERDICT                 = 0x2\n\tNFTA_VERDICT_UNSPEC               = 0x0\n\tNFTA_VERDICT_CODE                 = 0x1\n\tNFTA_VERDICT_CHAIN                = 0x2\n\tNFTA_EXPR_UNSPEC                  = 0x0\n\tNFTA_EXPR_NAME                    = 0x1\n\tNFTA_EXPR_DATA                    = 0x2\n\tNFTA_IMMEDIATE_UNSPEC             = 0x0\n\tNFTA_IMMEDIATE_DREG               = 0x1\n\tNFTA_IMMEDIATE_DATA               = 0x2\n\tNFTA_BITWISE_UNSPEC               = 0x0\n\tNFTA_BITWISE_SREG                 = 0x1\n\tNFTA_BITWISE_DREG                 = 0x2\n\tNFTA_BITWISE_LEN                  = 0x3\n\tNFTA_BITWISE_MASK                 = 0x4\n\tNFTA_BITWISE_XOR                  = 0x5\n\tNFT_BYTEORDER_NTOH                = 0x0\n\tNFT_BYTEORDER_HTON                = 0x1\n\tNFTA_BYTEORDER_UNSPEC             = 0x0\n\tNFTA_BYTEORDER_SREG               = 0x1\n\tNFTA_BYTEORDER_DREG               = 0x2\n\tNFTA_BYTEORDER_OP                 = 0x3\n\tNFTA_BYTEORDER_LEN                = 0x4\n\tNFTA_BYTEORDER_SIZE               = 0x5\n\tNFT_CMP_EQ                        = 0x0\n\tNFT_CMP_NEQ                       = 0x1\n\tNFT_CMP_LT                        = 0x2\n\tNFT_CMP_LTE                       = 0x3\n\tNFT_CMP_GT                        = 0x4\n\tNFT_CMP_GTE                       = 0x5\n\tNFTA_CMP_UNSPEC                   = 0x0\n\tNFTA_CMP_SREG                     = 0x1\n\tNFTA_CMP_OP                       = 0x2\n\tNFTA_CMP_DATA                     = 0x3\n\tNFT_RANGE_EQ                      = 0x0\n\tNFT_RANGE_NEQ                     = 0x1\n\tNFTA_RANGE_UNSPEC                 = 0x0\n\tNFTA_RANGE_SREG                   = 0x1\n\tNFTA_RANGE_OP                     = 0x2\n\tNFTA_RANGE_FROM_DATA              = 0x3\n\tNFTA_RANGE_TO_DATA                = 0x4\n\tNFT_LOOKUP_F_INV                  = 0x1\n\tNFTA_LOOKUP_UNSPEC                = 0x0\n\tNFTA_LOOKUP_SET                   = 0x1\n\tNFTA_LOOKUP_SREG                  = 0x2\n\tNFTA_LOOKUP_DREG                  = 0x3\n\tNFTA_LOOKUP_SET_ID                = 0x4\n\tNFTA_LOOKUP_FLAGS                 = 0x5\n\tNFT_DYNSET_OP_ADD                 = 0x0\n\tNFT_DYNSET_OP_UPDATE              = 0x1\n\tNFT_DYNSET_F_INV                  = 0x1\n\tNFTA_DYNSET_UNSPEC                = 0x0\n\tNFTA_DYNSET_SET_NAME              = 0x1\n\tNFTA_DYNSET_SET_ID                = 0x2\n\tNFTA_DYNSET_OP                    = 0x3\n\tNFTA_DYNSET_SREG_KEY              = 0x4\n\tNFTA_DYNSET_SREG_DATA             = 0x5\n\tNFTA_DYNSET_TIMEOUT               = 0x6\n\tNFTA_DYNSET_EXPR                  = 0x7\n\tNFTA_DYNSET_PAD                   = 0x8\n\tNFTA_DYNSET_FLAGS                 = 0x9\n\tNFT_PAYLOAD_LL_HEADER             = 0x0\n\tNFT_PAYLOAD_NETWORK_HEADER        = 0x1\n\tNFT_PAYLOAD_TRANSPORT_HEADER      = 0x2\n\tNFT_PAYLOAD_INNER_HEADER          = 0x3\n\tNFT_PAYLOAD_TUN_HEADER            = 0x4\n\tNFT_PAYLOAD_CSUM_NONE             = 0x0\n\tNFT_PAYLOAD_CSUM_INET             = 0x1\n\tNFT_PAYLOAD_CSUM_SCTP             = 0x2\n\tNFT_PAYLOAD_L4CSUM_PSEUDOHDR      = 0x1\n\tNFTA_PAYLOAD_UNSPEC               = 0x0\n\tNFTA_PAYLOAD_DREG                 = 0x1\n\tNFTA_PAYLOAD_BASE                 = 0x2\n\tNFTA_PAYLOAD_OFFSET               = 0x3\n\tNFTA_PAYLOAD_LEN                  = 0x4\n\tNFTA_PAYLOAD_SREG                 = 0x5\n\tNFTA_PAYLOAD_CSUM_TYPE            = 0x6\n\tNFTA_PAYLOAD_CSUM_OFFSET          = 0x7\n\tNFTA_PAYLOAD_CSUM_FLAGS           = 0x8\n\tNFT_EXTHDR_F_PRESENT              = 0x1\n\tNFT_EXTHDR_OP_IPV6                = 0x0\n\tNFT_EXTHDR_OP_TCPOPT              = 0x1\n\tNFTA_EXTHDR_UNSPEC                = 0x0\n\tNFTA_EXTHDR_DREG                  = 0x1\n\tNFTA_EXTHDR_TYPE                  = 0x2\n\tNFTA_EXTHDR_OFFSET                = 0x3\n\tNFTA_EXTHDR_LEN                   = 0x4\n\tNFTA_EXTHDR_FLAGS                 = 0x5\n\tNFTA_EXTHDR_OP                    = 0x6\n\tNFTA_EXTHDR_SREG                  = 0x7\n\tNFT_META_LEN                      = 0x0\n\tNFT_META_PROTOCOL                 = 0x1\n\tNFT_META_PRIORITY                 = 0x2\n\tNFT_META_MARK                     = 0x3\n\tNFT_META_IIF                      = 0x4\n\tNFT_META_OIF                      = 0x5\n\tNFT_META_IIFNAME                  = 0x6\n\tNFT_META_OIFNAME                  = 0x7\n\tNFT_META_IIFTYPE                  = 0x8\n\tNFT_META_OIFTYPE                  = 0x9\n\tNFT_META_SKUID                    = 0xa\n\tNFT_META_SKGID                    = 0xb\n\tNFT_META_NFTRACE                  = 0xc\n\tNFT_META_RTCLASSID                = 0xd\n\tNFT_META_SECMARK                  = 0xe\n\tNFT_META_NFPROTO                  = 0xf\n\tNFT_META_L4PROTO                  = 0x10\n\tNFT_META_BRI_IIFNAME              = 0x11\n\tNFT_META_BRI_OIFNAME              = 0x12\n\tNFT_META_PKTTYPE                  = 0x13\n\tNFT_META_CPU                      = 0x14\n\tNFT_META_IIFGROUP                 = 0x15\n\tNFT_META_OIFGROUP                 = 0x16\n\tNFT_META_CGROUP                   = 0x17\n\tNFT_META_PRANDOM                  = 0x18\n\tNFT_RT_CLASSID                    = 0x0\n\tNFT_RT_NEXTHOP4                   = 0x1\n\tNFT_RT_NEXTHOP6                   = 0x2\n\tNFT_RT_TCPMSS                     = 0x3\n\tNFT_HASH_JENKINS                  = 0x0\n\tNFT_HASH_SYM                      = 0x1\n\tNFTA_HASH_UNSPEC                  = 0x0\n\tNFTA_HASH_SREG                    = 0x1\n\tNFTA_HASH_DREG                    = 0x2\n\tNFTA_HASH_LEN                     = 0x3\n\tNFTA_HASH_MODULUS                 = 0x4\n\tNFTA_HASH_SEED                    = 0x5\n\tNFTA_HASH_OFFSET                  = 0x6\n\tNFTA_HASH_TYPE                    = 0x7\n\tNFTA_META_UNSPEC                  = 0x0\n\tNFTA_META_DREG                    = 0x1\n\tNFTA_META_KEY                     = 0x2\n\tNFTA_META_SREG                    = 0x3\n\tNFTA_RT_UNSPEC                    = 0x0\n\tNFTA_RT_DREG                      = 0x1\n\tNFTA_RT_KEY                       = 0x2\n\tNFT_CT_STATE                      = 0x0\n\tNFT_CT_DIRECTION                  = 0x1\n\tNFT_CT_STATUS                     = 0x2\n\tNFT_CT_MARK                       = 0x3\n\tNFT_CT_SECMARK                    = 0x4\n\tNFT_CT_EXPIRATION                 = 0x5\n\tNFT_CT_HELPER                     = 0x6\n\tNFT_CT_L3PROTOCOL                 = 0x7\n\tNFT_CT_SRC                        = 0x8\n\tNFT_CT_DST                        = 0x9\n\tNFT_CT_PROTOCOL                   = 0xa\n\tNFT_CT_PROTO_SRC                  = 0xb\n\tNFT_CT_PROTO_DST                  = 0xc\n\tNFT_CT_LABELS                     = 0xd\n\tNFT_CT_PKTS                       = 0xe\n\tNFT_CT_BYTES                      = 0xf\n\tNFT_CT_AVGPKT                     = 0x10\n\tNFT_CT_ZONE                       = 0x11\n\tNFT_CT_EVENTMASK                  = 0x12\n\tNFT_CT_SRC_IP                     = 0x13\n\tNFT_CT_DST_IP                     = 0x14\n\tNFT_CT_SRC_IP6                    = 0x15\n\tNFT_CT_DST_IP6                    = 0x16\n\tNFT_CT_ID                         = 0x17\n\tNFTA_CT_UNSPEC                    = 0x0\n\tNFTA_CT_DREG                      = 0x1\n\tNFTA_CT_KEY                       = 0x2\n\tNFTA_CT_DIRECTION                 = 0x3\n\tNFTA_CT_SREG                      = 0x4\n\tNFT_LIMIT_PKTS                    = 0x0\n\tNFT_LIMIT_PKT_BYTES               = 0x1\n\tNFT_LIMIT_F_INV                   = 0x1\n\tNFTA_LIMIT_UNSPEC                 = 0x0\n\tNFTA_LIMIT_RATE                   = 0x1\n\tNFTA_LIMIT_UNIT                   = 0x2\n\tNFTA_LIMIT_BURST                  = 0x3\n\tNFTA_LIMIT_TYPE                   = 0x4\n\tNFTA_LIMIT_FLAGS                  = 0x5\n\tNFTA_LIMIT_PAD                    = 0x6\n\tNFTA_COUNTER_UNSPEC               = 0x0\n\tNFTA_COUNTER_BYTES                = 0x1\n\tNFTA_COUNTER_PACKETS              = 0x2\n\tNFTA_COUNTER_PAD                  = 0x3\n\tNFTA_LOG_UNSPEC                   = 0x0\n\tNFTA_LOG_GROUP                    = 0x1\n\tNFTA_LOG_PREFIX                   = 0x2\n\tNFTA_LOG_SNAPLEN                  = 0x3\n\tNFTA_LOG_QTHRESHOLD               = 0x4\n\tNFTA_LOG_LEVEL                    = 0x5\n\tNFTA_LOG_FLAGS                    = 0x6\n\tNFTA_QUEUE_UNSPEC                 = 0x0\n\tNFTA_QUEUE_NUM                    = 0x1\n\tNFTA_QUEUE_TOTAL                  = 0x2\n\tNFTA_QUEUE_FLAGS                  = 0x3\n\tNFTA_QUEUE_SREG_QNUM              = 0x4\n\tNFT_QUOTA_F_INV                   = 0x1\n\tNFT_QUOTA_F_DEPLETED              = 0x2\n\tNFTA_QUOTA_UNSPEC                 = 0x0\n\tNFTA_QUOTA_BYTES                  = 0x1\n\tNFTA_QUOTA_FLAGS                  = 0x2\n\tNFTA_QUOTA_PAD                    = 0x3\n\tNFTA_QUOTA_CONSUMED               = 0x4\n\tNFT_REJECT_ICMP_UNREACH           = 0x0\n\tNFT_REJECT_TCP_RST                = 0x1\n\tNFT_REJECT_ICMPX_UNREACH          = 0x2\n\tNFT_REJECT_ICMPX_NO_ROUTE         = 0x0\n\tNFT_REJECT_ICMPX_PORT_UNREACH     = 0x1\n\tNFT_REJECT_ICMPX_HOST_UNREACH     = 0x2\n\tNFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3\n\tNFTA_REJECT_UNSPEC                = 0x0\n\tNFTA_REJECT_TYPE                  = 0x1\n\tNFTA_REJECT_ICMP_CODE             = 0x2\n\tNFT_NAT_SNAT                      = 0x0\n\tNFT_NAT_DNAT                      = 0x1\n\tNFTA_NAT_UNSPEC                   = 0x0\n\tNFTA_NAT_TYPE                     = 0x1\n\tNFTA_NAT_FAMILY                   = 0x2\n\tNFTA_NAT_REG_ADDR_MIN             = 0x3\n\tNFTA_NAT_REG_ADDR_MAX             = 0x4\n\tNFTA_NAT_REG_PROTO_MIN            = 0x5\n\tNFTA_NAT_REG_PROTO_MAX            = 0x6\n\tNFTA_NAT_FLAGS                    = 0x7\n\tNFTA_MASQ_UNSPEC                  = 0x0\n\tNFTA_MASQ_FLAGS                   = 0x1\n\tNFTA_MASQ_REG_PROTO_MIN           = 0x2\n\tNFTA_MASQ_REG_PROTO_MAX           = 0x3\n\tNFTA_REDIR_UNSPEC                 = 0x0\n\tNFTA_REDIR_REG_PROTO_MIN          = 0x1\n\tNFTA_REDIR_REG_PROTO_MAX          = 0x2\n\tNFTA_REDIR_FLAGS                  = 0x3\n\tNFTA_DUP_UNSPEC                   = 0x0\n\tNFTA_DUP_SREG_ADDR                = 0x1\n\tNFTA_DUP_SREG_DEV                 = 0x2\n\tNFTA_FWD_UNSPEC                   = 0x0\n\tNFTA_FWD_SREG_DEV                 = 0x1\n\tNFTA_OBJREF_UNSPEC                = 0x0\n\tNFTA_OBJREF_IMM_TYPE              = 0x1\n\tNFTA_OBJREF_IMM_NAME              = 0x2\n\tNFTA_OBJREF_SET_SREG              = 0x3\n\tNFTA_OBJREF_SET_NAME              = 0x4\n\tNFTA_OBJREF_SET_ID                = 0x5\n\tNFTA_GEN_UNSPEC                   = 0x0\n\tNFTA_GEN_ID                       = 0x1\n\tNFTA_GEN_PROC_PID                 = 0x2\n\tNFTA_GEN_PROC_NAME                = 0x3\n\tNFTA_FIB_UNSPEC                   = 0x0\n\tNFTA_FIB_DREG                     = 0x1\n\tNFTA_FIB_RESULT                   = 0x2\n\tNFTA_FIB_FLAGS                    = 0x3\n\tNFT_FIB_RESULT_UNSPEC             = 0x0\n\tNFT_FIB_RESULT_OIF                = 0x1\n\tNFT_FIB_RESULT_OIFNAME            = 0x2\n\tNFT_FIB_RESULT_ADDRTYPE           = 0x3\n\tNFTA_FIB_F_SADDR                  = 0x1\n\tNFTA_FIB_F_DADDR                  = 0x2\n\tNFTA_FIB_F_MARK                   = 0x4\n\tNFTA_FIB_F_IIF                    = 0x8\n\tNFTA_FIB_F_OIF                    = 0x10\n\tNFTA_FIB_F_PRESENT                = 0x20\n\tNFTA_CT_HELPER_UNSPEC             = 0x0\n\tNFTA_CT_HELPER_NAME               = 0x1\n\tNFTA_CT_HELPER_L3PROTO            = 0x2\n\tNFTA_CT_HELPER_L4PROTO            = 0x3\n\tNFTA_OBJ_UNSPEC                   = 0x0\n\tNFTA_OBJ_TABLE                    = 0x1\n\tNFTA_OBJ_NAME                     = 0x2\n\tNFTA_OBJ_TYPE                     = 0x3\n\tNFTA_OBJ_DATA                     = 0x4\n\tNFTA_OBJ_USE                      = 0x5\n\tNFTA_TRACE_UNSPEC                 = 0x0\n\tNFTA_TRACE_TABLE                  = 0x1\n\tNFTA_TRACE_CHAIN                  = 0x2\n\tNFTA_TRACE_RULE_HANDLE            = 0x3\n\tNFTA_TRACE_TYPE                   = 0x4\n\tNFTA_TRACE_VERDICT                = 0x5\n\tNFTA_TRACE_ID                     = 0x6\n\tNFTA_TRACE_LL_HEADER              = 0x7\n\tNFTA_TRACE_NETWORK_HEADER         = 0x8\n\tNFTA_TRACE_TRANSPORT_HEADER       = 0x9\n\tNFTA_TRACE_IIF                    = 0xa\n\tNFTA_TRACE_IIFTYPE                = 0xb\n\tNFTA_TRACE_OIF                    = 0xc\n\tNFTA_TRACE_OIFTYPE                = 0xd\n\tNFTA_TRACE_MARK                   = 0xe\n\tNFTA_TRACE_NFPROTO                = 0xf\n\tNFTA_TRACE_POLICY                 = 0x10\n\tNFTA_TRACE_PAD                    = 0x11\n\tNFT_TRACETYPE_UNSPEC              = 0x0\n\tNFT_TRACETYPE_POLICY              = 0x1\n\tNFT_TRACETYPE_RETURN              = 0x2\n\tNFT_TRACETYPE_RULE                = 0x3\n\tNFTA_NG_UNSPEC                    = 0x0\n\tNFTA_NG_DREG                      = 0x1\n\tNFTA_NG_MODULUS                   = 0x2\n\tNFTA_NG_TYPE                      = 0x3\n\tNFTA_NG_OFFSET                    = 0x4\n\tNFT_NG_INCREMENTAL                = 0x0\n\tNFT_NG_RANDOM                     = 0x1\n)\n\nconst (\n\tNFTA_TARGET_UNSPEC = 0x0\n\tNFTA_TARGET_NAME   = 0x1\n\tNFTA_TARGET_REV    = 0x2\n\tNFTA_TARGET_INFO   = 0x3\n\tNFTA_MATCH_UNSPEC  = 0x0\n\tNFTA_MATCH_NAME    = 0x1\n\tNFTA_MATCH_REV     = 0x2\n\tNFTA_MATCH_INFO    = 0x3\n\tNFTA_COMPAT_UNSPEC = 0x0\n\tNFTA_COMPAT_NAME   = 0x1\n\tNFTA_COMPAT_REV    = 0x2\n\tNFTA_COMPAT_TYPE   = 0x3\n)\n\ntype RTCTime struct {\n\tSec   int32\n\tMin   int32\n\tHour  int32\n\tMday  int32\n\tMon   int32\n\tYear  int32\n\tWday  int32\n\tYday  int32\n\tIsdst int32\n}\n\ntype RTCWkAlrm struct {\n\tEnabled uint8\n\tPending uint8\n\tTime    RTCTime\n}\n\ntype BlkpgIoctlArg struct {\n\tOp      int32\n\tFlags   int32\n\tDatalen int32\n\tData    *byte\n}\n\nconst (\n\tBLKPG_ADD_PARTITION    = 0x1\n\tBLKPG_DEL_PARTITION    = 0x2\n\tBLKPG_RESIZE_PARTITION = 0x3\n)\n\nconst (\n\tNETNSA_NONE         = 0x0\n\tNETNSA_NSID         = 0x1\n\tNETNSA_PID          = 0x2\n\tNETNSA_FD           = 0x3\n\tNETNSA_TARGET_NSID  = 0x4\n\tNETNSA_CURRENT_NSID = 0x5\n)\n\ntype XDPRingOffset struct {\n\tProducer uint64\n\tConsumer uint64\n\tDesc     uint64\n\tFlags    uint64\n}\n\ntype XDPMmapOffsets struct {\n\tRx XDPRingOffset\n\tTx XDPRingOffset\n\tFr XDPRingOffset\n\tCr XDPRingOffset\n}\n\ntype XDPUmemReg struct {\n\tAddr            uint64\n\tLen             uint64\n\tSize            uint32\n\tHeadroom        uint32\n\tFlags           uint32\n\tTx_metadata_len uint32\n}\n\ntype XDPStatistics struct {\n\tRx_dropped               uint64\n\tRx_invalid_descs         uint64\n\tTx_invalid_descs         uint64\n\tRx_ring_full             uint64\n\tRx_fill_ring_empty_descs uint64\n\tTx_ring_empty_descs      uint64\n}\n\ntype XDPDesc struct {\n\tAddr    uint64\n\tLen     uint32\n\tOptions uint32\n}\n\nconst (\n\tNCSI_CMD_UNSPEC                 = 0x0\n\tNCSI_CMD_PKG_INFO               = 0x1\n\tNCSI_CMD_SET_INTERFACE          = 0x2\n\tNCSI_CMD_CLEAR_INTERFACE        = 0x3\n\tNCSI_ATTR_UNSPEC                = 0x0\n\tNCSI_ATTR_IFINDEX               = 0x1\n\tNCSI_ATTR_PACKAGE_LIST          = 0x2\n\tNCSI_ATTR_PACKAGE_ID            = 0x3\n\tNCSI_ATTR_CHANNEL_ID            = 0x4\n\tNCSI_PKG_ATTR_UNSPEC            = 0x0\n\tNCSI_PKG_ATTR                   = 0x1\n\tNCSI_PKG_ATTR_ID                = 0x2\n\tNCSI_PKG_ATTR_FORCED            = 0x3\n\tNCSI_PKG_ATTR_CHANNEL_LIST      = 0x4\n\tNCSI_CHANNEL_ATTR_UNSPEC        = 0x0\n\tNCSI_CHANNEL_ATTR               = 0x1\n\tNCSI_CHANNEL_ATTR_ID            = 0x2\n\tNCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3\n\tNCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4\n\tNCSI_CHANNEL_ATTR_VERSION_STR   = 0x5\n\tNCSI_CHANNEL_ATTR_LINK_STATE    = 0x6\n\tNCSI_CHANNEL_ATTR_ACTIVE        = 0x7\n\tNCSI_CHANNEL_ATTR_FORCED        = 0x8\n\tNCSI_CHANNEL_ATTR_VLAN_LIST     = 0x9\n\tNCSI_CHANNEL_ATTR_VLAN_ID       = 0xa\n)\n\ntype ScmTimestamping struct {\n\tTs [3]Timespec\n}\n\nconst (\n\tSOF_TIMESTAMPING_TX_HARDWARE  = 0x1\n\tSOF_TIMESTAMPING_TX_SOFTWARE  = 0x2\n\tSOF_TIMESTAMPING_RX_HARDWARE  = 0x4\n\tSOF_TIMESTAMPING_RX_SOFTWARE  = 0x8\n\tSOF_TIMESTAMPING_SOFTWARE     = 0x10\n\tSOF_TIMESTAMPING_SYS_HARDWARE = 0x20\n\tSOF_TIMESTAMPING_RAW_HARDWARE = 0x40\n\tSOF_TIMESTAMPING_OPT_ID       = 0x80\n\tSOF_TIMESTAMPING_TX_SCHED     = 0x100\n\tSOF_TIMESTAMPING_TX_ACK       = 0x200\n\tSOF_TIMESTAMPING_OPT_CMSG     = 0x400\n\tSOF_TIMESTAMPING_OPT_TSONLY   = 0x800\n\tSOF_TIMESTAMPING_OPT_STATS    = 0x1000\n\tSOF_TIMESTAMPING_OPT_PKTINFO  = 0x2000\n\tSOF_TIMESTAMPING_OPT_TX_SWHW  = 0x4000\n\tSOF_TIMESTAMPING_BIND_PHC     = 0x8000\n\tSOF_TIMESTAMPING_OPT_ID_TCP   = 0x10000\n\n\tSOF_TIMESTAMPING_LAST = 0x40000\n\tSOF_TIMESTAMPING_MASK = 0x7ffff\n\n\tSCM_TSTAMP_SND   = 0x0\n\tSCM_TSTAMP_SCHED = 0x1\n\tSCM_TSTAMP_ACK   = 0x2\n)\n\ntype SockExtendedErr struct {\n\tErrno  uint32\n\tOrigin uint8\n\tType   uint8\n\tCode   uint8\n\tPad    uint8\n\tInfo   uint32\n\tData   uint32\n}\n\ntype FanotifyEventMetadata struct {\n\tEvent_len    uint32\n\tVers         uint8\n\tReserved     uint8\n\tMetadata_len uint16\n\tMask         uint64\n\tFd           int32\n\tPid          int32\n}\n\ntype FanotifyResponse struct {\n\tFd       int32\n\tResponse uint32\n}\n\nconst (\n\tCRYPTO_MSG_BASE      = 0x10\n\tCRYPTO_MSG_NEWALG    = 0x10\n\tCRYPTO_MSG_DELALG    = 0x11\n\tCRYPTO_MSG_UPDATEALG = 0x12\n\tCRYPTO_MSG_GETALG    = 0x13\n\tCRYPTO_MSG_DELRNG    = 0x14\n\tCRYPTO_MSG_GETSTAT   = 0x15\n)\n\nconst (\n\tCRYPTOCFGA_UNSPEC           = 0x0\n\tCRYPTOCFGA_PRIORITY_VAL     = 0x1\n\tCRYPTOCFGA_REPORT_LARVAL    = 0x2\n\tCRYPTOCFGA_REPORT_HASH      = 0x3\n\tCRYPTOCFGA_REPORT_BLKCIPHER = 0x4\n\tCRYPTOCFGA_REPORT_AEAD      = 0x5\n\tCRYPTOCFGA_REPORT_COMPRESS  = 0x6\n\tCRYPTOCFGA_REPORT_RNG       = 0x7\n\tCRYPTOCFGA_REPORT_CIPHER    = 0x8\n\tCRYPTOCFGA_REPORT_AKCIPHER  = 0x9\n\tCRYPTOCFGA_REPORT_KPP       = 0xa\n\tCRYPTOCFGA_REPORT_ACOMP     = 0xb\n\tCRYPTOCFGA_STAT_LARVAL      = 0xc\n\tCRYPTOCFGA_STAT_HASH        = 0xd\n\tCRYPTOCFGA_STAT_BLKCIPHER   = 0xe\n\tCRYPTOCFGA_STAT_AEAD        = 0xf\n\tCRYPTOCFGA_STAT_COMPRESS    = 0x10\n\tCRYPTOCFGA_STAT_RNG         = 0x11\n\tCRYPTOCFGA_STAT_CIPHER      = 0x12\n\tCRYPTOCFGA_STAT_AKCIPHER    = 0x13\n\tCRYPTOCFGA_STAT_KPP         = 0x14\n\tCRYPTOCFGA_STAT_ACOMP       = 0x15\n)\n\nconst (\n\tBPF_REG_0                                  = 0x0\n\tBPF_REG_1                                  = 0x1\n\tBPF_REG_2                                  = 0x2\n\tBPF_REG_3                                  = 0x3\n\tBPF_REG_4                                  = 0x4\n\tBPF_REG_5                                  = 0x5\n\tBPF_REG_6                                  = 0x6\n\tBPF_REG_7                                  = 0x7\n\tBPF_REG_8                                  = 0x8\n\tBPF_REG_9                                  = 0x9\n\tBPF_REG_10                                 = 0xa\n\tBPF_CGROUP_ITER_ORDER_UNSPEC               = 0x0\n\tBPF_CGROUP_ITER_SELF_ONLY                  = 0x1\n\tBPF_CGROUP_ITER_DESCENDANTS_PRE            = 0x2\n\tBPF_CGROUP_ITER_DESCENDANTS_POST           = 0x3\n\tBPF_CGROUP_ITER_ANCESTORS_UP               = 0x4\n\tBPF_MAP_CREATE                             = 0x0\n\tBPF_MAP_LOOKUP_ELEM                        = 0x1\n\tBPF_MAP_UPDATE_ELEM                        = 0x2\n\tBPF_MAP_DELETE_ELEM                        = 0x3\n\tBPF_MAP_GET_NEXT_KEY                       = 0x4\n\tBPF_PROG_LOAD                              = 0x5\n\tBPF_OBJ_PIN                                = 0x6\n\tBPF_OBJ_GET                                = 0x7\n\tBPF_PROG_ATTACH                            = 0x8\n\tBPF_PROG_DETACH                            = 0x9\n\tBPF_PROG_TEST_RUN                          = 0xa\n\tBPF_PROG_RUN                               = 0xa\n\tBPF_PROG_GET_NEXT_ID                       = 0xb\n\tBPF_MAP_GET_NEXT_ID                        = 0xc\n\tBPF_PROG_GET_FD_BY_ID                      = 0xd\n\tBPF_MAP_GET_FD_BY_ID                       = 0xe\n\tBPF_OBJ_GET_INFO_BY_FD                     = 0xf\n\tBPF_PROG_QUERY                             = 0x10\n\tBPF_RAW_TRACEPOINT_OPEN                    = 0x11\n\tBPF_BTF_LOAD                               = 0x12\n\tBPF_BTF_GET_FD_BY_ID                       = 0x13\n\tBPF_TASK_FD_QUERY                          = 0x14\n\tBPF_MAP_LOOKUP_AND_DELETE_ELEM             = 0x15\n\tBPF_MAP_FREEZE                             = 0x16\n\tBPF_BTF_GET_NEXT_ID                        = 0x17\n\tBPF_MAP_LOOKUP_BATCH                       = 0x18\n\tBPF_MAP_LOOKUP_AND_DELETE_BATCH            = 0x19\n\tBPF_MAP_UPDATE_BATCH                       = 0x1a\n\tBPF_MAP_DELETE_BATCH                       = 0x1b\n\tBPF_LINK_CREATE                            = 0x1c\n\tBPF_LINK_UPDATE                            = 0x1d\n\tBPF_LINK_GET_FD_BY_ID                      = 0x1e\n\tBPF_LINK_GET_NEXT_ID                       = 0x1f\n\tBPF_ENABLE_STATS                           = 0x20\n\tBPF_ITER_CREATE                            = 0x21\n\tBPF_LINK_DETACH                            = 0x22\n\tBPF_PROG_BIND_MAP                          = 0x23\n\tBPF_MAP_TYPE_UNSPEC                        = 0x0\n\tBPF_MAP_TYPE_HASH                          = 0x1\n\tBPF_MAP_TYPE_ARRAY                         = 0x2\n\tBPF_MAP_TYPE_PROG_ARRAY                    = 0x3\n\tBPF_MAP_TYPE_PERF_EVENT_ARRAY              = 0x4\n\tBPF_MAP_TYPE_PERCPU_HASH                   = 0x5\n\tBPF_MAP_TYPE_PERCPU_ARRAY                  = 0x6\n\tBPF_MAP_TYPE_STACK_TRACE                   = 0x7\n\tBPF_MAP_TYPE_CGROUP_ARRAY                  = 0x8\n\tBPF_MAP_TYPE_LRU_HASH                      = 0x9\n\tBPF_MAP_TYPE_LRU_PERCPU_HASH               = 0xa\n\tBPF_MAP_TYPE_LPM_TRIE                      = 0xb\n\tBPF_MAP_TYPE_ARRAY_OF_MAPS                 = 0xc\n\tBPF_MAP_TYPE_HASH_OF_MAPS                  = 0xd\n\tBPF_MAP_TYPE_DEVMAP                        = 0xe\n\tBPF_MAP_TYPE_SOCKMAP                       = 0xf\n\tBPF_MAP_TYPE_CPUMAP                        = 0x10\n\tBPF_MAP_TYPE_XSKMAP                        = 0x11\n\tBPF_MAP_TYPE_SOCKHASH                      = 0x12\n\tBPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED     = 0x13\n\tBPF_MAP_TYPE_CGROUP_STORAGE                = 0x13\n\tBPF_MAP_TYPE_REUSEPORT_SOCKARRAY           = 0x14\n\tBPF_MAP_TYPE_PERCPU_CGROUP_STORAGE         = 0x15\n\tBPF_MAP_TYPE_QUEUE                         = 0x16\n\tBPF_MAP_TYPE_STACK                         = 0x17\n\tBPF_MAP_TYPE_SK_STORAGE                    = 0x18\n\tBPF_MAP_TYPE_DEVMAP_HASH                   = 0x19\n\tBPF_MAP_TYPE_STRUCT_OPS                    = 0x1a\n\tBPF_MAP_TYPE_RINGBUF                       = 0x1b\n\tBPF_MAP_TYPE_INODE_STORAGE                 = 0x1c\n\tBPF_MAP_TYPE_TASK_STORAGE                  = 0x1d\n\tBPF_MAP_TYPE_BLOOM_FILTER                  = 0x1e\n\tBPF_MAP_TYPE_USER_RINGBUF                  = 0x1f\n\tBPF_MAP_TYPE_CGRP_STORAGE                  = 0x20\n\tBPF_PROG_TYPE_UNSPEC                       = 0x0\n\tBPF_PROG_TYPE_SOCKET_FILTER                = 0x1\n\tBPF_PROG_TYPE_KPROBE                       = 0x2\n\tBPF_PROG_TYPE_SCHED_CLS                    = 0x3\n\tBPF_PROG_TYPE_SCHED_ACT                    = 0x4\n\tBPF_PROG_TYPE_TRACEPOINT                   = 0x5\n\tBPF_PROG_TYPE_XDP                          = 0x6\n\tBPF_PROG_TYPE_PERF_EVENT                   = 0x7\n\tBPF_PROG_TYPE_CGROUP_SKB                   = 0x8\n\tBPF_PROG_TYPE_CGROUP_SOCK                  = 0x9\n\tBPF_PROG_TYPE_LWT_IN                       = 0xa\n\tBPF_PROG_TYPE_LWT_OUT                      = 0xb\n\tBPF_PROG_TYPE_LWT_XMIT                     = 0xc\n\tBPF_PROG_TYPE_SOCK_OPS                     = 0xd\n\tBPF_PROG_TYPE_SK_SKB                       = 0xe\n\tBPF_PROG_TYPE_CGROUP_DEVICE                = 0xf\n\tBPF_PROG_TYPE_SK_MSG                       = 0x10\n\tBPF_PROG_TYPE_RAW_TRACEPOINT               = 0x11\n\tBPF_PROG_TYPE_CGROUP_SOCK_ADDR             = 0x12\n\tBPF_PROG_TYPE_LWT_SEG6LOCAL                = 0x13\n\tBPF_PROG_TYPE_LIRC_MODE2                   = 0x14\n\tBPF_PROG_TYPE_SK_REUSEPORT                 = 0x15\n\tBPF_PROG_TYPE_FLOW_DISSECTOR               = 0x16\n\tBPF_PROG_TYPE_CGROUP_SYSCTL                = 0x17\n\tBPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE      = 0x18\n\tBPF_PROG_TYPE_CGROUP_SOCKOPT               = 0x19\n\tBPF_PROG_TYPE_TRACING                      = 0x1a\n\tBPF_PROG_TYPE_STRUCT_OPS                   = 0x1b\n\tBPF_PROG_TYPE_EXT                          = 0x1c\n\tBPF_PROG_TYPE_LSM                          = 0x1d\n\tBPF_PROG_TYPE_SK_LOOKUP                    = 0x1e\n\tBPF_PROG_TYPE_SYSCALL                      = 0x1f\n\tBPF_PROG_TYPE_NETFILTER                    = 0x20\n\tBPF_CGROUP_INET_INGRESS                    = 0x0\n\tBPF_CGROUP_INET_EGRESS                     = 0x1\n\tBPF_CGROUP_INET_SOCK_CREATE                = 0x2\n\tBPF_CGROUP_SOCK_OPS                        = 0x3\n\tBPF_SK_SKB_STREAM_PARSER                   = 0x4\n\tBPF_SK_SKB_STREAM_VERDICT                  = 0x5\n\tBPF_CGROUP_DEVICE                          = 0x6\n\tBPF_SK_MSG_VERDICT                         = 0x7\n\tBPF_CGROUP_INET4_BIND                      = 0x8\n\tBPF_CGROUP_INET6_BIND                      = 0x9\n\tBPF_CGROUP_INET4_CONNECT                   = 0xa\n\tBPF_CGROUP_INET6_CONNECT                   = 0xb\n\tBPF_CGROUP_INET4_POST_BIND                 = 0xc\n\tBPF_CGROUP_INET6_POST_BIND                 = 0xd\n\tBPF_CGROUP_UDP4_SENDMSG                    = 0xe\n\tBPF_CGROUP_UDP6_SENDMSG                    = 0xf\n\tBPF_LIRC_MODE2                             = 0x10\n\tBPF_FLOW_DISSECTOR                         = 0x11\n\tBPF_CGROUP_SYSCTL                          = 0x12\n\tBPF_CGROUP_UDP4_RECVMSG                    = 0x13\n\tBPF_CGROUP_UDP6_RECVMSG                    = 0x14\n\tBPF_CGROUP_GETSOCKOPT                      = 0x15\n\tBPF_CGROUP_SETSOCKOPT                      = 0x16\n\tBPF_TRACE_RAW_TP                           = 0x17\n\tBPF_TRACE_FENTRY                           = 0x18\n\tBPF_TRACE_FEXIT                            = 0x19\n\tBPF_MODIFY_RETURN                          = 0x1a\n\tBPF_LSM_MAC                                = 0x1b\n\tBPF_TRACE_ITER                             = 0x1c\n\tBPF_CGROUP_INET4_GETPEERNAME               = 0x1d\n\tBPF_CGROUP_INET6_GETPEERNAME               = 0x1e\n\tBPF_CGROUP_INET4_GETSOCKNAME               = 0x1f\n\tBPF_CGROUP_INET6_GETSOCKNAME               = 0x20\n\tBPF_XDP_DEVMAP                             = 0x21\n\tBPF_CGROUP_INET_SOCK_RELEASE               = 0x22\n\tBPF_XDP_CPUMAP                             = 0x23\n\tBPF_SK_LOOKUP                              = 0x24\n\tBPF_XDP                                    = 0x25\n\tBPF_SK_SKB_VERDICT                         = 0x26\n\tBPF_SK_REUSEPORT_SELECT                    = 0x27\n\tBPF_SK_REUSEPORT_SELECT_OR_MIGRATE         = 0x28\n\tBPF_PERF_EVENT                             = 0x29\n\tBPF_TRACE_KPROBE_MULTI                     = 0x2a\n\tBPF_LSM_CGROUP                             = 0x2b\n\tBPF_STRUCT_OPS                             = 0x2c\n\tBPF_NETFILTER                              = 0x2d\n\tBPF_TCX_INGRESS                            = 0x2e\n\tBPF_TCX_EGRESS                             = 0x2f\n\tBPF_TRACE_UPROBE_MULTI                     = 0x30\n\tBPF_LINK_TYPE_UNSPEC                       = 0x0\n\tBPF_LINK_TYPE_RAW_TRACEPOINT               = 0x1\n\tBPF_LINK_TYPE_TRACING                      = 0x2\n\tBPF_LINK_TYPE_CGROUP                       = 0x3\n\tBPF_LINK_TYPE_ITER                         = 0x4\n\tBPF_LINK_TYPE_NETNS                        = 0x5\n\tBPF_LINK_TYPE_XDP                          = 0x6\n\tBPF_LINK_TYPE_PERF_EVENT                   = 0x7\n\tBPF_LINK_TYPE_KPROBE_MULTI                 = 0x8\n\tBPF_LINK_TYPE_STRUCT_OPS                   = 0x9\n\tBPF_LINK_TYPE_NETFILTER                    = 0xa\n\tBPF_LINK_TYPE_TCX                          = 0xb\n\tBPF_LINK_TYPE_UPROBE_MULTI                 = 0xc\n\tBPF_PERF_EVENT_UNSPEC                      = 0x0\n\tBPF_PERF_EVENT_UPROBE                      = 0x1\n\tBPF_PERF_EVENT_URETPROBE                   = 0x2\n\tBPF_PERF_EVENT_KPROBE                      = 0x3\n\tBPF_PERF_EVENT_KRETPROBE                   = 0x4\n\tBPF_PERF_EVENT_TRACEPOINT                  = 0x5\n\tBPF_PERF_EVENT_EVENT                       = 0x6\n\tBPF_F_KPROBE_MULTI_RETURN                  = 0x1\n\tBPF_F_UPROBE_MULTI_RETURN                  = 0x1\n\tBPF_ANY                                    = 0x0\n\tBPF_NOEXIST                                = 0x1\n\tBPF_EXIST                                  = 0x2\n\tBPF_F_LOCK                                 = 0x4\n\tBPF_F_NO_PREALLOC                          = 0x1\n\tBPF_F_NO_COMMON_LRU                        = 0x2\n\tBPF_F_NUMA_NODE                            = 0x4\n\tBPF_F_RDONLY                               = 0x8\n\tBPF_F_WRONLY                               = 0x10\n\tBPF_F_STACK_BUILD_ID                       = 0x20\n\tBPF_F_ZERO_SEED                            = 0x40\n\tBPF_F_RDONLY_PROG                          = 0x80\n\tBPF_F_WRONLY_PROG                          = 0x100\n\tBPF_F_CLONE                                = 0x200\n\tBPF_F_MMAPABLE                             = 0x400\n\tBPF_F_PRESERVE_ELEMS                       = 0x800\n\tBPF_F_INNER_MAP                            = 0x1000\n\tBPF_F_LINK                                 = 0x2000\n\tBPF_F_PATH_FD                              = 0x4000\n\tBPF_STATS_RUN_TIME                         = 0x0\n\tBPF_STACK_BUILD_ID_EMPTY                   = 0x0\n\tBPF_STACK_BUILD_ID_VALID                   = 0x1\n\tBPF_STACK_BUILD_ID_IP                      = 0x2\n\tBPF_F_RECOMPUTE_CSUM                       = 0x1\n\tBPF_F_INVALIDATE_HASH                      = 0x2\n\tBPF_F_HDR_FIELD_MASK                       = 0xf\n\tBPF_F_PSEUDO_HDR                           = 0x10\n\tBPF_F_MARK_MANGLED_0                       = 0x20\n\tBPF_F_MARK_ENFORCE                         = 0x40\n\tBPF_F_INGRESS                              = 0x1\n\tBPF_F_TUNINFO_IPV6                         = 0x1\n\tBPF_F_SKIP_FIELD_MASK                      = 0xff\n\tBPF_F_USER_STACK                           = 0x100\n\tBPF_F_FAST_STACK_CMP                       = 0x200\n\tBPF_F_REUSE_STACKID                        = 0x400\n\tBPF_F_USER_BUILD_ID                        = 0x800\n\tBPF_F_ZERO_CSUM_TX                         = 0x2\n\tBPF_F_DONT_FRAGMENT                        = 0x4\n\tBPF_F_SEQ_NUMBER                           = 0x8\n\tBPF_F_NO_TUNNEL_KEY                        = 0x10\n\tBPF_F_TUNINFO_FLAGS                        = 0x10\n\tBPF_F_INDEX_MASK                           = 0xffffffff\n\tBPF_F_CURRENT_CPU                          = 0xffffffff\n\tBPF_F_CTXLEN_MASK                          = 0xfffff00000000\n\tBPF_F_CURRENT_NETNS                        = -0x1\n\tBPF_CSUM_LEVEL_QUERY                       = 0x0\n\tBPF_CSUM_LEVEL_INC                         = 0x1\n\tBPF_CSUM_LEVEL_DEC                         = 0x2\n\tBPF_CSUM_LEVEL_RESET                       = 0x3\n\tBPF_F_ADJ_ROOM_FIXED_GSO                   = 0x1\n\tBPF_F_ADJ_ROOM_ENCAP_L3_IPV4               = 0x2\n\tBPF_F_ADJ_ROOM_ENCAP_L3_IPV6               = 0x4\n\tBPF_F_ADJ_ROOM_ENCAP_L4_GRE                = 0x8\n\tBPF_F_ADJ_ROOM_ENCAP_L4_UDP                = 0x10\n\tBPF_F_ADJ_ROOM_NO_CSUM_RESET               = 0x20\n\tBPF_F_ADJ_ROOM_ENCAP_L2_ETH                = 0x40\n\tBPF_F_ADJ_ROOM_DECAP_L3_IPV4               = 0x80\n\tBPF_F_ADJ_ROOM_DECAP_L3_IPV6               = 0x100\n\tBPF_ADJ_ROOM_ENCAP_L2_MASK                 = 0xff\n\tBPF_ADJ_ROOM_ENCAP_L2_SHIFT                = 0x38\n\tBPF_F_SYSCTL_BASE_NAME                     = 0x1\n\tBPF_LOCAL_STORAGE_GET_F_CREATE             = 0x1\n\tBPF_SK_STORAGE_GET_F_CREATE                = 0x1\n\tBPF_F_GET_BRANCH_RECORDS_SIZE              = 0x1\n\tBPF_RB_NO_WAKEUP                           = 0x1\n\tBPF_RB_FORCE_WAKEUP                        = 0x2\n\tBPF_RB_AVAIL_DATA                          = 0x0\n\tBPF_RB_RING_SIZE                           = 0x1\n\tBPF_RB_CONS_POS                            = 0x2\n\tBPF_RB_PROD_POS                            = 0x3\n\tBPF_RINGBUF_BUSY_BIT                       = 0x80000000\n\tBPF_RINGBUF_DISCARD_BIT                    = 0x40000000\n\tBPF_RINGBUF_HDR_SZ                         = 0x8\n\tBPF_SK_LOOKUP_F_REPLACE                    = 0x1\n\tBPF_SK_LOOKUP_F_NO_REUSEPORT               = 0x2\n\tBPF_ADJ_ROOM_NET                           = 0x0\n\tBPF_ADJ_ROOM_MAC                           = 0x1\n\tBPF_HDR_START_MAC                          = 0x0\n\tBPF_HDR_START_NET                          = 0x1\n\tBPF_LWT_ENCAP_SEG6                         = 0x0\n\tBPF_LWT_ENCAP_SEG6_INLINE                  = 0x1\n\tBPF_LWT_ENCAP_IP                           = 0x2\n\tBPF_F_BPRM_SECUREEXEC                      = 0x1\n\tBPF_F_BROADCAST                            = 0x8\n\tBPF_F_EXCLUDE_INGRESS                      = 0x10\n\tBPF_SKB_TSTAMP_UNSPEC                      = 0x0\n\tBPF_SKB_TSTAMP_DELIVERY_MONO               = 0x1\n\tBPF_OK                                     = 0x0\n\tBPF_DROP                                   = 0x2\n\tBPF_REDIRECT                               = 0x7\n\tBPF_LWT_REROUTE                            = 0x80\n\tBPF_FLOW_DISSECTOR_CONTINUE                = 0x81\n\tBPF_SOCK_OPS_RTO_CB_FLAG                   = 0x1\n\tBPF_SOCK_OPS_RETRANS_CB_FLAG               = 0x2\n\tBPF_SOCK_OPS_STATE_CB_FLAG                 = 0x4\n\tBPF_SOCK_OPS_RTT_CB_FLAG                   = 0x8\n\tBPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG     = 0x10\n\tBPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 0x20\n\tBPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG         = 0x40\n\tBPF_SOCK_OPS_ALL_CB_FLAGS                  = 0x7f\n\tBPF_SOCK_OPS_VOID                          = 0x0\n\tBPF_SOCK_OPS_TIMEOUT_INIT                  = 0x1\n\tBPF_SOCK_OPS_RWND_INIT                     = 0x2\n\tBPF_SOCK_OPS_TCP_CONNECT_CB                = 0x3\n\tBPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB         = 0x4\n\tBPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB        = 0x5\n\tBPF_SOCK_OPS_NEEDS_ECN                     = 0x6\n\tBPF_SOCK_OPS_BASE_RTT                      = 0x7\n\tBPF_SOCK_OPS_RTO_CB                        = 0x8\n\tBPF_SOCK_OPS_RETRANS_CB                    = 0x9\n\tBPF_SOCK_OPS_STATE_CB                      = 0xa\n\tBPF_SOCK_OPS_TCP_LISTEN_CB                 = 0xb\n\tBPF_SOCK_OPS_RTT_CB                        = 0xc\n\tBPF_SOCK_OPS_PARSE_HDR_OPT_CB              = 0xd\n\tBPF_SOCK_OPS_HDR_OPT_LEN_CB                = 0xe\n\tBPF_SOCK_OPS_WRITE_HDR_OPT_CB              = 0xf\n\tBPF_TCP_ESTABLISHED                        = 0x1\n\tBPF_TCP_SYN_SENT                           = 0x2\n\tBPF_TCP_SYN_RECV                           = 0x3\n\tBPF_TCP_FIN_WAIT1                          = 0x4\n\tBPF_TCP_FIN_WAIT2                          = 0x5\n\tBPF_TCP_TIME_WAIT                          = 0x6\n\tBPF_TCP_CLOSE                              = 0x7\n\tBPF_TCP_CLOSE_WAIT                         = 0x8\n\tBPF_TCP_LAST_ACK                           = 0x9\n\tBPF_TCP_LISTEN                             = 0xa\n\tBPF_TCP_CLOSING                            = 0xb\n\tBPF_TCP_NEW_SYN_RECV                       = 0xc\n\tBPF_TCP_MAX_STATES                         = 0xe\n\tTCP_BPF_IW                                 = 0x3e9\n\tTCP_BPF_SNDCWND_CLAMP                      = 0x3ea\n\tTCP_BPF_DELACK_MAX                         = 0x3eb\n\tTCP_BPF_RTO_MIN                            = 0x3ec\n\tTCP_BPF_SYN                                = 0x3ed\n\tTCP_BPF_SYN_IP                             = 0x3ee\n\tTCP_BPF_SYN_MAC                            = 0x3ef\n\tBPF_LOAD_HDR_OPT_TCP_SYN                   = 0x1\n\tBPF_WRITE_HDR_TCP_CURRENT_MSS              = 0x1\n\tBPF_WRITE_HDR_TCP_SYNACK_COOKIE            = 0x2\n\tBPF_DEVCG_ACC_MKNOD                        = 0x1\n\tBPF_DEVCG_ACC_READ                         = 0x2\n\tBPF_DEVCG_ACC_WRITE                        = 0x4\n\tBPF_DEVCG_DEV_BLOCK                        = 0x1\n\tBPF_DEVCG_DEV_CHAR                         = 0x2\n\tBPF_FIB_LOOKUP_DIRECT                      = 0x1\n\tBPF_FIB_LOOKUP_OUTPUT                      = 0x2\n\tBPF_FIB_LOOKUP_SKIP_NEIGH                  = 0x4\n\tBPF_FIB_LOOKUP_TBID                        = 0x8\n\tBPF_FIB_LKUP_RET_SUCCESS                   = 0x0\n\tBPF_FIB_LKUP_RET_BLACKHOLE                 = 0x1\n\tBPF_FIB_LKUP_RET_UNREACHABLE               = 0x2\n\tBPF_FIB_LKUP_RET_PROHIBIT                  = 0x3\n\tBPF_FIB_LKUP_RET_NOT_FWDED                 = 0x4\n\tBPF_FIB_LKUP_RET_FWD_DISABLED              = 0x5\n\tBPF_FIB_LKUP_RET_UNSUPP_LWT                = 0x6\n\tBPF_FIB_LKUP_RET_NO_NEIGH                  = 0x7\n\tBPF_FIB_LKUP_RET_FRAG_NEEDED               = 0x8\n\tBPF_MTU_CHK_SEGS                           = 0x1\n\tBPF_MTU_CHK_RET_SUCCESS                    = 0x0\n\tBPF_MTU_CHK_RET_FRAG_NEEDED                = 0x1\n\tBPF_MTU_CHK_RET_SEGS_TOOBIG                = 0x2\n\tBPF_FD_TYPE_RAW_TRACEPOINT                 = 0x0\n\tBPF_FD_TYPE_TRACEPOINT                     = 0x1\n\tBPF_FD_TYPE_KPROBE                         = 0x2\n\tBPF_FD_TYPE_KRETPROBE                      = 0x3\n\tBPF_FD_TYPE_UPROBE                         = 0x4\n\tBPF_FD_TYPE_URETPROBE                      = 0x5\n\tBPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG        = 0x1\n\tBPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL    = 0x2\n\tBPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP         = 0x4\n\tBPF_CORE_FIELD_BYTE_OFFSET                 = 0x0\n\tBPF_CORE_FIELD_BYTE_SIZE                   = 0x1\n\tBPF_CORE_FIELD_EXISTS                      = 0x2\n\tBPF_CORE_FIELD_SIGNED                      = 0x3\n\tBPF_CORE_FIELD_LSHIFT_U64                  = 0x4\n\tBPF_CORE_FIELD_RSHIFT_U64                  = 0x5\n\tBPF_CORE_TYPE_ID_LOCAL                     = 0x6\n\tBPF_CORE_TYPE_ID_TARGET                    = 0x7\n\tBPF_CORE_TYPE_EXISTS                       = 0x8\n\tBPF_CORE_TYPE_SIZE                         = 0x9\n\tBPF_CORE_ENUMVAL_EXISTS                    = 0xa\n\tBPF_CORE_ENUMVAL_VALUE                     = 0xb\n\tBPF_CORE_TYPE_MATCHES                      = 0xc\n\tBPF_F_TIMER_ABS                            = 0x1\n)\n\nconst (\n\tTCA_UNSPEC            = 0x0\n\tTCA_KIND              = 0x1\n\tTCA_OPTIONS           = 0x2\n\tTCA_STATS             = 0x3\n\tTCA_XSTATS            = 0x4\n\tTCA_RATE              = 0x5\n\tTCA_FCNT              = 0x6\n\tTCA_STATS2            = 0x7\n\tTCA_STAB              = 0x8\n\tTCA_PAD               = 0x9\n\tTCA_DUMP_INVISIBLE    = 0xa\n\tTCA_CHAIN             = 0xb\n\tTCA_HW_OFFLOAD        = 0xc\n\tTCA_INGRESS_BLOCK     = 0xd\n\tTCA_EGRESS_BLOCK      = 0xe\n\tTCA_DUMP_FLAGS        = 0xf\n\tTCA_EXT_WARN_MSG      = 0x10\n\tRTNLGRP_NONE          = 0x0\n\tRTNLGRP_LINK          = 0x1\n\tRTNLGRP_NOTIFY        = 0x2\n\tRTNLGRP_NEIGH         = 0x3\n\tRTNLGRP_TC            = 0x4\n\tRTNLGRP_IPV4_IFADDR   = 0x5\n\tRTNLGRP_IPV4_MROUTE   = 0x6\n\tRTNLGRP_IPV4_ROUTE    = 0x7\n\tRTNLGRP_IPV4_RULE     = 0x8\n\tRTNLGRP_IPV6_IFADDR   = 0x9\n\tRTNLGRP_IPV6_MROUTE   = 0xa\n\tRTNLGRP_IPV6_ROUTE    = 0xb\n\tRTNLGRP_IPV6_IFINFO   = 0xc\n\tRTNLGRP_DECnet_IFADDR = 0xd\n\tRTNLGRP_NOP2          = 0xe\n\tRTNLGRP_DECnet_ROUTE  = 0xf\n\tRTNLGRP_DECnet_RULE   = 0x10\n\tRTNLGRP_NOP4          = 0x11\n\tRTNLGRP_IPV6_PREFIX   = 0x12\n\tRTNLGRP_IPV6_RULE     = 0x13\n\tRTNLGRP_ND_USEROPT    = 0x14\n\tRTNLGRP_PHONET_IFADDR = 0x15\n\tRTNLGRP_PHONET_ROUTE  = 0x16\n\tRTNLGRP_DCB           = 0x17\n\tRTNLGRP_IPV4_NETCONF  = 0x18\n\tRTNLGRP_IPV6_NETCONF  = 0x19\n\tRTNLGRP_MDB           = 0x1a\n\tRTNLGRP_MPLS_ROUTE    = 0x1b\n\tRTNLGRP_NSID          = 0x1c\n\tRTNLGRP_MPLS_NETCONF  = 0x1d\n\tRTNLGRP_IPV4_MROUTE_R = 0x1e\n\tRTNLGRP_IPV6_MROUTE_R = 0x1f\n\tRTNLGRP_NEXTHOP       = 0x20\n\tRTNLGRP_BRVLAN        = 0x21\n\tRTNLGRP_MCTP_IFADDR   = 0x22\n\tRTNLGRP_TUNNEL        = 0x23\n\tRTNLGRP_STATS         = 0x24\n\tRTNLGRP_IPV4_MCADDR   = 0x25\n\tRTNLGRP_IPV6_MCADDR   = 0x26\n\tRTNLGRP_IPV6_ACADDR   = 0x27\n\tTCA_ROOT_UNSPEC       = 0x0\n\tTCA_ROOT_TAB          = 0x1\n\tTCA_ROOT_FLAGS        = 0x2\n\tTCA_ROOT_COUNT        = 0x3\n\tTCA_ROOT_TIME_DELTA   = 0x4\n\tTCA_ROOT_EXT_WARN_MSG = 0x5\n)\n\ntype CapUserHeader struct {\n\tVersion uint32\n\tPid     int32\n}\n\ntype CapUserData struct {\n\tEffective   uint32\n\tPermitted   uint32\n\tInheritable uint32\n}\n\nconst (\n\tLINUX_CAPABILITY_VERSION_1 = 0x19980330\n\tLINUX_CAPABILITY_VERSION_2 = 0x20071026\n\tLINUX_CAPABILITY_VERSION_3 = 0x20080522\n)\n\nconst (\n\tLO_FLAGS_READ_ONLY = 0x1\n\tLO_FLAGS_AUTOCLEAR = 0x4\n\tLO_FLAGS_PARTSCAN  = 0x8\n\tLO_FLAGS_DIRECT_IO = 0x10\n)\n\ntype LoopInfo64 struct {\n\tDevice           uint64\n\tInode            uint64\n\tRdevice          uint64\n\tOffset           uint64\n\tSizelimit        uint64\n\tNumber           uint32\n\tEncrypt_type     uint32\n\tEncrypt_key_size uint32\n\tFlags            uint32\n\tFile_name        [64]uint8\n\tCrypt_name       [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n}\ntype LoopConfig struct {\n\tFd   uint32\n\tSize uint32\n\tInfo LoopInfo64\n\t_    [8]uint64\n}\n\ntype TIPCSocketAddr struct {\n\tRef  uint32\n\tNode uint32\n}\n\ntype TIPCServiceRange struct {\n\tType  uint32\n\tLower uint32\n\tUpper uint32\n}\n\ntype TIPCServiceName struct {\n\tType     uint32\n\tInstance uint32\n\tDomain   uint32\n}\n\ntype TIPCEvent struct {\n\tEvent uint32\n\tLower uint32\n\tUpper uint32\n\tPort  TIPCSocketAddr\n\tS     TIPCSubscr\n}\n\ntype TIPCGroupReq struct {\n\tType     uint32\n\tInstance uint32\n\tScope    uint32\n\tFlags    uint32\n}\n\nconst (\n\tTIPC_CLUSTER_SCOPE = 0x2\n\tTIPC_NODE_SCOPE    = 0x3\n)\n\nconst (\n\tSYSLOG_ACTION_CLOSE         = 0\n\tSYSLOG_ACTION_OPEN          = 1\n\tSYSLOG_ACTION_READ          = 2\n\tSYSLOG_ACTION_READ_ALL      = 3\n\tSYSLOG_ACTION_READ_CLEAR    = 4\n\tSYSLOG_ACTION_CLEAR         = 5\n\tSYSLOG_ACTION_CONSOLE_OFF   = 6\n\tSYSLOG_ACTION_CONSOLE_ON    = 7\n\tSYSLOG_ACTION_CONSOLE_LEVEL = 8\n\tSYSLOG_ACTION_SIZE_UNREAD   = 9\n\tSYSLOG_ACTION_SIZE_BUFFER   = 10\n)\n\nconst (\n\tDEVLINK_CMD_UNSPEC                                 = 0x0\n\tDEVLINK_CMD_GET                                    = 0x1\n\tDEVLINK_CMD_SET                                    = 0x2\n\tDEVLINK_CMD_NEW                                    = 0x3\n\tDEVLINK_CMD_DEL                                    = 0x4\n\tDEVLINK_CMD_PORT_GET                               = 0x5\n\tDEVLINK_CMD_PORT_SET                               = 0x6\n\tDEVLINK_CMD_PORT_NEW                               = 0x7\n\tDEVLINK_CMD_PORT_DEL                               = 0x8\n\tDEVLINK_CMD_PORT_SPLIT                             = 0x9\n\tDEVLINK_CMD_PORT_UNSPLIT                           = 0xa\n\tDEVLINK_CMD_SB_GET                                 = 0xb\n\tDEVLINK_CMD_SB_SET                                 = 0xc\n\tDEVLINK_CMD_SB_NEW                                 = 0xd\n\tDEVLINK_CMD_SB_DEL                                 = 0xe\n\tDEVLINK_CMD_SB_POOL_GET                            = 0xf\n\tDEVLINK_CMD_SB_POOL_SET                            = 0x10\n\tDEVLINK_CMD_SB_POOL_NEW                            = 0x11\n\tDEVLINK_CMD_SB_POOL_DEL                            = 0x12\n\tDEVLINK_CMD_SB_PORT_POOL_GET                       = 0x13\n\tDEVLINK_CMD_SB_PORT_POOL_SET                       = 0x14\n\tDEVLINK_CMD_SB_PORT_POOL_NEW                       = 0x15\n\tDEVLINK_CMD_SB_PORT_POOL_DEL                       = 0x16\n\tDEVLINK_CMD_SB_TC_POOL_BIND_GET                    = 0x17\n\tDEVLINK_CMD_SB_TC_POOL_BIND_SET                    = 0x18\n\tDEVLINK_CMD_SB_TC_POOL_BIND_NEW                    = 0x19\n\tDEVLINK_CMD_SB_TC_POOL_BIND_DEL                    = 0x1a\n\tDEVLINK_CMD_SB_OCC_SNAPSHOT                        = 0x1b\n\tDEVLINK_CMD_SB_OCC_MAX_CLEAR                       = 0x1c\n\tDEVLINK_CMD_ESWITCH_GET                            = 0x1d\n\tDEVLINK_CMD_ESWITCH_SET                            = 0x1e\n\tDEVLINK_CMD_DPIPE_TABLE_GET                        = 0x1f\n\tDEVLINK_CMD_DPIPE_ENTRIES_GET                      = 0x20\n\tDEVLINK_CMD_DPIPE_HEADERS_GET                      = 0x21\n\tDEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET               = 0x22\n\tDEVLINK_CMD_RESOURCE_SET                           = 0x23\n\tDEVLINK_CMD_RESOURCE_DUMP                          = 0x24\n\tDEVLINK_CMD_RELOAD                                 = 0x25\n\tDEVLINK_CMD_PARAM_GET                              = 0x26\n\tDEVLINK_CMD_PARAM_SET                              = 0x27\n\tDEVLINK_CMD_PARAM_NEW                              = 0x28\n\tDEVLINK_CMD_PARAM_DEL                              = 0x29\n\tDEVLINK_CMD_REGION_GET                             = 0x2a\n\tDEVLINK_CMD_REGION_SET                             = 0x2b\n\tDEVLINK_CMD_REGION_NEW                             = 0x2c\n\tDEVLINK_CMD_REGION_DEL                             = 0x2d\n\tDEVLINK_CMD_REGION_READ                            = 0x2e\n\tDEVLINK_CMD_PORT_PARAM_GET                         = 0x2f\n\tDEVLINK_CMD_PORT_PARAM_SET                         = 0x30\n\tDEVLINK_CMD_PORT_PARAM_NEW                         = 0x31\n\tDEVLINK_CMD_PORT_PARAM_DEL                         = 0x32\n\tDEVLINK_CMD_INFO_GET                               = 0x33\n\tDEVLINK_CMD_HEALTH_REPORTER_GET                    = 0x34\n\tDEVLINK_CMD_HEALTH_REPORTER_SET                    = 0x35\n\tDEVLINK_CMD_HEALTH_REPORTER_RECOVER                = 0x36\n\tDEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE               = 0x37\n\tDEVLINK_CMD_HEALTH_REPORTER_DUMP_GET               = 0x38\n\tDEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR             = 0x39\n\tDEVLINK_CMD_FLASH_UPDATE                           = 0x3a\n\tDEVLINK_CMD_FLASH_UPDATE_END                       = 0x3b\n\tDEVLINK_CMD_FLASH_UPDATE_STATUS                    = 0x3c\n\tDEVLINK_CMD_TRAP_GET                               = 0x3d\n\tDEVLINK_CMD_TRAP_SET                               = 0x3e\n\tDEVLINK_CMD_TRAP_NEW                               = 0x3f\n\tDEVLINK_CMD_TRAP_DEL                               = 0x40\n\tDEVLINK_CMD_TRAP_GROUP_GET                         = 0x41\n\tDEVLINK_CMD_TRAP_GROUP_SET                         = 0x42\n\tDEVLINK_CMD_TRAP_GROUP_NEW                         = 0x43\n\tDEVLINK_CMD_TRAP_GROUP_DEL                         = 0x44\n\tDEVLINK_CMD_TRAP_POLICER_GET                       = 0x45\n\tDEVLINK_CMD_TRAP_POLICER_SET                       = 0x46\n\tDEVLINK_CMD_TRAP_POLICER_NEW                       = 0x47\n\tDEVLINK_CMD_TRAP_POLICER_DEL                       = 0x48\n\tDEVLINK_CMD_HEALTH_REPORTER_TEST                   = 0x49\n\tDEVLINK_CMD_RATE_GET                               = 0x4a\n\tDEVLINK_CMD_RATE_SET                               = 0x4b\n\tDEVLINK_CMD_RATE_NEW                               = 0x4c\n\tDEVLINK_CMD_RATE_DEL                               = 0x4d\n\tDEVLINK_CMD_LINECARD_GET                           = 0x4e\n\tDEVLINK_CMD_LINECARD_SET                           = 0x4f\n\tDEVLINK_CMD_LINECARD_NEW                           = 0x50\n\tDEVLINK_CMD_LINECARD_DEL                           = 0x51\n\tDEVLINK_CMD_SELFTESTS_GET                          = 0x52\n\tDEVLINK_CMD_MAX                                    = 0x54\n\tDEVLINK_PORT_TYPE_NOTSET                           = 0x0\n\tDEVLINK_PORT_TYPE_AUTO                             = 0x1\n\tDEVLINK_PORT_TYPE_ETH                              = 0x2\n\tDEVLINK_PORT_TYPE_IB                               = 0x3\n\tDEVLINK_SB_POOL_TYPE_INGRESS                       = 0x0\n\tDEVLINK_SB_POOL_TYPE_EGRESS                        = 0x1\n\tDEVLINK_SB_THRESHOLD_TYPE_STATIC                   = 0x0\n\tDEVLINK_SB_THRESHOLD_TYPE_DYNAMIC                  = 0x1\n\tDEVLINK_ESWITCH_MODE_LEGACY                        = 0x0\n\tDEVLINK_ESWITCH_MODE_SWITCHDEV                     = 0x1\n\tDEVLINK_ESWITCH_INLINE_MODE_NONE                   = 0x0\n\tDEVLINK_ESWITCH_INLINE_MODE_LINK                   = 0x1\n\tDEVLINK_ESWITCH_INLINE_MODE_NETWORK                = 0x2\n\tDEVLINK_ESWITCH_INLINE_MODE_TRANSPORT              = 0x3\n\tDEVLINK_ESWITCH_ENCAP_MODE_NONE                    = 0x0\n\tDEVLINK_ESWITCH_ENCAP_MODE_BASIC                   = 0x1\n\tDEVLINK_PORT_FLAVOUR_PHYSICAL                      = 0x0\n\tDEVLINK_PORT_FLAVOUR_CPU                           = 0x1\n\tDEVLINK_PORT_FLAVOUR_DSA                           = 0x2\n\tDEVLINK_PORT_FLAVOUR_PCI_PF                        = 0x3\n\tDEVLINK_PORT_FLAVOUR_PCI_VF                        = 0x4\n\tDEVLINK_PORT_FLAVOUR_VIRTUAL                       = 0x5\n\tDEVLINK_PORT_FLAVOUR_UNUSED                        = 0x6\n\tDEVLINK_PARAM_CMODE_RUNTIME                        = 0x0\n\tDEVLINK_PARAM_CMODE_DRIVERINIT                     = 0x1\n\tDEVLINK_PARAM_CMODE_PERMANENT                      = 0x2\n\tDEVLINK_PARAM_CMODE_MAX                            = 0x2\n\tDEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER          = 0x0\n\tDEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH           = 0x1\n\tDEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK            = 0x2\n\tDEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN         = 0x3\n\tDEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN = 0x0\n\tDEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS  = 0x1\n\tDEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER   = 0x2\n\tDEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK    = 0x3\n\tDEVLINK_ATTR_STATS_RX_PACKETS                      = 0x0\n\tDEVLINK_ATTR_STATS_RX_BYTES                        = 0x1\n\tDEVLINK_ATTR_STATS_RX_DROPPED                      = 0x2\n\tDEVLINK_ATTR_STATS_MAX                             = 0x2\n\tDEVLINK_FLASH_OVERWRITE_SETTINGS_BIT               = 0x0\n\tDEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT            = 0x1\n\tDEVLINK_FLASH_OVERWRITE_MAX_BIT                    = 0x1\n\tDEVLINK_TRAP_ACTION_DROP                           = 0x0\n\tDEVLINK_TRAP_ACTION_TRAP                           = 0x1\n\tDEVLINK_TRAP_ACTION_MIRROR                         = 0x2\n\tDEVLINK_TRAP_TYPE_DROP                             = 0x0\n\tDEVLINK_TRAP_TYPE_EXCEPTION                        = 0x1\n\tDEVLINK_TRAP_TYPE_CONTROL                          = 0x2\n\tDEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT            = 0x0\n\tDEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE          = 0x1\n\tDEVLINK_RELOAD_ACTION_UNSPEC                       = 0x0\n\tDEVLINK_RELOAD_ACTION_DRIVER_REINIT                = 0x1\n\tDEVLINK_RELOAD_ACTION_FW_ACTIVATE                  = 0x2\n\tDEVLINK_RELOAD_ACTION_MAX                          = 0x2\n\tDEVLINK_RELOAD_LIMIT_UNSPEC                        = 0x0\n\tDEVLINK_RELOAD_LIMIT_NO_RESET                      = 0x1\n\tDEVLINK_RELOAD_LIMIT_MAX                           = 0x1\n\tDEVLINK_ATTR_UNSPEC                                = 0x0\n\tDEVLINK_ATTR_BUS_NAME                              = 0x1\n\tDEVLINK_ATTR_DEV_NAME                              = 0x2\n\tDEVLINK_ATTR_PORT_INDEX                            = 0x3\n\tDEVLINK_ATTR_PORT_TYPE                             = 0x4\n\tDEVLINK_ATTR_PORT_DESIRED_TYPE                     = 0x5\n\tDEVLINK_ATTR_PORT_NETDEV_IFINDEX                   = 0x6\n\tDEVLINK_ATTR_PORT_NETDEV_NAME                      = 0x7\n\tDEVLINK_ATTR_PORT_IBDEV_NAME                       = 0x8\n\tDEVLINK_ATTR_PORT_SPLIT_COUNT                      = 0x9\n\tDEVLINK_ATTR_PORT_SPLIT_GROUP                      = 0xa\n\tDEVLINK_ATTR_SB_INDEX                              = 0xb\n\tDEVLINK_ATTR_SB_SIZE                               = 0xc\n\tDEVLINK_ATTR_SB_INGRESS_POOL_COUNT                 = 0xd\n\tDEVLINK_ATTR_SB_EGRESS_POOL_COUNT                  = 0xe\n\tDEVLINK_ATTR_SB_INGRESS_TC_COUNT                   = 0xf\n\tDEVLINK_ATTR_SB_EGRESS_TC_COUNT                    = 0x10\n\tDEVLINK_ATTR_SB_POOL_INDEX                         = 0x11\n\tDEVLINK_ATTR_SB_POOL_TYPE                          = 0x12\n\tDEVLINK_ATTR_SB_POOL_SIZE                          = 0x13\n\tDEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE                = 0x14\n\tDEVLINK_ATTR_SB_THRESHOLD                          = 0x15\n\tDEVLINK_ATTR_SB_TC_INDEX                           = 0x16\n\tDEVLINK_ATTR_SB_OCC_CUR                            = 0x17\n\tDEVLINK_ATTR_SB_OCC_MAX                            = 0x18\n\tDEVLINK_ATTR_ESWITCH_MODE                          = 0x19\n\tDEVLINK_ATTR_ESWITCH_INLINE_MODE                   = 0x1a\n\tDEVLINK_ATTR_DPIPE_TABLES                          = 0x1b\n\tDEVLINK_ATTR_DPIPE_TABLE                           = 0x1c\n\tDEVLINK_ATTR_DPIPE_TABLE_NAME                      = 0x1d\n\tDEVLINK_ATTR_DPIPE_TABLE_SIZE                      = 0x1e\n\tDEVLINK_ATTR_DPIPE_TABLE_MATCHES                   = 0x1f\n\tDEVLINK_ATTR_DPIPE_TABLE_ACTIONS                   = 0x20\n\tDEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED          = 0x21\n\tDEVLINK_ATTR_DPIPE_ENTRIES                         = 0x22\n\tDEVLINK_ATTR_DPIPE_ENTRY                           = 0x23\n\tDEVLINK_ATTR_DPIPE_ENTRY_INDEX                     = 0x24\n\tDEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES              = 0x25\n\tDEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES             = 0x26\n\tDEVLINK_ATTR_DPIPE_ENTRY_COUNTER                   = 0x27\n\tDEVLINK_ATTR_DPIPE_MATCH                           = 0x28\n\tDEVLINK_ATTR_DPIPE_MATCH_VALUE                     = 0x29\n\tDEVLINK_ATTR_DPIPE_MATCH_TYPE                      = 0x2a\n\tDEVLINK_ATTR_DPIPE_ACTION                          = 0x2b\n\tDEVLINK_ATTR_DPIPE_ACTION_VALUE                    = 0x2c\n\tDEVLINK_ATTR_DPIPE_ACTION_TYPE                     = 0x2d\n\tDEVLINK_ATTR_DPIPE_VALUE                           = 0x2e\n\tDEVLINK_ATTR_DPIPE_VALUE_MASK                      = 0x2f\n\tDEVLINK_ATTR_DPIPE_VALUE_MAPPING                   = 0x30\n\tDEVLINK_ATTR_DPIPE_HEADERS                         = 0x31\n\tDEVLINK_ATTR_DPIPE_HEADER                          = 0x32\n\tDEVLINK_ATTR_DPIPE_HEADER_NAME                     = 0x33\n\tDEVLINK_ATTR_DPIPE_HEADER_ID                       = 0x34\n\tDEVLINK_ATTR_DPIPE_HEADER_FIELDS                   = 0x35\n\tDEVLINK_ATTR_DPIPE_HEADER_GLOBAL                   = 0x36\n\tDEVLINK_ATTR_DPIPE_HEADER_INDEX                    = 0x37\n\tDEVLINK_ATTR_DPIPE_FIELD                           = 0x38\n\tDEVLINK_ATTR_DPIPE_FIELD_NAME                      = 0x39\n\tDEVLINK_ATTR_DPIPE_FIELD_ID                        = 0x3a\n\tDEVLINK_ATTR_DPIPE_FIELD_BITWIDTH                  = 0x3b\n\tDEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE              = 0x3c\n\tDEVLINK_ATTR_PAD                                   = 0x3d\n\tDEVLINK_ATTR_ESWITCH_ENCAP_MODE                    = 0x3e\n\tDEVLINK_ATTR_RESOURCE_LIST                         = 0x3f\n\tDEVLINK_ATTR_RESOURCE                              = 0x40\n\tDEVLINK_ATTR_RESOURCE_NAME                         = 0x41\n\tDEVLINK_ATTR_RESOURCE_ID                           = 0x42\n\tDEVLINK_ATTR_RESOURCE_SIZE                         = 0x43\n\tDEVLINK_ATTR_RESOURCE_SIZE_NEW                     = 0x44\n\tDEVLINK_ATTR_RESOURCE_SIZE_VALID                   = 0x45\n\tDEVLINK_ATTR_RESOURCE_SIZE_MIN                     = 0x46\n\tDEVLINK_ATTR_RESOURCE_SIZE_MAX                     = 0x47\n\tDEVLINK_ATTR_RESOURCE_SIZE_GRAN                    = 0x48\n\tDEVLINK_ATTR_RESOURCE_UNIT                         = 0x49\n\tDEVLINK_ATTR_RESOURCE_OCC                          = 0x4a\n\tDEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID               = 0x4b\n\tDEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS            = 0x4c\n\tDEVLINK_ATTR_PORT_FLAVOUR                          = 0x4d\n\tDEVLINK_ATTR_PORT_NUMBER                           = 0x4e\n\tDEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER             = 0x4f\n\tDEVLINK_ATTR_PARAM                                 = 0x50\n\tDEVLINK_ATTR_PARAM_NAME                            = 0x51\n\tDEVLINK_ATTR_PARAM_GENERIC                         = 0x52\n\tDEVLINK_ATTR_PARAM_TYPE                            = 0x53\n\tDEVLINK_ATTR_PARAM_VALUES_LIST                     = 0x54\n\tDEVLINK_ATTR_PARAM_VALUE                           = 0x55\n\tDEVLINK_ATTR_PARAM_VALUE_DATA                      = 0x56\n\tDEVLINK_ATTR_PARAM_VALUE_CMODE                     = 0x57\n\tDEVLINK_ATTR_REGION_NAME                           = 0x58\n\tDEVLINK_ATTR_REGION_SIZE                           = 0x59\n\tDEVLINK_ATTR_REGION_SNAPSHOTS                      = 0x5a\n\tDEVLINK_ATTR_REGION_SNAPSHOT                       = 0x5b\n\tDEVLINK_ATTR_REGION_SNAPSHOT_ID                    = 0x5c\n\tDEVLINK_ATTR_REGION_CHUNKS                         = 0x5d\n\tDEVLINK_ATTR_REGION_CHUNK                          = 0x5e\n\tDEVLINK_ATTR_REGION_CHUNK_DATA                     = 0x5f\n\tDEVLINK_ATTR_REGION_CHUNK_ADDR                     = 0x60\n\tDEVLINK_ATTR_REGION_CHUNK_LEN                      = 0x61\n\tDEVLINK_ATTR_INFO_DRIVER_NAME                      = 0x62\n\tDEVLINK_ATTR_INFO_SERIAL_NUMBER                    = 0x63\n\tDEVLINK_ATTR_INFO_VERSION_FIXED                    = 0x64\n\tDEVLINK_ATTR_INFO_VERSION_RUNNING                  = 0x65\n\tDEVLINK_ATTR_INFO_VERSION_STORED                   = 0x66\n\tDEVLINK_ATTR_INFO_VERSION_NAME                     = 0x67\n\tDEVLINK_ATTR_INFO_VERSION_VALUE                    = 0x68\n\tDEVLINK_ATTR_SB_POOL_CELL_SIZE                     = 0x69\n\tDEVLINK_ATTR_FMSG                                  = 0x6a\n\tDEVLINK_ATTR_FMSG_OBJ_NEST_START                   = 0x6b\n\tDEVLINK_ATTR_FMSG_PAIR_NEST_START                  = 0x6c\n\tDEVLINK_ATTR_FMSG_ARR_NEST_START                   = 0x6d\n\tDEVLINK_ATTR_FMSG_NEST_END                         = 0x6e\n\tDEVLINK_ATTR_FMSG_OBJ_NAME                         = 0x6f\n\tDEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE                   = 0x70\n\tDEVLINK_ATTR_FMSG_OBJ_VALUE_DATA                   = 0x71\n\tDEVLINK_ATTR_HEALTH_REPORTER                       = 0x72\n\tDEVLINK_ATTR_HEALTH_REPORTER_NAME                  = 0x73\n\tDEVLINK_ATTR_HEALTH_REPORTER_STATE                 = 0x74\n\tDEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT             = 0x75\n\tDEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT         = 0x76\n\tDEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS               = 0x77\n\tDEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD       = 0x78\n\tDEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER          = 0x79\n\tDEVLINK_ATTR_FLASH_UPDATE_FILE_NAME                = 0x7a\n\tDEVLINK_ATTR_FLASH_UPDATE_COMPONENT                = 0x7b\n\tDEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG               = 0x7c\n\tDEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE              = 0x7d\n\tDEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL             = 0x7e\n\tDEVLINK_ATTR_PORT_PCI_PF_NUMBER                    = 0x7f\n\tDEVLINK_ATTR_PORT_PCI_VF_NUMBER                    = 0x80\n\tDEVLINK_ATTR_STATS                                 = 0x81\n\tDEVLINK_ATTR_TRAP_NAME                             = 0x82\n\tDEVLINK_ATTR_TRAP_ACTION                           = 0x83\n\tDEVLINK_ATTR_TRAP_TYPE                             = 0x84\n\tDEVLINK_ATTR_TRAP_GENERIC                          = 0x85\n\tDEVLINK_ATTR_TRAP_METADATA                         = 0x86\n\tDEVLINK_ATTR_TRAP_GROUP_NAME                       = 0x87\n\tDEVLINK_ATTR_RELOAD_FAILED                         = 0x88\n\tDEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS            = 0x89\n\tDEVLINK_ATTR_NETNS_FD                              = 0x8a\n\tDEVLINK_ATTR_NETNS_PID                             = 0x8b\n\tDEVLINK_ATTR_NETNS_ID                              = 0x8c\n\tDEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP             = 0x8d\n\tDEVLINK_ATTR_TRAP_POLICER_ID                       = 0x8e\n\tDEVLINK_ATTR_TRAP_POLICER_RATE                     = 0x8f\n\tDEVLINK_ATTR_TRAP_POLICER_BURST                    = 0x90\n\tDEVLINK_ATTR_PORT_FUNCTION                         = 0x91\n\tDEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER              = 0x92\n\tDEVLINK_ATTR_PORT_LANES                            = 0x93\n\tDEVLINK_ATTR_PORT_SPLITTABLE                       = 0x94\n\tDEVLINK_ATTR_PORT_EXTERNAL                         = 0x95\n\tDEVLINK_ATTR_PORT_CONTROLLER_NUMBER                = 0x96\n\tDEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT           = 0x97\n\tDEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK           = 0x98\n\tDEVLINK_ATTR_RELOAD_ACTION                         = 0x99\n\tDEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED              = 0x9a\n\tDEVLINK_ATTR_RELOAD_LIMITS                         = 0x9b\n\tDEVLINK_ATTR_DEV_STATS                             = 0x9c\n\tDEVLINK_ATTR_RELOAD_STATS                          = 0x9d\n\tDEVLINK_ATTR_RELOAD_STATS_ENTRY                    = 0x9e\n\tDEVLINK_ATTR_RELOAD_STATS_LIMIT                    = 0x9f\n\tDEVLINK_ATTR_RELOAD_STATS_VALUE                    = 0xa0\n\tDEVLINK_ATTR_REMOTE_RELOAD_STATS                   = 0xa1\n\tDEVLINK_ATTR_RELOAD_ACTION_INFO                    = 0xa2\n\tDEVLINK_ATTR_RELOAD_ACTION_STATS                   = 0xa3\n\tDEVLINK_ATTR_PORT_PCI_SF_NUMBER                    = 0xa4\n\tDEVLINK_ATTR_RATE_TYPE                             = 0xa5\n\tDEVLINK_ATTR_RATE_TX_SHARE                         = 0xa6\n\tDEVLINK_ATTR_RATE_TX_MAX                           = 0xa7\n\tDEVLINK_ATTR_RATE_NODE_NAME                        = 0xa8\n\tDEVLINK_ATTR_RATE_PARENT_NODE_NAME                 = 0xa9\n\tDEVLINK_ATTR_REGION_MAX_SNAPSHOTS                  = 0xaa\n\tDEVLINK_ATTR_LINECARD_INDEX                        = 0xab\n\tDEVLINK_ATTR_LINECARD_STATE                        = 0xac\n\tDEVLINK_ATTR_LINECARD_TYPE                         = 0xad\n\tDEVLINK_ATTR_LINECARD_SUPPORTED_TYPES              = 0xae\n\tDEVLINK_ATTR_NESTED_DEVLINK                        = 0xaf\n\tDEVLINK_ATTR_SELFTESTS                             = 0xb0\n\tDEVLINK_ATTR_MAX                                   = 0xb3\n\tDEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE              = 0x0\n\tDEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX           = 0x1\n\tDEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT               = 0x0\n\tDEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY             = 0x0\n\tDEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC               = 0x0\n\tDEVLINK_DPIPE_FIELD_IPV4_DST_IP                    = 0x0\n\tDEVLINK_DPIPE_FIELD_IPV6_DST_IP                    = 0x0\n\tDEVLINK_DPIPE_HEADER_ETHERNET                      = 0x0\n\tDEVLINK_DPIPE_HEADER_IPV4                          = 0x1\n\tDEVLINK_DPIPE_HEADER_IPV6                          = 0x2\n\tDEVLINK_RESOURCE_UNIT_ENTRY                        = 0x0\n\tDEVLINK_PORT_FUNCTION_ATTR_UNSPEC                  = 0x0\n\tDEVLINK_PORT_FUNCTION_ATTR_HW_ADDR                 = 0x1\n\tDEVLINK_PORT_FN_ATTR_STATE                         = 0x2\n\tDEVLINK_PORT_FN_ATTR_OPSTATE                       = 0x3\n\tDEVLINK_PORT_FN_ATTR_CAPS                          = 0x4\n\tDEVLINK_PORT_FUNCTION_ATTR_MAX                     = 0x6\n)\n\ntype FsverityDigest struct {\n\tAlgorithm uint16\n\tSize      uint16\n}\n\ntype FsverityEnableArg struct {\n\tVersion        uint32\n\tHash_algorithm uint32\n\tBlock_size     uint32\n\tSalt_size      uint32\n\tSalt_ptr       uint64\n\tSig_size       uint32\n\t_              uint32\n\tSig_ptr        uint64\n\t_              [11]uint64\n}\n\ntype Nhmsg struct {\n\tFamily   uint8\n\tScope    uint8\n\tProtocol uint8\n\tResvd    uint8\n\tFlags    uint32\n}\n\nconst SizeofNhmsg = 0x8\n\ntype NexthopGrp struct {\n\tId     uint32\n\tWeight uint8\n\tHigh   uint8\n\tResvd2 uint16\n}\n\nconst SizeofNexthopGrp = 0x8\n\nconst (\n\tNHA_UNSPEC     = 0x0\n\tNHA_ID         = 0x1\n\tNHA_GROUP      = 0x2\n\tNHA_GROUP_TYPE = 0x3\n\tNHA_BLACKHOLE  = 0x4\n\tNHA_OIF        = 0x5\n\tNHA_GATEWAY    = 0x6\n\tNHA_ENCAP_TYPE = 0x7\n\tNHA_ENCAP      = 0x8\n\tNHA_GROUPS     = 0x9\n\tNHA_MASTER     = 0xa\n)\n\nconst (\n\tCAN_RAW_FILTER        = 0x1\n\tCAN_RAW_ERR_FILTER    = 0x2\n\tCAN_RAW_LOOPBACK      = 0x3\n\tCAN_RAW_RECV_OWN_MSGS = 0x4\n\tCAN_RAW_FD_FRAMES     = 0x5\n\tCAN_RAW_JOIN_FILTERS  = 0x6\n)\n\ntype WatchdogInfo struct {\n\tOptions  uint32\n\tVersion  uint32\n\tIdentity [32]uint8\n}\n\ntype PPSFData struct {\n\tInfo    PPSKInfo\n\tTimeout PPSKTime\n}\n\ntype PPSKParams struct {\n\tApi_version   int32\n\tMode          int32\n\tAssert_off_tu PPSKTime\n\tClear_off_tu  PPSKTime\n}\n\ntype PPSKTime struct {\n\tSec   int64\n\tNsec  int32\n\tFlags uint32\n}\n\nconst (\n\tLWTUNNEL_ENCAP_NONE       = 0x0\n\tLWTUNNEL_ENCAP_MPLS       = 0x1\n\tLWTUNNEL_ENCAP_IP         = 0x2\n\tLWTUNNEL_ENCAP_ILA        = 0x3\n\tLWTUNNEL_ENCAP_IP6        = 0x4\n\tLWTUNNEL_ENCAP_SEG6       = 0x5\n\tLWTUNNEL_ENCAP_BPF        = 0x6\n\tLWTUNNEL_ENCAP_SEG6_LOCAL = 0x7\n\tLWTUNNEL_ENCAP_RPL        = 0x8\n\tLWTUNNEL_ENCAP_IOAM6      = 0x9\n\tLWTUNNEL_ENCAP_XFRM       = 0xa\n\tLWTUNNEL_ENCAP_MAX        = 0xa\n\n\tMPLS_IPTUNNEL_UNSPEC = 0x0\n\tMPLS_IPTUNNEL_DST    = 0x1\n\tMPLS_IPTUNNEL_TTL    = 0x2\n\tMPLS_IPTUNNEL_MAX    = 0x2\n)\n\nconst (\n\tETHTOOL_ID_UNSPEC                                                       = 0x0\n\tETHTOOL_RX_COPYBREAK                                                    = 0x1\n\tETHTOOL_TX_COPYBREAK                                                    = 0x2\n\tETHTOOL_PFC_PREVENTION_TOUT                                             = 0x3\n\tETHTOOL_TUNABLE_UNSPEC                                                  = 0x0\n\tETHTOOL_TUNABLE_U8                                                      = 0x1\n\tETHTOOL_TUNABLE_U16                                                     = 0x2\n\tETHTOOL_TUNABLE_U32                                                     = 0x3\n\tETHTOOL_TUNABLE_U64                                                     = 0x4\n\tETHTOOL_TUNABLE_STRING                                                  = 0x5\n\tETHTOOL_TUNABLE_S8                                                      = 0x6\n\tETHTOOL_TUNABLE_S16                                                     = 0x7\n\tETHTOOL_TUNABLE_S32                                                     = 0x8\n\tETHTOOL_TUNABLE_S64                                                     = 0x9\n\tETHTOOL_PHY_ID_UNSPEC                                                   = 0x0\n\tETHTOOL_PHY_DOWNSHIFT                                                   = 0x1\n\tETHTOOL_PHY_FAST_LINK_DOWN                                              = 0x2\n\tETHTOOL_PHY_EDPD                                                        = 0x3\n\tETHTOOL_LINK_EXT_STATE_AUTONEG                                          = 0x0\n\tETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE                            = 0x1\n\tETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH                            = 0x2\n\tETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY                             = 0x3\n\tETHTOOL_LINK_EXT_STATE_NO_CABLE                                         = 0x4\n\tETHTOOL_LINK_EXT_STATE_CABLE_ISSUE                                      = 0x5\n\tETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE                                     = 0x6\n\tETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE                              = 0x7\n\tETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED                            = 0x8\n\tETHTOOL_LINK_EXT_STATE_OVERHEAT                                         = 0x9\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED                        = 0x1\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED                           = 0x2\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED                  = 0x3\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE             = 0x4\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE               = 0x5\n\tETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD                                     = 0x6\n\tETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED                 = 0x1\n\tETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT                    = 0x2\n\tETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY = 0x3\n\tETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT                               = 0x4\n\tETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK            = 0x1\n\tETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK               = 0x2\n\tETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS              = 0x3\n\tETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED                      = 0x4\n\tETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED                      = 0x5\n\tETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS           = 0x1\n\tETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE                          = 0x2\n\tETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE                          = 0x1\n\tETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE                         = 0x2\n\tETHTOOL_FLASH_ALL_REGIONS                                               = 0x0\n\tETHTOOL_F_UNSUPPORTED__BIT                                              = 0x0\n\tETHTOOL_F_WISH__BIT                                                     = 0x1\n\tETHTOOL_F_COMPAT__BIT                                                   = 0x2\n\tETHTOOL_FEC_NONE_BIT                                                    = 0x0\n\tETHTOOL_FEC_AUTO_BIT                                                    = 0x1\n\tETHTOOL_FEC_OFF_BIT                                                     = 0x2\n\tETHTOOL_FEC_RS_BIT                                                      = 0x3\n\tETHTOOL_FEC_BASER_BIT                                                   = 0x4\n\tETHTOOL_FEC_LLRS_BIT                                                    = 0x5\n\tETHTOOL_LINK_MODE_10baseT_Half_BIT                                      = 0x0\n\tETHTOOL_LINK_MODE_10baseT_Full_BIT                                      = 0x1\n\tETHTOOL_LINK_MODE_100baseT_Half_BIT                                     = 0x2\n\tETHTOOL_LINK_MODE_100baseT_Full_BIT                                     = 0x3\n\tETHTOOL_LINK_MODE_1000baseT_Half_BIT                                    = 0x4\n\tETHTOOL_LINK_MODE_1000baseT_Full_BIT                                    = 0x5\n\tETHTOOL_LINK_MODE_Autoneg_BIT                                           = 0x6\n\tETHTOOL_LINK_MODE_TP_BIT                                                = 0x7\n\tETHTOOL_LINK_MODE_AUI_BIT                                               = 0x8\n\tETHTOOL_LINK_MODE_MII_BIT                                               = 0x9\n\tETHTOOL_LINK_MODE_FIBRE_BIT                                             = 0xa\n\tETHTOOL_LINK_MODE_BNC_BIT                                               = 0xb\n\tETHTOOL_LINK_MODE_10000baseT_Full_BIT                                   = 0xc\n\tETHTOOL_LINK_MODE_Pause_BIT                                             = 0xd\n\tETHTOOL_LINK_MODE_Asym_Pause_BIT                                        = 0xe\n\tETHTOOL_LINK_MODE_2500baseX_Full_BIT                                    = 0xf\n\tETHTOOL_LINK_MODE_Backplane_BIT                                         = 0x10\n\tETHTOOL_LINK_MODE_1000baseKX_Full_BIT                                   = 0x11\n\tETHTOOL_LINK_MODE_10000baseKX4_Full_BIT                                 = 0x12\n\tETHTOOL_LINK_MODE_10000baseKR_Full_BIT                                  = 0x13\n\tETHTOOL_LINK_MODE_10000baseR_FEC_BIT                                    = 0x14\n\tETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT                                = 0x15\n\tETHTOOL_LINK_MODE_20000baseKR2_Full_BIT                                 = 0x16\n\tETHTOOL_LINK_MODE_40000baseKR4_Full_BIT                                 = 0x17\n\tETHTOOL_LINK_MODE_40000baseCR4_Full_BIT                                 = 0x18\n\tETHTOOL_LINK_MODE_40000baseSR4_Full_BIT                                 = 0x19\n\tETHTOOL_LINK_MODE_40000baseLR4_Full_BIT                                 = 0x1a\n\tETHTOOL_LINK_MODE_56000baseKR4_Full_BIT                                 = 0x1b\n\tETHTOOL_LINK_MODE_56000baseCR4_Full_BIT                                 = 0x1c\n\tETHTOOL_LINK_MODE_56000baseSR4_Full_BIT                                 = 0x1d\n\tETHTOOL_LINK_MODE_56000baseLR4_Full_BIT                                 = 0x1e\n\tETHTOOL_LINK_MODE_25000baseCR_Full_BIT                                  = 0x1f\n\tETHTOOL_LINK_MODE_25000baseKR_Full_BIT                                  = 0x20\n\tETHTOOL_LINK_MODE_25000baseSR_Full_BIT                                  = 0x21\n\tETHTOOL_LINK_MODE_50000baseCR2_Full_BIT                                 = 0x22\n\tETHTOOL_LINK_MODE_50000baseKR2_Full_BIT                                 = 0x23\n\tETHTOOL_LINK_MODE_100000baseKR4_Full_BIT                                = 0x24\n\tETHTOOL_LINK_MODE_100000baseSR4_Full_BIT                                = 0x25\n\tETHTOOL_LINK_MODE_100000baseCR4_Full_BIT                                = 0x26\n\tETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT                            = 0x27\n\tETHTOOL_LINK_MODE_50000baseSR2_Full_BIT                                 = 0x28\n\tETHTOOL_LINK_MODE_1000baseX_Full_BIT                                    = 0x29\n\tETHTOOL_LINK_MODE_10000baseCR_Full_BIT                                  = 0x2a\n\tETHTOOL_LINK_MODE_10000baseSR_Full_BIT                                  = 0x2b\n\tETHTOOL_LINK_MODE_10000baseLR_Full_BIT                                  = 0x2c\n\tETHTOOL_LINK_MODE_10000baseLRM_Full_BIT                                 = 0x2d\n\tETHTOOL_LINK_MODE_10000baseER_Full_BIT                                  = 0x2e\n\tETHTOOL_LINK_MODE_2500baseT_Full_BIT                                    = 0x2f\n\tETHTOOL_LINK_MODE_5000baseT_Full_BIT                                    = 0x30\n\tETHTOOL_LINK_MODE_FEC_NONE_BIT                                          = 0x31\n\tETHTOOL_LINK_MODE_FEC_RS_BIT                                            = 0x32\n\tETHTOOL_LINK_MODE_FEC_BASER_BIT                                         = 0x33\n\tETHTOOL_LINK_MODE_50000baseKR_Full_BIT                                  = 0x34\n\tETHTOOL_LINK_MODE_50000baseSR_Full_BIT                                  = 0x35\n\tETHTOOL_LINK_MODE_50000baseCR_Full_BIT                                  = 0x36\n\tETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT                            = 0x37\n\tETHTOOL_LINK_MODE_50000baseDR_Full_BIT                                  = 0x38\n\tETHTOOL_LINK_MODE_100000baseKR2_Full_BIT                                = 0x39\n\tETHTOOL_LINK_MODE_100000baseSR2_Full_BIT                                = 0x3a\n\tETHTOOL_LINK_MODE_100000baseCR2_Full_BIT                                = 0x3b\n\tETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT                        = 0x3c\n\tETHTOOL_LINK_MODE_100000baseDR2_Full_BIT                                = 0x3d\n\tETHTOOL_LINK_MODE_200000baseKR4_Full_BIT                                = 0x3e\n\tETHTOOL_LINK_MODE_200000baseSR4_Full_BIT                                = 0x3f\n\tETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT                        = 0x40\n\tETHTOOL_LINK_MODE_200000baseDR4_Full_BIT                                = 0x41\n\tETHTOOL_LINK_MODE_200000baseCR4_Full_BIT                                = 0x42\n\tETHTOOL_LINK_MODE_100baseT1_Full_BIT                                    = 0x43\n\tETHTOOL_LINK_MODE_1000baseT1_Full_BIT                                   = 0x44\n\tETHTOOL_LINK_MODE_400000baseKR8_Full_BIT                                = 0x45\n\tETHTOOL_LINK_MODE_400000baseSR8_Full_BIT                                = 0x46\n\tETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT                        = 0x47\n\tETHTOOL_LINK_MODE_400000baseDR8_Full_BIT                                = 0x48\n\tETHTOOL_LINK_MODE_400000baseCR8_Full_BIT                                = 0x49\n\tETHTOOL_LINK_MODE_FEC_LLRS_BIT                                          = 0x4a\n\tETHTOOL_LINK_MODE_100000baseKR_Full_BIT                                 = 0x4b\n\tETHTOOL_LINK_MODE_100000baseSR_Full_BIT                                 = 0x4c\n\tETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT                           = 0x4d\n\tETHTOOL_LINK_MODE_100000baseCR_Full_BIT                                 = 0x4e\n\tETHTOOL_LINK_MODE_100000baseDR_Full_BIT                                 = 0x4f\n\tETHTOOL_LINK_MODE_200000baseKR2_Full_BIT                                = 0x50\n\tETHTOOL_LINK_MODE_200000baseSR2_Full_BIT                                = 0x51\n\tETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT                        = 0x52\n\tETHTOOL_LINK_MODE_200000baseDR2_Full_BIT                                = 0x53\n\tETHTOOL_LINK_MODE_200000baseCR2_Full_BIT                                = 0x54\n\tETHTOOL_LINK_MODE_400000baseKR4_Full_BIT                                = 0x55\n\tETHTOOL_LINK_MODE_400000baseSR4_Full_BIT                                = 0x56\n\tETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT                        = 0x57\n\tETHTOOL_LINK_MODE_400000baseDR4_Full_BIT                                = 0x58\n\tETHTOOL_LINK_MODE_400000baseCR4_Full_BIT                                = 0x59\n\tETHTOOL_LINK_MODE_100baseFX_Half_BIT                                    = 0x5a\n\tETHTOOL_LINK_MODE_100baseFX_Full_BIT                                    = 0x5b\n\n\tETHTOOL_MSG_USER_NONE                     = 0x0\n\tETHTOOL_MSG_STRSET_GET                    = 0x1\n\tETHTOOL_MSG_LINKINFO_GET                  = 0x2\n\tETHTOOL_MSG_LINKINFO_SET                  = 0x3\n\tETHTOOL_MSG_LINKMODES_GET                 = 0x4\n\tETHTOOL_MSG_LINKMODES_SET                 = 0x5\n\tETHTOOL_MSG_LINKSTATE_GET                 = 0x6\n\tETHTOOL_MSG_DEBUG_GET                     = 0x7\n\tETHTOOL_MSG_DEBUG_SET                     = 0x8\n\tETHTOOL_MSG_WOL_GET                       = 0x9\n\tETHTOOL_MSG_WOL_SET                       = 0xa\n\tETHTOOL_MSG_FEATURES_GET                  = 0xb\n\tETHTOOL_MSG_FEATURES_SET                  = 0xc\n\tETHTOOL_MSG_PRIVFLAGS_GET                 = 0xd\n\tETHTOOL_MSG_PRIVFLAGS_SET                 = 0xe\n\tETHTOOL_MSG_RINGS_GET                     = 0xf\n\tETHTOOL_MSG_RINGS_SET                     = 0x10\n\tETHTOOL_MSG_CHANNELS_GET                  = 0x11\n\tETHTOOL_MSG_CHANNELS_SET                  = 0x12\n\tETHTOOL_MSG_COALESCE_GET                  = 0x13\n\tETHTOOL_MSG_COALESCE_SET                  = 0x14\n\tETHTOOL_MSG_PAUSE_GET                     = 0x15\n\tETHTOOL_MSG_PAUSE_SET                     = 0x16\n\tETHTOOL_MSG_EEE_GET                       = 0x17\n\tETHTOOL_MSG_EEE_SET                       = 0x18\n\tETHTOOL_MSG_TSINFO_GET                    = 0x19\n\tETHTOOL_MSG_CABLE_TEST_ACT                = 0x1a\n\tETHTOOL_MSG_CABLE_TEST_TDR_ACT            = 0x1b\n\tETHTOOL_MSG_TUNNEL_INFO_GET               = 0x1c\n\tETHTOOL_MSG_FEC_GET                       = 0x1d\n\tETHTOOL_MSG_FEC_SET                       = 0x1e\n\tETHTOOL_MSG_MODULE_EEPROM_GET             = 0x1f\n\tETHTOOL_MSG_STATS_GET                     = 0x20\n\tETHTOOL_MSG_PHC_VCLOCKS_GET               = 0x21\n\tETHTOOL_MSG_MODULE_GET                    = 0x22\n\tETHTOOL_MSG_MODULE_SET                    = 0x23\n\tETHTOOL_MSG_PSE_GET                       = 0x24\n\tETHTOOL_MSG_PSE_SET                       = 0x25\n\tETHTOOL_MSG_RSS_GET                       = 0x26\n\tETHTOOL_MSG_PLCA_GET_CFG                  = 0x27\n\tETHTOOL_MSG_PLCA_SET_CFG                  = 0x28\n\tETHTOOL_MSG_PLCA_GET_STATUS               = 0x29\n\tETHTOOL_MSG_MM_GET                        = 0x2a\n\tETHTOOL_MSG_MM_SET                        = 0x2b\n\tETHTOOL_MSG_MODULE_FW_FLASH_ACT           = 0x2c\n\tETHTOOL_MSG_PHY_GET                       = 0x2d\n\tETHTOOL_MSG_TSCONFIG_GET                  = 0x2e\n\tETHTOOL_MSG_TSCONFIG_SET                  = 0x2f\n\tETHTOOL_MSG_USER_MAX                      = 0x2f\n\tETHTOOL_MSG_KERNEL_NONE                   = 0x0\n\tETHTOOL_MSG_STRSET_GET_REPLY              = 0x1\n\tETHTOOL_MSG_LINKINFO_GET_REPLY            = 0x2\n\tETHTOOL_MSG_LINKINFO_NTF                  = 0x3\n\tETHTOOL_MSG_LINKMODES_GET_REPLY           = 0x4\n\tETHTOOL_MSG_LINKMODES_NTF                 = 0x5\n\tETHTOOL_MSG_LINKSTATE_GET_REPLY           = 0x6\n\tETHTOOL_MSG_DEBUG_GET_REPLY               = 0x7\n\tETHTOOL_MSG_DEBUG_NTF                     = 0x8\n\tETHTOOL_MSG_WOL_GET_REPLY                 = 0x9\n\tETHTOOL_MSG_WOL_NTF                       = 0xa\n\tETHTOOL_MSG_FEATURES_GET_REPLY            = 0xb\n\tETHTOOL_MSG_FEATURES_SET_REPLY            = 0xc\n\tETHTOOL_MSG_FEATURES_NTF                  = 0xd\n\tETHTOOL_MSG_PRIVFLAGS_GET_REPLY           = 0xe\n\tETHTOOL_MSG_PRIVFLAGS_NTF                 = 0xf\n\tETHTOOL_MSG_RINGS_GET_REPLY               = 0x10\n\tETHTOOL_MSG_RINGS_NTF                     = 0x11\n\tETHTOOL_MSG_CHANNELS_GET_REPLY            = 0x12\n\tETHTOOL_MSG_CHANNELS_NTF                  = 0x13\n\tETHTOOL_MSG_COALESCE_GET_REPLY            = 0x14\n\tETHTOOL_MSG_COALESCE_NTF                  = 0x15\n\tETHTOOL_MSG_PAUSE_GET_REPLY               = 0x16\n\tETHTOOL_MSG_PAUSE_NTF                     = 0x17\n\tETHTOOL_MSG_EEE_GET_REPLY                 = 0x18\n\tETHTOOL_MSG_EEE_NTF                       = 0x19\n\tETHTOOL_MSG_TSINFO_GET_REPLY              = 0x1a\n\tETHTOOL_MSG_CABLE_TEST_NTF                = 0x1b\n\tETHTOOL_MSG_CABLE_TEST_TDR_NTF            = 0x1c\n\tETHTOOL_MSG_TUNNEL_INFO_GET_REPLY         = 0x1d\n\tETHTOOL_MSG_FEC_GET_REPLY                 = 0x1e\n\tETHTOOL_MSG_FEC_NTF                       = 0x1f\n\tETHTOOL_MSG_MODULE_EEPROM_GET_REPLY       = 0x20\n\tETHTOOL_MSG_STATS_GET_REPLY               = 0x21\n\tETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY         = 0x22\n\tETHTOOL_MSG_MODULE_GET_REPLY              = 0x23\n\tETHTOOL_MSG_MODULE_NTF                    = 0x24\n\tETHTOOL_MSG_PSE_GET_REPLY                 = 0x25\n\tETHTOOL_MSG_RSS_GET_REPLY                 = 0x26\n\tETHTOOL_MSG_PLCA_GET_CFG_REPLY            = 0x27\n\tETHTOOL_MSG_PLCA_GET_STATUS_REPLY         = 0x28\n\tETHTOOL_MSG_PLCA_NTF                      = 0x29\n\tETHTOOL_MSG_MM_GET_REPLY                  = 0x2a\n\tETHTOOL_MSG_MM_NTF                        = 0x2b\n\tETHTOOL_MSG_MODULE_FW_FLASH_NTF           = 0x2c\n\tETHTOOL_MSG_PHY_GET_REPLY                 = 0x2d\n\tETHTOOL_MSG_PHY_NTF                       = 0x2e\n\tETHTOOL_MSG_TSCONFIG_GET_REPLY            = 0x2f\n\tETHTOOL_MSG_TSCONFIG_SET_REPLY            = 0x30\n\tETHTOOL_MSG_KERNEL_MAX                    = 0x30\n\tETHTOOL_FLAG_COMPACT_BITSETS              = 0x1\n\tETHTOOL_FLAG_OMIT_REPLY                   = 0x2\n\tETHTOOL_FLAG_STATS                        = 0x4\n\tETHTOOL_A_HEADER_UNSPEC                   = 0x0\n\tETHTOOL_A_HEADER_DEV_INDEX                = 0x1\n\tETHTOOL_A_HEADER_DEV_NAME                 = 0x2\n\tETHTOOL_A_HEADER_FLAGS                    = 0x3\n\tETHTOOL_A_HEADER_MAX                      = 0x4\n\tETHTOOL_A_BITSET_BIT_UNSPEC               = 0x0\n\tETHTOOL_A_BITSET_BIT_INDEX                = 0x1\n\tETHTOOL_A_BITSET_BIT_NAME                 = 0x2\n\tETHTOOL_A_BITSET_BIT_VALUE                = 0x3\n\tETHTOOL_A_BITSET_BIT_MAX                  = 0x3\n\tETHTOOL_A_BITSET_BITS_UNSPEC              = 0x0\n\tETHTOOL_A_BITSET_BITS_BIT                 = 0x1\n\tETHTOOL_A_BITSET_BITS_MAX                 = 0x1\n\tETHTOOL_A_BITSET_UNSPEC                   = 0x0\n\tETHTOOL_A_BITSET_NOMASK                   = 0x1\n\tETHTOOL_A_BITSET_SIZE                     = 0x2\n\tETHTOOL_A_BITSET_BITS                     = 0x3\n\tETHTOOL_A_BITSET_VALUE                    = 0x4\n\tETHTOOL_A_BITSET_MASK                     = 0x5\n\tETHTOOL_A_BITSET_MAX                      = 0x5\n\tETHTOOL_A_STRING_UNSPEC                   = 0x0\n\tETHTOOL_A_STRING_INDEX                    = 0x1\n\tETHTOOL_A_STRING_VALUE                    = 0x2\n\tETHTOOL_A_STRING_MAX                      = 0x2\n\tETHTOOL_A_STRINGS_UNSPEC                  = 0x0\n\tETHTOOL_A_STRINGS_STRING                  = 0x1\n\tETHTOOL_A_STRINGS_MAX                     = 0x1\n\tETHTOOL_A_STRINGSET_UNSPEC                = 0x0\n\tETHTOOL_A_STRINGSET_ID                    = 0x1\n\tETHTOOL_A_STRINGSET_COUNT                 = 0x2\n\tETHTOOL_A_STRINGSET_STRINGS               = 0x3\n\tETHTOOL_A_STRINGSET_MAX                   = 0x3\n\tETHTOOL_A_STRINGSETS_UNSPEC               = 0x0\n\tETHTOOL_A_STRINGSETS_STRINGSET            = 0x1\n\tETHTOOL_A_STRINGSETS_MAX                  = 0x1\n\tETHTOOL_A_STRSET_UNSPEC                   = 0x0\n\tETHTOOL_A_STRSET_HEADER                   = 0x1\n\tETHTOOL_A_STRSET_STRINGSETS               = 0x2\n\tETHTOOL_A_STRSET_COUNTS_ONLY              = 0x3\n\tETHTOOL_A_STRSET_MAX                      = 0x3\n\tETHTOOL_A_LINKINFO_UNSPEC                 = 0x0\n\tETHTOOL_A_LINKINFO_HEADER                 = 0x1\n\tETHTOOL_A_LINKINFO_PORT                   = 0x2\n\tETHTOOL_A_LINKINFO_PHYADDR                = 0x3\n\tETHTOOL_A_LINKINFO_TP_MDIX                = 0x4\n\tETHTOOL_A_LINKINFO_TP_MDIX_CTRL           = 0x5\n\tETHTOOL_A_LINKINFO_TRANSCEIVER            = 0x6\n\tETHTOOL_A_LINKINFO_MAX                    = 0x6\n\tETHTOOL_A_LINKMODES_UNSPEC                = 0x0\n\tETHTOOL_A_LINKMODES_HEADER                = 0x1\n\tETHTOOL_A_LINKMODES_AUTONEG               = 0x2\n\tETHTOOL_A_LINKMODES_OURS                  = 0x3\n\tETHTOOL_A_LINKMODES_PEER                  = 0x4\n\tETHTOOL_A_LINKMODES_SPEED                 = 0x5\n\tETHTOOL_A_LINKMODES_DUPLEX                = 0x6\n\tETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG      = 0x7\n\tETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE    = 0x8\n\tETHTOOL_A_LINKMODES_LANES                 = 0x9\n\tETHTOOL_A_LINKMODES_RATE_MATCHING         = 0xa\n\tETHTOOL_A_LINKMODES_MAX                   = 0xa\n\tETHTOOL_A_LINKSTATE_UNSPEC                = 0x0\n\tETHTOOL_A_LINKSTATE_HEADER                = 0x1\n\tETHTOOL_A_LINKSTATE_LINK                  = 0x2\n\tETHTOOL_A_LINKSTATE_SQI                   = 0x3\n\tETHTOOL_A_LINKSTATE_SQI_MAX               = 0x4\n\tETHTOOL_A_LINKSTATE_EXT_STATE             = 0x5\n\tETHTOOL_A_LINKSTATE_EXT_SUBSTATE          = 0x6\n\tETHTOOL_A_LINKSTATE_EXT_DOWN_CNT          = 0x7\n\tETHTOOL_A_LINKSTATE_MAX                   = 0x7\n\tETHTOOL_A_DEBUG_UNSPEC                    = 0x0\n\tETHTOOL_A_DEBUG_HEADER                    = 0x1\n\tETHTOOL_A_DEBUG_MSGMASK                   = 0x2\n\tETHTOOL_A_DEBUG_MAX                       = 0x2\n\tETHTOOL_A_WOL_UNSPEC                      = 0x0\n\tETHTOOL_A_WOL_HEADER                      = 0x1\n\tETHTOOL_A_WOL_MODES                       = 0x2\n\tETHTOOL_A_WOL_SOPASS                      = 0x3\n\tETHTOOL_A_WOL_MAX                         = 0x3\n\tETHTOOL_A_FEATURES_UNSPEC                 = 0x0\n\tETHTOOL_A_FEATURES_HEADER                 = 0x1\n\tETHTOOL_A_FEATURES_HW                     = 0x2\n\tETHTOOL_A_FEATURES_WANTED                 = 0x3\n\tETHTOOL_A_FEATURES_ACTIVE                 = 0x4\n\tETHTOOL_A_FEATURES_NOCHANGE               = 0x5\n\tETHTOOL_A_FEATURES_MAX                    = 0x5\n\tETHTOOL_A_PRIVFLAGS_UNSPEC                = 0x0\n\tETHTOOL_A_PRIVFLAGS_HEADER                = 0x1\n\tETHTOOL_A_PRIVFLAGS_FLAGS                 = 0x2\n\tETHTOOL_A_PRIVFLAGS_MAX                   = 0x2\n\tETHTOOL_A_RINGS_UNSPEC                    = 0x0\n\tETHTOOL_A_RINGS_HEADER                    = 0x1\n\tETHTOOL_A_RINGS_RX_MAX                    = 0x2\n\tETHTOOL_A_RINGS_RX_MINI_MAX               = 0x3\n\tETHTOOL_A_RINGS_RX_JUMBO_MAX              = 0x4\n\tETHTOOL_A_RINGS_TX_MAX                    = 0x5\n\tETHTOOL_A_RINGS_RX                        = 0x6\n\tETHTOOL_A_RINGS_RX_MINI                   = 0x7\n\tETHTOOL_A_RINGS_RX_JUMBO                  = 0x8\n\tETHTOOL_A_RINGS_TX                        = 0x9\n\tETHTOOL_A_RINGS_RX_BUF_LEN                = 0xa\n\tETHTOOL_A_RINGS_TCP_DATA_SPLIT            = 0xb\n\tETHTOOL_A_RINGS_CQE_SIZE                  = 0xc\n\tETHTOOL_A_RINGS_TX_PUSH                   = 0xd\n\tETHTOOL_A_RINGS_RX_PUSH                   = 0xe\n\tETHTOOL_A_RINGS_TX_PUSH_BUF_LEN           = 0xf\n\tETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX       = 0x10\n\tETHTOOL_A_RINGS_HDS_THRESH                = 0x11\n\tETHTOOL_A_RINGS_HDS_THRESH_MAX            = 0x12\n\tETHTOOL_A_RINGS_MAX                       = 0x12\n\tETHTOOL_A_CHANNELS_UNSPEC                 = 0x0\n\tETHTOOL_A_CHANNELS_HEADER                 = 0x1\n\tETHTOOL_A_CHANNELS_RX_MAX                 = 0x2\n\tETHTOOL_A_CHANNELS_TX_MAX                 = 0x3\n\tETHTOOL_A_CHANNELS_OTHER_MAX              = 0x4\n\tETHTOOL_A_CHANNELS_COMBINED_MAX           = 0x5\n\tETHTOOL_A_CHANNELS_RX_COUNT               = 0x6\n\tETHTOOL_A_CHANNELS_TX_COUNT               = 0x7\n\tETHTOOL_A_CHANNELS_OTHER_COUNT            = 0x8\n\tETHTOOL_A_CHANNELS_COMBINED_COUNT         = 0x9\n\tETHTOOL_A_CHANNELS_MAX                    = 0x9\n\tETHTOOL_A_COALESCE_UNSPEC                 = 0x0\n\tETHTOOL_A_COALESCE_HEADER                 = 0x1\n\tETHTOOL_A_COALESCE_RX_USECS               = 0x2\n\tETHTOOL_A_COALESCE_RX_MAX_FRAMES          = 0x3\n\tETHTOOL_A_COALESCE_RX_USECS_IRQ           = 0x4\n\tETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ      = 0x5\n\tETHTOOL_A_COALESCE_TX_USECS               = 0x6\n\tETHTOOL_A_COALESCE_TX_MAX_FRAMES          = 0x7\n\tETHTOOL_A_COALESCE_TX_USECS_IRQ           = 0x8\n\tETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ      = 0x9\n\tETHTOOL_A_COALESCE_STATS_BLOCK_USECS      = 0xa\n\tETHTOOL_A_COALESCE_USE_ADAPTIVE_RX        = 0xb\n\tETHTOOL_A_COALESCE_USE_ADAPTIVE_TX        = 0xc\n\tETHTOOL_A_COALESCE_PKT_RATE_LOW           = 0xd\n\tETHTOOL_A_COALESCE_RX_USECS_LOW           = 0xe\n\tETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW      = 0xf\n\tETHTOOL_A_COALESCE_TX_USECS_LOW           = 0x10\n\tETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW      = 0x11\n\tETHTOOL_A_COALESCE_PKT_RATE_HIGH          = 0x12\n\tETHTOOL_A_COALESCE_RX_USECS_HIGH          = 0x13\n\tETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH     = 0x14\n\tETHTOOL_A_COALESCE_TX_USECS_HIGH          = 0x15\n\tETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH     = 0x16\n\tETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL   = 0x17\n\tETHTOOL_A_COALESCE_USE_CQE_MODE_TX        = 0x18\n\tETHTOOL_A_COALESCE_USE_CQE_MODE_RX        = 0x19\n\tETHTOOL_A_COALESCE_MAX                    = 0x1e\n\tETHTOOL_A_PAUSE_UNSPEC                    = 0x0\n\tETHTOOL_A_PAUSE_HEADER                    = 0x1\n\tETHTOOL_A_PAUSE_AUTONEG                   = 0x2\n\tETHTOOL_A_PAUSE_RX                        = 0x3\n\tETHTOOL_A_PAUSE_TX                        = 0x4\n\tETHTOOL_A_PAUSE_STATS                     = 0x5\n\tETHTOOL_A_PAUSE_MAX                       = 0x6\n\tETHTOOL_A_PAUSE_STAT_UNSPEC               = 0x0\n\tETHTOOL_A_PAUSE_STAT_PAD                  = 0x1\n\tETHTOOL_A_PAUSE_STAT_TX_FRAMES            = 0x2\n\tETHTOOL_A_PAUSE_STAT_RX_FRAMES            = 0x3\n\tETHTOOL_A_PAUSE_STAT_MAX                  = 0x3\n\tETHTOOL_A_EEE_UNSPEC                      = 0x0\n\tETHTOOL_A_EEE_HEADER                      = 0x1\n\tETHTOOL_A_EEE_MODES_OURS                  = 0x2\n\tETHTOOL_A_EEE_MODES_PEER                  = 0x3\n\tETHTOOL_A_EEE_ACTIVE                      = 0x4\n\tETHTOOL_A_EEE_ENABLED                     = 0x5\n\tETHTOOL_A_EEE_TX_LPI_ENABLED              = 0x6\n\tETHTOOL_A_EEE_TX_LPI_TIMER                = 0x7\n\tETHTOOL_A_EEE_MAX                         = 0x7\n\tETHTOOL_A_TSINFO_UNSPEC                   = 0x0\n\tETHTOOL_A_TSINFO_HEADER                   = 0x1\n\tETHTOOL_A_TSINFO_TIMESTAMPING             = 0x2\n\tETHTOOL_A_TSINFO_TX_TYPES                 = 0x3\n\tETHTOOL_A_TSINFO_RX_FILTERS               = 0x4\n\tETHTOOL_A_TSINFO_PHC_INDEX                = 0x5\n\tETHTOOL_A_TSINFO_STATS                    = 0x6\n\tETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER        = 0x7\n\tETHTOOL_A_TSINFO_MAX                      = 0x9\n\tETHTOOL_A_CABLE_TEST_UNSPEC               = 0x0\n\tETHTOOL_A_CABLE_TEST_HEADER               = 0x1\n\tETHTOOL_A_CABLE_TEST_MAX                  = 0x1\n\tETHTOOL_A_CABLE_RESULT_CODE_UNSPEC        = 0x0\n\tETHTOOL_A_CABLE_RESULT_CODE_OK            = 0x1\n\tETHTOOL_A_CABLE_RESULT_CODE_OPEN          = 0x2\n\tETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT    = 0x3\n\tETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT   = 0x4\n\tETHTOOL_A_CABLE_PAIR_A                    = 0x0\n\tETHTOOL_A_CABLE_PAIR_B                    = 0x1\n\tETHTOOL_A_CABLE_PAIR_C                    = 0x2\n\tETHTOOL_A_CABLE_PAIR_D                    = 0x3\n\tETHTOOL_A_CABLE_RESULT_UNSPEC             = 0x0\n\tETHTOOL_A_CABLE_RESULT_PAIR               = 0x1\n\tETHTOOL_A_CABLE_RESULT_CODE               = 0x2\n\tETHTOOL_A_CABLE_RESULT_MAX                = 0x3\n\tETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC       = 0x0\n\tETHTOOL_A_CABLE_FAULT_LENGTH_PAIR         = 0x1\n\tETHTOOL_A_CABLE_FAULT_LENGTH_CM           = 0x2\n\tETHTOOL_A_CABLE_FAULT_LENGTH_MAX          = 0x3\n\tETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC    = 0x0\n\tETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED   = 0x1\n\tETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2\n\tETHTOOL_A_CABLE_NEST_UNSPEC               = 0x0\n\tETHTOOL_A_CABLE_NEST_RESULT               = 0x1\n\tETHTOOL_A_CABLE_NEST_FAULT_LENGTH         = 0x2\n\tETHTOOL_A_CABLE_NEST_MAX                  = 0x2\n\tETHTOOL_A_CABLE_TEST_NTF_UNSPEC           = 0x0\n\tETHTOOL_A_CABLE_TEST_NTF_HEADER           = 0x1\n\tETHTOOL_A_CABLE_TEST_NTF_STATUS           = 0x2\n\tETHTOOL_A_CABLE_TEST_NTF_NEST             = 0x3\n\tETHTOOL_A_CABLE_TEST_NTF_MAX              = 0x3\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC       = 0x0\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST        = 0x1\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_LAST         = 0x2\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_STEP         = 0x3\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR         = 0x4\n\tETHTOOL_A_CABLE_TEST_TDR_CFG_MAX          = 0x4\n\tETHTOOL_A_CABLE_TEST_TDR_UNSPEC           = 0x0\n\tETHTOOL_A_CABLE_TEST_TDR_HEADER           = 0x1\n\tETHTOOL_A_CABLE_TEST_TDR_CFG              = 0x2\n\tETHTOOL_A_CABLE_TEST_TDR_MAX              = 0x2\n\tETHTOOL_A_CABLE_AMPLITUDE_UNSPEC          = 0x0\n\tETHTOOL_A_CABLE_AMPLITUDE_PAIR            = 0x1\n\tETHTOOL_A_CABLE_AMPLITUDE_mV              = 0x2\n\tETHTOOL_A_CABLE_AMPLITUDE_MAX             = 0x2\n\tETHTOOL_A_CABLE_PULSE_UNSPEC              = 0x0\n\tETHTOOL_A_CABLE_PULSE_mV                  = 0x1\n\tETHTOOL_A_CABLE_PULSE_MAX                 = 0x1\n\tETHTOOL_A_CABLE_STEP_UNSPEC               = 0x0\n\tETHTOOL_A_CABLE_STEP_FIRST_DISTANCE       = 0x1\n\tETHTOOL_A_CABLE_STEP_LAST_DISTANCE        = 0x2\n\tETHTOOL_A_CABLE_STEP_STEP_DISTANCE        = 0x3\n\tETHTOOL_A_CABLE_STEP_MAX                  = 0x3\n\tETHTOOL_A_CABLE_TDR_NEST_UNSPEC           = 0x0\n\tETHTOOL_A_CABLE_TDR_NEST_STEP             = 0x1\n\tETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE        = 0x2\n\tETHTOOL_A_CABLE_TDR_NEST_PULSE            = 0x3\n\tETHTOOL_A_CABLE_TDR_NEST_MAX              = 0x3\n\tETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC       = 0x0\n\tETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER       = 0x1\n\tETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS       = 0x2\n\tETHTOOL_A_CABLE_TEST_TDR_NTF_NEST         = 0x3\n\tETHTOOL_A_CABLE_TEST_TDR_NTF_MAX          = 0x3\n\tETHTOOL_UDP_TUNNEL_TYPE_VXLAN             = 0x0\n\tETHTOOL_UDP_TUNNEL_TYPE_GENEVE            = 0x1\n\tETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE         = 0x2\n\tETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC         = 0x0\n\tETHTOOL_A_TUNNEL_UDP_ENTRY_PORT           = 0x1\n\tETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE           = 0x2\n\tETHTOOL_A_TUNNEL_UDP_ENTRY_MAX            = 0x2\n\tETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC         = 0x0\n\tETHTOOL_A_TUNNEL_UDP_TABLE_SIZE           = 0x1\n\tETHTOOL_A_TUNNEL_UDP_TABLE_TYPES          = 0x2\n\tETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY          = 0x3\n\tETHTOOL_A_TUNNEL_UDP_TABLE_MAX            = 0x3\n\tETHTOOL_A_TUNNEL_UDP_UNSPEC               = 0x0\n\tETHTOOL_A_TUNNEL_UDP_TABLE                = 0x1\n\tETHTOOL_A_TUNNEL_UDP_MAX                  = 0x1\n\tETHTOOL_A_TUNNEL_INFO_UNSPEC              = 0x0\n\tETHTOOL_A_TUNNEL_INFO_HEADER              = 0x1\n\tETHTOOL_A_TUNNEL_INFO_UDP_PORTS           = 0x2\n\tETHTOOL_A_TUNNEL_INFO_MAX                 = 0x2\n)\n\nconst (\n\tTCP_V4_FLOW    = 0x1\n\tUDP_V4_FLOW    = 0x2\n\tTCP_V6_FLOW    = 0x5\n\tUDP_V6_FLOW    = 0x6\n\tESP_V4_FLOW    = 0xa\n\tESP_V6_FLOW    = 0xc\n\tIP_USER_FLOW   = 0xd\n\tIPV6_USER_FLOW = 0xe\n\tIPV6_FLOW      = 0x11\n\tETHER_FLOW     = 0x12\n)\n\nconst SPEED_UNKNOWN = -0x1\n\ntype EthtoolDrvinfo struct {\n\tCmd          uint32\n\tDriver       [32]byte\n\tVersion      [32]byte\n\tFw_version   [32]byte\n\tBus_info     [32]byte\n\tErom_version [32]byte\n\tReserved2    [12]byte\n\tN_priv_flags uint32\n\tN_stats      uint32\n\tTestinfo_len uint32\n\tEedump_len   uint32\n\tRegdump_len  uint32\n}\n\ntype EthtoolTsInfo struct {\n\tCmd             uint32\n\tSo_timestamping uint32\n\tPhc_index       int32\n\tTx_types        uint32\n\tTx_reserved     [3]uint32\n\tRx_filters      uint32\n\tRx_reserved     [3]uint32\n}\n\ntype HwTstampConfig struct {\n\tFlags     int32\n\tTx_type   int32\n\tRx_filter int32\n}\n\nconst (\n\tHWTSTAMP_FILTER_NONE            = 0x0\n\tHWTSTAMP_FILTER_ALL             = 0x1\n\tHWTSTAMP_FILTER_SOME            = 0x2\n\tHWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3\n\tHWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6\n\tHWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9\n\tHWTSTAMP_FILTER_PTP_V2_EVENT    = 0xc\n)\n\nconst (\n\tHWTSTAMP_TX_OFF          = 0x0\n\tHWTSTAMP_TX_ON           = 0x1\n\tHWTSTAMP_TX_ONESTEP_SYNC = 0x2\n)\n\ntype (\n\tPtpClockCaps struct {\n\t\tMax_adj            int32\n\t\tN_alarm            int32\n\t\tN_ext_ts           int32\n\t\tN_per_out          int32\n\t\tPps                int32\n\t\tN_pins             int32\n\t\tCross_timestamping int32\n\t\tAdjust_phase       int32\n\t\tMax_phase_adj      int32\n\t\tRsv                [11]int32\n\t}\n\tPtpClockTime struct {\n\t\tSec      int64\n\t\tNsec     uint32\n\t\tReserved uint32\n\t}\n\tPtpExttsEvent struct {\n\t\tT     PtpClockTime\n\t\tIndex uint32\n\t\tFlags uint32\n\t\tRsv   [2]uint32\n\t}\n\tPtpExttsRequest struct {\n\t\tIndex uint32\n\t\tFlags uint32\n\t\tRsv   [2]uint32\n\t}\n\tPtpPeroutRequest struct {\n\t\tStartOrPhase PtpClockTime\n\t\tPeriod       PtpClockTime\n\t\tIndex        uint32\n\t\tFlags        uint32\n\t\tOn           PtpClockTime\n\t}\n\tPtpPinDesc struct {\n\t\tName  [64]byte\n\t\tIndex uint32\n\t\tFunc  uint32\n\t\tChan  uint32\n\t\tRsv   [5]uint32\n\t}\n\tPtpSysOffset struct {\n\t\tSamples uint32\n\t\tRsv     [3]uint32\n\t\tTs      [51]PtpClockTime\n\t}\n\tPtpSysOffsetExtended struct {\n\t\tSamples uint32\n\t\tClockid int32\n\t\tRsv     [2]uint32\n\t\tTs      [25][3]PtpClockTime\n\t}\n\tPtpSysOffsetPrecise struct {\n\t\tDevice   PtpClockTime\n\t\tRealtime PtpClockTime\n\t\tMonoraw  PtpClockTime\n\t\tRsv      [4]uint32\n\t}\n)\n\nconst (\n\tPTP_PF_NONE    = 0x0\n\tPTP_PF_EXTTS   = 0x1\n\tPTP_PF_PEROUT  = 0x2\n\tPTP_PF_PHYSYNC = 0x3\n)\n\ntype (\n\tHIDRawReportDescriptor struct {\n\t\tSize  uint32\n\t\tValue [4096]uint8\n\t}\n\tHIDRawDevInfo struct {\n\t\tBustype uint32\n\t\tVendor  int16\n\t\tProduct int16\n\t}\n)\n\nconst (\n\tCLOSE_RANGE_UNSHARE = 0x2\n\tCLOSE_RANGE_CLOEXEC = 0x4\n)\n\nconst (\n\tNLMSGERR_ATTR_MSG    = 0x1\n\tNLMSGERR_ATTR_OFFS   = 0x2\n\tNLMSGERR_ATTR_COOKIE = 0x3\n)\n\ntype (\n\tEraseInfo struct {\n\t\tStart  uint32\n\t\tLength uint32\n\t}\n\tEraseInfo64 struct {\n\t\tStart  uint64\n\t\tLength uint64\n\t}\n\tMtdOobBuf struct {\n\t\tStart  uint32\n\t\tLength uint32\n\t\tPtr    *uint8\n\t}\n\tMtdOobBuf64 struct {\n\t\tStart  uint64\n\t\tPad    uint32\n\t\tLength uint32\n\t\tPtr    uint64\n\t}\n\tMtdWriteReq struct {\n\t\tStart  uint64\n\t\tLen    uint64\n\t\tOoblen uint64\n\t\tData   uint64\n\t\tOob    uint64\n\t\tMode   uint8\n\t\t_      [7]uint8\n\t}\n\tMtdInfo struct {\n\t\tType      uint8\n\t\tFlags     uint32\n\t\tSize      uint32\n\t\tErasesize uint32\n\t\tWritesize uint32\n\t\tOobsize   uint32\n\t\t_         uint64\n\t}\n\tRegionInfo struct {\n\t\tOffset      uint32\n\t\tErasesize   uint32\n\t\tNumblocks   uint32\n\t\tRegionindex uint32\n\t}\n\tOtpInfo struct {\n\t\tStart  uint32\n\t\tLength uint32\n\t\tLocked uint32\n\t}\n\tNandOobinfo struct {\n\t\tUseecc   uint32\n\t\tEccbytes uint32\n\t\tOobfree  [8][2]uint32\n\t\tEccpos   [32]uint32\n\t}\n\tNandOobfree struct {\n\t\tOffset uint32\n\t\tLength uint32\n\t}\n\tNandEcclayout struct {\n\t\tEccbytes uint32\n\t\tEccpos   [64]uint32\n\t\tOobavail uint32\n\t\tOobfree  [8]NandOobfree\n\t}\n\tMtdEccStats struct {\n\t\tCorrected uint32\n\t\tFailed    uint32\n\t\tBadblocks uint32\n\t\tBbtblocks uint32\n\t}\n)\n\nconst (\n\tMTD_OPS_PLACE_OOB = 0x0\n\tMTD_OPS_AUTO_OOB  = 0x1\n\tMTD_OPS_RAW       = 0x2\n)\n\nconst (\n\tMTD_FILE_MODE_NORMAL      = 0x0\n\tMTD_FILE_MODE_OTP_FACTORY = 0x1\n\tMTD_FILE_MODE_OTP_USER    = 0x2\n\tMTD_FILE_MODE_RAW         = 0x3\n)\n\nconst (\n\tNFC_CMD_UNSPEC                    = 0x0\n\tNFC_CMD_GET_DEVICE                = 0x1\n\tNFC_CMD_DEV_UP                    = 0x2\n\tNFC_CMD_DEV_DOWN                  = 0x3\n\tNFC_CMD_DEP_LINK_UP               = 0x4\n\tNFC_CMD_DEP_LINK_DOWN             = 0x5\n\tNFC_CMD_START_POLL                = 0x6\n\tNFC_CMD_STOP_POLL                 = 0x7\n\tNFC_CMD_GET_TARGET                = 0x8\n\tNFC_EVENT_TARGETS_FOUND           = 0x9\n\tNFC_EVENT_DEVICE_ADDED            = 0xa\n\tNFC_EVENT_DEVICE_REMOVED          = 0xb\n\tNFC_EVENT_TARGET_LOST             = 0xc\n\tNFC_EVENT_TM_ACTIVATED            = 0xd\n\tNFC_EVENT_TM_DEACTIVATED          = 0xe\n\tNFC_CMD_LLC_GET_PARAMS            = 0xf\n\tNFC_CMD_LLC_SET_PARAMS            = 0x10\n\tNFC_CMD_ENABLE_SE                 = 0x11\n\tNFC_CMD_DISABLE_SE                = 0x12\n\tNFC_CMD_LLC_SDREQ                 = 0x13\n\tNFC_EVENT_LLC_SDRES               = 0x14\n\tNFC_CMD_FW_DOWNLOAD               = 0x15\n\tNFC_EVENT_SE_ADDED                = 0x16\n\tNFC_EVENT_SE_REMOVED              = 0x17\n\tNFC_EVENT_SE_CONNECTIVITY         = 0x18\n\tNFC_EVENT_SE_TRANSACTION          = 0x19\n\tNFC_CMD_GET_SE                    = 0x1a\n\tNFC_CMD_SE_IO                     = 0x1b\n\tNFC_CMD_ACTIVATE_TARGET           = 0x1c\n\tNFC_CMD_VENDOR                    = 0x1d\n\tNFC_CMD_DEACTIVATE_TARGET         = 0x1e\n\tNFC_ATTR_UNSPEC                   = 0x0\n\tNFC_ATTR_DEVICE_INDEX             = 0x1\n\tNFC_ATTR_DEVICE_NAME              = 0x2\n\tNFC_ATTR_PROTOCOLS                = 0x3\n\tNFC_ATTR_TARGET_INDEX             = 0x4\n\tNFC_ATTR_TARGET_SENS_RES          = 0x5\n\tNFC_ATTR_TARGET_SEL_RES           = 0x6\n\tNFC_ATTR_TARGET_NFCID1            = 0x7\n\tNFC_ATTR_TARGET_SENSB_RES         = 0x8\n\tNFC_ATTR_TARGET_SENSF_RES         = 0x9\n\tNFC_ATTR_COMM_MODE                = 0xa\n\tNFC_ATTR_RF_MODE                  = 0xb\n\tNFC_ATTR_DEVICE_POWERED           = 0xc\n\tNFC_ATTR_IM_PROTOCOLS             = 0xd\n\tNFC_ATTR_TM_PROTOCOLS             = 0xe\n\tNFC_ATTR_LLC_PARAM_LTO            = 0xf\n\tNFC_ATTR_LLC_PARAM_RW             = 0x10\n\tNFC_ATTR_LLC_PARAM_MIUX           = 0x11\n\tNFC_ATTR_SE                       = 0x12\n\tNFC_ATTR_LLC_SDP                  = 0x13\n\tNFC_ATTR_FIRMWARE_NAME            = 0x14\n\tNFC_ATTR_SE_INDEX                 = 0x15\n\tNFC_ATTR_SE_TYPE                  = 0x16\n\tNFC_ATTR_SE_AID                   = 0x17\n\tNFC_ATTR_FIRMWARE_DOWNLOAD_STATUS = 0x18\n\tNFC_ATTR_SE_APDU                  = 0x19\n\tNFC_ATTR_TARGET_ISO15693_DSFID    = 0x1a\n\tNFC_ATTR_TARGET_ISO15693_UID      = 0x1b\n\tNFC_ATTR_SE_PARAMS                = 0x1c\n\tNFC_ATTR_VENDOR_ID                = 0x1d\n\tNFC_ATTR_VENDOR_SUBCMD            = 0x1e\n\tNFC_ATTR_VENDOR_DATA              = 0x1f\n\tNFC_SDP_ATTR_UNSPEC               = 0x0\n\tNFC_SDP_ATTR_URI                  = 0x1\n\tNFC_SDP_ATTR_SAP                  = 0x2\n)\n\ntype LandlockRulesetAttr struct {\n\tAccess_fs  uint64\n\tAccess_net uint64\n\tScoped     uint64\n}\n\ntype LandlockPathBeneathAttr struct {\n\tAllowed_access uint64\n\tParent_fd      int32\n}\n\nconst (\n\tLANDLOCK_RULE_PATH_BENEATH = 0x1\n)\n\nconst (\n\tIPC_CREAT   = 0x200\n\tIPC_EXCL    = 0x400\n\tIPC_NOWAIT  = 0x800\n\tIPC_PRIVATE = 0x0\n\n\tipc_64 = 0x100\n)\n\nconst (\n\tIPC_RMID = 0x0\n\tIPC_SET  = 0x1\n\tIPC_STAT = 0x2\n)\n\nconst (\n\tSHM_RDONLY = 0x1000\n\tSHM_RND    = 0x2000\n)\n\ntype MountAttr struct {\n\tAttr_set    uint64\n\tAttr_clr    uint64\n\tPropagation uint64\n\tUserns_fd   uint64\n}\n\nconst (\n\tWG_CMD_GET_DEVICE                      = 0x0\n\tWG_CMD_SET_DEVICE                      = 0x1\n\tWGDEVICE_F_REPLACE_PEERS               = 0x1\n\tWGDEVICE_A_UNSPEC                      = 0x0\n\tWGDEVICE_A_IFINDEX                     = 0x1\n\tWGDEVICE_A_IFNAME                      = 0x2\n\tWGDEVICE_A_PRIVATE_KEY                 = 0x3\n\tWGDEVICE_A_PUBLIC_KEY                  = 0x4\n\tWGDEVICE_A_FLAGS                       = 0x5\n\tWGDEVICE_A_LISTEN_PORT                 = 0x6\n\tWGDEVICE_A_FWMARK                      = 0x7\n\tWGDEVICE_A_PEERS                       = 0x8\n\tWGPEER_F_REMOVE_ME                     = 0x1\n\tWGPEER_F_REPLACE_ALLOWEDIPS            = 0x2\n\tWGPEER_F_UPDATE_ONLY                   = 0x4\n\tWGPEER_A_UNSPEC                        = 0x0\n\tWGPEER_A_PUBLIC_KEY                    = 0x1\n\tWGPEER_A_PRESHARED_KEY                 = 0x2\n\tWGPEER_A_FLAGS                         = 0x3\n\tWGPEER_A_ENDPOINT                      = 0x4\n\tWGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL = 0x5\n\tWGPEER_A_LAST_HANDSHAKE_TIME           = 0x6\n\tWGPEER_A_RX_BYTES                      = 0x7\n\tWGPEER_A_TX_BYTES                      = 0x8\n\tWGPEER_A_ALLOWEDIPS                    = 0x9\n\tWGPEER_A_PROTOCOL_VERSION              = 0xa\n\tWGALLOWEDIP_A_UNSPEC                   = 0x0\n\tWGALLOWEDIP_A_FAMILY                   = 0x1\n\tWGALLOWEDIP_A_IPADDR                   = 0x2\n\tWGALLOWEDIP_A_CIDR_MASK                = 0x3\n)\n\nconst (\n\tNL_ATTR_TYPE_INVALID      = 0x0\n\tNL_ATTR_TYPE_FLAG         = 0x1\n\tNL_ATTR_TYPE_U8           = 0x2\n\tNL_ATTR_TYPE_U16          = 0x3\n\tNL_ATTR_TYPE_U32          = 0x4\n\tNL_ATTR_TYPE_U64          = 0x5\n\tNL_ATTR_TYPE_S8           = 0x6\n\tNL_ATTR_TYPE_S16          = 0x7\n\tNL_ATTR_TYPE_S32          = 0x8\n\tNL_ATTR_TYPE_S64          = 0x9\n\tNL_ATTR_TYPE_BINARY       = 0xa\n\tNL_ATTR_TYPE_STRING       = 0xb\n\tNL_ATTR_TYPE_NUL_STRING   = 0xc\n\tNL_ATTR_TYPE_NESTED       = 0xd\n\tNL_ATTR_TYPE_NESTED_ARRAY = 0xe\n\tNL_ATTR_TYPE_BITFIELD32   = 0xf\n\n\tNL_POLICY_TYPE_ATTR_UNSPEC          = 0x0\n\tNL_POLICY_TYPE_ATTR_TYPE            = 0x1\n\tNL_POLICY_TYPE_ATTR_MIN_VALUE_S     = 0x2\n\tNL_POLICY_TYPE_ATTR_MAX_VALUE_S     = 0x3\n\tNL_POLICY_TYPE_ATTR_MIN_VALUE_U     = 0x4\n\tNL_POLICY_TYPE_ATTR_MAX_VALUE_U     = 0x5\n\tNL_POLICY_TYPE_ATTR_MIN_LENGTH      = 0x6\n\tNL_POLICY_TYPE_ATTR_MAX_LENGTH      = 0x7\n\tNL_POLICY_TYPE_ATTR_POLICY_IDX      = 0x8\n\tNL_POLICY_TYPE_ATTR_POLICY_MAXTYPE  = 0x9\n\tNL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 0xa\n\tNL_POLICY_TYPE_ATTR_PAD             = 0xb\n\tNL_POLICY_TYPE_ATTR_MASK            = 0xc\n\tNL_POLICY_TYPE_ATTR_MAX             = 0xc\n)\n\ntype CANBitTiming struct {\n\tBitrate      uint32\n\tSample_point uint32\n\tTq           uint32\n\tProp_seg     uint32\n\tPhase_seg1   uint32\n\tPhase_seg2   uint32\n\tSjw          uint32\n\tBrp          uint32\n}\n\ntype CANBitTimingConst struct {\n\tName      [16]uint8\n\tTseg1_min uint32\n\tTseg1_max uint32\n\tTseg2_min uint32\n\tTseg2_max uint32\n\tSjw_max   uint32\n\tBrp_min   uint32\n\tBrp_max   uint32\n\tBrp_inc   uint32\n}\n\ntype CANClock struct {\n\tFreq uint32\n}\n\ntype CANBusErrorCounters struct {\n\tTxerr uint16\n\tRxerr uint16\n}\n\ntype CANCtrlMode struct {\n\tMask  uint32\n\tFlags uint32\n}\n\ntype CANDeviceStats struct {\n\tBus_error        uint32\n\tError_warning    uint32\n\tError_passive    uint32\n\tBus_off          uint32\n\tArbitration_lost uint32\n\tRestarts         uint32\n}\n\nconst (\n\tCAN_STATE_ERROR_ACTIVE  = 0x0\n\tCAN_STATE_ERROR_WARNING = 0x1\n\tCAN_STATE_ERROR_PASSIVE = 0x2\n\tCAN_STATE_BUS_OFF       = 0x3\n\tCAN_STATE_STOPPED       = 0x4\n\tCAN_STATE_SLEEPING      = 0x5\n\tCAN_STATE_MAX           = 0x6\n)\n\nconst (\n\tIFLA_CAN_UNSPEC               = 0x0\n\tIFLA_CAN_BITTIMING            = 0x1\n\tIFLA_CAN_BITTIMING_CONST      = 0x2\n\tIFLA_CAN_CLOCK                = 0x3\n\tIFLA_CAN_STATE                = 0x4\n\tIFLA_CAN_CTRLMODE             = 0x5\n\tIFLA_CAN_RESTART_MS           = 0x6\n\tIFLA_CAN_RESTART              = 0x7\n\tIFLA_CAN_BERR_COUNTER         = 0x8\n\tIFLA_CAN_DATA_BITTIMING       = 0x9\n\tIFLA_CAN_DATA_BITTIMING_CONST = 0xa\n\tIFLA_CAN_TERMINATION          = 0xb\n\tIFLA_CAN_TERMINATION_CONST    = 0xc\n\tIFLA_CAN_BITRATE_CONST        = 0xd\n\tIFLA_CAN_DATA_BITRATE_CONST   = 0xe\n\tIFLA_CAN_BITRATE_MAX          = 0xf\n)\n\ntype KCMAttach struct {\n\tFd     int32\n\tBpf_fd int32\n}\n\ntype KCMUnattach struct {\n\tFd int32\n}\n\ntype KCMClone struct {\n\tFd int32\n}\n\nconst (\n\tNL80211_AC_BE                                           = 0x2\n\tNL80211_AC_BK                                           = 0x3\n\tNL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED                 = 0x0\n\tNL80211_ACL_POLICY_DENY_UNLESS_LISTED                   = 0x1\n\tNL80211_AC_VI                                           = 0x1\n\tNL80211_AC_VO                                           = 0x0\n\tNL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT               = 0x1\n\tNL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT            = 0x2\n\tNL80211_AP_SME_SA_QUERY_OFFLOAD                         = 0x1\n\tNL80211_ATTR_4ADDR                                      = 0x53\n\tNL80211_ATTR_ACK                                        = 0x5c\n\tNL80211_ATTR_ACK_SIGNAL                                 = 0x107\n\tNL80211_ATTR_ACL_POLICY                                 = 0xa5\n\tNL80211_ATTR_ADMITTED_TIME                              = 0xd4\n\tNL80211_ATTR_AIRTIME_WEIGHT                             = 0x112\n\tNL80211_ATTR_AKM_SUITES                                 = 0x4c\n\tNL80211_ATTR_AP_ISOLATE                                 = 0x60\n\tNL80211_ATTR_AP_SETTINGS_FLAGS                          = 0x135\n\tNL80211_ATTR_ASSOC_SPP_AMSDU                            = 0x14a\n\tNL80211_ATTR_AUTH_DATA                                  = 0x9c\n\tNL80211_ATTR_AUTH_TYPE                                  = 0x35\n\tNL80211_ATTR_BANDS                                      = 0xef\n\tNL80211_ATTR_BEACON_HEAD                                = 0xe\n\tNL80211_ATTR_BEACON_INTERVAL                            = 0xc\n\tNL80211_ATTR_BEACON_TAIL                                = 0xf\n\tNL80211_ATTR_BG_SCAN_PERIOD                             = 0x98\n\tNL80211_ATTR_BSS_BASIC_RATES                            = 0x24\n\tNL80211_ATTR_BSS                                        = 0x2f\n\tNL80211_ATTR_BSS_CTS_PROT                               = 0x1c\n\tNL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA                  = 0x147\n\tNL80211_ATTR_BSS_HT_OPMODE                              = 0x6d\n\tNL80211_ATTR_BSSID                                      = 0xf5\n\tNL80211_ATTR_BSS_SELECT                                 = 0xe3\n\tNL80211_ATTR_BSS_SHORT_PREAMBLE                         = 0x1d\n\tNL80211_ATTR_BSS_SHORT_SLOT_TIME                        = 0x1e\n\tNL80211_ATTR_CENTER_FREQ1                               = 0xa0\n\tNL80211_ATTR_CENTER_FREQ1_OFFSET                        = 0x123\n\tNL80211_ATTR_CENTER_FREQ2                               = 0xa1\n\tNL80211_ATTR_CHANNEL_WIDTH                              = 0x9f\n\tNL80211_ATTR_CH_SWITCH_BLOCK_TX                         = 0xb8\n\tNL80211_ATTR_CH_SWITCH_COUNT                            = 0xb7\n\tNL80211_ATTR_CIPHER_SUITE_GROUP                         = 0x4a\n\tNL80211_ATTR_CIPHER_SUITES                              = 0x39\n\tNL80211_ATTR_CIPHER_SUITES_PAIRWISE                     = 0x49\n\tNL80211_ATTR_CNTDWN_OFFS_BEACON                         = 0xba\n\tNL80211_ATTR_CNTDWN_OFFS_PRESP                          = 0xbb\n\tNL80211_ATTR_COALESCE_RULE                              = 0xb6\n\tNL80211_ATTR_COALESCE_RULE_CONDITION                    = 0x2\n\tNL80211_ATTR_COALESCE_RULE_DELAY                        = 0x1\n\tNL80211_ATTR_COALESCE_RULE_MAX                          = 0x3\n\tNL80211_ATTR_COALESCE_RULE_PKT_PATTERN                  = 0x3\n\tNL80211_ATTR_COLOR_CHANGE_COLOR                         = 0x130\n\tNL80211_ATTR_COLOR_CHANGE_COUNT                         = 0x12f\n\tNL80211_ATTR_COLOR_CHANGE_ELEMS                         = 0x131\n\tNL80211_ATTR_CONN_FAILED_REASON                         = 0x9b\n\tNL80211_ATTR_CONTROL_PORT                               = 0x44\n\tNL80211_ATTR_CONTROL_PORT_ETHERTYPE                     = 0x66\n\tNL80211_ATTR_CONTROL_PORT_NO_ENCRYPT                    = 0x67\n\tNL80211_ATTR_CONTROL_PORT_NO_PREAUTH                    = 0x11e\n\tNL80211_ATTR_CONTROL_PORT_OVER_NL80211                  = 0x108\n\tNL80211_ATTR_COOKIE                                     = 0x58\n\tNL80211_ATTR_CQM_BEACON_LOSS_EVENT                      = 0x8\n\tNL80211_ATTR_CQM                                        = 0x5e\n\tNL80211_ATTR_CQM_MAX                                    = 0x9\n\tNL80211_ATTR_CQM_PKT_LOSS_EVENT                         = 0x4\n\tNL80211_ATTR_CQM_RSSI_HYST                              = 0x2\n\tNL80211_ATTR_CQM_RSSI_LEVEL                             = 0x9\n\tNL80211_ATTR_CQM_RSSI_THOLD                             = 0x1\n\tNL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT                   = 0x3\n\tNL80211_ATTR_CQM_TXE_INTVL                              = 0x7\n\tNL80211_ATTR_CQM_TXE_PKTS                               = 0x6\n\tNL80211_ATTR_CQM_TXE_RATE                               = 0x5\n\tNL80211_ATTR_CRIT_PROT_ID                               = 0xb3\n\tNL80211_ATTR_CSA_C_OFF_BEACON                           = 0xba\n\tNL80211_ATTR_CSA_C_OFF_PRESP                            = 0xbb\n\tNL80211_ATTR_CSA_C_OFFSETS_TX                           = 0xcd\n\tNL80211_ATTR_CSA_IES                                    = 0xb9\n\tNL80211_ATTR_DEVICE_AP_SME                              = 0x8d\n\tNL80211_ATTR_DFS_CAC_TIME                               = 0x7\n\tNL80211_ATTR_DFS_REGION                                 = 0x92\n\tNL80211_ATTR_DISABLE_EHT                                = 0x137\n\tNL80211_ATTR_DISABLE_HE                                 = 0x12d\n\tNL80211_ATTR_DISABLE_HT                                 = 0x93\n\tNL80211_ATTR_DISABLE_VHT                                = 0xaf\n\tNL80211_ATTR_DISCONNECTED_BY_AP                         = 0x47\n\tNL80211_ATTR_DONT_WAIT_FOR_ACK                          = 0x8e\n\tNL80211_ATTR_DTIM_PERIOD                                = 0xd\n\tNL80211_ATTR_DURATION                                   = 0x57\n\tNL80211_ATTR_EHT_CAPABILITY                             = 0x136\n\tNL80211_ATTR_EMA_RNR_ELEMS                              = 0x145\n\tNL80211_ATTR_EML_CAPABILITY                             = 0x13d\n\tNL80211_ATTR_EXT_CAPA                                   = 0xa9\n\tNL80211_ATTR_EXT_CAPA_MASK                              = 0xaa\n\tNL80211_ATTR_EXTERNAL_AUTH_ACTION                       = 0x104\n\tNL80211_ATTR_EXTERNAL_AUTH_SUPPORT                      = 0x105\n\tNL80211_ATTR_EXT_FEATURES                               = 0xd9\n\tNL80211_ATTR_FEATURE_FLAGS                              = 0x8f\n\tNL80211_ATTR_FILS_CACHE_ID                              = 0xfd\n\tNL80211_ATTR_FILS_DISCOVERY                             = 0x126\n\tNL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM                      = 0xfb\n\tNL80211_ATTR_FILS_ERP_REALM                             = 0xfa\n\tNL80211_ATTR_FILS_ERP_RRK                               = 0xfc\n\tNL80211_ATTR_FILS_ERP_USERNAME                          = 0xf9\n\tNL80211_ATTR_FILS_KEK                                   = 0xf2\n\tNL80211_ATTR_FILS_NONCES                                = 0xf3\n\tNL80211_ATTR_FRAME                                      = 0x33\n\tNL80211_ATTR_FRAME_MATCH                                = 0x5b\n\tNL80211_ATTR_FRAME_TYPE                                 = 0x65\n\tNL80211_ATTR_FREQ_AFTER                                 = 0x3b\n\tNL80211_ATTR_FREQ_BEFORE                                = 0x3a\n\tNL80211_ATTR_FREQ_FIXED                                 = 0x3c\n\tNL80211_ATTR_FREQ_RANGE_END                             = 0x3\n\tNL80211_ATTR_FREQ_RANGE_MAX_BW                          = 0x4\n\tNL80211_ATTR_FREQ_RANGE_START                           = 0x2\n\tNL80211_ATTR_FTM_RESPONDER                              = 0x10e\n\tNL80211_ATTR_FTM_RESPONDER_STATS                        = 0x10f\n\tNL80211_ATTR_GENERATION                                 = 0x2e\n\tNL80211_ATTR_HANDLE_DFS                                 = 0xbf\n\tNL80211_ATTR_HE_6GHZ_CAPABILITY                         = 0x125\n\tNL80211_ATTR_HE_BSS_COLOR                               = 0x11b\n\tNL80211_ATTR_HE_CAPABILITY                              = 0x10d\n\tNL80211_ATTR_HE_OBSS_PD                                 = 0x117\n\tNL80211_ATTR_HIDDEN_SSID                                = 0x7e\n\tNL80211_ATTR_HT_CAPABILITY                              = 0x1f\n\tNL80211_ATTR_HT_CAPABILITY_MASK                         = 0x94\n\tNL80211_ATTR_HW_TIMESTAMP_ENABLED                       = 0x144\n\tNL80211_ATTR_IE_ASSOC_RESP                              = 0x80\n\tNL80211_ATTR_IE                                         = 0x2a\n\tNL80211_ATTR_IE_PROBE_RESP                              = 0x7f\n\tNL80211_ATTR_IE_RIC                                     = 0xb2\n\tNL80211_ATTR_IFACE_SOCKET_OWNER                         = 0xcc\n\tNL80211_ATTR_IFINDEX                                    = 0x3\n\tNL80211_ATTR_IFNAME                                     = 0x4\n\tNL80211_ATTR_IFTYPE_AKM_SUITES                          = 0x11c\n\tNL80211_ATTR_IFTYPE                                     = 0x5\n\tNL80211_ATTR_IFTYPE_EXT_CAPA                            = 0xe6\n\tNL80211_ATTR_INACTIVITY_TIMEOUT                         = 0x96\n\tNL80211_ATTR_INTERFACE_COMBINATIONS                     = 0x78\n\tNL80211_ATTR_KEY_CIPHER                                 = 0x9\n\tNL80211_ATTR_KEY                                        = 0x50\n\tNL80211_ATTR_KEY_DATA                                   = 0x7\n\tNL80211_ATTR_KEY_DEFAULT                                = 0xb\n\tNL80211_ATTR_KEY_DEFAULT_MGMT                           = 0x28\n\tNL80211_ATTR_KEY_DEFAULT_TYPES                          = 0x6e\n\tNL80211_ATTR_KEY_IDX                                    = 0x8\n\tNL80211_ATTR_KEYS                                       = 0x51\n\tNL80211_ATTR_KEY_SEQ                                    = 0xa\n\tNL80211_ATTR_KEY_TYPE                                   = 0x37\n\tNL80211_ATTR_LOCAL_MESH_POWER_MODE                      = 0xa4\n\tNL80211_ATTR_LOCAL_STATE_CHANGE                         = 0x5f\n\tNL80211_ATTR_MAC_ACL_MAX                                = 0xa7\n\tNL80211_ATTR_MAC_ADDRS                                  = 0xa6\n\tNL80211_ATTR_MAC                                        = 0x6\n\tNL80211_ATTR_MAC_HINT                                   = 0xc8\n\tNL80211_ATTR_MAC_MASK                                   = 0xd7\n\tNL80211_ATTR_MAX_AP_ASSOC_STA                           = 0xca\n\tNL80211_ATTR_MAX                                        = 0x151\n\tNL80211_ATTR_MAX_CRIT_PROT_DURATION                     = 0xb4\n\tNL80211_ATTR_MAX_CSA_COUNTERS                           = 0xce\n\tNL80211_ATTR_MAX_HW_TIMESTAMP_PEERS                     = 0x143\n\tNL80211_ATTR_MAX_MATCH_SETS                             = 0x85\n\tNL80211_ATTR_MAX_NUM_AKM_SUITES                         = 0x13c\n\tNL80211_ATTR_MAX_NUM_PMKIDS                             = 0x56\n\tNL80211_ATTR_MAX_NUM_SCAN_SSIDS                         = 0x2b\n\tNL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS                   = 0xde\n\tNL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS                   = 0x7b\n\tNL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION             = 0x6f\n\tNL80211_ATTR_MAX_SCAN_IE_LEN                            = 0x38\n\tNL80211_ATTR_MAX_SCAN_PLAN_INTERVAL                     = 0xdf\n\tNL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS                   = 0xe0\n\tNL80211_ATTR_MAX_SCHED_SCAN_IE_LEN                      = 0x7c\n\tNL80211_ATTR_MBSSID_CONFIG                              = 0x132\n\tNL80211_ATTR_MBSSID_ELEMS                               = 0x133\n\tNL80211_ATTR_MCAST_RATE                                 = 0x6b\n\tNL80211_ATTR_MDID                                       = 0xb1\n\tNL80211_ATTR_MEASUREMENT_DURATION                       = 0xeb\n\tNL80211_ATTR_MEASUREMENT_DURATION_MANDATORY             = 0xec\n\tNL80211_ATTR_MESH_CONFIG                                = 0x23\n\tNL80211_ATTR_MESH_ID                                    = 0x18\n\tNL80211_ATTR_MESH_PEER_AID                              = 0xed\n\tNL80211_ATTR_MESH_SETUP                                 = 0x70\n\tNL80211_ATTR_MGMT_SUBTYPE                               = 0x29\n\tNL80211_ATTR_MLD_ADDR                                   = 0x13a\n\tNL80211_ATTR_MLD_CAPA_AND_OPS                           = 0x13e\n\tNL80211_ATTR_MLO_LINK_DISABLED                          = 0x146\n\tNL80211_ATTR_MLO_LINK_ID                                = 0x139\n\tNL80211_ATTR_MLO_LINKS                                  = 0x138\n\tNL80211_ATTR_MLO_SUPPORT                                = 0x13b\n\tNL80211_ATTR_MLO_TTLM_DLINK                             = 0x148\n\tNL80211_ATTR_MLO_TTLM_ULINK                             = 0x149\n\tNL80211_ATTR_MNTR_FLAGS                                 = 0x17\n\tNL80211_ATTR_MPATH_INFO                                 = 0x1b\n\tNL80211_ATTR_MPATH_NEXT_HOP                             = 0x1a\n\tNL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED               = 0xf4\n\tNL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR                    = 0xe8\n\tNL80211_ATTR_MU_MIMO_GROUP_DATA                         = 0xe7\n\tNL80211_ATTR_NAN_FUNC                                   = 0xf0\n\tNL80211_ATTR_NAN_MASTER_PREF                            = 0xee\n\tNL80211_ATTR_NAN_MATCH                                  = 0xf1\n\tNL80211_ATTR_NETNS_FD                                   = 0xdb\n\tNL80211_ATTR_NOACK_MAP                                  = 0x95\n\tNL80211_ATTR_NSS                                        = 0x106\n\tNL80211_ATTR_OBSS_COLOR_BITMAP                          = 0x12e\n\tNL80211_ATTR_OFFCHANNEL_TX_OK                           = 0x6c\n\tNL80211_ATTR_OPER_CLASS                                 = 0xd6\n\tNL80211_ATTR_OPMODE_NOTIF                               = 0xc2\n\tNL80211_ATTR_P2P_CTWINDOW                               = 0xa2\n\tNL80211_ATTR_P2P_OPPPS                                  = 0xa3\n\tNL80211_ATTR_PAD                                        = 0xe5\n\tNL80211_ATTR_PBSS                                       = 0xe2\n\tNL80211_ATTR_PEER_AID                                   = 0xb5\n\tNL80211_ATTR_PEER_MEASUREMENTS                          = 0x111\n\tNL80211_ATTR_PID                                        = 0x52\n\tNL80211_ATTR_PMK                                        = 0xfe\n\tNL80211_ATTR_PMKID                                      = 0x55\n\tNL80211_ATTR_PMK_LIFETIME                               = 0x11f\n\tNL80211_ATTR_PMKR0_NAME                                 = 0x102\n\tNL80211_ATTR_PMK_REAUTH_THRESHOLD                       = 0x120\n\tNL80211_ATTR_PMKSA_CANDIDATE                            = 0x86\n\tNL80211_ATTR_PORT_AUTHORIZED                            = 0x103\n\tNL80211_ATTR_POWER_RULE_MAX_ANT_GAIN                    = 0x5\n\tNL80211_ATTR_POWER_RULE_MAX_EIRP                        = 0x6\n\tNL80211_ATTR_POWER_RULE_PSD                             = 0x8\n\tNL80211_ATTR_PREV_BSSID                                 = 0x4f\n\tNL80211_ATTR_PRIVACY                                    = 0x46\n\tNL80211_ATTR_PROBE_RESP                                 = 0x91\n\tNL80211_ATTR_PROBE_RESP_OFFLOAD                         = 0x90\n\tNL80211_ATTR_PROTOCOL_FEATURES                          = 0xad\n\tNL80211_ATTR_PS_STATE                                   = 0x5d\n\tNL80211_ATTR_PUNCT_BITMAP                               = 0x142\n\tNL80211_ATTR_QOS_MAP                                    = 0xc7\n\tNL80211_ATTR_RADAR_BACKGROUND                           = 0x134\n\tNL80211_ATTR_RADAR_EVENT                                = 0xa8\n\tNL80211_ATTR_REASON_CODE                                = 0x36\n\tNL80211_ATTR_RECEIVE_MULTICAST                          = 0x121\n\tNL80211_ATTR_RECONNECT_REQUESTED                        = 0x12b\n\tNL80211_ATTR_REG_ALPHA2                                 = 0x21\n\tNL80211_ATTR_REG_INDOOR                                 = 0xdd\n\tNL80211_ATTR_REG_INITIATOR                              = 0x30\n\tNL80211_ATTR_REG_RULE_FLAGS                             = 0x1\n\tNL80211_ATTR_REG_RULES                                  = 0x22\n\tNL80211_ATTR_REG_TYPE                                   = 0x31\n\tNL80211_ATTR_REKEY_DATA                                 = 0x7a\n\tNL80211_ATTR_REQ_IE                                     = 0x4d\n\tNL80211_ATTR_RESP_IE                                    = 0x4e\n\tNL80211_ATTR_ROAM_SUPPORT                               = 0x83\n\tNL80211_ATTR_RX_FRAME_TYPES                             = 0x64\n\tNL80211_ATTR_RX_HW_TIMESTAMP                            = 0x140\n\tNL80211_ATTR_RXMGMT_FLAGS                               = 0xbc\n\tNL80211_ATTR_RX_SIGNAL_DBM                              = 0x97\n\tNL80211_ATTR_S1G_CAPABILITY                             = 0x128\n\tNL80211_ATTR_S1G_CAPABILITY_MASK                        = 0x129\n\tNL80211_ATTR_SAE_DATA                                   = 0x9c\n\tNL80211_ATTR_SAE_PASSWORD                               = 0x115\n\tNL80211_ATTR_SAE_PWE                                    = 0x12a\n\tNL80211_ATTR_SAR_SPEC                                   = 0x12c\n\tNL80211_ATTR_SCAN_FLAGS                                 = 0x9e\n\tNL80211_ATTR_SCAN_FREQ_KHZ                              = 0x124\n\tNL80211_ATTR_SCAN_FREQUENCIES                           = 0x2c\n\tNL80211_ATTR_SCAN_GENERATION                            = 0x2e\n\tNL80211_ATTR_SCAN_SSIDS                                 = 0x2d\n\tNL80211_ATTR_SCAN_START_TIME_TSF_BSSID                  = 0xea\n\tNL80211_ATTR_SCAN_START_TIME_TSF                        = 0xe9\n\tNL80211_ATTR_SCAN_SUPP_RATES                            = 0x7d\n\tNL80211_ATTR_SCHED_SCAN_DELAY                           = 0xdc\n\tNL80211_ATTR_SCHED_SCAN_INTERVAL                        = 0x77\n\tNL80211_ATTR_SCHED_SCAN_MATCH                           = 0x84\n\tNL80211_ATTR_SCHED_SCAN_MATCH_SSID                      = 0x1\n\tNL80211_ATTR_SCHED_SCAN_MAX_REQS                        = 0x100\n\tNL80211_ATTR_SCHED_SCAN_MULTI                           = 0xff\n\tNL80211_ATTR_SCHED_SCAN_PLANS                           = 0xe1\n\tNL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI                   = 0xf6\n\tNL80211_ATTR_SCHED_SCAN_RSSI_ADJUST                     = 0xf7\n\tNL80211_ATTR_SMPS_MODE                                  = 0xd5\n\tNL80211_ATTR_SOCKET_OWNER                               = 0xcc\n\tNL80211_ATTR_SOFTWARE_IFTYPES                           = 0x79\n\tNL80211_ATTR_SPLIT_WIPHY_DUMP                           = 0xae\n\tNL80211_ATTR_SSID                                       = 0x34\n\tNL80211_ATTR_STA_AID                                    = 0x10\n\tNL80211_ATTR_STA_CAPABILITY                             = 0xab\n\tNL80211_ATTR_STA_EXT_CAPABILITY                         = 0xac\n\tNL80211_ATTR_STA_FLAGS2                                 = 0x43\n\tNL80211_ATTR_STA_FLAGS                                  = 0x11\n\tNL80211_ATTR_STA_INFO                                   = 0x15\n\tNL80211_ATTR_STA_LISTEN_INTERVAL                        = 0x12\n\tNL80211_ATTR_STA_PLINK_ACTION                           = 0x19\n\tNL80211_ATTR_STA_PLINK_STATE                            = 0x74\n\tNL80211_ATTR_STA_SUPPORTED_CHANNELS                     = 0xbd\n\tNL80211_ATTR_STA_SUPPORTED_OPER_CLASSES                 = 0xbe\n\tNL80211_ATTR_STA_SUPPORTED_RATES                        = 0x13\n\tNL80211_ATTR_STA_SUPPORT_P2P_PS                         = 0xe4\n\tNL80211_ATTR_STATUS_CODE                                = 0x48\n\tNL80211_ATTR_STA_TX_POWER                               = 0x114\n\tNL80211_ATTR_STA_TX_POWER_SETTING                       = 0x113\n\tNL80211_ATTR_STA_VLAN                                   = 0x14\n\tNL80211_ATTR_STA_WME                                    = 0x81\n\tNL80211_ATTR_SUPPORT_10_MHZ                             = 0xc1\n\tNL80211_ATTR_SUPPORT_5_MHZ                              = 0xc0\n\tNL80211_ATTR_SUPPORT_AP_UAPSD                           = 0x82\n\tNL80211_ATTR_SUPPORTED_COMMANDS                         = 0x32\n\tNL80211_ATTR_SUPPORTED_IFTYPES                          = 0x20\n\tNL80211_ATTR_SUPPORT_IBSS_RSN                           = 0x68\n\tNL80211_ATTR_SUPPORT_MESH_AUTH                          = 0x73\n\tNL80211_ATTR_SURVEY_INFO                                = 0x54\n\tNL80211_ATTR_SURVEY_RADIO_STATS                         = 0xda\n\tNL80211_ATTR_TD_BITMAP                                  = 0x141\n\tNL80211_ATTR_TDLS_ACTION                                = 0x88\n\tNL80211_ATTR_TDLS_DIALOG_TOKEN                          = 0x89\n\tNL80211_ATTR_TDLS_EXTERNAL_SETUP                        = 0x8c\n\tNL80211_ATTR_TDLS_INITIATOR                             = 0xcf\n\tNL80211_ATTR_TDLS_OPERATION                             = 0x8a\n\tNL80211_ATTR_TDLS_PEER_CAPABILITY                       = 0xcb\n\tNL80211_ATTR_TDLS_SUPPORT                               = 0x8b\n\tNL80211_ATTR_TESTDATA                                   = 0x45\n\tNL80211_ATTR_TID_CONFIG                                 = 0x11d\n\tNL80211_ATTR_TIMED_OUT                                  = 0x41\n\tNL80211_ATTR_TIMEOUT                                    = 0x110\n\tNL80211_ATTR_TIMEOUT_REASON                             = 0xf8\n\tNL80211_ATTR_TSID                                       = 0xd2\n\tNL80211_ATTR_TWT_RESPONDER                              = 0x116\n\tNL80211_ATTR_TX_FRAME_TYPES                             = 0x63\n\tNL80211_ATTR_TX_HW_TIMESTAMP                            = 0x13f\n\tNL80211_ATTR_TX_NO_CCK_RATE                             = 0x87\n\tNL80211_ATTR_TXQ_LIMIT                                  = 0x10a\n\tNL80211_ATTR_TXQ_MEMORY_LIMIT                           = 0x10b\n\tNL80211_ATTR_TXQ_QUANTUM                                = 0x10c\n\tNL80211_ATTR_TXQ_STATS                                  = 0x109\n\tNL80211_ATTR_TX_RATES                                   = 0x5a\n\tNL80211_ATTR_UNSOL_BCAST_PROBE_RESP                     = 0x127\n\tNL80211_ATTR_UNSPEC                                     = 0x0\n\tNL80211_ATTR_USE_MFP                                    = 0x42\n\tNL80211_ATTR_USER_PRIO                                  = 0xd3\n\tNL80211_ATTR_USER_REG_HINT_TYPE                         = 0x9a\n\tNL80211_ATTR_USE_RRM                                    = 0xd0\n\tNL80211_ATTR_VENDOR_DATA                                = 0xc5\n\tNL80211_ATTR_VENDOR_EVENTS                              = 0xc6\n\tNL80211_ATTR_VENDOR_ID                                  = 0xc3\n\tNL80211_ATTR_VENDOR_SUBCMD                              = 0xc4\n\tNL80211_ATTR_VHT_CAPABILITY                             = 0x9d\n\tNL80211_ATTR_VHT_CAPABILITY_MASK                        = 0xb0\n\tNL80211_ATTR_VLAN_ID                                    = 0x11a\n\tNL80211_ATTR_WANT_1X_4WAY_HS                            = 0x101\n\tNL80211_ATTR_WDEV                                       = 0x99\n\tNL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX                     = 0x72\n\tNL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX                     = 0x71\n\tNL80211_ATTR_WIPHY_ANTENNA_RX                           = 0x6a\n\tNL80211_ATTR_WIPHY_ANTENNA_TX                           = 0x69\n\tNL80211_ATTR_WIPHY_BANDS                                = 0x16\n\tNL80211_ATTR_WIPHY_CHANNEL_TYPE                         = 0x27\n\tNL80211_ATTR_WIPHY                                      = 0x1\n\tNL80211_ATTR_WIPHY_COVERAGE_CLASS                       = 0x59\n\tNL80211_ATTR_WIPHY_DYN_ACK                              = 0xd1\n\tNL80211_ATTR_WIPHY_EDMG_BW_CONFIG                       = 0x119\n\tNL80211_ATTR_WIPHY_EDMG_CHANNELS                        = 0x118\n\tNL80211_ATTR_WIPHY_FRAG_THRESHOLD                       = 0x3f\n\tNL80211_ATTR_WIPHY_FREQ                                 = 0x26\n\tNL80211_ATTR_WIPHY_FREQ_HINT                            = 0xc9\n\tNL80211_ATTR_WIPHY_FREQ_OFFSET                          = 0x122\n\tNL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS               = 0x14c\n\tNL80211_ATTR_WIPHY_NAME                                 = 0x2\n\tNL80211_ATTR_WIPHY_RADIOS                               = 0x14b\n\tNL80211_ATTR_WIPHY_RETRY_LONG                           = 0x3e\n\tNL80211_ATTR_WIPHY_RETRY_SHORT                          = 0x3d\n\tNL80211_ATTR_WIPHY_RTS_THRESHOLD                        = 0x40\n\tNL80211_ATTR_WIPHY_SELF_MANAGED_REG                     = 0xd8\n\tNL80211_ATTR_WIPHY_TX_POWER_LEVEL                       = 0x62\n\tNL80211_ATTR_WIPHY_TX_POWER_SETTING                     = 0x61\n\tNL80211_ATTR_WIPHY_TXQ_PARAMS                           = 0x25\n\tNL80211_ATTR_WOWLAN_TRIGGERS                            = 0x75\n\tNL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED                  = 0x76\n\tNL80211_ATTR_WPA_VERSIONS                               = 0x4b\n\tNL80211_AUTHTYPE_AUTOMATIC                              = 0x8\n\tNL80211_AUTHTYPE_FILS_PK                                = 0x7\n\tNL80211_AUTHTYPE_FILS_SK                                = 0x5\n\tNL80211_AUTHTYPE_FILS_SK_PFS                            = 0x6\n\tNL80211_AUTHTYPE_FT                                     = 0x2\n\tNL80211_AUTHTYPE_MAX                                    = 0x7\n\tNL80211_AUTHTYPE_NETWORK_EAP                            = 0x3\n\tNL80211_AUTHTYPE_OPEN_SYSTEM                            = 0x0\n\tNL80211_AUTHTYPE_SAE                                    = 0x4\n\tNL80211_AUTHTYPE_SHARED_KEY                             = 0x1\n\tNL80211_BAND_2GHZ                                       = 0x0\n\tNL80211_BAND_5GHZ                                       = 0x1\n\tNL80211_BAND_60GHZ                                      = 0x2\n\tNL80211_BAND_6GHZ                                       = 0x3\n\tNL80211_BAND_ATTR_EDMG_BW_CONFIG                        = 0xb\n\tNL80211_BAND_ATTR_EDMG_CHANNELS                         = 0xa\n\tNL80211_BAND_ATTR_FREQS                                 = 0x1\n\tNL80211_BAND_ATTR_HT_AMPDU_DENSITY                      = 0x6\n\tNL80211_BAND_ATTR_HT_AMPDU_FACTOR                       = 0x5\n\tNL80211_BAND_ATTR_HT_CAPA                               = 0x4\n\tNL80211_BAND_ATTR_HT_MCS_SET                            = 0x3\n\tNL80211_BAND_ATTR_IFTYPE_DATA                           = 0x9\n\tNL80211_BAND_ATTR_MAX                                   = 0xd\n\tNL80211_BAND_ATTR_RATES                                 = 0x2\n\tNL80211_BAND_ATTR_S1G_CAPA                              = 0xd\n\tNL80211_BAND_ATTR_S1G_MCS_NSS_SET                       = 0xc\n\tNL80211_BAND_ATTR_VHT_CAPA                              = 0x8\n\tNL80211_BAND_ATTR_VHT_MCS_SET                           = 0x7\n\tNL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC                    = 0x8\n\tNL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET                = 0xa\n\tNL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY                    = 0x9\n\tNL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE                    = 0xb\n\tNL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA                   = 0x6\n\tNL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC                     = 0x2\n\tNL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET                 = 0x4\n\tNL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY                     = 0x3\n\tNL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE                     = 0x5\n\tNL80211_BAND_IFTYPE_ATTR_IFTYPES                        = 0x1\n\tNL80211_BAND_IFTYPE_ATTR_MAX                            = 0xb\n\tNL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS                   = 0x7\n\tNL80211_BAND_LC                                         = 0x5\n\tNL80211_BAND_S1GHZ                                      = 0x4\n\tNL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE                 = 0x2\n\tNL80211_BITRATE_ATTR_MAX                                = 0x2\n\tNL80211_BITRATE_ATTR_RATE                               = 0x1\n\tNL80211_BSS_BEACON_IES                                  = 0xb\n\tNL80211_BSS_BEACON_INTERVAL                             = 0x4\n\tNL80211_BSS_BEACON_TSF                                  = 0xd\n\tNL80211_BSS_BSSID                                       = 0x1\n\tNL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH                = 0x2\n\tNL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY                  = 0x1\n\tNL80211_BSS_CANNOT_USE_REASONS                          = 0x18\n\tNL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH                 = 0x2\n\tNL80211_BSS_CAPABILITY                                  = 0x5\n\tNL80211_BSS_CHAIN_SIGNAL                                = 0x13\n\tNL80211_BSS_CHAN_WIDTH_10                               = 0x1\n\tNL80211_BSS_CHAN_WIDTH_1                                = 0x3\n\tNL80211_BSS_CHAN_WIDTH_20                               = 0x0\n\tNL80211_BSS_CHAN_WIDTH_2                                = 0x4\n\tNL80211_BSS_CHAN_WIDTH_5                                = 0x2\n\tNL80211_BSS_CHAN_WIDTH                                  = 0xc\n\tNL80211_BSS_FREQUENCY                                   = 0x2\n\tNL80211_BSS_FREQUENCY_OFFSET                            = 0x14\n\tNL80211_BSS_INFORMATION_ELEMENTS                        = 0x6\n\tNL80211_BSS_LAST_SEEN_BOOTTIME                          = 0xf\n\tNL80211_BSS_MAX                                         = 0x18\n\tNL80211_BSS_MLD_ADDR                                    = 0x16\n\tNL80211_BSS_MLO_LINK_ID                                 = 0x15\n\tNL80211_BSS_PAD                                         = 0x10\n\tNL80211_BSS_PARENT_BSSID                                = 0x12\n\tNL80211_BSS_PARENT_TSF                                  = 0x11\n\tNL80211_BSS_PRESP_DATA                                  = 0xe\n\tNL80211_BSS_SEEN_MS_AGO                                 = 0xa\n\tNL80211_BSS_SELECT_ATTR_BAND_PREF                       = 0x2\n\tNL80211_BSS_SELECT_ATTR_MAX                             = 0x3\n\tNL80211_BSS_SELECT_ATTR_RSSI_ADJUST                     = 0x3\n\tNL80211_BSS_SELECT_ATTR_RSSI                            = 0x1\n\tNL80211_BSS_SIGNAL_MBM                                  = 0x7\n\tNL80211_BSS_SIGNAL_UNSPEC                               = 0x8\n\tNL80211_BSS_STATUS_ASSOCIATED                           = 0x1\n\tNL80211_BSS_STATUS_AUTHENTICATED                        = 0x0\n\tNL80211_BSS_STATUS                                      = 0x9\n\tNL80211_BSS_STATUS_IBSS_JOINED                          = 0x2\n\tNL80211_BSS_TSF                                         = 0x3\n\tNL80211_BSS_USE_FOR                                     = 0x17\n\tNL80211_BSS_USE_FOR_MLD_LINK                            = 0x2\n\tNL80211_BSS_USE_FOR_NORMAL                              = 0x1\n\tNL80211_CHAN_HT20                                       = 0x1\n\tNL80211_CHAN_HT40MINUS                                  = 0x2\n\tNL80211_CHAN_HT40PLUS                                   = 0x3\n\tNL80211_CHAN_NO_HT                                      = 0x0\n\tNL80211_CHAN_WIDTH_10                                   = 0x7\n\tNL80211_CHAN_WIDTH_160                                  = 0x5\n\tNL80211_CHAN_WIDTH_16                                   = 0xc\n\tNL80211_CHAN_WIDTH_1                                    = 0x8\n\tNL80211_CHAN_WIDTH_20                                   = 0x1\n\tNL80211_CHAN_WIDTH_20_NOHT                              = 0x0\n\tNL80211_CHAN_WIDTH_2                                    = 0x9\n\tNL80211_CHAN_WIDTH_320                                  = 0xd\n\tNL80211_CHAN_WIDTH_40                                   = 0x2\n\tNL80211_CHAN_WIDTH_4                                    = 0xa\n\tNL80211_CHAN_WIDTH_5                                    = 0x6\n\tNL80211_CHAN_WIDTH_80                                   = 0x3\n\tNL80211_CHAN_WIDTH_80P80                                = 0x4\n\tNL80211_CHAN_WIDTH_8                                    = 0xb\n\tNL80211_CMD_ABORT_SCAN                                  = 0x72\n\tNL80211_CMD_ACTION                                      = 0x3b\n\tNL80211_CMD_ACTION_TX_STATUS                            = 0x3c\n\tNL80211_CMD_ADD_LINK                                    = 0x94\n\tNL80211_CMD_ADD_LINK_STA                                = 0x96\n\tNL80211_CMD_ADD_NAN_FUNCTION                            = 0x75\n\tNL80211_CMD_ADD_TX_TS                                   = 0x69\n\tNL80211_CMD_ASSOC_COMEBACK                              = 0x93\n\tNL80211_CMD_ASSOCIATE                                   = 0x26\n\tNL80211_CMD_AUTHENTICATE                                = 0x25\n\tNL80211_CMD_CANCEL_REMAIN_ON_CHANNEL                    = 0x38\n\tNL80211_CMD_CHANGE_NAN_CONFIG                           = 0x77\n\tNL80211_CMD_CHANNEL_SWITCH                              = 0x66\n\tNL80211_CMD_CH_SWITCH_NOTIFY                            = 0x58\n\tNL80211_CMD_CH_SWITCH_STARTED_NOTIFY                    = 0x6e\n\tNL80211_CMD_COLOR_CHANGE_ABORTED                        = 0x90\n\tNL80211_CMD_COLOR_CHANGE_COMPLETED                      = 0x91\n\tNL80211_CMD_COLOR_CHANGE_REQUEST                        = 0x8e\n\tNL80211_CMD_COLOR_CHANGE_STARTED                        = 0x8f\n\tNL80211_CMD_CONNECT                                     = 0x2e\n\tNL80211_CMD_CONN_FAILED                                 = 0x5b\n\tNL80211_CMD_CONTROL_PORT_FRAME                          = 0x81\n\tNL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS                = 0x8b\n\tNL80211_CMD_CRIT_PROTOCOL_START                         = 0x62\n\tNL80211_CMD_CRIT_PROTOCOL_STOP                          = 0x63\n\tNL80211_CMD_DEAUTHENTICATE                              = 0x27\n\tNL80211_CMD_DEL_BEACON                                  = 0x10\n\tNL80211_CMD_DEL_INTERFACE                               = 0x8\n\tNL80211_CMD_DEL_KEY                                     = 0xc\n\tNL80211_CMD_DEL_MPATH                                   = 0x18\n\tNL80211_CMD_DEL_NAN_FUNCTION                            = 0x76\n\tNL80211_CMD_DEL_PMK                                     = 0x7c\n\tNL80211_CMD_DEL_PMKSA                                   = 0x35\n\tNL80211_CMD_DEL_STATION                                 = 0x14\n\tNL80211_CMD_DEL_TX_TS                                   = 0x6a\n\tNL80211_CMD_DEL_WIPHY                                   = 0x4\n\tNL80211_CMD_DISASSOCIATE                                = 0x28\n\tNL80211_CMD_DISCONNECT                                  = 0x30\n\tNL80211_CMD_EXTERNAL_AUTH                               = 0x7f\n\tNL80211_CMD_FLUSH_PMKSA                                 = 0x36\n\tNL80211_CMD_FRAME                                       = 0x3b\n\tNL80211_CMD_FRAME_TX_STATUS                             = 0x3c\n\tNL80211_CMD_FRAME_WAIT_CANCEL                           = 0x43\n\tNL80211_CMD_FT_EVENT                                    = 0x61\n\tNL80211_CMD_GET_BEACON                                  = 0xd\n\tNL80211_CMD_GET_COALESCE                                = 0x64\n\tNL80211_CMD_GET_FTM_RESPONDER_STATS                     = 0x82\n\tNL80211_CMD_GET_INTERFACE                               = 0x5\n\tNL80211_CMD_GET_KEY                                     = 0x9\n\tNL80211_CMD_GET_MESH_CONFIG                             = 0x1c\n\tNL80211_CMD_GET_MESH_PARAMS                             = 0x1c\n\tNL80211_CMD_GET_MPATH                                   = 0x15\n\tNL80211_CMD_GET_MPP                                     = 0x6b\n\tNL80211_CMD_GET_POWER_SAVE                              = 0x3e\n\tNL80211_CMD_GET_PROTOCOL_FEATURES                       = 0x5f\n\tNL80211_CMD_GET_REG                                     = 0x1f\n\tNL80211_CMD_GET_SCAN                                    = 0x20\n\tNL80211_CMD_GET_STATION                                 = 0x11\n\tNL80211_CMD_GET_SURVEY                                  = 0x32\n\tNL80211_CMD_GET_WIPHY                                   = 0x1\n\tNL80211_CMD_GET_WOWLAN                                  = 0x49\n\tNL80211_CMD_JOIN_IBSS                                   = 0x2b\n\tNL80211_CMD_JOIN_MESH                                   = 0x44\n\tNL80211_CMD_JOIN_OCB                                    = 0x6c\n\tNL80211_CMD_LEAVE_IBSS                                  = 0x2c\n\tNL80211_CMD_LEAVE_MESH                                  = 0x45\n\tNL80211_CMD_LEAVE_OCB                                   = 0x6d\n\tNL80211_CMD_LINKS_REMOVED                               = 0x9a\n\tNL80211_CMD_MAX                                         = 0x9d\n\tNL80211_CMD_MICHAEL_MIC_FAILURE                         = 0x29\n\tNL80211_CMD_MODIFY_LINK_STA                             = 0x97\n\tNL80211_CMD_NAN_MATCH                                   = 0x78\n\tNL80211_CMD_NEW_BEACON                                  = 0xf\n\tNL80211_CMD_NEW_INTERFACE                               = 0x7\n\tNL80211_CMD_NEW_KEY                                     = 0xb\n\tNL80211_CMD_NEW_MPATH                                   = 0x17\n\tNL80211_CMD_NEW_PEER_CANDIDATE                          = 0x48\n\tNL80211_CMD_NEW_SCAN_RESULTS                            = 0x22\n\tNL80211_CMD_NEW_STATION                                 = 0x13\n\tNL80211_CMD_NEW_SURVEY_RESULTS                          = 0x33\n\tNL80211_CMD_NEW_WIPHY                                   = 0x3\n\tNL80211_CMD_NOTIFY_CQM                                  = 0x40\n\tNL80211_CMD_NOTIFY_RADAR                                = 0x86\n\tNL80211_CMD_OBSS_COLOR_COLLISION                        = 0x8d\n\tNL80211_CMD_PEER_MEASUREMENT_COMPLETE                   = 0x85\n\tNL80211_CMD_PEER_MEASUREMENT_RESULT                     = 0x84\n\tNL80211_CMD_PEER_MEASUREMENT_START                      = 0x83\n\tNL80211_CMD_PMKSA_CANDIDATE                             = 0x50\n\tNL80211_CMD_PORT_AUTHORIZED                             = 0x7d\n\tNL80211_CMD_PROBE_CLIENT                                = 0x54\n\tNL80211_CMD_PROBE_MESH_LINK                             = 0x88\n\tNL80211_CMD_RADAR_DETECT                                = 0x5e\n\tNL80211_CMD_REG_BEACON_HINT                             = 0x2a\n\tNL80211_CMD_REG_CHANGE                                  = 0x24\n\tNL80211_CMD_REGISTER_ACTION                             = 0x3a\n\tNL80211_CMD_REGISTER_BEACONS                            = 0x55\n\tNL80211_CMD_REGISTER_FRAME                              = 0x3a\n\tNL80211_CMD_RELOAD_REGDB                                = 0x7e\n\tNL80211_CMD_REMAIN_ON_CHANNEL                           = 0x37\n\tNL80211_CMD_REMOVE_LINK                                 = 0x95\n\tNL80211_CMD_REMOVE_LINK_STA                             = 0x98\n\tNL80211_CMD_REQ_SET_REG                                 = 0x1b\n\tNL80211_CMD_ROAM                                        = 0x2f\n\tNL80211_CMD_SCAN_ABORTED                                = 0x23\n\tNL80211_CMD_SCHED_SCAN_RESULTS                          = 0x4d\n\tNL80211_CMD_SCHED_SCAN_STOPPED                          = 0x4e\n\tNL80211_CMD_SET_BEACON                                  = 0xe\n\tNL80211_CMD_SET_BSS                                     = 0x19\n\tNL80211_CMD_SET_CHANNEL                                 = 0x41\n\tNL80211_CMD_SET_COALESCE                                = 0x65\n\tNL80211_CMD_SET_CQM                                     = 0x3f\n\tNL80211_CMD_SET_FILS_AAD                                = 0x92\n\tNL80211_CMD_SET_HW_TIMESTAMP                            = 0x99\n\tNL80211_CMD_SET_INTERFACE                               = 0x6\n\tNL80211_CMD_SET_KEY                                     = 0xa\n\tNL80211_CMD_SET_MAC_ACL                                 = 0x5d\n\tNL80211_CMD_SET_MCAST_RATE                              = 0x5c\n\tNL80211_CMD_SET_MESH_CONFIG                             = 0x1d\n\tNL80211_CMD_SET_MESH_PARAMS                             = 0x1d\n\tNL80211_CMD_SET_MGMT_EXTRA_IE                           = 0x1e\n\tNL80211_CMD_SET_MPATH                                   = 0x16\n\tNL80211_CMD_SET_MULTICAST_TO_UNICAST                    = 0x79\n\tNL80211_CMD_SET_NOACK_MAP                               = 0x57\n\tNL80211_CMD_SET_PMK                                     = 0x7b\n\tNL80211_CMD_SET_PMKSA                                   = 0x34\n\tNL80211_CMD_SET_POWER_SAVE                              = 0x3d\n\tNL80211_CMD_SET_QOS_MAP                                 = 0x68\n\tNL80211_CMD_SET_REG                                     = 0x1a\n\tNL80211_CMD_SET_REKEY_OFFLOAD                           = 0x4f\n\tNL80211_CMD_SET_SAR_SPECS                               = 0x8c\n\tNL80211_CMD_SET_STATION                                 = 0x12\n\tNL80211_CMD_SET_TID_CONFIG                              = 0x89\n\tNL80211_CMD_SET_TID_TO_LINK_MAPPING                     = 0x9b\n\tNL80211_CMD_SET_TX_BITRATE_MASK                         = 0x39\n\tNL80211_CMD_SET_WDS_PEER                                = 0x42\n\tNL80211_CMD_SET_WIPHY                                   = 0x2\n\tNL80211_CMD_SET_WIPHY_NETNS                             = 0x31\n\tNL80211_CMD_SET_WOWLAN                                  = 0x4a\n\tNL80211_CMD_STA_OPMODE_CHANGED                          = 0x80\n\tNL80211_CMD_START_AP                                    = 0xf\n\tNL80211_CMD_START_NAN                                   = 0x73\n\tNL80211_CMD_START_P2P_DEVICE                            = 0x59\n\tNL80211_CMD_START_SCHED_SCAN                            = 0x4b\n\tNL80211_CMD_STOP_AP                                     = 0x10\n\tNL80211_CMD_STOP_NAN                                    = 0x74\n\tNL80211_CMD_STOP_P2P_DEVICE                             = 0x5a\n\tNL80211_CMD_STOP_SCHED_SCAN                             = 0x4c\n\tNL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH                  = 0x70\n\tNL80211_CMD_TDLS_CHANNEL_SWITCH                         = 0x6f\n\tNL80211_CMD_TDLS_MGMT                                   = 0x52\n\tNL80211_CMD_TDLS_OPER                                   = 0x51\n\tNL80211_CMD_TESTMODE                                    = 0x2d\n\tNL80211_CMD_TRIGGER_SCAN                                = 0x21\n\tNL80211_CMD_UNEXPECTED_4ADDR_FRAME                      = 0x56\n\tNL80211_CMD_UNEXPECTED_FRAME                            = 0x53\n\tNL80211_CMD_UNPROT_BEACON                               = 0x8a\n\tNL80211_CMD_UNPROT_DEAUTHENTICATE                       = 0x46\n\tNL80211_CMD_UNPROT_DISASSOCIATE                         = 0x47\n\tNL80211_CMD_UNSPEC                                      = 0x0\n\tNL80211_CMD_UPDATE_CONNECT_PARAMS                       = 0x7a\n\tNL80211_CMD_UPDATE_FT_IES                               = 0x60\n\tNL80211_CMD_UPDATE_OWE_INFO                             = 0x87\n\tNL80211_CMD_VENDOR                                      = 0x67\n\tNL80211_CMD_WIPHY_REG_CHANGE                            = 0x71\n\tNL80211_COALESCE_CONDITION_MATCH                        = 0x0\n\tNL80211_COALESCE_CONDITION_NO_MATCH                     = 0x1\n\tNL80211_CONN_FAIL_BLOCKED_CLIENT                        = 0x1\n\tNL80211_CONN_FAIL_MAX_CLIENTS                           = 0x0\n\tNL80211_CQM_RSSI_BEACON_LOSS_EVENT                      = 0x2\n\tNL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH                   = 0x1\n\tNL80211_CQM_RSSI_THRESHOLD_EVENT_LOW                    = 0x0\n\tNL80211_CQM_TXE_MAX_INTVL                               = 0x708\n\tNL80211_CRIT_PROTO_APIPA                                = 0x3\n\tNL80211_CRIT_PROTO_DHCP                                 = 0x1\n\tNL80211_CRIT_PROTO_EAPOL                                = 0x2\n\tNL80211_CRIT_PROTO_MAX_DURATION                         = 0x1388\n\tNL80211_CRIT_PROTO_UNSPEC                               = 0x0\n\tNL80211_DFS_AVAILABLE                                   = 0x2\n\tNL80211_DFS_ETSI                                        = 0x2\n\tNL80211_DFS_FCC                                         = 0x1\n\tNL80211_DFS_JP                                          = 0x3\n\tNL80211_DFS_UNAVAILABLE                                 = 0x1\n\tNL80211_DFS_UNSET                                       = 0x0\n\tNL80211_DFS_USABLE                                      = 0x0\n\tNL80211_EDMG_BW_CONFIG_MAX                              = 0xf\n\tNL80211_EDMG_BW_CONFIG_MIN                              = 0x4\n\tNL80211_EDMG_CHANNELS_MAX                               = 0x3c\n\tNL80211_EDMG_CHANNELS_MIN                               = 0x1\n\tNL80211_EHT_MAX_CAPABILITY_LEN                          = 0x33\n\tNL80211_EHT_MIN_CAPABILITY_LEN                          = 0xd\n\tNL80211_EXTERNAL_AUTH_ABORT                             = 0x1\n\tNL80211_EXTERNAL_AUTH_START                             = 0x0\n\tNL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK               = 0x32\n\tNL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X               = 0x10\n\tNL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK              = 0xf\n\tNL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP             = 0x12\n\tNL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT                  = 0x1b\n\tNL80211_EXT_FEATURE_AIRTIME_FAIRNESS                    = 0x21\n\tNL80211_EXT_FEATURE_AP_PMKSA_CACHING                    = 0x22\n\tNL80211_EXT_FEATURE_AQL                                 = 0x28\n\tNL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA           = 0x40\n\tNL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT            = 0x2e\n\tNL80211_EXT_FEATURE_BEACON_PROTECTION                   = 0x29\n\tNL80211_EXT_FEATURE_BEACON_RATE_HE                      = 0x36\n\tNL80211_EXT_FEATURE_BEACON_RATE_HT                      = 0x7\n\tNL80211_EXT_FEATURE_BEACON_RATE_LEGACY                  = 0x6\n\tNL80211_EXT_FEATURE_BEACON_RATE_VHT                     = 0x8\n\tNL80211_EXT_FEATURE_BSS_COLOR                           = 0x3a\n\tNL80211_EXT_FEATURE_BSS_PARENT_TSF                      = 0x4\n\tNL80211_EXT_FEATURE_CAN_REPLACE_PTK0                    = 0x1f\n\tNL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH             = 0x2a\n\tNL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211           = 0x1a\n\tNL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS = 0x30\n\tNL80211_EXT_FEATURE_CQM_RSSI_LIST                       = 0xd\n\tNL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT             = 0x1b\n\tNL80211_EXT_FEATURE_DEL_IBSS_STA                        = 0x2c\n\tNL80211_EXT_FEATURE_DFS_CONCURRENT                      = 0x43\n\tNL80211_EXT_FEATURE_DFS_OFFLOAD                         = 0x19\n\tNL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER                = 0x20\n\tNL80211_EXT_FEATURE_EXT_KEY_ID                          = 0x24\n\tNL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD                 = 0x3b\n\tNL80211_EXT_FEATURE_FILS_DISCOVERY                      = 0x34\n\tNL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME               = 0x11\n\tNL80211_EXT_FEATURE_FILS_SK_OFFLOAD                     = 0xe\n\tNL80211_EXT_FEATURE_FILS_STA                            = 0x9\n\tNL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN                  = 0x18\n\tNL80211_EXT_FEATURE_LOW_POWER_SCAN                      = 0x17\n\tNL80211_EXT_FEATURE_LOW_SPAN_SCAN                       = 0x16\n\tNL80211_EXT_FEATURE_MFP_OPTIONAL                        = 0x15\n\tNL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA                   = 0xa\n\tNL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED         = 0xb\n\tNL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS             = 0x2d\n\tNL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER                 = 0x2\n\tNL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION  = 0x14\n\tNL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE          = 0x13\n\tNL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION        = 0x31\n\tNL80211_EXT_FEATURE_OWE_OFFLOAD_AP                      = 0x42\n\tNL80211_EXT_FEATURE_OWE_OFFLOAD                         = 0x41\n\tNL80211_EXT_FEATURE_POWERED_ADDR_CHANGE                 = 0x3d\n\tNL80211_EXT_FEATURE_PROTECTED_TWT                       = 0x2b\n\tNL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE         = 0x39\n\tNL80211_EXT_FEATURE_PUNCT                               = 0x3e\n\tNL80211_EXT_FEATURE_RADAR_BACKGROUND                    = 0x3c\n\tNL80211_EXT_FEATURE_RRM                                 = 0x1\n\tNL80211_EXT_FEATURE_SAE_OFFLOAD_AP                      = 0x33\n\tNL80211_EXT_FEATURE_SAE_OFFLOAD                         = 0x26\n\tNL80211_EXT_FEATURE_SCAN_FREQ_KHZ                       = 0x2f\n\tNL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT               = 0x1e\n\tNL80211_EXT_FEATURE_SCAN_RANDOM_SN                      = 0x1d\n\tNL80211_EXT_FEATURE_SCAN_START_TIME                     = 0x3\n\tNL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23\n\tNL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI            = 0xc\n\tNL80211_EXT_FEATURE_SECURE_LTF                          = 0x37\n\tNL80211_EXT_FEATURE_SECURE_NAN                          = 0x3f\n\tNL80211_EXT_FEATURE_SECURE_RTT                          = 0x38\n\tNL80211_EXT_FEATURE_SET_SCAN_DWELL                      = 0x5\n\tNL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT                   = 0x44\n\tNL80211_EXT_FEATURE_STA_TX_PWR                          = 0x25\n\tNL80211_EXT_FEATURE_TXQS                                = 0x1c\n\tNL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP              = 0x35\n\tNL80211_EXT_FEATURE_VHT_IBSS                            = 0x0\n\tNL80211_EXT_FEATURE_VLAN_OFFLOAD                        = 0x27\n\tNL80211_FEATURE_ACKTO_ESTIMATION                        = 0x800000\n\tNL80211_FEATURE_ACTIVE_MONITOR                          = 0x20000\n\tNL80211_FEATURE_ADVERTISE_CHAN_LIMITS                   = 0x4000\n\tNL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE               = 0x40000\n\tNL80211_FEATURE_AP_SCAN                                 = 0x100\n\tNL80211_FEATURE_CELL_BASE_REG_HINTS                     = 0x8\n\tNL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES               = 0x80000\n\tNL80211_FEATURE_DYNAMIC_SMPS                            = 0x2000000\n\tNL80211_FEATURE_FULL_AP_CLIENT_STATE                    = 0x8000\n\tNL80211_FEATURE_HT_IBSS                                 = 0x2\n\tNL80211_FEATURE_INACTIVITY_TIMER                        = 0x4\n\tNL80211_FEATURE_LOW_PRIORITY_SCAN                       = 0x40\n\tNL80211_FEATURE_MAC_ON_CREATE                           = 0x8000000\n\tNL80211_FEATURE_ND_RANDOM_MAC_ADDR                      = 0x80000000\n\tNL80211_FEATURE_NEED_OBSS_SCAN                          = 0x400\n\tNL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL                = 0x10\n\tNL80211_FEATURE_P2P_GO_CTWIN                            = 0x800\n\tNL80211_FEATURE_P2P_GO_OPPPS                            = 0x1000\n\tNL80211_FEATURE_QUIET                                   = 0x200000\n\tNL80211_FEATURE_SAE                                     = 0x20\n\tNL80211_FEATURE_SCAN_FLUSH                              = 0x80\n\tNL80211_FEATURE_SCAN_RANDOM_MAC_ADDR                    = 0x20000000\n\tNL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR              = 0x40000000\n\tNL80211_FEATURE_SK_TX_STATUS                            = 0x1\n\tNL80211_FEATURE_STATIC_SMPS                             = 0x1000000\n\tNL80211_FEATURE_SUPPORTS_WMM_ADMISSION                  = 0x4000000\n\tNL80211_FEATURE_TDLS_CHANNEL_SWITCH                     = 0x10000000\n\tNL80211_FEATURE_TX_POWER_INSERTION                      = 0x400000\n\tNL80211_FEATURE_USERSPACE_MPM                           = 0x10000\n\tNL80211_FEATURE_VIF_TXPOWER                             = 0x200\n\tNL80211_FEATURE_WFA_TPC_IE_IN_PROBES                    = 0x100000\n\tNL80211_FILS_DISCOVERY_ATTR_INT_MAX                     = 0x2\n\tNL80211_FILS_DISCOVERY_ATTR_INT_MIN                     = 0x1\n\tNL80211_FILS_DISCOVERY_ATTR_MAX                         = 0x3\n\tNL80211_FILS_DISCOVERY_ATTR_TMPL                        = 0x3\n\tNL80211_FILS_DISCOVERY_TMPL_MIN_LEN                     = 0x2a\n\tNL80211_FREQUENCY_ATTR_16MHZ                            = 0x19\n\tNL80211_FREQUENCY_ATTR_1MHZ                             = 0x15\n\tNL80211_FREQUENCY_ATTR_2MHZ                             = 0x16\n\tNL80211_FREQUENCY_ATTR_4MHZ                             = 0x17\n\tNL80211_FREQUENCY_ATTR_8MHZ                             = 0x18\n\tNL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP                = 0x21\n\tNL80211_FREQUENCY_ATTR_CAN_MONITOR                      = 0x20\n\tNL80211_FREQUENCY_ATTR_DFS_CAC_TIME                     = 0xd\n\tNL80211_FREQUENCY_ATTR_DFS_CONCURRENT                   = 0x1d\n\tNL80211_FREQUENCY_ATTR_DFS_STATE                        = 0x7\n\tNL80211_FREQUENCY_ATTR_DFS_TIME                         = 0x8\n\tNL80211_FREQUENCY_ATTR_DISABLED                         = 0x2\n\tNL80211_FREQUENCY_ATTR_FREQ                             = 0x1\n\tNL80211_FREQUENCY_ATTR_GO_CONCURRENT                    = 0xf\n\tNL80211_FREQUENCY_ATTR_INDOOR_ONLY                      = 0xe\n\tNL80211_FREQUENCY_ATTR_IR_CONCURRENT                    = 0xf\n\tNL80211_FREQUENCY_ATTR_MAX                              = 0x22\n\tNL80211_FREQUENCY_ATTR_MAX_TX_POWER                     = 0x6\n\tNL80211_FREQUENCY_ATTR_NO_10MHZ                         = 0x11\n\tNL80211_FREQUENCY_ATTR_NO_160MHZ                        = 0xc\n\tNL80211_FREQUENCY_ATTR_NO_20MHZ                         = 0x10\n\tNL80211_FREQUENCY_ATTR_NO_320MHZ                        = 0x1a\n\tNL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT               = 0x1f\n\tNL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT               = 0x1e\n\tNL80211_FREQUENCY_ATTR_NO_80MHZ                         = 0xb\n\tNL80211_FREQUENCY_ATTR_NO_EHT                           = 0x1b\n\tNL80211_FREQUENCY_ATTR_NO_HE                            = 0x13\n\tNL80211_FREQUENCY_ATTR_NO_HT40_MINUS                    = 0x9\n\tNL80211_FREQUENCY_ATTR_NO_HT40_PLUS                     = 0xa\n\tNL80211_FREQUENCY_ATTR_NO_IBSS                          = 0x3\n\tNL80211_FREQUENCY_ATTR_NO_IR                            = 0x3\n\tNL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT                = 0x1f\n\tNL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT                = 0x1e\n\tNL80211_FREQUENCY_ATTR_OFFSET                           = 0x14\n\tNL80211_FREQUENCY_ATTR_PASSIVE_SCAN                     = 0x3\n\tNL80211_FREQUENCY_ATTR_PSD                              = 0x1c\n\tNL80211_FREQUENCY_ATTR_RADAR                            = 0x5\n\tNL80211_FREQUENCY_ATTR_WMM                              = 0x12\n\tNL80211_FTM_RESP_ATTR_CIVICLOC                          = 0x3\n\tNL80211_FTM_RESP_ATTR_ENABLED                           = 0x1\n\tNL80211_FTM_RESP_ATTR_LCI                               = 0x2\n\tNL80211_FTM_RESP_ATTR_MAX                               = 0x3\n\tNL80211_FTM_STATS_ASAP_NUM                              = 0x4\n\tNL80211_FTM_STATS_FAILED_NUM                            = 0x3\n\tNL80211_FTM_STATS_MAX                                   = 0xa\n\tNL80211_FTM_STATS_NON_ASAP_NUM                          = 0x5\n\tNL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM            = 0x9\n\tNL80211_FTM_STATS_PAD                                   = 0xa\n\tNL80211_FTM_STATS_PARTIAL_NUM                           = 0x2\n\tNL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM               = 0x8\n\tNL80211_FTM_STATS_SUCCESS_NUM                           = 0x1\n\tNL80211_FTM_STATS_TOTAL_DURATION_MSEC                   = 0x6\n\tNL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM                  = 0x7\n\tNL80211_GENL_NAME                                       = \"nl80211\"\n\tNL80211_HE_BSS_COLOR_ATTR_COLOR                         = 0x1\n\tNL80211_HE_BSS_COLOR_ATTR_DISABLED                      = 0x2\n\tNL80211_HE_BSS_COLOR_ATTR_MAX                           = 0x3\n\tNL80211_HE_BSS_COLOR_ATTR_PARTIAL                       = 0x3\n\tNL80211_HE_MAX_CAPABILITY_LEN                           = 0x36\n\tNL80211_HE_MIN_CAPABILITY_LEN                           = 0x10\n\tNL80211_HE_NSS_MAX                                      = 0x8\n\tNL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP                = 0x4\n\tNL80211_HE_OBSS_PD_ATTR_MAX                             = 0x6\n\tNL80211_HE_OBSS_PD_ATTR_MAX_OFFSET                      = 0x2\n\tNL80211_HE_OBSS_PD_ATTR_MIN_OFFSET                      = 0x1\n\tNL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET              = 0x3\n\tNL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP            = 0x5\n\tNL80211_HE_OBSS_PD_ATTR_SR_CTRL                         = 0x6\n\tNL80211_HIDDEN_SSID_NOT_IN_USE                          = 0x0\n\tNL80211_HIDDEN_SSID_ZERO_CONTENTS                       = 0x2\n\tNL80211_HIDDEN_SSID_ZERO_LEN                            = 0x1\n\tNL80211_HT_CAPABILITY_LEN                               = 0x1a\n\tNL80211_IFACE_COMB_BI_MIN_GCD                           = 0x7\n\tNL80211_IFACE_COMB_LIMITS                               = 0x1\n\tNL80211_IFACE_COMB_MAXNUM                               = 0x2\n\tNL80211_IFACE_COMB_NUM_CHANNELS                         = 0x4\n\tNL80211_IFACE_COMB_RADAR_DETECT_REGIONS                 = 0x6\n\tNL80211_IFACE_COMB_RADAR_DETECT_WIDTHS                  = 0x5\n\tNL80211_IFACE_COMB_STA_AP_BI_MATCH                      = 0x3\n\tNL80211_IFACE_COMB_UNSPEC                               = 0x0\n\tNL80211_IFACE_LIMIT_MAX                                 = 0x1\n\tNL80211_IFACE_LIMIT_TYPES                               = 0x2\n\tNL80211_IFACE_LIMIT_UNSPEC                              = 0x0\n\tNL80211_IFTYPE_ADHOC                                    = 0x1\n\tNL80211_IFTYPE_AKM_ATTR_IFTYPES                         = 0x1\n\tNL80211_IFTYPE_AKM_ATTR_MAX                             = 0x2\n\tNL80211_IFTYPE_AKM_ATTR_SUITES                          = 0x2\n\tNL80211_IFTYPE_AP                                       = 0x3\n\tNL80211_IFTYPE_AP_VLAN                                  = 0x4\n\tNL80211_IFTYPE_MAX                                      = 0xc\n\tNL80211_IFTYPE_MESH_POINT                               = 0x7\n\tNL80211_IFTYPE_MONITOR                                  = 0x6\n\tNL80211_IFTYPE_NAN                                      = 0xc\n\tNL80211_IFTYPE_OCB                                      = 0xb\n\tNL80211_IFTYPE_P2P_CLIENT                               = 0x8\n\tNL80211_IFTYPE_P2P_DEVICE                               = 0xa\n\tNL80211_IFTYPE_P2P_GO                                   = 0x9\n\tNL80211_IFTYPE_STATION                                  = 0x2\n\tNL80211_IFTYPE_UNSPECIFIED                              = 0x0\n\tNL80211_IFTYPE_WDS                                      = 0x5\n\tNL80211_KCK_EXT_LEN_32                                  = 0x20\n\tNL80211_KCK_EXT_LEN                                     = 0x18\n\tNL80211_KCK_LEN                                         = 0x10\n\tNL80211_KEK_EXT_LEN                                     = 0x20\n\tNL80211_KEK_LEN                                         = 0x10\n\tNL80211_KEY_CIPHER                                      = 0x3\n\tNL80211_KEY_DATA                                        = 0x1\n\tNL80211_KEY_DEFAULT_BEACON                              = 0xa\n\tNL80211_KEY_DEFAULT                                     = 0x5\n\tNL80211_KEY_DEFAULT_MGMT                                = 0x6\n\tNL80211_KEY_DEFAULT_TYPE_MULTICAST                      = 0x2\n\tNL80211_KEY_DEFAULT_TYPES                               = 0x8\n\tNL80211_KEY_DEFAULT_TYPE_UNICAST                        = 0x1\n\tNL80211_KEY_IDX                                         = 0x2\n\tNL80211_KEY_MAX                                         = 0xa\n\tNL80211_KEY_MODE                                        = 0x9\n\tNL80211_KEY_NO_TX                                       = 0x1\n\tNL80211_KEY_RX_TX                                       = 0x0\n\tNL80211_KEY_SEQ                                         = 0x4\n\tNL80211_KEY_SET_TX                                      = 0x2\n\tNL80211_KEY_TYPE                                        = 0x7\n\tNL80211_KEYTYPE_GROUP                                   = 0x0\n\tNL80211_KEYTYPE_PAIRWISE                                = 0x1\n\tNL80211_KEYTYPE_PEERKEY                                 = 0x2\n\tNL80211_MAX_NR_AKM_SUITES                               = 0x2\n\tNL80211_MAX_NR_CIPHER_SUITES                            = 0x5\n\tNL80211_MAX_SUPP_HT_RATES                               = 0x4d\n\tNL80211_MAX_SUPP_RATES                                  = 0x20\n\tNL80211_MAX_SUPP_REG_RULES                              = 0x80\n\tNL80211_MAX_SUPP_SELECTORS                              = 0x80\n\tNL80211_MBSSID_CONFIG_ATTR_EMA                          = 0x5\n\tNL80211_MBSSID_CONFIG_ATTR_INDEX                        = 0x3\n\tNL80211_MBSSID_CONFIG_ATTR_MAX                          = 0x6\n\tNL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY  = 0x2\n\tNL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES               = 0x1\n\tNL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX                   = 0x4\n\tNL80211_MESHCONF_ATTR_MAX                               = 0x1f\n\tNL80211_MESHCONF_AUTO_OPEN_PLINKS                       = 0x7\n\tNL80211_MESHCONF_AWAKE_WINDOW                           = 0x1b\n\tNL80211_MESHCONF_CONFIRM_TIMEOUT                        = 0x2\n\tNL80211_MESHCONF_CONNECTED_TO_AS                        = 0x1f\n\tNL80211_MESHCONF_CONNECTED_TO_GATE                      = 0x1d\n\tNL80211_MESHCONF_ELEMENT_TTL                            = 0xf\n\tNL80211_MESHCONF_FORWARDING                             = 0x13\n\tNL80211_MESHCONF_GATE_ANNOUNCEMENTS                     = 0x11\n\tNL80211_MESHCONF_HOLDING_TIMEOUT                        = 0x3\n\tNL80211_MESHCONF_HT_OPMODE                              = 0x16\n\tNL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT               = 0xb\n\tNL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL             = 0x19\n\tNL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES                  = 0x8\n\tNL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME                = 0xd\n\tNL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT              = 0x17\n\tNL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL                 = 0x12\n\tNL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL                 = 0xc\n\tNL80211_MESHCONF_HWMP_RANN_INTERVAL                     = 0x10\n\tNL80211_MESHCONF_HWMP_ROOT_INTERVAL                     = 0x18\n\tNL80211_MESHCONF_HWMP_ROOTMODE                          = 0xe\n\tNL80211_MESHCONF_MAX_PEER_LINKS                         = 0x4\n\tNL80211_MESHCONF_MAX_RETRIES                            = 0x5\n\tNL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT                  = 0xa\n\tNL80211_MESHCONF_NOLEARN                                = 0x1e\n\tNL80211_MESHCONF_PATH_REFRESH_TIME                      = 0x9\n\tNL80211_MESHCONF_PLINK_TIMEOUT                          = 0x1c\n\tNL80211_MESHCONF_POWER_MODE                             = 0x1a\n\tNL80211_MESHCONF_RETRY_TIMEOUT                          = 0x1\n\tNL80211_MESHCONF_RSSI_THRESHOLD                         = 0x14\n\tNL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR               = 0x15\n\tNL80211_MESHCONF_TTL                                    = 0x6\n\tNL80211_MESH_POWER_ACTIVE                               = 0x1\n\tNL80211_MESH_POWER_DEEP_SLEEP                           = 0x3\n\tNL80211_MESH_POWER_LIGHT_SLEEP                          = 0x2\n\tNL80211_MESH_POWER_MAX                                  = 0x3\n\tNL80211_MESH_POWER_UNKNOWN                              = 0x0\n\tNL80211_MESH_SETUP_ATTR_MAX                             = 0x8\n\tNL80211_MESH_SETUP_AUTH_PROTOCOL                        = 0x8\n\tNL80211_MESH_SETUP_ENABLE_VENDOR_METRIC                 = 0x2\n\tNL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL               = 0x1\n\tNL80211_MESH_SETUP_ENABLE_VENDOR_SYNC                   = 0x6\n\tNL80211_MESH_SETUP_IE                                   = 0x3\n\tNL80211_MESH_SETUP_USERSPACE_AMPE                       = 0x5\n\tNL80211_MESH_SETUP_USERSPACE_AUTH                       = 0x4\n\tNL80211_MESH_SETUP_USERSPACE_MPM                        = 0x7\n\tNL80211_MESH_SETUP_VENDOR_PATH_SEL_IE                   = 0x3\n\tNL80211_MFP_NO                                          = 0x0\n\tNL80211_MFP_OPTIONAL                                    = 0x2\n\tNL80211_MFP_REQUIRED                                    = 0x1\n\tNL80211_MIN_REMAIN_ON_CHANNEL_TIME                      = 0xa\n\tNL80211_MNTR_FLAG_ACTIVE                                = 0x6\n\tNL80211_MNTR_FLAG_CONTROL                               = 0x3\n\tNL80211_MNTR_FLAG_COOK_FRAMES                           = 0x5\n\tNL80211_MNTR_FLAG_FCSFAIL                               = 0x1\n\tNL80211_MNTR_FLAG_MAX                                   = 0x7\n\tNL80211_MNTR_FLAG_OTHER_BSS                             = 0x4\n\tNL80211_MNTR_FLAG_PLCPFAIL                              = 0x2\n\tNL80211_MPATH_FLAG_ACTIVE                               = 0x1\n\tNL80211_MPATH_FLAG_FIXED                                = 0x8\n\tNL80211_MPATH_FLAG_RESOLVED                             = 0x10\n\tNL80211_MPATH_FLAG_RESOLVING                            = 0x2\n\tNL80211_MPATH_FLAG_SN_VALID                             = 0x4\n\tNL80211_MPATH_INFO_DISCOVERY_RETRIES                    = 0x7\n\tNL80211_MPATH_INFO_DISCOVERY_TIMEOUT                    = 0x6\n\tNL80211_MPATH_INFO_EXPTIME                              = 0x4\n\tNL80211_MPATH_INFO_FLAGS                                = 0x5\n\tNL80211_MPATH_INFO_FRAME_QLEN                           = 0x1\n\tNL80211_MPATH_INFO_HOP_COUNT                            = 0x8\n\tNL80211_MPATH_INFO_MAX                                  = 0x9\n\tNL80211_MPATH_INFO_METRIC                               = 0x3\n\tNL80211_MPATH_INFO_PATH_CHANGE                          = 0x9\n\tNL80211_MPATH_INFO_SN                                   = 0x2\n\tNL80211_MULTICAST_GROUP_CONFIG                          = \"config\"\n\tNL80211_MULTICAST_GROUP_MLME                            = \"mlme\"\n\tNL80211_MULTICAST_GROUP_NAN                             = \"nan\"\n\tNL80211_MULTICAST_GROUP_REG                             = \"regulatory\"\n\tNL80211_MULTICAST_GROUP_SCAN                            = \"scan\"\n\tNL80211_MULTICAST_GROUP_TESTMODE                        = \"testmode\"\n\tNL80211_MULTICAST_GROUP_VENDOR                          = \"vendor\"\n\tNL80211_NAN_FUNC_ATTR_MAX                               = 0x10\n\tNL80211_NAN_FUNC_CLOSE_RANGE                            = 0x9\n\tNL80211_NAN_FUNC_FOLLOW_UP                              = 0x2\n\tNL80211_NAN_FUNC_FOLLOW_UP_DEST                         = 0x8\n\tNL80211_NAN_FUNC_FOLLOW_UP_ID                           = 0x6\n\tNL80211_NAN_FUNC_FOLLOW_UP_REQ_ID                       = 0x7\n\tNL80211_NAN_FUNC_INSTANCE_ID                            = 0xf\n\tNL80211_NAN_FUNC_MAX_TYPE                               = 0x2\n\tNL80211_NAN_FUNC_PUBLISH_BCAST                          = 0x4\n\tNL80211_NAN_FUNC_PUBLISH                                = 0x0\n\tNL80211_NAN_FUNC_PUBLISH_TYPE                           = 0x3\n\tNL80211_NAN_FUNC_RX_MATCH_FILTER                        = 0xd\n\tNL80211_NAN_FUNC_SERVICE_ID                             = 0x2\n\tNL80211_NAN_FUNC_SERVICE_ID_LEN                         = 0x6\n\tNL80211_NAN_FUNC_SERVICE_INFO                           = 0xb\n\tNL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN              = 0xff\n\tNL80211_NAN_FUNC_SRF                                    = 0xc\n\tNL80211_NAN_FUNC_SRF_MAX_LEN                            = 0xff\n\tNL80211_NAN_FUNC_SUBSCRIBE_ACTIVE                       = 0x5\n\tNL80211_NAN_FUNC_SUBSCRIBE                              = 0x1\n\tNL80211_NAN_FUNC_TERM_REASON                            = 0x10\n\tNL80211_NAN_FUNC_TERM_REASON_ERROR                      = 0x2\n\tNL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED                = 0x1\n\tNL80211_NAN_FUNC_TERM_REASON_USER_REQUEST               = 0x0\n\tNL80211_NAN_FUNC_TTL                                    = 0xa\n\tNL80211_NAN_FUNC_TX_MATCH_FILTER                        = 0xe\n\tNL80211_NAN_FUNC_TYPE                                   = 0x1\n\tNL80211_NAN_MATCH_ATTR_MAX                              = 0x2\n\tNL80211_NAN_MATCH_FUNC_LOCAL                            = 0x1\n\tNL80211_NAN_MATCH_FUNC_PEER                             = 0x2\n\tNL80211_NAN_SOLICITED_PUBLISH                           = 0x1\n\tNL80211_NAN_SRF_ATTR_MAX                                = 0x4\n\tNL80211_NAN_SRF_BF                                      = 0x2\n\tNL80211_NAN_SRF_BF_IDX                                  = 0x3\n\tNL80211_NAN_SRF_INCLUDE                                 = 0x1\n\tNL80211_NAN_SRF_MAC_ADDRS                               = 0x4\n\tNL80211_NAN_UNSOLICITED_PUBLISH                         = 0x2\n\tNL80211_NUM_ACS                                         = 0x4\n\tNL80211_P2P_PS_SUPPORTED                                = 0x1\n\tNL80211_P2P_PS_UNSUPPORTED                              = 0x0\n\tNL80211_PKTPAT_MASK                                     = 0x1\n\tNL80211_PKTPAT_OFFSET                                   = 0x3\n\tNL80211_PKTPAT_PATTERN                                  = 0x2\n\tNL80211_PLINK_ACTION_BLOCK                              = 0x2\n\tNL80211_PLINK_ACTION_NO_ACTION                          = 0x0\n\tNL80211_PLINK_ACTION_OPEN                               = 0x1\n\tNL80211_PLINK_BLOCKED                                   = 0x6\n\tNL80211_PLINK_CNF_RCVD                                  = 0x3\n\tNL80211_PLINK_ESTAB                                     = 0x4\n\tNL80211_PLINK_HOLDING                                   = 0x5\n\tNL80211_PLINK_LISTEN                                    = 0x0\n\tNL80211_PLINK_OPN_RCVD                                  = 0x2\n\tNL80211_PLINK_OPN_SNT                                   = 0x1\n\tNL80211_PMKSA_CANDIDATE_BSSID                           = 0x2\n\tNL80211_PMKSA_CANDIDATE_INDEX                           = 0x1\n\tNL80211_PMKSA_CANDIDATE_PREAUTH                         = 0x3\n\tNL80211_PMSR_ATTR_MAX                                   = 0x5\n\tNL80211_PMSR_ATTR_MAX_PEERS                             = 0x1\n\tNL80211_PMSR_ATTR_PEERS                                 = 0x5\n\tNL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR                    = 0x3\n\tNL80211_PMSR_ATTR_REPORT_AP_TSF                         = 0x2\n\tNL80211_PMSR_ATTR_TYPE_CAPA                             = 0x4\n\tNL80211_PMSR_FTM_CAPA_ATTR_ASAP                         = 0x1\n\tNL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS                   = 0x6\n\tNL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT          = 0x7\n\tNL80211_PMSR_FTM_CAPA_ATTR_MAX                          = 0xa\n\tNL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST           = 0x8\n\tNL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP                     = 0x2\n\tNL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED            = 0xa\n\tNL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES                    = 0x5\n\tNL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC                 = 0x4\n\tNL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI                      = 0x3\n\tNL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED                = 0x9\n\tNL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS             = 0x7\n\tNL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP              = 0x5\n\tNL80211_PMSR_FTM_FAILURE_NO_RESPONSE                    = 0x1\n\tNL80211_PMSR_FTM_FAILURE_PEER_BUSY                      = 0x6\n\tNL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE               = 0x4\n\tNL80211_PMSR_FTM_FAILURE_REJECTED                       = 0x2\n\tNL80211_PMSR_FTM_FAILURE_UNSPECIFIED                    = 0x0\n\tNL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL                  = 0x3\n\tNL80211_PMSR_FTM_REQ_ATTR_ASAP                          = 0x1\n\tNL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR                     = 0xd\n\tNL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION                = 0x5\n\tNL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD                  = 0x4\n\tNL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST                = 0x6\n\tNL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK                  = 0xc\n\tNL80211_PMSR_FTM_REQ_ATTR_MAX                           = 0xd\n\tNL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED             = 0xb\n\tNL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP                = 0x3\n\tNL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES              = 0x7\n\tNL80211_PMSR_FTM_REQ_ATTR_PREAMBLE                      = 0x2\n\tNL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC              = 0x9\n\tNL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI                   = 0x8\n\tNL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED                 = 0xa\n\tNL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION               = 0x7\n\tNL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX                  = 0x2\n\tNL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME              = 0x5\n\tNL80211_PMSR_FTM_RESP_ATTR_CIVICLOC                     = 0x14\n\tNL80211_PMSR_FTM_RESP_ATTR_DIST_AVG                     = 0x10\n\tNL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD                  = 0x12\n\tNL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE                = 0x11\n\tNL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON                  = 0x1\n\tNL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST               = 0x8\n\tNL80211_PMSR_FTM_RESP_ATTR_LCI                          = 0x13\n\tNL80211_PMSR_FTM_RESP_ATTR_MAX                          = 0x15\n\tNL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP               = 0x6\n\tNL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS            = 0x3\n\tNL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES           = 0x4\n\tNL80211_PMSR_FTM_RESP_ATTR_PAD                          = 0x15\n\tNL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG                     = 0x9\n\tNL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD                  = 0xa\n\tNL80211_PMSR_FTM_RESP_ATTR_RTT_AVG                      = 0xd\n\tNL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD                   = 0xf\n\tNL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE                 = 0xe\n\tNL80211_PMSR_FTM_RESP_ATTR_RX_RATE                      = 0xc\n\tNL80211_PMSR_FTM_RESP_ATTR_TX_RATE                      = 0xb\n\tNL80211_PMSR_PEER_ATTR_ADDR                             = 0x1\n\tNL80211_PMSR_PEER_ATTR_CHAN                             = 0x2\n\tNL80211_PMSR_PEER_ATTR_MAX                              = 0x4\n\tNL80211_PMSR_PEER_ATTR_REQ                              = 0x3\n\tNL80211_PMSR_PEER_ATTR_RESP                             = 0x4\n\tNL80211_PMSR_REQ_ATTR_DATA                              = 0x1\n\tNL80211_PMSR_REQ_ATTR_GET_AP_TSF                        = 0x2\n\tNL80211_PMSR_REQ_ATTR_MAX                               = 0x2\n\tNL80211_PMSR_RESP_ATTR_AP_TSF                           = 0x4\n\tNL80211_PMSR_RESP_ATTR_DATA                             = 0x1\n\tNL80211_PMSR_RESP_ATTR_FINAL                            = 0x5\n\tNL80211_PMSR_RESP_ATTR_HOST_TIME                        = 0x3\n\tNL80211_PMSR_RESP_ATTR_MAX                              = 0x6\n\tNL80211_PMSR_RESP_ATTR_PAD                              = 0x6\n\tNL80211_PMSR_RESP_ATTR_STATUS                           = 0x2\n\tNL80211_PMSR_STATUS_FAILURE                             = 0x3\n\tNL80211_PMSR_STATUS_REFUSED                             = 0x1\n\tNL80211_PMSR_STATUS_SUCCESS                             = 0x0\n\tNL80211_PMSR_STATUS_TIMEOUT                             = 0x2\n\tNL80211_PMSR_TYPE_FTM                                   = 0x1\n\tNL80211_PMSR_TYPE_INVALID                               = 0x0\n\tNL80211_PMSR_TYPE_MAX                                   = 0x1\n\tNL80211_PREAMBLE_DMG                                    = 0x3\n\tNL80211_PREAMBLE_HE                                     = 0x4\n\tNL80211_PREAMBLE_HT                                     = 0x1\n\tNL80211_PREAMBLE_LEGACY                                 = 0x0\n\tNL80211_PREAMBLE_VHT                                    = 0x2\n\tNL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U               = 0x8\n\tNL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P                  = 0x4\n\tNL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2                 = 0x2\n\tNL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS                  = 0x1\n\tNL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP               = 0x1\n\tNL80211_PS_DISABLED                                     = 0x0\n\tNL80211_PS_ENABLED                                      = 0x1\n\tNL80211_RADAR_CAC_ABORTED                               = 0x2\n\tNL80211_RADAR_CAC_FINISHED                              = 0x1\n\tNL80211_RADAR_CAC_STARTED                               = 0x5\n\tNL80211_RADAR_DETECTED                                  = 0x0\n\tNL80211_RADAR_NOP_FINISHED                              = 0x3\n\tNL80211_RADAR_PRE_CAC_EXPIRED                           = 0x4\n\tNL80211_RATE_INFO_10_MHZ_WIDTH                          = 0xb\n\tNL80211_RATE_INFO_160_MHZ_WIDTH                         = 0xa\n\tNL80211_RATE_INFO_16_MHZ_WIDTH                          = 0x1d\n\tNL80211_RATE_INFO_1_MHZ_WIDTH                           = 0x19\n\tNL80211_RATE_INFO_2_MHZ_WIDTH                           = 0x1a\n\tNL80211_RATE_INFO_320_MHZ_WIDTH                         = 0x12\n\tNL80211_RATE_INFO_40_MHZ_WIDTH                          = 0x3\n\tNL80211_RATE_INFO_4_MHZ_WIDTH                           = 0x1b\n\tNL80211_RATE_INFO_5_MHZ_WIDTH                           = 0xc\n\tNL80211_RATE_INFO_80_MHZ_WIDTH                          = 0x8\n\tNL80211_RATE_INFO_80P80_MHZ_WIDTH                       = 0x9\n\tNL80211_RATE_INFO_8_MHZ_WIDTH                           = 0x1c\n\tNL80211_RATE_INFO_BITRATE32                             = 0x5\n\tNL80211_RATE_INFO_BITRATE                               = 0x1\n\tNL80211_RATE_INFO_EHT_GI_0_8                            = 0x0\n\tNL80211_RATE_INFO_EHT_GI_1_6                            = 0x1\n\tNL80211_RATE_INFO_EHT_GI_3_2                            = 0x2\n\tNL80211_RATE_INFO_EHT_GI                                = 0x15\n\tNL80211_RATE_INFO_EHT_MCS                               = 0x13\n\tNL80211_RATE_INFO_EHT_NSS                               = 0x14\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_106                      = 0x3\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_106P26                   = 0x4\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_242                      = 0x5\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_26                       = 0x0\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_2x996                    = 0xb\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484                = 0xc\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_3x996                    = 0xd\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484                = 0xe\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_484                      = 0x6\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_484P242                  = 0x7\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_4x996                    = 0xf\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_52                       = 0x1\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_52P26                    = 0x2\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_996                      = 0x8\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_996P484                  = 0x9\n\tNL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242              = 0xa\n\tNL80211_RATE_INFO_EHT_RU_ALLOC                          = 0x16\n\tNL80211_RATE_INFO_HE_1XLTF                              = 0x0\n\tNL80211_RATE_INFO_HE_2XLTF                              = 0x1\n\tNL80211_RATE_INFO_HE_4XLTF                              = 0x2\n\tNL80211_RATE_INFO_HE_DCM                                = 0x10\n\tNL80211_RATE_INFO_HE_GI_0_8                             = 0x0\n\tNL80211_RATE_INFO_HE_GI_1_6                             = 0x1\n\tNL80211_RATE_INFO_HE_GI_3_2                             = 0x2\n\tNL80211_RATE_INFO_HE_GI                                 = 0xf\n\tNL80211_RATE_INFO_HE_MCS                                = 0xd\n\tNL80211_RATE_INFO_HE_NSS                                = 0xe\n\tNL80211_RATE_INFO_HE_RU_ALLOC_106                       = 0x2\n\tNL80211_RATE_INFO_HE_RU_ALLOC_242                       = 0x3\n\tNL80211_RATE_INFO_HE_RU_ALLOC_26                        = 0x0\n\tNL80211_RATE_INFO_HE_RU_ALLOC_2x996                     = 0x6\n\tNL80211_RATE_INFO_HE_RU_ALLOC_484                       = 0x4\n\tNL80211_RATE_INFO_HE_RU_ALLOC_52                        = 0x1\n\tNL80211_RATE_INFO_HE_RU_ALLOC_996                       = 0x5\n\tNL80211_RATE_INFO_HE_RU_ALLOC                           = 0x11\n\tNL80211_RATE_INFO_MAX                                   = 0x1d\n\tNL80211_RATE_INFO_MCS                                   = 0x2\n\tNL80211_RATE_INFO_S1G_MCS                               = 0x17\n\tNL80211_RATE_INFO_S1G_NSS                               = 0x18\n\tNL80211_RATE_INFO_SHORT_GI                              = 0x4\n\tNL80211_RATE_INFO_VHT_MCS                               = 0x6\n\tNL80211_RATE_INFO_VHT_NSS                               = 0x7\n\tNL80211_REGDOM_SET_BY_CORE                              = 0x0\n\tNL80211_REGDOM_SET_BY_COUNTRY_IE                        = 0x3\n\tNL80211_REGDOM_SET_BY_DRIVER                            = 0x2\n\tNL80211_REGDOM_SET_BY_USER                              = 0x1\n\tNL80211_REGDOM_TYPE_COUNTRY                             = 0x0\n\tNL80211_REGDOM_TYPE_CUSTOM_WORLD                        = 0x2\n\tNL80211_REGDOM_TYPE_INTERSECTION                        = 0x3\n\tNL80211_REGDOM_TYPE_WORLD                               = 0x1\n\tNL80211_REG_RULE_ATTR_MAX                               = 0x8\n\tNL80211_REKEY_DATA_AKM                                  = 0x4\n\tNL80211_REKEY_DATA_KCK                                  = 0x2\n\tNL80211_REKEY_DATA_KEK                                  = 0x1\n\tNL80211_REKEY_DATA_REPLAY_CTR                           = 0x3\n\tNL80211_REPLAY_CTR_LEN                                  = 0x8\n\tNL80211_RRF_ALLOW_6GHZ_VLP_AP                           = 0x1000000\n\tNL80211_RRF_AUTO_BW                                     = 0x800\n\tNL80211_RRF_DFS                                         = 0x10\n\tNL80211_RRF_DFS_CONCURRENT                              = 0x200000\n\tNL80211_RRF_GO_CONCURRENT                               = 0x1000\n\tNL80211_RRF_IR_CONCURRENT                               = 0x1000\n\tNL80211_RRF_NO_160MHZ                                   = 0x10000\n\tNL80211_RRF_NO_320MHZ                                   = 0x40000\n\tNL80211_RRF_NO_6GHZ_AFC_CLIENT                          = 0x800000\n\tNL80211_RRF_NO_6GHZ_VLP_CLIENT                          = 0x400000\n\tNL80211_RRF_NO_80MHZ                                    = 0x8000\n\tNL80211_RRF_NO_CCK                                      = 0x2\n\tNL80211_RRF_NO_EHT                                      = 0x80000\n\tNL80211_RRF_NO_HE                                       = 0x20000\n\tNL80211_RRF_NO_HT40                                     = 0x6000\n\tNL80211_RRF_NO_HT40MINUS                                = 0x2000\n\tNL80211_RRF_NO_HT40PLUS                                 = 0x4000\n\tNL80211_RRF_NO_IBSS                                     = 0x80\n\tNL80211_RRF_NO_INDOOR                                   = 0x4\n\tNL80211_RRF_NO_IR_ALL                                   = 0x180\n\tNL80211_RRF_NO_IR                                       = 0x80\n\tNL80211_RRF_NO_OFDM                                     = 0x1\n\tNL80211_RRF_NO_OUTDOOR                                  = 0x8\n\tNL80211_RRF_NO_UHB_AFC_CLIENT                           = 0x800000\n\tNL80211_RRF_NO_UHB_VLP_CLIENT                           = 0x400000\n\tNL80211_RRF_PASSIVE_SCAN                                = 0x80\n\tNL80211_RRF_PSD                                         = 0x100000\n\tNL80211_RRF_PTMP_ONLY                                   = 0x40\n\tNL80211_RRF_PTP_ONLY                                    = 0x20\n\tNL80211_RXMGMT_FLAG_ANSWERED                            = 0x1\n\tNL80211_RXMGMT_FLAG_EXTERNAL_AUTH                       = 0x2\n\tNL80211_SAE_PWE_BOTH                                    = 0x3\n\tNL80211_SAE_PWE_HASH_TO_ELEMENT                         = 0x2\n\tNL80211_SAE_PWE_HUNT_AND_PECK                           = 0x1\n\tNL80211_SAE_PWE_UNSPECIFIED                             = 0x0\n\tNL80211_SAR_ATTR_MAX                                    = 0x2\n\tNL80211_SAR_ATTR_SPECS                                  = 0x2\n\tNL80211_SAR_ATTR_SPECS_END_FREQ                         = 0x4\n\tNL80211_SAR_ATTR_SPECS_MAX                              = 0x4\n\tNL80211_SAR_ATTR_SPECS_POWER                            = 0x1\n\tNL80211_SAR_ATTR_SPECS_RANGE_INDEX                      = 0x2\n\tNL80211_SAR_ATTR_SPECS_START_FREQ                       = 0x3\n\tNL80211_SAR_ATTR_TYPE                                   = 0x1\n\tNL80211_SAR_TYPE_POWER                                  = 0x0\n\tNL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP               = 0x20\n\tNL80211_SCAN_FLAG_AP                                    = 0x4\n\tNL80211_SCAN_FLAG_COLOCATED_6GHZ                        = 0x4000\n\tNL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME                 = 0x10\n\tNL80211_SCAN_FLAG_FLUSH                                 = 0x2\n\tNL80211_SCAN_FLAG_FREQ_KHZ                              = 0x2000\n\tNL80211_SCAN_FLAG_HIGH_ACCURACY                         = 0x400\n\tNL80211_SCAN_FLAG_LOW_POWER                             = 0x200\n\tNL80211_SCAN_FLAG_LOW_PRIORITY                          = 0x1\n\tNL80211_SCAN_FLAG_LOW_SPAN                              = 0x100\n\tNL80211_SCAN_FLAG_MIN_PREQ_CONTENT                      = 0x1000\n\tNL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION    = 0x80\n\tNL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE            = 0x40\n\tNL80211_SCAN_FLAG_RANDOM_ADDR                           = 0x8\n\tNL80211_SCAN_FLAG_RANDOM_SN                             = 0x800\n\tNL80211_SCAN_RSSI_THOLD_OFF                             = -0x12c\n\tNL80211_SCHED_SCAN_MATCH_ATTR_BSSID                     = 0x5\n\tNL80211_SCHED_SCAN_MATCH_ATTR_MAX                       = 0x6\n\tNL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI             = 0x3\n\tNL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST               = 0x4\n\tNL80211_SCHED_SCAN_MATCH_ATTR_RSSI                      = 0x2\n\tNL80211_SCHED_SCAN_MATCH_ATTR_SSID                      = 0x1\n\tNL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI                  = 0x6\n\tNL80211_SCHED_SCAN_PLAN_INTERVAL                        = 0x1\n\tNL80211_SCHED_SCAN_PLAN_ITERATIONS                      = 0x2\n\tNL80211_SCHED_SCAN_PLAN_MAX                             = 0x2\n\tNL80211_SMPS_DYNAMIC                                    = 0x2\n\tNL80211_SMPS_MAX                                        = 0x2\n\tNL80211_SMPS_OFF                                        = 0x0\n\tNL80211_SMPS_STATIC                                     = 0x1\n\tNL80211_STA_BSS_PARAM_BEACON_INTERVAL                   = 0x5\n\tNL80211_STA_BSS_PARAM_CTS_PROT                          = 0x1\n\tNL80211_STA_BSS_PARAM_DTIM_PERIOD                       = 0x4\n\tNL80211_STA_BSS_PARAM_MAX                               = 0x5\n\tNL80211_STA_BSS_PARAM_SHORT_PREAMBLE                    = 0x2\n\tNL80211_STA_BSS_PARAM_SHORT_SLOT_TIME                   = 0x3\n\tNL80211_STA_FLAG_ASSOCIATED                             = 0x7\n\tNL80211_STA_FLAG_AUTHENTICATED                          = 0x5\n\tNL80211_STA_FLAG_AUTHORIZED                             = 0x1\n\tNL80211_STA_FLAG_MAX                                    = 0x8\n\tNL80211_STA_FLAG_MAX_OLD_API                            = 0x6\n\tNL80211_STA_FLAG_MFP                                    = 0x4\n\tNL80211_STA_FLAG_SHORT_PREAMBLE                         = 0x2\n\tNL80211_STA_FLAG_SPP_AMSDU                              = 0x8\n\tNL80211_STA_FLAG_TDLS_PEER                              = 0x6\n\tNL80211_STA_FLAG_WME                                    = 0x3\n\tNL80211_STA_INFO_ACK_SIGNAL_AVG                         = 0x23\n\tNL80211_STA_INFO_ACK_SIGNAL                             = 0x22\n\tNL80211_STA_INFO_AIRTIME_LINK_METRIC                    = 0x29\n\tNL80211_STA_INFO_AIRTIME_WEIGHT                         = 0x28\n\tNL80211_STA_INFO_ASSOC_AT_BOOTTIME                      = 0x2a\n\tNL80211_STA_INFO_BEACON_LOSS                            = 0x12\n\tNL80211_STA_INFO_BEACON_RX                              = 0x1d\n\tNL80211_STA_INFO_BEACON_SIGNAL_AVG                      = 0x1e\n\tNL80211_STA_INFO_BSS_PARAM                              = 0xf\n\tNL80211_STA_INFO_CHAIN_SIGNAL_AVG                       = 0x1a\n\tNL80211_STA_INFO_CHAIN_SIGNAL                           = 0x19\n\tNL80211_STA_INFO_CONNECTED_TIME                         = 0x10\n\tNL80211_STA_INFO_CONNECTED_TO_AS                        = 0x2b\n\tNL80211_STA_INFO_CONNECTED_TO_GATE                      = 0x26\n\tNL80211_STA_INFO_DATA_ACK_SIGNAL_AVG                    = 0x23\n\tNL80211_STA_INFO_EXPECTED_THROUGHPUT                    = 0x1b\n\tNL80211_STA_INFO_FCS_ERROR_COUNT                        = 0x25\n\tNL80211_STA_INFO_INACTIVE_TIME                          = 0x1\n\tNL80211_STA_INFO_LLID                                   = 0x4\n\tNL80211_STA_INFO_LOCAL_PM                               = 0x14\n\tNL80211_STA_INFO_MAX                                    = 0x2b\n\tNL80211_STA_INFO_NONPEER_PM                             = 0x16\n\tNL80211_STA_INFO_PAD                                    = 0x21\n\tNL80211_STA_INFO_PEER_PM                                = 0x15\n\tNL80211_STA_INFO_PLID                                   = 0x5\n\tNL80211_STA_INFO_PLINK_STATE                            = 0x6\n\tNL80211_STA_INFO_RX_BITRATE                             = 0xe\n\tNL80211_STA_INFO_RX_BYTES64                             = 0x17\n\tNL80211_STA_INFO_RX_BYTES                               = 0x2\n\tNL80211_STA_INFO_RX_DROP_MISC                           = 0x1c\n\tNL80211_STA_INFO_RX_DURATION                            = 0x20\n\tNL80211_STA_INFO_RX_MPDUS                               = 0x24\n\tNL80211_STA_INFO_RX_PACKETS                             = 0x9\n\tNL80211_STA_INFO_SIGNAL_AVG                             = 0xd\n\tNL80211_STA_INFO_SIGNAL                                 = 0x7\n\tNL80211_STA_INFO_STA_FLAGS                              = 0x11\n\tNL80211_STA_INFO_TID_STATS                              = 0x1f\n\tNL80211_STA_INFO_T_OFFSET                               = 0x13\n\tNL80211_STA_INFO_TX_BITRATE                             = 0x8\n\tNL80211_STA_INFO_TX_BYTES64                             = 0x18\n\tNL80211_STA_INFO_TX_BYTES                               = 0x3\n\tNL80211_STA_INFO_TX_DURATION                            = 0x27\n\tNL80211_STA_INFO_TX_FAILED                              = 0xc\n\tNL80211_STA_INFO_TX_PACKETS                             = 0xa\n\tNL80211_STA_INFO_TX_RETRIES                             = 0xb\n\tNL80211_STA_WME_MAX                                     = 0x2\n\tNL80211_STA_WME_MAX_SP                                  = 0x2\n\tNL80211_STA_WME_UAPSD_QUEUES                            = 0x1\n\tNL80211_SURVEY_INFO_CHANNEL_TIME_BUSY                   = 0x5\n\tNL80211_SURVEY_INFO_CHANNEL_TIME                        = 0x4\n\tNL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY               = 0x6\n\tNL80211_SURVEY_INFO_CHANNEL_TIME_RX                     = 0x7\n\tNL80211_SURVEY_INFO_CHANNEL_TIME_TX                     = 0x8\n\tNL80211_SURVEY_INFO_FREQUENCY                           = 0x1\n\tNL80211_SURVEY_INFO_FREQUENCY_OFFSET                    = 0xc\n\tNL80211_SURVEY_INFO_IN_USE                              = 0x3\n\tNL80211_SURVEY_INFO_MAX                                 = 0xc\n\tNL80211_SURVEY_INFO_NOISE                               = 0x2\n\tNL80211_SURVEY_INFO_PAD                                 = 0xa\n\tNL80211_SURVEY_INFO_TIME_BSS_RX                         = 0xb\n\tNL80211_SURVEY_INFO_TIME_BUSY                           = 0x5\n\tNL80211_SURVEY_INFO_TIME                                = 0x4\n\tNL80211_SURVEY_INFO_TIME_EXT_BUSY                       = 0x6\n\tNL80211_SURVEY_INFO_TIME_RX                             = 0x7\n\tNL80211_SURVEY_INFO_TIME_SCAN                           = 0x9\n\tNL80211_SURVEY_INFO_TIME_TX                             = 0x8\n\tNL80211_TDLS_DISABLE_LINK                               = 0x4\n\tNL80211_TDLS_DISCOVERY_REQ                              = 0x0\n\tNL80211_TDLS_ENABLE_LINK                                = 0x3\n\tNL80211_TDLS_PEER_HE                                    = 0x8\n\tNL80211_TDLS_PEER_HT                                    = 0x1\n\tNL80211_TDLS_PEER_VHT                                   = 0x2\n\tNL80211_TDLS_PEER_WMM                                   = 0x4\n\tNL80211_TDLS_SETUP                                      = 0x1\n\tNL80211_TDLS_TEARDOWN                                   = 0x2\n\tNL80211_TID_CONFIG_ATTR_AMPDU_CTRL                      = 0x9\n\tNL80211_TID_CONFIG_ATTR_AMSDU_CTRL                      = 0xb\n\tNL80211_TID_CONFIG_ATTR_MAX                             = 0xd\n\tNL80211_TID_CONFIG_ATTR_NOACK                           = 0x6\n\tNL80211_TID_CONFIG_ATTR_OVERRIDE                        = 0x4\n\tNL80211_TID_CONFIG_ATTR_PAD                             = 0x1\n\tNL80211_TID_CONFIG_ATTR_PEER_SUPP                       = 0x3\n\tNL80211_TID_CONFIG_ATTR_RETRY_LONG                      = 0x8\n\tNL80211_TID_CONFIG_ATTR_RETRY_SHORT                     = 0x7\n\tNL80211_TID_CONFIG_ATTR_RTSCTS_CTRL                     = 0xa\n\tNL80211_TID_CONFIG_ATTR_TIDS                            = 0x5\n\tNL80211_TID_CONFIG_ATTR_TX_RATE                         = 0xd\n\tNL80211_TID_CONFIG_ATTR_TX_RATE_TYPE                    = 0xc\n\tNL80211_TID_CONFIG_ATTR_VIF_SUPP                        = 0x2\n\tNL80211_TID_CONFIG_DISABLE                              = 0x1\n\tNL80211_TID_CONFIG_ENABLE                               = 0x0\n\tNL80211_TID_STATS_MAX                                   = 0x6\n\tNL80211_TID_STATS_PAD                                   = 0x5\n\tNL80211_TID_STATS_RX_MSDU                               = 0x1\n\tNL80211_TID_STATS_TX_MSDU                               = 0x2\n\tNL80211_TID_STATS_TX_MSDU_FAILED                        = 0x4\n\tNL80211_TID_STATS_TX_MSDU_RETRIES                       = 0x3\n\tNL80211_TID_STATS_TXQ_STATS                             = 0x6\n\tNL80211_TIMEOUT_ASSOC                                   = 0x3\n\tNL80211_TIMEOUT_AUTH                                    = 0x2\n\tNL80211_TIMEOUT_SCAN                                    = 0x1\n\tNL80211_TIMEOUT_UNSPECIFIED                             = 0x0\n\tNL80211_TKIP_DATA_OFFSET_ENCR_KEY                       = 0x0\n\tNL80211_TKIP_DATA_OFFSET_RX_MIC_KEY                     = 0x18\n\tNL80211_TKIP_DATA_OFFSET_TX_MIC_KEY                     = 0x10\n\tNL80211_TX_POWER_AUTOMATIC                              = 0x0\n\tNL80211_TX_POWER_FIXED                                  = 0x2\n\tNL80211_TX_POWER_LIMITED                                = 0x1\n\tNL80211_TXQ_ATTR_AC                                     = 0x1\n\tNL80211_TXQ_ATTR_AIFS                                   = 0x5\n\tNL80211_TXQ_ATTR_CWMAX                                  = 0x4\n\tNL80211_TXQ_ATTR_CWMIN                                  = 0x3\n\tNL80211_TXQ_ATTR_MAX                                    = 0x5\n\tNL80211_TXQ_ATTR_QUEUE                                  = 0x1\n\tNL80211_TXQ_ATTR_TXOP                                   = 0x2\n\tNL80211_TXQ_Q_BE                                        = 0x2\n\tNL80211_TXQ_Q_BK                                        = 0x3\n\tNL80211_TXQ_Q_VI                                        = 0x1\n\tNL80211_TXQ_Q_VO                                        = 0x0\n\tNL80211_TXQ_STATS_BACKLOG_BYTES                         = 0x1\n\tNL80211_TXQ_STATS_BACKLOG_PACKETS                       = 0x2\n\tNL80211_TXQ_STATS_COLLISIONS                            = 0x8\n\tNL80211_TXQ_STATS_DROPS                                 = 0x4\n\tNL80211_TXQ_STATS_ECN_MARKS                             = 0x5\n\tNL80211_TXQ_STATS_FLOWS                                 = 0x3\n\tNL80211_TXQ_STATS_MAX                                   = 0xb\n\tNL80211_TXQ_STATS_MAX_FLOWS                             = 0xb\n\tNL80211_TXQ_STATS_OVERLIMIT                             = 0x6\n\tNL80211_TXQ_STATS_OVERMEMORY                            = 0x7\n\tNL80211_TXQ_STATS_TX_BYTES                              = 0x9\n\tNL80211_TXQ_STATS_TX_PACKETS                            = 0xa\n\tNL80211_TX_RATE_AUTOMATIC                               = 0x0\n\tNL80211_TXRATE_DEFAULT_GI                               = 0x0\n\tNL80211_TX_RATE_FIXED                                   = 0x2\n\tNL80211_TXRATE_FORCE_LGI                                = 0x2\n\tNL80211_TXRATE_FORCE_SGI                                = 0x1\n\tNL80211_TXRATE_GI                                       = 0x4\n\tNL80211_TXRATE_HE                                       = 0x5\n\tNL80211_TXRATE_HE_GI                                    = 0x6\n\tNL80211_TXRATE_HE_LTF                                   = 0x7\n\tNL80211_TXRATE_HT                                       = 0x2\n\tNL80211_TXRATE_LEGACY                                   = 0x1\n\tNL80211_TX_RATE_LIMITED                                 = 0x1\n\tNL80211_TXRATE_MAX                                      = 0x7\n\tNL80211_TXRATE_MCS                                      = 0x2\n\tNL80211_TXRATE_VHT                                      = 0x3\n\tNL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT                 = 0x1\n\tNL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX                 = 0x2\n\tNL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL                = 0x2\n\tNL80211_USER_REG_HINT_CELL_BASE                         = 0x1\n\tNL80211_USER_REG_HINT_INDOOR                            = 0x2\n\tNL80211_USER_REG_HINT_USER                              = 0x0\n\tNL80211_VENDOR_ID_IS_LINUX                              = 0x80000000\n\tNL80211_VHT_CAPABILITY_LEN                              = 0xc\n\tNL80211_VHT_NSS_MAX                                     = 0x8\n\tNL80211_WIPHY_NAME_MAXLEN                               = 0x40\n\tNL80211_WIPHY_RADIO_ATTR_FREQ_RANGE                     = 0x2\n\tNL80211_WIPHY_RADIO_ATTR_INDEX                          = 0x1\n\tNL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION          = 0x3\n\tNL80211_WIPHY_RADIO_ATTR_MAX                            = 0x4\n\tNL80211_WIPHY_RADIO_FREQ_ATTR_END                       = 0x2\n\tNL80211_WIPHY_RADIO_FREQ_ATTR_MAX                       = 0x2\n\tNL80211_WIPHY_RADIO_FREQ_ATTR_START                     = 0x1\n\tNL80211_WMMR_AIFSN                                      = 0x3\n\tNL80211_WMMR_CW_MAX                                     = 0x2\n\tNL80211_WMMR_CW_MIN                                     = 0x1\n\tNL80211_WMMR_MAX                                        = 0x4\n\tNL80211_WMMR_TXOP                                       = 0x4\n\tNL80211_WOWLAN_PKTPAT_MASK                              = 0x1\n\tNL80211_WOWLAN_PKTPAT_OFFSET                            = 0x3\n\tNL80211_WOWLAN_PKTPAT_PATTERN                           = 0x2\n\tNL80211_WOWLAN_TCP_DATA_INTERVAL                        = 0x9\n\tNL80211_WOWLAN_TCP_DATA_PAYLOAD                         = 0x6\n\tNL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ                     = 0x7\n\tNL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN                   = 0x8\n\tNL80211_WOWLAN_TCP_DST_IPV4                             = 0x2\n\tNL80211_WOWLAN_TCP_DST_MAC                              = 0x3\n\tNL80211_WOWLAN_TCP_DST_PORT                             = 0x5\n\tNL80211_WOWLAN_TCP_SRC_IPV4                             = 0x1\n\tNL80211_WOWLAN_TCP_SRC_PORT                             = 0x4\n\tNL80211_WOWLAN_TCP_WAKE_MASK                            = 0xb\n\tNL80211_WOWLAN_TCP_WAKE_PAYLOAD                         = 0xa\n\tNL80211_WOWLAN_TRIG_4WAY_HANDSHAKE                      = 0x8\n\tNL80211_WOWLAN_TRIG_ANY                                 = 0x1\n\tNL80211_WOWLAN_TRIG_DISCONNECT                          = 0x2\n\tNL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST                   = 0x7\n\tNL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE                   = 0x6\n\tNL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED                 = 0x5\n\tNL80211_WOWLAN_TRIG_MAGIC_PKT                           = 0x3\n\tNL80211_WOWLAN_TRIG_NET_DETECT                          = 0x12\n\tNL80211_WOWLAN_TRIG_NET_DETECT_RESULTS                  = 0x13\n\tNL80211_WOWLAN_TRIG_PKT_PATTERN                         = 0x4\n\tNL80211_WOWLAN_TRIG_RFKILL_RELEASE                      = 0x9\n\tNL80211_WOWLAN_TRIG_TCP_CONNECTION                      = 0xe\n\tNL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC         = 0x14\n\tNL80211_WOWLAN_TRIG_WAKEUP_PKT_80211                    = 0xa\n\tNL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN                = 0xb\n\tNL80211_WOWLAN_TRIG_WAKEUP_PKT_8023                     = 0xc\n\tNL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN                 = 0xd\n\tNL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST                 = 0x10\n\tNL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH                    = 0xf\n\tNL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS             = 0x11\n\tNL80211_WPA_VERSION_1                                   = 0x1\n\tNL80211_WPA_VERSION_2                                   = 0x2\n\tNL80211_WPA_VERSION_3                                   = 0x4\n)\n\nconst (\n\tFRA_UNSPEC             = 0x0\n\tFRA_DST                = 0x1\n\tFRA_SRC                = 0x2\n\tFRA_IIFNAME            = 0x3\n\tFRA_GOTO               = 0x4\n\tFRA_UNUSED2            = 0x5\n\tFRA_PRIORITY           = 0x6\n\tFRA_UNUSED3            = 0x7\n\tFRA_UNUSED4            = 0x8\n\tFRA_UNUSED5            = 0x9\n\tFRA_FWMARK             = 0xa\n\tFRA_FLOW               = 0xb\n\tFRA_TUN_ID             = 0xc\n\tFRA_SUPPRESS_IFGROUP   = 0xd\n\tFRA_SUPPRESS_PREFIXLEN = 0xe\n\tFRA_TABLE              = 0xf\n\tFRA_FWMASK             = 0x10\n\tFRA_OIFNAME            = 0x11\n\tFRA_PAD                = 0x12\n\tFRA_L3MDEV             = 0x13\n\tFRA_UID_RANGE          = 0x14\n\tFRA_PROTOCOL           = 0x15\n\tFRA_IP_PROTO           = 0x16\n\tFRA_SPORT_RANGE        = 0x17\n\tFRA_DPORT_RANGE        = 0x18\n\tFR_ACT_UNSPEC          = 0x0\n\tFR_ACT_TO_TBL          = 0x1\n\tFR_ACT_GOTO            = 0x2\n\tFR_ACT_NOP             = 0x3\n\tFR_ACT_RES3            = 0x4\n\tFR_ACT_RES4            = 0x5\n\tFR_ACT_BLACKHOLE       = 0x6\n\tFR_ACT_UNREACHABLE     = 0x7\n\tFR_ACT_PROHIBIT        = 0x8\n)\n\nconst (\n\tAUDIT_NLGRP_NONE    = 0x0\n\tAUDIT_NLGRP_READLOG = 0x1\n)\n\nconst (\n\tTUN_F_CSUM    = 0x1\n\tTUN_F_TSO4    = 0x2\n\tTUN_F_TSO6    = 0x4\n\tTUN_F_TSO_ECN = 0x8\n\tTUN_F_UFO     = 0x10\n\tTUN_F_USO4    = 0x20\n\tTUN_F_USO6    = 0x40\n)\n\nconst (\n\tVIRTIO_NET_HDR_F_NEEDS_CSUM = 0x1\n\tVIRTIO_NET_HDR_F_DATA_VALID = 0x2\n\tVIRTIO_NET_HDR_F_RSC_INFO   = 0x4\n)\n\nconst (\n\tVIRTIO_NET_HDR_GSO_NONE   = 0x0\n\tVIRTIO_NET_HDR_GSO_TCPV4  = 0x1\n\tVIRTIO_NET_HDR_GSO_UDP    = 0x3\n\tVIRTIO_NET_HDR_GSO_TCPV6  = 0x4\n\tVIRTIO_NET_HDR_GSO_UDP_L4 = 0x5\n\tVIRTIO_NET_HDR_GSO_ECN    = 0x80\n)\n\ntype SchedAttr struct {\n\tSize     uint32\n\tPolicy   uint32\n\tFlags    uint64\n\tNice     int32\n\tPriority uint32\n\tRuntime  uint64\n\tDeadline uint64\n\tPeriod   uint64\n\tUtil_min uint32\n\tUtil_max uint32\n}\n\nconst SizeofSchedAttr = 0x38\n\ntype Cachestat_t struct {\n\tCache            uint64\n\tDirty            uint64\n\tWriteback        uint64\n\tEvicted          uint64\n\tRecently_evicted uint64\n}\ntype CachestatRange struct {\n\tOff uint64\n\tLen uint64\n}\n\nconst (\n\tSK_MEMINFO_RMEM_ALLOC          = 0x0\n\tSK_MEMINFO_RCVBUF              = 0x1\n\tSK_MEMINFO_WMEM_ALLOC          = 0x2\n\tSK_MEMINFO_SNDBUF              = 0x3\n\tSK_MEMINFO_FWD_ALLOC           = 0x4\n\tSK_MEMINFO_WMEM_QUEUED         = 0x5\n\tSK_MEMINFO_OPTMEM              = 0x6\n\tSK_MEMINFO_BACKLOG             = 0x7\n\tSK_MEMINFO_DROPS               = 0x8\n\tSK_MEMINFO_VARS                = 0x9\n\tSKNLGRP_NONE                   = 0x0\n\tSKNLGRP_INET_TCP_DESTROY       = 0x1\n\tSKNLGRP_INET_UDP_DESTROY       = 0x2\n\tSKNLGRP_INET6_TCP_DESTROY      = 0x3\n\tSKNLGRP_INET6_UDP_DESTROY      = 0x4\n\tSK_DIAG_BPF_STORAGE_REQ_NONE   = 0x0\n\tSK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1\n\tSK_DIAG_BPF_STORAGE_REP_NONE   = 0x0\n\tSK_DIAG_BPF_STORAGE            = 0x1\n\tSK_DIAG_BPF_STORAGE_NONE       = 0x0\n\tSK_DIAG_BPF_STORAGE_PAD        = 0x1\n\tSK_DIAG_BPF_STORAGE_MAP_ID     = 0x2\n\tSK_DIAG_BPF_STORAGE_MAP_VALUE  = 0x3\n)\n\ntype SockDiagReq struct {\n\tFamily   uint8\n\tProtocol uint8\n}\n\nconst RTM_NEWNVLAN = 0x70\n\nconst (\n\tMPOL_BIND                = 0x2\n\tMPOL_DEFAULT             = 0x0\n\tMPOL_F_ADDR              = 0x2\n\tMPOL_F_MEMS_ALLOWED      = 0x4\n\tMPOL_F_MOF               = 0x8\n\tMPOL_F_MORON             = 0x10\n\tMPOL_F_NODE              = 0x1\n\tMPOL_F_NUMA_BALANCING    = 0x2000\n\tMPOL_F_RELATIVE_NODES    = 0x4000\n\tMPOL_F_SHARED            = 0x1\n\tMPOL_F_STATIC_NODES      = 0x8000\n\tMPOL_INTERLEAVE          = 0x3\n\tMPOL_LOCAL               = 0x4\n\tMPOL_MAX                 = 0x7\n\tMPOL_MF_INTERNAL         = 0x10\n\tMPOL_MF_LAZY             = 0x8\n\tMPOL_MF_MOVE_ALL         = 0x4\n\tMPOL_MF_MOVE             = 0x2\n\tMPOL_MF_STRICT           = 0x1\n\tMPOL_MF_VALID            = 0x7\n\tMPOL_MODE_FLAGS          = 0xe000\n\tMPOL_PREFERRED           = 0x1\n\tMPOL_PREFERRED_MANY      = 0x5\n\tMPOL_WEIGHTED_INTERLEAVE = 0x6\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_386.go",
    "content": "// cgo -godefs -objdir=/tmp/386/cgo -- -Wall -Werror -static -I/tmp/386/include -m32 linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x4\n\tSizeofLong = 0x4\n)\n\ntype (\n\t_C_long int32\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int32\n\tFreq      int32\n\tMaxerror  int32\n\tEsterror  int32\n\tStatus    int32\n\tConstant  int32\n\tPrecision int32\n\tTolerance int32\n\tTime      Timeval\n\tTick      int32\n\tPpsfreq   int32\n\tJitter    int32\n\tShift     int32\n\tStabil    int32\n\tJitcnt    int32\n\tCalcnt    int32\n\tErrcnt    int32\n\tStbcnt    int32\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int32\n\ntype Tms struct {\n\tUtime  int32\n\tStime  int32\n\tCutime int32\n\tCstime int32\n}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\t_       uint16\n\t_       uint32\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint16\n\tSize    int64\n\tBlksize int32\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tIno     uint64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [1]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [16]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x58\n\tSizeofIovec           = 0x8\n\tSizeofMsghdr          = 0x1c\n\tSizeofCmsghdr         = 0xc\n)\n\nconst (\n\tSizeofSockFprog = 0x8\n)\n\ntype PtraceRegs struct {\n\tEbx      int32\n\tEcx      int32\n\tEdx      int32\n\tEsi      int32\n\tEdi      int32\n\tEbp      int32\n\tEax      int32\n\tXds      int32\n\tXes      int32\n\tXfs      int32\n\tXgs      int32\n\tOrig_eax int32\n\tEip      int32\n\tXcs      int32\n\tEflags   int32\n\tEsp      int32\n\tXss      int32\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\ntype Sysinfo_t struct {\n\tUptime    int32\n\tLoads     [3]uint32\n\tTotalram  uint32\n\tFreeram   uint32\n\tSharedram uint32\n\tBufferram uint32\n\tTotalswap uint32\n\tFreeswap  uint32\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint32\n\tFreehigh  uint32\n\tUnit      uint32\n\t_         [8]int8\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint32\n\tFname  [6]int8\n\tFpack  [6]int8\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [32]uint32\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     [116]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\t_                         [6]byte\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\t_                         [4]byte\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\t_                         [4]byte\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint32\n\nconst (\n\t_NCPUBITS = 0x20\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [122]byte\n\t_      uint32\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint32\n}\n\ntype Statfs_t struct {\n\tType    int32\n\tBsize   int32\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int32\n\tFrsize  int32\n\tFlags   int32\n\tSpare   [4]int32\n}\n\ntype TpacketHdr struct {\n\tStatus  uint32\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n}\n\nconst (\n\tSizeofTpacketHdr = 0x18\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int32\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint16\n\tInode            uint32\n\tRdevice          uint16\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint32\n\tReserved         [4]int8\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800470a1\n\tPPS_SETPARAMS = 0x400470a2\n\tPPS_GETCAP    = 0x800470a3\n\tPPS_FETCH     = 0xc00470a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint16\n\t_    [2]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint32\n\t_    uint32\n}\ntype SysvShmDesc struct {\n\tPerm       SysvIpcPerm\n\tSegsz      uint32\n\tAtime      uint32\n\tAtime_high uint32\n\tDtime      uint32\n\tDtime_high uint32\n\tCtime      uint32\n\tCtime_high uint32\n\tCpid       int32\n\tLpid       int32\n\tNattch     uint32\n\t_          uint32\n\t_          uint32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go",
    "content": "// cgo -godefs -objdir=/tmp/amd64/cgo -- -Wall -Werror -static -I/tmp/amd64/include -m64 linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint32\n\tUid     uint32\n\tGid     uint32\n\t_       int32\n\tRdev    uint64\n\tSize    int64\n\tBlksize int64\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       [3]int64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tR15      uint64\n\tR14      uint64\n\tR13      uint64\n\tR12      uint64\n\tRbp      uint64\n\tRbx      uint64\n\tR11      uint64\n\tR10      uint64\n\tR9       uint64\n\tR8       uint64\n\tRax      uint64\n\tRcx      uint64\n\tRdx      uint64\n\tRsi      uint64\n\tRdi      uint64\n\tOrig_rax uint64\n\tRip      uint64\n\tCs       uint64\n\tEflags   uint64\n\tRsp      uint64\n\tSs       uint64\n\tFs_base  uint64\n\tGs_base  uint64\n\tDs       uint64\n\tEs       uint64\n\tFs       uint64\n\tGs       uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint64\n\tInode            uint64\n\tRdevice          uint64\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800870a1\n\tPPS_SETPARAMS = 0x400870a2\n\tPPS_GETCAP    = 0x800870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_arm.go",
    "content": "// cgo -godefs -objdir=/tmp/arm/cgo -- -Wall -Werror -static -I/tmp/arm/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x4\n\tSizeofLong = 0x4\n)\n\ntype (\n\t_C_long int32\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int32\n\tFreq      int32\n\tMaxerror  int32\n\tEsterror  int32\n\tStatus    int32\n\tConstant  int32\n\tPrecision int32\n\tTolerance int32\n\tTime      Timeval\n\tTick      int32\n\tPpsfreq   int32\n\tJitter    int32\n\tShift     int32\n\tStabil    int32\n\tJitcnt    int32\n\tCalcnt    int32\n\tErrcnt    int32\n\tStbcnt    int32\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int32\n\ntype Tms struct {\n\tUtime  int32\n\tStime  int32\n\tCutime int32\n\tCstime int32\n}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\t_       uint16\n\t_       uint32\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint16\n\t_       [6]byte\n\tSize    int64\n\tBlksize int32\n\t_       [4]byte\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tIno     uint64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\t_      [4]byte\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]uint8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [16]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x58\n\tSizeofIovec           = 0x8\n\tSizeofMsghdr          = 0x1c\n\tSizeofCmsghdr         = 0xc\n)\n\nconst (\n\tSizeofSockFprog = 0x8\n)\n\ntype PtraceRegs struct {\n\tUregs [18]uint32\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\ntype Sysinfo_t struct {\n\tUptime    int32\n\tLoads     [3]uint32\n\tTotalram  uint32\n\tFreeram   uint32\n\tSharedram uint32\n\tBufferram uint32\n\tTotalswap uint32\n\tFreeswap  uint32\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint32\n\tFreehigh  uint32\n\tUnit      uint32\n\t_         [8]uint8\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint32\n\tFname  [6]uint8\n\tFpack  [6]uint8\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tPadFd  int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [32]uint32\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     [116]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\t_                         [6]byte\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]uint8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\t_                         [4]byte\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\t_                         [4]byte\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint32\n\nconst (\n\t_NCPUBITS = 0x20\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [122]byte\n\t_      uint32\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint32\n}\n\ntype Statfs_t struct {\n\tType    int32\n\tBsize   int32\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int32\n\tFrsize  int32\n\tFlags   int32\n\tSpare   [4]int32\n\t_       [4]byte\n}\n\ntype TpacketHdr struct {\n\tStatus  uint32\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n}\n\nconst (\n\tSizeofTpacketHdr = 0x18\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int32\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]uint8\n\tDriver_name [64]uint8\n\tModule_name [64]uint8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]uint8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]uint8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]uint8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]uint8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]uint8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]uint8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]uint8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]uint8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]uint8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]uint8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint16\n\tInode            uint32\n\tRdevice          uint16\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint32\n\tReserved         [4]uint8\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]uint8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]uint8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]uint8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800470a1\n\tPPS_SETPARAMS = 0x400470a2\n\tPPS_GETCAP    = 0x800470a3\n\tPPS_FETCH     = 0xc00470a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint16\n\t_    [2]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint32\n\t_    uint32\n}\ntype SysvShmDesc struct {\n\tPerm       SysvIpcPerm\n\tSegsz      uint32\n\tAtime      uint32\n\tAtime_high uint32\n\tDtime      uint32\n\tDtime_high uint32\n\tCtime      uint32\n\tCtime_high uint32\n\tCpid       int32\n\tLpid       int32\n\tNattch     uint32\n\t_          uint32\n\t_          uint32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go",
    "content": "// cgo -godefs -objdir=/tmp/arm64/cgo -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint64\n\tSize    int64\n\tBlksize int32\n\t_       int32\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       [2]int32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tRegs   [31]uint64\n\tSp     uint64\n\tPc     uint64\n\tPstate uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tPadFd  int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800870a1\n\tPPS_SETPARAMS = 0x400870a2\n\tPPS_GETCAP    = 0x800870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go",
    "content": "// cgo -godefs -objdir=/tmp/loong64/cgo -- -Wall -Werror -static -I/tmp/loong64/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build loong64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint64\n\tSize    int64\n\tBlksize int32\n\t_       int32\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       [2]int32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tRegs     [32]uint64\n\tOrig_a0  uint64\n\tEra      uint64\n\tBadv     uint64\n\tReserved [10]uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800870a1\n\tPPS_SETPARAMS = 0x400870a2\n\tPPS_GETCAP    = 0x800870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_mips.go",
    "content": "// cgo -godefs -objdir=/tmp/mips/cgo -- -Wall -Werror -static -I/tmp/mips/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x4\n\tSizeofLong = 0x4\n)\n\ntype (\n\t_C_long int32\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int32\n\tFreq      int32\n\tMaxerror  int32\n\tEsterror  int32\n\tStatus    int32\n\tConstant  int32\n\tPrecision int32\n\tTolerance int32\n\tTime      Timeval\n\tTick      int32\n\tPpsfreq   int32\n\tJitter    int32\n\tShift     int32\n\tStabil    int32\n\tJitcnt    int32\n\tCalcnt    int32\n\tErrcnt    int32\n\tStbcnt    int32\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int32\n\ntype Tms struct {\n\tUtime  int32\n\tStime  int32\n\tCutime int32\n\tCstime int32\n}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Stat_t struct {\n\tDev     uint32\n\tPad1    [3]int32\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint32\n\tPad2    [3]int32\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize int32\n\tPad4    int32\n\tBlocks  int64\n\tPad5    [14]int32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\t_      [4]byte\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [16]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x58\n\tSizeofIovec           = 0x8\n\tSizeofMsghdr          = 0x1c\n\tSizeofCmsghdr         = 0xc\n)\n\nconst (\n\tSizeofSockFprog = 0x8\n)\n\ntype PtraceRegs struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\ntype Sysinfo_t struct {\n\tUptime    int32\n\tLoads     [3]uint32\n\tTotalram  uint32\n\tFreeram   uint32\n\tSharedram uint32\n\tBufferram uint32\n\tTotalswap uint32\n\tFreeswap  uint32\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint32\n\tFreehigh  uint32\n\tUnit      uint32\n\t_         [8]int8\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint32\n\tFname  [6]int8\n\tFpack  [6]int8\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tPadFd  int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [32]uint32\n}\n\nconst _C__NSIG = 0x80\n\nconst (\n\tSIG_BLOCK   = 0x1\n\tSIG_UNBLOCK = 0x2\n\tSIG_SETMASK = 0x3\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tCode  int32\n\tErrno int32\n\t_     [116]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [23]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\t_                         [6]byte\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\t_                         [4]byte\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\t_                         [4]byte\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint32\n\nconst (\n\t_NCPUBITS = 0x20\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [122]byte\n\t_      uint32\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint32\n}\n\ntype Statfs_t struct {\n\tType    int32\n\tBsize   int32\n\tFrsize  int32\n\t_       [4]byte\n\tBlocks  uint64\n\tBfree   uint64\n\tFiles   uint64\n\tFfree   uint64\n\tBavail  uint64\n\tFsid    Fsid\n\tNamelen int32\n\tFlags   int32\n\tSpare   [5]int32\n\t_       [4]byte\n}\n\ntype TpacketHdr struct {\n\tStatus  uint32\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n}\n\nconst (\n\tSizeofTpacketHdr = 0x18\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int32\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint32\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint32\n\tReserved         [4]int8\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400470a1\n\tPPS_SETPARAMS = 0x800470a2\n\tPPS_GETCAP    = 0x400470a3\n\tPPS_FETCH     = 0xc00470a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x80\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint32\n\t_    uint32\n}\ntype SysvShmDesc struct {\n\tPerm       SysvIpcPerm\n\tSegsz      uint32\n\tAtime      uint32\n\tDtime      uint32\n\tCtime      uint32\n\tCpid       int32\n\tLpid       int32\n\tNattch     uint32\n\tAtime_high uint16\n\tDtime_high uint16\n\tCtime_high uint16\n\t_          uint16\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go",
    "content": "// cgo -godefs -objdir=/tmp/mips64/cgo -- -Wall -Werror -static -I/tmp/mips64/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint32\n\tPad1    [3]uint32\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint32\n\tPad2    [3]uint32\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize uint32\n\tPad4    uint32\n\tBlocks  int64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x80\n\nconst (\n\tSIG_BLOCK   = 0x1\n\tSIG_UNBLOCK = 0x2\n\tSIG_SETMASK = 0x3\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tCode  int32\n\tErrno int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [23]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tFrsize  int64\n\tBlocks  uint64\n\tBfree   uint64\n\tFiles   uint64\n\tFfree   uint64\n\tBavail  uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFlags   int64\n\tSpare   [5]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400870a1\n\tPPS_SETPARAMS = 0x800870a2\n\tPPS_GETCAP    = 0x400870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x80\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go",
    "content": "// cgo -godefs -objdir=/tmp/mips64le/cgo -- -Wall -Werror -static -I/tmp/mips64le/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64le && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint32\n\tPad1    [3]uint32\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint32\n\tPad2    [3]uint32\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize uint32\n\tPad4    uint32\n\tBlocks  int64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x80\n\nconst (\n\tSIG_BLOCK   = 0x1\n\tSIG_UNBLOCK = 0x2\n\tSIG_SETMASK = 0x3\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tCode  int32\n\tErrno int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [23]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tFrsize  int64\n\tBlocks  uint64\n\tBfree   uint64\n\tFiles   uint64\n\tFfree   uint64\n\tBavail  uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFlags   int64\n\tSpare   [5]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400870a1\n\tPPS_SETPARAMS = 0x800870a2\n\tPPS_GETCAP    = 0x400870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x80\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go",
    "content": "// cgo -godefs -objdir=/tmp/mipsle/cgo -- -Wall -Werror -static -I/tmp/mipsle/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mipsle && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x4\n\tSizeofLong = 0x4\n)\n\ntype (\n\t_C_long int32\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int32\n\tFreq      int32\n\tMaxerror  int32\n\tEsterror  int32\n\tStatus    int32\n\tConstant  int32\n\tPrecision int32\n\tTolerance int32\n\tTime      Timeval\n\tTick      int32\n\tPpsfreq   int32\n\tJitter    int32\n\tShift     int32\n\tStabil    int32\n\tJitcnt    int32\n\tCalcnt    int32\n\tErrcnt    int32\n\tStbcnt    int32\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int32\n\ntype Tms struct {\n\tUtime  int32\n\tStime  int32\n\tCutime int32\n\tCstime int32\n}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Stat_t struct {\n\tDev     uint32\n\tPad1    [3]int32\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint32\n\tPad2    [3]int32\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize int32\n\tPad4    int32\n\tBlocks  int64\n\tPad5    [14]int32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\t_      [4]byte\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [16]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x58\n\tSizeofIovec           = 0x8\n\tSizeofMsghdr          = 0x1c\n\tSizeofCmsghdr         = 0xc\n)\n\nconst (\n\tSizeofSockFprog = 0x8\n)\n\ntype PtraceRegs struct {\n\tRegs     [32]uint64\n\tLo       uint64\n\tHi       uint64\n\tEpc      uint64\n\tBadvaddr uint64\n\tStatus   uint64\n\tCause    uint64\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\ntype Sysinfo_t struct {\n\tUptime    int32\n\tLoads     [3]uint32\n\tTotalram  uint32\n\tFreeram   uint32\n\tSharedram uint32\n\tBufferram uint32\n\tTotalswap uint32\n\tFreeswap  uint32\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint32\n\tFreehigh  uint32\n\tUnit      uint32\n\t_         [8]int8\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint32\n\tFname  [6]int8\n\tFpack  [6]int8\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\tPadFd  int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [32]uint32\n}\n\nconst _C__NSIG = 0x80\n\nconst (\n\tSIG_BLOCK   = 0x1\n\tSIG_UNBLOCK = 0x2\n\tSIG_SETMASK = 0x3\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tCode  int32\n\tErrno int32\n\t_     [116]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [23]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\t_                         [6]byte\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\t_                         [4]byte\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\t_                         [4]byte\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint32\n\nconst (\n\t_NCPUBITS = 0x20\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [122]byte\n\t_      uint32\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint32\n}\n\ntype Statfs_t struct {\n\tType    int32\n\tBsize   int32\n\tFrsize  int32\n\t_       [4]byte\n\tBlocks  uint64\n\tBfree   uint64\n\tFiles   uint64\n\tFfree   uint64\n\tBavail  uint64\n\tFsid    Fsid\n\tNamelen int32\n\tFlags   int32\n\tSpare   [5]int32\n\t_       [4]byte\n}\n\ntype TpacketHdr struct {\n\tStatus  uint32\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n}\n\nconst (\n\tSizeofTpacketHdr = 0x18\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int32\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint32\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint32\n\tReserved         [4]int8\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400470a1\n\tPPS_SETPARAMS = 0x800470a2\n\tPPS_GETCAP    = 0x400470a3\n\tPPS_FETCH     = 0xc00470a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x80\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint32\n\t_    uint32\n}\ntype SysvShmDesc struct {\n\tPerm       SysvIpcPerm\n\tSegsz      uint32\n\tAtime      uint32\n\tDtime      uint32\n\tCtime      uint32\n\tCpid       int32\n\tLpid       int32\n\tNattch     uint32\n\tAtime_high uint16\n\tDtime_high uint16\n\tCtime_high uint16\n\t_          uint16\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go",
    "content": "// cgo -godefs -objdir=/tmp/ppc/cgo -- -Wall -Werror -static -I/tmp/ppc/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x4\n\tSizeofLong = 0x4\n)\n\ntype (\n\t_C_long int32\n)\n\ntype Timespec struct {\n\tSec  int32\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int32\n\tFreq      int32\n\tMaxerror  int32\n\tEsterror  int32\n\tStatus    int32\n\tConstant  int32\n\tPrecision int32\n\tTolerance int32\n\tTime      Timeval\n\tTick      int32\n\tPpsfreq   int32\n\tJitter    int32\n\tShift     int32\n\tStabil    int32\n\tJitcnt    int32\n\tCalcnt    int32\n\tErrcnt    int32\n\tStbcnt    int32\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int32\n\ntype Tms struct {\n\tUtime  int32\n\tStime  int32\n\tCutime int32\n\tCstime int32\n}\n\ntype Utimbuf struct {\n\tActime  int32\n\tModtime int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint16\n\t_       [6]byte\n\tSize    int64\n\tBlksize int32\n\t_       [4]byte\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       uint32\n\t_       uint32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\t_      [4]byte\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]uint8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [16]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x58\n\tSizeofIovec           = 0x8\n\tSizeofMsghdr          = 0x1c\n\tSizeofCmsghdr         = 0xc\n)\n\nconst (\n\tSizeofSockFprog = 0x8\n)\n\ntype PtraceRegs struct {\n\tGpr       [32]uint32\n\tNip       uint32\n\tMsr       uint32\n\tOrig_gpr3 uint32\n\tCtr       uint32\n\tLink      uint32\n\tXer       uint32\n\tCcr       uint32\n\tMq        uint32\n\tTrap      uint32\n\tDar       uint32\n\tDsisr     uint32\n\tResult    uint32\n}\n\ntype FdSet struct {\n\tBits [32]int32\n}\n\ntype Sysinfo_t struct {\n\tUptime    int32\n\tLoads     [3]uint32\n\tTotalram  uint32\n\tFreeram   uint32\n\tSharedram uint32\n\tBufferram uint32\n\tTotalswap uint32\n\tFreeswap  uint32\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint32\n\tFreehigh  uint32\n\tUnit      uint32\n\t_         [8]uint8\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint32\n\tFname  [6]uint8\n\tFpack  [6]uint8\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [32]uint32\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     [116]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [19]uint8\n\tLine   uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\t_                         [6]byte\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]uint8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\t_                         [4]byte\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\t_                         [4]byte\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint32\n\nconst (\n\t_NCPUBITS = 0x20\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [122]byte\n\t_      uint32\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint32\n}\n\ntype Statfs_t struct {\n\tType    int32\n\tBsize   int32\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int32\n\tFrsize  int32\n\tFlags   int32\n\tSpare   [4]int32\n\t_       [4]byte\n}\n\ntype TpacketHdr struct {\n\tStatus  uint32\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n}\n\nconst (\n\tSizeofTpacketHdr = 0x18\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int32\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]uint8\n\tDriver_name [64]uint8\n\tModule_name [64]uint8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]uint8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]uint8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]uint8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]uint8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]uint8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]uint8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]uint8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]uint8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]uint8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]uint8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint32\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint32\n\tReserved         [4]uint8\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]uint8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]uint8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]uint8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400470a1\n\tPPS_SETPARAMS = 0x800470a2\n\tPPS_GETCAP    = 0x400470a3\n\tPPS_FETCH     = 0xc00470a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\tSeq  uint32\n\t_    uint32\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm       SysvIpcPerm\n\tAtime_high uint32\n\tAtime      uint32\n\tDtime_high uint32\n\tDtime      uint32\n\tCtime_high uint32\n\tCtime      uint32\n\t_          uint32\n\tSegsz      uint32\n\tCpid       int32\n\tLpid       int32\n\tNattch     uint32\n\t_          uint32\n\t_          uint32\n\t_          [4]byte\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go",
    "content": "// cgo -godefs -objdir=/tmp/ppc64/cgo -- -Wall -Werror -static -I/tmp/ppc64/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint32\n\tUid     uint32\n\tGid     uint32\n\t_       int32\n\tRdev    uint64\n\tSize    int64\n\tBlksize int64\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       uint64\n\t_       uint64\n\t_       uint64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]uint8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tGpr       [32]uint64\n\tNip       uint64\n\tMsr       uint64\n\tOrig_gpr3 uint64\n\tCtr       uint64\n\tLink      uint64\n\tXer       uint64\n\tCcr       uint64\n\tSofte     uint64\n\tTrap      uint64\n\tDar       uint64\n\tDsisr     uint64\n\tResult    uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]uint8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]uint8\n\tFpack  [6]uint8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [19]uint8\n\tLine   uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]uint8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]uint8\n\tDriver_name [64]uint8\n\tModule_name [64]uint8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]uint8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]uint8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]uint8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]uint8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]uint8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]uint8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]uint8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]uint8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]uint8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]uint8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint64\n\tInode            uint64\n\tRdevice          uint64\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]uint8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]uint8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]uint8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]uint8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400870a1\n\tPPS_SETPARAMS = 0x800870a2\n\tPPS_GETCAP    = 0x400870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\tSeq  uint32\n\t_    uint32\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tSegsz  uint64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go",
    "content": "// cgo -godefs -objdir=/tmp/ppc64le/cgo -- -Wall -Werror -static -I/tmp/ppc64le/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64le && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint32\n\tUid     uint32\n\tGid     uint32\n\t_       int32\n\tRdev    uint64\n\tSize    int64\n\tBlksize int64\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       uint64\n\t_       uint64\n\t_       uint64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]uint8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tGpr       [32]uint64\n\tNip       uint64\n\tMsr       uint64\n\tOrig_gpr3 uint64\n\tCtr       uint64\n\tLink      uint64\n\tXer       uint64\n\tCcr       uint64\n\tSofte     uint64\n\tTrap      uint64\n\tDar       uint64\n\tDsisr     uint64\n\tResult    uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]uint8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]uint8\n\tFpack  [6]uint8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [19]uint8\n\tLine   uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]uint8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]uint8\n\tDriver_name [64]uint8\n\tModule_name [64]uint8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]uint8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]uint8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]uint8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]uint8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]uint8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]uint8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]uint8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]uint8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]uint8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]uint8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint64\n\tInode            uint64\n\tRdevice          uint64\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]uint8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]uint8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]uint8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]uint8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400870a1\n\tPPS_SETPARAMS = 0x800870a2\n\tPPS_GETCAP    = 0x400870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\tSeq  uint32\n\t_    uint32\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tSegsz  uint64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go",
    "content": "// cgo -godefs -objdir=/tmp/riscv64/cgo -- -Wall -Werror -static -I/tmp/riscv64/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint64\n\tSize    int64\n\tBlksize int32\n\t_       int32\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       [2]int32\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]uint8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tPc  uint64\n\tRa  uint64\n\tSp  uint64\n\tGp  uint64\n\tTp  uint64\n\tT0  uint64\n\tT1  uint64\n\tT2  uint64\n\tS0  uint64\n\tS1  uint64\n\tA0  uint64\n\tA1  uint64\n\tA2  uint64\n\tA3  uint64\n\tA4  uint64\n\tA5  uint64\n\tA6  uint64\n\tA7  uint64\n\tS2  uint64\n\tS3  uint64\n\tS4  uint64\n\tS5  uint64\n\tS6  uint64\n\tS7  uint64\n\tS8  uint64\n\tS9  uint64\n\tS10 uint64\n\tS11 uint64\n\tT3  uint64\n\tT4  uint64\n\tT5  uint64\n\tT6  uint64\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]uint8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]uint8\n\tFpack  [6]uint8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]uint8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x1\n\tCBitFieldMaskBit1  = 0x2\n\tCBitFieldMaskBit2  = 0x4\n\tCBitFieldMaskBit3  = 0x8\n\tCBitFieldMaskBit4  = 0x10\n\tCBitFieldMaskBit5  = 0x20\n\tCBitFieldMaskBit6  = 0x40\n\tCBitFieldMaskBit7  = 0x80\n\tCBitFieldMaskBit8  = 0x100\n\tCBitFieldMaskBit9  = 0x200\n\tCBitFieldMaskBit10 = 0x400\n\tCBitFieldMaskBit11 = 0x800\n\tCBitFieldMaskBit12 = 0x1000\n\tCBitFieldMaskBit13 = 0x2000\n\tCBitFieldMaskBit14 = 0x4000\n\tCBitFieldMaskBit15 = 0x8000\n\tCBitFieldMaskBit16 = 0x10000\n\tCBitFieldMaskBit17 = 0x20000\n\tCBitFieldMaskBit18 = 0x40000\n\tCBitFieldMaskBit19 = 0x80000\n\tCBitFieldMaskBit20 = 0x100000\n\tCBitFieldMaskBit21 = 0x200000\n\tCBitFieldMaskBit22 = 0x400000\n\tCBitFieldMaskBit23 = 0x800000\n\tCBitFieldMaskBit24 = 0x1000000\n\tCBitFieldMaskBit25 = 0x2000000\n\tCBitFieldMaskBit26 = 0x4000000\n\tCBitFieldMaskBit27 = 0x8000000\n\tCBitFieldMaskBit28 = 0x10000000\n\tCBitFieldMaskBit29 = 0x20000000\n\tCBitFieldMaskBit30 = 0x40000000\n\tCBitFieldMaskBit31 = 0x80000000\n\tCBitFieldMaskBit32 = 0x100000000\n\tCBitFieldMaskBit33 = 0x200000000\n\tCBitFieldMaskBit34 = 0x400000000\n\tCBitFieldMaskBit35 = 0x800000000\n\tCBitFieldMaskBit36 = 0x1000000000\n\tCBitFieldMaskBit37 = 0x2000000000\n\tCBitFieldMaskBit38 = 0x4000000000\n\tCBitFieldMaskBit39 = 0x8000000000\n\tCBitFieldMaskBit40 = 0x10000000000\n\tCBitFieldMaskBit41 = 0x20000000000\n\tCBitFieldMaskBit42 = 0x40000000000\n\tCBitFieldMaskBit43 = 0x80000000000\n\tCBitFieldMaskBit44 = 0x100000000000\n\tCBitFieldMaskBit45 = 0x200000000000\n\tCBitFieldMaskBit46 = 0x400000000000\n\tCBitFieldMaskBit47 = 0x800000000000\n\tCBitFieldMaskBit48 = 0x1000000000000\n\tCBitFieldMaskBit49 = 0x2000000000000\n\tCBitFieldMaskBit50 = 0x4000000000000\n\tCBitFieldMaskBit51 = 0x8000000000000\n\tCBitFieldMaskBit52 = 0x10000000000000\n\tCBitFieldMaskBit53 = 0x20000000000000\n\tCBitFieldMaskBit54 = 0x40000000000000\n\tCBitFieldMaskBit55 = 0x80000000000000\n\tCBitFieldMaskBit56 = 0x100000000000000\n\tCBitFieldMaskBit57 = 0x200000000000000\n\tCBitFieldMaskBit58 = 0x400000000000000\n\tCBitFieldMaskBit59 = 0x800000000000000\n\tCBitFieldMaskBit60 = 0x1000000000000000\n\tCBitFieldMaskBit61 = 0x2000000000000000\n\tCBitFieldMaskBit62 = 0x4000000000000000\n\tCBitFieldMaskBit63 = 0x8000000000000000\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]uint8\n\tDriver_name [64]uint8\n\tModule_name [64]uint8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]uint8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]uint8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]uint8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]uint8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]uint8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]uint8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]uint8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]uint8\n\tGeniv       [64]uint8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]uint8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]uint8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]uint8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]uint8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]uint8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]uint8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]uint8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]uint8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]uint8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]uint8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800870a1\n\tPPS_SETPARAMS = 0x400870a2\n\tPPS_GETCAP    = 0x800870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    [0]uint8\n\tSeq  uint16\n\t_    uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n\ntype RISCVHWProbePairs struct {\n\tKey   int64\n\tValue uint64\n}\n\nconst (\n\tRISCV_HWPROBE_KEY_MVENDORID          = 0x0\n\tRISCV_HWPROBE_KEY_MARCHID            = 0x1\n\tRISCV_HWPROBE_KEY_MIMPID             = 0x2\n\tRISCV_HWPROBE_KEY_BASE_BEHAVIOR      = 0x3\n\tRISCV_HWPROBE_BASE_BEHAVIOR_IMA      = 0x1\n\tRISCV_HWPROBE_KEY_IMA_EXT_0          = 0x4\n\tRISCV_HWPROBE_IMA_FD                 = 0x1\n\tRISCV_HWPROBE_IMA_C                  = 0x2\n\tRISCV_HWPROBE_IMA_V                  = 0x4\n\tRISCV_HWPROBE_EXT_ZBA                = 0x8\n\tRISCV_HWPROBE_EXT_ZBB                = 0x10\n\tRISCV_HWPROBE_EXT_ZBS                = 0x20\n\tRISCV_HWPROBE_EXT_ZICBOZ             = 0x40\n\tRISCV_HWPROBE_EXT_ZBC                = 0x80\n\tRISCV_HWPROBE_EXT_ZBKB               = 0x100\n\tRISCV_HWPROBE_EXT_ZBKC               = 0x200\n\tRISCV_HWPROBE_EXT_ZBKX               = 0x400\n\tRISCV_HWPROBE_EXT_ZKND               = 0x800\n\tRISCV_HWPROBE_EXT_ZKNE               = 0x1000\n\tRISCV_HWPROBE_EXT_ZKNH               = 0x2000\n\tRISCV_HWPROBE_EXT_ZKSED              = 0x4000\n\tRISCV_HWPROBE_EXT_ZKSH               = 0x8000\n\tRISCV_HWPROBE_EXT_ZKT                = 0x10000\n\tRISCV_HWPROBE_EXT_ZVBB               = 0x20000\n\tRISCV_HWPROBE_EXT_ZVBC               = 0x40000\n\tRISCV_HWPROBE_EXT_ZVKB               = 0x80000\n\tRISCV_HWPROBE_EXT_ZVKG               = 0x100000\n\tRISCV_HWPROBE_EXT_ZVKNED             = 0x200000\n\tRISCV_HWPROBE_EXT_ZVKNHA             = 0x400000\n\tRISCV_HWPROBE_EXT_ZVKNHB             = 0x800000\n\tRISCV_HWPROBE_EXT_ZVKSED             = 0x1000000\n\tRISCV_HWPROBE_EXT_ZVKSH              = 0x2000000\n\tRISCV_HWPROBE_EXT_ZVKT               = 0x4000000\n\tRISCV_HWPROBE_EXT_ZFH                = 0x8000000\n\tRISCV_HWPROBE_EXT_ZFHMIN             = 0x10000000\n\tRISCV_HWPROBE_EXT_ZIHINTNTL          = 0x20000000\n\tRISCV_HWPROBE_EXT_ZVFH               = 0x40000000\n\tRISCV_HWPROBE_EXT_ZVFHMIN            = 0x80000000\n\tRISCV_HWPROBE_EXT_ZFA                = 0x100000000\n\tRISCV_HWPROBE_EXT_ZTSO               = 0x200000000\n\tRISCV_HWPROBE_EXT_ZACAS              = 0x400000000\n\tRISCV_HWPROBE_EXT_ZICOND             = 0x800000000\n\tRISCV_HWPROBE_EXT_ZIHINTPAUSE        = 0x1000000000\n\tRISCV_HWPROBE_KEY_CPUPERF_0          = 0x5\n\tRISCV_HWPROBE_MISALIGNED_UNKNOWN     = 0x0\n\tRISCV_HWPROBE_MISALIGNED_EMULATED    = 0x1\n\tRISCV_HWPROBE_MISALIGNED_SLOW        = 0x2\n\tRISCV_HWPROBE_MISALIGNED_FAST        = 0x3\n\tRISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4\n\tRISCV_HWPROBE_MISALIGNED_MASK        = 0x7\n\tRISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE  = 0x6\n\tRISCV_HWPROBE_WHICH_CPUS             = 0x1\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go",
    "content": "// cgo -godefs -objdir=/tmp/s390x/cgo -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build s390x && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint32\n\tUid     uint32\n\tGid     uint32\n\t_       int32\n\tRdev    uint64\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize int64\n\tBlocks  int64\n\t_       [3]int64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      [4]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x6\n\tFADV_NOREUSE  = 0x7\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tPsw                      PtracePsw\n\tGprs                     [16]uint64\n\tAcrs                     [16]uint32\n\tOrig_gpr2                uint64\n\tFp_regs                  PtraceFpregs\n\tPer_info                 PtracePer\n\tIeee_instruction_pointer uint64\n}\n\ntype PtracePsw struct {\n\tMask uint64\n\tAddr uint64\n}\n\ntype PtraceFpregs struct {\n\tFpc  uint32\n\tFprs [16]float64\n}\n\ntype PtracePer struct {\n\tControl_regs  [3]uint64\n\t_             [8]byte\n\tStarting_addr uint64\n\tEnding_addr   uint64\n\tPerc_atmid    uint16\n\tAddress       uint64\n\tAccess_id     uint8\n\t_             [7]byte\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x80000\n)\n\nconst (\n\tPOLLRDHUP = 0x2000\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x0\n\tSIG_UNBLOCK = 0x1\n\tSIG_SETMASK = 0x2\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    uint32\n\tBsize   uint32\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen uint32\n\tFrsize  uint32\n\tFlags   uint32\n\tSpare   [4]uint32\n\t_       [4]byte\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x1269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint16\n\tInode            uint64\n\tRdevice          uint16\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x800870a1\n\tPPS_SETPARAMS = 0x400870a2\n\tPPS_GETCAP    = 0x800870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x800\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    uint16\n\tSeq  uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go",
    "content": "// cgo -godefs -objdir=/tmp/sparc64/cgo -- -Wall -Werror -static -I/tmp/sparc64/include linux/types.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build sparc64 && linux\n\npackage unix\n\nconst (\n\tSizeofPtr  = 0x8\n\tSizeofLong = 0x8\n)\n\ntype (\n\t_C_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Timex struct {\n\tModes     uint32\n\tOffset    int64\n\tFreq      int64\n\tMaxerror  int64\n\tEsterror  int64\n\tStatus    int32\n\tConstant  int64\n\tPrecision int64\n\tTolerance int64\n\tTime      Timeval\n\tTick      int64\n\tPpsfreq   int64\n\tJitter    int64\n\tShift     int32\n\tStabil    int64\n\tJitcnt    int64\n\tCalcnt    int64\n\tErrcnt    int64\n\tStbcnt    int64\n\tTai       int32\n\t_         [44]byte\n}\n\ntype Time_t int64\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Stat_t struct {\n\tDev     uint64\n\t_       uint16\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\t_       uint16\n\tSize    int64\n\tBlksize int64\n\tBlocks  int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\t_       uint64\n\t_       uint64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]int8\n\t_      [5]byte\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\t_      int16\n\t_      [2]byte\n}\n\ntype DmNameList struct {\n\tDev  uint64\n\tNext uint32\n\tName [0]byte\n\t_    [4]byte\n}\n\nconst (\n\tFADV_DONTNEED = 0x4\n\tFADV_NOREUSE  = 0x5\n)\n\ntype RawSockaddrNFCLLCP struct {\n\tSa_family        uint16\n\tDev_idx          uint32\n\tTarget_idx       uint32\n\tNfc_protocol     uint32\n\tDsap             uint8\n\tSsap             uint8\n\tService_name     [63]uint8\n\tService_name_len uint64\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [96]int8\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint64\n\tControl    *byte\n\tControllen uint64\n\tFlags      int32\n\t_          [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint64\n\tLevel int32\n\tType  int32\n}\n\ntype ifreq struct {\n\tIfrn [16]byte\n\tIfru [24]byte\n}\n\nconst (\n\tSizeofSockaddrNFCLLCP = 0x60\n\tSizeofIovec           = 0x10\n\tSizeofMsghdr          = 0x38\n\tSizeofCmsghdr         = 0x10\n)\n\nconst (\n\tSizeofSockFprog = 0x10\n)\n\ntype PtraceRegs struct {\n\tRegs   [16]uint64\n\tTstate uint64\n\tTpc    uint64\n\tTnpc   uint64\n\tY      uint32\n\tMagic  uint32\n}\n\ntype FdSet struct {\n\tBits [16]int64\n}\n\ntype Sysinfo_t struct {\n\tUptime    int64\n\tLoads     [3]uint64\n\tTotalram  uint64\n\tFreeram   uint64\n\tSharedram uint64\n\tBufferram uint64\n\tTotalswap uint64\n\tFreeswap  uint64\n\tProcs     uint16\n\tPad       uint16\n\tTotalhigh uint64\n\tFreehigh  uint64\n\tUnit      uint32\n\t_         [0]int8\n\t_         [4]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int32\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\nconst (\n\tOPEN_TREE_CLOEXEC = 0x400000\n)\n\nconst (\n\tPOLLRDHUP = 0x800\n)\n\ntype Sigset_t struct {\n\tVal [16]uint64\n}\n\nconst _C__NSIG = 0x41\n\nconst (\n\tSIG_BLOCK   = 0x1\n\tSIG_UNBLOCK = 0x2\n\tSIG_SETMASK = 0x4\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\t_     int32\n\t_     [112]byte\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tLine   uint8\n\tCc     [19]uint8\n\tIspeed uint32\n\tOspeed uint32\n}\n\ntype Taskstats struct {\n\tVersion                   uint16\n\tAc_exitcode               uint32\n\tAc_flag                   uint8\n\tAc_nice                   uint8\n\tCpu_count                 uint64\n\tCpu_delay_total           uint64\n\tBlkio_count               uint64\n\tBlkio_delay_total         uint64\n\tSwapin_count              uint64\n\tSwapin_delay_total        uint64\n\tCpu_run_real_total        uint64\n\tCpu_run_virtual_total     uint64\n\tAc_comm                   [32]int8\n\tAc_sched                  uint8\n\tAc_pad                    [3]uint8\n\t_                         [4]byte\n\tAc_uid                    uint32\n\tAc_gid                    uint32\n\tAc_pid                    uint32\n\tAc_ppid                   uint32\n\tAc_btime                  uint32\n\tAc_etime                  uint64\n\tAc_utime                  uint64\n\tAc_stime                  uint64\n\tAc_minflt                 uint64\n\tAc_majflt                 uint64\n\tCoremem                   uint64\n\tVirtmem                   uint64\n\tHiwater_rss               uint64\n\tHiwater_vm                uint64\n\tRead_char                 uint64\n\tWrite_char                uint64\n\tRead_syscalls             uint64\n\tWrite_syscalls            uint64\n\tRead_bytes                uint64\n\tWrite_bytes               uint64\n\tCancelled_write_bytes     uint64\n\tNvcsw                     uint64\n\tNivcsw                    uint64\n\tAc_utimescaled            uint64\n\tAc_stimescaled            uint64\n\tCpu_scaled_run_real_total uint64\n\tFreepages_count           uint64\n\tFreepages_delay_total     uint64\n\tThrashing_count           uint64\n\tThrashing_delay_total     uint64\n\tAc_btime64                uint64\n\tCompact_count             uint64\n\tCompact_delay_total       uint64\n\tAc_tgid                   uint32\n\tAc_tgetime                uint64\n\tAc_exe_dev                uint64\n\tAc_exe_inode              uint64\n\tWpcopy_count              uint64\n\tWpcopy_delay_total        uint64\n\tIrq_count                 uint64\n\tIrq_delay_total           uint64\n\tCpu_delay_max             uint64\n\tCpu_delay_min             uint64\n\tBlkio_delay_max           uint64\n\tBlkio_delay_min           uint64\n\tSwapin_delay_max          uint64\n\tSwapin_delay_min          uint64\n\tFreepages_delay_max       uint64\n\tFreepages_delay_min       uint64\n\tThrashing_delay_max       uint64\n\tThrashing_delay_min       uint64\n\tCompact_delay_max         uint64\n\tCompact_delay_min         uint64\n\tWpcopy_delay_max          uint64\n\tWpcopy_delay_min          uint64\n\tIrq_delay_max             uint64\n\tIrq_delay_min             uint64\n}\n\ntype cpuMask uint64\n\nconst (\n\t_NCPUBITS = 0x40\n)\n\nconst (\n\tCBitFieldMaskBit0  = 0x8000000000000000\n\tCBitFieldMaskBit1  = 0x4000000000000000\n\tCBitFieldMaskBit2  = 0x2000000000000000\n\tCBitFieldMaskBit3  = 0x1000000000000000\n\tCBitFieldMaskBit4  = 0x800000000000000\n\tCBitFieldMaskBit5  = 0x400000000000000\n\tCBitFieldMaskBit6  = 0x200000000000000\n\tCBitFieldMaskBit7  = 0x100000000000000\n\tCBitFieldMaskBit8  = 0x80000000000000\n\tCBitFieldMaskBit9  = 0x40000000000000\n\tCBitFieldMaskBit10 = 0x20000000000000\n\tCBitFieldMaskBit11 = 0x10000000000000\n\tCBitFieldMaskBit12 = 0x8000000000000\n\tCBitFieldMaskBit13 = 0x4000000000000\n\tCBitFieldMaskBit14 = 0x2000000000000\n\tCBitFieldMaskBit15 = 0x1000000000000\n\tCBitFieldMaskBit16 = 0x800000000000\n\tCBitFieldMaskBit17 = 0x400000000000\n\tCBitFieldMaskBit18 = 0x200000000000\n\tCBitFieldMaskBit19 = 0x100000000000\n\tCBitFieldMaskBit20 = 0x80000000000\n\tCBitFieldMaskBit21 = 0x40000000000\n\tCBitFieldMaskBit22 = 0x20000000000\n\tCBitFieldMaskBit23 = 0x10000000000\n\tCBitFieldMaskBit24 = 0x8000000000\n\tCBitFieldMaskBit25 = 0x4000000000\n\tCBitFieldMaskBit26 = 0x2000000000\n\tCBitFieldMaskBit27 = 0x1000000000\n\tCBitFieldMaskBit28 = 0x800000000\n\tCBitFieldMaskBit29 = 0x400000000\n\tCBitFieldMaskBit30 = 0x200000000\n\tCBitFieldMaskBit31 = 0x100000000\n\tCBitFieldMaskBit32 = 0x80000000\n\tCBitFieldMaskBit33 = 0x40000000\n\tCBitFieldMaskBit34 = 0x20000000\n\tCBitFieldMaskBit35 = 0x10000000\n\tCBitFieldMaskBit36 = 0x8000000\n\tCBitFieldMaskBit37 = 0x4000000\n\tCBitFieldMaskBit38 = 0x2000000\n\tCBitFieldMaskBit39 = 0x1000000\n\tCBitFieldMaskBit40 = 0x800000\n\tCBitFieldMaskBit41 = 0x400000\n\tCBitFieldMaskBit42 = 0x200000\n\tCBitFieldMaskBit43 = 0x100000\n\tCBitFieldMaskBit44 = 0x80000\n\tCBitFieldMaskBit45 = 0x40000\n\tCBitFieldMaskBit46 = 0x20000\n\tCBitFieldMaskBit47 = 0x10000\n\tCBitFieldMaskBit48 = 0x8000\n\tCBitFieldMaskBit49 = 0x4000\n\tCBitFieldMaskBit50 = 0x2000\n\tCBitFieldMaskBit51 = 0x1000\n\tCBitFieldMaskBit52 = 0x800\n\tCBitFieldMaskBit53 = 0x400\n\tCBitFieldMaskBit54 = 0x200\n\tCBitFieldMaskBit55 = 0x100\n\tCBitFieldMaskBit56 = 0x80\n\tCBitFieldMaskBit57 = 0x40\n\tCBitFieldMaskBit58 = 0x20\n\tCBitFieldMaskBit59 = 0x10\n\tCBitFieldMaskBit60 = 0x8\n\tCBitFieldMaskBit61 = 0x4\n\tCBitFieldMaskBit62 = 0x2\n\tCBitFieldMaskBit63 = 0x1\n)\n\ntype SockaddrStorage struct {\n\tFamily uint16\n\tData   [118]byte\n\t_      uint64\n}\n\ntype HDGeometry struct {\n\tHeads     uint8\n\tSectors   uint8\n\tCylinders uint16\n\tStart     uint64\n}\n\ntype Statfs_t struct {\n\tType    int64\n\tBsize   int64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint64\n\tFfree   uint64\n\tFsid    Fsid\n\tNamelen int64\n\tFrsize  int64\n\tFlags   int64\n\tSpare   [4]int64\n}\n\ntype TpacketHdr struct {\n\tStatus  uint64\n\tLen     uint32\n\tSnaplen uint32\n\tMac     uint16\n\tNet     uint16\n\tSec     uint32\n\tUsec    uint32\n\t_       [4]byte\n}\n\nconst (\n\tSizeofTpacketHdr = 0x20\n)\n\ntype RTCPLLInfo struct {\n\tCtrl    int32\n\tValue   int32\n\tMax     int32\n\tMin     int32\n\tPosmult int32\n\tNegmult int32\n\tClock   int64\n}\n\ntype BlkpgPartition struct {\n\tStart   int64\n\tLength  int64\n\tPno     int32\n\tDevname [64]uint8\n\tVolname [64]uint8\n\t_       [4]byte\n}\n\nconst (\n\tBLKPG = 0x20001269\n)\n\ntype CryptoUserAlg struct {\n\tName        [64]int8\n\tDriver_name [64]int8\n\tModule_name [64]int8\n\tType        uint32\n\tMask        uint32\n\tRefcnt      uint32\n\tFlags       uint32\n}\n\ntype CryptoStatAEAD struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatAKCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tVerify_cnt   uint64\n\tSign_cnt     uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCipher struct {\n\tType         [64]int8\n\tEncrypt_cnt  uint64\n\tEncrypt_tlen uint64\n\tDecrypt_cnt  uint64\n\tDecrypt_tlen uint64\n\tErr_cnt      uint64\n}\n\ntype CryptoStatCompress struct {\n\tType            [64]int8\n\tCompress_cnt    uint64\n\tCompress_tlen   uint64\n\tDecompress_cnt  uint64\n\tDecompress_tlen uint64\n\tErr_cnt         uint64\n}\n\ntype CryptoStatHash struct {\n\tType      [64]int8\n\tHash_cnt  uint64\n\tHash_tlen uint64\n\tErr_cnt   uint64\n}\n\ntype CryptoStatKPP struct {\n\tType                      [64]int8\n\tSetsecret_cnt             uint64\n\tGenerate_public_key_cnt   uint64\n\tCompute_shared_secret_cnt uint64\n\tErr_cnt                   uint64\n}\n\ntype CryptoStatRNG struct {\n\tType          [64]int8\n\tGenerate_cnt  uint64\n\tGenerate_tlen uint64\n\tSeed_cnt      uint64\n\tErr_cnt       uint64\n}\n\ntype CryptoStatLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportLarval struct {\n\tType [64]int8\n}\n\ntype CryptoReportHash struct {\n\tType       [64]int8\n\tBlocksize  uint32\n\tDigestsize uint32\n}\n\ntype CryptoReportCipher struct {\n\tType        [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n}\n\ntype CryptoReportBlkCipher struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMin_keysize uint32\n\tMax_keysize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportAEAD struct {\n\tType        [64]int8\n\tGeniv       [64]int8\n\tBlocksize   uint32\n\tMaxauthsize uint32\n\tIvsize      uint32\n}\n\ntype CryptoReportComp struct {\n\tType [64]int8\n}\n\ntype CryptoReportRNG struct {\n\tType     [64]int8\n\tSeedsize uint32\n}\n\ntype CryptoReportAKCipher struct {\n\tType [64]int8\n}\n\ntype CryptoReportKPP struct {\n\tType [64]int8\n}\n\ntype CryptoReportAcomp struct {\n\tType [64]int8\n}\n\ntype LoopInfo struct {\n\tNumber           int32\n\tDevice           uint32\n\tInode            uint64\n\tRdevice          uint32\n\tOffset           int32\n\tEncrypt_type     int32\n\tEncrypt_key_size int32\n\tFlags            int32\n\tName             [64]int8\n\tEncrypt_key      [32]uint8\n\tInit             [2]uint64\n\tReserved         [4]int8\n\t_                [4]byte\n}\n\ntype TIPCSubscr struct {\n\tSeq     TIPCServiceRange\n\tTimeout uint32\n\tFilter  uint32\n\tHandle  [8]int8\n}\n\ntype TIPCSIOCLNReq struct {\n\tPeer     uint32\n\tId       uint32\n\tLinkname [68]int8\n}\n\ntype TIPCSIOCNodeIDReq struct {\n\tPeer uint32\n\tId   [16]int8\n}\n\ntype PPSKInfo struct {\n\tAssert_sequence uint32\n\tClear_sequence  uint32\n\tAssert_tu       PPSKTime\n\tClear_tu        PPSKTime\n\tCurrent_mode    int32\n\t_               [4]byte\n}\n\nconst (\n\tPPS_GETPARAMS = 0x400870a1\n\tPPS_SETPARAMS = 0x800870a2\n\tPPS_GETCAP    = 0x400870a3\n\tPPS_FETCH     = 0xc00870a4\n)\n\nconst (\n\tPIDFD_NONBLOCK = 0x4000\n)\n\ntype SysvIpcPerm struct {\n\tKey  int32\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode uint32\n\t_    uint16\n\tSeq  uint16\n\t_    uint64\n\t_    uint64\n}\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n\tSegsz  uint64\n\tCpid   int32\n\tLpid   int32\n\tNattch uint64\n\t_      uint64\n\t_      uint64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go",
    "content": "// cgo -godefs types_netbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && netbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     uint64\n\tMode    uint32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize uint32\n\tFlags   uint32\n\tGen     uint32\n\tSpare   [2]uint32\n}\n\ntype Statfs_t [0]byte\n\ntype Statvfs_t struct {\n\tFlag        uint32\n\tBsize       uint32\n\tFrsize      uint32\n\tIosize      uint32\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tBresvd      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFavail      uint64\n\tFresvd      uint64\n\tSyncreads   uint64\n\tSyncwrites  uint64\n\tAsyncreads  uint64\n\tAsyncwrites uint64\n\tFsidx       Fsid\n\tFsid        uint32\n\tNamemax     uint32\n\tOwner       uint32\n\tSpare       [4]uint32\n\tFstypename  [32]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno    uint64\n\tReclen    uint16\n\tNamlen    uint16\n\tType      uint8\n\tName      [512]int8\n\tPad_cgo_0 [3]byte\n}\n\ntype Fsid struct {\n\tX__fsid_val [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tST_WAIT   = 0x1\n\tST_NOWAIT = 0x2\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x14\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint32\n\tFilter uint32\n\tFlags  uint32\n\tFflags uint32\n\tData   int64\n\tUdata  int32\n}\n\ntype FdSet struct {\n\tBits [8]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0x98\n\tSizeofIfData           = 0x84\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x78\n\tSizeofRtMetrics        = 0x50\n)\n\ntype IfMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tData      IfData\n\tPad_cgo_1 [4]byte\n}\n\ntype IfData struct {\n\tType       uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tPad_cgo_0  [1]byte\n\tLink_state int32\n\tMtu        uint64\n\tMetric     uint64\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tLastchange Timespec\n}\n\ntype IfaMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tMetric    int32\n\tIndex     uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tFlags     int32\n\tAddrs     int32\n\tPid       int32\n\tSeq       int32\n\tErrno     int32\n\tUse       int32\n\tInits     int32\n\tPad_cgo_1 [4]byte\n\tRmx       RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tExpire   int64\n\tPksent   int64\n}\n\ntype Mclpool [0]byte\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x80\n\tSizeofBpfProgram = 0x8\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x14\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv    uint64\n\tDrop    uint64\n\tCapt    uint64\n\tPadding [13]uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp    BpfTimeval\n\tCaplen    uint32\n\tDatalen   uint32\n\tHdrlen    uint16\n\tPad_cgo_0 [2]byte\n}\n\ntype BpfTimeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype Ptmget struct {\n\tCfd int32\n\tSfd int32\n\tCn  [1024]byte\n\tSn  [1024]byte\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sysctlnode struct {\n\tFlags           uint32\n\tNum             int32\n\tName            [32]int8\n\tVer             uint32\n\tX__rsvd         uint32\n\tUn              [16]byte\n\tX_sysctl_size   [8]byte\n\tX_sysctl_func   [8]byte\n\tX_sysctl_parent [8]byte\n\tX_sysctl_desc   [8]byte\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x278\n\ntype Uvmexp struct {\n\tPagesize           int64\n\tPagemask           int64\n\tPageshift          int64\n\tNpages             int64\n\tFree               int64\n\tActive             int64\n\tInactive           int64\n\tPaging             int64\n\tWired              int64\n\tZeropages          int64\n\tReserve_pagedaemon int64\n\tReserve_kernel     int64\n\tFreemin            int64\n\tFreetarg           int64\n\tInactarg           int64\n\tWiredmax           int64\n\tNswapdev           int64\n\tSwpages            int64\n\tSwpginuse          int64\n\tSwpgonly           int64\n\tNswget             int64\n\tUnused1            int64\n\tCpuhit             int64\n\tCpumiss            int64\n\tFaults             int64\n\tTraps              int64\n\tIntrs              int64\n\tSwtch              int64\n\tSofts              int64\n\tSyscalls           int64\n\tPageins            int64\n\tSwapins            int64\n\tSwapouts           int64\n\tPgswapin           int64\n\tPgswapout          int64\n\tForks              int64\n\tForks_ppwait       int64\n\tForks_sharevm      int64\n\tPga_zerohit        int64\n\tPga_zeromiss       int64\n\tZeroaborts         int64\n\tFltnoram           int64\n\tFltnoanon          int64\n\tFltpgwait          int64\n\tFltpgrele          int64\n\tFltrelck           int64\n\tFltrelckok         int64\n\tFltanget           int64\n\tFltanretry         int64\n\tFltamcopy          int64\n\tFltnamap           int64\n\tFltnomap           int64\n\tFltlget            int64\n\tFltget             int64\n\tFlt_anon           int64\n\tFlt_acow           int64\n\tFlt_obj            int64\n\tFlt_prcopy         int64\n\tFlt_przero         int64\n\tPdwoke             int64\n\tPdrevs             int64\n\tUnused4            int64\n\tPdfreed            int64\n\tPdscans            int64\n\tPdanscan           int64\n\tPdobscan           int64\n\tPdreact            int64\n\tPdbusy             int64\n\tPdpageouts         int64\n\tPdpending          int64\n\tPddeact            int64\n\tAnonpages          int64\n\tFilepages          int64\n\tExecpages          int64\n\tColorhit           int64\n\tColormiss          int64\n\tNcolors            int64\n\tBootpages          int64\n\tPoolpages          int64\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go",
    "content": "// cgo -godefs types_netbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && netbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec       int64\n\tUsec      int32\n\tPad_cgo_0 [4]byte\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     uint64\n\tMode    uint32\n\t_       [4]byte\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\t_       [4]byte\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize uint32\n\tFlags   uint32\n\tGen     uint32\n\tSpare   [2]uint32\n\t_       [4]byte\n}\n\ntype Statfs_t [0]byte\n\ntype Statvfs_t struct {\n\tFlag        uint64\n\tBsize       uint64\n\tFrsize      uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tBresvd      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFavail      uint64\n\tFresvd      uint64\n\tSyncreads   uint64\n\tSyncwrites  uint64\n\tAsyncreads  uint64\n\tAsyncwrites uint64\n\tFsidx       Fsid\n\tFsid        uint64\n\tNamemax     uint64\n\tOwner       uint32\n\tSpare       [4]uint32\n\tFstypename  [32]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n\t_           [4]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno    uint64\n\tReclen    uint16\n\tNamlen    uint16\n\tType      uint8\n\tName      [512]int8\n\tPad_cgo_0 [3]byte\n}\n\ntype Fsid struct {\n\tX__fsid_val [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tST_WAIT   = 0x1\n\tST_NOWAIT = 0x2\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tPad_cgo_0  [4]byte\n\tIov        *Iovec\n\tIovlen     int32\n\tPad_cgo_1  [4]byte\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x14\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent     uint64\n\tFilter    uint32\n\tFlags     uint32\n\tFflags    uint32\n\tPad_cgo_0 [4]byte\n\tData      int64\n\tUdata     int64\n}\n\ntype FdSet struct {\n\tBits [8]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0x98\n\tSizeofIfData           = 0x88\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x78\n\tSizeofRtMetrics        = 0x50\n)\n\ntype IfMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tData      IfData\n}\n\ntype IfData struct {\n\tType       uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tPad_cgo_0  [1]byte\n\tLink_state int32\n\tMtu        uint64\n\tMetric     uint64\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tLastchange Timespec\n}\n\ntype IfaMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tMetric    int32\n\tIndex     uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tFlags     int32\n\tAddrs     int32\n\tPid       int32\n\tSeq       int32\n\tErrno     int32\n\tUse       int32\n\tInits     int32\n\tPad_cgo_1 [4]byte\n\tRmx       RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tExpire   int64\n\tPksent   int64\n}\n\ntype Mclpool [0]byte\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x80\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv    uint64\n\tDrop    uint64\n\tCapt    uint64\n\tPadding [13]uint64\n}\n\ntype BpfProgram struct {\n\tLen       uint32\n\tPad_cgo_0 [4]byte\n\tInsns     *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp    BpfTimeval\n\tCaplen    uint32\n\tDatalen   uint32\n\tHdrlen    uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype BpfTimeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype Ptmget struct {\n\tCfd int32\n\tSfd int32\n\tCn  [1024]byte\n\tSn  [1024]byte\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sysctlnode struct {\n\tFlags           uint32\n\tNum             int32\n\tName            [32]int8\n\tVer             uint32\n\tX__rsvd         uint32\n\tUn              [16]byte\n\tX_sysctl_size   [8]byte\n\tX_sysctl_func   [8]byte\n\tX_sysctl_parent [8]byte\n\tX_sysctl_desc   [8]byte\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x278\n\ntype Uvmexp struct {\n\tPagesize           int64\n\tPagemask           int64\n\tPageshift          int64\n\tNpages             int64\n\tFree               int64\n\tActive             int64\n\tInactive           int64\n\tPaging             int64\n\tWired              int64\n\tZeropages          int64\n\tReserve_pagedaemon int64\n\tReserve_kernel     int64\n\tFreemin            int64\n\tFreetarg           int64\n\tInactarg           int64\n\tWiredmax           int64\n\tNswapdev           int64\n\tSwpages            int64\n\tSwpginuse          int64\n\tSwpgonly           int64\n\tNswget             int64\n\tUnused1            int64\n\tCpuhit             int64\n\tCpumiss            int64\n\tFaults             int64\n\tTraps              int64\n\tIntrs              int64\n\tSwtch              int64\n\tSofts              int64\n\tSyscalls           int64\n\tPageins            int64\n\tSwapins            int64\n\tSwapouts           int64\n\tPgswapin           int64\n\tPgswapout          int64\n\tForks              int64\n\tForks_ppwait       int64\n\tForks_sharevm      int64\n\tPga_zerohit        int64\n\tPga_zeromiss       int64\n\tZeroaborts         int64\n\tFltnoram           int64\n\tFltnoanon          int64\n\tFltpgwait          int64\n\tFltpgrele          int64\n\tFltrelck           int64\n\tFltrelckok         int64\n\tFltanget           int64\n\tFltanretry         int64\n\tFltamcopy          int64\n\tFltnamap           int64\n\tFltnomap           int64\n\tFltlget            int64\n\tFltget             int64\n\tFlt_anon           int64\n\tFlt_acow           int64\n\tFlt_obj            int64\n\tFlt_prcopy         int64\n\tFlt_przero         int64\n\tPdwoke             int64\n\tPdrevs             int64\n\tUnused4            int64\n\tPdfreed            int64\n\tPdscans            int64\n\tPdanscan           int64\n\tPdobscan           int64\n\tPdreact            int64\n\tPdbusy             int64\n\tPdpageouts         int64\n\tPdpending          int64\n\tPddeact            int64\n\tAnonpages          int64\n\tFilepages          int64\n\tExecpages          int64\n\tColorhit           int64\n\tColormiss          int64\n\tNcolors            int64\n\tBootpages          int64\n\tPoolpages          int64\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go",
    "content": "// cgo -godefs types_netbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && netbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec       int64\n\tNsec      int32\n\tPad_cgo_0 [4]byte\n}\n\ntype Timeval struct {\n\tSec       int64\n\tUsec      int32\n\tPad_cgo_0 [4]byte\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     uint64\n\tMode    uint32\n\t_       [4]byte\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\t_       [4]byte\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize uint32\n\tFlags   uint32\n\tGen     uint32\n\tSpare   [2]uint32\n\t_       [4]byte\n}\n\ntype Statfs_t [0]byte\n\ntype Statvfs_t struct {\n\tFlag        uint32\n\tBsize       uint32\n\tFrsize      uint32\n\tIosize      uint32\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tBresvd      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFavail      uint64\n\tFresvd      uint64\n\tSyncreads   uint64\n\tSyncwrites  uint64\n\tAsyncreads  uint64\n\tAsyncwrites uint64\n\tFsidx       Fsid\n\tFsid        uint32\n\tNamemax     uint32\n\tOwner       uint32\n\tSpare       [4]uint64\n\tFstypename  [32]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno    uint64\n\tReclen    uint16\n\tNamlen    uint16\n\tType      uint8\n\tName      [512]int8\n\tPad_cgo_0 [3]byte\n}\n\ntype Fsid struct {\n\tX__fsid_val [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tST_WAIT   = 0x1\n\tST_NOWAIT = 0x2\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     int32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x14\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent     uint32\n\tFilter    uint32\n\tFlags     uint32\n\tFflags    uint32\n\tData      int64\n\tUdata     int32\n\tPad_cgo_0 [4]byte\n}\n\ntype FdSet struct {\n\tBits [8]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0x98\n\tSizeofIfData           = 0x88\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x78\n\tSizeofRtMetrics        = 0x50\n)\n\ntype IfMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tData      IfData\n}\n\ntype IfData struct {\n\tType       uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tPad_cgo_0  [1]byte\n\tLink_state int32\n\tMtu        uint64\n\tMetric     uint64\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tLastchange Timespec\n}\n\ntype IfaMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tMetric    int32\n\tIndex     uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tFlags     int32\n\tAddrs     int32\n\tPid       int32\n\tSeq       int32\n\tErrno     int32\n\tUse       int32\n\tInits     int32\n\tPad_cgo_1 [4]byte\n\tRmx       RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tExpire   int64\n\tPksent   int64\n}\n\ntype Mclpool [0]byte\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x80\n\tSizeofBpfProgram = 0x8\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x14\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv    uint64\n\tDrop    uint64\n\tCapt    uint64\n\tPadding [13]uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp    BpfTimeval\n\tCaplen    uint32\n\tDatalen   uint32\n\tHdrlen    uint16\n\tPad_cgo_0 [2]byte\n}\n\ntype BpfTimeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype Ptmget struct {\n\tCfd int32\n\tSfd int32\n\tCn  [1024]byte\n\tSn  [1024]byte\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sysctlnode struct {\n\tFlags           uint32\n\tNum             int32\n\tName            [32]int8\n\tVer             uint32\n\tX__rsvd         uint32\n\tUn              [16]byte\n\tX_sysctl_size   [8]byte\n\tX_sysctl_func   [8]byte\n\tX_sysctl_parent [8]byte\n\tX_sysctl_desc   [8]byte\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x278\n\ntype Uvmexp struct {\n\tPagesize           int64\n\tPagemask           int64\n\tPageshift          int64\n\tNpages             int64\n\tFree               int64\n\tActive             int64\n\tInactive           int64\n\tPaging             int64\n\tWired              int64\n\tZeropages          int64\n\tReserve_pagedaemon int64\n\tReserve_kernel     int64\n\tFreemin            int64\n\tFreetarg           int64\n\tInactarg           int64\n\tWiredmax           int64\n\tNswapdev           int64\n\tSwpages            int64\n\tSwpginuse          int64\n\tSwpgonly           int64\n\tNswget             int64\n\tUnused1            int64\n\tCpuhit             int64\n\tCpumiss            int64\n\tFaults             int64\n\tTraps              int64\n\tIntrs              int64\n\tSwtch              int64\n\tSofts              int64\n\tSyscalls           int64\n\tPageins            int64\n\tSwapins            int64\n\tSwapouts           int64\n\tPgswapin           int64\n\tPgswapout          int64\n\tForks              int64\n\tForks_ppwait       int64\n\tForks_sharevm      int64\n\tPga_zerohit        int64\n\tPga_zeromiss       int64\n\tZeroaborts         int64\n\tFltnoram           int64\n\tFltnoanon          int64\n\tFltpgwait          int64\n\tFltpgrele          int64\n\tFltrelck           int64\n\tFltrelckok         int64\n\tFltanget           int64\n\tFltanretry         int64\n\tFltamcopy          int64\n\tFltnamap           int64\n\tFltnomap           int64\n\tFltlget            int64\n\tFltget             int64\n\tFlt_anon           int64\n\tFlt_acow           int64\n\tFlt_obj            int64\n\tFlt_prcopy         int64\n\tFlt_przero         int64\n\tPdwoke             int64\n\tPdrevs             int64\n\tUnused4            int64\n\tPdfreed            int64\n\tPdscans            int64\n\tPdanscan           int64\n\tPdobscan           int64\n\tPdreact            int64\n\tPdbusy             int64\n\tPdpageouts         int64\n\tPdpending          int64\n\tPddeact            int64\n\tAnonpages          int64\n\tFilepages          int64\n\tExecpages          int64\n\tColorhit           int64\n\tColormiss          int64\n\tNcolors            int64\n\tBootpages          int64\n\tPoolpages          int64\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go",
    "content": "// cgo -godefs types_netbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && netbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec       int64\n\tUsec      int32\n\tPad_cgo_0 [4]byte\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     uint64\n\tMode    uint32\n\t_       [4]byte\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\t_       [4]byte\n\tRdev    uint64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize uint32\n\tFlags   uint32\n\tGen     uint32\n\tSpare   [2]uint32\n\t_       [4]byte\n}\n\ntype Statfs_t [0]byte\n\ntype Statvfs_t struct {\n\tFlag        uint64\n\tBsize       uint64\n\tFrsize      uint64\n\tIosize      uint64\n\tBlocks      uint64\n\tBfree       uint64\n\tBavail      uint64\n\tBresvd      uint64\n\tFiles       uint64\n\tFfree       uint64\n\tFavail      uint64\n\tFresvd      uint64\n\tSyncreads   uint64\n\tSyncwrites  uint64\n\tAsyncreads  uint64\n\tAsyncwrites uint64\n\tFsidx       Fsid\n\tFsid        uint64\n\tNamemax     uint64\n\tOwner       uint32\n\tSpare       [4]uint32\n\tFstypename  [32]byte\n\tMntonname   [1024]byte\n\tMntfromname [1024]byte\n\t_           [4]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno    uint64\n\tReclen    uint16\n\tNamlen    uint16\n\tType      uint8\n\tName      [512]int8\n\tPad_cgo_0 [3]byte\n}\n\ntype Fsid struct {\n\tX__fsid_val [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\nconst (\n\tST_WAIT   = 0x1\n\tST_NOWAIT = 0x2\n)\n\nconst (\n\tFADV_NORMAL     = 0x0\n\tFADV_RANDOM     = 0x1\n\tFADV_SEQUENTIAL = 0x2\n\tFADV_WILLNEED   = 0x3\n\tFADV_DONTNEED   = 0x4\n\tFADV_NOREUSE    = 0x5\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [12]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tPad_cgo_0  [4]byte\n\tIov        *Iovec\n\tIovlen     int32\n\tPad_cgo_1  [4]byte\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x14\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent     uint64\n\tFilter    uint32\n\tFlags     uint32\n\tFflags    uint32\n\tPad_cgo_0 [4]byte\n\tData      int64\n\tUdata     int64\n}\n\ntype FdSet struct {\n\tBits [8]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0x98\n\tSizeofIfData           = 0x88\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x18\n\tSizeofRtMsghdr         = 0x78\n\tSizeofRtMetrics        = 0x50\n)\n\ntype IfMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tData      IfData\n}\n\ntype IfData struct {\n\tType       uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tPad_cgo_0  [1]byte\n\tLink_state int32\n\tMtu        uint64\n\tMetric     uint64\n\tBaudrate   uint64\n\tIpackets   uint64\n\tIerrors    uint64\n\tOpackets   uint64\n\tOerrors    uint64\n\tCollisions uint64\n\tIbytes     uint64\n\tObytes     uint64\n\tImcasts    uint64\n\tOmcasts    uint64\n\tIqdrops    uint64\n\tNoproto    uint64\n\tLastchange Timespec\n}\n\ntype IfaMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tAddrs     int32\n\tFlags     int32\n\tMetric    int32\n\tIndex     uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tName    [16]int8\n\tWhat    uint16\n}\n\ntype RtMsghdr struct {\n\tMsglen    uint16\n\tVersion   uint8\n\tType      uint8\n\tIndex     uint16\n\tPad_cgo_0 [2]byte\n\tFlags     int32\n\tAddrs     int32\n\tPid       int32\n\tSeq       int32\n\tErrno     int32\n\tUse       int32\n\tInits     int32\n\tPad_cgo_1 [4]byte\n\tRmx       RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint64\n\tMtu      uint64\n\tHopcount uint64\n\tRecvpipe uint64\n\tSendpipe uint64\n\tSsthresh uint64\n\tRtt      uint64\n\tRttvar   uint64\n\tExpire   int64\n\tPksent   int64\n}\n\ntype Mclpool [0]byte\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x80\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x20\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv    uint64\n\tDrop    uint64\n\tCapt    uint64\n\tPadding [13]uint64\n}\n\ntype BpfProgram struct {\n\tLen       uint32\n\tPad_cgo_0 [4]byte\n\tInsns     *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp    BpfTimeval\n\tCaplen    uint32\n\tDatalen   uint32\n\tHdrlen    uint16\n\tPad_cgo_0 [6]byte\n}\n\ntype BpfTimeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype Ptmget struct {\n\tCfd int32\n\tSfd int32\n\tCn  [1024]byte\n\tSn  [1024]byte\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x100\n\tAT_SYMLINK_NOFOLLOW = 0x200\n\tAT_SYMLINK_FOLLOW   = 0x400\n\tAT_REMOVEDIR        = 0x800\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sysctlnode struct {\n\tFlags           uint32\n\tNum             int32\n\tName            [32]int8\n\tVer             uint32\n\tX__rsvd         uint32\n\tUn              [16]byte\n\tX_sysctl_size   [8]byte\n\tX_sysctl_func   [8]byte\n\tX_sysctl_parent [8]byte\n\tX_sysctl_desc   [8]byte\n}\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x278\n\ntype Uvmexp struct {\n\tPagesize           int64\n\tPagemask           int64\n\tPageshift          int64\n\tNpages             int64\n\tFree               int64\n\tActive             int64\n\tInactive           int64\n\tPaging             int64\n\tWired              int64\n\tZeropages          int64\n\tReserve_pagedaemon int64\n\tReserve_kernel     int64\n\tFreemin            int64\n\tFreetarg           int64\n\tInactarg           int64\n\tWiredmax           int64\n\tNswapdev           int64\n\tSwpages            int64\n\tSwpginuse          int64\n\tSwpgonly           int64\n\tNswget             int64\n\tUnused1            int64\n\tCpuhit             int64\n\tCpumiss            int64\n\tFaults             int64\n\tTraps              int64\n\tIntrs              int64\n\tSwtch              int64\n\tSofts              int64\n\tSyscalls           int64\n\tPageins            int64\n\tSwapins            int64\n\tSwapouts           int64\n\tPgswapin           int64\n\tPgswapout          int64\n\tForks              int64\n\tForks_ppwait       int64\n\tForks_sharevm      int64\n\tPga_zerohit        int64\n\tPga_zeromiss       int64\n\tZeroaborts         int64\n\tFltnoram           int64\n\tFltnoanon          int64\n\tFltpgwait          int64\n\tFltpgrele          int64\n\tFltrelck           int64\n\tFltrelckok         int64\n\tFltanget           int64\n\tFltanretry         int64\n\tFltamcopy          int64\n\tFltnamap           int64\n\tFltnomap           int64\n\tFltlget            int64\n\tFltget             int64\n\tFlt_anon           int64\n\tFlt_acow           int64\n\tFlt_obj            int64\n\tFlt_prcopy         int64\n\tFlt_przero         int64\n\tPdwoke             int64\n\tPdrevs             int64\n\tUnused4            int64\n\tPdfreed            int64\n\tPdscans            int64\n\tPdanscan           int64\n\tPdobscan           int64\n\tPdreact            int64\n\tPdbusy             int64\n\tPdpageouts         int64\n\tPdpending          int64\n\tPddeact            int64\n\tAnonpages          int64\n\tFilepages          int64\n\tExecpages          int64\n\tColorhit           int64\n\tColormiss          int64\n\tNcolors            int64\n\tBootpages          int64\n\tPoolpages          int64\n}\n\nconst SizeofClockinfo = 0x14\n\ntype Clockinfo struct {\n\tHz      int32\n\tTick    int32\n\tTickadj int32\n\tStathz  int32\n\tProfhz  int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go",
    "content": "// cgo -godefs types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build 386 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int32\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint32\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa0\n\tSizeofIfData           = 0x88\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x8\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go",
    "content": "// cgo -godefs types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go",
    "content": "// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x4\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x4\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int32\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int32\n\t_    [4]byte\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int32\n\t_    [4]byte\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int32\n\tIxrss    int32\n\tIdrss    int32\n\tIsrss    int32\n\tMinflt   int32\n\tMajflt   int32\n\tNswap    int32\n\tInblock  int32\n\tOublock  int32\n\tMsgsnd   int32\n\tMsgrcv   int32\n\tNsignals int32\n\tNvcsw    int32\n\tNivcsw   int32\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       [4]byte\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\t_             [4]byte\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint32\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x8\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x1c\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint32\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\t_      [4]byte\n\tData   int64\n\tUdata  *byte\n\t_      [4]byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\t_            [4]byte\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x8\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go",
    "content": "// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build arm64 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go",
    "content": "// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build mips64 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go",
    "content": "// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build ppc64 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\ntype Mclpool struct{}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go",
    "content": "// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build riscv64 && openbsd\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tMode    uint32\n\tDev     int32\n\tIno     uint64\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    int32\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tSize    int64\n\tBlocks  int64\n\tBlksize int32\n\tFlags   uint32\n\tGen     uint32\n\t_       Timespec\n}\n\ntype Statfs_t struct {\n\tF_flags       uint32\n\tF_bsize       uint32\n\tF_iosize      uint32\n\tF_blocks      uint64\n\tF_bfree       uint64\n\tF_bavail      int64\n\tF_files       uint64\n\tF_ffree       uint64\n\tF_favail      int64\n\tF_syncwrites  uint64\n\tF_syncreads   uint64\n\tF_asyncwrites uint64\n\tF_asyncreads  uint64\n\tF_fsid        Fsid\n\tF_namemax     uint32\n\tF_owner       uint32\n\tF_ctime       uint64\n\tF_fstypename  [16]byte\n\tF_mntonname   [90]byte\n\tF_mntfromname [90]byte\n\tF_mntfromspec [90]byte\n\t_             [2]byte\n\tMount_info    [160]byte\n}\n\ntype Flock_t struct {\n\tStart  int64\n\tLen    int64\n\tPid    int32\n\tType   int16\n\tWhence int16\n}\n\ntype Dirent struct {\n\tFileno uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tNamlen uint8\n\t_      [4]uint8\n\tName   [256]int8\n}\n\ntype Fsid struct {\n\tVal [2]int32\n}\n\nconst (\n\tPathMax = 0x400\n)\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [104]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tLen    uint8\n\tFamily uint8\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [24]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [92]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tNamelen    uint32\n\tIov        *Iovec\n\tIovlen     uint32\n\tControl    *byte\n\tControllen uint32\n\tFlags      int32\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x1c\n\tSizeofSockaddrAny      = 0x6c\n\tSizeofSockaddrUnix     = 0x6a\n\tSizeofSockaddrDatalink = 0x20\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x20\n\tSizeofICMPv6Filter     = 0x20\n)\n\nconst (\n\tPTRACE_TRACEME = 0x0\n\tPTRACE_CONT    = 0x7\n\tPTRACE_KILL    = 0x8\n)\n\ntype Kevent_t struct {\n\tIdent  uint64\n\tFilter int16\n\tFlags  uint16\n\tFflags uint32\n\tData   int64\n\tUdata  *byte\n}\n\ntype FdSet struct {\n\tBits [32]uint32\n}\n\nconst (\n\tSizeofIfMsghdr         = 0xa8\n\tSizeofIfData           = 0x90\n\tSizeofIfaMsghdr        = 0x18\n\tSizeofIfAnnounceMsghdr = 0x1a\n\tSizeofRtMsghdr         = 0x60\n\tSizeofRtMetrics        = 0x38\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tXflags  int32\n\tData    IfData\n}\n\ntype IfData struct {\n\tType         uint8\n\tAddrlen      uint8\n\tHdrlen       uint8\n\tLink_state   uint8\n\tMtu          uint32\n\tMetric       uint32\n\tRdomain      uint32\n\tBaudrate     uint64\n\tIpackets     uint64\n\tIerrors      uint64\n\tOpackets     uint64\n\tOerrors      uint64\n\tCollisions   uint64\n\tIbytes       uint64\n\tObytes       uint64\n\tImcasts      uint64\n\tOmcasts      uint64\n\tIqdrops      uint64\n\tOqdrops      uint64\n\tNoproto      uint64\n\tCapabilities uint32\n\tLastchange   Timeval\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tTableid uint16\n\tPad1    uint8\n\tPad2    uint8\n\tAddrs   int32\n\tFlags   int32\n\tMetric  int32\n}\n\ntype IfAnnounceMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tHdrlen  uint16\n\tIndex   uint16\n\tWhat    uint16\n\tName    [16]int8\n}\n\ntype RtMsghdr struct {\n\tMsglen   uint16\n\tVersion  uint8\n\tType     uint8\n\tHdrlen   uint16\n\tIndex    uint16\n\tTableid  uint16\n\tPriority uint8\n\tMpls     uint8\n\tAddrs    int32\n\tFlags    int32\n\tFmask    int32\n\tPid      int32\n\tSeq      int32\n\tErrno    int32\n\tInits    uint32\n\tRmx      RtMetrics\n}\n\ntype RtMetrics struct {\n\tPksent   uint64\n\tExpire   int64\n\tLocks    uint32\n\tMtu      uint32\n\tRefcnt   uint32\n\tHopcount uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPad      uint32\n}\n\ntype Mclpool struct{}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x8\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x18\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint32\n\tDrop uint32\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\tIfidx   uint16\n\tFlowid  uint16\n\tFlags   uint8\n\tDrops   uint8\n}\n\ntype BpfTimeval struct {\n\tSec  uint32\n\tUsec uint32\n}\n\ntype Termios struct {\n\tIflag  uint32\n\tOflag  uint32\n\tCflag  uint32\n\tLflag  uint32\n\tCc     [20]uint8\n\tIspeed int32\n\tOspeed int32\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\nconst (\n\tAT_FDCWD            = -0x64\n\tAT_EACCESS          = 0x1\n\tAT_SYMLINK_NOFOLLOW = 0x2\n\tAT_SYMLINK_FOLLOW   = 0x4\n\tAT_REMOVEDIR        = 0x8\n)\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype Sigset_t uint32\n\ntype Utsname struct {\n\tSysname  [256]byte\n\tNodename [256]byte\n\tRelease  [256]byte\n\tVersion  [256]byte\n\tMachine  [256]byte\n}\n\nconst SizeofUvmexp = 0x158\n\ntype Uvmexp struct {\n\tPagesize           int32\n\tPagemask           int32\n\tPageshift          int32\n\tNpages             int32\n\tFree               int32\n\tActive             int32\n\tInactive           int32\n\tPaging             int32\n\tWired              int32\n\tZeropages          int32\n\tReserve_pagedaemon int32\n\tReserve_kernel     int32\n\tUnused01           int32\n\tVnodepages         int32\n\tVtextpages         int32\n\tFreemin            int32\n\tFreetarg           int32\n\tInactarg           int32\n\tWiredmax           int32\n\tAnonmin            int32\n\tVtextmin           int32\n\tVnodemin           int32\n\tAnonminpct         int32\n\tVtextminpct        int32\n\tVnodeminpct        int32\n\tNswapdev           int32\n\tSwpages            int32\n\tSwpginuse          int32\n\tSwpgonly           int32\n\tNswget             int32\n\tNanon              int32\n\tUnused05           int32\n\tUnused06           int32\n\tFaults             int32\n\tTraps              int32\n\tIntrs              int32\n\tSwtch              int32\n\tSofts              int32\n\tSyscalls           int32\n\tPageins            int32\n\tUnused07           int32\n\tUnused08           int32\n\tPgswapin           int32\n\tPgswapout          int32\n\tForks              int32\n\tForks_ppwait       int32\n\tForks_sharevm      int32\n\tPga_zerohit        int32\n\tPga_zeromiss       int32\n\tUnused09           int32\n\tFltnoram           int32\n\tFltnoanon          int32\n\tFltnoamap          int32\n\tFltpgwait          int32\n\tFltpgrele          int32\n\tFltrelck           int32\n\tFltrelckok         int32\n\tFltanget           int32\n\tFltanretry         int32\n\tFltamcopy          int32\n\tFltnamap           int32\n\tFltnomap           int32\n\tFltlget            int32\n\tFltget             int32\n\tFlt_anon           int32\n\tFlt_acow           int32\n\tFlt_obj            int32\n\tFlt_prcopy         int32\n\tFlt_przero         int32\n\tPdwoke             int32\n\tPdrevs             int32\n\tPdswout            int32\n\tPdfreed            int32\n\tPdscans            int32\n\tPdanscan           int32\n\tPdobscan           int32\n\tPdreact            int32\n\tPdbusy             int32\n\tPdpageouts         int32\n\tPdpending          int32\n\tPddeact            int32\n\tUnused11           int32\n\tUnused12           int32\n\tUnused13           int32\n\tFpswtch            int32\n\tKmapent            int32\n}\n\nconst SizeofClockinfo = 0x10\n\ntype Clockinfo struct {\n\tHz     int32\n\tTick   int32\n\tStathz int32\n\tProfhz int32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go",
    "content": "// cgo -godefs types_solaris.go | go run mkpost.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n//go:build amd64 && solaris\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n\tPathMax        = 0x400\n\tMaxHostNameLen = 0x100\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype Timeval32 struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype Tms struct {\n\tUtime  int64\n\tStime  int64\n\tCutime int64\n\tCstime int64\n}\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\ntype _Gid_t uint32\n\ntype Stat_t struct {\n\tDev     uint64\n\tIno     uint64\n\tMode    uint32\n\tNlink   uint32\n\tUid     uint32\n\tGid     uint32\n\tRdev    uint64\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize int32\n\tBlocks  int64\n\tFstype  [16]int8\n}\n\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tSysid  int32\n\tPid    int32\n\tPad    [4]int64\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tName   [1]int8\n\t_      [5]byte\n}\n\ntype _Fsblkcnt_t uint64\n\ntype Statvfs_t struct {\n\tBsize    uint64\n\tFrsize   uint64\n\tBlocks   uint64\n\tBfree    uint64\n\tBavail   uint64\n\tFiles    uint64\n\tFfree    uint64\n\tFavail   uint64\n\tFsid     uint64\n\tBasetype [16]int8\n\tFlag     uint64\n\tNamemax  uint64\n\tFstr     [32]int8\n}\n\ntype RawSockaddrInet4 struct {\n\tFamily uint16\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]int8\n}\n\ntype RawSockaddrInet6 struct {\n\tFamily   uint16\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n\t_        uint32\n}\n\ntype RawSockaddrUnix struct {\n\tFamily uint16\n\tPath   [108]int8\n}\n\ntype RawSockaddrDatalink struct {\n\tFamily uint16\n\tIndex  uint16\n\tType   uint8\n\tNlen   uint8\n\tAlen   uint8\n\tSlen   uint8\n\tData   [244]int8\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [236]int8\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName         *byte\n\tNamelen      uint32\n\tIov          *Iovec\n\tIovlen       int32\n\tAccrights    *int8\n\tAccrightslen int32\n\t_            [4]byte\n}\n\ntype Cmsghdr struct {\n\tLen   uint32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet4Pktinfo struct {\n\tIfindex  uint32\n\tSpec_dst [4]byte /* in_addr */\n\tAddr     [4]byte /* in_addr */\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tFilt [8]uint32\n}\n\nconst (\n\tSizeofSockaddrInet4    = 0x10\n\tSizeofSockaddrInet6    = 0x20\n\tSizeofSockaddrAny      = 0xfc\n\tSizeofSockaddrUnix     = 0x6e\n\tSizeofSockaddrDatalink = 0xfc\n\tSizeofLinger           = 0x8\n\tSizeofIovec            = 0x10\n\tSizeofIPMreq           = 0x8\n\tSizeofIPv6Mreq         = 0x14\n\tSizeofMsghdr           = 0x30\n\tSizeofCmsghdr          = 0xc\n\tSizeofInet4Pktinfo     = 0xc\n\tSizeofInet6Pktinfo     = 0x14\n\tSizeofIPv6MTUInfo      = 0x24\n\tSizeofICMPv6Filter     = 0x20\n)\n\ntype FdSet struct {\n\tBits [1024]int64\n}\n\ntype Utsname struct {\n\tSysname  [257]byte\n\tNodename [257]byte\n\tRelease  [257]byte\n\tVersion  [257]byte\n\tMachine  [257]byte\n}\n\ntype Ustat_t struct {\n\tTfree  int64\n\tTinode uint64\n\tFname  [6]int8\n\tFpack  [6]int8\n\t_      [4]byte\n}\n\nconst (\n\tAT_FDCWD            = 0xffd19553\n\tAT_SYMLINK_NOFOLLOW = 0x1000\n\tAT_SYMLINK_FOLLOW   = 0x2000\n\tAT_REMOVEDIR        = 0x1\n\tAT_EACCESS          = 0x4\n)\n\nconst (\n\tSizeofIfMsghdr  = 0x54\n\tSizeofIfData    = 0x44\n\tSizeofIfaMsghdr = 0x14\n\tSizeofRtMsghdr  = 0x4c\n\tSizeofRtMetrics = 0x28\n)\n\ntype IfMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tData    IfData\n}\n\ntype IfData struct {\n\tType       uint8\n\tAddrlen    uint8\n\tHdrlen     uint8\n\tMtu        uint32\n\tMetric     uint32\n\tBaudrate   uint32\n\tIpackets   uint32\n\tIerrors    uint32\n\tOpackets   uint32\n\tOerrors    uint32\n\tCollisions uint32\n\tIbytes     uint32\n\tObytes     uint32\n\tImcasts    uint32\n\tOmcasts    uint32\n\tIqdrops    uint32\n\tNoproto    uint32\n\tLastchange Timeval32\n}\n\ntype IfaMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tAddrs   int32\n\tFlags   int32\n\tIndex   uint16\n\tMetric  int32\n}\n\ntype RtMsghdr struct {\n\tMsglen  uint16\n\tVersion uint8\n\tType    uint8\n\tIndex   uint16\n\tFlags   int32\n\tAddrs   int32\n\tPid     int32\n\tSeq     int32\n\tErrno   int32\n\tUse     int32\n\tInits   uint32\n\tRmx     RtMetrics\n}\n\ntype RtMetrics struct {\n\tLocks    uint32\n\tMtu      uint32\n\tHopcount uint32\n\tExpire   uint32\n\tRecvpipe uint32\n\tSendpipe uint32\n\tSsthresh uint32\n\tRtt      uint32\n\tRttvar   uint32\n\tPksent   uint32\n}\n\nconst (\n\tSizeofBpfVersion = 0x4\n\tSizeofBpfStat    = 0x80\n\tSizeofBpfProgram = 0x10\n\tSizeofBpfInsn    = 0x8\n\tSizeofBpfHdr     = 0x14\n)\n\ntype BpfVersion struct {\n\tMajor uint16\n\tMinor uint16\n}\n\ntype BpfStat struct {\n\tRecv uint64\n\tDrop uint64\n\tCapt uint64\n\t_    [13]uint64\n}\n\ntype BpfProgram struct {\n\tLen   uint32\n\tInsns *BpfInsn\n}\n\ntype BpfInsn struct {\n\tCode uint16\n\tJt   uint8\n\tJf   uint8\n\tK    uint32\n}\n\ntype BpfTimeval struct {\n\tSec  int32\n\tUsec int32\n}\n\ntype BpfHdr struct {\n\tTstamp  BpfTimeval\n\tCaplen  uint32\n\tDatalen uint32\n\tHdrlen  uint16\n\t_       [2]byte\n}\n\ntype Termios struct {\n\tIflag uint32\n\tOflag uint32\n\tCflag uint32\n\tLflag uint32\n\tCc    [19]uint8\n\t_     [1]byte\n}\n\ntype Termio struct {\n\tIflag uint16\n\tOflag uint16\n\tCflag uint16\n\tLflag uint16\n\tLine  int8\n\tCc    [8]uint8\n\t_     [1]byte\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\nconst (\n\tPOLLERR    = 0x8\n\tPOLLHUP    = 0x10\n\tPOLLIN     = 0x1\n\tPOLLNVAL   = 0x20\n\tPOLLOUT    = 0x4\n\tPOLLPRI    = 0x2\n\tPOLLRDBAND = 0x80\n\tPOLLRDNORM = 0x40\n\tPOLLWRBAND = 0x100\n\tPOLLWRNORM = 0x4\n)\n\ntype fileObj struct {\n\tAtim Timespec\n\tMtim Timespec\n\tCtim Timespec\n\tPad  [3]uint64\n\tName *int8\n}\n\ntype portEvent struct {\n\tEvents int32\n\tSource uint16\n\tPad    uint16\n\tObject uint64\n\tUser   *byte\n}\n\nconst (\n\tPORT_SOURCE_AIO    = 0x1\n\tPORT_SOURCE_TIMER  = 0x2\n\tPORT_SOURCE_USER   = 0x3\n\tPORT_SOURCE_FD     = 0x4\n\tPORT_SOURCE_ALERT  = 0x5\n\tPORT_SOURCE_MQ     = 0x6\n\tPORT_SOURCE_FILE   = 0x7\n\tPORT_ALERT_SET     = 0x1\n\tPORT_ALERT_UPDATE  = 0x2\n\tPORT_ALERT_INVALID = 0x3\n\tFILE_ACCESS        = 0x1\n\tFILE_MODIFIED      = 0x2\n\tFILE_ATTRIB        = 0x4\n\tFILE_TRUNC         = 0x100000\n\tFILE_NOFOLLOW      = 0x10000000\n\tFILE_DELETE        = 0x10\n\tFILE_RENAME_TO     = 0x20\n\tFILE_RENAME_FROM   = 0x40\n\tUNMOUNTED          = 0x20000000\n\tMOUNTEDOVER        = 0x40000000\n\tFILE_EXCEPTION     = 0x60000070\n)\n\nconst (\n\tTUNNEWPPA = 0x540001\n\tTUNSETPPA = 0x540002\n\n\tI_STR     = 0x5308\n\tI_POP     = 0x5303\n\tI_PUSH    = 0x5302\n\tI_LINK    = 0x530c\n\tI_UNLINK  = 0x530d\n\tI_PLINK   = 0x5316\n\tI_PUNLINK = 0x5317\n\n\tIF_UNITSEL = -0x7ffb8cca\n)\n\ntype strbuf struct {\n\tMaxlen int32\n\tLen    int32\n\tBuf    *int8\n}\n\ntype Strioctl struct {\n\tCmd    int32\n\tTimout int32\n\tLen    int32\n\tDp     *int8\n}\n\ntype Lifreq struct {\n\tName   [32]int8\n\tLifru1 [4]byte\n\tType   uint32\n\tLifru  [336]byte\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build zos && s390x\n\n// Hand edited based on ztypes_linux_s390x.go\n// TODO: auto-generate.\n\npackage unix\n\nconst (\n\tSizeofPtr      = 0x8\n\tSizeofShort    = 0x2\n\tSizeofInt      = 0x4\n\tSizeofLong     = 0x8\n\tSizeofLongLong = 0x8\n\tPathMax        = 0x1000\n)\n\nconst (\n\tSizeofSockaddrAny   = 128\n\tSizeofCmsghdr       = 12\n\tSizeofIPMreq        = 8\n\tSizeofIPv6Mreq      = 20\n\tSizeofICMPv6Filter  = 32\n\tSizeofIPv6MTUInfo   = 32\n\tSizeofInet4Pktinfo  = 8\n\tSizeofInet6Pktinfo  = 20\n\tSizeofLinger        = 8\n\tSizeofSockaddrInet4 = 16\n\tSizeofSockaddrInet6 = 28\n\tSizeofTCPInfo       = 0x68\n\tSizeofUcred         = 12\n)\n\ntype (\n\t_C_short     int16\n\t_C_int       int32\n\t_C_long      int64\n\t_C_long_long int64\n)\n\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\ntype Timeval struct {\n\tSec  int64\n\tUsec int64\n}\n\ntype timeval_zos struct { //correct (with padding and all)\n\tSec  int64\n\t_    [4]byte // pad\n\tUsec int32\n}\n\ntype Tms struct { //clock_t is 4-byte unsigned int in zos\n\tUtime  uint32\n\tStime  uint32\n\tCutime uint32\n\tCstime uint32\n}\n\ntype Time_t int64\n\ntype Utimbuf struct {\n\tActime  int64\n\tModtime int64\n}\n\ntype Utsname struct {\n\tSysname  [16]byte\n\tNodename [32]byte\n\tRelease  [8]byte\n\tVersion  [8]byte\n\tMachine  [16]byte\n}\n\ntype Ucred struct {\n\tPid int32\n\tUid uint32\n\tGid uint32\n}\n\ntype RawSockaddrInet4 struct {\n\tLen    uint8\n\tFamily uint8\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]uint8\n}\n\ntype RawSockaddrInet6 struct {\n\tLen      uint8\n\tFamily   uint8\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\ntype RawSockaddrUnix struct {\n\tLen    uint8\n\tFamily uint8\n\tPath   [108]int8\n}\n\ntype RawSockaddr struct {\n\tLen    uint8\n\tFamily uint8\n\tData   [14]uint8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\t_    [112]uint8 // pad\n}\n\ntype _Socklen uint32\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype Iovec struct {\n\tBase *byte\n\tLen  uint64\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\ntype Msghdr struct {\n\tName       *byte\n\tIov        *Iovec\n\tControl    *byte\n\tFlags      int32\n\tNamelen    int32\n\tIovlen     int32\n\tControllen int32\n}\n\ntype Cmsghdr struct {\n\tLen   int32\n\tLevel int32\n\tType  int32\n}\n\ntype Inet4Pktinfo struct {\n\tAddr    [4]byte /* in_addr */\n\tIfindex uint32\n}\n\ntype Inet6Pktinfo struct {\n\tAddr    [16]byte /* in6_addr */\n\tIfindex uint32\n}\n\ntype IPv6MTUInfo struct {\n\tAddr RawSockaddrInet6\n\tMtu  uint32\n}\n\ntype ICMPv6Filter struct {\n\tData [8]uint32\n}\n\ntype TCPInfo struct {\n\tState          uint8\n\tCa_state       uint8\n\tRetransmits    uint8\n\tProbes         uint8\n\tBackoff        uint8\n\tOptions        uint8\n\tRto            uint32\n\tAto            uint32\n\tSnd_mss        uint32\n\tRcv_mss        uint32\n\tUnacked        uint32\n\tSacked         uint32\n\tLost           uint32\n\tRetrans        uint32\n\tFackets        uint32\n\tLast_data_sent uint32\n\tLast_ack_sent  uint32\n\tLast_data_recv uint32\n\tLast_ack_recv  uint32\n\tPmtu           uint32\n\tRcv_ssthresh   uint32\n\tRtt            uint32\n\tRttvar         uint32\n\tSnd_ssthresh   uint32\n\tSnd_cwnd       uint32\n\tAdvmss         uint32\n\tReordering     uint32\n\tRcv_rtt        uint32\n\tRcv_space      uint32\n\tTotal_retrans  uint32\n}\n\ntype _Gid_t uint32\n\ntype rusage_zos struct {\n\tUtime timeval_zos\n\tStime timeval_zos\n}\n\ntype Rusage struct {\n\tUtime    Timeval\n\tStime    Timeval\n\tMaxrss   int64\n\tIxrss    int64\n\tIdrss    int64\n\tIsrss    int64\n\tMinflt   int64\n\tMajflt   int64\n\tNswap    int64\n\tInblock  int64\n\tOublock  int64\n\tMsgsnd   int64\n\tMsgrcv   int64\n\tNsignals int64\n\tNvcsw    int64\n\tNivcsw   int64\n}\n\ntype Rlimit struct {\n\tCur uint64\n\tMax uint64\n}\n\n// { int, short, short } in poll.h\ntype PollFd struct {\n\tFd      int32\n\tEvents  int16\n\tRevents int16\n}\n\ntype Stat_t struct { //Linux Definition\n\tDev     uint64\n\tIno     uint64\n\tNlink   uint64\n\tMode    uint32\n\tUid     uint32\n\tGid     uint32\n\t_       int32\n\tRdev    uint64\n\tSize    int64\n\tAtim    Timespec\n\tMtim    Timespec\n\tCtim    Timespec\n\tBlksize int64\n\tBlocks  int64\n\t_       [3]int64\n}\n\ntype Stat_LE_t struct {\n\t_            [4]byte // eye catcher\n\tLength       uint16\n\tVersion      uint16\n\tMode         int32\n\tIno          uint32\n\tDev          uint32\n\tNlink        int32\n\tUid          int32\n\tGid          int32\n\tSize         int64\n\tAtim31       [4]byte\n\tMtim31       [4]byte\n\tCtim31       [4]byte\n\tRdev         uint32\n\tAuditoraudit uint32\n\tUseraudit    uint32\n\tBlksize      int32\n\tCreatim31    [4]byte\n\tAuditID      [16]byte\n\t_            [4]byte // rsrvd1\n\tFile_tag     struct {\n\t\tCcsid   uint16\n\t\tTxtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14\n\t}\n\tCharsetID [8]byte\n\tBlocks    int64\n\tGenvalue  uint32\n\tReftim31  [4]byte\n\tFid       [8]byte\n\tFilefmt   byte\n\tFspflag2  byte\n\t_         [2]byte // rsrvd2\n\tCtimemsec int32\n\tSeclabel  [8]byte\n\t_         [4]byte // rsrvd3\n\t_         [4]byte // rsrvd4\n\tAtim      Time_t\n\tMtim      Time_t\n\tCtim      Time_t\n\tCreatim   Time_t\n\tReftim    Time_t\n\t_         [24]byte // rsrvd5\n}\n\ntype Statvfs_t struct {\n\tID          [4]byte\n\tLen         int32\n\tBsize       uint64\n\tBlocks      uint64\n\tUsedspace   uint64\n\tBavail      uint64\n\tFlag        uint64\n\tMaxfilesize int64\n\t_           [16]byte\n\tFrsize      uint64\n\tBfree       uint64\n\tFiles       uint32\n\tFfree       uint32\n\tFavail      uint32\n\tNamemax31   uint32\n\tInvarsec    uint32\n\t_           [4]byte\n\tFsid        uint64\n\tNamemax     uint64\n}\n\ntype Statfs_t struct {\n\tType    uint64\n\tBsize   uint64\n\tBlocks  uint64\n\tBfree   uint64\n\tBavail  uint64\n\tFiles   uint32\n\tFfree   uint32\n\tFsid    uint64\n\tNamelen uint64\n\tFrsize  uint64\n\tFlags   uint64\n\t_       [4]uint64\n}\n\ntype direntLE struct {\n\tReclen uint16\n\tNamlen uint16\n\tIno    uint32\n\tExtra  uintptr\n\tName   [256]byte\n}\n\ntype Dirent struct {\n\tIno    uint64\n\tOff    int64\n\tReclen uint16\n\tType   uint8\n\tName   [256]uint8\n\t_      [5]byte\n}\n\ntype FdSet struct {\n\tBits [64]int32\n}\n\n// This struct is packed on z/OS so it can't be used directly.\ntype Flock_t struct {\n\tType   int16\n\tWhence int16\n\tStart  int64\n\tLen    int64\n\tPid    int32\n}\n\ntype F_cnvrt struct {\n\tCvtcmd int32\n\tPccsid int16\n\tFccsid int16\n}\n\ntype Termios struct {\n\tCflag uint32\n\tIflag uint32\n\tLflag uint32\n\tOflag uint32\n\tCc    [11]uint8\n}\n\ntype Winsize struct {\n\tRow    uint16\n\tCol    uint16\n\tXpixel uint16\n\tYpixel uint16\n}\n\ntype W_Mnth struct {\n\tHid   [4]byte\n\tSize  int32\n\tCur1  int32 //32bit pointer\n\tCur2  int32 //^\n\tDevno uint32\n\t_     [4]byte\n}\n\ntype W_Mntent struct {\n\tFstype       uint32\n\tMode         uint32\n\tDev          uint32\n\tParentdev    uint32\n\tRootino      uint32\n\tStatus       byte\n\tDdname       [9]byte\n\tFstname      [9]byte\n\tFsname       [45]byte\n\tPathlen      uint32\n\tMountpoint   [1024]byte\n\tJobname      [8]byte\n\tPID          int32\n\tParmoffset   int32\n\tParmlen      int16\n\tOwner        [8]byte\n\tQuiesceowner [8]byte\n\t_            [38]byte\n}\n\ntype EpollEvent struct {\n\tEvents uint32\n\t_      int32\n\tFd     int32\n\tPad    int32\n}\n\ntype InotifyEvent struct {\n\tWd     int32\n\tMask   uint32\n\tCookie uint32\n\tLen    uint32\n\tName   string\n}\n\nconst (\n\tSizeofInotifyEvent = 0x10\n)\n\ntype ConsMsg2 struct {\n\tCm2Format       uint16\n\tCm2R1           uint16\n\tCm2Msglength    uint32\n\tCm2Msg          *byte\n\tCm2R2           [4]byte\n\tCm2R3           [4]byte\n\tCm2Routcde      *uint32\n\tCm2Descr        *uint32\n\tCm2Msgflag      uint32\n\tCm2Token        uint32\n\tCm2Msgid        *uint32\n\tCm2R4           [4]byte\n\tCm2DomToken     uint32\n\tCm2DomMsgid     *uint32\n\tCm2ModCartptr   *byte\n\tCm2ModConsidptr *byte\n\tCm2MsgCart      [8]byte\n\tCm2MsgConsid    [4]byte\n\tCm2R5           [12]byte\n}\n\nconst (\n\tCC_modify        = 1\n\tCC_stop          = 2\n\tCONSOLE_FORMAT_2 = 2\n\tCONSOLE_FORMAT_3 = 3\n\tCONSOLE_HRDCPY   = 0x80000000\n)\n\ntype OpenHow struct {\n\tFlags   uint64\n\tMode    uint64\n\tResolve uint64\n}\n\nconst SizeofOpenHow = 0x18\n\nconst (\n\tRESOLVE_CACHED        = 0x20\n\tRESOLVE_BENEATH       = 0x8\n\tRESOLVE_IN_ROOT       = 0x10\n\tRESOLVE_NO_MAGICLINKS = 0x2\n\tRESOLVE_NO_SYMLINKS   = 0x4\n\tRESOLVE_NO_XDEV       = 0x1\n)\n\ntype Siginfo struct {\n\tSigno int32\n\tErrno int32\n\tCode  int32\n\tPid   int32\n\tUid   uint32\n\t_     [44]byte\n}\n\ntype SysvIpcPerm struct {\n\tUid  uint32\n\tGid  uint32\n\tCuid uint32\n\tCgid uint32\n\tMode int32\n}\n\ntype SysvShmDesc struct {\n\tPerm   SysvIpcPerm\n\t_      [4]byte\n\tLpid   int32\n\tCpid   int32\n\tNattch uint32\n\t_      [4]byte\n\t_      [4]byte\n\t_      [4]byte\n\t_      int32\n\t_      uint8\n\t_      uint8\n\t_      uint16\n\t_      *byte\n\tSegsz  uint64\n\tAtime  Time_t\n\tDtime  Time_t\n\tCtime  Time_t\n}\n\ntype SysvShmDesc64 struct {\n\tPerm   SysvIpcPerm\n\t_      [4]byte\n\tLpid   int32\n\tCpid   int32\n\tNattch uint32\n\t_      [4]byte\n\t_      [4]byte\n\t_      [4]byte\n\t_      int32\n\t_      byte\n\t_      uint8\n\t_      uint16\n\t_      *byte\n\tSegsz  uint64\n\tAtime  int64\n\tDtime  int64\n\tCtime  int64\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/aliases.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n\npackage windows\n\nimport \"syscall\"\n\ntype Signal = syscall.Signal\ntype Errno = syscall.Errno\ntype SysProcAttr = syscall.SysProcAttr\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/dll_windows.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\nimport (\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// We need to use LoadLibrary and GetProcAddress from the Go runtime, because\n// the these symbols are loaded by the system linker and are required to\n// dynamically load additional symbols. Note that in the Go runtime, these\n// return syscall.Handle and syscall.Errno, but these are the same, in fact,\n// as windows.Handle and windows.Errno, and we intend to keep these the same.\n\n//go:linkname syscall_loadlibrary syscall.loadlibrary\nfunc syscall_loadlibrary(filename *uint16) (handle Handle, err Errno)\n\n//go:linkname syscall_getprocaddress syscall.getprocaddress\nfunc syscall_getprocaddress(handle Handle, procname *uint8) (proc uintptr, err Errno)\n\n// DLLError describes reasons for DLL load failures.\ntype DLLError struct {\n\tErr     error\n\tObjName string\n\tMsg     string\n}\n\nfunc (e *DLLError) Error() string { return e.Msg }\n\nfunc (e *DLLError) Unwrap() error { return e.Err }\n\n// A DLL implements access to a single DLL.\ntype DLL struct {\n\tName   string\n\tHandle Handle\n}\n\n// LoadDLL loads DLL file into memory.\n//\n// Warning: using LoadDLL without an absolute path name is subject to\n// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL],\n// or use [LoadLibraryEx] directly.\nfunc LoadDLL(name string) (dll *DLL, err error) {\n\tnamep, err := UTF16PtrFromString(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\th, e := syscall_loadlibrary(namep)\n\tif e != 0 {\n\t\treturn nil, &DLLError{\n\t\t\tErr:     e,\n\t\t\tObjName: name,\n\t\t\tMsg:     \"Failed to load \" + name + \": \" + e.Error(),\n\t\t}\n\t}\n\td := &DLL{\n\t\tName:   name,\n\t\tHandle: h,\n\t}\n\treturn d, nil\n}\n\n// MustLoadDLL is like LoadDLL but panics if load operation fails.\nfunc MustLoadDLL(name string) *DLL {\n\td, e := LoadDLL(name)\n\tif e != nil {\n\t\tpanic(e)\n\t}\n\treturn d\n}\n\n// FindProc searches DLL d for procedure named name and returns *Proc\n// if found. It returns an error if search fails.\nfunc (d *DLL) FindProc(name string) (proc *Proc, err error) {\n\tnamep, err := BytePtrFromString(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ta, e := syscall_getprocaddress(d.Handle, namep)\n\tif e != 0 {\n\t\treturn nil, &DLLError{\n\t\t\tErr:     e,\n\t\t\tObjName: name,\n\t\t\tMsg:     \"Failed to find \" + name + \" procedure in \" + d.Name + \": \" + e.Error(),\n\t\t}\n\t}\n\tp := &Proc{\n\t\tDll:  d,\n\t\tName: name,\n\t\taddr: a,\n\t}\n\treturn p, nil\n}\n\n// MustFindProc is like FindProc but panics if search fails.\nfunc (d *DLL) MustFindProc(name string) *Proc {\n\tp, e := d.FindProc(name)\n\tif e != nil {\n\t\tpanic(e)\n\t}\n\treturn p\n}\n\n// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc\n// if found. It returns an error if search fails.\nfunc (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) {\n\ta, e := GetProcAddressByOrdinal(d.Handle, ordinal)\n\tname := \"#\" + itoa(int(ordinal))\n\tif e != nil {\n\t\treturn nil, &DLLError{\n\t\t\tErr:     e,\n\t\t\tObjName: name,\n\t\t\tMsg:     \"Failed to find \" + name + \" procedure in \" + d.Name + \": \" + e.Error(),\n\t\t}\n\t}\n\tp := &Proc{\n\t\tDll:  d,\n\t\tName: name,\n\t\taddr: a,\n\t}\n\treturn p, nil\n}\n\n// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails.\nfunc (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc {\n\tp, e := d.FindProcByOrdinal(ordinal)\n\tif e != nil {\n\t\tpanic(e)\n\t}\n\treturn p\n}\n\n// Release unloads DLL d from memory.\nfunc (d *DLL) Release() (err error) {\n\treturn FreeLibrary(d.Handle)\n}\n\n// A Proc implements access to a procedure inside a DLL.\ntype Proc struct {\n\tDll  *DLL\n\tName string\n\taddr uintptr\n}\n\n// Addr returns the address of the procedure represented by p.\n// The return value can be passed to Syscall to run the procedure.\nfunc (p *Proc) Addr() uintptr {\n\treturn p.addr\n}\n\n//go:uintptrescapes\n\n// Call executes procedure p with arguments a. It will panic, if more than 15 arguments\n// are supplied.\n//\n// The returned error is always non-nil, constructed from the result of GetLastError.\n// Callers must inspect the primary return value to decide whether an error occurred\n// (according to the semantics of the specific function being called) before consulting\n// the error. The error will be guaranteed to contain windows.Errno.\nfunc (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {\n\tswitch len(a) {\n\tcase 0:\n\t\treturn syscall.Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0)\n\tcase 1:\n\t\treturn syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0)\n\tcase 2:\n\t\treturn syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0)\n\tcase 3:\n\t\treturn syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2])\n\tcase 4:\n\t\treturn syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0)\n\tcase 5:\n\t\treturn syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0)\n\tcase 6:\n\t\treturn syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5])\n\tcase 7:\n\t\treturn syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0)\n\tcase 8:\n\t\treturn syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0)\n\tcase 9:\n\t\treturn syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8])\n\tcase 10:\n\t\treturn syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0)\n\tcase 11:\n\t\treturn syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0)\n\tcase 12:\n\t\treturn syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11])\n\tcase 13:\n\t\treturn syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0)\n\tcase 14:\n\t\treturn syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0)\n\tcase 15:\n\t\treturn syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14])\n\tdefault:\n\t\tpanic(\"Call \" + p.Name + \" with too many arguments \" + itoa(len(a)) + \".\")\n\t}\n}\n\n// A LazyDLL implements access to a single DLL.\n// It will delay the load of the DLL until the first\n// call to its Handle method or to one of its\n// LazyProc's Addr method.\ntype LazyDLL struct {\n\tName string\n\n\t// System determines whether the DLL must be loaded from the\n\t// Windows System directory, bypassing the normal DLL search\n\t// path.\n\tSystem bool\n\n\tmu  sync.Mutex\n\tdll *DLL // non nil once DLL is loaded\n}\n\n// Load loads DLL file d.Name into memory. It returns an error if fails.\n// Load will not try to load DLL, if it is already loaded into memory.\nfunc (d *LazyDLL) Load() error {\n\t// Non-racy version of:\n\t// if d.dll != nil {\n\tif atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) != nil {\n\t\treturn nil\n\t}\n\td.mu.Lock()\n\tdefer d.mu.Unlock()\n\tif d.dll != nil {\n\t\treturn nil\n\t}\n\n\t// kernel32.dll is special, since it's where LoadLibraryEx comes from.\n\t// The kernel already special-cases its name, so it's always\n\t// loaded from system32.\n\tvar dll *DLL\n\tvar err error\n\tif d.Name == \"kernel32.dll\" {\n\t\tdll, err = LoadDLL(d.Name)\n\t} else {\n\t\tdll, err = loadLibraryEx(d.Name, d.System)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Non-racy version of:\n\t// d.dll = dll\n\tatomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll))\n\treturn nil\n}\n\n// mustLoad is like Load but panics if search fails.\nfunc (d *LazyDLL) mustLoad() {\n\te := d.Load()\n\tif e != nil {\n\t\tpanic(e)\n\t}\n}\n\n// Handle returns d's module handle.\nfunc (d *LazyDLL) Handle() uintptr {\n\td.mustLoad()\n\treturn uintptr(d.dll.Handle)\n}\n\n// NewProc returns a LazyProc for accessing the named procedure in the DLL d.\nfunc (d *LazyDLL) NewProc(name string) *LazyProc {\n\treturn &LazyProc{l: d, Name: name}\n}\n\n// NewLazyDLL creates new LazyDLL associated with DLL file.\n//\n// Warning: using NewLazyDLL without an absolute path name is subject to\n// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL].\nfunc NewLazyDLL(name string) *LazyDLL {\n\treturn &LazyDLL{Name: name}\n}\n\n// NewLazySystemDLL is like NewLazyDLL, but will only\n// search Windows System directory for the DLL if name is\n// a base name (like \"advapi32.dll\").\nfunc NewLazySystemDLL(name string) *LazyDLL {\n\treturn &LazyDLL{Name: name, System: true}\n}\n\n// A LazyProc implements access to a procedure inside a LazyDLL.\n// It delays the lookup until the Addr method is called.\ntype LazyProc struct {\n\tName string\n\n\tmu   sync.Mutex\n\tl    *LazyDLL\n\tproc *Proc\n}\n\n// Find searches DLL for procedure named p.Name. It returns\n// an error if search fails. Find will not search procedure,\n// if it is already found and loaded into memory.\nfunc (p *LazyProc) Find() error {\n\t// Non-racy version of:\n\t// if p.proc == nil {\n\tif atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil {\n\t\tp.mu.Lock()\n\t\tdefer p.mu.Unlock()\n\t\tif p.proc == nil {\n\t\t\te := p.l.Load()\n\t\t\tif e != nil {\n\t\t\t\treturn e\n\t\t\t}\n\t\t\tproc, e := p.l.dll.FindProc(p.Name)\n\t\t\tif e != nil {\n\t\t\t\treturn e\n\t\t\t}\n\t\t\t// Non-racy version of:\n\t\t\t// p.proc = proc\n\t\t\tatomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc))\n\t\t}\n\t}\n\treturn nil\n}\n\n// mustFind is like Find but panics if search fails.\nfunc (p *LazyProc) mustFind() {\n\te := p.Find()\n\tif e != nil {\n\t\tpanic(e)\n\t}\n}\n\n// Addr returns the address of the procedure represented by p.\n// The return value can be passed to Syscall to run the procedure.\n// It will panic if the procedure cannot be found.\nfunc (p *LazyProc) Addr() uintptr {\n\tp.mustFind()\n\treturn p.proc.Addr()\n}\n\n//go:uintptrescapes\n\n// Call executes procedure p with arguments a. It will panic, if more than 15 arguments\n// are supplied. It will also panic if the procedure cannot be found.\n//\n// The returned error is always non-nil, constructed from the result of GetLastError.\n// Callers must inspect the primary return value to decide whether an error occurred\n// (according to the semantics of the specific function being called) before consulting\n// the error. The error will be guaranteed to contain windows.Errno.\nfunc (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {\n\tp.mustFind()\n\treturn p.proc.Call(a...)\n}\n\nvar canDoSearchSystem32Once struct {\n\tsync.Once\n\tv bool\n}\n\nfunc initCanDoSearchSystem32() {\n\t// https://msdn.microsoft.com/en-us/library/ms684179(v=vs.85).aspx says:\n\t// \"Windows 7, Windows Server 2008 R2, Windows Vista, and Windows\n\t// Server 2008: The LOAD_LIBRARY_SEARCH_* flags are available on\n\t// systems that have KB2533623 installed. To determine whether the\n\t// flags are available, use GetProcAddress to get the address of the\n\t// AddDllDirectory, RemoveDllDirectory, or SetDefaultDllDirectories\n\t// function. If GetProcAddress succeeds, the LOAD_LIBRARY_SEARCH_*\n\t// flags can be used with LoadLibraryEx.\"\n\tcanDoSearchSystem32Once.v = (modkernel32.NewProc(\"AddDllDirectory\").Find() == nil)\n}\n\nfunc canDoSearchSystem32() bool {\n\tcanDoSearchSystem32Once.Do(initCanDoSearchSystem32)\n\treturn canDoSearchSystem32Once.v\n}\n\nfunc isBaseName(name string) bool {\n\tfor _, c := range name {\n\t\tif c == ':' || c == '/' || c == '\\\\' {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// loadLibraryEx wraps the Windows LoadLibraryEx function.\n//\n// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx\n//\n// If name is not an absolute path, LoadLibraryEx searches for the DLL\n// in a variety of automatic locations unless constrained by flags.\n// See: https://msdn.microsoft.com/en-us/library/ff919712%28VS.85%29.aspx\nfunc loadLibraryEx(name string, system bool) (*DLL, error) {\n\tloadDLL := name\n\tvar flags uintptr\n\tif system {\n\t\tif canDoSearchSystem32() {\n\t\t\tflags = LOAD_LIBRARY_SEARCH_SYSTEM32\n\t\t} else if isBaseName(name) {\n\t\t\t// WindowsXP or unpatched Windows machine\n\t\t\t// trying to load \"foo.dll\" out of the system\n\t\t\t// folder, but LoadLibraryEx doesn't support\n\t\t\t// that yet on their system, so emulate it.\n\t\t\tsystemdir, err := GetSystemDirectory()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tloadDLL = systemdir + \"\\\\\" + name\n\t\t}\n\t}\n\th, err := LoadLibraryEx(loadDLL, 0, flags)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &DLL{Name: name, Handle: h}, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/env_windows.go",
    "content": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Windows environment variables.\n\npackage windows\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nfunc Getenv(key string) (value string, found bool) {\n\treturn syscall.Getenv(key)\n}\n\nfunc Setenv(key, value string) error {\n\treturn syscall.Setenv(key, value)\n}\n\nfunc Clearenv() {\n\tsyscall.Clearenv()\n}\n\nfunc Environ() []string {\n\treturn syscall.Environ()\n}\n\n// Returns a default environment associated with the token, rather than the current\n// process. If inheritExisting is true, then this environment also inherits the\n// environment of the current process.\nfunc (token Token) Environ(inheritExisting bool) (env []string, err error) {\n\tvar block *uint16\n\terr = CreateEnvironmentBlock(&block, token, inheritExisting)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer DestroyEnvironmentBlock(block)\n\tsize := unsafe.Sizeof(*block)\n\tfor *block != 0 {\n\t\t// find NUL terminator\n\t\tend := unsafe.Pointer(block)\n\t\tfor *(*uint16)(end) != 0 {\n\t\t\tend = unsafe.Add(end, size)\n\t\t}\n\n\t\tentry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size)\n\t\tenv = append(env, UTF16ToString(entry))\n\t\tblock = (*uint16)(unsafe.Add(end, size))\n\t}\n\treturn env, nil\n}\n\nfunc Unsetenv(key string) error {\n\treturn syscall.Unsetenv(key)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/eventlog.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n\npackage windows\n\nconst (\n\tEVENTLOG_SUCCESS          = 0\n\tEVENTLOG_ERROR_TYPE       = 1\n\tEVENTLOG_WARNING_TYPE     = 2\n\tEVENTLOG_INFORMATION_TYPE = 4\n\tEVENTLOG_AUDIT_SUCCESS    = 8\n\tEVENTLOG_AUDIT_FAILURE    = 16\n)\n\n//sys\tRegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW\n//sys\tDeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource\n//sys\tReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/exec_windows.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Fork, exec, wait, etc.\n\npackage windows\n\nimport (\n\terrorspkg \"errors\"\n\t\"unsafe\"\n)\n\n// EscapeArg rewrites command line argument s as prescribed\n// in http://msdn.microsoft.com/en-us/library/ms880421.\n// This function returns \"\" (2 double quotes) if s is empty.\n// Alternatively, these transformations are done:\n//   - every back slash (\\) is doubled, but only if immediately\n//     followed by double quote (\");\n//   - every double quote (\") is escaped by back slash (\\);\n//   - finally, s is wrapped with double quotes (arg -> \"arg\"),\n//     but only if there is space or tab inside s.\nfunc EscapeArg(s string) string {\n\tif len(s) == 0 {\n\t\treturn `\"\"`\n\t}\n\tn := len(s)\n\thasSpace := false\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch s[i] {\n\t\tcase '\"', '\\\\':\n\t\t\tn++\n\t\tcase ' ', '\\t':\n\t\t\thasSpace = true\n\t\t}\n\t}\n\tif hasSpace {\n\t\tn += 2 // Reserve space for quotes.\n\t}\n\tif n == len(s) {\n\t\treturn s\n\t}\n\n\tqs := make([]byte, n)\n\tj := 0\n\tif hasSpace {\n\t\tqs[j] = '\"'\n\t\tj++\n\t}\n\tslashes := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tswitch s[i] {\n\t\tdefault:\n\t\t\tslashes = 0\n\t\t\tqs[j] = s[i]\n\t\tcase '\\\\':\n\t\t\tslashes++\n\t\t\tqs[j] = s[i]\n\t\tcase '\"':\n\t\t\tfor ; slashes > 0; slashes-- {\n\t\t\t\tqs[j] = '\\\\'\n\t\t\t\tj++\n\t\t\t}\n\t\t\tqs[j] = '\\\\'\n\t\t\tj++\n\t\t\tqs[j] = s[i]\n\t\t}\n\t\tj++\n\t}\n\tif hasSpace {\n\t\tfor ; slashes > 0; slashes-- {\n\t\t\tqs[j] = '\\\\'\n\t\t\tj++\n\t\t}\n\t\tqs[j] = '\"'\n\t\tj++\n\t}\n\treturn string(qs[:j])\n}\n\n// ComposeCommandLine escapes and joins the given arguments suitable for use as a Windows command line,\n// in CreateProcess's CommandLine argument, CreateService/ChangeServiceConfig's BinaryPathName argument,\n// or any program that uses CommandLineToArgv.\nfunc ComposeCommandLine(args []string) string {\n\tif len(args) == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Per https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw:\n\t// “This function accepts command lines that contain a program name; the\n\t// program name can be enclosed in quotation marks or not.”\n\t//\n\t// Unfortunately, it provides no means of escaping interior quotation marks\n\t// within that program name, and we have no way to report them here.\n\tprog := args[0]\n\tmustQuote := len(prog) == 0\n\tfor i := 0; i < len(prog); i++ {\n\t\tc := prog[i]\n\t\tif c <= ' ' || (c == '\"' && i == 0) {\n\t\t\t// Force quotes for not only the ASCII space and tab as described in the\n\t\t\t// MSDN article, but also ASCII control characters.\n\t\t\t// The documentation for CommandLineToArgvW doesn't say what happens when\n\t\t\t// the first argument is not a valid program name, but it empirically\n\t\t\t// seems to drop unquoted control characters.\n\t\t\tmustQuote = true\n\t\t\tbreak\n\t\t}\n\t}\n\tvar commandLine []byte\n\tif mustQuote {\n\t\tcommandLine = make([]byte, 0, len(prog)+2)\n\t\tcommandLine = append(commandLine, '\"')\n\t\tfor i := 0; i < len(prog); i++ {\n\t\t\tc := prog[i]\n\t\t\tif c == '\"' {\n\t\t\t\t// This quote would interfere with our surrounding quotes.\n\t\t\t\t// We have no way to report an error, so just strip out\n\t\t\t\t// the offending character instead.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcommandLine = append(commandLine, c)\n\t\t}\n\t\tcommandLine = append(commandLine, '\"')\n\t} else {\n\t\tif len(args) == 1 {\n\t\t\t// args[0] is a valid command line representing itself.\n\t\t\t// No need to allocate a new slice or string for it.\n\t\t\treturn prog\n\t\t}\n\t\tcommandLine = []byte(prog)\n\t}\n\n\tfor _, arg := range args[1:] {\n\t\tcommandLine = append(commandLine, ' ')\n\t\t// TODO(bcmills): since we're already appending to a slice, it would be nice\n\t\t// to avoid the intermediate allocations of EscapeArg.\n\t\t// Perhaps we can factor out an appendEscapedArg function.\n\t\tcommandLine = append(commandLine, EscapeArg(arg)...)\n\t}\n\treturn string(commandLine)\n}\n\n// DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,\n// as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that\n// command lines are passed around.\n// DecomposeCommandLine returns an error if commandLine contains NUL.\nfunc DecomposeCommandLine(commandLine string) ([]string, error) {\n\tif len(commandLine) == 0 {\n\t\treturn []string{}, nil\n\t}\n\tutf16CommandLine, err := UTF16FromString(commandLine)\n\tif err != nil {\n\t\treturn nil, errorspkg.New(\"string with NUL passed to DecomposeCommandLine\")\n\t}\n\tvar argc int32\n\targv, err := commandLineToArgv(&utf16CommandLine[0], &argc)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(argv)))\n\n\tvar args []string\n\tfor _, p := range unsafe.Slice(argv, argc) {\n\t\targs = append(args, UTF16PtrToString(p))\n\t}\n\treturn args, nil\n}\n\n// CommandLineToArgv parses a Unicode command line string and sets\n// argc to the number of parsed arguments.\n//\n// The returned memory should be freed using a single call to LocalFree.\n//\n// Note that although the return type of CommandLineToArgv indicates 8192\n// entries of up to 8192 characters each, the actual count of parsed arguments\n// may exceed 8192, and the documentation for CommandLineToArgvW does not mention\n// any bound on the lengths of the individual argument strings.\n// (See https://go.dev/issue/63236.)\nfunc CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {\n\targp, err := commandLineToArgv(cmd, argc)\n\targv = (*[8192]*[8192]uint16)(unsafe.Pointer(argp))\n\treturn argv, err\n}\n\nfunc CloseOnExec(fd Handle) {\n\tSetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)\n}\n\n// FullPath retrieves the full path of the specified file.\nfunc FullPath(name string) (path string, err error) {\n\tp, err := UTF16PtrFromString(name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tn := uint32(100)\n\tfor {\n\t\tbuf := make([]uint16, n)\n\t\tn, err = GetFullPathName(p, uint32(len(buf)), &buf[0], nil)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif n <= uint32(len(buf)) {\n\t\t\treturn UTF16ToString(buf[:n]), nil\n\t\t}\n\t}\n}\n\n// NewProcThreadAttributeList allocates a new ProcThreadAttributeListContainer, with the requested maximum number of attributes.\nfunc NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListContainer, error) {\n\tvar size uintptr\n\terr := initializeProcThreadAttributeList(nil, maxAttrCount, 0, &size)\n\tif err != ERROR_INSUFFICIENT_BUFFER {\n\t\tif err == nil {\n\t\t\treturn nil, errorspkg.New(\"unable to query buffer size from InitializeProcThreadAttributeList\")\n\t\t}\n\t\treturn nil, err\n\t}\n\talloc, err := LocalAlloc(LMEM_FIXED, uint32(size))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.\n\tal := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(alloc))}\n\terr = initializeProcThreadAttributeList(al.data, maxAttrCount, 0, &size)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn al, err\n}\n\n// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.\nfunc (al *ProcThreadAttributeListContainer) Update(attribute uintptr, value unsafe.Pointer, size uintptr) error {\n\tal.pointers = append(al.pointers, value)\n\treturn updateProcThreadAttribute(al.data, 0, attribute, value, size, nil, nil)\n}\n\n// Delete frees ProcThreadAttributeList's resources.\nfunc (al *ProcThreadAttributeListContainer) Delete() {\n\tdeleteProcThreadAttributeList(al.data)\n\tLocalFree(Handle(unsafe.Pointer(al.data)))\n\tal.data = nil\n\tal.pointers = nil\n}\n\n// List returns the actual ProcThreadAttributeList to be passed to StartupInfoEx.\nfunc (al *ProcThreadAttributeListContainer) List() *ProcThreadAttributeList {\n\treturn al.data\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/memory_windows.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\nconst (\n\tMEM_COMMIT      = 0x00001000\n\tMEM_RESERVE     = 0x00002000\n\tMEM_DECOMMIT    = 0x00004000\n\tMEM_RELEASE     = 0x00008000\n\tMEM_RESET       = 0x00080000\n\tMEM_TOP_DOWN    = 0x00100000\n\tMEM_WRITE_WATCH = 0x00200000\n\tMEM_PHYSICAL    = 0x00400000\n\tMEM_RESET_UNDO  = 0x01000000\n\tMEM_LARGE_PAGES = 0x20000000\n\n\tPAGE_NOACCESS          = 0x00000001\n\tPAGE_READONLY          = 0x00000002\n\tPAGE_READWRITE         = 0x00000004\n\tPAGE_WRITECOPY         = 0x00000008\n\tPAGE_EXECUTE           = 0x00000010\n\tPAGE_EXECUTE_READ      = 0x00000020\n\tPAGE_EXECUTE_READWRITE = 0x00000040\n\tPAGE_EXECUTE_WRITECOPY = 0x00000080\n\tPAGE_GUARD             = 0x00000100\n\tPAGE_NOCACHE           = 0x00000200\n\tPAGE_WRITECOMBINE      = 0x00000400\n\tPAGE_TARGETS_INVALID   = 0x40000000\n\tPAGE_TARGETS_NO_UPDATE = 0x40000000\n\n\tQUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002\n\tQUOTA_LIMITS_HARDWS_MIN_ENABLE  = 0x00000001\n\tQUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008\n\tQUOTA_LIMITS_HARDWS_MAX_ENABLE  = 0x00000004\n)\n\ntype MemoryBasicInformation struct {\n\tBaseAddress       uintptr\n\tAllocationBase    uintptr\n\tAllocationProtect uint32\n\tPartitionId       uint16\n\tRegionSize        uintptr\n\tState             uint32\n\tProtect           uint32\n\tType              uint32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/mkerrors.bash",
    "content": "#!/bin/bash\n\n# Copyright 2019 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\nset -e\nshopt -s nullglob\n\nwinerror=\"$(printf '%s\\n' \"/mnt/c/Program Files (x86)/Windows Kits/\"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)\"\n[[ -n $winerror ]] || { echo \"Unable to find winerror.h\" >&2; exit 1; }\nntstatus=\"$(printf '%s\\n' \"/mnt/c/Program Files (x86)/Windows Kits/\"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)\"\n[[ -n $ntstatus ]] || { echo \"Unable to find ntstatus.h\" >&2; exit 1; }\n\ndeclare -A errors\n\n{\n\techo \"// Code generated by 'mkerrors.bash'; DO NOT EDIT.\"\n\techo\n\techo \"package windows\"\n\techo \"import \\\"syscall\\\"\"\n\techo \"const (\"\n\n\twhile read -r line; do\n\t\tunset vtype\n\t\tif [[ $line =~ ^#define\\ +([A-Z0-9_]+k?)\\ +([A-Z0-9_]+\\()?([A-Z][A-Z0-9_]+k?)\\)? ]]; then\n\t\t\tkey=\"${BASH_REMATCH[1]}\"\n\t\t\tvalue=\"${BASH_REMATCH[3]}\"\n\t\telif [[ $line =~ ^#define\\ +([A-Z0-9_]+k?)\\ +([A-Z0-9_]+\\()?((0x)?[0-9A-Fa-f]+)L?\\)? ]]; then\n\t\t\tkey=\"${BASH_REMATCH[1]}\"\n\t\t\tvalue=\"${BASH_REMATCH[3]}\"\n\t\t\tvtype=\"${BASH_REMATCH[2]}\"\n\t\telif [[ $line =~ ^#define\\ +([A-Z0-9_]+k?)\\ +\\(\\(([A-Z]+)\\)((0x)?[0-9A-Fa-f]+)L?\\) ]]; then\n\t\t\tkey=\"${BASH_REMATCH[1]}\"\n\t\t\tvalue=\"${BASH_REMATCH[3]}\"\n\t\t\tvtype=\"${BASH_REMATCH[2]}\"\n\t\telse\n\t\t\tcontinue\n\t\tfi\n\t\t[[ -n $key && -n $value ]] || continue\n\t\t[[ -z ${errors[\"$key\"]} ]] || continue\n\t\terrors[\"$key\"]=\"$value\"\n\t\tif [[ -v vtype ]]; then\n\t\t\tif [[ $key == FACILITY_* || $key == NO_ERROR ]]; then\n\t\t\t\tvtype=\"\"\n\t\t\telif [[ $vtype == *HANDLE* || $vtype == *HRESULT* ]]; then\n\t\t\t\tvtype=\"Handle\"\n\t\t\telse\n\t\t\t\tvtype=\"syscall.Errno\"\n\t\t\tfi\n\t\t\tlast_vtype=\"$vtype\"\n\t\telse\n\t\t\tvtype=\"\"\n\t\t\tif [[ $last_vtype == Handle && $value == NO_ERROR ]]; then\n\t\t\t\tvalue=\"S_OK\"\n\t\t\telif [[ $last_vtype == syscall.Errno && $value == NO_ERROR ]]; then\n\t\t\t\tvalue=\"ERROR_SUCCESS\"\n\t\t\tfi\n\t\tfi\n\n\t\techo \"$key $vtype = $value\"\n\tdone < \"$winerror\"\n\n\twhile read -r line; do\n\t\t[[ $line =~ ^#define\\ (STATUS_[^\\s]+)\\ +\\(\\(NTSTATUS\\)((0x)?[0-9a-fA-F]+)L?\\) ]] || continue\n\t\techo \"${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}\"\n\tdone < \"$ntstatus\"\n\n\techo \")\"\n} | gofmt > \"zerrors_windows.go\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/mkknownfolderids.bash",
    "content": "#!/bin/bash\n\n# Copyright 2019 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\nset -e\nshopt -s nullglob\n\nknownfolders=\"$(printf '%s\\n' \"/mnt/c/Program Files (x86)/Windows Kits/\"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)\"\n[[ -n $knownfolders ]] || { echo \"Unable to find KnownFolders.h\" >&2; exit 1; }\n\n{\n\techo \"// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT.\"\n\techo\n\techo \"package windows\"\n\techo \"type KNOWNFOLDERID GUID\"\n\techo \"var (\"\n\twhile read -r line; do\n\t\t[[ $line =~ DEFINE_KNOWN_FOLDER\\((FOLDERID_[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+),[\\t\\ ]*(0x[^,]+)\\) ]] || continue\n\t\tprintf \"%s = &KNOWNFOLDERID{0x%08x, 0x%04x, 0x%04x, [8]byte{0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}\\n\" \\\n\t\t\t\"${BASH_REMATCH[1]}\" $(( \"${BASH_REMATCH[2]}\" )) $(( \"${BASH_REMATCH[3]}\" )) $(( \"${BASH_REMATCH[4]}\" )) \\\n\t\t\t$(( \"${BASH_REMATCH[5]}\" )) $(( \"${BASH_REMATCH[6]}\" )) $(( \"${BASH_REMATCH[7]}\" )) $(( \"${BASH_REMATCH[8]}\" )) \\\n\t\t\t$(( \"${BASH_REMATCH[9]}\" )) $(( \"${BASH_REMATCH[10]}\" )) $(( \"${BASH_REMATCH[11]}\" )) $(( \"${BASH_REMATCH[12]}\" ))\n\tdone < \"$knownfolders\"\n\techo \")\"\n} | gofmt > \"zknownfolderids_windows.go\"\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/mksyscall.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build generate\n\npackage windows\n\n//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/race.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows && race\n\npackage windows\n\nimport (\n\t\"runtime\"\n\t\"unsafe\"\n)\n\nconst raceenabled = true\n\nfunc raceAcquire(addr unsafe.Pointer) {\n\truntime.RaceAcquire(addr)\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n\truntime.RaceReleaseMerge(addr)\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n\truntime.RaceReadRange(addr, len)\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n\truntime.RaceWriteRange(addr, len)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/race0.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows && !race\n\npackage windows\n\nimport (\n\t\"unsafe\"\n)\n\nconst raceenabled = false\n\nfunc raceAcquire(addr unsafe.Pointer) {\n}\n\nfunc raceReleaseMerge(addr unsafe.Pointer) {\n}\n\nfunc raceReadRange(addr unsafe.Pointer, len int) {\n}\n\nfunc raceWriteRange(addr unsafe.Pointer, len int) {\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/security_windows.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nconst (\n\tNameUnknown          = 0\n\tNameFullyQualifiedDN = 1\n\tNameSamCompatible    = 2\n\tNameDisplay          = 3\n\tNameUniqueId         = 6\n\tNameCanonical        = 7\n\tNameUserPrincipal    = 8\n\tNameCanonicalEx      = 9\n\tNameServicePrincipal = 10\n\tNameDnsDomain        = 12\n)\n\n// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.\n// http://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx\n//sys\tTranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW\n//sys\tGetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW\n\n// TranslateAccountName converts a directory service\n// object name from one format to another.\nfunc TranslateAccountName(username string, from, to uint32, initSize int) (string, error) {\n\tu, e := UTF16PtrFromString(username)\n\tif e != nil {\n\t\treturn \"\", e\n\t}\n\tn := uint32(50)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\te = TranslateName(u, from, to, &b[0], &n)\n\t\tif e == nil {\n\t\t\treturn UTF16ToString(b[:n]), nil\n\t\t}\n\t\tif e != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn \"\", e\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn \"\", e\n\t\t}\n\t}\n}\n\nconst (\n\t// do not reorder\n\tNetSetupUnknownStatus = iota\n\tNetSetupUnjoined\n\tNetSetupWorkgroupName\n\tNetSetupDomainName\n)\n\ntype UserInfo10 struct {\n\tName       *uint16\n\tComment    *uint16\n\tUsrComment *uint16\n\tFullName   *uint16\n}\n\n//sys\tNetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo\n//sys\tNetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation\n//sys\tNetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree\n//sys   NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum\n\nconst (\n\t// do not reorder\n\tSidTypeUser = 1 + iota\n\tSidTypeGroup\n\tSidTypeDomain\n\tSidTypeAlias\n\tSidTypeWellKnownGroup\n\tSidTypeDeletedAccount\n\tSidTypeInvalid\n\tSidTypeUnknown\n\tSidTypeComputer\n\tSidTypeLabel\n)\n\ntype SidIdentifierAuthority struct {\n\tValue [6]byte\n}\n\nvar (\n\tSECURITY_NULL_SID_AUTHORITY        = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 0}}\n\tSECURITY_WORLD_SID_AUTHORITY       = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 1}}\n\tSECURITY_LOCAL_SID_AUTHORITY       = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 2}}\n\tSECURITY_CREATOR_SID_AUTHORITY     = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 3}}\n\tSECURITY_NON_UNIQUE_AUTHORITY      = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 4}}\n\tSECURITY_NT_AUTHORITY              = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 5}}\n\tSECURITY_MANDATORY_LABEL_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 16}}\n)\n\nconst (\n\tSECURITY_NULL_RID                   = 0\n\tSECURITY_WORLD_RID                  = 0\n\tSECURITY_LOCAL_RID                  = 0\n\tSECURITY_CREATOR_OWNER_RID          = 0\n\tSECURITY_CREATOR_GROUP_RID          = 1\n\tSECURITY_DIALUP_RID                 = 1\n\tSECURITY_NETWORK_RID                = 2\n\tSECURITY_BATCH_RID                  = 3\n\tSECURITY_INTERACTIVE_RID            = 4\n\tSECURITY_LOGON_IDS_RID              = 5\n\tSECURITY_SERVICE_RID                = 6\n\tSECURITY_LOCAL_SYSTEM_RID           = 18\n\tSECURITY_BUILTIN_DOMAIN_RID         = 32\n\tSECURITY_PRINCIPAL_SELF_RID         = 10\n\tSECURITY_CREATOR_OWNER_SERVER_RID   = 0x2\n\tSECURITY_CREATOR_GROUP_SERVER_RID   = 0x3\n\tSECURITY_LOGON_IDS_RID_COUNT        = 0x3\n\tSECURITY_ANONYMOUS_LOGON_RID        = 0x7\n\tSECURITY_PROXY_RID                  = 0x8\n\tSECURITY_ENTERPRISE_CONTROLLERS_RID = 0x9\n\tSECURITY_SERVER_LOGON_RID           = SECURITY_ENTERPRISE_CONTROLLERS_RID\n\tSECURITY_AUTHENTICATED_USER_RID     = 0xb\n\tSECURITY_RESTRICTED_CODE_RID        = 0xc\n\tSECURITY_NT_NON_UNIQUE_RID          = 0x15\n)\n\n// Predefined domain-relative RIDs for local groups.\n// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa379649(v=vs.85).aspx\nconst (\n\tDOMAIN_ALIAS_RID_ADMINS                         = 0x220\n\tDOMAIN_ALIAS_RID_USERS                          = 0x221\n\tDOMAIN_ALIAS_RID_GUESTS                         = 0x222\n\tDOMAIN_ALIAS_RID_POWER_USERS                    = 0x223\n\tDOMAIN_ALIAS_RID_ACCOUNT_OPS                    = 0x224\n\tDOMAIN_ALIAS_RID_SYSTEM_OPS                     = 0x225\n\tDOMAIN_ALIAS_RID_PRINT_OPS                      = 0x226\n\tDOMAIN_ALIAS_RID_BACKUP_OPS                     = 0x227\n\tDOMAIN_ALIAS_RID_REPLICATOR                     = 0x228\n\tDOMAIN_ALIAS_RID_RAS_SERVERS                    = 0x229\n\tDOMAIN_ALIAS_RID_PREW2KCOMPACCESS               = 0x22a\n\tDOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS           = 0x22b\n\tDOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS      = 0x22c\n\tDOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d\n\tDOMAIN_ALIAS_RID_MONITORING_USERS               = 0x22e\n\tDOMAIN_ALIAS_RID_LOGGING_USERS                  = 0x22f\n\tDOMAIN_ALIAS_RID_AUTHORIZATIONACCESS            = 0x230\n\tDOMAIN_ALIAS_RID_TS_LICENSE_SERVERS             = 0x231\n\tDOMAIN_ALIAS_RID_DCOM_USERS                     = 0x232\n\tDOMAIN_ALIAS_RID_IUSERS                         = 0x238\n\tDOMAIN_ALIAS_RID_CRYPTO_OPERATORS               = 0x239\n\tDOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP     = 0x23b\n\tDOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 0x23c\n\tDOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP        = 0x23d\n\tDOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP      = 0x23e\n)\n\n//sys\tLookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW\n//sys\tLookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW\n//sys\tConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW\n//sys\tConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) = advapi32.ConvertStringSidToSidW\n//sys\tGetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid\n//sys\tCopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid\n//sys\tAllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) = advapi32.AllocateAndInitializeSid\n//sys\tcreateWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) = advapi32.CreateWellKnownSid\n//sys\tisWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) = advapi32.IsWellKnownSid\n//sys\tFreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid\n//sys\tEqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid\n//sys\tgetSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) = advapi32.GetSidIdentifierAuthority\n//sys\tgetSidSubAuthorityCount(sid *SID) (count *uint8) = advapi32.GetSidSubAuthorityCount\n//sys\tgetSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) = advapi32.GetSidSubAuthority\n//sys\tisValidSid(sid *SID) (isValid bool) = advapi32.IsValidSid\n\n// The security identifier (SID) structure is a variable-length\n// structure used to uniquely identify users or groups.\ntype SID struct{}\n\n// StringToSid converts a string-format security identifier\n// SID into a valid, functional SID.\nfunc StringToSid(s string) (*SID, error) {\n\tvar sid *SID\n\tp, e := UTF16PtrFromString(s)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\te = ConvertStringSidToSid(p, &sid)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\tdefer LocalFree((Handle)(unsafe.Pointer(sid)))\n\treturn sid.Copy()\n}\n\n// LookupSID retrieves a security identifier SID for the account\n// and the name of the domain on which the account was found.\n// System specify target computer to search.\nfunc LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) {\n\tif len(account) == 0 {\n\t\treturn nil, \"\", 0, syscall.EINVAL\n\t}\n\tacc, e := UTF16PtrFromString(account)\n\tif e != nil {\n\t\treturn nil, \"\", 0, e\n\t}\n\tvar sys *uint16\n\tif len(system) > 0 {\n\t\tsys, e = UTF16PtrFromString(system)\n\t\tif e != nil {\n\t\t\treturn nil, \"\", 0, e\n\t\t}\n\t}\n\tn := uint32(50)\n\tdn := uint32(50)\n\tfor {\n\t\tb := make([]byte, n)\n\t\tdb := make([]uint16, dn)\n\t\tsid = (*SID)(unsafe.Pointer(&b[0]))\n\t\te = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType)\n\t\tif e == nil {\n\t\t\treturn sid, UTF16ToString(db), accType, nil\n\t\t}\n\t\tif e != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn nil, \"\", 0, e\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn nil, \"\", 0, e\n\t\t}\n\t}\n}\n\n// String converts SID to a string format suitable for display, storage, or transmission.\nfunc (sid *SID) String() string {\n\tvar s *uint16\n\te := ConvertSidToStringSid(sid, &s)\n\tif e != nil {\n\t\treturn \"\"\n\t}\n\tdefer LocalFree((Handle)(unsafe.Pointer(s)))\n\treturn UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:])\n}\n\n// Len returns the length, in bytes, of a valid security identifier SID.\nfunc (sid *SID) Len() int {\n\treturn int(GetLengthSid(sid))\n}\n\n// Copy creates a duplicate of security identifier SID.\nfunc (sid *SID) Copy() (*SID, error) {\n\tb := make([]byte, sid.Len())\n\tsid2 := (*SID)(unsafe.Pointer(&b[0]))\n\te := CopySid(uint32(len(b)), sid2, sid)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn sid2, nil\n}\n\n// IdentifierAuthority returns the identifier authority of the SID.\nfunc (sid *SID) IdentifierAuthority() SidIdentifierAuthority {\n\treturn *getSidIdentifierAuthority(sid)\n}\n\n// SubAuthorityCount returns the number of sub-authorities in the SID.\nfunc (sid *SID) SubAuthorityCount() uint8 {\n\treturn *getSidSubAuthorityCount(sid)\n}\n\n// SubAuthority returns the sub-authority of the SID as specified by\n// the index, which must be less than sid.SubAuthorityCount().\nfunc (sid *SID) SubAuthority(idx uint32) uint32 {\n\tif idx >= uint32(sid.SubAuthorityCount()) {\n\t\tpanic(\"sub-authority index out of range\")\n\t}\n\treturn *getSidSubAuthority(sid, idx)\n}\n\n// IsValid returns whether the SID has a valid revision and length.\nfunc (sid *SID) IsValid() bool {\n\treturn isValidSid(sid)\n}\n\n// Equals compares two SIDs for equality.\nfunc (sid *SID) Equals(sid2 *SID) bool {\n\treturn EqualSid(sid, sid2)\n}\n\n// IsWellKnown determines whether the SID matches the well-known sidType.\nfunc (sid *SID) IsWellKnown(sidType WELL_KNOWN_SID_TYPE) bool {\n\treturn isWellKnownSid(sid, sidType)\n}\n\n// LookupAccount retrieves the name of the account for this SID\n// and the name of the first domain on which this SID is found.\n// System specify target computer to search for.\nfunc (sid *SID) LookupAccount(system string) (account, domain string, accType uint32, err error) {\n\tvar sys *uint16\n\tif len(system) > 0 {\n\t\tsys, err = UTF16PtrFromString(system)\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", 0, err\n\t\t}\n\t}\n\tn := uint32(50)\n\tdn := uint32(50)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\tdb := make([]uint16, dn)\n\t\te := LookupAccountSid(sys, sid, &b[0], &n, &db[0], &dn, &accType)\n\t\tif e == nil {\n\t\t\treturn UTF16ToString(b), UTF16ToString(db), accType, nil\n\t\t}\n\t\tif e != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn \"\", \"\", 0, e\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn \"\", \"\", 0, e\n\t\t}\n\t}\n}\n\n// Various types of pre-specified SIDs that can be synthesized and compared at runtime.\ntype WELL_KNOWN_SID_TYPE uint32\n\nconst (\n\tWinNullSid                                    = 0\n\tWinWorldSid                                   = 1\n\tWinLocalSid                                   = 2\n\tWinCreatorOwnerSid                            = 3\n\tWinCreatorGroupSid                            = 4\n\tWinCreatorOwnerServerSid                      = 5\n\tWinCreatorGroupServerSid                      = 6\n\tWinNtAuthoritySid                             = 7\n\tWinDialupSid                                  = 8\n\tWinNetworkSid                                 = 9\n\tWinBatchSid                                   = 10\n\tWinInteractiveSid                             = 11\n\tWinServiceSid                                 = 12\n\tWinAnonymousSid                               = 13\n\tWinProxySid                                   = 14\n\tWinEnterpriseControllersSid                   = 15\n\tWinSelfSid                                    = 16\n\tWinAuthenticatedUserSid                       = 17\n\tWinRestrictedCodeSid                          = 18\n\tWinTerminalServerSid                          = 19\n\tWinRemoteLogonIdSid                           = 20\n\tWinLogonIdsSid                                = 21\n\tWinLocalSystemSid                             = 22\n\tWinLocalServiceSid                            = 23\n\tWinNetworkServiceSid                          = 24\n\tWinBuiltinDomainSid                           = 25\n\tWinBuiltinAdministratorsSid                   = 26\n\tWinBuiltinUsersSid                            = 27\n\tWinBuiltinGuestsSid                           = 28\n\tWinBuiltinPowerUsersSid                       = 29\n\tWinBuiltinAccountOperatorsSid                 = 30\n\tWinBuiltinSystemOperatorsSid                  = 31\n\tWinBuiltinPrintOperatorsSid                   = 32\n\tWinBuiltinBackupOperatorsSid                  = 33\n\tWinBuiltinReplicatorSid                       = 34\n\tWinBuiltinPreWindows2000CompatibleAccessSid   = 35\n\tWinBuiltinRemoteDesktopUsersSid               = 36\n\tWinBuiltinNetworkConfigurationOperatorsSid    = 37\n\tWinAccountAdministratorSid                    = 38\n\tWinAccountGuestSid                            = 39\n\tWinAccountKrbtgtSid                           = 40\n\tWinAccountDomainAdminsSid                     = 41\n\tWinAccountDomainUsersSid                      = 42\n\tWinAccountDomainGuestsSid                     = 43\n\tWinAccountComputersSid                        = 44\n\tWinAccountControllersSid                      = 45\n\tWinAccountCertAdminsSid                       = 46\n\tWinAccountSchemaAdminsSid                     = 47\n\tWinAccountEnterpriseAdminsSid                 = 48\n\tWinAccountPolicyAdminsSid                     = 49\n\tWinAccountRasAndIasServersSid                 = 50\n\tWinNTLMAuthenticationSid                      = 51\n\tWinDigestAuthenticationSid                    = 52\n\tWinSChannelAuthenticationSid                  = 53\n\tWinThisOrganizationSid                        = 54\n\tWinOtherOrganizationSid                       = 55\n\tWinBuiltinIncomingForestTrustBuildersSid      = 56\n\tWinBuiltinPerfMonitoringUsersSid              = 57\n\tWinBuiltinPerfLoggingUsersSid                 = 58\n\tWinBuiltinAuthorizationAccessSid              = 59\n\tWinBuiltinTerminalServerLicenseServersSid     = 60\n\tWinBuiltinDCOMUsersSid                        = 61\n\tWinBuiltinIUsersSid                           = 62\n\tWinIUserSid                                   = 63\n\tWinBuiltinCryptoOperatorsSid                  = 64\n\tWinUntrustedLabelSid                          = 65\n\tWinLowLabelSid                                = 66\n\tWinMediumLabelSid                             = 67\n\tWinHighLabelSid                               = 68\n\tWinSystemLabelSid                             = 69\n\tWinWriteRestrictedCodeSid                     = 70\n\tWinCreatorOwnerRightsSid                      = 71\n\tWinCacheablePrincipalsGroupSid                = 72\n\tWinNonCacheablePrincipalsGroupSid             = 73\n\tWinEnterpriseReadonlyControllersSid           = 74\n\tWinAccountReadonlyControllersSid              = 75\n\tWinBuiltinEventLogReadersGroup                = 76\n\tWinNewEnterpriseReadonlyControllersSid        = 77\n\tWinBuiltinCertSvcDComAccessGroup              = 78\n\tWinMediumPlusLabelSid                         = 79\n\tWinLocalLogonSid                              = 80\n\tWinConsoleLogonSid                            = 81\n\tWinThisOrganizationCertificateSid             = 82\n\tWinApplicationPackageAuthoritySid             = 83\n\tWinBuiltinAnyPackageSid                       = 84\n\tWinCapabilityInternetClientSid                = 85\n\tWinCapabilityInternetClientServerSid          = 86\n\tWinCapabilityPrivateNetworkClientServerSid    = 87\n\tWinCapabilityPicturesLibrarySid               = 88\n\tWinCapabilityVideosLibrarySid                 = 89\n\tWinCapabilityMusicLibrarySid                  = 90\n\tWinCapabilityDocumentsLibrarySid              = 91\n\tWinCapabilitySharedUserCertificatesSid        = 92\n\tWinCapabilityEnterpriseAuthenticationSid      = 93\n\tWinCapabilityRemovableStorageSid              = 94\n\tWinBuiltinRDSRemoteAccessServersSid           = 95\n\tWinBuiltinRDSEndpointServersSid               = 96\n\tWinBuiltinRDSManagementServersSid             = 97\n\tWinUserModeDriversSid                         = 98\n\tWinBuiltinHyperVAdminsSid                     = 99\n\tWinAccountCloneableControllersSid             = 100\n\tWinBuiltinAccessControlAssistanceOperatorsSid = 101\n\tWinBuiltinRemoteManagementUsersSid            = 102\n\tWinAuthenticationAuthorityAssertedSid         = 103\n\tWinAuthenticationServiceAssertedSid           = 104\n\tWinLocalAccountSid                            = 105\n\tWinLocalAccountAndAdministratorSid            = 106\n\tWinAccountProtectedUsersSid                   = 107\n\tWinCapabilityAppointmentsSid                  = 108\n\tWinCapabilityContactsSid                      = 109\n\tWinAccountDefaultSystemManagedSid             = 110\n\tWinBuiltinDefaultSystemManagedGroupSid        = 111\n\tWinBuiltinStorageReplicaAdminsSid             = 112\n\tWinAccountKeyAdminsSid                        = 113\n\tWinAccountEnterpriseKeyAdminsSid              = 114\n\tWinAuthenticationKeyTrustSid                  = 115\n\tWinAuthenticationKeyPropertyMFASid            = 116\n\tWinAuthenticationKeyPropertyAttestationSid    = 117\n\tWinAuthenticationFreshKeyAuthSid              = 118\n\tWinBuiltinDeviceOwnersSid                     = 119\n)\n\n// Creates a SID for a well-known predefined alias, generally using the constants of the form\n// Win*Sid, for the local machine.\nfunc CreateWellKnownSid(sidType WELL_KNOWN_SID_TYPE) (*SID, error) {\n\treturn CreateWellKnownDomainSid(sidType, nil)\n}\n\n// Creates a SID for a well-known predefined alias, generally using the constants of the form\n// Win*Sid, for the domain specified by the domainSid parameter.\nfunc CreateWellKnownDomainSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID) (*SID, error) {\n\tn := uint32(50)\n\tfor {\n\t\tb := make([]byte, n)\n\t\tsid := (*SID)(unsafe.Pointer(&b[0]))\n\t\terr := createWellKnownSid(sidType, domainSid, sid, &n)\n\t\tif err == nil {\n\t\t\treturn sid, nil\n\t\t}\n\t\tif err != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn nil, err\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn nil, err\n\t\t}\n\t}\n}\n\nconst (\n\t// do not reorder\n\tTOKEN_ASSIGN_PRIMARY = 1 << iota\n\tTOKEN_DUPLICATE\n\tTOKEN_IMPERSONATE\n\tTOKEN_QUERY\n\tTOKEN_QUERY_SOURCE\n\tTOKEN_ADJUST_PRIVILEGES\n\tTOKEN_ADJUST_GROUPS\n\tTOKEN_ADJUST_DEFAULT\n\tTOKEN_ADJUST_SESSIONID\n\n\tTOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |\n\t\tTOKEN_ASSIGN_PRIMARY |\n\t\tTOKEN_DUPLICATE |\n\t\tTOKEN_IMPERSONATE |\n\t\tTOKEN_QUERY |\n\t\tTOKEN_QUERY_SOURCE |\n\t\tTOKEN_ADJUST_PRIVILEGES |\n\t\tTOKEN_ADJUST_GROUPS |\n\t\tTOKEN_ADJUST_DEFAULT |\n\t\tTOKEN_ADJUST_SESSIONID\n\tTOKEN_READ  = STANDARD_RIGHTS_READ | TOKEN_QUERY\n\tTOKEN_WRITE = STANDARD_RIGHTS_WRITE |\n\t\tTOKEN_ADJUST_PRIVILEGES |\n\t\tTOKEN_ADJUST_GROUPS |\n\t\tTOKEN_ADJUST_DEFAULT\n\tTOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE\n)\n\nconst (\n\t// do not reorder\n\tTokenUser = 1 + iota\n\tTokenGroups\n\tTokenPrivileges\n\tTokenOwner\n\tTokenPrimaryGroup\n\tTokenDefaultDacl\n\tTokenSource\n\tTokenType\n\tTokenImpersonationLevel\n\tTokenStatistics\n\tTokenRestrictedSids\n\tTokenSessionId\n\tTokenGroupsAndPrivileges\n\tTokenSessionReference\n\tTokenSandBoxInert\n\tTokenAuditPolicy\n\tTokenOrigin\n\tTokenElevationType\n\tTokenLinkedToken\n\tTokenElevation\n\tTokenHasRestrictions\n\tTokenAccessInformation\n\tTokenVirtualizationAllowed\n\tTokenVirtualizationEnabled\n\tTokenIntegrityLevel\n\tTokenUIAccess\n\tTokenMandatoryPolicy\n\tTokenLogonSid\n\tMaxTokenInfoClass\n)\n\n// Group attributes inside of Tokengroups.Groups[i].Attributes\nconst (\n\tSE_GROUP_MANDATORY          = 0x00000001\n\tSE_GROUP_ENABLED_BY_DEFAULT = 0x00000002\n\tSE_GROUP_ENABLED            = 0x00000004\n\tSE_GROUP_OWNER              = 0x00000008\n\tSE_GROUP_USE_FOR_DENY_ONLY  = 0x00000010\n\tSE_GROUP_INTEGRITY          = 0x00000020\n\tSE_GROUP_INTEGRITY_ENABLED  = 0x00000040\n\tSE_GROUP_LOGON_ID           = 0xC0000000\n\tSE_GROUP_RESOURCE           = 0x20000000\n\tSE_GROUP_VALID_ATTRIBUTES   = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED | SE_GROUP_OWNER | SE_GROUP_USE_FOR_DENY_ONLY | SE_GROUP_LOGON_ID | SE_GROUP_RESOURCE | SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED\n)\n\n// Privilege attributes\nconst (\n\tSE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001\n\tSE_PRIVILEGE_ENABLED            = 0x00000002\n\tSE_PRIVILEGE_REMOVED            = 0x00000004\n\tSE_PRIVILEGE_USED_FOR_ACCESS    = 0x80000000\n\tSE_PRIVILEGE_VALID_ATTRIBUTES   = SE_PRIVILEGE_ENABLED_BY_DEFAULT | SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_REMOVED | SE_PRIVILEGE_USED_FOR_ACCESS\n)\n\n// Token types\nconst (\n\tTokenPrimary       = 1\n\tTokenImpersonation = 2\n)\n\n// Impersonation levels\nconst (\n\tSecurityAnonymous      = 0\n\tSecurityIdentification = 1\n\tSecurityImpersonation  = 2\n\tSecurityDelegation     = 3\n)\n\ntype LUID struct {\n\tLowPart  uint32\n\tHighPart int32\n}\n\ntype LUIDAndAttributes struct {\n\tLuid       LUID\n\tAttributes uint32\n}\n\ntype SIDAndAttributes struct {\n\tSid        *SID\n\tAttributes uint32\n}\n\ntype Tokenuser struct {\n\tUser SIDAndAttributes\n}\n\ntype Tokenprimarygroup struct {\n\tPrimaryGroup *SID\n}\n\ntype Tokengroups struct {\n\tGroupCount uint32\n\tGroups     [1]SIDAndAttributes // Use AllGroups() for iterating.\n}\n\n// AllGroups returns a slice that can be used to iterate over the groups in g.\nfunc (g *Tokengroups) AllGroups() []SIDAndAttributes {\n\treturn (*[(1 << 28) - 1]SIDAndAttributes)(unsafe.Pointer(&g.Groups[0]))[:g.GroupCount:g.GroupCount]\n}\n\ntype Tokenprivileges struct {\n\tPrivilegeCount uint32\n\tPrivileges     [1]LUIDAndAttributes // Use AllPrivileges() for iterating.\n}\n\n// AllPrivileges returns a slice that can be used to iterate over the privileges in p.\nfunc (p *Tokenprivileges) AllPrivileges() []LUIDAndAttributes {\n\treturn (*[(1 << 27) - 1]LUIDAndAttributes)(unsafe.Pointer(&p.Privileges[0]))[:p.PrivilegeCount:p.PrivilegeCount]\n}\n\ntype Tokenmandatorylabel struct {\n\tLabel SIDAndAttributes\n}\n\nfunc (tml *Tokenmandatorylabel) Size() uint32 {\n\treturn uint32(unsafe.Sizeof(Tokenmandatorylabel{})) + GetLengthSid(tml.Label.Sid)\n}\n\n// Authorization Functions\n//sys\tcheckTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership\n//sys\tisTokenRestricted(tokenHandle Token) (ret bool, err error) [!failretval] = advapi32.IsTokenRestricted\n//sys\tOpenProcessToken(process Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken\n//sys\tOpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) = advapi32.OpenThreadToken\n//sys\tImpersonateSelf(impersonationlevel uint32) (err error) = advapi32.ImpersonateSelf\n//sys\tRevertToSelf() (err error) = advapi32.RevertToSelf\n//sys\tSetThreadToken(thread *Handle, token Token) (err error) = advapi32.SetThreadToken\n//sys\tLookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) = advapi32.LookupPrivilegeValueW\n//sys\tAdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) = advapi32.AdjustTokenPrivileges\n//sys\tAdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) = advapi32.AdjustTokenGroups\n//sys\tGetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation\n//sys\tSetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) = advapi32.SetTokenInformation\n//sys\tDuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) = advapi32.DuplicateTokenEx\n//sys\tGetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW\n//sys\tgetSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemDirectoryW\n//sys\tgetWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetWindowsDirectoryW\n//sys\tgetSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemWindowsDirectoryW\n\n// An access token contains the security information for a logon session.\n// The system creates an access token when a user logs on, and every\n// process executed on behalf of the user has a copy of the token.\n// The token identifies the user, the user's groups, and the user's\n// privileges. The system uses the token to control access to securable\n// objects and to control the ability of the user to perform various\n// system-related operations on the local computer.\ntype Token Handle\n\n// OpenCurrentProcessToken opens an access token associated with current\n// process with TOKEN_QUERY access. It is a real token that needs to be closed.\n//\n// Deprecated: Explicitly call OpenProcessToken(CurrentProcess(), ...)\n// with the desired access instead, or use GetCurrentProcessToken for a\n// TOKEN_QUERY token.\nfunc OpenCurrentProcessToken() (Token, error) {\n\tvar token Token\n\terr := OpenProcessToken(CurrentProcess(), TOKEN_QUERY, &token)\n\treturn token, err\n}\n\n// GetCurrentProcessToken returns the access token associated with\n// the current process. It is a pseudo token that does not need\n// to be closed.\nfunc GetCurrentProcessToken() Token {\n\treturn Token(^uintptr(4 - 1))\n}\n\n// GetCurrentThreadToken return the access token associated with\n// the current thread. It is a pseudo token that does not need\n// to be closed.\nfunc GetCurrentThreadToken() Token {\n\treturn Token(^uintptr(5 - 1))\n}\n\n// GetCurrentThreadEffectiveToken returns the effective access token\n// associated with the current thread. It is a pseudo token that does\n// not need to be closed.\nfunc GetCurrentThreadEffectiveToken() Token {\n\treturn Token(^uintptr(6 - 1))\n}\n\n// Close releases access to access token.\nfunc (t Token) Close() error {\n\treturn CloseHandle(Handle(t))\n}\n\n// getInfo retrieves a specified type of information about an access token.\nfunc (t Token) getInfo(class uint32, initSize int) (unsafe.Pointer, error) {\n\tn := uint32(initSize)\n\tfor {\n\t\tb := make([]byte, n)\n\t\te := GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)\n\t\tif e == nil {\n\t\t\treturn unsafe.Pointer(&b[0]), nil\n\t\t}\n\t\tif e != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn nil, e\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn nil, e\n\t\t}\n\t}\n}\n\n// GetTokenUser retrieves access token t user account information.\nfunc (t Token) GetTokenUser() (*Tokenuser, error) {\n\ti, e := t.getInfo(TokenUser, 50)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn (*Tokenuser)(i), nil\n}\n\n// GetTokenGroups retrieves group accounts associated with access token t.\nfunc (t Token) GetTokenGroups() (*Tokengroups, error) {\n\ti, e := t.getInfo(TokenGroups, 50)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn (*Tokengroups)(i), nil\n}\n\n// GetTokenPrimaryGroup retrieves access token t primary group information.\n// A pointer to a SID structure representing a group that will become\n// the primary group of any objects created by a process using this access token.\nfunc (t Token) GetTokenPrimaryGroup() (*Tokenprimarygroup, error) {\n\ti, e := t.getInfo(TokenPrimaryGroup, 50)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn (*Tokenprimarygroup)(i), nil\n}\n\n// GetUserProfileDirectory retrieves path to the\n// root directory of the access token t user's profile.\nfunc (t Token) GetUserProfileDirectory() (string, error) {\n\tn := uint32(100)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\te := GetUserProfileDirectory(t, &b[0], &n)\n\t\tif e == nil {\n\t\t\treturn UTF16ToString(b), nil\n\t\t}\n\t\tif e != ERROR_INSUFFICIENT_BUFFER {\n\t\t\treturn \"\", e\n\t\t}\n\t\tif n <= uint32(len(b)) {\n\t\t\treturn \"\", e\n\t\t}\n\t}\n}\n\n// IsElevated returns whether the current token is elevated from a UAC perspective.\nfunc (token Token) IsElevated() bool {\n\tvar isElevated uint32\n\tvar outLen uint32\n\terr := GetTokenInformation(token, TokenElevation, (*byte)(unsafe.Pointer(&isElevated)), uint32(unsafe.Sizeof(isElevated)), &outLen)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn outLen == uint32(unsafe.Sizeof(isElevated)) && isElevated != 0\n}\n\n// GetLinkedToken returns the linked token, which may be an elevated UAC token.\nfunc (token Token) GetLinkedToken() (Token, error) {\n\tvar linkedToken Token\n\tvar outLen uint32\n\terr := GetTokenInformation(token, TokenLinkedToken, (*byte)(unsafe.Pointer(&linkedToken)), uint32(unsafe.Sizeof(linkedToken)), &outLen)\n\tif err != nil {\n\t\treturn Token(0), err\n\t}\n\treturn linkedToken, nil\n}\n\n// GetSystemDirectory retrieves the path to current location of the system\n// directory, which is typically, though not always, `C:\\Windows\\System32`.\nfunc GetSystemDirectory() (string, error) {\n\tn := uint32(MAX_PATH)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\tl, e := getSystemDirectory(&b[0], n)\n\t\tif e != nil {\n\t\t\treturn \"\", e\n\t\t}\n\t\tif l <= n {\n\t\t\treturn UTF16ToString(b[:l]), nil\n\t\t}\n\t\tn = l\n\t}\n}\n\n// GetWindowsDirectory retrieves the path to current location of the Windows\n// directory, which is typically, though not always, `C:\\Windows`. This may\n// be a private user directory in the case that the application is running\n// under a terminal server.\nfunc GetWindowsDirectory() (string, error) {\n\tn := uint32(MAX_PATH)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\tl, e := getWindowsDirectory(&b[0], n)\n\t\tif e != nil {\n\t\t\treturn \"\", e\n\t\t}\n\t\tif l <= n {\n\t\t\treturn UTF16ToString(b[:l]), nil\n\t\t}\n\t\tn = l\n\t}\n}\n\n// GetSystemWindowsDirectory retrieves the path to current location of the\n// Windows directory, which is typically, though not always, `C:\\Windows`.\nfunc GetSystemWindowsDirectory() (string, error) {\n\tn := uint32(MAX_PATH)\n\tfor {\n\t\tb := make([]uint16, n)\n\t\tl, e := getSystemWindowsDirectory(&b[0], n)\n\t\tif e != nil {\n\t\t\treturn \"\", e\n\t\t}\n\t\tif l <= n {\n\t\t\treturn UTF16ToString(b[:l]), nil\n\t\t}\n\t\tn = l\n\t}\n}\n\n// IsMember reports whether the access token t is a member of the provided SID.\nfunc (t Token) IsMember(sid *SID) (bool, error) {\n\tvar b int32\n\tif e := checkTokenMembership(t, sid, &b); e != nil {\n\t\treturn false, e\n\t}\n\treturn b != 0, nil\n}\n\n// IsRestricted reports whether the access token t is a restricted token.\nfunc (t Token) IsRestricted() (isRestricted bool, err error) {\n\tisRestricted, err = isTokenRestricted(t)\n\tif !isRestricted && err == syscall.EINVAL {\n\t\t// If err is EINVAL, this returned ERROR_SUCCESS indicating a non-restricted token.\n\t\terr = nil\n\t}\n\treturn\n}\n\nconst (\n\tWTS_CONSOLE_CONNECT        = 0x1\n\tWTS_CONSOLE_DISCONNECT     = 0x2\n\tWTS_REMOTE_CONNECT         = 0x3\n\tWTS_REMOTE_DISCONNECT      = 0x4\n\tWTS_SESSION_LOGON          = 0x5\n\tWTS_SESSION_LOGOFF         = 0x6\n\tWTS_SESSION_LOCK           = 0x7\n\tWTS_SESSION_UNLOCK         = 0x8\n\tWTS_SESSION_REMOTE_CONTROL = 0x9\n\tWTS_SESSION_CREATE         = 0xa\n\tWTS_SESSION_TERMINATE      = 0xb\n)\n\nconst (\n\tWTSActive       = 0\n\tWTSConnected    = 1\n\tWTSConnectQuery = 2\n\tWTSShadow       = 3\n\tWTSDisconnected = 4\n\tWTSIdle         = 5\n\tWTSListen       = 6\n\tWTSReset        = 7\n\tWTSDown         = 8\n\tWTSInit         = 9\n)\n\ntype WTSSESSION_NOTIFICATION struct {\n\tSize      uint32\n\tSessionID uint32\n}\n\ntype WTS_SESSION_INFO struct {\n\tSessionID         uint32\n\tWindowStationName *uint16\n\tState             uint32\n}\n\n//sys WTSQueryUserToken(session uint32, token *Token) (err error) = wtsapi32.WTSQueryUserToken\n//sys WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW\n//sys WTSFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory\n//sys WTSGetActiveConsoleSessionId() (sessionID uint32)\n\ntype ACL struct {\n\taclRevision byte\n\tsbz1        byte\n\taclSize     uint16\n\tAceCount    uint16\n\tsbz2        uint16\n}\n\ntype SECURITY_DESCRIPTOR struct {\n\trevision byte\n\tsbz1     byte\n\tcontrol  SECURITY_DESCRIPTOR_CONTROL\n\towner    *SID\n\tgroup    *SID\n\tsacl     *ACL\n\tdacl     *ACL\n}\n\ntype SECURITY_QUALITY_OF_SERVICE struct {\n\tLength              uint32\n\tImpersonationLevel  uint32\n\tContextTrackingMode byte\n\tEffectiveOnly       byte\n}\n\n// Constants for the ContextTrackingMode field of SECURITY_QUALITY_OF_SERVICE.\nconst (\n\tSECURITY_STATIC_TRACKING  = 0\n\tSECURITY_DYNAMIC_TRACKING = 1\n)\n\ntype SecurityAttributes struct {\n\tLength             uint32\n\tSecurityDescriptor *SECURITY_DESCRIPTOR\n\tInheritHandle      uint32\n}\n\ntype SE_OBJECT_TYPE uint32\n\n// Constants for type SE_OBJECT_TYPE\nconst (\n\tSE_UNKNOWN_OBJECT_TYPE     = 0\n\tSE_FILE_OBJECT             = 1\n\tSE_SERVICE                 = 2\n\tSE_PRINTER                 = 3\n\tSE_REGISTRY_KEY            = 4\n\tSE_LMSHARE                 = 5\n\tSE_KERNEL_OBJECT           = 6\n\tSE_WINDOW_OBJECT           = 7\n\tSE_DS_OBJECT               = 8\n\tSE_DS_OBJECT_ALL           = 9\n\tSE_PROVIDER_DEFINED_OBJECT = 10\n\tSE_WMIGUID_OBJECT          = 11\n\tSE_REGISTRY_WOW64_32KEY    = 12\n\tSE_REGISTRY_WOW64_64KEY    = 13\n)\n\ntype SECURITY_INFORMATION uint32\n\n// Constants for type SECURITY_INFORMATION\nconst (\n\tOWNER_SECURITY_INFORMATION            = 0x00000001\n\tGROUP_SECURITY_INFORMATION            = 0x00000002\n\tDACL_SECURITY_INFORMATION             = 0x00000004\n\tSACL_SECURITY_INFORMATION             = 0x00000008\n\tLABEL_SECURITY_INFORMATION            = 0x00000010\n\tATTRIBUTE_SECURITY_INFORMATION        = 0x00000020\n\tSCOPE_SECURITY_INFORMATION            = 0x00000040\n\tBACKUP_SECURITY_INFORMATION           = 0x00010000\n\tPROTECTED_DACL_SECURITY_INFORMATION   = 0x80000000\n\tPROTECTED_SACL_SECURITY_INFORMATION   = 0x40000000\n\tUNPROTECTED_DACL_SECURITY_INFORMATION = 0x20000000\n\tUNPROTECTED_SACL_SECURITY_INFORMATION = 0x10000000\n)\n\ntype SECURITY_DESCRIPTOR_CONTROL uint16\n\n// Constants for type SECURITY_DESCRIPTOR_CONTROL\nconst (\n\tSE_OWNER_DEFAULTED       = 0x0001\n\tSE_GROUP_DEFAULTED       = 0x0002\n\tSE_DACL_PRESENT          = 0x0004\n\tSE_DACL_DEFAULTED        = 0x0008\n\tSE_SACL_PRESENT          = 0x0010\n\tSE_SACL_DEFAULTED        = 0x0020\n\tSE_DACL_AUTO_INHERIT_REQ = 0x0100\n\tSE_SACL_AUTO_INHERIT_REQ = 0x0200\n\tSE_DACL_AUTO_INHERITED   = 0x0400\n\tSE_SACL_AUTO_INHERITED   = 0x0800\n\tSE_DACL_PROTECTED        = 0x1000\n\tSE_SACL_PROTECTED        = 0x2000\n\tSE_RM_CONTROL_VALID      = 0x4000\n\tSE_SELF_RELATIVE         = 0x8000\n)\n\ntype ACCESS_MASK uint32\n\n// Constants for type ACCESS_MASK\nconst (\n\tDELETE                   = 0x00010000\n\tREAD_CONTROL             = 0x00020000\n\tWRITE_DAC                = 0x00040000\n\tWRITE_OWNER              = 0x00080000\n\tSYNCHRONIZE              = 0x00100000\n\tSTANDARD_RIGHTS_REQUIRED = 0x000F0000\n\tSTANDARD_RIGHTS_READ     = READ_CONTROL\n\tSTANDARD_RIGHTS_WRITE    = READ_CONTROL\n\tSTANDARD_RIGHTS_EXECUTE  = READ_CONTROL\n\tSTANDARD_RIGHTS_ALL      = 0x001F0000\n\tSPECIFIC_RIGHTS_ALL      = 0x0000FFFF\n\tACCESS_SYSTEM_SECURITY   = 0x01000000\n\tMAXIMUM_ALLOWED          = 0x02000000\n\tGENERIC_READ             = 0x80000000\n\tGENERIC_WRITE            = 0x40000000\n\tGENERIC_EXECUTE          = 0x20000000\n\tGENERIC_ALL              = 0x10000000\n)\n\ntype ACCESS_MODE uint32\n\n// Constants for type ACCESS_MODE\nconst (\n\tNOT_USED_ACCESS   = 0\n\tGRANT_ACCESS      = 1\n\tSET_ACCESS        = 2\n\tDENY_ACCESS       = 3\n\tREVOKE_ACCESS     = 4\n\tSET_AUDIT_SUCCESS = 5\n\tSET_AUDIT_FAILURE = 6\n)\n\n// Constants for AceFlags and Inheritance fields\nconst (\n\tNO_INHERITANCE                     = 0x0\n\tSUB_OBJECTS_ONLY_INHERIT           = 0x1\n\tSUB_CONTAINERS_ONLY_INHERIT        = 0x2\n\tSUB_CONTAINERS_AND_OBJECTS_INHERIT = 0x3\n\tINHERIT_NO_PROPAGATE               = 0x4\n\tINHERIT_ONLY                       = 0x8\n\tINHERITED_ACCESS_ENTRY             = 0x10\n\tINHERITED_PARENT                   = 0x10000000\n\tINHERITED_GRANDPARENT              = 0x20000000\n\tOBJECT_INHERIT_ACE                 = 0x1\n\tCONTAINER_INHERIT_ACE              = 0x2\n\tNO_PROPAGATE_INHERIT_ACE           = 0x4\n\tINHERIT_ONLY_ACE                   = 0x8\n\tINHERITED_ACE                      = 0x10\n\tVALID_INHERIT_FLAGS                = 0x1F\n)\n\ntype MULTIPLE_TRUSTEE_OPERATION uint32\n\n// Constants for MULTIPLE_TRUSTEE_OPERATION\nconst (\n\tNO_MULTIPLE_TRUSTEE    = 0\n\tTRUSTEE_IS_IMPERSONATE = 1\n)\n\ntype TRUSTEE_FORM uint32\n\n// Constants for TRUSTEE_FORM\nconst (\n\tTRUSTEE_IS_SID              = 0\n\tTRUSTEE_IS_NAME             = 1\n\tTRUSTEE_BAD_FORM            = 2\n\tTRUSTEE_IS_OBJECTS_AND_SID  = 3\n\tTRUSTEE_IS_OBJECTS_AND_NAME = 4\n)\n\ntype TRUSTEE_TYPE uint32\n\n// Constants for TRUSTEE_TYPE\nconst (\n\tTRUSTEE_IS_UNKNOWN          = 0\n\tTRUSTEE_IS_USER             = 1\n\tTRUSTEE_IS_GROUP            = 2\n\tTRUSTEE_IS_DOMAIN           = 3\n\tTRUSTEE_IS_ALIAS            = 4\n\tTRUSTEE_IS_WELL_KNOWN_GROUP = 5\n\tTRUSTEE_IS_DELETED          = 6\n\tTRUSTEE_IS_INVALID          = 7\n\tTRUSTEE_IS_COMPUTER         = 8\n)\n\n// Constants for ObjectsPresent field\nconst (\n\tACE_OBJECT_TYPE_PRESENT           = 0x1\n\tACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2\n)\n\ntype EXPLICIT_ACCESS struct {\n\tAccessPermissions ACCESS_MASK\n\tAccessMode        ACCESS_MODE\n\tInheritance       uint32\n\tTrustee           TRUSTEE\n}\n\n// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header\ntype ACE_HEADER struct {\n\tAceType  uint8\n\tAceFlags uint8\n\tAceSize  uint16\n}\n\n// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace\ntype ACCESS_ALLOWED_ACE struct {\n\tHeader   ACE_HEADER\n\tMask     ACCESS_MASK\n\tSidStart uint32\n}\n\nconst (\n\t// Constants for AceType\n\t// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header\n\tACCESS_ALLOWED_ACE_TYPE = 0\n\tACCESS_DENIED_ACE_TYPE  = 1\n)\n\n// This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions.\ntype TrusteeValue uintptr\n\nfunc TrusteeValueFromString(str string) TrusteeValue {\n\treturn TrusteeValue(unsafe.Pointer(StringToUTF16Ptr(str)))\n}\nfunc TrusteeValueFromSID(sid *SID) TrusteeValue {\n\treturn TrusteeValue(unsafe.Pointer(sid))\n}\nfunc TrusteeValueFromObjectsAndSid(objectsAndSid *OBJECTS_AND_SID) TrusteeValue {\n\treturn TrusteeValue(unsafe.Pointer(objectsAndSid))\n}\nfunc TrusteeValueFromObjectsAndName(objectsAndName *OBJECTS_AND_NAME) TrusteeValue {\n\treturn TrusteeValue(unsafe.Pointer(objectsAndName))\n}\n\ntype TRUSTEE struct {\n\tMultipleTrustee          *TRUSTEE\n\tMultipleTrusteeOperation MULTIPLE_TRUSTEE_OPERATION\n\tTrusteeForm              TRUSTEE_FORM\n\tTrusteeType              TRUSTEE_TYPE\n\tTrusteeValue             TrusteeValue\n}\n\ntype OBJECTS_AND_SID struct {\n\tObjectsPresent          uint32\n\tObjectTypeGuid          GUID\n\tInheritedObjectTypeGuid GUID\n\tSid                     *SID\n}\n\ntype OBJECTS_AND_NAME struct {\n\tObjectsPresent          uint32\n\tObjectType              SE_OBJECT_TYPE\n\tObjectTypeName          *uint16\n\tInheritedObjectTypeName *uint16\n\tName                    *uint16\n}\n\n//sys\tgetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo\n//sys\tSetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetSecurityInfo\n//sys\tgetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW\n//sys\tSetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW\n//sys\tSetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) = advapi32.SetKernelObjectSecurity\n\n//sys\tbuildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW\n//sys\tinitializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor\n\n//sys\tgetSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) = advapi32.GetSecurityDescriptorControl\n//sys\tgetSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorDacl\n//sys\tgetSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorSacl\n//sys\tgetSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorOwner\n//sys\tgetSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorGroup\n//sys\tgetSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) = advapi32.GetSecurityDescriptorLength\n//sys\tgetSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) [failretval!=0] = advapi32.GetSecurityDescriptorRMControl\n//sys\tisValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) = advapi32.IsValidSecurityDescriptor\n\n//sys\tsetSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) = advapi32.SetSecurityDescriptorControl\n//sys\tsetSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorDacl\n//sys\tsetSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorSacl\n//sys\tsetSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) = advapi32.SetSecurityDescriptorOwner\n//sys\tsetSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) = advapi32.SetSecurityDescriptorGroup\n//sys\tsetSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) = advapi32.SetSecurityDescriptorRMControl\n\n//sys\tconvertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW\n//sys\tconvertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW\n\n//sys\tmakeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) = advapi32.MakeAbsoluteSD\n//sys\tmakeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD\n\n//sys\tsetEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW\n//sys\tGetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce\n\n// Control returns the security descriptor control bits.\nfunc (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) {\n\terr = getSecurityDescriptorControl(sd, &control, &revision)\n\treturn\n}\n\n// SetControl sets the security descriptor control bits.\nfunc (sd *SECURITY_DESCRIPTOR) SetControl(controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) error {\n\treturn setSecurityDescriptorControl(sd, controlBitsOfInterest, controlBitsToSet)\n}\n\n// RMControl returns the security descriptor resource manager control bits.\nfunc (sd *SECURITY_DESCRIPTOR) RMControl() (control uint8, err error) {\n\terr = getSecurityDescriptorRMControl(sd, &control)\n\treturn\n}\n\n// SetRMControl sets the security descriptor resource manager control bits.\nfunc (sd *SECURITY_DESCRIPTOR) SetRMControl(rmControl uint8) {\n\tsetSecurityDescriptorRMControl(sd, &rmControl)\n}\n\n// DACL returns the security descriptor DACL and whether it was defaulted. The dacl return value may be nil\n// if a DACL exists but is an \"empty DACL\", meaning fully permissive. If the DACL does not exist, err returns\n// ERROR_OBJECT_NOT_FOUND.\nfunc (sd *SECURITY_DESCRIPTOR) DACL() (dacl *ACL, defaulted bool, err error) {\n\tvar present bool\n\terr = getSecurityDescriptorDacl(sd, &present, &dacl, &defaulted)\n\tif !present {\n\t\terr = ERROR_OBJECT_NOT_FOUND\n\t}\n\treturn\n}\n\n// SetDACL sets the absolute security descriptor DACL.\nfunc (absoluteSD *SECURITY_DESCRIPTOR) SetDACL(dacl *ACL, present, defaulted bool) error {\n\treturn setSecurityDescriptorDacl(absoluteSD, present, dacl, defaulted)\n}\n\n// SACL returns the security descriptor SACL and whether it was defaulted. The sacl return value may be nil\n// if a SACL exists but is an \"empty SACL\", meaning fully permissive. If the SACL does not exist, err returns\n// ERROR_OBJECT_NOT_FOUND.\nfunc (sd *SECURITY_DESCRIPTOR) SACL() (sacl *ACL, defaulted bool, err error) {\n\tvar present bool\n\terr = getSecurityDescriptorSacl(sd, &present, &sacl, &defaulted)\n\tif !present {\n\t\terr = ERROR_OBJECT_NOT_FOUND\n\t}\n\treturn\n}\n\n// SetSACL sets the absolute security descriptor SACL.\nfunc (absoluteSD *SECURITY_DESCRIPTOR) SetSACL(sacl *ACL, present, defaulted bool) error {\n\treturn setSecurityDescriptorSacl(absoluteSD, present, sacl, defaulted)\n}\n\n// Owner returns the security descriptor owner and whether it was defaulted.\nfunc (sd *SECURITY_DESCRIPTOR) Owner() (owner *SID, defaulted bool, err error) {\n\terr = getSecurityDescriptorOwner(sd, &owner, &defaulted)\n\treturn\n}\n\n// SetOwner sets the absolute security descriptor owner.\nfunc (absoluteSD *SECURITY_DESCRIPTOR) SetOwner(owner *SID, defaulted bool) error {\n\treturn setSecurityDescriptorOwner(absoluteSD, owner, defaulted)\n}\n\n// Group returns the security descriptor group and whether it was defaulted.\nfunc (sd *SECURITY_DESCRIPTOR) Group() (group *SID, defaulted bool, err error) {\n\terr = getSecurityDescriptorGroup(sd, &group, &defaulted)\n\treturn\n}\n\n// SetGroup sets the absolute security descriptor owner.\nfunc (absoluteSD *SECURITY_DESCRIPTOR) SetGroup(group *SID, defaulted bool) error {\n\treturn setSecurityDescriptorGroup(absoluteSD, group, defaulted)\n}\n\n// Length returns the length of the security descriptor.\nfunc (sd *SECURITY_DESCRIPTOR) Length() uint32 {\n\treturn getSecurityDescriptorLength(sd)\n}\n\n// IsValid returns whether the security descriptor is valid.\nfunc (sd *SECURITY_DESCRIPTOR) IsValid() bool {\n\treturn isValidSecurityDescriptor(sd)\n}\n\n// String returns the SDDL form of the security descriptor, with a function signature that can be\n// used with %v formatting directives.\nfunc (sd *SECURITY_DESCRIPTOR) String() string {\n\tvar sddl *uint16\n\terr := convertSecurityDescriptorToStringSecurityDescriptor(sd, 1, 0xff, &sddl, nil)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(sddl)))\n\treturn UTF16PtrToString(sddl)\n}\n\n// ToAbsolute converts a self-relative security descriptor into an absolute one.\nfunc (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DESCRIPTOR, err error) {\n\tcontrol, _, err := selfRelativeSD.Control()\n\tif err != nil {\n\t\treturn\n\t}\n\tif control&SE_SELF_RELATIVE == 0 {\n\t\terr = ERROR_INVALID_PARAMETER\n\t\treturn\n\t}\n\tvar absoluteSDSize, daclSize, saclSize, ownerSize, groupSize uint32\n\terr = makeAbsoluteSD(selfRelativeSD, nil, &absoluteSDSize,\n\t\tnil, &daclSize, nil, &saclSize, nil, &ownerSize, nil, &groupSize)\n\tswitch err {\n\tcase ERROR_INSUFFICIENT_BUFFER:\n\tcase nil:\n\t\t// makeAbsoluteSD is expected to fail, but it succeeds.\n\t\treturn nil, ERROR_INTERNAL_ERROR\n\tdefault:\n\t\treturn nil, err\n\t}\n\tif absoluteSDSize > 0 {\n\t\tabsoluteSD = new(SECURITY_DESCRIPTOR)\n\t\tif unsafe.Sizeof(*absoluteSD) < uintptr(absoluteSDSize) {\n\t\t\tpanic(\"sizeof(SECURITY_DESCRIPTOR) too small\")\n\t\t}\n\t}\n\tvar (\n\t\tdacl  *ACL\n\t\tsacl  *ACL\n\t\towner *SID\n\t\tgroup *SID\n\t)\n\tif daclSize > 0 {\n\t\tdacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, daclSize))))\n\t}\n\tif saclSize > 0 {\n\t\tsacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, saclSize))))\n\t}\n\tif ownerSize > 0 {\n\t\towner = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, ownerSize))))\n\t}\n\tif groupSize > 0 {\n\t\tgroup = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, groupSize))))\n\t}\n\t// We call into Windows via makeAbsoluteSD, which sets up\n\t// pointers within absoluteSD that point to other chunks of memory\n\t// we pass into makeAbsoluteSD, and that happens outside the view of the GC.\n\t// We therefore take some care here to then verify the pointers are as we expect\n\t// and set them explicitly in view of the GC. See https://go.dev/issue/73199.\n\t// TODO: consider weak pointers once Go 1.24 is appropriate. See suggestion in https://go.dev/cl/663575.\n\terr = makeAbsoluteSD(selfRelativeSD, absoluteSD, &absoluteSDSize,\n\t\tdacl, &daclSize, sacl, &saclSize, owner, &ownerSize, group, &groupSize)\n\tif err != nil {\n\t\t// Don't return absoluteSD, which might be partially initialized.\n\t\treturn nil, err\n\t}\n\t// Before using any fields, verify absoluteSD is in the format we expect according to Windows.\n\t// See https://learn.microsoft.com/en-us/windows/win32/secauthz/absolute-and-self-relative-security-descriptors\n\tabsControl, _, err := absoluteSD.Control()\n\tif err != nil {\n\t\tpanic(\"absoluteSD: \" + err.Error())\n\t}\n\tif absControl&SE_SELF_RELATIVE != 0 {\n\t\tpanic(\"absoluteSD not in absolute format\")\n\t}\n\tif absoluteSD.dacl != dacl {\n\t\tpanic(\"dacl pointer mismatch\")\n\t}\n\tif absoluteSD.sacl != sacl {\n\t\tpanic(\"sacl pointer mismatch\")\n\t}\n\tif absoluteSD.owner != owner {\n\t\tpanic(\"owner pointer mismatch\")\n\t}\n\tif absoluteSD.group != group {\n\t\tpanic(\"group pointer mismatch\")\n\t}\n\tabsoluteSD.dacl = dacl\n\tabsoluteSD.sacl = sacl\n\tabsoluteSD.owner = owner\n\tabsoluteSD.group = group\n\n\treturn\n}\n\n// ToSelfRelative converts an absolute security descriptor into a self-relative one.\nfunc (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURITY_DESCRIPTOR, err error) {\n\tcontrol, _, err := absoluteSD.Control()\n\tif err != nil {\n\t\treturn\n\t}\n\tif control&SE_SELF_RELATIVE != 0 {\n\t\terr = ERROR_INVALID_PARAMETER\n\t\treturn\n\t}\n\tvar selfRelativeSDSize uint32\n\terr = makeSelfRelativeSD(absoluteSD, nil, &selfRelativeSDSize)\n\tswitch err {\n\tcase ERROR_INSUFFICIENT_BUFFER:\n\tcase nil:\n\t\t// makeSelfRelativeSD is expected to fail, but it succeeds.\n\t\treturn nil, ERROR_INTERNAL_ERROR\n\tdefault:\n\t\treturn nil, err\n\t}\n\tif selfRelativeSDSize > 0 {\n\t\tselfRelativeSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, selfRelativeSDSize)[0]))\n\t}\n\terr = makeSelfRelativeSD(absoluteSD, selfRelativeSD, &selfRelativeSDSize)\n\treturn\n}\n\nfunc (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {\n\tsdLen := int(selfRelativeSD.Length())\n\tconst min = int(unsafe.Sizeof(SECURITY_DESCRIPTOR{}))\n\tif sdLen < min {\n\t\tsdLen = min\n\t}\n\n\tsrc := unsafe.Slice((*byte)(unsafe.Pointer(selfRelativeSD)), sdLen)\n\t// SECURITY_DESCRIPTOR has pointers in it, which means checkptr expects for it to\n\t// be aligned properly. When we're copying a Windows-allocated struct to a\n\t// Go-allocated one, make sure that the Go allocation is aligned to the\n\t// pointer size.\n\tconst psize = int(unsafe.Sizeof(uintptr(0)))\n\talloc := make([]uintptr, (sdLen+psize-1)/psize)\n\tdst := unsafe.Slice((*byte)(unsafe.Pointer(&alloc[0])), sdLen)\n\tcopy(dst, src)\n\treturn (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))\n}\n\n// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a\n// self-relative security descriptor object allocated on the Go heap.\nfunc SecurityDescriptorFromString(sddl string) (sd *SECURITY_DESCRIPTOR, err error) {\n\tvar winHeapSD *SECURITY_DESCRIPTOR\n\terr = convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &winHeapSD, nil)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(winHeapSD)))\n\treturn winHeapSD.copySelfRelativeSecurityDescriptor(), nil\n}\n\n// GetSecurityInfo queries the security information for a given handle and returns the self-relative security\n// descriptor result on the Go heap.\nfunc GetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) {\n\tvar winHeapSD *SECURITY_DESCRIPTOR\n\terr = getSecurityInfo(handle, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(winHeapSD)))\n\treturn winHeapSD.copySelfRelativeSecurityDescriptor(), nil\n}\n\n// GetNamedSecurityInfo queries the security information for a given named object and returns the self-relative security\n// descriptor result on the Go heap.\nfunc GetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) {\n\tvar winHeapSD *SECURITY_DESCRIPTOR\n\terr = getNamedSecurityInfo(objectName, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(winHeapSD)))\n\treturn winHeapSD.copySelfRelativeSecurityDescriptor(), nil\n}\n\n// BuildSecurityDescriptor makes a new security descriptor using the input trustees, explicit access lists, and\n// prior security descriptor to be merged, any of which can be nil, returning the self-relative security descriptor\n// result on the Go heap.\nfunc BuildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, accessEntries []EXPLICIT_ACCESS, auditEntries []EXPLICIT_ACCESS, mergedSecurityDescriptor *SECURITY_DESCRIPTOR) (sd *SECURITY_DESCRIPTOR, err error) {\n\tvar winHeapSD *SECURITY_DESCRIPTOR\n\tvar winHeapSDSize uint32\n\tvar firstAccessEntry *EXPLICIT_ACCESS\n\tif len(accessEntries) > 0 {\n\t\tfirstAccessEntry = &accessEntries[0]\n\t}\n\tvar firstAuditEntry *EXPLICIT_ACCESS\n\tif len(auditEntries) > 0 {\n\t\tfirstAuditEntry = &auditEntries[0]\n\t}\n\terr = buildSecurityDescriptor(owner, group, uint32(len(accessEntries)), firstAccessEntry, uint32(len(auditEntries)), firstAuditEntry, mergedSecurityDescriptor, &winHeapSDSize, &winHeapSD)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(winHeapSD)))\n\treturn winHeapSD.copySelfRelativeSecurityDescriptor(), nil\n}\n\n// NewSecurityDescriptor creates and initializes a new absolute security descriptor.\nfunc NewSecurityDescriptor() (absoluteSD *SECURITY_DESCRIPTOR, err error) {\n\tabsoluteSD = &SECURITY_DESCRIPTOR{}\n\terr = initializeSecurityDescriptor(absoluteSD, 1)\n\treturn\n}\n\n// ACLFromEntries returns a new ACL on the Go heap containing a list of explicit entries as well as those of another ACL.\n// Both explicitEntries and mergedACL are optional and can be nil.\nfunc ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL, err error) {\n\tvar firstExplicitEntry *EXPLICIT_ACCESS\n\tif len(explicitEntries) > 0 {\n\t\tfirstExplicitEntry = &explicitEntries[0]\n\t}\n\tvar winHeapACL *ACL\n\terr = setEntriesInAcl(uint32(len(explicitEntries)), firstExplicitEntry, mergedACL, &winHeapACL)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer LocalFree(Handle(unsafe.Pointer(winHeapACL)))\n\taclBytes := make([]byte, winHeapACL.aclSize)\n\tcopy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)])\n\treturn (*ACL)(unsafe.Pointer(&aclBytes[0])), nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/service.go",
    "content": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n\npackage windows\n\nconst (\n\tSC_MANAGER_CONNECT            = 1\n\tSC_MANAGER_CREATE_SERVICE     = 2\n\tSC_MANAGER_ENUMERATE_SERVICE  = 4\n\tSC_MANAGER_LOCK               = 8\n\tSC_MANAGER_QUERY_LOCK_STATUS  = 16\n\tSC_MANAGER_MODIFY_BOOT_CONFIG = 32\n\tSC_MANAGER_ALL_ACCESS         = 0xf003f\n)\n\nconst (\n\tSERVICE_KERNEL_DRIVER       = 1\n\tSERVICE_FILE_SYSTEM_DRIVER  = 2\n\tSERVICE_ADAPTER             = 4\n\tSERVICE_RECOGNIZER_DRIVER   = 8\n\tSERVICE_WIN32_OWN_PROCESS   = 16\n\tSERVICE_WIN32_SHARE_PROCESS = 32\n\tSERVICE_WIN32               = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS\n\tSERVICE_INTERACTIVE_PROCESS = 256\n\tSERVICE_DRIVER              = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER\n\tSERVICE_TYPE_ALL            = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS\n\n\tSERVICE_BOOT_START   = 0\n\tSERVICE_SYSTEM_START = 1\n\tSERVICE_AUTO_START   = 2\n\tSERVICE_DEMAND_START = 3\n\tSERVICE_DISABLED     = 4\n\n\tSERVICE_ERROR_IGNORE   = 0\n\tSERVICE_ERROR_NORMAL   = 1\n\tSERVICE_ERROR_SEVERE   = 2\n\tSERVICE_ERROR_CRITICAL = 3\n\n\tSC_STATUS_PROCESS_INFO = 0\n\n\tSC_ACTION_NONE        = 0\n\tSC_ACTION_RESTART     = 1\n\tSC_ACTION_REBOOT      = 2\n\tSC_ACTION_RUN_COMMAND = 3\n\n\tSERVICE_STOPPED          = 1\n\tSERVICE_START_PENDING    = 2\n\tSERVICE_STOP_PENDING     = 3\n\tSERVICE_RUNNING          = 4\n\tSERVICE_CONTINUE_PENDING = 5\n\tSERVICE_PAUSE_PENDING    = 6\n\tSERVICE_PAUSED           = 7\n\tSERVICE_NO_CHANGE        = 0xffffffff\n\n\tSERVICE_ACCEPT_STOP                  = 1\n\tSERVICE_ACCEPT_PAUSE_CONTINUE        = 2\n\tSERVICE_ACCEPT_SHUTDOWN              = 4\n\tSERVICE_ACCEPT_PARAMCHANGE           = 8\n\tSERVICE_ACCEPT_NETBINDCHANGE         = 16\n\tSERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32\n\tSERVICE_ACCEPT_POWEREVENT            = 64\n\tSERVICE_ACCEPT_SESSIONCHANGE         = 128\n\tSERVICE_ACCEPT_PRESHUTDOWN           = 256\n\n\tSERVICE_CONTROL_STOP                  = 1\n\tSERVICE_CONTROL_PAUSE                 = 2\n\tSERVICE_CONTROL_CONTINUE              = 3\n\tSERVICE_CONTROL_INTERROGATE           = 4\n\tSERVICE_CONTROL_SHUTDOWN              = 5\n\tSERVICE_CONTROL_PARAMCHANGE           = 6\n\tSERVICE_CONTROL_NETBINDADD            = 7\n\tSERVICE_CONTROL_NETBINDREMOVE         = 8\n\tSERVICE_CONTROL_NETBINDENABLE         = 9\n\tSERVICE_CONTROL_NETBINDDISABLE        = 10\n\tSERVICE_CONTROL_DEVICEEVENT           = 11\n\tSERVICE_CONTROL_HARDWAREPROFILECHANGE = 12\n\tSERVICE_CONTROL_POWEREVENT            = 13\n\tSERVICE_CONTROL_SESSIONCHANGE         = 14\n\tSERVICE_CONTROL_PRESHUTDOWN           = 15\n\n\tSERVICE_ACTIVE    = 1\n\tSERVICE_INACTIVE  = 2\n\tSERVICE_STATE_ALL = 3\n\n\tSERVICE_QUERY_CONFIG         = 1\n\tSERVICE_CHANGE_CONFIG        = 2\n\tSERVICE_QUERY_STATUS         = 4\n\tSERVICE_ENUMERATE_DEPENDENTS = 8\n\tSERVICE_START                = 16\n\tSERVICE_STOP                 = 32\n\tSERVICE_PAUSE_CONTINUE       = 64\n\tSERVICE_INTERROGATE          = 128\n\tSERVICE_USER_DEFINED_CONTROL = 256\n\tSERVICE_ALL_ACCESS           = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL\n\n\tSERVICE_RUNS_IN_SYSTEM_PROCESS = 1\n\n\tSERVICE_CONFIG_DESCRIPTION              = 1\n\tSERVICE_CONFIG_FAILURE_ACTIONS          = 2\n\tSERVICE_CONFIG_DELAYED_AUTO_START_INFO  = 3\n\tSERVICE_CONFIG_FAILURE_ACTIONS_FLAG     = 4\n\tSERVICE_CONFIG_SERVICE_SID_INFO         = 5\n\tSERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO = 6\n\tSERVICE_CONFIG_PRESHUTDOWN_INFO         = 7\n\tSERVICE_CONFIG_TRIGGER_INFO             = 8\n\tSERVICE_CONFIG_PREFERRED_NODE           = 9\n\tSERVICE_CONFIG_LAUNCH_PROTECTED         = 12\n\n\tSERVICE_SID_TYPE_NONE         = 0\n\tSERVICE_SID_TYPE_UNRESTRICTED = 1\n\tSERVICE_SID_TYPE_RESTRICTED   = 2 | SERVICE_SID_TYPE_UNRESTRICTED\n\n\tSC_ENUM_PROCESS_INFO = 0\n\n\tSERVICE_NOTIFY_STATUS_CHANGE    = 2\n\tSERVICE_NOTIFY_STOPPED          = 0x00000001\n\tSERVICE_NOTIFY_START_PENDING    = 0x00000002\n\tSERVICE_NOTIFY_STOP_PENDING     = 0x00000004\n\tSERVICE_NOTIFY_RUNNING          = 0x00000008\n\tSERVICE_NOTIFY_CONTINUE_PENDING = 0x00000010\n\tSERVICE_NOTIFY_PAUSE_PENDING    = 0x00000020\n\tSERVICE_NOTIFY_PAUSED           = 0x00000040\n\tSERVICE_NOTIFY_CREATED          = 0x00000080\n\tSERVICE_NOTIFY_DELETED          = 0x00000100\n\tSERVICE_NOTIFY_DELETE_PENDING   = 0x00000200\n\n\tSC_EVENT_DATABASE_CHANGE = 0\n\tSC_EVENT_PROPERTY_CHANGE = 1\n\tSC_EVENT_STATUS_CHANGE   = 2\n\n\tSERVICE_START_REASON_DEMAND             = 0x00000001\n\tSERVICE_START_REASON_AUTO               = 0x00000002\n\tSERVICE_START_REASON_TRIGGER            = 0x00000004\n\tSERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008\n\tSERVICE_START_REASON_DELAYEDAUTO        = 0x00000010\n\n\tSERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1\n)\n\ntype ENUM_SERVICE_STATUS struct {\n\tServiceName   *uint16\n\tDisplayName   *uint16\n\tServiceStatus SERVICE_STATUS\n}\n\ntype SERVICE_STATUS struct {\n\tServiceType             uint32\n\tCurrentState            uint32\n\tControlsAccepted        uint32\n\tWin32ExitCode           uint32\n\tServiceSpecificExitCode uint32\n\tCheckPoint              uint32\n\tWaitHint                uint32\n}\n\ntype SERVICE_TABLE_ENTRY struct {\n\tServiceName *uint16\n\tServiceProc uintptr\n}\n\ntype QUERY_SERVICE_CONFIG struct {\n\tServiceType      uint32\n\tStartType        uint32\n\tErrorControl     uint32\n\tBinaryPathName   *uint16\n\tLoadOrderGroup   *uint16\n\tTagId            uint32\n\tDependencies     *uint16\n\tServiceStartName *uint16\n\tDisplayName      *uint16\n}\n\ntype SERVICE_DESCRIPTION struct {\n\tDescription *uint16\n}\n\ntype SERVICE_DELAYED_AUTO_START_INFO struct {\n\tIsDelayedAutoStartUp uint32\n}\n\ntype SERVICE_STATUS_PROCESS struct {\n\tServiceType             uint32\n\tCurrentState            uint32\n\tControlsAccepted        uint32\n\tWin32ExitCode           uint32\n\tServiceSpecificExitCode uint32\n\tCheckPoint              uint32\n\tWaitHint                uint32\n\tProcessId               uint32\n\tServiceFlags            uint32\n}\n\ntype ENUM_SERVICE_STATUS_PROCESS struct {\n\tServiceName          *uint16\n\tDisplayName          *uint16\n\tServiceStatusProcess SERVICE_STATUS_PROCESS\n}\n\ntype SERVICE_NOTIFY struct {\n\tVersion               uint32\n\tNotifyCallback        uintptr\n\tContext               uintptr\n\tNotificationStatus    uint32\n\tServiceStatus         SERVICE_STATUS_PROCESS\n\tNotificationTriggered uint32\n\tServiceNames          *uint16\n}\n\ntype SERVICE_FAILURE_ACTIONS struct {\n\tResetPeriod  uint32\n\tRebootMsg    *uint16\n\tCommand      *uint16\n\tActionsCount uint32\n\tActions      *SC_ACTION\n}\n\ntype SERVICE_FAILURE_ACTIONS_FLAG struct {\n\tFailureActionsOnNonCrashFailures int32\n}\n\ntype SC_ACTION struct {\n\tType  uint32\n\tDelay uint32\n}\n\ntype QUERY_SERVICE_LOCK_STATUS struct {\n\tIsLocked     uint32\n\tLockOwner    *uint16\n\tLockDuration uint32\n}\n\n//sys\tOpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW\n//sys\tCloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle\n//sys\tCreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW\n//sys\tOpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW\n//sys\tDeleteService(service Handle) (err error) = advapi32.DeleteService\n//sys\tStartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW\n//sys\tQueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus\n//sys\tQueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceLockStatusW\n//sys\tControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService\n//sys\tStartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW\n//sys\tSetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus\n//sys\tChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW\n//sys\tQueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW\n//sys\tChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W\n//sys\tQueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W\n//sys\tEnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW\n//sys\tQueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx\n//sys\tNotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW\n//sys\tSubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?\n//sys\tUnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?\n//sys\tRegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW\n//sys\tQueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?\n//sys\tEnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) = advapi32.EnumDependentServicesW\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/setupapi_windows.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"strings\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// This file contains functions that wrap SetupAPI.dll and CfgMgr32.dll,\n// core system functions for managing hardware devices, drivers, and the PnP tree.\n// Information about these APIs can be found at:\n//     https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi\n//     https://docs.microsoft.com/en-us/windows/win32/devinst/cfgmgr32-\n\nconst (\n\tERROR_EXPECTED_SECTION_NAME                  Errno = 0x20000000 | 0xC0000000 | 0\n\tERROR_BAD_SECTION_NAME_LINE                  Errno = 0x20000000 | 0xC0000000 | 1\n\tERROR_SECTION_NAME_TOO_LONG                  Errno = 0x20000000 | 0xC0000000 | 2\n\tERROR_GENERAL_SYNTAX                         Errno = 0x20000000 | 0xC0000000 | 3\n\tERROR_WRONG_INF_STYLE                        Errno = 0x20000000 | 0xC0000000 | 0x100\n\tERROR_SECTION_NOT_FOUND                      Errno = 0x20000000 | 0xC0000000 | 0x101\n\tERROR_LINE_NOT_FOUND                         Errno = 0x20000000 | 0xC0000000 | 0x102\n\tERROR_NO_BACKUP                              Errno = 0x20000000 | 0xC0000000 | 0x103\n\tERROR_NO_ASSOCIATED_CLASS                    Errno = 0x20000000 | 0xC0000000 | 0x200\n\tERROR_CLASS_MISMATCH                         Errno = 0x20000000 | 0xC0000000 | 0x201\n\tERROR_DUPLICATE_FOUND                        Errno = 0x20000000 | 0xC0000000 | 0x202\n\tERROR_NO_DRIVER_SELECTED                     Errno = 0x20000000 | 0xC0000000 | 0x203\n\tERROR_KEY_DOES_NOT_EXIST                     Errno = 0x20000000 | 0xC0000000 | 0x204\n\tERROR_INVALID_DEVINST_NAME                   Errno = 0x20000000 | 0xC0000000 | 0x205\n\tERROR_INVALID_CLASS                          Errno = 0x20000000 | 0xC0000000 | 0x206\n\tERROR_DEVINST_ALREADY_EXISTS                 Errno = 0x20000000 | 0xC0000000 | 0x207\n\tERROR_DEVINFO_NOT_REGISTERED                 Errno = 0x20000000 | 0xC0000000 | 0x208\n\tERROR_INVALID_REG_PROPERTY                   Errno = 0x20000000 | 0xC0000000 | 0x209\n\tERROR_NO_INF                                 Errno = 0x20000000 | 0xC0000000 | 0x20A\n\tERROR_NO_SUCH_DEVINST                        Errno = 0x20000000 | 0xC0000000 | 0x20B\n\tERROR_CANT_LOAD_CLASS_ICON                   Errno = 0x20000000 | 0xC0000000 | 0x20C\n\tERROR_INVALID_CLASS_INSTALLER                Errno = 0x20000000 | 0xC0000000 | 0x20D\n\tERROR_DI_DO_DEFAULT                          Errno = 0x20000000 | 0xC0000000 | 0x20E\n\tERROR_DI_NOFILECOPY                          Errno = 0x20000000 | 0xC0000000 | 0x20F\n\tERROR_INVALID_HWPROFILE                      Errno = 0x20000000 | 0xC0000000 | 0x210\n\tERROR_NO_DEVICE_SELECTED                     Errno = 0x20000000 | 0xC0000000 | 0x211\n\tERROR_DEVINFO_LIST_LOCKED                    Errno = 0x20000000 | 0xC0000000 | 0x212\n\tERROR_DEVINFO_DATA_LOCKED                    Errno = 0x20000000 | 0xC0000000 | 0x213\n\tERROR_DI_BAD_PATH                            Errno = 0x20000000 | 0xC0000000 | 0x214\n\tERROR_NO_CLASSINSTALL_PARAMS                 Errno = 0x20000000 | 0xC0000000 | 0x215\n\tERROR_FILEQUEUE_LOCKED                       Errno = 0x20000000 | 0xC0000000 | 0x216\n\tERROR_BAD_SERVICE_INSTALLSECT                Errno = 0x20000000 | 0xC0000000 | 0x217\n\tERROR_NO_CLASS_DRIVER_LIST                   Errno = 0x20000000 | 0xC0000000 | 0x218\n\tERROR_NO_ASSOCIATED_SERVICE                  Errno = 0x20000000 | 0xC0000000 | 0x219\n\tERROR_NO_DEFAULT_DEVICE_INTERFACE            Errno = 0x20000000 | 0xC0000000 | 0x21A\n\tERROR_DEVICE_INTERFACE_ACTIVE                Errno = 0x20000000 | 0xC0000000 | 0x21B\n\tERROR_DEVICE_INTERFACE_REMOVED               Errno = 0x20000000 | 0xC0000000 | 0x21C\n\tERROR_BAD_INTERFACE_INSTALLSECT              Errno = 0x20000000 | 0xC0000000 | 0x21D\n\tERROR_NO_SUCH_INTERFACE_CLASS                Errno = 0x20000000 | 0xC0000000 | 0x21E\n\tERROR_INVALID_REFERENCE_STRING               Errno = 0x20000000 | 0xC0000000 | 0x21F\n\tERROR_INVALID_MACHINENAME                    Errno = 0x20000000 | 0xC0000000 | 0x220\n\tERROR_REMOTE_COMM_FAILURE                    Errno = 0x20000000 | 0xC0000000 | 0x221\n\tERROR_MACHINE_UNAVAILABLE                    Errno = 0x20000000 | 0xC0000000 | 0x222\n\tERROR_NO_CONFIGMGR_SERVICES                  Errno = 0x20000000 | 0xC0000000 | 0x223\n\tERROR_INVALID_PROPPAGE_PROVIDER              Errno = 0x20000000 | 0xC0000000 | 0x224\n\tERROR_NO_SUCH_DEVICE_INTERFACE               Errno = 0x20000000 | 0xC0000000 | 0x225\n\tERROR_DI_POSTPROCESSING_REQUIRED             Errno = 0x20000000 | 0xC0000000 | 0x226\n\tERROR_INVALID_COINSTALLER                    Errno = 0x20000000 | 0xC0000000 | 0x227\n\tERROR_NO_COMPAT_DRIVERS                      Errno = 0x20000000 | 0xC0000000 | 0x228\n\tERROR_NO_DEVICE_ICON                         Errno = 0x20000000 | 0xC0000000 | 0x229\n\tERROR_INVALID_INF_LOGCONFIG                  Errno = 0x20000000 | 0xC0000000 | 0x22A\n\tERROR_DI_DONT_INSTALL                        Errno = 0x20000000 | 0xC0000000 | 0x22B\n\tERROR_INVALID_FILTER_DRIVER                  Errno = 0x20000000 | 0xC0000000 | 0x22C\n\tERROR_NON_WINDOWS_NT_DRIVER                  Errno = 0x20000000 | 0xC0000000 | 0x22D\n\tERROR_NON_WINDOWS_DRIVER                     Errno = 0x20000000 | 0xC0000000 | 0x22E\n\tERROR_NO_CATALOG_FOR_OEM_INF                 Errno = 0x20000000 | 0xC0000000 | 0x22F\n\tERROR_DEVINSTALL_QUEUE_NONNATIVE             Errno = 0x20000000 | 0xC0000000 | 0x230\n\tERROR_NOT_DISABLEABLE                        Errno = 0x20000000 | 0xC0000000 | 0x231\n\tERROR_CANT_REMOVE_DEVINST                    Errno = 0x20000000 | 0xC0000000 | 0x232\n\tERROR_INVALID_TARGET                         Errno = 0x20000000 | 0xC0000000 | 0x233\n\tERROR_DRIVER_NONNATIVE                       Errno = 0x20000000 | 0xC0000000 | 0x234\n\tERROR_IN_WOW64                               Errno = 0x20000000 | 0xC0000000 | 0x235\n\tERROR_SET_SYSTEM_RESTORE_POINT               Errno = 0x20000000 | 0xC0000000 | 0x236\n\tERROR_SCE_DISABLED                           Errno = 0x20000000 | 0xC0000000 | 0x238\n\tERROR_UNKNOWN_EXCEPTION                      Errno = 0x20000000 | 0xC0000000 | 0x239\n\tERROR_PNP_REGISTRY_ERROR                     Errno = 0x20000000 | 0xC0000000 | 0x23A\n\tERROR_REMOTE_REQUEST_UNSUPPORTED             Errno = 0x20000000 | 0xC0000000 | 0x23B\n\tERROR_NOT_AN_INSTALLED_OEM_INF               Errno = 0x20000000 | 0xC0000000 | 0x23C\n\tERROR_INF_IN_USE_BY_DEVICES                  Errno = 0x20000000 | 0xC0000000 | 0x23D\n\tERROR_DI_FUNCTION_OBSOLETE                   Errno = 0x20000000 | 0xC0000000 | 0x23E\n\tERROR_NO_AUTHENTICODE_CATALOG                Errno = 0x20000000 | 0xC0000000 | 0x23F\n\tERROR_AUTHENTICODE_DISALLOWED                Errno = 0x20000000 | 0xC0000000 | 0x240\n\tERROR_AUTHENTICODE_TRUSTED_PUBLISHER         Errno = 0x20000000 | 0xC0000000 | 0x241\n\tERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED     Errno = 0x20000000 | 0xC0000000 | 0x242\n\tERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED     Errno = 0x20000000 | 0xC0000000 | 0x243\n\tERROR_SIGNATURE_OSATTRIBUTE_MISMATCH         Errno = 0x20000000 | 0xC0000000 | 0x244\n\tERROR_ONLY_VALIDATE_VIA_AUTHENTICODE         Errno = 0x20000000 | 0xC0000000 | 0x245\n\tERROR_DEVICE_INSTALLER_NOT_READY             Errno = 0x20000000 | 0xC0000000 | 0x246\n\tERROR_DRIVER_STORE_ADD_FAILED                Errno = 0x20000000 | 0xC0000000 | 0x247\n\tERROR_DEVICE_INSTALL_BLOCKED                 Errno = 0x20000000 | 0xC0000000 | 0x248\n\tERROR_DRIVER_INSTALL_BLOCKED                 Errno = 0x20000000 | 0xC0000000 | 0x249\n\tERROR_WRONG_INF_TYPE                         Errno = 0x20000000 | 0xC0000000 | 0x24A\n\tERROR_FILE_HASH_NOT_IN_CATALOG               Errno = 0x20000000 | 0xC0000000 | 0x24B\n\tERROR_DRIVER_STORE_DELETE_FAILED             Errno = 0x20000000 | 0xC0000000 | 0x24C\n\tERROR_UNRECOVERABLE_STACK_OVERFLOW           Errno = 0x20000000 | 0xC0000000 | 0x300\n\tEXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW\n\tERROR_NO_DEFAULT_INTERFACE_DEVICE            Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE\n\tERROR_INTERFACE_DEVICE_ACTIVE                Errno = ERROR_DEVICE_INTERFACE_ACTIVE\n\tERROR_INTERFACE_DEVICE_REMOVED               Errno = ERROR_DEVICE_INTERFACE_REMOVED\n\tERROR_NO_SUCH_INTERFACE_DEVICE               Errno = ERROR_NO_SUCH_DEVICE_INTERFACE\n)\n\nconst (\n\tMAX_DEVICE_ID_LEN   = 200\n\tMAX_DEVNODE_ID_LEN  = MAX_DEVICE_ID_LEN\n\tMAX_GUID_STRING_LEN = 39 // 38 chars + terminator null\n\tMAX_CLASS_NAME_LEN  = 32\n\tMAX_PROFILE_LEN     = 80\n\tMAX_CONFIG_VALUE    = 9999\n\tMAX_INSTANCE_VALUE  = 9999\n\tCONFIGMG_VERSION    = 0x0400\n)\n\n// Maximum string length constants\nconst (\n\tLINE_LEN                    = 256  // Windows 9x-compatible maximum for displayable strings coming from a device INF.\n\tMAX_INF_STRING_LENGTH       = 4096 // Actual maximum size of an INF string (including string substitutions).\n\tMAX_INF_SECTION_NAME_LENGTH = 255  // For Windows 9x compatibility, INF section names should be constrained to 32 characters.\n\tMAX_TITLE_LEN               = 60\n\tMAX_INSTRUCTION_LEN         = 256\n\tMAX_LABEL_LEN               = 30\n\tMAX_SERVICE_NAME_LEN        = 256\n\tMAX_SUBTITLE_LEN            = 256\n)\n\nconst (\n\t// SP_MAX_MACHINENAME_LENGTH defines maximum length of a machine name in the format expected by ConfigMgr32 CM_Connect_Machine (i.e., \"\\\\\\\\MachineName\\0\").\n\tSP_MAX_MACHINENAME_LENGTH = MAX_PATH + 3\n)\n\n// HSPFILEQ is type for setup file queue\ntype HSPFILEQ uintptr\n\n// DevInfo holds reference to device information set\ntype DevInfo Handle\n\n// DEVINST is a handle usually recognized by cfgmgr32 APIs\ntype DEVINST uint32\n\n// DevInfoData is a device information structure (references a device instance that is a member of a device information set)\ntype DevInfoData struct {\n\tsize      uint32\n\tClassGUID GUID\n\tDevInst   DEVINST\n\t_         uintptr\n}\n\n// DevInfoListDetailData is a structure for detailed information on a device information set (used for SetupDiGetDeviceInfoListDetail which supersedes the functionality of SetupDiGetDeviceInfoListClass).\ntype DevInfoListDetailData struct {\n\tsize                uint32 // Use unsafeSizeOf method\n\tClassGUID           GUID\n\tRemoteMachineHandle Handle\n\tremoteMachineName   [SP_MAX_MACHINENAME_LENGTH]uint16\n}\n\nfunc (*DevInfoListDetailData) unsafeSizeOf() uint32 {\n\tif unsafe.Sizeof(uintptr(0)) == 4 {\n\t\t// Windows declares this with pshpack1.h\n\t\treturn uint32(unsafe.Offsetof(DevInfoListDetailData{}.remoteMachineName) + unsafe.Sizeof(DevInfoListDetailData{}.remoteMachineName))\n\t}\n\treturn uint32(unsafe.Sizeof(DevInfoListDetailData{}))\n}\n\nfunc (data *DevInfoListDetailData) RemoteMachineName() string {\n\treturn UTF16ToString(data.remoteMachineName[:])\n}\n\nfunc (data *DevInfoListDetailData) SetRemoteMachineName(remoteMachineName string) error {\n\tstr, err := UTF16FromString(remoteMachineName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(data.remoteMachineName[:], str)\n\treturn nil\n}\n\n// DI_FUNCTION is function type for device installer\ntype DI_FUNCTION uint32\n\nconst (\n\tDIF_SELECTDEVICE                   DI_FUNCTION = 0x00000001\n\tDIF_INSTALLDEVICE                  DI_FUNCTION = 0x00000002\n\tDIF_ASSIGNRESOURCES                DI_FUNCTION = 0x00000003\n\tDIF_PROPERTIES                     DI_FUNCTION = 0x00000004\n\tDIF_REMOVE                         DI_FUNCTION = 0x00000005\n\tDIF_FIRSTTIMESETUP                 DI_FUNCTION = 0x00000006\n\tDIF_FOUNDDEVICE                    DI_FUNCTION = 0x00000007\n\tDIF_SELECTCLASSDRIVERS             DI_FUNCTION = 0x00000008\n\tDIF_VALIDATECLASSDRIVERS           DI_FUNCTION = 0x00000009\n\tDIF_INSTALLCLASSDRIVERS            DI_FUNCTION = 0x0000000A\n\tDIF_CALCDISKSPACE                  DI_FUNCTION = 0x0000000B\n\tDIF_DESTROYPRIVATEDATA             DI_FUNCTION = 0x0000000C\n\tDIF_VALIDATEDRIVER                 DI_FUNCTION = 0x0000000D\n\tDIF_DETECT                         DI_FUNCTION = 0x0000000F\n\tDIF_INSTALLWIZARD                  DI_FUNCTION = 0x00000010\n\tDIF_DESTROYWIZARDDATA              DI_FUNCTION = 0x00000011\n\tDIF_PROPERTYCHANGE                 DI_FUNCTION = 0x00000012\n\tDIF_ENABLECLASS                    DI_FUNCTION = 0x00000013\n\tDIF_DETECTVERIFY                   DI_FUNCTION = 0x00000014\n\tDIF_INSTALLDEVICEFILES             DI_FUNCTION = 0x00000015\n\tDIF_UNREMOVE                       DI_FUNCTION = 0x00000016\n\tDIF_SELECTBESTCOMPATDRV            DI_FUNCTION = 0x00000017\n\tDIF_ALLOW_INSTALL                  DI_FUNCTION = 0x00000018\n\tDIF_REGISTERDEVICE                 DI_FUNCTION = 0x00000019\n\tDIF_NEWDEVICEWIZARD_PRESELECT      DI_FUNCTION = 0x0000001A\n\tDIF_NEWDEVICEWIZARD_SELECT         DI_FUNCTION = 0x0000001B\n\tDIF_NEWDEVICEWIZARD_PREANALYZE     DI_FUNCTION = 0x0000001C\n\tDIF_NEWDEVICEWIZARD_POSTANALYZE    DI_FUNCTION = 0x0000001D\n\tDIF_NEWDEVICEWIZARD_FINISHINSTALL  DI_FUNCTION = 0x0000001E\n\tDIF_INSTALLINTERFACES              DI_FUNCTION = 0x00000020\n\tDIF_DETECTCANCEL                   DI_FUNCTION = 0x00000021\n\tDIF_REGISTER_COINSTALLERS          DI_FUNCTION = 0x00000022\n\tDIF_ADDPROPERTYPAGE_ADVANCED       DI_FUNCTION = 0x00000023\n\tDIF_ADDPROPERTYPAGE_BASIC          DI_FUNCTION = 0x00000024\n\tDIF_TROUBLESHOOTER                 DI_FUNCTION = 0x00000026\n\tDIF_POWERMESSAGEWAKE               DI_FUNCTION = 0x00000027\n\tDIF_ADDREMOTEPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000028\n\tDIF_UPDATEDRIVER_UI                DI_FUNCTION = 0x00000029\n\tDIF_FINISHINSTALL_ACTION           DI_FUNCTION = 0x0000002A\n)\n\n// DevInstallParams is device installation parameters structure (associated with a particular device information element, or globally with a device information set)\ntype DevInstallParams struct {\n\tsize                     uint32\n\tFlags                    DI_FLAGS\n\tFlagsEx                  DI_FLAGSEX\n\thwndParent               uintptr\n\tInstallMsgHandler        uintptr\n\tInstallMsgHandlerContext uintptr\n\tFileQueue                HSPFILEQ\n\t_                        uintptr\n\t_                        uint32\n\tdriverPath               [MAX_PATH]uint16\n}\n\nfunc (params *DevInstallParams) DriverPath() string {\n\treturn UTF16ToString(params.driverPath[:])\n}\n\nfunc (params *DevInstallParams) SetDriverPath(driverPath string) error {\n\tstr, err := UTF16FromString(driverPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(params.driverPath[:], str)\n\treturn nil\n}\n\n// DI_FLAGS is SP_DEVINSTALL_PARAMS.Flags values\ntype DI_FLAGS uint32\n\nconst (\n\t// Flags for choosing a device\n\tDI_SHOWOEM       DI_FLAGS = 0x00000001 // support Other... button\n\tDI_SHOWCOMPAT    DI_FLAGS = 0x00000002 // show compatibility list\n\tDI_SHOWCLASS     DI_FLAGS = 0x00000004 // show class list\n\tDI_SHOWALL       DI_FLAGS = 0x00000007 // both class & compat list shown\n\tDI_NOVCP         DI_FLAGS = 0x00000008 // don't create a new copy queue--use caller-supplied FileQueue\n\tDI_DIDCOMPAT     DI_FLAGS = 0x00000010 // Searched for compatible devices\n\tDI_DIDCLASS      DI_FLAGS = 0x00000020 // Searched for class devices\n\tDI_AUTOASSIGNRES DI_FLAGS = 0x00000040 // No UI for resources if possible\n\n\t// Flags returned by DiInstallDevice to indicate need to reboot/restart\n\tDI_NEEDRESTART DI_FLAGS = 0x00000080 // Reboot required to take effect\n\tDI_NEEDREBOOT  DI_FLAGS = 0x00000100 // \"\"\n\n\t// Flags for device installation\n\tDI_NOBROWSE DI_FLAGS = 0x00000200 // no Browse... in InsertDisk\n\n\t// Flags set by DiBuildDriverInfoList\n\tDI_MULTMFGS DI_FLAGS = 0x00000400 // Set if multiple manufacturers in class driver list\n\n\t// Flag indicates that device is disabled\n\tDI_DISABLED DI_FLAGS = 0x00000800 // Set if device disabled\n\n\t// Flags for Device/Class Properties\n\tDI_GENERALPAGE_ADDED  DI_FLAGS = 0x00001000\n\tDI_RESOURCEPAGE_ADDED DI_FLAGS = 0x00002000\n\n\t// Flag to indicate the setting properties for this Device (or class) caused a change so the Dev Mgr UI probably needs to be updated.\n\tDI_PROPERTIES_CHANGE DI_FLAGS = 0x00004000\n\n\t// Flag to indicate that the sorting from the INF file should be used.\n\tDI_INF_IS_SORTED DI_FLAGS = 0x00008000\n\n\t// Flag to indicate that only the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.\n\tDI_ENUMSINGLEINF DI_FLAGS = 0x00010000\n\n\t// Flag that prevents ConfigMgr from removing/re-enumerating devices during device\n\t// registration, installation, and deletion.\n\tDI_DONOTCALLCONFIGMG DI_FLAGS = 0x00020000\n\n\t// The following flag can be used to install a device disabled\n\tDI_INSTALLDISABLED DI_FLAGS = 0x00040000\n\n\t// Flag that causes SetupDiBuildDriverInfoList to build a device's compatible driver\n\t// list from its existing class driver list, instead of the normal INF search.\n\tDI_COMPAT_FROM_CLASS DI_FLAGS = 0x00080000\n\n\t// This flag is set if the Class Install params should be used.\n\tDI_CLASSINSTALLPARAMS DI_FLAGS = 0x00100000\n\n\t// This flag is set if the caller of DiCallClassInstaller does NOT want the internal default action performed if the Class installer returns ERROR_DI_DO_DEFAULT.\n\tDI_NODI_DEFAULTACTION DI_FLAGS = 0x00200000\n\n\t// Flags for device installation\n\tDI_QUIETINSTALL        DI_FLAGS = 0x00800000 // don't confuse the user with questions or excess info\n\tDI_NOFILECOPY          DI_FLAGS = 0x01000000 // No file Copy necessary\n\tDI_FORCECOPY           DI_FLAGS = 0x02000000 // Force files to be copied from install path\n\tDI_DRIVERPAGE_ADDED    DI_FLAGS = 0x04000000 // Prop provider added Driver page.\n\tDI_USECI_SELECTSTRINGS DI_FLAGS = 0x08000000 // Use Class Installer Provided strings in the Select Device Dlg\n\tDI_OVERRIDE_INFFLAGS   DI_FLAGS = 0x10000000 // Override INF flags\n\tDI_PROPS_NOCHANGEUSAGE DI_FLAGS = 0x20000000 // No Enable/Disable in General Props\n\n\tDI_NOSELECTICONS DI_FLAGS = 0x40000000 // No small icons in select device dialogs\n\n\tDI_NOWRITE_IDS DI_FLAGS = 0x80000000 // Don't write HW & Compat IDs on install\n)\n\n// DI_FLAGSEX is SP_DEVINSTALL_PARAMS.FlagsEx values\ntype DI_FLAGSEX uint32\n\nconst (\n\tDI_FLAGSEX_CI_FAILED                DI_FLAGSEX = 0x00000004 // Failed to Load/Call class installer\n\tDI_FLAGSEX_FINISHINSTALL_ACTION     DI_FLAGSEX = 0x00000008 // Class/co-installer wants to get a DIF_FINISH_INSTALL action in client context.\n\tDI_FLAGSEX_DIDINFOLIST              DI_FLAGSEX = 0x00000010 // Did the Class Info List\n\tDI_FLAGSEX_DIDCOMPATINFO            DI_FLAGSEX = 0x00000020 // Did the Compat Info List\n\tDI_FLAGSEX_FILTERCLASSES            DI_FLAGSEX = 0x00000040\n\tDI_FLAGSEX_SETFAILEDINSTALL         DI_FLAGSEX = 0x00000080\n\tDI_FLAGSEX_DEVICECHANGE             DI_FLAGSEX = 0x00000100\n\tDI_FLAGSEX_ALWAYSWRITEIDS           DI_FLAGSEX = 0x00000200\n\tDI_FLAGSEX_PROPCHANGE_PENDING       DI_FLAGSEX = 0x00000400 // One or more device property sheets have had changes made to them, and need to have a DIF_PROPERTYCHANGE occur.\n\tDI_FLAGSEX_ALLOWEXCLUDEDDRVS        DI_FLAGSEX = 0x00000800\n\tDI_FLAGSEX_NOUIONQUERYREMOVE        DI_FLAGSEX = 0x00001000\n\tDI_FLAGSEX_USECLASSFORCOMPAT        DI_FLAGSEX = 0x00002000 // Use the device's class when building compat drv list. (Ignored if DI_COMPAT_FROM_CLASS flag is specified.)\n\tDI_FLAGSEX_NO_DRVREG_MODIFY         DI_FLAGSEX = 0x00008000 // Don't run AddReg and DelReg for device's software (driver) key.\n\tDI_FLAGSEX_IN_SYSTEM_SETUP          DI_FLAGSEX = 0x00010000 // Installation is occurring during initial system setup.\n\tDI_FLAGSEX_INET_DRIVER              DI_FLAGSEX = 0x00020000 // Driver came from Windows Update\n\tDI_FLAGSEX_APPENDDRIVERLIST         DI_FLAGSEX = 0x00040000 // Cause SetupDiBuildDriverInfoList to append a new driver list to an existing list.\n\tDI_FLAGSEX_PREINSTALLBACKUP         DI_FLAGSEX = 0x00080000 // not used\n\tDI_FLAGSEX_BACKUPONREPLACE          DI_FLAGSEX = 0x00100000 // not used\n\tDI_FLAGSEX_DRIVERLIST_FROM_URL      DI_FLAGSEX = 0x00200000 // build driver list from INF(s) retrieved from URL specified in SP_DEVINSTALL_PARAMS.DriverPath (empty string means Windows Update website)\n\tDI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS DI_FLAGSEX = 0x00800000 // Don't include old Internet drivers when building a driver list. Ignored on Windows Vista and later.\n\tDI_FLAGSEX_POWERPAGE_ADDED          DI_FLAGSEX = 0x01000000 // class installer added their own power page\n\tDI_FLAGSEX_FILTERSIMILARDRIVERS     DI_FLAGSEX = 0x02000000 // only include similar drivers in class list\n\tDI_FLAGSEX_INSTALLEDDRIVER          DI_FLAGSEX = 0x04000000 // only add the installed driver to the class or compat driver list.  Used in calls to SetupDiBuildDriverInfoList\n\tDI_FLAGSEX_NO_CLASSLIST_NODE_MERGE  DI_FLAGSEX = 0x08000000 // Don't remove identical driver nodes from the class list\n\tDI_FLAGSEX_ALTPLATFORM_DRVSEARCH    DI_FLAGSEX = 0x10000000 // Build driver list based on alternate platform information specified in associated file queue\n\tDI_FLAGSEX_RESTART_DEVICE_ONLY      DI_FLAGSEX = 0x20000000 // only restart the device drivers are being installed on as opposed to restarting all devices using those drivers.\n\tDI_FLAGSEX_RECURSIVESEARCH          DI_FLAGSEX = 0x40000000 // Tell SetupDiBuildDriverInfoList to do a recursive search\n\tDI_FLAGSEX_SEARCH_PUBLISHED_INFS    DI_FLAGSEX = 0x80000000 // Tell SetupDiBuildDriverInfoList to do a \"published INF\" search\n)\n\n// ClassInstallHeader is the first member of any class install parameters structure. It contains the device installation request code that defines the format of the rest of the install parameters structure.\ntype ClassInstallHeader struct {\n\tsize            uint32\n\tInstallFunction DI_FUNCTION\n}\n\nfunc MakeClassInstallHeader(installFunction DI_FUNCTION) *ClassInstallHeader {\n\thdr := &ClassInstallHeader{InstallFunction: installFunction}\n\thdr.size = uint32(unsafe.Sizeof(*hdr))\n\treturn hdr\n}\n\n// DICS_STATE specifies values indicating a change in a device's state\ntype DICS_STATE uint32\n\nconst (\n\tDICS_ENABLE     DICS_STATE = 0x00000001 // The device is being enabled.\n\tDICS_DISABLE    DICS_STATE = 0x00000002 // The device is being disabled.\n\tDICS_PROPCHANGE DICS_STATE = 0x00000003 // The properties of the device have changed.\n\tDICS_START      DICS_STATE = 0x00000004 // The device is being started (if the request is for the currently active hardware profile).\n\tDICS_STOP       DICS_STATE = 0x00000005 // The device is being stopped. The driver stack will be unloaded and the CSCONFIGFLAG_DO_NOT_START flag will be set for the device.\n)\n\n// DICS_FLAG specifies the scope of a device property change\ntype DICS_FLAG uint32\n\nconst (\n\tDICS_FLAG_GLOBAL         DICS_FLAG = 0x00000001 // make change in all hardware profiles\n\tDICS_FLAG_CONFIGSPECIFIC DICS_FLAG = 0x00000002 // make change in specified profile only\n\tDICS_FLAG_CONFIGGENERAL  DICS_FLAG = 0x00000004 // 1 or more hardware profile-specific changes to follow (obsolete)\n)\n\n// PropChangeParams is a structure corresponding to a DIF_PROPERTYCHANGE install function.\ntype PropChangeParams struct {\n\tClassInstallHeader ClassInstallHeader\n\tStateChange        DICS_STATE\n\tScope              DICS_FLAG\n\tHwProfile          uint32\n}\n\n// DI_REMOVEDEVICE specifies the scope of the device removal\ntype DI_REMOVEDEVICE uint32\n\nconst (\n\tDI_REMOVEDEVICE_GLOBAL         DI_REMOVEDEVICE = 0x00000001 // Make this change in all hardware profiles. Remove information about the device from the registry.\n\tDI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal.\n)\n\n// RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function.\ntype RemoveDeviceParams struct {\n\tClassInstallHeader ClassInstallHeader\n\tScope              DI_REMOVEDEVICE\n\tHwProfile          uint32\n}\n\n// DrvInfoData is driver information structure (member of a driver info list that may be associated with a particular device instance, or (globally) with a device information set)\ntype DrvInfoData struct {\n\tsize          uint32\n\tDriverType    uint32\n\t_             uintptr\n\tdescription   [LINE_LEN]uint16\n\tmfgName       [LINE_LEN]uint16\n\tproviderName  [LINE_LEN]uint16\n\tDriverDate    Filetime\n\tDriverVersion uint64\n}\n\nfunc (data *DrvInfoData) Description() string {\n\treturn UTF16ToString(data.description[:])\n}\n\nfunc (data *DrvInfoData) SetDescription(description string) error {\n\tstr, err := UTF16FromString(description)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(data.description[:], str)\n\treturn nil\n}\n\nfunc (data *DrvInfoData) MfgName() string {\n\treturn UTF16ToString(data.mfgName[:])\n}\n\nfunc (data *DrvInfoData) SetMfgName(mfgName string) error {\n\tstr, err := UTF16FromString(mfgName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(data.mfgName[:], str)\n\treturn nil\n}\n\nfunc (data *DrvInfoData) ProviderName() string {\n\treturn UTF16ToString(data.providerName[:])\n}\n\nfunc (data *DrvInfoData) SetProviderName(providerName string) error {\n\tstr, err := UTF16FromString(providerName)\n\tif err != nil {\n\t\treturn err\n\t}\n\tcopy(data.providerName[:], str)\n\treturn nil\n}\n\n// IsNewer method returns true if DrvInfoData date and version is newer than supplied parameters.\nfunc (data *DrvInfoData) IsNewer(driverDate Filetime, driverVersion uint64) bool {\n\tif data.DriverDate.HighDateTime > driverDate.HighDateTime {\n\t\treturn true\n\t}\n\tif data.DriverDate.HighDateTime < driverDate.HighDateTime {\n\t\treturn false\n\t}\n\n\tif data.DriverDate.LowDateTime > driverDate.LowDateTime {\n\t\treturn true\n\t}\n\tif data.DriverDate.LowDateTime < driverDate.LowDateTime {\n\t\treturn false\n\t}\n\n\tif data.DriverVersion > driverVersion {\n\t\treturn true\n\t}\n\tif data.DriverVersion < driverVersion {\n\t\treturn false\n\t}\n\n\treturn false\n}\n\n// DrvInfoDetailData is driver information details structure (provides detailed information about a particular driver information structure)\ntype DrvInfoDetailData struct {\n\tsize            uint32 // Use unsafeSizeOf method\n\tInfDate         Filetime\n\tcompatIDsOffset uint32\n\tcompatIDsLength uint32\n\t_               uintptr\n\tsectionName     [LINE_LEN]uint16\n\tinfFileName     [MAX_PATH]uint16\n\tdrvDescription  [LINE_LEN]uint16\n\thardwareID      [1]uint16\n}\n\nfunc (*DrvInfoDetailData) unsafeSizeOf() uint32 {\n\tif unsafe.Sizeof(uintptr(0)) == 4 {\n\t\t// Windows declares this with pshpack1.h\n\t\treturn uint32(unsafe.Offsetof(DrvInfoDetailData{}.hardwareID) + unsafe.Sizeof(DrvInfoDetailData{}.hardwareID))\n\t}\n\treturn uint32(unsafe.Sizeof(DrvInfoDetailData{}))\n}\n\nfunc (data *DrvInfoDetailData) SectionName() string {\n\treturn UTF16ToString(data.sectionName[:])\n}\n\nfunc (data *DrvInfoDetailData) InfFileName() string {\n\treturn UTF16ToString(data.infFileName[:])\n}\n\nfunc (data *DrvInfoDetailData) DrvDescription() string {\n\treturn UTF16ToString(data.drvDescription[:])\n}\n\nfunc (data *DrvInfoDetailData) HardwareID() string {\n\tif data.compatIDsOffset > 1 {\n\t\tbufW := data.getBuf()\n\t\treturn UTF16ToString(bufW[:wcslen(bufW)])\n\t}\n\n\treturn \"\"\n}\n\nfunc (data *DrvInfoDetailData) CompatIDs() []string {\n\ta := make([]string, 0)\n\n\tif data.compatIDsLength > 0 {\n\t\tbufW := data.getBuf()\n\t\tbufW = bufW[data.compatIDsOffset : data.compatIDsOffset+data.compatIDsLength]\n\t\tfor i := 0; i < len(bufW); {\n\t\t\tj := i + wcslen(bufW[i:])\n\t\t\tif i < j {\n\t\t\t\ta = append(a, UTF16ToString(bufW[i:j]))\n\t\t\t}\n\t\t\ti = j + 1\n\t\t}\n\t}\n\n\treturn a\n}\n\nfunc (data *DrvInfoDetailData) getBuf() []uint16 {\n\tlen := (data.size - uint32(unsafe.Offsetof(data.hardwareID))) / 2\n\tsl := struct {\n\t\taddr *uint16\n\t\tlen  int\n\t\tcap  int\n\t}{&data.hardwareID[0], int(len), int(len)}\n\treturn *(*[]uint16)(unsafe.Pointer(&sl))\n}\n\n// IsCompatible method tests if given hardware ID matches the driver or is listed on the compatible ID list.\nfunc (data *DrvInfoDetailData) IsCompatible(hwid string) bool {\n\thwidLC := strings.ToLower(hwid)\n\tif strings.ToLower(data.HardwareID()) == hwidLC {\n\t\treturn true\n\t}\n\ta := data.CompatIDs()\n\tfor i := range a {\n\t\tif strings.ToLower(a[i]) == hwidLC {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\n// DICD flags control SetupDiCreateDeviceInfo\ntype DICD uint32\n\nconst (\n\tDICD_GENERATE_ID       DICD = 0x00000001\n\tDICD_INHERIT_CLASSDRVS DICD = 0x00000002\n)\n\n// SUOI flags control SetupUninstallOEMInf\ntype SUOI uint32\n\nconst (\n\tSUOI_FORCEDELETE SUOI = 0x0001\n)\n\n// SPDIT flags to distinguish between class drivers and\n// device drivers. (Passed in 'DriverType' parameter of\n// driver information list APIs)\ntype SPDIT uint32\n\nconst (\n\tSPDIT_NODRIVER     SPDIT = 0x00000000\n\tSPDIT_CLASSDRIVER  SPDIT = 0x00000001\n\tSPDIT_COMPATDRIVER SPDIT = 0x00000002\n)\n\n// DIGCF flags control what is included in the device information set built by SetupDiGetClassDevs\ntype DIGCF uint32\n\nconst (\n\tDIGCF_DEFAULT         DIGCF = 0x00000001 // only valid with DIGCF_DEVICEINTERFACE\n\tDIGCF_PRESENT         DIGCF = 0x00000002\n\tDIGCF_ALLCLASSES      DIGCF = 0x00000004\n\tDIGCF_PROFILE         DIGCF = 0x00000008\n\tDIGCF_DEVICEINTERFACE DIGCF = 0x00000010\n)\n\n// DIREG specifies values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and SetupDiDeleteDevRegKey.\ntype DIREG uint32\n\nconst (\n\tDIREG_DEV  DIREG = 0x00000001 // Open/Create/Delete device key\n\tDIREG_DRV  DIREG = 0x00000002 // Open/Create/Delete driver key\n\tDIREG_BOTH DIREG = 0x00000004 // Delete both driver and Device key\n)\n\n// SPDRP specifies device registry property codes\n// (Codes marked as read-only (R) may only be used for\n// SetupDiGetDeviceRegistryProperty)\n//\n// These values should cover the same set of registry properties\n// as defined by the CM_DRP codes in cfgmgr32.h.\n//\n// Note that SPDRP codes are zero based while CM_DRP codes are one based!\ntype SPDRP uint32\n\nconst (\n\tSPDRP_DEVICEDESC                  SPDRP = 0x00000000 // DeviceDesc (R/W)\n\tSPDRP_HARDWAREID                  SPDRP = 0x00000001 // HardwareID (R/W)\n\tSPDRP_COMPATIBLEIDS               SPDRP = 0x00000002 // CompatibleIDs (R/W)\n\tSPDRP_SERVICE                     SPDRP = 0x00000004 // Service (R/W)\n\tSPDRP_CLASS                       SPDRP = 0x00000007 // Class (R--tied to ClassGUID)\n\tSPDRP_CLASSGUID                   SPDRP = 0x00000008 // ClassGUID (R/W)\n\tSPDRP_DRIVER                      SPDRP = 0x00000009 // Driver (R/W)\n\tSPDRP_CONFIGFLAGS                 SPDRP = 0x0000000A // ConfigFlags (R/W)\n\tSPDRP_MFG                         SPDRP = 0x0000000B // Mfg (R/W)\n\tSPDRP_FRIENDLYNAME                SPDRP = 0x0000000C // FriendlyName (R/W)\n\tSPDRP_LOCATION_INFORMATION        SPDRP = 0x0000000D // LocationInformation (R/W)\n\tSPDRP_PHYSICAL_DEVICE_OBJECT_NAME SPDRP = 0x0000000E // PhysicalDeviceObjectName (R)\n\tSPDRP_CAPABILITIES                SPDRP = 0x0000000F // Capabilities (R)\n\tSPDRP_UI_NUMBER                   SPDRP = 0x00000010 // UiNumber (R)\n\tSPDRP_UPPERFILTERS                SPDRP = 0x00000011 // UpperFilters (R/W)\n\tSPDRP_LOWERFILTERS                SPDRP = 0x00000012 // LowerFilters (R/W)\n\tSPDRP_BUSTYPEGUID                 SPDRP = 0x00000013 // BusTypeGUID (R)\n\tSPDRP_LEGACYBUSTYPE               SPDRP = 0x00000014 // LegacyBusType (R)\n\tSPDRP_BUSNUMBER                   SPDRP = 0x00000015 // BusNumber (R)\n\tSPDRP_ENUMERATOR_NAME             SPDRP = 0x00000016 // Enumerator Name (R)\n\tSPDRP_SECURITY                    SPDRP = 0x00000017 // Security (R/W, binary form)\n\tSPDRP_SECURITY_SDS                SPDRP = 0x00000018 // Security (W, SDS form)\n\tSPDRP_DEVTYPE                     SPDRP = 0x00000019 // Device Type (R/W)\n\tSPDRP_EXCLUSIVE                   SPDRP = 0x0000001A // Device is exclusive-access (R/W)\n\tSPDRP_CHARACTERISTICS             SPDRP = 0x0000001B // Device Characteristics (R/W)\n\tSPDRP_ADDRESS                     SPDRP = 0x0000001C // Device Address (R)\n\tSPDRP_UI_NUMBER_DESC_FORMAT       SPDRP = 0x0000001D // UiNumberDescFormat (R/W)\n\tSPDRP_DEVICE_POWER_DATA           SPDRP = 0x0000001E // Device Power Data (R)\n\tSPDRP_REMOVAL_POLICY              SPDRP = 0x0000001F // Removal Policy (R)\n\tSPDRP_REMOVAL_POLICY_HW_DEFAULT   SPDRP = 0x00000020 // Hardware Removal Policy (R)\n\tSPDRP_REMOVAL_POLICY_OVERRIDE     SPDRP = 0x00000021 // Removal Policy Override (RW)\n\tSPDRP_INSTALL_STATE               SPDRP = 0x00000022 // Device Install State (R)\n\tSPDRP_LOCATION_PATHS              SPDRP = 0x00000023 // Device Location Paths (R)\n\tSPDRP_BASE_CONTAINERID            SPDRP = 0x00000024 // Base ContainerID (R)\n\n\tSPDRP_MAXIMUM_PROPERTY SPDRP = 0x00000025 // Upper bound on ordinals\n)\n\n// DEVPROPTYPE represents the property-data-type identifier that specifies the\n// data type of a device property value in the unified device property model.\ntype DEVPROPTYPE uint32\n\nconst (\n\tDEVPROP_TYPEMOD_ARRAY DEVPROPTYPE = 0x00001000\n\tDEVPROP_TYPEMOD_LIST  DEVPROPTYPE = 0x00002000\n\n\tDEVPROP_TYPE_EMPTY                      DEVPROPTYPE = 0x00000000\n\tDEVPROP_TYPE_NULL                       DEVPROPTYPE = 0x00000001\n\tDEVPROP_TYPE_SBYTE                      DEVPROPTYPE = 0x00000002\n\tDEVPROP_TYPE_BYTE                       DEVPROPTYPE = 0x00000003\n\tDEVPROP_TYPE_INT16                      DEVPROPTYPE = 0x00000004\n\tDEVPROP_TYPE_UINT16                     DEVPROPTYPE = 0x00000005\n\tDEVPROP_TYPE_INT32                      DEVPROPTYPE = 0x00000006\n\tDEVPROP_TYPE_UINT32                     DEVPROPTYPE = 0x00000007\n\tDEVPROP_TYPE_INT64                      DEVPROPTYPE = 0x00000008\n\tDEVPROP_TYPE_UINT64                     DEVPROPTYPE = 0x00000009\n\tDEVPROP_TYPE_FLOAT                      DEVPROPTYPE = 0x0000000A\n\tDEVPROP_TYPE_DOUBLE                     DEVPROPTYPE = 0x0000000B\n\tDEVPROP_TYPE_DECIMAL                    DEVPROPTYPE = 0x0000000C\n\tDEVPROP_TYPE_GUID                       DEVPROPTYPE = 0x0000000D\n\tDEVPROP_TYPE_CURRENCY                   DEVPROPTYPE = 0x0000000E\n\tDEVPROP_TYPE_DATE                       DEVPROPTYPE = 0x0000000F\n\tDEVPROP_TYPE_FILETIME                   DEVPROPTYPE = 0x00000010\n\tDEVPROP_TYPE_BOOLEAN                    DEVPROPTYPE = 0x00000011\n\tDEVPROP_TYPE_STRING                     DEVPROPTYPE = 0x00000012\n\tDEVPROP_TYPE_STRING_LIST                DEVPROPTYPE = DEVPROP_TYPE_STRING | DEVPROP_TYPEMOD_LIST\n\tDEVPROP_TYPE_SECURITY_DESCRIPTOR        DEVPROPTYPE = 0x00000013\n\tDEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING DEVPROPTYPE = 0x00000014\n\tDEVPROP_TYPE_DEVPROPKEY                 DEVPROPTYPE = 0x00000015\n\tDEVPROP_TYPE_DEVPROPTYPE                DEVPROPTYPE = 0x00000016\n\tDEVPROP_TYPE_BINARY                     DEVPROPTYPE = DEVPROP_TYPE_BYTE | DEVPROP_TYPEMOD_ARRAY\n\tDEVPROP_TYPE_ERROR                      DEVPROPTYPE = 0x00000017\n\tDEVPROP_TYPE_NTSTATUS                   DEVPROPTYPE = 0x00000018\n\tDEVPROP_TYPE_STRING_INDIRECT            DEVPROPTYPE = 0x00000019\n\n\tMAX_DEVPROP_TYPE    DEVPROPTYPE = 0x00000019\n\tMAX_DEVPROP_TYPEMOD DEVPROPTYPE = 0x00002000\n\n\tDEVPROP_MASK_TYPE    DEVPROPTYPE = 0x00000FFF\n\tDEVPROP_MASK_TYPEMOD DEVPROPTYPE = 0x0000F000\n)\n\n// DEVPROPGUID specifies a property category.\ntype DEVPROPGUID GUID\n\n// DEVPROPID uniquely identifies the property within the property category.\ntype DEVPROPID uint32\n\nconst DEVPROPID_FIRST_USABLE DEVPROPID = 2\n\n// DEVPROPKEY represents a device property key for a device property in the\n// unified device property model.\ntype DEVPROPKEY struct {\n\tFmtID DEVPROPGUID\n\tPID   DEVPROPID\n}\n\n// CONFIGRET is a return value or error code from cfgmgr32 APIs\ntype CONFIGRET uint32\n\nfunc (ret CONFIGRET) Error() string {\n\tif win32Error, ok := ret.Unwrap().(Errno); ok {\n\t\treturn fmt.Sprintf(\"%s (CfgMgr error: 0x%08x)\", win32Error.Error(), uint32(ret))\n\t}\n\treturn fmt.Sprintf(\"CfgMgr error: 0x%08x\", uint32(ret))\n}\n\nfunc (ret CONFIGRET) Win32Error(defaultError Errno) Errno {\n\treturn cm_MapCrToWin32Err(ret, defaultError)\n}\n\nfunc (ret CONFIGRET) Unwrap() error {\n\tconst noMatch = Errno(^uintptr(0))\n\twin32Error := ret.Win32Error(noMatch)\n\tif win32Error == noMatch {\n\t\treturn nil\n\t}\n\treturn win32Error\n}\n\nconst (\n\tCR_SUCCESS                  CONFIGRET = 0x00000000\n\tCR_DEFAULT                  CONFIGRET = 0x00000001\n\tCR_OUT_OF_MEMORY            CONFIGRET = 0x00000002\n\tCR_INVALID_POINTER          CONFIGRET = 0x00000003\n\tCR_INVALID_FLAG             CONFIGRET = 0x00000004\n\tCR_INVALID_DEVNODE          CONFIGRET = 0x00000005\n\tCR_INVALID_DEVINST                    = CR_INVALID_DEVNODE\n\tCR_INVALID_RES_DES          CONFIGRET = 0x00000006\n\tCR_INVALID_LOG_CONF         CONFIGRET = 0x00000007\n\tCR_INVALID_ARBITRATOR       CONFIGRET = 0x00000008\n\tCR_INVALID_NODELIST         CONFIGRET = 0x00000009\n\tCR_DEVNODE_HAS_REQS         CONFIGRET = 0x0000000A\n\tCR_DEVINST_HAS_REQS                   = CR_DEVNODE_HAS_REQS\n\tCR_INVALID_RESOURCEID       CONFIGRET = 0x0000000B\n\tCR_DLVXD_NOT_FOUND          CONFIGRET = 0x0000000C\n\tCR_NO_SUCH_DEVNODE          CONFIGRET = 0x0000000D\n\tCR_NO_SUCH_DEVINST                    = CR_NO_SUCH_DEVNODE\n\tCR_NO_MORE_LOG_CONF         CONFIGRET = 0x0000000E\n\tCR_NO_MORE_RES_DES          CONFIGRET = 0x0000000F\n\tCR_ALREADY_SUCH_DEVNODE     CONFIGRET = 0x00000010\n\tCR_ALREADY_SUCH_DEVINST               = CR_ALREADY_SUCH_DEVNODE\n\tCR_INVALID_RANGE_LIST       CONFIGRET = 0x00000011\n\tCR_INVALID_RANGE            CONFIGRET = 0x00000012\n\tCR_FAILURE                  CONFIGRET = 0x00000013\n\tCR_NO_SUCH_LOGICAL_DEV      CONFIGRET = 0x00000014\n\tCR_CREATE_BLOCKED           CONFIGRET = 0x00000015\n\tCR_NOT_SYSTEM_VM            CONFIGRET = 0x00000016\n\tCR_REMOVE_VETOED            CONFIGRET = 0x00000017\n\tCR_APM_VETOED               CONFIGRET = 0x00000018\n\tCR_INVALID_LOAD_TYPE        CONFIGRET = 0x00000019\n\tCR_BUFFER_SMALL             CONFIGRET = 0x0000001A\n\tCR_NO_ARBITRATOR            CONFIGRET = 0x0000001B\n\tCR_NO_REGISTRY_HANDLE       CONFIGRET = 0x0000001C\n\tCR_REGISTRY_ERROR           CONFIGRET = 0x0000001D\n\tCR_INVALID_DEVICE_ID        CONFIGRET = 0x0000001E\n\tCR_INVALID_DATA             CONFIGRET = 0x0000001F\n\tCR_INVALID_API              CONFIGRET = 0x00000020\n\tCR_DEVLOADER_NOT_READY      CONFIGRET = 0x00000021\n\tCR_NEED_RESTART             CONFIGRET = 0x00000022\n\tCR_NO_MORE_HW_PROFILES      CONFIGRET = 0x00000023\n\tCR_DEVICE_NOT_THERE         CONFIGRET = 0x00000024\n\tCR_NO_SUCH_VALUE            CONFIGRET = 0x00000025\n\tCR_WRONG_TYPE               CONFIGRET = 0x00000026\n\tCR_INVALID_PRIORITY         CONFIGRET = 0x00000027\n\tCR_NOT_DISABLEABLE          CONFIGRET = 0x00000028\n\tCR_FREE_RESOURCES           CONFIGRET = 0x00000029\n\tCR_QUERY_VETOED             CONFIGRET = 0x0000002A\n\tCR_CANT_SHARE_IRQ           CONFIGRET = 0x0000002B\n\tCR_NO_DEPENDENT             CONFIGRET = 0x0000002C\n\tCR_SAME_RESOURCES           CONFIGRET = 0x0000002D\n\tCR_NO_SUCH_REGISTRY_KEY     CONFIGRET = 0x0000002E\n\tCR_INVALID_MACHINENAME      CONFIGRET = 0x0000002F\n\tCR_REMOTE_COMM_FAILURE      CONFIGRET = 0x00000030\n\tCR_MACHINE_UNAVAILABLE      CONFIGRET = 0x00000031\n\tCR_NO_CM_SERVICES           CONFIGRET = 0x00000032\n\tCR_ACCESS_DENIED            CONFIGRET = 0x00000033\n\tCR_CALL_NOT_IMPLEMENTED     CONFIGRET = 0x00000034\n\tCR_INVALID_PROPERTY         CONFIGRET = 0x00000035\n\tCR_DEVICE_INTERFACE_ACTIVE  CONFIGRET = 0x00000036\n\tCR_NO_SUCH_DEVICE_INTERFACE CONFIGRET = 0x00000037\n\tCR_INVALID_REFERENCE_STRING CONFIGRET = 0x00000038\n\tCR_INVALID_CONFLICT_LIST    CONFIGRET = 0x00000039\n\tCR_INVALID_INDEX            CONFIGRET = 0x0000003A\n\tCR_INVALID_STRUCTURE_SIZE   CONFIGRET = 0x0000003B\n\tNUM_CR_RESULTS              CONFIGRET = 0x0000003C\n)\n\nconst (\n\tCM_GET_DEVICE_INTERFACE_LIST_PRESENT     = 0 // only currently 'live' device interfaces\n\tCM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES = 1 // all registered device interfaces, live or not\n)\n\nconst (\n\tDN_ROOT_ENUMERATED       = 0x00000001        // Was enumerated by ROOT\n\tDN_DRIVER_LOADED         = 0x00000002        // Has Register_Device_Driver\n\tDN_ENUM_LOADED           = 0x00000004        // Has Register_Enumerator\n\tDN_STARTED               = 0x00000008        // Is currently configured\n\tDN_MANUAL                = 0x00000010        // Manually installed\n\tDN_NEED_TO_ENUM          = 0x00000020        // May need reenumeration\n\tDN_NOT_FIRST_TIME        = 0x00000040        // Has received a config\n\tDN_HARDWARE_ENUM         = 0x00000080        // Enum generates hardware ID\n\tDN_LIAR                  = 0x00000100        // Lied about can reconfig once\n\tDN_HAS_MARK              = 0x00000200        // Not CM_Create_DevInst lately\n\tDN_HAS_PROBLEM           = 0x00000400        // Need device installer\n\tDN_FILTERED              = 0x00000800        // Is filtered\n\tDN_MOVED                 = 0x00001000        // Has been moved\n\tDN_DISABLEABLE           = 0x00002000        // Can be disabled\n\tDN_REMOVABLE             = 0x00004000        // Can be removed\n\tDN_PRIVATE_PROBLEM       = 0x00008000        // Has a private problem\n\tDN_MF_PARENT             = 0x00010000        // Multi function parent\n\tDN_MF_CHILD              = 0x00020000        // Multi function child\n\tDN_WILL_BE_REMOVED       = 0x00040000        // DevInst is being removed\n\tDN_NOT_FIRST_TIMEE       = 0x00080000        // Has received a config enumerate\n\tDN_STOP_FREE_RES         = 0x00100000        // When child is stopped, free resources\n\tDN_REBAL_CANDIDATE       = 0x00200000        // Don't skip during rebalance\n\tDN_BAD_PARTIAL           = 0x00400000        // This devnode's log_confs do not have same resources\n\tDN_NT_ENUMERATOR         = 0x00800000        // This devnode's is an NT enumerator\n\tDN_NT_DRIVER             = 0x01000000        // This devnode's is an NT driver\n\tDN_NEEDS_LOCKING         = 0x02000000        // Devnode need lock resume processing\n\tDN_ARM_WAKEUP            = 0x04000000        // Devnode can be the wakeup device\n\tDN_APM_ENUMERATOR        = 0x08000000        // APM aware enumerator\n\tDN_APM_DRIVER            = 0x10000000        // APM aware driver\n\tDN_SILENT_INSTALL        = 0x20000000        // Silent install\n\tDN_NO_SHOW_IN_DM         = 0x40000000        // No show in device manager\n\tDN_BOOT_LOG_PROB         = 0x80000000        // Had a problem during preassignment of boot log conf\n\tDN_NEED_RESTART          = DN_LIAR           // System needs to be restarted for this Devnode to work properly\n\tDN_DRIVER_BLOCKED        = DN_NOT_FIRST_TIME // One or more drivers are blocked from loading for this Devnode\n\tDN_LEGACY_DRIVER         = DN_MOVED          // This device is using a legacy driver\n\tDN_CHILD_WITH_INVALID_ID = DN_HAS_MARK       // One or more children have invalid IDs\n\tDN_DEVICE_DISCONNECTED   = DN_NEEDS_LOCKING  // The function driver for a device reported that the device is not connected.  Typically this means a wireless device is out of range.\n\tDN_QUERY_REMOVE_PENDING  = DN_MF_PARENT      // Device is part of a set of related devices collectively pending query-removal\n\tDN_QUERY_REMOVE_ACTIVE   = DN_MF_CHILD       // Device is actively engaged in a query-remove IRP\n\tDN_CHANGEABLE_FLAGS      = DN_NOT_FIRST_TIME | DN_HARDWARE_ENUM | DN_HAS_MARK | DN_DISABLEABLE | DN_REMOVABLE | DN_MF_CHILD | DN_MF_PARENT | DN_NOT_FIRST_TIMEE | DN_STOP_FREE_RES | DN_REBAL_CANDIDATE | DN_NT_ENUMERATOR | DN_NT_DRIVER | DN_SILENT_INSTALL | DN_NO_SHOW_IN_DM\n)\n\n//sys\tsetupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiCreateDeviceInfoListExW\n\n// SetupDiCreateDeviceInfoListEx function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class.\nfunc SetupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName string) (deviceInfoSet DevInfo, err error) {\n\tvar machineNameUTF16 *uint16\n\tif machineName != \"\" {\n\t\tmachineNameUTF16, err = UTF16PtrFromString(machineName)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn setupDiCreateDeviceInfoListEx(classGUID, hwndParent, machineNameUTF16, 0)\n}\n\n//sys\tsetupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) = setupapi.SetupDiGetDeviceInfoListDetailW\n\n// SetupDiGetDeviceInfoListDetail function retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.\nfunc SetupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo) (deviceInfoSetDetailData *DevInfoListDetailData, err error) {\n\tdata := &DevInfoListDetailData{}\n\tdata.size = data.unsafeSizeOf()\n\n\treturn data, setupDiGetDeviceInfoListDetail(deviceInfoSet, data)\n}\n\n// DeviceInfoListDetail method retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.\nfunc (deviceInfoSet DevInfo) DeviceInfoListDetail() (*DevInfoListDetailData, error) {\n\treturn SetupDiGetDeviceInfoListDetail(deviceInfoSet)\n}\n\n//sys\tsetupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCreateDeviceInfoW\n\n// SetupDiCreateDeviceInfo function creates a new device information element and adds it as a new member to the specified device information set.\nfunc SetupDiCreateDeviceInfo(deviceInfoSet DevInfo, deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (deviceInfoData *DevInfoData, err error) {\n\tdeviceNameUTF16, err := UTF16PtrFromString(deviceName)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar deviceDescriptionUTF16 *uint16\n\tif deviceDescription != \"\" {\n\t\tdeviceDescriptionUTF16, err = UTF16PtrFromString(deviceDescription)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tdata := &DevInfoData{}\n\tdata.size = uint32(unsafe.Sizeof(*data))\n\n\treturn data, setupDiCreateDeviceInfo(deviceInfoSet, deviceNameUTF16, classGUID, deviceDescriptionUTF16, hwndParent, creationFlags, data)\n}\n\n// CreateDeviceInfo method creates a new device information element and adds it as a new member to the specified device information set.\nfunc (deviceInfoSet DevInfo) CreateDeviceInfo(deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (*DevInfoData, error) {\n\treturn SetupDiCreateDeviceInfo(deviceInfoSet, deviceName, classGUID, deviceDescription, hwndParent, creationFlags)\n}\n\n//sys\tsetupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiEnumDeviceInfo\n\n// SetupDiEnumDeviceInfo function returns a DevInfoData structure that specifies a device information element in a device information set.\nfunc SetupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex int) (*DevInfoData, error) {\n\tdata := &DevInfoData{}\n\tdata.size = uint32(unsafe.Sizeof(*data))\n\n\treturn data, setupDiEnumDeviceInfo(deviceInfoSet, uint32(memberIndex), data)\n}\n\n// EnumDeviceInfo method returns a DevInfoData structure that specifies a device information element in a device information set.\nfunc (deviceInfoSet DevInfo) EnumDeviceInfo(memberIndex int) (*DevInfoData, error) {\n\treturn SetupDiEnumDeviceInfo(deviceInfoSet, memberIndex)\n}\n\n// SetupDiDestroyDeviceInfoList function deletes a device information set and frees all associated memory.\n//sys\tSetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiDestroyDeviceInfoList\n\n// Close method deletes a device information set and frees all associated memory.\nfunc (deviceInfoSet DevInfo) Close() error {\n\treturn SetupDiDestroyDeviceInfoList(deviceInfoSet)\n}\n\n//sys\tSetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiBuildDriverInfoList\n\n// BuildDriverInfoList method builds a list of drivers that is associated with a specific device or with the global class driver list for a device information set.\nfunc (deviceInfoSet DevInfo) BuildDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {\n\treturn SetupDiBuildDriverInfoList(deviceInfoSet, deviceInfoData, driverType)\n}\n\n//sys\tSetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiCancelDriverInfoSearch\n\n// CancelDriverInfoSearch method cancels a driver list search that is currently in progress in a different thread.\nfunc (deviceInfoSet DevInfo) CancelDriverInfoSearch() error {\n\treturn SetupDiCancelDriverInfoSearch(deviceInfoSet)\n}\n\n//sys\tsetupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiEnumDriverInfoW\n\n// SetupDiEnumDriverInfo function enumerates the members of a driver list.\nfunc SetupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {\n\tdata := &DrvInfoData{}\n\tdata.size = uint32(unsafe.Sizeof(*data))\n\n\treturn data, setupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, uint32(memberIndex), data)\n}\n\n// EnumDriverInfo method enumerates the members of a driver list.\nfunc (deviceInfoSet DevInfo) EnumDriverInfo(deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {\n\treturn SetupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, memberIndex)\n}\n\n//sys\tsetupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiGetSelectedDriverW\n\n// SetupDiGetSelectedDriver function retrieves the selected driver for a device information set or a particular device information element.\nfunc SetupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DrvInfoData, error) {\n\tdata := &DrvInfoData{}\n\tdata.size = uint32(unsafe.Sizeof(*data))\n\n\treturn data, setupDiGetSelectedDriver(deviceInfoSet, deviceInfoData, data)\n}\n\n// SelectedDriver method retrieves the selected driver for a device information set or a particular device information element.\nfunc (deviceInfoSet DevInfo) SelectedDriver(deviceInfoData *DevInfoData) (*DrvInfoData, error) {\n\treturn SetupDiGetSelectedDriver(deviceInfoSet, deviceInfoData)\n}\n\n//sys\tSetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiSetSelectedDriverW\n\n// SetSelectedDriver method sets, or resets, the selected driver for a device information element or the selected class driver for a device information set.\nfunc (deviceInfoSet DevInfo) SetSelectedDriver(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) error {\n\treturn SetupDiSetSelectedDriver(deviceInfoSet, deviceInfoData, driverInfoData)\n}\n\n//sys\tsetupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDriverInfoDetailW\n\n// SetupDiGetDriverInfoDetail function retrieves driver information detail for a device information set or a particular device information element in the device information set.\nfunc SetupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {\n\treqSize := uint32(2048)\n\tfor {\n\t\tbuf := make([]byte, reqSize)\n\t\tdata := (*DrvInfoDetailData)(unsafe.Pointer(&buf[0]))\n\t\tdata.size = data.unsafeSizeOf()\n\t\terr := setupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData, data, uint32(len(buf)), &reqSize)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata.size = reqSize\n\t\treturn data, nil\n\t}\n}\n\n// DriverInfoDetail method retrieves driver information detail for a device information set or a particular device information element in the device information set.\nfunc (deviceInfoSet DevInfo) DriverInfoDetail(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {\n\treturn SetupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData)\n}\n\n//sys\tSetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiDestroyDriverInfoList\n\n// DestroyDriverInfoList method deletes a driver list.\nfunc (deviceInfoSet DevInfo) DestroyDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {\n\treturn SetupDiDestroyDriverInfoList(deviceInfoSet, deviceInfoData, driverType)\n}\n\n//sys\tsetupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiGetClassDevsExW\n\n// SetupDiGetClassDevsEx function returns a handle to a device information set that contains requested device information elements for a local or a remote computer.\nfunc SetupDiGetClassDevsEx(classGUID *GUID, enumerator string, hwndParent uintptr, flags DIGCF, deviceInfoSet DevInfo, machineName string) (handle DevInfo, err error) {\n\tvar enumeratorUTF16 *uint16\n\tif enumerator != \"\" {\n\t\tenumeratorUTF16, err = UTF16PtrFromString(enumerator)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\tvar machineNameUTF16 *uint16\n\tif machineName != \"\" {\n\t\tmachineNameUTF16, err = UTF16PtrFromString(machineName)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\treturn setupDiGetClassDevsEx(classGUID, enumeratorUTF16, hwndParent, flags, deviceInfoSet, machineNameUTF16, 0)\n}\n\n// SetupDiCallClassInstaller function calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).\n//sys\tSetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCallClassInstaller\n\n// CallClassInstaller member calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).\nfunc (deviceInfoSet DevInfo) CallClassInstaller(installFunction DI_FUNCTION, deviceInfoData *DevInfoData) error {\n\treturn SetupDiCallClassInstaller(installFunction, deviceInfoSet, deviceInfoData)\n}\n\n// SetupDiOpenDevRegKey function opens a registry key for device-specific configuration information.\n//sys\tSetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) [failretval==InvalidHandle] = setupapi.SetupDiOpenDevRegKey\n\n// OpenDevRegKey method opens a registry key for device-specific configuration information.\nfunc (deviceInfoSet DevInfo) OpenDevRegKey(DeviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (Handle, error) {\n\treturn SetupDiOpenDevRegKey(deviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, samDesired)\n}\n\n//sys\tsetupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) = setupapi.SetupDiGetDevicePropertyW\n\n// SetupDiGetDeviceProperty function retrieves a specified device instance property.\nfunc SetupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY) (value interface{}, err error) {\n\treqSize := uint32(256)\n\tfor {\n\t\tvar dataType DEVPROPTYPE\n\t\tbuf := make([]byte, reqSize)\n\t\terr = setupDiGetDeviceProperty(deviceInfoSet, deviceInfoData, propertyKey, &dataType, &buf[0], uint32(len(buf)), &reqSize, 0)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tswitch dataType {\n\t\tcase DEVPROP_TYPE_STRING:\n\t\t\tret := UTF16ToString(bufToUTF16(buf))\n\t\t\truntime.KeepAlive(buf)\n\t\t\treturn ret, nil\n\t\t}\n\t\treturn nil, errors.New(\"unimplemented property type\")\n\t}\n}\n\n//sys\tsetupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceRegistryPropertyW\n\n// SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property.\nfunc SetupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP) (value interface{}, err error) {\n\treqSize := uint32(256)\n\tfor {\n\t\tvar dataType uint32\n\t\tbuf := make([]byte, reqSize)\n\t\terr = setupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &dataType, &buf[0], uint32(len(buf)), &reqSize)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\treturn getRegistryValue(buf[:reqSize], dataType)\n\t}\n}\n\nfunc getRegistryValue(buf []byte, dataType uint32) (interface{}, error) {\n\tswitch dataType {\n\tcase REG_SZ:\n\t\tret := UTF16ToString(bufToUTF16(buf))\n\t\truntime.KeepAlive(buf)\n\t\treturn ret, nil\n\tcase REG_EXPAND_SZ:\n\t\tvalue := UTF16ToString(bufToUTF16(buf))\n\t\tif value == \"\" {\n\t\t\treturn \"\", nil\n\t\t}\n\t\tp, err := syscall.UTF16PtrFromString(value)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tret := make([]uint16, 100)\n\t\tfor {\n\t\t\tn, err := ExpandEnvironmentStrings(p, &ret[0], uint32(len(ret)))\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tif n <= uint32(len(ret)) {\n\t\t\t\treturn UTF16ToString(ret[:n]), nil\n\t\t\t}\n\t\t\tret = make([]uint16, n)\n\t\t}\n\tcase REG_BINARY:\n\t\treturn buf, nil\n\tcase REG_DWORD_LITTLE_ENDIAN:\n\t\treturn binary.LittleEndian.Uint32(buf), nil\n\tcase REG_DWORD_BIG_ENDIAN:\n\t\treturn binary.BigEndian.Uint32(buf), nil\n\tcase REG_MULTI_SZ:\n\t\tbufW := bufToUTF16(buf)\n\t\ta := []string{}\n\t\tfor i := 0; i < len(bufW); {\n\t\t\tj := i + wcslen(bufW[i:])\n\t\t\tif i < j {\n\t\t\t\ta = append(a, UTF16ToString(bufW[i:j]))\n\t\t\t}\n\t\t\ti = j + 1\n\t\t}\n\t\truntime.KeepAlive(buf)\n\t\treturn a, nil\n\tcase REG_QWORD_LITTLE_ENDIAN:\n\t\treturn binary.LittleEndian.Uint64(buf), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"Unsupported registry value type: %v\", dataType)\n\t}\n}\n\n// bufToUTF16 function reinterprets []byte buffer as []uint16\nfunc bufToUTF16(buf []byte) []uint16 {\n\tsl := struct {\n\t\taddr *uint16\n\t\tlen  int\n\t\tcap  int\n\t}{(*uint16)(unsafe.Pointer(&buf[0])), len(buf) / 2, cap(buf) / 2}\n\treturn *(*[]uint16)(unsafe.Pointer(&sl))\n}\n\n// utf16ToBuf function reinterprets []uint16 as []byte\nfunc utf16ToBuf(buf []uint16) []byte {\n\tsl := struct {\n\t\taddr *byte\n\t\tlen  int\n\t\tcap  int\n\t}{(*byte)(unsafe.Pointer(&buf[0])), len(buf) * 2, cap(buf) * 2}\n\treturn *(*[]byte)(unsafe.Pointer(&sl))\n}\n\nfunc wcslen(str []uint16) int {\n\tfor i := 0; i < len(str); i++ {\n\t\tif str[i] == 0 {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn len(str)\n}\n\n// DeviceRegistryProperty method retrieves a specified Plug and Play device property.\nfunc (deviceInfoSet DevInfo) DeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP) (interface{}, error) {\n\treturn SetupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property)\n}\n\n//sys\tsetupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) = setupapi.SetupDiSetDeviceRegistryPropertyW\n\n// SetupDiSetDeviceRegistryProperty function sets a Plug and Play device property for a device.\nfunc SetupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {\n\treturn setupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &propertyBuffers[0], uint32(len(propertyBuffers)))\n}\n\n// SetDeviceRegistryProperty function sets a Plug and Play device property for a device.\nfunc (deviceInfoSet DevInfo) SetDeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {\n\treturn SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, propertyBuffers)\n}\n\n// SetDeviceRegistryPropertyString method sets a Plug and Play device property string for a device.\nfunc (deviceInfoSet DevInfo) SetDeviceRegistryPropertyString(deviceInfoData *DevInfoData, property SPDRP, str string) error {\n\tstr16, err := UTF16FromString(str)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, utf16ToBuf(append(str16, 0)))\n\truntime.KeepAlive(str16)\n\treturn err\n}\n\n//sys\tsetupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiGetDeviceInstallParamsW\n\n// SetupDiGetDeviceInstallParams function retrieves device installation parameters for a device information set or a particular device information element.\nfunc SetupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DevInstallParams, error) {\n\tparams := &DevInstallParams{}\n\tparams.size = uint32(unsafe.Sizeof(*params))\n\n\treturn params, setupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData, params)\n}\n\n// DeviceInstallParams method retrieves device installation parameters for a device information set or a particular device information element.\nfunc (deviceInfoSet DevInfo) DeviceInstallParams(deviceInfoData *DevInfoData) (*DevInstallParams, error) {\n\treturn SetupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData)\n}\n\n//sys\tsetupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceInstanceIdW\n\n// SetupDiGetDeviceInstanceId function retrieves the instance ID of the device.\nfunc SetupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (string, error) {\n\treqSize := uint32(1024)\n\tfor {\n\t\tbuf := make([]uint16, reqSize)\n\t\terr := setupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData, &buf[0], uint32(len(buf)), &reqSize)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn UTF16ToString(buf), nil\n\t}\n}\n\n// DeviceInstanceID method retrieves the instance ID of the device.\nfunc (deviceInfoSet DevInfo) DeviceInstanceID(deviceInfoData *DevInfoData) (string, error) {\n\treturn SetupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData)\n}\n\n// SetupDiGetClassInstallParams function retrieves class installation parameters for a device information set or a particular device information element.\n//sys\tSetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetClassInstallParamsW\n\n// ClassInstallParams method retrieves class installation parameters for a device information set or a particular device information element.\nfunc (deviceInfoSet DevInfo) ClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) error {\n\treturn SetupDiGetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize, requiredSize)\n}\n\n//sys\tSetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiSetDeviceInstallParamsW\n\n// SetDeviceInstallParams member sets device installation parameters for a device information set or a particular device information element.\nfunc (deviceInfoSet DevInfo) SetDeviceInstallParams(deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) error {\n\treturn SetupDiSetDeviceInstallParams(deviceInfoSet, deviceInfoData, deviceInstallParams)\n}\n\n// SetupDiSetClassInstallParams function sets or clears class install parameters for a device information set or a particular device information element.\n//sys\tSetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) = setupapi.SetupDiSetClassInstallParamsW\n\n// SetClassInstallParams method sets or clears class install parameters for a device information set or a particular device information element.\nfunc (deviceInfoSet DevInfo) SetClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) error {\n\treturn SetupDiSetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize)\n}\n\n//sys\tsetupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassNameFromGuidExW\n\n// SetupDiClassNameFromGuidEx function retrieves the class name associated with a class GUID. The class can be installed on a local or remote computer.\nfunc SetupDiClassNameFromGuidEx(classGUID *GUID, machineName string) (className string, err error) {\n\tvar classNameUTF16 [MAX_CLASS_NAME_LEN]uint16\n\n\tvar machineNameUTF16 *uint16\n\tif machineName != \"\" {\n\t\tmachineNameUTF16, err = UTF16PtrFromString(machineName)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\terr = setupDiClassNameFromGuidEx(classGUID, &classNameUTF16[0], MAX_CLASS_NAME_LEN, nil, machineNameUTF16, 0)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tclassName = UTF16ToString(classNameUTF16[:])\n\treturn\n}\n\n//sys\tsetupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassGuidsFromNameExW\n\n// SetupDiClassGuidsFromNameEx function retrieves the GUIDs associated with the specified class name. This resulting list contains the classes currently installed on a local or remote computer.\nfunc SetupDiClassGuidsFromNameEx(className string, machineName string) ([]GUID, error) {\n\tclassNameUTF16, err := UTF16PtrFromString(className)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar machineNameUTF16 *uint16\n\tif machineName != \"\" {\n\t\tmachineNameUTF16, err = UTF16PtrFromString(machineName)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treqSize := uint32(4)\n\tfor {\n\t\tbuf := make([]GUID, reqSize)\n\t\terr = setupDiClassGuidsFromNameEx(classNameUTF16, &buf[0], uint32(len(buf)), &reqSize, machineNameUTF16, 0)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn buf[:reqSize], nil\n\t}\n}\n\n//sys\tsetupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiGetSelectedDevice\n\n// SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.\nfunc SetupDiGetSelectedDevice(deviceInfoSet DevInfo) (*DevInfoData, error) {\n\tdata := &DevInfoData{}\n\tdata.size = uint32(unsafe.Sizeof(*data))\n\n\treturn data, setupDiGetSelectedDevice(deviceInfoSet, data)\n}\n\n// SelectedDevice method retrieves the selected device information element in a device information set.\nfunc (deviceInfoSet DevInfo) SelectedDevice() (*DevInfoData, error) {\n\treturn SetupDiGetSelectedDevice(deviceInfoSet)\n}\n\n// SetupDiSetSelectedDevice function sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.\n//sys\tSetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiSetSelectedDevice\n\n// SetSelectedDevice method sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.\nfunc (deviceInfoSet DevInfo) SetSelectedDevice(deviceInfoData *DevInfoData) error {\n\treturn SetupDiSetSelectedDevice(deviceInfoSet, deviceInfoData)\n}\n\n//sys\tsetupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) = setupapi.SetupUninstallOEMInfW\n\n// SetupUninstallOEMInf uninstalls the specified driver.\nfunc SetupUninstallOEMInf(infFileName string, flags SUOI) error {\n\tinfFileName16, err := UTF16PtrFromString(infFileName)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn setupUninstallOEMInf(infFileName16, flags, 0)\n}\n\n//sys cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) = CfgMgr32.CM_MapCrToWin32Err\n\n//sys cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_List_SizeW\n//sys cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_ListW\n\nfunc CM_Get_Device_Interface_List(deviceID string, interfaceClass *GUID, flags uint32) ([]string, error) {\n\tdeviceID16, err := UTF16PtrFromString(deviceID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar buf []uint16\n\tvar buflen uint32\n\tfor {\n\t\tif ret := cm_Get_Device_Interface_List_Size(&buflen, interfaceClass, deviceID16, flags); ret != CR_SUCCESS {\n\t\t\treturn nil, ret\n\t\t}\n\t\tbuf = make([]uint16, buflen)\n\t\tif ret := cm_Get_Device_Interface_List(interfaceClass, deviceID16, &buf[0], buflen, flags); ret == CR_SUCCESS {\n\t\t\tbreak\n\t\t} else if ret != CR_BUFFER_SMALL {\n\t\t\treturn nil, ret\n\t\t}\n\t}\n\tvar interfaces []string\n\tfor i := 0; i < len(buf); {\n\t\tj := i + wcslen(buf[i:])\n\t\tif i < j {\n\t\t\tinterfaces = append(interfaces, UTF16ToString(buf[i:j]))\n\t\t}\n\t\ti = j + 1\n\t}\n\tif interfaces == nil {\n\t\treturn nil, ERROR_NO_SUCH_DEVICE_INTERFACE\n\t}\n\treturn interfaces, nil\n}\n\n//sys cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_DevNode_Status\n\nfunc CM_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) error {\n\tret := cm_Get_DevNode_Status(status, problemNumber, devInst, flags)\n\tif ret == CR_SUCCESS {\n\t\treturn nil\n\t}\n\treturn ret\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/str.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n\npackage windows\n\nfunc itoa(val int) string { // do it here rather than with fmt to avoid dependency\n\tif val < 0 {\n\t\treturn \"-\" + itoa(-val)\n\t}\n\tvar buf [32]byte // big enough for int64\n\ti := len(buf) - 1\n\tfor val >= 10 {\n\t\tbuf[i] = byte(val%10 + '0')\n\t\ti--\n\t\tval /= 10\n\t}\n\tbuf[i] = byte(val + '0')\n\treturn string(buf[i:])\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/syscall.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build windows\n\n// Package windows contains an interface to the low-level operating system\n// primitives. OS details vary depending on the underlying system, and\n// by default, godoc will display the OS-specific documentation for the current\n// system. If you want godoc to display syscall documentation for another\n// system, set $GOOS and $GOARCH to the desired system. For example, if\n// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS\n// to freebsd and $GOARCH to arm.\n//\n// The primary use of this package is inside other packages that provide a more\n// portable interface to the system, such as \"os\", \"time\" and \"net\".  Use\n// those packages rather than this one if you can.\n//\n// For details of the functions and data types in this package consult\n// the manuals for the appropriate operating system.\n//\n// These calls return err == nil to indicate success; otherwise\n// err represents an operating system error describing the failure and\n// holds a value of type syscall.Errno.\npackage windows // import \"golang.org/x/sys/windows\"\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// ByteSliceFromString returns a NUL-terminated slice of bytes\n// containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, syscall.EINVAL).\nfunc ByteSliceFromString(s string) ([]byte, error) {\n\tif strings.IndexByte(s, 0) != -1 {\n\t\treturn nil, syscall.EINVAL\n\t}\n\ta := make([]byte, len(s)+1)\n\tcopy(a, s)\n\treturn a, nil\n}\n\n// BytePtrFromString returns a pointer to a NUL-terminated array of\n// bytes containing the text of s. If s contains a NUL byte at any\n// location, it returns (nil, syscall.EINVAL).\nfunc BytePtrFromString(s string) (*byte, error) {\n\ta, err := ByteSliceFromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &a[0], nil\n}\n\n// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any\n// bytes after the NUL removed.\nfunc ByteSliceToString(s []byte) string {\n\tif i := bytes.IndexByte(s, 0); i != -1 {\n\t\ts = s[:i]\n\t}\n\treturn string(s)\n}\n\n// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.\n// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated\n// at a zero byte; if the zero byte is not present, the program may crash.\nfunc BytePtrToString(p *byte) string {\n\tif p == nil {\n\t\treturn \"\"\n\t}\n\tif *p == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Find NUL terminator.\n\tn := 0\n\tfor ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {\n\t\tptr = unsafe.Pointer(uintptr(ptr) + 1)\n\t}\n\n\treturn string(unsafe.Slice(p, n))\n}\n\n// Single-word zero for use when we need a valid pointer to 0 bytes.\n// See mksyscall.pl.\nvar _zero uintptr\n\nfunc (ts *Timespec) Unix() (sec int64, nsec int64) {\n\treturn int64(ts.Sec), int64(ts.Nsec)\n}\n\nfunc (tv *Timeval) Unix() (sec int64, nsec int64) {\n\treturn int64(tv.Sec), int64(tv.Usec) * 1000\n}\n\nfunc (ts *Timespec) Nano() int64 {\n\treturn int64(ts.Sec)*1e9 + int64(ts.Nsec)\n}\n\nfunc (tv *Timeval) Nano() int64 {\n\treturn int64(tv.Sec)*1e9 + int64(tv.Usec)*1000\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/syscall_windows.go",
    "content": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Windows system calls.\n\npackage windows\n\nimport (\n\terrorspkg \"errors\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"sync\"\n\t\"syscall\"\n\t\"time\"\n\t\"unicode/utf16\"\n\t\"unsafe\"\n)\n\ntype (\n\tHandle uintptr\n\tHWND   uintptr\n)\n\nconst (\n\tInvalidHandle = ^Handle(0)\n\tInvalidHWND   = ^HWND(0)\n\n\t// Flags for DefineDosDevice.\n\tDDD_EXACT_MATCH_ON_REMOVE = 0x00000004\n\tDDD_NO_BROADCAST_SYSTEM   = 0x00000008\n\tDDD_RAW_TARGET_PATH       = 0x00000001\n\tDDD_REMOVE_DEFINITION     = 0x00000002\n\n\t// Return values for GetDriveType.\n\tDRIVE_UNKNOWN     = 0\n\tDRIVE_NO_ROOT_DIR = 1\n\tDRIVE_REMOVABLE   = 2\n\tDRIVE_FIXED       = 3\n\tDRIVE_REMOTE      = 4\n\tDRIVE_CDROM       = 5\n\tDRIVE_RAMDISK     = 6\n\n\t// File system flags from GetVolumeInformation and GetVolumeInformationByHandle.\n\tFILE_CASE_SENSITIVE_SEARCH        = 0x00000001\n\tFILE_CASE_PRESERVED_NAMES         = 0x00000002\n\tFILE_FILE_COMPRESSION             = 0x00000010\n\tFILE_DAX_VOLUME                   = 0x20000000\n\tFILE_NAMED_STREAMS                = 0x00040000\n\tFILE_PERSISTENT_ACLS              = 0x00000008\n\tFILE_READ_ONLY_VOLUME             = 0x00080000\n\tFILE_SEQUENTIAL_WRITE_ONCE        = 0x00100000\n\tFILE_SUPPORTS_ENCRYPTION          = 0x00020000\n\tFILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000\n\tFILE_SUPPORTS_HARD_LINKS          = 0x00400000\n\tFILE_SUPPORTS_OBJECT_IDS          = 0x00010000\n\tFILE_SUPPORTS_OPEN_BY_FILE_ID     = 0x01000000\n\tFILE_SUPPORTS_REPARSE_POINTS      = 0x00000080\n\tFILE_SUPPORTS_SPARSE_FILES        = 0x00000040\n\tFILE_SUPPORTS_TRANSACTIONS        = 0x00200000\n\tFILE_SUPPORTS_USN_JOURNAL         = 0x02000000\n\tFILE_UNICODE_ON_DISK              = 0x00000004\n\tFILE_VOLUME_IS_COMPRESSED         = 0x00008000\n\tFILE_VOLUME_QUOTAS                = 0x00000020\n\n\t// Flags for LockFileEx.\n\tLOCKFILE_FAIL_IMMEDIATELY = 0x00000001\n\tLOCKFILE_EXCLUSIVE_LOCK   = 0x00000002\n\n\t// Return value of SleepEx and other APC functions\n\tWAIT_IO_COMPLETION = 0x000000C0\n)\n\n// StringToUTF16 is deprecated. Use UTF16FromString instead.\n// If s contains a NUL byte this function panics instead of\n// returning an error.\nfunc StringToUTF16(s string) []uint16 {\n\ta, err := UTF16FromString(s)\n\tif err != nil {\n\t\tpanic(\"windows: string with NUL passed to StringToUTF16\")\n\t}\n\treturn a\n}\n\n// UTF16FromString returns the UTF-16 encoding of the UTF-8 string\n// s, with a terminating NUL added. If s contains a NUL byte at any\n// location, it returns (nil, syscall.EINVAL).\nfunc UTF16FromString(s string) ([]uint16, error) {\n\treturn syscall.UTF16FromString(s)\n}\n\n// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,\n// with a terminating NUL and any bytes after the NUL removed.\nfunc UTF16ToString(s []uint16) string {\n\treturn syscall.UTF16ToString(s)\n}\n\n// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead.\n// If s contains a NUL byte this function panics instead of\n// returning an error.\nfunc StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }\n\n// UTF16PtrFromString returns pointer to the UTF-16 encoding of\n// the UTF-8 string s, with a terminating NUL added. If s\n// contains a NUL byte at any location, it returns (nil, syscall.EINVAL).\nfunc UTF16PtrFromString(s string) (*uint16, error) {\n\ta, err := UTF16FromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &a[0], nil\n}\n\n// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.\n// If the pointer is nil, it returns the empty string. It assumes that the UTF-16 sequence is terminated\n// at a zero word; if the zero word is not present, the program may crash.\nfunc UTF16PtrToString(p *uint16) string {\n\tif p == nil {\n\t\treturn \"\"\n\t}\n\tif *p == 0 {\n\t\treturn \"\"\n\t}\n\n\t// Find NUL terminator.\n\tn := 0\n\tfor ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {\n\t\tptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))\n\t}\n\treturn UTF16ToString(unsafe.Slice(p, n))\n}\n\nfunc Getpagesize() int { return 4096 }\n\n// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.\n// This is useful when interoperating with Windows code requiring callbacks.\n// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.\nfunc NewCallback(fn interface{}) uintptr {\n\treturn syscall.NewCallback(fn)\n}\n\n// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention.\n// This is useful when interoperating with Windows code requiring callbacks.\n// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.\nfunc NewCallbackCDecl(fn interface{}) uintptr {\n\treturn syscall.NewCallbackCDecl(fn)\n}\n\n// windows api calls\n\n//sys\tGetLastError() (lasterr error)\n//sys\tLoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW\n//sys\tLoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) = LoadLibraryExW\n//sys\tFreeLibrary(handle Handle) (err error)\n//sys\tGetProcAddress(module Handle, procname string) (proc uintptr, err error)\n//sys\tGetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW\n//sys\tGetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW\n//sys\tSetDefaultDllDirectories(directoryFlags uint32) (err error)\n//sys\tAddDllDirectory(path *uint16) (cookie uintptr, err error) = kernel32.AddDllDirectory\n//sys\tRemoveDllDirectory(cookie uintptr) (err error) = kernel32.RemoveDllDirectory\n//sys\tSetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW\n//sys\tGetVersion() (ver uint32, err error)\n//sys\tFormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW\n//sys\tExitProcess(exitcode uint32)\n//sys\tIsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process\n//sys\tIsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2?\n//sys\tCreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW\n//sys\tCreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error)  [failretval==InvalidHandle] = CreateNamedPipeW\n//sys\tConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error)\n//sys\tDisconnectNamedPipe(pipe Handle) (err error)\n//sys   GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error)\n//sys   GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error)\n//sys\tGetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)\n//sys\tGetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW\n//sys\tSetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState\n//sys\treadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile\n//sys\twriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile\n//sys\tGetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)\n//sys\tSetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]\n//sys\tCloseHandle(handle Handle) (err error)\n//sys\tGetStdHandle(stdhandle uint32) (handle Handle, err error) [failretval==InvalidHandle]\n//sys\tSetStdHandle(stdhandle uint32, handle Handle) (err error)\n//sys\tfindFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW\n//sys\tfindNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW\n//sys\tFindClose(handle Handle) (err error)\n//sys\tGetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)\n//sys\tGetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error)\n//sys\tSetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error)\n//sys\tGetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW\n//sys\tSetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW\n//sys\tCreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW\n//sys\tRemoveDirectory(path *uint16) (err error) = RemoveDirectoryW\n//sys\tDeleteFile(path *uint16) (err error) = DeleteFileW\n//sys\tMoveFile(from *uint16, to *uint16) (err error) = MoveFileW\n//sys\tMoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW\n//sys\tLockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error)\n//sys\tUnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error)\n//sys\tGetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW\n//sys\tGetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW\n//sys\tSetEndOfFile(handle Handle) (err error)\n//sys\tSetFileValidData(handle Handle, validDataLength int64) (err error)\n//sys\tGetSystemTimeAsFileTime(time *Filetime)\n//sys\tGetSystemTimePreciseAsFileTime(time *Filetime)\n//sys\tGetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]\n//sys\tCreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error)\n//sys\tGetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error)\n//sys\tPostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error)\n//sys\tCancelIo(s Handle) (err error)\n//sys\tCancelIoEx(s Handle, o *Overlapped) (err error)\n//sys\tCreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW\n//sys\tCreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = advapi32.CreateProcessAsUserW\n//sys   initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) = InitializeProcThreadAttributeList\n//sys   deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) = DeleteProcThreadAttributeList\n//sys   updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) = UpdateProcThreadAttribute\n//sys\tOpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)\n//sys\tShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW\n//sys\tGetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId\n//sys\tLoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW\n//sys\tUnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout\n//sys\tGetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout\n//sys\tToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx\n//sys\tGetShellWindow() (shellWindow HWND) = user32.GetShellWindow\n//sys\tMessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW\n//sys\tExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx\n//sys\tshGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath\n//sys\tTerminateProcess(handle Handle, exitcode uint32) (err error)\n//sys\tGetExitCodeProcess(handle Handle, exitcode *uint32) (err error)\n//sys\tgetStartupInfo(startupInfo *StartupInfo) = GetStartupInfoW\n//sys\tGetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)\n//sys\tDuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)\n//sys\tWaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]\n//sys\twaitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] = WaitForMultipleObjects\n//sys\tGetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW\n//sys\tCreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error)\n//sys\tGetFileType(filehandle Handle) (n uint32, err error)\n//sys\tCryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) = advapi32.CryptAcquireContextW\n//sys\tCryptReleaseContext(provhandle Handle, flags uint32) (err error) = advapi32.CryptReleaseContext\n//sys\tCryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) = advapi32.CryptGenRandom\n//sys\tGetEnvironmentStrings() (envs *uint16, err error) [failretval==nil] = kernel32.GetEnvironmentStringsW\n//sys\tFreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW\n//sys\tGetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW\n//sys\tSetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW\n//sys\tExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW\n//sys\tCreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock\n//sys\tDestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock\n//sys\tgetTickCount64() (ms uint64) = kernel32.GetTickCount64\n//sys   GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)\n//sys\tSetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)\n//sys\tGetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW\n//sys\tSetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW\n//sys\tGetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW\n//sys\tGetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW\n//sys\tcommandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW\n//sys\tLocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]\n//sys\tLocalAlloc(flags uint32, length uint32) (ptr uintptr, err error)\n//sys\tSetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)\n//sys\tFlushFileBuffers(handle Handle) (err error)\n//sys\tGetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW\n//sys\tGetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW\n//sys\tGetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW\n//sys\tGetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW\n//sys\tCreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateFileMappingW\n//sys\tMapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)\n//sys\tUnmapViewOfFile(addr uintptr) (err error)\n//sys\tFlushViewOfFile(addr uintptr, length uintptr) (err error)\n//sys\tVirtualLock(addr uintptr, length uintptr) (err error)\n//sys\tVirtualUnlock(addr uintptr, length uintptr) (err error)\n//sys\tVirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc\n//sys\tVirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree\n//sys\tVirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect\n//sys\tVirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx\n//sys\tVirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery\n//sys\tVirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx\n//sys\tReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory\n//sys\tWriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory\n//sys\tTransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile\n//sys\tReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW\n//sys\tFindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW\n//sys\tFindNextChangeNotification(handle Handle) (err error)\n//sys\tFindCloseChangeNotification(handle Handle) (err error)\n//sys\tCertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW\n//sys\tCertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) = crypt32.CertOpenStore\n//sys\tCertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore\n//sys\tCertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore\n//sys\tCertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore\n//sys\tCertDeleteCertificateFromStore(certContext *CertContext) (err error) = crypt32.CertDeleteCertificateFromStore\n//sys\tCertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) = crypt32.CertDuplicateCertificateContext\n//sys\tPFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) = crypt32.PFXImportCertStore\n//sys\tCertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain\n//sys\tCertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain\n//sys\tCertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext\n//sys\tCertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext\n//sys\tCertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy\n//sys\tCertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW\n//sys\tCertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension\n//sys   CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore\n//sys   CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore\n//sys   CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey\n//sys\tCryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject\n//sys\tCryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject\n//sys\tCryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData\n//sys\tCryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptUnprotectData\n//sys\tWinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) = wintrust.WinVerifyTrustEx\n//sys\tRegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW\n//sys\tRegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey\n//sys\tRegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW\n//sys\tRegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW\n//sys\tRegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW\n//sys\tRegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) = advapi32.RegNotifyChangeKeyValue\n//sys\tGetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId\n//sys\tProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) = kernel32.ProcessIdToSessionId\n//sys\tClosePseudoConsole(console Handle) = kernel32.ClosePseudoConsole\n//sys\tcreatePseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) = kernel32.CreatePseudoConsole\n//sys\tGetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode\n//sys\tSetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode\n//sys\tGetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo\n//sys\tsetConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition\n//sys\tGetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP\n//sys\tGetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP\n//sys\tSetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP\n//sys\tSetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP\n//sys\tWriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW\n//sys\tReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW\n//sys\tGetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) = kernel32.GetNumberOfConsoleInputEvents\n//sys\tFlushConsoleInputBuffer(console Handle) (err error) = kernel32.FlushConsoleInputBuffer\n//sys\tresizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole\n//sys\tCreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot\n//sys\tModule32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW\n//sys\tModule32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW\n//sys\tProcess32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW\n//sys\tProcess32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW\n//sys\tThread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error)\n//sys\tThread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error)\n//sys\tDeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error)\n// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.\n//sys\tCreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW\n//sys\tCreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW\n//sys\tGetCurrentThreadId() (id uint32)\n//sys\tCreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventW\n//sys\tCreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventExW\n//sys\tOpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW\n//sys\tSetEvent(event Handle) (err error) = kernel32.SetEvent\n//sys\tResetEvent(event Handle) (err error) = kernel32.ResetEvent\n//sys\tPulseEvent(event Handle) (err error) = kernel32.PulseEvent\n//sys\tCreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexW\n//sys\tCreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexExW\n//sys\tOpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW\n//sys\tReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex\n//sys\tSleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx\n//sys\tCreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) = kernel32.CreateJobObjectW\n//sys\tAssignProcessToJobObject(job Handle, process Handle) (err error) = kernel32.AssignProcessToJobObject\n//sys\tTerminateJobObject(job Handle, exitCode uint32) (err error) = kernel32.TerminateJobObject\n//sys\tSetErrorMode(mode uint32) (ret uint32) = kernel32.SetErrorMode\n//sys\tResumeThread(thread Handle) (ret uint32, err error) [failretval==0xffffffff] = kernel32.ResumeThread\n//sys\tSetPriorityClass(process Handle, priorityClass uint32) (err error) = kernel32.SetPriorityClass\n//sys\tGetPriorityClass(process Handle) (ret uint32, err error) = kernel32.GetPriorityClass\n//sys\tQueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) = kernel32.QueryInformationJobObject\n//sys\tSetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error)\n//sys\tGenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error)\n//sys\tGetProcessId(process Handle) (id uint32, err error)\n//sys\tQueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) = kernel32.QueryFullProcessImageNameW\n//sys\tOpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)\n//sys\tSetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost\n//sys\tGetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32)\n//sys\tSetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)\n//sys\tClearCommBreak(handle Handle) (err error)\n//sys\tClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error)\n//sys\tEscapeCommFunction(handle Handle, dwFunc uint32) (err error)\n//sys\tGetCommState(handle Handle, lpDCB *DCB) (err error)\n//sys\tGetCommModemStatus(handle Handle, lpModemStat *uint32) (err error)\n//sys\tGetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)\n//sys\tPurgeComm(handle Handle, dwFlags uint32) (err error)\n//sys\tSetCommBreak(handle Handle) (err error)\n//sys\tSetCommMask(handle Handle, dwEvtMask uint32) (err error)\n//sys\tSetCommState(handle Handle, lpDCB *DCB) (err error)\n//sys\tSetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)\n//sys\tSetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error)\n//sys\tWaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error)\n//sys\tGetActiveProcessorCount(groupNumber uint16) (ret uint32)\n//sys\tGetMaximumProcessorCount(groupNumber uint16) (ret uint32)\n//sys\tEnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows\n//sys\tEnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows\n//sys\tGetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW\n//sys\tGetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow\n//sys\tGetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow\n//sys\tIsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow\n//sys\tIsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode\n//sys\tIsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible\n//sys\tGetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo\n//sys\tGetLargePageMinimum() (size uintptr)\n\n// Volume Management Functions\n//sys\tDefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW\n//sys\tDeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) = DeleteVolumeMountPointW\n//sys\tFindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeW\n//sys\tFindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeMountPointW\n//sys\tFindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) = FindNextVolumeW\n//sys\tFindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW\n//sys\tFindVolumeClose(findVolume Handle) (err error)\n//sys\tFindVolumeMountPointClose(findVolumeMountPoint Handle) (err error)\n//sys\tGetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) = GetDiskFreeSpaceExW\n//sys\tGetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW\n//sys\tGetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0]\n//sys\tGetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW\n//sys\tGetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationW\n//sys\tGetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationByHandleW\n//sys\tGetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) = GetVolumeNameForVolumeMountPointW\n//sys\tGetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) = GetVolumePathNameW\n//sys\tGetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) = GetVolumePathNamesForVolumeNameW\n//sys\tQueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW\n//sys\tSetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW\n//sys\tSetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW\n//sys\tInitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW\n//sys\tSetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters\n//sys\tGetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters\n//sys\tclsidFromString(lpsz *uint16, pclsid *GUID) (ret error) = ole32.CLSIDFromString\n//sys\tstringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2\n//sys\tcoCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid\n//sys\tCoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree\n//sys\tCoInitializeEx(reserved uintptr, coInit uint32) (ret error) = ole32.CoInitializeEx\n//sys\tCoUninitialize() = ole32.CoUninitialize\n//sys\tCoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) = ole32.CoGetObject\n//sys\tgetProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages\n//sys\tgetThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages\n//sys\tgetUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages\n//sys\tgetSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages\n//sys\tfindResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) = kernel32.FindResourceW\n//sys\tSizeofResource(module Handle, resInfo Handle) (size uint32, err error) = kernel32.SizeofResource\n//sys\tLoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource\n//sys\tLockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource\n\n// Version APIs\n//sys\tGetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW\n//sys\tGetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW\n//sys\tVerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW\n\n// Process Status API (PSAPI)\n//sys\tenumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses\n//sys\tEnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules\n//sys\tEnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx\n//sys\tGetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation\n//sys\tGetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW\n//sys\tGetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW\n//sys   QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) = psapi.QueryWorkingSetEx\n\n// NT Native APIs\n//sys\trtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb\n//sys\trtlGetVersion(info *OsVersionInfoEx) (ntstatus error) = ntdll.RtlGetVersion\n//sys\trtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers\n//sys\tRtlGetCurrentPeb() (peb *PEB) = ntdll.RtlGetCurrentPeb\n//sys\tRtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) = ntdll.RtlInitUnicodeString\n//sys\tRtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString\n//sys\tNtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile\n//sys\tNtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile\n//sys\tNtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile\n//sys\tRtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus\n//sys\tRtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus\n//sys\tRtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl\n//sys\tNtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess\n//sys\tNtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess\n//sys\tNtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation\n//sys\tNtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation\n//sys\tRtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable\n//sys\tRtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable\n\n// Desktop Window Manager API (Dwmapi)\n//sys\tDwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute\n//sys\tDwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute\n\n// Windows Multimedia API\n//sys TimeBeginPeriod (period uint32) (err error) [failretval != 0] = winmm.timeBeginPeriod\n//sys TimeEndPeriod (period uint32) (err error) [failretval != 0] = winmm.timeEndPeriod\n\n// syscall interface implementation for other packages\n\n// GetCurrentProcess returns the handle for the current process.\n// It is a pseudo handle that does not need to be closed.\n// The returned error is always nil.\n//\n// Deprecated: use CurrentProcess for the same Handle without the nil\n// error.\nfunc GetCurrentProcess() (Handle, error) {\n\treturn CurrentProcess(), nil\n}\n\n// CurrentProcess returns the handle for the current process.\n// It is a pseudo handle that does not need to be closed.\nfunc CurrentProcess() Handle { return Handle(^uintptr(1 - 1)) }\n\n// GetCurrentThread returns the handle for the current thread.\n// It is a pseudo handle that does not need to be closed.\n// The returned error is always nil.\n//\n// Deprecated: use CurrentThread for the same Handle without the nil\n// error.\nfunc GetCurrentThread() (Handle, error) {\n\treturn CurrentThread(), nil\n}\n\n// CurrentThread returns the handle for the current thread.\n// It is a pseudo handle that does not need to be closed.\nfunc CurrentThread() Handle { return Handle(^uintptr(2 - 1)) }\n\n// GetProcAddressByOrdinal retrieves the address of the exported\n// function from module by ordinal.\nfunc GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err error) {\n\tr0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0)\n\tproc = uintptr(r0)\n\tif proc == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Exit(code int) { ExitProcess(uint32(code)) }\n\nfunc makeInheritSa() *SecurityAttributes {\n\tvar sa SecurityAttributes\n\tsa.Length = uint32(unsafe.Sizeof(sa))\n\tsa.InheritHandle = 1\n\treturn &sa\n}\n\nfunc Open(path string, mode int, perm uint32) (fd Handle, err error) {\n\tif len(path) == 0 {\n\t\treturn InvalidHandle, ERROR_FILE_NOT_FOUND\n\t}\n\tpathp, err := UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn InvalidHandle, err\n\t}\n\tvar access uint32\n\tswitch mode & (O_RDONLY | O_WRONLY | O_RDWR) {\n\tcase O_RDONLY:\n\t\taccess = GENERIC_READ\n\tcase O_WRONLY:\n\t\taccess = GENERIC_WRITE\n\tcase O_RDWR:\n\t\taccess = GENERIC_READ | GENERIC_WRITE\n\t}\n\tif mode&O_CREAT != 0 {\n\t\taccess |= GENERIC_WRITE\n\t}\n\tif mode&O_APPEND != 0 {\n\t\taccess &^= GENERIC_WRITE\n\t\taccess |= FILE_APPEND_DATA\n\t}\n\tsharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE)\n\tvar sa *SecurityAttributes\n\tif mode&O_CLOEXEC == 0 {\n\t\tsa = makeInheritSa()\n\t}\n\tvar createmode uint32\n\tswitch {\n\tcase mode&(O_CREAT|O_EXCL) == (O_CREAT | O_EXCL):\n\t\tcreatemode = CREATE_NEW\n\tcase mode&(O_CREAT|O_TRUNC) == (O_CREAT | O_TRUNC):\n\t\tcreatemode = CREATE_ALWAYS\n\tcase mode&O_CREAT == O_CREAT:\n\t\tcreatemode = OPEN_ALWAYS\n\tcase mode&O_TRUNC == O_TRUNC:\n\t\tcreatemode = TRUNCATE_EXISTING\n\tdefault:\n\t\tcreatemode = OPEN_EXISTING\n\t}\n\tvar attrs uint32 = FILE_ATTRIBUTE_NORMAL\n\tif perm&S_IWRITE == 0 {\n\t\tattrs = FILE_ATTRIBUTE_READONLY\n\t}\n\th, e := CreateFile(pathp, access, sharemode, sa, createmode, attrs, 0)\n\treturn h, e\n}\n\nfunc Read(fd Handle, p []byte) (n int, err error) {\n\tvar done uint32\n\te := ReadFile(fd, p, &done, nil)\n\tif e != nil {\n\t\tif e == ERROR_BROKEN_PIPE {\n\t\t\t// NOTE(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin\n\t\t\treturn 0, nil\n\t\t}\n\t\treturn 0, e\n\t}\n\treturn int(done), nil\n}\n\nfunc Write(fd Handle, p []byte) (n int, err error) {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\tvar done uint32\n\te := WriteFile(fd, p, &done, nil)\n\tif e != nil {\n\t\treturn 0, e\n\t}\n\treturn int(done), nil\n}\n\nfunc ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {\n\terr := readFile(fd, p, done, overlapped)\n\tif raceenabled {\n\t\tif *done > 0 {\n\t\t\traceWriteRange(unsafe.Pointer(&p[0]), int(*done))\n\t\t}\n\t\traceAcquire(unsafe.Pointer(&ioSync))\n\t}\n\treturn err\n}\n\nfunc WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {\n\tif raceenabled {\n\t\traceReleaseMerge(unsafe.Pointer(&ioSync))\n\t}\n\terr := writeFile(fd, p, done, overlapped)\n\tif raceenabled && *done > 0 {\n\t\traceReadRange(unsafe.Pointer(&p[0]), int(*done))\n\t}\n\treturn err\n}\n\nvar ioSync int64\n\nfunc Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {\n\tvar w uint32\n\tswitch whence {\n\tcase 0:\n\t\tw = FILE_BEGIN\n\tcase 1:\n\t\tw = FILE_CURRENT\n\tcase 2:\n\t\tw = FILE_END\n\t}\n\thi := int32(offset >> 32)\n\tlo := int32(offset)\n\t// use GetFileType to check pipe, pipe can't do seek\n\tft, _ := GetFileType(fd)\n\tif ft == FILE_TYPE_PIPE {\n\t\treturn 0, syscall.EPIPE\n\t}\n\trlo, e := SetFilePointer(fd, lo, &hi, w)\n\tif e != nil {\n\t\treturn 0, e\n\t}\n\treturn int64(hi)<<32 + int64(rlo), nil\n}\n\nfunc Close(fd Handle) (err error) {\n\treturn CloseHandle(fd)\n}\n\nvar (\n\tStdin  = getStdHandle(STD_INPUT_HANDLE)\n\tStdout = getStdHandle(STD_OUTPUT_HANDLE)\n\tStderr = getStdHandle(STD_ERROR_HANDLE)\n)\n\nfunc getStdHandle(stdhandle uint32) (fd Handle) {\n\tr, _ := GetStdHandle(stdhandle)\n\treturn r\n}\n\nconst ImplementsGetwd = true\n\nfunc Getwd() (wd string, err error) {\n\tb := make([]uint16, 300)\n\tn, e := GetCurrentDirectory(uint32(len(b)), &b[0])\n\tif e != nil {\n\t\treturn \"\", e\n\t}\n\treturn string(utf16.Decode(b[0:n])), nil\n}\n\nfunc Chdir(path string) (err error) {\n\tpathp, err := UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn SetCurrentDirectory(pathp)\n}\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tpathp, err := UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn CreateDirectory(pathp, nil)\n}\n\nfunc Rmdir(path string) (err error) {\n\tpathp, err := UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn RemoveDirectory(pathp)\n}\n\nfunc Unlink(path string) (err error) {\n\tpathp, err := UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn DeleteFile(pathp)\n}\n\nfunc Rename(oldpath, newpath string) (err error) {\n\tfrom, err := UTF16PtrFromString(oldpath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tto, err := UTF16PtrFromString(newpath)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING)\n}\n\nfunc ComputerName() (name string, err error) {\n\tvar n uint32 = MAX_COMPUTERNAME_LENGTH + 1\n\tb := make([]uint16, n)\n\te := GetComputerName(&b[0], &n)\n\tif e != nil {\n\t\treturn \"\", e\n\t}\n\treturn string(utf16.Decode(b[0:n])), nil\n}\n\nfunc DurationSinceBoot() time.Duration {\n\treturn time.Duration(getTickCount64()) * time.Millisecond\n}\n\nfunc Ftruncate(fd Handle, length int64) (err error) {\n\ttype _FILE_END_OF_FILE_INFO struct {\n\t\tEndOfFile int64\n\t}\n\tvar info _FILE_END_OF_FILE_INFO\n\tinfo.EndOfFile = length\n\treturn SetFileInformationByHandle(fd, FileEndOfFileInfo, (*byte)(unsafe.Pointer(&info)), uint32(unsafe.Sizeof(info)))\n}\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\tvar ft Filetime\n\tGetSystemTimeAsFileTime(&ft)\n\t*tv = NsecToTimeval(ft.Nanoseconds())\n\treturn nil\n}\n\nfunc Pipe(p []Handle) (err error) {\n\tif len(p) != 2 {\n\t\treturn syscall.EINVAL\n\t}\n\tvar r, w Handle\n\te := CreatePipe(&r, &w, makeInheritSa(), 0)\n\tif e != nil {\n\t\treturn e\n\t}\n\tp[0] = r\n\tp[1] = w\n\treturn nil\n}\n\nfunc Utimes(path string, tv []Timeval) (err error) {\n\tif len(tv) != 2 {\n\t\treturn syscall.EINVAL\n\t}\n\tpathp, e := UTF16PtrFromString(path)\n\tif e != nil {\n\t\treturn e\n\t}\n\th, e := CreateFile(pathp,\n\t\tFILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,\n\t\tOPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)\n\tif e != nil {\n\t\treturn e\n\t}\n\tdefer CloseHandle(h)\n\ta := NsecToFiletime(tv[0].Nanoseconds())\n\tw := NsecToFiletime(tv[1].Nanoseconds())\n\treturn SetFileTime(h, nil, &a, &w)\n}\n\nfunc UtimesNano(path string, ts []Timespec) (err error) {\n\tif len(ts) != 2 {\n\t\treturn syscall.EINVAL\n\t}\n\tpathp, e := UTF16PtrFromString(path)\n\tif e != nil {\n\t\treturn e\n\t}\n\th, e := CreateFile(pathp,\n\t\tFILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,\n\t\tOPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0)\n\tif e != nil {\n\t\treturn e\n\t}\n\tdefer CloseHandle(h)\n\ta := NsecToFiletime(TimespecToNsec(ts[0]))\n\tw := NsecToFiletime(TimespecToNsec(ts[1]))\n\treturn SetFileTime(h, nil, &a, &w)\n}\n\nfunc Fsync(fd Handle) (err error) {\n\treturn FlushFileBuffers(fd)\n}\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tp, e := UTF16PtrFromString(path)\n\tif e != nil {\n\t\treturn e\n\t}\n\tattrs, e := GetFileAttributes(p)\n\tif e != nil {\n\t\treturn e\n\t}\n\tif mode&S_IWRITE != 0 {\n\t\tattrs &^= FILE_ATTRIBUTE_READONLY\n\t} else {\n\t\tattrs |= FILE_ATTRIBUTE_READONLY\n\t}\n\treturn SetFileAttributes(p, attrs)\n}\n\nfunc LoadGetSystemTimePreciseAsFileTime() error {\n\treturn procGetSystemTimePreciseAsFileTime.Find()\n}\n\nfunc LoadCancelIoEx() error {\n\treturn procCancelIoEx.Find()\n}\n\nfunc LoadSetFileCompletionNotificationModes() error {\n\treturn procSetFileCompletionNotificationModes.Find()\n}\n\nfunc WaitForMultipleObjects(handles []Handle, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {\n\t// Every other win32 array API takes arguments as \"pointer, count\", except for this function. So we\n\t// can't declare it as a usual [] type, because mksyscall will use the opposite order. We therefore\n\t// trivially stub this ourselves.\n\n\tvar handlePtr *Handle\n\tif len(handles) > 0 {\n\t\thandlePtr = &handles[0]\n\t}\n\treturn waitForMultipleObjects(uint32(len(handles)), uintptr(unsafe.Pointer(handlePtr)), waitAll, waitMilliseconds)\n}\n\n// net api calls\n\nconst socket_error = uintptr(^uint32(0))\n\n//sys\tWSAStartup(verreq uint32, data *WSAData) (sockerr error) = ws2_32.WSAStartup\n//sys\tWSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup\n//sys\tWSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl\n//sys\tWSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceBeginW\n//sys\tWSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceNextW\n//sys\tWSALookupServiceEnd(handle Handle) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceEnd\n//sys\tsocket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket\n//sys\tsendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) [failretval==socket_error] = ws2_32.sendto\n//sys\trecvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) [failretval==-1] = ws2_32.recvfrom\n//sys\tSetsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt\n//sys\tGetsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt\n//sys\tbind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind\n//sys\tconnect(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.connect\n//sys\tgetsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockname\n//sys\tgetpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getpeername\n//sys\tlisten(s Handle, backlog int32) (err error) [failretval==socket_error] = ws2_32.listen\n//sys\tshutdown(s Handle, how int32) (err error) [failretval==socket_error] = ws2_32.shutdown\n//sys\tClosesocket(s Handle) (err error) [failretval==socket_error] = ws2_32.closesocket\n//sys\tAcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) = mswsock.AcceptEx\n//sys\tGetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) = mswsock.GetAcceptExSockaddrs\n//sys\tWSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecv\n//sys\tWSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend\n//sys\tWSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32,  from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom\n//sys\tWSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32,  overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo\n//sys\tWSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW\n//sys\tWSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) [failretval!=0] = ws2_32.WSADuplicateSocketW\n//sys\tGetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname\n//sys\tGetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname\n//sys\tNtohs(netshort uint16) (u uint16) = ws2_32.ntohs\n//sys\tGetProtoByName(name string) (p *Protoent, err error) [failretval==nil] = ws2_32.getprotobyname\n//sys\tDnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) = dnsapi.DnsQuery_W\n//sys\tDnsRecordListFree(rl *DNSRecord, freetype uint32) = dnsapi.DnsRecordListFree\n//sys\tDnsNameCompare(name1 *uint16, name2 *uint16) (same bool) = dnsapi.DnsNameCompare_W\n//sys\tGetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) = ws2_32.GetAddrInfoW\n//sys\tFreeAddrInfoW(addrinfo *AddrinfoW) = ws2_32.FreeAddrInfoW\n//sys\tGetIfEntry(pIfRow *MibIfRow) (errcode error) = iphlpapi.GetIfEntry\n//sys\tGetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo\n//sys\tSetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes\n//sys\tWSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW\n//sys\tWSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult\n//sys\tGetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses\n//sys\tGetACP() (acp uint32) = kernel32.GetACP\n//sys\tMultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar\n//sys\tgetBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx\n//sys   GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex\n//sys   GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2\n//sys   GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2\n//sys   GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry\n//sys   FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable\n//sys   NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange\n//sys   NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2\n//sys   NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange\n//sys   CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2\n//sys\tIsProcessorFeaturePresent(ProcessorFeature uint32) (ret bool) = kernel32.IsProcessorFeaturePresent\n\n// For testing: clients can set this flag to force\n// creation of IPv6 sockets to return EAFNOSUPPORT.\nvar SocketDisableIPv6 bool\n\ntype RawSockaddrInet4 struct {\n\tFamily uint16\n\tPort   uint16\n\tAddr   [4]byte /* in_addr */\n\tZero   [8]uint8\n}\n\ntype RawSockaddrInet6 struct {\n\tFamily   uint16\n\tPort     uint16\n\tFlowinfo uint32\n\tAddr     [16]byte /* in6_addr */\n\tScope_id uint32\n}\n\n// RawSockaddrInet is a union that contains an IPv4, an IPv6 address, or an address family. See\n// https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-sockaddr_inet.\n//\n// A [*RawSockaddrInet] may be converted to a [*RawSockaddrInet4] or [*RawSockaddrInet6] using\n// unsafe, depending on the address family.\ntype RawSockaddrInet struct {\n\tFamily uint16\n\tPort   uint16\n\tData   [6]uint32\n}\n\ntype RawSockaddr struct {\n\tFamily uint16\n\tData   [14]int8\n}\n\ntype RawSockaddrAny struct {\n\tAddr RawSockaddr\n\tPad  [100]int8\n}\n\ntype Sockaddr interface {\n\tsockaddr() (ptr unsafe.Pointer, len int32, err error) // lowercase; only we can define Sockaddrs\n}\n\ntype SockaddrInet4 struct {\n\tPort int\n\tAddr [4]byte\n\traw  RawSockaddrInet4\n}\n\nfunc (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, syscall.EINVAL\n\t}\n\tsa.raw.Family = AF_INET\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil\n}\n\ntype SockaddrInet6 struct {\n\tPort   int\n\tZoneId uint32\n\tAddr   [16]byte\n\traw    RawSockaddrInet6\n}\n\nfunc (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {\n\tif sa.Port < 0 || sa.Port > 0xFFFF {\n\t\treturn nil, 0, syscall.EINVAL\n\t}\n\tsa.raw.Family = AF_INET6\n\tp := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))\n\tp[0] = byte(sa.Port >> 8)\n\tp[1] = byte(sa.Port)\n\tsa.raw.Scope_id = sa.ZoneId\n\tsa.raw.Addr = sa.Addr\n\treturn unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil\n}\n\ntype RawSockaddrUnix struct {\n\tFamily uint16\n\tPath   [UNIX_PATH_MAX]int8\n}\n\ntype SockaddrUnix struct {\n\tName string\n\traw  RawSockaddrUnix\n}\n\nfunc (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {\n\tname := sa.Name\n\tn := len(name)\n\tif n > len(sa.raw.Path) {\n\t\treturn nil, 0, syscall.EINVAL\n\t}\n\tif n == len(sa.raw.Path) && name[0] != '@' {\n\t\treturn nil, 0, syscall.EINVAL\n\t}\n\tsa.raw.Family = AF_UNIX\n\tfor i := 0; i < n; i++ {\n\t\tsa.raw.Path[i] = int8(name[i])\n\t}\n\t// length is family (uint16), name, NUL.\n\tsl := int32(2)\n\tif n > 0 {\n\t\tsl += int32(n) + 1\n\t}\n\tif sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) {\n\t\t// Check sl > 3 so we don't change unnamed socket behavior.\n\t\tsa.raw.Path[0] = 0\n\t\t// Don't count trailing NUL for abstract address.\n\t\tsl--\n\t}\n\n\treturn unsafe.Pointer(&sa.raw), sl, nil\n}\n\ntype RawSockaddrBth struct {\n\tAddressFamily  [2]byte\n\tBtAddr         [8]byte\n\tServiceClassId [16]byte\n\tPort           [4]byte\n}\n\ntype SockaddrBth struct {\n\tBtAddr         uint64\n\tServiceClassId GUID\n\tPort           uint32\n\n\traw RawSockaddrBth\n}\n\nfunc (sa *SockaddrBth) sockaddr() (unsafe.Pointer, int32, error) {\n\tfamily := AF_BTH\n\tsa.raw = RawSockaddrBth{\n\t\tAddressFamily:  *(*[2]byte)(unsafe.Pointer(&family)),\n\t\tBtAddr:         *(*[8]byte)(unsafe.Pointer(&sa.BtAddr)),\n\t\tPort:           *(*[4]byte)(unsafe.Pointer(&sa.Port)),\n\t\tServiceClassId: *(*[16]byte)(unsafe.Pointer(&sa.ServiceClassId)),\n\t}\n\treturn unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil\n}\n\nfunc (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {\n\tswitch rsa.Addr.Family {\n\tcase AF_UNIX:\n\t\tpp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrUnix)\n\t\tif pp.Path[0] == 0 {\n\t\t\t// \"Abstract\" Unix domain socket.\n\t\t\t// Rewrite leading NUL as @ for textual display.\n\t\t\t// (This is the standard convention.)\n\t\t\t// Not friendly to overwrite in place,\n\t\t\t// but the callers below don't care.\n\t\t\tpp.Path[0] = '@'\n\t\t}\n\n\t\t// Assume path ends at NUL.\n\t\t// This is not technically the Linux semantics for\n\t\t// abstract Unix domain sockets--they are supposed\n\t\t// to be uninterpreted fixed-size binary blobs--but\n\t\t// everyone uses this convention.\n\t\tn := 0\n\t\tfor n < len(pp.Path) && pp.Path[n] != 0 {\n\t\t\tn++\n\t\t}\n\t\tsa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))\n\t\treturn sa, nil\n\n\tcase AF_INET:\n\t\tpp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet4)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\n\tcase AF_INET6:\n\t\tpp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))\n\t\tsa := new(SockaddrInet6)\n\t\tp := (*[2]byte)(unsafe.Pointer(&pp.Port))\n\t\tsa.Port = int(p[0])<<8 + int(p[1])\n\t\tsa.ZoneId = pp.Scope_id\n\t\tsa.Addr = pp.Addr\n\t\treturn sa, nil\n\t}\n\treturn nil, syscall.EAFNOSUPPORT\n}\n\nfunc Socket(domain, typ, proto int) (fd Handle, err error) {\n\tif domain == AF_INET6 && SocketDisableIPv6 {\n\t\treturn InvalidHandle, syscall.EAFNOSUPPORT\n\t}\n\treturn socket(int32(domain), int32(typ), int32(proto))\n}\n\nfunc SetsockoptInt(fd Handle, level, opt int, value int) (err error) {\n\tv := int32(value)\n\treturn Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), int32(unsafe.Sizeof(v)))\n}\n\nfunc Bind(fd Handle, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn bind(fd, ptr, n)\n}\n\nfunc Connect(fd Handle, sa Sockaddr) (err error) {\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn connect(fd, ptr, n)\n}\n\nfunc GetBestInterfaceEx(sa Sockaddr, pdwBestIfIndex *uint32) (err error) {\n\tptr, _, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn getBestInterfaceEx(ptr, pdwBestIfIndex)\n}\n\nfunc Getsockname(fd Handle) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tl := int32(unsafe.Sizeof(rsa))\n\tif err = getsockname(fd, &rsa, &l); err != nil {\n\t\treturn\n\t}\n\treturn rsa.Sockaddr()\n}\n\nfunc Getpeername(fd Handle) (sa Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tl := int32(unsafe.Sizeof(rsa))\n\tif err = getpeername(fd, &rsa, &l); err != nil {\n\t\treturn\n\t}\n\treturn rsa.Sockaddr()\n}\n\nfunc Listen(s Handle, n int) (err error) {\n\treturn listen(s, int32(n))\n}\n\nfunc Shutdown(fd Handle, how int) (err error) {\n\treturn shutdown(fd, int32(how))\n}\n\nfunc WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {\n\tvar rsa unsafe.Pointer\n\tvar l int32\n\tif to != nil {\n\t\trsa, l, err = to.sockaddr()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)\n}\n\nfunc LoadGetAddrInfo() error {\n\treturn procGetAddrInfoW.Find()\n}\n\nvar connectExFunc struct {\n\tonce sync.Once\n\taddr uintptr\n\terr  error\n}\n\nfunc LoadConnectEx() error {\n\tconnectExFunc.once.Do(func() {\n\t\tvar s Handle\n\t\ts, connectExFunc.err = Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)\n\t\tif connectExFunc.err != nil {\n\t\t\treturn\n\t\t}\n\t\tdefer CloseHandle(s)\n\t\tvar n uint32\n\t\tconnectExFunc.err = WSAIoctl(s,\n\t\t\tSIO_GET_EXTENSION_FUNCTION_POINTER,\n\t\t\t(*byte)(unsafe.Pointer(&WSAID_CONNECTEX)),\n\t\t\tuint32(unsafe.Sizeof(WSAID_CONNECTEX)),\n\t\t\t(*byte)(unsafe.Pointer(&connectExFunc.addr)),\n\t\t\tuint32(unsafe.Sizeof(connectExFunc.addr)),\n\t\t\t&n, nil, 0)\n\t})\n\treturn connectExFunc.err\n}\n\nfunc connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0)\n\tif r1 == 0 {\n\t\tif e1 != 0 {\n\t\t\terr = error(e1)\n\t\t} else {\n\t\t\terr = syscall.EINVAL\n\t\t}\n\t}\n\treturn\n}\n\nfunc ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) error {\n\terr := LoadConnectEx()\n\tif err != nil {\n\t\treturn errorspkg.New(\"failed to find ConnectEx: \" + err.Error())\n\t}\n\tptr, n, err := sa.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)\n}\n\nvar sendRecvMsgFunc struct {\n\tonce     sync.Once\n\tsendAddr uintptr\n\trecvAddr uintptr\n\terr      error\n}\n\nfunc loadWSASendRecvMsg() error {\n\tsendRecvMsgFunc.once.Do(func() {\n\t\tvar s Handle\n\t\ts, sendRecvMsgFunc.err = Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)\n\t\tif sendRecvMsgFunc.err != nil {\n\t\t\treturn\n\t\t}\n\t\tdefer CloseHandle(s)\n\t\tvar n uint32\n\t\tsendRecvMsgFunc.err = WSAIoctl(s,\n\t\t\tSIO_GET_EXTENSION_FUNCTION_POINTER,\n\t\t\t(*byte)(unsafe.Pointer(&WSAID_WSARECVMSG)),\n\t\t\tuint32(unsafe.Sizeof(WSAID_WSARECVMSG)),\n\t\t\t(*byte)(unsafe.Pointer(&sendRecvMsgFunc.recvAddr)),\n\t\t\tuint32(unsafe.Sizeof(sendRecvMsgFunc.recvAddr)),\n\t\t\t&n, nil, 0)\n\t\tif sendRecvMsgFunc.err != nil {\n\t\t\treturn\n\t\t}\n\t\tsendRecvMsgFunc.err = WSAIoctl(s,\n\t\t\tSIO_GET_EXTENSION_FUNCTION_POINTER,\n\t\t\t(*byte)(unsafe.Pointer(&WSAID_WSASENDMSG)),\n\t\t\tuint32(unsafe.Sizeof(WSAID_WSASENDMSG)),\n\t\t\t(*byte)(unsafe.Pointer(&sendRecvMsgFunc.sendAddr)),\n\t\t\tuint32(unsafe.Sizeof(sendRecvMsgFunc.sendAddr)),\n\t\t\t&n, nil, 0)\n\t})\n\treturn sendRecvMsgFunc.err\n}\n\nfunc WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlapped *Overlapped, croutine *byte) error {\n\terr := loadWSASendRecvMsg()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn err\n}\n\nfunc WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overlapped, croutine *byte) error {\n\terr := loadWSASendRecvMsg()\n\tif err != nil {\n\t\treturn err\n\t}\n\tr1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0)\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn err\n}\n\n// Invented structures to support what package os expects.\ntype Rusage struct {\n\tCreationTime Filetime\n\tExitTime     Filetime\n\tKernelTime   Filetime\n\tUserTime     Filetime\n}\n\ntype WaitStatus struct {\n\tExitCode uint32\n}\n\nfunc (w WaitStatus) Exited() bool { return true }\n\nfunc (w WaitStatus) ExitStatus() int { return int(w.ExitCode) }\n\nfunc (w WaitStatus) Signal() Signal { return -1 }\n\nfunc (w WaitStatus) CoreDump() bool { return false }\n\nfunc (w WaitStatus) Stopped() bool { return false }\n\nfunc (w WaitStatus) Continued() bool { return false }\n\nfunc (w WaitStatus) StopSignal() Signal { return -1 }\n\nfunc (w WaitStatus) Signaled() bool { return false }\n\nfunc (w WaitStatus) TrapCause() int { return -1 }\n\n// Timespec is an invented structure on Windows, but here for\n// consistency with the corresponding package for other operating systems.\ntype Timespec struct {\n\tSec  int64\n\tNsec int64\n}\n\nfunc TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }\n\nfunc NsecToTimespec(nsec int64) (ts Timespec) {\n\tts.Sec = nsec / 1e9\n\tts.Nsec = nsec % 1e9\n\treturn\n}\n\n// TODO(brainman): fix all needed for net\n\nfunc Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, syscall.EWINDOWS }\n\nfunc Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) {\n\tvar rsa RawSockaddrAny\n\tl := int32(unsafe.Sizeof(rsa))\n\tn32, err := recvfrom(fd, p, int32(flags), &rsa, &l)\n\tn = int(n32)\n\tif err != nil {\n\t\treturn\n\t}\n\tfrom, err = rsa.Sockaddr()\n\treturn\n}\n\nfunc Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) {\n\tptr, l, err := to.sockaddr()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn sendto(fd, p, int32(flags), ptr, l)\n}\n\nfunc SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return syscall.EWINDOWS }\n\n// The Linger struct is wrong but we only noticed after Go 1.\n// sysLinger is the real system call structure.\n\n// BUG(brainman): The definition of Linger is not appropriate for direct use\n// with Setsockopt and Getsockopt.\n// Use SetsockoptLinger instead.\n\ntype Linger struct {\n\tOnoff  int32\n\tLinger int32\n}\n\ntype sysLinger struct {\n\tOnoff  uint16\n\tLinger uint16\n}\n\ntype IPMreq struct {\n\tMultiaddr [4]byte /* in_addr */\n\tInterface [4]byte /* in_addr */\n}\n\ntype IPv6Mreq struct {\n\tMultiaddr [16]byte /* in6_addr */\n\tInterface uint32\n}\n\nfunc GetsockoptInt(fd Handle, level, opt int) (int, error) {\n\tv := int32(0)\n\tl := int32(unsafe.Sizeof(v))\n\terr := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l)\n\treturn int(v), err\n}\n\nfunc SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {\n\tsys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}\n\treturn Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&sys)), int32(unsafe.Sizeof(sys)))\n}\n\nfunc SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) {\n\treturn Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4)\n}\n\nfunc SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {\n\treturn Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))\n}\n\nfunc SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {\n\treturn syscall.EWINDOWS\n}\n\nfunc EnumProcesses(processIds []uint32, bytesReturned *uint32) error {\n\t// EnumProcesses syscall expects the size parameter to be in bytes, but the code generated with mksyscall uses\n\t// the length of the processIds slice instead. Hence, this wrapper function is added to fix the discrepancy.\n\tvar p *uint32\n\tif len(processIds) > 0 {\n\t\tp = &processIds[0]\n\t}\n\tsize := uint32(len(processIds) * 4)\n\treturn enumProcesses(p, size, bytesReturned)\n}\n\nfunc Getpid() (pid int) { return int(GetCurrentProcessId()) }\n\nfunc FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {\n\t// NOTE(rsc): The Win32finddata struct is wrong for the system call:\n\t// the two paths are each one uint16 short. Use the correct struct,\n\t// a win32finddata1, and then copy the results out.\n\t// There is no loss of expressivity here, because the final\n\t// uint16, if it is used, is supposed to be a NUL, and Go doesn't need that.\n\t// For Go 1.1, we might avoid the allocation of win32finddata1 here\n\t// by adding a final Bug [2]uint16 field to the struct and then\n\t// adjusting the fields in the result directly.\n\tvar data1 win32finddata1\n\thandle, err = findFirstFile1(name, &data1)\n\tif err == nil {\n\t\tcopyFindData(data, &data1)\n\t}\n\treturn\n}\n\nfunc FindNextFile(handle Handle, data *Win32finddata) (err error) {\n\tvar data1 win32finddata1\n\terr = findNextFile1(handle, &data1)\n\tif err == nil {\n\t\tcopyFindData(data, &data1)\n\t}\n\treturn\n}\n\nfunc getProcessEntry(pid int) (*ProcessEntry32, error) {\n\tsnapshot, err := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer CloseHandle(snapshot)\n\tvar procEntry ProcessEntry32\n\tprocEntry.Size = uint32(unsafe.Sizeof(procEntry))\n\tif err = Process32First(snapshot, &procEntry); err != nil {\n\t\treturn nil, err\n\t}\n\tfor {\n\t\tif procEntry.ProcessID == uint32(pid) {\n\t\t\treturn &procEntry, nil\n\t\t}\n\t\terr = Process32Next(snapshot, &procEntry)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n}\n\nfunc Getppid() (ppid int) {\n\tpe, err := getProcessEntry(Getpid())\n\tif err != nil {\n\t\treturn -1\n\t}\n\treturn int(pe.ParentProcessID)\n}\n\n// TODO(brainman): fix all needed for os\nfunc Fchdir(fd Handle) (err error)             { return syscall.EWINDOWS }\nfunc Link(oldpath, newpath string) (err error) { return syscall.EWINDOWS }\nfunc Symlink(path, link string) (err error)    { return syscall.EWINDOWS }\n\nfunc Fchmod(fd Handle, mode uint32) (err error)        { return syscall.EWINDOWS }\nfunc Chown(path string, uid int, gid int) (err error)  { return syscall.EWINDOWS }\nfunc Lchown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS }\nfunc Fchown(fd Handle, uid int, gid int) (err error)   { return syscall.EWINDOWS }\n\nfunc Getuid() (uid int)                  { return -1 }\nfunc Geteuid() (euid int)                { return -1 }\nfunc Getgid() (gid int)                  { return -1 }\nfunc Getegid() (egid int)                { return -1 }\nfunc Getgroups() (gids []int, err error) { return nil, syscall.EWINDOWS }\n\nfunc LoadCreateSymbolicLink() error {\n\treturn procCreateSymbolicLinkW.Find()\n}\n\n// Readlink returns the destination of the named symbolic link.\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tfd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0, nil, OPEN_EXISTING,\n\t\tFILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\tdefer CloseHandle(fd)\n\n\trdbbuf := make([]byte, MAXIMUM_REPARSE_DATA_BUFFER_SIZE)\n\tvar bytesReturned uint32\n\terr = DeviceIoControl(fd, FSCTL_GET_REPARSE_POINT, nil, 0, &rdbbuf[0], uint32(len(rdbbuf)), &bytesReturned, nil)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\trdb := (*reparseDataBuffer)(unsafe.Pointer(&rdbbuf[0]))\n\tvar s string\n\tswitch rdb.ReparseTag {\n\tcase IO_REPARSE_TAG_SYMLINK:\n\t\tdata := (*symbolicLinkReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer))\n\t\tp := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0]))\n\t\ts = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2])\n\tcase IO_REPARSE_TAG_MOUNT_POINT:\n\t\tdata := (*mountPointReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer))\n\t\tp := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0]))\n\t\ts = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2])\n\tdefault:\n\t\t// the path is not a symlink or junction but another type of reparse\n\t\t// point\n\t\treturn -1, syscall.ENOENT\n\t}\n\tn = copy(buf, []byte(s))\n\n\treturn n, nil\n}\n\n// GUIDFromString parses a string in the form of\n// \"{XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\" into a GUID.\nfunc GUIDFromString(str string) (GUID, error) {\n\tguid := GUID{}\n\tstr16, err := syscall.UTF16PtrFromString(str)\n\tif err != nil {\n\t\treturn guid, err\n\t}\n\terr = clsidFromString(str16, &guid)\n\tif err != nil {\n\t\treturn guid, err\n\t}\n\treturn guid, nil\n}\n\n// GenerateGUID creates a new random GUID.\nfunc GenerateGUID() (GUID, error) {\n\tguid := GUID{}\n\terr := coCreateGuid(&guid)\n\tif err != nil {\n\t\treturn guid, err\n\t}\n\treturn guid, nil\n}\n\n// String returns the canonical string form of the GUID,\n// in the form of \"{XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\".\nfunc (guid GUID) String() string {\n\tvar str [100]uint16\n\tchars := stringFromGUID2(&guid, &str[0], int32(len(str)))\n\tif chars <= 1 {\n\t\treturn \"\"\n\t}\n\treturn string(utf16.Decode(str[:chars-1]))\n}\n\n// KnownFolderPath returns a well-known folder path for the current user, specified by one of\n// the FOLDERID_ constants, and chosen and optionally created based on a KF_ flag.\nfunc KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, error) {\n\treturn Token(0).KnownFolderPath(folderID, flags)\n}\n\n// KnownFolderPath returns a well-known folder path for the user token, specified by one of\n// the FOLDERID_ constants, and chosen and optionally created based on a KF_ flag.\nfunc (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, error) {\n\tvar p *uint16\n\terr := shGetKnownFolderPath(folderID, flags, t, &p)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer CoTaskMemFree(unsafe.Pointer(p))\n\treturn UTF16PtrToString(p), nil\n}\n\n// RtlGetVersion returns the version of the underlying operating system, ignoring\n// manifest semantics but is affected by the application compatibility layer.\nfunc RtlGetVersion() *OsVersionInfoEx {\n\tinfo := &OsVersionInfoEx{}\n\tinfo.osVersionInfoSize = uint32(unsafe.Sizeof(*info))\n\t// According to documentation, this function always succeeds.\n\t// The function doesn't even check the validity of the\n\t// osVersionInfoSize member. Disassembling ntdll.dll indicates\n\t// that the documentation is indeed correct about that.\n\t_ = rtlGetVersion(info)\n\treturn info\n}\n\n// RtlGetNtVersionNumbers returns the version of the underlying operating system,\n// ignoring manifest semantics and the application compatibility layer.\nfunc RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32) {\n\trtlGetNtVersionNumbers(&majorVersion, &minorVersion, &buildNumber)\n\tbuildNumber &= 0xffff\n\treturn\n}\n\n// GetProcessPreferredUILanguages retrieves the process preferred UI languages.\nfunc GetProcessPreferredUILanguages(flags uint32) ([]string, error) {\n\treturn getUILanguages(flags, getProcessPreferredUILanguages)\n}\n\n// GetThreadPreferredUILanguages retrieves the thread preferred UI languages for the current thread.\nfunc GetThreadPreferredUILanguages(flags uint32) ([]string, error) {\n\treturn getUILanguages(flags, getThreadPreferredUILanguages)\n}\n\n// GetUserPreferredUILanguages retrieves information about the user preferred UI languages.\nfunc GetUserPreferredUILanguages(flags uint32) ([]string, error) {\n\treturn getUILanguages(flags, getUserPreferredUILanguages)\n}\n\n// GetSystemPreferredUILanguages retrieves the system preferred UI languages.\nfunc GetSystemPreferredUILanguages(flags uint32) ([]string, error) {\n\treturn getUILanguages(flags, getSystemPreferredUILanguages)\n}\n\nfunc getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) error) ([]string, error) {\n\tsize := uint32(128)\n\tfor {\n\t\tvar numLanguages uint32\n\t\tbuf := make([]uint16, size)\n\t\terr := f(flags, &numLanguages, &buf[0], &size)\n\t\tif err == ERROR_INSUFFICIENT_BUFFER {\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbuf = buf[:size]\n\t\tif numLanguages == 0 || len(buf) == 0 { // GetProcessPreferredUILanguages may return numLanguages==0 with \"\\0\\0\"\n\t\t\treturn []string{}, nil\n\t\t}\n\t\tif buf[len(buf)-1] == 0 {\n\t\t\tbuf = buf[:len(buf)-1] // remove terminating null\n\t\t}\n\t\tlanguages := make([]string, 0, numLanguages)\n\t\tfrom := 0\n\t\tfor i, c := range buf {\n\t\t\tif c == 0 {\n\t\t\t\tlanguages = append(languages, string(utf16.Decode(buf[from:i])))\n\t\t\t\tfrom = i + 1\n\t\t\t}\n\t\t}\n\t\treturn languages, nil\n\t}\n}\n\nfunc SetConsoleCursorPosition(console Handle, position Coord) error {\n\treturn setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))\n}\n\nfunc GetStartupInfo(startupInfo *StartupInfo) error {\n\tgetStartupInfo(startupInfo)\n\treturn nil\n}\n\nfunc (s NTStatus) Errno() syscall.Errno {\n\treturn rtlNtStatusToDosErrorNoTeb(s)\n}\n\nfunc langID(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) }\n\nfunc (s NTStatus) Error() string {\n\tb := make([]uint16, 300)\n\tn, err := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil)\n\tif err != nil {\n\t\treturn fmt.Sprintf(\"NTSTATUS 0x%08x\", uint32(s))\n\t}\n\t// trim terminating \\r and \\n\n\tfor ; n > 0 && (b[n-1] == '\\n' || b[n-1] == '\\r'); n-- {\n\t}\n\treturn string(utf16.Decode(b[:n]))\n}\n\n// NewNTUnicodeString returns a new NTUnicodeString structure for use with native\n// NT APIs that work over the NTUnicodeString type. Note that most Windows APIs\n// do not use NTUnicodeString, and instead UTF16PtrFromString should be used for\n// the more common *uint16 string type.\nfunc NewNTUnicodeString(s string) (*NTUnicodeString, error) {\n\ts16, err := UTF16FromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tn := uint16(len(s16) * 2)\n\treturn &NTUnicodeString{\n\t\tLength:        n - 2, // subtract 2 bytes for the NULL terminator\n\t\tMaximumLength: n,\n\t\tBuffer:        &s16[0],\n\t}, nil\n}\n\n// Slice returns a uint16 slice that aliases the data in the NTUnicodeString.\nfunc (s *NTUnicodeString) Slice() []uint16 {\n\t// Note: this rounds the length down, if it happens\n\t// to (incorrectly) be odd. Probably safer than rounding up.\n\treturn unsafe.Slice(s.Buffer, s.MaximumLength/2)[:s.Length/2]\n}\n\nfunc (s *NTUnicodeString) String() string {\n\treturn UTF16ToString(s.Slice())\n}\n\n// NewNTString returns a new NTString structure for use with native\n// NT APIs that work over the NTString type. Note that most Windows APIs\n// do not use NTString, and instead UTF16PtrFromString should be used for\n// the more common *uint16 string type.\nfunc NewNTString(s string) (*NTString, error) {\n\tvar nts NTString\n\ts8, err := BytePtrFromString(s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tRtlInitString(&nts, s8)\n\treturn &nts, nil\n}\n\n// Slice returns a byte slice that aliases the data in the NTString.\nfunc (s *NTString) Slice() []byte {\n\tslice := unsafe.Slice(s.Buffer, s.MaximumLength)\n\treturn slice[:s.Length]\n}\n\nfunc (s *NTString) String() string {\n\treturn ByteSliceToString(s.Slice())\n}\n\n// FindResource resolves a resource of the given name and resource type.\nfunc FindResource(module Handle, name, resType ResourceIDOrString) (Handle, error) {\n\tvar namePtr, resTypePtr uintptr\n\tvar name16, resType16 *uint16\n\tvar err error\n\tresolvePtr := func(i interface{}, keep **uint16) (uintptr, error) {\n\t\tswitch v := i.(type) {\n\t\tcase string:\n\t\t\t*keep, err = UTF16PtrFromString(v)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\t\treturn uintptr(unsafe.Pointer(*keep)), nil\n\t\tcase ResourceID:\n\t\t\treturn uintptr(v), nil\n\t\t}\n\t\treturn 0, errorspkg.New(\"parameter must be a ResourceID or a string\")\n\t}\n\tnamePtr, err = resolvePtr(name, &name16)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tresTypePtr, err = resolvePtr(resType, &resType16)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tresInfo, err := findResource(module, namePtr, resTypePtr)\n\truntime.KeepAlive(name16)\n\truntime.KeepAlive(resType16)\n\treturn resInfo, err\n}\n\nfunc LoadResourceData(module, resInfo Handle) (data []byte, err error) {\n\tsize, err := SizeofResource(module, resInfo)\n\tif err != nil {\n\t\treturn\n\t}\n\tresData, err := LoadResource(module, resInfo)\n\tif err != nil {\n\t\treturn\n\t}\n\tptr, err := LockResource(resData)\n\tif err != nil {\n\t\treturn\n\t}\n\tdata = unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size)\n\treturn\n}\n\n// PSAPI_WORKING_SET_EX_BLOCK contains extended working set information for a page.\ntype PSAPI_WORKING_SET_EX_BLOCK uint64\n\n// Valid returns the validity of this page.\n// If this bit is 1, the subsequent members are valid; otherwise they should be ignored.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Valid() bool {\n\treturn (b & 1) == 1\n}\n\n// ShareCount is the number of processes that share this page. The maximum value of this member is 7.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) ShareCount() uint64 {\n\treturn b.intField(1, 3)\n}\n\n// Win32Protection is the memory protection attributes of the page. For a list of values, see\n// https://docs.microsoft.com/en-us/windows/win32/memory/memory-protection-constants\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Win32Protection() uint64 {\n\treturn b.intField(4, 11)\n}\n\n// Shared returns the shared status of this page.\n// If this bit is 1, the page can be shared.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Shared() bool {\n\treturn (b & (1 << 15)) == 1\n}\n\n// Node is the NUMA node. The maximum value of this member is 63.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Node() uint64 {\n\treturn b.intField(16, 6)\n}\n\n// Locked returns the locked status of this page.\n// If this bit is 1, the virtual page is locked in physical memory.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Locked() bool {\n\treturn (b & (1 << 22)) == 1\n}\n\n// LargePage returns the large page status of this page.\n// If this bit is 1, the page is a large page.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) LargePage() bool {\n\treturn (b & (1 << 23)) == 1\n}\n\n// Bad returns the bad status of this page.\n// If this bit is 1, the page is has been reported as bad.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) Bad() bool {\n\treturn (b & (1 << 31)) == 1\n}\n\n// intField extracts an integer field in the PSAPI_WORKING_SET_EX_BLOCK union.\nfunc (b PSAPI_WORKING_SET_EX_BLOCK) intField(start, length int) uint64 {\n\tvar mask PSAPI_WORKING_SET_EX_BLOCK\n\tfor pos := start; pos < start+length; pos++ {\n\t\tmask |= (1 << pos)\n\t}\n\n\tmasked := b & mask\n\treturn uint64(masked >> start)\n}\n\n// PSAPI_WORKING_SET_EX_INFORMATION contains extended working set information for a process.\ntype PSAPI_WORKING_SET_EX_INFORMATION struct {\n\t// The virtual address.\n\tVirtualAddress Pointer\n\t// A PSAPI_WORKING_SET_EX_BLOCK union that indicates the attributes of the page at VirtualAddress.\n\tVirtualAttributes PSAPI_WORKING_SET_EX_BLOCK\n}\n\n// CreatePseudoConsole creates a windows pseudo console.\nfunc CreatePseudoConsole(size Coord, in Handle, out Handle, flags uint32, pconsole *Handle) error {\n\t// We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only\n\t// accept arguments that can be casted to uintptr, and Coord can't.\n\treturn createPseudoConsole(*((*uint32)(unsafe.Pointer(&size))), in, out, flags, pconsole)\n}\n\n// ResizePseudoConsole resizes the internal buffers of the pseudo console to the width and height specified in `size`.\nfunc ResizePseudoConsole(pconsole Handle, size Coord) error {\n\t// We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only\n\t// accept arguments that can be casted to uintptr, and Coord can't.\n\treturn resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size))))\n}\n\n// DCB constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb.\nconst (\n\tCBR_110    = 110\n\tCBR_300    = 300\n\tCBR_600    = 600\n\tCBR_1200   = 1200\n\tCBR_2400   = 2400\n\tCBR_4800   = 4800\n\tCBR_9600   = 9600\n\tCBR_14400  = 14400\n\tCBR_19200  = 19200\n\tCBR_38400  = 38400\n\tCBR_57600  = 57600\n\tCBR_115200 = 115200\n\tCBR_128000 = 128000\n\tCBR_256000 = 256000\n\n\tDTR_CONTROL_DISABLE   = 0x00000000\n\tDTR_CONTROL_ENABLE    = 0x00000010\n\tDTR_CONTROL_HANDSHAKE = 0x00000020\n\n\tRTS_CONTROL_DISABLE   = 0x00000000\n\tRTS_CONTROL_ENABLE    = 0x00001000\n\tRTS_CONTROL_HANDSHAKE = 0x00002000\n\tRTS_CONTROL_TOGGLE    = 0x00003000\n\n\tNOPARITY    = 0\n\tODDPARITY   = 1\n\tEVENPARITY  = 2\n\tMARKPARITY  = 3\n\tSPACEPARITY = 4\n\n\tONESTOPBIT   = 0\n\tONE5STOPBITS = 1\n\tTWOSTOPBITS  = 2\n)\n\n// EscapeCommFunction constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-escapecommfunction.\nconst (\n\tSETXOFF  = 1\n\tSETXON   = 2\n\tSETRTS   = 3\n\tCLRRTS   = 4\n\tSETDTR   = 5\n\tCLRDTR   = 6\n\tSETBREAK = 8\n\tCLRBREAK = 9\n)\n\n// PurgeComm constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-purgecomm.\nconst (\n\tPURGE_TXABORT = 0x0001\n\tPURGE_RXABORT = 0x0002\n\tPURGE_TXCLEAR = 0x0004\n\tPURGE_RXCLEAR = 0x0008\n)\n\n// SetCommMask constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcommmask.\nconst (\n\tEV_RXCHAR  = 0x0001\n\tEV_RXFLAG  = 0x0002\n\tEV_TXEMPTY = 0x0004\n\tEV_CTS     = 0x0008\n\tEV_DSR     = 0x0010\n\tEV_RLSD    = 0x0020\n\tEV_BREAK   = 0x0040\n\tEV_ERR     = 0x0080\n\tEV_RING    = 0x0100\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/types_windows.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\nimport (\n\t\"net\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\n// NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and\n// other native functions.\ntype NTStatus uint32\n\nconst (\n\t// Invented values to support what package os expects.\n\tO_RDONLY   = 0x00000\n\tO_WRONLY   = 0x00001\n\tO_RDWR     = 0x00002\n\tO_CREAT    = 0x00040\n\tO_EXCL     = 0x00080\n\tO_NOCTTY   = 0x00100\n\tO_TRUNC    = 0x00200\n\tO_NONBLOCK = 0x00800\n\tO_APPEND   = 0x00400\n\tO_SYNC     = 0x01000\n\tO_ASYNC    = 0x02000\n\tO_CLOEXEC  = 0x80000\n)\n\nconst (\n\t// More invented values for signals\n\tSIGHUP  = Signal(0x1)\n\tSIGINT  = Signal(0x2)\n\tSIGQUIT = Signal(0x3)\n\tSIGILL  = Signal(0x4)\n\tSIGTRAP = Signal(0x5)\n\tSIGABRT = Signal(0x6)\n\tSIGBUS  = Signal(0x7)\n\tSIGFPE  = Signal(0x8)\n\tSIGKILL = Signal(0x9)\n\tSIGSEGV = Signal(0xb)\n\tSIGPIPE = Signal(0xd)\n\tSIGALRM = Signal(0xe)\n\tSIGTERM = Signal(0xf)\n)\n\nvar signals = [...]string{\n\t1:  \"hangup\",\n\t2:  \"interrupt\",\n\t3:  \"quit\",\n\t4:  \"illegal instruction\",\n\t5:  \"trace/breakpoint trap\",\n\t6:  \"aborted\",\n\t7:  \"bus error\",\n\t8:  \"floating point exception\",\n\t9:  \"killed\",\n\t10: \"user defined signal 1\",\n\t11: \"segmentation fault\",\n\t12: \"user defined signal 2\",\n\t13: \"broken pipe\",\n\t14: \"alarm clock\",\n\t15: \"terminated\",\n}\n\n// File flags for [os.OpenFile]. The O_ prefix is used to indicate\n// that these flags are specific to the OpenFile function.\nconst (\n\tO_FILE_FLAG_OPEN_NO_RECALL     = FILE_FLAG_OPEN_NO_RECALL\n\tO_FILE_FLAG_OPEN_REPARSE_POINT = FILE_FLAG_OPEN_REPARSE_POINT\n\tO_FILE_FLAG_SESSION_AWARE      = FILE_FLAG_SESSION_AWARE\n\tO_FILE_FLAG_POSIX_SEMANTICS    = FILE_FLAG_POSIX_SEMANTICS\n\tO_FILE_FLAG_BACKUP_SEMANTICS   = FILE_FLAG_BACKUP_SEMANTICS\n\tO_FILE_FLAG_DELETE_ON_CLOSE    = FILE_FLAG_DELETE_ON_CLOSE\n\tO_FILE_FLAG_SEQUENTIAL_SCAN    = FILE_FLAG_SEQUENTIAL_SCAN\n\tO_FILE_FLAG_RANDOM_ACCESS      = FILE_FLAG_RANDOM_ACCESS\n\tO_FILE_FLAG_NO_BUFFERING       = FILE_FLAG_NO_BUFFERING\n\tO_FILE_FLAG_OVERLAPPED         = FILE_FLAG_OVERLAPPED\n\tO_FILE_FLAG_WRITE_THROUGH      = FILE_FLAG_WRITE_THROUGH\n)\n\nconst (\n\tFILE_READ_DATA        = 0x00000001\n\tFILE_READ_ATTRIBUTES  = 0x00000080\n\tFILE_READ_EA          = 0x00000008\n\tFILE_WRITE_DATA       = 0x00000002\n\tFILE_WRITE_ATTRIBUTES = 0x00000100\n\tFILE_WRITE_EA         = 0x00000010\n\tFILE_APPEND_DATA      = 0x00000004\n\tFILE_EXECUTE          = 0x00000020\n\n\tFILE_GENERIC_READ    = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE\n\tFILE_GENERIC_WRITE   = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE\n\tFILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE\n\n\tFILE_LIST_DIRECTORY = 0x00000001\n\tFILE_TRAVERSE       = 0x00000020\n\n\tFILE_SHARE_READ   = 0x00000001\n\tFILE_SHARE_WRITE  = 0x00000002\n\tFILE_SHARE_DELETE = 0x00000004\n\n\tFILE_ATTRIBUTE_READONLY              = 0x00000001\n\tFILE_ATTRIBUTE_HIDDEN                = 0x00000002\n\tFILE_ATTRIBUTE_SYSTEM                = 0x00000004\n\tFILE_ATTRIBUTE_DIRECTORY             = 0x00000010\n\tFILE_ATTRIBUTE_ARCHIVE               = 0x00000020\n\tFILE_ATTRIBUTE_DEVICE                = 0x00000040\n\tFILE_ATTRIBUTE_NORMAL                = 0x00000080\n\tFILE_ATTRIBUTE_TEMPORARY             = 0x00000100\n\tFILE_ATTRIBUTE_SPARSE_FILE           = 0x00000200\n\tFILE_ATTRIBUTE_REPARSE_POINT         = 0x00000400\n\tFILE_ATTRIBUTE_COMPRESSED            = 0x00000800\n\tFILE_ATTRIBUTE_OFFLINE               = 0x00001000\n\tFILE_ATTRIBUTE_NOT_CONTENT_INDEXED   = 0x00002000\n\tFILE_ATTRIBUTE_ENCRYPTED             = 0x00004000\n\tFILE_ATTRIBUTE_INTEGRITY_STREAM      = 0x00008000\n\tFILE_ATTRIBUTE_VIRTUAL               = 0x00010000\n\tFILE_ATTRIBUTE_NO_SCRUB_DATA         = 0x00020000\n\tFILE_ATTRIBUTE_RECALL_ON_OPEN        = 0x00040000\n\tFILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS = 0x00400000\n\n\tINVALID_FILE_ATTRIBUTES = 0xffffffff\n\n\tCREATE_NEW        = 1\n\tCREATE_ALWAYS     = 2\n\tOPEN_EXISTING     = 3\n\tOPEN_ALWAYS       = 4\n\tTRUNCATE_EXISTING = 5\n\n\tFILE_FLAG_OPEN_REQUIRING_OPLOCK = 0x00040000\n\tFILE_FLAG_FIRST_PIPE_INSTANCE   = 0x00080000\n\tFILE_FLAG_OPEN_NO_RECALL        = 0x00100000\n\tFILE_FLAG_OPEN_REPARSE_POINT    = 0x00200000\n\tFILE_FLAG_SESSION_AWARE         = 0x00800000\n\tFILE_FLAG_POSIX_SEMANTICS       = 0x01000000\n\tFILE_FLAG_BACKUP_SEMANTICS      = 0x02000000\n\tFILE_FLAG_DELETE_ON_CLOSE       = 0x04000000\n\tFILE_FLAG_SEQUENTIAL_SCAN       = 0x08000000\n\tFILE_FLAG_RANDOM_ACCESS         = 0x10000000\n\tFILE_FLAG_NO_BUFFERING          = 0x20000000\n\tFILE_FLAG_OVERLAPPED            = 0x40000000\n\tFILE_FLAG_WRITE_THROUGH         = 0x80000000\n\n\tHANDLE_FLAG_INHERIT    = 0x00000001\n\tSTARTF_USESTDHANDLES   = 0x00000100\n\tSTARTF_USESHOWWINDOW   = 0x00000001\n\tDUPLICATE_CLOSE_SOURCE = 0x00000001\n\tDUPLICATE_SAME_ACCESS  = 0x00000002\n\n\tSTD_INPUT_HANDLE  = -10 & (1<<32 - 1)\n\tSTD_OUTPUT_HANDLE = -11 & (1<<32 - 1)\n\tSTD_ERROR_HANDLE  = -12 & (1<<32 - 1)\n\n\tFILE_BEGIN   = 0\n\tFILE_CURRENT = 1\n\tFILE_END     = 2\n\n\tLANG_ENGLISH       = 0x09\n\tSUBLANG_ENGLISH_US = 0x01\n\n\tFORMAT_MESSAGE_ALLOCATE_BUFFER = 256\n\tFORMAT_MESSAGE_IGNORE_INSERTS  = 512\n\tFORMAT_MESSAGE_FROM_STRING     = 1024\n\tFORMAT_MESSAGE_FROM_HMODULE    = 2048\n\tFORMAT_MESSAGE_FROM_SYSTEM     = 4096\n\tFORMAT_MESSAGE_ARGUMENT_ARRAY  = 8192\n\tFORMAT_MESSAGE_MAX_WIDTH_MASK  = 255\n\n\tMAX_PATH      = 260\n\tMAX_LONG_PATH = 32768\n\n\tMAX_MODULE_NAME32 = 255\n\n\tMAX_COMPUTERNAME_LENGTH = 15\n\n\tMAX_DHCPV6_DUID_LENGTH = 130\n\n\tMAX_DNS_SUFFIX_STRING_LENGTH = 256\n\n\tTIME_ZONE_ID_UNKNOWN  = 0\n\tTIME_ZONE_ID_STANDARD = 1\n\n\tTIME_ZONE_ID_DAYLIGHT = 2\n\tIGNORE                = 0\n\tINFINITE              = 0xffffffff\n\n\tWAIT_ABANDONED = 0x00000080\n\tWAIT_OBJECT_0  = 0x00000000\n\tWAIT_FAILED    = 0xFFFFFFFF\n\n\t// Access rights for process.\n\tPROCESS_ALL_ACCESS                = 0xFFFF\n\tPROCESS_CREATE_PROCESS            = 0x0080\n\tPROCESS_CREATE_THREAD             = 0x0002\n\tPROCESS_DUP_HANDLE                = 0x0040\n\tPROCESS_QUERY_INFORMATION         = 0x0400\n\tPROCESS_QUERY_LIMITED_INFORMATION = 0x1000\n\tPROCESS_SET_INFORMATION           = 0x0200\n\tPROCESS_SET_QUOTA                 = 0x0100\n\tPROCESS_SUSPEND_RESUME            = 0x0800\n\tPROCESS_TERMINATE                 = 0x0001\n\tPROCESS_VM_OPERATION              = 0x0008\n\tPROCESS_VM_READ                   = 0x0010\n\tPROCESS_VM_WRITE                  = 0x0020\n\n\t// Access rights for thread.\n\tTHREAD_DIRECT_IMPERSONATION      = 0x0200\n\tTHREAD_GET_CONTEXT               = 0x0008\n\tTHREAD_IMPERSONATE               = 0x0100\n\tTHREAD_QUERY_INFORMATION         = 0x0040\n\tTHREAD_QUERY_LIMITED_INFORMATION = 0x0800\n\tTHREAD_SET_CONTEXT               = 0x0010\n\tTHREAD_SET_INFORMATION           = 0x0020\n\tTHREAD_SET_LIMITED_INFORMATION   = 0x0400\n\tTHREAD_SET_THREAD_TOKEN          = 0x0080\n\tTHREAD_SUSPEND_RESUME            = 0x0002\n\tTHREAD_TERMINATE                 = 0x0001\n\n\tFILE_MAP_COPY    = 0x01\n\tFILE_MAP_WRITE   = 0x02\n\tFILE_MAP_READ    = 0x04\n\tFILE_MAP_EXECUTE = 0x20\n\n\tCTRL_C_EVENT        = 0\n\tCTRL_BREAK_EVENT    = 1\n\tCTRL_CLOSE_EVENT    = 2\n\tCTRL_LOGOFF_EVENT   = 5\n\tCTRL_SHUTDOWN_EVENT = 6\n\n\t// Windows reserves errors >= 1<<29 for application use.\n\tAPPLICATION_ERROR = 1 << 29\n)\n\nconst (\n\t// Process creation flags.\n\tCREATE_BREAKAWAY_FROM_JOB        = 0x01000000\n\tCREATE_DEFAULT_ERROR_MODE        = 0x04000000\n\tCREATE_NEW_CONSOLE               = 0x00000010\n\tCREATE_NEW_PROCESS_GROUP         = 0x00000200\n\tCREATE_NO_WINDOW                 = 0x08000000\n\tCREATE_PROTECTED_PROCESS         = 0x00040000\n\tCREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000\n\tCREATE_SEPARATE_WOW_VDM          = 0x00000800\n\tCREATE_SHARED_WOW_VDM            = 0x00001000\n\tCREATE_SUSPENDED                 = 0x00000004\n\tCREATE_UNICODE_ENVIRONMENT       = 0x00000400\n\tDEBUG_ONLY_THIS_PROCESS          = 0x00000002\n\tDEBUG_PROCESS                    = 0x00000001\n\tDETACHED_PROCESS                 = 0x00000008\n\tEXTENDED_STARTUPINFO_PRESENT     = 0x00080000\n\tINHERIT_PARENT_AFFINITY          = 0x00010000\n)\n\nconst (\n\t// attributes for ProcThreadAttributeList\n\tPROC_THREAD_ATTRIBUTE_PARENT_PROCESS    = 0x00020000\n\tPROC_THREAD_ATTRIBUTE_HANDLE_LIST       = 0x00020002\n\tPROC_THREAD_ATTRIBUTE_GROUP_AFFINITY    = 0x00030003\n\tPROC_THREAD_ATTRIBUTE_PREFERRED_NODE    = 0x00020004\n\tPROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR   = 0x00030005\n\tPROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007\n\tPROC_THREAD_ATTRIBUTE_UMS_THREAD        = 0x00030006\n\tPROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL  = 0x0002000b\n\tPROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE     = 0x00020016\n)\n\nconst (\n\t// flags for CreateToolhelp32Snapshot\n\tTH32CS_SNAPHEAPLIST = 0x01\n\tTH32CS_SNAPPROCESS  = 0x02\n\tTH32CS_SNAPTHREAD   = 0x04\n\tTH32CS_SNAPMODULE   = 0x08\n\tTH32CS_SNAPMODULE32 = 0x10\n\tTH32CS_SNAPALL      = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD\n\tTH32CS_INHERIT      = 0x80000000\n)\n\nconst (\n\t// flags for EnumProcessModulesEx\n\tLIST_MODULES_32BIT   = 0x01\n\tLIST_MODULES_64BIT   = 0x02\n\tLIST_MODULES_ALL     = 0x03\n\tLIST_MODULES_DEFAULT = 0x00\n)\n\nconst (\n\t// filters for ReadDirectoryChangesW and FindFirstChangeNotificationW\n\tFILE_NOTIFY_CHANGE_FILE_NAME   = 0x001\n\tFILE_NOTIFY_CHANGE_DIR_NAME    = 0x002\n\tFILE_NOTIFY_CHANGE_ATTRIBUTES  = 0x004\n\tFILE_NOTIFY_CHANGE_SIZE        = 0x008\n\tFILE_NOTIFY_CHANGE_LAST_WRITE  = 0x010\n\tFILE_NOTIFY_CHANGE_LAST_ACCESS = 0x020\n\tFILE_NOTIFY_CHANGE_CREATION    = 0x040\n\tFILE_NOTIFY_CHANGE_SECURITY    = 0x100\n)\n\nconst (\n\t// do not reorder\n\tFILE_ACTION_ADDED = iota + 1\n\tFILE_ACTION_REMOVED\n\tFILE_ACTION_MODIFIED\n\tFILE_ACTION_RENAMED_OLD_NAME\n\tFILE_ACTION_RENAMED_NEW_NAME\n)\n\nconst (\n\t// wincrypt.h\n\t/* certenrolld_begin -- PROV_RSA_*/\n\tPROV_RSA_FULL      = 1\n\tPROV_RSA_SIG       = 2\n\tPROV_DSS           = 3\n\tPROV_FORTEZZA      = 4\n\tPROV_MS_EXCHANGE   = 5\n\tPROV_SSL           = 6\n\tPROV_RSA_SCHANNEL  = 12\n\tPROV_DSS_DH        = 13\n\tPROV_EC_ECDSA_SIG  = 14\n\tPROV_EC_ECNRA_SIG  = 15\n\tPROV_EC_ECDSA_FULL = 16\n\tPROV_EC_ECNRA_FULL = 17\n\tPROV_DH_SCHANNEL   = 18\n\tPROV_SPYRUS_LYNKS  = 20\n\tPROV_RNG           = 21\n\tPROV_INTEL_SEC     = 22\n\tPROV_REPLACE_OWF   = 23\n\tPROV_RSA_AES       = 24\n\n\t/* dwFlags definitions for CryptAcquireContext */\n\tCRYPT_VERIFYCONTEXT              = 0xF0000000\n\tCRYPT_NEWKEYSET                  = 0x00000008\n\tCRYPT_DELETEKEYSET               = 0x00000010\n\tCRYPT_MACHINE_KEYSET             = 0x00000020\n\tCRYPT_SILENT                     = 0x00000040\n\tCRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080\n\n\t/* Flags for PFXImportCertStore */\n\tCRYPT_EXPORTABLE                   = 0x00000001\n\tCRYPT_USER_PROTECTED               = 0x00000002\n\tCRYPT_USER_KEYSET                  = 0x00001000\n\tPKCS12_PREFER_CNG_KSP              = 0x00000100\n\tPKCS12_ALWAYS_CNG_KSP              = 0x00000200\n\tPKCS12_ALLOW_OVERWRITE_KEY         = 0x00004000\n\tPKCS12_NO_PERSIST_KEY              = 0x00008000\n\tPKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010\n\n\t/* Flags for CryptAcquireCertificatePrivateKey */\n\tCRYPT_ACQUIRE_CACHE_FLAG             = 0x00000001\n\tCRYPT_ACQUIRE_USE_PROV_INFO_FLAG     = 0x00000002\n\tCRYPT_ACQUIRE_COMPARE_KEY_FLAG       = 0x00000004\n\tCRYPT_ACQUIRE_NO_HEALING             = 0x00000008\n\tCRYPT_ACQUIRE_SILENT_FLAG            = 0x00000040\n\tCRYPT_ACQUIRE_WINDOW_HANDLE_FLAG     = 0x00000080\n\tCRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK  = 0x00070000\n\tCRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG  = 0x00010000\n\tCRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000\n\tCRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG   = 0x00040000\n\n\t/* pdwKeySpec for CryptAcquireCertificatePrivateKey */\n\tAT_KEYEXCHANGE       = 1\n\tAT_SIGNATURE         = 2\n\tCERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF\n\n\t/* Default usage match type is AND with value zero */\n\tUSAGE_MATCH_TYPE_AND = 0\n\tUSAGE_MATCH_TYPE_OR  = 1\n\n\t/* msgAndCertEncodingType values for CertOpenStore function */\n\tX509_ASN_ENCODING   = 0x00000001\n\tPKCS_7_ASN_ENCODING = 0x00010000\n\n\t/* storeProvider values for CertOpenStore function */\n\tCERT_STORE_PROV_MSG               = 1\n\tCERT_STORE_PROV_MEMORY            = 2\n\tCERT_STORE_PROV_FILE              = 3\n\tCERT_STORE_PROV_REG               = 4\n\tCERT_STORE_PROV_PKCS7             = 5\n\tCERT_STORE_PROV_SERIALIZED        = 6\n\tCERT_STORE_PROV_FILENAME_A        = 7\n\tCERT_STORE_PROV_FILENAME_W        = 8\n\tCERT_STORE_PROV_FILENAME          = CERT_STORE_PROV_FILENAME_W\n\tCERT_STORE_PROV_SYSTEM_A          = 9\n\tCERT_STORE_PROV_SYSTEM_W          = 10\n\tCERT_STORE_PROV_SYSTEM            = CERT_STORE_PROV_SYSTEM_W\n\tCERT_STORE_PROV_COLLECTION        = 11\n\tCERT_STORE_PROV_SYSTEM_REGISTRY_A = 12\n\tCERT_STORE_PROV_SYSTEM_REGISTRY_W = 13\n\tCERT_STORE_PROV_SYSTEM_REGISTRY   = CERT_STORE_PROV_SYSTEM_REGISTRY_W\n\tCERT_STORE_PROV_PHYSICAL_W        = 14\n\tCERT_STORE_PROV_PHYSICAL          = CERT_STORE_PROV_PHYSICAL_W\n\tCERT_STORE_PROV_SMART_CARD_W      = 15\n\tCERT_STORE_PROV_SMART_CARD        = CERT_STORE_PROV_SMART_CARD_W\n\tCERT_STORE_PROV_LDAP_W            = 16\n\tCERT_STORE_PROV_LDAP              = CERT_STORE_PROV_LDAP_W\n\tCERT_STORE_PROV_PKCS12            = 17\n\n\t/* store characteristics (low WORD of flag) for CertOpenStore function */\n\tCERT_STORE_NO_CRYPT_RELEASE_FLAG            = 0x00000001\n\tCERT_STORE_SET_LOCALIZED_NAME_FLAG          = 0x00000002\n\tCERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004\n\tCERT_STORE_DELETE_FLAG                      = 0x00000010\n\tCERT_STORE_UNSAFE_PHYSICAL_FLAG             = 0x00000020\n\tCERT_STORE_SHARE_STORE_FLAG                 = 0x00000040\n\tCERT_STORE_SHARE_CONTEXT_FLAG               = 0x00000080\n\tCERT_STORE_MANIFOLD_FLAG                    = 0x00000100\n\tCERT_STORE_ENUM_ARCHIVED_FLAG               = 0x00000200\n\tCERT_STORE_UPDATE_KEYID_FLAG                = 0x00000400\n\tCERT_STORE_BACKUP_RESTORE_FLAG              = 0x00000800\n\tCERT_STORE_MAXIMUM_ALLOWED_FLAG             = 0x00001000\n\tCERT_STORE_CREATE_NEW_FLAG                  = 0x00002000\n\tCERT_STORE_OPEN_EXISTING_FLAG               = 0x00004000\n\tCERT_STORE_READONLY_FLAG                    = 0x00008000\n\n\t/* store locations (high WORD of flag) for CertOpenStore function */\n\tCERT_SYSTEM_STORE_CURRENT_USER               = 0x00010000\n\tCERT_SYSTEM_STORE_LOCAL_MACHINE              = 0x00020000\n\tCERT_SYSTEM_STORE_CURRENT_SERVICE            = 0x00040000\n\tCERT_SYSTEM_STORE_SERVICES                   = 0x00050000\n\tCERT_SYSTEM_STORE_USERS                      = 0x00060000\n\tCERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY  = 0x00070000\n\tCERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = 0x00080000\n\tCERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE   = 0x00090000\n\tCERT_SYSTEM_STORE_UNPROTECTED_FLAG           = 0x40000000\n\tCERT_SYSTEM_STORE_RELOCATE_FLAG              = 0x80000000\n\n\t/* Miscellaneous high-WORD flags for CertOpenStore function */\n\tCERT_REGISTRY_STORE_REMOTE_FLAG      = 0x00010000\n\tCERT_REGISTRY_STORE_SERIALIZED_FLAG  = 0x00020000\n\tCERT_REGISTRY_STORE_ROAMING_FLAG     = 0x00040000\n\tCERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = 0x00080000\n\tCERT_REGISTRY_STORE_LM_GPT_FLAG      = 0x01000000\n\tCERT_REGISTRY_STORE_CLIENT_GPT_FLAG  = 0x80000000\n\tCERT_FILE_STORE_COMMIT_ENABLE_FLAG   = 0x00010000\n\tCERT_LDAP_STORE_SIGN_FLAG            = 0x00010000\n\tCERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG  = 0x00020000\n\tCERT_LDAP_STORE_OPENED_FLAG          = 0x00040000\n\tCERT_LDAP_STORE_UNBIND_FLAG          = 0x00080000\n\n\t/* addDisposition values for CertAddCertificateContextToStore function */\n\tCERT_STORE_ADD_NEW                                 = 1\n\tCERT_STORE_ADD_USE_EXISTING                        = 2\n\tCERT_STORE_ADD_REPLACE_EXISTING                    = 3\n\tCERT_STORE_ADD_ALWAYS                              = 4\n\tCERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5\n\tCERT_STORE_ADD_NEWER                               = 6\n\tCERT_STORE_ADD_NEWER_INHERIT_PROPERTIES            = 7\n\n\t/* ErrorStatus values for CertTrustStatus struct */\n\tCERT_TRUST_NO_ERROR                          = 0x00000000\n\tCERT_TRUST_IS_NOT_TIME_VALID                 = 0x00000001\n\tCERT_TRUST_IS_REVOKED                        = 0x00000004\n\tCERT_TRUST_IS_NOT_SIGNATURE_VALID            = 0x00000008\n\tCERT_TRUST_IS_NOT_VALID_FOR_USAGE            = 0x00000010\n\tCERT_TRUST_IS_UNTRUSTED_ROOT                 = 0x00000020\n\tCERT_TRUST_REVOCATION_STATUS_UNKNOWN         = 0x00000040\n\tCERT_TRUST_IS_CYCLIC                         = 0x00000080\n\tCERT_TRUST_INVALID_EXTENSION                 = 0x00000100\n\tCERT_TRUST_INVALID_POLICY_CONSTRAINTS        = 0x00000200\n\tCERT_TRUST_INVALID_BASIC_CONSTRAINTS         = 0x00000400\n\tCERT_TRUST_INVALID_NAME_CONSTRAINTS          = 0x00000800\n\tCERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000\n\tCERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT   = 0x00002000\n\tCERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000\n\tCERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT      = 0x00008000\n\tCERT_TRUST_IS_PARTIAL_CHAIN                  = 0x00010000\n\tCERT_TRUST_CTL_IS_NOT_TIME_VALID             = 0x00020000\n\tCERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID        = 0x00040000\n\tCERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE        = 0x00080000\n\tCERT_TRUST_HAS_WEAK_SIGNATURE                = 0x00100000\n\tCERT_TRUST_IS_OFFLINE_REVOCATION             = 0x01000000\n\tCERT_TRUST_NO_ISSUANCE_CHAIN_POLICY          = 0x02000000\n\tCERT_TRUST_IS_EXPLICIT_DISTRUST              = 0x04000000\n\tCERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT    = 0x08000000\n\n\t/* InfoStatus values for CertTrustStatus struct */\n\tCERT_TRUST_HAS_EXACT_MATCH_ISSUER        = 0x00000001\n\tCERT_TRUST_HAS_KEY_MATCH_ISSUER          = 0x00000002\n\tCERT_TRUST_HAS_NAME_MATCH_ISSUER         = 0x00000004\n\tCERT_TRUST_IS_SELF_SIGNED                = 0x00000008\n\tCERT_TRUST_HAS_PREFERRED_ISSUER          = 0x00000100\n\tCERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY     = 0x00000400\n\tCERT_TRUST_HAS_VALID_NAME_CONSTRAINTS    = 0x00000400\n\tCERT_TRUST_IS_PEER_TRUSTED               = 0x00000800\n\tCERT_TRUST_HAS_CRL_VALIDITY_EXTENDED     = 0x00001000\n\tCERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE = 0x00002000\n\tCERT_TRUST_IS_CA_TRUSTED                 = 0x00004000\n\tCERT_TRUST_IS_COMPLEX_CHAIN              = 0x00010000\n\n\t/* Certificate Information Flags */\n\tCERT_INFO_VERSION_FLAG                 = 1\n\tCERT_INFO_SERIAL_NUMBER_FLAG           = 2\n\tCERT_INFO_SIGNATURE_ALGORITHM_FLAG     = 3\n\tCERT_INFO_ISSUER_FLAG                  = 4\n\tCERT_INFO_NOT_BEFORE_FLAG              = 5\n\tCERT_INFO_NOT_AFTER_FLAG               = 6\n\tCERT_INFO_SUBJECT_FLAG                 = 7\n\tCERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8\n\tCERT_INFO_ISSUER_UNIQUE_ID_FLAG        = 9\n\tCERT_INFO_SUBJECT_UNIQUE_ID_FLAG       = 10\n\tCERT_INFO_EXTENSION_FLAG               = 11\n\n\t/* dwFindType for CertFindCertificateInStore  */\n\tCERT_COMPARE_MASK                     = 0xFFFF\n\tCERT_COMPARE_SHIFT                    = 16\n\tCERT_COMPARE_ANY                      = 0\n\tCERT_COMPARE_SHA1_HASH                = 1\n\tCERT_COMPARE_NAME                     = 2\n\tCERT_COMPARE_ATTR                     = 3\n\tCERT_COMPARE_MD5_HASH                 = 4\n\tCERT_COMPARE_PROPERTY                 = 5\n\tCERT_COMPARE_PUBLIC_KEY               = 6\n\tCERT_COMPARE_HASH                     = CERT_COMPARE_SHA1_HASH\n\tCERT_COMPARE_NAME_STR_A               = 7\n\tCERT_COMPARE_NAME_STR_W               = 8\n\tCERT_COMPARE_KEY_SPEC                 = 9\n\tCERT_COMPARE_ENHKEY_USAGE             = 10\n\tCERT_COMPARE_CTL_USAGE                = CERT_COMPARE_ENHKEY_USAGE\n\tCERT_COMPARE_SUBJECT_CERT             = 11\n\tCERT_COMPARE_ISSUER_OF                = 12\n\tCERT_COMPARE_EXISTING                 = 13\n\tCERT_COMPARE_SIGNATURE_HASH           = 14\n\tCERT_COMPARE_KEY_IDENTIFIER           = 15\n\tCERT_COMPARE_CERT_ID                  = 16\n\tCERT_COMPARE_CROSS_CERT_DIST_POINTS   = 17\n\tCERT_COMPARE_PUBKEY_MD5_HASH          = 18\n\tCERT_COMPARE_SUBJECT_INFO_ACCESS      = 19\n\tCERT_COMPARE_HASH_STR                 = 20\n\tCERT_COMPARE_HAS_PRIVATE_KEY          = 21\n\tCERT_FIND_ANY                         = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT)\n\tCERT_FIND_SHA1_HASH                   = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT)\n\tCERT_FIND_MD5_HASH                    = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT)\n\tCERT_FIND_SIGNATURE_HASH              = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT)\n\tCERT_FIND_KEY_IDENTIFIER              = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT)\n\tCERT_FIND_HASH                        = CERT_FIND_SHA1_HASH\n\tCERT_FIND_PROPERTY                    = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT)\n\tCERT_FIND_PUBLIC_KEY                  = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT)\n\tCERT_FIND_SUBJECT_NAME                = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)\n\tCERT_FIND_SUBJECT_ATTR                = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)\n\tCERT_FIND_ISSUER_NAME                 = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)\n\tCERT_FIND_ISSUER_ATTR                 = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)\n\tCERT_FIND_SUBJECT_STR_A               = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)\n\tCERT_FIND_SUBJECT_STR_W               = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)\n\tCERT_FIND_SUBJECT_STR                 = CERT_FIND_SUBJECT_STR_W\n\tCERT_FIND_ISSUER_STR_A                = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)\n\tCERT_FIND_ISSUER_STR_W                = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)\n\tCERT_FIND_ISSUER_STR                  = CERT_FIND_ISSUER_STR_W\n\tCERT_FIND_KEY_SPEC                    = (CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT)\n\tCERT_FIND_ENHKEY_USAGE                = (CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT)\n\tCERT_FIND_CTL_USAGE                   = CERT_FIND_ENHKEY_USAGE\n\tCERT_FIND_SUBJECT_CERT                = (CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT)\n\tCERT_FIND_ISSUER_OF                   = (CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT)\n\tCERT_FIND_EXISTING                    = (CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT)\n\tCERT_FIND_CERT_ID                     = (CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT)\n\tCERT_FIND_CROSS_CERT_DIST_POINTS      = (CERT_COMPARE_CROSS_CERT_DIST_POINTS << CERT_COMPARE_SHIFT)\n\tCERT_FIND_PUBKEY_MD5_HASH             = (CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT)\n\tCERT_FIND_SUBJECT_INFO_ACCESS         = (CERT_COMPARE_SUBJECT_INFO_ACCESS << CERT_COMPARE_SHIFT)\n\tCERT_FIND_HASH_STR                    = (CERT_COMPARE_HASH_STR << CERT_COMPARE_SHIFT)\n\tCERT_FIND_HAS_PRIVATE_KEY             = (CERT_COMPARE_HAS_PRIVATE_KEY << CERT_COMPARE_SHIFT)\n\tCERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG  = 0x1\n\tCERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG  = 0x2\n\tCERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4\n\tCERT_FIND_NO_ENHKEY_USAGE_FLAG        = 0x8\n\tCERT_FIND_OR_ENHKEY_USAGE_FLAG        = 0x10\n\tCERT_FIND_VALID_ENHKEY_USAGE_FLAG     = 0x20\n\tCERT_FIND_OPTIONAL_CTL_USAGE_FLAG     = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG\n\tCERT_FIND_EXT_ONLY_CTL_USAGE_FLAG     = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG\n\tCERT_FIND_PROP_ONLY_CTL_USAGE_FLAG    = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG\n\tCERT_FIND_NO_CTL_USAGE_FLAG           = CERT_FIND_NO_ENHKEY_USAGE_FLAG\n\tCERT_FIND_OR_CTL_USAGE_FLAG           = CERT_FIND_OR_ENHKEY_USAGE_FLAG\n\tCERT_FIND_VALID_CTL_USAGE_FLAG        = CERT_FIND_VALID_ENHKEY_USAGE_FLAG\n\n\t/* policyOID values for CertVerifyCertificateChainPolicy function */\n\tCERT_CHAIN_POLICY_BASE              = 1\n\tCERT_CHAIN_POLICY_AUTHENTICODE      = 2\n\tCERT_CHAIN_POLICY_AUTHENTICODE_TS   = 3\n\tCERT_CHAIN_POLICY_SSL               = 4\n\tCERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5\n\tCERT_CHAIN_POLICY_NT_AUTH           = 6\n\tCERT_CHAIN_POLICY_MICROSOFT_ROOT    = 7\n\tCERT_CHAIN_POLICY_EV                = 8\n\tCERT_CHAIN_POLICY_SSL_F12           = 9\n\n\t/* flag for dwFindType CertFindChainInStore  */\n\tCERT_CHAIN_FIND_BY_ISSUER = 1\n\n\t/* dwFindFlags for CertFindChainInStore when dwFindType == CERT_CHAIN_FIND_BY_ISSUER */\n\tCERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG    = 0x0001\n\tCERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG  = 0x0002\n\tCERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x0004\n\tCERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG  = 0x0008\n\tCERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG         = 0x4000\n\tCERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG     = 0x8000\n\n\t/* Certificate Store close flags */\n\tCERT_CLOSE_STORE_FORCE_FLAG = 0x00000001\n\tCERT_CLOSE_STORE_CHECK_FLAG = 0x00000002\n\n\t/* CryptQueryObject object type */\n\tCERT_QUERY_OBJECT_FILE = 1\n\tCERT_QUERY_OBJECT_BLOB = 2\n\n\t/* CryptQueryObject content type flags */\n\tCERT_QUERY_CONTENT_CERT                    = 1\n\tCERT_QUERY_CONTENT_CTL                     = 2\n\tCERT_QUERY_CONTENT_CRL                     = 3\n\tCERT_QUERY_CONTENT_SERIALIZED_STORE        = 4\n\tCERT_QUERY_CONTENT_SERIALIZED_CERT         = 5\n\tCERT_QUERY_CONTENT_SERIALIZED_CTL          = 6\n\tCERT_QUERY_CONTENT_SERIALIZED_CRL          = 7\n\tCERT_QUERY_CONTENT_PKCS7_SIGNED            = 8\n\tCERT_QUERY_CONTENT_PKCS7_UNSIGNED          = 9\n\tCERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED      = 10\n\tCERT_QUERY_CONTENT_PKCS10                  = 11\n\tCERT_QUERY_CONTENT_PFX                     = 12\n\tCERT_QUERY_CONTENT_CERT_PAIR               = 13\n\tCERT_QUERY_CONTENT_PFX_AND_LOAD            = 14\n\tCERT_QUERY_CONTENT_FLAG_CERT               = (1 << CERT_QUERY_CONTENT_CERT)\n\tCERT_QUERY_CONTENT_FLAG_CTL                = (1 << CERT_QUERY_CONTENT_CTL)\n\tCERT_QUERY_CONTENT_FLAG_CRL                = (1 << CERT_QUERY_CONTENT_CRL)\n\tCERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE   = (1 << CERT_QUERY_CONTENT_SERIALIZED_STORE)\n\tCERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT    = (1 << CERT_QUERY_CONTENT_SERIALIZED_CERT)\n\tCERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL     = (1 << CERT_QUERY_CONTENT_SERIALIZED_CTL)\n\tCERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL     = (1 << CERT_QUERY_CONTENT_SERIALIZED_CRL)\n\tCERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED       = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED)\n\tCERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED     = (1 << CERT_QUERY_CONTENT_PKCS7_UNSIGNED)\n\tCERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED)\n\tCERT_QUERY_CONTENT_FLAG_PKCS10             = (1 << CERT_QUERY_CONTENT_PKCS10)\n\tCERT_QUERY_CONTENT_FLAG_PFX                = (1 << CERT_QUERY_CONTENT_PFX)\n\tCERT_QUERY_CONTENT_FLAG_CERT_PAIR          = (1 << CERT_QUERY_CONTENT_CERT_PAIR)\n\tCERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD       = (1 << CERT_QUERY_CONTENT_PFX_AND_LOAD)\n\tCERT_QUERY_CONTENT_FLAG_ALL                = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_CTL | CERT_QUERY_CONTENT_FLAG_CRL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED | CERT_QUERY_CONTENT_FLAG_PKCS10 | CERT_QUERY_CONTENT_FLAG_PFX | CERT_QUERY_CONTENT_FLAG_CERT_PAIR)\n\tCERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT    = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED)\n\n\t/* CryptQueryObject format type flags */\n\tCERT_QUERY_FORMAT_BINARY                     = 1\n\tCERT_QUERY_FORMAT_BASE64_ENCODED             = 2\n\tCERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED      = 3\n\tCERT_QUERY_FORMAT_FLAG_BINARY                = (1 << CERT_QUERY_FORMAT_BINARY)\n\tCERT_QUERY_FORMAT_FLAG_BASE64_ENCODED        = (1 << CERT_QUERY_FORMAT_BASE64_ENCODED)\n\tCERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)\n\tCERT_QUERY_FORMAT_FLAG_ALL                   = (CERT_QUERY_FORMAT_FLAG_BINARY | CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED | CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED)\n\n\t/* CertGetNameString name types */\n\tCERT_NAME_EMAIL_TYPE            = 1\n\tCERT_NAME_RDN_TYPE              = 2\n\tCERT_NAME_ATTR_TYPE             = 3\n\tCERT_NAME_SIMPLE_DISPLAY_TYPE   = 4\n\tCERT_NAME_FRIENDLY_DISPLAY_TYPE = 5\n\tCERT_NAME_DNS_TYPE              = 6\n\tCERT_NAME_URL_TYPE              = 7\n\tCERT_NAME_UPN_TYPE              = 8\n\n\t/* CertGetNameString flags */\n\tCERT_NAME_ISSUER_FLAG              = 0x1\n\tCERT_NAME_DISABLE_IE4_UTF8_FLAG    = 0x10000\n\tCERT_NAME_SEARCH_ALL_NAMES_FLAG    = 0x2\n\tCERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x00200000\n\n\t/* AuthType values for SSLExtraCertChainPolicyPara struct */\n\tAUTHTYPE_CLIENT = 1\n\tAUTHTYPE_SERVER = 2\n\n\t/* Checks values for SSLExtraCertChainPolicyPara struct */\n\tSECURITY_FLAG_IGNORE_REVOCATION        = 0x00000080\n\tSECURITY_FLAG_IGNORE_UNKNOWN_CA        = 0x00000100\n\tSECURITY_FLAG_IGNORE_WRONG_USAGE       = 0x00000200\n\tSECURITY_FLAG_IGNORE_CERT_CN_INVALID   = 0x00001000\n\tSECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000\n\n\t/* Flags for Crypt[Un]ProtectData */\n\tCRYPTPROTECT_UI_FORBIDDEN      = 0x1\n\tCRYPTPROTECT_LOCAL_MACHINE     = 0x4\n\tCRYPTPROTECT_CRED_SYNC         = 0x8\n\tCRYPTPROTECT_AUDIT             = 0x10\n\tCRYPTPROTECT_NO_RECOVERY       = 0x20\n\tCRYPTPROTECT_VERIFY_PROTECTION = 0x40\n\tCRYPTPROTECT_CRED_REGENERATE   = 0x80\n\n\t/* Flags for CryptProtectPromptStruct */\n\tCRYPTPROTECT_PROMPT_ON_UNPROTECT   = 1\n\tCRYPTPROTECT_PROMPT_ON_PROTECT     = 2\n\tCRYPTPROTECT_PROMPT_RESERVED       = 4\n\tCRYPTPROTECT_PROMPT_STRONG         = 8\n\tCRYPTPROTECT_PROMPT_REQUIRE_STRONG = 16\n)\n\nconst (\n\t// flags for SetErrorMode\n\tSEM_FAILCRITICALERRORS     = 0x0001\n\tSEM_NOALIGNMENTFAULTEXCEPT = 0x0004\n\tSEM_NOGPFAULTERRORBOX      = 0x0002\n\tSEM_NOOPENFILEERRORBOX     = 0x8000\n)\n\nconst (\n\t// Priority class.\n\tABOVE_NORMAL_PRIORITY_CLASS   = 0x00008000\n\tBELOW_NORMAL_PRIORITY_CLASS   = 0x00004000\n\tHIGH_PRIORITY_CLASS           = 0x00000080\n\tIDLE_PRIORITY_CLASS           = 0x00000040\n\tNORMAL_PRIORITY_CLASS         = 0x00000020\n\tPROCESS_MODE_BACKGROUND_BEGIN = 0x00100000\n\tPROCESS_MODE_BACKGROUND_END   = 0x00200000\n\tREALTIME_PRIORITY_CLASS       = 0x00000100\n)\n\n/* wintrust.h constants for WinVerifyTrustEx */\nconst (\n\tWTD_UI_ALL    = 1\n\tWTD_UI_NONE   = 2\n\tWTD_UI_NOBAD  = 3\n\tWTD_UI_NOGOOD = 4\n\n\tWTD_REVOKE_NONE       = 0\n\tWTD_REVOKE_WHOLECHAIN = 1\n\n\tWTD_CHOICE_FILE    = 1\n\tWTD_CHOICE_CATALOG = 2\n\tWTD_CHOICE_BLOB    = 3\n\tWTD_CHOICE_SIGNER  = 4\n\tWTD_CHOICE_CERT    = 5\n\n\tWTD_STATEACTION_IGNORE           = 0x00000000\n\tWTD_STATEACTION_VERIFY           = 0x00000001\n\tWTD_STATEACTION_CLOSE            = 0x00000002\n\tWTD_STATEACTION_AUTO_CACHE       = 0x00000003\n\tWTD_STATEACTION_AUTO_CACHE_FLUSH = 0x00000004\n\n\tWTD_USE_IE4_TRUST_FLAG                  = 0x1\n\tWTD_NO_IE4_CHAIN_FLAG                   = 0x2\n\tWTD_NO_POLICY_USAGE_FLAG                = 0x4\n\tWTD_REVOCATION_CHECK_NONE               = 0x10\n\tWTD_REVOCATION_CHECK_END_CERT           = 0x20\n\tWTD_REVOCATION_CHECK_CHAIN              = 0x40\n\tWTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x80\n\tWTD_SAFER_FLAG                          = 0x100\n\tWTD_HASH_ONLY_FLAG                      = 0x200\n\tWTD_USE_DEFAULT_OSVER_CHECK             = 0x400\n\tWTD_LIFETIME_SIGNING_FLAG               = 0x800\n\tWTD_CACHE_ONLY_URL_RETRIEVAL            = 0x1000\n\tWTD_DISABLE_MD2_MD4                     = 0x2000\n\tWTD_MOTW                                = 0x4000\n\n\tWTD_UICONTEXT_EXECUTE = 0\n\tWTD_UICONTEXT_INSTALL = 1\n)\n\nvar (\n\tOID_PKIX_KP_SERVER_AUTH = []byte(\"1.3.6.1.5.5.7.3.1\\x00\")\n\tOID_SERVER_GATED_CRYPTO = []byte(\"1.3.6.1.4.1.311.10.3.3\\x00\")\n\tOID_SGC_NETSCAPE        = []byte(\"2.16.840.1.113730.4.1\\x00\")\n\n\tWINTRUST_ACTION_GENERIC_VERIFY_V2 = GUID{\n\t\tData1: 0xaac56b,\n\t\tData2: 0xcd44,\n\t\tData3: 0x11d0,\n\t\tData4: [8]byte{0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee},\n\t}\n)\n\n// Pointer represents a pointer to an arbitrary Windows type.\n//\n// Pointer-typed fields may point to one of many different types. It's\n// up to the caller to provide a pointer to the appropriate type, cast\n// to Pointer. The caller must obey the unsafe.Pointer rules while\n// doing so.\ntype Pointer *struct{}\n\n// Invented values to support what package os expects.\ntype Timeval struct {\n\tSec  int32\n\tUsec int32\n}\n\nfunc (tv *Timeval) Nanoseconds() int64 {\n\treturn (int64(tv.Sec)*1e6 + int64(tv.Usec)) * 1e3\n}\n\nfunc NsecToTimeval(nsec int64) (tv Timeval) {\n\ttv.Sec = int32(nsec / 1e9)\n\ttv.Usec = int32(nsec % 1e9 / 1e3)\n\treturn\n}\n\ntype Overlapped struct {\n\tInternal     uintptr\n\tInternalHigh uintptr\n\tOffset       uint32\n\tOffsetHigh   uint32\n\tHEvent       Handle\n}\n\ntype FileNotifyInformation struct {\n\tNextEntryOffset uint32\n\tAction          uint32\n\tFileNameLength  uint32\n\tFileName        uint16\n}\n\ntype Filetime struct {\n\tLowDateTime  uint32\n\tHighDateTime uint32\n}\n\n// Nanoseconds returns Filetime ft in nanoseconds\n// since Epoch (00:00:00 UTC, January 1, 1970).\nfunc (ft *Filetime) Nanoseconds() int64 {\n\t// 100-nanosecond intervals since January 1, 1601\n\tnsec := int64(ft.HighDateTime)<<32 + int64(ft.LowDateTime)\n\t// change starting time to the Epoch (00:00:00 UTC, January 1, 1970)\n\tnsec -= 116444736000000000\n\t// convert into nanoseconds\n\tnsec *= 100\n\treturn nsec\n}\n\nfunc NsecToFiletime(nsec int64) (ft Filetime) {\n\t// convert into 100-nanosecond\n\tnsec /= 100\n\t// change starting time to January 1, 1601\n\tnsec += 116444736000000000\n\t// split into high / low\n\tft.LowDateTime = uint32(nsec & 0xffffffff)\n\tft.HighDateTime = uint32(nsec >> 32 & 0xffffffff)\n\treturn ft\n}\n\ntype Win32finddata struct {\n\tFileAttributes    uint32\n\tCreationTime      Filetime\n\tLastAccessTime    Filetime\n\tLastWriteTime     Filetime\n\tFileSizeHigh      uint32\n\tFileSizeLow       uint32\n\tReserved0         uint32\n\tReserved1         uint32\n\tFileName          [MAX_PATH - 1]uint16\n\tAlternateFileName [13]uint16\n}\n\n// This is the actual system call structure.\n// Win32finddata is what we committed to in Go 1.\ntype win32finddata1 struct {\n\tFileAttributes    uint32\n\tCreationTime      Filetime\n\tLastAccessTime    Filetime\n\tLastWriteTime     Filetime\n\tFileSizeHigh      uint32\n\tFileSizeLow       uint32\n\tReserved0         uint32\n\tReserved1         uint32\n\tFileName          [MAX_PATH]uint16\n\tAlternateFileName [14]uint16\n\n\t// The Microsoft documentation for this struct¹ describes three additional\n\t// fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields\n\t// are empirically only present in the macOS port of the Win32 API,² and thus\n\t// not needed for binaries built for Windows.\n\t//\n\t// ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe\n\t// ² https://golang.org/issue/42637#issuecomment-760715755.\n}\n\nfunc copyFindData(dst *Win32finddata, src *win32finddata1) {\n\tdst.FileAttributes = src.FileAttributes\n\tdst.CreationTime = src.CreationTime\n\tdst.LastAccessTime = src.LastAccessTime\n\tdst.LastWriteTime = src.LastWriteTime\n\tdst.FileSizeHigh = src.FileSizeHigh\n\tdst.FileSizeLow = src.FileSizeLow\n\tdst.Reserved0 = src.Reserved0\n\tdst.Reserved1 = src.Reserved1\n\n\t// The src is 1 element bigger than dst, but it must be NUL.\n\tcopy(dst.FileName[:], src.FileName[:])\n\tcopy(dst.AlternateFileName[:], src.AlternateFileName[:])\n}\n\ntype ByHandleFileInformation struct {\n\tFileAttributes     uint32\n\tCreationTime       Filetime\n\tLastAccessTime     Filetime\n\tLastWriteTime      Filetime\n\tVolumeSerialNumber uint32\n\tFileSizeHigh       uint32\n\tFileSizeLow        uint32\n\tNumberOfLinks      uint32\n\tFileIndexHigh      uint32\n\tFileIndexLow       uint32\n}\n\nconst (\n\tGetFileExInfoStandard = 0\n\tGetFileExMaxInfoLevel = 1\n)\n\ntype Win32FileAttributeData struct {\n\tFileAttributes uint32\n\tCreationTime   Filetime\n\tLastAccessTime Filetime\n\tLastWriteTime  Filetime\n\tFileSizeHigh   uint32\n\tFileSizeLow    uint32\n}\n\n// ShowWindow constants\nconst (\n\t// winuser.h\n\tSW_HIDE            = 0\n\tSW_NORMAL          = 1\n\tSW_SHOWNORMAL      = 1\n\tSW_SHOWMINIMIZED   = 2\n\tSW_SHOWMAXIMIZED   = 3\n\tSW_MAXIMIZE        = 3\n\tSW_SHOWNOACTIVATE  = 4\n\tSW_SHOW            = 5\n\tSW_MINIMIZE        = 6\n\tSW_SHOWMINNOACTIVE = 7\n\tSW_SHOWNA          = 8\n\tSW_RESTORE         = 9\n\tSW_SHOWDEFAULT     = 10\n\tSW_FORCEMINIMIZE   = 11\n)\n\ntype StartupInfo struct {\n\tCb            uint32\n\t_             *uint16\n\tDesktop       *uint16\n\tTitle         *uint16\n\tX             uint32\n\tY             uint32\n\tXSize         uint32\n\tYSize         uint32\n\tXCountChars   uint32\n\tYCountChars   uint32\n\tFillAttribute uint32\n\tFlags         uint32\n\tShowWindow    uint16\n\t_             uint16\n\t_             *byte\n\tStdInput      Handle\n\tStdOutput     Handle\n\tStdErr        Handle\n}\n\ntype StartupInfoEx struct {\n\tStartupInfo\n\tProcThreadAttributeList *ProcThreadAttributeList\n}\n\n// ProcThreadAttributeList is a placeholder type to represent a PROC_THREAD_ATTRIBUTE_LIST.\n//\n// To create a *ProcThreadAttributeList, use NewProcThreadAttributeList, update\n// it with ProcThreadAttributeListContainer.Update, free its memory using\n// ProcThreadAttributeListContainer.Delete, and access the list itself using\n// ProcThreadAttributeListContainer.List.\ntype ProcThreadAttributeList struct{}\n\ntype ProcThreadAttributeListContainer struct {\n\tdata     *ProcThreadAttributeList\n\tpointers []unsafe.Pointer\n}\n\ntype ProcessInformation struct {\n\tProcess   Handle\n\tThread    Handle\n\tProcessId uint32\n\tThreadId  uint32\n}\n\ntype ProcessEntry32 struct {\n\tSize            uint32\n\tUsage           uint32\n\tProcessID       uint32\n\tDefaultHeapID   uintptr\n\tModuleID        uint32\n\tThreads         uint32\n\tParentProcessID uint32\n\tPriClassBase    int32\n\tFlags           uint32\n\tExeFile         [MAX_PATH]uint16\n}\n\ntype ThreadEntry32 struct {\n\tSize           uint32\n\tUsage          uint32\n\tThreadID       uint32\n\tOwnerProcessID uint32\n\tBasePri        int32\n\tDeltaPri       int32\n\tFlags          uint32\n}\n\ntype ModuleEntry32 struct {\n\tSize         uint32\n\tModuleID     uint32\n\tProcessID    uint32\n\tGlblcntUsage uint32\n\tProccntUsage uint32\n\tModBaseAddr  uintptr\n\tModBaseSize  uint32\n\tModuleHandle Handle\n\tModule       [MAX_MODULE_NAME32 + 1]uint16\n\tExePath      [MAX_PATH]uint16\n}\n\nconst SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{})\n\ntype Systemtime struct {\n\tYear         uint16\n\tMonth        uint16\n\tDayOfWeek    uint16\n\tDay          uint16\n\tHour         uint16\n\tMinute       uint16\n\tSecond       uint16\n\tMilliseconds uint16\n}\n\ntype Timezoneinformation struct {\n\tBias         int32\n\tStandardName [32]uint16\n\tStandardDate Systemtime\n\tStandardBias int32\n\tDaylightName [32]uint16\n\tDaylightDate Systemtime\n\tDaylightBias int32\n}\n\n// Socket related.\n\nconst (\n\tAF_UNSPEC  = 0\n\tAF_UNIX    = 1\n\tAF_INET    = 2\n\tAF_NETBIOS = 17\n\tAF_INET6   = 23\n\tAF_IRDA    = 26\n\tAF_BTH     = 32\n\n\tSOCK_STREAM    = 1\n\tSOCK_DGRAM     = 2\n\tSOCK_RAW       = 3\n\tSOCK_RDM       = 4\n\tSOCK_SEQPACKET = 5\n\n\tIPPROTO_IP      = 0\n\tIPPROTO_ICMP    = 1\n\tIPPROTO_IGMP    = 2\n\tBTHPROTO_RFCOMM = 3\n\tIPPROTO_TCP     = 6\n\tIPPROTO_UDP     = 17\n\tIPPROTO_IPV6    = 41\n\tIPPROTO_ICMPV6  = 58\n\tIPPROTO_RM      = 113\n\n\tSOL_SOCKET                = 0xffff\n\tSO_REUSEADDR              = 4\n\tSO_KEEPALIVE              = 8\n\tSO_DONTROUTE              = 16\n\tSO_BROADCAST              = 32\n\tSO_LINGER                 = 128\n\tSO_RCVBUF                 = 0x1002\n\tSO_RCVTIMEO               = 0x1006\n\tSO_SNDBUF                 = 0x1001\n\tSO_UPDATE_ACCEPT_CONTEXT  = 0x700b\n\tSO_UPDATE_CONNECT_CONTEXT = 0x7010\n\n\tIOC_OUT                            = 0x40000000\n\tIOC_IN                             = 0x80000000\n\tIOC_VENDOR                         = 0x18000000\n\tIOC_INOUT                          = IOC_IN | IOC_OUT\n\tIOC_WS2                            = 0x08000000\n\tSIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6\n\tSIO_KEEPALIVE_VALS                 = IOC_IN | IOC_VENDOR | 4\n\tSIO_UDP_CONNRESET                  = IOC_IN | IOC_VENDOR | 12\n\tSIO_UDP_NETRESET                   = IOC_IN | IOC_VENDOR | 15\n\n\t// cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460\n\n\tIP_HDRINCL         = 0x2\n\tIP_TOS             = 0x3\n\tIP_TTL             = 0x4\n\tIP_MULTICAST_IF    = 0x9\n\tIP_MULTICAST_TTL   = 0xa\n\tIP_MULTICAST_LOOP  = 0xb\n\tIP_ADD_MEMBERSHIP  = 0xc\n\tIP_DROP_MEMBERSHIP = 0xd\n\tIP_PKTINFO         = 0x13\n\tIP_MTU_DISCOVER    = 0x47\n\n\tIPV6_V6ONLY         = 0x1b\n\tIPV6_UNICAST_HOPS   = 0x4\n\tIPV6_MULTICAST_IF   = 0x9\n\tIPV6_MULTICAST_HOPS = 0xa\n\tIPV6_MULTICAST_LOOP = 0xb\n\tIPV6_JOIN_GROUP     = 0xc\n\tIPV6_LEAVE_GROUP    = 0xd\n\tIPV6_PKTINFO        = 0x13\n\tIPV6_MTU_DISCOVER   = 0x47\n\n\tMSG_OOB       = 0x1\n\tMSG_PEEK      = 0x2\n\tMSG_DONTROUTE = 0x4\n\tMSG_WAITALL   = 0x8\n\n\tMSG_TRUNC  = 0x0100\n\tMSG_CTRUNC = 0x0200\n\tMSG_BCAST  = 0x0400\n\tMSG_MCAST  = 0x0800\n\n\tSOMAXCONN = 0x7fffffff\n\n\tTCP_NODELAY                    = 1\n\tTCP_EXPEDITED_1122             = 2\n\tTCP_KEEPALIVE                  = 3\n\tTCP_MAXSEG                     = 4\n\tTCP_MAXRT                      = 5\n\tTCP_STDURG                     = 6\n\tTCP_NOURG                      = 7\n\tTCP_ATMARK                     = 8\n\tTCP_NOSYNRETRIES               = 9\n\tTCP_TIMESTAMPS                 = 10\n\tTCP_OFFLOAD_PREFERENCE         = 11\n\tTCP_CONGESTION_ALGORITHM       = 12\n\tTCP_DELAY_FIN_ACK              = 13\n\tTCP_MAXRTMS                    = 14\n\tTCP_FASTOPEN                   = 15\n\tTCP_KEEPCNT                    = 16\n\tTCP_KEEPIDLE                   = TCP_KEEPALIVE\n\tTCP_KEEPINTVL                  = 17\n\tTCP_FAIL_CONNECT_ON_ICMP_ERROR = 18\n\tTCP_ICMP_ERROR_INFO            = 19\n\n\tUDP_NOCHECKSUM              = 1\n\tUDP_SEND_MSG_SIZE           = 2\n\tUDP_RECV_MAX_COALESCED_SIZE = 3\n\tUDP_CHECKSUM_COVERAGE       = 20\n\n\tUDP_COALESCED_INFO = 3\n\n\tSHUT_RD   = 0\n\tSHUT_WR   = 1\n\tSHUT_RDWR = 2\n\n\tWSADESCRIPTION_LEN = 256\n\tWSASYS_STATUS_LEN  = 128\n)\n\n// enum PMTUD_STATE from ws2ipdef.h\nconst (\n\tIP_PMTUDISC_NOT_SET = 0\n\tIP_PMTUDISC_DO      = 1\n\tIP_PMTUDISC_DONT    = 2\n\tIP_PMTUDISC_PROBE   = 3\n\tIP_PMTUDISC_MAX     = 4\n)\n\ntype WSABuf struct {\n\tLen uint32\n\tBuf *byte\n}\n\ntype WSAMsg struct {\n\tName        *syscall.RawSockaddrAny\n\tNamelen     int32\n\tBuffers     *WSABuf\n\tBufferCount uint32\n\tControl     WSABuf\n\tFlags       uint32\n}\n\ntype WSACMSGHDR struct {\n\tLen   uintptr\n\tLevel int32\n\tType  int32\n}\n\ntype IN_PKTINFO struct {\n\tAddr    [4]byte\n\tIfindex uint32\n}\n\ntype IN6_PKTINFO struct {\n\tAddr    [16]byte\n\tIfindex uint32\n}\n\n// Flags for WSASocket\nconst (\n\tWSA_FLAG_OVERLAPPED             = 0x01\n\tWSA_FLAG_MULTIPOINT_C_ROOT      = 0x02\n\tWSA_FLAG_MULTIPOINT_C_LEAF      = 0x04\n\tWSA_FLAG_MULTIPOINT_D_ROOT      = 0x08\n\tWSA_FLAG_MULTIPOINT_D_LEAF      = 0x10\n\tWSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40\n\tWSA_FLAG_NO_HANDLE_INHERIT      = 0x80\n\tWSA_FLAG_REGISTERED_IO          = 0x100\n)\n\n// Invented values to support what package os expects.\nconst (\n\tS_IFMT   = 0x1f000\n\tS_IFIFO  = 0x1000\n\tS_IFCHR  = 0x2000\n\tS_IFDIR  = 0x4000\n\tS_IFBLK  = 0x6000\n\tS_IFREG  = 0x8000\n\tS_IFLNK  = 0xa000\n\tS_IFSOCK = 0xc000\n\tS_ISUID  = 0x800\n\tS_ISGID  = 0x400\n\tS_ISVTX  = 0x200\n\tS_IRUSR  = 0x100\n\tS_IWRITE = 0x80\n\tS_IWUSR  = 0x80\n\tS_IXUSR  = 0x40\n)\n\nconst (\n\tFILE_TYPE_CHAR    = 0x0002\n\tFILE_TYPE_DISK    = 0x0001\n\tFILE_TYPE_PIPE    = 0x0003\n\tFILE_TYPE_REMOTE  = 0x8000\n\tFILE_TYPE_UNKNOWN = 0x0000\n)\n\ntype Hostent struct {\n\tName     *byte\n\tAliases  **byte\n\tAddrType uint16\n\tLength   uint16\n\tAddrList **byte\n}\n\ntype Protoent struct {\n\tName    *byte\n\tAliases **byte\n\tProto   uint16\n}\n\nconst (\n\tDNS_TYPE_A       = 0x0001\n\tDNS_TYPE_NS      = 0x0002\n\tDNS_TYPE_MD      = 0x0003\n\tDNS_TYPE_MF      = 0x0004\n\tDNS_TYPE_CNAME   = 0x0005\n\tDNS_TYPE_SOA     = 0x0006\n\tDNS_TYPE_MB      = 0x0007\n\tDNS_TYPE_MG      = 0x0008\n\tDNS_TYPE_MR      = 0x0009\n\tDNS_TYPE_NULL    = 0x000a\n\tDNS_TYPE_WKS     = 0x000b\n\tDNS_TYPE_PTR     = 0x000c\n\tDNS_TYPE_HINFO   = 0x000d\n\tDNS_TYPE_MINFO   = 0x000e\n\tDNS_TYPE_MX      = 0x000f\n\tDNS_TYPE_TEXT    = 0x0010\n\tDNS_TYPE_RP      = 0x0011\n\tDNS_TYPE_AFSDB   = 0x0012\n\tDNS_TYPE_X25     = 0x0013\n\tDNS_TYPE_ISDN    = 0x0014\n\tDNS_TYPE_RT      = 0x0015\n\tDNS_TYPE_NSAP    = 0x0016\n\tDNS_TYPE_NSAPPTR = 0x0017\n\tDNS_TYPE_SIG     = 0x0018\n\tDNS_TYPE_KEY     = 0x0019\n\tDNS_TYPE_PX      = 0x001a\n\tDNS_TYPE_GPOS    = 0x001b\n\tDNS_TYPE_AAAA    = 0x001c\n\tDNS_TYPE_LOC     = 0x001d\n\tDNS_TYPE_NXT     = 0x001e\n\tDNS_TYPE_EID     = 0x001f\n\tDNS_TYPE_NIMLOC  = 0x0020\n\tDNS_TYPE_SRV     = 0x0021\n\tDNS_TYPE_ATMA    = 0x0022\n\tDNS_TYPE_NAPTR   = 0x0023\n\tDNS_TYPE_KX      = 0x0024\n\tDNS_TYPE_CERT    = 0x0025\n\tDNS_TYPE_A6      = 0x0026\n\tDNS_TYPE_DNAME   = 0x0027\n\tDNS_TYPE_SINK    = 0x0028\n\tDNS_TYPE_OPT     = 0x0029\n\tDNS_TYPE_DS      = 0x002B\n\tDNS_TYPE_RRSIG   = 0x002E\n\tDNS_TYPE_NSEC    = 0x002F\n\tDNS_TYPE_DNSKEY  = 0x0030\n\tDNS_TYPE_DHCID   = 0x0031\n\tDNS_TYPE_UINFO   = 0x0064\n\tDNS_TYPE_UID     = 0x0065\n\tDNS_TYPE_GID     = 0x0066\n\tDNS_TYPE_UNSPEC  = 0x0067\n\tDNS_TYPE_ADDRS   = 0x00f8\n\tDNS_TYPE_TKEY    = 0x00f9\n\tDNS_TYPE_TSIG    = 0x00fa\n\tDNS_TYPE_IXFR    = 0x00fb\n\tDNS_TYPE_AXFR    = 0x00fc\n\tDNS_TYPE_MAILB   = 0x00fd\n\tDNS_TYPE_MAILA   = 0x00fe\n\tDNS_TYPE_ALL     = 0x00ff\n\tDNS_TYPE_ANY     = 0x00ff\n\tDNS_TYPE_WINS    = 0xff01\n\tDNS_TYPE_WINSR   = 0xff02\n\tDNS_TYPE_NBSTAT  = 0xff01\n)\n\nconst (\n\t// flags inside DNSRecord.Dw\n\tDnsSectionQuestion   = 0x0000\n\tDnsSectionAnswer     = 0x0001\n\tDnsSectionAuthority  = 0x0002\n\tDnsSectionAdditional = 0x0003\n)\n\nconst (\n\t// flags of WSALookupService\n\tLUP_DEEP                = 0x0001\n\tLUP_CONTAINERS          = 0x0002\n\tLUP_NOCONTAINERS        = 0x0004\n\tLUP_NEAREST             = 0x0008\n\tLUP_RETURN_NAME         = 0x0010\n\tLUP_RETURN_TYPE         = 0x0020\n\tLUP_RETURN_VERSION      = 0x0040\n\tLUP_RETURN_COMMENT      = 0x0080\n\tLUP_RETURN_ADDR         = 0x0100\n\tLUP_RETURN_BLOB         = 0x0200\n\tLUP_RETURN_ALIASES      = 0x0400\n\tLUP_RETURN_QUERY_STRING = 0x0800\n\tLUP_RETURN_ALL          = 0x0FF0\n\tLUP_RES_SERVICE         = 0x8000\n\n\tLUP_FLUSHCACHE    = 0x1000\n\tLUP_FLUSHPREVIOUS = 0x2000\n\n\tLUP_NON_AUTHORITATIVE      = 0x4000\n\tLUP_SECURE                 = 0x8000\n\tLUP_RETURN_PREFERRED_NAMES = 0x10000\n\tLUP_DNS_ONLY               = 0x20000\n\n\tLUP_ADDRCONFIG           = 0x100000\n\tLUP_DUAL_ADDR            = 0x200000\n\tLUP_FILESERVER           = 0x400000\n\tLUP_DISABLE_IDN_ENCODING = 0x00800000\n\tLUP_API_ANSI             = 0x01000000\n\n\tLUP_RESOLUTION_HANDLE = 0x80000000\n)\n\nconst (\n\t// values of WSAQUERYSET's namespace\n\tNS_ALL       = 0\n\tNS_DNS       = 12\n\tNS_NLA       = 15\n\tNS_BTH       = 16\n\tNS_EMAIL     = 37\n\tNS_PNRPNAME  = 38\n\tNS_PNRPCLOUD = 39\n)\n\ntype DNSSRVData struct {\n\tTarget   *uint16\n\tPriority uint16\n\tWeight   uint16\n\tPort     uint16\n\tPad      uint16\n}\n\ntype DNSPTRData struct {\n\tHost *uint16\n}\n\ntype DNSMXData struct {\n\tNameExchange *uint16\n\tPreference   uint16\n\tPad          uint16\n}\n\ntype DNSTXTData struct {\n\tStringCount uint16\n\tStringArray [1]*uint16\n}\n\ntype DNSRecord struct {\n\tNext     *DNSRecord\n\tName     *uint16\n\tType     uint16\n\tLength   uint16\n\tDw       uint32\n\tTtl      uint32\n\tReserved uint32\n\tData     [40]byte\n}\n\nconst (\n\tTF_DISCONNECT         = 1\n\tTF_REUSE_SOCKET       = 2\n\tTF_WRITE_BEHIND       = 4\n\tTF_USE_DEFAULT_WORKER = 0\n\tTF_USE_SYSTEM_THREAD  = 16\n\tTF_USE_KERNEL_APC     = 32\n)\n\ntype TransmitFileBuffers struct {\n\tHead       uintptr\n\tHeadLength uint32\n\tTail       uintptr\n\tTailLength uint32\n}\n\nconst (\n\tIFF_UP           = 1\n\tIFF_BROADCAST    = 2\n\tIFF_LOOPBACK     = 4\n\tIFF_POINTTOPOINT = 8\n\tIFF_MULTICAST    = 16\n)\n\nconst SIO_GET_INTERFACE_LIST = 0x4004747F\n\n// TODO(mattn): SockaddrGen is union of sockaddr/sockaddr_in/sockaddr_in6_old.\n// will be fixed to change variable type as suitable.\n\ntype SockaddrGen [24]byte\n\ntype InterfaceInfo struct {\n\tFlags            uint32\n\tAddress          SockaddrGen\n\tBroadcastAddress SockaddrGen\n\tNetmask          SockaddrGen\n}\n\ntype IpAddressString struct {\n\tString [16]byte\n}\n\ntype IpMaskString IpAddressString\n\ntype IpAddrString struct {\n\tNext      *IpAddrString\n\tIpAddress IpAddressString\n\tIpMask    IpMaskString\n\tContext   uint32\n}\n\nconst MAX_ADAPTER_NAME_LENGTH = 256\nconst MAX_ADAPTER_DESCRIPTION_LENGTH = 128\nconst MAX_ADAPTER_ADDRESS_LENGTH = 8\n\ntype IpAdapterInfo struct {\n\tNext                *IpAdapterInfo\n\tComboIndex          uint32\n\tAdapterName         [MAX_ADAPTER_NAME_LENGTH + 4]byte\n\tDescription         [MAX_ADAPTER_DESCRIPTION_LENGTH + 4]byte\n\tAddressLength       uint32\n\tAddress             [MAX_ADAPTER_ADDRESS_LENGTH]byte\n\tIndex               uint32\n\tType                uint32\n\tDhcpEnabled         uint32\n\tCurrentIpAddress    *IpAddrString\n\tIpAddressList       IpAddrString\n\tGatewayList         IpAddrString\n\tDhcpServer          IpAddrString\n\tHaveWins            bool\n\tPrimaryWinsServer   IpAddrString\n\tSecondaryWinsServer IpAddrString\n\tLeaseObtained       int64\n\tLeaseExpires        int64\n}\n\nconst MAXLEN_PHYSADDR = 8\nconst MAX_INTERFACE_NAME_LEN = 256\nconst MAXLEN_IFDESCR = 256\n\ntype MibIfRow struct {\n\tName            [MAX_INTERFACE_NAME_LEN]uint16\n\tIndex           uint32\n\tType            uint32\n\tMtu             uint32\n\tSpeed           uint32\n\tPhysAddrLen     uint32\n\tPhysAddr        [MAXLEN_PHYSADDR]byte\n\tAdminStatus     uint32\n\tOperStatus      uint32\n\tLastChange      uint32\n\tInOctets        uint32\n\tInUcastPkts     uint32\n\tInNUcastPkts    uint32\n\tInDiscards      uint32\n\tInErrors        uint32\n\tInUnknownProtos uint32\n\tOutOctets       uint32\n\tOutUcastPkts    uint32\n\tOutNUcastPkts   uint32\n\tOutDiscards     uint32\n\tOutErrors       uint32\n\tOutQLen         uint32\n\tDescrLen        uint32\n\tDescr           [MAXLEN_IFDESCR]byte\n}\n\ntype CertInfo struct {\n\tVersion              uint32\n\tSerialNumber         CryptIntegerBlob\n\tSignatureAlgorithm   CryptAlgorithmIdentifier\n\tIssuer               CertNameBlob\n\tNotBefore            Filetime\n\tNotAfter             Filetime\n\tSubject              CertNameBlob\n\tSubjectPublicKeyInfo CertPublicKeyInfo\n\tIssuerUniqueId       CryptBitBlob\n\tSubjectUniqueId      CryptBitBlob\n\tCountExtensions      uint32\n\tExtensions           *CertExtension\n}\n\ntype CertExtension struct {\n\tObjId    *byte\n\tCritical int32\n\tValue    CryptObjidBlob\n}\n\ntype CryptAlgorithmIdentifier struct {\n\tObjId      *byte\n\tParameters CryptObjidBlob\n}\n\ntype CertPublicKeyInfo struct {\n\tAlgorithm CryptAlgorithmIdentifier\n\tPublicKey CryptBitBlob\n}\n\ntype DataBlob struct {\n\tSize uint32\n\tData *byte\n}\ntype CryptIntegerBlob DataBlob\ntype CryptUintBlob DataBlob\ntype CryptObjidBlob DataBlob\ntype CertNameBlob DataBlob\ntype CertRdnValueBlob DataBlob\ntype CertBlob DataBlob\ntype CrlBlob DataBlob\ntype CryptDataBlob DataBlob\ntype CryptHashBlob DataBlob\ntype CryptDigestBlob DataBlob\ntype CryptDerBlob DataBlob\ntype CryptAttrBlob DataBlob\n\ntype CryptBitBlob struct {\n\tSize       uint32\n\tData       *byte\n\tUnusedBits uint32\n}\n\ntype CertContext struct {\n\tEncodingType uint32\n\tEncodedCert  *byte\n\tLength       uint32\n\tCertInfo     *CertInfo\n\tStore        Handle\n}\n\ntype CertChainContext struct {\n\tSize                       uint32\n\tTrustStatus                CertTrustStatus\n\tChainCount                 uint32\n\tChains                     **CertSimpleChain\n\tLowerQualityChainCount     uint32\n\tLowerQualityChains         **CertChainContext\n\tHasRevocationFreshnessTime uint32\n\tRevocationFreshnessTime    uint32\n}\n\ntype CertTrustListInfo struct {\n\t// Not implemented\n}\n\ntype CertSimpleChain struct {\n\tSize                       uint32\n\tTrustStatus                CertTrustStatus\n\tNumElements                uint32\n\tElements                   **CertChainElement\n\tTrustListInfo              *CertTrustListInfo\n\tHasRevocationFreshnessTime uint32\n\tRevocationFreshnessTime    uint32\n}\n\ntype CertChainElement struct {\n\tSize              uint32\n\tCertContext       *CertContext\n\tTrustStatus       CertTrustStatus\n\tRevocationInfo    *CertRevocationInfo\n\tIssuanceUsage     *CertEnhKeyUsage\n\tApplicationUsage  *CertEnhKeyUsage\n\tExtendedErrorInfo *uint16\n}\n\ntype CertRevocationCrlInfo struct {\n\t// Not implemented\n}\n\ntype CertRevocationInfo struct {\n\tSize             uint32\n\tRevocationResult uint32\n\tRevocationOid    *byte\n\tOidSpecificInfo  Pointer\n\tHasFreshnessTime uint32\n\tFreshnessTime    uint32\n\tCrlInfo          *CertRevocationCrlInfo\n}\n\ntype CertTrustStatus struct {\n\tErrorStatus uint32\n\tInfoStatus  uint32\n}\n\ntype CertUsageMatch struct {\n\tType  uint32\n\tUsage CertEnhKeyUsage\n}\n\ntype CertEnhKeyUsage struct {\n\tLength           uint32\n\tUsageIdentifiers **byte\n}\n\ntype CertChainPara struct {\n\tSize                         uint32\n\tRequestedUsage               CertUsageMatch\n\tRequstedIssuancePolicy       CertUsageMatch\n\tURLRetrievalTimeout          uint32\n\tCheckRevocationFreshnessTime uint32\n\tRevocationFreshnessTime      uint32\n\tCacheResync                  *Filetime\n}\n\ntype CertChainPolicyPara struct {\n\tSize            uint32\n\tFlags           uint32\n\tExtraPolicyPara Pointer\n}\n\ntype SSLExtraCertChainPolicyPara struct {\n\tSize       uint32\n\tAuthType   uint32\n\tChecks     uint32\n\tServerName *uint16\n}\n\ntype CertChainPolicyStatus struct {\n\tSize              uint32\n\tError             uint32\n\tChainIndex        uint32\n\tElementIndex      uint32\n\tExtraPolicyStatus Pointer\n}\n\ntype CertPolicyInfo struct {\n\tIdentifier      *byte\n\tCountQualifiers uint32\n\tQualifiers      *CertPolicyQualifierInfo\n}\n\ntype CertPoliciesInfo struct {\n\tCount       uint32\n\tPolicyInfos *CertPolicyInfo\n}\n\ntype CertPolicyQualifierInfo struct {\n\t// Not implemented\n}\n\ntype CertStrongSignPara struct {\n\tSize                      uint32\n\tInfoChoice                uint32\n\tInfoOrSerializedInfoOrOID unsafe.Pointer\n}\n\ntype CryptProtectPromptStruct struct {\n\tSize        uint32\n\tPromptFlags uint32\n\tApp         HWND\n\tPrompt      *uint16\n}\n\ntype CertChainFindByIssuerPara struct {\n\tSize                   uint32\n\tUsageIdentifier        *byte\n\tKeySpec                uint32\n\tAcquirePrivateKeyFlags uint32\n\tIssuerCount            uint32\n\tIssuer                 Pointer\n\tFindCallback           Pointer\n\tFindArg                Pointer\n\tIssuerChainIndex       *uint32\n\tIssuerElementIndex     *uint32\n}\n\ntype WinTrustData struct {\n\tSize                            uint32\n\tPolicyCallbackData              uintptr\n\tSIPClientData                   uintptr\n\tUIChoice                        uint32\n\tRevocationChecks                uint32\n\tUnionChoice                     uint32\n\tFileOrCatalogOrBlobOrSgnrOrCert unsafe.Pointer\n\tStateAction                     uint32\n\tStateData                       Handle\n\tURLReference                    *uint16\n\tProvFlags                       uint32\n\tUIContext                       uint32\n\tSignatureSettings               *WinTrustSignatureSettings\n}\n\ntype WinTrustFileInfo struct {\n\tSize         uint32\n\tFilePath     *uint16\n\tFile         Handle\n\tKnownSubject *GUID\n}\n\ntype WinTrustSignatureSettings struct {\n\tSize             uint32\n\tIndex            uint32\n\tFlags            uint32\n\tSecondarySigs    uint32\n\tVerifiedSigIndex uint32\n\tCryptoPolicy     *CertStrongSignPara\n}\n\nconst (\n\t// do not reorder\n\tHKEY_CLASSES_ROOT = 0x80000000 + iota\n\tHKEY_CURRENT_USER\n\tHKEY_LOCAL_MACHINE\n\tHKEY_USERS\n\tHKEY_PERFORMANCE_DATA\n\tHKEY_CURRENT_CONFIG\n\tHKEY_DYN_DATA\n\n\tKEY_QUERY_VALUE        = 1\n\tKEY_SET_VALUE          = 2\n\tKEY_CREATE_SUB_KEY     = 4\n\tKEY_ENUMERATE_SUB_KEYS = 8\n\tKEY_NOTIFY             = 16\n\tKEY_CREATE_LINK        = 32\n\tKEY_WRITE              = 0x20006\n\tKEY_EXECUTE            = 0x20019\n\tKEY_READ               = 0x20019\n\tKEY_WOW64_64KEY        = 0x0100\n\tKEY_WOW64_32KEY        = 0x0200\n\tKEY_ALL_ACCESS         = 0xf003f\n)\n\nconst (\n\t// do not reorder\n\tREG_NONE = iota\n\tREG_SZ\n\tREG_EXPAND_SZ\n\tREG_BINARY\n\tREG_DWORD_LITTLE_ENDIAN\n\tREG_DWORD_BIG_ENDIAN\n\tREG_LINK\n\tREG_MULTI_SZ\n\tREG_RESOURCE_LIST\n\tREG_FULL_RESOURCE_DESCRIPTOR\n\tREG_RESOURCE_REQUIREMENTS_LIST\n\tREG_QWORD_LITTLE_ENDIAN\n\tREG_DWORD = REG_DWORD_LITTLE_ENDIAN\n\tREG_QWORD = REG_QWORD_LITTLE_ENDIAN\n)\n\nconst (\n\tEVENT_MODIFY_STATE = 0x0002\n\tEVENT_ALL_ACCESS   = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3\n\n\tMUTANT_QUERY_STATE = 0x0001\n\tMUTANT_ALL_ACCESS  = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | MUTANT_QUERY_STATE\n\n\tSEMAPHORE_MODIFY_STATE = 0x0002\n\tSEMAPHORE_ALL_ACCESS   = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3\n\n\tTIMER_QUERY_STATE  = 0x0001\n\tTIMER_MODIFY_STATE = 0x0002\n\tTIMER_ALL_ACCESS   = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | TIMER_QUERY_STATE | TIMER_MODIFY_STATE\n\n\tMUTEX_MODIFY_STATE = MUTANT_QUERY_STATE\n\tMUTEX_ALL_ACCESS   = MUTANT_ALL_ACCESS\n\n\tCREATE_EVENT_MANUAL_RESET  = 0x1\n\tCREATE_EVENT_INITIAL_SET   = 0x2\n\tCREATE_MUTEX_INITIAL_OWNER = 0x1\n)\n\ntype AddrinfoW struct {\n\tFlags     int32\n\tFamily    int32\n\tSocktype  int32\n\tProtocol  int32\n\tAddrlen   uintptr\n\tCanonname *uint16\n\tAddr      uintptr\n\tNext      *AddrinfoW\n}\n\nconst (\n\tAI_PASSIVE     = 1\n\tAI_CANONNAME   = 2\n\tAI_NUMERICHOST = 4\n)\n\ntype GUID struct {\n\tData1 uint32\n\tData2 uint16\n\tData3 uint16\n\tData4 [8]byte\n}\n\nvar WSAID_CONNECTEX = GUID{\n\t0x25a207b9,\n\t0xddf3,\n\t0x4660,\n\t[8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},\n}\n\nvar WSAID_WSASENDMSG = GUID{\n\t0xa441e712,\n\t0x754f,\n\t0x43ca,\n\t[8]byte{0x84, 0xa7, 0x0d, 0xee, 0x44, 0xcf, 0x60, 0x6d},\n}\n\nvar WSAID_WSARECVMSG = GUID{\n\t0xf689d7c8,\n\t0x6f1f,\n\t0x436b,\n\t[8]byte{0x8a, 0x53, 0xe5, 0x4f, 0xe3, 0x51, 0xc3, 0x22},\n}\n\nconst (\n\tFILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1\n\tFILE_SKIP_SET_EVENT_ON_HANDLE        = 2\n)\n\nconst (\n\tWSAPROTOCOL_LEN    = 255\n\tMAX_PROTOCOL_CHAIN = 7\n\tBASE_PROTOCOL      = 1\n\tLAYERED_PROTOCOL   = 0\n\n\tXP1_CONNECTIONLESS           = 0x00000001\n\tXP1_GUARANTEED_DELIVERY      = 0x00000002\n\tXP1_GUARANTEED_ORDER         = 0x00000004\n\tXP1_MESSAGE_ORIENTED         = 0x00000008\n\tXP1_PSEUDO_STREAM            = 0x00000010\n\tXP1_GRACEFUL_CLOSE           = 0x00000020\n\tXP1_EXPEDITED_DATA           = 0x00000040\n\tXP1_CONNECT_DATA             = 0x00000080\n\tXP1_DISCONNECT_DATA          = 0x00000100\n\tXP1_SUPPORT_BROADCAST        = 0x00000200\n\tXP1_SUPPORT_MULTIPOINT       = 0x00000400\n\tXP1_MULTIPOINT_CONTROL_PLANE = 0x00000800\n\tXP1_MULTIPOINT_DATA_PLANE    = 0x00001000\n\tXP1_QOS_SUPPORTED            = 0x00002000\n\tXP1_UNI_SEND                 = 0x00008000\n\tXP1_UNI_RECV                 = 0x00010000\n\tXP1_IFS_HANDLES              = 0x00020000\n\tXP1_PARTIAL_MESSAGE          = 0x00040000\n\tXP1_SAN_SUPPORT_SDP          = 0x00080000\n\n\tPFL_MULTIPLE_PROTO_ENTRIES  = 0x00000001\n\tPFL_RECOMMENDED_PROTO_ENTRY = 0x00000002\n\tPFL_HIDDEN                  = 0x00000004\n\tPFL_MATCHES_PROTOCOL_ZERO   = 0x00000008\n\tPFL_NETWORKDIRECT_PROVIDER  = 0x00000010\n)\n\ntype WSAProtocolInfo struct {\n\tServiceFlags1     uint32\n\tServiceFlags2     uint32\n\tServiceFlags3     uint32\n\tServiceFlags4     uint32\n\tProviderFlags     uint32\n\tProviderId        GUID\n\tCatalogEntryId    uint32\n\tProtocolChain     WSAProtocolChain\n\tVersion           int32\n\tAddressFamily     int32\n\tMaxSockAddr       int32\n\tMinSockAddr       int32\n\tSocketType        int32\n\tProtocol          int32\n\tProtocolMaxOffset int32\n\tNetworkByteOrder  int32\n\tSecurityScheme    int32\n\tMessageSize       uint32\n\tProviderReserved  uint32\n\tProtocolName      [WSAPROTOCOL_LEN + 1]uint16\n}\n\ntype WSAProtocolChain struct {\n\tChainLen     int32\n\tChainEntries [MAX_PROTOCOL_CHAIN]uint32\n}\n\ntype TCPKeepalive struct {\n\tOnOff    uint32\n\tTime     uint32\n\tInterval uint32\n}\n\ntype symbolicLinkReparseBuffer struct {\n\tSubstituteNameOffset uint16\n\tSubstituteNameLength uint16\n\tPrintNameOffset      uint16\n\tPrintNameLength      uint16\n\tFlags                uint32\n\tPathBuffer           [1]uint16\n}\n\ntype mountPointReparseBuffer struct {\n\tSubstituteNameOffset uint16\n\tSubstituteNameLength uint16\n\tPrintNameOffset      uint16\n\tPrintNameLength      uint16\n\tPathBuffer           [1]uint16\n}\n\ntype reparseDataBuffer struct {\n\tReparseTag        uint32\n\tReparseDataLength uint16\n\tReserved          uint16\n\n\t// GenericReparseBuffer\n\treparseBuffer byte\n}\n\nconst (\n\tFSCTL_CREATE_OR_GET_OBJECT_ID             = 0x0900C0\n\tFSCTL_DELETE_OBJECT_ID                    = 0x0900A0\n\tFSCTL_DELETE_REPARSE_POINT                = 0x0900AC\n\tFSCTL_DUPLICATE_EXTENTS_TO_FILE           = 0x098344\n\tFSCTL_DUPLICATE_EXTENTS_TO_FILE_EX        = 0x0983E8\n\tFSCTL_FILESYSTEM_GET_STATISTICS           = 0x090060\n\tFSCTL_FILE_LEVEL_TRIM                     = 0x098208\n\tFSCTL_FIND_FILES_BY_SID                   = 0x09008F\n\tFSCTL_GET_COMPRESSION                     = 0x09003C\n\tFSCTL_GET_INTEGRITY_INFORMATION           = 0x09027C\n\tFSCTL_GET_NTFS_VOLUME_DATA                = 0x090064\n\tFSCTL_GET_REFS_VOLUME_DATA                = 0x0902D8\n\tFSCTL_GET_OBJECT_ID                       = 0x09009C\n\tFSCTL_GET_REPARSE_POINT                   = 0x0900A8\n\tFSCTL_GET_RETRIEVAL_POINTER_COUNT         = 0x09042B\n\tFSCTL_GET_RETRIEVAL_POINTERS              = 0x090073\n\tFSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3\n\tFSCTL_IS_PATHNAME_VALID                   = 0x09002C\n\tFSCTL_LMR_SET_LINK_TRACKING_INFORMATION   = 0x1400EC\n\tFSCTL_MARK_HANDLE                         = 0x0900FC\n\tFSCTL_OFFLOAD_READ                        = 0x094264\n\tFSCTL_OFFLOAD_WRITE                       = 0x098268\n\tFSCTL_PIPE_PEEK                           = 0x11400C\n\tFSCTL_PIPE_TRANSCEIVE                     = 0x11C017\n\tFSCTL_PIPE_WAIT                           = 0x110018\n\tFSCTL_QUERY_ALLOCATED_RANGES              = 0x0940CF\n\tFSCTL_QUERY_FAT_BPB                       = 0x090058\n\tFSCTL_QUERY_FILE_REGIONS                  = 0x090284\n\tFSCTL_QUERY_ON_DISK_VOLUME_INFO           = 0x09013C\n\tFSCTL_QUERY_SPARING_INFO                  = 0x090138\n\tFSCTL_READ_FILE_USN_DATA                  = 0x0900EB\n\tFSCTL_RECALL_FILE                         = 0x090117\n\tFSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT     = 0x090440\n\tFSCTL_SET_COMPRESSION                     = 0x09C040\n\tFSCTL_SET_DEFECT_MANAGEMENT               = 0x098134\n\tFSCTL_SET_ENCRYPTION                      = 0x0900D7\n\tFSCTL_SET_INTEGRITY_INFORMATION           = 0x09C280\n\tFSCTL_SET_INTEGRITY_INFORMATION_EX        = 0x090380\n\tFSCTL_SET_OBJECT_ID                       = 0x090098\n\tFSCTL_SET_OBJECT_ID_EXTENDED              = 0x0900BC\n\tFSCTL_SET_REPARSE_POINT                   = 0x0900A4\n\tFSCTL_SET_SPARSE                          = 0x0900C4\n\tFSCTL_SET_ZERO_DATA                       = 0x0980C8\n\tFSCTL_SET_ZERO_ON_DEALLOCATION            = 0x090194\n\tFSCTL_SIS_COPYFILE                        = 0x090100\n\tFSCTL_WRITE_USN_CLOSE_RECORD              = 0x0900EF\n\n\tMAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024\n\tIO_REPARSE_TAG_MOUNT_POINT       = 0xA0000003\n\tIO_REPARSE_TAG_SYMLINK           = 0xA000000C\n\tSYMBOLIC_LINK_FLAG_DIRECTORY     = 0x1\n)\n\n// FILE_ZERO_DATA_INFORMATION from winioctl.h\ntype FileZeroDataInformation struct {\n\tFileOffset      int64\n\tBeyondFinalZero int64\n}\n\nconst (\n\tComputerNameNetBIOS                   = 0\n\tComputerNameDnsHostname               = 1\n\tComputerNameDnsDomain                 = 2\n\tComputerNameDnsFullyQualified         = 3\n\tComputerNamePhysicalNetBIOS           = 4\n\tComputerNamePhysicalDnsHostname       = 5\n\tComputerNamePhysicalDnsDomain         = 6\n\tComputerNamePhysicalDnsFullyQualified = 7\n\tComputerNameMax                       = 8\n)\n\n// For MessageBox()\nconst (\n\tMB_OK                   = 0x00000000\n\tMB_OKCANCEL             = 0x00000001\n\tMB_ABORTRETRYIGNORE     = 0x00000002\n\tMB_YESNOCANCEL          = 0x00000003\n\tMB_YESNO                = 0x00000004\n\tMB_RETRYCANCEL          = 0x00000005\n\tMB_CANCELTRYCONTINUE    = 0x00000006\n\tMB_ICONHAND             = 0x00000010\n\tMB_ICONQUESTION         = 0x00000020\n\tMB_ICONEXCLAMATION      = 0x00000030\n\tMB_ICONASTERISK         = 0x00000040\n\tMB_USERICON             = 0x00000080\n\tMB_ICONWARNING          = MB_ICONEXCLAMATION\n\tMB_ICONERROR            = MB_ICONHAND\n\tMB_ICONINFORMATION      = MB_ICONASTERISK\n\tMB_ICONSTOP             = MB_ICONHAND\n\tMB_DEFBUTTON1           = 0x00000000\n\tMB_DEFBUTTON2           = 0x00000100\n\tMB_DEFBUTTON3           = 0x00000200\n\tMB_DEFBUTTON4           = 0x00000300\n\tMB_APPLMODAL            = 0x00000000\n\tMB_SYSTEMMODAL          = 0x00001000\n\tMB_TASKMODAL            = 0x00002000\n\tMB_HELP                 = 0x00004000\n\tMB_NOFOCUS              = 0x00008000\n\tMB_SETFOREGROUND        = 0x00010000\n\tMB_DEFAULT_DESKTOP_ONLY = 0x00020000\n\tMB_TOPMOST              = 0x00040000\n\tMB_RIGHT                = 0x00080000\n\tMB_RTLREADING           = 0x00100000\n\tMB_SERVICE_NOTIFICATION = 0x00200000\n)\n\nconst (\n\tMOVEFILE_REPLACE_EXISTING      = 0x1\n\tMOVEFILE_COPY_ALLOWED          = 0x2\n\tMOVEFILE_DELAY_UNTIL_REBOOT    = 0x4\n\tMOVEFILE_WRITE_THROUGH         = 0x8\n\tMOVEFILE_CREATE_HARDLINK       = 0x10\n\tMOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20\n)\n\n// Flags for GetAdaptersAddresses, see\n// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses.\nconst (\n\tGAA_FLAG_SKIP_UNICAST                = 0x1\n\tGAA_FLAG_SKIP_ANYCAST                = 0x2\n\tGAA_FLAG_SKIP_MULTICAST              = 0x4\n\tGAA_FLAG_SKIP_DNS_SERVER             = 0x8\n\tGAA_FLAG_INCLUDE_PREFIX              = 0x10\n\tGAA_FLAG_SKIP_FRIENDLY_NAME          = 0x20\n\tGAA_FLAG_INCLUDE_WINS_INFO           = 0x40\n\tGAA_FLAG_INCLUDE_GATEWAYS            = 0x80\n\tGAA_FLAG_INCLUDE_ALL_INTERFACES      = 0x100\n\tGAA_FLAG_INCLUDE_ALL_COMPARTMENTS    = 0x200\n\tGAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400\n)\n\nconst (\n\tIF_TYPE_OTHER              = 1\n\tIF_TYPE_ETHERNET_CSMACD    = 6\n\tIF_TYPE_ISO88025_TOKENRING = 9\n\tIF_TYPE_PPP                = 23\n\tIF_TYPE_SOFTWARE_LOOPBACK  = 24\n\tIF_TYPE_ATM                = 37\n\tIF_TYPE_IEEE80211          = 71\n\tIF_TYPE_TUNNEL             = 131\n\tIF_TYPE_IEEE1394           = 144\n)\n\n// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see\n// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin\nconst (\n\tIpPrefixOriginOther               = 0\n\tIpPrefixOriginManual              = 1\n\tIpPrefixOriginWellKnown           = 2\n\tIpPrefixOriginDhcp                = 3\n\tIpPrefixOriginRouterAdvertisement = 4\n\tIpPrefixOriginUnchanged           = 1 << 4\n)\n\n// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see\n// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin\nconst (\n\tNlsoOther                      = 0\n\tNlsoManual                     = 1\n\tNlsoWellKnown                  = 2\n\tNlsoDhcp                       = 3\n\tNlsoLinkLayerAddress           = 4\n\tNlsoRandom                     = 5\n\tIpSuffixOriginOther            = 0\n\tIpSuffixOriginManual           = 1\n\tIpSuffixOriginWellKnown        = 2\n\tIpSuffixOriginDhcp             = 3\n\tIpSuffixOriginLinkLayerAddress = 4\n\tIpSuffixOriginRandom           = 5\n\tIpSuffixOriginUnchanged        = 1 << 4\n)\n\n// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see\n// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state\nconst (\n\tNldsInvalid          = 0\n\tNldsTentative        = 1\n\tNldsDuplicate        = 2\n\tNldsDeprecated       = 3\n\tNldsPreferred        = 4\n\tIpDadStateInvalid    = 0\n\tIpDadStateTentative  = 1\n\tIpDadStateDuplicate  = 2\n\tIpDadStateDeprecated = 3\n\tIpDadStatePreferred  = 4\n)\n\ntype SocketAddress struct {\n\tSockaddr       *syscall.RawSockaddrAny\n\tSockaddrLength int32\n}\n\n// IP returns an IPv4 or IPv6 address, or nil if the underlying SocketAddress is neither.\nfunc (addr *SocketAddress) IP() net.IP {\n\tif uintptr(addr.SockaddrLength) >= unsafe.Sizeof(RawSockaddrInet4{}) && addr.Sockaddr.Addr.Family == AF_INET {\n\t\treturn (*RawSockaddrInet4)(unsafe.Pointer(addr.Sockaddr)).Addr[:]\n\t} else if uintptr(addr.SockaddrLength) >= unsafe.Sizeof(RawSockaddrInet6{}) && addr.Sockaddr.Addr.Family == AF_INET6 {\n\t\treturn (*RawSockaddrInet6)(unsafe.Pointer(addr.Sockaddr)).Addr[:]\n\t}\n\treturn nil\n}\n\ntype IpAdapterUnicastAddress struct {\n\tLength             uint32\n\tFlags              uint32\n\tNext               *IpAdapterUnicastAddress\n\tAddress            SocketAddress\n\tPrefixOrigin       int32\n\tSuffixOrigin       int32\n\tDadState           int32\n\tValidLifetime      uint32\n\tPreferredLifetime  uint32\n\tLeaseLifetime      uint32\n\tOnLinkPrefixLength uint8\n}\n\ntype IpAdapterAnycastAddress struct {\n\tLength  uint32\n\tFlags   uint32\n\tNext    *IpAdapterAnycastAddress\n\tAddress SocketAddress\n}\n\ntype IpAdapterMulticastAddress struct {\n\tLength  uint32\n\tFlags   uint32\n\tNext    *IpAdapterMulticastAddress\n\tAddress SocketAddress\n}\n\ntype IpAdapterDnsServerAdapter struct {\n\tLength   uint32\n\tReserved uint32\n\tNext     *IpAdapterDnsServerAdapter\n\tAddress  SocketAddress\n}\n\ntype IpAdapterPrefix struct {\n\tLength       uint32\n\tFlags        uint32\n\tNext         *IpAdapterPrefix\n\tAddress      SocketAddress\n\tPrefixLength uint32\n}\n\ntype IpAdapterAddresses struct {\n\tLength                 uint32\n\tIfIndex                uint32\n\tNext                   *IpAdapterAddresses\n\tAdapterName            *byte\n\tFirstUnicastAddress    *IpAdapterUnicastAddress\n\tFirstAnycastAddress    *IpAdapterAnycastAddress\n\tFirstMulticastAddress  *IpAdapterMulticastAddress\n\tFirstDnsServerAddress  *IpAdapterDnsServerAdapter\n\tDnsSuffix              *uint16\n\tDescription            *uint16\n\tFriendlyName           *uint16\n\tPhysicalAddress        [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte\n\tPhysicalAddressLength  uint32\n\tFlags                  uint32\n\tMtu                    uint32\n\tIfType                 uint32\n\tOperStatus             uint32\n\tIpv6IfIndex            uint32\n\tZoneIndices            [16]uint32\n\tFirstPrefix            *IpAdapterPrefix\n\tTransmitLinkSpeed      uint64\n\tReceiveLinkSpeed       uint64\n\tFirstWinsServerAddress *IpAdapterWinsServerAddress\n\tFirstGatewayAddress    *IpAdapterGatewayAddress\n\tIpv4Metric             uint32\n\tIpv6Metric             uint32\n\tLuid                   uint64\n\tDhcpv4Server           SocketAddress\n\tCompartmentId          uint32\n\tNetworkGuid            GUID\n\tConnectionType         uint32\n\tTunnelType             uint32\n\tDhcpv6Server           SocketAddress\n\tDhcpv6ClientDuid       [MAX_DHCPV6_DUID_LENGTH]byte\n\tDhcpv6ClientDuidLength uint32\n\tDhcpv6Iaid             uint32\n\tFirstDnsSuffix         *IpAdapterDNSSuffix\n}\n\ntype IpAdapterWinsServerAddress struct {\n\tLength   uint32\n\tReserved uint32\n\tNext     *IpAdapterWinsServerAddress\n\tAddress  SocketAddress\n}\n\ntype IpAdapterGatewayAddress struct {\n\tLength   uint32\n\tReserved uint32\n\tNext     *IpAdapterGatewayAddress\n\tAddress  SocketAddress\n}\n\ntype IpAdapterDNSSuffix struct {\n\tNext   *IpAdapterDNSSuffix\n\tString [MAX_DNS_SUFFIX_STRING_LENGTH]uint16\n}\n\nconst (\n\tIfOperStatusUp             = 1\n\tIfOperStatusDown           = 2\n\tIfOperStatusTesting        = 3\n\tIfOperStatusUnknown        = 4\n\tIfOperStatusDormant        = 5\n\tIfOperStatusNotPresent     = 6\n\tIfOperStatusLowerLayerDown = 7\n)\n\nconst (\n\tIF_MAX_PHYS_ADDRESS_LENGTH = 32\n\tIF_MAX_STRING_SIZE         = 256\n)\n\n// MIB_IF_ENTRY_LEVEL enumeration from netioapi.h or\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/nf-netioapi-getifentry2ex.\nconst (\n\tMibIfEntryNormal                  = 0\n\tMibIfEntryNormalWithoutStatistics = 2\n)\n\n// MIB_NOTIFICATION_TYPE enumeration from netioapi.h or\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ne-netioapi-mib_notification_type.\nconst (\n\tMibParameterNotification = 0\n\tMibAddInstance           = 1\n\tMibDeleteInstance        = 2\n\tMibInitialNotification   = 3\n)\n\n// MibIfRow2 stores information about a particular interface. See\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_row2.\ntype MibIfRow2 struct {\n\tInterfaceLuid               uint64\n\tInterfaceIndex              uint32\n\tInterfaceGuid               GUID\n\tAlias                       [IF_MAX_STRING_SIZE + 1]uint16\n\tDescription                 [IF_MAX_STRING_SIZE + 1]uint16\n\tPhysicalAddressLength       uint32\n\tPhysicalAddress             [IF_MAX_PHYS_ADDRESS_LENGTH]uint8\n\tPermanentPhysicalAddress    [IF_MAX_PHYS_ADDRESS_LENGTH]uint8\n\tMtu                         uint32\n\tType                        uint32\n\tTunnelType                  uint32\n\tMediaType                   uint32\n\tPhysicalMediumType          uint32\n\tAccessType                  uint32\n\tDirectionType               uint32\n\tInterfaceAndOperStatusFlags uint8\n\tOperStatus                  uint32\n\tAdminStatus                 uint32\n\tMediaConnectState           uint32\n\tNetworkGuid                 GUID\n\tConnectionType              uint32\n\tTransmitLinkSpeed           uint64\n\tReceiveLinkSpeed            uint64\n\tInOctets                    uint64\n\tInUcastPkts                 uint64\n\tInNUcastPkts                uint64\n\tInDiscards                  uint64\n\tInErrors                    uint64\n\tInUnknownProtos             uint64\n\tInUcastOctets               uint64\n\tInMulticastOctets           uint64\n\tInBroadcastOctets           uint64\n\tOutOctets                   uint64\n\tOutUcastPkts                uint64\n\tOutNUcastPkts               uint64\n\tOutDiscards                 uint64\n\tOutErrors                   uint64\n\tOutUcastOctets              uint64\n\tOutMulticastOctets          uint64\n\tOutBroadcastOctets          uint64\n\tOutQLen                     uint64\n}\n\n// IP_ADDRESS_PREFIX stores an IP address prefix. See\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix.\ntype IpAddressPrefix struct {\n\tPrefix       RawSockaddrInet\n\tPrefixLength uint8\n}\n\n// NL_ROUTE_ORIGIN enumeration from nldef.h or\n// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_origin.\nconst (\n\tNlroManual              = 0\n\tNlroWellKnown           = 1\n\tNlroDHCP                = 2\n\tNlroRouterAdvertisement = 3\n\tNlro6to4                = 4\n)\n\n// NL_ROUTE_ORIGIN enumeration from nldef.h or\n// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_protocol.\nconst (\n\tMIB_IPPROTO_OTHER             = 1\n\tMIB_IPPROTO_LOCAL             = 2\n\tMIB_IPPROTO_NETMGMT           = 3\n\tMIB_IPPROTO_ICMP              = 4\n\tMIB_IPPROTO_EGP               = 5\n\tMIB_IPPROTO_GGP               = 6\n\tMIB_IPPROTO_HELLO             = 7\n\tMIB_IPPROTO_RIP               = 8\n\tMIB_IPPROTO_IS_IS             = 9\n\tMIB_IPPROTO_ES_IS             = 10\n\tMIB_IPPROTO_CISCO             = 11\n\tMIB_IPPROTO_BBN               = 12\n\tMIB_IPPROTO_OSPF              = 13\n\tMIB_IPPROTO_BGP               = 14\n\tMIB_IPPROTO_IDPR              = 15\n\tMIB_IPPROTO_EIGRP             = 16\n\tMIB_IPPROTO_DVMRP             = 17\n\tMIB_IPPROTO_RPL               = 18\n\tMIB_IPPROTO_DHCP              = 19\n\tMIB_IPPROTO_NT_AUTOSTATIC     = 10002\n\tMIB_IPPROTO_NT_STATIC         = 10006\n\tMIB_IPPROTO_NT_STATIC_NON_DOD = 10007\n)\n\n// MIB_IPFORWARD_ROW2 stores information about an IP route entry. See\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_row2.\ntype MibIpForwardRow2 struct {\n\tInterfaceLuid        uint64\n\tInterfaceIndex       uint32\n\tDestinationPrefix    IpAddressPrefix\n\tNextHop              RawSockaddrInet\n\tSitePrefixLength     uint8\n\tValidLifetime        uint32\n\tPreferredLifetime    uint32\n\tMetric               uint32\n\tProtocol             uint32\n\tLoopback             uint8\n\tAutoconfigureAddress uint8\n\tPublish              uint8\n\tImmortal             uint8\n\tAge                  uint32\n\tOrigin               uint32\n}\n\n// MIB_IPFORWARD_TABLE2 contains a table of IP route entries. See\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_table2.\ntype MibIpForwardTable2 struct {\n\tNumEntries uint32\n\tTable      [1]MibIpForwardRow2\n}\n\n// Rows returns the IP route entries in the table.\nfunc (t *MibIpForwardTable2) Rows() []MibIpForwardRow2 {\n\treturn unsafe.Slice(&t.Table[0], t.NumEntries)\n}\n\n// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See\n// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.\ntype MibUnicastIpAddressRow struct {\n\tAddress            RawSockaddrInet6 // SOCKADDR_INET union\n\tInterfaceLuid      uint64\n\tInterfaceIndex     uint32\n\tPrefixOrigin       uint32\n\tSuffixOrigin       uint32\n\tValidLifetime      uint32\n\tPreferredLifetime  uint32\n\tOnLinkPrefixLength uint8\n\tSkipAsSource       uint8\n\tDadState           uint32\n\tScopeId            uint32\n\tCreationTimeStamp  Filetime\n}\n\nconst ScopeLevelCount = 16\n\n// MIB_IPINTERFACE_ROW stores interface management information for a particular IP address family on a network interface.\n// See https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipinterface_row.\ntype MibIpInterfaceRow struct {\n\tFamily                               uint16\n\tInterfaceLuid                        uint64\n\tInterfaceIndex                       uint32\n\tMaxReassemblySize                    uint32\n\tInterfaceIdentifier                  uint64\n\tMinRouterAdvertisementInterval       uint32\n\tMaxRouterAdvertisementInterval       uint32\n\tAdvertisingEnabled                   uint8\n\tForwardingEnabled                    uint8\n\tWeakHostSend                         uint8\n\tWeakHostReceive                      uint8\n\tUseAutomaticMetric                   uint8\n\tUseNeighborUnreachabilityDetection   uint8\n\tManagedAddressConfigurationSupported uint8\n\tOtherStatefulConfigurationSupported  uint8\n\tAdvertiseDefaultRoute                uint8\n\tRouterDiscoveryBehavior              uint32\n\tDadTransmits                         uint32\n\tBaseReachableTime                    uint32\n\tRetransmitTime                       uint32\n\tPathMtuDiscoveryTimeout              uint32\n\tLinkLocalAddressBehavior             uint32\n\tLinkLocalAddressTimeout              uint32\n\tZoneIndices                          [ScopeLevelCount]uint32\n\tSitePrefixLength                     uint32\n\tMetric                               uint32\n\tNlMtu                                uint32\n\tConnected                            uint8\n\tSupportsWakeUpPatterns               uint8\n\tSupportsNeighborDiscovery            uint8\n\tSupportsRouterDiscovery              uint8\n\tReachableTime                        uint32\n\tTransmitOffload                      uint32\n\tReceiveOffload                       uint32\n\tDisableDefaultRoutes                 uint8\n}\n\n// Console related constants used for the mode parameter to SetConsoleMode. See\n// https://docs.microsoft.com/en-us/windows/console/setconsolemode for details.\n\nconst (\n\tENABLE_PROCESSED_INPUT        = 0x1\n\tENABLE_LINE_INPUT             = 0x2\n\tENABLE_ECHO_INPUT             = 0x4\n\tENABLE_WINDOW_INPUT           = 0x8\n\tENABLE_MOUSE_INPUT            = 0x10\n\tENABLE_INSERT_MODE            = 0x20\n\tENABLE_QUICK_EDIT_MODE        = 0x40\n\tENABLE_EXTENDED_FLAGS         = 0x80\n\tENABLE_AUTO_POSITION          = 0x100\n\tENABLE_VIRTUAL_TERMINAL_INPUT = 0x200\n\n\tENABLE_PROCESSED_OUTPUT            = 0x1\n\tENABLE_WRAP_AT_EOL_OUTPUT          = 0x2\n\tENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4\n\tDISABLE_NEWLINE_AUTO_RETURN        = 0x8\n\tENABLE_LVB_GRID_WORLDWIDE          = 0x10\n)\n\n// Pseudo console related constants used for the flags parameter to\n// CreatePseudoConsole. See: https://learn.microsoft.com/en-us/windows/console/createpseudoconsole\nconst (\n\tPSEUDOCONSOLE_INHERIT_CURSOR = 0x1\n)\n\ntype Coord struct {\n\tX int16\n\tY int16\n}\n\ntype SmallRect struct {\n\tLeft   int16\n\tTop    int16\n\tRight  int16\n\tBottom int16\n}\n\n// Used with GetConsoleScreenBuffer to retrieve information about a console\n// screen buffer. See\n// https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str\n// for details.\n\ntype ConsoleScreenBufferInfo struct {\n\tSize              Coord\n\tCursorPosition    Coord\n\tAttributes        uint16\n\tWindow            SmallRect\n\tMaximumWindowSize Coord\n}\n\nconst UNIX_PATH_MAX = 108 // defined in afunix.h\n\nconst (\n\t// flags for JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags\n\tJOB_OBJECT_LIMIT_ACTIVE_PROCESS             = 0x00000008\n\tJOB_OBJECT_LIMIT_AFFINITY                   = 0x00000010\n\tJOB_OBJECT_LIMIT_BREAKAWAY_OK               = 0x00000800\n\tJOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 0x00000400\n\tJOB_OBJECT_LIMIT_JOB_MEMORY                 = 0x00000200\n\tJOB_OBJECT_LIMIT_JOB_TIME                   = 0x00000004\n\tJOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE          = 0x00002000\n\tJOB_OBJECT_LIMIT_PRESERVE_JOB_TIME          = 0x00000040\n\tJOB_OBJECT_LIMIT_PRIORITY_CLASS             = 0x00000020\n\tJOB_OBJECT_LIMIT_PROCESS_MEMORY             = 0x00000100\n\tJOB_OBJECT_LIMIT_PROCESS_TIME               = 0x00000002\n\tJOB_OBJECT_LIMIT_SCHEDULING_CLASS           = 0x00000080\n\tJOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK        = 0x00001000\n\tJOB_OBJECT_LIMIT_SUBSET_AFFINITY            = 0x00004000\n\tJOB_OBJECT_LIMIT_WORKINGSET                 = 0x00000001\n)\n\ntype IO_COUNTERS struct {\n\tReadOperationCount  uint64\n\tWriteOperationCount uint64\n\tOtherOperationCount uint64\n\tReadTransferCount   uint64\n\tWriteTransferCount  uint64\n\tOtherTransferCount  uint64\n}\n\ntype JOBOBJECT_EXTENDED_LIMIT_INFORMATION struct {\n\tBasicLimitInformation JOBOBJECT_BASIC_LIMIT_INFORMATION\n\tIoInfo                IO_COUNTERS\n\tProcessMemoryLimit    uintptr\n\tJobMemoryLimit        uintptr\n\tPeakProcessMemoryUsed uintptr\n\tPeakJobMemoryUsed     uintptr\n}\n\nconst (\n\t// UIRestrictionsClass\n\tJOB_OBJECT_UILIMIT_DESKTOP          = 0x00000040\n\tJOB_OBJECT_UILIMIT_DISPLAYSETTINGS  = 0x00000010\n\tJOB_OBJECT_UILIMIT_EXITWINDOWS      = 0x00000080\n\tJOB_OBJECT_UILIMIT_GLOBALATOMS      = 0x00000020\n\tJOB_OBJECT_UILIMIT_HANDLES          = 0x00000001\n\tJOB_OBJECT_UILIMIT_READCLIPBOARD    = 0x00000002\n\tJOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 0x00000008\n\tJOB_OBJECT_UILIMIT_WRITECLIPBOARD   = 0x00000004\n)\n\ntype JOBOBJECT_BASIC_UI_RESTRICTIONS struct {\n\tUIRestrictionsClass uint32\n}\n\nconst (\n\t// JobObjectInformationClass for QueryInformationJobObject and SetInformationJobObject\n\tJobObjectAssociateCompletionPortInformation = 7\n\tJobObjectBasicAccountingInformation         = 1\n\tJobObjectBasicAndIoAccountingInformation    = 8\n\tJobObjectBasicLimitInformation              = 2\n\tJobObjectBasicProcessIdList                 = 3\n\tJobObjectBasicUIRestrictions                = 4\n\tJobObjectCpuRateControlInformation          = 15\n\tJobObjectEndOfJobTimeInformation            = 6\n\tJobObjectExtendedLimitInformation           = 9\n\tJobObjectGroupInformation                   = 11\n\tJobObjectGroupInformationEx                 = 14\n\tJobObjectLimitViolationInformation          = 13\n\tJobObjectLimitViolationInformation2         = 34\n\tJobObjectNetRateControlInformation          = 32\n\tJobObjectNotificationLimitInformation       = 12\n\tJobObjectNotificationLimitInformation2      = 33\n\tJobObjectSecurityLimitInformation           = 5\n)\n\nconst (\n\tKF_FLAG_DEFAULT                          = 0x00000000\n\tKF_FLAG_FORCE_APP_DATA_REDIRECTION       = 0x00080000\n\tKF_FLAG_RETURN_FILTER_REDIRECTION_TARGET = 0x00040000\n\tKF_FLAG_FORCE_PACKAGE_REDIRECTION        = 0x00020000\n\tKF_FLAG_NO_PACKAGE_REDIRECTION           = 0x00010000\n\tKF_FLAG_FORCE_APPCONTAINER_REDIRECTION   = 0x00020000\n\tKF_FLAG_NO_APPCONTAINER_REDIRECTION      = 0x00010000\n\tKF_FLAG_CREATE                           = 0x00008000\n\tKF_FLAG_DONT_VERIFY                      = 0x00004000\n\tKF_FLAG_DONT_UNEXPAND                    = 0x00002000\n\tKF_FLAG_NO_ALIAS                         = 0x00001000\n\tKF_FLAG_INIT                             = 0x00000800\n\tKF_FLAG_DEFAULT_PATH                     = 0x00000400\n\tKF_FLAG_NOT_PARENT_RELATIVE              = 0x00000200\n\tKF_FLAG_SIMPLE_IDLIST                    = 0x00000100\n\tKF_FLAG_ALIAS_ONLY                       = 0x80000000\n)\n\ntype OsVersionInfoEx struct {\n\tosVersionInfoSize uint32\n\tMajorVersion      uint32\n\tMinorVersion      uint32\n\tBuildNumber       uint32\n\tPlatformId        uint32\n\tCsdVersion        [128]uint16\n\tServicePackMajor  uint16\n\tServicePackMinor  uint16\n\tSuiteMask         uint16\n\tProductType       byte\n\t_                 byte\n}\n\nconst (\n\tEWX_LOGOFF          = 0x00000000\n\tEWX_SHUTDOWN        = 0x00000001\n\tEWX_REBOOT          = 0x00000002\n\tEWX_FORCE           = 0x00000004\n\tEWX_POWEROFF        = 0x00000008\n\tEWX_FORCEIFHUNG     = 0x00000010\n\tEWX_QUICKRESOLVE    = 0x00000020\n\tEWX_RESTARTAPPS     = 0x00000040\n\tEWX_HYBRID_SHUTDOWN = 0x00400000\n\tEWX_BOOTOPTIONS     = 0x01000000\n\n\tSHTDN_REASON_FLAG_COMMENT_REQUIRED          = 0x01000000\n\tSHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000\n\tSHTDN_REASON_FLAG_CLEAN_UI                  = 0x04000000\n\tSHTDN_REASON_FLAG_DIRTY_UI                  = 0x08000000\n\tSHTDN_REASON_FLAG_USER_DEFINED              = 0x40000000\n\tSHTDN_REASON_FLAG_PLANNED                   = 0x80000000\n\tSHTDN_REASON_MAJOR_OTHER                    = 0x00000000\n\tSHTDN_REASON_MAJOR_NONE                     = 0x00000000\n\tSHTDN_REASON_MAJOR_HARDWARE                 = 0x00010000\n\tSHTDN_REASON_MAJOR_OPERATINGSYSTEM          = 0x00020000\n\tSHTDN_REASON_MAJOR_SOFTWARE                 = 0x00030000\n\tSHTDN_REASON_MAJOR_APPLICATION              = 0x00040000\n\tSHTDN_REASON_MAJOR_SYSTEM                   = 0x00050000\n\tSHTDN_REASON_MAJOR_POWER                    = 0x00060000\n\tSHTDN_REASON_MAJOR_LEGACY_API               = 0x00070000\n\tSHTDN_REASON_MINOR_OTHER                    = 0x00000000\n\tSHTDN_REASON_MINOR_NONE                     = 0x000000ff\n\tSHTDN_REASON_MINOR_MAINTENANCE              = 0x00000001\n\tSHTDN_REASON_MINOR_INSTALLATION             = 0x00000002\n\tSHTDN_REASON_MINOR_UPGRADE                  = 0x00000003\n\tSHTDN_REASON_MINOR_RECONFIG                 = 0x00000004\n\tSHTDN_REASON_MINOR_HUNG                     = 0x00000005\n\tSHTDN_REASON_MINOR_UNSTABLE                 = 0x00000006\n\tSHTDN_REASON_MINOR_DISK                     = 0x00000007\n\tSHTDN_REASON_MINOR_PROCESSOR                = 0x00000008\n\tSHTDN_REASON_MINOR_NETWORKCARD              = 0x00000009\n\tSHTDN_REASON_MINOR_POWER_SUPPLY             = 0x0000000a\n\tSHTDN_REASON_MINOR_CORDUNPLUGGED            = 0x0000000b\n\tSHTDN_REASON_MINOR_ENVIRONMENT              = 0x0000000c\n\tSHTDN_REASON_MINOR_HARDWARE_DRIVER          = 0x0000000d\n\tSHTDN_REASON_MINOR_OTHERDRIVER              = 0x0000000e\n\tSHTDN_REASON_MINOR_BLUESCREEN               = 0x0000000F\n\tSHTDN_REASON_MINOR_SERVICEPACK              = 0x00000010\n\tSHTDN_REASON_MINOR_HOTFIX                   = 0x00000011\n\tSHTDN_REASON_MINOR_SECURITYFIX              = 0x00000012\n\tSHTDN_REASON_MINOR_SECURITY                 = 0x00000013\n\tSHTDN_REASON_MINOR_NETWORK_CONNECTIVITY     = 0x00000014\n\tSHTDN_REASON_MINOR_WMI                      = 0x00000015\n\tSHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL    = 0x00000016\n\tSHTDN_REASON_MINOR_HOTFIX_UNINSTALL         = 0x00000017\n\tSHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL    = 0x00000018\n\tSHTDN_REASON_MINOR_MMC                      = 0x00000019\n\tSHTDN_REASON_MINOR_SYSTEMRESTORE            = 0x0000001a\n\tSHTDN_REASON_MINOR_TERMSRV                  = 0x00000020\n\tSHTDN_REASON_MINOR_DC_PROMOTION             = 0x00000021\n\tSHTDN_REASON_MINOR_DC_DEMOTION              = 0x00000022\n\tSHTDN_REASON_UNKNOWN                        = SHTDN_REASON_MINOR_NONE\n\tSHTDN_REASON_LEGACY_API                     = SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED\n\tSHTDN_REASON_VALID_BIT_MASK                 = 0xc0ffffff\n\n\tSHUTDOWN_NORETRY = 0x1\n)\n\n// Flags used for GetModuleHandleEx\nconst (\n\tGET_MODULE_HANDLE_EX_FLAG_PIN                = 1\n\tGET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2\n\tGET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS       = 4\n)\n\n// MUI function flag values\nconst (\n\tMUI_LANGUAGE_ID                    = 0x4\n\tMUI_LANGUAGE_NAME                  = 0x8\n\tMUI_MERGE_SYSTEM_FALLBACK          = 0x10\n\tMUI_MERGE_USER_FALLBACK            = 0x20\n\tMUI_UI_FALLBACK                    = MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK\n\tMUI_THREAD_LANGUAGES               = 0x40\n\tMUI_CONSOLE_FILTER                 = 0x100\n\tMUI_COMPLEX_SCRIPT_FILTER          = 0x200\n\tMUI_RESET_FILTERS                  = 0x001\n\tMUI_USER_PREFERRED_UI_LANGUAGES    = 0x10\n\tMUI_USE_INSTALLED_LANGUAGES        = 0x20\n\tMUI_USE_SEARCH_ALL_LANGUAGES       = 0x40\n\tMUI_LANG_NEUTRAL_PE_FILE           = 0x100\n\tMUI_NON_LANG_NEUTRAL_FILE          = 0x200\n\tMUI_MACHINE_LANGUAGE_SETTINGS      = 0x400\n\tMUI_FILETYPE_NOT_LANGUAGE_NEUTRAL  = 0x001\n\tMUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN = 0x002\n\tMUI_FILETYPE_LANGUAGE_NEUTRAL_MUI  = 0x004\n\tMUI_QUERY_TYPE                     = 0x001\n\tMUI_QUERY_CHECKSUM                 = 0x002\n\tMUI_QUERY_LANGUAGE_NAME            = 0x004\n\tMUI_QUERY_RESOURCE_TYPES           = 0x008\n\tMUI_FILEINFO_VERSION               = 0x001\n\n\tMUI_FULL_LANGUAGE      = 0x01\n\tMUI_PARTIAL_LANGUAGE   = 0x02\n\tMUI_LIP_LANGUAGE       = 0x04\n\tMUI_LANGUAGE_INSTALLED = 0x20\n\tMUI_LANGUAGE_LICENSED  = 0x40\n)\n\n// FILE_INFO_BY_HANDLE_CLASS constants for SetFileInformationByHandle/GetFileInformationByHandleEx\nconst (\n\tFileBasicInfo                  = 0\n\tFileStandardInfo               = 1\n\tFileNameInfo                   = 2\n\tFileRenameInfo                 = 3\n\tFileDispositionInfo            = 4\n\tFileAllocationInfo             = 5\n\tFileEndOfFileInfo              = 6\n\tFileStreamInfo                 = 7\n\tFileCompressionInfo            = 8\n\tFileAttributeTagInfo           = 9\n\tFileIdBothDirectoryInfo        = 10\n\tFileIdBothDirectoryRestartInfo = 11\n\tFileIoPriorityHintInfo         = 12\n\tFileRemoteProtocolInfo         = 13\n\tFileFullDirectoryInfo          = 14\n\tFileFullDirectoryRestartInfo   = 15\n\tFileStorageInfo                = 16\n\tFileAlignmentInfo              = 17\n\tFileIdInfo                     = 18\n\tFileIdExtdDirectoryInfo        = 19\n\tFileIdExtdDirectoryRestartInfo = 20\n\tFileDispositionInfoEx          = 21\n\tFileRenameInfoEx               = 22\n\tFileCaseSensitiveInfo          = 23\n\tFileNormalizedNameInfo         = 24\n)\n\n// LoadLibrary flags for determining from where to search for a DLL\nconst (\n\tDONT_RESOLVE_DLL_REFERENCES               = 0x1\n\tLOAD_LIBRARY_AS_DATAFILE                  = 0x2\n\tLOAD_WITH_ALTERED_SEARCH_PATH             = 0x8\n\tLOAD_IGNORE_CODE_AUTHZ_LEVEL              = 0x10\n\tLOAD_LIBRARY_AS_IMAGE_RESOURCE            = 0x20\n\tLOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE        = 0x40\n\tLOAD_LIBRARY_REQUIRE_SIGNED_TARGET        = 0x80\n\tLOAD_LIBRARY_SEARCH_DLL_LOAD_DIR          = 0x100\n\tLOAD_LIBRARY_SEARCH_APPLICATION_DIR       = 0x200\n\tLOAD_LIBRARY_SEARCH_USER_DIRS             = 0x400\n\tLOAD_LIBRARY_SEARCH_SYSTEM32              = 0x800\n\tLOAD_LIBRARY_SEARCH_DEFAULT_DIRS          = 0x1000\n\tLOAD_LIBRARY_SAFE_CURRENT_DIRS            = 0x00002000\n\tLOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x00004000\n\tLOAD_LIBRARY_OS_INTEGRITY_CONTINUITY      = 0x00008000\n)\n\n// RegNotifyChangeKeyValue notifyFilter flags.\nconst (\n\t// REG_NOTIFY_CHANGE_NAME notifies the caller if a subkey is added or deleted.\n\tREG_NOTIFY_CHANGE_NAME = 0x00000001\n\n\t// REG_NOTIFY_CHANGE_ATTRIBUTES notifies the caller of changes to the attributes of the key, such as the security descriptor information.\n\tREG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002\n\n\t// REG_NOTIFY_CHANGE_LAST_SET notifies the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value.\n\tREG_NOTIFY_CHANGE_LAST_SET = 0x00000004\n\n\t// REG_NOTIFY_CHANGE_SECURITY notifies the caller of changes to the security descriptor of the key.\n\tREG_NOTIFY_CHANGE_SECURITY = 0x00000008\n\n\t// REG_NOTIFY_THREAD_AGNOSTIC indicates that the lifetime of the registration must not be tied to the lifetime of the thread issuing the RegNotifyChangeKeyValue call. Note: This flag value is only supported in Windows 8 and later.\n\tREG_NOTIFY_THREAD_AGNOSTIC = 0x10000000\n)\n\ntype CommTimeouts struct {\n\tReadIntervalTimeout         uint32\n\tReadTotalTimeoutMultiplier  uint32\n\tReadTotalTimeoutConstant    uint32\n\tWriteTotalTimeoutMultiplier uint32\n\tWriteTotalTimeoutConstant   uint32\n}\n\n// NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING.\ntype NTUnicodeString struct {\n\t// Note: Length and MaximumLength are in *bytes*, not uint16s.\n\t// They should always be even.\n\tLength        uint16\n\tMaximumLength uint16\n\tBuffer        *uint16\n}\n\n// NTString is an ANSI string for NT native APIs, corresponding to STRING.\ntype NTString struct {\n\tLength        uint16\n\tMaximumLength uint16\n\tBuffer        *byte\n}\n\ntype LIST_ENTRY struct {\n\tFlink *LIST_ENTRY\n\tBlink *LIST_ENTRY\n}\n\ntype RUNTIME_FUNCTION struct {\n\tBeginAddress uint32\n\tEndAddress   uint32\n\tUnwindData   uint32\n}\n\ntype LDR_DATA_TABLE_ENTRY struct {\n\treserved1          [2]uintptr\n\tInMemoryOrderLinks LIST_ENTRY\n\treserved2          [2]uintptr\n\tDllBase            uintptr\n\treserved3          [2]uintptr\n\tFullDllName        NTUnicodeString\n\treserved4          [8]byte\n\treserved5          [3]uintptr\n\treserved6          uintptr\n\tTimeDateStamp      uint32\n}\n\ntype PEB_LDR_DATA struct {\n\treserved1               [8]byte\n\treserved2               [3]uintptr\n\tInMemoryOrderModuleList LIST_ENTRY\n}\n\ntype CURDIR struct {\n\tDosPath NTUnicodeString\n\tHandle  Handle\n}\n\ntype RTL_DRIVE_LETTER_CURDIR struct {\n\tFlags     uint16\n\tLength    uint16\n\tTimeStamp uint32\n\tDosPath   NTString\n}\n\ntype RTL_USER_PROCESS_PARAMETERS struct {\n\tMaximumLength, Length uint32\n\n\tFlags, DebugFlags uint32\n\n\tConsoleHandle                                Handle\n\tConsoleFlags                                 uint32\n\tStandardInput, StandardOutput, StandardError Handle\n\n\tCurrentDirectory CURDIR\n\tDllPath          NTUnicodeString\n\tImagePathName    NTUnicodeString\n\tCommandLine      NTUnicodeString\n\tEnvironment      unsafe.Pointer\n\n\tStartingX, StartingY, CountX, CountY, CountCharsX, CountCharsY, FillAttribute uint32\n\n\tWindowFlags, ShowWindowFlags                     uint32\n\tWindowTitle, DesktopInfo, ShellInfo, RuntimeData NTUnicodeString\n\tCurrentDirectories                               [32]RTL_DRIVE_LETTER_CURDIR\n\n\tEnvironmentSize, EnvironmentVersion uintptr\n\n\tPackageDependencyData unsafe.Pointer\n\tProcessGroupId        uint32\n\tLoaderThreads         uint32\n\n\tRedirectionDllName               NTUnicodeString\n\tHeapPartitionName                NTUnicodeString\n\tDefaultThreadpoolCpuSetMasks     uintptr\n\tDefaultThreadpoolCpuSetMaskCount uint32\n}\n\ntype PEB struct {\n\treserved1              [2]byte\n\tBeingDebugged          byte\n\tBitField               byte\n\treserved3              uintptr\n\tImageBaseAddress       uintptr\n\tLdr                    *PEB_LDR_DATA\n\tProcessParameters      *RTL_USER_PROCESS_PARAMETERS\n\treserved4              [3]uintptr\n\tAtlThunkSListPtr       uintptr\n\treserved5              uintptr\n\treserved6              uint32\n\treserved7              uintptr\n\treserved8              uint32\n\tAtlThunkSListPtr32     uint32\n\treserved9              [45]uintptr\n\treserved10             [96]byte\n\tPostProcessInitRoutine uintptr\n\treserved11             [128]byte\n\treserved12             [1]uintptr\n\tSessionId              uint32\n}\n\ntype OBJECT_ATTRIBUTES struct {\n\tLength             uint32\n\tRootDirectory      Handle\n\tObjectName         *NTUnicodeString\n\tAttributes         uint32\n\tSecurityDescriptor *SECURITY_DESCRIPTOR\n\tSecurityQoS        *SECURITY_QUALITY_OF_SERVICE\n}\n\n// Values for the Attributes member of OBJECT_ATTRIBUTES.\nconst (\n\tOBJ_INHERIT                       = 0x00000002\n\tOBJ_PERMANENT                     = 0x00000010\n\tOBJ_EXCLUSIVE                     = 0x00000020\n\tOBJ_CASE_INSENSITIVE              = 0x00000040\n\tOBJ_OPENIF                        = 0x00000080\n\tOBJ_OPENLINK                      = 0x00000100\n\tOBJ_KERNEL_HANDLE                 = 0x00000200\n\tOBJ_FORCE_ACCESS_CHECK            = 0x00000400\n\tOBJ_IGNORE_IMPERSONATED_DEVICEMAP = 0x00000800\n\tOBJ_DONT_REPARSE                  = 0x00001000\n\tOBJ_VALID_ATTRIBUTES              = 0x00001FF2\n)\n\ntype IO_STATUS_BLOCK struct {\n\tStatus      NTStatus\n\tInformation uintptr\n}\n\ntype RTLP_CURDIR_REF struct {\n\tRefCount int32\n\tHandle   Handle\n}\n\ntype RTL_RELATIVE_NAME struct {\n\tRelativeName        NTUnicodeString\n\tContainingDirectory Handle\n\tCurDirRef           *RTLP_CURDIR_REF\n}\n\nconst (\n\t// CreateDisposition flags for NtCreateFile and NtCreateNamedPipeFile.\n\tFILE_SUPERSEDE           = 0x00000000\n\tFILE_OPEN                = 0x00000001\n\tFILE_CREATE              = 0x00000002\n\tFILE_OPEN_IF             = 0x00000003\n\tFILE_OVERWRITE           = 0x00000004\n\tFILE_OVERWRITE_IF        = 0x00000005\n\tFILE_MAXIMUM_DISPOSITION = 0x00000005\n\n\t// CreateOptions flags for NtCreateFile and NtCreateNamedPipeFile.\n\tFILE_DIRECTORY_FILE            = 0x00000001\n\tFILE_WRITE_THROUGH             = 0x00000002\n\tFILE_SEQUENTIAL_ONLY           = 0x00000004\n\tFILE_NO_INTERMEDIATE_BUFFERING = 0x00000008\n\tFILE_SYNCHRONOUS_IO_ALERT      = 0x00000010\n\tFILE_SYNCHRONOUS_IO_NONALERT   = 0x00000020\n\tFILE_NON_DIRECTORY_FILE        = 0x00000040\n\tFILE_CREATE_TREE_CONNECTION    = 0x00000080\n\tFILE_COMPLETE_IF_OPLOCKED      = 0x00000100\n\tFILE_NO_EA_KNOWLEDGE           = 0x00000200\n\tFILE_OPEN_REMOTE_INSTANCE      = 0x00000400\n\tFILE_RANDOM_ACCESS             = 0x00000800\n\tFILE_DELETE_ON_CLOSE           = 0x00001000\n\tFILE_OPEN_BY_FILE_ID           = 0x00002000\n\tFILE_OPEN_FOR_BACKUP_INTENT    = 0x00004000\n\tFILE_NO_COMPRESSION            = 0x00008000\n\tFILE_OPEN_REQUIRING_OPLOCK     = 0x00010000\n\tFILE_DISALLOW_EXCLUSIVE        = 0x00020000\n\tFILE_RESERVE_OPFILTER          = 0x00100000\n\tFILE_OPEN_REPARSE_POINT        = 0x00200000\n\tFILE_OPEN_NO_RECALL            = 0x00400000\n\tFILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000\n\n\t// Parameter constants for NtCreateNamedPipeFile.\n\n\tFILE_PIPE_BYTE_STREAM_TYPE = 0x00000000\n\tFILE_PIPE_MESSAGE_TYPE     = 0x00000001\n\n\tFILE_PIPE_ACCEPT_REMOTE_CLIENTS = 0x00000000\n\tFILE_PIPE_REJECT_REMOTE_CLIENTS = 0x00000002\n\n\tFILE_PIPE_TYPE_VALID_MASK = 0x00000003\n\n\tFILE_PIPE_BYTE_STREAM_MODE = 0x00000000\n\tFILE_PIPE_MESSAGE_MODE     = 0x00000001\n\n\tFILE_PIPE_QUEUE_OPERATION    = 0x00000000\n\tFILE_PIPE_COMPLETE_OPERATION = 0x00000001\n\n\tFILE_PIPE_INBOUND     = 0x00000000\n\tFILE_PIPE_OUTBOUND    = 0x00000001\n\tFILE_PIPE_FULL_DUPLEX = 0x00000002\n\n\tFILE_PIPE_DISCONNECTED_STATE = 0x00000001\n\tFILE_PIPE_LISTENING_STATE    = 0x00000002\n\tFILE_PIPE_CONNECTED_STATE    = 0x00000003\n\tFILE_PIPE_CLOSING_STATE      = 0x00000004\n\n\tFILE_PIPE_CLIENT_END = 0x00000000\n\tFILE_PIPE_SERVER_END = 0x00000001\n)\n\nconst (\n\t// FileInformationClass for NtSetInformationFile\n\tFileBasicInformation                         = 4\n\tFileRenameInformation                        = 10\n\tFileDispositionInformation                   = 13\n\tFilePositionInformation                      = 14\n\tFileEndOfFileInformation                     = 20\n\tFileValidDataLengthInformation               = 39\n\tFileShortNameInformation                     = 40\n\tFileIoPriorityHintInformation                = 43\n\tFileReplaceCompletionInformation             = 61\n\tFileDispositionInformationEx                 = 64\n\tFileCaseSensitiveInformation                 = 71\n\tFileLinkInformation                          = 72\n\tFileCaseSensitiveInformationForceAccessCheck = 75\n\tFileKnownFolderInformation                   = 76\n\n\t// Flags for FILE_RENAME_INFORMATION\n\tFILE_RENAME_REPLACE_IF_EXISTS                    = 0x00000001\n\tFILE_RENAME_POSIX_SEMANTICS                      = 0x00000002\n\tFILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE       = 0x00000004\n\tFILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008\n\tFILE_RENAME_NO_INCREASE_AVAILABLE_SPACE          = 0x00000010\n\tFILE_RENAME_NO_DECREASE_AVAILABLE_SPACE          = 0x00000020\n\tFILE_RENAME_PRESERVE_AVAILABLE_SPACE             = 0x00000030\n\tFILE_RENAME_IGNORE_READONLY_ATTRIBUTE            = 0x00000040\n\tFILE_RENAME_FORCE_RESIZE_TARGET_SR               = 0x00000080\n\tFILE_RENAME_FORCE_RESIZE_SOURCE_SR               = 0x00000100\n\tFILE_RENAME_FORCE_RESIZE_SR                      = 0x00000180\n\n\t// Flags for FILE_DISPOSITION_INFORMATION_EX\n\tFILE_DISPOSITION_DO_NOT_DELETE             = 0x00000000\n\tFILE_DISPOSITION_DELETE                    = 0x00000001\n\tFILE_DISPOSITION_POSIX_SEMANTICS           = 0x00000002\n\tFILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004\n\tFILE_DISPOSITION_ON_CLOSE                  = 0x00000008\n\tFILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010\n\n\t// Flags for FILE_CASE_SENSITIVE_INFORMATION\n\tFILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001\n\n\t// Flags for FILE_LINK_INFORMATION\n\tFILE_LINK_REPLACE_IF_EXISTS                    = 0x00000001\n\tFILE_LINK_POSIX_SEMANTICS                      = 0x00000002\n\tFILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008\n\tFILE_LINK_NO_INCREASE_AVAILABLE_SPACE          = 0x00000010\n\tFILE_LINK_NO_DECREASE_AVAILABLE_SPACE          = 0x00000020\n\tFILE_LINK_PRESERVE_AVAILABLE_SPACE             = 0x00000030\n\tFILE_LINK_IGNORE_READONLY_ATTRIBUTE            = 0x00000040\n\tFILE_LINK_FORCE_RESIZE_TARGET_SR               = 0x00000080\n\tFILE_LINK_FORCE_RESIZE_SOURCE_SR               = 0x00000100\n\tFILE_LINK_FORCE_RESIZE_SR                      = 0x00000180\n)\n\n// ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.\nconst (\n\tProcessBasicInformation = iota\n\tProcessQuotaLimits\n\tProcessIoCounters\n\tProcessVmCounters\n\tProcessTimes\n\tProcessBasePriority\n\tProcessRaisePriority\n\tProcessDebugPort\n\tProcessExceptionPort\n\tProcessAccessToken\n\tProcessLdtInformation\n\tProcessLdtSize\n\tProcessDefaultHardErrorMode\n\tProcessIoPortHandlers\n\tProcessPooledUsageAndLimits\n\tProcessWorkingSetWatch\n\tProcessUserModeIOPL\n\tProcessEnableAlignmentFaultFixup\n\tProcessPriorityClass\n\tProcessWx86Information\n\tProcessHandleCount\n\tProcessAffinityMask\n\tProcessPriorityBoost\n\tProcessDeviceMap\n\tProcessSessionInformation\n\tProcessForegroundInformation\n\tProcessWow64Information\n\tProcessImageFileName\n\tProcessLUIDDeviceMapsEnabled\n\tProcessBreakOnTermination\n\tProcessDebugObjectHandle\n\tProcessDebugFlags\n\tProcessHandleTracing\n\tProcessIoPriority\n\tProcessExecuteFlags\n\tProcessTlsInformation\n\tProcessCookie\n\tProcessImageInformation\n\tProcessCycleTime\n\tProcessPagePriority\n\tProcessInstrumentationCallback\n\tProcessThreadStackAllocation\n\tProcessWorkingSetWatchEx\n\tProcessImageFileNameWin32\n\tProcessImageFileMapping\n\tProcessAffinityUpdateMode\n\tProcessMemoryAllocationMode\n\tProcessGroupInformation\n\tProcessTokenVirtualizationEnabled\n\tProcessConsoleHostProcess\n\tProcessWindowInformation\n\tProcessHandleInformation\n\tProcessMitigationPolicy\n\tProcessDynamicFunctionTableInformation\n\tProcessHandleCheckingMode\n\tProcessKeepAliveCount\n\tProcessRevokeFileHandles\n\tProcessWorkingSetControl\n\tProcessHandleTable\n\tProcessCheckStackExtentsMode\n\tProcessCommandLineInformation\n\tProcessProtectionInformation\n\tProcessMemoryExhaustion\n\tProcessFaultInformation\n\tProcessTelemetryIdInformation\n\tProcessCommitReleaseInformation\n\tProcessDefaultCpuSetsInformation\n\tProcessAllowedCpuSetsInformation\n\tProcessSubsystemProcess\n\tProcessJobMemoryInformation\n\tProcessInPrivate\n\tProcessRaiseUMExceptionOnInvalidHandleClose\n\tProcessIumChallengeResponse\n\tProcessChildProcessInformation\n\tProcessHighGraphicsPriorityInformation\n\tProcessSubsystemInformation\n\tProcessEnergyValues\n\tProcessActivityThrottleState\n\tProcessActivityThrottlePolicy\n\tProcessWin32kSyscallFilterInformation\n\tProcessDisableSystemAllowedCpuSets\n\tProcessWakeInformation\n\tProcessEnergyTrackingState\n\tProcessManageWritesToExecutableMemory\n\tProcessCaptureTrustletLiveDump\n\tProcessTelemetryCoverage\n\tProcessEnclaveInformation\n\tProcessEnableReadWriteVmLogging\n\tProcessUptimeInformation\n\tProcessImageSection\n\tProcessDebugAuthInformation\n\tProcessSystemResourceManagement\n\tProcessSequenceNumber\n\tProcessLoaderDetour\n\tProcessSecurityDomainInformation\n\tProcessCombineSecurityDomainsInformation\n\tProcessEnableLogging\n\tProcessLeapSecondInformation\n\tProcessFiberShadowStackAllocation\n\tProcessFreeFiberShadowStackAllocation\n\tProcessAltSystemCallInformation\n\tProcessDynamicEHContinuationTargets\n\tProcessDynamicEnforcedCetCompatibleRanges\n)\n\ntype PROCESS_BASIC_INFORMATION struct {\n\tExitStatus                   NTStatus\n\tPebBaseAddress               *PEB\n\tAffinityMask                 uintptr\n\tBasePriority                 int32\n\tUniqueProcessId              uintptr\n\tInheritedFromUniqueProcessId uintptr\n}\n\ntype SYSTEM_PROCESS_INFORMATION struct {\n\tNextEntryOffset              uint32\n\tNumberOfThreads              uint32\n\tWorkingSetPrivateSize        int64\n\tHardFaultCount               uint32\n\tNumberOfThreadsHighWatermark uint32\n\tCycleTime                    uint64\n\tCreateTime                   int64\n\tUserTime                     int64\n\tKernelTime                   int64\n\tImageName                    NTUnicodeString\n\tBasePriority                 int32\n\tUniqueProcessID              uintptr\n\tInheritedFromUniqueProcessID uintptr\n\tHandleCount                  uint32\n\tSessionID                    uint32\n\tUniqueProcessKey             *uint32\n\tPeakVirtualSize              uintptr\n\tVirtualSize                  uintptr\n\tPageFaultCount               uint32\n\tPeakWorkingSetSize           uintptr\n\tWorkingSetSize               uintptr\n\tQuotaPeakPagedPoolUsage      uintptr\n\tQuotaPagedPoolUsage          uintptr\n\tQuotaPeakNonPagedPoolUsage   uintptr\n\tQuotaNonPagedPoolUsage       uintptr\n\tPagefileUsage                uintptr\n\tPeakPagefileUsage            uintptr\n\tPrivatePageCount             uintptr\n\tReadOperationCount           int64\n\tWriteOperationCount          int64\n\tOtherOperationCount          int64\n\tReadTransferCount            int64\n\tWriteTransferCount           int64\n\tOtherTransferCount           int64\n}\n\n// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation\nconst (\n\tSystemBasicInformation = iota\n\tSystemProcessorInformation\n\tSystemPerformanceInformation\n\tSystemTimeOfDayInformation\n\tSystemPathInformation\n\tSystemProcessInformation\n\tSystemCallCountInformation\n\tSystemDeviceInformation\n\tSystemProcessorPerformanceInformation\n\tSystemFlagsInformation\n\tSystemCallTimeInformation\n\tSystemModuleInformation\n\tSystemLocksInformation\n\tSystemStackTraceInformation\n\tSystemPagedPoolInformation\n\tSystemNonPagedPoolInformation\n\tSystemHandleInformation\n\tSystemObjectInformation\n\tSystemPageFileInformation\n\tSystemVdmInstemulInformation\n\tSystemVdmBopInformation\n\tSystemFileCacheInformation\n\tSystemPoolTagInformation\n\tSystemInterruptInformation\n\tSystemDpcBehaviorInformation\n\tSystemFullMemoryInformation\n\tSystemLoadGdiDriverInformation\n\tSystemUnloadGdiDriverInformation\n\tSystemTimeAdjustmentInformation\n\tSystemSummaryMemoryInformation\n\tSystemMirrorMemoryInformation\n\tSystemPerformanceTraceInformation\n\tsystemObsolete0\n\tSystemExceptionInformation\n\tSystemCrashDumpStateInformation\n\tSystemKernelDebuggerInformation\n\tSystemContextSwitchInformation\n\tSystemRegistryQuotaInformation\n\tSystemExtendServiceTableInformation\n\tSystemPrioritySeperation\n\tSystemVerifierAddDriverInformation\n\tSystemVerifierRemoveDriverInformation\n\tSystemProcessorIdleInformation\n\tSystemLegacyDriverInformation\n\tSystemCurrentTimeZoneInformation\n\tSystemLookasideInformation\n\tSystemTimeSlipNotification\n\tSystemSessionCreate\n\tSystemSessionDetach\n\tSystemSessionInformation\n\tSystemRangeStartInformation\n\tSystemVerifierInformation\n\tSystemVerifierThunkExtend\n\tSystemSessionProcessInformation\n\tSystemLoadGdiDriverInSystemSpace\n\tSystemNumaProcessorMap\n\tSystemPrefetcherInformation\n\tSystemExtendedProcessInformation\n\tSystemRecommendedSharedDataAlignment\n\tSystemComPlusPackage\n\tSystemNumaAvailableMemory\n\tSystemProcessorPowerInformation\n\tSystemEmulationBasicInformation\n\tSystemEmulationProcessorInformation\n\tSystemExtendedHandleInformation\n\tSystemLostDelayedWriteInformation\n\tSystemBigPoolInformation\n\tSystemSessionPoolTagInformation\n\tSystemSessionMappedViewInformation\n\tSystemHotpatchInformation\n\tSystemObjectSecurityMode\n\tSystemWatchdogTimerHandler\n\tSystemWatchdogTimerInformation\n\tSystemLogicalProcessorInformation\n\tSystemWow64SharedInformationObsolete\n\tSystemRegisterFirmwareTableInformationHandler\n\tSystemFirmwareTableInformation\n\tSystemModuleInformationEx\n\tSystemVerifierTriageInformation\n\tSystemSuperfetchInformation\n\tSystemMemoryListInformation\n\tSystemFileCacheInformationEx\n\tSystemThreadPriorityClientIdInformation\n\tSystemProcessorIdleCycleTimeInformation\n\tSystemVerifierCancellationInformation\n\tSystemProcessorPowerInformationEx\n\tSystemRefTraceInformation\n\tSystemSpecialPoolInformation\n\tSystemProcessIdInformation\n\tSystemErrorPortInformation\n\tSystemBootEnvironmentInformation\n\tSystemHypervisorInformation\n\tSystemVerifierInformationEx\n\tSystemTimeZoneInformation\n\tSystemImageFileExecutionOptionsInformation\n\tSystemCoverageInformation\n\tSystemPrefetchPatchInformation\n\tSystemVerifierFaultsInformation\n\tSystemSystemPartitionInformation\n\tSystemSystemDiskInformation\n\tSystemProcessorPerformanceDistribution\n\tSystemNumaProximityNodeInformation\n\tSystemDynamicTimeZoneInformation\n\tSystemCodeIntegrityInformation\n\tSystemProcessorMicrocodeUpdateInformation\n\tSystemProcessorBrandString\n\tSystemVirtualAddressInformation\n\tSystemLogicalProcessorAndGroupInformation\n\tSystemProcessorCycleTimeInformation\n\tSystemStoreInformation\n\tSystemRegistryAppendString\n\tSystemAitSamplingValue\n\tSystemVhdBootInformation\n\tSystemCpuQuotaInformation\n\tSystemNativeBasicInformation\n\tsystemSpare1\n\tSystemLowPriorityIoInformation\n\tSystemTpmBootEntropyInformation\n\tSystemVerifierCountersInformation\n\tSystemPagedPoolInformationEx\n\tSystemSystemPtesInformationEx\n\tSystemNodeDistanceInformation\n\tSystemAcpiAuditInformation\n\tSystemBasicPerformanceInformation\n\tSystemQueryPerformanceCounterInformation\n\tSystemSessionBigPoolInformation\n\tSystemBootGraphicsInformation\n\tSystemScrubPhysicalMemoryInformation\n\tSystemBadPageInformation\n\tSystemProcessorProfileControlArea\n\tSystemCombinePhysicalMemoryInformation\n\tSystemEntropyInterruptTimingCallback\n\tSystemConsoleInformation\n\tSystemPlatformBinaryInformation\n\tSystemThrottleNotificationInformation\n\tSystemHypervisorProcessorCountInformation\n\tSystemDeviceDataInformation\n\tSystemDeviceDataEnumerationInformation\n\tSystemMemoryTopologyInformation\n\tSystemMemoryChannelInformation\n\tSystemBootLogoInformation\n\tSystemProcessorPerformanceInformationEx\n\tsystemSpare0\n\tSystemSecureBootPolicyInformation\n\tSystemPageFileInformationEx\n\tSystemSecureBootInformation\n\tSystemEntropyInterruptTimingRawInformation\n\tSystemPortableWorkspaceEfiLauncherInformation\n\tSystemFullProcessInformation\n\tSystemKernelDebuggerInformationEx\n\tSystemBootMetadataInformation\n\tSystemSoftRebootInformation\n\tSystemElamCertificateInformation\n\tSystemOfflineDumpConfigInformation\n\tSystemProcessorFeaturesInformation\n\tSystemRegistryReconciliationInformation\n\tSystemEdidInformation\n\tSystemManufacturingInformation\n\tSystemEnergyEstimationConfigInformation\n\tSystemHypervisorDetailInformation\n\tSystemProcessorCycleStatsInformation\n\tSystemVmGenerationCountInformation\n\tSystemTrustedPlatformModuleInformation\n\tSystemKernelDebuggerFlags\n\tSystemCodeIntegrityPolicyInformation\n\tSystemIsolatedUserModeInformation\n\tSystemHardwareSecurityTestInterfaceResultsInformation\n\tSystemSingleModuleInformation\n\tSystemAllowedCpuSetsInformation\n\tSystemDmaProtectionInformation\n\tSystemInterruptCpuSetsInformation\n\tSystemSecureBootPolicyFullInformation\n\tSystemCodeIntegrityPolicyFullInformation\n\tSystemAffinitizedInterruptProcessorInformation\n\tSystemRootSiloInformation\n)\n\ntype RTL_PROCESS_MODULE_INFORMATION struct {\n\tSection          Handle\n\tMappedBase       uintptr\n\tImageBase        uintptr\n\tImageSize        uint32\n\tFlags            uint32\n\tLoadOrderIndex   uint16\n\tInitOrderIndex   uint16\n\tLoadCount        uint16\n\tOffsetToFileName uint16\n\tFullPathName     [256]byte\n}\n\ntype RTL_PROCESS_MODULES struct {\n\tNumberOfModules uint32\n\tModules         [1]RTL_PROCESS_MODULE_INFORMATION\n}\n\n// Constants for LocalAlloc flags.\nconst (\n\tLMEM_FIXED          = 0x0\n\tLMEM_MOVEABLE       = 0x2\n\tLMEM_NOCOMPACT      = 0x10\n\tLMEM_NODISCARD      = 0x20\n\tLMEM_ZEROINIT       = 0x40\n\tLMEM_MODIFY         = 0x80\n\tLMEM_DISCARDABLE    = 0xf00\n\tLMEM_VALID_FLAGS    = 0xf72\n\tLMEM_INVALID_HANDLE = 0x8000\n\tLHND                = LMEM_MOVEABLE | LMEM_ZEROINIT\n\tLPTR                = LMEM_FIXED | LMEM_ZEROINIT\n\tNONZEROLHND         = LMEM_MOVEABLE\n\tNONZEROLPTR         = LMEM_FIXED\n)\n\n// Constants for the CreateNamedPipe-family of functions.\nconst (\n\tPIPE_ACCESS_INBOUND  = 0x1\n\tPIPE_ACCESS_OUTBOUND = 0x2\n\tPIPE_ACCESS_DUPLEX   = 0x3\n\n\tPIPE_CLIENT_END = 0x0\n\tPIPE_SERVER_END = 0x1\n\n\tPIPE_WAIT                  = 0x0\n\tPIPE_NOWAIT                = 0x1\n\tPIPE_READMODE_BYTE         = 0x0\n\tPIPE_READMODE_MESSAGE      = 0x2\n\tPIPE_TYPE_BYTE             = 0x0\n\tPIPE_TYPE_MESSAGE          = 0x4\n\tPIPE_ACCEPT_REMOTE_CLIENTS = 0x0\n\tPIPE_REJECT_REMOTE_CLIENTS = 0x8\n\n\tPIPE_UNLIMITED_INSTANCES = 255\n)\n\n// Constants for security attributes when opening named pipes.\nconst (\n\tSECURITY_ANONYMOUS      = SecurityAnonymous << 16\n\tSECURITY_IDENTIFICATION = SecurityIdentification << 16\n\tSECURITY_IMPERSONATION  = SecurityImpersonation << 16\n\tSECURITY_DELEGATION     = SecurityDelegation << 16\n\n\tSECURITY_CONTEXT_TRACKING = 0x40000\n\tSECURITY_EFFECTIVE_ONLY   = 0x80000\n\n\tSECURITY_SQOS_PRESENT     = 0x100000\n\tSECURITY_VALID_SQOS_FLAGS = 0x1f0000\n)\n\n// ResourceID represents a 16-bit resource identifier, traditionally created with the MAKEINTRESOURCE macro.\ntype ResourceID uint16\n\n// ResourceIDOrString must be either a ResourceID, to specify a resource or resource type by ID,\n// or a string, to specify a resource or resource type by name.\ntype ResourceIDOrString interface{}\n\n// Predefined resource names and types.\nvar (\n\t// Predefined names.\n\tCREATEPROCESS_MANIFEST_RESOURCE_ID                 ResourceID = 1\n\tISOLATIONAWARE_MANIFEST_RESOURCE_ID                ResourceID = 2\n\tISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID ResourceID = 3\n\tISOLATIONPOLICY_MANIFEST_RESOURCE_ID               ResourceID = 4\n\tISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID       ResourceID = 5\n\tMINIMUM_RESERVED_MANIFEST_RESOURCE_ID              ResourceID = 1  // inclusive\n\tMAXIMUM_RESERVED_MANIFEST_RESOURCE_ID              ResourceID = 16 // inclusive\n\n\t// Predefined types.\n\tRT_CURSOR       ResourceID = 1\n\tRT_BITMAP       ResourceID = 2\n\tRT_ICON         ResourceID = 3\n\tRT_MENU         ResourceID = 4\n\tRT_DIALOG       ResourceID = 5\n\tRT_STRING       ResourceID = 6\n\tRT_FONTDIR      ResourceID = 7\n\tRT_FONT         ResourceID = 8\n\tRT_ACCELERATOR  ResourceID = 9\n\tRT_RCDATA       ResourceID = 10\n\tRT_MESSAGETABLE ResourceID = 11\n\tRT_GROUP_CURSOR ResourceID = 12\n\tRT_GROUP_ICON   ResourceID = 14\n\tRT_VERSION      ResourceID = 16\n\tRT_DLGINCLUDE   ResourceID = 17\n\tRT_PLUGPLAY     ResourceID = 19\n\tRT_VXD          ResourceID = 20\n\tRT_ANICURSOR    ResourceID = 21\n\tRT_ANIICON      ResourceID = 22\n\tRT_HTML         ResourceID = 23\n\tRT_MANIFEST     ResourceID = 24\n)\n\ntype VS_FIXEDFILEINFO struct {\n\tSignature        uint32\n\tStrucVersion     uint32\n\tFileVersionMS    uint32\n\tFileVersionLS    uint32\n\tProductVersionMS uint32\n\tProductVersionLS uint32\n\tFileFlagsMask    uint32\n\tFileFlags        uint32\n\tFileOS           uint32\n\tFileType         uint32\n\tFileSubtype      uint32\n\tFileDateMS       uint32\n\tFileDateLS       uint32\n}\n\ntype COAUTHIDENTITY struct {\n\tUser           *uint16\n\tUserLength     uint32\n\tDomain         *uint16\n\tDomainLength   uint32\n\tPassword       *uint16\n\tPasswordLength uint32\n\tFlags          uint32\n}\n\ntype COAUTHINFO struct {\n\tAuthnSvc           uint32\n\tAuthzSvc           uint32\n\tServerPrincName    *uint16\n\tAuthnLevel         uint32\n\tImpersonationLevel uint32\n\tAuthIdentityData   *COAUTHIDENTITY\n\tCapabilities       uint32\n}\n\ntype COSERVERINFO struct {\n\tReserved1 uint32\n\tAame      *uint16\n\tAuthInfo  *COAUTHINFO\n\tReserved2 uint32\n}\n\ntype BIND_OPTS3 struct {\n\tCbStruct          uint32\n\tFlags             uint32\n\tMode              uint32\n\tTickCountDeadline uint32\n\tTrackFlags        uint32\n\tClassContext      uint32\n\tLocale            uint32\n\tServerInfo        *COSERVERINFO\n\tHwnd              HWND\n}\n\nconst (\n\tCLSCTX_INPROC_SERVER          = 0x1\n\tCLSCTX_INPROC_HANDLER         = 0x2\n\tCLSCTX_LOCAL_SERVER           = 0x4\n\tCLSCTX_INPROC_SERVER16        = 0x8\n\tCLSCTX_REMOTE_SERVER          = 0x10\n\tCLSCTX_INPROC_HANDLER16       = 0x20\n\tCLSCTX_RESERVED1              = 0x40\n\tCLSCTX_RESERVED2              = 0x80\n\tCLSCTX_RESERVED3              = 0x100\n\tCLSCTX_RESERVED4              = 0x200\n\tCLSCTX_NO_CODE_DOWNLOAD       = 0x400\n\tCLSCTX_RESERVED5              = 0x800\n\tCLSCTX_NO_CUSTOM_MARSHAL      = 0x1000\n\tCLSCTX_ENABLE_CODE_DOWNLOAD   = 0x2000\n\tCLSCTX_NO_FAILURE_LOG         = 0x4000\n\tCLSCTX_DISABLE_AAA            = 0x8000\n\tCLSCTX_ENABLE_AAA             = 0x10000\n\tCLSCTX_FROM_DEFAULT_CONTEXT   = 0x20000\n\tCLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000\n\tCLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000\n\tCLSCTX_ENABLE_CLOAKING        = 0x100000\n\tCLSCTX_APPCONTAINER           = 0x400000\n\tCLSCTX_ACTIVATE_AAA_AS_IU     = 0x800000\n\tCLSCTX_PS_DLL                 = 0x80000000\n\n\tCOINIT_MULTITHREADED     = 0x0\n\tCOINIT_APARTMENTTHREADED = 0x2\n\tCOINIT_DISABLE_OLE1DDE   = 0x4\n\tCOINIT_SPEED_OVER_MEMORY = 0x8\n)\n\n// Flag for QueryFullProcessImageName.\nconst PROCESS_NAME_NATIVE = 1\n\ntype ModuleInfo struct {\n\tBaseOfDll   uintptr\n\tSizeOfImage uint32\n\tEntryPoint  uintptr\n}\n\nconst ALL_PROCESSOR_GROUPS = 0xFFFF\n\ntype Rect struct {\n\tLeft   int32\n\tTop    int32\n\tRight  int32\n\tBottom int32\n}\n\ntype GUIThreadInfo struct {\n\tSize        uint32\n\tFlags       uint32\n\tActive      HWND\n\tFocus       HWND\n\tCapture     HWND\n\tMenuOwner   HWND\n\tMoveSize    HWND\n\tCaretHandle HWND\n\tCaretRect   Rect\n}\n\nconst (\n\tDWMWA_NCRENDERING_ENABLED            = 1\n\tDWMWA_NCRENDERING_POLICY             = 2\n\tDWMWA_TRANSITIONS_FORCEDISABLED      = 3\n\tDWMWA_ALLOW_NCPAINT                  = 4\n\tDWMWA_CAPTION_BUTTON_BOUNDS          = 5\n\tDWMWA_NONCLIENT_RTL_LAYOUT           = 6\n\tDWMWA_FORCE_ICONIC_REPRESENTATION    = 7\n\tDWMWA_FLIP3D_POLICY                  = 8\n\tDWMWA_EXTENDED_FRAME_BOUNDS          = 9\n\tDWMWA_HAS_ICONIC_BITMAP              = 10\n\tDWMWA_DISALLOW_PEEK                  = 11\n\tDWMWA_EXCLUDED_FROM_PEEK             = 12\n\tDWMWA_CLOAK                          = 13\n\tDWMWA_CLOAKED                        = 14\n\tDWMWA_FREEZE_REPRESENTATION          = 15\n\tDWMWA_PASSIVE_UPDATE_MODE            = 16\n\tDWMWA_USE_HOSTBACKDROPBRUSH          = 17\n\tDWMWA_USE_IMMERSIVE_DARK_MODE        = 20\n\tDWMWA_WINDOW_CORNER_PREFERENCE       = 33\n\tDWMWA_BORDER_COLOR                   = 34\n\tDWMWA_CAPTION_COLOR                  = 35\n\tDWMWA_TEXT_COLOR                     = 36\n\tDWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37\n)\n\ntype WSAQUERYSET struct {\n\tSize                uint32\n\tServiceInstanceName *uint16\n\tServiceClassId      *GUID\n\tVersion             *WSAVersion\n\tComment             *uint16\n\tNameSpace           uint32\n\tNSProviderId        *GUID\n\tContext             *uint16\n\tNumberOfProtocols   uint32\n\tAfpProtocols        *AFProtocols\n\tQueryString         *uint16\n\tNumberOfCsAddrs     uint32\n\tSaBuffer            *CSAddrInfo\n\tOutputFlags         uint32\n\tBlob                *BLOB\n}\n\ntype WSAVersion struct {\n\tVersion                 uint32\n\tEnumerationOfComparison int32\n}\n\ntype AFProtocols struct {\n\tAddressFamily int32\n\tProtocol      int32\n}\n\ntype CSAddrInfo struct {\n\tLocalAddr  SocketAddress\n\tRemoteAddr SocketAddress\n\tSocketType int32\n\tProtocol   int32\n}\n\ntype BLOB struct {\n\tSize     uint32\n\tBlobData *byte\n}\n\ntype ComStat struct {\n\tFlags    uint32\n\tCBInQue  uint32\n\tCBOutQue uint32\n}\n\ntype DCB struct {\n\tDCBlength  uint32\n\tBaudRate   uint32\n\tFlags      uint32\n\twReserved  uint16\n\tXonLim     uint16\n\tXoffLim    uint16\n\tByteSize   uint8\n\tParity     uint8\n\tStopBits   uint8\n\tXonChar    byte\n\tXoffChar   byte\n\tErrorChar  byte\n\tEofChar    byte\n\tEvtChar    byte\n\twReserved1 uint16\n}\n\n// Keyboard Layout Flags.\n// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw\nconst (\n\tKLF_ACTIVATE      = 0x00000001\n\tKLF_SUBSTITUTE_OK = 0x00000002\n\tKLF_REORDER       = 0x00000008\n\tKLF_REPLACELANG   = 0x00000010\n\tKLF_NOTELLSHELL   = 0x00000080\n\tKLF_SETFORPROCESS = 0x00000100\n)\n\n// Virtual Key codes\n// https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\nconst (\n\tVK_LBUTTON             = 0x01\n\tVK_RBUTTON             = 0x02\n\tVK_CANCEL              = 0x03\n\tVK_MBUTTON             = 0x04\n\tVK_XBUTTON1            = 0x05\n\tVK_XBUTTON2            = 0x06\n\tVK_BACK                = 0x08\n\tVK_TAB                 = 0x09\n\tVK_CLEAR               = 0x0C\n\tVK_RETURN              = 0x0D\n\tVK_SHIFT               = 0x10\n\tVK_CONTROL             = 0x11\n\tVK_MENU                = 0x12\n\tVK_PAUSE               = 0x13\n\tVK_CAPITAL             = 0x14\n\tVK_KANA                = 0x15\n\tVK_HANGEUL             = 0x15\n\tVK_HANGUL              = 0x15\n\tVK_IME_ON              = 0x16\n\tVK_JUNJA               = 0x17\n\tVK_FINAL               = 0x18\n\tVK_HANJA               = 0x19\n\tVK_KANJI               = 0x19\n\tVK_IME_OFF             = 0x1A\n\tVK_ESCAPE              = 0x1B\n\tVK_CONVERT             = 0x1C\n\tVK_NONCONVERT          = 0x1D\n\tVK_ACCEPT              = 0x1E\n\tVK_MODECHANGE          = 0x1F\n\tVK_SPACE               = 0x20\n\tVK_PRIOR               = 0x21\n\tVK_NEXT                = 0x22\n\tVK_END                 = 0x23\n\tVK_HOME                = 0x24\n\tVK_LEFT                = 0x25\n\tVK_UP                  = 0x26\n\tVK_RIGHT               = 0x27\n\tVK_DOWN                = 0x28\n\tVK_SELECT              = 0x29\n\tVK_PRINT               = 0x2A\n\tVK_EXECUTE             = 0x2B\n\tVK_SNAPSHOT            = 0x2C\n\tVK_INSERT              = 0x2D\n\tVK_DELETE              = 0x2E\n\tVK_HELP                = 0x2F\n\tVK_LWIN                = 0x5B\n\tVK_RWIN                = 0x5C\n\tVK_APPS                = 0x5D\n\tVK_SLEEP               = 0x5F\n\tVK_NUMPAD0             = 0x60\n\tVK_NUMPAD1             = 0x61\n\tVK_NUMPAD2             = 0x62\n\tVK_NUMPAD3             = 0x63\n\tVK_NUMPAD4             = 0x64\n\tVK_NUMPAD5             = 0x65\n\tVK_NUMPAD6             = 0x66\n\tVK_NUMPAD7             = 0x67\n\tVK_NUMPAD8             = 0x68\n\tVK_NUMPAD9             = 0x69\n\tVK_MULTIPLY            = 0x6A\n\tVK_ADD                 = 0x6B\n\tVK_SEPARATOR           = 0x6C\n\tVK_SUBTRACT            = 0x6D\n\tVK_DECIMAL             = 0x6E\n\tVK_DIVIDE              = 0x6F\n\tVK_F1                  = 0x70\n\tVK_F2                  = 0x71\n\tVK_F3                  = 0x72\n\tVK_F4                  = 0x73\n\tVK_F5                  = 0x74\n\tVK_F6                  = 0x75\n\tVK_F7                  = 0x76\n\tVK_F8                  = 0x77\n\tVK_F9                  = 0x78\n\tVK_F10                 = 0x79\n\tVK_F11                 = 0x7A\n\tVK_F12                 = 0x7B\n\tVK_F13                 = 0x7C\n\tVK_F14                 = 0x7D\n\tVK_F15                 = 0x7E\n\tVK_F16                 = 0x7F\n\tVK_F17                 = 0x80\n\tVK_F18                 = 0x81\n\tVK_F19                 = 0x82\n\tVK_F20                 = 0x83\n\tVK_F21                 = 0x84\n\tVK_F22                 = 0x85\n\tVK_F23                 = 0x86\n\tVK_F24                 = 0x87\n\tVK_NUMLOCK             = 0x90\n\tVK_SCROLL              = 0x91\n\tVK_OEM_NEC_EQUAL       = 0x92\n\tVK_OEM_FJ_JISHO        = 0x92\n\tVK_OEM_FJ_MASSHOU      = 0x93\n\tVK_OEM_FJ_TOUROKU      = 0x94\n\tVK_OEM_FJ_LOYA         = 0x95\n\tVK_OEM_FJ_ROYA         = 0x96\n\tVK_LSHIFT              = 0xA0\n\tVK_RSHIFT              = 0xA1\n\tVK_LCONTROL            = 0xA2\n\tVK_RCONTROL            = 0xA3\n\tVK_LMENU               = 0xA4\n\tVK_RMENU               = 0xA5\n\tVK_BROWSER_BACK        = 0xA6\n\tVK_BROWSER_FORWARD     = 0xA7\n\tVK_BROWSER_REFRESH     = 0xA8\n\tVK_BROWSER_STOP        = 0xA9\n\tVK_BROWSER_SEARCH      = 0xAA\n\tVK_BROWSER_FAVORITES   = 0xAB\n\tVK_BROWSER_HOME        = 0xAC\n\tVK_VOLUME_MUTE         = 0xAD\n\tVK_VOLUME_DOWN         = 0xAE\n\tVK_VOLUME_UP           = 0xAF\n\tVK_MEDIA_NEXT_TRACK    = 0xB0\n\tVK_MEDIA_PREV_TRACK    = 0xB1\n\tVK_MEDIA_STOP          = 0xB2\n\tVK_MEDIA_PLAY_PAUSE    = 0xB3\n\tVK_LAUNCH_MAIL         = 0xB4\n\tVK_LAUNCH_MEDIA_SELECT = 0xB5\n\tVK_LAUNCH_APP1         = 0xB6\n\tVK_LAUNCH_APP2         = 0xB7\n\tVK_OEM_1               = 0xBA\n\tVK_OEM_PLUS            = 0xBB\n\tVK_OEM_COMMA           = 0xBC\n\tVK_OEM_MINUS           = 0xBD\n\tVK_OEM_PERIOD          = 0xBE\n\tVK_OEM_2               = 0xBF\n\tVK_OEM_3               = 0xC0\n\tVK_OEM_4               = 0xDB\n\tVK_OEM_5               = 0xDC\n\tVK_OEM_6               = 0xDD\n\tVK_OEM_7               = 0xDE\n\tVK_OEM_8               = 0xDF\n\tVK_OEM_AX              = 0xE1\n\tVK_OEM_102             = 0xE2\n\tVK_ICO_HELP            = 0xE3\n\tVK_ICO_00              = 0xE4\n\tVK_PROCESSKEY          = 0xE5\n\tVK_ICO_CLEAR           = 0xE6\n\tVK_OEM_RESET           = 0xE9\n\tVK_OEM_JUMP            = 0xEA\n\tVK_OEM_PA1             = 0xEB\n\tVK_OEM_PA2             = 0xEC\n\tVK_OEM_PA3             = 0xED\n\tVK_OEM_WSCTRL          = 0xEE\n\tVK_OEM_CUSEL           = 0xEF\n\tVK_OEM_ATTN            = 0xF0\n\tVK_OEM_FINISH          = 0xF1\n\tVK_OEM_COPY            = 0xF2\n\tVK_OEM_AUTO            = 0xF3\n\tVK_OEM_ENLW            = 0xF4\n\tVK_OEM_BACKTAB         = 0xF5\n\tVK_ATTN                = 0xF6\n\tVK_CRSEL               = 0xF7\n\tVK_EXSEL               = 0xF8\n\tVK_EREOF               = 0xF9\n\tVK_PLAY                = 0xFA\n\tVK_ZOOM                = 0xFB\n\tVK_NONAME              = 0xFC\n\tVK_PA1                 = 0xFD\n\tVK_OEM_CLEAR           = 0xFE\n)\n\n// Mouse button constants.\n// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str\nconst (\n\tFROM_LEFT_1ST_BUTTON_PRESSED = 0x0001\n\tRIGHTMOST_BUTTON_PRESSED     = 0x0002\n\tFROM_LEFT_2ND_BUTTON_PRESSED = 0x0004\n\tFROM_LEFT_3RD_BUTTON_PRESSED = 0x0008\n\tFROM_LEFT_4TH_BUTTON_PRESSED = 0x0010\n)\n\n// Control key state constaints.\n// https://docs.microsoft.com/en-us/windows/console/key-event-record-str\n// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str\nconst (\n\tCAPSLOCK_ON        = 0x0080\n\tENHANCED_KEY       = 0x0100\n\tLEFT_ALT_PRESSED   = 0x0002\n\tLEFT_CTRL_PRESSED  = 0x0008\n\tNUMLOCK_ON         = 0x0020\n\tRIGHT_ALT_PRESSED  = 0x0001\n\tRIGHT_CTRL_PRESSED = 0x0004\n\tSCROLLLOCK_ON      = 0x0040\n\tSHIFT_PRESSED      = 0x0010\n)\n\n// Mouse event record event flags.\n// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str\nconst (\n\tMOUSE_MOVED    = 0x0001\n\tDOUBLE_CLICK   = 0x0002\n\tMOUSE_WHEELED  = 0x0004\n\tMOUSE_HWHEELED = 0x0008\n)\n\n// Input Record Event Types\n// https://learn.microsoft.com/en-us/windows/console/input-record-str\nconst (\n\tFOCUS_EVENT              = 0x0010\n\tKEY_EVENT                = 0x0001\n\tMENU_EVENT               = 0x0008\n\tMOUSE_EVENT              = 0x0002\n\tWINDOW_BUFFER_SIZE_EVENT = 0x0004\n)\n\n// The processor features to be tested for IsProcessorFeaturePresent, see\n// https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent\nconst (\n\tPF_ARM_64BIT_LOADSTORE_ATOMIC              = 25\n\tPF_ARM_DIVIDE_INSTRUCTION_AVAILABLE        = 24\n\tPF_ARM_EXTERNAL_CACHE_AVAILABLE            = 26\n\tPF_ARM_FMAC_INSTRUCTIONS_AVAILABLE         = 27\n\tPF_ARM_VFP_32_REGISTERS_AVAILABLE          = 18\n\tPF_3DNOW_INSTRUCTIONS_AVAILABLE            = 7\n\tPF_CHANNELS_ENABLED                        = 16\n\tPF_COMPARE_EXCHANGE_DOUBLE                 = 2\n\tPF_COMPARE_EXCHANGE128                     = 14\n\tPF_COMPARE64_EXCHANGE128                   = 15\n\tPF_FASTFAIL_AVAILABLE                      = 23\n\tPF_FLOATING_POINT_EMULATED                 = 1\n\tPF_FLOATING_POINT_PRECISION_ERRATA         = 0\n\tPF_MMX_INSTRUCTIONS_AVAILABLE              = 3\n\tPF_NX_ENABLED                              = 12\n\tPF_PAE_ENABLED                             = 9\n\tPF_RDTSC_INSTRUCTION_AVAILABLE             = 8\n\tPF_RDWRFSGSBASE_AVAILABLE                  = 22\n\tPF_SECOND_LEVEL_ADDRESS_TRANSLATION        = 20\n\tPF_SSE3_INSTRUCTIONS_AVAILABLE             = 13\n\tPF_SSSE3_INSTRUCTIONS_AVAILABLE            = 36\n\tPF_SSE4_1_INSTRUCTIONS_AVAILABLE           = 37\n\tPF_SSE4_2_INSTRUCTIONS_AVAILABLE           = 38\n\tPF_AVX_INSTRUCTIONS_AVAILABLE              = 39\n\tPF_AVX2_INSTRUCTIONS_AVAILABLE             = 40\n\tPF_AVX512F_INSTRUCTIONS_AVAILABLE          = 41\n\tPF_VIRT_FIRMWARE_ENABLED                   = 21\n\tPF_XMMI_INSTRUCTIONS_AVAILABLE             = 6\n\tPF_XMMI64_INSTRUCTIONS_AVAILABLE           = 10\n\tPF_XSAVE_ENABLED                           = 17\n\tPF_ARM_V8_INSTRUCTIONS_AVAILABLE           = 29\n\tPF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE    = 30\n\tPF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE     = 31\n\tPF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE   = 34\n\tPF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE       = 43\n\tPF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE    = 44\n\tPF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE    = 45\n\tPF_ARM_SVE_INSTRUCTIONS_AVAILABLE          = 46\n\tPF_ARM_SVE2_INSTRUCTIONS_AVAILABLE         = 47\n\tPF_ARM_SVE2_1_INSTRUCTIONS_AVAILABLE       = 48\n\tPF_ARM_SVE_AES_INSTRUCTIONS_AVAILABLE      = 49\n\tPF_ARM_SVE_PMULL128_INSTRUCTIONS_AVAILABLE = 50\n\tPF_ARM_SVE_BITPERM_INSTRUCTIONS_AVAILABLE  = 51\n\tPF_ARM_SVE_BF16_INSTRUCTIONS_AVAILABLE     = 52\n\tPF_ARM_SVE_EBF16_INSTRUCTIONS_AVAILABLE    = 53\n\tPF_ARM_SVE_B16B16_INSTRUCTIONS_AVAILABLE   = 54\n\tPF_ARM_SVE_SHA3_INSTRUCTIONS_AVAILABLE     = 55\n\tPF_ARM_SVE_SM4_INSTRUCTIONS_AVAILABLE      = 56\n\tPF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE     = 57\n\tPF_ARM_SVE_F32MM_INSTRUCTIONS_AVAILABLE    = 58\n\tPF_ARM_SVE_F64MM_INSTRUCTIONS_AVAILABLE    = 59\n\tPF_BMI2_INSTRUCTIONS_AVAILABLE             = 60\n\tPF_MOVDIR64B_INSTRUCTION_AVAILABLE         = 61\n\tPF_ARM_LSE2_AVAILABLE                      = 62\n\tPF_ARM_SHA3_INSTRUCTIONS_AVAILABLE         = 64\n\tPF_ARM_SHA512_INSTRUCTIONS_AVAILABLE       = 65\n\tPF_ARM_V82_I8MM_INSTRUCTIONS_AVAILABLE     = 66\n\tPF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE     = 67\n\tPF_ARM_V86_BF16_INSTRUCTIONS_AVAILABLE     = 68\n\tPF_ARM_V86_EBF16_INSTRUCTIONS_AVAILABLE    = 69\n\tPF_ARM_SME_INSTRUCTIONS_AVAILABLE          = 70\n\tPF_ARM_SME2_INSTRUCTIONS_AVAILABLE         = 71\n\tPF_ARM_SME2_1_INSTRUCTIONS_AVAILABLE       = 72\n\tPF_ARM_SME2_2_INSTRUCTIONS_AVAILABLE       = 73\n\tPF_ARM_SME_AES_INSTRUCTIONS_AVAILABLE      = 74\n\tPF_ARM_SME_SBITPERM_INSTRUCTIONS_AVAILABLE = 75\n\tPF_ARM_SME_SF8MM4_INSTRUCTIONS_AVAILABLE   = 76\n\tPF_ARM_SME_SF8MM8_INSTRUCTIONS_AVAILABLE   = 77\n\tPF_ARM_SME_SF8DP2_INSTRUCTIONS_AVAILABLE   = 78\n\tPF_ARM_SME_SF8DP4_INSTRUCTIONS_AVAILABLE   = 79\n\tPF_ARM_SME_SF8FMA_INSTRUCTIONS_AVAILABLE   = 80\n\tPF_ARM_SME_F8F32_INSTRUCTIONS_AVAILABLE    = 81\n\tPF_ARM_SME_F8F16_INSTRUCTIONS_AVAILABLE    = 82\n\tPF_ARM_SME_F16F16_INSTRUCTIONS_AVAILABLE   = 83\n\tPF_ARM_SME_B16B16_INSTRUCTIONS_AVAILABLE   = 84\n\tPF_ARM_SME_F64F64_INSTRUCTIONS_AVAILABLE   = 85\n\tPF_ARM_SME_I16I64_INSTRUCTIONS_AVAILABLE   = 86\n\tPF_ARM_SME_LUTv2_INSTRUCTIONS_AVAILABLE    = 87\n\tPF_ARM_SME_FA64_INSTRUCTIONS_AVAILABLE     = 88\n\tPF_UMONITOR_INSTRUCTION_AVAILABLE          = 89\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/types_windows_386.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\ntype WSAData struct {\n\tVersion      uint16\n\tHighVersion  uint16\n\tDescription  [WSADESCRIPTION_LEN + 1]byte\n\tSystemStatus [WSASYS_STATUS_LEN + 1]byte\n\tMaxSockets   uint16\n\tMaxUdpDg     uint16\n\tVendorInfo   *byte\n}\n\ntype Servent struct {\n\tName    *byte\n\tAliases **byte\n\tPort    uint16\n\tProto   *byte\n}\n\ntype JOBOBJECT_BASIC_LIMIT_INFORMATION struct {\n\tPerProcessUserTimeLimit int64\n\tPerJobUserTimeLimit     int64\n\tLimitFlags              uint32\n\tMinimumWorkingSetSize   uintptr\n\tMaximumWorkingSetSize   uintptr\n\tActiveProcessLimit      uint32\n\tAffinity                uintptr\n\tPriorityClass           uint32\n\tSchedulingClass         uint32\n\t_                       uint32 // pad to 8 byte boundary\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/types_windows_amd64.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\ntype WSAData struct {\n\tVersion      uint16\n\tHighVersion  uint16\n\tMaxSockets   uint16\n\tMaxUdpDg     uint16\n\tVendorInfo   *byte\n\tDescription  [WSADESCRIPTION_LEN + 1]byte\n\tSystemStatus [WSASYS_STATUS_LEN + 1]byte\n}\n\ntype Servent struct {\n\tName    *byte\n\tAliases **byte\n\tProto   *byte\n\tPort    uint16\n}\n\ntype JOBOBJECT_BASIC_LIMIT_INFORMATION struct {\n\tPerProcessUserTimeLimit int64\n\tPerJobUserTimeLimit     int64\n\tLimitFlags              uint32\n\tMinimumWorkingSetSize   uintptr\n\tMaximumWorkingSetSize   uintptr\n\tActiveProcessLimit      uint32\n\tAffinity                uintptr\n\tPriorityClass           uint32\n\tSchedulingClass         uint32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/types_windows_arm.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\ntype WSAData struct {\n\tVersion      uint16\n\tHighVersion  uint16\n\tDescription  [WSADESCRIPTION_LEN + 1]byte\n\tSystemStatus [WSASYS_STATUS_LEN + 1]byte\n\tMaxSockets   uint16\n\tMaxUdpDg     uint16\n\tVendorInfo   *byte\n}\n\ntype Servent struct {\n\tName    *byte\n\tAliases **byte\n\tPort    uint16\n\tProto   *byte\n}\n\ntype JOBOBJECT_BASIC_LIMIT_INFORMATION struct {\n\tPerProcessUserTimeLimit int64\n\tPerJobUserTimeLimit     int64\n\tLimitFlags              uint32\n\tMinimumWorkingSetSize   uintptr\n\tMaximumWorkingSetSize   uintptr\n\tActiveProcessLimit      uint32\n\tAffinity                uintptr\n\tPriorityClass           uint32\n\tSchedulingClass         uint32\n\t_                       uint32 // pad to 8 byte boundary\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/types_windows_arm64.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage windows\n\ntype WSAData struct {\n\tVersion      uint16\n\tHighVersion  uint16\n\tMaxSockets   uint16\n\tMaxUdpDg     uint16\n\tVendorInfo   *byte\n\tDescription  [WSADESCRIPTION_LEN + 1]byte\n\tSystemStatus [WSASYS_STATUS_LEN + 1]byte\n}\n\ntype Servent struct {\n\tName    *byte\n\tAliases **byte\n\tProto   *byte\n\tPort    uint16\n}\n\ntype JOBOBJECT_BASIC_LIMIT_INFORMATION struct {\n\tPerProcessUserTimeLimit int64\n\tPerJobUserTimeLimit     int64\n\tLimitFlags              uint32\n\tMinimumWorkingSetSize   uintptr\n\tMaximumWorkingSetSize   uintptr\n\tActiveProcessLimit      uint32\n\tAffinity                uintptr\n\tPriorityClass           uint32\n\tSchedulingClass         uint32\n}\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/zerrors_windows.go",
    "content": "// Code generated by 'mkerrors.bash'; DO NOT EDIT.\n\npackage windows\n\nimport \"syscall\"\n\nconst (\n\tFACILITY_NULL                                                                           = 0\n\tFACILITY_RPC                                                                            = 1\n\tFACILITY_DISPATCH                                                                       = 2\n\tFACILITY_STORAGE                                                                        = 3\n\tFACILITY_ITF                                                                            = 4\n\tFACILITY_WIN32                                                                          = 7\n\tFACILITY_WINDOWS                                                                        = 8\n\tFACILITY_SSPI                                                                           = 9\n\tFACILITY_SECURITY                                                                       = 9\n\tFACILITY_CONTROL                                                                        = 10\n\tFACILITY_CERT                                                                           = 11\n\tFACILITY_INTERNET                                                                       = 12\n\tFACILITY_MEDIASERVER                                                                    = 13\n\tFACILITY_MSMQ                                                                           = 14\n\tFACILITY_SETUPAPI                                                                       = 15\n\tFACILITY_SCARD                                                                          = 16\n\tFACILITY_COMPLUS                                                                        = 17\n\tFACILITY_AAF                                                                            = 18\n\tFACILITY_URT                                                                            = 19\n\tFACILITY_ACS                                                                            = 20\n\tFACILITY_DPLAY                                                                          = 21\n\tFACILITY_UMI                                                                            = 22\n\tFACILITY_SXS                                                                            = 23\n\tFACILITY_WINDOWS_CE                                                                     = 24\n\tFACILITY_HTTP                                                                           = 25\n\tFACILITY_USERMODE_COMMONLOG                                                             = 26\n\tFACILITY_WER                                                                            = 27\n\tFACILITY_USERMODE_FILTER_MANAGER                                                        = 31\n\tFACILITY_BACKGROUNDCOPY                                                                 = 32\n\tFACILITY_CONFIGURATION                                                                  = 33\n\tFACILITY_WIA                                                                            = 33\n\tFACILITY_STATE_MANAGEMENT                                                               = 34\n\tFACILITY_METADIRECTORY                                                                  = 35\n\tFACILITY_WINDOWSUPDATE                                                                  = 36\n\tFACILITY_DIRECTORYSERVICE                                                               = 37\n\tFACILITY_GRAPHICS                                                                       = 38\n\tFACILITY_SHELL                                                                          = 39\n\tFACILITY_NAP                                                                            = 39\n\tFACILITY_TPM_SERVICES                                                                   = 40\n\tFACILITY_TPM_SOFTWARE                                                                   = 41\n\tFACILITY_UI                                                                             = 42\n\tFACILITY_XAML                                                                           = 43\n\tFACILITY_ACTION_QUEUE                                                                   = 44\n\tFACILITY_PLA                                                                            = 48\n\tFACILITY_WINDOWS_SETUP                                                                  = 48\n\tFACILITY_FVE                                                                            = 49\n\tFACILITY_FWP                                                                            = 50\n\tFACILITY_WINRM                                                                          = 51\n\tFACILITY_NDIS                                                                           = 52\n\tFACILITY_USERMODE_HYPERVISOR                                                            = 53\n\tFACILITY_CMI                                                                            = 54\n\tFACILITY_USERMODE_VIRTUALIZATION                                                        = 55\n\tFACILITY_USERMODE_VOLMGR                                                                = 56\n\tFACILITY_BCD                                                                            = 57\n\tFACILITY_USERMODE_VHD                                                                   = 58\n\tFACILITY_USERMODE_HNS                                                                   = 59\n\tFACILITY_SDIAG                                                                          = 60\n\tFACILITY_WEBSERVICES                                                                    = 61\n\tFACILITY_WINPE                                                                          = 61\n\tFACILITY_WPN                                                                            = 62\n\tFACILITY_WINDOWS_STORE                                                                  = 63\n\tFACILITY_INPUT                                                                          = 64\n\tFACILITY_EAP                                                                            = 66\n\tFACILITY_WINDOWS_DEFENDER                                                               = 80\n\tFACILITY_OPC                                                                            = 81\n\tFACILITY_XPS                                                                            = 82\n\tFACILITY_MBN                                                                            = 84\n\tFACILITY_POWERSHELL                                                                     = 84\n\tFACILITY_RAS                                                                            = 83\n\tFACILITY_P2P_INT                                                                        = 98\n\tFACILITY_P2P                                                                            = 99\n\tFACILITY_DAF                                                                            = 100\n\tFACILITY_BLUETOOTH_ATT                                                                  = 101\n\tFACILITY_AUDIO                                                                          = 102\n\tFACILITY_STATEREPOSITORY                                                                = 103\n\tFACILITY_VISUALCPP                                                                      = 109\n\tFACILITY_SCRIPT                                                                         = 112\n\tFACILITY_PARSE                                                                          = 113\n\tFACILITY_BLB                                                                            = 120\n\tFACILITY_BLB_CLI                                                                        = 121\n\tFACILITY_WSBAPP                                                                         = 122\n\tFACILITY_BLBUI                                                                          = 128\n\tFACILITY_USN                                                                            = 129\n\tFACILITY_USERMODE_VOLSNAP                                                               = 130\n\tFACILITY_TIERING                                                                        = 131\n\tFACILITY_WSB_ONLINE                                                                     = 133\n\tFACILITY_ONLINE_ID                                                                      = 134\n\tFACILITY_DEVICE_UPDATE_AGENT                                                            = 135\n\tFACILITY_DRVSERVICING                                                                   = 136\n\tFACILITY_DLS                                                                            = 153\n\tFACILITY_DELIVERY_OPTIMIZATION                                                          = 208\n\tFACILITY_USERMODE_SPACES                                                                = 231\n\tFACILITY_USER_MODE_SECURITY_CORE                                                        = 232\n\tFACILITY_USERMODE_LICENSING                                                             = 234\n\tFACILITY_SOS                                                                            = 160\n\tFACILITY_DEBUGGERS                                                                      = 176\n\tFACILITY_SPP                                                                            = 256\n\tFACILITY_RESTORE                                                                        = 256\n\tFACILITY_DMSERVER                                                                       = 256\n\tFACILITY_DEPLOYMENT_SERVICES_SERVER                                                     = 257\n\tFACILITY_DEPLOYMENT_SERVICES_IMAGING                                                    = 258\n\tFACILITY_DEPLOYMENT_SERVICES_MANAGEMENT                                                 = 259\n\tFACILITY_DEPLOYMENT_SERVICES_UTIL                                                       = 260\n\tFACILITY_DEPLOYMENT_SERVICES_BINLSVC                                                    = 261\n\tFACILITY_DEPLOYMENT_SERVICES_PXE                                                        = 263\n\tFACILITY_DEPLOYMENT_SERVICES_TFTP                                                       = 264\n\tFACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT                                       = 272\n\tFACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING                                        = 278\n\tFACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER                                           = 289\n\tFACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT                                           = 290\n\tFACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER                                           = 293\n\tFACILITY_LINGUISTIC_SERVICES                                                            = 305\n\tFACILITY_AUDIOSTREAMING                                                                 = 1094\n\tFACILITY_ACCELERATOR                                                                    = 1536\n\tFACILITY_WMAAECMA                                                                       = 1996\n\tFACILITY_DIRECTMUSIC                                                                    = 2168\n\tFACILITY_DIRECT3D10                                                                     = 2169\n\tFACILITY_DXGI                                                                           = 2170\n\tFACILITY_DXGI_DDI                                                                       = 2171\n\tFACILITY_DIRECT3D11                                                                     = 2172\n\tFACILITY_DIRECT3D11_DEBUG                                                               = 2173\n\tFACILITY_DIRECT3D12                                                                     = 2174\n\tFACILITY_DIRECT3D12_DEBUG                                                               = 2175\n\tFACILITY_LEAP                                                                           = 2184\n\tFACILITY_AUDCLNT                                                                        = 2185\n\tFACILITY_WINCODEC_DWRITE_DWM                                                            = 2200\n\tFACILITY_WINML                                                                          = 2192\n\tFACILITY_DIRECT2D                                                                       = 2201\n\tFACILITY_DEFRAG                                                                         = 2304\n\tFACILITY_USERMODE_SDBUS                                                                 = 2305\n\tFACILITY_JSCRIPT                                                                        = 2306\n\tFACILITY_PIDGENX                                                                        = 2561\n\tFACILITY_EAS                                                                            = 85\n\tFACILITY_WEB                                                                            = 885\n\tFACILITY_WEB_SOCKET                                                                     = 886\n\tFACILITY_MOBILE                                                                         = 1793\n\tFACILITY_SQLITE                                                                         = 1967\n\tFACILITY_UTC                                                                            = 1989\n\tFACILITY_WEP                                                                            = 2049\n\tFACILITY_SYNCENGINE                                                                     = 2050\n\tFACILITY_XBOX                                                                           = 2339\n\tFACILITY_GAME                                                                           = 2340\n\tFACILITY_PIX                                                                            = 2748\n\tERROR_SUCCESS                                                             syscall.Errno = 0\n\tNO_ERROR                                                                                = 0\n\tSEC_E_OK                                                                  Handle        = 0x00000000\n\tERROR_INVALID_FUNCTION                                                    syscall.Errno = 1\n\tERROR_FILE_NOT_FOUND                                                      syscall.Errno = 2\n\tERROR_PATH_NOT_FOUND                                                      syscall.Errno = 3\n\tERROR_TOO_MANY_OPEN_FILES                                                 syscall.Errno = 4\n\tERROR_ACCESS_DENIED                                                       syscall.Errno = 5\n\tERROR_INVALID_HANDLE                                                      syscall.Errno = 6\n\tERROR_ARENA_TRASHED                                                       syscall.Errno = 7\n\tERROR_NOT_ENOUGH_MEMORY                                                   syscall.Errno = 8\n\tERROR_INVALID_BLOCK                                                       syscall.Errno = 9\n\tERROR_BAD_ENVIRONMENT                                                     syscall.Errno = 10\n\tERROR_BAD_FORMAT                                                          syscall.Errno = 11\n\tERROR_INVALID_ACCESS                                                      syscall.Errno = 12\n\tERROR_INVALID_DATA                                                        syscall.Errno = 13\n\tERROR_OUTOFMEMORY                                                         syscall.Errno = 14\n\tERROR_INVALID_DRIVE                                                       syscall.Errno = 15\n\tERROR_CURRENT_DIRECTORY                                                   syscall.Errno = 16\n\tERROR_NOT_SAME_DEVICE                                                     syscall.Errno = 17\n\tERROR_NO_MORE_FILES                                                       syscall.Errno = 18\n\tERROR_WRITE_PROTECT                                                       syscall.Errno = 19\n\tERROR_BAD_UNIT                                                            syscall.Errno = 20\n\tERROR_NOT_READY                                                           syscall.Errno = 21\n\tERROR_BAD_COMMAND                                                         syscall.Errno = 22\n\tERROR_CRC                                                                 syscall.Errno = 23\n\tERROR_BAD_LENGTH                                                          syscall.Errno = 24\n\tERROR_SEEK                                                                syscall.Errno = 25\n\tERROR_NOT_DOS_DISK                                                        syscall.Errno = 26\n\tERROR_SECTOR_NOT_FOUND                                                    syscall.Errno = 27\n\tERROR_OUT_OF_PAPER                                                        syscall.Errno = 28\n\tERROR_WRITE_FAULT                                                         syscall.Errno = 29\n\tERROR_READ_FAULT                                                          syscall.Errno = 30\n\tERROR_GEN_FAILURE                                                         syscall.Errno = 31\n\tERROR_SHARING_VIOLATION                                                   syscall.Errno = 32\n\tERROR_LOCK_VIOLATION                                                      syscall.Errno = 33\n\tERROR_WRONG_DISK                                                          syscall.Errno = 34\n\tERROR_SHARING_BUFFER_EXCEEDED                                             syscall.Errno = 36\n\tERROR_HANDLE_EOF                                                          syscall.Errno = 38\n\tERROR_HANDLE_DISK_FULL                                                    syscall.Errno = 39\n\tERROR_NOT_SUPPORTED                                                       syscall.Errno = 50\n\tERROR_REM_NOT_LIST                                                        syscall.Errno = 51\n\tERROR_DUP_NAME                                                            syscall.Errno = 52\n\tERROR_BAD_NETPATH                                                         syscall.Errno = 53\n\tERROR_NETWORK_BUSY                                                        syscall.Errno = 54\n\tERROR_DEV_NOT_EXIST                                                       syscall.Errno = 55\n\tERROR_TOO_MANY_CMDS                                                       syscall.Errno = 56\n\tERROR_ADAP_HDW_ERR                                                        syscall.Errno = 57\n\tERROR_BAD_NET_RESP                                                        syscall.Errno = 58\n\tERROR_UNEXP_NET_ERR                                                       syscall.Errno = 59\n\tERROR_BAD_REM_ADAP                                                        syscall.Errno = 60\n\tERROR_PRINTQ_FULL                                                         syscall.Errno = 61\n\tERROR_NO_SPOOL_SPACE                                                      syscall.Errno = 62\n\tERROR_PRINT_CANCELLED                                                     syscall.Errno = 63\n\tERROR_NETNAME_DELETED                                                     syscall.Errno = 64\n\tERROR_NETWORK_ACCESS_DENIED                                               syscall.Errno = 65\n\tERROR_BAD_DEV_TYPE                                                        syscall.Errno = 66\n\tERROR_BAD_NET_NAME                                                        syscall.Errno = 67\n\tERROR_TOO_MANY_NAMES                                                      syscall.Errno = 68\n\tERROR_TOO_MANY_SESS                                                       syscall.Errno = 69\n\tERROR_SHARING_PAUSED                                                      syscall.Errno = 70\n\tERROR_REQ_NOT_ACCEP                                                       syscall.Errno = 71\n\tERROR_REDIR_PAUSED                                                        syscall.Errno = 72\n\tERROR_FILE_EXISTS                                                         syscall.Errno = 80\n\tERROR_CANNOT_MAKE                                                         syscall.Errno = 82\n\tERROR_FAIL_I24                                                            syscall.Errno = 83\n\tERROR_OUT_OF_STRUCTURES                                                   syscall.Errno = 84\n\tERROR_ALREADY_ASSIGNED                                                    syscall.Errno = 85\n\tERROR_INVALID_PASSWORD                                                    syscall.Errno = 86\n\tERROR_INVALID_PARAMETER                                                   syscall.Errno = 87\n\tERROR_NET_WRITE_FAULT                                                     syscall.Errno = 88\n\tERROR_NO_PROC_SLOTS                                                       syscall.Errno = 89\n\tERROR_TOO_MANY_SEMAPHORES                                                 syscall.Errno = 100\n\tERROR_EXCL_SEM_ALREADY_OWNED                                              syscall.Errno = 101\n\tERROR_SEM_IS_SET                                                          syscall.Errno = 102\n\tERROR_TOO_MANY_SEM_REQUESTS                                               syscall.Errno = 103\n\tERROR_INVALID_AT_INTERRUPT_TIME                                           syscall.Errno = 104\n\tERROR_SEM_OWNER_DIED                                                      syscall.Errno = 105\n\tERROR_SEM_USER_LIMIT                                                      syscall.Errno = 106\n\tERROR_DISK_CHANGE                                                         syscall.Errno = 107\n\tERROR_DRIVE_LOCKED                                                        syscall.Errno = 108\n\tERROR_BROKEN_PIPE                                                         syscall.Errno = 109\n\tERROR_OPEN_FAILED                                                         syscall.Errno = 110\n\tERROR_BUFFER_OVERFLOW                                                     syscall.Errno = 111\n\tERROR_DISK_FULL                                                           syscall.Errno = 112\n\tERROR_NO_MORE_SEARCH_HANDLES                                              syscall.Errno = 113\n\tERROR_INVALID_TARGET_HANDLE                                               syscall.Errno = 114\n\tERROR_INVALID_CATEGORY                                                    syscall.Errno = 117\n\tERROR_INVALID_VERIFY_SWITCH                                               syscall.Errno = 118\n\tERROR_BAD_DRIVER_LEVEL                                                    syscall.Errno = 119\n\tERROR_CALL_NOT_IMPLEMENTED                                                syscall.Errno = 120\n\tERROR_SEM_TIMEOUT                                                         syscall.Errno = 121\n\tERROR_INSUFFICIENT_BUFFER                                                 syscall.Errno = 122\n\tERROR_INVALID_NAME                                                        syscall.Errno = 123\n\tERROR_INVALID_LEVEL                                                       syscall.Errno = 124\n\tERROR_NO_VOLUME_LABEL                                                     syscall.Errno = 125\n\tERROR_MOD_NOT_FOUND                                                       syscall.Errno = 126\n\tERROR_PROC_NOT_FOUND                                                      syscall.Errno = 127\n\tERROR_WAIT_NO_CHILDREN                                                    syscall.Errno = 128\n\tERROR_CHILD_NOT_COMPLETE                                                  syscall.Errno = 129\n\tERROR_DIRECT_ACCESS_HANDLE                                                syscall.Errno = 130\n\tERROR_NEGATIVE_SEEK                                                       syscall.Errno = 131\n\tERROR_SEEK_ON_DEVICE                                                      syscall.Errno = 132\n\tERROR_IS_JOIN_TARGET                                                      syscall.Errno = 133\n\tERROR_IS_JOINED                                                           syscall.Errno = 134\n\tERROR_IS_SUBSTED                                                          syscall.Errno = 135\n\tERROR_NOT_JOINED                                                          syscall.Errno = 136\n\tERROR_NOT_SUBSTED                                                         syscall.Errno = 137\n\tERROR_JOIN_TO_JOIN                                                        syscall.Errno = 138\n\tERROR_SUBST_TO_SUBST                                                      syscall.Errno = 139\n\tERROR_JOIN_TO_SUBST                                                       syscall.Errno = 140\n\tERROR_SUBST_TO_JOIN                                                       syscall.Errno = 141\n\tERROR_BUSY_DRIVE                                                          syscall.Errno = 142\n\tERROR_SAME_DRIVE                                                          syscall.Errno = 143\n\tERROR_DIR_NOT_ROOT                                                        syscall.Errno = 144\n\tERROR_DIR_NOT_EMPTY                                                       syscall.Errno = 145\n\tERROR_IS_SUBST_PATH                                                       syscall.Errno = 146\n\tERROR_IS_JOIN_PATH                                                        syscall.Errno = 147\n\tERROR_PATH_BUSY                                                           syscall.Errno = 148\n\tERROR_IS_SUBST_TARGET                                                     syscall.Errno = 149\n\tERROR_SYSTEM_TRACE                                                        syscall.Errno = 150\n\tERROR_INVALID_EVENT_COUNT                                                 syscall.Errno = 151\n\tERROR_TOO_MANY_MUXWAITERS                                                 syscall.Errno = 152\n\tERROR_INVALID_LIST_FORMAT                                                 syscall.Errno = 153\n\tERROR_LABEL_TOO_LONG                                                      syscall.Errno = 154\n\tERROR_TOO_MANY_TCBS                                                       syscall.Errno = 155\n\tERROR_SIGNAL_REFUSED                                                      syscall.Errno = 156\n\tERROR_DISCARDED                                                           syscall.Errno = 157\n\tERROR_NOT_LOCKED                                                          syscall.Errno = 158\n\tERROR_BAD_THREADID_ADDR                                                   syscall.Errno = 159\n\tERROR_BAD_ARGUMENTS                                                       syscall.Errno = 160\n\tERROR_BAD_PATHNAME                                                        syscall.Errno = 161\n\tERROR_SIGNAL_PENDING                                                      syscall.Errno = 162\n\tERROR_MAX_THRDS_REACHED                                                   syscall.Errno = 164\n\tERROR_LOCK_FAILED                                                         syscall.Errno = 167\n\tERROR_BUSY                                                                syscall.Errno = 170\n\tERROR_DEVICE_SUPPORT_IN_PROGRESS                                          syscall.Errno = 171\n\tERROR_CANCEL_VIOLATION                                                    syscall.Errno = 173\n\tERROR_ATOMIC_LOCKS_NOT_SUPPORTED                                          syscall.Errno = 174\n\tERROR_INVALID_SEGMENT_NUMBER                                              syscall.Errno = 180\n\tERROR_INVALID_ORDINAL                                                     syscall.Errno = 182\n\tERROR_ALREADY_EXISTS                                                      syscall.Errno = 183\n\tERROR_INVALID_FLAG_NUMBER                                                 syscall.Errno = 186\n\tERROR_SEM_NOT_FOUND                                                       syscall.Errno = 187\n\tERROR_INVALID_STARTING_CODESEG                                            syscall.Errno = 188\n\tERROR_INVALID_STACKSEG                                                    syscall.Errno = 189\n\tERROR_INVALID_MODULETYPE                                                  syscall.Errno = 190\n\tERROR_INVALID_EXE_SIGNATURE                                               syscall.Errno = 191\n\tERROR_EXE_MARKED_INVALID                                                  syscall.Errno = 192\n\tERROR_BAD_EXE_FORMAT                                                      syscall.Errno = 193\n\tERROR_ITERATED_DATA_EXCEEDS_64k                                           syscall.Errno = 194\n\tERROR_INVALID_MINALLOCSIZE                                                syscall.Errno = 195\n\tERROR_DYNLINK_FROM_INVALID_RING                                           syscall.Errno = 196\n\tERROR_IOPL_NOT_ENABLED                                                    syscall.Errno = 197\n\tERROR_INVALID_SEGDPL                                                      syscall.Errno = 198\n\tERROR_AUTODATASEG_EXCEEDS_64k                                             syscall.Errno = 199\n\tERROR_RING2SEG_MUST_BE_MOVABLE                                            syscall.Errno = 200\n\tERROR_RELOC_CHAIN_XEEDS_SEGLIM                                            syscall.Errno = 201\n\tERROR_INFLOOP_IN_RELOC_CHAIN                                              syscall.Errno = 202\n\tERROR_ENVVAR_NOT_FOUND                                                    syscall.Errno = 203\n\tERROR_NO_SIGNAL_SENT                                                      syscall.Errno = 205\n\tERROR_FILENAME_EXCED_RANGE                                                syscall.Errno = 206\n\tERROR_RING2_STACK_IN_USE                                                  syscall.Errno = 207\n\tERROR_META_EXPANSION_TOO_LONG                                             syscall.Errno = 208\n\tERROR_INVALID_SIGNAL_NUMBER                                               syscall.Errno = 209\n\tERROR_THREAD_1_INACTIVE                                                   syscall.Errno = 210\n\tERROR_LOCKED                                                              syscall.Errno = 212\n\tERROR_TOO_MANY_MODULES                                                    syscall.Errno = 214\n\tERROR_NESTING_NOT_ALLOWED                                                 syscall.Errno = 215\n\tERROR_EXE_MACHINE_TYPE_MISMATCH                                           syscall.Errno = 216\n\tERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY                                     syscall.Errno = 217\n\tERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY                              syscall.Errno = 218\n\tERROR_FILE_CHECKED_OUT                                                    syscall.Errno = 220\n\tERROR_CHECKOUT_REQUIRED                                                   syscall.Errno = 221\n\tERROR_BAD_FILE_TYPE                                                       syscall.Errno = 222\n\tERROR_FILE_TOO_LARGE                                                      syscall.Errno = 223\n\tERROR_FORMS_AUTH_REQUIRED                                                 syscall.Errno = 224\n\tERROR_VIRUS_INFECTED                                                      syscall.Errno = 225\n\tERROR_VIRUS_DELETED                                                       syscall.Errno = 226\n\tERROR_PIPE_LOCAL                                                          syscall.Errno = 229\n\tERROR_BAD_PIPE                                                            syscall.Errno = 230\n\tERROR_PIPE_BUSY                                                           syscall.Errno = 231\n\tERROR_NO_DATA                                                             syscall.Errno = 232\n\tERROR_PIPE_NOT_CONNECTED                                                  syscall.Errno = 233\n\tERROR_MORE_DATA                                                           syscall.Errno = 234\n\tERROR_NO_WORK_DONE                                                        syscall.Errno = 235\n\tERROR_VC_DISCONNECTED                                                     syscall.Errno = 240\n\tERROR_INVALID_EA_NAME                                                     syscall.Errno = 254\n\tERROR_EA_LIST_INCONSISTENT                                                syscall.Errno = 255\n\tWAIT_TIMEOUT                                                              syscall.Errno = 258\n\tERROR_NO_MORE_ITEMS                                                       syscall.Errno = 259\n\tERROR_CANNOT_COPY                                                         syscall.Errno = 266\n\tERROR_DIRECTORY                                                           syscall.Errno = 267\n\tERROR_EAS_DIDNT_FIT                                                       syscall.Errno = 275\n\tERROR_EA_FILE_CORRUPT                                                     syscall.Errno = 276\n\tERROR_EA_TABLE_FULL                                                       syscall.Errno = 277\n\tERROR_INVALID_EA_HANDLE                                                   syscall.Errno = 278\n\tERROR_EAS_NOT_SUPPORTED                                                   syscall.Errno = 282\n\tERROR_NOT_OWNER                                                           syscall.Errno = 288\n\tERROR_TOO_MANY_POSTS                                                      syscall.Errno = 298\n\tERROR_PARTIAL_COPY                                                        syscall.Errno = 299\n\tERROR_OPLOCK_NOT_GRANTED                                                  syscall.Errno = 300\n\tERROR_INVALID_OPLOCK_PROTOCOL                                             syscall.Errno = 301\n\tERROR_DISK_TOO_FRAGMENTED                                                 syscall.Errno = 302\n\tERROR_DELETE_PENDING                                                      syscall.Errno = 303\n\tERROR_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING                syscall.Errno = 304\n\tERROR_SHORT_NAMES_NOT_ENABLED_ON_VOLUME                                   syscall.Errno = 305\n\tERROR_SECURITY_STREAM_IS_INCONSISTENT                                     syscall.Errno = 306\n\tERROR_INVALID_LOCK_RANGE                                                  syscall.Errno = 307\n\tERROR_IMAGE_SUBSYSTEM_NOT_PRESENT                                         syscall.Errno = 308\n\tERROR_NOTIFICATION_GUID_ALREADY_DEFINED                                   syscall.Errno = 309\n\tERROR_INVALID_EXCEPTION_HANDLER                                           syscall.Errno = 310\n\tERROR_DUPLICATE_PRIVILEGES                                                syscall.Errno = 311\n\tERROR_NO_RANGES_PROCESSED                                                 syscall.Errno = 312\n\tERROR_NOT_ALLOWED_ON_SYSTEM_FILE                                          syscall.Errno = 313\n\tERROR_DISK_RESOURCES_EXHAUSTED                                            syscall.Errno = 314\n\tERROR_INVALID_TOKEN                                                       syscall.Errno = 315\n\tERROR_DEVICE_FEATURE_NOT_SUPPORTED                                        syscall.Errno = 316\n\tERROR_MR_MID_NOT_FOUND                                                    syscall.Errno = 317\n\tERROR_SCOPE_NOT_FOUND                                                     syscall.Errno = 318\n\tERROR_UNDEFINED_SCOPE                                                     syscall.Errno = 319\n\tERROR_INVALID_CAP                                                         syscall.Errno = 320\n\tERROR_DEVICE_UNREACHABLE                                                  syscall.Errno = 321\n\tERROR_DEVICE_NO_RESOURCES                                                 syscall.Errno = 322\n\tERROR_DATA_CHECKSUM_ERROR                                                 syscall.Errno = 323\n\tERROR_INTERMIXED_KERNEL_EA_OPERATION                                      syscall.Errno = 324\n\tERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED                                       syscall.Errno = 326\n\tERROR_OFFSET_ALIGNMENT_VIOLATION                                          syscall.Errno = 327\n\tERROR_INVALID_FIELD_IN_PARAMETER_LIST                                     syscall.Errno = 328\n\tERROR_OPERATION_IN_PROGRESS                                               syscall.Errno = 329\n\tERROR_BAD_DEVICE_PATH                                                     syscall.Errno = 330\n\tERROR_TOO_MANY_DESCRIPTORS                                                syscall.Errno = 331\n\tERROR_SCRUB_DATA_DISABLED                                                 syscall.Errno = 332\n\tERROR_NOT_REDUNDANT_STORAGE                                               syscall.Errno = 333\n\tERROR_RESIDENT_FILE_NOT_SUPPORTED                                         syscall.Errno = 334\n\tERROR_COMPRESSED_FILE_NOT_SUPPORTED                                       syscall.Errno = 335\n\tERROR_DIRECTORY_NOT_SUPPORTED                                             syscall.Errno = 336\n\tERROR_NOT_READ_FROM_COPY                                                  syscall.Errno = 337\n\tERROR_FT_WRITE_FAILURE                                                    syscall.Errno = 338\n\tERROR_FT_DI_SCAN_REQUIRED                                                 syscall.Errno = 339\n\tERROR_INVALID_KERNEL_INFO_VERSION                                         syscall.Errno = 340\n\tERROR_INVALID_PEP_INFO_VERSION                                            syscall.Errno = 341\n\tERROR_OBJECT_NOT_EXTERNALLY_BACKED                                        syscall.Errno = 342\n\tERROR_EXTERNAL_BACKING_PROVIDER_UNKNOWN                                   syscall.Errno = 343\n\tERROR_COMPRESSION_NOT_BENEFICIAL                                          syscall.Errno = 344\n\tERROR_STORAGE_TOPOLOGY_ID_MISMATCH                                        syscall.Errno = 345\n\tERROR_BLOCKED_BY_PARENTAL_CONTROLS                                        syscall.Errno = 346\n\tERROR_BLOCK_TOO_MANY_REFERENCES                                           syscall.Errno = 347\n\tERROR_MARKED_TO_DISALLOW_WRITES                                           syscall.Errno = 348\n\tERROR_ENCLAVE_FAILURE                                                     syscall.Errno = 349\n\tERROR_FAIL_NOACTION_REBOOT                                                syscall.Errno = 350\n\tERROR_FAIL_SHUTDOWN                                                       syscall.Errno = 351\n\tERROR_FAIL_RESTART                                                        syscall.Errno = 352\n\tERROR_MAX_SESSIONS_REACHED                                                syscall.Errno = 353\n\tERROR_NETWORK_ACCESS_DENIED_EDP                                           syscall.Errno = 354\n\tERROR_DEVICE_HINT_NAME_BUFFER_TOO_SMALL                                   syscall.Errno = 355\n\tERROR_EDP_POLICY_DENIES_OPERATION                                         syscall.Errno = 356\n\tERROR_EDP_DPL_POLICY_CANT_BE_SATISFIED                                    syscall.Errno = 357\n\tERROR_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT                               syscall.Errno = 358\n\tERROR_DEVICE_IN_MAINTENANCE                                               syscall.Errno = 359\n\tERROR_NOT_SUPPORTED_ON_DAX                                                syscall.Errno = 360\n\tERROR_DAX_MAPPING_EXISTS                                                  syscall.Errno = 361\n\tERROR_CLOUD_FILE_PROVIDER_NOT_RUNNING                                     syscall.Errno = 362\n\tERROR_CLOUD_FILE_METADATA_CORRUPT                                         syscall.Errno = 363\n\tERROR_CLOUD_FILE_METADATA_TOO_LARGE                                       syscall.Errno = 364\n\tERROR_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE                                  syscall.Errno = 365\n\tERROR_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH                          syscall.Errno = 366\n\tERROR_CHILD_PROCESS_BLOCKED                                               syscall.Errno = 367\n\tERROR_STORAGE_LOST_DATA_PERSISTENCE                                       syscall.Errno = 368\n\tERROR_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE                              syscall.Errno = 369\n\tERROR_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT                         syscall.Errno = 370\n\tERROR_FILE_SYSTEM_VIRTUALIZATION_BUSY                                     syscall.Errno = 371\n\tERROR_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN                         syscall.Errno = 372\n\tERROR_GDI_HANDLE_LEAK                                                     syscall.Errno = 373\n\tERROR_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS                                  syscall.Errno = 374\n\tERROR_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED                           syscall.Errno = 375\n\tERROR_NOT_A_CLOUD_FILE                                                    syscall.Errno = 376\n\tERROR_CLOUD_FILE_NOT_IN_SYNC                                              syscall.Errno = 377\n\tERROR_CLOUD_FILE_ALREADY_CONNECTED                                        syscall.Errno = 378\n\tERROR_CLOUD_FILE_NOT_SUPPORTED                                            syscall.Errno = 379\n\tERROR_CLOUD_FILE_INVALID_REQUEST                                          syscall.Errno = 380\n\tERROR_CLOUD_FILE_READ_ONLY_VOLUME                                         syscall.Errno = 381\n\tERROR_CLOUD_FILE_CONNECTED_PROVIDER_ONLY                                  syscall.Errno = 382\n\tERROR_CLOUD_FILE_VALIDATION_FAILED                                        syscall.Errno = 383\n\tERROR_SMB1_NOT_AVAILABLE                                                  syscall.Errno = 384\n\tERROR_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION                        syscall.Errno = 385\n\tERROR_CLOUD_FILE_AUTHENTICATION_FAILED                                    syscall.Errno = 386\n\tERROR_CLOUD_FILE_INSUFFICIENT_RESOURCES                                   syscall.Errno = 387\n\tERROR_CLOUD_FILE_NETWORK_UNAVAILABLE                                      syscall.Errno = 388\n\tERROR_CLOUD_FILE_UNSUCCESSFUL                                             syscall.Errno = 389\n\tERROR_CLOUD_FILE_NOT_UNDER_SYNC_ROOT                                      syscall.Errno = 390\n\tERROR_CLOUD_FILE_IN_USE                                                   syscall.Errno = 391\n\tERROR_CLOUD_FILE_PINNED                                                   syscall.Errno = 392\n\tERROR_CLOUD_FILE_REQUEST_ABORTED                                          syscall.Errno = 393\n\tERROR_CLOUD_FILE_PROPERTY_CORRUPT                                         syscall.Errno = 394\n\tERROR_CLOUD_FILE_ACCESS_DENIED                                            syscall.Errno = 395\n\tERROR_CLOUD_FILE_INCOMPATIBLE_HARDLINKS                                   syscall.Errno = 396\n\tERROR_CLOUD_FILE_PROPERTY_LOCK_CONFLICT                                   syscall.Errno = 397\n\tERROR_CLOUD_FILE_REQUEST_CANCELED                                         syscall.Errno = 398\n\tERROR_EXTERNAL_SYSKEY_NOT_SUPPORTED                                       syscall.Errno = 399\n\tERROR_THREAD_MODE_ALREADY_BACKGROUND                                      syscall.Errno = 400\n\tERROR_THREAD_MODE_NOT_BACKGROUND                                          syscall.Errno = 401\n\tERROR_PROCESS_MODE_ALREADY_BACKGROUND                                     syscall.Errno = 402\n\tERROR_PROCESS_MODE_NOT_BACKGROUND                                         syscall.Errno = 403\n\tERROR_CLOUD_FILE_PROVIDER_TERMINATED                                      syscall.Errno = 404\n\tERROR_NOT_A_CLOUD_SYNC_ROOT                                               syscall.Errno = 405\n\tERROR_FILE_PROTECTED_UNDER_DPL                                            syscall.Errno = 406\n\tERROR_VOLUME_NOT_CLUSTER_ALIGNED                                          syscall.Errno = 407\n\tERROR_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND                              syscall.Errno = 408\n\tERROR_APPX_FILE_NOT_ENCRYPTED                                             syscall.Errno = 409\n\tERROR_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED                                  syscall.Errno = 410\n\tERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET                        syscall.Errno = 411\n\tERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE                         syscall.Errno = 412\n\tERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER                         syscall.Errno = 413\n\tERROR_LINUX_SUBSYSTEM_NOT_PRESENT                                         syscall.Errno = 414\n\tERROR_FT_READ_FAILURE                                                     syscall.Errno = 415\n\tERROR_STORAGE_RESERVE_ID_INVALID                                          syscall.Errno = 416\n\tERROR_STORAGE_RESERVE_DOES_NOT_EXIST                                      syscall.Errno = 417\n\tERROR_STORAGE_RESERVE_ALREADY_EXISTS                                      syscall.Errno = 418\n\tERROR_STORAGE_RESERVE_NOT_EMPTY                                           syscall.Errno = 419\n\tERROR_NOT_A_DAX_VOLUME                                                    syscall.Errno = 420\n\tERROR_NOT_DAX_MAPPABLE                                                    syscall.Errno = 421\n\tERROR_TIME_SENSITIVE_THREAD                                               syscall.Errno = 422\n\tERROR_DPL_NOT_SUPPORTED_FOR_USER                                          syscall.Errno = 423\n\tERROR_CASE_DIFFERING_NAMES_IN_DIR                                         syscall.Errno = 424\n\tERROR_FILE_NOT_SUPPORTED                                                  syscall.Errno = 425\n\tERROR_CLOUD_FILE_REQUEST_TIMEOUT                                          syscall.Errno = 426\n\tERROR_NO_TASK_QUEUE                                                       syscall.Errno = 427\n\tERROR_SRC_SRV_DLL_LOAD_FAILED                                             syscall.Errno = 428\n\tERROR_NOT_SUPPORTED_WITH_BTT                                              syscall.Errno = 429\n\tERROR_ENCRYPTION_DISABLED                                                 syscall.Errno = 430\n\tERROR_ENCRYPTING_METADATA_DISALLOWED                                      syscall.Errno = 431\n\tERROR_CANT_CLEAR_ENCRYPTION_FLAG                                          syscall.Errno = 432\n\tERROR_NO_SUCH_DEVICE                                                      syscall.Errno = 433\n\tERROR_CAPAUTHZ_NOT_DEVUNLOCKED                                            syscall.Errno = 450\n\tERROR_CAPAUTHZ_CHANGE_TYPE                                                syscall.Errno = 451\n\tERROR_CAPAUTHZ_NOT_PROVISIONED                                            syscall.Errno = 452\n\tERROR_CAPAUTHZ_NOT_AUTHORIZED                                             syscall.Errno = 453\n\tERROR_CAPAUTHZ_NO_POLICY                                                  syscall.Errno = 454\n\tERROR_CAPAUTHZ_DB_CORRUPTED                                               syscall.Errno = 455\n\tERROR_CAPAUTHZ_SCCD_INVALID_CATALOG                                       syscall.Errno = 456\n\tERROR_CAPAUTHZ_SCCD_NO_AUTH_ENTITY                                        syscall.Errno = 457\n\tERROR_CAPAUTHZ_SCCD_PARSE_ERROR                                           syscall.Errno = 458\n\tERROR_CAPAUTHZ_SCCD_DEV_MODE_REQUIRED                                     syscall.Errno = 459\n\tERROR_CAPAUTHZ_SCCD_NO_CAPABILITY_MATCH                                   syscall.Errno = 460\n\tERROR_PNP_QUERY_REMOVE_DEVICE_TIMEOUT                                     syscall.Errno = 480\n\tERROR_PNP_QUERY_REMOVE_RELATED_DEVICE_TIMEOUT                             syscall.Errno = 481\n\tERROR_PNP_QUERY_REMOVE_UNRELATED_DEVICE_TIMEOUT                           syscall.Errno = 482\n\tERROR_DEVICE_HARDWARE_ERROR                                               syscall.Errno = 483\n\tERROR_INVALID_ADDRESS                                                     syscall.Errno = 487\n\tERROR_VRF_CFG_ENABLED                                                     syscall.Errno = 1183\n\tERROR_PARTITION_TERMINATING                                               syscall.Errno = 1184\n\tERROR_USER_PROFILE_LOAD                                                   syscall.Errno = 500\n\tERROR_ARITHMETIC_OVERFLOW                                                 syscall.Errno = 534\n\tERROR_PIPE_CONNECTED                                                      syscall.Errno = 535\n\tERROR_PIPE_LISTENING                                                      syscall.Errno = 536\n\tERROR_VERIFIER_STOP                                                       syscall.Errno = 537\n\tERROR_ABIOS_ERROR                                                         syscall.Errno = 538\n\tERROR_WX86_WARNING                                                        syscall.Errno = 539\n\tERROR_WX86_ERROR                                                          syscall.Errno = 540\n\tERROR_TIMER_NOT_CANCELED                                                  syscall.Errno = 541\n\tERROR_UNWIND                                                              syscall.Errno = 542\n\tERROR_BAD_STACK                                                           syscall.Errno = 543\n\tERROR_INVALID_UNWIND_TARGET                                               syscall.Errno = 544\n\tERROR_INVALID_PORT_ATTRIBUTES                                             syscall.Errno = 545\n\tERROR_PORT_MESSAGE_TOO_LONG                                               syscall.Errno = 546\n\tERROR_INVALID_QUOTA_LOWER                                                 syscall.Errno = 547\n\tERROR_DEVICE_ALREADY_ATTACHED                                             syscall.Errno = 548\n\tERROR_INSTRUCTION_MISALIGNMENT                                            syscall.Errno = 549\n\tERROR_PROFILING_NOT_STARTED                                               syscall.Errno = 550\n\tERROR_PROFILING_NOT_STOPPED                                               syscall.Errno = 551\n\tERROR_COULD_NOT_INTERPRET                                                 syscall.Errno = 552\n\tERROR_PROFILING_AT_LIMIT                                                  syscall.Errno = 553\n\tERROR_CANT_WAIT                                                           syscall.Errno = 554\n\tERROR_CANT_TERMINATE_SELF                                                 syscall.Errno = 555\n\tERROR_UNEXPECTED_MM_CREATE_ERR                                            syscall.Errno = 556\n\tERROR_UNEXPECTED_MM_MAP_ERROR                                             syscall.Errno = 557\n\tERROR_UNEXPECTED_MM_EXTEND_ERR                                            syscall.Errno = 558\n\tERROR_BAD_FUNCTION_TABLE                                                  syscall.Errno = 559\n\tERROR_NO_GUID_TRANSLATION                                                 syscall.Errno = 560\n\tERROR_INVALID_LDT_SIZE                                                    syscall.Errno = 561\n\tERROR_INVALID_LDT_OFFSET                                                  syscall.Errno = 563\n\tERROR_INVALID_LDT_DESCRIPTOR                                              syscall.Errno = 564\n\tERROR_TOO_MANY_THREADS                                                    syscall.Errno = 565\n\tERROR_THREAD_NOT_IN_PROCESS                                               syscall.Errno = 566\n\tERROR_PAGEFILE_QUOTA_EXCEEDED                                             syscall.Errno = 567\n\tERROR_LOGON_SERVER_CONFLICT                                               syscall.Errno = 568\n\tERROR_SYNCHRONIZATION_REQUIRED                                            syscall.Errno = 569\n\tERROR_NET_OPEN_FAILED                                                     syscall.Errno = 570\n\tERROR_IO_PRIVILEGE_FAILED                                                 syscall.Errno = 571\n\tERROR_CONTROL_C_EXIT                                                      syscall.Errno = 572\n\tERROR_MISSING_SYSTEMFILE                                                  syscall.Errno = 573\n\tERROR_UNHANDLED_EXCEPTION                                                 syscall.Errno = 574\n\tERROR_APP_INIT_FAILURE                                                    syscall.Errno = 575\n\tERROR_PAGEFILE_CREATE_FAILED                                              syscall.Errno = 576\n\tERROR_INVALID_IMAGE_HASH                                                  syscall.Errno = 577\n\tERROR_NO_PAGEFILE                                                         syscall.Errno = 578\n\tERROR_ILLEGAL_FLOAT_CONTEXT                                               syscall.Errno = 579\n\tERROR_NO_EVENT_PAIR                                                       syscall.Errno = 580\n\tERROR_DOMAIN_CTRLR_CONFIG_ERROR                                           syscall.Errno = 581\n\tERROR_ILLEGAL_CHARACTER                                                   syscall.Errno = 582\n\tERROR_UNDEFINED_CHARACTER                                                 syscall.Errno = 583\n\tERROR_FLOPPY_VOLUME                                                       syscall.Errno = 584\n\tERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT                                    syscall.Errno = 585\n\tERROR_BACKUP_CONTROLLER                                                   syscall.Errno = 586\n\tERROR_MUTANT_LIMIT_EXCEEDED                                               syscall.Errno = 587\n\tERROR_FS_DRIVER_REQUIRED                                                  syscall.Errno = 588\n\tERROR_CANNOT_LOAD_REGISTRY_FILE                                           syscall.Errno = 589\n\tERROR_DEBUG_ATTACH_FAILED                                                 syscall.Errno = 590\n\tERROR_SYSTEM_PROCESS_TERMINATED                                           syscall.Errno = 591\n\tERROR_DATA_NOT_ACCEPTED                                                   syscall.Errno = 592\n\tERROR_VDM_HARD_ERROR                                                      syscall.Errno = 593\n\tERROR_DRIVER_CANCEL_TIMEOUT                                               syscall.Errno = 594\n\tERROR_REPLY_MESSAGE_MISMATCH                                              syscall.Errno = 595\n\tERROR_LOST_WRITEBEHIND_DATA                                               syscall.Errno = 596\n\tERROR_CLIENT_SERVER_PARAMETERS_INVALID                                    syscall.Errno = 597\n\tERROR_NOT_TINY_STREAM                                                     syscall.Errno = 598\n\tERROR_STACK_OVERFLOW_READ                                                 syscall.Errno = 599\n\tERROR_CONVERT_TO_LARGE                                                    syscall.Errno = 600\n\tERROR_FOUND_OUT_OF_SCOPE                                                  syscall.Errno = 601\n\tERROR_ALLOCATE_BUCKET                                                     syscall.Errno = 602\n\tERROR_MARSHALL_OVERFLOW                                                   syscall.Errno = 603\n\tERROR_INVALID_VARIANT                                                     syscall.Errno = 604\n\tERROR_BAD_COMPRESSION_BUFFER                                              syscall.Errno = 605\n\tERROR_AUDIT_FAILED                                                        syscall.Errno = 606\n\tERROR_TIMER_RESOLUTION_NOT_SET                                            syscall.Errno = 607\n\tERROR_INSUFFICIENT_LOGON_INFO                                             syscall.Errno = 608\n\tERROR_BAD_DLL_ENTRYPOINT                                                  syscall.Errno = 609\n\tERROR_BAD_SERVICE_ENTRYPOINT                                              syscall.Errno = 610\n\tERROR_IP_ADDRESS_CONFLICT1                                                syscall.Errno = 611\n\tERROR_IP_ADDRESS_CONFLICT2                                                syscall.Errno = 612\n\tERROR_REGISTRY_QUOTA_LIMIT                                                syscall.Errno = 613\n\tERROR_NO_CALLBACK_ACTIVE                                                  syscall.Errno = 614\n\tERROR_PWD_TOO_SHORT                                                       syscall.Errno = 615\n\tERROR_PWD_TOO_RECENT                                                      syscall.Errno = 616\n\tERROR_PWD_HISTORY_CONFLICT                                                syscall.Errno = 617\n\tERROR_UNSUPPORTED_COMPRESSION                                             syscall.Errno = 618\n\tERROR_INVALID_HW_PROFILE                                                  syscall.Errno = 619\n\tERROR_INVALID_PLUGPLAY_DEVICE_PATH                                        syscall.Errno = 620\n\tERROR_QUOTA_LIST_INCONSISTENT                                             syscall.Errno = 621\n\tERROR_EVALUATION_EXPIRATION                                               syscall.Errno = 622\n\tERROR_ILLEGAL_DLL_RELOCATION                                              syscall.Errno = 623\n\tERROR_DLL_INIT_FAILED_LOGOFF                                              syscall.Errno = 624\n\tERROR_VALIDATE_CONTINUE                                                   syscall.Errno = 625\n\tERROR_NO_MORE_MATCHES                                                     syscall.Errno = 626\n\tERROR_RANGE_LIST_CONFLICT                                                 syscall.Errno = 627\n\tERROR_SERVER_SID_MISMATCH                                                 syscall.Errno = 628\n\tERROR_CANT_ENABLE_DENY_ONLY                                               syscall.Errno = 629\n\tERROR_FLOAT_MULTIPLE_FAULTS                                               syscall.Errno = 630\n\tERROR_FLOAT_MULTIPLE_TRAPS                                                syscall.Errno = 631\n\tERROR_NOINTERFACE                                                         syscall.Errno = 632\n\tERROR_DRIVER_FAILED_SLEEP                                                 syscall.Errno = 633\n\tERROR_CORRUPT_SYSTEM_FILE                                                 syscall.Errno = 634\n\tERROR_COMMITMENT_MINIMUM                                                  syscall.Errno = 635\n\tERROR_PNP_RESTART_ENUMERATION                                             syscall.Errno = 636\n\tERROR_SYSTEM_IMAGE_BAD_SIGNATURE                                          syscall.Errno = 637\n\tERROR_PNP_REBOOT_REQUIRED                                                 syscall.Errno = 638\n\tERROR_INSUFFICIENT_POWER                                                  syscall.Errno = 639\n\tERROR_MULTIPLE_FAULT_VIOLATION                                            syscall.Errno = 640\n\tERROR_SYSTEM_SHUTDOWN                                                     syscall.Errno = 641\n\tERROR_PORT_NOT_SET                                                        syscall.Errno = 642\n\tERROR_DS_VERSION_CHECK_FAILURE                                            syscall.Errno = 643\n\tERROR_RANGE_NOT_FOUND                                                     syscall.Errno = 644\n\tERROR_NOT_SAFE_MODE_DRIVER                                                syscall.Errno = 646\n\tERROR_FAILED_DRIVER_ENTRY                                                 syscall.Errno = 647\n\tERROR_DEVICE_ENUMERATION_ERROR                                            syscall.Errno = 648\n\tERROR_MOUNT_POINT_NOT_RESOLVED                                            syscall.Errno = 649\n\tERROR_INVALID_DEVICE_OBJECT_PARAMETER                                     syscall.Errno = 650\n\tERROR_MCA_OCCURED                                                         syscall.Errno = 651\n\tERROR_DRIVER_DATABASE_ERROR                                               syscall.Errno = 652\n\tERROR_SYSTEM_HIVE_TOO_LARGE                                               syscall.Errno = 653\n\tERROR_DRIVER_FAILED_PRIOR_UNLOAD                                          syscall.Errno = 654\n\tERROR_VOLSNAP_PREPARE_HIBERNATE                                           syscall.Errno = 655\n\tERROR_HIBERNATION_FAILURE                                                 syscall.Errno = 656\n\tERROR_PWD_TOO_LONG                                                        syscall.Errno = 657\n\tERROR_FILE_SYSTEM_LIMITATION                                              syscall.Errno = 665\n\tERROR_ASSERTION_FAILURE                                                   syscall.Errno = 668\n\tERROR_ACPI_ERROR                                                          syscall.Errno = 669\n\tERROR_WOW_ASSERTION                                                       syscall.Errno = 670\n\tERROR_PNP_BAD_MPS_TABLE                                                   syscall.Errno = 671\n\tERROR_PNP_TRANSLATION_FAILED                                              syscall.Errno = 672\n\tERROR_PNP_IRQ_TRANSLATION_FAILED                                          syscall.Errno = 673\n\tERROR_PNP_INVALID_ID                                                      syscall.Errno = 674\n\tERROR_WAKE_SYSTEM_DEBUGGER                                                syscall.Errno = 675\n\tERROR_HANDLES_CLOSED                                                      syscall.Errno = 676\n\tERROR_EXTRANEOUS_INFORMATION                                              syscall.Errno = 677\n\tERROR_RXACT_COMMIT_NECESSARY                                              syscall.Errno = 678\n\tERROR_MEDIA_CHECK                                                         syscall.Errno = 679\n\tERROR_GUID_SUBSTITUTION_MADE                                              syscall.Errno = 680\n\tERROR_STOPPED_ON_SYMLINK                                                  syscall.Errno = 681\n\tERROR_LONGJUMP                                                            syscall.Errno = 682\n\tERROR_PLUGPLAY_QUERY_VETOED                                               syscall.Errno = 683\n\tERROR_UNWIND_CONSOLIDATE                                                  syscall.Errno = 684\n\tERROR_REGISTRY_HIVE_RECOVERED                                             syscall.Errno = 685\n\tERROR_DLL_MIGHT_BE_INSECURE                                               syscall.Errno = 686\n\tERROR_DLL_MIGHT_BE_INCOMPATIBLE                                           syscall.Errno = 687\n\tERROR_DBG_EXCEPTION_NOT_HANDLED                                           syscall.Errno = 688\n\tERROR_DBG_REPLY_LATER                                                     syscall.Errno = 689\n\tERROR_DBG_UNABLE_TO_PROVIDE_HANDLE                                        syscall.Errno = 690\n\tERROR_DBG_TERMINATE_THREAD                                                syscall.Errno = 691\n\tERROR_DBG_TERMINATE_PROCESS                                               syscall.Errno = 692\n\tERROR_DBG_CONTROL_C                                                       syscall.Errno = 693\n\tERROR_DBG_PRINTEXCEPTION_C                                                syscall.Errno = 694\n\tERROR_DBG_RIPEXCEPTION                                                    syscall.Errno = 695\n\tERROR_DBG_CONTROL_BREAK                                                   syscall.Errno = 696\n\tERROR_DBG_COMMAND_EXCEPTION                                               syscall.Errno = 697\n\tERROR_OBJECT_NAME_EXISTS                                                  syscall.Errno = 698\n\tERROR_THREAD_WAS_SUSPENDED                                                syscall.Errno = 699\n\tERROR_IMAGE_NOT_AT_BASE                                                   syscall.Errno = 700\n\tERROR_RXACT_STATE_CREATED                                                 syscall.Errno = 701\n\tERROR_SEGMENT_NOTIFICATION                                                syscall.Errno = 702\n\tERROR_BAD_CURRENT_DIRECTORY                                               syscall.Errno = 703\n\tERROR_FT_READ_RECOVERY_FROM_BACKUP                                        syscall.Errno = 704\n\tERROR_FT_WRITE_RECOVERY                                                   syscall.Errno = 705\n\tERROR_IMAGE_MACHINE_TYPE_MISMATCH                                         syscall.Errno = 706\n\tERROR_RECEIVE_PARTIAL                                                     syscall.Errno = 707\n\tERROR_RECEIVE_EXPEDITED                                                   syscall.Errno = 708\n\tERROR_RECEIVE_PARTIAL_EXPEDITED                                           syscall.Errno = 709\n\tERROR_EVENT_DONE                                                          syscall.Errno = 710\n\tERROR_EVENT_PENDING                                                       syscall.Errno = 711\n\tERROR_CHECKING_FILE_SYSTEM                                                syscall.Errno = 712\n\tERROR_FATAL_APP_EXIT                                                      syscall.Errno = 713\n\tERROR_PREDEFINED_HANDLE                                                   syscall.Errno = 714\n\tERROR_WAS_UNLOCKED                                                        syscall.Errno = 715\n\tERROR_SERVICE_NOTIFICATION                                                syscall.Errno = 716\n\tERROR_WAS_LOCKED                                                          syscall.Errno = 717\n\tERROR_LOG_HARD_ERROR                                                      syscall.Errno = 718\n\tERROR_ALREADY_WIN32                                                       syscall.Errno = 719\n\tERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE                                     syscall.Errno = 720\n\tERROR_NO_YIELD_PERFORMED                                                  syscall.Errno = 721\n\tERROR_TIMER_RESUME_IGNORED                                                syscall.Errno = 722\n\tERROR_ARBITRATION_UNHANDLED                                               syscall.Errno = 723\n\tERROR_CARDBUS_NOT_SUPPORTED                                               syscall.Errno = 724\n\tERROR_MP_PROCESSOR_MISMATCH                                               syscall.Errno = 725\n\tERROR_HIBERNATED                                                          syscall.Errno = 726\n\tERROR_RESUME_HIBERNATION                                                  syscall.Errno = 727\n\tERROR_FIRMWARE_UPDATED                                                    syscall.Errno = 728\n\tERROR_DRIVERS_LEAKING_LOCKED_PAGES                                        syscall.Errno = 729\n\tERROR_WAKE_SYSTEM                                                         syscall.Errno = 730\n\tERROR_WAIT_1                                                              syscall.Errno = 731\n\tERROR_WAIT_2                                                              syscall.Errno = 732\n\tERROR_WAIT_3                                                              syscall.Errno = 733\n\tERROR_WAIT_63                                                             syscall.Errno = 734\n\tERROR_ABANDONED_WAIT_0                                                    syscall.Errno = 735\n\tERROR_ABANDONED_WAIT_63                                                   syscall.Errno = 736\n\tERROR_USER_APC                                                            syscall.Errno = 737\n\tERROR_KERNEL_APC                                                          syscall.Errno = 738\n\tERROR_ALERTED                                                             syscall.Errno = 739\n\tERROR_ELEVATION_REQUIRED                                                  syscall.Errno = 740\n\tERROR_REPARSE                                                             syscall.Errno = 741\n\tERROR_OPLOCK_BREAK_IN_PROGRESS                                            syscall.Errno = 742\n\tERROR_VOLUME_MOUNTED                                                      syscall.Errno = 743\n\tERROR_RXACT_COMMITTED                                                     syscall.Errno = 744\n\tERROR_NOTIFY_CLEANUP                                                      syscall.Errno = 745\n\tERROR_PRIMARY_TRANSPORT_CONNECT_FAILED                                    syscall.Errno = 746\n\tERROR_PAGE_FAULT_TRANSITION                                               syscall.Errno = 747\n\tERROR_PAGE_FAULT_DEMAND_ZERO                                              syscall.Errno = 748\n\tERROR_PAGE_FAULT_COPY_ON_WRITE                                            syscall.Errno = 749\n\tERROR_PAGE_FAULT_GUARD_PAGE                                               syscall.Errno = 750\n\tERROR_PAGE_FAULT_PAGING_FILE                                              syscall.Errno = 751\n\tERROR_CACHE_PAGE_LOCKED                                                   syscall.Errno = 752\n\tERROR_CRASH_DUMP                                                          syscall.Errno = 753\n\tERROR_BUFFER_ALL_ZEROS                                                    syscall.Errno = 754\n\tERROR_REPARSE_OBJECT                                                      syscall.Errno = 755\n\tERROR_RESOURCE_REQUIREMENTS_CHANGED                                       syscall.Errno = 756\n\tERROR_TRANSLATION_COMPLETE                                                syscall.Errno = 757\n\tERROR_NOTHING_TO_TERMINATE                                                syscall.Errno = 758\n\tERROR_PROCESS_NOT_IN_JOB                                                  syscall.Errno = 759\n\tERROR_PROCESS_IN_JOB                                                      syscall.Errno = 760\n\tERROR_VOLSNAP_HIBERNATE_READY                                             syscall.Errno = 761\n\tERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY                                  syscall.Errno = 762\n\tERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED                                  syscall.Errno = 763\n\tERROR_INTERRUPT_STILL_CONNECTED                                           syscall.Errno = 764\n\tERROR_WAIT_FOR_OPLOCK                                                     syscall.Errno = 765\n\tERROR_DBG_EXCEPTION_HANDLED                                               syscall.Errno = 766\n\tERROR_DBG_CONTINUE                                                        syscall.Errno = 767\n\tERROR_CALLBACK_POP_STACK                                                  syscall.Errno = 768\n\tERROR_COMPRESSION_DISABLED                                                syscall.Errno = 769\n\tERROR_CANTFETCHBACKWARDS                                                  syscall.Errno = 770\n\tERROR_CANTSCROLLBACKWARDS                                                 syscall.Errno = 771\n\tERROR_ROWSNOTRELEASED                                                     syscall.Errno = 772\n\tERROR_BAD_ACCESSOR_FLAGS                                                  syscall.Errno = 773\n\tERROR_ERRORS_ENCOUNTERED                                                  syscall.Errno = 774\n\tERROR_NOT_CAPABLE                                                         syscall.Errno = 775\n\tERROR_REQUEST_OUT_OF_SEQUENCE                                             syscall.Errno = 776\n\tERROR_VERSION_PARSE_ERROR                                                 syscall.Errno = 777\n\tERROR_BADSTARTPOSITION                                                    syscall.Errno = 778\n\tERROR_MEMORY_HARDWARE                                                     syscall.Errno = 779\n\tERROR_DISK_REPAIR_DISABLED                                                syscall.Errno = 780\n\tERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE             syscall.Errno = 781\n\tERROR_SYSTEM_POWERSTATE_TRANSITION                                        syscall.Errno = 782\n\tERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION                                syscall.Errno = 783\n\tERROR_MCA_EXCEPTION                                                       syscall.Errno = 784\n\tERROR_ACCESS_AUDIT_BY_POLICY                                              syscall.Errno = 785\n\tERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY                               syscall.Errno = 786\n\tERROR_ABANDON_HIBERFILE                                                   syscall.Errno = 787\n\tERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED                          syscall.Errno = 788\n\tERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR                          syscall.Errno = 789\n\tERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR                              syscall.Errno = 790\n\tERROR_BAD_MCFG_TABLE                                                      syscall.Errno = 791\n\tERROR_DISK_REPAIR_REDIRECTED                                              syscall.Errno = 792\n\tERROR_DISK_REPAIR_UNSUCCESSFUL                                            syscall.Errno = 793\n\tERROR_CORRUPT_LOG_OVERFULL                                                syscall.Errno = 794\n\tERROR_CORRUPT_LOG_CORRUPTED                                               syscall.Errno = 795\n\tERROR_CORRUPT_LOG_UNAVAILABLE                                             syscall.Errno = 796\n\tERROR_CORRUPT_LOG_DELETED_FULL                                            syscall.Errno = 797\n\tERROR_CORRUPT_LOG_CLEARED                                                 syscall.Errno = 798\n\tERROR_ORPHAN_NAME_EXHAUSTED                                               syscall.Errno = 799\n\tERROR_OPLOCK_SWITCHED_TO_NEW_HANDLE                                       syscall.Errno = 800\n\tERROR_CANNOT_GRANT_REQUESTED_OPLOCK                                       syscall.Errno = 801\n\tERROR_CANNOT_BREAK_OPLOCK                                                 syscall.Errno = 802\n\tERROR_OPLOCK_HANDLE_CLOSED                                                syscall.Errno = 803\n\tERROR_NO_ACE_CONDITION                                                    syscall.Errno = 804\n\tERROR_INVALID_ACE_CONDITION                                               syscall.Errno = 805\n\tERROR_FILE_HANDLE_REVOKED                                                 syscall.Errno = 806\n\tERROR_IMAGE_AT_DIFFERENT_BASE                                             syscall.Errno = 807\n\tERROR_ENCRYPTED_IO_NOT_POSSIBLE                                           syscall.Errno = 808\n\tERROR_FILE_METADATA_OPTIMIZATION_IN_PROGRESS                              syscall.Errno = 809\n\tERROR_QUOTA_ACTIVITY                                                      syscall.Errno = 810\n\tERROR_HANDLE_REVOKED                                                      syscall.Errno = 811\n\tERROR_CALLBACK_INVOKE_INLINE                                              syscall.Errno = 812\n\tERROR_CPU_SET_INVALID                                                     syscall.Errno = 813\n\tERROR_ENCLAVE_NOT_TERMINATED                                              syscall.Errno = 814\n\tERROR_ENCLAVE_VIOLATION                                                   syscall.Errno = 815\n\tERROR_EA_ACCESS_DENIED                                                    syscall.Errno = 994\n\tERROR_OPERATION_ABORTED                                                   syscall.Errno = 995\n\tERROR_IO_INCOMPLETE                                                       syscall.Errno = 996\n\tERROR_IO_PENDING                                                          syscall.Errno = 997\n\tERROR_NOACCESS                                                            syscall.Errno = 998\n\tERROR_SWAPERROR                                                           syscall.Errno = 999\n\tERROR_STACK_OVERFLOW                                                      syscall.Errno = 1001\n\tERROR_INVALID_MESSAGE                                                     syscall.Errno = 1002\n\tERROR_CAN_NOT_COMPLETE                                                    syscall.Errno = 1003\n\tERROR_INVALID_FLAGS                                                       syscall.Errno = 1004\n\tERROR_UNRECOGNIZED_VOLUME                                                 syscall.Errno = 1005\n\tERROR_FILE_INVALID                                                        syscall.Errno = 1006\n\tERROR_FULLSCREEN_MODE                                                     syscall.Errno = 1007\n\tERROR_NO_TOKEN                                                            syscall.Errno = 1008\n\tERROR_BADDB                                                               syscall.Errno = 1009\n\tERROR_BADKEY                                                              syscall.Errno = 1010\n\tERROR_CANTOPEN                                                            syscall.Errno = 1011\n\tERROR_CANTREAD                                                            syscall.Errno = 1012\n\tERROR_CANTWRITE                                                           syscall.Errno = 1013\n\tERROR_REGISTRY_RECOVERED                                                  syscall.Errno = 1014\n\tERROR_REGISTRY_CORRUPT                                                    syscall.Errno = 1015\n\tERROR_REGISTRY_IO_FAILED                                                  syscall.Errno = 1016\n\tERROR_NOT_REGISTRY_FILE                                                   syscall.Errno = 1017\n\tERROR_KEY_DELETED                                                         syscall.Errno = 1018\n\tERROR_NO_LOG_SPACE                                                        syscall.Errno = 1019\n\tERROR_KEY_HAS_CHILDREN                                                    syscall.Errno = 1020\n\tERROR_CHILD_MUST_BE_VOLATILE                                              syscall.Errno = 1021\n\tERROR_NOTIFY_ENUM_DIR                                                     syscall.Errno = 1022\n\tERROR_DEPENDENT_SERVICES_RUNNING                                          syscall.Errno = 1051\n\tERROR_INVALID_SERVICE_CONTROL                                             syscall.Errno = 1052\n\tERROR_SERVICE_REQUEST_TIMEOUT                                             syscall.Errno = 1053\n\tERROR_SERVICE_NO_THREAD                                                   syscall.Errno = 1054\n\tERROR_SERVICE_DATABASE_LOCKED                                             syscall.Errno = 1055\n\tERROR_SERVICE_ALREADY_RUNNING                                             syscall.Errno = 1056\n\tERROR_INVALID_SERVICE_ACCOUNT                                             syscall.Errno = 1057\n\tERROR_SERVICE_DISABLED                                                    syscall.Errno = 1058\n\tERROR_CIRCULAR_DEPENDENCY                                                 syscall.Errno = 1059\n\tERROR_SERVICE_DOES_NOT_EXIST                                              syscall.Errno = 1060\n\tERROR_SERVICE_CANNOT_ACCEPT_CTRL                                          syscall.Errno = 1061\n\tERROR_SERVICE_NOT_ACTIVE                                                  syscall.Errno = 1062\n\tERROR_FAILED_SERVICE_CONTROLLER_CONNECT                                   syscall.Errno = 1063\n\tERROR_EXCEPTION_IN_SERVICE                                                syscall.Errno = 1064\n\tERROR_DATABASE_DOES_NOT_EXIST                                             syscall.Errno = 1065\n\tERROR_SERVICE_SPECIFIC_ERROR                                              syscall.Errno = 1066\n\tERROR_PROCESS_ABORTED                                                     syscall.Errno = 1067\n\tERROR_SERVICE_DEPENDENCY_FAIL                                             syscall.Errno = 1068\n\tERROR_SERVICE_LOGON_FAILED                                                syscall.Errno = 1069\n\tERROR_SERVICE_START_HANG                                                  syscall.Errno = 1070\n\tERROR_INVALID_SERVICE_LOCK                                                syscall.Errno = 1071\n\tERROR_SERVICE_MARKED_FOR_DELETE                                           syscall.Errno = 1072\n\tERROR_SERVICE_EXISTS                                                      syscall.Errno = 1073\n\tERROR_ALREADY_RUNNING_LKG                                                 syscall.Errno = 1074\n\tERROR_SERVICE_DEPENDENCY_DELETED                                          syscall.Errno = 1075\n\tERROR_BOOT_ALREADY_ACCEPTED                                               syscall.Errno = 1076\n\tERROR_SERVICE_NEVER_STARTED                                               syscall.Errno = 1077\n\tERROR_DUPLICATE_SERVICE_NAME                                              syscall.Errno = 1078\n\tERROR_DIFFERENT_SERVICE_ACCOUNT                                           syscall.Errno = 1079\n\tERROR_CANNOT_DETECT_DRIVER_FAILURE                                        syscall.Errno = 1080\n\tERROR_CANNOT_DETECT_PROCESS_ABORT                                         syscall.Errno = 1081\n\tERROR_NO_RECOVERY_PROGRAM                                                 syscall.Errno = 1082\n\tERROR_SERVICE_NOT_IN_EXE                                                  syscall.Errno = 1083\n\tERROR_NOT_SAFEBOOT_SERVICE                                                syscall.Errno = 1084\n\tERROR_END_OF_MEDIA                                                        syscall.Errno = 1100\n\tERROR_FILEMARK_DETECTED                                                   syscall.Errno = 1101\n\tERROR_BEGINNING_OF_MEDIA                                                  syscall.Errno = 1102\n\tERROR_SETMARK_DETECTED                                                    syscall.Errno = 1103\n\tERROR_NO_DATA_DETECTED                                                    syscall.Errno = 1104\n\tERROR_PARTITION_FAILURE                                                   syscall.Errno = 1105\n\tERROR_INVALID_BLOCK_LENGTH                                                syscall.Errno = 1106\n\tERROR_DEVICE_NOT_PARTITIONED                                              syscall.Errno = 1107\n\tERROR_UNABLE_TO_LOCK_MEDIA                                                syscall.Errno = 1108\n\tERROR_UNABLE_TO_UNLOAD_MEDIA                                              syscall.Errno = 1109\n\tERROR_MEDIA_CHANGED                                                       syscall.Errno = 1110\n\tERROR_BUS_RESET                                                           syscall.Errno = 1111\n\tERROR_NO_MEDIA_IN_DRIVE                                                   syscall.Errno = 1112\n\tERROR_NO_UNICODE_TRANSLATION                                              syscall.Errno = 1113\n\tERROR_DLL_INIT_FAILED                                                     syscall.Errno = 1114\n\tERROR_SHUTDOWN_IN_PROGRESS                                                syscall.Errno = 1115\n\tERROR_NO_SHUTDOWN_IN_PROGRESS                                             syscall.Errno = 1116\n\tERROR_IO_DEVICE                                                           syscall.Errno = 1117\n\tERROR_SERIAL_NO_DEVICE                                                    syscall.Errno = 1118\n\tERROR_IRQ_BUSY                                                            syscall.Errno = 1119\n\tERROR_MORE_WRITES                                                         syscall.Errno = 1120\n\tERROR_COUNTER_TIMEOUT                                                     syscall.Errno = 1121\n\tERROR_FLOPPY_ID_MARK_NOT_FOUND                                            syscall.Errno = 1122\n\tERROR_FLOPPY_WRONG_CYLINDER                                               syscall.Errno = 1123\n\tERROR_FLOPPY_UNKNOWN_ERROR                                                syscall.Errno = 1124\n\tERROR_FLOPPY_BAD_REGISTERS                                                syscall.Errno = 1125\n\tERROR_DISK_RECALIBRATE_FAILED                                             syscall.Errno = 1126\n\tERROR_DISK_OPERATION_FAILED                                               syscall.Errno = 1127\n\tERROR_DISK_RESET_FAILED                                                   syscall.Errno = 1128\n\tERROR_EOM_OVERFLOW                                                        syscall.Errno = 1129\n\tERROR_NOT_ENOUGH_SERVER_MEMORY                                            syscall.Errno = 1130\n\tERROR_POSSIBLE_DEADLOCK                                                   syscall.Errno = 1131\n\tERROR_MAPPED_ALIGNMENT                                                    syscall.Errno = 1132\n\tERROR_SET_POWER_STATE_VETOED                                              syscall.Errno = 1140\n\tERROR_SET_POWER_STATE_FAILED                                              syscall.Errno = 1141\n\tERROR_TOO_MANY_LINKS                                                      syscall.Errno = 1142\n\tERROR_OLD_WIN_VERSION                                                     syscall.Errno = 1150\n\tERROR_APP_WRONG_OS                                                        syscall.Errno = 1151\n\tERROR_SINGLE_INSTANCE_APP                                                 syscall.Errno = 1152\n\tERROR_RMODE_APP                                                           syscall.Errno = 1153\n\tERROR_INVALID_DLL                                                         syscall.Errno = 1154\n\tERROR_NO_ASSOCIATION                                                      syscall.Errno = 1155\n\tERROR_DDE_FAIL                                                            syscall.Errno = 1156\n\tERROR_DLL_NOT_FOUND                                                       syscall.Errno = 1157\n\tERROR_NO_MORE_USER_HANDLES                                                syscall.Errno = 1158\n\tERROR_MESSAGE_SYNC_ONLY                                                   syscall.Errno = 1159\n\tERROR_SOURCE_ELEMENT_EMPTY                                                syscall.Errno = 1160\n\tERROR_DESTINATION_ELEMENT_FULL                                            syscall.Errno = 1161\n\tERROR_ILLEGAL_ELEMENT_ADDRESS                                             syscall.Errno = 1162\n\tERROR_MAGAZINE_NOT_PRESENT                                                syscall.Errno = 1163\n\tERROR_DEVICE_REINITIALIZATION_NEEDED                                      syscall.Errno = 1164\n\tERROR_DEVICE_REQUIRES_CLEANING                                            syscall.Errno = 1165\n\tERROR_DEVICE_DOOR_OPEN                                                    syscall.Errno = 1166\n\tERROR_DEVICE_NOT_CONNECTED                                                syscall.Errno = 1167\n\tERROR_NOT_FOUND                                                           syscall.Errno = 1168\n\tERROR_NO_MATCH                                                            syscall.Errno = 1169\n\tERROR_SET_NOT_FOUND                                                       syscall.Errno = 1170\n\tERROR_POINT_NOT_FOUND                                                     syscall.Errno = 1171\n\tERROR_NO_TRACKING_SERVICE                                                 syscall.Errno = 1172\n\tERROR_NO_VOLUME_ID                                                        syscall.Errno = 1173\n\tERROR_UNABLE_TO_REMOVE_REPLACED                                           syscall.Errno = 1175\n\tERROR_UNABLE_TO_MOVE_REPLACEMENT                                          syscall.Errno = 1176\n\tERROR_UNABLE_TO_MOVE_REPLACEMENT_2                                        syscall.Errno = 1177\n\tERROR_JOURNAL_DELETE_IN_PROGRESS                                          syscall.Errno = 1178\n\tERROR_JOURNAL_NOT_ACTIVE                                                  syscall.Errno = 1179\n\tERROR_POTENTIAL_FILE_FOUND                                                syscall.Errno = 1180\n\tERROR_JOURNAL_ENTRY_DELETED                                               syscall.Errno = 1181\n\tERROR_SHUTDOWN_IS_SCHEDULED                                               syscall.Errno = 1190\n\tERROR_SHUTDOWN_USERS_LOGGED_ON                                            syscall.Errno = 1191\n\tERROR_BAD_DEVICE                                                          syscall.Errno = 1200\n\tERROR_CONNECTION_UNAVAIL                                                  syscall.Errno = 1201\n\tERROR_DEVICE_ALREADY_REMEMBERED                                           syscall.Errno = 1202\n\tERROR_NO_NET_OR_BAD_PATH                                                  syscall.Errno = 1203\n\tERROR_BAD_PROVIDER                                                        syscall.Errno = 1204\n\tERROR_CANNOT_OPEN_PROFILE                                                 syscall.Errno = 1205\n\tERROR_BAD_PROFILE                                                         syscall.Errno = 1206\n\tERROR_NOT_CONTAINER                                                       syscall.Errno = 1207\n\tERROR_EXTENDED_ERROR                                                      syscall.Errno = 1208\n\tERROR_INVALID_GROUPNAME                                                   syscall.Errno = 1209\n\tERROR_INVALID_COMPUTERNAME                                                syscall.Errno = 1210\n\tERROR_INVALID_EVENTNAME                                                   syscall.Errno = 1211\n\tERROR_INVALID_DOMAINNAME                                                  syscall.Errno = 1212\n\tERROR_INVALID_SERVICENAME                                                 syscall.Errno = 1213\n\tERROR_INVALID_NETNAME                                                     syscall.Errno = 1214\n\tERROR_INVALID_SHARENAME                                                   syscall.Errno = 1215\n\tERROR_INVALID_PASSWORDNAME                                                syscall.Errno = 1216\n\tERROR_INVALID_MESSAGENAME                                                 syscall.Errno = 1217\n\tERROR_INVALID_MESSAGEDEST                                                 syscall.Errno = 1218\n\tERROR_SESSION_CREDENTIAL_CONFLICT                                         syscall.Errno = 1219\n\tERROR_REMOTE_SESSION_LIMIT_EXCEEDED                                       syscall.Errno = 1220\n\tERROR_DUP_DOMAINNAME                                                      syscall.Errno = 1221\n\tERROR_NO_NETWORK                                                          syscall.Errno = 1222\n\tERROR_CANCELLED                                                           syscall.Errno = 1223\n\tERROR_USER_MAPPED_FILE                                                    syscall.Errno = 1224\n\tERROR_CONNECTION_REFUSED                                                  syscall.Errno = 1225\n\tERROR_GRACEFUL_DISCONNECT                                                 syscall.Errno = 1226\n\tERROR_ADDRESS_ALREADY_ASSOCIATED                                          syscall.Errno = 1227\n\tERROR_ADDRESS_NOT_ASSOCIATED                                              syscall.Errno = 1228\n\tERROR_CONNECTION_INVALID                                                  syscall.Errno = 1229\n\tERROR_CONNECTION_ACTIVE                                                   syscall.Errno = 1230\n\tERROR_NETWORK_UNREACHABLE                                                 syscall.Errno = 1231\n\tERROR_HOST_UNREACHABLE                                                    syscall.Errno = 1232\n\tERROR_PROTOCOL_UNREACHABLE                                                syscall.Errno = 1233\n\tERROR_PORT_UNREACHABLE                                                    syscall.Errno = 1234\n\tERROR_REQUEST_ABORTED                                                     syscall.Errno = 1235\n\tERROR_CONNECTION_ABORTED                                                  syscall.Errno = 1236\n\tERROR_RETRY                                                               syscall.Errno = 1237\n\tERROR_CONNECTION_COUNT_LIMIT                                              syscall.Errno = 1238\n\tERROR_LOGIN_TIME_RESTRICTION                                              syscall.Errno = 1239\n\tERROR_LOGIN_WKSTA_RESTRICTION                                             syscall.Errno = 1240\n\tERROR_INCORRECT_ADDRESS                                                   syscall.Errno = 1241\n\tERROR_ALREADY_REGISTERED                                                  syscall.Errno = 1242\n\tERROR_SERVICE_NOT_FOUND                                                   syscall.Errno = 1243\n\tERROR_NOT_AUTHENTICATED                                                   syscall.Errno = 1244\n\tERROR_NOT_LOGGED_ON                                                       syscall.Errno = 1245\n\tERROR_CONTINUE                                                            syscall.Errno = 1246\n\tERROR_ALREADY_INITIALIZED                                                 syscall.Errno = 1247\n\tERROR_NO_MORE_DEVICES                                                     syscall.Errno = 1248\n\tERROR_NO_SUCH_SITE                                                        syscall.Errno = 1249\n\tERROR_DOMAIN_CONTROLLER_EXISTS                                            syscall.Errno = 1250\n\tERROR_ONLY_IF_CONNECTED                                                   syscall.Errno = 1251\n\tERROR_OVERRIDE_NOCHANGES                                                  syscall.Errno = 1252\n\tERROR_BAD_USER_PROFILE                                                    syscall.Errno = 1253\n\tERROR_NOT_SUPPORTED_ON_SBS                                                syscall.Errno = 1254\n\tERROR_SERVER_SHUTDOWN_IN_PROGRESS                                         syscall.Errno = 1255\n\tERROR_HOST_DOWN                                                           syscall.Errno = 1256\n\tERROR_NON_ACCOUNT_SID                                                     syscall.Errno = 1257\n\tERROR_NON_DOMAIN_SID                                                      syscall.Errno = 1258\n\tERROR_APPHELP_BLOCK                                                       syscall.Errno = 1259\n\tERROR_ACCESS_DISABLED_BY_POLICY                                           syscall.Errno = 1260\n\tERROR_REG_NAT_CONSUMPTION                                                 syscall.Errno = 1261\n\tERROR_CSCSHARE_OFFLINE                                                    syscall.Errno = 1262\n\tERROR_PKINIT_FAILURE                                                      syscall.Errno = 1263\n\tERROR_SMARTCARD_SUBSYSTEM_FAILURE                                         syscall.Errno = 1264\n\tERROR_DOWNGRADE_DETECTED                                                  syscall.Errno = 1265\n\tERROR_MACHINE_LOCKED                                                      syscall.Errno = 1271\n\tERROR_SMB_GUEST_LOGON_BLOCKED                                             syscall.Errno = 1272\n\tERROR_CALLBACK_SUPPLIED_INVALID_DATA                                      syscall.Errno = 1273\n\tERROR_SYNC_FOREGROUND_REFRESH_REQUIRED                                    syscall.Errno = 1274\n\tERROR_DRIVER_BLOCKED                                                      syscall.Errno = 1275\n\tERROR_INVALID_IMPORT_OF_NON_DLL                                           syscall.Errno = 1276\n\tERROR_ACCESS_DISABLED_WEBBLADE                                            syscall.Errno = 1277\n\tERROR_ACCESS_DISABLED_WEBBLADE_TAMPER                                     syscall.Errno = 1278\n\tERROR_RECOVERY_FAILURE                                                    syscall.Errno = 1279\n\tERROR_ALREADY_FIBER                                                       syscall.Errno = 1280\n\tERROR_ALREADY_THREAD                                                      syscall.Errno = 1281\n\tERROR_STACK_BUFFER_OVERRUN                                                syscall.Errno = 1282\n\tERROR_PARAMETER_QUOTA_EXCEEDED                                            syscall.Errno = 1283\n\tERROR_DEBUGGER_INACTIVE                                                   syscall.Errno = 1284\n\tERROR_DELAY_LOAD_FAILED                                                   syscall.Errno = 1285\n\tERROR_VDM_DISALLOWED                                                      syscall.Errno = 1286\n\tERROR_UNIDENTIFIED_ERROR                                                  syscall.Errno = 1287\n\tERROR_INVALID_CRUNTIME_PARAMETER                                          syscall.Errno = 1288\n\tERROR_BEYOND_VDL                                                          syscall.Errno = 1289\n\tERROR_INCOMPATIBLE_SERVICE_SID_TYPE                                       syscall.Errno = 1290\n\tERROR_DRIVER_PROCESS_TERMINATED                                           syscall.Errno = 1291\n\tERROR_IMPLEMENTATION_LIMIT                                                syscall.Errno = 1292\n\tERROR_PROCESS_IS_PROTECTED                                                syscall.Errno = 1293\n\tERROR_SERVICE_NOTIFY_CLIENT_LAGGING                                       syscall.Errno = 1294\n\tERROR_DISK_QUOTA_EXCEEDED                                                 syscall.Errno = 1295\n\tERROR_CONTENT_BLOCKED                                                     syscall.Errno = 1296\n\tERROR_INCOMPATIBLE_SERVICE_PRIVILEGE                                      syscall.Errno = 1297\n\tERROR_APP_HANG                                                            syscall.Errno = 1298\n\tERROR_INVALID_LABEL                                                       syscall.Errno = 1299\n\tERROR_NOT_ALL_ASSIGNED                                                    syscall.Errno = 1300\n\tERROR_SOME_NOT_MAPPED                                                     syscall.Errno = 1301\n\tERROR_NO_QUOTAS_FOR_ACCOUNT                                               syscall.Errno = 1302\n\tERROR_LOCAL_USER_SESSION_KEY                                              syscall.Errno = 1303\n\tERROR_NULL_LM_PASSWORD                                                    syscall.Errno = 1304\n\tERROR_UNKNOWN_REVISION                                                    syscall.Errno = 1305\n\tERROR_REVISION_MISMATCH                                                   syscall.Errno = 1306\n\tERROR_INVALID_OWNER                                                       syscall.Errno = 1307\n\tERROR_INVALID_PRIMARY_GROUP                                               syscall.Errno = 1308\n\tERROR_NO_IMPERSONATION_TOKEN                                              syscall.Errno = 1309\n\tERROR_CANT_DISABLE_MANDATORY                                              syscall.Errno = 1310\n\tERROR_NO_LOGON_SERVERS                                                    syscall.Errno = 1311\n\tERROR_NO_SUCH_LOGON_SESSION                                               syscall.Errno = 1312\n\tERROR_NO_SUCH_PRIVILEGE                                                   syscall.Errno = 1313\n\tERROR_PRIVILEGE_NOT_HELD                                                  syscall.Errno = 1314\n\tERROR_INVALID_ACCOUNT_NAME                                                syscall.Errno = 1315\n\tERROR_USER_EXISTS                                                         syscall.Errno = 1316\n\tERROR_NO_SUCH_USER                                                        syscall.Errno = 1317\n\tERROR_GROUP_EXISTS                                                        syscall.Errno = 1318\n\tERROR_NO_SUCH_GROUP                                                       syscall.Errno = 1319\n\tERROR_MEMBER_IN_GROUP                                                     syscall.Errno = 1320\n\tERROR_MEMBER_NOT_IN_GROUP                                                 syscall.Errno = 1321\n\tERROR_LAST_ADMIN                                                          syscall.Errno = 1322\n\tERROR_WRONG_PASSWORD                                                      syscall.Errno = 1323\n\tERROR_ILL_FORMED_PASSWORD                                                 syscall.Errno = 1324\n\tERROR_PASSWORD_RESTRICTION                                                syscall.Errno = 1325\n\tERROR_LOGON_FAILURE                                                       syscall.Errno = 1326\n\tERROR_ACCOUNT_RESTRICTION                                                 syscall.Errno = 1327\n\tERROR_INVALID_LOGON_HOURS                                                 syscall.Errno = 1328\n\tERROR_INVALID_WORKSTATION                                                 syscall.Errno = 1329\n\tERROR_PASSWORD_EXPIRED                                                    syscall.Errno = 1330\n\tERROR_ACCOUNT_DISABLED                                                    syscall.Errno = 1331\n\tERROR_NONE_MAPPED                                                         syscall.Errno = 1332\n\tERROR_TOO_MANY_LUIDS_REQUESTED                                            syscall.Errno = 1333\n\tERROR_LUIDS_EXHAUSTED                                                     syscall.Errno = 1334\n\tERROR_INVALID_SUB_AUTHORITY                                               syscall.Errno = 1335\n\tERROR_INVALID_ACL                                                         syscall.Errno = 1336\n\tERROR_INVALID_SID                                                         syscall.Errno = 1337\n\tERROR_INVALID_SECURITY_DESCR                                              syscall.Errno = 1338\n\tERROR_BAD_INHERITANCE_ACL                                                 syscall.Errno = 1340\n\tERROR_SERVER_DISABLED                                                     syscall.Errno = 1341\n\tERROR_SERVER_NOT_DISABLED                                                 syscall.Errno = 1342\n\tERROR_INVALID_ID_AUTHORITY                                                syscall.Errno = 1343\n\tERROR_ALLOTTED_SPACE_EXCEEDED                                             syscall.Errno = 1344\n\tERROR_INVALID_GROUP_ATTRIBUTES                                            syscall.Errno = 1345\n\tERROR_BAD_IMPERSONATION_LEVEL                                             syscall.Errno = 1346\n\tERROR_CANT_OPEN_ANONYMOUS                                                 syscall.Errno = 1347\n\tERROR_BAD_VALIDATION_CLASS                                                syscall.Errno = 1348\n\tERROR_BAD_TOKEN_TYPE                                                      syscall.Errno = 1349\n\tERROR_NO_SECURITY_ON_OBJECT                                               syscall.Errno = 1350\n\tERROR_CANT_ACCESS_DOMAIN_INFO                                             syscall.Errno = 1351\n\tERROR_INVALID_SERVER_STATE                                                syscall.Errno = 1352\n\tERROR_INVALID_DOMAIN_STATE                                                syscall.Errno = 1353\n\tERROR_INVALID_DOMAIN_ROLE                                                 syscall.Errno = 1354\n\tERROR_NO_SUCH_DOMAIN                                                      syscall.Errno = 1355\n\tERROR_DOMAIN_EXISTS                                                       syscall.Errno = 1356\n\tERROR_DOMAIN_LIMIT_EXCEEDED                                               syscall.Errno = 1357\n\tERROR_INTERNAL_DB_CORRUPTION                                              syscall.Errno = 1358\n\tERROR_INTERNAL_ERROR                                                      syscall.Errno = 1359\n\tERROR_GENERIC_NOT_MAPPED                                                  syscall.Errno = 1360\n\tERROR_BAD_DESCRIPTOR_FORMAT                                               syscall.Errno = 1361\n\tERROR_NOT_LOGON_PROCESS                                                   syscall.Errno = 1362\n\tERROR_LOGON_SESSION_EXISTS                                                syscall.Errno = 1363\n\tERROR_NO_SUCH_PACKAGE                                                     syscall.Errno = 1364\n\tERROR_BAD_LOGON_SESSION_STATE                                             syscall.Errno = 1365\n\tERROR_LOGON_SESSION_COLLISION                                             syscall.Errno = 1366\n\tERROR_INVALID_LOGON_TYPE                                                  syscall.Errno = 1367\n\tERROR_CANNOT_IMPERSONATE                                                  syscall.Errno = 1368\n\tERROR_RXACT_INVALID_STATE                                                 syscall.Errno = 1369\n\tERROR_RXACT_COMMIT_FAILURE                                                syscall.Errno = 1370\n\tERROR_SPECIAL_ACCOUNT                                                     syscall.Errno = 1371\n\tERROR_SPECIAL_GROUP                                                       syscall.Errno = 1372\n\tERROR_SPECIAL_USER                                                        syscall.Errno = 1373\n\tERROR_MEMBERS_PRIMARY_GROUP                                               syscall.Errno = 1374\n\tERROR_TOKEN_ALREADY_IN_USE                                                syscall.Errno = 1375\n\tERROR_NO_SUCH_ALIAS                                                       syscall.Errno = 1376\n\tERROR_MEMBER_NOT_IN_ALIAS                                                 syscall.Errno = 1377\n\tERROR_MEMBER_IN_ALIAS                                                     syscall.Errno = 1378\n\tERROR_ALIAS_EXISTS                                                        syscall.Errno = 1379\n\tERROR_LOGON_NOT_GRANTED                                                   syscall.Errno = 1380\n\tERROR_TOO_MANY_SECRETS                                                    syscall.Errno = 1381\n\tERROR_SECRET_TOO_LONG                                                     syscall.Errno = 1382\n\tERROR_INTERNAL_DB_ERROR                                                   syscall.Errno = 1383\n\tERROR_TOO_MANY_CONTEXT_IDS                                                syscall.Errno = 1384\n\tERROR_LOGON_TYPE_NOT_GRANTED                                              syscall.Errno = 1385\n\tERROR_NT_CROSS_ENCRYPTION_REQUIRED                                        syscall.Errno = 1386\n\tERROR_NO_SUCH_MEMBER                                                      syscall.Errno = 1387\n\tERROR_INVALID_MEMBER                                                      syscall.Errno = 1388\n\tERROR_TOO_MANY_SIDS                                                       syscall.Errno = 1389\n\tERROR_LM_CROSS_ENCRYPTION_REQUIRED                                        syscall.Errno = 1390\n\tERROR_NO_INHERITANCE                                                      syscall.Errno = 1391\n\tERROR_FILE_CORRUPT                                                        syscall.Errno = 1392\n\tERROR_DISK_CORRUPT                                                        syscall.Errno = 1393\n\tERROR_NO_USER_SESSION_KEY                                                 syscall.Errno = 1394\n\tERROR_LICENSE_QUOTA_EXCEEDED                                              syscall.Errno = 1395\n\tERROR_WRONG_TARGET_NAME                                                   syscall.Errno = 1396\n\tERROR_MUTUAL_AUTH_FAILED                                                  syscall.Errno = 1397\n\tERROR_TIME_SKEW                                                           syscall.Errno = 1398\n\tERROR_CURRENT_DOMAIN_NOT_ALLOWED                                          syscall.Errno = 1399\n\tERROR_INVALID_WINDOW_HANDLE                                               syscall.Errno = 1400\n\tERROR_INVALID_MENU_HANDLE                                                 syscall.Errno = 1401\n\tERROR_INVALID_CURSOR_HANDLE                                               syscall.Errno = 1402\n\tERROR_INVALID_ACCEL_HANDLE                                                syscall.Errno = 1403\n\tERROR_INVALID_HOOK_HANDLE                                                 syscall.Errno = 1404\n\tERROR_INVALID_DWP_HANDLE                                                  syscall.Errno = 1405\n\tERROR_TLW_WITH_WSCHILD                                                    syscall.Errno = 1406\n\tERROR_CANNOT_FIND_WND_CLASS                                               syscall.Errno = 1407\n\tERROR_WINDOW_OF_OTHER_THREAD                                              syscall.Errno = 1408\n\tERROR_HOTKEY_ALREADY_REGISTERED                                           syscall.Errno = 1409\n\tERROR_CLASS_ALREADY_EXISTS                                                syscall.Errno = 1410\n\tERROR_CLASS_DOES_NOT_EXIST                                                syscall.Errno = 1411\n\tERROR_CLASS_HAS_WINDOWS                                                   syscall.Errno = 1412\n\tERROR_INVALID_INDEX                                                       syscall.Errno = 1413\n\tERROR_INVALID_ICON_HANDLE                                                 syscall.Errno = 1414\n\tERROR_PRIVATE_DIALOG_INDEX                                                syscall.Errno = 1415\n\tERROR_LISTBOX_ID_NOT_FOUND                                                syscall.Errno = 1416\n\tERROR_NO_WILDCARD_CHARACTERS                                              syscall.Errno = 1417\n\tERROR_CLIPBOARD_NOT_OPEN                                                  syscall.Errno = 1418\n\tERROR_HOTKEY_NOT_REGISTERED                                               syscall.Errno = 1419\n\tERROR_WINDOW_NOT_DIALOG                                                   syscall.Errno = 1420\n\tERROR_CONTROL_ID_NOT_FOUND                                                syscall.Errno = 1421\n\tERROR_INVALID_COMBOBOX_MESSAGE                                            syscall.Errno = 1422\n\tERROR_WINDOW_NOT_COMBOBOX                                                 syscall.Errno = 1423\n\tERROR_INVALID_EDIT_HEIGHT                                                 syscall.Errno = 1424\n\tERROR_DC_NOT_FOUND                                                        syscall.Errno = 1425\n\tERROR_INVALID_HOOK_FILTER                                                 syscall.Errno = 1426\n\tERROR_INVALID_FILTER_PROC                                                 syscall.Errno = 1427\n\tERROR_HOOK_NEEDS_HMOD                                                     syscall.Errno = 1428\n\tERROR_GLOBAL_ONLY_HOOK                                                    syscall.Errno = 1429\n\tERROR_JOURNAL_HOOK_SET                                                    syscall.Errno = 1430\n\tERROR_HOOK_NOT_INSTALLED                                                  syscall.Errno = 1431\n\tERROR_INVALID_LB_MESSAGE                                                  syscall.Errno = 1432\n\tERROR_SETCOUNT_ON_BAD_LB                                                  syscall.Errno = 1433\n\tERROR_LB_WITHOUT_TABSTOPS                                                 syscall.Errno = 1434\n\tERROR_DESTROY_OBJECT_OF_OTHER_THREAD                                      syscall.Errno = 1435\n\tERROR_CHILD_WINDOW_MENU                                                   syscall.Errno = 1436\n\tERROR_NO_SYSTEM_MENU                                                      syscall.Errno = 1437\n\tERROR_INVALID_MSGBOX_STYLE                                                syscall.Errno = 1438\n\tERROR_INVALID_SPI_VALUE                                                   syscall.Errno = 1439\n\tERROR_SCREEN_ALREADY_LOCKED                                               syscall.Errno = 1440\n\tERROR_HWNDS_HAVE_DIFF_PARENT                                              syscall.Errno = 1441\n\tERROR_NOT_CHILD_WINDOW                                                    syscall.Errno = 1442\n\tERROR_INVALID_GW_COMMAND                                                  syscall.Errno = 1443\n\tERROR_INVALID_THREAD_ID                                                   syscall.Errno = 1444\n\tERROR_NON_MDICHILD_WINDOW                                                 syscall.Errno = 1445\n\tERROR_POPUP_ALREADY_ACTIVE                                                syscall.Errno = 1446\n\tERROR_NO_SCROLLBARS                                                       syscall.Errno = 1447\n\tERROR_INVALID_SCROLLBAR_RANGE                                             syscall.Errno = 1448\n\tERROR_INVALID_SHOWWIN_COMMAND                                             syscall.Errno = 1449\n\tERROR_NO_SYSTEM_RESOURCES                                                 syscall.Errno = 1450\n\tERROR_NONPAGED_SYSTEM_RESOURCES                                           syscall.Errno = 1451\n\tERROR_PAGED_SYSTEM_RESOURCES                                              syscall.Errno = 1452\n\tERROR_WORKING_SET_QUOTA                                                   syscall.Errno = 1453\n\tERROR_PAGEFILE_QUOTA                                                      syscall.Errno = 1454\n\tERROR_COMMITMENT_LIMIT                                                    syscall.Errno = 1455\n\tERROR_MENU_ITEM_NOT_FOUND                                                 syscall.Errno = 1456\n\tERROR_INVALID_KEYBOARD_HANDLE                                             syscall.Errno = 1457\n\tERROR_HOOK_TYPE_NOT_ALLOWED                                               syscall.Errno = 1458\n\tERROR_REQUIRES_INTERACTIVE_WINDOWSTATION                                  syscall.Errno = 1459\n\tERROR_TIMEOUT                                                             syscall.Errno = 1460\n\tERROR_INVALID_MONITOR_HANDLE                                              syscall.Errno = 1461\n\tERROR_INCORRECT_SIZE                                                      syscall.Errno = 1462\n\tERROR_SYMLINK_CLASS_DISABLED                                              syscall.Errno = 1463\n\tERROR_SYMLINK_NOT_SUPPORTED                                               syscall.Errno = 1464\n\tERROR_XML_PARSE_ERROR                                                     syscall.Errno = 1465\n\tERROR_XMLDSIG_ERROR                                                       syscall.Errno = 1466\n\tERROR_RESTART_APPLICATION                                                 syscall.Errno = 1467\n\tERROR_WRONG_COMPARTMENT                                                   syscall.Errno = 1468\n\tERROR_AUTHIP_FAILURE                                                      syscall.Errno = 1469\n\tERROR_NO_NVRAM_RESOURCES                                                  syscall.Errno = 1470\n\tERROR_NOT_GUI_PROCESS                                                     syscall.Errno = 1471\n\tERROR_EVENTLOG_FILE_CORRUPT                                               syscall.Errno = 1500\n\tERROR_EVENTLOG_CANT_START                                                 syscall.Errno = 1501\n\tERROR_LOG_FILE_FULL                                                       syscall.Errno = 1502\n\tERROR_EVENTLOG_FILE_CHANGED                                               syscall.Errno = 1503\n\tERROR_CONTAINER_ASSIGNED                                                  syscall.Errno = 1504\n\tERROR_JOB_NO_CONTAINER                                                    syscall.Errno = 1505\n\tERROR_INVALID_TASK_NAME                                                   syscall.Errno = 1550\n\tERROR_INVALID_TASK_INDEX                                                  syscall.Errno = 1551\n\tERROR_THREAD_ALREADY_IN_TASK                                              syscall.Errno = 1552\n\tERROR_INSTALL_SERVICE_FAILURE                                             syscall.Errno = 1601\n\tERROR_INSTALL_USEREXIT                                                    syscall.Errno = 1602\n\tERROR_INSTALL_FAILURE                                                     syscall.Errno = 1603\n\tERROR_INSTALL_SUSPEND                                                     syscall.Errno = 1604\n\tERROR_UNKNOWN_PRODUCT                                                     syscall.Errno = 1605\n\tERROR_UNKNOWN_FEATURE                                                     syscall.Errno = 1606\n\tERROR_UNKNOWN_COMPONENT                                                   syscall.Errno = 1607\n\tERROR_UNKNOWN_PROPERTY                                                    syscall.Errno = 1608\n\tERROR_INVALID_HANDLE_STATE                                                syscall.Errno = 1609\n\tERROR_BAD_CONFIGURATION                                                   syscall.Errno = 1610\n\tERROR_INDEX_ABSENT                                                        syscall.Errno = 1611\n\tERROR_INSTALL_SOURCE_ABSENT                                               syscall.Errno = 1612\n\tERROR_INSTALL_PACKAGE_VERSION                                             syscall.Errno = 1613\n\tERROR_PRODUCT_UNINSTALLED                                                 syscall.Errno = 1614\n\tERROR_BAD_QUERY_SYNTAX                                                    syscall.Errno = 1615\n\tERROR_INVALID_FIELD                                                       syscall.Errno = 1616\n\tERROR_DEVICE_REMOVED                                                      syscall.Errno = 1617\n\tERROR_INSTALL_ALREADY_RUNNING                                             syscall.Errno = 1618\n\tERROR_INSTALL_PACKAGE_OPEN_FAILED                                         syscall.Errno = 1619\n\tERROR_INSTALL_PACKAGE_INVALID                                             syscall.Errno = 1620\n\tERROR_INSTALL_UI_FAILURE                                                  syscall.Errno = 1621\n\tERROR_INSTALL_LOG_FAILURE                                                 syscall.Errno = 1622\n\tERROR_INSTALL_LANGUAGE_UNSUPPORTED                                        syscall.Errno = 1623\n\tERROR_INSTALL_TRANSFORM_FAILURE                                           syscall.Errno = 1624\n\tERROR_INSTALL_PACKAGE_REJECTED                                            syscall.Errno = 1625\n\tERROR_FUNCTION_NOT_CALLED                                                 syscall.Errno = 1626\n\tERROR_FUNCTION_FAILED                                                     syscall.Errno = 1627\n\tERROR_INVALID_TABLE                                                       syscall.Errno = 1628\n\tERROR_DATATYPE_MISMATCH                                                   syscall.Errno = 1629\n\tERROR_UNSUPPORTED_TYPE                                                    syscall.Errno = 1630\n\tERROR_CREATE_FAILED                                                       syscall.Errno = 1631\n\tERROR_INSTALL_TEMP_UNWRITABLE                                             syscall.Errno = 1632\n\tERROR_INSTALL_PLATFORM_UNSUPPORTED                                        syscall.Errno = 1633\n\tERROR_INSTALL_NOTUSED                                                     syscall.Errno = 1634\n\tERROR_PATCH_PACKAGE_OPEN_FAILED                                           syscall.Errno = 1635\n\tERROR_PATCH_PACKAGE_INVALID                                               syscall.Errno = 1636\n\tERROR_PATCH_PACKAGE_UNSUPPORTED                                           syscall.Errno = 1637\n\tERROR_PRODUCT_VERSION                                                     syscall.Errno = 1638\n\tERROR_INVALID_COMMAND_LINE                                                syscall.Errno = 1639\n\tERROR_INSTALL_REMOTE_DISALLOWED                                           syscall.Errno = 1640\n\tERROR_SUCCESS_REBOOT_INITIATED                                            syscall.Errno = 1641\n\tERROR_PATCH_TARGET_NOT_FOUND                                              syscall.Errno = 1642\n\tERROR_PATCH_PACKAGE_REJECTED                                              syscall.Errno = 1643\n\tERROR_INSTALL_TRANSFORM_REJECTED                                          syscall.Errno = 1644\n\tERROR_INSTALL_REMOTE_PROHIBITED                                           syscall.Errno = 1645\n\tERROR_PATCH_REMOVAL_UNSUPPORTED                                           syscall.Errno = 1646\n\tERROR_UNKNOWN_PATCH                                                       syscall.Errno = 1647\n\tERROR_PATCH_NO_SEQUENCE                                                   syscall.Errno = 1648\n\tERROR_PATCH_REMOVAL_DISALLOWED                                            syscall.Errno = 1649\n\tERROR_INVALID_PATCH_XML                                                   syscall.Errno = 1650\n\tERROR_PATCH_MANAGED_ADVERTISED_PRODUCT                                    syscall.Errno = 1651\n\tERROR_INSTALL_SERVICE_SAFEBOOT                                            syscall.Errno = 1652\n\tERROR_FAIL_FAST_EXCEPTION                                                 syscall.Errno = 1653\n\tERROR_INSTALL_REJECTED                                                    syscall.Errno = 1654\n\tERROR_DYNAMIC_CODE_BLOCKED                                                syscall.Errno = 1655\n\tERROR_NOT_SAME_OBJECT                                                     syscall.Errno = 1656\n\tERROR_STRICT_CFG_VIOLATION                                                syscall.Errno = 1657\n\tERROR_SET_CONTEXT_DENIED                                                  syscall.Errno = 1660\n\tERROR_CROSS_PARTITION_VIOLATION                                           syscall.Errno = 1661\n\tRPC_S_INVALID_STRING_BINDING                                              syscall.Errno = 1700\n\tRPC_S_WRONG_KIND_OF_BINDING                                               syscall.Errno = 1701\n\tRPC_S_INVALID_BINDING                                                     syscall.Errno = 1702\n\tRPC_S_PROTSEQ_NOT_SUPPORTED                                               syscall.Errno = 1703\n\tRPC_S_INVALID_RPC_PROTSEQ                                                 syscall.Errno = 1704\n\tRPC_S_INVALID_STRING_UUID                                                 syscall.Errno = 1705\n\tRPC_S_INVALID_ENDPOINT_FORMAT                                             syscall.Errno = 1706\n\tRPC_S_INVALID_NET_ADDR                                                    syscall.Errno = 1707\n\tRPC_S_NO_ENDPOINT_FOUND                                                   syscall.Errno = 1708\n\tRPC_S_INVALID_TIMEOUT                                                     syscall.Errno = 1709\n\tRPC_S_OBJECT_NOT_FOUND                                                    syscall.Errno = 1710\n\tRPC_S_ALREADY_REGISTERED                                                  syscall.Errno = 1711\n\tRPC_S_TYPE_ALREADY_REGISTERED                                             syscall.Errno = 1712\n\tRPC_S_ALREADY_LISTENING                                                   syscall.Errno = 1713\n\tRPC_S_NO_PROTSEQS_REGISTERED                                              syscall.Errno = 1714\n\tRPC_S_NOT_LISTENING                                                       syscall.Errno = 1715\n\tRPC_S_UNKNOWN_MGR_TYPE                                                    syscall.Errno = 1716\n\tRPC_S_UNKNOWN_IF                                                          syscall.Errno = 1717\n\tRPC_S_NO_BINDINGS                                                         syscall.Errno = 1718\n\tRPC_S_NO_PROTSEQS                                                         syscall.Errno = 1719\n\tRPC_S_CANT_CREATE_ENDPOINT                                                syscall.Errno = 1720\n\tRPC_S_OUT_OF_RESOURCES                                                    syscall.Errno = 1721\n\tRPC_S_SERVER_UNAVAILABLE                                                  syscall.Errno = 1722\n\tRPC_S_SERVER_TOO_BUSY                                                     syscall.Errno = 1723\n\tRPC_S_INVALID_NETWORK_OPTIONS                                             syscall.Errno = 1724\n\tRPC_S_NO_CALL_ACTIVE                                                      syscall.Errno = 1725\n\tRPC_S_CALL_FAILED                                                         syscall.Errno = 1726\n\tRPC_S_CALL_FAILED_DNE                                                     syscall.Errno = 1727\n\tRPC_S_PROTOCOL_ERROR                                                      syscall.Errno = 1728\n\tRPC_S_PROXY_ACCESS_DENIED                                                 syscall.Errno = 1729\n\tRPC_S_UNSUPPORTED_TRANS_SYN                                               syscall.Errno = 1730\n\tRPC_S_UNSUPPORTED_TYPE                                                    syscall.Errno = 1732\n\tRPC_S_INVALID_TAG                                                         syscall.Errno = 1733\n\tRPC_S_INVALID_BOUND                                                       syscall.Errno = 1734\n\tRPC_S_NO_ENTRY_NAME                                                       syscall.Errno = 1735\n\tRPC_S_INVALID_NAME_SYNTAX                                                 syscall.Errno = 1736\n\tRPC_S_UNSUPPORTED_NAME_SYNTAX                                             syscall.Errno = 1737\n\tRPC_S_UUID_NO_ADDRESS                                                     syscall.Errno = 1739\n\tRPC_S_DUPLICATE_ENDPOINT                                                  syscall.Errno = 1740\n\tRPC_S_UNKNOWN_AUTHN_TYPE                                                  syscall.Errno = 1741\n\tRPC_S_MAX_CALLS_TOO_SMALL                                                 syscall.Errno = 1742\n\tRPC_S_STRING_TOO_LONG                                                     syscall.Errno = 1743\n\tRPC_S_PROTSEQ_NOT_FOUND                                                   syscall.Errno = 1744\n\tRPC_S_PROCNUM_OUT_OF_RANGE                                                syscall.Errno = 1745\n\tRPC_S_BINDING_HAS_NO_AUTH                                                 syscall.Errno = 1746\n\tRPC_S_UNKNOWN_AUTHN_SERVICE                                               syscall.Errno = 1747\n\tRPC_S_UNKNOWN_AUTHN_LEVEL                                                 syscall.Errno = 1748\n\tRPC_S_INVALID_AUTH_IDENTITY                                               syscall.Errno = 1749\n\tRPC_S_UNKNOWN_AUTHZ_SERVICE                                               syscall.Errno = 1750\n\tEPT_S_INVALID_ENTRY                                                       syscall.Errno = 1751\n\tEPT_S_CANT_PERFORM_OP                                                     syscall.Errno = 1752\n\tEPT_S_NOT_REGISTERED                                                      syscall.Errno = 1753\n\tRPC_S_NOTHING_TO_EXPORT                                                   syscall.Errno = 1754\n\tRPC_S_INCOMPLETE_NAME                                                     syscall.Errno = 1755\n\tRPC_S_INVALID_VERS_OPTION                                                 syscall.Errno = 1756\n\tRPC_S_NO_MORE_MEMBERS                                                     syscall.Errno = 1757\n\tRPC_S_NOT_ALL_OBJS_UNEXPORTED                                             syscall.Errno = 1758\n\tRPC_S_INTERFACE_NOT_FOUND                                                 syscall.Errno = 1759\n\tRPC_S_ENTRY_ALREADY_EXISTS                                                syscall.Errno = 1760\n\tRPC_S_ENTRY_NOT_FOUND                                                     syscall.Errno = 1761\n\tRPC_S_NAME_SERVICE_UNAVAILABLE                                            syscall.Errno = 1762\n\tRPC_S_INVALID_NAF_ID                                                      syscall.Errno = 1763\n\tRPC_S_CANNOT_SUPPORT                                                      syscall.Errno = 1764\n\tRPC_S_NO_CONTEXT_AVAILABLE                                                syscall.Errno = 1765\n\tRPC_S_INTERNAL_ERROR                                                      syscall.Errno = 1766\n\tRPC_S_ZERO_DIVIDE                                                         syscall.Errno = 1767\n\tRPC_S_ADDRESS_ERROR                                                       syscall.Errno = 1768\n\tRPC_S_FP_DIV_ZERO                                                         syscall.Errno = 1769\n\tRPC_S_FP_UNDERFLOW                                                        syscall.Errno = 1770\n\tRPC_S_FP_OVERFLOW                                                         syscall.Errno = 1771\n\tRPC_X_NO_MORE_ENTRIES                                                     syscall.Errno = 1772\n\tRPC_X_SS_CHAR_TRANS_OPEN_FAIL                                             syscall.Errno = 1773\n\tRPC_X_SS_CHAR_TRANS_SHORT_FILE                                            syscall.Errno = 1774\n\tRPC_X_SS_IN_NULL_CONTEXT                                                  syscall.Errno = 1775\n\tRPC_X_SS_CONTEXT_DAMAGED                                                  syscall.Errno = 1777\n\tRPC_X_SS_HANDLES_MISMATCH                                                 syscall.Errno = 1778\n\tRPC_X_SS_CANNOT_GET_CALL_HANDLE                                           syscall.Errno = 1779\n\tRPC_X_NULL_REF_POINTER                                                    syscall.Errno = 1780\n\tRPC_X_ENUM_VALUE_OUT_OF_RANGE                                             syscall.Errno = 1781\n\tRPC_X_BYTE_COUNT_TOO_SMALL                                                syscall.Errno = 1782\n\tRPC_X_BAD_STUB_DATA                                                       syscall.Errno = 1783\n\tERROR_INVALID_USER_BUFFER                                                 syscall.Errno = 1784\n\tERROR_UNRECOGNIZED_MEDIA                                                  syscall.Errno = 1785\n\tERROR_NO_TRUST_LSA_SECRET                                                 syscall.Errno = 1786\n\tERROR_NO_TRUST_SAM_ACCOUNT                                                syscall.Errno = 1787\n\tERROR_TRUSTED_DOMAIN_FAILURE                                              syscall.Errno = 1788\n\tERROR_TRUSTED_RELATIONSHIP_FAILURE                                        syscall.Errno = 1789\n\tERROR_TRUST_FAILURE                                                       syscall.Errno = 1790\n\tRPC_S_CALL_IN_PROGRESS                                                    syscall.Errno = 1791\n\tERROR_NETLOGON_NOT_STARTED                                                syscall.Errno = 1792\n\tERROR_ACCOUNT_EXPIRED                                                     syscall.Errno = 1793\n\tERROR_REDIRECTOR_HAS_OPEN_HANDLES                                         syscall.Errno = 1794\n\tERROR_PRINTER_DRIVER_ALREADY_INSTALLED                                    syscall.Errno = 1795\n\tERROR_UNKNOWN_PORT                                                        syscall.Errno = 1796\n\tERROR_UNKNOWN_PRINTER_DRIVER                                              syscall.Errno = 1797\n\tERROR_UNKNOWN_PRINTPROCESSOR                                              syscall.Errno = 1798\n\tERROR_INVALID_SEPARATOR_FILE                                              syscall.Errno = 1799\n\tERROR_INVALID_PRIORITY                                                    syscall.Errno = 1800\n\tERROR_INVALID_PRINTER_NAME                                                syscall.Errno = 1801\n\tERROR_PRINTER_ALREADY_EXISTS                                              syscall.Errno = 1802\n\tERROR_INVALID_PRINTER_COMMAND                                             syscall.Errno = 1803\n\tERROR_INVALID_DATATYPE                                                    syscall.Errno = 1804\n\tERROR_INVALID_ENVIRONMENT                                                 syscall.Errno = 1805\n\tRPC_S_NO_MORE_BINDINGS                                                    syscall.Errno = 1806\n\tERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT                                   syscall.Errno = 1807\n\tERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT                                   syscall.Errno = 1808\n\tERROR_NOLOGON_SERVER_TRUST_ACCOUNT                                        syscall.Errno = 1809\n\tERROR_DOMAIN_TRUST_INCONSISTENT                                           syscall.Errno = 1810\n\tERROR_SERVER_HAS_OPEN_HANDLES                                             syscall.Errno = 1811\n\tERROR_RESOURCE_DATA_NOT_FOUND                                             syscall.Errno = 1812\n\tERROR_RESOURCE_TYPE_NOT_FOUND                                             syscall.Errno = 1813\n\tERROR_RESOURCE_NAME_NOT_FOUND                                             syscall.Errno = 1814\n\tERROR_RESOURCE_LANG_NOT_FOUND                                             syscall.Errno = 1815\n\tERROR_NOT_ENOUGH_QUOTA                                                    syscall.Errno = 1816\n\tRPC_S_NO_INTERFACES                                                       syscall.Errno = 1817\n\tRPC_S_CALL_CANCELLED                                                      syscall.Errno = 1818\n\tRPC_S_BINDING_INCOMPLETE                                                  syscall.Errno = 1819\n\tRPC_S_COMM_FAILURE                                                        syscall.Errno = 1820\n\tRPC_S_UNSUPPORTED_AUTHN_LEVEL                                             syscall.Errno = 1821\n\tRPC_S_NO_PRINC_NAME                                                       syscall.Errno = 1822\n\tRPC_S_NOT_RPC_ERROR                                                       syscall.Errno = 1823\n\tRPC_S_UUID_LOCAL_ONLY                                                     syscall.Errno = 1824\n\tRPC_S_SEC_PKG_ERROR                                                       syscall.Errno = 1825\n\tRPC_S_NOT_CANCELLED                                                       syscall.Errno = 1826\n\tRPC_X_INVALID_ES_ACTION                                                   syscall.Errno = 1827\n\tRPC_X_WRONG_ES_VERSION                                                    syscall.Errno = 1828\n\tRPC_X_WRONG_STUB_VERSION                                                  syscall.Errno = 1829\n\tRPC_X_INVALID_PIPE_OBJECT                                                 syscall.Errno = 1830\n\tRPC_X_WRONG_PIPE_ORDER                                                    syscall.Errno = 1831\n\tRPC_X_WRONG_PIPE_VERSION                                                  syscall.Errno = 1832\n\tRPC_S_COOKIE_AUTH_FAILED                                                  syscall.Errno = 1833\n\tRPC_S_DO_NOT_DISTURB                                                      syscall.Errno = 1834\n\tRPC_S_SYSTEM_HANDLE_COUNT_EXCEEDED                                        syscall.Errno = 1835\n\tRPC_S_SYSTEM_HANDLE_TYPE_MISMATCH                                         syscall.Errno = 1836\n\tRPC_S_GROUP_MEMBER_NOT_FOUND                                              syscall.Errno = 1898\n\tEPT_S_CANT_CREATE                                                         syscall.Errno = 1899\n\tRPC_S_INVALID_OBJECT                                                      syscall.Errno = 1900\n\tERROR_INVALID_TIME                                                        syscall.Errno = 1901\n\tERROR_INVALID_FORM_NAME                                                   syscall.Errno = 1902\n\tERROR_INVALID_FORM_SIZE                                                   syscall.Errno = 1903\n\tERROR_ALREADY_WAITING                                                     syscall.Errno = 1904\n\tERROR_PRINTER_DELETED                                                     syscall.Errno = 1905\n\tERROR_INVALID_PRINTER_STATE                                               syscall.Errno = 1906\n\tERROR_PASSWORD_MUST_CHANGE                                                syscall.Errno = 1907\n\tERROR_DOMAIN_CONTROLLER_NOT_FOUND                                         syscall.Errno = 1908\n\tERROR_ACCOUNT_LOCKED_OUT                                                  syscall.Errno = 1909\n\tOR_INVALID_OXID                                                           syscall.Errno = 1910\n\tOR_INVALID_OID                                                            syscall.Errno = 1911\n\tOR_INVALID_SET                                                            syscall.Errno = 1912\n\tRPC_S_SEND_INCOMPLETE                                                     syscall.Errno = 1913\n\tRPC_S_INVALID_ASYNC_HANDLE                                                syscall.Errno = 1914\n\tRPC_S_INVALID_ASYNC_CALL                                                  syscall.Errno = 1915\n\tRPC_X_PIPE_CLOSED                                                         syscall.Errno = 1916\n\tRPC_X_PIPE_DISCIPLINE_ERROR                                               syscall.Errno = 1917\n\tRPC_X_PIPE_EMPTY                                                          syscall.Errno = 1918\n\tERROR_NO_SITENAME                                                         syscall.Errno = 1919\n\tERROR_CANT_ACCESS_FILE                                                    syscall.Errno = 1920\n\tERROR_CANT_RESOLVE_FILENAME                                               syscall.Errno = 1921\n\tRPC_S_ENTRY_TYPE_MISMATCH                                                 syscall.Errno = 1922\n\tRPC_S_NOT_ALL_OBJS_EXPORTED                                               syscall.Errno = 1923\n\tRPC_S_INTERFACE_NOT_EXPORTED                                              syscall.Errno = 1924\n\tRPC_S_PROFILE_NOT_ADDED                                                   syscall.Errno = 1925\n\tRPC_S_PRF_ELT_NOT_ADDED                                                   syscall.Errno = 1926\n\tRPC_S_PRF_ELT_NOT_REMOVED                                                 syscall.Errno = 1927\n\tRPC_S_GRP_ELT_NOT_ADDED                                                   syscall.Errno = 1928\n\tRPC_S_GRP_ELT_NOT_REMOVED                                                 syscall.Errno = 1929\n\tERROR_KM_DRIVER_BLOCKED                                                   syscall.Errno = 1930\n\tERROR_CONTEXT_EXPIRED                                                     syscall.Errno = 1931\n\tERROR_PER_USER_TRUST_QUOTA_EXCEEDED                                       syscall.Errno = 1932\n\tERROR_ALL_USER_TRUST_QUOTA_EXCEEDED                                       syscall.Errno = 1933\n\tERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED                                    syscall.Errno = 1934\n\tERROR_AUTHENTICATION_FIREWALL_FAILED                                      syscall.Errno = 1935\n\tERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED                                    syscall.Errno = 1936\n\tERROR_NTLM_BLOCKED                                                        syscall.Errno = 1937\n\tERROR_PASSWORD_CHANGE_REQUIRED                                            syscall.Errno = 1938\n\tERROR_LOST_MODE_LOGON_RESTRICTION                                         syscall.Errno = 1939\n\tERROR_INVALID_PIXEL_FORMAT                                                syscall.Errno = 2000\n\tERROR_BAD_DRIVER                                                          syscall.Errno = 2001\n\tERROR_INVALID_WINDOW_STYLE                                                syscall.Errno = 2002\n\tERROR_METAFILE_NOT_SUPPORTED                                              syscall.Errno = 2003\n\tERROR_TRANSFORM_NOT_SUPPORTED                                             syscall.Errno = 2004\n\tERROR_CLIPPING_NOT_SUPPORTED                                              syscall.Errno = 2005\n\tERROR_INVALID_CMM                                                         syscall.Errno = 2010\n\tERROR_INVALID_PROFILE                                                     syscall.Errno = 2011\n\tERROR_TAG_NOT_FOUND                                                       syscall.Errno = 2012\n\tERROR_TAG_NOT_PRESENT                                                     syscall.Errno = 2013\n\tERROR_DUPLICATE_TAG                                                       syscall.Errno = 2014\n\tERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE                                  syscall.Errno = 2015\n\tERROR_PROFILE_NOT_FOUND                                                   syscall.Errno = 2016\n\tERROR_INVALID_COLORSPACE                                                  syscall.Errno = 2017\n\tERROR_ICM_NOT_ENABLED                                                     syscall.Errno = 2018\n\tERROR_DELETING_ICM_XFORM                                                  syscall.Errno = 2019\n\tERROR_INVALID_TRANSFORM                                                   syscall.Errno = 2020\n\tERROR_COLORSPACE_MISMATCH                                                 syscall.Errno = 2021\n\tERROR_INVALID_COLORINDEX                                                  syscall.Errno = 2022\n\tERROR_PROFILE_DOES_NOT_MATCH_DEVICE                                       syscall.Errno = 2023\n\tERROR_CONNECTED_OTHER_PASSWORD                                            syscall.Errno = 2108\n\tERROR_CONNECTED_OTHER_PASSWORD_DEFAULT                                    syscall.Errno = 2109\n\tERROR_BAD_USERNAME                                                        syscall.Errno = 2202\n\tERROR_NOT_CONNECTED                                                       syscall.Errno = 2250\n\tERROR_OPEN_FILES                                                          syscall.Errno = 2401\n\tERROR_ACTIVE_CONNECTIONS                                                  syscall.Errno = 2402\n\tERROR_DEVICE_IN_USE                                                       syscall.Errno = 2404\n\tERROR_UNKNOWN_PRINT_MONITOR                                               syscall.Errno = 3000\n\tERROR_PRINTER_DRIVER_IN_USE                                               syscall.Errno = 3001\n\tERROR_SPOOL_FILE_NOT_FOUND                                                syscall.Errno = 3002\n\tERROR_SPL_NO_STARTDOC                                                     syscall.Errno = 3003\n\tERROR_SPL_NO_ADDJOB                                                       syscall.Errno = 3004\n\tERROR_PRINT_PROCESSOR_ALREADY_INSTALLED                                   syscall.Errno = 3005\n\tERROR_PRINT_MONITOR_ALREADY_INSTALLED                                     syscall.Errno = 3006\n\tERROR_INVALID_PRINT_MONITOR                                               syscall.Errno = 3007\n\tERROR_PRINT_MONITOR_IN_USE                                                syscall.Errno = 3008\n\tERROR_PRINTER_HAS_JOBS_QUEUED                                             syscall.Errno = 3009\n\tERROR_SUCCESS_REBOOT_REQUIRED                                             syscall.Errno = 3010\n\tERROR_SUCCESS_RESTART_REQUIRED                                            syscall.Errno = 3011\n\tERROR_PRINTER_NOT_FOUND                                                   syscall.Errno = 3012\n\tERROR_PRINTER_DRIVER_WARNED                                               syscall.Errno = 3013\n\tERROR_PRINTER_DRIVER_BLOCKED                                              syscall.Errno = 3014\n\tERROR_PRINTER_DRIVER_PACKAGE_IN_USE                                       syscall.Errno = 3015\n\tERROR_CORE_DRIVER_PACKAGE_NOT_FOUND                                       syscall.Errno = 3016\n\tERROR_FAIL_REBOOT_REQUIRED                                                syscall.Errno = 3017\n\tERROR_FAIL_REBOOT_INITIATED                                               syscall.Errno = 3018\n\tERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED                                      syscall.Errno = 3019\n\tERROR_PRINT_JOB_RESTART_REQUIRED                                          syscall.Errno = 3020\n\tERROR_INVALID_PRINTER_DRIVER_MANIFEST                                     syscall.Errno = 3021\n\tERROR_PRINTER_NOT_SHAREABLE                                               syscall.Errno = 3022\n\tERROR_REQUEST_PAUSED                                                      syscall.Errno = 3050\n\tERROR_APPEXEC_CONDITION_NOT_SATISFIED                                     syscall.Errno = 3060\n\tERROR_APPEXEC_HANDLE_INVALIDATED                                          syscall.Errno = 3061\n\tERROR_APPEXEC_INVALID_HOST_GENERATION                                     syscall.Errno = 3062\n\tERROR_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION                             syscall.Errno = 3063\n\tERROR_APPEXEC_INVALID_HOST_STATE                                          syscall.Errno = 3064\n\tERROR_APPEXEC_NO_DONOR                                                    syscall.Errno = 3065\n\tERROR_APPEXEC_HOST_ID_MISMATCH                                            syscall.Errno = 3066\n\tERROR_APPEXEC_UNKNOWN_USER                                                syscall.Errno = 3067\n\tERROR_IO_REISSUE_AS_CACHED                                                syscall.Errno = 3950\n\tERROR_WINS_INTERNAL                                                       syscall.Errno = 4000\n\tERROR_CAN_NOT_DEL_LOCAL_WINS                                              syscall.Errno = 4001\n\tERROR_STATIC_INIT                                                         syscall.Errno = 4002\n\tERROR_INC_BACKUP                                                          syscall.Errno = 4003\n\tERROR_FULL_BACKUP                                                         syscall.Errno = 4004\n\tERROR_REC_NON_EXISTENT                                                    syscall.Errno = 4005\n\tERROR_RPL_NOT_ALLOWED                                                     syscall.Errno = 4006\n\tPEERDIST_ERROR_CONTENTINFO_VERSION_UNSUPPORTED                            syscall.Errno = 4050\n\tPEERDIST_ERROR_CANNOT_PARSE_CONTENTINFO                                   syscall.Errno = 4051\n\tPEERDIST_ERROR_MISSING_DATA                                               syscall.Errno = 4052\n\tPEERDIST_ERROR_NO_MORE                                                    syscall.Errno = 4053\n\tPEERDIST_ERROR_NOT_INITIALIZED                                            syscall.Errno = 4054\n\tPEERDIST_ERROR_ALREADY_INITIALIZED                                        syscall.Errno = 4055\n\tPEERDIST_ERROR_SHUTDOWN_IN_PROGRESS                                       syscall.Errno = 4056\n\tPEERDIST_ERROR_INVALIDATED                                                syscall.Errno = 4057\n\tPEERDIST_ERROR_ALREADY_EXISTS                                             syscall.Errno = 4058\n\tPEERDIST_ERROR_OPERATION_NOTFOUND                                         syscall.Errno = 4059\n\tPEERDIST_ERROR_ALREADY_COMPLETED                                          syscall.Errno = 4060\n\tPEERDIST_ERROR_OUT_OF_BOUNDS                                              syscall.Errno = 4061\n\tPEERDIST_ERROR_VERSION_UNSUPPORTED                                        syscall.Errno = 4062\n\tPEERDIST_ERROR_INVALID_CONFIGURATION                                      syscall.Errno = 4063\n\tPEERDIST_ERROR_NOT_LICENSED                                               syscall.Errno = 4064\n\tPEERDIST_ERROR_SERVICE_UNAVAILABLE                                        syscall.Errno = 4065\n\tPEERDIST_ERROR_TRUST_FAILURE                                              syscall.Errno = 4066\n\tERROR_DHCP_ADDRESS_CONFLICT                                               syscall.Errno = 4100\n\tERROR_WMI_GUID_NOT_FOUND                                                  syscall.Errno = 4200\n\tERROR_WMI_INSTANCE_NOT_FOUND                                              syscall.Errno = 4201\n\tERROR_WMI_ITEMID_NOT_FOUND                                                syscall.Errno = 4202\n\tERROR_WMI_TRY_AGAIN                                                       syscall.Errno = 4203\n\tERROR_WMI_DP_NOT_FOUND                                                    syscall.Errno = 4204\n\tERROR_WMI_UNRESOLVED_INSTANCE_REF                                         syscall.Errno = 4205\n\tERROR_WMI_ALREADY_ENABLED                                                 syscall.Errno = 4206\n\tERROR_WMI_GUID_DISCONNECTED                                               syscall.Errno = 4207\n\tERROR_WMI_SERVER_UNAVAILABLE                                              syscall.Errno = 4208\n\tERROR_WMI_DP_FAILED                                                       syscall.Errno = 4209\n\tERROR_WMI_INVALID_MOF                                                     syscall.Errno = 4210\n\tERROR_WMI_INVALID_REGINFO                                                 syscall.Errno = 4211\n\tERROR_WMI_ALREADY_DISABLED                                                syscall.Errno = 4212\n\tERROR_WMI_READ_ONLY                                                       syscall.Errno = 4213\n\tERROR_WMI_SET_FAILURE                                                     syscall.Errno = 4214\n\tERROR_NOT_APPCONTAINER                                                    syscall.Errno = 4250\n\tERROR_APPCONTAINER_REQUIRED                                               syscall.Errno = 4251\n\tERROR_NOT_SUPPORTED_IN_APPCONTAINER                                       syscall.Errno = 4252\n\tERROR_INVALID_PACKAGE_SID_LENGTH                                          syscall.Errno = 4253\n\tERROR_INVALID_MEDIA                                                       syscall.Errno = 4300\n\tERROR_INVALID_LIBRARY                                                     syscall.Errno = 4301\n\tERROR_INVALID_MEDIA_POOL                                                  syscall.Errno = 4302\n\tERROR_DRIVE_MEDIA_MISMATCH                                                syscall.Errno = 4303\n\tERROR_MEDIA_OFFLINE                                                       syscall.Errno = 4304\n\tERROR_LIBRARY_OFFLINE                                                     syscall.Errno = 4305\n\tERROR_EMPTY                                                               syscall.Errno = 4306\n\tERROR_NOT_EMPTY                                                           syscall.Errno = 4307\n\tERROR_MEDIA_UNAVAILABLE                                                   syscall.Errno = 4308\n\tERROR_RESOURCE_DISABLED                                                   syscall.Errno = 4309\n\tERROR_INVALID_CLEANER                                                     syscall.Errno = 4310\n\tERROR_UNABLE_TO_CLEAN                                                     syscall.Errno = 4311\n\tERROR_OBJECT_NOT_FOUND                                                    syscall.Errno = 4312\n\tERROR_DATABASE_FAILURE                                                    syscall.Errno = 4313\n\tERROR_DATABASE_FULL                                                       syscall.Errno = 4314\n\tERROR_MEDIA_INCOMPATIBLE                                                  syscall.Errno = 4315\n\tERROR_RESOURCE_NOT_PRESENT                                                syscall.Errno = 4316\n\tERROR_INVALID_OPERATION                                                   syscall.Errno = 4317\n\tERROR_MEDIA_NOT_AVAILABLE                                                 syscall.Errno = 4318\n\tERROR_DEVICE_NOT_AVAILABLE                                                syscall.Errno = 4319\n\tERROR_REQUEST_REFUSED                                                     syscall.Errno = 4320\n\tERROR_INVALID_DRIVE_OBJECT                                                syscall.Errno = 4321\n\tERROR_LIBRARY_FULL                                                        syscall.Errno = 4322\n\tERROR_MEDIUM_NOT_ACCESSIBLE                                               syscall.Errno = 4323\n\tERROR_UNABLE_TO_LOAD_MEDIUM                                               syscall.Errno = 4324\n\tERROR_UNABLE_TO_INVENTORY_DRIVE                                           syscall.Errno = 4325\n\tERROR_UNABLE_TO_INVENTORY_SLOT                                            syscall.Errno = 4326\n\tERROR_UNABLE_TO_INVENTORY_TRANSPORT                                       syscall.Errno = 4327\n\tERROR_TRANSPORT_FULL                                                      syscall.Errno = 4328\n\tERROR_CONTROLLING_IEPORT                                                  syscall.Errno = 4329\n\tERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA                                       syscall.Errno = 4330\n\tERROR_CLEANER_SLOT_SET                                                    syscall.Errno = 4331\n\tERROR_CLEANER_SLOT_NOT_SET                                                syscall.Errno = 4332\n\tERROR_CLEANER_CARTRIDGE_SPENT                                             syscall.Errno = 4333\n\tERROR_UNEXPECTED_OMID                                                     syscall.Errno = 4334\n\tERROR_CANT_DELETE_LAST_ITEM                                               syscall.Errno = 4335\n\tERROR_MESSAGE_EXCEEDS_MAX_SIZE                                            syscall.Errno = 4336\n\tERROR_VOLUME_CONTAINS_SYS_FILES                                           syscall.Errno = 4337\n\tERROR_INDIGENOUS_TYPE                                                     syscall.Errno = 4338\n\tERROR_NO_SUPPORTING_DRIVES                                                syscall.Errno = 4339\n\tERROR_CLEANER_CARTRIDGE_INSTALLED                                         syscall.Errno = 4340\n\tERROR_IEPORT_FULL                                                         syscall.Errno = 4341\n\tERROR_FILE_OFFLINE                                                        syscall.Errno = 4350\n\tERROR_REMOTE_STORAGE_NOT_ACTIVE                                           syscall.Errno = 4351\n\tERROR_REMOTE_STORAGE_MEDIA_ERROR                                          syscall.Errno = 4352\n\tERROR_NOT_A_REPARSE_POINT                                                 syscall.Errno = 4390\n\tERROR_REPARSE_ATTRIBUTE_CONFLICT                                          syscall.Errno = 4391\n\tERROR_INVALID_REPARSE_DATA                                                syscall.Errno = 4392\n\tERROR_REPARSE_TAG_INVALID                                                 syscall.Errno = 4393\n\tERROR_REPARSE_TAG_MISMATCH                                                syscall.Errno = 4394\n\tERROR_REPARSE_POINT_ENCOUNTERED                                           syscall.Errno = 4395\n\tERROR_APP_DATA_NOT_FOUND                                                  syscall.Errno = 4400\n\tERROR_APP_DATA_EXPIRED                                                    syscall.Errno = 4401\n\tERROR_APP_DATA_CORRUPT                                                    syscall.Errno = 4402\n\tERROR_APP_DATA_LIMIT_EXCEEDED                                             syscall.Errno = 4403\n\tERROR_APP_DATA_REBOOT_REQUIRED                                            syscall.Errno = 4404\n\tERROR_SECUREBOOT_ROLLBACK_DETECTED                                        syscall.Errno = 4420\n\tERROR_SECUREBOOT_POLICY_VIOLATION                                         syscall.Errno = 4421\n\tERROR_SECUREBOOT_INVALID_POLICY                                           syscall.Errno = 4422\n\tERROR_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND                               syscall.Errno = 4423\n\tERROR_SECUREBOOT_POLICY_NOT_SIGNED                                        syscall.Errno = 4424\n\tERROR_SECUREBOOT_NOT_ENABLED                                              syscall.Errno = 4425\n\tERROR_SECUREBOOT_FILE_REPLACED                                            syscall.Errno = 4426\n\tERROR_SECUREBOOT_POLICY_NOT_AUTHORIZED                                    syscall.Errno = 4427\n\tERROR_SECUREBOOT_POLICY_UNKNOWN                                           syscall.Errno = 4428\n\tERROR_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION                       syscall.Errno = 4429\n\tERROR_SECUREBOOT_PLATFORM_ID_MISMATCH                                     syscall.Errno = 4430\n\tERROR_SECUREBOOT_POLICY_ROLLBACK_DETECTED                                 syscall.Errno = 4431\n\tERROR_SECUREBOOT_POLICY_UPGRADE_MISMATCH                                  syscall.Errno = 4432\n\tERROR_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING                             syscall.Errno = 4433\n\tERROR_SECUREBOOT_NOT_BASE_POLICY                                          syscall.Errno = 4434\n\tERROR_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY                                  syscall.Errno = 4435\n\tERROR_OFFLOAD_READ_FLT_NOT_SUPPORTED                                      syscall.Errno = 4440\n\tERROR_OFFLOAD_WRITE_FLT_NOT_SUPPORTED                                     syscall.Errno = 4441\n\tERROR_OFFLOAD_READ_FILE_NOT_SUPPORTED                                     syscall.Errno = 4442\n\tERROR_OFFLOAD_WRITE_FILE_NOT_SUPPORTED                                    syscall.Errno = 4443\n\tERROR_ALREADY_HAS_STREAM_ID                                               syscall.Errno = 4444\n\tERROR_SMR_GARBAGE_COLLECTION_REQUIRED                                     syscall.Errno = 4445\n\tERROR_WOF_WIM_HEADER_CORRUPT                                              syscall.Errno = 4446\n\tERROR_WOF_WIM_RESOURCE_TABLE_CORRUPT                                      syscall.Errno = 4447\n\tERROR_WOF_FILE_RESOURCE_TABLE_CORRUPT                                     syscall.Errno = 4448\n\tERROR_VOLUME_NOT_SIS_ENABLED                                              syscall.Errno = 4500\n\tERROR_SYSTEM_INTEGRITY_ROLLBACK_DETECTED                                  syscall.Errno = 4550\n\tERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION                                   syscall.Errno = 4551\n\tERROR_SYSTEM_INTEGRITY_INVALID_POLICY                                     syscall.Errno = 4552\n\tERROR_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED                                  syscall.Errno = 4553\n\tERROR_SYSTEM_INTEGRITY_TOO_MANY_POLICIES                                  syscall.Errno = 4554\n\tERROR_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED                 syscall.Errno = 4555\n\tERROR_VSM_NOT_INITIALIZED                                                 syscall.Errno = 4560\n\tERROR_VSM_DMA_PROTECTION_NOT_IN_USE                                       syscall.Errno = 4561\n\tERROR_PLATFORM_MANIFEST_NOT_AUTHORIZED                                    syscall.Errno = 4570\n\tERROR_PLATFORM_MANIFEST_INVALID                                           syscall.Errno = 4571\n\tERROR_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED                               syscall.Errno = 4572\n\tERROR_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED                            syscall.Errno = 4573\n\tERROR_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND                               syscall.Errno = 4574\n\tERROR_PLATFORM_MANIFEST_NOT_ACTIVE                                        syscall.Errno = 4575\n\tERROR_PLATFORM_MANIFEST_NOT_SIGNED                                        syscall.Errno = 4576\n\tERROR_DEPENDENT_RESOURCE_EXISTS                                           syscall.Errno = 5001\n\tERROR_DEPENDENCY_NOT_FOUND                                                syscall.Errno = 5002\n\tERROR_DEPENDENCY_ALREADY_EXISTS                                           syscall.Errno = 5003\n\tERROR_RESOURCE_NOT_ONLINE                                                 syscall.Errno = 5004\n\tERROR_HOST_NODE_NOT_AVAILABLE                                             syscall.Errno = 5005\n\tERROR_RESOURCE_NOT_AVAILABLE                                              syscall.Errno = 5006\n\tERROR_RESOURCE_NOT_FOUND                                                  syscall.Errno = 5007\n\tERROR_SHUTDOWN_CLUSTER                                                    syscall.Errno = 5008\n\tERROR_CANT_EVICT_ACTIVE_NODE                                              syscall.Errno = 5009\n\tERROR_OBJECT_ALREADY_EXISTS                                               syscall.Errno = 5010\n\tERROR_OBJECT_IN_LIST                                                      syscall.Errno = 5011\n\tERROR_GROUP_NOT_AVAILABLE                                                 syscall.Errno = 5012\n\tERROR_GROUP_NOT_FOUND                                                     syscall.Errno = 5013\n\tERROR_GROUP_NOT_ONLINE                                                    syscall.Errno = 5014\n\tERROR_HOST_NODE_NOT_RESOURCE_OWNER                                        syscall.Errno = 5015\n\tERROR_HOST_NODE_NOT_GROUP_OWNER                                           syscall.Errno = 5016\n\tERROR_RESMON_CREATE_FAILED                                                syscall.Errno = 5017\n\tERROR_RESMON_ONLINE_FAILED                                                syscall.Errno = 5018\n\tERROR_RESOURCE_ONLINE                                                     syscall.Errno = 5019\n\tERROR_QUORUM_RESOURCE                                                     syscall.Errno = 5020\n\tERROR_NOT_QUORUM_CAPABLE                                                  syscall.Errno = 5021\n\tERROR_CLUSTER_SHUTTING_DOWN                                               syscall.Errno = 5022\n\tERROR_INVALID_STATE                                                       syscall.Errno = 5023\n\tERROR_RESOURCE_PROPERTIES_STORED                                          syscall.Errno = 5024\n\tERROR_NOT_QUORUM_CLASS                                                    syscall.Errno = 5025\n\tERROR_CORE_RESOURCE                                                       syscall.Errno = 5026\n\tERROR_QUORUM_RESOURCE_ONLINE_FAILED                                       syscall.Errno = 5027\n\tERROR_QUORUMLOG_OPEN_FAILED                                               syscall.Errno = 5028\n\tERROR_CLUSTERLOG_CORRUPT                                                  syscall.Errno = 5029\n\tERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE                                   syscall.Errno = 5030\n\tERROR_CLUSTERLOG_EXCEEDS_MAXSIZE                                          syscall.Errno = 5031\n\tERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND                                       syscall.Errno = 5032\n\tERROR_CLUSTERLOG_NOT_ENOUGH_SPACE                                         syscall.Errno = 5033\n\tERROR_QUORUM_OWNER_ALIVE                                                  syscall.Errno = 5034\n\tERROR_NETWORK_NOT_AVAILABLE                                               syscall.Errno = 5035\n\tERROR_NODE_NOT_AVAILABLE                                                  syscall.Errno = 5036\n\tERROR_ALL_NODES_NOT_AVAILABLE                                             syscall.Errno = 5037\n\tERROR_RESOURCE_FAILED                                                     syscall.Errno = 5038\n\tERROR_CLUSTER_INVALID_NODE                                                syscall.Errno = 5039\n\tERROR_CLUSTER_NODE_EXISTS                                                 syscall.Errno = 5040\n\tERROR_CLUSTER_JOIN_IN_PROGRESS                                            syscall.Errno = 5041\n\tERROR_CLUSTER_NODE_NOT_FOUND                                              syscall.Errno = 5042\n\tERROR_CLUSTER_LOCAL_NODE_NOT_FOUND                                        syscall.Errno = 5043\n\tERROR_CLUSTER_NETWORK_EXISTS                                              syscall.Errno = 5044\n\tERROR_CLUSTER_NETWORK_NOT_FOUND                                           syscall.Errno = 5045\n\tERROR_CLUSTER_NETINTERFACE_EXISTS                                         syscall.Errno = 5046\n\tERROR_CLUSTER_NETINTERFACE_NOT_FOUND                                      syscall.Errno = 5047\n\tERROR_CLUSTER_INVALID_REQUEST                                             syscall.Errno = 5048\n\tERROR_CLUSTER_INVALID_NETWORK_PROVIDER                                    syscall.Errno = 5049\n\tERROR_CLUSTER_NODE_DOWN                                                   syscall.Errno = 5050\n\tERROR_CLUSTER_NODE_UNREACHABLE                                            syscall.Errno = 5051\n\tERROR_CLUSTER_NODE_NOT_MEMBER                                             syscall.Errno = 5052\n\tERROR_CLUSTER_JOIN_NOT_IN_PROGRESS                                        syscall.Errno = 5053\n\tERROR_CLUSTER_INVALID_NETWORK                                             syscall.Errno = 5054\n\tERROR_CLUSTER_NODE_UP                                                     syscall.Errno = 5056\n\tERROR_CLUSTER_IPADDR_IN_USE                                               syscall.Errno = 5057\n\tERROR_CLUSTER_NODE_NOT_PAUSED                                             syscall.Errno = 5058\n\tERROR_CLUSTER_NO_SECURITY_CONTEXT                                         syscall.Errno = 5059\n\tERROR_CLUSTER_NETWORK_NOT_INTERNAL                                        syscall.Errno = 5060\n\tERROR_CLUSTER_NODE_ALREADY_UP                                             syscall.Errno = 5061\n\tERROR_CLUSTER_NODE_ALREADY_DOWN                                           syscall.Errno = 5062\n\tERROR_CLUSTER_NETWORK_ALREADY_ONLINE                                      syscall.Errno = 5063\n\tERROR_CLUSTER_NETWORK_ALREADY_OFFLINE                                     syscall.Errno = 5064\n\tERROR_CLUSTER_NODE_ALREADY_MEMBER                                         syscall.Errno = 5065\n\tERROR_CLUSTER_LAST_INTERNAL_NETWORK                                       syscall.Errno = 5066\n\tERROR_CLUSTER_NETWORK_HAS_DEPENDENTS                                      syscall.Errno = 5067\n\tERROR_INVALID_OPERATION_ON_QUORUM                                         syscall.Errno = 5068\n\tERROR_DEPENDENCY_NOT_ALLOWED                                              syscall.Errno = 5069\n\tERROR_CLUSTER_NODE_PAUSED                                                 syscall.Errno = 5070\n\tERROR_NODE_CANT_HOST_RESOURCE                                             syscall.Errno = 5071\n\tERROR_CLUSTER_NODE_NOT_READY                                              syscall.Errno = 5072\n\tERROR_CLUSTER_NODE_SHUTTING_DOWN                                          syscall.Errno = 5073\n\tERROR_CLUSTER_JOIN_ABORTED                                                syscall.Errno = 5074\n\tERROR_CLUSTER_INCOMPATIBLE_VERSIONS                                       syscall.Errno = 5075\n\tERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED                                syscall.Errno = 5076\n\tERROR_CLUSTER_SYSTEM_CONFIG_CHANGED                                       syscall.Errno = 5077\n\tERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND                                     syscall.Errno = 5078\n\tERROR_CLUSTER_RESTYPE_NOT_SUPPORTED                                       syscall.Errno = 5079\n\tERROR_CLUSTER_RESNAME_NOT_FOUND                                           syscall.Errno = 5080\n\tERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED                                  syscall.Errno = 5081\n\tERROR_CLUSTER_OWNER_NOT_IN_PREFLIST                                       syscall.Errno = 5082\n\tERROR_CLUSTER_DATABASE_SEQMISMATCH                                        syscall.Errno = 5083\n\tERROR_RESMON_INVALID_STATE                                                syscall.Errno = 5084\n\tERROR_CLUSTER_GUM_NOT_LOCKER                                              syscall.Errno = 5085\n\tERROR_QUORUM_DISK_NOT_FOUND                                               syscall.Errno = 5086\n\tERROR_DATABASE_BACKUP_CORRUPT                                             syscall.Errno = 5087\n\tERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT                                   syscall.Errno = 5088\n\tERROR_RESOURCE_PROPERTY_UNCHANGEABLE                                      syscall.Errno = 5089\n\tERROR_NO_ADMIN_ACCESS_POINT                                               syscall.Errno = 5090\n\tERROR_CLUSTER_MEMBERSHIP_INVALID_STATE                                    syscall.Errno = 5890\n\tERROR_CLUSTER_QUORUMLOG_NOT_FOUND                                         syscall.Errno = 5891\n\tERROR_CLUSTER_MEMBERSHIP_HALT                                             syscall.Errno = 5892\n\tERROR_CLUSTER_INSTANCE_ID_MISMATCH                                        syscall.Errno = 5893\n\tERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP                                    syscall.Errno = 5894\n\tERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH                                 syscall.Errno = 5895\n\tERROR_CLUSTER_EVICT_WITHOUT_CLEANUP                                       syscall.Errno = 5896\n\tERROR_CLUSTER_PARAMETER_MISMATCH                                          syscall.Errno = 5897\n\tERROR_NODE_CANNOT_BE_CLUSTERED                                            syscall.Errno = 5898\n\tERROR_CLUSTER_WRONG_OS_VERSION                                            syscall.Errno = 5899\n\tERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME                                syscall.Errno = 5900\n\tERROR_CLUSCFG_ALREADY_COMMITTED                                           syscall.Errno = 5901\n\tERROR_CLUSCFG_ROLLBACK_FAILED                                             syscall.Errno = 5902\n\tERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT                           syscall.Errno = 5903\n\tERROR_CLUSTER_OLD_VERSION                                                 syscall.Errno = 5904\n\tERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME                               syscall.Errno = 5905\n\tERROR_CLUSTER_NO_NET_ADAPTERS                                             syscall.Errno = 5906\n\tERROR_CLUSTER_POISONED                                                    syscall.Errno = 5907\n\tERROR_CLUSTER_GROUP_MOVING                                                syscall.Errno = 5908\n\tERROR_CLUSTER_RESOURCE_TYPE_BUSY                                          syscall.Errno = 5909\n\tERROR_RESOURCE_CALL_TIMED_OUT                                             syscall.Errno = 5910\n\tERROR_INVALID_CLUSTER_IPV6_ADDRESS                                        syscall.Errno = 5911\n\tERROR_CLUSTER_INTERNAL_INVALID_FUNCTION                                   syscall.Errno = 5912\n\tERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS                                     syscall.Errno = 5913\n\tERROR_CLUSTER_PARTIAL_SEND                                                syscall.Errno = 5914\n\tERROR_CLUSTER_REGISTRY_INVALID_FUNCTION                                   syscall.Errno = 5915\n\tERROR_CLUSTER_INVALID_STRING_TERMINATION                                  syscall.Errno = 5916\n\tERROR_CLUSTER_INVALID_STRING_FORMAT                                       syscall.Errno = 5917\n\tERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS                            syscall.Errno = 5918\n\tERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS                        syscall.Errno = 5919\n\tERROR_CLUSTER_NULL_DATA                                                   syscall.Errno = 5920\n\tERROR_CLUSTER_PARTIAL_READ                                                syscall.Errno = 5921\n\tERROR_CLUSTER_PARTIAL_WRITE                                               syscall.Errno = 5922\n\tERROR_CLUSTER_CANT_DESERIALIZE_DATA                                       syscall.Errno = 5923\n\tERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT                                syscall.Errno = 5924\n\tERROR_CLUSTER_NO_QUORUM                                                   syscall.Errno = 5925\n\tERROR_CLUSTER_INVALID_IPV6_NETWORK                                        syscall.Errno = 5926\n\tERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK                                 syscall.Errno = 5927\n\tERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP                                    syscall.Errno = 5928\n\tERROR_DEPENDENCY_TREE_TOO_COMPLEX                                         syscall.Errno = 5929\n\tERROR_EXCEPTION_IN_RESOURCE_CALL                                          syscall.Errno = 5930\n\tERROR_CLUSTER_RHS_FAILED_INITIALIZATION                                   syscall.Errno = 5931\n\tERROR_CLUSTER_NOT_INSTALLED                                               syscall.Errno = 5932\n\tERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE                   syscall.Errno = 5933\n\tERROR_CLUSTER_MAX_NODES_IN_CLUSTER                                        syscall.Errno = 5934\n\tERROR_CLUSTER_TOO_MANY_NODES                                              syscall.Errno = 5935\n\tERROR_CLUSTER_OBJECT_ALREADY_USED                                         syscall.Errno = 5936\n\tERROR_NONCORE_GROUPS_FOUND                                                syscall.Errno = 5937\n\tERROR_FILE_SHARE_RESOURCE_CONFLICT                                        syscall.Errno = 5938\n\tERROR_CLUSTER_EVICT_INVALID_REQUEST                                       syscall.Errno = 5939\n\tERROR_CLUSTER_SINGLETON_RESOURCE                                          syscall.Errno = 5940\n\tERROR_CLUSTER_GROUP_SINGLETON_RESOURCE                                    syscall.Errno = 5941\n\tERROR_CLUSTER_RESOURCE_PROVIDER_FAILED                                    syscall.Errno = 5942\n\tERROR_CLUSTER_RESOURCE_CONFIGURATION_ERROR                                syscall.Errno = 5943\n\tERROR_CLUSTER_GROUP_BUSY                                                  syscall.Errno = 5944\n\tERROR_CLUSTER_NOT_SHARED_VOLUME                                           syscall.Errno = 5945\n\tERROR_CLUSTER_INVALID_SECURITY_DESCRIPTOR                                 syscall.Errno = 5946\n\tERROR_CLUSTER_SHARED_VOLUMES_IN_USE                                       syscall.Errno = 5947\n\tERROR_CLUSTER_USE_SHARED_VOLUMES_API                                      syscall.Errno = 5948\n\tERROR_CLUSTER_BACKUP_IN_PROGRESS                                          syscall.Errno = 5949\n\tERROR_NON_CSV_PATH                                                        syscall.Errno = 5950\n\tERROR_CSV_VOLUME_NOT_LOCAL                                                syscall.Errno = 5951\n\tERROR_CLUSTER_WATCHDOG_TERMINATING                                        syscall.Errno = 5952\n\tERROR_CLUSTER_RESOURCE_VETOED_MOVE_INCOMPATIBLE_NODES                     syscall.Errno = 5953\n\tERROR_CLUSTER_INVALID_NODE_WEIGHT                                         syscall.Errno = 5954\n\tERROR_CLUSTER_RESOURCE_VETOED_CALL                                        syscall.Errno = 5955\n\tERROR_RESMON_SYSTEM_RESOURCES_LACKING                                     syscall.Errno = 5956\n\tERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_DESTINATION    syscall.Errno = 5957\n\tERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_SOURCE         syscall.Errno = 5958\n\tERROR_CLUSTER_GROUP_QUEUED                                                syscall.Errno = 5959\n\tERROR_CLUSTER_RESOURCE_LOCKED_STATUS                                      syscall.Errno = 5960\n\tERROR_CLUSTER_SHARED_VOLUME_FAILOVER_NOT_ALLOWED                          syscall.Errno = 5961\n\tERROR_CLUSTER_NODE_DRAIN_IN_PROGRESS                                      syscall.Errno = 5962\n\tERROR_CLUSTER_DISK_NOT_CONNECTED                                          syscall.Errno = 5963\n\tERROR_DISK_NOT_CSV_CAPABLE                                                syscall.Errno = 5964\n\tERROR_RESOURCE_NOT_IN_AVAILABLE_STORAGE                                   syscall.Errno = 5965\n\tERROR_CLUSTER_SHARED_VOLUME_REDIRECTED                                    syscall.Errno = 5966\n\tERROR_CLUSTER_SHARED_VOLUME_NOT_REDIRECTED                                syscall.Errno = 5967\n\tERROR_CLUSTER_CANNOT_RETURN_PROPERTIES                                    syscall.Errno = 5968\n\tERROR_CLUSTER_RESOURCE_CONTAINS_UNSUPPORTED_DIFF_AREA_FOR_SHARED_VOLUMES  syscall.Errno = 5969\n\tERROR_CLUSTER_RESOURCE_IS_IN_MAINTENANCE_MODE                             syscall.Errno = 5970\n\tERROR_CLUSTER_AFFINITY_CONFLICT                                           syscall.Errno = 5971\n\tERROR_CLUSTER_RESOURCE_IS_REPLICA_VIRTUAL_MACHINE                         syscall.Errno = 5972\n\tERROR_CLUSTER_UPGRADE_INCOMPATIBLE_VERSIONS                               syscall.Errno = 5973\n\tERROR_CLUSTER_UPGRADE_FIX_QUORUM_NOT_SUPPORTED                            syscall.Errno = 5974\n\tERROR_CLUSTER_UPGRADE_RESTART_REQUIRED                                    syscall.Errno = 5975\n\tERROR_CLUSTER_UPGRADE_IN_PROGRESS                                         syscall.Errno = 5976\n\tERROR_CLUSTER_UPGRADE_INCOMPLETE                                          syscall.Errno = 5977\n\tERROR_CLUSTER_NODE_IN_GRACE_PERIOD                                        syscall.Errno = 5978\n\tERROR_CLUSTER_CSV_IO_PAUSE_TIMEOUT                                        syscall.Errno = 5979\n\tERROR_NODE_NOT_ACTIVE_CLUSTER_MEMBER                                      syscall.Errno = 5980\n\tERROR_CLUSTER_RESOURCE_NOT_MONITORED                                      syscall.Errno = 5981\n\tERROR_CLUSTER_RESOURCE_DOES_NOT_SUPPORT_UNMONITORED                       syscall.Errno = 5982\n\tERROR_CLUSTER_RESOURCE_IS_REPLICATED                                      syscall.Errno = 5983\n\tERROR_CLUSTER_NODE_ISOLATED                                               syscall.Errno = 5984\n\tERROR_CLUSTER_NODE_QUARANTINED                                            syscall.Errno = 5985\n\tERROR_CLUSTER_DATABASE_UPDATE_CONDITION_FAILED                            syscall.Errno = 5986\n\tERROR_CLUSTER_SPACE_DEGRADED                                              syscall.Errno = 5987\n\tERROR_CLUSTER_TOKEN_DELEGATION_NOT_SUPPORTED                              syscall.Errno = 5988\n\tERROR_CLUSTER_CSV_INVALID_HANDLE                                          syscall.Errno = 5989\n\tERROR_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR                           syscall.Errno = 5990\n\tERROR_GROUPSET_NOT_AVAILABLE                                              syscall.Errno = 5991\n\tERROR_GROUPSET_NOT_FOUND                                                  syscall.Errno = 5992\n\tERROR_GROUPSET_CANT_PROVIDE                                               syscall.Errno = 5993\n\tERROR_CLUSTER_FAULT_DOMAIN_PARENT_NOT_FOUND                               syscall.Errno = 5994\n\tERROR_CLUSTER_FAULT_DOMAIN_INVALID_HIERARCHY                              syscall.Errno = 5995\n\tERROR_CLUSTER_FAULT_DOMAIN_FAILED_S2D_VALIDATION                          syscall.Errno = 5996\n\tERROR_CLUSTER_FAULT_DOMAIN_S2D_CONNECTIVITY_LOSS                          syscall.Errno = 5997\n\tERROR_CLUSTER_INVALID_INFRASTRUCTURE_FILESERVER_NAME                      syscall.Errno = 5998\n\tERROR_CLUSTERSET_MANAGEMENT_CLUSTER_UNREACHABLE                           syscall.Errno = 5999\n\tERROR_ENCRYPTION_FAILED                                                   syscall.Errno = 6000\n\tERROR_DECRYPTION_FAILED                                                   syscall.Errno = 6001\n\tERROR_FILE_ENCRYPTED                                                      syscall.Errno = 6002\n\tERROR_NO_RECOVERY_POLICY                                                  syscall.Errno = 6003\n\tERROR_NO_EFS                                                              syscall.Errno = 6004\n\tERROR_WRONG_EFS                                                           syscall.Errno = 6005\n\tERROR_NO_USER_KEYS                                                        syscall.Errno = 6006\n\tERROR_FILE_NOT_ENCRYPTED                                                  syscall.Errno = 6007\n\tERROR_NOT_EXPORT_FORMAT                                                   syscall.Errno = 6008\n\tERROR_FILE_READ_ONLY                                                      syscall.Errno = 6009\n\tERROR_DIR_EFS_DISALLOWED                                                  syscall.Errno = 6010\n\tERROR_EFS_SERVER_NOT_TRUSTED                                              syscall.Errno = 6011\n\tERROR_BAD_RECOVERY_POLICY                                                 syscall.Errno = 6012\n\tERROR_EFS_ALG_BLOB_TOO_BIG                                                syscall.Errno = 6013\n\tERROR_VOLUME_NOT_SUPPORT_EFS                                              syscall.Errno = 6014\n\tERROR_EFS_DISABLED                                                        syscall.Errno = 6015\n\tERROR_EFS_VERSION_NOT_SUPPORT                                             syscall.Errno = 6016\n\tERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE                               syscall.Errno = 6017\n\tERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER                                    syscall.Errno = 6018\n\tERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE                               syscall.Errno = 6019\n\tERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE                                    syscall.Errno = 6020\n\tERROR_CS_ENCRYPTION_FILE_NOT_CSE                                          syscall.Errno = 6021\n\tERROR_ENCRYPTION_POLICY_DENIES_OPERATION                                  syscall.Errno = 6022\n\tERROR_WIP_ENCRYPTION_FAILED                                               syscall.Errno = 6023\n\tERROR_NO_BROWSER_SERVERS_FOUND                                            syscall.Errno = 6118\n\tSCHED_E_SERVICE_NOT_LOCALSYSTEM                                           syscall.Errno = 6200\n\tERROR_LOG_SECTOR_INVALID                                                  syscall.Errno = 6600\n\tERROR_LOG_SECTOR_PARITY_INVALID                                           syscall.Errno = 6601\n\tERROR_LOG_SECTOR_REMAPPED                                                 syscall.Errno = 6602\n\tERROR_LOG_BLOCK_INCOMPLETE                                                syscall.Errno = 6603\n\tERROR_LOG_INVALID_RANGE                                                   syscall.Errno = 6604\n\tERROR_LOG_BLOCKS_EXHAUSTED                                                syscall.Errno = 6605\n\tERROR_LOG_READ_CONTEXT_INVALID                                            syscall.Errno = 6606\n\tERROR_LOG_RESTART_INVALID                                                 syscall.Errno = 6607\n\tERROR_LOG_BLOCK_VERSION                                                   syscall.Errno = 6608\n\tERROR_LOG_BLOCK_INVALID                                                   syscall.Errno = 6609\n\tERROR_LOG_READ_MODE_INVALID                                               syscall.Errno = 6610\n\tERROR_LOG_NO_RESTART                                                      syscall.Errno = 6611\n\tERROR_LOG_METADATA_CORRUPT                                                syscall.Errno = 6612\n\tERROR_LOG_METADATA_INVALID                                                syscall.Errno = 6613\n\tERROR_LOG_METADATA_INCONSISTENT                                           syscall.Errno = 6614\n\tERROR_LOG_RESERVATION_INVALID                                             syscall.Errno = 6615\n\tERROR_LOG_CANT_DELETE                                                     syscall.Errno = 6616\n\tERROR_LOG_CONTAINER_LIMIT_EXCEEDED                                        syscall.Errno = 6617\n\tERROR_LOG_START_OF_LOG                                                    syscall.Errno = 6618\n\tERROR_LOG_POLICY_ALREADY_INSTALLED                                        syscall.Errno = 6619\n\tERROR_LOG_POLICY_NOT_INSTALLED                                            syscall.Errno = 6620\n\tERROR_LOG_POLICY_INVALID                                                  syscall.Errno = 6621\n\tERROR_LOG_POLICY_CONFLICT                                                 syscall.Errno = 6622\n\tERROR_LOG_PINNED_ARCHIVE_TAIL                                             syscall.Errno = 6623\n\tERROR_LOG_RECORD_NONEXISTENT                                              syscall.Errno = 6624\n\tERROR_LOG_RECORDS_RESERVED_INVALID                                        syscall.Errno = 6625\n\tERROR_LOG_SPACE_RESERVED_INVALID                                          syscall.Errno = 6626\n\tERROR_LOG_TAIL_INVALID                                                    syscall.Errno = 6627\n\tERROR_LOG_FULL                                                            syscall.Errno = 6628\n\tERROR_COULD_NOT_RESIZE_LOG                                                syscall.Errno = 6629\n\tERROR_LOG_MULTIPLEXED                                                     syscall.Errno = 6630\n\tERROR_LOG_DEDICATED                                                       syscall.Errno = 6631\n\tERROR_LOG_ARCHIVE_NOT_IN_PROGRESS                                         syscall.Errno = 6632\n\tERROR_LOG_ARCHIVE_IN_PROGRESS                                             syscall.Errno = 6633\n\tERROR_LOG_EPHEMERAL                                                       syscall.Errno = 6634\n\tERROR_LOG_NOT_ENOUGH_CONTAINERS                                           syscall.Errno = 6635\n\tERROR_LOG_CLIENT_ALREADY_REGISTERED                                       syscall.Errno = 6636\n\tERROR_LOG_CLIENT_NOT_REGISTERED                                           syscall.Errno = 6637\n\tERROR_LOG_FULL_HANDLER_IN_PROGRESS                                        syscall.Errno = 6638\n\tERROR_LOG_CONTAINER_READ_FAILED                                           syscall.Errno = 6639\n\tERROR_LOG_CONTAINER_WRITE_FAILED                                          syscall.Errno = 6640\n\tERROR_LOG_CONTAINER_OPEN_FAILED                                           syscall.Errno = 6641\n\tERROR_LOG_CONTAINER_STATE_INVALID                                         syscall.Errno = 6642\n\tERROR_LOG_STATE_INVALID                                                   syscall.Errno = 6643\n\tERROR_LOG_PINNED                                                          syscall.Errno = 6644\n\tERROR_LOG_METADATA_FLUSH_FAILED                                           syscall.Errno = 6645\n\tERROR_LOG_INCONSISTENT_SECURITY                                           syscall.Errno = 6646\n\tERROR_LOG_APPENDED_FLUSH_FAILED                                           syscall.Errno = 6647\n\tERROR_LOG_PINNED_RESERVATION                                              syscall.Errno = 6648\n\tERROR_INVALID_TRANSACTION                                                 syscall.Errno = 6700\n\tERROR_TRANSACTION_NOT_ACTIVE                                              syscall.Errno = 6701\n\tERROR_TRANSACTION_REQUEST_NOT_VALID                                       syscall.Errno = 6702\n\tERROR_TRANSACTION_NOT_REQUESTED                                           syscall.Errno = 6703\n\tERROR_TRANSACTION_ALREADY_ABORTED                                         syscall.Errno = 6704\n\tERROR_TRANSACTION_ALREADY_COMMITTED                                       syscall.Errno = 6705\n\tERROR_TM_INITIALIZATION_FAILED                                            syscall.Errno = 6706\n\tERROR_RESOURCEMANAGER_READ_ONLY                                           syscall.Errno = 6707\n\tERROR_TRANSACTION_NOT_JOINED                                              syscall.Errno = 6708\n\tERROR_TRANSACTION_SUPERIOR_EXISTS                                         syscall.Errno = 6709\n\tERROR_CRM_PROTOCOL_ALREADY_EXISTS                                         syscall.Errno = 6710\n\tERROR_TRANSACTION_PROPAGATION_FAILED                                      syscall.Errno = 6711\n\tERROR_CRM_PROTOCOL_NOT_FOUND                                              syscall.Errno = 6712\n\tERROR_TRANSACTION_INVALID_MARSHALL_BUFFER                                 syscall.Errno = 6713\n\tERROR_CURRENT_TRANSACTION_NOT_VALID                                       syscall.Errno = 6714\n\tERROR_TRANSACTION_NOT_FOUND                                               syscall.Errno = 6715\n\tERROR_RESOURCEMANAGER_NOT_FOUND                                           syscall.Errno = 6716\n\tERROR_ENLISTMENT_NOT_FOUND                                                syscall.Errno = 6717\n\tERROR_TRANSACTIONMANAGER_NOT_FOUND                                        syscall.Errno = 6718\n\tERROR_TRANSACTIONMANAGER_NOT_ONLINE                                       syscall.Errno = 6719\n\tERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION                          syscall.Errno = 6720\n\tERROR_TRANSACTION_NOT_ROOT                                                syscall.Errno = 6721\n\tERROR_TRANSACTION_OBJECT_EXPIRED                                          syscall.Errno = 6722\n\tERROR_TRANSACTION_RESPONSE_NOT_ENLISTED                                   syscall.Errno = 6723\n\tERROR_TRANSACTION_RECORD_TOO_LONG                                         syscall.Errno = 6724\n\tERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED                                  syscall.Errno = 6725\n\tERROR_TRANSACTION_INTEGRITY_VIOLATED                                      syscall.Errno = 6726\n\tERROR_TRANSACTIONMANAGER_IDENTITY_MISMATCH                                syscall.Errno = 6727\n\tERROR_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT                                    syscall.Errno = 6728\n\tERROR_TRANSACTION_MUST_WRITETHROUGH                                       syscall.Errno = 6729\n\tERROR_TRANSACTION_NO_SUPERIOR                                             syscall.Errno = 6730\n\tERROR_HEURISTIC_DAMAGE_POSSIBLE                                           syscall.Errno = 6731\n\tERROR_TRANSACTIONAL_CONFLICT                                              syscall.Errno = 6800\n\tERROR_RM_NOT_ACTIVE                                                       syscall.Errno = 6801\n\tERROR_RM_METADATA_CORRUPT                                                 syscall.Errno = 6802\n\tERROR_DIRECTORY_NOT_RM                                                    syscall.Errno = 6803\n\tERROR_TRANSACTIONS_UNSUPPORTED_REMOTE                                     syscall.Errno = 6805\n\tERROR_LOG_RESIZE_INVALID_SIZE                                             syscall.Errno = 6806\n\tERROR_OBJECT_NO_LONGER_EXISTS                                             syscall.Errno = 6807\n\tERROR_STREAM_MINIVERSION_NOT_FOUND                                        syscall.Errno = 6808\n\tERROR_STREAM_MINIVERSION_NOT_VALID                                        syscall.Errno = 6809\n\tERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION                 syscall.Errno = 6810\n\tERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT                            syscall.Errno = 6811\n\tERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS                                syscall.Errno = 6812\n\tERROR_REMOTE_FILE_VERSION_MISMATCH                                        syscall.Errno = 6814\n\tERROR_HANDLE_NO_LONGER_VALID                                              syscall.Errno = 6815\n\tERROR_NO_TXF_METADATA                                                     syscall.Errno = 6816\n\tERROR_LOG_CORRUPTION_DETECTED                                             syscall.Errno = 6817\n\tERROR_CANT_RECOVER_WITH_HANDLE_OPEN                                       syscall.Errno = 6818\n\tERROR_RM_DISCONNECTED                                                     syscall.Errno = 6819\n\tERROR_ENLISTMENT_NOT_SUPERIOR                                             syscall.Errno = 6820\n\tERROR_RECOVERY_NOT_NEEDED                                                 syscall.Errno = 6821\n\tERROR_RM_ALREADY_STARTED                                                  syscall.Errno = 6822\n\tERROR_FILE_IDENTITY_NOT_PERSISTENT                                        syscall.Errno = 6823\n\tERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY                                 syscall.Errno = 6824\n\tERROR_CANT_CROSS_RM_BOUNDARY                                              syscall.Errno = 6825\n\tERROR_TXF_DIR_NOT_EMPTY                                                   syscall.Errno = 6826\n\tERROR_INDOUBT_TRANSACTIONS_EXIST                                          syscall.Errno = 6827\n\tERROR_TM_VOLATILE                                                         syscall.Errno = 6828\n\tERROR_ROLLBACK_TIMER_EXPIRED                                              syscall.Errno = 6829\n\tERROR_TXF_ATTRIBUTE_CORRUPT                                               syscall.Errno = 6830\n\tERROR_EFS_NOT_ALLOWED_IN_TRANSACTION                                      syscall.Errno = 6831\n\tERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED                                      syscall.Errno = 6832\n\tERROR_LOG_GROWTH_FAILED                                                   syscall.Errno = 6833\n\tERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE                               syscall.Errno = 6834\n\tERROR_TXF_METADATA_ALREADY_PRESENT                                        syscall.Errno = 6835\n\tERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET                                 syscall.Errno = 6836\n\tERROR_TRANSACTION_REQUIRED_PROMOTION                                      syscall.Errno = 6837\n\tERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION                                  syscall.Errno = 6838\n\tERROR_TRANSACTIONS_NOT_FROZEN                                             syscall.Errno = 6839\n\tERROR_TRANSACTION_FREEZE_IN_PROGRESS                                      syscall.Errno = 6840\n\tERROR_NOT_SNAPSHOT_VOLUME                                                 syscall.Errno = 6841\n\tERROR_NO_SAVEPOINT_WITH_OPEN_FILES                                        syscall.Errno = 6842\n\tERROR_DATA_LOST_REPAIR                                                    syscall.Errno = 6843\n\tERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION                                   syscall.Errno = 6844\n\tERROR_TM_IDENTITY_MISMATCH                                                syscall.Errno = 6845\n\tERROR_FLOATED_SECTION                                                     syscall.Errno = 6846\n\tERROR_CANNOT_ACCEPT_TRANSACTED_WORK                                       syscall.Errno = 6847\n\tERROR_CANNOT_ABORT_TRANSACTIONS                                           syscall.Errno = 6848\n\tERROR_BAD_CLUSTERS                                                        syscall.Errno = 6849\n\tERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION                              syscall.Errno = 6850\n\tERROR_VOLUME_DIRTY                                                        syscall.Errno = 6851\n\tERROR_NO_LINK_TRACKING_IN_TRANSACTION                                     syscall.Errno = 6852\n\tERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION                              syscall.Errno = 6853\n\tERROR_EXPIRED_HANDLE                                                      syscall.Errno = 6854\n\tERROR_TRANSACTION_NOT_ENLISTED                                            syscall.Errno = 6855\n\tERROR_CTX_WINSTATION_NAME_INVALID                                         syscall.Errno = 7001\n\tERROR_CTX_INVALID_PD                                                      syscall.Errno = 7002\n\tERROR_CTX_PD_NOT_FOUND                                                    syscall.Errno = 7003\n\tERROR_CTX_WD_NOT_FOUND                                                    syscall.Errno = 7004\n\tERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY                                      syscall.Errno = 7005\n\tERROR_CTX_SERVICE_NAME_COLLISION                                          syscall.Errno = 7006\n\tERROR_CTX_CLOSE_PENDING                                                   syscall.Errno = 7007\n\tERROR_CTX_NO_OUTBUF                                                       syscall.Errno = 7008\n\tERROR_CTX_MODEM_INF_NOT_FOUND                                             syscall.Errno = 7009\n\tERROR_CTX_INVALID_MODEMNAME                                               syscall.Errno = 7010\n\tERROR_CTX_MODEM_RESPONSE_ERROR                                            syscall.Errno = 7011\n\tERROR_CTX_MODEM_RESPONSE_TIMEOUT                                          syscall.Errno = 7012\n\tERROR_CTX_MODEM_RESPONSE_NO_CARRIER                                       syscall.Errno = 7013\n\tERROR_CTX_MODEM_RESPONSE_NO_DIALTONE                                      syscall.Errno = 7014\n\tERROR_CTX_MODEM_RESPONSE_BUSY                                             syscall.Errno = 7015\n\tERROR_CTX_MODEM_RESPONSE_VOICE                                            syscall.Errno = 7016\n\tERROR_CTX_TD_ERROR                                                        syscall.Errno = 7017\n\tERROR_CTX_WINSTATION_NOT_FOUND                                            syscall.Errno = 7022\n\tERROR_CTX_WINSTATION_ALREADY_EXISTS                                       syscall.Errno = 7023\n\tERROR_CTX_WINSTATION_BUSY                                                 syscall.Errno = 7024\n\tERROR_CTX_BAD_VIDEO_MODE                                                  syscall.Errno = 7025\n\tERROR_CTX_GRAPHICS_INVALID                                                syscall.Errno = 7035\n\tERROR_CTX_LOGON_DISABLED                                                  syscall.Errno = 7037\n\tERROR_CTX_NOT_CONSOLE                                                     syscall.Errno = 7038\n\tERROR_CTX_CLIENT_QUERY_TIMEOUT                                            syscall.Errno = 7040\n\tERROR_CTX_CONSOLE_DISCONNECT                                              syscall.Errno = 7041\n\tERROR_CTX_CONSOLE_CONNECT                                                 syscall.Errno = 7042\n\tERROR_CTX_SHADOW_DENIED                                                   syscall.Errno = 7044\n\tERROR_CTX_WINSTATION_ACCESS_DENIED                                        syscall.Errno = 7045\n\tERROR_CTX_INVALID_WD                                                      syscall.Errno = 7049\n\tERROR_CTX_SHADOW_INVALID                                                  syscall.Errno = 7050\n\tERROR_CTX_SHADOW_DISABLED                                                 syscall.Errno = 7051\n\tERROR_CTX_CLIENT_LICENSE_IN_USE                                           syscall.Errno = 7052\n\tERROR_CTX_CLIENT_LICENSE_NOT_SET                                          syscall.Errno = 7053\n\tERROR_CTX_LICENSE_NOT_AVAILABLE                                           syscall.Errno = 7054\n\tERROR_CTX_LICENSE_CLIENT_INVALID                                          syscall.Errno = 7055\n\tERROR_CTX_LICENSE_EXPIRED                                                 syscall.Errno = 7056\n\tERROR_CTX_SHADOW_NOT_RUNNING                                              syscall.Errno = 7057\n\tERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE                                     syscall.Errno = 7058\n\tERROR_ACTIVATION_COUNT_EXCEEDED                                           syscall.Errno = 7059\n\tERROR_CTX_WINSTATIONS_DISABLED                                            syscall.Errno = 7060\n\tERROR_CTX_ENCRYPTION_LEVEL_REQUIRED                                       syscall.Errno = 7061\n\tERROR_CTX_SESSION_IN_USE                                                  syscall.Errno = 7062\n\tERROR_CTX_NO_FORCE_LOGOFF                                                 syscall.Errno = 7063\n\tERROR_CTX_ACCOUNT_RESTRICTION                                             syscall.Errno = 7064\n\tERROR_RDP_PROTOCOL_ERROR                                                  syscall.Errno = 7065\n\tERROR_CTX_CDM_CONNECT                                                     syscall.Errno = 7066\n\tERROR_CTX_CDM_DISCONNECT                                                  syscall.Errno = 7067\n\tERROR_CTX_SECURITY_LAYER_ERROR                                            syscall.Errno = 7068\n\tERROR_TS_INCOMPATIBLE_SESSIONS                                            syscall.Errno = 7069\n\tERROR_TS_VIDEO_SUBSYSTEM_ERROR                                            syscall.Errno = 7070\n\tFRS_ERR_INVALID_API_SEQUENCE                                              syscall.Errno = 8001\n\tFRS_ERR_STARTING_SERVICE                                                  syscall.Errno = 8002\n\tFRS_ERR_STOPPING_SERVICE                                                  syscall.Errno = 8003\n\tFRS_ERR_INTERNAL_API                                                      syscall.Errno = 8004\n\tFRS_ERR_INTERNAL                                                          syscall.Errno = 8005\n\tFRS_ERR_SERVICE_COMM                                                      syscall.Errno = 8006\n\tFRS_ERR_INSUFFICIENT_PRIV                                                 syscall.Errno = 8007\n\tFRS_ERR_AUTHENTICATION                                                    syscall.Errno = 8008\n\tFRS_ERR_PARENT_INSUFFICIENT_PRIV                                          syscall.Errno = 8009\n\tFRS_ERR_PARENT_AUTHENTICATION                                             syscall.Errno = 8010\n\tFRS_ERR_CHILD_TO_PARENT_COMM                                              syscall.Errno = 8011\n\tFRS_ERR_PARENT_TO_CHILD_COMM                                              syscall.Errno = 8012\n\tFRS_ERR_SYSVOL_POPULATE                                                   syscall.Errno = 8013\n\tFRS_ERR_SYSVOL_POPULATE_TIMEOUT                                           syscall.Errno = 8014\n\tFRS_ERR_SYSVOL_IS_BUSY                                                    syscall.Errno = 8015\n\tFRS_ERR_SYSVOL_DEMOTE                                                     syscall.Errno = 8016\n\tFRS_ERR_INVALID_SERVICE_PARAMETER                                         syscall.Errno = 8017\n\tDS_S_SUCCESS                                                                            = ERROR_SUCCESS\n\tERROR_DS_NOT_INSTALLED                                                    syscall.Errno = 8200\n\tERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY                                     syscall.Errno = 8201\n\tERROR_DS_NO_ATTRIBUTE_OR_VALUE                                            syscall.Errno = 8202\n\tERROR_DS_INVALID_ATTRIBUTE_SYNTAX                                         syscall.Errno = 8203\n\tERROR_DS_ATTRIBUTE_TYPE_UNDEFINED                                         syscall.Errno = 8204\n\tERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS                                        syscall.Errno = 8205\n\tERROR_DS_BUSY                                                             syscall.Errno = 8206\n\tERROR_DS_UNAVAILABLE                                                      syscall.Errno = 8207\n\tERROR_DS_NO_RIDS_ALLOCATED                                                syscall.Errno = 8208\n\tERROR_DS_NO_MORE_RIDS                                                     syscall.Errno = 8209\n\tERROR_DS_INCORRECT_ROLE_OWNER                                             syscall.Errno = 8210\n\tERROR_DS_RIDMGR_INIT_ERROR                                                syscall.Errno = 8211\n\tERROR_DS_OBJ_CLASS_VIOLATION                                              syscall.Errno = 8212\n\tERROR_DS_CANT_ON_NON_LEAF                                                 syscall.Errno = 8213\n\tERROR_DS_CANT_ON_RDN                                                      syscall.Errno = 8214\n\tERROR_DS_CANT_MOD_OBJ_CLASS                                               syscall.Errno = 8215\n\tERROR_DS_CROSS_DOM_MOVE_ERROR                                             syscall.Errno = 8216\n\tERROR_DS_GC_NOT_AVAILABLE                                                 syscall.Errno = 8217\n\tERROR_SHARED_POLICY                                                       syscall.Errno = 8218\n\tERROR_POLICY_OBJECT_NOT_FOUND                                             syscall.Errno = 8219\n\tERROR_POLICY_ONLY_IN_DS                                                   syscall.Errno = 8220\n\tERROR_PROMOTION_ACTIVE                                                    syscall.Errno = 8221\n\tERROR_NO_PROMOTION_ACTIVE                                                 syscall.Errno = 8222\n\tERROR_DS_OPERATIONS_ERROR                                                 syscall.Errno = 8224\n\tERROR_DS_PROTOCOL_ERROR                                                   syscall.Errno = 8225\n\tERROR_DS_TIMELIMIT_EXCEEDED                                               syscall.Errno = 8226\n\tERROR_DS_SIZELIMIT_EXCEEDED                                               syscall.Errno = 8227\n\tERROR_DS_ADMIN_LIMIT_EXCEEDED                                             syscall.Errno = 8228\n\tERROR_DS_COMPARE_FALSE                                                    syscall.Errno = 8229\n\tERROR_DS_COMPARE_TRUE                                                     syscall.Errno = 8230\n\tERROR_DS_AUTH_METHOD_NOT_SUPPORTED                                        syscall.Errno = 8231\n\tERROR_DS_STRONG_AUTH_REQUIRED                                             syscall.Errno = 8232\n\tERROR_DS_INAPPROPRIATE_AUTH                                               syscall.Errno = 8233\n\tERROR_DS_AUTH_UNKNOWN                                                     syscall.Errno = 8234\n\tERROR_DS_REFERRAL                                                         syscall.Errno = 8235\n\tERROR_DS_UNAVAILABLE_CRIT_EXTENSION                                       syscall.Errno = 8236\n\tERROR_DS_CONFIDENTIALITY_REQUIRED                                         syscall.Errno = 8237\n\tERROR_DS_INAPPROPRIATE_MATCHING                                           syscall.Errno = 8238\n\tERROR_DS_CONSTRAINT_VIOLATION                                             syscall.Errno = 8239\n\tERROR_DS_NO_SUCH_OBJECT                                                   syscall.Errno = 8240\n\tERROR_DS_ALIAS_PROBLEM                                                    syscall.Errno = 8241\n\tERROR_DS_INVALID_DN_SYNTAX                                                syscall.Errno = 8242\n\tERROR_DS_IS_LEAF                                                          syscall.Errno = 8243\n\tERROR_DS_ALIAS_DEREF_PROBLEM                                              syscall.Errno = 8244\n\tERROR_DS_UNWILLING_TO_PERFORM                                             syscall.Errno = 8245\n\tERROR_DS_LOOP_DETECT                                                      syscall.Errno = 8246\n\tERROR_DS_NAMING_VIOLATION                                                 syscall.Errno = 8247\n\tERROR_DS_OBJECT_RESULTS_TOO_LARGE                                         syscall.Errno = 8248\n\tERROR_DS_AFFECTS_MULTIPLE_DSAS                                            syscall.Errno = 8249\n\tERROR_DS_SERVER_DOWN                                                      syscall.Errno = 8250\n\tERROR_DS_LOCAL_ERROR                                                      syscall.Errno = 8251\n\tERROR_DS_ENCODING_ERROR                                                   syscall.Errno = 8252\n\tERROR_DS_DECODING_ERROR                                                   syscall.Errno = 8253\n\tERROR_DS_FILTER_UNKNOWN                                                   syscall.Errno = 8254\n\tERROR_DS_PARAM_ERROR                                                      syscall.Errno = 8255\n\tERROR_DS_NOT_SUPPORTED                                                    syscall.Errno = 8256\n\tERROR_DS_NO_RESULTS_RETURNED                                              syscall.Errno = 8257\n\tERROR_DS_CONTROL_NOT_FOUND                                                syscall.Errno = 8258\n\tERROR_DS_CLIENT_LOOP                                                      syscall.Errno = 8259\n\tERROR_DS_REFERRAL_LIMIT_EXCEEDED                                          syscall.Errno = 8260\n\tERROR_DS_SORT_CONTROL_MISSING                                             syscall.Errno = 8261\n\tERROR_DS_OFFSET_RANGE_ERROR                                               syscall.Errno = 8262\n\tERROR_DS_RIDMGR_DISABLED                                                  syscall.Errno = 8263\n\tERROR_DS_ROOT_MUST_BE_NC                                                  syscall.Errno = 8301\n\tERROR_DS_ADD_REPLICA_INHIBITED                                            syscall.Errno = 8302\n\tERROR_DS_ATT_NOT_DEF_IN_SCHEMA                                            syscall.Errno = 8303\n\tERROR_DS_MAX_OBJ_SIZE_EXCEEDED                                            syscall.Errno = 8304\n\tERROR_DS_OBJ_STRING_NAME_EXISTS                                           syscall.Errno = 8305\n\tERROR_DS_NO_RDN_DEFINED_IN_SCHEMA                                         syscall.Errno = 8306\n\tERROR_DS_RDN_DOESNT_MATCH_SCHEMA                                          syscall.Errno = 8307\n\tERROR_DS_NO_REQUESTED_ATTS_FOUND                                          syscall.Errno = 8308\n\tERROR_DS_USER_BUFFER_TO_SMALL                                             syscall.Errno = 8309\n\tERROR_DS_ATT_IS_NOT_ON_OBJ                                                syscall.Errno = 8310\n\tERROR_DS_ILLEGAL_MOD_OPERATION                                            syscall.Errno = 8311\n\tERROR_DS_OBJ_TOO_LARGE                                                    syscall.Errno = 8312\n\tERROR_DS_BAD_INSTANCE_TYPE                                                syscall.Errno = 8313\n\tERROR_DS_MASTERDSA_REQUIRED                                               syscall.Errno = 8314\n\tERROR_DS_OBJECT_CLASS_REQUIRED                                            syscall.Errno = 8315\n\tERROR_DS_MISSING_REQUIRED_ATT                                             syscall.Errno = 8316\n\tERROR_DS_ATT_NOT_DEF_FOR_CLASS                                            syscall.Errno = 8317\n\tERROR_DS_ATT_ALREADY_EXISTS                                               syscall.Errno = 8318\n\tERROR_DS_CANT_ADD_ATT_VALUES                                              syscall.Errno = 8320\n\tERROR_DS_SINGLE_VALUE_CONSTRAINT                                          syscall.Errno = 8321\n\tERROR_DS_RANGE_CONSTRAINT                                                 syscall.Errno = 8322\n\tERROR_DS_ATT_VAL_ALREADY_EXISTS                                           syscall.Errno = 8323\n\tERROR_DS_CANT_REM_MISSING_ATT                                             syscall.Errno = 8324\n\tERROR_DS_CANT_REM_MISSING_ATT_VAL                                         syscall.Errno = 8325\n\tERROR_DS_ROOT_CANT_BE_SUBREF                                              syscall.Errno = 8326\n\tERROR_DS_NO_CHAINING                                                      syscall.Errno = 8327\n\tERROR_DS_NO_CHAINED_EVAL                                                  syscall.Errno = 8328\n\tERROR_DS_NO_PARENT_OBJECT                                                 syscall.Errno = 8329\n\tERROR_DS_PARENT_IS_AN_ALIAS                                               syscall.Errno = 8330\n\tERROR_DS_CANT_MIX_MASTER_AND_REPS                                         syscall.Errno = 8331\n\tERROR_DS_CHILDREN_EXIST                                                   syscall.Errno = 8332\n\tERROR_DS_OBJ_NOT_FOUND                                                    syscall.Errno = 8333\n\tERROR_DS_ALIASED_OBJ_MISSING                                              syscall.Errno = 8334\n\tERROR_DS_BAD_NAME_SYNTAX                                                  syscall.Errno = 8335\n\tERROR_DS_ALIAS_POINTS_TO_ALIAS                                            syscall.Errno = 8336\n\tERROR_DS_CANT_DEREF_ALIAS                                                 syscall.Errno = 8337\n\tERROR_DS_OUT_OF_SCOPE                                                     syscall.Errno = 8338\n\tERROR_DS_OBJECT_BEING_REMOVED                                             syscall.Errno = 8339\n\tERROR_DS_CANT_DELETE_DSA_OBJ                                              syscall.Errno = 8340\n\tERROR_DS_GENERIC_ERROR                                                    syscall.Errno = 8341\n\tERROR_DS_DSA_MUST_BE_INT_MASTER                                           syscall.Errno = 8342\n\tERROR_DS_CLASS_NOT_DSA                                                    syscall.Errno = 8343\n\tERROR_DS_INSUFF_ACCESS_RIGHTS                                             syscall.Errno = 8344\n\tERROR_DS_ILLEGAL_SUPERIOR                                                 syscall.Errno = 8345\n\tERROR_DS_ATTRIBUTE_OWNED_BY_SAM                                           syscall.Errno = 8346\n\tERROR_DS_NAME_TOO_MANY_PARTS                                              syscall.Errno = 8347\n\tERROR_DS_NAME_TOO_LONG                                                    syscall.Errno = 8348\n\tERROR_DS_NAME_VALUE_TOO_LONG                                              syscall.Errno = 8349\n\tERROR_DS_NAME_UNPARSEABLE                                                 syscall.Errno = 8350\n\tERROR_DS_NAME_TYPE_UNKNOWN                                                syscall.Errno = 8351\n\tERROR_DS_NOT_AN_OBJECT                                                    syscall.Errno = 8352\n\tERROR_DS_SEC_DESC_TOO_SHORT                                               syscall.Errno = 8353\n\tERROR_DS_SEC_DESC_INVALID                                                 syscall.Errno = 8354\n\tERROR_DS_NO_DELETED_NAME                                                  syscall.Errno = 8355\n\tERROR_DS_SUBREF_MUST_HAVE_PARENT                                          syscall.Errno = 8356\n\tERROR_DS_NCNAME_MUST_BE_NC                                                syscall.Errno = 8357\n\tERROR_DS_CANT_ADD_SYSTEM_ONLY                                             syscall.Errno = 8358\n\tERROR_DS_CLASS_MUST_BE_CONCRETE                                           syscall.Errno = 8359\n\tERROR_DS_INVALID_DMD                                                      syscall.Errno = 8360\n\tERROR_DS_OBJ_GUID_EXISTS                                                  syscall.Errno = 8361\n\tERROR_DS_NOT_ON_BACKLINK                                                  syscall.Errno = 8362\n\tERROR_DS_NO_CROSSREF_FOR_NC                                               syscall.Errno = 8363\n\tERROR_DS_SHUTTING_DOWN                                                    syscall.Errno = 8364\n\tERROR_DS_UNKNOWN_OPERATION                                                syscall.Errno = 8365\n\tERROR_DS_INVALID_ROLE_OWNER                                               syscall.Errno = 8366\n\tERROR_DS_COULDNT_CONTACT_FSMO                                             syscall.Errno = 8367\n\tERROR_DS_CROSS_NC_DN_RENAME                                               syscall.Errno = 8368\n\tERROR_DS_CANT_MOD_SYSTEM_ONLY                                             syscall.Errno = 8369\n\tERROR_DS_REPLICATOR_ONLY                                                  syscall.Errno = 8370\n\tERROR_DS_OBJ_CLASS_NOT_DEFINED                                            syscall.Errno = 8371\n\tERROR_DS_OBJ_CLASS_NOT_SUBCLASS                                           syscall.Errno = 8372\n\tERROR_DS_NAME_REFERENCE_INVALID                                           syscall.Errno = 8373\n\tERROR_DS_CROSS_REF_EXISTS                                                 syscall.Errno = 8374\n\tERROR_DS_CANT_DEL_MASTER_CROSSREF                                         syscall.Errno = 8375\n\tERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD                                       syscall.Errno = 8376\n\tERROR_DS_NOTIFY_FILTER_TOO_COMPLEX                                        syscall.Errno = 8377\n\tERROR_DS_DUP_RDN                                                          syscall.Errno = 8378\n\tERROR_DS_DUP_OID                                                          syscall.Errno = 8379\n\tERROR_DS_DUP_MAPI_ID                                                      syscall.Errno = 8380\n\tERROR_DS_DUP_SCHEMA_ID_GUID                                               syscall.Errno = 8381\n\tERROR_DS_DUP_LDAP_DISPLAY_NAME                                            syscall.Errno = 8382\n\tERROR_DS_SEMANTIC_ATT_TEST                                                syscall.Errno = 8383\n\tERROR_DS_SYNTAX_MISMATCH                                                  syscall.Errno = 8384\n\tERROR_DS_EXISTS_IN_MUST_HAVE                                              syscall.Errno = 8385\n\tERROR_DS_EXISTS_IN_MAY_HAVE                                               syscall.Errno = 8386\n\tERROR_DS_NONEXISTENT_MAY_HAVE                                             syscall.Errno = 8387\n\tERROR_DS_NONEXISTENT_MUST_HAVE                                            syscall.Errno = 8388\n\tERROR_DS_AUX_CLS_TEST_FAIL                                                syscall.Errno = 8389\n\tERROR_DS_NONEXISTENT_POSS_SUP                                             syscall.Errno = 8390\n\tERROR_DS_SUB_CLS_TEST_FAIL                                                syscall.Errno = 8391\n\tERROR_DS_BAD_RDN_ATT_ID_SYNTAX                                            syscall.Errno = 8392\n\tERROR_DS_EXISTS_IN_AUX_CLS                                                syscall.Errno = 8393\n\tERROR_DS_EXISTS_IN_SUB_CLS                                                syscall.Errno = 8394\n\tERROR_DS_EXISTS_IN_POSS_SUP                                               syscall.Errno = 8395\n\tERROR_DS_RECALCSCHEMA_FAILED                                              syscall.Errno = 8396\n\tERROR_DS_TREE_DELETE_NOT_FINISHED                                         syscall.Errno = 8397\n\tERROR_DS_CANT_DELETE                                                      syscall.Errno = 8398\n\tERROR_DS_ATT_SCHEMA_REQ_ID                                                syscall.Errno = 8399\n\tERROR_DS_BAD_ATT_SCHEMA_SYNTAX                                            syscall.Errno = 8400\n\tERROR_DS_CANT_CACHE_ATT                                                   syscall.Errno = 8401\n\tERROR_DS_CANT_CACHE_CLASS                                                 syscall.Errno = 8402\n\tERROR_DS_CANT_REMOVE_ATT_CACHE                                            syscall.Errno = 8403\n\tERROR_DS_CANT_REMOVE_CLASS_CACHE                                          syscall.Errno = 8404\n\tERROR_DS_CANT_RETRIEVE_DN                                                 syscall.Errno = 8405\n\tERROR_DS_MISSING_SUPREF                                                   syscall.Errno = 8406\n\tERROR_DS_CANT_RETRIEVE_INSTANCE                                           syscall.Errno = 8407\n\tERROR_DS_CODE_INCONSISTENCY                                               syscall.Errno = 8408\n\tERROR_DS_DATABASE_ERROR                                                   syscall.Errno = 8409\n\tERROR_DS_GOVERNSID_MISSING                                                syscall.Errno = 8410\n\tERROR_DS_MISSING_EXPECTED_ATT                                             syscall.Errno = 8411\n\tERROR_DS_NCNAME_MISSING_CR_REF                                            syscall.Errno = 8412\n\tERROR_DS_SECURITY_CHECKING_ERROR                                          syscall.Errno = 8413\n\tERROR_DS_SCHEMA_NOT_LOADED                                                syscall.Errno = 8414\n\tERROR_DS_SCHEMA_ALLOC_FAILED                                              syscall.Errno = 8415\n\tERROR_DS_ATT_SCHEMA_REQ_SYNTAX                                            syscall.Errno = 8416\n\tERROR_DS_GCVERIFY_ERROR                                                   syscall.Errno = 8417\n\tERROR_DS_DRA_SCHEMA_MISMATCH                                              syscall.Errno = 8418\n\tERROR_DS_CANT_FIND_DSA_OBJ                                                syscall.Errno = 8419\n\tERROR_DS_CANT_FIND_EXPECTED_NC                                            syscall.Errno = 8420\n\tERROR_DS_CANT_FIND_NC_IN_CACHE                                            syscall.Errno = 8421\n\tERROR_DS_CANT_RETRIEVE_CHILD                                              syscall.Errno = 8422\n\tERROR_DS_SECURITY_ILLEGAL_MODIFY                                          syscall.Errno = 8423\n\tERROR_DS_CANT_REPLACE_HIDDEN_REC                                          syscall.Errno = 8424\n\tERROR_DS_BAD_HIERARCHY_FILE                                               syscall.Errno = 8425\n\tERROR_DS_BUILD_HIERARCHY_TABLE_FAILED                                     syscall.Errno = 8426\n\tERROR_DS_CONFIG_PARAM_MISSING                                             syscall.Errno = 8427\n\tERROR_DS_COUNTING_AB_INDICES_FAILED                                       syscall.Errno = 8428\n\tERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED                                    syscall.Errno = 8429\n\tERROR_DS_INTERNAL_FAILURE                                                 syscall.Errno = 8430\n\tERROR_DS_UNKNOWN_ERROR                                                    syscall.Errno = 8431\n\tERROR_DS_ROOT_REQUIRES_CLASS_TOP                                          syscall.Errno = 8432\n\tERROR_DS_REFUSING_FSMO_ROLES                                              syscall.Errno = 8433\n\tERROR_DS_MISSING_FSMO_SETTINGS                                            syscall.Errno = 8434\n\tERROR_DS_UNABLE_TO_SURRENDER_ROLES                                        syscall.Errno = 8435\n\tERROR_DS_DRA_GENERIC                                                      syscall.Errno = 8436\n\tERROR_DS_DRA_INVALID_PARAMETER                                            syscall.Errno = 8437\n\tERROR_DS_DRA_BUSY                                                         syscall.Errno = 8438\n\tERROR_DS_DRA_BAD_DN                                                       syscall.Errno = 8439\n\tERROR_DS_DRA_BAD_NC                                                       syscall.Errno = 8440\n\tERROR_DS_DRA_DN_EXISTS                                                    syscall.Errno = 8441\n\tERROR_DS_DRA_INTERNAL_ERROR                                               syscall.Errno = 8442\n\tERROR_DS_DRA_INCONSISTENT_DIT                                             syscall.Errno = 8443\n\tERROR_DS_DRA_CONNECTION_FAILED                                            syscall.Errno = 8444\n\tERROR_DS_DRA_BAD_INSTANCE_TYPE                                            syscall.Errno = 8445\n\tERROR_DS_DRA_OUT_OF_MEM                                                   syscall.Errno = 8446\n\tERROR_DS_DRA_MAIL_PROBLEM                                                 syscall.Errno = 8447\n\tERROR_DS_DRA_REF_ALREADY_EXISTS                                           syscall.Errno = 8448\n\tERROR_DS_DRA_REF_NOT_FOUND                                                syscall.Errno = 8449\n\tERROR_DS_DRA_OBJ_IS_REP_SOURCE                                            syscall.Errno = 8450\n\tERROR_DS_DRA_DB_ERROR                                                     syscall.Errno = 8451\n\tERROR_DS_DRA_NO_REPLICA                                                   syscall.Errno = 8452\n\tERROR_DS_DRA_ACCESS_DENIED                                                syscall.Errno = 8453\n\tERROR_DS_DRA_NOT_SUPPORTED                                                syscall.Errno = 8454\n\tERROR_DS_DRA_RPC_CANCELLED                                                syscall.Errno = 8455\n\tERROR_DS_DRA_SOURCE_DISABLED                                              syscall.Errno = 8456\n\tERROR_DS_DRA_SINK_DISABLED                                                syscall.Errno = 8457\n\tERROR_DS_DRA_NAME_COLLISION                                               syscall.Errno = 8458\n\tERROR_DS_DRA_SOURCE_REINSTALLED                                           syscall.Errno = 8459\n\tERROR_DS_DRA_MISSING_PARENT                                               syscall.Errno = 8460\n\tERROR_DS_DRA_PREEMPTED                                                    syscall.Errno = 8461\n\tERROR_DS_DRA_ABANDON_SYNC                                                 syscall.Errno = 8462\n\tERROR_DS_DRA_SHUTDOWN                                                     syscall.Errno = 8463\n\tERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET                                     syscall.Errno = 8464\n\tERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA                                    syscall.Errno = 8465\n\tERROR_DS_DRA_EXTN_CONNECTION_FAILED                                       syscall.Errno = 8466\n\tERROR_DS_INSTALL_SCHEMA_MISMATCH                                          syscall.Errno = 8467\n\tERROR_DS_DUP_LINK_ID                                                      syscall.Errno = 8468\n\tERROR_DS_NAME_ERROR_RESOLVING                                             syscall.Errno = 8469\n\tERROR_DS_NAME_ERROR_NOT_FOUND                                             syscall.Errno = 8470\n\tERROR_DS_NAME_ERROR_NOT_UNIQUE                                            syscall.Errno = 8471\n\tERROR_DS_NAME_ERROR_NO_MAPPING                                            syscall.Errno = 8472\n\tERROR_DS_NAME_ERROR_DOMAIN_ONLY                                           syscall.Errno = 8473\n\tERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING                                syscall.Errno = 8474\n\tERROR_DS_CONSTRUCTED_ATT_MOD                                              syscall.Errno = 8475\n\tERROR_DS_WRONG_OM_OBJ_CLASS                                               syscall.Errno = 8476\n\tERROR_DS_DRA_REPL_PENDING                                                 syscall.Errno = 8477\n\tERROR_DS_DS_REQUIRED                                                      syscall.Errno = 8478\n\tERROR_DS_INVALID_LDAP_DISPLAY_NAME                                        syscall.Errno = 8479\n\tERROR_DS_NON_BASE_SEARCH                                                  syscall.Errno = 8480\n\tERROR_DS_CANT_RETRIEVE_ATTS                                               syscall.Errno = 8481\n\tERROR_DS_BACKLINK_WITHOUT_LINK                                            syscall.Errno = 8482\n\tERROR_DS_EPOCH_MISMATCH                                                   syscall.Errno = 8483\n\tERROR_DS_SRC_NAME_MISMATCH                                                syscall.Errno = 8484\n\tERROR_DS_SRC_AND_DST_NC_IDENTICAL                                         syscall.Errno = 8485\n\tERROR_DS_DST_NC_MISMATCH                                                  syscall.Errno = 8486\n\tERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC                                       syscall.Errno = 8487\n\tERROR_DS_SRC_GUID_MISMATCH                                                syscall.Errno = 8488\n\tERROR_DS_CANT_MOVE_DELETED_OBJECT                                         syscall.Errno = 8489\n\tERROR_DS_PDC_OPERATION_IN_PROGRESS                                        syscall.Errno = 8490\n\tERROR_DS_CROSS_DOMAIN_CLEANUP_REQD                                        syscall.Errno = 8491\n\tERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION                                      syscall.Errno = 8492\n\tERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS                                  syscall.Errno = 8493\n\tERROR_DS_NC_MUST_HAVE_NC_PARENT                                           syscall.Errno = 8494\n\tERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE                                        syscall.Errno = 8495\n\tERROR_DS_DST_DOMAIN_NOT_NATIVE                                            syscall.Errno = 8496\n\tERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER                                 syscall.Errno = 8497\n\tERROR_DS_CANT_MOVE_ACCOUNT_GROUP                                          syscall.Errno = 8498\n\tERROR_DS_CANT_MOVE_RESOURCE_GROUP                                         syscall.Errno = 8499\n\tERROR_DS_INVALID_SEARCH_FLAG                                              syscall.Errno = 8500\n\tERROR_DS_NO_TREE_DELETE_ABOVE_NC                                          syscall.Errno = 8501\n\tERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE                                     syscall.Errno = 8502\n\tERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE                         syscall.Errno = 8503\n\tERROR_DS_SAM_INIT_FAILURE                                                 syscall.Errno = 8504\n\tERROR_DS_SENSITIVE_GROUP_VIOLATION                                        syscall.Errno = 8505\n\tERROR_DS_CANT_MOD_PRIMARYGROUPID                                          syscall.Errno = 8506\n\tERROR_DS_ILLEGAL_BASE_SCHEMA_MOD                                          syscall.Errno = 8507\n\tERROR_DS_NONSAFE_SCHEMA_CHANGE                                            syscall.Errno = 8508\n\tERROR_DS_SCHEMA_UPDATE_DISALLOWED                                         syscall.Errno = 8509\n\tERROR_DS_CANT_CREATE_UNDER_SCHEMA                                         syscall.Errno = 8510\n\tERROR_DS_INSTALL_NO_SRC_SCH_VERSION                                       syscall.Errno = 8511\n\tERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE                                syscall.Errno = 8512\n\tERROR_DS_INVALID_GROUP_TYPE                                               syscall.Errno = 8513\n\tERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN                               syscall.Errno = 8514\n\tERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN                                syscall.Errno = 8515\n\tERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER                                    syscall.Errno = 8516\n\tERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER                                syscall.Errno = 8517\n\tERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER                                 syscall.Errno = 8518\n\tERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER                              syscall.Errno = 8519\n\tERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER                         syscall.Errno = 8520\n\tERROR_DS_HAVE_PRIMARY_MEMBERS                                             syscall.Errno = 8521\n\tERROR_DS_STRING_SD_CONVERSION_FAILED                                      syscall.Errno = 8522\n\tERROR_DS_NAMING_MASTER_GC                                                 syscall.Errno = 8523\n\tERROR_DS_DNS_LOOKUP_FAILURE                                               syscall.Errno = 8524\n\tERROR_DS_COULDNT_UPDATE_SPNS                                              syscall.Errno = 8525\n\tERROR_DS_CANT_RETRIEVE_SD                                                 syscall.Errno = 8526\n\tERROR_DS_KEY_NOT_UNIQUE                                                   syscall.Errno = 8527\n\tERROR_DS_WRONG_LINKED_ATT_SYNTAX                                          syscall.Errno = 8528\n\tERROR_DS_SAM_NEED_BOOTKEY_PASSWORD                                        syscall.Errno = 8529\n\tERROR_DS_SAM_NEED_BOOTKEY_FLOPPY                                          syscall.Errno = 8530\n\tERROR_DS_CANT_START                                                       syscall.Errno = 8531\n\tERROR_DS_INIT_FAILURE                                                     syscall.Errno = 8532\n\tERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION                                     syscall.Errno = 8533\n\tERROR_DS_SOURCE_DOMAIN_IN_FOREST                                          syscall.Errno = 8534\n\tERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST                                 syscall.Errno = 8535\n\tERROR_DS_DESTINATION_AUDITING_NOT_ENABLED                                 syscall.Errno = 8536\n\tERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN                                      syscall.Errno = 8537\n\tERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER                                        syscall.Errno = 8538\n\tERROR_DS_SRC_SID_EXISTS_IN_FOREST                                         syscall.Errno = 8539\n\tERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH                                syscall.Errno = 8540\n\tERROR_SAM_INIT_FAILURE                                                    syscall.Errno = 8541\n\tERROR_DS_DRA_SCHEMA_INFO_SHIP                                             syscall.Errno = 8542\n\tERROR_DS_DRA_SCHEMA_CONFLICT                                              syscall.Errno = 8543\n\tERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT                                      syscall.Errno = 8544\n\tERROR_DS_DRA_OBJ_NC_MISMATCH                                              syscall.Errno = 8545\n\tERROR_DS_NC_STILL_HAS_DSAS                                                syscall.Errno = 8546\n\tERROR_DS_GC_REQUIRED                                                      syscall.Errno = 8547\n\tERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY                                       syscall.Errno = 8548\n\tERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS                                       syscall.Errno = 8549\n\tERROR_DS_CANT_ADD_TO_GC                                                   syscall.Errno = 8550\n\tERROR_DS_NO_CHECKPOINT_WITH_PDC                                           syscall.Errno = 8551\n\tERROR_DS_SOURCE_AUDITING_NOT_ENABLED                                      syscall.Errno = 8552\n\tERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC                                      syscall.Errno = 8553\n\tERROR_DS_INVALID_NAME_FOR_SPN                                             syscall.Errno = 8554\n\tERROR_DS_FILTER_USES_CONTRUCTED_ATTRS                                     syscall.Errno = 8555\n\tERROR_DS_UNICODEPWD_NOT_IN_QUOTES                                         syscall.Errno = 8556\n\tERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED                                   syscall.Errno = 8557\n\tERROR_DS_MUST_BE_RUN_ON_DST_DC                                            syscall.Errno = 8558\n\tERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER                                    syscall.Errno = 8559\n\tERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ                                    syscall.Errno = 8560\n\tERROR_DS_INIT_FAILURE_CONSOLE                                             syscall.Errno = 8561\n\tERROR_DS_SAM_INIT_FAILURE_CONSOLE                                         syscall.Errno = 8562\n\tERROR_DS_FOREST_VERSION_TOO_HIGH                                          syscall.Errno = 8563\n\tERROR_DS_DOMAIN_VERSION_TOO_HIGH                                          syscall.Errno = 8564\n\tERROR_DS_FOREST_VERSION_TOO_LOW                                           syscall.Errno = 8565\n\tERROR_DS_DOMAIN_VERSION_TOO_LOW                                           syscall.Errno = 8566\n\tERROR_DS_INCOMPATIBLE_VERSION                                             syscall.Errno = 8567\n\tERROR_DS_LOW_DSA_VERSION                                                  syscall.Errno = 8568\n\tERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN                               syscall.Errno = 8569\n\tERROR_DS_NOT_SUPPORTED_SORT_ORDER                                         syscall.Errno = 8570\n\tERROR_DS_NAME_NOT_UNIQUE                                                  syscall.Errno = 8571\n\tERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4                                   syscall.Errno = 8572\n\tERROR_DS_OUT_OF_VERSION_STORE                                             syscall.Errno = 8573\n\tERROR_DS_INCOMPATIBLE_CONTROLS_USED                                       syscall.Errno = 8574\n\tERROR_DS_NO_REF_DOMAIN                                                    syscall.Errno = 8575\n\tERROR_DS_RESERVED_LINK_ID                                                 syscall.Errno = 8576\n\tERROR_DS_LINK_ID_NOT_AVAILABLE                                            syscall.Errno = 8577\n\tERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER                                    syscall.Errno = 8578\n\tERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE                             syscall.Errno = 8579\n\tERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC                                      syscall.Errno = 8580\n\tERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG                                      syscall.Errno = 8581\n\tERROR_DS_MODIFYDN_WRONG_GRANDPARENT                                       syscall.Errno = 8582\n\tERROR_DS_NAME_ERROR_TRUST_REFERRAL                                        syscall.Errno = 8583\n\tERROR_NOT_SUPPORTED_ON_STANDARD_SERVER                                    syscall.Errno = 8584\n\tERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD                                    syscall.Errno = 8585\n\tERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2                                     syscall.Errno = 8586\n\tERROR_DS_THREAD_LIMIT_EXCEEDED                                            syscall.Errno = 8587\n\tERROR_DS_NOT_CLOSEST                                                      syscall.Errno = 8588\n\tERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF                               syscall.Errno = 8589\n\tERROR_DS_SINGLE_USER_MODE_FAILED                                          syscall.Errno = 8590\n\tERROR_DS_NTDSCRIPT_SYNTAX_ERROR                                           syscall.Errno = 8591\n\tERROR_DS_NTDSCRIPT_PROCESS_ERROR                                          syscall.Errno = 8592\n\tERROR_DS_DIFFERENT_REPL_EPOCHS                                            syscall.Errno = 8593\n\tERROR_DS_DRS_EXTENSIONS_CHANGED                                           syscall.Errno = 8594\n\tERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR                    syscall.Errno = 8595\n\tERROR_DS_NO_MSDS_INTID                                                    syscall.Errno = 8596\n\tERROR_DS_DUP_MSDS_INTID                                                   syscall.Errno = 8597\n\tERROR_DS_EXISTS_IN_RDNATTID                                               syscall.Errno = 8598\n\tERROR_DS_AUTHORIZATION_FAILED                                             syscall.Errno = 8599\n\tERROR_DS_INVALID_SCRIPT                                                   syscall.Errno = 8600\n\tERROR_DS_REMOTE_CROSSREF_OP_FAILED                                        syscall.Errno = 8601\n\tERROR_DS_CROSS_REF_BUSY                                                   syscall.Errno = 8602\n\tERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN                               syscall.Errno = 8603\n\tERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC                                    syscall.Errno = 8604\n\tERROR_DS_DUPLICATE_ID_FOUND                                               syscall.Errno = 8605\n\tERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT                               syscall.Errno = 8606\n\tERROR_DS_GROUP_CONVERSION_ERROR                                           syscall.Errno = 8607\n\tERROR_DS_CANT_MOVE_APP_BASIC_GROUP                                        syscall.Errno = 8608\n\tERROR_DS_CANT_MOVE_APP_QUERY_GROUP                                        syscall.Errno = 8609\n\tERROR_DS_ROLE_NOT_VERIFIED                                                syscall.Errno = 8610\n\tERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL                                  syscall.Errno = 8611\n\tERROR_DS_DOMAIN_RENAME_IN_PROGRESS                                        syscall.Errno = 8612\n\tERROR_DS_EXISTING_AD_CHILD_NC                                             syscall.Errno = 8613\n\tERROR_DS_REPL_LIFETIME_EXCEEDED                                           syscall.Errno = 8614\n\tERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER                                   syscall.Errno = 8615\n\tERROR_DS_LDAP_SEND_QUEUE_FULL                                             syscall.Errno = 8616\n\tERROR_DS_DRA_OUT_SCHEDULE_WINDOW                                          syscall.Errno = 8617\n\tERROR_DS_POLICY_NOT_KNOWN                                                 syscall.Errno = 8618\n\tERROR_NO_SITE_SETTINGS_OBJECT                                             syscall.Errno = 8619\n\tERROR_NO_SECRETS                                                          syscall.Errno = 8620\n\tERROR_NO_WRITABLE_DC_FOUND                                                syscall.Errno = 8621\n\tERROR_DS_NO_SERVER_OBJECT                                                 syscall.Errno = 8622\n\tERROR_DS_NO_NTDSA_OBJECT                                                  syscall.Errno = 8623\n\tERROR_DS_NON_ASQ_SEARCH                                                   syscall.Errno = 8624\n\tERROR_DS_AUDIT_FAILURE                                                    syscall.Errno = 8625\n\tERROR_DS_INVALID_SEARCH_FLAG_SUBTREE                                      syscall.Errno = 8626\n\tERROR_DS_INVALID_SEARCH_FLAG_TUPLE                                        syscall.Errno = 8627\n\tERROR_DS_HIERARCHY_TABLE_TOO_DEEP                                         syscall.Errno = 8628\n\tERROR_DS_DRA_CORRUPT_UTD_VECTOR                                           syscall.Errno = 8629\n\tERROR_DS_DRA_SECRETS_DENIED                                               syscall.Errno = 8630\n\tERROR_DS_RESERVED_MAPI_ID                                                 syscall.Errno = 8631\n\tERROR_DS_MAPI_ID_NOT_AVAILABLE                                            syscall.Errno = 8632\n\tERROR_DS_DRA_MISSING_KRBTGT_SECRET                                        syscall.Errno = 8633\n\tERROR_DS_DOMAIN_NAME_EXISTS_IN_FOREST                                     syscall.Errno = 8634\n\tERROR_DS_FLAT_NAME_EXISTS_IN_FOREST                                       syscall.Errno = 8635\n\tERROR_INVALID_USER_PRINCIPAL_NAME                                         syscall.Errno = 8636\n\tERROR_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS                               syscall.Errno = 8637\n\tERROR_DS_OID_NOT_FOUND                                                    syscall.Errno = 8638\n\tERROR_DS_DRA_RECYCLED_TARGET                                              syscall.Errno = 8639\n\tERROR_DS_DISALLOWED_NC_REDIRECT                                           syscall.Errno = 8640\n\tERROR_DS_HIGH_ADLDS_FFL                                                   syscall.Errno = 8641\n\tERROR_DS_HIGH_DSA_VERSION                                                 syscall.Errno = 8642\n\tERROR_DS_LOW_ADLDS_FFL                                                    syscall.Errno = 8643\n\tERROR_DOMAIN_SID_SAME_AS_LOCAL_WORKSTATION                                syscall.Errno = 8644\n\tERROR_DS_UNDELETE_SAM_VALIDATION_FAILED                                   syscall.Errno = 8645\n\tERROR_INCORRECT_ACCOUNT_TYPE                                              syscall.Errno = 8646\n\tERROR_DS_SPN_VALUE_NOT_UNIQUE_IN_FOREST                                   syscall.Errno = 8647\n\tERROR_DS_UPN_VALUE_NOT_UNIQUE_IN_FOREST                                   syscall.Errno = 8648\n\tERROR_DS_MISSING_FOREST_TRUST                                             syscall.Errno = 8649\n\tERROR_DS_VALUE_KEY_NOT_UNIQUE                                             syscall.Errno = 8650\n\tDNS_ERROR_RESPONSE_CODES_BASE                                             syscall.Errno = 9000\n\tDNS_ERROR_RCODE_NO_ERROR                                                                = ERROR_SUCCESS\n\tDNS_ERROR_MASK                                                            syscall.Errno = 0x00002328\n\tDNS_ERROR_RCODE_FORMAT_ERROR                                              syscall.Errno = 9001\n\tDNS_ERROR_RCODE_SERVER_FAILURE                                            syscall.Errno = 9002\n\tDNS_ERROR_RCODE_NAME_ERROR                                                syscall.Errno = 9003\n\tDNS_ERROR_RCODE_NOT_IMPLEMENTED                                           syscall.Errno = 9004\n\tDNS_ERROR_RCODE_REFUSED                                                   syscall.Errno = 9005\n\tDNS_ERROR_RCODE_YXDOMAIN                                                  syscall.Errno = 9006\n\tDNS_ERROR_RCODE_YXRRSET                                                   syscall.Errno = 9007\n\tDNS_ERROR_RCODE_NXRRSET                                                   syscall.Errno = 9008\n\tDNS_ERROR_RCODE_NOTAUTH                                                   syscall.Errno = 9009\n\tDNS_ERROR_RCODE_NOTZONE                                                   syscall.Errno = 9010\n\tDNS_ERROR_RCODE_BADSIG                                                    syscall.Errno = 9016\n\tDNS_ERROR_RCODE_BADKEY                                                    syscall.Errno = 9017\n\tDNS_ERROR_RCODE_BADTIME                                                   syscall.Errno = 9018\n\tDNS_ERROR_RCODE_LAST                                                                    = DNS_ERROR_RCODE_BADTIME\n\tDNS_ERROR_DNSSEC_BASE                                                     syscall.Errno = 9100\n\tDNS_ERROR_KEYMASTER_REQUIRED                                              syscall.Errno = 9101\n\tDNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE                                      syscall.Errno = 9102\n\tDNS_ERROR_NSEC3_INCOMPATIBLE_WITH_RSA_SHA1                                syscall.Errno = 9103\n\tDNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS                              syscall.Errno = 9104\n\tDNS_ERROR_UNSUPPORTED_ALGORITHM                                           syscall.Errno = 9105\n\tDNS_ERROR_INVALID_KEY_SIZE                                                syscall.Errno = 9106\n\tDNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE                                      syscall.Errno = 9107\n\tDNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION                                 syscall.Errno = 9108\n\tDNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR                                syscall.Errno = 9109\n\tDNS_ERROR_UNEXPECTED_CNG_ERROR                                            syscall.Errno = 9110\n\tDNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION                               syscall.Errno = 9111\n\tDNS_ERROR_KSP_NOT_ACCESSIBLE                                              syscall.Errno = 9112\n\tDNS_ERROR_TOO_MANY_SKDS                                                   syscall.Errno = 9113\n\tDNS_ERROR_INVALID_ROLLOVER_PERIOD                                         syscall.Errno = 9114\n\tDNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET                                 syscall.Errno = 9115\n\tDNS_ERROR_ROLLOVER_IN_PROGRESS                                            syscall.Errno = 9116\n\tDNS_ERROR_STANDBY_KEY_NOT_PRESENT                                         syscall.Errno = 9117\n\tDNS_ERROR_NOT_ALLOWED_ON_ZSK                                              syscall.Errno = 9118\n\tDNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD                                       syscall.Errno = 9119\n\tDNS_ERROR_ROLLOVER_ALREADY_QUEUED                                         syscall.Errno = 9120\n\tDNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE                                    syscall.Errno = 9121\n\tDNS_ERROR_BAD_KEYMASTER                                                   syscall.Errno = 9122\n\tDNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD                               syscall.Errno = 9123\n\tDNS_ERROR_INVALID_NSEC3_ITERATION_COUNT                                   syscall.Errno = 9124\n\tDNS_ERROR_DNSSEC_IS_DISABLED                                              syscall.Errno = 9125\n\tDNS_ERROR_INVALID_XML                                                     syscall.Errno = 9126\n\tDNS_ERROR_NO_VALID_TRUST_ANCHORS                                          syscall.Errno = 9127\n\tDNS_ERROR_ROLLOVER_NOT_POKEABLE                                           syscall.Errno = 9128\n\tDNS_ERROR_NSEC3_NAME_COLLISION                                            syscall.Errno = 9129\n\tDNS_ERROR_NSEC_INCOMPATIBLE_WITH_NSEC3_RSA_SHA1                           syscall.Errno = 9130\n\tDNS_ERROR_PACKET_FMT_BASE                                                 syscall.Errno = 9500\n\tDNS_INFO_NO_RECORDS                                                       syscall.Errno = 9501\n\tDNS_ERROR_BAD_PACKET                                                      syscall.Errno = 9502\n\tDNS_ERROR_NO_PACKET                                                       syscall.Errno = 9503\n\tDNS_ERROR_RCODE                                                           syscall.Errno = 9504\n\tDNS_ERROR_UNSECURE_PACKET                                                 syscall.Errno = 9505\n\tDNS_STATUS_PACKET_UNSECURE                                                              = DNS_ERROR_UNSECURE_PACKET\n\tDNS_REQUEST_PENDING                                                       syscall.Errno = 9506\n\tDNS_ERROR_NO_MEMORY                                                                     = ERROR_OUTOFMEMORY\n\tDNS_ERROR_INVALID_NAME                                                                  = ERROR_INVALID_NAME\n\tDNS_ERROR_INVALID_DATA                                                                  = ERROR_INVALID_DATA\n\tDNS_ERROR_GENERAL_API_BASE                                                syscall.Errno = 9550\n\tDNS_ERROR_INVALID_TYPE                                                    syscall.Errno = 9551\n\tDNS_ERROR_INVALID_IP_ADDRESS                                              syscall.Errno = 9552\n\tDNS_ERROR_INVALID_PROPERTY                                                syscall.Errno = 9553\n\tDNS_ERROR_TRY_AGAIN_LATER                                                 syscall.Errno = 9554\n\tDNS_ERROR_NOT_UNIQUE                                                      syscall.Errno = 9555\n\tDNS_ERROR_NON_RFC_NAME                                                    syscall.Errno = 9556\n\tDNS_STATUS_FQDN                                                           syscall.Errno = 9557\n\tDNS_STATUS_DOTTED_NAME                                                    syscall.Errno = 9558\n\tDNS_STATUS_SINGLE_PART_NAME                                               syscall.Errno = 9559\n\tDNS_ERROR_INVALID_NAME_CHAR                                               syscall.Errno = 9560\n\tDNS_ERROR_NUMERIC_NAME                                                    syscall.Errno = 9561\n\tDNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER                                      syscall.Errno = 9562\n\tDNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION                                    syscall.Errno = 9563\n\tDNS_ERROR_CANNOT_FIND_ROOT_HINTS                                          syscall.Errno = 9564\n\tDNS_ERROR_INCONSISTENT_ROOT_HINTS                                         syscall.Errno = 9565\n\tDNS_ERROR_DWORD_VALUE_TOO_SMALL                                           syscall.Errno = 9566\n\tDNS_ERROR_DWORD_VALUE_TOO_LARGE                                           syscall.Errno = 9567\n\tDNS_ERROR_BACKGROUND_LOADING                                              syscall.Errno = 9568\n\tDNS_ERROR_NOT_ALLOWED_ON_RODC                                             syscall.Errno = 9569\n\tDNS_ERROR_NOT_ALLOWED_UNDER_DNAME                                         syscall.Errno = 9570\n\tDNS_ERROR_DELEGATION_REQUIRED                                             syscall.Errno = 9571\n\tDNS_ERROR_INVALID_POLICY_TABLE                                            syscall.Errno = 9572\n\tDNS_ERROR_ADDRESS_REQUIRED                                                syscall.Errno = 9573\n\tDNS_ERROR_ZONE_BASE                                                       syscall.Errno = 9600\n\tDNS_ERROR_ZONE_DOES_NOT_EXIST                                             syscall.Errno = 9601\n\tDNS_ERROR_NO_ZONE_INFO                                                    syscall.Errno = 9602\n\tDNS_ERROR_INVALID_ZONE_OPERATION                                          syscall.Errno = 9603\n\tDNS_ERROR_ZONE_CONFIGURATION_ERROR                                        syscall.Errno = 9604\n\tDNS_ERROR_ZONE_HAS_NO_SOA_RECORD                                          syscall.Errno = 9605\n\tDNS_ERROR_ZONE_HAS_NO_NS_RECORDS                                          syscall.Errno = 9606\n\tDNS_ERROR_ZONE_LOCKED                                                     syscall.Errno = 9607\n\tDNS_ERROR_ZONE_CREATION_FAILED                                            syscall.Errno = 9608\n\tDNS_ERROR_ZONE_ALREADY_EXISTS                                             syscall.Errno = 9609\n\tDNS_ERROR_AUTOZONE_ALREADY_EXISTS                                         syscall.Errno = 9610\n\tDNS_ERROR_INVALID_ZONE_TYPE                                               syscall.Errno = 9611\n\tDNS_ERROR_SECONDARY_REQUIRES_MASTER_IP                                    syscall.Errno = 9612\n\tDNS_ERROR_ZONE_NOT_SECONDARY                                              syscall.Errno = 9613\n\tDNS_ERROR_NEED_SECONDARY_ADDRESSES                                        syscall.Errno = 9614\n\tDNS_ERROR_WINS_INIT_FAILED                                                syscall.Errno = 9615\n\tDNS_ERROR_NEED_WINS_SERVERS                                               syscall.Errno = 9616\n\tDNS_ERROR_NBSTAT_INIT_FAILED                                              syscall.Errno = 9617\n\tDNS_ERROR_SOA_DELETE_INVALID                                              syscall.Errno = 9618\n\tDNS_ERROR_FORWARDER_ALREADY_EXISTS                                        syscall.Errno = 9619\n\tDNS_ERROR_ZONE_REQUIRES_MASTER_IP                                         syscall.Errno = 9620\n\tDNS_ERROR_ZONE_IS_SHUTDOWN                                                syscall.Errno = 9621\n\tDNS_ERROR_ZONE_LOCKED_FOR_SIGNING                                         syscall.Errno = 9622\n\tDNS_ERROR_DATAFILE_BASE                                                   syscall.Errno = 9650\n\tDNS_ERROR_PRIMARY_REQUIRES_DATAFILE                                       syscall.Errno = 9651\n\tDNS_ERROR_INVALID_DATAFILE_NAME                                           syscall.Errno = 9652\n\tDNS_ERROR_DATAFILE_OPEN_FAILURE                                           syscall.Errno = 9653\n\tDNS_ERROR_FILE_WRITEBACK_FAILED                                           syscall.Errno = 9654\n\tDNS_ERROR_DATAFILE_PARSING                                                syscall.Errno = 9655\n\tDNS_ERROR_DATABASE_BASE                                                   syscall.Errno = 9700\n\tDNS_ERROR_RECORD_DOES_NOT_EXIST                                           syscall.Errno = 9701\n\tDNS_ERROR_RECORD_FORMAT                                                   syscall.Errno = 9702\n\tDNS_ERROR_NODE_CREATION_FAILED                                            syscall.Errno = 9703\n\tDNS_ERROR_UNKNOWN_RECORD_TYPE                                             syscall.Errno = 9704\n\tDNS_ERROR_RECORD_TIMED_OUT                                                syscall.Errno = 9705\n\tDNS_ERROR_NAME_NOT_IN_ZONE                                                syscall.Errno = 9706\n\tDNS_ERROR_CNAME_LOOP                                                      syscall.Errno = 9707\n\tDNS_ERROR_NODE_IS_CNAME                                                   syscall.Errno = 9708\n\tDNS_ERROR_CNAME_COLLISION                                                 syscall.Errno = 9709\n\tDNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT                                        syscall.Errno = 9710\n\tDNS_ERROR_RECORD_ALREADY_EXISTS                                           syscall.Errno = 9711\n\tDNS_ERROR_SECONDARY_DATA                                                  syscall.Errno = 9712\n\tDNS_ERROR_NO_CREATE_CACHE_DATA                                            syscall.Errno = 9713\n\tDNS_ERROR_NAME_DOES_NOT_EXIST                                             syscall.Errno = 9714\n\tDNS_WARNING_PTR_CREATE_FAILED                                             syscall.Errno = 9715\n\tDNS_WARNING_DOMAIN_UNDELETED                                              syscall.Errno = 9716\n\tDNS_ERROR_DS_UNAVAILABLE                                                  syscall.Errno = 9717\n\tDNS_ERROR_DS_ZONE_ALREADY_EXISTS                                          syscall.Errno = 9718\n\tDNS_ERROR_NO_BOOTFILE_IF_DS_ZONE                                          syscall.Errno = 9719\n\tDNS_ERROR_NODE_IS_DNAME                                                   syscall.Errno = 9720\n\tDNS_ERROR_DNAME_COLLISION                                                 syscall.Errno = 9721\n\tDNS_ERROR_ALIAS_LOOP                                                      syscall.Errno = 9722\n\tDNS_ERROR_OPERATION_BASE                                                  syscall.Errno = 9750\n\tDNS_INFO_AXFR_COMPLETE                                                    syscall.Errno = 9751\n\tDNS_ERROR_AXFR                                                            syscall.Errno = 9752\n\tDNS_INFO_ADDED_LOCAL_WINS                                                 syscall.Errno = 9753\n\tDNS_ERROR_SECURE_BASE                                                     syscall.Errno = 9800\n\tDNS_STATUS_CONTINUE_NEEDED                                                syscall.Errno = 9801\n\tDNS_ERROR_SETUP_BASE                                                      syscall.Errno = 9850\n\tDNS_ERROR_NO_TCPIP                                                        syscall.Errno = 9851\n\tDNS_ERROR_NO_DNS_SERVERS                                                  syscall.Errno = 9852\n\tDNS_ERROR_DP_BASE                                                         syscall.Errno = 9900\n\tDNS_ERROR_DP_DOES_NOT_EXIST                                               syscall.Errno = 9901\n\tDNS_ERROR_DP_ALREADY_EXISTS                                               syscall.Errno = 9902\n\tDNS_ERROR_DP_NOT_ENLISTED                                                 syscall.Errno = 9903\n\tDNS_ERROR_DP_ALREADY_ENLISTED                                             syscall.Errno = 9904\n\tDNS_ERROR_DP_NOT_AVAILABLE                                                syscall.Errno = 9905\n\tDNS_ERROR_DP_FSMO_ERROR                                                   syscall.Errno = 9906\n\tDNS_ERROR_RRL_NOT_ENABLED                                                 syscall.Errno = 9911\n\tDNS_ERROR_RRL_INVALID_WINDOW_SIZE                                         syscall.Errno = 9912\n\tDNS_ERROR_RRL_INVALID_IPV4_PREFIX                                         syscall.Errno = 9913\n\tDNS_ERROR_RRL_INVALID_IPV6_PREFIX                                         syscall.Errno = 9914\n\tDNS_ERROR_RRL_INVALID_TC_RATE                                             syscall.Errno = 9915\n\tDNS_ERROR_RRL_INVALID_LEAK_RATE                                           syscall.Errno = 9916\n\tDNS_ERROR_RRL_LEAK_RATE_LESSTHAN_TC_RATE                                  syscall.Errno = 9917\n\tDNS_ERROR_VIRTUALIZATION_INSTANCE_ALREADY_EXISTS                          syscall.Errno = 9921\n\tDNS_ERROR_VIRTUALIZATION_INSTANCE_DOES_NOT_EXIST                          syscall.Errno = 9922\n\tDNS_ERROR_VIRTUALIZATION_TREE_LOCKED                                      syscall.Errno = 9923\n\tDNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME                            syscall.Errno = 9924\n\tDNS_ERROR_DEFAULT_VIRTUALIZATION_INSTANCE                                 syscall.Errno = 9925\n\tDNS_ERROR_ZONESCOPE_ALREADY_EXISTS                                        syscall.Errno = 9951\n\tDNS_ERROR_ZONESCOPE_DOES_NOT_EXIST                                        syscall.Errno = 9952\n\tDNS_ERROR_DEFAULT_ZONESCOPE                                               syscall.Errno = 9953\n\tDNS_ERROR_INVALID_ZONESCOPE_NAME                                          syscall.Errno = 9954\n\tDNS_ERROR_NOT_ALLOWED_WITH_ZONESCOPES                                     syscall.Errno = 9955\n\tDNS_ERROR_LOAD_ZONESCOPE_FAILED                                           syscall.Errno = 9956\n\tDNS_ERROR_ZONESCOPE_FILE_WRITEBACK_FAILED                                 syscall.Errno = 9957\n\tDNS_ERROR_INVALID_SCOPE_NAME                                              syscall.Errno = 9958\n\tDNS_ERROR_SCOPE_DOES_NOT_EXIST                                            syscall.Errno = 9959\n\tDNS_ERROR_DEFAULT_SCOPE                                                   syscall.Errno = 9960\n\tDNS_ERROR_INVALID_SCOPE_OPERATION                                         syscall.Errno = 9961\n\tDNS_ERROR_SCOPE_LOCKED                                                    syscall.Errno = 9962\n\tDNS_ERROR_SCOPE_ALREADY_EXISTS                                            syscall.Errno = 9963\n\tDNS_ERROR_POLICY_ALREADY_EXISTS                                           syscall.Errno = 9971\n\tDNS_ERROR_POLICY_DOES_NOT_EXIST                                           syscall.Errno = 9972\n\tDNS_ERROR_POLICY_INVALID_CRITERIA                                         syscall.Errno = 9973\n\tDNS_ERROR_POLICY_INVALID_SETTINGS                                         syscall.Errno = 9974\n\tDNS_ERROR_CLIENT_SUBNET_IS_ACCESSED                                       syscall.Errno = 9975\n\tDNS_ERROR_CLIENT_SUBNET_DOES_NOT_EXIST                                    syscall.Errno = 9976\n\tDNS_ERROR_CLIENT_SUBNET_ALREADY_EXISTS                                    syscall.Errno = 9977\n\tDNS_ERROR_SUBNET_DOES_NOT_EXIST                                           syscall.Errno = 9978\n\tDNS_ERROR_SUBNET_ALREADY_EXISTS                                           syscall.Errno = 9979\n\tDNS_ERROR_POLICY_LOCKED                                                   syscall.Errno = 9980\n\tDNS_ERROR_POLICY_INVALID_WEIGHT                                           syscall.Errno = 9981\n\tDNS_ERROR_POLICY_INVALID_NAME                                             syscall.Errno = 9982\n\tDNS_ERROR_POLICY_MISSING_CRITERIA                                         syscall.Errno = 9983\n\tDNS_ERROR_INVALID_CLIENT_SUBNET_NAME                                      syscall.Errno = 9984\n\tDNS_ERROR_POLICY_PROCESSING_ORDER_INVALID                                 syscall.Errno = 9985\n\tDNS_ERROR_POLICY_SCOPE_MISSING                                            syscall.Errno = 9986\n\tDNS_ERROR_POLICY_SCOPE_NOT_ALLOWED                                        syscall.Errno = 9987\n\tDNS_ERROR_SERVERSCOPE_IS_REFERENCED                                       syscall.Errno = 9988\n\tDNS_ERROR_ZONESCOPE_IS_REFERENCED                                         syscall.Errno = 9989\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_CLIENT_SUBNET                           syscall.Errno = 9990\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_TRANSPORT_PROTOCOL                      syscall.Errno = 9991\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_NETWORK_PROTOCOL                        syscall.Errno = 9992\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_INTERFACE                               syscall.Errno = 9993\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_FQDN                                    syscall.Errno = 9994\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_QUERY_TYPE                              syscall.Errno = 9995\n\tDNS_ERROR_POLICY_INVALID_CRITERIA_TIME_OF_DAY                             syscall.Errno = 9996\n\tWSABASEERR                                                                syscall.Errno = 10000\n\tWSAEINTR                                                                  syscall.Errno = 10004\n\tWSAEBADF                                                                  syscall.Errno = 10009\n\tWSAEACCES                                                                 syscall.Errno = 10013\n\tWSAEFAULT                                                                 syscall.Errno = 10014\n\tWSAEINVAL                                                                 syscall.Errno = 10022\n\tWSAEMFILE                                                                 syscall.Errno = 10024\n\tWSAEWOULDBLOCK                                                            syscall.Errno = 10035\n\tWSAEINPROGRESS                                                            syscall.Errno = 10036\n\tWSAEALREADY                                                               syscall.Errno = 10037\n\tWSAENOTSOCK                                                               syscall.Errno = 10038\n\tWSAEDESTADDRREQ                                                           syscall.Errno = 10039\n\tWSAEMSGSIZE                                                               syscall.Errno = 10040\n\tWSAEPROTOTYPE                                                             syscall.Errno = 10041\n\tWSAENOPROTOOPT                                                            syscall.Errno = 10042\n\tWSAEPROTONOSUPPORT                                                        syscall.Errno = 10043\n\tWSAESOCKTNOSUPPORT                                                        syscall.Errno = 10044\n\tWSAEOPNOTSUPP                                                             syscall.Errno = 10045\n\tWSAEPFNOSUPPORT                                                           syscall.Errno = 10046\n\tWSAEAFNOSUPPORT                                                           syscall.Errno = 10047\n\tWSAEADDRINUSE                                                             syscall.Errno = 10048\n\tWSAEADDRNOTAVAIL                                                          syscall.Errno = 10049\n\tWSAENETDOWN                                                               syscall.Errno = 10050\n\tWSAENETUNREACH                                                            syscall.Errno = 10051\n\tWSAENETRESET                                                              syscall.Errno = 10052\n\tWSAECONNABORTED                                                           syscall.Errno = 10053\n\tWSAECONNRESET                                                             syscall.Errno = 10054\n\tWSAENOBUFS                                                                syscall.Errno = 10055\n\tWSAEISCONN                                                                syscall.Errno = 10056\n\tWSAENOTCONN                                                               syscall.Errno = 10057\n\tWSAESHUTDOWN                                                              syscall.Errno = 10058\n\tWSAETOOMANYREFS                                                           syscall.Errno = 10059\n\tWSAETIMEDOUT                                                              syscall.Errno = 10060\n\tWSAECONNREFUSED                                                           syscall.Errno = 10061\n\tWSAELOOP                                                                  syscall.Errno = 10062\n\tWSAENAMETOOLONG                                                           syscall.Errno = 10063\n\tWSAEHOSTDOWN                                                              syscall.Errno = 10064\n\tWSAEHOSTUNREACH                                                           syscall.Errno = 10065\n\tWSAENOTEMPTY                                                              syscall.Errno = 10066\n\tWSAEPROCLIM                                                               syscall.Errno = 10067\n\tWSAEUSERS                                                                 syscall.Errno = 10068\n\tWSAEDQUOT                                                                 syscall.Errno = 10069\n\tWSAESTALE                                                                 syscall.Errno = 10070\n\tWSAEREMOTE                                                                syscall.Errno = 10071\n\tWSASYSNOTREADY                                                            syscall.Errno = 10091\n\tWSAVERNOTSUPPORTED                                                        syscall.Errno = 10092\n\tWSANOTINITIALISED                                                         syscall.Errno = 10093\n\tWSAEDISCON                                                                syscall.Errno = 10101\n\tWSAENOMORE                                                                syscall.Errno = 10102\n\tWSAECANCELLED                                                             syscall.Errno = 10103\n\tWSAEINVALIDPROCTABLE                                                      syscall.Errno = 10104\n\tWSAEINVALIDPROVIDER                                                       syscall.Errno = 10105\n\tWSAEPROVIDERFAILEDINIT                                                    syscall.Errno = 10106\n\tWSASYSCALLFAILURE                                                         syscall.Errno = 10107\n\tWSASERVICE_NOT_FOUND                                                      syscall.Errno = 10108\n\tWSATYPE_NOT_FOUND                                                         syscall.Errno = 10109\n\tWSA_E_NO_MORE                                                             syscall.Errno = 10110\n\tWSA_E_CANCELLED                                                           syscall.Errno = 10111\n\tWSAEREFUSED                                                               syscall.Errno = 10112\n\tWSAHOST_NOT_FOUND                                                         syscall.Errno = 11001\n\tWSATRY_AGAIN                                                              syscall.Errno = 11002\n\tWSANO_RECOVERY                                                            syscall.Errno = 11003\n\tWSANO_DATA                                                                syscall.Errno = 11004\n\tWSA_QOS_RECEIVERS                                                         syscall.Errno = 11005\n\tWSA_QOS_SENDERS                                                           syscall.Errno = 11006\n\tWSA_QOS_NO_SENDERS                                                        syscall.Errno = 11007\n\tWSA_QOS_NO_RECEIVERS                                                      syscall.Errno = 11008\n\tWSA_QOS_REQUEST_CONFIRMED                                                 syscall.Errno = 11009\n\tWSA_QOS_ADMISSION_FAILURE                                                 syscall.Errno = 11010\n\tWSA_QOS_POLICY_FAILURE                                                    syscall.Errno = 11011\n\tWSA_QOS_BAD_STYLE                                                         syscall.Errno = 11012\n\tWSA_QOS_BAD_OBJECT                                                        syscall.Errno = 11013\n\tWSA_QOS_TRAFFIC_CTRL_ERROR                                                syscall.Errno = 11014\n\tWSA_QOS_GENERIC_ERROR                                                     syscall.Errno = 11015\n\tWSA_QOS_ESERVICETYPE                                                      syscall.Errno = 11016\n\tWSA_QOS_EFLOWSPEC                                                         syscall.Errno = 11017\n\tWSA_QOS_EPROVSPECBUF                                                      syscall.Errno = 11018\n\tWSA_QOS_EFILTERSTYLE                                                      syscall.Errno = 11019\n\tWSA_QOS_EFILTERTYPE                                                       syscall.Errno = 11020\n\tWSA_QOS_EFILTERCOUNT                                                      syscall.Errno = 11021\n\tWSA_QOS_EOBJLENGTH                                                        syscall.Errno = 11022\n\tWSA_QOS_EFLOWCOUNT                                                        syscall.Errno = 11023\n\tWSA_QOS_EUNKOWNPSOBJ                                                      syscall.Errno = 11024\n\tWSA_QOS_EPOLICYOBJ                                                        syscall.Errno = 11025\n\tWSA_QOS_EFLOWDESC                                                         syscall.Errno = 11026\n\tWSA_QOS_EPSFLOWSPEC                                                       syscall.Errno = 11027\n\tWSA_QOS_EPSFILTERSPEC                                                     syscall.Errno = 11028\n\tWSA_QOS_ESDMODEOBJ                                                        syscall.Errno = 11029\n\tWSA_QOS_ESHAPERATEOBJ                                                     syscall.Errno = 11030\n\tWSA_QOS_RESERVED_PETYPE                                                   syscall.Errno = 11031\n\tWSA_SECURE_HOST_NOT_FOUND                                                 syscall.Errno = 11032\n\tWSA_IPSEC_NAME_POLICY_ERROR                                               syscall.Errno = 11033\n\tERROR_IPSEC_QM_POLICY_EXISTS                                              syscall.Errno = 13000\n\tERROR_IPSEC_QM_POLICY_NOT_FOUND                                           syscall.Errno = 13001\n\tERROR_IPSEC_QM_POLICY_IN_USE                                              syscall.Errno = 13002\n\tERROR_IPSEC_MM_POLICY_EXISTS                                              syscall.Errno = 13003\n\tERROR_IPSEC_MM_POLICY_NOT_FOUND                                           syscall.Errno = 13004\n\tERROR_IPSEC_MM_POLICY_IN_USE                                              syscall.Errno = 13005\n\tERROR_IPSEC_MM_FILTER_EXISTS                                              syscall.Errno = 13006\n\tERROR_IPSEC_MM_FILTER_NOT_FOUND                                           syscall.Errno = 13007\n\tERROR_IPSEC_TRANSPORT_FILTER_EXISTS                                       syscall.Errno = 13008\n\tERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND                                    syscall.Errno = 13009\n\tERROR_IPSEC_MM_AUTH_EXISTS                                                syscall.Errno = 13010\n\tERROR_IPSEC_MM_AUTH_NOT_FOUND                                             syscall.Errno = 13011\n\tERROR_IPSEC_MM_AUTH_IN_USE                                                syscall.Errno = 13012\n\tERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND                                   syscall.Errno = 13013\n\tERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND                                     syscall.Errno = 13014\n\tERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND                                   syscall.Errno = 13015\n\tERROR_IPSEC_TUNNEL_FILTER_EXISTS                                          syscall.Errno = 13016\n\tERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND                                       syscall.Errno = 13017\n\tERROR_IPSEC_MM_FILTER_PENDING_DELETION                                    syscall.Errno = 13018\n\tERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION                             syscall.Errno = 13019\n\tERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION                                syscall.Errno = 13020\n\tERROR_IPSEC_MM_POLICY_PENDING_DELETION                                    syscall.Errno = 13021\n\tERROR_IPSEC_MM_AUTH_PENDING_DELETION                                      syscall.Errno = 13022\n\tERROR_IPSEC_QM_POLICY_PENDING_DELETION                                    syscall.Errno = 13023\n\tWARNING_IPSEC_MM_POLICY_PRUNED                                            syscall.Errno = 13024\n\tWARNING_IPSEC_QM_POLICY_PRUNED                                            syscall.Errno = 13025\n\tERROR_IPSEC_IKE_NEG_STATUS_BEGIN                                          syscall.Errno = 13800\n\tERROR_IPSEC_IKE_AUTH_FAIL                                                 syscall.Errno = 13801\n\tERROR_IPSEC_IKE_ATTRIB_FAIL                                               syscall.Errno = 13802\n\tERROR_IPSEC_IKE_NEGOTIATION_PENDING                                       syscall.Errno = 13803\n\tERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR                                  syscall.Errno = 13804\n\tERROR_IPSEC_IKE_TIMED_OUT                                                 syscall.Errno = 13805\n\tERROR_IPSEC_IKE_NO_CERT                                                   syscall.Errno = 13806\n\tERROR_IPSEC_IKE_SA_DELETED                                                syscall.Errno = 13807\n\tERROR_IPSEC_IKE_SA_REAPED                                                 syscall.Errno = 13808\n\tERROR_IPSEC_IKE_MM_ACQUIRE_DROP                                           syscall.Errno = 13809\n\tERROR_IPSEC_IKE_QM_ACQUIRE_DROP                                           syscall.Errno = 13810\n\tERROR_IPSEC_IKE_QUEUE_DROP_MM                                             syscall.Errno = 13811\n\tERROR_IPSEC_IKE_QUEUE_DROP_NO_MM                                          syscall.Errno = 13812\n\tERROR_IPSEC_IKE_DROP_NO_RESPONSE                                          syscall.Errno = 13813\n\tERROR_IPSEC_IKE_MM_DELAY_DROP                                             syscall.Errno = 13814\n\tERROR_IPSEC_IKE_QM_DELAY_DROP                                             syscall.Errno = 13815\n\tERROR_IPSEC_IKE_ERROR                                                     syscall.Errno = 13816\n\tERROR_IPSEC_IKE_CRL_FAILED                                                syscall.Errno = 13817\n\tERROR_IPSEC_IKE_INVALID_KEY_USAGE                                         syscall.Errno = 13818\n\tERROR_IPSEC_IKE_INVALID_CERT_TYPE                                         syscall.Errno = 13819\n\tERROR_IPSEC_IKE_NO_PRIVATE_KEY                                            syscall.Errno = 13820\n\tERROR_IPSEC_IKE_SIMULTANEOUS_REKEY                                        syscall.Errno = 13821\n\tERROR_IPSEC_IKE_DH_FAIL                                                   syscall.Errno = 13822\n\tERROR_IPSEC_IKE_CRITICAL_PAYLOAD_NOT_RECOGNIZED                           syscall.Errno = 13823\n\tERROR_IPSEC_IKE_INVALID_HEADER                                            syscall.Errno = 13824\n\tERROR_IPSEC_IKE_NO_POLICY                                                 syscall.Errno = 13825\n\tERROR_IPSEC_IKE_INVALID_SIGNATURE                                         syscall.Errno = 13826\n\tERROR_IPSEC_IKE_KERBEROS_ERROR                                            syscall.Errno = 13827\n\tERROR_IPSEC_IKE_NO_PUBLIC_KEY                                             syscall.Errno = 13828\n\tERROR_IPSEC_IKE_PROCESS_ERR                                               syscall.Errno = 13829\n\tERROR_IPSEC_IKE_PROCESS_ERR_SA                                            syscall.Errno = 13830\n\tERROR_IPSEC_IKE_PROCESS_ERR_PROP                                          syscall.Errno = 13831\n\tERROR_IPSEC_IKE_PROCESS_ERR_TRANS                                         syscall.Errno = 13832\n\tERROR_IPSEC_IKE_PROCESS_ERR_KE                                            syscall.Errno = 13833\n\tERROR_IPSEC_IKE_PROCESS_ERR_ID                                            syscall.Errno = 13834\n\tERROR_IPSEC_IKE_PROCESS_ERR_CERT                                          syscall.Errno = 13835\n\tERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ                                      syscall.Errno = 13836\n\tERROR_IPSEC_IKE_PROCESS_ERR_HASH                                          syscall.Errno = 13837\n\tERROR_IPSEC_IKE_PROCESS_ERR_SIG                                           syscall.Errno = 13838\n\tERROR_IPSEC_IKE_PROCESS_ERR_NONCE                                         syscall.Errno = 13839\n\tERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY                                        syscall.Errno = 13840\n\tERROR_IPSEC_IKE_PROCESS_ERR_DELETE                                        syscall.Errno = 13841\n\tERROR_IPSEC_IKE_PROCESS_ERR_VENDOR                                        syscall.Errno = 13842\n\tERROR_IPSEC_IKE_INVALID_PAYLOAD                                           syscall.Errno = 13843\n\tERROR_IPSEC_IKE_LOAD_SOFT_SA                                              syscall.Errno = 13844\n\tERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN                                         syscall.Errno = 13845\n\tERROR_IPSEC_IKE_INVALID_COOKIE                                            syscall.Errno = 13846\n\tERROR_IPSEC_IKE_NO_PEER_CERT                                              syscall.Errno = 13847\n\tERROR_IPSEC_IKE_PEER_CRL_FAILED                                           syscall.Errno = 13848\n\tERROR_IPSEC_IKE_POLICY_CHANGE                                             syscall.Errno = 13849\n\tERROR_IPSEC_IKE_NO_MM_POLICY                                              syscall.Errno = 13850\n\tERROR_IPSEC_IKE_NOTCBPRIV                                                 syscall.Errno = 13851\n\tERROR_IPSEC_IKE_SECLOADFAIL                                               syscall.Errno = 13852\n\tERROR_IPSEC_IKE_FAILSSPINIT                                               syscall.Errno = 13853\n\tERROR_IPSEC_IKE_FAILQUERYSSP                                              syscall.Errno = 13854\n\tERROR_IPSEC_IKE_SRVACQFAIL                                                syscall.Errno = 13855\n\tERROR_IPSEC_IKE_SRVQUERYCRED                                              syscall.Errno = 13856\n\tERROR_IPSEC_IKE_GETSPIFAIL                                                syscall.Errno = 13857\n\tERROR_IPSEC_IKE_INVALID_FILTER                                            syscall.Errno = 13858\n\tERROR_IPSEC_IKE_OUT_OF_MEMORY                                             syscall.Errno = 13859\n\tERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED                                     syscall.Errno = 13860\n\tERROR_IPSEC_IKE_INVALID_POLICY                                            syscall.Errno = 13861\n\tERROR_IPSEC_IKE_UNKNOWN_DOI                                               syscall.Errno = 13862\n\tERROR_IPSEC_IKE_INVALID_SITUATION                                         syscall.Errno = 13863\n\tERROR_IPSEC_IKE_DH_FAILURE                                                syscall.Errno = 13864\n\tERROR_IPSEC_IKE_INVALID_GROUP                                             syscall.Errno = 13865\n\tERROR_IPSEC_IKE_ENCRYPT                                                   syscall.Errno = 13866\n\tERROR_IPSEC_IKE_DECRYPT                                                   syscall.Errno = 13867\n\tERROR_IPSEC_IKE_POLICY_MATCH                                              syscall.Errno = 13868\n\tERROR_IPSEC_IKE_UNSUPPORTED_ID                                            syscall.Errno = 13869\n\tERROR_IPSEC_IKE_INVALID_HASH                                              syscall.Errno = 13870\n\tERROR_IPSEC_IKE_INVALID_HASH_ALG                                          syscall.Errno = 13871\n\tERROR_IPSEC_IKE_INVALID_HASH_SIZE                                         syscall.Errno = 13872\n\tERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG                                       syscall.Errno = 13873\n\tERROR_IPSEC_IKE_INVALID_AUTH_ALG                                          syscall.Errno = 13874\n\tERROR_IPSEC_IKE_INVALID_SIG                                               syscall.Errno = 13875\n\tERROR_IPSEC_IKE_LOAD_FAILED                                               syscall.Errno = 13876\n\tERROR_IPSEC_IKE_RPC_DELETE                                                syscall.Errno = 13877\n\tERROR_IPSEC_IKE_BENIGN_REINIT                                             syscall.Errno = 13878\n\tERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY                         syscall.Errno = 13879\n\tERROR_IPSEC_IKE_INVALID_MAJOR_VERSION                                     syscall.Errno = 13880\n\tERROR_IPSEC_IKE_INVALID_CERT_KEYLEN                                       syscall.Errno = 13881\n\tERROR_IPSEC_IKE_MM_LIMIT                                                  syscall.Errno = 13882\n\tERROR_IPSEC_IKE_NEGOTIATION_DISABLED                                      syscall.Errno = 13883\n\tERROR_IPSEC_IKE_QM_LIMIT                                                  syscall.Errno = 13884\n\tERROR_IPSEC_IKE_MM_EXPIRED                                                syscall.Errno = 13885\n\tERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID                                   syscall.Errno = 13886\n\tERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH                                syscall.Errno = 13887\n\tERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID                                     syscall.Errno = 13888\n\tERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD                                      syscall.Errno = 13889\n\tERROR_IPSEC_IKE_DOS_COOKIE_SENT                                           syscall.Errno = 13890\n\tERROR_IPSEC_IKE_SHUTTING_DOWN                                             syscall.Errno = 13891\n\tERROR_IPSEC_IKE_CGA_AUTH_FAILED                                           syscall.Errno = 13892\n\tERROR_IPSEC_IKE_PROCESS_ERR_NATOA                                         syscall.Errno = 13893\n\tERROR_IPSEC_IKE_INVALID_MM_FOR_QM                                         syscall.Errno = 13894\n\tERROR_IPSEC_IKE_QM_EXPIRED                                                syscall.Errno = 13895\n\tERROR_IPSEC_IKE_TOO_MANY_FILTERS                                          syscall.Errno = 13896\n\tERROR_IPSEC_IKE_NEG_STATUS_END                                            syscall.Errno = 13897\n\tERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL                                     syscall.Errno = 13898\n\tERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE                               syscall.Errno = 13899\n\tERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING                                syscall.Errno = 13900\n\tERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING                  syscall.Errno = 13901\n\tERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS                                      syscall.Errno = 13902\n\tERROR_IPSEC_IKE_RATELIMIT_DROP                                            syscall.Errno = 13903\n\tERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE                                syscall.Errno = 13904\n\tERROR_IPSEC_IKE_AUTHORIZATION_FAILURE                                     syscall.Errno = 13905\n\tERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE                         syscall.Errno = 13906\n\tERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY                 syscall.Errno = 13907\n\tERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE             syscall.Errno = 13908\n\tERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END                                   syscall.Errno = 13909\n\tERROR_IPSEC_BAD_SPI                                                       syscall.Errno = 13910\n\tERROR_IPSEC_SA_LIFETIME_EXPIRED                                           syscall.Errno = 13911\n\tERROR_IPSEC_WRONG_SA                                                      syscall.Errno = 13912\n\tERROR_IPSEC_REPLAY_CHECK_FAILED                                           syscall.Errno = 13913\n\tERROR_IPSEC_INVALID_PACKET                                                syscall.Errno = 13914\n\tERROR_IPSEC_INTEGRITY_CHECK_FAILED                                        syscall.Errno = 13915\n\tERROR_IPSEC_CLEAR_TEXT_DROP                                               syscall.Errno = 13916\n\tERROR_IPSEC_AUTH_FIREWALL_DROP                                            syscall.Errno = 13917\n\tERROR_IPSEC_THROTTLE_DROP                                                 syscall.Errno = 13918\n\tERROR_IPSEC_DOSP_BLOCK                                                    syscall.Errno = 13925\n\tERROR_IPSEC_DOSP_RECEIVED_MULTICAST                                       syscall.Errno = 13926\n\tERROR_IPSEC_DOSP_INVALID_PACKET                                           syscall.Errno = 13927\n\tERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED                                      syscall.Errno = 13928\n\tERROR_IPSEC_DOSP_MAX_ENTRIES                                              syscall.Errno = 13929\n\tERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED                                       syscall.Errno = 13930\n\tERROR_IPSEC_DOSP_NOT_INSTALLED                                            syscall.Errno = 13931\n\tERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES                              syscall.Errno = 13932\n\tERROR_SXS_SECTION_NOT_FOUND                                               syscall.Errno = 14000\n\tERROR_SXS_CANT_GEN_ACTCTX                                                 syscall.Errno = 14001\n\tERROR_SXS_INVALID_ACTCTXDATA_FORMAT                                       syscall.Errno = 14002\n\tERROR_SXS_ASSEMBLY_NOT_FOUND                                              syscall.Errno = 14003\n\tERROR_SXS_MANIFEST_FORMAT_ERROR                                           syscall.Errno = 14004\n\tERROR_SXS_MANIFEST_PARSE_ERROR                                            syscall.Errno = 14005\n\tERROR_SXS_ACTIVATION_CONTEXT_DISABLED                                     syscall.Errno = 14006\n\tERROR_SXS_KEY_NOT_FOUND                                                   syscall.Errno = 14007\n\tERROR_SXS_VERSION_CONFLICT                                                syscall.Errno = 14008\n\tERROR_SXS_WRONG_SECTION_TYPE                                              syscall.Errno = 14009\n\tERROR_SXS_THREAD_QUERIES_DISABLED                                         syscall.Errno = 14010\n\tERROR_SXS_PROCESS_DEFAULT_ALREADY_SET                                     syscall.Errno = 14011\n\tERROR_SXS_UNKNOWN_ENCODING_GROUP                                          syscall.Errno = 14012\n\tERROR_SXS_UNKNOWN_ENCODING                                                syscall.Errno = 14013\n\tERROR_SXS_INVALID_XML_NAMESPACE_URI                                       syscall.Errno = 14014\n\tERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED                          syscall.Errno = 14015\n\tERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED                          syscall.Errno = 14016\n\tERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE                             syscall.Errno = 14017\n\tERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE                     syscall.Errno = 14018\n\tERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE                     syscall.Errno = 14019\n\tERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT                  syscall.Errno = 14020\n\tERROR_SXS_DUPLICATE_DLL_NAME                                              syscall.Errno = 14021\n\tERROR_SXS_DUPLICATE_WINDOWCLASS_NAME                                      syscall.Errno = 14022\n\tERROR_SXS_DUPLICATE_CLSID                                                 syscall.Errno = 14023\n\tERROR_SXS_DUPLICATE_IID                                                   syscall.Errno = 14024\n\tERROR_SXS_DUPLICATE_TLBID                                                 syscall.Errno = 14025\n\tERROR_SXS_DUPLICATE_PROGID                                                syscall.Errno = 14026\n\tERROR_SXS_DUPLICATE_ASSEMBLY_NAME                                         syscall.Errno = 14027\n\tERROR_SXS_FILE_HASH_MISMATCH                                              syscall.Errno = 14028\n\tERROR_SXS_POLICY_PARSE_ERROR                                              syscall.Errno = 14029\n\tERROR_SXS_XML_E_MISSINGQUOTE                                              syscall.Errno = 14030\n\tERROR_SXS_XML_E_COMMENTSYNTAX                                             syscall.Errno = 14031\n\tERROR_SXS_XML_E_BADSTARTNAMECHAR                                          syscall.Errno = 14032\n\tERROR_SXS_XML_E_BADNAMECHAR                                               syscall.Errno = 14033\n\tERROR_SXS_XML_E_BADCHARINSTRING                                           syscall.Errno = 14034\n\tERROR_SXS_XML_E_XMLDECLSYNTAX                                             syscall.Errno = 14035\n\tERROR_SXS_XML_E_BADCHARDATA                                               syscall.Errno = 14036\n\tERROR_SXS_XML_E_MISSINGWHITESPACE                                         syscall.Errno = 14037\n\tERROR_SXS_XML_E_EXPECTINGTAGEND                                           syscall.Errno = 14038\n\tERROR_SXS_XML_E_MISSINGSEMICOLON                                          syscall.Errno = 14039\n\tERROR_SXS_XML_E_UNBALANCEDPAREN                                           syscall.Errno = 14040\n\tERROR_SXS_XML_E_INTERNALERROR                                             syscall.Errno = 14041\n\tERROR_SXS_XML_E_UNEXPECTED_WHITESPACE                                     syscall.Errno = 14042\n\tERROR_SXS_XML_E_INCOMPLETE_ENCODING                                       syscall.Errno = 14043\n\tERROR_SXS_XML_E_MISSING_PAREN                                             syscall.Errno = 14044\n\tERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE                                       syscall.Errno = 14045\n\tERROR_SXS_XML_E_MULTIPLE_COLONS                                           syscall.Errno = 14046\n\tERROR_SXS_XML_E_INVALID_DECIMAL                                           syscall.Errno = 14047\n\tERROR_SXS_XML_E_INVALID_HEXIDECIMAL                                       syscall.Errno = 14048\n\tERROR_SXS_XML_E_INVALID_UNICODE                                           syscall.Errno = 14049\n\tERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK                                  syscall.Errno = 14050\n\tERROR_SXS_XML_E_UNEXPECTEDENDTAG                                          syscall.Errno = 14051\n\tERROR_SXS_XML_E_UNCLOSEDTAG                                               syscall.Errno = 14052\n\tERROR_SXS_XML_E_DUPLICATEATTRIBUTE                                        syscall.Errno = 14053\n\tERROR_SXS_XML_E_MULTIPLEROOTS                                             syscall.Errno = 14054\n\tERROR_SXS_XML_E_INVALIDATROOTLEVEL                                        syscall.Errno = 14055\n\tERROR_SXS_XML_E_BADXMLDECL                                                syscall.Errno = 14056\n\tERROR_SXS_XML_E_MISSINGROOT                                               syscall.Errno = 14057\n\tERROR_SXS_XML_E_UNEXPECTEDEOF                                             syscall.Errno = 14058\n\tERROR_SXS_XML_E_BADPEREFINSUBSET                                          syscall.Errno = 14059\n\tERROR_SXS_XML_E_UNCLOSEDSTARTTAG                                          syscall.Errno = 14060\n\tERROR_SXS_XML_E_UNCLOSEDENDTAG                                            syscall.Errno = 14061\n\tERROR_SXS_XML_E_UNCLOSEDSTRING                                            syscall.Errno = 14062\n\tERROR_SXS_XML_E_UNCLOSEDCOMMENT                                           syscall.Errno = 14063\n\tERROR_SXS_XML_E_UNCLOSEDDECL                                              syscall.Errno = 14064\n\tERROR_SXS_XML_E_UNCLOSEDCDATA                                             syscall.Errno = 14065\n\tERROR_SXS_XML_E_RESERVEDNAMESPACE                                         syscall.Errno = 14066\n\tERROR_SXS_XML_E_INVALIDENCODING                                           syscall.Errno = 14067\n\tERROR_SXS_XML_E_INVALIDSWITCH                                             syscall.Errno = 14068\n\tERROR_SXS_XML_E_BADXMLCASE                                                syscall.Errno = 14069\n\tERROR_SXS_XML_E_INVALID_STANDALONE                                        syscall.Errno = 14070\n\tERROR_SXS_XML_E_UNEXPECTED_STANDALONE                                     syscall.Errno = 14071\n\tERROR_SXS_XML_E_INVALID_VERSION                                           syscall.Errno = 14072\n\tERROR_SXS_XML_E_MISSINGEQUALS                                             syscall.Errno = 14073\n\tERROR_SXS_PROTECTION_RECOVERY_FAILED                                      syscall.Errno = 14074\n\tERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT                                 syscall.Errno = 14075\n\tERROR_SXS_PROTECTION_CATALOG_NOT_VALID                                    syscall.Errno = 14076\n\tERROR_SXS_UNTRANSLATABLE_HRESULT                                          syscall.Errno = 14077\n\tERROR_SXS_PROTECTION_CATALOG_FILE_MISSING                                 syscall.Errno = 14078\n\tERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE                             syscall.Errno = 14079\n\tERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME                        syscall.Errno = 14080\n\tERROR_SXS_ASSEMBLY_MISSING                                                syscall.Errno = 14081\n\tERROR_SXS_CORRUPT_ACTIVATION_STACK                                        syscall.Errno = 14082\n\tERROR_SXS_CORRUPTION                                                      syscall.Errno = 14083\n\tERROR_SXS_EARLY_DEACTIVATION                                              syscall.Errno = 14084\n\tERROR_SXS_INVALID_DEACTIVATION                                            syscall.Errno = 14085\n\tERROR_SXS_MULTIPLE_DEACTIVATION                                           syscall.Errno = 14086\n\tERROR_SXS_PROCESS_TERMINATION_REQUESTED                                   syscall.Errno = 14087\n\tERROR_SXS_RELEASE_ACTIVATION_CONTEXT                                      syscall.Errno = 14088\n\tERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY                         syscall.Errno = 14089\n\tERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE                                syscall.Errno = 14090\n\tERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME                                 syscall.Errno = 14091\n\tERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE                                    syscall.Errno = 14092\n\tERROR_SXS_IDENTITY_PARSE_ERROR                                            syscall.Errno = 14093\n\tERROR_MALFORMED_SUBSTITUTION_STRING                                       syscall.Errno = 14094\n\tERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN                                      syscall.Errno = 14095\n\tERROR_UNMAPPED_SUBSTITUTION_STRING                                        syscall.Errno = 14096\n\tERROR_SXS_ASSEMBLY_NOT_LOCKED                                             syscall.Errno = 14097\n\tERROR_SXS_COMPONENT_STORE_CORRUPT                                         syscall.Errno = 14098\n\tERROR_ADVANCED_INSTALLER_FAILED                                           syscall.Errno = 14099\n\tERROR_XML_ENCODING_MISMATCH                                               syscall.Errno = 14100\n\tERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT                   syscall.Errno = 14101\n\tERROR_SXS_IDENTITIES_DIFFERENT                                            syscall.Errno = 14102\n\tERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT                                    syscall.Errno = 14103\n\tERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY                                       syscall.Errno = 14104\n\tERROR_SXS_MANIFEST_TOO_BIG                                                syscall.Errno = 14105\n\tERROR_SXS_SETTING_NOT_REGISTERED                                          syscall.Errno = 14106\n\tERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE                                  syscall.Errno = 14107\n\tERROR_SMI_PRIMITIVE_INSTALLER_FAILED                                      syscall.Errno = 14108\n\tERROR_GENERIC_COMMAND_FAILED                                              syscall.Errno = 14109\n\tERROR_SXS_FILE_HASH_MISSING                                               syscall.Errno = 14110\n\tERROR_SXS_DUPLICATE_ACTIVATABLE_CLASS                                     syscall.Errno = 14111\n\tERROR_EVT_INVALID_CHANNEL_PATH                                            syscall.Errno = 15000\n\tERROR_EVT_INVALID_QUERY                                                   syscall.Errno = 15001\n\tERROR_EVT_PUBLISHER_METADATA_NOT_FOUND                                    syscall.Errno = 15002\n\tERROR_EVT_EVENT_TEMPLATE_NOT_FOUND                                        syscall.Errno = 15003\n\tERROR_EVT_INVALID_PUBLISHER_NAME                                          syscall.Errno = 15004\n\tERROR_EVT_INVALID_EVENT_DATA                                              syscall.Errno = 15005\n\tERROR_EVT_CHANNEL_NOT_FOUND                                               syscall.Errno = 15007\n\tERROR_EVT_MALFORMED_XML_TEXT                                              syscall.Errno = 15008\n\tERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL                                  syscall.Errno = 15009\n\tERROR_EVT_CONFIGURATION_ERROR                                             syscall.Errno = 15010\n\tERROR_EVT_QUERY_RESULT_STALE                                              syscall.Errno = 15011\n\tERROR_EVT_QUERY_RESULT_INVALID_POSITION                                   syscall.Errno = 15012\n\tERROR_EVT_NON_VALIDATING_MSXML                                            syscall.Errno = 15013\n\tERROR_EVT_FILTER_ALREADYSCOPED                                            syscall.Errno = 15014\n\tERROR_EVT_FILTER_NOTELTSET                                                syscall.Errno = 15015\n\tERROR_EVT_FILTER_INVARG                                                   syscall.Errno = 15016\n\tERROR_EVT_FILTER_INVTEST                                                  syscall.Errno = 15017\n\tERROR_EVT_FILTER_INVTYPE                                                  syscall.Errno = 15018\n\tERROR_EVT_FILTER_PARSEERR                                                 syscall.Errno = 15019\n\tERROR_EVT_FILTER_UNSUPPORTEDOP                                            syscall.Errno = 15020\n\tERROR_EVT_FILTER_UNEXPECTEDTOKEN                                          syscall.Errno = 15021\n\tERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL                   syscall.Errno = 15022\n\tERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE                                  syscall.Errno = 15023\n\tERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE                                syscall.Errno = 15024\n\tERROR_EVT_CHANNEL_CANNOT_ACTIVATE                                         syscall.Errno = 15025\n\tERROR_EVT_FILTER_TOO_COMPLEX                                              syscall.Errno = 15026\n\tERROR_EVT_MESSAGE_NOT_FOUND                                               syscall.Errno = 15027\n\tERROR_EVT_MESSAGE_ID_NOT_FOUND                                            syscall.Errno = 15028\n\tERROR_EVT_UNRESOLVED_VALUE_INSERT                                         syscall.Errno = 15029\n\tERROR_EVT_UNRESOLVED_PARAMETER_INSERT                                     syscall.Errno = 15030\n\tERROR_EVT_MAX_INSERTS_REACHED                                             syscall.Errno = 15031\n\tERROR_EVT_EVENT_DEFINITION_NOT_FOUND                                      syscall.Errno = 15032\n\tERROR_EVT_MESSAGE_LOCALE_NOT_FOUND                                        syscall.Errno = 15033\n\tERROR_EVT_VERSION_TOO_OLD                                                 syscall.Errno = 15034\n\tERROR_EVT_VERSION_TOO_NEW                                                 syscall.Errno = 15035\n\tERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY                                    syscall.Errno = 15036\n\tERROR_EVT_PUBLISHER_DISABLED                                              syscall.Errno = 15037\n\tERROR_EVT_FILTER_OUT_OF_RANGE                                             syscall.Errno = 15038\n\tERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE                                     syscall.Errno = 15080\n\tERROR_EC_LOG_DISABLED                                                     syscall.Errno = 15081\n\tERROR_EC_CIRCULAR_FORWARDING                                              syscall.Errno = 15082\n\tERROR_EC_CREDSTORE_FULL                                                   syscall.Errno = 15083\n\tERROR_EC_CRED_NOT_FOUND                                                   syscall.Errno = 15084\n\tERROR_EC_NO_ACTIVE_CHANNEL                                                syscall.Errno = 15085\n\tERROR_MUI_FILE_NOT_FOUND                                                  syscall.Errno = 15100\n\tERROR_MUI_INVALID_FILE                                                    syscall.Errno = 15101\n\tERROR_MUI_INVALID_RC_CONFIG                                               syscall.Errno = 15102\n\tERROR_MUI_INVALID_LOCALE_NAME                                             syscall.Errno = 15103\n\tERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME                                   syscall.Errno = 15104\n\tERROR_MUI_FILE_NOT_LOADED                                                 syscall.Errno = 15105\n\tERROR_RESOURCE_ENUM_USER_STOP                                             syscall.Errno = 15106\n\tERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED                               syscall.Errno = 15107\n\tERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME                                syscall.Errno = 15108\n\tERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE                          syscall.Errno = 15110\n\tERROR_MRM_INVALID_PRICONFIG                                               syscall.Errno = 15111\n\tERROR_MRM_INVALID_FILE_TYPE                                               syscall.Errno = 15112\n\tERROR_MRM_UNKNOWN_QUALIFIER                                               syscall.Errno = 15113\n\tERROR_MRM_INVALID_QUALIFIER_VALUE                                         syscall.Errno = 15114\n\tERROR_MRM_NO_CANDIDATE                                                    syscall.Errno = 15115\n\tERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE                                   syscall.Errno = 15116\n\tERROR_MRM_RESOURCE_TYPE_MISMATCH                                          syscall.Errno = 15117\n\tERROR_MRM_DUPLICATE_MAP_NAME                                              syscall.Errno = 15118\n\tERROR_MRM_DUPLICATE_ENTRY                                                 syscall.Errno = 15119\n\tERROR_MRM_INVALID_RESOURCE_IDENTIFIER                                     syscall.Errno = 15120\n\tERROR_MRM_FILEPATH_TOO_LONG                                               syscall.Errno = 15121\n\tERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE                                      syscall.Errno = 15122\n\tERROR_MRM_INVALID_PRI_FILE                                                syscall.Errno = 15126\n\tERROR_MRM_NAMED_RESOURCE_NOT_FOUND                                        syscall.Errno = 15127\n\tERROR_MRM_MAP_NOT_FOUND                                                   syscall.Errno = 15135\n\tERROR_MRM_UNSUPPORTED_PROFILE_TYPE                                        syscall.Errno = 15136\n\tERROR_MRM_INVALID_QUALIFIER_OPERATOR                                      syscall.Errno = 15137\n\tERROR_MRM_INDETERMINATE_QUALIFIER_VALUE                                   syscall.Errno = 15138\n\tERROR_MRM_AUTOMERGE_ENABLED                                               syscall.Errno = 15139\n\tERROR_MRM_TOO_MANY_RESOURCES                                              syscall.Errno = 15140\n\tERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_MERGE                                 syscall.Errno = 15141\n\tERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_LOAD_UNLOAD_PRI_FILE                  syscall.Errno = 15142\n\tERROR_MRM_NO_CURRENT_VIEW_ON_THREAD                                       syscall.Errno = 15143\n\tERROR_DIFFERENT_PROFILE_RESOURCE_MANAGER_EXIST                            syscall.Errno = 15144\n\tERROR_OPERATION_NOT_ALLOWED_FROM_SYSTEM_COMPONENT                         syscall.Errno = 15145\n\tERROR_MRM_DIRECT_REF_TO_NON_DEFAULT_RESOURCE                              syscall.Errno = 15146\n\tERROR_MRM_GENERATION_COUNT_MISMATCH                                       syscall.Errno = 15147\n\tERROR_PRI_MERGE_VERSION_MISMATCH                                          syscall.Errno = 15148\n\tERROR_PRI_MERGE_MISSING_SCHEMA                                            syscall.Errno = 15149\n\tERROR_PRI_MERGE_LOAD_FILE_FAILED                                          syscall.Errno = 15150\n\tERROR_PRI_MERGE_ADD_FILE_FAILED                                           syscall.Errno = 15151\n\tERROR_PRI_MERGE_WRITE_FILE_FAILED                                         syscall.Errno = 15152\n\tERROR_PRI_MERGE_MULTIPLE_PACKAGE_FAMILIES_NOT_ALLOWED                     syscall.Errno = 15153\n\tERROR_PRI_MERGE_MULTIPLE_MAIN_PACKAGES_NOT_ALLOWED                        syscall.Errno = 15154\n\tERROR_PRI_MERGE_BUNDLE_PACKAGES_NOT_ALLOWED                               syscall.Errno = 15155\n\tERROR_PRI_MERGE_MAIN_PACKAGE_REQUIRED                                     syscall.Errno = 15156\n\tERROR_PRI_MERGE_RESOURCE_PACKAGE_REQUIRED                                 syscall.Errno = 15157\n\tERROR_PRI_MERGE_INVALID_FILE_NAME                                         syscall.Errno = 15158\n\tERROR_MRM_PACKAGE_NOT_FOUND                                               syscall.Errno = 15159\n\tERROR_MRM_MISSING_DEFAULT_LANGUAGE                                        syscall.Errno = 15160\n\tERROR_MCA_INVALID_CAPABILITIES_STRING                                     syscall.Errno = 15200\n\tERROR_MCA_INVALID_VCP_VERSION                                             syscall.Errno = 15201\n\tERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION                             syscall.Errno = 15202\n\tERROR_MCA_MCCS_VERSION_MISMATCH                                           syscall.Errno = 15203\n\tERROR_MCA_UNSUPPORTED_MCCS_VERSION                                        syscall.Errno = 15204\n\tERROR_MCA_INTERNAL_ERROR                                                  syscall.Errno = 15205\n\tERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED                                syscall.Errno = 15206\n\tERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE                                   syscall.Errno = 15207\n\tERROR_AMBIGUOUS_SYSTEM_DEVICE                                             syscall.Errno = 15250\n\tERROR_SYSTEM_DEVICE_NOT_FOUND                                             syscall.Errno = 15299\n\tERROR_HASH_NOT_SUPPORTED                                                  syscall.Errno = 15300\n\tERROR_HASH_NOT_PRESENT                                                    syscall.Errno = 15301\n\tERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED                                syscall.Errno = 15321\n\tERROR_GPIO_CLIENT_INFORMATION_INVALID                                     syscall.Errno = 15322\n\tERROR_GPIO_VERSION_NOT_SUPPORTED                                          syscall.Errno = 15323\n\tERROR_GPIO_INVALID_REGISTRATION_PACKET                                    syscall.Errno = 15324\n\tERROR_GPIO_OPERATION_DENIED                                               syscall.Errno = 15325\n\tERROR_GPIO_INCOMPATIBLE_CONNECT_MODE                                      syscall.Errno = 15326\n\tERROR_GPIO_INTERRUPT_ALREADY_UNMASKED                                     syscall.Errno = 15327\n\tERROR_CANNOT_SWITCH_RUNLEVEL                                              syscall.Errno = 15400\n\tERROR_INVALID_RUNLEVEL_SETTING                                            syscall.Errno = 15401\n\tERROR_RUNLEVEL_SWITCH_TIMEOUT                                             syscall.Errno = 15402\n\tERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT                                       syscall.Errno = 15403\n\tERROR_RUNLEVEL_SWITCH_IN_PROGRESS                                         syscall.Errno = 15404\n\tERROR_SERVICES_FAILED_AUTOSTART                                           syscall.Errno = 15405\n\tERROR_COM_TASK_STOP_PENDING                                               syscall.Errno = 15501\n\tERROR_INSTALL_OPEN_PACKAGE_FAILED                                         syscall.Errno = 15600\n\tERROR_INSTALL_PACKAGE_NOT_FOUND                                           syscall.Errno = 15601\n\tERROR_INSTALL_INVALID_PACKAGE                                             syscall.Errno = 15602\n\tERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED                                   syscall.Errno = 15603\n\tERROR_INSTALL_OUT_OF_DISK_SPACE                                           syscall.Errno = 15604\n\tERROR_INSTALL_NETWORK_FAILURE                                             syscall.Errno = 15605\n\tERROR_INSTALL_REGISTRATION_FAILURE                                        syscall.Errno = 15606\n\tERROR_INSTALL_DEREGISTRATION_FAILURE                                      syscall.Errno = 15607\n\tERROR_INSTALL_CANCEL                                                      syscall.Errno = 15608\n\tERROR_INSTALL_FAILED                                                      syscall.Errno = 15609\n\tERROR_REMOVE_FAILED                                                       syscall.Errno = 15610\n\tERROR_PACKAGE_ALREADY_EXISTS                                              syscall.Errno = 15611\n\tERROR_NEEDS_REMEDIATION                                                   syscall.Errno = 15612\n\tERROR_INSTALL_PREREQUISITE_FAILED                                         syscall.Errno = 15613\n\tERROR_PACKAGE_REPOSITORY_CORRUPTED                                        syscall.Errno = 15614\n\tERROR_INSTALL_POLICY_FAILURE                                              syscall.Errno = 15615\n\tERROR_PACKAGE_UPDATING                                                    syscall.Errno = 15616\n\tERROR_DEPLOYMENT_BLOCKED_BY_POLICY                                        syscall.Errno = 15617\n\tERROR_PACKAGES_IN_USE                                                     syscall.Errno = 15618\n\tERROR_RECOVERY_FILE_CORRUPT                                               syscall.Errno = 15619\n\tERROR_INVALID_STAGED_SIGNATURE                                            syscall.Errno = 15620\n\tERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED                      syscall.Errno = 15621\n\tERROR_INSTALL_PACKAGE_DOWNGRADE                                           syscall.Errno = 15622\n\tERROR_SYSTEM_NEEDS_REMEDIATION                                            syscall.Errno = 15623\n\tERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN                                     syscall.Errno = 15624\n\tERROR_RESILIENCY_FILE_CORRUPT                                             syscall.Errno = 15625\n\tERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING                                syscall.Errno = 15626\n\tERROR_PACKAGE_MOVE_FAILED                                                 syscall.Errno = 15627\n\tERROR_INSTALL_VOLUME_NOT_EMPTY                                            syscall.Errno = 15628\n\tERROR_INSTALL_VOLUME_OFFLINE                                              syscall.Errno = 15629\n\tERROR_INSTALL_VOLUME_CORRUPT                                              syscall.Errno = 15630\n\tERROR_NEEDS_REGISTRATION                                                  syscall.Errno = 15631\n\tERROR_INSTALL_WRONG_PROCESSOR_ARCHITECTURE                                syscall.Errno = 15632\n\tERROR_DEV_SIDELOAD_LIMIT_EXCEEDED                                         syscall.Errno = 15633\n\tERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE                      syscall.Errno = 15634\n\tERROR_PACKAGE_NOT_SUPPORTED_ON_FILESYSTEM                                 syscall.Errno = 15635\n\tERROR_PACKAGE_MOVE_BLOCKED_BY_STREAMING                                   syscall.Errno = 15636\n\tERROR_INSTALL_OPTIONAL_PACKAGE_APPLICATIONID_NOT_UNIQUE                   syscall.Errno = 15637\n\tERROR_PACKAGE_STAGING_ONHOLD                                              syscall.Errno = 15638\n\tERROR_INSTALL_INVALID_RELATED_SET_UPDATE                                  syscall.Errno = 15639\n\tERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_FULLTRUST_CAPABILITY syscall.Errno = 15640\n\tERROR_DEPLOYMENT_BLOCKED_BY_USER_LOG_OFF                                  syscall.Errno = 15641\n\tERROR_PROVISION_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_PROVISIONED        syscall.Errno = 15642\n\tERROR_PACKAGES_REPUTATION_CHECK_FAILED                                    syscall.Errno = 15643\n\tERROR_PACKAGES_REPUTATION_CHECK_TIMEDOUT                                  syscall.Errno = 15644\n\tERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED                                     syscall.Errno = 15645\n\tERROR_APPINSTALLER_ACTIVATION_BLOCKED                                     syscall.Errno = 15646\n\tERROR_REGISTRATION_FROM_REMOTE_DRIVE_NOT_SUPPORTED                        syscall.Errno = 15647\n\tERROR_APPX_RAW_DATA_WRITE_FAILED                                          syscall.Errno = 15648\n\tERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_PACKAGE                         syscall.Errno = 15649\n\tERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_MACHINE                         syscall.Errno = 15650\n\tERROR_DEPLOYMENT_BLOCKED_BY_PROFILE_POLICY                                syscall.Errno = 15651\n\tERROR_DEPLOYMENT_FAILED_CONFLICTING_MUTABLE_PACKAGE_DIRECTORY             syscall.Errno = 15652\n\tERROR_SINGLETON_RESOURCE_INSTALLED_IN_ACTIVE_USER                         syscall.Errno = 15653\n\tERROR_DIFFERENT_VERSION_OF_PACKAGED_SERVICE_INSTALLED                     syscall.Errno = 15654\n\tERROR_SERVICE_EXISTS_AS_NON_PACKAGED_SERVICE                              syscall.Errno = 15655\n\tERROR_PACKAGED_SERVICE_REQUIRES_ADMIN_PRIVILEGES                          syscall.Errno = 15656\n\tAPPMODEL_ERROR_NO_PACKAGE                                                 syscall.Errno = 15700\n\tAPPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT                                    syscall.Errno = 15701\n\tAPPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT                                   syscall.Errno = 15702\n\tAPPMODEL_ERROR_NO_APPLICATION                                             syscall.Errno = 15703\n\tAPPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED                               syscall.Errno = 15704\n\tAPPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID                                   syscall.Errno = 15705\n\tAPPMODEL_ERROR_PACKAGE_NOT_AVAILABLE                                      syscall.Errno = 15706\n\tAPPMODEL_ERROR_NO_MUTABLE_DIRECTORY                                       syscall.Errno = 15707\n\tERROR_STATE_LOAD_STORE_FAILED                                             syscall.Errno = 15800\n\tERROR_STATE_GET_VERSION_FAILED                                            syscall.Errno = 15801\n\tERROR_STATE_SET_VERSION_FAILED                                            syscall.Errno = 15802\n\tERROR_STATE_STRUCTURED_RESET_FAILED                                       syscall.Errno = 15803\n\tERROR_STATE_OPEN_CONTAINER_FAILED                                         syscall.Errno = 15804\n\tERROR_STATE_CREATE_CONTAINER_FAILED                                       syscall.Errno = 15805\n\tERROR_STATE_DELETE_CONTAINER_FAILED                                       syscall.Errno = 15806\n\tERROR_STATE_READ_SETTING_FAILED                                           syscall.Errno = 15807\n\tERROR_STATE_WRITE_SETTING_FAILED                                          syscall.Errno = 15808\n\tERROR_STATE_DELETE_SETTING_FAILED                                         syscall.Errno = 15809\n\tERROR_STATE_QUERY_SETTING_FAILED                                          syscall.Errno = 15810\n\tERROR_STATE_READ_COMPOSITE_SETTING_FAILED                                 syscall.Errno = 15811\n\tERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED                                syscall.Errno = 15812\n\tERROR_STATE_ENUMERATE_CONTAINER_FAILED                                    syscall.Errno = 15813\n\tERROR_STATE_ENUMERATE_SETTINGS_FAILED                                     syscall.Errno = 15814\n\tERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED                   syscall.Errno = 15815\n\tERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED                             syscall.Errno = 15816\n\tERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED                              syscall.Errno = 15817\n\tERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED                            syscall.Errno = 15818\n\tERROR_API_UNAVAILABLE                                                     syscall.Errno = 15841\n\tSTORE_ERROR_UNLICENSED                                                    syscall.Errno = 15861\n\tSTORE_ERROR_UNLICENSED_USER                                               syscall.Errno = 15862\n\tSTORE_ERROR_PENDING_COM_TRANSACTION                                       syscall.Errno = 15863\n\tSTORE_ERROR_LICENSE_REVOKED                                               syscall.Errno = 15864\n\tSEVERITY_SUCCESS                                                          syscall.Errno = 0\n\tSEVERITY_ERROR                                                            syscall.Errno = 1\n\tFACILITY_NT_BIT                                                                         = 0x10000000\n\tE_NOT_SET                                                                               = ERROR_NOT_FOUND\n\tE_NOT_VALID_STATE                                                                       = ERROR_INVALID_STATE\n\tE_NOT_SUFFICIENT_BUFFER                                                                 = ERROR_INSUFFICIENT_BUFFER\n\tE_TIME_SENSITIVE_THREAD                                                                 = ERROR_TIME_SENSITIVE_THREAD\n\tE_NO_TASK_QUEUE                                                                         = ERROR_NO_TASK_QUEUE\n\tNOERROR                                                                   syscall.Errno = 0\n\tE_UNEXPECTED                                                              Handle        = 0x8000FFFF\n\tE_NOTIMPL                                                                 Handle        = 0x80004001\n\tE_OUTOFMEMORY                                                             Handle        = 0x8007000E\n\tE_INVALIDARG                                                              Handle        = 0x80070057\n\tE_NOINTERFACE                                                             Handle        = 0x80004002\n\tE_POINTER                                                                 Handle        = 0x80004003\n\tE_HANDLE                                                                  Handle        = 0x80070006\n\tE_ABORT                                                                   Handle        = 0x80004004\n\tE_FAIL                                                                    Handle        = 0x80004005\n\tE_ACCESSDENIED                                                            Handle        = 0x80070005\n\tE_PENDING                                                                 Handle        = 0x8000000A\n\tE_BOUNDS                                                                  Handle        = 0x8000000B\n\tE_CHANGED_STATE                                                           Handle        = 0x8000000C\n\tE_ILLEGAL_STATE_CHANGE                                                    Handle        = 0x8000000D\n\tE_ILLEGAL_METHOD_CALL                                                     Handle        = 0x8000000E\n\tRO_E_METADATA_NAME_NOT_FOUND                                              Handle        = 0x8000000F\n\tRO_E_METADATA_NAME_IS_NAMESPACE                                           Handle        = 0x80000010\n\tRO_E_METADATA_INVALID_TYPE_FORMAT                                         Handle        = 0x80000011\n\tRO_E_INVALID_METADATA_FILE                                                Handle        = 0x80000012\n\tRO_E_CLOSED                                                               Handle        = 0x80000013\n\tRO_E_EXCLUSIVE_WRITE                                                      Handle        = 0x80000014\n\tRO_E_CHANGE_NOTIFICATION_IN_PROGRESS                                      Handle        = 0x80000015\n\tRO_E_ERROR_STRING_NOT_FOUND                                               Handle        = 0x80000016\n\tE_STRING_NOT_NULL_TERMINATED                                              Handle        = 0x80000017\n\tE_ILLEGAL_DELEGATE_ASSIGNMENT                                             Handle        = 0x80000018\n\tE_ASYNC_OPERATION_NOT_STARTED                                             Handle        = 0x80000019\n\tE_APPLICATION_EXITING                                                     Handle        = 0x8000001A\n\tE_APPLICATION_VIEW_EXITING                                                Handle        = 0x8000001B\n\tRO_E_MUST_BE_AGILE                                                        Handle        = 0x8000001C\n\tRO_E_UNSUPPORTED_FROM_MTA                                                 Handle        = 0x8000001D\n\tRO_E_COMMITTED                                                            Handle        = 0x8000001E\n\tRO_E_BLOCKED_CROSS_ASTA_CALL                                              Handle        = 0x8000001F\n\tRO_E_CANNOT_ACTIVATE_FULL_TRUST_SERVER                                    Handle        = 0x80000020\n\tRO_E_CANNOT_ACTIVATE_UNIVERSAL_APPLICATION_SERVER                         Handle        = 0x80000021\n\tCO_E_INIT_TLS                                                             Handle        = 0x80004006\n\tCO_E_INIT_SHARED_ALLOCATOR                                                Handle        = 0x80004007\n\tCO_E_INIT_MEMORY_ALLOCATOR                                                Handle        = 0x80004008\n\tCO_E_INIT_CLASS_CACHE                                                     Handle        = 0x80004009\n\tCO_E_INIT_RPC_CHANNEL                                                     Handle        = 0x8000400A\n\tCO_E_INIT_TLS_SET_CHANNEL_CONTROL                                         Handle        = 0x8000400B\n\tCO_E_INIT_TLS_CHANNEL_CONTROL                                             Handle        = 0x8000400C\n\tCO_E_INIT_UNACCEPTED_USER_ALLOCATOR                                       Handle        = 0x8000400D\n\tCO_E_INIT_SCM_MUTEX_EXISTS                                                Handle        = 0x8000400E\n\tCO_E_INIT_SCM_FILE_MAPPING_EXISTS                                         Handle        = 0x8000400F\n\tCO_E_INIT_SCM_MAP_VIEW_OF_FILE                                            Handle        = 0x80004010\n\tCO_E_INIT_SCM_EXEC_FAILURE                                                Handle        = 0x80004011\n\tCO_E_INIT_ONLY_SINGLE_THREADED                                            Handle        = 0x80004012\n\tCO_E_CANT_REMOTE                                                          Handle        = 0x80004013\n\tCO_E_BAD_SERVER_NAME                                                      Handle        = 0x80004014\n\tCO_E_WRONG_SERVER_IDENTITY                                                Handle        = 0x80004015\n\tCO_E_OLE1DDE_DISABLED                                                     Handle        = 0x80004016\n\tCO_E_RUNAS_SYNTAX                                                         Handle        = 0x80004017\n\tCO_E_CREATEPROCESS_FAILURE                                                Handle        = 0x80004018\n\tCO_E_RUNAS_CREATEPROCESS_FAILURE                                          Handle        = 0x80004019\n\tCO_E_RUNAS_LOGON_FAILURE                                                  Handle        = 0x8000401A\n\tCO_E_LAUNCH_PERMSSION_DENIED                                              Handle        = 0x8000401B\n\tCO_E_START_SERVICE_FAILURE                                                Handle        = 0x8000401C\n\tCO_E_REMOTE_COMMUNICATION_FAILURE                                         Handle        = 0x8000401D\n\tCO_E_SERVER_START_TIMEOUT                                                 Handle        = 0x8000401E\n\tCO_E_CLSREG_INCONSISTENT                                                  Handle        = 0x8000401F\n\tCO_E_IIDREG_INCONSISTENT                                                  Handle        = 0x80004020\n\tCO_E_NOT_SUPPORTED                                                        Handle        = 0x80004021\n\tCO_E_RELOAD_DLL                                                           Handle        = 0x80004022\n\tCO_E_MSI_ERROR                                                            Handle        = 0x80004023\n\tCO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT                             Handle        = 0x80004024\n\tCO_E_SERVER_PAUSED                                                        Handle        = 0x80004025\n\tCO_E_SERVER_NOT_PAUSED                                                    Handle        = 0x80004026\n\tCO_E_CLASS_DISABLED                                                       Handle        = 0x80004027\n\tCO_E_CLRNOTAVAILABLE                                                      Handle        = 0x80004028\n\tCO_E_ASYNC_WORK_REJECTED                                                  Handle        = 0x80004029\n\tCO_E_SERVER_INIT_TIMEOUT                                                  Handle        = 0x8000402A\n\tCO_E_NO_SECCTX_IN_ACTIVATE                                                Handle        = 0x8000402B\n\tCO_E_TRACKER_CONFIG                                                       Handle        = 0x80004030\n\tCO_E_THREADPOOL_CONFIG                                                    Handle        = 0x80004031\n\tCO_E_SXS_CONFIG                                                           Handle        = 0x80004032\n\tCO_E_MALFORMED_SPN                                                        Handle        = 0x80004033\n\tCO_E_UNREVOKED_REGISTRATION_ON_APARTMENT_SHUTDOWN                         Handle        = 0x80004034\n\tCO_E_PREMATURE_STUB_RUNDOWN                                               Handle        = 0x80004035\n\tS_OK                                                                      Handle        = 0\n\tS_FALSE                                                                   Handle        = 1\n\tOLE_E_FIRST                                                               Handle        = 0x80040000\n\tOLE_E_LAST                                                                Handle        = 0x800400FF\n\tOLE_S_FIRST                                                               Handle        = 0x00040000\n\tOLE_S_LAST                                                                Handle        = 0x000400FF\n\tOLE_E_OLEVERB                                                             Handle        = 0x80040000\n\tOLE_E_ADVF                                                                Handle        = 0x80040001\n\tOLE_E_ENUM_NOMORE                                                         Handle        = 0x80040002\n\tOLE_E_ADVISENOTSUPPORTED                                                  Handle        = 0x80040003\n\tOLE_E_NOCONNECTION                                                        Handle        = 0x80040004\n\tOLE_E_NOTRUNNING                                                          Handle        = 0x80040005\n\tOLE_E_NOCACHE                                                             Handle        = 0x80040006\n\tOLE_E_BLANK                                                               Handle        = 0x80040007\n\tOLE_E_CLASSDIFF                                                           Handle        = 0x80040008\n\tOLE_E_CANT_GETMONIKER                                                     Handle        = 0x80040009\n\tOLE_E_CANT_BINDTOSOURCE                                                   Handle        = 0x8004000A\n\tOLE_E_STATIC                                                              Handle        = 0x8004000B\n\tOLE_E_PROMPTSAVECANCELLED                                                 Handle        = 0x8004000C\n\tOLE_E_INVALIDRECT                                                         Handle        = 0x8004000D\n\tOLE_E_WRONGCOMPOBJ                                                        Handle        = 0x8004000E\n\tOLE_E_INVALIDHWND                                                         Handle        = 0x8004000F\n\tOLE_E_NOT_INPLACEACTIVE                                                   Handle        = 0x80040010\n\tOLE_E_CANTCONVERT                                                         Handle        = 0x80040011\n\tOLE_E_NOSTORAGE                                                           Handle        = 0x80040012\n\tDV_E_FORMATETC                                                            Handle        = 0x80040064\n\tDV_E_DVTARGETDEVICE                                                       Handle        = 0x80040065\n\tDV_E_STGMEDIUM                                                            Handle        = 0x80040066\n\tDV_E_STATDATA                                                             Handle        = 0x80040067\n\tDV_E_LINDEX                                                               Handle        = 0x80040068\n\tDV_E_TYMED                                                                Handle        = 0x80040069\n\tDV_E_CLIPFORMAT                                                           Handle        = 0x8004006A\n\tDV_E_DVASPECT                                                             Handle        = 0x8004006B\n\tDV_E_DVTARGETDEVICE_SIZE                                                  Handle        = 0x8004006C\n\tDV_E_NOIVIEWOBJECT                                                        Handle        = 0x8004006D\n\tDRAGDROP_E_FIRST                                                          syscall.Errno = 0x80040100\n\tDRAGDROP_E_LAST                                                           syscall.Errno = 0x8004010F\n\tDRAGDROP_S_FIRST                                                          syscall.Errno = 0x00040100\n\tDRAGDROP_S_LAST                                                           syscall.Errno = 0x0004010F\n\tDRAGDROP_E_NOTREGISTERED                                                  Handle        = 0x80040100\n\tDRAGDROP_E_ALREADYREGISTERED                                              Handle        = 0x80040101\n\tDRAGDROP_E_INVALIDHWND                                                    Handle        = 0x80040102\n\tDRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED                                      Handle        = 0x80040103\n\tCLASSFACTORY_E_FIRST                                                      syscall.Errno = 0x80040110\n\tCLASSFACTORY_E_LAST                                                       syscall.Errno = 0x8004011F\n\tCLASSFACTORY_S_FIRST                                                      syscall.Errno = 0x00040110\n\tCLASSFACTORY_S_LAST                                                       syscall.Errno = 0x0004011F\n\tCLASS_E_NOAGGREGATION                                                     Handle        = 0x80040110\n\tCLASS_E_CLASSNOTAVAILABLE                                                 Handle        = 0x80040111\n\tCLASS_E_NOTLICENSED                                                       Handle        = 0x80040112\n\tMARSHAL_E_FIRST                                                           syscall.Errno = 0x80040120\n\tMARSHAL_E_LAST                                                            syscall.Errno = 0x8004012F\n\tMARSHAL_S_FIRST                                                           syscall.Errno = 0x00040120\n\tMARSHAL_S_LAST                                                            syscall.Errno = 0x0004012F\n\tDATA_E_FIRST                                                              syscall.Errno = 0x80040130\n\tDATA_E_LAST                                                               syscall.Errno = 0x8004013F\n\tDATA_S_FIRST                                                              syscall.Errno = 0x00040130\n\tDATA_S_LAST                                                               syscall.Errno = 0x0004013F\n\tVIEW_E_FIRST                                                              syscall.Errno = 0x80040140\n\tVIEW_E_LAST                                                               syscall.Errno = 0x8004014F\n\tVIEW_S_FIRST                                                              syscall.Errno = 0x00040140\n\tVIEW_S_LAST                                                               syscall.Errno = 0x0004014F\n\tVIEW_E_DRAW                                                               Handle        = 0x80040140\n\tREGDB_E_FIRST                                                             syscall.Errno = 0x80040150\n\tREGDB_E_LAST                                                              syscall.Errno = 0x8004015F\n\tREGDB_S_FIRST                                                             syscall.Errno = 0x00040150\n\tREGDB_S_LAST                                                              syscall.Errno = 0x0004015F\n\tREGDB_E_READREGDB                                                         Handle        = 0x80040150\n\tREGDB_E_WRITEREGDB                                                        Handle        = 0x80040151\n\tREGDB_E_KEYMISSING                                                        Handle        = 0x80040152\n\tREGDB_E_INVALIDVALUE                                                      Handle        = 0x80040153\n\tREGDB_E_CLASSNOTREG                                                       Handle        = 0x80040154\n\tREGDB_E_IIDNOTREG                                                         Handle        = 0x80040155\n\tREGDB_E_BADTHREADINGMODEL                                                 Handle        = 0x80040156\n\tREGDB_E_PACKAGEPOLICYVIOLATION                                            Handle        = 0x80040157\n\tCAT_E_FIRST                                                               syscall.Errno = 0x80040160\n\tCAT_E_LAST                                                                syscall.Errno = 0x80040161\n\tCAT_E_CATIDNOEXIST                                                        Handle        = 0x80040160\n\tCAT_E_NODESCRIPTION                                                       Handle        = 0x80040161\n\tCS_E_FIRST                                                                syscall.Errno = 0x80040164\n\tCS_E_LAST                                                                 syscall.Errno = 0x8004016F\n\tCS_E_PACKAGE_NOTFOUND                                                     Handle        = 0x80040164\n\tCS_E_NOT_DELETABLE                                                        Handle        = 0x80040165\n\tCS_E_CLASS_NOTFOUND                                                       Handle        = 0x80040166\n\tCS_E_INVALID_VERSION                                                      Handle        = 0x80040167\n\tCS_E_NO_CLASSSTORE                                                        Handle        = 0x80040168\n\tCS_E_OBJECT_NOTFOUND                                                      Handle        = 0x80040169\n\tCS_E_OBJECT_ALREADY_EXISTS                                                Handle        = 0x8004016A\n\tCS_E_INVALID_PATH                                                         Handle        = 0x8004016B\n\tCS_E_NETWORK_ERROR                                                        Handle        = 0x8004016C\n\tCS_E_ADMIN_LIMIT_EXCEEDED                                                 Handle        = 0x8004016D\n\tCS_E_SCHEMA_MISMATCH                                                      Handle        = 0x8004016E\n\tCS_E_INTERNAL_ERROR                                                       Handle        = 0x8004016F\n\tCACHE_E_FIRST                                                             syscall.Errno = 0x80040170\n\tCACHE_E_LAST                                                              syscall.Errno = 0x8004017F\n\tCACHE_S_FIRST                                                             syscall.Errno = 0x00040170\n\tCACHE_S_LAST                                                              syscall.Errno = 0x0004017F\n\tCACHE_E_NOCACHE_UPDATED                                                   Handle        = 0x80040170\n\tOLEOBJ_E_FIRST                                                            syscall.Errno = 0x80040180\n\tOLEOBJ_E_LAST                                                             syscall.Errno = 0x8004018F\n\tOLEOBJ_S_FIRST                                                            syscall.Errno = 0x00040180\n\tOLEOBJ_S_LAST                                                             syscall.Errno = 0x0004018F\n\tOLEOBJ_E_NOVERBS                                                          Handle        = 0x80040180\n\tOLEOBJ_E_INVALIDVERB                                                      Handle        = 0x80040181\n\tCLIENTSITE_E_FIRST                                                        syscall.Errno = 0x80040190\n\tCLIENTSITE_E_LAST                                                         syscall.Errno = 0x8004019F\n\tCLIENTSITE_S_FIRST                                                        syscall.Errno = 0x00040190\n\tCLIENTSITE_S_LAST                                                         syscall.Errno = 0x0004019F\n\tINPLACE_E_NOTUNDOABLE                                                     Handle        = 0x800401A0\n\tINPLACE_E_NOTOOLSPACE                                                     Handle        = 0x800401A1\n\tINPLACE_E_FIRST                                                           syscall.Errno = 0x800401A0\n\tINPLACE_E_LAST                                                            syscall.Errno = 0x800401AF\n\tINPLACE_S_FIRST                                                           syscall.Errno = 0x000401A0\n\tINPLACE_S_LAST                                                            syscall.Errno = 0x000401AF\n\tENUM_E_FIRST                                                              syscall.Errno = 0x800401B0\n\tENUM_E_LAST                                                               syscall.Errno = 0x800401BF\n\tENUM_S_FIRST                                                              syscall.Errno = 0x000401B0\n\tENUM_S_LAST                                                               syscall.Errno = 0x000401BF\n\tCONVERT10_E_FIRST                                                         syscall.Errno = 0x800401C0\n\tCONVERT10_E_LAST                                                          syscall.Errno = 0x800401CF\n\tCONVERT10_S_FIRST                                                         syscall.Errno = 0x000401C0\n\tCONVERT10_S_LAST                                                          syscall.Errno = 0x000401CF\n\tCONVERT10_E_OLESTREAM_GET                                                 Handle        = 0x800401C0\n\tCONVERT10_E_OLESTREAM_PUT                                                 Handle        = 0x800401C1\n\tCONVERT10_E_OLESTREAM_FMT                                                 Handle        = 0x800401C2\n\tCONVERT10_E_OLESTREAM_BITMAP_TO_DIB                                       Handle        = 0x800401C3\n\tCONVERT10_E_STG_FMT                                                       Handle        = 0x800401C4\n\tCONVERT10_E_STG_NO_STD_STREAM                                             Handle        = 0x800401C5\n\tCONVERT10_E_STG_DIB_TO_BITMAP                                             Handle        = 0x800401C6\n\tCLIPBRD_E_FIRST                                                           syscall.Errno = 0x800401D0\n\tCLIPBRD_E_LAST                                                            syscall.Errno = 0x800401DF\n\tCLIPBRD_S_FIRST                                                           syscall.Errno = 0x000401D0\n\tCLIPBRD_S_LAST                                                            syscall.Errno = 0x000401DF\n\tCLIPBRD_E_CANT_OPEN                                                       Handle        = 0x800401D0\n\tCLIPBRD_E_CANT_EMPTY                                                      Handle        = 0x800401D1\n\tCLIPBRD_E_CANT_SET                                                        Handle        = 0x800401D2\n\tCLIPBRD_E_BAD_DATA                                                        Handle        = 0x800401D3\n\tCLIPBRD_E_CANT_CLOSE                                                      Handle        = 0x800401D4\n\tMK_E_FIRST                                                                syscall.Errno = 0x800401E0\n\tMK_E_LAST                                                                 syscall.Errno = 0x800401EF\n\tMK_S_FIRST                                                                syscall.Errno = 0x000401E0\n\tMK_S_LAST                                                                 syscall.Errno = 0x000401EF\n\tMK_E_CONNECTMANUALLY                                                      Handle        = 0x800401E0\n\tMK_E_EXCEEDEDDEADLINE                                                     Handle        = 0x800401E1\n\tMK_E_NEEDGENERIC                                                          Handle        = 0x800401E2\n\tMK_E_UNAVAILABLE                                                          Handle        = 0x800401E3\n\tMK_E_SYNTAX                                                               Handle        = 0x800401E4\n\tMK_E_NOOBJECT                                                             Handle        = 0x800401E5\n\tMK_E_INVALIDEXTENSION                                                     Handle        = 0x800401E6\n\tMK_E_INTERMEDIATEINTERFACENOTSUPPORTED                                    Handle        = 0x800401E7\n\tMK_E_NOTBINDABLE                                                          Handle        = 0x800401E8\n\tMK_E_NOTBOUND                                                             Handle        = 0x800401E9\n\tMK_E_CANTOPENFILE                                                         Handle        = 0x800401EA\n\tMK_E_MUSTBOTHERUSER                                                       Handle        = 0x800401EB\n\tMK_E_NOINVERSE                                                            Handle        = 0x800401EC\n\tMK_E_NOSTORAGE                                                            Handle        = 0x800401ED\n\tMK_E_NOPREFIX                                                             Handle        = 0x800401EE\n\tMK_E_ENUMERATION_FAILED                                                   Handle        = 0x800401EF\n\tCO_E_FIRST                                                                syscall.Errno = 0x800401F0\n\tCO_E_LAST                                                                 syscall.Errno = 0x800401FF\n\tCO_S_FIRST                                                                syscall.Errno = 0x000401F0\n\tCO_S_LAST                                                                 syscall.Errno = 0x000401FF\n\tCO_E_NOTINITIALIZED                                                       Handle        = 0x800401F0\n\tCO_E_ALREADYINITIALIZED                                                   Handle        = 0x800401F1\n\tCO_E_CANTDETERMINECLASS                                                   Handle        = 0x800401F2\n\tCO_E_CLASSSTRING                                                          Handle        = 0x800401F3\n\tCO_E_IIDSTRING                                                            Handle        = 0x800401F4\n\tCO_E_APPNOTFOUND                                                          Handle        = 0x800401F5\n\tCO_E_APPSINGLEUSE                                                         Handle        = 0x800401F6\n\tCO_E_ERRORINAPP                                                           Handle        = 0x800401F7\n\tCO_E_DLLNOTFOUND                                                          Handle        = 0x800401F8\n\tCO_E_ERRORINDLL                                                           Handle        = 0x800401F9\n\tCO_E_WRONGOSFORAPP                                                        Handle        = 0x800401FA\n\tCO_E_OBJNOTREG                                                            Handle        = 0x800401FB\n\tCO_E_OBJISREG                                                             Handle        = 0x800401FC\n\tCO_E_OBJNOTCONNECTED                                                      Handle        = 0x800401FD\n\tCO_E_APPDIDNTREG                                                          Handle        = 0x800401FE\n\tCO_E_RELEASED                                                             Handle        = 0x800401FF\n\tEVENT_E_FIRST                                                             syscall.Errno = 0x80040200\n\tEVENT_E_LAST                                                              syscall.Errno = 0x8004021F\n\tEVENT_S_FIRST                                                             syscall.Errno = 0x00040200\n\tEVENT_S_LAST                                                              syscall.Errno = 0x0004021F\n\tEVENT_S_SOME_SUBSCRIBERS_FAILED                                           Handle        = 0x00040200\n\tEVENT_E_ALL_SUBSCRIBERS_FAILED                                            Handle        = 0x80040201\n\tEVENT_S_NOSUBSCRIBERS                                                     Handle        = 0x00040202\n\tEVENT_E_QUERYSYNTAX                                                       Handle        = 0x80040203\n\tEVENT_E_QUERYFIELD                                                        Handle        = 0x80040204\n\tEVENT_E_INTERNALEXCEPTION                                                 Handle        = 0x80040205\n\tEVENT_E_INTERNALERROR                                                     Handle        = 0x80040206\n\tEVENT_E_INVALID_PER_USER_SID                                              Handle        = 0x80040207\n\tEVENT_E_USER_EXCEPTION                                                    Handle        = 0x80040208\n\tEVENT_E_TOO_MANY_METHODS                                                  Handle        = 0x80040209\n\tEVENT_E_MISSING_EVENTCLASS                                                Handle        = 0x8004020A\n\tEVENT_E_NOT_ALL_REMOVED                                                   Handle        = 0x8004020B\n\tEVENT_E_COMPLUS_NOT_INSTALLED                                             Handle        = 0x8004020C\n\tEVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT                         Handle        = 0x8004020D\n\tEVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT                           Handle        = 0x8004020E\n\tEVENT_E_INVALID_EVENT_CLASS_PARTITION                                     Handle        = 0x8004020F\n\tEVENT_E_PER_USER_SID_NOT_LOGGED_ON                                        Handle        = 0x80040210\n\tTPC_E_INVALID_PROPERTY                                                    Handle        = 0x80040241\n\tTPC_E_NO_DEFAULT_TABLET                                                   Handle        = 0x80040212\n\tTPC_E_UNKNOWN_PROPERTY                                                    Handle        = 0x8004021B\n\tTPC_E_INVALID_INPUT_RECT                                                  Handle        = 0x80040219\n\tTPC_E_INVALID_STROKE                                                      Handle        = 0x80040222\n\tTPC_E_INITIALIZE_FAIL                                                     Handle        = 0x80040223\n\tTPC_E_NOT_RELEVANT                                                        Handle        = 0x80040232\n\tTPC_E_INVALID_PACKET_DESCRIPTION                                          Handle        = 0x80040233\n\tTPC_E_RECOGNIZER_NOT_REGISTERED                                           Handle        = 0x80040235\n\tTPC_E_INVALID_RIGHTS                                                      Handle        = 0x80040236\n\tTPC_E_OUT_OF_ORDER_CALL                                                   Handle        = 0x80040237\n\tTPC_E_QUEUE_FULL                                                          Handle        = 0x80040238\n\tTPC_E_INVALID_CONFIGURATION                                               Handle        = 0x80040239\n\tTPC_E_INVALID_DATA_FROM_RECOGNIZER                                        Handle        = 0x8004023A\n\tTPC_S_TRUNCATED                                                           Handle        = 0x00040252\n\tTPC_S_INTERRUPTED                                                         Handle        = 0x00040253\n\tTPC_S_NO_DATA_TO_PROCESS                                                  Handle        = 0x00040254\n\tXACT_E_FIRST                                                              syscall.Errno = 0x8004D000\n\tXACT_E_LAST                                                               syscall.Errno = 0x8004D02B\n\tXACT_S_FIRST                                                              syscall.Errno = 0x0004D000\n\tXACT_S_LAST                                                               syscall.Errno = 0x0004D010\n\tXACT_E_ALREADYOTHERSINGLEPHASE                                            Handle        = 0x8004D000\n\tXACT_E_CANTRETAIN                                                         Handle        = 0x8004D001\n\tXACT_E_COMMITFAILED                                                       Handle        = 0x8004D002\n\tXACT_E_COMMITPREVENTED                                                    Handle        = 0x8004D003\n\tXACT_E_HEURISTICABORT                                                     Handle        = 0x8004D004\n\tXACT_E_HEURISTICCOMMIT                                                    Handle        = 0x8004D005\n\tXACT_E_HEURISTICDAMAGE                                                    Handle        = 0x8004D006\n\tXACT_E_HEURISTICDANGER                                                    Handle        = 0x8004D007\n\tXACT_E_ISOLATIONLEVEL                                                     Handle        = 0x8004D008\n\tXACT_E_NOASYNC                                                            Handle        = 0x8004D009\n\tXACT_E_NOENLIST                                                           Handle        = 0x8004D00A\n\tXACT_E_NOISORETAIN                                                        Handle        = 0x8004D00B\n\tXACT_E_NORESOURCE                                                         Handle        = 0x8004D00C\n\tXACT_E_NOTCURRENT                                                         Handle        = 0x8004D00D\n\tXACT_E_NOTRANSACTION                                                      Handle        = 0x8004D00E\n\tXACT_E_NOTSUPPORTED                                                       Handle        = 0x8004D00F\n\tXACT_E_UNKNOWNRMGRID                                                      Handle        = 0x8004D010\n\tXACT_E_WRONGSTATE                                                         Handle        = 0x8004D011\n\tXACT_E_WRONGUOW                                                           Handle        = 0x8004D012\n\tXACT_E_XTIONEXISTS                                                        Handle        = 0x8004D013\n\tXACT_E_NOIMPORTOBJECT                                                     Handle        = 0x8004D014\n\tXACT_E_INVALIDCOOKIE                                                      Handle        = 0x8004D015\n\tXACT_E_INDOUBT                                                            Handle        = 0x8004D016\n\tXACT_E_NOTIMEOUT                                                          Handle        = 0x8004D017\n\tXACT_E_ALREADYINPROGRESS                                                  Handle        = 0x8004D018\n\tXACT_E_ABORTED                                                            Handle        = 0x8004D019\n\tXACT_E_LOGFULL                                                            Handle        = 0x8004D01A\n\tXACT_E_TMNOTAVAILABLE                                                     Handle        = 0x8004D01B\n\tXACT_E_CONNECTION_DOWN                                                    Handle        = 0x8004D01C\n\tXACT_E_CONNECTION_DENIED                                                  Handle        = 0x8004D01D\n\tXACT_E_REENLISTTIMEOUT                                                    Handle        = 0x8004D01E\n\tXACT_E_TIP_CONNECT_FAILED                                                 Handle        = 0x8004D01F\n\tXACT_E_TIP_PROTOCOL_ERROR                                                 Handle        = 0x8004D020\n\tXACT_E_TIP_PULL_FAILED                                                    Handle        = 0x8004D021\n\tXACT_E_DEST_TMNOTAVAILABLE                                                Handle        = 0x8004D022\n\tXACT_E_TIP_DISABLED                                                       Handle        = 0x8004D023\n\tXACT_E_NETWORK_TX_DISABLED                                                Handle        = 0x8004D024\n\tXACT_E_PARTNER_NETWORK_TX_DISABLED                                        Handle        = 0x8004D025\n\tXACT_E_XA_TX_DISABLED                                                     Handle        = 0x8004D026\n\tXACT_E_UNABLE_TO_READ_DTC_CONFIG                                          Handle        = 0x8004D027\n\tXACT_E_UNABLE_TO_LOAD_DTC_PROXY                                           Handle        = 0x8004D028\n\tXACT_E_ABORTING                                                           Handle        = 0x8004D029\n\tXACT_E_PUSH_COMM_FAILURE                                                  Handle        = 0x8004D02A\n\tXACT_E_PULL_COMM_FAILURE                                                  Handle        = 0x8004D02B\n\tXACT_E_LU_TX_DISABLED                                                     Handle        = 0x8004D02C\n\tXACT_E_CLERKNOTFOUND                                                      Handle        = 0x8004D080\n\tXACT_E_CLERKEXISTS                                                        Handle        = 0x8004D081\n\tXACT_E_RECOVERYINPROGRESS                                                 Handle        = 0x8004D082\n\tXACT_E_TRANSACTIONCLOSED                                                  Handle        = 0x8004D083\n\tXACT_E_INVALIDLSN                                                         Handle        = 0x8004D084\n\tXACT_E_REPLAYREQUEST                                                      Handle        = 0x8004D085\n\tXACT_S_ASYNC                                                              Handle        = 0x0004D000\n\tXACT_S_DEFECT                                                             Handle        = 0x0004D001\n\tXACT_S_READONLY                                                           Handle        = 0x0004D002\n\tXACT_S_SOMENORETAIN                                                       Handle        = 0x0004D003\n\tXACT_S_OKINFORM                                                           Handle        = 0x0004D004\n\tXACT_S_MADECHANGESCONTENT                                                 Handle        = 0x0004D005\n\tXACT_S_MADECHANGESINFORM                                                  Handle        = 0x0004D006\n\tXACT_S_ALLNORETAIN                                                        Handle        = 0x0004D007\n\tXACT_S_ABORTING                                                           Handle        = 0x0004D008\n\tXACT_S_SINGLEPHASE                                                        Handle        = 0x0004D009\n\tXACT_S_LOCALLY_OK                                                         Handle        = 0x0004D00A\n\tXACT_S_LASTRESOURCEMANAGER                                                Handle        = 0x0004D010\n\tCONTEXT_E_FIRST                                                           syscall.Errno = 0x8004E000\n\tCONTEXT_E_LAST                                                            syscall.Errno = 0x8004E02F\n\tCONTEXT_S_FIRST                                                           syscall.Errno = 0x0004E000\n\tCONTEXT_S_LAST                                                            syscall.Errno = 0x0004E02F\n\tCONTEXT_E_ABORTED                                                         Handle        = 0x8004E002\n\tCONTEXT_E_ABORTING                                                        Handle        = 0x8004E003\n\tCONTEXT_E_NOCONTEXT                                                       Handle        = 0x8004E004\n\tCONTEXT_E_WOULD_DEADLOCK                                                  Handle        = 0x8004E005\n\tCONTEXT_E_SYNCH_TIMEOUT                                                   Handle        = 0x8004E006\n\tCONTEXT_E_OLDREF                                                          Handle        = 0x8004E007\n\tCONTEXT_E_ROLENOTFOUND                                                    Handle        = 0x8004E00C\n\tCONTEXT_E_TMNOTAVAILABLE                                                  Handle        = 0x8004E00F\n\tCO_E_ACTIVATIONFAILED                                                     Handle        = 0x8004E021\n\tCO_E_ACTIVATIONFAILED_EVENTLOGGED                                         Handle        = 0x8004E022\n\tCO_E_ACTIVATIONFAILED_CATALOGERROR                                        Handle        = 0x8004E023\n\tCO_E_ACTIVATIONFAILED_TIMEOUT                                             Handle        = 0x8004E024\n\tCO_E_INITIALIZATIONFAILED                                                 Handle        = 0x8004E025\n\tCONTEXT_E_NOJIT                                                           Handle        = 0x8004E026\n\tCONTEXT_E_NOTRANSACTION                                                   Handle        = 0x8004E027\n\tCO_E_THREADINGMODEL_CHANGED                                               Handle        = 0x8004E028\n\tCO_E_NOIISINTRINSICS                                                      Handle        = 0x8004E029\n\tCO_E_NOCOOKIES                                                            Handle        = 0x8004E02A\n\tCO_E_DBERROR                                                              Handle        = 0x8004E02B\n\tCO_E_NOTPOOLED                                                            Handle        = 0x8004E02C\n\tCO_E_NOTCONSTRUCTED                                                       Handle        = 0x8004E02D\n\tCO_E_NOSYNCHRONIZATION                                                    Handle        = 0x8004E02E\n\tCO_E_ISOLEVELMISMATCH                                                     Handle        = 0x8004E02F\n\tCO_E_CALL_OUT_OF_TX_SCOPE_NOT_ALLOWED                                     Handle        = 0x8004E030\n\tCO_E_EXIT_TRANSACTION_SCOPE_NOT_CALLED                                    Handle        = 0x8004E031\n\tOLE_S_USEREG                                                              Handle        = 0x00040000\n\tOLE_S_STATIC                                                              Handle        = 0x00040001\n\tOLE_S_MAC_CLIPFORMAT                                                      Handle        = 0x00040002\n\tDRAGDROP_S_DROP                                                           Handle        = 0x00040100\n\tDRAGDROP_S_CANCEL                                                         Handle        = 0x00040101\n\tDRAGDROP_S_USEDEFAULTCURSORS                                              Handle        = 0x00040102\n\tDATA_S_SAMEFORMATETC                                                      Handle        = 0x00040130\n\tVIEW_S_ALREADY_FROZEN                                                     Handle        = 0x00040140\n\tCACHE_S_FORMATETC_NOTSUPPORTED                                            Handle        = 0x00040170\n\tCACHE_S_SAMECACHE                                                         Handle        = 0x00040171\n\tCACHE_S_SOMECACHES_NOTUPDATED                                             Handle        = 0x00040172\n\tOLEOBJ_S_INVALIDVERB                                                      Handle        = 0x00040180\n\tOLEOBJ_S_CANNOT_DOVERB_NOW                                                Handle        = 0x00040181\n\tOLEOBJ_S_INVALIDHWND                                                      Handle        = 0x00040182\n\tINPLACE_S_TRUNCATED                                                       Handle        = 0x000401A0\n\tCONVERT10_S_NO_PRESENTATION                                               Handle        = 0x000401C0\n\tMK_S_REDUCED_TO_SELF                                                      Handle        = 0x000401E2\n\tMK_S_ME                                                                   Handle        = 0x000401E4\n\tMK_S_HIM                                                                  Handle        = 0x000401E5\n\tMK_S_US                                                                   Handle        = 0x000401E6\n\tMK_S_MONIKERALREADYREGISTERED                                             Handle        = 0x000401E7\n\tSCHED_S_TASK_READY                                                        Handle        = 0x00041300\n\tSCHED_S_TASK_RUNNING                                                      Handle        = 0x00041301\n\tSCHED_S_TASK_DISABLED                                                     Handle        = 0x00041302\n\tSCHED_S_TASK_HAS_NOT_RUN                                                  Handle        = 0x00041303\n\tSCHED_S_TASK_NO_MORE_RUNS                                                 Handle        = 0x00041304\n\tSCHED_S_TASK_NOT_SCHEDULED                                                Handle        = 0x00041305\n\tSCHED_S_TASK_TERMINATED                                                   Handle        = 0x00041306\n\tSCHED_S_TASK_NO_VALID_TRIGGERS                                            Handle        = 0x00041307\n\tSCHED_S_EVENT_TRIGGER                                                     Handle        = 0x00041308\n\tSCHED_E_TRIGGER_NOT_FOUND                                                 Handle        = 0x80041309\n\tSCHED_E_TASK_NOT_READY                                                    Handle        = 0x8004130A\n\tSCHED_E_TASK_NOT_RUNNING                                                  Handle        = 0x8004130B\n\tSCHED_E_SERVICE_NOT_INSTALLED                                             Handle        = 0x8004130C\n\tSCHED_E_CANNOT_OPEN_TASK                                                  Handle        = 0x8004130D\n\tSCHED_E_INVALID_TASK                                                      Handle        = 0x8004130E\n\tSCHED_E_ACCOUNT_INFORMATION_NOT_SET                                       Handle        = 0x8004130F\n\tSCHED_E_ACCOUNT_NAME_NOT_FOUND                                            Handle        = 0x80041310\n\tSCHED_E_ACCOUNT_DBASE_CORRUPT                                             Handle        = 0x80041311\n\tSCHED_E_NO_SECURITY_SERVICES                                              Handle        = 0x80041312\n\tSCHED_E_UNKNOWN_OBJECT_VERSION                                            Handle        = 0x80041313\n\tSCHED_E_UNSUPPORTED_ACCOUNT_OPTION                                        Handle        = 0x80041314\n\tSCHED_E_SERVICE_NOT_RUNNING                                               Handle        = 0x80041315\n\tSCHED_E_UNEXPECTEDNODE                                                    Handle        = 0x80041316\n\tSCHED_E_NAMESPACE                                                         Handle        = 0x80041317\n\tSCHED_E_INVALIDVALUE                                                      Handle        = 0x80041318\n\tSCHED_E_MISSINGNODE                                                       Handle        = 0x80041319\n\tSCHED_E_MALFORMEDXML                                                      Handle        = 0x8004131A\n\tSCHED_S_SOME_TRIGGERS_FAILED                                              Handle        = 0x0004131B\n\tSCHED_S_BATCH_LOGON_PROBLEM                                               Handle        = 0x0004131C\n\tSCHED_E_TOO_MANY_NODES                                                    Handle        = 0x8004131D\n\tSCHED_E_PAST_END_BOUNDARY                                                 Handle        = 0x8004131E\n\tSCHED_E_ALREADY_RUNNING                                                   Handle        = 0x8004131F\n\tSCHED_E_USER_NOT_LOGGED_ON                                                Handle        = 0x80041320\n\tSCHED_E_INVALID_TASK_HASH                                                 Handle        = 0x80041321\n\tSCHED_E_SERVICE_NOT_AVAILABLE                                             Handle        = 0x80041322\n\tSCHED_E_SERVICE_TOO_BUSY                                                  Handle        = 0x80041323\n\tSCHED_E_TASK_ATTEMPTED                                                    Handle        = 0x80041324\n\tSCHED_S_TASK_QUEUED                                                       Handle        = 0x00041325\n\tSCHED_E_TASK_DISABLED                                                     Handle        = 0x80041326\n\tSCHED_E_TASK_NOT_V1_COMPAT                                                Handle        = 0x80041327\n\tSCHED_E_START_ON_DEMAND                                                   Handle        = 0x80041328\n\tSCHED_E_TASK_NOT_UBPM_COMPAT                                              Handle        = 0x80041329\n\tSCHED_E_DEPRECATED_FEATURE_USED                                           Handle        = 0x80041330\n\tCO_E_CLASS_CREATE_FAILED                                                  Handle        = 0x80080001\n\tCO_E_SCM_ERROR                                                            Handle        = 0x80080002\n\tCO_E_SCM_RPC_FAILURE                                                      Handle        = 0x80080003\n\tCO_E_BAD_PATH                                                             Handle        = 0x80080004\n\tCO_E_SERVER_EXEC_FAILURE                                                  Handle        = 0x80080005\n\tCO_E_OBJSRV_RPC_FAILURE                                                   Handle        = 0x80080006\n\tMK_E_NO_NORMALIZED                                                        Handle        = 0x80080007\n\tCO_E_SERVER_STOPPING                                                      Handle        = 0x80080008\n\tMEM_E_INVALID_ROOT                                                        Handle        = 0x80080009\n\tMEM_E_INVALID_LINK                                                        Handle        = 0x80080010\n\tMEM_E_INVALID_SIZE                                                        Handle        = 0x80080011\n\tCO_S_NOTALLINTERFACES                                                     Handle        = 0x00080012\n\tCO_S_MACHINENAMENOTFOUND                                                  Handle        = 0x00080013\n\tCO_E_MISSING_DISPLAYNAME                                                  Handle        = 0x80080015\n\tCO_E_RUNAS_VALUE_MUST_BE_AAA                                              Handle        = 0x80080016\n\tCO_E_ELEVATION_DISABLED                                                   Handle        = 0x80080017\n\tAPPX_E_PACKAGING_INTERNAL                                                 Handle        = 0x80080200\n\tAPPX_E_INTERLEAVING_NOT_ALLOWED                                           Handle        = 0x80080201\n\tAPPX_E_RELATIONSHIPS_NOT_ALLOWED                                          Handle        = 0x80080202\n\tAPPX_E_MISSING_REQUIRED_FILE                                              Handle        = 0x80080203\n\tAPPX_E_INVALID_MANIFEST                                                   Handle        = 0x80080204\n\tAPPX_E_INVALID_BLOCKMAP                                                   Handle        = 0x80080205\n\tAPPX_E_CORRUPT_CONTENT                                                    Handle        = 0x80080206\n\tAPPX_E_BLOCK_HASH_INVALID                                                 Handle        = 0x80080207\n\tAPPX_E_REQUESTED_RANGE_TOO_LARGE                                          Handle        = 0x80080208\n\tAPPX_E_INVALID_SIP_CLIENT_DATA                                            Handle        = 0x80080209\n\tAPPX_E_INVALID_KEY_INFO                                                   Handle        = 0x8008020A\n\tAPPX_E_INVALID_CONTENTGROUPMAP                                            Handle        = 0x8008020B\n\tAPPX_E_INVALID_APPINSTALLER                                               Handle        = 0x8008020C\n\tAPPX_E_DELTA_BASELINE_VERSION_MISMATCH                                    Handle        = 0x8008020D\n\tAPPX_E_DELTA_PACKAGE_MISSING_FILE                                         Handle        = 0x8008020E\n\tAPPX_E_INVALID_DELTA_PACKAGE                                              Handle        = 0x8008020F\n\tAPPX_E_DELTA_APPENDED_PACKAGE_NOT_ALLOWED                                 Handle        = 0x80080210\n\tAPPX_E_INVALID_PACKAGING_LAYOUT                                           Handle        = 0x80080211\n\tAPPX_E_INVALID_PACKAGESIGNCONFIG                                          Handle        = 0x80080212\n\tAPPX_E_RESOURCESPRI_NOT_ALLOWED                                           Handle        = 0x80080213\n\tAPPX_E_FILE_COMPRESSION_MISMATCH                                          Handle        = 0x80080214\n\tAPPX_E_INVALID_PAYLOAD_PACKAGE_EXTENSION                                  Handle        = 0x80080215\n\tAPPX_E_INVALID_ENCRYPTION_EXCLUSION_FILE_LIST                             Handle        = 0x80080216\n\tBT_E_SPURIOUS_ACTIVATION                                                  Handle        = 0x80080300\n\tDISP_E_UNKNOWNINTERFACE                                                   Handle        = 0x80020001\n\tDISP_E_MEMBERNOTFOUND                                                     Handle        = 0x80020003\n\tDISP_E_PARAMNOTFOUND                                                      Handle        = 0x80020004\n\tDISP_E_TYPEMISMATCH                                                       Handle        = 0x80020005\n\tDISP_E_UNKNOWNNAME                                                        Handle        = 0x80020006\n\tDISP_E_NONAMEDARGS                                                        Handle        = 0x80020007\n\tDISP_E_BADVARTYPE                                                         Handle        = 0x80020008\n\tDISP_E_EXCEPTION                                                          Handle        = 0x80020009\n\tDISP_E_OVERFLOW                                                           Handle        = 0x8002000A\n\tDISP_E_BADINDEX                                                           Handle        = 0x8002000B\n\tDISP_E_UNKNOWNLCID                                                        Handle        = 0x8002000C\n\tDISP_E_ARRAYISLOCKED                                                      Handle        = 0x8002000D\n\tDISP_E_BADPARAMCOUNT                                                      Handle        = 0x8002000E\n\tDISP_E_PARAMNOTOPTIONAL                                                   Handle        = 0x8002000F\n\tDISP_E_BADCALLEE                                                          Handle        = 0x80020010\n\tDISP_E_NOTACOLLECTION                                                     Handle        = 0x80020011\n\tDISP_E_DIVBYZERO                                                          Handle        = 0x80020012\n\tDISP_E_BUFFERTOOSMALL                                                     Handle        = 0x80020013\n\tTYPE_E_BUFFERTOOSMALL                                                     Handle        = 0x80028016\n\tTYPE_E_FIELDNOTFOUND                                                      Handle        = 0x80028017\n\tTYPE_E_INVDATAREAD                                                        Handle        = 0x80028018\n\tTYPE_E_UNSUPFORMAT                                                        Handle        = 0x80028019\n\tTYPE_E_REGISTRYACCESS                                                     Handle        = 0x8002801C\n\tTYPE_E_LIBNOTREGISTERED                                                   Handle        = 0x8002801D\n\tTYPE_E_UNDEFINEDTYPE                                                      Handle        = 0x80028027\n\tTYPE_E_QUALIFIEDNAMEDISALLOWED                                            Handle        = 0x80028028\n\tTYPE_E_INVALIDSTATE                                                       Handle        = 0x80028029\n\tTYPE_E_WRONGTYPEKIND                                                      Handle        = 0x8002802A\n\tTYPE_E_ELEMENTNOTFOUND                                                    Handle        = 0x8002802B\n\tTYPE_E_AMBIGUOUSNAME                                                      Handle        = 0x8002802C\n\tTYPE_E_NAMECONFLICT                                                       Handle        = 0x8002802D\n\tTYPE_E_UNKNOWNLCID                                                        Handle        = 0x8002802E\n\tTYPE_E_DLLFUNCTIONNOTFOUND                                                Handle        = 0x8002802F\n\tTYPE_E_BADMODULEKIND                                                      Handle        = 0x800288BD\n\tTYPE_E_SIZETOOBIG                                                         Handle        = 0x800288C5\n\tTYPE_E_DUPLICATEID                                                        Handle        = 0x800288C6\n\tTYPE_E_INVALIDID                                                          Handle        = 0x800288CF\n\tTYPE_E_TYPEMISMATCH                                                       Handle        = 0x80028CA0\n\tTYPE_E_OUTOFBOUNDS                                                        Handle        = 0x80028CA1\n\tTYPE_E_IOERROR                                                            Handle        = 0x80028CA2\n\tTYPE_E_CANTCREATETMPFILE                                                  Handle        = 0x80028CA3\n\tTYPE_E_CANTLOADLIBRARY                                                    Handle        = 0x80029C4A\n\tTYPE_E_INCONSISTENTPROPFUNCS                                              Handle        = 0x80029C83\n\tTYPE_E_CIRCULARTYPE                                                       Handle        = 0x80029C84\n\tSTG_E_INVALIDFUNCTION                                                     Handle        = 0x80030001\n\tSTG_E_FILENOTFOUND                                                        Handle        = 0x80030002\n\tSTG_E_PATHNOTFOUND                                                        Handle        = 0x80030003\n\tSTG_E_TOOMANYOPENFILES                                                    Handle        = 0x80030004\n\tSTG_E_ACCESSDENIED                                                        Handle        = 0x80030005\n\tSTG_E_INVALIDHANDLE                                                       Handle        = 0x80030006\n\tSTG_E_INSUFFICIENTMEMORY                                                  Handle        = 0x80030008\n\tSTG_E_INVALIDPOINTER                                                      Handle        = 0x80030009\n\tSTG_E_NOMOREFILES                                                         Handle        = 0x80030012\n\tSTG_E_DISKISWRITEPROTECTED                                                Handle        = 0x80030013\n\tSTG_E_SEEKERROR                                                           Handle        = 0x80030019\n\tSTG_E_WRITEFAULT                                                          Handle        = 0x8003001D\n\tSTG_E_READFAULT                                                           Handle        = 0x8003001E\n\tSTG_E_SHAREVIOLATION                                                      Handle        = 0x80030020\n\tSTG_E_LOCKVIOLATION                                                       Handle        = 0x80030021\n\tSTG_E_FILEALREADYEXISTS                                                   Handle        = 0x80030050\n\tSTG_E_INVALIDPARAMETER                                                    Handle        = 0x80030057\n\tSTG_E_MEDIUMFULL                                                          Handle        = 0x80030070\n\tSTG_E_PROPSETMISMATCHED                                                   Handle        = 0x800300F0\n\tSTG_E_ABNORMALAPIEXIT                                                     Handle        = 0x800300FA\n\tSTG_E_INVALIDHEADER                                                       Handle        = 0x800300FB\n\tSTG_E_INVALIDNAME                                                         Handle        = 0x800300FC\n\tSTG_E_UNKNOWN                                                             Handle        = 0x800300FD\n\tSTG_E_UNIMPLEMENTEDFUNCTION                                               Handle        = 0x800300FE\n\tSTG_E_INVALIDFLAG                                                         Handle        = 0x800300FF\n\tSTG_E_INUSE                                                               Handle        = 0x80030100\n\tSTG_E_NOTCURRENT                                                          Handle        = 0x80030101\n\tSTG_E_REVERTED                                                            Handle        = 0x80030102\n\tSTG_E_CANTSAVE                                                            Handle        = 0x80030103\n\tSTG_E_OLDFORMAT                                                           Handle        = 0x80030104\n\tSTG_E_OLDDLL                                                              Handle        = 0x80030105\n\tSTG_E_SHAREREQUIRED                                                       Handle        = 0x80030106\n\tSTG_E_NOTFILEBASEDSTORAGE                                                 Handle        = 0x80030107\n\tSTG_E_EXTANTMARSHALLINGS                                                  Handle        = 0x80030108\n\tSTG_E_DOCFILECORRUPT                                                      Handle        = 0x80030109\n\tSTG_E_BADBASEADDRESS                                                      Handle        = 0x80030110\n\tSTG_E_DOCFILETOOLARGE                                                     Handle        = 0x80030111\n\tSTG_E_NOTSIMPLEFORMAT                                                     Handle        = 0x80030112\n\tSTG_E_INCOMPLETE                                                          Handle        = 0x80030201\n\tSTG_E_TERMINATED                                                          Handle        = 0x80030202\n\tSTG_S_CONVERTED                                                           Handle        = 0x00030200\n\tSTG_S_BLOCK                                                               Handle        = 0x00030201\n\tSTG_S_RETRYNOW                                                            Handle        = 0x00030202\n\tSTG_S_MONITORING                                                          Handle        = 0x00030203\n\tSTG_S_MULTIPLEOPENS                                                       Handle        = 0x00030204\n\tSTG_S_CONSOLIDATIONFAILED                                                 Handle        = 0x00030205\n\tSTG_S_CANNOTCONSOLIDATE                                                   Handle        = 0x00030206\n\tSTG_S_POWER_CYCLE_REQUIRED                                                Handle        = 0x00030207\n\tSTG_E_FIRMWARE_SLOT_INVALID                                               Handle        = 0x80030208\n\tSTG_E_FIRMWARE_IMAGE_INVALID                                              Handle        = 0x80030209\n\tSTG_E_DEVICE_UNRESPONSIVE                                                 Handle        = 0x8003020A\n\tSTG_E_STATUS_COPY_PROTECTION_FAILURE                                      Handle        = 0x80030305\n\tSTG_E_CSS_AUTHENTICATION_FAILURE                                          Handle        = 0x80030306\n\tSTG_E_CSS_KEY_NOT_PRESENT                                                 Handle        = 0x80030307\n\tSTG_E_CSS_KEY_NOT_ESTABLISHED                                             Handle        = 0x80030308\n\tSTG_E_CSS_SCRAMBLED_SECTOR                                                Handle        = 0x80030309\n\tSTG_E_CSS_REGION_MISMATCH                                                 Handle        = 0x8003030A\n\tSTG_E_RESETS_EXHAUSTED                                                    Handle        = 0x8003030B\n\tRPC_E_CALL_REJECTED                                                       Handle        = 0x80010001\n\tRPC_E_CALL_CANCELED                                                       Handle        = 0x80010002\n\tRPC_E_CANTPOST_INSENDCALL                                                 Handle        = 0x80010003\n\tRPC_E_CANTCALLOUT_INASYNCCALL                                             Handle        = 0x80010004\n\tRPC_E_CANTCALLOUT_INEXTERNALCALL                                          Handle        = 0x80010005\n\tRPC_E_CONNECTION_TERMINATED                                               Handle        = 0x80010006\n\tRPC_E_SERVER_DIED                                                         Handle        = 0x80010007\n\tRPC_E_CLIENT_DIED                                                         Handle        = 0x80010008\n\tRPC_E_INVALID_DATAPACKET                                                  Handle        = 0x80010009\n\tRPC_E_CANTTRANSMIT_CALL                                                   Handle        = 0x8001000A\n\tRPC_E_CLIENT_CANTMARSHAL_DATA                                             Handle        = 0x8001000B\n\tRPC_E_CLIENT_CANTUNMARSHAL_DATA                                           Handle        = 0x8001000C\n\tRPC_E_SERVER_CANTMARSHAL_DATA                                             Handle        = 0x8001000D\n\tRPC_E_SERVER_CANTUNMARSHAL_DATA                                           Handle        = 0x8001000E\n\tRPC_E_INVALID_DATA                                                        Handle        = 0x8001000F\n\tRPC_E_INVALID_PARAMETER                                                   Handle        = 0x80010010\n\tRPC_E_CANTCALLOUT_AGAIN                                                   Handle        = 0x80010011\n\tRPC_E_SERVER_DIED_DNE                                                     Handle        = 0x80010012\n\tRPC_E_SYS_CALL_FAILED                                                     Handle        = 0x80010100\n\tRPC_E_OUT_OF_RESOURCES                                                    Handle        = 0x80010101\n\tRPC_E_ATTEMPTED_MULTITHREAD                                               Handle        = 0x80010102\n\tRPC_E_NOT_REGISTERED                                                      Handle        = 0x80010103\n\tRPC_E_FAULT                                                               Handle        = 0x80010104\n\tRPC_E_SERVERFAULT                                                         Handle        = 0x80010105\n\tRPC_E_CHANGED_MODE                                                        Handle        = 0x80010106\n\tRPC_E_INVALIDMETHOD                                                       Handle        = 0x80010107\n\tRPC_E_DISCONNECTED                                                        Handle        = 0x80010108\n\tRPC_E_RETRY                                                               Handle        = 0x80010109\n\tRPC_E_SERVERCALL_RETRYLATER                                               Handle        = 0x8001010A\n\tRPC_E_SERVERCALL_REJECTED                                                 Handle        = 0x8001010B\n\tRPC_E_INVALID_CALLDATA                                                    Handle        = 0x8001010C\n\tRPC_E_CANTCALLOUT_ININPUTSYNCCALL                                         Handle        = 0x8001010D\n\tRPC_E_WRONG_THREAD                                                        Handle        = 0x8001010E\n\tRPC_E_THREAD_NOT_INIT                                                     Handle        = 0x8001010F\n\tRPC_E_VERSION_MISMATCH                                                    Handle        = 0x80010110\n\tRPC_E_INVALID_HEADER                                                      Handle        = 0x80010111\n\tRPC_E_INVALID_EXTENSION                                                   Handle        = 0x80010112\n\tRPC_E_INVALID_IPID                                                        Handle        = 0x80010113\n\tRPC_E_INVALID_OBJECT                                                      Handle        = 0x80010114\n\tRPC_S_CALLPENDING                                                         Handle        = 0x80010115\n\tRPC_S_WAITONTIMER                                                         Handle        = 0x80010116\n\tRPC_E_CALL_COMPLETE                                                       Handle        = 0x80010117\n\tRPC_E_UNSECURE_CALL                                                       Handle        = 0x80010118\n\tRPC_E_TOO_LATE                                                            Handle        = 0x80010119\n\tRPC_E_NO_GOOD_SECURITY_PACKAGES                                           Handle        = 0x8001011A\n\tRPC_E_ACCESS_DENIED                                                       Handle        = 0x8001011B\n\tRPC_E_REMOTE_DISABLED                                                     Handle        = 0x8001011C\n\tRPC_E_INVALID_OBJREF                                                      Handle        = 0x8001011D\n\tRPC_E_NO_CONTEXT                                                          Handle        = 0x8001011E\n\tRPC_E_TIMEOUT                                                             Handle        = 0x8001011F\n\tRPC_E_NO_SYNC                                                             Handle        = 0x80010120\n\tRPC_E_FULLSIC_REQUIRED                                                    Handle        = 0x80010121\n\tRPC_E_INVALID_STD_NAME                                                    Handle        = 0x80010122\n\tCO_E_FAILEDTOIMPERSONATE                                                  Handle        = 0x80010123\n\tCO_E_FAILEDTOGETSECCTX                                                    Handle        = 0x80010124\n\tCO_E_FAILEDTOOPENTHREADTOKEN                                              Handle        = 0x80010125\n\tCO_E_FAILEDTOGETTOKENINFO                                                 Handle        = 0x80010126\n\tCO_E_TRUSTEEDOESNTMATCHCLIENT                                             Handle        = 0x80010127\n\tCO_E_FAILEDTOQUERYCLIENTBLANKET                                           Handle        = 0x80010128\n\tCO_E_FAILEDTOSETDACL                                                      Handle        = 0x80010129\n\tCO_E_ACCESSCHECKFAILED                                                    Handle        = 0x8001012A\n\tCO_E_NETACCESSAPIFAILED                                                   Handle        = 0x8001012B\n\tCO_E_WRONGTRUSTEENAMESYNTAX                                               Handle        = 0x8001012C\n\tCO_E_INVALIDSID                                                           Handle        = 0x8001012D\n\tCO_E_CONVERSIONFAILED                                                     Handle        = 0x8001012E\n\tCO_E_NOMATCHINGSIDFOUND                                                   Handle        = 0x8001012F\n\tCO_E_LOOKUPACCSIDFAILED                                                   Handle        = 0x80010130\n\tCO_E_NOMATCHINGNAMEFOUND                                                  Handle        = 0x80010131\n\tCO_E_LOOKUPACCNAMEFAILED                                                  Handle        = 0x80010132\n\tCO_E_SETSERLHNDLFAILED                                                    Handle        = 0x80010133\n\tCO_E_FAILEDTOGETWINDIR                                                    Handle        = 0x80010134\n\tCO_E_PATHTOOLONG                                                          Handle        = 0x80010135\n\tCO_E_FAILEDTOGENUUID                                                      Handle        = 0x80010136\n\tCO_E_FAILEDTOCREATEFILE                                                   Handle        = 0x80010137\n\tCO_E_FAILEDTOCLOSEHANDLE                                                  Handle        = 0x80010138\n\tCO_E_EXCEEDSYSACLLIMIT                                                    Handle        = 0x80010139\n\tCO_E_ACESINWRONGORDER                                                     Handle        = 0x8001013A\n\tCO_E_INCOMPATIBLESTREAMVERSION                                            Handle        = 0x8001013B\n\tCO_E_FAILEDTOOPENPROCESSTOKEN                                             Handle        = 0x8001013C\n\tCO_E_DECODEFAILED                                                         Handle        = 0x8001013D\n\tCO_E_ACNOTINITIALIZED                                                     Handle        = 0x8001013F\n\tCO_E_CANCEL_DISABLED                                                      Handle        = 0x80010140\n\tRPC_E_UNEXPECTED                                                          Handle        = 0x8001FFFF\n\tERROR_AUDITING_DISABLED                                                   Handle        = 0xC0090001\n\tERROR_ALL_SIDS_FILTERED                                                   Handle        = 0xC0090002\n\tERROR_BIZRULES_NOT_ENABLED                                                Handle        = 0xC0090003\n\tNTE_BAD_UID                                                               Handle        = 0x80090001\n\tNTE_BAD_HASH                                                              Handle        = 0x80090002\n\tNTE_BAD_KEY                                                               Handle        = 0x80090003\n\tNTE_BAD_LEN                                                               Handle        = 0x80090004\n\tNTE_BAD_DATA                                                              Handle        = 0x80090005\n\tNTE_BAD_SIGNATURE                                                         Handle        = 0x80090006\n\tNTE_BAD_VER                                                               Handle        = 0x80090007\n\tNTE_BAD_ALGID                                                             Handle        = 0x80090008\n\tNTE_BAD_FLAGS                                                             Handle        = 0x80090009\n\tNTE_BAD_TYPE                                                              Handle        = 0x8009000A\n\tNTE_BAD_KEY_STATE                                                         Handle        = 0x8009000B\n\tNTE_BAD_HASH_STATE                                                        Handle        = 0x8009000C\n\tNTE_NO_KEY                                                                Handle        = 0x8009000D\n\tNTE_NO_MEMORY                                                             Handle        = 0x8009000E\n\tNTE_EXISTS                                                                Handle        = 0x8009000F\n\tNTE_PERM                                                                  Handle        = 0x80090010\n\tNTE_NOT_FOUND                                                             Handle        = 0x80090011\n\tNTE_DOUBLE_ENCRYPT                                                        Handle        = 0x80090012\n\tNTE_BAD_PROVIDER                                                          Handle        = 0x80090013\n\tNTE_BAD_PROV_TYPE                                                         Handle        = 0x80090014\n\tNTE_BAD_PUBLIC_KEY                                                        Handle        = 0x80090015\n\tNTE_BAD_KEYSET                                                            Handle        = 0x80090016\n\tNTE_PROV_TYPE_NOT_DEF                                                     Handle        = 0x80090017\n\tNTE_PROV_TYPE_ENTRY_BAD                                                   Handle        = 0x80090018\n\tNTE_KEYSET_NOT_DEF                                                        Handle        = 0x80090019\n\tNTE_KEYSET_ENTRY_BAD                                                      Handle        = 0x8009001A\n\tNTE_PROV_TYPE_NO_MATCH                                                    Handle        = 0x8009001B\n\tNTE_SIGNATURE_FILE_BAD                                                    Handle        = 0x8009001C\n\tNTE_PROVIDER_DLL_FAIL                                                     Handle        = 0x8009001D\n\tNTE_PROV_DLL_NOT_FOUND                                                    Handle        = 0x8009001E\n\tNTE_BAD_KEYSET_PARAM                                                      Handle        = 0x8009001F\n\tNTE_FAIL                                                                  Handle        = 0x80090020\n\tNTE_SYS_ERR                                                               Handle        = 0x80090021\n\tNTE_SILENT_CONTEXT                                                        Handle        = 0x80090022\n\tNTE_TOKEN_KEYSET_STORAGE_FULL                                             Handle        = 0x80090023\n\tNTE_TEMPORARY_PROFILE                                                     Handle        = 0x80090024\n\tNTE_FIXEDPARAMETER                                                        Handle        = 0x80090025\n\tNTE_INVALID_HANDLE                                                        Handle        = 0x80090026\n\tNTE_INVALID_PARAMETER                                                     Handle        = 0x80090027\n\tNTE_BUFFER_TOO_SMALL                                                      Handle        = 0x80090028\n\tNTE_NOT_SUPPORTED                                                         Handle        = 0x80090029\n\tNTE_NO_MORE_ITEMS                                                         Handle        = 0x8009002A\n\tNTE_BUFFERS_OVERLAP                                                       Handle        = 0x8009002B\n\tNTE_DECRYPTION_FAILURE                                                    Handle        = 0x8009002C\n\tNTE_INTERNAL_ERROR                                                        Handle        = 0x8009002D\n\tNTE_UI_REQUIRED                                                           Handle        = 0x8009002E\n\tNTE_HMAC_NOT_SUPPORTED                                                    Handle        = 0x8009002F\n\tNTE_DEVICE_NOT_READY                                                      Handle        = 0x80090030\n\tNTE_AUTHENTICATION_IGNORED                                                Handle        = 0x80090031\n\tNTE_VALIDATION_FAILED                                                     Handle        = 0x80090032\n\tNTE_INCORRECT_PASSWORD                                                    Handle        = 0x80090033\n\tNTE_ENCRYPTION_FAILURE                                                    Handle        = 0x80090034\n\tNTE_DEVICE_NOT_FOUND                                                      Handle        = 0x80090035\n\tNTE_USER_CANCELLED                                                        Handle        = 0x80090036\n\tNTE_PASSWORD_CHANGE_REQUIRED                                              Handle        = 0x80090037\n\tNTE_NOT_ACTIVE_CONSOLE                                                    Handle        = 0x80090038\n\tSEC_E_INSUFFICIENT_MEMORY                                                 Handle        = 0x80090300\n\tSEC_E_INVALID_HANDLE                                                      Handle        = 0x80090301\n\tSEC_E_UNSUPPORTED_FUNCTION                                                Handle        = 0x80090302\n\tSEC_E_TARGET_UNKNOWN                                                      Handle        = 0x80090303\n\tSEC_E_INTERNAL_ERROR                                                      Handle        = 0x80090304\n\tSEC_E_SECPKG_NOT_FOUND                                                    Handle        = 0x80090305\n\tSEC_E_NOT_OWNER                                                           Handle        = 0x80090306\n\tSEC_E_CANNOT_INSTALL                                                      Handle        = 0x80090307\n\tSEC_E_INVALID_TOKEN                                                       Handle        = 0x80090308\n\tSEC_E_CANNOT_PACK                                                         Handle        = 0x80090309\n\tSEC_E_QOP_NOT_SUPPORTED                                                   Handle        = 0x8009030A\n\tSEC_E_NO_IMPERSONATION                                                    Handle        = 0x8009030B\n\tSEC_E_LOGON_DENIED                                                        Handle        = 0x8009030C\n\tSEC_E_UNKNOWN_CREDENTIALS                                                 Handle        = 0x8009030D\n\tSEC_E_NO_CREDENTIALS                                                      Handle        = 0x8009030E\n\tSEC_E_MESSAGE_ALTERED                                                     Handle        = 0x8009030F\n\tSEC_E_OUT_OF_SEQUENCE                                                     Handle        = 0x80090310\n\tSEC_E_NO_AUTHENTICATING_AUTHORITY                                         Handle        = 0x80090311\n\tSEC_I_CONTINUE_NEEDED                                                     Handle        = 0x00090312\n\tSEC_I_COMPLETE_NEEDED                                                     Handle        = 0x00090313\n\tSEC_I_COMPLETE_AND_CONTINUE                                               Handle        = 0x00090314\n\tSEC_I_LOCAL_LOGON                                                         Handle        = 0x00090315\n\tSEC_I_GENERIC_EXTENSION_RECEIVED                                          Handle        = 0x00090316\n\tSEC_E_BAD_PKGID                                                           Handle        = 0x80090316\n\tSEC_E_CONTEXT_EXPIRED                                                     Handle        = 0x80090317\n\tSEC_I_CONTEXT_EXPIRED                                                     Handle        = 0x00090317\n\tSEC_E_INCOMPLETE_MESSAGE                                                  Handle        = 0x80090318\n\tSEC_E_INCOMPLETE_CREDENTIALS                                              Handle        = 0x80090320\n\tSEC_E_BUFFER_TOO_SMALL                                                    Handle        = 0x80090321\n\tSEC_I_INCOMPLETE_CREDENTIALS                                              Handle        = 0x00090320\n\tSEC_I_RENEGOTIATE                                                         Handle        = 0x00090321\n\tSEC_E_WRONG_PRINCIPAL                                                     Handle        = 0x80090322\n\tSEC_I_NO_LSA_CONTEXT                                                      Handle        = 0x00090323\n\tSEC_E_TIME_SKEW                                                           Handle        = 0x80090324\n\tSEC_E_UNTRUSTED_ROOT                                                      Handle        = 0x80090325\n\tSEC_E_ILLEGAL_MESSAGE                                                     Handle        = 0x80090326\n\tSEC_E_CERT_UNKNOWN                                                        Handle        = 0x80090327\n\tSEC_E_CERT_EXPIRED                                                        Handle        = 0x80090328\n\tSEC_E_ENCRYPT_FAILURE                                                     Handle        = 0x80090329\n\tSEC_E_DECRYPT_FAILURE                                                     Handle        = 0x80090330\n\tSEC_E_ALGORITHM_MISMATCH                                                  Handle        = 0x80090331\n\tSEC_E_SECURITY_QOS_FAILED                                                 Handle        = 0x80090332\n\tSEC_E_UNFINISHED_CONTEXT_DELETED                                          Handle        = 0x80090333\n\tSEC_E_NO_TGT_REPLY                                                        Handle        = 0x80090334\n\tSEC_E_NO_IP_ADDRESSES                                                     Handle        = 0x80090335\n\tSEC_E_WRONG_CREDENTIAL_HANDLE                                             Handle        = 0x80090336\n\tSEC_E_CRYPTO_SYSTEM_INVALID                                               Handle        = 0x80090337\n\tSEC_E_MAX_REFERRALS_EXCEEDED                                              Handle        = 0x80090338\n\tSEC_E_MUST_BE_KDC                                                         Handle        = 0x80090339\n\tSEC_E_STRONG_CRYPTO_NOT_SUPPORTED                                         Handle        = 0x8009033A\n\tSEC_E_TOO_MANY_PRINCIPALS                                                 Handle        = 0x8009033B\n\tSEC_E_NO_PA_DATA                                                          Handle        = 0x8009033C\n\tSEC_E_PKINIT_NAME_MISMATCH                                                Handle        = 0x8009033D\n\tSEC_E_SMARTCARD_LOGON_REQUIRED                                            Handle        = 0x8009033E\n\tSEC_E_SHUTDOWN_IN_PROGRESS                                                Handle        = 0x8009033F\n\tSEC_E_KDC_INVALID_REQUEST                                                 Handle        = 0x80090340\n\tSEC_E_KDC_UNABLE_TO_REFER                                                 Handle        = 0x80090341\n\tSEC_E_KDC_UNKNOWN_ETYPE                                                   Handle        = 0x80090342\n\tSEC_E_UNSUPPORTED_PREAUTH                                                 Handle        = 0x80090343\n\tSEC_E_DELEGATION_REQUIRED                                                 Handle        = 0x80090345\n\tSEC_E_BAD_BINDINGS                                                        Handle        = 0x80090346\n\tSEC_E_MULTIPLE_ACCOUNTS                                                   Handle        = 0x80090347\n\tSEC_E_NO_KERB_KEY                                                         Handle        = 0x80090348\n\tSEC_E_CERT_WRONG_USAGE                                                    Handle        = 0x80090349\n\tSEC_E_DOWNGRADE_DETECTED                                                  Handle        = 0x80090350\n\tSEC_E_SMARTCARD_CERT_REVOKED                                              Handle        = 0x80090351\n\tSEC_E_ISSUING_CA_UNTRUSTED                                                Handle        = 0x80090352\n\tSEC_E_REVOCATION_OFFLINE_C                                                Handle        = 0x80090353\n\tSEC_E_PKINIT_CLIENT_FAILURE                                               Handle        = 0x80090354\n\tSEC_E_SMARTCARD_CERT_EXPIRED                                              Handle        = 0x80090355\n\tSEC_E_NO_S4U_PROT_SUPPORT                                                 Handle        = 0x80090356\n\tSEC_E_CROSSREALM_DELEGATION_FAILURE                                       Handle        = 0x80090357\n\tSEC_E_REVOCATION_OFFLINE_KDC                                              Handle        = 0x80090358\n\tSEC_E_ISSUING_CA_UNTRUSTED_KDC                                            Handle        = 0x80090359\n\tSEC_E_KDC_CERT_EXPIRED                                                    Handle        = 0x8009035A\n\tSEC_E_KDC_CERT_REVOKED                                                    Handle        = 0x8009035B\n\tSEC_I_SIGNATURE_NEEDED                                                    Handle        = 0x0009035C\n\tSEC_E_INVALID_PARAMETER                                                   Handle        = 0x8009035D\n\tSEC_E_DELEGATION_POLICY                                                   Handle        = 0x8009035E\n\tSEC_E_POLICY_NLTM_ONLY                                                    Handle        = 0x8009035F\n\tSEC_I_NO_RENEGOTIATION                                                    Handle        = 0x00090360\n\tSEC_E_NO_CONTEXT                                                          Handle        = 0x80090361\n\tSEC_E_PKU2U_CERT_FAILURE                                                  Handle        = 0x80090362\n\tSEC_E_MUTUAL_AUTH_FAILED                                                  Handle        = 0x80090363\n\tSEC_I_MESSAGE_FRAGMENT                                                    Handle        = 0x00090364\n\tSEC_E_ONLY_HTTPS_ALLOWED                                                  Handle        = 0x80090365\n\tSEC_I_CONTINUE_NEEDED_MESSAGE_OK                                          Handle        = 0x00090366\n\tSEC_E_APPLICATION_PROTOCOL_MISMATCH                                       Handle        = 0x80090367\n\tSEC_I_ASYNC_CALL_PENDING                                                  Handle        = 0x00090368\n\tSEC_E_INVALID_UPN_NAME                                                    Handle        = 0x80090369\n\tSEC_E_EXT_BUFFER_TOO_SMALL                                                Handle        = 0x8009036A\n\tSEC_E_INSUFFICIENT_BUFFERS                                                Handle        = 0x8009036B\n\tSEC_E_NO_SPM                                                                            = SEC_E_INTERNAL_ERROR\n\tSEC_E_NOT_SUPPORTED                                                                     = SEC_E_UNSUPPORTED_FUNCTION\n\tCRYPT_E_MSG_ERROR                                                         Handle        = 0x80091001\n\tCRYPT_E_UNKNOWN_ALGO                                                      Handle        = 0x80091002\n\tCRYPT_E_OID_FORMAT                                                        Handle        = 0x80091003\n\tCRYPT_E_INVALID_MSG_TYPE                                                  Handle        = 0x80091004\n\tCRYPT_E_UNEXPECTED_ENCODING                                               Handle        = 0x80091005\n\tCRYPT_E_AUTH_ATTR_MISSING                                                 Handle        = 0x80091006\n\tCRYPT_E_HASH_VALUE                                                        Handle        = 0x80091007\n\tCRYPT_E_INVALID_INDEX                                                     Handle        = 0x80091008\n\tCRYPT_E_ALREADY_DECRYPTED                                                 Handle        = 0x80091009\n\tCRYPT_E_NOT_DECRYPTED                                                     Handle        = 0x8009100A\n\tCRYPT_E_RECIPIENT_NOT_FOUND                                               Handle        = 0x8009100B\n\tCRYPT_E_CONTROL_TYPE                                                      Handle        = 0x8009100C\n\tCRYPT_E_ISSUER_SERIALNUMBER                                               Handle        = 0x8009100D\n\tCRYPT_E_SIGNER_NOT_FOUND                                                  Handle        = 0x8009100E\n\tCRYPT_E_ATTRIBUTES_MISSING                                                Handle        = 0x8009100F\n\tCRYPT_E_STREAM_MSG_NOT_READY                                              Handle        = 0x80091010\n\tCRYPT_E_STREAM_INSUFFICIENT_DATA                                          Handle        = 0x80091011\n\tCRYPT_I_NEW_PROTECTION_REQUIRED                                           Handle        = 0x00091012\n\tCRYPT_E_BAD_LEN                                                           Handle        = 0x80092001\n\tCRYPT_E_BAD_ENCODE                                                        Handle        = 0x80092002\n\tCRYPT_E_FILE_ERROR                                                        Handle        = 0x80092003\n\tCRYPT_E_NOT_FOUND                                                         Handle        = 0x80092004\n\tCRYPT_E_EXISTS                                                            Handle        = 0x80092005\n\tCRYPT_E_NO_PROVIDER                                                       Handle        = 0x80092006\n\tCRYPT_E_SELF_SIGNED                                                       Handle        = 0x80092007\n\tCRYPT_E_DELETED_PREV                                                      Handle        = 0x80092008\n\tCRYPT_E_NO_MATCH                                                          Handle        = 0x80092009\n\tCRYPT_E_UNEXPECTED_MSG_TYPE                                               Handle        = 0x8009200A\n\tCRYPT_E_NO_KEY_PROPERTY                                                   Handle        = 0x8009200B\n\tCRYPT_E_NO_DECRYPT_CERT                                                   Handle        = 0x8009200C\n\tCRYPT_E_BAD_MSG                                                           Handle        = 0x8009200D\n\tCRYPT_E_NO_SIGNER                                                         Handle        = 0x8009200E\n\tCRYPT_E_PENDING_CLOSE                                                     Handle        = 0x8009200F\n\tCRYPT_E_REVOKED                                                           Handle        = 0x80092010\n\tCRYPT_E_NO_REVOCATION_DLL                                                 Handle        = 0x80092011\n\tCRYPT_E_NO_REVOCATION_CHECK                                               Handle        = 0x80092012\n\tCRYPT_E_REVOCATION_OFFLINE                                                Handle        = 0x80092013\n\tCRYPT_E_NOT_IN_REVOCATION_DATABASE                                        Handle        = 0x80092014\n\tCRYPT_E_INVALID_NUMERIC_STRING                                            Handle        = 0x80092020\n\tCRYPT_E_INVALID_PRINTABLE_STRING                                          Handle        = 0x80092021\n\tCRYPT_E_INVALID_IA5_STRING                                                Handle        = 0x80092022\n\tCRYPT_E_INVALID_X500_STRING                                               Handle        = 0x80092023\n\tCRYPT_E_NOT_CHAR_STRING                                                   Handle        = 0x80092024\n\tCRYPT_E_FILERESIZED                                                       Handle        = 0x80092025\n\tCRYPT_E_SECURITY_SETTINGS                                                 Handle        = 0x80092026\n\tCRYPT_E_NO_VERIFY_USAGE_DLL                                               Handle        = 0x80092027\n\tCRYPT_E_NO_VERIFY_USAGE_CHECK                                             Handle        = 0x80092028\n\tCRYPT_E_VERIFY_USAGE_OFFLINE                                              Handle        = 0x80092029\n\tCRYPT_E_NOT_IN_CTL                                                        Handle        = 0x8009202A\n\tCRYPT_E_NO_TRUSTED_SIGNER                                                 Handle        = 0x8009202B\n\tCRYPT_E_MISSING_PUBKEY_PARA                                               Handle        = 0x8009202C\n\tCRYPT_E_OBJECT_LOCATOR_OBJECT_NOT_FOUND                                   Handle        = 0x8009202D\n\tCRYPT_E_OSS_ERROR                                                         Handle        = 0x80093000\n\tOSS_MORE_BUF                                                              Handle        = 0x80093001\n\tOSS_NEGATIVE_UINTEGER                                                     Handle        = 0x80093002\n\tOSS_PDU_RANGE                                                             Handle        = 0x80093003\n\tOSS_MORE_INPUT                                                            Handle        = 0x80093004\n\tOSS_DATA_ERROR                                                            Handle        = 0x80093005\n\tOSS_BAD_ARG                                                               Handle        = 0x80093006\n\tOSS_BAD_VERSION                                                           Handle        = 0x80093007\n\tOSS_OUT_MEMORY                                                            Handle        = 0x80093008\n\tOSS_PDU_MISMATCH                                                          Handle        = 0x80093009\n\tOSS_LIMITED                                                               Handle        = 0x8009300A\n\tOSS_BAD_PTR                                                               Handle        = 0x8009300B\n\tOSS_BAD_TIME                                                              Handle        = 0x8009300C\n\tOSS_INDEFINITE_NOT_SUPPORTED                                              Handle        = 0x8009300D\n\tOSS_MEM_ERROR                                                             Handle        = 0x8009300E\n\tOSS_BAD_TABLE                                                             Handle        = 0x8009300F\n\tOSS_TOO_LONG                                                              Handle        = 0x80093010\n\tOSS_CONSTRAINT_VIOLATED                                                   Handle        = 0x80093011\n\tOSS_FATAL_ERROR                                                           Handle        = 0x80093012\n\tOSS_ACCESS_SERIALIZATION_ERROR                                            Handle        = 0x80093013\n\tOSS_NULL_TBL                                                              Handle        = 0x80093014\n\tOSS_NULL_FCN                                                              Handle        = 0x80093015\n\tOSS_BAD_ENCRULES                                                          Handle        = 0x80093016\n\tOSS_UNAVAIL_ENCRULES                                                      Handle        = 0x80093017\n\tOSS_CANT_OPEN_TRACE_WINDOW                                                Handle        = 0x80093018\n\tOSS_UNIMPLEMENTED                                                         Handle        = 0x80093019\n\tOSS_OID_DLL_NOT_LINKED                                                    Handle        = 0x8009301A\n\tOSS_CANT_OPEN_TRACE_FILE                                                  Handle        = 0x8009301B\n\tOSS_TRACE_FILE_ALREADY_OPEN                                               Handle        = 0x8009301C\n\tOSS_TABLE_MISMATCH                                                        Handle        = 0x8009301D\n\tOSS_TYPE_NOT_SUPPORTED                                                    Handle        = 0x8009301E\n\tOSS_REAL_DLL_NOT_LINKED                                                   Handle        = 0x8009301F\n\tOSS_REAL_CODE_NOT_LINKED                                                  Handle        = 0x80093020\n\tOSS_OUT_OF_RANGE                                                          Handle        = 0x80093021\n\tOSS_COPIER_DLL_NOT_LINKED                                                 Handle        = 0x80093022\n\tOSS_CONSTRAINT_DLL_NOT_LINKED                                             Handle        = 0x80093023\n\tOSS_COMPARATOR_DLL_NOT_LINKED                                             Handle        = 0x80093024\n\tOSS_COMPARATOR_CODE_NOT_LINKED                                            Handle        = 0x80093025\n\tOSS_MEM_MGR_DLL_NOT_LINKED                                                Handle        = 0x80093026\n\tOSS_PDV_DLL_NOT_LINKED                                                    Handle        = 0x80093027\n\tOSS_PDV_CODE_NOT_LINKED                                                   Handle        = 0x80093028\n\tOSS_API_DLL_NOT_LINKED                                                    Handle        = 0x80093029\n\tOSS_BERDER_DLL_NOT_LINKED                                                 Handle        = 0x8009302A\n\tOSS_PER_DLL_NOT_LINKED                                                    Handle        = 0x8009302B\n\tOSS_OPEN_TYPE_ERROR                                                       Handle        = 0x8009302C\n\tOSS_MUTEX_NOT_CREATED                                                     Handle        = 0x8009302D\n\tOSS_CANT_CLOSE_TRACE_FILE                                                 Handle        = 0x8009302E\n\tCRYPT_E_ASN1_ERROR                                                        Handle        = 0x80093100\n\tCRYPT_E_ASN1_INTERNAL                                                     Handle        = 0x80093101\n\tCRYPT_E_ASN1_EOD                                                          Handle        = 0x80093102\n\tCRYPT_E_ASN1_CORRUPT                                                      Handle        = 0x80093103\n\tCRYPT_E_ASN1_LARGE                                                        Handle        = 0x80093104\n\tCRYPT_E_ASN1_CONSTRAINT                                                   Handle        = 0x80093105\n\tCRYPT_E_ASN1_MEMORY                                                       Handle        = 0x80093106\n\tCRYPT_E_ASN1_OVERFLOW                                                     Handle        = 0x80093107\n\tCRYPT_E_ASN1_BADPDU                                                       Handle        = 0x80093108\n\tCRYPT_E_ASN1_BADARGS                                                      Handle        = 0x80093109\n\tCRYPT_E_ASN1_BADREAL                                                      Handle        = 0x8009310A\n\tCRYPT_E_ASN1_BADTAG                                                       Handle        = 0x8009310B\n\tCRYPT_E_ASN1_CHOICE                                                       Handle        = 0x8009310C\n\tCRYPT_E_ASN1_RULE                                                         Handle        = 0x8009310D\n\tCRYPT_E_ASN1_UTF8                                                         Handle        = 0x8009310E\n\tCRYPT_E_ASN1_PDU_TYPE                                                     Handle        = 0x80093133\n\tCRYPT_E_ASN1_NYI                                                          Handle        = 0x80093134\n\tCRYPT_E_ASN1_EXTENDED                                                     Handle        = 0x80093201\n\tCRYPT_E_ASN1_NOEOD                                                        Handle        = 0x80093202\n\tCERTSRV_E_BAD_REQUESTSUBJECT                                              Handle        = 0x80094001\n\tCERTSRV_E_NO_REQUEST                                                      Handle        = 0x80094002\n\tCERTSRV_E_BAD_REQUESTSTATUS                                               Handle        = 0x80094003\n\tCERTSRV_E_PROPERTY_EMPTY                                                  Handle        = 0x80094004\n\tCERTSRV_E_INVALID_CA_CERTIFICATE                                          Handle        = 0x80094005\n\tCERTSRV_E_SERVER_SUSPENDED                                                Handle        = 0x80094006\n\tCERTSRV_E_ENCODING_LENGTH                                                 Handle        = 0x80094007\n\tCERTSRV_E_ROLECONFLICT                                                    Handle        = 0x80094008\n\tCERTSRV_E_RESTRICTEDOFFICER                                               Handle        = 0x80094009\n\tCERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED                                     Handle        = 0x8009400A\n\tCERTSRV_E_NO_VALID_KRA                                                    Handle        = 0x8009400B\n\tCERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL                                        Handle        = 0x8009400C\n\tCERTSRV_E_NO_CAADMIN_DEFINED                                              Handle        = 0x8009400D\n\tCERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE                                      Handle        = 0x8009400E\n\tCERTSRV_E_NO_DB_SESSIONS                                                  Handle        = 0x8009400F\n\tCERTSRV_E_ALIGNMENT_FAULT                                                 Handle        = 0x80094010\n\tCERTSRV_E_ENROLL_DENIED                                                   Handle        = 0x80094011\n\tCERTSRV_E_TEMPLATE_DENIED                                                 Handle        = 0x80094012\n\tCERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE                                     Handle        = 0x80094013\n\tCERTSRV_E_ADMIN_DENIED_REQUEST                                            Handle        = 0x80094014\n\tCERTSRV_E_NO_POLICY_SERVER                                                Handle        = 0x80094015\n\tCERTSRV_E_WEAK_SIGNATURE_OR_KEY                                           Handle        = 0x80094016\n\tCERTSRV_E_KEY_ATTESTATION_NOT_SUPPORTED                                   Handle        = 0x80094017\n\tCERTSRV_E_ENCRYPTION_CERT_REQUIRED                                        Handle        = 0x80094018\n\tCERTSRV_E_UNSUPPORTED_CERT_TYPE                                           Handle        = 0x80094800\n\tCERTSRV_E_NO_CERT_TYPE                                                    Handle        = 0x80094801\n\tCERTSRV_E_TEMPLATE_CONFLICT                                               Handle        = 0x80094802\n\tCERTSRV_E_SUBJECT_ALT_NAME_REQUIRED                                       Handle        = 0x80094803\n\tCERTSRV_E_ARCHIVED_KEY_REQUIRED                                           Handle        = 0x80094804\n\tCERTSRV_E_SMIME_REQUIRED                                                  Handle        = 0x80094805\n\tCERTSRV_E_BAD_RENEWAL_SUBJECT                                             Handle        = 0x80094806\n\tCERTSRV_E_BAD_TEMPLATE_VERSION                                            Handle        = 0x80094807\n\tCERTSRV_E_TEMPLATE_POLICY_REQUIRED                                        Handle        = 0x80094808\n\tCERTSRV_E_SIGNATURE_POLICY_REQUIRED                                       Handle        = 0x80094809\n\tCERTSRV_E_SIGNATURE_COUNT                                                 Handle        = 0x8009480A\n\tCERTSRV_E_SIGNATURE_REJECTED                                              Handle        = 0x8009480B\n\tCERTSRV_E_ISSUANCE_POLICY_REQUIRED                                        Handle        = 0x8009480C\n\tCERTSRV_E_SUBJECT_UPN_REQUIRED                                            Handle        = 0x8009480D\n\tCERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED                                 Handle        = 0x8009480E\n\tCERTSRV_E_SUBJECT_DNS_REQUIRED                                            Handle        = 0x8009480F\n\tCERTSRV_E_ARCHIVED_KEY_UNEXPECTED                                         Handle        = 0x80094810\n\tCERTSRV_E_KEY_LENGTH                                                      Handle        = 0x80094811\n\tCERTSRV_E_SUBJECT_EMAIL_REQUIRED                                          Handle        = 0x80094812\n\tCERTSRV_E_UNKNOWN_CERT_TYPE                                               Handle        = 0x80094813\n\tCERTSRV_E_CERT_TYPE_OVERLAP                                               Handle        = 0x80094814\n\tCERTSRV_E_TOO_MANY_SIGNATURES                                             Handle        = 0x80094815\n\tCERTSRV_E_RENEWAL_BAD_PUBLIC_KEY                                          Handle        = 0x80094816\n\tCERTSRV_E_INVALID_EK                                                      Handle        = 0x80094817\n\tCERTSRV_E_INVALID_IDBINDING                                               Handle        = 0x80094818\n\tCERTSRV_E_INVALID_ATTESTATION                                             Handle        = 0x80094819\n\tCERTSRV_E_KEY_ATTESTATION                                                 Handle        = 0x8009481A\n\tCERTSRV_E_CORRUPT_KEY_ATTESTATION                                         Handle        = 0x8009481B\n\tCERTSRV_E_EXPIRED_CHALLENGE                                               Handle        = 0x8009481C\n\tCERTSRV_E_INVALID_RESPONSE                                                Handle        = 0x8009481D\n\tCERTSRV_E_INVALID_REQUESTID                                               Handle        = 0x8009481E\n\tCERTSRV_E_REQUEST_PRECERTIFICATE_MISMATCH                                 Handle        = 0x8009481F\n\tCERTSRV_E_PENDING_CLIENT_RESPONSE                                         Handle        = 0x80094820\n\tXENROLL_E_KEY_NOT_EXPORTABLE                                              Handle        = 0x80095000\n\tXENROLL_E_CANNOT_ADD_ROOT_CERT                                            Handle        = 0x80095001\n\tXENROLL_E_RESPONSE_KA_HASH_NOT_FOUND                                      Handle        = 0x80095002\n\tXENROLL_E_RESPONSE_UNEXPECTED_KA_HASH                                     Handle        = 0x80095003\n\tXENROLL_E_RESPONSE_KA_HASH_MISMATCH                                       Handle        = 0x80095004\n\tXENROLL_E_KEYSPEC_SMIME_MISMATCH                                          Handle        = 0x80095005\n\tTRUST_E_SYSTEM_ERROR                                                      Handle        = 0x80096001\n\tTRUST_E_NO_SIGNER_CERT                                                    Handle        = 0x80096002\n\tTRUST_E_COUNTER_SIGNER                                                    Handle        = 0x80096003\n\tTRUST_E_CERT_SIGNATURE                                                    Handle        = 0x80096004\n\tTRUST_E_TIME_STAMP                                                        Handle        = 0x80096005\n\tTRUST_E_BAD_DIGEST                                                        Handle        = 0x80096010\n\tTRUST_E_MALFORMED_SIGNATURE                                               Handle        = 0x80096011\n\tTRUST_E_BASIC_CONSTRAINTS                                                 Handle        = 0x80096019\n\tTRUST_E_FINANCIAL_CRITERIA                                                Handle        = 0x8009601E\n\tMSSIPOTF_E_OUTOFMEMRANGE                                                  Handle        = 0x80097001\n\tMSSIPOTF_E_CANTGETOBJECT                                                  Handle        = 0x80097002\n\tMSSIPOTF_E_NOHEADTABLE                                                    Handle        = 0x80097003\n\tMSSIPOTF_E_BAD_MAGICNUMBER                                                Handle        = 0x80097004\n\tMSSIPOTF_E_BAD_OFFSET_TABLE                                               Handle        = 0x80097005\n\tMSSIPOTF_E_TABLE_TAGORDER                                                 Handle        = 0x80097006\n\tMSSIPOTF_E_TABLE_LONGWORD                                                 Handle        = 0x80097007\n\tMSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT                                      Handle        = 0x80097008\n\tMSSIPOTF_E_TABLES_OVERLAP                                                 Handle        = 0x80097009\n\tMSSIPOTF_E_TABLE_PADBYTES                                                 Handle        = 0x8009700A\n\tMSSIPOTF_E_FILETOOSMALL                                                   Handle        = 0x8009700B\n\tMSSIPOTF_E_TABLE_CHECKSUM                                                 Handle        = 0x8009700C\n\tMSSIPOTF_E_FILE_CHECKSUM                                                  Handle        = 0x8009700D\n\tMSSIPOTF_E_FAILED_POLICY                                                  Handle        = 0x80097010\n\tMSSIPOTF_E_FAILED_HINTS_CHECK                                             Handle        = 0x80097011\n\tMSSIPOTF_E_NOT_OPENTYPE                                                   Handle        = 0x80097012\n\tMSSIPOTF_E_FILE                                                           Handle        = 0x80097013\n\tMSSIPOTF_E_CRYPT                                                          Handle        = 0x80097014\n\tMSSIPOTF_E_BADVERSION                                                     Handle        = 0x80097015\n\tMSSIPOTF_E_DSIG_STRUCTURE                                                 Handle        = 0x80097016\n\tMSSIPOTF_E_PCONST_CHECK                                                   Handle        = 0x80097017\n\tMSSIPOTF_E_STRUCTURE                                                      Handle        = 0x80097018\n\tERROR_CRED_REQUIRES_CONFIRMATION                                          Handle        = 0x80097019\n\tNTE_OP_OK                                                                 syscall.Errno = 0\n\tTRUST_E_PROVIDER_UNKNOWN                                                  Handle        = 0x800B0001\n\tTRUST_E_ACTION_UNKNOWN                                                    Handle        = 0x800B0002\n\tTRUST_E_SUBJECT_FORM_UNKNOWN                                              Handle        = 0x800B0003\n\tTRUST_E_SUBJECT_NOT_TRUSTED                                               Handle        = 0x800B0004\n\tDIGSIG_E_ENCODE                                                           Handle        = 0x800B0005\n\tDIGSIG_E_DECODE                                                           Handle        = 0x800B0006\n\tDIGSIG_E_EXTENSIBILITY                                                    Handle        = 0x800B0007\n\tDIGSIG_E_CRYPTO                                                           Handle        = 0x800B0008\n\tPERSIST_E_SIZEDEFINITE                                                    Handle        = 0x800B0009\n\tPERSIST_E_SIZEINDEFINITE                                                  Handle        = 0x800B000A\n\tPERSIST_E_NOTSELFSIZING                                                   Handle        = 0x800B000B\n\tTRUST_E_NOSIGNATURE                                                       Handle        = 0x800B0100\n\tCERT_E_EXPIRED                                                            Handle        = 0x800B0101\n\tCERT_E_VALIDITYPERIODNESTING                                              Handle        = 0x800B0102\n\tCERT_E_ROLE                                                               Handle        = 0x800B0103\n\tCERT_E_PATHLENCONST                                                       Handle        = 0x800B0104\n\tCERT_E_CRITICAL                                                           Handle        = 0x800B0105\n\tCERT_E_PURPOSE                                                            Handle        = 0x800B0106\n\tCERT_E_ISSUERCHAINING                                                     Handle        = 0x800B0107\n\tCERT_E_MALFORMED                                                          Handle        = 0x800B0108\n\tCERT_E_UNTRUSTEDROOT                                                      Handle        = 0x800B0109\n\tCERT_E_CHAINING                                                           Handle        = 0x800B010A\n\tTRUST_E_FAIL                                                              Handle        = 0x800B010B\n\tCERT_E_REVOKED                                                            Handle        = 0x800B010C\n\tCERT_E_UNTRUSTEDTESTROOT                                                  Handle        = 0x800B010D\n\tCERT_E_REVOCATION_FAILURE                                                 Handle        = 0x800B010E\n\tCERT_E_CN_NO_MATCH                                                        Handle        = 0x800B010F\n\tCERT_E_WRONG_USAGE                                                        Handle        = 0x800B0110\n\tTRUST_E_EXPLICIT_DISTRUST                                                 Handle        = 0x800B0111\n\tCERT_E_UNTRUSTEDCA                                                        Handle        = 0x800B0112\n\tCERT_E_INVALID_POLICY                                                     Handle        = 0x800B0113\n\tCERT_E_INVALID_NAME                                                       Handle        = 0x800B0114\n\tSPAPI_E_EXPECTED_SECTION_NAME                                             Handle        = 0x800F0000\n\tSPAPI_E_BAD_SECTION_NAME_LINE                                             Handle        = 0x800F0001\n\tSPAPI_E_SECTION_NAME_TOO_LONG                                             Handle        = 0x800F0002\n\tSPAPI_E_GENERAL_SYNTAX                                                    Handle        = 0x800F0003\n\tSPAPI_E_WRONG_INF_STYLE                                                   Handle        = 0x800F0100\n\tSPAPI_E_SECTION_NOT_FOUND                                                 Handle        = 0x800F0101\n\tSPAPI_E_LINE_NOT_FOUND                                                    Handle        = 0x800F0102\n\tSPAPI_E_NO_BACKUP                                                         Handle        = 0x800F0103\n\tSPAPI_E_NO_ASSOCIATED_CLASS                                               Handle        = 0x800F0200\n\tSPAPI_E_CLASS_MISMATCH                                                    Handle        = 0x800F0201\n\tSPAPI_E_DUPLICATE_FOUND                                                   Handle        = 0x800F0202\n\tSPAPI_E_NO_DRIVER_SELECTED                                                Handle        = 0x800F0203\n\tSPAPI_E_KEY_DOES_NOT_EXIST                                                Handle        = 0x800F0204\n\tSPAPI_E_INVALID_DEVINST_NAME                                              Handle        = 0x800F0205\n\tSPAPI_E_INVALID_CLASS                                                     Handle        = 0x800F0206\n\tSPAPI_E_DEVINST_ALREADY_EXISTS                                            Handle        = 0x800F0207\n\tSPAPI_E_DEVINFO_NOT_REGISTERED                                            Handle        = 0x800F0208\n\tSPAPI_E_INVALID_REG_PROPERTY                                              Handle        = 0x800F0209\n\tSPAPI_E_NO_INF                                                            Handle        = 0x800F020A\n\tSPAPI_E_NO_SUCH_DEVINST                                                   Handle        = 0x800F020B\n\tSPAPI_E_CANT_LOAD_CLASS_ICON                                              Handle        = 0x800F020C\n\tSPAPI_E_INVALID_CLASS_INSTALLER                                           Handle        = 0x800F020D\n\tSPAPI_E_DI_DO_DEFAULT                                                     Handle        = 0x800F020E\n\tSPAPI_E_DI_NOFILECOPY                                                     Handle        = 0x800F020F\n\tSPAPI_E_INVALID_HWPROFILE                                                 Handle        = 0x800F0210\n\tSPAPI_E_NO_DEVICE_SELECTED                                                Handle        = 0x800F0211\n\tSPAPI_E_DEVINFO_LIST_LOCKED                                               Handle        = 0x800F0212\n\tSPAPI_E_DEVINFO_DATA_LOCKED                                               Handle        = 0x800F0213\n\tSPAPI_E_DI_BAD_PATH                                                       Handle        = 0x800F0214\n\tSPAPI_E_NO_CLASSINSTALL_PARAMS                                            Handle        = 0x800F0215\n\tSPAPI_E_FILEQUEUE_LOCKED                                                  Handle        = 0x800F0216\n\tSPAPI_E_BAD_SERVICE_INSTALLSECT                                           Handle        = 0x800F0217\n\tSPAPI_E_NO_CLASS_DRIVER_LIST                                              Handle        = 0x800F0218\n\tSPAPI_E_NO_ASSOCIATED_SERVICE                                             Handle        = 0x800F0219\n\tSPAPI_E_NO_DEFAULT_DEVICE_INTERFACE                                       Handle        = 0x800F021A\n\tSPAPI_E_DEVICE_INTERFACE_ACTIVE                                           Handle        = 0x800F021B\n\tSPAPI_E_DEVICE_INTERFACE_REMOVED                                          Handle        = 0x800F021C\n\tSPAPI_E_BAD_INTERFACE_INSTALLSECT                                         Handle        = 0x800F021D\n\tSPAPI_E_NO_SUCH_INTERFACE_CLASS                                           Handle        = 0x800F021E\n\tSPAPI_E_INVALID_REFERENCE_STRING                                          Handle        = 0x800F021F\n\tSPAPI_E_INVALID_MACHINENAME                                               Handle        = 0x800F0220\n\tSPAPI_E_REMOTE_COMM_FAILURE                                               Handle        = 0x800F0221\n\tSPAPI_E_MACHINE_UNAVAILABLE                                               Handle        = 0x800F0222\n\tSPAPI_E_NO_CONFIGMGR_SERVICES                                             Handle        = 0x800F0223\n\tSPAPI_E_INVALID_PROPPAGE_PROVIDER                                         Handle        = 0x800F0224\n\tSPAPI_E_NO_SUCH_DEVICE_INTERFACE                                          Handle        = 0x800F0225\n\tSPAPI_E_DI_POSTPROCESSING_REQUIRED                                        Handle        = 0x800F0226\n\tSPAPI_E_INVALID_COINSTALLER                                               Handle        = 0x800F0227\n\tSPAPI_E_NO_COMPAT_DRIVERS                                                 Handle        = 0x800F0228\n\tSPAPI_E_NO_DEVICE_ICON                                                    Handle        = 0x800F0229\n\tSPAPI_E_INVALID_INF_LOGCONFIG                                             Handle        = 0x800F022A\n\tSPAPI_E_DI_DONT_INSTALL                                                   Handle        = 0x800F022B\n\tSPAPI_E_INVALID_FILTER_DRIVER                                             Handle        = 0x800F022C\n\tSPAPI_E_NON_WINDOWS_NT_DRIVER                                             Handle        = 0x800F022D\n\tSPAPI_E_NON_WINDOWS_DRIVER                                                Handle        = 0x800F022E\n\tSPAPI_E_NO_CATALOG_FOR_OEM_INF                                            Handle        = 0x800F022F\n\tSPAPI_E_DEVINSTALL_QUEUE_NONNATIVE                                        Handle        = 0x800F0230\n\tSPAPI_E_NOT_DISABLEABLE                                                   Handle        = 0x800F0231\n\tSPAPI_E_CANT_REMOVE_DEVINST                                               Handle        = 0x800F0232\n\tSPAPI_E_INVALID_TARGET                                                    Handle        = 0x800F0233\n\tSPAPI_E_DRIVER_NONNATIVE                                                  Handle        = 0x800F0234\n\tSPAPI_E_IN_WOW64                                                          Handle        = 0x800F0235\n\tSPAPI_E_SET_SYSTEM_RESTORE_POINT                                          Handle        = 0x800F0236\n\tSPAPI_E_INCORRECTLY_COPIED_INF                                            Handle        = 0x800F0237\n\tSPAPI_E_SCE_DISABLED                                                      Handle        = 0x800F0238\n\tSPAPI_E_UNKNOWN_EXCEPTION                                                 Handle        = 0x800F0239\n\tSPAPI_E_PNP_REGISTRY_ERROR                                                Handle        = 0x800F023A\n\tSPAPI_E_REMOTE_REQUEST_UNSUPPORTED                                        Handle        = 0x800F023B\n\tSPAPI_E_NOT_AN_INSTALLED_OEM_INF                                          Handle        = 0x800F023C\n\tSPAPI_E_INF_IN_USE_BY_DEVICES                                             Handle        = 0x800F023D\n\tSPAPI_E_DI_FUNCTION_OBSOLETE                                              Handle        = 0x800F023E\n\tSPAPI_E_NO_AUTHENTICODE_CATALOG                                           Handle        = 0x800F023F\n\tSPAPI_E_AUTHENTICODE_DISALLOWED                                           Handle        = 0x800F0240\n\tSPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER                                    Handle        = 0x800F0241\n\tSPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED                                Handle        = 0x800F0242\n\tSPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED                                Handle        = 0x800F0243\n\tSPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH                                    Handle        = 0x800F0244\n\tSPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE                                    Handle        = 0x800F0245\n\tSPAPI_E_DEVICE_INSTALLER_NOT_READY                                        Handle        = 0x800F0246\n\tSPAPI_E_DRIVER_STORE_ADD_FAILED                                           Handle        = 0x800F0247\n\tSPAPI_E_DEVICE_INSTALL_BLOCKED                                            Handle        = 0x800F0248\n\tSPAPI_E_DRIVER_INSTALL_BLOCKED                                            Handle        = 0x800F0249\n\tSPAPI_E_WRONG_INF_TYPE                                                    Handle        = 0x800F024A\n\tSPAPI_E_FILE_HASH_NOT_IN_CATALOG                                          Handle        = 0x800F024B\n\tSPAPI_E_DRIVER_STORE_DELETE_FAILED                                        Handle        = 0x800F024C\n\tSPAPI_E_UNRECOVERABLE_STACK_OVERFLOW                                      Handle        = 0x800F0300\n\tSPAPI_E_ERROR_NOT_INSTALLED                                               Handle        = 0x800F1000\n\tSCARD_S_SUCCESS                                                                         = S_OK\n\tSCARD_F_INTERNAL_ERROR                                                    Handle        = 0x80100001\n\tSCARD_E_CANCELLED                                                         Handle        = 0x80100002\n\tSCARD_E_INVALID_HANDLE                                                    Handle        = 0x80100003\n\tSCARD_E_INVALID_PARAMETER                                                 Handle        = 0x80100004\n\tSCARD_E_INVALID_TARGET                                                    Handle        = 0x80100005\n\tSCARD_E_NO_MEMORY                                                         Handle        = 0x80100006\n\tSCARD_F_WAITED_TOO_LONG                                                   Handle        = 0x80100007\n\tSCARD_E_INSUFFICIENT_BUFFER                                               Handle        = 0x80100008\n\tSCARD_E_UNKNOWN_READER                                                    Handle        = 0x80100009\n\tSCARD_E_TIMEOUT                                                           Handle        = 0x8010000A\n\tSCARD_E_SHARING_VIOLATION                                                 Handle        = 0x8010000B\n\tSCARD_E_NO_SMARTCARD                                                      Handle        = 0x8010000C\n\tSCARD_E_UNKNOWN_CARD                                                      Handle        = 0x8010000D\n\tSCARD_E_CANT_DISPOSE                                                      Handle        = 0x8010000E\n\tSCARD_E_PROTO_MISMATCH                                                    Handle        = 0x8010000F\n\tSCARD_E_NOT_READY                                                         Handle        = 0x80100010\n\tSCARD_E_INVALID_VALUE                                                     Handle        = 0x80100011\n\tSCARD_E_SYSTEM_CANCELLED                                                  Handle        = 0x80100012\n\tSCARD_F_COMM_ERROR                                                        Handle        = 0x80100013\n\tSCARD_F_UNKNOWN_ERROR                                                     Handle        = 0x80100014\n\tSCARD_E_INVALID_ATR                                                       Handle        = 0x80100015\n\tSCARD_E_NOT_TRANSACTED                                                    Handle        = 0x80100016\n\tSCARD_E_READER_UNAVAILABLE                                                Handle        = 0x80100017\n\tSCARD_P_SHUTDOWN                                                          Handle        = 0x80100018\n\tSCARD_E_PCI_TOO_SMALL                                                     Handle        = 0x80100019\n\tSCARD_E_READER_UNSUPPORTED                                                Handle        = 0x8010001A\n\tSCARD_E_DUPLICATE_READER                                                  Handle        = 0x8010001B\n\tSCARD_E_CARD_UNSUPPORTED                                                  Handle        = 0x8010001C\n\tSCARD_E_NO_SERVICE                                                        Handle        = 0x8010001D\n\tSCARD_E_SERVICE_STOPPED                                                   Handle        = 0x8010001E\n\tSCARD_E_UNEXPECTED                                                        Handle        = 0x8010001F\n\tSCARD_E_ICC_INSTALLATION                                                  Handle        = 0x80100020\n\tSCARD_E_ICC_CREATEORDER                                                   Handle        = 0x80100021\n\tSCARD_E_UNSUPPORTED_FEATURE                                               Handle        = 0x80100022\n\tSCARD_E_DIR_NOT_FOUND                                                     Handle        = 0x80100023\n\tSCARD_E_FILE_NOT_FOUND                                                    Handle        = 0x80100024\n\tSCARD_E_NO_DIR                                                            Handle        = 0x80100025\n\tSCARD_E_NO_FILE                                                           Handle        = 0x80100026\n\tSCARD_E_NO_ACCESS                                                         Handle        = 0x80100027\n\tSCARD_E_WRITE_TOO_MANY                                                    Handle        = 0x80100028\n\tSCARD_E_BAD_SEEK                                                          Handle        = 0x80100029\n\tSCARD_E_INVALID_CHV                                                       Handle        = 0x8010002A\n\tSCARD_E_UNKNOWN_RES_MNG                                                   Handle        = 0x8010002B\n\tSCARD_E_NO_SUCH_CERTIFICATE                                               Handle        = 0x8010002C\n\tSCARD_E_CERTIFICATE_UNAVAILABLE                                           Handle        = 0x8010002D\n\tSCARD_E_NO_READERS_AVAILABLE                                              Handle        = 0x8010002E\n\tSCARD_E_COMM_DATA_LOST                                                    Handle        = 0x8010002F\n\tSCARD_E_NO_KEY_CONTAINER                                                  Handle        = 0x80100030\n\tSCARD_E_SERVER_TOO_BUSY                                                   Handle        = 0x80100031\n\tSCARD_E_PIN_CACHE_EXPIRED                                                 Handle        = 0x80100032\n\tSCARD_E_NO_PIN_CACHE                                                      Handle        = 0x80100033\n\tSCARD_E_READ_ONLY_CARD                                                    Handle        = 0x80100034\n\tSCARD_W_UNSUPPORTED_CARD                                                  Handle        = 0x80100065\n\tSCARD_W_UNRESPONSIVE_CARD                                                 Handle        = 0x80100066\n\tSCARD_W_UNPOWERED_CARD                                                    Handle        = 0x80100067\n\tSCARD_W_RESET_CARD                                                        Handle        = 0x80100068\n\tSCARD_W_REMOVED_CARD                                                      Handle        = 0x80100069\n\tSCARD_W_SECURITY_VIOLATION                                                Handle        = 0x8010006A\n\tSCARD_W_WRONG_CHV                                                         Handle        = 0x8010006B\n\tSCARD_W_CHV_BLOCKED                                                       Handle        = 0x8010006C\n\tSCARD_W_EOF                                                               Handle        = 0x8010006D\n\tSCARD_W_CANCELLED_BY_USER                                                 Handle        = 0x8010006E\n\tSCARD_W_CARD_NOT_AUTHENTICATED                                            Handle        = 0x8010006F\n\tSCARD_W_CACHE_ITEM_NOT_FOUND                                              Handle        = 0x80100070\n\tSCARD_W_CACHE_ITEM_STALE                                                  Handle        = 0x80100071\n\tSCARD_W_CACHE_ITEM_TOO_BIG                                                Handle        = 0x80100072\n\tCOMADMIN_E_OBJECTERRORS                                                   Handle        = 0x80110401\n\tCOMADMIN_E_OBJECTINVALID                                                  Handle        = 0x80110402\n\tCOMADMIN_E_KEYMISSING                                                     Handle        = 0x80110403\n\tCOMADMIN_E_ALREADYINSTALLED                                               Handle        = 0x80110404\n\tCOMADMIN_E_APP_FILE_WRITEFAIL                                             Handle        = 0x80110407\n\tCOMADMIN_E_APP_FILE_READFAIL                                              Handle        = 0x80110408\n\tCOMADMIN_E_APP_FILE_VERSION                                               Handle        = 0x80110409\n\tCOMADMIN_E_BADPATH                                                        Handle        = 0x8011040A\n\tCOMADMIN_E_APPLICATIONEXISTS                                              Handle        = 0x8011040B\n\tCOMADMIN_E_ROLEEXISTS                                                     Handle        = 0x8011040C\n\tCOMADMIN_E_CANTCOPYFILE                                                   Handle        = 0x8011040D\n\tCOMADMIN_E_NOUSER                                                         Handle        = 0x8011040F\n\tCOMADMIN_E_INVALIDUSERIDS                                                 Handle        = 0x80110410\n\tCOMADMIN_E_NOREGISTRYCLSID                                                Handle        = 0x80110411\n\tCOMADMIN_E_BADREGISTRYPROGID                                              Handle        = 0x80110412\n\tCOMADMIN_E_AUTHENTICATIONLEVEL                                            Handle        = 0x80110413\n\tCOMADMIN_E_USERPASSWDNOTVALID                                             Handle        = 0x80110414\n\tCOMADMIN_E_CLSIDORIIDMISMATCH                                             Handle        = 0x80110418\n\tCOMADMIN_E_REMOTEINTERFACE                                                Handle        = 0x80110419\n\tCOMADMIN_E_DLLREGISTERSERVER                                              Handle        = 0x8011041A\n\tCOMADMIN_E_NOSERVERSHARE                                                  Handle        = 0x8011041B\n\tCOMADMIN_E_DLLLOADFAILED                                                  Handle        = 0x8011041D\n\tCOMADMIN_E_BADREGISTRYLIBID                                               Handle        = 0x8011041E\n\tCOMADMIN_E_APPDIRNOTFOUND                                                 Handle        = 0x8011041F\n\tCOMADMIN_E_REGISTRARFAILED                                                Handle        = 0x80110423\n\tCOMADMIN_E_COMPFILE_DOESNOTEXIST                                          Handle        = 0x80110424\n\tCOMADMIN_E_COMPFILE_LOADDLLFAIL                                           Handle        = 0x80110425\n\tCOMADMIN_E_COMPFILE_GETCLASSOBJ                                           Handle        = 0x80110426\n\tCOMADMIN_E_COMPFILE_CLASSNOTAVAIL                                         Handle        = 0x80110427\n\tCOMADMIN_E_COMPFILE_BADTLB                                                Handle        = 0x80110428\n\tCOMADMIN_E_COMPFILE_NOTINSTALLABLE                                        Handle        = 0x80110429\n\tCOMADMIN_E_NOTCHANGEABLE                                                  Handle        = 0x8011042A\n\tCOMADMIN_E_NOTDELETEABLE                                                  Handle        = 0x8011042B\n\tCOMADMIN_E_SESSION                                                        Handle        = 0x8011042C\n\tCOMADMIN_E_COMP_MOVE_LOCKED                                               Handle        = 0x8011042D\n\tCOMADMIN_E_COMP_MOVE_BAD_DEST                                             Handle        = 0x8011042E\n\tCOMADMIN_E_REGISTERTLB                                                    Handle        = 0x80110430\n\tCOMADMIN_E_SYSTEMAPP                                                      Handle        = 0x80110433\n\tCOMADMIN_E_COMPFILE_NOREGISTRAR                                           Handle        = 0x80110434\n\tCOMADMIN_E_COREQCOMPINSTALLED                                             Handle        = 0x80110435\n\tCOMADMIN_E_SERVICENOTINSTALLED                                            Handle        = 0x80110436\n\tCOMADMIN_E_PROPERTYSAVEFAILED                                             Handle        = 0x80110437\n\tCOMADMIN_E_OBJECTEXISTS                                                   Handle        = 0x80110438\n\tCOMADMIN_E_COMPONENTEXISTS                                                Handle        = 0x80110439\n\tCOMADMIN_E_REGFILE_CORRUPT                                                Handle        = 0x8011043B\n\tCOMADMIN_E_PROPERTY_OVERFLOW                                              Handle        = 0x8011043C\n\tCOMADMIN_E_NOTINREGISTRY                                                  Handle        = 0x8011043E\n\tCOMADMIN_E_OBJECTNOTPOOLABLE                                              Handle        = 0x8011043F\n\tCOMADMIN_E_APPLID_MATCHES_CLSID                                           Handle        = 0x80110446\n\tCOMADMIN_E_ROLE_DOES_NOT_EXIST                                            Handle        = 0x80110447\n\tCOMADMIN_E_START_APP_NEEDS_COMPONENTS                                     Handle        = 0x80110448\n\tCOMADMIN_E_REQUIRES_DIFFERENT_PLATFORM                                    Handle        = 0x80110449\n\tCOMADMIN_E_CAN_NOT_EXPORT_APP_PROXY                                       Handle        = 0x8011044A\n\tCOMADMIN_E_CAN_NOT_START_APP                                              Handle        = 0x8011044B\n\tCOMADMIN_E_CAN_NOT_EXPORT_SYS_APP                                         Handle        = 0x8011044C\n\tCOMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT                                    Handle        = 0x8011044D\n\tCOMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER                                  Handle        = 0x8011044E\n\tCOMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE                                     Handle        = 0x8011044F\n\tCOMADMIN_E_BASE_PARTITION_ONLY                                            Handle        = 0x80110450\n\tCOMADMIN_E_START_APP_DISABLED                                             Handle        = 0x80110451\n\tCOMADMIN_E_CAT_DUPLICATE_PARTITION_NAME                                   Handle        = 0x80110457\n\tCOMADMIN_E_CAT_INVALID_PARTITION_NAME                                     Handle        = 0x80110458\n\tCOMADMIN_E_CAT_PARTITION_IN_USE                                           Handle        = 0x80110459\n\tCOMADMIN_E_FILE_PARTITION_DUPLICATE_FILES                                 Handle        = 0x8011045A\n\tCOMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED                            Handle        = 0x8011045B\n\tCOMADMIN_E_AMBIGUOUS_APPLICATION_NAME                                     Handle        = 0x8011045C\n\tCOMADMIN_E_AMBIGUOUS_PARTITION_NAME                                       Handle        = 0x8011045D\n\tCOMADMIN_E_REGDB_NOTINITIALIZED                                           Handle        = 0x80110472\n\tCOMADMIN_E_REGDB_NOTOPEN                                                  Handle        = 0x80110473\n\tCOMADMIN_E_REGDB_SYSTEMERR                                                Handle        = 0x80110474\n\tCOMADMIN_E_REGDB_ALREADYRUNNING                                           Handle        = 0x80110475\n\tCOMADMIN_E_MIG_VERSIONNOTSUPPORTED                                        Handle        = 0x80110480\n\tCOMADMIN_E_MIG_SCHEMANOTFOUND                                             Handle        = 0x80110481\n\tCOMADMIN_E_CAT_BITNESSMISMATCH                                            Handle        = 0x80110482\n\tCOMADMIN_E_CAT_UNACCEPTABLEBITNESS                                        Handle        = 0x80110483\n\tCOMADMIN_E_CAT_WRONGAPPBITNESS                                            Handle        = 0x80110484\n\tCOMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED                                 Handle        = 0x80110485\n\tCOMADMIN_E_CAT_SERVERFAULT                                                Handle        = 0x80110486\n\tCOMQC_E_APPLICATION_NOT_QUEUED                                            Handle        = 0x80110600\n\tCOMQC_E_NO_QUEUEABLE_INTERFACES                                           Handle        = 0x80110601\n\tCOMQC_E_QUEUING_SERVICE_NOT_AVAILABLE                                     Handle        = 0x80110602\n\tCOMQC_E_NO_IPERSISTSTREAM                                                 Handle        = 0x80110603\n\tCOMQC_E_BAD_MESSAGE                                                       Handle        = 0x80110604\n\tCOMQC_E_UNAUTHENTICATED                                                   Handle        = 0x80110605\n\tCOMQC_E_UNTRUSTED_ENQUEUER                                                Handle        = 0x80110606\n\tMSDTC_E_DUPLICATE_RESOURCE                                                Handle        = 0x80110701\n\tCOMADMIN_E_OBJECT_PARENT_MISSING                                          Handle        = 0x80110808\n\tCOMADMIN_E_OBJECT_DOES_NOT_EXIST                                          Handle        = 0x80110809\n\tCOMADMIN_E_APP_NOT_RUNNING                                                Handle        = 0x8011080A\n\tCOMADMIN_E_INVALID_PARTITION                                              Handle        = 0x8011080B\n\tCOMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE                              Handle        = 0x8011080D\n\tCOMADMIN_E_USER_IN_SET                                                    Handle        = 0x8011080E\n\tCOMADMIN_E_CANTRECYCLELIBRARYAPPS                                         Handle        = 0x8011080F\n\tCOMADMIN_E_CANTRECYCLESERVICEAPPS                                         Handle        = 0x80110811\n\tCOMADMIN_E_PROCESSALREADYRECYCLED                                         Handle        = 0x80110812\n\tCOMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED                                  Handle        = 0x80110813\n\tCOMADMIN_E_CANTMAKEINPROCSERVICE                                          Handle        = 0x80110814\n\tCOMADMIN_E_PROGIDINUSEBYCLSID                                             Handle        = 0x80110815\n\tCOMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET                                   Handle        = 0x80110816\n\tCOMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED                                  Handle        = 0x80110817\n\tCOMADMIN_E_PARTITION_ACCESSDENIED                                         Handle        = 0x80110818\n\tCOMADMIN_E_PARTITION_MSI_ONLY                                             Handle        = 0x80110819\n\tCOMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT                          Handle        = 0x8011081A\n\tCOMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS                  Handle        = 0x8011081B\n\tCOMADMIN_E_COMP_MOVE_SOURCE                                               Handle        = 0x8011081C\n\tCOMADMIN_E_COMP_MOVE_DEST                                                 Handle        = 0x8011081D\n\tCOMADMIN_E_COMP_MOVE_PRIVATE                                              Handle        = 0x8011081E\n\tCOMADMIN_E_BASEPARTITION_REQUIRED_IN_SET                                  Handle        = 0x8011081F\n\tCOMADMIN_E_CANNOT_ALIAS_EVENTCLASS                                        Handle        = 0x80110820\n\tCOMADMIN_E_PRIVATE_ACCESSDENIED                                           Handle        = 0x80110821\n\tCOMADMIN_E_SAFERINVALID                                                   Handle        = 0x80110822\n\tCOMADMIN_E_REGISTRY_ACCESSDENIED                                          Handle        = 0x80110823\n\tCOMADMIN_E_PARTITIONS_DISABLED                                            Handle        = 0x80110824\n\tWER_S_REPORT_DEBUG                                                        Handle        = 0x001B0000\n\tWER_S_REPORT_UPLOADED                                                     Handle        = 0x001B0001\n\tWER_S_REPORT_QUEUED                                                       Handle        = 0x001B0002\n\tWER_S_DISABLED                                                            Handle        = 0x001B0003\n\tWER_S_SUSPENDED_UPLOAD                                                    Handle        = 0x001B0004\n\tWER_S_DISABLED_QUEUE                                                      Handle        = 0x001B0005\n\tWER_S_DISABLED_ARCHIVE                                                    Handle        = 0x001B0006\n\tWER_S_REPORT_ASYNC                                                        Handle        = 0x001B0007\n\tWER_S_IGNORE_ASSERT_INSTANCE                                              Handle        = 0x001B0008\n\tWER_S_IGNORE_ALL_ASSERTS                                                  Handle        = 0x001B0009\n\tWER_S_ASSERT_CONTINUE                                                     Handle        = 0x001B000A\n\tWER_S_THROTTLED                                                           Handle        = 0x001B000B\n\tWER_S_REPORT_UPLOADED_CAB                                                 Handle        = 0x001B000C\n\tWER_E_CRASH_FAILURE                                                       Handle        = 0x801B8000\n\tWER_E_CANCELED                                                            Handle        = 0x801B8001\n\tWER_E_NETWORK_FAILURE                                                     Handle        = 0x801B8002\n\tWER_E_NOT_INITIALIZED                                                     Handle        = 0x801B8003\n\tWER_E_ALREADY_REPORTING                                                   Handle        = 0x801B8004\n\tWER_E_DUMP_THROTTLED                                                      Handle        = 0x801B8005\n\tWER_E_INSUFFICIENT_CONSENT                                                Handle        = 0x801B8006\n\tWER_E_TOO_HEAVY                                                           Handle        = 0x801B8007\n\tERROR_FLT_IO_COMPLETE                                                     Handle        = 0x001F0001\n\tERROR_FLT_NO_HANDLER_DEFINED                                              Handle        = 0x801F0001\n\tERROR_FLT_CONTEXT_ALREADY_DEFINED                                         Handle        = 0x801F0002\n\tERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST                                    Handle        = 0x801F0003\n\tERROR_FLT_DISALLOW_FAST_IO                                                Handle        = 0x801F0004\n\tERROR_FLT_INVALID_NAME_REQUEST                                            Handle        = 0x801F0005\n\tERROR_FLT_NOT_SAFE_TO_POST_OPERATION                                      Handle        = 0x801F0006\n\tERROR_FLT_NOT_INITIALIZED                                                 Handle        = 0x801F0007\n\tERROR_FLT_FILTER_NOT_READY                                                Handle        = 0x801F0008\n\tERROR_FLT_POST_OPERATION_CLEANUP                                          Handle        = 0x801F0009\n\tERROR_FLT_INTERNAL_ERROR                                                  Handle        = 0x801F000A\n\tERROR_FLT_DELETING_OBJECT                                                 Handle        = 0x801F000B\n\tERROR_FLT_MUST_BE_NONPAGED_POOL                                           Handle        = 0x801F000C\n\tERROR_FLT_DUPLICATE_ENTRY                                                 Handle        = 0x801F000D\n\tERROR_FLT_CBDQ_DISABLED                                                   Handle        = 0x801F000E\n\tERROR_FLT_DO_NOT_ATTACH                                                   Handle        = 0x801F000F\n\tERROR_FLT_DO_NOT_DETACH                                                   Handle        = 0x801F0010\n\tERROR_FLT_INSTANCE_ALTITUDE_COLLISION                                     Handle        = 0x801F0011\n\tERROR_FLT_INSTANCE_NAME_COLLISION                                         Handle        = 0x801F0012\n\tERROR_FLT_FILTER_NOT_FOUND                                                Handle        = 0x801F0013\n\tERROR_FLT_VOLUME_NOT_FOUND                                                Handle        = 0x801F0014\n\tERROR_FLT_INSTANCE_NOT_FOUND                                              Handle        = 0x801F0015\n\tERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND                                    Handle        = 0x801F0016\n\tERROR_FLT_INVALID_CONTEXT_REGISTRATION                                    Handle        = 0x801F0017\n\tERROR_FLT_NAME_CACHE_MISS                                                 Handle        = 0x801F0018\n\tERROR_FLT_NO_DEVICE_OBJECT                                                Handle        = 0x801F0019\n\tERROR_FLT_VOLUME_ALREADY_MOUNTED                                          Handle        = 0x801F001A\n\tERROR_FLT_ALREADY_ENLISTED                                                Handle        = 0x801F001B\n\tERROR_FLT_CONTEXT_ALREADY_LINKED                                          Handle        = 0x801F001C\n\tERROR_FLT_NO_WAITER_FOR_REPLY                                             Handle        = 0x801F0020\n\tERROR_FLT_REGISTRATION_BUSY                                               Handle        = 0x801F0023\n\tERROR_HUNG_DISPLAY_DRIVER_THREAD                                          Handle        = 0x80260001\n\tDWM_E_COMPOSITIONDISABLED                                                 Handle        = 0x80263001\n\tDWM_E_REMOTING_NOT_SUPPORTED                                              Handle        = 0x80263002\n\tDWM_E_NO_REDIRECTION_SURFACE_AVAILABLE                                    Handle        = 0x80263003\n\tDWM_E_NOT_QUEUING_PRESENTS                                                Handle        = 0x80263004\n\tDWM_E_ADAPTER_NOT_FOUND                                                   Handle        = 0x80263005\n\tDWM_S_GDI_REDIRECTION_SURFACE                                             Handle        = 0x00263005\n\tDWM_E_TEXTURE_TOO_LARGE                                                   Handle        = 0x80263007\n\tDWM_S_GDI_REDIRECTION_SURFACE_BLT_VIA_GDI                                 Handle        = 0x00263008\n\tERROR_MONITOR_NO_DESCRIPTOR                                               Handle        = 0x00261001\n\tERROR_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT                                   Handle        = 0x00261002\n\tERROR_MONITOR_INVALID_DESCRIPTOR_CHECKSUM                                 Handle        = 0xC0261003\n\tERROR_MONITOR_INVALID_STANDARD_TIMING_BLOCK                               Handle        = 0xC0261004\n\tERROR_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED                           Handle        = 0xC0261005\n\tERROR_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK                          Handle        = 0xC0261006\n\tERROR_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK                          Handle        = 0xC0261007\n\tERROR_MONITOR_NO_MORE_DESCRIPTOR_DATA                                     Handle        = 0xC0261008\n\tERROR_MONITOR_INVALID_DETAILED_TIMING_BLOCK                               Handle        = 0xC0261009\n\tERROR_MONITOR_INVALID_MANUFACTURE_DATE                                    Handle        = 0xC026100A\n\tERROR_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER                                   Handle        = 0xC0262000\n\tERROR_GRAPHICS_INSUFFICIENT_DMA_BUFFER                                    Handle        = 0xC0262001\n\tERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER                                    Handle        = 0xC0262002\n\tERROR_GRAPHICS_ADAPTER_WAS_RESET                                          Handle        = 0xC0262003\n\tERROR_GRAPHICS_INVALID_DRIVER_MODEL                                       Handle        = 0xC0262004\n\tERROR_GRAPHICS_PRESENT_MODE_CHANGED                                       Handle        = 0xC0262005\n\tERROR_GRAPHICS_PRESENT_OCCLUDED                                           Handle        = 0xC0262006\n\tERROR_GRAPHICS_PRESENT_DENIED                                             Handle        = 0xC0262007\n\tERROR_GRAPHICS_CANNOTCOLORCONVERT                                         Handle        = 0xC0262008\n\tERROR_GRAPHICS_DRIVER_MISMATCH                                            Handle        = 0xC0262009\n\tERROR_GRAPHICS_PARTIAL_DATA_POPULATED                                     Handle        = 0x4026200A\n\tERROR_GRAPHICS_PRESENT_REDIRECTION_DISABLED                               Handle        = 0xC026200B\n\tERROR_GRAPHICS_PRESENT_UNOCCLUDED                                         Handle        = 0xC026200C\n\tERROR_GRAPHICS_WINDOWDC_NOT_AVAILABLE                                     Handle        = 0xC026200D\n\tERROR_GRAPHICS_WINDOWLESS_PRESENT_DISABLED                                Handle        = 0xC026200E\n\tERROR_GRAPHICS_PRESENT_INVALID_WINDOW                                     Handle        = 0xC026200F\n\tERROR_GRAPHICS_PRESENT_BUFFER_NOT_BOUND                                   Handle        = 0xC0262010\n\tERROR_GRAPHICS_VAIL_STATE_CHANGED                                         Handle        = 0xC0262011\n\tERROR_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN                         Handle        = 0xC0262012\n\tERROR_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED                            Handle        = 0xC0262013\n\tERROR_GRAPHICS_NO_VIDEO_MEMORY                                            Handle        = 0xC0262100\n\tERROR_GRAPHICS_CANT_LOCK_MEMORY                                           Handle        = 0xC0262101\n\tERROR_GRAPHICS_ALLOCATION_BUSY                                            Handle        = 0xC0262102\n\tERROR_GRAPHICS_TOO_MANY_REFERENCES                                        Handle        = 0xC0262103\n\tERROR_GRAPHICS_TRY_AGAIN_LATER                                            Handle        = 0xC0262104\n\tERROR_GRAPHICS_TRY_AGAIN_NOW                                              Handle        = 0xC0262105\n\tERROR_GRAPHICS_ALLOCATION_INVALID                                         Handle        = 0xC0262106\n\tERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE                           Handle        = 0xC0262107\n\tERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED                           Handle        = 0xC0262108\n\tERROR_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION                               Handle        = 0xC0262109\n\tERROR_GRAPHICS_INVALID_ALLOCATION_USAGE                                   Handle        = 0xC0262110\n\tERROR_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION                              Handle        = 0xC0262111\n\tERROR_GRAPHICS_ALLOCATION_CLOSED                                          Handle        = 0xC0262112\n\tERROR_GRAPHICS_INVALID_ALLOCATION_INSTANCE                                Handle        = 0xC0262113\n\tERROR_GRAPHICS_INVALID_ALLOCATION_HANDLE                                  Handle        = 0xC0262114\n\tERROR_GRAPHICS_WRONG_ALLOCATION_DEVICE                                    Handle        = 0xC0262115\n\tERROR_GRAPHICS_ALLOCATION_CONTENT_LOST                                    Handle        = 0xC0262116\n\tERROR_GRAPHICS_GPU_EXCEPTION_ON_DEVICE                                    Handle        = 0xC0262200\n\tERROR_GRAPHICS_SKIP_ALLOCATION_PREPARATION                                Handle        = 0x40262201\n\tERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY                                     Handle        = 0xC0262300\n\tERROR_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED                               Handle        = 0xC0262301\n\tERROR_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED                     Handle        = 0xC0262302\n\tERROR_GRAPHICS_INVALID_VIDPN                                              Handle        = 0xC0262303\n\tERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE                               Handle        = 0xC0262304\n\tERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET                               Handle        = 0xC0262305\n\tERROR_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED                               Handle        = 0xC0262306\n\tERROR_GRAPHICS_MODE_NOT_PINNED                                            Handle        = 0x00262307\n\tERROR_GRAPHICS_INVALID_VIDPN_SOURCEMODESET                                Handle        = 0xC0262308\n\tERROR_GRAPHICS_INVALID_VIDPN_TARGETMODESET                                Handle        = 0xC0262309\n\tERROR_GRAPHICS_INVALID_FREQUENCY                                          Handle        = 0xC026230A\n\tERROR_GRAPHICS_INVALID_ACTIVE_REGION                                      Handle        = 0xC026230B\n\tERROR_GRAPHICS_INVALID_TOTAL_REGION                                       Handle        = 0xC026230C\n\tERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE                          Handle        = 0xC0262310\n\tERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE                          Handle        = 0xC0262311\n\tERROR_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET                             Handle        = 0xC0262312\n\tERROR_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY                                   Handle        = 0xC0262313\n\tERROR_GRAPHICS_MODE_ALREADY_IN_MODESET                                    Handle        = 0xC0262314\n\tERROR_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET                              Handle        = 0xC0262315\n\tERROR_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET                              Handle        = 0xC0262316\n\tERROR_GRAPHICS_SOURCE_ALREADY_IN_SET                                      Handle        = 0xC0262317\n\tERROR_GRAPHICS_TARGET_ALREADY_IN_SET                                      Handle        = 0xC0262318\n\tERROR_GRAPHICS_INVALID_VIDPN_PRESENT_PATH                                 Handle        = 0xC0262319\n\tERROR_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY                              Handle        = 0xC026231A\n\tERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET                          Handle        = 0xC026231B\n\tERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE                             Handle        = 0xC026231C\n\tERROR_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET                                  Handle        = 0xC026231D\n\tERROR_GRAPHICS_NO_PREFERRED_MODE                                          Handle        = 0x0026231E\n\tERROR_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET                              Handle        = 0xC026231F\n\tERROR_GRAPHICS_STALE_MODESET                                              Handle        = 0xC0262320\n\tERROR_GRAPHICS_INVALID_MONITOR_SOURCEMODESET                              Handle        = 0xC0262321\n\tERROR_GRAPHICS_INVALID_MONITOR_SOURCE_MODE                                Handle        = 0xC0262322\n\tERROR_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN                            Handle        = 0xC0262323\n\tERROR_GRAPHICS_MODE_ID_MUST_BE_UNIQUE                                     Handle        = 0xC0262324\n\tERROR_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION            Handle        = 0xC0262325\n\tERROR_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES                    Handle        = 0xC0262326\n\tERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY                                       Handle        = 0xC0262327\n\tERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE                      Handle        = 0xC0262328\n\tERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET                      Handle        = 0xC0262329\n\tERROR_GRAPHICS_INVALID_MONITORDESCRIPTORSET                               Handle        = 0xC026232A\n\tERROR_GRAPHICS_INVALID_MONITORDESCRIPTOR                                  Handle        = 0xC026232B\n\tERROR_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET                               Handle        = 0xC026232C\n\tERROR_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET                           Handle        = 0xC026232D\n\tERROR_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE                        Handle        = 0xC026232E\n\tERROR_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE                           Handle        = 0xC026232F\n\tERROR_GRAPHICS_RESOURCES_NOT_RELATED                                      Handle        = 0xC0262330\n\tERROR_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE                                   Handle        = 0xC0262331\n\tERROR_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE                                   Handle        = 0xC0262332\n\tERROR_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET                                  Handle        = 0xC0262333\n\tERROR_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER               Handle        = 0xC0262334\n\tERROR_GRAPHICS_NO_VIDPNMGR                                                Handle        = 0xC0262335\n\tERROR_GRAPHICS_NO_ACTIVE_VIDPN                                            Handle        = 0xC0262336\n\tERROR_GRAPHICS_STALE_VIDPN_TOPOLOGY                                       Handle        = 0xC0262337\n\tERROR_GRAPHICS_MONITOR_NOT_CONNECTED                                      Handle        = 0xC0262338\n\tERROR_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY                                     Handle        = 0xC0262339\n\tERROR_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE                                Handle        = 0xC026233A\n\tERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE                                 Handle        = 0xC026233B\n\tERROR_GRAPHICS_INVALID_STRIDE                                             Handle        = 0xC026233C\n\tERROR_GRAPHICS_INVALID_PIXELFORMAT                                        Handle        = 0xC026233D\n\tERROR_GRAPHICS_INVALID_COLORBASIS                                         Handle        = 0xC026233E\n\tERROR_GRAPHICS_INVALID_PIXELVALUEACCESSMODE                               Handle        = 0xC026233F\n\tERROR_GRAPHICS_TARGET_NOT_IN_TOPOLOGY                                     Handle        = 0xC0262340\n\tERROR_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT                         Handle        = 0xC0262341\n\tERROR_GRAPHICS_VIDPN_SOURCE_IN_USE                                        Handle        = 0xC0262342\n\tERROR_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN                                   Handle        = 0xC0262343\n\tERROR_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL                            Handle        = 0xC0262344\n\tERROR_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION               Handle        = 0xC0262345\n\tERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED         Handle        = 0xC0262346\n\tERROR_GRAPHICS_INVALID_GAMMA_RAMP                                         Handle        = 0xC0262347\n\tERROR_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED                                   Handle        = 0xC0262348\n\tERROR_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED                                Handle        = 0xC0262349\n\tERROR_GRAPHICS_MODE_NOT_IN_MODESET                                        Handle        = 0xC026234A\n\tERROR_GRAPHICS_DATASET_IS_EMPTY                                           Handle        = 0x0026234B\n\tERROR_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET                                Handle        = 0x0026234C\n\tERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON               Handle        = 0xC026234D\n\tERROR_GRAPHICS_INVALID_PATH_CONTENT_TYPE                                  Handle        = 0xC026234E\n\tERROR_GRAPHICS_INVALID_COPYPROTECTION_TYPE                                Handle        = 0xC026234F\n\tERROR_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS                          Handle        = 0xC0262350\n\tERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED            Handle        = 0x00262351\n\tERROR_GRAPHICS_INVALID_SCANLINE_ORDERING                                  Handle        = 0xC0262352\n\tERROR_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED                               Handle        = 0xC0262353\n\tERROR_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS                           Handle        = 0xC0262354\n\tERROR_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT                                Handle        = 0xC0262355\n\tERROR_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM                             Handle        = 0xC0262356\n\tERROR_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN                          Handle        = 0xC0262357\n\tERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT                  Handle        = 0xC0262358\n\tERROR_GRAPHICS_MAX_NUM_PATHS_REACHED                                      Handle        = 0xC0262359\n\tERROR_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION                         Handle        = 0xC026235A\n\tERROR_GRAPHICS_INVALID_CLIENT_TYPE                                        Handle        = 0xC026235B\n\tERROR_GRAPHICS_CLIENTVIDPN_NOT_SET                                        Handle        = 0xC026235C\n\tERROR_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED                          Handle        = 0xC0262400\n\tERROR_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED                             Handle        = 0xC0262401\n\tERROR_GRAPHICS_UNKNOWN_CHILD_STATUS                                       Handle        = 0x4026242F\n\tERROR_GRAPHICS_NOT_A_LINKED_ADAPTER                                       Handle        = 0xC0262430\n\tERROR_GRAPHICS_LEADLINK_NOT_ENUMERATED                                    Handle        = 0xC0262431\n\tERROR_GRAPHICS_CHAINLINKS_NOT_ENUMERATED                                  Handle        = 0xC0262432\n\tERROR_GRAPHICS_ADAPTER_CHAIN_NOT_READY                                    Handle        = 0xC0262433\n\tERROR_GRAPHICS_CHAINLINKS_NOT_STARTED                                     Handle        = 0xC0262434\n\tERROR_GRAPHICS_CHAINLINKS_NOT_POWERED_ON                                  Handle        = 0xC0262435\n\tERROR_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE                             Handle        = 0xC0262436\n\tERROR_GRAPHICS_LEADLINK_START_DEFERRED                                    Handle        = 0x40262437\n\tERROR_GRAPHICS_NOT_POST_DEVICE_DRIVER                                     Handle        = 0xC0262438\n\tERROR_GRAPHICS_POLLING_TOO_FREQUENTLY                                     Handle        = 0x40262439\n\tERROR_GRAPHICS_START_DEFERRED                                             Handle        = 0x4026243A\n\tERROR_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED                                Handle        = 0xC026243B\n\tERROR_GRAPHICS_DEPENDABLE_CHILD_STATUS                                    Handle        = 0x4026243C\n\tERROR_GRAPHICS_OPM_NOT_SUPPORTED                                          Handle        = 0xC0262500\n\tERROR_GRAPHICS_COPP_NOT_SUPPORTED                                         Handle        = 0xC0262501\n\tERROR_GRAPHICS_UAB_NOT_SUPPORTED                                          Handle        = 0xC0262502\n\tERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS                           Handle        = 0xC0262503\n\tERROR_GRAPHICS_OPM_NO_VIDEO_OUTPUTS_EXIST                                 Handle        = 0xC0262505\n\tERROR_GRAPHICS_OPM_INTERNAL_ERROR                                         Handle        = 0xC026250B\n\tERROR_GRAPHICS_OPM_INVALID_HANDLE                                         Handle        = 0xC026250C\n\tERROR_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH                             Handle        = 0xC026250E\n\tERROR_GRAPHICS_OPM_SPANNING_MODE_ENABLED                                  Handle        = 0xC026250F\n\tERROR_GRAPHICS_OPM_THEATER_MODE_ENABLED                                   Handle        = 0xC0262510\n\tERROR_GRAPHICS_PVP_HFS_FAILED                                             Handle        = 0xC0262511\n\tERROR_GRAPHICS_OPM_INVALID_SRM                                            Handle        = 0xC0262512\n\tERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP                           Handle        = 0xC0262513\n\tERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP                            Handle        = 0xC0262514\n\tERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA                          Handle        = 0xC0262515\n\tERROR_GRAPHICS_OPM_HDCP_SRM_NEVER_SET                                     Handle        = 0xC0262516\n\tERROR_GRAPHICS_OPM_RESOLUTION_TOO_HIGH                                    Handle        = 0xC0262517\n\tERROR_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE                       Handle        = 0xC0262518\n\tERROR_GRAPHICS_OPM_VIDEO_OUTPUT_NO_LONGER_EXISTS                          Handle        = 0xC026251A\n\tERROR_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS                        Handle        = 0xC026251B\n\tERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS              Handle        = 0xC026251C\n\tERROR_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST                            Handle        = 0xC026251D\n\tERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR                                  Handle        = 0xC026251E\n\tERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS               Handle        = 0xC026251F\n\tERROR_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED                                Handle        = 0xC0262520\n\tERROR_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST                          Handle        = 0xC0262521\n\tERROR_GRAPHICS_I2C_NOT_SUPPORTED                                          Handle        = 0xC0262580\n\tERROR_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST                                  Handle        = 0xC0262581\n\tERROR_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA                                Handle        = 0xC0262582\n\tERROR_GRAPHICS_I2C_ERROR_RECEIVING_DATA                                   Handle        = 0xC0262583\n\tERROR_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED                                    Handle        = 0xC0262584\n\tERROR_GRAPHICS_DDCCI_INVALID_DATA                                         Handle        = 0xC0262585\n\tERROR_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE          Handle        = 0xC0262586\n\tERROR_GRAPHICS_MCA_INVALID_CAPABILITIES_STRING                            Handle        = 0xC0262587\n\tERROR_GRAPHICS_MCA_INTERNAL_ERROR                                         Handle        = 0xC0262588\n\tERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND                              Handle        = 0xC0262589\n\tERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH                               Handle        = 0xC026258A\n\tERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM                             Handle        = 0xC026258B\n\tERROR_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE                            Handle        = 0xC026258C\n\tERROR_GRAPHICS_MONITOR_NO_LONGER_EXISTS                                   Handle        = 0xC026258D\n\tERROR_GRAPHICS_DDCCI_CURRENT_CURRENT_VALUE_GREATER_THAN_MAXIMUM_VALUE     Handle        = 0xC02625D8\n\tERROR_GRAPHICS_MCA_INVALID_VCP_VERSION                                    Handle        = 0xC02625D9\n\tERROR_GRAPHICS_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION                    Handle        = 0xC02625DA\n\tERROR_GRAPHICS_MCA_MCCS_VERSION_MISMATCH                                  Handle        = 0xC02625DB\n\tERROR_GRAPHICS_MCA_UNSUPPORTED_MCCS_VERSION                               Handle        = 0xC02625DC\n\tERROR_GRAPHICS_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED                       Handle        = 0xC02625DE\n\tERROR_GRAPHICS_MCA_UNSUPPORTED_COLOR_TEMPERATURE                          Handle        = 0xC02625DF\n\tERROR_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED                             Handle        = 0xC02625E0\n\tERROR_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME                      Handle        = 0xC02625E1\n\tERROR_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP                     Handle        = 0xC02625E2\n\tERROR_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED                            Handle        = 0xC02625E3\n\tERROR_GRAPHICS_INVALID_POINTER                                            Handle        = 0xC02625E4\n\tERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE                   Handle        = 0xC02625E5\n\tERROR_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL                                  Handle        = 0xC02625E6\n\tERROR_GRAPHICS_INTERNAL_ERROR                                             Handle        = 0xC02625E7\n\tERROR_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS                            Handle        = 0xC02605E8\n\tNAP_E_INVALID_PACKET                                                      Handle        = 0x80270001\n\tNAP_E_MISSING_SOH                                                         Handle        = 0x80270002\n\tNAP_E_CONFLICTING_ID                                                      Handle        = 0x80270003\n\tNAP_E_NO_CACHED_SOH                                                       Handle        = 0x80270004\n\tNAP_E_STILL_BOUND                                                         Handle        = 0x80270005\n\tNAP_E_NOT_REGISTERED                                                      Handle        = 0x80270006\n\tNAP_E_NOT_INITIALIZED                                                     Handle        = 0x80270007\n\tNAP_E_MISMATCHED_ID                                                       Handle        = 0x80270008\n\tNAP_E_NOT_PENDING                                                         Handle        = 0x80270009\n\tNAP_E_ID_NOT_FOUND                                                        Handle        = 0x8027000A\n\tNAP_E_MAXSIZE_TOO_SMALL                                                   Handle        = 0x8027000B\n\tNAP_E_SERVICE_NOT_RUNNING                                                 Handle        = 0x8027000C\n\tNAP_S_CERT_ALREADY_PRESENT                                                Handle        = 0x0027000D\n\tNAP_E_ENTITY_DISABLED                                                     Handle        = 0x8027000E\n\tNAP_E_NETSH_GROUPPOLICY_ERROR                                             Handle        = 0x8027000F\n\tNAP_E_TOO_MANY_CALLS                                                      Handle        = 0x80270010\n\tNAP_E_SHV_CONFIG_EXISTED                                                  Handle        = 0x80270011\n\tNAP_E_SHV_CONFIG_NOT_FOUND                                                Handle        = 0x80270012\n\tNAP_E_SHV_TIMEOUT                                                         Handle        = 0x80270013\n\tTPM_E_ERROR_MASK                                                          Handle        = 0x80280000\n\tTPM_E_AUTHFAIL                                                            Handle        = 0x80280001\n\tTPM_E_BADINDEX                                                            Handle        = 0x80280002\n\tTPM_E_BAD_PARAMETER                                                       Handle        = 0x80280003\n\tTPM_E_AUDITFAILURE                                                        Handle        = 0x80280004\n\tTPM_E_CLEAR_DISABLED                                                      Handle        = 0x80280005\n\tTPM_E_DEACTIVATED                                                         Handle        = 0x80280006\n\tTPM_E_DISABLED                                                            Handle        = 0x80280007\n\tTPM_E_DISABLED_CMD                                                        Handle        = 0x80280008\n\tTPM_E_FAIL                                                                Handle        = 0x80280009\n\tTPM_E_BAD_ORDINAL                                                         Handle        = 0x8028000A\n\tTPM_E_INSTALL_DISABLED                                                    Handle        = 0x8028000B\n\tTPM_E_INVALID_KEYHANDLE                                                   Handle        = 0x8028000C\n\tTPM_E_KEYNOTFOUND                                                         Handle        = 0x8028000D\n\tTPM_E_INAPPROPRIATE_ENC                                                   Handle        = 0x8028000E\n\tTPM_E_MIGRATEFAIL                                                         Handle        = 0x8028000F\n\tTPM_E_INVALID_PCR_INFO                                                    Handle        = 0x80280010\n\tTPM_E_NOSPACE                                                             Handle        = 0x80280011\n\tTPM_E_NOSRK                                                               Handle        = 0x80280012\n\tTPM_E_NOTSEALED_BLOB                                                      Handle        = 0x80280013\n\tTPM_E_OWNER_SET                                                           Handle        = 0x80280014\n\tTPM_E_RESOURCES                                                           Handle        = 0x80280015\n\tTPM_E_SHORTRANDOM                                                         Handle        = 0x80280016\n\tTPM_E_SIZE                                                                Handle        = 0x80280017\n\tTPM_E_WRONGPCRVAL                                                         Handle        = 0x80280018\n\tTPM_E_BAD_PARAM_SIZE                                                      Handle        = 0x80280019\n\tTPM_E_SHA_THREAD                                                          Handle        = 0x8028001A\n\tTPM_E_SHA_ERROR                                                           Handle        = 0x8028001B\n\tTPM_E_FAILEDSELFTEST                                                      Handle        = 0x8028001C\n\tTPM_E_AUTH2FAIL                                                           Handle        = 0x8028001D\n\tTPM_E_BADTAG                                                              Handle        = 0x8028001E\n\tTPM_E_IOERROR                                                             Handle        = 0x8028001F\n\tTPM_E_ENCRYPT_ERROR                                                       Handle        = 0x80280020\n\tTPM_E_DECRYPT_ERROR                                                       Handle        = 0x80280021\n\tTPM_E_INVALID_AUTHHANDLE                                                  Handle        = 0x80280022\n\tTPM_E_NO_ENDORSEMENT                                                      Handle        = 0x80280023\n\tTPM_E_INVALID_KEYUSAGE                                                    Handle        = 0x80280024\n\tTPM_E_WRONG_ENTITYTYPE                                                    Handle        = 0x80280025\n\tTPM_E_INVALID_POSTINIT                                                    Handle        = 0x80280026\n\tTPM_E_INAPPROPRIATE_SIG                                                   Handle        = 0x80280027\n\tTPM_E_BAD_KEY_PROPERTY                                                    Handle        = 0x80280028\n\tTPM_E_BAD_MIGRATION                                                       Handle        = 0x80280029\n\tTPM_E_BAD_SCHEME                                                          Handle        = 0x8028002A\n\tTPM_E_BAD_DATASIZE                                                        Handle        = 0x8028002B\n\tTPM_E_BAD_MODE                                                            Handle        = 0x8028002C\n\tTPM_E_BAD_PRESENCE                                                        Handle        = 0x8028002D\n\tTPM_E_BAD_VERSION                                                         Handle        = 0x8028002E\n\tTPM_E_NO_WRAP_TRANSPORT                                                   Handle        = 0x8028002F\n\tTPM_E_AUDITFAIL_UNSUCCESSFUL                                              Handle        = 0x80280030\n\tTPM_E_AUDITFAIL_SUCCESSFUL                                                Handle        = 0x80280031\n\tTPM_E_NOTRESETABLE                                                        Handle        = 0x80280032\n\tTPM_E_NOTLOCAL                                                            Handle        = 0x80280033\n\tTPM_E_BAD_TYPE                                                            Handle        = 0x80280034\n\tTPM_E_INVALID_RESOURCE                                                    Handle        = 0x80280035\n\tTPM_E_NOTFIPS                                                             Handle        = 0x80280036\n\tTPM_E_INVALID_FAMILY                                                      Handle        = 0x80280037\n\tTPM_E_NO_NV_PERMISSION                                                    Handle        = 0x80280038\n\tTPM_E_REQUIRES_SIGN                                                       Handle        = 0x80280039\n\tTPM_E_KEY_NOTSUPPORTED                                                    Handle        = 0x8028003A\n\tTPM_E_AUTH_CONFLICT                                                       Handle        = 0x8028003B\n\tTPM_E_AREA_LOCKED                                                         Handle        = 0x8028003C\n\tTPM_E_BAD_LOCALITY                                                        Handle        = 0x8028003D\n\tTPM_E_READ_ONLY                                                           Handle        = 0x8028003E\n\tTPM_E_PER_NOWRITE                                                         Handle        = 0x8028003F\n\tTPM_E_FAMILYCOUNT                                                         Handle        = 0x80280040\n\tTPM_E_WRITE_LOCKED                                                        Handle        = 0x80280041\n\tTPM_E_BAD_ATTRIBUTES                                                      Handle        = 0x80280042\n\tTPM_E_INVALID_STRUCTURE                                                   Handle        = 0x80280043\n\tTPM_E_KEY_OWNER_CONTROL                                                   Handle        = 0x80280044\n\tTPM_E_BAD_COUNTER                                                         Handle        = 0x80280045\n\tTPM_E_NOT_FULLWRITE                                                       Handle        = 0x80280046\n\tTPM_E_CONTEXT_GAP                                                         Handle        = 0x80280047\n\tTPM_E_MAXNVWRITES                                                         Handle        = 0x80280048\n\tTPM_E_NOOPERATOR                                                          Handle        = 0x80280049\n\tTPM_E_RESOURCEMISSING                                                     Handle        = 0x8028004A\n\tTPM_E_DELEGATE_LOCK                                                       Handle        = 0x8028004B\n\tTPM_E_DELEGATE_FAMILY                                                     Handle        = 0x8028004C\n\tTPM_E_DELEGATE_ADMIN                                                      Handle        = 0x8028004D\n\tTPM_E_TRANSPORT_NOTEXCLUSIVE                                              Handle        = 0x8028004E\n\tTPM_E_OWNER_CONTROL                                                       Handle        = 0x8028004F\n\tTPM_E_DAA_RESOURCES                                                       Handle        = 0x80280050\n\tTPM_E_DAA_INPUT_DATA0                                                     Handle        = 0x80280051\n\tTPM_E_DAA_INPUT_DATA1                                                     Handle        = 0x80280052\n\tTPM_E_DAA_ISSUER_SETTINGS                                                 Handle        = 0x80280053\n\tTPM_E_DAA_TPM_SETTINGS                                                    Handle        = 0x80280054\n\tTPM_E_DAA_STAGE                                                           Handle        = 0x80280055\n\tTPM_E_DAA_ISSUER_VALIDITY                                                 Handle        = 0x80280056\n\tTPM_E_DAA_WRONG_W                                                         Handle        = 0x80280057\n\tTPM_E_BAD_HANDLE                                                          Handle        = 0x80280058\n\tTPM_E_BAD_DELEGATE                                                        Handle        = 0x80280059\n\tTPM_E_BADCONTEXT                                                          Handle        = 0x8028005A\n\tTPM_E_TOOMANYCONTEXTS                                                     Handle        = 0x8028005B\n\tTPM_E_MA_TICKET_SIGNATURE                                                 Handle        = 0x8028005C\n\tTPM_E_MA_DESTINATION                                                      Handle        = 0x8028005D\n\tTPM_E_MA_SOURCE                                                           Handle        = 0x8028005E\n\tTPM_E_MA_AUTHORITY                                                        Handle        = 0x8028005F\n\tTPM_E_PERMANENTEK                                                         Handle        = 0x80280061\n\tTPM_E_BAD_SIGNATURE                                                       Handle        = 0x80280062\n\tTPM_E_NOCONTEXTSPACE                                                      Handle        = 0x80280063\n\tTPM_20_E_ASYMMETRIC                                                       Handle        = 0x80280081\n\tTPM_20_E_ATTRIBUTES                                                       Handle        = 0x80280082\n\tTPM_20_E_HASH                                                             Handle        = 0x80280083\n\tTPM_20_E_VALUE                                                            Handle        = 0x80280084\n\tTPM_20_E_HIERARCHY                                                        Handle        = 0x80280085\n\tTPM_20_E_KEY_SIZE                                                         Handle        = 0x80280087\n\tTPM_20_E_MGF                                                              Handle        = 0x80280088\n\tTPM_20_E_MODE                                                             Handle        = 0x80280089\n\tTPM_20_E_TYPE                                                             Handle        = 0x8028008A\n\tTPM_20_E_HANDLE                                                           Handle        = 0x8028008B\n\tTPM_20_E_KDF                                                              Handle        = 0x8028008C\n\tTPM_20_E_RANGE                                                            Handle        = 0x8028008D\n\tTPM_20_E_AUTH_FAIL                                                        Handle        = 0x8028008E\n\tTPM_20_E_NONCE                                                            Handle        = 0x8028008F\n\tTPM_20_E_PP                                                               Handle        = 0x80280090\n\tTPM_20_E_SCHEME                                                           Handle        = 0x80280092\n\tTPM_20_E_SIZE                                                             Handle        = 0x80280095\n\tTPM_20_E_SYMMETRIC                                                        Handle        = 0x80280096\n\tTPM_20_E_TAG                                                              Handle        = 0x80280097\n\tTPM_20_E_SELECTOR                                                         Handle        = 0x80280098\n\tTPM_20_E_INSUFFICIENT                                                     Handle        = 0x8028009A\n\tTPM_20_E_SIGNATURE                                                        Handle        = 0x8028009B\n\tTPM_20_E_KEY                                                              Handle        = 0x8028009C\n\tTPM_20_E_POLICY_FAIL                                                      Handle        = 0x8028009D\n\tTPM_20_E_INTEGRITY                                                        Handle        = 0x8028009F\n\tTPM_20_E_TICKET                                                           Handle        = 0x802800A0\n\tTPM_20_E_RESERVED_BITS                                                    Handle        = 0x802800A1\n\tTPM_20_E_BAD_AUTH                                                         Handle        = 0x802800A2\n\tTPM_20_E_EXPIRED                                                          Handle        = 0x802800A3\n\tTPM_20_E_POLICY_CC                                                        Handle        = 0x802800A4\n\tTPM_20_E_BINDING                                                          Handle        = 0x802800A5\n\tTPM_20_E_CURVE                                                            Handle        = 0x802800A6\n\tTPM_20_E_ECC_POINT                                                        Handle        = 0x802800A7\n\tTPM_20_E_INITIALIZE                                                       Handle        = 0x80280100\n\tTPM_20_E_FAILURE                                                          Handle        = 0x80280101\n\tTPM_20_E_SEQUENCE                                                         Handle        = 0x80280103\n\tTPM_20_E_PRIVATE                                                          Handle        = 0x8028010B\n\tTPM_20_E_HMAC                                                             Handle        = 0x80280119\n\tTPM_20_E_DISABLED                                                         Handle        = 0x80280120\n\tTPM_20_E_EXCLUSIVE                                                        Handle        = 0x80280121\n\tTPM_20_E_ECC_CURVE                                                        Handle        = 0x80280123\n\tTPM_20_E_AUTH_TYPE                                                        Handle        = 0x80280124\n\tTPM_20_E_AUTH_MISSING                                                     Handle        = 0x80280125\n\tTPM_20_E_POLICY                                                           Handle        = 0x80280126\n\tTPM_20_E_PCR                                                              Handle        = 0x80280127\n\tTPM_20_E_PCR_CHANGED                                                      Handle        = 0x80280128\n\tTPM_20_E_UPGRADE                                                          Handle        = 0x8028012D\n\tTPM_20_E_TOO_MANY_CONTEXTS                                                Handle        = 0x8028012E\n\tTPM_20_E_AUTH_UNAVAILABLE                                                 Handle        = 0x8028012F\n\tTPM_20_E_REBOOT                                                           Handle        = 0x80280130\n\tTPM_20_E_UNBALANCED                                                       Handle        = 0x80280131\n\tTPM_20_E_COMMAND_SIZE                                                     Handle        = 0x80280142\n\tTPM_20_E_COMMAND_CODE                                                     Handle        = 0x80280143\n\tTPM_20_E_AUTHSIZE                                                         Handle        = 0x80280144\n\tTPM_20_E_AUTH_CONTEXT                                                     Handle        = 0x80280145\n\tTPM_20_E_NV_RANGE                                                         Handle        = 0x80280146\n\tTPM_20_E_NV_SIZE                                                          Handle        = 0x80280147\n\tTPM_20_E_NV_LOCKED                                                        Handle        = 0x80280148\n\tTPM_20_E_NV_AUTHORIZATION                                                 Handle        = 0x80280149\n\tTPM_20_E_NV_UNINITIALIZED                                                 Handle        = 0x8028014A\n\tTPM_20_E_NV_SPACE                                                         Handle        = 0x8028014B\n\tTPM_20_E_NV_DEFINED                                                       Handle        = 0x8028014C\n\tTPM_20_E_BAD_CONTEXT                                                      Handle        = 0x80280150\n\tTPM_20_E_CPHASH                                                           Handle        = 0x80280151\n\tTPM_20_E_PARENT                                                           Handle        = 0x80280152\n\tTPM_20_E_NEEDS_TEST                                                       Handle        = 0x80280153\n\tTPM_20_E_NO_RESULT                                                        Handle        = 0x80280154\n\tTPM_20_E_SENSITIVE                                                        Handle        = 0x80280155\n\tTPM_E_COMMAND_BLOCKED                                                     Handle        = 0x80280400\n\tTPM_E_INVALID_HANDLE                                                      Handle        = 0x80280401\n\tTPM_E_DUPLICATE_VHANDLE                                                   Handle        = 0x80280402\n\tTPM_E_EMBEDDED_COMMAND_BLOCKED                                            Handle        = 0x80280403\n\tTPM_E_EMBEDDED_COMMAND_UNSUPPORTED                                        Handle        = 0x80280404\n\tTPM_E_RETRY                                                               Handle        = 0x80280800\n\tTPM_E_NEEDS_SELFTEST                                                      Handle        = 0x80280801\n\tTPM_E_DOING_SELFTEST                                                      Handle        = 0x80280802\n\tTPM_E_DEFEND_LOCK_RUNNING                                                 Handle        = 0x80280803\n\tTPM_20_E_CONTEXT_GAP                                                      Handle        = 0x80280901\n\tTPM_20_E_OBJECT_MEMORY                                                    Handle        = 0x80280902\n\tTPM_20_E_SESSION_MEMORY                                                   Handle        = 0x80280903\n\tTPM_20_E_MEMORY                                                           Handle        = 0x80280904\n\tTPM_20_E_SESSION_HANDLES                                                  Handle        = 0x80280905\n\tTPM_20_E_OBJECT_HANDLES                                                   Handle        = 0x80280906\n\tTPM_20_E_LOCALITY                                                         Handle        = 0x80280907\n\tTPM_20_E_YIELDED                                                          Handle        = 0x80280908\n\tTPM_20_E_CANCELED                                                         Handle        = 0x80280909\n\tTPM_20_E_TESTING                                                          Handle        = 0x8028090A\n\tTPM_20_E_NV_RATE                                                          Handle        = 0x80280920\n\tTPM_20_E_LOCKOUT                                                          Handle        = 0x80280921\n\tTPM_20_E_RETRY                                                            Handle        = 0x80280922\n\tTPM_20_E_NV_UNAVAILABLE                                                   Handle        = 0x80280923\n\tTBS_E_INTERNAL_ERROR                                                      Handle        = 0x80284001\n\tTBS_E_BAD_PARAMETER                                                       Handle        = 0x80284002\n\tTBS_E_INVALID_OUTPUT_POINTER                                              Handle        = 0x80284003\n\tTBS_E_INVALID_CONTEXT                                                     Handle        = 0x80284004\n\tTBS_E_INSUFFICIENT_BUFFER                                                 Handle        = 0x80284005\n\tTBS_E_IOERROR                                                             Handle        = 0x80284006\n\tTBS_E_INVALID_CONTEXT_PARAM                                               Handle        = 0x80284007\n\tTBS_E_SERVICE_NOT_RUNNING                                                 Handle        = 0x80284008\n\tTBS_E_TOO_MANY_TBS_CONTEXTS                                               Handle        = 0x80284009\n\tTBS_E_TOO_MANY_RESOURCES                                                  Handle        = 0x8028400A\n\tTBS_E_SERVICE_START_PENDING                                               Handle        = 0x8028400B\n\tTBS_E_PPI_NOT_SUPPORTED                                                   Handle        = 0x8028400C\n\tTBS_E_COMMAND_CANCELED                                                    Handle        = 0x8028400D\n\tTBS_E_BUFFER_TOO_LARGE                                                    Handle        = 0x8028400E\n\tTBS_E_TPM_NOT_FOUND                                                       Handle        = 0x8028400F\n\tTBS_E_SERVICE_DISABLED                                                    Handle        = 0x80284010\n\tTBS_E_NO_EVENT_LOG                                                        Handle        = 0x80284011\n\tTBS_E_ACCESS_DENIED                                                       Handle        = 0x80284012\n\tTBS_E_PROVISIONING_NOT_ALLOWED                                            Handle        = 0x80284013\n\tTBS_E_PPI_FUNCTION_UNSUPPORTED                                            Handle        = 0x80284014\n\tTBS_E_OWNERAUTH_NOT_FOUND                                                 Handle        = 0x80284015\n\tTBS_E_PROVISIONING_INCOMPLETE                                             Handle        = 0x80284016\n\tTPMAPI_E_INVALID_STATE                                                    Handle        = 0x80290100\n\tTPMAPI_E_NOT_ENOUGH_DATA                                                  Handle        = 0x80290101\n\tTPMAPI_E_TOO_MUCH_DATA                                                    Handle        = 0x80290102\n\tTPMAPI_E_INVALID_OUTPUT_POINTER                                           Handle        = 0x80290103\n\tTPMAPI_E_INVALID_PARAMETER                                                Handle        = 0x80290104\n\tTPMAPI_E_OUT_OF_MEMORY                                                    Handle        = 0x80290105\n\tTPMAPI_E_BUFFER_TOO_SMALL                                                 Handle        = 0x80290106\n\tTPMAPI_E_INTERNAL_ERROR                                                   Handle        = 0x80290107\n\tTPMAPI_E_ACCESS_DENIED                                                    Handle        = 0x80290108\n\tTPMAPI_E_AUTHORIZATION_FAILED                                             Handle        = 0x80290109\n\tTPMAPI_E_INVALID_CONTEXT_HANDLE                                           Handle        = 0x8029010A\n\tTPMAPI_E_TBS_COMMUNICATION_ERROR                                          Handle        = 0x8029010B\n\tTPMAPI_E_TPM_COMMAND_ERROR                                                Handle        = 0x8029010C\n\tTPMAPI_E_MESSAGE_TOO_LARGE                                                Handle        = 0x8029010D\n\tTPMAPI_E_INVALID_ENCODING                                                 Handle        = 0x8029010E\n\tTPMAPI_E_INVALID_KEY_SIZE                                                 Handle        = 0x8029010F\n\tTPMAPI_E_ENCRYPTION_FAILED                                                Handle        = 0x80290110\n\tTPMAPI_E_INVALID_KEY_PARAMS                                               Handle        = 0x80290111\n\tTPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB                             Handle        = 0x80290112\n\tTPMAPI_E_INVALID_PCR_INDEX                                                Handle        = 0x80290113\n\tTPMAPI_E_INVALID_DELEGATE_BLOB                                            Handle        = 0x80290114\n\tTPMAPI_E_INVALID_CONTEXT_PARAMS                                           Handle        = 0x80290115\n\tTPMAPI_E_INVALID_KEY_BLOB                                                 Handle        = 0x80290116\n\tTPMAPI_E_INVALID_PCR_DATA                                                 Handle        = 0x80290117\n\tTPMAPI_E_INVALID_OWNER_AUTH                                               Handle        = 0x80290118\n\tTPMAPI_E_FIPS_RNG_CHECK_FAILED                                            Handle        = 0x80290119\n\tTPMAPI_E_EMPTY_TCG_LOG                                                    Handle        = 0x8029011A\n\tTPMAPI_E_INVALID_TCG_LOG_ENTRY                                            Handle        = 0x8029011B\n\tTPMAPI_E_TCG_SEPARATOR_ABSENT                                             Handle        = 0x8029011C\n\tTPMAPI_E_TCG_INVALID_DIGEST_ENTRY                                         Handle        = 0x8029011D\n\tTPMAPI_E_POLICY_DENIES_OPERATION                                          Handle        = 0x8029011E\n\tTPMAPI_E_NV_BITS_NOT_DEFINED                                              Handle        = 0x8029011F\n\tTPMAPI_E_NV_BITS_NOT_READY                                                Handle        = 0x80290120\n\tTPMAPI_E_SEALING_KEY_NOT_AVAILABLE                                        Handle        = 0x80290121\n\tTPMAPI_E_NO_AUTHORIZATION_CHAIN_FOUND                                     Handle        = 0x80290122\n\tTPMAPI_E_SVN_COUNTER_NOT_AVAILABLE                                        Handle        = 0x80290123\n\tTPMAPI_E_OWNER_AUTH_NOT_NULL                                              Handle        = 0x80290124\n\tTPMAPI_E_ENDORSEMENT_AUTH_NOT_NULL                                        Handle        = 0x80290125\n\tTPMAPI_E_AUTHORIZATION_REVOKED                                            Handle        = 0x80290126\n\tTPMAPI_E_MALFORMED_AUTHORIZATION_KEY                                      Handle        = 0x80290127\n\tTPMAPI_E_AUTHORIZING_KEY_NOT_SUPPORTED                                    Handle        = 0x80290128\n\tTPMAPI_E_INVALID_AUTHORIZATION_SIGNATURE                                  Handle        = 0x80290129\n\tTPMAPI_E_MALFORMED_AUTHORIZATION_POLICY                                   Handle        = 0x8029012A\n\tTPMAPI_E_MALFORMED_AUTHORIZATION_OTHER                                    Handle        = 0x8029012B\n\tTPMAPI_E_SEALING_KEY_CHANGED                                              Handle        = 0x8029012C\n\tTBSIMP_E_BUFFER_TOO_SMALL                                                 Handle        = 0x80290200\n\tTBSIMP_E_CLEANUP_FAILED                                                   Handle        = 0x80290201\n\tTBSIMP_E_INVALID_CONTEXT_HANDLE                                           Handle        = 0x80290202\n\tTBSIMP_E_INVALID_CONTEXT_PARAM                                            Handle        = 0x80290203\n\tTBSIMP_E_TPM_ERROR                                                        Handle        = 0x80290204\n\tTBSIMP_E_HASH_BAD_KEY                                                     Handle        = 0x80290205\n\tTBSIMP_E_DUPLICATE_VHANDLE                                                Handle        = 0x80290206\n\tTBSIMP_E_INVALID_OUTPUT_POINTER                                           Handle        = 0x80290207\n\tTBSIMP_E_INVALID_PARAMETER                                                Handle        = 0x80290208\n\tTBSIMP_E_RPC_INIT_FAILED                                                  Handle        = 0x80290209\n\tTBSIMP_E_SCHEDULER_NOT_RUNNING                                            Handle        = 0x8029020A\n\tTBSIMP_E_COMMAND_CANCELED                                                 Handle        = 0x8029020B\n\tTBSIMP_E_OUT_OF_MEMORY                                                    Handle        = 0x8029020C\n\tTBSIMP_E_LIST_NO_MORE_ITEMS                                               Handle        = 0x8029020D\n\tTBSIMP_E_LIST_NOT_FOUND                                                   Handle        = 0x8029020E\n\tTBSIMP_E_NOT_ENOUGH_SPACE                                                 Handle        = 0x8029020F\n\tTBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS                                          Handle        = 0x80290210\n\tTBSIMP_E_COMMAND_FAILED                                                   Handle        = 0x80290211\n\tTBSIMP_E_UNKNOWN_ORDINAL                                                  Handle        = 0x80290212\n\tTBSIMP_E_RESOURCE_EXPIRED                                                 Handle        = 0x80290213\n\tTBSIMP_E_INVALID_RESOURCE                                                 Handle        = 0x80290214\n\tTBSIMP_E_NOTHING_TO_UNLOAD                                                Handle        = 0x80290215\n\tTBSIMP_E_HASH_TABLE_FULL                                                  Handle        = 0x80290216\n\tTBSIMP_E_TOO_MANY_TBS_CONTEXTS                                            Handle        = 0x80290217\n\tTBSIMP_E_TOO_MANY_RESOURCES                                               Handle        = 0x80290218\n\tTBSIMP_E_PPI_NOT_SUPPORTED                                                Handle        = 0x80290219\n\tTBSIMP_E_TPM_INCOMPATIBLE                                                 Handle        = 0x8029021A\n\tTBSIMP_E_NO_EVENT_LOG                                                     Handle        = 0x8029021B\n\tTPM_E_PPI_ACPI_FAILURE                                                    Handle        = 0x80290300\n\tTPM_E_PPI_USER_ABORT                                                      Handle        = 0x80290301\n\tTPM_E_PPI_BIOS_FAILURE                                                    Handle        = 0x80290302\n\tTPM_E_PPI_NOT_SUPPORTED                                                   Handle        = 0x80290303\n\tTPM_E_PPI_BLOCKED_IN_BIOS                                                 Handle        = 0x80290304\n\tTPM_E_PCP_ERROR_MASK                                                      Handle        = 0x80290400\n\tTPM_E_PCP_DEVICE_NOT_READY                                                Handle        = 0x80290401\n\tTPM_E_PCP_INVALID_HANDLE                                                  Handle        = 0x80290402\n\tTPM_E_PCP_INVALID_PARAMETER                                               Handle        = 0x80290403\n\tTPM_E_PCP_FLAG_NOT_SUPPORTED                                              Handle        = 0x80290404\n\tTPM_E_PCP_NOT_SUPPORTED                                                   Handle        = 0x80290405\n\tTPM_E_PCP_BUFFER_TOO_SMALL                                                Handle        = 0x80290406\n\tTPM_E_PCP_INTERNAL_ERROR                                                  Handle        = 0x80290407\n\tTPM_E_PCP_AUTHENTICATION_FAILED                                           Handle        = 0x80290408\n\tTPM_E_PCP_AUTHENTICATION_IGNORED                                          Handle        = 0x80290409\n\tTPM_E_PCP_POLICY_NOT_FOUND                                                Handle        = 0x8029040A\n\tTPM_E_PCP_PROFILE_NOT_FOUND                                               Handle        = 0x8029040B\n\tTPM_E_PCP_VALIDATION_FAILED                                               Handle        = 0x8029040C\n\tTPM_E_PCP_WRONG_PARENT                                                    Handle        = 0x8029040E\n\tTPM_E_KEY_NOT_LOADED                                                      Handle        = 0x8029040F\n\tTPM_E_NO_KEY_CERTIFICATION                                                Handle        = 0x80290410\n\tTPM_E_KEY_NOT_FINALIZED                                                   Handle        = 0x80290411\n\tTPM_E_ATTESTATION_CHALLENGE_NOT_SET                                       Handle        = 0x80290412\n\tTPM_E_NOT_PCR_BOUND                                                       Handle        = 0x80290413\n\tTPM_E_KEY_ALREADY_FINALIZED                                               Handle        = 0x80290414\n\tTPM_E_KEY_USAGE_POLICY_NOT_SUPPORTED                                      Handle        = 0x80290415\n\tTPM_E_KEY_USAGE_POLICY_INVALID                                            Handle        = 0x80290416\n\tTPM_E_SOFT_KEY_ERROR                                                      Handle        = 0x80290417\n\tTPM_E_KEY_NOT_AUTHENTICATED                                               Handle        = 0x80290418\n\tTPM_E_PCP_KEY_NOT_AIK                                                     Handle        = 0x80290419\n\tTPM_E_KEY_NOT_SIGNING_KEY                                                 Handle        = 0x8029041A\n\tTPM_E_LOCKED_OUT                                                          Handle        = 0x8029041B\n\tTPM_E_CLAIM_TYPE_NOT_SUPPORTED                                            Handle        = 0x8029041C\n\tTPM_E_VERSION_NOT_SUPPORTED                                               Handle        = 0x8029041D\n\tTPM_E_BUFFER_LENGTH_MISMATCH                                              Handle        = 0x8029041E\n\tTPM_E_PCP_IFX_RSA_KEY_CREATION_BLOCKED                                    Handle        = 0x8029041F\n\tTPM_E_PCP_TICKET_MISSING                                                  Handle        = 0x80290420\n\tTPM_E_PCP_RAW_POLICY_NOT_SUPPORTED                                        Handle        = 0x80290421\n\tTPM_E_PCP_KEY_HANDLE_INVALIDATED                                          Handle        = 0x80290422\n\tTPM_E_PCP_UNSUPPORTED_PSS_SALT                                            Handle        = 0x40290423\n\tTPM_E_ZERO_EXHAUST_ENABLED                                                Handle        = 0x80290500\n\tPLA_E_DCS_NOT_FOUND                                                       Handle        = 0x80300002\n\tPLA_E_DCS_IN_USE                                                          Handle        = 0x803000AA\n\tPLA_E_TOO_MANY_FOLDERS                                                    Handle        = 0x80300045\n\tPLA_E_NO_MIN_DISK                                                         Handle        = 0x80300070\n\tPLA_E_DCS_ALREADY_EXISTS                                                  Handle        = 0x803000B7\n\tPLA_S_PROPERTY_IGNORED                                                    Handle        = 0x00300100\n\tPLA_E_PROPERTY_CONFLICT                                                   Handle        = 0x80300101\n\tPLA_E_DCS_SINGLETON_REQUIRED                                              Handle        = 0x80300102\n\tPLA_E_CREDENTIALS_REQUIRED                                                Handle        = 0x80300103\n\tPLA_E_DCS_NOT_RUNNING                                                     Handle        = 0x80300104\n\tPLA_E_CONFLICT_INCL_EXCL_API                                              Handle        = 0x80300105\n\tPLA_E_NETWORK_EXE_NOT_VALID                                               Handle        = 0x80300106\n\tPLA_E_EXE_ALREADY_CONFIGURED                                              Handle        = 0x80300107\n\tPLA_E_EXE_PATH_NOT_VALID                                                  Handle        = 0x80300108\n\tPLA_E_DC_ALREADY_EXISTS                                                   Handle        = 0x80300109\n\tPLA_E_DCS_START_WAIT_TIMEOUT                                              Handle        = 0x8030010A\n\tPLA_E_DC_START_WAIT_TIMEOUT                                               Handle        = 0x8030010B\n\tPLA_E_REPORT_WAIT_TIMEOUT                                                 Handle        = 0x8030010C\n\tPLA_E_NO_DUPLICATES                                                       Handle        = 0x8030010D\n\tPLA_E_EXE_FULL_PATH_REQUIRED                                              Handle        = 0x8030010E\n\tPLA_E_INVALID_SESSION_NAME                                                Handle        = 0x8030010F\n\tPLA_E_PLA_CHANNEL_NOT_ENABLED                                             Handle        = 0x80300110\n\tPLA_E_TASKSCHED_CHANNEL_NOT_ENABLED                                       Handle        = 0x80300111\n\tPLA_E_RULES_MANAGER_FAILED                                                Handle        = 0x80300112\n\tPLA_E_CABAPI_FAILURE                                                      Handle        = 0x80300113\n\tFVE_E_LOCKED_VOLUME                                                       Handle        = 0x80310000\n\tFVE_E_NOT_ENCRYPTED                                                       Handle        = 0x80310001\n\tFVE_E_NO_TPM_BIOS                                                         Handle        = 0x80310002\n\tFVE_E_NO_MBR_METRIC                                                       Handle        = 0x80310003\n\tFVE_E_NO_BOOTSECTOR_METRIC                                                Handle        = 0x80310004\n\tFVE_E_NO_BOOTMGR_METRIC                                                   Handle        = 0x80310005\n\tFVE_E_WRONG_BOOTMGR                                                       Handle        = 0x80310006\n\tFVE_E_SECURE_KEY_REQUIRED                                                 Handle        = 0x80310007\n\tFVE_E_NOT_ACTIVATED                                                       Handle        = 0x80310008\n\tFVE_E_ACTION_NOT_ALLOWED                                                  Handle        = 0x80310009\n\tFVE_E_AD_SCHEMA_NOT_INSTALLED                                             Handle        = 0x8031000A\n\tFVE_E_AD_INVALID_DATATYPE                                                 Handle        = 0x8031000B\n\tFVE_E_AD_INVALID_DATASIZE                                                 Handle        = 0x8031000C\n\tFVE_E_AD_NO_VALUES                                                        Handle        = 0x8031000D\n\tFVE_E_AD_ATTR_NOT_SET                                                     Handle        = 0x8031000E\n\tFVE_E_AD_GUID_NOT_FOUND                                                   Handle        = 0x8031000F\n\tFVE_E_BAD_INFORMATION                                                     Handle        = 0x80310010\n\tFVE_E_TOO_SMALL                                                           Handle        = 0x80310011\n\tFVE_E_SYSTEM_VOLUME                                                       Handle        = 0x80310012\n\tFVE_E_FAILED_WRONG_FS                                                     Handle        = 0x80310013\n\tFVE_E_BAD_PARTITION_SIZE                                                  Handle        = 0x80310014\n\tFVE_E_NOT_SUPPORTED                                                       Handle        = 0x80310015\n\tFVE_E_BAD_DATA                                                            Handle        = 0x80310016\n\tFVE_E_VOLUME_NOT_BOUND                                                    Handle        = 0x80310017\n\tFVE_E_TPM_NOT_OWNED                                                       Handle        = 0x80310018\n\tFVE_E_NOT_DATA_VOLUME                                                     Handle        = 0x80310019\n\tFVE_E_AD_INSUFFICIENT_BUFFER                                              Handle        = 0x8031001A\n\tFVE_E_CONV_READ                                                           Handle        = 0x8031001B\n\tFVE_E_CONV_WRITE                                                          Handle        = 0x8031001C\n\tFVE_E_KEY_REQUIRED                                                        Handle        = 0x8031001D\n\tFVE_E_CLUSTERING_NOT_SUPPORTED                                            Handle        = 0x8031001E\n\tFVE_E_VOLUME_BOUND_ALREADY                                                Handle        = 0x8031001F\n\tFVE_E_OS_NOT_PROTECTED                                                    Handle        = 0x80310020\n\tFVE_E_PROTECTION_DISABLED                                                 Handle        = 0x80310021\n\tFVE_E_RECOVERY_KEY_REQUIRED                                               Handle        = 0x80310022\n\tFVE_E_FOREIGN_VOLUME                                                      Handle        = 0x80310023\n\tFVE_E_OVERLAPPED_UPDATE                                                   Handle        = 0x80310024\n\tFVE_E_TPM_SRK_AUTH_NOT_ZERO                                               Handle        = 0x80310025\n\tFVE_E_FAILED_SECTOR_SIZE                                                  Handle        = 0x80310026\n\tFVE_E_FAILED_AUTHENTICATION                                               Handle        = 0x80310027\n\tFVE_E_NOT_OS_VOLUME                                                       Handle        = 0x80310028\n\tFVE_E_AUTOUNLOCK_ENABLED                                                  Handle        = 0x80310029\n\tFVE_E_WRONG_BOOTSECTOR                                                    Handle        = 0x8031002A\n\tFVE_E_WRONG_SYSTEM_FS                                                     Handle        = 0x8031002B\n\tFVE_E_POLICY_PASSWORD_REQUIRED                                            Handle        = 0x8031002C\n\tFVE_E_CANNOT_SET_FVEK_ENCRYPTED                                           Handle        = 0x8031002D\n\tFVE_E_CANNOT_ENCRYPT_NO_KEY                                               Handle        = 0x8031002E\n\tFVE_E_BOOTABLE_CDDVD                                                      Handle        = 0x80310030\n\tFVE_E_PROTECTOR_EXISTS                                                    Handle        = 0x80310031\n\tFVE_E_RELATIVE_PATH                                                       Handle        = 0x80310032\n\tFVE_E_PROTECTOR_NOT_FOUND                                                 Handle        = 0x80310033\n\tFVE_E_INVALID_KEY_FORMAT                                                  Handle        = 0x80310034\n\tFVE_E_INVALID_PASSWORD_FORMAT                                             Handle        = 0x80310035\n\tFVE_E_FIPS_RNG_CHECK_FAILED                                               Handle        = 0x80310036\n\tFVE_E_FIPS_PREVENTS_RECOVERY_PASSWORD                                     Handle        = 0x80310037\n\tFVE_E_FIPS_PREVENTS_EXTERNAL_KEY_EXPORT                                   Handle        = 0x80310038\n\tFVE_E_NOT_DECRYPTED                                                       Handle        = 0x80310039\n\tFVE_E_INVALID_PROTECTOR_TYPE                                              Handle        = 0x8031003A\n\tFVE_E_NO_PROTECTORS_TO_TEST                                               Handle        = 0x8031003B\n\tFVE_E_KEYFILE_NOT_FOUND                                                   Handle        = 0x8031003C\n\tFVE_E_KEYFILE_INVALID                                                     Handle        = 0x8031003D\n\tFVE_E_KEYFILE_NO_VMK                                                      Handle        = 0x8031003E\n\tFVE_E_TPM_DISABLED                                                        Handle        = 0x8031003F\n\tFVE_E_NOT_ALLOWED_IN_SAFE_MODE                                            Handle        = 0x80310040\n\tFVE_E_TPM_INVALID_PCR                                                     Handle        = 0x80310041\n\tFVE_E_TPM_NO_VMK                                                          Handle        = 0x80310042\n\tFVE_E_PIN_INVALID                                                         Handle        = 0x80310043\n\tFVE_E_AUTH_INVALID_APPLICATION                                            Handle        = 0x80310044\n\tFVE_E_AUTH_INVALID_CONFIG                                                 Handle        = 0x80310045\n\tFVE_E_FIPS_DISABLE_PROTECTION_NOT_ALLOWED                                 Handle        = 0x80310046\n\tFVE_E_FS_NOT_EXTENDED                                                     Handle        = 0x80310047\n\tFVE_E_FIRMWARE_TYPE_NOT_SUPPORTED                                         Handle        = 0x80310048\n\tFVE_E_NO_LICENSE                                                          Handle        = 0x80310049\n\tFVE_E_NOT_ON_STACK                                                        Handle        = 0x8031004A\n\tFVE_E_FS_MOUNTED                                                          Handle        = 0x8031004B\n\tFVE_E_TOKEN_NOT_IMPERSONATED                                              Handle        = 0x8031004C\n\tFVE_E_DRY_RUN_FAILED                                                      Handle        = 0x8031004D\n\tFVE_E_REBOOT_REQUIRED                                                     Handle        = 0x8031004E\n\tFVE_E_DEBUGGER_ENABLED                                                    Handle        = 0x8031004F\n\tFVE_E_RAW_ACCESS                                                          Handle        = 0x80310050\n\tFVE_E_RAW_BLOCKED                                                         Handle        = 0x80310051\n\tFVE_E_BCD_APPLICATIONS_PATH_INCORRECT                                     Handle        = 0x80310052\n\tFVE_E_NOT_ALLOWED_IN_VERSION                                              Handle        = 0x80310053\n\tFVE_E_NO_AUTOUNLOCK_MASTER_KEY                                            Handle        = 0x80310054\n\tFVE_E_MOR_FAILED                                                          Handle        = 0x80310055\n\tFVE_E_HIDDEN_VOLUME                                                       Handle        = 0x80310056\n\tFVE_E_TRANSIENT_STATE                                                     Handle        = 0x80310057\n\tFVE_E_PUBKEY_NOT_ALLOWED                                                  Handle        = 0x80310058\n\tFVE_E_VOLUME_HANDLE_OPEN                                                  Handle        = 0x80310059\n\tFVE_E_NO_FEATURE_LICENSE                                                  Handle        = 0x8031005A\n\tFVE_E_INVALID_STARTUP_OPTIONS                                             Handle        = 0x8031005B\n\tFVE_E_POLICY_RECOVERY_PASSWORD_NOT_ALLOWED                                Handle        = 0x8031005C\n\tFVE_E_POLICY_RECOVERY_PASSWORD_REQUIRED                                   Handle        = 0x8031005D\n\tFVE_E_POLICY_RECOVERY_KEY_NOT_ALLOWED                                     Handle        = 0x8031005E\n\tFVE_E_POLICY_RECOVERY_KEY_REQUIRED                                        Handle        = 0x8031005F\n\tFVE_E_POLICY_STARTUP_PIN_NOT_ALLOWED                                      Handle        = 0x80310060\n\tFVE_E_POLICY_STARTUP_PIN_REQUIRED                                         Handle        = 0x80310061\n\tFVE_E_POLICY_STARTUP_KEY_NOT_ALLOWED                                      Handle        = 0x80310062\n\tFVE_E_POLICY_STARTUP_KEY_REQUIRED                                         Handle        = 0x80310063\n\tFVE_E_POLICY_STARTUP_PIN_KEY_NOT_ALLOWED                                  Handle        = 0x80310064\n\tFVE_E_POLICY_STARTUP_PIN_KEY_REQUIRED                                     Handle        = 0x80310065\n\tFVE_E_POLICY_STARTUP_TPM_NOT_ALLOWED                                      Handle        = 0x80310066\n\tFVE_E_POLICY_STARTUP_TPM_REQUIRED                                         Handle        = 0x80310067\n\tFVE_E_POLICY_INVALID_PIN_LENGTH                                           Handle        = 0x80310068\n\tFVE_E_KEY_PROTECTOR_NOT_SUPPORTED                                         Handle        = 0x80310069\n\tFVE_E_POLICY_PASSPHRASE_NOT_ALLOWED                                       Handle        = 0x8031006A\n\tFVE_E_POLICY_PASSPHRASE_REQUIRED                                          Handle        = 0x8031006B\n\tFVE_E_FIPS_PREVENTS_PASSPHRASE                                            Handle        = 0x8031006C\n\tFVE_E_OS_VOLUME_PASSPHRASE_NOT_ALLOWED                                    Handle        = 0x8031006D\n\tFVE_E_INVALID_BITLOCKER_OID                                               Handle        = 0x8031006E\n\tFVE_E_VOLUME_TOO_SMALL                                                    Handle        = 0x8031006F\n\tFVE_E_DV_NOT_SUPPORTED_ON_FS                                              Handle        = 0x80310070\n\tFVE_E_DV_NOT_ALLOWED_BY_GP                                                Handle        = 0x80310071\n\tFVE_E_POLICY_USER_CERTIFICATE_NOT_ALLOWED                                 Handle        = 0x80310072\n\tFVE_E_POLICY_USER_CERTIFICATE_REQUIRED                                    Handle        = 0x80310073\n\tFVE_E_POLICY_USER_CERT_MUST_BE_HW                                         Handle        = 0x80310074\n\tFVE_E_POLICY_USER_CONFIGURE_FDV_AUTOUNLOCK_NOT_ALLOWED                    Handle        = 0x80310075\n\tFVE_E_POLICY_USER_CONFIGURE_RDV_AUTOUNLOCK_NOT_ALLOWED                    Handle        = 0x80310076\n\tFVE_E_POLICY_USER_CONFIGURE_RDV_NOT_ALLOWED                               Handle        = 0x80310077\n\tFVE_E_POLICY_USER_ENABLE_RDV_NOT_ALLOWED                                  Handle        = 0x80310078\n\tFVE_E_POLICY_USER_DISABLE_RDV_NOT_ALLOWED                                 Handle        = 0x80310079\n\tFVE_E_POLICY_INVALID_PASSPHRASE_LENGTH                                    Handle        = 0x80310080\n\tFVE_E_POLICY_PASSPHRASE_TOO_SIMPLE                                        Handle        = 0x80310081\n\tFVE_E_RECOVERY_PARTITION                                                  Handle        = 0x80310082\n\tFVE_E_POLICY_CONFLICT_FDV_RK_OFF_AUK_ON                                   Handle        = 0x80310083\n\tFVE_E_POLICY_CONFLICT_RDV_RK_OFF_AUK_ON                                   Handle        = 0x80310084\n\tFVE_E_NON_BITLOCKER_OID                                                   Handle        = 0x80310085\n\tFVE_E_POLICY_PROHIBITS_SELFSIGNED                                         Handle        = 0x80310086\n\tFVE_E_POLICY_CONFLICT_RO_AND_STARTUP_KEY_REQUIRED                         Handle        = 0x80310087\n\tFVE_E_CONV_RECOVERY_FAILED                                                Handle        = 0x80310088\n\tFVE_E_VIRTUALIZED_SPACE_TOO_BIG                                           Handle        = 0x80310089\n\tFVE_E_POLICY_CONFLICT_OSV_RP_OFF_ADB_ON                                   Handle        = 0x80310090\n\tFVE_E_POLICY_CONFLICT_FDV_RP_OFF_ADB_ON                                   Handle        = 0x80310091\n\tFVE_E_POLICY_CONFLICT_RDV_RP_OFF_ADB_ON                                   Handle        = 0x80310092\n\tFVE_E_NON_BITLOCKER_KU                                                    Handle        = 0x80310093\n\tFVE_E_PRIVATEKEY_AUTH_FAILED                                              Handle        = 0x80310094\n\tFVE_E_REMOVAL_OF_DRA_FAILED                                               Handle        = 0x80310095\n\tFVE_E_OPERATION_NOT_SUPPORTED_ON_VISTA_VOLUME                             Handle        = 0x80310096\n\tFVE_E_CANT_LOCK_AUTOUNLOCK_ENABLED_VOLUME                                 Handle        = 0x80310097\n\tFVE_E_FIPS_HASH_KDF_NOT_ALLOWED                                           Handle        = 0x80310098\n\tFVE_E_ENH_PIN_INVALID                                                     Handle        = 0x80310099\n\tFVE_E_INVALID_PIN_CHARS                                                   Handle        = 0x8031009A\n\tFVE_E_INVALID_DATUM_TYPE                                                  Handle        = 0x8031009B\n\tFVE_E_EFI_ONLY                                                            Handle        = 0x8031009C\n\tFVE_E_MULTIPLE_NKP_CERTS                                                  Handle        = 0x8031009D\n\tFVE_E_REMOVAL_OF_NKP_FAILED                                               Handle        = 0x8031009E\n\tFVE_E_INVALID_NKP_CERT                                                    Handle        = 0x8031009F\n\tFVE_E_NO_EXISTING_PIN                                                     Handle        = 0x803100A0\n\tFVE_E_PROTECTOR_CHANGE_PIN_MISMATCH                                       Handle        = 0x803100A1\n\tFVE_E_PIN_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED                         Handle        = 0x803100A2\n\tFVE_E_PROTECTOR_CHANGE_MAX_PIN_CHANGE_ATTEMPTS_REACHED                    Handle        = 0x803100A3\n\tFVE_E_POLICY_PASSPHRASE_REQUIRES_ASCII                                    Handle        = 0x803100A4\n\tFVE_E_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE                           Handle        = 0x803100A5\n\tFVE_E_WIPE_NOT_ALLOWED_ON_TP_STORAGE                                      Handle        = 0x803100A6\n\tFVE_E_KEY_LENGTH_NOT_SUPPORTED_BY_EDRIVE                                  Handle        = 0x803100A7\n\tFVE_E_NO_EXISTING_PASSPHRASE                                              Handle        = 0x803100A8\n\tFVE_E_PROTECTOR_CHANGE_PASSPHRASE_MISMATCH                                Handle        = 0x803100A9\n\tFVE_E_PASSPHRASE_TOO_LONG                                                 Handle        = 0x803100AA\n\tFVE_E_NO_PASSPHRASE_WITH_TPM                                              Handle        = 0x803100AB\n\tFVE_E_NO_TPM_WITH_PASSPHRASE                                              Handle        = 0x803100AC\n\tFVE_E_NOT_ALLOWED_ON_CSV_STACK                                            Handle        = 0x803100AD\n\tFVE_E_NOT_ALLOWED_ON_CLUSTER                                              Handle        = 0x803100AE\n\tFVE_E_EDRIVE_NO_FAILOVER_TO_SW                                            Handle        = 0x803100AF\n\tFVE_E_EDRIVE_BAND_IN_USE                                                  Handle        = 0x803100B0\n\tFVE_E_EDRIVE_DISALLOWED_BY_GP                                             Handle        = 0x803100B1\n\tFVE_E_EDRIVE_INCOMPATIBLE_VOLUME                                          Handle        = 0x803100B2\n\tFVE_E_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING                             Handle        = 0x803100B3\n\tFVE_E_EDRIVE_DV_NOT_SUPPORTED                                             Handle        = 0x803100B4\n\tFVE_E_NO_PREBOOT_KEYBOARD_DETECTED                                        Handle        = 0x803100B5\n\tFVE_E_NO_PREBOOT_KEYBOARD_OR_WINRE_DETECTED                               Handle        = 0x803100B6\n\tFVE_E_POLICY_REQUIRES_STARTUP_PIN_ON_TOUCH_DEVICE                         Handle        = 0x803100B7\n\tFVE_E_POLICY_REQUIRES_RECOVERY_PASSWORD_ON_TOUCH_DEVICE                   Handle        = 0x803100B8\n\tFVE_E_WIPE_CANCEL_NOT_APPLICABLE                                          Handle        = 0x803100B9\n\tFVE_E_SECUREBOOT_DISABLED                                                 Handle        = 0x803100BA\n\tFVE_E_SECUREBOOT_CONFIGURATION_INVALID                                    Handle        = 0x803100BB\n\tFVE_E_EDRIVE_DRY_RUN_FAILED                                               Handle        = 0x803100BC\n\tFVE_E_SHADOW_COPY_PRESENT                                                 Handle        = 0x803100BD\n\tFVE_E_POLICY_INVALID_ENHANCED_BCD_SETTINGS                                Handle        = 0x803100BE\n\tFVE_E_EDRIVE_INCOMPATIBLE_FIRMWARE                                        Handle        = 0x803100BF\n\tFVE_E_PROTECTOR_CHANGE_MAX_PASSPHRASE_CHANGE_ATTEMPTS_REACHED             Handle        = 0x803100C0\n\tFVE_E_PASSPHRASE_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED                  Handle        = 0x803100C1\n\tFVE_E_LIVEID_ACCOUNT_SUSPENDED                                            Handle        = 0x803100C2\n\tFVE_E_LIVEID_ACCOUNT_BLOCKED                                              Handle        = 0x803100C3\n\tFVE_E_NOT_PROVISIONED_ON_ALL_VOLUMES                                      Handle        = 0x803100C4\n\tFVE_E_DE_FIXED_DATA_NOT_SUPPORTED                                         Handle        = 0x803100C5\n\tFVE_E_DE_HARDWARE_NOT_COMPLIANT                                           Handle        = 0x803100C6\n\tFVE_E_DE_WINRE_NOT_CONFIGURED                                             Handle        = 0x803100C7\n\tFVE_E_DE_PROTECTION_SUSPENDED                                             Handle        = 0x803100C8\n\tFVE_E_DE_OS_VOLUME_NOT_PROTECTED                                          Handle        = 0x803100C9\n\tFVE_E_DE_DEVICE_LOCKEDOUT                                                 Handle        = 0x803100CA\n\tFVE_E_DE_PROTECTION_NOT_YET_ENABLED                                       Handle        = 0x803100CB\n\tFVE_E_INVALID_PIN_CHARS_DETAILED                                          Handle        = 0x803100CC\n\tFVE_E_DEVICE_LOCKOUT_COUNTER_UNAVAILABLE                                  Handle        = 0x803100CD\n\tFVE_E_DEVICELOCKOUT_COUNTER_MISMATCH                                      Handle        = 0x803100CE\n\tFVE_E_BUFFER_TOO_LARGE                                                    Handle        = 0x803100CF\n\tFVE_E_NO_SUCH_CAPABILITY_ON_TARGET                                        Handle        = 0x803100D0\n\tFVE_E_DE_PREVENTED_FOR_OS                                                 Handle        = 0x803100D1\n\tFVE_E_DE_VOLUME_OPTED_OUT                                                 Handle        = 0x803100D2\n\tFVE_E_DE_VOLUME_NOT_SUPPORTED                                             Handle        = 0x803100D3\n\tFVE_E_EOW_NOT_SUPPORTED_IN_VERSION                                        Handle        = 0x803100D4\n\tFVE_E_ADBACKUP_NOT_ENABLED                                                Handle        = 0x803100D5\n\tFVE_E_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT                                  Handle        = 0x803100D6\n\tFVE_E_NOT_DE_VOLUME                                                       Handle        = 0x803100D7\n\tFVE_E_PROTECTION_CANNOT_BE_DISABLED                                       Handle        = 0x803100D8\n\tFVE_E_OSV_KSR_NOT_ALLOWED                                                 Handle        = 0x803100D9\n\tFVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_OS_DRIVE                          Handle        = 0x803100DA\n\tFVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_FIXED_DRIVE                       Handle        = 0x803100DB\n\tFVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_REMOVABLE_DRIVE                   Handle        = 0x803100DC\n\tFVE_E_KEY_ROTATION_NOT_SUPPORTED                                          Handle        = 0x803100DD\n\tFVE_E_EXECUTE_REQUEST_SENT_TOO_SOON                                       Handle        = 0x803100DE\n\tFVE_E_KEY_ROTATION_NOT_ENABLED                                            Handle        = 0x803100DF\n\tFVE_E_DEVICE_NOT_JOINED                                                   Handle        = 0x803100E0\n\tFWP_E_CALLOUT_NOT_FOUND                                                   Handle        = 0x80320001\n\tFWP_E_CONDITION_NOT_FOUND                                                 Handle        = 0x80320002\n\tFWP_E_FILTER_NOT_FOUND                                                    Handle        = 0x80320003\n\tFWP_E_LAYER_NOT_FOUND                                                     Handle        = 0x80320004\n\tFWP_E_PROVIDER_NOT_FOUND                                                  Handle        = 0x80320005\n\tFWP_E_PROVIDER_CONTEXT_NOT_FOUND                                          Handle        = 0x80320006\n\tFWP_E_SUBLAYER_NOT_FOUND                                                  Handle        = 0x80320007\n\tFWP_E_NOT_FOUND                                                           Handle        = 0x80320008\n\tFWP_E_ALREADY_EXISTS                                                      Handle        = 0x80320009\n\tFWP_E_IN_USE                                                              Handle        = 0x8032000A\n\tFWP_E_DYNAMIC_SESSION_IN_PROGRESS                                         Handle        = 0x8032000B\n\tFWP_E_WRONG_SESSION                                                       Handle        = 0x8032000C\n\tFWP_E_NO_TXN_IN_PROGRESS                                                  Handle        = 0x8032000D\n\tFWP_E_TXN_IN_PROGRESS                                                     Handle        = 0x8032000E\n\tFWP_E_TXN_ABORTED                                                         Handle        = 0x8032000F\n\tFWP_E_SESSION_ABORTED                                                     Handle        = 0x80320010\n\tFWP_E_INCOMPATIBLE_TXN                                                    Handle        = 0x80320011\n\tFWP_E_TIMEOUT                                                             Handle        = 0x80320012\n\tFWP_E_NET_EVENTS_DISABLED                                                 Handle        = 0x80320013\n\tFWP_E_INCOMPATIBLE_LAYER                                                  Handle        = 0x80320014\n\tFWP_E_KM_CLIENTS_ONLY                                                     Handle        = 0x80320015\n\tFWP_E_LIFETIME_MISMATCH                                                   Handle        = 0x80320016\n\tFWP_E_BUILTIN_OBJECT                                                      Handle        = 0x80320017\n\tFWP_E_TOO_MANY_CALLOUTS                                                   Handle        = 0x80320018\n\tFWP_E_NOTIFICATION_DROPPED                                                Handle        = 0x80320019\n\tFWP_E_TRAFFIC_MISMATCH                                                    Handle        = 0x8032001A\n\tFWP_E_INCOMPATIBLE_SA_STATE                                               Handle        = 0x8032001B\n\tFWP_E_NULL_POINTER                                                        Handle        = 0x8032001C\n\tFWP_E_INVALID_ENUMERATOR                                                  Handle        = 0x8032001D\n\tFWP_E_INVALID_FLAGS                                                       Handle        = 0x8032001E\n\tFWP_E_INVALID_NET_MASK                                                    Handle        = 0x8032001F\n\tFWP_E_INVALID_RANGE                                                       Handle        = 0x80320020\n\tFWP_E_INVALID_INTERVAL                                                    Handle        = 0x80320021\n\tFWP_E_ZERO_LENGTH_ARRAY                                                   Handle        = 0x80320022\n\tFWP_E_NULL_DISPLAY_NAME                                                   Handle        = 0x80320023\n\tFWP_E_INVALID_ACTION_TYPE                                                 Handle        = 0x80320024\n\tFWP_E_INVALID_WEIGHT                                                      Handle        = 0x80320025\n\tFWP_E_MATCH_TYPE_MISMATCH                                                 Handle        = 0x80320026\n\tFWP_E_TYPE_MISMATCH                                                       Handle        = 0x80320027\n\tFWP_E_OUT_OF_BOUNDS                                                       Handle        = 0x80320028\n\tFWP_E_RESERVED                                                            Handle        = 0x80320029\n\tFWP_E_DUPLICATE_CONDITION                                                 Handle        = 0x8032002A\n\tFWP_E_DUPLICATE_KEYMOD                                                    Handle        = 0x8032002B\n\tFWP_E_ACTION_INCOMPATIBLE_WITH_LAYER                                      Handle        = 0x8032002C\n\tFWP_E_ACTION_INCOMPATIBLE_WITH_SUBLAYER                                   Handle        = 0x8032002D\n\tFWP_E_CONTEXT_INCOMPATIBLE_WITH_LAYER                                     Handle        = 0x8032002E\n\tFWP_E_CONTEXT_INCOMPATIBLE_WITH_CALLOUT                                   Handle        = 0x8032002F\n\tFWP_E_INCOMPATIBLE_AUTH_METHOD                                            Handle        = 0x80320030\n\tFWP_E_INCOMPATIBLE_DH_GROUP                                               Handle        = 0x80320031\n\tFWP_E_EM_NOT_SUPPORTED                                                    Handle        = 0x80320032\n\tFWP_E_NEVER_MATCH                                                         Handle        = 0x80320033\n\tFWP_E_PROVIDER_CONTEXT_MISMATCH                                           Handle        = 0x80320034\n\tFWP_E_INVALID_PARAMETER                                                   Handle        = 0x80320035\n\tFWP_E_TOO_MANY_SUBLAYERS                                                  Handle        = 0x80320036\n\tFWP_E_CALLOUT_NOTIFICATION_FAILED                                         Handle        = 0x80320037\n\tFWP_E_INVALID_AUTH_TRANSFORM                                              Handle        = 0x80320038\n\tFWP_E_INVALID_CIPHER_TRANSFORM                                            Handle        = 0x80320039\n\tFWP_E_INCOMPATIBLE_CIPHER_TRANSFORM                                       Handle        = 0x8032003A\n\tFWP_E_INVALID_TRANSFORM_COMBINATION                                       Handle        = 0x8032003B\n\tFWP_E_DUPLICATE_AUTH_METHOD                                               Handle        = 0x8032003C\n\tFWP_E_INVALID_TUNNEL_ENDPOINT                                             Handle        = 0x8032003D\n\tFWP_E_L2_DRIVER_NOT_READY                                                 Handle        = 0x8032003E\n\tFWP_E_KEY_DICTATOR_ALREADY_REGISTERED                                     Handle        = 0x8032003F\n\tFWP_E_KEY_DICTATION_INVALID_KEYING_MATERIAL                               Handle        = 0x80320040\n\tFWP_E_CONNECTIONS_DISABLED                                                Handle        = 0x80320041\n\tFWP_E_INVALID_DNS_NAME                                                    Handle        = 0x80320042\n\tFWP_E_STILL_ON                                                            Handle        = 0x80320043\n\tFWP_E_IKEEXT_NOT_RUNNING                                                  Handle        = 0x80320044\n\tFWP_E_DROP_NOICMP                                                         Handle        = 0x80320104\n\tWS_S_ASYNC                                                                Handle        = 0x003D0000\n\tWS_S_END                                                                  Handle        = 0x003D0001\n\tWS_E_INVALID_FORMAT                                                       Handle        = 0x803D0000\n\tWS_E_OBJECT_FAULTED                                                       Handle        = 0x803D0001\n\tWS_E_NUMERIC_OVERFLOW                                                     Handle        = 0x803D0002\n\tWS_E_INVALID_OPERATION                                                    Handle        = 0x803D0003\n\tWS_E_OPERATION_ABORTED                                                    Handle        = 0x803D0004\n\tWS_E_ENDPOINT_ACCESS_DENIED                                               Handle        = 0x803D0005\n\tWS_E_OPERATION_TIMED_OUT                                                  Handle        = 0x803D0006\n\tWS_E_OPERATION_ABANDONED                                                  Handle        = 0x803D0007\n\tWS_E_QUOTA_EXCEEDED                                                       Handle        = 0x803D0008\n\tWS_E_NO_TRANSLATION_AVAILABLE                                             Handle        = 0x803D0009\n\tWS_E_SECURITY_VERIFICATION_FAILURE                                        Handle        = 0x803D000A\n\tWS_E_ADDRESS_IN_USE                                                       Handle        = 0x803D000B\n\tWS_E_ADDRESS_NOT_AVAILABLE                                                Handle        = 0x803D000C\n\tWS_E_ENDPOINT_NOT_FOUND                                                   Handle        = 0x803D000D\n\tWS_E_ENDPOINT_NOT_AVAILABLE                                               Handle        = 0x803D000E\n\tWS_E_ENDPOINT_FAILURE                                                     Handle        = 0x803D000F\n\tWS_E_ENDPOINT_UNREACHABLE                                                 Handle        = 0x803D0010\n\tWS_E_ENDPOINT_ACTION_NOT_SUPPORTED                                        Handle        = 0x803D0011\n\tWS_E_ENDPOINT_TOO_BUSY                                                    Handle        = 0x803D0012\n\tWS_E_ENDPOINT_FAULT_RECEIVED                                              Handle        = 0x803D0013\n\tWS_E_ENDPOINT_DISCONNECTED                                                Handle        = 0x803D0014\n\tWS_E_PROXY_FAILURE                                                        Handle        = 0x803D0015\n\tWS_E_PROXY_ACCESS_DENIED                                                  Handle        = 0x803D0016\n\tWS_E_NOT_SUPPORTED                                                        Handle        = 0x803D0017\n\tWS_E_PROXY_REQUIRES_BASIC_AUTH                                            Handle        = 0x803D0018\n\tWS_E_PROXY_REQUIRES_DIGEST_AUTH                                           Handle        = 0x803D0019\n\tWS_E_PROXY_REQUIRES_NTLM_AUTH                                             Handle        = 0x803D001A\n\tWS_E_PROXY_REQUIRES_NEGOTIATE_AUTH                                        Handle        = 0x803D001B\n\tWS_E_SERVER_REQUIRES_BASIC_AUTH                                           Handle        = 0x803D001C\n\tWS_E_SERVER_REQUIRES_DIGEST_AUTH                                          Handle        = 0x803D001D\n\tWS_E_SERVER_REQUIRES_NTLM_AUTH                                            Handle        = 0x803D001E\n\tWS_E_SERVER_REQUIRES_NEGOTIATE_AUTH                                       Handle        = 0x803D001F\n\tWS_E_INVALID_ENDPOINT_URL                                                 Handle        = 0x803D0020\n\tWS_E_OTHER                                                                Handle        = 0x803D0021\n\tWS_E_SECURITY_TOKEN_EXPIRED                                               Handle        = 0x803D0022\n\tWS_E_SECURITY_SYSTEM_FAILURE                                              Handle        = 0x803D0023\n\tERROR_NDIS_INTERFACE_CLOSING                                              syscall.Errno = 0x80340002\n\tERROR_NDIS_BAD_VERSION                                                    syscall.Errno = 0x80340004\n\tERROR_NDIS_BAD_CHARACTERISTICS                                            syscall.Errno = 0x80340005\n\tERROR_NDIS_ADAPTER_NOT_FOUND                                              syscall.Errno = 0x80340006\n\tERROR_NDIS_OPEN_FAILED                                                    syscall.Errno = 0x80340007\n\tERROR_NDIS_DEVICE_FAILED                                                  syscall.Errno = 0x80340008\n\tERROR_NDIS_MULTICAST_FULL                                                 syscall.Errno = 0x80340009\n\tERROR_NDIS_MULTICAST_EXISTS                                               syscall.Errno = 0x8034000A\n\tERROR_NDIS_MULTICAST_NOT_FOUND                                            syscall.Errno = 0x8034000B\n\tERROR_NDIS_REQUEST_ABORTED                                                syscall.Errno = 0x8034000C\n\tERROR_NDIS_RESET_IN_PROGRESS                                              syscall.Errno = 0x8034000D\n\tERROR_NDIS_NOT_SUPPORTED                                                  syscall.Errno = 0x803400BB\n\tERROR_NDIS_INVALID_PACKET                                                 syscall.Errno = 0x8034000F\n\tERROR_NDIS_ADAPTER_NOT_READY                                              syscall.Errno = 0x80340011\n\tERROR_NDIS_INVALID_LENGTH                                                 syscall.Errno = 0x80340014\n\tERROR_NDIS_INVALID_DATA                                                   syscall.Errno = 0x80340015\n\tERROR_NDIS_BUFFER_TOO_SHORT                                               syscall.Errno = 0x80340016\n\tERROR_NDIS_INVALID_OID                                                    syscall.Errno = 0x80340017\n\tERROR_NDIS_ADAPTER_REMOVED                                                syscall.Errno = 0x80340018\n\tERROR_NDIS_UNSUPPORTED_MEDIA                                              syscall.Errno = 0x80340019\n\tERROR_NDIS_GROUP_ADDRESS_IN_USE                                           syscall.Errno = 0x8034001A\n\tERROR_NDIS_FILE_NOT_FOUND                                                 syscall.Errno = 0x8034001B\n\tERROR_NDIS_ERROR_READING_FILE                                             syscall.Errno = 0x8034001C\n\tERROR_NDIS_ALREADY_MAPPED                                                 syscall.Errno = 0x8034001D\n\tERROR_NDIS_RESOURCE_CONFLICT                                              syscall.Errno = 0x8034001E\n\tERROR_NDIS_MEDIA_DISCONNECTED                                             syscall.Errno = 0x8034001F\n\tERROR_NDIS_INVALID_ADDRESS                                                syscall.Errno = 0x80340022\n\tERROR_NDIS_INVALID_DEVICE_REQUEST                                         syscall.Errno = 0x80340010\n\tERROR_NDIS_PAUSED                                                         syscall.Errno = 0x8034002A\n\tERROR_NDIS_INTERFACE_NOT_FOUND                                            syscall.Errno = 0x8034002B\n\tERROR_NDIS_UNSUPPORTED_REVISION                                           syscall.Errno = 0x8034002C\n\tERROR_NDIS_INVALID_PORT                                                   syscall.Errno = 0x8034002D\n\tERROR_NDIS_INVALID_PORT_STATE                                             syscall.Errno = 0x8034002E\n\tERROR_NDIS_LOW_POWER_STATE                                                syscall.Errno = 0x8034002F\n\tERROR_NDIS_REINIT_REQUIRED                                                syscall.Errno = 0x80340030\n\tERROR_NDIS_NO_QUEUES                                                      syscall.Errno = 0x80340031\n\tERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED                                      syscall.Errno = 0x80342000\n\tERROR_NDIS_DOT11_MEDIA_IN_USE                                             syscall.Errno = 0x80342001\n\tERROR_NDIS_DOT11_POWER_STATE_INVALID                                      syscall.Errno = 0x80342002\n\tERROR_NDIS_PM_WOL_PATTERN_LIST_FULL                                       syscall.Errno = 0x80342003\n\tERROR_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL                                  syscall.Errno = 0x80342004\n\tERROR_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE                       syscall.Errno = 0x80342005\n\tERROR_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE                          syscall.Errno = 0x80342006\n\tERROR_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED                                   syscall.Errno = 0x80342007\n\tERROR_NDIS_DOT11_AP_BAND_NOT_ALLOWED                                      syscall.Errno = 0x80342008\n\tERROR_NDIS_INDICATION_REQUIRED                                            syscall.Errno = 0x00340001\n\tERROR_NDIS_OFFLOAD_POLICY                                                 syscall.Errno = 0xC034100F\n\tERROR_NDIS_OFFLOAD_CONNECTION_REJECTED                                    syscall.Errno = 0xC0341012\n\tERROR_NDIS_OFFLOAD_PATH_REJECTED                                          syscall.Errno = 0xC0341013\n\tERROR_HV_INVALID_HYPERCALL_CODE                                           syscall.Errno = 0xC0350002\n\tERROR_HV_INVALID_HYPERCALL_INPUT                                          syscall.Errno = 0xC0350003\n\tERROR_HV_INVALID_ALIGNMENT                                                syscall.Errno = 0xC0350004\n\tERROR_HV_INVALID_PARAMETER                                                syscall.Errno = 0xC0350005\n\tERROR_HV_ACCESS_DENIED                                                    syscall.Errno = 0xC0350006\n\tERROR_HV_INVALID_PARTITION_STATE                                          syscall.Errno = 0xC0350007\n\tERROR_HV_OPERATION_DENIED                                                 syscall.Errno = 0xC0350008\n\tERROR_HV_UNKNOWN_PROPERTY                                                 syscall.Errno = 0xC0350009\n\tERROR_HV_PROPERTY_VALUE_OUT_OF_RANGE                                      syscall.Errno = 0xC035000A\n\tERROR_HV_INSUFFICIENT_MEMORY                                              syscall.Errno = 0xC035000B\n\tERROR_HV_PARTITION_TOO_DEEP                                               syscall.Errno = 0xC035000C\n\tERROR_HV_INVALID_PARTITION_ID                                             syscall.Errno = 0xC035000D\n\tERROR_HV_INVALID_VP_INDEX                                                 syscall.Errno = 0xC035000E\n\tERROR_HV_INVALID_PORT_ID                                                  syscall.Errno = 0xC0350011\n\tERROR_HV_INVALID_CONNECTION_ID                                            syscall.Errno = 0xC0350012\n\tERROR_HV_INSUFFICIENT_BUFFERS                                             syscall.Errno = 0xC0350013\n\tERROR_HV_NOT_ACKNOWLEDGED                                                 syscall.Errno = 0xC0350014\n\tERROR_HV_INVALID_VP_STATE                                                 syscall.Errno = 0xC0350015\n\tERROR_HV_ACKNOWLEDGED                                                     syscall.Errno = 0xC0350016\n\tERROR_HV_INVALID_SAVE_RESTORE_STATE                                       syscall.Errno = 0xC0350017\n\tERROR_HV_INVALID_SYNIC_STATE                                              syscall.Errno = 0xC0350018\n\tERROR_HV_OBJECT_IN_USE                                                    syscall.Errno = 0xC0350019\n\tERROR_HV_INVALID_PROXIMITY_DOMAIN_INFO                                    syscall.Errno = 0xC035001A\n\tERROR_HV_NO_DATA                                                          syscall.Errno = 0xC035001B\n\tERROR_HV_INACTIVE                                                         syscall.Errno = 0xC035001C\n\tERROR_HV_NO_RESOURCES                                                     syscall.Errno = 0xC035001D\n\tERROR_HV_FEATURE_UNAVAILABLE                                              syscall.Errno = 0xC035001E\n\tERROR_HV_INSUFFICIENT_BUFFER                                              syscall.Errno = 0xC0350033\n\tERROR_HV_INSUFFICIENT_DEVICE_DOMAINS                                      syscall.Errno = 0xC0350038\n\tERROR_HV_CPUID_FEATURE_VALIDATION                                         syscall.Errno = 0xC035003C\n\tERROR_HV_CPUID_XSAVE_FEATURE_VALIDATION                                   syscall.Errno = 0xC035003D\n\tERROR_HV_PROCESSOR_STARTUP_TIMEOUT                                        syscall.Errno = 0xC035003E\n\tERROR_HV_SMX_ENABLED                                                      syscall.Errno = 0xC035003F\n\tERROR_HV_INVALID_LP_INDEX                                                 syscall.Errno = 0xC0350041\n\tERROR_HV_INVALID_REGISTER_VALUE                                           syscall.Errno = 0xC0350050\n\tERROR_HV_INVALID_VTL_STATE                                                syscall.Errno = 0xC0350051\n\tERROR_HV_NX_NOT_DETECTED                                                  syscall.Errno = 0xC0350055\n\tERROR_HV_INVALID_DEVICE_ID                                                syscall.Errno = 0xC0350057\n\tERROR_HV_INVALID_DEVICE_STATE                                             syscall.Errno = 0xC0350058\n\tERROR_HV_PENDING_PAGE_REQUESTS                                            syscall.Errno = 0x00350059\n\tERROR_HV_PAGE_REQUEST_INVALID                                             syscall.Errno = 0xC0350060\n\tERROR_HV_INVALID_CPU_GROUP_ID                                             syscall.Errno = 0xC035006F\n\tERROR_HV_INVALID_CPU_GROUP_STATE                                          syscall.Errno = 0xC0350070\n\tERROR_HV_OPERATION_FAILED                                                 syscall.Errno = 0xC0350071\n\tERROR_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE                              syscall.Errno = 0xC0350072\n\tERROR_HV_INSUFFICIENT_ROOT_MEMORY                                         syscall.Errno = 0xC0350073\n\tERROR_HV_NOT_PRESENT                                                      syscall.Errno = 0xC0351000\n\tERROR_VID_DUPLICATE_HANDLER                                               syscall.Errno = 0xC0370001\n\tERROR_VID_TOO_MANY_HANDLERS                                               syscall.Errno = 0xC0370002\n\tERROR_VID_QUEUE_FULL                                                      syscall.Errno = 0xC0370003\n\tERROR_VID_HANDLER_NOT_PRESENT                                             syscall.Errno = 0xC0370004\n\tERROR_VID_INVALID_OBJECT_NAME                                             syscall.Errno = 0xC0370005\n\tERROR_VID_PARTITION_NAME_TOO_LONG                                         syscall.Errno = 0xC0370006\n\tERROR_VID_MESSAGE_QUEUE_NAME_TOO_LONG                                     syscall.Errno = 0xC0370007\n\tERROR_VID_PARTITION_ALREADY_EXISTS                                        syscall.Errno = 0xC0370008\n\tERROR_VID_PARTITION_DOES_NOT_EXIST                                        syscall.Errno = 0xC0370009\n\tERROR_VID_PARTITION_NAME_NOT_FOUND                                        syscall.Errno = 0xC037000A\n\tERROR_VID_MESSAGE_QUEUE_ALREADY_EXISTS                                    syscall.Errno = 0xC037000B\n\tERROR_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT                                    syscall.Errno = 0xC037000C\n\tERROR_VID_MB_STILL_REFERENCED                                             syscall.Errno = 0xC037000D\n\tERROR_VID_CHILD_GPA_PAGE_SET_CORRUPTED                                    syscall.Errno = 0xC037000E\n\tERROR_VID_INVALID_NUMA_SETTINGS                                           syscall.Errno = 0xC037000F\n\tERROR_VID_INVALID_NUMA_NODE_INDEX                                         syscall.Errno = 0xC0370010\n\tERROR_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED                           syscall.Errno = 0xC0370011\n\tERROR_VID_INVALID_MEMORY_BLOCK_HANDLE                                     syscall.Errno = 0xC0370012\n\tERROR_VID_PAGE_RANGE_OVERFLOW                                             syscall.Errno = 0xC0370013\n\tERROR_VID_INVALID_MESSAGE_QUEUE_HANDLE                                    syscall.Errno = 0xC0370014\n\tERROR_VID_INVALID_GPA_RANGE_HANDLE                                        syscall.Errno = 0xC0370015\n\tERROR_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE                              syscall.Errno = 0xC0370016\n\tERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED                                syscall.Errno = 0xC0370017\n\tERROR_VID_INVALID_PPM_HANDLE                                              syscall.Errno = 0xC0370018\n\tERROR_VID_MBPS_ARE_LOCKED                                                 syscall.Errno = 0xC0370019\n\tERROR_VID_MESSAGE_QUEUE_CLOSED                                            syscall.Errno = 0xC037001A\n\tERROR_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED                                syscall.Errno = 0xC037001B\n\tERROR_VID_STOP_PENDING                                                    syscall.Errno = 0xC037001C\n\tERROR_VID_INVALID_PROCESSOR_STATE                                         syscall.Errno = 0xC037001D\n\tERROR_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT                                 syscall.Errno = 0xC037001E\n\tERROR_VID_KM_INTERFACE_ALREADY_INITIALIZED                                syscall.Errno = 0xC037001F\n\tERROR_VID_MB_PROPERTY_ALREADY_SET_RESET                                   syscall.Errno = 0xC0370020\n\tERROR_VID_MMIO_RANGE_DESTROYED                                            syscall.Errno = 0xC0370021\n\tERROR_VID_INVALID_CHILD_GPA_PAGE_SET                                      syscall.Errno = 0xC0370022\n\tERROR_VID_RESERVE_PAGE_SET_IS_BEING_USED                                  syscall.Errno = 0xC0370023\n\tERROR_VID_RESERVE_PAGE_SET_TOO_SMALL                                      syscall.Errno = 0xC0370024\n\tERROR_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE                          syscall.Errno = 0xC0370025\n\tERROR_VID_MBP_COUNT_EXCEEDED_LIMIT                                        syscall.Errno = 0xC0370026\n\tERROR_VID_SAVED_STATE_CORRUPT                                             syscall.Errno = 0xC0370027\n\tERROR_VID_SAVED_STATE_UNRECOGNIZED_ITEM                                   syscall.Errno = 0xC0370028\n\tERROR_VID_SAVED_STATE_INCOMPATIBLE                                        syscall.Errno = 0xC0370029\n\tERROR_VID_VTL_ACCESS_DENIED                                               syscall.Errno = 0xC037002A\n\tERROR_VMCOMPUTE_TERMINATED_DURING_START                                   syscall.Errno = 0xC0370100\n\tERROR_VMCOMPUTE_IMAGE_MISMATCH                                            syscall.Errno = 0xC0370101\n\tERROR_VMCOMPUTE_HYPERV_NOT_INSTALLED                                      syscall.Errno = 0xC0370102\n\tERROR_VMCOMPUTE_OPERATION_PENDING                                         syscall.Errno = 0xC0370103\n\tERROR_VMCOMPUTE_TOO_MANY_NOTIFICATIONS                                    syscall.Errno = 0xC0370104\n\tERROR_VMCOMPUTE_INVALID_STATE                                             syscall.Errno = 0xC0370105\n\tERROR_VMCOMPUTE_UNEXPECTED_EXIT                                           syscall.Errno = 0xC0370106\n\tERROR_VMCOMPUTE_TERMINATED                                                syscall.Errno = 0xC0370107\n\tERROR_VMCOMPUTE_CONNECT_FAILED                                            syscall.Errno = 0xC0370108\n\tERROR_VMCOMPUTE_TIMEOUT                                                   syscall.Errno = 0xC0370109\n\tERROR_VMCOMPUTE_CONNECTION_CLOSED                                         syscall.Errno = 0xC037010A\n\tERROR_VMCOMPUTE_UNKNOWN_MESSAGE                                           syscall.Errno = 0xC037010B\n\tERROR_VMCOMPUTE_UNSUPPORTED_PROTOCOL_VERSION                              syscall.Errno = 0xC037010C\n\tERROR_VMCOMPUTE_INVALID_JSON                                              syscall.Errno = 0xC037010D\n\tERROR_VMCOMPUTE_SYSTEM_NOT_FOUND                                          syscall.Errno = 0xC037010E\n\tERROR_VMCOMPUTE_SYSTEM_ALREADY_EXISTS                                     syscall.Errno = 0xC037010F\n\tERROR_VMCOMPUTE_SYSTEM_ALREADY_STOPPED                                    syscall.Errno = 0xC0370110\n\tERROR_VMCOMPUTE_PROTOCOL_ERROR                                            syscall.Errno = 0xC0370111\n\tERROR_VMCOMPUTE_INVALID_LAYER                                             syscall.Errno = 0xC0370112\n\tERROR_VMCOMPUTE_WINDOWS_INSIDER_REQUIRED                                  syscall.Errno = 0xC0370113\n\tHCS_E_TERMINATED_DURING_START                                             Handle        = 0x80370100\n\tHCS_E_IMAGE_MISMATCH                                                      Handle        = 0x80370101\n\tHCS_E_HYPERV_NOT_INSTALLED                                                Handle        = 0x80370102\n\tHCS_E_INVALID_STATE                                                       Handle        = 0x80370105\n\tHCS_E_UNEXPECTED_EXIT                                                     Handle        = 0x80370106\n\tHCS_E_TERMINATED                                                          Handle        = 0x80370107\n\tHCS_E_CONNECT_FAILED                                                      Handle        = 0x80370108\n\tHCS_E_CONNECTION_TIMEOUT                                                  Handle        = 0x80370109\n\tHCS_E_CONNECTION_CLOSED                                                   Handle        = 0x8037010A\n\tHCS_E_UNKNOWN_MESSAGE                                                     Handle        = 0x8037010B\n\tHCS_E_UNSUPPORTED_PROTOCOL_VERSION                                        Handle        = 0x8037010C\n\tHCS_E_INVALID_JSON                                                        Handle        = 0x8037010D\n\tHCS_E_SYSTEM_NOT_FOUND                                                    Handle        = 0x8037010E\n\tHCS_E_SYSTEM_ALREADY_EXISTS                                               Handle        = 0x8037010F\n\tHCS_E_SYSTEM_ALREADY_STOPPED                                              Handle        = 0x80370110\n\tHCS_E_PROTOCOL_ERROR                                                      Handle        = 0x80370111\n\tHCS_E_INVALID_LAYER                                                       Handle        = 0x80370112\n\tHCS_E_WINDOWS_INSIDER_REQUIRED                                            Handle        = 0x80370113\n\tHCS_E_SERVICE_NOT_AVAILABLE                                               Handle        = 0x80370114\n\tHCS_E_OPERATION_NOT_STARTED                                               Handle        = 0x80370115\n\tHCS_E_OPERATION_ALREADY_STARTED                                           Handle        = 0x80370116\n\tHCS_E_OPERATION_PENDING                                                   Handle        = 0x80370117\n\tHCS_E_OPERATION_TIMEOUT                                                   Handle        = 0x80370118\n\tHCS_E_OPERATION_SYSTEM_CALLBACK_ALREADY_SET                               Handle        = 0x80370119\n\tHCS_E_OPERATION_RESULT_ALLOCATION_FAILED                                  Handle        = 0x8037011A\n\tHCS_E_ACCESS_DENIED                                                       Handle        = 0x8037011B\n\tHCS_E_GUEST_CRITICAL_ERROR                                                Handle        = 0x8037011C\n\tERROR_VNET_VIRTUAL_SWITCH_NAME_NOT_FOUND                                  syscall.Errno = 0xC0370200\n\tERROR_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED                               syscall.Errno = 0x80370001\n\tWHV_E_UNKNOWN_CAPABILITY                                                  Handle        = 0x80370300\n\tWHV_E_INSUFFICIENT_BUFFER                                                 Handle        = 0x80370301\n\tWHV_E_UNKNOWN_PROPERTY                                                    Handle        = 0x80370302\n\tWHV_E_UNSUPPORTED_HYPERVISOR_CONFIG                                       Handle        = 0x80370303\n\tWHV_E_INVALID_PARTITION_CONFIG                                            Handle        = 0x80370304\n\tWHV_E_GPA_RANGE_NOT_FOUND                                                 Handle        = 0x80370305\n\tWHV_E_VP_ALREADY_EXISTS                                                   Handle        = 0x80370306\n\tWHV_E_VP_DOES_NOT_EXIST                                                   Handle        = 0x80370307\n\tWHV_E_INVALID_VP_STATE                                                    Handle        = 0x80370308\n\tWHV_E_INVALID_VP_REGISTER_NAME                                            Handle        = 0x80370309\n\tERROR_VSMB_SAVED_STATE_FILE_NOT_FOUND                                     syscall.Errno = 0xC0370400\n\tERROR_VSMB_SAVED_STATE_CORRUPT                                            syscall.Errno = 0xC0370401\n\tERROR_VOLMGR_INCOMPLETE_REGENERATION                                      syscall.Errno = 0x80380001\n\tERROR_VOLMGR_INCOMPLETE_DISK_MIGRATION                                    syscall.Errno = 0x80380002\n\tERROR_VOLMGR_DATABASE_FULL                                                syscall.Errno = 0xC0380001\n\tERROR_VOLMGR_DISK_CONFIGURATION_CORRUPTED                                 syscall.Errno = 0xC0380002\n\tERROR_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC                               syscall.Errno = 0xC0380003\n\tERROR_VOLMGR_PACK_CONFIG_UPDATE_FAILED                                    syscall.Errno = 0xC0380004\n\tERROR_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME                              syscall.Errno = 0xC0380005\n\tERROR_VOLMGR_DISK_DUPLICATE                                               syscall.Errno = 0xC0380006\n\tERROR_VOLMGR_DISK_DYNAMIC                                                 syscall.Errno = 0xC0380007\n\tERROR_VOLMGR_DISK_ID_INVALID                                              syscall.Errno = 0xC0380008\n\tERROR_VOLMGR_DISK_INVALID                                                 syscall.Errno = 0xC0380009\n\tERROR_VOLMGR_DISK_LAST_VOTER                                              syscall.Errno = 0xC038000A\n\tERROR_VOLMGR_DISK_LAYOUT_INVALID                                          syscall.Errno = 0xC038000B\n\tERROR_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS               syscall.Errno = 0xC038000C\n\tERROR_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED                             syscall.Errno = 0xC038000D\n\tERROR_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL                             syscall.Errno = 0xC038000E\n\tERROR_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS               syscall.Errno = 0xC038000F\n\tERROR_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS                              syscall.Errno = 0xC0380010\n\tERROR_VOLMGR_DISK_MISSING                                                 syscall.Errno = 0xC0380011\n\tERROR_VOLMGR_DISK_NOT_EMPTY                                               syscall.Errno = 0xC0380012\n\tERROR_VOLMGR_DISK_NOT_ENOUGH_SPACE                                        syscall.Errno = 0xC0380013\n\tERROR_VOLMGR_DISK_REVECTORING_FAILED                                      syscall.Errno = 0xC0380014\n\tERROR_VOLMGR_DISK_SECTOR_SIZE_INVALID                                     syscall.Errno = 0xC0380015\n\tERROR_VOLMGR_DISK_SET_NOT_CONTAINED                                       syscall.Errno = 0xC0380016\n\tERROR_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS                                syscall.Errno = 0xC0380017\n\tERROR_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES                                 syscall.Errno = 0xC0380018\n\tERROR_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED                                   syscall.Errno = 0xC0380019\n\tERROR_VOLMGR_EXTENT_ALREADY_USED                                          syscall.Errno = 0xC038001A\n\tERROR_VOLMGR_EXTENT_NOT_CONTIGUOUS                                        syscall.Errno = 0xC038001B\n\tERROR_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION                                  syscall.Errno = 0xC038001C\n\tERROR_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED                                    syscall.Errno = 0xC038001D\n\tERROR_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION                                syscall.Errno = 0xC038001E\n\tERROR_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH                           syscall.Errno = 0xC038001F\n\tERROR_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED                                 syscall.Errno = 0xC0380020\n\tERROR_VOLMGR_INTERLEAVE_LENGTH_INVALID                                    syscall.Errno = 0xC0380021\n\tERROR_VOLMGR_MAXIMUM_REGISTERED_USERS                                     syscall.Errno = 0xC0380022\n\tERROR_VOLMGR_MEMBER_IN_SYNC                                               syscall.Errno = 0xC0380023\n\tERROR_VOLMGR_MEMBER_INDEX_DUPLICATE                                       syscall.Errno = 0xC0380024\n\tERROR_VOLMGR_MEMBER_INDEX_INVALID                                         syscall.Errno = 0xC0380025\n\tERROR_VOLMGR_MEMBER_MISSING                                               syscall.Errno = 0xC0380026\n\tERROR_VOLMGR_MEMBER_NOT_DETACHED                                          syscall.Errno = 0xC0380027\n\tERROR_VOLMGR_MEMBER_REGENERATING                                          syscall.Errno = 0xC0380028\n\tERROR_VOLMGR_ALL_DISKS_FAILED                                             syscall.Errno = 0xC0380029\n\tERROR_VOLMGR_NO_REGISTERED_USERS                                          syscall.Errno = 0xC038002A\n\tERROR_VOLMGR_NO_SUCH_USER                                                 syscall.Errno = 0xC038002B\n\tERROR_VOLMGR_NOTIFICATION_RESET                                           syscall.Errno = 0xC038002C\n\tERROR_VOLMGR_NUMBER_OF_MEMBERS_INVALID                                    syscall.Errno = 0xC038002D\n\tERROR_VOLMGR_NUMBER_OF_PLEXES_INVALID                                     syscall.Errno = 0xC038002E\n\tERROR_VOLMGR_PACK_DUPLICATE                                               syscall.Errno = 0xC038002F\n\tERROR_VOLMGR_PACK_ID_INVALID                                              syscall.Errno = 0xC0380030\n\tERROR_VOLMGR_PACK_INVALID                                                 syscall.Errno = 0xC0380031\n\tERROR_VOLMGR_PACK_NAME_INVALID                                            syscall.Errno = 0xC0380032\n\tERROR_VOLMGR_PACK_OFFLINE                                                 syscall.Errno = 0xC0380033\n\tERROR_VOLMGR_PACK_HAS_QUORUM                                              syscall.Errno = 0xC0380034\n\tERROR_VOLMGR_PACK_WITHOUT_QUORUM                                          syscall.Errno = 0xC0380035\n\tERROR_VOLMGR_PARTITION_STYLE_INVALID                                      syscall.Errno = 0xC0380036\n\tERROR_VOLMGR_PARTITION_UPDATE_FAILED                                      syscall.Errno = 0xC0380037\n\tERROR_VOLMGR_PLEX_IN_SYNC                                                 syscall.Errno = 0xC0380038\n\tERROR_VOLMGR_PLEX_INDEX_DUPLICATE                                         syscall.Errno = 0xC0380039\n\tERROR_VOLMGR_PLEX_INDEX_INVALID                                           syscall.Errno = 0xC038003A\n\tERROR_VOLMGR_PLEX_LAST_ACTIVE                                             syscall.Errno = 0xC038003B\n\tERROR_VOLMGR_PLEX_MISSING                                                 syscall.Errno = 0xC038003C\n\tERROR_VOLMGR_PLEX_REGENERATING                                            syscall.Errno = 0xC038003D\n\tERROR_VOLMGR_PLEX_TYPE_INVALID                                            syscall.Errno = 0xC038003E\n\tERROR_VOLMGR_PLEX_NOT_RAID5                                               syscall.Errno = 0xC038003F\n\tERROR_VOLMGR_PLEX_NOT_SIMPLE                                              syscall.Errno = 0xC0380040\n\tERROR_VOLMGR_STRUCTURE_SIZE_INVALID                                       syscall.Errno = 0xC0380041\n\tERROR_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS                               syscall.Errno = 0xC0380042\n\tERROR_VOLMGR_TRANSACTION_IN_PROGRESS                                      syscall.Errno = 0xC0380043\n\tERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE                                syscall.Errno = 0xC0380044\n\tERROR_VOLMGR_VOLUME_CONTAINS_MISSING_DISK                                 syscall.Errno = 0xC0380045\n\tERROR_VOLMGR_VOLUME_ID_INVALID                                            syscall.Errno = 0xC0380046\n\tERROR_VOLMGR_VOLUME_LENGTH_INVALID                                        syscall.Errno = 0xC0380047\n\tERROR_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE                       syscall.Errno = 0xC0380048\n\tERROR_VOLMGR_VOLUME_NOT_MIRRORED                                          syscall.Errno = 0xC0380049\n\tERROR_VOLMGR_VOLUME_NOT_RETAINED                                          syscall.Errno = 0xC038004A\n\tERROR_VOLMGR_VOLUME_OFFLINE                                               syscall.Errno = 0xC038004B\n\tERROR_VOLMGR_VOLUME_RETAINED                                              syscall.Errno = 0xC038004C\n\tERROR_VOLMGR_NUMBER_OF_EXTENTS_INVALID                                    syscall.Errno = 0xC038004D\n\tERROR_VOLMGR_DIFFERENT_SECTOR_SIZE                                        syscall.Errno = 0xC038004E\n\tERROR_VOLMGR_BAD_BOOT_DISK                                                syscall.Errno = 0xC038004F\n\tERROR_VOLMGR_PACK_CONFIG_OFFLINE                                          syscall.Errno = 0xC0380050\n\tERROR_VOLMGR_PACK_CONFIG_ONLINE                                           syscall.Errno = 0xC0380051\n\tERROR_VOLMGR_NOT_PRIMARY_PACK                                             syscall.Errno = 0xC0380052\n\tERROR_VOLMGR_PACK_LOG_UPDATE_FAILED                                       syscall.Errno = 0xC0380053\n\tERROR_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID                              syscall.Errno = 0xC0380054\n\tERROR_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID                            syscall.Errno = 0xC0380055\n\tERROR_VOLMGR_VOLUME_MIRRORED                                              syscall.Errno = 0xC0380056\n\tERROR_VOLMGR_PLEX_NOT_SIMPLE_SPANNED                                      syscall.Errno = 0xC0380057\n\tERROR_VOLMGR_NO_VALID_LOG_COPIES                                          syscall.Errno = 0xC0380058\n\tERROR_VOLMGR_PRIMARY_PACK_PRESENT                                         syscall.Errno = 0xC0380059\n\tERROR_VOLMGR_NUMBER_OF_DISKS_INVALID                                      syscall.Errno = 0xC038005A\n\tERROR_VOLMGR_MIRROR_NOT_SUPPORTED                                         syscall.Errno = 0xC038005B\n\tERROR_VOLMGR_RAID5_NOT_SUPPORTED                                          syscall.Errno = 0xC038005C\n\tERROR_BCD_NOT_ALL_ENTRIES_IMPORTED                                        syscall.Errno = 0x80390001\n\tERROR_BCD_TOO_MANY_ELEMENTS                                               syscall.Errno = 0xC0390002\n\tERROR_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED                                    syscall.Errno = 0x80390003\n\tERROR_VHD_DRIVE_FOOTER_MISSING                                            syscall.Errno = 0xC03A0001\n\tERROR_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH                                  syscall.Errno = 0xC03A0002\n\tERROR_VHD_DRIVE_FOOTER_CORRUPT                                            syscall.Errno = 0xC03A0003\n\tERROR_VHD_FORMAT_UNKNOWN                                                  syscall.Errno = 0xC03A0004\n\tERROR_VHD_FORMAT_UNSUPPORTED_VERSION                                      syscall.Errno = 0xC03A0005\n\tERROR_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH                                 syscall.Errno = 0xC03A0006\n\tERROR_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION                               syscall.Errno = 0xC03A0007\n\tERROR_VHD_SPARSE_HEADER_CORRUPT                                           syscall.Errno = 0xC03A0008\n\tERROR_VHD_BLOCK_ALLOCATION_FAILURE                                        syscall.Errno = 0xC03A0009\n\tERROR_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT                                  syscall.Errno = 0xC03A000A\n\tERROR_VHD_INVALID_BLOCK_SIZE                                              syscall.Errno = 0xC03A000B\n\tERROR_VHD_BITMAP_MISMATCH                                                 syscall.Errno = 0xC03A000C\n\tERROR_VHD_PARENT_VHD_NOT_FOUND                                            syscall.Errno = 0xC03A000D\n\tERROR_VHD_CHILD_PARENT_ID_MISMATCH                                        syscall.Errno = 0xC03A000E\n\tERROR_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH                                 syscall.Errno = 0xC03A000F\n\tERROR_VHD_METADATA_READ_FAILURE                                           syscall.Errno = 0xC03A0010\n\tERROR_VHD_METADATA_WRITE_FAILURE                                          syscall.Errno = 0xC03A0011\n\tERROR_VHD_INVALID_SIZE                                                    syscall.Errno = 0xC03A0012\n\tERROR_VHD_INVALID_FILE_SIZE                                               syscall.Errno = 0xC03A0013\n\tERROR_VIRTDISK_PROVIDER_NOT_FOUND                                         syscall.Errno = 0xC03A0014\n\tERROR_VIRTDISK_NOT_VIRTUAL_DISK                                           syscall.Errno = 0xC03A0015\n\tERROR_VHD_PARENT_VHD_ACCESS_DENIED                                        syscall.Errno = 0xC03A0016\n\tERROR_VHD_CHILD_PARENT_SIZE_MISMATCH                                      syscall.Errno = 0xC03A0017\n\tERROR_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED                               syscall.Errno = 0xC03A0018\n\tERROR_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT                              syscall.Errno = 0xC03A0019\n\tERROR_VIRTUAL_DISK_LIMITATION                                             syscall.Errno = 0xC03A001A\n\tERROR_VHD_INVALID_TYPE                                                    syscall.Errno = 0xC03A001B\n\tERROR_VHD_INVALID_STATE                                                   syscall.Errno = 0xC03A001C\n\tERROR_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE                               syscall.Errno = 0xC03A001D\n\tERROR_VIRTDISK_DISK_ALREADY_OWNED                                         syscall.Errno = 0xC03A001E\n\tERROR_VIRTDISK_DISK_ONLINE_AND_WRITABLE                                   syscall.Errno = 0xC03A001F\n\tERROR_CTLOG_TRACKING_NOT_INITIALIZED                                      syscall.Errno = 0xC03A0020\n\tERROR_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE                                 syscall.Errno = 0xC03A0021\n\tERROR_CTLOG_VHD_CHANGED_OFFLINE                                           syscall.Errno = 0xC03A0022\n\tERROR_CTLOG_INVALID_TRACKING_STATE                                        syscall.Errno = 0xC03A0023\n\tERROR_CTLOG_INCONSISTENT_TRACKING_FILE                                    syscall.Errno = 0xC03A0024\n\tERROR_VHD_RESIZE_WOULD_TRUNCATE_DATA                                      syscall.Errno = 0xC03A0025\n\tERROR_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE                          syscall.Errno = 0xC03A0026\n\tERROR_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE                        syscall.Errno = 0xC03A0027\n\tERROR_VHD_METADATA_FULL                                                   syscall.Errno = 0xC03A0028\n\tERROR_VHD_INVALID_CHANGE_TRACKING_ID                                      syscall.Errno = 0xC03A0029\n\tERROR_VHD_CHANGE_TRACKING_DISABLED                                        syscall.Errno = 0xC03A002A\n\tERROR_VHD_MISSING_CHANGE_TRACKING_INFORMATION                             syscall.Errno = 0xC03A0030\n\tERROR_QUERY_STORAGE_ERROR                                                 syscall.Errno = 0x803A0001\n\tHCN_E_NETWORK_NOT_FOUND                                                   Handle        = 0x803B0001\n\tHCN_E_ENDPOINT_NOT_FOUND                                                  Handle        = 0x803B0002\n\tHCN_E_LAYER_NOT_FOUND                                                     Handle        = 0x803B0003\n\tHCN_E_SWITCH_NOT_FOUND                                                    Handle        = 0x803B0004\n\tHCN_E_SUBNET_NOT_FOUND                                                    Handle        = 0x803B0005\n\tHCN_E_ADAPTER_NOT_FOUND                                                   Handle        = 0x803B0006\n\tHCN_E_PORT_NOT_FOUND                                                      Handle        = 0x803B0007\n\tHCN_E_POLICY_NOT_FOUND                                                    Handle        = 0x803B0008\n\tHCN_E_VFP_PORTSETTING_NOT_FOUND                                           Handle        = 0x803B0009\n\tHCN_E_INVALID_NETWORK                                                     Handle        = 0x803B000A\n\tHCN_E_INVALID_NETWORK_TYPE                                                Handle        = 0x803B000B\n\tHCN_E_INVALID_ENDPOINT                                                    Handle        = 0x803B000C\n\tHCN_E_INVALID_POLICY                                                      Handle        = 0x803B000D\n\tHCN_E_INVALID_POLICY_TYPE                                                 Handle        = 0x803B000E\n\tHCN_E_INVALID_REMOTE_ENDPOINT_OPERATION                                   Handle        = 0x803B000F\n\tHCN_E_NETWORK_ALREADY_EXISTS                                              Handle        = 0x803B0010\n\tHCN_E_LAYER_ALREADY_EXISTS                                                Handle        = 0x803B0011\n\tHCN_E_POLICY_ALREADY_EXISTS                                               Handle        = 0x803B0012\n\tHCN_E_PORT_ALREADY_EXISTS                                                 Handle        = 0x803B0013\n\tHCN_E_ENDPOINT_ALREADY_ATTACHED                                           Handle        = 0x803B0014\n\tHCN_E_REQUEST_UNSUPPORTED                                                 Handle        = 0x803B0015\n\tHCN_E_MAPPING_NOT_SUPPORTED                                               Handle        = 0x803B0016\n\tHCN_E_DEGRADED_OPERATION                                                  Handle        = 0x803B0017\n\tHCN_E_SHARED_SWITCH_MODIFICATION                                          Handle        = 0x803B0018\n\tHCN_E_GUID_CONVERSION_FAILURE                                             Handle        = 0x803B0019\n\tHCN_E_REGKEY_FAILURE                                                      Handle        = 0x803B001A\n\tHCN_E_INVALID_JSON                                                        Handle        = 0x803B001B\n\tHCN_E_INVALID_JSON_REFERENCE                                              Handle        = 0x803B001C\n\tHCN_E_ENDPOINT_SHARING_DISABLED                                           Handle        = 0x803B001D\n\tHCN_E_INVALID_IP                                                          Handle        = 0x803B001E\n\tHCN_E_SWITCH_EXTENSION_NOT_FOUND                                          Handle        = 0x803B001F\n\tHCN_E_MANAGER_STOPPED                                                     Handle        = 0x803B0020\n\tGCN_E_MODULE_NOT_FOUND                                                    Handle        = 0x803B0021\n\tGCN_E_NO_REQUEST_HANDLERS                                                 Handle        = 0x803B0022\n\tGCN_E_REQUEST_UNSUPPORTED                                                 Handle        = 0x803B0023\n\tGCN_E_RUNTIMEKEYS_FAILED                                                  Handle        = 0x803B0024\n\tGCN_E_NETADAPTER_TIMEOUT                                                  Handle        = 0x803B0025\n\tGCN_E_NETADAPTER_NOT_FOUND                                                Handle        = 0x803B0026\n\tGCN_E_NETCOMPARTMENT_NOT_FOUND                                            Handle        = 0x803B0027\n\tGCN_E_NETINTERFACE_NOT_FOUND                                              Handle        = 0x803B0028\n\tGCN_E_DEFAULTNAMESPACE_EXISTS                                             Handle        = 0x803B0029\n\tHCN_E_ICS_DISABLED                                                        Handle        = 0x803B002A\n\tHCN_E_ENDPOINT_NAMESPACE_ALREADY_EXISTS                                   Handle        = 0x803B002B\n\tHCN_E_ENTITY_HAS_REFERENCES                                               Handle        = 0x803B002C\n\tHCN_E_INVALID_INTERNAL_PORT                                               Handle        = 0x803B002D\n\tHCN_E_NAMESPACE_ATTACH_FAILED                                             Handle        = 0x803B002E\n\tHCN_E_ADDR_INVALID_OR_RESERVED                                            Handle        = 0x803B002F\n\tSDIAG_E_CANCELLED                                                         syscall.Errno = 0x803C0100\n\tSDIAG_E_SCRIPT                                                            syscall.Errno = 0x803C0101\n\tSDIAG_E_POWERSHELL                                                        syscall.Errno = 0x803C0102\n\tSDIAG_E_MANAGEDHOST                                                       syscall.Errno = 0x803C0103\n\tSDIAG_E_NOVERIFIER                                                        syscall.Errno = 0x803C0104\n\tSDIAG_S_CANNOTRUN                                                         syscall.Errno = 0x003C0105\n\tSDIAG_E_DISABLED                                                          syscall.Errno = 0x803C0106\n\tSDIAG_E_TRUST                                                             syscall.Errno = 0x803C0107\n\tSDIAG_E_CANNOTRUN                                                         syscall.Errno = 0x803C0108\n\tSDIAG_E_VERSION                                                           syscall.Errno = 0x803C0109\n\tSDIAG_E_RESOURCE                                                          syscall.Errno = 0x803C010A\n\tSDIAG_E_ROOTCAUSE                                                         syscall.Errno = 0x803C010B\n\tWPN_E_CHANNEL_CLOSED                                                      Handle        = 0x803E0100\n\tWPN_E_CHANNEL_REQUEST_NOT_COMPLETE                                        Handle        = 0x803E0101\n\tWPN_E_INVALID_APP                                                         Handle        = 0x803E0102\n\tWPN_E_OUTSTANDING_CHANNEL_REQUEST                                         Handle        = 0x803E0103\n\tWPN_E_DUPLICATE_CHANNEL                                                   Handle        = 0x803E0104\n\tWPN_E_PLATFORM_UNAVAILABLE                                                Handle        = 0x803E0105\n\tWPN_E_NOTIFICATION_POSTED                                                 Handle        = 0x803E0106\n\tWPN_E_NOTIFICATION_HIDDEN                                                 Handle        = 0x803E0107\n\tWPN_E_NOTIFICATION_NOT_POSTED                                             Handle        = 0x803E0108\n\tWPN_E_CLOUD_DISABLED                                                      Handle        = 0x803E0109\n\tWPN_E_CLOUD_INCAPABLE                                                     Handle        = 0x803E0110\n\tWPN_E_CLOUD_AUTH_UNAVAILABLE                                              Handle        = 0x803E011A\n\tWPN_E_CLOUD_SERVICE_UNAVAILABLE                                           Handle        = 0x803E011B\n\tWPN_E_FAILED_LOCK_SCREEN_UPDATE_INTIALIZATION                             Handle        = 0x803E011C\n\tWPN_E_NOTIFICATION_DISABLED                                               Handle        = 0x803E0111\n\tWPN_E_NOTIFICATION_INCAPABLE                                              Handle        = 0x803E0112\n\tWPN_E_INTERNET_INCAPABLE                                                  Handle        = 0x803E0113\n\tWPN_E_NOTIFICATION_TYPE_DISABLED                                          Handle        = 0x803E0114\n\tWPN_E_NOTIFICATION_SIZE                                                   Handle        = 0x803E0115\n\tWPN_E_TAG_SIZE                                                            Handle        = 0x803E0116\n\tWPN_E_ACCESS_DENIED                                                       Handle        = 0x803E0117\n\tWPN_E_DUPLICATE_REGISTRATION                                              Handle        = 0x803E0118\n\tWPN_E_PUSH_NOTIFICATION_INCAPABLE                                         Handle        = 0x803E0119\n\tWPN_E_DEV_ID_SIZE                                                         Handle        = 0x803E0120\n\tWPN_E_TAG_ALPHANUMERIC                                                    Handle        = 0x803E012A\n\tWPN_E_INVALID_HTTP_STATUS_CODE                                            Handle        = 0x803E012B\n\tWPN_E_OUT_OF_SESSION                                                      Handle        = 0x803E0200\n\tWPN_E_POWER_SAVE                                                          Handle        = 0x803E0201\n\tWPN_E_IMAGE_NOT_FOUND_IN_CACHE                                            Handle        = 0x803E0202\n\tWPN_E_ALL_URL_NOT_COMPLETED                                               Handle        = 0x803E0203\n\tWPN_E_INVALID_CLOUD_IMAGE                                                 Handle        = 0x803E0204\n\tWPN_E_NOTIFICATION_ID_MATCHED                                             Handle        = 0x803E0205\n\tWPN_E_CALLBACK_ALREADY_REGISTERED                                         Handle        = 0x803E0206\n\tWPN_E_TOAST_NOTIFICATION_DROPPED                                          Handle        = 0x803E0207\n\tWPN_E_STORAGE_LOCKED                                                      Handle        = 0x803E0208\n\tWPN_E_GROUP_SIZE                                                          Handle        = 0x803E0209\n\tWPN_E_GROUP_ALPHANUMERIC                                                  Handle        = 0x803E020A\n\tWPN_E_CLOUD_DISABLED_FOR_APP                                              Handle        = 0x803E020B\n\tE_MBN_CONTEXT_NOT_ACTIVATED                                               Handle        = 0x80548201\n\tE_MBN_BAD_SIM                                                             Handle        = 0x80548202\n\tE_MBN_DATA_CLASS_NOT_AVAILABLE                                            Handle        = 0x80548203\n\tE_MBN_INVALID_ACCESS_STRING                                               Handle        = 0x80548204\n\tE_MBN_MAX_ACTIVATED_CONTEXTS                                              Handle        = 0x80548205\n\tE_MBN_PACKET_SVC_DETACHED                                                 Handle        = 0x80548206\n\tE_MBN_PROVIDER_NOT_VISIBLE                                                Handle        = 0x80548207\n\tE_MBN_RADIO_POWER_OFF                                                     Handle        = 0x80548208\n\tE_MBN_SERVICE_NOT_ACTIVATED                                               Handle        = 0x80548209\n\tE_MBN_SIM_NOT_INSERTED                                                    Handle        = 0x8054820A\n\tE_MBN_VOICE_CALL_IN_PROGRESS                                              Handle        = 0x8054820B\n\tE_MBN_INVALID_CACHE                                                       Handle        = 0x8054820C\n\tE_MBN_NOT_REGISTERED                                                      Handle        = 0x8054820D\n\tE_MBN_PROVIDERS_NOT_FOUND                                                 Handle        = 0x8054820E\n\tE_MBN_PIN_NOT_SUPPORTED                                                   Handle        = 0x8054820F\n\tE_MBN_PIN_REQUIRED                                                        Handle        = 0x80548210\n\tE_MBN_PIN_DISABLED                                                        Handle        = 0x80548211\n\tE_MBN_FAILURE                                                             Handle        = 0x80548212\n\tE_MBN_INVALID_PROFILE                                                     Handle        = 0x80548218\n\tE_MBN_DEFAULT_PROFILE_EXIST                                               Handle        = 0x80548219\n\tE_MBN_SMS_ENCODING_NOT_SUPPORTED                                          Handle        = 0x80548220\n\tE_MBN_SMS_FILTER_NOT_SUPPORTED                                            Handle        = 0x80548221\n\tE_MBN_SMS_INVALID_MEMORY_INDEX                                            Handle        = 0x80548222\n\tE_MBN_SMS_LANG_NOT_SUPPORTED                                              Handle        = 0x80548223\n\tE_MBN_SMS_MEMORY_FAILURE                                                  Handle        = 0x80548224\n\tE_MBN_SMS_NETWORK_TIMEOUT                                                 Handle        = 0x80548225\n\tE_MBN_SMS_UNKNOWN_SMSC_ADDRESS                                            Handle        = 0x80548226\n\tE_MBN_SMS_FORMAT_NOT_SUPPORTED                                            Handle        = 0x80548227\n\tE_MBN_SMS_OPERATION_NOT_ALLOWED                                           Handle        = 0x80548228\n\tE_MBN_SMS_MEMORY_FULL                                                     Handle        = 0x80548229\n\tPEER_E_IPV6_NOT_INSTALLED                                                 Handle        = 0x80630001\n\tPEER_E_NOT_INITIALIZED                                                    Handle        = 0x80630002\n\tPEER_E_CANNOT_START_SERVICE                                               Handle        = 0x80630003\n\tPEER_E_NOT_LICENSED                                                       Handle        = 0x80630004\n\tPEER_E_INVALID_GRAPH                                                      Handle        = 0x80630010\n\tPEER_E_DBNAME_CHANGED                                                     Handle        = 0x80630011\n\tPEER_E_DUPLICATE_GRAPH                                                    Handle        = 0x80630012\n\tPEER_E_GRAPH_NOT_READY                                                    Handle        = 0x80630013\n\tPEER_E_GRAPH_SHUTTING_DOWN                                                Handle        = 0x80630014\n\tPEER_E_GRAPH_IN_USE                                                       Handle        = 0x80630015\n\tPEER_E_INVALID_DATABASE                                                   Handle        = 0x80630016\n\tPEER_E_TOO_MANY_ATTRIBUTES                                                Handle        = 0x80630017\n\tPEER_E_CONNECTION_NOT_FOUND                                               Handle        = 0x80630103\n\tPEER_E_CONNECT_SELF                                                       Handle        = 0x80630106\n\tPEER_E_ALREADY_LISTENING                                                  Handle        = 0x80630107\n\tPEER_E_NODE_NOT_FOUND                                                     Handle        = 0x80630108\n\tPEER_E_CONNECTION_FAILED                                                  Handle        = 0x80630109\n\tPEER_E_CONNECTION_NOT_AUTHENTICATED                                       Handle        = 0x8063010A\n\tPEER_E_CONNECTION_REFUSED                                                 Handle        = 0x8063010B\n\tPEER_E_CLASSIFIER_TOO_LONG                                                Handle        = 0x80630201\n\tPEER_E_TOO_MANY_IDENTITIES                                                Handle        = 0x80630202\n\tPEER_E_NO_KEY_ACCESS                                                      Handle        = 0x80630203\n\tPEER_E_GROUPS_EXIST                                                       Handle        = 0x80630204\n\tPEER_E_RECORD_NOT_FOUND                                                   Handle        = 0x80630301\n\tPEER_E_DATABASE_ACCESSDENIED                                              Handle        = 0x80630302\n\tPEER_E_DBINITIALIZATION_FAILED                                            Handle        = 0x80630303\n\tPEER_E_MAX_RECORD_SIZE_EXCEEDED                                           Handle        = 0x80630304\n\tPEER_E_DATABASE_ALREADY_PRESENT                                           Handle        = 0x80630305\n\tPEER_E_DATABASE_NOT_PRESENT                                               Handle        = 0x80630306\n\tPEER_E_IDENTITY_NOT_FOUND                                                 Handle        = 0x80630401\n\tPEER_E_EVENT_HANDLE_NOT_FOUND                                             Handle        = 0x80630501\n\tPEER_E_INVALID_SEARCH                                                     Handle        = 0x80630601\n\tPEER_E_INVALID_ATTRIBUTES                                                 Handle        = 0x80630602\n\tPEER_E_INVITATION_NOT_TRUSTED                                             Handle        = 0x80630701\n\tPEER_E_CHAIN_TOO_LONG                                                     Handle        = 0x80630703\n\tPEER_E_INVALID_TIME_PERIOD                                                Handle        = 0x80630705\n\tPEER_E_CIRCULAR_CHAIN_DETECTED                                            Handle        = 0x80630706\n\tPEER_E_CERT_STORE_CORRUPTED                                               Handle        = 0x80630801\n\tPEER_E_NO_CLOUD                                                           Handle        = 0x80631001\n\tPEER_E_CLOUD_NAME_AMBIGUOUS                                               Handle        = 0x80631005\n\tPEER_E_INVALID_RECORD                                                     Handle        = 0x80632010\n\tPEER_E_NOT_AUTHORIZED                                                     Handle        = 0x80632020\n\tPEER_E_PASSWORD_DOES_NOT_MEET_POLICY                                      Handle        = 0x80632021\n\tPEER_E_DEFERRED_VALIDATION                                                Handle        = 0x80632030\n\tPEER_E_INVALID_GROUP_PROPERTIES                                           Handle        = 0x80632040\n\tPEER_E_INVALID_PEER_NAME                                                  Handle        = 0x80632050\n\tPEER_E_INVALID_CLASSIFIER                                                 Handle        = 0x80632060\n\tPEER_E_INVALID_FRIENDLY_NAME                                              Handle        = 0x80632070\n\tPEER_E_INVALID_ROLE_PROPERTY                                              Handle        = 0x80632071\n\tPEER_E_INVALID_CLASSIFIER_PROPERTY                                        Handle        = 0x80632072\n\tPEER_E_INVALID_RECORD_EXPIRATION                                          Handle        = 0x80632080\n\tPEER_E_INVALID_CREDENTIAL_INFO                                            Handle        = 0x80632081\n\tPEER_E_INVALID_CREDENTIAL                                                 Handle        = 0x80632082\n\tPEER_E_INVALID_RECORD_SIZE                                                Handle        = 0x80632083\n\tPEER_E_UNSUPPORTED_VERSION                                                Handle        = 0x80632090\n\tPEER_E_GROUP_NOT_READY                                                    Handle        = 0x80632091\n\tPEER_E_GROUP_IN_USE                                                       Handle        = 0x80632092\n\tPEER_E_INVALID_GROUP                                                      Handle        = 0x80632093\n\tPEER_E_NO_MEMBERS_FOUND                                                   Handle        = 0x80632094\n\tPEER_E_NO_MEMBER_CONNECTIONS                                              Handle        = 0x80632095\n\tPEER_E_UNABLE_TO_LISTEN                                                   Handle        = 0x80632096\n\tPEER_E_IDENTITY_DELETED                                                   Handle        = 0x806320A0\n\tPEER_E_SERVICE_NOT_AVAILABLE                                              Handle        = 0x806320A1\n\tPEER_E_CONTACT_NOT_FOUND                                                  Handle        = 0x80636001\n\tPEER_S_GRAPH_DATA_CREATED                                                 Handle        = 0x00630001\n\tPEER_S_NO_EVENT_DATA                                                      Handle        = 0x00630002\n\tPEER_S_ALREADY_CONNECTED                                                  Handle        = 0x00632000\n\tPEER_S_SUBSCRIPTION_EXISTS                                                Handle        = 0x00636000\n\tPEER_S_NO_CONNECTIVITY                                                    Handle        = 0x00630005\n\tPEER_S_ALREADY_A_MEMBER                                                   Handle        = 0x00630006\n\tPEER_E_CANNOT_CONVERT_PEER_NAME                                           Handle        = 0x80634001\n\tPEER_E_INVALID_PEER_HOST_NAME                                             Handle        = 0x80634002\n\tPEER_E_NO_MORE                                                            Handle        = 0x80634003\n\tPEER_E_PNRP_DUPLICATE_PEER_NAME                                           Handle        = 0x80634005\n\tPEER_E_INVITE_CANCELLED                                                   Handle        = 0x80637000\n\tPEER_E_INVITE_RESPONSE_NOT_AVAILABLE                                      Handle        = 0x80637001\n\tPEER_E_NOT_SIGNED_IN                                                      Handle        = 0x80637003\n\tPEER_E_PRIVACY_DECLINED                                                   Handle        = 0x80637004\n\tPEER_E_TIMEOUT                                                            Handle        = 0x80637005\n\tPEER_E_INVALID_ADDRESS                                                    Handle        = 0x80637007\n\tPEER_E_FW_EXCEPTION_DISABLED                                              Handle        = 0x80637008\n\tPEER_E_FW_BLOCKED_BY_POLICY                                               Handle        = 0x80637009\n\tPEER_E_FW_BLOCKED_BY_SHIELDS_UP                                           Handle        = 0x8063700A\n\tPEER_E_FW_DECLINED                                                        Handle        = 0x8063700B\n\tUI_E_CREATE_FAILED                                                        Handle        = 0x802A0001\n\tUI_E_SHUTDOWN_CALLED                                                      Handle        = 0x802A0002\n\tUI_E_ILLEGAL_REENTRANCY                                                   Handle        = 0x802A0003\n\tUI_E_OBJECT_SEALED                                                        Handle        = 0x802A0004\n\tUI_E_VALUE_NOT_SET                                                        Handle        = 0x802A0005\n\tUI_E_VALUE_NOT_DETERMINED                                                 Handle        = 0x802A0006\n\tUI_E_INVALID_OUTPUT                                                       Handle        = 0x802A0007\n\tUI_E_BOOLEAN_EXPECTED                                                     Handle        = 0x802A0008\n\tUI_E_DIFFERENT_OWNER                                                      Handle        = 0x802A0009\n\tUI_E_AMBIGUOUS_MATCH                                                      Handle        = 0x802A000A\n\tUI_E_FP_OVERFLOW                                                          Handle        = 0x802A000B\n\tUI_E_WRONG_THREAD                                                         Handle        = 0x802A000C\n\tUI_E_STORYBOARD_ACTIVE                                                    Handle        = 0x802A0101\n\tUI_E_STORYBOARD_NOT_PLAYING                                               Handle        = 0x802A0102\n\tUI_E_START_KEYFRAME_AFTER_END                                             Handle        = 0x802A0103\n\tUI_E_END_KEYFRAME_NOT_DETERMINED                                          Handle        = 0x802A0104\n\tUI_E_LOOPS_OVERLAP                                                        Handle        = 0x802A0105\n\tUI_E_TRANSITION_ALREADY_USED                                              Handle        = 0x802A0106\n\tUI_E_TRANSITION_NOT_IN_STORYBOARD                                         Handle        = 0x802A0107\n\tUI_E_TRANSITION_ECLIPSED                                                  Handle        = 0x802A0108\n\tUI_E_TIME_BEFORE_LAST_UPDATE                                              Handle        = 0x802A0109\n\tUI_E_TIMER_CLIENT_ALREADY_CONNECTED                                       Handle        = 0x802A010A\n\tUI_E_INVALID_DIMENSION                                                    Handle        = 0x802A010B\n\tUI_E_PRIMITIVE_OUT_OF_BOUNDS                                              Handle        = 0x802A010C\n\tUI_E_WINDOW_CLOSED                                                        Handle        = 0x802A0201\n\tE_BLUETOOTH_ATT_INVALID_HANDLE                                            Handle        = 0x80650001\n\tE_BLUETOOTH_ATT_READ_NOT_PERMITTED                                        Handle        = 0x80650002\n\tE_BLUETOOTH_ATT_WRITE_NOT_PERMITTED                                       Handle        = 0x80650003\n\tE_BLUETOOTH_ATT_INVALID_PDU                                               Handle        = 0x80650004\n\tE_BLUETOOTH_ATT_INSUFFICIENT_AUTHENTICATION                               Handle        = 0x80650005\n\tE_BLUETOOTH_ATT_REQUEST_NOT_SUPPORTED                                     Handle        = 0x80650006\n\tE_BLUETOOTH_ATT_INVALID_OFFSET                                            Handle        = 0x80650007\n\tE_BLUETOOTH_ATT_INSUFFICIENT_AUTHORIZATION                                Handle        = 0x80650008\n\tE_BLUETOOTH_ATT_PREPARE_QUEUE_FULL                                        Handle        = 0x80650009\n\tE_BLUETOOTH_ATT_ATTRIBUTE_NOT_FOUND                                       Handle        = 0x8065000A\n\tE_BLUETOOTH_ATT_ATTRIBUTE_NOT_LONG                                        Handle        = 0x8065000B\n\tE_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE                          Handle        = 0x8065000C\n\tE_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH                            Handle        = 0x8065000D\n\tE_BLUETOOTH_ATT_UNLIKELY                                                  Handle        = 0x8065000E\n\tE_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION                                   Handle        = 0x8065000F\n\tE_BLUETOOTH_ATT_UNSUPPORTED_GROUP_TYPE                                    Handle        = 0x80650010\n\tE_BLUETOOTH_ATT_INSUFFICIENT_RESOURCES                                    Handle        = 0x80650011\n\tE_BLUETOOTH_ATT_UNKNOWN_ERROR                                             Handle        = 0x80651000\n\tE_AUDIO_ENGINE_NODE_NOT_FOUND                                             Handle        = 0x80660001\n\tE_HDAUDIO_EMPTY_CONNECTION_LIST                                           Handle        = 0x80660002\n\tE_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED                                   Handle        = 0x80660003\n\tE_HDAUDIO_NO_LOGICAL_DEVICES_CREATED                                      Handle        = 0x80660004\n\tE_HDAUDIO_NULL_LINKED_LIST_ENTRY                                          Handle        = 0x80660005\n\tSTATEREPOSITORY_E_CONCURRENCY_LOCKING_FAILURE                             Handle        = 0x80670001\n\tSTATEREPOSITORY_E_STATEMENT_INPROGRESS                                    Handle        = 0x80670002\n\tSTATEREPOSITORY_E_CONFIGURATION_INVALID                                   Handle        = 0x80670003\n\tSTATEREPOSITORY_E_UNKNOWN_SCHEMA_VERSION                                  Handle        = 0x80670004\n\tSTATEREPOSITORY_ERROR_DICTIONARY_CORRUPTED                                Handle        = 0x80670005\n\tSTATEREPOSITORY_E_BLOCKED                                                 Handle        = 0x80670006\n\tSTATEREPOSITORY_E_BUSY_RETRY                                              Handle        = 0x80670007\n\tSTATEREPOSITORY_E_BUSY_RECOVERY_RETRY                                     Handle        = 0x80670008\n\tSTATEREPOSITORY_E_LOCKED_RETRY                                            Handle        = 0x80670009\n\tSTATEREPOSITORY_E_LOCKED_SHAREDCACHE_RETRY                                Handle        = 0x8067000A\n\tSTATEREPOSITORY_E_TRANSACTION_REQUIRED                                    Handle        = 0x8067000B\n\tSTATEREPOSITORY_E_BUSY_TIMEOUT_EXCEEDED                                   Handle        = 0x8067000C\n\tSTATEREPOSITORY_E_BUSY_RECOVERY_TIMEOUT_EXCEEDED                          Handle        = 0x8067000D\n\tSTATEREPOSITORY_E_LOCKED_TIMEOUT_EXCEEDED                                 Handle        = 0x8067000E\n\tSTATEREPOSITORY_E_LOCKED_SHAREDCACHE_TIMEOUT_EXCEEDED                     Handle        = 0x8067000F\n\tSTATEREPOSITORY_E_SERVICE_STOP_IN_PROGRESS                                Handle        = 0x80670010\n\tSTATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED                         Handle        = 0x80670011\n\tSTATEREPOSITORY_ERROR_CACHE_CORRUPTED                                     Handle        = 0x80670012\n\tSTATEREPOSITORY_TRANSACTION_CALLER_ID_CHANGED                             Handle        = 0x00670013\n\tSTATEREPOSITORY_TRANSACTION_IN_PROGRESS                                   Handle        = 0x00670014\n\tERROR_SPACES_POOL_WAS_DELETED                                             Handle        = 0x00E70001\n\tERROR_SPACES_FAULT_DOMAIN_TYPE_INVALID                                    Handle        = 0x80E70001\n\tERROR_SPACES_INTERNAL_ERROR                                               Handle        = 0x80E70002\n\tERROR_SPACES_RESILIENCY_TYPE_INVALID                                      Handle        = 0x80E70003\n\tERROR_SPACES_DRIVE_SECTOR_SIZE_INVALID                                    Handle        = 0x80E70004\n\tERROR_SPACES_DRIVE_REDUNDANCY_INVALID                                     Handle        = 0x80E70006\n\tERROR_SPACES_NUMBER_OF_DATA_COPIES_INVALID                                Handle        = 0x80E70007\n\tERROR_SPACES_PARITY_LAYOUT_INVALID                                        Handle        = 0x80E70008\n\tERROR_SPACES_INTERLEAVE_LENGTH_INVALID                                    Handle        = 0x80E70009\n\tERROR_SPACES_NUMBER_OF_COLUMNS_INVALID                                    Handle        = 0x80E7000A\n\tERROR_SPACES_NOT_ENOUGH_DRIVES                                            Handle        = 0x80E7000B\n\tERROR_SPACES_EXTENDED_ERROR                                               Handle        = 0x80E7000C\n\tERROR_SPACES_PROVISIONING_TYPE_INVALID                                    Handle        = 0x80E7000D\n\tERROR_SPACES_ALLOCATION_SIZE_INVALID                                      Handle        = 0x80E7000E\n\tERROR_SPACES_ENCLOSURE_AWARE_INVALID                                      Handle        = 0x80E7000F\n\tERROR_SPACES_WRITE_CACHE_SIZE_INVALID                                     Handle        = 0x80E70010\n\tERROR_SPACES_NUMBER_OF_GROUPS_INVALID                                     Handle        = 0x80E70011\n\tERROR_SPACES_DRIVE_OPERATIONAL_STATE_INVALID                              Handle        = 0x80E70012\n\tERROR_SPACES_ENTRY_INCOMPLETE                                             Handle        = 0x80E70013\n\tERROR_SPACES_ENTRY_INVALID                                                Handle        = 0x80E70014\n\tERROR_VOLSNAP_BOOTFILE_NOT_VALID                                          Handle        = 0x80820001\n\tERROR_VOLSNAP_ACTIVATION_TIMEOUT                                          Handle        = 0x80820002\n\tERROR_TIERING_NOT_SUPPORTED_ON_VOLUME                                     Handle        = 0x80830001\n\tERROR_TIERING_VOLUME_DISMOUNT_IN_PROGRESS                                 Handle        = 0x80830002\n\tERROR_TIERING_STORAGE_TIER_NOT_FOUND                                      Handle        = 0x80830003\n\tERROR_TIERING_INVALID_FILE_ID                                             Handle        = 0x80830004\n\tERROR_TIERING_WRONG_CLUSTER_NODE                                          Handle        = 0x80830005\n\tERROR_TIERING_ALREADY_PROCESSING                                          Handle        = 0x80830006\n\tERROR_TIERING_CANNOT_PIN_OBJECT                                           Handle        = 0x80830007\n\tERROR_TIERING_FILE_IS_NOT_PINNED                                          Handle        = 0x80830008\n\tERROR_NOT_A_TIERED_VOLUME                                                 Handle        = 0x80830009\n\tERROR_ATTRIBUTE_NOT_PRESENT                                               Handle        = 0x8083000A\n\tERROR_SECCORE_INVALID_COMMAND                                             Handle        = 0xC0E80000\n\tERROR_NO_APPLICABLE_APP_LICENSES_FOUND                                    Handle        = 0xC0EA0001\n\tERROR_CLIP_LICENSE_NOT_FOUND                                              Handle        = 0xC0EA0002\n\tERROR_CLIP_DEVICE_LICENSE_MISSING                                         Handle        = 0xC0EA0003\n\tERROR_CLIP_LICENSE_INVALID_SIGNATURE                                      Handle        = 0xC0EA0004\n\tERROR_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID                           Handle        = 0xC0EA0005\n\tERROR_CLIP_LICENSE_EXPIRED                                                Handle        = 0xC0EA0006\n\tERROR_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE                               Handle        = 0xC0EA0007\n\tERROR_CLIP_LICENSE_NOT_SIGNED                                             Handle        = 0xC0EA0008\n\tERROR_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE                           Handle        = 0xC0EA0009\n\tERROR_CLIP_LICENSE_DEVICE_ID_MISMATCH                                     Handle        = 0xC0EA000A\n\tDXGI_STATUS_OCCLUDED                                                      Handle        = 0x087A0001\n\tDXGI_STATUS_CLIPPED                                                       Handle        = 0x087A0002\n\tDXGI_STATUS_NO_REDIRECTION                                                Handle        = 0x087A0004\n\tDXGI_STATUS_NO_DESKTOP_ACCESS                                             Handle        = 0x087A0005\n\tDXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE                                  Handle        = 0x087A0006\n\tDXGI_STATUS_MODE_CHANGED                                                  Handle        = 0x087A0007\n\tDXGI_STATUS_MODE_CHANGE_IN_PROGRESS                                       Handle        = 0x087A0008\n\tDXGI_ERROR_INVALID_CALL                                                   Handle        = 0x887A0001\n\tDXGI_ERROR_NOT_FOUND                                                      Handle        = 0x887A0002\n\tDXGI_ERROR_MORE_DATA                                                      Handle        = 0x887A0003\n\tDXGI_ERROR_UNSUPPORTED                                                    Handle        = 0x887A0004\n\tDXGI_ERROR_DEVICE_REMOVED                                                 Handle        = 0x887A0005\n\tDXGI_ERROR_DEVICE_HUNG                                                    Handle        = 0x887A0006\n\tDXGI_ERROR_DEVICE_RESET                                                   Handle        = 0x887A0007\n\tDXGI_ERROR_WAS_STILL_DRAWING                                              Handle        = 0x887A000A\n\tDXGI_ERROR_FRAME_STATISTICS_DISJOINT                                      Handle        = 0x887A000B\n\tDXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE                                   Handle        = 0x887A000C\n\tDXGI_ERROR_DRIVER_INTERNAL_ERROR                                          Handle        = 0x887A0020\n\tDXGI_ERROR_NONEXCLUSIVE                                                   Handle        = 0x887A0021\n\tDXGI_ERROR_NOT_CURRENTLY_AVAILABLE                                        Handle        = 0x887A0022\n\tDXGI_ERROR_REMOTE_CLIENT_DISCONNECTED                                     Handle        = 0x887A0023\n\tDXGI_ERROR_REMOTE_OUTOFMEMORY                                             Handle        = 0x887A0024\n\tDXGI_ERROR_ACCESS_LOST                                                    Handle        = 0x887A0026\n\tDXGI_ERROR_WAIT_TIMEOUT                                                   Handle        = 0x887A0027\n\tDXGI_ERROR_SESSION_DISCONNECTED                                           Handle        = 0x887A0028\n\tDXGI_ERROR_RESTRICT_TO_OUTPUT_STALE                                       Handle        = 0x887A0029\n\tDXGI_ERROR_CANNOT_PROTECT_CONTENT                                         Handle        = 0x887A002A\n\tDXGI_ERROR_ACCESS_DENIED                                                  Handle        = 0x887A002B\n\tDXGI_ERROR_NAME_ALREADY_EXISTS                                            Handle        = 0x887A002C\n\tDXGI_ERROR_SDK_COMPONENT_MISSING                                          Handle        = 0x887A002D\n\tDXGI_ERROR_NOT_CURRENT                                                    Handle        = 0x887A002E\n\tDXGI_ERROR_HW_PROTECTION_OUTOFMEMORY                                      Handle        = 0x887A0030\n\tDXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION                                  Handle        = 0x887A0031\n\tDXGI_ERROR_NON_COMPOSITED_UI                                              Handle        = 0x887A0032\n\tDXGI_STATUS_UNOCCLUDED                                                    Handle        = 0x087A0009\n\tDXGI_STATUS_DDA_WAS_STILL_DRAWING                                         Handle        = 0x087A000A\n\tDXGI_ERROR_MODE_CHANGE_IN_PROGRESS                                        Handle        = 0x887A0025\n\tDXGI_STATUS_PRESENT_REQUIRED                                              Handle        = 0x087A002F\n\tDXGI_ERROR_CACHE_CORRUPT                                                  Handle        = 0x887A0033\n\tDXGI_ERROR_CACHE_FULL                                                     Handle        = 0x887A0034\n\tDXGI_ERROR_CACHE_HASH_COLLISION                                           Handle        = 0x887A0035\n\tDXGI_ERROR_ALREADY_EXISTS                                                 Handle        = 0x887A0036\n\tDXGI_DDI_ERR_WASSTILLDRAWING                                              Handle        = 0x887B0001\n\tDXGI_DDI_ERR_UNSUPPORTED                                                  Handle        = 0x887B0002\n\tDXGI_DDI_ERR_NONEXCLUSIVE                                                 Handle        = 0x887B0003\n\tD3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS                                 Handle        = 0x88790001\n\tD3D10_ERROR_FILE_NOT_FOUND                                                Handle        = 0x88790002\n\tD3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS                                 Handle        = 0x887C0001\n\tD3D11_ERROR_FILE_NOT_FOUND                                                Handle        = 0x887C0002\n\tD3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS                                  Handle        = 0x887C0003\n\tD3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD                  Handle        = 0x887C0004\n\tD3D12_ERROR_ADAPTER_NOT_FOUND                                             Handle        = 0x887E0001\n\tD3D12_ERROR_DRIVER_VERSION_MISMATCH                                       Handle        = 0x887E0002\n\tD2DERR_WRONG_STATE                                                        Handle        = 0x88990001\n\tD2DERR_NOT_INITIALIZED                                                    Handle        = 0x88990002\n\tD2DERR_UNSUPPORTED_OPERATION                                              Handle        = 0x88990003\n\tD2DERR_SCANNER_FAILED                                                     Handle        = 0x88990004\n\tD2DERR_SCREEN_ACCESS_DENIED                                               Handle        = 0x88990005\n\tD2DERR_DISPLAY_STATE_INVALID                                              Handle        = 0x88990006\n\tD2DERR_ZERO_VECTOR                                                        Handle        = 0x88990007\n\tD2DERR_INTERNAL_ERROR                                                     Handle        = 0x88990008\n\tD2DERR_DISPLAY_FORMAT_NOT_SUPPORTED                                       Handle        = 0x88990009\n\tD2DERR_INVALID_CALL                                                       Handle        = 0x8899000A\n\tD2DERR_NO_HARDWARE_DEVICE                                                 Handle        = 0x8899000B\n\tD2DERR_RECREATE_TARGET                                                    Handle        = 0x8899000C\n\tD2DERR_TOO_MANY_SHADER_ELEMENTS                                           Handle        = 0x8899000D\n\tD2DERR_SHADER_COMPILE_FAILED                                              Handle        = 0x8899000E\n\tD2DERR_MAX_TEXTURE_SIZE_EXCEEDED                                          Handle        = 0x8899000F\n\tD2DERR_UNSUPPORTED_VERSION                                                Handle        = 0x88990010\n\tD2DERR_BAD_NUMBER                                                         Handle        = 0x88990011\n\tD2DERR_WRONG_FACTORY                                                      Handle        = 0x88990012\n\tD2DERR_LAYER_ALREADY_IN_USE                                               Handle        = 0x88990013\n\tD2DERR_POP_CALL_DID_NOT_MATCH_PUSH                                        Handle        = 0x88990014\n\tD2DERR_WRONG_RESOURCE_DOMAIN                                              Handle        = 0x88990015\n\tD2DERR_PUSH_POP_UNBALANCED                                                Handle        = 0x88990016\n\tD2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT                                Handle        = 0x88990017\n\tD2DERR_INCOMPATIBLE_BRUSH_TYPES                                           Handle        = 0x88990018\n\tD2DERR_WIN32_ERROR                                                        Handle        = 0x88990019\n\tD2DERR_TARGET_NOT_GDI_COMPATIBLE                                          Handle        = 0x8899001A\n\tD2DERR_TEXT_EFFECT_IS_WRONG_TYPE                                          Handle        = 0x8899001B\n\tD2DERR_TEXT_RENDERER_NOT_RELEASED                                         Handle        = 0x8899001C\n\tD2DERR_EXCEEDS_MAX_BITMAP_SIZE                                            Handle        = 0x8899001D\n\tD2DERR_INVALID_GRAPH_CONFIGURATION                                        Handle        = 0x8899001E\n\tD2DERR_INVALID_INTERNAL_GRAPH_CONFIGURATION                               Handle        = 0x8899001F\n\tD2DERR_CYCLIC_GRAPH                                                       Handle        = 0x88990020\n\tD2DERR_BITMAP_CANNOT_DRAW                                                 Handle        = 0x88990021\n\tD2DERR_OUTSTANDING_BITMAP_REFERENCES                                      Handle        = 0x88990022\n\tD2DERR_ORIGINAL_TARGET_NOT_BOUND                                          Handle        = 0x88990023\n\tD2DERR_INVALID_TARGET                                                     Handle        = 0x88990024\n\tD2DERR_BITMAP_BOUND_AS_TARGET                                             Handle        = 0x88990025\n\tD2DERR_INSUFFICIENT_DEVICE_CAPABILITIES                                   Handle        = 0x88990026\n\tD2DERR_INTERMEDIATE_TOO_LARGE                                             Handle        = 0x88990027\n\tD2DERR_EFFECT_IS_NOT_REGISTERED                                           Handle        = 0x88990028\n\tD2DERR_INVALID_PROPERTY                                                   Handle        = 0x88990029\n\tD2DERR_NO_SUBPROPERTIES                                                   Handle        = 0x8899002A\n\tD2DERR_PRINT_JOB_CLOSED                                                   Handle        = 0x8899002B\n\tD2DERR_PRINT_FORMAT_NOT_SUPPORTED                                         Handle        = 0x8899002C\n\tD2DERR_TOO_MANY_TRANSFORM_INPUTS                                          Handle        = 0x8899002D\n\tD2DERR_INVALID_GLYPH_IMAGE                                                Handle        = 0x8899002E\n\tDWRITE_E_FILEFORMAT                                                       Handle        = 0x88985000\n\tDWRITE_E_UNEXPECTED                                                       Handle        = 0x88985001\n\tDWRITE_E_NOFONT                                                           Handle        = 0x88985002\n\tDWRITE_E_FILENOTFOUND                                                     Handle        = 0x88985003\n\tDWRITE_E_FILEACCESS                                                       Handle        = 0x88985004\n\tDWRITE_E_FONTCOLLECTIONOBSOLETE                                           Handle        = 0x88985005\n\tDWRITE_E_ALREADYREGISTERED                                                Handle        = 0x88985006\n\tDWRITE_E_CACHEFORMAT                                                      Handle        = 0x88985007\n\tDWRITE_E_CACHEVERSION                                                     Handle        = 0x88985008\n\tDWRITE_E_UNSUPPORTEDOPERATION                                             Handle        = 0x88985009\n\tDWRITE_E_TEXTRENDERERINCOMPATIBLE                                         Handle        = 0x8898500A\n\tDWRITE_E_FLOWDIRECTIONCONFLICTS                                           Handle        = 0x8898500B\n\tDWRITE_E_NOCOLOR                                                          Handle        = 0x8898500C\n\tDWRITE_E_REMOTEFONT                                                       Handle        = 0x8898500D\n\tDWRITE_E_DOWNLOADCANCELLED                                                Handle        = 0x8898500E\n\tDWRITE_E_DOWNLOADFAILED                                                   Handle        = 0x8898500F\n\tDWRITE_E_TOOMANYDOWNLOADS                                                 Handle        = 0x88985010\n\tWINCODEC_ERR_WRONGSTATE                                                   Handle        = 0x88982F04\n\tWINCODEC_ERR_VALUEOUTOFRANGE                                              Handle        = 0x88982F05\n\tWINCODEC_ERR_UNKNOWNIMAGEFORMAT                                           Handle        = 0x88982F07\n\tWINCODEC_ERR_UNSUPPORTEDVERSION                                           Handle        = 0x88982F0B\n\tWINCODEC_ERR_NOTINITIALIZED                                               Handle        = 0x88982F0C\n\tWINCODEC_ERR_ALREADYLOCKED                                                Handle        = 0x88982F0D\n\tWINCODEC_ERR_PROPERTYNOTFOUND                                             Handle        = 0x88982F40\n\tWINCODEC_ERR_PROPERTYNOTSUPPORTED                                         Handle        = 0x88982F41\n\tWINCODEC_ERR_PROPERTYSIZE                                                 Handle        = 0x88982F42\n\tWINCODEC_ERR_CODECPRESENT                                                 Handle        = 0x88982F43\n\tWINCODEC_ERR_CODECNOTHUMBNAIL                                             Handle        = 0x88982F44\n\tWINCODEC_ERR_PALETTEUNAVAILABLE                                           Handle        = 0x88982F45\n\tWINCODEC_ERR_CODECTOOMANYSCANLINES                                        Handle        = 0x88982F46\n\tWINCODEC_ERR_INTERNALERROR                                                Handle        = 0x88982F48\n\tWINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS                             Handle        = 0x88982F49\n\tWINCODEC_ERR_COMPONENTNOTFOUND                                            Handle        = 0x88982F50\n\tWINCODEC_ERR_IMAGESIZEOUTOFRANGE                                          Handle        = 0x88982F51\n\tWINCODEC_ERR_TOOMUCHMETADATA                                              Handle        = 0x88982F52\n\tWINCODEC_ERR_BADIMAGE                                                     Handle        = 0x88982F60\n\tWINCODEC_ERR_BADHEADER                                                    Handle        = 0x88982F61\n\tWINCODEC_ERR_FRAMEMISSING                                                 Handle        = 0x88982F62\n\tWINCODEC_ERR_BADMETADATAHEADER                                            Handle        = 0x88982F63\n\tWINCODEC_ERR_BADSTREAMDATA                                                Handle        = 0x88982F70\n\tWINCODEC_ERR_STREAMWRITE                                                  Handle        = 0x88982F71\n\tWINCODEC_ERR_STREAMREAD                                                   Handle        = 0x88982F72\n\tWINCODEC_ERR_STREAMNOTAVAILABLE                                           Handle        = 0x88982F73\n\tWINCODEC_ERR_UNSUPPORTEDPIXELFORMAT                                       Handle        = 0x88982F80\n\tWINCODEC_ERR_UNSUPPORTEDOPERATION                                         Handle        = 0x88982F81\n\tWINCODEC_ERR_INVALIDREGISTRATION                                          Handle        = 0x88982F8A\n\tWINCODEC_ERR_COMPONENTINITIALIZEFAILURE                                   Handle        = 0x88982F8B\n\tWINCODEC_ERR_INSUFFICIENTBUFFER                                           Handle        = 0x88982F8C\n\tWINCODEC_ERR_DUPLICATEMETADATAPRESENT                                     Handle        = 0x88982F8D\n\tWINCODEC_ERR_PROPERTYUNEXPECTEDTYPE                                       Handle        = 0x88982F8E\n\tWINCODEC_ERR_UNEXPECTEDSIZE                                               Handle        = 0x88982F8F\n\tWINCODEC_ERR_INVALIDQUERYREQUEST                                          Handle        = 0x88982F90\n\tWINCODEC_ERR_UNEXPECTEDMETADATATYPE                                       Handle        = 0x88982F91\n\tWINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT                               Handle        = 0x88982F92\n\tWINCODEC_ERR_INVALIDQUERYCHARACTER                                        Handle        = 0x88982F93\n\tWINCODEC_ERR_WIN32ERROR                                                   Handle        = 0x88982F94\n\tWINCODEC_ERR_INVALIDPROGRESSIVELEVEL                                      Handle        = 0x88982F95\n\tWINCODEC_ERR_INVALIDJPEGSCANINDEX                                         Handle        = 0x88982F96\n\tMILERR_OBJECTBUSY                                                         Handle        = 0x88980001\n\tMILERR_INSUFFICIENTBUFFER                                                 Handle        = 0x88980002\n\tMILERR_WIN32ERROR                                                         Handle        = 0x88980003\n\tMILERR_SCANNER_FAILED                                                     Handle        = 0x88980004\n\tMILERR_SCREENACCESSDENIED                                                 Handle        = 0x88980005\n\tMILERR_DISPLAYSTATEINVALID                                                Handle        = 0x88980006\n\tMILERR_NONINVERTIBLEMATRIX                                                Handle        = 0x88980007\n\tMILERR_ZEROVECTOR                                                         Handle        = 0x88980008\n\tMILERR_TERMINATED                                                         Handle        = 0x88980009\n\tMILERR_BADNUMBER                                                          Handle        = 0x8898000A\n\tMILERR_INTERNALERROR                                                      Handle        = 0x88980080\n\tMILERR_DISPLAYFORMATNOTSUPPORTED                                          Handle        = 0x88980084\n\tMILERR_INVALIDCALL                                                        Handle        = 0x88980085\n\tMILERR_ALREADYLOCKED                                                      Handle        = 0x88980086\n\tMILERR_NOTLOCKED                                                          Handle        = 0x88980087\n\tMILERR_DEVICECANNOTRENDERTEXT                                             Handle        = 0x88980088\n\tMILERR_GLYPHBITMAPMISSED                                                  Handle        = 0x88980089\n\tMILERR_MALFORMEDGLYPHCACHE                                                Handle        = 0x8898008A\n\tMILERR_GENERIC_IGNORE                                                     Handle        = 0x8898008B\n\tMILERR_MALFORMED_GUIDELINE_DATA                                           Handle        = 0x8898008C\n\tMILERR_NO_HARDWARE_DEVICE                                                 Handle        = 0x8898008D\n\tMILERR_NEED_RECREATE_AND_PRESENT                                          Handle        = 0x8898008E\n\tMILERR_ALREADY_INITIALIZED                                                Handle        = 0x8898008F\n\tMILERR_MISMATCHED_SIZE                                                    Handle        = 0x88980090\n\tMILERR_NO_REDIRECTION_SURFACE_AVAILABLE                                   Handle        = 0x88980091\n\tMILERR_REMOTING_NOT_SUPPORTED                                             Handle        = 0x88980092\n\tMILERR_QUEUED_PRESENT_NOT_SUPPORTED                                       Handle        = 0x88980093\n\tMILERR_NOT_QUEUING_PRESENTS                                               Handle        = 0x88980094\n\tMILERR_NO_REDIRECTION_SURFACE_RETRY_LATER                                 Handle        = 0x88980095\n\tMILERR_TOOMANYSHADERELEMNTS                                               Handle        = 0x88980096\n\tMILERR_MROW_READLOCK_FAILED                                               Handle        = 0x88980097\n\tMILERR_MROW_UPDATE_FAILED                                                 Handle        = 0x88980098\n\tMILERR_SHADER_COMPILE_FAILED                                              Handle        = 0x88980099\n\tMILERR_MAX_TEXTURE_SIZE_EXCEEDED                                          Handle        = 0x8898009A\n\tMILERR_QPC_TIME_WENT_BACKWARD                                             Handle        = 0x8898009B\n\tMILERR_DXGI_ENUMERATION_OUT_OF_SYNC                                       Handle        = 0x8898009D\n\tMILERR_ADAPTER_NOT_FOUND                                                  Handle        = 0x8898009E\n\tMILERR_COLORSPACE_NOT_SUPPORTED                                           Handle        = 0x8898009F\n\tMILERR_PREFILTER_NOT_SUPPORTED                                            Handle        = 0x889800A0\n\tMILERR_DISPLAYID_ACCESS_DENIED                                            Handle        = 0x889800A1\n\tUCEERR_INVALIDPACKETHEADER                                                Handle        = 0x88980400\n\tUCEERR_UNKNOWNPACKET                                                      Handle        = 0x88980401\n\tUCEERR_ILLEGALPACKET                                                      Handle        = 0x88980402\n\tUCEERR_MALFORMEDPACKET                                                    Handle        = 0x88980403\n\tUCEERR_ILLEGALHANDLE                                                      Handle        = 0x88980404\n\tUCEERR_HANDLELOOKUPFAILED                                                 Handle        = 0x88980405\n\tUCEERR_RENDERTHREADFAILURE                                                Handle        = 0x88980406\n\tUCEERR_CTXSTACKFRSTTARGETNULL                                             Handle        = 0x88980407\n\tUCEERR_CONNECTIONIDLOOKUPFAILED                                           Handle        = 0x88980408\n\tUCEERR_BLOCKSFULL                                                         Handle        = 0x88980409\n\tUCEERR_MEMORYFAILURE                                                      Handle        = 0x8898040A\n\tUCEERR_PACKETRECORDOUTOFRANGE                                             Handle        = 0x8898040B\n\tUCEERR_ILLEGALRECORDTYPE                                                  Handle        = 0x8898040C\n\tUCEERR_OUTOFHANDLES                                                       Handle        = 0x8898040D\n\tUCEERR_UNCHANGABLE_UPDATE_ATTEMPTED                                       Handle        = 0x8898040E\n\tUCEERR_NO_MULTIPLE_WORKER_THREADS                                         Handle        = 0x8898040F\n\tUCEERR_REMOTINGNOTSUPPORTED                                               Handle        = 0x88980410\n\tUCEERR_MISSINGENDCOMMAND                                                  Handle        = 0x88980411\n\tUCEERR_MISSINGBEGINCOMMAND                                                Handle        = 0x88980412\n\tUCEERR_CHANNELSYNCTIMEDOUT                                                Handle        = 0x88980413\n\tUCEERR_CHANNELSYNCABANDONED                                               Handle        = 0x88980414\n\tUCEERR_UNSUPPORTEDTRANSPORTVERSION                                        Handle        = 0x88980415\n\tUCEERR_TRANSPORTUNAVAILABLE                                               Handle        = 0x88980416\n\tUCEERR_FEEDBACK_UNSUPPORTED                                               Handle        = 0x88980417\n\tUCEERR_COMMANDTRANSPORTDENIED                                             Handle        = 0x88980418\n\tUCEERR_GRAPHICSSTREAMUNAVAILABLE                                          Handle        = 0x88980419\n\tUCEERR_GRAPHICSSTREAMALREADYOPEN                                          Handle        = 0x88980420\n\tUCEERR_TRANSPORTDISCONNECTED                                              Handle        = 0x88980421\n\tUCEERR_TRANSPORTOVERLOADED                                                Handle        = 0x88980422\n\tUCEERR_PARTITION_ZOMBIED                                                  Handle        = 0x88980423\n\tMILAVERR_NOCLOCK                                                          Handle        = 0x88980500\n\tMILAVERR_NOMEDIATYPE                                                      Handle        = 0x88980501\n\tMILAVERR_NOVIDEOMIXER                                                     Handle        = 0x88980502\n\tMILAVERR_NOVIDEOPRESENTER                                                 Handle        = 0x88980503\n\tMILAVERR_NOREADYFRAMES                                                    Handle        = 0x88980504\n\tMILAVERR_MODULENOTLOADED                                                  Handle        = 0x88980505\n\tMILAVERR_WMPFACTORYNOTREGISTERED                                          Handle        = 0x88980506\n\tMILAVERR_INVALIDWMPVERSION                                                Handle        = 0x88980507\n\tMILAVERR_INSUFFICIENTVIDEORESOURCES                                       Handle        = 0x88980508\n\tMILAVERR_VIDEOACCELERATIONNOTAVAILABLE                                    Handle        = 0x88980509\n\tMILAVERR_REQUESTEDTEXTURETOOBIG                                           Handle        = 0x8898050A\n\tMILAVERR_SEEKFAILED                                                       Handle        = 0x8898050B\n\tMILAVERR_UNEXPECTEDWMPFAILURE                                             Handle        = 0x8898050C\n\tMILAVERR_MEDIAPLAYERCLOSED                                                Handle        = 0x8898050D\n\tMILAVERR_UNKNOWNHARDWAREERROR                                             Handle        = 0x8898050E\n\tMILEFFECTSERR_UNKNOWNPROPERTY                                             Handle        = 0x8898060E\n\tMILEFFECTSERR_EFFECTNOTPARTOFGROUP                                        Handle        = 0x8898060F\n\tMILEFFECTSERR_NOINPUTSOURCEATTACHED                                       Handle        = 0x88980610\n\tMILEFFECTSERR_CONNECTORNOTCONNECTED                                       Handle        = 0x88980611\n\tMILEFFECTSERR_CONNECTORNOTASSOCIATEDWITHEFFECT                            Handle        = 0x88980612\n\tMILEFFECTSERR_RESERVED                                                    Handle        = 0x88980613\n\tMILEFFECTSERR_CYCLEDETECTED                                               Handle        = 0x88980614\n\tMILEFFECTSERR_EFFECTINMORETHANONEGRAPH                                    Handle        = 0x88980615\n\tMILEFFECTSERR_EFFECTALREADYINAGRAPH                                       Handle        = 0x88980616\n\tMILEFFECTSERR_EFFECTHASNOCHILDREN                                         Handle        = 0x88980617\n\tMILEFFECTSERR_ALREADYATTACHEDTOLISTENER                                   Handle        = 0x88980618\n\tMILEFFECTSERR_NOTAFFINETRANSFORM                                          Handle        = 0x88980619\n\tMILEFFECTSERR_EMPTYBOUNDS                                                 Handle        = 0x8898061A\n\tMILEFFECTSERR_OUTPUTSIZETOOLARGE                                          Handle        = 0x8898061B\n\tDWMERR_STATE_TRANSITION_FAILED                                            Handle        = 0x88980700\n\tDWMERR_THEME_FAILED                                                       Handle        = 0x88980701\n\tDWMERR_CATASTROPHIC_FAILURE                                               Handle        = 0x88980702\n\tDCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSED                                Handle        = 0x88980800\n\tDCOMPOSITION_ERROR_SURFACE_BEING_RENDERED                                 Handle        = 0x88980801\n\tDCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED                             Handle        = 0x88980802\n\tONL_E_INVALID_AUTHENTICATION_TARGET                                       Handle        = 0x80860001\n\tONL_E_ACCESS_DENIED_BY_TOU                                                Handle        = 0x80860002\n\tONL_E_INVALID_APPLICATION                                                 Handle        = 0x80860003\n\tONL_E_PASSWORD_UPDATE_REQUIRED                                            Handle        = 0x80860004\n\tONL_E_ACCOUNT_UPDATE_REQUIRED                                             Handle        = 0x80860005\n\tONL_E_FORCESIGNIN                                                         Handle        = 0x80860006\n\tONL_E_ACCOUNT_LOCKED                                                      Handle        = 0x80860007\n\tONL_E_PARENTAL_CONSENT_REQUIRED                                           Handle        = 0x80860008\n\tONL_E_EMAIL_VERIFICATION_REQUIRED                                         Handle        = 0x80860009\n\tONL_E_ACCOUNT_SUSPENDED_COMPROIMISE                                       Handle        = 0x8086000A\n\tONL_E_ACCOUNT_SUSPENDED_ABUSE                                             Handle        = 0x8086000B\n\tONL_E_ACTION_REQUIRED                                                     Handle        = 0x8086000C\n\tONL_CONNECTION_COUNT_LIMIT                                                Handle        = 0x8086000D\n\tONL_E_CONNECTED_ACCOUNT_CAN_NOT_SIGNOUT                                   Handle        = 0x8086000E\n\tONL_E_USER_AUTHENTICATION_REQUIRED                                        Handle        = 0x8086000F\n\tONL_E_REQUEST_THROTTLED                                                   Handle        = 0x80860010\n\tFA_E_MAX_PERSISTED_ITEMS_REACHED                                          Handle        = 0x80270220\n\tFA_E_HOMEGROUP_NOT_AVAILABLE                                              Handle        = 0x80270222\n\tE_MONITOR_RESOLUTION_TOO_LOW                                              Handle        = 0x80270250\n\tE_ELEVATED_ACTIVATION_NOT_SUPPORTED                                       Handle        = 0x80270251\n\tE_UAC_DISABLED                                                            Handle        = 0x80270252\n\tE_FULL_ADMIN_NOT_SUPPORTED                                                Handle        = 0x80270253\n\tE_APPLICATION_NOT_REGISTERED                                              Handle        = 0x80270254\n\tE_MULTIPLE_EXTENSIONS_FOR_APPLICATION                                     Handle        = 0x80270255\n\tE_MULTIPLE_PACKAGES_FOR_FAMILY                                            Handle        = 0x80270256\n\tE_APPLICATION_MANAGER_NOT_RUNNING                                         Handle        = 0x80270257\n\tS_STORE_LAUNCHED_FOR_REMEDIATION                                          Handle        = 0x00270258\n\tS_APPLICATION_ACTIVATION_ERROR_HANDLED_BY_DIALOG                          Handle        = 0x00270259\n\tE_APPLICATION_ACTIVATION_TIMED_OUT                                        Handle        = 0x8027025A\n\tE_APPLICATION_ACTIVATION_EXEC_FAILURE                                     Handle        = 0x8027025B\n\tE_APPLICATION_TEMPORARY_LICENSE_ERROR                                     Handle        = 0x8027025C\n\tE_APPLICATION_TRIAL_LICENSE_EXPIRED                                       Handle        = 0x8027025D\n\tE_SKYDRIVE_ROOT_TARGET_FILE_SYSTEM_NOT_SUPPORTED                          Handle        = 0x80270260\n\tE_SKYDRIVE_ROOT_TARGET_OVERLAP                                            Handle        = 0x80270261\n\tE_SKYDRIVE_ROOT_TARGET_CANNOT_INDEX                                       Handle        = 0x80270262\n\tE_SKYDRIVE_FILE_NOT_UPLOADED                                              Handle        = 0x80270263\n\tE_SKYDRIVE_UPDATE_AVAILABILITY_FAIL                                       Handle        = 0x80270264\n\tE_SKYDRIVE_ROOT_TARGET_VOLUME_ROOT_NOT_SUPPORTED                          Handle        = 0x80270265\n\tE_SYNCENGINE_FILE_SIZE_OVER_LIMIT                                         Handle        = 0x8802B001\n\tE_SYNCENGINE_FILE_SIZE_EXCEEDS_REMAINING_QUOTA                            Handle        = 0x8802B002\n\tE_SYNCENGINE_UNSUPPORTED_FILE_NAME                                        Handle        = 0x8802B003\n\tE_SYNCENGINE_FOLDER_ITEM_COUNT_LIMIT_EXCEEDED                             Handle        = 0x8802B004\n\tE_SYNCENGINE_FILE_SYNC_PARTNER_ERROR                                      Handle        = 0x8802B005\n\tE_SYNCENGINE_SYNC_PAUSED_BY_SERVICE                                       Handle        = 0x8802B006\n\tE_SYNCENGINE_FILE_IDENTIFIER_UNKNOWN                                      Handle        = 0x8802C002\n\tE_SYNCENGINE_SERVICE_AUTHENTICATION_FAILED                                Handle        = 0x8802C003\n\tE_SYNCENGINE_UNKNOWN_SERVICE_ERROR                                        Handle        = 0x8802C004\n\tE_SYNCENGINE_SERVICE_RETURNED_UNEXPECTED_SIZE                             Handle        = 0x8802C005\n\tE_SYNCENGINE_REQUEST_BLOCKED_BY_SERVICE                                   Handle        = 0x8802C006\n\tE_SYNCENGINE_REQUEST_BLOCKED_DUE_TO_CLIENT_ERROR                          Handle        = 0x8802C007\n\tE_SYNCENGINE_FOLDER_INACCESSIBLE                                          Handle        = 0x8802D001\n\tE_SYNCENGINE_UNSUPPORTED_FOLDER_NAME                                      Handle        = 0x8802D002\n\tE_SYNCENGINE_UNSUPPORTED_MARKET                                           Handle        = 0x8802D003\n\tE_SYNCENGINE_PATH_LENGTH_LIMIT_EXCEEDED                                   Handle        = 0x8802D004\n\tE_SYNCENGINE_REMOTE_PATH_LENGTH_LIMIT_EXCEEDED                            Handle        = 0x8802D005\n\tE_SYNCENGINE_CLIENT_UPDATE_NEEDED                                         Handle        = 0x8802D006\n\tE_SYNCENGINE_PROXY_AUTHENTICATION_REQUIRED                                Handle        = 0x8802D007\n\tE_SYNCENGINE_STORAGE_SERVICE_PROVISIONING_FAILED                          Handle        = 0x8802D008\n\tE_SYNCENGINE_UNSUPPORTED_REPARSE_POINT                                    Handle        = 0x8802D009\n\tE_SYNCENGINE_STORAGE_SERVICE_BLOCKED                                      Handle        = 0x8802D00A\n\tE_SYNCENGINE_FOLDER_IN_REDIRECTION                                        Handle        = 0x8802D00B\n\tEAS_E_POLICY_NOT_MANAGED_BY_OS                                            Handle        = 0x80550001\n\tEAS_E_POLICY_COMPLIANT_WITH_ACTIONS                                       Handle        = 0x80550002\n\tEAS_E_REQUESTED_POLICY_NOT_ENFORCEABLE                                    Handle        = 0x80550003\n\tEAS_E_CURRENT_USER_HAS_BLANK_PASSWORD                                     Handle        = 0x80550004\n\tEAS_E_REQUESTED_POLICY_PASSWORD_EXPIRATION_INCOMPATIBLE                   Handle        = 0x80550005\n\tEAS_E_USER_CANNOT_CHANGE_PASSWORD                                         Handle        = 0x80550006\n\tEAS_E_ADMINS_HAVE_BLANK_PASSWORD                                          Handle        = 0x80550007\n\tEAS_E_ADMINS_CANNOT_CHANGE_PASSWORD                                       Handle        = 0x80550008\n\tEAS_E_LOCAL_CONTROLLED_USERS_CANNOT_CHANGE_PASSWORD                       Handle        = 0x80550009\n\tEAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CONNECTED_ADMINS                Handle        = 0x8055000A\n\tEAS_E_CONNECTED_ADMINS_NEED_TO_CHANGE_PASSWORD                            Handle        = 0x8055000B\n\tEAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CURRENT_CONNECTED_USER          Handle        = 0x8055000C\n\tEAS_E_CURRENT_CONNECTED_USER_NEED_TO_CHANGE_PASSWORD                      Handle        = 0x8055000D\n\tWEB_E_UNSUPPORTED_FORMAT                                                  Handle        = 0x83750001\n\tWEB_E_INVALID_XML                                                         Handle        = 0x83750002\n\tWEB_E_MISSING_REQUIRED_ELEMENT                                            Handle        = 0x83750003\n\tWEB_E_MISSING_REQUIRED_ATTRIBUTE                                          Handle        = 0x83750004\n\tWEB_E_UNEXPECTED_CONTENT                                                  Handle        = 0x83750005\n\tWEB_E_RESOURCE_TOO_LARGE                                                  Handle        = 0x83750006\n\tWEB_E_INVALID_JSON_STRING                                                 Handle        = 0x83750007\n\tWEB_E_INVALID_JSON_NUMBER                                                 Handle        = 0x83750008\n\tWEB_E_JSON_VALUE_NOT_FOUND                                                Handle        = 0x83750009\n\tHTTP_E_STATUS_UNEXPECTED                                                  Handle        = 0x80190001\n\tHTTP_E_STATUS_UNEXPECTED_REDIRECTION                                      Handle        = 0x80190003\n\tHTTP_E_STATUS_UNEXPECTED_CLIENT_ERROR                                     Handle        = 0x80190004\n\tHTTP_E_STATUS_UNEXPECTED_SERVER_ERROR                                     Handle        = 0x80190005\n\tHTTP_E_STATUS_AMBIGUOUS                                                   Handle        = 0x8019012C\n\tHTTP_E_STATUS_MOVED                                                       Handle        = 0x8019012D\n\tHTTP_E_STATUS_REDIRECT                                                    Handle        = 0x8019012E\n\tHTTP_E_STATUS_REDIRECT_METHOD                                             Handle        = 0x8019012F\n\tHTTP_E_STATUS_NOT_MODIFIED                                                Handle        = 0x80190130\n\tHTTP_E_STATUS_USE_PROXY                                                   Handle        = 0x80190131\n\tHTTP_E_STATUS_REDIRECT_KEEP_VERB                                          Handle        = 0x80190133\n\tHTTP_E_STATUS_BAD_REQUEST                                                 Handle        = 0x80190190\n\tHTTP_E_STATUS_DENIED                                                      Handle        = 0x80190191\n\tHTTP_E_STATUS_PAYMENT_REQ                                                 Handle        = 0x80190192\n\tHTTP_E_STATUS_FORBIDDEN                                                   Handle        = 0x80190193\n\tHTTP_E_STATUS_NOT_FOUND                                                   Handle        = 0x80190194\n\tHTTP_E_STATUS_BAD_METHOD                                                  Handle        = 0x80190195\n\tHTTP_E_STATUS_NONE_ACCEPTABLE                                             Handle        = 0x80190196\n\tHTTP_E_STATUS_PROXY_AUTH_REQ                                              Handle        = 0x80190197\n\tHTTP_E_STATUS_REQUEST_TIMEOUT                                             Handle        = 0x80190198\n\tHTTP_E_STATUS_CONFLICT                                                    Handle        = 0x80190199\n\tHTTP_E_STATUS_GONE                                                        Handle        = 0x8019019A\n\tHTTP_E_STATUS_LENGTH_REQUIRED                                             Handle        = 0x8019019B\n\tHTTP_E_STATUS_PRECOND_FAILED                                              Handle        = 0x8019019C\n\tHTTP_E_STATUS_REQUEST_TOO_LARGE                                           Handle        = 0x8019019D\n\tHTTP_E_STATUS_URI_TOO_LONG                                                Handle        = 0x8019019E\n\tHTTP_E_STATUS_UNSUPPORTED_MEDIA                                           Handle        = 0x8019019F\n\tHTTP_E_STATUS_RANGE_NOT_SATISFIABLE                                       Handle        = 0x801901A0\n\tHTTP_E_STATUS_EXPECTATION_FAILED                                          Handle        = 0x801901A1\n\tHTTP_E_STATUS_SERVER_ERROR                                                Handle        = 0x801901F4\n\tHTTP_E_STATUS_NOT_SUPPORTED                                               Handle        = 0x801901F5\n\tHTTP_E_STATUS_BAD_GATEWAY                                                 Handle        = 0x801901F6\n\tHTTP_E_STATUS_SERVICE_UNAVAIL                                             Handle        = 0x801901F7\n\tHTTP_E_STATUS_GATEWAY_TIMEOUT                                             Handle        = 0x801901F8\n\tHTTP_E_STATUS_VERSION_NOT_SUP                                             Handle        = 0x801901F9\n\tE_INVALID_PROTOCOL_OPERATION                                              Handle        = 0x83760001\n\tE_INVALID_PROTOCOL_FORMAT                                                 Handle        = 0x83760002\n\tE_PROTOCOL_EXTENSIONS_NOT_SUPPORTED                                       Handle        = 0x83760003\n\tE_SUBPROTOCOL_NOT_SUPPORTED                                               Handle        = 0x83760004\n\tE_PROTOCOL_VERSION_NOT_SUPPORTED                                          Handle        = 0x83760005\n\tINPUT_E_OUT_OF_ORDER                                                      Handle        = 0x80400000\n\tINPUT_E_REENTRANCY                                                        Handle        = 0x80400001\n\tINPUT_E_MULTIMODAL                                                        Handle        = 0x80400002\n\tINPUT_E_PACKET                                                            Handle        = 0x80400003\n\tINPUT_E_FRAME                                                             Handle        = 0x80400004\n\tINPUT_E_HISTORY                                                           Handle        = 0x80400005\n\tINPUT_E_DEVICE_INFO                                                       Handle        = 0x80400006\n\tINPUT_E_TRANSFORM                                                         Handle        = 0x80400007\n\tINPUT_E_DEVICE_PROPERTY                                                   Handle        = 0x80400008\n\tINET_E_INVALID_URL                                                        Handle        = 0x800C0002\n\tINET_E_NO_SESSION                                                         Handle        = 0x800C0003\n\tINET_E_CANNOT_CONNECT                                                     Handle        = 0x800C0004\n\tINET_E_RESOURCE_NOT_FOUND                                                 Handle        = 0x800C0005\n\tINET_E_OBJECT_NOT_FOUND                                                   Handle        = 0x800C0006\n\tINET_E_DATA_NOT_AVAILABLE                                                 Handle        = 0x800C0007\n\tINET_E_DOWNLOAD_FAILURE                                                   Handle        = 0x800C0008\n\tINET_E_AUTHENTICATION_REQUIRED                                            Handle        = 0x800C0009\n\tINET_E_NO_VALID_MEDIA                                                     Handle        = 0x800C000A\n\tINET_E_CONNECTION_TIMEOUT                                                 Handle        = 0x800C000B\n\tINET_E_INVALID_REQUEST                                                    Handle        = 0x800C000C\n\tINET_E_UNKNOWN_PROTOCOL                                                   Handle        = 0x800C000D\n\tINET_E_SECURITY_PROBLEM                                                   Handle        = 0x800C000E\n\tINET_E_CANNOT_LOAD_DATA                                                   Handle        = 0x800C000F\n\tINET_E_CANNOT_INSTANTIATE_OBJECT                                          Handle        = 0x800C0010\n\tINET_E_INVALID_CERTIFICATE                                                Handle        = 0x800C0019\n\tINET_E_REDIRECT_FAILED                                                    Handle        = 0x800C0014\n\tINET_E_REDIRECT_TO_DIR                                                    Handle        = 0x800C0015\n\tERROR_DBG_CREATE_PROCESS_FAILURE_LOCKDOWN                                 Handle        = 0x80B00001\n\tERROR_DBG_ATTACH_PROCESS_FAILURE_LOCKDOWN                                 Handle        = 0x80B00002\n\tERROR_DBG_CONNECT_SERVER_FAILURE_LOCKDOWN                                 Handle        = 0x80B00003\n\tERROR_DBG_START_SERVER_FAILURE_LOCKDOWN                                   Handle        = 0x80B00004\n\tERROR_IO_PREEMPTED                                                        Handle        = 0x89010001\n\tJSCRIPT_E_CANTEXECUTE                                                     Handle        = 0x89020001\n\tWEP_E_NOT_PROVISIONED_ON_ALL_VOLUMES                                      Handle        = 0x88010001\n\tWEP_E_FIXED_DATA_NOT_SUPPORTED                                            Handle        = 0x88010002\n\tWEP_E_HARDWARE_NOT_COMPLIANT                                              Handle        = 0x88010003\n\tWEP_E_LOCK_NOT_CONFIGURED                                                 Handle        = 0x88010004\n\tWEP_E_PROTECTION_SUSPENDED                                                Handle        = 0x88010005\n\tWEP_E_NO_LICENSE                                                          Handle        = 0x88010006\n\tWEP_E_OS_NOT_PROTECTED                                                    Handle        = 0x88010007\n\tWEP_E_UNEXPECTED_FAIL                                                     Handle        = 0x88010008\n\tWEP_E_BUFFER_TOO_LARGE                                                    Handle        = 0x88010009\n\tERROR_SVHDX_ERROR_STORED                                                  Handle        = 0xC05C0000\n\tERROR_SVHDX_ERROR_NOT_AVAILABLE                                           Handle        = 0xC05CFF00\n\tERROR_SVHDX_UNIT_ATTENTION_AVAILABLE                                      Handle        = 0xC05CFF01\n\tERROR_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED                          Handle        = 0xC05CFF02\n\tERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED                         Handle        = 0xC05CFF03\n\tERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED                          Handle        = 0xC05CFF04\n\tERROR_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED                        Handle        = 0xC05CFF05\n\tERROR_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED                   Handle        = 0xC05CFF06\n\tERROR_SVHDX_RESERVATION_CONFLICT                                          Handle        = 0xC05CFF07\n\tERROR_SVHDX_WRONG_FILE_TYPE                                               Handle        = 0xC05CFF08\n\tERROR_SVHDX_VERSION_MISMATCH                                              Handle        = 0xC05CFF09\n\tERROR_VHD_SHARED                                                          Handle        = 0xC05CFF0A\n\tERROR_SVHDX_NO_INITIATOR                                                  Handle        = 0xC05CFF0B\n\tERROR_VHDSET_BACKING_STORAGE_NOT_FOUND                                    Handle        = 0xC05CFF0C\n\tERROR_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP                               Handle        = 0xC05D0000\n\tERROR_SMB_BAD_CLUSTER_DIALECT                                             Handle        = 0xC05D0001\n\tWININET_E_OUT_OF_HANDLES                                                  Handle        = 0x80072EE1\n\tWININET_E_TIMEOUT                                                         Handle        = 0x80072EE2\n\tWININET_E_EXTENDED_ERROR                                                  Handle        = 0x80072EE3\n\tWININET_E_INTERNAL_ERROR                                                  Handle        = 0x80072EE4\n\tWININET_E_INVALID_URL                                                     Handle        = 0x80072EE5\n\tWININET_E_UNRECOGNIZED_SCHEME                                             Handle        = 0x80072EE6\n\tWININET_E_NAME_NOT_RESOLVED                                               Handle        = 0x80072EE7\n\tWININET_E_PROTOCOL_NOT_FOUND                                              Handle        = 0x80072EE8\n\tWININET_E_INVALID_OPTION                                                  Handle        = 0x80072EE9\n\tWININET_E_BAD_OPTION_LENGTH                                               Handle        = 0x80072EEA\n\tWININET_E_OPTION_NOT_SETTABLE                                             Handle        = 0x80072EEB\n\tWININET_E_SHUTDOWN                                                        Handle        = 0x80072EEC\n\tWININET_E_INCORRECT_USER_NAME                                             Handle        = 0x80072EED\n\tWININET_E_INCORRECT_PASSWORD                                              Handle        = 0x80072EEE\n\tWININET_E_LOGIN_FAILURE                                                   Handle        = 0x80072EEF\n\tWININET_E_INVALID_OPERATION                                               Handle        = 0x80072EF0\n\tWININET_E_OPERATION_CANCELLED                                             Handle        = 0x80072EF1\n\tWININET_E_INCORRECT_HANDLE_TYPE                                           Handle        = 0x80072EF2\n\tWININET_E_INCORRECT_HANDLE_STATE                                          Handle        = 0x80072EF3\n\tWININET_E_NOT_PROXY_REQUEST                                               Handle        = 0x80072EF4\n\tWININET_E_REGISTRY_VALUE_NOT_FOUND                                        Handle        = 0x80072EF5\n\tWININET_E_BAD_REGISTRY_PARAMETER                                          Handle        = 0x80072EF6\n\tWININET_E_NO_DIRECT_ACCESS                                                Handle        = 0x80072EF7\n\tWININET_E_NO_CONTEXT                                                      Handle        = 0x80072EF8\n\tWININET_E_NO_CALLBACK                                                     Handle        = 0x80072EF9\n\tWININET_E_REQUEST_PENDING                                                 Handle        = 0x80072EFA\n\tWININET_E_INCORRECT_FORMAT                                                Handle        = 0x80072EFB\n\tWININET_E_ITEM_NOT_FOUND                                                  Handle        = 0x80072EFC\n\tWININET_E_CANNOT_CONNECT                                                  Handle        = 0x80072EFD\n\tWININET_E_CONNECTION_ABORTED                                              Handle        = 0x80072EFE\n\tWININET_E_CONNECTION_RESET                                                Handle        = 0x80072EFF\n\tWININET_E_FORCE_RETRY                                                     Handle        = 0x80072F00\n\tWININET_E_INVALID_PROXY_REQUEST                                           Handle        = 0x80072F01\n\tWININET_E_NEED_UI                                                         Handle        = 0x80072F02\n\tWININET_E_HANDLE_EXISTS                                                   Handle        = 0x80072F04\n\tWININET_E_SEC_CERT_DATE_INVALID                                           Handle        = 0x80072F05\n\tWININET_E_SEC_CERT_CN_INVALID                                             Handle        = 0x80072F06\n\tWININET_E_HTTP_TO_HTTPS_ON_REDIR                                          Handle        = 0x80072F07\n\tWININET_E_HTTPS_TO_HTTP_ON_REDIR                                          Handle        = 0x80072F08\n\tWININET_E_MIXED_SECURITY                                                  Handle        = 0x80072F09\n\tWININET_E_CHG_POST_IS_NON_SECURE                                          Handle        = 0x80072F0A\n\tWININET_E_POST_IS_NON_SECURE                                              Handle        = 0x80072F0B\n\tWININET_E_CLIENT_AUTH_CERT_NEEDED                                         Handle        = 0x80072F0C\n\tWININET_E_INVALID_CA                                                      Handle        = 0x80072F0D\n\tWININET_E_CLIENT_AUTH_NOT_SETUP                                           Handle        = 0x80072F0E\n\tWININET_E_ASYNC_THREAD_FAILED                                             Handle        = 0x80072F0F\n\tWININET_E_REDIRECT_SCHEME_CHANGE                                          Handle        = 0x80072F10\n\tWININET_E_DIALOG_PENDING                                                  Handle        = 0x80072F11\n\tWININET_E_RETRY_DIALOG                                                    Handle        = 0x80072F12\n\tWININET_E_NO_NEW_CONTAINERS                                               Handle        = 0x80072F13\n\tWININET_E_HTTPS_HTTP_SUBMIT_REDIR                                         Handle        = 0x80072F14\n\tWININET_E_SEC_CERT_ERRORS                                                 Handle        = 0x80072F17\n\tWININET_E_SEC_CERT_REV_FAILED                                             Handle        = 0x80072F19\n\tWININET_E_HEADER_NOT_FOUND                                                Handle        = 0x80072F76\n\tWININET_E_DOWNLEVEL_SERVER                                                Handle        = 0x80072F77\n\tWININET_E_INVALID_SERVER_RESPONSE                                         Handle        = 0x80072F78\n\tWININET_E_INVALID_HEADER                                                  Handle        = 0x80072F79\n\tWININET_E_INVALID_QUERY_REQUEST                                           Handle        = 0x80072F7A\n\tWININET_E_HEADER_ALREADY_EXISTS                                           Handle        = 0x80072F7B\n\tWININET_E_REDIRECT_FAILED                                                 Handle        = 0x80072F7C\n\tWININET_E_SECURITY_CHANNEL_ERROR                                          Handle        = 0x80072F7D\n\tWININET_E_UNABLE_TO_CACHE_FILE                                            Handle        = 0x80072F7E\n\tWININET_E_TCPIP_NOT_INSTALLED                                             Handle        = 0x80072F7F\n\tWININET_E_DISCONNECTED                                                    Handle        = 0x80072F83\n\tWININET_E_SERVER_UNREACHABLE                                              Handle        = 0x80072F84\n\tWININET_E_PROXY_SERVER_UNREACHABLE                                        Handle        = 0x80072F85\n\tWININET_E_BAD_AUTO_PROXY_SCRIPT                                           Handle        = 0x80072F86\n\tWININET_E_UNABLE_TO_DOWNLOAD_SCRIPT                                       Handle        = 0x80072F87\n\tWININET_E_SEC_INVALID_CERT                                                Handle        = 0x80072F89\n\tWININET_E_SEC_CERT_REVOKED                                                Handle        = 0x80072F8A\n\tWININET_E_FAILED_DUETOSECURITYCHECK                                       Handle        = 0x80072F8B\n\tWININET_E_NOT_INITIALIZED                                                 Handle        = 0x80072F8C\n\tWININET_E_LOGIN_FAILURE_DISPLAY_ENTITY_BODY                               Handle        = 0x80072F8E\n\tWININET_E_DECODING_FAILED                                                 Handle        = 0x80072F8F\n\tWININET_E_NOT_REDIRECTED                                                  Handle        = 0x80072F80\n\tWININET_E_COOKIE_NEEDS_CONFIRMATION                                       Handle        = 0x80072F81\n\tWININET_E_COOKIE_DECLINED                                                 Handle        = 0x80072F82\n\tWININET_E_REDIRECT_NEEDS_CONFIRMATION                                     Handle        = 0x80072F88\n\tSQLITE_E_ERROR                                                            Handle        = 0x87AF0001\n\tSQLITE_E_INTERNAL                                                         Handle        = 0x87AF0002\n\tSQLITE_E_PERM                                                             Handle        = 0x87AF0003\n\tSQLITE_E_ABORT                                                            Handle        = 0x87AF0004\n\tSQLITE_E_BUSY                                                             Handle        = 0x87AF0005\n\tSQLITE_E_LOCKED                                                           Handle        = 0x87AF0006\n\tSQLITE_E_NOMEM                                                            Handle        = 0x87AF0007\n\tSQLITE_E_READONLY                                                         Handle        = 0x87AF0008\n\tSQLITE_E_INTERRUPT                                                        Handle        = 0x87AF0009\n\tSQLITE_E_IOERR                                                            Handle        = 0x87AF000A\n\tSQLITE_E_CORRUPT                                                          Handle        = 0x87AF000B\n\tSQLITE_E_NOTFOUND                                                         Handle        = 0x87AF000C\n\tSQLITE_E_FULL                                                             Handle        = 0x87AF000D\n\tSQLITE_E_CANTOPEN                                                         Handle        = 0x87AF000E\n\tSQLITE_E_PROTOCOL                                                         Handle        = 0x87AF000F\n\tSQLITE_E_EMPTY                                                            Handle        = 0x87AF0010\n\tSQLITE_E_SCHEMA                                                           Handle        = 0x87AF0011\n\tSQLITE_E_TOOBIG                                                           Handle        = 0x87AF0012\n\tSQLITE_E_CONSTRAINT                                                       Handle        = 0x87AF0013\n\tSQLITE_E_MISMATCH                                                         Handle        = 0x87AF0014\n\tSQLITE_E_MISUSE                                                           Handle        = 0x87AF0015\n\tSQLITE_E_NOLFS                                                            Handle        = 0x87AF0016\n\tSQLITE_E_AUTH                                                             Handle        = 0x87AF0017\n\tSQLITE_E_FORMAT                                                           Handle        = 0x87AF0018\n\tSQLITE_E_RANGE                                                            Handle        = 0x87AF0019\n\tSQLITE_E_NOTADB                                                           Handle        = 0x87AF001A\n\tSQLITE_E_NOTICE                                                           Handle        = 0x87AF001B\n\tSQLITE_E_WARNING                                                          Handle        = 0x87AF001C\n\tSQLITE_E_ROW                                                              Handle        = 0x87AF0064\n\tSQLITE_E_DONE                                                             Handle        = 0x87AF0065\n\tSQLITE_E_IOERR_READ                                                       Handle        = 0x87AF010A\n\tSQLITE_E_IOERR_SHORT_READ                                                 Handle        = 0x87AF020A\n\tSQLITE_E_IOERR_WRITE                                                      Handle        = 0x87AF030A\n\tSQLITE_E_IOERR_FSYNC                                                      Handle        = 0x87AF040A\n\tSQLITE_E_IOERR_DIR_FSYNC                                                  Handle        = 0x87AF050A\n\tSQLITE_E_IOERR_TRUNCATE                                                   Handle        = 0x87AF060A\n\tSQLITE_E_IOERR_FSTAT                                                      Handle        = 0x87AF070A\n\tSQLITE_E_IOERR_UNLOCK                                                     Handle        = 0x87AF080A\n\tSQLITE_E_IOERR_RDLOCK                                                     Handle        = 0x87AF090A\n\tSQLITE_E_IOERR_DELETE                                                     Handle        = 0x87AF0A0A\n\tSQLITE_E_IOERR_BLOCKED                                                    Handle        = 0x87AF0B0A\n\tSQLITE_E_IOERR_NOMEM                                                      Handle        = 0x87AF0C0A\n\tSQLITE_E_IOERR_ACCESS                                                     Handle        = 0x87AF0D0A\n\tSQLITE_E_IOERR_CHECKRESERVEDLOCK                                          Handle        = 0x87AF0E0A\n\tSQLITE_E_IOERR_LOCK                                                       Handle        = 0x87AF0F0A\n\tSQLITE_E_IOERR_CLOSE                                                      Handle        = 0x87AF100A\n\tSQLITE_E_IOERR_DIR_CLOSE                                                  Handle        = 0x87AF110A\n\tSQLITE_E_IOERR_SHMOPEN                                                    Handle        = 0x87AF120A\n\tSQLITE_E_IOERR_SHMSIZE                                                    Handle        = 0x87AF130A\n\tSQLITE_E_IOERR_SHMLOCK                                                    Handle        = 0x87AF140A\n\tSQLITE_E_IOERR_SHMMAP                                                     Handle        = 0x87AF150A\n\tSQLITE_E_IOERR_SEEK                                                       Handle        = 0x87AF160A\n\tSQLITE_E_IOERR_DELETE_NOENT                                               Handle        = 0x87AF170A\n\tSQLITE_E_IOERR_MMAP                                                       Handle        = 0x87AF180A\n\tSQLITE_E_IOERR_GETTEMPPATH                                                Handle        = 0x87AF190A\n\tSQLITE_E_IOERR_CONVPATH                                                   Handle        = 0x87AF1A0A\n\tSQLITE_E_IOERR_VNODE                                                      Handle        = 0x87AF1A02\n\tSQLITE_E_IOERR_AUTH                                                       Handle        = 0x87AF1A03\n\tSQLITE_E_LOCKED_SHAREDCACHE                                               Handle        = 0x87AF0106\n\tSQLITE_E_BUSY_RECOVERY                                                    Handle        = 0x87AF0105\n\tSQLITE_E_BUSY_SNAPSHOT                                                    Handle        = 0x87AF0205\n\tSQLITE_E_CANTOPEN_NOTEMPDIR                                               Handle        = 0x87AF010E\n\tSQLITE_E_CANTOPEN_ISDIR                                                   Handle        = 0x87AF020E\n\tSQLITE_E_CANTOPEN_FULLPATH                                                Handle        = 0x87AF030E\n\tSQLITE_E_CANTOPEN_CONVPATH                                                Handle        = 0x87AF040E\n\tSQLITE_E_CORRUPT_VTAB                                                     Handle        = 0x87AF010B\n\tSQLITE_E_READONLY_RECOVERY                                                Handle        = 0x87AF0108\n\tSQLITE_E_READONLY_CANTLOCK                                                Handle        = 0x87AF0208\n\tSQLITE_E_READONLY_ROLLBACK                                                Handle        = 0x87AF0308\n\tSQLITE_E_READONLY_DBMOVED                                                 Handle        = 0x87AF0408\n\tSQLITE_E_ABORT_ROLLBACK                                                   Handle        = 0x87AF0204\n\tSQLITE_E_CONSTRAINT_CHECK                                                 Handle        = 0x87AF0113\n\tSQLITE_E_CONSTRAINT_COMMITHOOK                                            Handle        = 0x87AF0213\n\tSQLITE_E_CONSTRAINT_FOREIGNKEY                                            Handle        = 0x87AF0313\n\tSQLITE_E_CONSTRAINT_FUNCTION                                              Handle        = 0x87AF0413\n\tSQLITE_E_CONSTRAINT_NOTNULL                                               Handle        = 0x87AF0513\n\tSQLITE_E_CONSTRAINT_PRIMARYKEY                                            Handle        = 0x87AF0613\n\tSQLITE_E_CONSTRAINT_TRIGGER                                               Handle        = 0x87AF0713\n\tSQLITE_E_CONSTRAINT_UNIQUE                                                Handle        = 0x87AF0813\n\tSQLITE_E_CONSTRAINT_VTAB                                                  Handle        = 0x87AF0913\n\tSQLITE_E_CONSTRAINT_ROWID                                                 Handle        = 0x87AF0A13\n\tSQLITE_E_NOTICE_RECOVER_WAL                                               Handle        = 0x87AF011B\n\tSQLITE_E_NOTICE_RECOVER_ROLLBACK                                          Handle        = 0x87AF021B\n\tSQLITE_E_WARNING_AUTOINDEX                                                Handle        = 0x87AF011C\n\tUTC_E_TOGGLE_TRACE_STARTED                                                Handle        = 0x87C51001\n\tUTC_E_ALTERNATIVE_TRACE_CANNOT_PREEMPT                                    Handle        = 0x87C51002\n\tUTC_E_AOT_NOT_RUNNING                                                     Handle        = 0x87C51003\n\tUTC_E_SCRIPT_TYPE_INVALID                                                 Handle        = 0x87C51004\n\tUTC_E_SCENARIODEF_NOT_FOUND                                               Handle        = 0x87C51005\n\tUTC_E_TRACEPROFILE_NOT_FOUND                                              Handle        = 0x87C51006\n\tUTC_E_FORWARDER_ALREADY_ENABLED                                           Handle        = 0x87C51007\n\tUTC_E_FORWARDER_ALREADY_DISABLED                                          Handle        = 0x87C51008\n\tUTC_E_EVENTLOG_ENTRY_MALFORMED                                            Handle        = 0x87C51009\n\tUTC_E_DIAGRULES_SCHEMAVERSION_MISMATCH                                    Handle        = 0x87C5100A\n\tUTC_E_SCRIPT_TERMINATED                                                   Handle        = 0x87C5100B\n\tUTC_E_INVALID_CUSTOM_FILTER                                               Handle        = 0x87C5100C\n\tUTC_E_TRACE_NOT_RUNNING                                                   Handle        = 0x87C5100D\n\tUTC_E_REESCALATED_TOO_QUICKLY                                             Handle        = 0x87C5100E\n\tUTC_E_ESCALATION_ALREADY_RUNNING                                          Handle        = 0x87C5100F\n\tUTC_E_PERFTRACK_ALREADY_TRACING                                           Handle        = 0x87C51010\n\tUTC_E_REACHED_MAX_ESCALATIONS                                             Handle        = 0x87C51011\n\tUTC_E_FORWARDER_PRODUCER_MISMATCH                                         Handle        = 0x87C51012\n\tUTC_E_INTENTIONAL_SCRIPT_FAILURE                                          Handle        = 0x87C51013\n\tUTC_E_SQM_INIT_FAILED                                                     Handle        = 0x87C51014\n\tUTC_E_NO_WER_LOGGER_SUPPORTED                                             Handle        = 0x87C51015\n\tUTC_E_TRACERS_DONT_EXIST                                                  Handle        = 0x87C51016\n\tUTC_E_WINRT_INIT_FAILED                                                   Handle        = 0x87C51017\n\tUTC_E_SCENARIODEF_SCHEMAVERSION_MISMATCH                                  Handle        = 0x87C51018\n\tUTC_E_INVALID_FILTER                                                      Handle        = 0x87C51019\n\tUTC_E_EXE_TERMINATED                                                      Handle        = 0x87C5101A\n\tUTC_E_ESCALATION_NOT_AUTHORIZED                                           Handle        = 0x87C5101B\n\tUTC_E_SETUP_NOT_AUTHORIZED                                                Handle        = 0x87C5101C\n\tUTC_E_CHILD_PROCESS_FAILED                                                Handle        = 0x87C5101D\n\tUTC_E_COMMAND_LINE_NOT_AUTHORIZED                                         Handle        = 0x87C5101E\n\tUTC_E_CANNOT_LOAD_SCENARIO_EDITOR_XML                                     Handle        = 0x87C5101F\n\tUTC_E_ESCALATION_TIMED_OUT                                                Handle        = 0x87C51020\n\tUTC_E_SETUP_TIMED_OUT                                                     Handle        = 0x87C51021\n\tUTC_E_TRIGGER_MISMATCH                                                    Handle        = 0x87C51022\n\tUTC_E_TRIGGER_NOT_FOUND                                                   Handle        = 0x87C51023\n\tUTC_E_SIF_NOT_SUPPORTED                                                   Handle        = 0x87C51024\n\tUTC_E_DELAY_TERMINATED                                                    Handle        = 0x87C51025\n\tUTC_E_DEVICE_TICKET_ERROR                                                 Handle        = 0x87C51026\n\tUTC_E_TRACE_BUFFER_LIMIT_EXCEEDED                                         Handle        = 0x87C51027\n\tUTC_E_API_RESULT_UNAVAILABLE                                              Handle        = 0x87C51028\n\tUTC_E_RPC_TIMEOUT                                                         Handle        = 0x87C51029\n\tUTC_E_RPC_WAIT_FAILED                                                     Handle        = 0x87C5102A\n\tUTC_E_API_BUSY                                                            Handle        = 0x87C5102B\n\tUTC_E_TRACE_MIN_DURATION_REQUIREMENT_NOT_MET                              Handle        = 0x87C5102C\n\tUTC_E_EXCLUSIVITY_NOT_AVAILABLE                                           Handle        = 0x87C5102D\n\tUTC_E_GETFILE_FILE_PATH_NOT_APPROVED                                      Handle        = 0x87C5102E\n\tUTC_E_ESCALATION_DIRECTORY_ALREADY_EXISTS                                 Handle        = 0x87C5102F\n\tUTC_E_TIME_TRIGGER_ON_START_INVALID                                       Handle        = 0x87C51030\n\tUTC_E_TIME_TRIGGER_ONLY_VALID_ON_SINGLE_TRANSITION                        Handle        = 0x87C51031\n\tUTC_E_TIME_TRIGGER_INVALID_TIME_RANGE                                     Handle        = 0x87C51032\n\tUTC_E_MULTIPLE_TIME_TRIGGER_ON_SINGLE_STATE                               Handle        = 0x87C51033\n\tUTC_E_BINARY_MISSING                                                      Handle        = 0x87C51034\n\tUTC_E_NETWORK_CAPTURE_NOT_ALLOWED                                         Handle        = 0x87C51035\n\tUTC_E_FAILED_TO_RESOLVE_CONTAINER_ID                                      Handle        = 0x87C51036\n\tUTC_E_UNABLE_TO_RESOLVE_SESSION                                           Handle        = 0x87C51037\n\tUTC_E_THROTTLED                                                           Handle        = 0x87C51038\n\tUTC_E_UNAPPROVED_SCRIPT                                                   Handle        = 0x87C51039\n\tUTC_E_SCRIPT_MISSING                                                      Handle        = 0x87C5103A\n\tUTC_E_SCENARIO_THROTTLED                                                  Handle        = 0x87C5103B\n\tUTC_E_API_NOT_SUPPORTED                                                   Handle        = 0x87C5103C\n\tUTC_E_GETFILE_EXTERNAL_PATH_NOT_APPROVED                                  Handle        = 0x87C5103D\n\tUTC_E_TRY_GET_SCENARIO_TIMEOUT_EXCEEDED                                   Handle        = 0x87C5103E\n\tUTC_E_CERT_REV_FAILED                                                     Handle        = 0x87C5103F\n\tUTC_E_FAILED_TO_START_NDISCAP                                             Handle        = 0x87C51040\n\tUTC_E_KERNELDUMP_LIMIT_REACHED                                            Handle        = 0x87C51041\n\tUTC_E_MISSING_AGGREGATE_EVENT_TAG                                         Handle        = 0x87C51042\n\tUTC_E_INVALID_AGGREGATION_STRUCT                                          Handle        = 0x87C51043\n\tUTC_E_ACTION_NOT_SUPPORTED_IN_DESTINATION                                 Handle        = 0x87C51044\n\tUTC_E_FILTER_MISSING_ATTRIBUTE                                            Handle        = 0x87C51045\n\tUTC_E_FILTER_INVALID_TYPE                                                 Handle        = 0x87C51046\n\tUTC_E_FILTER_VARIABLE_NOT_FOUND                                           Handle        = 0x87C51047\n\tUTC_E_FILTER_FUNCTION_RESTRICTED                                          Handle        = 0x87C51048\n\tUTC_E_FILTER_VERSION_MISMATCH                                             Handle        = 0x87C51049\n\tUTC_E_FILTER_INVALID_FUNCTION                                             Handle        = 0x87C51050\n\tUTC_E_FILTER_INVALID_FUNCTION_PARAMS                                      Handle        = 0x87C51051\n\tUTC_E_FILTER_INVALID_COMMAND                                              Handle        = 0x87C51052\n\tUTC_E_FILTER_ILLEGAL_EVAL                                                 Handle        = 0x87C51053\n\tUTC_E_TTTRACER_RETURNED_ERROR                                             Handle        = 0x87C51054\n\tUTC_E_AGENT_DIAGNOSTICS_TOO_LARGE                                         Handle        = 0x87C51055\n\tUTC_E_FAILED_TO_RECEIVE_AGENT_DIAGNOSTICS                                 Handle        = 0x87C51056\n\tUTC_E_SCENARIO_HAS_NO_ACTIONS                                             Handle        = 0x87C51057\n\tUTC_E_TTTRACER_STORAGE_FULL                                               Handle        = 0x87C51058\n\tUTC_E_INSUFFICIENT_SPACE_TO_START_TRACE                                   Handle        = 0x87C51059\n\tUTC_E_ESCALATION_CANCELLED_AT_SHUTDOWN                                    Handle        = 0x87C5105A\n\tUTC_E_GETFILEINFOACTION_FILE_NOT_APPROVED                                 Handle        = 0x87C5105B\n\tUTC_E_SETREGKEYACTION_TYPE_NOT_APPROVED                                   Handle        = 0x87C5105C\n\tWINML_ERR_INVALID_DEVICE                                                  Handle        = 0x88900001\n\tWINML_ERR_INVALID_BINDING                                                 Handle        = 0x88900002\n\tWINML_ERR_VALUE_NOTFOUND                                                  Handle        = 0x88900003\n\tWINML_ERR_SIZE_MISMATCH                                                   Handle        = 0x88900004\n\tSTATUS_WAIT_0                                                             NTStatus      = 0x00000000\n\tSTATUS_SUCCESS                                                            NTStatus      = 0x00000000\n\tSTATUS_WAIT_1                                                             NTStatus      = 0x00000001\n\tSTATUS_WAIT_2                                                             NTStatus      = 0x00000002\n\tSTATUS_WAIT_3                                                             NTStatus      = 0x00000003\n\tSTATUS_WAIT_63                                                            NTStatus      = 0x0000003F\n\tSTATUS_ABANDONED                                                          NTStatus      = 0x00000080\n\tSTATUS_ABANDONED_WAIT_0                                                   NTStatus      = 0x00000080\n\tSTATUS_ABANDONED_WAIT_63                                                  NTStatus      = 0x000000BF\n\tSTATUS_USER_APC                                                           NTStatus      = 0x000000C0\n\tSTATUS_ALREADY_COMPLETE                                                   NTStatus      = 0x000000FF\n\tSTATUS_KERNEL_APC                                                         NTStatus      = 0x00000100\n\tSTATUS_ALERTED                                                            NTStatus      = 0x00000101\n\tSTATUS_TIMEOUT                                                            NTStatus      = 0x00000102\n\tSTATUS_PENDING                                                            NTStatus      = 0x00000103\n\tSTATUS_REPARSE                                                            NTStatus      = 0x00000104\n\tSTATUS_MORE_ENTRIES                                                       NTStatus      = 0x00000105\n\tSTATUS_NOT_ALL_ASSIGNED                                                   NTStatus      = 0x00000106\n\tSTATUS_SOME_NOT_MAPPED                                                    NTStatus      = 0x00000107\n\tSTATUS_OPLOCK_BREAK_IN_PROGRESS                                           NTStatus      = 0x00000108\n\tSTATUS_VOLUME_MOUNTED                                                     NTStatus      = 0x00000109\n\tSTATUS_RXACT_COMMITTED                                                    NTStatus      = 0x0000010A\n\tSTATUS_NOTIFY_CLEANUP                                                     NTStatus      = 0x0000010B\n\tSTATUS_NOTIFY_ENUM_DIR                                                    NTStatus      = 0x0000010C\n\tSTATUS_NO_QUOTAS_FOR_ACCOUNT                                              NTStatus      = 0x0000010D\n\tSTATUS_PRIMARY_TRANSPORT_CONNECT_FAILED                                   NTStatus      = 0x0000010E\n\tSTATUS_PAGE_FAULT_TRANSITION                                              NTStatus      = 0x00000110\n\tSTATUS_PAGE_FAULT_DEMAND_ZERO                                             NTStatus      = 0x00000111\n\tSTATUS_PAGE_FAULT_COPY_ON_WRITE                                           NTStatus      = 0x00000112\n\tSTATUS_PAGE_FAULT_GUARD_PAGE                                              NTStatus      = 0x00000113\n\tSTATUS_PAGE_FAULT_PAGING_FILE                                             NTStatus      = 0x00000114\n\tSTATUS_CACHE_PAGE_LOCKED                                                  NTStatus      = 0x00000115\n\tSTATUS_CRASH_DUMP                                                         NTStatus      = 0x00000116\n\tSTATUS_BUFFER_ALL_ZEROS                                                   NTStatus      = 0x00000117\n\tSTATUS_REPARSE_OBJECT                                                     NTStatus      = 0x00000118\n\tSTATUS_RESOURCE_REQUIREMENTS_CHANGED                                      NTStatus      = 0x00000119\n\tSTATUS_TRANSLATION_COMPLETE                                               NTStatus      = 0x00000120\n\tSTATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY                                    NTStatus      = 0x00000121\n\tSTATUS_NOTHING_TO_TERMINATE                                               NTStatus      = 0x00000122\n\tSTATUS_PROCESS_NOT_IN_JOB                                                 NTStatus      = 0x00000123\n\tSTATUS_PROCESS_IN_JOB                                                     NTStatus      = 0x00000124\n\tSTATUS_VOLSNAP_HIBERNATE_READY                                            NTStatus      = 0x00000125\n\tSTATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY                                 NTStatus      = 0x00000126\n\tSTATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED                                 NTStatus      = 0x00000127\n\tSTATUS_INTERRUPT_STILL_CONNECTED                                          NTStatus      = 0x00000128\n\tSTATUS_PROCESS_CLONED                                                     NTStatus      = 0x00000129\n\tSTATUS_FILE_LOCKED_WITH_ONLY_READERS                                      NTStatus      = 0x0000012A\n\tSTATUS_FILE_LOCKED_WITH_WRITERS                                           NTStatus      = 0x0000012B\n\tSTATUS_VALID_IMAGE_HASH                                                   NTStatus      = 0x0000012C\n\tSTATUS_VALID_CATALOG_HASH                                                 NTStatus      = 0x0000012D\n\tSTATUS_VALID_STRONG_CODE_HASH                                             NTStatus      = 0x0000012E\n\tSTATUS_GHOSTED                                                            NTStatus      = 0x0000012F\n\tSTATUS_DATA_OVERWRITTEN                                                   NTStatus      = 0x00000130\n\tSTATUS_RESOURCEMANAGER_READ_ONLY                                          NTStatus      = 0x00000202\n\tSTATUS_RING_PREVIOUSLY_EMPTY                                              NTStatus      = 0x00000210\n\tSTATUS_RING_PREVIOUSLY_FULL                                               NTStatus      = 0x00000211\n\tSTATUS_RING_PREVIOUSLY_ABOVE_QUOTA                                        NTStatus      = 0x00000212\n\tSTATUS_RING_NEWLY_EMPTY                                                   NTStatus      = 0x00000213\n\tSTATUS_RING_SIGNAL_OPPOSITE_ENDPOINT                                      NTStatus      = 0x00000214\n\tSTATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE                                      NTStatus      = 0x00000215\n\tSTATUS_OPLOCK_HANDLE_CLOSED                                               NTStatus      = 0x00000216\n\tSTATUS_WAIT_FOR_OPLOCK                                                    NTStatus      = 0x00000367\n\tSTATUS_REPARSE_GLOBAL                                                     NTStatus      = 0x00000368\n\tSTATUS_FLT_IO_COMPLETE                                                    NTStatus      = 0x001C0001\n\tSTATUS_OBJECT_NAME_EXISTS                                                 NTStatus      = 0x40000000\n\tSTATUS_THREAD_WAS_SUSPENDED                                               NTStatus      = 0x40000001\n\tSTATUS_WORKING_SET_LIMIT_RANGE                                            NTStatus      = 0x40000002\n\tSTATUS_IMAGE_NOT_AT_BASE                                                  NTStatus      = 0x40000003\n\tSTATUS_RXACT_STATE_CREATED                                                NTStatus      = 0x40000004\n\tSTATUS_SEGMENT_NOTIFICATION                                               NTStatus      = 0x40000005\n\tSTATUS_LOCAL_USER_SESSION_KEY                                             NTStatus      = 0x40000006\n\tSTATUS_BAD_CURRENT_DIRECTORY                                              NTStatus      = 0x40000007\n\tSTATUS_SERIAL_MORE_WRITES                                                 NTStatus      = 0x40000008\n\tSTATUS_REGISTRY_RECOVERED                                                 NTStatus      = 0x40000009\n\tSTATUS_FT_READ_RECOVERY_FROM_BACKUP                                       NTStatus      = 0x4000000A\n\tSTATUS_FT_WRITE_RECOVERY                                                  NTStatus      = 0x4000000B\n\tSTATUS_SERIAL_COUNTER_TIMEOUT                                             NTStatus      = 0x4000000C\n\tSTATUS_NULL_LM_PASSWORD                                                   NTStatus      = 0x4000000D\n\tSTATUS_IMAGE_MACHINE_TYPE_MISMATCH                                        NTStatus      = 0x4000000E\n\tSTATUS_RECEIVE_PARTIAL                                                    NTStatus      = 0x4000000F\n\tSTATUS_RECEIVE_EXPEDITED                                                  NTStatus      = 0x40000010\n\tSTATUS_RECEIVE_PARTIAL_EXPEDITED                                          NTStatus      = 0x40000011\n\tSTATUS_EVENT_DONE                                                         NTStatus      = 0x40000012\n\tSTATUS_EVENT_PENDING                                                      NTStatus      = 0x40000013\n\tSTATUS_CHECKING_FILE_SYSTEM                                               NTStatus      = 0x40000014\n\tSTATUS_FATAL_APP_EXIT                                                     NTStatus      = 0x40000015\n\tSTATUS_PREDEFINED_HANDLE                                                  NTStatus      = 0x40000016\n\tSTATUS_WAS_UNLOCKED                                                       NTStatus      = 0x40000017\n\tSTATUS_SERVICE_NOTIFICATION                                               NTStatus      = 0x40000018\n\tSTATUS_WAS_LOCKED                                                         NTStatus      = 0x40000019\n\tSTATUS_LOG_HARD_ERROR                                                     NTStatus      = 0x4000001A\n\tSTATUS_ALREADY_WIN32                                                      NTStatus      = 0x4000001B\n\tSTATUS_WX86_UNSIMULATE                                                    NTStatus      = 0x4000001C\n\tSTATUS_WX86_CONTINUE                                                      NTStatus      = 0x4000001D\n\tSTATUS_WX86_SINGLE_STEP                                                   NTStatus      = 0x4000001E\n\tSTATUS_WX86_BREAKPOINT                                                    NTStatus      = 0x4000001F\n\tSTATUS_WX86_EXCEPTION_CONTINUE                                            NTStatus      = 0x40000020\n\tSTATUS_WX86_EXCEPTION_LASTCHANCE                                          NTStatus      = 0x40000021\n\tSTATUS_WX86_EXCEPTION_CHAIN                                               NTStatus      = 0x40000022\n\tSTATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE                                    NTStatus      = 0x40000023\n\tSTATUS_NO_YIELD_PERFORMED                                                 NTStatus      = 0x40000024\n\tSTATUS_TIMER_RESUME_IGNORED                                               NTStatus      = 0x40000025\n\tSTATUS_ARBITRATION_UNHANDLED                                              NTStatus      = 0x40000026\n\tSTATUS_CARDBUS_NOT_SUPPORTED                                              NTStatus      = 0x40000027\n\tSTATUS_WX86_CREATEWX86TIB                                                 NTStatus      = 0x40000028\n\tSTATUS_MP_PROCESSOR_MISMATCH                                              NTStatus      = 0x40000029\n\tSTATUS_HIBERNATED                                                         NTStatus      = 0x4000002A\n\tSTATUS_RESUME_HIBERNATION                                                 NTStatus      = 0x4000002B\n\tSTATUS_FIRMWARE_UPDATED                                                   NTStatus      = 0x4000002C\n\tSTATUS_DRIVERS_LEAKING_LOCKED_PAGES                                       NTStatus      = 0x4000002D\n\tSTATUS_MESSAGE_RETRIEVED                                                  NTStatus      = 0x4000002E\n\tSTATUS_SYSTEM_POWERSTATE_TRANSITION                                       NTStatus      = 0x4000002F\n\tSTATUS_ALPC_CHECK_COMPLETION_LIST                                         NTStatus      = 0x40000030\n\tSTATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION                               NTStatus      = 0x40000031\n\tSTATUS_ACCESS_AUDIT_BY_POLICY                                             NTStatus      = 0x40000032\n\tSTATUS_ABANDON_HIBERFILE                                                  NTStatus      = 0x40000033\n\tSTATUS_BIZRULES_NOT_ENABLED                                               NTStatus      = 0x40000034\n\tSTATUS_FT_READ_FROM_COPY                                                  NTStatus      = 0x40000035\n\tSTATUS_IMAGE_AT_DIFFERENT_BASE                                            NTStatus      = 0x40000036\n\tSTATUS_PATCH_DEFERRED                                                     NTStatus      = 0x40000037\n\tSTATUS_HEURISTIC_DAMAGE_POSSIBLE                                          NTStatus      = 0x40190001\n\tSTATUS_GUARD_PAGE_VIOLATION                                               NTStatus      = 0x80000001\n\tSTATUS_DATATYPE_MISALIGNMENT                                              NTStatus      = 0x80000002\n\tSTATUS_BREAKPOINT                                                         NTStatus      = 0x80000003\n\tSTATUS_SINGLE_STEP                                                        NTStatus      = 0x80000004\n\tSTATUS_BUFFER_OVERFLOW                                                    NTStatus      = 0x80000005\n\tSTATUS_NO_MORE_FILES                                                      NTStatus      = 0x80000006\n\tSTATUS_WAKE_SYSTEM_DEBUGGER                                               NTStatus      = 0x80000007\n\tSTATUS_HANDLES_CLOSED                                                     NTStatus      = 0x8000000A\n\tSTATUS_NO_INHERITANCE                                                     NTStatus      = 0x8000000B\n\tSTATUS_GUID_SUBSTITUTION_MADE                                             NTStatus      = 0x8000000C\n\tSTATUS_PARTIAL_COPY                                                       NTStatus      = 0x8000000D\n\tSTATUS_DEVICE_PAPER_EMPTY                                                 NTStatus      = 0x8000000E\n\tSTATUS_DEVICE_POWERED_OFF                                                 NTStatus      = 0x8000000F\n\tSTATUS_DEVICE_OFF_LINE                                                    NTStatus      = 0x80000010\n\tSTATUS_DEVICE_BUSY                                                        NTStatus      = 0x80000011\n\tSTATUS_NO_MORE_EAS                                                        NTStatus      = 0x80000012\n\tSTATUS_INVALID_EA_NAME                                                    NTStatus      = 0x80000013\n\tSTATUS_EA_LIST_INCONSISTENT                                               NTStatus      = 0x80000014\n\tSTATUS_INVALID_EA_FLAG                                                    NTStatus      = 0x80000015\n\tSTATUS_VERIFY_REQUIRED                                                    NTStatus      = 0x80000016\n\tSTATUS_EXTRANEOUS_INFORMATION                                             NTStatus      = 0x80000017\n\tSTATUS_RXACT_COMMIT_NECESSARY                                             NTStatus      = 0x80000018\n\tSTATUS_NO_MORE_ENTRIES                                                    NTStatus      = 0x8000001A\n\tSTATUS_FILEMARK_DETECTED                                                  NTStatus      = 0x8000001B\n\tSTATUS_MEDIA_CHANGED                                                      NTStatus      = 0x8000001C\n\tSTATUS_BUS_RESET                                                          NTStatus      = 0x8000001D\n\tSTATUS_END_OF_MEDIA                                                       NTStatus      = 0x8000001E\n\tSTATUS_BEGINNING_OF_MEDIA                                                 NTStatus      = 0x8000001F\n\tSTATUS_MEDIA_CHECK                                                        NTStatus      = 0x80000020\n\tSTATUS_SETMARK_DETECTED                                                   NTStatus      = 0x80000021\n\tSTATUS_NO_DATA_DETECTED                                                   NTStatus      = 0x80000022\n\tSTATUS_REDIRECTOR_HAS_OPEN_HANDLES                                        NTStatus      = 0x80000023\n\tSTATUS_SERVER_HAS_OPEN_HANDLES                                            NTStatus      = 0x80000024\n\tSTATUS_ALREADY_DISCONNECTED                                               NTStatus      = 0x80000025\n\tSTATUS_LONGJUMP                                                           NTStatus      = 0x80000026\n\tSTATUS_CLEANER_CARTRIDGE_INSTALLED                                        NTStatus      = 0x80000027\n\tSTATUS_PLUGPLAY_QUERY_VETOED                                              NTStatus      = 0x80000028\n\tSTATUS_UNWIND_CONSOLIDATE                                                 NTStatus      = 0x80000029\n\tSTATUS_REGISTRY_HIVE_RECOVERED                                            NTStatus      = 0x8000002A\n\tSTATUS_DLL_MIGHT_BE_INSECURE                                              NTStatus      = 0x8000002B\n\tSTATUS_DLL_MIGHT_BE_INCOMPATIBLE                                          NTStatus      = 0x8000002C\n\tSTATUS_STOPPED_ON_SYMLINK                                                 NTStatus      = 0x8000002D\n\tSTATUS_CANNOT_GRANT_REQUESTED_OPLOCK                                      NTStatus      = 0x8000002E\n\tSTATUS_NO_ACE_CONDITION                                                   NTStatus      = 0x8000002F\n\tSTATUS_DEVICE_SUPPORT_IN_PROGRESS                                         NTStatus      = 0x80000030\n\tSTATUS_DEVICE_POWER_CYCLE_REQUIRED                                        NTStatus      = 0x80000031\n\tSTATUS_NO_WORK_DONE                                                       NTStatus      = 0x80000032\n\tSTATUS_CLUSTER_NODE_ALREADY_UP                                            NTStatus      = 0x80130001\n\tSTATUS_CLUSTER_NODE_ALREADY_DOWN                                          NTStatus      = 0x80130002\n\tSTATUS_CLUSTER_NETWORK_ALREADY_ONLINE                                     NTStatus      = 0x80130003\n\tSTATUS_CLUSTER_NETWORK_ALREADY_OFFLINE                                    NTStatus      = 0x80130004\n\tSTATUS_CLUSTER_NODE_ALREADY_MEMBER                                        NTStatus      = 0x80130005\n\tSTATUS_FLT_BUFFER_TOO_SMALL                                               NTStatus      = 0x801C0001\n\tSTATUS_FVE_PARTIAL_METADATA                                               NTStatus      = 0x80210001\n\tSTATUS_FVE_TRANSIENT_STATE                                                NTStatus      = 0x80210002\n\tSTATUS_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH                         NTStatus      = 0x8000CF00\n\tSTATUS_UNSUCCESSFUL                                                       NTStatus      = 0xC0000001\n\tSTATUS_NOT_IMPLEMENTED                                                    NTStatus      = 0xC0000002\n\tSTATUS_INVALID_INFO_CLASS                                                 NTStatus      = 0xC0000003\n\tSTATUS_INFO_LENGTH_MISMATCH                                               NTStatus      = 0xC0000004\n\tSTATUS_ACCESS_VIOLATION                                                   NTStatus      = 0xC0000005\n\tSTATUS_IN_PAGE_ERROR                                                      NTStatus      = 0xC0000006\n\tSTATUS_PAGEFILE_QUOTA                                                     NTStatus      = 0xC0000007\n\tSTATUS_INVALID_HANDLE                                                     NTStatus      = 0xC0000008\n\tSTATUS_BAD_INITIAL_STACK                                                  NTStatus      = 0xC0000009\n\tSTATUS_BAD_INITIAL_PC                                                     NTStatus      = 0xC000000A\n\tSTATUS_INVALID_CID                                                        NTStatus      = 0xC000000B\n\tSTATUS_TIMER_NOT_CANCELED                                                 NTStatus      = 0xC000000C\n\tSTATUS_INVALID_PARAMETER                                                  NTStatus      = 0xC000000D\n\tSTATUS_NO_SUCH_DEVICE                                                     NTStatus      = 0xC000000E\n\tSTATUS_NO_SUCH_FILE                                                       NTStatus      = 0xC000000F\n\tSTATUS_INVALID_DEVICE_REQUEST                                             NTStatus      = 0xC0000010\n\tSTATUS_END_OF_FILE                                                        NTStatus      = 0xC0000011\n\tSTATUS_WRONG_VOLUME                                                       NTStatus      = 0xC0000012\n\tSTATUS_NO_MEDIA_IN_DEVICE                                                 NTStatus      = 0xC0000013\n\tSTATUS_UNRECOGNIZED_MEDIA                                                 NTStatus      = 0xC0000014\n\tSTATUS_NONEXISTENT_SECTOR                                                 NTStatus      = 0xC0000015\n\tSTATUS_MORE_PROCESSING_REQUIRED                                           NTStatus      = 0xC0000016\n\tSTATUS_NO_MEMORY                                                          NTStatus      = 0xC0000017\n\tSTATUS_CONFLICTING_ADDRESSES                                              NTStatus      = 0xC0000018\n\tSTATUS_NOT_MAPPED_VIEW                                                    NTStatus      = 0xC0000019\n\tSTATUS_UNABLE_TO_FREE_VM                                                  NTStatus      = 0xC000001A\n\tSTATUS_UNABLE_TO_DELETE_SECTION                                           NTStatus      = 0xC000001B\n\tSTATUS_INVALID_SYSTEM_SERVICE                                             NTStatus      = 0xC000001C\n\tSTATUS_ILLEGAL_INSTRUCTION                                                NTStatus      = 0xC000001D\n\tSTATUS_INVALID_LOCK_SEQUENCE                                              NTStatus      = 0xC000001E\n\tSTATUS_INVALID_VIEW_SIZE                                                  NTStatus      = 0xC000001F\n\tSTATUS_INVALID_FILE_FOR_SECTION                                           NTStatus      = 0xC0000020\n\tSTATUS_ALREADY_COMMITTED                                                  NTStatus      = 0xC0000021\n\tSTATUS_ACCESS_DENIED                                                      NTStatus      = 0xC0000022\n\tSTATUS_BUFFER_TOO_SMALL                                                   NTStatus      = 0xC0000023\n\tSTATUS_OBJECT_TYPE_MISMATCH                                               NTStatus      = 0xC0000024\n\tSTATUS_NONCONTINUABLE_EXCEPTION                                           NTStatus      = 0xC0000025\n\tSTATUS_INVALID_DISPOSITION                                                NTStatus      = 0xC0000026\n\tSTATUS_UNWIND                                                             NTStatus      = 0xC0000027\n\tSTATUS_BAD_STACK                                                          NTStatus      = 0xC0000028\n\tSTATUS_INVALID_UNWIND_TARGET                                              NTStatus      = 0xC0000029\n\tSTATUS_NOT_LOCKED                                                         NTStatus      = 0xC000002A\n\tSTATUS_PARITY_ERROR                                                       NTStatus      = 0xC000002B\n\tSTATUS_UNABLE_TO_DECOMMIT_VM                                              NTStatus      = 0xC000002C\n\tSTATUS_NOT_COMMITTED                                                      NTStatus      = 0xC000002D\n\tSTATUS_INVALID_PORT_ATTRIBUTES                                            NTStatus      = 0xC000002E\n\tSTATUS_PORT_MESSAGE_TOO_LONG                                              NTStatus      = 0xC000002F\n\tSTATUS_INVALID_PARAMETER_MIX                                              NTStatus      = 0xC0000030\n\tSTATUS_INVALID_QUOTA_LOWER                                                NTStatus      = 0xC0000031\n\tSTATUS_DISK_CORRUPT_ERROR                                                 NTStatus      = 0xC0000032\n\tSTATUS_OBJECT_NAME_INVALID                                                NTStatus      = 0xC0000033\n\tSTATUS_OBJECT_NAME_NOT_FOUND                                              NTStatus      = 0xC0000034\n\tSTATUS_OBJECT_NAME_COLLISION                                              NTStatus      = 0xC0000035\n\tSTATUS_PORT_DO_NOT_DISTURB                                                NTStatus      = 0xC0000036\n\tSTATUS_PORT_DISCONNECTED                                                  NTStatus      = 0xC0000037\n\tSTATUS_DEVICE_ALREADY_ATTACHED                                            NTStatus      = 0xC0000038\n\tSTATUS_OBJECT_PATH_INVALID                                                NTStatus      = 0xC0000039\n\tSTATUS_OBJECT_PATH_NOT_FOUND                                              NTStatus      = 0xC000003A\n\tSTATUS_OBJECT_PATH_SYNTAX_BAD                                             NTStatus      = 0xC000003B\n\tSTATUS_DATA_OVERRUN                                                       NTStatus      = 0xC000003C\n\tSTATUS_DATA_LATE_ERROR                                                    NTStatus      = 0xC000003D\n\tSTATUS_DATA_ERROR                                                         NTStatus      = 0xC000003E\n\tSTATUS_CRC_ERROR                                                          NTStatus      = 0xC000003F\n\tSTATUS_SECTION_TOO_BIG                                                    NTStatus      = 0xC0000040\n\tSTATUS_PORT_CONNECTION_REFUSED                                            NTStatus      = 0xC0000041\n\tSTATUS_INVALID_PORT_HANDLE                                                NTStatus      = 0xC0000042\n\tSTATUS_SHARING_VIOLATION                                                  NTStatus      = 0xC0000043\n\tSTATUS_QUOTA_EXCEEDED                                                     NTStatus      = 0xC0000044\n\tSTATUS_INVALID_PAGE_PROTECTION                                            NTStatus      = 0xC0000045\n\tSTATUS_MUTANT_NOT_OWNED                                                   NTStatus      = 0xC0000046\n\tSTATUS_SEMAPHORE_LIMIT_EXCEEDED                                           NTStatus      = 0xC0000047\n\tSTATUS_PORT_ALREADY_SET                                                   NTStatus      = 0xC0000048\n\tSTATUS_SECTION_NOT_IMAGE                                                  NTStatus      = 0xC0000049\n\tSTATUS_SUSPEND_COUNT_EXCEEDED                                             NTStatus      = 0xC000004A\n\tSTATUS_THREAD_IS_TERMINATING                                              NTStatus      = 0xC000004B\n\tSTATUS_BAD_WORKING_SET_LIMIT                                              NTStatus      = 0xC000004C\n\tSTATUS_INCOMPATIBLE_FILE_MAP                                              NTStatus      = 0xC000004D\n\tSTATUS_SECTION_PROTECTION                                                 NTStatus      = 0xC000004E\n\tSTATUS_EAS_NOT_SUPPORTED                                                  NTStatus      = 0xC000004F\n\tSTATUS_EA_TOO_LARGE                                                       NTStatus      = 0xC0000050\n\tSTATUS_NONEXISTENT_EA_ENTRY                                               NTStatus      = 0xC0000051\n\tSTATUS_NO_EAS_ON_FILE                                                     NTStatus      = 0xC0000052\n\tSTATUS_EA_CORRUPT_ERROR                                                   NTStatus      = 0xC0000053\n\tSTATUS_FILE_LOCK_CONFLICT                                                 NTStatus      = 0xC0000054\n\tSTATUS_LOCK_NOT_GRANTED                                                   NTStatus      = 0xC0000055\n\tSTATUS_DELETE_PENDING                                                     NTStatus      = 0xC0000056\n\tSTATUS_CTL_FILE_NOT_SUPPORTED                                             NTStatus      = 0xC0000057\n\tSTATUS_UNKNOWN_REVISION                                                   NTStatus      = 0xC0000058\n\tSTATUS_REVISION_MISMATCH                                                  NTStatus      = 0xC0000059\n\tSTATUS_INVALID_OWNER                                                      NTStatus      = 0xC000005A\n\tSTATUS_INVALID_PRIMARY_GROUP                                              NTStatus      = 0xC000005B\n\tSTATUS_NO_IMPERSONATION_TOKEN                                             NTStatus      = 0xC000005C\n\tSTATUS_CANT_DISABLE_MANDATORY                                             NTStatus      = 0xC000005D\n\tSTATUS_NO_LOGON_SERVERS                                                   NTStatus      = 0xC000005E\n\tSTATUS_NO_SUCH_LOGON_SESSION                                              NTStatus      = 0xC000005F\n\tSTATUS_NO_SUCH_PRIVILEGE                                                  NTStatus      = 0xC0000060\n\tSTATUS_PRIVILEGE_NOT_HELD                                                 NTStatus      = 0xC0000061\n\tSTATUS_INVALID_ACCOUNT_NAME                                               NTStatus      = 0xC0000062\n\tSTATUS_USER_EXISTS                                                        NTStatus      = 0xC0000063\n\tSTATUS_NO_SUCH_USER                                                       NTStatus      = 0xC0000064\n\tSTATUS_GROUP_EXISTS                                                       NTStatus      = 0xC0000065\n\tSTATUS_NO_SUCH_GROUP                                                      NTStatus      = 0xC0000066\n\tSTATUS_MEMBER_IN_GROUP                                                    NTStatus      = 0xC0000067\n\tSTATUS_MEMBER_NOT_IN_GROUP                                                NTStatus      = 0xC0000068\n\tSTATUS_LAST_ADMIN                                                         NTStatus      = 0xC0000069\n\tSTATUS_WRONG_PASSWORD                                                     NTStatus      = 0xC000006A\n\tSTATUS_ILL_FORMED_PASSWORD                                                NTStatus      = 0xC000006B\n\tSTATUS_PASSWORD_RESTRICTION                                               NTStatus      = 0xC000006C\n\tSTATUS_LOGON_FAILURE                                                      NTStatus      = 0xC000006D\n\tSTATUS_ACCOUNT_RESTRICTION                                                NTStatus      = 0xC000006E\n\tSTATUS_INVALID_LOGON_HOURS                                                NTStatus      = 0xC000006F\n\tSTATUS_INVALID_WORKSTATION                                                NTStatus      = 0xC0000070\n\tSTATUS_PASSWORD_EXPIRED                                                   NTStatus      = 0xC0000071\n\tSTATUS_ACCOUNT_DISABLED                                                   NTStatus      = 0xC0000072\n\tSTATUS_NONE_MAPPED                                                        NTStatus      = 0xC0000073\n\tSTATUS_TOO_MANY_LUIDS_REQUESTED                                           NTStatus      = 0xC0000074\n\tSTATUS_LUIDS_EXHAUSTED                                                    NTStatus      = 0xC0000075\n\tSTATUS_INVALID_SUB_AUTHORITY                                              NTStatus      = 0xC0000076\n\tSTATUS_INVALID_ACL                                                        NTStatus      = 0xC0000077\n\tSTATUS_INVALID_SID                                                        NTStatus      = 0xC0000078\n\tSTATUS_INVALID_SECURITY_DESCR                                             NTStatus      = 0xC0000079\n\tSTATUS_PROCEDURE_NOT_FOUND                                                NTStatus      = 0xC000007A\n\tSTATUS_INVALID_IMAGE_FORMAT                                               NTStatus      = 0xC000007B\n\tSTATUS_NO_TOKEN                                                           NTStatus      = 0xC000007C\n\tSTATUS_BAD_INHERITANCE_ACL                                                NTStatus      = 0xC000007D\n\tSTATUS_RANGE_NOT_LOCKED                                                   NTStatus      = 0xC000007E\n\tSTATUS_DISK_FULL                                                          NTStatus      = 0xC000007F\n\tSTATUS_SERVER_DISABLED                                                    NTStatus      = 0xC0000080\n\tSTATUS_SERVER_NOT_DISABLED                                                NTStatus      = 0xC0000081\n\tSTATUS_TOO_MANY_GUIDS_REQUESTED                                           NTStatus      = 0xC0000082\n\tSTATUS_GUIDS_EXHAUSTED                                                    NTStatus      = 0xC0000083\n\tSTATUS_INVALID_ID_AUTHORITY                                               NTStatus      = 0xC0000084\n\tSTATUS_AGENTS_EXHAUSTED                                                   NTStatus      = 0xC0000085\n\tSTATUS_INVALID_VOLUME_LABEL                                               NTStatus      = 0xC0000086\n\tSTATUS_SECTION_NOT_EXTENDED                                               NTStatus      = 0xC0000087\n\tSTATUS_NOT_MAPPED_DATA                                                    NTStatus      = 0xC0000088\n\tSTATUS_RESOURCE_DATA_NOT_FOUND                                            NTStatus      = 0xC0000089\n\tSTATUS_RESOURCE_TYPE_NOT_FOUND                                            NTStatus      = 0xC000008A\n\tSTATUS_RESOURCE_NAME_NOT_FOUND                                            NTStatus      = 0xC000008B\n\tSTATUS_ARRAY_BOUNDS_EXCEEDED                                              NTStatus      = 0xC000008C\n\tSTATUS_FLOAT_DENORMAL_OPERAND                                             NTStatus      = 0xC000008D\n\tSTATUS_FLOAT_DIVIDE_BY_ZERO                                               NTStatus      = 0xC000008E\n\tSTATUS_FLOAT_INEXACT_RESULT                                               NTStatus      = 0xC000008F\n\tSTATUS_FLOAT_INVALID_OPERATION                                            NTStatus      = 0xC0000090\n\tSTATUS_FLOAT_OVERFLOW                                                     NTStatus      = 0xC0000091\n\tSTATUS_FLOAT_STACK_CHECK                                                  NTStatus      = 0xC0000092\n\tSTATUS_FLOAT_UNDERFLOW                                                    NTStatus      = 0xC0000093\n\tSTATUS_INTEGER_DIVIDE_BY_ZERO                                             NTStatus      = 0xC0000094\n\tSTATUS_INTEGER_OVERFLOW                                                   NTStatus      = 0xC0000095\n\tSTATUS_PRIVILEGED_INSTRUCTION                                             NTStatus      = 0xC0000096\n\tSTATUS_TOO_MANY_PAGING_FILES                                              NTStatus      = 0xC0000097\n\tSTATUS_FILE_INVALID                                                       NTStatus      = 0xC0000098\n\tSTATUS_ALLOTTED_SPACE_EXCEEDED                                            NTStatus      = 0xC0000099\n\tSTATUS_INSUFFICIENT_RESOURCES                                             NTStatus      = 0xC000009A\n\tSTATUS_DFS_EXIT_PATH_FOUND                                                NTStatus      = 0xC000009B\n\tSTATUS_DEVICE_DATA_ERROR                                                  NTStatus      = 0xC000009C\n\tSTATUS_DEVICE_NOT_CONNECTED                                               NTStatus      = 0xC000009D\n\tSTATUS_DEVICE_POWER_FAILURE                                               NTStatus      = 0xC000009E\n\tSTATUS_FREE_VM_NOT_AT_BASE                                                NTStatus      = 0xC000009F\n\tSTATUS_MEMORY_NOT_ALLOCATED                                               NTStatus      = 0xC00000A0\n\tSTATUS_WORKING_SET_QUOTA                                                  NTStatus      = 0xC00000A1\n\tSTATUS_MEDIA_WRITE_PROTECTED                                              NTStatus      = 0xC00000A2\n\tSTATUS_DEVICE_NOT_READY                                                   NTStatus      = 0xC00000A3\n\tSTATUS_INVALID_GROUP_ATTRIBUTES                                           NTStatus      = 0xC00000A4\n\tSTATUS_BAD_IMPERSONATION_LEVEL                                            NTStatus      = 0xC00000A5\n\tSTATUS_CANT_OPEN_ANONYMOUS                                                NTStatus      = 0xC00000A6\n\tSTATUS_BAD_VALIDATION_CLASS                                               NTStatus      = 0xC00000A7\n\tSTATUS_BAD_TOKEN_TYPE                                                     NTStatus      = 0xC00000A8\n\tSTATUS_BAD_MASTER_BOOT_RECORD                                             NTStatus      = 0xC00000A9\n\tSTATUS_INSTRUCTION_MISALIGNMENT                                           NTStatus      = 0xC00000AA\n\tSTATUS_INSTANCE_NOT_AVAILABLE                                             NTStatus      = 0xC00000AB\n\tSTATUS_PIPE_NOT_AVAILABLE                                                 NTStatus      = 0xC00000AC\n\tSTATUS_INVALID_PIPE_STATE                                                 NTStatus      = 0xC00000AD\n\tSTATUS_PIPE_BUSY                                                          NTStatus      = 0xC00000AE\n\tSTATUS_ILLEGAL_FUNCTION                                                   NTStatus      = 0xC00000AF\n\tSTATUS_PIPE_DISCONNECTED                                                  NTStatus      = 0xC00000B0\n\tSTATUS_PIPE_CLOSING                                                       NTStatus      = 0xC00000B1\n\tSTATUS_PIPE_CONNECTED                                                     NTStatus      = 0xC00000B2\n\tSTATUS_PIPE_LISTENING                                                     NTStatus      = 0xC00000B3\n\tSTATUS_INVALID_READ_MODE                                                  NTStatus      = 0xC00000B4\n\tSTATUS_IO_TIMEOUT                                                         NTStatus      = 0xC00000B5\n\tSTATUS_FILE_FORCED_CLOSED                                                 NTStatus      = 0xC00000B6\n\tSTATUS_PROFILING_NOT_STARTED                                              NTStatus      = 0xC00000B7\n\tSTATUS_PROFILING_NOT_STOPPED                                              NTStatus      = 0xC00000B8\n\tSTATUS_COULD_NOT_INTERPRET                                                NTStatus      = 0xC00000B9\n\tSTATUS_FILE_IS_A_DIRECTORY                                                NTStatus      = 0xC00000BA\n\tSTATUS_NOT_SUPPORTED                                                      NTStatus      = 0xC00000BB\n\tSTATUS_REMOTE_NOT_LISTENING                                               NTStatus      = 0xC00000BC\n\tSTATUS_DUPLICATE_NAME                                                     NTStatus      = 0xC00000BD\n\tSTATUS_BAD_NETWORK_PATH                                                   NTStatus      = 0xC00000BE\n\tSTATUS_NETWORK_BUSY                                                       NTStatus      = 0xC00000BF\n\tSTATUS_DEVICE_DOES_NOT_EXIST                                              NTStatus      = 0xC00000C0\n\tSTATUS_TOO_MANY_COMMANDS                                                  NTStatus      = 0xC00000C1\n\tSTATUS_ADAPTER_HARDWARE_ERROR                                             NTStatus      = 0xC00000C2\n\tSTATUS_INVALID_NETWORK_RESPONSE                                           NTStatus      = 0xC00000C3\n\tSTATUS_UNEXPECTED_NETWORK_ERROR                                           NTStatus      = 0xC00000C4\n\tSTATUS_BAD_REMOTE_ADAPTER                                                 NTStatus      = 0xC00000C5\n\tSTATUS_PRINT_QUEUE_FULL                                                   NTStatus      = 0xC00000C6\n\tSTATUS_NO_SPOOL_SPACE                                                     NTStatus      = 0xC00000C7\n\tSTATUS_PRINT_CANCELLED                                                    NTStatus      = 0xC00000C8\n\tSTATUS_NETWORK_NAME_DELETED                                               NTStatus      = 0xC00000C9\n\tSTATUS_NETWORK_ACCESS_DENIED                                              NTStatus      = 0xC00000CA\n\tSTATUS_BAD_DEVICE_TYPE                                                    NTStatus      = 0xC00000CB\n\tSTATUS_BAD_NETWORK_NAME                                                   NTStatus      = 0xC00000CC\n\tSTATUS_TOO_MANY_NAMES                                                     NTStatus      = 0xC00000CD\n\tSTATUS_TOO_MANY_SESSIONS                                                  NTStatus      = 0xC00000CE\n\tSTATUS_SHARING_PAUSED                                                     NTStatus      = 0xC00000CF\n\tSTATUS_REQUEST_NOT_ACCEPTED                                               NTStatus      = 0xC00000D0\n\tSTATUS_REDIRECTOR_PAUSED                                                  NTStatus      = 0xC00000D1\n\tSTATUS_NET_WRITE_FAULT                                                    NTStatus      = 0xC00000D2\n\tSTATUS_PROFILING_AT_LIMIT                                                 NTStatus      = 0xC00000D3\n\tSTATUS_NOT_SAME_DEVICE                                                    NTStatus      = 0xC00000D4\n\tSTATUS_FILE_RENAMED                                                       NTStatus      = 0xC00000D5\n\tSTATUS_VIRTUAL_CIRCUIT_CLOSED                                             NTStatus      = 0xC00000D6\n\tSTATUS_NO_SECURITY_ON_OBJECT                                              NTStatus      = 0xC00000D7\n\tSTATUS_CANT_WAIT                                                          NTStatus      = 0xC00000D8\n\tSTATUS_PIPE_EMPTY                                                         NTStatus      = 0xC00000D9\n\tSTATUS_CANT_ACCESS_DOMAIN_INFO                                            NTStatus      = 0xC00000DA\n\tSTATUS_CANT_TERMINATE_SELF                                                NTStatus      = 0xC00000DB\n\tSTATUS_INVALID_SERVER_STATE                                               NTStatus      = 0xC00000DC\n\tSTATUS_INVALID_DOMAIN_STATE                                               NTStatus      = 0xC00000DD\n\tSTATUS_INVALID_DOMAIN_ROLE                                                NTStatus      = 0xC00000DE\n\tSTATUS_NO_SUCH_DOMAIN                                                     NTStatus      = 0xC00000DF\n\tSTATUS_DOMAIN_EXISTS                                                      NTStatus      = 0xC00000E0\n\tSTATUS_DOMAIN_LIMIT_EXCEEDED                                              NTStatus      = 0xC00000E1\n\tSTATUS_OPLOCK_NOT_GRANTED                                                 NTStatus      = 0xC00000E2\n\tSTATUS_INVALID_OPLOCK_PROTOCOL                                            NTStatus      = 0xC00000E3\n\tSTATUS_INTERNAL_DB_CORRUPTION                                             NTStatus      = 0xC00000E4\n\tSTATUS_INTERNAL_ERROR                                                     NTStatus      = 0xC00000E5\n\tSTATUS_GENERIC_NOT_MAPPED                                                 NTStatus      = 0xC00000E6\n\tSTATUS_BAD_DESCRIPTOR_FORMAT                                              NTStatus      = 0xC00000E7\n\tSTATUS_INVALID_USER_BUFFER                                                NTStatus      = 0xC00000E8\n\tSTATUS_UNEXPECTED_IO_ERROR                                                NTStatus      = 0xC00000E9\n\tSTATUS_UNEXPECTED_MM_CREATE_ERR                                           NTStatus      = 0xC00000EA\n\tSTATUS_UNEXPECTED_MM_MAP_ERROR                                            NTStatus      = 0xC00000EB\n\tSTATUS_UNEXPECTED_MM_EXTEND_ERR                                           NTStatus      = 0xC00000EC\n\tSTATUS_NOT_LOGON_PROCESS                                                  NTStatus      = 0xC00000ED\n\tSTATUS_LOGON_SESSION_EXISTS                                               NTStatus      = 0xC00000EE\n\tSTATUS_INVALID_PARAMETER_1                                                NTStatus      = 0xC00000EF\n\tSTATUS_INVALID_PARAMETER_2                                                NTStatus      = 0xC00000F0\n\tSTATUS_INVALID_PARAMETER_3                                                NTStatus      = 0xC00000F1\n\tSTATUS_INVALID_PARAMETER_4                                                NTStatus      = 0xC00000F2\n\tSTATUS_INVALID_PARAMETER_5                                                NTStatus      = 0xC00000F3\n\tSTATUS_INVALID_PARAMETER_6                                                NTStatus      = 0xC00000F4\n\tSTATUS_INVALID_PARAMETER_7                                                NTStatus      = 0xC00000F5\n\tSTATUS_INVALID_PARAMETER_8                                                NTStatus      = 0xC00000F6\n\tSTATUS_INVALID_PARAMETER_9                                                NTStatus      = 0xC00000F7\n\tSTATUS_INVALID_PARAMETER_10                                               NTStatus      = 0xC00000F8\n\tSTATUS_INVALID_PARAMETER_11                                               NTStatus      = 0xC00000F9\n\tSTATUS_INVALID_PARAMETER_12                                               NTStatus      = 0xC00000FA\n\tSTATUS_REDIRECTOR_NOT_STARTED                                             NTStatus      = 0xC00000FB\n\tSTATUS_REDIRECTOR_STARTED                                                 NTStatus      = 0xC00000FC\n\tSTATUS_STACK_OVERFLOW                                                     NTStatus      = 0xC00000FD\n\tSTATUS_NO_SUCH_PACKAGE                                                    NTStatus      = 0xC00000FE\n\tSTATUS_BAD_FUNCTION_TABLE                                                 NTStatus      = 0xC00000FF\n\tSTATUS_VARIABLE_NOT_FOUND                                                 NTStatus      = 0xC0000100\n\tSTATUS_DIRECTORY_NOT_EMPTY                                                NTStatus      = 0xC0000101\n\tSTATUS_FILE_CORRUPT_ERROR                                                 NTStatus      = 0xC0000102\n\tSTATUS_NOT_A_DIRECTORY                                                    NTStatus      = 0xC0000103\n\tSTATUS_BAD_LOGON_SESSION_STATE                                            NTStatus      = 0xC0000104\n\tSTATUS_LOGON_SESSION_COLLISION                                            NTStatus      = 0xC0000105\n\tSTATUS_NAME_TOO_LONG                                                      NTStatus      = 0xC0000106\n\tSTATUS_FILES_OPEN                                                         NTStatus      = 0xC0000107\n\tSTATUS_CONNECTION_IN_USE                                                  NTStatus      = 0xC0000108\n\tSTATUS_MESSAGE_NOT_FOUND                                                  NTStatus      = 0xC0000109\n\tSTATUS_PROCESS_IS_TERMINATING                                             NTStatus      = 0xC000010A\n\tSTATUS_INVALID_LOGON_TYPE                                                 NTStatus      = 0xC000010B\n\tSTATUS_NO_GUID_TRANSLATION                                                NTStatus      = 0xC000010C\n\tSTATUS_CANNOT_IMPERSONATE                                                 NTStatus      = 0xC000010D\n\tSTATUS_IMAGE_ALREADY_LOADED                                               NTStatus      = 0xC000010E\n\tSTATUS_ABIOS_NOT_PRESENT                                                  NTStatus      = 0xC000010F\n\tSTATUS_ABIOS_LID_NOT_EXIST                                                NTStatus      = 0xC0000110\n\tSTATUS_ABIOS_LID_ALREADY_OWNED                                            NTStatus      = 0xC0000111\n\tSTATUS_ABIOS_NOT_LID_OWNER                                                NTStatus      = 0xC0000112\n\tSTATUS_ABIOS_INVALID_COMMAND                                              NTStatus      = 0xC0000113\n\tSTATUS_ABIOS_INVALID_LID                                                  NTStatus      = 0xC0000114\n\tSTATUS_ABIOS_SELECTOR_NOT_AVAILABLE                                       NTStatus      = 0xC0000115\n\tSTATUS_ABIOS_INVALID_SELECTOR                                             NTStatus      = 0xC0000116\n\tSTATUS_NO_LDT                                                             NTStatus      = 0xC0000117\n\tSTATUS_INVALID_LDT_SIZE                                                   NTStatus      = 0xC0000118\n\tSTATUS_INVALID_LDT_OFFSET                                                 NTStatus      = 0xC0000119\n\tSTATUS_INVALID_LDT_DESCRIPTOR                                             NTStatus      = 0xC000011A\n\tSTATUS_INVALID_IMAGE_NE_FORMAT                                            NTStatus      = 0xC000011B\n\tSTATUS_RXACT_INVALID_STATE                                                NTStatus      = 0xC000011C\n\tSTATUS_RXACT_COMMIT_FAILURE                                               NTStatus      = 0xC000011D\n\tSTATUS_MAPPED_FILE_SIZE_ZERO                                              NTStatus      = 0xC000011E\n\tSTATUS_TOO_MANY_OPENED_FILES                                              NTStatus      = 0xC000011F\n\tSTATUS_CANCELLED                                                          NTStatus      = 0xC0000120\n\tSTATUS_CANNOT_DELETE                                                      NTStatus      = 0xC0000121\n\tSTATUS_INVALID_COMPUTER_NAME                                              NTStatus      = 0xC0000122\n\tSTATUS_FILE_DELETED                                                       NTStatus      = 0xC0000123\n\tSTATUS_SPECIAL_ACCOUNT                                                    NTStatus      = 0xC0000124\n\tSTATUS_SPECIAL_GROUP                                                      NTStatus      = 0xC0000125\n\tSTATUS_SPECIAL_USER                                                       NTStatus      = 0xC0000126\n\tSTATUS_MEMBERS_PRIMARY_GROUP                                              NTStatus      = 0xC0000127\n\tSTATUS_FILE_CLOSED                                                        NTStatus      = 0xC0000128\n\tSTATUS_TOO_MANY_THREADS                                                   NTStatus      = 0xC0000129\n\tSTATUS_THREAD_NOT_IN_PROCESS                                              NTStatus      = 0xC000012A\n\tSTATUS_TOKEN_ALREADY_IN_USE                                               NTStatus      = 0xC000012B\n\tSTATUS_PAGEFILE_QUOTA_EXCEEDED                                            NTStatus      = 0xC000012C\n\tSTATUS_COMMITMENT_LIMIT                                                   NTStatus      = 0xC000012D\n\tSTATUS_INVALID_IMAGE_LE_FORMAT                                            NTStatus      = 0xC000012E\n\tSTATUS_INVALID_IMAGE_NOT_MZ                                               NTStatus      = 0xC000012F\n\tSTATUS_INVALID_IMAGE_PROTECT                                              NTStatus      = 0xC0000130\n\tSTATUS_INVALID_IMAGE_WIN_16                                               NTStatus      = 0xC0000131\n\tSTATUS_LOGON_SERVER_CONFLICT                                              NTStatus      = 0xC0000132\n\tSTATUS_TIME_DIFFERENCE_AT_DC                                              NTStatus      = 0xC0000133\n\tSTATUS_SYNCHRONIZATION_REQUIRED                                           NTStatus      = 0xC0000134\n\tSTATUS_DLL_NOT_FOUND                                                      NTStatus      = 0xC0000135\n\tSTATUS_OPEN_FAILED                                                        NTStatus      = 0xC0000136\n\tSTATUS_IO_PRIVILEGE_FAILED                                                NTStatus      = 0xC0000137\n\tSTATUS_ORDINAL_NOT_FOUND                                                  NTStatus      = 0xC0000138\n\tSTATUS_ENTRYPOINT_NOT_FOUND                                               NTStatus      = 0xC0000139\n\tSTATUS_CONTROL_C_EXIT                                                     NTStatus      = 0xC000013A\n\tSTATUS_LOCAL_DISCONNECT                                                   NTStatus      = 0xC000013B\n\tSTATUS_REMOTE_DISCONNECT                                                  NTStatus      = 0xC000013C\n\tSTATUS_REMOTE_RESOURCES                                                   NTStatus      = 0xC000013D\n\tSTATUS_LINK_FAILED                                                        NTStatus      = 0xC000013E\n\tSTATUS_LINK_TIMEOUT                                                       NTStatus      = 0xC000013F\n\tSTATUS_INVALID_CONNECTION                                                 NTStatus      = 0xC0000140\n\tSTATUS_INVALID_ADDRESS                                                    NTStatus      = 0xC0000141\n\tSTATUS_DLL_INIT_FAILED                                                    NTStatus      = 0xC0000142\n\tSTATUS_MISSING_SYSTEMFILE                                                 NTStatus      = 0xC0000143\n\tSTATUS_UNHANDLED_EXCEPTION                                                NTStatus      = 0xC0000144\n\tSTATUS_APP_INIT_FAILURE                                                   NTStatus      = 0xC0000145\n\tSTATUS_PAGEFILE_CREATE_FAILED                                             NTStatus      = 0xC0000146\n\tSTATUS_NO_PAGEFILE                                                        NTStatus      = 0xC0000147\n\tSTATUS_INVALID_LEVEL                                                      NTStatus      = 0xC0000148\n\tSTATUS_WRONG_PASSWORD_CORE                                                NTStatus      = 0xC0000149\n\tSTATUS_ILLEGAL_FLOAT_CONTEXT                                              NTStatus      = 0xC000014A\n\tSTATUS_PIPE_BROKEN                                                        NTStatus      = 0xC000014B\n\tSTATUS_REGISTRY_CORRUPT                                                   NTStatus      = 0xC000014C\n\tSTATUS_REGISTRY_IO_FAILED                                                 NTStatus      = 0xC000014D\n\tSTATUS_NO_EVENT_PAIR                                                      NTStatus      = 0xC000014E\n\tSTATUS_UNRECOGNIZED_VOLUME                                                NTStatus      = 0xC000014F\n\tSTATUS_SERIAL_NO_DEVICE_INITED                                            NTStatus      = 0xC0000150\n\tSTATUS_NO_SUCH_ALIAS                                                      NTStatus      = 0xC0000151\n\tSTATUS_MEMBER_NOT_IN_ALIAS                                                NTStatus      = 0xC0000152\n\tSTATUS_MEMBER_IN_ALIAS                                                    NTStatus      = 0xC0000153\n\tSTATUS_ALIAS_EXISTS                                                       NTStatus      = 0xC0000154\n\tSTATUS_LOGON_NOT_GRANTED                                                  NTStatus      = 0xC0000155\n\tSTATUS_TOO_MANY_SECRETS                                                   NTStatus      = 0xC0000156\n\tSTATUS_SECRET_TOO_LONG                                                    NTStatus      = 0xC0000157\n\tSTATUS_INTERNAL_DB_ERROR                                                  NTStatus      = 0xC0000158\n\tSTATUS_FULLSCREEN_MODE                                                    NTStatus      = 0xC0000159\n\tSTATUS_TOO_MANY_CONTEXT_IDS                                               NTStatus      = 0xC000015A\n\tSTATUS_LOGON_TYPE_NOT_GRANTED                                             NTStatus      = 0xC000015B\n\tSTATUS_NOT_REGISTRY_FILE                                                  NTStatus      = 0xC000015C\n\tSTATUS_NT_CROSS_ENCRYPTION_REQUIRED                                       NTStatus      = 0xC000015D\n\tSTATUS_DOMAIN_CTRLR_CONFIG_ERROR                                          NTStatus      = 0xC000015E\n\tSTATUS_FT_MISSING_MEMBER                                                  NTStatus      = 0xC000015F\n\tSTATUS_ILL_FORMED_SERVICE_ENTRY                                           NTStatus      = 0xC0000160\n\tSTATUS_ILLEGAL_CHARACTER                                                  NTStatus      = 0xC0000161\n\tSTATUS_UNMAPPABLE_CHARACTER                                               NTStatus      = 0xC0000162\n\tSTATUS_UNDEFINED_CHARACTER                                                NTStatus      = 0xC0000163\n\tSTATUS_FLOPPY_VOLUME                                                      NTStatus      = 0xC0000164\n\tSTATUS_FLOPPY_ID_MARK_NOT_FOUND                                           NTStatus      = 0xC0000165\n\tSTATUS_FLOPPY_WRONG_CYLINDER                                              NTStatus      = 0xC0000166\n\tSTATUS_FLOPPY_UNKNOWN_ERROR                                               NTStatus      = 0xC0000167\n\tSTATUS_FLOPPY_BAD_REGISTERS                                               NTStatus      = 0xC0000168\n\tSTATUS_DISK_RECALIBRATE_FAILED                                            NTStatus      = 0xC0000169\n\tSTATUS_DISK_OPERATION_FAILED                                              NTStatus      = 0xC000016A\n\tSTATUS_DISK_RESET_FAILED                                                  NTStatus      = 0xC000016B\n\tSTATUS_SHARED_IRQ_BUSY                                                    NTStatus      = 0xC000016C\n\tSTATUS_FT_ORPHANING                                                       NTStatus      = 0xC000016D\n\tSTATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT                                   NTStatus      = 0xC000016E\n\tSTATUS_PARTITION_FAILURE                                                  NTStatus      = 0xC0000172\n\tSTATUS_INVALID_BLOCK_LENGTH                                               NTStatus      = 0xC0000173\n\tSTATUS_DEVICE_NOT_PARTITIONED                                             NTStatus      = 0xC0000174\n\tSTATUS_UNABLE_TO_LOCK_MEDIA                                               NTStatus      = 0xC0000175\n\tSTATUS_UNABLE_TO_UNLOAD_MEDIA                                             NTStatus      = 0xC0000176\n\tSTATUS_EOM_OVERFLOW                                                       NTStatus      = 0xC0000177\n\tSTATUS_NO_MEDIA                                                           NTStatus      = 0xC0000178\n\tSTATUS_NO_SUCH_MEMBER                                                     NTStatus      = 0xC000017A\n\tSTATUS_INVALID_MEMBER                                                     NTStatus      = 0xC000017B\n\tSTATUS_KEY_DELETED                                                        NTStatus      = 0xC000017C\n\tSTATUS_NO_LOG_SPACE                                                       NTStatus      = 0xC000017D\n\tSTATUS_TOO_MANY_SIDS                                                      NTStatus      = 0xC000017E\n\tSTATUS_LM_CROSS_ENCRYPTION_REQUIRED                                       NTStatus      = 0xC000017F\n\tSTATUS_KEY_HAS_CHILDREN                                                   NTStatus      = 0xC0000180\n\tSTATUS_CHILD_MUST_BE_VOLATILE                                             NTStatus      = 0xC0000181\n\tSTATUS_DEVICE_CONFIGURATION_ERROR                                         NTStatus      = 0xC0000182\n\tSTATUS_DRIVER_INTERNAL_ERROR                                              NTStatus      = 0xC0000183\n\tSTATUS_INVALID_DEVICE_STATE                                               NTStatus      = 0xC0000184\n\tSTATUS_IO_DEVICE_ERROR                                                    NTStatus      = 0xC0000185\n\tSTATUS_DEVICE_PROTOCOL_ERROR                                              NTStatus      = 0xC0000186\n\tSTATUS_BACKUP_CONTROLLER                                                  NTStatus      = 0xC0000187\n\tSTATUS_LOG_FILE_FULL                                                      NTStatus      = 0xC0000188\n\tSTATUS_TOO_LATE                                                           NTStatus      = 0xC0000189\n\tSTATUS_NO_TRUST_LSA_SECRET                                                NTStatus      = 0xC000018A\n\tSTATUS_NO_TRUST_SAM_ACCOUNT                                               NTStatus      = 0xC000018B\n\tSTATUS_TRUSTED_DOMAIN_FAILURE                                             NTStatus      = 0xC000018C\n\tSTATUS_TRUSTED_RELATIONSHIP_FAILURE                                       NTStatus      = 0xC000018D\n\tSTATUS_EVENTLOG_FILE_CORRUPT                                              NTStatus      = 0xC000018E\n\tSTATUS_EVENTLOG_CANT_START                                                NTStatus      = 0xC000018F\n\tSTATUS_TRUST_FAILURE                                                      NTStatus      = 0xC0000190\n\tSTATUS_MUTANT_LIMIT_EXCEEDED                                              NTStatus      = 0xC0000191\n\tSTATUS_NETLOGON_NOT_STARTED                                               NTStatus      = 0xC0000192\n\tSTATUS_ACCOUNT_EXPIRED                                                    NTStatus      = 0xC0000193\n\tSTATUS_POSSIBLE_DEADLOCK                                                  NTStatus      = 0xC0000194\n\tSTATUS_NETWORK_CREDENTIAL_CONFLICT                                        NTStatus      = 0xC0000195\n\tSTATUS_REMOTE_SESSION_LIMIT                                               NTStatus      = 0xC0000196\n\tSTATUS_EVENTLOG_FILE_CHANGED                                              NTStatus      = 0xC0000197\n\tSTATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT                                  NTStatus      = 0xC0000198\n\tSTATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT                                  NTStatus      = 0xC0000199\n\tSTATUS_NOLOGON_SERVER_TRUST_ACCOUNT                                       NTStatus      = 0xC000019A\n\tSTATUS_DOMAIN_TRUST_INCONSISTENT                                          NTStatus      = 0xC000019B\n\tSTATUS_FS_DRIVER_REQUIRED                                                 NTStatus      = 0xC000019C\n\tSTATUS_IMAGE_ALREADY_LOADED_AS_DLL                                        NTStatus      = 0xC000019D\n\tSTATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING               NTStatus      = 0xC000019E\n\tSTATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME                                  NTStatus      = 0xC000019F\n\tSTATUS_SECURITY_STREAM_IS_INCONSISTENT                                    NTStatus      = 0xC00001A0\n\tSTATUS_INVALID_LOCK_RANGE                                                 NTStatus      = 0xC00001A1\n\tSTATUS_INVALID_ACE_CONDITION                                              NTStatus      = 0xC00001A2\n\tSTATUS_IMAGE_SUBSYSTEM_NOT_PRESENT                                        NTStatus      = 0xC00001A3\n\tSTATUS_NOTIFICATION_GUID_ALREADY_DEFINED                                  NTStatus      = 0xC00001A4\n\tSTATUS_INVALID_EXCEPTION_HANDLER                                          NTStatus      = 0xC00001A5\n\tSTATUS_DUPLICATE_PRIVILEGES                                               NTStatus      = 0xC00001A6\n\tSTATUS_NOT_ALLOWED_ON_SYSTEM_FILE                                         NTStatus      = 0xC00001A7\n\tSTATUS_REPAIR_NEEDED                                                      NTStatus      = 0xC00001A8\n\tSTATUS_QUOTA_NOT_ENABLED                                                  NTStatus      = 0xC00001A9\n\tSTATUS_NO_APPLICATION_PACKAGE                                             NTStatus      = 0xC00001AA\n\tSTATUS_FILE_METADATA_OPTIMIZATION_IN_PROGRESS                             NTStatus      = 0xC00001AB\n\tSTATUS_NOT_SAME_OBJECT                                                    NTStatus      = 0xC00001AC\n\tSTATUS_FATAL_MEMORY_EXHAUSTION                                            NTStatus      = 0xC00001AD\n\tSTATUS_ERROR_PROCESS_NOT_IN_JOB                                           NTStatus      = 0xC00001AE\n\tSTATUS_CPU_SET_INVALID                                                    NTStatus      = 0xC00001AF\n\tSTATUS_IO_DEVICE_INVALID_DATA                                             NTStatus      = 0xC00001B0\n\tSTATUS_IO_UNALIGNED_WRITE                                                 NTStatus      = 0xC00001B1\n\tSTATUS_NETWORK_OPEN_RESTRICTION                                           NTStatus      = 0xC0000201\n\tSTATUS_NO_USER_SESSION_KEY                                                NTStatus      = 0xC0000202\n\tSTATUS_USER_SESSION_DELETED                                               NTStatus      = 0xC0000203\n\tSTATUS_RESOURCE_LANG_NOT_FOUND                                            NTStatus      = 0xC0000204\n\tSTATUS_INSUFF_SERVER_RESOURCES                                            NTStatus      = 0xC0000205\n\tSTATUS_INVALID_BUFFER_SIZE                                                NTStatus      = 0xC0000206\n\tSTATUS_INVALID_ADDRESS_COMPONENT                                          NTStatus      = 0xC0000207\n\tSTATUS_INVALID_ADDRESS_WILDCARD                                           NTStatus      = 0xC0000208\n\tSTATUS_TOO_MANY_ADDRESSES                                                 NTStatus      = 0xC0000209\n\tSTATUS_ADDRESS_ALREADY_EXISTS                                             NTStatus      = 0xC000020A\n\tSTATUS_ADDRESS_CLOSED                                                     NTStatus      = 0xC000020B\n\tSTATUS_CONNECTION_DISCONNECTED                                            NTStatus      = 0xC000020C\n\tSTATUS_CONNECTION_RESET                                                   NTStatus      = 0xC000020D\n\tSTATUS_TOO_MANY_NODES                                                     NTStatus      = 0xC000020E\n\tSTATUS_TRANSACTION_ABORTED                                                NTStatus      = 0xC000020F\n\tSTATUS_TRANSACTION_TIMED_OUT                                              NTStatus      = 0xC0000210\n\tSTATUS_TRANSACTION_NO_RELEASE                                             NTStatus      = 0xC0000211\n\tSTATUS_TRANSACTION_NO_MATCH                                               NTStatus      = 0xC0000212\n\tSTATUS_TRANSACTION_RESPONDED                                              NTStatus      = 0xC0000213\n\tSTATUS_TRANSACTION_INVALID_ID                                             NTStatus      = 0xC0000214\n\tSTATUS_TRANSACTION_INVALID_TYPE                                           NTStatus      = 0xC0000215\n\tSTATUS_NOT_SERVER_SESSION                                                 NTStatus      = 0xC0000216\n\tSTATUS_NOT_CLIENT_SESSION                                                 NTStatus      = 0xC0000217\n\tSTATUS_CANNOT_LOAD_REGISTRY_FILE                                          NTStatus      = 0xC0000218\n\tSTATUS_DEBUG_ATTACH_FAILED                                                NTStatus      = 0xC0000219\n\tSTATUS_SYSTEM_PROCESS_TERMINATED                                          NTStatus      = 0xC000021A\n\tSTATUS_DATA_NOT_ACCEPTED                                                  NTStatus      = 0xC000021B\n\tSTATUS_NO_BROWSER_SERVERS_FOUND                                           NTStatus      = 0xC000021C\n\tSTATUS_VDM_HARD_ERROR                                                     NTStatus      = 0xC000021D\n\tSTATUS_DRIVER_CANCEL_TIMEOUT                                              NTStatus      = 0xC000021E\n\tSTATUS_REPLY_MESSAGE_MISMATCH                                             NTStatus      = 0xC000021F\n\tSTATUS_MAPPED_ALIGNMENT                                                   NTStatus      = 0xC0000220\n\tSTATUS_IMAGE_CHECKSUM_MISMATCH                                            NTStatus      = 0xC0000221\n\tSTATUS_LOST_WRITEBEHIND_DATA                                              NTStatus      = 0xC0000222\n\tSTATUS_CLIENT_SERVER_PARAMETERS_INVALID                                   NTStatus      = 0xC0000223\n\tSTATUS_PASSWORD_MUST_CHANGE                                               NTStatus      = 0xC0000224\n\tSTATUS_NOT_FOUND                                                          NTStatus      = 0xC0000225\n\tSTATUS_NOT_TINY_STREAM                                                    NTStatus      = 0xC0000226\n\tSTATUS_RECOVERY_FAILURE                                                   NTStatus      = 0xC0000227\n\tSTATUS_STACK_OVERFLOW_READ                                                NTStatus      = 0xC0000228\n\tSTATUS_FAIL_CHECK                                                         NTStatus      = 0xC0000229\n\tSTATUS_DUPLICATE_OBJECTID                                                 NTStatus      = 0xC000022A\n\tSTATUS_OBJECTID_EXISTS                                                    NTStatus      = 0xC000022B\n\tSTATUS_CONVERT_TO_LARGE                                                   NTStatus      = 0xC000022C\n\tSTATUS_RETRY                                                              NTStatus      = 0xC000022D\n\tSTATUS_FOUND_OUT_OF_SCOPE                                                 NTStatus      = 0xC000022E\n\tSTATUS_ALLOCATE_BUCKET                                                    NTStatus      = 0xC000022F\n\tSTATUS_PROPSET_NOT_FOUND                                                  NTStatus      = 0xC0000230\n\tSTATUS_MARSHALL_OVERFLOW                                                  NTStatus      = 0xC0000231\n\tSTATUS_INVALID_VARIANT                                                    NTStatus      = 0xC0000232\n\tSTATUS_DOMAIN_CONTROLLER_NOT_FOUND                                        NTStatus      = 0xC0000233\n\tSTATUS_ACCOUNT_LOCKED_OUT                                                 NTStatus      = 0xC0000234\n\tSTATUS_HANDLE_NOT_CLOSABLE                                                NTStatus      = 0xC0000235\n\tSTATUS_CONNECTION_REFUSED                                                 NTStatus      = 0xC0000236\n\tSTATUS_GRACEFUL_DISCONNECT                                                NTStatus      = 0xC0000237\n\tSTATUS_ADDRESS_ALREADY_ASSOCIATED                                         NTStatus      = 0xC0000238\n\tSTATUS_ADDRESS_NOT_ASSOCIATED                                             NTStatus      = 0xC0000239\n\tSTATUS_CONNECTION_INVALID                                                 NTStatus      = 0xC000023A\n\tSTATUS_CONNECTION_ACTIVE                                                  NTStatus      = 0xC000023B\n\tSTATUS_NETWORK_UNREACHABLE                                                NTStatus      = 0xC000023C\n\tSTATUS_HOST_UNREACHABLE                                                   NTStatus      = 0xC000023D\n\tSTATUS_PROTOCOL_UNREACHABLE                                               NTStatus      = 0xC000023E\n\tSTATUS_PORT_UNREACHABLE                                                   NTStatus      = 0xC000023F\n\tSTATUS_REQUEST_ABORTED                                                    NTStatus      = 0xC0000240\n\tSTATUS_CONNECTION_ABORTED                                                 NTStatus      = 0xC0000241\n\tSTATUS_BAD_COMPRESSION_BUFFER                                             NTStatus      = 0xC0000242\n\tSTATUS_USER_MAPPED_FILE                                                   NTStatus      = 0xC0000243\n\tSTATUS_AUDIT_FAILED                                                       NTStatus      = 0xC0000244\n\tSTATUS_TIMER_RESOLUTION_NOT_SET                                           NTStatus      = 0xC0000245\n\tSTATUS_CONNECTION_COUNT_LIMIT                                             NTStatus      = 0xC0000246\n\tSTATUS_LOGIN_TIME_RESTRICTION                                             NTStatus      = 0xC0000247\n\tSTATUS_LOGIN_WKSTA_RESTRICTION                                            NTStatus      = 0xC0000248\n\tSTATUS_IMAGE_MP_UP_MISMATCH                                               NTStatus      = 0xC0000249\n\tSTATUS_INSUFFICIENT_LOGON_INFO                                            NTStatus      = 0xC0000250\n\tSTATUS_BAD_DLL_ENTRYPOINT                                                 NTStatus      = 0xC0000251\n\tSTATUS_BAD_SERVICE_ENTRYPOINT                                             NTStatus      = 0xC0000252\n\tSTATUS_LPC_REPLY_LOST                                                     NTStatus      = 0xC0000253\n\tSTATUS_IP_ADDRESS_CONFLICT1                                               NTStatus      = 0xC0000254\n\tSTATUS_IP_ADDRESS_CONFLICT2                                               NTStatus      = 0xC0000255\n\tSTATUS_REGISTRY_QUOTA_LIMIT                                               NTStatus      = 0xC0000256\n\tSTATUS_PATH_NOT_COVERED                                                   NTStatus      = 0xC0000257\n\tSTATUS_NO_CALLBACK_ACTIVE                                                 NTStatus      = 0xC0000258\n\tSTATUS_LICENSE_QUOTA_EXCEEDED                                             NTStatus      = 0xC0000259\n\tSTATUS_PWD_TOO_SHORT                                                      NTStatus      = 0xC000025A\n\tSTATUS_PWD_TOO_RECENT                                                     NTStatus      = 0xC000025B\n\tSTATUS_PWD_HISTORY_CONFLICT                                               NTStatus      = 0xC000025C\n\tSTATUS_PLUGPLAY_NO_DEVICE                                                 NTStatus      = 0xC000025E\n\tSTATUS_UNSUPPORTED_COMPRESSION                                            NTStatus      = 0xC000025F\n\tSTATUS_INVALID_HW_PROFILE                                                 NTStatus      = 0xC0000260\n\tSTATUS_INVALID_PLUGPLAY_DEVICE_PATH                                       NTStatus      = 0xC0000261\n\tSTATUS_DRIVER_ORDINAL_NOT_FOUND                                           NTStatus      = 0xC0000262\n\tSTATUS_DRIVER_ENTRYPOINT_NOT_FOUND                                        NTStatus      = 0xC0000263\n\tSTATUS_RESOURCE_NOT_OWNED                                                 NTStatus      = 0xC0000264\n\tSTATUS_TOO_MANY_LINKS                                                     NTStatus      = 0xC0000265\n\tSTATUS_QUOTA_LIST_INCONSISTENT                                            NTStatus      = 0xC0000266\n\tSTATUS_FILE_IS_OFFLINE                                                    NTStatus      = 0xC0000267\n\tSTATUS_EVALUATION_EXPIRATION                                              NTStatus      = 0xC0000268\n\tSTATUS_ILLEGAL_DLL_RELOCATION                                             NTStatus      = 0xC0000269\n\tSTATUS_LICENSE_VIOLATION                                                  NTStatus      = 0xC000026A\n\tSTATUS_DLL_INIT_FAILED_LOGOFF                                             NTStatus      = 0xC000026B\n\tSTATUS_DRIVER_UNABLE_TO_LOAD                                              NTStatus      = 0xC000026C\n\tSTATUS_DFS_UNAVAILABLE                                                    NTStatus      = 0xC000026D\n\tSTATUS_VOLUME_DISMOUNTED                                                  NTStatus      = 0xC000026E\n\tSTATUS_WX86_INTERNAL_ERROR                                                NTStatus      = 0xC000026F\n\tSTATUS_WX86_FLOAT_STACK_CHECK                                             NTStatus      = 0xC0000270\n\tSTATUS_VALIDATE_CONTINUE                                                  NTStatus      = 0xC0000271\n\tSTATUS_NO_MATCH                                                           NTStatus      = 0xC0000272\n\tSTATUS_NO_MORE_MATCHES                                                    NTStatus      = 0xC0000273\n\tSTATUS_NOT_A_REPARSE_POINT                                                NTStatus      = 0xC0000275\n\tSTATUS_IO_REPARSE_TAG_INVALID                                             NTStatus      = 0xC0000276\n\tSTATUS_IO_REPARSE_TAG_MISMATCH                                            NTStatus      = 0xC0000277\n\tSTATUS_IO_REPARSE_DATA_INVALID                                            NTStatus      = 0xC0000278\n\tSTATUS_IO_REPARSE_TAG_NOT_HANDLED                                         NTStatus      = 0xC0000279\n\tSTATUS_PWD_TOO_LONG                                                       NTStatus      = 0xC000027A\n\tSTATUS_STOWED_EXCEPTION                                                   NTStatus      = 0xC000027B\n\tSTATUS_CONTEXT_STOWED_EXCEPTION                                           NTStatus      = 0xC000027C\n\tSTATUS_REPARSE_POINT_NOT_RESOLVED                                         NTStatus      = 0xC0000280\n\tSTATUS_DIRECTORY_IS_A_REPARSE_POINT                                       NTStatus      = 0xC0000281\n\tSTATUS_RANGE_LIST_CONFLICT                                                NTStatus      = 0xC0000282\n\tSTATUS_SOURCE_ELEMENT_EMPTY                                               NTStatus      = 0xC0000283\n\tSTATUS_DESTINATION_ELEMENT_FULL                                           NTStatus      = 0xC0000284\n\tSTATUS_ILLEGAL_ELEMENT_ADDRESS                                            NTStatus      = 0xC0000285\n\tSTATUS_MAGAZINE_NOT_PRESENT                                               NTStatus      = 0xC0000286\n\tSTATUS_REINITIALIZATION_NEEDED                                            NTStatus      = 0xC0000287\n\tSTATUS_DEVICE_REQUIRES_CLEANING                                           NTStatus      = 0x80000288\n\tSTATUS_DEVICE_DOOR_OPEN                                                   NTStatus      = 0x80000289\n\tSTATUS_ENCRYPTION_FAILED                                                  NTStatus      = 0xC000028A\n\tSTATUS_DECRYPTION_FAILED                                                  NTStatus      = 0xC000028B\n\tSTATUS_RANGE_NOT_FOUND                                                    NTStatus      = 0xC000028C\n\tSTATUS_NO_RECOVERY_POLICY                                                 NTStatus      = 0xC000028D\n\tSTATUS_NO_EFS                                                             NTStatus      = 0xC000028E\n\tSTATUS_WRONG_EFS                                                          NTStatus      = 0xC000028F\n\tSTATUS_NO_USER_KEYS                                                       NTStatus      = 0xC0000290\n\tSTATUS_FILE_NOT_ENCRYPTED                                                 NTStatus      = 0xC0000291\n\tSTATUS_NOT_EXPORT_FORMAT                                                  NTStatus      = 0xC0000292\n\tSTATUS_FILE_ENCRYPTED                                                     NTStatus      = 0xC0000293\n\tSTATUS_WAKE_SYSTEM                                                        NTStatus      = 0x40000294\n\tSTATUS_WMI_GUID_NOT_FOUND                                                 NTStatus      = 0xC0000295\n\tSTATUS_WMI_INSTANCE_NOT_FOUND                                             NTStatus      = 0xC0000296\n\tSTATUS_WMI_ITEMID_NOT_FOUND                                               NTStatus      = 0xC0000297\n\tSTATUS_WMI_TRY_AGAIN                                                      NTStatus      = 0xC0000298\n\tSTATUS_SHARED_POLICY                                                      NTStatus      = 0xC0000299\n\tSTATUS_POLICY_OBJECT_NOT_FOUND                                            NTStatus      = 0xC000029A\n\tSTATUS_POLICY_ONLY_IN_DS                                                  NTStatus      = 0xC000029B\n\tSTATUS_VOLUME_NOT_UPGRADED                                                NTStatus      = 0xC000029C\n\tSTATUS_REMOTE_STORAGE_NOT_ACTIVE                                          NTStatus      = 0xC000029D\n\tSTATUS_REMOTE_STORAGE_MEDIA_ERROR                                         NTStatus      = 0xC000029E\n\tSTATUS_NO_TRACKING_SERVICE                                                NTStatus      = 0xC000029F\n\tSTATUS_SERVER_SID_MISMATCH                                                NTStatus      = 0xC00002A0\n\tSTATUS_DS_NO_ATTRIBUTE_OR_VALUE                                           NTStatus      = 0xC00002A1\n\tSTATUS_DS_INVALID_ATTRIBUTE_SYNTAX                                        NTStatus      = 0xC00002A2\n\tSTATUS_DS_ATTRIBUTE_TYPE_UNDEFINED                                        NTStatus      = 0xC00002A3\n\tSTATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS                                       NTStatus      = 0xC00002A4\n\tSTATUS_DS_BUSY                                                            NTStatus      = 0xC00002A5\n\tSTATUS_DS_UNAVAILABLE                                                     NTStatus      = 0xC00002A6\n\tSTATUS_DS_NO_RIDS_ALLOCATED                                               NTStatus      = 0xC00002A7\n\tSTATUS_DS_NO_MORE_RIDS                                                    NTStatus      = 0xC00002A8\n\tSTATUS_DS_INCORRECT_ROLE_OWNER                                            NTStatus      = 0xC00002A9\n\tSTATUS_DS_RIDMGR_INIT_ERROR                                               NTStatus      = 0xC00002AA\n\tSTATUS_DS_OBJ_CLASS_VIOLATION                                             NTStatus      = 0xC00002AB\n\tSTATUS_DS_CANT_ON_NON_LEAF                                                NTStatus      = 0xC00002AC\n\tSTATUS_DS_CANT_ON_RDN                                                     NTStatus      = 0xC00002AD\n\tSTATUS_DS_CANT_MOD_OBJ_CLASS                                              NTStatus      = 0xC00002AE\n\tSTATUS_DS_CROSS_DOM_MOVE_FAILED                                           NTStatus      = 0xC00002AF\n\tSTATUS_DS_GC_NOT_AVAILABLE                                                NTStatus      = 0xC00002B0\n\tSTATUS_DIRECTORY_SERVICE_REQUIRED                                         NTStatus      = 0xC00002B1\n\tSTATUS_REPARSE_ATTRIBUTE_CONFLICT                                         NTStatus      = 0xC00002B2\n\tSTATUS_CANT_ENABLE_DENY_ONLY                                              NTStatus      = 0xC00002B3\n\tSTATUS_FLOAT_MULTIPLE_FAULTS                                              NTStatus      = 0xC00002B4\n\tSTATUS_FLOAT_MULTIPLE_TRAPS                                               NTStatus      = 0xC00002B5\n\tSTATUS_DEVICE_REMOVED                                                     NTStatus      = 0xC00002B6\n\tSTATUS_JOURNAL_DELETE_IN_PROGRESS                                         NTStatus      = 0xC00002B7\n\tSTATUS_JOURNAL_NOT_ACTIVE                                                 NTStatus      = 0xC00002B8\n\tSTATUS_NOINTERFACE                                                        NTStatus      = 0xC00002B9\n\tSTATUS_DS_RIDMGR_DISABLED                                                 NTStatus      = 0xC00002BA\n\tSTATUS_DS_ADMIN_LIMIT_EXCEEDED                                            NTStatus      = 0xC00002C1\n\tSTATUS_DRIVER_FAILED_SLEEP                                                NTStatus      = 0xC00002C2\n\tSTATUS_MUTUAL_AUTHENTICATION_FAILED                                       NTStatus      = 0xC00002C3\n\tSTATUS_CORRUPT_SYSTEM_FILE                                                NTStatus      = 0xC00002C4\n\tSTATUS_DATATYPE_MISALIGNMENT_ERROR                                        NTStatus      = 0xC00002C5\n\tSTATUS_WMI_READ_ONLY                                                      NTStatus      = 0xC00002C6\n\tSTATUS_WMI_SET_FAILURE                                                    NTStatus      = 0xC00002C7\n\tSTATUS_COMMITMENT_MINIMUM                                                 NTStatus      = 0xC00002C8\n\tSTATUS_REG_NAT_CONSUMPTION                                                NTStatus      = 0xC00002C9\n\tSTATUS_TRANSPORT_FULL                                                     NTStatus      = 0xC00002CA\n\tSTATUS_DS_SAM_INIT_FAILURE                                                NTStatus      = 0xC00002CB\n\tSTATUS_ONLY_IF_CONNECTED                                                  NTStatus      = 0xC00002CC\n\tSTATUS_DS_SENSITIVE_GROUP_VIOLATION                                       NTStatus      = 0xC00002CD\n\tSTATUS_PNP_RESTART_ENUMERATION                                            NTStatus      = 0xC00002CE\n\tSTATUS_JOURNAL_ENTRY_DELETED                                              NTStatus      = 0xC00002CF\n\tSTATUS_DS_CANT_MOD_PRIMARYGROUPID                                         NTStatus      = 0xC00002D0\n\tSTATUS_SYSTEM_IMAGE_BAD_SIGNATURE                                         NTStatus      = 0xC00002D1\n\tSTATUS_PNP_REBOOT_REQUIRED                                                NTStatus      = 0xC00002D2\n\tSTATUS_POWER_STATE_INVALID                                                NTStatus      = 0xC00002D3\n\tSTATUS_DS_INVALID_GROUP_TYPE                                              NTStatus      = 0xC00002D4\n\tSTATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN                              NTStatus      = 0xC00002D5\n\tSTATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN                               NTStatus      = 0xC00002D6\n\tSTATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER                                   NTStatus      = 0xC00002D7\n\tSTATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER                               NTStatus      = 0xC00002D8\n\tSTATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER                                NTStatus      = 0xC00002D9\n\tSTATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER                             NTStatus      = 0xC00002DA\n\tSTATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER                        NTStatus      = 0xC00002DB\n\tSTATUS_DS_HAVE_PRIMARY_MEMBERS                                            NTStatus      = 0xC00002DC\n\tSTATUS_WMI_NOT_SUPPORTED                                                  NTStatus      = 0xC00002DD\n\tSTATUS_INSUFFICIENT_POWER                                                 NTStatus      = 0xC00002DE\n\tSTATUS_SAM_NEED_BOOTKEY_PASSWORD                                          NTStatus      = 0xC00002DF\n\tSTATUS_SAM_NEED_BOOTKEY_FLOPPY                                            NTStatus      = 0xC00002E0\n\tSTATUS_DS_CANT_START                                                      NTStatus      = 0xC00002E1\n\tSTATUS_DS_INIT_FAILURE                                                    NTStatus      = 0xC00002E2\n\tSTATUS_SAM_INIT_FAILURE                                                   NTStatus      = 0xC00002E3\n\tSTATUS_DS_GC_REQUIRED                                                     NTStatus      = 0xC00002E4\n\tSTATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY                                      NTStatus      = 0xC00002E5\n\tSTATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS                                      NTStatus      = 0xC00002E6\n\tSTATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED                                  NTStatus      = 0xC00002E7\n\tSTATUS_MULTIPLE_FAULT_VIOLATION                                           NTStatus      = 0xC00002E8\n\tSTATUS_CURRENT_DOMAIN_NOT_ALLOWED                                         NTStatus      = 0xC00002E9\n\tSTATUS_CANNOT_MAKE                                                        NTStatus      = 0xC00002EA\n\tSTATUS_SYSTEM_SHUTDOWN                                                    NTStatus      = 0xC00002EB\n\tSTATUS_DS_INIT_FAILURE_CONSOLE                                            NTStatus      = 0xC00002EC\n\tSTATUS_DS_SAM_INIT_FAILURE_CONSOLE                                        NTStatus      = 0xC00002ED\n\tSTATUS_UNFINISHED_CONTEXT_DELETED                                         NTStatus      = 0xC00002EE\n\tSTATUS_NO_TGT_REPLY                                                       NTStatus      = 0xC00002EF\n\tSTATUS_OBJECTID_NOT_FOUND                                                 NTStatus      = 0xC00002F0\n\tSTATUS_NO_IP_ADDRESSES                                                    NTStatus      = 0xC00002F1\n\tSTATUS_WRONG_CREDENTIAL_HANDLE                                            NTStatus      = 0xC00002F2\n\tSTATUS_CRYPTO_SYSTEM_INVALID                                              NTStatus      = 0xC00002F3\n\tSTATUS_MAX_REFERRALS_EXCEEDED                                             NTStatus      = 0xC00002F4\n\tSTATUS_MUST_BE_KDC                                                        NTStatus      = 0xC00002F5\n\tSTATUS_STRONG_CRYPTO_NOT_SUPPORTED                                        NTStatus      = 0xC00002F6\n\tSTATUS_TOO_MANY_PRINCIPALS                                                NTStatus      = 0xC00002F7\n\tSTATUS_NO_PA_DATA                                                         NTStatus      = 0xC00002F8\n\tSTATUS_PKINIT_NAME_MISMATCH                                               NTStatus      = 0xC00002F9\n\tSTATUS_SMARTCARD_LOGON_REQUIRED                                           NTStatus      = 0xC00002FA\n\tSTATUS_KDC_INVALID_REQUEST                                                NTStatus      = 0xC00002FB\n\tSTATUS_KDC_UNABLE_TO_REFER                                                NTStatus      = 0xC00002FC\n\tSTATUS_KDC_UNKNOWN_ETYPE                                                  NTStatus      = 0xC00002FD\n\tSTATUS_SHUTDOWN_IN_PROGRESS                                               NTStatus      = 0xC00002FE\n\tSTATUS_SERVER_SHUTDOWN_IN_PROGRESS                                        NTStatus      = 0xC00002FF\n\tSTATUS_NOT_SUPPORTED_ON_SBS                                               NTStatus      = 0xC0000300\n\tSTATUS_WMI_GUID_DISCONNECTED                                              NTStatus      = 0xC0000301\n\tSTATUS_WMI_ALREADY_DISABLED                                               NTStatus      = 0xC0000302\n\tSTATUS_WMI_ALREADY_ENABLED                                                NTStatus      = 0xC0000303\n\tSTATUS_MFT_TOO_FRAGMENTED                                                 NTStatus      = 0xC0000304\n\tSTATUS_COPY_PROTECTION_FAILURE                                            NTStatus      = 0xC0000305\n\tSTATUS_CSS_AUTHENTICATION_FAILURE                                         NTStatus      = 0xC0000306\n\tSTATUS_CSS_KEY_NOT_PRESENT                                                NTStatus      = 0xC0000307\n\tSTATUS_CSS_KEY_NOT_ESTABLISHED                                            NTStatus      = 0xC0000308\n\tSTATUS_CSS_SCRAMBLED_SECTOR                                               NTStatus      = 0xC0000309\n\tSTATUS_CSS_REGION_MISMATCH                                                NTStatus      = 0xC000030A\n\tSTATUS_CSS_RESETS_EXHAUSTED                                               NTStatus      = 0xC000030B\n\tSTATUS_PASSWORD_CHANGE_REQUIRED                                           NTStatus      = 0xC000030C\n\tSTATUS_LOST_MODE_LOGON_RESTRICTION                                        NTStatus      = 0xC000030D\n\tSTATUS_PKINIT_FAILURE                                                     NTStatus      = 0xC0000320\n\tSTATUS_SMARTCARD_SUBSYSTEM_FAILURE                                        NTStatus      = 0xC0000321\n\tSTATUS_NO_KERB_KEY                                                        NTStatus      = 0xC0000322\n\tSTATUS_HOST_DOWN                                                          NTStatus      = 0xC0000350\n\tSTATUS_UNSUPPORTED_PREAUTH                                                NTStatus      = 0xC0000351\n\tSTATUS_EFS_ALG_BLOB_TOO_BIG                                               NTStatus      = 0xC0000352\n\tSTATUS_PORT_NOT_SET                                                       NTStatus      = 0xC0000353\n\tSTATUS_DEBUGGER_INACTIVE                                                  NTStatus      = 0xC0000354\n\tSTATUS_DS_VERSION_CHECK_FAILURE                                           NTStatus      = 0xC0000355\n\tSTATUS_AUDITING_DISABLED                                                  NTStatus      = 0xC0000356\n\tSTATUS_PRENT4_MACHINE_ACCOUNT                                             NTStatus      = 0xC0000357\n\tSTATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER                                   NTStatus      = 0xC0000358\n\tSTATUS_INVALID_IMAGE_WIN_32                                               NTStatus      = 0xC0000359\n\tSTATUS_INVALID_IMAGE_WIN_64                                               NTStatus      = 0xC000035A\n\tSTATUS_BAD_BINDINGS                                                       NTStatus      = 0xC000035B\n\tSTATUS_NETWORK_SESSION_EXPIRED                                            NTStatus      = 0xC000035C\n\tSTATUS_APPHELP_BLOCK                                                      NTStatus      = 0xC000035D\n\tSTATUS_ALL_SIDS_FILTERED                                                  NTStatus      = 0xC000035E\n\tSTATUS_NOT_SAFE_MODE_DRIVER                                               NTStatus      = 0xC000035F\n\tSTATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT                                  NTStatus      = 0xC0000361\n\tSTATUS_ACCESS_DISABLED_BY_POLICY_PATH                                     NTStatus      = 0xC0000362\n\tSTATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER                                NTStatus      = 0xC0000363\n\tSTATUS_ACCESS_DISABLED_BY_POLICY_OTHER                                    NTStatus      = 0xC0000364\n\tSTATUS_FAILED_DRIVER_ENTRY                                                NTStatus      = 0xC0000365\n\tSTATUS_DEVICE_ENUMERATION_ERROR                                           NTStatus      = 0xC0000366\n\tSTATUS_MOUNT_POINT_NOT_RESOLVED                                           NTStatus      = 0xC0000368\n\tSTATUS_INVALID_DEVICE_OBJECT_PARAMETER                                    NTStatus      = 0xC0000369\n\tSTATUS_MCA_OCCURED                                                        NTStatus      = 0xC000036A\n\tSTATUS_DRIVER_BLOCKED_CRITICAL                                            NTStatus      = 0xC000036B\n\tSTATUS_DRIVER_BLOCKED                                                     NTStatus      = 0xC000036C\n\tSTATUS_DRIVER_DATABASE_ERROR                                              NTStatus      = 0xC000036D\n\tSTATUS_SYSTEM_HIVE_TOO_LARGE                                              NTStatus      = 0xC000036E\n\tSTATUS_INVALID_IMPORT_OF_NON_DLL                                          NTStatus      = 0xC000036F\n\tSTATUS_DS_SHUTTING_DOWN                                                   NTStatus      = 0x40000370\n\tSTATUS_NO_SECRETS                                                         NTStatus      = 0xC0000371\n\tSTATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY                              NTStatus      = 0xC0000372\n\tSTATUS_FAILED_STACK_SWITCH                                                NTStatus      = 0xC0000373\n\tSTATUS_HEAP_CORRUPTION                                                    NTStatus      = 0xC0000374\n\tSTATUS_SMARTCARD_WRONG_PIN                                                NTStatus      = 0xC0000380\n\tSTATUS_SMARTCARD_CARD_BLOCKED                                             NTStatus      = 0xC0000381\n\tSTATUS_SMARTCARD_CARD_NOT_AUTHENTICATED                                   NTStatus      = 0xC0000382\n\tSTATUS_SMARTCARD_NO_CARD                                                  NTStatus      = 0xC0000383\n\tSTATUS_SMARTCARD_NO_KEY_CONTAINER                                         NTStatus      = 0xC0000384\n\tSTATUS_SMARTCARD_NO_CERTIFICATE                                           NTStatus      = 0xC0000385\n\tSTATUS_SMARTCARD_NO_KEYSET                                                NTStatus      = 0xC0000386\n\tSTATUS_SMARTCARD_IO_ERROR                                                 NTStatus      = 0xC0000387\n\tSTATUS_DOWNGRADE_DETECTED                                                 NTStatus      = 0xC0000388\n\tSTATUS_SMARTCARD_CERT_REVOKED                                             NTStatus      = 0xC0000389\n\tSTATUS_ISSUING_CA_UNTRUSTED                                               NTStatus      = 0xC000038A\n\tSTATUS_REVOCATION_OFFLINE_C                                               NTStatus      = 0xC000038B\n\tSTATUS_PKINIT_CLIENT_FAILURE                                              NTStatus      = 0xC000038C\n\tSTATUS_SMARTCARD_CERT_EXPIRED                                             NTStatus      = 0xC000038D\n\tSTATUS_DRIVER_FAILED_PRIOR_UNLOAD                                         NTStatus      = 0xC000038E\n\tSTATUS_SMARTCARD_SILENT_CONTEXT                                           NTStatus      = 0xC000038F\n\tSTATUS_PER_USER_TRUST_QUOTA_EXCEEDED                                      NTStatus      = 0xC0000401\n\tSTATUS_ALL_USER_TRUST_QUOTA_EXCEEDED                                      NTStatus      = 0xC0000402\n\tSTATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED                                   NTStatus      = 0xC0000403\n\tSTATUS_DS_NAME_NOT_UNIQUE                                                 NTStatus      = 0xC0000404\n\tSTATUS_DS_DUPLICATE_ID_FOUND                                              NTStatus      = 0xC0000405\n\tSTATUS_DS_GROUP_CONVERSION_ERROR                                          NTStatus      = 0xC0000406\n\tSTATUS_VOLSNAP_PREPARE_HIBERNATE                                          NTStatus      = 0xC0000407\n\tSTATUS_USER2USER_REQUIRED                                                 NTStatus      = 0xC0000408\n\tSTATUS_STACK_BUFFER_OVERRUN                                               NTStatus      = 0xC0000409\n\tSTATUS_NO_S4U_PROT_SUPPORT                                                NTStatus      = 0xC000040A\n\tSTATUS_CROSSREALM_DELEGATION_FAILURE                                      NTStatus      = 0xC000040B\n\tSTATUS_REVOCATION_OFFLINE_KDC                                             NTStatus      = 0xC000040C\n\tSTATUS_ISSUING_CA_UNTRUSTED_KDC                                           NTStatus      = 0xC000040D\n\tSTATUS_KDC_CERT_EXPIRED                                                   NTStatus      = 0xC000040E\n\tSTATUS_KDC_CERT_REVOKED                                                   NTStatus      = 0xC000040F\n\tSTATUS_PARAMETER_QUOTA_EXCEEDED                                           NTStatus      = 0xC0000410\n\tSTATUS_HIBERNATION_FAILURE                                                NTStatus      = 0xC0000411\n\tSTATUS_DELAY_LOAD_FAILED                                                  NTStatus      = 0xC0000412\n\tSTATUS_AUTHENTICATION_FIREWALL_FAILED                                     NTStatus      = 0xC0000413\n\tSTATUS_VDM_DISALLOWED                                                     NTStatus      = 0xC0000414\n\tSTATUS_HUNG_DISPLAY_DRIVER_THREAD                                         NTStatus      = 0xC0000415\n\tSTATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE            NTStatus      = 0xC0000416\n\tSTATUS_INVALID_CRUNTIME_PARAMETER                                         NTStatus      = 0xC0000417\n\tSTATUS_NTLM_BLOCKED                                                       NTStatus      = 0xC0000418\n\tSTATUS_DS_SRC_SID_EXISTS_IN_FOREST                                        NTStatus      = 0xC0000419\n\tSTATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST                                    NTStatus      = 0xC000041A\n\tSTATUS_DS_FLAT_NAME_EXISTS_IN_FOREST                                      NTStatus      = 0xC000041B\n\tSTATUS_INVALID_USER_PRINCIPAL_NAME                                        NTStatus      = 0xC000041C\n\tSTATUS_FATAL_USER_CALLBACK_EXCEPTION                                      NTStatus      = 0xC000041D\n\tSTATUS_ASSERTION_FAILURE                                                  NTStatus      = 0xC0000420\n\tSTATUS_VERIFIER_STOP                                                      NTStatus      = 0xC0000421\n\tSTATUS_CALLBACK_POP_STACK                                                 NTStatus      = 0xC0000423\n\tSTATUS_INCOMPATIBLE_DRIVER_BLOCKED                                        NTStatus      = 0xC0000424\n\tSTATUS_HIVE_UNLOADED                                                      NTStatus      = 0xC0000425\n\tSTATUS_COMPRESSION_DISABLED                                               NTStatus      = 0xC0000426\n\tSTATUS_FILE_SYSTEM_LIMITATION                                             NTStatus      = 0xC0000427\n\tSTATUS_INVALID_IMAGE_HASH                                                 NTStatus      = 0xC0000428\n\tSTATUS_NOT_CAPABLE                                                        NTStatus      = 0xC0000429\n\tSTATUS_REQUEST_OUT_OF_SEQUENCE                                            NTStatus      = 0xC000042A\n\tSTATUS_IMPLEMENTATION_LIMIT                                               NTStatus      = 0xC000042B\n\tSTATUS_ELEVATION_REQUIRED                                                 NTStatus      = 0xC000042C\n\tSTATUS_NO_SECURITY_CONTEXT                                                NTStatus      = 0xC000042D\n\tSTATUS_PKU2U_CERT_FAILURE                                                 NTStatus      = 0xC000042F\n\tSTATUS_BEYOND_VDL                                                         NTStatus      = 0xC0000432\n\tSTATUS_ENCOUNTERED_WRITE_IN_PROGRESS                                      NTStatus      = 0xC0000433\n\tSTATUS_PTE_CHANGED                                                        NTStatus      = 0xC0000434\n\tSTATUS_PURGE_FAILED                                                       NTStatus      = 0xC0000435\n\tSTATUS_CRED_REQUIRES_CONFIRMATION                                         NTStatus      = 0xC0000440\n\tSTATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE                              NTStatus      = 0xC0000441\n\tSTATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER                                   NTStatus      = 0xC0000442\n\tSTATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE                              NTStatus      = 0xC0000443\n\tSTATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE                                   NTStatus      = 0xC0000444\n\tSTATUS_CS_ENCRYPTION_FILE_NOT_CSE                                         NTStatus      = 0xC0000445\n\tSTATUS_INVALID_LABEL                                                      NTStatus      = 0xC0000446\n\tSTATUS_DRIVER_PROCESS_TERMINATED                                          NTStatus      = 0xC0000450\n\tSTATUS_AMBIGUOUS_SYSTEM_DEVICE                                            NTStatus      = 0xC0000451\n\tSTATUS_SYSTEM_DEVICE_NOT_FOUND                                            NTStatus      = 0xC0000452\n\tSTATUS_RESTART_BOOT_APPLICATION                                           NTStatus      = 0xC0000453\n\tSTATUS_INSUFFICIENT_NVRAM_RESOURCES                                       NTStatus      = 0xC0000454\n\tSTATUS_INVALID_SESSION                                                    NTStatus      = 0xC0000455\n\tSTATUS_THREAD_ALREADY_IN_SESSION                                          NTStatus      = 0xC0000456\n\tSTATUS_THREAD_NOT_IN_SESSION                                              NTStatus      = 0xC0000457\n\tSTATUS_INVALID_WEIGHT                                                     NTStatus      = 0xC0000458\n\tSTATUS_REQUEST_PAUSED                                                     NTStatus      = 0xC0000459\n\tSTATUS_NO_RANGES_PROCESSED                                                NTStatus      = 0xC0000460\n\tSTATUS_DISK_RESOURCES_EXHAUSTED                                           NTStatus      = 0xC0000461\n\tSTATUS_NEEDS_REMEDIATION                                                  NTStatus      = 0xC0000462\n\tSTATUS_DEVICE_FEATURE_NOT_SUPPORTED                                       NTStatus      = 0xC0000463\n\tSTATUS_DEVICE_UNREACHABLE                                                 NTStatus      = 0xC0000464\n\tSTATUS_INVALID_TOKEN                                                      NTStatus      = 0xC0000465\n\tSTATUS_SERVER_UNAVAILABLE                                                 NTStatus      = 0xC0000466\n\tSTATUS_FILE_NOT_AVAILABLE                                                 NTStatus      = 0xC0000467\n\tSTATUS_DEVICE_INSUFFICIENT_RESOURCES                                      NTStatus      = 0xC0000468\n\tSTATUS_PACKAGE_UPDATING                                                   NTStatus      = 0xC0000469\n\tSTATUS_NOT_READ_FROM_COPY                                                 NTStatus      = 0xC000046A\n\tSTATUS_FT_WRITE_FAILURE                                                   NTStatus      = 0xC000046B\n\tSTATUS_FT_DI_SCAN_REQUIRED                                                NTStatus      = 0xC000046C\n\tSTATUS_OBJECT_NOT_EXTERNALLY_BACKED                                       NTStatus      = 0xC000046D\n\tSTATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN                                  NTStatus      = 0xC000046E\n\tSTATUS_COMPRESSION_NOT_BENEFICIAL                                         NTStatus      = 0xC000046F\n\tSTATUS_DATA_CHECKSUM_ERROR                                                NTStatus      = 0xC0000470\n\tSTATUS_INTERMIXED_KERNEL_EA_OPERATION                                     NTStatus      = 0xC0000471\n\tSTATUS_TRIM_READ_ZERO_NOT_SUPPORTED                                       NTStatus      = 0xC0000472\n\tSTATUS_TOO_MANY_SEGMENT_DESCRIPTORS                                       NTStatus      = 0xC0000473\n\tSTATUS_INVALID_OFFSET_ALIGNMENT                                           NTStatus      = 0xC0000474\n\tSTATUS_INVALID_FIELD_IN_PARAMETER_LIST                                    NTStatus      = 0xC0000475\n\tSTATUS_OPERATION_IN_PROGRESS                                              NTStatus      = 0xC0000476\n\tSTATUS_INVALID_INITIATOR_TARGET_PATH                                      NTStatus      = 0xC0000477\n\tSTATUS_SCRUB_DATA_DISABLED                                                NTStatus      = 0xC0000478\n\tSTATUS_NOT_REDUNDANT_STORAGE                                              NTStatus      = 0xC0000479\n\tSTATUS_RESIDENT_FILE_NOT_SUPPORTED                                        NTStatus      = 0xC000047A\n\tSTATUS_COMPRESSED_FILE_NOT_SUPPORTED                                      NTStatus      = 0xC000047B\n\tSTATUS_DIRECTORY_NOT_SUPPORTED                                            NTStatus      = 0xC000047C\n\tSTATUS_IO_OPERATION_TIMEOUT                                               NTStatus      = 0xC000047D\n\tSTATUS_SYSTEM_NEEDS_REMEDIATION                                           NTStatus      = 0xC000047E\n\tSTATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN                                    NTStatus      = 0xC000047F\n\tSTATUS_SHARE_UNAVAILABLE                                                  NTStatus      = 0xC0000480\n\tSTATUS_APISET_NOT_HOSTED                                                  NTStatus      = 0xC0000481\n\tSTATUS_APISET_NOT_PRESENT                                                 NTStatus      = 0xC0000482\n\tSTATUS_DEVICE_HARDWARE_ERROR                                              NTStatus      = 0xC0000483\n\tSTATUS_FIRMWARE_SLOT_INVALID                                              NTStatus      = 0xC0000484\n\tSTATUS_FIRMWARE_IMAGE_INVALID                                             NTStatus      = 0xC0000485\n\tSTATUS_STORAGE_TOPOLOGY_ID_MISMATCH                                       NTStatus      = 0xC0000486\n\tSTATUS_WIM_NOT_BOOTABLE                                                   NTStatus      = 0xC0000487\n\tSTATUS_BLOCKED_BY_PARENTAL_CONTROLS                                       NTStatus      = 0xC0000488\n\tSTATUS_NEEDS_REGISTRATION                                                 NTStatus      = 0xC0000489\n\tSTATUS_QUOTA_ACTIVITY                                                     NTStatus      = 0xC000048A\n\tSTATUS_CALLBACK_INVOKE_INLINE                                             NTStatus      = 0xC000048B\n\tSTATUS_BLOCK_TOO_MANY_REFERENCES                                          NTStatus      = 0xC000048C\n\tSTATUS_MARKED_TO_DISALLOW_WRITES                                          NTStatus      = 0xC000048D\n\tSTATUS_NETWORK_ACCESS_DENIED_EDP                                          NTStatus      = 0xC000048E\n\tSTATUS_ENCLAVE_FAILURE                                                    NTStatus      = 0xC000048F\n\tSTATUS_PNP_NO_COMPAT_DRIVERS                                              NTStatus      = 0xC0000490\n\tSTATUS_PNP_DRIVER_PACKAGE_NOT_FOUND                                       NTStatus      = 0xC0000491\n\tSTATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND                                 NTStatus      = 0xC0000492\n\tSTATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE                                NTStatus      = 0xC0000493\n\tSTATUS_PNP_FUNCTION_DRIVER_REQUIRED                                       NTStatus      = 0xC0000494\n\tSTATUS_PNP_DEVICE_CONFIGURATION_PENDING                                   NTStatus      = 0xC0000495\n\tSTATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL                                  NTStatus      = 0xC0000496\n\tSTATUS_PACKAGE_NOT_AVAILABLE                                              NTStatus      = 0xC0000497\n\tSTATUS_DEVICE_IN_MAINTENANCE                                              NTStatus      = 0xC0000499\n\tSTATUS_NOT_SUPPORTED_ON_DAX                                               NTStatus      = 0xC000049A\n\tSTATUS_FREE_SPACE_TOO_FRAGMENTED                                          NTStatus      = 0xC000049B\n\tSTATUS_DAX_MAPPING_EXISTS                                                 NTStatus      = 0xC000049C\n\tSTATUS_CHILD_PROCESS_BLOCKED                                              NTStatus      = 0xC000049D\n\tSTATUS_STORAGE_LOST_DATA_PERSISTENCE                                      NTStatus      = 0xC000049E\n\tSTATUS_VRF_CFG_ENABLED                                                    NTStatus      = 0xC000049F\n\tSTATUS_PARTITION_TERMINATING                                              NTStatus      = 0xC00004A0\n\tSTATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED                                      NTStatus      = 0xC00004A1\n\tSTATUS_ENCLAVE_VIOLATION                                                  NTStatus      = 0xC00004A2\n\tSTATUS_FILE_PROTECTED_UNDER_DPL                                           NTStatus      = 0xC00004A3\n\tSTATUS_VOLUME_NOT_CLUSTER_ALIGNED                                         NTStatus      = 0xC00004A4\n\tSTATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND                             NTStatus      = 0xC00004A5\n\tSTATUS_APPX_FILE_NOT_ENCRYPTED                                            NTStatus      = 0xC00004A6\n\tSTATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED                                 NTStatus      = 0xC00004A7\n\tSTATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET                       NTStatus      = 0xC00004A8\n\tSTATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE                        NTStatus      = 0xC00004A9\n\tSTATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER                        NTStatus      = 0xC00004AA\n\tSTATUS_FT_READ_FAILURE                                                    NTStatus      = 0xC00004AB\n\tSTATUS_PATCH_CONFLICT                                                     NTStatus      = 0xC00004AC\n\tSTATUS_STORAGE_RESERVE_ID_INVALID                                         NTStatus      = 0xC00004AD\n\tSTATUS_STORAGE_RESERVE_DOES_NOT_EXIST                                     NTStatus      = 0xC00004AE\n\tSTATUS_STORAGE_RESERVE_ALREADY_EXISTS                                     NTStatus      = 0xC00004AF\n\tSTATUS_STORAGE_RESERVE_NOT_EMPTY                                          NTStatus      = 0xC00004B0\n\tSTATUS_NOT_A_DAX_VOLUME                                                   NTStatus      = 0xC00004B1\n\tSTATUS_NOT_DAX_MAPPABLE                                                   NTStatus      = 0xC00004B2\n\tSTATUS_CASE_DIFFERING_NAMES_IN_DIR                                        NTStatus      = 0xC00004B3\n\tSTATUS_FILE_NOT_SUPPORTED                                                 NTStatus      = 0xC00004B4\n\tSTATUS_NOT_SUPPORTED_WITH_BTT                                             NTStatus      = 0xC00004B5\n\tSTATUS_ENCRYPTION_DISABLED                                                NTStatus      = 0xC00004B6\n\tSTATUS_ENCRYPTING_METADATA_DISALLOWED                                     NTStatus      = 0xC00004B7\n\tSTATUS_CANT_CLEAR_ENCRYPTION_FLAG                                         NTStatus      = 0xC00004B8\n\tSTATUS_INVALID_TASK_NAME                                                  NTStatus      = 0xC0000500\n\tSTATUS_INVALID_TASK_INDEX                                                 NTStatus      = 0xC0000501\n\tSTATUS_THREAD_ALREADY_IN_TASK                                             NTStatus      = 0xC0000502\n\tSTATUS_CALLBACK_BYPASS                                                    NTStatus      = 0xC0000503\n\tSTATUS_UNDEFINED_SCOPE                                                    NTStatus      = 0xC0000504\n\tSTATUS_INVALID_CAP                                                        NTStatus      = 0xC0000505\n\tSTATUS_NOT_GUI_PROCESS                                                    NTStatus      = 0xC0000506\n\tSTATUS_DEVICE_HUNG                                                        NTStatus      = 0xC0000507\n\tSTATUS_CONTAINER_ASSIGNED                                                 NTStatus      = 0xC0000508\n\tSTATUS_JOB_NO_CONTAINER                                                   NTStatus      = 0xC0000509\n\tSTATUS_DEVICE_UNRESPONSIVE                                                NTStatus      = 0xC000050A\n\tSTATUS_REPARSE_POINT_ENCOUNTERED                                          NTStatus      = 0xC000050B\n\tSTATUS_ATTRIBUTE_NOT_PRESENT                                              NTStatus      = 0xC000050C\n\tSTATUS_NOT_A_TIERED_VOLUME                                                NTStatus      = 0xC000050D\n\tSTATUS_ALREADY_HAS_STREAM_ID                                              NTStatus      = 0xC000050E\n\tSTATUS_JOB_NOT_EMPTY                                                      NTStatus      = 0xC000050F\n\tSTATUS_ALREADY_INITIALIZED                                                NTStatus      = 0xC0000510\n\tSTATUS_ENCLAVE_NOT_TERMINATED                                             NTStatus      = 0xC0000511\n\tSTATUS_ENCLAVE_IS_TERMINATING                                             NTStatus      = 0xC0000512\n\tSTATUS_SMB1_NOT_AVAILABLE                                                 NTStatus      = 0xC0000513\n\tSTATUS_SMR_GARBAGE_COLLECTION_REQUIRED                                    NTStatus      = 0xC0000514\n\tSTATUS_INTERRUPTED                                                        NTStatus      = 0xC0000515\n\tSTATUS_THREAD_NOT_RUNNING                                                 NTStatus      = 0xC0000516\n\tSTATUS_FAIL_FAST_EXCEPTION                                                NTStatus      = 0xC0000602\n\tSTATUS_IMAGE_CERT_REVOKED                                                 NTStatus      = 0xC0000603\n\tSTATUS_DYNAMIC_CODE_BLOCKED                                               NTStatus      = 0xC0000604\n\tSTATUS_IMAGE_CERT_EXPIRED                                                 NTStatus      = 0xC0000605\n\tSTATUS_STRICT_CFG_VIOLATION                                               NTStatus      = 0xC0000606\n\tSTATUS_SET_CONTEXT_DENIED                                                 NTStatus      = 0xC000060A\n\tSTATUS_CROSS_PARTITION_VIOLATION                                          NTStatus      = 0xC000060B\n\tSTATUS_PORT_CLOSED                                                        NTStatus      = 0xC0000700\n\tSTATUS_MESSAGE_LOST                                                       NTStatus      = 0xC0000701\n\tSTATUS_INVALID_MESSAGE                                                    NTStatus      = 0xC0000702\n\tSTATUS_REQUEST_CANCELED                                                   NTStatus      = 0xC0000703\n\tSTATUS_RECURSIVE_DISPATCH                                                 NTStatus      = 0xC0000704\n\tSTATUS_LPC_RECEIVE_BUFFER_EXPECTED                                        NTStatus      = 0xC0000705\n\tSTATUS_LPC_INVALID_CONNECTION_USAGE                                       NTStatus      = 0xC0000706\n\tSTATUS_LPC_REQUESTS_NOT_ALLOWED                                           NTStatus      = 0xC0000707\n\tSTATUS_RESOURCE_IN_USE                                                    NTStatus      = 0xC0000708\n\tSTATUS_HARDWARE_MEMORY_ERROR                                              NTStatus      = 0xC0000709\n\tSTATUS_THREADPOOL_HANDLE_EXCEPTION                                        NTStatus      = 0xC000070A\n\tSTATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED                          NTStatus      = 0xC000070B\n\tSTATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED                  NTStatus      = 0xC000070C\n\tSTATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED                      NTStatus      = 0xC000070D\n\tSTATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED                       NTStatus      = 0xC000070E\n\tSTATUS_THREADPOOL_RELEASED_DURING_OPERATION                               NTStatus      = 0xC000070F\n\tSTATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING                              NTStatus      = 0xC0000710\n\tSTATUS_APC_RETURNED_WHILE_IMPERSONATING                                   NTStatus      = 0xC0000711\n\tSTATUS_PROCESS_IS_PROTECTED                                               NTStatus      = 0xC0000712\n\tSTATUS_MCA_EXCEPTION                                                      NTStatus      = 0xC0000713\n\tSTATUS_CERTIFICATE_MAPPING_NOT_UNIQUE                                     NTStatus      = 0xC0000714\n\tSTATUS_SYMLINK_CLASS_DISABLED                                             NTStatus      = 0xC0000715\n\tSTATUS_INVALID_IDN_NORMALIZATION                                          NTStatus      = 0xC0000716\n\tSTATUS_NO_UNICODE_TRANSLATION                                             NTStatus      = 0xC0000717\n\tSTATUS_ALREADY_REGISTERED                                                 NTStatus      = 0xC0000718\n\tSTATUS_CONTEXT_MISMATCH                                                   NTStatus      = 0xC0000719\n\tSTATUS_PORT_ALREADY_HAS_COMPLETION_LIST                                   NTStatus      = 0xC000071A\n\tSTATUS_CALLBACK_RETURNED_THREAD_PRIORITY                                  NTStatus      = 0xC000071B\n\tSTATUS_INVALID_THREAD                                                     NTStatus      = 0xC000071C\n\tSTATUS_CALLBACK_RETURNED_TRANSACTION                                      NTStatus      = 0xC000071D\n\tSTATUS_CALLBACK_RETURNED_LDR_LOCK                                         NTStatus      = 0xC000071E\n\tSTATUS_CALLBACK_RETURNED_LANG                                             NTStatus      = 0xC000071F\n\tSTATUS_CALLBACK_RETURNED_PRI_BACK                                         NTStatus      = 0xC0000720\n\tSTATUS_CALLBACK_RETURNED_THREAD_AFFINITY                                  NTStatus      = 0xC0000721\n\tSTATUS_LPC_HANDLE_COUNT_EXCEEDED                                          NTStatus      = 0xC0000722\n\tSTATUS_EXECUTABLE_MEMORY_WRITE                                            NTStatus      = 0xC0000723\n\tSTATUS_KERNEL_EXECUTABLE_MEMORY_WRITE                                     NTStatus      = 0xC0000724\n\tSTATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE                                   NTStatus      = 0xC0000725\n\tSTATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE                                  NTStatus      = 0xC0000726\n\tSTATUS_DISK_REPAIR_DISABLED                                               NTStatus      = 0xC0000800\n\tSTATUS_DS_DOMAIN_RENAME_IN_PROGRESS                                       NTStatus      = 0xC0000801\n\tSTATUS_DISK_QUOTA_EXCEEDED                                                NTStatus      = 0xC0000802\n\tSTATUS_DATA_LOST_REPAIR                                                   NTStatus      = 0x80000803\n\tSTATUS_CONTENT_BLOCKED                                                    NTStatus      = 0xC0000804\n\tSTATUS_BAD_CLUSTERS                                                       NTStatus      = 0xC0000805\n\tSTATUS_VOLUME_DIRTY                                                       NTStatus      = 0xC0000806\n\tSTATUS_DISK_REPAIR_REDIRECTED                                             NTStatus      = 0x40000807\n\tSTATUS_DISK_REPAIR_UNSUCCESSFUL                                           NTStatus      = 0xC0000808\n\tSTATUS_CORRUPT_LOG_OVERFULL                                               NTStatus      = 0xC0000809\n\tSTATUS_CORRUPT_LOG_CORRUPTED                                              NTStatus      = 0xC000080A\n\tSTATUS_CORRUPT_LOG_UNAVAILABLE                                            NTStatus      = 0xC000080B\n\tSTATUS_CORRUPT_LOG_DELETED_FULL                                           NTStatus      = 0xC000080C\n\tSTATUS_CORRUPT_LOG_CLEARED                                                NTStatus      = 0xC000080D\n\tSTATUS_ORPHAN_NAME_EXHAUSTED                                              NTStatus      = 0xC000080E\n\tSTATUS_PROACTIVE_SCAN_IN_PROGRESS                                         NTStatus      = 0xC000080F\n\tSTATUS_ENCRYPTED_IO_NOT_POSSIBLE                                          NTStatus      = 0xC0000810\n\tSTATUS_CORRUPT_LOG_UPLEVEL_RECORDS                                        NTStatus      = 0xC0000811\n\tSTATUS_FILE_CHECKED_OUT                                                   NTStatus      = 0xC0000901\n\tSTATUS_CHECKOUT_REQUIRED                                                  NTStatus      = 0xC0000902\n\tSTATUS_BAD_FILE_TYPE                                                      NTStatus      = 0xC0000903\n\tSTATUS_FILE_TOO_LARGE                                                     NTStatus      = 0xC0000904\n\tSTATUS_FORMS_AUTH_REQUIRED                                                NTStatus      = 0xC0000905\n\tSTATUS_VIRUS_INFECTED                                                     NTStatus      = 0xC0000906\n\tSTATUS_VIRUS_DELETED                                                      NTStatus      = 0xC0000907\n\tSTATUS_BAD_MCFG_TABLE                                                     NTStatus      = 0xC0000908\n\tSTATUS_CANNOT_BREAK_OPLOCK                                                NTStatus      = 0xC0000909\n\tSTATUS_BAD_KEY                                                            NTStatus      = 0xC000090A\n\tSTATUS_BAD_DATA                                                           NTStatus      = 0xC000090B\n\tSTATUS_NO_KEY                                                             NTStatus      = 0xC000090C\n\tSTATUS_FILE_HANDLE_REVOKED                                                NTStatus      = 0xC0000910\n\tSTATUS_WOW_ASSERTION                                                      NTStatus      = 0xC0009898\n\tSTATUS_INVALID_SIGNATURE                                                  NTStatus      = 0xC000A000\n\tSTATUS_HMAC_NOT_SUPPORTED                                                 NTStatus      = 0xC000A001\n\tSTATUS_AUTH_TAG_MISMATCH                                                  NTStatus      = 0xC000A002\n\tSTATUS_INVALID_STATE_TRANSITION                                           NTStatus      = 0xC000A003\n\tSTATUS_INVALID_KERNEL_INFO_VERSION                                        NTStatus      = 0xC000A004\n\tSTATUS_INVALID_PEP_INFO_VERSION                                           NTStatus      = 0xC000A005\n\tSTATUS_HANDLE_REVOKED                                                     NTStatus      = 0xC000A006\n\tSTATUS_EOF_ON_GHOSTED_RANGE                                               NTStatus      = 0xC000A007\n\tSTATUS_IPSEC_QUEUE_OVERFLOW                                               NTStatus      = 0xC000A010\n\tSTATUS_ND_QUEUE_OVERFLOW                                                  NTStatus      = 0xC000A011\n\tSTATUS_HOPLIMIT_EXCEEDED                                                  NTStatus      = 0xC000A012\n\tSTATUS_PROTOCOL_NOT_SUPPORTED                                             NTStatus      = 0xC000A013\n\tSTATUS_FASTPATH_REJECTED                                                  NTStatus      = 0xC000A014\n\tSTATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED                         NTStatus      = 0xC000A080\n\tSTATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR                         NTStatus      = 0xC000A081\n\tSTATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR                             NTStatus      = 0xC000A082\n\tSTATUS_XML_PARSE_ERROR                                                    NTStatus      = 0xC000A083\n\tSTATUS_XMLDSIG_ERROR                                                      NTStatus      = 0xC000A084\n\tSTATUS_WRONG_COMPARTMENT                                                  NTStatus      = 0xC000A085\n\tSTATUS_AUTHIP_FAILURE                                                     NTStatus      = 0xC000A086\n\tSTATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS                              NTStatus      = 0xC000A087\n\tSTATUS_DS_OID_NOT_FOUND                                                   NTStatus      = 0xC000A088\n\tSTATUS_INCORRECT_ACCOUNT_TYPE                                             NTStatus      = 0xC000A089\n\tSTATUS_HASH_NOT_SUPPORTED                                                 NTStatus      = 0xC000A100\n\tSTATUS_HASH_NOT_PRESENT                                                   NTStatus      = 0xC000A101\n\tSTATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED                               NTStatus      = 0xC000A121\n\tSTATUS_GPIO_CLIENT_INFORMATION_INVALID                                    NTStatus      = 0xC000A122\n\tSTATUS_GPIO_VERSION_NOT_SUPPORTED                                         NTStatus      = 0xC000A123\n\tSTATUS_GPIO_INVALID_REGISTRATION_PACKET                                   NTStatus      = 0xC000A124\n\tSTATUS_GPIO_OPERATION_DENIED                                              NTStatus      = 0xC000A125\n\tSTATUS_GPIO_INCOMPATIBLE_CONNECT_MODE                                     NTStatus      = 0xC000A126\n\tSTATUS_GPIO_INTERRUPT_ALREADY_UNMASKED                                    NTStatus      = 0x8000A127\n\tSTATUS_CANNOT_SWITCH_RUNLEVEL                                             NTStatus      = 0xC000A141\n\tSTATUS_INVALID_RUNLEVEL_SETTING                                           NTStatus      = 0xC000A142\n\tSTATUS_RUNLEVEL_SWITCH_TIMEOUT                                            NTStatus      = 0xC000A143\n\tSTATUS_SERVICES_FAILED_AUTOSTART                                          NTStatus      = 0x4000A144\n\tSTATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT                                      NTStatus      = 0xC000A145\n\tSTATUS_RUNLEVEL_SWITCH_IN_PROGRESS                                        NTStatus      = 0xC000A146\n\tSTATUS_NOT_APPCONTAINER                                                   NTStatus      = 0xC000A200\n\tSTATUS_NOT_SUPPORTED_IN_APPCONTAINER                                      NTStatus      = 0xC000A201\n\tSTATUS_INVALID_PACKAGE_SID_LENGTH                                         NTStatus      = 0xC000A202\n\tSTATUS_LPAC_ACCESS_DENIED                                                 NTStatus      = 0xC000A203\n\tSTATUS_ADMINLESS_ACCESS_DENIED                                            NTStatus      = 0xC000A204\n\tSTATUS_APP_DATA_NOT_FOUND                                                 NTStatus      = 0xC000A281\n\tSTATUS_APP_DATA_EXPIRED                                                   NTStatus      = 0xC000A282\n\tSTATUS_APP_DATA_CORRUPT                                                   NTStatus      = 0xC000A283\n\tSTATUS_APP_DATA_LIMIT_EXCEEDED                                            NTStatus      = 0xC000A284\n\tSTATUS_APP_DATA_REBOOT_REQUIRED                                           NTStatus      = 0xC000A285\n\tSTATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED                                     NTStatus      = 0xC000A2A1\n\tSTATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED                                    NTStatus      = 0xC000A2A2\n\tSTATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED                                    NTStatus      = 0xC000A2A3\n\tSTATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED                                   NTStatus      = 0xC000A2A4\n\tSTATUS_WOF_WIM_HEADER_CORRUPT                                             NTStatus      = 0xC000A2A5\n\tSTATUS_WOF_WIM_RESOURCE_TABLE_CORRUPT                                     NTStatus      = 0xC000A2A6\n\tSTATUS_WOF_FILE_RESOURCE_TABLE_CORRUPT                                    NTStatus      = 0xC000A2A7\n\tSTATUS_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE                             NTStatus      = 0xC000CE01\n\tSTATUS_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT                        NTStatus      = 0xC000CE02\n\tSTATUS_FILE_SYSTEM_VIRTUALIZATION_BUSY                                    NTStatus      = 0xC000CE03\n\tSTATUS_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN                        NTStatus      = 0xC000CE04\n\tSTATUS_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION                       NTStatus      = 0xC000CE05\n\tSTATUS_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT                              NTStatus      = 0xC000CF00\n\tSTATUS_CLOUD_FILE_PROVIDER_NOT_RUNNING                                    NTStatus      = 0xC000CF01\n\tSTATUS_CLOUD_FILE_METADATA_CORRUPT                                        NTStatus      = 0xC000CF02\n\tSTATUS_CLOUD_FILE_METADATA_TOO_LARGE                                      NTStatus      = 0xC000CF03\n\tSTATUS_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE                                 NTStatus      = 0x8000CF04\n\tSTATUS_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS                                 NTStatus      = 0x8000CF05\n\tSTATUS_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED                          NTStatus      = 0xC000CF06\n\tSTATUS_NOT_A_CLOUD_FILE                                                   NTStatus      = 0xC000CF07\n\tSTATUS_CLOUD_FILE_NOT_IN_SYNC                                             NTStatus      = 0xC000CF08\n\tSTATUS_CLOUD_FILE_ALREADY_CONNECTED                                       NTStatus      = 0xC000CF09\n\tSTATUS_CLOUD_FILE_NOT_SUPPORTED                                           NTStatus      = 0xC000CF0A\n\tSTATUS_CLOUD_FILE_INVALID_REQUEST                                         NTStatus      = 0xC000CF0B\n\tSTATUS_CLOUD_FILE_READ_ONLY_VOLUME                                        NTStatus      = 0xC000CF0C\n\tSTATUS_CLOUD_FILE_CONNECTED_PROVIDER_ONLY                                 NTStatus      = 0xC000CF0D\n\tSTATUS_CLOUD_FILE_VALIDATION_FAILED                                       NTStatus      = 0xC000CF0E\n\tSTATUS_CLOUD_FILE_AUTHENTICATION_FAILED                                   NTStatus      = 0xC000CF0F\n\tSTATUS_CLOUD_FILE_INSUFFICIENT_RESOURCES                                  NTStatus      = 0xC000CF10\n\tSTATUS_CLOUD_FILE_NETWORK_UNAVAILABLE                                     NTStatus      = 0xC000CF11\n\tSTATUS_CLOUD_FILE_UNSUCCESSFUL                                            NTStatus      = 0xC000CF12\n\tSTATUS_CLOUD_FILE_NOT_UNDER_SYNC_ROOT                                     NTStatus      = 0xC000CF13\n\tSTATUS_CLOUD_FILE_IN_USE                                                  NTStatus      = 0xC000CF14\n\tSTATUS_CLOUD_FILE_PINNED                                                  NTStatus      = 0xC000CF15\n\tSTATUS_CLOUD_FILE_REQUEST_ABORTED                                         NTStatus      = 0xC000CF16\n\tSTATUS_CLOUD_FILE_PROPERTY_CORRUPT                                        NTStatus      = 0xC000CF17\n\tSTATUS_CLOUD_FILE_ACCESS_DENIED                                           NTStatus      = 0xC000CF18\n\tSTATUS_CLOUD_FILE_INCOMPATIBLE_HARDLINKS                                  NTStatus      = 0xC000CF19\n\tSTATUS_CLOUD_FILE_PROPERTY_LOCK_CONFLICT                                  NTStatus      = 0xC000CF1A\n\tSTATUS_CLOUD_FILE_REQUEST_CANCELED                                        NTStatus      = 0xC000CF1B\n\tSTATUS_CLOUD_FILE_PROVIDER_TERMINATED                                     NTStatus      = 0xC000CF1D\n\tSTATUS_NOT_A_CLOUD_SYNC_ROOT                                              NTStatus      = 0xC000CF1E\n\tSTATUS_CLOUD_FILE_REQUEST_TIMEOUT                                         NTStatus      = 0xC000CF1F\n\tSTATUS_ACPI_INVALID_OPCODE                                                NTStatus      = 0xC0140001\n\tSTATUS_ACPI_STACK_OVERFLOW                                                NTStatus      = 0xC0140002\n\tSTATUS_ACPI_ASSERT_FAILED                                                 NTStatus      = 0xC0140003\n\tSTATUS_ACPI_INVALID_INDEX                                                 NTStatus      = 0xC0140004\n\tSTATUS_ACPI_INVALID_ARGUMENT                                              NTStatus      = 0xC0140005\n\tSTATUS_ACPI_FATAL                                                         NTStatus      = 0xC0140006\n\tSTATUS_ACPI_INVALID_SUPERNAME                                             NTStatus      = 0xC0140007\n\tSTATUS_ACPI_INVALID_ARGTYPE                                               NTStatus      = 0xC0140008\n\tSTATUS_ACPI_INVALID_OBJTYPE                                               NTStatus      = 0xC0140009\n\tSTATUS_ACPI_INVALID_TARGETTYPE                                            NTStatus      = 0xC014000A\n\tSTATUS_ACPI_INCORRECT_ARGUMENT_COUNT                                      NTStatus      = 0xC014000B\n\tSTATUS_ACPI_ADDRESS_NOT_MAPPED                                            NTStatus      = 0xC014000C\n\tSTATUS_ACPI_INVALID_EVENTTYPE                                             NTStatus      = 0xC014000D\n\tSTATUS_ACPI_HANDLER_COLLISION                                             NTStatus      = 0xC014000E\n\tSTATUS_ACPI_INVALID_DATA                                                  NTStatus      = 0xC014000F\n\tSTATUS_ACPI_INVALID_REGION                                                NTStatus      = 0xC0140010\n\tSTATUS_ACPI_INVALID_ACCESS_SIZE                                           NTStatus      = 0xC0140011\n\tSTATUS_ACPI_ACQUIRE_GLOBAL_LOCK                                           NTStatus      = 0xC0140012\n\tSTATUS_ACPI_ALREADY_INITIALIZED                                           NTStatus      = 0xC0140013\n\tSTATUS_ACPI_NOT_INITIALIZED                                               NTStatus      = 0xC0140014\n\tSTATUS_ACPI_INVALID_MUTEX_LEVEL                                           NTStatus      = 0xC0140015\n\tSTATUS_ACPI_MUTEX_NOT_OWNED                                               NTStatus      = 0xC0140016\n\tSTATUS_ACPI_MUTEX_NOT_OWNER                                               NTStatus      = 0xC0140017\n\tSTATUS_ACPI_RS_ACCESS                                                     NTStatus      = 0xC0140018\n\tSTATUS_ACPI_INVALID_TABLE                                                 NTStatus      = 0xC0140019\n\tSTATUS_ACPI_REG_HANDLER_FAILED                                            NTStatus      = 0xC0140020\n\tSTATUS_ACPI_POWER_REQUEST_FAILED                                          NTStatus      = 0xC0140021\n\tSTATUS_CTX_WINSTATION_NAME_INVALID                                        NTStatus      = 0xC00A0001\n\tSTATUS_CTX_INVALID_PD                                                     NTStatus      = 0xC00A0002\n\tSTATUS_CTX_PD_NOT_FOUND                                                   NTStatus      = 0xC00A0003\n\tSTATUS_CTX_CDM_CONNECT                                                    NTStatus      = 0x400A0004\n\tSTATUS_CTX_CDM_DISCONNECT                                                 NTStatus      = 0x400A0005\n\tSTATUS_CTX_CLOSE_PENDING                                                  NTStatus      = 0xC00A0006\n\tSTATUS_CTX_NO_OUTBUF                                                      NTStatus      = 0xC00A0007\n\tSTATUS_CTX_MODEM_INF_NOT_FOUND                                            NTStatus      = 0xC00A0008\n\tSTATUS_CTX_INVALID_MODEMNAME                                              NTStatus      = 0xC00A0009\n\tSTATUS_CTX_RESPONSE_ERROR                                                 NTStatus      = 0xC00A000A\n\tSTATUS_CTX_MODEM_RESPONSE_TIMEOUT                                         NTStatus      = 0xC00A000B\n\tSTATUS_CTX_MODEM_RESPONSE_NO_CARRIER                                      NTStatus      = 0xC00A000C\n\tSTATUS_CTX_MODEM_RESPONSE_NO_DIALTONE                                     NTStatus      = 0xC00A000D\n\tSTATUS_CTX_MODEM_RESPONSE_BUSY                                            NTStatus      = 0xC00A000E\n\tSTATUS_CTX_MODEM_RESPONSE_VOICE                                           NTStatus      = 0xC00A000F\n\tSTATUS_CTX_TD_ERROR                                                       NTStatus      = 0xC00A0010\n\tSTATUS_CTX_LICENSE_CLIENT_INVALID                                         NTStatus      = 0xC00A0012\n\tSTATUS_CTX_LICENSE_NOT_AVAILABLE                                          NTStatus      = 0xC00A0013\n\tSTATUS_CTX_LICENSE_EXPIRED                                                NTStatus      = 0xC00A0014\n\tSTATUS_CTX_WINSTATION_NOT_FOUND                                           NTStatus      = 0xC00A0015\n\tSTATUS_CTX_WINSTATION_NAME_COLLISION                                      NTStatus      = 0xC00A0016\n\tSTATUS_CTX_WINSTATION_BUSY                                                NTStatus      = 0xC00A0017\n\tSTATUS_CTX_BAD_VIDEO_MODE                                                 NTStatus      = 0xC00A0018\n\tSTATUS_CTX_GRAPHICS_INVALID                                               NTStatus      = 0xC00A0022\n\tSTATUS_CTX_NOT_CONSOLE                                                    NTStatus      = 0xC00A0024\n\tSTATUS_CTX_CLIENT_QUERY_TIMEOUT                                           NTStatus      = 0xC00A0026\n\tSTATUS_CTX_CONSOLE_DISCONNECT                                             NTStatus      = 0xC00A0027\n\tSTATUS_CTX_CONSOLE_CONNECT                                                NTStatus      = 0xC00A0028\n\tSTATUS_CTX_SHADOW_DENIED                                                  NTStatus      = 0xC00A002A\n\tSTATUS_CTX_WINSTATION_ACCESS_DENIED                                       NTStatus      = 0xC00A002B\n\tSTATUS_CTX_INVALID_WD                                                     NTStatus      = 0xC00A002E\n\tSTATUS_CTX_WD_NOT_FOUND                                                   NTStatus      = 0xC00A002F\n\tSTATUS_CTX_SHADOW_INVALID                                                 NTStatus      = 0xC00A0030\n\tSTATUS_CTX_SHADOW_DISABLED                                                NTStatus      = 0xC00A0031\n\tSTATUS_RDP_PROTOCOL_ERROR                                                 NTStatus      = 0xC00A0032\n\tSTATUS_CTX_CLIENT_LICENSE_NOT_SET                                         NTStatus      = 0xC00A0033\n\tSTATUS_CTX_CLIENT_LICENSE_IN_USE                                          NTStatus      = 0xC00A0034\n\tSTATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE                                    NTStatus      = 0xC00A0035\n\tSTATUS_CTX_SHADOW_NOT_RUNNING                                             NTStatus      = 0xC00A0036\n\tSTATUS_CTX_LOGON_DISABLED                                                 NTStatus      = 0xC00A0037\n\tSTATUS_CTX_SECURITY_LAYER_ERROR                                           NTStatus      = 0xC00A0038\n\tSTATUS_TS_INCOMPATIBLE_SESSIONS                                           NTStatus      = 0xC00A0039\n\tSTATUS_TS_VIDEO_SUBSYSTEM_ERROR                                           NTStatus      = 0xC00A003A\n\tSTATUS_PNP_BAD_MPS_TABLE                                                  NTStatus      = 0xC0040035\n\tSTATUS_PNP_TRANSLATION_FAILED                                             NTStatus      = 0xC0040036\n\tSTATUS_PNP_IRQ_TRANSLATION_FAILED                                         NTStatus      = 0xC0040037\n\tSTATUS_PNP_INVALID_ID                                                     NTStatus      = 0xC0040038\n\tSTATUS_IO_REISSUE_AS_CACHED                                               NTStatus      = 0xC0040039\n\tSTATUS_MUI_FILE_NOT_FOUND                                                 NTStatus      = 0xC00B0001\n\tSTATUS_MUI_INVALID_FILE                                                   NTStatus      = 0xC00B0002\n\tSTATUS_MUI_INVALID_RC_CONFIG                                              NTStatus      = 0xC00B0003\n\tSTATUS_MUI_INVALID_LOCALE_NAME                                            NTStatus      = 0xC00B0004\n\tSTATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME                                  NTStatus      = 0xC00B0005\n\tSTATUS_MUI_FILE_NOT_LOADED                                                NTStatus      = 0xC00B0006\n\tSTATUS_RESOURCE_ENUM_USER_STOP                                            NTStatus      = 0xC00B0007\n\tSTATUS_FLT_NO_HANDLER_DEFINED                                             NTStatus      = 0xC01C0001\n\tSTATUS_FLT_CONTEXT_ALREADY_DEFINED                                        NTStatus      = 0xC01C0002\n\tSTATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST                                   NTStatus      = 0xC01C0003\n\tSTATUS_FLT_DISALLOW_FAST_IO                                               NTStatus      = 0xC01C0004\n\tSTATUS_FLT_INVALID_NAME_REQUEST                                           NTStatus      = 0xC01C0005\n\tSTATUS_FLT_NOT_SAFE_TO_POST_OPERATION                                     NTStatus      = 0xC01C0006\n\tSTATUS_FLT_NOT_INITIALIZED                                                NTStatus      = 0xC01C0007\n\tSTATUS_FLT_FILTER_NOT_READY                                               NTStatus      = 0xC01C0008\n\tSTATUS_FLT_POST_OPERATION_CLEANUP                                         NTStatus      = 0xC01C0009\n\tSTATUS_FLT_INTERNAL_ERROR                                                 NTStatus      = 0xC01C000A\n\tSTATUS_FLT_DELETING_OBJECT                                                NTStatus      = 0xC01C000B\n\tSTATUS_FLT_MUST_BE_NONPAGED_POOL                                          NTStatus      = 0xC01C000C\n\tSTATUS_FLT_DUPLICATE_ENTRY                                                NTStatus      = 0xC01C000D\n\tSTATUS_FLT_CBDQ_DISABLED                                                  NTStatus      = 0xC01C000E\n\tSTATUS_FLT_DO_NOT_ATTACH                                                  NTStatus      = 0xC01C000F\n\tSTATUS_FLT_DO_NOT_DETACH                                                  NTStatus      = 0xC01C0010\n\tSTATUS_FLT_INSTANCE_ALTITUDE_COLLISION                                    NTStatus      = 0xC01C0011\n\tSTATUS_FLT_INSTANCE_NAME_COLLISION                                        NTStatus      = 0xC01C0012\n\tSTATUS_FLT_FILTER_NOT_FOUND                                               NTStatus      = 0xC01C0013\n\tSTATUS_FLT_VOLUME_NOT_FOUND                                               NTStatus      = 0xC01C0014\n\tSTATUS_FLT_INSTANCE_NOT_FOUND                                             NTStatus      = 0xC01C0015\n\tSTATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND                                   NTStatus      = 0xC01C0016\n\tSTATUS_FLT_INVALID_CONTEXT_REGISTRATION                                   NTStatus      = 0xC01C0017\n\tSTATUS_FLT_NAME_CACHE_MISS                                                NTStatus      = 0xC01C0018\n\tSTATUS_FLT_NO_DEVICE_OBJECT                                               NTStatus      = 0xC01C0019\n\tSTATUS_FLT_VOLUME_ALREADY_MOUNTED                                         NTStatus      = 0xC01C001A\n\tSTATUS_FLT_ALREADY_ENLISTED                                               NTStatus      = 0xC01C001B\n\tSTATUS_FLT_CONTEXT_ALREADY_LINKED                                         NTStatus      = 0xC01C001C\n\tSTATUS_FLT_NO_WAITER_FOR_REPLY                                            NTStatus      = 0xC01C0020\n\tSTATUS_FLT_REGISTRATION_BUSY                                              NTStatus      = 0xC01C0023\n\tSTATUS_SXS_SECTION_NOT_FOUND                                              NTStatus      = 0xC0150001\n\tSTATUS_SXS_CANT_GEN_ACTCTX                                                NTStatus      = 0xC0150002\n\tSTATUS_SXS_INVALID_ACTCTXDATA_FORMAT                                      NTStatus      = 0xC0150003\n\tSTATUS_SXS_ASSEMBLY_NOT_FOUND                                             NTStatus      = 0xC0150004\n\tSTATUS_SXS_MANIFEST_FORMAT_ERROR                                          NTStatus      = 0xC0150005\n\tSTATUS_SXS_MANIFEST_PARSE_ERROR                                           NTStatus      = 0xC0150006\n\tSTATUS_SXS_ACTIVATION_CONTEXT_DISABLED                                    NTStatus      = 0xC0150007\n\tSTATUS_SXS_KEY_NOT_FOUND                                                  NTStatus      = 0xC0150008\n\tSTATUS_SXS_VERSION_CONFLICT                                               NTStatus      = 0xC0150009\n\tSTATUS_SXS_WRONG_SECTION_TYPE                                             NTStatus      = 0xC015000A\n\tSTATUS_SXS_THREAD_QUERIES_DISABLED                                        NTStatus      = 0xC015000B\n\tSTATUS_SXS_ASSEMBLY_MISSING                                               NTStatus      = 0xC015000C\n\tSTATUS_SXS_RELEASE_ACTIVATION_CONTEXT                                     NTStatus      = 0x4015000D\n\tSTATUS_SXS_PROCESS_DEFAULT_ALREADY_SET                                    NTStatus      = 0xC015000E\n\tSTATUS_SXS_EARLY_DEACTIVATION                                             NTStatus      = 0xC015000F\n\tSTATUS_SXS_INVALID_DEACTIVATION                                           NTStatus      = 0xC0150010\n\tSTATUS_SXS_MULTIPLE_DEACTIVATION                                          NTStatus      = 0xC0150011\n\tSTATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY                        NTStatus      = 0xC0150012\n\tSTATUS_SXS_PROCESS_TERMINATION_REQUESTED                                  NTStatus      = 0xC0150013\n\tSTATUS_SXS_CORRUPT_ACTIVATION_STACK                                       NTStatus      = 0xC0150014\n\tSTATUS_SXS_CORRUPTION                                                     NTStatus      = 0xC0150015\n\tSTATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE                               NTStatus      = 0xC0150016\n\tSTATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME                                NTStatus      = 0xC0150017\n\tSTATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE                                   NTStatus      = 0xC0150018\n\tSTATUS_SXS_IDENTITY_PARSE_ERROR                                           NTStatus      = 0xC0150019\n\tSTATUS_SXS_COMPONENT_STORE_CORRUPT                                        NTStatus      = 0xC015001A\n\tSTATUS_SXS_FILE_HASH_MISMATCH                                             NTStatus      = 0xC015001B\n\tSTATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT                  NTStatus      = 0xC015001C\n\tSTATUS_SXS_IDENTITIES_DIFFERENT                                           NTStatus      = 0xC015001D\n\tSTATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT                                   NTStatus      = 0xC015001E\n\tSTATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY                                      NTStatus      = 0xC015001F\n\tSTATUS_ADVANCED_INSTALLER_FAILED                                          NTStatus      = 0xC0150020\n\tSTATUS_XML_ENCODING_MISMATCH                                              NTStatus      = 0xC0150021\n\tSTATUS_SXS_MANIFEST_TOO_BIG                                               NTStatus      = 0xC0150022\n\tSTATUS_SXS_SETTING_NOT_REGISTERED                                         NTStatus      = 0xC0150023\n\tSTATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE                                 NTStatus      = 0xC0150024\n\tSTATUS_SMI_PRIMITIVE_INSTALLER_FAILED                                     NTStatus      = 0xC0150025\n\tSTATUS_GENERIC_COMMAND_FAILED                                             NTStatus      = 0xC0150026\n\tSTATUS_SXS_FILE_HASH_MISSING                                              NTStatus      = 0xC0150027\n\tSTATUS_CLUSTER_INVALID_NODE                                               NTStatus      = 0xC0130001\n\tSTATUS_CLUSTER_NODE_EXISTS                                                NTStatus      = 0xC0130002\n\tSTATUS_CLUSTER_JOIN_IN_PROGRESS                                           NTStatus      = 0xC0130003\n\tSTATUS_CLUSTER_NODE_NOT_FOUND                                             NTStatus      = 0xC0130004\n\tSTATUS_CLUSTER_LOCAL_NODE_NOT_FOUND                                       NTStatus      = 0xC0130005\n\tSTATUS_CLUSTER_NETWORK_EXISTS                                             NTStatus      = 0xC0130006\n\tSTATUS_CLUSTER_NETWORK_NOT_FOUND                                          NTStatus      = 0xC0130007\n\tSTATUS_CLUSTER_NETINTERFACE_EXISTS                                        NTStatus      = 0xC0130008\n\tSTATUS_CLUSTER_NETINTERFACE_NOT_FOUND                                     NTStatus      = 0xC0130009\n\tSTATUS_CLUSTER_INVALID_REQUEST                                            NTStatus      = 0xC013000A\n\tSTATUS_CLUSTER_INVALID_NETWORK_PROVIDER                                   NTStatus      = 0xC013000B\n\tSTATUS_CLUSTER_NODE_DOWN                                                  NTStatus      = 0xC013000C\n\tSTATUS_CLUSTER_NODE_UNREACHABLE                                           NTStatus      = 0xC013000D\n\tSTATUS_CLUSTER_NODE_NOT_MEMBER                                            NTStatus      = 0xC013000E\n\tSTATUS_CLUSTER_JOIN_NOT_IN_PROGRESS                                       NTStatus      = 0xC013000F\n\tSTATUS_CLUSTER_INVALID_NETWORK                                            NTStatus      = 0xC0130010\n\tSTATUS_CLUSTER_NO_NET_ADAPTERS                                            NTStatus      = 0xC0130011\n\tSTATUS_CLUSTER_NODE_UP                                                    NTStatus      = 0xC0130012\n\tSTATUS_CLUSTER_NODE_PAUSED                                                NTStatus      = 0xC0130013\n\tSTATUS_CLUSTER_NODE_NOT_PAUSED                                            NTStatus      = 0xC0130014\n\tSTATUS_CLUSTER_NO_SECURITY_CONTEXT                                        NTStatus      = 0xC0130015\n\tSTATUS_CLUSTER_NETWORK_NOT_INTERNAL                                       NTStatus      = 0xC0130016\n\tSTATUS_CLUSTER_POISONED                                                   NTStatus      = 0xC0130017\n\tSTATUS_CLUSTER_NON_CSV_PATH                                               NTStatus      = 0xC0130018\n\tSTATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL                                       NTStatus      = 0xC0130019\n\tSTATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS                          NTStatus      = 0xC0130020\n\tSTATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR                                       NTStatus      = 0xC0130021\n\tSTATUS_CLUSTER_CSV_REDIRECTED                                             NTStatus      = 0xC0130022\n\tSTATUS_CLUSTER_CSV_NOT_REDIRECTED                                         NTStatus      = 0xC0130023\n\tSTATUS_CLUSTER_CSV_VOLUME_DRAINING                                        NTStatus      = 0xC0130024\n\tSTATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS                          NTStatus      = 0xC0130025\n\tSTATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL                    NTStatus      = 0xC0130026\n\tSTATUS_CLUSTER_CSV_NO_SNAPSHOTS                                           NTStatus      = 0xC0130027\n\tSTATUS_CSV_IO_PAUSE_TIMEOUT                                               NTStatus      = 0xC0130028\n\tSTATUS_CLUSTER_CSV_INVALID_HANDLE                                         NTStatus      = 0xC0130029\n\tSTATUS_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR                          NTStatus      = 0xC0130030\n\tSTATUS_CLUSTER_CAM_TICKET_REPLAY_DETECTED                                 NTStatus      = 0xC0130031\n\tSTATUS_TRANSACTIONAL_CONFLICT                                             NTStatus      = 0xC0190001\n\tSTATUS_INVALID_TRANSACTION                                                NTStatus      = 0xC0190002\n\tSTATUS_TRANSACTION_NOT_ACTIVE                                             NTStatus      = 0xC0190003\n\tSTATUS_TM_INITIALIZATION_FAILED                                           NTStatus      = 0xC0190004\n\tSTATUS_RM_NOT_ACTIVE                                                      NTStatus      = 0xC0190005\n\tSTATUS_RM_METADATA_CORRUPT                                                NTStatus      = 0xC0190006\n\tSTATUS_TRANSACTION_NOT_JOINED                                             NTStatus      = 0xC0190007\n\tSTATUS_DIRECTORY_NOT_RM                                                   NTStatus      = 0xC0190008\n\tSTATUS_COULD_NOT_RESIZE_LOG                                               NTStatus      = 0x80190009\n\tSTATUS_TRANSACTIONS_UNSUPPORTED_REMOTE                                    NTStatus      = 0xC019000A\n\tSTATUS_LOG_RESIZE_INVALID_SIZE                                            NTStatus      = 0xC019000B\n\tSTATUS_REMOTE_FILE_VERSION_MISMATCH                                       NTStatus      = 0xC019000C\n\tSTATUS_CRM_PROTOCOL_ALREADY_EXISTS                                        NTStatus      = 0xC019000F\n\tSTATUS_TRANSACTION_PROPAGATION_FAILED                                     NTStatus      = 0xC0190010\n\tSTATUS_CRM_PROTOCOL_NOT_FOUND                                             NTStatus      = 0xC0190011\n\tSTATUS_TRANSACTION_SUPERIOR_EXISTS                                        NTStatus      = 0xC0190012\n\tSTATUS_TRANSACTION_REQUEST_NOT_VALID                                      NTStatus      = 0xC0190013\n\tSTATUS_TRANSACTION_NOT_REQUESTED                                          NTStatus      = 0xC0190014\n\tSTATUS_TRANSACTION_ALREADY_ABORTED                                        NTStatus      = 0xC0190015\n\tSTATUS_TRANSACTION_ALREADY_COMMITTED                                      NTStatus      = 0xC0190016\n\tSTATUS_TRANSACTION_INVALID_MARSHALL_BUFFER                                NTStatus      = 0xC0190017\n\tSTATUS_CURRENT_TRANSACTION_NOT_VALID                                      NTStatus      = 0xC0190018\n\tSTATUS_LOG_GROWTH_FAILED                                                  NTStatus      = 0xC0190019\n\tSTATUS_OBJECT_NO_LONGER_EXISTS                                            NTStatus      = 0xC0190021\n\tSTATUS_STREAM_MINIVERSION_NOT_FOUND                                       NTStatus      = 0xC0190022\n\tSTATUS_STREAM_MINIVERSION_NOT_VALID                                       NTStatus      = 0xC0190023\n\tSTATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION                NTStatus      = 0xC0190024\n\tSTATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT                           NTStatus      = 0xC0190025\n\tSTATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS                               NTStatus      = 0xC0190026\n\tSTATUS_HANDLE_NO_LONGER_VALID                                             NTStatus      = 0xC0190028\n\tSTATUS_NO_TXF_METADATA                                                    NTStatus      = 0x80190029\n\tSTATUS_LOG_CORRUPTION_DETECTED                                            NTStatus      = 0xC0190030\n\tSTATUS_CANT_RECOVER_WITH_HANDLE_OPEN                                      NTStatus      = 0x80190031\n\tSTATUS_RM_DISCONNECTED                                                    NTStatus      = 0xC0190032\n\tSTATUS_ENLISTMENT_NOT_SUPERIOR                                            NTStatus      = 0xC0190033\n\tSTATUS_RECOVERY_NOT_NEEDED                                                NTStatus      = 0x40190034\n\tSTATUS_RM_ALREADY_STARTED                                                 NTStatus      = 0x40190035\n\tSTATUS_FILE_IDENTITY_NOT_PERSISTENT                                       NTStatus      = 0xC0190036\n\tSTATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY                                NTStatus      = 0xC0190037\n\tSTATUS_CANT_CROSS_RM_BOUNDARY                                             NTStatus      = 0xC0190038\n\tSTATUS_TXF_DIR_NOT_EMPTY                                                  NTStatus      = 0xC0190039\n\tSTATUS_INDOUBT_TRANSACTIONS_EXIST                                         NTStatus      = 0xC019003A\n\tSTATUS_TM_VOLATILE                                                        NTStatus      = 0xC019003B\n\tSTATUS_ROLLBACK_TIMER_EXPIRED                                             NTStatus      = 0xC019003C\n\tSTATUS_TXF_ATTRIBUTE_CORRUPT                                              NTStatus      = 0xC019003D\n\tSTATUS_EFS_NOT_ALLOWED_IN_TRANSACTION                                     NTStatus      = 0xC019003E\n\tSTATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED                                     NTStatus      = 0xC019003F\n\tSTATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE                              NTStatus      = 0xC0190040\n\tSTATUS_TXF_METADATA_ALREADY_PRESENT                                       NTStatus      = 0x80190041\n\tSTATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET                                NTStatus      = 0x80190042\n\tSTATUS_TRANSACTION_REQUIRED_PROMOTION                                     NTStatus      = 0xC0190043\n\tSTATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION                                 NTStatus      = 0xC0190044\n\tSTATUS_TRANSACTIONS_NOT_FROZEN                                            NTStatus      = 0xC0190045\n\tSTATUS_TRANSACTION_FREEZE_IN_PROGRESS                                     NTStatus      = 0xC0190046\n\tSTATUS_NOT_SNAPSHOT_VOLUME                                                NTStatus      = 0xC0190047\n\tSTATUS_NO_SAVEPOINT_WITH_OPEN_FILES                                       NTStatus      = 0xC0190048\n\tSTATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION                                  NTStatus      = 0xC0190049\n\tSTATUS_TM_IDENTITY_MISMATCH                                               NTStatus      = 0xC019004A\n\tSTATUS_FLOATED_SECTION                                                    NTStatus      = 0xC019004B\n\tSTATUS_CANNOT_ACCEPT_TRANSACTED_WORK                                      NTStatus      = 0xC019004C\n\tSTATUS_CANNOT_ABORT_TRANSACTIONS                                          NTStatus      = 0xC019004D\n\tSTATUS_TRANSACTION_NOT_FOUND                                              NTStatus      = 0xC019004E\n\tSTATUS_RESOURCEMANAGER_NOT_FOUND                                          NTStatus      = 0xC019004F\n\tSTATUS_ENLISTMENT_NOT_FOUND                                               NTStatus      = 0xC0190050\n\tSTATUS_TRANSACTIONMANAGER_NOT_FOUND                                       NTStatus      = 0xC0190051\n\tSTATUS_TRANSACTIONMANAGER_NOT_ONLINE                                      NTStatus      = 0xC0190052\n\tSTATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION                         NTStatus      = 0xC0190053\n\tSTATUS_TRANSACTION_NOT_ROOT                                               NTStatus      = 0xC0190054\n\tSTATUS_TRANSACTION_OBJECT_EXPIRED                                         NTStatus      = 0xC0190055\n\tSTATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION                             NTStatus      = 0xC0190056\n\tSTATUS_TRANSACTION_RESPONSE_NOT_ENLISTED                                  NTStatus      = 0xC0190057\n\tSTATUS_TRANSACTION_RECORD_TOO_LONG                                        NTStatus      = 0xC0190058\n\tSTATUS_NO_LINK_TRACKING_IN_TRANSACTION                                    NTStatus      = 0xC0190059\n\tSTATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION                             NTStatus      = 0xC019005A\n\tSTATUS_TRANSACTION_INTEGRITY_VIOLATED                                     NTStatus      = 0xC019005B\n\tSTATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH                               NTStatus      = 0xC019005C\n\tSTATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT                                   NTStatus      = 0xC019005D\n\tSTATUS_TRANSACTION_MUST_WRITETHROUGH                                      NTStatus      = 0xC019005E\n\tSTATUS_TRANSACTION_NO_SUPERIOR                                            NTStatus      = 0xC019005F\n\tSTATUS_EXPIRED_HANDLE                                                     NTStatus      = 0xC0190060\n\tSTATUS_TRANSACTION_NOT_ENLISTED                                           NTStatus      = 0xC0190061\n\tSTATUS_LOG_SECTOR_INVALID                                                 NTStatus      = 0xC01A0001\n\tSTATUS_LOG_SECTOR_PARITY_INVALID                                          NTStatus      = 0xC01A0002\n\tSTATUS_LOG_SECTOR_REMAPPED                                                NTStatus      = 0xC01A0003\n\tSTATUS_LOG_BLOCK_INCOMPLETE                                               NTStatus      = 0xC01A0004\n\tSTATUS_LOG_INVALID_RANGE                                                  NTStatus      = 0xC01A0005\n\tSTATUS_LOG_BLOCKS_EXHAUSTED                                               NTStatus      = 0xC01A0006\n\tSTATUS_LOG_READ_CONTEXT_INVALID                                           NTStatus      = 0xC01A0007\n\tSTATUS_LOG_RESTART_INVALID                                                NTStatus      = 0xC01A0008\n\tSTATUS_LOG_BLOCK_VERSION                                                  NTStatus      = 0xC01A0009\n\tSTATUS_LOG_BLOCK_INVALID                                                  NTStatus      = 0xC01A000A\n\tSTATUS_LOG_READ_MODE_INVALID                                              NTStatus      = 0xC01A000B\n\tSTATUS_LOG_NO_RESTART                                                     NTStatus      = 0x401A000C\n\tSTATUS_LOG_METADATA_CORRUPT                                               NTStatus      = 0xC01A000D\n\tSTATUS_LOG_METADATA_INVALID                                               NTStatus      = 0xC01A000E\n\tSTATUS_LOG_METADATA_INCONSISTENT                                          NTStatus      = 0xC01A000F\n\tSTATUS_LOG_RESERVATION_INVALID                                            NTStatus      = 0xC01A0010\n\tSTATUS_LOG_CANT_DELETE                                                    NTStatus      = 0xC01A0011\n\tSTATUS_LOG_CONTAINER_LIMIT_EXCEEDED                                       NTStatus      = 0xC01A0012\n\tSTATUS_LOG_START_OF_LOG                                                   NTStatus      = 0xC01A0013\n\tSTATUS_LOG_POLICY_ALREADY_INSTALLED                                       NTStatus      = 0xC01A0014\n\tSTATUS_LOG_POLICY_NOT_INSTALLED                                           NTStatus      = 0xC01A0015\n\tSTATUS_LOG_POLICY_INVALID                                                 NTStatus      = 0xC01A0016\n\tSTATUS_LOG_POLICY_CONFLICT                                                NTStatus      = 0xC01A0017\n\tSTATUS_LOG_PINNED_ARCHIVE_TAIL                                            NTStatus      = 0xC01A0018\n\tSTATUS_LOG_RECORD_NONEXISTENT                                             NTStatus      = 0xC01A0019\n\tSTATUS_LOG_RECORDS_RESERVED_INVALID                                       NTStatus      = 0xC01A001A\n\tSTATUS_LOG_SPACE_RESERVED_INVALID                                         NTStatus      = 0xC01A001B\n\tSTATUS_LOG_TAIL_INVALID                                                   NTStatus      = 0xC01A001C\n\tSTATUS_LOG_FULL                                                           NTStatus      = 0xC01A001D\n\tSTATUS_LOG_MULTIPLEXED                                                    NTStatus      = 0xC01A001E\n\tSTATUS_LOG_DEDICATED                                                      NTStatus      = 0xC01A001F\n\tSTATUS_LOG_ARCHIVE_NOT_IN_PROGRESS                                        NTStatus      = 0xC01A0020\n\tSTATUS_LOG_ARCHIVE_IN_PROGRESS                                            NTStatus      = 0xC01A0021\n\tSTATUS_LOG_EPHEMERAL                                                      NTStatus      = 0xC01A0022\n\tSTATUS_LOG_NOT_ENOUGH_CONTAINERS                                          NTStatus      = 0xC01A0023\n\tSTATUS_LOG_CLIENT_ALREADY_REGISTERED                                      NTStatus      = 0xC01A0024\n\tSTATUS_LOG_CLIENT_NOT_REGISTERED                                          NTStatus      = 0xC01A0025\n\tSTATUS_LOG_FULL_HANDLER_IN_PROGRESS                                       NTStatus      = 0xC01A0026\n\tSTATUS_LOG_CONTAINER_READ_FAILED                                          NTStatus      = 0xC01A0027\n\tSTATUS_LOG_CONTAINER_WRITE_FAILED                                         NTStatus      = 0xC01A0028\n\tSTATUS_LOG_CONTAINER_OPEN_FAILED                                          NTStatus      = 0xC01A0029\n\tSTATUS_LOG_CONTAINER_STATE_INVALID                                        NTStatus      = 0xC01A002A\n\tSTATUS_LOG_STATE_INVALID                                                  NTStatus      = 0xC01A002B\n\tSTATUS_LOG_PINNED                                                         NTStatus      = 0xC01A002C\n\tSTATUS_LOG_METADATA_FLUSH_FAILED                                          NTStatus      = 0xC01A002D\n\tSTATUS_LOG_INCONSISTENT_SECURITY                                          NTStatus      = 0xC01A002E\n\tSTATUS_LOG_APPENDED_FLUSH_FAILED                                          NTStatus      = 0xC01A002F\n\tSTATUS_LOG_PINNED_RESERVATION                                             NTStatus      = 0xC01A0030\n\tSTATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD                                   NTStatus      = 0xC01B00EA\n\tSTATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED                         NTStatus      = 0x801B00EB\n\tSTATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST                                  NTStatus      = 0x401B00EC\n\tSTATUS_MONITOR_NO_DESCRIPTOR                                              NTStatus      = 0xC01D0001\n\tSTATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT                                  NTStatus      = 0xC01D0002\n\tSTATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM                                NTStatus      = 0xC01D0003\n\tSTATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK                              NTStatus      = 0xC01D0004\n\tSTATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED                          NTStatus      = 0xC01D0005\n\tSTATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK                         NTStatus      = 0xC01D0006\n\tSTATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK                         NTStatus      = 0xC01D0007\n\tSTATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA                                    NTStatus      = 0xC01D0008\n\tSTATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK                              NTStatus      = 0xC01D0009\n\tSTATUS_MONITOR_INVALID_MANUFACTURE_DATE                                   NTStatus      = 0xC01D000A\n\tSTATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER                                  NTStatus      = 0xC01E0000\n\tSTATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER                                   NTStatus      = 0xC01E0001\n\tSTATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER                                   NTStatus      = 0xC01E0002\n\tSTATUS_GRAPHICS_ADAPTER_WAS_RESET                                         NTStatus      = 0xC01E0003\n\tSTATUS_GRAPHICS_INVALID_DRIVER_MODEL                                      NTStatus      = 0xC01E0004\n\tSTATUS_GRAPHICS_PRESENT_MODE_CHANGED                                      NTStatus      = 0xC01E0005\n\tSTATUS_GRAPHICS_PRESENT_OCCLUDED                                          NTStatus      = 0xC01E0006\n\tSTATUS_GRAPHICS_PRESENT_DENIED                                            NTStatus      = 0xC01E0007\n\tSTATUS_GRAPHICS_CANNOTCOLORCONVERT                                        NTStatus      = 0xC01E0008\n\tSTATUS_GRAPHICS_DRIVER_MISMATCH                                           NTStatus      = 0xC01E0009\n\tSTATUS_GRAPHICS_PARTIAL_DATA_POPULATED                                    NTStatus      = 0x401E000A\n\tSTATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED                              NTStatus      = 0xC01E000B\n\tSTATUS_GRAPHICS_PRESENT_UNOCCLUDED                                        NTStatus      = 0xC01E000C\n\tSTATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE                                    NTStatus      = 0xC01E000D\n\tSTATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED                               NTStatus      = 0xC01E000E\n\tSTATUS_GRAPHICS_PRESENT_INVALID_WINDOW                                    NTStatus      = 0xC01E000F\n\tSTATUS_GRAPHICS_PRESENT_BUFFER_NOT_BOUND                                  NTStatus      = 0xC01E0010\n\tSTATUS_GRAPHICS_VAIL_STATE_CHANGED                                        NTStatus      = 0xC01E0011\n\tSTATUS_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN                        NTStatus      = 0xC01E0012\n\tSTATUS_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED                           NTStatus      = 0xC01E0013\n\tSTATUS_GRAPHICS_NO_VIDEO_MEMORY                                           NTStatus      = 0xC01E0100\n\tSTATUS_GRAPHICS_CANT_LOCK_MEMORY                                          NTStatus      = 0xC01E0101\n\tSTATUS_GRAPHICS_ALLOCATION_BUSY                                           NTStatus      = 0xC01E0102\n\tSTATUS_GRAPHICS_TOO_MANY_REFERENCES                                       NTStatus      = 0xC01E0103\n\tSTATUS_GRAPHICS_TRY_AGAIN_LATER                                           NTStatus      = 0xC01E0104\n\tSTATUS_GRAPHICS_TRY_AGAIN_NOW                                             NTStatus      = 0xC01E0105\n\tSTATUS_GRAPHICS_ALLOCATION_INVALID                                        NTStatus      = 0xC01E0106\n\tSTATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE                          NTStatus      = 0xC01E0107\n\tSTATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED                          NTStatus      = 0xC01E0108\n\tSTATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION                              NTStatus      = 0xC01E0109\n\tSTATUS_GRAPHICS_INVALID_ALLOCATION_USAGE                                  NTStatus      = 0xC01E0110\n\tSTATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION                             NTStatus      = 0xC01E0111\n\tSTATUS_GRAPHICS_ALLOCATION_CLOSED                                         NTStatus      = 0xC01E0112\n\tSTATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE                               NTStatus      = 0xC01E0113\n\tSTATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE                                 NTStatus      = 0xC01E0114\n\tSTATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE                                   NTStatus      = 0xC01E0115\n\tSTATUS_GRAPHICS_ALLOCATION_CONTENT_LOST                                   NTStatus      = 0xC01E0116\n\tSTATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE                                   NTStatus      = 0xC01E0200\n\tSTATUS_GRAPHICS_SKIP_ALLOCATION_PREPARATION                               NTStatus      = 0x401E0201\n\tSTATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY                                    NTStatus      = 0xC01E0300\n\tSTATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED                              NTStatus      = 0xC01E0301\n\tSTATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED                    NTStatus      = 0xC01E0302\n\tSTATUS_GRAPHICS_INVALID_VIDPN                                             NTStatus      = 0xC01E0303\n\tSTATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE                              NTStatus      = 0xC01E0304\n\tSTATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET                              NTStatus      = 0xC01E0305\n\tSTATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED                              NTStatus      = 0xC01E0306\n\tSTATUS_GRAPHICS_MODE_NOT_PINNED                                           NTStatus      = 0x401E0307\n\tSTATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET                               NTStatus      = 0xC01E0308\n\tSTATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET                               NTStatus      = 0xC01E0309\n\tSTATUS_GRAPHICS_INVALID_FREQUENCY                                         NTStatus      = 0xC01E030A\n\tSTATUS_GRAPHICS_INVALID_ACTIVE_REGION                                     NTStatus      = 0xC01E030B\n\tSTATUS_GRAPHICS_INVALID_TOTAL_REGION                                      NTStatus      = 0xC01E030C\n\tSTATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE                         NTStatus      = 0xC01E0310\n\tSTATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE                         NTStatus      = 0xC01E0311\n\tSTATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET                            NTStatus      = 0xC01E0312\n\tSTATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY                                  NTStatus      = 0xC01E0313\n\tSTATUS_GRAPHICS_MODE_ALREADY_IN_MODESET                                   NTStatus      = 0xC01E0314\n\tSTATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET                             NTStatus      = 0xC01E0315\n\tSTATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET                             NTStatus      = 0xC01E0316\n\tSTATUS_GRAPHICS_SOURCE_ALREADY_IN_SET                                     NTStatus      = 0xC01E0317\n\tSTATUS_GRAPHICS_TARGET_ALREADY_IN_SET                                     NTStatus      = 0xC01E0318\n\tSTATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH                                NTStatus      = 0xC01E0319\n\tSTATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY                             NTStatus      = 0xC01E031A\n\tSTATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET                         NTStatus      = 0xC01E031B\n\tSTATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE                            NTStatus      = 0xC01E031C\n\tSTATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET                                 NTStatus      = 0xC01E031D\n\tSTATUS_GRAPHICS_NO_PREFERRED_MODE                                         NTStatus      = 0x401E031E\n\tSTATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET                             NTStatus      = 0xC01E031F\n\tSTATUS_GRAPHICS_STALE_MODESET                                             NTStatus      = 0xC01E0320\n\tSTATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET                             NTStatus      = 0xC01E0321\n\tSTATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE                               NTStatus      = 0xC01E0322\n\tSTATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN                           NTStatus      = 0xC01E0323\n\tSTATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE                                    NTStatus      = 0xC01E0324\n\tSTATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION           NTStatus      = 0xC01E0325\n\tSTATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES                   NTStatus      = 0xC01E0326\n\tSTATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY                                      NTStatus      = 0xC01E0327\n\tSTATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE                     NTStatus      = 0xC01E0328\n\tSTATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET                     NTStatus      = 0xC01E0329\n\tSTATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET                              NTStatus      = 0xC01E032A\n\tSTATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR                                 NTStatus      = 0xC01E032B\n\tSTATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET                              NTStatus      = 0xC01E032C\n\tSTATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET                          NTStatus      = 0xC01E032D\n\tSTATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE                       NTStatus      = 0xC01E032E\n\tSTATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE                          NTStatus      = 0xC01E032F\n\tSTATUS_GRAPHICS_RESOURCES_NOT_RELATED                                     NTStatus      = 0xC01E0330\n\tSTATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE                                  NTStatus      = 0xC01E0331\n\tSTATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE                                  NTStatus      = 0xC01E0332\n\tSTATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET                                 NTStatus      = 0xC01E0333\n\tSTATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER              NTStatus      = 0xC01E0334\n\tSTATUS_GRAPHICS_NO_VIDPNMGR                                               NTStatus      = 0xC01E0335\n\tSTATUS_GRAPHICS_NO_ACTIVE_VIDPN                                           NTStatus      = 0xC01E0336\n\tSTATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY                                      NTStatus      = 0xC01E0337\n\tSTATUS_GRAPHICS_MONITOR_NOT_CONNECTED                                     NTStatus      = 0xC01E0338\n\tSTATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY                                    NTStatus      = 0xC01E0339\n\tSTATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE                               NTStatus      = 0xC01E033A\n\tSTATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE                                NTStatus      = 0xC01E033B\n\tSTATUS_GRAPHICS_INVALID_STRIDE                                            NTStatus      = 0xC01E033C\n\tSTATUS_GRAPHICS_INVALID_PIXELFORMAT                                       NTStatus      = 0xC01E033D\n\tSTATUS_GRAPHICS_INVALID_COLORBASIS                                        NTStatus      = 0xC01E033E\n\tSTATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE                              NTStatus      = 0xC01E033F\n\tSTATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY                                    NTStatus      = 0xC01E0340\n\tSTATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT                        NTStatus      = 0xC01E0341\n\tSTATUS_GRAPHICS_VIDPN_SOURCE_IN_USE                                       NTStatus      = 0xC01E0342\n\tSTATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN                                  NTStatus      = 0xC01E0343\n\tSTATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL                           NTStatus      = 0xC01E0344\n\tSTATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION              NTStatus      = 0xC01E0345\n\tSTATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED        NTStatus      = 0xC01E0346\n\tSTATUS_GRAPHICS_INVALID_GAMMA_RAMP                                        NTStatus      = 0xC01E0347\n\tSTATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED                                  NTStatus      = 0xC01E0348\n\tSTATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED                               NTStatus      = 0xC01E0349\n\tSTATUS_GRAPHICS_MODE_NOT_IN_MODESET                                       NTStatus      = 0xC01E034A\n\tSTATUS_GRAPHICS_DATASET_IS_EMPTY                                          NTStatus      = 0x401E034B\n\tSTATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET                               NTStatus      = 0x401E034C\n\tSTATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON              NTStatus      = 0xC01E034D\n\tSTATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE                                 NTStatus      = 0xC01E034E\n\tSTATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE                               NTStatus      = 0xC01E034F\n\tSTATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS                         NTStatus      = 0xC01E0350\n\tSTATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED           NTStatus      = 0x401E0351\n\tSTATUS_GRAPHICS_INVALID_SCANLINE_ORDERING                                 NTStatus      = 0xC01E0352\n\tSTATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED                              NTStatus      = 0xC01E0353\n\tSTATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS                          NTStatus      = 0xC01E0354\n\tSTATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT                               NTStatus      = 0xC01E0355\n\tSTATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM                            NTStatus      = 0xC01E0356\n\tSTATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN                         NTStatus      = 0xC01E0357\n\tSTATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT                 NTStatus      = 0xC01E0358\n\tSTATUS_GRAPHICS_MAX_NUM_PATHS_REACHED                                     NTStatus      = 0xC01E0359\n\tSTATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION                        NTStatus      = 0xC01E035A\n\tSTATUS_GRAPHICS_INVALID_CLIENT_TYPE                                       NTStatus      = 0xC01E035B\n\tSTATUS_GRAPHICS_CLIENTVIDPN_NOT_SET                                       NTStatus      = 0xC01E035C\n\tSTATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED                         NTStatus      = 0xC01E0400\n\tSTATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED                            NTStatus      = 0xC01E0401\n\tSTATUS_GRAPHICS_UNKNOWN_CHILD_STATUS                                      NTStatus      = 0x401E042F\n\tSTATUS_GRAPHICS_NOT_A_LINKED_ADAPTER                                      NTStatus      = 0xC01E0430\n\tSTATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED                                   NTStatus      = 0xC01E0431\n\tSTATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED                                 NTStatus      = 0xC01E0432\n\tSTATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY                                   NTStatus      = 0xC01E0433\n\tSTATUS_GRAPHICS_CHAINLINKS_NOT_STARTED                                    NTStatus      = 0xC01E0434\n\tSTATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON                                 NTStatus      = 0xC01E0435\n\tSTATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE                            NTStatus      = 0xC01E0436\n\tSTATUS_GRAPHICS_LEADLINK_START_DEFERRED                                   NTStatus      = 0x401E0437\n\tSTATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER                                    NTStatus      = 0xC01E0438\n\tSTATUS_GRAPHICS_POLLING_TOO_FREQUENTLY                                    NTStatus      = 0x401E0439\n\tSTATUS_GRAPHICS_START_DEFERRED                                            NTStatus      = 0x401E043A\n\tSTATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED                               NTStatus      = 0xC01E043B\n\tSTATUS_GRAPHICS_DEPENDABLE_CHILD_STATUS                                   NTStatus      = 0x401E043C\n\tSTATUS_GRAPHICS_OPM_NOT_SUPPORTED                                         NTStatus      = 0xC01E0500\n\tSTATUS_GRAPHICS_COPP_NOT_SUPPORTED                                        NTStatus      = 0xC01E0501\n\tSTATUS_GRAPHICS_UAB_NOT_SUPPORTED                                         NTStatus      = 0xC01E0502\n\tSTATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS                          NTStatus      = 0xC01E0503\n\tSTATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST                            NTStatus      = 0xC01E0505\n\tSTATUS_GRAPHICS_OPM_INTERNAL_ERROR                                        NTStatus      = 0xC01E050B\n\tSTATUS_GRAPHICS_OPM_INVALID_HANDLE                                        NTStatus      = 0xC01E050C\n\tSTATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH                            NTStatus      = 0xC01E050E\n\tSTATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED                                 NTStatus      = 0xC01E050F\n\tSTATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED                                  NTStatus      = 0xC01E0510\n\tSTATUS_GRAPHICS_PVP_HFS_FAILED                                            NTStatus      = 0xC01E0511\n\tSTATUS_GRAPHICS_OPM_INVALID_SRM                                           NTStatus      = 0xC01E0512\n\tSTATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP                          NTStatus      = 0xC01E0513\n\tSTATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP                           NTStatus      = 0xC01E0514\n\tSTATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA                         NTStatus      = 0xC01E0515\n\tSTATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET                                    NTStatus      = 0xC01E0516\n\tSTATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH                                   NTStatus      = 0xC01E0517\n\tSTATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE                      NTStatus      = 0xC01E0518\n\tSTATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS                     NTStatus      = 0xC01E051A\n\tSTATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS         NTStatus      = 0xC01E051C\n\tSTATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST                           NTStatus      = 0xC01E051D\n\tSTATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR                                 NTStatus      = 0xC01E051E\n\tSTATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS          NTStatus      = 0xC01E051F\n\tSTATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED                               NTStatus      = 0xC01E0520\n\tSTATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST                         NTStatus      = 0xC01E0521\n\tSTATUS_GRAPHICS_I2C_NOT_SUPPORTED                                         NTStatus      = 0xC01E0580\n\tSTATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST                                 NTStatus      = 0xC01E0581\n\tSTATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA                               NTStatus      = 0xC01E0582\n\tSTATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA                                  NTStatus      = 0xC01E0583\n\tSTATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED                                   NTStatus      = 0xC01E0584\n\tSTATUS_GRAPHICS_DDCCI_INVALID_DATA                                        NTStatus      = 0xC01E0585\n\tSTATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE         NTStatus      = 0xC01E0586\n\tSTATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING                         NTStatus      = 0xC01E0587\n\tSTATUS_GRAPHICS_MCA_INTERNAL_ERROR                                        NTStatus      = 0xC01E0588\n\tSTATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND                             NTStatus      = 0xC01E0589\n\tSTATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH                              NTStatus      = 0xC01E058A\n\tSTATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM                            NTStatus      = 0xC01E058B\n\tSTATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE                           NTStatus      = 0xC01E058C\n\tSTATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS                                  NTStatus      = 0xC01E058D\n\tSTATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED                            NTStatus      = 0xC01E05E0\n\tSTATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME                     NTStatus      = 0xC01E05E1\n\tSTATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP                    NTStatus      = 0xC01E05E2\n\tSTATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED                           NTStatus      = 0xC01E05E3\n\tSTATUS_GRAPHICS_INVALID_POINTER                                           NTStatus      = 0xC01E05E4\n\tSTATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE                  NTStatus      = 0xC01E05E5\n\tSTATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL                                 NTStatus      = 0xC01E05E6\n\tSTATUS_GRAPHICS_INTERNAL_ERROR                                            NTStatus      = 0xC01E05E7\n\tSTATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS                           NTStatus      = 0xC01E05E8\n\tSTATUS_FVE_LOCKED_VOLUME                                                  NTStatus      = 0xC0210000\n\tSTATUS_FVE_NOT_ENCRYPTED                                                  NTStatus      = 0xC0210001\n\tSTATUS_FVE_BAD_INFORMATION                                                NTStatus      = 0xC0210002\n\tSTATUS_FVE_TOO_SMALL                                                      NTStatus      = 0xC0210003\n\tSTATUS_FVE_FAILED_WRONG_FS                                                NTStatus      = 0xC0210004\n\tSTATUS_FVE_BAD_PARTITION_SIZE                                             NTStatus      = 0xC0210005\n\tSTATUS_FVE_FS_NOT_EXTENDED                                                NTStatus      = 0xC0210006\n\tSTATUS_FVE_FS_MOUNTED                                                     NTStatus      = 0xC0210007\n\tSTATUS_FVE_NO_LICENSE                                                     NTStatus      = 0xC0210008\n\tSTATUS_FVE_ACTION_NOT_ALLOWED                                             NTStatus      = 0xC0210009\n\tSTATUS_FVE_BAD_DATA                                                       NTStatus      = 0xC021000A\n\tSTATUS_FVE_VOLUME_NOT_BOUND                                               NTStatus      = 0xC021000B\n\tSTATUS_FVE_NOT_DATA_VOLUME                                                NTStatus      = 0xC021000C\n\tSTATUS_FVE_CONV_READ_ERROR                                                NTStatus      = 0xC021000D\n\tSTATUS_FVE_CONV_WRITE_ERROR                                               NTStatus      = 0xC021000E\n\tSTATUS_FVE_OVERLAPPED_UPDATE                                              NTStatus      = 0xC021000F\n\tSTATUS_FVE_FAILED_SECTOR_SIZE                                             NTStatus      = 0xC0210010\n\tSTATUS_FVE_FAILED_AUTHENTICATION                                          NTStatus      = 0xC0210011\n\tSTATUS_FVE_NOT_OS_VOLUME                                                  NTStatus      = 0xC0210012\n\tSTATUS_FVE_KEYFILE_NOT_FOUND                                              NTStatus      = 0xC0210013\n\tSTATUS_FVE_KEYFILE_INVALID                                                NTStatus      = 0xC0210014\n\tSTATUS_FVE_KEYFILE_NO_VMK                                                 NTStatus      = 0xC0210015\n\tSTATUS_FVE_TPM_DISABLED                                                   NTStatus      = 0xC0210016\n\tSTATUS_FVE_TPM_SRK_AUTH_NOT_ZERO                                          NTStatus      = 0xC0210017\n\tSTATUS_FVE_TPM_INVALID_PCR                                                NTStatus      = 0xC0210018\n\tSTATUS_FVE_TPM_NO_VMK                                                     NTStatus      = 0xC0210019\n\tSTATUS_FVE_PIN_INVALID                                                    NTStatus      = 0xC021001A\n\tSTATUS_FVE_AUTH_INVALID_APPLICATION                                       NTStatus      = 0xC021001B\n\tSTATUS_FVE_AUTH_INVALID_CONFIG                                            NTStatus      = 0xC021001C\n\tSTATUS_FVE_DEBUGGER_ENABLED                                               NTStatus      = 0xC021001D\n\tSTATUS_FVE_DRY_RUN_FAILED                                                 NTStatus      = 0xC021001E\n\tSTATUS_FVE_BAD_METADATA_POINTER                                           NTStatus      = 0xC021001F\n\tSTATUS_FVE_OLD_METADATA_COPY                                              NTStatus      = 0xC0210020\n\tSTATUS_FVE_REBOOT_REQUIRED                                                NTStatus      = 0xC0210021\n\tSTATUS_FVE_RAW_ACCESS                                                     NTStatus      = 0xC0210022\n\tSTATUS_FVE_RAW_BLOCKED                                                    NTStatus      = 0xC0210023\n\tSTATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY                                       NTStatus      = 0xC0210024\n\tSTATUS_FVE_MOR_FAILED                                                     NTStatus      = 0xC0210025\n\tSTATUS_FVE_NO_FEATURE_LICENSE                                             NTStatus      = 0xC0210026\n\tSTATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED                            NTStatus      = 0xC0210027\n\tSTATUS_FVE_CONV_RECOVERY_FAILED                                           NTStatus      = 0xC0210028\n\tSTATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG                                      NTStatus      = 0xC0210029\n\tSTATUS_FVE_INVALID_DATUM_TYPE                                             NTStatus      = 0xC021002A\n\tSTATUS_FVE_VOLUME_TOO_SMALL                                               NTStatus      = 0xC0210030\n\tSTATUS_FVE_ENH_PIN_INVALID                                                NTStatus      = 0xC0210031\n\tSTATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE                      NTStatus      = 0xC0210032\n\tSTATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE                                 NTStatus      = 0xC0210033\n\tSTATUS_FVE_NOT_ALLOWED_ON_CSV_STACK                                       NTStatus      = 0xC0210034\n\tSTATUS_FVE_NOT_ALLOWED_ON_CLUSTER                                         NTStatus      = 0xC0210035\n\tSTATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING                        NTStatus      = 0xC0210036\n\tSTATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE                                     NTStatus      = 0xC0210037\n\tSTATUS_FVE_EDRIVE_DRY_RUN_FAILED                                          NTStatus      = 0xC0210038\n\tSTATUS_FVE_SECUREBOOT_DISABLED                                            NTStatus      = 0xC0210039\n\tSTATUS_FVE_SECUREBOOT_CONFIG_CHANGE                                       NTStatus      = 0xC021003A\n\tSTATUS_FVE_DEVICE_LOCKEDOUT                                               NTStatus      = 0xC021003B\n\tSTATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT                             NTStatus      = 0xC021003C\n\tSTATUS_FVE_NOT_DE_VOLUME                                                  NTStatus      = 0xC021003D\n\tSTATUS_FVE_PROTECTION_DISABLED                                            NTStatus      = 0xC021003E\n\tSTATUS_FVE_PROTECTION_CANNOT_BE_DISABLED                                  NTStatus      = 0xC021003F\n\tSTATUS_FVE_OSV_KSR_NOT_ALLOWED                                            NTStatus      = 0xC0210040\n\tSTATUS_FWP_CALLOUT_NOT_FOUND                                              NTStatus      = 0xC0220001\n\tSTATUS_FWP_CONDITION_NOT_FOUND                                            NTStatus      = 0xC0220002\n\tSTATUS_FWP_FILTER_NOT_FOUND                                               NTStatus      = 0xC0220003\n\tSTATUS_FWP_LAYER_NOT_FOUND                                                NTStatus      = 0xC0220004\n\tSTATUS_FWP_PROVIDER_NOT_FOUND                                             NTStatus      = 0xC0220005\n\tSTATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND                                     NTStatus      = 0xC0220006\n\tSTATUS_FWP_SUBLAYER_NOT_FOUND                                             NTStatus      = 0xC0220007\n\tSTATUS_FWP_NOT_FOUND                                                      NTStatus      = 0xC0220008\n\tSTATUS_FWP_ALREADY_EXISTS                                                 NTStatus      = 0xC0220009\n\tSTATUS_FWP_IN_USE                                                         NTStatus      = 0xC022000A\n\tSTATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS                                    NTStatus      = 0xC022000B\n\tSTATUS_FWP_WRONG_SESSION                                                  NTStatus      = 0xC022000C\n\tSTATUS_FWP_NO_TXN_IN_PROGRESS                                             NTStatus      = 0xC022000D\n\tSTATUS_FWP_TXN_IN_PROGRESS                                                NTStatus      = 0xC022000E\n\tSTATUS_FWP_TXN_ABORTED                                                    NTStatus      = 0xC022000F\n\tSTATUS_FWP_SESSION_ABORTED                                                NTStatus      = 0xC0220010\n\tSTATUS_FWP_INCOMPATIBLE_TXN                                               NTStatus      = 0xC0220011\n\tSTATUS_FWP_TIMEOUT                                                        NTStatus      = 0xC0220012\n\tSTATUS_FWP_NET_EVENTS_DISABLED                                            NTStatus      = 0xC0220013\n\tSTATUS_FWP_INCOMPATIBLE_LAYER                                             NTStatus      = 0xC0220014\n\tSTATUS_FWP_KM_CLIENTS_ONLY                                                NTStatus      = 0xC0220015\n\tSTATUS_FWP_LIFETIME_MISMATCH                                              NTStatus      = 0xC0220016\n\tSTATUS_FWP_BUILTIN_OBJECT                                                 NTStatus      = 0xC0220017\n\tSTATUS_FWP_TOO_MANY_CALLOUTS                                              NTStatus      = 0xC0220018\n\tSTATUS_FWP_NOTIFICATION_DROPPED                                           NTStatus      = 0xC0220019\n\tSTATUS_FWP_TRAFFIC_MISMATCH                                               NTStatus      = 0xC022001A\n\tSTATUS_FWP_INCOMPATIBLE_SA_STATE                                          NTStatus      = 0xC022001B\n\tSTATUS_FWP_NULL_POINTER                                                   NTStatus      = 0xC022001C\n\tSTATUS_FWP_INVALID_ENUMERATOR                                             NTStatus      = 0xC022001D\n\tSTATUS_FWP_INVALID_FLAGS                                                  NTStatus      = 0xC022001E\n\tSTATUS_FWP_INVALID_NET_MASK                                               NTStatus      = 0xC022001F\n\tSTATUS_FWP_INVALID_RANGE                                                  NTStatus      = 0xC0220020\n\tSTATUS_FWP_INVALID_INTERVAL                                               NTStatus      = 0xC0220021\n\tSTATUS_FWP_ZERO_LENGTH_ARRAY                                              NTStatus      = 0xC0220022\n\tSTATUS_FWP_NULL_DISPLAY_NAME                                              NTStatus      = 0xC0220023\n\tSTATUS_FWP_INVALID_ACTION_TYPE                                            NTStatus      = 0xC0220024\n\tSTATUS_FWP_INVALID_WEIGHT                                                 NTStatus      = 0xC0220025\n\tSTATUS_FWP_MATCH_TYPE_MISMATCH                                            NTStatus      = 0xC0220026\n\tSTATUS_FWP_TYPE_MISMATCH                                                  NTStatus      = 0xC0220027\n\tSTATUS_FWP_OUT_OF_BOUNDS                                                  NTStatus      = 0xC0220028\n\tSTATUS_FWP_RESERVED                                                       NTStatus      = 0xC0220029\n\tSTATUS_FWP_DUPLICATE_CONDITION                                            NTStatus      = 0xC022002A\n\tSTATUS_FWP_DUPLICATE_KEYMOD                                               NTStatus      = 0xC022002B\n\tSTATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER                                 NTStatus      = 0xC022002C\n\tSTATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER                              NTStatus      = 0xC022002D\n\tSTATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER                                NTStatus      = 0xC022002E\n\tSTATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT                              NTStatus      = 0xC022002F\n\tSTATUS_FWP_INCOMPATIBLE_AUTH_METHOD                                       NTStatus      = 0xC0220030\n\tSTATUS_FWP_INCOMPATIBLE_DH_GROUP                                          NTStatus      = 0xC0220031\n\tSTATUS_FWP_EM_NOT_SUPPORTED                                               NTStatus      = 0xC0220032\n\tSTATUS_FWP_NEVER_MATCH                                                    NTStatus      = 0xC0220033\n\tSTATUS_FWP_PROVIDER_CONTEXT_MISMATCH                                      NTStatus      = 0xC0220034\n\tSTATUS_FWP_INVALID_PARAMETER                                              NTStatus      = 0xC0220035\n\tSTATUS_FWP_TOO_MANY_SUBLAYERS                                             NTStatus      = 0xC0220036\n\tSTATUS_FWP_CALLOUT_NOTIFICATION_FAILED                                    NTStatus      = 0xC0220037\n\tSTATUS_FWP_INVALID_AUTH_TRANSFORM                                         NTStatus      = 0xC0220038\n\tSTATUS_FWP_INVALID_CIPHER_TRANSFORM                                       NTStatus      = 0xC0220039\n\tSTATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM                                  NTStatus      = 0xC022003A\n\tSTATUS_FWP_INVALID_TRANSFORM_COMBINATION                                  NTStatus      = 0xC022003B\n\tSTATUS_FWP_DUPLICATE_AUTH_METHOD                                          NTStatus      = 0xC022003C\n\tSTATUS_FWP_INVALID_TUNNEL_ENDPOINT                                        NTStatus      = 0xC022003D\n\tSTATUS_FWP_L2_DRIVER_NOT_READY                                            NTStatus      = 0xC022003E\n\tSTATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED                                NTStatus      = 0xC022003F\n\tSTATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL                          NTStatus      = 0xC0220040\n\tSTATUS_FWP_CONNECTIONS_DISABLED                                           NTStatus      = 0xC0220041\n\tSTATUS_FWP_INVALID_DNS_NAME                                               NTStatus      = 0xC0220042\n\tSTATUS_FWP_STILL_ON                                                       NTStatus      = 0xC0220043\n\tSTATUS_FWP_IKEEXT_NOT_RUNNING                                             NTStatus      = 0xC0220044\n\tSTATUS_FWP_TCPIP_NOT_READY                                                NTStatus      = 0xC0220100\n\tSTATUS_FWP_INJECT_HANDLE_CLOSING                                          NTStatus      = 0xC0220101\n\tSTATUS_FWP_INJECT_HANDLE_STALE                                            NTStatus      = 0xC0220102\n\tSTATUS_FWP_CANNOT_PEND                                                    NTStatus      = 0xC0220103\n\tSTATUS_FWP_DROP_NOICMP                                                    NTStatus      = 0xC0220104\n\tSTATUS_NDIS_CLOSING                                                       NTStatus      = 0xC0230002\n\tSTATUS_NDIS_BAD_VERSION                                                   NTStatus      = 0xC0230004\n\tSTATUS_NDIS_BAD_CHARACTERISTICS                                           NTStatus      = 0xC0230005\n\tSTATUS_NDIS_ADAPTER_NOT_FOUND                                             NTStatus      = 0xC0230006\n\tSTATUS_NDIS_OPEN_FAILED                                                   NTStatus      = 0xC0230007\n\tSTATUS_NDIS_DEVICE_FAILED                                                 NTStatus      = 0xC0230008\n\tSTATUS_NDIS_MULTICAST_FULL                                                NTStatus      = 0xC0230009\n\tSTATUS_NDIS_MULTICAST_EXISTS                                              NTStatus      = 0xC023000A\n\tSTATUS_NDIS_MULTICAST_NOT_FOUND                                           NTStatus      = 0xC023000B\n\tSTATUS_NDIS_REQUEST_ABORTED                                               NTStatus      = 0xC023000C\n\tSTATUS_NDIS_RESET_IN_PROGRESS                                             NTStatus      = 0xC023000D\n\tSTATUS_NDIS_NOT_SUPPORTED                                                 NTStatus      = 0xC02300BB\n\tSTATUS_NDIS_INVALID_PACKET                                                NTStatus      = 0xC023000F\n\tSTATUS_NDIS_ADAPTER_NOT_READY                                             NTStatus      = 0xC0230011\n\tSTATUS_NDIS_INVALID_LENGTH                                                NTStatus      = 0xC0230014\n\tSTATUS_NDIS_INVALID_DATA                                                  NTStatus      = 0xC0230015\n\tSTATUS_NDIS_BUFFER_TOO_SHORT                                              NTStatus      = 0xC0230016\n\tSTATUS_NDIS_INVALID_OID                                                   NTStatus      = 0xC0230017\n\tSTATUS_NDIS_ADAPTER_REMOVED                                               NTStatus      = 0xC0230018\n\tSTATUS_NDIS_UNSUPPORTED_MEDIA                                             NTStatus      = 0xC0230019\n\tSTATUS_NDIS_GROUP_ADDRESS_IN_USE                                          NTStatus      = 0xC023001A\n\tSTATUS_NDIS_FILE_NOT_FOUND                                                NTStatus      = 0xC023001B\n\tSTATUS_NDIS_ERROR_READING_FILE                                            NTStatus      = 0xC023001C\n\tSTATUS_NDIS_ALREADY_MAPPED                                                NTStatus      = 0xC023001D\n\tSTATUS_NDIS_RESOURCE_CONFLICT                                             NTStatus      = 0xC023001E\n\tSTATUS_NDIS_MEDIA_DISCONNECTED                                            NTStatus      = 0xC023001F\n\tSTATUS_NDIS_INVALID_ADDRESS                                               NTStatus      = 0xC0230022\n\tSTATUS_NDIS_INVALID_DEVICE_REQUEST                                        NTStatus      = 0xC0230010\n\tSTATUS_NDIS_PAUSED                                                        NTStatus      = 0xC023002A\n\tSTATUS_NDIS_INTERFACE_NOT_FOUND                                           NTStatus      = 0xC023002B\n\tSTATUS_NDIS_UNSUPPORTED_REVISION                                          NTStatus      = 0xC023002C\n\tSTATUS_NDIS_INVALID_PORT                                                  NTStatus      = 0xC023002D\n\tSTATUS_NDIS_INVALID_PORT_STATE                                            NTStatus      = 0xC023002E\n\tSTATUS_NDIS_LOW_POWER_STATE                                               NTStatus      = 0xC023002F\n\tSTATUS_NDIS_REINIT_REQUIRED                                               NTStatus      = 0xC0230030\n\tSTATUS_NDIS_NO_QUEUES                                                     NTStatus      = 0xC0230031\n\tSTATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED                                     NTStatus      = 0xC0232000\n\tSTATUS_NDIS_DOT11_MEDIA_IN_USE                                            NTStatus      = 0xC0232001\n\tSTATUS_NDIS_DOT11_POWER_STATE_INVALID                                     NTStatus      = 0xC0232002\n\tSTATUS_NDIS_PM_WOL_PATTERN_LIST_FULL                                      NTStatus      = 0xC0232003\n\tSTATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL                                 NTStatus      = 0xC0232004\n\tSTATUS_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE                      NTStatus      = 0xC0232005\n\tSTATUS_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE                         NTStatus      = 0xC0232006\n\tSTATUS_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED                                  NTStatus      = 0xC0232007\n\tSTATUS_NDIS_DOT11_AP_BAND_NOT_ALLOWED                                     NTStatus      = 0xC0232008\n\tSTATUS_NDIS_INDICATION_REQUIRED                                           NTStatus      = 0x40230001\n\tSTATUS_NDIS_OFFLOAD_POLICY                                                NTStatus      = 0xC023100F\n\tSTATUS_NDIS_OFFLOAD_CONNECTION_REJECTED                                   NTStatus      = 0xC0231012\n\tSTATUS_NDIS_OFFLOAD_PATH_REJECTED                                         NTStatus      = 0xC0231013\n\tSTATUS_TPM_ERROR_MASK                                                     NTStatus      = 0xC0290000\n\tSTATUS_TPM_AUTHFAIL                                                       NTStatus      = 0xC0290001\n\tSTATUS_TPM_BADINDEX                                                       NTStatus      = 0xC0290002\n\tSTATUS_TPM_BAD_PARAMETER                                                  NTStatus      = 0xC0290003\n\tSTATUS_TPM_AUDITFAILURE                                                   NTStatus      = 0xC0290004\n\tSTATUS_TPM_CLEAR_DISABLED                                                 NTStatus      = 0xC0290005\n\tSTATUS_TPM_DEACTIVATED                                                    NTStatus      = 0xC0290006\n\tSTATUS_TPM_DISABLED                                                       NTStatus      = 0xC0290007\n\tSTATUS_TPM_DISABLED_CMD                                                   NTStatus      = 0xC0290008\n\tSTATUS_TPM_FAIL                                                           NTStatus      = 0xC0290009\n\tSTATUS_TPM_BAD_ORDINAL                                                    NTStatus      = 0xC029000A\n\tSTATUS_TPM_INSTALL_DISABLED                                               NTStatus      = 0xC029000B\n\tSTATUS_TPM_INVALID_KEYHANDLE                                              NTStatus      = 0xC029000C\n\tSTATUS_TPM_KEYNOTFOUND                                                    NTStatus      = 0xC029000D\n\tSTATUS_TPM_INAPPROPRIATE_ENC                                              NTStatus      = 0xC029000E\n\tSTATUS_TPM_MIGRATEFAIL                                                    NTStatus      = 0xC029000F\n\tSTATUS_TPM_INVALID_PCR_INFO                                               NTStatus      = 0xC0290010\n\tSTATUS_TPM_NOSPACE                                                        NTStatus      = 0xC0290011\n\tSTATUS_TPM_NOSRK                                                          NTStatus      = 0xC0290012\n\tSTATUS_TPM_NOTSEALED_BLOB                                                 NTStatus      = 0xC0290013\n\tSTATUS_TPM_OWNER_SET                                                      NTStatus      = 0xC0290014\n\tSTATUS_TPM_RESOURCES                                                      NTStatus      = 0xC0290015\n\tSTATUS_TPM_SHORTRANDOM                                                    NTStatus      = 0xC0290016\n\tSTATUS_TPM_SIZE                                                           NTStatus      = 0xC0290017\n\tSTATUS_TPM_WRONGPCRVAL                                                    NTStatus      = 0xC0290018\n\tSTATUS_TPM_BAD_PARAM_SIZE                                                 NTStatus      = 0xC0290019\n\tSTATUS_TPM_SHA_THREAD                                                     NTStatus      = 0xC029001A\n\tSTATUS_TPM_SHA_ERROR                                                      NTStatus      = 0xC029001B\n\tSTATUS_TPM_FAILEDSELFTEST                                                 NTStatus      = 0xC029001C\n\tSTATUS_TPM_AUTH2FAIL                                                      NTStatus      = 0xC029001D\n\tSTATUS_TPM_BADTAG                                                         NTStatus      = 0xC029001E\n\tSTATUS_TPM_IOERROR                                                        NTStatus      = 0xC029001F\n\tSTATUS_TPM_ENCRYPT_ERROR                                                  NTStatus      = 0xC0290020\n\tSTATUS_TPM_DECRYPT_ERROR                                                  NTStatus      = 0xC0290021\n\tSTATUS_TPM_INVALID_AUTHHANDLE                                             NTStatus      = 0xC0290022\n\tSTATUS_TPM_NO_ENDORSEMENT                                                 NTStatus      = 0xC0290023\n\tSTATUS_TPM_INVALID_KEYUSAGE                                               NTStatus      = 0xC0290024\n\tSTATUS_TPM_WRONG_ENTITYTYPE                                               NTStatus      = 0xC0290025\n\tSTATUS_TPM_INVALID_POSTINIT                                               NTStatus      = 0xC0290026\n\tSTATUS_TPM_INAPPROPRIATE_SIG                                              NTStatus      = 0xC0290027\n\tSTATUS_TPM_BAD_KEY_PROPERTY                                               NTStatus      = 0xC0290028\n\tSTATUS_TPM_BAD_MIGRATION                                                  NTStatus      = 0xC0290029\n\tSTATUS_TPM_BAD_SCHEME                                                     NTStatus      = 0xC029002A\n\tSTATUS_TPM_BAD_DATASIZE                                                   NTStatus      = 0xC029002B\n\tSTATUS_TPM_BAD_MODE                                                       NTStatus      = 0xC029002C\n\tSTATUS_TPM_BAD_PRESENCE                                                   NTStatus      = 0xC029002D\n\tSTATUS_TPM_BAD_VERSION                                                    NTStatus      = 0xC029002E\n\tSTATUS_TPM_NO_WRAP_TRANSPORT                                              NTStatus      = 0xC029002F\n\tSTATUS_TPM_AUDITFAIL_UNSUCCESSFUL                                         NTStatus      = 0xC0290030\n\tSTATUS_TPM_AUDITFAIL_SUCCESSFUL                                           NTStatus      = 0xC0290031\n\tSTATUS_TPM_NOTRESETABLE                                                   NTStatus      = 0xC0290032\n\tSTATUS_TPM_NOTLOCAL                                                       NTStatus      = 0xC0290033\n\tSTATUS_TPM_BAD_TYPE                                                       NTStatus      = 0xC0290034\n\tSTATUS_TPM_INVALID_RESOURCE                                               NTStatus      = 0xC0290035\n\tSTATUS_TPM_NOTFIPS                                                        NTStatus      = 0xC0290036\n\tSTATUS_TPM_INVALID_FAMILY                                                 NTStatus      = 0xC0290037\n\tSTATUS_TPM_NO_NV_PERMISSION                                               NTStatus      = 0xC0290038\n\tSTATUS_TPM_REQUIRES_SIGN                                                  NTStatus      = 0xC0290039\n\tSTATUS_TPM_KEY_NOTSUPPORTED                                               NTStatus      = 0xC029003A\n\tSTATUS_TPM_AUTH_CONFLICT                                                  NTStatus      = 0xC029003B\n\tSTATUS_TPM_AREA_LOCKED                                                    NTStatus      = 0xC029003C\n\tSTATUS_TPM_BAD_LOCALITY                                                   NTStatus      = 0xC029003D\n\tSTATUS_TPM_READ_ONLY                                                      NTStatus      = 0xC029003E\n\tSTATUS_TPM_PER_NOWRITE                                                    NTStatus      = 0xC029003F\n\tSTATUS_TPM_FAMILYCOUNT                                                    NTStatus      = 0xC0290040\n\tSTATUS_TPM_WRITE_LOCKED                                                   NTStatus      = 0xC0290041\n\tSTATUS_TPM_BAD_ATTRIBUTES                                                 NTStatus      = 0xC0290042\n\tSTATUS_TPM_INVALID_STRUCTURE                                              NTStatus      = 0xC0290043\n\tSTATUS_TPM_KEY_OWNER_CONTROL                                              NTStatus      = 0xC0290044\n\tSTATUS_TPM_BAD_COUNTER                                                    NTStatus      = 0xC0290045\n\tSTATUS_TPM_NOT_FULLWRITE                                                  NTStatus      = 0xC0290046\n\tSTATUS_TPM_CONTEXT_GAP                                                    NTStatus      = 0xC0290047\n\tSTATUS_TPM_MAXNVWRITES                                                    NTStatus      = 0xC0290048\n\tSTATUS_TPM_NOOPERATOR                                                     NTStatus      = 0xC0290049\n\tSTATUS_TPM_RESOURCEMISSING                                                NTStatus      = 0xC029004A\n\tSTATUS_TPM_DELEGATE_LOCK                                                  NTStatus      = 0xC029004B\n\tSTATUS_TPM_DELEGATE_FAMILY                                                NTStatus      = 0xC029004C\n\tSTATUS_TPM_DELEGATE_ADMIN                                                 NTStatus      = 0xC029004D\n\tSTATUS_TPM_TRANSPORT_NOTEXCLUSIVE                                         NTStatus      = 0xC029004E\n\tSTATUS_TPM_OWNER_CONTROL                                                  NTStatus      = 0xC029004F\n\tSTATUS_TPM_DAA_RESOURCES                                                  NTStatus      = 0xC0290050\n\tSTATUS_TPM_DAA_INPUT_DATA0                                                NTStatus      = 0xC0290051\n\tSTATUS_TPM_DAA_INPUT_DATA1                                                NTStatus      = 0xC0290052\n\tSTATUS_TPM_DAA_ISSUER_SETTINGS                                            NTStatus      = 0xC0290053\n\tSTATUS_TPM_DAA_TPM_SETTINGS                                               NTStatus      = 0xC0290054\n\tSTATUS_TPM_DAA_STAGE                                                      NTStatus      = 0xC0290055\n\tSTATUS_TPM_DAA_ISSUER_VALIDITY                                            NTStatus      = 0xC0290056\n\tSTATUS_TPM_DAA_WRONG_W                                                    NTStatus      = 0xC0290057\n\tSTATUS_TPM_BAD_HANDLE                                                     NTStatus      = 0xC0290058\n\tSTATUS_TPM_BAD_DELEGATE                                                   NTStatus      = 0xC0290059\n\tSTATUS_TPM_BADCONTEXT                                                     NTStatus      = 0xC029005A\n\tSTATUS_TPM_TOOMANYCONTEXTS                                                NTStatus      = 0xC029005B\n\tSTATUS_TPM_MA_TICKET_SIGNATURE                                            NTStatus      = 0xC029005C\n\tSTATUS_TPM_MA_DESTINATION                                                 NTStatus      = 0xC029005D\n\tSTATUS_TPM_MA_SOURCE                                                      NTStatus      = 0xC029005E\n\tSTATUS_TPM_MA_AUTHORITY                                                   NTStatus      = 0xC029005F\n\tSTATUS_TPM_PERMANENTEK                                                    NTStatus      = 0xC0290061\n\tSTATUS_TPM_BAD_SIGNATURE                                                  NTStatus      = 0xC0290062\n\tSTATUS_TPM_NOCONTEXTSPACE                                                 NTStatus      = 0xC0290063\n\tSTATUS_TPM_20_E_ASYMMETRIC                                                NTStatus      = 0xC0290081\n\tSTATUS_TPM_20_E_ATTRIBUTES                                                NTStatus      = 0xC0290082\n\tSTATUS_TPM_20_E_HASH                                                      NTStatus      = 0xC0290083\n\tSTATUS_TPM_20_E_VALUE                                                     NTStatus      = 0xC0290084\n\tSTATUS_TPM_20_E_HIERARCHY                                                 NTStatus      = 0xC0290085\n\tSTATUS_TPM_20_E_KEY_SIZE                                                  NTStatus      = 0xC0290087\n\tSTATUS_TPM_20_E_MGF                                                       NTStatus      = 0xC0290088\n\tSTATUS_TPM_20_E_MODE                                                      NTStatus      = 0xC0290089\n\tSTATUS_TPM_20_E_TYPE                                                      NTStatus      = 0xC029008A\n\tSTATUS_TPM_20_E_HANDLE                                                    NTStatus      = 0xC029008B\n\tSTATUS_TPM_20_E_KDF                                                       NTStatus      = 0xC029008C\n\tSTATUS_TPM_20_E_RANGE                                                     NTStatus      = 0xC029008D\n\tSTATUS_TPM_20_E_AUTH_FAIL                                                 NTStatus      = 0xC029008E\n\tSTATUS_TPM_20_E_NONCE                                                     NTStatus      = 0xC029008F\n\tSTATUS_TPM_20_E_PP                                                        NTStatus      = 0xC0290090\n\tSTATUS_TPM_20_E_SCHEME                                                    NTStatus      = 0xC0290092\n\tSTATUS_TPM_20_E_SIZE                                                      NTStatus      = 0xC0290095\n\tSTATUS_TPM_20_E_SYMMETRIC                                                 NTStatus      = 0xC0290096\n\tSTATUS_TPM_20_E_TAG                                                       NTStatus      = 0xC0290097\n\tSTATUS_TPM_20_E_SELECTOR                                                  NTStatus      = 0xC0290098\n\tSTATUS_TPM_20_E_INSUFFICIENT                                              NTStatus      = 0xC029009A\n\tSTATUS_TPM_20_E_SIGNATURE                                                 NTStatus      = 0xC029009B\n\tSTATUS_TPM_20_E_KEY                                                       NTStatus      = 0xC029009C\n\tSTATUS_TPM_20_E_POLICY_FAIL                                               NTStatus      = 0xC029009D\n\tSTATUS_TPM_20_E_INTEGRITY                                                 NTStatus      = 0xC029009F\n\tSTATUS_TPM_20_E_TICKET                                                    NTStatus      = 0xC02900A0\n\tSTATUS_TPM_20_E_RESERVED_BITS                                             NTStatus      = 0xC02900A1\n\tSTATUS_TPM_20_E_BAD_AUTH                                                  NTStatus      = 0xC02900A2\n\tSTATUS_TPM_20_E_EXPIRED                                                   NTStatus      = 0xC02900A3\n\tSTATUS_TPM_20_E_POLICY_CC                                                 NTStatus      = 0xC02900A4\n\tSTATUS_TPM_20_E_BINDING                                                   NTStatus      = 0xC02900A5\n\tSTATUS_TPM_20_E_CURVE                                                     NTStatus      = 0xC02900A6\n\tSTATUS_TPM_20_E_ECC_POINT                                                 NTStatus      = 0xC02900A7\n\tSTATUS_TPM_20_E_INITIALIZE                                                NTStatus      = 0xC0290100\n\tSTATUS_TPM_20_E_FAILURE                                                   NTStatus      = 0xC0290101\n\tSTATUS_TPM_20_E_SEQUENCE                                                  NTStatus      = 0xC0290103\n\tSTATUS_TPM_20_E_PRIVATE                                                   NTStatus      = 0xC029010B\n\tSTATUS_TPM_20_E_HMAC                                                      NTStatus      = 0xC0290119\n\tSTATUS_TPM_20_E_DISABLED                                                  NTStatus      = 0xC0290120\n\tSTATUS_TPM_20_E_EXCLUSIVE                                                 NTStatus      = 0xC0290121\n\tSTATUS_TPM_20_E_ECC_CURVE                                                 NTStatus      = 0xC0290123\n\tSTATUS_TPM_20_E_AUTH_TYPE                                                 NTStatus      = 0xC0290124\n\tSTATUS_TPM_20_E_AUTH_MISSING                                              NTStatus      = 0xC0290125\n\tSTATUS_TPM_20_E_POLICY                                                    NTStatus      = 0xC0290126\n\tSTATUS_TPM_20_E_PCR                                                       NTStatus      = 0xC0290127\n\tSTATUS_TPM_20_E_PCR_CHANGED                                               NTStatus      = 0xC0290128\n\tSTATUS_TPM_20_E_UPGRADE                                                   NTStatus      = 0xC029012D\n\tSTATUS_TPM_20_E_TOO_MANY_CONTEXTS                                         NTStatus      = 0xC029012E\n\tSTATUS_TPM_20_E_AUTH_UNAVAILABLE                                          NTStatus      = 0xC029012F\n\tSTATUS_TPM_20_E_REBOOT                                                    NTStatus      = 0xC0290130\n\tSTATUS_TPM_20_E_UNBALANCED                                                NTStatus      = 0xC0290131\n\tSTATUS_TPM_20_E_COMMAND_SIZE                                              NTStatus      = 0xC0290142\n\tSTATUS_TPM_20_E_COMMAND_CODE                                              NTStatus      = 0xC0290143\n\tSTATUS_TPM_20_E_AUTHSIZE                                                  NTStatus      = 0xC0290144\n\tSTATUS_TPM_20_E_AUTH_CONTEXT                                              NTStatus      = 0xC0290145\n\tSTATUS_TPM_20_E_NV_RANGE                                                  NTStatus      = 0xC0290146\n\tSTATUS_TPM_20_E_NV_SIZE                                                   NTStatus      = 0xC0290147\n\tSTATUS_TPM_20_E_NV_LOCKED                                                 NTStatus      = 0xC0290148\n\tSTATUS_TPM_20_E_NV_AUTHORIZATION                                          NTStatus      = 0xC0290149\n\tSTATUS_TPM_20_E_NV_UNINITIALIZED                                          NTStatus      = 0xC029014A\n\tSTATUS_TPM_20_E_NV_SPACE                                                  NTStatus      = 0xC029014B\n\tSTATUS_TPM_20_E_NV_DEFINED                                                NTStatus      = 0xC029014C\n\tSTATUS_TPM_20_E_BAD_CONTEXT                                               NTStatus      = 0xC0290150\n\tSTATUS_TPM_20_E_CPHASH                                                    NTStatus      = 0xC0290151\n\tSTATUS_TPM_20_E_PARENT                                                    NTStatus      = 0xC0290152\n\tSTATUS_TPM_20_E_NEEDS_TEST                                                NTStatus      = 0xC0290153\n\tSTATUS_TPM_20_E_NO_RESULT                                                 NTStatus      = 0xC0290154\n\tSTATUS_TPM_20_E_SENSITIVE                                                 NTStatus      = 0xC0290155\n\tSTATUS_TPM_COMMAND_BLOCKED                                                NTStatus      = 0xC0290400\n\tSTATUS_TPM_INVALID_HANDLE                                                 NTStatus      = 0xC0290401\n\tSTATUS_TPM_DUPLICATE_VHANDLE                                              NTStatus      = 0xC0290402\n\tSTATUS_TPM_EMBEDDED_COMMAND_BLOCKED                                       NTStatus      = 0xC0290403\n\tSTATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED                                   NTStatus      = 0xC0290404\n\tSTATUS_TPM_RETRY                                                          NTStatus      = 0xC0290800\n\tSTATUS_TPM_NEEDS_SELFTEST                                                 NTStatus      = 0xC0290801\n\tSTATUS_TPM_DOING_SELFTEST                                                 NTStatus      = 0xC0290802\n\tSTATUS_TPM_DEFEND_LOCK_RUNNING                                            NTStatus      = 0xC0290803\n\tSTATUS_TPM_COMMAND_CANCELED                                               NTStatus      = 0xC0291001\n\tSTATUS_TPM_TOO_MANY_CONTEXTS                                              NTStatus      = 0xC0291002\n\tSTATUS_TPM_NOT_FOUND                                                      NTStatus      = 0xC0291003\n\tSTATUS_TPM_ACCESS_DENIED                                                  NTStatus      = 0xC0291004\n\tSTATUS_TPM_INSUFFICIENT_BUFFER                                            NTStatus      = 0xC0291005\n\tSTATUS_TPM_PPI_FUNCTION_UNSUPPORTED                                       NTStatus      = 0xC0291006\n\tSTATUS_PCP_ERROR_MASK                                                     NTStatus      = 0xC0292000\n\tSTATUS_PCP_DEVICE_NOT_READY                                               NTStatus      = 0xC0292001\n\tSTATUS_PCP_INVALID_HANDLE                                                 NTStatus      = 0xC0292002\n\tSTATUS_PCP_INVALID_PARAMETER                                              NTStatus      = 0xC0292003\n\tSTATUS_PCP_FLAG_NOT_SUPPORTED                                             NTStatus      = 0xC0292004\n\tSTATUS_PCP_NOT_SUPPORTED                                                  NTStatus      = 0xC0292005\n\tSTATUS_PCP_BUFFER_TOO_SMALL                                               NTStatus      = 0xC0292006\n\tSTATUS_PCP_INTERNAL_ERROR                                                 NTStatus      = 0xC0292007\n\tSTATUS_PCP_AUTHENTICATION_FAILED                                          NTStatus      = 0xC0292008\n\tSTATUS_PCP_AUTHENTICATION_IGNORED                                         NTStatus      = 0xC0292009\n\tSTATUS_PCP_POLICY_NOT_FOUND                                               NTStatus      = 0xC029200A\n\tSTATUS_PCP_PROFILE_NOT_FOUND                                              NTStatus      = 0xC029200B\n\tSTATUS_PCP_VALIDATION_FAILED                                              NTStatus      = 0xC029200C\n\tSTATUS_PCP_DEVICE_NOT_FOUND                                               NTStatus      = 0xC029200D\n\tSTATUS_PCP_WRONG_PARENT                                                   NTStatus      = 0xC029200E\n\tSTATUS_PCP_KEY_NOT_LOADED                                                 NTStatus      = 0xC029200F\n\tSTATUS_PCP_NO_KEY_CERTIFICATION                                           NTStatus      = 0xC0292010\n\tSTATUS_PCP_KEY_NOT_FINALIZED                                              NTStatus      = 0xC0292011\n\tSTATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET                                  NTStatus      = 0xC0292012\n\tSTATUS_PCP_NOT_PCR_BOUND                                                  NTStatus      = 0xC0292013\n\tSTATUS_PCP_KEY_ALREADY_FINALIZED                                          NTStatus      = 0xC0292014\n\tSTATUS_PCP_KEY_USAGE_POLICY_NOT_SUPPORTED                                 NTStatus      = 0xC0292015\n\tSTATUS_PCP_KEY_USAGE_POLICY_INVALID                                       NTStatus      = 0xC0292016\n\tSTATUS_PCP_SOFT_KEY_ERROR                                                 NTStatus      = 0xC0292017\n\tSTATUS_PCP_KEY_NOT_AUTHENTICATED                                          NTStatus      = 0xC0292018\n\tSTATUS_PCP_KEY_NOT_AIK                                                    NTStatus      = 0xC0292019\n\tSTATUS_PCP_KEY_NOT_SIGNING_KEY                                            NTStatus      = 0xC029201A\n\tSTATUS_PCP_LOCKED_OUT                                                     NTStatus      = 0xC029201B\n\tSTATUS_PCP_CLAIM_TYPE_NOT_SUPPORTED                                       NTStatus      = 0xC029201C\n\tSTATUS_PCP_TPM_VERSION_NOT_SUPPORTED                                      NTStatus      = 0xC029201D\n\tSTATUS_PCP_BUFFER_LENGTH_MISMATCH                                         NTStatus      = 0xC029201E\n\tSTATUS_PCP_IFX_RSA_KEY_CREATION_BLOCKED                                   NTStatus      = 0xC029201F\n\tSTATUS_PCP_TICKET_MISSING                                                 NTStatus      = 0xC0292020\n\tSTATUS_PCP_RAW_POLICY_NOT_SUPPORTED                                       NTStatus      = 0xC0292021\n\tSTATUS_PCP_KEY_HANDLE_INVALIDATED                                         NTStatus      = 0xC0292022\n\tSTATUS_PCP_UNSUPPORTED_PSS_SALT                                           NTStatus      = 0x40292023\n\tSTATUS_RTPM_CONTEXT_CONTINUE                                              NTStatus      = 0x00293000\n\tSTATUS_RTPM_CONTEXT_COMPLETE                                              NTStatus      = 0x00293001\n\tSTATUS_RTPM_NO_RESULT                                                     NTStatus      = 0xC0293002\n\tSTATUS_RTPM_PCR_READ_INCOMPLETE                                           NTStatus      = 0xC0293003\n\tSTATUS_RTPM_INVALID_CONTEXT                                               NTStatus      = 0xC0293004\n\tSTATUS_RTPM_UNSUPPORTED_CMD                                               NTStatus      = 0xC0293005\n\tSTATUS_TPM_ZERO_EXHAUST_ENABLED                                           NTStatus      = 0xC0294000\n\tSTATUS_HV_INVALID_HYPERCALL_CODE                                          NTStatus      = 0xC0350002\n\tSTATUS_HV_INVALID_HYPERCALL_INPUT                                         NTStatus      = 0xC0350003\n\tSTATUS_HV_INVALID_ALIGNMENT                                               NTStatus      = 0xC0350004\n\tSTATUS_HV_INVALID_PARAMETER                                               NTStatus      = 0xC0350005\n\tSTATUS_HV_ACCESS_DENIED                                                   NTStatus      = 0xC0350006\n\tSTATUS_HV_INVALID_PARTITION_STATE                                         NTStatus      = 0xC0350007\n\tSTATUS_HV_OPERATION_DENIED                                                NTStatus      = 0xC0350008\n\tSTATUS_HV_UNKNOWN_PROPERTY                                                NTStatus      = 0xC0350009\n\tSTATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE                                     NTStatus      = 0xC035000A\n\tSTATUS_HV_INSUFFICIENT_MEMORY                                             NTStatus      = 0xC035000B\n\tSTATUS_HV_PARTITION_TOO_DEEP                                              NTStatus      = 0xC035000C\n\tSTATUS_HV_INVALID_PARTITION_ID                                            NTStatus      = 0xC035000D\n\tSTATUS_HV_INVALID_VP_INDEX                                                NTStatus      = 0xC035000E\n\tSTATUS_HV_INVALID_PORT_ID                                                 NTStatus      = 0xC0350011\n\tSTATUS_HV_INVALID_CONNECTION_ID                                           NTStatus      = 0xC0350012\n\tSTATUS_HV_INSUFFICIENT_BUFFERS                                            NTStatus      = 0xC0350013\n\tSTATUS_HV_NOT_ACKNOWLEDGED                                                NTStatus      = 0xC0350014\n\tSTATUS_HV_INVALID_VP_STATE                                                NTStatus      = 0xC0350015\n\tSTATUS_HV_ACKNOWLEDGED                                                    NTStatus      = 0xC0350016\n\tSTATUS_HV_INVALID_SAVE_RESTORE_STATE                                      NTStatus      = 0xC0350017\n\tSTATUS_HV_INVALID_SYNIC_STATE                                             NTStatus      = 0xC0350018\n\tSTATUS_HV_OBJECT_IN_USE                                                   NTStatus      = 0xC0350019\n\tSTATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO                                   NTStatus      = 0xC035001A\n\tSTATUS_HV_NO_DATA                                                         NTStatus      = 0xC035001B\n\tSTATUS_HV_INACTIVE                                                        NTStatus      = 0xC035001C\n\tSTATUS_HV_NO_RESOURCES                                                    NTStatus      = 0xC035001D\n\tSTATUS_HV_FEATURE_UNAVAILABLE                                             NTStatus      = 0xC035001E\n\tSTATUS_HV_INSUFFICIENT_BUFFER                                             NTStatus      = 0xC0350033\n\tSTATUS_HV_INSUFFICIENT_DEVICE_DOMAINS                                     NTStatus      = 0xC0350038\n\tSTATUS_HV_CPUID_FEATURE_VALIDATION_ERROR                                  NTStatus      = 0xC035003C\n\tSTATUS_HV_CPUID_XSAVE_FEATURE_VALIDATION_ERROR                            NTStatus      = 0xC035003D\n\tSTATUS_HV_PROCESSOR_STARTUP_TIMEOUT                                       NTStatus      = 0xC035003E\n\tSTATUS_HV_SMX_ENABLED                                                     NTStatus      = 0xC035003F\n\tSTATUS_HV_INVALID_LP_INDEX                                                NTStatus      = 0xC0350041\n\tSTATUS_HV_INVALID_REGISTER_VALUE                                          NTStatus      = 0xC0350050\n\tSTATUS_HV_INVALID_VTL_STATE                                               NTStatus      = 0xC0350051\n\tSTATUS_HV_NX_NOT_DETECTED                                                 NTStatus      = 0xC0350055\n\tSTATUS_HV_INVALID_DEVICE_ID                                               NTStatus      = 0xC0350057\n\tSTATUS_HV_INVALID_DEVICE_STATE                                            NTStatus      = 0xC0350058\n\tSTATUS_HV_PENDING_PAGE_REQUESTS                                           NTStatus      = 0x00350059\n\tSTATUS_HV_PAGE_REQUEST_INVALID                                            NTStatus      = 0xC0350060\n\tSTATUS_HV_INVALID_CPU_GROUP_ID                                            NTStatus      = 0xC035006F\n\tSTATUS_HV_INVALID_CPU_GROUP_STATE                                         NTStatus      = 0xC0350070\n\tSTATUS_HV_OPERATION_FAILED                                                NTStatus      = 0xC0350071\n\tSTATUS_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE                             NTStatus      = 0xC0350072\n\tSTATUS_HV_INSUFFICIENT_ROOT_MEMORY                                        NTStatus      = 0xC0350073\n\tSTATUS_HV_NOT_PRESENT                                                     NTStatus      = 0xC0351000\n\tSTATUS_VID_DUPLICATE_HANDLER                                              NTStatus      = 0xC0370001\n\tSTATUS_VID_TOO_MANY_HANDLERS                                              NTStatus      = 0xC0370002\n\tSTATUS_VID_QUEUE_FULL                                                     NTStatus      = 0xC0370003\n\tSTATUS_VID_HANDLER_NOT_PRESENT                                            NTStatus      = 0xC0370004\n\tSTATUS_VID_INVALID_OBJECT_NAME                                            NTStatus      = 0xC0370005\n\tSTATUS_VID_PARTITION_NAME_TOO_LONG                                        NTStatus      = 0xC0370006\n\tSTATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG                                    NTStatus      = 0xC0370007\n\tSTATUS_VID_PARTITION_ALREADY_EXISTS                                       NTStatus      = 0xC0370008\n\tSTATUS_VID_PARTITION_DOES_NOT_EXIST                                       NTStatus      = 0xC0370009\n\tSTATUS_VID_PARTITION_NAME_NOT_FOUND                                       NTStatus      = 0xC037000A\n\tSTATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS                                   NTStatus      = 0xC037000B\n\tSTATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT                                   NTStatus      = 0xC037000C\n\tSTATUS_VID_MB_STILL_REFERENCED                                            NTStatus      = 0xC037000D\n\tSTATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED                                   NTStatus      = 0xC037000E\n\tSTATUS_VID_INVALID_NUMA_SETTINGS                                          NTStatus      = 0xC037000F\n\tSTATUS_VID_INVALID_NUMA_NODE_INDEX                                        NTStatus      = 0xC0370010\n\tSTATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED                          NTStatus      = 0xC0370011\n\tSTATUS_VID_INVALID_MEMORY_BLOCK_HANDLE                                    NTStatus      = 0xC0370012\n\tSTATUS_VID_PAGE_RANGE_OVERFLOW                                            NTStatus      = 0xC0370013\n\tSTATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE                                   NTStatus      = 0xC0370014\n\tSTATUS_VID_INVALID_GPA_RANGE_HANDLE                                       NTStatus      = 0xC0370015\n\tSTATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE                             NTStatus      = 0xC0370016\n\tSTATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED                               NTStatus      = 0xC0370017\n\tSTATUS_VID_INVALID_PPM_HANDLE                                             NTStatus      = 0xC0370018\n\tSTATUS_VID_MBPS_ARE_LOCKED                                                NTStatus      = 0xC0370019\n\tSTATUS_VID_MESSAGE_QUEUE_CLOSED                                           NTStatus      = 0xC037001A\n\tSTATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED                               NTStatus      = 0xC037001B\n\tSTATUS_VID_STOP_PENDING                                                   NTStatus      = 0xC037001C\n\tSTATUS_VID_INVALID_PROCESSOR_STATE                                        NTStatus      = 0xC037001D\n\tSTATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT                                NTStatus      = 0xC037001E\n\tSTATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED                               NTStatus      = 0xC037001F\n\tSTATUS_VID_MB_PROPERTY_ALREADY_SET_RESET                                  NTStatus      = 0xC0370020\n\tSTATUS_VID_MMIO_RANGE_DESTROYED                                           NTStatus      = 0xC0370021\n\tSTATUS_VID_INVALID_CHILD_GPA_PAGE_SET                                     NTStatus      = 0xC0370022\n\tSTATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED                                 NTStatus      = 0xC0370023\n\tSTATUS_VID_RESERVE_PAGE_SET_TOO_SMALL                                     NTStatus      = 0xC0370024\n\tSTATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE                         NTStatus      = 0xC0370025\n\tSTATUS_VID_MBP_COUNT_EXCEEDED_LIMIT                                       NTStatus      = 0xC0370026\n\tSTATUS_VID_SAVED_STATE_CORRUPT                                            NTStatus      = 0xC0370027\n\tSTATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM                                  NTStatus      = 0xC0370028\n\tSTATUS_VID_SAVED_STATE_INCOMPATIBLE                                       NTStatus      = 0xC0370029\n\tSTATUS_VID_VTL_ACCESS_DENIED                                              NTStatus      = 0xC037002A\n\tSTATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED                              NTStatus      = 0x80370001\n\tSTATUS_IPSEC_BAD_SPI                                                      NTStatus      = 0xC0360001\n\tSTATUS_IPSEC_SA_LIFETIME_EXPIRED                                          NTStatus      = 0xC0360002\n\tSTATUS_IPSEC_WRONG_SA                                                     NTStatus      = 0xC0360003\n\tSTATUS_IPSEC_REPLAY_CHECK_FAILED                                          NTStatus      = 0xC0360004\n\tSTATUS_IPSEC_INVALID_PACKET                                               NTStatus      = 0xC0360005\n\tSTATUS_IPSEC_INTEGRITY_CHECK_FAILED                                       NTStatus      = 0xC0360006\n\tSTATUS_IPSEC_CLEAR_TEXT_DROP                                              NTStatus      = 0xC0360007\n\tSTATUS_IPSEC_AUTH_FIREWALL_DROP                                           NTStatus      = 0xC0360008\n\tSTATUS_IPSEC_THROTTLE_DROP                                                NTStatus      = 0xC0360009\n\tSTATUS_IPSEC_DOSP_BLOCK                                                   NTStatus      = 0xC0368000\n\tSTATUS_IPSEC_DOSP_RECEIVED_MULTICAST                                      NTStatus      = 0xC0368001\n\tSTATUS_IPSEC_DOSP_INVALID_PACKET                                          NTStatus      = 0xC0368002\n\tSTATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED                                     NTStatus      = 0xC0368003\n\tSTATUS_IPSEC_DOSP_MAX_ENTRIES                                             NTStatus      = 0xC0368004\n\tSTATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED                                      NTStatus      = 0xC0368005\n\tSTATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES                             NTStatus      = 0xC0368006\n\tSTATUS_VOLMGR_INCOMPLETE_REGENERATION                                     NTStatus      = 0x80380001\n\tSTATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION                                   NTStatus      = 0x80380002\n\tSTATUS_VOLMGR_DATABASE_FULL                                               NTStatus      = 0xC0380001\n\tSTATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED                                NTStatus      = 0xC0380002\n\tSTATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC                              NTStatus      = 0xC0380003\n\tSTATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED                                   NTStatus      = 0xC0380004\n\tSTATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME                             NTStatus      = 0xC0380005\n\tSTATUS_VOLMGR_DISK_DUPLICATE                                              NTStatus      = 0xC0380006\n\tSTATUS_VOLMGR_DISK_DYNAMIC                                                NTStatus      = 0xC0380007\n\tSTATUS_VOLMGR_DISK_ID_INVALID                                             NTStatus      = 0xC0380008\n\tSTATUS_VOLMGR_DISK_INVALID                                                NTStatus      = 0xC0380009\n\tSTATUS_VOLMGR_DISK_LAST_VOTER                                             NTStatus      = 0xC038000A\n\tSTATUS_VOLMGR_DISK_LAYOUT_INVALID                                         NTStatus      = 0xC038000B\n\tSTATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS              NTStatus      = 0xC038000C\n\tSTATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED                            NTStatus      = 0xC038000D\n\tSTATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL                            NTStatus      = 0xC038000E\n\tSTATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS              NTStatus      = 0xC038000F\n\tSTATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS                             NTStatus      = 0xC0380010\n\tSTATUS_VOLMGR_DISK_MISSING                                                NTStatus      = 0xC0380011\n\tSTATUS_VOLMGR_DISK_NOT_EMPTY                                              NTStatus      = 0xC0380012\n\tSTATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE                                       NTStatus      = 0xC0380013\n\tSTATUS_VOLMGR_DISK_REVECTORING_FAILED                                     NTStatus      = 0xC0380014\n\tSTATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID                                    NTStatus      = 0xC0380015\n\tSTATUS_VOLMGR_DISK_SET_NOT_CONTAINED                                      NTStatus      = 0xC0380016\n\tSTATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS                               NTStatus      = 0xC0380017\n\tSTATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES                                NTStatus      = 0xC0380018\n\tSTATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED                                  NTStatus      = 0xC0380019\n\tSTATUS_VOLMGR_EXTENT_ALREADY_USED                                         NTStatus      = 0xC038001A\n\tSTATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS                                       NTStatus      = 0xC038001B\n\tSTATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION                                 NTStatus      = 0xC038001C\n\tSTATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED                                   NTStatus      = 0xC038001D\n\tSTATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION                               NTStatus      = 0xC038001E\n\tSTATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH                          NTStatus      = 0xC038001F\n\tSTATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED                                NTStatus      = 0xC0380020\n\tSTATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID                                   NTStatus      = 0xC0380021\n\tSTATUS_VOLMGR_MAXIMUM_REGISTERED_USERS                                    NTStatus      = 0xC0380022\n\tSTATUS_VOLMGR_MEMBER_IN_SYNC                                              NTStatus      = 0xC0380023\n\tSTATUS_VOLMGR_MEMBER_INDEX_DUPLICATE                                      NTStatus      = 0xC0380024\n\tSTATUS_VOLMGR_MEMBER_INDEX_INVALID                                        NTStatus      = 0xC0380025\n\tSTATUS_VOLMGR_MEMBER_MISSING                                              NTStatus      = 0xC0380026\n\tSTATUS_VOLMGR_MEMBER_NOT_DETACHED                                         NTStatus      = 0xC0380027\n\tSTATUS_VOLMGR_MEMBER_REGENERATING                                         NTStatus      = 0xC0380028\n\tSTATUS_VOLMGR_ALL_DISKS_FAILED                                            NTStatus      = 0xC0380029\n\tSTATUS_VOLMGR_NO_REGISTERED_USERS                                         NTStatus      = 0xC038002A\n\tSTATUS_VOLMGR_NO_SUCH_USER                                                NTStatus      = 0xC038002B\n\tSTATUS_VOLMGR_NOTIFICATION_RESET                                          NTStatus      = 0xC038002C\n\tSTATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID                                   NTStatus      = 0xC038002D\n\tSTATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID                                    NTStatus      = 0xC038002E\n\tSTATUS_VOLMGR_PACK_DUPLICATE                                              NTStatus      = 0xC038002F\n\tSTATUS_VOLMGR_PACK_ID_INVALID                                             NTStatus      = 0xC0380030\n\tSTATUS_VOLMGR_PACK_INVALID                                                NTStatus      = 0xC0380031\n\tSTATUS_VOLMGR_PACK_NAME_INVALID                                           NTStatus      = 0xC0380032\n\tSTATUS_VOLMGR_PACK_OFFLINE                                                NTStatus      = 0xC0380033\n\tSTATUS_VOLMGR_PACK_HAS_QUORUM                                             NTStatus      = 0xC0380034\n\tSTATUS_VOLMGR_PACK_WITHOUT_QUORUM                                         NTStatus      = 0xC0380035\n\tSTATUS_VOLMGR_PARTITION_STYLE_INVALID                                     NTStatus      = 0xC0380036\n\tSTATUS_VOLMGR_PARTITION_UPDATE_FAILED                                     NTStatus      = 0xC0380037\n\tSTATUS_VOLMGR_PLEX_IN_SYNC                                                NTStatus      = 0xC0380038\n\tSTATUS_VOLMGR_PLEX_INDEX_DUPLICATE                                        NTStatus      = 0xC0380039\n\tSTATUS_VOLMGR_PLEX_INDEX_INVALID                                          NTStatus      = 0xC038003A\n\tSTATUS_VOLMGR_PLEX_LAST_ACTIVE                                            NTStatus      = 0xC038003B\n\tSTATUS_VOLMGR_PLEX_MISSING                                                NTStatus      = 0xC038003C\n\tSTATUS_VOLMGR_PLEX_REGENERATING                                           NTStatus      = 0xC038003D\n\tSTATUS_VOLMGR_PLEX_TYPE_INVALID                                           NTStatus      = 0xC038003E\n\tSTATUS_VOLMGR_PLEX_NOT_RAID5                                              NTStatus      = 0xC038003F\n\tSTATUS_VOLMGR_PLEX_NOT_SIMPLE                                             NTStatus      = 0xC0380040\n\tSTATUS_VOLMGR_STRUCTURE_SIZE_INVALID                                      NTStatus      = 0xC0380041\n\tSTATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS                              NTStatus      = 0xC0380042\n\tSTATUS_VOLMGR_TRANSACTION_IN_PROGRESS                                     NTStatus      = 0xC0380043\n\tSTATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE                               NTStatus      = 0xC0380044\n\tSTATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK                                NTStatus      = 0xC0380045\n\tSTATUS_VOLMGR_VOLUME_ID_INVALID                                           NTStatus      = 0xC0380046\n\tSTATUS_VOLMGR_VOLUME_LENGTH_INVALID                                       NTStatus      = 0xC0380047\n\tSTATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE                      NTStatus      = 0xC0380048\n\tSTATUS_VOLMGR_VOLUME_NOT_MIRRORED                                         NTStatus      = 0xC0380049\n\tSTATUS_VOLMGR_VOLUME_NOT_RETAINED                                         NTStatus      = 0xC038004A\n\tSTATUS_VOLMGR_VOLUME_OFFLINE                                              NTStatus      = 0xC038004B\n\tSTATUS_VOLMGR_VOLUME_RETAINED                                             NTStatus      = 0xC038004C\n\tSTATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID                                   NTStatus      = 0xC038004D\n\tSTATUS_VOLMGR_DIFFERENT_SECTOR_SIZE                                       NTStatus      = 0xC038004E\n\tSTATUS_VOLMGR_BAD_BOOT_DISK                                               NTStatus      = 0xC038004F\n\tSTATUS_VOLMGR_PACK_CONFIG_OFFLINE                                         NTStatus      = 0xC0380050\n\tSTATUS_VOLMGR_PACK_CONFIG_ONLINE                                          NTStatus      = 0xC0380051\n\tSTATUS_VOLMGR_NOT_PRIMARY_PACK                                            NTStatus      = 0xC0380052\n\tSTATUS_VOLMGR_PACK_LOG_UPDATE_FAILED                                      NTStatus      = 0xC0380053\n\tSTATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID                             NTStatus      = 0xC0380054\n\tSTATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID                           NTStatus      = 0xC0380055\n\tSTATUS_VOLMGR_VOLUME_MIRRORED                                             NTStatus      = 0xC0380056\n\tSTATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED                                     NTStatus      = 0xC0380057\n\tSTATUS_VOLMGR_NO_VALID_LOG_COPIES                                         NTStatus      = 0xC0380058\n\tSTATUS_VOLMGR_PRIMARY_PACK_PRESENT                                        NTStatus      = 0xC0380059\n\tSTATUS_VOLMGR_NUMBER_OF_DISKS_INVALID                                     NTStatus      = 0xC038005A\n\tSTATUS_VOLMGR_MIRROR_NOT_SUPPORTED                                        NTStatus      = 0xC038005B\n\tSTATUS_VOLMGR_RAID5_NOT_SUPPORTED                                         NTStatus      = 0xC038005C\n\tSTATUS_BCD_NOT_ALL_ENTRIES_IMPORTED                                       NTStatus      = 0x80390001\n\tSTATUS_BCD_TOO_MANY_ELEMENTS                                              NTStatus      = 0xC0390002\n\tSTATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED                                   NTStatus      = 0x80390003\n\tSTATUS_VHD_DRIVE_FOOTER_MISSING                                           NTStatus      = 0xC03A0001\n\tSTATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH                                 NTStatus      = 0xC03A0002\n\tSTATUS_VHD_DRIVE_FOOTER_CORRUPT                                           NTStatus      = 0xC03A0003\n\tSTATUS_VHD_FORMAT_UNKNOWN                                                 NTStatus      = 0xC03A0004\n\tSTATUS_VHD_FORMAT_UNSUPPORTED_VERSION                                     NTStatus      = 0xC03A0005\n\tSTATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH                                NTStatus      = 0xC03A0006\n\tSTATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION                              NTStatus      = 0xC03A0007\n\tSTATUS_VHD_SPARSE_HEADER_CORRUPT                                          NTStatus      = 0xC03A0008\n\tSTATUS_VHD_BLOCK_ALLOCATION_FAILURE                                       NTStatus      = 0xC03A0009\n\tSTATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT                                 NTStatus      = 0xC03A000A\n\tSTATUS_VHD_INVALID_BLOCK_SIZE                                             NTStatus      = 0xC03A000B\n\tSTATUS_VHD_BITMAP_MISMATCH                                                NTStatus      = 0xC03A000C\n\tSTATUS_VHD_PARENT_VHD_NOT_FOUND                                           NTStatus      = 0xC03A000D\n\tSTATUS_VHD_CHILD_PARENT_ID_MISMATCH                                       NTStatus      = 0xC03A000E\n\tSTATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH                                NTStatus      = 0xC03A000F\n\tSTATUS_VHD_METADATA_READ_FAILURE                                          NTStatus      = 0xC03A0010\n\tSTATUS_VHD_METADATA_WRITE_FAILURE                                         NTStatus      = 0xC03A0011\n\tSTATUS_VHD_INVALID_SIZE                                                   NTStatus      = 0xC03A0012\n\tSTATUS_VHD_INVALID_FILE_SIZE                                              NTStatus      = 0xC03A0013\n\tSTATUS_VIRTDISK_PROVIDER_NOT_FOUND                                        NTStatus      = 0xC03A0014\n\tSTATUS_VIRTDISK_NOT_VIRTUAL_DISK                                          NTStatus      = 0xC03A0015\n\tSTATUS_VHD_PARENT_VHD_ACCESS_DENIED                                       NTStatus      = 0xC03A0016\n\tSTATUS_VHD_CHILD_PARENT_SIZE_MISMATCH                                     NTStatus      = 0xC03A0017\n\tSTATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED                              NTStatus      = 0xC03A0018\n\tSTATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT                             NTStatus      = 0xC03A0019\n\tSTATUS_VIRTUAL_DISK_LIMITATION                                            NTStatus      = 0xC03A001A\n\tSTATUS_VHD_INVALID_TYPE                                                   NTStatus      = 0xC03A001B\n\tSTATUS_VHD_INVALID_STATE                                                  NTStatus      = 0xC03A001C\n\tSTATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE                              NTStatus      = 0xC03A001D\n\tSTATUS_VIRTDISK_DISK_ALREADY_OWNED                                        NTStatus      = 0xC03A001E\n\tSTATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE                                  NTStatus      = 0xC03A001F\n\tSTATUS_CTLOG_TRACKING_NOT_INITIALIZED                                     NTStatus      = 0xC03A0020\n\tSTATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE                                NTStatus      = 0xC03A0021\n\tSTATUS_CTLOG_VHD_CHANGED_OFFLINE                                          NTStatus      = 0xC03A0022\n\tSTATUS_CTLOG_INVALID_TRACKING_STATE                                       NTStatus      = 0xC03A0023\n\tSTATUS_CTLOG_INCONSISTENT_TRACKING_FILE                                   NTStatus      = 0xC03A0024\n\tSTATUS_VHD_METADATA_FULL                                                  NTStatus      = 0xC03A0028\n\tSTATUS_VHD_INVALID_CHANGE_TRACKING_ID                                     NTStatus      = 0xC03A0029\n\tSTATUS_VHD_CHANGE_TRACKING_DISABLED                                       NTStatus      = 0xC03A002A\n\tSTATUS_VHD_MISSING_CHANGE_TRACKING_INFORMATION                            NTStatus      = 0xC03A0030\n\tSTATUS_VHD_RESIZE_WOULD_TRUNCATE_DATA                                     NTStatus      = 0xC03A0031\n\tSTATUS_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE                         NTStatus      = 0xC03A0032\n\tSTATUS_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE                       NTStatus      = 0xC03A0033\n\tSTATUS_QUERY_STORAGE_ERROR                                                NTStatus      = 0x803A0001\n\tSTATUS_GDI_HANDLE_LEAK                                                    NTStatus      = 0x803F0001\n\tSTATUS_RKF_KEY_NOT_FOUND                                                  NTStatus      = 0xC0400001\n\tSTATUS_RKF_DUPLICATE_KEY                                                  NTStatus      = 0xC0400002\n\tSTATUS_RKF_BLOB_FULL                                                      NTStatus      = 0xC0400003\n\tSTATUS_RKF_STORE_FULL                                                     NTStatus      = 0xC0400004\n\tSTATUS_RKF_FILE_BLOCKED                                                   NTStatus      = 0xC0400005\n\tSTATUS_RKF_ACTIVE_KEY                                                     NTStatus      = 0xC0400006\n\tSTATUS_RDBSS_RESTART_OPERATION                                            NTStatus      = 0xC0410001\n\tSTATUS_RDBSS_CONTINUE_OPERATION                                           NTStatus      = 0xC0410002\n\tSTATUS_RDBSS_POST_OPERATION                                               NTStatus      = 0xC0410003\n\tSTATUS_RDBSS_RETRY_LOOKUP                                                 NTStatus      = 0xC0410004\n\tSTATUS_BTH_ATT_INVALID_HANDLE                                             NTStatus      = 0xC0420001\n\tSTATUS_BTH_ATT_READ_NOT_PERMITTED                                         NTStatus      = 0xC0420002\n\tSTATUS_BTH_ATT_WRITE_NOT_PERMITTED                                        NTStatus      = 0xC0420003\n\tSTATUS_BTH_ATT_INVALID_PDU                                                NTStatus      = 0xC0420004\n\tSTATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION                                NTStatus      = 0xC0420005\n\tSTATUS_BTH_ATT_REQUEST_NOT_SUPPORTED                                      NTStatus      = 0xC0420006\n\tSTATUS_BTH_ATT_INVALID_OFFSET                                             NTStatus      = 0xC0420007\n\tSTATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION                                 NTStatus      = 0xC0420008\n\tSTATUS_BTH_ATT_PREPARE_QUEUE_FULL                                         NTStatus      = 0xC0420009\n\tSTATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND                                        NTStatus      = 0xC042000A\n\tSTATUS_BTH_ATT_ATTRIBUTE_NOT_LONG                                         NTStatus      = 0xC042000B\n\tSTATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE                           NTStatus      = 0xC042000C\n\tSTATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH                             NTStatus      = 0xC042000D\n\tSTATUS_BTH_ATT_UNLIKELY                                                   NTStatus      = 0xC042000E\n\tSTATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION                                    NTStatus      = 0xC042000F\n\tSTATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE                                     NTStatus      = 0xC0420010\n\tSTATUS_BTH_ATT_INSUFFICIENT_RESOURCES                                     NTStatus      = 0xC0420011\n\tSTATUS_BTH_ATT_UNKNOWN_ERROR                                              NTStatus      = 0xC0421000\n\tSTATUS_SECUREBOOT_ROLLBACK_DETECTED                                       NTStatus      = 0xC0430001\n\tSTATUS_SECUREBOOT_POLICY_VIOLATION                                        NTStatus      = 0xC0430002\n\tSTATUS_SECUREBOOT_INVALID_POLICY                                          NTStatus      = 0xC0430003\n\tSTATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND                              NTStatus      = 0xC0430004\n\tSTATUS_SECUREBOOT_POLICY_NOT_SIGNED                                       NTStatus      = 0xC0430005\n\tSTATUS_SECUREBOOT_NOT_ENABLED                                             NTStatus      = 0x80430006\n\tSTATUS_SECUREBOOT_FILE_REPLACED                                           NTStatus      = 0xC0430007\n\tSTATUS_SECUREBOOT_POLICY_NOT_AUTHORIZED                                   NTStatus      = 0xC0430008\n\tSTATUS_SECUREBOOT_POLICY_UNKNOWN                                          NTStatus      = 0xC0430009\n\tSTATUS_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION                      NTStatus      = 0xC043000A\n\tSTATUS_SECUREBOOT_PLATFORM_ID_MISMATCH                                    NTStatus      = 0xC043000B\n\tSTATUS_SECUREBOOT_POLICY_ROLLBACK_DETECTED                                NTStatus      = 0xC043000C\n\tSTATUS_SECUREBOOT_POLICY_UPGRADE_MISMATCH                                 NTStatus      = 0xC043000D\n\tSTATUS_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING                            NTStatus      = 0xC043000E\n\tSTATUS_SECUREBOOT_NOT_BASE_POLICY                                         NTStatus      = 0xC043000F\n\tSTATUS_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY                                 NTStatus      = 0xC0430010\n\tSTATUS_PLATFORM_MANIFEST_NOT_AUTHORIZED                                   NTStatus      = 0xC0EB0001\n\tSTATUS_PLATFORM_MANIFEST_INVALID                                          NTStatus      = 0xC0EB0002\n\tSTATUS_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED                              NTStatus      = 0xC0EB0003\n\tSTATUS_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED                           NTStatus      = 0xC0EB0004\n\tSTATUS_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND                              NTStatus      = 0xC0EB0005\n\tSTATUS_PLATFORM_MANIFEST_NOT_ACTIVE                                       NTStatus      = 0xC0EB0006\n\tSTATUS_PLATFORM_MANIFEST_NOT_SIGNED                                       NTStatus      = 0xC0EB0007\n\tSTATUS_SYSTEM_INTEGRITY_ROLLBACK_DETECTED                                 NTStatus      = 0xC0E90001\n\tSTATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION                                  NTStatus      = 0xC0E90002\n\tSTATUS_SYSTEM_INTEGRITY_INVALID_POLICY                                    NTStatus      = 0xC0E90003\n\tSTATUS_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED                                 NTStatus      = 0xC0E90004\n\tSTATUS_SYSTEM_INTEGRITY_TOO_MANY_POLICIES                                 NTStatus      = 0xC0E90005\n\tSTATUS_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED                NTStatus      = 0xC0E90006\n\tSTATUS_NO_APPLICABLE_APP_LICENSES_FOUND                                   NTStatus      = 0xC0EA0001\n\tSTATUS_CLIP_LICENSE_NOT_FOUND                                             NTStatus      = 0xC0EA0002\n\tSTATUS_CLIP_DEVICE_LICENSE_MISSING                                        NTStatus      = 0xC0EA0003\n\tSTATUS_CLIP_LICENSE_INVALID_SIGNATURE                                     NTStatus      = 0xC0EA0004\n\tSTATUS_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID                          NTStatus      = 0xC0EA0005\n\tSTATUS_CLIP_LICENSE_EXPIRED                                               NTStatus      = 0xC0EA0006\n\tSTATUS_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE                              NTStatus      = 0xC0EA0007\n\tSTATUS_CLIP_LICENSE_NOT_SIGNED                                            NTStatus      = 0xC0EA0008\n\tSTATUS_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE                          NTStatus      = 0xC0EA0009\n\tSTATUS_CLIP_LICENSE_DEVICE_ID_MISMATCH                                    NTStatus      = 0xC0EA000A\n\tSTATUS_AUDIO_ENGINE_NODE_NOT_FOUND                                        NTStatus      = 0xC0440001\n\tSTATUS_HDAUDIO_EMPTY_CONNECTION_LIST                                      NTStatus      = 0xC0440002\n\tSTATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED                              NTStatus      = 0xC0440003\n\tSTATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED                                 NTStatus      = 0xC0440004\n\tSTATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY                                     NTStatus      = 0xC0440005\n\tSTATUS_SPACES_REPAIRED                                                    NTStatus      = 0x00E70000\n\tSTATUS_SPACES_PAUSE                                                       NTStatus      = 0x00E70001\n\tSTATUS_SPACES_COMPLETE                                                    NTStatus      = 0x00E70002\n\tSTATUS_SPACES_REDIRECT                                                    NTStatus      = 0x00E70003\n\tSTATUS_SPACES_FAULT_DOMAIN_TYPE_INVALID                                   NTStatus      = 0xC0E70001\n\tSTATUS_SPACES_RESILIENCY_TYPE_INVALID                                     NTStatus      = 0xC0E70003\n\tSTATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID                                   NTStatus      = 0xC0E70004\n\tSTATUS_SPACES_DRIVE_REDUNDANCY_INVALID                                    NTStatus      = 0xC0E70006\n\tSTATUS_SPACES_NUMBER_OF_DATA_COPIES_INVALID                               NTStatus      = 0xC0E70007\n\tSTATUS_SPACES_INTERLEAVE_LENGTH_INVALID                                   NTStatus      = 0xC0E70009\n\tSTATUS_SPACES_NUMBER_OF_COLUMNS_INVALID                                   NTStatus      = 0xC0E7000A\n\tSTATUS_SPACES_NOT_ENOUGH_DRIVES                                           NTStatus      = 0xC0E7000B\n\tSTATUS_SPACES_EXTENDED_ERROR                                              NTStatus      = 0xC0E7000C\n\tSTATUS_SPACES_PROVISIONING_TYPE_INVALID                                   NTStatus      = 0xC0E7000D\n\tSTATUS_SPACES_ALLOCATION_SIZE_INVALID                                     NTStatus      = 0xC0E7000E\n\tSTATUS_SPACES_ENCLOSURE_AWARE_INVALID                                     NTStatus      = 0xC0E7000F\n\tSTATUS_SPACES_WRITE_CACHE_SIZE_INVALID                                    NTStatus      = 0xC0E70010\n\tSTATUS_SPACES_NUMBER_OF_GROUPS_INVALID                                    NTStatus      = 0xC0E70011\n\tSTATUS_SPACES_DRIVE_OPERATIONAL_STATE_INVALID                             NTStatus      = 0xC0E70012\n\tSTATUS_SPACES_UPDATE_COLUMN_STATE                                         NTStatus      = 0xC0E70013\n\tSTATUS_SPACES_MAP_REQUIRED                                                NTStatus      = 0xC0E70014\n\tSTATUS_SPACES_UNSUPPORTED_VERSION                                         NTStatus      = 0xC0E70015\n\tSTATUS_SPACES_CORRUPT_METADATA                                            NTStatus      = 0xC0E70016\n\tSTATUS_SPACES_DRT_FULL                                                    NTStatus      = 0xC0E70017\n\tSTATUS_SPACES_INCONSISTENCY                                               NTStatus      = 0xC0E70018\n\tSTATUS_SPACES_LOG_NOT_READY                                               NTStatus      = 0xC0E70019\n\tSTATUS_SPACES_NO_REDUNDANCY                                               NTStatus      = 0xC0E7001A\n\tSTATUS_SPACES_DRIVE_NOT_READY                                             NTStatus      = 0xC0E7001B\n\tSTATUS_SPACES_DRIVE_SPLIT                                                 NTStatus      = 0xC0E7001C\n\tSTATUS_SPACES_DRIVE_LOST_DATA                                             NTStatus      = 0xC0E7001D\n\tSTATUS_SPACES_ENTRY_INCOMPLETE                                            NTStatus      = 0xC0E7001E\n\tSTATUS_SPACES_ENTRY_INVALID                                               NTStatus      = 0xC0E7001F\n\tSTATUS_SPACES_MARK_DIRTY                                                  NTStatus      = 0xC0E70020\n\tSTATUS_VOLSNAP_BOOTFILE_NOT_VALID                                         NTStatus      = 0xC0500003\n\tSTATUS_VOLSNAP_ACTIVATION_TIMEOUT                                         NTStatus      = 0xC0500004\n\tSTATUS_IO_PREEMPTED                                                       NTStatus      = 0xC0510001\n\tSTATUS_SVHDX_ERROR_STORED                                                 NTStatus      = 0xC05C0000\n\tSTATUS_SVHDX_ERROR_NOT_AVAILABLE                                          NTStatus      = 0xC05CFF00\n\tSTATUS_SVHDX_UNIT_ATTENTION_AVAILABLE                                     NTStatus      = 0xC05CFF01\n\tSTATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED                         NTStatus      = 0xC05CFF02\n\tSTATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED                        NTStatus      = 0xC05CFF03\n\tSTATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED                         NTStatus      = 0xC05CFF04\n\tSTATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED                       NTStatus      = 0xC05CFF05\n\tSTATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED                  NTStatus      = 0xC05CFF06\n\tSTATUS_SVHDX_RESERVATION_CONFLICT                                         NTStatus      = 0xC05CFF07\n\tSTATUS_SVHDX_WRONG_FILE_TYPE                                              NTStatus      = 0xC05CFF08\n\tSTATUS_SVHDX_VERSION_MISMATCH                                             NTStatus      = 0xC05CFF09\n\tSTATUS_VHD_SHARED                                                         NTStatus      = 0xC05CFF0A\n\tSTATUS_SVHDX_NO_INITIATOR                                                 NTStatus      = 0xC05CFF0B\n\tSTATUS_VHDSET_BACKING_STORAGE_NOT_FOUND                                   NTStatus      = 0xC05CFF0C\n\tSTATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP                              NTStatus      = 0xC05D0000\n\tSTATUS_SMB_BAD_CLUSTER_DIALECT                                            NTStatus      = 0xC05D0001\n\tSTATUS_SMB_GUEST_LOGON_BLOCKED                                            NTStatus      = 0xC05D0002\n\tSTATUS_SECCORE_INVALID_COMMAND                                            NTStatus      = 0xC0E80000\n\tSTATUS_VSM_NOT_INITIALIZED                                                NTStatus      = 0xC0450000\n\tSTATUS_VSM_DMA_PROTECTION_NOT_IN_USE                                      NTStatus      = 0xC0450001\n\tSTATUS_APPEXEC_CONDITION_NOT_SATISFIED                                    NTStatus      = 0xC0EC0000\n\tSTATUS_APPEXEC_HANDLE_INVALIDATED                                         NTStatus      = 0xC0EC0001\n\tSTATUS_APPEXEC_INVALID_HOST_GENERATION                                    NTStatus      = 0xC0EC0002\n\tSTATUS_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION                            NTStatus      = 0xC0EC0003\n\tSTATUS_APPEXEC_INVALID_HOST_STATE                                         NTStatus      = 0xC0EC0004\n\tSTATUS_APPEXEC_NO_DONOR                                                   NTStatus      = 0xC0EC0005\n\tSTATUS_APPEXEC_HOST_ID_MISMATCH                                           NTStatus      = 0xC0EC0006\n\tSTATUS_APPEXEC_UNKNOWN_USER                                               NTStatus      = 0xC0EC0007\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/zknownfolderids_windows.go",
    "content": "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT.\n\npackage windows\n\ntype KNOWNFOLDERID GUID\n\nvar (\n\tFOLDERID_NetworkFolder          = &KNOWNFOLDERID{0xd20beec4, 0x5ca8, 0x4905, [8]byte{0xae, 0x3b, 0xbf, 0x25, 0x1e, 0xa0, 0x9b, 0x53}}\n\tFOLDERID_ComputerFolder         = &KNOWNFOLDERID{0x0ac0837c, 0xbbf8, 0x452a, [8]byte{0x85, 0x0d, 0x79, 0xd0, 0x8e, 0x66, 0x7c, 0xa7}}\n\tFOLDERID_InternetFolder         = &KNOWNFOLDERID{0x4d9f7874, 0x4e0c, 0x4904, [8]byte{0x96, 0x7b, 0x40, 0xb0, 0xd2, 0x0c, 0x3e, 0x4b}}\n\tFOLDERID_ControlPanelFolder     = &KNOWNFOLDERID{0x82a74aeb, 0xaeb4, 0x465c, [8]byte{0xa0, 0x14, 0xd0, 0x97, 0xee, 0x34, 0x6d, 0x63}}\n\tFOLDERID_PrintersFolder         = &KNOWNFOLDERID{0x76fc4e2d, 0xd6ad, 0x4519, [8]byte{0xa6, 0x63, 0x37, 0xbd, 0x56, 0x06, 0x81, 0x85}}\n\tFOLDERID_SyncManagerFolder      = &KNOWNFOLDERID{0x43668bf8, 0xc14e, 0x49b2, [8]byte{0x97, 0xc9, 0x74, 0x77, 0x84, 0xd7, 0x84, 0xb7}}\n\tFOLDERID_SyncSetupFolder        = &KNOWNFOLDERID{0x0f214138, 0xb1d3, 0x4a90, [8]byte{0xbb, 0xa9, 0x27, 0xcb, 0xc0, 0xc5, 0x38, 0x9a}}\n\tFOLDERID_ConflictFolder         = &KNOWNFOLDERID{0x4bfefb45, 0x347d, 0x4006, [8]byte{0xa5, 0xbe, 0xac, 0x0c, 0xb0, 0x56, 0x71, 0x92}}\n\tFOLDERID_SyncResultsFolder      = &KNOWNFOLDERID{0x289a9a43, 0xbe44, 0x4057, [8]byte{0xa4, 0x1b, 0x58, 0x7a, 0x76, 0xd7, 0xe7, 0xf9}}\n\tFOLDERID_RecycleBinFolder       = &KNOWNFOLDERID{0xb7534046, 0x3ecb, 0x4c18, [8]byte{0xbe, 0x4e, 0x64, 0xcd, 0x4c, 0xb7, 0xd6, 0xac}}\n\tFOLDERID_ConnectionsFolder      = &KNOWNFOLDERID{0x6f0cd92b, 0x2e97, 0x45d1, [8]byte{0x88, 0xff, 0xb0, 0xd1, 0x86, 0xb8, 0xde, 0xdd}}\n\tFOLDERID_Fonts                  = &KNOWNFOLDERID{0xfd228cb7, 0xae11, 0x4ae3, [8]byte{0x86, 0x4c, 0x16, 0xf3, 0x91, 0x0a, 0xb8, 0xfe}}\n\tFOLDERID_Desktop                = &KNOWNFOLDERID{0xb4bfcc3a, 0xdb2c, 0x424c, [8]byte{0xb0, 0x29, 0x7f, 0xe9, 0x9a, 0x87, 0xc6, 0x41}}\n\tFOLDERID_Startup                = &KNOWNFOLDERID{0xb97d20bb, 0xf46a, 0x4c97, [8]byte{0xba, 0x10, 0x5e, 0x36, 0x08, 0x43, 0x08, 0x54}}\n\tFOLDERID_Programs               = &KNOWNFOLDERID{0xa77f5d77, 0x2e2b, 0x44c3, [8]byte{0xa6, 0xa2, 0xab, 0xa6, 0x01, 0x05, 0x4a, 0x51}}\n\tFOLDERID_StartMenu              = &KNOWNFOLDERID{0x625b53c3, 0xab48, 0x4ec1, [8]byte{0xba, 0x1f, 0xa1, 0xef, 0x41, 0x46, 0xfc, 0x19}}\n\tFOLDERID_Recent                 = &KNOWNFOLDERID{0xae50c081, 0xebd2, 0x438a, [8]byte{0x86, 0x55, 0x8a, 0x09, 0x2e, 0x34, 0x98, 0x7a}}\n\tFOLDERID_SendTo                 = &KNOWNFOLDERID{0x8983036c, 0x27c0, 0x404b, [8]byte{0x8f, 0x08, 0x10, 0x2d, 0x10, 0xdc, 0xfd, 0x74}}\n\tFOLDERID_Documents              = &KNOWNFOLDERID{0xfdd39ad0, 0x238f, 0x46af, [8]byte{0xad, 0xb4, 0x6c, 0x85, 0x48, 0x03, 0x69, 0xc7}}\n\tFOLDERID_Favorites              = &KNOWNFOLDERID{0x1777f761, 0x68ad, 0x4d8a, [8]byte{0x87, 0xbd, 0x30, 0xb7, 0x59, 0xfa, 0x33, 0xdd}}\n\tFOLDERID_NetHood                = &KNOWNFOLDERID{0xc5abbf53, 0xe17f, 0x4121, [8]byte{0x89, 0x00, 0x86, 0x62, 0x6f, 0xc2, 0xc9, 0x73}}\n\tFOLDERID_PrintHood              = &KNOWNFOLDERID{0x9274bd8d, 0xcfd1, 0x41c3, [8]byte{0xb3, 0x5e, 0xb1, 0x3f, 0x55, 0xa7, 0x58, 0xf4}}\n\tFOLDERID_Templates              = &KNOWNFOLDERID{0xa63293e8, 0x664e, 0x48db, [8]byte{0xa0, 0x79, 0xdf, 0x75, 0x9e, 0x05, 0x09, 0xf7}}\n\tFOLDERID_CommonStartup          = &KNOWNFOLDERID{0x82a5ea35, 0xd9cd, 0x47c5, [8]byte{0x96, 0x29, 0xe1, 0x5d, 0x2f, 0x71, 0x4e, 0x6e}}\n\tFOLDERID_CommonPrograms         = &KNOWNFOLDERID{0x0139d44e, 0x6afe, 0x49f2, [8]byte{0x86, 0x90, 0x3d, 0xaf, 0xca, 0xe6, 0xff, 0xb8}}\n\tFOLDERID_CommonStartMenu        = &KNOWNFOLDERID{0xa4115719, 0xd62e, 0x491d, [8]byte{0xaa, 0x7c, 0xe7, 0x4b, 0x8b, 0xe3, 0xb0, 0x67}}\n\tFOLDERID_PublicDesktop          = &KNOWNFOLDERID{0xc4aa340d, 0xf20f, 0x4863, [8]byte{0xaf, 0xef, 0xf8, 0x7e, 0xf2, 0xe6, 0xba, 0x25}}\n\tFOLDERID_ProgramData            = &KNOWNFOLDERID{0x62ab5d82, 0xfdc1, 0x4dc3, [8]byte{0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97}}\n\tFOLDERID_CommonTemplates        = &KNOWNFOLDERID{0xb94237e7, 0x57ac, 0x4347, [8]byte{0x91, 0x51, 0xb0, 0x8c, 0x6c, 0x32, 0xd1, 0xf7}}\n\tFOLDERID_PublicDocuments        = &KNOWNFOLDERID{0xed4824af, 0xdce4, 0x45a8, [8]byte{0x81, 0xe2, 0xfc, 0x79, 0x65, 0x08, 0x36, 0x34}}\n\tFOLDERID_RoamingAppData         = &KNOWNFOLDERID{0x3eb685db, 0x65f9, 0x4cf6, [8]byte{0xa0, 0x3a, 0xe3, 0xef, 0x65, 0x72, 0x9f, 0x3d}}\n\tFOLDERID_LocalAppData           = &KNOWNFOLDERID{0xf1b32785, 0x6fba, 0x4fcf, [8]byte{0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91}}\n\tFOLDERID_LocalAppDataLow        = &KNOWNFOLDERID{0xa520a1a4, 0x1780, 0x4ff6, [8]byte{0xbd, 0x18, 0x16, 0x73, 0x43, 0xc5, 0xaf, 0x16}}\n\tFOLDERID_InternetCache          = &KNOWNFOLDERID{0x352481e8, 0x33be, 0x4251, [8]byte{0xba, 0x85, 0x60, 0x07, 0xca, 0xed, 0xcf, 0x9d}}\n\tFOLDERID_Cookies                = &KNOWNFOLDERID{0x2b0f765d, 0xc0e9, 0x4171, [8]byte{0x90, 0x8e, 0x08, 0xa6, 0x11, 0xb8, 0x4f, 0xf6}}\n\tFOLDERID_History                = &KNOWNFOLDERID{0xd9dc8a3b, 0xb784, 0x432e, [8]byte{0xa7, 0x81, 0x5a, 0x11, 0x30, 0xa7, 0x59, 0x63}}\n\tFOLDERID_System                 = &KNOWNFOLDERID{0x1ac14e77, 0x02e7, 0x4e5d, [8]byte{0xb7, 0x44, 0x2e, 0xb1, 0xae, 0x51, 0x98, 0xb7}}\n\tFOLDERID_SystemX86              = &KNOWNFOLDERID{0xd65231b0, 0xb2f1, 0x4857, [8]byte{0xa4, 0xce, 0xa8, 0xe7, 0xc6, 0xea, 0x7d, 0x27}}\n\tFOLDERID_Windows                = &KNOWNFOLDERID{0xf38bf404, 0x1d43, 0x42f2, [8]byte{0x93, 0x05, 0x67, 0xde, 0x0b, 0x28, 0xfc, 0x23}}\n\tFOLDERID_Profile                = &KNOWNFOLDERID{0x5e6c858f, 0x0e22, 0x4760, [8]byte{0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73}}\n\tFOLDERID_Pictures               = &KNOWNFOLDERID{0x33e28130, 0x4e1e, 0x4676, [8]byte{0x83, 0x5a, 0x98, 0x39, 0x5c, 0x3b, 0xc3, 0xbb}}\n\tFOLDERID_ProgramFilesX86        = &KNOWNFOLDERID{0x7c5a40ef, 0xa0fb, 0x4bfc, [8]byte{0x87, 0x4a, 0xc0, 0xf2, 0xe0, 0xb9, 0xfa, 0x8e}}\n\tFOLDERID_ProgramFilesCommonX86  = &KNOWNFOLDERID{0xde974d24, 0xd9c6, 0x4d3e, [8]byte{0xbf, 0x91, 0xf4, 0x45, 0x51, 0x20, 0xb9, 0x17}}\n\tFOLDERID_ProgramFilesX64        = &KNOWNFOLDERID{0x6d809377, 0x6af0, 0x444b, [8]byte{0x89, 0x57, 0xa3, 0x77, 0x3f, 0x02, 0x20, 0x0e}}\n\tFOLDERID_ProgramFilesCommonX64  = &KNOWNFOLDERID{0x6365d5a7, 0x0f0d, 0x45e5, [8]byte{0x87, 0xf6, 0x0d, 0xa5, 0x6b, 0x6a, 0x4f, 0x7d}}\n\tFOLDERID_ProgramFiles           = &KNOWNFOLDERID{0x905e63b6, 0xc1bf, 0x494e, [8]byte{0xb2, 0x9c, 0x65, 0xb7, 0x32, 0xd3, 0xd2, 0x1a}}\n\tFOLDERID_ProgramFilesCommon     = &KNOWNFOLDERID{0xf7f1ed05, 0x9f6d, 0x47a2, [8]byte{0xaa, 0xae, 0x29, 0xd3, 0x17, 0xc6, 0xf0, 0x66}}\n\tFOLDERID_UserProgramFiles       = &KNOWNFOLDERID{0x5cd7aee2, 0x2219, 0x4a67, [8]byte{0xb8, 0x5d, 0x6c, 0x9c, 0xe1, 0x56, 0x60, 0xcb}}\n\tFOLDERID_UserProgramFilesCommon = &KNOWNFOLDERID{0xbcbd3057, 0xca5c, 0x4622, [8]byte{0xb4, 0x2d, 0xbc, 0x56, 0xdb, 0x0a, 0xe5, 0x16}}\n\tFOLDERID_AdminTools             = &KNOWNFOLDERID{0x724ef170, 0xa42d, 0x4fef, [8]byte{0x9f, 0x26, 0xb6, 0x0e, 0x84, 0x6f, 0xba, 0x4f}}\n\tFOLDERID_CommonAdminTools       = &KNOWNFOLDERID{0xd0384e7d, 0xbac3, 0x4797, [8]byte{0x8f, 0x14, 0xcb, 0xa2, 0x29, 0xb3, 0x92, 0xb5}}\n\tFOLDERID_Music                  = &KNOWNFOLDERID{0x4bd8d571, 0x6d19, 0x48d3, [8]byte{0xbe, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0e, 0x43}}\n\tFOLDERID_Videos                 = &KNOWNFOLDERID{0x18989b1d, 0x99b5, 0x455b, [8]byte{0x84, 0x1c, 0xab, 0x7c, 0x74, 0xe4, 0xdd, 0xfc}}\n\tFOLDERID_Ringtones              = &KNOWNFOLDERID{0xc870044b, 0xf49e, 0x4126, [8]byte{0xa9, 0xc3, 0xb5, 0x2a, 0x1f, 0xf4, 0x11, 0xe8}}\n\tFOLDERID_PublicPictures         = &KNOWNFOLDERID{0xb6ebfb86, 0x6907, 0x413c, [8]byte{0x9a, 0xf7, 0x4f, 0xc2, 0xab, 0xf0, 0x7c, 0xc5}}\n\tFOLDERID_PublicMusic            = &KNOWNFOLDERID{0x3214fab5, 0x9757, 0x4298, [8]byte{0xbb, 0x61, 0x92, 0xa9, 0xde, 0xaa, 0x44, 0xff}}\n\tFOLDERID_PublicVideos           = &KNOWNFOLDERID{0x2400183a, 0x6185, 0x49fb, [8]byte{0xa2, 0xd8, 0x4a, 0x39, 0x2a, 0x60, 0x2b, 0xa3}}\n\tFOLDERID_PublicRingtones        = &KNOWNFOLDERID{0xe555ab60, 0x153b, 0x4d17, [8]byte{0x9f, 0x04, 0xa5, 0xfe, 0x99, 0xfc, 0x15, 0xec}}\n\tFOLDERID_ResourceDir            = &KNOWNFOLDERID{0x8ad10c31, 0x2adb, 0x4296, [8]byte{0xa8, 0xf7, 0xe4, 0x70, 0x12, 0x32, 0xc9, 0x72}}\n\tFOLDERID_LocalizedResourcesDir  = &KNOWNFOLDERID{0x2a00375e, 0x224c, 0x49de, [8]byte{0xb8, 0xd1, 0x44, 0x0d, 0xf7, 0xef, 0x3d, 0xdc}}\n\tFOLDERID_CommonOEMLinks         = &KNOWNFOLDERID{0xc1bae2d0, 0x10df, 0x4334, [8]byte{0xbe, 0xdd, 0x7a, 0xa2, 0x0b, 0x22, 0x7a, 0x9d}}\n\tFOLDERID_CDBurning              = &KNOWNFOLDERID{0x9e52ab10, 0xf80d, 0x49df, [8]byte{0xac, 0xb8, 0x43, 0x30, 0xf5, 0x68, 0x78, 0x55}}\n\tFOLDERID_UserProfiles           = &KNOWNFOLDERID{0x0762d272, 0xc50a, 0x4bb0, [8]byte{0xa3, 0x82, 0x69, 0x7d, 0xcd, 0x72, 0x9b, 0x80}}\n\tFOLDERID_Playlists              = &KNOWNFOLDERID{0xde92c1c7, 0x837f, 0x4f69, [8]byte{0xa3, 0xbb, 0x86, 0xe6, 0x31, 0x20, 0x4a, 0x23}}\n\tFOLDERID_SamplePlaylists        = &KNOWNFOLDERID{0x15ca69b3, 0x30ee, 0x49c1, [8]byte{0xac, 0xe1, 0x6b, 0x5e, 0xc3, 0x72, 0xaf, 0xb5}}\n\tFOLDERID_SampleMusic            = &KNOWNFOLDERID{0xb250c668, 0xf57d, 0x4ee1, [8]byte{0xa6, 0x3c, 0x29, 0x0e, 0xe7, 0xd1, 0xaa, 0x1f}}\n\tFOLDERID_SamplePictures         = &KNOWNFOLDERID{0xc4900540, 0x2379, 0x4c75, [8]byte{0x84, 0x4b, 0x64, 0xe6, 0xfa, 0xf8, 0x71, 0x6b}}\n\tFOLDERID_SampleVideos           = &KNOWNFOLDERID{0x859ead94, 0x2e85, 0x48ad, [8]byte{0xa7, 0x1a, 0x09, 0x69, 0xcb, 0x56, 0xa6, 0xcd}}\n\tFOLDERID_PhotoAlbums            = &KNOWNFOLDERID{0x69d2cf90, 0xfc33, 0x4fb7, [8]byte{0x9a, 0x0c, 0xeb, 0xb0, 0xf0, 0xfc, 0xb4, 0x3c}}\n\tFOLDERID_Public                 = &KNOWNFOLDERID{0xdfdf76a2, 0xc82a, 0x4d63, [8]byte{0x90, 0x6a, 0x56, 0x44, 0xac, 0x45, 0x73, 0x85}}\n\tFOLDERID_ChangeRemovePrograms   = &KNOWNFOLDERID{0xdf7266ac, 0x9274, 0x4867, [8]byte{0x8d, 0x55, 0x3b, 0xd6, 0x61, 0xde, 0x87, 0x2d}}\n\tFOLDERID_AppUpdates             = &KNOWNFOLDERID{0xa305ce99, 0xf527, 0x492b, [8]byte{0x8b, 0x1a, 0x7e, 0x76, 0xfa, 0x98, 0xd6, 0xe4}}\n\tFOLDERID_AddNewPrograms         = &KNOWNFOLDERID{0xde61d971, 0x5ebc, 0x4f02, [8]byte{0xa3, 0xa9, 0x6c, 0x82, 0x89, 0x5e, 0x5c, 0x04}}\n\tFOLDERID_Downloads              = &KNOWNFOLDERID{0x374de290, 0x123f, 0x4565, [8]byte{0x91, 0x64, 0x39, 0xc4, 0x92, 0x5e, 0x46, 0x7b}}\n\tFOLDERID_PublicDownloads        = &KNOWNFOLDERID{0x3d644c9b, 0x1fb8, 0x4f30, [8]byte{0x9b, 0x45, 0xf6, 0x70, 0x23, 0x5f, 0x79, 0xc0}}\n\tFOLDERID_SavedSearches          = &KNOWNFOLDERID{0x7d1d3a04, 0xdebb, 0x4115, [8]byte{0x95, 0xcf, 0x2f, 0x29, 0xda, 0x29, 0x20, 0xda}}\n\tFOLDERID_QuickLaunch            = &KNOWNFOLDERID{0x52a4f021, 0x7b75, 0x48a9, [8]byte{0x9f, 0x6b, 0x4b, 0x87, 0xa2, 0x10, 0xbc, 0x8f}}\n\tFOLDERID_Contacts               = &KNOWNFOLDERID{0x56784854, 0xc6cb, 0x462b, [8]byte{0x81, 0x69, 0x88, 0xe3, 0x50, 0xac, 0xb8, 0x82}}\n\tFOLDERID_SidebarParts           = &KNOWNFOLDERID{0xa75d362e, 0x50fc, 0x4fb7, [8]byte{0xac, 0x2c, 0xa8, 0xbe, 0xaa, 0x31, 0x44, 0x93}}\n\tFOLDERID_SidebarDefaultParts    = &KNOWNFOLDERID{0x7b396e54, 0x9ec5, 0x4300, [8]byte{0xbe, 0x0a, 0x24, 0x82, 0xeb, 0xae, 0x1a, 0x26}}\n\tFOLDERID_PublicGameTasks        = &KNOWNFOLDERID{0xdebf2536, 0xe1a8, 0x4c59, [8]byte{0xb6, 0xa2, 0x41, 0x45, 0x86, 0x47, 0x6a, 0xea}}\n\tFOLDERID_GameTasks              = &KNOWNFOLDERID{0x054fae61, 0x4dd8, 0x4787, [8]byte{0x80, 0xb6, 0x09, 0x02, 0x20, 0xc4, 0xb7, 0x00}}\n\tFOLDERID_SavedGames             = &KNOWNFOLDERID{0x4c5c32ff, 0xbb9d, 0x43b0, [8]byte{0xb5, 0xb4, 0x2d, 0x72, 0xe5, 0x4e, 0xaa, 0xa4}}\n\tFOLDERID_Games                  = &KNOWNFOLDERID{0xcac52c1a, 0xb53d, 0x4edc, [8]byte{0x92, 0xd7, 0x6b, 0x2e, 0x8a, 0xc1, 0x94, 0x34}}\n\tFOLDERID_SEARCH_MAPI            = &KNOWNFOLDERID{0x98ec0e18, 0x2098, 0x4d44, [8]byte{0x86, 0x44, 0x66, 0x97, 0x93, 0x15, 0xa2, 0x81}}\n\tFOLDERID_SEARCH_CSC             = &KNOWNFOLDERID{0xee32e446, 0x31ca, 0x4aba, [8]byte{0x81, 0x4f, 0xa5, 0xeb, 0xd2, 0xfd, 0x6d, 0x5e}}\n\tFOLDERID_Links                  = &KNOWNFOLDERID{0xbfb9d5e0, 0xc6a9, 0x404c, [8]byte{0xb2, 0xb2, 0xae, 0x6d, 0xb6, 0xaf, 0x49, 0x68}}\n\tFOLDERID_UsersFiles             = &KNOWNFOLDERID{0xf3ce0f7c, 0x4901, 0x4acc, [8]byte{0x86, 0x48, 0xd5, 0xd4, 0x4b, 0x04, 0xef, 0x8f}}\n\tFOLDERID_UsersLibraries         = &KNOWNFOLDERID{0xa302545d, 0xdeff, 0x464b, [8]byte{0xab, 0xe8, 0x61, 0xc8, 0x64, 0x8d, 0x93, 0x9b}}\n\tFOLDERID_SearchHome             = &KNOWNFOLDERID{0x190337d1, 0xb8ca, 0x4121, [8]byte{0xa6, 0x39, 0x6d, 0x47, 0x2d, 0x16, 0x97, 0x2a}}\n\tFOLDERID_OriginalImages         = &KNOWNFOLDERID{0x2c36c0aa, 0x5812, 0x4b87, [8]byte{0xbf, 0xd0, 0x4c, 0xd0, 0xdf, 0xb1, 0x9b, 0x39}}\n\tFOLDERID_DocumentsLibrary       = &KNOWNFOLDERID{0x7b0db17d, 0x9cd2, 0x4a93, [8]byte{0x97, 0x33, 0x46, 0xcc, 0x89, 0x02, 0x2e, 0x7c}}\n\tFOLDERID_MusicLibrary           = &KNOWNFOLDERID{0x2112ab0a, 0xc86a, 0x4ffe, [8]byte{0xa3, 0x68, 0x0d, 0xe9, 0x6e, 0x47, 0x01, 0x2e}}\n\tFOLDERID_PicturesLibrary        = &KNOWNFOLDERID{0xa990ae9f, 0xa03b, 0x4e80, [8]byte{0x94, 0xbc, 0x99, 0x12, 0xd7, 0x50, 0x41, 0x04}}\n\tFOLDERID_VideosLibrary          = &KNOWNFOLDERID{0x491e922f, 0x5643, 0x4af4, [8]byte{0xa7, 0xeb, 0x4e, 0x7a, 0x13, 0x8d, 0x81, 0x74}}\n\tFOLDERID_RecordedTVLibrary      = &KNOWNFOLDERID{0x1a6fdba2, 0xf42d, 0x4358, [8]byte{0xa7, 0x98, 0xb7, 0x4d, 0x74, 0x59, 0x26, 0xc5}}\n\tFOLDERID_HomeGroup              = &KNOWNFOLDERID{0x52528a6b, 0xb9e3, 0x4add, [8]byte{0xb6, 0x0d, 0x58, 0x8c, 0x2d, 0xba, 0x84, 0x2d}}\n\tFOLDERID_HomeGroupCurrentUser   = &KNOWNFOLDERID{0x9b74b6a3, 0x0dfd, 0x4f11, [8]byte{0x9e, 0x78, 0x5f, 0x78, 0x00, 0xf2, 0xe7, 0x72}}\n\tFOLDERID_DeviceMetadataStore    = &KNOWNFOLDERID{0x5ce4a5e9, 0xe4eb, 0x479d, [8]byte{0xb8, 0x9f, 0x13, 0x0c, 0x02, 0x88, 0x61, 0x55}}\n\tFOLDERID_Libraries              = &KNOWNFOLDERID{0x1b3ea5dc, 0xb587, 0x4786, [8]byte{0xb4, 0xef, 0xbd, 0x1d, 0xc3, 0x32, 0xae, 0xae}}\n\tFOLDERID_PublicLibraries        = &KNOWNFOLDERID{0x48daf80b, 0xe6cf, 0x4f4e, [8]byte{0xb8, 0x00, 0x0e, 0x69, 0xd8, 0x4e, 0xe3, 0x84}}\n\tFOLDERID_UserPinned             = &KNOWNFOLDERID{0x9e3995ab, 0x1f9c, 0x4f13, [8]byte{0xb8, 0x27, 0x48, 0xb2, 0x4b, 0x6c, 0x71, 0x74}}\n\tFOLDERID_ImplicitAppShortcuts   = &KNOWNFOLDERID{0xbcb5256f, 0x79f6, 0x4cee, [8]byte{0xb7, 0x25, 0xdc, 0x34, 0xe4, 0x02, 0xfd, 0x46}}\n\tFOLDERID_AccountPictures        = &KNOWNFOLDERID{0x008ca0b1, 0x55b4, 0x4c56, [8]byte{0xb8, 0xa8, 0x4d, 0xe4, 0xb2, 0x99, 0xd3, 0xbe}}\n\tFOLDERID_PublicUserTiles        = &KNOWNFOLDERID{0x0482af6c, 0x08f1, 0x4c34, [8]byte{0x8c, 0x90, 0xe1, 0x7e, 0xc9, 0x8b, 0x1e, 0x17}}\n\tFOLDERID_AppsFolder             = &KNOWNFOLDERID{0x1e87508d, 0x89c2, 0x42f0, [8]byte{0x8a, 0x7e, 0x64, 0x5a, 0x0f, 0x50, 0xca, 0x58}}\n\tFOLDERID_StartMenuAllPrograms   = &KNOWNFOLDERID{0xf26305ef, 0x6948, 0x40b9, [8]byte{0xb2, 0x55, 0x81, 0x45, 0x3d, 0x09, 0xc7, 0x85}}\n\tFOLDERID_CommonStartMenuPlaces  = &KNOWNFOLDERID{0xa440879f, 0x87a0, 0x4f7d, [8]byte{0xb7, 0x00, 0x02, 0x07, 0xb9, 0x66, 0x19, 0x4a}}\n\tFOLDERID_ApplicationShortcuts   = &KNOWNFOLDERID{0xa3918781, 0xe5f2, 0x4890, [8]byte{0xb3, 0xd9, 0xa7, 0xe5, 0x43, 0x32, 0x32, 0x8c}}\n\tFOLDERID_RoamingTiles           = &KNOWNFOLDERID{0x00bcfc5a, 0xed94, 0x4e48, [8]byte{0x96, 0xa1, 0x3f, 0x62, 0x17, 0xf2, 0x19, 0x90}}\n\tFOLDERID_RoamedTileImages       = &KNOWNFOLDERID{0xaaa8d5a5, 0xf1d6, 0x4259, [8]byte{0xba, 0xa8, 0x78, 0xe7, 0xef, 0x60, 0x83, 0x5e}}\n\tFOLDERID_Screenshots            = &KNOWNFOLDERID{0xb7bede81, 0xdf94, 0x4682, [8]byte{0xa7, 0xd8, 0x57, 0xa5, 0x26, 0x20, 0xb8, 0x6f}}\n\tFOLDERID_CameraRoll             = &KNOWNFOLDERID{0xab5fb87b, 0x7ce2, 0x4f83, [8]byte{0x91, 0x5d, 0x55, 0x08, 0x46, 0xc9, 0x53, 0x7b}}\n\tFOLDERID_SkyDrive               = &KNOWNFOLDERID{0xa52bba46, 0xe9e1, 0x435f, [8]byte{0xb3, 0xd9, 0x28, 0xda, 0xa6, 0x48, 0xc0, 0xf6}}\n\tFOLDERID_OneDrive               = &KNOWNFOLDERID{0xa52bba46, 0xe9e1, 0x435f, [8]byte{0xb3, 0xd9, 0x28, 0xda, 0xa6, 0x48, 0xc0, 0xf6}}\n\tFOLDERID_SkyDriveDocuments      = &KNOWNFOLDERID{0x24d89e24, 0x2f19, 0x4534, [8]byte{0x9d, 0xde, 0x6a, 0x66, 0x71, 0xfb, 0xb8, 0xfe}}\n\tFOLDERID_SkyDrivePictures       = &KNOWNFOLDERID{0x339719b5, 0x8c47, 0x4894, [8]byte{0x94, 0xc2, 0xd8, 0xf7, 0x7a, 0xdd, 0x44, 0xa6}}\n\tFOLDERID_SkyDriveMusic          = &KNOWNFOLDERID{0xc3f2459e, 0x80d6, 0x45dc, [8]byte{0xbf, 0xef, 0x1f, 0x76, 0x9f, 0x2b, 0xe7, 0x30}}\n\tFOLDERID_SkyDriveCameraRoll     = &KNOWNFOLDERID{0x767e6811, 0x49cb, 0x4273, [8]byte{0x87, 0xc2, 0x20, 0xf3, 0x55, 0xe1, 0x08, 0x5b}}\n\tFOLDERID_SearchHistory          = &KNOWNFOLDERID{0x0d4c3db6, 0x03a3, 0x462f, [8]byte{0xa0, 0xe6, 0x08, 0x92, 0x4c, 0x41, 0xb5, 0xd4}}\n\tFOLDERID_SearchTemplates        = &KNOWNFOLDERID{0x7e636bfe, 0xdfa9, 0x4d5e, [8]byte{0xb4, 0x56, 0xd7, 0xb3, 0x98, 0x51, 0xd8, 0xa9}}\n\tFOLDERID_CameraRollLibrary      = &KNOWNFOLDERID{0x2b20df75, 0x1eda, 0x4039, [8]byte{0x80, 0x97, 0x38, 0x79, 0x82, 0x27, 0xd5, 0xb7}}\n\tFOLDERID_SavedPictures          = &KNOWNFOLDERID{0x3b193882, 0xd3ad, 0x4eab, [8]byte{0x96, 0x5a, 0x69, 0x82, 0x9d, 0x1f, 0xb5, 0x9f}}\n\tFOLDERID_SavedPicturesLibrary   = &KNOWNFOLDERID{0xe25b5812, 0xbe88, 0x4bd9, [8]byte{0x94, 0xb0, 0x29, 0x23, 0x34, 0x77, 0xb6, 0xc3}}\n\tFOLDERID_RetailDemo             = &KNOWNFOLDERID{0x12d4c69e, 0x24ad, 0x4923, [8]byte{0xbe, 0x19, 0x31, 0x32, 0x1c, 0x43, 0xa7, 0x67}}\n\tFOLDERID_Device                 = &KNOWNFOLDERID{0x1c2ac1dc, 0x4358, 0x4b6c, [8]byte{0x97, 0x33, 0xaf, 0x21, 0x15, 0x65, 0x76, 0xf0}}\n\tFOLDERID_DevelopmentFiles       = &KNOWNFOLDERID{0xdbe8e08e, 0x3053, 0x4bbc, [8]byte{0xb1, 0x83, 0x2a, 0x7b, 0x2b, 0x19, 0x1e, 0x59}}\n\tFOLDERID_Objects3D              = &KNOWNFOLDERID{0x31c0dd25, 0x9439, 0x4f12, [8]byte{0xbf, 0x41, 0x7f, 0xf4, 0xed, 0xa3, 0x87, 0x22}}\n\tFOLDERID_AppCaptures            = &KNOWNFOLDERID{0xedc0fe71, 0x98d8, 0x4f4a, [8]byte{0xb9, 0x20, 0xc8, 0xdc, 0x13, 0x3c, 0xb1, 0x65}}\n\tFOLDERID_LocalDocuments         = &KNOWNFOLDERID{0xf42ee2d3, 0x909f, 0x4907, [8]byte{0x88, 0x71, 0x4c, 0x22, 0xfc, 0x0b, 0xf7, 0x56}}\n\tFOLDERID_LocalPictures          = &KNOWNFOLDERID{0x0ddd015d, 0xb06c, 0x45d5, [8]byte{0x8c, 0x4c, 0xf5, 0x97, 0x13, 0x85, 0x46, 0x39}}\n\tFOLDERID_LocalVideos            = &KNOWNFOLDERID{0x35286a68, 0x3c57, 0x41a1, [8]byte{0xbb, 0xb1, 0x0e, 0xae, 0x73, 0xd7, 0x6c, 0x95}}\n\tFOLDERID_LocalMusic             = &KNOWNFOLDERID{0xa0c69a99, 0x21c8, 0x4671, [8]byte{0x87, 0x03, 0x79, 0x34, 0x16, 0x2f, 0xcf, 0x1d}}\n\tFOLDERID_LocalDownloads         = &KNOWNFOLDERID{0x7d83ee9b, 0x2244, 0x4e70, [8]byte{0xb1, 0xf5, 0x53, 0x93, 0x04, 0x2a, 0xf1, 0xe4}}\n\tFOLDERID_RecordedCalls          = &KNOWNFOLDERID{0x2f8b40c2, 0x83ed, 0x48ee, [8]byte{0xb3, 0x83, 0xa1, 0xf1, 0x57, 0xec, 0x6f, 0x9a}}\n\tFOLDERID_AllAppMods             = &KNOWNFOLDERID{0x7ad67899, 0x66af, 0x43ba, [8]byte{0x91, 0x56, 0x6a, 0xad, 0x42, 0xe6, 0xc5, 0x96}}\n\tFOLDERID_CurrentAppMods         = &KNOWNFOLDERID{0x3db40b20, 0x2a30, 0x4dbe, [8]byte{0x91, 0x7e, 0x77, 0x1d, 0xd2, 0x1d, 0xd0, 0x99}}\n\tFOLDERID_AppDataDesktop         = &KNOWNFOLDERID{0xb2c5e279, 0x7add, 0x439f, [8]byte{0xb2, 0x8c, 0xc4, 0x1f, 0xe1, 0xbb, 0xf6, 0x72}}\n\tFOLDERID_AppDataDocuments       = &KNOWNFOLDERID{0x7be16610, 0x1f7f, 0x44ac, [8]byte{0xbf, 0xf0, 0x83, 0xe1, 0x5f, 0x2f, 0xfc, 0xa1}}\n\tFOLDERID_AppDataFavorites       = &KNOWNFOLDERID{0x7cfbefbc, 0xde1f, 0x45aa, [8]byte{0xb8, 0x43, 0xa5, 0x42, 0xac, 0x53, 0x6c, 0xc9}}\n\tFOLDERID_AppDataProgramData     = &KNOWNFOLDERID{0x559d40a3, 0xa036, 0x40fa, [8]byte{0xaf, 0x61, 0x84, 0xcb, 0x43, 0x0a, 0x4d, 0x34}}\n)\n"
  },
  {
    "path": "vendor/golang.org/x/sys/windows/zsyscall_windows.go",
    "content": "// Code generated by 'go generate'; DO NOT EDIT.\n\npackage windows\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ unsafe.Pointer\n\n// Do the interface allocations only once for common\n// Errno values.\nconst (\n\terrnoERROR_IO_PENDING = 997\n)\n\nvar (\n\terrERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)\n\terrERROR_EINVAL     error = syscall.EINVAL\n)\n\n// errnoErr returns common boxed Errno values, to prevent\n// allocations at runtime.\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn errERROR_EINVAL\n\tcase errnoERROR_IO_PENDING:\n\t\treturn errERROR_IO_PENDING\n\t}\n\t// TODO: add more here, after collecting data on the common\n\t// error values see on Windows. (perhaps when running\n\t// all.bat?)\n\treturn e\n}\n\nvar (\n\tmodCfgMgr32 = NewLazySystemDLL(\"CfgMgr32.dll\")\n\tmodadvapi32 = NewLazySystemDLL(\"advapi32.dll\")\n\tmodcrypt32  = NewLazySystemDLL(\"crypt32.dll\")\n\tmoddnsapi   = NewLazySystemDLL(\"dnsapi.dll\")\n\tmoddwmapi   = NewLazySystemDLL(\"dwmapi.dll\")\n\tmodiphlpapi = NewLazySystemDLL(\"iphlpapi.dll\")\n\tmodkernel32 = NewLazySystemDLL(\"kernel32.dll\")\n\tmodmswsock  = NewLazySystemDLL(\"mswsock.dll\")\n\tmodnetapi32 = NewLazySystemDLL(\"netapi32.dll\")\n\tmodntdll    = NewLazySystemDLL(\"ntdll.dll\")\n\tmodole32    = NewLazySystemDLL(\"ole32.dll\")\n\tmodpsapi    = NewLazySystemDLL(\"psapi.dll\")\n\tmodsechost  = NewLazySystemDLL(\"sechost.dll\")\n\tmodsecur32  = NewLazySystemDLL(\"secur32.dll\")\n\tmodsetupapi = NewLazySystemDLL(\"setupapi.dll\")\n\tmodshell32  = NewLazySystemDLL(\"shell32.dll\")\n\tmoduser32   = NewLazySystemDLL(\"user32.dll\")\n\tmoduserenv  = NewLazySystemDLL(\"userenv.dll\")\n\tmodversion  = NewLazySystemDLL(\"version.dll\")\n\tmodwinmm    = NewLazySystemDLL(\"winmm.dll\")\n\tmodwintrust = NewLazySystemDLL(\"wintrust.dll\")\n\tmodws2_32   = NewLazySystemDLL(\"ws2_32.dll\")\n\tmodwtsapi32 = NewLazySystemDLL(\"wtsapi32.dll\")\n\n\tprocCM_Get_DevNode_Status                                = modCfgMgr32.NewProc(\"CM_Get_DevNode_Status\")\n\tprocCM_Get_Device_Interface_ListW                        = modCfgMgr32.NewProc(\"CM_Get_Device_Interface_ListW\")\n\tprocCM_Get_Device_Interface_List_SizeW                   = modCfgMgr32.NewProc(\"CM_Get_Device_Interface_List_SizeW\")\n\tprocCM_MapCrToWin32Err                                   = modCfgMgr32.NewProc(\"CM_MapCrToWin32Err\")\n\tprocAdjustTokenGroups                                    = modadvapi32.NewProc(\"AdjustTokenGroups\")\n\tprocAdjustTokenPrivileges                                = modadvapi32.NewProc(\"AdjustTokenPrivileges\")\n\tprocAllocateAndInitializeSid                             = modadvapi32.NewProc(\"AllocateAndInitializeSid\")\n\tprocBuildSecurityDescriptorW                             = modadvapi32.NewProc(\"BuildSecurityDescriptorW\")\n\tprocChangeServiceConfig2W                                = modadvapi32.NewProc(\"ChangeServiceConfig2W\")\n\tprocChangeServiceConfigW                                 = modadvapi32.NewProc(\"ChangeServiceConfigW\")\n\tprocCheckTokenMembership                                 = modadvapi32.NewProc(\"CheckTokenMembership\")\n\tprocCloseServiceHandle                                   = modadvapi32.NewProc(\"CloseServiceHandle\")\n\tprocControlService                                       = modadvapi32.NewProc(\"ControlService\")\n\tprocConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc(\"ConvertSecurityDescriptorToStringSecurityDescriptorW\")\n\tprocConvertSidToStringSidW                               = modadvapi32.NewProc(\"ConvertSidToStringSidW\")\n\tprocConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc(\"ConvertStringSecurityDescriptorToSecurityDescriptorW\")\n\tprocConvertStringSidToSidW                               = modadvapi32.NewProc(\"ConvertStringSidToSidW\")\n\tprocCopySid                                              = modadvapi32.NewProc(\"CopySid\")\n\tprocCreateProcessAsUserW                                 = modadvapi32.NewProc(\"CreateProcessAsUserW\")\n\tprocCreateServiceW                                       = modadvapi32.NewProc(\"CreateServiceW\")\n\tprocCreateWellKnownSid                                   = modadvapi32.NewProc(\"CreateWellKnownSid\")\n\tprocCryptAcquireContextW                                 = modadvapi32.NewProc(\"CryptAcquireContextW\")\n\tprocCryptGenRandom                                       = modadvapi32.NewProc(\"CryptGenRandom\")\n\tprocCryptReleaseContext                                  = modadvapi32.NewProc(\"CryptReleaseContext\")\n\tprocDeleteService                                        = modadvapi32.NewProc(\"DeleteService\")\n\tprocDeregisterEventSource                                = modadvapi32.NewProc(\"DeregisterEventSource\")\n\tprocDuplicateTokenEx                                     = modadvapi32.NewProc(\"DuplicateTokenEx\")\n\tprocEnumDependentServicesW                               = modadvapi32.NewProc(\"EnumDependentServicesW\")\n\tprocEnumServicesStatusExW                                = modadvapi32.NewProc(\"EnumServicesStatusExW\")\n\tprocEqualSid                                             = modadvapi32.NewProc(\"EqualSid\")\n\tprocFreeSid                                              = modadvapi32.NewProc(\"FreeSid\")\n\tprocGetAce                                               = modadvapi32.NewProc(\"GetAce\")\n\tprocGetLengthSid                                         = modadvapi32.NewProc(\"GetLengthSid\")\n\tprocGetNamedSecurityInfoW                                = modadvapi32.NewProc(\"GetNamedSecurityInfoW\")\n\tprocGetSecurityDescriptorControl                         = modadvapi32.NewProc(\"GetSecurityDescriptorControl\")\n\tprocGetSecurityDescriptorDacl                            = modadvapi32.NewProc(\"GetSecurityDescriptorDacl\")\n\tprocGetSecurityDescriptorGroup                           = modadvapi32.NewProc(\"GetSecurityDescriptorGroup\")\n\tprocGetSecurityDescriptorLength                          = modadvapi32.NewProc(\"GetSecurityDescriptorLength\")\n\tprocGetSecurityDescriptorOwner                           = modadvapi32.NewProc(\"GetSecurityDescriptorOwner\")\n\tprocGetSecurityDescriptorRMControl                       = modadvapi32.NewProc(\"GetSecurityDescriptorRMControl\")\n\tprocGetSecurityDescriptorSacl                            = modadvapi32.NewProc(\"GetSecurityDescriptorSacl\")\n\tprocGetSecurityInfo                                      = modadvapi32.NewProc(\"GetSecurityInfo\")\n\tprocGetSidIdentifierAuthority                            = modadvapi32.NewProc(\"GetSidIdentifierAuthority\")\n\tprocGetSidSubAuthority                                   = modadvapi32.NewProc(\"GetSidSubAuthority\")\n\tprocGetSidSubAuthorityCount                              = modadvapi32.NewProc(\"GetSidSubAuthorityCount\")\n\tprocGetTokenInformation                                  = modadvapi32.NewProc(\"GetTokenInformation\")\n\tprocImpersonateSelf                                      = modadvapi32.NewProc(\"ImpersonateSelf\")\n\tprocInitializeSecurityDescriptor                         = modadvapi32.NewProc(\"InitializeSecurityDescriptor\")\n\tprocInitiateSystemShutdownExW                            = modadvapi32.NewProc(\"InitiateSystemShutdownExW\")\n\tprocIsTokenRestricted                                    = modadvapi32.NewProc(\"IsTokenRestricted\")\n\tprocIsValidSecurityDescriptor                            = modadvapi32.NewProc(\"IsValidSecurityDescriptor\")\n\tprocIsValidSid                                           = modadvapi32.NewProc(\"IsValidSid\")\n\tprocIsWellKnownSid                                       = modadvapi32.NewProc(\"IsWellKnownSid\")\n\tprocLookupAccountNameW                                   = modadvapi32.NewProc(\"LookupAccountNameW\")\n\tprocLookupAccountSidW                                    = modadvapi32.NewProc(\"LookupAccountSidW\")\n\tprocLookupPrivilegeValueW                                = modadvapi32.NewProc(\"LookupPrivilegeValueW\")\n\tprocMakeAbsoluteSD                                       = modadvapi32.NewProc(\"MakeAbsoluteSD\")\n\tprocMakeSelfRelativeSD                                   = modadvapi32.NewProc(\"MakeSelfRelativeSD\")\n\tprocNotifyServiceStatusChangeW                           = modadvapi32.NewProc(\"NotifyServiceStatusChangeW\")\n\tprocOpenProcessToken                                     = modadvapi32.NewProc(\"OpenProcessToken\")\n\tprocOpenSCManagerW                                       = modadvapi32.NewProc(\"OpenSCManagerW\")\n\tprocOpenServiceW                                         = modadvapi32.NewProc(\"OpenServiceW\")\n\tprocOpenThreadToken                                      = modadvapi32.NewProc(\"OpenThreadToken\")\n\tprocQueryServiceConfig2W                                 = modadvapi32.NewProc(\"QueryServiceConfig2W\")\n\tprocQueryServiceConfigW                                  = modadvapi32.NewProc(\"QueryServiceConfigW\")\n\tprocQueryServiceDynamicInformation                       = modadvapi32.NewProc(\"QueryServiceDynamicInformation\")\n\tprocQueryServiceLockStatusW                              = modadvapi32.NewProc(\"QueryServiceLockStatusW\")\n\tprocQueryServiceStatus                                   = modadvapi32.NewProc(\"QueryServiceStatus\")\n\tprocQueryServiceStatusEx                                 = modadvapi32.NewProc(\"QueryServiceStatusEx\")\n\tprocRegCloseKey                                          = modadvapi32.NewProc(\"RegCloseKey\")\n\tprocRegEnumKeyExW                                        = modadvapi32.NewProc(\"RegEnumKeyExW\")\n\tprocRegNotifyChangeKeyValue                              = modadvapi32.NewProc(\"RegNotifyChangeKeyValue\")\n\tprocRegOpenKeyExW                                        = modadvapi32.NewProc(\"RegOpenKeyExW\")\n\tprocRegQueryInfoKeyW                                     = modadvapi32.NewProc(\"RegQueryInfoKeyW\")\n\tprocRegQueryValueExW                                     = modadvapi32.NewProc(\"RegQueryValueExW\")\n\tprocRegisterEventSourceW                                 = modadvapi32.NewProc(\"RegisterEventSourceW\")\n\tprocRegisterServiceCtrlHandlerExW                        = modadvapi32.NewProc(\"RegisterServiceCtrlHandlerExW\")\n\tprocReportEventW                                         = modadvapi32.NewProc(\"ReportEventW\")\n\tprocRevertToSelf                                         = modadvapi32.NewProc(\"RevertToSelf\")\n\tprocSetEntriesInAclW                                     = modadvapi32.NewProc(\"SetEntriesInAclW\")\n\tprocSetKernelObjectSecurity                              = modadvapi32.NewProc(\"SetKernelObjectSecurity\")\n\tprocSetNamedSecurityInfoW                                = modadvapi32.NewProc(\"SetNamedSecurityInfoW\")\n\tprocSetSecurityDescriptorControl                         = modadvapi32.NewProc(\"SetSecurityDescriptorControl\")\n\tprocSetSecurityDescriptorDacl                            = modadvapi32.NewProc(\"SetSecurityDescriptorDacl\")\n\tprocSetSecurityDescriptorGroup                           = modadvapi32.NewProc(\"SetSecurityDescriptorGroup\")\n\tprocSetSecurityDescriptorOwner                           = modadvapi32.NewProc(\"SetSecurityDescriptorOwner\")\n\tprocSetSecurityDescriptorRMControl                       = modadvapi32.NewProc(\"SetSecurityDescriptorRMControl\")\n\tprocSetSecurityDescriptorSacl                            = modadvapi32.NewProc(\"SetSecurityDescriptorSacl\")\n\tprocSetSecurityInfo                                      = modadvapi32.NewProc(\"SetSecurityInfo\")\n\tprocSetServiceStatus                                     = modadvapi32.NewProc(\"SetServiceStatus\")\n\tprocSetThreadToken                                       = modadvapi32.NewProc(\"SetThreadToken\")\n\tprocSetTokenInformation                                  = modadvapi32.NewProc(\"SetTokenInformation\")\n\tprocStartServiceCtrlDispatcherW                          = modadvapi32.NewProc(\"StartServiceCtrlDispatcherW\")\n\tprocStartServiceW                                        = modadvapi32.NewProc(\"StartServiceW\")\n\tprocCertAddCertificateContextToStore                     = modcrypt32.NewProc(\"CertAddCertificateContextToStore\")\n\tprocCertCloseStore                                       = modcrypt32.NewProc(\"CertCloseStore\")\n\tprocCertCreateCertificateContext                         = modcrypt32.NewProc(\"CertCreateCertificateContext\")\n\tprocCertDeleteCertificateFromStore                       = modcrypt32.NewProc(\"CertDeleteCertificateFromStore\")\n\tprocCertDuplicateCertificateContext                      = modcrypt32.NewProc(\"CertDuplicateCertificateContext\")\n\tprocCertEnumCertificatesInStore                          = modcrypt32.NewProc(\"CertEnumCertificatesInStore\")\n\tprocCertFindCertificateInStore                           = modcrypt32.NewProc(\"CertFindCertificateInStore\")\n\tprocCertFindChainInStore                                 = modcrypt32.NewProc(\"CertFindChainInStore\")\n\tprocCertFindExtension                                    = modcrypt32.NewProc(\"CertFindExtension\")\n\tprocCertFreeCertificateChain                             = modcrypt32.NewProc(\"CertFreeCertificateChain\")\n\tprocCertFreeCertificateContext                           = modcrypt32.NewProc(\"CertFreeCertificateContext\")\n\tprocCertGetCertificateChain                              = modcrypt32.NewProc(\"CertGetCertificateChain\")\n\tprocCertGetNameStringW                                   = modcrypt32.NewProc(\"CertGetNameStringW\")\n\tprocCertOpenStore                                        = modcrypt32.NewProc(\"CertOpenStore\")\n\tprocCertOpenSystemStoreW                                 = modcrypt32.NewProc(\"CertOpenSystemStoreW\")\n\tprocCertVerifyCertificateChainPolicy                     = modcrypt32.NewProc(\"CertVerifyCertificateChainPolicy\")\n\tprocCryptAcquireCertificatePrivateKey                    = modcrypt32.NewProc(\"CryptAcquireCertificatePrivateKey\")\n\tprocCryptDecodeObject                                    = modcrypt32.NewProc(\"CryptDecodeObject\")\n\tprocCryptProtectData                                     = modcrypt32.NewProc(\"CryptProtectData\")\n\tprocCryptQueryObject                                     = modcrypt32.NewProc(\"CryptQueryObject\")\n\tprocCryptUnprotectData                                   = modcrypt32.NewProc(\"CryptUnprotectData\")\n\tprocPFXImportCertStore                                   = modcrypt32.NewProc(\"PFXImportCertStore\")\n\tprocDnsNameCompare_W                                     = moddnsapi.NewProc(\"DnsNameCompare_W\")\n\tprocDnsQuery_W                                           = moddnsapi.NewProc(\"DnsQuery_W\")\n\tprocDnsRecordListFree                                    = moddnsapi.NewProc(\"DnsRecordListFree\")\n\tprocDwmGetWindowAttribute                                = moddwmapi.NewProc(\"DwmGetWindowAttribute\")\n\tprocDwmSetWindowAttribute                                = moddwmapi.NewProc(\"DwmSetWindowAttribute\")\n\tprocCancelMibChangeNotify2                               = modiphlpapi.NewProc(\"CancelMibChangeNotify2\")\n\tprocFreeMibTable                                         = modiphlpapi.NewProc(\"FreeMibTable\")\n\tprocGetAdaptersAddresses                                 = modiphlpapi.NewProc(\"GetAdaptersAddresses\")\n\tprocGetAdaptersInfo                                      = modiphlpapi.NewProc(\"GetAdaptersInfo\")\n\tprocGetBestInterfaceEx                                   = modiphlpapi.NewProc(\"GetBestInterfaceEx\")\n\tprocGetIfEntry                                           = modiphlpapi.NewProc(\"GetIfEntry\")\n\tprocGetIfEntry2Ex                                        = modiphlpapi.NewProc(\"GetIfEntry2Ex\")\n\tprocGetIpForwardEntry2                                   = modiphlpapi.NewProc(\"GetIpForwardEntry2\")\n\tprocGetIpForwardTable2                                   = modiphlpapi.NewProc(\"GetIpForwardTable2\")\n\tprocGetUnicastIpAddressEntry                             = modiphlpapi.NewProc(\"GetUnicastIpAddressEntry\")\n\tprocNotifyIpInterfaceChange                              = modiphlpapi.NewProc(\"NotifyIpInterfaceChange\")\n\tprocNotifyRouteChange2                                   = modiphlpapi.NewProc(\"NotifyRouteChange2\")\n\tprocNotifyUnicastIpAddressChange                         = modiphlpapi.NewProc(\"NotifyUnicastIpAddressChange\")\n\tprocAddDllDirectory                                      = modkernel32.NewProc(\"AddDllDirectory\")\n\tprocAssignProcessToJobObject                             = modkernel32.NewProc(\"AssignProcessToJobObject\")\n\tprocCancelIo                                             = modkernel32.NewProc(\"CancelIo\")\n\tprocCancelIoEx                                           = modkernel32.NewProc(\"CancelIoEx\")\n\tprocClearCommBreak                                       = modkernel32.NewProc(\"ClearCommBreak\")\n\tprocClearCommError                                       = modkernel32.NewProc(\"ClearCommError\")\n\tprocCloseHandle                                          = modkernel32.NewProc(\"CloseHandle\")\n\tprocClosePseudoConsole                                   = modkernel32.NewProc(\"ClosePseudoConsole\")\n\tprocConnectNamedPipe                                     = modkernel32.NewProc(\"ConnectNamedPipe\")\n\tprocCreateDirectoryW                                     = modkernel32.NewProc(\"CreateDirectoryW\")\n\tprocCreateEventExW                                       = modkernel32.NewProc(\"CreateEventExW\")\n\tprocCreateEventW                                         = modkernel32.NewProc(\"CreateEventW\")\n\tprocCreateFileMappingW                                   = modkernel32.NewProc(\"CreateFileMappingW\")\n\tprocCreateFileW                                          = modkernel32.NewProc(\"CreateFileW\")\n\tprocCreateHardLinkW                                      = modkernel32.NewProc(\"CreateHardLinkW\")\n\tprocCreateIoCompletionPort                               = modkernel32.NewProc(\"CreateIoCompletionPort\")\n\tprocCreateJobObjectW                                     = modkernel32.NewProc(\"CreateJobObjectW\")\n\tprocCreateMutexExW                                       = modkernel32.NewProc(\"CreateMutexExW\")\n\tprocCreateMutexW                                         = modkernel32.NewProc(\"CreateMutexW\")\n\tprocCreateNamedPipeW                                     = modkernel32.NewProc(\"CreateNamedPipeW\")\n\tprocCreatePipe                                           = modkernel32.NewProc(\"CreatePipe\")\n\tprocCreateProcessW                                       = modkernel32.NewProc(\"CreateProcessW\")\n\tprocCreatePseudoConsole                                  = modkernel32.NewProc(\"CreatePseudoConsole\")\n\tprocCreateSymbolicLinkW                                  = modkernel32.NewProc(\"CreateSymbolicLinkW\")\n\tprocCreateToolhelp32Snapshot                             = modkernel32.NewProc(\"CreateToolhelp32Snapshot\")\n\tprocDefineDosDeviceW                                     = modkernel32.NewProc(\"DefineDosDeviceW\")\n\tprocDeleteFileW                                          = modkernel32.NewProc(\"DeleteFileW\")\n\tprocDeleteProcThreadAttributeList                        = modkernel32.NewProc(\"DeleteProcThreadAttributeList\")\n\tprocDeleteVolumeMountPointW                              = modkernel32.NewProc(\"DeleteVolumeMountPointW\")\n\tprocDeviceIoControl                                      = modkernel32.NewProc(\"DeviceIoControl\")\n\tprocDisconnectNamedPipe                                  = modkernel32.NewProc(\"DisconnectNamedPipe\")\n\tprocDuplicateHandle                                      = modkernel32.NewProc(\"DuplicateHandle\")\n\tprocEscapeCommFunction                                   = modkernel32.NewProc(\"EscapeCommFunction\")\n\tprocExitProcess                                          = modkernel32.NewProc(\"ExitProcess\")\n\tprocExpandEnvironmentStringsW                            = modkernel32.NewProc(\"ExpandEnvironmentStringsW\")\n\tprocFindClose                                            = modkernel32.NewProc(\"FindClose\")\n\tprocFindCloseChangeNotification                          = modkernel32.NewProc(\"FindCloseChangeNotification\")\n\tprocFindFirstChangeNotificationW                         = modkernel32.NewProc(\"FindFirstChangeNotificationW\")\n\tprocFindFirstFileW                                       = modkernel32.NewProc(\"FindFirstFileW\")\n\tprocFindFirstVolumeMountPointW                           = modkernel32.NewProc(\"FindFirstVolumeMountPointW\")\n\tprocFindFirstVolumeW                                     = modkernel32.NewProc(\"FindFirstVolumeW\")\n\tprocFindNextChangeNotification                           = modkernel32.NewProc(\"FindNextChangeNotification\")\n\tprocFindNextFileW                                        = modkernel32.NewProc(\"FindNextFileW\")\n\tprocFindNextVolumeMountPointW                            = modkernel32.NewProc(\"FindNextVolumeMountPointW\")\n\tprocFindNextVolumeW                                      = modkernel32.NewProc(\"FindNextVolumeW\")\n\tprocFindResourceW                                        = modkernel32.NewProc(\"FindResourceW\")\n\tprocFindVolumeClose                                      = modkernel32.NewProc(\"FindVolumeClose\")\n\tprocFindVolumeMountPointClose                            = modkernel32.NewProc(\"FindVolumeMountPointClose\")\n\tprocFlushConsoleInputBuffer                              = modkernel32.NewProc(\"FlushConsoleInputBuffer\")\n\tprocFlushFileBuffers                                     = modkernel32.NewProc(\"FlushFileBuffers\")\n\tprocFlushViewOfFile                                      = modkernel32.NewProc(\"FlushViewOfFile\")\n\tprocFormatMessageW                                       = modkernel32.NewProc(\"FormatMessageW\")\n\tprocFreeEnvironmentStringsW                              = modkernel32.NewProc(\"FreeEnvironmentStringsW\")\n\tprocFreeLibrary                                          = modkernel32.NewProc(\"FreeLibrary\")\n\tprocGenerateConsoleCtrlEvent                             = modkernel32.NewProc(\"GenerateConsoleCtrlEvent\")\n\tprocGetACP                                               = modkernel32.NewProc(\"GetACP\")\n\tprocGetActiveProcessorCount                              = modkernel32.NewProc(\"GetActiveProcessorCount\")\n\tprocGetCommModemStatus                                   = modkernel32.NewProc(\"GetCommModemStatus\")\n\tprocGetCommState                                         = modkernel32.NewProc(\"GetCommState\")\n\tprocGetCommTimeouts                                      = modkernel32.NewProc(\"GetCommTimeouts\")\n\tprocGetCommandLineW                                      = modkernel32.NewProc(\"GetCommandLineW\")\n\tprocGetComputerNameExW                                   = modkernel32.NewProc(\"GetComputerNameExW\")\n\tprocGetComputerNameW                                     = modkernel32.NewProc(\"GetComputerNameW\")\n\tprocGetConsoleCP                                         = modkernel32.NewProc(\"GetConsoleCP\")\n\tprocGetConsoleMode                                       = modkernel32.NewProc(\"GetConsoleMode\")\n\tprocGetConsoleOutputCP                                   = modkernel32.NewProc(\"GetConsoleOutputCP\")\n\tprocGetConsoleScreenBufferInfo                           = modkernel32.NewProc(\"GetConsoleScreenBufferInfo\")\n\tprocGetCurrentDirectoryW                                 = modkernel32.NewProc(\"GetCurrentDirectoryW\")\n\tprocGetCurrentProcessId                                  = modkernel32.NewProc(\"GetCurrentProcessId\")\n\tprocGetCurrentThreadId                                   = modkernel32.NewProc(\"GetCurrentThreadId\")\n\tprocGetDiskFreeSpaceExW                                  = modkernel32.NewProc(\"GetDiskFreeSpaceExW\")\n\tprocGetDriveTypeW                                        = modkernel32.NewProc(\"GetDriveTypeW\")\n\tprocGetEnvironmentStringsW                               = modkernel32.NewProc(\"GetEnvironmentStringsW\")\n\tprocGetEnvironmentVariableW                              = modkernel32.NewProc(\"GetEnvironmentVariableW\")\n\tprocGetExitCodeProcess                                   = modkernel32.NewProc(\"GetExitCodeProcess\")\n\tprocGetFileAttributesExW                                 = modkernel32.NewProc(\"GetFileAttributesExW\")\n\tprocGetFileAttributesW                                   = modkernel32.NewProc(\"GetFileAttributesW\")\n\tprocGetFileInformationByHandle                           = modkernel32.NewProc(\"GetFileInformationByHandle\")\n\tprocGetFileInformationByHandleEx                         = modkernel32.NewProc(\"GetFileInformationByHandleEx\")\n\tprocGetFileTime                                          = modkernel32.NewProc(\"GetFileTime\")\n\tprocGetFileType                                          = modkernel32.NewProc(\"GetFileType\")\n\tprocGetFinalPathNameByHandleW                            = modkernel32.NewProc(\"GetFinalPathNameByHandleW\")\n\tprocGetFullPathNameW                                     = modkernel32.NewProc(\"GetFullPathNameW\")\n\tprocGetLargePageMinimum                                  = modkernel32.NewProc(\"GetLargePageMinimum\")\n\tprocGetLastError                                         = modkernel32.NewProc(\"GetLastError\")\n\tprocGetLogicalDriveStringsW                              = modkernel32.NewProc(\"GetLogicalDriveStringsW\")\n\tprocGetLogicalDrives                                     = modkernel32.NewProc(\"GetLogicalDrives\")\n\tprocGetLongPathNameW                                     = modkernel32.NewProc(\"GetLongPathNameW\")\n\tprocGetMaximumProcessorCount                             = modkernel32.NewProc(\"GetMaximumProcessorCount\")\n\tprocGetModuleFileNameW                                   = modkernel32.NewProc(\"GetModuleFileNameW\")\n\tprocGetModuleHandleExW                                   = modkernel32.NewProc(\"GetModuleHandleExW\")\n\tprocGetNamedPipeClientProcessId                          = modkernel32.NewProc(\"GetNamedPipeClientProcessId\")\n\tprocGetNamedPipeHandleStateW                             = modkernel32.NewProc(\"GetNamedPipeHandleStateW\")\n\tprocGetNamedPipeInfo                                     = modkernel32.NewProc(\"GetNamedPipeInfo\")\n\tprocGetNamedPipeServerProcessId                          = modkernel32.NewProc(\"GetNamedPipeServerProcessId\")\n\tprocGetNumberOfConsoleInputEvents                        = modkernel32.NewProc(\"GetNumberOfConsoleInputEvents\")\n\tprocGetOverlappedResult                                  = modkernel32.NewProc(\"GetOverlappedResult\")\n\tprocGetPriorityClass                                     = modkernel32.NewProc(\"GetPriorityClass\")\n\tprocGetProcAddress                                       = modkernel32.NewProc(\"GetProcAddress\")\n\tprocGetProcessId                                         = modkernel32.NewProc(\"GetProcessId\")\n\tprocGetProcessPreferredUILanguages                       = modkernel32.NewProc(\"GetProcessPreferredUILanguages\")\n\tprocGetProcessShutdownParameters                         = modkernel32.NewProc(\"GetProcessShutdownParameters\")\n\tprocGetProcessTimes                                      = modkernel32.NewProc(\"GetProcessTimes\")\n\tprocGetProcessWorkingSetSizeEx                           = modkernel32.NewProc(\"GetProcessWorkingSetSizeEx\")\n\tprocGetQueuedCompletionStatus                            = modkernel32.NewProc(\"GetQueuedCompletionStatus\")\n\tprocGetShortPathNameW                                    = modkernel32.NewProc(\"GetShortPathNameW\")\n\tprocGetStartupInfoW                                      = modkernel32.NewProc(\"GetStartupInfoW\")\n\tprocGetStdHandle                                         = modkernel32.NewProc(\"GetStdHandle\")\n\tprocGetSystemDirectoryW                                  = modkernel32.NewProc(\"GetSystemDirectoryW\")\n\tprocGetSystemPreferredUILanguages                        = modkernel32.NewProc(\"GetSystemPreferredUILanguages\")\n\tprocGetSystemTimeAsFileTime                              = modkernel32.NewProc(\"GetSystemTimeAsFileTime\")\n\tprocGetSystemTimePreciseAsFileTime                       = modkernel32.NewProc(\"GetSystemTimePreciseAsFileTime\")\n\tprocGetSystemWindowsDirectoryW                           = modkernel32.NewProc(\"GetSystemWindowsDirectoryW\")\n\tprocGetTempPathW                                         = modkernel32.NewProc(\"GetTempPathW\")\n\tprocGetThreadPreferredUILanguages                        = modkernel32.NewProc(\"GetThreadPreferredUILanguages\")\n\tprocGetTickCount64                                       = modkernel32.NewProc(\"GetTickCount64\")\n\tprocGetTimeZoneInformation                               = modkernel32.NewProc(\"GetTimeZoneInformation\")\n\tprocGetUserPreferredUILanguages                          = modkernel32.NewProc(\"GetUserPreferredUILanguages\")\n\tprocGetVersion                                           = modkernel32.NewProc(\"GetVersion\")\n\tprocGetVolumeInformationByHandleW                        = modkernel32.NewProc(\"GetVolumeInformationByHandleW\")\n\tprocGetVolumeInformationW                                = modkernel32.NewProc(\"GetVolumeInformationW\")\n\tprocGetVolumeNameForVolumeMountPointW                    = modkernel32.NewProc(\"GetVolumeNameForVolumeMountPointW\")\n\tprocGetVolumePathNameW                                   = modkernel32.NewProc(\"GetVolumePathNameW\")\n\tprocGetVolumePathNamesForVolumeNameW                     = modkernel32.NewProc(\"GetVolumePathNamesForVolumeNameW\")\n\tprocGetWindowsDirectoryW                                 = modkernel32.NewProc(\"GetWindowsDirectoryW\")\n\tprocInitializeProcThreadAttributeList                    = modkernel32.NewProc(\"InitializeProcThreadAttributeList\")\n\tprocIsProcessorFeaturePresent                            = modkernel32.NewProc(\"IsProcessorFeaturePresent\")\n\tprocIsWow64Process                                       = modkernel32.NewProc(\"IsWow64Process\")\n\tprocIsWow64Process2                                      = modkernel32.NewProc(\"IsWow64Process2\")\n\tprocLoadLibraryExW                                       = modkernel32.NewProc(\"LoadLibraryExW\")\n\tprocLoadLibraryW                                         = modkernel32.NewProc(\"LoadLibraryW\")\n\tprocLoadResource                                         = modkernel32.NewProc(\"LoadResource\")\n\tprocLocalAlloc                                           = modkernel32.NewProc(\"LocalAlloc\")\n\tprocLocalFree                                            = modkernel32.NewProc(\"LocalFree\")\n\tprocLockFileEx                                           = modkernel32.NewProc(\"LockFileEx\")\n\tprocLockResource                                         = modkernel32.NewProc(\"LockResource\")\n\tprocMapViewOfFile                                        = modkernel32.NewProc(\"MapViewOfFile\")\n\tprocModule32FirstW                                       = modkernel32.NewProc(\"Module32FirstW\")\n\tprocModule32NextW                                        = modkernel32.NewProc(\"Module32NextW\")\n\tprocMoveFileExW                                          = modkernel32.NewProc(\"MoveFileExW\")\n\tprocMoveFileW                                            = modkernel32.NewProc(\"MoveFileW\")\n\tprocMultiByteToWideChar                                  = modkernel32.NewProc(\"MultiByteToWideChar\")\n\tprocOpenEventW                                           = modkernel32.NewProc(\"OpenEventW\")\n\tprocOpenMutexW                                           = modkernel32.NewProc(\"OpenMutexW\")\n\tprocOpenProcess                                          = modkernel32.NewProc(\"OpenProcess\")\n\tprocOpenThread                                           = modkernel32.NewProc(\"OpenThread\")\n\tprocPostQueuedCompletionStatus                           = modkernel32.NewProc(\"PostQueuedCompletionStatus\")\n\tprocProcess32FirstW                                      = modkernel32.NewProc(\"Process32FirstW\")\n\tprocProcess32NextW                                       = modkernel32.NewProc(\"Process32NextW\")\n\tprocProcessIdToSessionId                                 = modkernel32.NewProc(\"ProcessIdToSessionId\")\n\tprocPulseEvent                                           = modkernel32.NewProc(\"PulseEvent\")\n\tprocPurgeComm                                            = modkernel32.NewProc(\"PurgeComm\")\n\tprocQueryDosDeviceW                                      = modkernel32.NewProc(\"QueryDosDeviceW\")\n\tprocQueryFullProcessImageNameW                           = modkernel32.NewProc(\"QueryFullProcessImageNameW\")\n\tprocQueryInformationJobObject                            = modkernel32.NewProc(\"QueryInformationJobObject\")\n\tprocReadConsoleW                                         = modkernel32.NewProc(\"ReadConsoleW\")\n\tprocReadDirectoryChangesW                                = modkernel32.NewProc(\"ReadDirectoryChangesW\")\n\tprocReadFile                                             = modkernel32.NewProc(\"ReadFile\")\n\tprocReadProcessMemory                                    = modkernel32.NewProc(\"ReadProcessMemory\")\n\tprocReleaseMutex                                         = modkernel32.NewProc(\"ReleaseMutex\")\n\tprocRemoveDirectoryW                                     = modkernel32.NewProc(\"RemoveDirectoryW\")\n\tprocRemoveDllDirectory                                   = modkernel32.NewProc(\"RemoveDllDirectory\")\n\tprocResetEvent                                           = modkernel32.NewProc(\"ResetEvent\")\n\tprocResizePseudoConsole                                  = modkernel32.NewProc(\"ResizePseudoConsole\")\n\tprocResumeThread                                         = modkernel32.NewProc(\"ResumeThread\")\n\tprocSetCommBreak                                         = modkernel32.NewProc(\"SetCommBreak\")\n\tprocSetCommMask                                          = modkernel32.NewProc(\"SetCommMask\")\n\tprocSetCommState                                         = modkernel32.NewProc(\"SetCommState\")\n\tprocSetCommTimeouts                                      = modkernel32.NewProc(\"SetCommTimeouts\")\n\tprocSetConsoleCP                                         = modkernel32.NewProc(\"SetConsoleCP\")\n\tprocSetConsoleCursorPosition                             = modkernel32.NewProc(\"SetConsoleCursorPosition\")\n\tprocSetConsoleMode                                       = modkernel32.NewProc(\"SetConsoleMode\")\n\tprocSetConsoleOutputCP                                   = modkernel32.NewProc(\"SetConsoleOutputCP\")\n\tprocSetCurrentDirectoryW                                 = modkernel32.NewProc(\"SetCurrentDirectoryW\")\n\tprocSetDefaultDllDirectories                             = modkernel32.NewProc(\"SetDefaultDllDirectories\")\n\tprocSetDllDirectoryW                                     = modkernel32.NewProc(\"SetDllDirectoryW\")\n\tprocSetEndOfFile                                         = modkernel32.NewProc(\"SetEndOfFile\")\n\tprocSetEnvironmentVariableW                              = modkernel32.NewProc(\"SetEnvironmentVariableW\")\n\tprocSetErrorMode                                         = modkernel32.NewProc(\"SetErrorMode\")\n\tprocSetEvent                                             = modkernel32.NewProc(\"SetEvent\")\n\tprocSetFileAttributesW                                   = modkernel32.NewProc(\"SetFileAttributesW\")\n\tprocSetFileCompletionNotificationModes                   = modkernel32.NewProc(\"SetFileCompletionNotificationModes\")\n\tprocSetFileInformationByHandle                           = modkernel32.NewProc(\"SetFileInformationByHandle\")\n\tprocSetFilePointer                                       = modkernel32.NewProc(\"SetFilePointer\")\n\tprocSetFileTime                                          = modkernel32.NewProc(\"SetFileTime\")\n\tprocSetFileValidData                                     = modkernel32.NewProc(\"SetFileValidData\")\n\tprocSetHandleInformation                                 = modkernel32.NewProc(\"SetHandleInformation\")\n\tprocSetInformationJobObject                              = modkernel32.NewProc(\"SetInformationJobObject\")\n\tprocSetNamedPipeHandleState                              = modkernel32.NewProc(\"SetNamedPipeHandleState\")\n\tprocSetPriorityClass                                     = modkernel32.NewProc(\"SetPriorityClass\")\n\tprocSetProcessPriorityBoost                              = modkernel32.NewProc(\"SetProcessPriorityBoost\")\n\tprocSetProcessShutdownParameters                         = modkernel32.NewProc(\"SetProcessShutdownParameters\")\n\tprocSetProcessWorkingSetSizeEx                           = modkernel32.NewProc(\"SetProcessWorkingSetSizeEx\")\n\tprocSetStdHandle                                         = modkernel32.NewProc(\"SetStdHandle\")\n\tprocSetVolumeLabelW                                      = modkernel32.NewProc(\"SetVolumeLabelW\")\n\tprocSetVolumeMountPointW                                 = modkernel32.NewProc(\"SetVolumeMountPointW\")\n\tprocSetupComm                                            = modkernel32.NewProc(\"SetupComm\")\n\tprocSizeofResource                                       = modkernel32.NewProc(\"SizeofResource\")\n\tprocSleepEx                                              = modkernel32.NewProc(\"SleepEx\")\n\tprocTerminateJobObject                                   = modkernel32.NewProc(\"TerminateJobObject\")\n\tprocTerminateProcess                                     = modkernel32.NewProc(\"TerminateProcess\")\n\tprocThread32First                                        = modkernel32.NewProc(\"Thread32First\")\n\tprocThread32Next                                         = modkernel32.NewProc(\"Thread32Next\")\n\tprocUnlockFileEx                                         = modkernel32.NewProc(\"UnlockFileEx\")\n\tprocUnmapViewOfFile                                      = modkernel32.NewProc(\"UnmapViewOfFile\")\n\tprocUpdateProcThreadAttribute                            = modkernel32.NewProc(\"UpdateProcThreadAttribute\")\n\tprocVirtualAlloc                                         = modkernel32.NewProc(\"VirtualAlloc\")\n\tprocVirtualFree                                          = modkernel32.NewProc(\"VirtualFree\")\n\tprocVirtualLock                                          = modkernel32.NewProc(\"VirtualLock\")\n\tprocVirtualProtect                                       = modkernel32.NewProc(\"VirtualProtect\")\n\tprocVirtualProtectEx                                     = modkernel32.NewProc(\"VirtualProtectEx\")\n\tprocVirtualQuery                                         = modkernel32.NewProc(\"VirtualQuery\")\n\tprocVirtualQueryEx                                       = modkernel32.NewProc(\"VirtualQueryEx\")\n\tprocVirtualUnlock                                        = modkernel32.NewProc(\"VirtualUnlock\")\n\tprocWTSGetActiveConsoleSessionId                         = modkernel32.NewProc(\"WTSGetActiveConsoleSessionId\")\n\tprocWaitCommEvent                                        = modkernel32.NewProc(\"WaitCommEvent\")\n\tprocWaitForMultipleObjects                               = modkernel32.NewProc(\"WaitForMultipleObjects\")\n\tprocWaitForSingleObject                                  = modkernel32.NewProc(\"WaitForSingleObject\")\n\tprocWriteConsoleW                                        = modkernel32.NewProc(\"WriteConsoleW\")\n\tprocWriteFile                                            = modkernel32.NewProc(\"WriteFile\")\n\tprocWriteProcessMemory                                   = modkernel32.NewProc(\"WriteProcessMemory\")\n\tprocAcceptEx                                             = modmswsock.NewProc(\"AcceptEx\")\n\tprocGetAcceptExSockaddrs                                 = modmswsock.NewProc(\"GetAcceptExSockaddrs\")\n\tprocTransmitFile                                         = modmswsock.NewProc(\"TransmitFile\")\n\tprocNetApiBufferFree                                     = modnetapi32.NewProc(\"NetApiBufferFree\")\n\tprocNetGetJoinInformation                                = modnetapi32.NewProc(\"NetGetJoinInformation\")\n\tprocNetUserEnum                                          = modnetapi32.NewProc(\"NetUserEnum\")\n\tprocNetUserGetInfo                                       = modnetapi32.NewProc(\"NetUserGetInfo\")\n\tprocNtCreateFile                                         = modntdll.NewProc(\"NtCreateFile\")\n\tprocNtCreateNamedPipeFile                                = modntdll.NewProc(\"NtCreateNamedPipeFile\")\n\tprocNtQueryInformationProcess                            = modntdll.NewProc(\"NtQueryInformationProcess\")\n\tprocNtQuerySystemInformation                             = modntdll.NewProc(\"NtQuerySystemInformation\")\n\tprocNtSetInformationFile                                 = modntdll.NewProc(\"NtSetInformationFile\")\n\tprocNtSetInformationProcess                              = modntdll.NewProc(\"NtSetInformationProcess\")\n\tprocNtSetSystemInformation                               = modntdll.NewProc(\"NtSetSystemInformation\")\n\tprocRtlAddFunctionTable                                  = modntdll.NewProc(\"RtlAddFunctionTable\")\n\tprocRtlDefaultNpAcl                                      = modntdll.NewProc(\"RtlDefaultNpAcl\")\n\tprocRtlDeleteFunctionTable                               = modntdll.NewProc(\"RtlDeleteFunctionTable\")\n\tprocRtlDosPathNameToNtPathName_U_WithStatus              = modntdll.NewProc(\"RtlDosPathNameToNtPathName_U_WithStatus\")\n\tprocRtlDosPathNameToRelativeNtPathName_U_WithStatus      = modntdll.NewProc(\"RtlDosPathNameToRelativeNtPathName_U_WithStatus\")\n\tprocRtlGetCurrentPeb                                     = modntdll.NewProc(\"RtlGetCurrentPeb\")\n\tprocRtlGetNtVersionNumbers                               = modntdll.NewProc(\"RtlGetNtVersionNumbers\")\n\tprocRtlGetVersion                                        = modntdll.NewProc(\"RtlGetVersion\")\n\tprocRtlInitString                                        = modntdll.NewProc(\"RtlInitString\")\n\tprocRtlInitUnicodeString                                 = modntdll.NewProc(\"RtlInitUnicodeString\")\n\tprocRtlNtStatusToDosErrorNoTeb                           = modntdll.NewProc(\"RtlNtStatusToDosErrorNoTeb\")\n\tprocCLSIDFromString                                      = modole32.NewProc(\"CLSIDFromString\")\n\tprocCoCreateGuid                                         = modole32.NewProc(\"CoCreateGuid\")\n\tprocCoGetObject                                          = modole32.NewProc(\"CoGetObject\")\n\tprocCoInitializeEx                                       = modole32.NewProc(\"CoInitializeEx\")\n\tprocCoTaskMemFree                                        = modole32.NewProc(\"CoTaskMemFree\")\n\tprocCoUninitialize                                       = modole32.NewProc(\"CoUninitialize\")\n\tprocStringFromGUID2                                      = modole32.NewProc(\"StringFromGUID2\")\n\tprocEnumProcessModules                                   = modpsapi.NewProc(\"EnumProcessModules\")\n\tprocEnumProcessModulesEx                                 = modpsapi.NewProc(\"EnumProcessModulesEx\")\n\tprocEnumProcesses                                        = modpsapi.NewProc(\"EnumProcesses\")\n\tprocGetModuleBaseNameW                                   = modpsapi.NewProc(\"GetModuleBaseNameW\")\n\tprocGetModuleFileNameExW                                 = modpsapi.NewProc(\"GetModuleFileNameExW\")\n\tprocGetModuleInformation                                 = modpsapi.NewProc(\"GetModuleInformation\")\n\tprocQueryWorkingSetEx                                    = modpsapi.NewProc(\"QueryWorkingSetEx\")\n\tprocSubscribeServiceChangeNotifications                  = modsechost.NewProc(\"SubscribeServiceChangeNotifications\")\n\tprocUnsubscribeServiceChangeNotifications                = modsechost.NewProc(\"UnsubscribeServiceChangeNotifications\")\n\tprocGetUserNameExW                                       = modsecur32.NewProc(\"GetUserNameExW\")\n\tprocTranslateNameW                                       = modsecur32.NewProc(\"TranslateNameW\")\n\tprocSetupDiBuildDriverInfoList                           = modsetupapi.NewProc(\"SetupDiBuildDriverInfoList\")\n\tprocSetupDiCallClassInstaller                            = modsetupapi.NewProc(\"SetupDiCallClassInstaller\")\n\tprocSetupDiCancelDriverInfoSearch                        = modsetupapi.NewProc(\"SetupDiCancelDriverInfoSearch\")\n\tprocSetupDiClassGuidsFromNameExW                         = modsetupapi.NewProc(\"SetupDiClassGuidsFromNameExW\")\n\tprocSetupDiClassNameFromGuidExW                          = modsetupapi.NewProc(\"SetupDiClassNameFromGuidExW\")\n\tprocSetupDiCreateDeviceInfoListExW                       = modsetupapi.NewProc(\"SetupDiCreateDeviceInfoListExW\")\n\tprocSetupDiCreateDeviceInfoW                             = modsetupapi.NewProc(\"SetupDiCreateDeviceInfoW\")\n\tprocSetupDiDestroyDeviceInfoList                         = modsetupapi.NewProc(\"SetupDiDestroyDeviceInfoList\")\n\tprocSetupDiDestroyDriverInfoList                         = modsetupapi.NewProc(\"SetupDiDestroyDriverInfoList\")\n\tprocSetupDiEnumDeviceInfo                                = modsetupapi.NewProc(\"SetupDiEnumDeviceInfo\")\n\tprocSetupDiEnumDriverInfoW                               = modsetupapi.NewProc(\"SetupDiEnumDriverInfoW\")\n\tprocSetupDiGetClassDevsExW                               = modsetupapi.NewProc(\"SetupDiGetClassDevsExW\")\n\tprocSetupDiGetClassInstallParamsW                        = modsetupapi.NewProc(\"SetupDiGetClassInstallParamsW\")\n\tprocSetupDiGetDeviceInfoListDetailW                      = modsetupapi.NewProc(\"SetupDiGetDeviceInfoListDetailW\")\n\tprocSetupDiGetDeviceInstallParamsW                       = modsetupapi.NewProc(\"SetupDiGetDeviceInstallParamsW\")\n\tprocSetupDiGetDeviceInstanceIdW                          = modsetupapi.NewProc(\"SetupDiGetDeviceInstanceIdW\")\n\tprocSetupDiGetDevicePropertyW                            = modsetupapi.NewProc(\"SetupDiGetDevicePropertyW\")\n\tprocSetupDiGetDeviceRegistryPropertyW                    = modsetupapi.NewProc(\"SetupDiGetDeviceRegistryPropertyW\")\n\tprocSetupDiGetDriverInfoDetailW                          = modsetupapi.NewProc(\"SetupDiGetDriverInfoDetailW\")\n\tprocSetupDiGetSelectedDevice                             = modsetupapi.NewProc(\"SetupDiGetSelectedDevice\")\n\tprocSetupDiGetSelectedDriverW                            = modsetupapi.NewProc(\"SetupDiGetSelectedDriverW\")\n\tprocSetupDiOpenDevRegKey                                 = modsetupapi.NewProc(\"SetupDiOpenDevRegKey\")\n\tprocSetupDiSetClassInstallParamsW                        = modsetupapi.NewProc(\"SetupDiSetClassInstallParamsW\")\n\tprocSetupDiSetDeviceInstallParamsW                       = modsetupapi.NewProc(\"SetupDiSetDeviceInstallParamsW\")\n\tprocSetupDiSetDeviceRegistryPropertyW                    = modsetupapi.NewProc(\"SetupDiSetDeviceRegistryPropertyW\")\n\tprocSetupDiSetSelectedDevice                             = modsetupapi.NewProc(\"SetupDiSetSelectedDevice\")\n\tprocSetupDiSetSelectedDriverW                            = modsetupapi.NewProc(\"SetupDiSetSelectedDriverW\")\n\tprocSetupUninstallOEMInfW                                = modsetupapi.NewProc(\"SetupUninstallOEMInfW\")\n\tprocCommandLineToArgvW                                   = modshell32.NewProc(\"CommandLineToArgvW\")\n\tprocSHGetKnownFolderPath                                 = modshell32.NewProc(\"SHGetKnownFolderPath\")\n\tprocShellExecuteW                                        = modshell32.NewProc(\"ShellExecuteW\")\n\tprocEnumChildWindows                                     = moduser32.NewProc(\"EnumChildWindows\")\n\tprocEnumWindows                                          = moduser32.NewProc(\"EnumWindows\")\n\tprocExitWindowsEx                                        = moduser32.NewProc(\"ExitWindowsEx\")\n\tprocGetClassNameW                                        = moduser32.NewProc(\"GetClassNameW\")\n\tprocGetDesktopWindow                                     = moduser32.NewProc(\"GetDesktopWindow\")\n\tprocGetForegroundWindow                                  = moduser32.NewProc(\"GetForegroundWindow\")\n\tprocGetGUIThreadInfo                                     = moduser32.NewProc(\"GetGUIThreadInfo\")\n\tprocGetKeyboardLayout                                    = moduser32.NewProc(\"GetKeyboardLayout\")\n\tprocGetShellWindow                                       = moduser32.NewProc(\"GetShellWindow\")\n\tprocGetWindowThreadProcessId                             = moduser32.NewProc(\"GetWindowThreadProcessId\")\n\tprocIsWindow                                             = moduser32.NewProc(\"IsWindow\")\n\tprocIsWindowUnicode                                      = moduser32.NewProc(\"IsWindowUnicode\")\n\tprocIsWindowVisible                                      = moduser32.NewProc(\"IsWindowVisible\")\n\tprocLoadKeyboardLayoutW                                  = moduser32.NewProc(\"LoadKeyboardLayoutW\")\n\tprocMessageBoxW                                          = moduser32.NewProc(\"MessageBoxW\")\n\tprocToUnicodeEx                                          = moduser32.NewProc(\"ToUnicodeEx\")\n\tprocUnloadKeyboardLayout                                 = moduser32.NewProc(\"UnloadKeyboardLayout\")\n\tprocCreateEnvironmentBlock                               = moduserenv.NewProc(\"CreateEnvironmentBlock\")\n\tprocDestroyEnvironmentBlock                              = moduserenv.NewProc(\"DestroyEnvironmentBlock\")\n\tprocGetUserProfileDirectoryW                             = moduserenv.NewProc(\"GetUserProfileDirectoryW\")\n\tprocGetFileVersionInfoSizeW                              = modversion.NewProc(\"GetFileVersionInfoSizeW\")\n\tprocGetFileVersionInfoW                                  = modversion.NewProc(\"GetFileVersionInfoW\")\n\tprocVerQueryValueW                                       = modversion.NewProc(\"VerQueryValueW\")\n\tproctimeBeginPeriod                                      = modwinmm.NewProc(\"timeBeginPeriod\")\n\tproctimeEndPeriod                                        = modwinmm.NewProc(\"timeEndPeriod\")\n\tprocWinVerifyTrustEx                                     = modwintrust.NewProc(\"WinVerifyTrustEx\")\n\tprocFreeAddrInfoW                                        = modws2_32.NewProc(\"FreeAddrInfoW\")\n\tprocGetAddrInfoW                                         = modws2_32.NewProc(\"GetAddrInfoW\")\n\tprocWSACleanup                                           = modws2_32.NewProc(\"WSACleanup\")\n\tprocWSADuplicateSocketW                                  = modws2_32.NewProc(\"WSADuplicateSocketW\")\n\tprocWSAEnumProtocolsW                                    = modws2_32.NewProc(\"WSAEnumProtocolsW\")\n\tprocWSAGetOverlappedResult                               = modws2_32.NewProc(\"WSAGetOverlappedResult\")\n\tprocWSAIoctl                                             = modws2_32.NewProc(\"WSAIoctl\")\n\tprocWSALookupServiceBeginW                               = modws2_32.NewProc(\"WSALookupServiceBeginW\")\n\tprocWSALookupServiceEnd                                  = modws2_32.NewProc(\"WSALookupServiceEnd\")\n\tprocWSALookupServiceNextW                                = modws2_32.NewProc(\"WSALookupServiceNextW\")\n\tprocWSARecv                                              = modws2_32.NewProc(\"WSARecv\")\n\tprocWSARecvFrom                                          = modws2_32.NewProc(\"WSARecvFrom\")\n\tprocWSASend                                              = modws2_32.NewProc(\"WSASend\")\n\tprocWSASendTo                                            = modws2_32.NewProc(\"WSASendTo\")\n\tprocWSASocketW                                           = modws2_32.NewProc(\"WSASocketW\")\n\tprocWSAStartup                                           = modws2_32.NewProc(\"WSAStartup\")\n\tprocbind                                                 = modws2_32.NewProc(\"bind\")\n\tprocclosesocket                                          = modws2_32.NewProc(\"closesocket\")\n\tprocconnect                                              = modws2_32.NewProc(\"connect\")\n\tprocgethostbyname                                        = modws2_32.NewProc(\"gethostbyname\")\n\tprocgetpeername                                          = modws2_32.NewProc(\"getpeername\")\n\tprocgetprotobyname                                       = modws2_32.NewProc(\"getprotobyname\")\n\tprocgetservbyname                                        = modws2_32.NewProc(\"getservbyname\")\n\tprocgetsockname                                          = modws2_32.NewProc(\"getsockname\")\n\tprocgetsockopt                                           = modws2_32.NewProc(\"getsockopt\")\n\tproclisten                                               = modws2_32.NewProc(\"listen\")\n\tprocntohs                                                = modws2_32.NewProc(\"ntohs\")\n\tprocrecvfrom                                             = modws2_32.NewProc(\"recvfrom\")\n\tprocsendto                                               = modws2_32.NewProc(\"sendto\")\n\tprocsetsockopt                                           = modws2_32.NewProc(\"setsockopt\")\n\tprocshutdown                                             = modws2_32.NewProc(\"shutdown\")\n\tprocsocket                                               = modws2_32.NewProc(\"socket\")\n\tprocWTSEnumerateSessionsW                                = modwtsapi32.NewProc(\"WTSEnumerateSessionsW\")\n\tprocWTSFreeMemory                                        = modwtsapi32.NewProc(\"WTSFreeMemory\")\n\tprocWTSQueryUserToken                                    = modwtsapi32.NewProc(\"WTSQueryUserToken\")\n)\n\nfunc cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) {\n\tr0, _, _ := syscall.SyscallN(procCM_Get_DevNode_Status.Addr(), uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags))\n\tret = CONFIGRET(r0)\n\treturn\n}\n\nfunc cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) {\n\tr0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_ListW.Addr(), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags))\n\tret = CONFIGRET(r0)\n\treturn\n}\n\nfunc cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) {\n\tr0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_List_SizeW.Addr(), uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags))\n\tret = CONFIGRET(r0)\n\treturn\n}\n\nfunc cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) {\n\tr0, _, _ := syscall.SyscallN(procCM_MapCrToWin32Err.Addr(), uintptr(configRet), uintptr(defaultWin32Error))\n\tret = Errno(r0)\n\treturn\n}\n\nfunc AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {\n\tvar _p0 uint32\n\tif resetToDefault {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procAdjustTokenGroups.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) {\n\tvar _p0 uint32\n\tif disableAllPrivileges {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procAllocateAndInitializeSid.Addr(), uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procBuildSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procChangeServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procChangeServiceConfigW.Addr(), uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCheckTokenMembership.Addr(), uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CloseServiceHandle(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCloseServiceHandle.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procControlService.Addr(), uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(str)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)\n}\n\nfunc _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCopySid.Addr(), uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {\n\tvar _p0 uint32\n\tif inheritHandles {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procCreateProcessAsUserW.Addr(), uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCreateWellKnownSid.Addr(), uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptAcquireContextW.Addr(), uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptGenRandom.Addr(), uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptReleaseContext(provhandle Handle, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptReleaseContext.Addr(), uintptr(provhandle), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DeleteService(service Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDeleteService.Addr(), uintptr(service))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DeregisterEventSource(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDeregisterEventSource.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDuplicateTokenEx.Addr(), uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumDependentServicesW.Addr(), uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumServicesStatusExW.Addr(), uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {\n\tr0, _, _ := syscall.SyscallN(procEqualSid.Addr(), uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)))\n\tisEqual = r0 != 0\n\treturn\n}\n\nfunc FreeSid(sid *SID) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFreeSid.Addr(), uintptr(unsafe.Pointer(sid)))\n\tif r1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetAce.Addr(), uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetLengthSid(sid *SID) (len uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetLengthSid.Addr(), uintptr(unsafe.Pointer(sid)))\n\tlen = uint32(r0)\n\treturn\n}\n\nfunc getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {\n\tvar _p0 *uint16\n\t_p0, ret = syscall.UTF16PtrFromString(objectName)\n\tif ret != nil {\n\t\treturn\n\t}\n\treturn _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)\n}\n\nfunc _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procGetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {\n\tvar _p0 uint32\n\tif *daclPresent {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif *daclDefaulted {\n\t\t_p1 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)))\n\t*daclPresent = _p0 != 0\n\t*daclDefaulted = _p1 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {\n\tvar _p0 uint32\n\tif *groupDefaulted {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))\n\t*groupDefaulted = _p0 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetSecurityDescriptorLength.Addr(), uintptr(unsafe.Pointer(sd)))\n\tlen = uint32(r0)\n\treturn\n}\n\nfunc getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {\n\tvar _p0 uint32\n\tif *ownerDefaulted {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))\n\t*ownerDefaulted = _p0 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procGetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {\n\tvar _p0 uint32\n\tif *saclPresent {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif *saclDefaulted {\n\t\t_p1 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)))\n\t*saclPresent = _p0 != 0\n\t*saclDefaulted = _p1 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procGetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {\n\tr0, _, _ := syscall.SyscallN(procGetSidIdentifierAuthority.Addr(), uintptr(unsafe.Pointer(sid)))\n\tauthority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetSidSubAuthority.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(index))\n\tsubAuthority = (*uint32)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc getSidSubAuthorityCount(sid *SID) (count *uint8) {\n\tr0, _, _ := syscall.SyscallN(procGetSidSubAuthorityCount.Addr(), uintptr(unsafe.Pointer(sid)))\n\tcount = (*uint8)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ImpersonateSelf(impersonationlevel uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(impersonationlevel))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procInitializeSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {\n\tvar _p0 uint32\n\tif forceAppsClosed {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif rebootAfterShutdown {\n\t\t_p1 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procInitiateSystemShutdownExW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc isTokenRestricted(tokenHandle Token) (ret bool, err error) {\n\tr0, _, e1 := syscall.SyscallN(procIsTokenRestricted.Addr(), uintptr(tokenHandle))\n\tret = r0 != 0\n\tif !ret {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {\n\tr0, _, _ := syscall.SyscallN(procIsValidSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(sd)))\n\tisValid = r0 != 0\n\treturn\n}\n\nfunc isValidSid(sid *SID) (isValid bool) {\n\tr0, _, _ := syscall.SyscallN(procIsValidSid.Addr(), uintptr(unsafe.Pointer(sid)))\n\tisValid = r0 != 0\n\treturn\n}\n\nfunc isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {\n\tr0, _, _ := syscall.SyscallN(procIsWellKnownSid.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(sidType))\n\tisWellKnown = r0 != 0\n\treturn\n}\n\nfunc LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procMakeAbsoluteSD.Addr(), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procMakeSelfRelativeSD.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procNotifyServiceStatusChangeW.Addr(), uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc OpenProcessToken(process Handle, access uint32, token *Token) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procOpenProcessToken.Addr(), uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procOpenSCManagerW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procOpenServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) {\n\tvar _p0 uint32\n\tif openAsSelf {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceConfigW.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) {\n\terr = procQueryServiceDynamicInformation.Find()\n\tif err != nil {\n\t\treturn\n\t}\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceDynamicInformation.Addr(), uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceLockStatusW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(status)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryServiceStatusEx.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc RegCloseKey(key Handle) (regerrno error) {\n\tr0, _, _ := syscall.SyscallN(procRegCloseKey.Addr(), uintptr(key))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {\n\tr0, _, _ := syscall.SyscallN(procRegEnumKeyExW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) {\n\tvar _p0 uint32\n\tif watchSubtree {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif asynchronous {\n\t\t_p1 = 1\n\t}\n\tr0, _, _ := syscall.SyscallN(procRegNotifyChangeKeyValue.Addr(), uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {\n\tr0, _, _ := syscall.SyscallN(procRegOpenKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {\n\tr0, _, _ := syscall.SyscallN(procRegQueryInfoKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {\n\tr0, _, _ := syscall.SyscallN(procRegQueryValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))\n\tif r0 != 0 {\n\t\tregerrno = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procRegisterEventSourceW.Addr(), uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procRegisterServiceCtrlHandlerExW.Addr(), uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procReportEventW.Addr(), uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc RevertToSelf() (err error) {\n\tr1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr())\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procSetEntriesInAclW.Addr(), uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetKernelObjectSecurity.Addr(), uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {\n\tvar _p0 *uint16\n\t_p0, ret = syscall.UTF16PtrFromString(objectName)\n\tif ret != nil {\n\t\treturn\n\t}\n\treturn _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)\n}\n\nfunc _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procSetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {\n\tvar _p0 uint32\n\tif daclPresent {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif daclDefaulted {\n\t\t_p1 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {\n\tvar _p0 uint32\n\tif groupDefaulted {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {\n\tvar _p0 uint32\n\tif ownerDefaulted {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {\n\tsyscall.SyscallN(procSetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))\n\treturn\n}\n\nfunc setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {\n\tvar _p0 uint32\n\tif saclPresent {\n\t\t_p0 = 1\n\t}\n\tvar _p1 uint32\n\tif saclDefaulted {\n\t\t_p1 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procSetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceStatus)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetThreadToken(thread *Handle, token Token) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetThreadToken.Addr(), uintptr(unsafe.Pointer(thread)), uintptr(token))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procStartServiceCtrlDispatcherW.Addr(), uintptr(unsafe.Pointer(serviceTable)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procStartServiceW.Addr(), uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertAddCertificateContextToStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertCloseStore(store Handle, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertCloseStore.Addr(), uintptr(store), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertCreateCertificateContext.Addr(), uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))\n\tcontext = (*CertContext)(unsafe.Pointer(r0))\n\tif context == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertDeleteCertificateFromStore(certContext *CertContext) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertDeleteCertificateFromStore.Addr(), uintptr(unsafe.Pointer(certContext)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {\n\tr0, _, _ := syscall.SyscallN(procCertDuplicateCertificateContext.Addr(), uintptr(unsafe.Pointer(certContext)))\n\tdupContext = (*CertContext)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertEnumCertificatesInStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(prevContext)))\n\tcontext = (*CertContext)(unsafe.Pointer(r0))\n\tif context == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertFindCertificateInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))\n\tcert = (*CertContext)(unsafe.Pointer(r0))\n\tif cert == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertFindChainInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))\n\tcertchain = (*CertChainContext)(unsafe.Pointer(r0))\n\tif certchain == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {\n\tr0, _, _ := syscall.SyscallN(procCertFindExtension.Addr(), uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))\n\tret = (*CertExtension)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc CertFreeCertificateChain(ctx *CertChainContext) {\n\tsyscall.SyscallN(procCertFreeCertificateChain.Addr(), uintptr(unsafe.Pointer(ctx)))\n\treturn\n}\n\nfunc CertFreeCertificateContext(ctx *CertContext) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertFreeCertificateContext.Addr(), uintptr(unsafe.Pointer(ctx)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertGetCertificateChain.Addr(), uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) {\n\tr0, _, _ := syscall.SyscallN(procCertGetNameStringW.Addr(), uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))\n\tchars = uint32(r0)\n\treturn\n}\n\nfunc CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertOpenStore.Addr(), uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCertOpenSystemStoreW.Addr(), uintptr(hprov), uintptr(unsafe.Pointer(name)))\n\tstore = Handle(r0)\n\tif store == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCertVerifyCertificateChainPolicy.Addr(), uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) {\n\tvar _p0 uint32\n\tif *callerFreeProvOrNCryptKey {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procCryptAcquireCertificatePrivateKey.Addr(), uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))\n\t*callerFreeProvOrNCryptKey = _p0 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptDecodeObject.Addr(), uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptProtectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptQueryObject.Addr(), uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCryptUnprotectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procPFXImportCertStore.Addr(), uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))\n\tstore = Handle(r0)\n\tif store == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {\n\tr0, _, _ := syscall.SyscallN(procDnsNameCompare_W.Addr(), uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)))\n\tsame = r0 != 0\n\treturn\n}\n\nfunc DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {\n\tvar _p0 *uint16\n\t_p0, status = syscall.UTF16PtrFromString(name)\n\tif status != nil {\n\t\treturn\n\t}\n\treturn _DnsQuery(_p0, qtype, options, extra, qrs, pr)\n}\n\nfunc _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {\n\tr0, _, _ := syscall.SyscallN(procDnsQuery_W.Addr(), uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))\n\tif r0 != 0 {\n\t\tstatus = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc DnsRecordListFree(rl *DNSRecord, freetype uint32) {\n\tsyscall.SyscallN(procDnsRecordListFree.Addr(), uintptr(unsafe.Pointer(rl)), uintptr(freetype))\n\treturn\n}\n\nfunc DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procDwmGetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procDwmSetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procCancelMibChangeNotify2.Addr(), uintptr(notificationHandle))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc FreeMibTable(memory unsafe.Pointer) {\n\tsyscall.SyscallN(procFreeMibTable.Addr(), uintptr(memory))\n\treturn\n}\n\nfunc GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetAdaptersInfo.Addr(), uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetBestInterfaceEx.Addr(), uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetIfEntry(pIfRow *MibIfRow) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetIfEntry.Addr(), uintptr(unsafe.Pointer(pIfRow)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetIfEntry2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(row)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetIpForwardTable2.Addr(), uintptr(family), uintptr(unsafe.Pointer(table)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {\n\tr0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {\n\tvar _p0 uint32\n\tif initialNotification {\n\t\t_p0 = 1\n\t}\n\tr0, _, _ := syscall.SyscallN(procNotifyIpInterfaceChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {\n\tvar _p0 uint32\n\tif initialNotification {\n\t\t_p0 = 1\n\t}\n\tr0, _, _ := syscall.SyscallN(procNotifyRouteChange2.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {\n\tvar _p0 uint32\n\tif initialNotification {\n\t\t_p0 = 1\n\t}\n\tr0, _, _ := syscall.SyscallN(procNotifyUnicastIpAddressChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))\n\tif r0 != 0 {\n\t\terrcode = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc AddDllDirectory(path *uint16) (cookie uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procAddDllDirectory.Addr(), uintptr(unsafe.Pointer(path)))\n\tcookie = uintptr(r0)\n\tif cookie == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc AssignProcessToJobObject(job Handle, process Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procAssignProcessToJobObject.Addr(), uintptr(job), uintptr(process))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CancelIo(s Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCancelIo.Addr(), uintptr(s))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CancelIoEx(s Handle, o *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(s), uintptr(unsafe.Pointer(o)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ClearCommBreak(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procClearCommBreak.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procClearCommError.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CloseHandle(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCloseHandle.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ClosePseudoConsole(console Handle) {\n\tsyscall.SyscallN(procClosePseudoConsole.Addr(), uintptr(console))\n\treturn\n}\n\nfunc ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCreateDirectoryW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateEventExW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))\n\thandle = Handle(r0)\n\tif handle == 0 || e1 == ERROR_ALREADY_EXISTS {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateEventW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 || e1 == ERROR_ALREADY_EXISTS {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateFileMappingW.Addr(), uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 || e1 == ERROR_ALREADY_EXISTS {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCreateHardLinkW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))\n\tif r1&0xff == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateJobObjectW.Addr(), uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateMutexExW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))\n\thandle = Handle(r0)\n\tif handle == 0 || e1 == ERROR_ALREADY_EXISTS {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {\n\tvar _p0 uint32\n\tif initialOwner {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procCreateMutexW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 || e1 == ERROR_ALREADY_EXISTS {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCreatePipe.Addr(), uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {\n\tvar _p0 uint32\n\tif inheritHandles {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procCreateProcessW.Addr(), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) {\n\tr0, _, _ := syscall.SyscallN(procCreatePseudoConsole.Addr(), uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)))\n\tif r0 != 0 {\n\t\thr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procCreateSymbolicLinkW.Addr(), uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))\n\tif r1&0xff == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCreateToolhelp32Snapshot.Addr(), uintptr(flags), uintptr(processId))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDefineDosDeviceW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DeleteFile(path *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDeleteFileW.Addr(), uintptr(unsafe.Pointer(path)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) {\n\tsyscall.SyscallN(procDeleteProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)))\n\treturn\n}\n\nfunc DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDeleteVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDeviceIoControl.Addr(), uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DisconnectNamedPipe(pipe Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {\n\tvar _p0 uint32\n\tif bInheritHandle {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procDuplicateHandle.Addr(), uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEscapeCommFunction.Addr(), uintptr(handle), uintptr(dwFunc))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ExitProcess(exitcode uint32) {\n\tsyscall.SyscallN(procExitProcess.Addr(), uintptr(exitcode))\n\treturn\n}\n\nfunc ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindClose(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindClose.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindCloseChangeNotification(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindCloseChangeNotification.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _FindFirstChangeNotification(_p0, watchSubtree, notifyFilter)\n}\n\nfunc _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {\n\tvar _p1 uint32\n\tif watchSubtree {\n\t\t_p1 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procFindFirstChangeNotificationW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procFindFirstFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procFindFirstVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procFindFirstVolumeW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindNextChangeNotification(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindNextChangeNotification.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc findNextFile1(handle Handle, data *win32finddata1) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindNextFileW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindNextVolumeMountPointW.Addr(), uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindNextVolumeW.Addr(), uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procFindResourceW.Addr(), uintptr(module), uintptr(name), uintptr(resType))\n\tresInfo = Handle(r0)\n\tif resInfo == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindVolumeClose(findVolume Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindVolumeClose.Addr(), uintptr(findVolume))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFindVolumeMountPointClose.Addr(), uintptr(findVolumeMountPoint))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FlushConsoleInputBuffer(console Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFlushConsoleInputBuffer.Addr(), uintptr(console))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FlushFileBuffers(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FlushViewOfFile(addr uintptr, length uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFlushViewOfFile.Addr(), uintptr(addr), uintptr(length))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {\n\tvar _p0 *uint16\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, _, e1 := syscall.SyscallN(procFormatMessageW.Addr(), uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FreeEnvironmentStrings(envs *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFreeEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(envs)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc FreeLibrary(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procFreeLibrary.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGenerateConsoleCtrlEvent.Addr(), uintptr(ctrlEvent), uintptr(processGroupID))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetACP() (acp uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetACP.Addr())\n\tacp = uint32(r0)\n\treturn\n}\n\nfunc GetActiveProcessorCount(groupNumber uint16) (ret uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetActiveProcessorCount.Addr(), uintptr(groupNumber))\n\tret = uint32(r0)\n\treturn\n}\n\nfunc GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetCommModemStatus.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetCommState(handle Handle, lpDCB *DCB) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetCommandLine() (cmd *uint16) {\n\tr0, _, _ := syscall.SyscallN(procGetCommandLineW.Addr())\n\tcmd = (*uint16)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetComputerNameExW.Addr(), uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetComputerName(buf *uint16, n *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetComputerNameW.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetConsoleCP() (cp uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetConsoleCP.Addr())\n\tcp = uint32(r0)\n\tif cp == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetConsoleMode(console Handle, mode *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetConsoleMode.Addr(), uintptr(console), uintptr(unsafe.Pointer(mode)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetConsoleOutputCP() (cp uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetConsoleOutputCP.Addr())\n\tcp = uint32(r0)\n\tif cp == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetConsoleScreenBufferInfo.Addr(), uintptr(console), uintptr(unsafe.Pointer(info)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetCurrentDirectoryW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetCurrentProcessId() (pid uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetCurrentProcessId.Addr())\n\tpid = uint32(r0)\n\treturn\n}\n\nfunc GetCurrentThreadId() (id uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetCurrentThreadId.Addr())\n\tid = uint32(r0)\n\treturn\n}\n\nfunc GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetDiskFreeSpaceExW.Addr(), uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetDriveType(rootPathName *uint16) (driveType uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetDriveTypeW.Addr(), uintptr(unsafe.Pointer(rootPathName)))\n\tdriveType = uint32(r0)\n\treturn\n}\n\nfunc GetEnvironmentStrings() (envs *uint16, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetEnvironmentStringsW.Addr())\n\tenvs = (*uint16)(unsafe.Pointer(r0))\n\tif envs == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetExitCodeProcess.Addr(), uintptr(handle), uintptr(unsafe.Pointer(exitcode)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetFileAttributesExW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileAttributes(name *uint16) (attrs uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)))\n\tattrs = uint32(r0)\n\tif attrs == INVALID_FILE_ATTRIBUTES {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetFileInformationByHandle.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetFileInformationByHandleEx.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileType(filehandle Handle) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetFileType.Addr(), uintptr(filehandle))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetFinalPathNameByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetFullPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetLargePageMinimum() (size uintptr) {\n\tr0, _, _ := syscall.SyscallN(procGetLargePageMinimum.Addr())\n\tsize = uintptr(r0)\n\treturn\n}\n\nfunc GetLastError() (lasterr error) {\n\tr0, _, _ := syscall.SyscallN(procGetLastError.Addr())\n\tif r0 != 0 {\n\t\tlasterr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetLogicalDriveStringsW.Addr(), uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetLogicalDrives() (drivesBitMask uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetLogicalDrives.Addr())\n\tdrivesBitMask = uint32(r0)\n\tif drivesBitMask == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetLongPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {\n\tr0, _, _ := syscall.SyscallN(procGetMaximumProcessorCount.Addr(), uintptr(groupNumber))\n\tret = uint32(r0)\n\treturn\n}\n\nfunc GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetModuleFileNameW.Addr(), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetModuleHandleExW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeClientProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNamedPipeServerProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetNumberOfConsoleInputEvents.Addr(), uintptr(console), uintptr(unsafe.Pointer(numevents)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {\n\tvar _p0 uint32\n\tif wait {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procGetOverlappedResult.Addr(), uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetPriorityClass(process Handle) (ret uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetPriorityClass.Addr(), uintptr(process))\n\tret = uint32(r0)\n\tif ret == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProcAddress(module Handle, procname string) (proc uintptr, err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(procname)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetProcAddress(module, _p0)\n}\n\nfunc _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetProcAddress.Addr(), uintptr(module), uintptr(unsafe.Pointer(procname)))\n\tproc = uintptr(r0)\n\tif proc == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProcessId(process Handle) (id uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetProcessId.Addr(), uintptr(process))\n\tid = uint32(r0)\n\tif id == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetProcessPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetProcessShutdownParameters.Addr(), uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetProcessTimes.Addr(), uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {\n\tsyscall.SyscallN(procGetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)))\n\treturn\n}\n\nfunc GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetShortPathNameW.Addr(), uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getStartupInfo(startupInfo *StartupInfo) {\n\tsyscall.SyscallN(procGetStartupInfoW.Addr(), uintptr(unsafe.Pointer(startupInfo)))\n\treturn\n}\n\nfunc GetStdHandle(stdhandle uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetStdHandle.Addr(), uintptr(stdhandle))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetSystemDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))\n\tlen = uint32(r0)\n\tif len == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetSystemPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetSystemTimeAsFileTime(time *Filetime) {\n\tsyscall.SyscallN(procGetSystemTimeAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))\n\treturn\n}\n\nfunc GetSystemTimePreciseAsFileTime(time *Filetime) {\n\tsyscall.SyscallN(procGetSystemTimePreciseAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))\n\treturn\n}\n\nfunc getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetSystemWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))\n\tlen = uint32(r0)\n\tif len == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetTempPathW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetThreadPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getTickCount64() (ms uint64) {\n\tr0, _, _ := syscall.SyscallN(procGetTickCount64.Addr())\n\tms = uint64(r0)\n\treturn\n}\n\nfunc GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetTimeZoneInformation.Addr(), uintptr(unsafe.Pointer(tzi)))\n\trc = uint32(r0)\n\tif rc == 0xffffffff {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetUserPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVersion() (ver uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetVersion.Addr())\n\tver = uint32(r0)\n\tif ver == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetVolumeInformationByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetVolumeInformationW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetVolumeNameForVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetVolumePathNameW.Addr(), uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetVolumePathNamesForVolumeNameW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))\n\tlen = uint32(r0)\n\tif len == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procInitializeProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc IsProcessorFeaturePresent(ProcessorFeature uint32) (ret bool) {\n\tr0, _, _ := syscall.SyscallN(procIsProcessorFeaturePresent.Addr(), uintptr(ProcessorFeature))\n\tret = r0 != 0\n\treturn\n}\n\nfunc IsWow64Process(handle Handle, isWow64 *bool) (err error) {\n\tvar _p0 uint32\n\tif *isWow64 {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procIsWow64Process.Addr(), uintptr(handle), uintptr(unsafe.Pointer(&_p0)))\n\t*isWow64 = _p0 != 0\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) {\n\terr = procIsWow64Process2.Find()\n\tif err != nil {\n\t\treturn\n\t}\n\tr1, _, e1 := syscall.SyscallN(procIsWow64Process2.Addr(), uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(libname)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _LoadLibraryEx(_p0, zero, flags)\n}\n\nfunc _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLoadLibraryExW.Addr(), uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LoadLibrary(libname string) (handle Handle, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(libname)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _LoadLibrary(_p0)\n}\n\nfunc _LoadLibrary(libname *uint16) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLoadLibraryW.Addr(), uintptr(unsafe.Pointer(libname)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLoadResource.Addr(), uintptr(module), uintptr(resInfo))\n\tresData = Handle(r0)\n\tif resData == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLocalAlloc.Addr(), uintptr(flags), uintptr(length))\n\tptr = uintptr(r0)\n\tif ptr == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LocalFree(hmem Handle) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLocalFree.Addr(), uintptr(hmem))\n\thandle = Handle(r0)\n\tif handle != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procLockFileEx.Addr(), uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc LockResource(resData Handle) (addr uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLockResource.Addr(), uintptr(resData))\n\taddr = uintptr(r0)\n\tif addr == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procMapViewOfFile.Addr(), uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length))\n\taddr = uintptr(r0)\n\tif addr == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procModule32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procModule32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procMoveFileExW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc MoveFile(from *uint16, to *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procMoveFileW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procMultiByteToWideChar.Addr(), uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))\n\tnwrite = int32(r0)\n\tif nwrite == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {\n\tvar _p0 uint32\n\tif inheritHandle {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procOpenEventW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {\n\tvar _p0 uint32\n\tif inheritHandle {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procOpenMutexW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) {\n\tvar _p0 uint32\n\tif inheritHandle {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procOpenProcess.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(processId))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) {\n\tvar _p0 uint32\n\tif inheritHandle {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procOpenThread.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))\n\thandle = Handle(r0)\n\tif handle == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procPostQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procProcess32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procProcess32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procProcessIdToSessionId.Addr(), uintptr(pid), uintptr(unsafe.Pointer(sessionid)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc PulseEvent(event Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procPulseEvent.Addr(), uintptr(event))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc PurgeComm(handle Handle, dwFlags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procPurgeComm.Addr(), uintptr(handle), uintptr(dwFlags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procQueryDosDeviceW.Addr(), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))\n\tn = uint32(r0)\n\tif n == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryFullProcessImageNameW.Addr(), uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procReadConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {\n\tvar _p0 uint32\n\tif watchSubTree {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procReadDirectoryChangesW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr1, _, e1 := syscall.SyscallN(procReadFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procReadProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ReleaseMutex(mutex Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procReleaseMutex.Addr(), uintptr(mutex))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc RemoveDirectory(path *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procRemoveDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc RemoveDllDirectory(cookie uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procRemoveDllDirectory.Addr(), uintptr(cookie))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ResetEvent(event Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procResetEvent.Addr(), uintptr(event))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc resizePseudoConsole(pconsole Handle, size uint32) (hr error) {\n\tr0, _, _ := syscall.SyscallN(procResizePseudoConsole.Addr(), uintptr(pconsole), uintptr(size))\n\tif r0 != 0 {\n\t\thr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc ResumeThread(thread Handle) (ret uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procResumeThread.Addr(), uintptr(thread))\n\tret = uint32(r0)\n\tif ret == 0xffffffff {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetCommBreak(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetCommBreak.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetCommMask(handle Handle, dwEvtMask uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetCommMask.Addr(), uintptr(handle), uintptr(dwEvtMask))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetCommState(handle Handle, lpDCB *DCB) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetConsoleCP(cp uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetConsoleCP.Addr(), uintptr(cp))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setConsoleCursorPosition(console Handle, position uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetConsoleCursorPosition.Addr(), uintptr(console), uintptr(position))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetConsoleMode(console Handle, mode uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetConsoleMode.Addr(), uintptr(console), uintptr(mode))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetConsoleOutputCP(cp uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetConsoleOutputCP.Addr(), uintptr(cp))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetCurrentDirectory(path *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetCurrentDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetDefaultDllDirectories(directoryFlags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetDefaultDllDirectories.Addr(), uintptr(directoryFlags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetDllDirectory(path string) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _SetDllDirectory(_p0)\n}\n\nfunc _SetDllDirectory(path *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetDllDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetEndOfFile(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetEndOfFile.Addr(), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetEnvironmentVariable(name *uint16, value *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetErrorMode(mode uint32) (ret uint32) {\n\tr0, _, _ := syscall.SyscallN(procSetErrorMode.Addr(), uintptr(mode))\n\tret = uint32(r0)\n\treturn\n}\n\nfunc SetEvent(event Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetEvent.Addr(), uintptr(event))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFileAttributes(name *uint16, attrs uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(attrs))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(handle), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileInformationByHandle.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSetFilePointer.Addr(), uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence))\n\tnewlowoffset = uint32(r0)\n\tif newlowoffset == 0xffffffff {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetFileValidData(handle Handle, validDataLength int64) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetFileValidData.Addr(), uintptr(handle), uintptr(validDataLength))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetHandleInformation.Addr(), uintptr(handle), uintptr(mask), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSetInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength))\n\tret = int(r0)\n\tif ret == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetNamedPipeHandleState.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetPriorityClass(process Handle, priorityClass uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetPriorityClass.Addr(), uintptr(process), uintptr(priorityClass))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetProcessPriorityBoost(process Handle, disable bool) (err error) {\n\tvar _p0 uint32\n\tif disable {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procSetProcessPriorityBoost.Addr(), uintptr(process), uintptr(_p0))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetProcessShutdownParameters(level uint32, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetProcessShutdownParameters.Addr(), uintptr(level), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetStdHandle(stdhandle uint32, handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetStdHandle.Addr(), uintptr(stdhandle), uintptr(handle))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetVolumeLabelW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupComm.Addr(), uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSizeofResource.Addr(), uintptr(module), uintptr(resInfo))\n\tsize = uint32(r0)\n\tif size == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SleepEx(milliseconds uint32, alertable bool) (ret uint32) {\n\tvar _p0 uint32\n\tif alertable {\n\t\t_p0 = 1\n\t}\n\tr0, _, _ := syscall.SyscallN(procSleepEx.Addr(), uintptr(milliseconds), uintptr(_p0))\n\tret = uint32(r0)\n\treturn\n}\n\nfunc TerminateJobObject(job Handle, exitCode uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procTerminateJobObject.Addr(), uintptr(job), uintptr(exitCode))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc TerminateProcess(handle Handle, exitcode uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procTerminateProcess.Addr(), uintptr(handle), uintptr(exitcode))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procThread32First.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procThread32Next.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procUnlockFileEx.Addr(), uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc UnmapViewOfFile(addr uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procUnmapViewOfFile.Addr(), uintptr(addr))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procUpdateProcThreadAttribute.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {\n\tr0, _, e1 := syscall.SyscallN(procVirtualAlloc.Addr(), uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect))\n\tvalue = uintptr(r0)\n\tif value == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualFree.Addr(), uintptr(address), uintptr(size), uintptr(freetype))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualLock(addr uintptr, length uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualLock.Addr(), uintptr(addr), uintptr(length))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualProtect.Addr(), uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualProtectEx.Addr(), uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualQuery.Addr(), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualQueryEx.Addr(), uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VirtualUnlock(addr uintptr, length uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVirtualUnlock.Addr(), uintptr(addr), uintptr(length))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WTSGetActiveConsoleSessionId() (sessionID uint32) {\n\tr0, _, _ := syscall.SyscallN(procWTSGetActiveConsoleSessionId.Addr())\n\tsessionID = uint32(r0)\n\treturn\n}\n\nfunc WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWaitCommEvent.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {\n\tvar _p0 uint32\n\tif waitAll {\n\t\t_p0 = 1\n\t}\n\tr0, _, e1 := syscall.SyscallN(procWaitForMultipleObjects.Addr(), uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds))\n\tevent = uint32(r0)\n\tif event == 0xffffffff {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procWaitForSingleObject.Addr(), uintptr(handle), uintptr(waitMilliseconds))\n\tevent = uint32(r0)\n\tif event == 0xffffffff {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWriteConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr1, _, e1 := syscall.SyscallN(procWriteFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWriteProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procAcceptEx.Addr(), uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {\n\tsyscall.SyscallN(procGetAcceptExSockaddrs.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)))\n\treturn\n}\n\nfunc TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procTransmitFile.Addr(), uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc NetApiBufferFree(buf *byte) (neterr error) {\n\tr0, _, _ := syscall.SyscallN(procNetApiBufferFree.Addr(), uintptr(unsafe.Pointer(buf)))\n\tif r0 != 0 {\n\t\tneterr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {\n\tr0, _, _ := syscall.SyscallN(procNetGetJoinInformation.Addr(), uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))\n\tif r0 != 0 {\n\t\tneterr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) {\n\tr0, _, _ := syscall.SyscallN(procNetUserEnum.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)))\n\tif r0 != 0 {\n\t\tneterr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {\n\tr0, _, _ := syscall.SyscallN(procNetUserGetInfo.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)))\n\tif r0 != 0 {\n\t\tneterr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtCreateFile.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtQuerySystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtSetInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procNtSetSystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {\n\tr0, _, _ := syscall.SyscallN(procRtlAddFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))\n\tret = r0 != 0\n\treturn\n}\n\nfunc RtlDefaultNpAcl(acl **ACL) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(acl)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {\n\tr0, _, _ := syscall.SyscallN(procRtlDeleteFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)))\n\tret = r0 != 0\n\treturn\n}\n\nfunc RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc RtlGetCurrentPeb() (peb *PEB) {\n\tr0, _, _ := syscall.SyscallN(procRtlGetCurrentPeb.Addr())\n\tpeb = (*PEB)(unsafe.Pointer(r0))\n\treturn\n}\n\nfunc rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {\n\tsyscall.SyscallN(procRtlGetNtVersionNumbers.Addr(), uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))\n\treturn\n}\n\nfunc rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {\n\tr0, _, _ := syscall.SyscallN(procRtlGetVersion.Addr(), uintptr(unsafe.Pointer(info)))\n\tif r0 != 0 {\n\t\tntstatus = NTStatus(r0)\n\t}\n\treturn\n}\n\nfunc RtlInitString(destinationString *NTString, sourceString *byte) {\n\tsyscall.SyscallN(procRtlInitString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))\n\treturn\n}\n\nfunc RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) {\n\tsyscall.SyscallN(procRtlInitUnicodeString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))\n\treturn\n}\n\nfunc rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) {\n\tr0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(ntstatus))\n\tret = syscall.Errno(r0)\n\treturn\n}\n\nfunc clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procCLSIDFromString.Addr(), uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc coCreateGuid(pguid *GUID) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procCoCreateGuid.Addr(), uintptr(unsafe.Pointer(pguid)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procCoGetObject.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procCoInitializeEx.Addr(), uintptr(reserved), uintptr(coInit))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc CoTaskMemFree(address unsafe.Pointer) {\n\tsyscall.SyscallN(procCoTaskMemFree.Addr(), uintptr(address))\n\treturn\n}\n\nfunc CoUninitialize() {\n\tsyscall.SyscallN(procCoUninitialize.Addr())\n\treturn\n}\n\nfunc stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {\n\tr0, _, _ := syscall.SyscallN(procStringFromGUID2.Addr(), uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))\n\tchars = int32(r0)\n\treturn\n}\n\nfunc EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumProcessModules.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumProcessModulesEx.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumProcesses.Addr(), uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetModuleBaseNameW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetModuleFileNameExW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetModuleInformation.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procQueryWorkingSetEx.Addr(), uintptr(process), uintptr(pv), uintptr(cb))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {\n\tret = procSubscribeServiceChangeNotifications.Find()\n\tif ret != nil {\n\t\treturn\n\t}\n\tr0, _, _ := syscall.SyscallN(procSubscribeServiceChangeNotifications.Addr(), uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) {\n\terr = procUnsubscribeServiceChangeNotifications.Find()\n\tif err != nil {\n\t\treturn\n\t}\n\tsyscall.SyscallN(procUnsubscribeServiceChangeNotifications.Addr(), uintptr(subscription))\n\treturn\n}\n\nfunc GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetUserNameExW.Addr(), uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))\n\tif r1&0xff == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procTranslateNameW.Addr(), uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)))\n\tif r1&0xff == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiBuildDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiCallClassInstaller.Addr(), uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiCancelDriverInfoSearch.Addr(), uintptr(deviceInfoSet))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiClassGuidsFromNameExW.Addr(), uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiClassNameFromGuidExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoListExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))\n\thandle = DevInfo(r0)\n\tif handle == DevInfo(InvalidHandle) {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiDestroyDeviceInfoList.Addr(), uintptr(deviceInfoSet))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiDestroyDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiEnumDeviceInfo.Addr(), uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiEnumDriverInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSetupDiGetClassDevsExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))\n\thandle = DevInfo(r0)\n\tif handle == DevInfo(InvalidHandle) {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInfoListDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstanceIdW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDevicePropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetDriverInfoDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procSetupDiOpenDevRegKey.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))\n\tkey = Handle(r0)\n\tif key == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiSetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procSetupUninstallOEMInfW.Addr(), uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {\n\tr0, _, e1 := syscall.SyscallN(procCommandLineToArgvW.Addr(), uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)))\n\targv = (**uint16)(unsafe.Pointer(r0))\n\tif argv == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procSHGetKnownFolderPath.Addr(), uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procShellExecuteW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))\n\tif r1 <= 32 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {\n\tsyscall.SyscallN(procEnumChildWindows.Addr(), uintptr(hwnd), uintptr(enumFunc), uintptr(param))\n\treturn\n}\n\nfunc EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procEnumWindows.Addr(), uintptr(enumFunc), uintptr(param))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ExitWindowsEx(flags uint32, reason uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procExitWindowsEx.Addr(), uintptr(flags), uintptr(reason))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetClassNameW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))\n\tcopied = int32(r0)\n\tif copied == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetDesktopWindow() (hwnd HWND) {\n\tr0, _, _ := syscall.SyscallN(procGetDesktopWindow.Addr())\n\thwnd = HWND(r0)\n\treturn\n}\n\nfunc GetForegroundWindow() (hwnd HWND) {\n\tr0, _, _ := syscall.SyscallN(procGetForegroundWindow.Addr())\n\thwnd = HWND(r0)\n\treturn\n}\n\nfunc GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetGUIThreadInfo.Addr(), uintptr(thread), uintptr(unsafe.Pointer(info)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetKeyboardLayout(tid uint32) (hkl Handle) {\n\tr0, _, _ := syscall.SyscallN(procGetKeyboardLayout.Addr(), uintptr(tid))\n\thkl = Handle(r0)\n\treturn\n}\n\nfunc GetShellWindow() (shellWindow HWND) {\n\tr0, _, _ := syscall.SyscallN(procGetShellWindow.Addr())\n\tshellWindow = HWND(r0)\n\treturn\n}\n\nfunc GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetWindowThreadProcessId.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(pid)))\n\ttid = uint32(r0)\n\tif tid == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc IsWindow(hwnd HWND) (isWindow bool) {\n\tr0, _, _ := syscall.SyscallN(procIsWindow.Addr(), uintptr(hwnd))\n\tisWindow = r0 != 0\n\treturn\n}\n\nfunc IsWindowUnicode(hwnd HWND) (isUnicode bool) {\n\tr0, _, _ := syscall.SyscallN(procIsWindowUnicode.Addr(), uintptr(hwnd))\n\tisUnicode = r0 != 0\n\treturn\n}\n\nfunc IsWindowVisible(hwnd HWND) (isVisible bool) {\n\tr0, _, _ := syscall.SyscallN(procIsWindowVisible.Addr(), uintptr(hwnd))\n\tisVisible = r0 != 0\n\treturn\n}\n\nfunc LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procLoadKeyboardLayoutW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags))\n\thkl = Handle(r0)\n\tif hkl == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procMessageBoxW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype))\n\tret = int32(r0)\n\tif ret == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) {\n\tr0, _, _ := syscall.SyscallN(procToUnicodeEx.Addr(), uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl))\n\tret = int32(r0)\n\treturn\n}\n\nfunc UnloadKeyboardLayout(hkl Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procUnloadKeyboardLayout.Addr(), uintptr(hkl))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {\n\tvar _p0 uint32\n\tif inheritExisting {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procCreateEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc DestroyEnvironmentBlock(block *uint16) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procDestroyEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetUserProfileDirectoryW.Addr(), uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(filename)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetFileVersionInfoSize(_p0, zeroHandle)\n}\n\nfunc _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procGetFileVersionInfoSizeW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)))\n\tbufSize = uint32(r0)\n\tif bufSize == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(filename)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetFileVersionInfo(_p0, handle, bufSize, buffer)\n}\n\nfunc _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procGetFileVersionInfoW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {\n\tvar _p0 *uint16\n\t_p0, err = syscall.UTF16PtrFromString(subBlock)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize)\n}\n\nfunc _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procVerQueryValueW.Addr(), uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc TimeBeginPeriod(period uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(proctimeBeginPeriod.Addr(), uintptr(period))\n\tif r1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc TimeEndPeriod(period uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(proctimeEndPeriod.Addr(), uintptr(period))\n\tif r1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {\n\tr0, _, _ := syscall.SyscallN(procWinVerifyTrustEx.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))\n\tif r0 != 0 {\n\t\tret = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc FreeAddrInfoW(addrinfo *AddrinfoW) {\n\tsyscall.SyscallN(procFreeAddrInfoW.Addr(), uintptr(unsafe.Pointer(addrinfo)))\n\treturn\n}\n\nfunc GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {\n\tr0, _, _ := syscall.SyscallN(procGetAddrInfoW.Addr(), uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)))\n\tif r0 != 0 {\n\t\tsockerr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc WSACleanup() (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSACleanup.Addr())\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSADuplicateSocketW.Addr(), uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info)))\n\tif r1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {\n\tr0, _, e1 := syscall.SyscallN(procWSAEnumProtocolsW.Addr(), uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))\n\tn = int32(r0)\n\tif n == -1 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {\n\tvar _p0 uint32\n\tif wait {\n\t\t_p0 = 1\n\t}\n\tr1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSAIoctl.Addr(), uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSALookupServiceBeginW.Addr(), uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSALookupServiceEnd(handle Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSALookupServiceEnd.Addr(), uintptr(handle))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSALookupServiceNextW.Addr(), uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSARecv.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSARecvFrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSASend.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWSASendTo.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procWSASocketW.Addr(), uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WSAStartup(verreq uint32, data *WSAData) (sockerr error) {\n\tr0, _, _ := syscall.SyscallN(procWSAStartup.Addr(), uintptr(verreq), uintptr(unsafe.Pointer(data)))\n\tif r0 != 0 {\n\t\tsockerr = syscall.Errno(r0)\n\t}\n\treturn\n}\n\nfunc bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Closesocket(s Handle) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procclosesocket.Addr(), uintptr(s))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procconnect.Addr(), uintptr(s), uintptr(name), uintptr(namelen))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetHostByName(name string) (h *Hostent, err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetHostByName(_p0)\n}\n\nfunc _GetHostByName(name *byte) (h *Hostent, err error) {\n\tr0, _, e1 := syscall.SyscallN(procgethostbyname.Addr(), uintptr(unsafe.Pointer(name)))\n\th = (*Hostent)(unsafe.Pointer(r0))\n\tif h == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetProtoByName(name string) (p *Protoent, err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetProtoByName(_p0)\n}\n\nfunc _GetProtoByName(name *byte) (p *Protoent, err error) {\n\tr0, _, e1 := syscall.SyscallN(procgetprotobyname.Addr(), uintptr(unsafe.Pointer(name)))\n\tp = (*Protoent)(unsafe.Pointer(r0))\n\tif p == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc GetServByName(name string, proto string) (s *Servent, err error) {\n\tvar _p0 *byte\n\t_p0, err = syscall.BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = syscall.BytePtrFromString(proto)\n\tif err != nil {\n\t\treturn\n\t}\n\treturn _GetServByName(_p0, _p1)\n}\n\nfunc _GetServByName(name *byte, proto *byte) (s *Servent, err error) {\n\tr0, _, e1 := syscall.SyscallN(procgetservbyname.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)))\n\ts = (*Servent)(unsafe.Pointer(r0))\n\tif s == nil {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procgetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc listen(s Handle, backlog int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(proclisten.Addr(), uintptr(s), uintptr(backlog))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Ntohs(netshort uint16) (u uint16) {\n\tr0, _, _ := syscall.SyscallN(procntohs.Addr(), uintptr(netshort))\n\tu = uint16(r0)\n\treturn\n}\n\nfunc recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr0, _, e1 := syscall.SyscallN(procrecvfrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int32(r0)\n\tif n == -1 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) {\n\tvar _p0 *byte\n\tif len(buf) > 0 {\n\t\t_p0 = &buf[0]\n\t}\n\tr1, _, e1 := syscall.SyscallN(procsendto.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procsetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc shutdown(s Handle, how int32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procshutdown.Addr(), uintptr(s), uintptr(how))\n\tif r1 == socket_error {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc socket(af int32, typ int32, protocol int32) (handle Handle, err error) {\n\tr0, _, e1 := syscall.SyscallN(procsocket.Addr(), uintptr(af), uintptr(typ), uintptr(protocol))\n\thandle = Handle(r0)\n\tif handle == InvalidHandle {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWTSEnumerateSessionsW.Addr(), uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\nfunc WTSFreeMemory(ptr uintptr) {\n\tsyscall.SyscallN(procWTSFreeMemory.Addr(), uintptr(ptr))\n\treturn\n}\n\nfunc WTSQueryUserToken(session uint32, token *Token) (err error) {\n\tr1, _, e1 := syscall.SyscallN(procWTSQueryUserToken.Addr(), uintptr(session), uintptr(unsafe.Pointer(token)))\n\tif r1 == 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/CONTRIBUTING.md",
    "content": "# Contributing to Go\n\nGo is an open source project.\n\nIt is the work of hundreds of contributors. We appreciate your help!\n\n## Filing issues\n\nWhen [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:\n\n1.  What version of Go are you using (`go version`)?\n2.  What operating system and processor architecture are you using?\n3.  What did you do?\n4.  What did you expect to see?\n5.  What did you see instead?\n\nGeneral questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.\nThe gophers there will answer or ask you to file an issue if you've tripped over a bug.\n\n## Contributing code\n\nPlease read the [Contribution Guidelines](https://golang.org/doc/contribute.html)\nbefore sending patches.\n\nUnless otherwise noted, the Go source files are distributed under\nthe BSD-style license found in the LICENSE file.\n"
  },
  {
    "path": "vendor/golang.org/x/term/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/term/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/term/README.md",
    "content": "# Go terminal/console support\n\n[![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term)\n\nThis repository provides Go terminal and console support packages.\n\n## Report Issues / Send Patches\n\nThis repository uses Gerrit for code changes. To learn how to submit changes to\nthis repository, see https://go.dev/doc/contribute.\n\nThe git repository is https://go.googlesource.com/term.\n\nThe main issue tracker for the term repository is located at\nhttps://go.dev/issues. Prefix your issue with \"x/term:\" in the\nsubject line, so it is easy to find.\n"
  },
  {
    "path": "vendor/golang.org/x/term/codereview.cfg",
    "content": "issuerepo: golang/go\n"
  },
  {
    "path": "vendor/golang.org/x/term/term.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package term provides support functions for dealing with terminals, as\n// commonly found on UNIX systems.\n//\n// Putting a terminal into raw mode is the most common requirement:\n//\n//\toldState, err := term.MakeRaw(int(os.Stdin.Fd()))\n//\tif err != nil {\n//\t        panic(err)\n//\t}\n//\tdefer term.Restore(int(os.Stdin.Fd()), oldState)\n//\n// Note that on non-Unix systems os.Stdin.Fd() may not be 0.\npackage term\n\n// State contains the state of a terminal.\ntype State struct {\n\tstate\n}\n\n// IsTerminal returns whether the given file descriptor is a terminal.\nfunc IsTerminal(fd int) bool {\n\treturn isTerminal(fd)\n}\n\n// MakeRaw puts the terminal connected to the given file descriptor into raw\n// mode and returns the previous state of the terminal so that it can be\n// restored.\nfunc MakeRaw(fd int) (*State, error) {\n\treturn makeRaw(fd)\n}\n\n// GetState returns the current state of a terminal which may be useful to\n// restore the terminal after a signal.\nfunc GetState(fd int) (*State, error) {\n\treturn getState(fd)\n}\n\n// Restore restores the terminal connected to the given file descriptor to a\n// previous state.\nfunc Restore(fd int, oldState *State) error {\n\treturn restore(fd, oldState)\n}\n\n// GetSize returns the visible dimensions of the given terminal.\n//\n// These dimensions don't include any scrollback buffer height.\nfunc GetSize(fd int) (width, height int, err error) {\n\treturn getSize(fd)\n}\n\n// ReadPassword reads a line of input from a terminal without local echo.  This\n// is commonly used for inputting passwords and other sensitive data. The slice\n// returned does not include the \\n.\nfunc ReadPassword(fd int) ([]byte, error) {\n\treturn readPassword(fd)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_plan9.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage term\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\n\t\"golang.org/x/sys/plan9\"\n)\n\ntype state struct{}\n\nfunc isTerminal(fd int) bool {\n\tpath, err := plan9.Fd2path(fd)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn path == \"/dev/cons\" || path == \"/mnt/term/dev/cons\"\n}\n\nfunc makeRaw(fd int) (*State, error) {\n\treturn nil, fmt.Errorf(\"terminal: MakeRaw not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc getState(fd int) (*State, error) {\n\treturn nil, fmt.Errorf(\"terminal: GetState not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc restore(fd int, state *State) error {\n\treturn fmt.Errorf(\"terminal: Restore not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc getSize(fd int) (width, height int, err error) {\n\treturn 0, 0, fmt.Errorf(\"terminal: GetSize not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc readPassword(fd int) ([]byte, error) {\n\treturn nil, fmt.Errorf(\"terminal: ReadPassword not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_unix.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos\n\npackage term\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\ntype state struct {\n\ttermios unix.Termios\n}\n\nfunc isTerminal(fd int) bool {\n\t_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\treturn err == nil\n}\n\nfunc makeRaw(fd int) (*State, error) {\n\ttermios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\toldState := State{state{termios: *termios}}\n\n\t// This attempts to replicate the behaviour documented for cfmakeraw in\n\t// the termios(3) manpage.\n\ttermios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON\n\ttermios.Oflag &^= unix.OPOST\n\ttermios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN\n\ttermios.Cflag &^= unix.CSIZE | unix.PARENB\n\ttermios.Cflag |= unix.CS8\n\ttermios.Cc[unix.VMIN] = 1\n\ttermios.Cc[unix.VTIME] = 0\n\tif err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &oldState, nil\n}\n\nfunc getState(fd int) (*State, error) {\n\ttermios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &State{state{termios: *termios}}, nil\n}\n\nfunc restore(fd int, state *State) error {\n\treturn unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios)\n}\n\nfunc getSize(fd int) (width, height int, err error) {\n\tws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)\n\tif err != nil {\n\t\treturn 0, 0, err\n\t}\n\treturn int(ws.Col), int(ws.Row), nil\n}\n\n// passwordReader is an io.Reader that reads from a specific file descriptor.\ntype passwordReader int\n\nfunc (r passwordReader) Read(buf []byte) (int, error) {\n\treturn unix.Read(int(r), buf)\n}\n\nfunc readPassword(fd int) ([]byte, error) {\n\ttermios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnewState := *termios\n\tnewState.Lflag &^= unix.ECHO\n\tnewState.Lflag |= unix.ICANON | unix.ISIG\n\tnewState.Iflag |= unix.ICRNL\n\tif err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)\n\n\treturn readPasswordLine(passwordReader(fd))\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_unix_bsd.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build darwin || dragonfly || freebsd || netbsd || openbsd\n\npackage term\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TIOCGETA\nconst ioctlWriteTermios = unix.TIOCSETA\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_unix_other.go",
    "content": "// Copyright 2021 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build aix || linux || solaris || zos\n\npackage term\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TCGETS\nconst ioctlWriteTermios = unix.TCSETS\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_unsupported.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9\n\npackage term\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n)\n\ntype state struct{}\n\nfunc isTerminal(fd int) bool {\n\treturn false\n}\n\nfunc makeRaw(fd int) (*State, error) {\n\treturn nil, fmt.Errorf(\"terminal: MakeRaw not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc getState(fd int) (*State, error) {\n\treturn nil, fmt.Errorf(\"terminal: GetState not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc restore(fd int, state *State) error {\n\treturn fmt.Errorf(\"terminal: Restore not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc getSize(fd int) (width, height int, err error) {\n\treturn 0, 0, fmt.Errorf(\"terminal: GetSize not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n\nfunc readPassword(fd int) ([]byte, error) {\n\treturn nil, fmt.Errorf(\"terminal: ReadPassword not implemented on %s/%s\", runtime.GOOS, runtime.GOARCH)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/term_windows.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage term\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\ntype state struct {\n\tmode uint32\n}\n\nfunc isTerminal(fd int) bool {\n\tvar st uint32\n\terr := windows.GetConsoleMode(windows.Handle(fd), &st)\n\treturn err == nil\n}\n\n// This is intended to be used on a console input handle.\n// See https://learn.microsoft.com/en-us/windows/console/setconsolemode\nfunc makeRaw(fd int) (*State, error) {\n\tvar st uint32\n\tif err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {\n\t\treturn nil, err\n\t}\n\traw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT)\n\traw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT\n\tif err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &State{state{st}}, nil\n}\n\nfunc getState(fd int) (*State, error) {\n\tvar st uint32\n\tif err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &State{state{st}}, nil\n}\n\nfunc restore(fd int, state *State) error {\n\treturn windows.SetConsoleMode(windows.Handle(fd), state.mode)\n}\n\nfunc getSize(fd int) (width, height int, err error) {\n\tvar info windows.ConsoleScreenBufferInfo\n\tif err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {\n\t\treturn 0, 0, err\n\t}\n\treturn int(info.Window.Right - info.Window.Left + 1), int(info.Window.Bottom - info.Window.Top + 1), nil\n}\n\nfunc readPassword(fd int) ([]byte, error) {\n\tvar st uint32\n\tif err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {\n\t\treturn nil, err\n\t}\n\told := st\n\n\tst &^= (windows.ENABLE_ECHO_INPUT | windows.ENABLE_LINE_INPUT)\n\tst |= (windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_PROCESSED_INPUT)\n\tif err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer windows.SetConsoleMode(windows.Handle(fd), old)\n\n\tvar h windows.Handle\n\tp, _ := windows.GetCurrentProcess()\n\tif err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {\n\t\treturn nil, err\n\t}\n\n\tf := os.NewFile(uintptr(h), \"stdin\")\n\tdefer f.Close()\n\treturn readPasswordLine(f)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/term/terminal.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage term\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"sync\"\n\t\"unicode/utf8\"\n)\n\n// EscapeCodes contains escape sequences that can be written to the terminal in\n// order to achieve different styles of text.\ntype EscapeCodes struct {\n\t// Foreground colors\n\tBlack, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte\n\n\t// Reset all attributes\n\tReset []byte\n}\n\nvar vt100EscapeCodes = EscapeCodes{\n\tBlack:   []byte{keyEscape, '[', '3', '0', 'm'},\n\tRed:     []byte{keyEscape, '[', '3', '1', 'm'},\n\tGreen:   []byte{keyEscape, '[', '3', '2', 'm'},\n\tYellow:  []byte{keyEscape, '[', '3', '3', 'm'},\n\tBlue:    []byte{keyEscape, '[', '3', '4', 'm'},\n\tMagenta: []byte{keyEscape, '[', '3', '5', 'm'},\n\tCyan:    []byte{keyEscape, '[', '3', '6', 'm'},\n\tWhite:   []byte{keyEscape, '[', '3', '7', 'm'},\n\n\tReset: []byte{keyEscape, '[', '0', 'm'},\n}\n\n// A History provides a (possibly bounded) queue of input lines read by [Terminal.ReadLine].\ntype History interface {\n\t// Add will be called by [Terminal.ReadLine] to add\n\t// a new, most recent entry to the history.\n\t// It is allowed to drop any entry, including\n\t// the entry being added (e.g., if it's deemed an invalid entry),\n\t// the least-recent entry (e.g., to keep the history bounded),\n\t// or any other entry.\n\tAdd(entry string)\n\n\t// Len returns the number of entries in the history.\n\tLen() int\n\n\t// At returns an entry from the history.\n\t// Index 0 is the most-recently added entry and\n\t// index Len()-1 is the least-recently added entry.\n\t// If index is < 0 or >= Len(), it panics.\n\tAt(idx int) string\n}\n\n// Terminal contains the state for running a VT100 terminal that is capable of\n// reading lines of input.\ntype Terminal struct {\n\t// AutoCompleteCallback, if non-null, is called for each keypress with\n\t// the full input line and the current position of the cursor (in\n\t// bytes, as an index into |line|). If it returns ok=false, the key\n\t// press is processed normally. Otherwise it returns a replacement line\n\t// and the new cursor position.\n\t//\n\t// This will be disabled during ReadPassword.\n\tAutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool)\n\n\t// Escape contains a pointer to the escape codes for this terminal.\n\t// It's always a valid pointer, although the escape codes themselves\n\t// may be empty if the terminal doesn't support them.\n\tEscape *EscapeCodes\n\n\t// lock protects the terminal and the state in this object from\n\t// concurrent processing of a key press and a Write() call.\n\tlock sync.Mutex\n\n\tc      io.ReadWriter\n\tprompt []rune\n\n\t// line is the current line being entered.\n\tline []rune\n\t// pos is the logical position of the cursor in line\n\tpos int\n\t// echo is true if local echo is enabled\n\techo bool\n\t// pasteActive is true iff there is a bracketed paste operation in\n\t// progress.\n\tpasteActive bool\n\n\t// cursorX contains the current X value of the cursor where the left\n\t// edge is 0. cursorY contains the row number where the first row of\n\t// the current line is 0.\n\tcursorX, cursorY int\n\t// maxLine is the greatest value of cursorY so far.\n\tmaxLine int\n\n\ttermWidth, termHeight int\n\n\t// outBuf contains the terminal data to be sent.\n\toutBuf []byte\n\t// remainder contains the remainder of any partial key sequences after\n\t// a read. It aliases into inBuf.\n\tremainder []byte\n\tinBuf     [256]byte\n\n\t// History records and retrieves lines of input read by [ReadLine] which\n\t// a user can retrieve and navigate using the up and down arrow keys.\n\t//\n\t// It is not safe to call ReadLine concurrently with any methods on History.\n\t//\n\t// [NewTerminal] sets this to a default implementation that records the\n\t// last 100 lines of input.\n\tHistory History\n\t// historyIndex stores the currently accessed history entry, where zero\n\t// means the immediately previous entry.\n\thistoryIndex int\n\t// When navigating up and down the history it's possible to return to\n\t// the incomplete, initial line. That value is stored in\n\t// historyPending.\n\thistoryPending string\n}\n\n// NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is\n// a local terminal, that terminal must first have been put into raw mode.\n// prompt is a string that is written at the start of each input line (i.e.\n// \"> \").\nfunc NewTerminal(c io.ReadWriter, prompt string) *Terminal {\n\treturn &Terminal{\n\t\tEscape:       &vt100EscapeCodes,\n\t\tc:            c,\n\t\tprompt:       []rune(prompt),\n\t\ttermWidth:    80,\n\t\ttermHeight:   24,\n\t\techo:         true,\n\t\thistoryIndex: -1,\n\t\tHistory:      &stRingBuffer{},\n\t}\n}\n\nconst (\n\tkeyCtrlC     = 3\n\tkeyCtrlD     = 4\n\tkeyCtrlU     = 21\n\tkeyEnter     = '\\r'\n\tkeyLF        = '\\n'\n\tkeyEscape    = 27\n\tkeyBackspace = 127\n\tkeyUnknown   = 0xd800 /* UTF-16 surrogate area */ + iota\n\tkeyUp\n\tkeyDown\n\tkeyLeft\n\tkeyRight\n\tkeyAltLeft\n\tkeyAltRight\n\tkeyHome\n\tkeyEnd\n\tkeyDeleteWord\n\tkeyDeleteLine\n\tkeyDelete\n\tkeyClearScreen\n\tkeyTranspose\n\tkeyPasteStart\n\tkeyPasteEnd\n)\n\nvar (\n\tcrlf       = []byte{'\\r', '\\n'}\n\tpasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}\n\tpasteEnd   = []byte{keyEscape, '[', '2', '0', '1', '~'}\n)\n\n// bytesToKey tries to parse a key sequence from b. If successful, it returns\n// the key and the remainder of the input. Otherwise it returns utf8.RuneError.\nfunc bytesToKey(b []byte, pasteActive bool) (rune, []byte) {\n\tif len(b) == 0 {\n\t\treturn utf8.RuneError, nil\n\t}\n\n\tif !pasteActive {\n\t\tswitch b[0] {\n\t\tcase 1: // ^A\n\t\t\treturn keyHome, b[1:]\n\t\tcase 2: // ^B\n\t\t\treturn keyLeft, b[1:]\n\t\tcase 5: // ^E\n\t\t\treturn keyEnd, b[1:]\n\t\tcase 6: // ^F\n\t\t\treturn keyRight, b[1:]\n\t\tcase 8: // ^H\n\t\t\treturn keyBackspace, b[1:]\n\t\tcase 11: // ^K\n\t\t\treturn keyDeleteLine, b[1:]\n\t\tcase 12: // ^L\n\t\t\treturn keyClearScreen, b[1:]\n\t\tcase 20: // ^T\n\t\t\treturn keyTranspose, b[1:]\n\t\tcase 23: // ^W\n\t\t\treturn keyDeleteWord, b[1:]\n\t\tcase 14: // ^N\n\t\t\treturn keyDown, b[1:]\n\t\tcase 16: // ^P\n\t\t\treturn keyUp, b[1:]\n\t\t}\n\t}\n\n\tif b[0] != keyEscape {\n\t\tif !utf8.FullRune(b) {\n\t\t\treturn utf8.RuneError, b\n\t\t}\n\t\tr, l := utf8.DecodeRune(b)\n\t\treturn r, b[l:]\n\t}\n\n\tif !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' {\n\t\tswitch b[2] {\n\t\tcase 'A':\n\t\t\treturn keyUp, b[3:]\n\t\tcase 'B':\n\t\t\treturn keyDown, b[3:]\n\t\tcase 'C':\n\t\t\treturn keyRight, b[3:]\n\t\tcase 'D':\n\t\t\treturn keyLeft, b[3:]\n\t\tcase 'H':\n\t\t\treturn keyHome, b[3:]\n\t\tcase 'F':\n\t\t\treturn keyEnd, b[3:]\n\t\t}\n\t}\n\n\tif !pasteActive && len(b) >= 4 && b[0] == keyEscape && b[1] == '[' && b[2] == '3' && b[3] == '~' {\n\t\treturn keyDelete, b[4:]\n\t}\n\n\tif !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' {\n\t\tswitch b[5] {\n\t\tcase 'C':\n\t\t\treturn keyAltRight, b[6:]\n\t\tcase 'D':\n\t\t\treturn keyAltLeft, b[6:]\n\t\t}\n\t}\n\n\tif !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) {\n\t\treturn keyPasteStart, b[6:]\n\t}\n\n\tif pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) {\n\t\treturn keyPasteEnd, b[6:]\n\t}\n\n\t// If we get here then we have a key that we don't recognise, or a\n\t// partial sequence. It's not clear how one should find the end of a\n\t// sequence without knowing them all, but it seems that [a-zA-Z~] only\n\t// appears at the end of a sequence.\n\tfor i, c := range b[0:] {\n\t\tif c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' {\n\t\t\treturn keyUnknown, b[i+1:]\n\t\t}\n\t}\n\n\treturn utf8.RuneError, b\n}\n\n// queue appends data to the end of t.outBuf\nfunc (t *Terminal) queue(data []rune) {\n\tt.outBuf = append(t.outBuf, []byte(string(data))...)\n}\n\nvar space = []rune{' '}\n\nfunc isPrintable(key rune) bool {\n\tisInSurrogateArea := key >= 0xd800 && key <= 0xdbff\n\treturn key >= 32 && !isInSurrogateArea\n}\n\n// moveCursorToPos appends data to t.outBuf which will move the cursor to the\n// given, logical position in the text.\nfunc (t *Terminal) moveCursorToPos(pos int) {\n\tif !t.echo {\n\t\treturn\n\t}\n\n\tx := visualLength(t.prompt) + pos\n\ty := x / t.termWidth\n\tx = x % t.termWidth\n\n\tup := 0\n\tif y < t.cursorY {\n\t\tup = t.cursorY - y\n\t}\n\n\tdown := 0\n\tif y > t.cursorY {\n\t\tdown = y - t.cursorY\n\t}\n\n\tleft := 0\n\tif x < t.cursorX {\n\t\tleft = t.cursorX - x\n\t}\n\n\tright := 0\n\tif x > t.cursorX {\n\t\tright = x - t.cursorX\n\t}\n\n\tt.cursorX = x\n\tt.cursorY = y\n\tt.move(up, down, left, right)\n}\n\nfunc (t *Terminal) move(up, down, left, right int) {\n\tm := []rune{}\n\n\t// 1 unit up can be expressed as ^[[A or ^[A\n\t// 5 units up can be expressed as ^[[5A\n\n\tif up == 1 {\n\t\tm = append(m, keyEscape, '[', 'A')\n\t} else if up > 1 {\n\t\tm = append(m, keyEscape, '[')\n\t\tm = append(m, []rune(strconv.Itoa(up))...)\n\t\tm = append(m, 'A')\n\t}\n\n\tif down == 1 {\n\t\tm = append(m, keyEscape, '[', 'B')\n\t} else if down > 1 {\n\t\tm = append(m, keyEscape, '[')\n\t\tm = append(m, []rune(strconv.Itoa(down))...)\n\t\tm = append(m, 'B')\n\t}\n\n\tif right == 1 {\n\t\tm = append(m, keyEscape, '[', 'C')\n\t} else if right > 1 {\n\t\tm = append(m, keyEscape, '[')\n\t\tm = append(m, []rune(strconv.Itoa(right))...)\n\t\tm = append(m, 'C')\n\t}\n\n\tif left == 1 {\n\t\tm = append(m, keyEscape, '[', 'D')\n\t} else if left > 1 {\n\t\tm = append(m, keyEscape, '[')\n\t\tm = append(m, []rune(strconv.Itoa(left))...)\n\t\tm = append(m, 'D')\n\t}\n\n\tt.queue(m)\n}\n\nfunc (t *Terminal) clearLineToRight() {\n\top := []rune{keyEscape, '[', 'K'}\n\tt.queue(op)\n}\n\nconst maxLineLength = 4096\n\nfunc (t *Terminal) setLine(newLine []rune, newPos int) {\n\tif t.echo {\n\t\tt.moveCursorToPos(0)\n\t\tt.writeLine(newLine)\n\t\tfor i := len(newLine); i < len(t.line); i++ {\n\t\t\tt.writeLine(space)\n\t\t}\n\t\tt.moveCursorToPos(newPos)\n\t}\n\tt.line = newLine\n\tt.pos = newPos\n}\n\nfunc (t *Terminal) advanceCursor(places int) {\n\tt.cursorX += places\n\tt.cursorY += t.cursorX / t.termWidth\n\tif t.cursorY > t.maxLine {\n\t\tt.maxLine = t.cursorY\n\t}\n\tt.cursorX = t.cursorX % t.termWidth\n\n\tif places > 0 && t.cursorX == 0 {\n\t\t// Normally terminals will advance the current position\n\t\t// when writing a character. But that doesn't happen\n\t\t// for the last character in a line. However, when\n\t\t// writing a character (except a new line) that causes\n\t\t// a line wrap, the position will be advanced two\n\t\t// places.\n\t\t//\n\t\t// So, if we are stopping at the end of a line, we\n\t\t// need to write a newline so that our cursor can be\n\t\t// advanced to the next line.\n\t\tt.outBuf = append(t.outBuf, '\\r', '\\n')\n\t}\n}\n\nfunc (t *Terminal) eraseNPreviousChars(n int) {\n\tif n == 0 {\n\t\treturn\n\t}\n\n\tif t.pos < n {\n\t\tn = t.pos\n\t}\n\tt.pos -= n\n\tt.moveCursorToPos(t.pos)\n\n\tcopy(t.line[t.pos:], t.line[n+t.pos:])\n\tt.line = t.line[:len(t.line)-n]\n\tif t.echo {\n\t\tt.writeLine(t.line[t.pos:])\n\t\tfor i := 0; i < n; i++ {\n\t\t\tt.queue(space)\n\t\t}\n\t\tt.advanceCursor(n)\n\t\tt.moveCursorToPos(t.pos)\n\t}\n}\n\n// countToLeftWord returns the number of characters from the cursor to the\n// start of the previous word.\nfunc (t *Terminal) countToLeftWord() int {\n\tif t.pos == 0 {\n\t\treturn 0\n\t}\n\n\tpos := t.pos - 1\n\tfor pos > 0 {\n\t\tif t.line[pos] != ' ' {\n\t\t\tbreak\n\t\t}\n\t\tpos--\n\t}\n\tfor pos > 0 {\n\t\tif t.line[pos] == ' ' {\n\t\t\tpos++\n\t\t\tbreak\n\t\t}\n\t\tpos--\n\t}\n\n\treturn t.pos - pos\n}\n\n// countToRightWord returns the number of characters from the cursor to the\n// start of the next word.\nfunc (t *Terminal) countToRightWord() int {\n\tpos := t.pos\n\tfor pos < len(t.line) {\n\t\tif t.line[pos] == ' ' {\n\t\t\tbreak\n\t\t}\n\t\tpos++\n\t}\n\tfor pos < len(t.line) {\n\t\tif t.line[pos] != ' ' {\n\t\t\tbreak\n\t\t}\n\t\tpos++\n\t}\n\treturn pos - t.pos\n}\n\n// visualLength returns the number of visible glyphs in s.\nfunc visualLength(runes []rune) int {\n\tinEscapeSeq := false\n\tlength := 0\n\n\tfor _, r := range runes {\n\t\tswitch {\n\t\tcase inEscapeSeq:\n\t\t\tif (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') {\n\t\t\t\tinEscapeSeq = false\n\t\t\t}\n\t\tcase r == '\\x1b':\n\t\t\tinEscapeSeq = true\n\t\tdefault:\n\t\t\tlength++\n\t\t}\n\t}\n\n\treturn length\n}\n\n// historyAt unlocks the terminal and relocks it while calling History.At.\nfunc (t *Terminal) historyAt(idx int) (string, bool) {\n\tt.lock.Unlock()     // Unlock to avoid deadlock if History methods use the output writer.\n\tdefer t.lock.Lock() // panic in At (or Len) protection.\n\tif idx < 0 || idx >= t.History.Len() {\n\t\treturn \"\", false\n\t}\n\treturn t.History.At(idx), true\n}\n\n// historyAdd unlocks the terminal and relocks it while calling History.Add.\nfunc (t *Terminal) historyAdd(entry string) {\n\tt.lock.Unlock()     // Unlock to avoid deadlock if History methods use the output writer.\n\tdefer t.lock.Lock() // panic in Add protection.\n\tt.History.Add(entry)\n}\n\n// handleKey processes the given key and, optionally, returns a line of text\n// that the user has entered.\nfunc (t *Terminal) handleKey(key rune) (line string, ok bool) {\n\tif t.pasteActive && key != keyEnter && key != keyLF {\n\t\tt.addKeyToLine(key)\n\t\treturn\n\t}\n\n\tswitch key {\n\tcase keyBackspace:\n\t\tif t.pos == 0 {\n\t\t\treturn\n\t\t}\n\t\tt.eraseNPreviousChars(1)\n\tcase keyAltLeft:\n\t\t// move left by a word.\n\t\tt.pos -= t.countToLeftWord()\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyAltRight:\n\t\t// move right by a word.\n\t\tt.pos += t.countToRightWord()\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyLeft:\n\t\tif t.pos == 0 {\n\t\t\treturn\n\t\t}\n\t\tt.pos--\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyRight:\n\t\tif t.pos == len(t.line) {\n\t\t\treturn\n\t\t}\n\t\tt.pos++\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyHome:\n\t\tif t.pos == 0 {\n\t\t\treturn\n\t\t}\n\t\tt.pos = 0\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyEnd:\n\t\tif t.pos == len(t.line) {\n\t\t\treturn\n\t\t}\n\t\tt.pos = len(t.line)\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyUp:\n\t\tentry, ok := t.historyAt(t.historyIndex + 1)\n\t\tif !ok {\n\t\t\treturn \"\", false\n\t\t}\n\t\tif t.historyIndex == -1 {\n\t\t\tt.historyPending = string(t.line)\n\t\t}\n\t\tt.historyIndex++\n\t\trunes := []rune(entry)\n\t\tt.setLine(runes, len(runes))\n\tcase keyDown:\n\t\tswitch t.historyIndex {\n\t\tcase -1:\n\t\t\treturn\n\t\tcase 0:\n\t\t\trunes := []rune(t.historyPending)\n\t\t\tt.setLine(runes, len(runes))\n\t\t\tt.historyIndex--\n\t\tdefault:\n\t\t\tentry, ok := t.historyAt(t.historyIndex - 1)\n\t\t\tif ok {\n\t\t\t\tt.historyIndex--\n\t\t\t\trunes := []rune(entry)\n\t\t\t\tt.setLine(runes, len(runes))\n\t\t\t}\n\t\t}\n\tcase keyEnter, keyLF:\n\t\tt.moveCursorToPos(len(t.line))\n\t\tt.queue([]rune(\"\\r\\n\"))\n\t\tline = string(t.line)\n\t\tok = true\n\t\tt.line = t.line[:0]\n\t\tt.pos = 0\n\t\tt.cursorX = 0\n\t\tt.cursorY = 0\n\t\tt.maxLine = 0\n\tcase keyDeleteWord:\n\t\t// Delete zero or more spaces and then one or more characters.\n\t\tt.eraseNPreviousChars(t.countToLeftWord())\n\tcase keyDeleteLine:\n\t\t// Delete everything from the current cursor position to the\n\t\t// end of line.\n\t\tfor i := t.pos; i < len(t.line); i++ {\n\t\t\tt.queue(space)\n\t\t\tt.advanceCursor(1)\n\t\t}\n\t\tt.line = t.line[:t.pos]\n\t\tt.moveCursorToPos(t.pos)\n\tcase keyCtrlD, keyDelete:\n\t\t// Erase the character under the current position.\n\t\t// The EOF case when the line is empty is handled in\n\t\t// readLine().\n\t\tif t.pos < len(t.line) {\n\t\t\tt.pos++\n\t\t\tt.eraseNPreviousChars(1)\n\t\t}\n\tcase keyCtrlU:\n\t\tt.eraseNPreviousChars(t.pos)\n\tcase keyTranspose:\n\t\t// This transposes the two characters around the cursor and advances the cursor. Best-effort.\n\t\tif len(t.line) < 2 || t.pos < 1 {\n\t\t\treturn\n\t\t}\n\t\tswap := t.pos\n\t\tif swap == len(t.line) {\n\t\t\tswap-- // special: at end of line, swap previous two chars\n\t\t}\n\t\tt.line[swap-1], t.line[swap] = t.line[swap], t.line[swap-1]\n\t\tif t.pos < len(t.line) {\n\t\t\tt.pos++\n\t\t}\n\t\tif t.echo {\n\t\t\tt.moveCursorToPos(swap - 1)\n\t\t\tt.writeLine(t.line[swap-1:])\n\t\t\tt.moveCursorToPos(t.pos)\n\t\t}\n\tcase keyClearScreen:\n\t\t// Erases the screen and moves the cursor to the home position.\n\t\tt.queue([]rune(\"\\x1b[2J\\x1b[H\"))\n\t\tt.queue(t.prompt)\n\t\tt.cursorX, t.cursorY = 0, 0\n\t\tt.advanceCursor(visualLength(t.prompt))\n\t\tt.setLine(t.line, t.pos)\n\tdefault:\n\t\tif t.AutoCompleteCallback != nil {\n\t\t\tprefix := string(t.line[:t.pos])\n\t\t\tsuffix := string(t.line[t.pos:])\n\n\t\t\tt.lock.Unlock()\n\t\t\tnewLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key)\n\t\t\tt.lock.Lock()\n\n\t\t\tif completeOk {\n\t\t\t\tt.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos]))\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tif !isPrintable(key) {\n\t\t\treturn\n\t\t}\n\t\tif len(t.line) == maxLineLength {\n\t\t\treturn\n\t\t}\n\t\tt.addKeyToLine(key)\n\t}\n\treturn\n}\n\n// addKeyToLine inserts the given key at the current position in the current\n// line.\nfunc (t *Terminal) addKeyToLine(key rune) {\n\tif len(t.line) == cap(t.line) {\n\t\tnewLine := make([]rune, len(t.line), 2*(1+len(t.line)))\n\t\tcopy(newLine, t.line)\n\t\tt.line = newLine\n\t}\n\tt.line = t.line[:len(t.line)+1]\n\tcopy(t.line[t.pos+1:], t.line[t.pos:])\n\tt.line[t.pos] = key\n\tif t.echo {\n\t\tt.writeLine(t.line[t.pos:])\n\t}\n\tt.pos++\n\tt.moveCursorToPos(t.pos)\n}\n\nfunc (t *Terminal) writeLine(line []rune) {\n\tfor len(line) != 0 {\n\t\tremainingOnLine := t.termWidth - t.cursorX\n\t\ttodo := len(line)\n\t\tif todo > remainingOnLine {\n\t\t\ttodo = remainingOnLine\n\t\t}\n\t\tt.queue(line[:todo])\n\t\tt.advanceCursor(visualLength(line[:todo]))\n\t\tline = line[todo:]\n\t}\n}\n\n// writeWithCRLF writes buf to w but replaces all occurrences of \\n with \\r\\n.\nfunc writeWithCRLF(w io.Writer, buf []byte) (n int, err error) {\n\tfor len(buf) > 0 {\n\t\ti := bytes.IndexByte(buf, '\\n')\n\t\ttodo := len(buf)\n\t\tif i >= 0 {\n\t\t\ttodo = i\n\t\t}\n\n\t\tvar nn int\n\t\tnn, err = w.Write(buf[:todo])\n\t\tn += nn\n\t\tif err != nil {\n\t\t\treturn n, err\n\t\t}\n\t\tbuf = buf[todo:]\n\n\t\tif i >= 0 {\n\t\t\tif _, err = w.Write(crlf); err != nil {\n\t\t\t\treturn n, err\n\t\t\t}\n\t\t\tn++\n\t\t\tbuf = buf[1:]\n\t\t}\n\t}\n\n\treturn n, nil\n}\n\nfunc (t *Terminal) Write(buf []byte) (n int, err error) {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\n\tif t.cursorX == 0 && t.cursorY == 0 {\n\t\t// This is the easy case: there's nothing on the screen that we\n\t\t// have to move out of the way.\n\t\treturn writeWithCRLF(t.c, buf)\n\t}\n\n\t// We have a prompt and possibly user input on the screen. We\n\t// have to clear it first.\n\tt.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */)\n\tt.cursorX = 0\n\tt.clearLineToRight()\n\n\tfor t.cursorY > 0 {\n\t\tt.move(1 /* up */, 0, 0, 0)\n\t\tt.cursorY--\n\t\tt.clearLineToRight()\n\t}\n\n\tif _, err = t.c.Write(t.outBuf); err != nil {\n\t\treturn\n\t}\n\tt.outBuf = t.outBuf[:0]\n\n\tif n, err = writeWithCRLF(t.c, buf); err != nil {\n\t\treturn\n\t}\n\n\tt.writeLine(t.prompt)\n\tif t.echo {\n\t\tt.writeLine(t.line)\n\t}\n\n\tt.moveCursorToPos(t.pos)\n\n\tif _, err = t.c.Write(t.outBuf); err != nil {\n\t\treturn\n\t}\n\tt.outBuf = t.outBuf[:0]\n\treturn\n}\n\n// ReadPassword temporarily changes the prompt and reads a password, without\n// echo, from the terminal.\n//\n// The AutoCompleteCallback is disabled during this call.\nfunc (t *Terminal) ReadPassword(prompt string) (line string, err error) {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\n\toldPrompt := t.prompt\n\tt.prompt = []rune(prompt)\n\tt.echo = false\n\toldAutoCompleteCallback := t.AutoCompleteCallback\n\tt.AutoCompleteCallback = nil\n\tdefer func() {\n\t\tt.AutoCompleteCallback = oldAutoCompleteCallback\n\t}()\n\n\tline, err = t.readLine()\n\n\tt.prompt = oldPrompt\n\tt.echo = true\n\n\treturn\n}\n\n// ReadLine returns a line of input from the terminal.\nfunc (t *Terminal) ReadLine() (line string, err error) {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\n\treturn t.readLine()\n}\n\nfunc (t *Terminal) readLine() (line string, err error) {\n\t// t.lock must be held at this point\n\n\tif t.cursorX == 0 && t.cursorY == 0 {\n\t\tt.writeLine(t.prompt)\n\t\tt.c.Write(t.outBuf)\n\t\tt.outBuf = t.outBuf[:0]\n\t}\n\n\tlineIsPasted := t.pasteActive\n\n\tfor {\n\t\trest := t.remainder\n\t\tlineOk := false\n\t\tfor !lineOk {\n\t\t\tvar key rune\n\t\t\tkey, rest = bytesToKey(rest, t.pasteActive)\n\t\t\tif key == utf8.RuneError {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif !t.pasteActive {\n\t\t\t\tif key == keyCtrlD {\n\t\t\t\t\tif len(t.line) == 0 {\n\t\t\t\t\t\treturn \"\", io.EOF\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif key == keyCtrlC {\n\t\t\t\t\treturn \"\", io.EOF\n\t\t\t\t}\n\t\t\t\tif key == keyPasteStart {\n\t\t\t\t\tt.pasteActive = true\n\t\t\t\t\tif len(t.line) == 0 {\n\t\t\t\t\t\tlineIsPasted = true\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t} else if key == keyPasteEnd {\n\t\t\t\tt.pasteActive = false\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !t.pasteActive {\n\t\t\t\tlineIsPasted = false\n\t\t\t}\n\t\t\t// If we have CR, consume LF if present (CRLF sequence) to avoid returning an extra empty line.\n\t\t\tif key == keyEnter && len(rest) > 0 && rest[0] == keyLF {\n\t\t\t\trest = rest[1:]\n\t\t\t}\n\t\t\tline, lineOk = t.handleKey(key)\n\t\t}\n\t\tif len(rest) > 0 {\n\t\t\tn := copy(t.inBuf[:], rest)\n\t\t\tt.remainder = t.inBuf[:n]\n\t\t} else {\n\t\t\tt.remainder = nil\n\t\t}\n\t\tt.c.Write(t.outBuf)\n\t\tt.outBuf = t.outBuf[:0]\n\t\tif lineOk {\n\t\t\tif t.echo {\n\t\t\t\tt.historyIndex = -1\n\t\t\t\tt.historyAdd(line)\n\t\t\t}\n\t\t\tif lineIsPasted {\n\t\t\t\terr = ErrPasteIndicator\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// t.remainder is a slice at the beginning of t.inBuf\n\t\t// containing a partial key sequence\n\t\treadBuf := t.inBuf[len(t.remainder):]\n\t\tvar n int\n\n\t\tt.lock.Unlock()\n\t\tn, err = t.c.Read(readBuf)\n\t\tt.lock.Lock()\n\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\n\t\tt.remainder = t.inBuf[:n+len(t.remainder)]\n\t}\n}\n\n// SetPrompt sets the prompt to be used when reading subsequent lines.\nfunc (t *Terminal) SetPrompt(prompt string) {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\n\tt.prompt = []rune(prompt)\n}\n\nfunc (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) {\n\t// Move cursor to column zero at the start of the line.\n\tt.move(t.cursorY, 0, t.cursorX, 0)\n\tt.cursorX, t.cursorY = 0, 0\n\tt.clearLineToRight()\n\tfor t.cursorY < numPrevLines {\n\t\t// Move down a line\n\t\tt.move(0, 1, 0, 0)\n\t\tt.cursorY++\n\t\tt.clearLineToRight()\n\t}\n\t// Move back to beginning.\n\tt.move(t.cursorY, 0, 0, 0)\n\tt.cursorX, t.cursorY = 0, 0\n\n\tt.queue(t.prompt)\n\tt.advanceCursor(visualLength(t.prompt))\n\tt.writeLine(t.line)\n\tt.moveCursorToPos(t.pos)\n}\n\nfunc (t *Terminal) SetSize(width, height int) error {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\n\tif width == 0 {\n\t\twidth = 1\n\t}\n\n\toldWidth := t.termWidth\n\tt.termWidth, t.termHeight = width, height\n\n\tswitch {\n\tcase width == oldWidth:\n\t\t// If the width didn't change then nothing else needs to be\n\t\t// done.\n\t\treturn nil\n\tcase len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0:\n\t\t// If there is nothing on current line and no prompt printed,\n\t\t// just do nothing\n\t\treturn nil\n\tcase width < oldWidth:\n\t\t// Some terminals (e.g. xterm) will truncate lines that were\n\t\t// too long when shinking. Others, (e.g. gnome-terminal) will\n\t\t// attempt to wrap them. For the former, repainting t.maxLine\n\t\t// works great, but that behaviour goes badly wrong in the case\n\t\t// of the latter because they have doubled every full line.\n\n\t\t// We assume that we are working on a terminal that wraps lines\n\t\t// and adjust the cursor position based on every previous line\n\t\t// wrapping and turning into two. This causes the prompt on\n\t\t// xterms to move upwards, which isn't great, but it avoids a\n\t\t// huge mess with gnome-terminal.\n\t\tif t.cursorX >= t.termWidth {\n\t\t\tt.cursorX = t.termWidth - 1\n\t\t}\n\t\tt.cursorY *= 2\n\t\tt.clearAndRepaintLinePlusNPrevious(t.maxLine * 2)\n\tcase width > oldWidth:\n\t\t// If the terminal expands then our position calculations will\n\t\t// be wrong in the future because we think the cursor is\n\t\t// |t.pos| chars into the string, but there will be a gap at\n\t\t// the end of any wrapped line.\n\t\t//\n\t\t// But the position will actually be correct until we move, so\n\t\t// we can move back to the beginning and repaint everything.\n\t\tt.clearAndRepaintLinePlusNPrevious(t.maxLine)\n\t}\n\n\t_, err := t.c.Write(t.outBuf)\n\tt.outBuf = t.outBuf[:0]\n\treturn err\n}\n\ntype pasteIndicatorError struct{}\n\nfunc (pasteIndicatorError) Error() string {\n\treturn \"terminal: ErrPasteIndicator not correctly handled\"\n}\n\n// ErrPasteIndicator may be returned from ReadLine as the error, in addition\n// to valid line data. It indicates that bracketed paste mode is enabled and\n// that the returned line consists only of pasted data. Programs may wish to\n// interpret pasted data more literally than typed data.\nvar ErrPasteIndicator = pasteIndicatorError{}\n\n// SetBracketedPasteMode requests that the terminal bracket paste operations\n// with markers. Not all terminals support this but, if it is supported, then\n// enabling this mode will stop any autocomplete callback from running due to\n// pastes. Additionally, any lines that are completely pasted will be returned\n// from ReadLine with the error set to ErrPasteIndicator.\nfunc (t *Terminal) SetBracketedPasteMode(on bool) {\n\tif on {\n\t\tio.WriteString(t.c, \"\\x1b[?2004h\")\n\t} else {\n\t\tio.WriteString(t.c, \"\\x1b[?2004l\")\n\t}\n}\n\n// stRingBuffer is a ring buffer of strings.\ntype stRingBuffer struct {\n\t// entries contains max elements.\n\tentries []string\n\tmax     int\n\t// head contains the index of the element most recently added to the ring.\n\thead int\n\t// size contains the number of elements in the ring.\n\tsize int\n}\n\nfunc (s *stRingBuffer) Add(a string) {\n\tif s.entries == nil {\n\t\tconst defaultNumEntries = 100\n\t\ts.entries = make([]string, defaultNumEntries)\n\t\ts.max = defaultNumEntries\n\t}\n\n\ts.head = (s.head + 1) % s.max\n\ts.entries[s.head] = a\n\tif s.size < s.max {\n\t\ts.size++\n\t}\n}\n\nfunc (s *stRingBuffer) Len() int {\n\treturn s.size\n}\n\n// At returns the value passed to the nth previous call to Add.\n// If n is zero then the immediately prior value is returned, if one, then the\n// next most recent, and so on. If such an element doesn't exist then ok is\n// false.\nfunc (s *stRingBuffer) At(n int) string {\n\tif n < 0 || n >= s.size {\n\t\tpanic(fmt.Sprintf(\"term: history index [%d] out of range [0,%d)\", n, s.size))\n\t}\n\tindex := s.head - n\n\tif index < 0 {\n\t\tindex += s.max\n\t}\n\treturn s.entries[index]\n}\n\n// readPasswordLine reads from reader until it finds \\n or io.EOF.\n// The slice returned does not include the \\n.\n// readPasswordLine also ignores any \\r it finds.\n// Windows uses \\r as end of line. So, on Windows, readPasswordLine\n// reads until it finds \\r and ignores any \\n it finds during processing.\nfunc readPasswordLine(reader io.Reader) ([]byte, error) {\n\tvar buf [1]byte\n\tvar ret []byte\n\n\tfor {\n\t\tn, err := reader.Read(buf[:])\n\t\tif n > 0 {\n\t\t\tswitch buf[0] {\n\t\t\tcase '\\b':\n\t\t\t\tif len(ret) > 0 {\n\t\t\t\t\tret = ret[:len(ret)-1]\n\t\t\t\t}\n\t\t\tcase '\\n':\n\t\t\t\tif runtime.GOOS != \"windows\" {\n\t\t\t\t\treturn ret, nil\n\t\t\t\t}\n\t\t\t\t// otherwise ignore \\n\n\t\t\tcase '\\r':\n\t\t\t\tif runtime.GOOS == \"windows\" {\n\t\t\t\t\treturn ret, nil\n\t\t\t\t}\n\t\t\t\t// otherwise ignore \\r\n\t\t\tdefault:\n\t\t\t\tret = append(ret, buf[0])\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\tif err == io.EOF && len(ret) > 0 {\n\t\t\t\treturn ret, nil\n\t\t\t}\n\t\t\treturn ret, err\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/LICENSE",
    "content": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/golang.org/x/text/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/golang.org/x/text/feature/plural/common.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage plural\n\n// Form defines a plural form.\n//\n// Not all languages support all forms. Also, the meaning of each form varies\n// per language. It is important to note that the name of a form does not\n// necessarily correspond one-to-one with the set of numbers. For instance,\n// for Croation, One matches not only 1, but also 11, 21, etc.\n//\n// Each language must at least support the form \"other\".\ntype Form byte\n\nconst (\n\tOther Form = iota\n\tZero\n\tOne\n\tTwo\n\tFew\n\tMany\n)\n\nvar countMap = map[string]Form{\n\t\"other\": Other,\n\t\"zero\":  Zero,\n\t\"one\":   One,\n\t\"two\":   Two,\n\t\"few\":   Few,\n\t\"many\":  Many,\n}\n\ntype pluralCheck struct {\n\t// category:\n\t// 3..7: opID\n\t// 0..2: category\n\tcat   byte\n\tsetID byte\n}\n\n// opID identifies the type of operand in the plural rule, being i, n or f.\n// (v, w, and t are treated as filters in our implementation.)\ntype opID byte\n\nconst (\n\topMod           opID = 0x1    // is '%' used?\n\topNotEqual      opID = 0x2    // using \"!=\" to compare\n\topI             opID = 0 << 2 // integers after taking the absolute value\n\topN             opID = 1 << 2 // full number (must be integer)\n\topF             opID = 2 << 2 // fraction\n\topV             opID = 3 << 2 // number of visible digits\n\topW             opID = 4 << 2 // number of visible digits without trailing zeros\n\topBretonM       opID = 5 << 2 // hard-wired rule for Breton\n\topItalian800    opID = 6 << 2 // hard-wired rule for Italian\n\topAzerbaijan00s opID = 7 << 2 // hard-wired rule for Azerbaijan\n)\nconst (\n\t// Use this plural form to indicate the next rule needs to match as well.\n\t// The last condition in the list will have the correct plural form.\n\tandNext  = 0x7\n\tformMask = 0x7\n\n\topShift = 3\n\n\t// numN indicates the maximum integer, or maximum mod value, for which we\n\t// have inclusion masks.\n\tnumN = 100\n\t// The common denominator of the modulo that is taken.\n\tmaxMod = 100\n)\n"
  },
  {
    "path": "vendor/golang.org/x/text/feature/plural/message.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage plural\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strconv\"\n\n\t\"golang.org/x/text/internal/catmsg\"\n\t\"golang.org/x/text/internal/number\"\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/message/catalog\"\n)\n\n// TODO: consider deleting this interface. Maybe VisibleDigits is always\n// sufficient and practical.\n\n// Interface is used for types that can determine their own plural form.\ntype Interface interface {\n\t// PluralForm reports the plural form for the given language of the\n\t// underlying value. It also returns the integer value. If the integer value\n\t// is larger than fits in n, PluralForm may return a value modulo\n\t// 10,000,000.\n\tPluralForm(t language.Tag, scale int) (f Form, n int)\n}\n\n// Selectf returns the first case for which its selector is a match for the\n// arg-th substitution argument to a formatting call, formatting it as indicated\n// by format.\n//\n// The cases argument are pairs of selectors and messages. Selectors are of type\n// string or Form. Messages are of type string or catalog.Message. A selector\n// matches an argument if:\n//   - it is \"other\" or Other\n//   - it matches the plural form of the argument: \"zero\", \"one\", \"two\", \"few\",\n//     or \"many\", or the equivalent Form\n//   - it is of the form \"=x\" where x is an integer that matches the value of\n//     the argument.\n//   - it is of the form \"<x\" where x is an integer that is larger than the\n//     argument.\n//\n// The format argument determines the formatting parameters for which to\n// determine the plural form. This is especially relevant for non-integer\n// values.\n//\n// The format string may be \"\", in which case a best-effort attempt is made to\n// find a reasonable representation on which to base the plural form. Examples\n// of format strings are:\n//   - %.2f   decimal with scale 2\n//   - %.2e   scientific notation with precision 3 (scale + 1)\n//   - %d     integer\nfunc Selectf(arg int, format string, cases ...interface{}) catalog.Message {\n\tvar p parser\n\t// Intercept the formatting parameters of format by doing a dummy print.\n\tfmt.Fprintf(io.Discard, format, &p)\n\tm := &message{arg, kindDefault, 0, cases}\n\tswitch p.verb {\n\tcase 'g':\n\t\tm.kind = kindPrecision\n\t\tm.scale = p.scale\n\tcase 'f':\n\t\tm.kind = kindScale\n\t\tm.scale = p.scale\n\tcase 'e':\n\t\tm.kind = kindScientific\n\t\tm.scale = p.scale\n\tcase 'd':\n\t\tm.kind = kindScale\n\t\tm.scale = 0\n\tdefault:\n\t\t// TODO: do we need to handle errors?\n\t}\n\treturn m\n}\n\ntype parser struct {\n\tverb  rune\n\tscale int\n}\n\nfunc (p *parser) Format(s fmt.State, verb rune) {\n\tp.verb = verb\n\tp.scale = -1\n\tif prec, ok := s.Precision(); ok {\n\t\tp.scale = prec\n\t}\n}\n\ntype message struct {\n\targ   int\n\tkind  int\n\tscale int\n\tcases []interface{}\n}\n\nconst (\n\t// Start with non-ASCII to allow skipping values.\n\tkindDefault    = 0x80 + iota\n\tkindScale      // verb f, number of fraction digits follows\n\tkindScientific // verb e, number of fraction digits follows\n\tkindPrecision  // verb g, number of significant digits follows\n)\n\nvar handle = catmsg.Register(\"golang.org/x/text/feature/plural:plural\", execute)\n\nfunc (m *message) Compile(e *catmsg.Encoder) error {\n\te.EncodeMessageType(handle)\n\n\te.EncodeUint(uint64(m.arg))\n\n\te.EncodeUint(uint64(m.kind))\n\tif m.kind > kindDefault {\n\t\te.EncodeUint(uint64(m.scale))\n\t}\n\n\tforms := validForms(cardinal, e.Language())\n\n\tfor i := 0; i < len(m.cases); {\n\t\tif err := compileSelector(e, forms, m.cases[i]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif i++; i >= len(m.cases) {\n\t\t\treturn fmt.Errorf(\"plural: no message defined for selector %v\", m.cases[i-1])\n\t\t}\n\t\tvar msg catalog.Message\n\t\tswitch x := m.cases[i].(type) {\n\t\tcase string:\n\t\t\tmsg = catalog.String(x)\n\t\tcase catalog.Message:\n\t\t\tmsg = x\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"plural: message of type %T; must be string or catalog.Message\", x)\n\t\t}\n\t\tif err := e.EncodeMessage(msg); err != nil {\n\t\t\treturn err\n\t\t}\n\t\ti++\n\t}\n\treturn nil\n}\n\nfunc compileSelector(e *catmsg.Encoder, valid []Form, selector interface{}) error {\n\tform := Other\n\tswitch x := selector.(type) {\n\tcase string:\n\t\tif x == \"\" {\n\t\t\treturn fmt.Errorf(\"plural: empty selector\")\n\t\t}\n\t\tif c := x[0]; c == '=' || c == '<' {\n\t\t\tval, err := strconv.ParseUint(x[1:], 10, 16)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"plural: invalid number in selector %q: %v\", selector, err)\n\t\t\t}\n\t\t\te.EncodeUint(uint64(c))\n\t\t\te.EncodeUint(val)\n\t\t\treturn nil\n\t\t}\n\t\tvar ok bool\n\t\tform, ok = countMap[x]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"plural: invalid plural form %q\", selector)\n\t\t}\n\tcase Form:\n\t\tform = x\n\tdefault:\n\t\treturn fmt.Errorf(\"plural: selector of type %T; want string or Form\", selector)\n\t}\n\n\tok := false\n\tfor _, f := range valid {\n\t\tif f == form {\n\t\t\tok = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !ok {\n\t\treturn fmt.Errorf(\"plural: form %q not supported for language %q\", selector, e.Language())\n\t}\n\te.EncodeUint(uint64(form))\n\treturn nil\n}\n\nfunc execute(d *catmsg.Decoder) bool {\n\tlang := d.Language()\n\targN := int(d.DecodeUint())\n\tkind := int(d.DecodeUint())\n\tscale := -1 // default\n\tif kind > kindDefault {\n\t\tscale = int(d.DecodeUint())\n\t}\n\tform := Other\n\tn := -1\n\tif arg := d.Arg(argN); arg == nil {\n\t\t// Default to Other.\n\t} else if x, ok := arg.(number.VisibleDigits); ok {\n\t\td := x.Digits(nil, lang, scale)\n\t\tform, n = cardinal.matchDisplayDigits(lang, &d)\n\t} else if x, ok := arg.(Interface); ok {\n\t\t// This covers lists and formatters from the number package.\n\t\tform, n = x.PluralForm(lang, scale)\n\t} else {\n\t\tvar f number.Formatter\n\t\tswitch kind {\n\t\tcase kindScale:\n\t\t\tf.InitDecimal(lang)\n\t\t\tf.SetScale(scale)\n\t\tcase kindScientific:\n\t\t\tf.InitScientific(lang)\n\t\t\tf.SetScale(scale)\n\t\tcase kindPrecision:\n\t\t\tf.InitDecimal(lang)\n\t\t\tf.SetPrecision(scale)\n\t\tcase kindDefault:\n\t\t\t// sensible default\n\t\t\tf.InitDecimal(lang)\n\t\t\tif k := reflect.TypeOf(arg).Kind(); reflect.Int <= k && k <= reflect.Uintptr {\n\t\t\t\tf.SetScale(0)\n\t\t\t} else {\n\t\t\t\tf.SetScale(2)\n\t\t\t}\n\t\t}\n\t\tvar dec number.Decimal // TODO: buffer in Printer\n\t\tdec.Convert(f.RoundingContext, arg)\n\t\tv := number.FormatDigits(&dec, f.RoundingContext)\n\t\tif !v.NaN && !v.Inf {\n\t\t\tform, n = cardinal.matchDisplayDigits(d.Language(), &v)\n\t\t}\n\t}\n\tfor !d.Done() {\n\t\tf := d.DecodeUint()\n\t\tif (f == '=' && n == int(d.DecodeUint())) ||\n\t\t\t(f == '<' && 0 <= n && n < int(d.DecodeUint())) ||\n\t\t\tform == Form(f) ||\n\t\t\tOther == Form(f) {\n\t\t\treturn d.ExecuteMessage()\n\t\t}\n\t\td.SkipMessage()\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/feature/plural/plural.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go gen_common.go\n\n// Package plural provides utilities for handling linguistic plurals in text.\n//\n// The definitions in this package are based on the plural rule handling defined\n// in CLDR. See\n// https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules for\n// details.\npackage plural\n\nimport (\n\t\"golang.org/x/text/internal/language/compact\"\n\t\"golang.org/x/text/internal/number\"\n\t\"golang.org/x/text/language\"\n)\n\n// Rules defines the plural rules for all languages for a certain plural type.\n//\n// This package is UNDER CONSTRUCTION and its API may change.\ntype Rules struct {\n\trules          []pluralCheck\n\tindex          []byte\n\tlangToIndex    []byte\n\tinclusionMasks []uint64\n}\n\nvar (\n\t// Cardinal defines the plural rules for numbers indicating quantities.\n\tCardinal *Rules = cardinal\n\n\t// Ordinal defines the plural rules for numbers indicating position\n\t// (first, second, etc.).\n\tOrdinal *Rules = ordinal\n\n\tordinal = &Rules{\n\t\tordinalRules,\n\t\tordinalIndex,\n\t\tordinalLangToIndex,\n\t\tordinalInclusionMasks[:],\n\t}\n\n\tcardinal = &Rules{\n\t\tcardinalRules,\n\t\tcardinalIndex,\n\t\tcardinalLangToIndex,\n\t\tcardinalInclusionMasks[:],\n\t}\n)\n\n// getIntApprox converts the digits in slice digits[start:end] to an integer\n// according to the following rules:\n//   - Let i be asInt(digits[start:end]), where out-of-range digits are assumed\n//     to be zero.\n//   - Result n is big if i / 10^nMod > 1.\n//   - Otherwise the result is i % 10^nMod.\n//\n// For example, if digits is {1, 2, 3} and start:end is 0:5, then the result\n// for various values of nMod is:\n//   - when nMod == 2, n == big\n//   - when nMod == 3, n == big\n//   - when nMod == 4, n == big\n//   - when nMod == 5, n == 12300\n//   - when nMod == 6, n == 12300\n//   - when nMod == 7, n == 12300\nfunc getIntApprox(digits []byte, start, end, nMod, big int) (n int) {\n\t// Leading 0 digits just result in 0.\n\tp := start\n\tif p < 0 {\n\t\tp = 0\n\t}\n\t// Range only over the part for which we have digits.\n\tmid := end\n\tif mid >= len(digits) {\n\t\tmid = len(digits)\n\t}\n\t// Check digits more significant that nMod.\n\tif q := end - nMod; q > 0 {\n\t\tif q > mid {\n\t\t\tq = mid\n\t\t}\n\t\tfor ; p < q; p++ {\n\t\t\tif digits[p] != 0 {\n\t\t\t\treturn big\n\t\t\t}\n\t\t}\n\t}\n\tfor ; p < mid; p++ {\n\t\tn = 10*n + int(digits[p])\n\t}\n\t// Multiply for trailing zeros.\n\tfor ; p < end; p++ {\n\t\tn *= 10\n\t}\n\treturn n\n}\n\n// MatchDigits computes the plural form for the given language and the given\n// decimal floating point digits. The digits are stored in big-endian order and\n// are of value byte(0) - byte(9). The floating point position is indicated by\n// exp and the number of visible decimals is scale. All leading and trailing\n// zeros may be omitted from digits.\n//\n// The following table contains examples of possible arguments to represent\n// the given numbers.\n//\n//\tdecimal    digits              exp    scale\n//\t123        []byte{1, 2, 3}     3      0\n//\t123.4      []byte{1, 2, 3, 4}  3      1\n//\t123.40     []byte{1, 2, 3, 4}  3      2\n//\t100000     []byte{1}           6      0\n//\t100000.00  []byte{1}           6      3\nfunc (p *Rules) MatchDigits(t language.Tag, digits []byte, exp, scale int) Form {\n\tindex := tagToID(t)\n\n\t// Differentiate up to including mod 1000000 for the integer part.\n\tn := getIntApprox(digits, 0, exp, 6, 1000000)\n\n\t// Differentiate up to including mod 100 for the fractional part.\n\tf := getIntApprox(digits, exp, exp+scale, 2, 100)\n\n\treturn matchPlural(p, index, n, f, scale)\n}\n\nfunc (p *Rules) matchDisplayDigits(t language.Tag, d *number.Digits) (Form, int) {\n\tn := getIntApprox(d.Digits, 0, int(d.Exp), 6, 1000000)\n\treturn p.MatchDigits(t, d.Digits, int(d.Exp), d.NumFracDigits()), n\n}\n\nfunc validForms(p *Rules, t language.Tag) (forms []Form) {\n\toffset := p.langToIndex[tagToID(t)]\n\trules := p.rules[p.index[offset]:p.index[offset+1]]\n\n\tforms = append(forms, Other)\n\tlast := Other\n\tfor _, r := range rules {\n\t\tif cat := Form(r.cat & formMask); cat != andNext && last != cat {\n\t\t\tforms = append(forms, cat)\n\t\t\tlast = cat\n\t\t}\n\t}\n\treturn forms\n}\n\nfunc (p *Rules) matchComponents(t language.Tag, n, f, scale int) Form {\n\treturn matchPlural(p, tagToID(t), n, f, scale)\n}\n\n// MatchPlural returns the plural form for the given language and plural\n// operands (as defined in\n// https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules):\n//\n//\twhere\n//\t\tn  absolute value of the source number (integer and decimals)\n//\tinput\n//\t\ti  integer digits of n.\n//\t\tv  number of visible fraction digits in n, with trailing zeros.\n//\t\tw  number of visible fraction digits in n, without trailing zeros.\n//\t\tf  visible fractional digits in n, with trailing zeros (f = t * 10^(v-w))\n//\t\tt  visible fractional digits in n, without trailing zeros.\n//\n// If any of the operand values is too large to fit in an int, it is okay to\n// pass the value modulo 10,000,000.\nfunc (p *Rules) MatchPlural(lang language.Tag, i, v, w, f, t int) Form {\n\treturn matchPlural(p, tagToID(lang), i, f, v)\n}\n\nfunc matchPlural(p *Rules, index compact.ID, n, f, v int) Form {\n\tnMask := p.inclusionMasks[n%maxMod]\n\t// Compute the fMask inline in the rules below, as it is relatively rare.\n\t// fMask := p.inclusionMasks[f%maxMod]\n\tvMask := p.inclusionMasks[v%maxMod]\n\n\t// Do the matching\n\toffset := p.langToIndex[index]\n\trules := p.rules[p.index[offset]:p.index[offset+1]]\n\tfor i := 0; i < len(rules); i++ {\n\t\trule := rules[i]\n\t\tsetBit := uint64(1 << rule.setID)\n\t\tvar skip bool\n\t\tswitch op := opID(rule.cat >> opShift); op {\n\t\tcase opI: // i = x\n\t\t\tskip = n >= numN || nMask&setBit == 0\n\n\t\tcase opI | opNotEqual: // i != x\n\t\t\tskip = n < numN && nMask&setBit != 0\n\n\t\tcase opI | opMod: // i % m = x\n\t\t\tskip = nMask&setBit == 0\n\n\t\tcase opI | opMod | opNotEqual: // i % m != x\n\t\t\tskip = nMask&setBit != 0\n\n\t\tcase opN: // n = x\n\t\t\tskip = f != 0 || n >= numN || nMask&setBit == 0\n\n\t\tcase opN | opNotEqual: // n != x\n\t\t\tskip = f == 0 && n < numN && nMask&setBit != 0\n\n\t\tcase opN | opMod: // n % m = x\n\t\t\tskip = f != 0 || nMask&setBit == 0\n\n\t\tcase opN | opMod | opNotEqual: // n % m != x\n\t\t\tskip = f == 0 && nMask&setBit != 0\n\n\t\tcase opF: // f = x\n\t\t\tskip = f >= numN || p.inclusionMasks[f%maxMod]&setBit == 0\n\n\t\tcase opF | opNotEqual: // f != x\n\t\t\tskip = f < numN && p.inclusionMasks[f%maxMod]&setBit != 0\n\n\t\tcase opF | opMod: // f % m = x\n\t\t\tskip = p.inclusionMasks[f%maxMod]&setBit == 0\n\n\t\tcase opF | opMod | opNotEqual: // f % m != x\n\t\t\tskip = p.inclusionMasks[f%maxMod]&setBit != 0\n\n\t\tcase opV: // v = x\n\t\t\tskip = v < numN && vMask&setBit == 0\n\n\t\tcase opV | opNotEqual: // v != x\n\t\t\tskip = v < numN && vMask&setBit != 0\n\n\t\tcase opW: // w == 0\n\t\t\tskip = f != 0\n\n\t\tcase opW | opNotEqual: // w != 0\n\t\t\tskip = f == 0\n\n\t\t// Hard-wired rules that cannot be handled by our algorithm.\n\n\t\tcase opBretonM:\n\t\t\tskip = f != 0 || n == 0 || n%1000000 != 0\n\n\t\tcase opAzerbaijan00s:\n\t\t\t// 100,200,300,400,500,600,700,800,900\n\t\t\tskip = n == 0 || n >= 1000 || n%100 != 0\n\n\t\tcase opItalian800:\n\t\t\tskip = (f != 0 || n >= numN || nMask&setBit == 0) && n != 800\n\t\t}\n\t\tif skip {\n\t\t\t// advance over AND entries.\n\t\t\tfor ; i < len(rules) && rules[i].cat&formMask == andNext; i++ {\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\t// return if we have a final entry.\n\t\tif cat := rule.cat & formMask; cat != andNext {\n\t\t\treturn Form(cat)\n\t\t}\n\t}\n\treturn Other\n}\n\nfunc tagToID(t language.Tag) compact.ID {\n\tid, _ := compact.RegionalID(compact.Tag(t))\n\treturn id\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/feature/plural/tables.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage plural\n\n// CLDRVersion is the CLDR version from which the tables in this package are derived.\nconst CLDRVersion = \"32\"\n\nvar ordinalRules = []pluralCheck{ // 64 elements\n\t0:  {cat: 0x2f, setID: 0x4},\n\t1:  {cat: 0x3a, setID: 0x5},\n\t2:  {cat: 0x22, setID: 0x1},\n\t3:  {cat: 0x22, setID: 0x6},\n\t4:  {cat: 0x22, setID: 0x7},\n\t5:  {cat: 0x2f, setID: 0x8},\n\t6:  {cat: 0x3c, setID: 0x9},\n\t7:  {cat: 0x2f, setID: 0xa},\n\t8:  {cat: 0x3c, setID: 0xb},\n\t9:  {cat: 0x2c, setID: 0xc},\n\t10: {cat: 0x24, setID: 0xd},\n\t11: {cat: 0x2d, setID: 0xe},\n\t12: {cat: 0x2d, setID: 0xf},\n\t13: {cat: 0x2f, setID: 0x10},\n\t14: {cat: 0x35, setID: 0x3},\n\t15: {cat: 0xc5, setID: 0x11},\n\t16: {cat: 0x2, setID: 0x1},\n\t17: {cat: 0x5, setID: 0x3},\n\t18: {cat: 0xd, setID: 0x12},\n\t19: {cat: 0x22, setID: 0x1},\n\t20: {cat: 0x2f, setID: 0x13},\n\t21: {cat: 0x3d, setID: 0x14},\n\t22: {cat: 0x2f, setID: 0x15},\n\t23: {cat: 0x3a, setID: 0x16},\n\t24: {cat: 0x2f, setID: 0x17},\n\t25: {cat: 0x3b, setID: 0x18},\n\t26: {cat: 0x2f, setID: 0xa},\n\t27: {cat: 0x3c, setID: 0xb},\n\t28: {cat: 0x22, setID: 0x1},\n\t29: {cat: 0x23, setID: 0x19},\n\t30: {cat: 0x24, setID: 0x1a},\n\t31: {cat: 0x22, setID: 0x1b},\n\t32: {cat: 0x23, setID: 0x2},\n\t33: {cat: 0x24, setID: 0x1a},\n\t34: {cat: 0xf, setID: 0x15},\n\t35: {cat: 0x1a, setID: 0x16},\n\t36: {cat: 0xf, setID: 0x17},\n\t37: {cat: 0x1b, setID: 0x18},\n\t38: {cat: 0xf, setID: 0x1c},\n\t39: {cat: 0x1d, setID: 0x1d},\n\t40: {cat: 0xa, setID: 0x1e},\n\t41: {cat: 0xa, setID: 0x1f},\n\t42: {cat: 0xc, setID: 0x20},\n\t43: {cat: 0xe4, setID: 0x0},\n\t44: {cat: 0x5, setID: 0x3},\n\t45: {cat: 0xd, setID: 0xe},\n\t46: {cat: 0xd, setID: 0x21},\n\t47: {cat: 0x22, setID: 0x1},\n\t48: {cat: 0x23, setID: 0x19},\n\t49: {cat: 0x24, setID: 0x1a},\n\t50: {cat: 0x25, setID: 0x22},\n\t51: {cat: 0x22, setID: 0x23},\n\t52: {cat: 0x23, setID: 0x19},\n\t53: {cat: 0x24, setID: 0x1a},\n\t54: {cat: 0x25, setID: 0x22},\n\t55: {cat: 0x22, setID: 0x24},\n\t56: {cat: 0x23, setID: 0x19},\n\t57: {cat: 0x24, setID: 0x1a},\n\t58: {cat: 0x25, setID: 0x22},\n\t59: {cat: 0x21, setID: 0x25},\n\t60: {cat: 0x22, setID: 0x1},\n\t61: {cat: 0x23, setID: 0x2},\n\t62: {cat: 0x24, setID: 0x26},\n\t63: {cat: 0x25, setID: 0x27},\n} // Size: 152 bytes\n\nvar ordinalIndex = []uint8{ // 22 elements\n\t0x00, 0x00, 0x02, 0x03, 0x04, 0x05, 0x07, 0x09,\n\t0x0b, 0x0f, 0x10, 0x13, 0x16, 0x1c, 0x1f, 0x22,\n\t0x28, 0x2f, 0x33, 0x37, 0x3b, 0x40,\n} // Size: 46 bytes\n\nvar ordinalLangToIndex = []uint8{ // 775 elements\n\t// Entry 0 - 3F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x12, 0x12, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10,\n\t0x10, 0x10, 0x10, 0x00, 0x00, 0x05, 0x05, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 40 - 7F\n\t0x12, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,\n\t0x0e, 0x0e, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 80 - BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t// Entry C0 - FF\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,\n\t0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 100 - 13F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,\n\t0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 140 - 17F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,\n\t0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03,\n\t0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 180 - 1BF\n\t0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09,\n\t0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 1C0 - 1FF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00,\n\t0x00, 0x00, 0x02, 0x0d, 0x0d, 0x02, 0x02, 0x02,\n\t0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 200 - 23F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x13, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 240 - 27F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,\n\t0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 280 - 2BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0b, 0x0b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x07, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 2C0 - 2FF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 300 - 33F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0c,\n} // Size: 799 bytes\n\nvar ordinalInclusionMasks = []uint64{ // 100 elements\n\t// Entry 0 - 1F\n\t0x0000002000010009, 0x00000018482000d3, 0x0000000042840195, 0x000000410a040581,\n\t0x00000041040c0081, 0x0000009840040041, 0x0000008400045001, 0x0000003850040001,\n\t0x0000003850060001, 0x0000003800049001, 0x0000000800052001, 0x0000000040660031,\n\t0x0000000041840331, 0x0000000100040f01, 0x00000001001c0001, 0x0000000040040001,\n\t0x0000000000045001, 0x0000000070040001, 0x0000000070040001, 0x0000000000049001,\n\t0x0000000080050001, 0x0000000040200011, 0x0000000040800111, 0x0000000100000501,\n\t0x0000000100080001, 0x0000000040000001, 0x0000000000005001, 0x0000000050000001,\n\t0x0000000050000001, 0x0000000000009001, 0x0000000000010001, 0x0000000040200011,\n\t// Entry 20 - 3F\n\t0x0000000040800111, 0x0000000100000501, 0x0000000100080001, 0x0000000040000001,\n\t0x0000000000005001, 0x0000000050000001, 0x0000000050000001, 0x0000000000009001,\n\t0x0000000200050001, 0x0000000040200011, 0x0000000040800111, 0x0000000100000501,\n\t0x0000000100080001, 0x0000000040000001, 0x0000000000005001, 0x0000000050000001,\n\t0x0000000050000001, 0x0000000000009001, 0x0000000080010001, 0x0000000040200011,\n\t0x0000000040800111, 0x0000000100000501, 0x0000000100080001, 0x0000000040000001,\n\t0x0000000000005001, 0x0000000050000001, 0x0000000050000001, 0x0000000000009001,\n\t0x0000000200050001, 0x0000000040200011, 0x0000000040800111, 0x0000000100000501,\n\t// Entry 40 - 5F\n\t0x0000000100080001, 0x0000000040000001, 0x0000000000005001, 0x0000000050000001,\n\t0x0000000050000001, 0x0000000000009001, 0x0000000080010001, 0x0000000040200011,\n\t0x0000000040800111, 0x0000000100000501, 0x0000000100080001, 0x0000000040000001,\n\t0x0000000000005001, 0x0000000050000001, 0x0000000050000001, 0x0000000000009001,\n\t0x0000000080070001, 0x0000000040200011, 0x0000000040800111, 0x0000000100000501,\n\t0x0000000100080001, 0x0000000040000001, 0x0000000000005001, 0x0000000050000001,\n\t0x0000000050000001, 0x0000000000009001, 0x0000000200010001, 0x0000000040200011,\n\t0x0000000040800111, 0x0000000100000501, 0x0000000100080001, 0x0000000040000001,\n\t// Entry 60 - 7F\n\t0x0000000000005001, 0x0000000050000001, 0x0000000050000001, 0x0000000000009001,\n} // Size: 824 bytes\n\n// Slots used for ordinal: 40 of 0xFF rules; 16 of 0xFF indexes; 40 of 64 sets\n\nvar cardinalRules = []pluralCheck{ // 166 elements\n\t0:   {cat: 0x2, setID: 0x3},\n\t1:   {cat: 0x22, setID: 0x1},\n\t2:   {cat: 0x2, setID: 0x4},\n\t3:   {cat: 0x2, setID: 0x4},\n\t4:   {cat: 0x7, setID: 0x1},\n\t5:   {cat: 0x62, setID: 0x3},\n\t6:   {cat: 0x22, setID: 0x4},\n\t7:   {cat: 0x7, setID: 0x3},\n\t8:   {cat: 0x42, setID: 0x1},\n\t9:   {cat: 0x22, setID: 0x4},\n\t10:  {cat: 0x22, setID: 0x4},\n\t11:  {cat: 0x22, setID: 0x5},\n\t12:  {cat: 0x22, setID: 0x1},\n\t13:  {cat: 0x22, setID: 0x1},\n\t14:  {cat: 0x7, setID: 0x4},\n\t15:  {cat: 0x92, setID: 0x3},\n\t16:  {cat: 0xf, setID: 0x6},\n\t17:  {cat: 0x1f, setID: 0x7},\n\t18:  {cat: 0x82, setID: 0x3},\n\t19:  {cat: 0x92, setID: 0x3},\n\t20:  {cat: 0xf, setID: 0x6},\n\t21:  {cat: 0x62, setID: 0x3},\n\t22:  {cat: 0x4a, setID: 0x6},\n\t23:  {cat: 0x7, setID: 0x8},\n\t24:  {cat: 0x62, setID: 0x3},\n\t25:  {cat: 0x1f, setID: 0x9},\n\t26:  {cat: 0x62, setID: 0x3},\n\t27:  {cat: 0x5f, setID: 0x9},\n\t28:  {cat: 0x72, setID: 0x3},\n\t29:  {cat: 0x29, setID: 0xa},\n\t30:  {cat: 0x29, setID: 0xb},\n\t31:  {cat: 0x4f, setID: 0xb},\n\t32:  {cat: 0x61, setID: 0x2},\n\t33:  {cat: 0x2f, setID: 0x6},\n\t34:  {cat: 0x3a, setID: 0x7},\n\t35:  {cat: 0x4f, setID: 0x6},\n\t36:  {cat: 0x5f, setID: 0x7},\n\t37:  {cat: 0x62, setID: 0x2},\n\t38:  {cat: 0x4f, setID: 0x6},\n\t39:  {cat: 0x72, setID: 0x2},\n\t40:  {cat: 0x21, setID: 0x3},\n\t41:  {cat: 0x7, setID: 0x4},\n\t42:  {cat: 0x32, setID: 0x3},\n\t43:  {cat: 0x21, setID: 0x3},\n\t44:  {cat: 0x22, setID: 0x1},\n\t45:  {cat: 0x22, setID: 0x1},\n\t46:  {cat: 0x23, setID: 0x2},\n\t47:  {cat: 0x2, setID: 0x3},\n\t48:  {cat: 0x22, setID: 0x1},\n\t49:  {cat: 0x24, setID: 0xc},\n\t50:  {cat: 0x7, setID: 0x1},\n\t51:  {cat: 0x62, setID: 0x3},\n\t52:  {cat: 0x74, setID: 0x3},\n\t53:  {cat: 0x24, setID: 0x3},\n\t54:  {cat: 0x2f, setID: 0xd},\n\t55:  {cat: 0x34, setID: 0x1},\n\t56:  {cat: 0xf, setID: 0x6},\n\t57:  {cat: 0x1f, setID: 0x7},\n\t58:  {cat: 0x62, setID: 0x3},\n\t59:  {cat: 0x4f, setID: 0x6},\n\t60:  {cat: 0x5a, setID: 0x7},\n\t61:  {cat: 0xf, setID: 0xe},\n\t62:  {cat: 0x1f, setID: 0xf},\n\t63:  {cat: 0x64, setID: 0x3},\n\t64:  {cat: 0x4f, setID: 0xe},\n\t65:  {cat: 0x5c, setID: 0xf},\n\t66:  {cat: 0x22, setID: 0x10},\n\t67:  {cat: 0x23, setID: 0x11},\n\t68:  {cat: 0x24, setID: 0x12},\n\t69:  {cat: 0xf, setID: 0x1},\n\t70:  {cat: 0x62, setID: 0x3},\n\t71:  {cat: 0xf, setID: 0x2},\n\t72:  {cat: 0x63, setID: 0x3},\n\t73:  {cat: 0xf, setID: 0x13},\n\t74:  {cat: 0x64, setID: 0x3},\n\t75:  {cat: 0x74, setID: 0x3},\n\t76:  {cat: 0xf, setID: 0x1},\n\t77:  {cat: 0x62, setID: 0x3},\n\t78:  {cat: 0x4a, setID: 0x1},\n\t79:  {cat: 0xf, setID: 0x2},\n\t80:  {cat: 0x63, setID: 0x3},\n\t81:  {cat: 0x4b, setID: 0x2},\n\t82:  {cat: 0xf, setID: 0x13},\n\t83:  {cat: 0x64, setID: 0x3},\n\t84:  {cat: 0x4c, setID: 0x13},\n\t85:  {cat: 0x7, setID: 0x1},\n\t86:  {cat: 0x62, setID: 0x3},\n\t87:  {cat: 0x7, setID: 0x2},\n\t88:  {cat: 0x63, setID: 0x3},\n\t89:  {cat: 0x2f, setID: 0xa},\n\t90:  {cat: 0x37, setID: 0x14},\n\t91:  {cat: 0x65, setID: 0x3},\n\t92:  {cat: 0x7, setID: 0x1},\n\t93:  {cat: 0x62, setID: 0x3},\n\t94:  {cat: 0x7, setID: 0x15},\n\t95:  {cat: 0x64, setID: 0x3},\n\t96:  {cat: 0x75, setID: 0x3},\n\t97:  {cat: 0x7, setID: 0x1},\n\t98:  {cat: 0x62, setID: 0x3},\n\t99:  {cat: 0xf, setID: 0xe},\n\t100: {cat: 0x1f, setID: 0xf},\n\t101: {cat: 0x64, setID: 0x3},\n\t102: {cat: 0xf, setID: 0x16},\n\t103: {cat: 0x17, setID: 0x1},\n\t104: {cat: 0x65, setID: 0x3},\n\t105: {cat: 0xf, setID: 0x17},\n\t106: {cat: 0x65, setID: 0x3},\n\t107: {cat: 0xf, setID: 0xf},\n\t108: {cat: 0x65, setID: 0x3},\n\t109: {cat: 0x2f, setID: 0x6},\n\t110: {cat: 0x3a, setID: 0x7},\n\t111: {cat: 0x2f, setID: 0xe},\n\t112: {cat: 0x3c, setID: 0xf},\n\t113: {cat: 0x2d, setID: 0xa},\n\t114: {cat: 0x2d, setID: 0x17},\n\t115: {cat: 0x2d, setID: 0x18},\n\t116: {cat: 0x2f, setID: 0x6},\n\t117: {cat: 0x3a, setID: 0xb},\n\t118: {cat: 0x2f, setID: 0x19},\n\t119: {cat: 0x3c, setID: 0xb},\n\t120: {cat: 0x55, setID: 0x3},\n\t121: {cat: 0x22, setID: 0x1},\n\t122: {cat: 0x24, setID: 0x3},\n\t123: {cat: 0x2c, setID: 0xc},\n\t124: {cat: 0x2d, setID: 0xb},\n\t125: {cat: 0xf, setID: 0x6},\n\t126: {cat: 0x1f, setID: 0x7},\n\t127: {cat: 0x62, setID: 0x3},\n\t128: {cat: 0xf, setID: 0xe},\n\t129: {cat: 0x1f, setID: 0xf},\n\t130: {cat: 0x64, setID: 0x3},\n\t131: {cat: 0xf, setID: 0xa},\n\t132: {cat: 0x65, setID: 0x3},\n\t133: {cat: 0xf, setID: 0x17},\n\t134: {cat: 0x65, setID: 0x3},\n\t135: {cat: 0xf, setID: 0x18},\n\t136: {cat: 0x65, setID: 0x3},\n\t137: {cat: 0x2f, setID: 0x6},\n\t138: {cat: 0x3a, setID: 0x1a},\n\t139: {cat: 0x2f, setID: 0x1b},\n\t140: {cat: 0x3b, setID: 0x1c},\n\t141: {cat: 0x2f, setID: 0x1d},\n\t142: {cat: 0x3c, setID: 0x1e},\n\t143: {cat: 0x37, setID: 0x3},\n\t144: {cat: 0xa5, setID: 0x0},\n\t145: {cat: 0x22, setID: 0x1},\n\t146: {cat: 0x23, setID: 0x2},\n\t147: {cat: 0x24, setID: 0x1f},\n\t148: {cat: 0x25, setID: 0x20},\n\t149: {cat: 0xf, setID: 0x6},\n\t150: {cat: 0x62, setID: 0x3},\n\t151: {cat: 0xf, setID: 0x1b},\n\t152: {cat: 0x63, setID: 0x3},\n\t153: {cat: 0xf, setID: 0x21},\n\t154: {cat: 0x64, setID: 0x3},\n\t155: {cat: 0x75, setID: 0x3},\n\t156: {cat: 0x21, setID: 0x3},\n\t157: {cat: 0x22, setID: 0x1},\n\t158: {cat: 0x23, setID: 0x2},\n\t159: {cat: 0x2c, setID: 0x22},\n\t160: {cat: 0x2d, setID: 0x5},\n\t161: {cat: 0x21, setID: 0x3},\n\t162: {cat: 0x22, setID: 0x1},\n\t163: {cat: 0x23, setID: 0x2},\n\t164: {cat: 0x24, setID: 0x23},\n\t165: {cat: 0x25, setID: 0x24},\n} // Size: 356 bytes\n\nvar cardinalIndex = []uint8{ // 36 elements\n\t0x00, 0x00, 0x02, 0x03, 0x04, 0x06, 0x09, 0x0a,\n\t0x0c, 0x0d, 0x10, 0x14, 0x17, 0x1d, 0x28, 0x2b,\n\t0x2d, 0x2f, 0x32, 0x38, 0x42, 0x45, 0x4c, 0x55,\n\t0x5c, 0x61, 0x6d, 0x74, 0x79, 0x7d, 0x89, 0x91,\n\t0x95, 0x9c, 0xa1, 0xa6,\n} // Size: 60 bytes\n\nvar cardinalLangToIndex = []uint8{ // 775 elements\n\t// Entry 0 - 3F\n\t0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x06, 0x06,\n\t0x01, 0x01, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t0x01, 0x01, 0x08, 0x08, 0x04, 0x04, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x00, 0x00, 0x1a, 0x1a, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x00, 0x00,\n\t// Entry 40 - 7F\n\t0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x1e,\n\t0x08, 0x08, 0x13, 0x13, 0x13, 0x13, 0x13, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t0x18, 0x18, 0x00, 0x00, 0x22, 0x22, 0x09, 0x09,\n\t0x09, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x00, 0x00, 0x16, 0x16, 0x00,\n\t0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 80 - BF\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry C0 - FF\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t// Entry 100 - 13F\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04,\n\t0x08, 0x08, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x0c, 0x0c,\n\t0x08, 0x08, 0x08, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 140 - 17F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x08, 0x08, 0x04, 0x04, 0x1f, 0x1f,\n\t0x14, 0x14, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08,\n\t0x01, 0x01, 0x06, 0x00, 0x00, 0x20, 0x20, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x17, 0x17, 0x01,\n\t0x01, 0x13, 0x13, 0x13, 0x16, 0x16, 0x08, 0x08,\n\t0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 180 - 1BF\n\t0x00, 0x04, 0x0a, 0x0a, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x10, 0x17, 0x00, 0x00, 0x00, 0x08, 0x08,\n\t0x04, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x02,\n\t0x02, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,\n\t0x08, 0x08, 0x00, 0x00, 0x0f, 0x0f, 0x08, 0x10,\n\t// Entry 1C0 - 1FF\n\t0x10, 0x08, 0x08, 0x0e, 0x0e, 0x08, 0x08, 0x08,\n\t0x08, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x1b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0d, 0x08,\n\t0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06,\n\t0x00, 0x00, 0x08, 0x08, 0x0b, 0x0b, 0x08, 0x08,\n\t0x08, 0x08, 0x12, 0x01, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 200 - 23F\n\t0x00, 0x08, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,\n\t0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08,\n\t0x06, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x08, 0x19, 0x19, 0x0d, 0x0d,\n\t0x08, 0x08, 0x03, 0x04, 0x03, 0x04, 0x04, 0x04,\n\t// Entry 240 - 27F\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x12,\n\t0x12, 0x12, 0x08, 0x08, 0x1d, 0x1d, 0x1d, 0x1d,\n\t0x1d, 0x1d, 0x1d, 0x00, 0x00, 0x08, 0x08, 0x00,\n\t0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08,\n\t0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00,\n\t0x00, 0x00, 0x13, 0x11, 0x11, 0x11, 0x11, 0x11,\n\t0x05, 0x05, 0x18, 0x18, 0x15, 0x15, 0x10, 0x10,\n\t// Entry 280 - 2BF\n\t0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x13,\n\t0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13,\n\t0x13, 0x13, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,\n\t0x08, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06,\n\t0x08, 0x08, 0x08, 0x0c, 0x08, 0x00, 0x00, 0x08,\n\t// Entry 2C0 - 2FF\n\t0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07,\n\t0x07, 0x08, 0x08, 0x1d, 0x1d, 0x04, 0x04, 0x04,\n\t0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08,\n\t0x08, 0x08, 0x08, 0x06, 0x08, 0x08, 0x00, 0x00,\n\t0x08, 0x08, 0x08, 0x00, 0x00, 0x04, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 300 - 33F\n\t0x00, 0x00, 0x00, 0x01, 0x01, 0x04, 0x04,\n} // Size: 799 bytes\n\nvar cardinalInclusionMasks = []uint64{ // 100 elements\n\t// Entry 0 - 1F\n\t0x0000000200500419, 0x0000000000512153, 0x000000000a327105, 0x0000000ca23c7101,\n\t0x00000004a23c7201, 0x0000000482943001, 0x0000001482943201, 0x0000000502943001,\n\t0x0000000502943001, 0x0000000522943201, 0x0000000540543401, 0x00000000454128e1,\n\t0x000000005b02e821, 0x000000006304e821, 0x000000006304ea21, 0x0000000042842821,\n\t0x0000000042842a21, 0x0000000042842821, 0x0000000042842821, 0x0000000062842a21,\n\t0x0000000200400421, 0x0000000000400061, 0x000000000a004021, 0x0000000022004021,\n\t0x0000000022004221, 0x0000000002800021, 0x0000000002800221, 0x0000000002800021,\n\t0x0000000002800021, 0x0000000022800221, 0x0000000000400421, 0x0000000000400061,\n\t// Entry 20 - 3F\n\t0x000000000a004021, 0x0000000022004021, 0x0000000022004221, 0x0000000002800021,\n\t0x0000000002800221, 0x0000000002800021, 0x0000000002800021, 0x0000000022800221,\n\t0x0000000200400421, 0x0000000000400061, 0x000000000a004021, 0x0000000022004021,\n\t0x0000000022004221, 0x0000000002800021, 0x0000000002800221, 0x0000000002800021,\n\t0x0000000002800021, 0x0000000022800221, 0x0000000000400421, 0x0000000000400061,\n\t0x000000000a004021, 0x0000000022004021, 0x0000000022004221, 0x0000000002800021,\n\t0x0000000002800221, 0x0000000002800021, 0x0000000002800021, 0x0000000022800221,\n\t0x0000000200400421, 0x0000000000400061, 0x000000000a004021, 0x0000000022004021,\n\t// Entry 40 - 5F\n\t0x0000000022004221, 0x0000000002800021, 0x0000000002800221, 0x0000000002800021,\n\t0x0000000002800021, 0x0000000022800221, 0x0000000040400421, 0x0000000044400061,\n\t0x000000005a004021, 0x0000000062004021, 0x0000000062004221, 0x0000000042800021,\n\t0x0000000042800221, 0x0000000042800021, 0x0000000042800021, 0x0000000062800221,\n\t0x0000000200400421, 0x0000000000400061, 0x000000000a004021, 0x0000000022004021,\n\t0x0000000022004221, 0x0000000002800021, 0x0000000002800221, 0x0000000002800021,\n\t0x0000000002800021, 0x0000000022800221, 0x0000000040400421, 0x0000000044400061,\n\t0x000000005a004021, 0x0000000062004021, 0x0000000062004221, 0x0000000042800021,\n\t// Entry 60 - 7F\n\t0x0000000042800221, 0x0000000042800021, 0x0000000042800021, 0x0000000062800221,\n} // Size: 824 bytes\n\n// Slots used for cardinal: A6 of 0xFF rules; 24 of 0xFF indexes; 37 of 64 sets\n\n// Total table size 3860 bytes (3KiB); checksum: AAFBF21\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/catmsg/catmsg.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package catmsg contains support types for package x/text/message/catalog.\n//\n// This package contains the low-level implementations of Message used by the\n// catalog package and provides primitives for other packages to implement their\n// own. For instance, the plural package provides functionality for selecting\n// translation strings based on the plural category of substitution arguments.\n//\n// # Encoding and Decoding\n//\n// Catalogs store Messages encoded as a single string. Compiling a message into\n// a string both results in compacter representation and speeds up evaluation.\n//\n// A Message must implement a Compile method to convert its arbitrary\n// representation to a string. The Compile method takes an Encoder which\n// facilitates serializing the message. Encoders also provide more context of\n// the messages's creation (such as for which language the message is intended),\n// which may not be known at the time of the creation of the message.\n//\n// Each message type must also have an accompanying decoder registered to decode\n// the message. This decoder takes a Decoder argument which provides the\n// counterparts for the decoding.\n//\n// # Renderers\n//\n// A Decoder must be initialized with a Renderer implementation. These\n// implementations must be provided by packages that use Catalogs, typically\n// formatting packages such as x/text/message. A typical user will not need to\n// worry about this type; it is only relevant to packages that do string\n// formatting and want to use the catalog package to handle localized strings.\n//\n// A package that uses catalogs for selecting strings receives selection results\n// as sequence of substrings passed to the Renderer. The following snippet shows\n// how to express the above example using the message package.\n//\n//\tmessage.Set(language.English, \"You are %d minute(s) late.\",\n//\t\tcatalog.Var(\"minutes\", plural.Select(1, \"one\", \"minute\")),\n//\t\tcatalog.String(\"You are %[1]d ${minutes} late.\"))\n//\n//\tp := message.NewPrinter(language.English)\n//\tp.Printf(\"You are %d minute(s) late.\", 5) // always 5 minutes late.\n//\n// To evaluate the Printf, package message wraps the arguments in a Renderer\n// that is passed to the catalog for message decoding. The call sequence that\n// results from evaluating the above message, assuming the person is rather\n// tardy, is:\n//\n//\tRender(\"You are %[1]d \")\n//\tArg(1)\n//\tRender(\"minutes\")\n//\tRender(\" late.\")\n//\n// The calls to Arg is caused by the plural.Select execution, which evaluates\n// the argument to determine whether the singular or plural message form should\n// be selected. The calls to Render reports the partial results to the message\n// package for further evaluation.\npackage catmsg\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// A Handle refers to a registered message type.\ntype Handle int\n\n// A Handler decodes and evaluates data compiled by a Message and sends the\n// result to the Decoder. The output may depend on the value of the substitution\n// arguments, accessible by the Decoder's Arg method. The Handler returns false\n// if there is no translation for the given substitution arguments.\ntype Handler func(d *Decoder) bool\n\n// Register records the existence of a message type and returns a Handle that\n// can be used in the Encoder's EncodeMessageType method to create such\n// messages. The prefix of the name should be the package path followed by\n// an optional disambiguating string.\n// Register will panic if a handle for the same name was already registered.\nfunc Register(name string, handler Handler) Handle {\n\tmutex.Lock()\n\tdefer mutex.Unlock()\n\n\tif _, ok := names[name]; ok {\n\t\tpanic(fmt.Errorf(\"catmsg: handler for %q already exists\", name))\n\t}\n\th := Handle(len(handlers))\n\tnames[name] = h\n\thandlers = append(handlers, handler)\n\treturn h\n}\n\n// These handlers require fixed positions in the handlers slice.\nconst (\n\tmsgVars Handle = iota\n\tmsgFirst\n\tmsgRaw\n\tmsgString\n\tmsgAffix\n\t// Leave some arbitrary room for future expansion: 20 should suffice.\n\tnumInternal = 20\n)\n\nconst prefix = \"golang.org/x/text/internal/catmsg.\"\n\nvar (\n\t// TODO: find a more stable way to link handles to message types.\n\tmutex sync.Mutex\n\tnames = map[string]Handle{\n\t\tprefix + \"Vars\":   msgVars,\n\t\tprefix + \"First\":  msgFirst,\n\t\tprefix + \"Raw\":    msgRaw,\n\t\tprefix + \"String\": msgString,\n\t\tprefix + \"Affix\":  msgAffix,\n\t}\n\thandlers = make([]Handler, numInternal)\n)\n\nfunc init() {\n\t// This handler is a message type wrapper that initializes a decoder\n\t// with a variable block. This message type, if present, is always at the\n\t// start of an encoded message.\n\thandlers[msgVars] = func(d *Decoder) bool {\n\t\tblockSize := int(d.DecodeUint())\n\t\td.vars = d.data[:blockSize]\n\t\td.data = d.data[blockSize:]\n\t\treturn d.executeMessage()\n\t}\n\n\t// First takes the first message in a sequence that results in a match for\n\t// the given substitution arguments.\n\thandlers[msgFirst] = func(d *Decoder) bool {\n\t\tfor !d.Done() {\n\t\t\tif d.ExecuteMessage() {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\n\thandlers[msgRaw] = func(d *Decoder) bool {\n\t\td.Render(d.data)\n\t\treturn true\n\t}\n\n\t// A String message alternates between a string constant and a variable\n\t// substitution.\n\thandlers[msgString] = func(d *Decoder) bool {\n\t\tfor !d.Done() {\n\t\t\tif str := d.DecodeString(); str != \"\" {\n\t\t\t\td.Render(str)\n\t\t\t}\n\t\t\tif d.Done() {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\td.ExecuteSubstitution()\n\t\t}\n\t\treturn true\n\t}\n\n\thandlers[msgAffix] = func(d *Decoder) bool {\n\t\t// TODO: use an alternative method for common cases.\n\t\tprefix := d.DecodeString()\n\t\tsuffix := d.DecodeString()\n\t\tif prefix != \"\" {\n\t\t\td.Render(prefix)\n\t\t}\n\t\tret := d.ExecuteMessage()\n\t\tif suffix != \"\" {\n\t\t\td.Render(suffix)\n\t\t}\n\t\treturn ret\n\t}\n}\n\nvar (\n\t// ErrIncomplete indicates a compiled message does not define translations\n\t// for all possible argument values. If this message is returned, evaluating\n\t// a message may result in the ErrNoMatch error.\n\tErrIncomplete = errors.New(\"catmsg: incomplete message; may not give result for all inputs\")\n\n\t// ErrNoMatch indicates no translation message matched the given input\n\t// parameters when evaluating a message.\n\tErrNoMatch = errors.New(\"catmsg: no translation for inputs\")\n)\n\n// A Message holds a collection of translations for the same phrase that may\n// vary based on the values of substitution arguments.\ntype Message interface {\n\t// Compile encodes the format string(s) of the message as a string for later\n\t// evaluation.\n\t//\n\t// The first call Compile makes on the encoder must be EncodeMessageType.\n\t// The handle passed to this call may either be a handle returned by\n\t// Register to encode a single custom message, or HandleFirst followed by\n\t// a sequence of calls to EncodeMessage.\n\t//\n\t// Compile must return ErrIncomplete if it is possible for evaluation to\n\t// not match any translation for a given set of formatting parameters.\n\t// For example, selecting a translation based on plural form may not yield\n\t// a match if the form \"Other\" is not one of the selectors.\n\t//\n\t// Compile may return any other application-specific error. For backwards\n\t// compatibility with package like fmt, which often do not do sanity\n\t// checking of format strings ahead of time, Compile should still make an\n\t// effort to have some sensible fallback in case of an error.\n\tCompile(e *Encoder) error\n}\n\n// Compile converts a Message to a data string that can be stored in a Catalog.\n// The resulting string can subsequently be decoded by passing to the Execute\n// method of a Decoder.\nfunc Compile(tag language.Tag, macros Dictionary, m Message) (data string, err error) {\n\t// TODO: pass macros so they can be used for validation.\n\tv := &Encoder{inBody: true} // encoder for variables\n\tv.root = v\n\te := &Encoder{root: v, parent: v, tag: tag} // encoder for messages\n\terr = m.Compile(e)\n\t// This package serves te message package, which in turn is meant to be a\n\t// drop-in replacement for fmt.  With the fmt package, format strings are\n\t// evaluated lazily and errors are handled by substituting strings in the\n\t// result, rather then returning an error. Dealing with multiple languages\n\t// makes it more important to check errors ahead of time. We chose to be\n\t// consistent and compatible and allow graceful degradation in case of\n\t// errors.\n\tbuf := e.buf[stripPrefix(e.buf):]\n\tif len(v.buf) > 0 {\n\t\t// Prepend variable block.\n\t\tb := make([]byte, 1+maxVarintBytes+len(v.buf)+len(buf))\n\t\tb[0] = byte(msgVars)\n\t\tb = b[:1+encodeUint(b[1:], uint64(len(v.buf)))]\n\t\tb = append(b, v.buf...)\n\t\tb = append(b, buf...)\n\t\tbuf = b\n\t}\n\tif err == nil {\n\t\terr = v.err\n\t}\n\treturn string(buf), err\n}\n\n// FirstOf is a message type that prints the first message in the sequence that\n// resolves to a match for the given substitution arguments.\ntype FirstOf []Message\n\n// Compile implements Message.\nfunc (s FirstOf) Compile(e *Encoder) error {\n\te.EncodeMessageType(msgFirst)\n\terr := ErrIncomplete\n\tfor i, m := range s {\n\t\tif err == nil {\n\t\t\treturn fmt.Errorf(\"catalog: message argument %d is complete and blocks subsequent messages\", i-1)\n\t\t}\n\t\terr = e.EncodeMessage(m)\n\t}\n\treturn err\n}\n\n// Var defines a message that can be substituted for a placeholder of the same\n// name. If an expression does not result in a string after evaluation, Name is\n// used as the substitution. For example:\n//\n//\tVar{\n//\t  Name:    \"minutes\",\n//\t  Message: plural.Select(1, \"one\", \"minute\"),\n//\t}\n//\n// will resolve to minute for singular and minutes for plural forms.\ntype Var struct {\n\tName    string\n\tMessage Message\n}\n\nvar errIsVar = errors.New(\"catmsg: variable used as message\")\n\n// Compile implements Message.\n//\n// Note that this method merely registers a variable; it does not create an\n// encoded message.\nfunc (v *Var) Compile(e *Encoder) error {\n\tif err := e.addVar(v.Name, v.Message); err != nil {\n\t\treturn err\n\t}\n\t// Using a Var by itself is an error. If it is in a sequence followed by\n\t// other messages referring to it, this error will be ignored.\n\treturn errIsVar\n}\n\n// Raw is a message consisting of a single format string that is passed as is\n// to the Renderer.\n//\n// Note that a Renderer may still do its own variable substitution.\ntype Raw string\n\n// Compile implements Message.\nfunc (r Raw) Compile(e *Encoder) (err error) {\n\te.EncodeMessageType(msgRaw)\n\t// Special case: raw strings don't have a size encoding and so don't use\n\t// EncodeString.\n\te.buf = append(e.buf, r...)\n\treturn nil\n}\n\n// String is a message consisting of a single format string which contains\n// placeholders that may be substituted with variables.\n//\n// Variable substitutions are marked with placeholders and a variable name of\n// the form ${name}. Any other substitutions such as Go templates or\n// printf-style substitutions are left to be done by the Renderer.\n//\n// When evaluation a string interpolation, a Renderer will receive separate\n// calls for each placeholder and interstitial string. For example, for the\n// message: \"%[1]v ${invites} %[2]v to ${their} party.\" The sequence of calls\n// is:\n//\n//\td.Render(\"%[1]v \")\n//\td.Arg(1)\n//\td.Render(resultOfInvites)\n//\td.Render(\" %[2]v to \")\n//\td.Arg(2)\n//\td.Render(resultOfTheir)\n//\td.Render(\" party.\")\n//\n// where the messages for \"invites\" and \"their\" both use a plural.Select\n// referring to the first argument.\n//\n// Strings may also invoke macros. Macros are essentially variables that can be\n// reused. Macros may, for instance, be used to make selections between\n// different conjugations of a verb. See the catalog package description for an\n// overview of macros.\ntype String string\n\n// Compile implements Message. It parses the placeholder formats and returns\n// any error.\nfunc (s String) Compile(e *Encoder) (err error) {\n\tmsg := string(s)\n\tconst subStart = \"${\"\n\thasHeader := false\n\tp := 0\n\tb := []byte{}\n\tfor {\n\t\ti := strings.Index(msg[p:], subStart)\n\t\tif i == -1 {\n\t\t\tbreak\n\t\t}\n\t\tb = append(b, msg[p:p+i]...)\n\t\tp += i + len(subStart)\n\t\tif i = strings.IndexByte(msg[p:], '}'); i == -1 {\n\t\t\tb = append(b, \"$!(MISSINGBRACE)\"...)\n\t\t\terr = fmt.Errorf(\"catmsg: missing '}'\")\n\t\t\tp = len(msg)\n\t\t\tbreak\n\t\t}\n\t\tname := strings.TrimSpace(msg[p : p+i])\n\t\tif q := strings.IndexByte(name, '('); q == -1 {\n\t\t\tif !hasHeader {\n\t\t\t\thasHeader = true\n\t\t\t\te.EncodeMessageType(msgString)\n\t\t\t}\n\t\t\te.EncodeString(string(b))\n\t\t\te.EncodeSubstitution(name)\n\t\t\tb = b[:0]\n\t\t} else if j := strings.IndexByte(name[q:], ')'); j == -1 {\n\t\t\t// TODO: what should the error be?\n\t\t\tb = append(b, \"$!(MISSINGPAREN)\"...)\n\t\t\terr = fmt.Errorf(\"catmsg: missing ')'\")\n\t\t} else if x, sErr := strconv.ParseUint(strings.TrimSpace(name[q+1:q+j]), 10, 32); sErr != nil {\n\t\t\t// TODO: handle more than one argument\n\t\t\tb = append(b, \"$!(BADNUM)\"...)\n\t\t\terr = fmt.Errorf(\"catmsg: invalid number %q\", strings.TrimSpace(name[q+1:q+j]))\n\t\t} else {\n\t\t\tif !hasHeader {\n\t\t\t\thasHeader = true\n\t\t\t\te.EncodeMessageType(msgString)\n\t\t\t}\n\t\t\te.EncodeString(string(b))\n\t\t\te.EncodeSubstitution(name[:q], int(x))\n\t\t\tb = b[:0]\n\t\t}\n\t\tp += i + 1\n\t}\n\tb = append(b, msg[p:]...)\n\tif !hasHeader {\n\t\t// Simplify string to a raw string.\n\t\tRaw(string(b)).Compile(e)\n\t} else if len(b) > 0 {\n\t\te.EncodeString(string(b))\n\t}\n\treturn err\n}\n\n// Affix is a message that adds a prefix and suffix to another message.\n// This is mostly used add back whitespace to a translation that was stripped\n// before sending it out.\ntype Affix struct {\n\tMessage Message\n\tPrefix  string\n\tSuffix  string\n}\n\n// Compile implements Message.\nfunc (a Affix) Compile(e *Encoder) (err error) {\n\t// TODO: consider adding a special message type that just adds a single\n\t// return. This is probably common enough to handle the majority of cases.\n\t// Get some stats first, though.\n\te.EncodeMessageType(msgAffix)\n\te.EncodeString(a.Prefix)\n\te.EncodeString(a.Suffix)\n\te.EncodeMessage(a.Message)\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/catmsg/codec.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage catmsg\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// A Renderer renders a Message.\ntype Renderer interface {\n\t// Render renders the given string. The given string may be interpreted as a\n\t// format string, such as the one used by the fmt package or a template.\n\tRender(s string)\n\n\t// Arg returns the i-th argument passed to format a message. This method\n\t// should return nil if there is no such argument. Messages need access to\n\t// arguments to allow selecting a message based on linguistic features of\n\t// those arguments.\n\tArg(i int) interface{}\n}\n\n// A Dictionary specifies a source of messages, including variables or macros.\ntype Dictionary interface {\n\t// Lookup returns the message for the given key. It returns false for ok if\n\t// such a message could not be found.\n\tLookup(key string) (data string, ok bool)\n\n\t// TODO: consider returning an interface, instead of a string. This will\n\t// allow implementations to do their own message type decoding.\n}\n\n// An Encoder serializes a Message to a string.\ntype Encoder struct {\n\t// The root encoder is used for storing encoded variables.\n\troot *Encoder\n\t// The parent encoder provides the surrounding scopes for resolving variable\n\t// names.\n\tparent *Encoder\n\n\ttag language.Tag\n\n\t// buf holds the encoded message so far. After a message completes encoding,\n\t// the contents of buf, prefixed by the encoded length, are flushed to the\n\t// parent buffer.\n\tbuf []byte\n\n\t// vars is the lookup table of variables in the current scope.\n\tvars []keyVal\n\n\terr    error\n\tinBody bool // if false next call must be EncodeMessageType\n}\n\ntype keyVal struct {\n\tkey    string\n\toffset int\n}\n\n// Language reports the language for which the encoded message will be stored\n// in the Catalog.\nfunc (e *Encoder) Language() language.Tag { return e.tag }\n\nfunc (e *Encoder) setError(err error) {\n\tif e.root.err == nil {\n\t\te.root.err = err\n\t}\n}\n\n// EncodeUint encodes x.\nfunc (e *Encoder) EncodeUint(x uint64) {\n\te.checkInBody()\n\tvar buf [maxVarintBytes]byte\n\tn := encodeUint(buf[:], x)\n\te.buf = append(e.buf, buf[:n]...)\n}\n\n// EncodeString encodes s.\nfunc (e *Encoder) EncodeString(s string) {\n\te.checkInBody()\n\te.EncodeUint(uint64(len(s)))\n\te.buf = append(e.buf, s...)\n}\n\n// EncodeMessageType marks the current message to be of type h.\n//\n// It must be the first call of a Message's Compile method.\nfunc (e *Encoder) EncodeMessageType(h Handle) {\n\tif e.inBody {\n\t\tpanic(\"catmsg: EncodeMessageType not the first method called\")\n\t}\n\te.inBody = true\n\te.EncodeUint(uint64(h))\n}\n\n// EncodeMessage serializes the given message inline at the current position.\nfunc (e *Encoder) EncodeMessage(m Message) error {\n\te = &Encoder{root: e.root, parent: e, tag: e.tag}\n\terr := m.Compile(e)\n\tif _, ok := m.(*Var); !ok {\n\t\te.flushTo(e.parent)\n\t}\n\treturn err\n}\n\nfunc (e *Encoder) checkInBody() {\n\tif !e.inBody {\n\t\tpanic(\"catmsg: expected prior call to EncodeMessageType\")\n\t}\n}\n\n// stripPrefix indicates the number of prefix bytes that must be stripped to\n// turn a single-element sequence into a message that is just this single member\n// without its size prefix. If the message can be stripped, b[1:n] contains the\n// size prefix.\nfunc stripPrefix(b []byte) (n int) {\n\tif len(b) > 0 && Handle(b[0]) == msgFirst {\n\t\tx, n, _ := decodeUint(b[1:])\n\t\tif 1+n+int(x) == len(b) {\n\t\t\treturn 1 + n\n\t\t}\n\t}\n\treturn 0\n}\n\nfunc (e *Encoder) flushTo(dst *Encoder) {\n\tdata := e.buf\n\tp := stripPrefix(data)\n\tif p > 0 {\n\t\tdata = data[1:]\n\t} else {\n\t\t// Prefix the size.\n\t\tdst.EncodeUint(uint64(len(data)))\n\t}\n\tdst.buf = append(dst.buf, data...)\n}\n\nfunc (e *Encoder) addVar(key string, m Message) error {\n\tfor _, v := range e.parent.vars {\n\t\tif v.key == key {\n\t\t\terr := fmt.Errorf(\"catmsg: duplicate variable %q\", key)\n\t\t\te.setError(err)\n\t\t\treturn err\n\t\t}\n\t}\n\tscope := e.parent\n\t// If a variable message is Incomplete, and does not evaluate to a message\n\t// during execution, we fall back to the variable name. We encode this by\n\t// appending the variable name if the message reports it's incomplete.\n\n\terr := m.Compile(e)\n\tif err != ErrIncomplete {\n\t\te.setError(err)\n\t}\n\tswitch {\n\tcase len(e.buf) == 1 && Handle(e.buf[0]) == msgFirst: // empty sequence\n\t\te.buf = e.buf[:0]\n\t\te.inBody = false\n\t\tfallthrough\n\tcase len(e.buf) == 0:\n\t\t// Empty message.\n\t\tif err := String(key).Compile(e); err != nil {\n\t\t\te.setError(err)\n\t\t}\n\tcase err == ErrIncomplete:\n\t\tif Handle(e.buf[0]) != msgFirst {\n\t\t\tseq := &Encoder{root: e.root, parent: e}\n\t\t\tseq.EncodeMessageType(msgFirst)\n\t\t\te.flushTo(seq)\n\t\t\te = seq\n\t\t}\n\t\t// e contains a sequence; append the fallback string.\n\t\te.EncodeMessage(String(key))\n\t}\n\n\t// Flush result to variable heap.\n\toffset := len(e.root.buf)\n\te.flushTo(e.root)\n\te.buf = e.buf[:0]\n\n\t// Record variable offset in current scope.\n\tscope.vars = append(scope.vars, keyVal{key: key, offset: offset})\n\treturn err\n}\n\nconst (\n\tsubstituteVar = iota\n\tsubstituteMacro\n\tsubstituteError\n)\n\n// EncodeSubstitution inserts a resolved reference to a variable or macro.\n//\n// This call must be matched with a call to ExecuteSubstitution at decoding\n// time.\nfunc (e *Encoder) EncodeSubstitution(name string, arguments ...int) {\n\tif arity := len(arguments); arity > 0 {\n\t\t// TODO: also resolve macros.\n\t\te.EncodeUint(substituteMacro)\n\t\te.EncodeString(name)\n\t\tfor _, a := range arguments {\n\t\t\te.EncodeUint(uint64(a))\n\t\t}\n\t\treturn\n\t}\n\tfor scope := e; scope != nil; scope = scope.parent {\n\t\tfor _, v := range scope.vars {\n\t\t\tif v.key != name {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\te.EncodeUint(substituteVar) // TODO: support arity > 0\n\t\t\te.EncodeUint(uint64(v.offset))\n\t\t\treturn\n\t\t}\n\t}\n\t// TODO: refer to dictionary-wide scoped variables.\n\te.EncodeUint(substituteError)\n\te.EncodeString(name)\n\te.setError(fmt.Errorf(\"catmsg: unknown var %q\", name))\n}\n\n// A Decoder deserializes and evaluates messages that are encoded by an encoder.\ntype Decoder struct {\n\ttag    language.Tag\n\tdst    Renderer\n\tmacros Dictionary\n\n\terr  error\n\tvars string\n\tdata string\n\n\tmacroArg int // TODO: allow more than one argument\n}\n\n// NewDecoder returns a new Decoder.\n//\n// Decoders are designed to be reused for multiple invocations of Execute.\n// Only one goroutine may call Execute concurrently.\nfunc NewDecoder(tag language.Tag, r Renderer, macros Dictionary) *Decoder {\n\treturn &Decoder{\n\t\ttag:    tag,\n\t\tdst:    r,\n\t\tmacros: macros,\n\t}\n}\n\nfunc (d *Decoder) setError(err error) {\n\tif d.err == nil {\n\t\td.err = err\n\t}\n}\n\n// Language returns the language in which the message is being rendered.\n//\n// The destination language may be a child language of the language used for\n// encoding. For instance, a decoding language of \"pt-PT\" is consistent with an\n// encoding language of \"pt\".\nfunc (d *Decoder) Language() language.Tag { return d.tag }\n\n// Done reports whether there are more bytes to process in this message.\nfunc (d *Decoder) Done() bool { return len(d.data) == 0 }\n\n// Render implements Renderer.\nfunc (d *Decoder) Render(s string) { d.dst.Render(s) }\n\n// Arg implements Renderer.\n//\n// During evaluation of macros, the argument positions may be mapped to\n// arguments that differ from the original call.\nfunc (d *Decoder) Arg(i int) interface{} {\n\tif d.macroArg != 0 {\n\t\tif i != 1 {\n\t\t\tpanic(\"catmsg: only macros with single argument supported\")\n\t\t}\n\t\ti = d.macroArg\n\t}\n\treturn d.dst.Arg(i)\n}\n\n// DecodeUint decodes a number that was encoded with EncodeUint and advances the\n// position.\nfunc (d *Decoder) DecodeUint() uint64 {\n\tx, n, err := decodeUintString(d.data)\n\td.data = d.data[n:]\n\tif err != nil {\n\t\td.setError(err)\n\t}\n\treturn x\n}\n\n// DecodeString decodes a string that was encoded with EncodeString and advances\n// the position.\nfunc (d *Decoder) DecodeString() string {\n\tsize := d.DecodeUint()\n\ts := d.data[:size]\n\td.data = d.data[size:]\n\treturn s\n}\n\n// SkipMessage skips the message at the current location and advances the\n// position.\nfunc (d *Decoder) SkipMessage() {\n\tn := int(d.DecodeUint())\n\td.data = d.data[n:]\n}\n\n// Execute decodes and evaluates msg.\n//\n// Only one goroutine may call execute.\nfunc (d *Decoder) Execute(msg string) error {\n\td.err = nil\n\tif !d.execute(msg) {\n\t\treturn ErrNoMatch\n\t}\n\treturn d.err\n}\n\nfunc (d *Decoder) execute(msg string) bool {\n\tsaved := d.data\n\td.data = msg\n\tok := d.executeMessage()\n\td.data = saved\n\treturn ok\n}\n\n// executeMessageFromData is like execute, but also decodes a leading message\n// size and clips the given string accordingly.\n//\n// It reports the number of bytes consumed and whether a message was selected.\nfunc (d *Decoder) executeMessageFromData(s string) (n int, ok bool) {\n\tsaved := d.data\n\td.data = s\n\tsize := int(d.DecodeUint())\n\tn = len(s) - len(d.data)\n\t// Sanitize the setting. This allows skipping a size argument for\n\t// RawString and method Done.\n\td.data = d.data[:size]\n\tok = d.executeMessage()\n\tn += size - len(d.data)\n\td.data = saved\n\treturn n, ok\n}\n\nvar errUnknownHandler = errors.New(\"catmsg: string contains unsupported handler\")\n\n// executeMessage reads the handle id, initializes the decoder and executes the\n// message. It is assumed that all of d.data[d.p:] is the single message.\nfunc (d *Decoder) executeMessage() bool {\n\tif d.Done() {\n\t\t// We interpret no data as a valid empty message.\n\t\treturn true\n\t}\n\thandle := d.DecodeUint()\n\n\tvar fn Handler\n\tmutex.Lock()\n\tif int(handle) < len(handlers) {\n\t\tfn = handlers[handle]\n\t}\n\tmutex.Unlock()\n\tif fn == nil {\n\t\td.setError(errUnknownHandler)\n\t\td.execute(fmt.Sprintf(\"\\x02$!(UNKNOWNMSGHANDLER=%#x)\", handle))\n\t\treturn true\n\t}\n\treturn fn(d)\n}\n\n// ExecuteMessage decodes and executes the message at the current position.\nfunc (d *Decoder) ExecuteMessage() bool {\n\tn, ok := d.executeMessageFromData(d.data)\n\td.data = d.data[n:]\n\treturn ok\n}\n\n// ExecuteSubstitution executes the message corresponding to the substitution\n// as encoded by EncodeSubstitution.\nfunc (d *Decoder) ExecuteSubstitution() {\n\tswitch x := d.DecodeUint(); x {\n\tcase substituteVar:\n\t\toffset := d.DecodeUint()\n\t\td.executeMessageFromData(d.vars[offset:])\n\tcase substituteMacro:\n\t\tname := d.DecodeString()\n\t\tdata, ok := d.macros.Lookup(name)\n\t\told := d.macroArg\n\t\t// TODO: support macros of arity other than 1.\n\t\td.macroArg = int(d.DecodeUint())\n\t\tswitch {\n\t\tcase !ok:\n\t\t\t// TODO: detect this at creation time.\n\t\t\td.setError(fmt.Errorf(\"catmsg: undefined macro %q\", name))\n\t\t\tfallthrough\n\t\tcase !d.execute(data):\n\t\t\td.dst.Render(name) // fall back to macro name.\n\t\t}\n\t\td.macroArg = old\n\tcase substituteError:\n\t\td.dst.Render(d.DecodeString())\n\tdefault:\n\t\tpanic(\"catmsg: unreachable\")\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/catmsg/varint.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage catmsg\n\n// This file implements varint encoding analogous to the one in encoding/binary.\n// We need a string version of this function, so we add that here and then add\n// the rest for consistency.\n\nimport \"errors\"\n\nvar (\n\terrIllegalVarint  = errors.New(\"catmsg: illegal varint\")\n\terrVarintTooLarge = errors.New(\"catmsg: varint too large for uint64\")\n)\n\nconst maxVarintBytes = 10 // maximum length of a varint\n\n// encodeUint encodes x as a variable-sized integer into buf and returns the\n// number of bytes written. buf must be at least maxVarintBytes long\nfunc encodeUint(buf []byte, x uint64) (n int) {\n\tfor ; x > 127; n++ {\n\t\tbuf[n] = 0x80 | uint8(x&0x7F)\n\t\tx >>= 7\n\t}\n\tbuf[n] = uint8(x)\n\tn++\n\treturn n\n}\n\nfunc decodeUintString(s string) (x uint64, size int, err error) {\n\ti := 0\n\tfor shift := uint(0); shift < 64; shift += 7 {\n\t\tif i >= len(s) {\n\t\t\treturn 0, i, errIllegalVarint\n\t\t}\n\t\tb := uint64(s[i])\n\t\ti++\n\t\tx |= (b & 0x7F) << shift\n\t\tif b&0x80 == 0 {\n\t\t\treturn x, i, nil\n\t\t}\n\t}\n\treturn 0, i, errVarintTooLarge\n}\n\nfunc decodeUint(b []byte) (x uint64, size int, err error) {\n\ti := 0\n\tfor shift := uint(0); shift < 64; shift += 7 {\n\t\tif i >= len(b) {\n\t\t\treturn 0, i, errIllegalVarint\n\t\t}\n\t\tc := uint64(b[i])\n\t\ti++\n\t\tx |= (c & 0x7F) << shift\n\t\tif c&0x80 == 0 {\n\t\t\treturn x, i, nil\n\t\t}\n\t}\n\treturn 0, i, errVarintTooLarge\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/format/format.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package format contains types for defining language-specific formatting of\n// values.\n//\n// This package is internal now, but will eventually be exposed after the API\n// settles.\npackage format // import \"golang.org/x/text/internal/format\"\n\nimport (\n\t\"fmt\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// State represents the printer state passed to custom formatters. It provides\n// access to the fmt.State interface and the sentence and language-related\n// context.\ntype State interface {\n\tfmt.State\n\n\t// Language reports the requested language in which to render a message.\n\tLanguage() language.Tag\n\n\t// TODO: consider this and removing rune from the Format method in the\n\t// Formatter interface.\n\t//\n\t// Verb returns the format variant to render, analogous to the types used\n\t// in fmt. Use 'v' for the default or only variant.\n\t// Verb() rune\n\n\t// TODO: more info:\n\t// - sentence context such as linguistic features passed by the translator.\n}\n\n// Formatter is analogous to fmt.Formatter.\ntype Formatter interface {\n\tFormat(state State, verb rune)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/format/parser.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage format\n\nimport (\n\t\"reflect\"\n\t\"unicode/utf8\"\n)\n\n// A Parser parses a format string. The result from the parse are set in the\n// struct fields.\ntype Parser struct {\n\tVerb rune\n\n\tWidthPresent bool\n\tPrecPresent  bool\n\tMinus        bool\n\tPlus         bool\n\tSharp        bool\n\tSpace        bool\n\tZero         bool\n\n\t// For the formats %+v %#v, we set the plusV/sharpV flags\n\t// and clear the plus/sharp flags since %+v and %#v are in effect\n\t// different, flagless formats set at the top level.\n\tPlusV  bool\n\tSharpV bool\n\n\tHasIndex bool\n\n\tWidth int\n\tPrec  int // precision\n\n\t// retain arguments across calls.\n\tArgs []interface{}\n\t// retain current argument number across calls\n\tArgNum int\n\n\t// reordered records whether the format string used argument reordering.\n\tReordered bool\n\t// goodArgNum records whether the most recent reordering directive was valid.\n\tgoodArgNum bool\n\n\t// position info\n\tformat   string\n\tstartPos int\n\tendPos   int\n\tStatus   Status\n}\n\n// Reset initializes a parser to scan format strings for the given args.\nfunc (p *Parser) Reset(args []interface{}) {\n\tp.Args = args\n\tp.ArgNum = 0\n\tp.startPos = 0\n\tp.Reordered = false\n}\n\n// Text returns the part of the format string that was parsed by the last call\n// to Scan. It returns the original substitution clause if the current scan\n// parsed a substitution.\nfunc (p *Parser) Text() string { return p.format[p.startPos:p.endPos] }\n\n// SetFormat sets a new format string to parse. It does not reset the argument\n// count.\nfunc (p *Parser) SetFormat(format string) {\n\tp.format = format\n\tp.startPos = 0\n\tp.endPos = 0\n}\n\n// Status indicates the result type of a call to Scan.\ntype Status int\n\nconst (\n\tStatusText Status = iota\n\tStatusSubstitution\n\tStatusBadWidthSubstitution\n\tStatusBadPrecSubstitution\n\tStatusNoVerb\n\tStatusBadArgNum\n\tStatusMissingArg\n)\n\n// ClearFlags reset the parser to default behavior.\nfunc (p *Parser) ClearFlags() {\n\tp.WidthPresent = false\n\tp.PrecPresent = false\n\tp.Minus = false\n\tp.Plus = false\n\tp.Sharp = false\n\tp.Space = false\n\tp.Zero = false\n\n\tp.PlusV = false\n\tp.SharpV = false\n\n\tp.HasIndex = false\n}\n\n// Scan scans the next part of the format string and sets the status to\n// indicate whether it scanned a string literal, substitution or error.\nfunc (p *Parser) Scan() bool {\n\tp.Status = StatusText\n\tformat := p.format\n\tend := len(format)\n\tif p.endPos >= end {\n\t\treturn false\n\t}\n\tafterIndex := false // previous item in format was an index like [3].\n\n\tp.startPos = p.endPos\n\tp.goodArgNum = true\n\ti := p.startPos\n\tfor i < end && format[i] != '%' {\n\t\ti++\n\t}\n\tif i > p.startPos {\n\t\tp.endPos = i\n\t\treturn true\n\t}\n\t// Process one verb\n\ti++\n\n\tp.Status = StatusSubstitution\n\n\t// Do we have flags?\n\tp.ClearFlags()\n\nsimpleFormat:\n\tfor ; i < end; i++ {\n\t\tc := p.format[i]\n\t\tswitch c {\n\t\tcase '#':\n\t\t\tp.Sharp = true\n\t\tcase '0':\n\t\t\tp.Zero = !p.Minus // Only allow zero padding to the left.\n\t\tcase '+':\n\t\t\tp.Plus = true\n\t\tcase '-':\n\t\t\tp.Minus = true\n\t\t\tp.Zero = false // Do not pad with zeros to the right.\n\t\tcase ' ':\n\t\t\tp.Space = true\n\t\tdefault:\n\t\t\t// Fast path for common case of ascii lower case simple verbs\n\t\t\t// without precision or width or argument indices.\n\t\t\tif 'a' <= c && c <= 'z' && p.ArgNum < len(p.Args) {\n\t\t\t\tif c == 'v' {\n\t\t\t\t\t// Go syntax\n\t\t\t\t\tp.SharpV = p.Sharp\n\t\t\t\t\tp.Sharp = false\n\t\t\t\t\t// Struct-field syntax\n\t\t\t\t\tp.PlusV = p.Plus\n\t\t\t\t\tp.Plus = false\n\t\t\t\t}\n\t\t\t\tp.Verb = rune(c)\n\t\t\t\tp.ArgNum++\n\t\t\t\tp.endPos = i + 1\n\t\t\t\treturn true\n\t\t\t}\n\t\t\t// Format is more complex than simple flags and a verb or is malformed.\n\t\t\tbreak simpleFormat\n\t\t}\n\t}\n\n\t// Do we have an explicit argument index?\n\ti, afterIndex = p.updateArgNumber(format, i)\n\n\t// Do we have width?\n\tif i < end && format[i] == '*' {\n\t\ti++\n\t\tp.Width, p.WidthPresent = p.intFromArg()\n\n\t\tif !p.WidthPresent {\n\t\t\tp.Status = StatusBadWidthSubstitution\n\t\t}\n\n\t\t// We have a negative width, so take its value and ensure\n\t\t// that the minus flag is set\n\t\tif p.Width < 0 {\n\t\t\tp.Width = -p.Width\n\t\t\tp.Minus = true\n\t\t\tp.Zero = false // Do not pad with zeros to the right.\n\t\t}\n\t\tafterIndex = false\n\t} else {\n\t\tp.Width, p.WidthPresent, i = parsenum(format, i, end)\n\t\tif afterIndex && p.WidthPresent { // \"%[3]2d\"\n\t\t\tp.goodArgNum = false\n\t\t}\n\t}\n\n\t// Do we have precision?\n\tif i+1 < end && format[i] == '.' {\n\t\ti++\n\t\tif afterIndex { // \"%[3].2d\"\n\t\t\tp.goodArgNum = false\n\t\t}\n\t\ti, afterIndex = p.updateArgNumber(format, i)\n\t\tif i < end && format[i] == '*' {\n\t\t\ti++\n\t\t\tp.Prec, p.PrecPresent = p.intFromArg()\n\t\t\t// Negative precision arguments don't make sense\n\t\t\tif p.Prec < 0 {\n\t\t\t\tp.Prec = 0\n\t\t\t\tp.PrecPresent = false\n\t\t\t}\n\t\t\tif !p.PrecPresent {\n\t\t\t\tp.Status = StatusBadPrecSubstitution\n\t\t\t}\n\t\t\tafterIndex = false\n\t\t} else {\n\t\t\tp.Prec, p.PrecPresent, i = parsenum(format, i, end)\n\t\t\tif !p.PrecPresent {\n\t\t\t\tp.Prec = 0\n\t\t\t\tp.PrecPresent = true\n\t\t\t}\n\t\t}\n\t}\n\n\tif !afterIndex {\n\t\ti, afterIndex = p.updateArgNumber(format, i)\n\t}\n\tp.HasIndex = afterIndex\n\n\tif i >= end {\n\t\tp.endPos = i\n\t\tp.Status = StatusNoVerb\n\t\treturn true\n\t}\n\n\tverb, w := utf8.DecodeRuneInString(format[i:])\n\tp.endPos = i + w\n\tp.Verb = verb\n\n\tswitch {\n\tcase verb == '%': // Percent does not absorb operands and ignores f.wid and f.prec.\n\t\tp.startPos = p.endPos - 1\n\t\tp.Status = StatusText\n\tcase !p.goodArgNum:\n\t\tp.Status = StatusBadArgNum\n\tcase p.ArgNum >= len(p.Args): // No argument left over to print for the current verb.\n\t\tp.Status = StatusMissingArg\n\t\tp.ArgNum++\n\tcase verb == 'v':\n\t\t// Go syntax\n\t\tp.SharpV = p.Sharp\n\t\tp.Sharp = false\n\t\t// Struct-field syntax\n\t\tp.PlusV = p.Plus\n\t\tp.Plus = false\n\t\tfallthrough\n\tdefault:\n\t\tp.ArgNum++\n\t}\n\treturn true\n}\n\n// intFromArg gets the ArgNumth element of Args. On return, isInt reports\n// whether the argument has integer type.\nfunc (p *Parser) intFromArg() (num int, isInt bool) {\n\tif p.ArgNum < len(p.Args) {\n\t\targ := p.Args[p.ArgNum]\n\t\tnum, isInt = arg.(int) // Almost always OK.\n\t\tif !isInt {\n\t\t\t// Work harder.\n\t\t\tswitch v := reflect.ValueOf(arg); v.Kind() {\n\t\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\t\tn := v.Int()\n\t\t\t\tif int64(int(n)) == n {\n\t\t\t\t\tnum = int(n)\n\t\t\t\t\tisInt = true\n\t\t\t\t}\n\t\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\t\t\tn := v.Uint()\n\t\t\t\tif int64(n) >= 0 && uint64(int(n)) == n {\n\t\t\t\t\tnum = int(n)\n\t\t\t\t\tisInt = true\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\t// Already 0, false.\n\t\t\t}\n\t\t}\n\t\tp.ArgNum++\n\t\tif tooLarge(num) {\n\t\t\tnum = 0\n\t\t\tisInt = false\n\t\t}\n\t}\n\treturn\n}\n\n// parseArgNumber returns the value of the bracketed number, minus 1\n// (explicit argument numbers are one-indexed but we want zero-indexed).\n// The opening bracket is known to be present at format[0].\n// The returned values are the index, the number of bytes to consume\n// up to the closing paren, if present, and whether the number parsed\n// ok. The bytes to consume will be 1 if no closing paren is present.\nfunc parseArgNumber(format string) (index int, wid int, ok bool) {\n\t// There must be at least 3 bytes: [n].\n\tif len(format) < 3 {\n\t\treturn 0, 1, false\n\t}\n\n\t// Find closing bracket.\n\tfor i := 1; i < len(format); i++ {\n\t\tif format[i] == ']' {\n\t\t\twidth, ok, newi := parsenum(format, 1, i)\n\t\t\tif !ok || newi != i {\n\t\t\t\treturn 0, i + 1, false\n\t\t\t}\n\t\t\treturn width - 1, i + 1, true // arg numbers are one-indexed and skip paren.\n\t\t}\n\t}\n\treturn 0, 1, false\n}\n\n// updateArgNumber returns the next argument to evaluate, which is either the value of the passed-in\n// argNum or the value of the bracketed integer that begins format[i:]. It also returns\n// the new value of i, that is, the index of the next byte of the format to process.\nfunc (p *Parser) updateArgNumber(format string, i int) (newi int, found bool) {\n\tif len(format) <= i || format[i] != '[' {\n\t\treturn i, false\n\t}\n\tp.Reordered = true\n\tindex, wid, ok := parseArgNumber(format[i:])\n\tif ok && 0 <= index && index < len(p.Args) {\n\t\tp.ArgNum = index\n\t\treturn i + wid, true\n\t}\n\tp.goodArgNum = false\n\treturn i + wid, ok\n}\n\n// tooLarge reports whether the magnitude of the integer is\n// too large to be used as a formatting width or precision.\nfunc tooLarge(x int) bool {\n\tconst max int = 1e6\n\treturn x > max || x < -max\n}\n\n// parsenum converts ASCII to integer.  num is 0 (and isnum is false) if no number present.\nfunc parsenum(s string, start, end int) (num int, isnum bool, newi int) {\n\tif start >= end {\n\t\treturn 0, false, end\n\t}\n\tfor newi = start; newi < end && '0' <= s[newi] && s[newi] <= '9'; newi++ {\n\t\tif tooLarge(num) {\n\t\t\treturn 0, false, end // Overflow; crazy long number most likely.\n\t\t}\n\t\tnum = num*10 + int(s[newi]-'0')\n\t\tisnum = true\n\t}\n\treturn\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/internal.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package internal contains non-exported functionality that are used by\n// packages in the text repository.\npackage internal // import \"golang.org/x/text/internal\"\n\nimport (\n\t\"sort\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// SortTags sorts tags in place.\nfunc SortTags(tags []language.Tag) {\n\tsort.Sort(sorter(tags))\n}\n\ntype sorter []language.Tag\n\nfunc (s sorter) Len() int {\n\treturn len(s)\n}\n\nfunc (s sorter) Swap(i, j int) {\n\ts[i], s[j] = s[j], s[i]\n}\n\nfunc (s sorter) Less(i, j int) bool {\n\treturn s[i].String() < s[j].String()\n}\n\n// UniqueTags sorts and filters duplicate tags in place and returns a slice with\n// only unique tags.\nfunc UniqueTags(tags []language.Tag) []language.Tag {\n\tif len(tags) <= 1 {\n\t\treturn tags\n\t}\n\tSortTags(tags)\n\tk := 0\n\tfor i := 1; i < len(tags); i++ {\n\t\tif tags[k].String() < tags[i].String() {\n\t\t\tk++\n\t\t\ttags[k] = tags[i]\n\t\t}\n\t}\n\treturn tags[:k+1]\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/common.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage language\n\n// This file contains code common to the maketables.go and the package code.\n\n// AliasType is the type of an alias in AliasMap.\ntype AliasType int8\n\nconst (\n\tDeprecated AliasType = iota\n\tMacro\n\tLegacy\n\n\tAliasTypeUnknown AliasType = -1\n)\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact/compact.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package compact defines a compact representation of language tags.\n//\n// Common language tags (at least all for which locale information is defined\n// in CLDR) are assigned a unique index. Each Tag is associated with such an\n// ID for selecting language-related resources (such as translations) as well\n// as one for selecting regional defaults (currency, number formatting, etc.)\n//\n// It may want to export this functionality at some point, but at this point\n// this is only available for use within x/text.\npackage compact // import \"golang.org/x/text/internal/language/compact\"\n\nimport (\n\t\"sort\"\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/language\"\n)\n\n// ID is an integer identifying a single tag.\ntype ID uint16\n\nfunc getCoreIndex(t language.Tag) (id ID, ok bool) {\n\tcci, ok := language.GetCompactCore(t)\n\tif !ok {\n\t\treturn 0, false\n\t}\n\ti := sort.Search(len(coreTags), func(i int) bool {\n\t\treturn cci <= coreTags[i]\n\t})\n\tif i == len(coreTags) || coreTags[i] != cci {\n\t\treturn 0, false\n\t}\n\treturn ID(i), true\n}\n\n// Parent returns the ID of the parent or the root ID if id is already the root.\nfunc (id ID) Parent() ID {\n\treturn parents[id]\n}\n\n// Tag converts id to an internal language Tag.\nfunc (id ID) Tag() language.Tag {\n\tif int(id) >= len(coreTags) {\n\t\treturn specialTags[int(id)-len(coreTags)]\n\t}\n\treturn coreTags[id].Tag()\n}\n\nvar specialTags []language.Tag\n\nfunc init() {\n\ttags := strings.Split(specialTagsStr, \" \")\n\tspecialTags = make([]language.Tag, len(tags))\n\tfor i, t := range tags {\n\t\tspecialTags[i] = language.MustParse(t)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact/language.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go gen_index.go -output tables.go\n//go:generate go run gen_parents.go\n\npackage compact\n\n// TODO: Remove above NOTE after:\n// - verifying that tables are dropped correctly (most notably matcher tables).\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/language\"\n)\n\n// Tag represents a BCP 47 language tag. It is used to specify an instance of a\n// specific language or locale. All language tag values are guaranteed to be\n// well-formed.\ntype Tag struct {\n\t// NOTE: exported tags will become part of the public API.\n\tlanguage ID\n\tlocale   ID\n\tfull     fullTag // always a language.Tag for now.\n}\n\nconst _und = 0\n\ntype fullTag interface {\n\tIsRoot() bool\n\tParent() language.Tag\n}\n\n// Make a compact Tag from a fully specified internal language Tag.\nfunc Make(t language.Tag) (tag Tag) {\n\tif region := t.TypeForKey(\"rg\"); len(region) == 6 && region[2:] == \"zzzz\" {\n\t\tif r, err := language.ParseRegion(region[:2]); err == nil {\n\t\t\ttFull := t\n\t\t\tt, _ = t.SetTypeForKey(\"rg\", \"\")\n\t\t\t// TODO: should we not consider \"va\" for the language tag?\n\t\t\tvar exact1, exact2 bool\n\t\t\ttag.language, exact1 = FromTag(t)\n\t\t\tt.RegionID = r\n\t\t\ttag.locale, exact2 = FromTag(t)\n\t\t\tif !exact1 || !exact2 {\n\t\t\t\ttag.full = tFull\n\t\t\t}\n\t\t\treturn tag\n\t\t}\n\t}\n\tlang, ok := FromTag(t)\n\ttag.language = lang\n\ttag.locale = lang\n\tif !ok {\n\t\ttag.full = t\n\t}\n\treturn tag\n}\n\n// Tag returns an internal language Tag version of this tag.\nfunc (t Tag) Tag() language.Tag {\n\tif t.full != nil {\n\t\treturn t.full.(language.Tag)\n\t}\n\ttag := t.language.Tag()\n\tif t.language != t.locale {\n\t\tloc := t.locale.Tag()\n\t\ttag, _ = tag.SetTypeForKey(\"rg\", strings.ToLower(loc.RegionID.String())+\"zzzz\")\n\t}\n\treturn tag\n}\n\n// IsCompact reports whether this tag is fully defined in terms of ID.\nfunc (t *Tag) IsCompact() bool {\n\treturn t.full == nil\n}\n\n// MayHaveVariants reports whether a tag may have variants. If it returns false\n// it is guaranteed the tag does not have variants.\nfunc (t Tag) MayHaveVariants() bool {\n\treturn t.full != nil || int(t.language) >= len(coreTags)\n}\n\n// MayHaveExtensions reports whether a tag may have extensions. If it returns\n// false it is guaranteed the tag does not have them.\nfunc (t Tag) MayHaveExtensions() bool {\n\treturn t.full != nil ||\n\t\tint(t.language) >= len(coreTags) ||\n\t\tt.language != t.locale\n}\n\n// IsRoot returns true if t is equal to language \"und\".\nfunc (t Tag) IsRoot() bool {\n\tif t.full != nil {\n\t\treturn t.full.IsRoot()\n\t}\n\treturn t.language == _und\n}\n\n// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a\n// specific language are substituted with fields from the parent language.\n// The parent for a language may change for newer versions of CLDR.\nfunc (t Tag) Parent() Tag {\n\tif t.full != nil {\n\t\treturn Make(t.full.Parent())\n\t}\n\tif t.language != t.locale {\n\t\t// Simulate stripping -u-rg-xxxxxx\n\t\treturn Tag{language: t.language, locale: t.language}\n\t}\n\t// TODO: use parent lookup table once cycle from internal package is\n\t// removed. Probably by internalizing the table and declaring this fast\n\t// enough.\n\t// lang := compactID(internal.Parent(uint16(t.language)))\n\tlang, _ := FromTag(t.language.Tag().Parent())\n\treturn Tag{language: lang, locale: lang}\n}\n\n// nextToken returns token t and the rest of the string.\nfunc nextToken(s string) (t, tail string) {\n\tp := strings.Index(s[1:], \"-\")\n\tif p == -1 {\n\t\treturn s[1:], \"\"\n\t}\n\tp++\n\treturn s[1:p], s[p:]\n}\n\n// LanguageID returns an index, where 0 <= index < NumCompactTags, for tags\n// for which data exists in the text repository.The index will change over time\n// and should not be stored in persistent storage. If t does not match a compact\n// index, exact will be false and the compact index will be returned for the\n// first match after repeatedly taking the Parent of t.\nfunc LanguageID(t Tag) (id ID, exact bool) {\n\treturn t.language, t.full == nil\n}\n\n// RegionalID returns the ID for the regional variant of this tag. This index is\n// used to indicate region-specific overrides, such as default currency, default\n// calendar and week data, default time cycle, and default measurement system\n// and unit preferences.\n//\n// For instance, the tag en-GB-u-rg-uszzzz specifies British English with US\n// settings for currency, number formatting, etc. The CompactIndex for this tag\n// will be that for en-GB, while the RegionalID will be the one corresponding to\n// en-US.\nfunc RegionalID(t Tag) (id ID, exact bool) {\n\treturn t.locale, t.full == nil\n}\n\n// LanguageTag returns t stripped of regional variant indicators.\n//\n// At the moment this means it is stripped of a regional and variant subtag \"rg\"\n// and \"va\" in the \"u\" extension.\nfunc (t Tag) LanguageTag() Tag {\n\tif t.full == nil {\n\t\treturn Tag{language: t.language, locale: t.language}\n\t}\n\ttt := t.Tag()\n\ttt.SetTypeForKey(\"rg\", \"\")\n\ttt.SetTypeForKey(\"va\", \"\")\n\treturn Make(tt)\n}\n\n// RegionalTag returns the regional variant of the tag.\n//\n// At the moment this means that the region is set from the regional subtag\n// \"rg\" in the \"u\" extension.\nfunc (t Tag) RegionalTag() Tag {\n\trt := Tag{language: t.locale, locale: t.locale}\n\tif t.full == nil {\n\t\treturn rt\n\t}\n\tb := language.Builder{}\n\ttag := t.Tag()\n\t// tag, _ = tag.SetTypeForKey(\"rg\", \"\")\n\tb.SetTag(t.locale.Tag())\n\tif v := tag.Variants(); v != \"\" {\n\t\tfor _, v := range strings.Split(v, \"-\") {\n\t\t\tb.AddVariant(v)\n\t\t}\n\t}\n\tfor _, e := range tag.Extensions() {\n\t\tb.AddExt(e)\n\t}\n\treturn t\n}\n\n// FromTag reports closest matching ID for an internal language Tag.\nfunc FromTag(t language.Tag) (id ID, exact bool) {\n\t// TODO: perhaps give more frequent tags a lower index.\n\t// TODO: we could make the indexes stable. This will excluded some\n\t//       possibilities for optimization, so don't do this quite yet.\n\texact = true\n\n\tb, s, r := t.Raw()\n\tif t.HasString() {\n\t\tif t.IsPrivateUse() {\n\t\t\t// We have no entries for user-defined tags.\n\t\t\treturn 0, false\n\t\t}\n\t\thasExtra := false\n\t\tif t.HasVariants() {\n\t\t\tif t.HasExtensions() {\n\t\t\t\tbuild := language.Builder{}\n\t\t\t\tbuild.SetTag(language.Tag{LangID: b, ScriptID: s, RegionID: r})\n\t\t\t\tbuild.AddVariant(t.Variants())\n\t\t\t\texact = false\n\t\t\t\tt = build.Make()\n\t\t\t}\n\t\t\thasExtra = true\n\t\t} else if _, ok := t.Extension('u'); ok {\n\t\t\t// TODO: va may mean something else. Consider not considering it.\n\t\t\t// Strip all but the 'va' entry.\n\t\t\told := t\n\t\t\tvariant := t.TypeForKey(\"va\")\n\t\t\tt = language.Tag{LangID: b, ScriptID: s, RegionID: r}\n\t\t\tif variant != \"\" {\n\t\t\t\tt, _ = t.SetTypeForKey(\"va\", variant)\n\t\t\t\thasExtra = true\n\t\t\t}\n\t\t\texact = old == t\n\t\t} else {\n\t\t\texact = false\n\t\t}\n\t\tif hasExtra {\n\t\t\t// We have some variants.\n\t\t\tfor i, s := range specialTags {\n\t\t\t\tif s == t {\n\t\t\t\t\treturn ID(i + len(coreTags)), exact\n\t\t\t\t}\n\t\t\t}\n\t\t\texact = false\n\t\t}\n\t}\n\tif x, ok := getCoreIndex(t); ok {\n\t\treturn x, exact\n\t}\n\texact = false\n\tif r != 0 && s == 0 {\n\t\t// Deal with cases where an extra script is inserted for the region.\n\t\tt, _ := t.Maximize()\n\t\tif x, ok := getCoreIndex(t); ok {\n\t\t\treturn x, exact\n\t\t}\n\t}\n\tfor t = t.Parent(); t != root; t = t.Parent() {\n\t\t// No variants specified: just compare core components.\n\t\t// The key has the form lllssrrr, where l, s, and r are nibbles for\n\t\t// respectively the langID, scriptID, and regionID.\n\t\tif x, ok := getCoreIndex(t); ok {\n\t\t\treturn x, exact\n\t\t}\n\t}\n\treturn 0, exact\n}\n\nvar root = language.Tag{}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact/parents.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage compact\n\n// parents maps a compact index of a tag to the compact index of the parent of\n// this tag.\nvar parents = []ID{ // 775 elements\n\t// Entry 0 - 3F\n\t0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0004, 0x0000, 0x0006,\n\t0x0000, 0x0008, 0x0000, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a,\n\t0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a,\n\t0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a,\n\t0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x0000,\n\t0x0000, 0x0028, 0x0000, 0x002a, 0x0000, 0x002c, 0x0000, 0x0000,\n\t0x002f, 0x002e, 0x002e, 0x0000, 0x0033, 0x0000, 0x0035, 0x0000,\n\t0x0037, 0x0000, 0x0039, 0x0000, 0x003b, 0x0000, 0x0000, 0x003e,\n\t// Entry 40 - 7F\n\t0x0000, 0x0040, 0x0040, 0x0000, 0x0043, 0x0043, 0x0000, 0x0046,\n\t0x0000, 0x0048, 0x0000, 0x0000, 0x004b, 0x004a, 0x004a, 0x0000,\n\t0x004f, 0x004f, 0x004f, 0x004f, 0x0000, 0x0054, 0x0054, 0x0000,\n\t0x0057, 0x0000, 0x0059, 0x0000, 0x005b, 0x0000, 0x005d, 0x005d,\n\t0x0000, 0x0060, 0x0000, 0x0062, 0x0000, 0x0064, 0x0000, 0x0066,\n\t0x0066, 0x0000, 0x0069, 0x0000, 0x006b, 0x006b, 0x006b, 0x006b,\n\t0x006b, 0x006b, 0x006b, 0x0000, 0x0073, 0x0000, 0x0075, 0x0000,\n\t0x0077, 0x0000, 0x0000, 0x007a, 0x0000, 0x007c, 0x0000, 0x007e,\n\t// Entry 80 - BF\n\t0x0000, 0x0080, 0x0080, 0x0000, 0x0083, 0x0083, 0x0000, 0x0086,\n\t0x0087, 0x0087, 0x0087, 0x0086, 0x0088, 0x0087, 0x0087, 0x0087,\n\t0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0088,\n\t0x0087, 0x0087, 0x0087, 0x0087, 0x0088, 0x0087, 0x0088, 0x0087,\n\t0x0087, 0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0087, 0x0087, 0x0087, 0x0086, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0086, 0x0087, 0x0086,\n\t// Entry C0 - FF\n\t0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0088, 0x0087,\n\t0x0087, 0x0088, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087,\n\t0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0086, 0x0086, 0x0087,\n\t0x0087, 0x0086, 0x0087, 0x0087, 0x0087, 0x0087, 0x0087, 0x0000,\n\t0x00ef, 0x0000, 0x00f1, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2,\n\t0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f1, 0x00f2, 0x00f1, 0x00f1,\n\t// Entry 100 - 13F\n\t0x00f2, 0x00f2, 0x00f1, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f1,\n\t0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x00f2, 0x0000, 0x010e,\n\t0x0000, 0x0110, 0x0000, 0x0112, 0x0000, 0x0114, 0x0114, 0x0000,\n\t0x0117, 0x0117, 0x0117, 0x0117, 0x0000, 0x011c, 0x0000, 0x011e,\n\t0x0000, 0x0120, 0x0120, 0x0000, 0x0123, 0x0123, 0x0123, 0x0123,\n\t0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123,\n\t0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123,\n\t0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123,\n\t// Entry 140 - 17F\n\t0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123,\n\t0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123, 0x0123,\n\t0x0123, 0x0123, 0x0000, 0x0152, 0x0000, 0x0154, 0x0000, 0x0156,\n\t0x0000, 0x0158, 0x0000, 0x015a, 0x0000, 0x015c, 0x015c, 0x015c,\n\t0x0000, 0x0160, 0x0000, 0x0000, 0x0163, 0x0000, 0x0165, 0x0000,\n\t0x0167, 0x0167, 0x0167, 0x0000, 0x016b, 0x0000, 0x016d, 0x0000,\n\t0x016f, 0x0000, 0x0171, 0x0171, 0x0000, 0x0174, 0x0000, 0x0176,\n\t0x0000, 0x0178, 0x0000, 0x017a, 0x0000, 0x017c, 0x0000, 0x017e,\n\t// Entry 180 - 1BF\n\t0x0000, 0x0000, 0x0000, 0x0182, 0x0000, 0x0184, 0x0184, 0x0184,\n\t0x0184, 0x0000, 0x0000, 0x0000, 0x018b, 0x0000, 0x0000, 0x018e,\n\t0x0000, 0x0000, 0x0191, 0x0000, 0x0000, 0x0000, 0x0195, 0x0000,\n\t0x0197, 0x0000, 0x0000, 0x019a, 0x0000, 0x0000, 0x019d, 0x0000,\n\t0x019f, 0x0000, 0x01a1, 0x0000, 0x01a3, 0x0000, 0x01a5, 0x0000,\n\t0x01a7, 0x0000, 0x01a9, 0x0000, 0x01ab, 0x0000, 0x01ad, 0x0000,\n\t0x01af, 0x0000, 0x01b1, 0x01b1, 0x0000, 0x01b4, 0x0000, 0x01b6,\n\t0x0000, 0x01b8, 0x0000, 0x01ba, 0x0000, 0x01bc, 0x0000, 0x0000,\n\t// Entry 1C0 - 1FF\n\t0x01bf, 0x0000, 0x01c1, 0x0000, 0x01c3, 0x0000, 0x01c5, 0x0000,\n\t0x01c7, 0x0000, 0x01c9, 0x0000, 0x01cb, 0x01cb, 0x01cb, 0x01cb,\n\t0x0000, 0x01d0, 0x0000, 0x01d2, 0x01d2, 0x0000, 0x01d5, 0x0000,\n\t0x01d7, 0x0000, 0x01d9, 0x0000, 0x01db, 0x0000, 0x01dd, 0x0000,\n\t0x01df, 0x01df, 0x0000, 0x01e2, 0x0000, 0x01e4, 0x0000, 0x01e6,\n\t0x0000, 0x01e8, 0x0000, 0x01ea, 0x0000, 0x01ec, 0x0000, 0x01ee,\n\t0x0000, 0x01f0, 0x0000, 0x0000, 0x01f3, 0x0000, 0x01f5, 0x01f5,\n\t0x01f5, 0x0000, 0x01f9, 0x0000, 0x01fb, 0x0000, 0x01fd, 0x0000,\n\t// Entry 200 - 23F\n\t0x01ff, 0x0000, 0x0000, 0x0202, 0x0000, 0x0204, 0x0204, 0x0000,\n\t0x0207, 0x0000, 0x0209, 0x0209, 0x0000, 0x020c, 0x020c, 0x0000,\n\t0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x020f, 0x0000,\n\t0x0217, 0x0000, 0x0219, 0x0000, 0x021b, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0221, 0x0000, 0x0000, 0x0224, 0x0000, 0x0226,\n\t0x0226, 0x0000, 0x0229, 0x0000, 0x022b, 0x022b, 0x0000, 0x0000,\n\t0x022f, 0x022e, 0x022e, 0x0000, 0x0000, 0x0234, 0x0000, 0x0236,\n\t0x0000, 0x0238, 0x0000, 0x0244, 0x023a, 0x0244, 0x0244, 0x0244,\n\t// Entry 240 - 27F\n\t0x0244, 0x0244, 0x0244, 0x0244, 0x023a, 0x0244, 0x0244, 0x0000,\n\t0x0247, 0x0247, 0x0247, 0x0000, 0x024b, 0x0000, 0x024d, 0x0000,\n\t0x024f, 0x024f, 0x0000, 0x0252, 0x0000, 0x0254, 0x0254, 0x0254,\n\t0x0254, 0x0254, 0x0254, 0x0000, 0x025b, 0x0000, 0x025d, 0x0000,\n\t0x025f, 0x0000, 0x0261, 0x0000, 0x0263, 0x0000, 0x0265, 0x0000,\n\t0x0000, 0x0268, 0x0268, 0x0268, 0x0000, 0x026c, 0x0000, 0x026e,\n\t0x0000, 0x0270, 0x0000, 0x0000, 0x0000, 0x0274, 0x0273, 0x0273,\n\t0x0000, 0x0278, 0x0000, 0x027a, 0x0000, 0x027c, 0x0000, 0x0000,\n\t// Entry 280 - 2BF\n\t0x0000, 0x0000, 0x0281, 0x0000, 0x0000, 0x0284, 0x0000, 0x0286,\n\t0x0286, 0x0286, 0x0286, 0x0000, 0x028b, 0x028b, 0x028b, 0x0000,\n\t0x028f, 0x028f, 0x028f, 0x028f, 0x028f, 0x0000, 0x0295, 0x0295,\n\t0x0295, 0x0295, 0x0000, 0x0000, 0x0000, 0x0000, 0x029d, 0x029d,\n\t0x029d, 0x0000, 0x02a1, 0x02a1, 0x02a1, 0x02a1, 0x0000, 0x0000,\n\t0x02a7, 0x02a7, 0x02a7, 0x02a7, 0x0000, 0x02ac, 0x0000, 0x02ae,\n\t0x02ae, 0x0000, 0x02b1, 0x0000, 0x02b3, 0x0000, 0x02b5, 0x02b5,\n\t0x0000, 0x0000, 0x02b9, 0x0000, 0x0000, 0x0000, 0x02bd, 0x0000,\n\t// Entry 2C0 - 2FF\n\t0x02bf, 0x02bf, 0x0000, 0x0000, 0x02c3, 0x0000, 0x02c5, 0x0000,\n\t0x02c7, 0x0000, 0x02c9, 0x0000, 0x02cb, 0x0000, 0x02cd, 0x02cd,\n\t0x0000, 0x0000, 0x02d1, 0x0000, 0x02d3, 0x02d0, 0x02d0, 0x0000,\n\t0x0000, 0x02d8, 0x02d7, 0x02d7, 0x0000, 0x0000, 0x02dd, 0x0000,\n\t0x02df, 0x0000, 0x02e1, 0x0000, 0x0000, 0x02e4, 0x0000, 0x02e6,\n\t0x0000, 0x0000, 0x02e9, 0x0000, 0x02eb, 0x0000, 0x02ed, 0x0000,\n\t0x02ef, 0x02ef, 0x0000, 0x0000, 0x02f3, 0x02f2, 0x02f2, 0x0000,\n\t0x02f7, 0x0000, 0x02f9, 0x02f9, 0x02f9, 0x02f9, 0x02f9, 0x0000,\n\t// Entry 300 - 33F\n\t0x02ff, 0x0300, 0x02ff, 0x0000, 0x0303, 0x0051, 0x00e6,\n} // Size: 1574 bytes\n\n// Total table size 1574 bytes (1KiB); checksum: 895AAF0B\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact/tables.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage compact\n\nimport \"golang.org/x/text/internal/language\"\n\n// CLDRVersion is the CLDR version from which the tables in this package are derived.\nconst CLDRVersion = \"32\"\n\n// NumCompactTags is the number of common tags. The maximum tag is\n// NumCompactTags-1.\nconst NumCompactTags = 775\nconst (\n\tundIndex          ID = 0\n\tafIndex           ID = 1\n\tafNAIndex         ID = 2\n\tafZAIndex         ID = 3\n\tagqIndex          ID = 4\n\tagqCMIndex        ID = 5\n\takIndex           ID = 6\n\takGHIndex         ID = 7\n\tamIndex           ID = 8\n\tamETIndex         ID = 9\n\tarIndex           ID = 10\n\tar001Index        ID = 11\n\tarAEIndex         ID = 12\n\tarBHIndex         ID = 13\n\tarDJIndex         ID = 14\n\tarDZIndex         ID = 15\n\tarEGIndex         ID = 16\n\tarEHIndex         ID = 17\n\tarERIndex         ID = 18\n\tarILIndex         ID = 19\n\tarIQIndex         ID = 20\n\tarJOIndex         ID = 21\n\tarKMIndex         ID = 22\n\tarKWIndex         ID = 23\n\tarLBIndex         ID = 24\n\tarLYIndex         ID = 25\n\tarMAIndex         ID = 26\n\tarMRIndex         ID = 27\n\tarOMIndex         ID = 28\n\tarPSIndex         ID = 29\n\tarQAIndex         ID = 30\n\tarSAIndex         ID = 31\n\tarSDIndex         ID = 32\n\tarSOIndex         ID = 33\n\tarSSIndex         ID = 34\n\tarSYIndex         ID = 35\n\tarTDIndex         ID = 36\n\tarTNIndex         ID = 37\n\tarYEIndex         ID = 38\n\tarsIndex          ID = 39\n\tasIndex           ID = 40\n\tasINIndex         ID = 41\n\tasaIndex          ID = 42\n\tasaTZIndex        ID = 43\n\tastIndex          ID = 44\n\tastESIndex        ID = 45\n\tazIndex           ID = 46\n\tazCyrlIndex       ID = 47\n\tazCyrlAZIndex     ID = 48\n\tazLatnIndex       ID = 49\n\tazLatnAZIndex     ID = 50\n\tbasIndex          ID = 51\n\tbasCMIndex        ID = 52\n\tbeIndex           ID = 53\n\tbeBYIndex         ID = 54\n\tbemIndex          ID = 55\n\tbemZMIndex        ID = 56\n\tbezIndex          ID = 57\n\tbezTZIndex        ID = 58\n\tbgIndex           ID = 59\n\tbgBGIndex         ID = 60\n\tbhIndex           ID = 61\n\tbmIndex           ID = 62\n\tbmMLIndex         ID = 63\n\tbnIndex           ID = 64\n\tbnBDIndex         ID = 65\n\tbnINIndex         ID = 66\n\tboIndex           ID = 67\n\tboCNIndex         ID = 68\n\tboINIndex         ID = 69\n\tbrIndex           ID = 70\n\tbrFRIndex         ID = 71\n\tbrxIndex          ID = 72\n\tbrxINIndex        ID = 73\n\tbsIndex           ID = 74\n\tbsCyrlIndex       ID = 75\n\tbsCyrlBAIndex     ID = 76\n\tbsLatnIndex       ID = 77\n\tbsLatnBAIndex     ID = 78\n\tcaIndex           ID = 79\n\tcaADIndex         ID = 80\n\tcaESIndex         ID = 81\n\tcaFRIndex         ID = 82\n\tcaITIndex         ID = 83\n\tccpIndex          ID = 84\n\tccpBDIndex        ID = 85\n\tccpINIndex        ID = 86\n\tceIndex           ID = 87\n\tceRUIndex         ID = 88\n\tcggIndex          ID = 89\n\tcggUGIndex        ID = 90\n\tchrIndex          ID = 91\n\tchrUSIndex        ID = 92\n\tckbIndex          ID = 93\n\tckbIQIndex        ID = 94\n\tckbIRIndex        ID = 95\n\tcsIndex           ID = 96\n\tcsCZIndex         ID = 97\n\tcuIndex           ID = 98\n\tcuRUIndex         ID = 99\n\tcyIndex           ID = 100\n\tcyGBIndex         ID = 101\n\tdaIndex           ID = 102\n\tdaDKIndex         ID = 103\n\tdaGLIndex         ID = 104\n\tdavIndex          ID = 105\n\tdavKEIndex        ID = 106\n\tdeIndex           ID = 107\n\tdeATIndex         ID = 108\n\tdeBEIndex         ID = 109\n\tdeCHIndex         ID = 110\n\tdeDEIndex         ID = 111\n\tdeITIndex         ID = 112\n\tdeLIIndex         ID = 113\n\tdeLUIndex         ID = 114\n\tdjeIndex          ID = 115\n\tdjeNEIndex        ID = 116\n\tdsbIndex          ID = 117\n\tdsbDEIndex        ID = 118\n\tduaIndex          ID = 119\n\tduaCMIndex        ID = 120\n\tdvIndex           ID = 121\n\tdyoIndex          ID = 122\n\tdyoSNIndex        ID = 123\n\tdzIndex           ID = 124\n\tdzBTIndex         ID = 125\n\tebuIndex          ID = 126\n\tebuKEIndex        ID = 127\n\teeIndex           ID = 128\n\teeGHIndex         ID = 129\n\teeTGIndex         ID = 130\n\telIndex           ID = 131\n\telCYIndex         ID = 132\n\telGRIndex         ID = 133\n\tenIndex           ID = 134\n\ten001Index        ID = 135\n\ten150Index        ID = 136\n\tenAGIndex         ID = 137\n\tenAIIndex         ID = 138\n\tenASIndex         ID = 139\n\tenATIndex         ID = 140\n\tenAUIndex         ID = 141\n\tenBBIndex         ID = 142\n\tenBEIndex         ID = 143\n\tenBIIndex         ID = 144\n\tenBMIndex         ID = 145\n\tenBSIndex         ID = 146\n\tenBWIndex         ID = 147\n\tenBZIndex         ID = 148\n\tenCAIndex         ID = 149\n\tenCCIndex         ID = 150\n\tenCHIndex         ID = 151\n\tenCKIndex         ID = 152\n\tenCMIndex         ID = 153\n\tenCXIndex         ID = 154\n\tenCYIndex         ID = 155\n\tenDEIndex         ID = 156\n\tenDGIndex         ID = 157\n\tenDKIndex         ID = 158\n\tenDMIndex         ID = 159\n\tenERIndex         ID = 160\n\tenFIIndex         ID = 161\n\tenFJIndex         ID = 162\n\tenFKIndex         ID = 163\n\tenFMIndex         ID = 164\n\tenGBIndex         ID = 165\n\tenGDIndex         ID = 166\n\tenGGIndex         ID = 167\n\tenGHIndex         ID = 168\n\tenGIIndex         ID = 169\n\tenGMIndex         ID = 170\n\tenGUIndex         ID = 171\n\tenGYIndex         ID = 172\n\tenHKIndex         ID = 173\n\tenIEIndex         ID = 174\n\tenILIndex         ID = 175\n\tenIMIndex         ID = 176\n\tenINIndex         ID = 177\n\tenIOIndex         ID = 178\n\tenJEIndex         ID = 179\n\tenJMIndex         ID = 180\n\tenKEIndex         ID = 181\n\tenKIIndex         ID = 182\n\tenKNIndex         ID = 183\n\tenKYIndex         ID = 184\n\tenLCIndex         ID = 185\n\tenLRIndex         ID = 186\n\tenLSIndex         ID = 187\n\tenMGIndex         ID = 188\n\tenMHIndex         ID = 189\n\tenMOIndex         ID = 190\n\tenMPIndex         ID = 191\n\tenMSIndex         ID = 192\n\tenMTIndex         ID = 193\n\tenMUIndex         ID = 194\n\tenMWIndex         ID = 195\n\tenMYIndex         ID = 196\n\tenNAIndex         ID = 197\n\tenNFIndex         ID = 198\n\tenNGIndex         ID = 199\n\tenNLIndex         ID = 200\n\tenNRIndex         ID = 201\n\tenNUIndex         ID = 202\n\tenNZIndex         ID = 203\n\tenPGIndex         ID = 204\n\tenPHIndex         ID = 205\n\tenPKIndex         ID = 206\n\tenPNIndex         ID = 207\n\tenPRIndex         ID = 208\n\tenPWIndex         ID = 209\n\tenRWIndex         ID = 210\n\tenSBIndex         ID = 211\n\tenSCIndex         ID = 212\n\tenSDIndex         ID = 213\n\tenSEIndex         ID = 214\n\tenSGIndex         ID = 215\n\tenSHIndex         ID = 216\n\tenSIIndex         ID = 217\n\tenSLIndex         ID = 218\n\tenSSIndex         ID = 219\n\tenSXIndex         ID = 220\n\tenSZIndex         ID = 221\n\tenTCIndex         ID = 222\n\tenTKIndex         ID = 223\n\tenTOIndex         ID = 224\n\tenTTIndex         ID = 225\n\tenTVIndex         ID = 226\n\tenTZIndex         ID = 227\n\tenUGIndex         ID = 228\n\tenUMIndex         ID = 229\n\tenUSIndex         ID = 230\n\tenVCIndex         ID = 231\n\tenVGIndex         ID = 232\n\tenVIIndex         ID = 233\n\tenVUIndex         ID = 234\n\tenWSIndex         ID = 235\n\tenZAIndex         ID = 236\n\tenZMIndex         ID = 237\n\tenZWIndex         ID = 238\n\teoIndex           ID = 239\n\teo001Index        ID = 240\n\tesIndex           ID = 241\n\tes419Index        ID = 242\n\tesARIndex         ID = 243\n\tesBOIndex         ID = 244\n\tesBRIndex         ID = 245\n\tesBZIndex         ID = 246\n\tesCLIndex         ID = 247\n\tesCOIndex         ID = 248\n\tesCRIndex         ID = 249\n\tesCUIndex         ID = 250\n\tesDOIndex         ID = 251\n\tesEAIndex         ID = 252\n\tesECIndex         ID = 253\n\tesESIndex         ID = 254\n\tesGQIndex         ID = 255\n\tesGTIndex         ID = 256\n\tesHNIndex         ID = 257\n\tesICIndex         ID = 258\n\tesMXIndex         ID = 259\n\tesNIIndex         ID = 260\n\tesPAIndex         ID = 261\n\tesPEIndex         ID = 262\n\tesPHIndex         ID = 263\n\tesPRIndex         ID = 264\n\tesPYIndex         ID = 265\n\tesSVIndex         ID = 266\n\tesUSIndex         ID = 267\n\tesUYIndex         ID = 268\n\tesVEIndex         ID = 269\n\tetIndex           ID = 270\n\tetEEIndex         ID = 271\n\teuIndex           ID = 272\n\teuESIndex         ID = 273\n\tewoIndex          ID = 274\n\tewoCMIndex        ID = 275\n\tfaIndex           ID = 276\n\tfaAFIndex         ID = 277\n\tfaIRIndex         ID = 278\n\tffIndex           ID = 279\n\tffCMIndex         ID = 280\n\tffGNIndex         ID = 281\n\tffMRIndex         ID = 282\n\tffSNIndex         ID = 283\n\tfiIndex           ID = 284\n\tfiFIIndex         ID = 285\n\tfilIndex          ID = 286\n\tfilPHIndex        ID = 287\n\tfoIndex           ID = 288\n\tfoDKIndex         ID = 289\n\tfoFOIndex         ID = 290\n\tfrIndex           ID = 291\n\tfrBEIndex         ID = 292\n\tfrBFIndex         ID = 293\n\tfrBIIndex         ID = 294\n\tfrBJIndex         ID = 295\n\tfrBLIndex         ID = 296\n\tfrCAIndex         ID = 297\n\tfrCDIndex         ID = 298\n\tfrCFIndex         ID = 299\n\tfrCGIndex         ID = 300\n\tfrCHIndex         ID = 301\n\tfrCIIndex         ID = 302\n\tfrCMIndex         ID = 303\n\tfrDJIndex         ID = 304\n\tfrDZIndex         ID = 305\n\tfrFRIndex         ID = 306\n\tfrGAIndex         ID = 307\n\tfrGFIndex         ID = 308\n\tfrGNIndex         ID = 309\n\tfrGPIndex         ID = 310\n\tfrGQIndex         ID = 311\n\tfrHTIndex         ID = 312\n\tfrKMIndex         ID = 313\n\tfrLUIndex         ID = 314\n\tfrMAIndex         ID = 315\n\tfrMCIndex         ID = 316\n\tfrMFIndex         ID = 317\n\tfrMGIndex         ID = 318\n\tfrMLIndex         ID = 319\n\tfrMQIndex         ID = 320\n\tfrMRIndex         ID = 321\n\tfrMUIndex         ID = 322\n\tfrNCIndex         ID = 323\n\tfrNEIndex         ID = 324\n\tfrPFIndex         ID = 325\n\tfrPMIndex         ID = 326\n\tfrREIndex         ID = 327\n\tfrRWIndex         ID = 328\n\tfrSCIndex         ID = 329\n\tfrSNIndex         ID = 330\n\tfrSYIndex         ID = 331\n\tfrTDIndex         ID = 332\n\tfrTGIndex         ID = 333\n\tfrTNIndex         ID = 334\n\tfrVUIndex         ID = 335\n\tfrWFIndex         ID = 336\n\tfrYTIndex         ID = 337\n\tfurIndex          ID = 338\n\tfurITIndex        ID = 339\n\tfyIndex           ID = 340\n\tfyNLIndex         ID = 341\n\tgaIndex           ID = 342\n\tgaIEIndex         ID = 343\n\tgdIndex           ID = 344\n\tgdGBIndex         ID = 345\n\tglIndex           ID = 346\n\tglESIndex         ID = 347\n\tgswIndex          ID = 348\n\tgswCHIndex        ID = 349\n\tgswFRIndex        ID = 350\n\tgswLIIndex        ID = 351\n\tguIndex           ID = 352\n\tguINIndex         ID = 353\n\tguwIndex          ID = 354\n\tguzIndex          ID = 355\n\tguzKEIndex        ID = 356\n\tgvIndex           ID = 357\n\tgvIMIndex         ID = 358\n\thaIndex           ID = 359\n\thaGHIndex         ID = 360\n\thaNEIndex         ID = 361\n\thaNGIndex         ID = 362\n\thawIndex          ID = 363\n\thawUSIndex        ID = 364\n\theIndex           ID = 365\n\theILIndex         ID = 366\n\thiIndex           ID = 367\n\thiINIndex         ID = 368\n\thrIndex           ID = 369\n\thrBAIndex         ID = 370\n\thrHRIndex         ID = 371\n\thsbIndex          ID = 372\n\thsbDEIndex        ID = 373\n\thuIndex           ID = 374\n\thuHUIndex         ID = 375\n\thyIndex           ID = 376\n\thyAMIndex         ID = 377\n\tidIndex           ID = 378\n\tidIDIndex         ID = 379\n\tigIndex           ID = 380\n\tigNGIndex         ID = 381\n\tiiIndex           ID = 382\n\tiiCNIndex         ID = 383\n\tinIndex           ID = 384\n\tioIndex           ID = 385\n\tisIndex           ID = 386\n\tisISIndex         ID = 387\n\titIndex           ID = 388\n\titCHIndex         ID = 389\n\titITIndex         ID = 390\n\titSMIndex         ID = 391\n\titVAIndex         ID = 392\n\tiuIndex           ID = 393\n\tiwIndex           ID = 394\n\tjaIndex           ID = 395\n\tjaJPIndex         ID = 396\n\tjboIndex          ID = 397\n\tjgoIndex          ID = 398\n\tjgoCMIndex        ID = 399\n\tjiIndex           ID = 400\n\tjmcIndex          ID = 401\n\tjmcTZIndex        ID = 402\n\tjvIndex           ID = 403\n\tjwIndex           ID = 404\n\tkaIndex           ID = 405\n\tkaGEIndex         ID = 406\n\tkabIndex          ID = 407\n\tkabDZIndex        ID = 408\n\tkajIndex          ID = 409\n\tkamIndex          ID = 410\n\tkamKEIndex        ID = 411\n\tkcgIndex          ID = 412\n\tkdeIndex          ID = 413\n\tkdeTZIndex        ID = 414\n\tkeaIndex          ID = 415\n\tkeaCVIndex        ID = 416\n\tkhqIndex          ID = 417\n\tkhqMLIndex        ID = 418\n\tkiIndex           ID = 419\n\tkiKEIndex         ID = 420\n\tkkIndex           ID = 421\n\tkkKZIndex         ID = 422\n\tkkjIndex          ID = 423\n\tkkjCMIndex        ID = 424\n\tklIndex           ID = 425\n\tklGLIndex         ID = 426\n\tklnIndex          ID = 427\n\tklnKEIndex        ID = 428\n\tkmIndex           ID = 429\n\tkmKHIndex         ID = 430\n\tknIndex           ID = 431\n\tknINIndex         ID = 432\n\tkoIndex           ID = 433\n\tkoKPIndex         ID = 434\n\tkoKRIndex         ID = 435\n\tkokIndex          ID = 436\n\tkokINIndex        ID = 437\n\tksIndex           ID = 438\n\tksINIndex         ID = 439\n\tksbIndex          ID = 440\n\tksbTZIndex        ID = 441\n\tksfIndex          ID = 442\n\tksfCMIndex        ID = 443\n\tkshIndex          ID = 444\n\tkshDEIndex        ID = 445\n\tkuIndex           ID = 446\n\tkwIndex           ID = 447\n\tkwGBIndex         ID = 448\n\tkyIndex           ID = 449\n\tkyKGIndex         ID = 450\n\tlagIndex          ID = 451\n\tlagTZIndex        ID = 452\n\tlbIndex           ID = 453\n\tlbLUIndex         ID = 454\n\tlgIndex           ID = 455\n\tlgUGIndex         ID = 456\n\tlktIndex          ID = 457\n\tlktUSIndex        ID = 458\n\tlnIndex           ID = 459\n\tlnAOIndex         ID = 460\n\tlnCDIndex         ID = 461\n\tlnCFIndex         ID = 462\n\tlnCGIndex         ID = 463\n\tloIndex           ID = 464\n\tloLAIndex         ID = 465\n\tlrcIndex          ID = 466\n\tlrcIQIndex        ID = 467\n\tlrcIRIndex        ID = 468\n\tltIndex           ID = 469\n\tltLTIndex         ID = 470\n\tluIndex           ID = 471\n\tluCDIndex         ID = 472\n\tluoIndex          ID = 473\n\tluoKEIndex        ID = 474\n\tluyIndex          ID = 475\n\tluyKEIndex        ID = 476\n\tlvIndex           ID = 477\n\tlvLVIndex         ID = 478\n\tmasIndex          ID = 479\n\tmasKEIndex        ID = 480\n\tmasTZIndex        ID = 481\n\tmerIndex          ID = 482\n\tmerKEIndex        ID = 483\n\tmfeIndex          ID = 484\n\tmfeMUIndex        ID = 485\n\tmgIndex           ID = 486\n\tmgMGIndex         ID = 487\n\tmghIndex          ID = 488\n\tmghMZIndex        ID = 489\n\tmgoIndex          ID = 490\n\tmgoCMIndex        ID = 491\n\tmkIndex           ID = 492\n\tmkMKIndex         ID = 493\n\tmlIndex           ID = 494\n\tmlINIndex         ID = 495\n\tmnIndex           ID = 496\n\tmnMNIndex         ID = 497\n\tmoIndex           ID = 498\n\tmrIndex           ID = 499\n\tmrINIndex         ID = 500\n\tmsIndex           ID = 501\n\tmsBNIndex         ID = 502\n\tmsMYIndex         ID = 503\n\tmsSGIndex         ID = 504\n\tmtIndex           ID = 505\n\tmtMTIndex         ID = 506\n\tmuaIndex          ID = 507\n\tmuaCMIndex        ID = 508\n\tmyIndex           ID = 509\n\tmyMMIndex         ID = 510\n\tmznIndex          ID = 511\n\tmznIRIndex        ID = 512\n\tnahIndex          ID = 513\n\tnaqIndex          ID = 514\n\tnaqNAIndex        ID = 515\n\tnbIndex           ID = 516\n\tnbNOIndex         ID = 517\n\tnbSJIndex         ID = 518\n\tndIndex           ID = 519\n\tndZWIndex         ID = 520\n\tndsIndex          ID = 521\n\tndsDEIndex        ID = 522\n\tndsNLIndex        ID = 523\n\tneIndex           ID = 524\n\tneINIndex         ID = 525\n\tneNPIndex         ID = 526\n\tnlIndex           ID = 527\n\tnlAWIndex         ID = 528\n\tnlBEIndex         ID = 529\n\tnlBQIndex         ID = 530\n\tnlCWIndex         ID = 531\n\tnlNLIndex         ID = 532\n\tnlSRIndex         ID = 533\n\tnlSXIndex         ID = 534\n\tnmgIndex          ID = 535\n\tnmgCMIndex        ID = 536\n\tnnIndex           ID = 537\n\tnnNOIndex         ID = 538\n\tnnhIndex          ID = 539\n\tnnhCMIndex        ID = 540\n\tnoIndex           ID = 541\n\tnqoIndex          ID = 542\n\tnrIndex           ID = 543\n\tnsoIndex          ID = 544\n\tnusIndex          ID = 545\n\tnusSSIndex        ID = 546\n\tnyIndex           ID = 547\n\tnynIndex          ID = 548\n\tnynUGIndex        ID = 549\n\tomIndex           ID = 550\n\tomETIndex         ID = 551\n\tomKEIndex         ID = 552\n\torIndex           ID = 553\n\torINIndex         ID = 554\n\tosIndex           ID = 555\n\tosGEIndex         ID = 556\n\tosRUIndex         ID = 557\n\tpaIndex           ID = 558\n\tpaArabIndex       ID = 559\n\tpaArabPKIndex     ID = 560\n\tpaGuruIndex       ID = 561\n\tpaGuruINIndex     ID = 562\n\tpapIndex          ID = 563\n\tplIndex           ID = 564\n\tplPLIndex         ID = 565\n\tprgIndex          ID = 566\n\tprg001Index       ID = 567\n\tpsIndex           ID = 568\n\tpsAFIndex         ID = 569\n\tptIndex           ID = 570\n\tptAOIndex         ID = 571\n\tptBRIndex         ID = 572\n\tptCHIndex         ID = 573\n\tptCVIndex         ID = 574\n\tptGQIndex         ID = 575\n\tptGWIndex         ID = 576\n\tptLUIndex         ID = 577\n\tptMOIndex         ID = 578\n\tptMZIndex         ID = 579\n\tptPTIndex         ID = 580\n\tptSTIndex         ID = 581\n\tptTLIndex         ID = 582\n\tquIndex           ID = 583\n\tquBOIndex         ID = 584\n\tquECIndex         ID = 585\n\tquPEIndex         ID = 586\n\trmIndex           ID = 587\n\trmCHIndex         ID = 588\n\trnIndex           ID = 589\n\trnBIIndex         ID = 590\n\troIndex           ID = 591\n\troMDIndex         ID = 592\n\troROIndex         ID = 593\n\trofIndex          ID = 594\n\trofTZIndex        ID = 595\n\truIndex           ID = 596\n\truBYIndex         ID = 597\n\truKGIndex         ID = 598\n\truKZIndex         ID = 599\n\truMDIndex         ID = 600\n\truRUIndex         ID = 601\n\truUAIndex         ID = 602\n\trwIndex           ID = 603\n\trwRWIndex         ID = 604\n\trwkIndex          ID = 605\n\trwkTZIndex        ID = 606\n\tsahIndex          ID = 607\n\tsahRUIndex        ID = 608\n\tsaqIndex          ID = 609\n\tsaqKEIndex        ID = 610\n\tsbpIndex          ID = 611\n\tsbpTZIndex        ID = 612\n\tsdIndex           ID = 613\n\tsdPKIndex         ID = 614\n\tsdhIndex          ID = 615\n\tseIndex           ID = 616\n\tseFIIndex         ID = 617\n\tseNOIndex         ID = 618\n\tseSEIndex         ID = 619\n\tsehIndex          ID = 620\n\tsehMZIndex        ID = 621\n\tsesIndex          ID = 622\n\tsesMLIndex        ID = 623\n\tsgIndex           ID = 624\n\tsgCFIndex         ID = 625\n\tshIndex           ID = 626\n\tshiIndex          ID = 627\n\tshiLatnIndex      ID = 628\n\tshiLatnMAIndex    ID = 629\n\tshiTfngIndex      ID = 630\n\tshiTfngMAIndex    ID = 631\n\tsiIndex           ID = 632\n\tsiLKIndex         ID = 633\n\tskIndex           ID = 634\n\tskSKIndex         ID = 635\n\tslIndex           ID = 636\n\tslSIIndex         ID = 637\n\tsmaIndex          ID = 638\n\tsmiIndex          ID = 639\n\tsmjIndex          ID = 640\n\tsmnIndex          ID = 641\n\tsmnFIIndex        ID = 642\n\tsmsIndex          ID = 643\n\tsnIndex           ID = 644\n\tsnZWIndex         ID = 645\n\tsoIndex           ID = 646\n\tsoDJIndex         ID = 647\n\tsoETIndex         ID = 648\n\tsoKEIndex         ID = 649\n\tsoSOIndex         ID = 650\n\tsqIndex           ID = 651\n\tsqALIndex         ID = 652\n\tsqMKIndex         ID = 653\n\tsqXKIndex         ID = 654\n\tsrIndex           ID = 655\n\tsrCyrlIndex       ID = 656\n\tsrCyrlBAIndex     ID = 657\n\tsrCyrlMEIndex     ID = 658\n\tsrCyrlRSIndex     ID = 659\n\tsrCyrlXKIndex     ID = 660\n\tsrLatnIndex       ID = 661\n\tsrLatnBAIndex     ID = 662\n\tsrLatnMEIndex     ID = 663\n\tsrLatnRSIndex     ID = 664\n\tsrLatnXKIndex     ID = 665\n\tssIndex           ID = 666\n\tssyIndex          ID = 667\n\tstIndex           ID = 668\n\tsvIndex           ID = 669\n\tsvAXIndex         ID = 670\n\tsvFIIndex         ID = 671\n\tsvSEIndex         ID = 672\n\tswIndex           ID = 673\n\tswCDIndex         ID = 674\n\tswKEIndex         ID = 675\n\tswTZIndex         ID = 676\n\tswUGIndex         ID = 677\n\tsyrIndex          ID = 678\n\ttaIndex           ID = 679\n\ttaINIndex         ID = 680\n\ttaLKIndex         ID = 681\n\ttaMYIndex         ID = 682\n\ttaSGIndex         ID = 683\n\tteIndex           ID = 684\n\tteINIndex         ID = 685\n\tteoIndex          ID = 686\n\tteoKEIndex        ID = 687\n\tteoUGIndex        ID = 688\n\ttgIndex           ID = 689\n\ttgTJIndex         ID = 690\n\tthIndex           ID = 691\n\tthTHIndex         ID = 692\n\ttiIndex           ID = 693\n\ttiERIndex         ID = 694\n\ttiETIndex         ID = 695\n\ttigIndex          ID = 696\n\ttkIndex           ID = 697\n\ttkTMIndex         ID = 698\n\ttlIndex           ID = 699\n\ttnIndex           ID = 700\n\ttoIndex           ID = 701\n\ttoTOIndex         ID = 702\n\ttrIndex           ID = 703\n\ttrCYIndex         ID = 704\n\ttrTRIndex         ID = 705\n\ttsIndex           ID = 706\n\tttIndex           ID = 707\n\tttRUIndex         ID = 708\n\ttwqIndex          ID = 709\n\ttwqNEIndex        ID = 710\n\ttzmIndex          ID = 711\n\ttzmMAIndex        ID = 712\n\tugIndex           ID = 713\n\tugCNIndex         ID = 714\n\tukIndex           ID = 715\n\tukUAIndex         ID = 716\n\turIndex           ID = 717\n\turINIndex         ID = 718\n\turPKIndex         ID = 719\n\tuzIndex           ID = 720\n\tuzArabIndex       ID = 721\n\tuzArabAFIndex     ID = 722\n\tuzCyrlIndex       ID = 723\n\tuzCyrlUZIndex     ID = 724\n\tuzLatnIndex       ID = 725\n\tuzLatnUZIndex     ID = 726\n\tvaiIndex          ID = 727\n\tvaiLatnIndex      ID = 728\n\tvaiLatnLRIndex    ID = 729\n\tvaiVaiiIndex      ID = 730\n\tvaiVaiiLRIndex    ID = 731\n\tveIndex           ID = 732\n\tviIndex           ID = 733\n\tviVNIndex         ID = 734\n\tvoIndex           ID = 735\n\tvo001Index        ID = 736\n\tvunIndex          ID = 737\n\tvunTZIndex        ID = 738\n\twaIndex           ID = 739\n\twaeIndex          ID = 740\n\twaeCHIndex        ID = 741\n\twoIndex           ID = 742\n\twoSNIndex         ID = 743\n\txhIndex           ID = 744\n\txogIndex          ID = 745\n\txogUGIndex        ID = 746\n\tyavIndex          ID = 747\n\tyavCMIndex        ID = 748\n\tyiIndex           ID = 749\n\tyi001Index        ID = 750\n\tyoIndex           ID = 751\n\tyoBJIndex         ID = 752\n\tyoNGIndex         ID = 753\n\tyueIndex          ID = 754\n\tyueHansIndex      ID = 755\n\tyueHansCNIndex    ID = 756\n\tyueHantIndex      ID = 757\n\tyueHantHKIndex    ID = 758\n\tzghIndex          ID = 759\n\tzghMAIndex        ID = 760\n\tzhIndex           ID = 761\n\tzhHansIndex       ID = 762\n\tzhHansCNIndex     ID = 763\n\tzhHansHKIndex     ID = 764\n\tzhHansMOIndex     ID = 765\n\tzhHansSGIndex     ID = 766\n\tzhHantIndex       ID = 767\n\tzhHantHKIndex     ID = 768\n\tzhHantMOIndex     ID = 769\n\tzhHantTWIndex     ID = 770\n\tzuIndex           ID = 771\n\tzuZAIndex         ID = 772\n\tcaESvalenciaIndex ID = 773\n\tenUSuvaposixIndex ID = 774\n)\n\nvar coreTags = []language.CompactCoreInfo{ // 773 elements\n\t// Entry 0 - 1F\n\t0x00000000, 0x01600000, 0x016000d3, 0x01600162,\n\t0x01c00000, 0x01c00052, 0x02100000, 0x02100081,\n\t0x02700000, 0x02700070, 0x03a00000, 0x03a00001,\n\t0x03a00023, 0x03a00039, 0x03a00063, 0x03a00068,\n\t0x03a0006c, 0x03a0006d, 0x03a0006e, 0x03a00098,\n\t0x03a0009c, 0x03a000a2, 0x03a000a9, 0x03a000ad,\n\t0x03a000b1, 0x03a000ba, 0x03a000bb, 0x03a000ca,\n\t0x03a000e2, 0x03a000ee, 0x03a000f4, 0x03a00109,\n\t// Entry 20 - 3F\n\t0x03a0010c, 0x03a00116, 0x03a00118, 0x03a0011d,\n\t0x03a00121, 0x03a00129, 0x03a0015f, 0x04000000,\n\t0x04300000, 0x0430009a, 0x04400000, 0x04400130,\n\t0x04800000, 0x0480006f, 0x05800000, 0x05820000,\n\t0x05820032, 0x0585b000, 0x0585b032, 0x05e00000,\n\t0x05e00052, 0x07100000, 0x07100047, 0x07500000,\n\t0x07500163, 0x07900000, 0x07900130, 0x07e00000,\n\t0x07e00038, 0x08200000, 0x0a000000, 0x0a0000c4,\n\t// Entry 40 - 5F\n\t0x0a500000, 0x0a500035, 0x0a50009a, 0x0a900000,\n\t0x0a900053, 0x0a90009a, 0x0b200000, 0x0b200079,\n\t0x0b500000, 0x0b50009a, 0x0b700000, 0x0b720000,\n\t0x0b720033, 0x0b75b000, 0x0b75b033, 0x0d700000,\n\t0x0d700022, 0x0d70006f, 0x0d700079, 0x0d70009f,\n\t0x0db00000, 0x0db00035, 0x0db0009a, 0x0dc00000,\n\t0x0dc00107, 0x0df00000, 0x0df00132, 0x0e500000,\n\t0x0e500136, 0x0e900000, 0x0e90009c, 0x0e90009d,\n\t// Entry 60 - 7F\n\t0x0fa00000, 0x0fa0005f, 0x0fe00000, 0x0fe00107,\n\t0x10000000, 0x1000007c, 0x10100000, 0x10100064,\n\t0x10100083, 0x10800000, 0x108000a5, 0x10d00000,\n\t0x10d0002e, 0x10d00036, 0x10d0004e, 0x10d00061,\n\t0x10d0009f, 0x10d000b3, 0x10d000b8, 0x11700000,\n\t0x117000d5, 0x11f00000, 0x11f00061, 0x12400000,\n\t0x12400052, 0x12800000, 0x12b00000, 0x12b00115,\n\t0x12d00000, 0x12d00043, 0x12f00000, 0x12f000a5,\n\t// Entry 80 - 9F\n\t0x13000000, 0x13000081, 0x13000123, 0x13600000,\n\t0x1360005e, 0x13600088, 0x13900000, 0x13900001,\n\t0x1390001a, 0x13900025, 0x13900026, 0x1390002d,\n\t0x1390002e, 0x1390002f, 0x13900034, 0x13900036,\n\t0x1390003a, 0x1390003d, 0x13900042, 0x13900046,\n\t0x13900048, 0x13900049, 0x1390004a, 0x1390004e,\n\t0x13900050, 0x13900052, 0x1390005d, 0x1390005e,\n\t0x13900061, 0x13900062, 0x13900064, 0x13900065,\n\t// Entry A0 - BF\n\t0x1390006e, 0x13900073, 0x13900074, 0x13900075,\n\t0x13900076, 0x1390007c, 0x1390007d, 0x13900080,\n\t0x13900081, 0x13900082, 0x13900084, 0x1390008b,\n\t0x1390008d, 0x1390008e, 0x13900097, 0x13900098,\n\t0x13900099, 0x1390009a, 0x1390009b, 0x139000a0,\n\t0x139000a1, 0x139000a5, 0x139000a8, 0x139000aa,\n\t0x139000ae, 0x139000b2, 0x139000b5, 0x139000b6,\n\t0x139000c0, 0x139000c1, 0x139000c7, 0x139000c8,\n\t// Entry C0 - DF\n\t0x139000cb, 0x139000cc, 0x139000cd, 0x139000cf,\n\t0x139000d1, 0x139000d3, 0x139000d6, 0x139000d7,\n\t0x139000da, 0x139000de, 0x139000e0, 0x139000e1,\n\t0x139000e7, 0x139000e8, 0x139000e9, 0x139000ec,\n\t0x139000ed, 0x139000f1, 0x13900108, 0x1390010a,\n\t0x1390010b, 0x1390010c, 0x1390010d, 0x1390010e,\n\t0x1390010f, 0x13900110, 0x13900113, 0x13900118,\n\t0x1390011c, 0x1390011e, 0x13900120, 0x13900126,\n\t// Entry E0 - FF\n\t0x1390012a, 0x1390012d, 0x1390012e, 0x13900130,\n\t0x13900132, 0x13900134, 0x13900136, 0x1390013a,\n\t0x1390013d, 0x1390013e, 0x13900140, 0x13900143,\n\t0x13900162, 0x13900163, 0x13900165, 0x13c00000,\n\t0x13c00001, 0x13e00000, 0x13e0001f, 0x13e0002c,\n\t0x13e0003f, 0x13e00041, 0x13e00048, 0x13e00051,\n\t0x13e00054, 0x13e00057, 0x13e0005a, 0x13e00066,\n\t0x13e00069, 0x13e0006a, 0x13e0006f, 0x13e00087,\n\t// Entry 100 - 11F\n\t0x13e0008a, 0x13e00090, 0x13e00095, 0x13e000d0,\n\t0x13e000d9, 0x13e000e3, 0x13e000e5, 0x13e000e8,\n\t0x13e000ed, 0x13e000f2, 0x13e0011b, 0x13e00136,\n\t0x13e00137, 0x13e0013c, 0x14000000, 0x1400006b,\n\t0x14500000, 0x1450006f, 0x14600000, 0x14600052,\n\t0x14800000, 0x14800024, 0x1480009d, 0x14e00000,\n\t0x14e00052, 0x14e00085, 0x14e000ca, 0x14e00115,\n\t0x15100000, 0x15100073, 0x15300000, 0x153000e8,\n\t// Entry 120 - 13F\n\t0x15800000, 0x15800064, 0x15800077, 0x15e00000,\n\t0x15e00036, 0x15e00037, 0x15e0003a, 0x15e0003b,\n\t0x15e0003c, 0x15e00049, 0x15e0004b, 0x15e0004c,\n\t0x15e0004d, 0x15e0004e, 0x15e0004f, 0x15e00052,\n\t0x15e00063, 0x15e00068, 0x15e00079, 0x15e0007b,\n\t0x15e0007f, 0x15e00085, 0x15e00086, 0x15e00087,\n\t0x15e00092, 0x15e000a9, 0x15e000b8, 0x15e000bb,\n\t0x15e000bc, 0x15e000bf, 0x15e000c0, 0x15e000c4,\n\t// Entry 140 - 15F\n\t0x15e000c9, 0x15e000ca, 0x15e000cd, 0x15e000d4,\n\t0x15e000d5, 0x15e000e6, 0x15e000eb, 0x15e00103,\n\t0x15e00108, 0x15e0010b, 0x15e00115, 0x15e0011d,\n\t0x15e00121, 0x15e00123, 0x15e00129, 0x15e00140,\n\t0x15e00141, 0x15e00160, 0x16900000, 0x1690009f,\n\t0x16d00000, 0x16d000da, 0x16e00000, 0x16e00097,\n\t0x17e00000, 0x17e0007c, 0x19000000, 0x1900006f,\n\t0x1a300000, 0x1a30004e, 0x1a300079, 0x1a3000b3,\n\t// Entry 160 - 17F\n\t0x1a400000, 0x1a40009a, 0x1a900000, 0x1ab00000,\n\t0x1ab000a5, 0x1ac00000, 0x1ac00099, 0x1b400000,\n\t0x1b400081, 0x1b4000d5, 0x1b4000d7, 0x1b800000,\n\t0x1b800136, 0x1bc00000, 0x1bc00098, 0x1be00000,\n\t0x1be0009a, 0x1d100000, 0x1d100033, 0x1d100091,\n\t0x1d200000, 0x1d200061, 0x1d500000, 0x1d500093,\n\t0x1d700000, 0x1d700028, 0x1e100000, 0x1e100096,\n\t0x1e700000, 0x1e7000d7, 0x1ea00000, 0x1ea00053,\n\t// Entry 180 - 19F\n\t0x1f300000, 0x1f500000, 0x1f800000, 0x1f80009e,\n\t0x1f900000, 0x1f90004e, 0x1f90009f, 0x1f900114,\n\t0x1f900139, 0x1fa00000, 0x1fb00000, 0x20000000,\n\t0x200000a3, 0x20300000, 0x20700000, 0x20700052,\n\t0x20800000, 0x20a00000, 0x20a00130, 0x20e00000,\n\t0x20f00000, 0x21000000, 0x2100007e, 0x21200000,\n\t0x21200068, 0x21600000, 0x21700000, 0x217000a5,\n\t0x21f00000, 0x22300000, 0x22300130, 0x22700000,\n\t// Entry 1A0 - 1BF\n\t0x2270005b, 0x23400000, 0x234000c4, 0x23900000,\n\t0x239000a5, 0x24200000, 0x242000af, 0x24400000,\n\t0x24400052, 0x24500000, 0x24500083, 0x24600000,\n\t0x246000a5, 0x24a00000, 0x24a000a7, 0x25100000,\n\t0x2510009a, 0x25400000, 0x254000ab, 0x254000ac,\n\t0x25600000, 0x2560009a, 0x26a00000, 0x26a0009a,\n\t0x26b00000, 0x26b00130, 0x26d00000, 0x26d00052,\n\t0x26e00000, 0x26e00061, 0x27400000, 0x28100000,\n\t// Entry 1C0 - 1DF\n\t0x2810007c, 0x28a00000, 0x28a000a6, 0x29100000,\n\t0x29100130, 0x29500000, 0x295000b8, 0x2a300000,\n\t0x2a300132, 0x2af00000, 0x2af00136, 0x2b500000,\n\t0x2b50002a, 0x2b50004b, 0x2b50004c, 0x2b50004d,\n\t0x2b800000, 0x2b8000b0, 0x2bf00000, 0x2bf0009c,\n\t0x2bf0009d, 0x2c000000, 0x2c0000b7, 0x2c200000,\n\t0x2c20004b, 0x2c400000, 0x2c4000a5, 0x2c500000,\n\t0x2c5000a5, 0x2c700000, 0x2c7000b9, 0x2d100000,\n\t// Entry 1E0 - 1FF\n\t0x2d1000a5, 0x2d100130, 0x2e900000, 0x2e9000a5,\n\t0x2ed00000, 0x2ed000cd, 0x2f100000, 0x2f1000c0,\n\t0x2f200000, 0x2f2000d2, 0x2f400000, 0x2f400052,\n\t0x2ff00000, 0x2ff000c3, 0x30400000, 0x3040009a,\n\t0x30b00000, 0x30b000c6, 0x31000000, 0x31b00000,\n\t0x31b0009a, 0x31f00000, 0x31f0003e, 0x31f000d1,\n\t0x31f0010e, 0x32000000, 0x320000cc, 0x32500000,\n\t0x32500052, 0x33100000, 0x331000c5, 0x33a00000,\n\t// Entry 200 - 21F\n\t0x33a0009d, 0x34100000, 0x34500000, 0x345000d3,\n\t0x34700000, 0x347000db, 0x34700111, 0x34e00000,\n\t0x34e00165, 0x35000000, 0x35000061, 0x350000da,\n\t0x35100000, 0x3510009a, 0x351000dc, 0x36700000,\n\t0x36700030, 0x36700036, 0x36700040, 0x3670005c,\n\t0x367000da, 0x36700117, 0x3670011c, 0x36800000,\n\t0x36800052, 0x36a00000, 0x36a000db, 0x36c00000,\n\t0x36c00052, 0x36f00000, 0x37500000, 0x37600000,\n\t// Entry 220 - 23F\n\t0x37a00000, 0x38000000, 0x38000118, 0x38700000,\n\t0x38900000, 0x38900132, 0x39000000, 0x39000070,\n\t0x390000a5, 0x39500000, 0x3950009a, 0x39800000,\n\t0x3980007e, 0x39800107, 0x39d00000, 0x39d05000,\n\t0x39d050e9, 0x39d36000, 0x39d3609a, 0x3a100000,\n\t0x3b300000, 0x3b3000ea, 0x3bd00000, 0x3bd00001,\n\t0x3be00000, 0x3be00024, 0x3c000000, 0x3c00002a,\n\t0x3c000041, 0x3c00004e, 0x3c00005b, 0x3c000087,\n\t// Entry 240 - 25F\n\t0x3c00008c, 0x3c0000b8, 0x3c0000c7, 0x3c0000d2,\n\t0x3c0000ef, 0x3c000119, 0x3c000127, 0x3c400000,\n\t0x3c40003f, 0x3c40006a, 0x3c4000e5, 0x3d400000,\n\t0x3d40004e, 0x3d900000, 0x3d90003a, 0x3dc00000,\n\t0x3dc000bd, 0x3dc00105, 0x3de00000, 0x3de00130,\n\t0x3e200000, 0x3e200047, 0x3e2000a6, 0x3e2000af,\n\t0x3e2000bd, 0x3e200107, 0x3e200131, 0x3e500000,\n\t0x3e500108, 0x3e600000, 0x3e600130, 0x3eb00000,\n\t// Entry 260 - 27F\n\t0x3eb00107, 0x3ec00000, 0x3ec000a5, 0x3f300000,\n\t0x3f300130, 0x3fa00000, 0x3fa000e9, 0x3fc00000,\n\t0x3fd00000, 0x3fd00073, 0x3fd000db, 0x3fd0010d,\n\t0x3ff00000, 0x3ff000d2, 0x40100000, 0x401000c4,\n\t0x40200000, 0x4020004c, 0x40700000, 0x40800000,\n\t0x4085b000, 0x4085b0bb, 0x408eb000, 0x408eb0bb,\n\t0x40c00000, 0x40c000b4, 0x41200000, 0x41200112,\n\t0x41600000, 0x41600110, 0x41c00000, 0x41d00000,\n\t// Entry 280 - 29F\n\t0x41e00000, 0x41f00000, 0x41f00073, 0x42200000,\n\t0x42300000, 0x42300165, 0x42900000, 0x42900063,\n\t0x42900070, 0x429000a5, 0x42900116, 0x43100000,\n\t0x43100027, 0x431000c3, 0x4310014e, 0x43200000,\n\t0x43220000, 0x43220033, 0x432200be, 0x43220106,\n\t0x4322014e, 0x4325b000, 0x4325b033, 0x4325b0be,\n\t0x4325b106, 0x4325b14e, 0x43700000, 0x43a00000,\n\t0x43b00000, 0x44400000, 0x44400031, 0x44400073,\n\t// Entry 2A0 - 2BF\n\t0x4440010d, 0x44500000, 0x4450004b, 0x445000a5,\n\t0x44500130, 0x44500132, 0x44e00000, 0x45000000,\n\t0x4500009a, 0x450000b4, 0x450000d1, 0x4500010e,\n\t0x46100000, 0x4610009a, 0x46400000, 0x464000a5,\n\t0x46400132, 0x46700000, 0x46700125, 0x46b00000,\n\t0x46b00124, 0x46f00000, 0x46f0006e, 0x46f00070,\n\t0x47100000, 0x47600000, 0x47600128, 0x47a00000,\n\t0x48000000, 0x48200000, 0x4820012a, 0x48a00000,\n\t// Entry 2C0 - 2DF\n\t0x48a0005e, 0x48a0012c, 0x48e00000, 0x49400000,\n\t0x49400107, 0x4a400000, 0x4a4000d5, 0x4a900000,\n\t0x4a9000bb, 0x4ac00000, 0x4ac00053, 0x4ae00000,\n\t0x4ae00131, 0x4b400000, 0x4b40009a, 0x4b4000e9,\n\t0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc20000,\n\t0x4bc20138, 0x4bc5b000, 0x4bc5b138, 0x4be00000,\n\t0x4be5b000, 0x4be5b0b5, 0x4bef4000, 0x4bef40b5,\n\t0x4c000000, 0x4c300000, 0x4c30013f, 0x4c900000,\n\t// Entry 2E0 - 2FF\n\t0x4c900001, 0x4cc00000, 0x4cc00130, 0x4ce00000,\n\t0x4cf00000, 0x4cf0004e, 0x4e500000, 0x4e500115,\n\t0x4f200000, 0x4fb00000, 0x4fb00132, 0x50900000,\n\t0x50900052, 0x51200000, 0x51200001, 0x51800000,\n\t0x5180003b, 0x518000d7, 0x51f00000, 0x51f3b000,\n\t0x51f3b053, 0x51f3c000, 0x51f3c08e, 0x52800000,\n\t0x528000bb, 0x52900000, 0x5293b000, 0x5293b053,\n\t0x5293b08e, 0x5293b0c7, 0x5293b10e, 0x5293c000,\n\t// Entry 300 - 31F\n\t0x5293c08e, 0x5293c0c7, 0x5293c12f, 0x52f00000,\n\t0x52f00162,\n} // Size: 3116 bytes\n\nconst specialTagsStr string = \"ca-ES-valencia en-US-u-va-posix\"\n\n// Total table size 3147 bytes (3KiB); checksum: 5A8FFFA5\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact/tags.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage compact\n\nvar (\n\tund = Tag{}\n\n\tUnd Tag = Tag{}\n\n\tAfrikaans            Tag = Tag{language: afIndex, locale: afIndex}\n\tAmharic              Tag = Tag{language: amIndex, locale: amIndex}\n\tArabic               Tag = Tag{language: arIndex, locale: arIndex}\n\tModernStandardArabic Tag = Tag{language: ar001Index, locale: ar001Index}\n\tAzerbaijani          Tag = Tag{language: azIndex, locale: azIndex}\n\tBulgarian            Tag = Tag{language: bgIndex, locale: bgIndex}\n\tBengali              Tag = Tag{language: bnIndex, locale: bnIndex}\n\tCatalan              Tag = Tag{language: caIndex, locale: caIndex}\n\tCzech                Tag = Tag{language: csIndex, locale: csIndex}\n\tDanish               Tag = Tag{language: daIndex, locale: daIndex}\n\tGerman               Tag = Tag{language: deIndex, locale: deIndex}\n\tGreek                Tag = Tag{language: elIndex, locale: elIndex}\n\tEnglish              Tag = Tag{language: enIndex, locale: enIndex}\n\tAmericanEnglish      Tag = Tag{language: enUSIndex, locale: enUSIndex}\n\tBritishEnglish       Tag = Tag{language: enGBIndex, locale: enGBIndex}\n\tSpanish              Tag = Tag{language: esIndex, locale: esIndex}\n\tEuropeanSpanish      Tag = Tag{language: esESIndex, locale: esESIndex}\n\tLatinAmericanSpanish Tag = Tag{language: es419Index, locale: es419Index}\n\tEstonian             Tag = Tag{language: etIndex, locale: etIndex}\n\tPersian              Tag = Tag{language: faIndex, locale: faIndex}\n\tFinnish              Tag = Tag{language: fiIndex, locale: fiIndex}\n\tFilipino             Tag = Tag{language: filIndex, locale: filIndex}\n\tFrench               Tag = Tag{language: frIndex, locale: frIndex}\n\tCanadianFrench       Tag = Tag{language: frCAIndex, locale: frCAIndex}\n\tGujarati             Tag = Tag{language: guIndex, locale: guIndex}\n\tHebrew               Tag = Tag{language: heIndex, locale: heIndex}\n\tHindi                Tag = Tag{language: hiIndex, locale: hiIndex}\n\tCroatian             Tag = Tag{language: hrIndex, locale: hrIndex}\n\tHungarian            Tag = Tag{language: huIndex, locale: huIndex}\n\tArmenian             Tag = Tag{language: hyIndex, locale: hyIndex}\n\tIndonesian           Tag = Tag{language: idIndex, locale: idIndex}\n\tIcelandic            Tag = Tag{language: isIndex, locale: isIndex}\n\tItalian              Tag = Tag{language: itIndex, locale: itIndex}\n\tJapanese             Tag = Tag{language: jaIndex, locale: jaIndex}\n\tGeorgian             Tag = Tag{language: kaIndex, locale: kaIndex}\n\tKazakh               Tag = Tag{language: kkIndex, locale: kkIndex}\n\tKhmer                Tag = Tag{language: kmIndex, locale: kmIndex}\n\tKannada              Tag = Tag{language: knIndex, locale: knIndex}\n\tKorean               Tag = Tag{language: koIndex, locale: koIndex}\n\tKirghiz              Tag = Tag{language: kyIndex, locale: kyIndex}\n\tLao                  Tag = Tag{language: loIndex, locale: loIndex}\n\tLithuanian           Tag = Tag{language: ltIndex, locale: ltIndex}\n\tLatvian              Tag = Tag{language: lvIndex, locale: lvIndex}\n\tMacedonian           Tag = Tag{language: mkIndex, locale: mkIndex}\n\tMalayalam            Tag = Tag{language: mlIndex, locale: mlIndex}\n\tMongolian            Tag = Tag{language: mnIndex, locale: mnIndex}\n\tMarathi              Tag = Tag{language: mrIndex, locale: mrIndex}\n\tMalay                Tag = Tag{language: msIndex, locale: msIndex}\n\tBurmese              Tag = Tag{language: myIndex, locale: myIndex}\n\tNepali               Tag = Tag{language: neIndex, locale: neIndex}\n\tDutch                Tag = Tag{language: nlIndex, locale: nlIndex}\n\tNorwegian            Tag = Tag{language: noIndex, locale: noIndex}\n\tPunjabi              Tag = Tag{language: paIndex, locale: paIndex}\n\tPolish               Tag = Tag{language: plIndex, locale: plIndex}\n\tPortuguese           Tag = Tag{language: ptIndex, locale: ptIndex}\n\tBrazilianPortuguese  Tag = Tag{language: ptBRIndex, locale: ptBRIndex}\n\tEuropeanPortuguese   Tag = Tag{language: ptPTIndex, locale: ptPTIndex}\n\tRomanian             Tag = Tag{language: roIndex, locale: roIndex}\n\tRussian              Tag = Tag{language: ruIndex, locale: ruIndex}\n\tSinhala              Tag = Tag{language: siIndex, locale: siIndex}\n\tSlovak               Tag = Tag{language: skIndex, locale: skIndex}\n\tSlovenian            Tag = Tag{language: slIndex, locale: slIndex}\n\tAlbanian             Tag = Tag{language: sqIndex, locale: sqIndex}\n\tSerbian              Tag = Tag{language: srIndex, locale: srIndex}\n\tSerbianLatin         Tag = Tag{language: srLatnIndex, locale: srLatnIndex}\n\tSwedish              Tag = Tag{language: svIndex, locale: svIndex}\n\tSwahili              Tag = Tag{language: swIndex, locale: swIndex}\n\tTamil                Tag = Tag{language: taIndex, locale: taIndex}\n\tTelugu               Tag = Tag{language: teIndex, locale: teIndex}\n\tThai                 Tag = Tag{language: thIndex, locale: thIndex}\n\tTurkish              Tag = Tag{language: trIndex, locale: trIndex}\n\tUkrainian            Tag = Tag{language: ukIndex, locale: ukIndex}\n\tUrdu                 Tag = Tag{language: urIndex, locale: urIndex}\n\tUzbek                Tag = Tag{language: uzIndex, locale: uzIndex}\n\tVietnamese           Tag = Tag{language: viIndex, locale: viIndex}\n\tChinese              Tag = Tag{language: zhIndex, locale: zhIndex}\n\tSimplifiedChinese    Tag = Tag{language: zhHansIndex, locale: zhHansIndex}\n\tTraditionalChinese   Tag = Tag{language: zhHantIndex, locale: zhHantIndex}\n\tZulu                 Tag = Tag{language: zuIndex, locale: zuIndex}\n)\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compact.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\n// CompactCoreInfo is a compact integer with the three core tags encoded.\ntype CompactCoreInfo uint32\n\n// GetCompactCore generates a uint32 value that is guaranteed to be unique for\n// different language, region, and script values.\nfunc GetCompactCore(t Tag) (cci CompactCoreInfo, ok bool) {\n\tif t.LangID > langNoIndexOffset {\n\t\treturn 0, false\n\t}\n\tcci |= CompactCoreInfo(t.LangID) << (8 + 12)\n\tcci |= CompactCoreInfo(t.ScriptID) << 12\n\tcci |= CompactCoreInfo(t.RegionID)\n\treturn cci, true\n}\n\n// Tag generates a tag from c.\nfunc (c CompactCoreInfo) Tag() Tag {\n\treturn Tag{\n\t\tLangID:   Language(c >> 20),\n\t\tRegionID: Region(c & 0x3ff),\n\t\tScriptID: Script(c>>12) & 0xff,\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/compose.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"sort\"\n\t\"strings\"\n)\n\n// A Builder allows constructing a Tag from individual components.\n// Its main user is Compose in the top-level language package.\ntype Builder struct {\n\tTag Tag\n\n\tprivate    string // the x extension\n\tvariants   []string\n\textensions []string\n}\n\n// Make returns a new Tag from the current settings.\nfunc (b *Builder) Make() Tag {\n\tt := b.Tag\n\n\tif len(b.extensions) > 0 || len(b.variants) > 0 {\n\t\tsort.Sort(sortVariants(b.variants))\n\t\tsort.Strings(b.extensions)\n\n\t\tif b.private != \"\" {\n\t\t\tb.extensions = append(b.extensions, b.private)\n\t\t}\n\t\tn := maxCoreSize + tokenLen(b.variants...) + tokenLen(b.extensions...)\n\t\tbuf := make([]byte, n)\n\t\tp := t.genCoreBytes(buf)\n\t\tt.pVariant = byte(p)\n\t\tp += appendTokens(buf[p:], b.variants...)\n\t\tt.pExt = uint16(p)\n\t\tp += appendTokens(buf[p:], b.extensions...)\n\t\tt.str = string(buf[:p])\n\t\t// We may not always need to remake the string, but when or when not\n\t\t// to do so is rather tricky.\n\t\tscan := makeScanner(buf[:p])\n\t\tt, _ = parse(&scan, \"\")\n\t\treturn t\n\n\t} else if b.private != \"\" {\n\t\tt.str = b.private\n\t\tt.RemakeString()\n\t}\n\treturn t\n}\n\n// SetTag copies all the settings from a given Tag. Any previously set values\n// are discarded.\nfunc (b *Builder) SetTag(t Tag) {\n\tb.Tag.LangID = t.LangID\n\tb.Tag.RegionID = t.RegionID\n\tb.Tag.ScriptID = t.ScriptID\n\t// TODO: optimize\n\tb.variants = b.variants[:0]\n\tif variants := t.Variants(); variants != \"\" {\n\t\tfor _, vr := range strings.Split(variants[1:], \"-\") {\n\t\t\tb.variants = append(b.variants, vr)\n\t\t}\n\t}\n\tb.extensions, b.private = b.extensions[:0], \"\"\n\tfor _, e := range t.Extensions() {\n\t\tb.AddExt(e)\n\t}\n}\n\n// AddExt adds extension e to the tag. e must be a valid extension as returned\n// by Tag.Extension. If the extension already exists, it will be discarded,\n// except for a -u extension, where non-existing key-type pairs will added.\nfunc (b *Builder) AddExt(e string) {\n\tif e[0] == 'x' {\n\t\tif b.private == \"\" {\n\t\t\tb.private = e\n\t\t}\n\t\treturn\n\t}\n\tfor i, s := range b.extensions {\n\t\tif s[0] == e[0] {\n\t\t\tif e[0] == 'u' {\n\t\t\t\tb.extensions[i] += e[1:]\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\tb.extensions = append(b.extensions, e)\n}\n\n// SetExt sets the extension e to the tag. e must be a valid extension as\n// returned by Tag.Extension. If the extension already exists, it will be\n// overwritten, except for a -u extension, where the individual key-type pairs\n// will be set.\nfunc (b *Builder) SetExt(e string) {\n\tif e[0] == 'x' {\n\t\tb.private = e\n\t\treturn\n\t}\n\tfor i, s := range b.extensions {\n\t\tif s[0] == e[0] {\n\t\t\tif e[0] == 'u' {\n\t\t\t\tb.extensions[i] = e + s[1:]\n\t\t\t} else {\n\t\t\t\tb.extensions[i] = e\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\tb.extensions = append(b.extensions, e)\n}\n\n// AddVariant adds any number of variants.\nfunc (b *Builder) AddVariant(v ...string) {\n\tfor _, v := range v {\n\t\tif v != \"\" {\n\t\t\tb.variants = append(b.variants, v)\n\t\t}\n\t}\n}\n\n// ClearVariants removes any variants previously added, including those\n// copied from a Tag in SetTag.\nfunc (b *Builder) ClearVariants() {\n\tb.variants = b.variants[:0]\n}\n\n// ClearExtensions removes any extensions previously added, including those\n// copied from a Tag in SetTag.\nfunc (b *Builder) ClearExtensions() {\n\tb.private = \"\"\n\tb.extensions = b.extensions[:0]\n}\n\nfunc tokenLen(token ...string) (n int) {\n\tfor _, t := range token {\n\t\tn += len(t) + 1\n\t}\n\treturn\n}\n\nfunc appendTokens(b []byte, token ...string) int {\n\tp := 0\n\tfor _, t := range token {\n\t\tb[p] = '-'\n\t\tcopy(b[p+1:], t)\n\t\tp += 1 + len(t)\n\t}\n\treturn p\n}\n\ntype sortVariants []string\n\nfunc (s sortVariants) Len() int {\n\treturn len(s)\n}\n\nfunc (s sortVariants) Swap(i, j int) {\n\ts[j], s[i] = s[i], s[j]\n}\n\nfunc (s sortVariants) Less(i, j int) bool {\n\treturn variantIndex[s[i]] < variantIndex[s[j]]\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/coverage.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\n// BaseLanguages returns the list of all supported base languages. It generates\n// the list by traversing the internal structures.\nfunc BaseLanguages() []Language {\n\tbase := make([]Language, 0, NumLanguages)\n\tfor i := 0; i < langNoIndexOffset; i++ {\n\t\t// We included \"und\" already for the value 0.\n\t\tif i != nonCanonicalUnd {\n\t\t\tbase = append(base, Language(i))\n\t\t}\n\t}\n\ti := langNoIndexOffset\n\tfor _, v := range langNoIndex {\n\t\tfor k := 0; k < 8; k++ {\n\t\t\tif v&1 == 1 {\n\t\t\t\tbase = append(base, Language(i))\n\t\t\t}\n\t\t\tv >>= 1\n\t\t\ti++\n\t\t}\n\t}\n\treturn base\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/language.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go gen_common.go -output tables.go\n\npackage language // import \"golang.org/x/text/internal/language\"\n\n// TODO: Remove above NOTE after:\n// - verifying that tables are dropped correctly (most notably matcher tables).\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\nconst (\n\t// maxCoreSize is the maximum size of a BCP 47 tag without variants and\n\t// extensions. Equals max lang (3) + script (4) + max reg (3) + 2 dashes.\n\tmaxCoreSize = 12\n\n\t// max99thPercentileSize is a somewhat arbitrary buffer size that presumably\n\t// is large enough to hold at least 99% of the BCP 47 tags.\n\tmax99thPercentileSize = 32\n\n\t// maxSimpleUExtensionSize is the maximum size of a -u extension with one\n\t// key-type pair. Equals len(\"-u-\") + key (2) + dash + max value (8).\n\tmaxSimpleUExtensionSize = 14\n)\n\n// Tag represents a BCP 47 language tag. It is used to specify an instance of a\n// specific language or locale. All language tag values are guaranteed to be\n// well-formed. The zero value of Tag is Und.\ntype Tag struct {\n\t// TODO: the following fields have the form TagTypeID. This name is chosen\n\t// to allow refactoring the public package without conflicting with its\n\t// Base, Script, and Region methods. Once the transition is fully completed\n\t// the ID can be stripped from the name.\n\n\tLangID   Language\n\tRegionID Region\n\t// TODO: we will soon run out of positions for ScriptID. Idea: instead of\n\t// storing lang, region, and ScriptID codes, store only the compact index and\n\t// have a lookup table from this code to its expansion. This greatly speeds\n\t// up table lookup, speed up common variant cases.\n\t// This will also immediately free up 3 extra bytes. Also, the pVariant\n\t// field can now be moved to the lookup table, as the compact index uniquely\n\t// determines the offset of a possible variant.\n\tScriptID Script\n\tpVariant byte   // offset in str, includes preceding '-'\n\tpExt     uint16 // offset of first extension, includes preceding '-'\n\n\t// str is the string representation of the Tag. It will only be used if the\n\t// tag has variants or extensions.\n\tstr string\n}\n\n// Make is a convenience wrapper for Parse that omits the error.\n// In case of an error, a sensible default is returned.\nfunc Make(s string) Tag {\n\tt, _ := Parse(s)\n\treturn t\n}\n\n// Raw returns the raw base language, script and region, without making an\n// attempt to infer their values.\n// TODO: consider removing\nfunc (t Tag) Raw() (b Language, s Script, r Region) {\n\treturn t.LangID, t.ScriptID, t.RegionID\n}\n\n// equalTags compares language, script and region subtags only.\nfunc (t Tag) equalTags(a Tag) bool {\n\treturn t.LangID == a.LangID && t.ScriptID == a.ScriptID && t.RegionID == a.RegionID\n}\n\n// IsRoot returns true if t is equal to language \"und\".\nfunc (t Tag) IsRoot() bool {\n\tif int(t.pVariant) < len(t.str) {\n\t\treturn false\n\t}\n\treturn t.equalTags(Und)\n}\n\n// IsPrivateUse reports whether the Tag consists solely of an IsPrivateUse use\n// tag.\nfunc (t Tag) IsPrivateUse() bool {\n\treturn t.str != \"\" && t.pVariant == 0\n}\n\n// RemakeString is used to update t.str in case lang, script or region changed.\n// It is assumed that pExt and pVariant still point to the start of the\n// respective parts.\nfunc (t *Tag) RemakeString() {\n\tif t.str == \"\" {\n\t\treturn\n\t}\n\textra := t.str[t.pVariant:]\n\tif t.pVariant > 0 {\n\t\textra = extra[1:]\n\t}\n\tif t.equalTags(Und) && strings.HasPrefix(extra, \"x-\") {\n\t\tt.str = extra\n\t\tt.pVariant = 0\n\t\tt.pExt = 0\n\t\treturn\n\t}\n\tvar buf [max99thPercentileSize]byte // avoid extra memory allocation in most cases.\n\tb := buf[:t.genCoreBytes(buf[:])]\n\tif extra != \"\" {\n\t\tdiff := len(b) - int(t.pVariant)\n\t\tb = append(b, '-')\n\t\tb = append(b, extra...)\n\t\tt.pVariant = uint8(int(t.pVariant) + diff)\n\t\tt.pExt = uint16(int(t.pExt) + diff)\n\t} else {\n\t\tt.pVariant = uint8(len(b))\n\t\tt.pExt = uint16(len(b))\n\t}\n\tt.str = string(b)\n}\n\n// genCoreBytes writes a string for the base languages, script and region tags\n// to the given buffer and returns the number of bytes written. It will never\n// write more than maxCoreSize bytes.\nfunc (t *Tag) genCoreBytes(buf []byte) int {\n\tn := t.LangID.StringToBuf(buf[:])\n\tif t.ScriptID != 0 {\n\t\tn += copy(buf[n:], \"-\")\n\t\tn += copy(buf[n:], t.ScriptID.String())\n\t}\n\tif t.RegionID != 0 {\n\t\tn += copy(buf[n:], \"-\")\n\t\tn += copy(buf[n:], t.RegionID.String())\n\t}\n\treturn n\n}\n\n// String returns the canonical string representation of the language tag.\nfunc (t Tag) String() string {\n\tif t.str != \"\" {\n\t\treturn t.str\n\t}\n\tif t.ScriptID == 0 && t.RegionID == 0 {\n\t\treturn t.LangID.String()\n\t}\n\tbuf := [maxCoreSize]byte{}\n\treturn string(buf[:t.genCoreBytes(buf[:])])\n}\n\n// MarshalText implements encoding.TextMarshaler.\nfunc (t Tag) MarshalText() (text []byte, err error) {\n\tif t.str != \"\" {\n\t\ttext = append(text, t.str...)\n\t} else if t.ScriptID == 0 && t.RegionID == 0 {\n\t\ttext = append(text, t.LangID.String()...)\n\t} else {\n\t\tbuf := [maxCoreSize]byte{}\n\t\ttext = buf[:t.genCoreBytes(buf[:])]\n\t}\n\treturn text, nil\n}\n\n// UnmarshalText implements encoding.TextUnmarshaler.\nfunc (t *Tag) UnmarshalText(text []byte) error {\n\ttag, err := Parse(string(text))\n\t*t = tag\n\treturn err\n}\n\n// Variants returns the part of the tag holding all variants or the empty string\n// if there are no variants defined.\nfunc (t Tag) Variants() string {\n\tif t.pVariant == 0 {\n\t\treturn \"\"\n\t}\n\treturn t.str[t.pVariant:t.pExt]\n}\n\n// VariantOrPrivateUseTags returns variants or private use tags.\nfunc (t Tag) VariantOrPrivateUseTags() string {\n\tif t.pExt > 0 {\n\t\treturn t.str[t.pVariant:t.pExt]\n\t}\n\treturn t.str[t.pVariant:]\n}\n\n// HasString reports whether this tag defines more than just the raw\n// components.\nfunc (t Tag) HasString() bool {\n\treturn t.str != \"\"\n}\n\n// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a\n// specific language are substituted with fields from the parent language.\n// The parent for a language may change for newer versions of CLDR.\nfunc (t Tag) Parent() Tag {\n\tif t.str != \"\" {\n\t\t// Strip the variants and extensions.\n\t\tb, s, r := t.Raw()\n\t\tt = Tag{LangID: b, ScriptID: s, RegionID: r}\n\t\tif t.RegionID == 0 && t.ScriptID != 0 && t.LangID != 0 {\n\t\t\tbase, _ := addTags(Tag{LangID: t.LangID})\n\t\t\tif base.ScriptID == t.ScriptID {\n\t\t\t\treturn Tag{LangID: t.LangID}\n\t\t\t}\n\t\t}\n\t\treturn t\n\t}\n\tif t.LangID != 0 {\n\t\tif t.RegionID != 0 {\n\t\t\tmaxScript := t.ScriptID\n\t\t\tif maxScript == 0 {\n\t\t\t\tmax, _ := addTags(t)\n\t\t\t\tmaxScript = max.ScriptID\n\t\t\t}\n\n\t\t\tfor i := range parents {\n\t\t\t\tif Language(parents[i].lang) == t.LangID && Script(parents[i].maxScript) == maxScript {\n\t\t\t\t\tfor _, r := range parents[i].fromRegion {\n\t\t\t\t\t\tif Region(r) == t.RegionID {\n\t\t\t\t\t\t\treturn Tag{\n\t\t\t\t\t\t\t\tLangID:   t.LangID,\n\t\t\t\t\t\t\t\tScriptID: Script(parents[i].script),\n\t\t\t\t\t\t\t\tRegionID: Region(parents[i].toRegion),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Strip the script if it is the default one.\n\t\t\tbase, _ := addTags(Tag{LangID: t.LangID})\n\t\t\tif base.ScriptID != maxScript {\n\t\t\t\treturn Tag{LangID: t.LangID, ScriptID: maxScript}\n\t\t\t}\n\t\t\treturn Tag{LangID: t.LangID}\n\t\t} else if t.ScriptID != 0 {\n\t\t\t// The parent for an base-script pair with a non-default script is\n\t\t\t// \"und\" instead of the base language.\n\t\t\tbase, _ := addTags(Tag{LangID: t.LangID})\n\t\t\tif base.ScriptID != t.ScriptID {\n\t\t\t\treturn Und\n\t\t\t}\n\t\t\treturn Tag{LangID: t.LangID}\n\t\t}\n\t}\n\treturn Und\n}\n\n// ParseExtension parses s as an extension and returns it on success.\nfunc ParseExtension(s string) (ext string, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\text = \"\"\n\t\t\terr = ErrSyntax\n\t\t}\n\t}()\n\n\tscan := makeScannerString(s)\n\tvar end int\n\tif n := len(scan.token); n != 1 {\n\t\treturn \"\", ErrSyntax\n\t}\n\tscan.toLower(0, len(scan.b))\n\tend = parseExtension(&scan)\n\tif end != len(s) {\n\t\treturn \"\", ErrSyntax\n\t}\n\treturn string(scan.b), nil\n}\n\n// HasVariants reports whether t has variants.\nfunc (t Tag) HasVariants() bool {\n\treturn uint16(t.pVariant) < t.pExt\n}\n\n// HasExtensions reports whether t has extensions.\nfunc (t Tag) HasExtensions() bool {\n\treturn int(t.pExt) < len(t.str)\n}\n\n// Extension returns the extension of type x for tag t. It will return\n// false for ok if t does not have the requested extension. The returned\n// extension will be invalid in this case.\nfunc (t Tag) Extension(x byte) (ext string, ok bool) {\n\tfor i := int(t.pExt); i < len(t.str)-1; {\n\t\tvar ext string\n\t\ti, ext = getExtension(t.str, i)\n\t\tif ext[0] == x {\n\t\t\treturn ext, true\n\t\t}\n\t}\n\treturn \"\", false\n}\n\n// Extensions returns all extensions of t.\nfunc (t Tag) Extensions() []string {\n\te := []string{}\n\tfor i := int(t.pExt); i < len(t.str)-1; {\n\t\tvar ext string\n\t\ti, ext = getExtension(t.str, i)\n\t\te = append(e, ext)\n\t}\n\treturn e\n}\n\n// TypeForKey returns the type associated with the given key, where key and type\n// are of the allowed values defined for the Unicode locale extension ('u') in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// TypeForKey will traverse the inheritance chain to get the correct value.\n//\n// If there are multiple types associated with a key, only the first will be\n// returned. If there is no type associated with a key, it returns the empty\n// string.\nfunc (t Tag) TypeForKey(key string) string {\n\tif _, start, end, _ := t.findTypeForKey(key); end != start {\n\t\ts := t.str[start:end]\n\t\tif p := strings.IndexByte(s, '-'); p >= 0 {\n\t\t\ts = s[:p]\n\t\t}\n\t\treturn s\n\t}\n\treturn \"\"\n}\n\nvar (\n\terrPrivateUse       = errors.New(\"cannot set a key on a private use tag\")\n\terrInvalidArguments = errors.New(\"invalid key or type\")\n)\n\n// SetTypeForKey returns a new Tag with the key set to type, where key and type\n// are of the allowed values defined for the Unicode locale extension ('u') in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// An empty value removes an existing pair with the same key.\nfunc (t Tag) SetTypeForKey(key, value string) (Tag, error) {\n\tif t.IsPrivateUse() {\n\t\treturn t, errPrivateUse\n\t}\n\tif len(key) != 2 {\n\t\treturn t, errInvalidArguments\n\t}\n\n\t// Remove the setting if value is \"\".\n\tif value == \"\" {\n\t\tstart, sep, end, _ := t.findTypeForKey(key)\n\t\tif start != sep {\n\t\t\t// Remove a possible empty extension.\n\t\t\tswitch {\n\t\t\tcase t.str[start-2] != '-': // has previous elements.\n\t\t\tcase end == len(t.str), // end of string\n\t\t\t\tend+2 < len(t.str) && t.str[end+2] == '-': // end of extension\n\t\t\t\tstart -= 2\n\t\t\t}\n\t\t\tif start == int(t.pVariant) && end == len(t.str) {\n\t\t\t\tt.str = \"\"\n\t\t\t\tt.pVariant, t.pExt = 0, 0\n\t\t\t} else {\n\t\t\t\tt.str = fmt.Sprintf(\"%s%s\", t.str[:start], t.str[end:])\n\t\t\t}\n\t\t}\n\t\treturn t, nil\n\t}\n\n\tif len(value) < 3 || len(value) > 8 {\n\t\treturn t, errInvalidArguments\n\t}\n\n\tvar (\n\t\tbuf    [maxCoreSize + maxSimpleUExtensionSize]byte\n\t\tuStart int // start of the -u extension.\n\t)\n\n\t// Generate the tag string if needed.\n\tif t.str == \"\" {\n\t\tuStart = t.genCoreBytes(buf[:])\n\t\tbuf[uStart] = '-'\n\t\tuStart++\n\t}\n\n\t// Create new key-type pair and parse it to verify.\n\tb := buf[uStart:]\n\tcopy(b, \"u-\")\n\tcopy(b[2:], key)\n\tb[4] = '-'\n\tb = b[:5+copy(b[5:], value)]\n\tscan := makeScanner(b)\n\tif parseExtensions(&scan); scan.err != nil {\n\t\treturn t, scan.err\n\t}\n\n\t// Assemble the replacement string.\n\tif t.str == \"\" {\n\t\tt.pVariant, t.pExt = byte(uStart-1), uint16(uStart-1)\n\t\tt.str = string(buf[:uStart+len(b)])\n\t} else {\n\t\ts := t.str\n\t\tstart, sep, end, hasExt := t.findTypeForKey(key)\n\t\tif start == sep {\n\t\t\tif hasExt {\n\t\t\t\tb = b[2:]\n\t\t\t}\n\t\t\tt.str = fmt.Sprintf(\"%s-%s%s\", s[:sep], b, s[end:])\n\t\t} else {\n\t\t\tt.str = fmt.Sprintf(\"%s-%s%s\", s[:start+3], value, s[end:])\n\t\t}\n\t}\n\treturn t, nil\n}\n\n// findTypeForKey returns the start and end position for the type corresponding\n// to key or the point at which to insert the key-value pair if the type\n// wasn't found. The hasExt return value reports whether an -u extension was present.\n// Note: the extensions are typically very small and are likely to contain\n// only one key-type pair.\nfunc (t Tag) findTypeForKey(key string) (start, sep, end int, hasExt bool) {\n\tp := int(t.pExt)\n\tif len(key) != 2 || p == len(t.str) || p == 0 {\n\t\treturn p, p, p, false\n\t}\n\ts := t.str\n\n\t// Find the correct extension.\n\tfor p++; s[p] != 'u'; p++ {\n\t\tif s[p] > 'u' {\n\t\t\tp--\n\t\t\treturn p, p, p, false\n\t\t}\n\t\tif p = nextExtension(s, p); p == len(s) {\n\t\t\treturn len(s), len(s), len(s), false\n\t\t}\n\t}\n\t// Proceed to the hyphen following the extension name.\n\tp++\n\n\t// curKey is the key currently being processed.\n\tcurKey := \"\"\n\n\t// Iterate over keys until we get the end of a section.\n\tfor {\n\t\tend = p\n\t\tfor p++; p < len(s) && s[p] != '-'; p++ {\n\t\t}\n\t\tn := p - end - 1\n\t\tif n <= 2 && curKey == key {\n\t\t\tif sep < end {\n\t\t\t\tsep++\n\t\t\t}\n\t\t\treturn start, sep, end, true\n\t\t}\n\t\tswitch n {\n\t\tcase 0, // invalid string\n\t\t\t1: // next extension\n\t\t\treturn end, end, end, true\n\t\tcase 2:\n\t\t\t// next key\n\t\t\tcurKey = s[end+1 : p]\n\t\t\tif curKey > key {\n\t\t\t\treturn end, end, end, true\n\t\t\t}\n\t\t\tstart = end\n\t\t\tsep = p\n\t\t}\n\t}\n}\n\n// ParseBase parses a 2- or 3-letter ISO 639 code.\n// It returns a ValueError if s is a well-formed but unknown language identifier\n// or another error if another error occurred.\nfunc ParseBase(s string) (l Language, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tl = 0\n\t\t\terr = ErrSyntax\n\t\t}\n\t}()\n\n\tif n := len(s); n < 2 || 3 < n {\n\t\treturn 0, ErrSyntax\n\t}\n\tvar buf [3]byte\n\treturn getLangID(buf[:copy(buf[:], s)])\n}\n\n// ParseScript parses a 4-letter ISO 15924 code.\n// It returns a ValueError if s is a well-formed but unknown script identifier\n// or another error if another error occurred.\nfunc ParseScript(s string) (scr Script, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tscr = 0\n\t\t\terr = ErrSyntax\n\t\t}\n\t}()\n\n\tif len(s) != 4 {\n\t\treturn 0, ErrSyntax\n\t}\n\tvar buf [4]byte\n\treturn getScriptID(script, buf[:copy(buf[:], s)])\n}\n\n// EncodeM49 returns the Region for the given UN M.49 code.\n// It returns an error if r is not a valid code.\nfunc EncodeM49(r int) (Region, error) {\n\treturn getRegionM49(r)\n}\n\n// ParseRegion parses a 2- or 3-letter ISO 3166-1 or a UN M.49 code.\n// It returns a ValueError if s is a well-formed but unknown region identifier\n// or another error if another error occurred.\nfunc ParseRegion(s string) (r Region, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tr = 0\n\t\t\terr = ErrSyntax\n\t\t}\n\t}()\n\n\tif n := len(s); n < 2 || 3 < n {\n\t\treturn 0, ErrSyntax\n\t}\n\tvar buf [3]byte\n\treturn getRegionID(buf[:copy(buf[:], s)])\n}\n\n// IsCountry returns whether this region is a country or autonomous area. This\n// includes non-standard definitions from CLDR.\nfunc (r Region) IsCountry() bool {\n\tif r == 0 || r.IsGroup() || r.IsPrivateUse() && r != _XK {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// IsGroup returns whether this region defines a collection of regions. This\n// includes non-standard definitions from CLDR.\nfunc (r Region) IsGroup() bool {\n\tif r == 0 {\n\t\treturn false\n\t}\n\treturn int(regionInclusion[r]) < len(regionContainment)\n}\n\n// Contains returns whether Region c is contained by Region r. It returns true\n// if c == r.\nfunc (r Region) Contains(c Region) bool {\n\tif r == c {\n\t\treturn true\n\t}\n\tg := regionInclusion[r]\n\tif g >= nRegionGroups {\n\t\treturn false\n\t}\n\tm := regionContainment[g]\n\n\td := regionInclusion[c]\n\tb := regionInclusionBits[d]\n\n\t// A contained country may belong to multiple disjoint groups. Matching any\n\t// of these indicates containment. If the contained region is a group, it\n\t// must strictly be a subset.\n\tif d >= nRegionGroups {\n\t\treturn b&m != 0\n\t}\n\treturn b&^m == 0\n}\n\nvar errNoTLD = errors.New(\"language: region is not a valid ccTLD\")\n\n// TLD returns the country code top-level domain (ccTLD). UK is returned for GB.\n// In all other cases it returns either the region itself or an error.\n//\n// This method may return an error for a region for which there exists a\n// canonical form with a ccTLD. To get that ccTLD canonicalize r first. The\n// region will already be canonicalized it was obtained from a Tag that was\n// obtained using any of the default methods.\nfunc (r Region) TLD() (Region, error) {\n\t// See http://en.wikipedia.org/wiki/Country_code_top-level_domain for the\n\t// difference between ISO 3166-1 and IANA ccTLD.\n\tif r == _GB {\n\t\tr = _UK\n\t}\n\tif (r.typ() & ccTLD) == 0 {\n\t\treturn 0, errNoTLD\n\t}\n\treturn r, nil\n}\n\n// Canonicalize returns the region or a possible replacement if the region is\n// deprecated. It will not return a replacement for deprecated regions that\n// are split into multiple regions.\nfunc (r Region) Canonicalize() Region {\n\tif cr := normRegion(r); cr != 0 {\n\t\treturn cr\n\t}\n\treturn r\n}\n\n// Variant represents a registered variant of a language as defined by BCP 47.\ntype Variant struct {\n\tID  uint8\n\tstr string\n}\n\n// ParseVariant parses and returns a Variant. An error is returned if s is not\n// a valid variant.\nfunc ParseVariant(s string) (v Variant, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tv = Variant{}\n\t\t\terr = ErrSyntax\n\t\t}\n\t}()\n\n\ts = strings.ToLower(s)\n\tif id, ok := variantIndex[s]; ok {\n\t\treturn Variant{id, s}, nil\n\t}\n\treturn Variant{}, NewValueError([]byte(s))\n}\n\n// String returns the string representation of the variant.\nfunc (v Variant) String() string {\n\treturn v.str\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/lookup.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strconv\"\n\n\t\"golang.org/x/text/internal/tag\"\n)\n\n// findIndex tries to find the given tag in idx and returns a standardized error\n// if it could not be found.\nfunc findIndex(idx tag.Index, key []byte, form string) (index int, err error) {\n\tif !tag.FixCase(form, key) {\n\t\treturn 0, ErrSyntax\n\t}\n\ti := idx.Index(key)\n\tif i == -1 {\n\t\treturn 0, NewValueError(key)\n\t}\n\treturn i, nil\n}\n\nfunc searchUint(imap []uint16, key uint16) int {\n\treturn sort.Search(len(imap), func(i int) bool {\n\t\treturn imap[i] >= key\n\t})\n}\n\ntype Language uint16\n\n// getLangID returns the langID of s if s is a canonical subtag\n// or langUnknown if s is not a canonical subtag.\nfunc getLangID(s []byte) (Language, error) {\n\tif len(s) == 2 {\n\t\treturn getLangISO2(s)\n\t}\n\treturn getLangISO3(s)\n}\n\n// TODO language normalization as well as the AliasMaps could be moved to the\n// higher level package, but it is a bit tricky to separate the generation.\n\nfunc (id Language) Canonicalize() (Language, AliasType) {\n\treturn normLang(id)\n}\n\n// normLang returns the mapped langID of id according to mapping m.\nfunc normLang(id Language) (Language, AliasType) {\n\tk := sort.Search(len(AliasMap), func(i int) bool {\n\t\treturn AliasMap[i].From >= uint16(id)\n\t})\n\tif k < len(AliasMap) && AliasMap[k].From == uint16(id) {\n\t\treturn Language(AliasMap[k].To), AliasTypes[k]\n\t}\n\treturn id, AliasTypeUnknown\n}\n\n// getLangISO2 returns the langID for the given 2-letter ISO language code\n// or unknownLang if this does not exist.\nfunc getLangISO2(s []byte) (Language, error) {\n\tif !tag.FixCase(\"zz\", s) {\n\t\treturn 0, ErrSyntax\n\t}\n\tif i := lang.Index(s); i != -1 && lang.Elem(i)[3] != 0 {\n\t\treturn Language(i), nil\n\t}\n\treturn 0, NewValueError(s)\n}\n\nconst base = 'z' - 'a' + 1\n\nfunc strToInt(s []byte) uint {\n\tv := uint(0)\n\tfor i := 0; i < len(s); i++ {\n\t\tv *= base\n\t\tv += uint(s[i] - 'a')\n\t}\n\treturn v\n}\n\n// converts the given integer to the original ASCII string passed to strToInt.\n// len(s) must match the number of characters obtained.\nfunc intToStr(v uint, s []byte) {\n\tfor i := len(s) - 1; i >= 0; i-- {\n\t\ts[i] = byte(v%base) + 'a'\n\t\tv /= base\n\t}\n}\n\n// getLangISO3 returns the langID for the given 3-letter ISO language code\n// or unknownLang if this does not exist.\nfunc getLangISO3(s []byte) (Language, error) {\n\tif tag.FixCase(\"und\", s) {\n\t\t// first try to match canonical 3-letter entries\n\t\tfor i := lang.Index(s[:2]); i != -1; i = lang.Next(s[:2], i) {\n\t\t\tif e := lang.Elem(i); e[3] == 0 && e[2] == s[2] {\n\t\t\t\t// We treat \"und\" as special and always translate it to \"unspecified\".\n\t\t\t\t// Note that ZZ and Zzzz are private use and are not treated as\n\t\t\t\t// unspecified by default.\n\t\t\t\tid := Language(i)\n\t\t\t\tif id == nonCanonicalUnd {\n\t\t\t\t\treturn 0, nil\n\t\t\t\t}\n\t\t\t\treturn id, nil\n\t\t\t}\n\t\t}\n\t\tif i := altLangISO3.Index(s); i != -1 {\n\t\t\treturn Language(altLangIndex[altLangISO3.Elem(i)[3]]), nil\n\t\t}\n\t\tn := strToInt(s)\n\t\tif langNoIndex[n/8]&(1<<(n%8)) != 0 {\n\t\t\treturn Language(n) + langNoIndexOffset, nil\n\t\t}\n\t\t// Check for non-canonical uses of ISO3.\n\t\tfor i := lang.Index(s[:1]); i != -1; i = lang.Next(s[:1], i) {\n\t\t\tif e := lang.Elem(i); e[2] == s[1] && e[3] == s[2] {\n\t\t\t\treturn Language(i), nil\n\t\t\t}\n\t\t}\n\t\treturn 0, NewValueError(s)\n\t}\n\treturn 0, ErrSyntax\n}\n\n// StringToBuf writes the string to b and returns the number of bytes\n// written.  cap(b) must be >= 3.\nfunc (id Language) StringToBuf(b []byte) int {\n\tif id >= langNoIndexOffset {\n\t\tintToStr(uint(id)-langNoIndexOffset, b[:3])\n\t\treturn 3\n\t} else if id == 0 {\n\t\treturn copy(b, \"und\")\n\t}\n\tl := lang[id<<2:]\n\tif l[3] == 0 {\n\t\treturn copy(b, l[:3])\n\t}\n\treturn copy(b, l[:2])\n}\n\n// String returns the BCP 47 representation of the langID.\n// Use b as variable name, instead of id, to ensure the variable\n// used is consistent with that of Base in which this type is embedded.\nfunc (b Language) String() string {\n\tif b == 0 {\n\t\treturn \"und\"\n\t} else if b >= langNoIndexOffset {\n\t\tb -= langNoIndexOffset\n\t\tbuf := [3]byte{}\n\t\tintToStr(uint(b), buf[:])\n\t\treturn string(buf[:])\n\t}\n\tl := lang.Elem(int(b))\n\tif l[3] == 0 {\n\t\treturn l[:3]\n\t}\n\treturn l[:2]\n}\n\n// ISO3 returns the ISO 639-3 language code.\nfunc (b Language) ISO3() string {\n\tif b == 0 || b >= langNoIndexOffset {\n\t\treturn b.String()\n\t}\n\tl := lang.Elem(int(b))\n\tif l[3] == 0 {\n\t\treturn l[:3]\n\t} else if l[2] == 0 {\n\t\treturn altLangISO3.Elem(int(l[3]))[:3]\n\t}\n\t// This allocation will only happen for 3-letter ISO codes\n\t// that are non-canonical BCP 47 language identifiers.\n\treturn l[0:1] + l[2:4]\n}\n\n// IsPrivateUse reports whether this language code is reserved for private use.\nfunc (b Language) IsPrivateUse() bool {\n\treturn langPrivateStart <= b && b <= langPrivateEnd\n}\n\n// SuppressScript returns the script marked as SuppressScript in the IANA\n// language tag repository, or 0 if there is no such script.\nfunc (b Language) SuppressScript() Script {\n\tif b < langNoIndexOffset {\n\t\treturn Script(suppressScript[b])\n\t}\n\treturn 0\n}\n\ntype Region uint16\n\n// getRegionID returns the region id for s if s is a valid 2-letter region code\n// or unknownRegion.\nfunc getRegionID(s []byte) (Region, error) {\n\tif len(s) == 3 {\n\t\tif isAlpha(s[0]) {\n\t\t\treturn getRegionISO3(s)\n\t\t}\n\t\tif i, err := strconv.ParseUint(string(s), 10, 10); err == nil {\n\t\t\treturn getRegionM49(int(i))\n\t\t}\n\t}\n\treturn getRegionISO2(s)\n}\n\n// getRegionISO2 returns the regionID for the given 2-letter ISO country code\n// or unknownRegion if this does not exist.\nfunc getRegionISO2(s []byte) (Region, error) {\n\ti, err := findIndex(regionISO, s, \"ZZ\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn Region(i) + isoRegionOffset, nil\n}\n\n// getRegionISO3 returns the regionID for the given 3-letter ISO country code\n// or unknownRegion if this does not exist.\nfunc getRegionISO3(s []byte) (Region, error) {\n\tif tag.FixCase(\"ZZZ\", s) {\n\t\tfor i := regionISO.Index(s[:1]); i != -1; i = regionISO.Next(s[:1], i) {\n\t\t\tif e := regionISO.Elem(i); e[2] == s[1] && e[3] == s[2] {\n\t\t\t\treturn Region(i) + isoRegionOffset, nil\n\t\t\t}\n\t\t}\n\t\tfor i := 0; i < len(altRegionISO3); i += 3 {\n\t\t\tif tag.Compare(altRegionISO3[i:i+3], s) == 0 {\n\t\t\t\treturn Region(altRegionIDs[i/3]), nil\n\t\t\t}\n\t\t}\n\t\treturn 0, NewValueError(s)\n\t}\n\treturn 0, ErrSyntax\n}\n\nfunc getRegionM49(n int) (Region, error) {\n\tif 0 < n && n <= 999 {\n\t\tconst (\n\t\t\tsearchBits = 7\n\t\t\tregionBits = 9\n\t\t\tregionMask = 1<<regionBits - 1\n\t\t)\n\t\tidx := n >> searchBits\n\t\tbuf := fromM49[m49Index[idx]:m49Index[idx+1]]\n\t\tval := uint16(n) << regionBits // we rely on bits shifting out\n\t\ti := sort.Search(len(buf), func(i int) bool {\n\t\t\treturn buf[i] >= val\n\t\t})\n\t\tif r := fromM49[int(m49Index[idx])+i]; r&^regionMask == val {\n\t\t\treturn Region(r & regionMask), nil\n\t\t}\n\t}\n\tvar e ValueError\n\tfmt.Fprint(bytes.NewBuffer([]byte(e.v[:])), n)\n\treturn 0, e\n}\n\n// normRegion returns a region if r is deprecated or 0 otherwise.\n// TODO: consider supporting BYS (-> BLR), CSK (-> 200 or CZ), PHI (-> PHL) and AFI (-> DJ).\n// TODO: consider mapping split up regions to new most populous one (like CLDR).\nfunc normRegion(r Region) Region {\n\tm := regionOldMap\n\tk := sort.Search(len(m), func(i int) bool {\n\t\treturn m[i].From >= uint16(r)\n\t})\n\tif k < len(m) && m[k].From == uint16(r) {\n\t\treturn Region(m[k].To)\n\t}\n\treturn 0\n}\n\nconst (\n\tiso3166UserAssigned = 1 << iota\n\tccTLD\n\tbcp47Region\n)\n\nfunc (r Region) typ() byte {\n\treturn regionTypes[r]\n}\n\n// String returns the BCP 47 representation for the region.\n// It returns \"ZZ\" for an unspecified region.\nfunc (r Region) String() string {\n\tif r < isoRegionOffset {\n\t\tif r == 0 {\n\t\t\treturn \"ZZ\"\n\t\t}\n\t\treturn fmt.Sprintf(\"%03d\", r.M49())\n\t}\n\tr -= isoRegionOffset\n\treturn regionISO.Elem(int(r))[:2]\n}\n\n// ISO3 returns the 3-letter ISO code of r.\n// Note that not all regions have a 3-letter ISO code.\n// In such cases this method returns \"ZZZ\".\nfunc (r Region) ISO3() string {\n\tif r < isoRegionOffset {\n\t\treturn \"ZZZ\"\n\t}\n\tr -= isoRegionOffset\n\treg := regionISO.Elem(int(r))\n\tswitch reg[2] {\n\tcase 0:\n\t\treturn altRegionISO3[reg[3]:][:3]\n\tcase ' ':\n\t\treturn \"ZZZ\"\n\t}\n\treturn reg[0:1] + reg[2:4]\n}\n\n// M49 returns the UN M.49 encoding of r, or 0 if this encoding\n// is not defined for r.\nfunc (r Region) M49() int {\n\treturn int(m49[r])\n}\n\n// IsPrivateUse reports whether r has the ISO 3166 User-assigned status. This\n// may include private-use tags that are assigned by CLDR and used in this\n// implementation. So IsPrivateUse and IsCountry can be simultaneously true.\nfunc (r Region) IsPrivateUse() bool {\n\treturn r.typ()&iso3166UserAssigned != 0\n}\n\ntype Script uint16\n\n// getScriptID returns the script id for string s. It assumes that s\n// is of the format [A-Z][a-z]{3}.\nfunc getScriptID(idx tag.Index, s []byte) (Script, error) {\n\ti, err := findIndex(idx, s, \"Zzzz\")\n\treturn Script(i), err\n}\n\n// String returns the script code in title case.\n// It returns \"Zzzz\" for an unspecified script.\nfunc (s Script) String() string {\n\tif s == 0 {\n\t\treturn \"Zzzz\"\n\t}\n\treturn script.Elem(int(s))\n}\n\n// IsPrivateUse reports whether this script code is reserved for private use.\nfunc (s Script) IsPrivateUse() bool {\n\treturn _Qaaa <= s && s <= _Qabx\n}\n\nconst (\n\tmaxAltTaglen = len(\"en-US-POSIX\")\n\tmaxLen       = maxAltTaglen\n)\n\nvar (\n\t// grandfatheredMap holds a mapping from legacy and grandfathered tags to\n\t// their base language or index to more elaborate tag.\n\tgrandfatheredMap = map[[maxLen]byte]int16{\n\t\t[maxLen]byte{'a', 'r', 't', '-', 'l', 'o', 'j', 'b', 'a', 'n'}: _jbo, // art-lojban\n\t\t[maxLen]byte{'i', '-', 'a', 'm', 'i'}:                          _ami, // i-ami\n\t\t[maxLen]byte{'i', '-', 'b', 'n', 'n'}:                          _bnn, // i-bnn\n\t\t[maxLen]byte{'i', '-', 'h', 'a', 'k'}:                          _hak, // i-hak\n\t\t[maxLen]byte{'i', '-', 'k', 'l', 'i', 'n', 'g', 'o', 'n'}:      _tlh, // i-klingon\n\t\t[maxLen]byte{'i', '-', 'l', 'u', 'x'}:                          _lb,  // i-lux\n\t\t[maxLen]byte{'i', '-', 'n', 'a', 'v', 'a', 'j', 'o'}:           _nv,  // i-navajo\n\t\t[maxLen]byte{'i', '-', 'p', 'w', 'n'}:                          _pwn, // i-pwn\n\t\t[maxLen]byte{'i', '-', 't', 'a', 'o'}:                          _tao, // i-tao\n\t\t[maxLen]byte{'i', '-', 't', 'a', 'y'}:                          _tay, // i-tay\n\t\t[maxLen]byte{'i', '-', 't', 's', 'u'}:                          _tsu, // i-tsu\n\t\t[maxLen]byte{'n', 'o', '-', 'b', 'o', 'k'}:                     _nb,  // no-bok\n\t\t[maxLen]byte{'n', 'o', '-', 'n', 'y', 'n'}:                     _nn,  // no-nyn\n\t\t[maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'f', 'r'}:      _sfb, // sgn-BE-FR\n\t\t[maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'n', 'l'}:      _vgt, // sgn-BE-NL\n\t\t[maxLen]byte{'s', 'g', 'n', '-', 'c', 'h', '-', 'd', 'e'}:      _sgg, // sgn-CH-DE\n\t\t[maxLen]byte{'z', 'h', '-', 'g', 'u', 'o', 'y', 'u'}:           _cmn, // zh-guoyu\n\t\t[maxLen]byte{'z', 'h', '-', 'h', 'a', 'k', 'k', 'a'}:           _hak, // zh-hakka\n\t\t[maxLen]byte{'z', 'h', '-', 'm', 'i', 'n', '-', 'n', 'a', 'n'}: _nan, // zh-min-nan\n\t\t[maxLen]byte{'z', 'h', '-', 'x', 'i', 'a', 'n', 'g'}:           _hsn, // zh-xiang\n\n\t\t// Grandfathered tags with no modern replacement will be converted as\n\t\t// follows:\n\t\t[maxLen]byte{'c', 'e', 'l', '-', 'g', 'a', 'u', 'l', 'i', 's', 'h'}: -1, // cel-gaulish\n\t\t[maxLen]byte{'e', 'n', '-', 'g', 'b', '-', 'o', 'e', 'd'}:           -2, // en-GB-oed\n\t\t[maxLen]byte{'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}:           -3, // i-default\n\t\t[maxLen]byte{'i', '-', 'e', 'n', 'o', 'c', 'h', 'i', 'a', 'n'}:      -4, // i-enochian\n\t\t[maxLen]byte{'i', '-', 'm', 'i', 'n', 'g', 'o'}:                     -5, // i-mingo\n\t\t[maxLen]byte{'z', 'h', '-', 'm', 'i', 'n'}:                          -6, // zh-min\n\n\t\t// CLDR-specific tag.\n\t\t[maxLen]byte{'r', 'o', 'o', 't'}:                                    0,  // root\n\t\t[maxLen]byte{'e', 'n', '-', 'u', 's', '-', 'p', 'o', 's', 'i', 'x'}: -7, // en_US_POSIX\"\n\t}\n\n\taltTagIndex = [...]uint8{0, 17, 31, 45, 61, 74, 86, 102}\n\n\taltTags = \"xtg-x-cel-gaulishen-GB-oxendicten-x-i-defaultund-x-i-enochiansee-x-i-mingonan-x-zh-minen-US-u-va-posix\"\n)\n\nfunc grandfathered(s [maxAltTaglen]byte) (t Tag, ok bool) {\n\tif v, ok := grandfatheredMap[s]; ok {\n\t\tif v < 0 {\n\t\t\treturn Make(altTags[altTagIndex[-v-1]:altTagIndex[-v]]), true\n\t\t}\n\t\tt.LangID = Language(v)\n\t\treturn t, true\n\t}\n\treturn t, false\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/match.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport \"errors\"\n\ntype scriptRegionFlags uint8\n\nconst (\n\tisList = 1 << iota\n\tscriptInFrom\n\tregionInFrom\n)\n\nfunc (t *Tag) setUndefinedLang(id Language) {\n\tif t.LangID == 0 {\n\t\tt.LangID = id\n\t}\n}\n\nfunc (t *Tag) setUndefinedScript(id Script) {\n\tif t.ScriptID == 0 {\n\t\tt.ScriptID = id\n\t}\n}\n\nfunc (t *Tag) setUndefinedRegion(id Region) {\n\tif t.RegionID == 0 || t.RegionID.Contains(id) {\n\t\tt.RegionID = id\n\t}\n}\n\n// ErrMissingLikelyTagsData indicates no information was available\n// to compute likely values of missing tags.\nvar ErrMissingLikelyTagsData = errors.New(\"missing likely tags data\")\n\n// addLikelySubtags sets subtags to their most likely value, given the locale.\n// In most cases this means setting fields for unknown values, but in some\n// cases it may alter a value.  It returns an ErrMissingLikelyTagsData error\n// if the given locale cannot be expanded.\nfunc (t Tag) addLikelySubtags() (Tag, error) {\n\tid, err := addTags(t)\n\tif err != nil {\n\t\treturn t, err\n\t} else if id.equalTags(t) {\n\t\treturn t, nil\n\t}\n\tid.RemakeString()\n\treturn id, nil\n}\n\n// specializeRegion attempts to specialize a group region.\nfunc specializeRegion(t *Tag) bool {\n\tif i := regionInclusion[t.RegionID]; i < nRegionGroups {\n\t\tx := likelyRegionGroup[i]\n\t\tif Language(x.lang) == t.LangID && Script(x.script) == t.ScriptID {\n\t\t\tt.RegionID = Region(x.region)\n\t\t}\n\t\treturn true\n\t}\n\treturn false\n}\n\n// Maximize returns a new tag with missing tags filled in.\nfunc (t Tag) Maximize() (Tag, error) {\n\treturn addTags(t)\n}\n\nfunc addTags(t Tag) (Tag, error) {\n\t// We leave private use identifiers alone.\n\tif t.IsPrivateUse() {\n\t\treturn t, nil\n\t}\n\tif t.ScriptID != 0 && t.RegionID != 0 {\n\t\tif t.LangID != 0 {\n\t\t\t// already fully specified\n\t\t\tspecializeRegion(&t)\n\t\t\treturn t, nil\n\t\t}\n\t\t// Search matches for und-script-region. Note that for these cases\n\t\t// region will never be a group so there is no need to check for this.\n\t\tlist := likelyRegion[t.RegionID : t.RegionID+1]\n\t\tif x := list[0]; x.flags&isList != 0 {\n\t\t\tlist = likelyRegionList[x.lang : x.lang+uint16(x.script)]\n\t\t}\n\t\tfor _, x := range list {\n\t\t\t// Deviating from the spec. See match_test.go for details.\n\t\t\tif Script(x.script) == t.ScriptID {\n\t\t\t\tt.setUndefinedLang(Language(x.lang))\n\t\t\t\treturn t, nil\n\t\t\t}\n\t\t}\n\t}\n\tif t.LangID != 0 {\n\t\t// Search matches for lang-script and lang-region, where lang != und.\n\t\tif t.LangID < langNoIndexOffset {\n\t\t\tx := likelyLang[t.LangID]\n\t\t\tif x.flags&isList != 0 {\n\t\t\t\tlist := likelyLangList[x.region : x.region+uint16(x.script)]\n\t\t\t\tif t.ScriptID != 0 {\n\t\t\t\t\tfor _, x := range list {\n\t\t\t\t\t\tif Script(x.script) == t.ScriptID && x.flags&scriptInFrom != 0 {\n\t\t\t\t\t\t\tt.setUndefinedRegion(Region(x.region))\n\t\t\t\t\t\t\treturn t, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if t.RegionID != 0 {\n\t\t\t\t\tcount := 0\n\t\t\t\t\tgoodScript := true\n\t\t\t\t\ttt := t\n\t\t\t\t\tfor _, x := range list {\n\t\t\t\t\t\t// We visit all entries for which the script was not\n\t\t\t\t\t\t// defined, including the ones where the region was not\n\t\t\t\t\t\t// defined. This allows for proper disambiguation within\n\t\t\t\t\t\t// regions.\n\t\t\t\t\t\tif x.flags&scriptInFrom == 0 && t.RegionID.Contains(Region(x.region)) {\n\t\t\t\t\t\t\ttt.RegionID = Region(x.region)\n\t\t\t\t\t\t\ttt.setUndefinedScript(Script(x.script))\n\t\t\t\t\t\t\tgoodScript = goodScript && tt.ScriptID == Script(x.script)\n\t\t\t\t\t\t\tcount++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif count == 1 {\n\t\t\t\t\t\treturn tt, nil\n\t\t\t\t\t}\n\t\t\t\t\t// Even if we fail to find a unique Region, we might have\n\t\t\t\t\t// an unambiguous script.\n\t\t\t\t\tif goodScript {\n\t\t\t\t\t\tt.ScriptID = tt.ScriptID\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Search matches for und-script.\n\t\tif t.ScriptID != 0 {\n\t\t\tx := likelyScript[t.ScriptID]\n\t\t\tif x.region != 0 {\n\t\t\t\tt.setUndefinedRegion(Region(x.region))\n\t\t\t\tt.setUndefinedLang(Language(x.lang))\n\t\t\t\treturn t, nil\n\t\t\t}\n\t\t}\n\t\t// Search matches for und-region. If und-script-region exists, it would\n\t\t// have been found earlier.\n\t\tif t.RegionID != 0 {\n\t\t\tif i := regionInclusion[t.RegionID]; i < nRegionGroups {\n\t\t\t\tx := likelyRegionGroup[i]\n\t\t\t\tif x.region != 0 {\n\t\t\t\t\tt.setUndefinedLang(Language(x.lang))\n\t\t\t\t\tt.setUndefinedScript(Script(x.script))\n\t\t\t\t\tt.RegionID = Region(x.region)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tx := likelyRegion[t.RegionID]\n\t\t\t\tif x.flags&isList != 0 {\n\t\t\t\t\tx = likelyRegionList[x.lang]\n\t\t\t\t}\n\t\t\t\tif x.script != 0 && x.flags != scriptInFrom {\n\t\t\t\t\tt.setUndefinedLang(Language(x.lang))\n\t\t\t\t\tt.setUndefinedScript(Script(x.script))\n\t\t\t\t\treturn t, nil\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Search matches for lang.\n\tif t.LangID < langNoIndexOffset {\n\t\tx := likelyLang[t.LangID]\n\t\tif x.flags&isList != 0 {\n\t\t\tx = likelyLangList[x.region]\n\t\t}\n\t\tif x.region != 0 {\n\t\t\tt.setUndefinedScript(Script(x.script))\n\t\t\tt.setUndefinedRegion(Region(x.region))\n\t\t}\n\t\tspecializeRegion(&t)\n\t\tif t.LangID == 0 {\n\t\t\tt.LangID = _en // default language\n\t\t}\n\t\treturn t, nil\n\t}\n\treturn t, ErrMissingLikelyTagsData\n}\n\nfunc (t *Tag) setTagsFrom(id Tag) {\n\tt.LangID = id.LangID\n\tt.ScriptID = id.ScriptID\n\tt.RegionID = id.RegionID\n}\n\n// minimize removes the region or script subtags from t such that\n// t.addLikelySubtags() == t.minimize().addLikelySubtags().\nfunc (t Tag) minimize() (Tag, error) {\n\tt, err := minimizeTags(t)\n\tif err != nil {\n\t\treturn t, err\n\t}\n\tt.RemakeString()\n\treturn t, nil\n}\n\n// minimizeTags mimics the behavior of the ICU 51 C implementation.\nfunc minimizeTags(t Tag) (Tag, error) {\n\tif t.equalTags(Und) {\n\t\treturn t, nil\n\t}\n\tmax, err := addTags(t)\n\tif err != nil {\n\t\treturn t, err\n\t}\n\tfor _, id := range [...]Tag{\n\t\t{LangID: t.LangID},\n\t\t{LangID: t.LangID, RegionID: t.RegionID},\n\t\t{LangID: t.LangID, ScriptID: t.ScriptID},\n\t} {\n\t\tif x, err := addTags(id); err == nil && max.equalTags(x) {\n\t\t\tt.setTagsFrom(id)\n\t\t\tbreak\n\t\t}\n\t}\n\treturn t, nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/parse.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sort\"\n\n\t\"golang.org/x/text/internal/tag\"\n)\n\n// isAlpha returns true if the byte is not a digit.\n// b must be an ASCII letter or digit.\nfunc isAlpha(b byte) bool {\n\treturn b > '9'\n}\n\n// isAlphaNum returns true if the string contains only ASCII letters or digits.\nfunc isAlphaNum(s []byte) bool {\n\tfor _, c := range s {\n\t\tif !('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9') {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// ErrSyntax is returned by any of the parsing functions when the\n// input is not well-formed, according to BCP 47.\n// TODO: return the position at which the syntax error occurred?\nvar ErrSyntax = errors.New(\"language: tag is not well-formed\")\n\n// ErrDuplicateKey is returned when a tag contains the same key twice with\n// different values in the -u section.\nvar ErrDuplicateKey = errors.New(\"language: different values for same key in -u extension\")\n\n// ValueError is returned by any of the parsing functions when the\n// input is well-formed but the respective subtag is not recognized\n// as a valid value.\ntype ValueError struct {\n\tv [8]byte\n}\n\n// NewValueError creates a new ValueError.\nfunc NewValueError(tag []byte) ValueError {\n\tvar e ValueError\n\tcopy(e.v[:], tag)\n\treturn e\n}\n\nfunc (e ValueError) tag() []byte {\n\tn := bytes.IndexByte(e.v[:], 0)\n\tif n == -1 {\n\t\tn = 8\n\t}\n\treturn e.v[:n]\n}\n\n// Error implements the error interface.\nfunc (e ValueError) Error() string {\n\treturn fmt.Sprintf(\"language: subtag %q is well-formed but unknown\", e.tag())\n}\n\n// Subtag returns the subtag for which the error occurred.\nfunc (e ValueError) Subtag() string {\n\treturn string(e.tag())\n}\n\n// scanner is used to scan BCP 47 tokens, which are separated by _ or -.\ntype scanner struct {\n\tb     []byte\n\tbytes [max99thPercentileSize]byte\n\ttoken []byte\n\tstart int // start position of the current token\n\tend   int // end position of the current token\n\tnext  int // next point for scan\n\terr   error\n\tdone  bool\n}\n\nfunc makeScannerString(s string) scanner {\n\tscan := scanner{}\n\tif len(s) <= len(scan.bytes) {\n\t\tscan.b = scan.bytes[:copy(scan.bytes[:], s)]\n\t} else {\n\t\tscan.b = []byte(s)\n\t}\n\tscan.init()\n\treturn scan\n}\n\n// makeScanner returns a scanner using b as the input buffer.\n// b is not copied and may be modified by the scanner routines.\nfunc makeScanner(b []byte) scanner {\n\tscan := scanner{b: b}\n\tscan.init()\n\treturn scan\n}\n\nfunc (s *scanner) init() {\n\tfor i, c := range s.b {\n\t\tif c == '_' {\n\t\t\ts.b[i] = '-'\n\t\t}\n\t}\n\ts.scan()\n}\n\n// restToLower converts the string between start and end to lower case.\nfunc (s *scanner) toLower(start, end int) {\n\tfor i := start; i < end; i++ {\n\t\tc := s.b[i]\n\t\tif 'A' <= c && c <= 'Z' {\n\t\t\ts.b[i] += 'a' - 'A'\n\t\t}\n\t}\n}\n\nfunc (s *scanner) setError(e error) {\n\tif s.err == nil || (e == ErrSyntax && s.err != ErrSyntax) {\n\t\ts.err = e\n\t}\n}\n\n// resizeRange shrinks or grows the array at position oldStart such that\n// a new string of size newSize can fit between oldStart and oldEnd.\n// Sets the scan point to after the resized range.\nfunc (s *scanner) resizeRange(oldStart, oldEnd, newSize int) {\n\ts.start = oldStart\n\tif end := oldStart + newSize; end != oldEnd {\n\t\tdiff := end - oldEnd\n\t\tvar b []byte\n\t\tif n := len(s.b) + diff; n > cap(s.b) {\n\t\t\tb = make([]byte, n)\n\t\t\tcopy(b, s.b[:oldStart])\n\t\t} else {\n\t\t\tb = s.b[:n]\n\t\t}\n\t\tcopy(b[end:], s.b[oldEnd:])\n\t\ts.b = b\n\t\ts.next = end + (s.next - s.end)\n\t\ts.end = end\n\t}\n}\n\n// replace replaces the current token with repl.\nfunc (s *scanner) replace(repl string) {\n\ts.resizeRange(s.start, s.end, len(repl))\n\tcopy(s.b[s.start:], repl)\n}\n\n// gobble removes the current token from the input.\n// Caller must call scan after calling gobble.\nfunc (s *scanner) gobble(e error) {\n\ts.setError(e)\n\tif s.start == 0 {\n\t\ts.b = s.b[:+copy(s.b, s.b[s.next:])]\n\t\ts.end = 0\n\t} else {\n\t\ts.b = s.b[:s.start-1+copy(s.b[s.start-1:], s.b[s.end:])]\n\t\ts.end = s.start - 1\n\t}\n\ts.next = s.start\n}\n\n// deleteRange removes the given range from s.b before the current token.\nfunc (s *scanner) deleteRange(start, end int) {\n\ts.b = s.b[:start+copy(s.b[start:], s.b[end:])]\n\tdiff := end - start\n\ts.next -= diff\n\ts.start -= diff\n\ts.end -= diff\n}\n\n// scan parses the next token of a BCP 47 string.  Tokens that are larger\n// than 8 characters or include non-alphanumeric characters result in an error\n// and are gobbled and removed from the output.\n// It returns the end position of the last token consumed.\nfunc (s *scanner) scan() (end int) {\n\tend = s.end\n\ts.token = nil\n\tfor s.start = s.next; s.next < len(s.b); {\n\t\ti := bytes.IndexByte(s.b[s.next:], '-')\n\t\tif i == -1 {\n\t\t\ts.end = len(s.b)\n\t\t\ts.next = len(s.b)\n\t\t\ti = s.end - s.start\n\t\t} else {\n\t\t\ts.end = s.next + i\n\t\t\ts.next = s.end + 1\n\t\t}\n\t\ttoken := s.b[s.start:s.end]\n\t\tif i < 1 || i > 8 || !isAlphaNum(token) {\n\t\t\ts.gobble(ErrSyntax)\n\t\t\tcontinue\n\t\t}\n\t\ts.token = token\n\t\treturn end\n\t}\n\tif n := len(s.b); n > 0 && s.b[n-1] == '-' {\n\t\ts.setError(ErrSyntax)\n\t\ts.b = s.b[:len(s.b)-1]\n\t}\n\ts.done = true\n\treturn end\n}\n\n// acceptMinSize parses multiple tokens of the given size or greater.\n// It returns the end position of the last token consumed.\nfunc (s *scanner) acceptMinSize(min int) (end int) {\n\tend = s.end\n\ts.scan()\n\tfor ; len(s.token) >= min; s.scan() {\n\t\tend = s.end\n\t}\n\treturn end\n}\n\n// Parse parses the given BCP 47 string and returns a valid Tag. If parsing\n// failed it returns an error and any part of the tag that could be parsed.\n// If parsing succeeded but an unknown value was found, it returns\n// ValueError. The Tag returned in this case is just stripped of the unknown\n// value. All other values are preserved. It accepts tags in the BCP 47 format\n// and extensions to this standard defined in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\nfunc Parse(s string) (t Tag, err error) {\n\t// TODO: consider supporting old-style locale key-value pairs.\n\tif s == \"\" {\n\t\treturn Und, ErrSyntax\n\t}\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tt = Und\n\t\t\terr = ErrSyntax\n\t\t\treturn\n\t\t}\n\t}()\n\tif len(s) <= maxAltTaglen {\n\t\tb := [maxAltTaglen]byte{}\n\t\tfor i, c := range s {\n\t\t\t// Generating invalid UTF-8 is okay as it won't match.\n\t\t\tif 'A' <= c && c <= 'Z' {\n\t\t\t\tc += 'a' - 'A'\n\t\t\t} else if c == '_' {\n\t\t\t\tc = '-'\n\t\t\t}\n\t\t\tb[i] = byte(c)\n\t\t}\n\t\tif t, ok := grandfathered(b); ok {\n\t\t\treturn t, nil\n\t\t}\n\t}\n\tscan := makeScannerString(s)\n\treturn parse(&scan, s)\n}\n\nfunc parse(scan *scanner, s string) (t Tag, err error) {\n\tt = Und\n\tvar end int\n\tif n := len(scan.token); n <= 1 {\n\t\tscan.toLower(0, len(scan.b))\n\t\tif n == 0 || scan.token[0] != 'x' {\n\t\t\treturn t, ErrSyntax\n\t\t}\n\t\tend = parseExtensions(scan)\n\t} else if n >= 4 {\n\t\treturn Und, ErrSyntax\n\t} else { // the usual case\n\t\tt, end = parseTag(scan, true)\n\t\tif n := len(scan.token); n == 1 {\n\t\t\tt.pExt = uint16(end)\n\t\t\tend = parseExtensions(scan)\n\t\t} else if end < len(scan.b) {\n\t\t\tscan.setError(ErrSyntax)\n\t\t\tscan.b = scan.b[:end]\n\t\t}\n\t}\n\tif int(t.pVariant) < len(scan.b) {\n\t\tif end < len(s) {\n\t\t\ts = s[:end]\n\t\t}\n\t\tif len(s) > 0 && tag.Compare(s, scan.b) == 0 {\n\t\t\tt.str = s\n\t\t} else {\n\t\t\tt.str = string(scan.b)\n\t\t}\n\t} else {\n\t\tt.pVariant, t.pExt = 0, 0\n\t}\n\treturn t, scan.err\n}\n\n// parseTag parses language, script, region and variants.\n// It returns a Tag and the end position in the input that was parsed.\n// If doNorm is true, then <lang>-<extlang> will be normalized to <extlang>.\nfunc parseTag(scan *scanner, doNorm bool) (t Tag, end int) {\n\tvar e error\n\t// TODO: set an error if an unknown lang, script or region is encountered.\n\tt.LangID, e = getLangID(scan.token)\n\tscan.setError(e)\n\tscan.replace(t.LangID.String())\n\tlangStart := scan.start\n\tend = scan.scan()\n\tfor len(scan.token) == 3 && isAlpha(scan.token[0]) {\n\t\t// From http://tools.ietf.org/html/bcp47, <lang>-<extlang> tags are equivalent\n\t\t// to a tag of the form <extlang>.\n\t\tif doNorm {\n\t\t\tlang, e := getLangID(scan.token)\n\t\t\tif lang != 0 {\n\t\t\t\tt.LangID = lang\n\t\t\t\tlangStr := lang.String()\n\t\t\t\tcopy(scan.b[langStart:], langStr)\n\t\t\t\tscan.b[langStart+len(langStr)] = '-'\n\t\t\t\tscan.start = langStart + len(langStr) + 1\n\t\t\t}\n\t\t\tscan.gobble(e)\n\t\t}\n\t\tend = scan.scan()\n\t}\n\tif len(scan.token) == 4 && isAlpha(scan.token[0]) {\n\t\tt.ScriptID, e = getScriptID(script, scan.token)\n\t\tif t.ScriptID == 0 {\n\t\t\tscan.gobble(e)\n\t\t}\n\t\tend = scan.scan()\n\t}\n\tif n := len(scan.token); n >= 2 && n <= 3 {\n\t\tt.RegionID, e = getRegionID(scan.token)\n\t\tif t.RegionID == 0 {\n\t\t\tscan.gobble(e)\n\t\t} else {\n\t\t\tscan.replace(t.RegionID.String())\n\t\t}\n\t\tend = scan.scan()\n\t}\n\tscan.toLower(scan.start, len(scan.b))\n\tt.pVariant = byte(end)\n\tend = parseVariants(scan, end, t)\n\tt.pExt = uint16(end)\n\treturn t, end\n}\n\nvar separator = []byte{'-'}\n\n// parseVariants scans tokens as long as each token is a valid variant string.\n// Duplicate variants are removed.\nfunc parseVariants(scan *scanner, end int, t Tag) int {\n\tstart := scan.start\n\tvarIDBuf := [4]uint8{}\n\tvariantBuf := [4][]byte{}\n\tvarID := varIDBuf[:0]\n\tvariant := variantBuf[:0]\n\tlast := -1\n\tneedSort := false\n\tfor ; len(scan.token) >= 4; scan.scan() {\n\t\t// TODO: measure the impact of needing this conversion and redesign\n\t\t// the data structure if there is an issue.\n\t\tv, ok := variantIndex[string(scan.token)]\n\t\tif !ok {\n\t\t\t// unknown variant\n\t\t\t// TODO: allow user-defined variants?\n\t\t\tscan.gobble(NewValueError(scan.token))\n\t\t\tcontinue\n\t\t}\n\t\tvarID = append(varID, v)\n\t\tvariant = append(variant, scan.token)\n\t\tif !needSort {\n\t\t\tif last < int(v) {\n\t\t\t\tlast = int(v)\n\t\t\t} else {\n\t\t\t\tneedSort = true\n\t\t\t\t// There is no legal combinations of more than 7 variants\n\t\t\t\t// (and this is by no means a useful sequence).\n\t\t\t\tconst maxVariants = 8\n\t\t\t\tif len(varID) > maxVariants {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tend = scan.end\n\t}\n\tif needSort {\n\t\tsort.Sort(variantsSort{varID, variant})\n\t\tk, l := 0, -1\n\t\tfor i, v := range varID {\n\t\t\tw := int(v)\n\t\t\tif l == w {\n\t\t\t\t// Remove duplicates.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvarID[k] = varID[i]\n\t\t\tvariant[k] = variant[i]\n\t\t\tk++\n\t\t\tl = w\n\t\t}\n\t\tif str := bytes.Join(variant[:k], separator); len(str) == 0 {\n\t\t\tend = start - 1\n\t\t} else {\n\t\t\tscan.resizeRange(start, end, len(str))\n\t\t\tcopy(scan.b[scan.start:], str)\n\t\t\tend = scan.end\n\t\t}\n\t}\n\treturn end\n}\n\ntype variantsSort struct {\n\ti []uint8\n\tv [][]byte\n}\n\nfunc (s variantsSort) Len() int {\n\treturn len(s.i)\n}\n\nfunc (s variantsSort) Swap(i, j int) {\n\ts.i[i], s.i[j] = s.i[j], s.i[i]\n\ts.v[i], s.v[j] = s.v[j], s.v[i]\n}\n\nfunc (s variantsSort) Less(i, j int) bool {\n\treturn s.i[i] < s.i[j]\n}\n\ntype bytesSort struct {\n\tb [][]byte\n\tn int // first n bytes to compare\n}\n\nfunc (b bytesSort) Len() int {\n\treturn len(b.b)\n}\n\nfunc (b bytesSort) Swap(i, j int) {\n\tb.b[i], b.b[j] = b.b[j], b.b[i]\n}\n\nfunc (b bytesSort) Less(i, j int) bool {\n\tfor k := 0; k < b.n; k++ {\n\t\tif b.b[i][k] == b.b[j][k] {\n\t\t\tcontinue\n\t\t}\n\t\treturn b.b[i][k] < b.b[j][k]\n\t}\n\treturn false\n}\n\n// parseExtensions parses and normalizes the extensions in the buffer.\n// It returns the last position of scan.b that is part of any extension.\n// It also trims scan.b to remove excess parts accordingly.\nfunc parseExtensions(scan *scanner) int {\n\tstart := scan.start\n\texts := [][]byte{}\n\tprivate := []byte{}\n\tend := scan.end\n\tfor len(scan.token) == 1 {\n\t\textStart := scan.start\n\t\text := scan.token[0]\n\t\tend = parseExtension(scan)\n\t\textension := scan.b[extStart:end]\n\t\tif len(extension) < 3 || (ext != 'x' && len(extension) < 4) {\n\t\t\tscan.setError(ErrSyntax)\n\t\t\tend = extStart\n\t\t\tcontinue\n\t\t} else if start == extStart && (ext == 'x' || scan.start == len(scan.b)) {\n\t\t\tscan.b = scan.b[:end]\n\t\t\treturn end\n\t\t} else if ext == 'x' {\n\t\t\tprivate = extension\n\t\t\tbreak\n\t\t}\n\t\texts = append(exts, extension)\n\t}\n\tsort.Sort(bytesSort{exts, 1})\n\tif len(private) > 0 {\n\t\texts = append(exts, private)\n\t}\n\tscan.b = scan.b[:start]\n\tif len(exts) > 0 {\n\t\tscan.b = append(scan.b, bytes.Join(exts, separator)...)\n\t} else if start > 0 {\n\t\t// Strip trailing '-'.\n\t\tscan.b = scan.b[:start-1]\n\t}\n\treturn end\n}\n\n// parseExtension parses a single extension and returns the position of\n// the extension end.\nfunc parseExtension(scan *scanner) int {\n\tstart, end := scan.start, scan.end\n\tswitch scan.token[0] {\n\tcase 'u': // https://www.ietf.org/rfc/rfc6067.txt\n\t\tattrStart := end\n\t\tscan.scan()\n\t\tfor last := []byte{}; len(scan.token) > 2; scan.scan() {\n\t\t\tif bytes.Compare(scan.token, last) != -1 {\n\t\t\t\t// Attributes are unsorted. Start over from scratch.\n\t\t\t\tp := attrStart + 1\n\t\t\t\tscan.next = p\n\t\t\t\tattrs := [][]byte{}\n\t\t\t\tfor scan.scan(); len(scan.token) > 2; scan.scan() {\n\t\t\t\t\tattrs = append(attrs, scan.token)\n\t\t\t\t\tend = scan.end\n\t\t\t\t}\n\t\t\t\tsort.Sort(bytesSort{attrs, 3})\n\t\t\t\tcopy(scan.b[p:], bytes.Join(attrs, separator))\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tlast = scan.token\n\t\t\tend = scan.end\n\t\t}\n\t\t// Scan key-type sequences. A key is of length 2 and may be followed\n\t\t// by 0 or more \"type\" subtags from 3 to the maximum of 8 letters.\n\t\tvar last, key []byte\n\t\tfor attrEnd := end; len(scan.token) == 2; last = key {\n\t\t\tkey = scan.token\n\t\t\tend = scan.end\n\t\t\tfor scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() {\n\t\t\t\tend = scan.end\n\t\t\t}\n\t\t\t// TODO: check key value validity\n\t\t\tif bytes.Compare(key, last) != 1 || scan.err != nil {\n\t\t\t\t// We have an invalid key or the keys are not sorted.\n\t\t\t\t// Start scanning keys from scratch and reorder.\n\t\t\t\tp := attrEnd + 1\n\t\t\t\tscan.next = p\n\t\t\t\tkeys := [][]byte{}\n\t\t\t\tfor scan.scan(); len(scan.token) == 2; {\n\t\t\t\t\tkeyStart := scan.start\n\t\t\t\t\tend = scan.end\n\t\t\t\t\tfor scan.scan(); end < scan.end && len(scan.token) > 2; scan.scan() {\n\t\t\t\t\t\tend = scan.end\n\t\t\t\t\t}\n\t\t\t\t\tkeys = append(keys, scan.b[keyStart:end])\n\t\t\t\t}\n\t\t\t\tsort.Stable(bytesSort{keys, 2})\n\t\t\t\tif n := len(keys); n > 0 {\n\t\t\t\t\tk := 0\n\t\t\t\t\tfor i := 1; i < n; i++ {\n\t\t\t\t\t\tif !bytes.Equal(keys[k][:2], keys[i][:2]) {\n\t\t\t\t\t\t\tk++\n\t\t\t\t\t\t\tkeys[k] = keys[i]\n\t\t\t\t\t\t} else if !bytes.Equal(keys[k], keys[i]) {\n\t\t\t\t\t\t\tscan.setError(ErrDuplicateKey)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tkeys = keys[:k+1]\n\t\t\t\t}\n\t\t\t\treordered := bytes.Join(keys, separator)\n\t\t\t\tif e := p + len(reordered); e < end {\n\t\t\t\t\tscan.deleteRange(e, end)\n\t\t\t\t\tend = e\n\t\t\t\t}\n\t\t\t\tcopy(scan.b[p:], reordered)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\tcase 't': // https://www.ietf.org/rfc/rfc6497.txt\n\t\tscan.scan()\n\t\tif n := len(scan.token); n >= 2 && n <= 3 && isAlpha(scan.token[1]) {\n\t\t\t_, end = parseTag(scan, false)\n\t\t\tscan.toLower(start, end)\n\t\t}\n\t\tfor len(scan.token) == 2 && !isAlpha(scan.token[1]) {\n\t\t\tend = scan.acceptMinSize(3)\n\t\t}\n\tcase 'x':\n\t\tend = scan.acceptMinSize(1)\n\tdefault:\n\t\tend = scan.acceptMinSize(2)\n\t}\n\treturn end\n}\n\n// getExtension returns the name, body and end position of the extension.\nfunc getExtension(s string, p int) (end int, ext string) {\n\tif s[p] == '-' {\n\t\tp++\n\t}\n\tif s[p] == 'x' {\n\t\treturn len(s), s[p:]\n\t}\n\tend = nextExtension(s, p)\n\treturn end, s[p:end]\n}\n\n// nextExtension finds the next extension within the string, searching\n// for the -<char>- pattern from position p.\n// In the fast majority of cases, language tags will have at most\n// one extension and extensions tend to be small.\nfunc nextExtension(s string, p int) int {\n\tfor n := len(s) - 3; p < n; {\n\t\tif s[p] == '-' {\n\t\t\tif s[p+2] == '-' {\n\t\t\t\treturn p\n\t\t\t}\n\t\t\tp += 3\n\t\t} else {\n\t\t\tp++\n\t\t}\n\t}\n\treturn len(s)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/tables.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage language\n\nimport \"golang.org/x/text/internal/tag\"\n\n// CLDRVersion is the CLDR version from which the tables in this package are derived.\nconst CLDRVersion = \"32\"\n\nconst NumLanguages = 8798\n\nconst NumScripts = 261\n\nconst NumRegions = 358\n\ntype FromTo struct {\n\tFrom uint16\n\tTo   uint16\n}\n\nconst nonCanonicalUnd = 1201\nconst (\n\t_af  = 22\n\t_am  = 39\n\t_ar  = 58\n\t_az  = 88\n\t_bg  = 126\n\t_bn  = 165\n\t_ca  = 215\n\t_cs  = 250\n\t_da  = 257\n\t_de  = 269\n\t_el  = 310\n\t_en  = 313\n\t_es  = 318\n\t_et  = 320\n\t_fa  = 328\n\t_fi  = 337\n\t_fil = 339\n\t_fr  = 350\n\t_gu  = 420\n\t_he  = 444\n\t_hi  = 446\n\t_hr  = 465\n\t_hu  = 469\n\t_hy  = 471\n\t_id  = 481\n\t_is  = 504\n\t_it  = 505\n\t_ja  = 512\n\t_ka  = 528\n\t_kk  = 578\n\t_km  = 586\n\t_kn  = 593\n\t_ko  = 596\n\t_ky  = 650\n\t_lo  = 696\n\t_lt  = 704\n\t_lv  = 711\n\t_mk  = 767\n\t_ml  = 772\n\t_mn  = 779\n\t_mo  = 784\n\t_mr  = 795\n\t_ms  = 799\n\t_mul = 806\n\t_my  = 817\n\t_nb  = 839\n\t_ne  = 849\n\t_nl  = 871\n\t_no  = 879\n\t_pa  = 925\n\t_pl  = 947\n\t_pt  = 960\n\t_ro  = 988\n\t_ru  = 994\n\t_sh  = 1031\n\t_si  = 1036\n\t_sk  = 1042\n\t_sl  = 1046\n\t_sq  = 1073\n\t_sr  = 1074\n\t_sv  = 1092\n\t_sw  = 1093\n\t_ta  = 1104\n\t_te  = 1121\n\t_th  = 1131\n\t_tl  = 1146\n\t_tn  = 1152\n\t_tr  = 1162\n\t_uk  = 1198\n\t_ur  = 1204\n\t_uz  = 1212\n\t_vi  = 1219\n\t_zh  = 1321\n\t_zu  = 1327\n\t_jbo = 515\n\t_ami = 1650\n\t_bnn = 2357\n\t_hak = 438\n\t_tlh = 14467\n\t_lb  = 661\n\t_nv  = 899\n\t_pwn = 12055\n\t_tao = 14188\n\t_tay = 14198\n\t_tsu = 14662\n\t_nn  = 874\n\t_sfb = 13629\n\t_vgt = 15701\n\t_sgg = 13660\n\t_cmn = 3007\n\t_nan = 835\n\t_hsn = 467\n)\n\nconst langPrivateStart = 0x2f72\n\nconst langPrivateEnd = 0x3179\n\n// lang holds an alphabetically sorted list of ISO-639 language identifiers.\n// All entries are 4 bytes. The index of the identifier (divided by 4) is the language tag.\n// For 2-byte language identifiers, the two successive bytes have the following meaning:\n//   - if the first letter of the 2- and 3-letter ISO codes are the same:\n//     the second and third letter of the 3-letter ISO code.\n//   - otherwise: a 0 and a by 2 bits right-shifted index into altLangISO3.\n//\n// For 3-byte language identifiers the 4th byte is 0.\nconst lang tag.Index = \"\" + // Size: 5324 bytes\n\t\"---\\x00aaaraai\\x00aak\\x00aau\\x00abbkabi\\x00abq\\x00abr\\x00abt\\x00aby\\x00a\" +\n\t\"cd\\x00ace\\x00ach\\x00ada\\x00ade\\x00adj\\x00ady\\x00adz\\x00aeveaeb\\x00aey\" +\n\t\"\\x00affragc\\x00agd\\x00agg\\x00agm\\x00ago\\x00agq\\x00aha\\x00ahl\\x00aho\\x00a\" +\n\t\"jg\\x00akkaakk\\x00ala\\x00ali\\x00aln\\x00alt\\x00ammhamm\\x00amn\\x00amo\\x00am\" +\n\t\"p\\x00anrganc\\x00ank\\x00ann\\x00any\\x00aoj\\x00aom\\x00aoz\\x00apc\\x00apd\\x00\" +\n\t\"ape\\x00apr\\x00aps\\x00apz\\x00arraarc\\x00arh\\x00arn\\x00aro\\x00arq\\x00ars\" +\n\t\"\\x00ary\\x00arz\\x00assmasa\\x00ase\\x00asg\\x00aso\\x00ast\\x00ata\\x00atg\\x00a\" +\n\t\"tj\\x00auy\\x00avvaavl\\x00avn\\x00avt\\x00avu\\x00awa\\x00awb\\x00awo\\x00awx\" +\n\t\"\\x00ayymayb\\x00azzebaakbal\\x00ban\\x00bap\\x00bar\\x00bas\\x00bav\\x00bax\\x00\" +\n\t\"bba\\x00bbb\\x00bbc\\x00bbd\\x00bbj\\x00bbp\\x00bbr\\x00bcf\\x00bch\\x00bci\\x00bc\" +\n\t\"m\\x00bcn\\x00bco\\x00bcq\\x00bcu\\x00bdd\\x00beelbef\\x00beh\\x00bej\\x00bem\\x00\" +\n\t\"bet\\x00bew\\x00bex\\x00bez\\x00bfd\\x00bfq\\x00bft\\x00bfy\\x00bgulbgc\\x00bgn\" +\n\t\"\\x00bgx\\x00bhihbhb\\x00bhg\\x00bhi\\x00bhk\\x00bhl\\x00bho\\x00bhy\\x00biisbib\" +\n\t\"\\x00big\\x00bik\\x00bim\\x00bin\\x00bio\\x00biq\\x00bjh\\x00bji\\x00bjj\\x00bjn\" +\n\t\"\\x00bjo\\x00bjr\\x00bjt\\x00bjz\\x00bkc\\x00bkm\\x00bkq\\x00bku\\x00bkv\\x00blt\" +\n\t\"\\x00bmambmh\\x00bmk\\x00bmq\\x00bmu\\x00bnenbng\\x00bnm\\x00bnp\\x00boodboj\\x00\" +\n\t\"bom\\x00bon\\x00bpy\\x00bqc\\x00bqi\\x00bqp\\x00bqv\\x00brrebra\\x00brh\\x00brx\" +\n\t\"\\x00brz\\x00bsosbsj\\x00bsq\\x00bss\\x00bst\\x00bto\\x00btt\\x00btv\\x00bua\\x00b\" +\n\t\"uc\\x00bud\\x00bug\\x00buk\\x00bum\\x00buo\\x00bus\\x00buu\\x00bvb\\x00bwd\\x00bwr\" +\n\t\"\\x00bxh\\x00bye\\x00byn\\x00byr\\x00bys\\x00byv\\x00byx\\x00bza\\x00bze\\x00bzf\" +\n\t\"\\x00bzh\\x00bzw\\x00caatcan\\x00cbj\\x00cch\\x00ccp\\x00ceheceb\\x00cfa\\x00cgg\" +\n\t\"\\x00chhachk\\x00chm\\x00cho\\x00chp\\x00chr\\x00cja\\x00cjm\\x00cjv\\x00ckb\\x00c\" +\n\t\"kl\\x00cko\\x00cky\\x00cla\\x00cme\\x00cmg\\x00cooscop\\x00cps\\x00crrecrh\\x00cr\" +\n\t\"j\\x00crk\\x00crl\\x00crm\\x00crs\\x00csescsb\\x00csw\\x00ctd\\x00cuhucvhvcyymda\" +\n\t\"andad\\x00daf\\x00dag\\x00dah\\x00dak\\x00dar\\x00dav\\x00dbd\\x00dbq\\x00dcc\\x00\" +\n\t\"ddn\\x00deeuded\\x00den\\x00dga\\x00dgh\\x00dgi\\x00dgl\\x00dgr\\x00dgz\\x00dia\" +\n\t\"\\x00dje\\x00dnj\\x00dob\\x00doi\\x00dop\\x00dow\\x00dri\\x00drs\\x00dsb\\x00dtm\" +\n\t\"\\x00dtp\\x00dts\\x00dty\\x00dua\\x00duc\\x00dud\\x00dug\\x00dvivdva\\x00dww\\x00d\" +\n\t\"yo\\x00dyu\\x00dzzodzg\\x00ebu\\x00eeweefi\\x00egl\\x00egy\\x00eka\\x00eky\\x00el\" +\n\t\"llema\\x00emi\\x00enngenn\\x00enq\\x00eopoeri\\x00es\\x00\\x05esu\\x00etstetr\" +\n\t\"\\x00ett\\x00etu\\x00etx\\x00euusewo\\x00ext\\x00faasfaa\\x00fab\\x00fag\\x00fai\" +\n\t\"\\x00fan\\x00ffulffi\\x00ffm\\x00fiinfia\\x00fil\\x00fit\\x00fjijflr\\x00fmp\\x00\" +\n\t\"foaofod\\x00fon\\x00for\\x00fpe\\x00fqs\\x00frrafrc\\x00frp\\x00frr\\x00frs\\x00f\" +\n\t\"ub\\x00fud\\x00fue\\x00fuf\\x00fuh\\x00fuq\\x00fur\\x00fuv\\x00fuy\\x00fvr\\x00fyr\" +\n\t\"ygalegaa\\x00gaf\\x00gag\\x00gah\\x00gaj\\x00gam\\x00gan\\x00gaw\\x00gay\\x00gba\" +\n\t\"\\x00gbf\\x00gbm\\x00gby\\x00gbz\\x00gcr\\x00gdlagde\\x00gdn\\x00gdr\\x00geb\\x00g\" +\n\t\"ej\\x00gel\\x00gez\\x00gfk\\x00ggn\\x00ghs\\x00gil\\x00gim\\x00gjk\\x00gjn\\x00gju\" +\n\t\"\\x00gkn\\x00gkp\\x00gllgglk\\x00gmm\\x00gmv\\x00gnrngnd\\x00gng\\x00god\\x00gof\" +\n\t\"\\x00goi\\x00gom\\x00gon\\x00gor\\x00gos\\x00got\\x00grb\\x00grc\\x00grt\\x00grw\" +\n\t\"\\x00gsw\\x00guujgub\\x00guc\\x00gud\\x00gur\\x00guw\\x00gux\\x00guz\\x00gvlvgvf\" +\n\t\"\\x00gvr\\x00gvs\\x00gwc\\x00gwi\\x00gwt\\x00gyi\\x00haauhag\\x00hak\\x00ham\\x00h\" +\n\t\"aw\\x00haz\\x00hbb\\x00hdy\\x00heebhhy\\x00hiinhia\\x00hif\\x00hig\\x00hih\\x00hi\" +\n\t\"l\\x00hla\\x00hlu\\x00hmd\\x00hmt\\x00hnd\\x00hne\\x00hnj\\x00hnn\\x00hno\\x00homo\" +\n\t\"hoc\\x00hoj\\x00hot\\x00hrrvhsb\\x00hsn\\x00htathuunhui\\x00hyyehzerianaian\" +\n\t\"\\x00iar\\x00iba\\x00ibb\\x00iby\\x00ica\\x00ich\\x00idndidd\\x00idi\\x00idu\\x00i\" +\n\t\"eleife\\x00igboigb\\x00ige\\x00iiiiijj\\x00ikpkikk\\x00ikt\\x00ikw\\x00ikx\\x00i\" +\n\t\"lo\\x00imo\\x00inndinh\\x00iodoiou\\x00iri\\x00isslittaiukuiw\\x00\\x03iwm\\x00i\" +\n\t\"ws\\x00izh\\x00izi\\x00japnjab\\x00jam\\x00jbo\\x00jbu\\x00jen\\x00jgk\\x00jgo\" +\n\t\"\\x00ji\\x00\\x06jib\\x00jmc\\x00jml\\x00jra\\x00jut\\x00jvavjwavkaatkaa\\x00kab\" +\n\t\"\\x00kac\\x00kad\\x00kai\\x00kaj\\x00kam\\x00kao\\x00kbd\\x00kbm\\x00kbp\\x00kbq\" +\n\t\"\\x00kbx\\x00kby\\x00kcg\\x00kck\\x00kcl\\x00kct\\x00kde\\x00kdh\\x00kdl\\x00kdt\" +\n\t\"\\x00kea\\x00ken\\x00kez\\x00kfo\\x00kfr\\x00kfy\\x00kgonkge\\x00kgf\\x00kgp\\x00k\" +\n\t\"ha\\x00khb\\x00khn\\x00khq\\x00khs\\x00kht\\x00khw\\x00khz\\x00kiikkij\\x00kiu\" +\n\t\"\\x00kiw\\x00kjuakjd\\x00kjg\\x00kjs\\x00kjy\\x00kkazkkc\\x00kkj\\x00klalkln\\x00\" +\n\t\"klq\\x00klt\\x00klx\\x00kmhmkmb\\x00kmh\\x00kmo\\x00kms\\x00kmu\\x00kmw\\x00knank\" +\n\t\"nf\\x00knp\\x00koorkoi\\x00kok\\x00kol\\x00kos\\x00koz\\x00kpe\\x00kpf\\x00kpo\" +\n\t\"\\x00kpr\\x00kpx\\x00kqb\\x00kqf\\x00kqs\\x00kqy\\x00kraukrc\\x00kri\\x00krj\\x00k\" +\n\t\"rl\\x00krs\\x00kru\\x00ksasksb\\x00ksd\\x00ksf\\x00ksh\\x00ksj\\x00ksr\\x00ktb\" +\n\t\"\\x00ktm\\x00kto\\x00kuurkub\\x00kud\\x00kue\\x00kuj\\x00kum\\x00kun\\x00kup\\x00k\" +\n\t\"us\\x00kvomkvg\\x00kvr\\x00kvx\\x00kw\\x00\\x01kwj\\x00kwo\\x00kxa\\x00kxc\\x00kxm\" +\n\t\"\\x00kxp\\x00kxw\\x00kxz\\x00kyirkye\\x00kyx\\x00kzr\\x00laatlab\\x00lad\\x00lag\" +\n\t\"\\x00lah\\x00laj\\x00las\\x00lbtzlbe\\x00lbu\\x00lbw\\x00lcm\\x00lcp\\x00ldb\\x00l\" +\n\t\"ed\\x00lee\\x00lem\\x00lep\\x00leq\\x00leu\\x00lez\\x00lguglgg\\x00liimlia\\x00li\" +\n\t\"d\\x00lif\\x00lig\\x00lih\\x00lij\\x00lis\\x00ljp\\x00lki\\x00lkt\\x00lle\\x00lln\" +\n\t\"\\x00lmn\\x00lmo\\x00lmp\\x00lninlns\\x00lnu\\x00loaoloj\\x00lok\\x00lol\\x00lor\" +\n\t\"\\x00los\\x00loz\\x00lrc\\x00ltitltg\\x00luublua\\x00luo\\x00luy\\x00luz\\x00lvav\" +\n\t\"lwl\\x00lzh\\x00lzz\\x00mad\\x00maf\\x00mag\\x00mai\\x00mak\\x00man\\x00mas\\x00ma\" +\n\t\"w\\x00maz\\x00mbh\\x00mbo\\x00mbq\\x00mbu\\x00mbw\\x00mci\\x00mcp\\x00mcq\\x00mcr\" +\n\t\"\\x00mcu\\x00mda\\x00mde\\x00mdf\\x00mdh\\x00mdj\\x00mdr\\x00mdx\\x00med\\x00mee\" +\n\t\"\\x00mek\\x00men\\x00mer\\x00met\\x00meu\\x00mfa\\x00mfe\\x00mfn\\x00mfo\\x00mfq\" +\n\t\"\\x00mglgmgh\\x00mgl\\x00mgo\\x00mgp\\x00mgy\\x00mhahmhi\\x00mhl\\x00mirimif\\x00\" +\n\t\"min\\x00mis\\x00miw\\x00mkkdmki\\x00mkl\\x00mkp\\x00mkw\\x00mlalmle\\x00mlp\\x00m\" +\n\t\"ls\\x00mmo\\x00mmu\\x00mmx\\x00mnonmna\\x00mnf\\x00mni\\x00mnw\\x00moolmoa\\x00mo\" +\n\t\"e\\x00moh\\x00mos\\x00mox\\x00mpp\\x00mps\\x00mpt\\x00mpx\\x00mql\\x00mrarmrd\\x00\" +\n\t\"mrj\\x00mro\\x00mssamtltmtc\\x00mtf\\x00mti\\x00mtr\\x00mua\\x00mul\\x00mur\\x00m\" +\n\t\"us\\x00mva\\x00mvn\\x00mvy\\x00mwk\\x00mwr\\x00mwv\\x00mxc\\x00mxm\\x00myyamyk\" +\n\t\"\\x00mym\\x00myv\\x00myw\\x00myx\\x00myz\\x00mzk\\x00mzm\\x00mzn\\x00mzp\\x00mzw\" +\n\t\"\\x00mzz\\x00naaunac\\x00naf\\x00nah\\x00nak\\x00nan\\x00nap\\x00naq\\x00nas\\x00n\" +\n\t\"bobnca\\x00nce\\x00ncf\\x00nch\\x00nco\\x00ncu\\x00nddendc\\x00nds\\x00neepneb\" +\n\t\"\\x00new\\x00nex\\x00nfr\\x00ngdonga\\x00ngb\\x00ngl\\x00nhb\\x00nhe\\x00nhw\\x00n\" +\n\t\"if\\x00nii\\x00nij\\x00nin\\x00niu\\x00niy\\x00niz\\x00njo\\x00nkg\\x00nko\\x00nll\" +\n\t\"dnmg\\x00nmz\\x00nnnonnf\\x00nnh\\x00nnk\\x00nnm\\x00noornod\\x00noe\\x00non\\x00\" +\n\t\"nop\\x00nou\\x00nqo\\x00nrblnrb\\x00nsk\\x00nsn\\x00nso\\x00nss\\x00ntm\\x00ntr\" +\n\t\"\\x00nui\\x00nup\\x00nus\\x00nuv\\x00nux\\x00nvavnwb\\x00nxq\\x00nxr\\x00nyyanym\" +\n\t\"\\x00nyn\\x00nzi\\x00occiogc\\x00ojjiokr\\x00okv\\x00omrmong\\x00onn\\x00ons\\x00\" +\n\t\"opm\\x00orrioro\\x00oru\\x00osssosa\\x00ota\\x00otk\\x00ozm\\x00paanpag\\x00pal\" +\n\t\"\\x00pam\\x00pap\\x00pau\\x00pbi\\x00pcd\\x00pcm\\x00pdc\\x00pdt\\x00ped\\x00peo\" +\n\t\"\\x00pex\\x00pfl\\x00phl\\x00phn\\x00pilipil\\x00pip\\x00pka\\x00pko\\x00plolpla\" +\n\t\"\\x00pms\\x00png\\x00pnn\\x00pnt\\x00pon\\x00ppo\\x00pra\\x00prd\\x00prg\\x00psusp\" +\n\t\"ss\\x00ptorptp\\x00puu\\x00pwa\\x00quuequc\\x00qug\\x00rai\\x00raj\\x00rao\\x00rc\" +\n\t\"f\\x00rej\\x00rel\\x00res\\x00rgn\\x00rhg\\x00ria\\x00rif\\x00rjs\\x00rkt\\x00rmoh\" +\n\t\"rmf\\x00rmo\\x00rmt\\x00rmu\\x00rnunrna\\x00rng\\x00roonrob\\x00rof\\x00roo\\x00r\" +\n\t\"ro\\x00rtm\\x00ruusrue\\x00rug\\x00rw\\x00\\x04rwk\\x00rwo\\x00ryu\\x00saansaf\" +\n\t\"\\x00sah\\x00saq\\x00sas\\x00sat\\x00sav\\x00saz\\x00sba\\x00sbe\\x00sbp\\x00scrds\" +\n\t\"ck\\x00scl\\x00scn\\x00sco\\x00scs\\x00sdndsdc\\x00sdh\\x00semesef\\x00seh\\x00se\" +\n\t\"i\\x00ses\\x00sgagsga\\x00sgs\\x00sgw\\x00sgz\\x00sh\\x00\\x02shi\\x00shk\\x00shn\" +\n\t\"\\x00shu\\x00siinsid\\x00sig\\x00sil\\x00sim\\x00sjr\\x00sklkskc\\x00skr\\x00sks\" +\n\t\"\\x00sllvsld\\x00sli\\x00sll\\x00sly\\x00smmosma\\x00smi\\x00smj\\x00smn\\x00smp\" +\n\t\"\\x00smq\\x00sms\\x00snnasnc\\x00snk\\x00snp\\x00snx\\x00sny\\x00soomsok\\x00soq\" +\n\t\"\\x00sou\\x00soy\\x00spd\\x00spl\\x00sps\\x00sqqisrrpsrb\\x00srn\\x00srr\\x00srx\" +\n\t\"\\x00ssswssd\\x00ssg\\x00ssy\\x00stotstk\\x00stq\\x00suunsua\\x00sue\\x00suk\\x00\" +\n\t\"sur\\x00sus\\x00svweswwaswb\\x00swc\\x00swg\\x00swp\\x00swv\\x00sxn\\x00sxw\\x00s\" +\n\t\"yl\\x00syr\\x00szl\\x00taamtaj\\x00tal\\x00tan\\x00taq\\x00tbc\\x00tbd\\x00tbf\" +\n\t\"\\x00tbg\\x00tbo\\x00tbw\\x00tbz\\x00tci\\x00tcy\\x00tdd\\x00tdg\\x00tdh\\x00teelt\" +\n\t\"ed\\x00tem\\x00teo\\x00tet\\x00tfi\\x00tggktgc\\x00tgo\\x00tgu\\x00thhathl\\x00th\" +\n\t\"q\\x00thr\\x00tiirtif\\x00tig\\x00tik\\x00tim\\x00tio\\x00tiv\\x00tkuktkl\\x00tkr\" +\n\t\"\\x00tkt\\x00tlgltlf\\x00tlx\\x00tly\\x00tmh\\x00tmy\\x00tnsntnh\\x00toontof\\x00\" +\n\t\"tog\\x00toq\\x00tpi\\x00tpm\\x00tpz\\x00tqo\\x00trurtru\\x00trv\\x00trw\\x00tssot\" +\n\t\"sd\\x00tsf\\x00tsg\\x00tsj\\x00tsw\\x00ttatttd\\x00tte\\x00ttj\\x00ttr\\x00tts\" +\n\t\"\\x00ttt\\x00tuh\\x00tul\\x00tum\\x00tuq\\x00tvd\\x00tvl\\x00tvu\\x00twwitwh\\x00t\" +\n\t\"wq\\x00txg\\x00tyahtya\\x00tyv\\x00tzm\\x00ubu\\x00udm\\x00ugiguga\\x00ukkruli\" +\n\t\"\\x00umb\\x00und\\x00unr\\x00unx\\x00urrduri\\x00urt\\x00urw\\x00usa\\x00utr\\x00u\" +\n\t\"vh\\x00uvl\\x00uzzbvag\\x00vai\\x00van\\x00veenvec\\x00vep\\x00viievic\\x00viv\" +\n\t\"\\x00vls\\x00vmf\\x00vmw\\x00voolvot\\x00vro\\x00vun\\x00vut\\x00walnwae\\x00waj\" +\n\t\"\\x00wal\\x00wan\\x00war\\x00wbp\\x00wbq\\x00wbr\\x00wci\\x00wer\\x00wgi\\x00whg\" +\n\t\"\\x00wib\\x00wiu\\x00wiv\\x00wja\\x00wji\\x00wls\\x00wmo\\x00wnc\\x00wni\\x00wnu\" +\n\t\"\\x00woolwob\\x00wos\\x00wrs\\x00wsk\\x00wtm\\x00wuu\\x00wuv\\x00wwa\\x00xav\\x00x\" +\n\t\"bi\\x00xcr\\x00xes\\x00xhhoxla\\x00xlc\\x00xld\\x00xmf\\x00xmn\\x00xmr\\x00xna\" +\n\t\"\\x00xnr\\x00xog\\x00xon\\x00xpr\\x00xrb\\x00xsa\\x00xsi\\x00xsm\\x00xsr\\x00xwe\" +\n\t\"\\x00yam\\x00yao\\x00yap\\x00yas\\x00yat\\x00yav\\x00yay\\x00yaz\\x00yba\\x00ybb\" +\n\t\"\\x00yby\\x00yer\\x00ygr\\x00ygw\\x00yiidyko\\x00yle\\x00ylg\\x00yll\\x00yml\\x00y\" +\n\t\"ooryon\\x00yrb\\x00yre\\x00yrl\\x00yss\\x00yua\\x00yue\\x00yuj\\x00yut\\x00yuw\" +\n\t\"\\x00zahazag\\x00zbl\\x00zdj\\x00zea\\x00zgh\\x00zhhozhx\\x00zia\\x00zlm\\x00zmi\" +\n\t\"\\x00zne\\x00zuulzxx\\x00zza\\x00\\xff\\xff\\xff\\xff\"\n\nconst langNoIndexOffset = 1330\n\n// langNoIndex is a bit vector of all 3-letter language codes that are not used as an index\n// in lookup tables. The language ids for these language codes are derived directly\n// from the letters and are not consecutive.\n// Size: 2197 bytes, 2197 elements\nvar langNoIndex = [2197]uint8{\n\t// Entry 0 - 3F\n\t0xff, 0xf8, 0xed, 0xfe, 0xeb, 0xd3, 0x3b, 0xd2,\n\t0xfb, 0xbf, 0x7a, 0xfa, 0x37, 0x1d, 0x3c, 0x57,\n\t0x6e, 0x97, 0x73, 0x38, 0xfb, 0xea, 0xbf, 0x70,\n\t0xad, 0x03, 0xff, 0xff, 0xcf, 0x05, 0x84, 0x72,\n\t0xe9, 0xbf, 0xfd, 0xbf, 0xbf, 0xf7, 0xfd, 0x77,\n\t0x0f, 0xff, 0xef, 0x6f, 0xff, 0xfb, 0xdf, 0xe2,\n\t0xc9, 0xf8, 0x7f, 0x7e, 0x4d, 0xbc, 0x0a, 0x6a,\n\t0x7c, 0xea, 0xe3, 0xfa, 0x7a, 0xbf, 0x67, 0xff,\n\t// Entry 40 - 7F\n\t0xff, 0xff, 0xff, 0xdf, 0x2a, 0x54, 0x91, 0xc0,\n\t0x5d, 0xe3, 0x97, 0x14, 0x07, 0x20, 0xdd, 0xed,\n\t0x9f, 0x3f, 0xc9, 0x21, 0xf8, 0x3f, 0x94, 0x35,\n\t0x7c, 0x5f, 0xff, 0x5f, 0x8e, 0x6e, 0xdf, 0xff,\n\t0xff, 0xff, 0x55, 0x7c, 0xd3, 0xfd, 0xbf, 0xb5,\n\t0x7b, 0xdf, 0x7f, 0xf7, 0xca, 0xfe, 0xdb, 0xa3,\n\t0xa8, 0xff, 0x1f, 0x67, 0x7d, 0xeb, 0xef, 0xce,\n\t0xff, 0xff, 0x9f, 0xff, 0xb7, 0xef, 0xfe, 0xcf,\n\t// Entry 80 - BF\n\t0xdb, 0xff, 0xf3, 0xcd, 0xfb, 0x7f, 0xff, 0xff,\n\t0xbb, 0xee, 0xf7, 0xbd, 0xdb, 0xff, 0x5f, 0xf7,\n\t0xfd, 0xf2, 0xfd, 0xff, 0x5e, 0x2f, 0x3b, 0xba,\n\t0x7e, 0xff, 0xff, 0xfe, 0xf7, 0xff, 0xdd, 0xff,\n\t0xfd, 0xdf, 0xfb, 0xfe, 0x9d, 0xb4, 0xd3, 0xff,\n\t0xef, 0xff, 0xdf, 0xf7, 0x7f, 0xb7, 0xfd, 0xd5,\n\t0xa5, 0x77, 0x40, 0xff, 0x9c, 0xc1, 0x41, 0x2c,\n\t0x08, 0x21, 0x41, 0x00, 0x50, 0x40, 0x00, 0x80,\n\t// Entry C0 - FF\n\t0xfb, 0x4a, 0xf2, 0x9f, 0xb4, 0x42, 0x41, 0x96,\n\t0x1b, 0x14, 0x08, 0xf3, 0x2b, 0xe7, 0x17, 0x56,\n\t0x05, 0x7d, 0x0e, 0x1c, 0x37, 0x7f, 0xf3, 0xef,\n\t0x97, 0xff, 0x5d, 0x38, 0x64, 0x08, 0x00, 0x10,\n\t0xbc, 0x85, 0xaf, 0xdf, 0xff, 0xff, 0x7b, 0x35,\n\t0x3e, 0xc7, 0xc7, 0xdf, 0xff, 0x01, 0x81, 0x00,\n\t0xb0, 0x05, 0x80, 0x00, 0x20, 0x00, 0x00, 0x03,\n\t0x40, 0x00, 0x40, 0x92, 0x21, 0x50, 0xb1, 0x5d,\n\t// Entry 100 - 13F\n\t0xfd, 0xdc, 0xbe, 0x5e, 0x00, 0x00, 0x02, 0x64,\n\t0x0d, 0x19, 0x41, 0xdf, 0x79, 0x22, 0x00, 0x00,\n\t0x00, 0x5e, 0x64, 0xdc, 0x24, 0xe5, 0xd9, 0xe3,\n\t0xfe, 0xff, 0xfd, 0xcb, 0x9f, 0x14, 0x41, 0x0c,\n\t0x86, 0x00, 0xd1, 0x00, 0xf0, 0xc7, 0x67, 0x5f,\n\t0x56, 0x99, 0x5e, 0xb5, 0x6c, 0xaf, 0x03, 0x00,\n\t0x02, 0x00, 0x00, 0x00, 0xc0, 0x37, 0xda, 0x56,\n\t0x90, 0x6d, 0x01, 0x2e, 0x96, 0x69, 0x20, 0xfb,\n\t// Entry 140 - 17F\n\t0xff, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x0c, 0x16,\n\t0x03, 0x00, 0x00, 0xb0, 0x14, 0x23, 0x50, 0x06,\n\t0x0a, 0x00, 0x01, 0x00, 0x00, 0x10, 0x11, 0x09,\n\t0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x10,\n\t0x00, 0x00, 0x44, 0x00, 0x00, 0x10, 0x00, 0x05,\n\t0x08, 0x00, 0x00, 0x05, 0x00, 0x80, 0x28, 0x04,\n\t0x00, 0x00, 0x40, 0xd5, 0x2d, 0x00, 0x64, 0x35,\n\t0x24, 0x52, 0xf4, 0xd5, 0xbf, 0x62, 0xc9, 0x03,\n\t// Entry 180 - 1BF\n\t0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x13, 0x39, 0x01, 0xdd, 0x57, 0x98,\n\t0x21, 0x18, 0x81, 0x08, 0x00, 0x01, 0x40, 0x82,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x40, 0x00, 0x44, 0x00, 0x00, 0x80, 0xea,\n\t0xa9, 0x39, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n\t// Entry 1C0 - 1FF\n\t0x00, 0x03, 0x28, 0x05, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x20, 0x04, 0xa6, 0x00, 0x04, 0x00, 0x00,\n\t0x81, 0x50, 0x00, 0x00, 0x00, 0x11, 0x84, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x55,\n\t0x02, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x40,\n\t0x30, 0x83, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x1e, 0xcd, 0xbf, 0x7a, 0xbf,\n\t// Entry 200 - 23F\n\t0xdf, 0xc3, 0x83, 0x82, 0xc0, 0xfb, 0x57, 0x27,\n\t0xed, 0x55, 0xe7, 0x01, 0x00, 0x20, 0xb2, 0xc5,\n\t0xa4, 0x45, 0x25, 0x9b, 0x02, 0xdf, 0xe1, 0xdf,\n\t0x03, 0x44, 0x08, 0x90, 0x01, 0x04, 0x81, 0xe3,\n\t0x92, 0x54, 0xdb, 0x28, 0xd3, 0x5f, 0xfe, 0x6d,\n\t0x79, 0xed, 0x1c, 0x7f, 0x04, 0x08, 0x00, 0x01,\n\t0x21, 0x12, 0x64, 0x5f, 0xdd, 0x0e, 0x85, 0x4f,\n\t0x40, 0x40, 0x00, 0x04, 0xf1, 0xfd, 0x3d, 0x54,\n\t// Entry 240 - 27F\n\t0xe8, 0x03, 0xb4, 0x27, 0x23, 0x0d, 0x00, 0x00,\n\t0x20, 0x7b, 0x78, 0x02, 0x07, 0x84, 0x00, 0xf0,\n\t0xbb, 0x7e, 0x5a, 0x00, 0x18, 0x04, 0x81, 0x00,\n\t0x00, 0x00, 0x80, 0x10, 0x90, 0x1c, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x04,\n\t0x08, 0xa0, 0x70, 0xa5, 0x0c, 0x40, 0x00, 0x00,\n\t0x91, 0x24, 0x04, 0x68, 0x00, 0x20, 0x70, 0xff,\n\t0x7b, 0x7f, 0x70, 0x00, 0x05, 0x9b, 0xdd, 0x66,\n\t// Entry 280 - 2BF\n\t0x03, 0x00, 0x11, 0x00, 0x00, 0x00, 0x40, 0x05,\n\t0xb5, 0xb6, 0x80, 0x08, 0x04, 0x00, 0x04, 0x51,\n\t0xe2, 0xef, 0xfd, 0x3f, 0x05, 0x09, 0x08, 0x05,\n\t0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,\n\t0x0c, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x60,\n\t0xe7, 0x48, 0x00, 0x81, 0x20, 0xc0, 0x05, 0x80,\n\t0x03, 0x00, 0x00, 0x00, 0x8c, 0x50, 0x40, 0x04,\n\t0x84, 0x47, 0x84, 0x40, 0x20, 0x10, 0x00, 0x20,\n\t// Entry 2C0 - 2FF\n\t0x02, 0x50, 0x80, 0x11, 0x00, 0x99, 0x6c, 0xe2,\n\t0x50, 0x27, 0x1d, 0x11, 0x29, 0x0e, 0x59, 0xe9,\n\t0x33, 0x08, 0x00, 0x20, 0x04, 0x40, 0x10, 0x00,\n\t0x00, 0x00, 0x50, 0x44, 0x92, 0x49, 0xd6, 0x5d,\n\t0xa7, 0x81, 0x47, 0x97, 0xfb, 0x00, 0x10, 0x00,\n\t0x08, 0x00, 0x80, 0x00, 0x40, 0x04, 0x00, 0x01,\n\t0x02, 0x00, 0x01, 0x40, 0x80, 0x00, 0x40, 0x08,\n\t0xd8, 0xeb, 0xf6, 0x39, 0xc4, 0x8d, 0x12, 0x00,\n\t// Entry 300 - 33F\n\t0x00, 0x0c, 0x04, 0x01, 0x20, 0x20, 0xdd, 0xa0,\n\t0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,\n\t0x04, 0x10, 0xd0, 0x9d, 0x95, 0x13, 0x04, 0x80,\n\t0x00, 0x01, 0xd0, 0x16, 0x40, 0x00, 0x10, 0xb0,\n\t0x10, 0x62, 0x4c, 0xd2, 0x02, 0x01, 0x4a, 0x00,\n\t0x46, 0x04, 0x00, 0x08, 0x02, 0x00, 0x20, 0x80,\n\t0x00, 0x80, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00,\n\t0x00, 0xf0, 0xd8, 0x6f, 0x15, 0x02, 0x08, 0x00,\n\t// Entry 340 - 37F\n\t0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0xf0, 0x84, 0xe3,\n\t0xdd, 0xbf, 0xf9, 0xf9, 0x3b, 0x7f, 0x7f, 0xdb,\n\t0xfd, 0xfc, 0xfe, 0xdf, 0xff, 0xfd, 0xff, 0xf6,\n\t0xfb, 0xfc, 0xf7, 0x1f, 0xff, 0xb3, 0x6c, 0xff,\n\t0xd9, 0xad, 0xdf, 0xfe, 0xef, 0xba, 0xdf, 0xff,\n\t0xff, 0xff, 0xb7, 0xdd, 0x7d, 0xbf, 0xab, 0x7f,\n\t0xfd, 0xfd, 0xdf, 0x2f, 0x9c, 0xdf, 0xf3, 0x6f,\n\t// Entry 380 - 3BF\n\t0xdf, 0xdd, 0xff, 0xfb, 0xee, 0xd2, 0xab, 0x5f,\n\t0xd5, 0xdf, 0x7f, 0xff, 0xeb, 0xff, 0xe4, 0x4d,\n\t0xf9, 0xff, 0xfe, 0xf7, 0xfd, 0xdf, 0xfb, 0xbf,\n\t0xee, 0xdb, 0x6f, 0xef, 0xff, 0x7f, 0xff, 0xff,\n\t0xf7, 0x5f, 0xd3, 0x3b, 0xfd, 0xd9, 0xdf, 0xeb,\n\t0xbc, 0x08, 0x05, 0x24, 0xff, 0x07, 0x70, 0xfe,\n\t0xe6, 0x5e, 0x00, 0x08, 0x00, 0x83, 0x7d, 0x1f,\n\t0x06, 0xe6, 0x72, 0x60, 0xd1, 0x3c, 0x7f, 0x44,\n\t// Entry 3C0 - 3FF\n\t0x02, 0x30, 0x9f, 0x7a, 0x16, 0xbd, 0x7f, 0x57,\n\t0xf2, 0xff, 0x31, 0xff, 0xf2, 0x1e, 0x90, 0xf7,\n\t0xf1, 0xf9, 0x45, 0x80, 0x01, 0x02, 0x00, 0x20,\n\t0x40, 0x54, 0x9f, 0x8a, 0xdf, 0xf9, 0x6e, 0x11,\n\t0x86, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x40, 0x03,\n\t0x05, 0xd1, 0x50, 0x5c, 0x00, 0x40, 0x00, 0x10,\n\t0x04, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x17, 0xd2,\n\t0xb9, 0xfd, 0xfc, 0xba, 0xfe, 0xef, 0xc7, 0xbe,\n\t// Entry 400 - 43F\n\t0x53, 0x6f, 0xdf, 0xe7, 0xdb, 0x65, 0xbb, 0x7f,\n\t0xfa, 0xff, 0x77, 0xf3, 0xef, 0xbf, 0xfd, 0xf7,\n\t0xdf, 0xdf, 0x9b, 0x7f, 0xff, 0xff, 0x7f, 0x6f,\n\t0xf7, 0xfb, 0xeb, 0xdf, 0xbc, 0xff, 0xbf, 0x6b,\n\t0x7b, 0xfb, 0xff, 0xce, 0x76, 0xbd, 0xf7, 0xf7,\n\t0xdf, 0xdc, 0xf7, 0xf7, 0xff, 0xdf, 0xf3, 0xfe,\n\t0xef, 0xff, 0xff, 0xff, 0xb6, 0x7f, 0x7f, 0xde,\n\t0xf7, 0xb9, 0xeb, 0x77, 0xff, 0xfb, 0xbf, 0xdf,\n\t// Entry 440 - 47F\n\t0xfd, 0xfe, 0xfb, 0xff, 0xfe, 0xeb, 0x1f, 0x7d,\n\t0x2f, 0xfd, 0xb6, 0xb5, 0xa5, 0xfc, 0xff, 0xfd,\n\t0x7f, 0x4e, 0xbf, 0x8f, 0xae, 0xff, 0xee, 0xdf,\n\t0x7f, 0xf7, 0x73, 0x02, 0x02, 0x04, 0xfc, 0xf7,\n\t0xff, 0xb7, 0xd7, 0xef, 0xfe, 0xcd, 0xf5, 0xce,\n\t0xe2, 0x8e, 0xe7, 0xbf, 0xb7, 0xff, 0x56, 0xfd,\n\t0xcd, 0xff, 0xfb, 0xff, 0xdf, 0xd7, 0xea, 0xff,\n\t0xe5, 0x5f, 0x6d, 0x0f, 0xa7, 0x51, 0x06, 0xc4,\n\t// Entry 480 - 4BF\n\t0x93, 0x50, 0x5d, 0xaf, 0xa6, 0xff, 0x99, 0xfb,\n\t0x63, 0x1d, 0x53, 0xff, 0xef, 0xb7, 0x35, 0x20,\n\t0x14, 0x00, 0x55, 0x51, 0xc2, 0x65, 0xf5, 0x41,\n\t0xe2, 0xff, 0xfc, 0xdf, 0x02, 0x85, 0xc5, 0x05,\n\t0x00, 0x22, 0x00, 0x74, 0x69, 0x10, 0x08, 0x05,\n\t0x41, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x51, 0x20, 0x05, 0x04, 0x01, 0x00, 0x00,\n\t0x06, 0x11, 0x20, 0x00, 0x18, 0x01, 0x92, 0xf1,\n\t// Entry 4C0 - 4FF\n\t0xfd, 0x47, 0x69, 0x06, 0x95, 0x06, 0x57, 0xed,\n\t0xfb, 0x4d, 0x1c, 0x6b, 0x83, 0x04, 0x62, 0x40,\n\t0x00, 0x11, 0x42, 0x00, 0x00, 0x00, 0x54, 0x83,\n\t0xb8, 0x4f, 0x10, 0x8e, 0x89, 0x46, 0xde, 0xf7,\n\t0x13, 0x31, 0x00, 0x20, 0x00, 0x00, 0x00, 0x90,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x00,\n\t0x01, 0x00, 0x00, 0xf0, 0x5b, 0xf4, 0xbe, 0x3d,\n\t0xbe, 0xcf, 0xf7, 0xaf, 0x42, 0x04, 0x84, 0x41,\n\t// Entry 500 - 53F\n\t0x30, 0xff, 0x79, 0x72, 0x04, 0x00, 0x00, 0x49,\n\t0x2d, 0x14, 0x27, 0x5f, 0xed, 0xf1, 0x3f, 0xe7,\n\t0x3f, 0x00, 0x00, 0x02, 0xc6, 0xa0, 0x1e, 0xf8,\n\t0xbb, 0xff, 0xfd, 0xfb, 0xb7, 0xfd, 0xe7, 0xf7,\n\t0xfd, 0xfc, 0xd5, 0xed, 0x47, 0xf4, 0x7e, 0x10,\n\t0x01, 0x01, 0x84, 0x6d, 0xff, 0xf7, 0xdd, 0xf9,\n\t0x5b, 0x05, 0x86, 0xed, 0xf5, 0x77, 0xbd, 0x3c,\n\t0x00, 0x00, 0x00, 0x42, 0x71, 0x42, 0x00, 0x40,\n\t// Entry 540 - 57F\n\t0x00, 0x00, 0x01, 0x43, 0x19, 0x24, 0x08, 0x00,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t// Entry 580 - 5BF\n\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n\t0xff, 0xab, 0xbd, 0xe7, 0x57, 0xee, 0x13, 0x5d,\n\t0x09, 0xc1, 0x40, 0x21, 0xfa, 0x17, 0x01, 0x80,\n\t0x00, 0x00, 0x00, 0x00, 0xf0, 0xce, 0xfb, 0xbf,\n\t0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,\n\t0x00, 0x30, 0x15, 0xa3, 0x10, 0x00, 0x00, 0x00,\n\t0x11, 0x04, 0x16, 0x00, 0x00, 0x02, 0x20, 0x81,\n\t0xa3, 0x01, 0x50, 0x00, 0x00, 0x83, 0x11, 0x40,\n\t// Entry 5C0 - 5FF\n\t0x00, 0x00, 0x00, 0xf0, 0xdd, 0x7b, 0xbe, 0x02,\n\t0xaa, 0x10, 0x5d, 0x98, 0x52, 0x00, 0x80, 0x20,\n\t0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x02,\n\t0x3d, 0x40, 0x10, 0x02, 0x10, 0x61, 0x5a, 0x9d,\n\t0x31, 0x00, 0x00, 0x00, 0x01, 0x18, 0x02, 0x20,\n\t0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x20, 0x00,\n\t0x00, 0x1f, 0xdf, 0xd2, 0xb9, 0xff, 0xfd, 0x3f,\n\t0x1f, 0x98, 0xcf, 0x9c, 0xff, 0xaf, 0x5f, 0xfe,\n\t// Entry 600 - 63F\n\t0x7b, 0x4b, 0x40, 0x10, 0xe1, 0xfd, 0xaf, 0xd9,\n\t0xb7, 0xf6, 0xfb, 0xb3, 0xc7, 0xff, 0x6f, 0xf1,\n\t0x73, 0xb1, 0x7f, 0x9f, 0x7f, 0xbd, 0xfc, 0xb7,\n\t0xee, 0x1c, 0xfa, 0xcb, 0xef, 0xdd, 0xf9, 0xbd,\n\t0x6e, 0xae, 0x55, 0xfd, 0x6e, 0x81, 0x76, 0x9f,\n\t0xd4, 0x77, 0xf5, 0x7d, 0xfb, 0xff, 0xeb, 0xfe,\n\t0xbe, 0x5f, 0x46, 0x5b, 0xe9, 0x5f, 0x50, 0x18,\n\t0x02, 0xfa, 0xf7, 0x9d, 0x15, 0x97, 0x05, 0x0f,\n\t// Entry 640 - 67F\n\t0x75, 0xc4, 0x7d, 0x81, 0x92, 0xf5, 0x57, 0x6c,\n\t0xff, 0xe4, 0xef, 0x6f, 0xff, 0xfc, 0xdd, 0xde,\n\t0xfc, 0xfd, 0x76, 0x5f, 0x7a, 0x3f, 0x00, 0x98,\n\t0x02, 0xfb, 0xa3, 0xef, 0xf3, 0xd6, 0xf2, 0xff,\n\t0xb9, 0xda, 0x7d, 0xd0, 0x3e, 0x15, 0x7b, 0xb4,\n\t0xf5, 0x3e, 0xff, 0xff, 0xf1, 0xf7, 0xff, 0xe7,\n\t0x5f, 0xff, 0xff, 0x9e, 0xdf, 0xf6, 0xd7, 0xb9,\n\t0xef, 0x27, 0x80, 0xbb, 0xc5, 0xff, 0xff, 0xe3,\n\t// Entry 680 - 6BF\n\t0x97, 0x9d, 0xbf, 0x9f, 0xf7, 0xc7, 0xfd, 0x37,\n\t0xce, 0x7f, 0x44, 0x1d, 0x73, 0x7f, 0xf8, 0xda,\n\t0x5d, 0xce, 0x7d, 0x06, 0xb9, 0xea, 0x79, 0xa0,\n\t0x1a, 0x20, 0x00, 0x30, 0x02, 0x04, 0x24, 0x08,\n\t0x04, 0x00, 0x00, 0x40, 0xd4, 0x02, 0x04, 0x00,\n\t0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x09, 0x06,\n\t0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00,\n\t0x04, 0x00, 0x10, 0xdc, 0x58, 0xd7, 0x0d, 0x0f,\n\t// Entry 6C0 - 6FF\n\t0x54, 0x4d, 0xf1, 0x16, 0x44, 0xd5, 0x42, 0x08,\n\t0x40, 0x02, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00,\n\t0x00, 0xdc, 0xfb, 0xcb, 0x0e, 0x58, 0x48, 0x41,\n\t0x24, 0x20, 0x04, 0x00, 0x30, 0x12, 0x40, 0x00,\n\t0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x80, 0x10, 0x10, 0xab,\n\t0x6d, 0x93, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x80, 0x80, 0x25, 0x00, 0x00,\n\t// Entry 700 - 73F\n\t0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,\n\t0x80, 0x86, 0xc2, 0x00, 0x00, 0x01, 0x00, 0x01,\n\t0xff, 0x18, 0x02, 0x00, 0x02, 0xf0, 0xfd, 0x79,\n\t0x3b, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,\n\t0x03, 0x00, 0x09, 0x20, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 740 - 77F\n\t0x00, 0x00, 0x00, 0xef, 0xd5, 0xfd, 0xcf, 0x7e,\n\t0xb0, 0x11, 0x00, 0x00, 0x00, 0x92, 0x01, 0x46,\n\t0xcd, 0xf9, 0x5c, 0x00, 0x01, 0x00, 0x30, 0x04,\n\t0x04, 0x55, 0x00, 0x01, 0x04, 0xf4, 0x3f, 0x4a,\n\t0x01, 0x00, 0x00, 0xb0, 0x80, 0x20, 0x55, 0x75,\n\t0x97, 0x7c, 0xdf, 0x31, 0xcc, 0x68, 0xd1, 0x03,\n\t0xd5, 0x57, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x2c, 0xf7, 0xcb, 0x1f, 0x14, 0x60,\n\t// Entry 780 - 7BF\n\t0x83, 0x68, 0x01, 0x10, 0x8b, 0x38, 0x8a, 0x01,\n\t0x00, 0x00, 0x20, 0x00, 0x24, 0x44, 0x00, 0x00,\n\t0x10, 0x03, 0x31, 0x02, 0x01, 0x00, 0x00, 0xf0,\n\t0xf5, 0xff, 0xd5, 0x97, 0xbc, 0x70, 0xd6, 0x78,\n\t0x78, 0x15, 0x50, 0x05, 0xa4, 0x84, 0xa9, 0x41,\n\t0x00, 0x00, 0x00, 0x6b, 0x39, 0x52, 0x74, 0x40,\n\t0xe8, 0x30, 0x90, 0x6a, 0x92, 0x00, 0x00, 0x02,\n\t0xff, 0xef, 0xff, 0x4b, 0x85, 0x53, 0xf4, 0xed,\n\t// Entry 7C0 - 7FF\n\t0xdd, 0xbf, 0xf2, 0x5d, 0xc7, 0x0c, 0xd5, 0x42,\n\t0xfc, 0xff, 0xf7, 0x1f, 0x00, 0x80, 0x40, 0x56,\n\t0xcc, 0x16, 0x9e, 0xea, 0x35, 0x7d, 0xef, 0xff,\n\t0xbd, 0xa4, 0xaf, 0x01, 0x44, 0x18, 0x01, 0x4d,\n\t0x4e, 0x4a, 0x08, 0x50, 0x28, 0x30, 0xe0, 0x80,\n\t0x10, 0x20, 0x24, 0x00, 0xff, 0x2f, 0xd3, 0x60,\n\t0xfe, 0x01, 0x02, 0x88, 0x2a, 0x40, 0x16, 0x01,\n\t0x01, 0x15, 0x2b, 0x3c, 0x01, 0x00, 0x00, 0x10,\n\t// Entry 800 - 83F\n\t0x90, 0x49, 0x41, 0x02, 0x02, 0x01, 0xe1, 0xbf,\n\t0xbf, 0x03, 0x00, 0x00, 0x10, 0xdc, 0xa3, 0xd1,\n\t0x40, 0x9c, 0x44, 0xdf, 0xf5, 0x8f, 0x66, 0xb3,\n\t0x55, 0x20, 0xd4, 0xc1, 0xd8, 0x30, 0x3d, 0x80,\n\t0x00, 0x00, 0x00, 0x04, 0xd4, 0x11, 0xc5, 0x84,\n\t0x2f, 0x50, 0x00, 0x22, 0x50, 0x6e, 0xbd, 0x93,\n\t0x07, 0x00, 0x20, 0x10, 0x84, 0xb2, 0x45, 0x10,\n\t0x06, 0x44, 0x00, 0x00, 0x12, 0x02, 0x11, 0x00,\n\t// Entry 840 - 87F\n\t0xf0, 0xfb, 0xfd, 0x7f, 0x05, 0x00, 0x16, 0x89,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x03,\n\t0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x02, 0x28,\n\t0x84, 0x00, 0x21, 0xc0, 0x23, 0x24, 0x00, 0x00,\n\t0x00, 0xcb, 0xe4, 0x3a, 0x46, 0x88, 0x54, 0xf1,\n\t0xef, 0xff, 0x7f, 0x12, 0x01, 0x01, 0x84, 0x50,\n\t0x07, 0xfc, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x40,\n\t0x10, 0x38, 0x01, 0x01, 0x1c, 0x12, 0x40, 0xe1,\n\t// Entry 880 - 8BF\n\t0x76, 0x16, 0x08, 0x03, 0x10, 0x00, 0x00, 0x00,\n\t0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24,\n\t0x0a, 0x00, 0x80, 0x00, 0x00,\n}\n\n// altLangISO3 holds an alphabetically sorted list of 3-letter language code alternatives\n// to 2-letter language codes that cannot be derived using the method described above.\n// Each 3-letter code is followed by its 1-byte langID.\nconst altLangISO3 tag.Index = \"---\\x00cor\\x00hbs\\x01heb\\x02kin\\x03spa\\x04yid\\x05\\xff\\xff\\xff\\xff\"\n\n// altLangIndex is used to convert indexes in altLangISO3 to langIDs.\n// Size: 12 bytes, 6 elements\nvar altLangIndex = [6]uint16{\n\t0x0281, 0x0407, 0x01fb, 0x03e5, 0x013e, 0x0208,\n}\n\n// AliasMap maps langIDs to their suggested replacements.\n// Size: 772 bytes, 193 elements\nvar AliasMap = [193]FromTo{\n\t0:   {From: 0x82, To: 0x88},\n\t1:   {From: 0x187, To: 0x1ae},\n\t2:   {From: 0x1f3, To: 0x1e1},\n\t3:   {From: 0x1fb, To: 0x1bc},\n\t4:   {From: 0x208, To: 0x512},\n\t5:   {From: 0x20f, To: 0x20e},\n\t6:   {From: 0x310, To: 0x3dc},\n\t7:   {From: 0x347, To: 0x36f},\n\t8:   {From: 0x407, To: 0x432},\n\t9:   {From: 0x47a, To: 0x153},\n\t10:  {From: 0x490, To: 0x451},\n\t11:  {From: 0x4a2, To: 0x21},\n\t12:  {From: 0x53e, To: 0x544},\n\t13:  {From: 0x58f, To: 0x12d},\n\t14:  {From: 0x62b, To: 0x34},\n\t15:  {From: 0x62f, To: 0x14},\n\t16:  {From: 0x630, To: 0x1eb1},\n\t17:  {From: 0x651, To: 0x431},\n\t18:  {From: 0x662, To: 0x431},\n\t19:  {From: 0x6ed, To: 0x3a},\n\t20:  {From: 0x6f8, To: 0x1d7},\n\t21:  {From: 0x709, To: 0x3625},\n\t22:  {From: 0x73e, To: 0x21a1},\n\t23:  {From: 0x7b3, To: 0x56},\n\t24:  {From: 0x7b9, To: 0x299b},\n\t25:  {From: 0x7c5, To: 0x58},\n\t26:  {From: 0x7e6, To: 0x145},\n\t27:  {From: 0x80c, To: 0x5a},\n\t28:  {From: 0x815, To: 0x8d},\n\t29:  {From: 0x87e, To: 0x810},\n\t30:  {From: 0x8a8, To: 0x8b7},\n\t31:  {From: 0x8c3, To: 0xee3},\n\t32:  {From: 0x8fa, To: 0x1dc},\n\t33:  {From: 0x9ef, To: 0x331},\n\t34:  {From: 0xa36, To: 0x2c5},\n\t35:  {From: 0xa3d, To: 0xbf},\n\t36:  {From: 0xabe, To: 0x3322},\n\t37:  {From: 0xb38, To: 0x529},\n\t38:  {From: 0xb75, To: 0x265a},\n\t39:  {From: 0xb7e, To: 0xbc3},\n\t40:  {From: 0xb9b, To: 0x44e},\n\t41:  {From: 0xbbc, To: 0x4229},\n\t42:  {From: 0xbbf, To: 0x529},\n\t43:  {From: 0xbfe, To: 0x2da7},\n\t44:  {From: 0xc2e, To: 0x3181},\n\t45:  {From: 0xcb9, To: 0xf3},\n\t46:  {From: 0xd08, To: 0xfa},\n\t47:  {From: 0xdc8, To: 0x11a},\n\t48:  {From: 0xdd7, To: 0x32d},\n\t49:  {From: 0xdf8, To: 0xdfb},\n\t50:  {From: 0xdfe, To: 0x531},\n\t51:  {From: 0xe01, To: 0xdf3},\n\t52:  {From: 0xedf, To: 0x205a},\n\t53:  {From: 0xee9, To: 0x222e},\n\t54:  {From: 0xeee, To: 0x2e9a},\n\t55:  {From: 0xf39, To: 0x367},\n\t56:  {From: 0x10d0, To: 0x140},\n\t57:  {From: 0x1104, To: 0x2d0},\n\t58:  {From: 0x11a0, To: 0x1ec},\n\t59:  {From: 0x1279, To: 0x21},\n\t60:  {From: 0x1424, To: 0x15e},\n\t61:  {From: 0x1470, To: 0x14e},\n\t62:  {From: 0x151f, To: 0xd9b},\n\t63:  {From: 0x1523, To: 0x390},\n\t64:  {From: 0x1532, To: 0x19f},\n\t65:  {From: 0x1580, To: 0x210},\n\t66:  {From: 0x1583, To: 0x10d},\n\t67:  {From: 0x15a3, To: 0x3caf},\n\t68:  {From: 0x1630, To: 0x222e},\n\t69:  {From: 0x166a, To: 0x19b},\n\t70:  {From: 0x16c8, To: 0x136},\n\t71:  {From: 0x1700, To: 0x29f8},\n\t72:  {From: 0x1718, To: 0x194},\n\t73:  {From: 0x1727, To: 0xf3f},\n\t74:  {From: 0x177a, To: 0x178},\n\t75:  {From: 0x1809, To: 0x17b6},\n\t76:  {From: 0x1816, To: 0x18f3},\n\t77:  {From: 0x188a, To: 0x436},\n\t78:  {From: 0x1979, To: 0x1d01},\n\t79:  {From: 0x1a74, To: 0x2bb0},\n\t80:  {From: 0x1a8a, To: 0x1f8},\n\t81:  {From: 0x1b5a, To: 0x1fa},\n\t82:  {From: 0x1b86, To: 0x1515},\n\t83:  {From: 0x1d64, To: 0x2c9b},\n\t84:  {From: 0x2038, To: 0x37b1},\n\t85:  {From: 0x203d, To: 0x20dd},\n\t86:  {From: 0x2042, To: 0x2e00},\n\t87:  {From: 0x205a, To: 0x30b},\n\t88:  {From: 0x20e3, To: 0x274},\n\t89:  {From: 0x20ee, To: 0x263},\n\t90:  {From: 0x20f2, To: 0x22d},\n\t91:  {From: 0x20f9, To: 0x256},\n\t92:  {From: 0x210f, To: 0x21eb},\n\t93:  {From: 0x2135, To: 0x27d},\n\t94:  {From: 0x2160, To: 0x913},\n\t95:  {From: 0x2199, To: 0x121},\n\t96:  {From: 0x21ce, To: 0x1561},\n\t97:  {From: 0x21e6, To: 0x504},\n\t98:  {From: 0x21f4, To: 0x49f},\n\t99:  {From: 0x21fb, To: 0x269},\n\t100: {From: 0x222d, To: 0x121},\n\t101: {From: 0x2237, To: 0x121},\n\t102: {From: 0x2248, To: 0x217d},\n\t103: {From: 0x2262, To: 0x92a},\n\t104: {From: 0x2316, To: 0x3226},\n\t105: {From: 0x236a, To: 0x2835},\n\t106: {From: 0x2382, To: 0x3365},\n\t107: {From: 0x2472, To: 0x2c7},\n\t108: {From: 0x24e4, To: 0x2ff},\n\t109: {From: 0x24f0, To: 0x2fa},\n\t110: {From: 0x24fa, To: 0x31f},\n\t111: {From: 0x2550, To: 0xb5b},\n\t112: {From: 0x25a9, To: 0xe2},\n\t113: {From: 0x263e, To: 0x2d0},\n\t114: {From: 0x26c9, To: 0x26b4},\n\t115: {From: 0x26f9, To: 0x3c8},\n\t116: {From: 0x2727, To: 0x3caf},\n\t117: {From: 0x2755, To: 0x6a4},\n\t118: {From: 0x2765, To: 0x26b4},\n\t119: {From: 0x2789, To: 0x4358},\n\t120: {From: 0x27c9, To: 0x2001},\n\t121: {From: 0x28ea, To: 0x27b1},\n\t122: {From: 0x28ef, To: 0x2837},\n\t123: {From: 0x28fe, To: 0xaa5},\n\t124: {From: 0x2914, To: 0x351},\n\t125: {From: 0x2986, To: 0x2da7},\n\t126: {From: 0x29f0, To: 0x96b},\n\t127: {From: 0x2b1a, To: 0x38d},\n\t128: {From: 0x2bfc, To: 0x395},\n\t129: {From: 0x2c3f, To: 0x3caf},\n\t130: {From: 0x2ce1, To: 0x2201},\n\t131: {From: 0x2cfc, To: 0x3be},\n\t132: {From: 0x2d13, To: 0x597},\n\t133: {From: 0x2d47, To: 0x148},\n\t134: {From: 0x2d48, To: 0x148},\n\t135: {From: 0x2dff, To: 0x2f1},\n\t136: {From: 0x2e08, To: 0x19cc},\n\t137: {From: 0x2e10, To: 0xc45},\n\t138: {From: 0x2e1a, To: 0x2d95},\n\t139: {From: 0x2e21, To: 0x292},\n\t140: {From: 0x2e54, To: 0x7d},\n\t141: {From: 0x2e65, To: 0x2282},\n\t142: {From: 0x2e97, To: 0x1a4},\n\t143: {From: 0x2ea0, To: 0x2e9b},\n\t144: {From: 0x2eef, To: 0x2ed7},\n\t145: {From: 0x3193, To: 0x3c4},\n\t146: {From: 0x3366, To: 0x338e},\n\t147: {From: 0x342a, To: 0x3dc},\n\t148: {From: 0x34ee, To: 0x18d0},\n\t149: {From: 0x35c8, To: 0x2c9b},\n\t150: {From: 0x35e6, To: 0x412},\n\t151: {From: 0x35f5, To: 0x24b},\n\t152: {From: 0x360d, To: 0x1dc},\n\t153: {From: 0x3658, To: 0x246},\n\t154: {From: 0x3676, To: 0x3f4},\n\t155: {From: 0x36fd, To: 0x445},\n\t156: {From: 0x3747, To: 0x3b42},\n\t157: {From: 0x37c0, To: 0x121},\n\t158: {From: 0x3816, To: 0x38f2},\n\t159: {From: 0x382a, To: 0x2b48},\n\t160: {From: 0x382b, To: 0x2c9b},\n\t161: {From: 0x382f, To: 0xa9},\n\t162: {From: 0x3832, To: 0x3228},\n\t163: {From: 0x386c, To: 0x39a6},\n\t164: {From: 0x3892, To: 0x3fc0},\n\t165: {From: 0x38a0, To: 0x45f},\n\t166: {From: 0x38a5, To: 0x39d7},\n\t167: {From: 0x38b4, To: 0x1fa4},\n\t168: {From: 0x38b5, To: 0x2e9a},\n\t169: {From: 0x38fa, To: 0x38f1},\n\t170: {From: 0x395c, To: 0x47e},\n\t171: {From: 0x3b4e, To: 0xd91},\n\t172: {From: 0x3b78, To: 0x137},\n\t173: {From: 0x3c99, To: 0x4bc},\n\t174: {From: 0x3fbd, To: 0x100},\n\t175: {From: 0x4208, To: 0xa91},\n\t176: {From: 0x42be, To: 0x573},\n\t177: {From: 0x42f9, To: 0x3f60},\n\t178: {From: 0x4378, To: 0x25a},\n\t179: {From: 0x43b8, To: 0xe6c},\n\t180: {From: 0x43cd, To: 0x10f},\n\t181: {From: 0x43d4, To: 0x4848},\n\t182: {From: 0x44af, To: 0x3322},\n\t183: {From: 0x44e3, To: 0x512},\n\t184: {From: 0x45ca, To: 0x2409},\n\t185: {From: 0x45dd, To: 0x26dc},\n\t186: {From: 0x4610, To: 0x48ae},\n\t187: {From: 0x46ae, To: 0x46a0},\n\t188: {From: 0x473e, To: 0x4745},\n\t189: {From: 0x4817, To: 0x3503},\n\t190: {From: 0x483b, To: 0x208b},\n\t191: {From: 0x4916, To: 0x31f},\n\t192: {From: 0x49a7, To: 0x523},\n}\n\n// Size: 193 bytes, 193 elements\nvar AliasTypes = [193]AliasType{\n\t// Entry 0 - 3F\n\t1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 0, 0, 0, 0,\n\t1, 2, 1, 1, 2, 0, 0, 1, 0, 1, 2, 1, 1, 0, 0, 0,\n\t0, 2, 1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 2, 1,\n\t1, 1, 1, 0, 0, 0, 0, 2, 1, 1, 1, 1, 2, 1, 0, 1,\n\t// Entry 40 - 7F\n\t1, 2, 2, 0, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0,\n\t2, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0,\n\t0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 0,\n\t1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,\n\t// Entry 80 - BF\n\t1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0,\n\t0, 1, 1, 2, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 0, 0,\n\t0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0,\n\t0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1,\n\t// Entry C0 - FF\n\t1,\n}\n\nconst (\n\t_Latn = 91\n\t_Hani = 57\n\t_Hans = 59\n\t_Hant = 60\n\t_Qaaa = 149\n\t_Qaai = 157\n\t_Qabx = 198\n\t_Zinh = 255\n\t_Zyyy = 260\n\t_Zzzz = 261\n)\n\n// script is an alphabetically sorted list of ISO 15924 codes. The index\n// of the script in the string, divided by 4, is the internal scriptID.\nconst script tag.Index = \"\" + // Size: 1052 bytes\n\t\"----AdlmAfakAghbAhomArabAranArmiArmnAvstBaliBamuBassBatkBengBhksBlisBopo\" +\n\t\"BrahBraiBugiBuhdCakmCansCariChamCherChrsCirtCoptCpmnCprtCyrlCyrsDevaDiak\" +\n\t\"DogrDsrtDuplEgydEgyhEgypElbaElymEthiGeokGeorGlagGongGonmGothGranGrekGujr\" +\n\t\"GuruHanbHangHaniHanoHansHantHatrHebrHiraHluwHmngHmnpHrktHungIndsItalJamo\" +\n\t\"JavaJpanJurcKaliKanaKawiKharKhmrKhojKitlKitsKndaKoreKpelKthiLanaLaooLatf\" +\n\t\"LatgLatnLekeLepcLimbLinaLinbLisuLomaLyciLydiMahjMakaMandManiMarcMayaMedf\" +\n\t\"MendMercMeroMlymModiMongMoonMrooMteiMultMymrNagmNandNarbNbatNewaNkdbNkgb\" +\n\t\"NkooNshuOgamOlckOrkhOryaOsgeOsmaOugrPalmPaucPcunPelmPermPhagPhliPhlpPhlv\" +\n\t\"PhnxPiqdPlrdPrtiPsinQaaaQaabQaacQaadQaaeQaafQaagQaahQaaiQaajQaakQaalQaam\" +\n\t\"QaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaazQabaQabbQabcQabdQabe\" +\n\t\"QabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabrQabsQabtQabuQabvQabw\" +\n\t\"QabxRanjRjngRohgRoroRunrSamrSaraSarbSaurSgnwShawShrdShuiSiddSindSinhSogd\" +\n\t\"SogoSoraSoyoSundSunuSyloSyrcSyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTelu\" +\n\t\"TengTfngTglgThaaThaiTibtTirhTnsaTotoUgarVaiiVispVithWaraWchoWoleXpeoXsux\" +\n\t\"YeziYiiiZanbZinhZmthZsyeZsymZxxxZyyyZzzz\\xff\\xff\\xff\\xff\"\n\n// suppressScript is an index from langID to the dominant script for that language,\n// if it exists.  If a script is given, it should be suppressed from the language tag.\n// Size: 1330 bytes, 1330 elements\nvar suppressScript = [1330]uint8{\n\t// Entry 0 - 3F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 40 - 7F\n\t0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,\n\t// Entry 80 - BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry C0 - FF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 100 - 13F\n\t0x5b, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xed, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x5b, 0x00, 0x5b, 0x00,\n\t// Entry 140 - 17F\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x5b, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 180 - 1BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x5b, 0x35, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x22, 0x00,\n\t// Entry 1C0 - 1FF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x5b, 0x00, 0x5b, 0x5b, 0x00, 0x08,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x5b, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 200 - 23F\n\t0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 240 - 27F\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x53, 0x00, 0x00, 0x54, 0x00, 0x22, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 280 - 2BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 2C0 - 2FF\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,\n\t// Entry 300 - 33F\n\t0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x5b,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t// Entry 340 - 37F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x5b, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5b, 0x00,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 380 - 3BF\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,\n\t// Entry 3C0 - 3FF\n\t0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x20, 0x00, 0x00, 0x5b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 400 - 43F\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 440 - 47F\n\t0x00, 0x00, 0x00, 0x00, 0x5b, 0x5b, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0xe9, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x2c,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t// Entry 480 - 4BF\n\t0x5b, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x5b, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 4C0 - 4FF\n\t0x5b, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 500 - 53F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,\n\t0x00, 0x00,\n}\n\nconst (\n\t_001 = 1\n\t_419 = 31\n\t_BR  = 65\n\t_CA  = 73\n\t_ES  = 111\n\t_GB  = 124\n\t_MD  = 189\n\t_PT  = 239\n\t_UK  = 307\n\t_US  = 310\n\t_ZZ  = 358\n\t_XA  = 324\n\t_XC  = 326\n\t_XK  = 334\n)\n\n// isoRegionOffset needs to be added to the index of regionISO to obtain the regionID\n// for 2-letter ISO codes. (The first isoRegionOffset regionIDs are reserved for\n// the UN.M49 codes used for groups.)\nconst isoRegionOffset = 32\n\n// regionTypes defines the status of a region for various standards.\n// Size: 359 bytes, 359 elements\nvar regionTypes = [359]uint8{\n\t// Entry 0 - 3F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t// Entry 40 - 7F\n\t0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x04, 0x06,\n\t0x04, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x04, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x00,\n\t0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x00, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t// Entry 80 - BF\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x00, 0x04, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t// Entry C0 - FF\n\t0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x00, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04,\n\t0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x00, 0x06, 0x06, 0x00, 0x06, 0x05, 0x05, 0x05,\n\t0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,\n\t// Entry 100 - 13F\n\t0x05, 0x05, 0x05, 0x06, 0x00, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x02, 0x06, 0x04, 0x06, 0x06,\n\t0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06,\n\t// Entry 140 - 17F\n\t0x06, 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05,\n\t0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,\n\t0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,\n\t0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x06,\n\t0x06, 0x04, 0x06, 0x06, 0x04, 0x06, 0x05,\n}\n\n// regionISO holds a list of alphabetically sorted 2-letter ISO region codes.\n// Each 2-letter codes is followed by two bytes with the following meaning:\n//   - [A-Z}{2}: the first letter of the 2-letter code plus these two\n//     letters form the 3-letter ISO code.\n//   - 0, n:     index into altRegionISO3.\nconst regionISO tag.Index = \"\" + // Size: 1312 bytes\n\t\"AAAAACSCADNDAEREAFFGAGTGAIIAALLBAMRMANNTAOGOAQTAARRGASSMATUTAUUSAWBWAXLA\" +\n\t\"AZZEBAIHBBRBBDGDBEELBFFABGGRBHHRBIDIBJENBLLMBMMUBNRNBOOLBQESBRRABSHSBTTN\" +\n\t\"BUURBVVTBWWABYLRBZLZCAANCCCKCDODCFAFCGOGCHHECIIVCKOKCLHLCMMRCNHNCOOLCPPT\" +\n\t\"CQ  CRRICS\\x00\\x00CTTECUUBCVPVCWUWCXXRCYYPCZZEDDDRDEEUDGGADJJIDKNKDMMADO\" +\n\t\"OMDYHYDZZAEA  ECCUEESTEGGYEHSHERRIESSPETTHEU\\x00\\x03EZ  FIINFJJIFKLKFMSM\" +\n\t\"FOROFQ\\x00\\x18FRRAFXXXGAABGBBRGDRDGEEOGFUFGGGYGHHAGIIBGLRLGMMBGNINGPLPGQ\" +\n\t\"NQGRRCGS\\x00\\x06GTTMGUUMGWNBGYUYHKKGHMMDHNNDHRRVHTTIHUUNHVVOIC  IDDNIERL\" +\n\t\"ILSRIMMNINNDIOOTIQRQIRRNISSLITTAJEEYJMAMJOORJPPNJTTNKEENKGGZKHHMKIIRKM\" +\n\t\"\\x00\\x09KNNAKP\\x00\\x0cKRORKWWTKY\\x00\\x0fKZAZLAAOLBBNLCCALIIELKKALRBRLSSO\" +\n\t\"LTTULUUXLVVALYBYMAARMCCOMDDAMENEMFAFMGDGMHHLMIIDMKKDMLLIMMMRMNNGMOACMPNP\" +\n\t\"MQTQMRRTMSSRMTLTMUUSMVDVMWWIMXEXMYYSMZOZNAAMNCCLNEERNFFKNGGANHHBNIICNLLD\" +\n\t\"NOORNPPLNQ\\x00\\x1eNRRUNTTZNUIUNZZLOMMNPAANPCCIPEERPFYFPGNGPHHLPKAKPLOLPM\" +\n\t\"\\x00\\x12PNCNPRRIPSSEPTRTPUUSPWLWPYRYPZCZQAATQMMMQNNNQOOOQPPPQQQQQRRRQSSS\" +\n\t\"QTTTQU\\x00\\x03QVVVQWWWQXXXQYYYQZZZREEURHHOROOURS\\x00\\x15RUUSRWWASAAUSBLB\" +\n\t\"SCYCSDDNSEWESGGPSHHNSIVNSJJMSKVKSLLESMMRSNENSOOMSRURSSSDSTTPSUUNSVLVSXXM\" +\n\t\"SYYRSZWZTAAATCCATDCDTF\\x00\\x18TGGOTHHATJJKTKKLTLLSTMKMTNUNTOONTPMPTRURTT\" +\n\t\"TOTVUVTWWNTZZAUAKRUGGAUK  UMMIUN  USSAUYRYUZZBVAATVCCTVDDRVEENVGGBVIIRVN\" +\n\t\"NMVUUTWFLFWKAKWSSMXAAAXBBBXCCCXDDDXEEEXFFFXGGGXHHHXIIIXJJJXKKKXLLLXMMMXN\" +\n\t\"NNXOOOXPPPXQQQXRRRXSSSXTTTXUUUXVVVXWWWXXXXXYYYXZZZYDMDYEEMYT\\x00\\x1bYUUG\" +\n\t\"ZAAFZMMBZRARZWWEZZZZ\\xff\\xff\\xff\\xff\"\n\n// altRegionISO3 holds a list of 3-letter region codes that cannot be\n// mapped to 2-letter codes using the default algorithm. This is a short list.\nconst altRegionISO3 string = \"SCGQUUSGSCOMPRKCYMSPMSRBATFMYTATN\"\n\n// altRegionIDs holds a list of regionIDs the positions of which match those\n// of the 3-letter ISO codes in altRegionISO3.\n// Size: 22 bytes, 11 elements\nvar altRegionIDs = [11]uint16{\n\t0x0058, 0x0071, 0x0089, 0x00a9, 0x00ab, 0x00ae, 0x00eb, 0x0106,\n\t0x0122, 0x0160, 0x00dd,\n}\n\n// Size: 80 bytes, 20 elements\nvar regionOldMap = [20]FromTo{\n\t0:  {From: 0x44, To: 0xc5},\n\t1:  {From: 0x59, To: 0xa8},\n\t2:  {From: 0x60, To: 0x61},\n\t3:  {From: 0x67, To: 0x3b},\n\t4:  {From: 0x7a, To: 0x79},\n\t5:  {From: 0x94, To: 0x37},\n\t6:  {From: 0xa4, To: 0x134},\n\t7:  {From: 0xc2, To: 0x134},\n\t8:  {From: 0xd8, To: 0x140},\n\t9:  {From: 0xdd, To: 0x2b},\n\t10: {From: 0xf0, To: 0x134},\n\t11: {From: 0xf3, To: 0xe3},\n\t12: {From: 0xfd, To: 0x71},\n\t13: {From: 0x104, To: 0x165},\n\t14: {From: 0x12b, To: 0x127},\n\t15: {From: 0x133, To: 0x7c},\n\t16: {From: 0x13b, To: 0x13f},\n\t17: {From: 0x142, To: 0x134},\n\t18: {From: 0x15e, To: 0x15f},\n\t19: {From: 0x164, To: 0x4b},\n}\n\n// m49 maps regionIDs to UN.M49 codes. The first isoRegionOffset entries are\n// codes indicating collections of regions.\n// Size: 718 bytes, 359 elements\nvar m49 = [359]int16{\n\t// Entry 0 - 3F\n\t0, 1, 2, 3, 5, 9, 11, 13,\n\t14, 15, 17, 18, 19, 21, 29, 30,\n\t34, 35, 39, 53, 54, 57, 61, 142,\n\t143, 145, 150, 151, 154, 155, 202, 419,\n\t958, 0, 20, 784, 4, 28, 660, 8,\n\t51, 530, 24, 10, 32, 16, 40, 36,\n\t533, 248, 31, 70, 52, 50, 56, 854,\n\t100, 48, 108, 204, 652, 60, 96, 68,\n\t// Entry 40 - 7F\n\t535, 76, 44, 64, 104, 74, 72, 112,\n\t84, 124, 166, 180, 140, 178, 756, 384,\n\t184, 152, 120, 156, 170, 0, 0, 188,\n\t891, 296, 192, 132, 531, 162, 196, 203,\n\t278, 276, 0, 262, 208, 212, 214, 204,\n\t12, 0, 218, 233, 818, 732, 232, 724,\n\t231, 967, 0, 246, 242, 238, 583, 234,\n\t0, 250, 249, 266, 826, 308, 268, 254,\n\t// Entry 80 - BF\n\t831, 288, 292, 304, 270, 324, 312, 226,\n\t300, 239, 320, 316, 624, 328, 344, 334,\n\t340, 191, 332, 348, 854, 0, 360, 372,\n\t376, 833, 356, 86, 368, 364, 352, 380,\n\t832, 388, 400, 392, 581, 404, 417, 116,\n\t296, 174, 659, 408, 410, 414, 136, 398,\n\t418, 422, 662, 438, 144, 430, 426, 440,\n\t442, 428, 434, 504, 492, 498, 499, 663,\n\t// Entry C0 - FF\n\t450, 584, 581, 807, 466, 104, 496, 446,\n\t580, 474, 478, 500, 470, 480, 462, 454,\n\t484, 458, 508, 516, 540, 562, 574, 566,\n\t548, 558, 528, 578, 524, 10, 520, 536,\n\t570, 554, 512, 591, 0, 604, 258, 598,\n\t608, 586, 616, 666, 612, 630, 275, 620,\n\t581, 585, 600, 591, 634, 959, 960, 961,\n\t962, 963, 964, 965, 966, 967, 968, 969,\n\t// Entry 100 - 13F\n\t970, 971, 972, 638, 716, 642, 688, 643,\n\t646, 682, 90, 690, 729, 752, 702, 654,\n\t705, 744, 703, 694, 674, 686, 706, 740,\n\t728, 678, 810, 222, 534, 760, 748, 0,\n\t796, 148, 260, 768, 764, 762, 772, 626,\n\t795, 788, 776, 626, 792, 780, 798, 158,\n\t834, 804, 800, 826, 581, 0, 840, 858,\n\t860, 336, 670, 704, 862, 92, 850, 704,\n\t// Entry 140 - 17F\n\t548, 876, 581, 882, 973, 974, 975, 976,\n\t977, 978, 979, 980, 981, 982, 983, 984,\n\t985, 986, 987, 988, 989, 990, 991, 992,\n\t993, 994, 995, 996, 997, 998, 720, 887,\n\t175, 891, 710, 894, 180, 716, 999,\n}\n\n// m49Index gives indexes into fromM49 based on the three most significant bits\n// of a 10-bit UN.M49 code. To search an UN.M49 code in fromM49, search in\n//\n//\tfromM49[m49Index[msb39(code)]:m49Index[msb3(code)+1]]\n//\n// for an entry where the first 7 bits match the 7 lsb of the UN.M49 code.\n// The region code is stored in the 9 lsb of the indexed value.\n// Size: 18 bytes, 9 elements\nvar m49Index = [9]int16{\n\t0, 59, 108, 143, 181, 220, 259, 291,\n\t333,\n}\n\n// fromM49 contains entries to map UN.M49 codes to regions. See m49Index for details.\n// Size: 666 bytes, 333 elements\nvar fromM49 = [333]uint16{\n\t// Entry 0 - 3F\n\t0x0201, 0x0402, 0x0603, 0x0824, 0x0a04, 0x1027, 0x1205, 0x142b,\n\t0x1606, 0x1868, 0x1a07, 0x1c08, 0x1e09, 0x202d, 0x220a, 0x240b,\n\t0x260c, 0x2822, 0x2a0d, 0x302a, 0x3825, 0x3a0e, 0x3c0f, 0x3e32,\n\t0x402c, 0x4410, 0x4611, 0x482f, 0x4e12, 0x502e, 0x5842, 0x6039,\n\t0x6435, 0x6628, 0x6834, 0x6a13, 0x6c14, 0x7036, 0x7215, 0x783d,\n\t0x7a16, 0x8043, 0x883f, 0x8c33, 0x9046, 0x9445, 0x9841, 0xa848,\n\t0xac9b, 0xb50a, 0xb93d, 0xc03e, 0xc838, 0xd0c5, 0xd83a, 0xe047,\n\t0xe8a7, 0xf052, 0xf849, 0x085b, 0x10ae, 0x184c, 0x1c17, 0x1e18,\n\t// Entry 40 - 7F\n\t0x20b4, 0x2219, 0x2921, 0x2c1a, 0x2e1b, 0x3051, 0x341c, 0x361d,\n\t0x3853, 0x3d2f, 0x445d, 0x4c4a, 0x5454, 0x5ca9, 0x5f60, 0x644d,\n\t0x684b, 0x7050, 0x7857, 0x7e91, 0x805a, 0x885e, 0x941e, 0x965f,\n\t0x983b, 0xa064, 0xa865, 0xac66, 0xb46a, 0xbd1b, 0xc487, 0xcc70,\n\t0xce70, 0xd06e, 0xd26b, 0xd477, 0xdc75, 0xde89, 0xe474, 0xec73,\n\t0xf031, 0xf27a, 0xf479, 0xfc7f, 0x04e6, 0x0922, 0x0c63, 0x147b,\n\t0x187e, 0x1c84, 0x26ee, 0x2861, 0x2c60, 0x3061, 0x4081, 0x4882,\n\t0x50a8, 0x5888, 0x6083, 0x687d, 0x7086, 0x788b, 0x808a, 0x8885,\n\t// Entry 80 - BF\n\t0x908d, 0x9892, 0x9c8f, 0xa139, 0xa890, 0xb08e, 0xb893, 0xc09e,\n\t0xc89a, 0xd096, 0xd89d, 0xe09c, 0xe897, 0xf098, 0xf89f, 0x004f,\n\t0x08a1, 0x10a3, 0x1caf, 0x20a2, 0x28a5, 0x30ab, 0x34ac, 0x3cad,\n\t0x42a6, 0x44b0, 0x461f, 0x4cb1, 0x54b6, 0x58b9, 0x5cb5, 0x64ba,\n\t0x6cb3, 0x70b7, 0x74b8, 0x7cc7, 0x84c0, 0x8ccf, 0x94d1, 0x9cce,\n\t0xa4c4, 0xaccc, 0xb4c9, 0xbcca, 0xc0cd, 0xc8d0, 0xd8bc, 0xe0c6,\n\t0xe4bd, 0xe6be, 0xe8cb, 0xf0bb, 0xf8d2, 0x00e2, 0x08d3, 0x10de,\n\t0x18dc, 0x20da, 0x2429, 0x265c, 0x2a30, 0x2d1c, 0x2e40, 0x30df,\n\t// Entry C0 - FF\n\t0x38d4, 0x4940, 0x54e1, 0x5cd9, 0x64d5, 0x6cd7, 0x74e0, 0x7cd6,\n\t0x84db, 0x88c8, 0x8b34, 0x8e76, 0x90c1, 0x92f1, 0x94e9, 0x9ee3,\n\t0xace7, 0xb0f2, 0xb8e5, 0xc0e8, 0xc8ec, 0xd0ea, 0xd8ef, 0xe08c,\n\t0xe527, 0xeced, 0xf4f4, 0xfd03, 0x0505, 0x0707, 0x0d08, 0x183c,\n\t0x1d0f, 0x26aa, 0x2826, 0x2cb2, 0x2ebf, 0x34eb, 0x3d3a, 0x4514,\n\t0x4d19, 0x5509, 0x5d15, 0x6106, 0x650b, 0x6d13, 0x7d0e, 0x7f12,\n\t0x813f, 0x8310, 0x8516, 0x8d62, 0x9965, 0xa15e, 0xa86f, 0xb118,\n\t0xb30c, 0xb86d, 0xc10c, 0xc917, 0xd111, 0xd91e, 0xe10d, 0xe84e,\n\t// Entry 100 - 13F\n\t0xf11d, 0xf525, 0xf924, 0x0123, 0x0926, 0x112a, 0x192d, 0x2023,\n\t0x2929, 0x312c, 0x3728, 0x3920, 0x3d2e, 0x4132, 0x4931, 0x4ec3,\n\t0x551a, 0x646c, 0x747c, 0x7e80, 0x80a0, 0x8299, 0x8530, 0x9136,\n\t0xa53e, 0xac37, 0xb537, 0xb938, 0xbd3c, 0xd941, 0xe543, 0xed5f,\n\t0xef5f, 0xf658, 0xfd63, 0x7c20, 0x7ef5, 0x80f6, 0x82f7, 0x84f8,\n\t0x86f9, 0x88fa, 0x8afb, 0x8cfc, 0x8e71, 0x90fe, 0x92ff, 0x9500,\n\t0x9701, 0x9902, 0x9b44, 0x9d45, 0x9f46, 0xa147, 0xa348, 0xa549,\n\t0xa74a, 0xa94b, 0xab4c, 0xad4d, 0xaf4e, 0xb14f, 0xb350, 0xb551,\n\t// Entry 140 - 17F\n\t0xb752, 0xb953, 0xbb54, 0xbd55, 0xbf56, 0xc157, 0xc358, 0xc559,\n\t0xc75a, 0xc95b, 0xcb5c, 0xcd5d, 0xcf66,\n}\n\n// Size: 2128 bytes\nvar variantIndex = map[string]uint8{\n\t\"1606nict\": 0x0,\n\t\"1694acad\": 0x1,\n\t\"1901\":     0x2,\n\t\"1959acad\": 0x3,\n\t\"1994\":     0x67,\n\t\"1996\":     0x4,\n\t\"abl1943\":  0x5,\n\t\"akuapem\":  0x6,\n\t\"alalc97\":  0x69,\n\t\"aluku\":    0x7,\n\t\"ao1990\":   0x8,\n\t\"aranes\":   0x9,\n\t\"arevela\":  0xa,\n\t\"arevmda\":  0xb,\n\t\"arkaika\":  0xc,\n\t\"asante\":   0xd,\n\t\"auvern\":   0xe,\n\t\"baku1926\": 0xf,\n\t\"balanka\":  0x10,\n\t\"barla\":    0x11,\n\t\"basiceng\": 0x12,\n\t\"bauddha\":  0x13,\n\t\"bciav\":    0x14,\n\t\"bcizbl\":   0x15,\n\t\"biscayan\": 0x16,\n\t\"biske\":    0x62,\n\t\"bohoric\":  0x17,\n\t\"boont\":    0x18,\n\t\"bornholm\": 0x19,\n\t\"cisaup\":   0x1a,\n\t\"colb1945\": 0x1b,\n\t\"cornu\":    0x1c,\n\t\"creiss\":   0x1d,\n\t\"dajnko\":   0x1e,\n\t\"ekavsk\":   0x1f,\n\t\"emodeng\":  0x20,\n\t\"fonipa\":   0x6a,\n\t\"fonkirsh\": 0x6b,\n\t\"fonnapa\":  0x6c,\n\t\"fonupa\":   0x6d,\n\t\"fonxsamp\": 0x6e,\n\t\"gallo\":    0x21,\n\t\"gascon\":   0x22,\n\t\"grclass\":  0x23,\n\t\"grital\":   0x24,\n\t\"grmistr\":  0x25,\n\t\"hepburn\":  0x26,\n\t\"heploc\":   0x68,\n\t\"hognorsk\": 0x27,\n\t\"hsistemo\": 0x28,\n\t\"ijekavsk\": 0x29,\n\t\"itihasa\":  0x2a,\n\t\"ivanchov\": 0x2b,\n\t\"jauer\":    0x2c,\n\t\"jyutping\": 0x2d,\n\t\"kkcor\":    0x2e,\n\t\"kociewie\": 0x2f,\n\t\"kscor\":    0x30,\n\t\"laukika\":  0x31,\n\t\"lemosin\":  0x32,\n\t\"lengadoc\": 0x33,\n\t\"lipaw\":    0x63,\n\t\"ltg1929\":  0x34,\n\t\"ltg2007\":  0x35,\n\t\"luna1918\": 0x36,\n\t\"metelko\":  0x37,\n\t\"monoton\":  0x38,\n\t\"ndyuka\":   0x39,\n\t\"nedis\":    0x3a,\n\t\"newfound\": 0x3b,\n\t\"nicard\":   0x3c,\n\t\"njiva\":    0x64,\n\t\"nulik\":    0x3d,\n\t\"osojs\":    0x65,\n\t\"oxendict\": 0x3e,\n\t\"pahawh2\":  0x3f,\n\t\"pahawh3\":  0x40,\n\t\"pahawh4\":  0x41,\n\t\"pamaka\":   0x42,\n\t\"peano\":    0x43,\n\t\"petr1708\": 0x44,\n\t\"pinyin\":   0x45,\n\t\"polyton\":  0x46,\n\t\"provenc\":  0x47,\n\t\"puter\":    0x48,\n\t\"rigik\":    0x49,\n\t\"rozaj\":    0x4a,\n\t\"rumgr\":    0x4b,\n\t\"scotland\": 0x4c,\n\t\"scouse\":   0x4d,\n\t\"simple\":   0x6f,\n\t\"solba\":    0x66,\n\t\"sotav\":    0x4e,\n\t\"spanglis\": 0x4f,\n\t\"surmiran\": 0x50,\n\t\"sursilv\":  0x51,\n\t\"sutsilv\":  0x52,\n\t\"synnejyl\": 0x53,\n\t\"tarask\":   0x54,\n\t\"tongyong\": 0x55,\n\t\"tunumiit\": 0x56,\n\t\"uccor\":    0x57,\n\t\"ucrcor\":   0x58,\n\t\"ulster\":   0x59,\n\t\"unifon\":   0x5a,\n\t\"vaidika\":  0x5b,\n\t\"valencia\": 0x5c,\n\t\"vallader\": 0x5d,\n\t\"vecdruka\": 0x5e,\n\t\"vivaraup\": 0x5f,\n\t\"wadegile\": 0x60,\n\t\"xsistemo\": 0x61,\n}\n\n// variantNumSpecialized is the number of specialized variants in variants.\nconst variantNumSpecialized = 105\n\n// nRegionGroups is the number of region groups.\nconst nRegionGroups = 33\n\ntype likelyLangRegion struct {\n\tlang   uint16\n\tregion uint16\n}\n\n// likelyScript is a lookup table, indexed by scriptID, for the most likely\n// languages and regions given a script.\n// Size: 1052 bytes, 263 elements\nvar likelyScript = [263]likelyLangRegion{\n\t1:   {lang: 0x14e, region: 0x85},\n\t3:   {lang: 0x2a2, region: 0x107},\n\t4:   {lang: 0x1f, region: 0x9a},\n\t5:   {lang: 0x3a, region: 0x6c},\n\t7:   {lang: 0x3b, region: 0x9d},\n\t8:   {lang: 0x1d7, region: 0x28},\n\t9:   {lang: 0x13, region: 0x9d},\n\t10:  {lang: 0x5b, region: 0x96},\n\t11:  {lang: 0x60, region: 0x52},\n\t12:  {lang: 0xb9, region: 0xb5},\n\t13:  {lang: 0x63, region: 0x96},\n\t14:  {lang: 0xa5, region: 0x35},\n\t15:  {lang: 0x3e9, region: 0x9a},\n\t17:  {lang: 0x529, region: 0x12f},\n\t18:  {lang: 0x3b1, region: 0x9a},\n\t19:  {lang: 0x15e, region: 0x79},\n\t20:  {lang: 0xc2, region: 0x96},\n\t21:  {lang: 0x9d, region: 0xe8},\n\t22:  {lang: 0xdb, region: 0x35},\n\t23:  {lang: 0xf3, region: 0x49},\n\t24:  {lang: 0x4f0, region: 0x12c},\n\t25:  {lang: 0xe7, region: 0x13f},\n\t26:  {lang: 0xe5, region: 0x136},\n\t29:  {lang: 0xf1, region: 0x6c},\n\t31:  {lang: 0x1a0, region: 0x5e},\n\t32:  {lang: 0x3e2, region: 0x107},\n\t34:  {lang: 0x1be, region: 0x9a},\n\t38:  {lang: 0x15e, region: 0x79},\n\t41:  {lang: 0x133, region: 0x6c},\n\t42:  {lang: 0x431, region: 0x27},\n\t44:  {lang: 0x27, region: 0x70},\n\t46:  {lang: 0x210, region: 0x7e},\n\t47:  {lang: 0xfe, region: 0x38},\n\t49:  {lang: 0x19b, region: 0x9a},\n\t50:  {lang: 0x19e, region: 0x131},\n\t51:  {lang: 0x3e9, region: 0x9a},\n\t52:  {lang: 0x136, region: 0x88},\n\t53:  {lang: 0x1a4, region: 0x9a},\n\t54:  {lang: 0x39d, region: 0x9a},\n\t55:  {lang: 0x529, region: 0x12f},\n\t56:  {lang: 0x254, region: 0xac},\n\t57:  {lang: 0x529, region: 0x53},\n\t58:  {lang: 0x1cb, region: 0xe8},\n\t59:  {lang: 0x529, region: 0x53},\n\t60:  {lang: 0x529, region: 0x12f},\n\t61:  {lang: 0x2fd, region: 0x9c},\n\t62:  {lang: 0x1bc, region: 0x98},\n\t63:  {lang: 0x200, region: 0xa3},\n\t64:  {lang: 0x1c5, region: 0x12c},\n\t65:  {lang: 0x1ca, region: 0xb0},\n\t68:  {lang: 0x1d5, region: 0x93},\n\t70:  {lang: 0x142, region: 0x9f},\n\t71:  {lang: 0x254, region: 0xac},\n\t72:  {lang: 0x20e, region: 0x96},\n\t73:  {lang: 0x200, region: 0xa3},\n\t75:  {lang: 0x135, region: 0xc5},\n\t76:  {lang: 0x200, region: 0xa3},\n\t78:  {lang: 0x3bb, region: 0xe9},\n\t79:  {lang: 0x24a, region: 0xa7},\n\t80:  {lang: 0x3fa, region: 0x9a},\n\t83:  {lang: 0x251, region: 0x9a},\n\t84:  {lang: 0x254, region: 0xac},\n\t86:  {lang: 0x88, region: 0x9a},\n\t87:  {lang: 0x370, region: 0x124},\n\t88:  {lang: 0x2b8, region: 0xb0},\n\t93:  {lang: 0x29f, region: 0x9a},\n\t94:  {lang: 0x2a8, region: 0x9a},\n\t95:  {lang: 0x28f, region: 0x88},\n\t96:  {lang: 0x1a0, region: 0x88},\n\t97:  {lang: 0x2ac, region: 0x53},\n\t99:  {lang: 0x4f4, region: 0x12c},\n\t100: {lang: 0x4f5, region: 0x12c},\n\t101: {lang: 0x1be, region: 0x9a},\n\t103: {lang: 0x337, region: 0x9d},\n\t104: {lang: 0x4f7, region: 0x53},\n\t105: {lang: 0xa9, region: 0x53},\n\t108: {lang: 0x2e8, region: 0x113},\n\t109: {lang: 0x4f8, region: 0x10c},\n\t110: {lang: 0x4f8, region: 0x10c},\n\t111: {lang: 0x304, region: 0x9a},\n\t112: {lang: 0x31b, region: 0x9a},\n\t113: {lang: 0x30b, region: 0x53},\n\t115: {lang: 0x31e, region: 0x35},\n\t116: {lang: 0x30e, region: 0x9a},\n\t117: {lang: 0x414, region: 0xe9},\n\t118: {lang: 0x331, region: 0xc5},\n\t121: {lang: 0x4f9, region: 0x109},\n\t122: {lang: 0x3b, region: 0xa2},\n\t123: {lang: 0x353, region: 0xdc},\n\t126: {lang: 0x2d0, region: 0x85},\n\t127: {lang: 0x52a, region: 0x53},\n\t128: {lang: 0x403, region: 0x97},\n\t129: {lang: 0x3ee, region: 0x9a},\n\t130: {lang: 0x39b, region: 0xc6},\n\t131: {lang: 0x395, region: 0x9a},\n\t132: {lang: 0x399, region: 0x136},\n\t133: {lang: 0x429, region: 0x116},\n\t135: {lang: 0x3b, region: 0x11d},\n\t136: {lang: 0xfd, region: 0xc5},\n\t139: {lang: 0x27d, region: 0x107},\n\t140: {lang: 0x2c9, region: 0x53},\n\t141: {lang: 0x39f, region: 0x9d},\n\t142: {lang: 0x39f, region: 0x53},\n\t144: {lang: 0x3ad, region: 0xb1},\n\t146: {lang: 0x1c6, region: 0x53},\n\t147: {lang: 0x4fd, region: 0x9d},\n\t200: {lang: 0x3cb, region: 0x96},\n\t203: {lang: 0x372, region: 0x10d},\n\t204: {lang: 0x420, region: 0x98},\n\t206: {lang: 0x4ff, region: 0x15f},\n\t207: {lang: 0x3f0, region: 0x9a},\n\t208: {lang: 0x45, region: 0x136},\n\t209: {lang: 0x139, region: 0x7c},\n\t210: {lang: 0x3e9, region: 0x9a},\n\t212: {lang: 0x3e9, region: 0x9a},\n\t213: {lang: 0x3fa, region: 0x9a},\n\t214: {lang: 0x40c, region: 0xb4},\n\t217: {lang: 0x433, region: 0x9a},\n\t218: {lang: 0xef, region: 0xc6},\n\t219: {lang: 0x43e, region: 0x96},\n\t221: {lang: 0x44d, region: 0x35},\n\t222: {lang: 0x44e, region: 0x9c},\n\t226: {lang: 0x45a, region: 0xe8},\n\t227: {lang: 0x11a, region: 0x9a},\n\t228: {lang: 0x45e, region: 0x53},\n\t229: {lang: 0x232, region: 0x53},\n\t230: {lang: 0x450, region: 0x9a},\n\t231: {lang: 0x4a5, region: 0x53},\n\t232: {lang: 0x9f, region: 0x13f},\n\t233: {lang: 0x461, region: 0x9a},\n\t235: {lang: 0x528, region: 0xbb},\n\t236: {lang: 0x153, region: 0xe8},\n\t237: {lang: 0x128, region: 0xce},\n\t238: {lang: 0x46b, region: 0x124},\n\t239: {lang: 0xa9, region: 0x53},\n\t240: {lang: 0x2ce, region: 0x9a},\n\t243: {lang: 0x4ad, region: 0x11d},\n\t244: {lang: 0x4be, region: 0xb5},\n\t247: {lang: 0x1ce, region: 0x9a},\n\t250: {lang: 0x3a9, region: 0x9d},\n\t251: {lang: 0x22, region: 0x9c},\n\t253: {lang: 0x1ea, region: 0x53},\n\t254: {lang: 0xef, region: 0xc6},\n}\n\ntype likelyScriptRegion struct {\n\tregion uint16\n\tscript uint16\n\tflags  uint8\n}\n\n// likelyLang is a lookup table, indexed by langID, for the most likely\n// scripts and regions given incomplete information. If more entries exist for a\n// given language, region and script are the index and size respectively\n// of the list in likelyLangList.\n// Size: 7980 bytes, 1330 elements\nvar likelyLang = [1330]likelyScriptRegion{\n\t0:    {region: 0x136, script: 0x5b, flags: 0x0},\n\t1:    {region: 0x70, script: 0x5b, flags: 0x0},\n\t2:    {region: 0x166, script: 0x5b, flags: 0x0},\n\t3:    {region: 0x166, script: 0x5b, flags: 0x0},\n\t4:    {region: 0x166, script: 0x5b, flags: 0x0},\n\t5:    {region: 0x7e, script: 0x20, flags: 0x0},\n\t6:    {region: 0x166, script: 0x5b, flags: 0x0},\n\t7:    {region: 0x166, script: 0x20, flags: 0x0},\n\t8:    {region: 0x81, script: 0x5b, flags: 0x0},\n\t9:    {region: 0x166, script: 0x5b, flags: 0x0},\n\t10:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t11:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t12:   {region: 0x96, script: 0x5b, flags: 0x0},\n\t13:   {region: 0x132, script: 0x5b, flags: 0x0},\n\t14:   {region: 0x81, script: 0x5b, flags: 0x0},\n\t15:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t16:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t17:   {region: 0x107, script: 0x20, flags: 0x0},\n\t18:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t19:   {region: 0x9d, script: 0x9, flags: 0x0},\n\t20:   {region: 0x129, script: 0x5, flags: 0x0},\n\t21:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t22:   {region: 0x162, script: 0x5b, flags: 0x0},\n\t23:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t24:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t25:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t26:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t27:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t28:   {region: 0x52, script: 0x5b, flags: 0x0},\n\t29:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t30:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t31:   {region: 0x9a, script: 0x4, flags: 0x0},\n\t32:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t33:   {region: 0x81, script: 0x5b, flags: 0x0},\n\t34:   {region: 0x9c, script: 0xfb, flags: 0x0},\n\t35:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t36:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t37:   {region: 0x14e, script: 0x5b, flags: 0x0},\n\t38:   {region: 0x107, script: 0x20, flags: 0x0},\n\t39:   {region: 0x70, script: 0x2c, flags: 0x0},\n\t40:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t41:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t42:   {region: 0xd7, script: 0x5b, flags: 0x0},\n\t43:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t45:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t46:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t47:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t48:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t49:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t50:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t51:   {region: 0x96, script: 0x5b, flags: 0x0},\n\t52:   {region: 0x166, script: 0x5, flags: 0x0},\n\t53:   {region: 0x123, script: 0x5, flags: 0x0},\n\t54:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t55:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t56:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t57:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t58:   {region: 0x6c, script: 0x5, flags: 0x0},\n\t59:   {region: 0x0, script: 0x3, flags: 0x1},\n\t60:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t61:   {region: 0x51, script: 0x5b, flags: 0x0},\n\t62:   {region: 0x3f, script: 0x5b, flags: 0x0},\n\t63:   {region: 0x68, script: 0x5, flags: 0x0},\n\t65:   {region: 0xbb, script: 0x5, flags: 0x0},\n\t66:   {region: 0x6c, script: 0x5, flags: 0x0},\n\t67:   {region: 0x9a, script: 0xe, flags: 0x0},\n\t68:   {region: 0x130, script: 0x5b, flags: 0x0},\n\t69:   {region: 0x136, script: 0xd0, flags: 0x0},\n\t70:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t71:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t72:   {region: 0x6f, script: 0x5b, flags: 0x0},\n\t73:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t74:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t75:   {region: 0x49, script: 0x5b, flags: 0x0},\n\t76:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t77:   {region: 0x107, script: 0x20, flags: 0x0},\n\t78:   {region: 0x166, script: 0x5, flags: 0x0},\n\t79:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t80:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t81:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t82:   {region: 0x9a, script: 0x22, flags: 0x0},\n\t83:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t84:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t85:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t86:   {region: 0x3f, script: 0x5b, flags: 0x0},\n\t87:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t88:   {region: 0x3, script: 0x5, flags: 0x1},\n\t89:   {region: 0x107, script: 0x20, flags: 0x0},\n\t90:   {region: 0xe9, script: 0x5, flags: 0x0},\n\t91:   {region: 0x96, script: 0x5b, flags: 0x0},\n\t92:   {region: 0xdc, script: 0x22, flags: 0x0},\n\t93:   {region: 0x2e, script: 0x5b, flags: 0x0},\n\t94:   {region: 0x52, script: 0x5b, flags: 0x0},\n\t95:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t96:   {region: 0x52, script: 0xb, flags: 0x0},\n\t97:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t98:   {region: 0x166, script: 0x5b, flags: 0x0},\n\t99:   {region: 0x96, script: 0x5b, flags: 0x0},\n\t100:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t101:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t102:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t103:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t104:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t105:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t106:  {region: 0x4f, script: 0x5b, flags: 0x0},\n\t107:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t108:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t109:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t110:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t111:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t112:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t113:  {region: 0x47, script: 0x20, flags: 0x0},\n\t114:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t115:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t116:  {region: 0x10c, script: 0x5, flags: 0x0},\n\t117:  {region: 0x163, script: 0x5b, flags: 0x0},\n\t118:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t119:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t120:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t121:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t122:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t123:  {region: 0x9a, script: 0xe6, flags: 0x0},\n\t124:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t125:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t126:  {region: 0x38, script: 0x20, flags: 0x0},\n\t127:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t128:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t129:  {region: 0x12c, script: 0x34, flags: 0x0},\n\t131:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t132:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t133:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t134:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t135:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t136:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t137:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t138:  {region: 0x140, script: 0x5b, flags: 0x0},\n\t139:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t140:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t141:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t142:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t143:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t144:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t145:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t146:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t147:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t148:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t149:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t150:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t151:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t152:  {region: 0x115, script: 0x5b, flags: 0x0},\n\t153:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t154:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t155:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t156:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t157:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t158:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t159:  {region: 0x13f, script: 0xe8, flags: 0x0},\n\t160:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t161:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t162:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t163:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t164:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t165:  {region: 0x35, script: 0xe, flags: 0x0},\n\t166:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t167:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t168:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t169:  {region: 0x53, script: 0xef, flags: 0x0},\n\t170:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t171:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t172:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t173:  {region: 0x9a, script: 0xe, flags: 0x0},\n\t174:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t175:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t176:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t177:  {region: 0x4f, script: 0x5b, flags: 0x0},\n\t178:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t179:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t180:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t181:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t182:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t183:  {region: 0x33, script: 0x5b, flags: 0x0},\n\t184:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t185:  {region: 0xb5, script: 0xc, flags: 0x0},\n\t186:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t187:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t188:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t189:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t190:  {region: 0xe9, script: 0x22, flags: 0x0},\n\t191:  {region: 0x107, script: 0x20, flags: 0x0},\n\t192:  {region: 0x160, script: 0x5b, flags: 0x0},\n\t193:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t194:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t195:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t196:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t197:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t198:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t199:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t200:  {region: 0x87, script: 0x5b, flags: 0x0},\n\t201:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t202:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t203:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t204:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t205:  {region: 0x6e, script: 0x2c, flags: 0x0},\n\t206:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t207:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t208:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t209:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t210:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t211:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t212:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t213:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t214:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t215:  {region: 0x6f, script: 0x5b, flags: 0x0},\n\t216:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t217:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t218:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t219:  {region: 0x35, script: 0x16, flags: 0x0},\n\t220:  {region: 0x107, script: 0x20, flags: 0x0},\n\t221:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t222:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t223:  {region: 0x132, script: 0x5b, flags: 0x0},\n\t224:  {region: 0x8b, script: 0x5b, flags: 0x0},\n\t225:  {region: 0x76, script: 0x5b, flags: 0x0},\n\t226:  {region: 0x107, script: 0x20, flags: 0x0},\n\t227:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t228:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t229:  {region: 0x136, script: 0x1a, flags: 0x0},\n\t230:  {region: 0xa7, script: 0x5, flags: 0x0},\n\t231:  {region: 0x13f, script: 0x19, flags: 0x0},\n\t232:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t233:  {region: 0x9c, script: 0x5, flags: 0x0},\n\t234:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t235:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t236:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t237:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t238:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t239:  {region: 0xc6, script: 0xda, flags: 0x0},\n\t240:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t241:  {region: 0x6c, script: 0x1d, flags: 0x0},\n\t242:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t243:  {region: 0x49, script: 0x17, flags: 0x0},\n\t244:  {region: 0x131, script: 0x20, flags: 0x0},\n\t245:  {region: 0x49, script: 0x17, flags: 0x0},\n\t246:  {region: 0x49, script: 0x17, flags: 0x0},\n\t247:  {region: 0x49, script: 0x17, flags: 0x0},\n\t248:  {region: 0x49, script: 0x17, flags: 0x0},\n\t249:  {region: 0x10b, script: 0x5b, flags: 0x0},\n\t250:  {region: 0x5f, script: 0x5b, flags: 0x0},\n\t251:  {region: 0xea, script: 0x5b, flags: 0x0},\n\t252:  {region: 0x49, script: 0x17, flags: 0x0},\n\t253:  {region: 0xc5, script: 0x88, flags: 0x0},\n\t254:  {region: 0x8, script: 0x2, flags: 0x1},\n\t255:  {region: 0x107, script: 0x20, flags: 0x0},\n\t256:  {region: 0x7c, script: 0x5b, flags: 0x0},\n\t257:  {region: 0x64, script: 0x5b, flags: 0x0},\n\t258:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t259:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t260:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t261:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t262:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t263:  {region: 0x107, script: 0x20, flags: 0x0},\n\t264:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t265:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t266:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t267:  {region: 0x9a, script: 0x5, flags: 0x0},\n\t268:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t269:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t270:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t271:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t272:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t273:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t274:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t275:  {region: 0x166, script: 0x5, flags: 0x0},\n\t276:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t277:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t278:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t279:  {region: 0xd5, script: 0x5b, flags: 0x0},\n\t280:  {region: 0x4f, script: 0x5b, flags: 0x0},\n\t281:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t282:  {region: 0x9a, script: 0x5, flags: 0x0},\n\t283:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t284:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t285:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t286:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t287:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t288:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t289:  {region: 0xd1, script: 0x5b, flags: 0x0},\n\t290:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t291:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t292:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t293:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t294:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t295:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t296:  {region: 0xce, script: 0xed, flags: 0x0},\n\t297:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t298:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t299:  {region: 0x115, script: 0x5b, flags: 0x0},\n\t300:  {region: 0x37, script: 0x5b, flags: 0x0},\n\t301:  {region: 0x43, script: 0xef, flags: 0x0},\n\t302:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t303:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t304:  {region: 0x81, script: 0x5b, flags: 0x0},\n\t305:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t306:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t307:  {region: 0x6c, script: 0x29, flags: 0x0},\n\t308:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t309:  {region: 0xc5, script: 0x4b, flags: 0x0},\n\t310:  {region: 0x88, script: 0x34, flags: 0x0},\n\t311:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t312:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t313:  {region: 0xa, script: 0x2, flags: 0x1},\n\t314:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t315:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t316:  {region: 0x1, script: 0x5b, flags: 0x0},\n\t317:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t318:  {region: 0x6f, script: 0x5b, flags: 0x0},\n\t319:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t320:  {region: 0x6b, script: 0x5b, flags: 0x0},\n\t321:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t322:  {region: 0x9f, script: 0x46, flags: 0x0},\n\t323:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t324:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t325:  {region: 0x6f, script: 0x5b, flags: 0x0},\n\t326:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t327:  {region: 0x6f, script: 0x5b, flags: 0x0},\n\t328:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t329:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t330:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t331:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t332:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t333:  {region: 0x87, script: 0x5b, flags: 0x0},\n\t334:  {region: 0xc, script: 0x2, flags: 0x1},\n\t335:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t336:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t337:  {region: 0x73, script: 0x5b, flags: 0x0},\n\t338:  {region: 0x10c, script: 0x5, flags: 0x0},\n\t339:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t340:  {region: 0x10d, script: 0x5b, flags: 0x0},\n\t341:  {region: 0x74, script: 0x5b, flags: 0x0},\n\t342:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t343:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t344:  {region: 0x77, script: 0x5b, flags: 0x0},\n\t345:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t346:  {region: 0x3b, script: 0x5b, flags: 0x0},\n\t347:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t348:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t349:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t350:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t351:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t352:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t353:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t354:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t355:  {region: 0x52, script: 0x5, flags: 0x0},\n\t356:  {region: 0x141, script: 0x5b, flags: 0x0},\n\t357:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t358:  {region: 0x85, script: 0x5b, flags: 0x0},\n\t359:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t360:  {region: 0xd5, script: 0x5b, flags: 0x0},\n\t361:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t362:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t363:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t364:  {region: 0x10c, script: 0x5b, flags: 0x0},\n\t365:  {region: 0xda, script: 0x5b, flags: 0x0},\n\t366:  {region: 0x97, script: 0x5b, flags: 0x0},\n\t367:  {region: 0x81, script: 0x5b, flags: 0x0},\n\t368:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t369:  {region: 0xbd, script: 0x5b, flags: 0x0},\n\t370:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t371:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t372:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t373:  {region: 0x53, script: 0x3b, flags: 0x0},\n\t374:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t375:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t376:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t377:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t378:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t379:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t380:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t381:  {region: 0x7f, script: 0x5b, flags: 0x0},\n\t382:  {region: 0x7c, script: 0x5b, flags: 0x0},\n\t383:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t384:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t385:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t386:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t387:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t388:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t389:  {region: 0x70, script: 0x2c, flags: 0x0},\n\t390:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t391:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t392:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t393:  {region: 0xa8, script: 0x5b, flags: 0x0},\n\t394:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t395:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t396:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t397:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t398:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t399:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t400:  {region: 0x6f, script: 0x5b, flags: 0x0},\n\t401:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t402:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t403:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t404:  {region: 0xf2, script: 0x5b, flags: 0x0},\n\t405:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t406:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t407:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t408:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t409:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t410:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t411:  {region: 0x9a, script: 0xe9, flags: 0x0},\n\t412:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t413:  {region: 0xda, script: 0x5b, flags: 0x0},\n\t414:  {region: 0x131, script: 0x32, flags: 0x0},\n\t415:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t416:  {region: 0xe, script: 0x2, flags: 0x1},\n\t417:  {region: 0x9a, script: 0xe, flags: 0x0},\n\t418:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t419:  {region: 0x4e, script: 0x5b, flags: 0x0},\n\t420:  {region: 0x9a, script: 0x35, flags: 0x0},\n\t421:  {region: 0x41, script: 0x5b, flags: 0x0},\n\t422:  {region: 0x54, script: 0x5b, flags: 0x0},\n\t423:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t424:  {region: 0x81, script: 0x5b, flags: 0x0},\n\t425:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t426:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t427:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t428:  {region: 0x99, script: 0x5b, flags: 0x0},\n\t429:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t430:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t431:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t432:  {region: 0x166, script: 0x5, flags: 0x0},\n\t433:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t434:  {region: 0x166, script: 0x5, flags: 0x0},\n\t435:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t436:  {region: 0x10, script: 0x3, flags: 0x1},\n\t437:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t438:  {region: 0x53, script: 0x3b, flags: 0x0},\n\t439:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t440:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t441:  {region: 0x24, script: 0x5, flags: 0x0},\n\t442:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t443:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t444:  {region: 0x98, script: 0x3e, flags: 0x0},\n\t445:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t446:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t447:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t448:  {region: 0x74, script: 0x5b, flags: 0x0},\n\t449:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t450:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t451:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t452:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t453:  {region: 0x12c, script: 0x40, flags: 0x0},\n\t454:  {region: 0x53, script: 0x92, flags: 0x0},\n\t455:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t456:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t457:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t458:  {region: 0xb0, script: 0x41, flags: 0x0},\n\t459:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t460:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t461:  {region: 0xe7, script: 0x5b, flags: 0x0},\n\t462:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t463:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t464:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t465:  {region: 0x91, script: 0x5b, flags: 0x0},\n\t466:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t467:  {region: 0x53, script: 0x3b, flags: 0x0},\n\t468:  {region: 0x92, script: 0x5b, flags: 0x0},\n\t469:  {region: 0x93, script: 0x5b, flags: 0x0},\n\t470:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t471:  {region: 0x28, script: 0x8, flags: 0x0},\n\t472:  {region: 0xd3, script: 0x5b, flags: 0x0},\n\t473:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t474:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t475:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t476:  {region: 0xd1, script: 0x5b, flags: 0x0},\n\t477:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t478:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t479:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t480:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t481:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t482:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t483:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t484:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t486:  {region: 0x123, script: 0x5b, flags: 0x0},\n\t487:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t488:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t489:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t490:  {region: 0x53, script: 0xfd, flags: 0x0},\n\t491:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t492:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t493:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t494:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t495:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t496:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t497:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t498:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t499:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t500:  {region: 0x107, script: 0x20, flags: 0x0},\n\t501:  {region: 0x1, script: 0x5b, flags: 0x0},\n\t502:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t503:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t504:  {region: 0x9e, script: 0x5b, flags: 0x0},\n\t505:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t506:  {region: 0x49, script: 0x17, flags: 0x0},\n\t507:  {region: 0x98, script: 0x3e, flags: 0x0},\n\t508:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t509:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t510:  {region: 0x107, script: 0x5b, flags: 0x0},\n\t511:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t512:  {region: 0xa3, script: 0x49, flags: 0x0},\n\t513:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t514:  {region: 0xa1, script: 0x5b, flags: 0x0},\n\t515:  {region: 0x1, script: 0x5b, flags: 0x0},\n\t516:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t517:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t518:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t519:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t520:  {region: 0x131, script: 0x3e, flags: 0x0},\n\t521:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t522:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t523:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t524:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t525:  {region: 0x64, script: 0x5b, flags: 0x0},\n\t526:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t527:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t528:  {region: 0x7e, script: 0x2e, flags: 0x0},\n\t529:  {region: 0x138, script: 0x20, flags: 0x0},\n\t530:  {region: 0x68, script: 0x5b, flags: 0x0},\n\t531:  {region: 0xc5, script: 0x5b, flags: 0x0},\n\t532:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t533:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t534:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t535:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t536:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t537:  {region: 0x107, script: 0x20, flags: 0x0},\n\t538:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t539:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t540:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t541:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t542:  {region: 0xd5, script: 0x5, flags: 0x0},\n\t543:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t544:  {region: 0x165, script: 0x5b, flags: 0x0},\n\t545:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t546:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t547:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t548:  {region: 0x123, script: 0x5, flags: 0x0},\n\t549:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t550:  {region: 0x124, script: 0xee, flags: 0x0},\n\t551:  {region: 0x5b, script: 0x5b, flags: 0x0},\n\t552:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t553:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t554:  {region: 0x4f, script: 0x5b, flags: 0x0},\n\t555:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t556:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t557:  {region: 0x4b, script: 0x5b, flags: 0x0},\n\t558:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t559:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t560:  {region: 0x41, script: 0x5b, flags: 0x0},\n\t561:  {region: 0x9a, script: 0x5b, flags: 0x0},\n\t562:  {region: 0x53, script: 0xe5, flags: 0x0},\n\t563:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t564:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t565:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t566:  {region: 0x9a, script: 0x76, flags: 0x0},\n\t567:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t568:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t569:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t570:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t571:  {region: 0x12c, script: 0x5b, flags: 0x0},\n\t572:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t573:  {region: 0xd3, script: 0x5b, flags: 0x0},\n\t574:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t575:  {region: 0xb0, script: 0x58, flags: 0x0},\n\t576:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t577:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t578:  {region: 0x13, script: 0x6, flags: 0x1},\n\t579:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t580:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t581:  {region: 0x83, script: 0x5b, flags: 0x0},\n\t582:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t583:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t584:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t585:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t586:  {region: 0xa7, script: 0x4f, flags: 0x0},\n\t587:  {region: 0x2a, script: 0x5b, flags: 0x0},\n\t588:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t589:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t590:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t591:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t592:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t593:  {region: 0x9a, script: 0x53, flags: 0x0},\n\t594:  {region: 0x8c, script: 0x5b, flags: 0x0},\n\t595:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t596:  {region: 0xac, script: 0x54, flags: 0x0},\n\t597:  {region: 0x107, script: 0x20, flags: 0x0},\n\t598:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t599:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t600:  {region: 0x76, script: 0x5b, flags: 0x0},\n\t601:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t602:  {region: 0xb5, script: 0x5b, flags: 0x0},\n\t603:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t604:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t605:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t606:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t607:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t608:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t609:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t610:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t611:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t612:  {region: 0x107, script: 0x20, flags: 0x0},\n\t613:  {region: 0x113, script: 0x5b, flags: 0x0},\n\t614:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t615:  {region: 0x107, script: 0x5b, flags: 0x0},\n\t616:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t617:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t618:  {region: 0x9a, script: 0x5, flags: 0x0},\n\t619:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t620:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t621:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t622:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t623:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t624:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t625:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t626:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t627:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t628:  {region: 0x19, script: 0x3, flags: 0x1},\n\t629:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t630:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t631:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t632:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t633:  {region: 0x107, script: 0x20, flags: 0x0},\n\t634:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t635:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t636:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t637:  {region: 0x107, script: 0x20, flags: 0x0},\n\t638:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t639:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t640:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t641:  {region: 0x7c, script: 0x5b, flags: 0x0},\n\t642:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t643:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t644:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t645:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t646:  {region: 0x124, script: 0xee, flags: 0x0},\n\t647:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t648:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t649:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t650:  {region: 0x1c, script: 0x5, flags: 0x1},\n\t651:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t652:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t653:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t654:  {region: 0x139, script: 0x5b, flags: 0x0},\n\t655:  {region: 0x88, script: 0x5f, flags: 0x0},\n\t656:  {region: 0x98, script: 0x3e, flags: 0x0},\n\t657:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t658:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t659:  {region: 0x132, script: 0x5b, flags: 0x0},\n\t660:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t661:  {region: 0xb8, script: 0x5b, flags: 0x0},\n\t662:  {region: 0x107, script: 0x20, flags: 0x0},\n\t663:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t664:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t665:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t666:  {region: 0x53, script: 0xee, flags: 0x0},\n\t667:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t668:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t669:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t670:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t671:  {region: 0x9a, script: 0x5d, flags: 0x0},\n\t672:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t673:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t674:  {region: 0x107, script: 0x20, flags: 0x0},\n\t675:  {region: 0x132, script: 0x5b, flags: 0x0},\n\t676:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t677:  {region: 0xda, script: 0x5b, flags: 0x0},\n\t678:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t679:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t680:  {region: 0x21, script: 0x2, flags: 0x1},\n\t681:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t682:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t683:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t684:  {region: 0x53, script: 0x61, flags: 0x0},\n\t685:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t686:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t687:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t688:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t689:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t690:  {region: 0x9a, script: 0xe9, flags: 0x0},\n\t691:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t692:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t693:  {region: 0x4b, script: 0x5b, flags: 0x0},\n\t694:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t695:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t696:  {region: 0xb0, script: 0x58, flags: 0x0},\n\t697:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t698:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t699:  {region: 0x4b, script: 0x5b, flags: 0x0},\n\t700:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t701:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t702:  {region: 0x163, script: 0x5b, flags: 0x0},\n\t703:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t704:  {region: 0xb7, script: 0x5b, flags: 0x0},\n\t705:  {region: 0xb9, script: 0x5b, flags: 0x0},\n\t706:  {region: 0x4b, script: 0x5b, flags: 0x0},\n\t707:  {region: 0x4b, script: 0x5b, flags: 0x0},\n\t708:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t709:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t710:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t711:  {region: 0xb9, script: 0x5b, flags: 0x0},\n\t712:  {region: 0x124, script: 0xee, flags: 0x0},\n\t713:  {region: 0x53, script: 0x3b, flags: 0x0},\n\t714:  {region: 0x12c, script: 0x5b, flags: 0x0},\n\t715:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t716:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t717:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t718:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t719:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t720:  {region: 0x23, script: 0x3, flags: 0x1},\n\t721:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t722:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t723:  {region: 0xd0, script: 0x5b, flags: 0x0},\n\t724:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t725:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t726:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t727:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t728:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t729:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t730:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t731:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t732:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t733:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t734:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t735:  {region: 0x166, script: 0x5, flags: 0x0},\n\t736:  {region: 0x107, script: 0x20, flags: 0x0},\n\t737:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t738:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t739:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t740:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t741:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t742:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t743:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t744:  {region: 0x113, script: 0x5b, flags: 0x0},\n\t745:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t746:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t747:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t748:  {region: 0x124, script: 0x5, flags: 0x0},\n\t749:  {region: 0xcd, script: 0x5b, flags: 0x0},\n\t750:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t751:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t752:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t753:  {region: 0xc0, script: 0x5b, flags: 0x0},\n\t754:  {region: 0xd2, script: 0x5b, flags: 0x0},\n\t755:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t756:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t757:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t758:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t759:  {region: 0xc1, script: 0x5b, flags: 0x0},\n\t760:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t761:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t762:  {region: 0xe1, script: 0x5b, flags: 0x0},\n\t763:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t764:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t765:  {region: 0x9c, script: 0x3d, flags: 0x0},\n\t766:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t767:  {region: 0xc3, script: 0x20, flags: 0x0},\n\t768:  {region: 0x166, script: 0x5, flags: 0x0},\n\t769:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t770:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t771:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t772:  {region: 0x9a, script: 0x6f, flags: 0x0},\n\t773:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t774:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t775:  {region: 0x10c, script: 0x5b, flags: 0x0},\n\t776:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t777:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t778:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t779:  {region: 0x26, script: 0x3, flags: 0x1},\n\t780:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t781:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t782:  {region: 0x9a, script: 0xe, flags: 0x0},\n\t783:  {region: 0xc5, script: 0x76, flags: 0x0},\n\t785:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t786:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t787:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t788:  {region: 0x37, script: 0x5b, flags: 0x0},\n\t789:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t790:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t791:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t792:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t793:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t794:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t795:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t796:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t797:  {region: 0x107, script: 0x20, flags: 0x0},\n\t798:  {region: 0x35, script: 0x73, flags: 0x0},\n\t799:  {region: 0x29, script: 0x3, flags: 0x1},\n\t800:  {region: 0xcc, script: 0x5b, flags: 0x0},\n\t801:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t802:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t803:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t804:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t805:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t807:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t808:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t809:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t810:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t811:  {region: 0xe9, script: 0x5, flags: 0x0},\n\t812:  {region: 0xc4, script: 0x5b, flags: 0x0},\n\t813:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t814:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t815:  {region: 0x165, script: 0x5b, flags: 0x0},\n\t816:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t817:  {region: 0xc5, script: 0x76, flags: 0x0},\n\t818:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t819:  {region: 0x166, script: 0x2c, flags: 0x0},\n\t820:  {region: 0x107, script: 0x20, flags: 0x0},\n\t821:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t822:  {region: 0x132, script: 0x5b, flags: 0x0},\n\t823:  {region: 0x9d, script: 0x67, flags: 0x0},\n\t824:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t825:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t826:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t827:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t828:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t829:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t830:  {region: 0xde, script: 0x5b, flags: 0x0},\n\t831:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t832:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t834:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t835:  {region: 0x53, script: 0x3b, flags: 0x0},\n\t836:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t837:  {region: 0xd3, script: 0x5b, flags: 0x0},\n\t838:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t839:  {region: 0xdb, script: 0x5b, flags: 0x0},\n\t840:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t841:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t842:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t843:  {region: 0xd0, script: 0x5b, flags: 0x0},\n\t844:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t845:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t846:  {region: 0x165, script: 0x5b, flags: 0x0},\n\t847:  {region: 0xd2, script: 0x5b, flags: 0x0},\n\t848:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t849:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t850:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t851:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t852:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t853:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t854:  {region: 0xd3, script: 0x5b, flags: 0x0},\n\t855:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t856:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t857:  {region: 0xd2, script: 0x5b, flags: 0x0},\n\t858:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t859:  {region: 0xd0, script: 0x5b, flags: 0x0},\n\t860:  {region: 0xd0, script: 0x5b, flags: 0x0},\n\t861:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t862:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t863:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t864:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t865:  {region: 0xe0, script: 0x5b, flags: 0x0},\n\t866:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t867:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t868:  {region: 0x9a, script: 0x5b, flags: 0x0},\n\t869:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t870:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t871:  {region: 0xda, script: 0x5b, flags: 0x0},\n\t872:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t873:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t874:  {region: 0xdb, script: 0x5b, flags: 0x0},\n\t875:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t876:  {region: 0x52, script: 0x5b, flags: 0x0},\n\t877:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t878:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t879:  {region: 0xdb, script: 0x5b, flags: 0x0},\n\t880:  {region: 0x124, script: 0x57, flags: 0x0},\n\t881:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t882:  {region: 0x10d, script: 0xcb, flags: 0x0},\n\t883:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t884:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t885:  {region: 0x85, script: 0x7e, flags: 0x0},\n\t886:  {region: 0x162, script: 0x5b, flags: 0x0},\n\t887:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t888:  {region: 0x49, script: 0x17, flags: 0x0},\n\t889:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t890:  {region: 0x162, script: 0x5b, flags: 0x0},\n\t891:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t892:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t893:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t894:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t895:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t896:  {region: 0x118, script: 0x5b, flags: 0x0},\n\t897:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t898:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t899:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t900:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t901:  {region: 0x53, script: 0x5b, flags: 0x0},\n\t902:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t903:  {region: 0xcf, script: 0x5b, flags: 0x0},\n\t904:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t905:  {region: 0x132, script: 0x5b, flags: 0x0},\n\t906:  {region: 0x81, script: 0x5b, flags: 0x0},\n\t907:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t908:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t910:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t911:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t912:  {region: 0x70, script: 0x5b, flags: 0x0},\n\t913:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t914:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t915:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t916:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t917:  {region: 0x9a, script: 0x83, flags: 0x0},\n\t918:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t919:  {region: 0x166, script: 0x5, flags: 0x0},\n\t920:  {region: 0x7e, script: 0x20, flags: 0x0},\n\t921:  {region: 0x136, script: 0x84, flags: 0x0},\n\t922:  {region: 0x166, script: 0x5, flags: 0x0},\n\t923:  {region: 0xc6, script: 0x82, flags: 0x0},\n\t924:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t925:  {region: 0x2c, script: 0x3, flags: 0x1},\n\t926:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t927:  {region: 0x2f, script: 0x2, flags: 0x1},\n\t928:  {region: 0xe8, script: 0x5b, flags: 0x0},\n\t929:  {region: 0x30, script: 0x5b, flags: 0x0},\n\t930:  {region: 0xf1, script: 0x5b, flags: 0x0},\n\t931:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t932:  {region: 0x79, script: 0x5b, flags: 0x0},\n\t933:  {region: 0xd7, script: 0x5b, flags: 0x0},\n\t934:  {region: 0x136, script: 0x5b, flags: 0x0},\n\t935:  {region: 0x49, script: 0x5b, flags: 0x0},\n\t936:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t937:  {region: 0x9d, script: 0xfa, flags: 0x0},\n\t938:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t939:  {region: 0x61, script: 0x5b, flags: 0x0},\n\t940:  {region: 0x166, script: 0x5, flags: 0x0},\n\t941:  {region: 0xb1, script: 0x90, flags: 0x0},\n\t943:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t944:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t945:  {region: 0x9a, script: 0x12, flags: 0x0},\n\t946:  {region: 0xa5, script: 0x5b, flags: 0x0},\n\t947:  {region: 0xea, script: 0x5b, flags: 0x0},\n\t948:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t949:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t950:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t951:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t952:  {region: 0x88, script: 0x34, flags: 0x0},\n\t953:  {region: 0x76, script: 0x5b, flags: 0x0},\n\t954:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t955:  {region: 0xe9, script: 0x4e, flags: 0x0},\n\t956:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t957:  {region: 0x1, script: 0x5b, flags: 0x0},\n\t958:  {region: 0x24, script: 0x5, flags: 0x0},\n\t959:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t960:  {region: 0x41, script: 0x5b, flags: 0x0},\n\t961:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t962:  {region: 0x7b, script: 0x5b, flags: 0x0},\n\t963:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t964:  {region: 0xe5, script: 0x5b, flags: 0x0},\n\t965:  {region: 0x8a, script: 0x5b, flags: 0x0},\n\t966:  {region: 0x6a, script: 0x5b, flags: 0x0},\n\t967:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t968:  {region: 0x9a, script: 0x22, flags: 0x0},\n\t969:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t970:  {region: 0x103, script: 0x5b, flags: 0x0},\n\t971:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t972:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t973:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t974:  {region: 0x9f, script: 0x5b, flags: 0x0},\n\t975:  {region: 0x166, script: 0x5, flags: 0x0},\n\t976:  {region: 0x9a, script: 0x5b, flags: 0x0},\n\t977:  {region: 0x31, script: 0x2, flags: 0x1},\n\t978:  {region: 0xdc, script: 0x22, flags: 0x0},\n\t979:  {region: 0x35, script: 0xe, flags: 0x0},\n\t980:  {region: 0x4e, script: 0x5b, flags: 0x0},\n\t981:  {region: 0x73, script: 0x5b, flags: 0x0},\n\t982:  {region: 0x4e, script: 0x5b, flags: 0x0},\n\t983:  {region: 0x9d, script: 0x5, flags: 0x0},\n\t984:  {region: 0x10d, script: 0x5b, flags: 0x0},\n\t985:  {region: 0x3a, script: 0x5b, flags: 0x0},\n\t986:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t987:  {region: 0xd2, script: 0x5b, flags: 0x0},\n\t988:  {region: 0x105, script: 0x5b, flags: 0x0},\n\t989:  {region: 0x96, script: 0x5b, flags: 0x0},\n\t990:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t991:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t992:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t993:  {region: 0x74, script: 0x5b, flags: 0x0},\n\t994:  {region: 0x107, script: 0x20, flags: 0x0},\n\t995:  {region: 0x131, script: 0x20, flags: 0x0},\n\t996:  {region: 0x10a, script: 0x5b, flags: 0x0},\n\t997:  {region: 0x108, script: 0x5b, flags: 0x0},\n\t998:  {region: 0x130, script: 0x5b, flags: 0x0},\n\t999:  {region: 0x166, script: 0x5b, flags: 0x0},\n\t1000: {region: 0xa3, script: 0x4c, flags: 0x0},\n\t1001: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1002: {region: 0x81, script: 0x5b, flags: 0x0},\n\t1003: {region: 0x107, script: 0x20, flags: 0x0},\n\t1004: {region: 0xa5, script: 0x5b, flags: 0x0},\n\t1005: {region: 0x96, script: 0x5b, flags: 0x0},\n\t1006: {region: 0x9a, script: 0x5b, flags: 0x0},\n\t1007: {region: 0x115, script: 0x5b, flags: 0x0},\n\t1008: {region: 0x9a, script: 0xcf, flags: 0x0},\n\t1009: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1010: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1011: {region: 0x130, script: 0x5b, flags: 0x0},\n\t1012: {region: 0x9f, script: 0x5b, flags: 0x0},\n\t1013: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1014: {region: 0x166, script: 0x5, flags: 0x0},\n\t1015: {region: 0x9f, script: 0x5b, flags: 0x0},\n\t1016: {region: 0x7c, script: 0x5b, flags: 0x0},\n\t1017: {region: 0x49, script: 0x5b, flags: 0x0},\n\t1018: {region: 0x33, script: 0x4, flags: 0x1},\n\t1019: {region: 0x9f, script: 0x5b, flags: 0x0},\n\t1020: {region: 0x9d, script: 0x5, flags: 0x0},\n\t1021: {region: 0xdb, script: 0x5b, flags: 0x0},\n\t1022: {region: 0x4f, script: 0x5b, flags: 0x0},\n\t1023: {region: 0xd2, script: 0x5b, flags: 0x0},\n\t1024: {region: 0xd0, script: 0x5b, flags: 0x0},\n\t1025: {region: 0xc4, script: 0x5b, flags: 0x0},\n\t1026: {region: 0x4c, script: 0x5b, flags: 0x0},\n\t1027: {region: 0x97, script: 0x80, flags: 0x0},\n\t1028: {region: 0xb7, script: 0x5b, flags: 0x0},\n\t1029: {region: 0x166, script: 0x2c, flags: 0x0},\n\t1030: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1032: {region: 0xbb, script: 0xeb, flags: 0x0},\n\t1033: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1034: {region: 0xc5, script: 0x76, flags: 0x0},\n\t1035: {region: 0x166, script: 0x5, flags: 0x0},\n\t1036: {region: 0xb4, script: 0xd6, flags: 0x0},\n\t1037: {region: 0x70, script: 0x5b, flags: 0x0},\n\t1038: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1039: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1040: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1041: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1042: {region: 0x112, script: 0x5b, flags: 0x0},\n\t1043: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1044: {region: 0xe9, script: 0x5, flags: 0x0},\n\t1045: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1046: {region: 0x110, script: 0x5b, flags: 0x0},\n\t1047: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1048: {region: 0xea, script: 0x5b, flags: 0x0},\n\t1049: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1050: {region: 0x96, script: 0x5b, flags: 0x0},\n\t1051: {region: 0x143, script: 0x5b, flags: 0x0},\n\t1052: {region: 0x10d, script: 0x5b, flags: 0x0},\n\t1054: {region: 0x10d, script: 0x5b, flags: 0x0},\n\t1055: {region: 0x73, script: 0x5b, flags: 0x0},\n\t1056: {region: 0x98, script: 0xcc, flags: 0x0},\n\t1057: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1058: {region: 0x73, script: 0x5b, flags: 0x0},\n\t1059: {region: 0x165, script: 0x5b, flags: 0x0},\n\t1060: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1061: {region: 0xc4, script: 0x5b, flags: 0x0},\n\t1062: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1063: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1064: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1065: {region: 0x116, script: 0x5b, flags: 0x0},\n\t1066: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1067: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1068: {region: 0x124, script: 0xee, flags: 0x0},\n\t1069: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1070: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1071: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1072: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1073: {region: 0x27, script: 0x5b, flags: 0x0},\n\t1074: {region: 0x37, script: 0x5, flags: 0x1},\n\t1075: {region: 0x9a, script: 0xd9, flags: 0x0},\n\t1076: {region: 0x117, script: 0x5b, flags: 0x0},\n\t1077: {region: 0x115, script: 0x5b, flags: 0x0},\n\t1078: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1079: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1080: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1081: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1082: {region: 0x6e, script: 0x5b, flags: 0x0},\n\t1083: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1084: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1085: {region: 0x61, script: 0x5b, flags: 0x0},\n\t1086: {region: 0x96, script: 0x5b, flags: 0x0},\n\t1087: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1088: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1089: {region: 0x130, script: 0x5b, flags: 0x0},\n\t1090: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1091: {region: 0x85, script: 0x5b, flags: 0x0},\n\t1092: {region: 0x10d, script: 0x5b, flags: 0x0},\n\t1093: {region: 0x130, script: 0x5b, flags: 0x0},\n\t1094: {region: 0x160, script: 0x5, flags: 0x0},\n\t1095: {region: 0x4b, script: 0x5b, flags: 0x0},\n\t1096: {region: 0x61, script: 0x5b, flags: 0x0},\n\t1097: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1098: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1099: {region: 0x96, script: 0x5b, flags: 0x0},\n\t1100: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1101: {region: 0x35, script: 0xe, flags: 0x0},\n\t1102: {region: 0x9c, script: 0xde, flags: 0x0},\n\t1103: {region: 0xea, script: 0x5b, flags: 0x0},\n\t1104: {region: 0x9a, script: 0xe6, flags: 0x0},\n\t1105: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1106: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1107: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1108: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1109: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1110: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1111: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1112: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1113: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1114: {region: 0xe8, script: 0x5b, flags: 0x0},\n\t1115: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1116: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1117: {region: 0x9a, script: 0x53, flags: 0x0},\n\t1118: {region: 0x53, script: 0xe4, flags: 0x0},\n\t1119: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1120: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1121: {region: 0x9a, script: 0xe9, flags: 0x0},\n\t1122: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1123: {region: 0x113, script: 0x5b, flags: 0x0},\n\t1124: {region: 0x132, script: 0x5b, flags: 0x0},\n\t1125: {region: 0x127, script: 0x5b, flags: 0x0},\n\t1126: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1127: {region: 0x3c, script: 0x3, flags: 0x1},\n\t1128: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1129: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1130: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1131: {region: 0x124, script: 0xee, flags: 0x0},\n\t1132: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1133: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1134: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1135: {region: 0x70, script: 0x2c, flags: 0x0},\n\t1136: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1137: {region: 0x6e, script: 0x2c, flags: 0x0},\n\t1138: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1139: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1140: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1141: {region: 0xd7, script: 0x5b, flags: 0x0},\n\t1142: {region: 0x128, script: 0x5b, flags: 0x0},\n\t1143: {region: 0x126, script: 0x5b, flags: 0x0},\n\t1144: {region: 0x32, script: 0x5b, flags: 0x0},\n\t1145: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1146: {region: 0xe8, script: 0x5b, flags: 0x0},\n\t1147: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1148: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1149: {region: 0x32, script: 0x5b, flags: 0x0},\n\t1150: {region: 0xd5, script: 0x5b, flags: 0x0},\n\t1151: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1152: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1153: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1154: {region: 0x12a, script: 0x5b, flags: 0x0},\n\t1155: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1156: {region: 0xcf, script: 0x5b, flags: 0x0},\n\t1157: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1158: {region: 0xe7, script: 0x5b, flags: 0x0},\n\t1159: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1160: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1161: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1162: {region: 0x12c, script: 0x5b, flags: 0x0},\n\t1163: {region: 0x12c, script: 0x5b, flags: 0x0},\n\t1164: {region: 0x12f, script: 0x5b, flags: 0x0},\n\t1165: {region: 0x166, script: 0x5, flags: 0x0},\n\t1166: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1167: {region: 0x88, script: 0x34, flags: 0x0},\n\t1168: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1169: {region: 0xe8, script: 0x5b, flags: 0x0},\n\t1170: {region: 0x43, script: 0xef, flags: 0x0},\n\t1171: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1172: {region: 0x107, script: 0x20, flags: 0x0},\n\t1173: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1174: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1175: {region: 0x132, script: 0x5b, flags: 0x0},\n\t1176: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1177: {region: 0x124, script: 0xee, flags: 0x0},\n\t1178: {region: 0x32, script: 0x5b, flags: 0x0},\n\t1179: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1180: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1181: {region: 0xcf, script: 0x5b, flags: 0x0},\n\t1182: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1183: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1184: {region: 0x12e, script: 0x5b, flags: 0x0},\n\t1185: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1187: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1188: {region: 0xd5, script: 0x5b, flags: 0x0},\n\t1189: {region: 0x53, script: 0xe7, flags: 0x0},\n\t1190: {region: 0xe6, script: 0x5b, flags: 0x0},\n\t1191: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1192: {region: 0x107, script: 0x20, flags: 0x0},\n\t1193: {region: 0xbb, script: 0x5b, flags: 0x0},\n\t1194: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1195: {region: 0x107, script: 0x20, flags: 0x0},\n\t1196: {region: 0x3f, script: 0x4, flags: 0x1},\n\t1197: {region: 0x11d, script: 0xf3, flags: 0x0},\n\t1198: {region: 0x131, script: 0x20, flags: 0x0},\n\t1199: {region: 0x76, script: 0x5b, flags: 0x0},\n\t1200: {region: 0x2a, script: 0x5b, flags: 0x0},\n\t1202: {region: 0x43, script: 0x3, flags: 0x1},\n\t1203: {region: 0x9a, script: 0xe, flags: 0x0},\n\t1204: {region: 0xe9, script: 0x5, flags: 0x0},\n\t1205: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1206: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1207: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1208: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1209: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1210: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1211: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1212: {region: 0x46, script: 0x4, flags: 0x1},\n\t1213: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1214: {region: 0xb5, script: 0xf4, flags: 0x0},\n\t1215: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1216: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1217: {region: 0x9f, script: 0x5b, flags: 0x0},\n\t1218: {region: 0x107, script: 0x5b, flags: 0x0},\n\t1219: {region: 0x13f, script: 0x5b, flags: 0x0},\n\t1220: {region: 0x11c, script: 0x5b, flags: 0x0},\n\t1221: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1222: {region: 0x36, script: 0x5b, flags: 0x0},\n\t1223: {region: 0x61, script: 0x5b, flags: 0x0},\n\t1224: {region: 0xd2, script: 0x5b, flags: 0x0},\n\t1225: {region: 0x1, script: 0x5b, flags: 0x0},\n\t1226: {region: 0x107, script: 0x5b, flags: 0x0},\n\t1227: {region: 0x6b, script: 0x5b, flags: 0x0},\n\t1228: {region: 0x130, script: 0x5b, flags: 0x0},\n\t1229: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1230: {region: 0x36, script: 0x5b, flags: 0x0},\n\t1231: {region: 0x4e, script: 0x5b, flags: 0x0},\n\t1232: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1233: {region: 0x70, script: 0x2c, flags: 0x0},\n\t1234: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1235: {region: 0xe8, script: 0x5b, flags: 0x0},\n\t1236: {region: 0x2f, script: 0x5b, flags: 0x0},\n\t1237: {region: 0x9a, script: 0xe9, flags: 0x0},\n\t1238: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1239: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1240: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1241: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1242: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1243: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1244: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1245: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1246: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1247: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1248: {region: 0x141, script: 0x5b, flags: 0x0},\n\t1249: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1250: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1251: {region: 0xa9, script: 0x5, flags: 0x0},\n\t1252: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1253: {region: 0x115, script: 0x5b, flags: 0x0},\n\t1254: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1255: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1256: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1257: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1258: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1259: {region: 0x53, script: 0x3b, flags: 0x0},\n\t1260: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1261: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1262: {region: 0x41, script: 0x5b, flags: 0x0},\n\t1263: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1264: {region: 0x12c, script: 0x18, flags: 0x0},\n\t1265: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1266: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1267: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1268: {region: 0x12c, script: 0x63, flags: 0x0},\n\t1269: {region: 0x12c, script: 0x64, flags: 0x0},\n\t1270: {region: 0x7e, script: 0x2e, flags: 0x0},\n\t1271: {region: 0x53, script: 0x68, flags: 0x0},\n\t1272: {region: 0x10c, script: 0x6d, flags: 0x0},\n\t1273: {region: 0x109, script: 0x79, flags: 0x0},\n\t1274: {region: 0x9a, script: 0x22, flags: 0x0},\n\t1275: {region: 0x132, script: 0x5b, flags: 0x0},\n\t1276: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1277: {region: 0x9d, script: 0x93, flags: 0x0},\n\t1278: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1279: {region: 0x15f, script: 0xce, flags: 0x0},\n\t1280: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1281: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1282: {region: 0xdc, script: 0x22, flags: 0x0},\n\t1283: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1284: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1285: {region: 0xd2, script: 0x5b, flags: 0x0},\n\t1286: {region: 0x76, script: 0x5b, flags: 0x0},\n\t1287: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1288: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1289: {region: 0x52, script: 0x5b, flags: 0x0},\n\t1290: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1291: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1292: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1293: {region: 0x52, script: 0x5b, flags: 0x0},\n\t1294: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1295: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1296: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1297: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1298: {region: 0x1, script: 0x3e, flags: 0x0},\n\t1299: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1300: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1301: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1302: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1303: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1304: {region: 0xd7, script: 0x5b, flags: 0x0},\n\t1305: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1306: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1307: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1308: {region: 0x41, script: 0x5b, flags: 0x0},\n\t1309: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1310: {region: 0xd0, script: 0x5b, flags: 0x0},\n\t1311: {region: 0x4a, script: 0x3, flags: 0x1},\n\t1312: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1313: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1314: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1315: {region: 0x53, script: 0x5b, flags: 0x0},\n\t1316: {region: 0x10c, script: 0x5b, flags: 0x0},\n\t1318: {region: 0xa9, script: 0x5, flags: 0x0},\n\t1319: {region: 0xda, script: 0x5b, flags: 0x0},\n\t1320: {region: 0xbb, script: 0xeb, flags: 0x0},\n\t1321: {region: 0x4d, script: 0x14, flags: 0x1},\n\t1322: {region: 0x53, script: 0x7f, flags: 0x0},\n\t1323: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1324: {region: 0x123, script: 0x5b, flags: 0x0},\n\t1325: {region: 0xd1, script: 0x5b, flags: 0x0},\n\t1326: {region: 0x166, script: 0x5b, flags: 0x0},\n\t1327: {region: 0x162, script: 0x5b, flags: 0x0},\n\t1329: {region: 0x12c, script: 0x5b, flags: 0x0},\n}\n\n// likelyLangList holds lists info associated with likelyLang.\n// Size: 582 bytes, 97 elements\nvar likelyLangList = [97]likelyScriptRegion{\n\t0:  {region: 0x9d, script: 0x7, flags: 0x0},\n\t1:  {region: 0xa2, script: 0x7a, flags: 0x2},\n\t2:  {region: 0x11d, script: 0x87, flags: 0x2},\n\t3:  {region: 0x32, script: 0x5b, flags: 0x0},\n\t4:  {region: 0x9c, script: 0x5, flags: 0x4},\n\t5:  {region: 0x9d, script: 0x5, flags: 0x4},\n\t6:  {region: 0x107, script: 0x20, flags: 0x4},\n\t7:  {region: 0x9d, script: 0x5, flags: 0x2},\n\t8:  {region: 0x107, script: 0x20, flags: 0x0},\n\t9:  {region: 0x38, script: 0x2f, flags: 0x2},\n\t10: {region: 0x136, script: 0x5b, flags: 0x0},\n\t11: {region: 0x7c, script: 0xd1, flags: 0x2},\n\t12: {region: 0x115, script: 0x5b, flags: 0x0},\n\t13: {region: 0x85, script: 0x1, flags: 0x2},\n\t14: {region: 0x5e, script: 0x1f, flags: 0x0},\n\t15: {region: 0x88, script: 0x60, flags: 0x2},\n\t16: {region: 0xd7, script: 0x5b, flags: 0x0},\n\t17: {region: 0x52, script: 0x5, flags: 0x4},\n\t18: {region: 0x10c, script: 0x5, flags: 0x4},\n\t19: {region: 0xaf, script: 0x20, flags: 0x0},\n\t20: {region: 0x24, script: 0x5, flags: 0x4},\n\t21: {region: 0x53, script: 0x5, flags: 0x4},\n\t22: {region: 0x9d, script: 0x5, flags: 0x4},\n\t23: {region: 0xc6, script: 0x5, flags: 0x4},\n\t24: {region: 0x53, script: 0x5, flags: 0x2},\n\t25: {region: 0x12c, script: 0x5b, flags: 0x0},\n\t26: {region: 0xb1, script: 0x5, flags: 0x4},\n\t27: {region: 0x9c, script: 0x5, flags: 0x2},\n\t28: {region: 0xa6, script: 0x20, flags: 0x0},\n\t29: {region: 0x53, script: 0x5, flags: 0x4},\n\t30: {region: 0x12c, script: 0x5b, flags: 0x4},\n\t31: {region: 0x53, script: 0x5, flags: 0x2},\n\t32: {region: 0x12c, script: 0x5b, flags: 0x2},\n\t33: {region: 0xdc, script: 0x22, flags: 0x0},\n\t34: {region: 0x9a, script: 0x5e, flags: 0x2},\n\t35: {region: 0x84, script: 0x5b, flags: 0x0},\n\t36: {region: 0x85, script: 0x7e, flags: 0x4},\n\t37: {region: 0x85, script: 0x7e, flags: 0x2},\n\t38: {region: 0xc6, script: 0x20, flags: 0x0},\n\t39: {region: 0x53, script: 0x71, flags: 0x4},\n\t40: {region: 0x53, script: 0x71, flags: 0x2},\n\t41: {region: 0xd1, script: 0x5b, flags: 0x0},\n\t42: {region: 0x4a, script: 0x5, flags: 0x4},\n\t43: {region: 0x96, script: 0x5, flags: 0x4},\n\t44: {region: 0x9a, script: 0x36, flags: 0x0},\n\t45: {region: 0xe9, script: 0x5, flags: 0x4},\n\t46: {region: 0xe9, script: 0x5, flags: 0x2},\n\t47: {region: 0x9d, script: 0x8d, flags: 0x0},\n\t48: {region: 0x53, script: 0x8e, flags: 0x2},\n\t49: {region: 0xbb, script: 0xeb, flags: 0x0},\n\t50: {region: 0xda, script: 0x5b, flags: 0x4},\n\t51: {region: 0xe9, script: 0x5, flags: 0x0},\n\t52: {region: 0x9a, script: 0x22, flags: 0x2},\n\t53: {region: 0x9a, script: 0x50, flags: 0x2},\n\t54: {region: 0x9a, script: 0xd5, flags: 0x2},\n\t55: {region: 0x106, script: 0x20, flags: 0x0},\n\t56: {region: 0xbe, script: 0x5b, flags: 0x4},\n\t57: {region: 0x105, script: 0x5b, flags: 0x4},\n\t58: {region: 0x107, script: 0x5b, flags: 0x4},\n\t59: {region: 0x12c, script: 0x5b, flags: 0x4},\n\t60: {region: 0x125, script: 0x20, flags: 0x0},\n\t61: {region: 0xe9, script: 0x5, flags: 0x4},\n\t62: {region: 0xe9, script: 0x5, flags: 0x2},\n\t63: {region: 0x53, script: 0x5, flags: 0x0},\n\t64: {region: 0xaf, script: 0x20, flags: 0x4},\n\t65: {region: 0xc6, script: 0x20, flags: 0x4},\n\t66: {region: 0xaf, script: 0x20, flags: 0x2},\n\t67: {region: 0x9a, script: 0xe, flags: 0x0},\n\t68: {region: 0xdc, script: 0x22, flags: 0x4},\n\t69: {region: 0xdc, script: 0x22, flags: 0x2},\n\t70: {region: 0x138, script: 0x5b, flags: 0x0},\n\t71: {region: 0x24, script: 0x5, flags: 0x4},\n\t72: {region: 0x53, script: 0x20, flags: 0x4},\n\t73: {region: 0x24, script: 0x5, flags: 0x2},\n\t74: {region: 0x8e, script: 0x3c, flags: 0x0},\n\t75: {region: 0x53, script: 0x3b, flags: 0x4},\n\t76: {region: 0x53, script: 0x3b, flags: 0x2},\n\t77: {region: 0x53, script: 0x3b, flags: 0x0},\n\t78: {region: 0x2f, script: 0x3c, flags: 0x4},\n\t79: {region: 0x3e, script: 0x3c, flags: 0x4},\n\t80: {region: 0x7c, script: 0x3c, flags: 0x4},\n\t81: {region: 0x7f, script: 0x3c, flags: 0x4},\n\t82: {region: 0x8e, script: 0x3c, flags: 0x4},\n\t83: {region: 0x96, script: 0x3c, flags: 0x4},\n\t84: {region: 0xc7, script: 0x3c, flags: 0x4},\n\t85: {region: 0xd1, script: 0x3c, flags: 0x4},\n\t86: {region: 0xe3, script: 0x3c, flags: 0x4},\n\t87: {region: 0xe6, script: 0x3c, flags: 0x4},\n\t88: {region: 0xe8, script: 0x3c, flags: 0x4},\n\t89: {region: 0x117, script: 0x3c, flags: 0x4},\n\t90: {region: 0x124, script: 0x3c, flags: 0x4},\n\t91: {region: 0x12f, script: 0x3c, flags: 0x4},\n\t92: {region: 0x136, script: 0x3c, flags: 0x4},\n\t93: {region: 0x13f, script: 0x3c, flags: 0x4},\n\t94: {region: 0x12f, script: 0x11, flags: 0x2},\n\t95: {region: 0x12f, script: 0x37, flags: 0x2},\n\t96: {region: 0x12f, script: 0x3c, flags: 0x2},\n}\n\ntype likelyLangScript struct {\n\tlang   uint16\n\tscript uint16\n\tflags  uint8\n}\n\n// likelyRegion is a lookup table, indexed by regionID, for the most likely\n// languages and scripts given incomplete information. If more entries exist\n// for a given regionID, lang and script are the index and size respectively\n// of the list in likelyRegionList.\n// TODO: exclude containers and user-definable regions from the list.\n// Size: 2154 bytes, 359 elements\nvar likelyRegion = [359]likelyLangScript{\n\t34:  {lang: 0xd7, script: 0x5b, flags: 0x0},\n\t35:  {lang: 0x3a, script: 0x5, flags: 0x0},\n\t36:  {lang: 0x0, script: 0x2, flags: 0x1},\n\t39:  {lang: 0x2, script: 0x2, flags: 0x1},\n\t40:  {lang: 0x4, script: 0x2, flags: 0x1},\n\t42:  {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t43:  {lang: 0x0, script: 0x5b, flags: 0x0},\n\t44:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t45:  {lang: 0x41b, script: 0x5b, flags: 0x0},\n\t46:  {lang: 0x10d, script: 0x5b, flags: 0x0},\n\t48:  {lang: 0x367, script: 0x5b, flags: 0x0},\n\t49:  {lang: 0x444, script: 0x5b, flags: 0x0},\n\t50:  {lang: 0x58, script: 0x5b, flags: 0x0},\n\t51:  {lang: 0x6, script: 0x2, flags: 0x1},\n\t53:  {lang: 0xa5, script: 0xe, flags: 0x0},\n\t54:  {lang: 0x367, script: 0x5b, flags: 0x0},\n\t55:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t56:  {lang: 0x7e, script: 0x20, flags: 0x0},\n\t57:  {lang: 0x3a, script: 0x5, flags: 0x0},\n\t58:  {lang: 0x3d9, script: 0x5b, flags: 0x0},\n\t59:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t60:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t62:  {lang: 0x31f, script: 0x5b, flags: 0x0},\n\t63:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t64:  {lang: 0x3a1, script: 0x5b, flags: 0x0},\n\t65:  {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t67:  {lang: 0x8, script: 0x2, flags: 0x1},\n\t69:  {lang: 0x0, script: 0x5b, flags: 0x0},\n\t71:  {lang: 0x71, script: 0x20, flags: 0x0},\n\t73:  {lang: 0x512, script: 0x3e, flags: 0x2},\n\t74:  {lang: 0x31f, script: 0x5, flags: 0x2},\n\t75:  {lang: 0x445, script: 0x5b, flags: 0x0},\n\t76:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t77:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t78:  {lang: 0x10d, script: 0x5b, flags: 0x0},\n\t79:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t81:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t82:  {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t83:  {lang: 0xa, script: 0x4, flags: 0x1},\n\t84:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t85:  {lang: 0x0, script: 0x5b, flags: 0x0},\n\t87:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t90:  {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t91:  {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t92:  {lang: 0x3a1, script: 0x5b, flags: 0x0},\n\t94:  {lang: 0xe, script: 0x2, flags: 0x1},\n\t95:  {lang: 0xfa, script: 0x5b, flags: 0x0},\n\t97:  {lang: 0x10d, script: 0x5b, flags: 0x0},\n\t99:  {lang: 0x1, script: 0x5b, flags: 0x0},\n\t100: {lang: 0x101, script: 0x5b, flags: 0x0},\n\t102: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t104: {lang: 0x10, script: 0x2, flags: 0x1},\n\t105: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t106: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t107: {lang: 0x140, script: 0x5b, flags: 0x0},\n\t108: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t109: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t110: {lang: 0x46f, script: 0x2c, flags: 0x0},\n\t111: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t112: {lang: 0x12, script: 0x2, flags: 0x1},\n\t114: {lang: 0x10d, script: 0x5b, flags: 0x0},\n\t115: {lang: 0x151, script: 0x5b, flags: 0x0},\n\t116: {lang: 0x1c0, script: 0x22, flags: 0x2},\n\t119: {lang: 0x158, script: 0x5b, flags: 0x0},\n\t121: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t123: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t124: {lang: 0x14, script: 0x2, flags: 0x1},\n\t126: {lang: 0x16, script: 0x3, flags: 0x1},\n\t127: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t129: {lang: 0x21, script: 0x5b, flags: 0x0},\n\t131: {lang: 0x245, script: 0x5b, flags: 0x0},\n\t133: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t134: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t135: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t136: {lang: 0x19, script: 0x2, flags: 0x1},\n\t137: {lang: 0x0, script: 0x5b, flags: 0x0},\n\t138: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t140: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t142: {lang: 0x529, script: 0x3c, flags: 0x0},\n\t143: {lang: 0x0, script: 0x5b, flags: 0x0},\n\t144: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t145: {lang: 0x1d1, script: 0x5b, flags: 0x0},\n\t146: {lang: 0x1d4, script: 0x5b, flags: 0x0},\n\t147: {lang: 0x1d5, script: 0x5b, flags: 0x0},\n\t149: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t150: {lang: 0x1b, script: 0x2, flags: 0x1},\n\t152: {lang: 0x1bc, script: 0x3e, flags: 0x0},\n\t154: {lang: 0x1d, script: 0x3, flags: 0x1},\n\t156: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t157: {lang: 0x20, script: 0x2, flags: 0x1},\n\t158: {lang: 0x1f8, script: 0x5b, flags: 0x0},\n\t159: {lang: 0x1f9, script: 0x5b, flags: 0x0},\n\t162: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t163: {lang: 0x200, script: 0x49, flags: 0x0},\n\t165: {lang: 0x445, script: 0x5b, flags: 0x0},\n\t166: {lang: 0x28a, script: 0x20, flags: 0x0},\n\t167: {lang: 0x22, script: 0x3, flags: 0x1},\n\t169: {lang: 0x25, script: 0x2, flags: 0x1},\n\t171: {lang: 0x254, script: 0x54, flags: 0x0},\n\t172: {lang: 0x254, script: 0x54, flags: 0x0},\n\t173: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t175: {lang: 0x3e2, script: 0x20, flags: 0x0},\n\t176: {lang: 0x27, script: 0x2, flags: 0x1},\n\t177: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t179: {lang: 0x10d, script: 0x5b, flags: 0x0},\n\t180: {lang: 0x40c, script: 0xd6, flags: 0x0},\n\t182: {lang: 0x43b, script: 0x5b, flags: 0x0},\n\t183: {lang: 0x2c0, script: 0x5b, flags: 0x0},\n\t184: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t185: {lang: 0x2c7, script: 0x5b, flags: 0x0},\n\t186: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t187: {lang: 0x29, script: 0x2, flags: 0x1},\n\t188: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t189: {lang: 0x2b, script: 0x2, flags: 0x1},\n\t190: {lang: 0x432, script: 0x5b, flags: 0x0},\n\t191: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t192: {lang: 0x2f1, script: 0x5b, flags: 0x0},\n\t195: {lang: 0x2d, script: 0x2, flags: 0x1},\n\t196: {lang: 0xa0, script: 0x5b, flags: 0x0},\n\t197: {lang: 0x2f, script: 0x2, flags: 0x1},\n\t198: {lang: 0x31, script: 0x2, flags: 0x1},\n\t199: {lang: 0x33, script: 0x2, flags: 0x1},\n\t201: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t202: {lang: 0x35, script: 0x2, flags: 0x1},\n\t204: {lang: 0x320, script: 0x5b, flags: 0x0},\n\t205: {lang: 0x37, script: 0x3, flags: 0x1},\n\t206: {lang: 0x128, script: 0xed, flags: 0x0},\n\t208: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t209: {lang: 0x31f, script: 0x5b, flags: 0x0},\n\t210: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t211: {lang: 0x16, script: 0x5b, flags: 0x0},\n\t212: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t213: {lang: 0x1b4, script: 0x5b, flags: 0x0},\n\t215: {lang: 0x1b4, script: 0x5, flags: 0x2},\n\t217: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t218: {lang: 0x367, script: 0x5b, flags: 0x0},\n\t219: {lang: 0x347, script: 0x5b, flags: 0x0},\n\t220: {lang: 0x351, script: 0x22, flags: 0x0},\n\t226: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t227: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t229: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t230: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t231: {lang: 0x486, script: 0x5b, flags: 0x0},\n\t232: {lang: 0x153, script: 0x5b, flags: 0x0},\n\t233: {lang: 0x3a, script: 0x3, flags: 0x1},\n\t234: {lang: 0x3b3, script: 0x5b, flags: 0x0},\n\t235: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t237: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t238: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t239: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t241: {lang: 0x3a2, script: 0x5b, flags: 0x0},\n\t242: {lang: 0x194, script: 0x5b, flags: 0x0},\n\t244: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t259: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t261: {lang: 0x3d, script: 0x2, flags: 0x1},\n\t262: {lang: 0x432, script: 0x20, flags: 0x0},\n\t263: {lang: 0x3f, script: 0x2, flags: 0x1},\n\t264: {lang: 0x3e5, script: 0x5b, flags: 0x0},\n\t265: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t267: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t268: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t269: {lang: 0x41, script: 0x2, flags: 0x1},\n\t272: {lang: 0x416, script: 0x5b, flags: 0x0},\n\t273: {lang: 0x347, script: 0x5b, flags: 0x0},\n\t274: {lang: 0x43, script: 0x2, flags: 0x1},\n\t276: {lang: 0x1f9, script: 0x5b, flags: 0x0},\n\t277: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t278: {lang: 0x429, script: 0x5b, flags: 0x0},\n\t279: {lang: 0x367, script: 0x5b, flags: 0x0},\n\t281: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t283: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t285: {lang: 0x45, script: 0x2, flags: 0x1},\n\t289: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t290: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t291: {lang: 0x47, script: 0x2, flags: 0x1},\n\t292: {lang: 0x49, script: 0x3, flags: 0x1},\n\t293: {lang: 0x4c, script: 0x2, flags: 0x1},\n\t294: {lang: 0x477, script: 0x5b, flags: 0x0},\n\t295: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t296: {lang: 0x476, script: 0x5b, flags: 0x0},\n\t297: {lang: 0x4e, script: 0x2, flags: 0x1},\n\t298: {lang: 0x482, script: 0x5b, flags: 0x0},\n\t300: {lang: 0x50, script: 0x4, flags: 0x1},\n\t302: {lang: 0x4a0, script: 0x5b, flags: 0x0},\n\t303: {lang: 0x54, script: 0x2, flags: 0x1},\n\t304: {lang: 0x445, script: 0x5b, flags: 0x0},\n\t305: {lang: 0x56, script: 0x3, flags: 0x1},\n\t306: {lang: 0x445, script: 0x5b, flags: 0x0},\n\t310: {lang: 0x512, script: 0x3e, flags: 0x2},\n\t311: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t312: {lang: 0x4bc, script: 0x5b, flags: 0x0},\n\t313: {lang: 0x1f9, script: 0x5b, flags: 0x0},\n\t316: {lang: 0x13e, script: 0x5b, flags: 0x0},\n\t319: {lang: 0x4c3, script: 0x5b, flags: 0x0},\n\t320: {lang: 0x8a, script: 0x5b, flags: 0x0},\n\t321: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t323: {lang: 0x41b, script: 0x5b, flags: 0x0},\n\t334: {lang: 0x59, script: 0x2, flags: 0x1},\n\t351: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t352: {lang: 0x5b, script: 0x2, flags: 0x1},\n\t357: {lang: 0x423, script: 0x5b, flags: 0x0},\n}\n\n// likelyRegionList holds lists info associated with likelyRegion.\n// Size: 558 bytes, 93 elements\nvar likelyRegionList = [93]likelyLangScript{\n\t0:  {lang: 0x148, script: 0x5, flags: 0x0},\n\t1:  {lang: 0x476, script: 0x5b, flags: 0x0},\n\t2:  {lang: 0x431, script: 0x5b, flags: 0x0},\n\t3:  {lang: 0x2ff, script: 0x20, flags: 0x0},\n\t4:  {lang: 0x1d7, script: 0x8, flags: 0x0},\n\t5:  {lang: 0x274, script: 0x5b, flags: 0x0},\n\t6:  {lang: 0xb7, script: 0x5b, flags: 0x0},\n\t7:  {lang: 0x432, script: 0x20, flags: 0x0},\n\t8:  {lang: 0x12d, script: 0xef, flags: 0x0},\n\t9:  {lang: 0x351, script: 0x22, flags: 0x0},\n\t10: {lang: 0x529, script: 0x3b, flags: 0x0},\n\t11: {lang: 0x4ac, script: 0x5, flags: 0x0},\n\t12: {lang: 0x523, script: 0x5b, flags: 0x0},\n\t13: {lang: 0x29a, script: 0xee, flags: 0x0},\n\t14: {lang: 0x136, script: 0x34, flags: 0x0},\n\t15: {lang: 0x48a, script: 0x5b, flags: 0x0},\n\t16: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t17: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t18: {lang: 0x27, script: 0x2c, flags: 0x0},\n\t19: {lang: 0x139, script: 0x5b, flags: 0x0},\n\t20: {lang: 0x26a, script: 0x5, flags: 0x2},\n\t21: {lang: 0x512, script: 0x3e, flags: 0x2},\n\t22: {lang: 0x210, script: 0x2e, flags: 0x0},\n\t23: {lang: 0x5, script: 0x20, flags: 0x0},\n\t24: {lang: 0x274, script: 0x5b, flags: 0x0},\n\t25: {lang: 0x136, script: 0x34, flags: 0x0},\n\t26: {lang: 0x2ff, script: 0x20, flags: 0x0},\n\t27: {lang: 0x1e1, script: 0x5b, flags: 0x0},\n\t28: {lang: 0x31f, script: 0x5, flags: 0x0},\n\t29: {lang: 0x1be, script: 0x22, flags: 0x0},\n\t30: {lang: 0x4b4, script: 0x5, flags: 0x0},\n\t31: {lang: 0x236, script: 0x76, flags: 0x0},\n\t32: {lang: 0x148, script: 0x5, flags: 0x0},\n\t33: {lang: 0x476, script: 0x5b, flags: 0x0},\n\t34: {lang: 0x24a, script: 0x4f, flags: 0x0},\n\t35: {lang: 0xe6, script: 0x5, flags: 0x0},\n\t36: {lang: 0x226, script: 0xee, flags: 0x0},\n\t37: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t38: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t39: {lang: 0x2b8, script: 0x58, flags: 0x0},\n\t40: {lang: 0x226, script: 0xee, flags: 0x0},\n\t41: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t42: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t43: {lang: 0x3dc, script: 0x5b, flags: 0x0},\n\t44: {lang: 0x4ae, script: 0x20, flags: 0x0},\n\t45: {lang: 0x2ff, script: 0x20, flags: 0x0},\n\t46: {lang: 0x431, script: 0x5b, flags: 0x0},\n\t47: {lang: 0x331, script: 0x76, flags: 0x0},\n\t48: {lang: 0x213, script: 0x5b, flags: 0x0},\n\t49: {lang: 0x30b, script: 0x20, flags: 0x0},\n\t50: {lang: 0x242, script: 0x5, flags: 0x0},\n\t51: {lang: 0x529, script: 0x3c, flags: 0x0},\n\t52: {lang: 0x3c0, script: 0x5b, flags: 0x0},\n\t53: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t54: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t55: {lang: 0x2ed, script: 0x5b, flags: 0x0},\n\t56: {lang: 0x4b4, script: 0x5, flags: 0x0},\n\t57: {lang: 0x88, script: 0x22, flags: 0x0},\n\t58: {lang: 0x4b4, script: 0x5, flags: 0x0},\n\t59: {lang: 0x4b4, script: 0x5, flags: 0x0},\n\t60: {lang: 0xbe, script: 0x22, flags: 0x0},\n\t61: {lang: 0x3dc, script: 0x5b, flags: 0x0},\n\t62: {lang: 0x7e, script: 0x20, flags: 0x0},\n\t63: {lang: 0x3e2, script: 0x20, flags: 0x0},\n\t64: {lang: 0x267, script: 0x5b, flags: 0x0},\n\t65: {lang: 0x444, script: 0x5b, flags: 0x0},\n\t66: {lang: 0x512, script: 0x3e, flags: 0x0},\n\t67: {lang: 0x412, script: 0x5b, flags: 0x0},\n\t68: {lang: 0x4ae, script: 0x20, flags: 0x0},\n\t69: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t70: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t71: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t72: {lang: 0x35, script: 0x5, flags: 0x0},\n\t73: {lang: 0x46b, script: 0xee, flags: 0x0},\n\t74: {lang: 0x2ec, script: 0x5, flags: 0x0},\n\t75: {lang: 0x30f, script: 0x76, flags: 0x0},\n\t76: {lang: 0x467, script: 0x20, flags: 0x0},\n\t77: {lang: 0x148, script: 0x5, flags: 0x0},\n\t78: {lang: 0x3a, script: 0x5, flags: 0x0},\n\t79: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t80: {lang: 0x48a, script: 0x5b, flags: 0x0},\n\t81: {lang: 0x58, script: 0x5, flags: 0x0},\n\t82: {lang: 0x219, script: 0x20, flags: 0x0},\n\t83: {lang: 0x81, script: 0x34, flags: 0x0},\n\t84: {lang: 0x529, script: 0x3c, flags: 0x0},\n\t85: {lang: 0x48c, script: 0x5b, flags: 0x0},\n\t86: {lang: 0x4ae, script: 0x20, flags: 0x0},\n\t87: {lang: 0x512, script: 0x3e, flags: 0x0},\n\t88: {lang: 0x3b3, script: 0x5b, flags: 0x0},\n\t89: {lang: 0x431, script: 0x5b, flags: 0x0},\n\t90: {lang: 0x432, script: 0x20, flags: 0x0},\n\t91: {lang: 0x15e, script: 0x5b, flags: 0x0},\n\t92: {lang: 0x446, script: 0x5, flags: 0x0},\n}\n\ntype likelyTag struct {\n\tlang   uint16\n\tregion uint16\n\tscript uint16\n}\n\n// Size: 198 bytes, 33 elements\nvar likelyRegionGroup = [33]likelyTag{\n\t1:  {lang: 0x139, region: 0xd7, script: 0x5b},\n\t2:  {lang: 0x139, region: 0x136, script: 0x5b},\n\t3:  {lang: 0x3c0, region: 0x41, script: 0x5b},\n\t4:  {lang: 0x139, region: 0x2f, script: 0x5b},\n\t5:  {lang: 0x139, region: 0xd7, script: 0x5b},\n\t6:  {lang: 0x13e, region: 0xd0, script: 0x5b},\n\t7:  {lang: 0x445, region: 0x130, script: 0x5b},\n\t8:  {lang: 0x3a, region: 0x6c, script: 0x5},\n\t9:  {lang: 0x445, region: 0x4b, script: 0x5b},\n\t10: {lang: 0x139, region: 0x162, script: 0x5b},\n\t11: {lang: 0x139, region: 0x136, script: 0x5b},\n\t12: {lang: 0x139, region: 0x136, script: 0x5b},\n\t13: {lang: 0x13e, region: 0x5a, script: 0x5b},\n\t14: {lang: 0x529, region: 0x53, script: 0x3b},\n\t15: {lang: 0x1be, region: 0x9a, script: 0x22},\n\t16: {lang: 0x1e1, region: 0x96, script: 0x5b},\n\t17: {lang: 0x1f9, region: 0x9f, script: 0x5b},\n\t18: {lang: 0x139, region: 0x2f, script: 0x5b},\n\t19: {lang: 0x139, region: 0xe7, script: 0x5b},\n\t20: {lang: 0x139, region: 0x8b, script: 0x5b},\n\t21: {lang: 0x41b, region: 0x143, script: 0x5b},\n\t22: {lang: 0x529, region: 0x53, script: 0x3b},\n\t23: {lang: 0x4bc, region: 0x138, script: 0x5b},\n\t24: {lang: 0x3a, region: 0x109, script: 0x5},\n\t25: {lang: 0x3e2, region: 0x107, script: 0x20},\n\t26: {lang: 0x3e2, region: 0x107, script: 0x20},\n\t27: {lang: 0x139, region: 0x7c, script: 0x5b},\n\t28: {lang: 0x10d, region: 0x61, script: 0x5b},\n\t29: {lang: 0x139, region: 0xd7, script: 0x5b},\n\t30: {lang: 0x13e, region: 0x1f, script: 0x5b},\n\t31: {lang: 0x139, region: 0x9b, script: 0x5b},\n\t32: {lang: 0x139, region: 0x7c, script: 0x5b},\n}\n\n// Size: 264 bytes, 33 elements\nvar regionContainment = [33]uint64{\n\t// Entry 0 - 1F\n\t0x00000001ffffffff, 0x00000000200007a2, 0x0000000000003044, 0x0000000000000008,\n\t0x00000000803c0010, 0x0000000000000020, 0x0000000000000040, 0x0000000000000080,\n\t0x0000000000000100, 0x0000000000000200, 0x0000000000000400, 0x000000004000384c,\n\t0x0000000000001000, 0x0000000000002000, 0x0000000000004000, 0x0000000000008000,\n\t0x0000000000010000, 0x0000000000020000, 0x0000000000040000, 0x0000000000080000,\n\t0x0000000000100000, 0x0000000000200000, 0x0000000001c1c000, 0x0000000000800000,\n\t0x0000000001000000, 0x000000001e020000, 0x0000000004000000, 0x0000000008000000,\n\t0x0000000010000000, 0x00000000200006a0, 0x0000000040002048, 0x0000000080000000,\n\t// Entry 20 - 3F\n\t0x0000000100000000,\n}\n\n// regionInclusion maps region identifiers to sets of regions in regionInclusionBits,\n// where each set holds all groupings that are directly connected in a region\n// containment graph.\n// Size: 359 bytes, 359 elements\nvar regionInclusion = [359]uint8{\n\t// Entry 0 - 3F\n\t0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,\n\t0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,\n\t0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,\n\t0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e,\n\t0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x26, 0x23,\n\t0x24, 0x26, 0x27, 0x22, 0x28, 0x29, 0x2a, 0x2b,\n\t0x26, 0x2c, 0x24, 0x23, 0x26, 0x25, 0x2a, 0x2d,\n\t0x2e, 0x24, 0x2f, 0x2d, 0x26, 0x30, 0x31, 0x28,\n\t// Entry 40 - 7F\n\t0x26, 0x28, 0x26, 0x25, 0x31, 0x22, 0x32, 0x33,\n\t0x34, 0x30, 0x22, 0x27, 0x27, 0x27, 0x35, 0x2d,\n\t0x29, 0x28, 0x27, 0x36, 0x28, 0x22, 0x21, 0x34,\n\t0x23, 0x21, 0x26, 0x2d, 0x26, 0x22, 0x37, 0x2e,\n\t0x35, 0x2a, 0x22, 0x2f, 0x38, 0x26, 0x26, 0x21,\n\t0x39, 0x39, 0x28, 0x38, 0x39, 0x39, 0x2f, 0x3a,\n\t0x2f, 0x20, 0x21, 0x38, 0x3b, 0x28, 0x3c, 0x2c,\n\t0x21, 0x2a, 0x35, 0x27, 0x38, 0x26, 0x24, 0x28,\n\t// Entry 80 - BF\n\t0x2c, 0x2d, 0x23, 0x30, 0x2d, 0x2d, 0x26, 0x27,\n\t0x3a, 0x22, 0x34, 0x3c, 0x2d, 0x28, 0x36, 0x22,\n\t0x34, 0x3a, 0x26, 0x2e, 0x21, 0x39, 0x31, 0x38,\n\t0x24, 0x2c, 0x25, 0x22, 0x24, 0x25, 0x2c, 0x3a,\n\t0x2c, 0x26, 0x24, 0x36, 0x21, 0x2f, 0x3d, 0x31,\n\t0x3c, 0x2f, 0x26, 0x36, 0x36, 0x24, 0x26, 0x3d,\n\t0x31, 0x24, 0x26, 0x35, 0x25, 0x2d, 0x32, 0x38,\n\t0x2a, 0x38, 0x39, 0x39, 0x35, 0x33, 0x23, 0x26,\n\t// Entry C0 - FF\n\t0x2f, 0x3c, 0x21, 0x23, 0x2d, 0x31, 0x36, 0x36,\n\t0x3c, 0x26, 0x2d, 0x26, 0x3a, 0x2f, 0x25, 0x2f,\n\t0x34, 0x31, 0x2f, 0x32, 0x3b, 0x2d, 0x2b, 0x2d,\n\t0x21, 0x34, 0x2a, 0x2c, 0x25, 0x21, 0x3c, 0x24,\n\t0x29, 0x2b, 0x24, 0x34, 0x21, 0x28, 0x29, 0x3b,\n\t0x31, 0x25, 0x2e, 0x30, 0x29, 0x26, 0x24, 0x3a,\n\t0x21, 0x3c, 0x28, 0x21, 0x24, 0x21, 0x21, 0x1f,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t// Entry 100 - 13F\n\t0x21, 0x21, 0x21, 0x2f, 0x21, 0x2e, 0x23, 0x33,\n\t0x2f, 0x24, 0x3b, 0x2f, 0x39, 0x38, 0x31, 0x2d,\n\t0x3a, 0x2c, 0x2e, 0x2d, 0x23, 0x2d, 0x2f, 0x28,\n\t0x2f, 0x27, 0x33, 0x34, 0x26, 0x24, 0x32, 0x22,\n\t0x26, 0x27, 0x22, 0x2d, 0x31, 0x3d, 0x29, 0x31,\n\t0x3d, 0x39, 0x29, 0x31, 0x24, 0x26, 0x29, 0x36,\n\t0x2f, 0x33, 0x2f, 0x21, 0x22, 0x21, 0x30, 0x28,\n\t0x3d, 0x23, 0x26, 0x21, 0x28, 0x26, 0x26, 0x31,\n\t// Entry 140 - 17F\n\t0x3b, 0x29, 0x21, 0x29, 0x21, 0x21, 0x21, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x23, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,\n\t0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x24, 0x24,\n\t0x2f, 0x23, 0x32, 0x2f, 0x27, 0x2f, 0x21,\n}\n\n// regionInclusionBits is an array of bit vectors where every vector represents\n// a set of region groupings.  These sets are used to compute the distance\n// between two regions for the purpose of language matching.\n// Size: 584 bytes, 73 elements\nvar regionInclusionBits = [73]uint64{\n\t// Entry 0 - 1F\n\t0x0000000102400813, 0x00000000200007a3, 0x0000000000003844, 0x0000000040000808,\n\t0x00000000803c0011, 0x0000000020000022, 0x0000000040000844, 0x0000000020000082,\n\t0x0000000000000102, 0x0000000020000202, 0x0000000020000402, 0x000000004000384d,\n\t0x0000000000001804, 0x0000000040002804, 0x0000000000404000, 0x0000000000408000,\n\t0x0000000000410000, 0x0000000002020000, 0x0000000000040010, 0x0000000000080010,\n\t0x0000000000100010, 0x0000000000200010, 0x0000000001c1c001, 0x0000000000c00000,\n\t0x0000000001400000, 0x000000001e020001, 0x0000000006000000, 0x000000000a000000,\n\t0x0000000012000000, 0x00000000200006a2, 0x0000000040002848, 0x0000000080000010,\n\t// Entry 20 - 3F\n\t0x0000000100000001, 0x0000000000000001, 0x0000000080000000, 0x0000000000020000,\n\t0x0000000001000000, 0x0000000000008000, 0x0000000000002000, 0x0000000000000200,\n\t0x0000000000000008, 0x0000000000200000, 0x0000000110000000, 0x0000000000040000,\n\t0x0000000008000000, 0x0000000000000020, 0x0000000104000000, 0x0000000000000080,\n\t0x0000000000001000, 0x0000000000010000, 0x0000000000000400, 0x0000000004000000,\n\t0x0000000000000040, 0x0000000010000000, 0x0000000000004000, 0x0000000101000000,\n\t0x0000000108000000, 0x0000000000000100, 0x0000000100020000, 0x0000000000080000,\n\t0x0000000000100000, 0x0000000000800000, 0x00000001ffffffff, 0x0000000122400fb3,\n\t// Entry 40 - 5F\n\t0x00000001827c0813, 0x000000014240385f, 0x0000000103c1c813, 0x000000011e420813,\n\t0x0000000112000001, 0x0000000106000001, 0x0000000101400001, 0x000000010a000001,\n\t0x0000000102020001,\n}\n\n// regionInclusionNext marks, for each entry in regionInclusionBits, the set of\n// all groups that are reachable from the groups set in the respective entry.\n// Size: 73 bytes, 73 elements\nvar regionInclusionNext = [73]uint8{\n\t// Entry 0 - 3F\n\t0x3e, 0x3f, 0x0b, 0x0b, 0x40, 0x01, 0x0b, 0x01,\n\t0x01, 0x01, 0x01, 0x41, 0x0b, 0x0b, 0x16, 0x16,\n\t0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x42, 0x16,\n\t0x16, 0x43, 0x19, 0x19, 0x19, 0x01, 0x0b, 0x04,\n\t0x00, 0x00, 0x1f, 0x11, 0x18, 0x0f, 0x0d, 0x09,\n\t0x03, 0x15, 0x44, 0x12, 0x1b, 0x05, 0x45, 0x07,\n\t0x0c, 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x46,\n\t0x47, 0x08, 0x48, 0x13, 0x14, 0x17, 0x3e, 0x3e,\n\t// Entry 40 - 7F\n\t0x3e, 0x3e, 0x3e, 0x3e, 0x43, 0x43, 0x42, 0x43,\n\t0x43,\n}\n\ntype parentRel struct {\n\tlang       uint16\n\tscript     uint16\n\tmaxScript  uint16\n\ttoRegion   uint16\n\tfromRegion []uint16\n}\n\n// Size: 414 bytes, 5 elements\nvar parents = [5]parentRel{\n\t0: {lang: 0x139, script: 0x0, maxScript: 0x5b, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x25, 0x26, 0x2f, 0x34, 0x36, 0x3d, 0x42, 0x46, 0x48, 0x49, 0x4a, 0x50, 0x52, 0x5d, 0x5e, 0x62, 0x65, 0x6e, 0x74, 0x75, 0x76, 0x7c, 0x7d, 0x80, 0x81, 0x82, 0x84, 0x8d, 0x8e, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0xa0, 0xa1, 0xa5, 0xa8, 0xaa, 0xae, 0xb2, 0xb5, 0xb6, 0xc0, 0xc7, 0xcb, 0xcc, 0xcd, 0xcf, 0xd1, 0xd3, 0xd6, 0xd7, 0xde, 0xe0, 0xe1, 0xe7, 0xe8, 0xe9, 0xec, 0xf1, 0x108, 0x10a, 0x10b, 0x10c, 0x10e, 0x10f, 0x113, 0x118, 0x11c, 0x11e, 0x120, 0x126, 0x12a, 0x12d, 0x12e, 0x130, 0x132, 0x13a, 0x13d, 0x140, 0x143, 0x162, 0x163, 0x165}},\n\t1: {lang: 0x139, script: 0x0, maxScript: 0x5b, toRegion: 0x1a, fromRegion: []uint16{0x2e, 0x4e, 0x61, 0x64, 0x73, 0xda, 0x10d, 0x110}},\n\t2: {lang: 0x13e, script: 0x0, maxScript: 0x5b, toRegion: 0x1f, fromRegion: []uint16{0x2c, 0x3f, 0x41, 0x48, 0x51, 0x54, 0x57, 0x5a, 0x66, 0x6a, 0x8a, 0x90, 0xd0, 0xd9, 0xe3, 0xe5, 0xed, 0xf2, 0x11b, 0x136, 0x137, 0x13c}},\n\t3: {lang: 0x3c0, script: 0x0, maxScript: 0x5b, toRegion: 0xef, fromRegion: []uint16{0x2a, 0x4e, 0x5b, 0x87, 0x8c, 0xb8, 0xc7, 0xd2, 0x119, 0x127}},\n\t4: {lang: 0x529, script: 0x3c, maxScript: 0x3c, toRegion: 0x8e, fromRegion: []uint16{0xc7}},\n}\n\n// Total table size 30466 bytes (29KiB); checksum: 7544152B\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/language/tags.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\n// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed.\n// It simplifies safe initialization of Tag values.\nfunc MustParse(s string) Tag {\n\tt, err := Parse(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}\n\n// MustParseBase is like ParseBase, but panics if the given base cannot be parsed.\n// It simplifies safe initialization of Base values.\nfunc MustParseBase(s string) Language {\n\tb, err := ParseBase(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}\n\n// MustParseScript is like ParseScript, but panics if the given script cannot be\n// parsed. It simplifies safe initialization of Script values.\nfunc MustParseScript(s string) Script {\n\tscr, err := ParseScript(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn scr\n}\n\n// MustParseRegion is like ParseRegion, but panics if the given region cannot be\n// parsed. It simplifies safe initialization of Region values.\nfunc MustParseRegion(s string) Region {\n\tr, err := ParseRegion(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}\n\n// Und is the root language.\nvar Und Tag\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/match.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage internal\n\n// This file contains matchers that implement CLDR inheritance.\n//\n//     See https://unicode.org/reports/tr35/#Locale_Inheritance.\n//\n// Some of the inheritance described in this document is already handled by\n// the cldr package.\n\nimport (\n\t\"golang.org/x/text/language\"\n)\n\n// TODO: consider if (some of the) matching algorithm needs to be public after\n// getting some feel about what is generic and what is specific.\n\n// NewInheritanceMatcher returns a matcher that matches based on the inheritance\n// chain.\n//\n// The matcher uses canonicalization and the parent relationship to find a\n// match. The resulting match will always be either Und or a language with the\n// same language and script as the requested language. It will not match\n// languages for which there is understood to be mutual or one-directional\n// intelligibility.\n//\n// A Match will indicate an Exact match if the language matches after\n// canonicalization and High if the matched tag is a parent.\nfunc NewInheritanceMatcher(t []language.Tag) *InheritanceMatcher {\n\ttags := &InheritanceMatcher{make(map[language.Tag]int)}\n\tfor i, tag := range t {\n\t\tct, err := language.All.Canonicalize(tag)\n\t\tif err != nil {\n\t\t\tct = tag\n\t\t}\n\t\ttags.index[ct] = i\n\t}\n\treturn tags\n}\n\ntype InheritanceMatcher struct {\n\tindex map[language.Tag]int\n}\n\nfunc (m InheritanceMatcher) Match(want ...language.Tag) (language.Tag, int, language.Confidence) {\n\tfor _, t := range want {\n\t\tct, err := language.All.Canonicalize(t)\n\t\tif err != nil {\n\t\t\tct = t\n\t\t}\n\t\tconf := language.Exact\n\t\tfor {\n\t\t\tif index, ok := m.index[ct]; ok {\n\t\t\t\treturn ct, index, conf\n\t\t\t}\n\t\t\tif ct == language.Und {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tct = ct.Parent()\n\t\t\tconf = language.High\n\t\t}\n\t}\n\treturn language.Und, 0, language.No\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/common.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage number\n\nimport (\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/internal/language/compact\"\n)\n\n// A system identifies a CLDR numbering system.\ntype system byte\n\ntype systemData struct {\n\tid        system\n\tdigitSize byte              // number of UTF-8 bytes per digit\n\tzero      [utf8.UTFMax]byte // UTF-8 sequence of zero digit.\n}\n\n// A SymbolType identifies a symbol of a specific kind.\ntype SymbolType int\n\nconst (\n\tSymDecimal SymbolType = iota\n\tSymGroup\n\tSymList\n\tSymPercentSign\n\tSymPlusSign\n\tSymMinusSign\n\tSymExponential\n\tSymSuperscriptingExponent\n\tSymPerMille\n\tSymInfinity\n\tSymNan\n\tSymTimeSeparator\n\n\tNumSymbolTypes\n)\n\nconst hasNonLatnMask = 0x8000\n\n// symOffset is an offset into altSymData if the bit indicated by hasNonLatnMask\n// is not 0 (with this bit masked out), and an offset into symIndex otherwise.\n//\n// TODO: this type can be a byte again if we use an indirection into altsymData\n// and introduce an alt -> offset slice (the length of this will be number of\n// alternatives plus 1). This also allows getting rid of the compactTag field\n// in altSymData. In total this will save about 1K.\ntype symOffset uint16\n\ntype altSymData struct {\n\tcompactTag compact.ID\n\tsymIndex   symOffset\n\tsystem     system\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/decimal.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate stringer -type RoundingMode\n\npackage number\n\nimport (\n\t\"math\"\n\t\"strconv\"\n)\n\n// RoundingMode determines how a number is rounded to the desired precision.\ntype RoundingMode byte\n\nconst (\n\tToNearestEven RoundingMode = iota // towards the nearest integer, or towards an even number if equidistant.\n\tToNearestZero                     // towards the nearest integer, or towards zero if equidistant.\n\tToNearestAway                     // towards the nearest integer, or away from zero if equidistant.\n\tToPositiveInf                     // towards infinity\n\tToNegativeInf                     // towards negative infinity\n\tToZero                            // towards zero\n\tAwayFromZero                      // away from zero\n\tnumModes\n)\n\nconst maxIntDigits = 20\n\n// A Decimal represents a floating point number in decimal format.\n// Digits represents a number [0, 1.0), and the absolute value represented by\n// Decimal is Digits * 10^Exp. Leading and trailing zeros may be omitted and Exp\n// may point outside a valid position in Digits.\n//\n// Examples:\n//\n//\tNumber     Decimal\n//\t12345      Digits: [1, 2, 3, 4, 5], Exp: 5\n//\t12.345     Digits: [1, 2, 3, 4, 5], Exp: 2\n//\t12000      Digits: [1, 2],          Exp: 5\n//\t12000.00   Digits: [1, 2],          Exp: 5\n//\t0.00123    Digits: [1, 2, 3],       Exp: -2\n//\t0          Digits: [],              Exp: 0\ntype Decimal struct {\n\tdigits\n\n\tbuf [maxIntDigits]byte\n}\n\ntype digits struct {\n\tDigits []byte // mantissa digits, big-endian\n\tExp    int32  // exponent\n\tNeg    bool\n\tInf    bool // Takes precedence over Digits and Exp.\n\tNaN    bool // Takes precedence over Inf.\n}\n\n// Digits represents a floating point number represented in digits of the\n// base in which a number is to be displayed. It is similar to Decimal, but\n// keeps track of trailing fraction zeros and the comma placement for\n// engineering notation. Digits must have at least one digit.\n//\n// Examples:\n//\n//\t  Number     Decimal\n//\tdecimal\n//\t  12345      Digits: [1, 2, 3, 4, 5], Exp: 5  End: 5\n//\t  12.345     Digits: [1, 2, 3, 4, 5], Exp: 2  End: 5\n//\t  12000      Digits: [1, 2],          Exp: 5  End: 5\n//\t  12000.00   Digits: [1, 2],          Exp: 5  End: 7\n//\t  0.00123    Digits: [1, 2, 3],       Exp: -2 End: 3\n//\t  0          Digits: [],              Exp: 0  End: 1\n//\tscientific (actual exp is Exp - Comma)\n//\t  0e0        Digits: [0],             Exp: 1, End: 1, Comma: 1\n//\t  .0e0       Digits: [0],             Exp: 0, End: 1, Comma: 0\n//\t  0.0e0      Digits: [0],             Exp: 1, End: 2, Comma: 1\n//\t  1.23e4     Digits: [1, 2, 3],       Exp: 5, End: 3, Comma: 1\n//\t  .123e5     Digits: [1, 2, 3],       Exp: 5, End: 3, Comma: 0\n//\tengineering\n//\t  12.3e3     Digits: [1, 2, 3],       Exp: 5, End: 3, Comma: 2\ntype Digits struct {\n\tdigits\n\t// End indicates the end position of the number.\n\tEnd int32 // For decimals Exp <= End. For scientific len(Digits) <= End.\n\t// Comma is used for the comma position for scientific (always 0 or 1) and\n\t// engineering notation (always 0, 1, 2, or 3).\n\tComma uint8\n\t// IsScientific indicates whether this number is to be rendered as a\n\t// scientific number.\n\tIsScientific bool\n}\n\nfunc (d *Digits) NumFracDigits() int {\n\tif d.Exp >= d.End {\n\t\treturn 0\n\t}\n\treturn int(d.End - d.Exp)\n}\n\n// normalize returns a new Decimal with leading and trailing zeros removed.\nfunc (d *Decimal) normalize() (n Decimal) {\n\tn = *d\n\tb := n.Digits\n\t// Strip leading zeros. Resulting number of digits is significant digits.\n\tfor len(b) > 0 && b[0] == 0 {\n\t\tb = b[1:]\n\t\tn.Exp--\n\t}\n\t// Strip trailing zeros\n\tfor len(b) > 0 && b[len(b)-1] == 0 {\n\t\tb = b[:len(b)-1]\n\t}\n\tif len(b) == 0 {\n\t\tn.Exp = 0\n\t}\n\tn.Digits = b\n\treturn n\n}\n\nfunc (d *Decimal) clear() {\n\tb := d.Digits\n\tif b == nil {\n\t\tb = d.buf[:0]\n\t}\n\t*d = Decimal{}\n\td.Digits = b[:0]\n}\n\nfunc (x *Decimal) String() string {\n\tif x.NaN {\n\t\treturn \"NaN\"\n\t}\n\tvar buf []byte\n\tif x.Neg {\n\t\tbuf = append(buf, '-')\n\t}\n\tif x.Inf {\n\t\tbuf = append(buf, \"Inf\"...)\n\t\treturn string(buf)\n\t}\n\tswitch {\n\tcase len(x.Digits) == 0:\n\t\tbuf = append(buf, '0')\n\tcase x.Exp <= 0:\n\t\t// 0.00ddd\n\t\tbuf = append(buf, \"0.\"...)\n\t\tbuf = appendZeros(buf, -int(x.Exp))\n\t\tbuf = appendDigits(buf, x.Digits)\n\n\tcase /* 0 < */ int(x.Exp) < len(x.Digits):\n\t\t// dd.ddd\n\t\tbuf = appendDigits(buf, x.Digits[:x.Exp])\n\t\tbuf = append(buf, '.')\n\t\tbuf = appendDigits(buf, x.Digits[x.Exp:])\n\n\tdefault: // len(x.Digits) <= x.Exp\n\t\t// ddd00\n\t\tbuf = appendDigits(buf, x.Digits)\n\t\tbuf = appendZeros(buf, int(x.Exp)-len(x.Digits))\n\t}\n\treturn string(buf)\n}\n\nfunc appendDigits(buf []byte, digits []byte) []byte {\n\tfor _, c := range digits {\n\t\tbuf = append(buf, c+'0')\n\t}\n\treturn buf\n}\n\n// appendZeros appends n 0 digits to buf and returns buf.\nfunc appendZeros(buf []byte, n int) []byte {\n\tfor ; n > 0; n-- {\n\t\tbuf = append(buf, '0')\n\t}\n\treturn buf\n}\n\nfunc (d *digits) round(mode RoundingMode, n int) {\n\tif n >= len(d.Digits) {\n\t\treturn\n\t}\n\t// Make rounding decision: The result mantissa is truncated (\"rounded down\")\n\t// by default. Decide if we need to increment, or \"round up\", the (unsigned)\n\t// mantissa.\n\tinc := false\n\tswitch mode {\n\tcase ToNegativeInf:\n\t\tinc = d.Neg\n\tcase ToPositiveInf:\n\t\tinc = !d.Neg\n\tcase ToZero:\n\t\t// nothing to do\n\tcase AwayFromZero:\n\t\tinc = true\n\tcase ToNearestEven:\n\t\tinc = d.Digits[n] > 5 || d.Digits[n] == 5 &&\n\t\t\t(len(d.Digits) > n+1 || n == 0 || d.Digits[n-1]&1 != 0)\n\tcase ToNearestAway:\n\t\tinc = d.Digits[n] >= 5\n\tcase ToNearestZero:\n\t\tinc = d.Digits[n] > 5 || d.Digits[n] == 5 && len(d.Digits) > n+1\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n\tif inc {\n\t\td.roundUp(n)\n\t} else {\n\t\td.roundDown(n)\n\t}\n}\n\n// roundFloat rounds a floating point number.\nfunc (r RoundingMode) roundFloat(x float64) float64 {\n\t// Make rounding decision: The result mantissa is truncated (\"rounded down\")\n\t// by default. Decide if we need to increment, or \"round up\", the (unsigned)\n\t// mantissa.\n\tabs := x\n\tif x < 0 {\n\t\tabs = -x\n\t}\n\ti, f := math.Modf(abs)\n\tif f == 0.0 {\n\t\treturn x\n\t}\n\tinc := false\n\tswitch r {\n\tcase ToNegativeInf:\n\t\tinc = x < 0\n\tcase ToPositiveInf:\n\t\tinc = x >= 0\n\tcase ToZero:\n\t\t// nothing to do\n\tcase AwayFromZero:\n\t\tinc = true\n\tcase ToNearestEven:\n\t\t// TODO: check overflow\n\t\tinc = f > 0.5 || f == 0.5 && int64(i)&1 != 0\n\tcase ToNearestAway:\n\t\tinc = f >= 0.5\n\tcase ToNearestZero:\n\t\tinc = f > 0.5\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n\tif inc {\n\t\ti += 1\n\t}\n\tif abs != x {\n\t\ti = -i\n\t}\n\treturn i\n}\n\nfunc (x *digits) roundUp(n int) {\n\tif n < 0 || n >= len(x.Digits) {\n\t\treturn // nothing to do\n\t}\n\t// find first digit < 9\n\tfor n > 0 && x.Digits[n-1] >= 9 {\n\t\tn--\n\t}\n\n\tif n == 0 {\n\t\t// all digits are 9s => round up to 1 and update exponent\n\t\tx.Digits[0] = 1 // ok since len(x.Digits) > n\n\t\tx.Digits = x.Digits[:1]\n\t\tx.Exp++\n\t\treturn\n\t}\n\tx.Digits[n-1]++\n\tx.Digits = x.Digits[:n]\n\t// x already trimmed\n}\n\nfunc (x *digits) roundDown(n int) {\n\tif n < 0 || n >= len(x.Digits) {\n\t\treturn // nothing to do\n\t}\n\tx.Digits = x.Digits[:n]\n\ttrim(x)\n}\n\n// trim cuts off any trailing zeros from x's mantissa;\n// they are meaningless for the value of x.\nfunc trim(x *digits) {\n\ti := len(x.Digits)\n\tfor i > 0 && x.Digits[i-1] == 0 {\n\t\ti--\n\t}\n\tx.Digits = x.Digits[:i]\n\tif i == 0 {\n\t\tx.Exp = 0\n\t}\n}\n\n// A Converter converts a number into decimals according to the given rounding\n// criteria.\ntype Converter interface {\n\tConvert(d *Decimal, r RoundingContext)\n}\n\nconst (\n\tsigned   = true\n\tunsigned = false\n)\n\n// Convert converts the given number to the decimal representation using the\n// supplied RoundingContext.\nfunc (d *Decimal) Convert(r RoundingContext, number interface{}) {\n\tswitch f := number.(type) {\n\tcase Converter:\n\t\td.clear()\n\t\tf.Convert(d, r)\n\tcase float32:\n\t\td.ConvertFloat(r, float64(f), 32)\n\tcase float64:\n\t\td.ConvertFloat(r, f, 64)\n\tcase int:\n\t\td.ConvertInt(r, signed, uint64(f))\n\tcase int8:\n\t\td.ConvertInt(r, signed, uint64(f))\n\tcase int16:\n\t\td.ConvertInt(r, signed, uint64(f))\n\tcase int32:\n\t\td.ConvertInt(r, signed, uint64(f))\n\tcase int64:\n\t\td.ConvertInt(r, signed, uint64(f))\n\tcase uint:\n\t\td.ConvertInt(r, unsigned, uint64(f))\n\tcase uint8:\n\t\td.ConvertInt(r, unsigned, uint64(f))\n\tcase uint16:\n\t\td.ConvertInt(r, unsigned, uint64(f))\n\tcase uint32:\n\t\td.ConvertInt(r, unsigned, uint64(f))\n\tcase uint64:\n\t\td.ConvertInt(r, unsigned, f)\n\n\tdefault:\n\t\td.NaN = true\n\t\t// TODO:\n\t\t// case string: if produced by strconv, allows for easy arbitrary pos.\n\t\t// case reflect.Value:\n\t\t// case big.Float\n\t\t// case big.Int\n\t\t// case big.Rat?\n\t\t// catch underlyings using reflect or will this already be done by the\n\t\t//    message package?\n\t}\n}\n\n// ConvertInt converts an integer to decimals.\nfunc (d *Decimal) ConvertInt(r RoundingContext, signed bool, x uint64) {\n\tif r.Increment > 0 {\n\t\t// TODO: if uint64 is too large, fall back to float64\n\t\tif signed {\n\t\t\td.ConvertFloat(r, float64(int64(x)), 64)\n\t\t} else {\n\t\t\td.ConvertFloat(r, float64(x), 64)\n\t\t}\n\t\treturn\n\t}\n\td.clear()\n\tif signed && int64(x) < 0 {\n\t\tx = uint64(-int64(x))\n\t\td.Neg = true\n\t}\n\td.fillIntDigits(x)\n\td.Exp = int32(len(d.Digits))\n}\n\n// ConvertFloat converts a floating point number to decimals.\nfunc (d *Decimal) ConvertFloat(r RoundingContext, x float64, size int) {\n\td.clear()\n\tif math.IsNaN(x) {\n\t\td.NaN = true\n\t\treturn\n\t}\n\t// Simple case: decimal notation\n\tif r.Increment > 0 {\n\t\tscale := int(r.IncrementScale)\n\t\tmult := 1.0\n\t\tif scale >= len(scales) {\n\t\t\tmult = math.Pow(10, float64(scale))\n\t\t} else {\n\t\t\tmult = scales[scale]\n\t\t}\n\t\t// We multiply x instead of dividing inc as it gives less rounding\n\t\t// issues.\n\t\tx *= mult\n\t\tx /= float64(r.Increment)\n\t\tx = r.Mode.roundFloat(x)\n\t\tx *= float64(r.Increment)\n\t\tx /= mult\n\t}\n\n\tabs := x\n\tif x < 0 {\n\t\td.Neg = true\n\t\tabs = -x\n\t}\n\tif math.IsInf(abs, 1) {\n\t\td.Inf = true\n\t\treturn\n\t}\n\n\t// By default we get the exact decimal representation.\n\tverb := byte('g')\n\tprec := -1\n\t// As the strconv API does not return the rounding accuracy, we can only\n\t// round using ToNearestEven.\n\tif r.Mode == ToNearestEven {\n\t\tif n := r.RoundSignificantDigits(); n >= 0 {\n\t\t\tprec = n\n\t\t} else if n = r.RoundFractionDigits(); n >= 0 {\n\t\t\tprec = n\n\t\t\tverb = 'f'\n\t\t}\n\t} else {\n\t\t// TODO: At this point strconv's rounding is imprecise to the point that\n\t\t// it is not usable for this purpose.\n\t\t// See https://github.com/golang/go/issues/21714\n\t\t// If rounding is requested, we ask for a large number of digits and\n\t\t// round from there to simulate rounding only once.\n\t\t// Ideally we would have strconv export an AppendDigits that would take\n\t\t// a rounding mode and/or return an accuracy. Something like this would\n\t\t// work:\n\t\t// AppendDigits(dst []byte, x float64, base, size, prec int) (digits []byte, exp, accuracy int)\n\t\thasPrec := r.RoundSignificantDigits() >= 0\n\t\thasScale := r.RoundFractionDigits() >= 0\n\t\tif hasPrec || hasScale {\n\t\t\t// prec is the number of mantissa bits plus some extra for safety.\n\t\t\t// We need at least the number of mantissa bits as decimals to\n\t\t\t// accurately represent the floating point without rounding, as each\n\t\t\t// bit requires one more decimal to represent: 0.5, 0.25, 0.125, ...\n\t\t\tprec = 60\n\t\t}\n\t}\n\n\tb := strconv.AppendFloat(d.Digits[:0], abs, verb, prec, size)\n\ti := 0\n\tk := 0\n\tbeforeDot := 1\n\tfor i < len(b) {\n\t\tif c := b[i]; '0' <= c && c <= '9' {\n\t\t\tb[k] = c - '0'\n\t\t\tk++\n\t\t\td.Exp += int32(beforeDot)\n\t\t} else if c == '.' {\n\t\t\tbeforeDot = 0\n\t\t\td.Exp = int32(k)\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t\ti++\n\t}\n\td.Digits = b[:k]\n\tif i != len(b) {\n\t\ti += len(\"e\")\n\t\tpSign := i\n\t\texp := 0\n\t\tfor i++; i < len(b); i++ {\n\t\t\texp *= 10\n\t\t\texp += int(b[i] - '0')\n\t\t}\n\t\tif b[pSign] == '-' {\n\t\t\texp = -exp\n\t\t}\n\t\td.Exp = int32(exp) + 1\n\t}\n}\n\nfunc (d *Decimal) fillIntDigits(x uint64) {\n\tif cap(d.Digits) < maxIntDigits {\n\t\td.Digits = d.buf[:]\n\t} else {\n\t\td.Digits = d.buf[:maxIntDigits]\n\t}\n\ti := 0\n\tfor ; x > 0; x /= 10 {\n\t\td.Digits[i] = byte(x % 10)\n\t\ti++\n\t}\n\td.Digits = d.Digits[:i]\n\tfor p := 0; p < i; p++ {\n\t\ti--\n\t\td.Digits[p], d.Digits[i] = d.Digits[i], d.Digits[p]\n\t}\n}\n\nvar scales [70]float64\n\nfunc init() {\n\tx := 1.0\n\tfor i := range scales {\n\t\tscales[i] = x\n\t\tx *= 10\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/format.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage number\n\nimport (\n\t\"strconv\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/language\"\n)\n\n// TODO:\n// - grouping of fractions\n// - allow user-defined superscript notation (such as <sup>4</sup>)\n// - same for non-breaking spaces, like &nbsp;\n\n// A VisibleDigits computes digits, comma placement and trailing zeros as they\n// will be shown to the user.\ntype VisibleDigits interface {\n\tDigits(buf []byte, t language.Tag, scale int) Digits\n\t// TODO: Do we also need to add the verb or pass a format.State?\n}\n\n// Formatting proceeds along the following lines:\n// 0) Compose rounding information from format and context.\n// 1) Convert a number into a Decimal.\n// 2) Sanitize Decimal by adding trailing zeros, removing leading digits, and\n//    (non-increment) rounding. The Decimal that results from this is suitable\n//    for determining the plural form.\n// 3) Render the Decimal in the localized form.\n\n// Formatter contains all the information needed to render a number.\ntype Formatter struct {\n\tPattern\n\tInfo\n}\n\nfunc (f *Formatter) init(t language.Tag, index []uint8) {\n\tf.Info = InfoFromTag(t)\n\tf.Pattern = formats[index[tagToID(t)]]\n}\n\n// InitPattern initializes a Formatter for the given Pattern.\nfunc (f *Formatter) InitPattern(t language.Tag, pat *Pattern) {\n\tf.Info = InfoFromTag(t)\n\tf.Pattern = *pat\n}\n\n// InitDecimal initializes a Formatter using the default Pattern for the given\n// language.\nfunc (f *Formatter) InitDecimal(t language.Tag) {\n\tf.init(t, tagToDecimal)\n}\n\n// InitScientific initializes a Formatter using the default Pattern for the\n// given language.\nfunc (f *Formatter) InitScientific(t language.Tag) {\n\tf.init(t, tagToScientific)\n\tf.Pattern.MinFractionDigits = 0\n\tf.Pattern.MaxFractionDigits = -1\n}\n\n// InitEngineering initializes a Formatter using the default Pattern for the\n// given language.\nfunc (f *Formatter) InitEngineering(t language.Tag) {\n\tf.init(t, tagToScientific)\n\tf.Pattern.MinFractionDigits = 0\n\tf.Pattern.MaxFractionDigits = -1\n\tf.Pattern.MaxIntegerDigits = 3\n\tf.Pattern.MinIntegerDigits = 1\n}\n\n// InitPercent initializes a Formatter using the default Pattern for the given\n// language.\nfunc (f *Formatter) InitPercent(t language.Tag) {\n\tf.init(t, tagToPercent)\n}\n\n// InitPerMille initializes a Formatter using the default Pattern for the given\n// language.\nfunc (f *Formatter) InitPerMille(t language.Tag) {\n\tf.init(t, tagToPercent)\n\tf.Pattern.DigitShift = 3\n}\n\nfunc (f *Formatter) Append(dst []byte, x interface{}) []byte {\n\tvar d Decimal\n\tr := f.RoundingContext\n\td.Convert(r, x)\n\treturn f.Render(dst, FormatDigits(&d, r))\n}\n\nfunc FormatDigits(d *Decimal, r RoundingContext) Digits {\n\tif r.isScientific() {\n\t\treturn scientificVisibleDigits(r, d)\n\t}\n\treturn decimalVisibleDigits(r, d)\n}\n\nfunc (f *Formatter) Format(dst []byte, d *Decimal) []byte {\n\treturn f.Render(dst, FormatDigits(d, f.RoundingContext))\n}\n\nfunc (f *Formatter) Render(dst []byte, d Digits) []byte {\n\tvar result []byte\n\tvar postPrefix, preSuffix int\n\tif d.IsScientific {\n\t\tresult, postPrefix, preSuffix = appendScientific(dst, f, &d)\n\t} else {\n\t\tresult, postPrefix, preSuffix = appendDecimal(dst, f, &d)\n\t}\n\tif f.PadRune == 0 {\n\t\treturn result\n\t}\n\twidth := int(f.FormatWidth)\n\tif count := utf8.RuneCount(result); count < width {\n\t\tinsertPos := 0\n\t\tswitch f.Flags & PadMask {\n\t\tcase PadAfterPrefix:\n\t\t\tinsertPos = postPrefix\n\t\tcase PadBeforeSuffix:\n\t\t\tinsertPos = preSuffix\n\t\tcase PadAfterSuffix:\n\t\t\tinsertPos = len(result)\n\t\t}\n\t\tnum := width - count\n\t\tpad := [utf8.UTFMax]byte{' '}\n\t\tsz := 1\n\t\tif r := f.PadRune; r != 0 {\n\t\t\tsz = utf8.EncodeRune(pad[:], r)\n\t\t}\n\t\textra := sz * num\n\t\tif n := len(result) + extra; n < cap(result) {\n\t\t\tresult = result[:n]\n\t\t\tcopy(result[insertPos+extra:], result[insertPos:])\n\t\t} else {\n\t\t\tbuf := make([]byte, n)\n\t\t\tcopy(buf, result[:insertPos])\n\t\t\tcopy(buf[insertPos+extra:], result[insertPos:])\n\t\t\tresult = buf\n\t\t}\n\t\tfor ; num > 0; num-- {\n\t\t\tinsertPos += copy(result[insertPos:], pad[:sz])\n\t\t}\n\t}\n\treturn result\n}\n\n// decimalVisibleDigits converts d according to the RoundingContext. Note that\n// the exponent may change as a result of this operation.\nfunc decimalVisibleDigits(r RoundingContext, d *Decimal) Digits {\n\tif d.NaN || d.Inf {\n\t\treturn Digits{digits: digits{Neg: d.Neg, NaN: d.NaN, Inf: d.Inf}}\n\t}\n\tn := Digits{digits: d.normalize().digits}\n\n\texp := n.Exp\n\texp += int32(r.DigitShift)\n\n\t// Cap integer digits. Remove *most-significant* digits.\n\tif r.MaxIntegerDigits > 0 {\n\t\tif p := int(exp) - int(r.MaxIntegerDigits); p > 0 {\n\t\t\tif p > len(n.Digits) {\n\t\t\t\tp = len(n.Digits)\n\t\t\t}\n\t\t\tif n.Digits = n.Digits[p:]; len(n.Digits) == 0 {\n\t\t\t\texp = 0\n\t\t\t} else {\n\t\t\t\texp -= int32(p)\n\t\t\t}\n\t\t\t// Strip leading zeros.\n\t\t\tfor len(n.Digits) > 0 && n.Digits[0] == 0 {\n\t\t\t\tn.Digits = n.Digits[1:]\n\t\t\t\texp--\n\t\t\t}\n\t\t}\n\t}\n\n\t// Rounding if not already done by Convert.\n\tp := len(n.Digits)\n\tif maxSig := int(r.MaxSignificantDigits); maxSig > 0 {\n\t\tp = maxSig\n\t}\n\tif maxFrac := int(r.MaxFractionDigits); maxFrac >= 0 {\n\t\tif cap := int(exp) + maxFrac; cap < p {\n\t\t\tp = int(exp) + maxFrac\n\t\t}\n\t\tif p < 0 {\n\t\t\tp = 0\n\t\t}\n\t}\n\tn.round(r.Mode, p)\n\n\t// set End (trailing zeros)\n\tn.End = int32(len(n.Digits))\n\tif n.End == 0 {\n\t\texp = 0\n\t\tif r.MinFractionDigits > 0 {\n\t\t\tn.End = int32(r.MinFractionDigits)\n\t\t}\n\t\tif p := int32(r.MinSignificantDigits) - 1; p > n.End {\n\t\t\tn.End = p\n\t\t}\n\t} else {\n\t\tif end := exp + int32(r.MinFractionDigits); end > n.End {\n\t\t\tn.End = end\n\t\t}\n\t\tif n.End < int32(r.MinSignificantDigits) {\n\t\t\tn.End = int32(r.MinSignificantDigits)\n\t\t}\n\t}\n\tn.Exp = exp\n\treturn n\n}\n\n// appendDecimal appends a formatted number to dst. It returns two possible\n// insertion points for padding.\nfunc appendDecimal(dst []byte, f *Formatter, n *Digits) (b []byte, postPre, preSuf int) {\n\tif dst, ok := f.renderSpecial(dst, n); ok {\n\t\treturn dst, 0, len(dst)\n\t}\n\tdigits := n.Digits\n\texp := n.Exp\n\n\t// Split in integer and fraction part.\n\tvar intDigits, fracDigits []byte\n\tnumInt := 0\n\tnumFrac := int(n.End - n.Exp)\n\tif exp > 0 {\n\t\tnumInt = int(exp)\n\t\tif int(exp) >= len(digits) { // ddddd | ddddd00\n\t\t\tintDigits = digits\n\t\t} else { // ddd.dd\n\t\t\tintDigits = digits[:exp]\n\t\t\tfracDigits = digits[exp:]\n\t\t}\n\t} else {\n\t\tfracDigits = digits\n\t}\n\n\tneg := n.Neg\n\taffix, suffix := f.getAffixes(neg)\n\tdst = appendAffix(dst, f, affix, neg)\n\tsavedLen := len(dst)\n\n\tminInt := int(f.MinIntegerDigits)\n\tif minInt == 0 && f.MinSignificantDigits > 0 {\n\t\tminInt = 1\n\t}\n\t// add leading zeros\n\tfor i := minInt; i > numInt; i-- {\n\t\tdst = f.AppendDigit(dst, 0)\n\t\tif f.needsSep(i) {\n\t\t\tdst = append(dst, f.Symbol(SymGroup)...)\n\t\t}\n\t}\n\ti := 0\n\tfor ; i < len(intDigits); i++ {\n\t\tdst = f.AppendDigit(dst, intDigits[i])\n\t\tif f.needsSep(numInt - i) {\n\t\t\tdst = append(dst, f.Symbol(SymGroup)...)\n\t\t}\n\t}\n\tfor ; i < numInt; i++ {\n\t\tdst = f.AppendDigit(dst, 0)\n\t\tif f.needsSep(numInt - i) {\n\t\t\tdst = append(dst, f.Symbol(SymGroup)...)\n\t\t}\n\t}\n\n\tif numFrac > 0 || f.Flags&AlwaysDecimalSeparator != 0 {\n\t\tdst = append(dst, f.Symbol(SymDecimal)...)\n\t}\n\t// Add trailing zeros\n\ti = 0\n\tfor n := -int(n.Exp); i < n; i++ {\n\t\tdst = f.AppendDigit(dst, 0)\n\t}\n\tfor _, d := range fracDigits {\n\t\ti++\n\t\tdst = f.AppendDigit(dst, d)\n\t}\n\tfor ; i < numFrac; i++ {\n\t\tdst = f.AppendDigit(dst, 0)\n\t}\n\treturn appendAffix(dst, f, suffix, neg), savedLen, len(dst)\n}\n\nfunc scientificVisibleDigits(r RoundingContext, d *Decimal) Digits {\n\tif d.NaN || d.Inf {\n\t\treturn Digits{digits: digits{Neg: d.Neg, NaN: d.NaN, Inf: d.Inf}}\n\t}\n\tn := Digits{digits: d.normalize().digits, IsScientific: true}\n\n\t// Normalize to have at least one digit. This simplifies engineering\n\t// notation.\n\tif len(n.Digits) == 0 {\n\t\tn.Digits = append(n.Digits, 0)\n\t\tn.Exp = 1\n\t}\n\n\t// Significant digits are transformed by the parser for scientific notation\n\t// and do not need to be handled here.\n\tmaxInt, numInt := int(r.MaxIntegerDigits), int(r.MinIntegerDigits)\n\tif numInt == 0 {\n\t\tnumInt = 1\n\t}\n\n\t// If a maximum number of integers is specified, the minimum must be 1\n\t// and the exponent is grouped by this number (e.g. for engineering)\n\tif maxInt > numInt {\n\t\t// Correct the exponent to reflect a single integer digit.\n\t\tnumInt = 1\n\t\t// engineering\n\t\t// 0.01234 ([12345]e-1) -> 1.2345e-2  12.345e-3\n\t\t// 12345   ([12345]e+5) -> 1.2345e4  12.345e3\n\t\td := int(n.Exp-1) % maxInt\n\t\tif d < 0 {\n\t\t\td += maxInt\n\t\t}\n\t\tnumInt += d\n\t}\n\n\tp := len(n.Digits)\n\tif maxSig := int(r.MaxSignificantDigits); maxSig > 0 {\n\t\tp = maxSig\n\t}\n\tif maxFrac := int(r.MaxFractionDigits); maxFrac >= 0 && numInt+maxFrac < p {\n\t\tp = numInt + maxFrac\n\t}\n\tn.round(r.Mode, p)\n\n\tn.Comma = uint8(numInt)\n\tn.End = int32(len(n.Digits))\n\tif minSig := int32(r.MinFractionDigits) + int32(numInt); n.End < minSig {\n\t\tn.End = minSig\n\t}\n\treturn n\n}\n\n// appendScientific appends a formatted number to dst. It returns two possible\n// insertion points for padding.\nfunc appendScientific(dst []byte, f *Formatter, n *Digits) (b []byte, postPre, preSuf int) {\n\tif dst, ok := f.renderSpecial(dst, n); ok {\n\t\treturn dst, 0, 0\n\t}\n\tdigits := n.Digits\n\tnumInt := int(n.Comma)\n\tnumFrac := int(n.End) - int(n.Comma)\n\n\tvar intDigits, fracDigits []byte\n\tif numInt <= len(digits) {\n\t\tintDigits = digits[:numInt]\n\t\tfracDigits = digits[numInt:]\n\t} else {\n\t\tintDigits = digits\n\t}\n\tneg := n.Neg\n\taffix, suffix := f.getAffixes(neg)\n\tdst = appendAffix(dst, f, affix, neg)\n\tsavedLen := len(dst)\n\n\ti := 0\n\tfor ; i < len(intDigits); i++ {\n\t\tdst = f.AppendDigit(dst, intDigits[i])\n\t\tif f.needsSep(numInt - i) {\n\t\t\tdst = append(dst, f.Symbol(SymGroup)...)\n\t\t}\n\t}\n\tfor ; i < numInt; i++ {\n\t\tdst = f.AppendDigit(dst, 0)\n\t\tif f.needsSep(numInt - i) {\n\t\t\tdst = append(dst, f.Symbol(SymGroup)...)\n\t\t}\n\t}\n\n\tif numFrac > 0 || f.Flags&AlwaysDecimalSeparator != 0 {\n\t\tdst = append(dst, f.Symbol(SymDecimal)...)\n\t}\n\ti = 0\n\tfor ; i < len(fracDigits); i++ {\n\t\tdst = f.AppendDigit(dst, fracDigits[i])\n\t}\n\tfor ; i < numFrac; i++ {\n\t\tdst = f.AppendDigit(dst, 0)\n\t}\n\n\t// exp\n\tbuf := [12]byte{}\n\t// TODO: use exponential if superscripting is not available (no Latin\n\t// numbers or no tags) and use exponential in all other cases.\n\texp := n.Exp - int32(n.Comma)\n\texponential := f.Symbol(SymExponential)\n\tif exponential == \"E\" {\n\t\tdst = append(dst, f.Symbol(SymSuperscriptingExponent)...)\n\t\tdst = f.AppendDigit(dst, 1)\n\t\tdst = f.AppendDigit(dst, 0)\n\t\tswitch {\n\t\tcase exp < 0:\n\t\t\tdst = append(dst, superMinus...)\n\t\t\texp = -exp\n\t\tcase f.Flags&AlwaysExpSign != 0:\n\t\t\tdst = append(dst, superPlus...)\n\t\t}\n\t\tb = strconv.AppendUint(buf[:0], uint64(exp), 10)\n\t\tfor i := len(b); i < int(f.MinExponentDigits); i++ {\n\t\t\tdst = append(dst, superDigits[0]...)\n\t\t}\n\t\tfor _, c := range b {\n\t\t\tdst = append(dst, superDigits[c-'0']...)\n\t\t}\n\t} else {\n\t\tdst = append(dst, exponential...)\n\t\tswitch {\n\t\tcase exp < 0:\n\t\t\tdst = append(dst, f.Symbol(SymMinusSign)...)\n\t\t\texp = -exp\n\t\tcase f.Flags&AlwaysExpSign != 0:\n\t\t\tdst = append(dst, f.Symbol(SymPlusSign)...)\n\t\t}\n\t\tb = strconv.AppendUint(buf[:0], uint64(exp), 10)\n\t\tfor i := len(b); i < int(f.MinExponentDigits); i++ {\n\t\t\tdst = f.AppendDigit(dst, 0)\n\t\t}\n\t\tfor _, c := range b {\n\t\t\tdst = f.AppendDigit(dst, c-'0')\n\t\t}\n\t}\n\treturn appendAffix(dst, f, suffix, neg), savedLen, len(dst)\n}\n\nconst (\n\tsuperMinus = \"\\u207B\" // SUPERSCRIPT HYPHEN-MINUS\n\tsuperPlus  = \"\\u207A\" // SUPERSCRIPT PLUS SIGN\n)\n\nvar (\n\t// Note: the digits are not sequential!!!\n\tsuperDigits = []string{\n\t\t\"\\u2070\", // SUPERSCRIPT DIGIT ZERO\n\t\t\"\\u00B9\", // SUPERSCRIPT DIGIT ONE\n\t\t\"\\u00B2\", // SUPERSCRIPT DIGIT TWO\n\t\t\"\\u00B3\", // SUPERSCRIPT DIGIT THREE\n\t\t\"\\u2074\", // SUPERSCRIPT DIGIT FOUR\n\t\t\"\\u2075\", // SUPERSCRIPT DIGIT FIVE\n\t\t\"\\u2076\", // SUPERSCRIPT DIGIT SIX\n\t\t\"\\u2077\", // SUPERSCRIPT DIGIT SEVEN\n\t\t\"\\u2078\", // SUPERSCRIPT DIGIT EIGHT\n\t\t\"\\u2079\", // SUPERSCRIPT DIGIT NINE\n\t}\n)\n\nfunc (f *Formatter) getAffixes(neg bool) (affix, suffix string) {\n\tstr := f.Affix\n\tif str != \"\" {\n\t\tif f.NegOffset > 0 {\n\t\t\tif neg {\n\t\t\t\tstr = str[f.NegOffset:]\n\t\t\t} else {\n\t\t\t\tstr = str[:f.NegOffset]\n\t\t\t}\n\t\t}\n\t\tsufStart := 1 + str[0]\n\t\taffix = str[1:sufStart]\n\t\tsuffix = str[sufStart+1:]\n\t}\n\t// TODO: introduce a NeedNeg sign to indicate if the left pattern already\n\t// has a sign marked?\n\tif f.NegOffset == 0 && (neg || f.Flags&AlwaysSign != 0) {\n\t\taffix = \"-\" + affix\n\t}\n\treturn affix, suffix\n}\n\nfunc (f *Formatter) renderSpecial(dst []byte, d *Digits) (b []byte, ok bool) {\n\tif d.NaN {\n\t\treturn fmtNaN(dst, f), true\n\t}\n\tif d.Inf {\n\t\treturn fmtInfinite(dst, f, d), true\n\t}\n\treturn dst, false\n}\n\nfunc fmtNaN(dst []byte, f *Formatter) []byte {\n\treturn append(dst, f.Symbol(SymNan)...)\n}\n\nfunc fmtInfinite(dst []byte, f *Formatter, d *Digits) []byte {\n\taffix, suffix := f.getAffixes(d.Neg)\n\tdst = appendAffix(dst, f, affix, d.Neg)\n\tdst = append(dst, f.Symbol(SymInfinity)...)\n\tdst = appendAffix(dst, f, suffix, d.Neg)\n\treturn dst\n}\n\nfunc appendAffix(dst []byte, f *Formatter, affix string, neg bool) []byte {\n\tquoting := false\n\tescaping := false\n\tfor _, r := range affix {\n\t\tswitch {\n\t\tcase escaping:\n\t\t\t// escaping occurs both inside and outside of quotes\n\t\t\tdst = append(dst, string(r)...)\n\t\t\tescaping = false\n\t\tcase r == '\\\\':\n\t\t\tescaping = true\n\t\tcase r == '\\'':\n\t\t\tquoting = !quoting\n\t\tcase quoting:\n\t\t\tdst = append(dst, string(r)...)\n\t\tcase r == '%':\n\t\t\tif f.DigitShift == 3 {\n\t\t\t\tdst = append(dst, f.Symbol(SymPerMille)...)\n\t\t\t} else {\n\t\t\t\tdst = append(dst, f.Symbol(SymPercentSign)...)\n\t\t\t}\n\t\tcase r == '-' || r == '+':\n\t\t\tif neg {\n\t\t\t\tdst = append(dst, f.Symbol(SymMinusSign)...)\n\t\t\t} else if f.Flags&ElideSign == 0 {\n\t\t\t\tdst = append(dst, f.Symbol(SymPlusSign)...)\n\t\t\t} else {\n\t\t\t\tdst = append(dst, ' ')\n\t\t\t}\n\t\tdefault:\n\t\t\tdst = append(dst, string(r)...)\n\t\t}\n\t}\n\treturn dst\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/number.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go gen_common.go\n\n// Package number contains tools and data for formatting numbers.\npackage number\n\nimport (\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/internal/language/compact\"\n\t\"golang.org/x/text/language\"\n)\n\n// Info holds number formatting configuration data.\ntype Info struct {\n\tsystem   systemData // numbering system information\n\tsymIndex symOffset  // index to symbols\n}\n\n// InfoFromLangID returns a Info for the given compact language identifier and\n// numbering system identifier. If system is the empty string, the default\n// numbering system will be taken for that language.\nfunc InfoFromLangID(compactIndex compact.ID, numberSystem string) Info {\n\tp := langToDefaults[compactIndex]\n\t// Lookup the entry for the language.\n\tpSymIndex := symOffset(0) // Default: Latin, default symbols\n\tsystem, ok := systemMap[numberSystem]\n\tif !ok {\n\t\t// Take the value for the default numbering system. This is by far the\n\t\t// most common case as an alternative numbering system is hardly used.\n\t\tif p&hasNonLatnMask == 0 { // Latn digits.\n\t\t\tpSymIndex = p\n\t\t} else { // Non-Latn or multiple numbering systems.\n\t\t\t// Take the first entry from the alternatives list.\n\t\t\tdata := langToAlt[p&^hasNonLatnMask]\n\t\t\tpSymIndex = data.symIndex\n\t\t\tsystem = data.system\n\t\t}\n\t} else {\n\t\tlangIndex := compactIndex\n\t\tns := system\n\touterLoop:\n\t\tfor ; ; p = langToDefaults[langIndex] {\n\t\t\tif p&hasNonLatnMask == 0 {\n\t\t\t\tif ns == 0 {\n\t\t\t\t\t// The index directly points to the symbol data.\n\t\t\t\t\tpSymIndex = p\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// Move to the parent and retry.\n\t\t\t\tlangIndex = langIndex.Parent()\n\t\t\t} else {\n\t\t\t\t// The index points to a list of symbol data indexes.\n\t\t\t\tfor _, e := range langToAlt[p&^hasNonLatnMask:] {\n\t\t\t\t\tif e.compactTag != langIndex {\n\t\t\t\t\t\tif langIndex == 0 {\n\t\t\t\t\t\t\t// The CLDR root defines full symbol information for\n\t\t\t\t\t\t\t// all numbering systems (even though mostly by\n\t\t\t\t\t\t\t// means of aliases). Fall back to the default entry\n\t\t\t\t\t\t\t// for Latn if there is no data for the numbering\n\t\t\t\t\t\t\t// system of this language.\n\t\t\t\t\t\t\tif ns == 0 {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Fall back to Latin and start from the original\n\t\t\t\t\t\t\t// language. See\n\t\t\t\t\t\t\t// https://unicode.org/reports/tr35/#Locale_Inheritance.\n\t\t\t\t\t\t\tns = numLatn\n\t\t\t\t\t\t\tlangIndex = compactIndex\n\t\t\t\t\t\t\tcontinue outerLoop\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Fall back to parent.\n\t\t\t\t\t\tlangIndex = langIndex.Parent()\n\t\t\t\t\t} else if e.system == ns {\n\t\t\t\t\t\tpSymIndex = e.symIndex\n\t\t\t\t\t\tbreak outerLoop\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif int(system) >= len(numSysData) { // algorithmic\n\t\t// Will generate ASCII digits in case the user inadvertently calls\n\t\t// WriteDigit or Digit on it.\n\t\td := numSysData[0]\n\t\td.id = system\n\t\treturn Info{\n\t\t\tsystem:   d,\n\t\t\tsymIndex: pSymIndex,\n\t\t}\n\t}\n\treturn Info{\n\t\tsystem:   numSysData[system],\n\t\tsymIndex: pSymIndex,\n\t}\n}\n\n// InfoFromTag returns a Info for the given language tag.\nfunc InfoFromTag(t language.Tag) Info {\n\treturn InfoFromLangID(tagToID(t), t.TypeForKey(\"nu\"))\n}\n\n// IsDecimal reports if the numbering system can convert decimal to native\n// symbols one-to-one.\nfunc (n Info) IsDecimal() bool {\n\treturn int(n.system.id) < len(numSysData)\n}\n\n// WriteDigit writes the UTF-8 sequence for n corresponding to the given ASCII\n// digit to dst and reports the number of bytes written. dst must be large\n// enough to hold the rune (can be up to utf8.UTFMax bytes).\nfunc (n Info) WriteDigit(dst []byte, asciiDigit rune) int {\n\tcopy(dst, n.system.zero[:n.system.digitSize])\n\tdst[n.system.digitSize-1] += byte(asciiDigit - '0')\n\treturn int(n.system.digitSize)\n}\n\n// AppendDigit appends the UTF-8 sequence for n corresponding to the given digit\n// to dst and reports the number of bytes written. dst must be large enough to\n// hold the rune (can be up to utf8.UTFMax bytes).\nfunc (n Info) AppendDigit(dst []byte, digit byte) []byte {\n\tdst = append(dst, n.system.zero[:n.system.digitSize]...)\n\tdst[len(dst)-1] += digit\n\treturn dst\n}\n\n// Digit returns the digit for the numbering system for the corresponding ASCII\n// value. For example, ni.Digit('3') could return '三'. Note that the argument\n// is the rune constant '3', which equals 51, not the integer constant 3.\nfunc (n Info) Digit(asciiDigit rune) rune {\n\tvar x [utf8.UTFMax]byte\n\tn.WriteDigit(x[:], asciiDigit)\n\tr, _ := utf8.DecodeRune(x[:])\n\treturn r\n}\n\n// Symbol returns the string for the given symbol type.\nfunc (n Info) Symbol(t SymbolType) string {\n\treturn symData.Elem(int(symIndex[n.symIndex][t]))\n}\n\nfunc formatForLang(t language.Tag, index []byte) *Pattern {\n\treturn &formats[index[tagToID(t)]]\n}\n\nfunc tagToID(t language.Tag) compact.ID {\n\tid, _ := compact.RegionalID(compact.Tag(t))\n\treturn id\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/pattern.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage number\n\nimport (\n\t\"errors\"\n\t\"unicode/utf8\"\n)\n\n// This file contains a parser for the CLDR number patterns as described in\n// https://unicode.org/reports/tr35/tr35-numbers.html#Number_Format_Patterns.\n//\n// The following BNF is derived from this standard.\n//\n// pattern    := subpattern (';' subpattern)?\n// subpattern := affix? number exponent? affix?\n// number     := decimal | sigDigits\n// decimal    := '#'* '0'* ('.' fraction)? | '#' | '0'\n// fraction   := '0'* '#'*\n// sigDigits  := '#'* '@' '@'* '#'*\n// exponent   := 'E' '+'? '0'* '0'\n// padSpec    := '*' \\L\n//\n// Notes:\n// - An affix pattern may contain any runes, but runes with special meaning\n//   should be escaped.\n// - Sequences of digits, '#', and '@' in decimal and sigDigits may have\n//   interstitial commas.\n\n// TODO: replace special characters in affixes (-, +, ¤) with control codes.\n\n// Pattern holds information for formatting numbers. It is designed to hold\n// information from CLDR number patterns.\n//\n// This pattern is precompiled  for all patterns for all languages. Even though\n// the number of patterns is not very large, we want to keep this small.\n//\n// This type is only intended for internal use.\ntype Pattern struct {\n\tRoundingContext\n\n\tAffix       string // includes prefix and suffix. First byte is prefix length.\n\tOffset      uint16 // Offset into Affix for prefix and suffix\n\tNegOffset   uint16 // Offset into Affix for negative prefix and suffix or 0.\n\tPadRune     rune\n\tFormatWidth uint16\n\n\tGroupingSize [2]uint8\n\tFlags        PatternFlag\n}\n\n// A RoundingContext indicates how a number should be converted to digits.\n// It contains all information needed to determine the \"visible digits\" as\n// required by the pluralization rules.\ntype RoundingContext struct {\n\t// TODO: unify these two fields so that there is a more unambiguous meaning\n\t// of how precision is handled.\n\tMaxSignificantDigits int16 // -1 is unlimited\n\tMaxFractionDigits    int16 // -1 is unlimited\n\n\tIncrement      uint32\n\tIncrementScale uint8 // May differ from printed scale.\n\n\tMode RoundingMode\n\n\tDigitShift uint8 // Number of decimals to shift. Used for % and ‰.\n\n\t// Number of digits.\n\tMinIntegerDigits uint8\n\n\tMaxIntegerDigits     uint8\n\tMinFractionDigits    uint8\n\tMinSignificantDigits uint8\n\n\tMinExponentDigits uint8\n}\n\n// RoundSignificantDigits returns the number of significant digits an\n// implementation of Convert may round to or n < 0 if there is no maximum or\n// a maximum is not recommended.\nfunc (r *RoundingContext) RoundSignificantDigits() (n int) {\n\tif r.MaxFractionDigits == 0 && r.MaxSignificantDigits > 0 {\n\t\treturn int(r.MaxSignificantDigits)\n\t} else if r.isScientific() && r.MaxIntegerDigits == 1 {\n\t\tif r.MaxSignificantDigits == 0 ||\n\t\t\tint(r.MaxFractionDigits+1) == int(r.MaxSignificantDigits) {\n\t\t\t// Note: don't add DigitShift: it is only used for decimals.\n\t\t\treturn int(r.MaxFractionDigits) + 1\n\t\t}\n\t}\n\treturn -1\n}\n\n// RoundFractionDigits returns the number of fraction digits an implementation\n// of Convert may round to or n < 0 if there is no maximum or a maximum is not\n// recommended.\nfunc (r *RoundingContext) RoundFractionDigits() (n int) {\n\tif r.MinExponentDigits == 0 &&\n\t\tr.MaxSignificantDigits == 0 &&\n\t\tr.MaxFractionDigits >= 0 {\n\t\treturn int(r.MaxFractionDigits) + int(r.DigitShift)\n\t}\n\treturn -1\n}\n\n// SetScale fixes the RoundingContext to a fixed number of fraction digits.\nfunc (r *RoundingContext) SetScale(scale int) {\n\tr.MinFractionDigits = uint8(scale)\n\tr.MaxFractionDigits = int16(scale)\n}\n\nfunc (r *RoundingContext) SetPrecision(prec int) {\n\tr.MaxSignificantDigits = int16(prec)\n}\n\nfunc (r *RoundingContext) isScientific() bool {\n\treturn r.MinExponentDigits > 0\n}\n\nfunc (f *Pattern) needsSep(pos int) bool {\n\tp := pos - 1\n\tsize := int(f.GroupingSize[0])\n\tif size == 0 || p == 0 {\n\t\treturn false\n\t}\n\tif p == size {\n\t\treturn true\n\t}\n\tif p -= size; p < 0 {\n\t\treturn false\n\t}\n\t// TODO: make second groupingsize the same as first if 0 so that we can\n\t// avoid this check.\n\tif x := int(f.GroupingSize[1]); x != 0 {\n\t\tsize = x\n\t}\n\treturn p%size == 0\n}\n\n// A PatternFlag is a bit mask for the flag field of a Pattern.\ntype PatternFlag uint8\n\nconst (\n\tAlwaysSign PatternFlag = 1 << iota\n\tElideSign              // Use space instead of plus sign. AlwaysSign must be true.\n\tAlwaysExpSign\n\tAlwaysDecimalSeparator\n\tParenthesisForNegative // Common pattern. Saves space.\n\n\tPadAfterNumber\n\tPadAfterAffix\n\n\tPadBeforePrefix = 0 // Default\n\tPadAfterPrefix  = PadAfterAffix\n\tPadBeforeSuffix = PadAfterNumber\n\tPadAfterSuffix  = PadAfterNumber | PadAfterAffix\n\tPadMask         = PadAfterNumber | PadAfterAffix\n)\n\ntype parser struct {\n\t*Pattern\n\n\tleadingSharps int\n\n\tpos            int\n\terr            error\n\tdoNotTerminate bool\n\tgroupingCount  uint\n\thasGroup       bool\n\tbuf            []byte\n}\n\nfunc (p *parser) setError(err error) {\n\tif p.err == nil {\n\t\tp.err = err\n\t}\n}\n\nfunc (p *parser) updateGrouping() {\n\tif p.hasGroup &&\n\t\t0 < p.groupingCount && p.groupingCount < 255 {\n\t\tp.GroupingSize[1] = p.GroupingSize[0]\n\t\tp.GroupingSize[0] = uint8(p.groupingCount)\n\t}\n\tp.groupingCount = 0\n\tp.hasGroup = true\n}\n\nvar (\n\t// TODO: more sensible and localizeable error messages.\n\terrMultiplePadSpecifiers = errors.New(\"format: pattern has multiple pad specifiers\")\n\terrInvalidPadSpecifier   = errors.New(\"format: invalid pad specifier\")\n\terrInvalidQuote          = errors.New(\"format: invalid quote\")\n\terrAffixTooLarge         = errors.New(\"format: prefix or suffix exceeds maximum UTF-8 length of 256 bytes\")\n\terrDuplicatePercentSign  = errors.New(\"format: duplicate percent sign\")\n\terrDuplicatePermilleSign = errors.New(\"format: duplicate permille sign\")\n\terrUnexpectedEnd         = errors.New(\"format: unexpected end of pattern\")\n)\n\n// ParsePattern extracts formatting information from a CLDR number pattern.\n//\n// See https://unicode.org/reports/tr35/tr35-numbers.html#Number_Format_Patterns.\nfunc ParsePattern(s string) (f *Pattern, err error) {\n\tp := parser{Pattern: &Pattern{}}\n\n\ts = p.parseSubPattern(s)\n\n\tif s != \"\" {\n\t\t// Parse negative sub pattern.\n\t\tif s[0] != ';' {\n\t\t\tp.setError(errors.New(\"format: error parsing first sub pattern\"))\n\t\t\treturn nil, p.err\n\t\t}\n\t\tneg := parser{Pattern: &Pattern{}} // just for extracting the affixes.\n\t\ts = neg.parseSubPattern(s[len(\";\"):])\n\t\tp.NegOffset = uint16(len(p.buf))\n\t\tp.buf = append(p.buf, neg.buf...)\n\t}\n\tif s != \"\" {\n\t\tp.setError(errors.New(\"format: spurious characters at end of pattern\"))\n\t}\n\tif p.err != nil {\n\t\treturn nil, p.err\n\t}\n\tif affix := string(p.buf); affix == \"\\x00\\x00\" || affix == \"\\x00\\x00\\x00\\x00\" {\n\t\t// No prefix or suffixes.\n\t\tp.NegOffset = 0\n\t} else {\n\t\tp.Affix = affix\n\t}\n\tif p.Increment == 0 {\n\t\tp.IncrementScale = 0\n\t}\n\treturn p.Pattern, nil\n}\n\nfunc (p *parser) parseSubPattern(s string) string {\n\ts = p.parsePad(s, PadBeforePrefix)\n\ts = p.parseAffix(s)\n\ts = p.parsePad(s, PadAfterPrefix)\n\n\ts = p.parse(p.number, s)\n\tp.updateGrouping()\n\n\ts = p.parsePad(s, PadBeforeSuffix)\n\ts = p.parseAffix(s)\n\ts = p.parsePad(s, PadAfterSuffix)\n\treturn s\n}\n\nfunc (p *parser) parsePad(s string, f PatternFlag) (tail string) {\n\tif len(s) >= 2 && s[0] == '*' {\n\t\tr, sz := utf8.DecodeRuneInString(s[1:])\n\t\tif p.PadRune != 0 {\n\t\t\tp.err = errMultiplePadSpecifiers\n\t\t} else {\n\t\t\tp.Flags |= f\n\t\t\tp.PadRune = r\n\t\t}\n\t\treturn s[1+sz:]\n\t}\n\treturn s\n}\n\nfunc (p *parser) parseAffix(s string) string {\n\tx := len(p.buf)\n\tp.buf = append(p.buf, 0) // placeholder for affix length\n\n\ts = p.parse(p.affix, s)\n\n\tn := len(p.buf) - x - 1\n\tif n > 0xFF {\n\t\tp.setError(errAffixTooLarge)\n\t}\n\tp.buf[x] = uint8(n)\n\treturn s\n}\n\n// state implements a state transition. It returns the new state. A state\n// function may set an error on the parser or may simply return on an incorrect\n// token and let the next phase fail.\ntype state func(r rune) state\n\n// parse repeatedly applies a state function on the given string until a\n// termination condition is reached.\nfunc (p *parser) parse(fn state, s string) (tail string) {\n\tfor i, r := range s {\n\t\tp.doNotTerminate = false\n\t\tif fn = fn(r); fn == nil || p.err != nil {\n\t\t\treturn s[i:]\n\t\t}\n\t\tp.FormatWidth++\n\t}\n\tif p.doNotTerminate {\n\t\tp.setError(errUnexpectedEnd)\n\t}\n\treturn \"\"\n}\n\nfunc (p *parser) affix(r rune) state {\n\tswitch r {\n\tcase '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t\t'#', '@', '.', '*', ',', ';':\n\t\treturn nil\n\tcase '\\'':\n\t\tp.FormatWidth--\n\t\treturn p.escapeFirst\n\tcase '%':\n\t\tif p.DigitShift != 0 {\n\t\t\tp.setError(errDuplicatePercentSign)\n\t\t}\n\t\tp.DigitShift = 2\n\tcase '\\u2030': // ‰ Per mille\n\t\tif p.DigitShift != 0 {\n\t\t\tp.setError(errDuplicatePermilleSign)\n\t\t}\n\t\tp.DigitShift = 3\n\t\t// TODO: handle currency somehow: ¤, ¤¤, ¤¤¤, ¤¤¤¤\n\t}\n\tp.buf = append(p.buf, string(r)...)\n\treturn p.affix\n}\n\nfunc (p *parser) escapeFirst(r rune) state {\n\tswitch r {\n\tcase '\\'':\n\t\tp.buf = append(p.buf, \"\\\\'\"...)\n\t\treturn p.affix\n\tdefault:\n\t\tp.buf = append(p.buf, '\\'')\n\t\tp.buf = append(p.buf, string(r)...)\n\t}\n\treturn p.escape\n}\n\nfunc (p *parser) escape(r rune) state {\n\tswitch r {\n\tcase '\\'':\n\t\tp.FormatWidth--\n\t\tp.buf = append(p.buf, '\\'')\n\t\treturn p.affix\n\tdefault:\n\t\tp.buf = append(p.buf, string(r)...)\n\t}\n\treturn p.escape\n}\n\n// number parses a number. The BNF says the integer part should always have\n// a '0', but that does not appear to be the case according to the rest of the\n// documentation. We will allow having only '#' numbers.\nfunc (p *parser) number(r rune) state {\n\tswitch r {\n\tcase '#':\n\t\tp.groupingCount++\n\t\tp.leadingSharps++\n\tcase '@':\n\t\tp.groupingCount++\n\t\tp.leadingSharps = 0\n\t\tp.MaxFractionDigits = -1\n\t\treturn p.sigDigits(r)\n\tcase ',':\n\t\tif p.leadingSharps == 0 { // no leading commas\n\t\t\treturn nil\n\t\t}\n\t\tp.updateGrouping()\n\tcase 'E':\n\t\tp.MaxIntegerDigits = uint8(p.leadingSharps)\n\t\treturn p.exponent\n\tcase '.': // allow \".##\" etc.\n\t\tp.updateGrouping()\n\t\treturn p.fraction\n\tcase '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':\n\t\treturn p.integer(r)\n\tdefault:\n\t\treturn nil\n\t}\n\treturn p.number\n}\n\nfunc (p *parser) integer(r rune) state {\n\tif !('0' <= r && r <= '9') {\n\t\tvar next state\n\t\tswitch r {\n\t\tcase 'E':\n\t\t\tif p.leadingSharps > 0 {\n\t\t\t\tp.MaxIntegerDigits = uint8(p.leadingSharps) + p.MinIntegerDigits\n\t\t\t}\n\t\t\tnext = p.exponent\n\t\tcase '.':\n\t\t\tnext = p.fraction\n\t\tcase ',':\n\t\t\tnext = p.integer\n\t\t}\n\t\tp.updateGrouping()\n\t\treturn next\n\t}\n\tp.Increment = p.Increment*10 + uint32(r-'0')\n\tp.groupingCount++\n\tp.MinIntegerDigits++\n\treturn p.integer\n}\n\nfunc (p *parser) sigDigits(r rune) state {\n\tswitch r {\n\tcase '@':\n\t\tp.groupingCount++\n\t\tp.MaxSignificantDigits++\n\t\tp.MinSignificantDigits++\n\tcase '#':\n\t\treturn p.sigDigitsFinal(r)\n\tcase 'E':\n\t\tp.updateGrouping()\n\t\treturn p.normalizeSigDigitsWithExponent()\n\tdefault:\n\t\tp.updateGrouping()\n\t\treturn nil\n\t}\n\treturn p.sigDigits\n}\n\nfunc (p *parser) sigDigitsFinal(r rune) state {\n\tswitch r {\n\tcase '#':\n\t\tp.groupingCount++\n\t\tp.MaxSignificantDigits++\n\tcase 'E':\n\t\tp.updateGrouping()\n\t\treturn p.normalizeSigDigitsWithExponent()\n\tdefault:\n\t\tp.updateGrouping()\n\t\treturn nil\n\t}\n\treturn p.sigDigitsFinal\n}\n\nfunc (p *parser) normalizeSigDigitsWithExponent() state {\n\tp.MinIntegerDigits, p.MaxIntegerDigits = 1, 1\n\tp.MinFractionDigits = p.MinSignificantDigits - 1\n\tp.MaxFractionDigits = p.MaxSignificantDigits - 1\n\tp.MinSignificantDigits, p.MaxSignificantDigits = 0, 0\n\treturn p.exponent\n}\n\nfunc (p *parser) fraction(r rune) state {\n\tswitch r {\n\tcase '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':\n\t\tp.Increment = p.Increment*10 + uint32(r-'0')\n\t\tp.IncrementScale++\n\t\tp.MinFractionDigits++\n\t\tp.MaxFractionDigits++\n\tcase '#':\n\t\tp.MaxFractionDigits++\n\tcase 'E':\n\t\tif p.leadingSharps > 0 {\n\t\t\tp.MaxIntegerDigits = uint8(p.leadingSharps) + p.MinIntegerDigits\n\t\t}\n\t\treturn p.exponent\n\tdefault:\n\t\treturn nil\n\t}\n\treturn p.fraction\n}\n\nfunc (p *parser) exponent(r rune) state {\n\tswitch r {\n\tcase '+':\n\t\t// Set mode and check it wasn't already set.\n\t\tif p.Flags&AlwaysExpSign != 0 || p.MinExponentDigits > 0 {\n\t\t\tbreak\n\t\t}\n\t\tp.Flags |= AlwaysExpSign\n\t\tp.doNotTerminate = true\n\t\treturn p.exponent\n\tcase '0':\n\t\tp.MinExponentDigits++\n\t\treturn p.exponent\n\t}\n\t// termination condition\n\tif p.MinExponentDigits == 0 {\n\t\tp.setError(errors.New(\"format: need at least one digit\"))\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/roundingmode_string.go",
    "content": "// Code generated by \"stringer -type RoundingMode\"; DO NOT EDIT.\n\npackage number\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n\t// Re-run the stringer command to generate them again.\n\tvar x [1]struct{}\n\t_ = x[ToNearestEven-0]\n\t_ = x[ToNearestZero-1]\n\t_ = x[ToNearestAway-2]\n\t_ = x[ToPositiveInf-3]\n\t_ = x[ToNegativeInf-4]\n\t_ = x[ToZero-5]\n\t_ = x[AwayFromZero-6]\n\t_ = x[numModes-7]\n}\n\nconst _RoundingMode_name = \"ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes\"\n\nvar _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91}\n\nfunc (i RoundingMode) String() string {\n\tif i >= RoundingMode(len(_RoundingMode_index)-1) {\n\t\treturn \"RoundingMode(\" + strconv.FormatInt(int64(i), 10) + \")\"\n\t}\n\treturn _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/number/tables.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage number\n\nimport \"golang.org/x/text/internal/stringset\"\n\n// CLDRVersion is the CLDR version from which the tables in this package are derived.\nconst CLDRVersion = \"32\"\n\nvar numSysData = []systemData{ // 59 elements\n\t0:  {id: 0x0, digitSize: 0x1, zero: [4]uint8{0x30, 0x0, 0x0, 0x0}},\n\t1:  {id: 0x1, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9e, 0xa5, 0x90}},\n\t2:  {id: 0x2, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x9c, 0xb0}},\n\t3:  {id: 0x3, digitSize: 0x2, zero: [4]uint8{0xd9, 0xa0, 0x0, 0x0}},\n\t4:  {id: 0x4, digitSize: 0x2, zero: [4]uint8{0xdb, 0xb0, 0x0, 0x0}},\n\t5:  {id: 0x5, digitSize: 0x3, zero: [4]uint8{0xe1, 0xad, 0x90, 0x0}},\n\t6:  {id: 0x6, digitSize: 0x3, zero: [4]uint8{0xe0, 0xa7, 0xa6, 0x0}},\n\t7:  {id: 0x7, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0xb1, 0x90}},\n\t8:  {id: 0x8, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x81, 0xa6}},\n\t9:  {id: 0x9, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x84, 0xb6}},\n\t10: {id: 0xa, digitSize: 0x3, zero: [4]uint8{0xea, 0xa9, 0x90, 0x0}},\n\t11: {id: 0xb, digitSize: 0x3, zero: [4]uint8{0xe0, 0xa5, 0xa6, 0x0}},\n\t12: {id: 0xc, digitSize: 0x3, zero: [4]uint8{0xef, 0xbc, 0x90, 0x0}},\n\t13: {id: 0xd, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0xb5, 0x90}},\n\t14: {id: 0xe, digitSize: 0x3, zero: [4]uint8{0xe0, 0xab, 0xa6, 0x0}},\n\t15: {id: 0xf, digitSize: 0x3, zero: [4]uint8{0xe0, 0xa9, 0xa6, 0x0}},\n\t16: {id: 0x10, digitSize: 0x4, zero: [4]uint8{0xf0, 0x96, 0xad, 0x90}},\n\t17: {id: 0x11, digitSize: 0x3, zero: [4]uint8{0xea, 0xa7, 0x90, 0x0}},\n\t18: {id: 0x12, digitSize: 0x3, zero: [4]uint8{0xea, 0xa4, 0x80, 0x0}},\n\t19: {id: 0x13, digitSize: 0x3, zero: [4]uint8{0xe1, 0x9f, 0xa0, 0x0}},\n\t20: {id: 0x14, digitSize: 0x3, zero: [4]uint8{0xe0, 0xb3, 0xa6, 0x0}},\n\t21: {id: 0x15, digitSize: 0x3, zero: [4]uint8{0xe1, 0xaa, 0x80, 0x0}},\n\t22: {id: 0x16, digitSize: 0x3, zero: [4]uint8{0xe1, 0xaa, 0x90, 0x0}},\n\t23: {id: 0x17, digitSize: 0x3, zero: [4]uint8{0xe0, 0xbb, 0x90, 0x0}},\n\t24: {id: 0x18, digitSize: 0x3, zero: [4]uint8{0xe1, 0xb1, 0x80, 0x0}},\n\t25: {id: 0x19, digitSize: 0x3, zero: [4]uint8{0xe1, 0xa5, 0x86, 0x0}},\n\t26: {id: 0x1a, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9d, 0x9f, 0x8e}},\n\t27: {id: 0x1b, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9d, 0x9f, 0x98}},\n\t28: {id: 0x1c, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9d, 0x9f, 0xb6}},\n\t29: {id: 0x1d, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9d, 0x9f, 0xac}},\n\t30: {id: 0x1e, digitSize: 0x4, zero: [4]uint8{0xf0, 0x9d, 0x9f, 0xa2}},\n\t31: {id: 0x1f, digitSize: 0x3, zero: [4]uint8{0xe0, 0xb5, 0xa6, 0x0}},\n\t32: {id: 0x20, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x99, 0x90}},\n\t33: {id: 0x21, digitSize: 0x3, zero: [4]uint8{0xe1, 0xa0, 0x90, 0x0}},\n\t34: {id: 0x22, digitSize: 0x4, zero: [4]uint8{0xf0, 0x96, 0xa9, 0xa0}},\n\t35: {id: 0x23, digitSize: 0x3, zero: [4]uint8{0xea, 0xaf, 0xb0, 0x0}},\n\t36: {id: 0x24, digitSize: 0x3, zero: [4]uint8{0xe1, 0x81, 0x80, 0x0}},\n\t37: {id: 0x25, digitSize: 0x3, zero: [4]uint8{0xe1, 0x82, 0x90, 0x0}},\n\t38: {id: 0x26, digitSize: 0x3, zero: [4]uint8{0xea, 0xa7, 0xb0, 0x0}},\n\t39: {id: 0x27, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x91, 0x90}},\n\t40: {id: 0x28, digitSize: 0x2, zero: [4]uint8{0xdf, 0x80, 0x0, 0x0}},\n\t41: {id: 0x29, digitSize: 0x3, zero: [4]uint8{0xe1, 0xb1, 0x90, 0x0}},\n\t42: {id: 0x2a, digitSize: 0x3, zero: [4]uint8{0xe0, 0xad, 0xa6, 0x0}},\n\t43: {id: 0x2b, digitSize: 0x4, zero: [4]uint8{0xf0, 0x90, 0x92, 0xa0}},\n\t44: {id: 0x2c, digitSize: 0x3, zero: [4]uint8{0xea, 0xa3, 0x90, 0x0}},\n\t45: {id: 0x2d, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x87, 0x90}},\n\t46: {id: 0x2e, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x8b, 0xb0}},\n\t47: {id: 0x2f, digitSize: 0x3, zero: [4]uint8{0xe0, 0xb7, 0xa6, 0x0}},\n\t48: {id: 0x30, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x83, 0xb0}},\n\t49: {id: 0x31, digitSize: 0x3, zero: [4]uint8{0xe1, 0xae, 0xb0, 0x0}},\n\t50: {id: 0x32, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x9b, 0x80}},\n\t51: {id: 0x33, digitSize: 0x3, zero: [4]uint8{0xe1, 0xa7, 0x90, 0x0}},\n\t52: {id: 0x34, digitSize: 0x3, zero: [4]uint8{0xe0, 0xaf, 0xa6, 0x0}},\n\t53: {id: 0x35, digitSize: 0x3, zero: [4]uint8{0xe0, 0xb1, 0xa6, 0x0}},\n\t54: {id: 0x36, digitSize: 0x3, zero: [4]uint8{0xe0, 0xb9, 0x90, 0x0}},\n\t55: {id: 0x37, digitSize: 0x3, zero: [4]uint8{0xe0, 0xbc, 0xa0, 0x0}},\n\t56: {id: 0x38, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0x93, 0x90}},\n\t57: {id: 0x39, digitSize: 0x3, zero: [4]uint8{0xea, 0x98, 0xa0, 0x0}},\n\t58: {id: 0x3a, digitSize: 0x4, zero: [4]uint8{0xf0, 0x91, 0xa3, 0xa0}},\n} // Size: 378 bytes\n\nconst (\n\tnumAdlm     = 0x1\n\tnumAhom     = 0x2\n\tnumArab     = 0x3\n\tnumArabext  = 0x4\n\tnumArmn     = 0x3b\n\tnumArmnlow  = 0x3c\n\tnumBali     = 0x5\n\tnumBeng     = 0x6\n\tnumBhks     = 0x7\n\tnumBrah     = 0x8\n\tnumCakm     = 0x9\n\tnumCham     = 0xa\n\tnumCyrl     = 0x3d\n\tnumDeva     = 0xb\n\tnumEthi     = 0x3e\n\tnumFullwide = 0xc\n\tnumGeor     = 0x3f\n\tnumGonm     = 0xd\n\tnumGrek     = 0x40\n\tnumGreklow  = 0x41\n\tnumGujr     = 0xe\n\tnumGuru     = 0xf\n\tnumHanidays = 0x42\n\tnumHanidec  = 0x43\n\tnumHans     = 0x44\n\tnumHansfin  = 0x45\n\tnumHant     = 0x46\n\tnumHantfin  = 0x47\n\tnumHebr     = 0x48\n\tnumHmng     = 0x10\n\tnumJava     = 0x11\n\tnumJpan     = 0x49\n\tnumJpanfin  = 0x4a\n\tnumKali     = 0x12\n\tnumKhmr     = 0x13\n\tnumKnda     = 0x14\n\tnumLana     = 0x15\n\tnumLanatham = 0x16\n\tnumLaoo     = 0x17\n\tnumLatn     = 0x0\n\tnumLepc     = 0x18\n\tnumLimb     = 0x19\n\tnumMathbold = 0x1a\n\tnumMathdbl  = 0x1b\n\tnumMathmono = 0x1c\n\tnumMathsanb = 0x1d\n\tnumMathsans = 0x1e\n\tnumMlym     = 0x1f\n\tnumModi     = 0x20\n\tnumMong     = 0x21\n\tnumMroo     = 0x22\n\tnumMtei     = 0x23\n\tnumMymr     = 0x24\n\tnumMymrshan = 0x25\n\tnumMymrtlng = 0x26\n\tnumNewa     = 0x27\n\tnumNkoo     = 0x28\n\tnumOlck     = 0x29\n\tnumOrya     = 0x2a\n\tnumOsma     = 0x2b\n\tnumRoman    = 0x4b\n\tnumRomanlow = 0x4c\n\tnumSaur     = 0x2c\n\tnumShrd     = 0x2d\n\tnumSind     = 0x2e\n\tnumSinh     = 0x2f\n\tnumSora     = 0x30\n\tnumSund     = 0x31\n\tnumTakr     = 0x32\n\tnumTalu     = 0x33\n\tnumTaml     = 0x4d\n\tnumTamldec  = 0x34\n\tnumTelu     = 0x35\n\tnumThai     = 0x36\n\tnumTibt     = 0x37\n\tnumTirh     = 0x38\n\tnumVaii     = 0x39\n\tnumWara     = 0x3a\n\tnumNumberSystems\n)\n\nvar systemMap = map[string]system{\n\t\"adlm\":     numAdlm,\n\t\"ahom\":     numAhom,\n\t\"arab\":     numArab,\n\t\"arabext\":  numArabext,\n\t\"armn\":     numArmn,\n\t\"armnlow\":  numArmnlow,\n\t\"bali\":     numBali,\n\t\"beng\":     numBeng,\n\t\"bhks\":     numBhks,\n\t\"brah\":     numBrah,\n\t\"cakm\":     numCakm,\n\t\"cham\":     numCham,\n\t\"cyrl\":     numCyrl,\n\t\"deva\":     numDeva,\n\t\"ethi\":     numEthi,\n\t\"fullwide\": numFullwide,\n\t\"geor\":     numGeor,\n\t\"gonm\":     numGonm,\n\t\"grek\":     numGrek,\n\t\"greklow\":  numGreklow,\n\t\"gujr\":     numGujr,\n\t\"guru\":     numGuru,\n\t\"hanidays\": numHanidays,\n\t\"hanidec\":  numHanidec,\n\t\"hans\":     numHans,\n\t\"hansfin\":  numHansfin,\n\t\"hant\":     numHant,\n\t\"hantfin\":  numHantfin,\n\t\"hebr\":     numHebr,\n\t\"hmng\":     numHmng,\n\t\"java\":     numJava,\n\t\"jpan\":     numJpan,\n\t\"jpanfin\":  numJpanfin,\n\t\"kali\":     numKali,\n\t\"khmr\":     numKhmr,\n\t\"knda\":     numKnda,\n\t\"lana\":     numLana,\n\t\"lanatham\": numLanatham,\n\t\"laoo\":     numLaoo,\n\t\"latn\":     numLatn,\n\t\"lepc\":     numLepc,\n\t\"limb\":     numLimb,\n\t\"mathbold\": numMathbold,\n\t\"mathdbl\":  numMathdbl,\n\t\"mathmono\": numMathmono,\n\t\"mathsanb\": numMathsanb,\n\t\"mathsans\": numMathsans,\n\t\"mlym\":     numMlym,\n\t\"modi\":     numModi,\n\t\"mong\":     numMong,\n\t\"mroo\":     numMroo,\n\t\"mtei\":     numMtei,\n\t\"mymr\":     numMymr,\n\t\"mymrshan\": numMymrshan,\n\t\"mymrtlng\": numMymrtlng,\n\t\"newa\":     numNewa,\n\t\"nkoo\":     numNkoo,\n\t\"olck\":     numOlck,\n\t\"orya\":     numOrya,\n\t\"osma\":     numOsma,\n\t\"roman\":    numRoman,\n\t\"romanlow\": numRomanlow,\n\t\"saur\":     numSaur,\n\t\"shrd\":     numShrd,\n\t\"sind\":     numSind,\n\t\"sinh\":     numSinh,\n\t\"sora\":     numSora,\n\t\"sund\":     numSund,\n\t\"takr\":     numTakr,\n\t\"talu\":     numTalu,\n\t\"taml\":     numTaml,\n\t\"tamldec\":  numTamldec,\n\t\"telu\":     numTelu,\n\t\"thai\":     numThai,\n\t\"tibt\":     numTibt,\n\t\"tirh\":     numTirh,\n\t\"vaii\":     numVaii,\n\t\"wara\":     numWara,\n}\n\nvar symIndex = [][12]uint8{ // 81 elements\n\t0:  [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t1:  [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t2:  [12]uint8{0x0, 0x1, 0x2, 0xd, 0xe, 0xf, 0x6, 0x7, 0x8, 0x9, 0x10, 0xb},\n\t3:  [12]uint8{0x1, 0x0, 0x2, 0xd, 0xe, 0xf, 0x6, 0x7, 0x8, 0x9, 0x10, 0xb},\n\t4:  [12]uint8{0x0, 0x1, 0x2, 0x11, 0xe, 0xf, 0x6, 0x7, 0x8, 0x9, 0x10, 0xb},\n\t5:  [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x12, 0xb},\n\t6:  [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t7:  [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x13, 0xb},\n\t8:  [12]uint8{0x0, 0x1, 0x2, 0x3, 0xe, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t9:  [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x0},\n\t10: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x6, 0x14, 0x8, 0x9, 0xa, 0xb},\n\t11: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x14, 0x8, 0x9, 0xa, 0xb},\n\t12: [12]uint8{0x0, 0x15, 0x2, 0x3, 0x4, 0x5, 0x6, 0x14, 0x8, 0x9, 0xa, 0xb},\n\t13: [12]uint8{0x0, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t14: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x16, 0xb},\n\t15: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x17, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t16: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x17, 0x7, 0x8, 0x9, 0xa, 0x0},\n\t17: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x17, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t18: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x0},\n\t19: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x18, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t20: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x19, 0x1a, 0xa, 0xb},\n\t21: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x1b, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t22: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x1b, 0x18, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t23: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x1b, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t24: [12]uint8{0x0, 0x1, 0x2, 0x3, 0xe, 0x1c, 0x6, 0x7, 0x8, 0x9, 0x1d, 0xb},\n\t25: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x1b, 0x6, 0x7, 0x8, 0x9, 0x1e, 0x0},\n\t26: [12]uint8{0x0, 0x15, 0x2, 0x3, 0x4, 0x1b, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t27: [12]uint8{0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t28: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x1f, 0xb},\n\t29: [12]uint8{0x0, 0x15, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t30: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x20, 0xb},\n\t31: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x21, 0x7, 0x8, 0x9, 0x22, 0xb},\n\t32: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x23, 0xb},\n\t33: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x1b, 0x18, 0x14, 0x8, 0x9, 0x24, 0xb},\n\t34: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x1b, 0x18, 0x7, 0x8, 0x9, 0x24, 0xb},\n\t35: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x25, 0xb},\n\t36: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x26, 0xb},\n\t37: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x27, 0xb},\n\t38: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x28, 0xb},\n\t39: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x29, 0xb},\n\t40: [12]uint8{0x1, 0x0, 0x2, 0x3, 0xe, 0x1c, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t41: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x2a, 0xb},\n\t42: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x2b, 0xb},\n\t43: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x1b, 0x2c, 0x14, 0x8, 0x9, 0x24, 0xb},\n\t44: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x0},\n\t45: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x17, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t46: [12]uint8{0x1, 0x0, 0x2, 0x3, 0x4, 0x1b, 0x17, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t47: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x2d, 0x0},\n\t48: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x2e, 0xb},\n\t49: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x2f, 0xb},\n\t50: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x30, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t51: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x31, 0xb},\n\t52: [12]uint8{0x1, 0xc, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x32, 0xb},\n\t53: [12]uint8{0x1, 0x15, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb},\n\t54: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x33, 0xb},\n\t55: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x34, 0xb},\n\t56: [12]uint8{0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t57: [12]uint8{0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x7, 0x3c, 0x9, 0x3d, 0xb},\n\t58: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x3e, 0x3f, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t59: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x39, 0x3a, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t60: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x39, 0x40, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t61: [12]uint8{0x35, 0x36, 0x37, 0x41, 0x3e, 0x3f, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t62: [12]uint8{0x35, 0x36, 0x37, 0x38, 0x3e, 0x3f, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0xb},\n\t63: [12]uint8{0x35, 0xc, 0x37, 0x38, 0x39, 0x42, 0x3b, 0x7, 0x3c, 0x9, 0xa, 0x0},\n\t64: [12]uint8{0x35, 0xc, 0x37, 0x38, 0x39, 0x42, 0x43, 0x7, 0x44, 0x9, 0x24, 0xb},\n\t65: [12]uint8{0x35, 0x36, 0x37, 0x38, 0x39, 0x5, 0x3b, 0x7, 0x3c, 0x9, 0x33, 0xb},\n\t66: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x45, 0x46, 0x43, 0x7, 0x3c, 0x9, 0xa, 0x35},\n\t67: [12]uint8{0x35, 0x36, 0x37, 0x11, 0xe, 0x1c, 0x43, 0x7, 0x3c, 0x9, 0x1d, 0xb},\n\t68: [12]uint8{0x35, 0x36, 0x37, 0x11, 0xe, 0x1c, 0x43, 0x7, 0x3c, 0x9, 0xa, 0x35},\n\t69: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x45, 0x5, 0x43, 0x7, 0x3c, 0x9, 0xa, 0x35},\n\t70: [12]uint8{0x1, 0xc, 0x37, 0x11, 0x45, 0x47, 0x43, 0x7, 0x3c, 0x9, 0xa, 0x0},\n\t71: [12]uint8{0x35, 0x1, 0x37, 0x11, 0x4, 0x5, 0x43, 0x7, 0x3c, 0x9, 0xa, 0x35},\n\t72: [12]uint8{0x1, 0xc, 0x37, 0x11, 0x45, 0x47, 0x43, 0x7, 0x3c, 0x9, 0x24, 0xb},\n\t73: [12]uint8{0x35, 0x36, 0x2, 0x3, 0x45, 0x46, 0x43, 0x7, 0x8, 0x9, 0xa, 0x35},\n\t74: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x4, 0x5, 0x43, 0x7, 0x3c, 0x9, 0x31, 0x35},\n\t75: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x4, 0x5, 0x43, 0x7, 0x3c, 0x9, 0x32, 0x35},\n\t76: [12]uint8{0x35, 0x36, 0x37, 0x11, 0x48, 0x46, 0x43, 0x7, 0x3c, 0x9, 0x33, 0x35},\n\t77: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0x49},\n\t78: [12]uint8{0x0, 0x1, 0x4a, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x28, 0xb},\n\t79: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0x4b, 0xb},\n\t80: [12]uint8{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x4c, 0x4d, 0xb},\n} // Size: 996 bytes\n\nvar symData = stringset.Set{\n\tData: \"\" + // Size: 599 bytes\n\t\t\".,;%+-E×‰∞NaN:\\u00a0\\u200e%\\u200e\\u200e+\\u200e-ليس\\u00a0رقمًا٪NDТерхьаш\" +\n\t\t\"\\u00a0дац·’mnne×10^0/00INF−\\u200e−ناعددepälukuՈչԹარ\\u00a0არის\\u00a0რიცხვ\" +\n\t\t\"იZMdMсан\\u00a0емес¤¤¤сан\\u00a0эмесບໍ່\\u200bແມ່ນ\\u200bໂຕ\\u200bເລກNSဂဏန်\" +\n\t\t\"းမဟုတ်သောННне\\u00a0числочыыһыла\\u00a0буотах·10^epilohosan\\u00a0dälTFЕs\" +\n\t\t\"on\\u00a0emasҳақиқий\\u00a0сон\\u00a0эмас非數值非数值٫٬؛٪\\u061c\\u061c+\\u061c-اس؉ل\" +\n\t\t\"يس\\u00a0رقم\\u200f+\\u200f-\\u200f−٪\\u200f\\u061c−×۱۰^؉\\u200f\\u200e+\\u200e\" +\n\t\t\"\\u200e-\\u200e\\u200e−\\u200e+\\u200e：၊ཨང་མེན་གྲངས་མེདཨང་མད\",\n\tIndex: []uint16{ // 79 elements\n\t\t// Entry 0 - 3F\n\t\t0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,\n\t\t0x0009, 0x000c, 0x000f, 0x0012, 0x0013, 0x0015, 0x001c, 0x0020,\n\t\t0x0024, 0x0036, 0x0038, 0x003a, 0x0050, 0x0052, 0x0055, 0x0058,\n\t\t0x0059, 0x005e, 0x0062, 0x0065, 0x0068, 0x006e, 0x0078, 0x0080,\n\t\t0x0086, 0x00ae, 0x00af, 0x00b2, 0x00c2, 0x00c8, 0x00d8, 0x0105,\n\t\t0x0107, 0x012e, 0x0132, 0x0142, 0x015e, 0x0163, 0x016a, 0x0173,\n\t\t0x0175, 0x0177, 0x0180, 0x01a0, 0x01a9, 0x01b2, 0x01b4, 0x01b6,\n\t\t0x01b8, 0x01bc, 0x01bf, 0x01c2, 0x01c6, 0x01c8, 0x01d6, 0x01da,\n\t\t// Entry 40 - 7F\n\t\t0x01de, 0x01e4, 0x01e9, 0x01ee, 0x01f5, 0x01fa, 0x0201, 0x0208,\n\t\t0x0211, 0x0215, 0x0218, 0x021b, 0x0230, 0x0248, 0x0257,\n\t},\n} // Size: 797 bytes\n\n// langToDefaults maps a compact language index to the default numbering system\n// and default symbol set\nvar langToDefaults = [775]symOffset{\n\t// Entry 0 - 3F\n\t0x8000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x8003, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003,\n\t0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,\n\t0x0003, 0x0003, 0x0003, 0x0003, 0x0002, 0x0002, 0x0002, 0x0004,\n\t0x0002, 0x0004, 0x0002, 0x0002, 0x0002, 0x0003, 0x0002, 0x0000,\n\t0x8005, 0x0000, 0x0000, 0x0000, 0x8006, 0x0005, 0x0006, 0x0006,\n\t0x0006, 0x0006, 0x0006, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000,\n\t// Entry 40 - 7F\n\t0x8009, 0x0000, 0x0000, 0x800a, 0x0000, 0x0000, 0x800c, 0x0001,\n\t0x0000, 0x0000, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,\n\t0x0006, 0x0006, 0x0006, 0x0006, 0x800e, 0x0000, 0x0000, 0x0007,\n\t0x0007, 0x0000, 0x0000, 0x0000, 0x0000, 0x800f, 0x0008, 0x0008,\n\t0x8011, 0x0001, 0x0001, 0x0001, 0x803c, 0x0000, 0x0009, 0x0009,\n\t0x0009, 0x0000, 0x0000, 0x000a, 0x000b, 0x000a, 0x000c, 0x000a,\n\t0x000a, 0x000c, 0x000a, 0x000d, 0x000d, 0x000a, 0x000a, 0x0001,\n\t0x0001, 0x0000, 0x0001, 0x0001, 0x803f, 0x0000, 0x0000, 0x0000,\n\t// Entry 80 - BF\n\t0x000e, 0x000e, 0x000e, 0x000f, 0x000f, 0x000f, 0x0000, 0x0000,\n\t0x0006, 0x0000, 0x0000, 0x0000, 0x000a, 0x0010, 0x0000, 0x0006,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0011, 0x0000, 0x000a,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x000a, 0x0000, 0x0009, 0x0000,\n\t0x0000, 0x0012, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t// Entry C0 - FF\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0013, 0x0000,\n\t0x0000, 0x000f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0015,\n\t0x0015, 0x0006, 0x0000, 0x0006, 0x0006, 0x0000, 0x0000, 0x0006,\n\t0x0006, 0x0001, 0x0000, 0x0000, 0x0006, 0x0006, 0x0006, 0x0006,\n\t// Entry 100 - 13F\n\t0x0000, 0x0000, 0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0006,\n\t0x0000, 0x0006, 0x0000, 0x0000, 0x0006, 0x0006, 0x0016, 0x0016,\n\t0x0017, 0x0017, 0x0001, 0x0001, 0x8041, 0x0018, 0x0018, 0x0001,\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0019, 0x0019, 0x0000, 0x0000,\n\t0x0017, 0x0017, 0x0017, 0x8044, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x0001, 0x0001, 0x0006, 0x0006, 0x0001, 0x0001, 0x0001, 0x0001,\n\t// Entry 140 - 17F\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x0001, 0x0001, 0x0006, 0x0006, 0x0006, 0x0006, 0x0000, 0x0000,\n\t0x8047, 0x0000, 0x0006, 0x0006, 0x001a, 0x001a, 0x001a, 0x001a,\n\t0x804a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x804c, 0x001b, 0x0000,\n\t0x0000, 0x0006, 0x0006, 0x0006, 0x000a, 0x000a, 0x0001, 0x0001,\n\t0x001c, 0x001c, 0x0009, 0x0009, 0x804f, 0x0000, 0x0000, 0x0000,\n\t// Entry 180 - 1BF\n\t0x0000, 0x0000, 0x8052, 0x0006, 0x0006, 0x001d, 0x0006, 0x0006,\n\t0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0006, 0x0006,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001e, 0x001e, 0x001f,\n\t0x001f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001,\n\t0x0001, 0x000d, 0x000d, 0x0000, 0x0000, 0x0020, 0x0020, 0x0006,\n\t0x0006, 0x0021, 0x0021, 0x0000, 0x0000, 0x0006, 0x0006, 0x0000,\n\t0x0000, 0x8054, 0x0000, 0x0000, 0x0000, 0x0000, 0x8056, 0x001b,\n\t0x0000, 0x0000, 0x0001, 0x0001, 0x0022, 0x0022, 0x0000, 0x0000,\n\t// Entry 1C0 - 1FF\n\t0x0000, 0x0023, 0x0023, 0x0000, 0x0000, 0x0006, 0x0006, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,\n\t0x0024, 0x0024, 0x8058, 0x0000, 0x0000, 0x0016, 0x0016, 0x0006,\n\t0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0025, 0x0025, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x000d, 0x000d, 0x0000, 0x0000,\n\t0x0006, 0x0006, 0x0000, 0x0000, 0x0006, 0x0006, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x805a, 0x0000, 0x0000, 0x0006, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0006, 0x0006, 0x805b, 0x0026, 0x805d,\n\t// Entry 200 - 23F\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x805e, 0x0015, 0x0015, 0x0000,\n\t0x0000, 0x0006, 0x0006, 0x0006, 0x8061, 0x0000, 0x0000, 0x8062,\n\t0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0001,\n\t0x0001, 0x0015, 0x0015, 0x0006, 0x0006, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0027, 0x0027, 0x0027, 0x8065, 0x8067,\n\t0x001b, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x8069, 0x0028, 0x0006, 0x0001, 0x0006, 0x0001, 0x0001, 0x0001,\n\t// Entry 240 - 27F\n\t0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000,\n\t0x0006, 0x0000, 0x0000, 0x001a, 0x001a, 0x0006, 0x0006, 0x0006,\n\t0x0006, 0x0006, 0x0000, 0x0000, 0x0029, 0x0029, 0x0029, 0x0029,\n\t0x0029, 0x0029, 0x0029, 0x0006, 0x0006, 0x0000, 0x0000, 0x002a,\n\t0x002a, 0x0000, 0x0000, 0x0000, 0x0000, 0x806b, 0x0000, 0x0000,\n\t0x002b, 0x002b, 0x002b, 0x002b, 0x0006, 0x0006, 0x000d, 0x000d,\n\t0x0006, 0x0006, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,\n\t0x002c, 0x002c, 0x002d, 0x002d, 0x002e, 0x002e, 0x0000, 0x0000,\n\t// Entry 280 - 2BF\n\t0x0000, 0x002f, 0x002f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0006,\n\t0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,\n\t0x0006, 0x0006, 0x0000, 0x0000, 0x0000, 0x806d, 0x0022, 0x0022,\n\t0x0022, 0x0000, 0x0006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0030, 0x0030, 0x0000, 0x0000, 0x8071, 0x0031, 0x0006,\n\t// Entry 2C0 - 2FF\n\t0x0006, 0x0006, 0x0000, 0x0001, 0x0001, 0x000d, 0x000d, 0x0001,\n\t0x0001, 0x0000, 0x0000, 0x0032, 0x0032, 0x8074, 0x8076, 0x001b,\n\t0x8077, 0x8079, 0x0028, 0x807b, 0x0034, 0x0033, 0x0033, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0006, 0x0006, 0x0000,\n\t0x0000, 0x0000, 0x0000, 0x0000, 0x0035, 0x0035, 0x0006, 0x0006,\n\t0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000,\n\t0x0000, 0x0000, 0x0036, 0x0037, 0x0037, 0x0036, 0x0036, 0x0001,\n\t0x0001, 0x807d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8080,\n\t// Entry 300 - 33F\n\t0x0036, 0x0036, 0x0036, 0x0000, 0x0000, 0x0006, 0x0014,\n} // Size: 1550 bytes\n\n// langToAlt is a list of numbering system and symbol set pairs, sorted and\n// marked by compact language index.\nvar langToAlt = []altSymData{ // 131 elements\n\t1:   {compactTag: 0x0, symIndex: 0x38, system: 0x3},\n\t2:   {compactTag: 0x0, symIndex: 0x42, system: 0x4},\n\t3:   {compactTag: 0xa, symIndex: 0x39, system: 0x3},\n\t4:   {compactTag: 0xa, symIndex: 0x2, system: 0x0},\n\t5:   {compactTag: 0x28, symIndex: 0x0, system: 0x6},\n\t6:   {compactTag: 0x2c, symIndex: 0x5, system: 0x0},\n\t7:   {compactTag: 0x2c, symIndex: 0x3a, system: 0x3},\n\t8:   {compactTag: 0x2c, symIndex: 0x42, system: 0x4},\n\t9:   {compactTag: 0x40, symIndex: 0x0, system: 0x6},\n\t10:  {compactTag: 0x43, symIndex: 0x0, system: 0x0},\n\t11:  {compactTag: 0x43, symIndex: 0x4f, system: 0x37},\n\t12:  {compactTag: 0x46, symIndex: 0x1, system: 0x0},\n\t13:  {compactTag: 0x46, symIndex: 0x38, system: 0x3},\n\t14:  {compactTag: 0x54, symIndex: 0x0, system: 0x9},\n\t15:  {compactTag: 0x5d, symIndex: 0x3a, system: 0x3},\n\t16:  {compactTag: 0x5d, symIndex: 0x8, system: 0x0},\n\t17:  {compactTag: 0x60, symIndex: 0x1, system: 0x0},\n\t18:  {compactTag: 0x60, symIndex: 0x38, system: 0x3},\n\t19:  {compactTag: 0x60, symIndex: 0x42, system: 0x4},\n\t20:  {compactTag: 0x60, symIndex: 0x0, system: 0x5},\n\t21:  {compactTag: 0x60, symIndex: 0x0, system: 0x6},\n\t22:  {compactTag: 0x60, symIndex: 0x0, system: 0x8},\n\t23:  {compactTag: 0x60, symIndex: 0x0, system: 0x9},\n\t24:  {compactTag: 0x60, symIndex: 0x0, system: 0xa},\n\t25:  {compactTag: 0x60, symIndex: 0x0, system: 0xb},\n\t26:  {compactTag: 0x60, symIndex: 0x0, system: 0xc},\n\t27:  {compactTag: 0x60, symIndex: 0x0, system: 0xd},\n\t28:  {compactTag: 0x60, symIndex: 0x0, system: 0xe},\n\t29:  {compactTag: 0x60, symIndex: 0x0, system: 0xf},\n\t30:  {compactTag: 0x60, symIndex: 0x0, system: 0x11},\n\t31:  {compactTag: 0x60, symIndex: 0x0, system: 0x12},\n\t32:  {compactTag: 0x60, symIndex: 0x0, system: 0x13},\n\t33:  {compactTag: 0x60, symIndex: 0x0, system: 0x14},\n\t34:  {compactTag: 0x60, symIndex: 0x0, system: 0x15},\n\t35:  {compactTag: 0x60, symIndex: 0x0, system: 0x16},\n\t36:  {compactTag: 0x60, symIndex: 0x0, system: 0x17},\n\t37:  {compactTag: 0x60, symIndex: 0x0, system: 0x18},\n\t38:  {compactTag: 0x60, symIndex: 0x0, system: 0x19},\n\t39:  {compactTag: 0x60, symIndex: 0x0, system: 0x1f},\n\t40:  {compactTag: 0x60, symIndex: 0x0, system: 0x21},\n\t41:  {compactTag: 0x60, symIndex: 0x0, system: 0x23},\n\t42:  {compactTag: 0x60, symIndex: 0x0, system: 0x24},\n\t43:  {compactTag: 0x60, symIndex: 0x0, system: 0x25},\n\t44:  {compactTag: 0x60, symIndex: 0x0, system: 0x28},\n\t45:  {compactTag: 0x60, symIndex: 0x0, system: 0x29},\n\t46:  {compactTag: 0x60, symIndex: 0x0, system: 0x2a},\n\t47:  {compactTag: 0x60, symIndex: 0x0, system: 0x2b},\n\t48:  {compactTag: 0x60, symIndex: 0x0, system: 0x2c},\n\t49:  {compactTag: 0x60, symIndex: 0x0, system: 0x2d},\n\t50:  {compactTag: 0x60, symIndex: 0x0, system: 0x30},\n\t51:  {compactTag: 0x60, symIndex: 0x0, system: 0x31},\n\t52:  {compactTag: 0x60, symIndex: 0x0, system: 0x32},\n\t53:  {compactTag: 0x60, symIndex: 0x0, system: 0x33},\n\t54:  {compactTag: 0x60, symIndex: 0x0, system: 0x34},\n\t55:  {compactTag: 0x60, symIndex: 0x0, system: 0x35},\n\t56:  {compactTag: 0x60, symIndex: 0x0, system: 0x36},\n\t57:  {compactTag: 0x60, symIndex: 0x0, system: 0x37},\n\t58:  {compactTag: 0x60, symIndex: 0x0, system: 0x39},\n\t59:  {compactTag: 0x60, symIndex: 0x0, system: 0x43},\n\t60:  {compactTag: 0x64, symIndex: 0x0, system: 0x0},\n\t61:  {compactTag: 0x64, symIndex: 0x38, system: 0x3},\n\t62:  {compactTag: 0x64, symIndex: 0x42, system: 0x4},\n\t63:  {compactTag: 0x7c, symIndex: 0x50, system: 0x37},\n\t64:  {compactTag: 0x7c, symIndex: 0x0, system: 0x0},\n\t65:  {compactTag: 0x114, symIndex: 0x43, system: 0x4},\n\t66:  {compactTag: 0x114, symIndex: 0x18, system: 0x0},\n\t67:  {compactTag: 0x114, symIndex: 0x3b, system: 0x3},\n\t68:  {compactTag: 0x123, symIndex: 0x1, system: 0x0},\n\t69:  {compactTag: 0x123, symIndex: 0x3c, system: 0x3},\n\t70:  {compactTag: 0x123, symIndex: 0x44, system: 0x4},\n\t71:  {compactTag: 0x158, symIndex: 0x0, system: 0x0},\n\t72:  {compactTag: 0x158, symIndex: 0x3b, system: 0x3},\n\t73:  {compactTag: 0x158, symIndex: 0x45, system: 0x4},\n\t74:  {compactTag: 0x160, symIndex: 0x0, system: 0x0},\n\t75:  {compactTag: 0x160, symIndex: 0x38, system: 0x3},\n\t76:  {compactTag: 0x16d, symIndex: 0x1b, system: 0x0},\n\t77:  {compactTag: 0x16d, symIndex: 0x0, system: 0x9},\n\t78:  {compactTag: 0x16d, symIndex: 0x0, system: 0xa},\n\t79:  {compactTag: 0x17c, symIndex: 0x0, system: 0x0},\n\t80:  {compactTag: 0x17c, symIndex: 0x3d, system: 0x3},\n\t81:  {compactTag: 0x17c, symIndex: 0x42, system: 0x4},\n\t82:  {compactTag: 0x182, symIndex: 0x6, system: 0x0},\n\t83:  {compactTag: 0x182, symIndex: 0x38, system: 0x3},\n\t84:  {compactTag: 0x1b1, symIndex: 0x0, system: 0x0},\n\t85:  {compactTag: 0x1b1, symIndex: 0x3e, system: 0x3},\n\t86:  {compactTag: 0x1b6, symIndex: 0x42, system: 0x4},\n\t87:  {compactTag: 0x1b6, symIndex: 0x1b, system: 0x0},\n\t88:  {compactTag: 0x1d2, symIndex: 0x42, system: 0x4},\n\t89:  {compactTag: 0x1d2, symIndex: 0x0, system: 0x0},\n\t90:  {compactTag: 0x1f3, symIndex: 0x0, system: 0xb},\n\t91:  {compactTag: 0x1fd, symIndex: 0x4e, system: 0x24},\n\t92:  {compactTag: 0x1fd, symIndex: 0x26, system: 0x0},\n\t93:  {compactTag: 0x1ff, symIndex: 0x42, system: 0x4},\n\t94:  {compactTag: 0x204, symIndex: 0x15, system: 0x0},\n\t95:  {compactTag: 0x204, symIndex: 0x3f, system: 0x3},\n\t96:  {compactTag: 0x204, symIndex: 0x46, system: 0x4},\n\t97:  {compactTag: 0x20c, symIndex: 0x0, system: 0xb},\n\t98:  {compactTag: 0x20f, symIndex: 0x6, system: 0x0},\n\t99:  {compactTag: 0x20f, symIndex: 0x38, system: 0x3},\n\t100: {compactTag: 0x20f, symIndex: 0x42, system: 0x4},\n\t101: {compactTag: 0x22e, symIndex: 0x0, system: 0x0},\n\t102: {compactTag: 0x22e, symIndex: 0x47, system: 0x4},\n\t103: {compactTag: 0x22f, symIndex: 0x42, system: 0x4},\n\t104: {compactTag: 0x22f, symIndex: 0x1b, system: 0x0},\n\t105: {compactTag: 0x238, symIndex: 0x42, system: 0x4},\n\t106: {compactTag: 0x238, symIndex: 0x28, system: 0x0},\n\t107: {compactTag: 0x265, symIndex: 0x38, system: 0x3},\n\t108: {compactTag: 0x265, symIndex: 0x0, system: 0x0},\n\t109: {compactTag: 0x29d, symIndex: 0x22, system: 0x0},\n\t110: {compactTag: 0x29d, symIndex: 0x40, system: 0x3},\n\t111: {compactTag: 0x29d, symIndex: 0x48, system: 0x4},\n\t112: {compactTag: 0x29d, symIndex: 0x4d, system: 0xc},\n\t113: {compactTag: 0x2bd, symIndex: 0x31, system: 0x0},\n\t114: {compactTag: 0x2bd, symIndex: 0x3e, system: 0x3},\n\t115: {compactTag: 0x2bd, symIndex: 0x42, system: 0x4},\n\t116: {compactTag: 0x2cd, symIndex: 0x1b, system: 0x0},\n\t117: {compactTag: 0x2cd, symIndex: 0x49, system: 0x4},\n\t118: {compactTag: 0x2ce, symIndex: 0x49, system: 0x4},\n\t119: {compactTag: 0x2d0, symIndex: 0x33, system: 0x0},\n\t120: {compactTag: 0x2d0, symIndex: 0x4a, system: 0x4},\n\t121: {compactTag: 0x2d1, symIndex: 0x42, system: 0x4},\n\t122: {compactTag: 0x2d1, symIndex: 0x28, system: 0x0},\n\t123: {compactTag: 0x2d3, symIndex: 0x34, system: 0x0},\n\t124: {compactTag: 0x2d3, symIndex: 0x4b, system: 0x4},\n\t125: {compactTag: 0x2f9, symIndex: 0x0, system: 0x0},\n\t126: {compactTag: 0x2f9, symIndex: 0x38, system: 0x3},\n\t127: {compactTag: 0x2f9, symIndex: 0x42, system: 0x4},\n\t128: {compactTag: 0x2ff, symIndex: 0x36, system: 0x0},\n\t129: {compactTag: 0x2ff, symIndex: 0x41, system: 0x3},\n\t130: {compactTag: 0x2ff, symIndex: 0x4c, system: 0x4},\n} // Size: 810 bytes\n\nvar tagToDecimal = []uint8{ // 775 elements\n\t// Entry 0 - 3F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 40 - 7F\n\t0x05, 0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x05, 0x05, 0x05, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x05, 0x05, 0x01, 0x01,\n\t// Entry 80 - BF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry C0 - FF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 100 - 13F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 140 - 17F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x05,\n\t0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 180 - 1BF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x05, 0x05, 0x05, 0x05,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 1C0 - 1FF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x05, 0x05,\n\t0x01, 0x01, 0x01, 0x05, 0x05, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 200 - 23F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x05, 0x05, 0x01, 0x01, 0x01, 0x05, 0x01,\n\t0x01, 0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 240 - 27F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 280 - 2BF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x05,\n\t0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 2C0 - 2FF\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n\t// Entry 300 - 33F\n\t0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08,\n} // Size: 799 bytes\n\nvar tagToScientific = []uint8{ // 775 elements\n\t// Entry 0 - 3F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 40 - 7F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 80 - BF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry C0 - FF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 100 - 13F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 140 - 17F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x0c, 0x0c, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0c,\n\t0x0c, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 180 - 1BF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 1C0 - 1FF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x0d, 0x0d, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x0c, 0x0c, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 200 - 23F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0c, 0x02,\n\t0x02, 0x0c, 0x0c, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 240 - 27F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x0d, 0x0d, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 280 - 2BF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 2C0 - 2FF\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,\n\t// Entry 300 - 33F\n\t0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x09,\n} // Size: 799 bytes\n\nvar tagToPercent = []uint8{ // 775 elements\n\t// Entry 0 - 3F\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry 40 - 7F\n\t0x06, 0x06, 0x06, 0x04, 0x04, 0x04, 0x03, 0x03,\n\t0x06, 0x06, 0x03, 0x04, 0x04, 0x03, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06, 0x03,\n\t0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03,\n\t0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04, 0x03,\n\t0x03, 0x04, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03,\n\t0x03, 0x04, 0x04, 0x04, 0x07, 0x07, 0x04, 0x04,\n\t// Entry 80 - BF\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x03, 0x04, 0x03, 0x04,\n\t0x04, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry C0 - FF\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t// Entry 100 - 13F\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04,\n\t0x0b, 0x0b, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04, 0x04,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t// Entry 140 - 17F\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06,\n\t0x06, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry 180 - 1BF\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06, 0x06,\n\t0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04, 0x04,\n\t// Entry 1C0 - 1FF\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry 200 - 23F\n\t0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x06, 0x06, 0x04, 0x04, 0x04, 0x06, 0x04,\n\t0x04, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry 240 - 27F\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03,\n\t0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03,\n\t0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04,\n\t// Entry 280 - 2BF\n\t0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03,\n\t0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06,\n\t0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x0e,\n\t// Entry 2C0 - 2FF\n\t0x0e, 0x0e, 0x04, 0x03, 0x03, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03,\n\t0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,\n\t// Entry 300 - 33F\n\t0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0a,\n} // Size: 799 bytes\n\nvar formats = []Pattern{Pattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\tMaxFractionDigits:    0,\n\tIncrement:            0x0,\n\tIncrementScale:       0x0,\n\tMode:                 0x0,\n\tDigitShift:           0x0,\n\tMinIntegerDigits:     0x0,\n\tMaxIntegerDigits:     0x0,\n\tMinFractionDigits:    0x0,\n\tMinSignificantDigits: 0x0,\n\tMinExponentDigits:    0x0},\n\tAffix:       \"\",\n\tOffset:      0x0,\n\tNegOffset:   0x0,\n\tPadRune:     0,\n\tFormatWidth: 0x0,\n\tGroupingSize: [2]uint8{0x0,\n\t\t0x0},\n\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    3,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x9,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x0,\n\t\tMaxIntegerDigits:     0x1,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x1},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x3,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x00\\x03\\u00a0%\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x7,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x00\\x01%\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x6,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    3,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0xc,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x2},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x00\\x01%\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x9,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x2},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x00\\x03\\u00a0%\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0xa,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x2},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    6,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x8,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    6,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x6,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x3},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0xd,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x4},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x00\\x01%\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x2,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x03%\\u00a0\\x00\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x7,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x0,\n\t\tMaxIntegerDigits:     0x1,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x1},\n\t\tAffix:       \"\\x01[\\x01]\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x5,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x0,\n\t\tMinIntegerDigits:     0x0,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x1,\n\t\tGroupingSize: [2]uint8{0x0,\n\t\t\t0x0},\n\t\tFlags: 0x0},\n\tPattern{RoundingContext: RoundingContext{MaxSignificantDigits: 0,\n\t\tMaxFractionDigits:    0,\n\t\tIncrement:            0x0,\n\t\tIncrementScale:       0x0,\n\t\tMode:                 0x0,\n\t\tDigitShift:           0x2,\n\t\tMinIntegerDigits:     0x1,\n\t\tMaxIntegerDigits:     0x0,\n\t\tMinFractionDigits:    0x0,\n\t\tMinSignificantDigits: 0x0,\n\t\tMinExponentDigits:    0x0},\n\t\tAffix:       \"\\x01%\\x00\",\n\t\tOffset:      0x0,\n\t\tNegOffset:   0x0,\n\t\tPadRune:     0,\n\t\tFormatWidth: 0x6,\n\t\tGroupingSize: [2]uint8{0x3,\n\t\t\t0x0},\n\t\tFlags: 0x0}}\n\n// Total table size 8634 bytes (8KiB); checksum: 8F23386D\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/stringset/set.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package stringset provides a way to represent a collection of strings\n// compactly.\npackage stringset\n\nimport \"sort\"\n\n// A Set holds a collection of strings that can be looked up by an index number.\ntype Set struct {\n\t// These fields are exported to allow for code generation.\n\n\tData  string\n\tIndex []uint16\n}\n\n// Elem returns the string with index i. It panics if i is out of range.\nfunc (s *Set) Elem(i int) string {\n\treturn s.Data[s.Index[i]:s.Index[i+1]]\n}\n\n// Len returns the number of strings in the set.\nfunc (s *Set) Len() int {\n\treturn len(s.Index) - 1\n}\n\n// Search returns the index of the given string or -1 if it is not in the set.\n// The Set must have been created with strings in sorted order.\nfunc Search(s *Set, str string) int {\n\t// TODO: optimize this if it gets used a lot.\n\tn := len(s.Index) - 1\n\tp := sort.Search(n, func(i int) bool {\n\t\treturn s.Elem(i) >= str\n\t})\n\tif p == n || str != s.Elem(p) {\n\t\treturn -1\n\t}\n\treturn p\n}\n\n// A Builder constructs Sets.\ntype Builder struct {\n\tset   Set\n\tindex map[string]int\n}\n\n// NewBuilder returns a new and initialized Builder.\nfunc NewBuilder() *Builder {\n\treturn &Builder{\n\t\tset: Set{\n\t\t\tIndex: []uint16{0},\n\t\t},\n\t\tindex: map[string]int{},\n\t}\n}\n\n// Set creates the set created so far.\nfunc (b *Builder) Set() Set {\n\treturn b.set\n}\n\n// Index returns the index for the given string, which must have been added\n// before.\nfunc (b *Builder) Index(s string) int {\n\treturn b.index[s]\n}\n\n// Add adds a string to the index. Strings that are added by a single Add will\n// be stored together, unless they match an existing string.\nfunc (b *Builder) Add(ss ...string) {\n\t// First check if the string already exists.\n\tfor _, s := range ss {\n\t\tif _, ok := b.index[s]; ok {\n\t\t\tcontinue\n\t\t}\n\t\tb.index[s] = len(b.set.Index) - 1\n\t\tb.set.Data += s\n\t\tx := len(b.set.Data)\n\t\tif x > 0xFFFF {\n\t\t\tpanic(\"Index too > 0xFFFF\")\n\t\t}\n\t\tb.set.Index = append(b.set.Index, uint16(x))\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/internal/tag/tag.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package tag contains functionality handling tags and related data.\npackage tag // import \"golang.org/x/text/internal/tag\"\n\nimport \"sort\"\n\n// An Index converts tags to a compact numeric value.\n//\n// All elements are of size 4. Tags may be up to 4 bytes long. Excess bytes can\n// be used to store additional information about the tag.\ntype Index string\n\n// Elem returns the element data at the given index.\nfunc (s Index) Elem(x int) string {\n\treturn string(s[x*4 : x*4+4])\n}\n\n// Index reports the index of the given key or -1 if it could not be found.\n// Only the first len(key) bytes from the start of the 4-byte entries will be\n// considered for the search and the first match in Index will be returned.\nfunc (s Index) Index(key []byte) int {\n\tn := len(key)\n\t// search the index of the first entry with an equal or higher value than\n\t// key in s.\n\tindex := sort.Search(len(s)/4, func(i int) bool {\n\t\treturn cmp(s[i*4:i*4+n], key) != -1\n\t})\n\ti := index * 4\n\tif cmp(s[i:i+len(key)], key) != 0 {\n\t\treturn -1\n\t}\n\treturn index\n}\n\n// Next finds the next occurrence of key after index x, which must have been\n// obtained from a call to Index using the same key. It returns x+1 or -1.\nfunc (s Index) Next(key []byte, x int) int {\n\tif x++; x*4 < len(s) && cmp(s[x*4:x*4+len(key)], key) == 0 {\n\t\treturn x\n\t}\n\treturn -1\n}\n\n// cmp returns an integer comparing a and b lexicographically.\nfunc cmp(a Index, b []byte) int {\n\tn := len(a)\n\tif len(b) < n {\n\t\tn = len(b)\n\t}\n\tfor i, c := range b[:n] {\n\t\tswitch {\n\t\tcase a[i] > c:\n\t\t\treturn 1\n\t\tcase a[i] < c:\n\t\t\treturn -1\n\t\t}\n\t}\n\tswitch {\n\tcase len(a) < len(b):\n\t\treturn -1\n\tcase len(a) > len(b):\n\t\treturn 1\n\t}\n\treturn 0\n}\n\n// Compare returns an integer comparing a and b lexicographically.\nfunc Compare(a string, b []byte) int {\n\treturn cmp(Index(a), b)\n}\n\n// FixCase reformats b to the same pattern of cases as form.\n// If returns false if string b is malformed.\nfunc FixCase(form string, b []byte) bool {\n\tif len(form) != len(b) {\n\t\treturn false\n\t}\n\tfor i, c := range b {\n\t\tif form[i] <= 'Z' {\n\t\t\tif c >= 'a' {\n\t\t\t\tc -= 'z' - 'Z'\n\t\t\t}\n\t\t\tif c < 'A' || 'Z' < c {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\tif c <= 'Z' {\n\t\t\t\tc += 'z' - 'Z'\n\t\t\t}\n\t\t\tif c < 'a' || 'z' < c {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tb[i] = c\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/coverage.go",
    "content": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\n\t\"golang.org/x/text/internal/language\"\n)\n\n// The Coverage interface is used to define the level of coverage of an\n// internationalization service. Note that not all types are supported by all\n// services. As lists may be generated on the fly, it is recommended that users\n// of a Coverage cache the results.\ntype Coverage interface {\n\t// Tags returns the list of supported tags.\n\tTags() []Tag\n\n\t// BaseLanguages returns the list of supported base languages.\n\tBaseLanguages() []Base\n\n\t// Scripts returns the list of supported scripts.\n\tScripts() []Script\n\n\t// Regions returns the list of supported regions.\n\tRegions() []Region\n}\n\nvar (\n\t// Supported defines a Coverage that lists all supported subtags. Tags\n\t// always returns nil.\n\tSupported Coverage = allSubtags{}\n)\n\n// TODO:\n// - Support Variants, numbering systems.\n// - CLDR coverage levels.\n// - Set of common tags defined in this package.\n\ntype allSubtags struct{}\n\n// Regions returns the list of supported regions. As all regions are in a\n// consecutive range, it simply returns a slice of numbers in increasing order.\n// The \"undefined\" region is not returned.\nfunc (s allSubtags) Regions() []Region {\n\treg := make([]Region, language.NumRegions)\n\tfor i := range reg {\n\t\treg[i] = Region{language.Region(i + 1)}\n\t}\n\treturn reg\n}\n\n// Scripts returns the list of supported scripts. As all scripts are in a\n// consecutive range, it simply returns a slice of numbers in increasing order.\n// The \"undefined\" script is not returned.\nfunc (s allSubtags) Scripts() []Script {\n\tscr := make([]Script, language.NumScripts)\n\tfor i := range scr {\n\t\tscr[i] = Script{language.Script(i + 1)}\n\t}\n\treturn scr\n}\n\n// BaseLanguages returns the list of all supported base languages. It generates\n// the list by traversing the internal structures.\nfunc (s allSubtags) BaseLanguages() []Base {\n\tbs := language.BaseLanguages()\n\tbase := make([]Base, len(bs))\n\tfor i, b := range bs {\n\t\tbase[i] = Base{b}\n\t}\n\treturn base\n}\n\n// Tags always returns nil.\nfunc (s allSubtags) Tags() []Tag {\n\treturn nil\n}\n\n// coverage is used by NewCoverage which is used as a convenient way for\n// creating Coverage implementations for partially defined data. Very often a\n// package will only need to define a subset of slices. coverage provides a\n// convenient way to do this. Moreover, packages using NewCoverage, instead of\n// their own implementation, will not break if later new slice types are added.\ntype coverage struct {\n\ttags    func() []Tag\n\tbases   func() []Base\n\tscripts func() []Script\n\tregions func() []Region\n}\n\nfunc (s *coverage) Tags() []Tag {\n\tif s.tags == nil {\n\t\treturn nil\n\t}\n\treturn s.tags()\n}\n\n// bases implements sort.Interface and is used to sort base languages.\ntype bases []Base\n\nfunc (b bases) Len() int {\n\treturn len(b)\n}\n\nfunc (b bases) Swap(i, j int) {\n\tb[i], b[j] = b[j], b[i]\n}\n\nfunc (b bases) Less(i, j int) bool {\n\treturn b[i].langID < b[j].langID\n}\n\n// BaseLanguages returns the result from calling s.bases if it is specified or\n// otherwise derives the set of supported base languages from tags.\nfunc (s *coverage) BaseLanguages() []Base {\n\tif s.bases == nil {\n\t\ttags := s.Tags()\n\t\tif len(tags) == 0 {\n\t\t\treturn nil\n\t\t}\n\t\ta := make([]Base, len(tags))\n\t\tfor i, t := range tags {\n\t\t\ta[i] = Base{language.Language(t.lang())}\n\t\t}\n\t\tsort.Sort(bases(a))\n\t\tk := 0\n\t\tfor i := 1; i < len(a); i++ {\n\t\t\tif a[k] != a[i] {\n\t\t\t\tk++\n\t\t\t\ta[k] = a[i]\n\t\t\t}\n\t\t}\n\t\treturn a[:k+1]\n\t}\n\treturn s.bases()\n}\n\nfunc (s *coverage) Scripts() []Script {\n\tif s.scripts == nil {\n\t\treturn nil\n\t}\n\treturn s.scripts()\n}\n\nfunc (s *coverage) Regions() []Region {\n\tif s.regions == nil {\n\t\treturn nil\n\t}\n\treturn s.regions()\n}\n\n// NewCoverage returns a Coverage for the given lists. It is typically used by\n// packages providing internationalization services to define their level of\n// coverage. A list may be of type []T or func() []T, where T is either Tag,\n// Base, Script or Region. The returned Coverage derives the value for Bases\n// from Tags if no func or slice for []Base is specified. For other unspecified\n// types the returned Coverage will return nil for the respective methods.\nfunc NewCoverage(list ...interface{}) Coverage {\n\ts := &coverage{}\n\tfor _, x := range list {\n\t\tswitch v := x.(type) {\n\t\tcase func() []Base:\n\t\t\ts.bases = v\n\t\tcase func() []Script:\n\t\t\ts.scripts = v\n\t\tcase func() []Region:\n\t\t\ts.regions = v\n\t\tcase func() []Tag:\n\t\t\ts.tags = v\n\t\tcase []Base:\n\t\t\ts.bases = func() []Base { return v }\n\t\tcase []Script:\n\t\t\ts.scripts = func() []Script { return v }\n\t\tcase []Region:\n\t\t\ts.regions = func() []Region { return v }\n\t\tcase []Tag:\n\t\t\ts.tags = func() []Tag { return v }\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"language: unsupported set type %T\", v))\n\t\t}\n\t}\n\treturn s\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/doc.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package language implements BCP 47 language tags and related functionality.\n//\n// The most important function of package language is to match a list of\n// user-preferred languages to a list of supported languages.\n// It alleviates the developer of dealing with the complexity of this process\n// and provides the user with the best experience\n// (see https://blog.golang.org/matchlang).\n//\n// # Matching preferred against supported languages\n//\n// A Matcher for an application that supports English, Australian English,\n// Danish, and standard Mandarin can be created as follows:\n//\n//\tvar matcher = language.NewMatcher([]language.Tag{\n//\t    language.English,   // The first language is used as fallback.\n//\t    language.MustParse(\"en-AU\"),\n//\t    language.Danish,\n//\t    language.Chinese,\n//\t})\n//\n// This list of supported languages is typically implied by the languages for\n// which there exists translations of the user interface.\n//\n// User-preferred languages usually come as a comma-separated list of BCP 47\n// language tags.\n// The MatchString finds best matches for such strings:\n//\n//\thandler(w http.ResponseWriter, r *http.Request) {\n//\t    lang, _ := r.Cookie(\"lang\")\n//\t    accept := r.Header.Get(\"Accept-Language\")\n//\t    tag, _ := language.MatchStrings(matcher, lang.String(), accept)\n//\n//\t    // tag should now be used for the initialization of any\n//\t    // locale-specific service.\n//\t}\n//\n// The Matcher's Match method can be used to match Tags directly.\n//\n// Matchers are aware of the intricacies of equivalence between languages, such\n// as deprecated subtags, legacy tags, macro languages, mutual\n// intelligibility between scripts and languages, and transparently passing\n// BCP 47 user configuration.\n// For instance, it will know that a reader of Bokmål Danish can read Norwegian\n// and will know that Cantonese (\"yue\") is a good match for \"zh-HK\".\n//\n// # Using match results\n//\n// To guarantee a consistent user experience to the user it is important to\n// use the same language tag for the selection of any locale-specific services.\n// For example, it is utterly confusing to substitute spelled-out numbers\n// or dates in one language in text of another language.\n// More subtly confusing is using the wrong sorting order or casing\n// algorithm for a certain language.\n//\n// All the packages in x/text that provide locale-specific services\n// (e.g. collate, cases) should be initialized with the tag that was\n// obtained at the start of an interaction with the user.\n//\n// Note that Tag that is returned by Match and MatchString may differ from any\n// of the supported languages, as it may contain carried over settings from\n// the user tags.\n// This may be inconvenient when your application has some additional\n// locale-specific data for your supported languages.\n// Match and MatchString both return the index of the matched supported tag\n// to simplify associating such data with the matched tag.\n//\n// # Canonicalization\n//\n// If one uses the Matcher to compare languages one does not need to\n// worry about canonicalization.\n//\n// The meaning of a Tag varies per application. The language package\n// therefore delays canonicalization and preserves information as much\n// as possible. The Matcher, however, will always take into account that\n// two different tags may represent the same language.\n//\n// By default, only legacy and deprecated tags are converted into their\n// canonical equivalent. All other information is preserved. This approach makes\n// the confidence scores more accurate and allows matchers to distinguish\n// between variants that are otherwise lost.\n//\n// As a consequence, two tags that should be treated as identical according to\n// BCP 47 or CLDR, like \"en-Latn\" and \"en\", will be represented differently. The\n// Matcher handles such distinctions, though, and is aware of the\n// equivalence relations. The CanonType type can be used to alter the\n// canonicalization form.\n//\n// # References\n//\n// BCP 47 - Tags for Identifying Languages http://tools.ietf.org/html/bcp47\npackage language // import \"golang.org/x/text/language\"\n\n// TODO: explanation on how to match languages for your own locale-specific\n// service.\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/language.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go -output tables.go\n\npackage language\n\n// TODO: Remove above NOTE after:\n// - verifying that tables are dropped correctly (most notably matcher tables).\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/language\"\n\t\"golang.org/x/text/internal/language/compact\"\n)\n\n// Tag represents a BCP 47 language tag. It is used to specify an instance of a\n// specific language or locale. All language tag values are guaranteed to be\n// well-formed.\ntype Tag compact.Tag\n\nfunc makeTag(t language.Tag) (tag Tag) {\n\treturn Tag(compact.Make(t))\n}\n\nfunc (t *Tag) tag() language.Tag {\n\treturn (*compact.Tag)(t).Tag()\n}\n\nfunc (t *Tag) isCompact() bool {\n\treturn (*compact.Tag)(t).IsCompact()\n}\n\n// TODO: improve performance.\nfunc (t *Tag) lang() language.Language { return t.tag().LangID }\nfunc (t *Tag) region() language.Region { return t.tag().RegionID }\nfunc (t *Tag) script() language.Script { return t.tag().ScriptID }\n\n// Make is a convenience wrapper for Parse that omits the error.\n// In case of an error, a sensible default is returned.\nfunc Make(s string) Tag {\n\treturn Default.Make(s)\n}\n\n// Make is a convenience wrapper for c.Parse that omits the error.\n// In case of an error, a sensible default is returned.\nfunc (c CanonType) Make(s string) Tag {\n\tt, _ := c.Parse(s)\n\treturn t\n}\n\n// Raw returns the raw base language, script and region, without making an\n// attempt to infer their values.\nfunc (t Tag) Raw() (b Base, s Script, r Region) {\n\ttt := t.tag()\n\treturn Base{tt.LangID}, Script{tt.ScriptID}, Region{tt.RegionID}\n}\n\n// IsRoot returns true if t is equal to language \"und\".\nfunc (t Tag) IsRoot() bool {\n\treturn compact.Tag(t).IsRoot()\n}\n\n// CanonType can be used to enable or disable various types of canonicalization.\ntype CanonType int\n\nconst (\n\t// Replace deprecated base languages with their preferred replacements.\n\tDeprecatedBase CanonType = 1 << iota\n\t// Replace deprecated scripts with their preferred replacements.\n\tDeprecatedScript\n\t// Replace deprecated regions with their preferred replacements.\n\tDeprecatedRegion\n\t// Remove redundant scripts.\n\tSuppressScript\n\t// Normalize legacy encodings. This includes legacy languages defined in\n\t// CLDR as well as bibliographic codes defined in ISO-639.\n\tLegacy\n\t// Map the dominant language of a macro language group to the macro language\n\t// subtag. For example cmn -> zh.\n\tMacro\n\t// The CLDR flag should be used if full compatibility with CLDR is required.\n\t// There are a few cases where language.Tag may differ from CLDR. To follow all\n\t// of CLDR's suggestions, use All|CLDR.\n\tCLDR\n\n\t// Raw can be used to Compose or Parse without Canonicalization.\n\tRaw CanonType = 0\n\n\t// Replace all deprecated tags with their preferred replacements.\n\tDeprecated = DeprecatedBase | DeprecatedScript | DeprecatedRegion\n\n\t// All canonicalizations recommended by BCP 47.\n\tBCP47 = Deprecated | SuppressScript\n\n\t// All canonicalizations.\n\tAll = BCP47 | Legacy | Macro\n\n\t// Default is the canonicalization used by Parse, Make and Compose. To\n\t// preserve as much information as possible, canonicalizations that remove\n\t// potentially valuable information are not included. The Matcher is\n\t// designed to recognize similar tags that would be the same if\n\t// they were canonicalized using All.\n\tDefault = Deprecated | Legacy\n\n\tcanonLang = DeprecatedBase | Legacy | Macro\n\n\t// TODO: LikelyScript, LikelyRegion: suppress similar to ICU.\n)\n\n// canonicalize returns the canonicalized equivalent of the tag and\n// whether there was any change.\nfunc canonicalize(c CanonType, t language.Tag) (language.Tag, bool) {\n\tif c == Raw {\n\t\treturn t, false\n\t}\n\tchanged := false\n\tif c&SuppressScript != 0 {\n\t\tif t.LangID.SuppressScript() == t.ScriptID {\n\t\t\tt.ScriptID = 0\n\t\t\tchanged = true\n\t\t}\n\t}\n\tif c&canonLang != 0 {\n\t\tfor {\n\t\t\tif l, aliasType := t.LangID.Canonicalize(); l != t.LangID {\n\t\t\t\tswitch aliasType {\n\t\t\t\tcase language.Legacy:\n\t\t\t\t\tif c&Legacy != 0 {\n\t\t\t\t\t\tif t.LangID == _sh && t.ScriptID == 0 {\n\t\t\t\t\t\t\tt.ScriptID = _Latn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.LangID = l\n\t\t\t\t\t\tchanged = true\n\t\t\t\t\t}\n\t\t\t\tcase language.Macro:\n\t\t\t\t\tif c&Macro != 0 {\n\t\t\t\t\t\t// We deviate here from CLDR. The mapping \"nb\" -> \"no\"\n\t\t\t\t\t\t// qualifies as a typical Macro language mapping.  However,\n\t\t\t\t\t\t// for legacy reasons, CLDR maps \"no\", the macro language\n\t\t\t\t\t\t// code for Norwegian, to the dominant variant \"nb\". This\n\t\t\t\t\t\t// change is currently under consideration for CLDR as well.\n\t\t\t\t\t\t// See https://unicode.org/cldr/trac/ticket/2698 and also\n\t\t\t\t\t\t// https://unicode.org/cldr/trac/ticket/1790 for some of the\n\t\t\t\t\t\t// practical implications. TODO: this check could be removed\n\t\t\t\t\t\t// if CLDR adopts this change.\n\t\t\t\t\t\tif c&CLDR == 0 || t.LangID != _nb {\n\t\t\t\t\t\t\tchanged = true\n\t\t\t\t\t\t\tt.LangID = l\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tcase language.Deprecated:\n\t\t\t\t\tif c&DeprecatedBase != 0 {\n\t\t\t\t\t\tif t.LangID == _mo && t.RegionID == 0 {\n\t\t\t\t\t\t\tt.RegionID = _MD\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.LangID = l\n\t\t\t\t\t\tchanged = true\n\t\t\t\t\t\t// Other canonicalization types may still apply.\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if c&Legacy != 0 && t.LangID == _no && c&CLDR != 0 {\n\t\t\t\tt.LangID = _nb\n\t\t\t\tchanged = true\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tif c&DeprecatedScript != 0 {\n\t\tif t.ScriptID == _Qaai {\n\t\t\tchanged = true\n\t\t\tt.ScriptID = _Zinh\n\t\t}\n\t}\n\tif c&DeprecatedRegion != 0 {\n\t\tif r := t.RegionID.Canonicalize(); r != t.RegionID {\n\t\t\tchanged = true\n\t\t\tt.RegionID = r\n\t\t}\n\t}\n\treturn t, changed\n}\n\n// Canonicalize returns the canonicalized equivalent of the tag.\nfunc (c CanonType) Canonicalize(t Tag) (Tag, error) {\n\t// First try fast path.\n\tif t.isCompact() {\n\t\tif _, changed := canonicalize(c, compact.Tag(t).Tag()); !changed {\n\t\t\treturn t, nil\n\t\t}\n\t}\n\t// It is unlikely that one will canonicalize a tag after matching. So do\n\t// a slow but simple approach here.\n\tif tag, changed := canonicalize(c, t.tag()); changed {\n\t\ttag.RemakeString()\n\t\treturn makeTag(tag), nil\n\t}\n\treturn t, nil\n\n}\n\n// Confidence indicates the level of certainty for a given return value.\n// For example, Serbian may be written in Cyrillic or Latin script.\n// The confidence level indicates whether a value was explicitly specified,\n// whether it is typically the only possible value, or whether there is\n// an ambiguity.\ntype Confidence int\n\nconst (\n\tNo    Confidence = iota // full confidence that there was no match\n\tLow                     // most likely value picked out of a set of alternatives\n\tHigh                    // value is generally assumed to be the correct match\n\tExact                   // exact match or explicitly specified value\n)\n\nvar confName = []string{\"No\", \"Low\", \"High\", \"Exact\"}\n\nfunc (c Confidence) String() string {\n\treturn confName[c]\n}\n\n// String returns the canonical string representation of the language tag.\nfunc (t Tag) String() string {\n\treturn t.tag().String()\n}\n\n// MarshalText implements encoding.TextMarshaler.\nfunc (t Tag) MarshalText() (text []byte, err error) {\n\treturn t.tag().MarshalText()\n}\n\n// UnmarshalText implements encoding.TextUnmarshaler.\nfunc (t *Tag) UnmarshalText(text []byte) error {\n\tvar tag language.Tag\n\terr := tag.UnmarshalText(text)\n\t*t = makeTag(tag)\n\treturn err\n}\n\n// Base returns the base language of the language tag. If the base language is\n// unspecified, an attempt will be made to infer it from the context.\n// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change.\nfunc (t Tag) Base() (Base, Confidence) {\n\tif b := t.lang(); b != 0 {\n\t\treturn Base{b}, Exact\n\t}\n\ttt := t.tag()\n\tc := High\n\tif tt.ScriptID == 0 && !tt.RegionID.IsCountry() {\n\t\tc = Low\n\t}\n\tif tag, err := tt.Maximize(); err == nil && tag.LangID != 0 {\n\t\treturn Base{tag.LangID}, c\n\t}\n\treturn Base{0}, No\n}\n\n// Script infers the script for the language tag. If it was not explicitly given, it will infer\n// a most likely candidate.\n// If more than one script is commonly used for a language, the most likely one\n// is returned with a low confidence indication. For example, it returns (Cyrl, Low)\n// for Serbian.\n// If a script cannot be inferred (Zzzz, No) is returned. We do not use Zyyy (undetermined)\n// as one would suspect from the IANA registry for BCP 47. In a Unicode context Zyyy marks\n// common characters (like 1, 2, 3, '.', etc.) and is therefore more like multiple scripts.\n// See https://www.unicode.org/reports/tr24/#Values for more details. Zzzz is also used for\n// unknown value in CLDR.  (Zzzz, Exact) is returned if Zzzz was explicitly specified.\n// Note that an inferred script is never guaranteed to be the correct one. Latin is\n// almost exclusively used for Afrikaans, but Arabic has been used for some texts\n// in the past.  Also, the script that is commonly used may change over time.\n// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change.\nfunc (t Tag) Script() (Script, Confidence) {\n\tif scr := t.script(); scr != 0 {\n\t\treturn Script{scr}, Exact\n\t}\n\ttt := t.tag()\n\tsc, c := language.Script(_Zzzz), No\n\tif scr := tt.LangID.SuppressScript(); scr != 0 {\n\t\t// Note: it is not always the case that a language with a suppress\n\t\t// script value is only written in one script (e.g. kk, ms, pa).\n\t\tif tt.RegionID == 0 {\n\t\t\treturn Script{scr}, High\n\t\t}\n\t\tsc, c = scr, High\n\t}\n\tif tag, err := tt.Maximize(); err == nil {\n\t\tif tag.ScriptID != sc {\n\t\t\tsc, c = tag.ScriptID, Low\n\t\t}\n\t} else {\n\t\ttt, _ = canonicalize(Deprecated|Macro, tt)\n\t\tif tag, err := tt.Maximize(); err == nil && tag.ScriptID != sc {\n\t\t\tsc, c = tag.ScriptID, Low\n\t\t}\n\t}\n\treturn Script{sc}, c\n}\n\n// Region returns the region for the language tag. If it was not explicitly given, it will\n// infer a most likely candidate from the context.\n// It uses a variant of CLDR's Add Likely Subtags algorithm. This is subject to change.\nfunc (t Tag) Region() (Region, Confidence) {\n\tif r := t.region(); r != 0 {\n\t\treturn Region{r}, Exact\n\t}\n\ttt := t.tag()\n\tif tt, err := tt.Maximize(); err == nil {\n\t\treturn Region{tt.RegionID}, Low // TODO: differentiate between high and low.\n\t}\n\ttt, _ = canonicalize(Deprecated|Macro, tt)\n\tif tag, err := tt.Maximize(); err == nil {\n\t\treturn Region{tag.RegionID}, Low\n\t}\n\treturn Region{_ZZ}, No // TODO: return world instead of undetermined?\n}\n\n// Variants returns the variants specified explicitly for this language tag.\n// or nil if no variant was specified.\nfunc (t Tag) Variants() []Variant {\n\tif !compact.Tag(t).MayHaveVariants() {\n\t\treturn nil\n\t}\n\tv := []Variant{}\n\tx, str := \"\", t.tag().Variants()\n\tfor str != \"\" {\n\t\tx, str = nextToken(str)\n\t\tv = append(v, Variant{x})\n\t}\n\treturn v\n}\n\n// Parent returns the CLDR parent of t. In CLDR, missing fields in data for a\n// specific language are substituted with fields from the parent language.\n// The parent for a language may change for newer versions of CLDR.\n//\n// Parent returns a tag for a less specific language that is mutually\n// intelligible or Und if there is no such language. This may not be the same as\n// simply stripping the last BCP 47 subtag. For instance, the parent of \"zh-TW\"\n// is \"zh-Hant\", and the parent of \"zh-Hant\" is \"und\".\nfunc (t Tag) Parent() Tag {\n\treturn Tag(compact.Tag(t).Parent())\n}\n\n// nextToken returns token t and the rest of the string.\nfunc nextToken(s string) (t, tail string) {\n\tp := strings.Index(s[1:], \"-\")\n\tif p == -1 {\n\t\treturn s[1:], \"\"\n\t}\n\tp++\n\treturn s[1:p], s[p:]\n}\n\n// Extension is a single BCP 47 extension.\ntype Extension struct {\n\ts string\n}\n\n// String returns the string representation of the extension, including the\n// type tag.\nfunc (e Extension) String() string {\n\treturn e.s\n}\n\n// ParseExtension parses s as an extension and returns it on success.\nfunc ParseExtension(s string) (e Extension, err error) {\n\text, err := language.ParseExtension(s)\n\treturn Extension{ext}, err\n}\n\n// Type returns the one-byte extension type of e. It returns 0 for the zero\n// exception.\nfunc (e Extension) Type() byte {\n\tif e.s == \"\" {\n\t\treturn 0\n\t}\n\treturn e.s[0]\n}\n\n// Tokens returns the list of tokens of e.\nfunc (e Extension) Tokens() []string {\n\treturn strings.Split(e.s, \"-\")\n}\n\n// Extension returns the extension of type x for tag t. It will return\n// false for ok if t does not have the requested extension. The returned\n// extension will be invalid in this case.\nfunc (t Tag) Extension(x byte) (ext Extension, ok bool) {\n\tif !compact.Tag(t).MayHaveExtensions() {\n\t\treturn Extension{}, false\n\t}\n\te, ok := t.tag().Extension(x)\n\treturn Extension{e}, ok\n}\n\n// Extensions returns all extensions of t.\nfunc (t Tag) Extensions() []Extension {\n\tif !compact.Tag(t).MayHaveExtensions() {\n\t\treturn nil\n\t}\n\te := []Extension{}\n\tfor _, ext := range t.tag().Extensions() {\n\t\te = append(e, Extension{ext})\n\t}\n\treturn e\n}\n\n// TypeForKey returns the type associated with the given key, where key and type\n// are of the allowed values defined for the Unicode locale extension ('u') in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// TypeForKey will traverse the inheritance chain to get the correct value.\n//\n// If there are multiple types associated with a key, only the first will be\n// returned. If there is no type associated with a key, it returns the empty\n// string.\nfunc (t Tag) TypeForKey(key string) string {\n\tif !compact.Tag(t).MayHaveExtensions() {\n\t\tif key != \"rg\" && key != \"va\" {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\treturn t.tag().TypeForKey(key)\n}\n\n// SetTypeForKey returns a new Tag with the key set to type, where key and type\n// are of the allowed values defined for the Unicode locale extension ('u') in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// An empty value removes an existing pair with the same key.\nfunc (t Tag) SetTypeForKey(key, value string) (Tag, error) {\n\ttt, err := t.tag().SetTypeForKey(key, value)\n\treturn makeTag(tt), err\n}\n\n// NumCompactTags is the number of compact tags. The maximum tag is\n// NumCompactTags-1.\nconst NumCompactTags = compact.NumCompactTags\n\n// CompactIndex returns an index, where 0 <= index < NumCompactTags, for tags\n// for which data exists in the text repository.The index will change over time\n// and should not be stored in persistent storage. If t does not match a compact\n// index, exact will be false and the compact index will be returned for the\n// first match after repeatedly taking the Parent of t.\nfunc CompactIndex(t Tag) (index int, exact bool) {\n\tid, exact := compact.LanguageID(compact.Tag(t))\n\treturn int(id), exact\n}\n\nvar root = language.Tag{}\n\n// Base is an ISO 639 language code, used for encoding the base language\n// of a language tag.\ntype Base struct {\n\tlangID language.Language\n}\n\n// ParseBase parses a 2- or 3-letter ISO 639 code.\n// It returns a ValueError if s is a well-formed but unknown language identifier\n// or another error if another error occurred.\nfunc ParseBase(s string) (Base, error) {\n\tl, err := language.ParseBase(s)\n\treturn Base{l}, err\n}\n\n// String returns the BCP 47 representation of the base language.\nfunc (b Base) String() string {\n\treturn b.langID.String()\n}\n\n// ISO3 returns the ISO 639-3 language code.\nfunc (b Base) ISO3() string {\n\treturn b.langID.ISO3()\n}\n\n// IsPrivateUse reports whether this language code is reserved for private use.\nfunc (b Base) IsPrivateUse() bool {\n\treturn b.langID.IsPrivateUse()\n}\n\n// Script is a 4-letter ISO 15924 code for representing scripts.\n// It is idiomatically represented in title case.\ntype Script struct {\n\tscriptID language.Script\n}\n\n// ParseScript parses a 4-letter ISO 15924 code.\n// It returns a ValueError if s is a well-formed but unknown script identifier\n// or another error if another error occurred.\nfunc ParseScript(s string) (Script, error) {\n\tsc, err := language.ParseScript(s)\n\treturn Script{sc}, err\n}\n\n// String returns the script code in title case.\n// It returns \"Zzzz\" for an unspecified script.\nfunc (s Script) String() string {\n\treturn s.scriptID.String()\n}\n\n// IsPrivateUse reports whether this script code is reserved for private use.\nfunc (s Script) IsPrivateUse() bool {\n\treturn s.scriptID.IsPrivateUse()\n}\n\n// Region is an ISO 3166-1 or UN M.49 code for representing countries and regions.\ntype Region struct {\n\tregionID language.Region\n}\n\n// EncodeM49 returns the Region for the given UN M.49 code.\n// It returns an error if r is not a valid code.\nfunc EncodeM49(r int) (Region, error) {\n\trid, err := language.EncodeM49(r)\n\treturn Region{rid}, err\n}\n\n// ParseRegion parses a 2- or 3-letter ISO 3166-1 or a UN M.49 code.\n// It returns a ValueError if s is a well-formed but unknown region identifier\n// or another error if another error occurred.\nfunc ParseRegion(s string) (Region, error) {\n\tr, err := language.ParseRegion(s)\n\treturn Region{r}, err\n}\n\n// String returns the BCP 47 representation for the region.\n// It returns \"ZZ\" for an unspecified region.\nfunc (r Region) String() string {\n\treturn r.regionID.String()\n}\n\n// ISO3 returns the 3-letter ISO code of r.\n// Note that not all regions have a 3-letter ISO code.\n// In such cases this method returns \"ZZZ\".\nfunc (r Region) ISO3() string {\n\treturn r.regionID.ISO3()\n}\n\n// M49 returns the UN M.49 encoding of r, or 0 if this encoding\n// is not defined for r.\nfunc (r Region) M49() int {\n\treturn r.regionID.M49()\n}\n\n// IsPrivateUse reports whether r has the ISO 3166 User-assigned status. This\n// may include private-use tags that are assigned by CLDR and used in this\n// implementation. So IsPrivateUse and IsCountry can be simultaneously true.\nfunc (r Region) IsPrivateUse() bool {\n\treturn r.regionID.IsPrivateUse()\n}\n\n// IsCountry returns whether this region is a country or autonomous area. This\n// includes non-standard definitions from CLDR.\nfunc (r Region) IsCountry() bool {\n\treturn r.regionID.IsCountry()\n}\n\n// IsGroup returns whether this region defines a collection of regions. This\n// includes non-standard definitions from CLDR.\nfunc (r Region) IsGroup() bool {\n\treturn r.regionID.IsGroup()\n}\n\n// Contains returns whether Region c is contained by Region r. It returns true\n// if c == r.\nfunc (r Region) Contains(c Region) bool {\n\treturn r.regionID.Contains(c.regionID)\n}\n\n// TLD returns the country code top-level domain (ccTLD). UK is returned for GB.\n// In all other cases it returns either the region itself or an error.\n//\n// This method may return an error for a region for which there exists a\n// canonical form with a ccTLD. To get that ccTLD canonicalize r first. The\n// region will already be canonicalized it was obtained from a Tag that was\n// obtained using any of the default methods.\nfunc (r Region) TLD() (Region, error) {\n\ttld, err := r.regionID.TLD()\n\treturn Region{tld}, err\n}\n\n// Canonicalize returns the region or a possible replacement if the region is\n// deprecated. It will not return a replacement for deprecated regions that\n// are split into multiple regions.\nfunc (r Region) Canonicalize() Region {\n\treturn Region{r.regionID.Canonicalize()}\n}\n\n// Variant represents a registered variant of a language as defined by BCP 47.\ntype Variant struct {\n\tvariant string\n}\n\n// ParseVariant parses and returns a Variant. An error is returned if s is not\n// a valid variant.\nfunc ParseVariant(s string) (Variant, error) {\n\tv, err := language.ParseVariant(s)\n\treturn Variant{v.String()}, err\n}\n\n// String returns the string representation of the variant.\nfunc (v Variant) String() string {\n\treturn v.variant\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/match.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/language\"\n)\n\n// A MatchOption configures a Matcher.\ntype MatchOption func(*matcher)\n\n// PreferSameScript will, in the absence of a match, result in the first\n// preferred tag with the same script as a supported tag to match this supported\n// tag. The default is currently true, but this may change in the future.\nfunc PreferSameScript(preferSame bool) MatchOption {\n\treturn func(m *matcher) { m.preferSameScript = preferSame }\n}\n\n// TODO(v1.0.0): consider making Matcher a concrete type, instead of interface.\n// There doesn't seem to be too much need for multiple types.\n// Making it a concrete type allows MatchStrings to be a method, which will\n// improve its discoverability.\n\n// MatchStrings parses and matches the given strings until one of them matches\n// the language in the Matcher. A string may be an Accept-Language header as\n// handled by ParseAcceptLanguage. The default language is returned if no\n// other language matched.\nfunc MatchStrings(m Matcher, lang ...string) (tag Tag, index int) {\n\tfor _, accept := range lang {\n\t\tdesired, _, err := ParseAcceptLanguage(accept)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tif tag, index, conf := m.Match(desired...); conf != No {\n\t\t\treturn tag, index\n\t\t}\n\t}\n\ttag, index, _ = m.Match()\n\treturn\n}\n\n// Matcher is the interface that wraps the Match method.\n//\n// Match returns the best match for any of the given tags, along with\n// a unique index associated with the returned tag and a confidence\n// score.\ntype Matcher interface {\n\tMatch(t ...Tag) (tag Tag, index int, c Confidence)\n}\n\n// Comprehends reports the confidence score for a speaker of a given language\n// to being able to comprehend the written form of an alternative language.\nfunc Comprehends(speaker, alternative Tag) Confidence {\n\t_, _, c := NewMatcher([]Tag{alternative}).Match(speaker)\n\treturn c\n}\n\n// NewMatcher returns a Matcher that matches an ordered list of preferred tags\n// against a list of supported tags based on written intelligibility, closeness\n// of dialect, equivalence of subtags and various other rules. It is initialized\n// with the list of supported tags. The first element is used as the default\n// value in case no match is found.\n//\n// Its Match method matches the first of the given Tags to reach a certain\n// confidence threshold. The tags passed to Match should therefore be specified\n// in order of preference. Extensions are ignored for matching.\n//\n// The index returned by the Match method corresponds to the index of the\n// matched tag in t, but is augmented with the Unicode extension ('u')of the\n// corresponding preferred tag. This allows user locale options to be passed\n// transparently.\nfunc NewMatcher(t []Tag, options ...MatchOption) Matcher {\n\treturn newMatcher(t, options)\n}\n\nfunc (m *matcher) Match(want ...Tag) (t Tag, index int, c Confidence) {\n\tvar tt language.Tag\n\tmatch, w, c := m.getBest(want...)\n\tif match != nil {\n\t\ttt, index = match.tag, match.index\n\t} else {\n\t\t// TODO: this should be an option\n\t\ttt = m.default_.tag\n\t\tif m.preferSameScript {\n\t\touter:\n\t\t\tfor _, w := range want {\n\t\t\t\tscript, _ := w.Script()\n\t\t\t\tif script.scriptID == 0 {\n\t\t\t\t\t// Don't do anything if there is no script, such as with\n\t\t\t\t\t// private subtags.\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor i, h := range m.supported {\n\t\t\t\t\tif script.scriptID == h.maxScript {\n\t\t\t\t\t\ttt, index = h.tag, i\n\t\t\t\t\t\tbreak outer\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// TODO: select first language tag based on script.\n\t}\n\tif w.RegionID != tt.RegionID && w.RegionID != 0 {\n\t\tif w.RegionID != 0 && tt.RegionID != 0 && tt.RegionID.Contains(w.RegionID) {\n\t\t\ttt.RegionID = w.RegionID\n\t\t\ttt.RemakeString()\n\t\t} else if r := w.RegionID.String(); len(r) == 2 {\n\t\t\t// TODO: also filter macro and deprecated.\n\t\t\ttt, _ = tt.SetTypeForKey(\"rg\", strings.ToLower(r)+\"zzzz\")\n\t\t}\n\t}\n\t// Copy options from the user-provided tag into the result tag. This is hard\n\t// to do after the fact, so we do it here.\n\t// TODO: add in alternative variants to -u-va-.\n\t// TODO: add preferred region to -u-rg-.\n\tif e := w.Extensions(); len(e) > 0 {\n\t\tb := language.Builder{}\n\t\tb.SetTag(tt)\n\t\tfor _, e := range e {\n\t\t\tb.AddExt(e)\n\t\t}\n\t\ttt = b.Make()\n\t}\n\treturn makeTag(tt), index, c\n}\n\n// ErrMissingLikelyTagsData indicates no information was available\n// to compute likely values of missing tags.\nvar ErrMissingLikelyTagsData = errors.New(\"missing likely tags data\")\n\n// func (t *Tag) setTagsFrom(id Tag) {\n// \tt.LangID = id.LangID\n// \tt.ScriptID = id.ScriptID\n// \tt.RegionID = id.RegionID\n// }\n\n// Tag Matching\n// CLDR defines an algorithm for finding the best match between two sets of language\n// tags. The basic algorithm defines how to score a possible match and then find\n// the match with the best score\n// (see https://www.unicode.org/reports/tr35/#LanguageMatching).\n// Using scoring has several disadvantages. The scoring obfuscates the importance of\n// the various factors considered, making the algorithm harder to understand. Using\n// scoring also requires the full score to be computed for each pair of tags.\n//\n// We will use a different algorithm which aims to have the following properties:\n// - clarity on the precedence of the various selection factors, and\n// - improved performance by allowing early termination of a comparison.\n//\n// Matching algorithm (overview)\n// Input:\n//   - supported: a set of supported tags\n//   - default:   the default tag to return in case there is no match\n//   - desired:   list of desired tags, ordered by preference, starting with\n//                the most-preferred.\n//\n// Algorithm:\n//   1) Set the best match to the lowest confidence level\n//   2) For each tag in \"desired\":\n//     a) For each tag in \"supported\":\n//        1) compute the match between the two tags.\n//        2) if the match is better than the previous best match, replace it\n//           with the new match. (see next section)\n//     b) if the current best match is Exact and pin is true the result will be\n//        frozen to the language found thusfar, although better matches may\n//        still be found for the same language.\n//   3) If the best match so far is below a certain threshold, return \"default\".\n//\n// Ranking:\n// We use two phases to determine whether one pair of tags are a better match\n// than another pair of tags. First, we determine a rough confidence level. If the\n// levels are different, the one with the highest confidence wins.\n// Second, if the rough confidence levels are identical, we use a set of tie-breaker\n// rules.\n//\n// The confidence level of matching a pair of tags is determined by finding the\n// lowest confidence level of any matches of the corresponding subtags (the\n// result is deemed as good as its weakest link).\n// We define the following levels:\n//   Exact    - An exact match of a subtag, before adding likely subtags.\n//   MaxExact - An exact match of a subtag, after adding likely subtags.\n//              [See Note 2].\n//   High     - High level of mutual intelligibility between different subtag\n//              variants.\n//   Low      - Low level of mutual intelligibility between different subtag\n//              variants.\n//   No       - No mutual intelligibility.\n//\n// The following levels can occur for each type of subtag:\n//   Base:    Exact, MaxExact, High, Low, No\n//   Script:  Exact, MaxExact [see Note 3], Low, No\n//   Region:  Exact, MaxExact, High\n//   Variant: Exact, High\n//   Private: Exact, No\n//\n// Any result with a confidence level of Low or higher is deemed a possible match.\n// Once a desired tag matches any of the supported tags with a level of MaxExact\n// or higher, the next desired tag is not considered (see Step 2.b).\n// Note that CLDR provides languageMatching data that defines close equivalence\n// classes for base languages, scripts and regions.\n//\n// Tie-breaking\n// If we get the same confidence level for two matches, we apply a sequence of\n// tie-breaking rules. The first that succeeds defines the result. The rules are\n// applied in the following order.\n//   1) Original language was defined and was identical.\n//   2) Original region was defined and was identical.\n//   3) Distance between two maximized regions was the smallest.\n//   4) Original script was defined and was identical.\n//   5) Distance from want tag to have tag using the parent relation [see Note 5.]\n// If there is still no winner after these rules are applied, the first match\n// found wins.\n//\n// Notes:\n// [2] In practice, as matching of Exact is done in a separate phase from\n//     matching the other levels, we reuse the Exact level to mean MaxExact in\n//     the second phase. As a consequence, we only need the levels defined by\n//     the Confidence type. The MaxExact confidence level is mapped to High in\n//     the public API.\n// [3] We do not differentiate between maximized script values that were derived\n//     from suppressScript versus most likely tag data. We determined that in\n//     ranking the two, one ranks just after the other. Moreover, the two cannot\n//     occur concurrently. As a consequence, they are identical for practical\n//     purposes.\n// [4] In case of deprecated, macro-equivalents and legacy mappings, we assign\n//     the MaxExact level to allow iw vs he to still be a closer match than\n//     en-AU vs en-US, for example.\n// [5] In CLDR a locale inherits fields that are unspecified for this locale\n//     from its parent. Therefore, if a locale is a parent of another locale,\n//     it is a strong measure for closeness, especially when no other tie\n//     breaker rule applies. One could also argue it is inconsistent, for\n//     example, when pt-AO matches pt (which CLDR equates with pt-BR), even\n//     though its parent is pt-PT according to the inheritance rules.\n//\n// Implementation Details:\n// There are several performance considerations worth pointing out. Most notably,\n// we preprocess as much as possible (within reason) at the time of creation of a\n// matcher. This includes:\n//   - creating a per-language map, which includes data for the raw base language\n//     and its canonicalized variant (if applicable),\n//   - expanding entries for the equivalence classes defined in CLDR's\n//     languageMatch data.\n// The per-language map ensures that typically only a very small number of tags\n// need to be considered. The pre-expansion of canonicalized subtags and\n// equivalence classes reduces the amount of map lookups that need to be done at\n// runtime.\n\n// matcher keeps a set of supported language tags, indexed by language.\ntype matcher struct {\n\tdefault_         *haveTag\n\tsupported        []*haveTag\n\tindex            map[language.Language]*matchHeader\n\tpassSettings     bool\n\tpreferSameScript bool\n}\n\n// matchHeader has the lists of tags for exact matches and matches based on\n// maximized and canonicalized tags for a given language.\ntype matchHeader struct {\n\thaveTags []*haveTag\n\toriginal bool\n}\n\n// haveTag holds a supported Tag and its maximized script and region. The maximized\n// or canonicalized language is not stored as it is not needed during matching.\ntype haveTag struct {\n\ttag language.Tag\n\n\t// index of this tag in the original list of supported tags.\n\tindex int\n\n\t// conf is the maximum confidence that can result from matching this haveTag.\n\t// When conf < Exact this means it was inserted after applying a CLDR equivalence rule.\n\tconf Confidence\n\n\t// Maximized region and script.\n\tmaxRegion language.Region\n\tmaxScript language.Script\n\n\t// altScript may be checked as an alternative match to maxScript. If altScript\n\t// matches, the confidence level for this match is Low. Theoretically there\n\t// could be multiple alternative scripts. This does not occur in practice.\n\taltScript language.Script\n\n\t// nextMax is the index of the next haveTag with the same maximized tags.\n\tnextMax uint16\n}\n\nfunc makeHaveTag(tag language.Tag, index int) (haveTag, language.Language) {\n\tmax := tag\n\tif tag.LangID != 0 || tag.RegionID != 0 || tag.ScriptID != 0 {\n\t\tmax, _ = canonicalize(All, max)\n\t\tmax, _ = max.Maximize()\n\t\tmax.RemakeString()\n\t}\n\treturn haveTag{tag, index, Exact, max.RegionID, max.ScriptID, altScript(max.LangID, max.ScriptID), 0}, max.LangID\n}\n\n// altScript returns an alternative script that may match the given script with\n// a low confidence.  At the moment, the langMatch data allows for at most one\n// script to map to another and we rely on this to keep the code simple.\nfunc altScript(l language.Language, s language.Script) language.Script {\n\tfor _, alt := range matchScript {\n\t\t// TODO: also match cases where language is not the same.\n\t\tif (language.Language(alt.wantLang) == l || language.Language(alt.haveLang) == l) &&\n\t\t\tlanguage.Script(alt.haveScript) == s {\n\t\t\treturn language.Script(alt.wantScript)\n\t\t}\n\t}\n\treturn 0\n}\n\n// addIfNew adds a haveTag to the list of tags only if it is a unique tag.\n// Tags that have the same maximized values are linked by index.\nfunc (h *matchHeader) addIfNew(n haveTag, exact bool) {\n\th.original = h.original || exact\n\t// Don't add new exact matches.\n\tfor _, v := range h.haveTags {\n\t\tif equalsRest(v.tag, n.tag) {\n\t\t\treturn\n\t\t}\n\t}\n\t// Allow duplicate maximized tags, but create a linked list to allow quickly\n\t// comparing the equivalents and bail out.\n\tfor i, v := range h.haveTags {\n\t\tif v.maxScript == n.maxScript &&\n\t\t\tv.maxRegion == n.maxRegion &&\n\t\t\tv.tag.VariantOrPrivateUseTags() == n.tag.VariantOrPrivateUseTags() {\n\t\t\tfor h.haveTags[i].nextMax != 0 {\n\t\t\t\ti = int(h.haveTags[i].nextMax)\n\t\t\t}\n\t\t\th.haveTags[i].nextMax = uint16(len(h.haveTags))\n\t\t\tbreak\n\t\t}\n\t}\n\th.haveTags = append(h.haveTags, &n)\n}\n\n// header returns the matchHeader for the given language. It creates one if\n// it doesn't already exist.\nfunc (m *matcher) header(l language.Language) *matchHeader {\n\tif h := m.index[l]; h != nil {\n\t\treturn h\n\t}\n\th := &matchHeader{}\n\tm.index[l] = h\n\treturn h\n}\n\nfunc toConf(d uint8) Confidence {\n\tif d <= 10 {\n\t\treturn High\n\t}\n\tif d < 30 {\n\t\treturn Low\n\t}\n\treturn No\n}\n\n// newMatcher builds an index for the given supported tags and returns it as\n// a matcher. It also expands the index by considering various equivalence classes\n// for a given tag.\nfunc newMatcher(supported []Tag, options []MatchOption) *matcher {\n\tm := &matcher{\n\t\tindex:            make(map[language.Language]*matchHeader),\n\t\tpreferSameScript: true,\n\t}\n\tfor _, o := range options {\n\t\to(m)\n\t}\n\tif len(supported) == 0 {\n\t\tm.default_ = &haveTag{}\n\t\treturn m\n\t}\n\t// Add supported languages to the index. Add exact matches first to give\n\t// them precedence.\n\tfor i, tag := range supported {\n\t\ttt := tag.tag()\n\t\tpair, _ := makeHaveTag(tt, i)\n\t\tm.header(tt.LangID).addIfNew(pair, true)\n\t\tm.supported = append(m.supported, &pair)\n\t}\n\tm.default_ = m.header(supported[0].lang()).haveTags[0]\n\t// Keep these in two different loops to support the case that two equivalent\n\t// languages are distinguished, such as iw and he.\n\tfor i, tag := range supported {\n\t\ttt := tag.tag()\n\t\tpair, max := makeHaveTag(tt, i)\n\t\tif max != tt.LangID {\n\t\t\tm.header(max).addIfNew(pair, true)\n\t\t}\n\t}\n\n\t// update is used to add indexes in the map for equivalent languages.\n\t// update will only add entries to original indexes, thus not computing any\n\t// transitive relations.\n\tupdate := func(want, have uint16, conf Confidence) {\n\t\tif hh := m.index[language.Language(have)]; hh != nil {\n\t\t\tif !hh.original {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thw := m.header(language.Language(want))\n\t\t\tfor _, ht := range hh.haveTags {\n\t\t\t\tv := *ht\n\t\t\t\tif conf < v.conf {\n\t\t\t\t\tv.conf = conf\n\t\t\t\t}\n\t\t\t\tv.nextMax = 0 // this value needs to be recomputed\n\t\t\t\tif v.altScript != 0 {\n\t\t\t\t\tv.altScript = altScript(language.Language(want), v.maxScript)\n\t\t\t\t}\n\t\t\t\thw.addIfNew(v, conf == Exact && hh.original)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add entries for languages with mutual intelligibility as defined by CLDR's\n\t// languageMatch data.\n\tfor _, ml := range matchLang {\n\t\tupdate(ml.want, ml.have, toConf(ml.distance))\n\t\tif !ml.oneway {\n\t\t\tupdate(ml.have, ml.want, toConf(ml.distance))\n\t\t}\n\t}\n\n\t// Add entries for possible canonicalizations. This is an optimization to\n\t// ensure that only one map lookup needs to be done at runtime per desired tag.\n\t// First we match deprecated equivalents. If they are perfect equivalents\n\t// (their canonicalization simply substitutes a different language code, but\n\t// nothing else), the match confidence is Exact, otherwise it is High.\n\tfor i, lm := range language.AliasMap {\n\t\t// If deprecated codes match and there is no fiddling with the script\n\t\t// or region, we consider it an exact match.\n\t\tconf := Exact\n\t\tif language.AliasTypes[i] != language.Macro {\n\t\t\tif !isExactEquivalent(language.Language(lm.From)) {\n\t\t\t\tconf = High\n\t\t\t}\n\t\t\tupdate(lm.To, lm.From, conf)\n\t\t}\n\t\tupdate(lm.From, lm.To, conf)\n\t}\n\treturn m\n}\n\n// getBest gets the best matching tag in m for any of the given tags, taking into\n// account the order of preference of the given tags.\nfunc (m *matcher) getBest(want ...Tag) (got *haveTag, orig language.Tag, c Confidence) {\n\tbest := bestMatch{}\n\tfor i, ww := range want {\n\t\tw := ww.tag()\n\t\tvar max language.Tag\n\t\t// Check for exact match first.\n\t\th := m.index[w.LangID]\n\t\tif w.LangID != 0 {\n\t\t\tif h == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Base language is defined.\n\t\t\tmax, _ = canonicalize(Legacy|Deprecated|Macro, w)\n\t\t\t// A region that is added through canonicalization is stronger than\n\t\t\t// a maximized region: set it in the original (e.g. mo -> ro-MD).\n\t\t\tif w.RegionID != max.RegionID {\n\t\t\t\tw.RegionID = max.RegionID\n\t\t\t}\n\t\t\t// TODO: should we do the same for scripts?\n\t\t\t// See test case: en, sr, nl ; sh ; sr\n\t\t\tmax, _ = max.Maximize()\n\t\t} else {\n\t\t\t// Base language is not defined.\n\t\t\tif h != nil {\n\t\t\t\tfor i := range h.haveTags {\n\t\t\t\t\thave := h.haveTags[i]\n\t\t\t\t\tif equalsRest(have.tag, w) {\n\t\t\t\t\t\treturn have, w, Exact\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif w.ScriptID == 0 && w.RegionID == 0 {\n\t\t\t\t// We skip all tags matching und for approximate matching, including\n\t\t\t\t// private tags.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmax, _ = w.Maximize()\n\t\t\tif h = m.index[max.LangID]; h == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tpin := true\n\t\tfor _, t := range want[i+1:] {\n\t\t\tif w.LangID == t.lang() {\n\t\t\t\tpin = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Check for match based on maximized tag.\n\t\tfor i := range h.haveTags {\n\t\t\thave := h.haveTags[i]\n\t\t\tbest.update(have, w, max.ScriptID, max.RegionID, pin)\n\t\t\tif best.conf == Exact {\n\t\t\t\tfor have.nextMax != 0 {\n\t\t\t\t\thave = h.haveTags[have.nextMax]\n\t\t\t\t\tbest.update(have, w, max.ScriptID, max.RegionID, pin)\n\t\t\t\t}\n\t\t\t\treturn best.have, best.want, best.conf\n\t\t\t}\n\t\t}\n\t}\n\tif best.conf <= No {\n\t\tif len(want) != 0 {\n\t\t\treturn nil, want[0].tag(), No\n\t\t}\n\t\treturn nil, language.Tag{}, No\n\t}\n\treturn best.have, best.want, best.conf\n}\n\n// bestMatch accumulates the best match so far.\ntype bestMatch struct {\n\thave            *haveTag\n\twant            language.Tag\n\tconf            Confidence\n\tpinnedRegion    language.Region\n\tpinLanguage     bool\n\tsameRegionGroup bool\n\t// Cached results from applying tie-breaking rules.\n\torigLang     bool\n\torigReg      bool\n\tparadigmReg  bool\n\tregGroupDist uint8\n\torigScript   bool\n}\n\n// update updates the existing best match if the new pair is considered to be a\n// better match. To determine if the given pair is a better match, it first\n// computes the rough confidence level. If this surpasses the current match, it\n// will replace it and update the tie-breaker rule cache. If there is a tie, it\n// proceeds with applying a series of tie-breaker rules. If there is no\n// conclusive winner after applying the tie-breaker rules, it leaves the current\n// match as the preferred match.\n//\n// If pin is true and have and tag are a strong match, it will henceforth only\n// consider matches for this language. This corresponds to the idea that most\n// users have a strong preference for the first defined language. A user can\n// still prefer a second language over a dialect of the preferred language by\n// explicitly specifying dialects, e.g. \"en, nl, en-GB\". In this case pin should\n// be false.\nfunc (m *bestMatch) update(have *haveTag, tag language.Tag, maxScript language.Script, maxRegion language.Region, pin bool) {\n\t// Bail if the maximum attainable confidence is below that of the current best match.\n\tc := have.conf\n\tif c < m.conf {\n\t\treturn\n\t}\n\t// Don't change the language once we already have found an exact match.\n\tif m.pinLanguage && tag.LangID != m.want.LangID {\n\t\treturn\n\t}\n\t// Pin the region group if we are comparing tags for the same language.\n\tif tag.LangID == m.want.LangID && m.sameRegionGroup {\n\t\t_, sameGroup := regionGroupDist(m.pinnedRegion, have.maxRegion, have.maxScript, m.want.LangID)\n\t\tif !sameGroup {\n\t\t\treturn\n\t\t}\n\t}\n\tif c == Exact && have.maxScript == maxScript {\n\t\t// If there is another language and then another entry of this language,\n\t\t// don't pin anything, otherwise pin the language.\n\t\tm.pinLanguage = pin\n\t}\n\tif equalsRest(have.tag, tag) {\n\t} else if have.maxScript != maxScript {\n\t\t// There is usually very little comprehension between different scripts.\n\t\t// In a few cases there may still be Low comprehension. This possibility\n\t\t// is pre-computed and stored in have.altScript.\n\t\tif Low < m.conf || have.altScript != maxScript {\n\t\t\treturn\n\t\t}\n\t\tc = Low\n\t} else if have.maxRegion != maxRegion {\n\t\tif High < c {\n\t\t\t// There is usually a small difference between languages across regions.\n\t\t\tc = High\n\t\t}\n\t}\n\n\t// We store the results of the computations of the tie-breaker rules along\n\t// with the best match. There is no need to do the checks once we determine\n\t// we have a winner, but we do still need to do the tie-breaker computations.\n\t// We use \"beaten\" to keep track if we still need to do the checks.\n\tbeaten := false // true if the new pair defeats the current one.\n\tif c != m.conf {\n\t\tif c < m.conf {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\t// Tie-breaker rules:\n\t// We prefer if the pre-maximized language was specified and identical.\n\torigLang := have.tag.LangID == tag.LangID && tag.LangID != 0\n\tif !beaten && m.origLang != origLang {\n\t\tif m.origLang {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\t// We prefer if the pre-maximized region was specified and identical.\n\torigReg := have.tag.RegionID == tag.RegionID && tag.RegionID != 0\n\tif !beaten && m.origReg != origReg {\n\t\tif m.origReg {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\tregGroupDist, sameGroup := regionGroupDist(have.maxRegion, maxRegion, maxScript, tag.LangID)\n\tif !beaten && m.regGroupDist != regGroupDist {\n\t\tif regGroupDist > m.regGroupDist {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\tparadigmReg := isParadigmLocale(tag.LangID, have.maxRegion)\n\tif !beaten && m.paradigmReg != paradigmReg {\n\t\tif !paradigmReg {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\t// Next we prefer if the pre-maximized script was specified and identical.\n\torigScript := have.tag.ScriptID == tag.ScriptID && tag.ScriptID != 0\n\tif !beaten && m.origScript != origScript {\n\t\tif m.origScript {\n\t\t\treturn\n\t\t}\n\t\tbeaten = true\n\t}\n\n\t// Update m to the newly found best match.\n\tif beaten {\n\t\tm.have = have\n\t\tm.want = tag\n\t\tm.conf = c\n\t\tm.pinnedRegion = maxRegion\n\t\tm.sameRegionGroup = sameGroup\n\t\tm.origLang = origLang\n\t\tm.origReg = origReg\n\t\tm.paradigmReg = paradigmReg\n\t\tm.origScript = origScript\n\t\tm.regGroupDist = regGroupDist\n\t}\n}\n\nfunc isParadigmLocale(lang language.Language, r language.Region) bool {\n\tfor _, e := range paradigmLocales {\n\t\tif language.Language(e[0]) == lang && (r == language.Region(e[1]) || r == language.Region(e[2])) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// regionGroupDist computes the distance between two regions based on their\n// CLDR grouping.\nfunc regionGroupDist(a, b language.Region, script language.Script, lang language.Language) (dist uint8, same bool) {\n\tconst defaultDistance = 4\n\n\taGroup := uint(regionToGroups[a]) << 1\n\tbGroup := uint(regionToGroups[b]) << 1\n\tfor _, ri := range matchRegion {\n\t\tif language.Language(ri.lang) == lang && (ri.script == 0 || language.Script(ri.script) == script) {\n\t\t\tgroup := uint(1 << (ri.group &^ 0x80))\n\t\t\tif 0x80&ri.group == 0 {\n\t\t\t\tif aGroup&bGroup&group != 0 { // Both regions are in the group.\n\t\t\t\t\treturn ri.distance, ri.distance == defaultDistance\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (aGroup|bGroup)&group == 0 { // Both regions are not in the group.\n\t\t\t\t\treturn ri.distance, ri.distance == defaultDistance\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn defaultDistance, true\n}\n\n// equalsRest compares everything except the language.\nfunc equalsRest(a, b language.Tag) bool {\n\t// TODO: don't include extensions in this comparison. To do this efficiently,\n\t// though, we should handle private tags separately.\n\treturn a.ScriptID == b.ScriptID && a.RegionID == b.RegionID && a.VariantOrPrivateUseTags() == b.VariantOrPrivateUseTags()\n}\n\n// isExactEquivalent returns true if canonicalizing the language will not alter\n// the script or region of a tag.\nfunc isExactEquivalent(l language.Language) bool {\n\tfor _, o := range notEquivalent {\n\t\tif o == l {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nvar notEquivalent []language.Language\n\nfunc init() {\n\t// Create a list of all languages for which canonicalization may alter the\n\t// script or region.\n\tfor _, lm := range language.AliasMap {\n\t\ttag := language.Tag{LangID: language.Language(lm.From)}\n\t\tif tag, _ = canonicalize(All, tag); tag.ScriptID != 0 || tag.RegionID != 0 {\n\t\t\tnotEquivalent = append(notEquivalent, language.Language(lm.From))\n\t\t}\n\t}\n\t// Maximize undefined regions of paradigm locales.\n\tfor i, v := range paradigmLocales {\n\t\tt := language.Tag{LangID: language.Language(v[0])}\n\t\tmax, _ := t.Maximize()\n\t\tif v[1] == 0 {\n\t\t\tparadigmLocales[i][1] = uint16(max.RegionID)\n\t\t}\n\t\tif v[2] == 0 {\n\t\t\tparadigmLocales[i][2] = uint16(max.RegionID)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/parse.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport (\n\t\"errors\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/text/internal/language\"\n)\n\n// ValueError is returned by any of the parsing functions when the\n// input is well-formed but the respective subtag is not recognized\n// as a valid value.\ntype ValueError interface {\n\terror\n\n\t// Subtag returns the subtag for which the error occurred.\n\tSubtag() string\n}\n\n// Parse parses the given BCP 47 string and returns a valid Tag. If parsing\n// failed it returns an error and any part of the tag that could be parsed.\n// If parsing succeeded but an unknown value was found, it returns\n// ValueError. The Tag returned in this case is just stripped of the unknown\n// value. All other values are preserved. It accepts tags in the BCP 47 format\n// and extensions to this standard defined in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// The resulting tag is canonicalized using the default canonicalization type.\nfunc Parse(s string) (t Tag, err error) {\n\treturn Default.Parse(s)\n}\n\n// Parse parses the given BCP 47 string and returns a valid Tag. If parsing\n// failed it returns an error and any part of the tag that could be parsed.\n// If parsing succeeded but an unknown value was found, it returns\n// ValueError. The Tag returned in this case is just stripped of the unknown\n// value. All other values are preserved. It accepts tags in the BCP 47 format\n// and extensions to this standard defined in\n// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.\n// The resulting tag is canonicalized using the canonicalization type c.\nfunc (c CanonType) Parse(s string) (t Tag, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tt = Tag{}\n\t\t\terr = language.ErrSyntax\n\t\t}\n\t}()\n\n\ttt, err := language.Parse(s)\n\tif err != nil {\n\t\treturn makeTag(tt), err\n\t}\n\ttt, changed := canonicalize(c, tt)\n\tif changed {\n\t\ttt.RemakeString()\n\t}\n\treturn makeTag(tt), nil\n}\n\n// Compose creates a Tag from individual parts, which may be of type Tag, Base,\n// Script, Region, Variant, []Variant, Extension, []Extension or error. If a\n// Base, Script or Region or slice of type Variant or Extension is passed more\n// than once, the latter will overwrite the former. Variants and Extensions are\n// accumulated, but if two extensions of the same type are passed, the latter\n// will replace the former. For -u extensions, though, the key-type pairs are\n// added, where later values overwrite older ones. A Tag overwrites all former\n// values and typically only makes sense as the first argument. The resulting\n// tag is returned after canonicalizing using the Default CanonType. If one or\n// more errors are encountered, one of the errors is returned.\nfunc Compose(part ...interface{}) (t Tag, err error) {\n\treturn Default.Compose(part...)\n}\n\n// Compose creates a Tag from individual parts, which may be of type Tag, Base,\n// Script, Region, Variant, []Variant, Extension, []Extension or error. If a\n// Base, Script or Region or slice of type Variant or Extension is passed more\n// than once, the latter will overwrite the former. Variants and Extensions are\n// accumulated, but if two extensions of the same type are passed, the latter\n// will replace the former. For -u extensions, though, the key-type pairs are\n// added, where later values overwrite older ones. A Tag overwrites all former\n// values and typically only makes sense as the first argument. The resulting\n// tag is returned after canonicalizing using CanonType c. If one or more errors\n// are encountered, one of the errors is returned.\nfunc (c CanonType) Compose(part ...interface{}) (t Tag, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\tt = Tag{}\n\t\t\terr = language.ErrSyntax\n\t\t}\n\t}()\n\n\tvar b language.Builder\n\tif err = update(&b, part...); err != nil {\n\t\treturn und, err\n\t}\n\tb.Tag, _ = canonicalize(c, b.Tag)\n\treturn makeTag(b.Make()), err\n}\n\nvar errInvalidArgument = errors.New(\"invalid Extension or Variant\")\n\nfunc update(b *language.Builder, part ...interface{}) (err error) {\n\tfor _, x := range part {\n\t\tswitch v := x.(type) {\n\t\tcase Tag:\n\t\t\tb.SetTag(v.tag())\n\t\tcase Base:\n\t\t\tb.Tag.LangID = v.langID\n\t\tcase Script:\n\t\t\tb.Tag.ScriptID = v.scriptID\n\t\tcase Region:\n\t\t\tb.Tag.RegionID = v.regionID\n\t\tcase Variant:\n\t\t\tif v.variant == \"\" {\n\t\t\t\terr = errInvalidArgument\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tb.AddVariant(v.variant)\n\t\tcase Extension:\n\t\t\tif v.s == \"\" {\n\t\t\t\terr = errInvalidArgument\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tb.SetExt(v.s)\n\t\tcase []Variant:\n\t\t\tb.ClearVariants()\n\t\t\tfor _, v := range v {\n\t\t\t\tb.AddVariant(v.variant)\n\t\t\t}\n\t\tcase []Extension:\n\t\t\tb.ClearExtensions()\n\t\t\tfor _, e := range v {\n\t\t\t\tb.SetExt(e.s)\n\t\t\t}\n\t\t// TODO: support parsing of raw strings based on morphology or just extensions?\n\t\tcase error:\n\t\t\tif v != nil {\n\t\t\t\terr = v\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\nvar errInvalidWeight = errors.New(\"ParseAcceptLanguage: invalid weight\")\nvar errTagListTooLarge = errors.New(\"tag list exceeds max length\")\n\n// ParseAcceptLanguage parses the contents of an Accept-Language header as\n// defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and\n// a list of corresponding quality weights. It is more permissive than RFC 2616\n// and may return non-nil slices even if the input is not valid.\n// The Tags will be sorted by highest weight first and then by first occurrence.\n// Tags with a weight of zero will be dropped. An error will be returned if the\n// input could not be parsed.\nfunc ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) {\n\tdefer func() {\n\t\tif recover() != nil {\n\t\t\ttag = nil\n\t\t\tq = nil\n\t\t\terr = language.ErrSyntax\n\t\t}\n\t}()\n\n\tif strings.Count(s, \"-\") > 1000 {\n\t\treturn nil, nil, errTagListTooLarge\n\t}\n\n\tvar entry string\n\tfor s != \"\" {\n\t\tif entry, s = split(s, ','); entry == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tentry, weight := split(entry, ';')\n\n\t\t// Scan the language.\n\t\tt, err := Parse(entry)\n\t\tif err != nil {\n\t\t\tid, ok := acceptFallback[entry]\n\t\t\tif !ok {\n\t\t\t\treturn nil, nil, err\n\t\t\t}\n\t\t\tt = makeTag(language.Tag{LangID: id})\n\t\t}\n\n\t\t// Scan the optional weight.\n\t\tw := 1.0\n\t\tif weight != \"\" {\n\t\t\tweight = consume(weight, 'q')\n\t\t\tweight = consume(weight, '=')\n\t\t\t// consume returns the empty string when a token could not be\n\t\t\t// consumed, resulting in an error for ParseFloat.\n\t\t\tif w, err = strconv.ParseFloat(weight, 32); err != nil {\n\t\t\t\treturn nil, nil, errInvalidWeight\n\t\t\t}\n\t\t\t// Drop tags with a quality weight of 0.\n\t\t\tif w <= 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\ttag = append(tag, t)\n\t\tq = append(q, float32(w))\n\t}\n\tsort.Stable(&tagSort{tag, q})\n\treturn tag, q, nil\n}\n\n// consume removes a leading token c from s and returns the result or the empty\n// string if there is no such token.\nfunc consume(s string, c byte) string {\n\tif s == \"\" || s[0] != c {\n\t\treturn \"\"\n\t}\n\treturn strings.TrimSpace(s[1:])\n}\n\nfunc split(s string, c byte) (head, tail string) {\n\tif i := strings.IndexByte(s, c); i >= 0 {\n\t\treturn strings.TrimSpace(s[:i]), strings.TrimSpace(s[i+1:])\n\t}\n\treturn strings.TrimSpace(s), \"\"\n}\n\n// Add hack mapping to deal with a small number of cases that occur\n// in Accept-Language (with reasonable frequency).\nvar acceptFallback = map[string]language.Language{\n\t\"english\": _en,\n\t\"deutsch\": _de,\n\t\"italian\": _it,\n\t\"french\":  _fr,\n\t\"*\":       _mul, // defined in the spec to match all languages.\n}\n\ntype tagSort struct {\n\ttag []Tag\n\tq   []float32\n}\n\nfunc (s *tagSort) Len() int {\n\treturn len(s.q)\n}\n\nfunc (s *tagSort) Less(i, j int) bool {\n\treturn s.q[i] > s.q[j]\n}\n\nfunc (s *tagSort) Swap(i, j int) {\n\ts.tag[i], s.tag[j] = s.tag[j], s.tag[i]\n\ts.q[i], s.q[j] = s.q[j], s.q[i]\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/tables.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage language\n\n// CLDRVersion is the CLDR version from which the tables in this package are derived.\nconst CLDRVersion = \"32\"\n\nconst (\n\t_de  = 269\n\t_en  = 313\n\t_fr  = 350\n\t_it  = 505\n\t_mo  = 784\n\t_no  = 879\n\t_nb  = 839\n\t_pt  = 960\n\t_sh  = 1031\n\t_mul = 806\n\t_und = 0\n)\nconst (\n\t_001 = 1\n\t_419 = 31\n\t_BR  = 65\n\t_CA  = 73\n\t_ES  = 111\n\t_GB  = 124\n\t_MD  = 189\n\t_PT  = 239\n\t_UK  = 307\n\t_US  = 310\n\t_ZZ  = 358\n\t_XA  = 324\n\t_XC  = 326\n\t_XK  = 334\n)\nconst (\n\t_Latn = 91\n\t_Hani = 57\n\t_Hans = 59\n\t_Hant = 60\n\t_Qaaa = 149\n\t_Qaai = 157\n\t_Qabx = 198\n\t_Zinh = 255\n\t_Zyyy = 260\n\t_Zzzz = 261\n)\n\nvar regionToGroups = []uint8{ // 359 elements\n\t// Entry 0 - 3F\n\t0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04,\n\t0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00,\n\t0x00, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00,\n\t0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04,\n\t// Entry 40 - 7F\n\t0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,\n\t0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00,\n\t0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04,\n\t// Entry 80 - BF\n\t0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n\t0x00, 0x00, 0x04, 0x01, 0x00, 0x04, 0x02, 0x00,\n\t0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x04,\n\t// Entry C0 - FF\n\t0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,\n\t0x01, 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00,\n\t0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t// Entry 100 - 13F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,\n\t0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00,\n\t0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04,\n\t0x00, 0x00, 0x04, 0x00, 0x04, 0x04, 0x05, 0x00,\n\t// Entry 140 - 17F\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n} // Size: 383 bytes\n\nvar paradigmLocales = [][3]uint16{ // 3 elements\n\t0: [3]uint16{0x139, 0x0, 0x7c},\n\t1: [3]uint16{0x13e, 0x0, 0x1f},\n\t2: [3]uint16{0x3c0, 0x41, 0xef},\n} // Size: 42 bytes\n\ntype mutualIntelligibility struct {\n\twant     uint16\n\thave     uint16\n\tdistance uint8\n\toneway   bool\n}\ntype scriptIntelligibility struct {\n\twantLang   uint16\n\thaveLang   uint16\n\twantScript uint8\n\thaveScript uint8\n\tdistance   uint8\n}\ntype regionIntelligibility struct {\n\tlang     uint16\n\tscript   uint8\n\tgroup    uint8\n\tdistance uint8\n}\n\n// matchLang holds pairs of langIDs of base languages that are typically\n// mutually intelligible. Each pair is associated with a confidence and\n// whether the intelligibility goes one or both ways.\nvar matchLang = []mutualIntelligibility{ // 113 elements\n\t0:   {want: 0x1d1, have: 0xb7, distance: 0x4, oneway: false},\n\t1:   {want: 0x407, have: 0xb7, distance: 0x4, oneway: false},\n\t2:   {want: 0x407, have: 0x1d1, distance: 0x4, oneway: false},\n\t3:   {want: 0x407, have: 0x432, distance: 0x4, oneway: false},\n\t4:   {want: 0x43a, have: 0x1, distance: 0x4, oneway: false},\n\t5:   {want: 0x1a3, have: 0x10d, distance: 0x4, oneway: true},\n\t6:   {want: 0x295, have: 0x10d, distance: 0x4, oneway: true},\n\t7:   {want: 0x101, have: 0x36f, distance: 0x8, oneway: false},\n\t8:   {want: 0x101, have: 0x347, distance: 0x8, oneway: false},\n\t9:   {want: 0x5, have: 0x3e2, distance: 0xa, oneway: true},\n\t10:  {want: 0xd, have: 0x139, distance: 0xa, oneway: true},\n\t11:  {want: 0x16, have: 0x367, distance: 0xa, oneway: true},\n\t12:  {want: 0x21, have: 0x139, distance: 0xa, oneway: true},\n\t13:  {want: 0x56, have: 0x13e, distance: 0xa, oneway: true},\n\t14:  {want: 0x58, have: 0x3e2, distance: 0xa, oneway: true},\n\t15:  {want: 0x71, have: 0x3e2, distance: 0xa, oneway: true},\n\t16:  {want: 0x75, have: 0x139, distance: 0xa, oneway: true},\n\t17:  {want: 0x82, have: 0x1be, distance: 0xa, oneway: true},\n\t18:  {want: 0xa5, have: 0x139, distance: 0xa, oneway: true},\n\t19:  {want: 0xb2, have: 0x15e, distance: 0xa, oneway: true},\n\t20:  {want: 0xdd, have: 0x153, distance: 0xa, oneway: true},\n\t21:  {want: 0xe5, have: 0x139, distance: 0xa, oneway: true},\n\t22:  {want: 0xe9, have: 0x3a, distance: 0xa, oneway: true},\n\t23:  {want: 0xf0, have: 0x15e, distance: 0xa, oneway: true},\n\t24:  {want: 0xf9, have: 0x15e, distance: 0xa, oneway: true},\n\t25:  {want: 0x100, have: 0x139, distance: 0xa, oneway: true},\n\t26:  {want: 0x130, have: 0x139, distance: 0xa, oneway: true},\n\t27:  {want: 0x13c, have: 0x139, distance: 0xa, oneway: true},\n\t28:  {want: 0x140, have: 0x151, distance: 0xa, oneway: true},\n\t29:  {want: 0x145, have: 0x13e, distance: 0xa, oneway: true},\n\t30:  {want: 0x158, have: 0x101, distance: 0xa, oneway: true},\n\t31:  {want: 0x16d, have: 0x367, distance: 0xa, oneway: true},\n\t32:  {want: 0x16e, have: 0x139, distance: 0xa, oneway: true},\n\t33:  {want: 0x16f, have: 0x139, distance: 0xa, oneway: true},\n\t34:  {want: 0x17e, have: 0x139, distance: 0xa, oneway: true},\n\t35:  {want: 0x190, have: 0x13e, distance: 0xa, oneway: true},\n\t36:  {want: 0x194, have: 0x13e, distance: 0xa, oneway: true},\n\t37:  {want: 0x1a4, have: 0x1be, distance: 0xa, oneway: true},\n\t38:  {want: 0x1b4, have: 0x139, distance: 0xa, oneway: true},\n\t39:  {want: 0x1b8, have: 0x139, distance: 0xa, oneway: true},\n\t40:  {want: 0x1d4, have: 0x15e, distance: 0xa, oneway: true},\n\t41:  {want: 0x1d7, have: 0x3e2, distance: 0xa, oneway: true},\n\t42:  {want: 0x1d9, have: 0x139, distance: 0xa, oneway: true},\n\t43:  {want: 0x1e7, have: 0x139, distance: 0xa, oneway: true},\n\t44:  {want: 0x1f8, have: 0x139, distance: 0xa, oneway: true},\n\t45:  {want: 0x20e, have: 0x1e1, distance: 0xa, oneway: true},\n\t46:  {want: 0x210, have: 0x139, distance: 0xa, oneway: true},\n\t47:  {want: 0x22d, have: 0x15e, distance: 0xa, oneway: true},\n\t48:  {want: 0x242, have: 0x3e2, distance: 0xa, oneway: true},\n\t49:  {want: 0x24a, have: 0x139, distance: 0xa, oneway: true},\n\t50:  {want: 0x251, have: 0x139, distance: 0xa, oneway: true},\n\t51:  {want: 0x265, have: 0x139, distance: 0xa, oneway: true},\n\t52:  {want: 0x274, have: 0x48a, distance: 0xa, oneway: true},\n\t53:  {want: 0x28a, have: 0x3e2, distance: 0xa, oneway: true},\n\t54:  {want: 0x28e, have: 0x1f9, distance: 0xa, oneway: true},\n\t55:  {want: 0x2a3, have: 0x139, distance: 0xa, oneway: true},\n\t56:  {want: 0x2b5, have: 0x15e, distance: 0xa, oneway: true},\n\t57:  {want: 0x2b8, have: 0x139, distance: 0xa, oneway: true},\n\t58:  {want: 0x2be, have: 0x139, distance: 0xa, oneway: true},\n\t59:  {want: 0x2c3, have: 0x15e, distance: 0xa, oneway: true},\n\t60:  {want: 0x2ed, have: 0x139, distance: 0xa, oneway: true},\n\t61:  {want: 0x2f1, have: 0x15e, distance: 0xa, oneway: true},\n\t62:  {want: 0x2fa, have: 0x139, distance: 0xa, oneway: true},\n\t63:  {want: 0x2ff, have: 0x7e, distance: 0xa, oneway: true},\n\t64:  {want: 0x304, have: 0x139, distance: 0xa, oneway: true},\n\t65:  {want: 0x30b, have: 0x3e2, distance: 0xa, oneway: true},\n\t66:  {want: 0x31b, have: 0x1be, distance: 0xa, oneway: true},\n\t67:  {want: 0x31f, have: 0x1e1, distance: 0xa, oneway: true},\n\t68:  {want: 0x320, have: 0x139, distance: 0xa, oneway: true},\n\t69:  {want: 0x331, have: 0x139, distance: 0xa, oneway: true},\n\t70:  {want: 0x351, have: 0x139, distance: 0xa, oneway: true},\n\t71:  {want: 0x36a, have: 0x347, distance: 0xa, oneway: false},\n\t72:  {want: 0x36a, have: 0x36f, distance: 0xa, oneway: true},\n\t73:  {want: 0x37a, have: 0x139, distance: 0xa, oneway: true},\n\t74:  {want: 0x387, have: 0x139, distance: 0xa, oneway: true},\n\t75:  {want: 0x389, have: 0x139, distance: 0xa, oneway: true},\n\t76:  {want: 0x38b, have: 0x15e, distance: 0xa, oneway: true},\n\t77:  {want: 0x390, have: 0x139, distance: 0xa, oneway: true},\n\t78:  {want: 0x395, have: 0x139, distance: 0xa, oneway: true},\n\t79:  {want: 0x39d, have: 0x139, distance: 0xa, oneway: true},\n\t80:  {want: 0x3a5, have: 0x139, distance: 0xa, oneway: true},\n\t81:  {want: 0x3be, have: 0x139, distance: 0xa, oneway: true},\n\t82:  {want: 0x3c4, have: 0x13e, distance: 0xa, oneway: true},\n\t83:  {want: 0x3d4, have: 0x10d, distance: 0xa, oneway: true},\n\t84:  {want: 0x3d9, have: 0x139, distance: 0xa, oneway: true},\n\t85:  {want: 0x3e5, have: 0x15e, distance: 0xa, oneway: true},\n\t86:  {want: 0x3e9, have: 0x1be, distance: 0xa, oneway: true},\n\t87:  {want: 0x3fa, have: 0x139, distance: 0xa, oneway: true},\n\t88:  {want: 0x40c, have: 0x139, distance: 0xa, oneway: true},\n\t89:  {want: 0x423, have: 0x139, distance: 0xa, oneway: true},\n\t90:  {want: 0x429, have: 0x139, distance: 0xa, oneway: true},\n\t91:  {want: 0x431, have: 0x139, distance: 0xa, oneway: true},\n\t92:  {want: 0x43b, have: 0x139, distance: 0xa, oneway: true},\n\t93:  {want: 0x43e, have: 0x1e1, distance: 0xa, oneway: true},\n\t94:  {want: 0x445, have: 0x139, distance: 0xa, oneway: true},\n\t95:  {want: 0x450, have: 0x139, distance: 0xa, oneway: true},\n\t96:  {want: 0x461, have: 0x139, distance: 0xa, oneway: true},\n\t97:  {want: 0x467, have: 0x3e2, distance: 0xa, oneway: true},\n\t98:  {want: 0x46f, have: 0x139, distance: 0xa, oneway: true},\n\t99:  {want: 0x476, have: 0x3e2, distance: 0xa, oneway: true},\n\t100: {want: 0x3883, have: 0x139, distance: 0xa, oneway: true},\n\t101: {want: 0x480, have: 0x139, distance: 0xa, oneway: true},\n\t102: {want: 0x482, have: 0x139, distance: 0xa, oneway: true},\n\t103: {want: 0x494, have: 0x3e2, distance: 0xa, oneway: true},\n\t104: {want: 0x49d, have: 0x139, distance: 0xa, oneway: true},\n\t105: {want: 0x4ac, have: 0x529, distance: 0xa, oneway: true},\n\t106: {want: 0x4b4, have: 0x139, distance: 0xa, oneway: true},\n\t107: {want: 0x4bc, have: 0x3e2, distance: 0xa, oneway: true},\n\t108: {want: 0x4e5, have: 0x15e, distance: 0xa, oneway: true},\n\t109: {want: 0x4f2, have: 0x139, distance: 0xa, oneway: true},\n\t110: {want: 0x512, have: 0x139, distance: 0xa, oneway: true},\n\t111: {want: 0x518, have: 0x139, distance: 0xa, oneway: true},\n\t112: {want: 0x52f, have: 0x139, distance: 0xa, oneway: true},\n} // Size: 702 bytes\n\n// matchScript holds pairs of scriptIDs where readers of one script\n// can typically also read the other. Each is associated with a confidence.\nvar matchScript = []scriptIntelligibility{ // 26 elements\n\t0:  {wantLang: 0x432, haveLang: 0x432, wantScript: 0x5b, haveScript: 0x20, distance: 0x5},\n\t1:  {wantLang: 0x432, haveLang: 0x432, wantScript: 0x20, haveScript: 0x5b, distance: 0x5},\n\t2:  {wantLang: 0x58, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},\n\t3:  {wantLang: 0xa5, haveLang: 0x139, wantScript: 0xe, haveScript: 0x5b, distance: 0xa},\n\t4:  {wantLang: 0x1d7, haveLang: 0x3e2, wantScript: 0x8, haveScript: 0x20, distance: 0xa},\n\t5:  {wantLang: 0x210, haveLang: 0x139, wantScript: 0x2e, haveScript: 0x5b, distance: 0xa},\n\t6:  {wantLang: 0x24a, haveLang: 0x139, wantScript: 0x4f, haveScript: 0x5b, distance: 0xa},\n\t7:  {wantLang: 0x251, haveLang: 0x139, wantScript: 0x53, haveScript: 0x5b, distance: 0xa},\n\t8:  {wantLang: 0x2b8, haveLang: 0x139, wantScript: 0x58, haveScript: 0x5b, distance: 0xa},\n\t9:  {wantLang: 0x304, haveLang: 0x139, wantScript: 0x6f, haveScript: 0x5b, distance: 0xa},\n\t10: {wantLang: 0x331, haveLang: 0x139, wantScript: 0x76, haveScript: 0x5b, distance: 0xa},\n\t11: {wantLang: 0x351, haveLang: 0x139, wantScript: 0x22, haveScript: 0x5b, distance: 0xa},\n\t12: {wantLang: 0x395, haveLang: 0x139, wantScript: 0x83, haveScript: 0x5b, distance: 0xa},\n\t13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5b, distance: 0xa},\n\t14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},\n\t15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},\n\t16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xd6, haveScript: 0x5b, distance: 0xa},\n\t17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xe6, haveScript: 0x5b, distance: 0xa},\n\t18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe9, haveScript: 0x5b, distance: 0xa},\n\t19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5b, distance: 0xa},\n\t20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},\n\t21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},\n\t22: {wantLang: 0x4bc, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},\n\t23: {wantLang: 0x512, haveLang: 0x139, wantScript: 0x3e, haveScript: 0x5b, distance: 0xa},\n\t24: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3b, haveScript: 0x3c, distance: 0xf},\n\t25: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3c, haveScript: 0x3b, distance: 0x13},\n} // Size: 232 bytes\n\nvar matchRegion = []regionIntelligibility{ // 15 elements\n\t0:  {lang: 0x3a, script: 0x0, group: 0x4, distance: 0x4},\n\t1:  {lang: 0x3a, script: 0x0, group: 0x84, distance: 0x4},\n\t2:  {lang: 0x139, script: 0x0, group: 0x1, distance: 0x4},\n\t3:  {lang: 0x139, script: 0x0, group: 0x81, distance: 0x4},\n\t4:  {lang: 0x13e, script: 0x0, group: 0x3, distance: 0x4},\n\t5:  {lang: 0x13e, script: 0x0, group: 0x83, distance: 0x4},\n\t6:  {lang: 0x3c0, script: 0x0, group: 0x3, distance: 0x4},\n\t7:  {lang: 0x3c0, script: 0x0, group: 0x83, distance: 0x4},\n\t8:  {lang: 0x529, script: 0x3c, group: 0x2, distance: 0x4},\n\t9:  {lang: 0x529, script: 0x3c, group: 0x82, distance: 0x4},\n\t10: {lang: 0x3a, script: 0x0, group: 0x80, distance: 0x5},\n\t11: {lang: 0x139, script: 0x0, group: 0x80, distance: 0x5},\n\t12: {lang: 0x13e, script: 0x0, group: 0x80, distance: 0x5},\n\t13: {lang: 0x3c0, script: 0x0, group: 0x80, distance: 0x5},\n\t14: {lang: 0x529, script: 0x3c, group: 0x80, distance: 0x5},\n} // Size: 114 bytes\n\n// Total table size 1473 bytes (1KiB); checksum: 7BB90B5C\n"
  },
  {
    "path": "vendor/golang.org/x/text/language/tags.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage language\n\nimport \"golang.org/x/text/internal/language/compact\"\n\n// TODO: Various sets of commonly use tags and regions.\n\n// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed.\n// It simplifies safe initialization of Tag values.\nfunc MustParse(s string) Tag {\n\tt, err := Parse(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}\n\n// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed.\n// It simplifies safe initialization of Tag values.\nfunc (c CanonType) MustParse(s string) Tag {\n\tt, err := c.Parse(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn t\n}\n\n// MustParseBase is like ParseBase, but panics if the given base cannot be parsed.\n// It simplifies safe initialization of Base values.\nfunc MustParseBase(s string) Base {\n\tb, err := ParseBase(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn b\n}\n\n// MustParseScript is like ParseScript, but panics if the given script cannot be\n// parsed. It simplifies safe initialization of Script values.\nfunc MustParseScript(s string) Script {\n\tscr, err := ParseScript(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn scr\n}\n\n// MustParseRegion is like ParseRegion, but panics if the given region cannot be\n// parsed. It simplifies safe initialization of Region values.\nfunc MustParseRegion(s string) Region {\n\tr, err := ParseRegion(s)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn r\n}\n\nvar (\n\tund = Tag{}\n\n\tUnd Tag = Tag{}\n\n\tAfrikaans            Tag = Tag(compact.Afrikaans)\n\tAmharic              Tag = Tag(compact.Amharic)\n\tArabic               Tag = Tag(compact.Arabic)\n\tModernStandardArabic Tag = Tag(compact.ModernStandardArabic)\n\tAzerbaijani          Tag = Tag(compact.Azerbaijani)\n\tBulgarian            Tag = Tag(compact.Bulgarian)\n\tBengali              Tag = Tag(compact.Bengali)\n\tCatalan              Tag = Tag(compact.Catalan)\n\tCzech                Tag = Tag(compact.Czech)\n\tDanish               Tag = Tag(compact.Danish)\n\tGerman               Tag = Tag(compact.German)\n\tGreek                Tag = Tag(compact.Greek)\n\tEnglish              Tag = Tag(compact.English)\n\tAmericanEnglish      Tag = Tag(compact.AmericanEnglish)\n\tBritishEnglish       Tag = Tag(compact.BritishEnglish)\n\tSpanish              Tag = Tag(compact.Spanish)\n\tEuropeanSpanish      Tag = Tag(compact.EuropeanSpanish)\n\tLatinAmericanSpanish Tag = Tag(compact.LatinAmericanSpanish)\n\tEstonian             Tag = Tag(compact.Estonian)\n\tPersian              Tag = Tag(compact.Persian)\n\tFinnish              Tag = Tag(compact.Finnish)\n\tFilipino             Tag = Tag(compact.Filipino)\n\tFrench               Tag = Tag(compact.French)\n\tCanadianFrench       Tag = Tag(compact.CanadianFrench)\n\tGujarati             Tag = Tag(compact.Gujarati)\n\tHebrew               Tag = Tag(compact.Hebrew)\n\tHindi                Tag = Tag(compact.Hindi)\n\tCroatian             Tag = Tag(compact.Croatian)\n\tHungarian            Tag = Tag(compact.Hungarian)\n\tArmenian             Tag = Tag(compact.Armenian)\n\tIndonesian           Tag = Tag(compact.Indonesian)\n\tIcelandic            Tag = Tag(compact.Icelandic)\n\tItalian              Tag = Tag(compact.Italian)\n\tJapanese             Tag = Tag(compact.Japanese)\n\tGeorgian             Tag = Tag(compact.Georgian)\n\tKazakh               Tag = Tag(compact.Kazakh)\n\tKhmer                Tag = Tag(compact.Khmer)\n\tKannada              Tag = Tag(compact.Kannada)\n\tKorean               Tag = Tag(compact.Korean)\n\tKirghiz              Tag = Tag(compact.Kirghiz)\n\tLao                  Tag = Tag(compact.Lao)\n\tLithuanian           Tag = Tag(compact.Lithuanian)\n\tLatvian              Tag = Tag(compact.Latvian)\n\tMacedonian           Tag = Tag(compact.Macedonian)\n\tMalayalam            Tag = Tag(compact.Malayalam)\n\tMongolian            Tag = Tag(compact.Mongolian)\n\tMarathi              Tag = Tag(compact.Marathi)\n\tMalay                Tag = Tag(compact.Malay)\n\tBurmese              Tag = Tag(compact.Burmese)\n\tNepali               Tag = Tag(compact.Nepali)\n\tDutch                Tag = Tag(compact.Dutch)\n\tNorwegian            Tag = Tag(compact.Norwegian)\n\tPunjabi              Tag = Tag(compact.Punjabi)\n\tPolish               Tag = Tag(compact.Polish)\n\tPortuguese           Tag = Tag(compact.Portuguese)\n\tBrazilianPortuguese  Tag = Tag(compact.BrazilianPortuguese)\n\tEuropeanPortuguese   Tag = Tag(compact.EuropeanPortuguese)\n\tRomanian             Tag = Tag(compact.Romanian)\n\tRussian              Tag = Tag(compact.Russian)\n\tSinhala              Tag = Tag(compact.Sinhala)\n\tSlovak               Tag = Tag(compact.Slovak)\n\tSlovenian            Tag = Tag(compact.Slovenian)\n\tAlbanian             Tag = Tag(compact.Albanian)\n\tSerbian              Tag = Tag(compact.Serbian)\n\tSerbianLatin         Tag = Tag(compact.SerbianLatin)\n\tSwedish              Tag = Tag(compact.Swedish)\n\tSwahili              Tag = Tag(compact.Swahili)\n\tTamil                Tag = Tag(compact.Tamil)\n\tTelugu               Tag = Tag(compact.Telugu)\n\tThai                 Tag = Tag(compact.Thai)\n\tTurkish              Tag = Tag(compact.Turkish)\n\tUkrainian            Tag = Tag(compact.Ukrainian)\n\tUrdu                 Tag = Tag(compact.Urdu)\n\tUzbek                Tag = Tag(compact.Uzbek)\n\tVietnamese           Tag = Tag(compact.Vietnamese)\n\tChinese              Tag = Tag(compact.Chinese)\n\tSimplifiedChinese    Tag = Tag(compact.SimplifiedChinese)\n\tTraditionalChinese   Tag = Tag(compact.TraditionalChinese)\n\tZulu                 Tag = Tag(compact.Zulu)\n)\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/catalog/catalog.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package catalog defines collections of translated format strings.\n//\n// This package mostly defines types for populating catalogs with messages. The\n// catmsg package contains further definitions for creating custom message and\n// dictionary types as well as packages that use Catalogs.\n//\n// Package catalog defines various interfaces: Dictionary, Loader, and Message.\n// A Dictionary maintains a set of translations of format strings for a single\n// language. The Loader interface defines a source of dictionaries. A\n// translation of a format string is represented by a Message.\n//\n// # Catalogs\n//\n// A Catalog defines a programmatic interface for setting message translations.\n// It maintains a set of per-language dictionaries with translations for a set\n// of keys. For message translation to function properly, a translation should\n// be defined for each key for each supported language. A dictionary may be\n// underspecified, though, if there is a parent language that already defines\n// the key. For example, a Dictionary for \"en-GB\" could leave out entries that\n// are identical to those in a dictionary for \"en\".\n//\n// # Messages\n//\n// A Message is a format string which varies on the value of substitution\n// variables. For instance, to indicate the number of results one could want \"no\n// results\" if there are none, \"1 result\" if there is 1, and \"%d results\" for\n// any other number. Catalog is agnostic to the kind of format strings that are\n// used: for instance, messages can follow either the printf-style substitution\n// from package fmt or use templates.\n//\n// A Message does not substitute arguments in the format string. This job is\n// reserved for packages that render strings, such as message, that use Catalogs\n// to selected string. This separation of concerns allows Catalog to be used to\n// store any kind of formatting strings.\n//\n// # Selecting messages based on linguistic features of substitution arguments\n//\n// Messages may vary based on any linguistic features of the argument values.\n// The most common one is plural form, but others exist.\n//\n// Selection messages are provided in packages that provide support for a\n// specific linguistic feature. The following snippet uses plural.Selectf:\n//\n//\tcatalog.Set(language.English, \"You are %d minute(s) late.\",\n//\t\tplural.Selectf(1, \"\",\n//\t\t\tplural.One, \"You are 1 minute late.\",\n//\t\t\tplural.Other, \"You are %d minutes late.\"))\n//\n// In this example, a message is stored in the Catalog where one of two messages\n// is selected based on the first argument, a number. The first message is\n// selected if the argument is singular (identified by the selector \"one\") and\n// the second message is selected in all other cases. The selectors are defined\n// by the plural rules defined in CLDR. The selector \"other\" is special and will\n// always match. Each language always defines one of the linguistic categories\n// to be \"other.\" For English, singular is \"one\" and plural is \"other\".\n//\n// Selects can be nested. This allows selecting sentences based on features of\n// multiple arguments or multiple linguistic properties of a single argument.\n//\n// # String interpolation\n//\n// There is often a lot of commonality between the possible variants of a\n// message. For instance, in the example above the word \"minute\" varies based on\n// the plural catogory of the argument, but the rest of the sentence is\n// identical. Using interpolation the above message can be rewritten as:\n//\n//\tcatalog.Set(language.English, \"You are %d minute(s) late.\",\n//\t\tcatalog.Var(\"minutes\",\n//\t\t\tplural.Selectf(1, \"\", plural.One, \"minute\", plural.Other, \"minutes\")),\n//\t\tcatalog.String(\"You are %[1]d ${minutes} late.\"))\n//\n// Var is defined to return the variable name if the message does not yield a\n// match. This allows us to further simplify this snippet to\n//\n//\tcatalog.Set(language.English, \"You are %d minute(s) late.\",\n//\t\tcatalog.Var(\"minutes\", plural.Selectf(1, \"\", plural.One, \"minute\")),\n//\t\tcatalog.String(\"You are %d ${minutes} late.\"))\n//\n// Overall this is still only a minor improvement, but things can get a lot more\n// unwieldy if more than one linguistic feature is used to determine a message\n// variant. Consider the following example:\n//\n//\t// argument 1: list of hosts, argument 2: list of guests\n//\tcatalog.Set(language.English, \"%[1]v invite(s) %[2]v to their party.\",\n//\t\tcatalog.Var(\"their\",\n//\t\t\tplural.Selectf(1, \"\"\n//\t\t\t\tplural.One, gender.Select(1, \"female\", \"her\", \"other\", \"his\"))),\n//\t\tcatalog.Var(\"invites\", plural.Selectf(1, \"\", plural.One, \"invite\"))\n//\t\tcatalog.String(\"%[1]v ${invites} %[2]v to ${their} party.\")),\n//\n// Without variable substitution, this would have to be written as\n//\n//\t// argument 1: list of hosts, argument 2: list of guests\n//\tcatalog.Set(language.English, \"%[1]v invite(s) %[2]v to their party.\",\n//\t\tplural.Selectf(1, \"\",\n//\t\t\tplural.One, gender.Select(1,\n//\t\t\t\t\"female\", \"%[1]v invites %[2]v to her party.\"\n//\t\t\t\t\"other\", \"%[1]v invites %[2]v to his party.\"),\n//\t\t\tplural.Other, \"%[1]v invites %[2]v to their party.\"))\n//\n// Not necessarily shorter, but using variables there is less duplication and\n// the messages are more maintenance friendly. Moreover, languages may have up\n// to six plural forms. This makes the use of variables more welcome.\n//\n// Different messages using the same inflections can reuse variables by moving\n// them to macros. Using macros we can rewrite the message as:\n//\n//\t// argument 1: list of hosts, argument 2: list of guests\n//\tcatalog.SetString(language.English, \"%[1]v invite(s) %[2]v to their party.\",\n//\t\t\"%[1]v ${invites(1)} %[2]v to ${their(1)} party.\")\n//\n// Where the following macros were defined separately.\n//\n//\tcatalog.SetMacro(language.English, \"invites\", plural.Selectf(1, \"\",\n//\t\tplural.One, \"invite\"))\n//\tcatalog.SetMacro(language.English, \"their\", plural.Selectf(1, \"\",\n//\t\tplural.One, gender.Select(1, \"female\", \"her\", \"other\", \"his\"))),\n//\n// Placeholders use parentheses and the arguments to invoke a macro.\n//\n// # Looking up messages\n//\n// Message lookup using Catalogs is typically only done by specialized packages\n// and is not something the user should be concerned with. For instance, to\n// express the tardiness of a user using the related message we defined earlier,\n// the user may use the package message like so:\n//\n//\tp := message.NewPrinter(language.English)\n//\tp.Printf(\"You are %d minute(s) late.\", 5)\n//\n// Which would print:\n//\n//\tYou are 5 minutes late.\n//\n// This package is UNDER CONSTRUCTION and its API may change.\npackage catalog // import \"golang.org/x/text/message/catalog\"\n\n// TODO:\n// Some way to freeze a catalog.\n// - Locking on each lockup turns out to be about 50% of the total running time\n//   for some of the benchmarks in the message package.\n// Consider these:\n// - Sequence type to support sequences in user-defined messages.\n// - Garbage collection: Remove dictionaries that can no longer be reached\n//   as other dictionaries have been added that cover all possible keys.\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"golang.org/x/text/internal\"\n\n\t\"golang.org/x/text/internal/catmsg\"\n\t\"golang.org/x/text/language\"\n)\n\n// A Catalog allows lookup of translated messages.\ntype Catalog interface {\n\t// Languages returns all languages for which the Catalog contains variants.\n\tLanguages() []language.Tag\n\n\t// Matcher returns a Matcher for languages from this Catalog.\n\tMatcher() language.Matcher\n\n\t// A Context is used for evaluating Messages.\n\tContext(tag language.Tag, r catmsg.Renderer) *Context\n\n\t// This method also makes Catalog a private interface.\n\tlookup(tag language.Tag, key string) (data string, ok bool)\n}\n\n// NewFromMap creates a Catalog from the given map. If a Dictionary is\n// underspecified the entry is retrieved from a parent language.\nfunc NewFromMap(dictionaries map[string]Dictionary, opts ...Option) (Catalog, error) {\n\toptions := options{}\n\tfor _, o := range opts {\n\t\to(&options)\n\t}\n\tc := &catalog{\n\t\tdicts: map[language.Tag]Dictionary{},\n\t}\n\t_, hasFallback := dictionaries[options.fallback.String()]\n\tif hasFallback {\n\t\t// TODO: Should it be okay to not have a fallback language?\n\t\t// Catalog generators could enforce there is always a fallback.\n\t\tc.langs = append(c.langs, options.fallback)\n\t}\n\tfor lang, dict := range dictionaries {\n\t\ttag, err := language.Parse(lang)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"catalog: invalid language tag %q\", lang)\n\t\t}\n\t\tif _, ok := c.dicts[tag]; ok {\n\t\t\treturn nil, fmt.Errorf(\"catalog: duplicate entry for tag %q after normalization\", tag)\n\t\t}\n\t\tc.dicts[tag] = dict\n\t\tif !hasFallback || tag != options.fallback {\n\t\t\tc.langs = append(c.langs, tag)\n\t\t}\n\t}\n\tif hasFallback {\n\t\tinternal.SortTags(c.langs[1:])\n\t} else {\n\t\tinternal.SortTags(c.langs)\n\t}\n\tc.matcher = language.NewMatcher(c.langs)\n\treturn c, nil\n}\n\n// A Dictionary is a source of translations for a single language.\ntype Dictionary interface {\n\t// Lookup returns a message compiled with catmsg.Compile for the given key.\n\t// It returns false for ok if such a message could not be found.\n\tLookup(key string) (data string, ok bool)\n}\n\ntype catalog struct {\n\tlangs   []language.Tag\n\tdicts   map[language.Tag]Dictionary\n\tmacros  store\n\tmatcher language.Matcher\n}\n\nfunc (c *catalog) Languages() []language.Tag { return c.langs }\nfunc (c *catalog) Matcher() language.Matcher { return c.matcher }\n\nfunc (c *catalog) lookup(tag language.Tag, key string) (data string, ok bool) {\n\tfor ; ; tag = tag.Parent() {\n\t\tif dict, ok := c.dicts[tag]; ok {\n\t\t\tif data, ok := dict.Lookup(key); ok {\n\t\t\t\treturn data, true\n\t\t\t}\n\t\t}\n\t\tif tag == language.Und {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn \"\", false\n}\n\n// Context returns a Context for formatting messages.\n// Only one Message may be formatted per context at any given time.\nfunc (c *catalog) Context(tag language.Tag, r catmsg.Renderer) *Context {\n\treturn &Context{\n\t\tcat: c,\n\t\ttag: tag,\n\t\tdec: catmsg.NewDecoder(tag, r, &dict{&c.macros, tag}),\n\t}\n}\n\n// A Builder allows building a Catalog programmatically.\ntype Builder struct {\n\toptions\n\tmatcher language.Matcher\n\n\tindex  store\n\tmacros store\n}\n\ntype options struct {\n\tfallback language.Tag\n}\n\n// An Option configures Catalog behavior.\ntype Option func(*options)\n\n// Fallback specifies the default fallback language. The default is Und.\nfunc Fallback(tag language.Tag) Option {\n\treturn func(o *options) { o.fallback = tag }\n}\n\n// TODO:\n// // Catalogs specifies one or more sources for a Catalog.\n// // Lookups are in order.\n// // This can be changed inserting a Catalog used for setting, which implements\n// // Loader, used for setting in the chain.\n// func Catalogs(d ...Loader) Option {\n// \treturn nil\n// }\n//\n// func Delims(start, end string) Option {}\n//\n// func Dict(tag language.Tag, d ...Dictionary) Option\n\n// NewBuilder returns an empty mutable Catalog.\nfunc NewBuilder(opts ...Option) *Builder {\n\tc := &Builder{}\n\tfor _, o := range opts {\n\t\to(&c.options)\n\t}\n\treturn c\n}\n\n// SetString is shorthand for Set(tag, key, String(msg)).\nfunc (c *Builder) SetString(tag language.Tag, key string, msg string) error {\n\treturn c.set(tag, key, &c.index, String(msg))\n}\n\n// Set sets the translation for the given language and key.\n//\n// When evaluation this message, the first Message in the sequence to msgs to\n// evaluate to a string will be the message returned.\nfunc (c *Builder) Set(tag language.Tag, key string, msg ...Message) error {\n\treturn c.set(tag, key, &c.index, msg...)\n}\n\n// SetMacro defines a Message that may be substituted in another message.\n// The arguments to a macro Message are passed as arguments in the\n// placeholder the form \"${foo(arg1, arg2)}\".\nfunc (c *Builder) SetMacro(tag language.Tag, name string, msg ...Message) error {\n\treturn c.set(tag, name, &c.macros, msg...)\n}\n\n// ErrNotFound indicates there was no message for the given key.\nvar ErrNotFound = errors.New(\"catalog: message not found\")\n\n// String specifies a plain message string. It can be used as fallback if no\n// other strings match or as a simple standalone message.\n//\n// It is an error to pass more than one String in a message sequence.\nfunc String(name string) Message {\n\treturn catmsg.String(name)\n}\n\n// Var sets a variable that may be substituted in formatting patterns using\n// named substitution of the form \"${name}\". The name argument is used as a\n// fallback if the statements do not produce a match. The statement sequence may\n// not contain any Var calls.\n//\n// The name passed to a Var must be unique within message sequence.\nfunc Var(name string, msg ...Message) Message {\n\treturn &catmsg.Var{Name: name, Message: catmsg.FirstOf(msg)}\n}\n\n// Context returns a Context for formatting messages.\n// Only one Message may be formatted per context at any given time.\nfunc (b *Builder) Context(tag language.Tag, r catmsg.Renderer) *Context {\n\treturn &Context{\n\t\tcat: b,\n\t\ttag: tag,\n\t\tdec: catmsg.NewDecoder(tag, r, &dict{&b.macros, tag}),\n\t}\n}\n\n// A Context is used for evaluating Messages.\n// Only one Message may be formatted per context at any given time.\ntype Context struct {\n\tcat Catalog\n\ttag language.Tag // TODO: use compact index.\n\tdec *catmsg.Decoder\n}\n\n// Execute looks up and executes the message with the given key.\n// It returns ErrNotFound if no message could be found in the index.\nfunc (c *Context) Execute(key string) error {\n\tdata, ok := c.cat.lookup(c.tag, key)\n\tif !ok {\n\t\treturn ErrNotFound\n\t}\n\treturn c.dec.Execute(data)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/catalog/dict.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage catalog\n\nimport (\n\t\"sync\"\n\n\t\"golang.org/x/text/internal\"\n\t\"golang.org/x/text/internal/catmsg\"\n\t\"golang.org/x/text/language\"\n)\n\n// A Message holds a collection of translations for the same phrase that may\n// vary based on the values of substitution arguments.\ntype Message = catmsg.Message\n\n// TODO:\n// Dictionary returns a Dictionary that returns the first Message, using the\n// given language tag, that matches:\n//   1. the last one registered by one of the Set methods\n//   2. returned by one of the Loaders\n//   3. repeat from 1. using the parent language\n// This approach allows messages to be underspecified.\n// func (c *Catalog) Dictionary(tag language.Tag) (Dictionary, error) {\n// \t// TODO: verify dictionary exists.\n// \treturn &dict{&c.index, tag}, nil\n// }\n\ntype dict struct {\n\ts   *store\n\ttag language.Tag // TODO: make compact tag.\n}\n\nfunc (d *dict) Lookup(key string) (data string, ok bool) {\n\treturn d.s.lookup(d.tag, key)\n}\n\nfunc (b *Builder) lookup(tag language.Tag, key string) (data string, ok bool) {\n\treturn b.index.lookup(tag, key)\n}\n\nfunc (c *Builder) set(tag language.Tag, key string, s *store, msg ...Message) error {\n\tdata, err := catmsg.Compile(tag, &dict{&c.macros, tag}, catmsg.FirstOf(msg))\n\n\ts.mutex.Lock()\n\tdefer s.mutex.Unlock()\n\n\tm := s.index[tag]\n\tif m == nil {\n\t\tm = msgMap{}\n\t\tif s.index == nil {\n\t\t\ts.index = map[language.Tag]msgMap{}\n\t\t}\n\t\tc.matcher = nil\n\t\ts.index[tag] = m\n\t}\n\n\tm[key] = data\n\treturn err\n}\n\nfunc (c *Builder) Matcher() language.Matcher {\n\tc.index.mutex.RLock()\n\tm := c.matcher\n\tc.index.mutex.RUnlock()\n\tif m != nil {\n\t\treturn m\n\t}\n\n\tc.index.mutex.Lock()\n\tif c.matcher == nil {\n\t\tc.matcher = language.NewMatcher(c.unlockedLanguages())\n\t}\n\tm = c.matcher\n\tc.index.mutex.Unlock()\n\treturn m\n}\n\ntype store struct {\n\tmutex sync.RWMutex\n\tindex map[language.Tag]msgMap\n}\n\ntype msgMap map[string]string\n\nfunc (s *store) lookup(tag language.Tag, key string) (data string, ok bool) {\n\ts.mutex.RLock()\n\tdefer s.mutex.RUnlock()\n\n\tfor ; ; tag = tag.Parent() {\n\t\tif msgs, ok := s.index[tag]; ok {\n\t\t\tif msg, ok := msgs[key]; ok {\n\t\t\t\treturn msg, true\n\t\t\t}\n\t\t}\n\t\tif tag == language.Und {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn \"\", false\n}\n\n// Languages returns all languages for which the Catalog contains variants.\nfunc (b *Builder) Languages() []language.Tag {\n\ts := &b.index\n\ts.mutex.RLock()\n\tdefer s.mutex.RUnlock()\n\n\treturn b.unlockedLanguages()\n}\n\nfunc (b *Builder) unlockedLanguages() []language.Tag {\n\ts := &b.index\n\tif len(s.index) == 0 {\n\t\treturn nil\n\t}\n\ttags := make([]language.Tag, 0, len(s.index))\n\t_, hasFallback := s.index[b.options.fallback]\n\toffset := 0\n\tif hasFallback {\n\t\ttags = append(tags, b.options.fallback)\n\t\toffset = 1\n\t}\n\tfor t := range s.index {\n\t\tif t != b.options.fallback {\n\t\t\ttags = append(tags, t)\n\t\t}\n\t}\n\tinternal.SortTags(tags[offset:])\n\treturn tags\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/catalog.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage message\n\n// TODO: some types in this file will need to be made public at some time.\n// Documentation and method names will reflect this by using the exported name.\n\nimport (\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/message/catalog\"\n)\n\n// MatchLanguage reports the matched tag obtained from language.MatchStrings for\n// the Matcher of the DefaultCatalog.\nfunc MatchLanguage(preferred ...string) language.Tag {\n\tc := DefaultCatalog\n\ttag, _ := language.MatchStrings(c.Matcher(), preferred...)\n\treturn tag\n}\n\n// DefaultCatalog is used by SetString.\nvar DefaultCatalog catalog.Catalog = defaultCatalog\n\nvar defaultCatalog = catalog.NewBuilder()\n\n// SetString calls SetString on the initial default Catalog.\nfunc SetString(tag language.Tag, key string, msg string) error {\n\treturn defaultCatalog.SetString(tag, key, msg)\n}\n\n// Set calls Set on the initial default Catalog.\nfunc Set(tag language.Tag, key string, msg ...catalog.Message) error {\n\treturn defaultCatalog.Set(tag, key, msg...)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/doc.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package message implements formatted I/O for localized strings with functions\n// analogous to the fmt's print functions. It is a drop-in replacement for fmt.\n//\n// # Localized Formatting\n//\n// A format string can be localized by replacing any of the print functions of\n// fmt with an equivalent call to a Printer.\n//\n//\tp := message.NewPrinter(message.MatchLanguage(\"en\"))\n//\tp.Println(123456.78) // Prints 123,456.78\n//\n//\tp.Printf(\"%d ducks in a row\", 4331) // Prints 4,331 ducks in a row\n//\n//\tp := message.NewPrinter(message.MatchLanguage(\"nl\"))\n//\tp.Printf(\"Hoogte: %.1f meter\", 1244.9) // Prints Hoogte: 1,244.9 meter\n//\n//\tp := message.NewPrinter(message.MatchLanguage(\"bn\"))\n//\tp.Println(123456.78) // Prints ১,২৩,৪৫৬.৭৮\n//\n// Printer currently supports numbers and specialized types for which packages\n// exist in x/text. Other builtin types such as time.Time and slices are\n// planned.\n//\n// Format strings largely have the same meaning as with fmt with the following\n// notable exceptions:\n//   - flag # always resorts to fmt for printing\n//   - verb 'f', 'e', 'g', 'd' use localized formatting unless the '#' flag is\n//     specified.\n//   - verb 'm' inserts a translation of a string argument.\n//\n// See package fmt for more options.\n//\n// # Translation\n//\n// The format strings that are passed to Printf, Sprintf, Fprintf, or Errorf\n// are used as keys to look up translations for the specified languages.\n// More on how these need to be specified below.\n//\n// One can use arbitrary keys to distinguish between otherwise ambiguous\n// strings:\n//\n//\tp := message.NewPrinter(language.English)\n//\tp.Printf(\"archive(noun)\")  // Prints \"archive\"\n//\tp.Printf(\"archive(verb)\")  // Prints \"archive\"\n//\n//\tp := message.NewPrinter(language.German)\n//\tp.Printf(\"archive(noun)\")  // Prints \"Archiv\"\n//\tp.Printf(\"archive(verb)\")  // Prints \"archivieren\"\n//\n// To retain the fallback functionality, use Key:\n//\n//\tp.Printf(message.Key(\"archive(noun)\", \"archive\"))\n//\tp.Printf(message.Key(\"archive(verb)\", \"archive\"))\n//\n// # Translation Pipeline\n//\n// Format strings that contain text need to be translated to support different\n// locales. The first step is to extract strings that need to be translated.\n//\n// 1. Install gotext\n//\n//\tgo get -u golang.org/x/text/cmd/gotext\n//\tgotext -help\n//\n// 2. Mark strings in your source to be translated by using message.Printer,\n// instead of the functions of the fmt package.\n//\n// 3. Extract the strings from your source\n//\n//\tgotext extract\n//\n// The output will be written to the textdata directory.\n//\n// 4. Send the files for translation\n//\n// It is planned to support multiple formats, but for now one will have to\n// rewrite the JSON output to the desired format.\n//\n// 5. Inject translations into program\n//\n// 6. Repeat from 2\n//\n// Right now this has to be done programmatically with calls to Set or\n// SetString. These functions as well as the methods defined in\n// see also package golang.org/x/text/message/catalog can be used to implement\n// either dynamic or static loading of messages.\n//\n// # Plural and Gender Forms\n//\n// Translated messages can vary based on the plural and gender forms of\n// substitution values. In general, it is up to the translators to provide\n// alternative translations for such forms. See the packages in\n// golang.org/x/text/feature and golang.org/x/text/message/catalog for more\n// information.\npackage message\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/format.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage message\n\nimport (\n\t\"bytes\"\n\t\"strconv\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/internal/format\"\n)\n\nconst (\n\tldigits = \"0123456789abcdefx\"\n\tudigits = \"0123456789ABCDEFX\"\n)\n\nconst (\n\tsigned   = true\n\tunsigned = false\n)\n\n// A formatInfo is the raw formatter used by Printf etc.\n// It prints into a buffer that must be set up separately.\ntype formatInfo struct {\n\tbuf *bytes.Buffer\n\n\tformat.Parser\n\n\t// intbuf is large enough to store %b of an int64 with a sign and\n\t// avoids padding at the end of the struct on 32 bit architectures.\n\tintbuf [68]byte\n}\n\nfunc (f *formatInfo) init(buf *bytes.Buffer) {\n\tf.ClearFlags()\n\tf.buf = buf\n}\n\n// writePadding generates n bytes of padding.\nfunc (f *formatInfo) writePadding(n int) {\n\tif n <= 0 { // No padding bytes needed.\n\t\treturn\n\t}\n\tf.buf.Grow(n)\n\t// Decide which byte the padding should be filled with.\n\tpadByte := byte(' ')\n\tif f.Zero {\n\t\tpadByte = byte('0')\n\t}\n\t// Fill padding with padByte.\n\tfor i := 0; i < n; i++ {\n\t\tf.buf.WriteByte(padByte) // TODO: make more efficient.\n\t}\n}\n\n// pad appends b to f.buf, padded on left (!f.minus) or right (f.minus).\nfunc (f *formatInfo) pad(b []byte) {\n\tif !f.WidthPresent || f.Width == 0 {\n\t\tf.buf.Write(b)\n\t\treturn\n\t}\n\twidth := f.Width - utf8.RuneCount(b)\n\tif !f.Minus {\n\t\t// left padding\n\t\tf.writePadding(width)\n\t\tf.buf.Write(b)\n\t} else {\n\t\t// right padding\n\t\tf.buf.Write(b)\n\t\tf.writePadding(width)\n\t}\n}\n\n// padString appends s to f.buf, padded on left (!f.minus) or right (f.minus).\nfunc (f *formatInfo) padString(s string) {\n\tif !f.WidthPresent || f.Width == 0 {\n\t\tf.buf.WriteString(s)\n\t\treturn\n\t}\n\twidth := f.Width - utf8.RuneCountInString(s)\n\tif !f.Minus {\n\t\t// left padding\n\t\tf.writePadding(width)\n\t\tf.buf.WriteString(s)\n\t} else {\n\t\t// right padding\n\t\tf.buf.WriteString(s)\n\t\tf.writePadding(width)\n\t}\n}\n\n// fmt_boolean formats a boolean.\nfunc (f *formatInfo) fmt_boolean(v bool) {\n\tif v {\n\t\tf.padString(\"true\")\n\t} else {\n\t\tf.padString(\"false\")\n\t}\n}\n\n// fmt_unicode formats a uint64 as \"U+0078\" or with f.sharp set as \"U+0078 'x'\".\nfunc (f *formatInfo) fmt_unicode(u uint64) {\n\tbuf := f.intbuf[0:]\n\n\t// With default precision set the maximum needed buf length is 18\n\t// for formatting -1 with %#U (\"U+FFFFFFFFFFFFFFFF\") which fits\n\t// into the already allocated intbuf with a capacity of 68 bytes.\n\tprec := 4\n\tif f.PrecPresent && f.Prec > 4 {\n\t\tprec = f.Prec\n\t\t// Compute space needed for \"U+\" , number, \" '\", character, \"'\".\n\t\twidth := 2 + prec + 2 + utf8.UTFMax + 1\n\t\tif width > len(buf) {\n\t\t\tbuf = make([]byte, width)\n\t\t}\n\t}\n\n\t// Format into buf, ending at buf[i]. Formatting numbers is easier right-to-left.\n\ti := len(buf)\n\n\t// For %#U we want to add a space and a quoted character at the end of the buffer.\n\tif f.Sharp && u <= utf8.MaxRune && strconv.IsPrint(rune(u)) {\n\t\ti--\n\t\tbuf[i] = '\\''\n\t\ti -= utf8.RuneLen(rune(u))\n\t\tutf8.EncodeRune(buf[i:], rune(u))\n\t\ti--\n\t\tbuf[i] = '\\''\n\t\ti--\n\t\tbuf[i] = ' '\n\t}\n\t// Format the Unicode code point u as a hexadecimal number.\n\tfor u >= 16 {\n\t\ti--\n\t\tbuf[i] = udigits[u&0xF]\n\t\tprec--\n\t\tu >>= 4\n\t}\n\ti--\n\tbuf[i] = udigits[u]\n\tprec--\n\t// Add zeros in front of the number until requested precision is reached.\n\tfor prec > 0 {\n\t\ti--\n\t\tbuf[i] = '0'\n\t\tprec--\n\t}\n\t// Add a leading \"U+\".\n\ti--\n\tbuf[i] = '+'\n\ti--\n\tbuf[i] = 'U'\n\n\toldZero := f.Zero\n\tf.Zero = false\n\tf.pad(buf[i:])\n\tf.Zero = oldZero\n}\n\n// fmt_integer formats signed and unsigned integers.\nfunc (f *formatInfo) fmt_integer(u uint64, base int, isSigned bool, digits string) {\n\tnegative := isSigned && int64(u) < 0\n\tif negative {\n\t\tu = -u\n\t}\n\n\tbuf := f.intbuf[0:]\n\t// The already allocated f.intbuf with a capacity of 68 bytes\n\t// is large enough for integer formatting when no precision or width is set.\n\tif f.WidthPresent || f.PrecPresent {\n\t\t// Account 3 extra bytes for possible addition of a sign and \"0x\".\n\t\twidth := 3 + f.Width + f.Prec // wid and prec are always positive.\n\t\tif width > len(buf) {\n\t\t\t// We're going to need a bigger boat.\n\t\t\tbuf = make([]byte, width)\n\t\t}\n\t}\n\n\t// Two ways to ask for extra leading zero digits: %.3d or %03d.\n\t// If both are specified the f.zero flag is ignored and\n\t// padding with spaces is used instead.\n\tprec := 0\n\tif f.PrecPresent {\n\t\tprec = f.Prec\n\t\t// Precision of 0 and value of 0 means \"print nothing\" but padding.\n\t\tif prec == 0 && u == 0 {\n\t\t\toldZero := f.Zero\n\t\t\tf.Zero = false\n\t\t\tf.writePadding(f.Width)\n\t\t\tf.Zero = oldZero\n\t\t\treturn\n\t\t}\n\t} else if f.Zero && f.WidthPresent {\n\t\tprec = f.Width\n\t\tif negative || f.Plus || f.Space {\n\t\t\tprec-- // leave room for sign\n\t\t}\n\t}\n\n\t// Because printing is easier right-to-left: format u into buf, ending at buf[i].\n\t// We could make things marginally faster by splitting the 32-bit case out\n\t// into a separate block but it's not worth the duplication, so u has 64 bits.\n\ti := len(buf)\n\t// Use constants for the division and modulo for more efficient code.\n\t// Switch cases ordered by popularity.\n\tswitch base {\n\tcase 10:\n\t\tfor u >= 10 {\n\t\t\ti--\n\t\t\tnext := u / 10\n\t\t\tbuf[i] = byte('0' + u - next*10)\n\t\t\tu = next\n\t\t}\n\tcase 16:\n\t\tfor u >= 16 {\n\t\t\ti--\n\t\t\tbuf[i] = digits[u&0xF]\n\t\t\tu >>= 4\n\t\t}\n\tcase 8:\n\t\tfor u >= 8 {\n\t\t\ti--\n\t\t\tbuf[i] = byte('0' + u&7)\n\t\t\tu >>= 3\n\t\t}\n\tcase 2:\n\t\tfor u >= 2 {\n\t\t\ti--\n\t\t\tbuf[i] = byte('0' + u&1)\n\t\t\tu >>= 1\n\t\t}\n\tdefault:\n\t\tpanic(\"fmt: unknown base; can't happen\")\n\t}\n\ti--\n\tbuf[i] = digits[u]\n\tfor i > 0 && prec > len(buf)-i {\n\t\ti--\n\t\tbuf[i] = '0'\n\t}\n\n\t// Various prefixes: 0x, -, etc.\n\tif f.Sharp {\n\t\tswitch base {\n\t\tcase 8:\n\t\t\tif buf[i] != '0' {\n\t\t\t\ti--\n\t\t\t\tbuf[i] = '0'\n\t\t\t}\n\t\tcase 16:\n\t\t\t// Add a leading 0x or 0X.\n\t\t\ti--\n\t\t\tbuf[i] = digits[16]\n\t\t\ti--\n\t\t\tbuf[i] = '0'\n\t\t}\n\t}\n\n\tif negative {\n\t\ti--\n\t\tbuf[i] = '-'\n\t} else if f.Plus {\n\t\ti--\n\t\tbuf[i] = '+'\n\t} else if f.Space {\n\t\ti--\n\t\tbuf[i] = ' '\n\t}\n\n\t// Left padding with zeros has already been handled like precision earlier\n\t// or the f.zero flag is ignored due to an explicitly set precision.\n\toldZero := f.Zero\n\tf.Zero = false\n\tf.pad(buf[i:])\n\tf.Zero = oldZero\n}\n\n// truncate truncates the string to the specified precision, if present.\nfunc (f *formatInfo) truncate(s string) string {\n\tif f.PrecPresent {\n\t\tn := f.Prec\n\t\tfor i := range s {\n\t\t\tn--\n\t\t\tif n < 0 {\n\t\t\t\treturn s[:i]\n\t\t\t}\n\t\t}\n\t}\n\treturn s\n}\n\n// fmt_s formats a string.\nfunc (f *formatInfo) fmt_s(s string) {\n\ts = f.truncate(s)\n\tf.padString(s)\n}\n\n// fmt_sbx formats a string or byte slice as a hexadecimal encoding of its bytes.\nfunc (f *formatInfo) fmt_sbx(s string, b []byte, digits string) {\n\tlength := len(b)\n\tif b == nil {\n\t\t// No byte slice present. Assume string s should be encoded.\n\t\tlength = len(s)\n\t}\n\t// Set length to not process more bytes than the precision demands.\n\tif f.PrecPresent && f.Prec < length {\n\t\tlength = f.Prec\n\t}\n\t// Compute width of the encoding taking into account the f.sharp and f.space flag.\n\twidth := 2 * length\n\tif width > 0 {\n\t\tif f.Space {\n\t\t\t// Each element encoded by two hexadecimals will get a leading 0x or 0X.\n\t\t\tif f.Sharp {\n\t\t\t\twidth *= 2\n\t\t\t}\n\t\t\t// Elements will be separated by a space.\n\t\t\twidth += length - 1\n\t\t} else if f.Sharp {\n\t\t\t// Only a leading 0x or 0X will be added for the whole string.\n\t\t\twidth += 2\n\t\t}\n\t} else { // The byte slice or string that should be encoded is empty.\n\t\tif f.WidthPresent {\n\t\t\tf.writePadding(f.Width)\n\t\t}\n\t\treturn\n\t}\n\t// Handle padding to the left.\n\tif f.WidthPresent && f.Width > width && !f.Minus {\n\t\tf.writePadding(f.Width - width)\n\t}\n\t// Write the encoding directly into the output buffer.\n\tbuf := f.buf\n\tif f.Sharp {\n\t\t// Add leading 0x or 0X.\n\t\tbuf.WriteByte('0')\n\t\tbuf.WriteByte(digits[16])\n\t}\n\tvar c byte\n\tfor i := 0; i < length; i++ {\n\t\tif f.Space && i > 0 {\n\t\t\t// Separate elements with a space.\n\t\t\tbuf.WriteByte(' ')\n\t\t\tif f.Sharp {\n\t\t\t\t// Add leading 0x or 0X for each element.\n\t\t\t\tbuf.WriteByte('0')\n\t\t\t\tbuf.WriteByte(digits[16])\n\t\t\t}\n\t\t}\n\t\tif b != nil {\n\t\t\tc = b[i] // Take a byte from the input byte slice.\n\t\t} else {\n\t\t\tc = s[i] // Take a byte from the input string.\n\t\t}\n\t\t// Encode each byte as two hexadecimal digits.\n\t\tbuf.WriteByte(digits[c>>4])\n\t\tbuf.WriteByte(digits[c&0xF])\n\t}\n\t// Handle padding to the right.\n\tif f.WidthPresent && f.Width > width && f.Minus {\n\t\tf.writePadding(f.Width - width)\n\t}\n}\n\n// fmt_sx formats a string as a hexadecimal encoding of its bytes.\nfunc (f *formatInfo) fmt_sx(s, digits string) {\n\tf.fmt_sbx(s, nil, digits)\n}\n\n// fmt_bx formats a byte slice as a hexadecimal encoding of its bytes.\nfunc (f *formatInfo) fmt_bx(b []byte, digits string) {\n\tf.fmt_sbx(\"\", b, digits)\n}\n\n// fmt_q formats a string as a double-quoted, escaped Go string constant.\n// If f.sharp is set a raw (backquoted) string may be returned instead\n// if the string does not contain any control characters other than tab.\nfunc (f *formatInfo) fmt_q(s string) {\n\ts = f.truncate(s)\n\tif f.Sharp && strconv.CanBackquote(s) {\n\t\tf.padString(\"`\" + s + \"`\")\n\t\treturn\n\t}\n\tbuf := f.intbuf[:0]\n\tif f.Plus {\n\t\tf.pad(strconv.AppendQuoteToASCII(buf, s))\n\t} else {\n\t\tf.pad(strconv.AppendQuote(buf, s))\n\t}\n}\n\n// fmt_c formats an integer as a Unicode character.\n// If the character is not valid Unicode, it will print '\\ufffd'.\nfunc (f *formatInfo) fmt_c(c uint64) {\n\tr := rune(c)\n\tif c > utf8.MaxRune {\n\t\tr = utf8.RuneError\n\t}\n\tbuf := f.intbuf[:0]\n\tw := utf8.EncodeRune(buf[:utf8.UTFMax], r)\n\tf.pad(buf[:w])\n}\n\n// fmt_qc formats an integer as a single-quoted, escaped Go character constant.\n// If the character is not valid Unicode, it will print '\\ufffd'.\nfunc (f *formatInfo) fmt_qc(c uint64) {\n\tr := rune(c)\n\tif c > utf8.MaxRune {\n\t\tr = utf8.RuneError\n\t}\n\tbuf := f.intbuf[:0]\n\tif f.Plus {\n\t\tf.pad(strconv.AppendQuoteRuneToASCII(buf, r))\n\t} else {\n\t\tf.pad(strconv.AppendQuoteRune(buf, r))\n\t}\n}\n\n// fmt_float formats a float64. It assumes that verb is a valid format specifier\n// for strconv.AppendFloat and therefore fits into a byte.\nfunc (f *formatInfo) fmt_float(v float64, size int, verb rune, prec int) {\n\t// Explicit precision in format specifier overrules default precision.\n\tif f.PrecPresent {\n\t\tprec = f.Prec\n\t}\n\t// Format number, reserving space for leading + sign if needed.\n\tnum := strconv.AppendFloat(f.intbuf[:1], v, byte(verb), prec, size)\n\tif num[1] == '-' || num[1] == '+' {\n\t\tnum = num[1:]\n\t} else {\n\t\tnum[0] = '+'\n\t}\n\t// f.space means to add a leading space instead of a \"+\" sign unless\n\t// the sign is explicitly asked for by f.plus.\n\tif f.Space && num[0] == '+' && !f.Plus {\n\t\tnum[0] = ' '\n\t}\n\t// Special handling for infinities and NaN,\n\t// which don't look like a number so shouldn't be padded with zeros.\n\tif num[1] == 'I' || num[1] == 'N' {\n\t\toldZero := f.Zero\n\t\tf.Zero = false\n\t\t// Remove sign before NaN if not asked for.\n\t\tif num[1] == 'N' && !f.Space && !f.Plus {\n\t\t\tnum = num[1:]\n\t\t}\n\t\tf.pad(num)\n\t\tf.Zero = oldZero\n\t\treturn\n\t}\n\t// The sharp flag forces printing a decimal point for non-binary formats\n\t// and retains trailing zeros, which we may need to restore.\n\tif f.Sharp && verb != 'b' {\n\t\tdigits := 0\n\t\tswitch verb {\n\t\tcase 'v', 'g', 'G':\n\t\t\tdigits = prec\n\t\t\t// If no precision is set explicitly use a precision of 6.\n\t\t\tif digits == -1 {\n\t\t\t\tdigits = 6\n\t\t\t}\n\t\t}\n\n\t\t// Buffer pre-allocated with enough room for\n\t\t// exponent notations of the form \"e+123\".\n\t\tvar tailBuf [5]byte\n\t\ttail := tailBuf[:0]\n\n\t\thasDecimalPoint := false\n\t\t// Starting from i = 1 to skip sign at num[0].\n\t\tfor i := 1; i < len(num); i++ {\n\t\t\tswitch num[i] {\n\t\t\tcase '.':\n\t\t\t\thasDecimalPoint = true\n\t\t\tcase 'e', 'E':\n\t\t\t\ttail = append(tail, num[i:]...)\n\t\t\t\tnum = num[:i]\n\t\t\tdefault:\n\t\t\t\tdigits--\n\t\t\t}\n\t\t}\n\t\tif !hasDecimalPoint {\n\t\t\tnum = append(num, '.')\n\t\t}\n\t\tfor digits > 0 {\n\t\t\tnum = append(num, '0')\n\t\t\tdigits--\n\t\t}\n\t\tnum = append(num, tail...)\n\t}\n\t// We want a sign if asked for and if the sign is not positive.\n\tif f.Plus || num[0] != '+' {\n\t\t// If we're zero padding to the left we want the sign before the leading zeros.\n\t\t// Achieve this by writing the sign out and then padding the unsigned number.\n\t\tif f.Zero && f.WidthPresent && f.Width > len(num) {\n\t\t\tf.buf.WriteByte(num[0])\n\t\t\tf.writePadding(f.Width - len(num))\n\t\t\tf.buf.Write(num[1:])\n\t\t\treturn\n\t\t}\n\t\tf.pad(num)\n\t\treturn\n\t}\n\t// No sign to show and the number is positive; just print the unsigned number.\n\tf.pad(num[1:])\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/message.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage message // import \"golang.org/x/text/message\"\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t// Include features to facilitate generated catalogs.\n\t_ \"golang.org/x/text/feature/plural\"\n\n\t\"golang.org/x/text/internal/number\"\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/message/catalog\"\n)\n\n// A Printer implements language-specific formatted I/O analogous to the fmt\n// package.\ntype Printer struct {\n\t// the language\n\ttag language.Tag\n\n\ttoDecimal    number.Formatter\n\ttoScientific number.Formatter\n\n\tcat catalog.Catalog\n}\n\ntype options struct {\n\tcat catalog.Catalog\n\t// TODO:\n\t// - allow %s to print integers in written form (tables are likely too large\n\t//   to enable this by default).\n\t// - list behavior\n\t//\n}\n\n// An Option defines an option of a Printer.\ntype Option func(o *options)\n\n// Catalog defines the catalog to be used.\nfunc Catalog(c catalog.Catalog) Option {\n\treturn func(o *options) { o.cat = c }\n}\n\n// NewPrinter returns a Printer that formats messages tailored to language t.\nfunc NewPrinter(t language.Tag, opts ...Option) *Printer {\n\toptions := &options{\n\t\tcat: DefaultCatalog,\n\t}\n\tfor _, o := range opts {\n\t\to(options)\n\t}\n\tp := &Printer{\n\t\ttag: t,\n\t\tcat: options.cat,\n\t}\n\tp.toDecimal.InitDecimal(t)\n\tp.toScientific.InitScientific(t)\n\treturn p\n}\n\n// Sprint is like fmt.Sprint, but using language-specific formatting.\nfunc (p *Printer) Sprint(a ...interface{}) string {\n\tpp := newPrinter(p)\n\tpp.doPrint(a)\n\ts := pp.String()\n\tpp.free()\n\treturn s\n}\n\n// Fprint is like fmt.Fprint, but using language-specific formatting.\nfunc (p *Printer) Fprint(w io.Writer, a ...interface{}) (n int, err error) {\n\tpp := newPrinter(p)\n\tpp.doPrint(a)\n\tn64, err := io.Copy(w, &pp.Buffer)\n\tpp.free()\n\treturn int(n64), err\n}\n\n// Print is like fmt.Print, but using language-specific formatting.\nfunc (p *Printer) Print(a ...interface{}) (n int, err error) {\n\treturn p.Fprint(os.Stdout, a...)\n}\n\n// Sprintln is like fmt.Sprintln, but using language-specific formatting.\nfunc (p *Printer) Sprintln(a ...interface{}) string {\n\tpp := newPrinter(p)\n\tpp.doPrintln(a)\n\ts := pp.String()\n\tpp.free()\n\treturn s\n}\n\n// Fprintln is like fmt.Fprintln, but using language-specific formatting.\nfunc (p *Printer) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {\n\tpp := newPrinter(p)\n\tpp.doPrintln(a)\n\tn64, err := io.Copy(w, &pp.Buffer)\n\tpp.free()\n\treturn int(n64), err\n}\n\n// Println is like fmt.Println, but using language-specific formatting.\nfunc (p *Printer) Println(a ...interface{}) (n int, err error) {\n\treturn p.Fprintln(os.Stdout, a...)\n}\n\n// Sprintf is like fmt.Sprintf, but using language-specific formatting.\nfunc (p *Printer) Sprintf(key Reference, a ...interface{}) string {\n\tpp := newPrinter(p)\n\tlookupAndFormat(pp, key, a)\n\ts := pp.String()\n\tpp.free()\n\treturn s\n}\n\n// Fprintf is like fmt.Fprintf, but using language-specific formatting.\nfunc (p *Printer) Fprintf(w io.Writer, key Reference, a ...interface{}) (n int, err error) {\n\tpp := newPrinter(p)\n\tlookupAndFormat(pp, key, a)\n\tn, err = w.Write(pp.Bytes())\n\tpp.free()\n\treturn n, err\n\n}\n\n// Printf is like fmt.Printf, but using language-specific formatting.\nfunc (p *Printer) Printf(key Reference, a ...interface{}) (n int, err error) {\n\tpp := newPrinter(p)\n\tlookupAndFormat(pp, key, a)\n\tn, err = os.Stdout.Write(pp.Bytes())\n\tpp.free()\n\treturn n, err\n}\n\nfunc lookupAndFormat(p *printer, r Reference, a []interface{}) {\n\tp.fmt.Reset(a)\n\tswitch v := r.(type) {\n\tcase string:\n\t\tif p.catContext.Execute(v) == catalog.ErrNotFound {\n\t\t\tp.Render(v)\n\t\t\treturn\n\t\t}\n\tcase key:\n\t\tif p.catContext.Execute(v.id) == catalog.ErrNotFound &&\n\t\t\tp.catContext.Execute(v.fallback) == catalog.ErrNotFound {\n\t\t\tp.Render(v.fallback)\n\t\t\treturn\n\t\t}\n\tdefault:\n\t\tpanic(\"key argument is not a Reference\")\n\t}\n}\n\ntype rawPrinter struct {\n\tp *printer\n}\n\nfunc (p rawPrinter) Render(msg string)     { p.p.WriteString(msg) }\nfunc (p rawPrinter) Arg(i int) interface{} { return nil }\n\n// Arg implements catmsg.Renderer.\nfunc (p *printer) Arg(i int) interface{} { // TODO, also return \"ok\" bool\n\ti--\n\tif uint(i) < uint(len(p.fmt.Args)) {\n\t\treturn p.fmt.Args[i]\n\t}\n\treturn nil\n}\n\n// Render implements catmsg.Renderer.\nfunc (p *printer) Render(msg string) {\n\tp.doPrintf(msg)\n}\n\n// A Reference is a string or a message reference.\ntype Reference interface {\n\t// TODO: also allow []string\n}\n\n// Key creates a message Reference for a message where the given id is used for\n// message lookup and the fallback is returned when no matches are found.\nfunc Key(id string, fallback string) Reference {\n\treturn key{id, fallback}\n}\n\ntype key struct {\n\tid, fallback string\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/message/print.go",
    "content": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage message\n\nimport (\n\t\"bytes\"\n\t\"fmt\" // TODO: consider copying interfaces from package fmt to avoid dependency.\n\t\"math\"\n\t\"reflect\"\n\t\"sync\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/internal/format\"\n\t\"golang.org/x/text/internal/number\"\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/message/catalog\"\n)\n\n// Strings for use with buffer.WriteString.\n// This is less overhead than using buffer.Write with byte arrays.\nconst (\n\tcommaSpaceString  = \", \"\n\tnilAngleString    = \"<nil>\"\n\tnilParenString    = \"(nil)\"\n\tnilString         = \"nil\"\n\tmapString         = \"map[\"\n\tpercentBangString = \"%!\"\n\tmissingString     = \"(MISSING)\"\n\tbadIndexString    = \"(BADINDEX)\"\n\tpanicString       = \"(PANIC=\"\n\textraString       = \"%!(EXTRA \"\n\tbadWidthString    = \"%!(BADWIDTH)\"\n\tbadPrecString     = \"%!(BADPREC)\"\n\tnoVerbString      = \"%!(NOVERB)\"\n\n\tinvReflectString = \"<invalid reflect.Value>\"\n)\n\nvar printerPool = sync.Pool{\n\tNew: func() interface{} { return new(printer) },\n}\n\n// newPrinter allocates a new printer struct or grabs a cached one.\nfunc newPrinter(pp *Printer) *printer {\n\tp := printerPool.Get().(*printer)\n\tp.Printer = *pp\n\t// TODO: cache most of the following call.\n\tp.catContext = pp.cat.Context(pp.tag, p)\n\n\tp.panicking = false\n\tp.erroring = false\n\tp.fmt.init(&p.Buffer)\n\treturn p\n}\n\n// free saves used printer structs in printerFree; avoids an allocation per invocation.\nfunc (p *printer) free() {\n\tp.Buffer.Reset()\n\tp.arg = nil\n\tp.value = reflect.Value{}\n\tprinterPool.Put(p)\n}\n\n// printer is used to store a printer's state.\n// It implements \"golang.org/x/text/internal/format\".State.\ntype printer struct {\n\tPrinter\n\n\t// the context for looking up message translations\n\tcatContext *catalog.Context\n\n\t// buffer for accumulating output.\n\tbytes.Buffer\n\n\t// arg holds the current item, as an interface{}.\n\targ interface{}\n\t// value is used instead of arg for reflect values.\n\tvalue reflect.Value\n\n\t// fmt is used to format basic items such as integers or strings.\n\tfmt formatInfo\n\n\t// panicking is set by catchPanic to avoid infinite panic, recover, panic, ... recursion.\n\tpanicking bool\n\t// erroring is set when printing an error string to guard against calling handleMethods.\n\terroring bool\n}\n\n// Language implements \"golang.org/x/text/internal/format\".State.\nfunc (p *printer) Language() language.Tag { return p.tag }\n\nfunc (p *printer) Width() (wid int, ok bool) { return p.fmt.Width, p.fmt.WidthPresent }\n\nfunc (p *printer) Precision() (prec int, ok bool) { return p.fmt.Prec, p.fmt.PrecPresent }\n\nfunc (p *printer) Flag(b int) bool {\n\tswitch b {\n\tcase '-':\n\t\treturn p.fmt.Minus\n\tcase '+':\n\t\treturn p.fmt.Plus || p.fmt.PlusV\n\tcase '#':\n\t\treturn p.fmt.Sharp || p.fmt.SharpV\n\tcase ' ':\n\t\treturn p.fmt.Space\n\tcase '0':\n\t\treturn p.fmt.Zero\n\t}\n\treturn false\n}\n\n// getField gets the i'th field of the struct value.\n// If the field is itself is an interface, return a value for\n// the thing inside the interface, not the interface itself.\nfunc getField(v reflect.Value, i int) reflect.Value {\n\tval := v.Field(i)\n\tif val.Kind() == reflect.Interface && !val.IsNil() {\n\t\tval = val.Elem()\n\t}\n\treturn val\n}\n\nfunc (p *printer) unknownType(v reflect.Value) {\n\tif !v.IsValid() {\n\t\tp.WriteString(nilAngleString)\n\t\treturn\n\t}\n\tp.WriteByte('?')\n\tp.WriteString(v.Type().String())\n\tp.WriteByte('?')\n}\n\nfunc (p *printer) badVerb(verb rune) {\n\tp.erroring = true\n\tp.WriteString(percentBangString)\n\tp.WriteRune(verb)\n\tp.WriteByte('(')\n\tswitch {\n\tcase p.arg != nil:\n\t\tp.WriteString(reflect.TypeOf(p.arg).String())\n\t\tp.WriteByte('=')\n\t\tp.printArg(p.arg, 'v')\n\tcase p.value.IsValid():\n\t\tp.WriteString(p.value.Type().String())\n\t\tp.WriteByte('=')\n\t\tp.printValue(p.value, 'v', 0)\n\tdefault:\n\t\tp.WriteString(nilAngleString)\n\t}\n\tp.WriteByte(')')\n\tp.erroring = false\n}\n\nfunc (p *printer) fmtBool(v bool, verb rune) {\n\tswitch verb {\n\tcase 't', 'v':\n\t\tp.fmt.fmt_boolean(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\n// fmt0x64 formats a uint64 in hexadecimal and prefixes it with 0x or\n// not, as requested, by temporarily setting the sharp flag.\nfunc (p *printer) fmt0x64(v uint64, leading0x bool) {\n\tsharp := p.fmt.Sharp\n\tp.fmt.Sharp = leading0x\n\tp.fmt.fmt_integer(v, 16, unsigned, ldigits)\n\tp.fmt.Sharp = sharp\n}\n\n// fmtInteger formats a signed or unsigned integer.\nfunc (p *printer) fmtInteger(v uint64, isSigned bool, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tif p.fmt.SharpV && !isSigned {\n\t\t\tp.fmt0x64(v, true)\n\t\t\treturn\n\t\t}\n\t\tfallthrough\n\tcase 'd':\n\t\tif p.fmt.Sharp || p.fmt.SharpV {\n\t\t\tp.fmt.fmt_integer(v, 10, isSigned, ldigits)\n\t\t} else {\n\t\t\tp.fmtDecimalInt(v, isSigned)\n\t\t}\n\tcase 'b':\n\t\tp.fmt.fmt_integer(v, 2, isSigned, ldigits)\n\tcase 'o':\n\t\tp.fmt.fmt_integer(v, 8, isSigned, ldigits)\n\tcase 'x':\n\t\tp.fmt.fmt_integer(v, 16, isSigned, ldigits)\n\tcase 'X':\n\t\tp.fmt.fmt_integer(v, 16, isSigned, udigits)\n\tcase 'c':\n\t\tp.fmt.fmt_c(v)\n\tcase 'q':\n\t\tif v <= utf8.MaxRune {\n\t\t\tp.fmt.fmt_qc(v)\n\t\t} else {\n\t\t\tp.badVerb(verb)\n\t\t}\n\tcase 'U':\n\t\tp.fmt.fmt_unicode(v)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\n// fmtFloat formats a float. The default precision for each verb\n// is specified as last argument in the call to fmt_float.\nfunc (p *printer) fmtFloat(v float64, size int, verb rune) {\n\tswitch verb {\n\tcase 'b':\n\t\tp.fmt.fmt_float(v, size, verb, -1)\n\tcase 'v':\n\t\tverb = 'g'\n\t\tfallthrough\n\tcase 'g', 'G':\n\t\tif p.fmt.Sharp || p.fmt.SharpV {\n\t\t\tp.fmt.fmt_float(v, size, verb, -1)\n\t\t} else {\n\t\t\tp.fmtVariableFloat(v, size)\n\t\t}\n\tcase 'e', 'E':\n\t\tif p.fmt.Sharp || p.fmt.SharpV {\n\t\t\tp.fmt.fmt_float(v, size, verb, 6)\n\t\t} else {\n\t\t\tp.fmtScientific(v, size, 6)\n\t\t}\n\tcase 'f', 'F':\n\t\tif p.fmt.Sharp || p.fmt.SharpV {\n\t\t\tp.fmt.fmt_float(v, size, verb, 6)\n\t\t} else {\n\t\t\tp.fmtDecimalFloat(v, size, 6)\n\t\t}\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *printer) setFlags(f *number.Formatter) {\n\tf.Flags &^= number.ElideSign\n\tif p.fmt.Plus || p.fmt.Space {\n\t\tf.Flags |= number.AlwaysSign\n\t\tif !p.fmt.Plus {\n\t\t\tf.Flags |= number.ElideSign\n\t\t}\n\t} else {\n\t\tf.Flags &^= number.AlwaysSign\n\t}\n}\n\nfunc (p *printer) updatePadding(f *number.Formatter) {\n\tf.Flags &^= number.PadMask\n\tif p.fmt.Minus {\n\t\tf.Flags |= number.PadAfterSuffix\n\t} else {\n\t\tf.Flags |= number.PadBeforePrefix\n\t}\n\tf.PadRune = ' '\n\tf.FormatWidth = uint16(p.fmt.Width)\n}\n\nfunc (p *printer) initDecimal(minFrac, maxFrac int) {\n\tf := &p.toDecimal\n\tf.MinIntegerDigits = 1\n\tf.MaxIntegerDigits = 0\n\tf.MinFractionDigits = uint8(minFrac)\n\tf.MaxFractionDigits = int16(maxFrac)\n\tp.setFlags(f)\n\tf.PadRune = 0\n\tif p.fmt.WidthPresent {\n\t\tif p.fmt.Zero {\n\t\t\twid := p.fmt.Width\n\t\t\t// Use significant integers for this.\n\t\t\t// TODO: this is not the same as width, but so be it.\n\t\t\tif f.MinFractionDigits > 0 {\n\t\t\t\twid -= 1 + int(f.MinFractionDigits)\n\t\t\t}\n\t\t\tif p.fmt.Plus || p.fmt.Space {\n\t\t\t\twid--\n\t\t\t}\n\t\t\tif wid > 0 && wid > int(f.MinIntegerDigits) {\n\t\t\t\tf.MinIntegerDigits = uint8(wid)\n\t\t\t}\n\t\t}\n\t\tp.updatePadding(f)\n\t}\n}\n\nfunc (p *printer) initScientific(minFrac, maxFrac int) {\n\tf := &p.toScientific\n\tif maxFrac < 0 {\n\t\tf.SetPrecision(maxFrac)\n\t} else {\n\t\tf.SetPrecision(maxFrac + 1)\n\t\tf.MinFractionDigits = uint8(minFrac)\n\t\tf.MaxFractionDigits = int16(maxFrac)\n\t}\n\tf.MinExponentDigits = 2\n\tp.setFlags(f)\n\tf.PadRune = 0\n\tif p.fmt.WidthPresent {\n\t\tf.Flags &^= number.PadMask\n\t\tif p.fmt.Zero {\n\t\t\tf.PadRune = f.Digit(0)\n\t\t\tf.Flags |= number.PadAfterPrefix\n\t\t} else {\n\t\t\tf.PadRune = ' '\n\t\t\tf.Flags |= number.PadBeforePrefix\n\t\t}\n\t\tp.updatePadding(f)\n\t}\n}\n\nfunc (p *printer) fmtDecimalInt(v uint64, isSigned bool) {\n\tvar d number.Decimal\n\n\tf := &p.toDecimal\n\tif p.fmt.PrecPresent {\n\t\tp.setFlags(f)\n\t\tf.MinIntegerDigits = uint8(p.fmt.Prec)\n\t\tf.MaxIntegerDigits = 0\n\t\tf.MinFractionDigits = 0\n\t\tf.MaxFractionDigits = 0\n\t\tif p.fmt.WidthPresent {\n\t\t\tp.updatePadding(f)\n\t\t}\n\t} else {\n\t\tp.initDecimal(0, 0)\n\t}\n\td.ConvertInt(p.toDecimal.RoundingContext, isSigned, v)\n\n\tout := p.toDecimal.Format([]byte(nil), &d)\n\tp.Buffer.Write(out)\n}\n\nfunc (p *printer) fmtDecimalFloat(v float64, size, prec int) {\n\tvar d number.Decimal\n\tif p.fmt.PrecPresent {\n\t\tprec = p.fmt.Prec\n\t}\n\tp.initDecimal(prec, prec)\n\td.ConvertFloat(p.toDecimal.RoundingContext, v, size)\n\n\tout := p.toDecimal.Format([]byte(nil), &d)\n\tp.Buffer.Write(out)\n}\n\nfunc (p *printer) fmtVariableFloat(v float64, size int) {\n\tprec := -1\n\tif p.fmt.PrecPresent {\n\t\tprec = p.fmt.Prec\n\t}\n\tvar d number.Decimal\n\tp.initScientific(0, prec)\n\td.ConvertFloat(p.toScientific.RoundingContext, v, size)\n\n\t// Copy logic of 'g' formatting from strconv. It is simplified a bit as\n\t// we don't have to mind having prec > len(d.Digits).\n\tshortest := prec < 0\n\tePrec := prec\n\tif shortest {\n\t\tprec = len(d.Digits)\n\t\tePrec = 6\n\t} else if prec == 0 {\n\t\tprec = 1\n\t\tePrec = 1\n\t}\n\texp := int(d.Exp) - 1\n\tif exp < -4 || exp >= ePrec {\n\t\tp.initScientific(0, prec)\n\n\t\tout := p.toScientific.Format([]byte(nil), &d)\n\t\tp.Buffer.Write(out)\n\t} else {\n\t\tif prec > int(d.Exp) {\n\t\t\tprec = len(d.Digits)\n\t\t}\n\t\tif prec -= int(d.Exp); prec < 0 {\n\t\t\tprec = 0\n\t\t}\n\t\tp.initDecimal(0, prec)\n\n\t\tout := p.toDecimal.Format([]byte(nil), &d)\n\t\tp.Buffer.Write(out)\n\t}\n}\n\nfunc (p *printer) fmtScientific(v float64, size, prec int) {\n\tvar d number.Decimal\n\tif p.fmt.PrecPresent {\n\t\tprec = p.fmt.Prec\n\t}\n\tp.initScientific(prec, prec)\n\trc := p.toScientific.RoundingContext\n\td.ConvertFloat(rc, v, size)\n\n\tout := p.toScientific.Format([]byte(nil), &d)\n\tp.Buffer.Write(out)\n\n}\n\n// fmtComplex formats a complex number v with\n// r = real(v) and j = imag(v) as (r+ji) using\n// fmtFloat for r and j formatting.\nfunc (p *printer) fmtComplex(v complex128, size int, verb rune) {\n\t// Make sure any unsupported verbs are found before the\n\t// calls to fmtFloat to not generate an incorrect error string.\n\tswitch verb {\n\tcase 'v', 'b', 'g', 'G', 'f', 'F', 'e', 'E':\n\t\tp.WriteByte('(')\n\t\tp.fmtFloat(real(v), size/2, verb)\n\t\t// Imaginary part always has a sign.\n\t\tif math.IsNaN(imag(v)) {\n\t\t\t// By CLDR's rules, NaNs do not use patterns or signs. As this code\n\t\t\t// relies on AlwaysSign working for imaginary parts, we need to\n\t\t\t// manually handle NaNs.\n\t\t\tf := &p.toScientific\n\t\t\tp.setFlags(f)\n\t\t\tp.updatePadding(f)\n\t\t\tp.setFlags(f)\n\t\t\tnan := f.Symbol(number.SymNan)\n\t\t\textra := 0\n\t\t\tif w, ok := p.Width(); ok {\n\t\t\t\textra = w - utf8.RuneCountInString(nan) - 1\n\t\t\t}\n\t\t\tif f.Flags&number.PadAfterNumber == 0 {\n\t\t\t\tfor ; extra > 0; extra-- {\n\t\t\t\t\tp.WriteRune(f.PadRune)\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.WriteString(f.Symbol(number.SymPlusSign))\n\t\t\tp.WriteString(nan)\n\t\t\tfor ; extra > 0; extra-- {\n\t\t\t\tp.WriteRune(f.PadRune)\n\t\t\t}\n\t\t\tp.WriteString(\"i)\")\n\t\t\treturn\n\t\t}\n\t\toldPlus := p.fmt.Plus\n\t\tp.fmt.Plus = true\n\t\tp.fmtFloat(imag(v), size/2, verb)\n\t\tp.WriteString(\"i)\") // TODO: use symbol?\n\t\tp.fmt.Plus = oldPlus\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *printer) fmtString(v string, verb rune) {\n\tswitch verb {\n\tcase 'v':\n\t\tif p.fmt.SharpV {\n\t\t\tp.fmt.fmt_q(v)\n\t\t} else {\n\t\t\tp.fmt.fmt_s(v)\n\t\t}\n\tcase 's':\n\t\tp.fmt.fmt_s(v)\n\tcase 'x':\n\t\tp.fmt.fmt_sx(v, ldigits)\n\tcase 'X':\n\t\tp.fmt.fmt_sx(v, udigits)\n\tcase 'q':\n\t\tp.fmt.fmt_q(v)\n\tcase 'm':\n\t\tctx := p.cat.Context(p.tag, rawPrinter{p})\n\t\tif ctx.Execute(v) == catalog.ErrNotFound {\n\t\t\tp.WriteString(v)\n\t\t}\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *printer) fmtBytes(v []byte, verb rune, typeString string) {\n\tswitch verb {\n\tcase 'v', 'd':\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteString(typeString)\n\t\t\tif v == nil {\n\t\t\t\tp.WriteString(nilParenString)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tp.WriteByte('{')\n\t\t\tfor i, c := range v {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tp.WriteString(commaSpaceString)\n\t\t\t\t}\n\t\t\t\tp.fmt0x64(uint64(c), true)\n\t\t\t}\n\t\t\tp.WriteByte('}')\n\t\t} else {\n\t\t\tp.WriteByte('[')\n\t\t\tfor i, c := range v {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tp.WriteByte(' ')\n\t\t\t\t}\n\t\t\t\tp.fmt.fmt_integer(uint64(c), 10, unsigned, ldigits)\n\t\t\t}\n\t\t\tp.WriteByte(']')\n\t\t}\n\tcase 's':\n\t\tp.fmt.fmt_s(string(v))\n\tcase 'x':\n\t\tp.fmt.fmt_bx(v, ldigits)\n\tcase 'X':\n\t\tp.fmt.fmt_bx(v, udigits)\n\tcase 'q':\n\t\tp.fmt.fmt_q(string(v))\n\tdefault:\n\t\tp.printValue(reflect.ValueOf(v), verb, 0)\n\t}\n}\n\nfunc (p *printer) fmtPointer(value reflect.Value, verb rune) {\n\tvar u uintptr\n\tswitch value.Kind() {\n\tcase reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer:\n\t\tu = value.Pointer()\n\tdefault:\n\t\tp.badVerb(verb)\n\t\treturn\n\t}\n\n\tswitch verb {\n\tcase 'v':\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteByte('(')\n\t\t\tp.WriteString(value.Type().String())\n\t\t\tp.WriteString(\")(\")\n\t\t\tif u == 0 {\n\t\t\t\tp.WriteString(nilString)\n\t\t\t} else {\n\t\t\t\tp.fmt0x64(uint64(u), true)\n\t\t\t}\n\t\t\tp.WriteByte(')')\n\t\t} else {\n\t\t\tif u == 0 {\n\t\t\t\tp.fmt.padString(nilAngleString)\n\t\t\t} else {\n\t\t\t\tp.fmt0x64(uint64(u), !p.fmt.Sharp)\n\t\t\t}\n\t\t}\n\tcase 'p':\n\t\tp.fmt0x64(uint64(u), !p.fmt.Sharp)\n\tcase 'b', 'o', 'd', 'x', 'X':\n\t\tif verb == 'd' {\n\t\t\tp.fmt.Sharp = true // Print as standard go. TODO: does this make sense?\n\t\t}\n\t\tp.fmtInteger(uint64(u), unsigned, verb)\n\tdefault:\n\t\tp.badVerb(verb)\n\t}\n}\n\nfunc (p *printer) catchPanic(arg interface{}, verb rune) {\n\tif err := recover(); err != nil {\n\t\t// If it's a nil pointer, just say \"<nil>\". The likeliest causes are a\n\t\t// Stringer that fails to guard against nil or a nil pointer for a\n\t\t// value receiver, and in either case, \"<nil>\" is a nice result.\n\t\tif v := reflect.ValueOf(arg); v.Kind() == reflect.Ptr && v.IsNil() {\n\t\t\tp.WriteString(nilAngleString)\n\t\t\treturn\n\t\t}\n\t\t// Otherwise print a concise panic message. Most of the time the panic\n\t\t// value will print itself nicely.\n\t\tif p.panicking {\n\t\t\t// Nested panics; the recursion in printArg cannot succeed.\n\t\t\tpanic(err)\n\t\t}\n\n\t\toldFlags := p.fmt.Parser\n\t\t// For this output we want default behavior.\n\t\tp.fmt.ClearFlags()\n\n\t\tp.WriteString(percentBangString)\n\t\tp.WriteRune(verb)\n\t\tp.WriteString(panicString)\n\t\tp.panicking = true\n\t\tp.printArg(err, 'v')\n\t\tp.panicking = false\n\t\tp.WriteByte(')')\n\n\t\tp.fmt.Parser = oldFlags\n\t}\n}\n\nfunc (p *printer) handleMethods(verb rune) (handled bool) {\n\tif p.erroring {\n\t\treturn\n\t}\n\t// Is it a Formatter?\n\tif formatter, ok := p.arg.(format.Formatter); ok {\n\t\thandled = true\n\t\tdefer p.catchPanic(p.arg, verb)\n\t\tformatter.Format(p, verb)\n\t\treturn\n\t}\n\tif formatter, ok := p.arg.(fmt.Formatter); ok {\n\t\thandled = true\n\t\tdefer p.catchPanic(p.arg, verb)\n\t\tformatter.Format(p, verb)\n\t\treturn\n\t}\n\n\t// If we're doing Go syntax and the argument knows how to supply it, take care of it now.\n\tif p.fmt.SharpV {\n\t\tif stringer, ok := p.arg.(fmt.GoStringer); ok {\n\t\t\thandled = true\n\t\t\tdefer p.catchPanic(p.arg, verb)\n\t\t\t// Print the result of GoString unadorned.\n\t\t\tp.fmt.fmt_s(stringer.GoString())\n\t\t\treturn\n\t\t}\n\t} else {\n\t\t// If a string is acceptable according to the format, see if\n\t\t// the value satisfies one of the string-valued interfaces.\n\t\t// Println etc. set verb to %v, which is \"stringable\".\n\t\tswitch verb {\n\t\tcase 'v', 's', 'x', 'X', 'q':\n\t\t\t// Is it an error or Stringer?\n\t\t\t// The duplication in the bodies is necessary:\n\t\t\t// setting handled and deferring catchPanic\n\t\t\t// must happen before calling the method.\n\t\t\tswitch v := p.arg.(type) {\n\t\t\tcase error:\n\t\t\t\thandled = true\n\t\t\t\tdefer p.catchPanic(p.arg, verb)\n\t\t\t\tp.fmtString(v.Error(), verb)\n\t\t\t\treturn\n\n\t\t\tcase fmt.Stringer:\n\t\t\t\thandled = true\n\t\t\t\tdefer p.catchPanic(p.arg, verb)\n\t\t\t\tp.fmtString(v.String(), verb)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (p *printer) printArg(arg interface{}, verb rune) {\n\tp.arg = arg\n\tp.value = reflect.Value{}\n\n\tif arg == nil {\n\t\tswitch verb {\n\t\tcase 'T', 'v':\n\t\t\tp.fmt.padString(nilAngleString)\n\t\tdefault:\n\t\t\tp.badVerb(verb)\n\t\t}\n\t\treturn\n\t}\n\n\t// Special processing considerations.\n\t// %T (the value's type) and %p (its address) are special; we always do them first.\n\tswitch verb {\n\tcase 'T':\n\t\tp.fmt.fmt_s(reflect.TypeOf(arg).String())\n\t\treturn\n\tcase 'p':\n\t\tp.fmtPointer(reflect.ValueOf(arg), 'p')\n\t\treturn\n\t}\n\n\t// Some types can be done without reflection.\n\tswitch f := arg.(type) {\n\tcase bool:\n\t\tp.fmtBool(f, verb)\n\tcase float32:\n\t\tp.fmtFloat(float64(f), 32, verb)\n\tcase float64:\n\t\tp.fmtFloat(f, 64, verb)\n\tcase complex64:\n\t\tp.fmtComplex(complex128(f), 64, verb)\n\tcase complex128:\n\t\tp.fmtComplex(f, 128, verb)\n\tcase int:\n\t\tp.fmtInteger(uint64(f), signed, verb)\n\tcase int8:\n\t\tp.fmtInteger(uint64(f), signed, verb)\n\tcase int16:\n\t\tp.fmtInteger(uint64(f), signed, verb)\n\tcase int32:\n\t\tp.fmtInteger(uint64(f), signed, verb)\n\tcase int64:\n\t\tp.fmtInteger(uint64(f), signed, verb)\n\tcase uint:\n\t\tp.fmtInteger(uint64(f), unsigned, verb)\n\tcase uint8:\n\t\tp.fmtInteger(uint64(f), unsigned, verb)\n\tcase uint16:\n\t\tp.fmtInteger(uint64(f), unsigned, verb)\n\tcase uint32:\n\t\tp.fmtInteger(uint64(f), unsigned, verb)\n\tcase uint64:\n\t\tp.fmtInteger(f, unsigned, verb)\n\tcase uintptr:\n\t\tp.fmtInteger(uint64(f), unsigned, verb)\n\tcase string:\n\t\tp.fmtString(f, verb)\n\tcase []byte:\n\t\tp.fmtBytes(f, verb, \"[]byte\")\n\tcase reflect.Value:\n\t\t// Handle extractable values with special methods\n\t\t// since printValue does not handle them at depth 0.\n\t\tif f.IsValid() && f.CanInterface() {\n\t\t\tp.arg = f.Interface()\n\t\t\tif p.handleMethods(verb) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tp.printValue(f, verb, 0)\n\tdefault:\n\t\t// If the type is not simple, it might have methods.\n\t\tif !p.handleMethods(verb) {\n\t\t\t// Need to use reflection, since the type had no\n\t\t\t// interface methods that could be used for formatting.\n\t\t\tp.printValue(reflect.ValueOf(f), verb, 0)\n\t\t}\n\t}\n}\n\n// printValue is similar to printArg but starts with a reflect value, not an interface{} value.\n// It does not handle 'p' and 'T' verbs because these should have been already handled by printArg.\nfunc (p *printer) printValue(value reflect.Value, verb rune, depth int) {\n\t// Handle values with special methods if not already handled by printArg (depth == 0).\n\tif depth > 0 && value.IsValid() && value.CanInterface() {\n\t\tp.arg = value.Interface()\n\t\tif p.handleMethods(verb) {\n\t\t\treturn\n\t\t}\n\t}\n\tp.arg = nil\n\tp.value = value\n\n\tswitch f := value; value.Kind() {\n\tcase reflect.Invalid:\n\t\tif depth == 0 {\n\t\t\tp.WriteString(invReflectString)\n\t\t} else {\n\t\t\tswitch verb {\n\t\t\tcase 'v':\n\t\t\t\tp.WriteString(nilAngleString)\n\t\t\tdefault:\n\t\t\t\tp.badVerb(verb)\n\t\t\t}\n\t\t}\n\tcase reflect.Bool:\n\t\tp.fmtBool(f.Bool(), verb)\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tp.fmtInteger(uint64(f.Int()), signed, verb)\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\tp.fmtInteger(f.Uint(), unsigned, verb)\n\tcase reflect.Float32:\n\t\tp.fmtFloat(f.Float(), 32, verb)\n\tcase reflect.Float64:\n\t\tp.fmtFloat(f.Float(), 64, verb)\n\tcase reflect.Complex64:\n\t\tp.fmtComplex(f.Complex(), 64, verb)\n\tcase reflect.Complex128:\n\t\tp.fmtComplex(f.Complex(), 128, verb)\n\tcase reflect.String:\n\t\tp.fmtString(f.String(), verb)\n\tcase reflect.Map:\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteString(f.Type().String())\n\t\t\tif f.IsNil() {\n\t\t\t\tp.WriteString(nilParenString)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tp.WriteByte('{')\n\t\t} else {\n\t\t\tp.WriteString(mapString)\n\t\t}\n\t\tkeys := f.MapKeys()\n\t\tfor i, key := range keys {\n\t\t\tif i > 0 {\n\t\t\t\tif p.fmt.SharpV {\n\t\t\t\t\tp.WriteString(commaSpaceString)\n\t\t\t\t} else {\n\t\t\t\t\tp.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printValue(key, verb, depth+1)\n\t\t\tp.WriteByte(':')\n\t\t\tp.printValue(f.MapIndex(key), verb, depth+1)\n\t\t}\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteByte('}')\n\t\t} else {\n\t\t\tp.WriteByte(']')\n\t\t}\n\tcase reflect.Struct:\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteString(f.Type().String())\n\t\t}\n\t\tp.WriteByte('{')\n\t\tfor i := 0; i < f.NumField(); i++ {\n\t\t\tif i > 0 {\n\t\t\t\tif p.fmt.SharpV {\n\t\t\t\t\tp.WriteString(commaSpaceString)\n\t\t\t\t} else {\n\t\t\t\t\tp.WriteByte(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t\tif p.fmt.PlusV || p.fmt.SharpV {\n\t\t\t\tif name := f.Type().Field(i).Name; name != \"\" {\n\t\t\t\t\tp.WriteString(name)\n\t\t\t\t\tp.WriteByte(':')\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.printValue(getField(f, i), verb, depth+1)\n\t\t}\n\t\tp.WriteByte('}')\n\tcase reflect.Interface:\n\t\tvalue := f.Elem()\n\t\tif !value.IsValid() {\n\t\t\tif p.fmt.SharpV {\n\t\t\t\tp.WriteString(f.Type().String())\n\t\t\t\tp.WriteString(nilParenString)\n\t\t\t} else {\n\t\t\t\tp.WriteString(nilAngleString)\n\t\t\t}\n\t\t} else {\n\t\t\tp.printValue(value, verb, depth+1)\n\t\t}\n\tcase reflect.Array, reflect.Slice:\n\t\tswitch verb {\n\t\tcase 's', 'q', 'x', 'X':\n\t\t\t// Handle byte and uint8 slices and arrays special for the above verbs.\n\t\t\tt := f.Type()\n\t\t\tif t.Elem().Kind() == reflect.Uint8 {\n\t\t\t\tvar bytes []byte\n\t\t\t\tif f.Kind() == reflect.Slice {\n\t\t\t\t\tbytes = f.Bytes()\n\t\t\t\t} else if f.CanAddr() {\n\t\t\t\t\tbytes = f.Slice(0, f.Len()).Bytes()\n\t\t\t\t} else {\n\t\t\t\t\t// We have an array, but we cannot Slice() a non-addressable array,\n\t\t\t\t\t// so we build a slice by hand. This is a rare case but it would be nice\n\t\t\t\t\t// if reflection could help a little more.\n\t\t\t\t\tbytes = make([]byte, f.Len())\n\t\t\t\t\tfor i := range bytes {\n\t\t\t\t\t\tbytes[i] = byte(f.Index(i).Uint())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tp.fmtBytes(bytes, verb, t.String())\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tif p.fmt.SharpV {\n\t\t\tp.WriteString(f.Type().String())\n\t\t\tif f.Kind() == reflect.Slice && f.IsNil() {\n\t\t\t\tp.WriteString(nilParenString)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tp.WriteByte('{')\n\t\t\tfor i := 0; i < f.Len(); i++ {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tp.WriteString(commaSpaceString)\n\t\t\t\t}\n\t\t\t\tp.printValue(f.Index(i), verb, depth+1)\n\t\t\t}\n\t\t\tp.WriteByte('}')\n\t\t} else {\n\t\t\tp.WriteByte('[')\n\t\t\tfor i := 0; i < f.Len(); i++ {\n\t\t\t\tif i > 0 {\n\t\t\t\t\tp.WriteByte(' ')\n\t\t\t\t}\n\t\t\t\tp.printValue(f.Index(i), verb, depth+1)\n\t\t\t}\n\t\t\tp.WriteByte(']')\n\t\t}\n\tcase reflect.Ptr:\n\t\t// pointer to array or slice or struct?  ok at top level\n\t\t// but not embedded (avoid loops)\n\t\tif depth == 0 && f.Pointer() != 0 {\n\t\t\tswitch a := f.Elem(); a.Kind() {\n\t\t\tcase reflect.Array, reflect.Slice, reflect.Struct, reflect.Map:\n\t\t\t\tp.WriteByte('&')\n\t\t\t\tp.printValue(a, verb, depth+1)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tfallthrough\n\tcase reflect.Chan, reflect.Func, reflect.UnsafePointer:\n\t\tp.fmtPointer(f, verb)\n\tdefault:\n\t\tp.unknownType(f)\n\t}\n}\n\nfunc (p *printer) badArgNum(verb rune) {\n\tp.WriteString(percentBangString)\n\tp.WriteRune(verb)\n\tp.WriteString(badIndexString)\n}\n\nfunc (p *printer) missingArg(verb rune) {\n\tp.WriteString(percentBangString)\n\tp.WriteRune(verb)\n\tp.WriteString(missingString)\n}\n\nfunc (p *printer) doPrintf(fmt string) {\n\tfor p.fmt.Parser.SetFormat(fmt); p.fmt.Scan(); {\n\t\tswitch p.fmt.Status {\n\t\tcase format.StatusText:\n\t\t\tp.WriteString(p.fmt.Text())\n\t\tcase format.StatusSubstitution:\n\t\t\tp.printArg(p.Arg(p.fmt.ArgNum), p.fmt.Verb)\n\t\tcase format.StatusBadWidthSubstitution:\n\t\t\tp.WriteString(badWidthString)\n\t\t\tp.printArg(p.Arg(p.fmt.ArgNum), p.fmt.Verb)\n\t\tcase format.StatusBadPrecSubstitution:\n\t\t\tp.WriteString(badPrecString)\n\t\t\tp.printArg(p.Arg(p.fmt.ArgNum), p.fmt.Verb)\n\t\tcase format.StatusNoVerb:\n\t\t\tp.WriteString(noVerbString)\n\t\tcase format.StatusBadArgNum:\n\t\t\tp.badArgNum(p.fmt.Verb)\n\t\tcase format.StatusMissingArg:\n\t\t\tp.missingArg(p.fmt.Verb)\n\t\tdefault:\n\t\t\tpanic(\"unreachable\")\n\t\t}\n\t}\n\n\t// Check for extra arguments, but only if there was at least one ordered\n\t// argument. Note that this behavior is necessarily different from fmt:\n\t// different variants of messages may opt to drop some or all of the\n\t// arguments.\n\tif !p.fmt.Reordered && p.fmt.ArgNum < len(p.fmt.Args) && p.fmt.ArgNum != 0 {\n\t\tp.fmt.ClearFlags()\n\t\tp.WriteString(extraString)\n\t\tfor i, arg := range p.fmt.Args[p.fmt.ArgNum:] {\n\t\t\tif i > 0 {\n\t\t\t\tp.WriteString(commaSpaceString)\n\t\t\t}\n\t\t\tif arg == nil {\n\t\t\t\tp.WriteString(nilAngleString)\n\t\t\t} else {\n\t\t\t\tp.WriteString(reflect.TypeOf(arg).String())\n\t\t\t\tp.WriteString(\"=\")\n\t\t\t\tp.printArg(arg, 'v')\n\t\t\t}\n\t\t}\n\t\tp.WriteByte(')')\n\t}\n}\n\nfunc (p *printer) doPrint(a []interface{}) {\n\tprevString := false\n\tfor argNum, arg := range a {\n\t\tisString := arg != nil && reflect.TypeOf(arg).Kind() == reflect.String\n\t\t// Add a space between two non-string arguments.\n\t\tif argNum > 0 && !isString && !prevString {\n\t\t\tp.WriteByte(' ')\n\t\t}\n\t\tp.printArg(arg, 'v')\n\t\tprevString = isString\n\t}\n}\n\n// doPrintln is like doPrint but always adds a space between arguments\n// and a newline after the last argument.\nfunc (p *printer) doPrintln(a []interface{}) {\n\tfor argNum, arg := range a {\n\t\tif argNum > 0 {\n\t\t\tp.WriteByte(' ')\n\t\t}\n\t\tp.printArg(arg, 'v')\n\t}\n\tp.WriteByte('\\n')\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/secure/bidirule/bidirule.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package bidirule implements the Bidi Rule defined by RFC 5893.\n//\n// This package is under development. The API may change without notice and\n// without preserving backward compatibility.\npackage bidirule\n\nimport (\n\t\"errors\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/transform\"\n\t\"golang.org/x/text/unicode/bidi\"\n)\n\n// This file contains an implementation of RFC 5893: Right-to-Left Scripts for\n// Internationalized Domain Names for Applications (IDNA)\n//\n// A label is an individual component of a domain name.  Labels are usually\n// shown separated by dots; for example, the domain name \"www.example.com\" is\n// composed of three labels: \"www\", \"example\", and \"com\".\n//\n// An RTL label is a label that contains at least one character of class R, AL,\n// or AN. An LTR label is any label that is not an RTL label.\n//\n// A \"Bidi domain name\" is a domain name that contains at least one RTL label.\n//\n//  The following guarantees can be made based on the above:\n//\n//  o  In a domain name consisting of only labels that satisfy the rule,\n//     the requirements of Section 3 are satisfied.  Note that even LTR\n//     labels and pure ASCII labels have to be tested.\n//\n//  o  In a domain name consisting of only LDH labels (as defined in the\n//     Definitions document [RFC5890]) and labels that satisfy the rule,\n//     the requirements of Section 3 are satisfied as long as a label\n//     that starts with an ASCII digit does not come after a\n//     right-to-left label.\n//\n//  No guarantee is given for other combinations.\n\n// ErrInvalid indicates a label is invalid according to the Bidi Rule.\nvar ErrInvalid = errors.New(\"bidirule: failed Bidi Rule\")\n\ntype ruleState uint8\n\nconst (\n\truleInitial ruleState = iota\n\truleLTR\n\truleLTRFinal\n\truleRTL\n\truleRTLFinal\n\truleInvalid\n)\n\ntype ruleTransition struct {\n\tnext ruleState\n\tmask uint16\n}\n\nvar transitions = [...][2]ruleTransition{\n\t// [2.1] The first character must be a character with Bidi property L, R, or\n\t// AL. If it has the R or AL property, it is an RTL label; if it has the L\n\t// property, it is an LTR label.\n\truleInitial: {\n\t\t{ruleLTRFinal, 1 << bidi.L},\n\t\t{ruleRTLFinal, 1<<bidi.R | 1<<bidi.AL},\n\t},\n\truleRTL: {\n\t\t// [2.3] In an RTL label, the end of the label must be a character with\n\t\t// Bidi property R, AL, EN, or AN, followed by zero or more characters\n\t\t// with Bidi property NSM.\n\t\t{ruleRTLFinal, 1<<bidi.R | 1<<bidi.AL | 1<<bidi.EN | 1<<bidi.AN},\n\n\t\t// [2.2] In an RTL label, only characters with the Bidi properties R,\n\t\t// AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed.\n\t\t// We exclude the entries from [2.3]\n\t\t{ruleRTL, 1<<bidi.ES | 1<<bidi.CS | 1<<bidi.ET | 1<<bidi.ON | 1<<bidi.BN | 1<<bidi.NSM},\n\t},\n\truleRTLFinal: {\n\t\t// [2.3] In an RTL label, the end of the label must be a character with\n\t\t// Bidi property R, AL, EN, or AN, followed by zero or more characters\n\t\t// with Bidi property NSM.\n\t\t{ruleRTLFinal, 1<<bidi.R | 1<<bidi.AL | 1<<bidi.EN | 1<<bidi.AN | 1<<bidi.NSM},\n\n\t\t// [2.2] In an RTL label, only characters with the Bidi properties R,\n\t\t// AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed.\n\t\t// We exclude the entries from [2.3] and NSM.\n\t\t{ruleRTL, 1<<bidi.ES | 1<<bidi.CS | 1<<bidi.ET | 1<<bidi.ON | 1<<bidi.BN},\n\t},\n\truleLTR: {\n\t\t// [2.6] In an LTR label, the end of the label must be a character with\n\t\t// Bidi property L or EN, followed by zero or more characters with Bidi\n\t\t// property NSM.\n\t\t{ruleLTRFinal, 1<<bidi.L | 1<<bidi.EN},\n\n\t\t// [2.5] In an LTR label, only characters with the Bidi properties L,\n\t\t// EN, ES, CS, ET, ON, BN, or NSM are allowed.\n\t\t// We exclude the entries from [2.6].\n\t\t{ruleLTR, 1<<bidi.ES | 1<<bidi.CS | 1<<bidi.ET | 1<<bidi.ON | 1<<bidi.BN | 1<<bidi.NSM},\n\t},\n\truleLTRFinal: {\n\t\t// [2.6] In an LTR label, the end of the label must be a character with\n\t\t// Bidi property L or EN, followed by zero or more characters with Bidi\n\t\t// property NSM.\n\t\t{ruleLTRFinal, 1<<bidi.L | 1<<bidi.EN | 1<<bidi.NSM},\n\n\t\t// [2.5] In an LTR label, only characters with the Bidi properties L,\n\t\t// EN, ES, CS, ET, ON, BN, or NSM are allowed.\n\t\t// We exclude the entries from [2.6].\n\t\t{ruleLTR, 1<<bidi.ES | 1<<bidi.CS | 1<<bidi.ET | 1<<bidi.ON | 1<<bidi.BN},\n\t},\n\truleInvalid: {\n\t\t{ruleInvalid, 0},\n\t\t{ruleInvalid, 0},\n\t},\n}\n\n// [2.4] In an RTL label, if an EN is present, no AN may be present, and\n// vice versa.\nconst exclusiveRTL = uint16(1<<bidi.EN | 1<<bidi.AN)\n\n// From RFC 5893\n// An RTL label is a label that contains at least one character of type\n// R, AL, or AN.\n//\n// An LTR label is any label that is not an RTL label.\n\n// Direction reports the direction of the given label as defined by RFC 5893.\n// The Bidi Rule does not have to be applied to labels of the category\n// LeftToRight.\nfunc Direction(b []byte) bidi.Direction {\n\tfor i := 0; i < len(b); {\n\t\te, sz := bidi.Lookup(b[i:])\n\t\tif sz == 0 {\n\t\t\ti++\n\t\t}\n\t\tc := e.Class()\n\t\tif c == bidi.R || c == bidi.AL || c == bidi.AN {\n\t\t\treturn bidi.RightToLeft\n\t\t}\n\t\ti += sz\n\t}\n\treturn bidi.LeftToRight\n}\n\n// DirectionString reports the direction of the given label as defined by RFC\n// 5893. The Bidi Rule does not have to be applied to labels of the category\n// LeftToRight.\nfunc DirectionString(s string) bidi.Direction {\n\tfor i := 0; i < len(s); {\n\t\te, sz := bidi.LookupString(s[i:])\n\t\tif sz == 0 {\n\t\t\ti++\n\t\t\tcontinue\n\t\t}\n\t\tc := e.Class()\n\t\tif c == bidi.R || c == bidi.AL || c == bidi.AN {\n\t\t\treturn bidi.RightToLeft\n\t\t}\n\t\ti += sz\n\t}\n\treturn bidi.LeftToRight\n}\n\n// Valid reports whether b conforms to the BiDi rule.\nfunc Valid(b []byte) bool {\n\tvar t Transformer\n\tif n, ok := t.advance(b); !ok || n < len(b) {\n\t\treturn false\n\t}\n\treturn t.isFinal()\n}\n\n// ValidString reports whether s conforms to the BiDi rule.\nfunc ValidString(s string) bool {\n\tvar t Transformer\n\tif n, ok := t.advanceString(s); !ok || n < len(s) {\n\t\treturn false\n\t}\n\treturn t.isFinal()\n}\n\n// New returns a Transformer that verifies that input adheres to the Bidi Rule.\nfunc New() *Transformer {\n\treturn &Transformer{}\n}\n\n// Transformer implements transform.Transform.\ntype Transformer struct {\n\tstate  ruleState\n\thasRTL bool\n\tseen   uint16\n}\n\n// A rule can only be violated for \"Bidi Domain names\", meaning if one of the\n// following categories has been observed.\nfunc (t *Transformer) isRTL() bool {\n\tconst isRTL = 1<<bidi.R | 1<<bidi.AL | 1<<bidi.AN\n\treturn t.seen&isRTL != 0\n}\n\n// Reset implements transform.Transformer.\nfunc (t *Transformer) Reset() { *t = Transformer{} }\n\n// Transform implements transform.Transformer. This Transformer has state and\n// needs to be reset between uses.\nfunc (t *Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\tif len(dst) < len(src) {\n\t\tsrc = src[:len(dst)]\n\t\tatEOF = false\n\t\terr = transform.ErrShortDst\n\t}\n\tn, err1 := t.Span(src, atEOF)\n\tcopy(dst, src[:n])\n\tif err == nil || err1 != nil && err1 != transform.ErrShortSrc {\n\t\terr = err1\n\t}\n\treturn n, n, err\n}\n\n// Span returns the first n bytes of src that conform to the Bidi rule.\nfunc (t *Transformer) Span(src []byte, atEOF bool) (n int, err error) {\n\tif t.state == ruleInvalid && t.isRTL() {\n\t\treturn 0, ErrInvalid\n\t}\n\tn, ok := t.advance(src)\n\tswitch {\n\tcase !ok:\n\t\terr = ErrInvalid\n\tcase n < len(src):\n\t\tif !atEOF {\n\t\t\terr = transform.ErrShortSrc\n\t\t\tbreak\n\t\t}\n\t\terr = ErrInvalid\n\tcase !t.isFinal():\n\t\terr = ErrInvalid\n\t}\n\treturn n, err\n}\n\n// Precomputing the ASCII values decreases running time for the ASCII fast path\n// by about 30%.\nvar asciiTable [128]bidi.Properties\n\nfunc init() {\n\tfor i := range asciiTable {\n\t\tp, _ := bidi.LookupRune(rune(i))\n\t\tasciiTable[i] = p\n\t}\n}\n\nfunc (t *Transformer) advance(s []byte) (n int, ok bool) {\n\tvar e bidi.Properties\n\tvar sz int\n\tfor n < len(s) {\n\t\tif s[n] < utf8.RuneSelf {\n\t\t\te, sz = asciiTable[s[n]], 1\n\t\t} else {\n\t\t\te, sz = bidi.Lookup(s[n:])\n\t\t\tif sz <= 1 {\n\t\t\t\tif sz == 1 {\n\t\t\t\t\t// We always consider invalid UTF-8 to be invalid, even if\n\t\t\t\t\t// the string has not yet been determined to be RTL.\n\t\t\t\t\t// TODO: is this correct?\n\t\t\t\t\treturn n, false\n\t\t\t\t}\n\t\t\t\treturn n, true // incomplete UTF-8 encoding\n\t\t\t}\n\t\t}\n\t\t// TODO: using CompactClass would result in noticeable speedup.\n\t\t// See unicode/bidi/prop.go:Properties.CompactClass.\n\t\tc := uint16(1 << e.Class())\n\t\tt.seen |= c\n\t\tif t.seen&exclusiveRTL == exclusiveRTL {\n\t\t\tt.state = ruleInvalid\n\t\t\treturn n, false\n\t\t}\n\t\tswitch tr := transitions[t.state]; {\n\t\tcase tr[0].mask&c != 0:\n\t\t\tt.state = tr[0].next\n\t\tcase tr[1].mask&c != 0:\n\t\t\tt.state = tr[1].next\n\t\tdefault:\n\t\t\tt.state = ruleInvalid\n\t\t\tif t.isRTL() {\n\t\t\t\treturn n, false\n\t\t\t}\n\t\t}\n\t\tn += sz\n\t}\n\treturn n, true\n}\n\nfunc (t *Transformer) advanceString(s string) (n int, ok bool) {\n\tvar e bidi.Properties\n\tvar sz int\n\tfor n < len(s) {\n\t\tif s[n] < utf8.RuneSelf {\n\t\t\te, sz = asciiTable[s[n]], 1\n\t\t} else {\n\t\t\te, sz = bidi.LookupString(s[n:])\n\t\t\tif sz <= 1 {\n\t\t\t\tif sz == 1 {\n\t\t\t\t\treturn n, false // invalid UTF-8\n\t\t\t\t}\n\t\t\t\treturn n, true // incomplete UTF-8 encoding\n\t\t\t}\n\t\t}\n\t\t// TODO: using CompactClass results in noticeable speedup.\n\t\t// See unicode/bidi/prop.go:Properties.CompactClass.\n\t\tc := uint16(1 << e.Class())\n\t\tt.seen |= c\n\t\tif t.seen&exclusiveRTL == exclusiveRTL {\n\t\t\tt.state = ruleInvalid\n\t\t\treturn n, false\n\t\t}\n\t\tswitch tr := transitions[t.state]; {\n\t\tcase tr[0].mask&c != 0:\n\t\t\tt.state = tr[0].next\n\t\tcase tr[1].mask&c != 0:\n\t\t\tt.state = tr[1].next\n\t\tdefault:\n\t\t\tt.state = ruleInvalid\n\t\t\tif t.isRTL() {\n\t\t\t\treturn n, false\n\t\t\t}\n\t\t}\n\t\tn += sz\n\t}\n\treturn n, true\n}\n\nfunc (t *Transformer) isFinal() bool {\n\treturn t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/transform/transform.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package transform provides reader and writer wrappers that transform the\n// bytes passing through as well as various transformations. Example\n// transformations provided by other packages include normalization and\n// conversion between character sets.\npackage transform // import \"golang.org/x/text/transform\"\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"io\"\n\t\"unicode/utf8\"\n)\n\nvar (\n\t// ErrShortDst means that the destination buffer was too short to\n\t// receive all of the transformed bytes.\n\tErrShortDst = errors.New(\"transform: short destination buffer\")\n\n\t// ErrShortSrc means that the source buffer has insufficient data to\n\t// complete the transformation.\n\tErrShortSrc = errors.New(\"transform: short source buffer\")\n\n\t// ErrEndOfSpan means that the input and output (the transformed input)\n\t// are not identical.\n\tErrEndOfSpan = errors.New(\"transform: input and output are not identical\")\n\n\t// errInconsistentByteCount means that Transform returned success (nil\n\t// error) but also returned nSrc inconsistent with the src argument.\n\terrInconsistentByteCount = errors.New(\"transform: inconsistent byte count returned\")\n\n\t// errShortInternal means that an internal buffer is not large enough\n\t// to make progress and the Transform operation must be aborted.\n\terrShortInternal = errors.New(\"transform: short internal buffer\")\n)\n\n// Transformer transforms bytes.\ntype Transformer interface {\n\t// Transform writes to dst the transformed bytes read from src, and\n\t// returns the number of dst bytes written and src bytes read. The\n\t// atEOF argument tells whether src represents the last bytes of the\n\t// input.\n\t//\n\t// Callers should always process the nDst bytes produced and account\n\t// for the nSrc bytes consumed before considering the error err.\n\t//\n\t// A nil error means that all of the transformed bytes (whether freshly\n\t// transformed from src or left over from previous Transform calls)\n\t// were written to dst. A nil error can be returned regardless of\n\t// whether atEOF is true. If err is nil then nSrc must equal len(src);\n\t// the converse is not necessarily true.\n\t//\n\t// ErrShortDst means that dst was too short to receive all of the\n\t// transformed bytes. ErrShortSrc means that src had insufficient data\n\t// to complete the transformation. If both conditions apply, then\n\t// either error may be returned. Other than the error conditions listed\n\t// here, implementations are free to report other errors that arise.\n\tTransform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error)\n\n\t// Reset resets the state and allows a Transformer to be reused.\n\tReset()\n}\n\n// SpanningTransformer extends the Transformer interface with a Span method\n// that determines how much of the input already conforms to the Transformer.\ntype SpanningTransformer interface {\n\tTransformer\n\n\t// Span returns a position in src such that transforming src[:n] results in\n\t// identical output src[:n] for these bytes. It does not necessarily return\n\t// the largest such n. The atEOF argument tells whether src represents the\n\t// last bytes of the input.\n\t//\n\t// Callers should always account for the n bytes consumed before\n\t// considering the error err.\n\t//\n\t// A nil error means that all input bytes are known to be identical to the\n\t// output produced by the Transformer. A nil error can be returned\n\t// regardless of whether atEOF is true. If err is nil, then n must\n\t// equal len(src); the converse is not necessarily true.\n\t//\n\t// ErrEndOfSpan means that the Transformer output may differ from the\n\t// input after n bytes. Note that n may be len(src), meaning that the output\n\t// would contain additional bytes after otherwise identical output.\n\t// ErrShortSrc means that src had insufficient data to determine whether the\n\t// remaining bytes would change. Other than the error conditions listed\n\t// here, implementations are free to report other errors that arise.\n\t//\n\t// Calling Span can modify the Transformer state as a side effect. In\n\t// effect, it does the transformation just as calling Transform would, only\n\t// without copying to a destination buffer and only up to a point it can\n\t// determine the input and output bytes are the same. This is obviously more\n\t// limited than calling Transform, but can be more efficient in terms of\n\t// copying and allocating buffers. Calls to Span and Transform may be\n\t// interleaved.\n\tSpan(src []byte, atEOF bool) (n int, err error)\n}\n\n// NopResetter can be embedded by implementations of Transformer to add a nop\n// Reset method.\ntype NopResetter struct{}\n\n// Reset implements the Reset method of the Transformer interface.\nfunc (NopResetter) Reset() {}\n\n// Reader wraps another io.Reader by transforming the bytes read.\ntype Reader struct {\n\tr   io.Reader\n\tt   Transformer\n\terr error\n\n\t// dst[dst0:dst1] contains bytes that have been transformed by t but\n\t// not yet copied out via Read.\n\tdst        []byte\n\tdst0, dst1 int\n\n\t// src[src0:src1] contains bytes that have been read from r but not\n\t// yet transformed through t.\n\tsrc        []byte\n\tsrc0, src1 int\n\n\t// transformComplete is whether the transformation is complete,\n\t// regardless of whether or not it was successful.\n\ttransformComplete bool\n}\n\nconst defaultBufSize = 4096\n\n// NewReader returns a new Reader that wraps r by transforming the bytes read\n// via t. It calls Reset on t.\nfunc NewReader(r io.Reader, t Transformer) *Reader {\n\tt.Reset()\n\treturn &Reader{\n\t\tr:   r,\n\t\tt:   t,\n\t\tdst: make([]byte, defaultBufSize),\n\t\tsrc: make([]byte, defaultBufSize),\n\t}\n}\n\n// Read implements the io.Reader interface.\nfunc (r *Reader) Read(p []byte) (int, error) {\n\tn, err := 0, error(nil)\n\tfor {\n\t\t// Copy out any transformed bytes and return the final error if we are done.\n\t\tif r.dst0 != r.dst1 {\n\t\t\tn = copy(p, r.dst[r.dst0:r.dst1])\n\t\t\tr.dst0 += n\n\t\t\tif r.dst0 == r.dst1 && r.transformComplete {\n\t\t\t\treturn n, r.err\n\t\t\t}\n\t\t\treturn n, nil\n\t\t} else if r.transformComplete {\n\t\t\treturn 0, r.err\n\t\t}\n\n\t\t// Try to transform some source bytes, or to flush the transformer if we\n\t\t// are out of source bytes. We do this even if r.r.Read returned an error.\n\t\t// As the io.Reader documentation says, \"process the n > 0 bytes returned\n\t\t// before considering the error\".\n\t\tif r.src0 != r.src1 || r.err != nil {\n\t\t\tr.dst0 = 0\n\t\t\tr.dst1, n, err = r.t.Transform(r.dst, r.src[r.src0:r.src1], r.err == io.EOF)\n\t\t\tr.src0 += n\n\n\t\t\tswitch {\n\t\t\tcase err == nil:\n\t\t\t\tif r.src0 != r.src1 {\n\t\t\t\t\tr.err = errInconsistentByteCount\n\t\t\t\t}\n\t\t\t\t// The Transform call was successful; we are complete if we\n\t\t\t\t// cannot read more bytes into src.\n\t\t\t\tr.transformComplete = r.err != nil\n\t\t\t\tcontinue\n\t\t\tcase err == ErrShortDst && (r.dst1 != 0 || n != 0):\n\t\t\t\t// Make room in dst by copying out, and try again.\n\t\t\t\tcontinue\n\t\t\tcase err == ErrShortSrc && r.src1-r.src0 != len(r.src) && r.err == nil:\n\t\t\t\t// Read more bytes into src via the code below, and try again.\n\t\t\tdefault:\n\t\t\t\tr.transformComplete = true\n\t\t\t\t// The reader error (r.err) takes precedence over the\n\t\t\t\t// transformer error (err) unless r.err is nil or io.EOF.\n\t\t\t\tif r.err == nil || r.err == io.EOF {\n\t\t\t\t\tr.err = err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// Move any untransformed source bytes to the start of the buffer\n\t\t// and read more bytes.\n\t\tif r.src0 != 0 {\n\t\t\tr.src0, r.src1 = 0, copy(r.src, r.src[r.src0:r.src1])\n\t\t}\n\t\tn, r.err = r.r.Read(r.src[r.src1:])\n\t\tr.src1 += n\n\t}\n}\n\n// TODO: implement ReadByte (and ReadRune??).\n\n// Writer wraps another io.Writer by transforming the bytes read.\n// The user needs to call Close to flush unwritten bytes that may\n// be buffered.\ntype Writer struct {\n\tw   io.Writer\n\tt   Transformer\n\tdst []byte\n\n\t// src[:n] contains bytes that have not yet passed through t.\n\tsrc []byte\n\tn   int\n}\n\n// NewWriter returns a new Writer that wraps w by transforming the bytes written\n// via t. It calls Reset on t.\nfunc NewWriter(w io.Writer, t Transformer) *Writer {\n\tt.Reset()\n\treturn &Writer{\n\t\tw:   w,\n\t\tt:   t,\n\t\tdst: make([]byte, defaultBufSize),\n\t\tsrc: make([]byte, defaultBufSize),\n\t}\n}\n\n// Write implements the io.Writer interface. If there are not enough\n// bytes available to complete a Transform, the bytes will be buffered\n// for the next write. Call Close to convert the remaining bytes.\nfunc (w *Writer) Write(data []byte) (n int, err error) {\n\tsrc := data\n\tif w.n > 0 {\n\t\t// Append bytes from data to the last remainder.\n\t\t// TODO: limit the amount copied on first try.\n\t\tn = copy(w.src[w.n:], data)\n\t\tw.n += n\n\t\tsrc = w.src[:w.n]\n\t}\n\tfor {\n\t\tnDst, nSrc, err := w.t.Transform(w.dst, src, false)\n\t\tif _, werr := w.w.Write(w.dst[:nDst]); werr != nil {\n\t\t\treturn n, werr\n\t\t}\n\t\tsrc = src[nSrc:]\n\t\tif w.n == 0 {\n\t\t\tn += nSrc\n\t\t} else if len(src) <= n {\n\t\t\t// Enough bytes from w.src have been consumed. We make src point\n\t\t\t// to data instead to reduce the copying.\n\t\t\tw.n = 0\n\t\t\tn -= len(src)\n\t\t\tsrc = data[n:]\n\t\t\tif n < len(data) && (err == nil || err == ErrShortSrc) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tswitch err {\n\t\tcase ErrShortDst:\n\t\t\t// This error is okay as long as we are making progress.\n\t\t\tif nDst > 0 || nSrc > 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\tcase ErrShortSrc:\n\t\t\tif len(src) < len(w.src) {\n\t\t\t\tm := copy(w.src, src)\n\t\t\t\t// If w.n > 0, bytes from data were already copied to w.src and n\n\t\t\t\t// was already set to the number of bytes consumed.\n\t\t\t\tif w.n == 0 {\n\t\t\t\t\tn += m\n\t\t\t\t}\n\t\t\t\tw.n = m\n\t\t\t\terr = nil\n\t\t\t} else if nDst > 0 || nSrc > 0 {\n\t\t\t\t// Not enough buffer to store the remainder. Keep processing as\n\t\t\t\t// long as there is progress. Without this case, transforms that\n\t\t\t\t// require a lookahead larger than the buffer may result in an\n\t\t\t\t// error. This is not something one may expect to be common in\n\t\t\t\t// practice, but it may occur when buffers are set to small\n\t\t\t\t// sizes during testing.\n\t\t\t\tcontinue\n\t\t\t}\n\t\tcase nil:\n\t\t\tif w.n > 0 {\n\t\t\t\terr = errInconsistentByteCount\n\t\t\t}\n\t\t}\n\t\treturn n, err\n\t}\n}\n\n// Close implements the io.Closer interface.\nfunc (w *Writer) Close() error {\n\tsrc := w.src[:w.n]\n\tfor {\n\t\tnDst, nSrc, err := w.t.Transform(w.dst, src, true)\n\t\tif _, werr := w.w.Write(w.dst[:nDst]); werr != nil {\n\t\t\treturn werr\n\t\t}\n\t\tif err != ErrShortDst {\n\t\t\treturn err\n\t\t}\n\t\tsrc = src[nSrc:]\n\t}\n}\n\ntype nop struct{ NopResetter }\n\nfunc (nop) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\tn := copy(dst, src)\n\tif n < len(src) {\n\t\terr = ErrShortDst\n\t}\n\treturn n, n, err\n}\n\nfunc (nop) Span(src []byte, atEOF bool) (n int, err error) {\n\treturn len(src), nil\n}\n\ntype discard struct{ NopResetter }\n\nfunc (discard) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\treturn 0, len(src), nil\n}\n\nvar (\n\t// Discard is a Transformer for which all Transform calls succeed\n\t// by consuming all bytes and writing nothing.\n\tDiscard Transformer = discard{}\n\n\t// Nop is a SpanningTransformer that copies src to dst.\n\tNop SpanningTransformer = nop{}\n)\n\n// chain is a sequence of links. A chain with N Transformers has N+1 links and\n// N+1 buffers. Of those N+1 buffers, the first and last are the src and dst\n// buffers given to chain.Transform and the middle N-1 buffers are intermediate\n// buffers owned by the chain. The i'th link transforms bytes from the i'th\n// buffer chain.link[i].b at read offset chain.link[i].p to the i+1'th buffer\n// chain.link[i+1].b at write offset chain.link[i+1].n, for i in [0, N).\ntype chain struct {\n\tlink []link\n\terr  error\n\t// errStart is the index at which the error occurred plus 1. Processing\n\t// errStart at this level at the next call to Transform. As long as\n\t// errStart > 0, chain will not consume any more source bytes.\n\terrStart int\n}\n\nfunc (c *chain) fatalError(errIndex int, err error) {\n\tif i := errIndex + 1; i > c.errStart {\n\t\tc.errStart = i\n\t\tc.err = err\n\t}\n}\n\ntype link struct {\n\tt Transformer\n\t// b[p:n] holds the bytes to be transformed by t.\n\tb []byte\n\tp int\n\tn int\n}\n\nfunc (l *link) src() []byte {\n\treturn l.b[l.p:l.n]\n}\n\nfunc (l *link) dst() []byte {\n\treturn l.b[l.n:]\n}\n\n// Chain returns a Transformer that applies t in sequence.\nfunc Chain(t ...Transformer) Transformer {\n\tif len(t) == 0 {\n\t\treturn nop{}\n\t}\n\tc := &chain{link: make([]link, len(t)+1)}\n\tfor i, tt := range t {\n\t\tc.link[i].t = tt\n\t}\n\t// Allocate intermediate buffers.\n\tb := make([][defaultBufSize]byte, len(t)-1)\n\tfor i := range b {\n\t\tc.link[i+1].b = b[i][:]\n\t}\n\treturn c\n}\n\n// Reset resets the state of Chain. It calls Reset on all the Transformers.\nfunc (c *chain) Reset() {\n\tfor i, l := range c.link {\n\t\tif l.t != nil {\n\t\t\tl.t.Reset()\n\t\t}\n\t\tc.link[i].p, c.link[i].n = 0, 0\n\t}\n}\n\n// TODO: make chain use Span (is going to be fun to implement!)\n\n// Transform applies the transformers of c in sequence.\nfunc (c *chain) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\t// Set up src and dst in the chain.\n\tsrcL := &c.link[0]\n\tdstL := &c.link[len(c.link)-1]\n\tsrcL.b, srcL.p, srcL.n = src, 0, len(src)\n\tdstL.b, dstL.n = dst, 0\n\tvar lastFull, needProgress bool // for detecting progress\n\n\t// i is the index of the next Transformer to apply, for i in [low, high].\n\t// low is the lowest index for which c.link[low] may still produce bytes.\n\t// high is the highest index for which c.link[high] has a Transformer.\n\t// The error returned by Transform determines whether to increase or\n\t// decrease i. We try to completely fill a buffer before converting it.\n\tfor low, i, high := c.errStart, c.errStart, len(c.link)-2; low <= i && i <= high; {\n\t\tin, out := &c.link[i], &c.link[i+1]\n\t\tnDst, nSrc, err0 := in.t.Transform(out.dst(), in.src(), atEOF && low == i)\n\t\tout.n += nDst\n\t\tin.p += nSrc\n\t\tif i > 0 && in.p == in.n {\n\t\t\tin.p, in.n = 0, 0\n\t\t}\n\t\tneedProgress, lastFull = lastFull, false\n\t\tswitch err0 {\n\t\tcase ErrShortDst:\n\t\t\t// Process the destination buffer next. Return if we are already\n\t\t\t// at the high index.\n\t\t\tif i == high {\n\t\t\t\treturn dstL.n, srcL.p, ErrShortDst\n\t\t\t}\n\t\t\tif out.n != 0 {\n\t\t\t\ti++\n\t\t\t\t// If the Transformer at the next index is not able to process any\n\t\t\t\t// source bytes there is nothing that can be done to make progress\n\t\t\t\t// and the bytes will remain unprocessed. lastFull is used to\n\t\t\t\t// detect this and break out of the loop with a fatal error.\n\t\t\t\tlastFull = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// The destination buffer was too small, but is completely empty.\n\t\t\t// Return a fatal error as this transformation can never complete.\n\t\t\tc.fatalError(i, errShortInternal)\n\t\tcase ErrShortSrc:\n\t\t\tif i == 0 {\n\t\t\t\t// Save ErrShortSrc in err. All other errors take precedence.\n\t\t\t\terr = ErrShortSrc\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Source bytes were depleted before filling up the destination buffer.\n\t\t\t// Verify we made some progress, move the remaining bytes to the errStart\n\t\t\t// and try to get more source bytes.\n\t\t\tif needProgress && nSrc == 0 || in.n-in.p == len(in.b) {\n\t\t\t\t// There were not enough source bytes to proceed while the source\n\t\t\t\t// buffer cannot hold any more bytes. Return a fatal error as this\n\t\t\t\t// transformation can never complete.\n\t\t\t\tc.fatalError(i, errShortInternal)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// in.b is an internal buffer and we can make progress.\n\t\t\tin.p, in.n = 0, copy(in.b, in.src())\n\t\t\tfallthrough\n\t\tcase nil:\n\t\t\t// if i == low, we have depleted the bytes at index i or any lower levels.\n\t\t\t// In that case we increase low and i. In all other cases we decrease i to\n\t\t\t// fetch more bytes before proceeding to the next index.\n\t\t\tif i > low {\n\t\t\t\ti--\n\t\t\t\tcontinue\n\t\t\t}\n\t\tdefault:\n\t\t\tc.fatalError(i, err0)\n\t\t}\n\t\t// Exhausted level low or fatal error: increase low and continue\n\t\t// to process the bytes accepted so far.\n\t\ti++\n\t\tlow = i\n\t}\n\n\t// If c.errStart > 0, this means we found a fatal error.  We will clear\n\t// all upstream buffers. At this point, no more progress can be made\n\t// downstream, as Transform would have bailed while handling ErrShortDst.\n\tif c.errStart > 0 {\n\t\tfor i := 1; i < c.errStart; i++ {\n\t\t\tc.link[i].p, c.link[i].n = 0, 0\n\t\t}\n\t\terr, c.errStart, c.err = c.err, 0, nil\n\t}\n\treturn dstL.n, srcL.p, err\n}\n\n// Deprecated: Use runes.Remove instead.\nfunc RemoveFunc(f func(r rune) bool) Transformer {\n\treturn removeF(f)\n}\n\ntype removeF func(r rune) bool\n\nfunc (removeF) Reset() {}\n\n// Transform implements the Transformer interface.\nfunc (t removeF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\tfor r, sz := rune(0), 0; len(src) > 0; src = src[sz:] {\n\n\t\tif r = rune(src[0]); r < utf8.RuneSelf {\n\t\t\tsz = 1\n\t\t} else {\n\t\t\tr, sz = utf8.DecodeRune(src)\n\n\t\t\tif sz == 1 {\n\t\t\t\t// Invalid rune.\n\t\t\t\tif !atEOF && !utf8.FullRune(src) {\n\t\t\t\t\terr = ErrShortSrc\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// We replace illegal bytes with RuneError. Not doing so might\n\t\t\t\t// otherwise turn a sequence of invalid UTF-8 into valid UTF-8.\n\t\t\t\t// The resulting byte sequence may subsequently contain runes\n\t\t\t\t// for which t(r) is true that were passed unnoticed.\n\t\t\t\tif !t(r) {\n\t\t\t\t\tif nDst+3 > len(dst) {\n\t\t\t\t\t\terr = ErrShortDst\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tnDst += copy(dst[nDst:], \"\\uFFFD\")\n\t\t\t\t}\n\t\t\t\tnSrc++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tif !t(r) {\n\t\t\tif nDst+sz > len(dst) {\n\t\t\t\terr = ErrShortDst\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tnDst += copy(dst[nDst:], src[:sz])\n\t\t}\n\t\tnSrc += sz\n\t}\n\treturn\n}\n\n// grow returns a new []byte that is longer than b, and copies the first n bytes\n// of b to the start of the new slice.\nfunc grow(b []byte, n int) []byte {\n\tm := len(b)\n\tif m <= 32 {\n\t\tm = 64\n\t} else if m <= 256 {\n\t\tm *= 2\n\t} else {\n\t\tm += m >> 1\n\t}\n\tbuf := make([]byte, m)\n\tcopy(buf, b[:n])\n\treturn buf\n}\n\nconst initialBufSize = 128\n\n// String returns a string with the result of converting s[:n] using t, where\n// n <= len(s). If err == nil, n will be len(s). It calls Reset on t.\nfunc String(t Transformer, s string) (result string, n int, err error) {\n\tt.Reset()\n\tif s == \"\" {\n\t\t// Fast path for the common case for empty input. Results in about a\n\t\t// 86% reduction of running time for BenchmarkStringLowerEmpty.\n\t\tif _, _, err := t.Transform(nil, nil, true); err == nil {\n\t\t\treturn \"\", 0, nil\n\t\t}\n\t}\n\n\t// Allocate only once. Note that both dst and src escape when passed to\n\t// Transform.\n\tbuf := [2 * initialBufSize]byte{}\n\tdst := buf[:initialBufSize:initialBufSize]\n\tsrc := buf[initialBufSize : 2*initialBufSize]\n\n\t// The input string s is transformed in multiple chunks (starting with a\n\t// chunk size of initialBufSize). nDst and nSrc are per-chunk (or\n\t// per-Transform-call) indexes, pDst and pSrc are overall indexes.\n\tnDst, nSrc := 0, 0\n\tpDst, pSrc := 0, 0\n\n\t// pPrefix is the length of a common prefix: the first pPrefix bytes of the\n\t// result will equal the first pPrefix bytes of s. It is not guaranteed to\n\t// be the largest such value, but if pPrefix, len(result) and len(s) are\n\t// all equal after the final transform (i.e. calling Transform with atEOF\n\t// being true returned nil error) then we don't need to allocate a new\n\t// result string.\n\tpPrefix := 0\n\tfor {\n\t\t// Invariant: pDst == pPrefix && pSrc == pPrefix.\n\n\t\tn := copy(src, s[pSrc:])\n\t\tnDst, nSrc, err = t.Transform(dst, src[:n], pSrc+n == len(s))\n\t\tpDst += nDst\n\t\tpSrc += nSrc\n\n\t\t// TODO:  let transformers implement an optional Spanner interface, akin\n\t\t// to norm's QuickSpan. This would even allow us to avoid any allocation.\n\t\tif !bytes.Equal(dst[:nDst], src[:nSrc]) {\n\t\t\tbreak\n\t\t}\n\t\tpPrefix = pSrc\n\t\tif err == ErrShortDst {\n\t\t\t// A buffer can only be short if a transformer modifies its input.\n\t\t\tbreak\n\t\t} else if err == ErrShortSrc {\n\t\t\tif nSrc == 0 {\n\t\t\t\t// No progress was made.\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Equal so far and !atEOF, so continue checking.\n\t\t} else if err != nil || pPrefix == len(s) {\n\t\t\treturn string(s[:pPrefix]), pPrefix, err\n\t\t}\n\t}\n\t// Post-condition: pDst == pPrefix + nDst && pSrc == pPrefix + nSrc.\n\n\t// We have transformed the first pSrc bytes of the input s to become pDst\n\t// transformed bytes. Those transformed bytes are discontiguous: the first\n\t// pPrefix of them equal s[:pPrefix] and the last nDst of them equal\n\t// dst[:nDst]. We copy them around, into a new dst buffer if necessary, so\n\t// that they become one contiguous slice: dst[:pDst].\n\tif pPrefix != 0 {\n\t\tnewDst := dst\n\t\tif pDst > len(newDst) {\n\t\t\tnewDst = make([]byte, len(s)+nDst-nSrc)\n\t\t}\n\t\tcopy(newDst[pPrefix:pDst], dst[:nDst])\n\t\tcopy(newDst[:pPrefix], s[:pPrefix])\n\t\tdst = newDst\n\t}\n\n\t// Prevent duplicate Transform calls with atEOF being true at the end of\n\t// the input. Also return if we have an unrecoverable error.\n\tif (err == nil && pSrc == len(s)) ||\n\t\t(err != nil && err != ErrShortDst && err != ErrShortSrc) {\n\t\treturn string(dst[:pDst]), pSrc, err\n\t}\n\n\t// Transform the remaining input, growing dst and src buffers as necessary.\n\tfor {\n\t\tn := copy(src, s[pSrc:])\n\t\tatEOF := pSrc+n == len(s)\n\t\tnDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF)\n\t\tpDst += nDst\n\t\tpSrc += nSrc\n\n\t\t// If we got ErrShortDst or ErrShortSrc, do not grow as long as we can\n\t\t// make progress. This may avoid excessive allocations.\n\t\tif err == ErrShortDst {\n\t\t\tif nDst == 0 {\n\t\t\t\tdst = grow(dst, pDst)\n\t\t\t}\n\t\t} else if err == ErrShortSrc {\n\t\t\tif atEOF {\n\t\t\t\treturn string(dst[:pDst]), pSrc, err\n\t\t\t}\n\t\t\tif nSrc == 0 {\n\t\t\t\tsrc = grow(src, 0)\n\t\t\t}\n\t\t} else if err != nil || pSrc == len(s) {\n\t\t\treturn string(dst[:pDst]), pSrc, err\n\t\t}\n\t}\n}\n\n// Bytes returns a new byte slice with the result of converting b[:n] using t,\n// where n <= len(b). If err == nil, n will be len(b). It calls Reset on t.\nfunc Bytes(t Transformer, b []byte) (result []byte, n int, err error) {\n\treturn doAppend(t, 0, make([]byte, len(b)), b)\n}\n\n// Append appends the result of converting src[:n] using t to dst, where\n// n <= len(src), If err == nil, n will be len(src). It calls Reset on t.\nfunc Append(t Transformer, dst, src []byte) (result []byte, n int, err error) {\n\tif len(dst) == cap(dst) {\n\t\tn := len(src) + len(dst) // It is okay for this to be 0.\n\t\tb := make([]byte, n)\n\t\tdst = b[:copy(b, dst)]\n\t}\n\treturn doAppend(t, len(dst), dst[:cap(dst)], src)\n}\n\nfunc doAppend(t Transformer, pDst int, dst, src []byte) (result []byte, n int, err error) {\n\tt.Reset()\n\tpSrc := 0\n\tfor {\n\t\tnDst, nSrc, err := t.Transform(dst[pDst:], src[pSrc:], true)\n\t\tpDst += nDst\n\t\tpSrc += nSrc\n\t\tif err != ErrShortDst {\n\t\t\treturn dst[:pDst], pSrc, err\n\t\t}\n\n\t\t// Grow the destination buffer, but do not grow as long as we can make\n\t\t// progress. This may avoid excessive allocations.\n\t\tif nDst == 0 {\n\t\t\tdst = grow(dst, pDst)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/bidi.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:generate go run gen.go gen_trieval.go gen_ranges.go\n\n// Package bidi contains functionality for bidirectional text support.\n//\n// See https://www.unicode.org/reports/tr9.\n//\n// NOTE: UNDER CONSTRUCTION. This API may change in backwards incompatible ways\n// and without notice.\npackage bidi // import \"golang.org/x/text/unicode/bidi\"\n\n// TODO\n// - Transformer for reordering?\n// - Transformer (validator, really) for Bidi Rule.\n\nimport (\n\t\"bytes\"\n)\n\n// This API tries to avoid dealing with embedding levels for now. Under the hood\n// these will be computed, but the question is to which extent the user should\n// know they exist. We should at some point allow the user to specify an\n// embedding hierarchy, though.\n\n// A Direction indicates the overall flow of text.\ntype Direction int\n\nconst (\n\t// LeftToRight indicates the text contains no right-to-left characters and\n\t// that either there are some left-to-right characters or the option\n\t// DefaultDirection(LeftToRight) was passed.\n\tLeftToRight Direction = iota\n\n\t// RightToLeft indicates the text contains no left-to-right characters and\n\t// that either there are some right-to-left characters or the option\n\t// DefaultDirection(RightToLeft) was passed.\n\tRightToLeft\n\n\t// Mixed indicates text contains both left-to-right and right-to-left\n\t// characters.\n\tMixed\n\n\t// Neutral means that text contains no left-to-right and right-to-left\n\t// characters and that no default direction has been set.\n\tNeutral\n)\n\ntype options struct {\n\tdefaultDirection Direction\n}\n\n// An Option is an option for Bidi processing.\ntype Option func(*options)\n\n// ICU allows the user to define embedding levels. This may be used, for example,\n// to use hierarchical structure of markup languages to define embeddings.\n// The following option may be a way to expose this functionality in this API.\n// // LevelFunc sets a function that associates nesting levels with the given text.\n// // The levels function will be called with monotonically increasing values for p.\n// func LevelFunc(levels func(p int) int) Option {\n// \tpanic(\"unimplemented\")\n// }\n\n// DefaultDirection sets the default direction for a Paragraph. The direction is\n// overridden if the text contains directional characters.\nfunc DefaultDirection(d Direction) Option {\n\treturn func(opts *options) {\n\t\topts.defaultDirection = d\n\t}\n}\n\n// A Paragraph holds a single Paragraph for Bidi processing.\ntype Paragraph struct {\n\tp          []byte\n\to          Ordering\n\topts       []Option\n\ttypes      []Class\n\tpairTypes  []bracketType\n\tpairValues []rune\n\trunes      []rune\n\toptions    options\n}\n\n// Initialize the p.pairTypes, p.pairValues and p.types from the input previously\n// set by p.SetBytes() or p.SetString(). Also limit the input up to (and including) a paragraph\n// separator (bidi class B).\n//\n// The function p.Order() needs these values to be set, so this preparation could be postponed.\n// But since the SetBytes and SetStrings functions return the length of the input up to the paragraph\n// separator, the whole input needs to be processed anyway and should not be done twice.\n//\n// The function has the same return values as SetBytes() / SetString()\nfunc (p *Paragraph) prepareInput() (n int, err error) {\n\tp.runes = bytes.Runes(p.p)\n\tbytecount := 0\n\t// clear slices from previous SetString or SetBytes\n\tp.pairTypes = nil\n\tp.pairValues = nil\n\tp.types = nil\n\n\tfor _, r := range p.runes {\n\t\tprops, i := LookupRune(r)\n\t\tbytecount += i\n\t\tcls := props.Class()\n\t\tif cls == B {\n\t\t\treturn bytecount, nil\n\t\t}\n\t\tp.types = append(p.types, cls)\n\t\tif props.IsOpeningBracket() {\n\t\t\tp.pairTypes = append(p.pairTypes, bpOpen)\n\t\t\tp.pairValues = append(p.pairValues, r)\n\t\t} else if props.IsBracket() {\n\t\t\t// this must be a closing bracket,\n\t\t\t// since IsOpeningBracket is not true\n\t\t\tp.pairTypes = append(p.pairTypes, bpClose)\n\t\t\tp.pairValues = append(p.pairValues, r)\n\t\t} else {\n\t\t\tp.pairTypes = append(p.pairTypes, bpNone)\n\t\t\tp.pairValues = append(p.pairValues, 0)\n\t\t}\n\t}\n\treturn bytecount, nil\n}\n\n// SetBytes configures p for the given paragraph text. It replaces text\n// previously set by SetBytes or SetString. If b contains a paragraph separator\n// it will only process the first paragraph and report the number of bytes\n// consumed from b including this separator. Error may be non-nil if options are\n// given.\nfunc (p *Paragraph) SetBytes(b []byte, opts ...Option) (n int, err error) {\n\tp.p = b\n\tp.opts = opts\n\treturn p.prepareInput()\n}\n\n// SetString configures s for the given paragraph text. It replaces text\n// previously set by SetBytes or SetString. If s contains a paragraph separator\n// it will only process the first paragraph and report the number of bytes\n// consumed from s including this separator. Error may be non-nil if options are\n// given.\nfunc (p *Paragraph) SetString(s string, opts ...Option) (n int, err error) {\n\tp.p = []byte(s)\n\tp.opts = opts\n\treturn p.prepareInput()\n}\n\n// IsLeftToRight reports whether the principle direction of rendering for this\n// paragraphs is left-to-right. If this returns false, the principle direction\n// of rendering is right-to-left.\nfunc (p *Paragraph) IsLeftToRight() bool {\n\treturn p.Direction() == LeftToRight\n}\n\n// Direction returns the direction of the text of this paragraph.\n//\n// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.\nfunc (p *Paragraph) Direction() Direction {\n\treturn p.o.Direction()\n}\n\n// TODO: what happens if the position is > len(input)? This should return an error.\n\n// RunAt reports the Run at the given position of the input text.\n//\n// This method can be used for computing line breaks on paragraphs.\nfunc (p *Paragraph) RunAt(pos int) Run {\n\tc := 0\n\trunNumber := 0\n\tfor i, r := range p.o.runes {\n\t\tc += len(r)\n\t\tif pos < c {\n\t\t\trunNumber = i\n\t\t}\n\t}\n\treturn p.o.Run(runNumber)\n}\n\nfunc calculateOrdering(levels []level, runes []rune) Ordering {\n\tvar curDir Direction\n\n\tprevDir := Neutral\n\tprevI := 0\n\n\to := Ordering{}\n\t// lvl = 0,2,4,...: left to right\n\t// lvl = 1,3,5,...: right to left\n\tfor i, lvl := range levels {\n\t\tif lvl%2 == 0 {\n\t\t\tcurDir = LeftToRight\n\t\t} else {\n\t\t\tcurDir = RightToLeft\n\t\t}\n\t\tif curDir != prevDir {\n\t\t\tif i > 0 {\n\t\t\t\to.runes = append(o.runes, runes[prevI:i])\n\t\t\t\to.directions = append(o.directions, prevDir)\n\t\t\t\to.startpos = append(o.startpos, prevI)\n\t\t\t}\n\t\t\tprevI = i\n\t\t\tprevDir = curDir\n\t\t}\n\t}\n\to.runes = append(o.runes, runes[prevI:])\n\to.directions = append(o.directions, prevDir)\n\to.startpos = append(o.startpos, prevI)\n\treturn o\n}\n\n// Order computes the visual ordering of all the runs in a Paragraph.\nfunc (p *Paragraph) Order() (Ordering, error) {\n\tif len(p.types) == 0 {\n\t\treturn Ordering{}, nil\n\t}\n\n\tfor _, fn := range p.opts {\n\t\tfn(&p.options)\n\t}\n\tlvl := level(-1)\n\tif p.options.defaultDirection == RightToLeft {\n\t\tlvl = 1\n\t}\n\tpara, err := newParagraph(p.types, p.pairTypes, p.pairValues, lvl)\n\tif err != nil {\n\t\treturn Ordering{}, err\n\t}\n\n\tlevels := para.getLevels([]int{len(p.types)})\n\n\tp.o = calculateOrdering(levels, p.runes)\n\treturn p.o, nil\n}\n\n// Line computes the visual ordering of runs for a single line starting and\n// ending at the given positions in the original text.\nfunc (p *Paragraph) Line(start, end int) (Ordering, error) {\n\tlineTypes := p.types[start:end]\n\tpara, err := newParagraph(lineTypes, p.pairTypes[start:end], p.pairValues[start:end], -1)\n\tif err != nil {\n\t\treturn Ordering{}, err\n\t}\n\tlevels := para.getLevels([]int{len(lineTypes)})\n\to := calculateOrdering(levels, p.runes[start:end])\n\treturn o, nil\n}\n\n// An Ordering holds the computed visual order of runs of a Paragraph. Calling\n// SetBytes or SetString on the originating Paragraph invalidates an Ordering.\n// The methods of an Ordering should only be called by one goroutine at a time.\ntype Ordering struct {\n\trunes      [][]rune\n\tdirections []Direction\n\tstartpos   []int\n}\n\n// Direction reports the directionality of the runs.\n//\n// The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.\nfunc (o *Ordering) Direction() Direction {\n\treturn o.directions[0]\n}\n\n// NumRuns returns the number of runs.\nfunc (o *Ordering) NumRuns() int {\n\treturn len(o.runes)\n}\n\n// Run returns the ith run within the ordering.\nfunc (o *Ordering) Run(i int) Run {\n\tr := Run{\n\t\trunes:     o.runes[i],\n\t\tdirection: o.directions[i],\n\t\tstartpos:  o.startpos[i],\n\t}\n\treturn r\n}\n\n// TODO: perhaps with options.\n// // Reorder creates a reader that reads the runes in visual order per character.\n// // Modifiers remain after the runes they modify.\n// func (l *Runs) Reorder() io.Reader {\n// \tpanic(\"unimplemented\")\n// }\n\n// A Run is a continuous sequence of characters of a single direction.\ntype Run struct {\n\trunes     []rune\n\tdirection Direction\n\tstartpos  int\n}\n\n// String returns the text of the run in its original order.\nfunc (r *Run) String() string {\n\treturn string(r.runes)\n}\n\n// Bytes returns the text of the run in its original order.\nfunc (r *Run) Bytes() []byte {\n\treturn []byte(r.String())\n}\n\n// TODO: methods for\n// - Display order\n// - headers and footers\n// - bracket replacement.\n\n// Direction reports the direction of the run.\nfunc (r *Run) Direction() Direction {\n\treturn r.direction\n}\n\n// Pos returns the position of the Run within the text passed to SetBytes or SetString of the\n// originating Paragraph value.\nfunc (r *Run) Pos() (start, end int) {\n\treturn r.startpos, r.startpos + len(r.runes) - 1\n}\n\n// AppendReverse reverses the order of characters of in, appends them to out,\n// and returns the result. Modifiers will still follow the runes they modify.\n// Brackets are replaced with their counterparts.\nfunc AppendReverse(out, in []byte) []byte {\n\tret := make([]byte, len(in)+len(out))\n\tcopy(ret, out)\n\tinRunes := bytes.Runes(in)\n\n\tfor i, r := range inRunes {\n\t\tprop, _ := LookupRune(r)\n\t\tif prop.IsBracket() {\n\t\t\tinRunes[i] = prop.reverseBracket(r)\n\t\t}\n\t}\n\n\tfor i, j := 0, len(inRunes)-1; i < j; i, j = i+1, j-1 {\n\t\tinRunes[i], inRunes[j] = inRunes[j], inRunes[i]\n\t}\n\tcopy(ret[len(out):], string(inRunes))\n\n\treturn ret\n}\n\n// ReverseString reverses the order of characters in s and returns a new string.\n// Modifiers will still follow the runes they modify. Brackets are replaced with\n// their counterparts.\nfunc ReverseString(s string) string {\n\tinput := []rune(s)\n\tli := len(input)\n\tret := make([]rune, li)\n\tfor i, r := range input {\n\t\tprop, _ := LookupRune(r)\n\t\tif prop.IsBracket() {\n\t\t\tret[li-i-1] = prop.reverseBracket(r)\n\t\t} else {\n\t\t\tret[li-i-1] = r\n\t\t}\n\t}\n\treturn string(ret)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/bracket.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage bidi\n\nimport (\n\t\"container/list\"\n\t\"fmt\"\n\t\"sort\"\n)\n\n// This file contains a port of the reference implementation of the\n// Bidi Parentheses Algorithm:\n// https://www.unicode.org/Public/PROGRAMS/BidiReferenceJava/BidiPBAReference.java\n//\n// The implementation in this file covers definitions BD14-BD16 and rule N0\n// of UAX#9.\n//\n// Some preprocessing is done for each rune before data is passed to this\n// algorithm:\n//  - opening and closing brackets are identified\n//  - a bracket pair type, like '(' and ')' is assigned a unique identifier that\n//    is identical for the opening and closing bracket. It is left to do these\n//    mappings.\n//  - The BPA algorithm requires that bracket characters that are canonical\n//    equivalents of each other be able to be substituted for each other.\n//    It is the responsibility of the caller to do this canonicalization.\n//\n// In implementing BD16, this implementation departs slightly from the \"logical\"\n// algorithm defined in UAX#9. In particular, the stack referenced there\n// supports operations that go beyond a \"basic\" stack. An equivalent\n// implementation based on a linked list is used here.\n\n// Bidi_Paired_Bracket_Type\n// BD14. An opening paired bracket is a character whose\n// Bidi_Paired_Bracket_Type property value is Open.\n//\n// BD15. A closing paired bracket is a character whose\n// Bidi_Paired_Bracket_Type property value is Close.\ntype bracketType byte\n\nconst (\n\tbpNone bracketType = iota\n\tbpOpen\n\tbpClose\n)\n\n// bracketPair holds a pair of index values for opening and closing bracket\n// location of a bracket pair.\ntype bracketPair struct {\n\topener int\n\tcloser int\n}\n\nfunc (b *bracketPair) String() string {\n\treturn fmt.Sprintf(\"(%v, %v)\", b.opener, b.closer)\n}\n\n// bracketPairs is a slice of bracketPairs with a sort.Interface implementation.\ntype bracketPairs []bracketPair\n\nfunc (b bracketPairs) Len() int           { return len(b) }\nfunc (b bracketPairs) Swap(i, j int)      { b[i], b[j] = b[j], b[i] }\nfunc (b bracketPairs) Less(i, j int) bool { return b[i].opener < b[j].opener }\n\n// resolvePairedBrackets runs the paired bracket part of the UBA algorithm.\n//\n// For each rune, it takes the indexes into the original string, the class the\n// bracket type (in pairTypes) and the bracket identifier (pairValues). It also\n// takes the direction type for the start-of-sentence and the embedding level.\n//\n// The identifiers for bracket types are the rune of the canonicalized opening\n// bracket for brackets (open or close) or 0 for runes that are not brackets.\nfunc resolvePairedBrackets(s *isolatingRunSequence) {\n\tp := bracketPairer{\n\t\tsos:              s.sos,\n\t\topeners:          list.New(),\n\t\tcodesIsolatedRun: s.types,\n\t\tindexes:          s.indexes,\n\t}\n\tdirEmbed := L\n\tif s.level&1 != 0 {\n\t\tdirEmbed = R\n\t}\n\tp.locateBrackets(s.p.pairTypes, s.p.pairValues)\n\tp.resolveBrackets(dirEmbed, s.p.initialTypes)\n}\n\ntype bracketPairer struct {\n\tsos Class // direction corresponding to start of sequence\n\n\t// The following is a restatement of BD 16 using non-algorithmic language.\n\t//\n\t// A bracket pair is a pair of characters consisting of an opening\n\t// paired bracket and a closing paired bracket such that the\n\t// Bidi_Paired_Bracket property value of the former equals the latter,\n\t// subject to the following constraints.\n\t// - both characters of a pair occur in the same isolating run sequence\n\t// - the closing character of a pair follows the opening character\n\t// - any bracket character can belong at most to one pair, the earliest possible one\n\t// - any bracket character not part of a pair is treated like an ordinary character\n\t// - pairs may nest properly, but their spans may not overlap otherwise\n\n\t// Bracket characters with canonical decompositions are supposed to be\n\t// treated as if they had been normalized, to allow normalized and non-\n\t// normalized text to give the same result. In this implementation that step\n\t// is pushed out to the caller. The caller has to ensure that the pairValue\n\t// slices contain the rune of the opening bracket after normalization for\n\t// any opening or closing bracket.\n\n\topeners *list.List // list of positions for opening brackets\n\n\t// bracket pair positions sorted by location of opening bracket\n\tpairPositions bracketPairs\n\n\tcodesIsolatedRun []Class // directional bidi codes for an isolated run\n\tindexes          []int   // array of index values into the original string\n\n}\n\n// matchOpener reports whether characters at given positions form a matching\n// bracket pair.\nfunc (p *bracketPairer) matchOpener(pairValues []rune, opener, closer int) bool {\n\treturn pairValues[p.indexes[opener]] == pairValues[p.indexes[closer]]\n}\n\nconst maxPairingDepth = 63\n\n// locateBrackets locates matching bracket pairs according to BD16.\n//\n// This implementation uses a linked list instead of a stack, because, while\n// elements are added at the front (like a push) they are not generally removed\n// in atomic 'pop' operations, reducing the benefit of the stack archetype.\nfunc (p *bracketPairer) locateBrackets(pairTypes []bracketType, pairValues []rune) {\n\t// traverse the run\n\t// do that explicitly (not in a for-each) so we can record position\n\tfor i, index := range p.indexes {\n\n\t\t// look at the bracket type for each character\n\t\tif pairTypes[index] == bpNone || p.codesIsolatedRun[i] != ON {\n\t\t\t// continue scanning\n\t\t\tcontinue\n\t\t}\n\t\tswitch pairTypes[index] {\n\t\tcase bpOpen:\n\t\t\t// check if maximum pairing depth reached\n\t\t\tif p.openers.Len() == maxPairingDepth {\n\t\t\t\tp.openers.Init()\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// remember opener location, most recent first\n\t\t\tp.openers.PushFront(i)\n\n\t\tcase bpClose:\n\t\t\t// see if there is a match\n\t\t\tcount := 0\n\t\t\tfor elem := p.openers.Front(); elem != nil; elem = elem.Next() {\n\t\t\t\tcount++\n\t\t\t\topener := elem.Value.(int)\n\t\t\t\tif p.matchOpener(pairValues, opener, i) {\n\t\t\t\t\t// if the opener matches, add nested pair to the ordered list\n\t\t\t\t\tp.pairPositions = append(p.pairPositions, bracketPair{opener, i})\n\t\t\t\t\t// remove up to and including matched opener\n\t\t\t\t\tfor ; count > 0; count-- {\n\t\t\t\t\t\tp.openers.Remove(p.openers.Front())\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tsort.Sort(p.pairPositions)\n\t\t\t// if we get here, the closing bracket matched no openers\n\t\t\t// and gets ignored\n\t\t}\n\t}\n}\n\n// Bracket pairs within an isolating run sequence are processed as units so\n// that both the opening and the closing paired bracket in a pair resolve to\n// the same direction.\n//\n// N0. Process bracket pairs in an isolating run sequence sequentially in\n// the logical order of the text positions of the opening paired brackets\n// using the logic given below. Within this scope, bidirectional types EN\n// and AN are treated as R.\n//\n// Identify the bracket pairs in the current isolating run sequence\n// according to BD16. For each bracket-pair element in the list of pairs of\n// text positions:\n//\n// a Inspect the bidirectional types of the characters enclosed within the\n// bracket pair.\n//\n// b If any strong type (either L or R) matching the embedding direction is\n// found, set the type for both brackets in the pair to match the embedding\n// direction.\n//\n// o [ e ] o -> o e e e o\n//\n// o [ o e ] -> o e o e e\n//\n// o [ NI e ] -> o e NI e e\n//\n// c Otherwise, if a strong type (opposite the embedding direction) is\n// found, test for adjacent strong types as follows: 1 First, check\n// backwards before the opening paired bracket until the first strong type\n// (L, R, or sos) is found. If that first preceding strong type is opposite\n// the embedding direction, then set the type for both brackets in the pair\n// to that type. 2 Otherwise, set the type for both brackets in the pair to\n// the embedding direction.\n//\n// o [ o ] e -> o o o o e\n//\n// o [ o NI ] o -> o o o NI o o\n//\n// e [ o ] o -> e e o e o\n//\n// e [ o ] e -> e e o e e\n//\n// e ( o [ o ] NI ) e -> e e o o o o NI e e\n//\n// d Otherwise, do not set the type for the current bracket pair. Note that\n// if the enclosed text contains no strong types the paired brackets will\n// both resolve to the same level when resolved individually using rules N1\n// and N2.\n//\n// e ( NI ) o -> e ( NI ) o\n\n// getStrongTypeN0 maps character's directional code to strong type as required\n// by rule N0.\n//\n// TODO: have separate type for \"strong\" directionality.\nfunc (p *bracketPairer) getStrongTypeN0(index int) Class {\n\tswitch p.codesIsolatedRun[index] {\n\t// in the scope of N0, number types are treated as R\n\tcase EN, AN, AL, R:\n\t\treturn R\n\tcase L:\n\t\treturn L\n\tdefault:\n\t\treturn ON\n\t}\n}\n\n// classifyPairContent reports the strong types contained inside a Bracket Pair,\n// assuming the given embedding direction.\n//\n// It returns ON if no strong type is found. If a single strong type is found,\n// it returns this type. Otherwise it returns the embedding direction.\n//\n// TODO: use separate type for \"strong\" directionality.\nfunc (p *bracketPairer) classifyPairContent(loc bracketPair, dirEmbed Class) Class {\n\tdirOpposite := ON\n\tfor i := loc.opener + 1; i < loc.closer; i++ {\n\t\tdir := p.getStrongTypeN0(i)\n\t\tif dir == ON {\n\t\t\tcontinue\n\t\t}\n\t\tif dir == dirEmbed {\n\t\t\treturn dir // type matching embedding direction found\n\t\t}\n\t\tdirOpposite = dir\n\t}\n\t// return ON if no strong type found, or class opposite to dirEmbed\n\treturn dirOpposite\n}\n\n// classBeforePair determines which strong types are present before a Bracket\n// Pair. Return R or L if strong type found, otherwise ON.\nfunc (p *bracketPairer) classBeforePair(loc bracketPair) Class {\n\tfor i := loc.opener - 1; i >= 0; i-- {\n\t\tif dir := p.getStrongTypeN0(i); dir != ON {\n\t\t\treturn dir\n\t\t}\n\t}\n\t// no strong types found, return sos\n\treturn p.sos\n}\n\n// assignBracketType implements rule N0 for a single bracket pair.\nfunc (p *bracketPairer) assignBracketType(loc bracketPair, dirEmbed Class, initialTypes []Class) {\n\t// rule \"N0, a\", inspect contents of pair\n\tdirPair := p.classifyPairContent(loc, dirEmbed)\n\n\t// dirPair is now L, R, or N (no strong type found)\n\n\t// the following logical tests are performed out of order compared to\n\t// the statement of the rules but yield the same results\n\tif dirPair == ON {\n\t\treturn // case \"d\" - nothing to do\n\t}\n\n\tif dirPair != dirEmbed {\n\t\t// case \"c\": strong type found, opposite - check before (c.1)\n\t\tdirPair = p.classBeforePair(loc)\n\t\tif dirPair == dirEmbed || dirPair == ON {\n\t\t\t// no strong opposite type found before - use embedding (c.2)\n\t\t\tdirPair = dirEmbed\n\t\t}\n\t}\n\t// else: case \"b\", strong type found matching embedding,\n\t// no explicit action needed, as dirPair is already set to embedding\n\t// direction\n\n\t// set the bracket types to the type found\n\tp.setBracketsToType(loc, dirPair, initialTypes)\n}\n\nfunc (p *bracketPairer) setBracketsToType(loc bracketPair, dirPair Class, initialTypes []Class) {\n\tp.codesIsolatedRun[loc.opener] = dirPair\n\tp.codesIsolatedRun[loc.closer] = dirPair\n\n\tfor i := loc.opener + 1; i < loc.closer; i++ {\n\t\tindex := p.indexes[i]\n\t\tif initialTypes[index] != NSM {\n\t\t\tbreak\n\t\t}\n\t\tp.codesIsolatedRun[i] = dirPair\n\t}\n\n\tfor i := loc.closer + 1; i < len(p.indexes); i++ {\n\t\tindex := p.indexes[i]\n\t\tif initialTypes[index] != NSM {\n\t\t\tbreak\n\t\t}\n\t\tp.codesIsolatedRun[i] = dirPair\n\t}\n}\n\n// resolveBrackets implements rule N0 for a list of pairs.\nfunc (p *bracketPairer) resolveBrackets(dirEmbed Class, initialTypes []Class) {\n\tfor _, loc := range p.pairPositions {\n\t\tp.assignBracketType(loc, dirEmbed, initialTypes)\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/core.go",
    "content": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage bidi\n\nimport (\n\t\"fmt\"\n\t\"log\"\n)\n\n// This implementation is a port based on the reference implementation found at:\n// https://www.unicode.org/Public/PROGRAMS/BidiReferenceJava/\n//\n// described in Unicode Bidirectional Algorithm (UAX #9).\n//\n// Input:\n// There are two levels of input to the algorithm, since clients may prefer to\n// supply some information from out-of-band sources rather than relying on the\n// default behavior.\n//\n// - Bidi class array\n// - Bidi class array, with externally supplied base line direction\n//\n// Output:\n// Output is separated into several stages:\n//\n//  - levels array over entire paragraph\n//  - reordering array over entire paragraph\n//  - levels array over line\n//  - reordering array over line\n//\n// Note that for conformance to the Unicode Bidirectional Algorithm,\n// implementations are only required to generate correct reordering and\n// character directionality (odd or even levels) over a line. Generating\n// identical level arrays over a line is not required. Bidi explicit format\n// codes (LRE, RLE, LRO, RLO, PDF) and BN can be assigned arbitrary levels and\n// positions as long as the rest of the input is properly reordered.\n//\n// As the algorithm is defined to operate on a single paragraph at a time, this\n// implementation is written to handle single paragraphs. Thus rule P1 is\n// presumed by this implementation-- the data provided to the implementation is\n// assumed to be a single paragraph, and either contains no 'B' codes, or a\n// single 'B' code at the end of the input. 'B' is allowed as input to\n// illustrate how the algorithm assigns it a level.\n//\n// Also note that rules L3 and L4 depend on the rendering engine that uses the\n// result of the bidi algorithm. This implementation assumes that the rendering\n// engine expects combining marks in visual order (e.g. to the left of their\n// base character in RTL runs) and that it adjusts the glyphs used to render\n// mirrored characters that are in RTL runs so that they render appropriately.\n\n// level is the embedding level of a character. Even embedding levels indicate\n// left-to-right order and odd levels indicate right-to-left order. The special\n// level of -1 is reserved for undefined order.\ntype level int8\n\nconst implicitLevel level = -1\n\n// in returns if x is equal to any of the values in set.\nfunc (c Class) in(set ...Class) bool {\n\tfor _, s := range set {\n\t\tif c == s {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// A paragraph contains the state of a paragraph.\ntype paragraph struct {\n\tinitialTypes []Class\n\n\t// Arrays of properties needed for paired bracket evaluation in N0\n\tpairTypes  []bracketType // paired Bracket types for paragraph\n\tpairValues []rune        // rune for opening bracket or pbOpen and pbClose; 0 for pbNone\n\n\tembeddingLevel level // default: = implicitLevel;\n\n\t// at the paragraph levels\n\tresultTypes  []Class\n\tresultLevels []level\n\n\t// Index of matching PDI for isolate initiator characters. For other\n\t// characters, the value of matchingPDI will be set to -1. For isolate\n\t// initiators with no matching PDI, matchingPDI will be set to the length of\n\t// the input string.\n\tmatchingPDI []int\n\n\t// Index of matching isolate initiator for PDI characters. For other\n\t// characters, and for PDIs with no matching isolate initiator, the value of\n\t// matchingIsolateInitiator will be set to -1.\n\tmatchingIsolateInitiator []int\n}\n\n// newParagraph initializes a paragraph. The user needs to supply a few arrays\n// corresponding to the preprocessed text input. The types correspond to the\n// Unicode BiDi classes for each rune. pairTypes indicates the bracket type for\n// each rune. pairValues provides a unique bracket class identifier for each\n// rune (suggested is the rune of the open bracket for opening and matching\n// close brackets, after normalization). The embedding levels are optional, but\n// may be supplied to encode embedding levels of styled text.\nfunc newParagraph(types []Class, pairTypes []bracketType, pairValues []rune, levels level) (*paragraph, error) {\n\tvar err error\n\tif err = validateTypes(types); err != nil {\n\t\treturn nil, err\n\t}\n\tif err = validatePbTypes(pairTypes); err != nil {\n\t\treturn nil, err\n\t}\n\tif err = validatePbValues(pairValues, pairTypes); err != nil {\n\t\treturn nil, err\n\t}\n\tif err = validateParagraphEmbeddingLevel(levels); err != nil {\n\t\treturn nil, err\n\t}\n\n\tp := &paragraph{\n\t\tinitialTypes:   append([]Class(nil), types...),\n\t\tembeddingLevel: levels,\n\n\t\tpairTypes:  pairTypes,\n\t\tpairValues: pairValues,\n\n\t\tresultTypes: append([]Class(nil), types...),\n\t}\n\tp.run()\n\treturn p, nil\n}\n\nfunc (p *paragraph) Len() int { return len(p.initialTypes) }\n\n// The algorithm. Does not include line-based processing (Rules L1, L2).\n// These are applied later in the line-based phase of the algorithm.\nfunc (p *paragraph) run() {\n\tp.determineMatchingIsolates()\n\n\t// 1) determining the paragraph level\n\t// Rule P1 is the requirement for entering this algorithm.\n\t// Rules P2, P3.\n\t// If no externally supplied paragraph embedding level, use default.\n\tif p.embeddingLevel == implicitLevel {\n\t\tp.embeddingLevel = p.determineParagraphEmbeddingLevel(0, p.Len())\n\t}\n\n\t// Initialize result levels to paragraph embedding level.\n\tp.resultLevels = make([]level, p.Len())\n\tsetLevels(p.resultLevels, p.embeddingLevel)\n\n\t// 2) Explicit levels and directions\n\t// Rules X1-X8.\n\tp.determineExplicitEmbeddingLevels()\n\n\t// Rule X9.\n\t// We do not remove the embeddings, the overrides, the PDFs, and the BNs\n\t// from the string explicitly. But they are not copied into isolating run\n\t// sequences when they are created, so they are removed for all\n\t// practical purposes.\n\n\t// Rule X10.\n\t// Run remainder of algorithm one isolating run sequence at a time\n\tfor _, seq := range p.determineIsolatingRunSequences() {\n\t\t// 3) resolving weak types\n\t\t// Rules W1-W7.\n\t\tseq.resolveWeakTypes()\n\n\t\t// 4a) resolving paired brackets\n\t\t// Rule N0\n\t\tresolvePairedBrackets(seq)\n\n\t\t// 4b) resolving neutral types\n\t\t// Rules N1-N3.\n\t\tseq.resolveNeutralTypes()\n\n\t\t// 5) resolving implicit embedding levels\n\t\t// Rules I1, I2.\n\t\tseq.resolveImplicitLevels()\n\n\t\t// Apply the computed levels and types\n\t\tseq.applyLevelsAndTypes()\n\t}\n\n\t// Assign appropriate levels to 'hide' LREs, RLEs, LROs, RLOs, PDFs, and\n\t// BNs. This is for convenience, so the resulting level array will have\n\t// a value for every character.\n\tp.assignLevelsToCharactersRemovedByX9()\n}\n\n// determineMatchingIsolates determines the matching PDI for each isolate\n// initiator and vice versa.\n//\n// Definition BD9.\n//\n// At the end of this function:\n//\n//   - The member variable matchingPDI is set to point to the index of the\n//     matching PDI character for each isolate initiator character. If there is\n//     no matching PDI, it is set to the length of the input text. For other\n//     characters, it is set to -1.\n//   - The member variable matchingIsolateInitiator is set to point to the\n//     index of the matching isolate initiator character for each PDI character.\n//     If there is no matching isolate initiator, or the character is not a PDI,\n//     it is set to -1.\nfunc (p *paragraph) determineMatchingIsolates() {\n\tp.matchingPDI = make([]int, p.Len())\n\tp.matchingIsolateInitiator = make([]int, p.Len())\n\n\tfor i := range p.matchingIsolateInitiator {\n\t\tp.matchingIsolateInitiator[i] = -1\n\t}\n\n\tfor i := range p.matchingPDI {\n\t\tp.matchingPDI[i] = -1\n\n\t\tif t := p.resultTypes[i]; t.in(LRI, RLI, FSI) {\n\t\t\tdepthCounter := 1\n\t\t\tfor j := i + 1; j < p.Len(); j++ {\n\t\t\t\tif u := p.resultTypes[j]; u.in(LRI, RLI, FSI) {\n\t\t\t\t\tdepthCounter++\n\t\t\t\t} else if u == PDI {\n\t\t\t\t\tif depthCounter--; depthCounter == 0 {\n\t\t\t\t\t\tp.matchingPDI[i] = j\n\t\t\t\t\t\tp.matchingIsolateInitiator[j] = i\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif p.matchingPDI[i] == -1 {\n\t\t\t\tp.matchingPDI[i] = p.Len()\n\t\t\t}\n\t\t}\n\t}\n}\n\n// determineParagraphEmbeddingLevel reports the resolved paragraph direction of\n// the substring limited by the given range [start, end).\n//\n// Determines the paragraph level based on rules P2, P3. This is also used\n// in rule X5c to find if an FSI should resolve to LRI or RLI.\nfunc (p *paragraph) determineParagraphEmbeddingLevel(start, end int) level {\n\tvar strongType Class = unknownClass\n\n\t// Rule P2.\n\tfor i := start; i < end; i++ {\n\t\tif t := p.resultTypes[i]; t.in(L, AL, R) {\n\t\t\tstrongType = t\n\t\t\tbreak\n\t\t} else if t.in(FSI, LRI, RLI) {\n\t\t\ti = p.matchingPDI[i] // skip over to the matching PDI\n\t\t\tif i > end {\n\t\t\t\tlog.Panic(\"assert (i <= end)\")\n\t\t\t}\n\t\t}\n\t}\n\t// Rule P3.\n\tswitch strongType {\n\tcase unknownClass: // none found\n\t\t// default embedding level when no strong types found is 0.\n\t\treturn 0\n\tcase L:\n\t\treturn 0\n\tdefault: // AL, R\n\t\treturn 1\n\t}\n}\n\nconst maxDepth = 125\n\n// This stack will store the embedding levels and override and isolated\n// statuses\ntype directionalStatusStack struct {\n\tstackCounter        int\n\tembeddingLevelStack [maxDepth + 1]level\n\toverrideStatusStack [maxDepth + 1]Class\n\tisolateStatusStack  [maxDepth + 1]bool\n}\n\nfunc (s *directionalStatusStack) empty()     { s.stackCounter = 0 }\nfunc (s *directionalStatusStack) pop()       { s.stackCounter-- }\nfunc (s *directionalStatusStack) depth() int { return s.stackCounter }\n\nfunc (s *directionalStatusStack) push(level level, overrideStatus Class, isolateStatus bool) {\n\ts.embeddingLevelStack[s.stackCounter] = level\n\ts.overrideStatusStack[s.stackCounter] = overrideStatus\n\ts.isolateStatusStack[s.stackCounter] = isolateStatus\n\ts.stackCounter++\n}\n\nfunc (s *directionalStatusStack) lastEmbeddingLevel() level {\n\treturn s.embeddingLevelStack[s.stackCounter-1]\n}\n\nfunc (s *directionalStatusStack) lastDirectionalOverrideStatus() Class {\n\treturn s.overrideStatusStack[s.stackCounter-1]\n}\n\nfunc (s *directionalStatusStack) lastDirectionalIsolateStatus() bool {\n\treturn s.isolateStatusStack[s.stackCounter-1]\n}\n\n// Determine explicit levels using rules X1 - X8\nfunc (p *paragraph) determineExplicitEmbeddingLevels() {\n\tvar stack directionalStatusStack\n\tvar overflowIsolateCount, overflowEmbeddingCount, validIsolateCount int\n\n\t// Rule X1.\n\tstack.push(p.embeddingLevel, ON, false)\n\n\tfor i, t := range p.resultTypes {\n\t\t// Rules X2, X3, X4, X5, X5a, X5b, X5c\n\t\tswitch t {\n\t\tcase RLE, LRE, RLO, LRO, RLI, LRI, FSI:\n\t\t\tisIsolate := t.in(RLI, LRI, FSI)\n\t\t\tisRTL := t.in(RLE, RLO, RLI)\n\n\t\t\t// override if this is an FSI that resolves to RLI\n\t\t\tif t == FSI {\n\t\t\t\tisRTL = (p.determineParagraphEmbeddingLevel(i+1, p.matchingPDI[i]) == 1)\n\t\t\t}\n\t\t\tif isIsolate {\n\t\t\t\tp.resultLevels[i] = stack.lastEmbeddingLevel()\n\t\t\t\tif stack.lastDirectionalOverrideStatus() != ON {\n\t\t\t\t\tp.resultTypes[i] = stack.lastDirectionalOverrideStatus()\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar newLevel level\n\t\t\tif isRTL {\n\t\t\t\t// least greater odd\n\t\t\t\tnewLevel = (stack.lastEmbeddingLevel() + 1) | 1\n\t\t\t} else {\n\t\t\t\t// least greater even\n\t\t\t\tnewLevel = (stack.lastEmbeddingLevel() + 2) &^ 1\n\t\t\t}\n\n\t\t\tif newLevel <= maxDepth && overflowIsolateCount == 0 && overflowEmbeddingCount == 0 {\n\t\t\t\tif isIsolate {\n\t\t\t\t\tvalidIsolateCount++\n\t\t\t\t}\n\t\t\t\t// Push new embedding level, override status, and isolated\n\t\t\t\t// status.\n\t\t\t\t// No check for valid stack counter, since the level check\n\t\t\t\t// suffices.\n\t\t\t\tswitch t {\n\t\t\t\tcase LRO:\n\t\t\t\t\tstack.push(newLevel, L, isIsolate)\n\t\t\t\tcase RLO:\n\t\t\t\t\tstack.push(newLevel, R, isIsolate)\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(newLevel, ON, isIsolate)\n\t\t\t\t}\n\t\t\t\t// Not really part of the spec\n\t\t\t\tif !isIsolate {\n\t\t\t\t\tp.resultLevels[i] = newLevel\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// This is an invalid explicit formatting character,\n\t\t\t\t// so apply the \"Otherwise\" part of rules X2-X5b.\n\t\t\t\tif isIsolate {\n\t\t\t\t\toverflowIsolateCount++\n\t\t\t\t} else { // !isIsolate\n\t\t\t\t\tif overflowIsolateCount == 0 {\n\t\t\t\t\t\toverflowEmbeddingCount++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Rule X6a\n\t\tcase PDI:\n\t\t\tif overflowIsolateCount > 0 {\n\t\t\t\toverflowIsolateCount--\n\t\t\t} else if validIsolateCount == 0 {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\t\t\t\toverflowEmbeddingCount = 0\n\t\t\t\tfor !stack.lastDirectionalIsolateStatus() {\n\t\t\t\t\tstack.pop()\n\t\t\t\t}\n\t\t\t\tstack.pop()\n\t\t\t\tvalidIsolateCount--\n\t\t\t}\n\t\t\tp.resultLevels[i] = stack.lastEmbeddingLevel()\n\n\t\t// Rule X7\n\t\tcase PDF:\n\t\t\t// Not really part of the spec\n\t\t\tp.resultLevels[i] = stack.lastEmbeddingLevel()\n\n\t\t\tif overflowIsolateCount > 0 {\n\t\t\t\t// do nothing\n\t\t\t} else if overflowEmbeddingCount > 0 {\n\t\t\t\toverflowEmbeddingCount--\n\t\t\t} else if !stack.lastDirectionalIsolateStatus() && stack.depth() >= 2 {\n\t\t\t\tstack.pop()\n\t\t\t}\n\n\t\tcase B: // paragraph separator.\n\t\t\t// Rule X8.\n\n\t\t\t// These values are reset for clarity, in this implementation B\n\t\t\t// can only occur as the last code in the array.\n\t\t\tstack.empty()\n\t\t\toverflowIsolateCount = 0\n\t\t\toverflowEmbeddingCount = 0\n\t\t\tvalidIsolateCount = 0\n\t\t\tp.resultLevels[i] = p.embeddingLevel\n\n\t\tdefault:\n\t\t\tp.resultLevels[i] = stack.lastEmbeddingLevel()\n\t\t\tif stack.lastDirectionalOverrideStatus() != ON {\n\t\t\t\tp.resultTypes[i] = stack.lastDirectionalOverrideStatus()\n\t\t\t}\n\t\t}\n\t}\n}\n\ntype isolatingRunSequence struct {\n\tp *paragraph\n\n\tindexes []int // indexes to the original string\n\n\ttypes          []Class // type of each character using the index\n\tresolvedLevels []level // resolved levels after application of rules\n\tlevel          level\n\tsos, eos       Class\n}\n\nfunc (i *isolatingRunSequence) Len() int { return len(i.indexes) }\n\n// Rule X10, second bullet: Determine the start-of-sequence (sos) and end-of-sequence (eos) types,\n// either L or R, for each isolating run sequence.\nfunc (p *paragraph) isolatingRunSequence(indexes []int) *isolatingRunSequence {\n\tlength := len(indexes)\n\ttypes := make([]Class, length)\n\tfor i, x := range indexes {\n\t\ttypes[i] = p.resultTypes[x]\n\t}\n\n\t// assign level, sos and eos\n\tprevChar := indexes[0] - 1\n\tfor prevChar >= 0 && isRemovedByX9(p.initialTypes[prevChar]) {\n\t\tprevChar--\n\t}\n\tprevLevel := p.embeddingLevel\n\tif prevChar >= 0 {\n\t\tprevLevel = p.resultLevels[prevChar]\n\t}\n\n\tvar succLevel level\n\tlastType := types[length-1]\n\tif lastType.in(LRI, RLI, FSI) {\n\t\tsuccLevel = p.embeddingLevel\n\t} else {\n\t\t// the first character after the end of run sequence\n\t\tlimit := indexes[length-1] + 1\n\t\tfor ; limit < p.Len() && isRemovedByX9(p.initialTypes[limit]); limit++ {\n\n\t\t}\n\t\tsuccLevel = p.embeddingLevel\n\t\tif limit < p.Len() {\n\t\t\tsuccLevel = p.resultLevels[limit]\n\t\t}\n\t}\n\tlevel := p.resultLevels[indexes[0]]\n\treturn &isolatingRunSequence{\n\t\tp:       p,\n\t\tindexes: indexes,\n\t\ttypes:   types,\n\t\tlevel:   level,\n\t\tsos:     typeForLevel(max(prevLevel, level)),\n\t\teos:     typeForLevel(max(succLevel, level)),\n\t}\n}\n\n// Resolving weak types Rules W1-W7.\n//\n// Note that some weak types (EN, AN) remain after this processing is\n// complete.\nfunc (s *isolatingRunSequence) resolveWeakTypes() {\n\n\t// on entry, only these types remain\n\ts.assertOnly(L, R, AL, EN, ES, ET, AN, CS, B, S, WS, ON, NSM, LRI, RLI, FSI, PDI)\n\n\t// Rule W1.\n\t// Changes all NSMs.\n\tprecedingCharacterType := s.sos\n\tfor i, t := range s.types {\n\t\tif t == NSM {\n\t\t\ts.types[i] = precedingCharacterType\n\t\t} else {\n\t\t\t// if t.in(LRI, RLI, FSI, PDI) {\n\t\t\t// \tprecedingCharacterType = ON\n\t\t\t// }\n\t\t\tprecedingCharacterType = t\n\t\t}\n\t}\n\n\t// Rule W2.\n\t// EN does not change at the start of the run, because sos != AL.\n\tfor i, t := range s.types {\n\t\tif t == EN {\n\t\t\tfor j := i - 1; j >= 0; j-- {\n\t\t\t\tif t := s.types[j]; t.in(L, R, AL) {\n\t\t\t\t\tif t == AL {\n\t\t\t\t\t\ts.types[i] = AN\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Rule W3.\n\tfor i, t := range s.types {\n\t\tif t == AL {\n\t\t\ts.types[i] = R\n\t\t}\n\t}\n\n\t// Rule W4.\n\t// Since there must be values on both sides for this rule to have an\n\t// effect, the scan skips the first and last value.\n\t//\n\t// Although the scan proceeds left to right, and changes the type\n\t// values in a way that would appear to affect the computations\n\t// later in the scan, there is actually no problem. A change in the\n\t// current value can only affect the value to its immediate right,\n\t// and only affect it if it is ES or CS. But the current value can\n\t// only change if the value to its right is not ES or CS. Thus\n\t// either the current value will not change, or its change will have\n\t// no effect on the remainder of the analysis.\n\n\tfor i := 1; i < s.Len()-1; i++ {\n\t\tt := s.types[i]\n\t\tif t == ES || t == CS {\n\t\t\tprevSepType := s.types[i-1]\n\t\t\tsuccSepType := s.types[i+1]\n\t\t\tif prevSepType == EN && succSepType == EN {\n\t\t\t\ts.types[i] = EN\n\t\t\t} else if s.types[i] == CS && prevSepType == AN && succSepType == AN {\n\t\t\t\ts.types[i] = AN\n\t\t\t}\n\t\t}\n\t}\n\n\t// Rule W5.\n\tfor i, t := range s.types {\n\t\tif t == ET {\n\t\t\t// locate end of sequence\n\t\t\trunStart := i\n\t\t\trunEnd := s.findRunLimit(runStart, ET)\n\n\t\t\t// check values at ends of sequence\n\t\t\tt := s.sos\n\t\t\tif runStart > 0 {\n\t\t\t\tt = s.types[runStart-1]\n\t\t\t}\n\t\t\tif t != EN {\n\t\t\t\tt = s.eos\n\t\t\t\tif runEnd < len(s.types) {\n\t\t\t\t\tt = s.types[runEnd]\n\t\t\t\t}\n\t\t\t}\n\t\t\tif t == EN {\n\t\t\t\tsetTypes(s.types[runStart:runEnd], EN)\n\t\t\t}\n\t\t\t// continue at end of sequence\n\t\t\ti = runEnd\n\t\t}\n\t}\n\n\t// Rule W6.\n\tfor i, t := range s.types {\n\t\tif t.in(ES, ET, CS) {\n\t\t\ts.types[i] = ON\n\t\t}\n\t}\n\n\t// Rule W7.\n\tfor i, t := range s.types {\n\t\tif t == EN {\n\t\t\t// set default if we reach start of run\n\t\t\tprevStrongType := s.sos\n\t\t\tfor j := i - 1; j >= 0; j-- {\n\t\t\t\tt = s.types[j]\n\t\t\t\tif t == L || t == R { // AL's have been changed to R\n\t\t\t\t\tprevStrongType = t\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif prevStrongType == L {\n\t\t\t\ts.types[i] = L\n\t\t\t}\n\t\t}\n\t}\n}\n\n// 6) resolving neutral types Rules N1-N2.\nfunc (s *isolatingRunSequence) resolveNeutralTypes() {\n\n\t// on entry, only these types can be in resultTypes\n\ts.assertOnly(L, R, EN, AN, B, S, WS, ON, RLI, LRI, FSI, PDI)\n\n\tfor i, t := range s.types {\n\t\tswitch t {\n\t\tcase WS, ON, B, S, RLI, LRI, FSI, PDI:\n\t\t\t// find bounds of run of neutrals\n\t\t\trunStart := i\n\t\t\trunEnd := s.findRunLimit(runStart, B, S, WS, ON, RLI, LRI, FSI, PDI)\n\n\t\t\t// determine effective types at ends of run\n\t\t\tvar leadType, trailType Class\n\n\t\t\t// Note that the character found can only be L, R, AN, or\n\t\t\t// EN.\n\t\t\tif runStart == 0 {\n\t\t\t\tleadType = s.sos\n\t\t\t} else {\n\t\t\t\tleadType = s.types[runStart-1]\n\t\t\t\tif leadType.in(AN, EN) {\n\t\t\t\t\tleadType = R\n\t\t\t\t}\n\t\t\t}\n\t\t\tif runEnd == len(s.types) {\n\t\t\t\ttrailType = s.eos\n\t\t\t} else {\n\t\t\t\ttrailType = s.types[runEnd]\n\t\t\t\tif trailType.in(AN, EN) {\n\t\t\t\t\ttrailType = R\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar resolvedType Class\n\t\t\tif leadType == trailType {\n\t\t\t\t// Rule N1.\n\t\t\t\tresolvedType = leadType\n\t\t\t} else {\n\t\t\t\t// Rule N2.\n\t\t\t\t// Notice the embedding level of the run is used, not\n\t\t\t\t// the paragraph embedding level.\n\t\t\t\tresolvedType = typeForLevel(s.level)\n\t\t\t}\n\n\t\t\tsetTypes(s.types[runStart:runEnd], resolvedType)\n\n\t\t\t// skip over run of (former) neutrals\n\t\t\ti = runEnd\n\t\t}\n\t}\n}\n\nfunc setLevels(levels []level, newLevel level) {\n\tfor i := range levels {\n\t\tlevels[i] = newLevel\n\t}\n}\n\nfunc setTypes(types []Class, newType Class) {\n\tfor i := range types {\n\t\ttypes[i] = newType\n\t}\n}\n\n// 7) resolving implicit embedding levels Rules I1, I2.\nfunc (s *isolatingRunSequence) resolveImplicitLevels() {\n\n\t// on entry, only these types can be in resultTypes\n\ts.assertOnly(L, R, EN, AN)\n\n\ts.resolvedLevels = make([]level, len(s.types))\n\tsetLevels(s.resolvedLevels, s.level)\n\n\tif (s.level & 1) == 0 { // even level\n\t\tfor i, t := range s.types {\n\t\t\t// Rule I1.\n\t\t\tif t == L {\n\t\t\t\t// no change\n\t\t\t} else if t == R {\n\t\t\t\ts.resolvedLevels[i] += 1\n\t\t\t} else { // t == AN || t == EN\n\t\t\t\ts.resolvedLevels[i] += 2\n\t\t\t}\n\t\t}\n\t} else { // odd level\n\t\tfor i, t := range s.types {\n\t\t\t// Rule I2.\n\t\t\tif t == R {\n\t\t\t\t// no change\n\t\t\t} else { // t == L || t == AN || t == EN\n\t\t\t\ts.resolvedLevels[i] += 1\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Applies the levels and types resolved in rules W1-I2 to the\n// resultLevels array.\nfunc (s *isolatingRunSequence) applyLevelsAndTypes() {\n\tfor i, x := range s.indexes {\n\t\ts.p.resultTypes[x] = s.types[i]\n\t\ts.p.resultLevels[x] = s.resolvedLevels[i]\n\t}\n}\n\n// Return the limit of the run consisting only of the types in validSet\n// starting at index. This checks the value at index, and will return\n// index if that value is not in validSet.\nfunc (s *isolatingRunSequence) findRunLimit(index int, validSet ...Class) int {\nloop:\n\tfor ; index < len(s.types); index++ {\n\t\tt := s.types[index]\n\t\tfor _, valid := range validSet {\n\t\t\tif t == valid {\n\t\t\t\tcontinue loop\n\t\t\t}\n\t\t}\n\t\treturn index // didn't find a match in validSet\n\t}\n\treturn len(s.types)\n}\n\n// Algorithm validation. Assert that all values in types are in the\n// provided set.\nfunc (s *isolatingRunSequence) assertOnly(codes ...Class) {\nloop:\n\tfor i, t := range s.types {\n\t\tfor _, c := range codes {\n\t\t\tif t == c {\n\t\t\t\tcontinue loop\n\t\t\t}\n\t\t}\n\t\tlog.Panicf(\"invalid bidi code %v present in assertOnly at position %d\", t, s.indexes[i])\n\t}\n}\n\n// determineLevelRuns returns an array of level runs. Each level run is\n// described as an array of indexes into the input string.\n//\n// Determines the level runs. Rule X9 will be applied in determining the\n// runs, in the way that makes sure the characters that are supposed to be\n// removed are not included in the runs.\nfunc (p *paragraph) determineLevelRuns() [][]int {\n\trun := []int{}\n\tallRuns := [][]int{}\n\tcurrentLevel := implicitLevel\n\n\tfor i := range p.initialTypes {\n\t\tif !isRemovedByX9(p.initialTypes[i]) {\n\t\t\tif p.resultLevels[i] != currentLevel {\n\t\t\t\t// we just encountered a new run; wrap up last run\n\t\t\t\tif currentLevel >= 0 { // only wrap it up if there was a run\n\t\t\t\t\tallRuns = append(allRuns, run)\n\t\t\t\t\trun = nil\n\t\t\t\t}\n\t\t\t\t// Start new run\n\t\t\t\tcurrentLevel = p.resultLevels[i]\n\t\t\t}\n\t\t\trun = append(run, i)\n\t\t}\n\t}\n\t// Wrap up the final run, if any\n\tif len(run) > 0 {\n\t\tallRuns = append(allRuns, run)\n\t}\n\treturn allRuns\n}\n\n// Definition BD13. Determine isolating run sequences.\nfunc (p *paragraph) determineIsolatingRunSequences() []*isolatingRunSequence {\n\tlevelRuns := p.determineLevelRuns()\n\n\t// Compute the run that each character belongs to\n\trunForCharacter := make([]int, p.Len())\n\tfor i, run := range levelRuns {\n\t\tfor _, index := range run {\n\t\t\trunForCharacter[index] = i\n\t\t}\n\t}\n\n\tsequences := []*isolatingRunSequence{}\n\n\tvar currentRunSequence []int\n\n\tfor _, run := range levelRuns {\n\t\tfirst := run[0]\n\t\tif p.initialTypes[first] != PDI || p.matchingIsolateInitiator[first] == -1 {\n\t\t\tcurrentRunSequence = nil\n\t\t\t// int run = i;\n\t\t\tfor {\n\t\t\t\t// Copy this level run into currentRunSequence\n\t\t\t\tcurrentRunSequence = append(currentRunSequence, run...)\n\n\t\t\t\tlast := currentRunSequence[len(currentRunSequence)-1]\n\t\t\t\tlastT := p.initialTypes[last]\n\t\t\t\tif lastT.in(LRI, RLI, FSI) && p.matchingPDI[last] != p.Len() {\n\t\t\t\t\trun = levelRuns[runForCharacter[p.matchingPDI[last]]]\n\t\t\t\t} else {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tsequences = append(sequences, p.isolatingRunSequence(currentRunSequence))\n\t\t}\n\t}\n\treturn sequences\n}\n\n// Assign level information to characters removed by rule X9. This is for\n// ease of relating the level information to the original input data. Note\n// that the levels assigned to these codes are arbitrary, they're chosen so\n// as to avoid breaking level runs.\nfunc (p *paragraph) assignLevelsToCharactersRemovedByX9() {\n\tfor i, t := range p.initialTypes {\n\t\tif t.in(LRE, RLE, LRO, RLO, PDF, BN) {\n\t\t\tp.resultTypes[i] = t\n\t\t\tp.resultLevels[i] = -1\n\t\t}\n\t}\n\t// now propagate forward the levels information (could have\n\t// propagated backward, the main thing is not to introduce a level\n\t// break where one doesn't already exist).\n\n\tif p.resultLevels[0] == -1 {\n\t\tp.resultLevels[0] = p.embeddingLevel\n\t}\n\tfor i := 1; i < len(p.initialTypes); i++ {\n\t\tif p.resultLevels[i] == -1 {\n\t\t\tp.resultLevels[i] = p.resultLevels[i-1]\n\t\t}\n\t}\n\t// Embedding information is for informational purposes only so need not be\n\t// adjusted.\n}\n\n//\n// Output\n//\n\n// getLevels computes levels array breaking lines at offsets in linebreaks.\n// Rule L1.\n//\n// The linebreaks array must include at least one value. The values must be\n// in strictly increasing order (no duplicates) between 1 and the length of\n// the text, inclusive. The last value must be the length of the text.\nfunc (p *paragraph) getLevels(linebreaks []int) []level {\n\t// Note that since the previous processing has removed all\n\t// P, S, and WS values from resultTypes, the values referred to\n\t// in these rules are the initial types, before any processing\n\t// has been applied (including processing of overrides).\n\t//\n\t// This example implementation has reinserted explicit format codes\n\t// and BN, in order that the levels array correspond to the\n\t// initial text. Their final placement is not normative.\n\t// These codes are treated like WS in this implementation,\n\t// so they don't interrupt sequences of WS.\n\n\tvalidateLineBreaks(linebreaks, p.Len())\n\n\tresult := append([]level(nil), p.resultLevels...)\n\n\t// don't worry about linebreaks since if there is a break within\n\t// a series of WS values preceding S, the linebreak itself\n\t// causes the reset.\n\tfor i, t := range p.initialTypes {\n\t\tif t.in(B, S) {\n\t\t\t// Rule L1, clauses one and two.\n\t\t\tresult[i] = p.embeddingLevel\n\n\t\t\t// Rule L1, clause three.\n\t\t\tfor j := i - 1; j >= 0; j-- {\n\t\t\t\tif isWhitespace(p.initialTypes[j]) { // including format codes\n\t\t\t\t\tresult[j] = p.embeddingLevel\n\t\t\t\t} else {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Rule L1, clause four.\n\tstart := 0\n\tfor _, limit := range linebreaks {\n\t\tfor j := limit - 1; j >= start; j-- {\n\t\t\tif isWhitespace(p.initialTypes[j]) { // including format codes\n\t\t\t\tresult[j] = p.embeddingLevel\n\t\t\t} else {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tstart = limit\n\t}\n\n\treturn result\n}\n\n// getReordering returns the reordering of lines from a visual index to a\n// logical index for line breaks at the given offsets.\n//\n// Lines are concatenated from left to right. So for example, the fifth\n// character from the left on the third line is\n//\n//\tgetReordering(linebreaks)[linebreaks[1] + 4]\n//\n// (linebreaks[1] is the position after the last character of the second\n// line, which is also the index of the first character on the third line,\n// and adding four gets the fifth character from the left).\n//\n// The linebreaks array must include at least one value. The values must be\n// in strictly increasing order (no duplicates) between 1 and the length of\n// the text, inclusive. The last value must be the length of the text.\nfunc (p *paragraph) getReordering(linebreaks []int) []int {\n\tvalidateLineBreaks(linebreaks, p.Len())\n\n\treturn computeMultilineReordering(p.getLevels(linebreaks), linebreaks)\n}\n\n// Return multiline reordering array for a given level array. Reordering\n// does not occur across a line break.\nfunc computeMultilineReordering(levels []level, linebreaks []int) []int {\n\tresult := make([]int, len(levels))\n\n\tstart := 0\n\tfor _, limit := range linebreaks {\n\t\ttempLevels := make([]level, limit-start)\n\t\tcopy(tempLevels, levels[start:])\n\n\t\tfor j, order := range computeReordering(tempLevels) {\n\t\t\tresult[start+j] = order + start\n\t\t}\n\t\tstart = limit\n\t}\n\treturn result\n}\n\n// Return reordering array for a given level array. This reorders a single\n// line. The reordering is a visual to logical map. For example, the\n// leftmost char is string.charAt(order[0]). Rule L2.\nfunc computeReordering(levels []level) []int {\n\tresult := make([]int, len(levels))\n\t// initialize order\n\tfor i := range result {\n\t\tresult[i] = i\n\t}\n\n\t// locate highest level found on line.\n\t// Note the rules say text, but no reordering across line bounds is\n\t// performed, so this is sufficient.\n\thighestLevel := level(0)\n\tlowestOddLevel := level(maxDepth + 2)\n\tfor _, level := range levels {\n\t\tif level > highestLevel {\n\t\t\thighestLevel = level\n\t\t}\n\t\tif level&1 != 0 && level < lowestOddLevel {\n\t\t\tlowestOddLevel = level\n\t\t}\n\t}\n\n\tfor level := highestLevel; level >= lowestOddLevel; level-- {\n\t\tfor i := 0; i < len(levels); i++ {\n\t\t\tif levels[i] >= level {\n\t\t\t\t// find range of text at or above this level\n\t\t\t\tstart := i\n\t\t\t\tlimit := i + 1\n\t\t\t\tfor limit < len(levels) && levels[limit] >= level {\n\t\t\t\t\tlimit++\n\t\t\t\t}\n\n\t\t\t\tfor j, k := start, limit-1; j < k; j, k = j+1, k-1 {\n\t\t\t\t\tresult[j], result[k] = result[k], result[j]\n\t\t\t\t}\n\t\t\t\t// skip to end of level run\n\t\t\t\ti = limit\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result\n}\n\n// isWhitespace reports whether the type is considered a whitespace type for the\n// line break rules.\nfunc isWhitespace(c Class) bool {\n\tswitch c {\n\tcase LRE, RLE, LRO, RLO, PDF, LRI, RLI, FSI, PDI, BN, WS:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// isRemovedByX9 reports whether the type is one of the types removed in X9.\nfunc isRemovedByX9(c Class) bool {\n\tswitch c {\n\tcase LRE, RLE, LRO, RLO, PDF, BN:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// typeForLevel reports the strong type (L or R) corresponding to the level.\nfunc typeForLevel(level level) Class {\n\tif (level & 0x1) == 0 {\n\t\treturn L\n\t}\n\treturn R\n}\n\nfunc validateTypes(types []Class) error {\n\tif len(types) == 0 {\n\t\treturn fmt.Errorf(\"types is null\")\n\t}\n\tfor i, t := range types[:len(types)-1] {\n\t\tif t == B {\n\t\t\treturn fmt.Errorf(\"B type before end of paragraph at index: %d\", i)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateParagraphEmbeddingLevel(embeddingLevel level) error {\n\tif embeddingLevel != implicitLevel &&\n\t\tembeddingLevel != 0 &&\n\t\tembeddingLevel != 1 {\n\t\treturn fmt.Errorf(\"illegal paragraph embedding level: %d\", embeddingLevel)\n\t}\n\treturn nil\n}\n\nfunc validateLineBreaks(linebreaks []int, textLength int) error {\n\tprev := 0\n\tfor i, next := range linebreaks {\n\t\tif next <= prev {\n\t\t\treturn fmt.Errorf(\"bad linebreak: %d at index: %d\", next, i)\n\t\t}\n\t\tprev = next\n\t}\n\tif prev != textLength {\n\t\treturn fmt.Errorf(\"last linebreak was %d, want %d\", prev, textLength)\n\t}\n\treturn nil\n}\n\nfunc validatePbTypes(pairTypes []bracketType) error {\n\tif len(pairTypes) == 0 {\n\t\treturn fmt.Errorf(\"pairTypes is null\")\n\t}\n\tfor i, pt := range pairTypes {\n\t\tswitch pt {\n\t\tcase bpNone, bpOpen, bpClose:\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"illegal pairType value at %d: %v\", i, pairTypes[i])\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validatePbValues(pairValues []rune, pairTypes []bracketType) error {\n\tif pairValues == nil {\n\t\treturn fmt.Errorf(\"pairValues is null\")\n\t}\n\tif len(pairTypes) != len(pairValues) {\n\t\treturn fmt.Errorf(\"pairTypes is different length from pairValues\")\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/prop.go",
    "content": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage bidi\n\nimport \"unicode/utf8\"\n\n// Properties provides access to BiDi properties of runes.\ntype Properties struct {\n\tentry uint8\n\tlast  uint8\n}\n\nvar trie = newBidiTrie(0)\n\n// TODO: using this for bidirule reduces the running time by about 5%. Consider\n// if this is worth exposing or if we can find a way to speed up the Class\n// method.\n//\n// // CompactClass is like Class, but maps all of the BiDi control classes\n// // (LRO, RLO, LRE, RLE, PDF, LRI, RLI, FSI, PDI) to the class Control.\n// func (p Properties) CompactClass() Class {\n// \treturn Class(p.entry & 0x0F)\n// }\n\n// Class returns the Bidi class for p.\nfunc (p Properties) Class() Class {\n\tc := Class(p.entry & 0x0F)\n\tif c == Control {\n\t\tc = controlByteToClass[p.last&0xF]\n\t}\n\treturn c\n}\n\n// IsBracket reports whether the rune is a bracket.\nfunc (p Properties) IsBracket() bool { return p.entry&0xF0 != 0 }\n\n// IsOpeningBracket reports whether the rune is an opening bracket.\n// IsBracket must return true.\nfunc (p Properties) IsOpeningBracket() bool { return p.entry&openMask != 0 }\n\n// TODO: find a better API and expose.\nfunc (p Properties) reverseBracket(r rune) rune {\n\treturn xorMasks[p.entry>>xorMaskShift] ^ r\n}\n\nvar controlByteToClass = [16]Class{\n\t0xD: LRO, // U+202D LeftToRightOverride,\n\t0xE: RLO, // U+202E RightToLeftOverride,\n\t0xA: LRE, // U+202A LeftToRightEmbedding,\n\t0xB: RLE, // U+202B RightToLeftEmbedding,\n\t0xC: PDF, // U+202C PopDirectionalFormat,\n\t0x6: LRI, // U+2066 LeftToRightIsolate,\n\t0x7: RLI, // U+2067 RightToLeftIsolate,\n\t0x8: FSI, // U+2068 FirstStrongIsolate,\n\t0x9: PDI, // U+2069 PopDirectionalIsolate,\n}\n\n// LookupRune returns properties for r.\nfunc LookupRune(r rune) (p Properties, size int) {\n\tvar buf [4]byte\n\tn := utf8.EncodeRune(buf[:], r)\n\treturn Lookup(buf[:n])\n}\n\n// TODO: these lookup methods are based on the generated trie code. The returned\n// sizes have slightly different semantics from the generated code, in that it\n// always returns size==1 for an illegal UTF-8 byte (instead of the length\n// of the maximum invalid subsequence). Most Transformers, like unicode/norm,\n// leave invalid UTF-8 untouched, in which case it has performance benefits to\n// do so (without changing the semantics). Bidi requires the semantics used here\n// for the bidirule implementation to be compatible with the Go semantics.\n//  They ultimately should perhaps be adopted by all trie implementations, for\n// convenience sake.\n// This unrolled code also boosts performance of the secure/bidirule package by\n// about 30%.\n// So, to remove this code:\n//   - add option to trie generator to define return type.\n//   - always return 1 byte size for ill-formed UTF-8 runes.\n\n// Lookup returns properties for the first rune in s and the width in bytes of\n// its encoding. The size will be 0 if s does not hold enough bytes to complete\n// the encoding.\nfunc Lookup(s []byte) (p Properties, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn Properties{entry: bidiValues[c0]}, 1\n\tcase c0 < 0xC2:\n\t\treturn Properties{}, 1\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c1)}, 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c2), last: c2}, 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c3)}, 4\n\t}\n\t// Illegal rune\n\treturn Properties{}, 1\n}\n\n// LookupString returns properties for the first rune in s and the width in\n// bytes of its encoding. The size will be 0 if s does not hold enough bytes to\n// complete the encoding.\nfunc LookupString(s string) (p Properties, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn Properties{entry: bidiValues[c0]}, 1\n\tcase c0 < 0xC2:\n\t\treturn Properties{}, 1\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c1)}, 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c2), last: c2}, 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn Properties{}, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn Properties{}, 1\n\t\t}\n\t\treturn Properties{entry: trie.lookupValue(uint32(i), c3)}, 4\n\t}\n\t// Illegal rune\n\treturn Properties{}, 1\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build !go1.27\n\npackage bidi\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"15.0.0\"\n\n// xorMasks contains masks to be xor-ed with brackets to get the reverse\n// version.\nvar xorMasks = []int32{ // 8 elements\n\t0, 1, 6, 7, 3, 15, 29, 63,\n} // Size: 56 bytes\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *bidiTrie) lookup(s []byte) (v uint8, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn bidiValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *bidiTrie) lookupUnsafe(s []byte) uint8 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn bidiValues[c0]\n\t}\n\ti := bidiIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *bidiTrie) lookupString(s string) (v uint8, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn bidiValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *bidiTrie) lookupStringUnsafe(s string) uint8 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn bidiValues[c0]\n\t}\n\ti := bidiIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// bidiTrie. Total size: 19904 bytes (19.44 KiB). Checksum: b1f201ed2debb6c8.\ntype bidiTrie struct{}\n\nfunc newBidiTrie(i int) *bidiTrie {\n\treturn &bidiTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *bidiTrie) lookupValue(n uint32, b byte) uint8 {\n\tswitch {\n\tdefault:\n\t\treturn uint8(bidiValues[n<<6+uint32(b)])\n\t}\n}\n\n// bidiValues: 259 blocks, 16576 entries, 16576 bytes\n// The third block is the zero block.\nvar bidiValues = [16576]uint8{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x000b, 0x01: 0x000b, 0x02: 0x000b, 0x03: 0x000b, 0x04: 0x000b, 0x05: 0x000b,\n\t0x06: 0x000b, 0x07: 0x000b, 0x08: 0x000b, 0x09: 0x0008, 0x0a: 0x0007, 0x0b: 0x0008,\n\t0x0c: 0x0009, 0x0d: 0x0007, 0x0e: 0x000b, 0x0f: 0x000b, 0x10: 0x000b, 0x11: 0x000b,\n\t0x12: 0x000b, 0x13: 0x000b, 0x14: 0x000b, 0x15: 0x000b, 0x16: 0x000b, 0x17: 0x000b,\n\t0x18: 0x000b, 0x19: 0x000b, 0x1a: 0x000b, 0x1b: 0x000b, 0x1c: 0x0007, 0x1d: 0x0007,\n\t0x1e: 0x0007, 0x1f: 0x0008, 0x20: 0x0009, 0x21: 0x000a, 0x22: 0x000a, 0x23: 0x0004,\n\t0x24: 0x0004, 0x25: 0x0004, 0x26: 0x000a, 0x27: 0x000a, 0x28: 0x003a, 0x29: 0x002a,\n\t0x2a: 0x000a, 0x2b: 0x0003, 0x2c: 0x0006, 0x2d: 0x0003, 0x2e: 0x0006, 0x2f: 0x0006,\n\t0x30: 0x0002, 0x31: 0x0002, 0x32: 0x0002, 0x33: 0x0002, 0x34: 0x0002, 0x35: 0x0002,\n\t0x36: 0x0002, 0x37: 0x0002, 0x38: 0x0002, 0x39: 0x0002, 0x3a: 0x0006, 0x3b: 0x000a,\n\t0x3c: 0x000a, 0x3d: 0x000a, 0x3e: 0x000a, 0x3f: 0x000a,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x000a,\n\t0x5b: 0x005a, 0x5c: 0x000a, 0x5d: 0x004a,\n\t0x5e: 0x000a, 0x5f: 0x000a, 0x60: 0x000a,\n\t0x7b: 0x005a,\n\t0x7c: 0x000a, 0x7d: 0x004a, 0x7e: 0x000a, 0x7f: 0x000b,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x000b, 0xc1: 0x000b, 0xc2: 0x000b, 0xc3: 0x000b, 0xc4: 0x000b, 0xc5: 0x0007,\n\t0xc6: 0x000b, 0xc7: 0x000b, 0xc8: 0x000b, 0xc9: 0x000b, 0xca: 0x000b, 0xcb: 0x000b,\n\t0xcc: 0x000b, 0xcd: 0x000b, 0xce: 0x000b, 0xcf: 0x000b, 0xd0: 0x000b, 0xd1: 0x000b,\n\t0xd2: 0x000b, 0xd3: 0x000b, 0xd4: 0x000b, 0xd5: 0x000b, 0xd6: 0x000b, 0xd7: 0x000b,\n\t0xd8: 0x000b, 0xd9: 0x000b, 0xda: 0x000b, 0xdb: 0x000b, 0xdc: 0x000b, 0xdd: 0x000b,\n\t0xde: 0x000b, 0xdf: 0x000b, 0xe0: 0x0006, 0xe1: 0x000a, 0xe2: 0x0004, 0xe3: 0x0004,\n\t0xe4: 0x0004, 0xe5: 0x0004, 0xe6: 0x000a, 0xe7: 0x000a, 0xe8: 0x000a, 0xe9: 0x000a,\n\t0xeb: 0x000a, 0xec: 0x000a, 0xed: 0x000b, 0xee: 0x000a, 0xef: 0x000a,\n\t0xf0: 0x0004, 0xf1: 0x0004, 0xf2: 0x0002, 0xf3: 0x0002, 0xf4: 0x000a,\n\t0xf6: 0x000a, 0xf7: 0x000a, 0xf8: 0x000a, 0xf9: 0x0002, 0xfb: 0x000a,\n\t0xfc: 0x000a, 0xfd: 0x000a, 0xfe: 0x000a, 0xff: 0x000a,\n\t// Block 0x4, offset 0x100\n\t0x117: 0x000a,\n\t0x137: 0x000a,\n\t// Block 0x5, offset 0x140\n\t0x179: 0x000a, 0x17a: 0x000a,\n\t// Block 0x6, offset 0x180\n\t0x182: 0x000a, 0x183: 0x000a, 0x184: 0x000a, 0x185: 0x000a,\n\t0x186: 0x000a, 0x187: 0x000a, 0x188: 0x000a, 0x189: 0x000a, 0x18a: 0x000a, 0x18b: 0x000a,\n\t0x18c: 0x000a, 0x18d: 0x000a, 0x18e: 0x000a, 0x18f: 0x000a,\n\t0x192: 0x000a, 0x193: 0x000a, 0x194: 0x000a, 0x195: 0x000a, 0x196: 0x000a, 0x197: 0x000a,\n\t0x198: 0x000a, 0x199: 0x000a, 0x19a: 0x000a, 0x19b: 0x000a, 0x19c: 0x000a, 0x19d: 0x000a,\n\t0x19e: 0x000a, 0x19f: 0x000a,\n\t0x1a5: 0x000a, 0x1a6: 0x000a, 0x1a7: 0x000a, 0x1a8: 0x000a, 0x1a9: 0x000a,\n\t0x1aa: 0x000a, 0x1ab: 0x000a, 0x1ac: 0x000a, 0x1ad: 0x000a, 0x1af: 0x000a,\n\t0x1b0: 0x000a, 0x1b1: 0x000a, 0x1b2: 0x000a, 0x1b3: 0x000a, 0x1b4: 0x000a, 0x1b5: 0x000a,\n\t0x1b6: 0x000a, 0x1b7: 0x000a, 0x1b8: 0x000a, 0x1b9: 0x000a, 0x1ba: 0x000a, 0x1bb: 0x000a,\n\t0x1bc: 0x000a, 0x1bd: 0x000a, 0x1be: 0x000a, 0x1bf: 0x000a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x000c, 0x1c1: 0x000c, 0x1c2: 0x000c, 0x1c3: 0x000c, 0x1c4: 0x000c, 0x1c5: 0x000c,\n\t0x1c6: 0x000c, 0x1c7: 0x000c, 0x1c8: 0x000c, 0x1c9: 0x000c, 0x1ca: 0x000c, 0x1cb: 0x000c,\n\t0x1cc: 0x000c, 0x1cd: 0x000c, 0x1ce: 0x000c, 0x1cf: 0x000c, 0x1d0: 0x000c, 0x1d1: 0x000c,\n\t0x1d2: 0x000c, 0x1d3: 0x000c, 0x1d4: 0x000c, 0x1d5: 0x000c, 0x1d6: 0x000c, 0x1d7: 0x000c,\n\t0x1d8: 0x000c, 0x1d9: 0x000c, 0x1da: 0x000c, 0x1db: 0x000c, 0x1dc: 0x000c, 0x1dd: 0x000c,\n\t0x1de: 0x000c, 0x1df: 0x000c, 0x1e0: 0x000c, 0x1e1: 0x000c, 0x1e2: 0x000c, 0x1e3: 0x000c,\n\t0x1e4: 0x000c, 0x1e5: 0x000c, 0x1e6: 0x000c, 0x1e7: 0x000c, 0x1e8: 0x000c, 0x1e9: 0x000c,\n\t0x1ea: 0x000c, 0x1eb: 0x000c, 0x1ec: 0x000c, 0x1ed: 0x000c, 0x1ee: 0x000c, 0x1ef: 0x000c,\n\t0x1f0: 0x000c, 0x1f1: 0x000c, 0x1f2: 0x000c, 0x1f3: 0x000c, 0x1f4: 0x000c, 0x1f5: 0x000c,\n\t0x1f6: 0x000c, 0x1f7: 0x000c, 0x1f8: 0x000c, 0x1f9: 0x000c, 0x1fa: 0x000c, 0x1fb: 0x000c,\n\t0x1fc: 0x000c, 0x1fd: 0x000c, 0x1fe: 0x000c, 0x1ff: 0x000c,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x000c, 0x201: 0x000c, 0x202: 0x000c, 0x203: 0x000c, 0x204: 0x000c, 0x205: 0x000c,\n\t0x206: 0x000c, 0x207: 0x000c, 0x208: 0x000c, 0x209: 0x000c, 0x20a: 0x000c, 0x20b: 0x000c,\n\t0x20c: 0x000c, 0x20d: 0x000c, 0x20e: 0x000c, 0x20f: 0x000c, 0x210: 0x000c, 0x211: 0x000c,\n\t0x212: 0x000c, 0x213: 0x000c, 0x214: 0x000c, 0x215: 0x000c, 0x216: 0x000c, 0x217: 0x000c,\n\t0x218: 0x000c, 0x219: 0x000c, 0x21a: 0x000c, 0x21b: 0x000c, 0x21c: 0x000c, 0x21d: 0x000c,\n\t0x21e: 0x000c, 0x21f: 0x000c, 0x220: 0x000c, 0x221: 0x000c, 0x222: 0x000c, 0x223: 0x000c,\n\t0x224: 0x000c, 0x225: 0x000c, 0x226: 0x000c, 0x227: 0x000c, 0x228: 0x000c, 0x229: 0x000c,\n\t0x22a: 0x000c, 0x22b: 0x000c, 0x22c: 0x000c, 0x22d: 0x000c, 0x22e: 0x000c, 0x22f: 0x000c,\n\t0x234: 0x000a, 0x235: 0x000a,\n\t0x23e: 0x000a,\n\t// Block 0x9, offset 0x240\n\t0x244: 0x000a, 0x245: 0x000a,\n\t0x247: 0x000a,\n\t// Block 0xa, offset 0x280\n\t0x2b6: 0x000a,\n\t// Block 0xb, offset 0x2c0\n\t0x2c3: 0x000c, 0x2c4: 0x000c, 0x2c5: 0x000c,\n\t0x2c6: 0x000c, 0x2c7: 0x000c, 0x2c8: 0x000c, 0x2c9: 0x000c,\n\t// Block 0xc, offset 0x300\n\t0x30a: 0x000a,\n\t0x30d: 0x000a, 0x30e: 0x000a, 0x30f: 0x0004, 0x310: 0x0001, 0x311: 0x000c,\n\t0x312: 0x000c, 0x313: 0x000c, 0x314: 0x000c, 0x315: 0x000c, 0x316: 0x000c, 0x317: 0x000c,\n\t0x318: 0x000c, 0x319: 0x000c, 0x31a: 0x000c, 0x31b: 0x000c, 0x31c: 0x000c, 0x31d: 0x000c,\n\t0x31e: 0x000c, 0x31f: 0x000c, 0x320: 0x000c, 0x321: 0x000c, 0x322: 0x000c, 0x323: 0x000c,\n\t0x324: 0x000c, 0x325: 0x000c, 0x326: 0x000c, 0x327: 0x000c, 0x328: 0x000c, 0x329: 0x000c,\n\t0x32a: 0x000c, 0x32b: 0x000c, 0x32c: 0x000c, 0x32d: 0x000c, 0x32e: 0x000c, 0x32f: 0x000c,\n\t0x330: 0x000c, 0x331: 0x000c, 0x332: 0x000c, 0x333: 0x000c, 0x334: 0x000c, 0x335: 0x000c,\n\t0x336: 0x000c, 0x337: 0x000c, 0x338: 0x000c, 0x339: 0x000c, 0x33a: 0x000c, 0x33b: 0x000c,\n\t0x33c: 0x000c, 0x33d: 0x000c, 0x33e: 0x0001, 0x33f: 0x000c,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0001, 0x341: 0x000c, 0x342: 0x000c, 0x343: 0x0001, 0x344: 0x000c, 0x345: 0x000c,\n\t0x346: 0x0001, 0x347: 0x000c, 0x348: 0x0001, 0x349: 0x0001, 0x34a: 0x0001, 0x34b: 0x0001,\n\t0x34c: 0x0001, 0x34d: 0x0001, 0x34e: 0x0001, 0x34f: 0x0001, 0x350: 0x0001, 0x351: 0x0001,\n\t0x352: 0x0001, 0x353: 0x0001, 0x354: 0x0001, 0x355: 0x0001, 0x356: 0x0001, 0x357: 0x0001,\n\t0x358: 0x0001, 0x359: 0x0001, 0x35a: 0x0001, 0x35b: 0x0001, 0x35c: 0x0001, 0x35d: 0x0001,\n\t0x35e: 0x0001, 0x35f: 0x0001, 0x360: 0x0001, 0x361: 0x0001, 0x362: 0x0001, 0x363: 0x0001,\n\t0x364: 0x0001, 0x365: 0x0001, 0x366: 0x0001, 0x367: 0x0001, 0x368: 0x0001, 0x369: 0x0001,\n\t0x36a: 0x0001, 0x36b: 0x0001, 0x36c: 0x0001, 0x36d: 0x0001, 0x36e: 0x0001, 0x36f: 0x0001,\n\t0x370: 0x0001, 0x371: 0x0001, 0x372: 0x0001, 0x373: 0x0001, 0x374: 0x0001, 0x375: 0x0001,\n\t0x376: 0x0001, 0x377: 0x0001, 0x378: 0x0001, 0x379: 0x0001, 0x37a: 0x0001, 0x37b: 0x0001,\n\t0x37c: 0x0001, 0x37d: 0x0001, 0x37e: 0x0001, 0x37f: 0x0001,\n\t// Block 0xe, offset 0x380\n\t0x380: 0x0005, 0x381: 0x0005, 0x382: 0x0005, 0x383: 0x0005, 0x384: 0x0005, 0x385: 0x0005,\n\t0x386: 0x000a, 0x387: 0x000a, 0x388: 0x000d, 0x389: 0x0004, 0x38a: 0x0004, 0x38b: 0x000d,\n\t0x38c: 0x0006, 0x38d: 0x000d, 0x38e: 0x000a, 0x38f: 0x000a, 0x390: 0x000c, 0x391: 0x000c,\n\t0x392: 0x000c, 0x393: 0x000c, 0x394: 0x000c, 0x395: 0x000c, 0x396: 0x000c, 0x397: 0x000c,\n\t0x398: 0x000c, 0x399: 0x000c, 0x39a: 0x000c, 0x39b: 0x000d, 0x39c: 0x000d, 0x39d: 0x000d,\n\t0x39e: 0x000d, 0x39f: 0x000d, 0x3a0: 0x000d, 0x3a1: 0x000d, 0x3a2: 0x000d, 0x3a3: 0x000d,\n\t0x3a4: 0x000d, 0x3a5: 0x000d, 0x3a6: 0x000d, 0x3a7: 0x000d, 0x3a8: 0x000d, 0x3a9: 0x000d,\n\t0x3aa: 0x000d, 0x3ab: 0x000d, 0x3ac: 0x000d, 0x3ad: 0x000d, 0x3ae: 0x000d, 0x3af: 0x000d,\n\t0x3b0: 0x000d, 0x3b1: 0x000d, 0x3b2: 0x000d, 0x3b3: 0x000d, 0x3b4: 0x000d, 0x3b5: 0x000d,\n\t0x3b6: 0x000d, 0x3b7: 0x000d, 0x3b8: 0x000d, 0x3b9: 0x000d, 0x3ba: 0x000d, 0x3bb: 0x000d,\n\t0x3bc: 0x000d, 0x3bd: 0x000d, 0x3be: 0x000d, 0x3bf: 0x000d,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x000d, 0x3c1: 0x000d, 0x3c2: 0x000d, 0x3c3: 0x000d, 0x3c4: 0x000d, 0x3c5: 0x000d,\n\t0x3c6: 0x000d, 0x3c7: 0x000d, 0x3c8: 0x000d, 0x3c9: 0x000d, 0x3ca: 0x000d, 0x3cb: 0x000c,\n\t0x3cc: 0x000c, 0x3cd: 0x000c, 0x3ce: 0x000c, 0x3cf: 0x000c, 0x3d0: 0x000c, 0x3d1: 0x000c,\n\t0x3d2: 0x000c, 0x3d3: 0x000c, 0x3d4: 0x000c, 0x3d5: 0x000c, 0x3d6: 0x000c, 0x3d7: 0x000c,\n\t0x3d8: 0x000c, 0x3d9: 0x000c, 0x3da: 0x000c, 0x3db: 0x000c, 0x3dc: 0x000c, 0x3dd: 0x000c,\n\t0x3de: 0x000c, 0x3df: 0x000c, 0x3e0: 0x0005, 0x3e1: 0x0005, 0x3e2: 0x0005, 0x3e3: 0x0005,\n\t0x3e4: 0x0005, 0x3e5: 0x0005, 0x3e6: 0x0005, 0x3e7: 0x0005, 0x3e8: 0x0005, 0x3e9: 0x0005,\n\t0x3ea: 0x0004, 0x3eb: 0x0005, 0x3ec: 0x0005, 0x3ed: 0x000d, 0x3ee: 0x000d, 0x3ef: 0x000d,\n\t0x3f0: 0x000c, 0x3f1: 0x000d, 0x3f2: 0x000d, 0x3f3: 0x000d, 0x3f4: 0x000d, 0x3f5: 0x000d,\n\t0x3f6: 0x000d, 0x3f7: 0x000d, 0x3f8: 0x000d, 0x3f9: 0x000d, 0x3fa: 0x000d, 0x3fb: 0x000d,\n\t0x3fc: 0x000d, 0x3fd: 0x000d, 0x3fe: 0x000d, 0x3ff: 0x000d,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x000d, 0x401: 0x000d, 0x402: 0x000d, 0x403: 0x000d, 0x404: 0x000d, 0x405: 0x000d,\n\t0x406: 0x000d, 0x407: 0x000d, 0x408: 0x000d, 0x409: 0x000d, 0x40a: 0x000d, 0x40b: 0x000d,\n\t0x40c: 0x000d, 0x40d: 0x000d, 0x40e: 0x000d, 0x40f: 0x000d, 0x410: 0x000d, 0x411: 0x000d,\n\t0x412: 0x000d, 0x413: 0x000d, 0x414: 0x000d, 0x415: 0x000d, 0x416: 0x000d, 0x417: 0x000d,\n\t0x418: 0x000d, 0x419: 0x000d, 0x41a: 0x000d, 0x41b: 0x000d, 0x41c: 0x000d, 0x41d: 0x000d,\n\t0x41e: 0x000d, 0x41f: 0x000d, 0x420: 0x000d, 0x421: 0x000d, 0x422: 0x000d, 0x423: 0x000d,\n\t0x424: 0x000d, 0x425: 0x000d, 0x426: 0x000d, 0x427: 0x000d, 0x428: 0x000d, 0x429: 0x000d,\n\t0x42a: 0x000d, 0x42b: 0x000d, 0x42c: 0x000d, 0x42d: 0x000d, 0x42e: 0x000d, 0x42f: 0x000d,\n\t0x430: 0x000d, 0x431: 0x000d, 0x432: 0x000d, 0x433: 0x000d, 0x434: 0x000d, 0x435: 0x000d,\n\t0x436: 0x000d, 0x437: 0x000d, 0x438: 0x000d, 0x439: 0x000d, 0x43a: 0x000d, 0x43b: 0x000d,\n\t0x43c: 0x000d, 0x43d: 0x000d, 0x43e: 0x000d, 0x43f: 0x000d,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x000d, 0x441: 0x000d, 0x442: 0x000d, 0x443: 0x000d, 0x444: 0x000d, 0x445: 0x000d,\n\t0x446: 0x000d, 0x447: 0x000d, 0x448: 0x000d, 0x449: 0x000d, 0x44a: 0x000d, 0x44b: 0x000d,\n\t0x44c: 0x000d, 0x44d: 0x000d, 0x44e: 0x000d, 0x44f: 0x000d, 0x450: 0x000d, 0x451: 0x000d,\n\t0x452: 0x000d, 0x453: 0x000d, 0x454: 0x000d, 0x455: 0x000d, 0x456: 0x000c, 0x457: 0x000c,\n\t0x458: 0x000c, 0x459: 0x000c, 0x45a: 0x000c, 0x45b: 0x000c, 0x45c: 0x000c, 0x45d: 0x0005,\n\t0x45e: 0x000a, 0x45f: 0x000c, 0x460: 0x000c, 0x461: 0x000c, 0x462: 0x000c, 0x463: 0x000c,\n\t0x464: 0x000c, 0x465: 0x000d, 0x466: 0x000d, 0x467: 0x000c, 0x468: 0x000c, 0x469: 0x000a,\n\t0x46a: 0x000c, 0x46b: 0x000c, 0x46c: 0x000c, 0x46d: 0x000c, 0x46e: 0x000d, 0x46f: 0x000d,\n\t0x470: 0x0002, 0x471: 0x0002, 0x472: 0x0002, 0x473: 0x0002, 0x474: 0x0002, 0x475: 0x0002,\n\t0x476: 0x0002, 0x477: 0x0002, 0x478: 0x0002, 0x479: 0x0002, 0x47a: 0x000d, 0x47b: 0x000d,\n\t0x47c: 0x000d, 0x47d: 0x000d, 0x47e: 0x000d, 0x47f: 0x000d,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x000d, 0x481: 0x000d, 0x482: 0x000d, 0x483: 0x000d, 0x484: 0x000d, 0x485: 0x000d,\n\t0x486: 0x000d, 0x487: 0x000d, 0x488: 0x000d, 0x489: 0x000d, 0x48a: 0x000d, 0x48b: 0x000d,\n\t0x48c: 0x000d, 0x48d: 0x000d, 0x48e: 0x000d, 0x48f: 0x000d, 0x490: 0x000d, 0x491: 0x000c,\n\t0x492: 0x000d, 0x493: 0x000d, 0x494: 0x000d, 0x495: 0x000d, 0x496: 0x000d, 0x497: 0x000d,\n\t0x498: 0x000d, 0x499: 0x000d, 0x49a: 0x000d, 0x49b: 0x000d, 0x49c: 0x000d, 0x49d: 0x000d,\n\t0x49e: 0x000d, 0x49f: 0x000d, 0x4a0: 0x000d, 0x4a1: 0x000d, 0x4a2: 0x000d, 0x4a3: 0x000d,\n\t0x4a4: 0x000d, 0x4a5: 0x000d, 0x4a6: 0x000d, 0x4a7: 0x000d, 0x4a8: 0x000d, 0x4a9: 0x000d,\n\t0x4aa: 0x000d, 0x4ab: 0x000d, 0x4ac: 0x000d, 0x4ad: 0x000d, 0x4ae: 0x000d, 0x4af: 0x000d,\n\t0x4b0: 0x000c, 0x4b1: 0x000c, 0x4b2: 0x000c, 0x4b3: 0x000c, 0x4b4: 0x000c, 0x4b5: 0x000c,\n\t0x4b6: 0x000c, 0x4b7: 0x000c, 0x4b8: 0x000c, 0x4b9: 0x000c, 0x4ba: 0x000c, 0x4bb: 0x000c,\n\t0x4bc: 0x000c, 0x4bd: 0x000c, 0x4be: 0x000c, 0x4bf: 0x000c,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x000c, 0x4c1: 0x000c, 0x4c2: 0x000c, 0x4c3: 0x000c, 0x4c4: 0x000c, 0x4c5: 0x000c,\n\t0x4c6: 0x000c, 0x4c7: 0x000c, 0x4c8: 0x000c, 0x4c9: 0x000c, 0x4ca: 0x000c, 0x4cb: 0x000d,\n\t0x4cc: 0x000d, 0x4cd: 0x000d, 0x4ce: 0x000d, 0x4cf: 0x000d, 0x4d0: 0x000d, 0x4d1: 0x000d,\n\t0x4d2: 0x000d, 0x4d3: 0x000d, 0x4d4: 0x000d, 0x4d5: 0x000d, 0x4d6: 0x000d, 0x4d7: 0x000d,\n\t0x4d8: 0x000d, 0x4d9: 0x000d, 0x4da: 0x000d, 0x4db: 0x000d, 0x4dc: 0x000d, 0x4dd: 0x000d,\n\t0x4de: 0x000d, 0x4df: 0x000d, 0x4e0: 0x000d, 0x4e1: 0x000d, 0x4e2: 0x000d, 0x4e3: 0x000d,\n\t0x4e4: 0x000d, 0x4e5: 0x000d, 0x4e6: 0x000d, 0x4e7: 0x000d, 0x4e8: 0x000d, 0x4e9: 0x000d,\n\t0x4ea: 0x000d, 0x4eb: 0x000d, 0x4ec: 0x000d, 0x4ed: 0x000d, 0x4ee: 0x000d, 0x4ef: 0x000d,\n\t0x4f0: 0x000d, 0x4f1: 0x000d, 0x4f2: 0x000d, 0x4f3: 0x000d, 0x4f4: 0x000d, 0x4f5: 0x000d,\n\t0x4f6: 0x000d, 0x4f7: 0x000d, 0x4f8: 0x000d, 0x4f9: 0x000d, 0x4fa: 0x000d, 0x4fb: 0x000d,\n\t0x4fc: 0x000d, 0x4fd: 0x000d, 0x4fe: 0x000d, 0x4ff: 0x000d,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x000d, 0x501: 0x000d, 0x502: 0x000d, 0x503: 0x000d, 0x504: 0x000d, 0x505: 0x000d,\n\t0x506: 0x000d, 0x507: 0x000d, 0x508: 0x000d, 0x509: 0x000d, 0x50a: 0x000d, 0x50b: 0x000d,\n\t0x50c: 0x000d, 0x50d: 0x000d, 0x50e: 0x000d, 0x50f: 0x000d, 0x510: 0x000d, 0x511: 0x000d,\n\t0x512: 0x000d, 0x513: 0x000d, 0x514: 0x000d, 0x515: 0x000d, 0x516: 0x000d, 0x517: 0x000d,\n\t0x518: 0x000d, 0x519: 0x000d, 0x51a: 0x000d, 0x51b: 0x000d, 0x51c: 0x000d, 0x51d: 0x000d,\n\t0x51e: 0x000d, 0x51f: 0x000d, 0x520: 0x000d, 0x521: 0x000d, 0x522: 0x000d, 0x523: 0x000d,\n\t0x524: 0x000d, 0x525: 0x000d, 0x526: 0x000c, 0x527: 0x000c, 0x528: 0x000c, 0x529: 0x000c,\n\t0x52a: 0x000c, 0x52b: 0x000c, 0x52c: 0x000c, 0x52d: 0x000c, 0x52e: 0x000c, 0x52f: 0x000c,\n\t0x530: 0x000c, 0x531: 0x000d, 0x532: 0x000d, 0x533: 0x000d, 0x534: 0x000d, 0x535: 0x000d,\n\t0x536: 0x000d, 0x537: 0x000d, 0x538: 0x000d, 0x539: 0x000d, 0x53a: 0x000d, 0x53b: 0x000d,\n\t0x53c: 0x000d, 0x53d: 0x000d, 0x53e: 0x000d, 0x53f: 0x000d,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0001, 0x541: 0x0001, 0x542: 0x0001, 0x543: 0x0001, 0x544: 0x0001, 0x545: 0x0001,\n\t0x546: 0x0001, 0x547: 0x0001, 0x548: 0x0001, 0x549: 0x0001, 0x54a: 0x0001, 0x54b: 0x0001,\n\t0x54c: 0x0001, 0x54d: 0x0001, 0x54e: 0x0001, 0x54f: 0x0001, 0x550: 0x0001, 0x551: 0x0001,\n\t0x552: 0x0001, 0x553: 0x0001, 0x554: 0x0001, 0x555: 0x0001, 0x556: 0x0001, 0x557: 0x0001,\n\t0x558: 0x0001, 0x559: 0x0001, 0x55a: 0x0001, 0x55b: 0x0001, 0x55c: 0x0001, 0x55d: 0x0001,\n\t0x55e: 0x0001, 0x55f: 0x0001, 0x560: 0x0001, 0x561: 0x0001, 0x562: 0x0001, 0x563: 0x0001,\n\t0x564: 0x0001, 0x565: 0x0001, 0x566: 0x0001, 0x567: 0x0001, 0x568: 0x0001, 0x569: 0x0001,\n\t0x56a: 0x0001, 0x56b: 0x000c, 0x56c: 0x000c, 0x56d: 0x000c, 0x56e: 0x000c, 0x56f: 0x000c,\n\t0x570: 0x000c, 0x571: 0x000c, 0x572: 0x000c, 0x573: 0x000c, 0x574: 0x0001, 0x575: 0x0001,\n\t0x576: 0x000a, 0x577: 0x000a, 0x578: 0x000a, 0x579: 0x000a, 0x57a: 0x0001, 0x57b: 0x0001,\n\t0x57c: 0x0001, 0x57d: 0x000c, 0x57e: 0x0001, 0x57f: 0x0001,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x0001, 0x581: 0x0001, 0x582: 0x0001, 0x583: 0x0001, 0x584: 0x0001, 0x585: 0x0001,\n\t0x586: 0x0001, 0x587: 0x0001, 0x588: 0x0001, 0x589: 0x0001, 0x58a: 0x0001, 0x58b: 0x0001,\n\t0x58c: 0x0001, 0x58d: 0x0001, 0x58e: 0x0001, 0x58f: 0x0001, 0x590: 0x0001, 0x591: 0x0001,\n\t0x592: 0x0001, 0x593: 0x0001, 0x594: 0x0001, 0x595: 0x0001, 0x596: 0x000c, 0x597: 0x000c,\n\t0x598: 0x000c, 0x599: 0x000c, 0x59a: 0x0001, 0x59b: 0x000c, 0x59c: 0x000c, 0x59d: 0x000c,\n\t0x59e: 0x000c, 0x59f: 0x000c, 0x5a0: 0x000c, 0x5a1: 0x000c, 0x5a2: 0x000c, 0x5a3: 0x000c,\n\t0x5a4: 0x0001, 0x5a5: 0x000c, 0x5a6: 0x000c, 0x5a7: 0x000c, 0x5a8: 0x0001, 0x5a9: 0x000c,\n\t0x5aa: 0x000c, 0x5ab: 0x000c, 0x5ac: 0x000c, 0x5ad: 0x000c, 0x5ae: 0x0001, 0x5af: 0x0001,\n\t0x5b0: 0x0001, 0x5b1: 0x0001, 0x5b2: 0x0001, 0x5b3: 0x0001, 0x5b4: 0x0001, 0x5b5: 0x0001,\n\t0x5b6: 0x0001, 0x5b7: 0x0001, 0x5b8: 0x0001, 0x5b9: 0x0001, 0x5ba: 0x0001, 0x5bb: 0x0001,\n\t0x5bc: 0x0001, 0x5bd: 0x0001, 0x5be: 0x0001, 0x5bf: 0x0001,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0001, 0x5c1: 0x0001, 0x5c2: 0x0001, 0x5c3: 0x0001, 0x5c4: 0x0001, 0x5c5: 0x0001,\n\t0x5c6: 0x0001, 0x5c7: 0x0001, 0x5c8: 0x0001, 0x5c9: 0x0001, 0x5ca: 0x0001, 0x5cb: 0x0001,\n\t0x5cc: 0x0001, 0x5cd: 0x0001, 0x5ce: 0x0001, 0x5cf: 0x0001, 0x5d0: 0x0001, 0x5d1: 0x0001,\n\t0x5d2: 0x0001, 0x5d3: 0x0001, 0x5d4: 0x0001, 0x5d5: 0x0001, 0x5d6: 0x0001, 0x5d7: 0x0001,\n\t0x5d8: 0x0001, 0x5d9: 0x000c, 0x5da: 0x000c, 0x5db: 0x000c, 0x5dc: 0x0001, 0x5dd: 0x0001,\n\t0x5de: 0x0001, 0x5df: 0x0001, 0x5e0: 0x000d, 0x5e1: 0x000d, 0x5e2: 0x000d, 0x5e3: 0x000d,\n\t0x5e4: 0x000d, 0x5e5: 0x000d, 0x5e6: 0x000d, 0x5e7: 0x000d, 0x5e8: 0x000d, 0x5e9: 0x000d,\n\t0x5ea: 0x000d, 0x5eb: 0x0001, 0x5ec: 0x0001, 0x5ed: 0x0001, 0x5ee: 0x0001, 0x5ef: 0x0001,\n\t0x5f0: 0x000d, 0x5f1: 0x000d, 0x5f2: 0x000d, 0x5f3: 0x000d, 0x5f4: 0x000d, 0x5f5: 0x000d,\n\t0x5f6: 0x000d, 0x5f7: 0x000d, 0x5f8: 0x000d, 0x5f9: 0x000d, 0x5fa: 0x000d, 0x5fb: 0x000d,\n\t0x5fc: 0x000d, 0x5fd: 0x000d, 0x5fe: 0x000d, 0x5ff: 0x000d,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x000d, 0x601: 0x000d, 0x602: 0x000d, 0x603: 0x000d, 0x604: 0x000d, 0x605: 0x000d,\n\t0x606: 0x000d, 0x607: 0x000d, 0x608: 0x000d, 0x609: 0x000d, 0x60a: 0x000d, 0x60b: 0x000d,\n\t0x60c: 0x000d, 0x60d: 0x000d, 0x60e: 0x000d, 0x60f: 0x0001, 0x610: 0x0005, 0x611: 0x0005,\n\t0x612: 0x0001, 0x613: 0x0001, 0x614: 0x0001, 0x615: 0x0001, 0x616: 0x0001, 0x617: 0x0001,\n\t0x618: 0x000c, 0x619: 0x000c, 0x61a: 0x000c, 0x61b: 0x000c, 0x61c: 0x000c, 0x61d: 0x000c,\n\t0x61e: 0x000c, 0x61f: 0x000c, 0x620: 0x000d, 0x621: 0x000d, 0x622: 0x000d, 0x623: 0x000d,\n\t0x624: 0x000d, 0x625: 0x000d, 0x626: 0x000d, 0x627: 0x000d, 0x628: 0x000d, 0x629: 0x000d,\n\t0x62a: 0x000d, 0x62b: 0x000d, 0x62c: 0x000d, 0x62d: 0x000d, 0x62e: 0x000d, 0x62f: 0x000d,\n\t0x630: 0x000d, 0x631: 0x000d, 0x632: 0x000d, 0x633: 0x000d, 0x634: 0x000d, 0x635: 0x000d,\n\t0x636: 0x000d, 0x637: 0x000d, 0x638: 0x000d, 0x639: 0x000d, 0x63a: 0x000d, 0x63b: 0x000d,\n\t0x63c: 0x000d, 0x63d: 0x000d, 0x63e: 0x000d, 0x63f: 0x000d,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x000d, 0x641: 0x000d, 0x642: 0x000d, 0x643: 0x000d, 0x644: 0x000d, 0x645: 0x000d,\n\t0x646: 0x000d, 0x647: 0x000d, 0x648: 0x000d, 0x649: 0x000d, 0x64a: 0x000c, 0x64b: 0x000c,\n\t0x64c: 0x000c, 0x64d: 0x000c, 0x64e: 0x000c, 0x64f: 0x000c, 0x650: 0x000c, 0x651: 0x000c,\n\t0x652: 0x000c, 0x653: 0x000c, 0x654: 0x000c, 0x655: 0x000c, 0x656: 0x000c, 0x657: 0x000c,\n\t0x658: 0x000c, 0x659: 0x000c, 0x65a: 0x000c, 0x65b: 0x000c, 0x65c: 0x000c, 0x65d: 0x000c,\n\t0x65e: 0x000c, 0x65f: 0x000c, 0x660: 0x000c, 0x661: 0x000c, 0x662: 0x0005, 0x663: 0x000c,\n\t0x664: 0x000c, 0x665: 0x000c, 0x666: 0x000c, 0x667: 0x000c, 0x668: 0x000c, 0x669: 0x000c,\n\t0x66a: 0x000c, 0x66b: 0x000c, 0x66c: 0x000c, 0x66d: 0x000c, 0x66e: 0x000c, 0x66f: 0x000c,\n\t0x670: 0x000c, 0x671: 0x000c, 0x672: 0x000c, 0x673: 0x000c, 0x674: 0x000c, 0x675: 0x000c,\n\t0x676: 0x000c, 0x677: 0x000c, 0x678: 0x000c, 0x679: 0x000c, 0x67a: 0x000c, 0x67b: 0x000c,\n\t0x67c: 0x000c, 0x67d: 0x000c, 0x67e: 0x000c, 0x67f: 0x000c,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x000c, 0x681: 0x000c, 0x682: 0x000c,\n\t0x6ba: 0x000c,\n\t0x6bc: 0x000c,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c1: 0x000c, 0x6c2: 0x000c, 0x6c3: 0x000c, 0x6c4: 0x000c, 0x6c5: 0x000c,\n\t0x6c6: 0x000c, 0x6c7: 0x000c, 0x6c8: 0x000c,\n\t0x6cd: 0x000c, 0x6d1: 0x000c,\n\t0x6d2: 0x000c, 0x6d3: 0x000c, 0x6d4: 0x000c, 0x6d5: 0x000c, 0x6d6: 0x000c, 0x6d7: 0x000c,\n\t0x6e2: 0x000c, 0x6e3: 0x000c,\n\t// Block 0x1c, offset 0x700\n\t0x701: 0x000c,\n\t0x73c: 0x000c,\n\t// Block 0x1d, offset 0x740\n\t0x741: 0x000c, 0x742: 0x000c, 0x743: 0x000c, 0x744: 0x000c,\n\t0x74d: 0x000c,\n\t0x762: 0x000c, 0x763: 0x000c,\n\t0x772: 0x0004, 0x773: 0x0004,\n\t0x77b: 0x0004,\n\t0x77e: 0x000c,\n\t// Block 0x1e, offset 0x780\n\t0x781: 0x000c, 0x782: 0x000c,\n\t0x7bc: 0x000c,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c1: 0x000c, 0x7c2: 0x000c,\n\t0x7c7: 0x000c, 0x7c8: 0x000c, 0x7cb: 0x000c,\n\t0x7cc: 0x000c, 0x7cd: 0x000c, 0x7d1: 0x000c,\n\t0x7f0: 0x000c, 0x7f1: 0x000c, 0x7f5: 0x000c,\n\t// Block 0x20, offset 0x800\n\t0x801: 0x000c, 0x802: 0x000c, 0x803: 0x000c, 0x804: 0x000c, 0x805: 0x000c,\n\t0x807: 0x000c, 0x808: 0x000c,\n\t0x80d: 0x000c,\n\t0x822: 0x000c, 0x823: 0x000c,\n\t0x831: 0x0004,\n\t0x83a: 0x000c, 0x83b: 0x000c,\n\t0x83c: 0x000c, 0x83d: 0x000c, 0x83e: 0x000c, 0x83f: 0x000c,\n\t// Block 0x21, offset 0x840\n\t0x841: 0x000c,\n\t0x87c: 0x000c, 0x87f: 0x000c,\n\t// Block 0x22, offset 0x880\n\t0x881: 0x000c, 0x882: 0x000c, 0x883: 0x000c, 0x884: 0x000c,\n\t0x88d: 0x000c,\n\t0x895: 0x000c, 0x896: 0x000c,\n\t0x8a2: 0x000c, 0x8a3: 0x000c,\n\t// Block 0x23, offset 0x8c0\n\t0x8c2: 0x000c,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x000c,\n\t0x90d: 0x000c,\n\t0x933: 0x000a, 0x934: 0x000a, 0x935: 0x000a,\n\t0x936: 0x000a, 0x937: 0x000a, 0x938: 0x000a, 0x939: 0x0004, 0x93a: 0x000a,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x000c, 0x944: 0x000c,\n\t0x97c: 0x000c, 0x97e: 0x000c, 0x97f: 0x000c,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x000c,\n\t0x986: 0x000c, 0x987: 0x000c, 0x988: 0x000c, 0x98a: 0x000c, 0x98b: 0x000c,\n\t0x98c: 0x000c, 0x98d: 0x000c,\n\t0x995: 0x000c, 0x996: 0x000c,\n\t0x9a2: 0x000c, 0x9a3: 0x000c,\n\t0x9b8: 0x000a, 0x9b9: 0x000a, 0x9ba: 0x000a, 0x9bb: 0x000a,\n\t0x9bc: 0x000a, 0x9bd: 0x000a, 0x9be: 0x000a,\n\t// Block 0x27, offset 0x9c0\n\t0x9cc: 0x000c, 0x9cd: 0x000c,\n\t0x9e2: 0x000c, 0x9e3: 0x000c,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x000c, 0xa01: 0x000c,\n\t0xa3b: 0x000c,\n\t0xa3c: 0x000c,\n\t// Block 0x29, offset 0xa40\n\t0xa41: 0x000c, 0xa42: 0x000c, 0xa43: 0x000c, 0xa44: 0x000c,\n\t0xa4d: 0x000c,\n\t0xa62: 0x000c, 0xa63: 0x000c,\n\t// Block 0x2a, offset 0xa80\n\t0xa81: 0x000c,\n\t// Block 0x2b, offset 0xac0\n\t0xaca: 0x000c,\n\t0xad2: 0x000c, 0xad3: 0x000c, 0xad4: 0x000c, 0xad6: 0x000c,\n\t// Block 0x2c, offset 0xb00\n\t0xb31: 0x000c, 0xb34: 0x000c, 0xb35: 0x000c,\n\t0xb36: 0x000c, 0xb37: 0x000c, 0xb38: 0x000c, 0xb39: 0x000c, 0xb3a: 0x000c,\n\t0xb3f: 0x0004,\n\t// Block 0x2d, offset 0xb40\n\t0xb47: 0x000c, 0xb48: 0x000c, 0xb49: 0x000c, 0xb4a: 0x000c, 0xb4b: 0x000c,\n\t0xb4c: 0x000c, 0xb4d: 0x000c, 0xb4e: 0x000c,\n\t// Block 0x2e, offset 0xb80\n\t0xbb1: 0x000c, 0xbb4: 0x000c, 0xbb5: 0x000c,\n\t0xbb6: 0x000c, 0xbb7: 0x000c, 0xbb8: 0x000c, 0xbb9: 0x000c, 0xbba: 0x000c, 0xbbb: 0x000c,\n\t0xbbc: 0x000c,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc8: 0x000c, 0xbc9: 0x000c, 0xbca: 0x000c, 0xbcb: 0x000c,\n\t0xbcc: 0x000c, 0xbcd: 0x000c, 0xbce: 0x000c,\n\t// Block 0x30, offset 0xc00\n\t0xc18: 0x000c, 0xc19: 0x000c,\n\t0xc35: 0x000c,\n\t0xc37: 0x000c, 0xc39: 0x000c, 0xc3a: 0x003a, 0xc3b: 0x002a,\n\t0xc3c: 0x003a, 0xc3d: 0x002a,\n\t// Block 0x31, offset 0xc40\n\t0xc71: 0x000c, 0xc72: 0x000c, 0xc73: 0x000c, 0xc74: 0x000c, 0xc75: 0x000c,\n\t0xc76: 0x000c, 0xc77: 0x000c, 0xc78: 0x000c, 0xc79: 0x000c, 0xc7a: 0x000c, 0xc7b: 0x000c,\n\t0xc7c: 0x000c, 0xc7d: 0x000c, 0xc7e: 0x000c,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x000c, 0xc81: 0x000c, 0xc82: 0x000c, 0xc83: 0x000c, 0xc84: 0x000c,\n\t0xc86: 0x000c, 0xc87: 0x000c,\n\t0xc8d: 0x000c, 0xc8e: 0x000c, 0xc8f: 0x000c, 0xc90: 0x000c, 0xc91: 0x000c,\n\t0xc92: 0x000c, 0xc93: 0x000c, 0xc94: 0x000c, 0xc95: 0x000c, 0xc96: 0x000c, 0xc97: 0x000c,\n\t0xc99: 0x000c, 0xc9a: 0x000c, 0xc9b: 0x000c, 0xc9c: 0x000c, 0xc9d: 0x000c,\n\t0xc9e: 0x000c, 0xc9f: 0x000c, 0xca0: 0x000c, 0xca1: 0x000c, 0xca2: 0x000c, 0xca3: 0x000c,\n\t0xca4: 0x000c, 0xca5: 0x000c, 0xca6: 0x000c, 0xca7: 0x000c, 0xca8: 0x000c, 0xca9: 0x000c,\n\t0xcaa: 0x000c, 0xcab: 0x000c, 0xcac: 0x000c, 0xcad: 0x000c, 0xcae: 0x000c, 0xcaf: 0x000c,\n\t0xcb0: 0x000c, 0xcb1: 0x000c, 0xcb2: 0x000c, 0xcb3: 0x000c, 0xcb4: 0x000c, 0xcb5: 0x000c,\n\t0xcb6: 0x000c, 0xcb7: 0x000c, 0xcb8: 0x000c, 0xcb9: 0x000c, 0xcba: 0x000c, 0xcbb: 0x000c,\n\t0xcbc: 0x000c,\n\t// Block 0x33, offset 0xcc0\n\t0xcc6: 0x000c,\n\t// Block 0x34, offset 0xd00\n\t0xd2d: 0x000c, 0xd2e: 0x000c, 0xd2f: 0x000c,\n\t0xd30: 0x000c, 0xd32: 0x000c, 0xd33: 0x000c, 0xd34: 0x000c, 0xd35: 0x000c,\n\t0xd36: 0x000c, 0xd37: 0x000c, 0xd39: 0x000c, 0xd3a: 0x000c,\n\t0xd3d: 0x000c, 0xd3e: 0x000c,\n\t// Block 0x35, offset 0xd40\n\t0xd58: 0x000c, 0xd59: 0x000c,\n\t0xd5e: 0x000c, 0xd5f: 0x000c, 0xd60: 0x000c,\n\t0xd71: 0x000c, 0xd72: 0x000c, 0xd73: 0x000c, 0xd74: 0x000c,\n\t// Block 0x36, offset 0xd80\n\t0xd82: 0x000c, 0xd85: 0x000c,\n\t0xd86: 0x000c,\n\t0xd8d: 0x000c,\n\t0xd9d: 0x000c,\n\t// Block 0x37, offset 0xdc0\n\t0xddd: 0x000c,\n\t0xdde: 0x000c, 0xddf: 0x000c,\n\t// Block 0x38, offset 0xe00\n\t0xe10: 0x000a, 0xe11: 0x000a,\n\t0xe12: 0x000a, 0xe13: 0x000a, 0xe14: 0x000a, 0xe15: 0x000a, 0xe16: 0x000a, 0xe17: 0x000a,\n\t0xe18: 0x000a, 0xe19: 0x000a,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x000a,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x0009,\n\t0xe9b: 0x007a, 0xe9c: 0x006a,\n\t// Block 0x3b, offset 0xec0\n\t0xed2: 0x000c, 0xed3: 0x000c, 0xed4: 0x000c,\n\t0xef2: 0x000c, 0xef3: 0x000c,\n\t// Block 0x3c, offset 0xf00\n\t0xf12: 0x000c, 0xf13: 0x000c,\n\t0xf32: 0x000c, 0xf33: 0x000c,\n\t// Block 0x3d, offset 0xf40\n\t0xf74: 0x000c, 0xf75: 0x000c,\n\t0xf77: 0x000c, 0xf78: 0x000c, 0xf79: 0x000c, 0xf7a: 0x000c, 0xf7b: 0x000c,\n\t0xf7c: 0x000c, 0xf7d: 0x000c,\n\t// Block 0x3e, offset 0xf80\n\t0xf86: 0x000c, 0xf89: 0x000c, 0xf8a: 0x000c, 0xf8b: 0x000c,\n\t0xf8c: 0x000c, 0xf8d: 0x000c, 0xf8e: 0x000c, 0xf8f: 0x000c, 0xf90: 0x000c, 0xf91: 0x000c,\n\t0xf92: 0x000c, 0xf93: 0x000c,\n\t0xf9b: 0x0004, 0xf9d: 0x000c,\n\t0xfb0: 0x000a, 0xfb1: 0x000a, 0xfb2: 0x000a, 0xfb3: 0x000a, 0xfb4: 0x000a, 0xfb5: 0x000a,\n\t0xfb6: 0x000a, 0xfb7: 0x000a, 0xfb8: 0x000a, 0xfb9: 0x000a,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x000a, 0xfc1: 0x000a, 0xfc2: 0x000a, 0xfc3: 0x000a, 0xfc4: 0x000a, 0xfc5: 0x000a,\n\t0xfc6: 0x000a, 0xfc7: 0x000a, 0xfc8: 0x000a, 0xfc9: 0x000a, 0xfca: 0x000a, 0xfcb: 0x000c,\n\t0xfcc: 0x000c, 0xfcd: 0x000c, 0xfce: 0x000b, 0xfcf: 0x000c,\n\t// Block 0x40, offset 0x1000\n\t0x1005: 0x000c,\n\t0x1006: 0x000c,\n\t0x1029: 0x000c,\n\t// Block 0x41, offset 0x1040\n\t0x1060: 0x000c, 0x1061: 0x000c, 0x1062: 0x000c,\n\t0x1067: 0x000c, 0x1068: 0x000c,\n\t0x1072: 0x000c,\n\t0x1079: 0x000c, 0x107a: 0x000c, 0x107b: 0x000c,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x000a, 0x1084: 0x000a, 0x1085: 0x000a,\n\t// Block 0x43, offset 0x10c0\n\t0x10de: 0x000a, 0x10df: 0x000a, 0x10e0: 0x000a, 0x10e1: 0x000a, 0x10e2: 0x000a, 0x10e3: 0x000a,\n\t0x10e4: 0x000a, 0x10e5: 0x000a, 0x10e6: 0x000a, 0x10e7: 0x000a, 0x10e8: 0x000a, 0x10e9: 0x000a,\n\t0x10ea: 0x000a, 0x10eb: 0x000a, 0x10ec: 0x000a, 0x10ed: 0x000a, 0x10ee: 0x000a, 0x10ef: 0x000a,\n\t0x10f0: 0x000a, 0x10f1: 0x000a, 0x10f2: 0x000a, 0x10f3: 0x000a, 0x10f4: 0x000a, 0x10f5: 0x000a,\n\t0x10f6: 0x000a, 0x10f7: 0x000a, 0x10f8: 0x000a, 0x10f9: 0x000a, 0x10fa: 0x000a, 0x10fb: 0x000a,\n\t0x10fc: 0x000a, 0x10fd: 0x000a, 0x10fe: 0x000a, 0x10ff: 0x000a,\n\t// Block 0x44, offset 0x1100\n\t0x1117: 0x000c,\n\t0x1118: 0x000c, 0x111b: 0x000c,\n\t// Block 0x45, offset 0x1140\n\t0x1156: 0x000c,\n\t0x1158: 0x000c, 0x1159: 0x000c, 0x115a: 0x000c, 0x115b: 0x000c, 0x115c: 0x000c, 0x115d: 0x000c,\n\t0x115e: 0x000c, 0x1160: 0x000c, 0x1162: 0x000c,\n\t0x1165: 0x000c, 0x1166: 0x000c, 0x1167: 0x000c, 0x1168: 0x000c, 0x1169: 0x000c,\n\t0x116a: 0x000c, 0x116b: 0x000c, 0x116c: 0x000c,\n\t0x1173: 0x000c, 0x1174: 0x000c, 0x1175: 0x000c,\n\t0x1176: 0x000c, 0x1177: 0x000c, 0x1178: 0x000c, 0x1179: 0x000c, 0x117a: 0x000c, 0x117b: 0x000c,\n\t0x117c: 0x000c, 0x117f: 0x000c,\n\t// Block 0x46, offset 0x1180\n\t0x11b0: 0x000c, 0x11b1: 0x000c, 0x11b2: 0x000c, 0x11b3: 0x000c, 0x11b4: 0x000c, 0x11b5: 0x000c,\n\t0x11b6: 0x000c, 0x11b7: 0x000c, 0x11b8: 0x000c, 0x11b9: 0x000c, 0x11ba: 0x000c, 0x11bb: 0x000c,\n\t0x11bc: 0x000c, 0x11bd: 0x000c, 0x11be: 0x000c, 0x11bf: 0x000c,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0x000c, 0x11c1: 0x000c, 0x11c2: 0x000c, 0x11c3: 0x000c, 0x11c4: 0x000c, 0x11c5: 0x000c,\n\t0x11c6: 0x000c, 0x11c7: 0x000c, 0x11c8: 0x000c, 0x11c9: 0x000c, 0x11ca: 0x000c, 0x11cb: 0x000c,\n\t0x11cc: 0x000c, 0x11cd: 0x000c, 0x11ce: 0x000c,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x000c, 0x1201: 0x000c, 0x1202: 0x000c, 0x1203: 0x000c,\n\t0x1234: 0x000c,\n\t0x1236: 0x000c, 0x1237: 0x000c, 0x1238: 0x000c, 0x1239: 0x000c, 0x123a: 0x000c,\n\t0x123c: 0x000c,\n\t// Block 0x49, offset 0x1240\n\t0x1242: 0x000c,\n\t0x126b: 0x000c, 0x126c: 0x000c, 0x126d: 0x000c, 0x126e: 0x000c, 0x126f: 0x000c,\n\t0x1270: 0x000c, 0x1271: 0x000c, 0x1272: 0x000c, 0x1273: 0x000c,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x000c, 0x1281: 0x000c,\n\t0x12a2: 0x000c, 0x12a3: 0x000c,\n\t0x12a4: 0x000c, 0x12a5: 0x000c, 0x12a8: 0x000c, 0x12a9: 0x000c,\n\t0x12ab: 0x000c, 0x12ac: 0x000c, 0x12ad: 0x000c,\n\t// Block 0x4b, offset 0x12c0\n\t0x12e6: 0x000c, 0x12e8: 0x000c, 0x12e9: 0x000c,\n\t0x12ed: 0x000c, 0x12ef: 0x000c,\n\t0x12f0: 0x000c, 0x12f1: 0x000c,\n\t// Block 0x4c, offset 0x1300\n\t0x132c: 0x000c, 0x132d: 0x000c, 0x132e: 0x000c, 0x132f: 0x000c,\n\t0x1330: 0x000c, 0x1331: 0x000c, 0x1332: 0x000c, 0x1333: 0x000c,\n\t0x1336: 0x000c, 0x1337: 0x000c,\n\t// Block 0x4d, offset 0x1340\n\t0x1350: 0x000c, 0x1351: 0x000c,\n\t0x1352: 0x000c, 0x1354: 0x000c, 0x1355: 0x000c, 0x1356: 0x000c, 0x1357: 0x000c,\n\t0x1358: 0x000c, 0x1359: 0x000c, 0x135a: 0x000c, 0x135b: 0x000c, 0x135c: 0x000c, 0x135d: 0x000c,\n\t0x135e: 0x000c, 0x135f: 0x000c, 0x1360: 0x000c, 0x1362: 0x000c, 0x1363: 0x000c,\n\t0x1364: 0x000c, 0x1365: 0x000c, 0x1366: 0x000c, 0x1367: 0x000c, 0x1368: 0x000c,\n\t0x136d: 0x000c,\n\t0x1374: 0x000c,\n\t0x1378: 0x000c, 0x1379: 0x000c,\n\t// Block 0x4e, offset 0x1380\n\t0x13bd: 0x000a, 0x13bf: 0x000a,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x000a, 0x13c1: 0x000a,\n\t0x13cd: 0x000a, 0x13ce: 0x000a, 0x13cf: 0x000a,\n\t0x13dd: 0x000a,\n\t0x13de: 0x000a, 0x13df: 0x000a,\n\t0x13ed: 0x000a, 0x13ee: 0x000a, 0x13ef: 0x000a,\n\t0x13fd: 0x000a, 0x13fe: 0x000a,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x0009, 0x1401: 0x0009, 0x1402: 0x0009, 0x1403: 0x0009, 0x1404: 0x0009, 0x1405: 0x0009,\n\t0x1406: 0x0009, 0x1407: 0x0009, 0x1408: 0x0009, 0x1409: 0x0009, 0x140a: 0x0009, 0x140b: 0x000b,\n\t0x140c: 0x000b, 0x140d: 0x000b, 0x140f: 0x0001, 0x1410: 0x000a, 0x1411: 0x000a,\n\t0x1412: 0x000a, 0x1413: 0x000a, 0x1414: 0x000a, 0x1415: 0x000a, 0x1416: 0x000a, 0x1417: 0x000a,\n\t0x1418: 0x000a, 0x1419: 0x000a, 0x141a: 0x000a, 0x141b: 0x000a, 0x141c: 0x000a, 0x141d: 0x000a,\n\t0x141e: 0x000a, 0x141f: 0x000a, 0x1420: 0x000a, 0x1421: 0x000a, 0x1422: 0x000a, 0x1423: 0x000a,\n\t0x1424: 0x000a, 0x1425: 0x000a, 0x1426: 0x000a, 0x1427: 0x000a, 0x1428: 0x0009, 0x1429: 0x0007,\n\t0x142a: 0x000e, 0x142b: 0x000e, 0x142c: 0x000e, 0x142d: 0x000e, 0x142e: 0x000e, 0x142f: 0x0006,\n\t0x1430: 0x0004, 0x1431: 0x0004, 0x1432: 0x0004, 0x1433: 0x0004, 0x1434: 0x0004, 0x1435: 0x000a,\n\t0x1436: 0x000a, 0x1437: 0x000a, 0x1438: 0x000a, 0x1439: 0x000a, 0x143a: 0x000a, 0x143b: 0x000a,\n\t0x143c: 0x000a, 0x143d: 0x000a, 0x143e: 0x000a, 0x143f: 0x000a,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x000a, 0x1441: 0x000a, 0x1442: 0x000a, 0x1443: 0x000a, 0x1444: 0x0006, 0x1445: 0x009a,\n\t0x1446: 0x008a, 0x1447: 0x000a, 0x1448: 0x000a, 0x1449: 0x000a, 0x144a: 0x000a, 0x144b: 0x000a,\n\t0x144c: 0x000a, 0x144d: 0x000a, 0x144e: 0x000a, 0x144f: 0x000a, 0x1450: 0x000a, 0x1451: 0x000a,\n\t0x1452: 0x000a, 0x1453: 0x000a, 0x1454: 0x000a, 0x1455: 0x000a, 0x1456: 0x000a, 0x1457: 0x000a,\n\t0x1458: 0x000a, 0x1459: 0x000a, 0x145a: 0x000a, 0x145b: 0x000a, 0x145c: 0x000a, 0x145d: 0x000a,\n\t0x145e: 0x000a, 0x145f: 0x0009, 0x1460: 0x000b, 0x1461: 0x000b, 0x1462: 0x000b, 0x1463: 0x000b,\n\t0x1464: 0x000b, 0x1465: 0x000b, 0x1466: 0x000e, 0x1467: 0x000e, 0x1468: 0x000e, 0x1469: 0x000e,\n\t0x146a: 0x000b, 0x146b: 0x000b, 0x146c: 0x000b, 0x146d: 0x000b, 0x146e: 0x000b, 0x146f: 0x000b,\n\t0x1470: 0x0002, 0x1474: 0x0002, 0x1475: 0x0002,\n\t0x1476: 0x0002, 0x1477: 0x0002, 0x1478: 0x0002, 0x1479: 0x0002, 0x147a: 0x0003, 0x147b: 0x0003,\n\t0x147c: 0x000a, 0x147d: 0x009a, 0x147e: 0x008a,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x0002, 0x1481: 0x0002, 0x1482: 0x0002, 0x1483: 0x0002, 0x1484: 0x0002, 0x1485: 0x0002,\n\t0x1486: 0x0002, 0x1487: 0x0002, 0x1488: 0x0002, 0x1489: 0x0002, 0x148a: 0x0003, 0x148b: 0x0003,\n\t0x148c: 0x000a, 0x148d: 0x009a, 0x148e: 0x008a,\n\t0x14a0: 0x0004, 0x14a1: 0x0004, 0x14a2: 0x0004, 0x14a3: 0x0004,\n\t0x14a4: 0x0004, 0x14a5: 0x0004, 0x14a6: 0x0004, 0x14a7: 0x0004, 0x14a8: 0x0004, 0x14a9: 0x0004,\n\t0x14aa: 0x0004, 0x14ab: 0x0004, 0x14ac: 0x0004, 0x14ad: 0x0004, 0x14ae: 0x0004, 0x14af: 0x0004,\n\t0x14b0: 0x0004, 0x14b1: 0x0004, 0x14b2: 0x0004, 0x14b3: 0x0004, 0x14b4: 0x0004, 0x14b5: 0x0004,\n\t0x14b6: 0x0004, 0x14b7: 0x0004, 0x14b8: 0x0004, 0x14b9: 0x0004, 0x14ba: 0x0004, 0x14bb: 0x0004,\n\t0x14bc: 0x0004, 0x14bd: 0x0004, 0x14be: 0x0004, 0x14bf: 0x0004,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0004, 0x14c1: 0x0004, 0x14c2: 0x0004, 0x14c3: 0x0004, 0x14c4: 0x0004, 0x14c5: 0x0004,\n\t0x14c6: 0x0004, 0x14c7: 0x0004, 0x14c8: 0x0004, 0x14c9: 0x0004, 0x14ca: 0x0004, 0x14cb: 0x0004,\n\t0x14cc: 0x0004, 0x14cd: 0x0004, 0x14ce: 0x0004, 0x14cf: 0x0004, 0x14d0: 0x000c, 0x14d1: 0x000c,\n\t0x14d2: 0x000c, 0x14d3: 0x000c, 0x14d4: 0x000c, 0x14d5: 0x000c, 0x14d6: 0x000c, 0x14d7: 0x000c,\n\t0x14d8: 0x000c, 0x14d9: 0x000c, 0x14da: 0x000c, 0x14db: 0x000c, 0x14dc: 0x000c, 0x14dd: 0x000c,\n\t0x14de: 0x000c, 0x14df: 0x000c, 0x14e0: 0x000c, 0x14e1: 0x000c, 0x14e2: 0x000c, 0x14e3: 0x000c,\n\t0x14e4: 0x000c, 0x14e5: 0x000c, 0x14e6: 0x000c, 0x14e7: 0x000c, 0x14e8: 0x000c, 0x14e9: 0x000c,\n\t0x14ea: 0x000c, 0x14eb: 0x000c, 0x14ec: 0x000c, 0x14ed: 0x000c, 0x14ee: 0x000c, 0x14ef: 0x000c,\n\t0x14f0: 0x000c,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x000a, 0x1501: 0x000a, 0x1503: 0x000a, 0x1504: 0x000a, 0x1505: 0x000a,\n\t0x1506: 0x000a, 0x1508: 0x000a, 0x1509: 0x000a,\n\t0x1514: 0x000a, 0x1516: 0x000a, 0x1517: 0x000a,\n\t0x1518: 0x000a,\n\t0x151e: 0x000a, 0x151f: 0x000a, 0x1520: 0x000a, 0x1521: 0x000a, 0x1522: 0x000a, 0x1523: 0x000a,\n\t0x1525: 0x000a, 0x1527: 0x000a, 0x1529: 0x000a,\n\t0x152e: 0x0004,\n\t0x153a: 0x000a, 0x153b: 0x000a,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x000a, 0x1541: 0x000a, 0x1542: 0x000a, 0x1543: 0x000a, 0x1544: 0x000a,\n\t0x154a: 0x000a, 0x154b: 0x000a,\n\t0x154c: 0x000a, 0x154d: 0x000a, 0x1550: 0x000a, 0x1551: 0x000a,\n\t0x1552: 0x000a, 0x1553: 0x000a, 0x1554: 0x000a, 0x1555: 0x000a, 0x1556: 0x000a, 0x1557: 0x000a,\n\t0x1558: 0x000a, 0x1559: 0x000a, 0x155a: 0x000a, 0x155b: 0x000a, 0x155c: 0x000a, 0x155d: 0x000a,\n\t0x155e: 0x000a, 0x155f: 0x000a,\n\t// Block 0x56, offset 0x1580\n\t0x1589: 0x000a, 0x158a: 0x000a, 0x158b: 0x000a,\n\t0x1590: 0x000a, 0x1591: 0x000a,\n\t0x1592: 0x000a, 0x1593: 0x000a, 0x1594: 0x000a, 0x1595: 0x000a, 0x1596: 0x000a, 0x1597: 0x000a,\n\t0x1598: 0x000a, 0x1599: 0x000a, 0x159a: 0x000a, 0x159b: 0x000a, 0x159c: 0x000a, 0x159d: 0x000a,\n\t0x159e: 0x000a, 0x159f: 0x000a, 0x15a0: 0x000a, 0x15a1: 0x000a, 0x15a2: 0x000a, 0x15a3: 0x000a,\n\t0x15a4: 0x000a, 0x15a5: 0x000a, 0x15a6: 0x000a, 0x15a7: 0x000a, 0x15a8: 0x000a, 0x15a9: 0x000a,\n\t0x15aa: 0x000a, 0x15ab: 0x000a, 0x15ac: 0x000a, 0x15ad: 0x000a, 0x15ae: 0x000a, 0x15af: 0x000a,\n\t0x15b0: 0x000a, 0x15b1: 0x000a, 0x15b2: 0x000a, 0x15b3: 0x000a, 0x15b4: 0x000a, 0x15b5: 0x000a,\n\t0x15b6: 0x000a, 0x15b7: 0x000a, 0x15b8: 0x000a, 0x15b9: 0x000a, 0x15ba: 0x000a, 0x15bb: 0x000a,\n\t0x15bc: 0x000a, 0x15bd: 0x000a, 0x15be: 0x000a, 0x15bf: 0x000a,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x000a, 0x15c1: 0x000a, 0x15c2: 0x000a, 0x15c3: 0x000a, 0x15c4: 0x000a, 0x15c5: 0x000a,\n\t0x15c6: 0x000a, 0x15c7: 0x000a, 0x15c8: 0x000a, 0x15c9: 0x000a, 0x15ca: 0x000a, 0x15cb: 0x000a,\n\t0x15cc: 0x000a, 0x15cd: 0x000a, 0x15ce: 0x000a, 0x15cf: 0x000a, 0x15d0: 0x000a, 0x15d1: 0x000a,\n\t0x15d2: 0x000a, 0x15d3: 0x000a, 0x15d4: 0x000a, 0x15d5: 0x000a, 0x15d6: 0x000a, 0x15d7: 0x000a,\n\t0x15d8: 0x000a, 0x15d9: 0x000a, 0x15da: 0x000a, 0x15db: 0x000a, 0x15dc: 0x000a, 0x15dd: 0x000a,\n\t0x15de: 0x000a, 0x15df: 0x000a, 0x15e0: 0x000a, 0x15e1: 0x000a, 0x15e2: 0x000a, 0x15e3: 0x000a,\n\t0x15e4: 0x000a, 0x15e5: 0x000a, 0x15e6: 0x000a, 0x15e7: 0x000a, 0x15e8: 0x000a, 0x15e9: 0x000a,\n\t0x15ea: 0x000a, 0x15eb: 0x000a, 0x15ec: 0x000a, 0x15ed: 0x000a, 0x15ee: 0x000a, 0x15ef: 0x000a,\n\t0x15f0: 0x000a, 0x15f1: 0x000a, 0x15f2: 0x000a, 0x15f3: 0x000a, 0x15f4: 0x000a, 0x15f5: 0x000a,\n\t0x15f6: 0x000a, 0x15f7: 0x000a, 0x15f8: 0x000a, 0x15f9: 0x000a, 0x15fa: 0x000a, 0x15fb: 0x000a,\n\t0x15fc: 0x000a, 0x15fd: 0x000a, 0x15fe: 0x000a, 0x15ff: 0x000a,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x000a, 0x1601: 0x000a, 0x1602: 0x000a, 0x1603: 0x000a, 0x1604: 0x000a, 0x1605: 0x000a,\n\t0x1606: 0x000a, 0x1607: 0x000a, 0x1608: 0x000a, 0x1609: 0x000a, 0x160a: 0x000a, 0x160b: 0x000a,\n\t0x160c: 0x000a, 0x160d: 0x000a, 0x160e: 0x000a, 0x160f: 0x000a, 0x1610: 0x000a, 0x1611: 0x000a,\n\t0x1612: 0x0003, 0x1613: 0x0004, 0x1614: 0x000a, 0x1615: 0x000a, 0x1616: 0x000a, 0x1617: 0x000a,\n\t0x1618: 0x000a, 0x1619: 0x000a, 0x161a: 0x000a, 0x161b: 0x000a, 0x161c: 0x000a, 0x161d: 0x000a,\n\t0x161e: 0x000a, 0x161f: 0x000a, 0x1620: 0x000a, 0x1621: 0x000a, 0x1622: 0x000a, 0x1623: 0x000a,\n\t0x1624: 0x000a, 0x1625: 0x000a, 0x1626: 0x000a, 0x1627: 0x000a, 0x1628: 0x000a, 0x1629: 0x000a,\n\t0x162a: 0x000a, 0x162b: 0x000a, 0x162c: 0x000a, 0x162d: 0x000a, 0x162e: 0x000a, 0x162f: 0x000a,\n\t0x1630: 0x000a, 0x1631: 0x000a, 0x1632: 0x000a, 0x1633: 0x000a, 0x1634: 0x000a, 0x1635: 0x000a,\n\t0x1636: 0x000a, 0x1637: 0x000a, 0x1638: 0x000a, 0x1639: 0x000a, 0x163a: 0x000a, 0x163b: 0x000a,\n\t0x163c: 0x000a, 0x163d: 0x000a, 0x163e: 0x000a, 0x163f: 0x000a,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x000a, 0x1641: 0x000a, 0x1642: 0x000a, 0x1643: 0x000a, 0x1644: 0x000a, 0x1645: 0x000a,\n\t0x1646: 0x000a, 0x1647: 0x000a, 0x1648: 0x003a, 0x1649: 0x002a, 0x164a: 0x003a, 0x164b: 0x002a,\n\t0x164c: 0x000a, 0x164d: 0x000a, 0x164e: 0x000a, 0x164f: 0x000a, 0x1650: 0x000a, 0x1651: 0x000a,\n\t0x1652: 0x000a, 0x1653: 0x000a, 0x1654: 0x000a, 0x1655: 0x000a, 0x1656: 0x000a, 0x1657: 0x000a,\n\t0x1658: 0x000a, 0x1659: 0x000a, 0x165a: 0x000a, 0x165b: 0x000a, 0x165c: 0x000a, 0x165d: 0x000a,\n\t0x165e: 0x000a, 0x165f: 0x000a, 0x1660: 0x000a, 0x1661: 0x000a, 0x1662: 0x000a, 0x1663: 0x000a,\n\t0x1664: 0x000a, 0x1665: 0x000a, 0x1666: 0x000a, 0x1667: 0x000a, 0x1668: 0x000a, 0x1669: 0x009a,\n\t0x166a: 0x008a, 0x166b: 0x000a, 0x166c: 0x000a, 0x166d: 0x000a, 0x166e: 0x000a, 0x166f: 0x000a,\n\t0x1670: 0x000a, 0x1671: 0x000a, 0x1672: 0x000a, 0x1673: 0x000a, 0x1674: 0x000a, 0x1675: 0x000a,\n\t// Block 0x5a, offset 0x1680\n\t0x16bb: 0x000a,\n\t0x16bc: 0x000a, 0x16bd: 0x000a, 0x16be: 0x000a, 0x16bf: 0x000a,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x000a, 0x16c1: 0x000a, 0x16c2: 0x000a, 0x16c3: 0x000a, 0x16c4: 0x000a, 0x16c5: 0x000a,\n\t0x16c6: 0x000a, 0x16c7: 0x000a, 0x16c8: 0x000a, 0x16c9: 0x000a, 0x16ca: 0x000a, 0x16cb: 0x000a,\n\t0x16cc: 0x000a, 0x16cd: 0x000a, 0x16ce: 0x000a, 0x16cf: 0x000a, 0x16d0: 0x000a, 0x16d1: 0x000a,\n\t0x16d2: 0x000a, 0x16d3: 0x000a, 0x16d4: 0x000a, 0x16d6: 0x000a, 0x16d7: 0x000a,\n\t0x16d8: 0x000a, 0x16d9: 0x000a, 0x16da: 0x000a, 0x16db: 0x000a, 0x16dc: 0x000a, 0x16dd: 0x000a,\n\t0x16de: 0x000a, 0x16df: 0x000a, 0x16e0: 0x000a, 0x16e1: 0x000a, 0x16e2: 0x000a, 0x16e3: 0x000a,\n\t0x16e4: 0x000a, 0x16e5: 0x000a, 0x16e6: 0x000a, 0x16e7: 0x000a, 0x16e8: 0x000a, 0x16e9: 0x000a,\n\t0x16ea: 0x000a, 0x16eb: 0x000a, 0x16ec: 0x000a, 0x16ed: 0x000a, 0x16ee: 0x000a, 0x16ef: 0x000a,\n\t0x16f0: 0x000a, 0x16f1: 0x000a, 0x16f2: 0x000a, 0x16f3: 0x000a, 0x16f4: 0x000a, 0x16f5: 0x000a,\n\t0x16f6: 0x000a, 0x16f7: 0x000a, 0x16f8: 0x000a, 0x16f9: 0x000a, 0x16fa: 0x000a, 0x16fb: 0x000a,\n\t0x16fc: 0x000a, 0x16fd: 0x000a, 0x16fe: 0x000a, 0x16ff: 0x000a,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x000a, 0x1701: 0x000a, 0x1702: 0x000a, 0x1703: 0x000a, 0x1704: 0x000a, 0x1705: 0x000a,\n\t0x1706: 0x000a, 0x1707: 0x000a, 0x1708: 0x000a, 0x1709: 0x000a, 0x170a: 0x000a, 0x170b: 0x000a,\n\t0x170c: 0x000a, 0x170d: 0x000a, 0x170e: 0x000a, 0x170f: 0x000a, 0x1710: 0x000a, 0x1711: 0x000a,\n\t0x1712: 0x000a, 0x1713: 0x000a, 0x1714: 0x000a, 0x1715: 0x000a, 0x1716: 0x000a, 0x1717: 0x000a,\n\t0x1718: 0x000a, 0x1719: 0x000a, 0x171a: 0x000a, 0x171b: 0x000a, 0x171c: 0x000a, 0x171d: 0x000a,\n\t0x171e: 0x000a, 0x171f: 0x000a, 0x1720: 0x000a, 0x1721: 0x000a, 0x1722: 0x000a, 0x1723: 0x000a,\n\t0x1724: 0x000a, 0x1725: 0x000a, 0x1726: 0x000a,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x000a, 0x1741: 0x000a, 0x1742: 0x000a, 0x1743: 0x000a, 0x1744: 0x000a, 0x1745: 0x000a,\n\t0x1746: 0x000a, 0x1747: 0x000a, 0x1748: 0x000a, 0x1749: 0x000a, 0x174a: 0x000a,\n\t0x1760: 0x000a, 0x1761: 0x000a, 0x1762: 0x000a, 0x1763: 0x000a,\n\t0x1764: 0x000a, 0x1765: 0x000a, 0x1766: 0x000a, 0x1767: 0x000a, 0x1768: 0x000a, 0x1769: 0x000a,\n\t0x176a: 0x000a, 0x176b: 0x000a, 0x176c: 0x000a, 0x176d: 0x000a, 0x176e: 0x000a, 0x176f: 0x000a,\n\t0x1770: 0x000a, 0x1771: 0x000a, 0x1772: 0x000a, 0x1773: 0x000a, 0x1774: 0x000a, 0x1775: 0x000a,\n\t0x1776: 0x000a, 0x1777: 0x000a, 0x1778: 0x000a, 0x1779: 0x000a, 0x177a: 0x000a, 0x177b: 0x000a,\n\t0x177c: 0x000a, 0x177d: 0x000a, 0x177e: 0x000a, 0x177f: 0x000a,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x000a, 0x1781: 0x000a, 0x1782: 0x000a, 0x1783: 0x000a, 0x1784: 0x000a, 0x1785: 0x000a,\n\t0x1786: 0x000a, 0x1787: 0x000a, 0x1788: 0x0002, 0x1789: 0x0002, 0x178a: 0x0002, 0x178b: 0x0002,\n\t0x178c: 0x0002, 0x178d: 0x0002, 0x178e: 0x0002, 0x178f: 0x0002, 0x1790: 0x0002, 0x1791: 0x0002,\n\t0x1792: 0x0002, 0x1793: 0x0002, 0x1794: 0x0002, 0x1795: 0x0002, 0x1796: 0x0002, 0x1797: 0x0002,\n\t0x1798: 0x0002, 0x1799: 0x0002, 0x179a: 0x0002, 0x179b: 0x0002,\n\t// Block 0x5f, offset 0x17c0\n\t0x17ea: 0x000a, 0x17eb: 0x000a, 0x17ec: 0x000a, 0x17ed: 0x000a, 0x17ee: 0x000a, 0x17ef: 0x000a,\n\t0x17f0: 0x000a, 0x17f1: 0x000a, 0x17f2: 0x000a, 0x17f3: 0x000a, 0x17f4: 0x000a, 0x17f5: 0x000a,\n\t0x17f6: 0x000a, 0x17f7: 0x000a, 0x17f8: 0x000a, 0x17f9: 0x000a, 0x17fa: 0x000a, 0x17fb: 0x000a,\n\t0x17fc: 0x000a, 0x17fd: 0x000a, 0x17fe: 0x000a, 0x17ff: 0x000a,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x000a, 0x1801: 0x000a, 0x1802: 0x000a, 0x1803: 0x000a, 0x1804: 0x000a, 0x1805: 0x000a,\n\t0x1806: 0x000a, 0x1807: 0x000a, 0x1808: 0x000a, 0x1809: 0x000a, 0x180a: 0x000a, 0x180b: 0x000a,\n\t0x180c: 0x000a, 0x180d: 0x000a, 0x180e: 0x000a, 0x180f: 0x000a, 0x1810: 0x000a, 0x1811: 0x000a,\n\t0x1812: 0x000a, 0x1813: 0x000a, 0x1814: 0x000a, 0x1815: 0x000a, 0x1816: 0x000a, 0x1817: 0x000a,\n\t0x1818: 0x000a, 0x1819: 0x000a, 0x181a: 0x000a, 0x181b: 0x000a, 0x181c: 0x000a, 0x181d: 0x000a,\n\t0x181e: 0x000a, 0x181f: 0x000a, 0x1820: 0x000a, 0x1821: 0x000a, 0x1822: 0x000a, 0x1823: 0x000a,\n\t0x1824: 0x000a, 0x1825: 0x000a, 0x1826: 0x000a, 0x1827: 0x000a, 0x1828: 0x000a, 0x1829: 0x000a,\n\t0x182a: 0x000a, 0x182b: 0x000a, 0x182d: 0x000a, 0x182e: 0x000a, 0x182f: 0x000a,\n\t0x1830: 0x000a, 0x1831: 0x000a, 0x1832: 0x000a, 0x1833: 0x000a, 0x1834: 0x000a, 0x1835: 0x000a,\n\t0x1836: 0x000a, 0x1837: 0x000a, 0x1838: 0x000a, 0x1839: 0x000a, 0x183a: 0x000a, 0x183b: 0x000a,\n\t0x183c: 0x000a, 0x183d: 0x000a, 0x183e: 0x000a, 0x183f: 0x000a,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x000a, 0x1841: 0x000a, 0x1842: 0x000a, 0x1843: 0x000a, 0x1844: 0x000a, 0x1845: 0x000a,\n\t0x1846: 0x000a, 0x1847: 0x000a, 0x1848: 0x000a, 0x1849: 0x000a, 0x184a: 0x000a, 0x184b: 0x000a,\n\t0x184c: 0x000a, 0x184d: 0x000a, 0x184e: 0x000a, 0x184f: 0x000a, 0x1850: 0x000a, 0x1851: 0x000a,\n\t0x1852: 0x000a, 0x1853: 0x000a, 0x1854: 0x000a, 0x1855: 0x000a, 0x1856: 0x000a, 0x1857: 0x000a,\n\t0x1858: 0x000a, 0x1859: 0x000a, 0x185a: 0x000a, 0x185b: 0x000a, 0x185c: 0x000a, 0x185d: 0x000a,\n\t0x185e: 0x000a, 0x185f: 0x000a, 0x1860: 0x000a, 0x1861: 0x000a, 0x1862: 0x000a, 0x1863: 0x000a,\n\t0x1864: 0x000a, 0x1865: 0x000a, 0x1866: 0x000a, 0x1867: 0x000a, 0x1868: 0x003a, 0x1869: 0x002a,\n\t0x186a: 0x003a, 0x186b: 0x002a, 0x186c: 0x003a, 0x186d: 0x002a, 0x186e: 0x003a, 0x186f: 0x002a,\n\t0x1870: 0x003a, 0x1871: 0x002a, 0x1872: 0x003a, 0x1873: 0x002a, 0x1874: 0x003a, 0x1875: 0x002a,\n\t0x1876: 0x000a, 0x1877: 0x000a, 0x1878: 0x000a, 0x1879: 0x000a, 0x187a: 0x000a, 0x187b: 0x000a,\n\t0x187c: 0x000a, 0x187d: 0x000a, 0x187e: 0x000a, 0x187f: 0x000a,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x000a, 0x1881: 0x000a, 0x1882: 0x000a, 0x1883: 0x000a, 0x1884: 0x000a, 0x1885: 0x009a,\n\t0x1886: 0x008a, 0x1887: 0x000a, 0x1888: 0x000a, 0x1889: 0x000a, 0x188a: 0x000a, 0x188b: 0x000a,\n\t0x188c: 0x000a, 0x188d: 0x000a, 0x188e: 0x000a, 0x188f: 0x000a, 0x1890: 0x000a, 0x1891: 0x000a,\n\t0x1892: 0x000a, 0x1893: 0x000a, 0x1894: 0x000a, 0x1895: 0x000a, 0x1896: 0x000a, 0x1897: 0x000a,\n\t0x1898: 0x000a, 0x1899: 0x000a, 0x189a: 0x000a, 0x189b: 0x000a, 0x189c: 0x000a, 0x189d: 0x000a,\n\t0x189e: 0x000a, 0x189f: 0x000a, 0x18a0: 0x000a, 0x18a1: 0x000a, 0x18a2: 0x000a, 0x18a3: 0x000a,\n\t0x18a4: 0x000a, 0x18a5: 0x000a, 0x18a6: 0x003a, 0x18a7: 0x002a, 0x18a8: 0x003a, 0x18a9: 0x002a,\n\t0x18aa: 0x003a, 0x18ab: 0x002a, 0x18ac: 0x003a, 0x18ad: 0x002a, 0x18ae: 0x003a, 0x18af: 0x002a,\n\t0x18b0: 0x000a, 0x18b1: 0x000a, 0x18b2: 0x000a, 0x18b3: 0x000a, 0x18b4: 0x000a, 0x18b5: 0x000a,\n\t0x18b6: 0x000a, 0x18b7: 0x000a, 0x18b8: 0x000a, 0x18b9: 0x000a, 0x18ba: 0x000a, 0x18bb: 0x000a,\n\t0x18bc: 0x000a, 0x18bd: 0x000a, 0x18be: 0x000a, 0x18bf: 0x000a,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x000a, 0x18c1: 0x000a, 0x18c2: 0x000a, 0x18c3: 0x007a, 0x18c4: 0x006a, 0x18c5: 0x009a,\n\t0x18c6: 0x008a, 0x18c7: 0x00ba, 0x18c8: 0x00aa, 0x18c9: 0x009a, 0x18ca: 0x008a, 0x18cb: 0x007a,\n\t0x18cc: 0x006a, 0x18cd: 0x00da, 0x18ce: 0x002a, 0x18cf: 0x003a, 0x18d0: 0x00ca, 0x18d1: 0x009a,\n\t0x18d2: 0x008a, 0x18d3: 0x007a, 0x18d4: 0x006a, 0x18d5: 0x009a, 0x18d6: 0x008a, 0x18d7: 0x00ba,\n\t0x18d8: 0x00aa, 0x18d9: 0x000a, 0x18da: 0x000a, 0x18db: 0x000a, 0x18dc: 0x000a, 0x18dd: 0x000a,\n\t0x18de: 0x000a, 0x18df: 0x000a, 0x18e0: 0x000a, 0x18e1: 0x000a, 0x18e2: 0x000a, 0x18e3: 0x000a,\n\t0x18e4: 0x000a, 0x18e5: 0x000a, 0x18e6: 0x000a, 0x18e7: 0x000a, 0x18e8: 0x000a, 0x18e9: 0x000a,\n\t0x18ea: 0x000a, 0x18eb: 0x000a, 0x18ec: 0x000a, 0x18ed: 0x000a, 0x18ee: 0x000a, 0x18ef: 0x000a,\n\t0x18f0: 0x000a, 0x18f1: 0x000a, 0x18f2: 0x000a, 0x18f3: 0x000a, 0x18f4: 0x000a, 0x18f5: 0x000a,\n\t0x18f6: 0x000a, 0x18f7: 0x000a, 0x18f8: 0x000a, 0x18f9: 0x000a, 0x18fa: 0x000a, 0x18fb: 0x000a,\n\t0x18fc: 0x000a, 0x18fd: 0x000a, 0x18fe: 0x000a, 0x18ff: 0x000a,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x000a, 0x1901: 0x000a, 0x1902: 0x000a, 0x1903: 0x000a, 0x1904: 0x000a, 0x1905: 0x000a,\n\t0x1906: 0x000a, 0x1907: 0x000a, 0x1908: 0x000a, 0x1909: 0x000a, 0x190a: 0x000a, 0x190b: 0x000a,\n\t0x190c: 0x000a, 0x190d: 0x000a, 0x190e: 0x000a, 0x190f: 0x000a, 0x1910: 0x000a, 0x1911: 0x000a,\n\t0x1912: 0x000a, 0x1913: 0x000a, 0x1914: 0x000a, 0x1915: 0x000a, 0x1916: 0x000a, 0x1917: 0x000a,\n\t0x1918: 0x003a, 0x1919: 0x002a, 0x191a: 0x003a, 0x191b: 0x002a, 0x191c: 0x000a, 0x191d: 0x000a,\n\t0x191e: 0x000a, 0x191f: 0x000a, 0x1920: 0x000a, 0x1921: 0x000a, 0x1922: 0x000a, 0x1923: 0x000a,\n\t0x1924: 0x000a, 0x1925: 0x000a, 0x1926: 0x000a, 0x1927: 0x000a, 0x1928: 0x000a, 0x1929: 0x000a,\n\t0x192a: 0x000a, 0x192b: 0x000a, 0x192c: 0x000a, 0x192d: 0x000a, 0x192e: 0x000a, 0x192f: 0x000a,\n\t0x1930: 0x000a, 0x1931: 0x000a, 0x1932: 0x000a, 0x1933: 0x000a, 0x1934: 0x000a, 0x1935: 0x000a,\n\t0x1936: 0x000a, 0x1937: 0x000a, 0x1938: 0x000a, 0x1939: 0x000a, 0x193a: 0x000a, 0x193b: 0x000a,\n\t0x193c: 0x003a, 0x193d: 0x002a, 0x193e: 0x000a, 0x193f: 0x000a,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x000a, 0x1941: 0x000a, 0x1942: 0x000a, 0x1943: 0x000a, 0x1944: 0x000a, 0x1945: 0x000a,\n\t0x1946: 0x000a, 0x1947: 0x000a, 0x1948: 0x000a, 0x1949: 0x000a, 0x194a: 0x000a, 0x194b: 0x000a,\n\t0x194c: 0x000a, 0x194d: 0x000a, 0x194e: 0x000a, 0x194f: 0x000a, 0x1950: 0x000a, 0x1951: 0x000a,\n\t0x1952: 0x000a, 0x1953: 0x000a, 0x1954: 0x000a, 0x1955: 0x000a, 0x1956: 0x000a, 0x1957: 0x000a,\n\t0x1958: 0x000a, 0x1959: 0x000a, 0x195a: 0x000a, 0x195b: 0x000a, 0x195c: 0x000a, 0x195d: 0x000a,\n\t0x195e: 0x000a, 0x195f: 0x000a, 0x1960: 0x000a, 0x1961: 0x000a, 0x1962: 0x000a, 0x1963: 0x000a,\n\t0x1964: 0x000a, 0x1965: 0x000a, 0x1966: 0x000a, 0x1967: 0x000a, 0x1968: 0x000a, 0x1969: 0x000a,\n\t0x196a: 0x000a, 0x196b: 0x000a, 0x196c: 0x000a, 0x196d: 0x000a, 0x196e: 0x000a, 0x196f: 0x000a,\n\t0x1970: 0x000a, 0x1971: 0x000a, 0x1972: 0x000a, 0x1973: 0x000a,\n\t0x1976: 0x000a, 0x1977: 0x000a, 0x1978: 0x000a, 0x1979: 0x000a, 0x197a: 0x000a, 0x197b: 0x000a,\n\t0x197c: 0x000a, 0x197d: 0x000a, 0x197e: 0x000a, 0x197f: 0x000a,\n\t// Block 0x66, offset 0x1980\n\t0x1980: 0x000a, 0x1981: 0x000a, 0x1982: 0x000a, 0x1983: 0x000a, 0x1984: 0x000a, 0x1985: 0x000a,\n\t0x1986: 0x000a, 0x1987: 0x000a, 0x1988: 0x000a, 0x1989: 0x000a, 0x198a: 0x000a, 0x198b: 0x000a,\n\t0x198c: 0x000a, 0x198d: 0x000a, 0x198e: 0x000a, 0x198f: 0x000a, 0x1990: 0x000a, 0x1991: 0x000a,\n\t0x1992: 0x000a, 0x1993: 0x000a, 0x1994: 0x000a, 0x1995: 0x000a, 0x1997: 0x000a,\n\t0x1998: 0x000a, 0x1999: 0x000a, 0x199a: 0x000a, 0x199b: 0x000a, 0x199c: 0x000a, 0x199d: 0x000a,\n\t0x199e: 0x000a, 0x199f: 0x000a, 0x19a0: 0x000a, 0x19a1: 0x000a, 0x19a2: 0x000a, 0x19a3: 0x000a,\n\t0x19a4: 0x000a, 0x19a5: 0x000a, 0x19a6: 0x000a, 0x19a7: 0x000a, 0x19a8: 0x000a, 0x19a9: 0x000a,\n\t0x19aa: 0x000a, 0x19ab: 0x000a, 0x19ac: 0x000a, 0x19ad: 0x000a, 0x19ae: 0x000a, 0x19af: 0x000a,\n\t0x19b0: 0x000a, 0x19b1: 0x000a, 0x19b2: 0x000a, 0x19b3: 0x000a, 0x19b4: 0x000a, 0x19b5: 0x000a,\n\t0x19b6: 0x000a, 0x19b7: 0x000a, 0x19b8: 0x000a, 0x19b9: 0x000a, 0x19ba: 0x000a, 0x19bb: 0x000a,\n\t0x19bc: 0x000a, 0x19bd: 0x000a, 0x19be: 0x000a, 0x19bf: 0x000a,\n\t// Block 0x67, offset 0x19c0\n\t0x19e5: 0x000a, 0x19e6: 0x000a, 0x19e7: 0x000a, 0x19e8: 0x000a, 0x19e9: 0x000a,\n\t0x19ea: 0x000a, 0x19ef: 0x000c,\n\t0x19f0: 0x000c, 0x19f1: 0x000c,\n\t0x19f9: 0x000a, 0x19fa: 0x000a, 0x19fb: 0x000a,\n\t0x19fc: 0x000a, 0x19fd: 0x000a, 0x19fe: 0x000a, 0x19ff: 0x000a,\n\t// Block 0x68, offset 0x1a00\n\t0x1a3f: 0x000c,\n\t// Block 0x69, offset 0x1a40\n\t0x1a60: 0x000c, 0x1a61: 0x000c, 0x1a62: 0x000c, 0x1a63: 0x000c,\n\t0x1a64: 0x000c, 0x1a65: 0x000c, 0x1a66: 0x000c, 0x1a67: 0x000c, 0x1a68: 0x000c, 0x1a69: 0x000c,\n\t0x1a6a: 0x000c, 0x1a6b: 0x000c, 0x1a6c: 0x000c, 0x1a6d: 0x000c, 0x1a6e: 0x000c, 0x1a6f: 0x000c,\n\t0x1a70: 0x000c, 0x1a71: 0x000c, 0x1a72: 0x000c, 0x1a73: 0x000c, 0x1a74: 0x000c, 0x1a75: 0x000c,\n\t0x1a76: 0x000c, 0x1a77: 0x000c, 0x1a78: 0x000c, 0x1a79: 0x000c, 0x1a7a: 0x000c, 0x1a7b: 0x000c,\n\t0x1a7c: 0x000c, 0x1a7d: 0x000c, 0x1a7e: 0x000c, 0x1a7f: 0x000c,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x000a, 0x1a81: 0x000a, 0x1a82: 0x000a, 0x1a83: 0x000a, 0x1a84: 0x000a, 0x1a85: 0x000a,\n\t0x1a86: 0x000a, 0x1a87: 0x000a, 0x1a88: 0x000a, 0x1a89: 0x000a, 0x1a8a: 0x000a, 0x1a8b: 0x000a,\n\t0x1a8c: 0x000a, 0x1a8d: 0x000a, 0x1a8e: 0x000a, 0x1a8f: 0x000a, 0x1a90: 0x000a, 0x1a91: 0x000a,\n\t0x1a92: 0x000a, 0x1a93: 0x000a, 0x1a94: 0x000a, 0x1a95: 0x000a, 0x1a96: 0x000a, 0x1a97: 0x000a,\n\t0x1a98: 0x000a, 0x1a99: 0x000a, 0x1a9a: 0x000a, 0x1a9b: 0x000a, 0x1a9c: 0x000a, 0x1a9d: 0x000a,\n\t0x1a9e: 0x000a, 0x1a9f: 0x000a, 0x1aa0: 0x000a, 0x1aa1: 0x000a, 0x1aa2: 0x003a, 0x1aa3: 0x002a,\n\t0x1aa4: 0x003a, 0x1aa5: 0x002a, 0x1aa6: 0x003a, 0x1aa7: 0x002a, 0x1aa8: 0x003a, 0x1aa9: 0x002a,\n\t0x1aaa: 0x000a, 0x1aab: 0x000a, 0x1aac: 0x000a, 0x1aad: 0x000a, 0x1aae: 0x000a, 0x1aaf: 0x000a,\n\t0x1ab0: 0x000a, 0x1ab1: 0x000a, 0x1ab2: 0x000a, 0x1ab3: 0x000a, 0x1ab4: 0x000a, 0x1ab5: 0x000a,\n\t0x1ab6: 0x000a, 0x1ab7: 0x000a, 0x1ab8: 0x000a, 0x1ab9: 0x000a, 0x1aba: 0x000a, 0x1abb: 0x000a,\n\t0x1abc: 0x000a, 0x1abd: 0x000a, 0x1abe: 0x000a, 0x1abf: 0x000a,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x000a, 0x1ac1: 0x000a, 0x1ac2: 0x000a, 0x1ac3: 0x000a, 0x1ac4: 0x000a, 0x1ac5: 0x000a,\n\t0x1ac6: 0x000a, 0x1ac7: 0x000a, 0x1ac8: 0x000a, 0x1ac9: 0x000a, 0x1aca: 0x000a, 0x1acb: 0x000a,\n\t0x1acc: 0x000a, 0x1acd: 0x000a, 0x1ace: 0x000a, 0x1acf: 0x000a, 0x1ad0: 0x000a, 0x1ad1: 0x000a,\n\t0x1ad2: 0x000a, 0x1ad3: 0x000a, 0x1ad4: 0x000a, 0x1ad5: 0x009a, 0x1ad6: 0x008a, 0x1ad7: 0x00ba,\n\t0x1ad8: 0x00aa, 0x1ad9: 0x009a, 0x1ada: 0x008a, 0x1adb: 0x007a, 0x1adc: 0x006a, 0x1add: 0x000a,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x000a, 0x1b01: 0x000a, 0x1b02: 0x000a, 0x1b03: 0x000a, 0x1b04: 0x000a, 0x1b05: 0x000a,\n\t0x1b06: 0x000a, 0x1b07: 0x000a, 0x1b08: 0x000a, 0x1b09: 0x000a, 0x1b0a: 0x000a, 0x1b0b: 0x000a,\n\t0x1b0c: 0x000a, 0x1b0d: 0x000a, 0x1b0e: 0x000a, 0x1b0f: 0x000a, 0x1b10: 0x000a, 0x1b11: 0x000a,\n\t0x1b12: 0x000a, 0x1b13: 0x000a, 0x1b14: 0x000a, 0x1b15: 0x000a, 0x1b16: 0x000a, 0x1b17: 0x000a,\n\t0x1b18: 0x000a, 0x1b19: 0x000a, 0x1b1b: 0x000a, 0x1b1c: 0x000a, 0x1b1d: 0x000a,\n\t0x1b1e: 0x000a, 0x1b1f: 0x000a, 0x1b20: 0x000a, 0x1b21: 0x000a, 0x1b22: 0x000a, 0x1b23: 0x000a,\n\t0x1b24: 0x000a, 0x1b25: 0x000a, 0x1b26: 0x000a, 0x1b27: 0x000a, 0x1b28: 0x000a, 0x1b29: 0x000a,\n\t0x1b2a: 0x000a, 0x1b2b: 0x000a, 0x1b2c: 0x000a, 0x1b2d: 0x000a, 0x1b2e: 0x000a, 0x1b2f: 0x000a,\n\t0x1b30: 0x000a, 0x1b31: 0x000a, 0x1b32: 0x000a, 0x1b33: 0x000a, 0x1b34: 0x000a, 0x1b35: 0x000a,\n\t0x1b36: 0x000a, 0x1b37: 0x000a, 0x1b38: 0x000a, 0x1b39: 0x000a, 0x1b3a: 0x000a, 0x1b3b: 0x000a,\n\t0x1b3c: 0x000a, 0x1b3d: 0x000a, 0x1b3e: 0x000a, 0x1b3f: 0x000a,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0x000a, 0x1b41: 0x000a, 0x1b42: 0x000a, 0x1b43: 0x000a, 0x1b44: 0x000a, 0x1b45: 0x000a,\n\t0x1b46: 0x000a, 0x1b47: 0x000a, 0x1b48: 0x000a, 0x1b49: 0x000a, 0x1b4a: 0x000a, 0x1b4b: 0x000a,\n\t0x1b4c: 0x000a, 0x1b4d: 0x000a, 0x1b4e: 0x000a, 0x1b4f: 0x000a, 0x1b50: 0x000a, 0x1b51: 0x000a,\n\t0x1b52: 0x000a, 0x1b53: 0x000a, 0x1b54: 0x000a, 0x1b55: 0x000a, 0x1b56: 0x000a, 0x1b57: 0x000a,\n\t0x1b58: 0x000a, 0x1b59: 0x000a, 0x1b5a: 0x000a, 0x1b5b: 0x000a, 0x1b5c: 0x000a, 0x1b5d: 0x000a,\n\t0x1b5e: 0x000a, 0x1b5f: 0x000a, 0x1b60: 0x000a, 0x1b61: 0x000a, 0x1b62: 0x000a, 0x1b63: 0x000a,\n\t0x1b64: 0x000a, 0x1b65: 0x000a, 0x1b66: 0x000a, 0x1b67: 0x000a, 0x1b68: 0x000a, 0x1b69: 0x000a,\n\t0x1b6a: 0x000a, 0x1b6b: 0x000a, 0x1b6c: 0x000a, 0x1b6d: 0x000a, 0x1b6e: 0x000a, 0x1b6f: 0x000a,\n\t0x1b70: 0x000a, 0x1b71: 0x000a, 0x1b72: 0x000a, 0x1b73: 0x000a,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0x000a, 0x1b81: 0x000a, 0x1b82: 0x000a, 0x1b83: 0x000a, 0x1b84: 0x000a, 0x1b85: 0x000a,\n\t0x1b86: 0x000a, 0x1b87: 0x000a, 0x1b88: 0x000a, 0x1b89: 0x000a, 0x1b8a: 0x000a, 0x1b8b: 0x000a,\n\t0x1b8c: 0x000a, 0x1b8d: 0x000a, 0x1b8e: 0x000a, 0x1b8f: 0x000a, 0x1b90: 0x000a, 0x1b91: 0x000a,\n\t0x1b92: 0x000a, 0x1b93: 0x000a, 0x1b94: 0x000a, 0x1b95: 0x000a,\n\t0x1bb0: 0x000a, 0x1bb1: 0x000a, 0x1bb2: 0x000a, 0x1bb3: 0x000a, 0x1bb4: 0x000a, 0x1bb5: 0x000a,\n\t0x1bb6: 0x000a, 0x1bb7: 0x000a, 0x1bb8: 0x000a, 0x1bb9: 0x000a, 0x1bba: 0x000a, 0x1bbb: 0x000a,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bc0: 0x0009, 0x1bc1: 0x000a, 0x1bc2: 0x000a, 0x1bc3: 0x000a, 0x1bc4: 0x000a,\n\t0x1bc8: 0x003a, 0x1bc9: 0x002a, 0x1bca: 0x003a, 0x1bcb: 0x002a,\n\t0x1bcc: 0x003a, 0x1bcd: 0x002a, 0x1bce: 0x003a, 0x1bcf: 0x002a, 0x1bd0: 0x003a, 0x1bd1: 0x002a,\n\t0x1bd2: 0x000a, 0x1bd3: 0x000a, 0x1bd4: 0x003a, 0x1bd5: 0x002a, 0x1bd6: 0x003a, 0x1bd7: 0x002a,\n\t0x1bd8: 0x003a, 0x1bd9: 0x002a, 0x1bda: 0x003a, 0x1bdb: 0x002a, 0x1bdc: 0x000a, 0x1bdd: 0x000a,\n\t0x1bde: 0x000a, 0x1bdf: 0x000a, 0x1be0: 0x000a,\n\t0x1bea: 0x000c, 0x1beb: 0x000c, 0x1bec: 0x000c, 0x1bed: 0x000c,\n\t0x1bf0: 0x000a,\n\t0x1bf6: 0x000a, 0x1bf7: 0x000a,\n\t0x1bfd: 0x000a, 0x1bfe: 0x000a, 0x1bff: 0x000a,\n\t// Block 0x70, offset 0x1c00\n\t0x1c19: 0x000c, 0x1c1a: 0x000c, 0x1c1b: 0x000a, 0x1c1c: 0x000a,\n\t0x1c20: 0x000a,\n\t// Block 0x71, offset 0x1c40\n\t0x1c7b: 0x000a,\n\t// Block 0x72, offset 0x1c80\n\t0x1c80: 0x000a, 0x1c81: 0x000a, 0x1c82: 0x000a, 0x1c83: 0x000a, 0x1c84: 0x000a, 0x1c85: 0x000a,\n\t0x1c86: 0x000a, 0x1c87: 0x000a, 0x1c88: 0x000a, 0x1c89: 0x000a, 0x1c8a: 0x000a, 0x1c8b: 0x000a,\n\t0x1c8c: 0x000a, 0x1c8d: 0x000a, 0x1c8e: 0x000a, 0x1c8f: 0x000a, 0x1c90: 0x000a, 0x1c91: 0x000a,\n\t0x1c92: 0x000a, 0x1c93: 0x000a, 0x1c94: 0x000a, 0x1c95: 0x000a, 0x1c96: 0x000a, 0x1c97: 0x000a,\n\t0x1c98: 0x000a, 0x1c99: 0x000a, 0x1c9a: 0x000a, 0x1c9b: 0x000a, 0x1c9c: 0x000a, 0x1c9d: 0x000a,\n\t0x1c9e: 0x000a, 0x1c9f: 0x000a, 0x1ca0: 0x000a, 0x1ca1: 0x000a, 0x1ca2: 0x000a, 0x1ca3: 0x000a,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cdd: 0x000a,\n\t0x1cde: 0x000a,\n\t// Block 0x74, offset 0x1d00\n\t0x1d10: 0x000a, 0x1d11: 0x000a,\n\t0x1d12: 0x000a, 0x1d13: 0x000a, 0x1d14: 0x000a, 0x1d15: 0x000a, 0x1d16: 0x000a, 0x1d17: 0x000a,\n\t0x1d18: 0x000a, 0x1d19: 0x000a, 0x1d1a: 0x000a, 0x1d1b: 0x000a, 0x1d1c: 0x000a, 0x1d1d: 0x000a,\n\t0x1d1e: 0x000a, 0x1d1f: 0x000a,\n\t0x1d3c: 0x000a, 0x1d3d: 0x000a, 0x1d3e: 0x000a,\n\t// Block 0x75, offset 0x1d40\n\t0x1d71: 0x000a, 0x1d72: 0x000a, 0x1d73: 0x000a, 0x1d74: 0x000a, 0x1d75: 0x000a,\n\t0x1d76: 0x000a, 0x1d77: 0x000a, 0x1d78: 0x000a, 0x1d79: 0x000a, 0x1d7a: 0x000a, 0x1d7b: 0x000a,\n\t0x1d7c: 0x000a, 0x1d7d: 0x000a, 0x1d7e: 0x000a, 0x1d7f: 0x000a,\n\t// Block 0x76, offset 0x1d80\n\t0x1d8c: 0x000a, 0x1d8d: 0x000a, 0x1d8e: 0x000a, 0x1d8f: 0x000a,\n\t// Block 0x77, offset 0x1dc0\n\t0x1df7: 0x000a, 0x1df8: 0x000a, 0x1df9: 0x000a, 0x1dfa: 0x000a,\n\t// Block 0x78, offset 0x1e00\n\t0x1e1e: 0x000a, 0x1e1f: 0x000a,\n\t0x1e3f: 0x000a,\n\t// Block 0x79, offset 0x1e40\n\t0x1e50: 0x000a, 0x1e51: 0x000a,\n\t0x1e52: 0x000a, 0x1e53: 0x000a, 0x1e54: 0x000a, 0x1e55: 0x000a, 0x1e56: 0x000a, 0x1e57: 0x000a,\n\t0x1e58: 0x000a, 0x1e59: 0x000a, 0x1e5a: 0x000a, 0x1e5b: 0x000a, 0x1e5c: 0x000a, 0x1e5d: 0x000a,\n\t0x1e5e: 0x000a, 0x1e5f: 0x000a, 0x1e60: 0x000a, 0x1e61: 0x000a, 0x1e62: 0x000a, 0x1e63: 0x000a,\n\t0x1e64: 0x000a, 0x1e65: 0x000a, 0x1e66: 0x000a, 0x1e67: 0x000a, 0x1e68: 0x000a, 0x1e69: 0x000a,\n\t0x1e6a: 0x000a, 0x1e6b: 0x000a, 0x1e6c: 0x000a, 0x1e6d: 0x000a, 0x1e6e: 0x000a, 0x1e6f: 0x000a,\n\t0x1e70: 0x000a, 0x1e71: 0x000a, 0x1e72: 0x000a, 0x1e73: 0x000a, 0x1e74: 0x000a, 0x1e75: 0x000a,\n\t0x1e76: 0x000a, 0x1e77: 0x000a, 0x1e78: 0x000a, 0x1e79: 0x000a, 0x1e7a: 0x000a, 0x1e7b: 0x000a,\n\t0x1e7c: 0x000a, 0x1e7d: 0x000a, 0x1e7e: 0x000a, 0x1e7f: 0x000a,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e80: 0x000a, 0x1e81: 0x000a, 0x1e82: 0x000a, 0x1e83: 0x000a, 0x1e84: 0x000a, 0x1e85: 0x000a,\n\t0x1e86: 0x000a,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1ecd: 0x000a, 0x1ece: 0x000a, 0x1ecf: 0x000a,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f2f: 0x000c,\n\t0x1f30: 0x000c, 0x1f31: 0x000c, 0x1f32: 0x000c, 0x1f33: 0x000a, 0x1f34: 0x000c, 0x1f35: 0x000c,\n\t0x1f36: 0x000c, 0x1f37: 0x000c, 0x1f38: 0x000c, 0x1f39: 0x000c, 0x1f3a: 0x000c, 0x1f3b: 0x000c,\n\t0x1f3c: 0x000c, 0x1f3d: 0x000c, 0x1f3e: 0x000a, 0x1f3f: 0x000a,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f5e: 0x000c, 0x1f5f: 0x000c,\n\t// Block 0x7e, offset 0x1f80\n\t0x1fb0: 0x000c, 0x1fb1: 0x000c,\n\t// Block 0x7f, offset 0x1fc0\n\t0x1fc0: 0x000a, 0x1fc1: 0x000a, 0x1fc2: 0x000a, 0x1fc3: 0x000a, 0x1fc4: 0x000a, 0x1fc5: 0x000a,\n\t0x1fc6: 0x000a, 0x1fc7: 0x000a, 0x1fc8: 0x000a, 0x1fc9: 0x000a, 0x1fca: 0x000a, 0x1fcb: 0x000a,\n\t0x1fcc: 0x000a, 0x1fcd: 0x000a, 0x1fce: 0x000a, 0x1fcf: 0x000a, 0x1fd0: 0x000a, 0x1fd1: 0x000a,\n\t0x1fd2: 0x000a, 0x1fd3: 0x000a, 0x1fd4: 0x000a, 0x1fd5: 0x000a, 0x1fd6: 0x000a, 0x1fd7: 0x000a,\n\t0x1fd8: 0x000a, 0x1fd9: 0x000a, 0x1fda: 0x000a, 0x1fdb: 0x000a, 0x1fdc: 0x000a, 0x1fdd: 0x000a,\n\t0x1fde: 0x000a, 0x1fdf: 0x000a, 0x1fe0: 0x000a, 0x1fe1: 0x000a,\n\t// Block 0x80, offset 0x2000\n\t0x2008: 0x000a,\n\t// Block 0x81, offset 0x2040\n\t0x2042: 0x000c,\n\t0x2046: 0x000c, 0x204b: 0x000c,\n\t0x2065: 0x000c, 0x2066: 0x000c, 0x2068: 0x000a, 0x2069: 0x000a,\n\t0x206a: 0x000a, 0x206b: 0x000a, 0x206c: 0x000c,\n\t0x2078: 0x0004, 0x2079: 0x0004,\n\t// Block 0x82, offset 0x2080\n\t0x20b4: 0x000a, 0x20b5: 0x000a,\n\t0x20b6: 0x000a, 0x20b7: 0x000a,\n\t// Block 0x83, offset 0x20c0\n\t0x20c4: 0x000c, 0x20c5: 0x000c,\n\t0x20e0: 0x000c, 0x20e1: 0x000c, 0x20e2: 0x000c, 0x20e3: 0x000c,\n\t0x20e4: 0x000c, 0x20e5: 0x000c, 0x20e6: 0x000c, 0x20e7: 0x000c, 0x20e8: 0x000c, 0x20e9: 0x000c,\n\t0x20ea: 0x000c, 0x20eb: 0x000c, 0x20ec: 0x000c, 0x20ed: 0x000c, 0x20ee: 0x000c, 0x20ef: 0x000c,\n\t0x20f0: 0x000c, 0x20f1: 0x000c,\n\t0x20ff: 0x000c,\n\t// Block 0x84, offset 0x2100\n\t0x2126: 0x000c, 0x2127: 0x000c, 0x2128: 0x000c, 0x2129: 0x000c,\n\t0x212a: 0x000c, 0x212b: 0x000c, 0x212c: 0x000c, 0x212d: 0x000c,\n\t// Block 0x85, offset 0x2140\n\t0x2147: 0x000c, 0x2148: 0x000c, 0x2149: 0x000c, 0x214a: 0x000c, 0x214b: 0x000c,\n\t0x214c: 0x000c, 0x214d: 0x000c, 0x214e: 0x000c, 0x214f: 0x000c, 0x2150: 0x000c, 0x2151: 0x000c,\n\t// Block 0x86, offset 0x2180\n\t0x2180: 0x000c, 0x2181: 0x000c, 0x2182: 0x000c,\n\t0x21b3: 0x000c,\n\t0x21b6: 0x000c, 0x21b7: 0x000c, 0x21b8: 0x000c, 0x21b9: 0x000c,\n\t0x21bc: 0x000c, 0x21bd: 0x000c,\n\t// Block 0x87, offset 0x21c0\n\t0x21e5: 0x000c,\n\t// Block 0x88, offset 0x2200\n\t0x2229: 0x000c,\n\t0x222a: 0x000c, 0x222b: 0x000c, 0x222c: 0x000c, 0x222d: 0x000c, 0x222e: 0x000c,\n\t0x2231: 0x000c, 0x2232: 0x000c, 0x2235: 0x000c,\n\t0x2236: 0x000c,\n\t// Block 0x89, offset 0x2240\n\t0x2243: 0x000c,\n\t0x224c: 0x000c,\n\t0x227c: 0x000c,\n\t// Block 0x8a, offset 0x2280\n\t0x22b0: 0x000c, 0x22b2: 0x000c, 0x22b3: 0x000c, 0x22b4: 0x000c,\n\t0x22b7: 0x000c, 0x22b8: 0x000c,\n\t0x22be: 0x000c, 0x22bf: 0x000c,\n\t// Block 0x8b, offset 0x22c0\n\t0x22c1: 0x000c,\n\t0x22ec: 0x000c, 0x22ed: 0x000c,\n\t0x22f6: 0x000c,\n\t// Block 0x8c, offset 0x2300\n\t0x232a: 0x000a, 0x232b: 0x000a,\n\t// Block 0x8d, offset 0x2340\n\t0x2365: 0x000c, 0x2368: 0x000c,\n\t0x236d: 0x000c,\n\t// Block 0x8e, offset 0x2380\n\t0x239d: 0x0001,\n\t0x239e: 0x000c, 0x239f: 0x0001, 0x23a0: 0x0001, 0x23a1: 0x0001, 0x23a2: 0x0001, 0x23a3: 0x0001,\n\t0x23a4: 0x0001, 0x23a5: 0x0001, 0x23a6: 0x0001, 0x23a7: 0x0001, 0x23a8: 0x0001, 0x23a9: 0x0003,\n\t0x23aa: 0x0001, 0x23ab: 0x0001, 0x23ac: 0x0001, 0x23ad: 0x0001, 0x23ae: 0x0001, 0x23af: 0x0001,\n\t0x23b0: 0x0001, 0x23b1: 0x0001, 0x23b2: 0x0001, 0x23b3: 0x0001, 0x23b4: 0x0001, 0x23b5: 0x0001,\n\t0x23b6: 0x0001, 0x23b7: 0x0001, 0x23b8: 0x0001, 0x23b9: 0x0001, 0x23ba: 0x0001, 0x23bb: 0x0001,\n\t0x23bc: 0x0001, 0x23bd: 0x0001, 0x23be: 0x0001, 0x23bf: 0x0001,\n\t// Block 0x8f, offset 0x23c0\n\t0x23c0: 0x0001, 0x23c1: 0x0001, 0x23c2: 0x0001, 0x23c3: 0x0001, 0x23c4: 0x0001, 0x23c5: 0x0001,\n\t0x23c6: 0x0001, 0x23c7: 0x0001, 0x23c8: 0x0001, 0x23c9: 0x0001, 0x23ca: 0x0001, 0x23cb: 0x0001,\n\t0x23cc: 0x0001, 0x23cd: 0x0001, 0x23ce: 0x0001, 0x23cf: 0x0001, 0x23d0: 0x000d, 0x23d1: 0x000d,\n\t0x23d2: 0x000d, 0x23d3: 0x000d, 0x23d4: 0x000d, 0x23d5: 0x000d, 0x23d6: 0x000d, 0x23d7: 0x000d,\n\t0x23d8: 0x000d, 0x23d9: 0x000d, 0x23da: 0x000d, 0x23db: 0x000d, 0x23dc: 0x000d, 0x23dd: 0x000d,\n\t0x23de: 0x000d, 0x23df: 0x000d, 0x23e0: 0x000d, 0x23e1: 0x000d, 0x23e2: 0x000d, 0x23e3: 0x000d,\n\t0x23e4: 0x000d, 0x23e5: 0x000d, 0x23e6: 0x000d, 0x23e7: 0x000d, 0x23e8: 0x000d, 0x23e9: 0x000d,\n\t0x23ea: 0x000d, 0x23eb: 0x000d, 0x23ec: 0x000d, 0x23ed: 0x000d, 0x23ee: 0x000d, 0x23ef: 0x000d,\n\t0x23f0: 0x000d, 0x23f1: 0x000d, 0x23f2: 0x000d, 0x23f3: 0x000d, 0x23f4: 0x000d, 0x23f5: 0x000d,\n\t0x23f6: 0x000d, 0x23f7: 0x000d, 0x23f8: 0x000d, 0x23f9: 0x000d, 0x23fa: 0x000d, 0x23fb: 0x000d,\n\t0x23fc: 0x000d, 0x23fd: 0x000d, 0x23fe: 0x000d, 0x23ff: 0x000d,\n\t// Block 0x90, offset 0x2400\n\t0x2400: 0x000d, 0x2401: 0x000d, 0x2402: 0x000d, 0x2403: 0x000d, 0x2404: 0x000d, 0x2405: 0x000d,\n\t0x2406: 0x000d, 0x2407: 0x000d, 0x2408: 0x000d, 0x2409: 0x000d, 0x240a: 0x000d, 0x240b: 0x000d,\n\t0x240c: 0x000d, 0x240d: 0x000d, 0x240e: 0x000d, 0x240f: 0x000d, 0x2410: 0x000d, 0x2411: 0x000d,\n\t0x2412: 0x000d, 0x2413: 0x000d, 0x2414: 0x000d, 0x2415: 0x000d, 0x2416: 0x000d, 0x2417: 0x000d,\n\t0x2418: 0x000d, 0x2419: 0x000d, 0x241a: 0x000d, 0x241b: 0x000d, 0x241c: 0x000d, 0x241d: 0x000d,\n\t0x241e: 0x000d, 0x241f: 0x000d, 0x2420: 0x000d, 0x2421: 0x000d, 0x2422: 0x000d, 0x2423: 0x000d,\n\t0x2424: 0x000d, 0x2425: 0x000d, 0x2426: 0x000d, 0x2427: 0x000d, 0x2428: 0x000d, 0x2429: 0x000d,\n\t0x242a: 0x000d, 0x242b: 0x000d, 0x242c: 0x000d, 0x242d: 0x000d, 0x242e: 0x000d, 0x242f: 0x000d,\n\t0x2430: 0x000d, 0x2431: 0x000d, 0x2432: 0x000d, 0x2433: 0x000d, 0x2434: 0x000d, 0x2435: 0x000d,\n\t0x2436: 0x000d, 0x2437: 0x000d, 0x2438: 0x000d, 0x2439: 0x000d, 0x243a: 0x000d, 0x243b: 0x000d,\n\t0x243c: 0x000d, 0x243d: 0x000d, 0x243e: 0x000a, 0x243f: 0x000a,\n\t// Block 0x91, offset 0x2440\n\t0x2440: 0x000a, 0x2441: 0x000a, 0x2442: 0x000a, 0x2443: 0x000a, 0x2444: 0x000a, 0x2445: 0x000a,\n\t0x2446: 0x000a, 0x2447: 0x000a, 0x2448: 0x000a, 0x2449: 0x000a, 0x244a: 0x000a, 0x244b: 0x000a,\n\t0x244c: 0x000a, 0x244d: 0x000a, 0x244e: 0x000a, 0x244f: 0x000a, 0x2450: 0x000d, 0x2451: 0x000d,\n\t0x2452: 0x000d, 0x2453: 0x000d, 0x2454: 0x000d, 0x2455: 0x000d, 0x2456: 0x000d, 0x2457: 0x000d,\n\t0x2458: 0x000d, 0x2459: 0x000d, 0x245a: 0x000d, 0x245b: 0x000d, 0x245c: 0x000d, 0x245d: 0x000d,\n\t0x245e: 0x000d, 0x245f: 0x000d, 0x2460: 0x000d, 0x2461: 0x000d, 0x2462: 0x000d, 0x2463: 0x000d,\n\t0x2464: 0x000d, 0x2465: 0x000d, 0x2466: 0x000d, 0x2467: 0x000d, 0x2468: 0x000d, 0x2469: 0x000d,\n\t0x246a: 0x000d, 0x246b: 0x000d, 0x246c: 0x000d, 0x246d: 0x000d, 0x246e: 0x000d, 0x246f: 0x000d,\n\t0x2470: 0x000d, 0x2471: 0x000d, 0x2472: 0x000d, 0x2473: 0x000d, 0x2474: 0x000d, 0x2475: 0x000d,\n\t0x2476: 0x000d, 0x2477: 0x000d, 0x2478: 0x000d, 0x2479: 0x000d, 0x247a: 0x000d, 0x247b: 0x000d,\n\t0x247c: 0x000d, 0x247d: 0x000d, 0x247e: 0x000d, 0x247f: 0x000d,\n\t// Block 0x92, offset 0x2480\n\t0x2480: 0x000d, 0x2481: 0x000d, 0x2482: 0x000d, 0x2483: 0x000d, 0x2484: 0x000d, 0x2485: 0x000d,\n\t0x2486: 0x000d, 0x2487: 0x000d, 0x2488: 0x000d, 0x2489: 0x000d, 0x248a: 0x000d, 0x248b: 0x000d,\n\t0x248c: 0x000d, 0x248d: 0x000d, 0x248e: 0x000d, 0x248f: 0x000a, 0x2490: 0x000b, 0x2491: 0x000b,\n\t0x2492: 0x000b, 0x2493: 0x000b, 0x2494: 0x000b, 0x2495: 0x000b, 0x2496: 0x000b, 0x2497: 0x000b,\n\t0x2498: 0x000b, 0x2499: 0x000b, 0x249a: 0x000b, 0x249b: 0x000b, 0x249c: 0x000b, 0x249d: 0x000b,\n\t0x249e: 0x000b, 0x249f: 0x000b, 0x24a0: 0x000b, 0x24a1: 0x000b, 0x24a2: 0x000b, 0x24a3: 0x000b,\n\t0x24a4: 0x000b, 0x24a5: 0x000b, 0x24a6: 0x000b, 0x24a7: 0x000b, 0x24a8: 0x000b, 0x24a9: 0x000b,\n\t0x24aa: 0x000b, 0x24ab: 0x000b, 0x24ac: 0x000b, 0x24ad: 0x000b, 0x24ae: 0x000b, 0x24af: 0x000b,\n\t0x24b0: 0x000d, 0x24b1: 0x000d, 0x24b2: 0x000d, 0x24b3: 0x000d, 0x24b4: 0x000d, 0x24b5: 0x000d,\n\t0x24b6: 0x000d, 0x24b7: 0x000d, 0x24b8: 0x000d, 0x24b9: 0x000d, 0x24ba: 0x000d, 0x24bb: 0x000d,\n\t0x24bc: 0x000d, 0x24bd: 0x000a, 0x24be: 0x000a, 0x24bf: 0x000a,\n\t// Block 0x93, offset 0x24c0\n\t0x24c0: 0x000c, 0x24c1: 0x000c, 0x24c2: 0x000c, 0x24c3: 0x000c, 0x24c4: 0x000c, 0x24c5: 0x000c,\n\t0x24c6: 0x000c, 0x24c7: 0x000c, 0x24c8: 0x000c, 0x24c9: 0x000c, 0x24ca: 0x000c, 0x24cb: 0x000c,\n\t0x24cc: 0x000c, 0x24cd: 0x000c, 0x24ce: 0x000c, 0x24cf: 0x000c, 0x24d0: 0x000a, 0x24d1: 0x000a,\n\t0x24d2: 0x000a, 0x24d3: 0x000a, 0x24d4: 0x000a, 0x24d5: 0x000a, 0x24d6: 0x000a, 0x24d7: 0x000a,\n\t0x24d8: 0x000a, 0x24d9: 0x000a,\n\t0x24e0: 0x000c, 0x24e1: 0x000c, 0x24e2: 0x000c, 0x24e3: 0x000c,\n\t0x24e4: 0x000c, 0x24e5: 0x000c, 0x24e6: 0x000c, 0x24e7: 0x000c, 0x24e8: 0x000c, 0x24e9: 0x000c,\n\t0x24ea: 0x000c, 0x24eb: 0x000c, 0x24ec: 0x000c, 0x24ed: 0x000c, 0x24ee: 0x000c, 0x24ef: 0x000c,\n\t0x24f0: 0x000a, 0x24f1: 0x000a, 0x24f2: 0x000a, 0x24f3: 0x000a, 0x24f4: 0x000a, 0x24f5: 0x000a,\n\t0x24f6: 0x000a, 0x24f7: 0x000a, 0x24f8: 0x000a, 0x24f9: 0x000a, 0x24fa: 0x000a, 0x24fb: 0x000a,\n\t0x24fc: 0x000a, 0x24fd: 0x000a, 0x24fe: 0x000a, 0x24ff: 0x000a,\n\t// Block 0x94, offset 0x2500\n\t0x2500: 0x000a, 0x2501: 0x000a, 0x2502: 0x000a, 0x2503: 0x000a, 0x2504: 0x000a, 0x2505: 0x000a,\n\t0x2506: 0x000a, 0x2507: 0x000a, 0x2508: 0x000a, 0x2509: 0x000a, 0x250a: 0x000a, 0x250b: 0x000a,\n\t0x250c: 0x000a, 0x250d: 0x000a, 0x250e: 0x000a, 0x250f: 0x000a, 0x2510: 0x0006, 0x2511: 0x000a,\n\t0x2512: 0x0006, 0x2514: 0x000a, 0x2515: 0x0006, 0x2516: 0x000a, 0x2517: 0x000a,\n\t0x2518: 0x000a, 0x2519: 0x009a, 0x251a: 0x008a, 0x251b: 0x007a, 0x251c: 0x006a, 0x251d: 0x009a,\n\t0x251e: 0x008a, 0x251f: 0x0004, 0x2520: 0x000a, 0x2521: 0x000a, 0x2522: 0x0003, 0x2523: 0x0003,\n\t0x2524: 0x000a, 0x2525: 0x000a, 0x2526: 0x000a, 0x2528: 0x000a, 0x2529: 0x0004,\n\t0x252a: 0x0004, 0x252b: 0x000a,\n\t0x2530: 0x000d, 0x2531: 0x000d, 0x2532: 0x000d, 0x2533: 0x000d, 0x2534: 0x000d, 0x2535: 0x000d,\n\t0x2536: 0x000d, 0x2537: 0x000d, 0x2538: 0x000d, 0x2539: 0x000d, 0x253a: 0x000d, 0x253b: 0x000d,\n\t0x253c: 0x000d, 0x253d: 0x000d, 0x253e: 0x000d, 0x253f: 0x000d,\n\t// Block 0x95, offset 0x2540\n\t0x2540: 0x000d, 0x2541: 0x000d, 0x2542: 0x000d, 0x2543: 0x000d, 0x2544: 0x000d, 0x2545: 0x000d,\n\t0x2546: 0x000d, 0x2547: 0x000d, 0x2548: 0x000d, 0x2549: 0x000d, 0x254a: 0x000d, 0x254b: 0x000d,\n\t0x254c: 0x000d, 0x254d: 0x000d, 0x254e: 0x000d, 0x254f: 0x000d, 0x2550: 0x000d, 0x2551: 0x000d,\n\t0x2552: 0x000d, 0x2553: 0x000d, 0x2554: 0x000d, 0x2555: 0x000d, 0x2556: 0x000d, 0x2557: 0x000d,\n\t0x2558: 0x000d, 0x2559: 0x000d, 0x255a: 0x000d, 0x255b: 0x000d, 0x255c: 0x000d, 0x255d: 0x000d,\n\t0x255e: 0x000d, 0x255f: 0x000d, 0x2560: 0x000d, 0x2561: 0x000d, 0x2562: 0x000d, 0x2563: 0x000d,\n\t0x2564: 0x000d, 0x2565: 0x000d, 0x2566: 0x000d, 0x2567: 0x000d, 0x2568: 0x000d, 0x2569: 0x000d,\n\t0x256a: 0x000d, 0x256b: 0x000d, 0x256c: 0x000d, 0x256d: 0x000d, 0x256e: 0x000d, 0x256f: 0x000d,\n\t0x2570: 0x000d, 0x2571: 0x000d, 0x2572: 0x000d, 0x2573: 0x000d, 0x2574: 0x000d, 0x2575: 0x000d,\n\t0x2576: 0x000d, 0x2577: 0x000d, 0x2578: 0x000d, 0x2579: 0x000d, 0x257a: 0x000d, 0x257b: 0x000d,\n\t0x257c: 0x000d, 0x257d: 0x000d, 0x257e: 0x000d, 0x257f: 0x000b,\n\t// Block 0x96, offset 0x2580\n\t0x2581: 0x000a, 0x2582: 0x000a, 0x2583: 0x0004, 0x2584: 0x0004, 0x2585: 0x0004,\n\t0x2586: 0x000a, 0x2587: 0x000a, 0x2588: 0x003a, 0x2589: 0x002a, 0x258a: 0x000a, 0x258b: 0x0003,\n\t0x258c: 0x0006, 0x258d: 0x0003, 0x258e: 0x0006, 0x258f: 0x0006, 0x2590: 0x0002, 0x2591: 0x0002,\n\t0x2592: 0x0002, 0x2593: 0x0002, 0x2594: 0x0002, 0x2595: 0x0002, 0x2596: 0x0002, 0x2597: 0x0002,\n\t0x2598: 0x0002, 0x2599: 0x0002, 0x259a: 0x0006, 0x259b: 0x000a, 0x259c: 0x000a, 0x259d: 0x000a,\n\t0x259e: 0x000a, 0x259f: 0x000a, 0x25a0: 0x000a,\n\t0x25bb: 0x005a,\n\t0x25bc: 0x000a, 0x25bd: 0x004a, 0x25be: 0x000a, 0x25bf: 0x000a,\n\t// Block 0x97, offset 0x25c0\n\t0x25c0: 0x000a,\n\t0x25db: 0x005a, 0x25dc: 0x000a, 0x25dd: 0x004a,\n\t0x25de: 0x000a, 0x25df: 0x00fa, 0x25e0: 0x00ea, 0x25e1: 0x000a, 0x25e2: 0x003a, 0x25e3: 0x002a,\n\t0x25e4: 0x000a, 0x25e5: 0x000a,\n\t// Block 0x98, offset 0x2600\n\t0x2620: 0x0004, 0x2621: 0x0004, 0x2622: 0x000a, 0x2623: 0x000a,\n\t0x2624: 0x000a, 0x2625: 0x0004, 0x2626: 0x0004, 0x2628: 0x000a, 0x2629: 0x000a,\n\t0x262a: 0x000a, 0x262b: 0x000a, 0x262c: 0x000a, 0x262d: 0x000a, 0x262e: 0x000a,\n\t0x2630: 0x000b, 0x2631: 0x000b, 0x2632: 0x000b, 0x2633: 0x000b, 0x2634: 0x000b, 0x2635: 0x000b,\n\t0x2636: 0x000b, 0x2637: 0x000b, 0x2638: 0x000b, 0x2639: 0x000a, 0x263a: 0x000a, 0x263b: 0x000a,\n\t0x263c: 0x000a, 0x263d: 0x000a, 0x263e: 0x000b, 0x263f: 0x000b,\n\t// Block 0x99, offset 0x2640\n\t0x2641: 0x000a,\n\t// Block 0x9a, offset 0x2680\n\t0x2680: 0x000a, 0x2681: 0x000a, 0x2682: 0x000a, 0x2683: 0x000a, 0x2684: 0x000a, 0x2685: 0x000a,\n\t0x2686: 0x000a, 0x2687: 0x000a, 0x2688: 0x000a, 0x2689: 0x000a, 0x268a: 0x000a, 0x268b: 0x000a,\n\t0x268c: 0x000a, 0x2690: 0x000a, 0x2691: 0x000a,\n\t0x2692: 0x000a, 0x2693: 0x000a, 0x2694: 0x000a, 0x2695: 0x000a, 0x2696: 0x000a, 0x2697: 0x000a,\n\t0x2698: 0x000a, 0x2699: 0x000a, 0x269a: 0x000a, 0x269b: 0x000a, 0x269c: 0x000a,\n\t0x26a0: 0x000a,\n\t// Block 0x9b, offset 0x26c0\n\t0x26fd: 0x000c,\n\t// Block 0x9c, offset 0x2700\n\t0x2720: 0x000c, 0x2721: 0x0002, 0x2722: 0x0002, 0x2723: 0x0002,\n\t0x2724: 0x0002, 0x2725: 0x0002, 0x2726: 0x0002, 0x2727: 0x0002, 0x2728: 0x0002, 0x2729: 0x0002,\n\t0x272a: 0x0002, 0x272b: 0x0002, 0x272c: 0x0002, 0x272d: 0x0002, 0x272e: 0x0002, 0x272f: 0x0002,\n\t0x2730: 0x0002, 0x2731: 0x0002, 0x2732: 0x0002, 0x2733: 0x0002, 0x2734: 0x0002, 0x2735: 0x0002,\n\t0x2736: 0x0002, 0x2737: 0x0002, 0x2738: 0x0002, 0x2739: 0x0002, 0x273a: 0x0002, 0x273b: 0x0002,\n\t// Block 0x9d, offset 0x2740\n\t0x2776: 0x000c, 0x2777: 0x000c, 0x2778: 0x000c, 0x2779: 0x000c, 0x277a: 0x000c,\n\t// Block 0x9e, offset 0x2780\n\t0x2780: 0x0001, 0x2781: 0x0001, 0x2782: 0x0001, 0x2783: 0x0001, 0x2784: 0x0001, 0x2785: 0x0001,\n\t0x2786: 0x0001, 0x2787: 0x0001, 0x2788: 0x0001, 0x2789: 0x0001, 0x278a: 0x0001, 0x278b: 0x0001,\n\t0x278c: 0x0001, 0x278d: 0x0001, 0x278e: 0x0001, 0x278f: 0x0001, 0x2790: 0x0001, 0x2791: 0x0001,\n\t0x2792: 0x0001, 0x2793: 0x0001, 0x2794: 0x0001, 0x2795: 0x0001, 0x2796: 0x0001, 0x2797: 0x0001,\n\t0x2798: 0x0001, 0x2799: 0x0001, 0x279a: 0x0001, 0x279b: 0x0001, 0x279c: 0x0001, 0x279d: 0x0001,\n\t0x279e: 0x0001, 0x279f: 0x0001, 0x27a0: 0x0001, 0x27a1: 0x0001, 0x27a2: 0x0001, 0x27a3: 0x0001,\n\t0x27a4: 0x0001, 0x27a5: 0x0001, 0x27a6: 0x0001, 0x27a7: 0x0001, 0x27a8: 0x0001, 0x27a9: 0x0001,\n\t0x27aa: 0x0001, 0x27ab: 0x0001, 0x27ac: 0x0001, 0x27ad: 0x0001, 0x27ae: 0x0001, 0x27af: 0x0001,\n\t0x27b0: 0x0001, 0x27b1: 0x0001, 0x27b2: 0x0001, 0x27b3: 0x0001, 0x27b4: 0x0001, 0x27b5: 0x0001,\n\t0x27b6: 0x0001, 0x27b7: 0x0001, 0x27b8: 0x0001, 0x27b9: 0x0001, 0x27ba: 0x0001, 0x27bb: 0x0001,\n\t0x27bc: 0x0001, 0x27bd: 0x0001, 0x27be: 0x0001, 0x27bf: 0x0001,\n\t// Block 0x9f, offset 0x27c0\n\t0x27c0: 0x0001, 0x27c1: 0x0001, 0x27c2: 0x0001, 0x27c3: 0x0001, 0x27c4: 0x0001, 0x27c5: 0x0001,\n\t0x27c6: 0x0001, 0x27c7: 0x0001, 0x27c8: 0x0001, 0x27c9: 0x0001, 0x27ca: 0x0001, 0x27cb: 0x0001,\n\t0x27cc: 0x0001, 0x27cd: 0x0001, 0x27ce: 0x0001, 0x27cf: 0x0001, 0x27d0: 0x0001, 0x27d1: 0x0001,\n\t0x27d2: 0x0001, 0x27d3: 0x0001, 0x27d4: 0x0001, 0x27d5: 0x0001, 0x27d6: 0x0001, 0x27d7: 0x0001,\n\t0x27d8: 0x0001, 0x27d9: 0x0001, 0x27da: 0x0001, 0x27db: 0x0001, 0x27dc: 0x0001, 0x27dd: 0x0001,\n\t0x27de: 0x0001, 0x27df: 0x000a, 0x27e0: 0x0001, 0x27e1: 0x0001, 0x27e2: 0x0001, 0x27e3: 0x0001,\n\t0x27e4: 0x0001, 0x27e5: 0x0001, 0x27e6: 0x0001, 0x27e7: 0x0001, 0x27e8: 0x0001, 0x27e9: 0x0001,\n\t0x27ea: 0x0001, 0x27eb: 0x0001, 0x27ec: 0x0001, 0x27ed: 0x0001, 0x27ee: 0x0001, 0x27ef: 0x0001,\n\t0x27f0: 0x0001, 0x27f1: 0x0001, 0x27f2: 0x0001, 0x27f3: 0x0001, 0x27f4: 0x0001, 0x27f5: 0x0001,\n\t0x27f6: 0x0001, 0x27f7: 0x0001, 0x27f8: 0x0001, 0x27f9: 0x0001, 0x27fa: 0x0001, 0x27fb: 0x0001,\n\t0x27fc: 0x0001, 0x27fd: 0x0001, 0x27fe: 0x0001, 0x27ff: 0x0001,\n\t// Block 0xa0, offset 0x2800\n\t0x2800: 0x0001, 0x2801: 0x000c, 0x2802: 0x000c, 0x2803: 0x000c, 0x2804: 0x0001, 0x2805: 0x000c,\n\t0x2806: 0x000c, 0x2807: 0x0001, 0x2808: 0x0001, 0x2809: 0x0001, 0x280a: 0x0001, 0x280b: 0x0001,\n\t0x280c: 0x000c, 0x280d: 0x000c, 0x280e: 0x000c, 0x280f: 0x000c, 0x2810: 0x0001, 0x2811: 0x0001,\n\t0x2812: 0x0001, 0x2813: 0x0001, 0x2814: 0x0001, 0x2815: 0x0001, 0x2816: 0x0001, 0x2817: 0x0001,\n\t0x2818: 0x0001, 0x2819: 0x0001, 0x281a: 0x0001, 0x281b: 0x0001, 0x281c: 0x0001, 0x281d: 0x0001,\n\t0x281e: 0x0001, 0x281f: 0x0001, 0x2820: 0x0001, 0x2821: 0x0001, 0x2822: 0x0001, 0x2823: 0x0001,\n\t0x2824: 0x0001, 0x2825: 0x0001, 0x2826: 0x0001, 0x2827: 0x0001, 0x2828: 0x0001, 0x2829: 0x0001,\n\t0x282a: 0x0001, 0x282b: 0x0001, 0x282c: 0x0001, 0x282d: 0x0001, 0x282e: 0x0001, 0x282f: 0x0001,\n\t0x2830: 0x0001, 0x2831: 0x0001, 0x2832: 0x0001, 0x2833: 0x0001, 0x2834: 0x0001, 0x2835: 0x0001,\n\t0x2836: 0x0001, 0x2837: 0x0001, 0x2838: 0x000c, 0x2839: 0x000c, 0x283a: 0x000c, 0x283b: 0x0001,\n\t0x283c: 0x0001, 0x283d: 0x0001, 0x283e: 0x0001, 0x283f: 0x000c,\n\t// Block 0xa1, offset 0x2840\n\t0x2840: 0x0001, 0x2841: 0x0001, 0x2842: 0x0001, 0x2843: 0x0001, 0x2844: 0x0001, 0x2845: 0x0001,\n\t0x2846: 0x0001, 0x2847: 0x0001, 0x2848: 0x0001, 0x2849: 0x0001, 0x284a: 0x0001, 0x284b: 0x0001,\n\t0x284c: 0x0001, 0x284d: 0x0001, 0x284e: 0x0001, 0x284f: 0x0001, 0x2850: 0x0001, 0x2851: 0x0001,\n\t0x2852: 0x0001, 0x2853: 0x0001, 0x2854: 0x0001, 0x2855: 0x0001, 0x2856: 0x0001, 0x2857: 0x0001,\n\t0x2858: 0x0001, 0x2859: 0x0001, 0x285a: 0x0001, 0x285b: 0x0001, 0x285c: 0x0001, 0x285d: 0x0001,\n\t0x285e: 0x0001, 0x285f: 0x0001, 0x2860: 0x0001, 0x2861: 0x0001, 0x2862: 0x0001, 0x2863: 0x0001,\n\t0x2864: 0x0001, 0x2865: 0x000c, 0x2866: 0x000c, 0x2867: 0x0001, 0x2868: 0x0001, 0x2869: 0x0001,\n\t0x286a: 0x0001, 0x286b: 0x0001, 0x286c: 0x0001, 0x286d: 0x0001, 0x286e: 0x0001, 0x286f: 0x0001,\n\t0x2870: 0x0001, 0x2871: 0x0001, 0x2872: 0x0001, 0x2873: 0x0001, 0x2874: 0x0001, 0x2875: 0x0001,\n\t0x2876: 0x0001, 0x2877: 0x0001, 0x2878: 0x0001, 0x2879: 0x0001, 0x287a: 0x0001, 0x287b: 0x0001,\n\t0x287c: 0x0001, 0x287d: 0x0001, 0x287e: 0x0001, 0x287f: 0x0001,\n\t// Block 0xa2, offset 0x2880\n\t0x2880: 0x0001, 0x2881: 0x0001, 0x2882: 0x0001, 0x2883: 0x0001, 0x2884: 0x0001, 0x2885: 0x0001,\n\t0x2886: 0x0001, 0x2887: 0x0001, 0x2888: 0x0001, 0x2889: 0x0001, 0x288a: 0x0001, 0x288b: 0x0001,\n\t0x288c: 0x0001, 0x288d: 0x0001, 0x288e: 0x0001, 0x288f: 0x0001, 0x2890: 0x0001, 0x2891: 0x0001,\n\t0x2892: 0x0001, 0x2893: 0x0001, 0x2894: 0x0001, 0x2895: 0x0001, 0x2896: 0x0001, 0x2897: 0x0001,\n\t0x2898: 0x0001, 0x2899: 0x0001, 0x289a: 0x0001, 0x289b: 0x0001, 0x289c: 0x0001, 0x289d: 0x0001,\n\t0x289e: 0x0001, 0x289f: 0x0001, 0x28a0: 0x0001, 0x28a1: 0x0001, 0x28a2: 0x0001, 0x28a3: 0x0001,\n\t0x28a4: 0x0001, 0x28a5: 0x0001, 0x28a6: 0x0001, 0x28a7: 0x0001, 0x28a8: 0x0001, 0x28a9: 0x0001,\n\t0x28aa: 0x0001, 0x28ab: 0x0001, 0x28ac: 0x0001, 0x28ad: 0x0001, 0x28ae: 0x0001, 0x28af: 0x0001,\n\t0x28b0: 0x0001, 0x28b1: 0x0001, 0x28b2: 0x0001, 0x28b3: 0x0001, 0x28b4: 0x0001, 0x28b5: 0x0001,\n\t0x28b6: 0x0001, 0x28b7: 0x0001, 0x28b8: 0x0001, 0x28b9: 0x000a, 0x28ba: 0x000a, 0x28bb: 0x000a,\n\t0x28bc: 0x000a, 0x28bd: 0x000a, 0x28be: 0x000a, 0x28bf: 0x000a,\n\t// Block 0xa3, offset 0x28c0\n\t0x28c0: 0x000d, 0x28c1: 0x000d, 0x28c2: 0x000d, 0x28c3: 0x000d, 0x28c4: 0x000d, 0x28c5: 0x000d,\n\t0x28c6: 0x000d, 0x28c7: 0x000d, 0x28c8: 0x000d, 0x28c9: 0x000d, 0x28ca: 0x000d, 0x28cb: 0x000d,\n\t0x28cc: 0x000d, 0x28cd: 0x000d, 0x28ce: 0x000d, 0x28cf: 0x000d, 0x28d0: 0x000d, 0x28d1: 0x000d,\n\t0x28d2: 0x000d, 0x28d3: 0x000d, 0x28d4: 0x000d, 0x28d5: 0x000d, 0x28d6: 0x000d, 0x28d7: 0x000d,\n\t0x28d8: 0x000d, 0x28d9: 0x000d, 0x28da: 0x000d, 0x28db: 0x000d, 0x28dc: 0x000d, 0x28dd: 0x000d,\n\t0x28de: 0x000d, 0x28df: 0x000d, 0x28e0: 0x000d, 0x28e1: 0x000d, 0x28e2: 0x000d, 0x28e3: 0x000d,\n\t0x28e4: 0x000c, 0x28e5: 0x000c, 0x28e6: 0x000c, 0x28e7: 0x000c, 0x28e8: 0x0001, 0x28e9: 0x0001,\n\t0x28ea: 0x0001, 0x28eb: 0x0001, 0x28ec: 0x0001, 0x28ed: 0x0001, 0x28ee: 0x0001, 0x28ef: 0x0001,\n\t0x28f0: 0x0005, 0x28f1: 0x0005, 0x28f2: 0x0005, 0x28f3: 0x0005, 0x28f4: 0x0005, 0x28f5: 0x0005,\n\t0x28f6: 0x0005, 0x28f7: 0x0005, 0x28f8: 0x0005, 0x28f9: 0x0005, 0x28fa: 0x0001, 0x28fb: 0x0001,\n\t0x28fc: 0x0001, 0x28fd: 0x0001, 0x28fe: 0x0001, 0x28ff: 0x0001,\n\t// Block 0xa4, offset 0x2900\n\t0x2900: 0x0001, 0x2901: 0x0001, 0x2902: 0x0001, 0x2903: 0x0001, 0x2904: 0x0001, 0x2905: 0x0001,\n\t0x2906: 0x0001, 0x2907: 0x0001, 0x2908: 0x0001, 0x2909: 0x0001, 0x290a: 0x0001, 0x290b: 0x0001,\n\t0x290c: 0x0001, 0x290d: 0x0001, 0x290e: 0x0001, 0x290f: 0x0001, 0x2910: 0x0001, 0x2911: 0x0001,\n\t0x2912: 0x0001, 0x2913: 0x0001, 0x2914: 0x0001, 0x2915: 0x0001, 0x2916: 0x0001, 0x2917: 0x0001,\n\t0x2918: 0x0001, 0x2919: 0x0001, 0x291a: 0x0001, 0x291b: 0x0001, 0x291c: 0x0001, 0x291d: 0x0001,\n\t0x291e: 0x0001, 0x291f: 0x0001, 0x2920: 0x0005, 0x2921: 0x0005, 0x2922: 0x0005, 0x2923: 0x0005,\n\t0x2924: 0x0005, 0x2925: 0x0005, 0x2926: 0x0005, 0x2927: 0x0005, 0x2928: 0x0005, 0x2929: 0x0005,\n\t0x292a: 0x0005, 0x292b: 0x0005, 0x292c: 0x0005, 0x292d: 0x0005, 0x292e: 0x0005, 0x292f: 0x0005,\n\t0x2930: 0x0005, 0x2931: 0x0005, 0x2932: 0x0005, 0x2933: 0x0005, 0x2934: 0x0005, 0x2935: 0x0005,\n\t0x2936: 0x0005, 0x2937: 0x0005, 0x2938: 0x0005, 0x2939: 0x0005, 0x293a: 0x0005, 0x293b: 0x0005,\n\t0x293c: 0x0005, 0x293d: 0x0005, 0x293e: 0x0005, 0x293f: 0x0001,\n\t// Block 0xa5, offset 0x2940\n\t0x2940: 0x0001, 0x2941: 0x0001, 0x2942: 0x0001, 0x2943: 0x0001, 0x2944: 0x0001, 0x2945: 0x0001,\n\t0x2946: 0x0001, 0x2947: 0x0001, 0x2948: 0x0001, 0x2949: 0x0001, 0x294a: 0x0001, 0x294b: 0x0001,\n\t0x294c: 0x0001, 0x294d: 0x0001, 0x294e: 0x0001, 0x294f: 0x0001, 0x2950: 0x0001, 0x2951: 0x0001,\n\t0x2952: 0x0001, 0x2953: 0x0001, 0x2954: 0x0001, 0x2955: 0x0001, 0x2956: 0x0001, 0x2957: 0x0001,\n\t0x2958: 0x0001, 0x2959: 0x0001, 0x295a: 0x0001, 0x295b: 0x0001, 0x295c: 0x0001, 0x295d: 0x0001,\n\t0x295e: 0x0001, 0x295f: 0x0001, 0x2960: 0x0001, 0x2961: 0x0001, 0x2962: 0x0001, 0x2963: 0x0001,\n\t0x2964: 0x0001, 0x2965: 0x0001, 0x2966: 0x0001, 0x2967: 0x0001, 0x2968: 0x0001, 0x2969: 0x0001,\n\t0x296a: 0x0001, 0x296b: 0x000c, 0x296c: 0x000c, 0x296d: 0x0001, 0x296e: 0x0001, 0x296f: 0x0001,\n\t0x2970: 0x0001, 0x2971: 0x0001, 0x2972: 0x0001, 0x2973: 0x0001, 0x2974: 0x0001, 0x2975: 0x0001,\n\t0x2976: 0x0001, 0x2977: 0x0001, 0x2978: 0x0001, 0x2979: 0x0001, 0x297a: 0x0001, 0x297b: 0x0001,\n\t0x297c: 0x0001, 0x297d: 0x0001, 0x297e: 0x0001, 0x297f: 0x0001,\n\t// Block 0xa6, offset 0x2980\n\t0x2980: 0x0001, 0x2981: 0x0001, 0x2982: 0x0001, 0x2983: 0x0001, 0x2984: 0x0001, 0x2985: 0x0001,\n\t0x2986: 0x0001, 0x2987: 0x0001, 0x2988: 0x0001, 0x2989: 0x0001, 0x298a: 0x0001, 0x298b: 0x0001,\n\t0x298c: 0x0001, 0x298d: 0x0001, 0x298e: 0x0001, 0x298f: 0x0001, 0x2990: 0x0001, 0x2991: 0x0001,\n\t0x2992: 0x0001, 0x2993: 0x0001, 0x2994: 0x0001, 0x2995: 0x0001, 0x2996: 0x0001, 0x2997: 0x0001,\n\t0x2998: 0x0001, 0x2999: 0x0001, 0x299a: 0x0001, 0x299b: 0x0001, 0x299c: 0x0001, 0x299d: 0x0001,\n\t0x299e: 0x0001, 0x299f: 0x0001, 0x29a0: 0x0001, 0x29a1: 0x0001, 0x29a2: 0x0001, 0x29a3: 0x0001,\n\t0x29a4: 0x0001, 0x29a5: 0x0001, 0x29a6: 0x0001, 0x29a7: 0x0001, 0x29a8: 0x0001, 0x29a9: 0x0001,\n\t0x29aa: 0x0001, 0x29ab: 0x0001, 0x29ac: 0x0001, 0x29ad: 0x0001, 0x29ae: 0x0001, 0x29af: 0x0001,\n\t0x29b0: 0x0001, 0x29b1: 0x0001, 0x29b2: 0x0001, 0x29b3: 0x0001, 0x29b4: 0x0001, 0x29b5: 0x0001,\n\t0x29b6: 0x0001, 0x29b7: 0x0001, 0x29b8: 0x0001, 0x29b9: 0x0001, 0x29ba: 0x0001, 0x29bb: 0x0001,\n\t0x29bc: 0x0001, 0x29bd: 0x000c, 0x29be: 0x000c, 0x29bf: 0x000c,\n\t// Block 0xa7, offset 0x29c0\n\t0x29c0: 0x0001, 0x29c1: 0x0001, 0x29c2: 0x0001, 0x29c3: 0x0001, 0x29c4: 0x0001, 0x29c5: 0x0001,\n\t0x29c6: 0x0001, 0x29c7: 0x0001, 0x29c8: 0x0001, 0x29c9: 0x0001, 0x29ca: 0x0001, 0x29cb: 0x0001,\n\t0x29cc: 0x0001, 0x29cd: 0x0001, 0x29ce: 0x0001, 0x29cf: 0x0001, 0x29d0: 0x0001, 0x29d1: 0x0001,\n\t0x29d2: 0x0001, 0x29d3: 0x0001, 0x29d4: 0x0001, 0x29d5: 0x0001, 0x29d6: 0x0001, 0x29d7: 0x0001,\n\t0x29d8: 0x0001, 0x29d9: 0x0001, 0x29da: 0x0001, 0x29db: 0x0001, 0x29dc: 0x0001, 0x29dd: 0x0001,\n\t0x29de: 0x0001, 0x29df: 0x0001, 0x29e0: 0x0001, 0x29e1: 0x0001, 0x29e2: 0x0001, 0x29e3: 0x0001,\n\t0x29e4: 0x0001, 0x29e5: 0x0001, 0x29e6: 0x0001, 0x29e7: 0x0001, 0x29e8: 0x0001, 0x29e9: 0x0001,\n\t0x29ea: 0x0001, 0x29eb: 0x0001, 0x29ec: 0x0001, 0x29ed: 0x0001, 0x29ee: 0x0001, 0x29ef: 0x0001,\n\t0x29f0: 0x000d, 0x29f1: 0x000d, 0x29f2: 0x000d, 0x29f3: 0x000d, 0x29f4: 0x000d, 0x29f5: 0x000d,\n\t0x29f6: 0x000d, 0x29f7: 0x000d, 0x29f8: 0x000d, 0x29f9: 0x000d, 0x29fa: 0x000d, 0x29fb: 0x000d,\n\t0x29fc: 0x000d, 0x29fd: 0x000d, 0x29fe: 0x000d, 0x29ff: 0x000d,\n\t// Block 0xa8, offset 0x2a00\n\t0x2a00: 0x000d, 0x2a01: 0x000d, 0x2a02: 0x000d, 0x2a03: 0x000d, 0x2a04: 0x000d, 0x2a05: 0x000d,\n\t0x2a06: 0x000c, 0x2a07: 0x000c, 0x2a08: 0x000c, 0x2a09: 0x000c, 0x2a0a: 0x000c, 0x2a0b: 0x000c,\n\t0x2a0c: 0x000c, 0x2a0d: 0x000c, 0x2a0e: 0x000c, 0x2a0f: 0x000c, 0x2a10: 0x000c, 0x2a11: 0x000d,\n\t0x2a12: 0x000d, 0x2a13: 0x000d, 0x2a14: 0x000d, 0x2a15: 0x000d, 0x2a16: 0x000d, 0x2a17: 0x000d,\n\t0x2a18: 0x000d, 0x2a19: 0x000d, 0x2a1a: 0x0001, 0x2a1b: 0x0001, 0x2a1c: 0x0001, 0x2a1d: 0x0001,\n\t0x2a1e: 0x0001, 0x2a1f: 0x0001, 0x2a20: 0x0001, 0x2a21: 0x0001, 0x2a22: 0x0001, 0x2a23: 0x0001,\n\t0x2a24: 0x0001, 0x2a25: 0x0001, 0x2a26: 0x0001, 0x2a27: 0x0001, 0x2a28: 0x0001, 0x2a29: 0x0001,\n\t0x2a2a: 0x0001, 0x2a2b: 0x0001, 0x2a2c: 0x0001, 0x2a2d: 0x0001, 0x2a2e: 0x0001, 0x2a2f: 0x0001,\n\t0x2a30: 0x0001, 0x2a31: 0x0001, 0x2a32: 0x0001, 0x2a33: 0x0001, 0x2a34: 0x0001, 0x2a35: 0x0001,\n\t0x2a36: 0x0001, 0x2a37: 0x0001, 0x2a38: 0x0001, 0x2a39: 0x0001, 0x2a3a: 0x0001, 0x2a3b: 0x0001,\n\t0x2a3c: 0x0001, 0x2a3d: 0x0001, 0x2a3e: 0x0001, 0x2a3f: 0x0001,\n\t// Block 0xa9, offset 0x2a40\n\t0x2a40: 0x0001, 0x2a41: 0x0001, 0x2a42: 0x000c, 0x2a43: 0x000c, 0x2a44: 0x000c, 0x2a45: 0x000c,\n\t0x2a46: 0x0001, 0x2a47: 0x0001, 0x2a48: 0x0001, 0x2a49: 0x0001, 0x2a4a: 0x0001, 0x2a4b: 0x0001,\n\t0x2a4c: 0x0001, 0x2a4d: 0x0001, 0x2a4e: 0x0001, 0x2a4f: 0x0001, 0x2a50: 0x0001, 0x2a51: 0x0001,\n\t0x2a52: 0x0001, 0x2a53: 0x0001, 0x2a54: 0x0001, 0x2a55: 0x0001, 0x2a56: 0x0001, 0x2a57: 0x0001,\n\t0x2a58: 0x0001, 0x2a59: 0x0001, 0x2a5a: 0x0001, 0x2a5b: 0x0001, 0x2a5c: 0x0001, 0x2a5d: 0x0001,\n\t0x2a5e: 0x0001, 0x2a5f: 0x0001, 0x2a60: 0x0001, 0x2a61: 0x0001, 0x2a62: 0x0001, 0x2a63: 0x0001,\n\t0x2a64: 0x0001, 0x2a65: 0x0001, 0x2a66: 0x0001, 0x2a67: 0x0001, 0x2a68: 0x0001, 0x2a69: 0x0001,\n\t0x2a6a: 0x0001, 0x2a6b: 0x0001, 0x2a6c: 0x0001, 0x2a6d: 0x0001, 0x2a6e: 0x0001, 0x2a6f: 0x0001,\n\t0x2a70: 0x0001, 0x2a71: 0x0001, 0x2a72: 0x0001, 0x2a73: 0x0001, 0x2a74: 0x0001, 0x2a75: 0x0001,\n\t0x2a76: 0x0001, 0x2a77: 0x0001, 0x2a78: 0x0001, 0x2a79: 0x0001, 0x2a7a: 0x0001, 0x2a7b: 0x0001,\n\t0x2a7c: 0x0001, 0x2a7d: 0x0001, 0x2a7e: 0x0001, 0x2a7f: 0x0001,\n\t// Block 0xaa, offset 0x2a80\n\t0x2a81: 0x000c,\n\t0x2ab8: 0x000c, 0x2ab9: 0x000c, 0x2aba: 0x000c, 0x2abb: 0x000c,\n\t0x2abc: 0x000c, 0x2abd: 0x000c, 0x2abe: 0x000c, 0x2abf: 0x000c,\n\t// Block 0xab, offset 0x2ac0\n\t0x2ac0: 0x000c, 0x2ac1: 0x000c, 0x2ac2: 0x000c, 0x2ac3: 0x000c, 0x2ac4: 0x000c, 0x2ac5: 0x000c,\n\t0x2ac6: 0x000c,\n\t0x2ad2: 0x000a, 0x2ad3: 0x000a, 0x2ad4: 0x000a, 0x2ad5: 0x000a, 0x2ad6: 0x000a, 0x2ad7: 0x000a,\n\t0x2ad8: 0x000a, 0x2ad9: 0x000a, 0x2ada: 0x000a, 0x2adb: 0x000a, 0x2adc: 0x000a, 0x2add: 0x000a,\n\t0x2ade: 0x000a, 0x2adf: 0x000a, 0x2ae0: 0x000a, 0x2ae1: 0x000a, 0x2ae2: 0x000a, 0x2ae3: 0x000a,\n\t0x2ae4: 0x000a, 0x2ae5: 0x000a,\n\t0x2af0: 0x000c, 0x2af3: 0x000c, 0x2af4: 0x000c,\n\t0x2aff: 0x000c,\n\t// Block 0xac, offset 0x2b00\n\t0x2b00: 0x000c, 0x2b01: 0x000c,\n\t0x2b33: 0x000c, 0x2b34: 0x000c, 0x2b35: 0x000c,\n\t0x2b36: 0x000c, 0x2b39: 0x000c, 0x2b3a: 0x000c,\n\t// Block 0xad, offset 0x2b40\n\t0x2b40: 0x000c, 0x2b41: 0x000c, 0x2b42: 0x000c,\n\t0x2b67: 0x000c, 0x2b68: 0x000c, 0x2b69: 0x000c,\n\t0x2b6a: 0x000c, 0x2b6b: 0x000c, 0x2b6d: 0x000c, 0x2b6e: 0x000c, 0x2b6f: 0x000c,\n\t0x2b70: 0x000c, 0x2b71: 0x000c, 0x2b72: 0x000c, 0x2b73: 0x000c, 0x2b74: 0x000c,\n\t// Block 0xae, offset 0x2b80\n\t0x2bb3: 0x000c,\n\t// Block 0xaf, offset 0x2bc0\n\t0x2bc0: 0x000c, 0x2bc1: 0x000c,\n\t0x2bf6: 0x000c, 0x2bf7: 0x000c, 0x2bf8: 0x000c, 0x2bf9: 0x000c, 0x2bfa: 0x000c, 0x2bfb: 0x000c,\n\t0x2bfc: 0x000c, 0x2bfd: 0x000c, 0x2bfe: 0x000c,\n\t// Block 0xb0, offset 0x2c00\n\t0x2c09: 0x000c, 0x2c0a: 0x000c, 0x2c0b: 0x000c,\n\t0x2c0c: 0x000c, 0x2c0f: 0x000c,\n\t// Block 0xb1, offset 0x2c40\n\t0x2c6f: 0x000c,\n\t0x2c70: 0x000c, 0x2c71: 0x000c, 0x2c74: 0x000c,\n\t0x2c76: 0x000c, 0x2c77: 0x000c,\n\t0x2c7e: 0x000c,\n\t// Block 0xb2, offset 0x2c80\n\t0x2c9f: 0x000c, 0x2ca3: 0x000c,\n\t0x2ca4: 0x000c, 0x2ca5: 0x000c, 0x2ca6: 0x000c, 0x2ca7: 0x000c, 0x2ca8: 0x000c, 0x2ca9: 0x000c,\n\t0x2caa: 0x000c,\n\t// Block 0xb3, offset 0x2cc0\n\t0x2cc0: 0x000c,\n\t0x2ce6: 0x000c, 0x2ce7: 0x000c, 0x2ce8: 0x000c, 0x2ce9: 0x000c,\n\t0x2cea: 0x000c, 0x2ceb: 0x000c, 0x2cec: 0x000c,\n\t0x2cf0: 0x000c, 0x2cf1: 0x000c, 0x2cf2: 0x000c, 0x2cf3: 0x000c, 0x2cf4: 0x000c,\n\t// Block 0xb4, offset 0x2d00\n\t0x2d38: 0x000c, 0x2d39: 0x000c, 0x2d3a: 0x000c, 0x2d3b: 0x000c,\n\t0x2d3c: 0x000c, 0x2d3d: 0x000c, 0x2d3e: 0x000c, 0x2d3f: 0x000c,\n\t// Block 0xb5, offset 0x2d40\n\t0x2d42: 0x000c, 0x2d43: 0x000c, 0x2d44: 0x000c,\n\t0x2d46: 0x000c,\n\t0x2d5e: 0x000c,\n\t// Block 0xb6, offset 0x2d80\n\t0x2db3: 0x000c, 0x2db4: 0x000c, 0x2db5: 0x000c,\n\t0x2db6: 0x000c, 0x2db7: 0x000c, 0x2db8: 0x000c, 0x2dba: 0x000c,\n\t0x2dbf: 0x000c,\n\t// Block 0xb7, offset 0x2dc0\n\t0x2dc0: 0x000c, 0x2dc2: 0x000c, 0x2dc3: 0x000c,\n\t// Block 0xb8, offset 0x2e00\n\t0x2e32: 0x000c, 0x2e33: 0x000c, 0x2e34: 0x000c, 0x2e35: 0x000c,\n\t0x2e3c: 0x000c, 0x2e3d: 0x000c, 0x2e3f: 0x000c,\n\t// Block 0xb9, offset 0x2e40\n\t0x2e40: 0x000c,\n\t0x2e5c: 0x000c, 0x2e5d: 0x000c,\n\t// Block 0xba, offset 0x2e80\n\t0x2eb3: 0x000c, 0x2eb4: 0x000c, 0x2eb5: 0x000c,\n\t0x2eb6: 0x000c, 0x2eb7: 0x000c, 0x2eb8: 0x000c, 0x2eb9: 0x000c, 0x2eba: 0x000c,\n\t0x2ebd: 0x000c, 0x2ebf: 0x000c,\n\t// Block 0xbb, offset 0x2ec0\n\t0x2ec0: 0x000c,\n\t0x2ee0: 0x000a, 0x2ee1: 0x000a, 0x2ee2: 0x000a, 0x2ee3: 0x000a,\n\t0x2ee4: 0x000a, 0x2ee5: 0x000a, 0x2ee6: 0x000a, 0x2ee7: 0x000a, 0x2ee8: 0x000a, 0x2ee9: 0x000a,\n\t0x2eea: 0x000a, 0x2eeb: 0x000a, 0x2eec: 0x000a,\n\t// Block 0xbc, offset 0x2f00\n\t0x2f2b: 0x000c, 0x2f2d: 0x000c,\n\t0x2f30: 0x000c, 0x2f31: 0x000c, 0x2f32: 0x000c, 0x2f33: 0x000c, 0x2f34: 0x000c, 0x2f35: 0x000c,\n\t0x2f37: 0x000c,\n\t// Block 0xbd, offset 0x2f40\n\t0x2f5d: 0x000c,\n\t0x2f5e: 0x000c, 0x2f5f: 0x000c, 0x2f62: 0x000c, 0x2f63: 0x000c,\n\t0x2f64: 0x000c, 0x2f65: 0x000c, 0x2f67: 0x000c, 0x2f68: 0x000c, 0x2f69: 0x000c,\n\t0x2f6a: 0x000c, 0x2f6b: 0x000c,\n\t// Block 0xbe, offset 0x2f80\n\t0x2faf: 0x000c,\n\t0x2fb0: 0x000c, 0x2fb1: 0x000c, 0x2fb2: 0x000c, 0x2fb3: 0x000c, 0x2fb4: 0x000c, 0x2fb5: 0x000c,\n\t0x2fb6: 0x000c, 0x2fb7: 0x000c, 0x2fb9: 0x000c, 0x2fba: 0x000c,\n\t// Block 0xbf, offset 0x2fc0\n\t0x2ffb: 0x000c,\n\t0x2ffc: 0x000c, 0x2ffe: 0x000c,\n\t// Block 0xc0, offset 0x3000\n\t0x3003: 0x000c,\n\t// Block 0xc1, offset 0x3040\n\t0x3054: 0x000c, 0x3055: 0x000c, 0x3056: 0x000c, 0x3057: 0x000c,\n\t0x305a: 0x000c, 0x305b: 0x000c,\n\t0x3060: 0x000c,\n\t// Block 0xc2, offset 0x3080\n\t0x3081: 0x000c, 0x3082: 0x000c, 0x3083: 0x000c, 0x3084: 0x000c, 0x3085: 0x000c,\n\t0x3086: 0x000c, 0x3089: 0x000c, 0x308a: 0x000c,\n\t0x30b3: 0x000c, 0x30b4: 0x000c, 0x30b5: 0x000c,\n\t0x30b6: 0x000c, 0x30b7: 0x000c, 0x30b8: 0x000c, 0x30bb: 0x000c,\n\t0x30bc: 0x000c, 0x30bd: 0x000c, 0x30be: 0x000c,\n\t// Block 0xc3, offset 0x30c0\n\t0x30c7: 0x000c,\n\t0x30d1: 0x000c,\n\t0x30d2: 0x000c, 0x30d3: 0x000c, 0x30d4: 0x000c, 0x30d5: 0x000c, 0x30d6: 0x000c,\n\t0x30d9: 0x000c, 0x30da: 0x000c, 0x30db: 0x000c,\n\t// Block 0xc4, offset 0x3100\n\t0x310a: 0x000c, 0x310b: 0x000c,\n\t0x310c: 0x000c, 0x310d: 0x000c, 0x310e: 0x000c, 0x310f: 0x000c, 0x3110: 0x000c, 0x3111: 0x000c,\n\t0x3112: 0x000c, 0x3113: 0x000c, 0x3114: 0x000c, 0x3115: 0x000c, 0x3116: 0x000c,\n\t0x3118: 0x000c, 0x3119: 0x000c,\n\t// Block 0xc5, offset 0x3140\n\t0x3170: 0x000c, 0x3171: 0x000c, 0x3172: 0x000c, 0x3173: 0x000c, 0x3174: 0x000c, 0x3175: 0x000c,\n\t0x3176: 0x000c, 0x3178: 0x000c, 0x3179: 0x000c, 0x317a: 0x000c, 0x317b: 0x000c,\n\t0x317c: 0x000c, 0x317d: 0x000c,\n\t// Block 0xc6, offset 0x3180\n\t0x3192: 0x000c, 0x3193: 0x000c, 0x3194: 0x000c, 0x3195: 0x000c, 0x3196: 0x000c, 0x3197: 0x000c,\n\t0x3198: 0x000c, 0x3199: 0x000c, 0x319a: 0x000c, 0x319b: 0x000c, 0x319c: 0x000c, 0x319d: 0x000c,\n\t0x319e: 0x000c, 0x319f: 0x000c, 0x31a0: 0x000c, 0x31a1: 0x000c, 0x31a2: 0x000c, 0x31a3: 0x000c,\n\t0x31a4: 0x000c, 0x31a5: 0x000c, 0x31a6: 0x000c, 0x31a7: 0x000c,\n\t0x31aa: 0x000c, 0x31ab: 0x000c, 0x31ac: 0x000c, 0x31ad: 0x000c, 0x31ae: 0x000c, 0x31af: 0x000c,\n\t0x31b0: 0x000c, 0x31b2: 0x000c, 0x31b3: 0x000c, 0x31b5: 0x000c,\n\t0x31b6: 0x000c,\n\t// Block 0xc7, offset 0x31c0\n\t0x31f1: 0x000c, 0x31f2: 0x000c, 0x31f3: 0x000c, 0x31f4: 0x000c, 0x31f5: 0x000c,\n\t0x31f6: 0x000c, 0x31fa: 0x000c,\n\t0x31fc: 0x000c, 0x31fd: 0x000c, 0x31ff: 0x000c,\n\t// Block 0xc8, offset 0x3200\n\t0x3200: 0x000c, 0x3201: 0x000c, 0x3202: 0x000c, 0x3203: 0x000c, 0x3204: 0x000c, 0x3205: 0x000c,\n\t0x3207: 0x000c,\n\t// Block 0xc9, offset 0x3240\n\t0x3250: 0x000c, 0x3251: 0x000c,\n\t0x3255: 0x000c, 0x3257: 0x000c,\n\t// Block 0xca, offset 0x3280\n\t0x32b3: 0x000c, 0x32b4: 0x000c,\n\t// Block 0xcb, offset 0x32c0\n\t0x32c0: 0x000c, 0x32c1: 0x000c,\n\t0x32f6: 0x000c, 0x32f7: 0x000c, 0x32f8: 0x000c, 0x32f9: 0x000c, 0x32fa: 0x000c,\n\t// Block 0xcc, offset 0x3300\n\t0x3300: 0x000c, 0x3302: 0x000c,\n\t// Block 0xcd, offset 0x3340\n\t0x3355: 0x000a, 0x3356: 0x000a, 0x3357: 0x000a,\n\t0x3358: 0x000a, 0x3359: 0x000a, 0x335a: 0x000a, 0x335b: 0x000a, 0x335c: 0x000a, 0x335d: 0x0004,\n\t0x335e: 0x0004, 0x335f: 0x0004, 0x3360: 0x0004, 0x3361: 0x000a, 0x3362: 0x000a, 0x3363: 0x000a,\n\t0x3364: 0x000a, 0x3365: 0x000a, 0x3366: 0x000a, 0x3367: 0x000a, 0x3368: 0x000a, 0x3369: 0x000a,\n\t0x336a: 0x000a, 0x336b: 0x000a, 0x336c: 0x000a, 0x336d: 0x000a, 0x336e: 0x000a, 0x336f: 0x000a,\n\t0x3370: 0x000a, 0x3371: 0x000a,\n\t// Block 0xce, offset 0x3380\n\t0x3380: 0x000c,\n\t0x3387: 0x000c, 0x3388: 0x000c, 0x3389: 0x000c, 0x338a: 0x000c, 0x338b: 0x000c,\n\t0x338c: 0x000c, 0x338d: 0x000c, 0x338e: 0x000c, 0x338f: 0x000c, 0x3390: 0x000c, 0x3391: 0x000c,\n\t0x3392: 0x000c, 0x3393: 0x000c, 0x3394: 0x000c, 0x3395: 0x000c,\n\t// Block 0xcf, offset 0x33c0\n\t0x33f0: 0x000c, 0x33f1: 0x000c, 0x33f2: 0x000c, 0x33f3: 0x000c, 0x33f4: 0x000c,\n\t// Block 0xd0, offset 0x3400\n\t0x3430: 0x000c, 0x3431: 0x000c, 0x3432: 0x000c, 0x3433: 0x000c, 0x3434: 0x000c, 0x3435: 0x000c,\n\t0x3436: 0x000c,\n\t// Block 0xd1, offset 0x3440\n\t0x344f: 0x000c,\n\t// Block 0xd2, offset 0x3480\n\t0x348f: 0x000c, 0x3490: 0x000c, 0x3491: 0x000c,\n\t0x3492: 0x000c,\n\t// Block 0xd3, offset 0x34c0\n\t0x34e2: 0x000a,\n\t0x34e4: 0x000c,\n\t// Block 0xd4, offset 0x3500\n\t0x351d: 0x000c,\n\t0x351e: 0x000c, 0x3520: 0x000b, 0x3521: 0x000b, 0x3522: 0x000b, 0x3523: 0x000b,\n\t// Block 0xd5, offset 0x3540\n\t0x3540: 0x000c, 0x3541: 0x000c, 0x3542: 0x000c, 0x3543: 0x000c, 0x3544: 0x000c, 0x3545: 0x000c,\n\t0x3546: 0x000c, 0x3547: 0x000c, 0x3548: 0x000c, 0x3549: 0x000c, 0x354a: 0x000c, 0x354b: 0x000c,\n\t0x354c: 0x000c, 0x354d: 0x000c, 0x354e: 0x000c, 0x354f: 0x000c, 0x3550: 0x000c, 0x3551: 0x000c,\n\t0x3552: 0x000c, 0x3553: 0x000c, 0x3554: 0x000c, 0x3555: 0x000c, 0x3556: 0x000c, 0x3557: 0x000c,\n\t0x3558: 0x000c, 0x3559: 0x000c, 0x355a: 0x000c, 0x355b: 0x000c, 0x355c: 0x000c, 0x355d: 0x000c,\n\t0x355e: 0x000c, 0x355f: 0x000c, 0x3560: 0x000c, 0x3561: 0x000c, 0x3562: 0x000c, 0x3563: 0x000c,\n\t0x3564: 0x000c, 0x3565: 0x000c, 0x3566: 0x000c, 0x3567: 0x000c, 0x3568: 0x000c, 0x3569: 0x000c,\n\t0x356a: 0x000c, 0x356b: 0x000c, 0x356c: 0x000c, 0x356d: 0x000c,\n\t0x3570: 0x000c, 0x3571: 0x000c, 0x3572: 0x000c, 0x3573: 0x000c, 0x3574: 0x000c, 0x3575: 0x000c,\n\t0x3576: 0x000c, 0x3577: 0x000c, 0x3578: 0x000c, 0x3579: 0x000c, 0x357a: 0x000c, 0x357b: 0x000c,\n\t0x357c: 0x000c, 0x357d: 0x000c, 0x357e: 0x000c, 0x357f: 0x000c,\n\t// Block 0xd6, offset 0x3580\n\t0x3580: 0x000c, 0x3581: 0x000c, 0x3582: 0x000c, 0x3583: 0x000c, 0x3584: 0x000c, 0x3585: 0x000c,\n\t0x3586: 0x000c,\n\t// Block 0xd7, offset 0x35c0\n\t0x35e7: 0x000c, 0x35e8: 0x000c, 0x35e9: 0x000c,\n\t0x35f3: 0x000b, 0x35f4: 0x000b, 0x35f5: 0x000b,\n\t0x35f6: 0x000b, 0x35f7: 0x000b, 0x35f8: 0x000b, 0x35f9: 0x000b, 0x35fa: 0x000b, 0x35fb: 0x000c,\n\t0x35fc: 0x000c, 0x35fd: 0x000c, 0x35fe: 0x000c, 0x35ff: 0x000c,\n\t// Block 0xd8, offset 0x3600\n\t0x3600: 0x000c, 0x3601: 0x000c, 0x3602: 0x000c, 0x3605: 0x000c,\n\t0x3606: 0x000c, 0x3607: 0x000c, 0x3608: 0x000c, 0x3609: 0x000c, 0x360a: 0x000c, 0x360b: 0x000c,\n\t0x362a: 0x000c, 0x362b: 0x000c, 0x362c: 0x000c, 0x362d: 0x000c,\n\t// Block 0xd9, offset 0x3640\n\t0x3669: 0x000a,\n\t0x366a: 0x000a,\n\t// Block 0xda, offset 0x3680\n\t0x3680: 0x000a, 0x3681: 0x000a, 0x3682: 0x000c, 0x3683: 0x000c, 0x3684: 0x000c, 0x3685: 0x000a,\n\t// Block 0xdb, offset 0x36c0\n\t0x36c0: 0x000a, 0x36c1: 0x000a, 0x36c2: 0x000a, 0x36c3: 0x000a, 0x36c4: 0x000a, 0x36c5: 0x000a,\n\t0x36c6: 0x000a, 0x36c7: 0x000a, 0x36c8: 0x000a, 0x36c9: 0x000a, 0x36ca: 0x000a, 0x36cb: 0x000a,\n\t0x36cc: 0x000a, 0x36cd: 0x000a, 0x36ce: 0x000a, 0x36cf: 0x000a, 0x36d0: 0x000a, 0x36d1: 0x000a,\n\t0x36d2: 0x000a, 0x36d3: 0x000a, 0x36d4: 0x000a, 0x36d5: 0x000a, 0x36d6: 0x000a,\n\t// Block 0xdc, offset 0x3700\n\t0x371b: 0x000a,\n\t// Block 0xdd, offset 0x3740\n\t0x3755: 0x000a,\n\t// Block 0xde, offset 0x3780\n\t0x378f: 0x000a,\n\t// Block 0xdf, offset 0x37c0\n\t0x37c9: 0x000a,\n\t// Block 0xe0, offset 0x3800\n\t0x3803: 0x000a,\n\t0x380e: 0x0002, 0x380f: 0x0002, 0x3810: 0x0002, 0x3811: 0x0002,\n\t0x3812: 0x0002, 0x3813: 0x0002, 0x3814: 0x0002, 0x3815: 0x0002, 0x3816: 0x0002, 0x3817: 0x0002,\n\t0x3818: 0x0002, 0x3819: 0x0002, 0x381a: 0x0002, 0x381b: 0x0002, 0x381c: 0x0002, 0x381d: 0x0002,\n\t0x381e: 0x0002, 0x381f: 0x0002, 0x3820: 0x0002, 0x3821: 0x0002, 0x3822: 0x0002, 0x3823: 0x0002,\n\t0x3824: 0x0002, 0x3825: 0x0002, 0x3826: 0x0002, 0x3827: 0x0002, 0x3828: 0x0002, 0x3829: 0x0002,\n\t0x382a: 0x0002, 0x382b: 0x0002, 0x382c: 0x0002, 0x382d: 0x0002, 0x382e: 0x0002, 0x382f: 0x0002,\n\t0x3830: 0x0002, 0x3831: 0x0002, 0x3832: 0x0002, 0x3833: 0x0002, 0x3834: 0x0002, 0x3835: 0x0002,\n\t0x3836: 0x0002, 0x3837: 0x0002, 0x3838: 0x0002, 0x3839: 0x0002, 0x383a: 0x0002, 0x383b: 0x0002,\n\t0x383c: 0x0002, 0x383d: 0x0002, 0x383e: 0x0002, 0x383f: 0x0002,\n\t// Block 0xe1, offset 0x3840\n\t0x3840: 0x000c, 0x3841: 0x000c, 0x3842: 0x000c, 0x3843: 0x000c, 0x3844: 0x000c, 0x3845: 0x000c,\n\t0x3846: 0x000c, 0x3847: 0x000c, 0x3848: 0x000c, 0x3849: 0x000c, 0x384a: 0x000c, 0x384b: 0x000c,\n\t0x384c: 0x000c, 0x384d: 0x000c, 0x384e: 0x000c, 0x384f: 0x000c, 0x3850: 0x000c, 0x3851: 0x000c,\n\t0x3852: 0x000c, 0x3853: 0x000c, 0x3854: 0x000c, 0x3855: 0x000c, 0x3856: 0x000c, 0x3857: 0x000c,\n\t0x3858: 0x000c, 0x3859: 0x000c, 0x385a: 0x000c, 0x385b: 0x000c, 0x385c: 0x000c, 0x385d: 0x000c,\n\t0x385e: 0x000c, 0x385f: 0x000c, 0x3860: 0x000c, 0x3861: 0x000c, 0x3862: 0x000c, 0x3863: 0x000c,\n\t0x3864: 0x000c, 0x3865: 0x000c, 0x3866: 0x000c, 0x3867: 0x000c, 0x3868: 0x000c, 0x3869: 0x000c,\n\t0x386a: 0x000c, 0x386b: 0x000c, 0x386c: 0x000c, 0x386d: 0x000c, 0x386e: 0x000c, 0x386f: 0x000c,\n\t0x3870: 0x000c, 0x3871: 0x000c, 0x3872: 0x000c, 0x3873: 0x000c, 0x3874: 0x000c, 0x3875: 0x000c,\n\t0x3876: 0x000c, 0x387b: 0x000c,\n\t0x387c: 0x000c, 0x387d: 0x000c, 0x387e: 0x000c, 0x387f: 0x000c,\n\t// Block 0xe2, offset 0x3880\n\t0x3880: 0x000c, 0x3881: 0x000c, 0x3882: 0x000c, 0x3883: 0x000c, 0x3884: 0x000c, 0x3885: 0x000c,\n\t0x3886: 0x000c, 0x3887: 0x000c, 0x3888: 0x000c, 0x3889: 0x000c, 0x388a: 0x000c, 0x388b: 0x000c,\n\t0x388c: 0x000c, 0x388d: 0x000c, 0x388e: 0x000c, 0x388f: 0x000c, 0x3890: 0x000c, 0x3891: 0x000c,\n\t0x3892: 0x000c, 0x3893: 0x000c, 0x3894: 0x000c, 0x3895: 0x000c, 0x3896: 0x000c, 0x3897: 0x000c,\n\t0x3898: 0x000c, 0x3899: 0x000c, 0x389a: 0x000c, 0x389b: 0x000c, 0x389c: 0x000c, 0x389d: 0x000c,\n\t0x389e: 0x000c, 0x389f: 0x000c, 0x38a0: 0x000c, 0x38a1: 0x000c, 0x38a2: 0x000c, 0x38a3: 0x000c,\n\t0x38a4: 0x000c, 0x38a5: 0x000c, 0x38a6: 0x000c, 0x38a7: 0x000c, 0x38a8: 0x000c, 0x38a9: 0x000c,\n\t0x38aa: 0x000c, 0x38ab: 0x000c, 0x38ac: 0x000c,\n\t0x38b5: 0x000c,\n\t// Block 0xe3, offset 0x38c0\n\t0x38c4: 0x000c,\n\t0x38db: 0x000c, 0x38dc: 0x000c, 0x38dd: 0x000c,\n\t0x38de: 0x000c, 0x38df: 0x000c, 0x38e1: 0x000c, 0x38e2: 0x000c, 0x38e3: 0x000c,\n\t0x38e4: 0x000c, 0x38e5: 0x000c, 0x38e6: 0x000c, 0x38e7: 0x000c, 0x38e8: 0x000c, 0x38e9: 0x000c,\n\t0x38ea: 0x000c, 0x38eb: 0x000c, 0x38ec: 0x000c, 0x38ed: 0x000c, 0x38ee: 0x000c, 0x38ef: 0x000c,\n\t// Block 0xe4, offset 0x3900\n\t0x3900: 0x000c, 0x3901: 0x000c, 0x3902: 0x000c, 0x3903: 0x000c, 0x3904: 0x000c, 0x3905: 0x000c,\n\t0x3906: 0x000c, 0x3908: 0x000c, 0x3909: 0x000c, 0x390a: 0x000c, 0x390b: 0x000c,\n\t0x390c: 0x000c, 0x390d: 0x000c, 0x390e: 0x000c, 0x390f: 0x000c, 0x3910: 0x000c, 0x3911: 0x000c,\n\t0x3912: 0x000c, 0x3913: 0x000c, 0x3914: 0x000c, 0x3915: 0x000c, 0x3916: 0x000c, 0x3917: 0x000c,\n\t0x3918: 0x000c, 0x391b: 0x000c, 0x391c: 0x000c, 0x391d: 0x000c,\n\t0x391e: 0x000c, 0x391f: 0x000c, 0x3920: 0x000c, 0x3921: 0x000c, 0x3923: 0x000c,\n\t0x3924: 0x000c, 0x3926: 0x000c, 0x3927: 0x000c, 0x3928: 0x000c, 0x3929: 0x000c,\n\t0x392a: 0x000c,\n\t// Block 0xe5, offset 0x3940\n\t0x396e: 0x000c,\n\t// Block 0xe6, offset 0x3980\n\t0x39ac: 0x000c, 0x39ad: 0x000c, 0x39ae: 0x000c, 0x39af: 0x000c,\n\t0x39bf: 0x0004,\n\t// Block 0xe7, offset 0x39c0\n\t0x39ec: 0x000c, 0x39ed: 0x000c, 0x39ee: 0x000c, 0x39ef: 0x000c,\n\t// Block 0xe8, offset 0x3a00\n\t0x3a00: 0x0001, 0x3a01: 0x0001, 0x3a02: 0x0001, 0x3a03: 0x0001, 0x3a04: 0x0001, 0x3a05: 0x0001,\n\t0x3a06: 0x0001, 0x3a07: 0x0001, 0x3a08: 0x0001, 0x3a09: 0x0001, 0x3a0a: 0x0001, 0x3a0b: 0x0001,\n\t0x3a0c: 0x0001, 0x3a0d: 0x0001, 0x3a0e: 0x0001, 0x3a0f: 0x0001, 0x3a10: 0x000c, 0x3a11: 0x000c,\n\t0x3a12: 0x000c, 0x3a13: 0x000c, 0x3a14: 0x000c, 0x3a15: 0x000c, 0x3a16: 0x000c, 0x3a17: 0x0001,\n\t0x3a18: 0x0001, 0x3a19: 0x0001, 0x3a1a: 0x0001, 0x3a1b: 0x0001, 0x3a1c: 0x0001, 0x3a1d: 0x0001,\n\t0x3a1e: 0x0001, 0x3a1f: 0x0001, 0x3a20: 0x0001, 0x3a21: 0x0001, 0x3a22: 0x0001, 0x3a23: 0x0001,\n\t0x3a24: 0x0001, 0x3a25: 0x0001, 0x3a26: 0x0001, 0x3a27: 0x0001, 0x3a28: 0x0001, 0x3a29: 0x0001,\n\t0x3a2a: 0x0001, 0x3a2b: 0x0001, 0x3a2c: 0x0001, 0x3a2d: 0x0001, 0x3a2e: 0x0001, 0x3a2f: 0x0001,\n\t0x3a30: 0x0001, 0x3a31: 0x0001, 0x3a32: 0x0001, 0x3a33: 0x0001, 0x3a34: 0x0001, 0x3a35: 0x0001,\n\t0x3a36: 0x0001, 0x3a37: 0x0001, 0x3a38: 0x0001, 0x3a39: 0x0001, 0x3a3a: 0x0001, 0x3a3b: 0x0001,\n\t0x3a3c: 0x0001, 0x3a3d: 0x0001, 0x3a3e: 0x0001, 0x3a3f: 0x0001,\n\t// Block 0xe9, offset 0x3a40\n\t0x3a40: 0x0001, 0x3a41: 0x0001, 0x3a42: 0x0001, 0x3a43: 0x0001, 0x3a44: 0x000c, 0x3a45: 0x000c,\n\t0x3a46: 0x000c, 0x3a47: 0x000c, 0x3a48: 0x000c, 0x3a49: 0x000c, 0x3a4a: 0x000c, 0x3a4b: 0x0001,\n\t0x3a4c: 0x0001, 0x3a4d: 0x0001, 0x3a4e: 0x0001, 0x3a4f: 0x0001, 0x3a50: 0x0001, 0x3a51: 0x0001,\n\t0x3a52: 0x0001, 0x3a53: 0x0001, 0x3a54: 0x0001, 0x3a55: 0x0001, 0x3a56: 0x0001, 0x3a57: 0x0001,\n\t0x3a58: 0x0001, 0x3a59: 0x0001, 0x3a5a: 0x0001, 0x3a5b: 0x0001, 0x3a5c: 0x0001, 0x3a5d: 0x0001,\n\t0x3a5e: 0x0001, 0x3a5f: 0x0001, 0x3a60: 0x0001, 0x3a61: 0x0001, 0x3a62: 0x0001, 0x3a63: 0x0001,\n\t0x3a64: 0x0001, 0x3a65: 0x0001, 0x3a66: 0x0001, 0x3a67: 0x0001, 0x3a68: 0x0001, 0x3a69: 0x0001,\n\t0x3a6a: 0x0001, 0x3a6b: 0x0001, 0x3a6c: 0x0001, 0x3a6d: 0x0001, 0x3a6e: 0x0001, 0x3a6f: 0x0001,\n\t0x3a70: 0x0001, 0x3a71: 0x0001, 0x3a72: 0x0001, 0x3a73: 0x0001, 0x3a74: 0x0001, 0x3a75: 0x0001,\n\t0x3a76: 0x0001, 0x3a77: 0x0001, 0x3a78: 0x0001, 0x3a79: 0x0001, 0x3a7a: 0x0001, 0x3a7b: 0x0001,\n\t0x3a7c: 0x0001, 0x3a7d: 0x0001, 0x3a7e: 0x0001, 0x3a7f: 0x0001,\n\t// Block 0xea, offset 0x3a80\n\t0x3a80: 0x0001, 0x3a81: 0x0001, 0x3a82: 0x0001, 0x3a83: 0x0001, 0x3a84: 0x0001, 0x3a85: 0x0001,\n\t0x3a86: 0x0001, 0x3a87: 0x0001, 0x3a88: 0x0001, 0x3a89: 0x0001, 0x3a8a: 0x0001, 0x3a8b: 0x0001,\n\t0x3a8c: 0x0001, 0x3a8d: 0x0001, 0x3a8e: 0x0001, 0x3a8f: 0x0001, 0x3a90: 0x0001, 0x3a91: 0x0001,\n\t0x3a92: 0x0001, 0x3a93: 0x0001, 0x3a94: 0x0001, 0x3a95: 0x0001, 0x3a96: 0x0001, 0x3a97: 0x0001,\n\t0x3a98: 0x0001, 0x3a99: 0x0001, 0x3a9a: 0x0001, 0x3a9b: 0x0001, 0x3a9c: 0x0001, 0x3a9d: 0x0001,\n\t0x3a9e: 0x0001, 0x3a9f: 0x0001, 0x3aa0: 0x0001, 0x3aa1: 0x0001, 0x3aa2: 0x0001, 0x3aa3: 0x0001,\n\t0x3aa4: 0x0001, 0x3aa5: 0x0001, 0x3aa6: 0x0001, 0x3aa7: 0x0001, 0x3aa8: 0x0001, 0x3aa9: 0x0001,\n\t0x3aaa: 0x0001, 0x3aab: 0x0001, 0x3aac: 0x0001, 0x3aad: 0x0001, 0x3aae: 0x0001, 0x3aaf: 0x0001,\n\t0x3ab0: 0x0001, 0x3ab1: 0x000d, 0x3ab2: 0x000d, 0x3ab3: 0x000d, 0x3ab4: 0x000d, 0x3ab5: 0x000d,\n\t0x3ab6: 0x000d, 0x3ab7: 0x000d, 0x3ab8: 0x000d, 0x3ab9: 0x000d, 0x3aba: 0x000d, 0x3abb: 0x000d,\n\t0x3abc: 0x000d, 0x3abd: 0x000d, 0x3abe: 0x000d, 0x3abf: 0x000d,\n\t// Block 0xeb, offset 0x3ac0\n\t0x3ac0: 0x000d, 0x3ac1: 0x000d, 0x3ac2: 0x000d, 0x3ac3: 0x000d, 0x3ac4: 0x000d, 0x3ac5: 0x000d,\n\t0x3ac6: 0x000d, 0x3ac7: 0x000d, 0x3ac8: 0x000d, 0x3ac9: 0x000d, 0x3aca: 0x000d, 0x3acb: 0x000d,\n\t0x3acc: 0x000d, 0x3acd: 0x000d, 0x3ace: 0x000d, 0x3acf: 0x000d, 0x3ad0: 0x000d, 0x3ad1: 0x000d,\n\t0x3ad2: 0x000d, 0x3ad3: 0x000d, 0x3ad4: 0x000d, 0x3ad5: 0x000d, 0x3ad6: 0x000d, 0x3ad7: 0x000d,\n\t0x3ad8: 0x000d, 0x3ad9: 0x000d, 0x3ada: 0x000d, 0x3adb: 0x000d, 0x3adc: 0x000d, 0x3add: 0x000d,\n\t0x3ade: 0x000d, 0x3adf: 0x000d, 0x3ae0: 0x000d, 0x3ae1: 0x000d, 0x3ae2: 0x000d, 0x3ae3: 0x000d,\n\t0x3ae4: 0x000d, 0x3ae5: 0x000d, 0x3ae6: 0x000d, 0x3ae7: 0x000d, 0x3ae8: 0x000d, 0x3ae9: 0x000d,\n\t0x3aea: 0x000d, 0x3aeb: 0x000d, 0x3aec: 0x000d, 0x3aed: 0x000d, 0x3aee: 0x000d, 0x3aef: 0x000d,\n\t0x3af0: 0x000d, 0x3af1: 0x000d, 0x3af2: 0x000d, 0x3af3: 0x000d, 0x3af4: 0x000d, 0x3af5: 0x0001,\n\t0x3af6: 0x0001, 0x3af7: 0x0001, 0x3af8: 0x0001, 0x3af9: 0x0001, 0x3afa: 0x0001, 0x3afb: 0x0001,\n\t0x3afc: 0x0001, 0x3afd: 0x0001, 0x3afe: 0x0001, 0x3aff: 0x0001,\n\t// Block 0xec, offset 0x3b00\n\t0x3b00: 0x0001, 0x3b01: 0x000d, 0x3b02: 0x000d, 0x3b03: 0x000d, 0x3b04: 0x000d, 0x3b05: 0x000d,\n\t0x3b06: 0x000d, 0x3b07: 0x000d, 0x3b08: 0x000d, 0x3b09: 0x000d, 0x3b0a: 0x000d, 0x3b0b: 0x000d,\n\t0x3b0c: 0x000d, 0x3b0d: 0x000d, 0x3b0e: 0x000d, 0x3b0f: 0x000d, 0x3b10: 0x000d, 0x3b11: 0x000d,\n\t0x3b12: 0x000d, 0x3b13: 0x000d, 0x3b14: 0x000d, 0x3b15: 0x000d, 0x3b16: 0x000d, 0x3b17: 0x000d,\n\t0x3b18: 0x000d, 0x3b19: 0x000d, 0x3b1a: 0x000d, 0x3b1b: 0x000d, 0x3b1c: 0x000d, 0x3b1d: 0x000d,\n\t0x3b1e: 0x000d, 0x3b1f: 0x000d, 0x3b20: 0x000d, 0x3b21: 0x000d, 0x3b22: 0x000d, 0x3b23: 0x000d,\n\t0x3b24: 0x000d, 0x3b25: 0x000d, 0x3b26: 0x000d, 0x3b27: 0x000d, 0x3b28: 0x000d, 0x3b29: 0x000d,\n\t0x3b2a: 0x000d, 0x3b2b: 0x000d, 0x3b2c: 0x000d, 0x3b2d: 0x000d, 0x3b2e: 0x000d, 0x3b2f: 0x000d,\n\t0x3b30: 0x000d, 0x3b31: 0x000d, 0x3b32: 0x000d, 0x3b33: 0x000d, 0x3b34: 0x000d, 0x3b35: 0x000d,\n\t0x3b36: 0x000d, 0x3b37: 0x000d, 0x3b38: 0x000d, 0x3b39: 0x000d, 0x3b3a: 0x000d, 0x3b3b: 0x000d,\n\t0x3b3c: 0x000d, 0x3b3d: 0x000d, 0x3b3e: 0x0001, 0x3b3f: 0x0001,\n\t// Block 0xed, offset 0x3b40\n\t0x3b40: 0x000d, 0x3b41: 0x000d, 0x3b42: 0x000d, 0x3b43: 0x000d, 0x3b44: 0x000d, 0x3b45: 0x000d,\n\t0x3b46: 0x000d, 0x3b47: 0x000d, 0x3b48: 0x000d, 0x3b49: 0x000d, 0x3b4a: 0x000d, 0x3b4b: 0x000d,\n\t0x3b4c: 0x000d, 0x3b4d: 0x000d, 0x3b4e: 0x000d, 0x3b4f: 0x000d, 0x3b50: 0x000d, 0x3b51: 0x000d,\n\t0x3b52: 0x000d, 0x3b53: 0x000d, 0x3b54: 0x000d, 0x3b55: 0x000d, 0x3b56: 0x000d, 0x3b57: 0x000d,\n\t0x3b58: 0x000d, 0x3b59: 0x000d, 0x3b5a: 0x000d, 0x3b5b: 0x000d, 0x3b5c: 0x000d, 0x3b5d: 0x000d,\n\t0x3b5e: 0x000d, 0x3b5f: 0x000d, 0x3b60: 0x000d, 0x3b61: 0x000d, 0x3b62: 0x000d, 0x3b63: 0x000d,\n\t0x3b64: 0x000d, 0x3b65: 0x000d, 0x3b66: 0x000d, 0x3b67: 0x000d, 0x3b68: 0x000d, 0x3b69: 0x000d,\n\t0x3b6a: 0x000d, 0x3b6b: 0x000d, 0x3b6c: 0x000d, 0x3b6d: 0x000d, 0x3b6e: 0x000d, 0x3b6f: 0x000d,\n\t0x3b70: 0x000a, 0x3b71: 0x000a, 0x3b72: 0x000d, 0x3b73: 0x000d, 0x3b74: 0x000d, 0x3b75: 0x000d,\n\t0x3b76: 0x000d, 0x3b77: 0x000d, 0x3b78: 0x000d, 0x3b79: 0x000d, 0x3b7a: 0x000d, 0x3b7b: 0x000d,\n\t0x3b7c: 0x000d, 0x3b7d: 0x000d, 0x3b7e: 0x000d, 0x3b7f: 0x000d,\n\t// Block 0xee, offset 0x3b80\n\t0x3b80: 0x000a, 0x3b81: 0x000a, 0x3b82: 0x000a, 0x3b83: 0x000a, 0x3b84: 0x000a, 0x3b85: 0x000a,\n\t0x3b86: 0x000a, 0x3b87: 0x000a, 0x3b88: 0x000a, 0x3b89: 0x000a, 0x3b8a: 0x000a, 0x3b8b: 0x000a,\n\t0x3b8c: 0x000a, 0x3b8d: 0x000a, 0x3b8e: 0x000a, 0x3b8f: 0x000a, 0x3b90: 0x000a, 0x3b91: 0x000a,\n\t0x3b92: 0x000a, 0x3b93: 0x000a, 0x3b94: 0x000a, 0x3b95: 0x000a, 0x3b96: 0x000a, 0x3b97: 0x000a,\n\t0x3b98: 0x000a, 0x3b99: 0x000a, 0x3b9a: 0x000a, 0x3b9b: 0x000a, 0x3b9c: 0x000a, 0x3b9d: 0x000a,\n\t0x3b9e: 0x000a, 0x3b9f: 0x000a, 0x3ba0: 0x000a, 0x3ba1: 0x000a, 0x3ba2: 0x000a, 0x3ba3: 0x000a,\n\t0x3ba4: 0x000a, 0x3ba5: 0x000a, 0x3ba6: 0x000a, 0x3ba7: 0x000a, 0x3ba8: 0x000a, 0x3ba9: 0x000a,\n\t0x3baa: 0x000a, 0x3bab: 0x000a,\n\t0x3bb0: 0x000a, 0x3bb1: 0x000a, 0x3bb2: 0x000a, 0x3bb3: 0x000a, 0x3bb4: 0x000a, 0x3bb5: 0x000a,\n\t0x3bb6: 0x000a, 0x3bb7: 0x000a, 0x3bb8: 0x000a, 0x3bb9: 0x000a, 0x3bba: 0x000a, 0x3bbb: 0x000a,\n\t0x3bbc: 0x000a, 0x3bbd: 0x000a, 0x3bbe: 0x000a, 0x3bbf: 0x000a,\n\t// Block 0xef, offset 0x3bc0\n\t0x3bc0: 0x000a, 0x3bc1: 0x000a, 0x3bc2: 0x000a, 0x3bc3: 0x000a, 0x3bc4: 0x000a, 0x3bc5: 0x000a,\n\t0x3bc6: 0x000a, 0x3bc7: 0x000a, 0x3bc8: 0x000a, 0x3bc9: 0x000a, 0x3bca: 0x000a, 0x3bcb: 0x000a,\n\t0x3bcc: 0x000a, 0x3bcd: 0x000a, 0x3bce: 0x000a, 0x3bcf: 0x000a, 0x3bd0: 0x000a, 0x3bd1: 0x000a,\n\t0x3bd2: 0x000a, 0x3bd3: 0x000a,\n\t0x3be0: 0x000a, 0x3be1: 0x000a, 0x3be2: 0x000a, 0x3be3: 0x000a,\n\t0x3be4: 0x000a, 0x3be5: 0x000a, 0x3be6: 0x000a, 0x3be7: 0x000a, 0x3be8: 0x000a, 0x3be9: 0x000a,\n\t0x3bea: 0x000a, 0x3beb: 0x000a, 0x3bec: 0x000a, 0x3bed: 0x000a, 0x3bee: 0x000a,\n\t0x3bf1: 0x000a, 0x3bf2: 0x000a, 0x3bf3: 0x000a, 0x3bf4: 0x000a, 0x3bf5: 0x000a,\n\t0x3bf6: 0x000a, 0x3bf7: 0x000a, 0x3bf8: 0x000a, 0x3bf9: 0x000a, 0x3bfa: 0x000a, 0x3bfb: 0x000a,\n\t0x3bfc: 0x000a, 0x3bfd: 0x000a, 0x3bfe: 0x000a, 0x3bff: 0x000a,\n\t// Block 0xf0, offset 0x3c00\n\t0x3c01: 0x000a, 0x3c02: 0x000a, 0x3c03: 0x000a, 0x3c04: 0x000a, 0x3c05: 0x000a,\n\t0x3c06: 0x000a, 0x3c07: 0x000a, 0x3c08: 0x000a, 0x3c09: 0x000a, 0x3c0a: 0x000a, 0x3c0b: 0x000a,\n\t0x3c0c: 0x000a, 0x3c0d: 0x000a, 0x3c0e: 0x000a, 0x3c0f: 0x000a, 0x3c11: 0x000a,\n\t0x3c12: 0x000a, 0x3c13: 0x000a, 0x3c14: 0x000a, 0x3c15: 0x000a, 0x3c16: 0x000a, 0x3c17: 0x000a,\n\t0x3c18: 0x000a, 0x3c19: 0x000a, 0x3c1a: 0x000a, 0x3c1b: 0x000a, 0x3c1c: 0x000a, 0x3c1d: 0x000a,\n\t0x3c1e: 0x000a, 0x3c1f: 0x000a, 0x3c20: 0x000a, 0x3c21: 0x000a, 0x3c22: 0x000a, 0x3c23: 0x000a,\n\t0x3c24: 0x000a, 0x3c25: 0x000a, 0x3c26: 0x000a, 0x3c27: 0x000a, 0x3c28: 0x000a, 0x3c29: 0x000a,\n\t0x3c2a: 0x000a, 0x3c2b: 0x000a, 0x3c2c: 0x000a, 0x3c2d: 0x000a, 0x3c2e: 0x000a, 0x3c2f: 0x000a,\n\t0x3c30: 0x000a, 0x3c31: 0x000a, 0x3c32: 0x000a, 0x3c33: 0x000a, 0x3c34: 0x000a, 0x3c35: 0x000a,\n\t// Block 0xf1, offset 0x3c40\n\t0x3c40: 0x0002, 0x3c41: 0x0002, 0x3c42: 0x0002, 0x3c43: 0x0002, 0x3c44: 0x0002, 0x3c45: 0x0002,\n\t0x3c46: 0x0002, 0x3c47: 0x0002, 0x3c48: 0x0002, 0x3c49: 0x0002, 0x3c4a: 0x0002, 0x3c4b: 0x000a,\n\t0x3c4c: 0x000a, 0x3c4d: 0x000a, 0x3c4e: 0x000a, 0x3c4f: 0x000a,\n\t0x3c6f: 0x000a,\n\t// Block 0xf2, offset 0x3c80\n\t0x3caa: 0x000a, 0x3cab: 0x000a, 0x3cac: 0x000a, 0x3cad: 0x000a, 0x3cae: 0x000a, 0x3caf: 0x000a,\n\t// Block 0xf3, offset 0x3cc0\n\t0x3ced: 0x000a,\n\t// Block 0xf4, offset 0x3d00\n\t0x3d20: 0x000a, 0x3d21: 0x000a, 0x3d22: 0x000a, 0x3d23: 0x000a,\n\t0x3d24: 0x000a, 0x3d25: 0x000a,\n\t// Block 0xf5, offset 0x3d40\n\t0x3d40: 0x000a, 0x3d41: 0x000a, 0x3d42: 0x000a, 0x3d43: 0x000a, 0x3d44: 0x000a, 0x3d45: 0x000a,\n\t0x3d46: 0x000a, 0x3d47: 0x000a, 0x3d48: 0x000a, 0x3d49: 0x000a, 0x3d4a: 0x000a, 0x3d4b: 0x000a,\n\t0x3d4c: 0x000a, 0x3d4d: 0x000a, 0x3d4e: 0x000a, 0x3d4f: 0x000a, 0x3d50: 0x000a, 0x3d51: 0x000a,\n\t0x3d52: 0x000a, 0x3d53: 0x000a, 0x3d54: 0x000a, 0x3d55: 0x000a, 0x3d56: 0x000a, 0x3d57: 0x000a,\n\t0x3d5c: 0x000a, 0x3d5d: 0x000a,\n\t0x3d5e: 0x000a, 0x3d5f: 0x000a, 0x3d60: 0x000a, 0x3d61: 0x000a, 0x3d62: 0x000a, 0x3d63: 0x000a,\n\t0x3d64: 0x000a, 0x3d65: 0x000a, 0x3d66: 0x000a, 0x3d67: 0x000a, 0x3d68: 0x000a, 0x3d69: 0x000a,\n\t0x3d6a: 0x000a, 0x3d6b: 0x000a, 0x3d6c: 0x000a,\n\t0x3d70: 0x000a, 0x3d71: 0x000a, 0x3d72: 0x000a, 0x3d73: 0x000a, 0x3d74: 0x000a, 0x3d75: 0x000a,\n\t0x3d76: 0x000a, 0x3d77: 0x000a, 0x3d78: 0x000a, 0x3d79: 0x000a, 0x3d7a: 0x000a, 0x3d7b: 0x000a,\n\t0x3d7c: 0x000a,\n\t// Block 0xf6, offset 0x3d80\n\t0x3d80: 0x000a, 0x3d81: 0x000a, 0x3d82: 0x000a, 0x3d83: 0x000a, 0x3d84: 0x000a, 0x3d85: 0x000a,\n\t0x3d86: 0x000a, 0x3d87: 0x000a, 0x3d88: 0x000a, 0x3d89: 0x000a, 0x3d8a: 0x000a, 0x3d8b: 0x000a,\n\t0x3d8c: 0x000a, 0x3d8d: 0x000a, 0x3d8e: 0x000a, 0x3d8f: 0x000a, 0x3d90: 0x000a, 0x3d91: 0x000a,\n\t0x3d92: 0x000a, 0x3d93: 0x000a, 0x3d94: 0x000a, 0x3d95: 0x000a, 0x3d96: 0x000a, 0x3d97: 0x000a,\n\t0x3d98: 0x000a, 0x3d99: 0x000a, 0x3d9a: 0x000a, 0x3d9b: 0x000a, 0x3d9c: 0x000a, 0x3d9d: 0x000a,\n\t0x3d9e: 0x000a, 0x3d9f: 0x000a, 0x3da0: 0x000a, 0x3da1: 0x000a, 0x3da2: 0x000a, 0x3da3: 0x000a,\n\t0x3da4: 0x000a, 0x3da5: 0x000a, 0x3da6: 0x000a, 0x3da7: 0x000a, 0x3da8: 0x000a, 0x3da9: 0x000a,\n\t0x3daa: 0x000a, 0x3dab: 0x000a, 0x3dac: 0x000a, 0x3dad: 0x000a, 0x3dae: 0x000a, 0x3daf: 0x000a,\n\t0x3db0: 0x000a, 0x3db1: 0x000a, 0x3db2: 0x000a, 0x3db3: 0x000a, 0x3db4: 0x000a, 0x3db5: 0x000a,\n\t0x3db6: 0x000a, 0x3dbb: 0x000a,\n\t0x3dbc: 0x000a, 0x3dbd: 0x000a, 0x3dbe: 0x000a, 0x3dbf: 0x000a,\n\t// Block 0xf7, offset 0x3dc0\n\t0x3dc0: 0x000a, 0x3dc1: 0x000a, 0x3dc2: 0x000a, 0x3dc3: 0x000a, 0x3dc4: 0x000a, 0x3dc5: 0x000a,\n\t0x3dc6: 0x000a, 0x3dc7: 0x000a, 0x3dc8: 0x000a, 0x3dc9: 0x000a, 0x3dca: 0x000a, 0x3dcb: 0x000a,\n\t0x3dcc: 0x000a, 0x3dcd: 0x000a, 0x3dce: 0x000a, 0x3dcf: 0x000a, 0x3dd0: 0x000a, 0x3dd1: 0x000a,\n\t0x3dd2: 0x000a, 0x3dd3: 0x000a, 0x3dd4: 0x000a, 0x3dd5: 0x000a, 0x3dd6: 0x000a, 0x3dd7: 0x000a,\n\t0x3dd8: 0x000a, 0x3dd9: 0x000a,\n\t0x3de0: 0x000a, 0x3de1: 0x000a, 0x3de2: 0x000a, 0x3de3: 0x000a,\n\t0x3de4: 0x000a, 0x3de5: 0x000a, 0x3de6: 0x000a, 0x3de7: 0x000a, 0x3de8: 0x000a, 0x3de9: 0x000a,\n\t0x3dea: 0x000a, 0x3deb: 0x000a,\n\t0x3df0: 0x000a,\n\t// Block 0xf8, offset 0x3e00\n\t0x3e00: 0x000a, 0x3e01: 0x000a, 0x3e02: 0x000a, 0x3e03: 0x000a, 0x3e04: 0x000a, 0x3e05: 0x000a,\n\t0x3e06: 0x000a, 0x3e07: 0x000a, 0x3e08: 0x000a, 0x3e09: 0x000a, 0x3e0a: 0x000a, 0x3e0b: 0x000a,\n\t0x3e10: 0x000a, 0x3e11: 0x000a,\n\t0x3e12: 0x000a, 0x3e13: 0x000a, 0x3e14: 0x000a, 0x3e15: 0x000a, 0x3e16: 0x000a, 0x3e17: 0x000a,\n\t0x3e18: 0x000a, 0x3e19: 0x000a, 0x3e1a: 0x000a, 0x3e1b: 0x000a, 0x3e1c: 0x000a, 0x3e1d: 0x000a,\n\t0x3e1e: 0x000a, 0x3e1f: 0x000a, 0x3e20: 0x000a, 0x3e21: 0x000a, 0x3e22: 0x000a, 0x3e23: 0x000a,\n\t0x3e24: 0x000a, 0x3e25: 0x000a, 0x3e26: 0x000a, 0x3e27: 0x000a, 0x3e28: 0x000a, 0x3e29: 0x000a,\n\t0x3e2a: 0x000a, 0x3e2b: 0x000a, 0x3e2c: 0x000a, 0x3e2d: 0x000a, 0x3e2e: 0x000a, 0x3e2f: 0x000a,\n\t0x3e30: 0x000a, 0x3e31: 0x000a, 0x3e32: 0x000a, 0x3e33: 0x000a, 0x3e34: 0x000a, 0x3e35: 0x000a,\n\t0x3e36: 0x000a, 0x3e37: 0x000a, 0x3e38: 0x000a, 0x3e39: 0x000a, 0x3e3a: 0x000a, 0x3e3b: 0x000a,\n\t0x3e3c: 0x000a, 0x3e3d: 0x000a, 0x3e3e: 0x000a, 0x3e3f: 0x000a,\n\t// Block 0xf9, offset 0x3e40\n\t0x3e40: 0x000a, 0x3e41: 0x000a, 0x3e42: 0x000a, 0x3e43: 0x000a, 0x3e44: 0x000a, 0x3e45: 0x000a,\n\t0x3e46: 0x000a, 0x3e47: 0x000a,\n\t0x3e50: 0x000a, 0x3e51: 0x000a,\n\t0x3e52: 0x000a, 0x3e53: 0x000a, 0x3e54: 0x000a, 0x3e55: 0x000a, 0x3e56: 0x000a, 0x3e57: 0x000a,\n\t0x3e58: 0x000a, 0x3e59: 0x000a,\n\t0x3e60: 0x000a, 0x3e61: 0x000a, 0x3e62: 0x000a, 0x3e63: 0x000a,\n\t0x3e64: 0x000a, 0x3e65: 0x000a, 0x3e66: 0x000a, 0x3e67: 0x000a, 0x3e68: 0x000a, 0x3e69: 0x000a,\n\t0x3e6a: 0x000a, 0x3e6b: 0x000a, 0x3e6c: 0x000a, 0x3e6d: 0x000a, 0x3e6e: 0x000a, 0x3e6f: 0x000a,\n\t0x3e70: 0x000a, 0x3e71: 0x000a, 0x3e72: 0x000a, 0x3e73: 0x000a, 0x3e74: 0x000a, 0x3e75: 0x000a,\n\t0x3e76: 0x000a, 0x3e77: 0x000a, 0x3e78: 0x000a, 0x3e79: 0x000a, 0x3e7a: 0x000a, 0x3e7b: 0x000a,\n\t0x3e7c: 0x000a, 0x3e7d: 0x000a, 0x3e7e: 0x000a, 0x3e7f: 0x000a,\n\t// Block 0xfa, offset 0x3e80\n\t0x3e80: 0x000a, 0x3e81: 0x000a, 0x3e82: 0x000a, 0x3e83: 0x000a, 0x3e84: 0x000a, 0x3e85: 0x000a,\n\t0x3e86: 0x000a, 0x3e87: 0x000a,\n\t0x3e90: 0x000a, 0x3e91: 0x000a,\n\t0x3e92: 0x000a, 0x3e93: 0x000a, 0x3e94: 0x000a, 0x3e95: 0x000a, 0x3e96: 0x000a, 0x3e97: 0x000a,\n\t0x3e98: 0x000a, 0x3e99: 0x000a, 0x3e9a: 0x000a, 0x3e9b: 0x000a, 0x3e9c: 0x000a, 0x3e9d: 0x000a,\n\t0x3e9e: 0x000a, 0x3e9f: 0x000a, 0x3ea0: 0x000a, 0x3ea1: 0x000a, 0x3ea2: 0x000a, 0x3ea3: 0x000a,\n\t0x3ea4: 0x000a, 0x3ea5: 0x000a, 0x3ea6: 0x000a, 0x3ea7: 0x000a, 0x3ea8: 0x000a, 0x3ea9: 0x000a,\n\t0x3eaa: 0x000a, 0x3eab: 0x000a, 0x3eac: 0x000a, 0x3ead: 0x000a,\n\t0x3eb0: 0x000a, 0x3eb1: 0x000a,\n\t// Block 0xfb, offset 0x3ec0\n\t0x3ec0: 0x000a, 0x3ec1: 0x000a, 0x3ec2: 0x000a, 0x3ec3: 0x000a, 0x3ec4: 0x000a, 0x3ec5: 0x000a,\n\t0x3ec6: 0x000a, 0x3ec7: 0x000a, 0x3ec8: 0x000a, 0x3ec9: 0x000a, 0x3eca: 0x000a, 0x3ecb: 0x000a,\n\t0x3ecc: 0x000a, 0x3ecd: 0x000a, 0x3ece: 0x000a, 0x3ecf: 0x000a, 0x3ed0: 0x000a, 0x3ed1: 0x000a,\n\t0x3ed2: 0x000a, 0x3ed3: 0x000a,\n\t0x3ee0: 0x000a, 0x3ee1: 0x000a, 0x3ee2: 0x000a, 0x3ee3: 0x000a,\n\t0x3ee4: 0x000a, 0x3ee5: 0x000a, 0x3ee6: 0x000a, 0x3ee7: 0x000a, 0x3ee8: 0x000a, 0x3ee9: 0x000a,\n\t0x3eea: 0x000a, 0x3eeb: 0x000a, 0x3eec: 0x000a, 0x3eed: 0x000a,\n\t0x3ef0: 0x000a, 0x3ef1: 0x000a, 0x3ef2: 0x000a, 0x3ef3: 0x000a, 0x3ef4: 0x000a, 0x3ef5: 0x000a,\n\t0x3ef6: 0x000a, 0x3ef7: 0x000a, 0x3ef8: 0x000a, 0x3ef9: 0x000a, 0x3efa: 0x000a, 0x3efb: 0x000a,\n\t0x3efc: 0x000a,\n\t// Block 0xfc, offset 0x3f00\n\t0x3f00: 0x000a, 0x3f01: 0x000a, 0x3f02: 0x000a, 0x3f03: 0x000a, 0x3f04: 0x000a, 0x3f05: 0x000a,\n\t0x3f06: 0x000a, 0x3f07: 0x000a, 0x3f08: 0x000a,\n\t0x3f10: 0x000a, 0x3f11: 0x000a,\n\t0x3f12: 0x000a, 0x3f13: 0x000a, 0x3f14: 0x000a, 0x3f15: 0x000a, 0x3f16: 0x000a, 0x3f17: 0x000a,\n\t0x3f18: 0x000a, 0x3f19: 0x000a, 0x3f1a: 0x000a, 0x3f1b: 0x000a, 0x3f1c: 0x000a, 0x3f1d: 0x000a,\n\t0x3f1e: 0x000a, 0x3f1f: 0x000a, 0x3f20: 0x000a, 0x3f21: 0x000a, 0x3f22: 0x000a, 0x3f23: 0x000a,\n\t0x3f24: 0x000a, 0x3f25: 0x000a, 0x3f26: 0x000a, 0x3f27: 0x000a, 0x3f28: 0x000a, 0x3f29: 0x000a,\n\t0x3f2a: 0x000a, 0x3f2b: 0x000a, 0x3f2c: 0x000a, 0x3f2d: 0x000a, 0x3f2e: 0x000a, 0x3f2f: 0x000a,\n\t0x3f30: 0x000a, 0x3f31: 0x000a, 0x3f32: 0x000a, 0x3f33: 0x000a, 0x3f34: 0x000a, 0x3f35: 0x000a,\n\t0x3f36: 0x000a, 0x3f37: 0x000a, 0x3f38: 0x000a, 0x3f39: 0x000a, 0x3f3a: 0x000a, 0x3f3b: 0x000a,\n\t0x3f3c: 0x000a, 0x3f3d: 0x000a, 0x3f3f: 0x000a,\n\t// Block 0xfd, offset 0x3f40\n\t0x3f40: 0x000a, 0x3f41: 0x000a, 0x3f42: 0x000a, 0x3f43: 0x000a, 0x3f44: 0x000a, 0x3f45: 0x000a,\n\t0x3f4e: 0x000a, 0x3f4f: 0x000a, 0x3f50: 0x000a, 0x3f51: 0x000a,\n\t0x3f52: 0x000a, 0x3f53: 0x000a, 0x3f54: 0x000a, 0x3f55: 0x000a, 0x3f56: 0x000a, 0x3f57: 0x000a,\n\t0x3f58: 0x000a, 0x3f59: 0x000a, 0x3f5a: 0x000a, 0x3f5b: 0x000a,\n\t0x3f60: 0x000a, 0x3f61: 0x000a, 0x3f62: 0x000a, 0x3f63: 0x000a,\n\t0x3f64: 0x000a, 0x3f65: 0x000a, 0x3f66: 0x000a, 0x3f67: 0x000a, 0x3f68: 0x000a,\n\t0x3f70: 0x000a, 0x3f71: 0x000a, 0x3f72: 0x000a, 0x3f73: 0x000a, 0x3f74: 0x000a, 0x3f75: 0x000a,\n\t0x3f76: 0x000a, 0x3f77: 0x000a, 0x3f78: 0x000a,\n\t// Block 0xfe, offset 0x3f80\n\t0x3f80: 0x000a, 0x3f81: 0x000a, 0x3f82: 0x000a, 0x3f83: 0x000a, 0x3f84: 0x000a, 0x3f85: 0x000a,\n\t0x3f86: 0x000a, 0x3f87: 0x000a, 0x3f88: 0x000a, 0x3f89: 0x000a, 0x3f8a: 0x000a, 0x3f8b: 0x000a,\n\t0x3f8c: 0x000a, 0x3f8d: 0x000a, 0x3f8e: 0x000a, 0x3f8f: 0x000a, 0x3f90: 0x000a, 0x3f91: 0x000a,\n\t0x3f92: 0x000a, 0x3f94: 0x000a, 0x3f95: 0x000a, 0x3f96: 0x000a, 0x3f97: 0x000a,\n\t0x3f98: 0x000a, 0x3f99: 0x000a, 0x3f9a: 0x000a, 0x3f9b: 0x000a, 0x3f9c: 0x000a, 0x3f9d: 0x000a,\n\t0x3f9e: 0x000a, 0x3f9f: 0x000a, 0x3fa0: 0x000a, 0x3fa1: 0x000a, 0x3fa2: 0x000a, 0x3fa3: 0x000a,\n\t0x3fa4: 0x000a, 0x3fa5: 0x000a, 0x3fa6: 0x000a, 0x3fa7: 0x000a, 0x3fa8: 0x000a, 0x3fa9: 0x000a,\n\t0x3faa: 0x000a, 0x3fab: 0x000a, 0x3fac: 0x000a, 0x3fad: 0x000a, 0x3fae: 0x000a, 0x3faf: 0x000a,\n\t0x3fb0: 0x000a, 0x3fb1: 0x000a, 0x3fb2: 0x000a, 0x3fb3: 0x000a, 0x3fb4: 0x000a, 0x3fb5: 0x000a,\n\t0x3fb6: 0x000a, 0x3fb7: 0x000a, 0x3fb8: 0x000a, 0x3fb9: 0x000a, 0x3fba: 0x000a, 0x3fbb: 0x000a,\n\t0x3fbc: 0x000a, 0x3fbd: 0x000a, 0x3fbe: 0x000a, 0x3fbf: 0x000a,\n\t// Block 0xff, offset 0x3fc0\n\t0x3fc0: 0x000a, 0x3fc1: 0x000a, 0x3fc2: 0x000a, 0x3fc3: 0x000a, 0x3fc4: 0x000a, 0x3fc5: 0x000a,\n\t0x3fc6: 0x000a, 0x3fc7: 0x000a, 0x3fc8: 0x000a, 0x3fc9: 0x000a, 0x3fca: 0x000a,\n\t0x3ff0: 0x0002, 0x3ff1: 0x0002, 0x3ff2: 0x0002, 0x3ff3: 0x0002, 0x3ff4: 0x0002, 0x3ff5: 0x0002,\n\t0x3ff6: 0x0002, 0x3ff7: 0x0002, 0x3ff8: 0x0002, 0x3ff9: 0x0002,\n\t// Block 0x100, offset 0x4000\n\t0x403e: 0x000b, 0x403f: 0x000b,\n\t// Block 0x101, offset 0x4040\n\t0x4040: 0x000b, 0x4041: 0x000b, 0x4042: 0x000b, 0x4043: 0x000b, 0x4044: 0x000b, 0x4045: 0x000b,\n\t0x4046: 0x000b, 0x4047: 0x000b, 0x4048: 0x000b, 0x4049: 0x000b, 0x404a: 0x000b, 0x404b: 0x000b,\n\t0x404c: 0x000b, 0x404d: 0x000b, 0x404e: 0x000b, 0x404f: 0x000b, 0x4050: 0x000b, 0x4051: 0x000b,\n\t0x4052: 0x000b, 0x4053: 0x000b, 0x4054: 0x000b, 0x4055: 0x000b, 0x4056: 0x000b, 0x4057: 0x000b,\n\t0x4058: 0x000b, 0x4059: 0x000b, 0x405a: 0x000b, 0x405b: 0x000b, 0x405c: 0x000b, 0x405d: 0x000b,\n\t0x405e: 0x000b, 0x405f: 0x000b, 0x4060: 0x000b, 0x4061: 0x000b, 0x4062: 0x000b, 0x4063: 0x000b,\n\t0x4064: 0x000b, 0x4065: 0x000b, 0x4066: 0x000b, 0x4067: 0x000b, 0x4068: 0x000b, 0x4069: 0x000b,\n\t0x406a: 0x000b, 0x406b: 0x000b, 0x406c: 0x000b, 0x406d: 0x000b, 0x406e: 0x000b, 0x406f: 0x000b,\n\t0x4070: 0x000b, 0x4071: 0x000b, 0x4072: 0x000b, 0x4073: 0x000b, 0x4074: 0x000b, 0x4075: 0x000b,\n\t0x4076: 0x000b, 0x4077: 0x000b, 0x4078: 0x000b, 0x4079: 0x000b, 0x407a: 0x000b, 0x407b: 0x000b,\n\t0x407c: 0x000b, 0x407d: 0x000b, 0x407e: 0x000b, 0x407f: 0x000b,\n\t// Block 0x102, offset 0x4080\n\t0x4080: 0x000c, 0x4081: 0x000c, 0x4082: 0x000c, 0x4083: 0x000c, 0x4084: 0x000c, 0x4085: 0x000c,\n\t0x4086: 0x000c, 0x4087: 0x000c, 0x4088: 0x000c, 0x4089: 0x000c, 0x408a: 0x000c, 0x408b: 0x000c,\n\t0x408c: 0x000c, 0x408d: 0x000c, 0x408e: 0x000c, 0x408f: 0x000c, 0x4090: 0x000c, 0x4091: 0x000c,\n\t0x4092: 0x000c, 0x4093: 0x000c, 0x4094: 0x000c, 0x4095: 0x000c, 0x4096: 0x000c, 0x4097: 0x000c,\n\t0x4098: 0x000c, 0x4099: 0x000c, 0x409a: 0x000c, 0x409b: 0x000c, 0x409c: 0x000c, 0x409d: 0x000c,\n\t0x409e: 0x000c, 0x409f: 0x000c, 0x40a0: 0x000c, 0x40a1: 0x000c, 0x40a2: 0x000c, 0x40a3: 0x000c,\n\t0x40a4: 0x000c, 0x40a5: 0x000c, 0x40a6: 0x000c, 0x40a7: 0x000c, 0x40a8: 0x000c, 0x40a9: 0x000c,\n\t0x40aa: 0x000c, 0x40ab: 0x000c, 0x40ac: 0x000c, 0x40ad: 0x000c, 0x40ae: 0x000c, 0x40af: 0x000c,\n\t0x40b0: 0x000b, 0x40b1: 0x000b, 0x40b2: 0x000b, 0x40b3: 0x000b, 0x40b4: 0x000b, 0x40b5: 0x000b,\n\t0x40b6: 0x000b, 0x40b7: 0x000b, 0x40b8: 0x000b, 0x40b9: 0x000b, 0x40ba: 0x000b, 0x40bb: 0x000b,\n\t0x40bc: 0x000b, 0x40bd: 0x000b, 0x40be: 0x000b, 0x40bf: 0x000b,\n}\n\n// bidiIndex: 26 blocks, 1664 entries, 3328 bytes\n// Block 0 is the zero block.\nvar bidiIndex = [1664]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x02,\n\t0xca: 0x03, 0xcb: 0x04, 0xcc: 0x05, 0xcd: 0x06, 0xce: 0x07, 0xcf: 0x08,\n\t0xd2: 0x09, 0xd6: 0x0a, 0xd7: 0x0b,\n\t0xd8: 0x0c, 0xd9: 0x0d, 0xda: 0x0e, 0xdb: 0x0f, 0xdc: 0x10, 0xdd: 0x11, 0xde: 0x12, 0xdf: 0x13,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06,\n\t0xea: 0x07, 0xef: 0x08,\n\t0xf0: 0x13, 0xf1: 0x14, 0xf2: 0x14, 0xf3: 0x16, 0xf4: 0x17,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x14, 0x121: 0x15, 0x122: 0x16, 0x123: 0x17, 0x124: 0x18, 0x125: 0x19, 0x126: 0x1a, 0x127: 0x1b,\n\t0x128: 0x1c, 0x129: 0x1d, 0x12a: 0x1c, 0x12b: 0x1e, 0x12c: 0x1f, 0x12d: 0x20, 0x12e: 0x21, 0x12f: 0x22,\n\t0x130: 0x23, 0x131: 0x24, 0x132: 0x1a, 0x133: 0x25, 0x134: 0x26, 0x135: 0x27, 0x136: 0x28, 0x137: 0x29,\n\t0x138: 0x2a, 0x139: 0x2b, 0x13a: 0x2c, 0x13b: 0x2d, 0x13c: 0x2e, 0x13d: 0x2f, 0x13e: 0x30, 0x13f: 0x31,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x32, 0x141: 0x33, 0x142: 0x34,\n\t0x14d: 0x35, 0x14e: 0x36,\n\t0x150: 0x37,\n\t0x15a: 0x38, 0x15c: 0x39, 0x15d: 0x3a, 0x15e: 0x3b, 0x15f: 0x3c,\n\t0x160: 0x3d, 0x162: 0x3e, 0x164: 0x3f, 0x165: 0x40, 0x167: 0x41,\n\t0x168: 0x42, 0x169: 0x43, 0x16a: 0x44, 0x16b: 0x45, 0x16c: 0x46, 0x16d: 0x47, 0x16e: 0x48, 0x16f: 0x49,\n\t0x170: 0x4a, 0x173: 0x4b, 0x177: 0x05,\n\t0x17e: 0x4c, 0x17f: 0x4d,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x4e, 0x181: 0x4f, 0x182: 0x50, 0x183: 0x51, 0x184: 0x52, 0x185: 0x53, 0x186: 0x54, 0x187: 0x55,\n\t0x188: 0x56, 0x189: 0x55, 0x18a: 0x55, 0x18b: 0x55, 0x18c: 0x57, 0x18d: 0x58, 0x18e: 0x59, 0x18f: 0x55,\n\t0x190: 0x5a, 0x191: 0x5b, 0x192: 0x5c, 0x193: 0x5d, 0x194: 0x55, 0x195: 0x55, 0x196: 0x55, 0x197: 0x55,\n\t0x198: 0x55, 0x199: 0x55, 0x19a: 0x5e, 0x19b: 0x55, 0x19c: 0x55, 0x19d: 0x5f, 0x19e: 0x55, 0x19f: 0x60,\n\t0x1a4: 0x55, 0x1a5: 0x55, 0x1a6: 0x61, 0x1a7: 0x62,\n\t0x1a8: 0x55, 0x1a9: 0x55, 0x1aa: 0x55, 0x1ab: 0x55, 0x1ac: 0x55, 0x1ad: 0x63, 0x1ae: 0x64, 0x1af: 0x55,\n\t0x1b3: 0x65, 0x1b5: 0x66, 0x1b7: 0x67,\n\t0x1b8: 0x68, 0x1b9: 0x69, 0x1ba: 0x6a, 0x1bb: 0x6b, 0x1bc: 0x55, 0x1bd: 0x55, 0x1be: 0x55, 0x1bf: 0x6c,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x6d, 0x1c2: 0x6e, 0x1c3: 0x6f, 0x1c7: 0x70,\n\t0x1c8: 0x71, 0x1c9: 0x72, 0x1ca: 0x73, 0x1cb: 0x74, 0x1cd: 0x75, 0x1cf: 0x76,\n\t// Block 0x8, offset 0x200\n\t0x237: 0x55,\n\t// Block 0x9, offset 0x240\n\t0x252: 0x77, 0x253: 0x78,\n\t0x258: 0x79, 0x259: 0x7a, 0x25a: 0x7b, 0x25b: 0x7c, 0x25c: 0x7d, 0x25e: 0x7e,\n\t0x260: 0x7f, 0x261: 0x80, 0x263: 0x81, 0x264: 0x82, 0x265: 0x83, 0x266: 0x84, 0x267: 0x85,\n\t0x268: 0x86, 0x269: 0x87, 0x26a: 0x88, 0x26b: 0x89, 0x26d: 0x8a, 0x26f: 0x8b,\n\t// Block 0xa, offset 0x280\n\t0x2ac: 0x8c, 0x2ad: 0x8d, 0x2ae: 0x0e, 0x2af: 0x0e,\n\t0x2b0: 0x0e, 0x2b1: 0x0e, 0x2b2: 0x0e, 0x2b3: 0x0e, 0x2b4: 0x8e, 0x2b5: 0x8f, 0x2b6: 0x0e, 0x2b7: 0x90,\n\t0x2b8: 0x91, 0x2b9: 0x92, 0x2ba: 0x0e, 0x2bb: 0x93, 0x2bc: 0x94, 0x2bd: 0x95, 0x2bf: 0x96,\n\t// Block 0xb, offset 0x2c0\n\t0x2c4: 0x97, 0x2c5: 0x55, 0x2c6: 0x98, 0x2c7: 0x99,\n\t0x2cb: 0x9a, 0x2cd: 0x9b,\n\t0x2e0: 0x9c, 0x2e1: 0x9c, 0x2e2: 0x9c, 0x2e3: 0x9c, 0x2e4: 0x9d, 0x2e5: 0x9c, 0x2e6: 0x9c, 0x2e7: 0x9c,\n\t0x2e8: 0x9e, 0x2e9: 0x9c, 0x2ea: 0x9c, 0x2eb: 0x9f, 0x2ec: 0xa0, 0x2ed: 0x9c, 0x2ee: 0x9c, 0x2ef: 0x9c,\n\t0x2f0: 0x9c, 0x2f1: 0x9c, 0x2f2: 0x9c, 0x2f3: 0x9c, 0x2f4: 0xa1, 0x2f5: 0x9c, 0x2f6: 0x9c, 0x2f7: 0x9c,\n\t0x2f8: 0x9c, 0x2f9: 0xa2, 0x2fa: 0xa3, 0x2fb: 0xa4, 0x2fc: 0xa5, 0x2fd: 0xa6, 0x2fe: 0xa7, 0x2ff: 0x9c,\n\t// Block 0xc, offset 0x300\n\t0x300: 0xa8, 0x301: 0xa9, 0x302: 0xaa, 0x303: 0x21, 0x304: 0xab, 0x305: 0xac, 0x306: 0xad, 0x307: 0xae,\n\t0x308: 0xaf, 0x309: 0x28, 0x30b: 0xb0, 0x30c: 0x26, 0x30d: 0xb1,\n\t0x310: 0xb2, 0x311: 0xb3, 0x312: 0xb4, 0x313: 0xb5, 0x316: 0xb6, 0x317: 0xb7,\n\t0x318: 0xb8, 0x319: 0xb9, 0x31a: 0xba, 0x31c: 0xbb,\n\t0x320: 0xbc, 0x324: 0xbd, 0x325: 0xbe, 0x327: 0xbf,\n\t0x328: 0xc0, 0x329: 0xc1, 0x32a: 0xc2,\n\t0x330: 0xc3, 0x332: 0xc4, 0x334: 0xc5, 0x335: 0xc6, 0x336: 0xc7,\n\t0x33b: 0xc8, 0x33c: 0xc9, 0x33d: 0xca, 0x33f: 0xcb,\n\t// Block 0xd, offset 0x340\n\t0x351: 0xcc,\n\t// Block 0xe, offset 0x380\n\t0x3ab: 0xcd, 0x3ac: 0xce,\n\t0x3bd: 0xcf, 0x3be: 0xd0, 0x3bf: 0xd1,\n\t// Block 0xf, offset 0x3c0\n\t0x3f2: 0xd2,\n\t// Block 0x10, offset 0x400\n\t0x43c: 0xd3, 0x43d: 0xd4,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xd5, 0x446: 0xd6, 0x447: 0xd7,\n\t0x448: 0x55, 0x449: 0xd8, 0x44c: 0x55, 0x44d: 0xd9,\n\t0x45b: 0xda, 0x45c: 0xdb, 0x45d: 0xdc, 0x45e: 0xdd, 0x45f: 0xde,\n\t0x468: 0xdf, 0x469: 0xe0, 0x46a: 0xe1,\n\t// Block 0x12, offset 0x480\n\t0x480: 0xe2, 0x482: 0xcf, 0x484: 0xce,\n\t0x48a: 0xe3, 0x48b: 0xe4,\n\t0x493: 0xe5,\n\t0x4a0: 0x9c, 0x4a1: 0x9c, 0x4a2: 0x9c, 0x4a3: 0xe6, 0x4a4: 0x9c, 0x4a5: 0xe7, 0x4a6: 0x9c, 0x4a7: 0x9c,\n\t0x4a8: 0x9c, 0x4a9: 0x9c, 0x4aa: 0x9c, 0x4ab: 0x9c, 0x4ac: 0x9c, 0x4ad: 0x9c, 0x4ae: 0x9c, 0x4af: 0x9c,\n\t0x4b0: 0x9c, 0x4b1: 0xe8, 0x4b2: 0xe9, 0x4b3: 0x9c, 0x4b4: 0xea, 0x4b5: 0x9c, 0x4b6: 0x9c, 0x4b7: 0x9c,\n\t0x4b8: 0x0e, 0x4b9: 0x0e, 0x4ba: 0x0e, 0x4bb: 0xeb, 0x4bc: 0x9c, 0x4bd: 0x9c, 0x4be: 0x9c, 0x4bf: 0x9c,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xec, 0x4c1: 0x55, 0x4c2: 0xed, 0x4c3: 0xee, 0x4c4: 0xef, 0x4c5: 0xf0, 0x4c6: 0xf1,\n\t0x4c9: 0xf2, 0x4cc: 0x55, 0x4cd: 0x55, 0x4ce: 0x55, 0x4cf: 0x55,\n\t0x4d0: 0x55, 0x4d1: 0x55, 0x4d2: 0x55, 0x4d3: 0x55, 0x4d4: 0x55, 0x4d5: 0x55, 0x4d6: 0x55, 0x4d7: 0x55,\n\t0x4d8: 0x55, 0x4d9: 0x55, 0x4da: 0x55, 0x4db: 0xf3, 0x4dc: 0x55, 0x4dd: 0xf4, 0x4de: 0x55, 0x4df: 0xf5,\n\t0x4e0: 0xf6, 0x4e1: 0xf7, 0x4e2: 0xf8, 0x4e4: 0x55, 0x4e5: 0x55, 0x4e6: 0x55, 0x4e7: 0x55,\n\t0x4e8: 0x55, 0x4e9: 0xf9, 0x4ea: 0xfa, 0x4eb: 0xfb, 0x4ec: 0x55, 0x4ed: 0x55, 0x4ee: 0xfc, 0x4ef: 0xfd,\n\t0x4ff: 0xfe,\n\t// Block 0x14, offset 0x500\n\t0x53f: 0xfe,\n\t// Block 0x15, offset 0x540\n\t0x550: 0x09, 0x551: 0x0a, 0x553: 0x0b, 0x556: 0x0c,\n\t0x55b: 0x0d, 0x55c: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11,\n\t0x56f: 0x12,\n\t0x57f: 0x12,\n\t// Block 0x16, offset 0x580\n\t0x58f: 0x12,\n\t0x59f: 0x12,\n\t0x5af: 0x12,\n\t0x5bf: 0x12,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0xff, 0x5c1: 0xff, 0x5c2: 0xff, 0x5c3: 0xff, 0x5c4: 0x05, 0x5c5: 0x05, 0x5c6: 0x05, 0x5c7: 0x100,\n\t0x5c8: 0xff, 0x5c9: 0xff, 0x5ca: 0xff, 0x5cb: 0xff, 0x5cc: 0xff, 0x5cd: 0xff, 0x5ce: 0xff, 0x5cf: 0xff,\n\t0x5d0: 0xff, 0x5d1: 0xff, 0x5d2: 0xff, 0x5d3: 0xff, 0x5d4: 0xff, 0x5d5: 0xff, 0x5d6: 0xff, 0x5d7: 0xff,\n\t0x5d8: 0xff, 0x5d9: 0xff, 0x5da: 0xff, 0x5db: 0xff, 0x5dc: 0xff, 0x5dd: 0xff, 0x5de: 0xff, 0x5df: 0xff,\n\t0x5e0: 0xff, 0x5e1: 0xff, 0x5e2: 0xff, 0x5e3: 0xff, 0x5e4: 0xff, 0x5e5: 0xff, 0x5e6: 0xff, 0x5e7: 0xff,\n\t0x5e8: 0xff, 0x5e9: 0xff, 0x5ea: 0xff, 0x5eb: 0xff, 0x5ec: 0xff, 0x5ed: 0xff, 0x5ee: 0xff, 0x5ef: 0xff,\n\t0x5f0: 0xff, 0x5f1: 0xff, 0x5f2: 0xff, 0x5f3: 0xff, 0x5f4: 0xff, 0x5f5: 0xff, 0x5f6: 0xff, 0x5f7: 0xff,\n\t0x5f8: 0xff, 0x5f9: 0xff, 0x5fa: 0xff, 0x5fb: 0xff, 0x5fc: 0xff, 0x5fd: 0xff, 0x5fe: 0xff, 0x5ff: 0xff,\n\t// Block 0x18, offset 0x600\n\t0x60f: 0x12,\n\t0x61f: 0x12,\n\t0x620: 0x15,\n\t0x62f: 0x12,\n\t0x63f: 0x12,\n\t// Block 0x19, offset 0x640\n\t0x64f: 0x12,\n}\n\n// Total table size 19960 bytes (19KiB); checksum: F50EF68C\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/tables17.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.27\n\npackage bidi\n\n// UnicodeVersion is the Unicode version from which the tables in this package are derived.\nconst UnicodeVersion = \"17.0.0\"\n\n// xorMasks contains masks to be xor-ed with brackets to get the reverse\n// version.\nvar xorMasks = []int32{ // 8 elements\n\t0, 1, 6, 7, 3, 15, 29, 63,\n} // Size: 56 bytes\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *bidiTrie) lookup(s []byte) (v uint8, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn bidiValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *bidiTrie) lookupUnsafe(s []byte) uint8 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn bidiValues[c0]\n\t}\n\ti := bidiIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *bidiTrie) lookupString(s string) (v uint8, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn bidiValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := bidiIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = bidiIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = bidiIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *bidiTrie) lookupStringUnsafe(s string) uint8 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn bidiValues[c0]\n\t}\n\ti := bidiIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = bidiIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// bidiTrie. Total size: 20608 bytes (20.12 KiB). Checksum: 291cd0103a32a537.\ntype bidiTrie struct{}\n\nfunc newBidiTrie(i int) *bidiTrie {\n\treturn &bidiTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *bidiTrie) lookupValue(n uint32, b byte) uint8 {\n\tswitch {\n\tdefault:\n\t\treturn uint8(bidiValues[n<<6+uint32(b)])\n\t}\n}\n\n// bidiValues: 270 blocks, 17280 entries, 17280 bytes\n// The third block is the zero block.\nvar bidiValues = [17280]uint8{\n\t// Block 0x0, offset 0x0\n\t0x00: 0x000b, 0x01: 0x000b, 0x02: 0x000b, 0x03: 0x000b, 0x04: 0x000b, 0x05: 0x000b,\n\t0x06: 0x000b, 0x07: 0x000b, 0x08: 0x000b, 0x09: 0x0008, 0x0a: 0x0007, 0x0b: 0x0008,\n\t0x0c: 0x0009, 0x0d: 0x0007, 0x0e: 0x000b, 0x0f: 0x000b, 0x10: 0x000b, 0x11: 0x000b,\n\t0x12: 0x000b, 0x13: 0x000b, 0x14: 0x000b, 0x15: 0x000b, 0x16: 0x000b, 0x17: 0x000b,\n\t0x18: 0x000b, 0x19: 0x000b, 0x1a: 0x000b, 0x1b: 0x000b, 0x1c: 0x0007, 0x1d: 0x0007,\n\t0x1e: 0x0007, 0x1f: 0x0008, 0x20: 0x0009, 0x21: 0x000a, 0x22: 0x000a, 0x23: 0x0004,\n\t0x24: 0x0004, 0x25: 0x0004, 0x26: 0x000a, 0x27: 0x000a, 0x28: 0x003a, 0x29: 0x002a,\n\t0x2a: 0x000a, 0x2b: 0x0003, 0x2c: 0x0006, 0x2d: 0x0003, 0x2e: 0x0006, 0x2f: 0x0006,\n\t0x30: 0x0002, 0x31: 0x0002, 0x32: 0x0002, 0x33: 0x0002, 0x34: 0x0002, 0x35: 0x0002,\n\t0x36: 0x0002, 0x37: 0x0002, 0x38: 0x0002, 0x39: 0x0002, 0x3a: 0x0006, 0x3b: 0x000a,\n\t0x3c: 0x000a, 0x3d: 0x000a, 0x3e: 0x000a, 0x3f: 0x000a,\n\t// Block 0x1, offset 0x40\n\t0x40: 0x000a,\n\t0x5b: 0x005a, 0x5c: 0x000a, 0x5d: 0x004a,\n\t0x5e: 0x000a, 0x5f: 0x000a, 0x60: 0x000a,\n\t0x7b: 0x005a,\n\t0x7c: 0x000a, 0x7d: 0x004a, 0x7e: 0x000a, 0x7f: 0x000b,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x000b, 0xc1: 0x000b, 0xc2: 0x000b, 0xc3: 0x000b, 0xc4: 0x000b, 0xc5: 0x0007,\n\t0xc6: 0x000b, 0xc7: 0x000b, 0xc8: 0x000b, 0xc9: 0x000b, 0xca: 0x000b, 0xcb: 0x000b,\n\t0xcc: 0x000b, 0xcd: 0x000b, 0xce: 0x000b, 0xcf: 0x000b, 0xd0: 0x000b, 0xd1: 0x000b,\n\t0xd2: 0x000b, 0xd3: 0x000b, 0xd4: 0x000b, 0xd5: 0x000b, 0xd6: 0x000b, 0xd7: 0x000b,\n\t0xd8: 0x000b, 0xd9: 0x000b, 0xda: 0x000b, 0xdb: 0x000b, 0xdc: 0x000b, 0xdd: 0x000b,\n\t0xde: 0x000b, 0xdf: 0x000b, 0xe0: 0x0006, 0xe1: 0x000a, 0xe2: 0x0004, 0xe3: 0x0004,\n\t0xe4: 0x0004, 0xe5: 0x0004, 0xe6: 0x000a, 0xe7: 0x000a, 0xe8: 0x000a, 0xe9: 0x000a,\n\t0xeb: 0x000a, 0xec: 0x000a, 0xed: 0x000b, 0xee: 0x000a, 0xef: 0x000a,\n\t0xf0: 0x0004, 0xf1: 0x0004, 0xf2: 0x0002, 0xf3: 0x0002, 0xf4: 0x000a,\n\t0xf6: 0x000a, 0xf7: 0x000a, 0xf8: 0x000a, 0xf9: 0x0002, 0xfb: 0x000a,\n\t0xfc: 0x000a, 0xfd: 0x000a, 0xfe: 0x000a, 0xff: 0x000a,\n\t// Block 0x4, offset 0x100\n\t0x117: 0x000a,\n\t0x137: 0x000a,\n\t// Block 0x5, offset 0x140\n\t0x179: 0x000a, 0x17a: 0x000a,\n\t// Block 0x6, offset 0x180\n\t0x182: 0x000a, 0x183: 0x000a, 0x184: 0x000a, 0x185: 0x000a,\n\t0x186: 0x000a, 0x187: 0x000a, 0x188: 0x000a, 0x189: 0x000a, 0x18a: 0x000a, 0x18b: 0x000a,\n\t0x18c: 0x000a, 0x18d: 0x000a, 0x18e: 0x000a, 0x18f: 0x000a,\n\t0x192: 0x000a, 0x193: 0x000a, 0x194: 0x000a, 0x195: 0x000a, 0x196: 0x000a, 0x197: 0x000a,\n\t0x198: 0x000a, 0x199: 0x000a, 0x19a: 0x000a, 0x19b: 0x000a, 0x19c: 0x000a, 0x19d: 0x000a,\n\t0x19e: 0x000a, 0x19f: 0x000a,\n\t0x1a5: 0x000a, 0x1a6: 0x000a, 0x1a7: 0x000a, 0x1a8: 0x000a, 0x1a9: 0x000a,\n\t0x1aa: 0x000a, 0x1ab: 0x000a, 0x1ac: 0x000a, 0x1ad: 0x000a, 0x1af: 0x000a,\n\t0x1b0: 0x000a, 0x1b1: 0x000a, 0x1b2: 0x000a, 0x1b3: 0x000a, 0x1b4: 0x000a, 0x1b5: 0x000a,\n\t0x1b6: 0x000a, 0x1b7: 0x000a, 0x1b8: 0x000a, 0x1b9: 0x000a, 0x1ba: 0x000a, 0x1bb: 0x000a,\n\t0x1bc: 0x000a, 0x1bd: 0x000a, 0x1be: 0x000a, 0x1bf: 0x000a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x000c, 0x1c1: 0x000c, 0x1c2: 0x000c, 0x1c3: 0x000c, 0x1c4: 0x000c, 0x1c5: 0x000c,\n\t0x1c6: 0x000c, 0x1c7: 0x000c, 0x1c8: 0x000c, 0x1c9: 0x000c, 0x1ca: 0x000c, 0x1cb: 0x000c,\n\t0x1cc: 0x000c, 0x1cd: 0x000c, 0x1ce: 0x000c, 0x1cf: 0x000c, 0x1d0: 0x000c, 0x1d1: 0x000c,\n\t0x1d2: 0x000c, 0x1d3: 0x000c, 0x1d4: 0x000c, 0x1d5: 0x000c, 0x1d6: 0x000c, 0x1d7: 0x000c,\n\t0x1d8: 0x000c, 0x1d9: 0x000c, 0x1da: 0x000c, 0x1db: 0x000c, 0x1dc: 0x000c, 0x1dd: 0x000c,\n\t0x1de: 0x000c, 0x1df: 0x000c, 0x1e0: 0x000c, 0x1e1: 0x000c, 0x1e2: 0x000c, 0x1e3: 0x000c,\n\t0x1e4: 0x000c, 0x1e5: 0x000c, 0x1e6: 0x000c, 0x1e7: 0x000c, 0x1e8: 0x000c, 0x1e9: 0x000c,\n\t0x1ea: 0x000c, 0x1eb: 0x000c, 0x1ec: 0x000c, 0x1ed: 0x000c, 0x1ee: 0x000c, 0x1ef: 0x000c,\n\t0x1f0: 0x000c, 0x1f1: 0x000c, 0x1f2: 0x000c, 0x1f3: 0x000c, 0x1f4: 0x000c, 0x1f5: 0x000c,\n\t0x1f6: 0x000c, 0x1f7: 0x000c, 0x1f8: 0x000c, 0x1f9: 0x000c, 0x1fa: 0x000c, 0x1fb: 0x000c,\n\t0x1fc: 0x000c, 0x1fd: 0x000c, 0x1fe: 0x000c, 0x1ff: 0x000c,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x000c, 0x201: 0x000c, 0x202: 0x000c, 0x203: 0x000c, 0x204: 0x000c, 0x205: 0x000c,\n\t0x206: 0x000c, 0x207: 0x000c, 0x208: 0x000c, 0x209: 0x000c, 0x20a: 0x000c, 0x20b: 0x000c,\n\t0x20c: 0x000c, 0x20d: 0x000c, 0x20e: 0x000c, 0x20f: 0x000c, 0x210: 0x000c, 0x211: 0x000c,\n\t0x212: 0x000c, 0x213: 0x000c, 0x214: 0x000c, 0x215: 0x000c, 0x216: 0x000c, 0x217: 0x000c,\n\t0x218: 0x000c, 0x219: 0x000c, 0x21a: 0x000c, 0x21b: 0x000c, 0x21c: 0x000c, 0x21d: 0x000c,\n\t0x21e: 0x000c, 0x21f: 0x000c, 0x220: 0x000c, 0x221: 0x000c, 0x222: 0x000c, 0x223: 0x000c,\n\t0x224: 0x000c, 0x225: 0x000c, 0x226: 0x000c, 0x227: 0x000c, 0x228: 0x000c, 0x229: 0x000c,\n\t0x22a: 0x000c, 0x22b: 0x000c, 0x22c: 0x000c, 0x22d: 0x000c, 0x22e: 0x000c, 0x22f: 0x000c,\n\t0x234: 0x000a, 0x235: 0x000a,\n\t0x23e: 0x000a,\n\t// Block 0x9, offset 0x240\n\t0x244: 0x000a, 0x245: 0x000a,\n\t0x247: 0x000a,\n\t// Block 0xa, offset 0x280\n\t0x2b6: 0x000a,\n\t// Block 0xb, offset 0x2c0\n\t0x2c3: 0x000c, 0x2c4: 0x000c, 0x2c5: 0x000c,\n\t0x2c6: 0x000c, 0x2c7: 0x000c, 0x2c8: 0x000c, 0x2c9: 0x000c,\n\t// Block 0xc, offset 0x300\n\t0x30a: 0x000a,\n\t0x30d: 0x000a, 0x30e: 0x000a, 0x30f: 0x0004, 0x310: 0x0001, 0x311: 0x000c,\n\t0x312: 0x000c, 0x313: 0x000c, 0x314: 0x000c, 0x315: 0x000c, 0x316: 0x000c, 0x317: 0x000c,\n\t0x318: 0x000c, 0x319: 0x000c, 0x31a: 0x000c, 0x31b: 0x000c, 0x31c: 0x000c, 0x31d: 0x000c,\n\t0x31e: 0x000c, 0x31f: 0x000c, 0x320: 0x000c, 0x321: 0x000c, 0x322: 0x000c, 0x323: 0x000c,\n\t0x324: 0x000c, 0x325: 0x000c, 0x326: 0x000c, 0x327: 0x000c, 0x328: 0x000c, 0x329: 0x000c,\n\t0x32a: 0x000c, 0x32b: 0x000c, 0x32c: 0x000c, 0x32d: 0x000c, 0x32e: 0x000c, 0x32f: 0x000c,\n\t0x330: 0x000c, 0x331: 0x000c, 0x332: 0x000c, 0x333: 0x000c, 0x334: 0x000c, 0x335: 0x000c,\n\t0x336: 0x000c, 0x337: 0x000c, 0x338: 0x000c, 0x339: 0x000c, 0x33a: 0x000c, 0x33b: 0x000c,\n\t0x33c: 0x000c, 0x33d: 0x000c, 0x33e: 0x0001, 0x33f: 0x000c,\n\t// Block 0xd, offset 0x340\n\t0x340: 0x0001, 0x341: 0x000c, 0x342: 0x000c, 0x343: 0x0001, 0x344: 0x000c, 0x345: 0x000c,\n\t0x346: 0x0001, 0x347: 0x000c, 0x348: 0x0001, 0x349: 0x0001, 0x34a: 0x0001, 0x34b: 0x0001,\n\t0x34c: 0x0001, 0x34d: 0x0001, 0x34e: 0x0001, 0x34f: 0x0001, 0x350: 0x0001, 0x351: 0x0001,\n\t0x352: 0x0001, 0x353: 0x0001, 0x354: 0x0001, 0x355: 0x0001, 0x356: 0x0001, 0x357: 0x0001,\n\t0x358: 0x0001, 0x359: 0x0001, 0x35a: 0x0001, 0x35b: 0x0001, 0x35c: 0x0001, 0x35d: 0x0001,\n\t0x35e: 0x0001, 0x35f: 0x0001, 0x360: 0x0001, 0x361: 0x0001, 0x362: 0x0001, 0x363: 0x0001,\n\t0x364: 0x0001, 0x365: 0x0001, 0x366: 0x0001, 0x367: 0x0001, 0x368: 0x0001, 0x369: 0x0001,\n\t0x36a: 0x0001, 0x36b: 0x0001, 0x36c: 0x0001, 0x36d: 0x0001, 0x36e: 0x0001, 0x36f: 0x0001,\n\t0x370: 0x0001, 0x371: 0x0001, 0x372: 0x0001, 0x373: 0x0001, 0x374: 0x0001, 0x375: 0x0001,\n\t0x376: 0x0001, 0x377: 0x0001, 0x378: 0x0001, 0x379: 0x0001, 0x37a: 0x0001, 0x37b: 0x0001,\n\t0x37c: 0x0001, 0x37d: 0x0001, 0x37e: 0x0001, 0x37f: 0x0001,\n\t// Block 0xe, offset 0x380\n\t0x380: 0x0005, 0x381: 0x0005, 0x382: 0x0005, 0x383: 0x0005, 0x384: 0x0005, 0x385: 0x0005,\n\t0x386: 0x000a, 0x387: 0x000a, 0x388: 0x000d, 0x389: 0x0004, 0x38a: 0x0004, 0x38b: 0x000d,\n\t0x38c: 0x0006, 0x38d: 0x000d, 0x38e: 0x000a, 0x38f: 0x000a, 0x390: 0x000c, 0x391: 0x000c,\n\t0x392: 0x000c, 0x393: 0x000c, 0x394: 0x000c, 0x395: 0x000c, 0x396: 0x000c, 0x397: 0x000c,\n\t0x398: 0x000c, 0x399: 0x000c, 0x39a: 0x000c, 0x39b: 0x000d, 0x39c: 0x000d, 0x39d: 0x000d,\n\t0x39e: 0x000d, 0x39f: 0x000d, 0x3a0: 0x000d, 0x3a1: 0x000d, 0x3a2: 0x000d, 0x3a3: 0x000d,\n\t0x3a4: 0x000d, 0x3a5: 0x000d, 0x3a6: 0x000d, 0x3a7: 0x000d, 0x3a8: 0x000d, 0x3a9: 0x000d,\n\t0x3aa: 0x000d, 0x3ab: 0x000d, 0x3ac: 0x000d, 0x3ad: 0x000d, 0x3ae: 0x000d, 0x3af: 0x000d,\n\t0x3b0: 0x000d, 0x3b1: 0x000d, 0x3b2: 0x000d, 0x3b3: 0x000d, 0x3b4: 0x000d, 0x3b5: 0x000d,\n\t0x3b6: 0x000d, 0x3b7: 0x000d, 0x3b8: 0x000d, 0x3b9: 0x000d, 0x3ba: 0x000d, 0x3bb: 0x000d,\n\t0x3bc: 0x000d, 0x3bd: 0x000d, 0x3be: 0x000d, 0x3bf: 0x000d,\n\t// Block 0xf, offset 0x3c0\n\t0x3c0: 0x000d, 0x3c1: 0x000d, 0x3c2: 0x000d, 0x3c3: 0x000d, 0x3c4: 0x000d, 0x3c5: 0x000d,\n\t0x3c6: 0x000d, 0x3c7: 0x000d, 0x3c8: 0x000d, 0x3c9: 0x000d, 0x3ca: 0x000d, 0x3cb: 0x000c,\n\t0x3cc: 0x000c, 0x3cd: 0x000c, 0x3ce: 0x000c, 0x3cf: 0x000c, 0x3d0: 0x000c, 0x3d1: 0x000c,\n\t0x3d2: 0x000c, 0x3d3: 0x000c, 0x3d4: 0x000c, 0x3d5: 0x000c, 0x3d6: 0x000c, 0x3d7: 0x000c,\n\t0x3d8: 0x000c, 0x3d9: 0x000c, 0x3da: 0x000c, 0x3db: 0x000c, 0x3dc: 0x000c, 0x3dd: 0x000c,\n\t0x3de: 0x000c, 0x3df: 0x000c, 0x3e0: 0x0005, 0x3e1: 0x0005, 0x3e2: 0x0005, 0x3e3: 0x0005,\n\t0x3e4: 0x0005, 0x3e5: 0x0005, 0x3e6: 0x0005, 0x3e7: 0x0005, 0x3e8: 0x0005, 0x3e9: 0x0005,\n\t0x3ea: 0x0004, 0x3eb: 0x0005, 0x3ec: 0x0005, 0x3ed: 0x000d, 0x3ee: 0x000d, 0x3ef: 0x000d,\n\t0x3f0: 0x000c, 0x3f1: 0x000d, 0x3f2: 0x000d, 0x3f3: 0x000d, 0x3f4: 0x000d, 0x3f5: 0x000d,\n\t0x3f6: 0x000d, 0x3f7: 0x000d, 0x3f8: 0x000d, 0x3f9: 0x000d, 0x3fa: 0x000d, 0x3fb: 0x000d,\n\t0x3fc: 0x000d, 0x3fd: 0x000d, 0x3fe: 0x000d, 0x3ff: 0x000d,\n\t// Block 0x10, offset 0x400\n\t0x400: 0x000d, 0x401: 0x000d, 0x402: 0x000d, 0x403: 0x000d, 0x404: 0x000d, 0x405: 0x000d,\n\t0x406: 0x000d, 0x407: 0x000d, 0x408: 0x000d, 0x409: 0x000d, 0x40a: 0x000d, 0x40b: 0x000d,\n\t0x40c: 0x000d, 0x40d: 0x000d, 0x40e: 0x000d, 0x40f: 0x000d, 0x410: 0x000d, 0x411: 0x000d,\n\t0x412: 0x000d, 0x413: 0x000d, 0x414: 0x000d, 0x415: 0x000d, 0x416: 0x000d, 0x417: 0x000d,\n\t0x418: 0x000d, 0x419: 0x000d, 0x41a: 0x000d, 0x41b: 0x000d, 0x41c: 0x000d, 0x41d: 0x000d,\n\t0x41e: 0x000d, 0x41f: 0x000d, 0x420: 0x000d, 0x421: 0x000d, 0x422: 0x000d, 0x423: 0x000d,\n\t0x424: 0x000d, 0x425: 0x000d, 0x426: 0x000d, 0x427: 0x000d, 0x428: 0x000d, 0x429: 0x000d,\n\t0x42a: 0x000d, 0x42b: 0x000d, 0x42c: 0x000d, 0x42d: 0x000d, 0x42e: 0x000d, 0x42f: 0x000d,\n\t0x430: 0x000d, 0x431: 0x000d, 0x432: 0x000d, 0x433: 0x000d, 0x434: 0x000d, 0x435: 0x000d,\n\t0x436: 0x000d, 0x437: 0x000d, 0x438: 0x000d, 0x439: 0x000d, 0x43a: 0x000d, 0x43b: 0x000d,\n\t0x43c: 0x000d, 0x43d: 0x000d, 0x43e: 0x000d, 0x43f: 0x000d,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x000d, 0x441: 0x000d, 0x442: 0x000d, 0x443: 0x000d, 0x444: 0x000d, 0x445: 0x000d,\n\t0x446: 0x000d, 0x447: 0x000d, 0x448: 0x000d, 0x449: 0x000d, 0x44a: 0x000d, 0x44b: 0x000d,\n\t0x44c: 0x000d, 0x44d: 0x000d, 0x44e: 0x000d, 0x44f: 0x000d, 0x450: 0x000d, 0x451: 0x000d,\n\t0x452: 0x000d, 0x453: 0x000d, 0x454: 0x000d, 0x455: 0x000d, 0x456: 0x000c, 0x457: 0x000c,\n\t0x458: 0x000c, 0x459: 0x000c, 0x45a: 0x000c, 0x45b: 0x000c, 0x45c: 0x000c, 0x45d: 0x0005,\n\t0x45e: 0x000a, 0x45f: 0x000c, 0x460: 0x000c, 0x461: 0x000c, 0x462: 0x000c, 0x463: 0x000c,\n\t0x464: 0x000c, 0x465: 0x000d, 0x466: 0x000d, 0x467: 0x000c, 0x468: 0x000c, 0x469: 0x000a,\n\t0x46a: 0x000c, 0x46b: 0x000c, 0x46c: 0x000c, 0x46d: 0x000c, 0x46e: 0x000d, 0x46f: 0x000d,\n\t0x470: 0x0002, 0x471: 0x0002, 0x472: 0x0002, 0x473: 0x0002, 0x474: 0x0002, 0x475: 0x0002,\n\t0x476: 0x0002, 0x477: 0x0002, 0x478: 0x0002, 0x479: 0x0002, 0x47a: 0x000d, 0x47b: 0x000d,\n\t0x47c: 0x000d, 0x47d: 0x000d, 0x47e: 0x000d, 0x47f: 0x000d,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x000d, 0x481: 0x000d, 0x482: 0x000d, 0x483: 0x000d, 0x484: 0x000d, 0x485: 0x000d,\n\t0x486: 0x000d, 0x487: 0x000d, 0x488: 0x000d, 0x489: 0x000d, 0x48a: 0x000d, 0x48b: 0x000d,\n\t0x48c: 0x000d, 0x48d: 0x000d, 0x48e: 0x000d, 0x48f: 0x000d, 0x490: 0x000d, 0x491: 0x000c,\n\t0x492: 0x000d, 0x493: 0x000d, 0x494: 0x000d, 0x495: 0x000d, 0x496: 0x000d, 0x497: 0x000d,\n\t0x498: 0x000d, 0x499: 0x000d, 0x49a: 0x000d, 0x49b: 0x000d, 0x49c: 0x000d, 0x49d: 0x000d,\n\t0x49e: 0x000d, 0x49f: 0x000d, 0x4a0: 0x000d, 0x4a1: 0x000d, 0x4a2: 0x000d, 0x4a3: 0x000d,\n\t0x4a4: 0x000d, 0x4a5: 0x000d, 0x4a6: 0x000d, 0x4a7: 0x000d, 0x4a8: 0x000d, 0x4a9: 0x000d,\n\t0x4aa: 0x000d, 0x4ab: 0x000d, 0x4ac: 0x000d, 0x4ad: 0x000d, 0x4ae: 0x000d, 0x4af: 0x000d,\n\t0x4b0: 0x000c, 0x4b1: 0x000c, 0x4b2: 0x000c, 0x4b3: 0x000c, 0x4b4: 0x000c, 0x4b5: 0x000c,\n\t0x4b6: 0x000c, 0x4b7: 0x000c, 0x4b8: 0x000c, 0x4b9: 0x000c, 0x4ba: 0x000c, 0x4bb: 0x000c,\n\t0x4bc: 0x000c, 0x4bd: 0x000c, 0x4be: 0x000c, 0x4bf: 0x000c,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x000c, 0x4c1: 0x000c, 0x4c2: 0x000c, 0x4c3: 0x000c, 0x4c4: 0x000c, 0x4c5: 0x000c,\n\t0x4c6: 0x000c, 0x4c7: 0x000c, 0x4c8: 0x000c, 0x4c9: 0x000c, 0x4ca: 0x000c, 0x4cb: 0x000d,\n\t0x4cc: 0x000d, 0x4cd: 0x000d, 0x4ce: 0x000d, 0x4cf: 0x000d, 0x4d0: 0x000d, 0x4d1: 0x000d,\n\t0x4d2: 0x000d, 0x4d3: 0x000d, 0x4d4: 0x000d, 0x4d5: 0x000d, 0x4d6: 0x000d, 0x4d7: 0x000d,\n\t0x4d8: 0x000d, 0x4d9: 0x000d, 0x4da: 0x000d, 0x4db: 0x000d, 0x4dc: 0x000d, 0x4dd: 0x000d,\n\t0x4de: 0x000d, 0x4df: 0x000d, 0x4e0: 0x000d, 0x4e1: 0x000d, 0x4e2: 0x000d, 0x4e3: 0x000d,\n\t0x4e4: 0x000d, 0x4e5: 0x000d, 0x4e6: 0x000d, 0x4e7: 0x000d, 0x4e8: 0x000d, 0x4e9: 0x000d,\n\t0x4ea: 0x000d, 0x4eb: 0x000d, 0x4ec: 0x000d, 0x4ed: 0x000d, 0x4ee: 0x000d, 0x4ef: 0x000d,\n\t0x4f0: 0x000d, 0x4f1: 0x000d, 0x4f2: 0x000d, 0x4f3: 0x000d, 0x4f4: 0x000d, 0x4f5: 0x000d,\n\t0x4f6: 0x000d, 0x4f7: 0x000d, 0x4f8: 0x000d, 0x4f9: 0x000d, 0x4fa: 0x000d, 0x4fb: 0x000d,\n\t0x4fc: 0x000d, 0x4fd: 0x000d, 0x4fe: 0x000d, 0x4ff: 0x000d,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x000d, 0x501: 0x000d, 0x502: 0x000d, 0x503: 0x000d, 0x504: 0x000d, 0x505: 0x000d,\n\t0x506: 0x000d, 0x507: 0x000d, 0x508: 0x000d, 0x509: 0x000d, 0x50a: 0x000d, 0x50b: 0x000d,\n\t0x50c: 0x000d, 0x50d: 0x000d, 0x50e: 0x000d, 0x50f: 0x000d, 0x510: 0x000d, 0x511: 0x000d,\n\t0x512: 0x000d, 0x513: 0x000d, 0x514: 0x000d, 0x515: 0x000d, 0x516: 0x000d, 0x517: 0x000d,\n\t0x518: 0x000d, 0x519: 0x000d, 0x51a: 0x000d, 0x51b: 0x000d, 0x51c: 0x000d, 0x51d: 0x000d,\n\t0x51e: 0x000d, 0x51f: 0x000d, 0x520: 0x000d, 0x521: 0x000d, 0x522: 0x000d, 0x523: 0x000d,\n\t0x524: 0x000d, 0x525: 0x000d, 0x526: 0x000c, 0x527: 0x000c, 0x528: 0x000c, 0x529: 0x000c,\n\t0x52a: 0x000c, 0x52b: 0x000c, 0x52c: 0x000c, 0x52d: 0x000c, 0x52e: 0x000c, 0x52f: 0x000c,\n\t0x530: 0x000c, 0x531: 0x000d, 0x532: 0x000d, 0x533: 0x000d, 0x534: 0x000d, 0x535: 0x000d,\n\t0x536: 0x000d, 0x537: 0x000d, 0x538: 0x000d, 0x539: 0x000d, 0x53a: 0x000d, 0x53b: 0x000d,\n\t0x53c: 0x000d, 0x53d: 0x000d, 0x53e: 0x000d, 0x53f: 0x000d,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x0001, 0x541: 0x0001, 0x542: 0x0001, 0x543: 0x0001, 0x544: 0x0001, 0x545: 0x0001,\n\t0x546: 0x0001, 0x547: 0x0001, 0x548: 0x0001, 0x549: 0x0001, 0x54a: 0x0001, 0x54b: 0x0001,\n\t0x54c: 0x0001, 0x54d: 0x0001, 0x54e: 0x0001, 0x54f: 0x0001, 0x550: 0x0001, 0x551: 0x0001,\n\t0x552: 0x0001, 0x553: 0x0001, 0x554: 0x0001, 0x555: 0x0001, 0x556: 0x0001, 0x557: 0x0001,\n\t0x558: 0x0001, 0x559: 0x0001, 0x55a: 0x0001, 0x55b: 0x0001, 0x55c: 0x0001, 0x55d: 0x0001,\n\t0x55e: 0x0001, 0x55f: 0x0001, 0x560: 0x0001, 0x561: 0x0001, 0x562: 0x0001, 0x563: 0x0001,\n\t0x564: 0x0001, 0x565: 0x0001, 0x566: 0x0001, 0x567: 0x0001, 0x568: 0x0001, 0x569: 0x0001,\n\t0x56a: 0x0001, 0x56b: 0x000c, 0x56c: 0x000c, 0x56d: 0x000c, 0x56e: 0x000c, 0x56f: 0x000c,\n\t0x570: 0x000c, 0x571: 0x000c, 0x572: 0x000c, 0x573: 0x000c, 0x574: 0x0001, 0x575: 0x0001,\n\t0x576: 0x000a, 0x577: 0x000a, 0x578: 0x000a, 0x579: 0x000a, 0x57a: 0x0001, 0x57b: 0x0001,\n\t0x57c: 0x0001, 0x57d: 0x000c, 0x57e: 0x0001, 0x57f: 0x0001,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x0001, 0x581: 0x0001, 0x582: 0x0001, 0x583: 0x0001, 0x584: 0x0001, 0x585: 0x0001,\n\t0x586: 0x0001, 0x587: 0x0001, 0x588: 0x0001, 0x589: 0x0001, 0x58a: 0x0001, 0x58b: 0x0001,\n\t0x58c: 0x0001, 0x58d: 0x0001, 0x58e: 0x0001, 0x58f: 0x0001, 0x590: 0x0001, 0x591: 0x0001,\n\t0x592: 0x0001, 0x593: 0x0001, 0x594: 0x0001, 0x595: 0x0001, 0x596: 0x000c, 0x597: 0x000c,\n\t0x598: 0x000c, 0x599: 0x000c, 0x59a: 0x0001, 0x59b: 0x000c, 0x59c: 0x000c, 0x59d: 0x000c,\n\t0x59e: 0x000c, 0x59f: 0x000c, 0x5a0: 0x000c, 0x5a1: 0x000c, 0x5a2: 0x000c, 0x5a3: 0x000c,\n\t0x5a4: 0x0001, 0x5a5: 0x000c, 0x5a6: 0x000c, 0x5a7: 0x000c, 0x5a8: 0x0001, 0x5a9: 0x000c,\n\t0x5aa: 0x000c, 0x5ab: 0x000c, 0x5ac: 0x000c, 0x5ad: 0x000c, 0x5ae: 0x0001, 0x5af: 0x0001,\n\t0x5b0: 0x0001, 0x5b1: 0x0001, 0x5b2: 0x0001, 0x5b3: 0x0001, 0x5b4: 0x0001, 0x5b5: 0x0001,\n\t0x5b6: 0x0001, 0x5b7: 0x0001, 0x5b8: 0x0001, 0x5b9: 0x0001, 0x5ba: 0x0001, 0x5bb: 0x0001,\n\t0x5bc: 0x0001, 0x5bd: 0x0001, 0x5be: 0x0001, 0x5bf: 0x0001,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x0001, 0x5c1: 0x0001, 0x5c2: 0x0001, 0x5c3: 0x0001, 0x5c4: 0x0001, 0x5c5: 0x0001,\n\t0x5c6: 0x0001, 0x5c7: 0x0001, 0x5c8: 0x0001, 0x5c9: 0x0001, 0x5ca: 0x0001, 0x5cb: 0x0001,\n\t0x5cc: 0x0001, 0x5cd: 0x0001, 0x5ce: 0x0001, 0x5cf: 0x0001, 0x5d0: 0x0001, 0x5d1: 0x0001,\n\t0x5d2: 0x0001, 0x5d3: 0x0001, 0x5d4: 0x0001, 0x5d5: 0x0001, 0x5d6: 0x0001, 0x5d7: 0x0001,\n\t0x5d8: 0x0001, 0x5d9: 0x000c, 0x5da: 0x000c, 0x5db: 0x000c, 0x5dc: 0x0001, 0x5dd: 0x0001,\n\t0x5de: 0x0001, 0x5df: 0x0001, 0x5e0: 0x000d, 0x5e1: 0x000d, 0x5e2: 0x000d, 0x5e3: 0x000d,\n\t0x5e4: 0x000d, 0x5e5: 0x000d, 0x5e6: 0x000d, 0x5e7: 0x000d, 0x5e8: 0x000d, 0x5e9: 0x000d,\n\t0x5ea: 0x000d, 0x5eb: 0x0001, 0x5ec: 0x0001, 0x5ed: 0x0001, 0x5ee: 0x0001, 0x5ef: 0x0001,\n\t0x5f0: 0x000d, 0x5f1: 0x000d, 0x5f2: 0x000d, 0x5f3: 0x000d, 0x5f4: 0x000d, 0x5f5: 0x000d,\n\t0x5f6: 0x000d, 0x5f7: 0x000d, 0x5f8: 0x000d, 0x5f9: 0x000d, 0x5fa: 0x000d, 0x5fb: 0x000d,\n\t0x5fc: 0x000d, 0x5fd: 0x000d, 0x5fe: 0x000d, 0x5ff: 0x000d,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x000d, 0x601: 0x000d, 0x602: 0x000d, 0x603: 0x000d, 0x604: 0x000d, 0x605: 0x000d,\n\t0x606: 0x000d, 0x607: 0x000d, 0x608: 0x000d, 0x609: 0x000d, 0x60a: 0x000d, 0x60b: 0x000d,\n\t0x60c: 0x000d, 0x60d: 0x000d, 0x60e: 0x000d, 0x60f: 0x000d, 0x610: 0x0005, 0x611: 0x0005,\n\t0x612: 0x0001, 0x613: 0x0001, 0x614: 0x0001, 0x615: 0x0001, 0x616: 0x0001, 0x617: 0x000c,\n\t0x618: 0x000c, 0x619: 0x000c, 0x61a: 0x000c, 0x61b: 0x000c, 0x61c: 0x000c, 0x61d: 0x000c,\n\t0x61e: 0x000c, 0x61f: 0x000c, 0x620: 0x000d, 0x621: 0x000d, 0x622: 0x000d, 0x623: 0x000d,\n\t0x624: 0x000d, 0x625: 0x000d, 0x626: 0x000d, 0x627: 0x000d, 0x628: 0x000d, 0x629: 0x000d,\n\t0x62a: 0x000d, 0x62b: 0x000d, 0x62c: 0x000d, 0x62d: 0x000d, 0x62e: 0x000d, 0x62f: 0x000d,\n\t0x630: 0x000d, 0x631: 0x000d, 0x632: 0x000d, 0x633: 0x000d, 0x634: 0x000d, 0x635: 0x000d,\n\t0x636: 0x000d, 0x637: 0x000d, 0x638: 0x000d, 0x639: 0x000d, 0x63a: 0x000d, 0x63b: 0x000d,\n\t0x63c: 0x000d, 0x63d: 0x000d, 0x63e: 0x000d, 0x63f: 0x000d,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x000d, 0x641: 0x000d, 0x642: 0x000d, 0x643: 0x000d, 0x644: 0x000d, 0x645: 0x000d,\n\t0x646: 0x000d, 0x647: 0x000d, 0x648: 0x000d, 0x649: 0x000d, 0x64a: 0x000c, 0x64b: 0x000c,\n\t0x64c: 0x000c, 0x64d: 0x000c, 0x64e: 0x000c, 0x64f: 0x000c, 0x650: 0x000c, 0x651: 0x000c,\n\t0x652: 0x000c, 0x653: 0x000c, 0x654: 0x000c, 0x655: 0x000c, 0x656: 0x000c, 0x657: 0x000c,\n\t0x658: 0x000c, 0x659: 0x000c, 0x65a: 0x000c, 0x65b: 0x000c, 0x65c: 0x000c, 0x65d: 0x000c,\n\t0x65e: 0x000c, 0x65f: 0x000c, 0x660: 0x000c, 0x661: 0x000c, 0x662: 0x0005, 0x663: 0x000c,\n\t0x664: 0x000c, 0x665: 0x000c, 0x666: 0x000c, 0x667: 0x000c, 0x668: 0x000c, 0x669: 0x000c,\n\t0x66a: 0x000c, 0x66b: 0x000c, 0x66c: 0x000c, 0x66d: 0x000c, 0x66e: 0x000c, 0x66f: 0x000c,\n\t0x670: 0x000c, 0x671: 0x000c, 0x672: 0x000c, 0x673: 0x000c, 0x674: 0x000c, 0x675: 0x000c,\n\t0x676: 0x000c, 0x677: 0x000c, 0x678: 0x000c, 0x679: 0x000c, 0x67a: 0x000c, 0x67b: 0x000c,\n\t0x67c: 0x000c, 0x67d: 0x000c, 0x67e: 0x000c, 0x67f: 0x000c,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x000c, 0x681: 0x000c, 0x682: 0x000c,\n\t0x6ba: 0x000c,\n\t0x6bc: 0x000c,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c1: 0x000c, 0x6c2: 0x000c, 0x6c3: 0x000c, 0x6c4: 0x000c, 0x6c5: 0x000c,\n\t0x6c6: 0x000c, 0x6c7: 0x000c, 0x6c8: 0x000c,\n\t0x6cd: 0x000c, 0x6d1: 0x000c,\n\t0x6d2: 0x000c, 0x6d3: 0x000c, 0x6d4: 0x000c, 0x6d5: 0x000c, 0x6d6: 0x000c, 0x6d7: 0x000c,\n\t0x6e2: 0x000c, 0x6e3: 0x000c,\n\t// Block 0x1c, offset 0x700\n\t0x701: 0x000c,\n\t0x73c: 0x000c,\n\t// Block 0x1d, offset 0x740\n\t0x741: 0x000c, 0x742: 0x000c, 0x743: 0x000c, 0x744: 0x000c,\n\t0x74d: 0x000c,\n\t0x762: 0x000c, 0x763: 0x000c,\n\t0x772: 0x0004, 0x773: 0x0004,\n\t0x77b: 0x0004,\n\t0x77e: 0x000c,\n\t// Block 0x1e, offset 0x780\n\t0x781: 0x000c, 0x782: 0x000c,\n\t0x7bc: 0x000c,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c1: 0x000c, 0x7c2: 0x000c,\n\t0x7c7: 0x000c, 0x7c8: 0x000c, 0x7cb: 0x000c,\n\t0x7cc: 0x000c, 0x7cd: 0x000c, 0x7d1: 0x000c,\n\t0x7f0: 0x000c, 0x7f1: 0x000c, 0x7f5: 0x000c,\n\t// Block 0x20, offset 0x800\n\t0x801: 0x000c, 0x802: 0x000c, 0x803: 0x000c, 0x804: 0x000c, 0x805: 0x000c,\n\t0x807: 0x000c, 0x808: 0x000c,\n\t0x80d: 0x000c,\n\t0x822: 0x000c, 0x823: 0x000c,\n\t0x831: 0x0004,\n\t0x83a: 0x000c, 0x83b: 0x000c,\n\t0x83c: 0x000c, 0x83d: 0x000c, 0x83e: 0x000c, 0x83f: 0x000c,\n\t// Block 0x21, offset 0x840\n\t0x841: 0x000c,\n\t0x87c: 0x000c, 0x87f: 0x000c,\n\t// Block 0x22, offset 0x880\n\t0x881: 0x000c, 0x882: 0x000c, 0x883: 0x000c, 0x884: 0x000c,\n\t0x88d: 0x000c,\n\t0x895: 0x000c, 0x896: 0x000c,\n\t0x8a2: 0x000c, 0x8a3: 0x000c,\n\t// Block 0x23, offset 0x8c0\n\t0x8c2: 0x000c,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x000c,\n\t0x90d: 0x000c,\n\t0x933: 0x000a, 0x934: 0x000a, 0x935: 0x000a,\n\t0x936: 0x000a, 0x937: 0x000a, 0x938: 0x000a, 0x939: 0x0004, 0x93a: 0x000a,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x000c, 0x944: 0x000c,\n\t0x97c: 0x000c, 0x97e: 0x000c, 0x97f: 0x000c,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x000c,\n\t0x986: 0x000c, 0x987: 0x000c, 0x988: 0x000c, 0x98a: 0x000c, 0x98b: 0x000c,\n\t0x98c: 0x000c, 0x98d: 0x000c,\n\t0x995: 0x000c, 0x996: 0x000c,\n\t0x9a2: 0x000c, 0x9a3: 0x000c,\n\t0x9b8: 0x000a, 0x9b9: 0x000a, 0x9ba: 0x000a, 0x9bb: 0x000a,\n\t0x9bc: 0x000a, 0x9bd: 0x000a, 0x9be: 0x000a,\n\t// Block 0x27, offset 0x9c0\n\t0x9cc: 0x000c, 0x9cd: 0x000c,\n\t0x9e2: 0x000c, 0x9e3: 0x000c,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x000c, 0xa01: 0x000c,\n\t0xa3b: 0x000c,\n\t0xa3c: 0x000c,\n\t// Block 0x29, offset 0xa40\n\t0xa41: 0x000c, 0xa42: 0x000c, 0xa43: 0x000c, 0xa44: 0x000c,\n\t0xa4d: 0x000c,\n\t0xa62: 0x000c, 0xa63: 0x000c,\n\t// Block 0x2a, offset 0xa80\n\t0xa81: 0x000c,\n\t// Block 0x2b, offset 0xac0\n\t0xaca: 0x000c,\n\t0xad2: 0x000c, 0xad3: 0x000c, 0xad4: 0x000c, 0xad6: 0x000c,\n\t// Block 0x2c, offset 0xb00\n\t0xb31: 0x000c, 0xb34: 0x000c, 0xb35: 0x000c,\n\t0xb36: 0x000c, 0xb37: 0x000c, 0xb38: 0x000c, 0xb39: 0x000c, 0xb3a: 0x000c,\n\t0xb3f: 0x0004,\n\t// Block 0x2d, offset 0xb40\n\t0xb47: 0x000c, 0xb48: 0x000c, 0xb49: 0x000c, 0xb4a: 0x000c, 0xb4b: 0x000c,\n\t0xb4c: 0x000c, 0xb4d: 0x000c, 0xb4e: 0x000c,\n\t// Block 0x2e, offset 0xb80\n\t0xbb1: 0x000c, 0xbb4: 0x000c, 0xbb5: 0x000c,\n\t0xbb6: 0x000c, 0xbb7: 0x000c, 0xbb8: 0x000c, 0xbb9: 0x000c, 0xbba: 0x000c, 0xbbb: 0x000c,\n\t0xbbc: 0x000c,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc8: 0x000c, 0xbc9: 0x000c, 0xbca: 0x000c, 0xbcb: 0x000c,\n\t0xbcc: 0x000c, 0xbcd: 0x000c, 0xbce: 0x000c,\n\t// Block 0x30, offset 0xc00\n\t0xc18: 0x000c, 0xc19: 0x000c,\n\t0xc35: 0x000c,\n\t0xc37: 0x000c, 0xc39: 0x000c, 0xc3a: 0x003a, 0xc3b: 0x002a,\n\t0xc3c: 0x003a, 0xc3d: 0x002a,\n\t// Block 0x31, offset 0xc40\n\t0xc71: 0x000c, 0xc72: 0x000c, 0xc73: 0x000c, 0xc74: 0x000c, 0xc75: 0x000c,\n\t0xc76: 0x000c, 0xc77: 0x000c, 0xc78: 0x000c, 0xc79: 0x000c, 0xc7a: 0x000c, 0xc7b: 0x000c,\n\t0xc7c: 0x000c, 0xc7d: 0x000c, 0xc7e: 0x000c,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x000c, 0xc81: 0x000c, 0xc82: 0x000c, 0xc83: 0x000c, 0xc84: 0x000c,\n\t0xc86: 0x000c, 0xc87: 0x000c,\n\t0xc8d: 0x000c, 0xc8e: 0x000c, 0xc8f: 0x000c, 0xc90: 0x000c, 0xc91: 0x000c,\n\t0xc92: 0x000c, 0xc93: 0x000c, 0xc94: 0x000c, 0xc95: 0x000c, 0xc96: 0x000c, 0xc97: 0x000c,\n\t0xc99: 0x000c, 0xc9a: 0x000c, 0xc9b: 0x000c, 0xc9c: 0x000c, 0xc9d: 0x000c,\n\t0xc9e: 0x000c, 0xc9f: 0x000c, 0xca0: 0x000c, 0xca1: 0x000c, 0xca2: 0x000c, 0xca3: 0x000c,\n\t0xca4: 0x000c, 0xca5: 0x000c, 0xca6: 0x000c, 0xca7: 0x000c, 0xca8: 0x000c, 0xca9: 0x000c,\n\t0xcaa: 0x000c, 0xcab: 0x000c, 0xcac: 0x000c, 0xcad: 0x000c, 0xcae: 0x000c, 0xcaf: 0x000c,\n\t0xcb0: 0x000c, 0xcb1: 0x000c, 0xcb2: 0x000c, 0xcb3: 0x000c, 0xcb4: 0x000c, 0xcb5: 0x000c,\n\t0xcb6: 0x000c, 0xcb7: 0x000c, 0xcb8: 0x000c, 0xcb9: 0x000c, 0xcba: 0x000c, 0xcbb: 0x000c,\n\t0xcbc: 0x000c,\n\t// Block 0x33, offset 0xcc0\n\t0xcc6: 0x000c,\n\t// Block 0x34, offset 0xd00\n\t0xd2d: 0x000c, 0xd2e: 0x000c, 0xd2f: 0x000c,\n\t0xd30: 0x000c, 0xd32: 0x000c, 0xd33: 0x000c, 0xd34: 0x000c, 0xd35: 0x000c,\n\t0xd36: 0x000c, 0xd37: 0x000c, 0xd39: 0x000c, 0xd3a: 0x000c,\n\t0xd3d: 0x000c, 0xd3e: 0x000c,\n\t// Block 0x35, offset 0xd40\n\t0xd58: 0x000c, 0xd59: 0x000c,\n\t0xd5e: 0x000c, 0xd5f: 0x000c, 0xd60: 0x000c,\n\t0xd71: 0x000c, 0xd72: 0x000c, 0xd73: 0x000c, 0xd74: 0x000c,\n\t// Block 0x36, offset 0xd80\n\t0xd82: 0x000c, 0xd85: 0x000c,\n\t0xd86: 0x000c,\n\t0xd8d: 0x000c,\n\t0xd9d: 0x000c,\n\t// Block 0x37, offset 0xdc0\n\t0xddd: 0x000c,\n\t0xdde: 0x000c, 0xddf: 0x000c,\n\t// Block 0x38, offset 0xe00\n\t0xe10: 0x000a, 0xe11: 0x000a,\n\t0xe12: 0x000a, 0xe13: 0x000a, 0xe14: 0x000a, 0xe15: 0x000a, 0xe16: 0x000a, 0xe17: 0x000a,\n\t0xe18: 0x000a, 0xe19: 0x000a,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x000a,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x0009,\n\t0xe9b: 0x007a, 0xe9c: 0x006a,\n\t// Block 0x3b, offset 0xec0\n\t0xed2: 0x000c, 0xed3: 0x000c, 0xed4: 0x000c,\n\t0xef2: 0x000c, 0xef3: 0x000c,\n\t// Block 0x3c, offset 0xf00\n\t0xf12: 0x000c, 0xf13: 0x000c,\n\t0xf32: 0x000c, 0xf33: 0x000c,\n\t// Block 0x3d, offset 0xf40\n\t0xf74: 0x000c, 0xf75: 0x000c,\n\t0xf77: 0x000c, 0xf78: 0x000c, 0xf79: 0x000c, 0xf7a: 0x000c, 0xf7b: 0x000c,\n\t0xf7c: 0x000c, 0xf7d: 0x000c,\n\t// Block 0x3e, offset 0xf80\n\t0xf86: 0x000c, 0xf89: 0x000c, 0xf8a: 0x000c, 0xf8b: 0x000c,\n\t0xf8c: 0x000c, 0xf8d: 0x000c, 0xf8e: 0x000c, 0xf8f: 0x000c, 0xf90: 0x000c, 0xf91: 0x000c,\n\t0xf92: 0x000c, 0xf93: 0x000c,\n\t0xf9b: 0x0004, 0xf9d: 0x000c,\n\t0xfb0: 0x000a, 0xfb1: 0x000a, 0xfb2: 0x000a, 0xfb3: 0x000a, 0xfb4: 0x000a, 0xfb5: 0x000a,\n\t0xfb6: 0x000a, 0xfb7: 0x000a, 0xfb8: 0x000a, 0xfb9: 0x000a,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x000a, 0xfc1: 0x000a, 0xfc2: 0x000a, 0xfc3: 0x000a, 0xfc4: 0x000a, 0xfc5: 0x000a,\n\t0xfc6: 0x000a, 0xfc7: 0x000a, 0xfc8: 0x000a, 0xfc9: 0x000a, 0xfca: 0x000a, 0xfcb: 0x000c,\n\t0xfcc: 0x000c, 0xfcd: 0x000c, 0xfce: 0x000b, 0xfcf: 0x000c,\n\t// Block 0x40, offset 0x1000\n\t0x1005: 0x000c,\n\t0x1006: 0x000c,\n\t0x1029: 0x000c,\n\t// Block 0x41, offset 0x1040\n\t0x1060: 0x000c, 0x1061: 0x000c, 0x1062: 0x000c,\n\t0x1067: 0x000c, 0x1068: 0x000c,\n\t0x1072: 0x000c,\n\t0x1079: 0x000c, 0x107a: 0x000c, 0x107b: 0x000c,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x000a, 0x1084: 0x000a, 0x1085: 0x000a,\n\t// Block 0x43, offset 0x10c0\n\t0x10de: 0x000a, 0x10df: 0x000a, 0x10e0: 0x000a, 0x10e1: 0x000a, 0x10e2: 0x000a, 0x10e3: 0x000a,\n\t0x10e4: 0x000a, 0x10e5: 0x000a, 0x10e6: 0x000a, 0x10e7: 0x000a, 0x10e8: 0x000a, 0x10e9: 0x000a,\n\t0x10ea: 0x000a, 0x10eb: 0x000a, 0x10ec: 0x000a, 0x10ed: 0x000a, 0x10ee: 0x000a, 0x10ef: 0x000a,\n\t0x10f0: 0x000a, 0x10f1: 0x000a, 0x10f2: 0x000a, 0x10f3: 0x000a, 0x10f4: 0x000a, 0x10f5: 0x000a,\n\t0x10f6: 0x000a, 0x10f7: 0x000a, 0x10f8: 0x000a, 0x10f9: 0x000a, 0x10fa: 0x000a, 0x10fb: 0x000a,\n\t0x10fc: 0x000a, 0x10fd: 0x000a, 0x10fe: 0x000a, 0x10ff: 0x000a,\n\t// Block 0x44, offset 0x1100\n\t0x1117: 0x000c,\n\t0x1118: 0x000c, 0x111b: 0x000c,\n\t// Block 0x45, offset 0x1140\n\t0x1156: 0x000c,\n\t0x1158: 0x000c, 0x1159: 0x000c, 0x115a: 0x000c, 0x115b: 0x000c, 0x115c: 0x000c, 0x115d: 0x000c,\n\t0x115e: 0x000c, 0x1160: 0x000c, 0x1162: 0x000c,\n\t0x1165: 0x000c, 0x1166: 0x000c, 0x1167: 0x000c, 0x1168: 0x000c, 0x1169: 0x000c,\n\t0x116a: 0x000c, 0x116b: 0x000c, 0x116c: 0x000c,\n\t0x1173: 0x000c, 0x1174: 0x000c, 0x1175: 0x000c,\n\t0x1176: 0x000c, 0x1177: 0x000c, 0x1178: 0x000c, 0x1179: 0x000c, 0x117a: 0x000c, 0x117b: 0x000c,\n\t0x117c: 0x000c, 0x117f: 0x000c,\n\t// Block 0x46, offset 0x1180\n\t0x11b0: 0x000c, 0x11b1: 0x000c, 0x11b2: 0x000c, 0x11b3: 0x000c, 0x11b4: 0x000c, 0x11b5: 0x000c,\n\t0x11b6: 0x000c, 0x11b7: 0x000c, 0x11b8: 0x000c, 0x11b9: 0x000c, 0x11ba: 0x000c, 0x11bb: 0x000c,\n\t0x11bc: 0x000c, 0x11bd: 0x000c, 0x11be: 0x000c, 0x11bf: 0x000c,\n\t// Block 0x47, offset 0x11c0\n\t0x11c0: 0x000c, 0x11c1: 0x000c, 0x11c2: 0x000c, 0x11c3: 0x000c, 0x11c4: 0x000c, 0x11c5: 0x000c,\n\t0x11c6: 0x000c, 0x11c7: 0x000c, 0x11c8: 0x000c, 0x11c9: 0x000c, 0x11ca: 0x000c, 0x11cb: 0x000c,\n\t0x11cc: 0x000c, 0x11cd: 0x000c, 0x11ce: 0x000c, 0x11cf: 0x000c, 0x11d0: 0x000c, 0x11d1: 0x000c,\n\t0x11d2: 0x000c, 0x11d3: 0x000c, 0x11d4: 0x000c, 0x11d5: 0x000c, 0x11d6: 0x000c, 0x11d7: 0x000c,\n\t0x11d8: 0x000c, 0x11d9: 0x000c, 0x11da: 0x000c, 0x11db: 0x000c, 0x11dc: 0x000c, 0x11dd: 0x000c,\n\t0x11e0: 0x000c, 0x11e1: 0x000c, 0x11e2: 0x000c, 0x11e3: 0x000c,\n\t0x11e4: 0x000c, 0x11e5: 0x000c, 0x11e6: 0x000c, 0x11e7: 0x000c, 0x11e8: 0x000c, 0x11e9: 0x000c,\n\t0x11ea: 0x000c, 0x11eb: 0x000c,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x000c, 0x1201: 0x000c, 0x1202: 0x000c, 0x1203: 0x000c,\n\t0x1234: 0x000c,\n\t0x1236: 0x000c, 0x1237: 0x000c, 0x1238: 0x000c, 0x1239: 0x000c, 0x123a: 0x000c,\n\t0x123c: 0x000c,\n\t// Block 0x49, offset 0x1240\n\t0x1242: 0x000c,\n\t0x126b: 0x000c, 0x126c: 0x000c, 0x126d: 0x000c, 0x126e: 0x000c, 0x126f: 0x000c,\n\t0x1270: 0x000c, 0x1271: 0x000c, 0x1272: 0x000c, 0x1273: 0x000c,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x000c, 0x1281: 0x000c,\n\t0x12a2: 0x000c, 0x12a3: 0x000c,\n\t0x12a4: 0x000c, 0x12a5: 0x000c, 0x12a8: 0x000c, 0x12a9: 0x000c,\n\t0x12ab: 0x000c, 0x12ac: 0x000c, 0x12ad: 0x000c,\n\t// Block 0x4b, offset 0x12c0\n\t0x12e6: 0x000c, 0x12e8: 0x000c, 0x12e9: 0x000c,\n\t0x12ed: 0x000c, 0x12ef: 0x000c,\n\t0x12f0: 0x000c, 0x12f1: 0x000c,\n\t// Block 0x4c, offset 0x1300\n\t0x132c: 0x000c, 0x132d: 0x000c, 0x132e: 0x000c, 0x132f: 0x000c,\n\t0x1330: 0x000c, 0x1331: 0x000c, 0x1332: 0x000c, 0x1333: 0x000c,\n\t0x1336: 0x000c, 0x1337: 0x000c,\n\t// Block 0x4d, offset 0x1340\n\t0x1350: 0x000c, 0x1351: 0x000c,\n\t0x1352: 0x000c, 0x1354: 0x000c, 0x1355: 0x000c, 0x1356: 0x000c, 0x1357: 0x000c,\n\t0x1358: 0x000c, 0x1359: 0x000c, 0x135a: 0x000c, 0x135b: 0x000c, 0x135c: 0x000c, 0x135d: 0x000c,\n\t0x135e: 0x000c, 0x135f: 0x000c, 0x1360: 0x000c, 0x1362: 0x000c, 0x1363: 0x000c,\n\t0x1364: 0x000c, 0x1365: 0x000c, 0x1366: 0x000c, 0x1367: 0x000c, 0x1368: 0x000c,\n\t0x136d: 0x000c,\n\t0x1374: 0x000c,\n\t0x1378: 0x000c, 0x1379: 0x000c,\n\t// Block 0x4e, offset 0x1380\n\t0x13bd: 0x000a, 0x13bf: 0x000a,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x000a, 0x13c1: 0x000a,\n\t0x13cd: 0x000a, 0x13ce: 0x000a, 0x13cf: 0x000a,\n\t0x13dd: 0x000a,\n\t0x13de: 0x000a, 0x13df: 0x000a,\n\t0x13ed: 0x000a, 0x13ee: 0x000a, 0x13ef: 0x000a,\n\t0x13fd: 0x000a, 0x13fe: 0x000a,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x0009, 0x1401: 0x0009, 0x1402: 0x0009, 0x1403: 0x0009, 0x1404: 0x0009, 0x1405: 0x0009,\n\t0x1406: 0x0009, 0x1407: 0x0009, 0x1408: 0x0009, 0x1409: 0x0009, 0x140a: 0x0009, 0x140b: 0x000b,\n\t0x140c: 0x000b, 0x140d: 0x000b, 0x140f: 0x0001, 0x1410: 0x000a, 0x1411: 0x000a,\n\t0x1412: 0x000a, 0x1413: 0x000a, 0x1414: 0x000a, 0x1415: 0x000a, 0x1416: 0x000a, 0x1417: 0x000a,\n\t0x1418: 0x000a, 0x1419: 0x000a, 0x141a: 0x000a, 0x141b: 0x000a, 0x141c: 0x000a, 0x141d: 0x000a,\n\t0x141e: 0x000a, 0x141f: 0x000a, 0x1420: 0x000a, 0x1421: 0x000a, 0x1422: 0x000a, 0x1423: 0x000a,\n\t0x1424: 0x000a, 0x1425: 0x000a, 0x1426: 0x000a, 0x1427: 0x000a, 0x1428: 0x0009, 0x1429: 0x0007,\n\t0x142a: 0x000e, 0x142b: 0x000e, 0x142c: 0x000e, 0x142d: 0x000e, 0x142e: 0x000e, 0x142f: 0x0006,\n\t0x1430: 0x0004, 0x1431: 0x0004, 0x1432: 0x0004, 0x1433: 0x0004, 0x1434: 0x0004, 0x1435: 0x000a,\n\t0x1436: 0x000a, 0x1437: 0x000a, 0x1438: 0x000a, 0x1439: 0x000a, 0x143a: 0x000a, 0x143b: 0x000a,\n\t0x143c: 0x000a, 0x143d: 0x000a, 0x143e: 0x000a, 0x143f: 0x000a,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x000a, 0x1441: 0x000a, 0x1442: 0x000a, 0x1443: 0x000a, 0x1444: 0x0006, 0x1445: 0x009a,\n\t0x1446: 0x008a, 0x1447: 0x000a, 0x1448: 0x000a, 0x1449: 0x000a, 0x144a: 0x000a, 0x144b: 0x000a,\n\t0x144c: 0x000a, 0x144d: 0x000a, 0x144e: 0x000a, 0x144f: 0x000a, 0x1450: 0x000a, 0x1451: 0x000a,\n\t0x1452: 0x000a, 0x1453: 0x000a, 0x1454: 0x000a, 0x1455: 0x000a, 0x1456: 0x000a, 0x1457: 0x000a,\n\t0x1458: 0x000a, 0x1459: 0x000a, 0x145a: 0x000a, 0x145b: 0x000a, 0x145c: 0x000a, 0x145d: 0x000a,\n\t0x145e: 0x000a, 0x145f: 0x0009, 0x1460: 0x000b, 0x1461: 0x000b, 0x1462: 0x000b, 0x1463: 0x000b,\n\t0x1464: 0x000b, 0x1465: 0x000b, 0x1466: 0x000e, 0x1467: 0x000e, 0x1468: 0x000e, 0x1469: 0x000e,\n\t0x146a: 0x000b, 0x146b: 0x000b, 0x146c: 0x000b, 0x146d: 0x000b, 0x146e: 0x000b, 0x146f: 0x000b,\n\t0x1470: 0x0002, 0x1474: 0x0002, 0x1475: 0x0002,\n\t0x1476: 0x0002, 0x1477: 0x0002, 0x1478: 0x0002, 0x1479: 0x0002, 0x147a: 0x0003, 0x147b: 0x0003,\n\t0x147c: 0x000a, 0x147d: 0x009a, 0x147e: 0x008a,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x0002, 0x1481: 0x0002, 0x1482: 0x0002, 0x1483: 0x0002, 0x1484: 0x0002, 0x1485: 0x0002,\n\t0x1486: 0x0002, 0x1487: 0x0002, 0x1488: 0x0002, 0x1489: 0x0002, 0x148a: 0x0003, 0x148b: 0x0003,\n\t0x148c: 0x000a, 0x148d: 0x009a, 0x148e: 0x008a,\n\t0x14a0: 0x0004, 0x14a1: 0x0004, 0x14a2: 0x0004, 0x14a3: 0x0004,\n\t0x14a4: 0x0004, 0x14a5: 0x0004, 0x14a6: 0x0004, 0x14a7: 0x0004, 0x14a8: 0x0004, 0x14a9: 0x0004,\n\t0x14aa: 0x0004, 0x14ab: 0x0004, 0x14ac: 0x0004, 0x14ad: 0x0004, 0x14ae: 0x0004, 0x14af: 0x0004,\n\t0x14b0: 0x0004, 0x14b1: 0x0004, 0x14b2: 0x0004, 0x14b3: 0x0004, 0x14b4: 0x0004, 0x14b5: 0x0004,\n\t0x14b6: 0x0004, 0x14b7: 0x0004, 0x14b8: 0x0004, 0x14b9: 0x0004, 0x14ba: 0x0004, 0x14bb: 0x0004,\n\t0x14bc: 0x0004, 0x14bd: 0x0004, 0x14be: 0x0004, 0x14bf: 0x0004,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x0004, 0x14c1: 0x0004, 0x14c2: 0x0004, 0x14c3: 0x0004, 0x14c4: 0x0004, 0x14c5: 0x0004,\n\t0x14c6: 0x0004, 0x14c7: 0x0004, 0x14c8: 0x0004, 0x14c9: 0x0004, 0x14ca: 0x0004, 0x14cb: 0x0004,\n\t0x14cc: 0x0004, 0x14cd: 0x0004, 0x14ce: 0x0004, 0x14cf: 0x0004, 0x14d0: 0x000c, 0x14d1: 0x000c,\n\t0x14d2: 0x000c, 0x14d3: 0x000c, 0x14d4: 0x000c, 0x14d5: 0x000c, 0x14d6: 0x000c, 0x14d7: 0x000c,\n\t0x14d8: 0x000c, 0x14d9: 0x000c, 0x14da: 0x000c, 0x14db: 0x000c, 0x14dc: 0x000c, 0x14dd: 0x000c,\n\t0x14de: 0x000c, 0x14df: 0x000c, 0x14e0: 0x000c, 0x14e1: 0x000c, 0x14e2: 0x000c, 0x14e3: 0x000c,\n\t0x14e4: 0x000c, 0x14e5: 0x000c, 0x14e6: 0x000c, 0x14e7: 0x000c, 0x14e8: 0x000c, 0x14e9: 0x000c,\n\t0x14ea: 0x000c, 0x14eb: 0x000c, 0x14ec: 0x000c, 0x14ed: 0x000c, 0x14ee: 0x000c, 0x14ef: 0x000c,\n\t0x14f0: 0x000c,\n\t// Block 0x54, offset 0x1500\n\t0x1500: 0x000a, 0x1501: 0x000a, 0x1503: 0x000a, 0x1504: 0x000a, 0x1505: 0x000a,\n\t0x1506: 0x000a, 0x1508: 0x000a, 0x1509: 0x000a,\n\t0x1514: 0x000a, 0x1516: 0x000a, 0x1517: 0x000a,\n\t0x1518: 0x000a,\n\t0x151e: 0x000a, 0x151f: 0x000a, 0x1520: 0x000a, 0x1521: 0x000a, 0x1522: 0x000a, 0x1523: 0x000a,\n\t0x1525: 0x000a, 0x1527: 0x000a, 0x1529: 0x000a,\n\t0x152e: 0x0004,\n\t0x153a: 0x000a, 0x153b: 0x000a,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x000a, 0x1541: 0x000a, 0x1542: 0x000a, 0x1543: 0x000a, 0x1544: 0x000a,\n\t0x154a: 0x000a, 0x154b: 0x000a,\n\t0x154c: 0x000a, 0x154d: 0x000a, 0x1550: 0x000a, 0x1551: 0x000a,\n\t0x1552: 0x000a, 0x1553: 0x000a, 0x1554: 0x000a, 0x1555: 0x000a, 0x1556: 0x000a, 0x1557: 0x000a,\n\t0x1558: 0x000a, 0x1559: 0x000a, 0x155a: 0x000a, 0x155b: 0x000a, 0x155c: 0x000a, 0x155d: 0x000a,\n\t0x155e: 0x000a, 0x155f: 0x000a,\n\t// Block 0x56, offset 0x1580\n\t0x1589: 0x000a, 0x158a: 0x000a, 0x158b: 0x000a,\n\t0x1590: 0x000a, 0x1591: 0x000a,\n\t0x1592: 0x000a, 0x1593: 0x000a, 0x1594: 0x000a, 0x1595: 0x000a, 0x1596: 0x000a, 0x1597: 0x000a,\n\t0x1598: 0x000a, 0x1599: 0x000a, 0x159a: 0x000a, 0x159b: 0x000a, 0x159c: 0x000a, 0x159d: 0x000a,\n\t0x159e: 0x000a, 0x159f: 0x000a, 0x15a0: 0x000a, 0x15a1: 0x000a, 0x15a2: 0x000a, 0x15a3: 0x000a,\n\t0x15a4: 0x000a, 0x15a5: 0x000a, 0x15a6: 0x000a, 0x15a7: 0x000a, 0x15a8: 0x000a, 0x15a9: 0x000a,\n\t0x15aa: 0x000a, 0x15ab: 0x000a, 0x15ac: 0x000a, 0x15ad: 0x000a, 0x15ae: 0x000a, 0x15af: 0x000a,\n\t0x15b0: 0x000a, 0x15b1: 0x000a, 0x15b2: 0x000a, 0x15b3: 0x000a, 0x15b4: 0x000a, 0x15b5: 0x000a,\n\t0x15b6: 0x000a, 0x15b7: 0x000a, 0x15b8: 0x000a, 0x15b9: 0x000a, 0x15ba: 0x000a, 0x15bb: 0x000a,\n\t0x15bc: 0x000a, 0x15bd: 0x000a, 0x15be: 0x000a, 0x15bf: 0x000a,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x000a, 0x15c1: 0x000a, 0x15c2: 0x000a, 0x15c3: 0x000a, 0x15c4: 0x000a, 0x15c5: 0x000a,\n\t0x15c6: 0x000a, 0x15c7: 0x000a, 0x15c8: 0x000a, 0x15c9: 0x000a, 0x15ca: 0x000a, 0x15cb: 0x000a,\n\t0x15cc: 0x000a, 0x15cd: 0x000a, 0x15ce: 0x000a, 0x15cf: 0x000a, 0x15d0: 0x000a, 0x15d1: 0x000a,\n\t0x15d2: 0x000a, 0x15d3: 0x000a, 0x15d4: 0x000a, 0x15d5: 0x000a, 0x15d6: 0x000a, 0x15d7: 0x000a,\n\t0x15d8: 0x000a, 0x15d9: 0x000a, 0x15da: 0x000a, 0x15db: 0x000a, 0x15dc: 0x000a, 0x15dd: 0x000a,\n\t0x15de: 0x000a, 0x15df: 0x000a, 0x15e0: 0x000a, 0x15e1: 0x000a, 0x15e2: 0x000a, 0x15e3: 0x000a,\n\t0x15e4: 0x000a, 0x15e5: 0x000a, 0x15e6: 0x000a, 0x15e7: 0x000a, 0x15e8: 0x000a, 0x15e9: 0x000a,\n\t0x15ea: 0x000a, 0x15eb: 0x000a, 0x15ec: 0x000a, 0x15ed: 0x000a, 0x15ee: 0x000a, 0x15ef: 0x000a,\n\t0x15f0: 0x000a, 0x15f1: 0x000a, 0x15f2: 0x000a, 0x15f3: 0x000a, 0x15f4: 0x000a, 0x15f5: 0x000a,\n\t0x15f6: 0x000a, 0x15f7: 0x000a, 0x15f8: 0x000a, 0x15f9: 0x000a, 0x15fa: 0x000a, 0x15fb: 0x000a,\n\t0x15fc: 0x000a, 0x15fd: 0x000a, 0x15fe: 0x000a, 0x15ff: 0x000a,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x000a, 0x1601: 0x000a, 0x1602: 0x000a, 0x1603: 0x000a, 0x1604: 0x000a, 0x1605: 0x000a,\n\t0x1606: 0x000a, 0x1607: 0x000a, 0x1608: 0x000a, 0x1609: 0x000a, 0x160a: 0x000a, 0x160b: 0x000a,\n\t0x160c: 0x000a, 0x160d: 0x000a, 0x160e: 0x000a, 0x160f: 0x000a, 0x1610: 0x000a, 0x1611: 0x000a,\n\t0x1612: 0x0003, 0x1613: 0x0004, 0x1614: 0x000a, 0x1615: 0x000a, 0x1616: 0x000a, 0x1617: 0x000a,\n\t0x1618: 0x000a, 0x1619: 0x000a, 0x161a: 0x000a, 0x161b: 0x000a, 0x161c: 0x000a, 0x161d: 0x000a,\n\t0x161e: 0x000a, 0x161f: 0x000a, 0x1620: 0x000a, 0x1621: 0x000a, 0x1622: 0x000a, 0x1623: 0x000a,\n\t0x1624: 0x000a, 0x1625: 0x000a, 0x1626: 0x000a, 0x1627: 0x000a, 0x1628: 0x000a, 0x1629: 0x000a,\n\t0x162a: 0x000a, 0x162b: 0x000a, 0x162c: 0x000a, 0x162d: 0x000a, 0x162e: 0x000a, 0x162f: 0x000a,\n\t0x1630: 0x000a, 0x1631: 0x000a, 0x1632: 0x000a, 0x1633: 0x000a, 0x1634: 0x000a, 0x1635: 0x000a,\n\t0x1636: 0x000a, 0x1637: 0x000a, 0x1638: 0x000a, 0x1639: 0x000a, 0x163a: 0x000a, 0x163b: 0x000a,\n\t0x163c: 0x000a, 0x163d: 0x000a, 0x163e: 0x000a, 0x163f: 0x000a,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x000a, 0x1641: 0x000a, 0x1642: 0x000a, 0x1643: 0x000a, 0x1644: 0x000a, 0x1645: 0x000a,\n\t0x1646: 0x000a, 0x1647: 0x000a, 0x1648: 0x003a, 0x1649: 0x002a, 0x164a: 0x003a, 0x164b: 0x002a,\n\t0x164c: 0x000a, 0x164d: 0x000a, 0x164e: 0x000a, 0x164f: 0x000a, 0x1650: 0x000a, 0x1651: 0x000a,\n\t0x1652: 0x000a, 0x1653: 0x000a, 0x1654: 0x000a, 0x1655: 0x000a, 0x1656: 0x000a, 0x1657: 0x000a,\n\t0x1658: 0x000a, 0x1659: 0x000a, 0x165a: 0x000a, 0x165b: 0x000a, 0x165c: 0x000a, 0x165d: 0x000a,\n\t0x165e: 0x000a, 0x165f: 0x000a, 0x1660: 0x000a, 0x1661: 0x000a, 0x1662: 0x000a, 0x1663: 0x000a,\n\t0x1664: 0x000a, 0x1665: 0x000a, 0x1666: 0x000a, 0x1667: 0x000a, 0x1668: 0x000a, 0x1669: 0x009a,\n\t0x166a: 0x008a, 0x166b: 0x000a, 0x166c: 0x000a, 0x166d: 0x000a, 0x166e: 0x000a, 0x166f: 0x000a,\n\t0x1670: 0x000a, 0x1671: 0x000a, 0x1672: 0x000a, 0x1673: 0x000a, 0x1674: 0x000a, 0x1675: 0x000a,\n\t// Block 0x5a, offset 0x1680\n\t0x16bb: 0x000a,\n\t0x16bc: 0x000a, 0x16bd: 0x000a, 0x16be: 0x000a, 0x16bf: 0x000a,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x000a, 0x16c1: 0x000a, 0x16c2: 0x000a, 0x16c3: 0x000a, 0x16c4: 0x000a, 0x16c5: 0x000a,\n\t0x16c6: 0x000a, 0x16c7: 0x000a, 0x16c8: 0x000a, 0x16c9: 0x000a, 0x16ca: 0x000a, 0x16cb: 0x000a,\n\t0x16cc: 0x000a, 0x16cd: 0x000a, 0x16ce: 0x000a, 0x16cf: 0x000a, 0x16d0: 0x000a, 0x16d1: 0x000a,\n\t0x16d2: 0x000a, 0x16d3: 0x000a, 0x16d4: 0x000a, 0x16d6: 0x000a, 0x16d7: 0x000a,\n\t0x16d8: 0x000a, 0x16d9: 0x000a, 0x16da: 0x000a, 0x16db: 0x000a, 0x16dc: 0x000a, 0x16dd: 0x000a,\n\t0x16de: 0x000a, 0x16df: 0x000a, 0x16e0: 0x000a, 0x16e1: 0x000a, 0x16e2: 0x000a, 0x16e3: 0x000a,\n\t0x16e4: 0x000a, 0x16e5: 0x000a, 0x16e6: 0x000a, 0x16e7: 0x000a, 0x16e8: 0x000a, 0x16e9: 0x000a,\n\t0x16ea: 0x000a, 0x16eb: 0x000a, 0x16ec: 0x000a, 0x16ed: 0x000a, 0x16ee: 0x000a, 0x16ef: 0x000a,\n\t0x16f0: 0x000a, 0x16f1: 0x000a, 0x16f2: 0x000a, 0x16f3: 0x000a, 0x16f4: 0x000a, 0x16f5: 0x000a,\n\t0x16f6: 0x000a, 0x16f7: 0x000a, 0x16f8: 0x000a, 0x16f9: 0x000a, 0x16fa: 0x000a, 0x16fb: 0x000a,\n\t0x16fc: 0x000a, 0x16fd: 0x000a, 0x16fe: 0x000a, 0x16ff: 0x000a,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x000a, 0x1701: 0x000a, 0x1702: 0x000a, 0x1703: 0x000a, 0x1704: 0x000a, 0x1705: 0x000a,\n\t0x1706: 0x000a, 0x1707: 0x000a, 0x1708: 0x000a, 0x1709: 0x000a, 0x170a: 0x000a, 0x170b: 0x000a,\n\t0x170c: 0x000a, 0x170d: 0x000a, 0x170e: 0x000a, 0x170f: 0x000a, 0x1710: 0x000a, 0x1711: 0x000a,\n\t0x1712: 0x000a, 0x1713: 0x000a, 0x1714: 0x000a, 0x1715: 0x000a, 0x1716: 0x000a, 0x1717: 0x000a,\n\t0x1718: 0x000a, 0x1719: 0x000a, 0x171a: 0x000a, 0x171b: 0x000a, 0x171c: 0x000a, 0x171d: 0x000a,\n\t0x171e: 0x000a, 0x171f: 0x000a, 0x1720: 0x000a, 0x1721: 0x000a, 0x1722: 0x000a, 0x1723: 0x000a,\n\t0x1724: 0x000a, 0x1725: 0x000a, 0x1726: 0x000a, 0x1727: 0x000a, 0x1728: 0x000a, 0x1729: 0x000a,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x000a, 0x1741: 0x000a, 0x1742: 0x000a, 0x1743: 0x000a, 0x1744: 0x000a, 0x1745: 0x000a,\n\t0x1746: 0x000a, 0x1747: 0x000a, 0x1748: 0x000a, 0x1749: 0x000a, 0x174a: 0x000a,\n\t0x1760: 0x000a, 0x1761: 0x000a, 0x1762: 0x000a, 0x1763: 0x000a,\n\t0x1764: 0x000a, 0x1765: 0x000a, 0x1766: 0x000a, 0x1767: 0x000a, 0x1768: 0x000a, 0x1769: 0x000a,\n\t0x176a: 0x000a, 0x176b: 0x000a, 0x176c: 0x000a, 0x176d: 0x000a, 0x176e: 0x000a, 0x176f: 0x000a,\n\t0x1770: 0x000a, 0x1771: 0x000a, 0x1772: 0x000a, 0x1773: 0x000a, 0x1774: 0x000a, 0x1775: 0x000a,\n\t0x1776: 0x000a, 0x1777: 0x000a, 0x1778: 0x000a, 0x1779: 0x000a, 0x177a: 0x000a, 0x177b: 0x000a,\n\t0x177c: 0x000a, 0x177d: 0x000a, 0x177e: 0x000a, 0x177f: 0x000a,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x000a, 0x1781: 0x000a, 0x1782: 0x000a, 0x1783: 0x000a, 0x1784: 0x000a, 0x1785: 0x000a,\n\t0x1786: 0x000a, 0x1787: 0x000a, 0x1788: 0x0002, 0x1789: 0x0002, 0x178a: 0x0002, 0x178b: 0x0002,\n\t0x178c: 0x0002, 0x178d: 0x0002, 0x178e: 0x0002, 0x178f: 0x0002, 0x1790: 0x0002, 0x1791: 0x0002,\n\t0x1792: 0x0002, 0x1793: 0x0002, 0x1794: 0x0002, 0x1795: 0x0002, 0x1796: 0x0002, 0x1797: 0x0002,\n\t0x1798: 0x0002, 0x1799: 0x0002, 0x179a: 0x0002, 0x179b: 0x0002,\n\t// Block 0x5f, offset 0x17c0\n\t0x17ea: 0x000a, 0x17eb: 0x000a, 0x17ec: 0x000a, 0x17ed: 0x000a, 0x17ee: 0x000a, 0x17ef: 0x000a,\n\t0x17f0: 0x000a, 0x17f1: 0x000a, 0x17f2: 0x000a, 0x17f3: 0x000a, 0x17f4: 0x000a, 0x17f5: 0x000a,\n\t0x17f6: 0x000a, 0x17f7: 0x000a, 0x17f8: 0x000a, 0x17f9: 0x000a, 0x17fa: 0x000a, 0x17fb: 0x000a,\n\t0x17fc: 0x000a, 0x17fd: 0x000a, 0x17fe: 0x000a, 0x17ff: 0x000a,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x000a, 0x1801: 0x000a, 0x1802: 0x000a, 0x1803: 0x000a, 0x1804: 0x000a, 0x1805: 0x000a,\n\t0x1806: 0x000a, 0x1807: 0x000a, 0x1808: 0x000a, 0x1809: 0x000a, 0x180a: 0x000a, 0x180b: 0x000a,\n\t0x180c: 0x000a, 0x180d: 0x000a, 0x180e: 0x000a, 0x180f: 0x000a, 0x1810: 0x000a, 0x1811: 0x000a,\n\t0x1812: 0x000a, 0x1813: 0x000a, 0x1814: 0x000a, 0x1815: 0x000a, 0x1816: 0x000a, 0x1817: 0x000a,\n\t0x1818: 0x000a, 0x1819: 0x000a, 0x181a: 0x000a, 0x181b: 0x000a, 0x181c: 0x000a, 0x181d: 0x000a,\n\t0x181e: 0x000a, 0x181f: 0x000a, 0x1820: 0x000a, 0x1821: 0x000a, 0x1822: 0x000a, 0x1823: 0x000a,\n\t0x1824: 0x000a, 0x1825: 0x000a, 0x1826: 0x000a, 0x1827: 0x000a, 0x1828: 0x000a, 0x1829: 0x000a,\n\t0x182a: 0x000a, 0x182b: 0x000a, 0x182d: 0x000a, 0x182e: 0x000a, 0x182f: 0x000a,\n\t0x1830: 0x000a, 0x1831: 0x000a, 0x1832: 0x000a, 0x1833: 0x000a, 0x1834: 0x000a, 0x1835: 0x000a,\n\t0x1836: 0x000a, 0x1837: 0x000a, 0x1838: 0x000a, 0x1839: 0x000a, 0x183a: 0x000a, 0x183b: 0x000a,\n\t0x183c: 0x000a, 0x183d: 0x000a, 0x183e: 0x000a, 0x183f: 0x000a,\n\t// Block 0x61, offset 0x1840\n\t0x1840: 0x000a, 0x1841: 0x000a, 0x1842: 0x000a, 0x1843: 0x000a, 0x1844: 0x000a, 0x1845: 0x000a,\n\t0x1846: 0x000a, 0x1847: 0x000a, 0x1848: 0x000a, 0x1849: 0x000a, 0x184a: 0x000a, 0x184b: 0x000a,\n\t0x184c: 0x000a, 0x184d: 0x000a, 0x184e: 0x000a, 0x184f: 0x000a, 0x1850: 0x000a, 0x1851: 0x000a,\n\t0x1852: 0x000a, 0x1853: 0x000a, 0x1854: 0x000a, 0x1855: 0x000a, 0x1856: 0x000a, 0x1857: 0x000a,\n\t0x1858: 0x000a, 0x1859: 0x000a, 0x185a: 0x000a, 0x185b: 0x000a, 0x185c: 0x000a, 0x185d: 0x000a,\n\t0x185e: 0x000a, 0x185f: 0x000a, 0x1860: 0x000a, 0x1861: 0x000a, 0x1862: 0x000a, 0x1863: 0x000a,\n\t0x1864: 0x000a, 0x1865: 0x000a, 0x1866: 0x000a, 0x1867: 0x000a, 0x1868: 0x003a, 0x1869: 0x002a,\n\t0x186a: 0x003a, 0x186b: 0x002a, 0x186c: 0x003a, 0x186d: 0x002a, 0x186e: 0x003a, 0x186f: 0x002a,\n\t0x1870: 0x003a, 0x1871: 0x002a, 0x1872: 0x003a, 0x1873: 0x002a, 0x1874: 0x003a, 0x1875: 0x002a,\n\t0x1876: 0x000a, 0x1877: 0x000a, 0x1878: 0x000a, 0x1879: 0x000a, 0x187a: 0x000a, 0x187b: 0x000a,\n\t0x187c: 0x000a, 0x187d: 0x000a, 0x187e: 0x000a, 0x187f: 0x000a,\n\t// Block 0x62, offset 0x1880\n\t0x1880: 0x000a, 0x1881: 0x000a, 0x1882: 0x000a, 0x1883: 0x000a, 0x1884: 0x000a, 0x1885: 0x009a,\n\t0x1886: 0x008a, 0x1887: 0x000a, 0x1888: 0x000a, 0x1889: 0x000a, 0x188a: 0x000a, 0x188b: 0x000a,\n\t0x188c: 0x000a, 0x188d: 0x000a, 0x188e: 0x000a, 0x188f: 0x000a, 0x1890: 0x000a, 0x1891: 0x000a,\n\t0x1892: 0x000a, 0x1893: 0x000a, 0x1894: 0x000a, 0x1895: 0x000a, 0x1896: 0x000a, 0x1897: 0x000a,\n\t0x1898: 0x000a, 0x1899: 0x000a, 0x189a: 0x000a, 0x189b: 0x000a, 0x189c: 0x000a, 0x189d: 0x000a,\n\t0x189e: 0x000a, 0x189f: 0x000a, 0x18a0: 0x000a, 0x18a1: 0x000a, 0x18a2: 0x000a, 0x18a3: 0x000a,\n\t0x18a4: 0x000a, 0x18a5: 0x000a, 0x18a6: 0x003a, 0x18a7: 0x002a, 0x18a8: 0x003a, 0x18a9: 0x002a,\n\t0x18aa: 0x003a, 0x18ab: 0x002a, 0x18ac: 0x003a, 0x18ad: 0x002a, 0x18ae: 0x003a, 0x18af: 0x002a,\n\t0x18b0: 0x000a, 0x18b1: 0x000a, 0x18b2: 0x000a, 0x18b3: 0x000a, 0x18b4: 0x000a, 0x18b5: 0x000a,\n\t0x18b6: 0x000a, 0x18b7: 0x000a, 0x18b8: 0x000a, 0x18b9: 0x000a, 0x18ba: 0x000a, 0x18bb: 0x000a,\n\t0x18bc: 0x000a, 0x18bd: 0x000a, 0x18be: 0x000a, 0x18bf: 0x000a,\n\t// Block 0x63, offset 0x18c0\n\t0x18c0: 0x000a, 0x18c1: 0x000a, 0x18c2: 0x000a, 0x18c3: 0x007a, 0x18c4: 0x006a, 0x18c5: 0x009a,\n\t0x18c6: 0x008a, 0x18c7: 0x00ba, 0x18c8: 0x00aa, 0x18c9: 0x009a, 0x18ca: 0x008a, 0x18cb: 0x007a,\n\t0x18cc: 0x006a, 0x18cd: 0x00da, 0x18ce: 0x002a, 0x18cf: 0x003a, 0x18d0: 0x00ca, 0x18d1: 0x009a,\n\t0x18d2: 0x008a, 0x18d3: 0x007a, 0x18d4: 0x006a, 0x18d5: 0x009a, 0x18d6: 0x008a, 0x18d7: 0x00ba,\n\t0x18d8: 0x00aa, 0x18d9: 0x000a, 0x18da: 0x000a, 0x18db: 0x000a, 0x18dc: 0x000a, 0x18dd: 0x000a,\n\t0x18de: 0x000a, 0x18df: 0x000a, 0x18e0: 0x000a, 0x18e1: 0x000a, 0x18e2: 0x000a, 0x18e3: 0x000a,\n\t0x18e4: 0x000a, 0x18e5: 0x000a, 0x18e6: 0x000a, 0x18e7: 0x000a, 0x18e8: 0x000a, 0x18e9: 0x000a,\n\t0x18ea: 0x000a, 0x18eb: 0x000a, 0x18ec: 0x000a, 0x18ed: 0x000a, 0x18ee: 0x000a, 0x18ef: 0x000a,\n\t0x18f0: 0x000a, 0x18f1: 0x000a, 0x18f2: 0x000a, 0x18f3: 0x000a, 0x18f4: 0x000a, 0x18f5: 0x000a,\n\t0x18f6: 0x000a, 0x18f7: 0x000a, 0x18f8: 0x000a, 0x18f9: 0x000a, 0x18fa: 0x000a, 0x18fb: 0x000a,\n\t0x18fc: 0x000a, 0x18fd: 0x000a, 0x18fe: 0x000a, 0x18ff: 0x000a,\n\t// Block 0x64, offset 0x1900\n\t0x1900: 0x000a, 0x1901: 0x000a, 0x1902: 0x000a, 0x1903: 0x000a, 0x1904: 0x000a, 0x1905: 0x000a,\n\t0x1906: 0x000a, 0x1907: 0x000a, 0x1908: 0x000a, 0x1909: 0x000a, 0x190a: 0x000a, 0x190b: 0x000a,\n\t0x190c: 0x000a, 0x190d: 0x000a, 0x190e: 0x000a, 0x190f: 0x000a, 0x1910: 0x000a, 0x1911: 0x000a,\n\t0x1912: 0x000a, 0x1913: 0x000a, 0x1914: 0x000a, 0x1915: 0x000a, 0x1916: 0x000a, 0x1917: 0x000a,\n\t0x1918: 0x003a, 0x1919: 0x002a, 0x191a: 0x003a, 0x191b: 0x002a, 0x191c: 0x000a, 0x191d: 0x000a,\n\t0x191e: 0x000a, 0x191f: 0x000a, 0x1920: 0x000a, 0x1921: 0x000a, 0x1922: 0x000a, 0x1923: 0x000a,\n\t0x1924: 0x000a, 0x1925: 0x000a, 0x1926: 0x000a, 0x1927: 0x000a, 0x1928: 0x000a, 0x1929: 0x000a,\n\t0x192a: 0x000a, 0x192b: 0x000a, 0x192c: 0x000a, 0x192d: 0x000a, 0x192e: 0x000a, 0x192f: 0x000a,\n\t0x1930: 0x000a, 0x1931: 0x000a, 0x1932: 0x000a, 0x1933: 0x000a, 0x1934: 0x000a, 0x1935: 0x000a,\n\t0x1936: 0x000a, 0x1937: 0x000a, 0x1938: 0x000a, 0x1939: 0x000a, 0x193a: 0x000a, 0x193b: 0x000a,\n\t0x193c: 0x003a, 0x193d: 0x002a, 0x193e: 0x000a, 0x193f: 0x000a,\n\t// Block 0x65, offset 0x1940\n\t0x1940: 0x000a, 0x1941: 0x000a, 0x1942: 0x000a, 0x1943: 0x000a, 0x1944: 0x000a, 0x1945: 0x000a,\n\t0x1946: 0x000a, 0x1947: 0x000a, 0x1948: 0x000a, 0x1949: 0x000a, 0x194a: 0x000a, 0x194b: 0x000a,\n\t0x194c: 0x000a, 0x194d: 0x000a, 0x194e: 0x000a, 0x194f: 0x000a, 0x1950: 0x000a, 0x1951: 0x000a,\n\t0x1952: 0x000a, 0x1953: 0x000a, 0x1954: 0x000a, 0x1955: 0x000a, 0x1956: 0x000a, 0x1957: 0x000a,\n\t0x1958: 0x000a, 0x1959: 0x000a, 0x195a: 0x000a, 0x195b: 0x000a, 0x195c: 0x000a, 0x195d: 0x000a,\n\t0x195e: 0x000a, 0x195f: 0x000a, 0x1960: 0x000a, 0x1961: 0x000a, 0x1962: 0x000a, 0x1963: 0x000a,\n\t0x1964: 0x000a, 0x1965: 0x000a, 0x1966: 0x000a, 0x1967: 0x000a, 0x1968: 0x000a, 0x1969: 0x000a,\n\t0x196a: 0x000a, 0x196b: 0x000a, 0x196c: 0x000a, 0x196d: 0x000a, 0x196e: 0x000a, 0x196f: 0x000a,\n\t0x1970: 0x000a, 0x1971: 0x000a, 0x1972: 0x000a, 0x1973: 0x000a,\n\t0x1976: 0x000a, 0x1977: 0x000a, 0x1978: 0x000a, 0x1979: 0x000a, 0x197a: 0x000a, 0x197b: 0x000a,\n\t0x197c: 0x000a, 0x197d: 0x000a, 0x197e: 0x000a, 0x197f: 0x000a,\n\t// Block 0x66, offset 0x1980\n\t0x19a5: 0x000a, 0x19a6: 0x000a, 0x19a7: 0x000a, 0x19a8: 0x000a, 0x19a9: 0x000a,\n\t0x19aa: 0x000a, 0x19af: 0x000c,\n\t0x19b0: 0x000c, 0x19b1: 0x000c,\n\t0x19b9: 0x000a, 0x19ba: 0x000a, 0x19bb: 0x000a,\n\t0x19bc: 0x000a, 0x19bd: 0x000a, 0x19be: 0x000a, 0x19bf: 0x000a,\n\t// Block 0x67, offset 0x19c0\n\t0x19ff: 0x000c,\n\t// Block 0x68, offset 0x1a00\n\t0x1a20: 0x000c, 0x1a21: 0x000c, 0x1a22: 0x000c, 0x1a23: 0x000c,\n\t0x1a24: 0x000c, 0x1a25: 0x000c, 0x1a26: 0x000c, 0x1a27: 0x000c, 0x1a28: 0x000c, 0x1a29: 0x000c,\n\t0x1a2a: 0x000c, 0x1a2b: 0x000c, 0x1a2c: 0x000c, 0x1a2d: 0x000c, 0x1a2e: 0x000c, 0x1a2f: 0x000c,\n\t0x1a30: 0x000c, 0x1a31: 0x000c, 0x1a32: 0x000c, 0x1a33: 0x000c, 0x1a34: 0x000c, 0x1a35: 0x000c,\n\t0x1a36: 0x000c, 0x1a37: 0x000c, 0x1a38: 0x000c, 0x1a39: 0x000c, 0x1a3a: 0x000c, 0x1a3b: 0x000c,\n\t0x1a3c: 0x000c, 0x1a3d: 0x000c, 0x1a3e: 0x000c, 0x1a3f: 0x000c,\n\t// Block 0x69, offset 0x1a40\n\t0x1a40: 0x000a, 0x1a41: 0x000a, 0x1a42: 0x000a, 0x1a43: 0x000a, 0x1a44: 0x000a, 0x1a45: 0x000a,\n\t0x1a46: 0x000a, 0x1a47: 0x000a, 0x1a48: 0x000a, 0x1a49: 0x000a, 0x1a4a: 0x000a, 0x1a4b: 0x000a,\n\t0x1a4c: 0x000a, 0x1a4d: 0x000a, 0x1a4e: 0x000a, 0x1a4f: 0x000a, 0x1a50: 0x000a, 0x1a51: 0x000a,\n\t0x1a52: 0x000a, 0x1a53: 0x000a, 0x1a54: 0x000a, 0x1a55: 0x000a, 0x1a56: 0x000a, 0x1a57: 0x000a,\n\t0x1a58: 0x000a, 0x1a59: 0x000a, 0x1a5a: 0x000a, 0x1a5b: 0x000a, 0x1a5c: 0x000a, 0x1a5d: 0x000a,\n\t0x1a5e: 0x000a, 0x1a5f: 0x000a, 0x1a60: 0x000a, 0x1a61: 0x000a, 0x1a62: 0x003a, 0x1a63: 0x002a,\n\t0x1a64: 0x003a, 0x1a65: 0x002a, 0x1a66: 0x003a, 0x1a67: 0x002a, 0x1a68: 0x003a, 0x1a69: 0x002a,\n\t0x1a6a: 0x000a, 0x1a6b: 0x000a, 0x1a6c: 0x000a, 0x1a6d: 0x000a, 0x1a6e: 0x000a, 0x1a6f: 0x000a,\n\t0x1a70: 0x000a, 0x1a71: 0x000a, 0x1a72: 0x000a, 0x1a73: 0x000a, 0x1a74: 0x000a, 0x1a75: 0x000a,\n\t0x1a76: 0x000a, 0x1a77: 0x000a, 0x1a78: 0x000a, 0x1a79: 0x000a, 0x1a7a: 0x000a, 0x1a7b: 0x000a,\n\t0x1a7c: 0x000a, 0x1a7d: 0x000a, 0x1a7e: 0x000a, 0x1a7f: 0x000a,\n\t// Block 0x6a, offset 0x1a80\n\t0x1a80: 0x000a, 0x1a81: 0x000a, 0x1a82: 0x000a, 0x1a83: 0x000a, 0x1a84: 0x000a, 0x1a85: 0x000a,\n\t0x1a86: 0x000a, 0x1a87: 0x000a, 0x1a88: 0x000a, 0x1a89: 0x000a, 0x1a8a: 0x000a, 0x1a8b: 0x000a,\n\t0x1a8c: 0x000a, 0x1a8d: 0x000a, 0x1a8e: 0x000a, 0x1a8f: 0x000a, 0x1a90: 0x000a, 0x1a91: 0x000a,\n\t0x1a92: 0x000a, 0x1a93: 0x000a, 0x1a94: 0x000a, 0x1a95: 0x009a, 0x1a96: 0x008a, 0x1a97: 0x00ba,\n\t0x1a98: 0x00aa, 0x1a99: 0x009a, 0x1a9a: 0x008a, 0x1a9b: 0x007a, 0x1a9c: 0x006a, 0x1a9d: 0x000a,\n\t// Block 0x6b, offset 0x1ac0\n\t0x1ac0: 0x000a, 0x1ac1: 0x000a, 0x1ac2: 0x000a, 0x1ac3: 0x000a, 0x1ac4: 0x000a, 0x1ac5: 0x000a,\n\t0x1ac6: 0x000a, 0x1ac7: 0x000a, 0x1ac8: 0x000a, 0x1ac9: 0x000a, 0x1aca: 0x000a, 0x1acb: 0x000a,\n\t0x1acc: 0x000a, 0x1acd: 0x000a, 0x1ace: 0x000a, 0x1acf: 0x000a, 0x1ad0: 0x000a, 0x1ad1: 0x000a,\n\t0x1ad2: 0x000a, 0x1ad3: 0x000a, 0x1ad4: 0x000a, 0x1ad5: 0x000a, 0x1ad6: 0x000a, 0x1ad7: 0x000a,\n\t0x1ad8: 0x000a, 0x1ad9: 0x000a, 0x1adb: 0x000a, 0x1adc: 0x000a, 0x1add: 0x000a,\n\t0x1ade: 0x000a, 0x1adf: 0x000a, 0x1ae0: 0x000a, 0x1ae1: 0x000a, 0x1ae2: 0x000a, 0x1ae3: 0x000a,\n\t0x1ae4: 0x000a, 0x1ae5: 0x000a, 0x1ae6: 0x000a, 0x1ae7: 0x000a, 0x1ae8: 0x000a, 0x1ae9: 0x000a,\n\t0x1aea: 0x000a, 0x1aeb: 0x000a, 0x1aec: 0x000a, 0x1aed: 0x000a, 0x1aee: 0x000a, 0x1aef: 0x000a,\n\t0x1af0: 0x000a, 0x1af1: 0x000a, 0x1af2: 0x000a, 0x1af3: 0x000a, 0x1af4: 0x000a, 0x1af5: 0x000a,\n\t0x1af6: 0x000a, 0x1af7: 0x000a, 0x1af8: 0x000a, 0x1af9: 0x000a, 0x1afa: 0x000a, 0x1afb: 0x000a,\n\t0x1afc: 0x000a, 0x1afd: 0x000a, 0x1afe: 0x000a, 0x1aff: 0x000a,\n\t// Block 0x6c, offset 0x1b00\n\t0x1b00: 0x000a, 0x1b01: 0x000a, 0x1b02: 0x000a, 0x1b03: 0x000a, 0x1b04: 0x000a, 0x1b05: 0x000a,\n\t0x1b06: 0x000a, 0x1b07: 0x000a, 0x1b08: 0x000a, 0x1b09: 0x000a, 0x1b0a: 0x000a, 0x1b0b: 0x000a,\n\t0x1b0c: 0x000a, 0x1b0d: 0x000a, 0x1b0e: 0x000a, 0x1b0f: 0x000a, 0x1b10: 0x000a, 0x1b11: 0x000a,\n\t0x1b12: 0x000a, 0x1b13: 0x000a, 0x1b14: 0x000a, 0x1b15: 0x000a, 0x1b16: 0x000a, 0x1b17: 0x000a,\n\t0x1b18: 0x000a, 0x1b19: 0x000a, 0x1b1a: 0x000a, 0x1b1b: 0x000a, 0x1b1c: 0x000a, 0x1b1d: 0x000a,\n\t0x1b1e: 0x000a, 0x1b1f: 0x000a, 0x1b20: 0x000a, 0x1b21: 0x000a, 0x1b22: 0x000a, 0x1b23: 0x000a,\n\t0x1b24: 0x000a, 0x1b25: 0x000a, 0x1b26: 0x000a, 0x1b27: 0x000a, 0x1b28: 0x000a, 0x1b29: 0x000a,\n\t0x1b2a: 0x000a, 0x1b2b: 0x000a, 0x1b2c: 0x000a, 0x1b2d: 0x000a, 0x1b2e: 0x000a, 0x1b2f: 0x000a,\n\t0x1b30: 0x000a, 0x1b31: 0x000a, 0x1b32: 0x000a, 0x1b33: 0x000a,\n\t// Block 0x6d, offset 0x1b40\n\t0x1b40: 0x000a, 0x1b41: 0x000a, 0x1b42: 0x000a, 0x1b43: 0x000a, 0x1b44: 0x000a, 0x1b45: 0x000a,\n\t0x1b46: 0x000a, 0x1b47: 0x000a, 0x1b48: 0x000a, 0x1b49: 0x000a, 0x1b4a: 0x000a, 0x1b4b: 0x000a,\n\t0x1b4c: 0x000a, 0x1b4d: 0x000a, 0x1b4e: 0x000a, 0x1b4f: 0x000a, 0x1b50: 0x000a, 0x1b51: 0x000a,\n\t0x1b52: 0x000a, 0x1b53: 0x000a, 0x1b54: 0x000a, 0x1b55: 0x000a,\n\t0x1b70: 0x000a, 0x1b71: 0x000a, 0x1b72: 0x000a, 0x1b73: 0x000a, 0x1b74: 0x000a, 0x1b75: 0x000a,\n\t0x1b76: 0x000a, 0x1b77: 0x000a, 0x1b78: 0x000a, 0x1b79: 0x000a, 0x1b7a: 0x000a, 0x1b7b: 0x000a,\n\t0x1b7c: 0x000a, 0x1b7d: 0x000a, 0x1b7e: 0x000a, 0x1b7f: 0x000a,\n\t// Block 0x6e, offset 0x1b80\n\t0x1b80: 0x0009, 0x1b81: 0x000a, 0x1b82: 0x000a, 0x1b83: 0x000a, 0x1b84: 0x000a,\n\t0x1b88: 0x003a, 0x1b89: 0x002a, 0x1b8a: 0x003a, 0x1b8b: 0x002a,\n\t0x1b8c: 0x003a, 0x1b8d: 0x002a, 0x1b8e: 0x003a, 0x1b8f: 0x002a, 0x1b90: 0x003a, 0x1b91: 0x002a,\n\t0x1b92: 0x000a, 0x1b93: 0x000a, 0x1b94: 0x003a, 0x1b95: 0x002a, 0x1b96: 0x003a, 0x1b97: 0x002a,\n\t0x1b98: 0x003a, 0x1b99: 0x002a, 0x1b9a: 0x003a, 0x1b9b: 0x002a, 0x1b9c: 0x000a, 0x1b9d: 0x000a,\n\t0x1b9e: 0x000a, 0x1b9f: 0x000a, 0x1ba0: 0x000a,\n\t0x1baa: 0x000c, 0x1bab: 0x000c, 0x1bac: 0x000c, 0x1bad: 0x000c,\n\t0x1bb0: 0x000a,\n\t0x1bb6: 0x000a, 0x1bb7: 0x000a,\n\t0x1bbd: 0x000a, 0x1bbe: 0x000a, 0x1bbf: 0x000a,\n\t// Block 0x6f, offset 0x1bc0\n\t0x1bd9: 0x000c, 0x1bda: 0x000c, 0x1bdb: 0x000a, 0x1bdc: 0x000a,\n\t0x1be0: 0x000a,\n\t// Block 0x70, offset 0x1c00\n\t0x1c3b: 0x000a,\n\t// Block 0x71, offset 0x1c40\n\t0x1c40: 0x000a, 0x1c41: 0x000a, 0x1c42: 0x000a, 0x1c43: 0x000a, 0x1c44: 0x000a, 0x1c45: 0x000a,\n\t0x1c46: 0x000a, 0x1c47: 0x000a, 0x1c48: 0x000a, 0x1c49: 0x000a, 0x1c4a: 0x000a, 0x1c4b: 0x000a,\n\t0x1c4c: 0x000a, 0x1c4d: 0x000a, 0x1c4e: 0x000a, 0x1c4f: 0x000a, 0x1c50: 0x000a, 0x1c51: 0x000a,\n\t0x1c52: 0x000a, 0x1c53: 0x000a, 0x1c54: 0x000a, 0x1c55: 0x000a, 0x1c56: 0x000a, 0x1c57: 0x000a,\n\t0x1c58: 0x000a, 0x1c59: 0x000a, 0x1c5a: 0x000a, 0x1c5b: 0x000a, 0x1c5c: 0x000a, 0x1c5d: 0x000a,\n\t0x1c5e: 0x000a, 0x1c5f: 0x000a, 0x1c60: 0x000a, 0x1c61: 0x000a, 0x1c62: 0x000a, 0x1c63: 0x000a,\n\t0x1c64: 0x000a, 0x1c65: 0x000a,\n\t0x1c6f: 0x000a,\n\t// Block 0x72, offset 0x1c80\n\t0x1c9d: 0x000a,\n\t0x1c9e: 0x000a,\n\t// Block 0x73, offset 0x1cc0\n\t0x1cd0: 0x000a, 0x1cd1: 0x000a,\n\t0x1cd2: 0x000a, 0x1cd3: 0x000a, 0x1cd4: 0x000a, 0x1cd5: 0x000a, 0x1cd6: 0x000a, 0x1cd7: 0x000a,\n\t0x1cd8: 0x000a, 0x1cd9: 0x000a, 0x1cda: 0x000a, 0x1cdb: 0x000a, 0x1cdc: 0x000a, 0x1cdd: 0x000a,\n\t0x1cde: 0x000a, 0x1cdf: 0x000a,\n\t0x1cfc: 0x000a, 0x1cfd: 0x000a, 0x1cfe: 0x000a,\n\t// Block 0x74, offset 0x1d00\n\t0x1d31: 0x000a, 0x1d32: 0x000a, 0x1d33: 0x000a, 0x1d34: 0x000a, 0x1d35: 0x000a,\n\t0x1d36: 0x000a, 0x1d37: 0x000a, 0x1d38: 0x000a, 0x1d39: 0x000a, 0x1d3a: 0x000a, 0x1d3b: 0x000a,\n\t0x1d3c: 0x000a, 0x1d3d: 0x000a, 0x1d3e: 0x000a, 0x1d3f: 0x000a,\n\t// Block 0x75, offset 0x1d40\n\t0x1d4c: 0x000a, 0x1d4d: 0x000a, 0x1d4e: 0x000a, 0x1d4f: 0x000a,\n\t// Block 0x76, offset 0x1d80\n\t0x1db7: 0x000a, 0x1db8: 0x000a, 0x1db9: 0x000a, 0x1dba: 0x000a,\n\t// Block 0x77, offset 0x1dc0\n\t0x1dde: 0x000a, 0x1ddf: 0x000a,\n\t0x1dff: 0x000a,\n\t// Block 0x78, offset 0x1e00\n\t0x1e10: 0x000a, 0x1e11: 0x000a,\n\t0x1e12: 0x000a, 0x1e13: 0x000a, 0x1e14: 0x000a, 0x1e15: 0x000a, 0x1e16: 0x000a, 0x1e17: 0x000a,\n\t0x1e18: 0x000a, 0x1e19: 0x000a, 0x1e1a: 0x000a, 0x1e1b: 0x000a, 0x1e1c: 0x000a, 0x1e1d: 0x000a,\n\t0x1e1e: 0x000a, 0x1e1f: 0x000a, 0x1e20: 0x000a, 0x1e21: 0x000a, 0x1e22: 0x000a, 0x1e23: 0x000a,\n\t0x1e24: 0x000a, 0x1e25: 0x000a, 0x1e26: 0x000a, 0x1e27: 0x000a, 0x1e28: 0x000a, 0x1e29: 0x000a,\n\t0x1e2a: 0x000a, 0x1e2b: 0x000a, 0x1e2c: 0x000a, 0x1e2d: 0x000a, 0x1e2e: 0x000a, 0x1e2f: 0x000a,\n\t0x1e30: 0x000a, 0x1e31: 0x000a, 0x1e32: 0x000a, 0x1e33: 0x000a, 0x1e34: 0x000a, 0x1e35: 0x000a,\n\t0x1e36: 0x000a, 0x1e37: 0x000a, 0x1e38: 0x000a, 0x1e39: 0x000a, 0x1e3a: 0x000a, 0x1e3b: 0x000a,\n\t0x1e3c: 0x000a, 0x1e3d: 0x000a, 0x1e3e: 0x000a, 0x1e3f: 0x000a,\n\t// Block 0x79, offset 0x1e40\n\t0x1e40: 0x000a, 0x1e41: 0x000a, 0x1e42: 0x000a, 0x1e43: 0x000a, 0x1e44: 0x000a, 0x1e45: 0x000a,\n\t0x1e46: 0x000a,\n\t// Block 0x7a, offset 0x1e80\n\t0x1e8d: 0x000a, 0x1e8e: 0x000a, 0x1e8f: 0x000a,\n\t// Block 0x7b, offset 0x1ec0\n\t0x1eef: 0x000c,\n\t0x1ef0: 0x000c, 0x1ef1: 0x000c, 0x1ef2: 0x000c, 0x1ef3: 0x000a, 0x1ef4: 0x000c, 0x1ef5: 0x000c,\n\t0x1ef6: 0x000c, 0x1ef7: 0x000c, 0x1ef8: 0x000c, 0x1ef9: 0x000c, 0x1efa: 0x000c, 0x1efb: 0x000c,\n\t0x1efc: 0x000c, 0x1efd: 0x000c, 0x1efe: 0x000a, 0x1eff: 0x000a,\n\t// Block 0x7c, offset 0x1f00\n\t0x1f1e: 0x000c, 0x1f1f: 0x000c,\n\t// Block 0x7d, offset 0x1f40\n\t0x1f70: 0x000c, 0x1f71: 0x000c,\n\t// Block 0x7e, offset 0x1f80\n\t0x1f80: 0x000a, 0x1f81: 0x000a, 0x1f82: 0x000a, 0x1f83: 0x000a, 0x1f84: 0x000a, 0x1f85: 0x000a,\n\t0x1f86: 0x000a, 0x1f87: 0x000a, 0x1f88: 0x000a, 0x1f89: 0x000a, 0x1f8a: 0x000a, 0x1f8b: 0x000a,\n\t0x1f8c: 0x000a, 0x1f8d: 0x000a, 0x1f8e: 0x000a, 0x1f8f: 0x000a, 0x1f90: 0x000a, 0x1f91: 0x000a,\n\t0x1f92: 0x000a, 0x1f93: 0x000a, 0x1f94: 0x000a, 0x1f95: 0x000a, 0x1f96: 0x000a, 0x1f97: 0x000a,\n\t0x1f98: 0x000a, 0x1f99: 0x000a, 0x1f9a: 0x000a, 0x1f9b: 0x000a, 0x1f9c: 0x000a, 0x1f9d: 0x000a,\n\t0x1f9e: 0x000a, 0x1f9f: 0x000a, 0x1fa0: 0x000a, 0x1fa1: 0x000a,\n\t// Block 0x7f, offset 0x1fc0\n\t0x1fc8: 0x000a,\n\t// Block 0x80, offset 0x2000\n\t0x2002: 0x000c,\n\t0x2006: 0x000c, 0x200b: 0x000c,\n\t0x2025: 0x000c, 0x2026: 0x000c, 0x2028: 0x000a, 0x2029: 0x000a,\n\t0x202a: 0x000a, 0x202b: 0x000a, 0x202c: 0x000c,\n\t0x2038: 0x0004, 0x2039: 0x0004,\n\t// Block 0x81, offset 0x2040\n\t0x2074: 0x000a, 0x2075: 0x000a,\n\t0x2076: 0x000a, 0x2077: 0x000a,\n\t// Block 0x82, offset 0x2080\n\t0x2084: 0x000c, 0x2085: 0x000c,\n\t0x20a0: 0x000c, 0x20a1: 0x000c, 0x20a2: 0x000c, 0x20a3: 0x000c,\n\t0x20a4: 0x000c, 0x20a5: 0x000c, 0x20a6: 0x000c, 0x20a7: 0x000c, 0x20a8: 0x000c, 0x20a9: 0x000c,\n\t0x20aa: 0x000c, 0x20ab: 0x000c, 0x20ac: 0x000c, 0x20ad: 0x000c, 0x20ae: 0x000c, 0x20af: 0x000c,\n\t0x20b0: 0x000c, 0x20b1: 0x000c,\n\t0x20bf: 0x000c,\n\t// Block 0x83, offset 0x20c0\n\t0x20e6: 0x000c, 0x20e7: 0x000c, 0x20e8: 0x000c, 0x20e9: 0x000c,\n\t0x20ea: 0x000c, 0x20eb: 0x000c, 0x20ec: 0x000c, 0x20ed: 0x000c,\n\t// Block 0x84, offset 0x2100\n\t0x2107: 0x000c, 0x2108: 0x000c, 0x2109: 0x000c, 0x210a: 0x000c, 0x210b: 0x000c,\n\t0x210c: 0x000c, 0x210d: 0x000c, 0x210e: 0x000c, 0x210f: 0x000c, 0x2110: 0x000c, 0x2111: 0x000c,\n\t// Block 0x85, offset 0x2140\n\t0x2140: 0x000c, 0x2141: 0x000c, 0x2142: 0x000c,\n\t0x2173: 0x000c,\n\t0x2176: 0x000c, 0x2177: 0x000c, 0x2178: 0x000c, 0x2179: 0x000c,\n\t0x217c: 0x000c, 0x217d: 0x000c,\n\t// Block 0x86, offset 0x2180\n\t0x21a5: 0x000c,\n\t// Block 0x87, offset 0x21c0\n\t0x21e9: 0x000c,\n\t0x21ea: 0x000c, 0x21eb: 0x000c, 0x21ec: 0x000c, 0x21ed: 0x000c, 0x21ee: 0x000c,\n\t0x21f1: 0x000c, 0x21f2: 0x000c, 0x21f5: 0x000c,\n\t0x21f6: 0x000c,\n\t// Block 0x88, offset 0x2200\n\t0x2203: 0x000c,\n\t0x220c: 0x000c,\n\t0x223c: 0x000c,\n\t// Block 0x89, offset 0x2240\n\t0x2270: 0x000c, 0x2272: 0x000c, 0x2273: 0x000c, 0x2274: 0x000c,\n\t0x2277: 0x000c, 0x2278: 0x000c,\n\t0x227e: 0x000c, 0x227f: 0x000c,\n\t// Block 0x8a, offset 0x2280\n\t0x2281: 0x000c,\n\t0x22ac: 0x000c, 0x22ad: 0x000c,\n\t0x22b6: 0x000c,\n\t// Block 0x8b, offset 0x22c0\n\t0x22ea: 0x000a, 0x22eb: 0x000a,\n\t// Block 0x8c, offset 0x2300\n\t0x2325: 0x000c, 0x2328: 0x000c,\n\t0x232d: 0x000c,\n\t// Block 0x8d, offset 0x2340\n\t0x235d: 0x0001,\n\t0x235e: 0x000c, 0x235f: 0x0001, 0x2360: 0x0001, 0x2361: 0x0001, 0x2362: 0x0001, 0x2363: 0x0001,\n\t0x2364: 0x0001, 0x2365: 0x0001, 0x2366: 0x0001, 0x2367: 0x0001, 0x2368: 0x0001, 0x2369: 0x0003,\n\t0x236a: 0x0001, 0x236b: 0x0001, 0x236c: 0x0001, 0x236d: 0x0001, 0x236e: 0x0001, 0x236f: 0x0001,\n\t0x2370: 0x0001, 0x2371: 0x0001, 0x2372: 0x0001, 0x2373: 0x0001, 0x2374: 0x0001, 0x2375: 0x0001,\n\t0x2376: 0x0001, 0x2377: 0x0001, 0x2378: 0x0001, 0x2379: 0x0001, 0x237a: 0x0001, 0x237b: 0x0001,\n\t0x237c: 0x0001, 0x237d: 0x0001, 0x237e: 0x0001, 0x237f: 0x0001,\n\t// Block 0x8e, offset 0x2380\n\t0x2380: 0x0001, 0x2381: 0x0001, 0x2382: 0x0001, 0x2383: 0x0001, 0x2384: 0x0001, 0x2385: 0x0001,\n\t0x2386: 0x0001, 0x2387: 0x0001, 0x2388: 0x0001, 0x2389: 0x0001, 0x238a: 0x0001, 0x238b: 0x0001,\n\t0x238c: 0x0001, 0x238d: 0x0001, 0x238e: 0x0001, 0x238f: 0x0001, 0x2390: 0x000d, 0x2391: 0x000d,\n\t0x2392: 0x000d, 0x2393: 0x000d, 0x2394: 0x000d, 0x2395: 0x000d, 0x2396: 0x000d, 0x2397: 0x000d,\n\t0x2398: 0x000d, 0x2399: 0x000d, 0x239a: 0x000d, 0x239b: 0x000d, 0x239c: 0x000d, 0x239d: 0x000d,\n\t0x239e: 0x000d, 0x239f: 0x000d, 0x23a0: 0x000d, 0x23a1: 0x000d, 0x23a2: 0x000d, 0x23a3: 0x000d,\n\t0x23a4: 0x000d, 0x23a5: 0x000d, 0x23a6: 0x000d, 0x23a7: 0x000d, 0x23a8: 0x000d, 0x23a9: 0x000d,\n\t0x23aa: 0x000d, 0x23ab: 0x000d, 0x23ac: 0x000d, 0x23ad: 0x000d, 0x23ae: 0x000d, 0x23af: 0x000d,\n\t0x23b0: 0x000d, 0x23b1: 0x000d, 0x23b2: 0x000d, 0x23b3: 0x000d, 0x23b4: 0x000d, 0x23b5: 0x000d,\n\t0x23b6: 0x000d, 0x23b7: 0x000d, 0x23b8: 0x000d, 0x23b9: 0x000d, 0x23ba: 0x000d, 0x23bb: 0x000d,\n\t0x23bc: 0x000d, 0x23bd: 0x000d, 0x23be: 0x000d, 0x23bf: 0x000d,\n\t// Block 0x8f, offset 0x23c0\n\t0x23c0: 0x000d, 0x23c1: 0x000d, 0x23c2: 0x000d, 0x23c3: 0x000a, 0x23c4: 0x000a, 0x23c5: 0x000a,\n\t0x23c6: 0x000a, 0x23c7: 0x000a, 0x23c8: 0x000a, 0x23c9: 0x000a, 0x23ca: 0x000a, 0x23cb: 0x000a,\n\t0x23cc: 0x000a, 0x23cd: 0x000a, 0x23ce: 0x000a, 0x23cf: 0x000a, 0x23d0: 0x000a, 0x23d1: 0x000a,\n\t0x23d2: 0x000a, 0x23d3: 0x000d, 0x23d4: 0x000d, 0x23d5: 0x000d, 0x23d6: 0x000d, 0x23d7: 0x000d,\n\t0x23d8: 0x000d, 0x23d9: 0x000d, 0x23da: 0x000d, 0x23db: 0x000d, 0x23dc: 0x000d, 0x23dd: 0x000d,\n\t0x23de: 0x000d, 0x23df: 0x000d, 0x23e0: 0x000d, 0x23e1: 0x000d, 0x23e2: 0x000d, 0x23e3: 0x000d,\n\t0x23e4: 0x000d, 0x23e5: 0x000d, 0x23e6: 0x000d, 0x23e7: 0x000d, 0x23e8: 0x000d, 0x23e9: 0x000d,\n\t0x23ea: 0x000d, 0x23eb: 0x000d, 0x23ec: 0x000d, 0x23ed: 0x000d, 0x23ee: 0x000d, 0x23ef: 0x000d,\n\t0x23f0: 0x000d, 0x23f1: 0x000d, 0x23f2: 0x000d, 0x23f3: 0x000d, 0x23f4: 0x000d, 0x23f5: 0x000d,\n\t0x23f6: 0x000d, 0x23f7: 0x000d, 0x23f8: 0x000d, 0x23f9: 0x000d, 0x23fa: 0x000d, 0x23fb: 0x000d,\n\t0x23fc: 0x000d, 0x23fd: 0x000d, 0x23fe: 0x000d, 0x23ff: 0x000d,\n\t// Block 0x90, offset 0x2400\n\t0x2400: 0x000d, 0x2401: 0x000d, 0x2402: 0x000d, 0x2403: 0x000d, 0x2404: 0x000d, 0x2405: 0x000d,\n\t0x2406: 0x000d, 0x2407: 0x000d, 0x2408: 0x000d, 0x2409: 0x000d, 0x240a: 0x000d, 0x240b: 0x000d,\n\t0x240c: 0x000d, 0x240d: 0x000d, 0x240e: 0x000d, 0x240f: 0x000d, 0x2410: 0x000d, 0x2411: 0x000d,\n\t0x2412: 0x000d, 0x2413: 0x000d, 0x2414: 0x000d, 0x2415: 0x000d, 0x2416: 0x000d, 0x2417: 0x000d,\n\t0x2418: 0x000d, 0x2419: 0x000d, 0x241a: 0x000d, 0x241b: 0x000d, 0x241c: 0x000d, 0x241d: 0x000d,\n\t0x241e: 0x000d, 0x241f: 0x000d, 0x2420: 0x000d, 0x2421: 0x000d, 0x2422: 0x000d, 0x2423: 0x000d,\n\t0x2424: 0x000d, 0x2425: 0x000d, 0x2426: 0x000d, 0x2427: 0x000d, 0x2428: 0x000d, 0x2429: 0x000d,\n\t0x242a: 0x000d, 0x242b: 0x000d, 0x242c: 0x000d, 0x242d: 0x000d, 0x242e: 0x000d, 0x242f: 0x000d,\n\t0x2430: 0x000d, 0x2431: 0x000d, 0x2432: 0x000d, 0x2433: 0x000d, 0x2434: 0x000d, 0x2435: 0x000d,\n\t0x2436: 0x000d, 0x2437: 0x000d, 0x2438: 0x000d, 0x2439: 0x000d, 0x243a: 0x000d, 0x243b: 0x000d,\n\t0x243c: 0x000d, 0x243d: 0x000d, 0x243e: 0x000a, 0x243f: 0x000a,\n\t// Block 0x91, offset 0x2440\n\t0x2440: 0x000a, 0x2441: 0x000a, 0x2442: 0x000a, 0x2443: 0x000a, 0x2444: 0x000a, 0x2445: 0x000a,\n\t0x2446: 0x000a, 0x2447: 0x000a, 0x2448: 0x000a, 0x2449: 0x000a, 0x244a: 0x000a, 0x244b: 0x000a,\n\t0x244c: 0x000a, 0x244d: 0x000a, 0x244e: 0x000a, 0x244f: 0x000a, 0x2450: 0x000d, 0x2451: 0x000d,\n\t0x2452: 0x000d, 0x2453: 0x000d, 0x2454: 0x000d, 0x2455: 0x000d, 0x2456: 0x000d, 0x2457: 0x000d,\n\t0x2458: 0x000d, 0x2459: 0x000d, 0x245a: 0x000d, 0x245b: 0x000d, 0x245c: 0x000d, 0x245d: 0x000d,\n\t0x245e: 0x000d, 0x245f: 0x000d, 0x2460: 0x000d, 0x2461: 0x000d, 0x2462: 0x000d, 0x2463: 0x000d,\n\t0x2464: 0x000d, 0x2465: 0x000d, 0x2466: 0x000d, 0x2467: 0x000d, 0x2468: 0x000d, 0x2469: 0x000d,\n\t0x246a: 0x000d, 0x246b: 0x000d, 0x246c: 0x000d, 0x246d: 0x000d, 0x246e: 0x000d, 0x246f: 0x000d,\n\t0x2470: 0x000d, 0x2471: 0x000d, 0x2472: 0x000d, 0x2473: 0x000d, 0x2474: 0x000d, 0x2475: 0x000d,\n\t0x2476: 0x000d, 0x2477: 0x000d, 0x2478: 0x000d, 0x2479: 0x000d, 0x247a: 0x000d, 0x247b: 0x000d,\n\t0x247c: 0x000d, 0x247d: 0x000d, 0x247e: 0x000d, 0x247f: 0x000d,\n\t// Block 0x92, offset 0x2480\n\t0x2480: 0x000d, 0x2481: 0x000d, 0x2482: 0x000d, 0x2483: 0x000d, 0x2484: 0x000d, 0x2485: 0x000d,\n\t0x2486: 0x000d, 0x2487: 0x000d, 0x2488: 0x000d, 0x2489: 0x000d, 0x248a: 0x000d, 0x248b: 0x000d,\n\t0x248c: 0x000d, 0x248d: 0x000d, 0x248e: 0x000d, 0x248f: 0x000d, 0x2490: 0x000a, 0x2491: 0x000a,\n\t0x2492: 0x000d, 0x2493: 0x000d, 0x2494: 0x000d, 0x2495: 0x000d, 0x2496: 0x000d, 0x2497: 0x000d,\n\t0x2498: 0x000d, 0x2499: 0x000d, 0x249a: 0x000d, 0x249b: 0x000d, 0x249c: 0x000d, 0x249d: 0x000d,\n\t0x249e: 0x000d, 0x249f: 0x000d, 0x24a0: 0x000d, 0x24a1: 0x000d, 0x24a2: 0x000d, 0x24a3: 0x000d,\n\t0x24a4: 0x000d, 0x24a5: 0x000d, 0x24a6: 0x000d, 0x24a7: 0x000d, 0x24a8: 0x000d, 0x24a9: 0x000d,\n\t0x24aa: 0x000d, 0x24ab: 0x000d, 0x24ac: 0x000d, 0x24ad: 0x000d, 0x24ae: 0x000d, 0x24af: 0x000d,\n\t0x24b0: 0x000d, 0x24b1: 0x000d, 0x24b2: 0x000d, 0x24b3: 0x000d, 0x24b4: 0x000d, 0x24b5: 0x000d,\n\t0x24b6: 0x000d, 0x24b7: 0x000d, 0x24b8: 0x000d, 0x24b9: 0x000d, 0x24ba: 0x000d, 0x24bb: 0x000d,\n\t0x24bc: 0x000d, 0x24bd: 0x000d, 0x24be: 0x000d, 0x24bf: 0x000d,\n\t// Block 0x93, offset 0x24c0\n\t0x24c0: 0x000d, 0x24c1: 0x000d, 0x24c2: 0x000d, 0x24c3: 0x000d, 0x24c4: 0x000d, 0x24c5: 0x000d,\n\t0x24c6: 0x000d, 0x24c7: 0x000d, 0x24c8: 0x000a, 0x24c9: 0x000a, 0x24ca: 0x000a, 0x24cb: 0x000a,\n\t0x24cc: 0x000a, 0x24cd: 0x000a, 0x24ce: 0x000a, 0x24cf: 0x000a, 0x24d0: 0x000b, 0x24d1: 0x000b,\n\t0x24d2: 0x000b, 0x24d3: 0x000b, 0x24d4: 0x000b, 0x24d5: 0x000b, 0x24d6: 0x000b, 0x24d7: 0x000b,\n\t0x24d8: 0x000b, 0x24d9: 0x000b, 0x24da: 0x000b, 0x24db: 0x000b, 0x24dc: 0x000b, 0x24dd: 0x000b,\n\t0x24de: 0x000b, 0x24df: 0x000b, 0x24e0: 0x000b, 0x24e1: 0x000b, 0x24e2: 0x000b, 0x24e3: 0x000b,\n\t0x24e4: 0x000b, 0x24e5: 0x000b, 0x24e6: 0x000b, 0x24e7: 0x000b, 0x24e8: 0x000b, 0x24e9: 0x000b,\n\t0x24ea: 0x000b, 0x24eb: 0x000b, 0x24ec: 0x000b, 0x24ed: 0x000b, 0x24ee: 0x000b, 0x24ef: 0x000b,\n\t0x24f0: 0x000d, 0x24f1: 0x000d, 0x24f2: 0x000d, 0x24f3: 0x000d, 0x24f4: 0x000d, 0x24f5: 0x000d,\n\t0x24f6: 0x000d, 0x24f7: 0x000d, 0x24f8: 0x000d, 0x24f9: 0x000d, 0x24fa: 0x000d, 0x24fb: 0x000d,\n\t0x24fc: 0x000d, 0x24fd: 0x000a, 0x24fe: 0x000a, 0x24ff: 0x000a,\n\t// Block 0x94, offset 0x2500\n\t0x2500: 0x000c, 0x2501: 0x000c, 0x2502: 0x000c, 0x2503: 0x000c, 0x2504: 0x000c, 0x2505: 0x000c,\n\t0x2506: 0x000c, 0x2507: 0x000c, 0x2508: 0x000c, 0x2509: 0x000c, 0x250a: 0x000c, 0x250b: 0x000c,\n\t0x250c: 0x000c, 0x250d: 0x000c, 0x250e: 0x000c, 0x250f: 0x000c, 0x2510: 0x000a, 0x2511: 0x000a,\n\t0x2512: 0x000a, 0x2513: 0x000a, 0x2514: 0x000a, 0x2515: 0x000a, 0x2516: 0x000a, 0x2517: 0x000a,\n\t0x2518: 0x000a, 0x2519: 0x000a,\n\t0x2520: 0x000c, 0x2521: 0x000c, 0x2522: 0x000c, 0x2523: 0x000c,\n\t0x2524: 0x000c, 0x2525: 0x000c, 0x2526: 0x000c, 0x2527: 0x000c, 0x2528: 0x000c, 0x2529: 0x000c,\n\t0x252a: 0x000c, 0x252b: 0x000c, 0x252c: 0x000c, 0x252d: 0x000c, 0x252e: 0x000c, 0x252f: 0x000c,\n\t0x2530: 0x000a, 0x2531: 0x000a, 0x2532: 0x000a, 0x2533: 0x000a, 0x2534: 0x000a, 0x2535: 0x000a,\n\t0x2536: 0x000a, 0x2537: 0x000a, 0x2538: 0x000a, 0x2539: 0x000a, 0x253a: 0x000a, 0x253b: 0x000a,\n\t0x253c: 0x000a, 0x253d: 0x000a, 0x253e: 0x000a, 0x253f: 0x000a,\n\t// Block 0x95, offset 0x2540\n\t0x2540: 0x000a, 0x2541: 0x000a, 0x2542: 0x000a, 0x2543: 0x000a, 0x2544: 0x000a, 0x2545: 0x000a,\n\t0x2546: 0x000a, 0x2547: 0x000a, 0x2548: 0x000a, 0x2549: 0x000a, 0x254a: 0x000a, 0x254b: 0x000a,\n\t0x254c: 0x000a, 0x254d: 0x000a, 0x254e: 0x000a, 0x254f: 0x000a, 0x2550: 0x0006, 0x2551: 0x000a,\n\t0x2552: 0x0006, 0x2554: 0x000a, 0x2555: 0x0006, 0x2556: 0x000a, 0x2557: 0x000a,\n\t0x2558: 0x000a, 0x2559: 0x009a, 0x255a: 0x008a, 0x255b: 0x007a, 0x255c: 0x006a, 0x255d: 0x009a,\n\t0x255e: 0x008a, 0x255f: 0x0004, 0x2560: 0x000a, 0x2561: 0x000a, 0x2562: 0x0003, 0x2563: 0x0003,\n\t0x2564: 0x000a, 0x2565: 0x000a, 0x2566: 0x000a, 0x2568: 0x000a, 0x2569: 0x0004,\n\t0x256a: 0x0004, 0x256b: 0x000a,\n\t0x2570: 0x000d, 0x2571: 0x000d, 0x2572: 0x000d, 0x2573: 0x000d, 0x2574: 0x000d, 0x2575: 0x000d,\n\t0x2576: 0x000d, 0x2577: 0x000d, 0x2578: 0x000d, 0x2579: 0x000d, 0x257a: 0x000d, 0x257b: 0x000d,\n\t0x257c: 0x000d, 0x257d: 0x000d, 0x257e: 0x000d, 0x257f: 0x000d,\n\t// Block 0x96, offset 0x2580\n\t0x2580: 0x000d, 0x2581: 0x000d, 0x2582: 0x000d, 0x2583: 0x000d, 0x2584: 0x000d, 0x2585: 0x000d,\n\t0x2586: 0x000d, 0x2587: 0x000d, 0x2588: 0x000d, 0x2589: 0x000d, 0x258a: 0x000d, 0x258b: 0x000d,\n\t0x258c: 0x000d, 0x258d: 0x000d, 0x258e: 0x000d, 0x258f: 0x000d, 0x2590: 0x000d, 0x2591: 0x000d,\n\t0x2592: 0x000d, 0x2593: 0x000d, 0x2594: 0x000d, 0x2595: 0x000d, 0x2596: 0x000d, 0x2597: 0x000d,\n\t0x2598: 0x000d, 0x2599: 0x000d, 0x259a: 0x000d, 0x259b: 0x000d, 0x259c: 0x000d, 0x259d: 0x000d,\n\t0x259e: 0x000d, 0x259f: 0x000d, 0x25a0: 0x000d, 0x25a1: 0x000d, 0x25a2: 0x000d, 0x25a3: 0x000d,\n\t0x25a4: 0x000d, 0x25a5: 0x000d, 0x25a6: 0x000d, 0x25a7: 0x000d, 0x25a8: 0x000d, 0x25a9: 0x000d,\n\t0x25aa: 0x000d, 0x25ab: 0x000d, 0x25ac: 0x000d, 0x25ad: 0x000d, 0x25ae: 0x000d, 0x25af: 0x000d,\n\t0x25b0: 0x000d, 0x25b1: 0x000d, 0x25b2: 0x000d, 0x25b3: 0x000d, 0x25b4: 0x000d, 0x25b5: 0x000d,\n\t0x25b6: 0x000d, 0x25b7: 0x000d, 0x25b8: 0x000d, 0x25b9: 0x000d, 0x25ba: 0x000d, 0x25bb: 0x000d,\n\t0x25bc: 0x000d, 0x25bd: 0x000d, 0x25be: 0x000d, 0x25bf: 0x000b,\n\t// Block 0x97, offset 0x25c0\n\t0x25c1: 0x000a, 0x25c2: 0x000a, 0x25c3: 0x0004, 0x25c4: 0x0004, 0x25c5: 0x0004,\n\t0x25c6: 0x000a, 0x25c7: 0x000a, 0x25c8: 0x003a, 0x25c9: 0x002a, 0x25ca: 0x000a, 0x25cb: 0x0003,\n\t0x25cc: 0x0006, 0x25cd: 0x0003, 0x25ce: 0x0006, 0x25cf: 0x0006, 0x25d0: 0x0002, 0x25d1: 0x0002,\n\t0x25d2: 0x0002, 0x25d3: 0x0002, 0x25d4: 0x0002, 0x25d5: 0x0002, 0x25d6: 0x0002, 0x25d7: 0x0002,\n\t0x25d8: 0x0002, 0x25d9: 0x0002, 0x25da: 0x0006, 0x25db: 0x000a, 0x25dc: 0x000a, 0x25dd: 0x000a,\n\t0x25de: 0x000a, 0x25df: 0x000a, 0x25e0: 0x000a,\n\t0x25fb: 0x005a,\n\t0x25fc: 0x000a, 0x25fd: 0x004a, 0x25fe: 0x000a, 0x25ff: 0x000a,\n\t// Block 0x98, offset 0x2600\n\t0x2600: 0x000a,\n\t0x261b: 0x005a, 0x261c: 0x000a, 0x261d: 0x004a,\n\t0x261e: 0x000a, 0x261f: 0x00fa, 0x2620: 0x00ea, 0x2621: 0x000a, 0x2622: 0x003a, 0x2623: 0x002a,\n\t0x2624: 0x000a, 0x2625: 0x000a,\n\t// Block 0x99, offset 0x2640\n\t0x2660: 0x0004, 0x2661: 0x0004, 0x2662: 0x000a, 0x2663: 0x000a,\n\t0x2664: 0x000a, 0x2665: 0x0004, 0x2666: 0x0004, 0x2668: 0x000a, 0x2669: 0x000a,\n\t0x266a: 0x000a, 0x266b: 0x000a, 0x266c: 0x000a, 0x266d: 0x000a, 0x266e: 0x000a,\n\t0x2670: 0x000b, 0x2671: 0x000b, 0x2672: 0x000b, 0x2673: 0x000b, 0x2674: 0x000b, 0x2675: 0x000b,\n\t0x2676: 0x000b, 0x2677: 0x000b, 0x2678: 0x000b, 0x2679: 0x000a, 0x267a: 0x000a, 0x267b: 0x000a,\n\t0x267c: 0x000a, 0x267d: 0x000a, 0x267e: 0x000b, 0x267f: 0x000b,\n\t// Block 0x9a, offset 0x2680\n\t0x2681: 0x000a,\n\t// Block 0x9b, offset 0x26c0\n\t0x26c0: 0x000a, 0x26c1: 0x000a, 0x26c2: 0x000a, 0x26c3: 0x000a, 0x26c4: 0x000a, 0x26c5: 0x000a,\n\t0x26c6: 0x000a, 0x26c7: 0x000a, 0x26c8: 0x000a, 0x26c9: 0x000a, 0x26ca: 0x000a, 0x26cb: 0x000a,\n\t0x26cc: 0x000a, 0x26d0: 0x000a, 0x26d1: 0x000a,\n\t0x26d2: 0x000a, 0x26d3: 0x000a, 0x26d4: 0x000a, 0x26d5: 0x000a, 0x26d6: 0x000a, 0x26d7: 0x000a,\n\t0x26d8: 0x000a, 0x26d9: 0x000a, 0x26da: 0x000a, 0x26db: 0x000a, 0x26dc: 0x000a,\n\t0x26e0: 0x000a,\n\t// Block 0x9c, offset 0x2700\n\t0x273d: 0x000c,\n\t// Block 0x9d, offset 0x2740\n\t0x2760: 0x000c, 0x2761: 0x0002, 0x2762: 0x0002, 0x2763: 0x0002,\n\t0x2764: 0x0002, 0x2765: 0x0002, 0x2766: 0x0002, 0x2767: 0x0002, 0x2768: 0x0002, 0x2769: 0x0002,\n\t0x276a: 0x0002, 0x276b: 0x0002, 0x276c: 0x0002, 0x276d: 0x0002, 0x276e: 0x0002, 0x276f: 0x0002,\n\t0x2770: 0x0002, 0x2771: 0x0002, 0x2772: 0x0002, 0x2773: 0x0002, 0x2774: 0x0002, 0x2775: 0x0002,\n\t0x2776: 0x0002, 0x2777: 0x0002, 0x2778: 0x0002, 0x2779: 0x0002, 0x277a: 0x0002, 0x277b: 0x0002,\n\t// Block 0x9e, offset 0x2780\n\t0x27b6: 0x000c, 0x27b7: 0x000c, 0x27b8: 0x000c, 0x27b9: 0x000c, 0x27ba: 0x000c,\n\t// Block 0x9f, offset 0x27c0\n\t0x27c0: 0x0001, 0x27c1: 0x0001, 0x27c2: 0x0001, 0x27c3: 0x0001, 0x27c4: 0x0001, 0x27c5: 0x0001,\n\t0x27c6: 0x0001, 0x27c7: 0x0001, 0x27c8: 0x0001, 0x27c9: 0x0001, 0x27ca: 0x0001, 0x27cb: 0x0001,\n\t0x27cc: 0x0001, 0x27cd: 0x0001, 0x27ce: 0x0001, 0x27cf: 0x0001, 0x27d0: 0x0001, 0x27d1: 0x0001,\n\t0x27d2: 0x0001, 0x27d3: 0x0001, 0x27d4: 0x0001, 0x27d5: 0x0001, 0x27d6: 0x0001, 0x27d7: 0x0001,\n\t0x27d8: 0x0001, 0x27d9: 0x0001, 0x27da: 0x0001, 0x27db: 0x0001, 0x27dc: 0x0001, 0x27dd: 0x0001,\n\t0x27de: 0x0001, 0x27df: 0x0001, 0x27e0: 0x0001, 0x27e1: 0x0001, 0x27e2: 0x0001, 0x27e3: 0x0001,\n\t0x27e4: 0x0001, 0x27e5: 0x0001, 0x27e6: 0x0001, 0x27e7: 0x0001, 0x27e8: 0x0001, 0x27e9: 0x0001,\n\t0x27ea: 0x0001, 0x27eb: 0x0001, 0x27ec: 0x0001, 0x27ed: 0x0001, 0x27ee: 0x0001, 0x27ef: 0x0001,\n\t0x27f0: 0x0001, 0x27f1: 0x0001, 0x27f2: 0x0001, 0x27f3: 0x0001, 0x27f4: 0x0001, 0x27f5: 0x0001,\n\t0x27f6: 0x0001, 0x27f7: 0x0001, 0x27f8: 0x0001, 0x27f9: 0x0001, 0x27fa: 0x0001, 0x27fb: 0x0001,\n\t0x27fc: 0x0001, 0x27fd: 0x0001, 0x27fe: 0x0001, 0x27ff: 0x0001,\n\t// Block 0xa0, offset 0x2800\n\t0x2800: 0x0001, 0x2801: 0x0001, 0x2802: 0x0001, 0x2803: 0x0001, 0x2804: 0x0001, 0x2805: 0x0001,\n\t0x2806: 0x0001, 0x2807: 0x0001, 0x2808: 0x0001, 0x2809: 0x0001, 0x280a: 0x0001, 0x280b: 0x0001,\n\t0x280c: 0x0001, 0x280d: 0x0001, 0x280e: 0x0001, 0x280f: 0x0001, 0x2810: 0x0001, 0x2811: 0x0001,\n\t0x2812: 0x0001, 0x2813: 0x0001, 0x2814: 0x0001, 0x2815: 0x0001, 0x2816: 0x0001, 0x2817: 0x0001,\n\t0x2818: 0x0001, 0x2819: 0x0001, 0x281a: 0x0001, 0x281b: 0x0001, 0x281c: 0x0001, 0x281d: 0x0001,\n\t0x281e: 0x0001, 0x281f: 0x000a, 0x2820: 0x0001, 0x2821: 0x0001, 0x2822: 0x0001, 0x2823: 0x0001,\n\t0x2824: 0x0001, 0x2825: 0x0001, 0x2826: 0x0001, 0x2827: 0x0001, 0x2828: 0x0001, 0x2829: 0x0001,\n\t0x282a: 0x0001, 0x282b: 0x0001, 0x282c: 0x0001, 0x282d: 0x0001, 0x282e: 0x0001, 0x282f: 0x0001,\n\t0x2830: 0x0001, 0x2831: 0x0001, 0x2832: 0x0001, 0x2833: 0x0001, 0x2834: 0x0001, 0x2835: 0x0001,\n\t0x2836: 0x0001, 0x2837: 0x0001, 0x2838: 0x0001, 0x2839: 0x0001, 0x283a: 0x0001, 0x283b: 0x0001,\n\t0x283c: 0x0001, 0x283d: 0x0001, 0x283e: 0x0001, 0x283f: 0x0001,\n\t// Block 0xa1, offset 0x2840\n\t0x2840: 0x0001, 0x2841: 0x000c, 0x2842: 0x000c, 0x2843: 0x000c, 0x2844: 0x0001, 0x2845: 0x000c,\n\t0x2846: 0x000c, 0x2847: 0x0001, 0x2848: 0x0001, 0x2849: 0x0001, 0x284a: 0x0001, 0x284b: 0x0001,\n\t0x284c: 0x000c, 0x284d: 0x000c, 0x284e: 0x000c, 0x284f: 0x000c, 0x2850: 0x0001, 0x2851: 0x0001,\n\t0x2852: 0x0001, 0x2853: 0x0001, 0x2854: 0x0001, 0x2855: 0x0001, 0x2856: 0x0001, 0x2857: 0x0001,\n\t0x2858: 0x0001, 0x2859: 0x0001, 0x285a: 0x0001, 0x285b: 0x0001, 0x285c: 0x0001, 0x285d: 0x0001,\n\t0x285e: 0x0001, 0x285f: 0x0001, 0x2860: 0x0001, 0x2861: 0x0001, 0x2862: 0x0001, 0x2863: 0x0001,\n\t0x2864: 0x0001, 0x2865: 0x0001, 0x2866: 0x0001, 0x2867: 0x0001, 0x2868: 0x0001, 0x2869: 0x0001,\n\t0x286a: 0x0001, 0x286b: 0x0001, 0x286c: 0x0001, 0x286d: 0x0001, 0x286e: 0x0001, 0x286f: 0x0001,\n\t0x2870: 0x0001, 0x2871: 0x0001, 0x2872: 0x0001, 0x2873: 0x0001, 0x2874: 0x0001, 0x2875: 0x0001,\n\t0x2876: 0x0001, 0x2877: 0x0001, 0x2878: 0x000c, 0x2879: 0x000c, 0x287a: 0x000c, 0x287b: 0x0001,\n\t0x287c: 0x0001, 0x287d: 0x0001, 0x287e: 0x0001, 0x287f: 0x000c,\n\t// Block 0xa2, offset 0x2880\n\t0x2880: 0x0001, 0x2881: 0x0001, 0x2882: 0x0001, 0x2883: 0x0001, 0x2884: 0x0001, 0x2885: 0x0001,\n\t0x2886: 0x0001, 0x2887: 0x0001, 0x2888: 0x0001, 0x2889: 0x0001, 0x288a: 0x0001, 0x288b: 0x0001,\n\t0x288c: 0x0001, 0x288d: 0x0001, 0x288e: 0x0001, 0x288f: 0x0001, 0x2890: 0x0001, 0x2891: 0x0001,\n\t0x2892: 0x0001, 0x2893: 0x0001, 0x2894: 0x0001, 0x2895: 0x0001, 0x2896: 0x0001, 0x2897: 0x0001,\n\t0x2898: 0x0001, 0x2899: 0x0001, 0x289a: 0x0001, 0x289b: 0x0001, 0x289c: 0x0001, 0x289d: 0x0001,\n\t0x289e: 0x0001, 0x289f: 0x0001, 0x28a0: 0x0001, 0x28a1: 0x0001, 0x28a2: 0x0001, 0x28a3: 0x0001,\n\t0x28a4: 0x0001, 0x28a5: 0x000c, 0x28a6: 0x000c, 0x28a7: 0x0001, 0x28a8: 0x0001, 0x28a9: 0x0001,\n\t0x28aa: 0x0001, 0x28ab: 0x0001, 0x28ac: 0x0001, 0x28ad: 0x0001, 0x28ae: 0x0001, 0x28af: 0x0001,\n\t0x28b0: 0x0001, 0x28b1: 0x0001, 0x28b2: 0x0001, 0x28b3: 0x0001, 0x28b4: 0x0001, 0x28b5: 0x0001,\n\t0x28b6: 0x0001, 0x28b7: 0x0001, 0x28b8: 0x0001, 0x28b9: 0x0001, 0x28ba: 0x0001, 0x28bb: 0x0001,\n\t0x28bc: 0x0001, 0x28bd: 0x0001, 0x28be: 0x0001, 0x28bf: 0x0001,\n\t// Block 0xa3, offset 0x28c0\n\t0x28c0: 0x0001, 0x28c1: 0x0001, 0x28c2: 0x0001, 0x28c3: 0x0001, 0x28c4: 0x0001, 0x28c5: 0x0001,\n\t0x28c6: 0x0001, 0x28c7: 0x0001, 0x28c8: 0x0001, 0x28c9: 0x0001, 0x28ca: 0x0001, 0x28cb: 0x0001,\n\t0x28cc: 0x0001, 0x28cd: 0x0001, 0x28ce: 0x0001, 0x28cf: 0x0001, 0x28d0: 0x0001, 0x28d1: 0x0001,\n\t0x28d2: 0x0001, 0x28d3: 0x0001, 0x28d4: 0x0001, 0x28d5: 0x0001, 0x28d6: 0x0001, 0x28d7: 0x0001,\n\t0x28d8: 0x0001, 0x28d9: 0x0001, 0x28da: 0x0001, 0x28db: 0x0001, 0x28dc: 0x0001, 0x28dd: 0x0001,\n\t0x28de: 0x0001, 0x28df: 0x0001, 0x28e0: 0x0001, 0x28e1: 0x0001, 0x28e2: 0x0001, 0x28e3: 0x0001,\n\t0x28e4: 0x0001, 0x28e5: 0x0001, 0x28e6: 0x0001, 0x28e7: 0x0001, 0x28e8: 0x0001, 0x28e9: 0x0001,\n\t0x28ea: 0x0001, 0x28eb: 0x0001, 0x28ec: 0x0001, 0x28ed: 0x0001, 0x28ee: 0x0001, 0x28ef: 0x0001,\n\t0x28f0: 0x0001, 0x28f1: 0x0001, 0x28f2: 0x0001, 0x28f3: 0x0001, 0x28f4: 0x0001, 0x28f5: 0x0001,\n\t0x28f6: 0x0001, 0x28f7: 0x0001, 0x28f8: 0x0001, 0x28f9: 0x000a, 0x28fa: 0x000a, 0x28fb: 0x000a,\n\t0x28fc: 0x000a, 0x28fd: 0x000a, 0x28fe: 0x000a, 0x28ff: 0x000a,\n\t// Block 0xa4, offset 0x2900\n\t0x2900: 0x000d, 0x2901: 0x000d, 0x2902: 0x000d, 0x2903: 0x000d, 0x2904: 0x000d, 0x2905: 0x000d,\n\t0x2906: 0x000d, 0x2907: 0x000d, 0x2908: 0x000d, 0x2909: 0x000d, 0x290a: 0x000d, 0x290b: 0x000d,\n\t0x290c: 0x000d, 0x290d: 0x000d, 0x290e: 0x000d, 0x290f: 0x000d, 0x2910: 0x000d, 0x2911: 0x000d,\n\t0x2912: 0x000d, 0x2913: 0x000d, 0x2914: 0x000d, 0x2915: 0x000d, 0x2916: 0x000d, 0x2917: 0x000d,\n\t0x2918: 0x000d, 0x2919: 0x000d, 0x291a: 0x000d, 0x291b: 0x000d, 0x291c: 0x000d, 0x291d: 0x000d,\n\t0x291e: 0x000d, 0x291f: 0x000d, 0x2920: 0x000d, 0x2921: 0x000d, 0x2922: 0x000d, 0x2923: 0x000d,\n\t0x2924: 0x000c, 0x2925: 0x000c, 0x2926: 0x000c, 0x2927: 0x000c, 0x2928: 0x0001, 0x2929: 0x0001,\n\t0x292a: 0x0001, 0x292b: 0x0001, 0x292c: 0x0001, 0x292d: 0x0001, 0x292e: 0x0001, 0x292f: 0x0001,\n\t0x2930: 0x0005, 0x2931: 0x0005, 0x2932: 0x0005, 0x2933: 0x0005, 0x2934: 0x0005, 0x2935: 0x0005,\n\t0x2936: 0x0005, 0x2937: 0x0005, 0x2938: 0x0005, 0x2939: 0x0005, 0x293a: 0x0001, 0x293b: 0x0001,\n\t0x293c: 0x0001, 0x293d: 0x0001, 0x293e: 0x0001, 0x293f: 0x0001,\n\t// Block 0xa5, offset 0x2940\n\t0x2940: 0x0005, 0x2941: 0x0005, 0x2942: 0x0005, 0x2943: 0x0005, 0x2944: 0x0005, 0x2945: 0x0005,\n\t0x2946: 0x0005, 0x2947: 0x0005, 0x2948: 0x0005, 0x2949: 0x0005, 0x294a: 0x0001, 0x294b: 0x0001,\n\t0x294c: 0x0001, 0x294d: 0x0001, 0x294e: 0x0001, 0x294f: 0x0001, 0x2950: 0x0001, 0x2951: 0x0001,\n\t0x2952: 0x0001, 0x2953: 0x0001, 0x2954: 0x0001, 0x2955: 0x0001, 0x2956: 0x0001, 0x2957: 0x0001,\n\t0x2958: 0x0001, 0x2959: 0x0001, 0x295a: 0x0001, 0x295b: 0x0001, 0x295c: 0x0001, 0x295d: 0x0001,\n\t0x295e: 0x0001, 0x295f: 0x0001, 0x2960: 0x0001, 0x2961: 0x0001, 0x2962: 0x0001, 0x2963: 0x0001,\n\t0x2964: 0x0001, 0x2965: 0x0001, 0x2966: 0x0001, 0x2967: 0x0001, 0x2968: 0x0001, 0x2969: 0x000c,\n\t0x296a: 0x000c, 0x296b: 0x000c, 0x296c: 0x000c, 0x296d: 0x000c, 0x296e: 0x000a, 0x296f: 0x0001,\n\t0x2970: 0x0001, 0x2971: 0x0001, 0x2972: 0x0001, 0x2973: 0x0001, 0x2974: 0x0001, 0x2975: 0x0001,\n\t0x2976: 0x0001, 0x2977: 0x0001, 0x2978: 0x0001, 0x2979: 0x0001, 0x297a: 0x0001, 0x297b: 0x0001,\n\t0x297c: 0x0001, 0x297d: 0x0001, 0x297e: 0x0001, 0x297f: 0x0001,\n\t// Block 0xa6, offset 0x2980\n\t0x2980: 0x0001, 0x2981: 0x0001, 0x2982: 0x0001, 0x2983: 0x0001, 0x2984: 0x0001, 0x2985: 0x0001,\n\t0x2986: 0x0001, 0x2987: 0x0001, 0x2988: 0x0001, 0x2989: 0x0001, 0x298a: 0x0001, 0x298b: 0x0001,\n\t0x298c: 0x0001, 0x298d: 0x0001, 0x298e: 0x0001, 0x298f: 0x0001, 0x2990: 0x0001, 0x2991: 0x0001,\n\t0x2992: 0x0001, 0x2993: 0x0001, 0x2994: 0x0001, 0x2995: 0x0001, 0x2996: 0x0001, 0x2997: 0x0001,\n\t0x2998: 0x0001, 0x2999: 0x0001, 0x299a: 0x0001, 0x299b: 0x0001, 0x299c: 0x0001, 0x299d: 0x0001,\n\t0x299e: 0x0001, 0x299f: 0x0001, 0x29a0: 0x0005, 0x29a1: 0x0005, 0x29a2: 0x0005, 0x29a3: 0x0005,\n\t0x29a4: 0x0005, 0x29a5: 0x0005, 0x29a6: 0x0005, 0x29a7: 0x0005, 0x29a8: 0x0005, 0x29a9: 0x0005,\n\t0x29aa: 0x0005, 0x29ab: 0x0005, 0x29ac: 0x0005, 0x29ad: 0x0005, 0x29ae: 0x0005, 0x29af: 0x0005,\n\t0x29b0: 0x0005, 0x29b1: 0x0005, 0x29b2: 0x0005, 0x29b3: 0x0005, 0x29b4: 0x0005, 0x29b5: 0x0005,\n\t0x29b6: 0x0005, 0x29b7: 0x0005, 0x29b8: 0x0005, 0x29b9: 0x0005, 0x29ba: 0x0005, 0x29bb: 0x0005,\n\t0x29bc: 0x0005, 0x29bd: 0x0005, 0x29be: 0x0005, 0x29bf: 0x0001,\n\t// Block 0xa7, offset 0x29c0\n\t0x29c0: 0x0001, 0x29c1: 0x0001, 0x29c2: 0x0001, 0x29c3: 0x0001, 0x29c4: 0x0001, 0x29c5: 0x0001,\n\t0x29c6: 0x0001, 0x29c7: 0x0001, 0x29c8: 0x0001, 0x29c9: 0x0001, 0x29ca: 0x0001, 0x29cb: 0x0001,\n\t0x29cc: 0x0001, 0x29cd: 0x0001, 0x29ce: 0x0001, 0x29cf: 0x0001, 0x29d0: 0x0001, 0x29d1: 0x0001,\n\t0x29d2: 0x0001, 0x29d3: 0x0001, 0x29d4: 0x0001, 0x29d5: 0x0001, 0x29d6: 0x0001, 0x29d7: 0x0001,\n\t0x29d8: 0x0001, 0x29d9: 0x0001, 0x29da: 0x0001, 0x29db: 0x0001, 0x29dc: 0x0001, 0x29dd: 0x0001,\n\t0x29de: 0x0001, 0x29df: 0x0001, 0x29e0: 0x0001, 0x29e1: 0x0001, 0x29e2: 0x0001, 0x29e3: 0x0001,\n\t0x29e4: 0x0001, 0x29e5: 0x0001, 0x29e6: 0x0001, 0x29e7: 0x0001, 0x29e8: 0x0001, 0x29e9: 0x0001,\n\t0x29ea: 0x0001, 0x29eb: 0x000c, 0x29ec: 0x000c, 0x29ed: 0x0001, 0x29ee: 0x0001, 0x29ef: 0x0001,\n\t0x29f0: 0x0001, 0x29f1: 0x0001, 0x29f2: 0x0001, 0x29f3: 0x0001, 0x29f4: 0x0001, 0x29f5: 0x0001,\n\t0x29f6: 0x0001, 0x29f7: 0x0001, 0x29f8: 0x0001, 0x29f9: 0x0001, 0x29fa: 0x0001, 0x29fb: 0x0001,\n\t0x29fc: 0x0001, 0x29fd: 0x0001, 0x29fe: 0x0001, 0x29ff: 0x0001,\n\t// Block 0xa8, offset 0x2a00\n\t0x2a00: 0x0001, 0x2a01: 0x0001, 0x2a02: 0x000d, 0x2a03: 0x000d, 0x2a04: 0x000d, 0x2a05: 0x000d,\n\t0x2a06: 0x000d, 0x2a07: 0x000d, 0x2a08: 0x0001, 0x2a09: 0x0001, 0x2a0a: 0x0001, 0x2a0b: 0x0001,\n\t0x2a0c: 0x0001, 0x2a0d: 0x0001, 0x2a0e: 0x0001, 0x2a0f: 0x0001, 0x2a10: 0x000a, 0x2a11: 0x000a,\n\t0x2a12: 0x000a, 0x2a13: 0x000a, 0x2a14: 0x000a, 0x2a15: 0x000a, 0x2a16: 0x000a, 0x2a17: 0x000a,\n\t0x2a18: 0x000a, 0x2a19: 0x0001, 0x2a1a: 0x0001, 0x2a1b: 0x0001, 0x2a1c: 0x0001, 0x2a1d: 0x0001,\n\t0x2a1e: 0x0001, 0x2a1f: 0x0001, 0x2a20: 0x0001, 0x2a21: 0x0001, 0x2a22: 0x0001, 0x2a23: 0x0001,\n\t0x2a24: 0x0001, 0x2a25: 0x0001, 0x2a26: 0x0001, 0x2a27: 0x0001, 0x2a28: 0x0001, 0x2a29: 0x0001,\n\t0x2a2a: 0x0001, 0x2a2b: 0x0001, 0x2a2c: 0x0001, 0x2a2d: 0x0001, 0x2a2e: 0x0001, 0x2a2f: 0x0001,\n\t0x2a30: 0x0001, 0x2a31: 0x0001, 0x2a32: 0x0001, 0x2a33: 0x0001, 0x2a34: 0x0001, 0x2a35: 0x0001,\n\t0x2a36: 0x0001, 0x2a37: 0x0001, 0x2a38: 0x0001, 0x2a39: 0x0001, 0x2a3a: 0x000c, 0x2a3b: 0x000c,\n\t0x2a3c: 0x000c, 0x2a3d: 0x000c, 0x2a3e: 0x000c, 0x2a3f: 0x000c,\n\t// Block 0xa9, offset 0x2a40\n\t0x2a40: 0x0001, 0x2a41: 0x0001, 0x2a42: 0x0001, 0x2a43: 0x0001, 0x2a44: 0x0001, 0x2a45: 0x0001,\n\t0x2a46: 0x0001, 0x2a47: 0x0001, 0x2a48: 0x0001, 0x2a49: 0x0001, 0x2a4a: 0x0001, 0x2a4b: 0x0001,\n\t0x2a4c: 0x0001, 0x2a4d: 0x0001, 0x2a4e: 0x0001, 0x2a4f: 0x0001, 0x2a50: 0x0001, 0x2a51: 0x0001,\n\t0x2a52: 0x0001, 0x2a53: 0x0001, 0x2a54: 0x0001, 0x2a55: 0x0001, 0x2a56: 0x0001, 0x2a57: 0x0001,\n\t0x2a58: 0x0001, 0x2a59: 0x0001, 0x2a5a: 0x0001, 0x2a5b: 0x0001, 0x2a5c: 0x0001, 0x2a5d: 0x0001,\n\t0x2a5e: 0x0001, 0x2a5f: 0x0001, 0x2a60: 0x0001, 0x2a61: 0x0001, 0x2a62: 0x0001, 0x2a63: 0x0001,\n\t0x2a64: 0x0001, 0x2a65: 0x0001, 0x2a66: 0x0001, 0x2a67: 0x0001, 0x2a68: 0x0001, 0x2a69: 0x0001,\n\t0x2a6a: 0x0001, 0x2a6b: 0x0001, 0x2a6c: 0x0001, 0x2a6d: 0x0001, 0x2a6e: 0x0001, 0x2a6f: 0x0001,\n\t0x2a70: 0x000d, 0x2a71: 0x000d, 0x2a72: 0x000d, 0x2a73: 0x000d, 0x2a74: 0x000d, 0x2a75: 0x000d,\n\t0x2a76: 0x000d, 0x2a77: 0x000d, 0x2a78: 0x000d, 0x2a79: 0x000d, 0x2a7a: 0x000d, 0x2a7b: 0x000d,\n\t0x2a7c: 0x000d, 0x2a7d: 0x000d, 0x2a7e: 0x000d, 0x2a7f: 0x000d,\n\t// Block 0xaa, offset 0x2a80\n\t0x2a80: 0x000d, 0x2a81: 0x000d, 0x2a82: 0x000d, 0x2a83: 0x000d, 0x2a84: 0x000d, 0x2a85: 0x000d,\n\t0x2a86: 0x000c, 0x2a87: 0x000c, 0x2a88: 0x000c, 0x2a89: 0x000c, 0x2a8a: 0x000c, 0x2a8b: 0x000c,\n\t0x2a8c: 0x000c, 0x2a8d: 0x000c, 0x2a8e: 0x000c, 0x2a8f: 0x000c, 0x2a90: 0x000c, 0x2a91: 0x000d,\n\t0x2a92: 0x000d, 0x2a93: 0x000d, 0x2a94: 0x000d, 0x2a95: 0x000d, 0x2a96: 0x000d, 0x2a97: 0x000d,\n\t0x2a98: 0x000d, 0x2a99: 0x000d, 0x2a9a: 0x0001, 0x2a9b: 0x0001, 0x2a9c: 0x0001, 0x2a9d: 0x0001,\n\t0x2a9e: 0x0001, 0x2a9f: 0x0001, 0x2aa0: 0x0001, 0x2aa1: 0x0001, 0x2aa2: 0x0001, 0x2aa3: 0x0001,\n\t0x2aa4: 0x0001, 0x2aa5: 0x0001, 0x2aa6: 0x0001, 0x2aa7: 0x0001, 0x2aa8: 0x0001, 0x2aa9: 0x0001,\n\t0x2aaa: 0x0001, 0x2aab: 0x0001, 0x2aac: 0x0001, 0x2aad: 0x0001, 0x2aae: 0x0001, 0x2aaf: 0x0001,\n\t0x2ab0: 0x0001, 0x2ab1: 0x0001, 0x2ab2: 0x0001, 0x2ab3: 0x0001, 0x2ab4: 0x0001, 0x2ab5: 0x0001,\n\t0x2ab6: 0x0001, 0x2ab7: 0x0001, 0x2ab8: 0x0001, 0x2ab9: 0x0001, 0x2aba: 0x0001, 0x2abb: 0x0001,\n\t0x2abc: 0x0001, 0x2abd: 0x0001, 0x2abe: 0x0001, 0x2abf: 0x0001,\n\t// Block 0xab, offset 0x2ac0\n\t0x2ac0: 0x0001, 0x2ac1: 0x0001, 0x2ac2: 0x000c, 0x2ac3: 0x000c, 0x2ac4: 0x000c, 0x2ac5: 0x000c,\n\t0x2ac6: 0x0001, 0x2ac7: 0x0001, 0x2ac8: 0x0001, 0x2ac9: 0x0001, 0x2aca: 0x0001, 0x2acb: 0x0001,\n\t0x2acc: 0x0001, 0x2acd: 0x0001, 0x2ace: 0x0001, 0x2acf: 0x0001, 0x2ad0: 0x0001, 0x2ad1: 0x0001,\n\t0x2ad2: 0x0001, 0x2ad3: 0x0001, 0x2ad4: 0x0001, 0x2ad5: 0x0001, 0x2ad6: 0x0001, 0x2ad7: 0x0001,\n\t0x2ad8: 0x0001, 0x2ad9: 0x0001, 0x2ada: 0x0001, 0x2adb: 0x0001, 0x2adc: 0x0001, 0x2add: 0x0001,\n\t0x2ade: 0x0001, 0x2adf: 0x0001, 0x2ae0: 0x0001, 0x2ae1: 0x0001, 0x2ae2: 0x0001, 0x2ae3: 0x0001,\n\t0x2ae4: 0x0001, 0x2ae5: 0x0001, 0x2ae6: 0x0001, 0x2ae7: 0x0001, 0x2ae8: 0x0001, 0x2ae9: 0x0001,\n\t0x2aea: 0x0001, 0x2aeb: 0x0001, 0x2aec: 0x0001, 0x2aed: 0x0001, 0x2aee: 0x0001, 0x2aef: 0x0001,\n\t0x2af0: 0x0001, 0x2af1: 0x0001, 0x2af2: 0x0001, 0x2af3: 0x0001, 0x2af4: 0x0001, 0x2af5: 0x0001,\n\t0x2af6: 0x0001, 0x2af7: 0x0001, 0x2af8: 0x0001, 0x2af9: 0x0001, 0x2afa: 0x0001, 0x2afb: 0x0001,\n\t0x2afc: 0x0001, 0x2afd: 0x0001, 0x2afe: 0x0001, 0x2aff: 0x0001,\n\t// Block 0xac, offset 0x2b00\n\t0x2b01: 0x000c,\n\t0x2b38: 0x000c, 0x2b39: 0x000c, 0x2b3a: 0x000c, 0x2b3b: 0x000c,\n\t0x2b3c: 0x000c, 0x2b3d: 0x000c, 0x2b3e: 0x000c, 0x2b3f: 0x000c,\n\t// Block 0xad, offset 0x2b40\n\t0x2b40: 0x000c, 0x2b41: 0x000c, 0x2b42: 0x000c, 0x2b43: 0x000c, 0x2b44: 0x000c, 0x2b45: 0x000c,\n\t0x2b46: 0x000c,\n\t0x2b52: 0x000a, 0x2b53: 0x000a, 0x2b54: 0x000a, 0x2b55: 0x000a, 0x2b56: 0x000a, 0x2b57: 0x000a,\n\t0x2b58: 0x000a, 0x2b59: 0x000a, 0x2b5a: 0x000a, 0x2b5b: 0x000a, 0x2b5c: 0x000a, 0x2b5d: 0x000a,\n\t0x2b5e: 0x000a, 0x2b5f: 0x000a, 0x2b60: 0x000a, 0x2b61: 0x000a, 0x2b62: 0x000a, 0x2b63: 0x000a,\n\t0x2b64: 0x000a, 0x2b65: 0x000a,\n\t0x2b70: 0x000c, 0x2b73: 0x000c, 0x2b74: 0x000c,\n\t0x2b7f: 0x000c,\n\t// Block 0xae, offset 0x2b80\n\t0x2b80: 0x000c, 0x2b81: 0x000c,\n\t0x2bb3: 0x000c, 0x2bb4: 0x000c, 0x2bb5: 0x000c,\n\t0x2bb6: 0x000c, 0x2bb9: 0x000c, 0x2bba: 0x000c,\n\t// Block 0xaf, offset 0x2bc0\n\t0x2bc0: 0x000c, 0x2bc1: 0x000c, 0x2bc2: 0x000c,\n\t0x2be7: 0x000c, 0x2be8: 0x000c, 0x2be9: 0x000c,\n\t0x2bea: 0x000c, 0x2beb: 0x000c, 0x2bed: 0x000c, 0x2bee: 0x000c, 0x2bef: 0x000c,\n\t0x2bf0: 0x000c, 0x2bf1: 0x000c, 0x2bf2: 0x000c, 0x2bf3: 0x000c, 0x2bf4: 0x000c,\n\t// Block 0xb0, offset 0x2c00\n\t0x2c33: 0x000c,\n\t// Block 0xb1, offset 0x2c40\n\t0x2c40: 0x000c, 0x2c41: 0x000c,\n\t0x2c76: 0x000c, 0x2c77: 0x000c, 0x2c78: 0x000c, 0x2c79: 0x000c, 0x2c7a: 0x000c, 0x2c7b: 0x000c,\n\t0x2c7c: 0x000c, 0x2c7d: 0x000c, 0x2c7e: 0x000c,\n\t// Block 0xb2, offset 0x2c80\n\t0x2c89: 0x000c, 0x2c8a: 0x000c, 0x2c8b: 0x000c,\n\t0x2c8c: 0x000c, 0x2c8f: 0x000c,\n\t// Block 0xb3, offset 0x2cc0\n\t0x2cef: 0x000c,\n\t0x2cf0: 0x000c, 0x2cf1: 0x000c, 0x2cf4: 0x000c,\n\t0x2cf6: 0x000c, 0x2cf7: 0x000c,\n\t0x2cfe: 0x000c,\n\t// Block 0xb4, offset 0x2d00\n\t0x2d1f: 0x000c, 0x2d23: 0x000c,\n\t0x2d24: 0x000c, 0x2d25: 0x000c, 0x2d26: 0x000c, 0x2d27: 0x000c, 0x2d28: 0x000c, 0x2d29: 0x000c,\n\t0x2d2a: 0x000c,\n\t// Block 0xb5, offset 0x2d40\n\t0x2d40: 0x000c,\n\t0x2d66: 0x000c, 0x2d67: 0x000c, 0x2d68: 0x000c, 0x2d69: 0x000c,\n\t0x2d6a: 0x000c, 0x2d6b: 0x000c, 0x2d6c: 0x000c,\n\t0x2d70: 0x000c, 0x2d71: 0x000c, 0x2d72: 0x000c, 0x2d73: 0x000c, 0x2d74: 0x000c,\n\t// Block 0xb6, offset 0x2d80\n\t0x2dbb: 0x000c,\n\t0x2dbc: 0x000c, 0x2dbd: 0x000c, 0x2dbe: 0x000c, 0x2dbf: 0x000c,\n\t// Block 0xb7, offset 0x2dc0\n\t0x2dc0: 0x000c,\n\t0x2dce: 0x000c, 0x2dd0: 0x000c,\n\t0x2dd2: 0x000c,\n\t0x2de1: 0x000c, 0x2de2: 0x000c,\n\t// Block 0xb8, offset 0x2e00\n\t0x2e38: 0x000c, 0x2e39: 0x000c, 0x2e3a: 0x000c, 0x2e3b: 0x000c,\n\t0x2e3c: 0x000c, 0x2e3d: 0x000c, 0x2e3e: 0x000c, 0x2e3f: 0x000c,\n\t// Block 0xb9, offset 0x2e40\n\t0x2e42: 0x000c, 0x2e43: 0x000c, 0x2e44: 0x000c,\n\t0x2e46: 0x000c,\n\t0x2e5e: 0x000c,\n\t// Block 0xba, offset 0x2e80\n\t0x2eb3: 0x000c, 0x2eb4: 0x000c, 0x2eb5: 0x000c,\n\t0x2eb6: 0x000c, 0x2eb7: 0x000c, 0x2eb8: 0x000c, 0x2eba: 0x000c,\n\t0x2ebf: 0x000c,\n\t// Block 0xbb, offset 0x2ec0\n\t0x2ec0: 0x000c, 0x2ec2: 0x000c, 0x2ec3: 0x000c,\n\t// Block 0xbc, offset 0x2f00\n\t0x2f32: 0x000c, 0x2f33: 0x000c, 0x2f34: 0x000c, 0x2f35: 0x000c,\n\t0x2f3c: 0x000c, 0x2f3d: 0x000c, 0x2f3f: 0x000c,\n\t// Block 0xbd, offset 0x2f40\n\t0x2f40: 0x000c,\n\t0x2f5c: 0x000c, 0x2f5d: 0x000c,\n\t// Block 0xbe, offset 0x2f80\n\t0x2fb3: 0x000c, 0x2fb4: 0x000c, 0x2fb5: 0x000c,\n\t0x2fb6: 0x000c, 0x2fb7: 0x000c, 0x2fb8: 0x000c, 0x2fb9: 0x000c, 0x2fba: 0x000c,\n\t0x2fbd: 0x000c, 0x2fbf: 0x000c,\n\t// Block 0xbf, offset 0x2fc0\n\t0x2fc0: 0x000c,\n\t0x2fe0: 0x000a, 0x2fe1: 0x000a, 0x2fe2: 0x000a, 0x2fe3: 0x000a,\n\t0x2fe4: 0x000a, 0x2fe5: 0x000a, 0x2fe6: 0x000a, 0x2fe7: 0x000a, 0x2fe8: 0x000a, 0x2fe9: 0x000a,\n\t0x2fea: 0x000a, 0x2feb: 0x000a, 0x2fec: 0x000a,\n\t// Block 0xc0, offset 0x3000\n\t0x302b: 0x000c, 0x302d: 0x000c,\n\t0x3030: 0x000c, 0x3031: 0x000c, 0x3032: 0x000c, 0x3033: 0x000c, 0x3034: 0x000c, 0x3035: 0x000c,\n\t0x3037: 0x000c,\n\t// Block 0xc1, offset 0x3040\n\t0x305d: 0x000c,\n\t0x305f: 0x000c, 0x3062: 0x000c, 0x3063: 0x000c,\n\t0x3064: 0x000c, 0x3065: 0x000c, 0x3067: 0x000c, 0x3068: 0x000c, 0x3069: 0x000c,\n\t0x306a: 0x000c, 0x306b: 0x000c,\n\t// Block 0xc2, offset 0x3080\n\t0x30af: 0x000c,\n\t0x30b0: 0x000c, 0x30b1: 0x000c, 0x30b2: 0x000c, 0x30b3: 0x000c, 0x30b4: 0x000c, 0x30b5: 0x000c,\n\t0x30b6: 0x000c, 0x30b7: 0x000c, 0x30b9: 0x000c, 0x30ba: 0x000c,\n\t// Block 0xc3, offset 0x30c0\n\t0x30fb: 0x000c,\n\t0x30fc: 0x000c, 0x30fe: 0x000c,\n\t// Block 0xc4, offset 0x3100\n\t0x3103: 0x000c,\n\t// Block 0xc5, offset 0x3140\n\t0x3154: 0x000c, 0x3155: 0x000c, 0x3156: 0x000c, 0x3157: 0x000c,\n\t0x315a: 0x000c, 0x315b: 0x000c,\n\t0x3160: 0x000c,\n\t// Block 0xc6, offset 0x3180\n\t0x3181: 0x000c, 0x3182: 0x000c, 0x3183: 0x000c, 0x3184: 0x000c, 0x3185: 0x000c,\n\t0x3186: 0x000c, 0x3189: 0x000c, 0x318a: 0x000c,\n\t0x31b3: 0x000c, 0x31b4: 0x000c, 0x31b5: 0x000c,\n\t0x31b6: 0x000c, 0x31b7: 0x000c, 0x31b8: 0x000c, 0x31bb: 0x000c,\n\t0x31bc: 0x000c, 0x31bd: 0x000c, 0x31be: 0x000c,\n\t// Block 0xc7, offset 0x31c0\n\t0x31c7: 0x000c,\n\t0x31d1: 0x000c,\n\t0x31d2: 0x000c, 0x31d3: 0x000c, 0x31d4: 0x000c, 0x31d5: 0x000c, 0x31d6: 0x000c,\n\t0x31d9: 0x000c, 0x31da: 0x000c, 0x31db: 0x000c,\n\t// Block 0xc8, offset 0x3200\n\t0x320a: 0x000c, 0x320b: 0x000c,\n\t0x320c: 0x000c, 0x320d: 0x000c, 0x320e: 0x000c, 0x320f: 0x000c, 0x3210: 0x000c, 0x3211: 0x000c,\n\t0x3212: 0x000c, 0x3213: 0x000c, 0x3214: 0x000c, 0x3215: 0x000c, 0x3216: 0x000c,\n\t0x3218: 0x000c, 0x3219: 0x000c,\n\t// Block 0xc9, offset 0x3240\n\t0x3260: 0x000c, 0x3262: 0x000c, 0x3263: 0x000c,\n\t0x3264: 0x000c, 0x3266: 0x000c,\n\t// Block 0xca, offset 0x3280\n\t0x32b0: 0x000c, 0x32b1: 0x000c, 0x32b2: 0x000c, 0x32b3: 0x000c, 0x32b4: 0x000c, 0x32b5: 0x000c,\n\t0x32b6: 0x000c, 0x32b8: 0x000c, 0x32b9: 0x000c, 0x32ba: 0x000c, 0x32bb: 0x000c,\n\t0x32bc: 0x000c, 0x32bd: 0x000c,\n\t// Block 0xcb, offset 0x32c0\n\t0x32d2: 0x000c, 0x32d3: 0x000c, 0x32d4: 0x000c, 0x32d5: 0x000c, 0x32d6: 0x000c, 0x32d7: 0x000c,\n\t0x32d8: 0x000c, 0x32d9: 0x000c, 0x32da: 0x000c, 0x32db: 0x000c, 0x32dc: 0x000c, 0x32dd: 0x000c,\n\t0x32de: 0x000c, 0x32df: 0x000c, 0x32e0: 0x000c, 0x32e1: 0x000c, 0x32e2: 0x000c, 0x32e3: 0x000c,\n\t0x32e4: 0x000c, 0x32e5: 0x000c, 0x32e6: 0x000c, 0x32e7: 0x000c,\n\t0x32ea: 0x000c, 0x32eb: 0x000c, 0x32ec: 0x000c, 0x32ed: 0x000c, 0x32ee: 0x000c, 0x32ef: 0x000c,\n\t0x32f0: 0x000c, 0x32f2: 0x000c, 0x32f3: 0x000c, 0x32f5: 0x000c,\n\t0x32f6: 0x000c,\n\t// Block 0xcc, offset 0x3300\n\t0x3331: 0x000c, 0x3332: 0x000c, 0x3333: 0x000c, 0x3334: 0x000c, 0x3335: 0x000c,\n\t0x3336: 0x000c, 0x333a: 0x000c,\n\t0x333c: 0x000c, 0x333d: 0x000c, 0x333f: 0x000c,\n\t// Block 0xcd, offset 0x3340\n\t0x3340: 0x000c, 0x3341: 0x000c, 0x3342: 0x000c, 0x3343: 0x000c, 0x3344: 0x000c, 0x3345: 0x000c,\n\t0x3347: 0x000c,\n\t// Block 0xce, offset 0x3380\n\t0x3390: 0x000c, 0x3391: 0x000c,\n\t0x3395: 0x000c, 0x3397: 0x000c,\n\t// Block 0xcf, offset 0x33c0\n\t0x33f3: 0x000c, 0x33f4: 0x000c,\n\t// Block 0xd0, offset 0x3400\n\t0x3400: 0x000c, 0x3401: 0x000c,\n\t0x3436: 0x000c, 0x3437: 0x000c, 0x3438: 0x000c, 0x3439: 0x000c, 0x343a: 0x000c,\n\t// Block 0xd1, offset 0x3440\n\t0x3440: 0x000c, 0x3442: 0x000c,\n\t0x345a: 0x000c,\n\t// Block 0xd2, offset 0x3480\n\t0x3495: 0x000a, 0x3496: 0x000a, 0x3497: 0x000a,\n\t0x3498: 0x000a, 0x3499: 0x000a, 0x349a: 0x000a, 0x349b: 0x000a, 0x349c: 0x000a, 0x349d: 0x0004,\n\t0x349e: 0x0004, 0x349f: 0x0004, 0x34a0: 0x0004, 0x34a1: 0x000a, 0x34a2: 0x000a, 0x34a3: 0x000a,\n\t0x34a4: 0x000a, 0x34a5: 0x000a, 0x34a6: 0x000a, 0x34a7: 0x000a, 0x34a8: 0x000a, 0x34a9: 0x000a,\n\t0x34aa: 0x000a, 0x34ab: 0x000a, 0x34ac: 0x000a, 0x34ad: 0x000a, 0x34ae: 0x000a, 0x34af: 0x000a,\n\t0x34b0: 0x000a, 0x34b1: 0x000a,\n\t// Block 0xd3, offset 0x34c0\n\t0x34c0: 0x000c,\n\t0x34c7: 0x000c, 0x34c8: 0x000c, 0x34c9: 0x000c, 0x34ca: 0x000c, 0x34cb: 0x000c,\n\t0x34cc: 0x000c, 0x34cd: 0x000c, 0x34ce: 0x000c, 0x34cf: 0x000c, 0x34d0: 0x000c, 0x34d1: 0x000c,\n\t0x34d2: 0x000c, 0x34d3: 0x000c, 0x34d4: 0x000c, 0x34d5: 0x000c,\n\t// Block 0xd4, offset 0x3500\n\t0x351e: 0x000c, 0x351f: 0x000c, 0x3520: 0x000c, 0x3521: 0x000c, 0x3522: 0x000c, 0x3523: 0x000c,\n\t0x3524: 0x000c, 0x3525: 0x000c, 0x3526: 0x000c, 0x3527: 0x000c, 0x3528: 0x000c, 0x3529: 0x000c,\n\t0x352d: 0x000c, 0x352e: 0x000c, 0x352f: 0x000c,\n\t// Block 0xd5, offset 0x3540\n\t0x3570: 0x000c, 0x3571: 0x000c, 0x3572: 0x000c, 0x3573: 0x000c, 0x3574: 0x000c,\n\t// Block 0xd6, offset 0x3580\n\t0x35b0: 0x000c, 0x35b1: 0x000c, 0x35b2: 0x000c, 0x35b3: 0x000c, 0x35b4: 0x000c, 0x35b5: 0x000c,\n\t0x35b6: 0x000c,\n\t// Block 0xd7, offset 0x35c0\n\t0x35cf: 0x000c,\n\t// Block 0xd8, offset 0x3600\n\t0x360f: 0x000c, 0x3610: 0x000c, 0x3611: 0x000c,\n\t0x3612: 0x000c,\n\t// Block 0xd9, offset 0x3640\n\t0x3662: 0x000a,\n\t0x3664: 0x000c,\n\t// Block 0xda, offset 0x3680\n\t0x369d: 0x000c,\n\t0x369e: 0x000c, 0x36a0: 0x000b, 0x36a1: 0x000b, 0x36a2: 0x000b, 0x36a3: 0x000b,\n\t// Block 0xdb, offset 0x36c0\n\t0x36c0: 0x000a, 0x36c1: 0x000a, 0x36c2: 0x000a, 0x36c3: 0x000a, 0x36c4: 0x000a, 0x36c5: 0x000a,\n\t0x36c6: 0x000a, 0x36c7: 0x000a, 0x36c8: 0x000a, 0x36c9: 0x000a, 0x36ca: 0x000a, 0x36cb: 0x000a,\n\t0x36cc: 0x000a, 0x36cd: 0x000a, 0x36ce: 0x000a, 0x36cf: 0x000a, 0x36d0: 0x000a, 0x36d1: 0x000a,\n\t0x36d2: 0x000a, 0x36d3: 0x000a, 0x36d4: 0x000a, 0x36d5: 0x000a,\n\t0x36f0: 0x0002, 0x36f1: 0x0002, 0x36f2: 0x0002, 0x36f3: 0x0002, 0x36f4: 0x0002, 0x36f5: 0x0002,\n\t0x36f6: 0x0002, 0x36f7: 0x0002, 0x36f8: 0x0002, 0x36f9: 0x0002, 0x36fa: 0x000a, 0x36fb: 0x000a,\n\t0x36fc: 0x000a,\n\t// Block 0xdc, offset 0x3700\n\t0x3700: 0x000a, 0x3701: 0x000a, 0x3702: 0x000a, 0x3703: 0x000a, 0x3704: 0x000a, 0x3705: 0x000a,\n\t0x3706: 0x000a, 0x3707: 0x000a, 0x3708: 0x000a, 0x3709: 0x000a, 0x370a: 0x000a, 0x370b: 0x000a,\n\t0x370c: 0x000a, 0x370d: 0x000a, 0x370e: 0x000a, 0x370f: 0x000a, 0x3710: 0x000a, 0x3711: 0x000a,\n\t0x3712: 0x000a, 0x3713: 0x000a, 0x3714: 0x000a, 0x3715: 0x000a, 0x3716: 0x000a, 0x3717: 0x000a,\n\t0x3718: 0x000a, 0x3719: 0x000a, 0x371a: 0x000a, 0x371b: 0x000a, 0x371c: 0x000a, 0x371d: 0x000a,\n\t0x371e: 0x000a, 0x371f: 0x000a, 0x3720: 0x000a, 0x3721: 0x000a, 0x3722: 0x000a, 0x3723: 0x000a,\n\t0x3724: 0x000a, 0x3725: 0x000a, 0x3726: 0x000a, 0x3727: 0x000a, 0x3728: 0x000a, 0x3729: 0x000a,\n\t0x372a: 0x000a, 0x372b: 0x000a, 0x372c: 0x000a, 0x372d: 0x000a, 0x372e: 0x000a, 0x372f: 0x000a,\n\t0x3730: 0x000a, 0x3731: 0x000a, 0x3732: 0x000a, 0x3733: 0x000a,\n\t0x373a: 0x000a, 0x373b: 0x000a,\n\t0x373c: 0x000a, 0x373d: 0x000a, 0x373e: 0x000a, 0x373f: 0x000a,\n\t// Block 0xdd, offset 0x3740\n\t0x3740: 0x000a, 0x3741: 0x000a, 0x3742: 0x000a, 0x3743: 0x000a, 0x3744: 0x000a, 0x3745: 0x000a,\n\t0x3746: 0x000a, 0x3747: 0x000a, 0x3748: 0x000a, 0x3749: 0x000a, 0x374a: 0x000a, 0x374b: 0x000a,\n\t0x374c: 0x000a, 0x374d: 0x000a, 0x374e: 0x000a, 0x374f: 0x000a, 0x3750: 0x000a,\n\t0x3760: 0x000a, 0x3761: 0x000a, 0x3762: 0x000a, 0x3763: 0x000a,\n\t0x3764: 0x000a, 0x3765: 0x000a, 0x3766: 0x000a, 0x3767: 0x000a, 0x3768: 0x000a, 0x3769: 0x000a,\n\t0x376a: 0x000a, 0x376b: 0x000a, 0x376c: 0x000a, 0x376d: 0x000a, 0x376e: 0x000a, 0x376f: 0x000a,\n\t0x3770: 0x000a,\n\t// Block 0xde, offset 0x3780\n\t0x3780: 0x000c, 0x3781: 0x000c, 0x3782: 0x000c, 0x3783: 0x000c, 0x3784: 0x000c, 0x3785: 0x000c,\n\t0x3786: 0x000c, 0x3787: 0x000c, 0x3788: 0x000c, 0x3789: 0x000c, 0x378a: 0x000c, 0x378b: 0x000c,\n\t0x378c: 0x000c, 0x378d: 0x000c, 0x378e: 0x000c, 0x378f: 0x000c, 0x3790: 0x000c, 0x3791: 0x000c,\n\t0x3792: 0x000c, 0x3793: 0x000c, 0x3794: 0x000c, 0x3795: 0x000c, 0x3796: 0x000c, 0x3797: 0x000c,\n\t0x3798: 0x000c, 0x3799: 0x000c, 0x379a: 0x000c, 0x379b: 0x000c, 0x379c: 0x000c, 0x379d: 0x000c,\n\t0x379e: 0x000c, 0x379f: 0x000c, 0x37a0: 0x000c, 0x37a1: 0x000c, 0x37a2: 0x000c, 0x37a3: 0x000c,\n\t0x37a4: 0x000c, 0x37a5: 0x000c, 0x37a6: 0x000c, 0x37a7: 0x000c, 0x37a8: 0x000c, 0x37a9: 0x000c,\n\t0x37aa: 0x000c, 0x37ab: 0x000c, 0x37ac: 0x000c, 0x37ad: 0x000c,\n\t0x37b0: 0x000c, 0x37b1: 0x000c, 0x37b2: 0x000c, 0x37b3: 0x000c, 0x37b4: 0x000c, 0x37b5: 0x000c,\n\t0x37b6: 0x000c, 0x37b7: 0x000c, 0x37b8: 0x000c, 0x37b9: 0x000c, 0x37ba: 0x000c, 0x37bb: 0x000c,\n\t0x37bc: 0x000c, 0x37bd: 0x000c, 0x37be: 0x000c, 0x37bf: 0x000c,\n\t// Block 0xdf, offset 0x37c0\n\t0x37c0: 0x000c, 0x37c1: 0x000c, 0x37c2: 0x000c, 0x37c3: 0x000c, 0x37c4: 0x000c, 0x37c5: 0x000c,\n\t0x37c6: 0x000c,\n\t// Block 0xe0, offset 0x3800\n\t0x3827: 0x000c, 0x3828: 0x000c, 0x3829: 0x000c,\n\t0x3833: 0x000b, 0x3834: 0x000b, 0x3835: 0x000b,\n\t0x3836: 0x000b, 0x3837: 0x000b, 0x3838: 0x000b, 0x3839: 0x000b, 0x383a: 0x000b, 0x383b: 0x000c,\n\t0x383c: 0x000c, 0x383d: 0x000c, 0x383e: 0x000c, 0x383f: 0x000c,\n\t// Block 0xe1, offset 0x3840\n\t0x3840: 0x000c, 0x3841: 0x000c, 0x3842: 0x000c, 0x3845: 0x000c,\n\t0x3846: 0x000c, 0x3847: 0x000c, 0x3848: 0x000c, 0x3849: 0x000c, 0x384a: 0x000c, 0x384b: 0x000c,\n\t0x386a: 0x000c, 0x386b: 0x000c, 0x386c: 0x000c, 0x386d: 0x000c,\n\t// Block 0xe2, offset 0x3880\n\t0x38a9: 0x000a,\n\t0x38aa: 0x000a,\n\t// Block 0xe3, offset 0x38c0\n\t0x38c0: 0x000a, 0x38c1: 0x000a, 0x38c2: 0x000c, 0x38c3: 0x000c, 0x38c4: 0x000c, 0x38c5: 0x000a,\n\t// Block 0xe4, offset 0x3900\n\t0x3900: 0x000a, 0x3901: 0x000a, 0x3902: 0x000a, 0x3903: 0x000a, 0x3904: 0x000a, 0x3905: 0x000a,\n\t0x3906: 0x000a, 0x3907: 0x000a, 0x3908: 0x000a, 0x3909: 0x000a, 0x390a: 0x000a, 0x390b: 0x000a,\n\t0x390c: 0x000a, 0x390d: 0x000a, 0x390e: 0x000a, 0x390f: 0x000a, 0x3910: 0x000a, 0x3911: 0x000a,\n\t0x3912: 0x000a, 0x3913: 0x000a, 0x3914: 0x000a, 0x3915: 0x000a, 0x3916: 0x000a,\n\t// Block 0xe5, offset 0x3940\n\t0x3941: 0x000a,\n\t0x395b: 0x000a,\n\t0x397b: 0x000a,\n\t// Block 0xe6, offset 0x3980\n\t0x3995: 0x000a,\n\t0x39b5: 0x000a,\n\t// Block 0xe7, offset 0x39c0\n\t0x39cf: 0x000a,\n\t0x39ef: 0x000a,\n\t// Block 0xe8, offset 0x3a00\n\t0x3a09: 0x000a,\n\t0x3a29: 0x000a,\n\t// Block 0xe9, offset 0x3a40\n\t0x3a43: 0x000a,\n\t0x3a4e: 0x0002, 0x3a4f: 0x0002, 0x3a50: 0x0002, 0x3a51: 0x0002,\n\t0x3a52: 0x0002, 0x3a53: 0x0002, 0x3a54: 0x0002, 0x3a55: 0x0002, 0x3a56: 0x0002, 0x3a57: 0x0002,\n\t0x3a58: 0x0002, 0x3a59: 0x0002, 0x3a5a: 0x0002, 0x3a5b: 0x0002, 0x3a5c: 0x0002, 0x3a5d: 0x0002,\n\t0x3a5e: 0x0002, 0x3a5f: 0x0002, 0x3a60: 0x0002, 0x3a61: 0x0002, 0x3a62: 0x0002, 0x3a63: 0x0002,\n\t0x3a64: 0x0002, 0x3a65: 0x0002, 0x3a66: 0x0002, 0x3a67: 0x0002, 0x3a68: 0x0002, 0x3a69: 0x0002,\n\t0x3a6a: 0x0002, 0x3a6b: 0x0002, 0x3a6c: 0x0002, 0x3a6d: 0x0002, 0x3a6e: 0x0002, 0x3a6f: 0x0002,\n\t0x3a70: 0x0002, 0x3a71: 0x0002, 0x3a72: 0x0002, 0x3a73: 0x0002, 0x3a74: 0x0002, 0x3a75: 0x0002,\n\t0x3a76: 0x0002, 0x3a77: 0x0002, 0x3a78: 0x0002, 0x3a79: 0x0002, 0x3a7a: 0x0002, 0x3a7b: 0x0002,\n\t0x3a7c: 0x0002, 0x3a7d: 0x0002, 0x3a7e: 0x0002, 0x3a7f: 0x0002,\n\t// Block 0xea, offset 0x3a80\n\t0x3a80: 0x000c, 0x3a81: 0x000c, 0x3a82: 0x000c, 0x3a83: 0x000c, 0x3a84: 0x000c, 0x3a85: 0x000c,\n\t0x3a86: 0x000c, 0x3a87: 0x000c, 0x3a88: 0x000c, 0x3a89: 0x000c, 0x3a8a: 0x000c, 0x3a8b: 0x000c,\n\t0x3a8c: 0x000c, 0x3a8d: 0x000c, 0x3a8e: 0x000c, 0x3a8f: 0x000c, 0x3a90: 0x000c, 0x3a91: 0x000c,\n\t0x3a92: 0x000c, 0x3a93: 0x000c, 0x3a94: 0x000c, 0x3a95: 0x000c, 0x3a96: 0x000c, 0x3a97: 0x000c,\n\t0x3a98: 0x000c, 0x3a99: 0x000c, 0x3a9a: 0x000c, 0x3a9b: 0x000c, 0x3a9c: 0x000c, 0x3a9d: 0x000c,\n\t0x3a9e: 0x000c, 0x3a9f: 0x000c, 0x3aa0: 0x000c, 0x3aa1: 0x000c, 0x3aa2: 0x000c, 0x3aa3: 0x000c,\n\t0x3aa4: 0x000c, 0x3aa5: 0x000c, 0x3aa6: 0x000c, 0x3aa7: 0x000c, 0x3aa8: 0x000c, 0x3aa9: 0x000c,\n\t0x3aaa: 0x000c, 0x3aab: 0x000c, 0x3aac: 0x000c, 0x3aad: 0x000c, 0x3aae: 0x000c, 0x3aaf: 0x000c,\n\t0x3ab0: 0x000c, 0x3ab1: 0x000c, 0x3ab2: 0x000c, 0x3ab3: 0x000c, 0x3ab4: 0x000c, 0x3ab5: 0x000c,\n\t0x3ab6: 0x000c, 0x3abb: 0x000c,\n\t0x3abc: 0x000c, 0x3abd: 0x000c, 0x3abe: 0x000c, 0x3abf: 0x000c,\n\t// Block 0xeb, offset 0x3ac0\n\t0x3ac0: 0x000c, 0x3ac1: 0x000c, 0x3ac2: 0x000c, 0x3ac3: 0x000c, 0x3ac4: 0x000c, 0x3ac5: 0x000c,\n\t0x3ac6: 0x000c, 0x3ac7: 0x000c, 0x3ac8: 0x000c, 0x3ac9: 0x000c, 0x3aca: 0x000c, 0x3acb: 0x000c,\n\t0x3acc: 0x000c, 0x3acd: 0x000c, 0x3ace: 0x000c, 0x3acf: 0x000c, 0x3ad0: 0x000c, 0x3ad1: 0x000c,\n\t0x3ad2: 0x000c, 0x3ad3: 0x000c, 0x3ad4: 0x000c, 0x3ad5: 0x000c, 0x3ad6: 0x000c, 0x3ad7: 0x000c,\n\t0x3ad8: 0x000c, 0x3ad9: 0x000c, 0x3ada: 0x000c, 0x3adb: 0x000c, 0x3adc: 0x000c, 0x3add: 0x000c,\n\t0x3ade: 0x000c, 0x3adf: 0x000c, 0x3ae0: 0x000c, 0x3ae1: 0x000c, 0x3ae2: 0x000c, 0x3ae3: 0x000c,\n\t0x3ae4: 0x000c, 0x3ae5: 0x000c, 0x3ae6: 0x000c, 0x3ae7: 0x000c, 0x3ae8: 0x000c, 0x3ae9: 0x000c,\n\t0x3aea: 0x000c, 0x3aeb: 0x000c, 0x3aec: 0x000c,\n\t0x3af5: 0x000c,\n\t// Block 0xec, offset 0x3b00\n\t0x3b04: 0x000c,\n\t0x3b1b: 0x000c, 0x3b1c: 0x000c, 0x3b1d: 0x000c,\n\t0x3b1e: 0x000c, 0x3b1f: 0x000c, 0x3b21: 0x000c, 0x3b22: 0x000c, 0x3b23: 0x000c,\n\t0x3b24: 0x000c, 0x3b25: 0x000c, 0x3b26: 0x000c, 0x3b27: 0x000c, 0x3b28: 0x000c, 0x3b29: 0x000c,\n\t0x3b2a: 0x000c, 0x3b2b: 0x000c, 0x3b2c: 0x000c, 0x3b2d: 0x000c, 0x3b2e: 0x000c, 0x3b2f: 0x000c,\n\t// Block 0xed, offset 0x3b40\n\t0x3b40: 0x000c, 0x3b41: 0x000c, 0x3b42: 0x000c, 0x3b43: 0x000c, 0x3b44: 0x000c, 0x3b45: 0x000c,\n\t0x3b46: 0x000c, 0x3b48: 0x000c, 0x3b49: 0x000c, 0x3b4a: 0x000c, 0x3b4b: 0x000c,\n\t0x3b4c: 0x000c, 0x3b4d: 0x000c, 0x3b4e: 0x000c, 0x3b4f: 0x000c, 0x3b50: 0x000c, 0x3b51: 0x000c,\n\t0x3b52: 0x000c, 0x3b53: 0x000c, 0x3b54: 0x000c, 0x3b55: 0x000c, 0x3b56: 0x000c, 0x3b57: 0x000c,\n\t0x3b58: 0x000c, 0x3b5b: 0x000c, 0x3b5c: 0x000c, 0x3b5d: 0x000c,\n\t0x3b5e: 0x000c, 0x3b5f: 0x000c, 0x3b60: 0x000c, 0x3b61: 0x000c, 0x3b63: 0x000c,\n\t0x3b64: 0x000c, 0x3b66: 0x000c, 0x3b67: 0x000c, 0x3b68: 0x000c, 0x3b69: 0x000c,\n\t0x3b6a: 0x000c,\n\t// Block 0xee, offset 0x3b80\n\t0x3bae: 0x000c,\n\t// Block 0xef, offset 0x3bc0\n\t0x3bec: 0x000c, 0x3bed: 0x000c, 0x3bee: 0x000c, 0x3bef: 0x000c,\n\t0x3bff: 0x0004,\n\t// Block 0xf0, offset 0x3c00\n\t0x3c2c: 0x000c, 0x3c2d: 0x000c, 0x3c2e: 0x000c, 0x3c2f: 0x000c,\n\t// Block 0xf1, offset 0x3c40\n\t0x3c6e: 0x000c, 0x3c6f: 0x000c,\n\t// Block 0xf2, offset 0x3c80\n\t0x3ca3: 0x000c,\n\t0x3ca6: 0x000c,\n\t0x3cae: 0x000c, 0x3caf: 0x000c,\n\t0x3cb5: 0x000c,\n\t// Block 0xf3, offset 0x3cc0\n\t0x3cc0: 0x0001, 0x3cc1: 0x0001, 0x3cc2: 0x0001, 0x3cc3: 0x0001, 0x3cc4: 0x0001, 0x3cc5: 0x0001,\n\t0x3cc6: 0x0001, 0x3cc7: 0x0001, 0x3cc8: 0x0001, 0x3cc9: 0x0001, 0x3cca: 0x0001, 0x3ccb: 0x0001,\n\t0x3ccc: 0x0001, 0x3ccd: 0x0001, 0x3cce: 0x0001, 0x3ccf: 0x0001, 0x3cd0: 0x000c, 0x3cd1: 0x000c,\n\t0x3cd2: 0x000c, 0x3cd3: 0x000c, 0x3cd4: 0x000c, 0x3cd5: 0x000c, 0x3cd6: 0x000c, 0x3cd7: 0x0001,\n\t0x3cd8: 0x0001, 0x3cd9: 0x0001, 0x3cda: 0x0001, 0x3cdb: 0x0001, 0x3cdc: 0x0001, 0x3cdd: 0x0001,\n\t0x3cde: 0x0001, 0x3cdf: 0x0001, 0x3ce0: 0x0001, 0x3ce1: 0x0001, 0x3ce2: 0x0001, 0x3ce3: 0x0001,\n\t0x3ce4: 0x0001, 0x3ce5: 0x0001, 0x3ce6: 0x0001, 0x3ce7: 0x0001, 0x3ce8: 0x0001, 0x3ce9: 0x0001,\n\t0x3cea: 0x0001, 0x3ceb: 0x0001, 0x3cec: 0x0001, 0x3ced: 0x0001, 0x3cee: 0x0001, 0x3cef: 0x0001,\n\t0x3cf0: 0x0001, 0x3cf1: 0x0001, 0x3cf2: 0x0001, 0x3cf3: 0x0001, 0x3cf4: 0x0001, 0x3cf5: 0x0001,\n\t0x3cf6: 0x0001, 0x3cf7: 0x0001, 0x3cf8: 0x0001, 0x3cf9: 0x0001, 0x3cfa: 0x0001, 0x3cfb: 0x0001,\n\t0x3cfc: 0x0001, 0x3cfd: 0x0001, 0x3cfe: 0x0001, 0x3cff: 0x0001,\n\t// Block 0xf4, offset 0x3d00\n\t0x3d00: 0x0001, 0x3d01: 0x0001, 0x3d02: 0x0001, 0x3d03: 0x0001, 0x3d04: 0x000c, 0x3d05: 0x000c,\n\t0x3d06: 0x000c, 0x3d07: 0x000c, 0x3d08: 0x000c, 0x3d09: 0x000c, 0x3d0a: 0x000c, 0x3d0b: 0x0001,\n\t0x3d0c: 0x0001, 0x3d0d: 0x0001, 0x3d0e: 0x0001, 0x3d0f: 0x0001, 0x3d10: 0x0001, 0x3d11: 0x0001,\n\t0x3d12: 0x0001, 0x3d13: 0x0001, 0x3d14: 0x0001, 0x3d15: 0x0001, 0x3d16: 0x0001, 0x3d17: 0x0001,\n\t0x3d18: 0x0001, 0x3d19: 0x0001, 0x3d1a: 0x0001, 0x3d1b: 0x0001, 0x3d1c: 0x0001, 0x3d1d: 0x0001,\n\t0x3d1e: 0x0001, 0x3d1f: 0x0001, 0x3d20: 0x0001, 0x3d21: 0x0001, 0x3d22: 0x0001, 0x3d23: 0x0001,\n\t0x3d24: 0x0001, 0x3d25: 0x0001, 0x3d26: 0x0001, 0x3d27: 0x0001, 0x3d28: 0x0001, 0x3d29: 0x0001,\n\t0x3d2a: 0x0001, 0x3d2b: 0x0001, 0x3d2c: 0x0001, 0x3d2d: 0x0001, 0x3d2e: 0x0001, 0x3d2f: 0x0001,\n\t0x3d30: 0x0001, 0x3d31: 0x0001, 0x3d32: 0x0001, 0x3d33: 0x0001, 0x3d34: 0x0001, 0x3d35: 0x0001,\n\t0x3d36: 0x0001, 0x3d37: 0x0001, 0x3d38: 0x0001, 0x3d39: 0x0001, 0x3d3a: 0x0001, 0x3d3b: 0x0001,\n\t0x3d3c: 0x0001, 0x3d3d: 0x0001, 0x3d3e: 0x0001, 0x3d3f: 0x0001,\n\t// Block 0xf5, offset 0x3d40\n\t0x3d40: 0x0001, 0x3d41: 0x0001, 0x3d42: 0x0001, 0x3d43: 0x0001, 0x3d44: 0x0001, 0x3d45: 0x0001,\n\t0x3d46: 0x0001, 0x3d47: 0x0001, 0x3d48: 0x0001, 0x3d49: 0x0001, 0x3d4a: 0x0001, 0x3d4b: 0x0001,\n\t0x3d4c: 0x0001, 0x3d4d: 0x0001, 0x3d4e: 0x0001, 0x3d4f: 0x0001, 0x3d50: 0x0001, 0x3d51: 0x0001,\n\t0x3d52: 0x0001, 0x3d53: 0x0001, 0x3d54: 0x0001, 0x3d55: 0x0001, 0x3d56: 0x0001, 0x3d57: 0x0001,\n\t0x3d58: 0x0001, 0x3d59: 0x0001, 0x3d5a: 0x0001, 0x3d5b: 0x0001, 0x3d5c: 0x0001, 0x3d5d: 0x0001,\n\t0x3d5e: 0x0001, 0x3d5f: 0x0001, 0x3d60: 0x0001, 0x3d61: 0x0001, 0x3d62: 0x0001, 0x3d63: 0x0001,\n\t0x3d64: 0x0001, 0x3d65: 0x0001, 0x3d66: 0x0001, 0x3d67: 0x0001, 0x3d68: 0x0001, 0x3d69: 0x0001,\n\t0x3d6a: 0x0001, 0x3d6b: 0x0001, 0x3d6c: 0x0001, 0x3d6d: 0x0001, 0x3d6e: 0x0001, 0x3d6f: 0x0001,\n\t0x3d70: 0x0001, 0x3d71: 0x000d, 0x3d72: 0x000d, 0x3d73: 0x000d, 0x3d74: 0x000d, 0x3d75: 0x000d,\n\t0x3d76: 0x000d, 0x3d77: 0x000d, 0x3d78: 0x000d, 0x3d79: 0x000d, 0x3d7a: 0x000d, 0x3d7b: 0x000d,\n\t0x3d7c: 0x000d, 0x3d7d: 0x000d, 0x3d7e: 0x000d, 0x3d7f: 0x000d,\n\t// Block 0xf6, offset 0x3d80\n\t0x3d80: 0x000d, 0x3d81: 0x000d, 0x3d82: 0x000d, 0x3d83: 0x000d, 0x3d84: 0x000d, 0x3d85: 0x000d,\n\t0x3d86: 0x000d, 0x3d87: 0x000d, 0x3d88: 0x000d, 0x3d89: 0x000d, 0x3d8a: 0x000d, 0x3d8b: 0x000d,\n\t0x3d8c: 0x000d, 0x3d8d: 0x000d, 0x3d8e: 0x000d, 0x3d8f: 0x000d, 0x3d90: 0x000d, 0x3d91: 0x000d,\n\t0x3d92: 0x000d, 0x3d93: 0x000d, 0x3d94: 0x000d, 0x3d95: 0x000d, 0x3d96: 0x000d, 0x3d97: 0x000d,\n\t0x3d98: 0x000d, 0x3d99: 0x000d, 0x3d9a: 0x000d, 0x3d9b: 0x000d, 0x3d9c: 0x000d, 0x3d9d: 0x000d,\n\t0x3d9e: 0x000d, 0x3d9f: 0x000d, 0x3da0: 0x000d, 0x3da1: 0x000d, 0x3da2: 0x000d, 0x3da3: 0x000d,\n\t0x3da4: 0x000d, 0x3da5: 0x000d, 0x3da6: 0x000d, 0x3da7: 0x000d, 0x3da8: 0x000d, 0x3da9: 0x000d,\n\t0x3daa: 0x000d, 0x3dab: 0x000d, 0x3dac: 0x000d, 0x3dad: 0x000d, 0x3dae: 0x000d, 0x3daf: 0x000d,\n\t0x3db0: 0x000d, 0x3db1: 0x000d, 0x3db2: 0x000d, 0x3db3: 0x000d, 0x3db4: 0x000d, 0x3db5: 0x0001,\n\t0x3db6: 0x0001, 0x3db7: 0x0001, 0x3db8: 0x0001, 0x3db9: 0x0001, 0x3dba: 0x0001, 0x3dbb: 0x0001,\n\t0x3dbc: 0x0001, 0x3dbd: 0x0001, 0x3dbe: 0x0001, 0x3dbf: 0x0001,\n\t// Block 0xf7, offset 0x3dc0\n\t0x3dc0: 0x0001, 0x3dc1: 0x000d, 0x3dc2: 0x000d, 0x3dc3: 0x000d, 0x3dc4: 0x000d, 0x3dc5: 0x000d,\n\t0x3dc6: 0x000d, 0x3dc7: 0x000d, 0x3dc8: 0x000d, 0x3dc9: 0x000d, 0x3dca: 0x000d, 0x3dcb: 0x000d,\n\t0x3dcc: 0x000d, 0x3dcd: 0x000d, 0x3dce: 0x000d, 0x3dcf: 0x000d, 0x3dd0: 0x000d, 0x3dd1: 0x000d,\n\t0x3dd2: 0x000d, 0x3dd3: 0x000d, 0x3dd4: 0x000d, 0x3dd5: 0x000d, 0x3dd6: 0x000d, 0x3dd7: 0x000d,\n\t0x3dd8: 0x000d, 0x3dd9: 0x000d, 0x3dda: 0x000d, 0x3ddb: 0x000d, 0x3ddc: 0x000d, 0x3ddd: 0x000d,\n\t0x3dde: 0x000d, 0x3ddf: 0x000d, 0x3de0: 0x000d, 0x3de1: 0x000d, 0x3de2: 0x000d, 0x3de3: 0x000d,\n\t0x3de4: 0x000d, 0x3de5: 0x000d, 0x3de6: 0x000d, 0x3de7: 0x000d, 0x3de8: 0x000d, 0x3de9: 0x000d,\n\t0x3dea: 0x000d, 0x3deb: 0x000d, 0x3dec: 0x000d, 0x3ded: 0x000d, 0x3dee: 0x000d, 0x3def: 0x000d,\n\t0x3df0: 0x000d, 0x3df1: 0x000d, 0x3df2: 0x000d, 0x3df3: 0x000d, 0x3df4: 0x000d, 0x3df5: 0x000d,\n\t0x3df6: 0x000d, 0x3df7: 0x000d, 0x3df8: 0x000d, 0x3df9: 0x000d, 0x3dfa: 0x000d, 0x3dfb: 0x000d,\n\t0x3dfc: 0x000d, 0x3dfd: 0x000d, 0x3dfe: 0x0001, 0x3dff: 0x0001,\n\t// Block 0xf8, offset 0x3e00\n\t0x3e00: 0x000d, 0x3e01: 0x000d, 0x3e02: 0x000d, 0x3e03: 0x000d, 0x3e04: 0x000d, 0x3e05: 0x000d,\n\t0x3e06: 0x000d, 0x3e07: 0x000d, 0x3e08: 0x000d, 0x3e09: 0x000d, 0x3e0a: 0x000d, 0x3e0b: 0x000d,\n\t0x3e0c: 0x000d, 0x3e0d: 0x000d, 0x3e0e: 0x000d, 0x3e0f: 0x000d, 0x3e10: 0x000d, 0x3e11: 0x000d,\n\t0x3e12: 0x000d, 0x3e13: 0x000d, 0x3e14: 0x000d, 0x3e15: 0x000d, 0x3e16: 0x000d, 0x3e17: 0x000d,\n\t0x3e18: 0x000d, 0x3e19: 0x000d, 0x3e1a: 0x000d, 0x3e1b: 0x000d, 0x3e1c: 0x000d, 0x3e1d: 0x000d,\n\t0x3e1e: 0x000d, 0x3e1f: 0x000d, 0x3e20: 0x000d, 0x3e21: 0x000d, 0x3e22: 0x000d, 0x3e23: 0x000d,\n\t0x3e24: 0x000d, 0x3e25: 0x000d, 0x3e26: 0x000d, 0x3e27: 0x000d, 0x3e28: 0x000d, 0x3e29: 0x000d,\n\t0x3e2a: 0x000d, 0x3e2b: 0x000d, 0x3e2c: 0x000d, 0x3e2d: 0x000d, 0x3e2e: 0x000d, 0x3e2f: 0x000d,\n\t0x3e30: 0x000a, 0x3e31: 0x000a, 0x3e32: 0x000d, 0x3e33: 0x000d, 0x3e34: 0x000d, 0x3e35: 0x000d,\n\t0x3e36: 0x000d, 0x3e37: 0x000d, 0x3e38: 0x000d, 0x3e39: 0x000d, 0x3e3a: 0x000d, 0x3e3b: 0x000d,\n\t0x3e3c: 0x000d, 0x3e3d: 0x000d, 0x3e3e: 0x000d, 0x3e3f: 0x000d,\n\t// Block 0xf9, offset 0x3e40\n\t0x3e40: 0x000a, 0x3e41: 0x000a, 0x3e42: 0x000a, 0x3e43: 0x000a, 0x3e44: 0x000a, 0x3e45: 0x000a,\n\t0x3e46: 0x000a, 0x3e47: 0x000a, 0x3e48: 0x000a, 0x3e49: 0x000a, 0x3e4a: 0x000a, 0x3e4b: 0x000a,\n\t0x3e4c: 0x000a, 0x3e4d: 0x000a, 0x3e4e: 0x000a, 0x3e4f: 0x000a, 0x3e50: 0x000a, 0x3e51: 0x000a,\n\t0x3e52: 0x000a, 0x3e53: 0x000a, 0x3e54: 0x000a, 0x3e55: 0x000a, 0x3e56: 0x000a, 0x3e57: 0x000a,\n\t0x3e58: 0x000a, 0x3e59: 0x000a, 0x3e5a: 0x000a, 0x3e5b: 0x000a, 0x3e5c: 0x000a, 0x3e5d: 0x000a,\n\t0x3e5e: 0x000a, 0x3e5f: 0x000a, 0x3e60: 0x000a, 0x3e61: 0x000a, 0x3e62: 0x000a, 0x3e63: 0x000a,\n\t0x3e64: 0x000a, 0x3e65: 0x000a, 0x3e66: 0x000a, 0x3e67: 0x000a, 0x3e68: 0x000a, 0x3e69: 0x000a,\n\t0x3e6a: 0x000a, 0x3e6b: 0x000a,\n\t0x3e70: 0x000a, 0x3e71: 0x000a, 0x3e72: 0x000a, 0x3e73: 0x000a, 0x3e74: 0x000a, 0x3e75: 0x000a,\n\t0x3e76: 0x000a, 0x3e77: 0x000a, 0x3e78: 0x000a, 0x3e79: 0x000a, 0x3e7a: 0x000a, 0x3e7b: 0x000a,\n\t0x3e7c: 0x000a, 0x3e7d: 0x000a, 0x3e7e: 0x000a, 0x3e7f: 0x000a,\n\t// Block 0xfa, offset 0x3e80\n\t0x3e80: 0x000a, 0x3e81: 0x000a, 0x3e82: 0x000a, 0x3e83: 0x000a, 0x3e84: 0x000a, 0x3e85: 0x000a,\n\t0x3e86: 0x000a, 0x3e87: 0x000a, 0x3e88: 0x000a, 0x3e89: 0x000a, 0x3e8a: 0x000a, 0x3e8b: 0x000a,\n\t0x3e8c: 0x000a, 0x3e8d: 0x000a, 0x3e8e: 0x000a, 0x3e8f: 0x000a, 0x3e90: 0x000a, 0x3e91: 0x000a,\n\t0x3e92: 0x000a, 0x3e93: 0x000a,\n\t0x3ea0: 0x000a, 0x3ea1: 0x000a, 0x3ea2: 0x000a, 0x3ea3: 0x000a,\n\t0x3ea4: 0x000a, 0x3ea5: 0x000a, 0x3ea6: 0x000a, 0x3ea7: 0x000a, 0x3ea8: 0x000a, 0x3ea9: 0x000a,\n\t0x3eaa: 0x000a, 0x3eab: 0x000a, 0x3eac: 0x000a, 0x3ead: 0x000a, 0x3eae: 0x000a,\n\t0x3eb1: 0x000a, 0x3eb2: 0x000a, 0x3eb3: 0x000a, 0x3eb4: 0x000a, 0x3eb5: 0x000a,\n\t0x3eb6: 0x000a, 0x3eb7: 0x000a, 0x3eb8: 0x000a, 0x3eb9: 0x000a, 0x3eba: 0x000a, 0x3ebb: 0x000a,\n\t0x3ebc: 0x000a, 0x3ebd: 0x000a, 0x3ebe: 0x000a, 0x3ebf: 0x000a,\n\t// Block 0xfb, offset 0x3ec0\n\t0x3ec1: 0x000a, 0x3ec2: 0x000a, 0x3ec3: 0x000a, 0x3ec4: 0x000a, 0x3ec5: 0x000a,\n\t0x3ec6: 0x000a, 0x3ec7: 0x000a, 0x3ec8: 0x000a, 0x3ec9: 0x000a, 0x3eca: 0x000a, 0x3ecb: 0x000a,\n\t0x3ecc: 0x000a, 0x3ecd: 0x000a, 0x3ece: 0x000a, 0x3ecf: 0x000a, 0x3ed1: 0x000a,\n\t0x3ed2: 0x000a, 0x3ed3: 0x000a, 0x3ed4: 0x000a, 0x3ed5: 0x000a, 0x3ed6: 0x000a, 0x3ed7: 0x000a,\n\t0x3ed8: 0x000a, 0x3ed9: 0x000a, 0x3eda: 0x000a, 0x3edb: 0x000a, 0x3edc: 0x000a, 0x3edd: 0x000a,\n\t0x3ede: 0x000a, 0x3edf: 0x000a, 0x3ee0: 0x000a, 0x3ee1: 0x000a, 0x3ee2: 0x000a, 0x3ee3: 0x000a,\n\t0x3ee4: 0x000a, 0x3ee5: 0x000a, 0x3ee6: 0x000a, 0x3ee7: 0x000a, 0x3ee8: 0x000a, 0x3ee9: 0x000a,\n\t0x3eea: 0x000a, 0x3eeb: 0x000a, 0x3eec: 0x000a, 0x3eed: 0x000a, 0x3eee: 0x000a, 0x3eef: 0x000a,\n\t0x3ef0: 0x000a, 0x3ef1: 0x000a, 0x3ef2: 0x000a, 0x3ef3: 0x000a, 0x3ef4: 0x000a, 0x3ef5: 0x000a,\n\t// Block 0xfc, offset 0x3f00\n\t0x3f00: 0x0002, 0x3f01: 0x0002, 0x3f02: 0x0002, 0x3f03: 0x0002, 0x3f04: 0x0002, 0x3f05: 0x0002,\n\t0x3f06: 0x0002, 0x3f07: 0x0002, 0x3f08: 0x0002, 0x3f09: 0x0002, 0x3f0a: 0x0002, 0x3f0b: 0x000a,\n\t0x3f0c: 0x000a, 0x3f0d: 0x000a, 0x3f0e: 0x000a, 0x3f0f: 0x000a,\n\t0x3f2f: 0x000a,\n\t// Block 0xfd, offset 0x3f40\n\t0x3f6a: 0x000a, 0x3f6b: 0x000a, 0x3f6c: 0x000a, 0x3f6d: 0x000a, 0x3f6e: 0x000a, 0x3f6f: 0x000a,\n\t// Block 0xfe, offset 0x3f80\n\t0x3fad: 0x000a,\n\t// Block 0xff, offset 0x3fc0\n\t0x3fe0: 0x000a, 0x3fe1: 0x000a, 0x3fe2: 0x000a, 0x3fe3: 0x000a,\n\t0x3fe4: 0x000a, 0x3fe5: 0x000a,\n\t// Block 0x100, offset 0x4000\n\t0x4000: 0x000a, 0x4001: 0x000a, 0x4002: 0x000a, 0x4003: 0x000a, 0x4004: 0x000a, 0x4005: 0x000a,\n\t0x4006: 0x000a, 0x4007: 0x000a, 0x4008: 0x000a, 0x4009: 0x000a, 0x400a: 0x000a, 0x400b: 0x000a,\n\t0x400c: 0x000a, 0x400d: 0x000a, 0x400e: 0x000a, 0x400f: 0x000a, 0x4010: 0x000a, 0x4011: 0x000a,\n\t0x4012: 0x000a, 0x4013: 0x000a, 0x4014: 0x000a, 0x4015: 0x000a, 0x4016: 0x000a, 0x4017: 0x000a,\n\t0x4018: 0x000a, 0x401c: 0x000a, 0x401d: 0x000a,\n\t0x401e: 0x000a, 0x401f: 0x000a, 0x4020: 0x000a, 0x4021: 0x000a, 0x4022: 0x000a, 0x4023: 0x000a,\n\t0x4024: 0x000a, 0x4025: 0x000a, 0x4026: 0x000a, 0x4027: 0x000a, 0x4028: 0x000a, 0x4029: 0x000a,\n\t0x402a: 0x000a, 0x402b: 0x000a, 0x402c: 0x000a,\n\t0x4030: 0x000a, 0x4031: 0x000a, 0x4032: 0x000a, 0x4033: 0x000a, 0x4034: 0x000a, 0x4035: 0x000a,\n\t0x4036: 0x000a, 0x4037: 0x000a, 0x4038: 0x000a, 0x4039: 0x000a, 0x403a: 0x000a, 0x403b: 0x000a,\n\t0x403c: 0x000a,\n\t// Block 0x101, offset 0x4040\n\t0x4040: 0x000a, 0x4041: 0x000a, 0x4042: 0x000a, 0x4043: 0x000a, 0x4044: 0x000a, 0x4045: 0x000a,\n\t0x4046: 0x000a, 0x4047: 0x000a, 0x4048: 0x000a, 0x4049: 0x000a, 0x404a: 0x000a, 0x404b: 0x000a,\n\t0x404c: 0x000a, 0x404d: 0x000a, 0x404e: 0x000a, 0x404f: 0x000a, 0x4050: 0x000a, 0x4051: 0x000a,\n\t0x4052: 0x000a, 0x4053: 0x000a, 0x4054: 0x000a, 0x4055: 0x000a, 0x4056: 0x000a, 0x4057: 0x000a,\n\t0x4058: 0x000a, 0x4059: 0x000a,\n\t0x4060: 0x000a, 0x4061: 0x000a, 0x4062: 0x000a, 0x4063: 0x000a,\n\t0x4064: 0x000a, 0x4065: 0x000a, 0x4066: 0x000a, 0x4067: 0x000a, 0x4068: 0x000a, 0x4069: 0x000a,\n\t0x406a: 0x000a, 0x406b: 0x000a,\n\t0x4070: 0x000a,\n\t// Block 0x102, offset 0x4080\n\t0x4080: 0x000a, 0x4081: 0x000a, 0x4082: 0x000a, 0x4083: 0x000a, 0x4084: 0x000a, 0x4085: 0x000a,\n\t0x4086: 0x000a, 0x4087: 0x000a, 0x4088: 0x000a, 0x4089: 0x000a, 0x408a: 0x000a, 0x408b: 0x000a,\n\t0x4090: 0x000a, 0x4091: 0x000a,\n\t0x4092: 0x000a, 0x4093: 0x000a, 0x4094: 0x000a, 0x4095: 0x000a, 0x4096: 0x000a, 0x4097: 0x000a,\n\t0x4098: 0x000a, 0x4099: 0x000a, 0x409a: 0x000a, 0x409b: 0x000a, 0x409c: 0x000a, 0x409d: 0x000a,\n\t0x409e: 0x000a, 0x409f: 0x000a, 0x40a0: 0x000a, 0x40a1: 0x000a, 0x40a2: 0x000a, 0x40a3: 0x000a,\n\t0x40a4: 0x000a, 0x40a5: 0x000a, 0x40a6: 0x000a, 0x40a7: 0x000a, 0x40a8: 0x000a, 0x40a9: 0x000a,\n\t0x40aa: 0x000a, 0x40ab: 0x000a, 0x40ac: 0x000a, 0x40ad: 0x000a, 0x40ae: 0x000a, 0x40af: 0x000a,\n\t0x40b0: 0x000a, 0x40b1: 0x000a, 0x40b2: 0x000a, 0x40b3: 0x000a, 0x40b4: 0x000a, 0x40b5: 0x000a,\n\t0x40b6: 0x000a, 0x40b7: 0x000a, 0x40b8: 0x000a, 0x40b9: 0x000a, 0x40ba: 0x000a, 0x40bb: 0x000a,\n\t0x40bc: 0x000a, 0x40bd: 0x000a, 0x40be: 0x000a, 0x40bf: 0x000a,\n\t// Block 0x103, offset 0x40c0\n\t0x40c0: 0x000a, 0x40c1: 0x000a, 0x40c2: 0x000a, 0x40c3: 0x000a, 0x40c4: 0x000a, 0x40c5: 0x000a,\n\t0x40c6: 0x000a, 0x40c7: 0x000a,\n\t0x40d0: 0x000a, 0x40d1: 0x000a,\n\t0x40d2: 0x000a, 0x40d3: 0x000a, 0x40d4: 0x000a, 0x40d5: 0x000a, 0x40d6: 0x000a, 0x40d7: 0x000a,\n\t0x40d8: 0x000a, 0x40d9: 0x000a,\n\t0x40e0: 0x000a, 0x40e1: 0x000a, 0x40e2: 0x000a, 0x40e3: 0x000a,\n\t0x40e4: 0x000a, 0x40e5: 0x000a, 0x40e6: 0x000a, 0x40e7: 0x000a, 0x40e8: 0x000a, 0x40e9: 0x000a,\n\t0x40ea: 0x000a, 0x40eb: 0x000a, 0x40ec: 0x000a, 0x40ed: 0x000a, 0x40ee: 0x000a, 0x40ef: 0x000a,\n\t0x40f0: 0x000a, 0x40f1: 0x000a, 0x40f2: 0x000a, 0x40f3: 0x000a, 0x40f4: 0x000a, 0x40f5: 0x000a,\n\t0x40f6: 0x000a, 0x40f7: 0x000a, 0x40f8: 0x000a, 0x40f9: 0x000a, 0x40fa: 0x000a, 0x40fb: 0x000a,\n\t0x40fc: 0x000a, 0x40fd: 0x000a, 0x40fe: 0x000a, 0x40ff: 0x000a,\n\t// Block 0x104, offset 0x4100\n\t0x4100: 0x000a, 0x4101: 0x000a, 0x4102: 0x000a, 0x4103: 0x000a, 0x4104: 0x000a, 0x4105: 0x000a,\n\t0x4106: 0x000a, 0x4107: 0x000a,\n\t0x4110: 0x000a, 0x4111: 0x000a,\n\t0x4112: 0x000a, 0x4113: 0x000a, 0x4114: 0x000a, 0x4115: 0x000a, 0x4116: 0x000a, 0x4117: 0x000a,\n\t0x4118: 0x000a, 0x4119: 0x000a, 0x411a: 0x000a, 0x411b: 0x000a, 0x411c: 0x000a, 0x411d: 0x000a,\n\t0x411e: 0x000a, 0x411f: 0x000a, 0x4120: 0x000a, 0x4121: 0x000a, 0x4122: 0x000a, 0x4123: 0x000a,\n\t0x4124: 0x000a, 0x4125: 0x000a, 0x4126: 0x000a, 0x4127: 0x000a, 0x4128: 0x000a, 0x4129: 0x000a,\n\t0x412a: 0x000a, 0x412b: 0x000a, 0x412c: 0x000a, 0x412d: 0x000a,\n\t0x4130: 0x000a, 0x4131: 0x000a, 0x4132: 0x000a, 0x4133: 0x000a, 0x4134: 0x000a, 0x4135: 0x000a,\n\t0x4136: 0x000a, 0x4137: 0x000a, 0x4138: 0x000a, 0x4139: 0x000a, 0x413a: 0x000a, 0x413b: 0x000a,\n\t// Block 0x105, offset 0x4140\n\t0x4140: 0x000a, 0x4141: 0x000a,\n\t0x4150: 0x000a, 0x4151: 0x000a,\n\t0x4152: 0x000a, 0x4153: 0x000a, 0x4154: 0x000a, 0x4155: 0x000a, 0x4156: 0x000a, 0x4157: 0x000a,\n\t0x4158: 0x000a,\n\t// Block 0x106, offset 0x4180\n\t0x4180: 0x000a, 0x4181: 0x000a, 0x4182: 0x000a, 0x4183: 0x000a, 0x4184: 0x000a, 0x4185: 0x000a,\n\t0x4186: 0x000a, 0x4187: 0x000a, 0x4188: 0x000a, 0x4189: 0x000a, 0x418a: 0x000a, 0x418b: 0x000a,\n\t0x418c: 0x000a, 0x418d: 0x000a, 0x418e: 0x000a, 0x418f: 0x000a, 0x4190: 0x000a, 0x4191: 0x000a,\n\t0x4192: 0x000a, 0x4193: 0x000a, 0x4194: 0x000a, 0x4195: 0x000a, 0x4196: 0x000a, 0x4197: 0x000a,\n\t0x41a0: 0x000a, 0x41a1: 0x000a, 0x41a2: 0x000a, 0x41a3: 0x000a,\n\t0x41a4: 0x000a, 0x41a5: 0x000a, 0x41a6: 0x000a, 0x41a7: 0x000a, 0x41a8: 0x000a, 0x41a9: 0x000a,\n\t0x41aa: 0x000a, 0x41ab: 0x000a, 0x41ac: 0x000a, 0x41ad: 0x000a,\n\t0x41b0: 0x000a, 0x41b1: 0x000a, 0x41b2: 0x000a, 0x41b3: 0x000a, 0x41b4: 0x000a, 0x41b5: 0x000a,\n\t0x41b6: 0x000a, 0x41b7: 0x000a, 0x41b8: 0x000a, 0x41b9: 0x000a, 0x41ba: 0x000a, 0x41bb: 0x000a,\n\t0x41bc: 0x000a,\n\t// Block 0x107, offset 0x41c0\n\t0x41c0: 0x000a, 0x41c1: 0x000a, 0x41c2: 0x000a, 0x41c3: 0x000a, 0x41c4: 0x000a, 0x41c5: 0x000a,\n\t0x41c6: 0x000a, 0x41c7: 0x000a, 0x41c8: 0x000a, 0x41c9: 0x000a, 0x41ca: 0x000a,\n\t0x41ce: 0x000a, 0x41cf: 0x000a, 0x41d0: 0x000a, 0x41d1: 0x000a,\n\t0x41d2: 0x000a, 0x41d3: 0x000a, 0x41d4: 0x000a, 0x41d5: 0x000a, 0x41d6: 0x000a, 0x41d7: 0x000a,\n\t0x41d8: 0x000a, 0x41d9: 0x000a, 0x41da: 0x000a, 0x41db: 0x000a, 0x41dc: 0x000a, 0x41dd: 0x000a,\n\t0x41de: 0x000a, 0x41df: 0x000a, 0x41e0: 0x000a, 0x41e1: 0x000a, 0x41e2: 0x000a, 0x41e3: 0x000a,\n\t0x41e4: 0x000a, 0x41e5: 0x000a, 0x41e6: 0x000a, 0x41e7: 0x000a, 0x41e8: 0x000a, 0x41e9: 0x000a,\n\t0x41ea: 0x000a, 0x41eb: 0x000a, 0x41ec: 0x000a, 0x41ed: 0x000a, 0x41ee: 0x000a, 0x41ef: 0x000a,\n\t0x41f0: 0x000a, 0x41f1: 0x000a, 0x41f2: 0x000a, 0x41f3: 0x000a, 0x41f4: 0x000a, 0x41f5: 0x000a,\n\t0x41f6: 0x000a, 0x41f7: 0x000a, 0x41f8: 0x000a, 0x41f9: 0x000a, 0x41fa: 0x000a, 0x41fb: 0x000a,\n\t0x41fc: 0x000a, 0x41fd: 0x000a, 0x41fe: 0x000a, 0x41ff: 0x000a,\n\t// Block 0x108, offset 0x4200\n\t0x4200: 0x000a, 0x4201: 0x000a, 0x4202: 0x000a, 0x4203: 0x000a, 0x4204: 0x000a, 0x4205: 0x000a,\n\t0x4206: 0x000a, 0x4208: 0x000a,\n\t0x420d: 0x000a, 0x420e: 0x000a, 0x420f: 0x000a, 0x4210: 0x000a, 0x4211: 0x000a,\n\t0x4212: 0x000a, 0x4213: 0x000a, 0x4214: 0x000a, 0x4215: 0x000a, 0x4216: 0x000a, 0x4217: 0x000a,\n\t0x4218: 0x000a, 0x4219: 0x000a, 0x421a: 0x000a, 0x421b: 0x000a, 0x421c: 0x000a,\n\t0x421f: 0x000a, 0x4220: 0x000a, 0x4221: 0x000a, 0x4222: 0x000a, 0x4223: 0x000a,\n\t0x4224: 0x000a, 0x4225: 0x000a, 0x4226: 0x000a, 0x4227: 0x000a, 0x4228: 0x000a, 0x4229: 0x000a,\n\t0x422a: 0x000a, 0x422f: 0x000a,\n\t0x4230: 0x000a, 0x4231: 0x000a, 0x4232: 0x000a, 0x4233: 0x000a, 0x4234: 0x000a, 0x4235: 0x000a,\n\t0x4236: 0x000a, 0x4237: 0x000a, 0x4238: 0x000a,\n\t// Block 0x109, offset 0x4240\n\t0x4240: 0x000a, 0x4241: 0x000a, 0x4242: 0x000a, 0x4243: 0x000a, 0x4244: 0x000a, 0x4245: 0x000a,\n\t0x4246: 0x000a, 0x4247: 0x000a, 0x4248: 0x000a, 0x4249: 0x000a, 0x424a: 0x000a, 0x424b: 0x000a,\n\t0x424c: 0x000a, 0x424d: 0x000a, 0x424e: 0x000a, 0x424f: 0x000a, 0x4250: 0x000a, 0x4251: 0x000a,\n\t0x4252: 0x000a, 0x4254: 0x000a, 0x4255: 0x000a, 0x4256: 0x000a, 0x4257: 0x000a,\n\t0x4258: 0x000a, 0x4259: 0x000a, 0x425a: 0x000a, 0x425b: 0x000a, 0x425c: 0x000a, 0x425d: 0x000a,\n\t0x425e: 0x000a, 0x425f: 0x000a, 0x4260: 0x000a, 0x4261: 0x000a, 0x4262: 0x000a, 0x4263: 0x000a,\n\t0x4264: 0x000a, 0x4265: 0x000a, 0x4266: 0x000a, 0x4267: 0x000a, 0x4268: 0x000a, 0x4269: 0x000a,\n\t0x426a: 0x000a, 0x426b: 0x000a, 0x426c: 0x000a, 0x426d: 0x000a, 0x426e: 0x000a, 0x426f: 0x000a,\n\t0x4270: 0x000a, 0x4271: 0x000a, 0x4272: 0x000a, 0x4273: 0x000a, 0x4274: 0x000a, 0x4275: 0x000a,\n\t0x4276: 0x000a, 0x4277: 0x000a, 0x4278: 0x000a, 0x4279: 0x000a, 0x427a: 0x000a, 0x427b: 0x000a,\n\t0x427c: 0x000a, 0x427d: 0x000a, 0x427e: 0x000a, 0x427f: 0x000a,\n\t// Block 0x10a, offset 0x4280\n\t0x4280: 0x000a, 0x4281: 0x000a, 0x4282: 0x000a, 0x4283: 0x000a, 0x4284: 0x000a, 0x4285: 0x000a,\n\t0x4286: 0x000a, 0x4287: 0x000a, 0x4288: 0x000a, 0x4289: 0x000a, 0x428a: 0x000a, 0x428b: 0x000a,\n\t0x428c: 0x000a, 0x428d: 0x000a, 0x428e: 0x000a, 0x428f: 0x000a, 0x4290: 0x000a, 0x4291: 0x000a,\n\t0x4292: 0x000a, 0x4293: 0x000a, 0x4294: 0x000a, 0x4295: 0x000a, 0x4296: 0x000a, 0x4297: 0x000a,\n\t0x4298: 0x000a, 0x4299: 0x000a, 0x429a: 0x000a, 0x429b: 0x000a, 0x429c: 0x000a, 0x429d: 0x000a,\n\t0x429e: 0x000a, 0x429f: 0x000a, 0x42a0: 0x000a, 0x42a1: 0x000a, 0x42a2: 0x000a, 0x42a3: 0x000a,\n\t0x42a4: 0x000a, 0x42a5: 0x000a, 0x42a6: 0x000a, 0x42a7: 0x000a, 0x42a8: 0x000a, 0x42a9: 0x000a,\n\t0x42aa: 0x000a, 0x42ab: 0x000a, 0x42ac: 0x000a, 0x42ad: 0x000a, 0x42ae: 0x000a, 0x42af: 0x000a,\n\t0x42b0: 0x0002, 0x42b1: 0x0002, 0x42b2: 0x0002, 0x42b3: 0x0002, 0x42b4: 0x0002, 0x42b5: 0x0002,\n\t0x42b6: 0x0002, 0x42b7: 0x0002, 0x42b8: 0x0002, 0x42b9: 0x0002, 0x42ba: 0x000a,\n\t// Block 0x10b, offset 0x42c0\n\t0x42fe: 0x000b, 0x42ff: 0x000b,\n\t// Block 0x10c, offset 0x4300\n\t0x4300: 0x000b, 0x4301: 0x000b, 0x4302: 0x000b, 0x4303: 0x000b, 0x4304: 0x000b, 0x4305: 0x000b,\n\t0x4306: 0x000b, 0x4307: 0x000b, 0x4308: 0x000b, 0x4309: 0x000b, 0x430a: 0x000b, 0x430b: 0x000b,\n\t0x430c: 0x000b, 0x430d: 0x000b, 0x430e: 0x000b, 0x430f: 0x000b, 0x4310: 0x000b, 0x4311: 0x000b,\n\t0x4312: 0x000b, 0x4313: 0x000b, 0x4314: 0x000b, 0x4315: 0x000b, 0x4316: 0x000b, 0x4317: 0x000b,\n\t0x4318: 0x000b, 0x4319: 0x000b, 0x431a: 0x000b, 0x431b: 0x000b, 0x431c: 0x000b, 0x431d: 0x000b,\n\t0x431e: 0x000b, 0x431f: 0x000b, 0x4320: 0x000b, 0x4321: 0x000b, 0x4322: 0x000b, 0x4323: 0x000b,\n\t0x4324: 0x000b, 0x4325: 0x000b, 0x4326: 0x000b, 0x4327: 0x000b, 0x4328: 0x000b, 0x4329: 0x000b,\n\t0x432a: 0x000b, 0x432b: 0x000b, 0x432c: 0x000b, 0x432d: 0x000b, 0x432e: 0x000b, 0x432f: 0x000b,\n\t0x4330: 0x000b, 0x4331: 0x000b, 0x4332: 0x000b, 0x4333: 0x000b, 0x4334: 0x000b, 0x4335: 0x000b,\n\t0x4336: 0x000b, 0x4337: 0x000b, 0x4338: 0x000b, 0x4339: 0x000b, 0x433a: 0x000b, 0x433b: 0x000b,\n\t0x433c: 0x000b, 0x433d: 0x000b, 0x433e: 0x000b, 0x433f: 0x000b,\n\t// Block 0x10d, offset 0x4340\n\t0x4340: 0x000c, 0x4341: 0x000c, 0x4342: 0x000c, 0x4343: 0x000c, 0x4344: 0x000c, 0x4345: 0x000c,\n\t0x4346: 0x000c, 0x4347: 0x000c, 0x4348: 0x000c, 0x4349: 0x000c, 0x434a: 0x000c, 0x434b: 0x000c,\n\t0x434c: 0x000c, 0x434d: 0x000c, 0x434e: 0x000c, 0x434f: 0x000c, 0x4350: 0x000c, 0x4351: 0x000c,\n\t0x4352: 0x000c, 0x4353: 0x000c, 0x4354: 0x000c, 0x4355: 0x000c, 0x4356: 0x000c, 0x4357: 0x000c,\n\t0x4358: 0x000c, 0x4359: 0x000c, 0x435a: 0x000c, 0x435b: 0x000c, 0x435c: 0x000c, 0x435d: 0x000c,\n\t0x435e: 0x000c, 0x435f: 0x000c, 0x4360: 0x000c, 0x4361: 0x000c, 0x4362: 0x000c, 0x4363: 0x000c,\n\t0x4364: 0x000c, 0x4365: 0x000c, 0x4366: 0x000c, 0x4367: 0x000c, 0x4368: 0x000c, 0x4369: 0x000c,\n\t0x436a: 0x000c, 0x436b: 0x000c, 0x436c: 0x000c, 0x436d: 0x000c, 0x436e: 0x000c, 0x436f: 0x000c,\n\t0x4370: 0x000b, 0x4371: 0x000b, 0x4372: 0x000b, 0x4373: 0x000b, 0x4374: 0x000b, 0x4375: 0x000b,\n\t0x4376: 0x000b, 0x4377: 0x000b, 0x4378: 0x000b, 0x4379: 0x000b, 0x437a: 0x000b, 0x437b: 0x000b,\n\t0x437c: 0x000b, 0x437d: 0x000b, 0x437e: 0x000b, 0x437f: 0x000b,\n}\n\n// bidiIndex: 26 blocks, 1664 entries, 3328 bytes\n// Block 0 is the zero block.\nvar bidiIndex = [1664]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x01, 0xc3: 0x02,\n\t0xca: 0x03, 0xcb: 0x04, 0xcc: 0x05, 0xcd: 0x06, 0xce: 0x07, 0xcf: 0x08,\n\t0xd2: 0x09, 0xd6: 0x0a, 0xd7: 0x0b,\n\t0xd8: 0x0c, 0xd9: 0x0d, 0xda: 0x0e, 0xdb: 0x0f, 0xdc: 0x10, 0xdd: 0x11, 0xde: 0x12, 0xdf: 0x13,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06,\n\t0xea: 0x07, 0xef: 0x08,\n\t0xf0: 0x13, 0xf1: 0x14, 0xf2: 0x14, 0xf3: 0x16, 0xf4: 0x17,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x14, 0x121: 0x15, 0x122: 0x16, 0x123: 0x17, 0x124: 0x18, 0x125: 0x19, 0x126: 0x1a, 0x127: 0x1b,\n\t0x128: 0x1c, 0x129: 0x1d, 0x12a: 0x1c, 0x12b: 0x1e, 0x12c: 0x1f, 0x12d: 0x20, 0x12e: 0x21, 0x12f: 0x22,\n\t0x130: 0x23, 0x131: 0x24, 0x132: 0x1a, 0x133: 0x25, 0x134: 0x26, 0x135: 0x27, 0x136: 0x28, 0x137: 0x29,\n\t0x138: 0x2a, 0x139: 0x2b, 0x13a: 0x2c, 0x13b: 0x2d, 0x13c: 0x2e, 0x13d: 0x2f, 0x13e: 0x30, 0x13f: 0x31,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x32, 0x141: 0x33, 0x142: 0x34,\n\t0x14d: 0x35, 0x14e: 0x36,\n\t0x150: 0x37,\n\t0x15a: 0x38, 0x15c: 0x39, 0x15d: 0x3a, 0x15e: 0x3b, 0x15f: 0x3c,\n\t0x160: 0x3d, 0x162: 0x3e, 0x164: 0x3f, 0x165: 0x40, 0x167: 0x41,\n\t0x168: 0x42, 0x169: 0x43, 0x16a: 0x44, 0x16b: 0x45, 0x16c: 0x46, 0x16d: 0x47, 0x16e: 0x48, 0x16f: 0x49,\n\t0x170: 0x4a, 0x173: 0x4b, 0x177: 0x05,\n\t0x17e: 0x4c, 0x17f: 0x4d,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x4e, 0x181: 0x4f, 0x182: 0x50, 0x183: 0x51, 0x184: 0x52, 0x185: 0x53, 0x186: 0x54, 0x187: 0x55,\n\t0x188: 0x56, 0x189: 0x55, 0x18a: 0x55, 0x18b: 0x55, 0x18c: 0x57, 0x18d: 0x58, 0x18e: 0x59, 0x18f: 0x55,\n\t0x190: 0x5a, 0x191: 0x5b, 0x192: 0x5c, 0x193: 0x5d, 0x194: 0x55, 0x195: 0x55, 0x196: 0x55, 0x197: 0x55,\n\t0x198: 0x55, 0x199: 0x55, 0x19a: 0x5e, 0x19b: 0x55, 0x19c: 0x55, 0x19d: 0x5f, 0x19e: 0x55, 0x19f: 0x60,\n\t0x1a4: 0x55, 0x1a5: 0x55, 0x1a6: 0x61, 0x1a7: 0x62,\n\t0x1a8: 0x55, 0x1a9: 0x55, 0x1aa: 0x55, 0x1ab: 0x55, 0x1ac: 0x55, 0x1ad: 0x63, 0x1ae: 0x55, 0x1af: 0x55,\n\t0x1b3: 0x64, 0x1b5: 0x65, 0x1b7: 0x66,\n\t0x1b8: 0x67, 0x1b9: 0x68, 0x1ba: 0x69, 0x1bb: 0x6a, 0x1bc: 0x55, 0x1bd: 0x55, 0x1be: 0x55, 0x1bf: 0x6b,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x6c, 0x1c2: 0x6d, 0x1c3: 0x6e, 0x1c7: 0x6f,\n\t0x1c8: 0x70, 0x1c9: 0x71, 0x1ca: 0x72, 0x1cb: 0x73, 0x1cd: 0x74, 0x1cf: 0x75,\n\t// Block 0x8, offset 0x200\n\t0x237: 0x55,\n\t// Block 0x9, offset 0x240\n\t0x252: 0x76, 0x253: 0x77,\n\t0x258: 0x78, 0x259: 0x79, 0x25a: 0x7a, 0x25b: 0x7b, 0x25c: 0x7c, 0x25e: 0x7d,\n\t0x260: 0x7e, 0x261: 0x7f, 0x263: 0x80, 0x264: 0x81, 0x265: 0x82, 0x266: 0x83, 0x267: 0x84,\n\t0x268: 0x85, 0x269: 0x86, 0x26a: 0x87, 0x26b: 0x88, 0x26d: 0x89, 0x26f: 0x8a,\n\t// Block 0xa, offset 0x280\n\t0x2ac: 0x8b, 0x2ad: 0x8c, 0x2ae: 0x0e, 0x2af: 0x8d,\n\t0x2b0: 0x0e, 0x2b1: 0x0e, 0x2b2: 0x0e, 0x2b3: 0x0e, 0x2b4: 0x8e, 0x2b5: 0x8f, 0x2b6: 0x90, 0x2b7: 0x91,\n\t0x2b8: 0x92, 0x2b9: 0x93, 0x2ba: 0x0e, 0x2bb: 0x94, 0x2bc: 0x95, 0x2bd: 0x96, 0x2bf: 0x97,\n\t// Block 0xb, offset 0x2c0\n\t0x2c4: 0x98, 0x2c5: 0x55, 0x2c6: 0x99, 0x2c7: 0x9a,\n\t0x2cb: 0x9b, 0x2cd: 0x9c,\n\t0x2e0: 0x9d, 0x2e1: 0x9d, 0x2e2: 0x9d, 0x2e3: 0x9d, 0x2e4: 0x9e, 0x2e5: 0x9d, 0x2e6: 0x9d, 0x2e7: 0x9d,\n\t0x2e8: 0x9f, 0x2e9: 0x9d, 0x2ea: 0x9d, 0x2eb: 0xa0, 0x2ec: 0xa1, 0x2ed: 0x9d, 0x2ee: 0x9d, 0x2ef: 0x9d,\n\t0x2f0: 0x9d, 0x2f1: 0x9d, 0x2f2: 0x9d, 0x2f3: 0x9d, 0x2f4: 0xa2, 0x2f5: 0xa3, 0x2f6: 0x9d, 0x2f7: 0x9d,\n\t0x2f8: 0x9d, 0x2f9: 0xa4, 0x2fa: 0xa5, 0x2fb: 0xa6, 0x2fc: 0xa7, 0x2fd: 0xa8, 0x2fe: 0xa9, 0x2ff: 0x9d,\n\t// Block 0xc, offset 0x300\n\t0x300: 0xaa, 0x301: 0xab, 0x302: 0xac, 0x303: 0x21, 0x304: 0xad, 0x305: 0xae, 0x306: 0xaf, 0x307: 0xb0,\n\t0x308: 0xb1, 0x309: 0x28, 0x30b: 0xb2, 0x30c: 0x26, 0x30d: 0xb3, 0x30e: 0xb4, 0x30f: 0xb5,\n\t0x310: 0xb6, 0x311: 0xb7, 0x312: 0xb8, 0x313: 0xb9, 0x316: 0xba, 0x317: 0xbb,\n\t0x318: 0xbc, 0x319: 0xbd, 0x31a: 0xbe, 0x31c: 0xbf,\n\t0x320: 0xc0, 0x324: 0xc1, 0x325: 0xc2, 0x327: 0xc3,\n\t0x328: 0xc4, 0x329: 0xc5, 0x32a: 0xc6, 0x32d: 0xc7,\n\t0x330: 0xc8, 0x332: 0xc9, 0x334: 0xca, 0x335: 0xcb, 0x336: 0xcc,\n\t0x33b: 0xcd, 0x33c: 0xce, 0x33d: 0xcf, 0x33f: 0xd0,\n\t// Block 0xd, offset 0x340\n\t0x351: 0xd1,\n\t// Block 0xe, offset 0x380\n\t0x384: 0xd2,\n\t0x3ab: 0xd3, 0x3ac: 0xd4,\n\t0x3bd: 0xd5, 0x3be: 0xd6, 0x3bf: 0xd7,\n\t// Block 0xf, offset 0x3c0\n\t0x3f2: 0xd8,\n\t// Block 0x10, offset 0x400\n\t0x430: 0x55, 0x431: 0x55, 0x432: 0x55, 0x433: 0xd9, 0x434: 0x55, 0x435: 0x55, 0x436: 0x55, 0x437: 0x55,\n\t0x438: 0x55, 0x439: 0x55, 0x43a: 0xda, 0x43b: 0xdb, 0x43c: 0xdc, 0x43d: 0xdd,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xde, 0x446: 0xdf, 0x447: 0xe0,\n\t0x448: 0x55, 0x449: 0xe1, 0x44c: 0x55, 0x44d: 0xe2,\n\t0x45b: 0xe3, 0x45c: 0xe4, 0x45d: 0xe5, 0x45e: 0xe6, 0x45f: 0xe7,\n\t0x468: 0xe8, 0x469: 0xe9, 0x46a: 0xea,\n\t// Block 0x12, offset 0x480\n\t0x480: 0xeb, 0x482: 0xd5, 0x484: 0xd4,\n\t0x48a: 0xec, 0x48b: 0xed,\n\t0x493: 0xee, 0x497: 0xef,\n\t0x49b: 0xf0,\n\t0x4a0: 0x9d, 0x4a1: 0x9d, 0x4a2: 0x9d, 0x4a3: 0xf1, 0x4a4: 0x9d, 0x4a5: 0xf2, 0x4a6: 0x9d, 0x4a7: 0x9d,\n\t0x4a8: 0x9d, 0x4a9: 0x9d, 0x4aa: 0x9d, 0x4ab: 0x9d, 0x4ac: 0x9d, 0x4ad: 0x9d, 0x4ae: 0x9d, 0x4af: 0x9d,\n\t0x4b0: 0x9d, 0x4b1: 0xf3, 0x4b2: 0xf4, 0x4b3: 0x9d, 0x4b4: 0xf5, 0x4b5: 0x9d, 0x4b6: 0x9d, 0x4b7: 0x9d,\n\t0x4b8: 0x0e, 0x4b9: 0x0e, 0x4ba: 0x0e, 0x4bb: 0xf6, 0x4bc: 0x9d, 0x4bd: 0x9d, 0x4be: 0x9d, 0x4bf: 0x9d,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0xf7, 0x4c1: 0x55, 0x4c2: 0xf8, 0x4c3: 0xf9, 0x4c4: 0xfa, 0x4c5: 0xfb, 0x4c6: 0xfc,\n\t0x4c9: 0xfd, 0x4cc: 0x55, 0x4cd: 0x55, 0x4ce: 0x55, 0x4cf: 0x55,\n\t0x4d0: 0x55, 0x4d1: 0x55, 0x4d2: 0x55, 0x4d3: 0x55, 0x4d4: 0x55, 0x4d5: 0x55, 0x4d6: 0x55, 0x4d7: 0x55,\n\t0x4d8: 0x55, 0x4d9: 0x55, 0x4da: 0x55, 0x4db: 0xfe, 0x4dc: 0x55, 0x4dd: 0x55, 0x4de: 0x55, 0x4df: 0xff,\n\t0x4e0: 0x100, 0x4e1: 0x101, 0x4e2: 0x102, 0x4e3: 0x103, 0x4e4: 0x55, 0x4e5: 0x55, 0x4e6: 0x55, 0x4e7: 0x55,\n\t0x4e8: 0x55, 0x4e9: 0x104, 0x4ea: 0x105, 0x4eb: 0x106, 0x4ec: 0x55, 0x4ed: 0x55, 0x4ee: 0x107, 0x4ef: 0x108,\n\t0x4ff: 0x109,\n\t// Block 0x14, offset 0x500\n\t0x53f: 0x109,\n\t// Block 0x15, offset 0x540\n\t0x550: 0x09, 0x551: 0x0a, 0x553: 0x0b, 0x556: 0x0c,\n\t0x55b: 0x0d, 0x55c: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11,\n\t0x56f: 0x12,\n\t0x57f: 0x12,\n\t// Block 0x16, offset 0x580\n\t0x58f: 0x12,\n\t0x59f: 0x12,\n\t0x5af: 0x12,\n\t0x5bf: 0x12,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x10a, 0x5c1: 0x10a, 0x5c2: 0x10a, 0x5c3: 0x10a, 0x5c4: 0x05, 0x5c5: 0x05, 0x5c6: 0x05, 0x5c7: 0x10b,\n\t0x5c8: 0x10a, 0x5c9: 0x10a, 0x5ca: 0x10a, 0x5cb: 0x10a, 0x5cc: 0x10a, 0x5cd: 0x10a, 0x5ce: 0x10a, 0x5cf: 0x10a,\n\t0x5d0: 0x10a, 0x5d1: 0x10a, 0x5d2: 0x10a, 0x5d3: 0x10a, 0x5d4: 0x10a, 0x5d5: 0x10a, 0x5d6: 0x10a, 0x5d7: 0x10a,\n\t0x5d8: 0x10a, 0x5d9: 0x10a, 0x5da: 0x10a, 0x5db: 0x10a, 0x5dc: 0x10a, 0x5dd: 0x10a, 0x5de: 0x10a, 0x5df: 0x10a,\n\t0x5e0: 0x10a, 0x5e1: 0x10a, 0x5e2: 0x10a, 0x5e3: 0x10a, 0x5e4: 0x10a, 0x5e5: 0x10a, 0x5e6: 0x10a, 0x5e7: 0x10a,\n\t0x5e8: 0x10a, 0x5e9: 0x10a, 0x5ea: 0x10a, 0x5eb: 0x10a, 0x5ec: 0x10a, 0x5ed: 0x10a, 0x5ee: 0x10a, 0x5ef: 0x10a,\n\t0x5f0: 0x10a, 0x5f1: 0x10a, 0x5f2: 0x10a, 0x5f3: 0x10a, 0x5f4: 0x10a, 0x5f5: 0x10a, 0x5f6: 0x10a, 0x5f7: 0x10a,\n\t0x5f8: 0x10a, 0x5f9: 0x10a, 0x5fa: 0x10a, 0x5fb: 0x10a, 0x5fc: 0x10a, 0x5fd: 0x10a, 0x5fe: 0x10a, 0x5ff: 0x10a,\n\t// Block 0x18, offset 0x600\n\t0x60f: 0x12,\n\t0x61f: 0x12,\n\t0x620: 0x15,\n\t0x62f: 0x12,\n\t0x63f: 0x12,\n\t// Block 0x19, offset 0x640\n\t0x64f: 0x12,\n}\n\n// Total table size 20664 bytes (20KiB); checksum: F50EF68C\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/bidi/trieval.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\npackage bidi\n\n// Class is the Unicode BiDi class. Each rune has a single class.\ntype Class uint\n\nconst (\n\tL       Class = iota // LeftToRight\n\tR                    // RightToLeft\n\tEN                   // EuropeanNumber\n\tES                   // EuropeanSeparator\n\tET                   // EuropeanTerminator\n\tAN                   // ArabicNumber\n\tCS                   // CommonSeparator\n\tB                    // ParagraphSeparator\n\tS                    // SegmentSeparator\n\tWS                   // WhiteSpace\n\tON                   // OtherNeutral\n\tBN                   // BoundaryNeutral\n\tNSM                  // NonspacingMark\n\tAL                   // ArabicLetter\n\tControl              // Control LRO - PDI\n\n\tnumClass\n\n\tLRO // LeftToRightOverride\n\tRLO // RightToLeftOverride\n\tLRE // LeftToRightEmbedding\n\tRLE // RightToLeftEmbedding\n\tPDF // PopDirectionalFormat\n\tLRI // LeftToRightIsolate\n\tRLI // RightToLeftIsolate\n\tFSI // FirstStrongIsolate\n\tPDI // PopDirectionalIsolate\n\n\tunknownClass = ^Class(0)\n)\n\n// A trie entry has the following bits:\n// 7..5  XOR mask for brackets\n// 4     1: Bracket open, 0: Bracket close\n// 3..0  Class type\n\nconst (\n\topenMask     = 0x10\n\txorMaskShift = 5\n)\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/composition.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport \"unicode/utf8\"\n\nconst (\n\tmaxNonStarters = 30\n\t// The maximum number of characters needed for a buffer is\n\t// maxNonStarters + 1 for the starter + 1 for the GCJ\n\tmaxBufferSize    = maxNonStarters + 2\n\tmaxNFCExpansion  = 3  // NFC(0x1D160)\n\tmaxNFKCExpansion = 18 // NFKC(0xFDFA)\n\n\tmaxByteBufferSize = utf8.UTFMax * maxBufferSize // 128\n)\n\n// ssState is used for reporting the segment state after inserting a rune.\n// It is returned by streamSafe.next.\ntype ssState int\n\nconst (\n\t// Indicates a rune was successfully added to the segment.\n\tssSuccess ssState = iota\n\t// Indicates a rune starts a new segment and should not be added.\n\tssStarter\n\t// Indicates a rune caused a segment overflow and a CGJ should be inserted.\n\tssOverflow\n)\n\n// streamSafe implements the policy of when a CGJ should be inserted.\ntype streamSafe uint8\n\n// first inserts the first rune of a segment. It is a faster version of next if\n// it is known p represents the first rune in a segment.\nfunc (ss *streamSafe) first(p Properties) {\n\t*ss = streamSafe(p.nTrailingNonStarters())\n}\n\n// insert returns a ssState value to indicate whether a rune represented by p\n// can be inserted.\nfunc (ss *streamSafe) next(p Properties) ssState {\n\tif *ss > maxNonStarters {\n\t\tpanic(\"streamSafe was not reset\")\n\t}\n\tn := p.nLeadingNonStarters()\n\tif *ss += streamSafe(n); *ss > maxNonStarters {\n\t\t*ss = 0\n\t\treturn ssOverflow\n\t}\n\t// The Stream-Safe Text Processing prescribes that the counting can stop\n\t// as soon as a starter is encountered. However, there are some starters,\n\t// like Jamo V and T, that can combine with other runes, leaving their\n\t// successive non-starters appended to the previous, possibly causing an\n\t// overflow. We will therefore consider any rune with a non-zero nLead to\n\t// be a non-starter. Note that it always hold that if nLead > 0 then\n\t// nLead == nTrail.\n\tif n == 0 {\n\t\t*ss = streamSafe(p.nTrailingNonStarters())\n\t\treturn ssStarter\n\t}\n\treturn ssSuccess\n}\n\n// backwards is used for checking for overflow and segment starts\n// when traversing a string backwards. Users do not need to call first\n// for the first rune. The state of the streamSafe retains the count of\n// the non-starters loaded.\nfunc (ss *streamSafe) backwards(p Properties) ssState {\n\tif *ss > maxNonStarters {\n\t\tpanic(\"streamSafe was not reset\")\n\t}\n\tc := *ss + streamSafe(p.nTrailingNonStarters())\n\tif c > maxNonStarters {\n\t\treturn ssOverflow\n\t}\n\t*ss = c\n\tif p.nLeadingNonStarters() == 0 {\n\t\treturn ssStarter\n\t}\n\treturn ssSuccess\n}\n\nfunc (ss streamSafe) isMax() bool {\n\treturn ss == maxNonStarters\n}\n\n// GraphemeJoiner is inserted after maxNonStarters non-starter runes.\nconst GraphemeJoiner = \"\\u034F\"\n\n// reorderBuffer is used to normalize a single segment.  Characters inserted with\n// insert are decomposed and reordered based on CCC. The compose method can\n// be used to recombine characters.  Note that the byte buffer does not hold\n// the UTF-8 characters in order.  Only the rune array is maintained in sorted\n// order. flush writes the resulting segment to a byte array.\ntype reorderBuffer struct {\n\trune  [maxBufferSize]Properties // Per character info.\n\tbyte  [maxByteBufferSize]byte   // UTF-8 buffer. Referenced by runeInfo.pos.\n\tnbyte uint8                     // Number or bytes.\n\tss    streamSafe                // For limiting length of non-starter sequence.\n\tnrune int                       // Number of runeInfos.\n\tf     formInfo\n\n\tsrc      input\n\tnsrc     int\n\ttmpBytes input\n\n\tout    []byte\n\tflushF func(*reorderBuffer) bool\n}\n\nfunc (rb *reorderBuffer) init(f Form, src []byte) {\n\trb.f = *formTable[f]\n\trb.src.setBytes(src)\n\trb.nsrc = len(src)\n\trb.ss = 0\n}\n\nfunc (rb *reorderBuffer) initString(f Form, src string) {\n\trb.f = *formTable[f]\n\trb.src.setString(src)\n\trb.nsrc = len(src)\n\trb.ss = 0\n}\n\nfunc (rb *reorderBuffer) setFlusher(out []byte, f func(*reorderBuffer) bool) {\n\trb.out = out\n\trb.flushF = f\n}\n\n// reset discards all characters from the buffer.\nfunc (rb *reorderBuffer) reset() {\n\trb.nrune = 0\n\trb.nbyte = 0\n}\n\nfunc (rb *reorderBuffer) doFlush() bool {\n\tif rb.f.composing {\n\t\trb.compose()\n\t}\n\tres := rb.flushF(rb)\n\trb.reset()\n\treturn res\n}\n\n// appendFlush appends the normalized segment to rb.out.\nfunc appendFlush(rb *reorderBuffer) bool {\n\tfor i := 0; i < rb.nrune; i++ {\n\t\tstart := rb.rune[i].pos\n\t\tend := start + rb.rune[i].size\n\t\trb.out = append(rb.out, rb.byte[start:end]...)\n\t}\n\treturn true\n}\n\n// flush appends the normalized segment to out and resets rb.\nfunc (rb *reorderBuffer) flush(out []byte) []byte {\n\tfor i := 0; i < rb.nrune; i++ {\n\t\tstart := rb.rune[i].pos\n\t\tend := start + rb.rune[i].size\n\t\tout = append(out, rb.byte[start:end]...)\n\t}\n\trb.reset()\n\treturn out\n}\n\n// flushCopy copies the normalized segment to buf and resets rb.\n// It returns the number of bytes written to buf.\nfunc (rb *reorderBuffer) flushCopy(buf []byte) int {\n\tp := 0\n\tfor i := 0; i < rb.nrune; i++ {\n\t\trunep := rb.rune[i]\n\t\tp += copy(buf[p:], rb.byte[runep.pos:runep.pos+runep.size])\n\t}\n\trb.reset()\n\treturn p\n}\n\n// insertOrdered inserts a rune in the buffer, ordered by Canonical Combining Class.\n// It returns false if the buffer is not large enough to hold the rune.\n// It is used internally by insert and insertString only.\nfunc (rb *reorderBuffer) insertOrdered(info Properties) {\n\tn := rb.nrune\n\tb := rb.rune[:]\n\tcc := info.ccc\n\tif cc > 0 {\n\t\t// Find insertion position + move elements to make room.\n\t\tfor ; n > 0; n-- {\n\t\t\tif b[n-1].ccc <= cc {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tb[n] = b[n-1]\n\t\t}\n\t}\n\trb.nrune += 1\n\tpos := uint8(rb.nbyte)\n\trb.nbyte += utf8.UTFMax\n\tinfo.pos = pos\n\tb[n] = info\n}\n\n// insertErr is an error code returned by insert. Using this type instead\n// of error improves performance up to 20% for many of the benchmarks.\ntype insertErr int\n\nconst (\n\tiSuccess insertErr = -iota\n\tiShortDst\n\tiShortSrc\n)\n\n// insertFlush inserts the given rune in the buffer ordered by CCC.\n// If a decomposition with multiple segments are encountered, they leading\n// ones are flushed.\n// It returns a non-zero error code if the rune was not inserted.\nfunc (rb *reorderBuffer) insertFlush(src input, i int, info Properties) insertErr {\n\tif rune := src.hangul(i); rune != 0 {\n\t\trb.decomposeHangul(rune)\n\t\treturn iSuccess\n\t}\n\tif info.hasDecomposition() {\n\t\treturn rb.insertDecomposed(info.Decomposition())\n\t}\n\trb.insertSingle(src, i, info)\n\treturn iSuccess\n}\n\n// insertUnsafe inserts the given rune in the buffer ordered by CCC.\n// It is assumed there is sufficient space to hold the runes. It is the\n// responsibility of the caller to ensure this. This can be done by checking\n// the state returned by the streamSafe type.\nfunc (rb *reorderBuffer) insertUnsafe(src input, i int, info Properties) {\n\tif rune := src.hangul(i); rune != 0 {\n\t\trb.decomposeHangul(rune)\n\t}\n\tif info.hasDecomposition() {\n\t\t// TODO: inline.\n\t\trb.insertDecomposed(info.Decomposition())\n\t} else {\n\t\trb.insertSingle(src, i, info)\n\t}\n}\n\n// insertDecomposed inserts an entry in to the reorderBuffer for each rune\n// in dcomp. dcomp must be a sequence of decomposed UTF-8-encoded runes.\n// It flushes the buffer on each new segment start.\nfunc (rb *reorderBuffer) insertDecomposed(dcomp []byte) insertErr {\n\trb.tmpBytes.setBytes(dcomp)\n\t// As the streamSafe accounting already handles the counting for modifiers,\n\t// we don't have to call next. However, we do need to keep the accounting\n\t// intact when flushing the buffer.\n\tfor i := 0; i < len(dcomp); {\n\t\tinfo := rb.f.info(rb.tmpBytes, i)\n\t\tif info.BoundaryBefore() && rb.nrune > 0 && !rb.doFlush() {\n\t\t\treturn iShortDst\n\t\t}\n\t\ti += copy(rb.byte[rb.nbyte:], dcomp[i:i+int(info.size)])\n\t\trb.insertOrdered(info)\n\t}\n\treturn iSuccess\n}\n\n// insertSingle inserts an entry in the reorderBuffer for the rune at\n// position i. info is the runeInfo for the rune at position i.\nfunc (rb *reorderBuffer) insertSingle(src input, i int, info Properties) {\n\tsrc.copySlice(rb.byte[rb.nbyte:], i, i+int(info.size))\n\trb.insertOrdered(info)\n}\n\n// insertCGJ inserts a Combining Grapheme Joiner (0x034f) into rb.\nfunc (rb *reorderBuffer) insertCGJ() {\n\trb.insertSingle(input{str: GraphemeJoiner}, 0, Properties{size: uint8(len(GraphemeJoiner))})\n}\n\n// appendRune inserts a rune at the end of the buffer. It is used for Hangul.\nfunc (rb *reorderBuffer) appendRune(r rune) {\n\tbn := rb.nbyte\n\tsz := utf8.EncodeRune(rb.byte[bn:], rune(r))\n\trb.nbyte += utf8.UTFMax\n\trb.rune[rb.nrune] = Properties{pos: bn, size: uint8(sz)}\n\trb.nrune++\n}\n\n// assignRune sets a rune at position pos. It is used for Hangul and recomposition.\nfunc (rb *reorderBuffer) assignRune(pos int, r rune) {\n\tbn := rb.rune[pos].pos\n\tsz := utf8.EncodeRune(rb.byte[bn:], rune(r))\n\trb.rune[pos] = Properties{pos: bn, size: uint8(sz)}\n}\n\n// runeAt returns the rune at position n. It is used for Hangul and recomposition.\nfunc (rb *reorderBuffer) runeAt(n int) rune {\n\tinf := rb.rune[n]\n\tr, _ := utf8.DecodeRune(rb.byte[inf.pos : inf.pos+inf.size])\n\treturn r\n}\n\n// bytesAt returns the UTF-8 encoding of the rune at position n.\n// It is used for Hangul and recomposition.\nfunc (rb *reorderBuffer) bytesAt(n int) []byte {\n\tinf := rb.rune[n]\n\treturn rb.byte[inf.pos : int(inf.pos)+int(inf.size)]\n}\n\n// For Hangul we combine algorithmically, instead of using tables.\nconst (\n\thangulBase  = 0xAC00 // UTF-8(hangulBase) -> EA B0 80\n\thangulBase0 = 0xEA\n\thangulBase1 = 0xB0\n\thangulBase2 = 0x80\n\n\thangulEnd  = hangulBase + jamoLVTCount // UTF-8(0xD7A4) -> ED 9E A4\n\thangulEnd0 = 0xED\n\thangulEnd1 = 0x9E\n\thangulEnd2 = 0xA4\n\n\tjamoLBase  = 0x1100 // UTF-8(jamoLBase) -> E1 84 00\n\tjamoLBase0 = 0xE1\n\tjamoLBase1 = 0x84\n\tjamoLEnd   = 0x1113\n\tjamoVBase  = 0x1161\n\tjamoVEnd   = 0x1176\n\tjamoTBase  = 0x11A7\n\tjamoTEnd   = 0x11C3\n\n\tjamoTCount   = 28\n\tjamoVCount   = 21\n\tjamoVTCount  = 21 * 28\n\tjamoLVTCount = 19 * 21 * 28\n)\n\nconst hangulUTF8Size = 3\n\nfunc isHangul(b []byte) bool {\n\tif len(b) < hangulUTF8Size {\n\t\treturn false\n\t}\n\tb0 := b[0]\n\tif b0 < hangulBase0 {\n\t\treturn false\n\t}\n\tb1 := b[1]\n\tswitch {\n\tcase b0 == hangulBase0:\n\t\treturn b1 >= hangulBase1\n\tcase b0 < hangulEnd0:\n\t\treturn true\n\tcase b0 > hangulEnd0:\n\t\treturn false\n\tcase b1 < hangulEnd1:\n\t\treturn true\n\t}\n\treturn b1 == hangulEnd1 && b[2] < hangulEnd2\n}\n\nfunc isHangulString(b string) bool {\n\tif len(b) < hangulUTF8Size {\n\t\treturn false\n\t}\n\tb0 := b[0]\n\tif b0 < hangulBase0 {\n\t\treturn false\n\t}\n\tb1 := b[1]\n\tswitch {\n\tcase b0 == hangulBase0:\n\t\treturn b1 >= hangulBase1\n\tcase b0 < hangulEnd0:\n\t\treturn true\n\tcase b0 > hangulEnd0:\n\t\treturn false\n\tcase b1 < hangulEnd1:\n\t\treturn true\n\t}\n\treturn b1 == hangulEnd1 && b[2] < hangulEnd2\n}\n\n// Caller must ensure len(b) >= 2.\nfunc isJamoVT(b []byte) bool {\n\t// True if (rune & 0xff00) == jamoLBase\n\treturn b[0] == jamoLBase0 && (b[1]&0xFC) == jamoLBase1\n}\n\nfunc isHangulWithoutJamoT(b []byte) bool {\n\tc, _ := utf8.DecodeRune(b)\n\tc -= hangulBase\n\treturn c < jamoLVTCount && c%jamoTCount == 0\n}\n\n// decomposeHangul writes the decomposed Hangul to buf and returns the number\n// of bytes written.  len(buf) should be at least 9.\nfunc decomposeHangul(buf []byte, r rune) int {\n\tconst JamoUTF8Len = 3\n\tr -= hangulBase\n\tx := r % jamoTCount\n\tr /= jamoTCount\n\tutf8.EncodeRune(buf, jamoLBase+r/jamoVCount)\n\tutf8.EncodeRune(buf[JamoUTF8Len:], jamoVBase+r%jamoVCount)\n\tif x != 0 {\n\t\tutf8.EncodeRune(buf[2*JamoUTF8Len:], jamoTBase+x)\n\t\treturn 3 * JamoUTF8Len\n\t}\n\treturn 2 * JamoUTF8Len\n}\n\n// decomposeHangul algorithmically decomposes a Hangul rune into\n// its Jamo components.\n// See https://unicode.org/reports/tr15/#Hangul for details on decomposing Hangul.\nfunc (rb *reorderBuffer) decomposeHangul(r rune) {\n\tr -= hangulBase\n\tx := r % jamoTCount\n\tr /= jamoTCount\n\trb.appendRune(jamoLBase + r/jamoVCount)\n\trb.appendRune(jamoVBase + r%jamoVCount)\n\tif x != 0 {\n\t\trb.appendRune(jamoTBase + x)\n\t}\n}\n\n// combineHangul algorithmically combines Jamo character components into Hangul.\n// See https://unicode.org/reports/tr15/#Hangul for details on combining Hangul.\nfunc (rb *reorderBuffer) combineHangul(s, i, k int) {\n\tb := rb.rune[:]\n\tbn := rb.nrune\n\tfor ; i < bn; i++ {\n\t\tcccB := b[k-1].ccc\n\t\tcccC := b[i].ccc\n\t\tif cccB == 0 {\n\t\t\ts = k - 1\n\t\t}\n\t\tif s != k-1 && cccB >= cccC {\n\t\t\t// b[i] is blocked by greater-equal cccX below it\n\t\t\tb[k] = b[i]\n\t\t\tk++\n\t\t} else {\n\t\t\tl := rb.runeAt(s) // also used to compare to hangulBase\n\t\t\tv := rb.runeAt(i) // also used to compare to jamoT\n\t\t\tswitch {\n\t\t\tcase jamoLBase <= l && l < jamoLEnd &&\n\t\t\t\tjamoVBase <= v && v < jamoVEnd:\n\t\t\t\t// 11xx plus 116x to LV\n\t\t\t\trb.assignRune(s, hangulBase+\n\t\t\t\t\t(l-jamoLBase)*jamoVTCount+(v-jamoVBase)*jamoTCount)\n\t\t\tcase hangulBase <= l && l < hangulEnd &&\n\t\t\t\tjamoTBase < v && v < jamoTEnd &&\n\t\t\t\t((l-hangulBase)%jamoTCount) == 0:\n\t\t\t\t// ACxx plus 11Ax to LVT\n\t\t\t\trb.assignRune(s, l+v-jamoTBase)\n\t\t\tdefault:\n\t\t\t\tb[k] = b[i]\n\t\t\t\tk++\n\t\t\t}\n\t\t}\n\t}\n\trb.nrune = k\n}\n\n// compose recombines the runes in the buffer.\n// It should only be used to recompose a single segment, as it will not\n// handle alternations between Hangul and non-Hangul characters correctly.\nfunc (rb *reorderBuffer) compose() {\n\t// Lazily load the map used by the combine func below, but do\n\t// it outside of the loop.\n\trecompMapOnce.Do(buildRecompMap)\n\n\t// UAX #15, section X5 , including Corrigendum #5\n\t// \"In any character sequence beginning with starter S, a character C is\n\t//  blocked from S if and only if there is some character B between S\n\t//  and C, and either B is a starter or it has the same or higher\n\t//  combining class as C.\"\n\tbn := rb.nrune\n\tif bn == 0 {\n\t\treturn\n\t}\n\tk := 1\n\tb := rb.rune[:]\n\tfor s, i := 0, 1; i < bn; i++ {\n\t\tif isJamoVT(rb.bytesAt(i)) {\n\t\t\t// Redo from start in Hangul mode. Necessary to support\n\t\t\t// U+320E..U+321E in NFKC mode.\n\t\t\trb.combineHangul(s, i, k)\n\t\t\treturn\n\t\t}\n\t\tii := b[i]\n\t\t// We can only use combineForward as a filter if we later\n\t\t// get the info for the combined character. This is more\n\t\t// expensive than using the filter. Using combinesBackward()\n\t\t// is safe.\n\t\tif ii.combinesBackward() {\n\t\t\tcccB := b[k-1].ccc\n\t\t\tcccC := ii.ccc\n\t\t\tblocked := false // b[i] blocked by starter or greater or equal CCC?\n\t\t\tif cccB == 0 {\n\t\t\t\ts = k - 1\n\t\t\t} else {\n\t\t\t\tblocked = s != k-1 && cccB >= cccC\n\t\t\t}\n\t\t\tif !blocked {\n\t\t\t\tcombined := combine(rb.runeAt(s), rb.runeAt(i))\n\t\t\t\tif combined != 0 {\n\t\t\t\t\trb.assignRune(s, combined)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tb[k] = b[i]\n\t\tk++\n\t}\n\trb.nrune = k\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/forminfo.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport \"encoding/binary\"\n\n// This file contains Form-specific logic and wrappers for data in tables.go.\n\n// Rune info is stored in a separate trie per composing form. A composing form\n// and its corresponding decomposing form share the same trie.  Each trie maps\n// a rune to a uint16. The values take two forms.  For v >= 0x8000:\n//   bits\n//   15:    1 (inverse of NFD_QC bit of qcInfo)\n//   12..7: qcInfo (see below). isYesD is always true (no decomposition).\n//    6..0: ccc (compressed CCC value).\n// For v < 0x8000, the respective rune has a decomposition and v is an index\n// into a byte array of UTF-8 decomposition sequences and additional info and\n// has the form:\n//    <header> <decomp_byte>* [<tccc> [<lccc>]]\n// The header contains the number of bytes in the decomposition (excluding this\n// length byte), with 33 mapped to 31 to fit in 5 bits.\n// (If any 31- or 32-byte decompositions come along, we could switch to using\n// use a general lookup table as long as there are at most 32 distinct lengths.)\n// The three most significant bits of this length byte correspond\n// to bit 5, 4, and 3 of qcInfo (see below).  The byte sequence itself starts at v+1.\n// The byte sequence is followed by a trailing and leading CCC if the values\n// for these are not zero.  The value of v determines which ccc are appended\n// to the sequences.  For v < firstCCC, there are none, for v >= firstCCC,\n// the sequence is followed by a trailing ccc, and for v >= firstLeadingCC\n// there is an additional leading ccc. The value of tccc itself is the\n// trailing CCC shifted left 2 bits. The two least-significant bits of tccc\n// are the number of trailing non-starters.\n\nconst (\n\tqcInfoMask      = 0x3F // to clear all but the relevant bits in a qcInfo\n\theaderLenMask   = 0x1F // extract the length value from the header byte (31 => 33)\n\theaderFlagsMask = 0xE0 // extract the qcInfo bits from the header byte\n)\n\n// Properties provides access to normalization properties of a rune.\ntype Properties struct {\n\tpos   uint8  // start position in reorderBuffer; used in composition.go\n\tsize  uint8  // length of UTF-8 encoding of this rune\n\tccc   uint8  // leading canonical combining class (ccc if not decomposition)\n\ttccc  uint8  // trailing canonical combining class (ccc if not decomposition)\n\tnLead uint8  // number of leading non-starters.\n\tflags qcInfo // quick check flags\n\tindex uint16\n}\n\n// functions dispatchable per form\ntype lookupFunc func(b input, i int) Properties\n\n// formInfo holds Form-specific functions and tables.\ntype formInfo struct {\n\tform                     Form\n\tcomposing, compatibility bool // form type\n\tinfo                     lookupFunc\n\tnextMain                 iterFunc\n}\n\nvar formTable = []*formInfo{{\n\tform:          NFC,\n\tcomposing:     true,\n\tcompatibility: false,\n\tinfo:          lookupInfoNFC,\n\tnextMain:      nextComposed,\n}, {\n\tform:          NFD,\n\tcomposing:     false,\n\tcompatibility: false,\n\tinfo:          lookupInfoNFC,\n\tnextMain:      nextDecomposed,\n}, {\n\tform:          NFKC,\n\tcomposing:     true,\n\tcompatibility: true,\n\tinfo:          lookupInfoNFKC,\n\tnextMain:      nextComposed,\n}, {\n\tform:          NFKD,\n\tcomposing:     false,\n\tcompatibility: true,\n\tinfo:          lookupInfoNFKC,\n\tnextMain:      nextDecomposed,\n}}\n\n// We do not distinguish between boundaries for NFC, NFD, etc. to avoid\n// unexpected behavior for the user.  For example, in NFD, there is a boundary\n// after 'a'.  However, 'a' might combine with modifiers, so from the application's\n// perspective it is not a good boundary. We will therefore always use the\n// boundaries for the combining variants.\n\n// BoundaryBefore returns true if this rune starts a new segment and\n// cannot combine with any rune on the left.\nfunc (p Properties) BoundaryBefore() bool {\n\tif p.ccc == 0 && !p.combinesBackward() {\n\t\treturn true\n\t}\n\t// We assume that the CCC of the first character in a decomposition\n\t// is always non-zero if different from info.ccc and that we can return\n\t// false at this point. This is verified by maketables.\n\treturn false\n}\n\n// BoundaryAfter returns true if runes cannot combine with or otherwise\n// interact with this or previous runes.\nfunc (p Properties) BoundaryAfter() bool {\n\t// TODO: loosen these conditions.\n\treturn p.isInert()\n}\n\n// We pack quick check data in 6 bits:\n//\n//\t5:    Combines forward  (0 == false, 1 == true)\n//\t4..3: NFC_QC Yes(00), No (10), or Maybe (11)\n//\t2:    NFD_QC Yes (0) or No (1). No also means there is a decomposition.\n//\t1..0: Number of trailing non-starters.\n//\n// When all 6 bits are zero, the character is inert, meaning it is never\n// influenced by normalization.\ntype qcInfo uint8\n\nfunc (p Properties) isYesC() bool { return p.flags&0x10 == 0 }\nfunc (p Properties) isYesD() bool { return p.flags&0x4 == 0 }\n\nfunc (p Properties) combinesForward() bool  { return p.flags&0x20 != 0 }\nfunc (p Properties) combinesBackward() bool { return p.flags&0x8 != 0 } // == isMaybe\nfunc (p Properties) hasDecomposition() bool { return p.flags&0x4 != 0 } // == isNoD\n\nfunc (p Properties) isInert() bool {\n\treturn p.flags&qcInfoMask == 0 && p.ccc == 0\n}\n\nfunc (p Properties) multiSegment() bool {\n\treturn p.index >= firstMulti && p.index < endMulti\n}\n\nfunc (p Properties) nLeadingNonStarters() uint8 {\n\treturn p.nLead\n}\n\nfunc (p Properties) nTrailingNonStarters() uint8 {\n\treturn uint8(p.flags & 0x03)\n}\n\n// Decomposition returns the decomposition for the underlying rune\n// or nil if there is none.\nfunc (p Properties) Decomposition() []byte {\n\t// TODO: create the decomposition for Hangul?\n\tif p.index == 0 {\n\t\treturn nil\n\t}\n\ti := p.index\n\tn := decomps[i] & headerLenMask\n\tif n == 31 {\n\t\tn = 33\n\t}\n\ti++\n\treturn decomps[i : i+uint16(n)]\n}\n\n// Size returns the length of UTF-8 encoding of the rune.\nfunc (p Properties) Size() int {\n\treturn int(p.size)\n}\n\n// CCC returns the canonical combining class of the underlying rune.\nfunc (p Properties) CCC() uint8 {\n\tif p.index >= firstCCCZeroExcept {\n\t\treturn 0\n\t}\n\treturn ccc[p.ccc]\n}\n\n// LeadCCC returns the CCC of the first rune in the decomposition.\n// If there is no decomposition, LeadCCC equals CCC.\nfunc (p Properties) LeadCCC() uint8 {\n\treturn ccc[p.ccc]\n}\n\n// TrailCCC returns the CCC of the last rune in the decomposition.\n// If there is no decomposition, TrailCCC equals CCC.\nfunc (p Properties) TrailCCC() uint8 {\n\treturn ccc[p.tccc]\n}\n\nfunc buildRecompMap() {\n\trecompMap = make(map[uint32]rune, len(recompMapPacked)/8)\n\tvar buf [8]byte\n\tfor i := 0; i < len(recompMapPacked); i += 8 {\n\t\tcopy(buf[:], recompMapPacked[i:i+8])\n\t\tkey := binary.BigEndian.Uint32(buf[:4])\n\t\tval := binary.BigEndian.Uint32(buf[4:])\n\t\trecompMap[key] = rune(val)\n\t}\n}\n\n// Recomposition\n// We use 32-bit keys instead of 64-bit for the two codepoint keys.\n// This clips off the bits of three entries, but we know this will not\n// result in a collision. In the unlikely event that changes to\n// UnicodeData.txt introduce collisions, the compiler will catch it.\n// Note that the recomposition map for NFC and NFKC are identical.\n\n// combine returns the combined rune or 0 if it doesn't exist.\n//\n// The caller is responsible for calling\n// recompMapOnce.Do(buildRecompMap) sometime before this is called.\nfunc combine(a, b rune) rune {\n\tkey := uint32(uint16(a))<<16 + uint32(uint16(b))\n\tif recompMap == nil {\n\t\tpanic(\"caller error\") // see func comment\n\t}\n\treturn recompMap[key]\n}\n\nfunc lookupInfoNFC(b input, i int) Properties {\n\tv, sz := b.charinfoNFC(i)\n\treturn compInfo(v, sz)\n}\n\nfunc lookupInfoNFKC(b input, i int) Properties {\n\tv, sz := b.charinfoNFKC(i)\n\treturn compInfo(v, sz)\n}\n\n// Properties returns properties for the first rune in s.\nfunc (f Form) Properties(s []byte) Properties {\n\tif f == NFC || f == NFD {\n\t\treturn compInfo(nfcData.lookup(s))\n\t}\n\treturn compInfo(nfkcData.lookup(s))\n}\n\n// PropertiesString returns properties for the first rune in s.\nfunc (f Form) PropertiesString(s string) Properties {\n\tif f == NFC || f == NFD {\n\t\treturn compInfo(nfcData.lookupString(s))\n\t}\n\treturn compInfo(nfkcData.lookupString(s))\n}\n\n// compInfo converts the information contained in v and sz\n// to a Properties.  See the comment at the top of the file\n// for more information on the format.\nfunc compInfo(v uint16, sz int) Properties {\n\tif v == 0 {\n\t\treturn Properties{size: uint8(sz)}\n\t} else if v >= 0x8000 {\n\t\tp := Properties{\n\t\t\tsize:  uint8(sz),\n\t\t\tccc:   uint8(v),\n\t\t\ttccc:  uint8(v),\n\t\t\tflags: qcInfo(v >> 8),\n\t\t}\n\t\tif p.ccc > 0 || p.combinesBackward() {\n\t\t\tp.nLead = uint8(p.flags & 0x3)\n\t\t}\n\t\treturn p\n\t}\n\t// has decomposition\n\th := decomps[v]\n\tf := (qcInfo(h&headerFlagsMask) >> 2) | 0x4\n\tp := Properties{size: uint8(sz), flags: f, index: v}\n\tif v >= firstCCC {\n\t\tn := uint16(h & headerLenMask)\n\t\tif n == 31 {\n\t\t\tn = 33\n\t\t}\n\t\tv += n + 1\n\t\tc := decomps[v]\n\t\tp.tccc = c >> 2\n\t\tp.flags |= qcInfo(c & 0x3)\n\t\tif v >= firstLeadingCCC {\n\t\t\tp.nLead = c & 0x3\n\t\t\tif v >= firstStarterWithNLead {\n\t\t\t\t// We were tricked. Remove the decomposition.\n\t\t\t\tp.flags &= 0x03\n\t\t\t\tp.index = 0\n\t\t\t\treturn p\n\t\t\t}\n\t\t\tp.ccc = decomps[v+1]\n\t\t}\n\t}\n\treturn p\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/input.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport \"unicode/utf8\"\n\ntype input struct {\n\tstr   string\n\tbytes []byte\n}\n\nfunc inputBytes(str []byte) input {\n\treturn input{bytes: str}\n}\n\nfunc inputString(str string) input {\n\treturn input{str: str}\n}\n\nfunc (in *input) setBytes(str []byte) {\n\tin.str = \"\"\n\tin.bytes = str\n}\n\nfunc (in *input) setString(str string) {\n\tin.str = str\n\tin.bytes = nil\n}\n\nfunc (in *input) _byte(p int) byte {\n\tif in.bytes == nil {\n\t\treturn in.str[p]\n\t}\n\treturn in.bytes[p]\n}\n\nfunc (in *input) skipASCII(p, max int) int {\n\tif in.bytes == nil {\n\t\tfor ; p < max && in.str[p] < utf8.RuneSelf; p++ {\n\t\t}\n\t} else {\n\t\tfor ; p < max && in.bytes[p] < utf8.RuneSelf; p++ {\n\t\t}\n\t}\n\treturn p\n}\n\nfunc (in *input) skipContinuationBytes(p int) int {\n\tif in.bytes == nil {\n\t\tfor ; p < len(in.str) && !utf8.RuneStart(in.str[p]); p++ {\n\t\t}\n\t} else {\n\t\tfor ; p < len(in.bytes) && !utf8.RuneStart(in.bytes[p]); p++ {\n\t\t}\n\t}\n\treturn p\n}\n\nfunc (in *input) appendSlice(buf []byte, b, e int) []byte {\n\tif in.bytes != nil {\n\t\treturn append(buf, in.bytes[b:e]...)\n\t}\n\tfor i := b; i < e; i++ {\n\t\tbuf = append(buf, in.str[i])\n\t}\n\treturn buf\n}\n\nfunc (in *input) copySlice(buf []byte, b, e int) int {\n\tif in.bytes == nil {\n\t\treturn copy(buf, in.str[b:e])\n\t}\n\treturn copy(buf, in.bytes[b:e])\n}\n\nfunc (in *input) charinfoNFC(p int) (uint16, int) {\n\tif in.bytes == nil {\n\t\treturn nfcData.lookupString(in.str[p:])\n\t}\n\treturn nfcData.lookup(in.bytes[p:])\n}\n\nfunc (in *input) charinfoNFKC(p int) (uint16, int) {\n\tif in.bytes == nil {\n\t\treturn nfkcData.lookupString(in.str[p:])\n\t}\n\treturn nfkcData.lookup(in.bytes[p:])\n}\n\nfunc (in *input) hangul(p int) (r rune) {\n\tvar size int\n\tif in.bytes == nil {\n\t\tif !isHangulString(in.str[p:]) {\n\t\t\treturn 0\n\t\t}\n\t\tr, size = utf8.DecodeRuneInString(in.str[p:])\n\t} else {\n\t\tif !isHangul(in.bytes[p:]) {\n\t\t\treturn 0\n\t\t}\n\t\tr, size = utf8.DecodeRune(in.bytes[p:])\n\t}\n\tif size != hangulUTF8Size {\n\t\treturn 0\n\t}\n\treturn r\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/iter.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport (\n\t\"fmt\"\n\t\"unicode/utf8\"\n)\n\n// MaxSegmentSize is the maximum size of a byte buffer needed to consider any\n// sequence of starter and non-starter runes for the purpose of normalization.\nconst MaxSegmentSize = maxByteBufferSize\n\n// An Iter iterates over a string or byte slice, while normalizing it\n// to a given Form.\ntype Iter struct {\n\trb     reorderBuffer\n\tbuf    [maxByteBufferSize]byte\n\tinfo   Properties // first character saved from previous iteration\n\tnext   iterFunc   // implementation of next depends on form\n\tasciiF iterFunc\n\n\tp        int    // current position in input source\n\tmultiSeg []byte // remainder of multi-segment decomposition\n}\n\ntype iterFunc func(*Iter) []byte\n\n// Init initializes i to iterate over src after normalizing it to Form f.\nfunc (i *Iter) Init(f Form, src []byte) {\n\ti.p = 0\n\tif len(src) == 0 {\n\t\ti.setDone()\n\t\ti.rb.nsrc = 0\n\t\treturn\n\t}\n\ti.multiSeg = nil\n\ti.rb.init(f, src)\n\ti.next = i.rb.f.nextMain\n\ti.asciiF = nextASCIIBytes\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.rb.ss.first(i.info)\n}\n\n// InitString initializes i to iterate over src after normalizing it to Form f.\nfunc (i *Iter) InitString(f Form, src string) {\n\ti.p = 0\n\tif len(src) == 0 {\n\t\ti.setDone()\n\t\ti.rb.nsrc = 0\n\t\treturn\n\t}\n\ti.multiSeg = nil\n\ti.rb.initString(f, src)\n\ti.next = i.rb.f.nextMain\n\ti.asciiF = nextASCIIString\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.rb.ss.first(i.info)\n}\n\n// Seek sets the segment to be returned by the next call to Next to start\n// at position p.  It is the responsibility of the caller to set p to the\n// start of a segment.\nfunc (i *Iter) Seek(offset int64, whence int) (int64, error) {\n\tvar abs int64\n\tswitch whence {\n\tcase 0:\n\t\tabs = offset\n\tcase 1:\n\t\tabs = int64(i.p) + offset\n\tcase 2:\n\t\tabs = int64(i.rb.nsrc) + offset\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"norm: invalid whence\")\n\t}\n\tif abs < 0 {\n\t\treturn 0, fmt.Errorf(\"norm: negative position\")\n\t}\n\tif int(abs) >= i.rb.nsrc {\n\t\ti.setDone()\n\t\treturn int64(i.p), nil\n\t}\n\ti.p = int(abs)\n\ti.multiSeg = nil\n\ti.next = i.rb.f.nextMain\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.rb.ss.first(i.info)\n\treturn abs, nil\n}\n\n// returnSlice returns a slice of the underlying input type as a byte slice.\n// If the underlying is of type []byte, it will simply return a slice.\n// If the underlying is of type string, it will copy the slice to the buffer\n// and return that.\nfunc (i *Iter) returnSlice(a, b int) []byte {\n\tif i.rb.src.bytes == nil {\n\t\treturn i.buf[:copy(i.buf[:], i.rb.src.str[a:b])]\n\t}\n\treturn i.rb.src.bytes[a:b]\n}\n\n// Pos returns the byte position at which the next call to Next will commence processing.\nfunc (i *Iter) Pos() int {\n\treturn i.p\n}\n\nfunc (i *Iter) setDone() {\n\ti.next = nextDone\n\ti.p = i.rb.nsrc\n}\n\n// Done returns true if there is no more input to process.\nfunc (i *Iter) Done() bool {\n\treturn i.p >= i.rb.nsrc\n}\n\n// Next returns f(i.input[i.Pos():n]), where n is a boundary of i.input.\n// For any input a and b for which f(a) == f(b), subsequent calls\n// to Next will return the same segments.\n// Modifying runes are grouped together with the preceding starter, if such a starter exists.\n// Although not guaranteed, n will typically be the smallest possible n.\nfunc (i *Iter) Next() []byte {\n\treturn i.next(i)\n}\n\nfunc nextASCIIBytes(i *Iter) []byte {\n\tp := i.p + 1\n\tif p >= i.rb.nsrc {\n\t\tp0 := i.p\n\t\ti.setDone()\n\t\treturn i.rb.src.bytes[p0:p]\n\t}\n\tif i.rb.src.bytes[p] < utf8.RuneSelf {\n\t\tp0 := i.p\n\t\ti.p = p\n\t\treturn i.rb.src.bytes[p0:p]\n\t}\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.next = i.rb.f.nextMain\n\treturn i.next(i)\n}\n\nfunc nextASCIIString(i *Iter) []byte {\n\tp := i.p + 1\n\tif p >= i.rb.nsrc {\n\t\ti.buf[0] = i.rb.src.str[i.p]\n\t\ti.setDone()\n\t\treturn i.buf[:1]\n\t}\n\tif i.rb.src.str[p] < utf8.RuneSelf {\n\t\ti.buf[0] = i.rb.src.str[i.p]\n\t\ti.p = p\n\t\treturn i.buf[:1]\n\t}\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.next = i.rb.f.nextMain\n\treturn i.next(i)\n}\n\nfunc nextHangul(i *Iter) []byte {\n\tp := i.p\n\tnext := p + hangulUTF8Size\n\tif next >= i.rb.nsrc {\n\t\ti.setDone()\n\t} else if i.rb.src.hangul(next) == 0 {\n\t\ti.rb.ss.next(i.info)\n\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\ti.next = i.rb.f.nextMain\n\t\treturn i.next(i)\n\t}\n\ti.p = next\n\treturn i.buf[:decomposeHangul(i.buf[:], i.rb.src.hangul(p))]\n}\n\nfunc nextDone(i *Iter) []byte {\n\treturn nil\n}\n\n// nextMulti is used for iterating over multi-segment decompositions\n// for decomposing normal forms.\nfunc nextMulti(i *Iter) []byte {\n\tj := 0\n\td := i.multiSeg\n\t// skip first rune\n\tfor j = 1; j < len(d) && !utf8.RuneStart(d[j]); j++ {\n\t}\n\tfor j < len(d) {\n\t\tinfo := i.rb.f.info(input{bytes: d}, j)\n\t\tif info.BoundaryBefore() {\n\t\t\ti.multiSeg = d[j:]\n\t\t\treturn d[:j]\n\t\t}\n\t\tj += int(info.size)\n\t}\n\t// treat last segment as normal decomposition\n\ti.next = i.rb.f.nextMain\n\treturn i.next(i)\n}\n\n// nextMultiNorm is used for iterating over multi-segment decompositions\n// for composing normal forms.\nfunc nextMultiNorm(i *Iter) []byte {\n\tj := 0\n\td := i.multiSeg\n\tfor j < len(d) {\n\t\tinfo := i.rb.f.info(input{bytes: d}, j)\n\t\tif info.BoundaryBefore() {\n\t\t\ti.rb.compose()\n\t\t\tseg := i.buf[:i.rb.flushCopy(i.buf[:])]\n\t\t\ti.rb.insertUnsafe(input{bytes: d}, j, info)\n\t\t\ti.multiSeg = d[j+int(info.size):]\n\t\t\treturn seg\n\t\t}\n\t\ti.rb.insertUnsafe(input{bytes: d}, j, info)\n\t\tj += int(info.size)\n\t}\n\ti.multiSeg = nil\n\ti.next = nextComposed\n\treturn doNormComposed(i)\n}\n\n// nextDecomposed is the implementation of Next for forms NFD and NFKD.\nfunc nextDecomposed(i *Iter) (next []byte) {\n\toutp := 0\n\tinCopyStart, outCopyStart := i.p, 0\n\tfor {\n\t\tif sz := int(i.info.size); sz <= 1 {\n\t\t\ti.rb.ss = 0\n\t\t\tp := i.p\n\t\t\ti.p++ // ASCII or illegal byte.  Either way, advance by 1.\n\t\t\tif i.p >= i.rb.nsrc {\n\t\t\t\ti.setDone()\n\t\t\t\treturn i.returnSlice(p, i.p)\n\t\t\t} else if i.rb.src._byte(i.p) < utf8.RuneSelf {\n\t\t\t\ti.next = i.asciiF\n\t\t\t\treturn i.returnSlice(p, i.p)\n\t\t\t}\n\t\t\toutp++\n\t\t} else if d := i.info.Decomposition(); d != nil {\n\t\t\t// Note: If leading CCC != 0, then len(d) == 2 and last is also non-zero.\n\t\t\t// Case 1: there is a leftover to copy.  In this case the decomposition\n\t\t\t// must begin with a modifier and should always be appended.\n\t\t\t// Case 2: no leftover. Simply return d if followed by a ccc == 0 value.\n\t\t\tp := outp + len(d)\n\t\t\tif outp > 0 {\n\t\t\t\ti.rb.src.copySlice(i.buf[outCopyStart:], inCopyStart, i.p)\n\t\t\t\t// TODO: this condition should not be possible, but we leave it\n\t\t\t\t// in for defensive purposes.\n\t\t\t\tif p > len(i.buf) {\n\t\t\t\t\treturn i.buf[:outp]\n\t\t\t\t}\n\t\t\t} else if i.info.multiSegment() {\n\t\t\t\t// outp must be 0 as multi-segment decompositions always\n\t\t\t\t// start a new segment.\n\t\t\t\tif i.multiSeg == nil {\n\t\t\t\t\ti.multiSeg = d\n\t\t\t\t\ti.next = nextMulti\n\t\t\t\t\treturn nextMulti(i)\n\t\t\t\t}\n\t\t\t\t// We are in the last segment.  Treat as normal decomposition.\n\t\t\t\td = i.multiSeg\n\t\t\t\ti.multiSeg = nil\n\t\t\t\tp = len(d)\n\t\t\t}\n\t\t\tprevCC := i.info.tccc\n\t\t\tif i.p += sz; i.p >= i.rb.nsrc {\n\t\t\t\ti.setDone()\n\t\t\t\ti.info = Properties{} // Force BoundaryBefore to succeed.\n\t\t\t} else {\n\t\t\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\t\t}\n\t\t\tswitch i.rb.ss.next(i.info) {\n\t\t\tcase ssOverflow:\n\t\t\t\ti.next = nextCGJDecompose\n\t\t\t\tfallthrough\n\t\t\tcase ssStarter:\n\t\t\t\tif outp > 0 {\n\t\t\t\t\tcopy(i.buf[outp:], d)\n\t\t\t\t\treturn i.buf[:p]\n\t\t\t\t}\n\t\t\t\treturn d\n\t\t\t}\n\t\t\tcopy(i.buf[outp:], d)\n\t\t\toutp = p\n\t\t\tinCopyStart, outCopyStart = i.p, outp\n\t\t\tif i.info.ccc < prevCC {\n\t\t\t\tgoto doNorm\n\t\t\t}\n\t\t\tcontinue\n\t\t} else if r := i.rb.src.hangul(i.p); r != 0 {\n\t\t\toutp = decomposeHangul(i.buf[:], r)\n\t\t\ti.p += hangulUTF8Size\n\t\t\tinCopyStart, outCopyStart = i.p, outp\n\t\t\tif i.p >= i.rb.nsrc {\n\t\t\t\ti.setDone()\n\t\t\t\tbreak\n\t\t\t} else if i.rb.src.hangul(i.p) != 0 {\n\t\t\t\ti.next = nextHangul\n\t\t\t\treturn i.buf[:outp]\n\t\t\t}\n\t\t} else {\n\t\t\tp := outp + sz\n\t\t\tif p > len(i.buf) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\toutp = p\n\t\t\ti.p += sz\n\t\t}\n\t\tif i.p >= i.rb.nsrc {\n\t\t\ti.setDone()\n\t\t\tbreak\n\t\t}\n\t\tprevCC := i.info.tccc\n\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\tif v := i.rb.ss.next(i.info); v == ssStarter {\n\t\t\tbreak\n\t\t} else if v == ssOverflow {\n\t\t\ti.next = nextCGJDecompose\n\t\t\tbreak\n\t\t}\n\t\tif i.info.ccc < prevCC {\n\t\t\tgoto doNorm\n\t\t}\n\t}\n\tif outCopyStart == 0 {\n\t\treturn i.returnSlice(inCopyStart, i.p)\n\t} else if inCopyStart < i.p {\n\t\ti.rb.src.copySlice(i.buf[outCopyStart:], inCopyStart, i.p)\n\t}\n\treturn i.buf[:outp]\ndoNorm:\n\t// Insert what we have decomposed so far in the reorderBuffer.\n\t// As we will only reorder, there will always be enough room.\n\ti.rb.src.copySlice(i.buf[outCopyStart:], inCopyStart, i.p)\n\ti.rb.insertDecomposed(i.buf[0:outp])\n\treturn doNormDecomposed(i)\n}\n\nfunc doNormDecomposed(i *Iter) []byte {\n\tfor {\n\t\ti.rb.insertUnsafe(i.rb.src, i.p, i.info)\n\t\tif i.p += int(i.info.size); i.p >= i.rb.nsrc {\n\t\t\ti.setDone()\n\t\t\tbreak\n\t\t}\n\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\tif i.info.ccc == 0 {\n\t\t\tbreak\n\t\t}\n\t\tif s := i.rb.ss.next(i.info); s == ssOverflow {\n\t\t\ti.next = nextCGJDecompose\n\t\t\tbreak\n\t\t}\n\t}\n\t// new segment or too many combining characters: exit normalization\n\treturn i.buf[:i.rb.flushCopy(i.buf[:])]\n}\n\nfunc nextCGJDecompose(i *Iter) []byte {\n\ti.rb.ss = 0\n\ti.rb.insertCGJ()\n\ti.next = nextDecomposed\n\ti.rb.ss.first(i.info)\n\tbuf := doNormDecomposed(i)\n\treturn buf\n}\n\n// nextComposed is the implementation of Next for forms NFC and NFKC.\nfunc nextComposed(i *Iter) []byte {\n\toutp, startp := 0, i.p\n\tvar prevCC uint8\n\tfor {\n\t\tif !i.info.isYesC() {\n\t\t\tgoto doNorm\n\t\t}\n\t\tprevCC = i.info.tccc\n\t\tsz := int(i.info.size)\n\t\tif sz == 0 {\n\t\t\tsz = 1 // illegal rune: copy byte-by-byte\n\t\t}\n\t\tp := outp + sz\n\t\tif p > len(i.buf) {\n\t\t\tbreak\n\t\t}\n\t\toutp = p\n\t\ti.p += sz\n\t\tif i.p >= i.rb.nsrc {\n\t\t\ti.setDone()\n\t\t\tbreak\n\t\t} else if i.rb.src._byte(i.p) < utf8.RuneSelf {\n\t\t\ti.rb.ss = 0\n\t\t\ti.next = i.asciiF\n\t\t\tbreak\n\t\t}\n\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\tif v := i.rb.ss.next(i.info); v == ssStarter {\n\t\t\tbreak\n\t\t} else if v == ssOverflow {\n\t\t\ti.next = nextCGJCompose\n\t\t\tbreak\n\t\t}\n\t\tif i.info.ccc < prevCC {\n\t\t\tgoto doNorm\n\t\t}\n\t}\n\treturn i.returnSlice(startp, i.p)\ndoNorm:\n\t// reset to start position\n\ti.p = startp\n\ti.info = i.rb.f.info(i.rb.src, i.p)\n\ti.rb.ss.first(i.info)\n\tif i.info.multiSegment() {\n\t\td := i.info.Decomposition()\n\t\tinfo := i.rb.f.info(input{bytes: d}, 0)\n\t\ti.rb.insertUnsafe(input{bytes: d}, 0, info)\n\t\ti.multiSeg = d[int(info.size):]\n\t\ti.next = nextMultiNorm\n\t\treturn nextMultiNorm(i)\n\t}\n\ti.rb.ss.first(i.info)\n\ti.rb.insertUnsafe(i.rb.src, i.p, i.info)\n\treturn doNormComposed(i)\n}\n\nfunc doNormComposed(i *Iter) []byte {\n\t// First rune should already be inserted.\n\tfor {\n\t\tif i.p += int(i.info.size); i.p >= i.rb.nsrc {\n\t\t\ti.setDone()\n\t\t\tbreak\n\t\t}\n\t\ti.info = i.rb.f.info(i.rb.src, i.p)\n\t\tif s := i.rb.ss.next(i.info); s == ssStarter {\n\t\t\tbreak\n\t\t} else if s == ssOverflow {\n\t\t\ti.next = nextCGJCompose\n\t\t\tbreak\n\t\t}\n\t\ti.rb.insertUnsafe(i.rb.src, i.p, i.info)\n\t}\n\ti.rb.compose()\n\tseg := i.buf[:i.rb.flushCopy(i.buf[:])]\n\treturn seg\n}\n\nfunc nextCGJCompose(i *Iter) []byte {\n\ti.rb.ss = 0 // instead of first\n\ti.rb.insertCGJ()\n\ti.next = nextComposed\n\t// Note that we treat any rune with nLeadingNonStarters > 0 as a non-starter,\n\t// even if they are not. This is particularly dubious for U+FF9E and UFF9A.\n\t// If we ever change that, insert a check here.\n\ti.rb.ss.first(i.info)\n\ti.rb.insertUnsafe(i.rb.src, i.p, i.info)\n\treturn doNormComposed(i)\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/normalize.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Note: the file data_test.go that is generated should not be checked in.\n//go:generate go run maketables.go triegen.go\n//go:generate go test -tags test\n\n// Package norm contains types and functions for normalizing Unicode strings.\npackage norm // import \"golang.org/x/text/unicode/norm\"\n\nimport (\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/transform\"\n)\n\n// A Form denotes a canonical representation of Unicode code points.\n// The Unicode-defined normalization and equivalence forms are:\n//\n//\tNFC   Unicode Normalization Form C\n//\tNFD   Unicode Normalization Form D\n//\tNFKC  Unicode Normalization Form KC\n//\tNFKD  Unicode Normalization Form KD\n//\n// For a Form f, this documentation uses the notation f(x) to mean\n// the bytes or string x converted to the given form.\n// A position n in x is called a boundary if conversion to the form can\n// proceed independently on both sides:\n//\n//\tf(x) == append(f(x[0:n]), f(x[n:])...)\n//\n// References: https://unicode.org/reports/tr15/ and\n// https://unicode.org/notes/tn5/.\ntype Form int\n\nconst (\n\tNFC Form = iota\n\tNFD\n\tNFKC\n\tNFKD\n)\n\n// Bytes returns f(b). May return b if f(b) = b.\nfunc (f Form) Bytes(b []byte) []byte {\n\tsrc := inputBytes(b)\n\tft := formTable[f]\n\tn, ok := ft.quickSpan(src, 0, len(b), true)\n\tif ok {\n\t\treturn b\n\t}\n\tout := make([]byte, n, len(b))\n\tcopy(out, b[0:n])\n\trb := reorderBuffer{f: *ft, src: src, nsrc: len(b), out: out, flushF: appendFlush}\n\treturn doAppendInner(&rb, n)\n}\n\n// String returns f(s).\nfunc (f Form) String(s string) string {\n\tsrc := inputString(s)\n\tft := formTable[f]\n\tn, ok := ft.quickSpan(src, 0, len(s), true)\n\tif ok {\n\t\treturn s\n\t}\n\tout := make([]byte, n, len(s))\n\tcopy(out, s[0:n])\n\trb := reorderBuffer{f: *ft, src: src, nsrc: len(s), out: out, flushF: appendFlush}\n\treturn string(doAppendInner(&rb, n))\n}\n\n// IsNormal returns true if b == f(b).\nfunc (f Form) IsNormal(b []byte) bool {\n\tsrc := inputBytes(b)\n\tft := formTable[f]\n\tbp, ok := ft.quickSpan(src, 0, len(b), true)\n\tif ok {\n\t\treturn true\n\t}\n\trb := reorderBuffer{f: *ft, src: src, nsrc: len(b)}\n\trb.setFlusher(nil, cmpNormalBytes)\n\tfor bp < len(b) {\n\t\trb.out = b[bp:]\n\t\tif bp = decomposeSegment(&rb, bp, true); bp < 0 {\n\t\t\treturn false\n\t\t}\n\t\tbp, _ = rb.f.quickSpan(rb.src, bp, len(b), true)\n\t}\n\treturn true\n}\n\nfunc cmpNormalBytes(rb *reorderBuffer) bool {\n\tb := rb.out\n\tfor i := 0; i < rb.nrune; i++ {\n\t\tinfo := rb.rune[i]\n\t\tif int(info.size) > len(b) {\n\t\t\treturn false\n\t\t}\n\t\tp := info.pos\n\t\tpe := p + info.size\n\t\tfor ; p < pe; p++ {\n\t\t\tif b[0] != rb.byte[p] {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tb = b[1:]\n\t\t}\n\t}\n\treturn true\n}\n\n// IsNormalString returns true if s == f(s).\nfunc (f Form) IsNormalString(s string) bool {\n\tsrc := inputString(s)\n\tft := formTable[f]\n\tbp, ok := ft.quickSpan(src, 0, len(s), true)\n\tif ok {\n\t\treturn true\n\t}\n\trb := reorderBuffer{f: *ft, src: src, nsrc: len(s)}\n\trb.setFlusher(nil, func(rb *reorderBuffer) bool {\n\t\tfor i := 0; i < rb.nrune; i++ {\n\t\t\tinfo := rb.rune[i]\n\t\t\tif bp+int(info.size) > len(s) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tp := info.pos\n\t\t\tpe := p + info.size\n\t\t\tfor ; p < pe; p++ {\n\t\t\t\tif s[bp] != rb.byte[p] {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tbp++\n\t\t\t}\n\t\t}\n\t\treturn true\n\t})\n\tfor bp < len(s) {\n\t\tif bp = decomposeSegment(&rb, bp, true); bp < 0 {\n\t\t\treturn false\n\t\t}\n\t\tbp, _ = rb.f.quickSpan(rb.src, bp, len(s), true)\n\t}\n\treturn true\n}\n\n// patchTail fixes a case where a rune may be incorrectly normalized\n// if it is followed by illegal continuation bytes. It returns the\n// patched buffer and whether the decomposition is still in progress.\nfunc patchTail(rb *reorderBuffer) bool {\n\tinfo, p := lastRuneStart(&rb.f, rb.out)\n\tif p == -1 || info.size == 0 {\n\t\treturn true\n\t}\n\tend := p + int(info.size)\n\textra := len(rb.out) - end\n\tif extra > 0 {\n\t\t// Potentially allocating memory. However, this only\n\t\t// happens with ill-formed UTF-8.\n\t\tx := make([]byte, 0)\n\t\tx = append(x, rb.out[len(rb.out)-extra:]...)\n\t\trb.out = rb.out[:end]\n\t\tdecomposeToLastBoundary(rb)\n\t\trb.doFlush()\n\t\trb.out = append(rb.out, x...)\n\t\treturn false\n\t}\n\tbuf := rb.out[p:]\n\trb.out = rb.out[:p]\n\tdecomposeToLastBoundary(rb)\n\tif s := rb.ss.next(info); s == ssStarter {\n\t\trb.doFlush()\n\t\trb.ss.first(info)\n\t} else if s == ssOverflow {\n\t\trb.doFlush()\n\t\trb.insertCGJ()\n\t\trb.ss = 0\n\t}\n\trb.insertUnsafe(inputBytes(buf), 0, info)\n\treturn true\n}\n\nfunc appendQuick(rb *reorderBuffer, i int) int {\n\tif rb.nsrc == i {\n\t\treturn i\n\t}\n\tend, _ := rb.f.quickSpan(rb.src, i, rb.nsrc, true)\n\trb.out = rb.src.appendSlice(rb.out, i, end)\n\treturn end\n}\n\n// Append returns f(append(out, b...)).\n// The buffer out must be nil, empty, or equal to f(out).\nfunc (f Form) Append(out []byte, src ...byte) []byte {\n\treturn f.doAppend(out, inputBytes(src), len(src))\n}\n\nfunc (f Form) doAppend(out []byte, src input, n int) []byte {\n\tif n == 0 {\n\t\treturn out\n\t}\n\tft := formTable[f]\n\t// Attempt to do a quickSpan first so we can avoid initializing the reorderBuffer.\n\tif len(out) == 0 {\n\t\tp, _ := ft.quickSpan(src, 0, n, true)\n\t\tout = src.appendSlice(out, 0, p)\n\t\tif p == n {\n\t\t\treturn out\n\t\t}\n\t\trb := reorderBuffer{f: *ft, src: src, nsrc: n, out: out, flushF: appendFlush}\n\t\treturn doAppendInner(&rb, p)\n\t}\n\trb := reorderBuffer{f: *ft, src: src, nsrc: n}\n\treturn doAppend(&rb, out, 0)\n}\n\nfunc doAppend(rb *reorderBuffer, out []byte, p int) []byte {\n\trb.setFlusher(out, appendFlush)\n\tsrc, n := rb.src, rb.nsrc\n\tdoMerge := len(out) > 0\n\tif q := src.skipContinuationBytes(p); q > p {\n\t\t// Move leading non-starters to destination.\n\t\trb.out = src.appendSlice(rb.out, p, q)\n\t\tp = q\n\t\tdoMerge = patchTail(rb)\n\t}\n\tfd := &rb.f\n\tif doMerge {\n\t\tvar info Properties\n\t\tif p < n {\n\t\t\tinfo = fd.info(src, p)\n\t\t\tif !info.BoundaryBefore() || info.nLeadingNonStarters() > 0 {\n\t\t\t\tif p == 0 {\n\t\t\t\t\tdecomposeToLastBoundary(rb)\n\t\t\t\t}\n\t\t\t\tp = decomposeSegment(rb, p, true)\n\t\t\t}\n\t\t}\n\t\tif info.size == 0 {\n\t\t\trb.doFlush()\n\t\t\t// Append incomplete UTF-8 encoding.\n\t\t\treturn src.appendSlice(rb.out, p, n)\n\t\t}\n\t\tif rb.nrune > 0 {\n\t\t\treturn doAppendInner(rb, p)\n\t\t}\n\t}\n\tp = appendQuick(rb, p)\n\treturn doAppendInner(rb, p)\n}\n\nfunc doAppendInner(rb *reorderBuffer, p int) []byte {\n\tfor n := rb.nsrc; p < n; {\n\t\tp = decomposeSegment(rb, p, true)\n\t\tp = appendQuick(rb, p)\n\t}\n\treturn rb.out\n}\n\n// AppendString returns f(append(out, []byte(s))).\n// The buffer out must be nil, empty, or equal to f(out).\nfunc (f Form) AppendString(out []byte, src string) []byte {\n\treturn f.doAppend(out, inputString(src), len(src))\n}\n\n// QuickSpan returns a boundary n such that b[0:n] == f(b[0:n]).\n// It is not guaranteed to return the largest such n.\nfunc (f Form) QuickSpan(b []byte) int {\n\tn, _ := formTable[f].quickSpan(inputBytes(b), 0, len(b), true)\n\treturn n\n}\n\n// Span implements transform.SpanningTransformer. It returns a boundary n such\n// that b[0:n] == f(b[0:n]). It is not guaranteed to return the largest such n.\nfunc (f Form) Span(b []byte, atEOF bool) (n int, err error) {\n\tn, ok := formTable[f].quickSpan(inputBytes(b), 0, len(b), atEOF)\n\tif n < len(b) {\n\t\tif !ok {\n\t\t\terr = transform.ErrEndOfSpan\n\t\t} else {\n\t\t\terr = transform.ErrShortSrc\n\t\t}\n\t}\n\treturn n, err\n}\n\n// SpanString returns a boundary n such that s[0:n] == f(s[0:n]).\n// It is not guaranteed to return the largest such n.\nfunc (f Form) SpanString(s string, atEOF bool) (n int, err error) {\n\tn, ok := formTable[f].quickSpan(inputString(s), 0, len(s), atEOF)\n\tif n < len(s) {\n\t\tif !ok {\n\t\t\terr = transform.ErrEndOfSpan\n\t\t} else {\n\t\t\terr = transform.ErrShortSrc\n\t\t}\n\t}\n\treturn n, err\n}\n\n// quickSpan returns a boundary n such that src[0:n] == f(src[0:n]) and\n// whether any non-normalized parts were found. If atEOF is false, n will\n// not point past the last segment if this segment might be become\n// non-normalized by appending other runes.\nfunc (f *formInfo) quickSpan(src input, i, end int, atEOF bool) (n int, ok bool) {\n\tvar lastCC uint8\n\tss := streamSafe(0)\n\tlastSegStart := i\n\tfor n = end; i < n; {\n\t\tif j := src.skipASCII(i, n); i != j {\n\t\t\ti = j\n\t\t\tlastSegStart = i - 1\n\t\t\tlastCC = 0\n\t\t\tss = 0\n\t\t\tcontinue\n\t\t}\n\t\tinfo := f.info(src, i)\n\t\tif info.size == 0 {\n\t\t\tif atEOF {\n\t\t\t\t// include incomplete runes\n\t\t\t\treturn n, true\n\t\t\t}\n\t\t\treturn lastSegStart, true\n\t\t}\n\t\t// This block needs to be before the next, because it is possible to\n\t\t// have an overflow for runes that are starters (e.g. with U+FF9E).\n\t\tswitch ss.next(info) {\n\t\tcase ssStarter:\n\t\t\tlastSegStart = i\n\t\tcase ssOverflow:\n\t\t\treturn lastSegStart, false\n\t\tcase ssSuccess:\n\t\t\tif lastCC > info.ccc {\n\t\t\t\treturn lastSegStart, false\n\t\t\t}\n\t\t}\n\t\tif f.composing {\n\t\t\tif !info.isYesC() {\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\tif !info.isYesD() {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tlastCC = info.ccc\n\t\ti += int(info.size)\n\t}\n\tif i == n {\n\t\tif !atEOF {\n\t\t\tn = lastSegStart\n\t\t}\n\t\treturn n, true\n\t}\n\treturn lastSegStart, false\n}\n\n// QuickSpanString returns a boundary n such that s[0:n] == f(s[0:n]).\n// It is not guaranteed to return the largest such n.\nfunc (f Form) QuickSpanString(s string) int {\n\tn, _ := formTable[f].quickSpan(inputString(s), 0, len(s), true)\n\treturn n\n}\n\n// FirstBoundary returns the position i of the first boundary in b\n// or -1 if b contains no boundary.\nfunc (f Form) FirstBoundary(b []byte) int {\n\treturn f.firstBoundary(inputBytes(b), len(b))\n}\n\nfunc (f Form) firstBoundary(src input, nsrc int) int {\n\ti := src.skipContinuationBytes(0)\n\tif i >= nsrc {\n\t\treturn -1\n\t}\n\tfd := formTable[f]\n\tss := streamSafe(0)\n\t// We should call ss.first here, but we can't as the first rune is\n\t// skipped already. This means FirstBoundary can't really determine\n\t// CGJ insertion points correctly. Luckily it doesn't have to.\n\tfor {\n\t\tinfo := fd.info(src, i)\n\t\tif info.size == 0 {\n\t\t\treturn -1\n\t\t}\n\t\tif s := ss.next(info); s != ssSuccess {\n\t\t\treturn i\n\t\t}\n\t\ti += int(info.size)\n\t\tif i >= nsrc {\n\t\t\tif !info.BoundaryAfter() && !ss.isMax() {\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn nsrc\n\t\t}\n\t}\n}\n\n// FirstBoundaryInString returns the position i of the first boundary in s\n// or -1 if s contains no boundary.\nfunc (f Form) FirstBoundaryInString(s string) int {\n\treturn f.firstBoundary(inputString(s), len(s))\n}\n\n// NextBoundary reports the index of the boundary between the first and next\n// segment in b or -1 if atEOF is false and there are not enough bytes to\n// determine this boundary.\nfunc (f Form) NextBoundary(b []byte, atEOF bool) int {\n\treturn f.nextBoundary(inputBytes(b), len(b), atEOF)\n}\n\n// NextBoundaryInString reports the index of the boundary between the first and\n// next segment in b or -1 if atEOF is false and there are not enough bytes to\n// determine this boundary.\nfunc (f Form) NextBoundaryInString(s string, atEOF bool) int {\n\treturn f.nextBoundary(inputString(s), len(s), atEOF)\n}\n\nfunc (f Form) nextBoundary(src input, nsrc int, atEOF bool) int {\n\tif nsrc == 0 {\n\t\tif atEOF {\n\t\t\treturn 0\n\t\t}\n\t\treturn -1\n\t}\n\tfd := formTable[f]\n\tinfo := fd.info(src, 0)\n\tif info.size == 0 {\n\t\tif atEOF {\n\t\t\treturn 1\n\t\t}\n\t\treturn -1\n\t}\n\tss := streamSafe(0)\n\tss.first(info)\n\n\tfor i := int(info.size); i < nsrc; i += int(info.size) {\n\t\tinfo = fd.info(src, i)\n\t\tif info.size == 0 {\n\t\t\tif atEOF {\n\t\t\t\treturn i\n\t\t\t}\n\t\t\treturn -1\n\t\t}\n\t\t// TODO: Using streamSafe to determine the boundary isn't the same as\n\t\t// using BoundaryBefore. Determine which should be used.\n\t\tif s := ss.next(info); s != ssSuccess {\n\t\t\treturn i\n\t\t}\n\t}\n\tif !atEOF && !info.BoundaryAfter() && !ss.isMax() {\n\t\treturn -1\n\t}\n\treturn nsrc\n}\n\n// LastBoundary returns the position i of the last boundary in b\n// or -1 if b contains no boundary.\nfunc (f Form) LastBoundary(b []byte) int {\n\treturn lastBoundary(formTable[f], b)\n}\n\nfunc lastBoundary(fd *formInfo, b []byte) int {\n\ti := len(b)\n\tinfo, p := lastRuneStart(fd, b)\n\tif p == -1 {\n\t\treturn -1\n\t}\n\tif info.size == 0 { // ends with incomplete rune\n\t\tif p == 0 { // starts with incomplete rune\n\t\t\treturn -1\n\t\t}\n\t\ti = p\n\t\tinfo, p = lastRuneStart(fd, b[:i])\n\t\tif p == -1 { // incomplete UTF-8 encoding or non-starter bytes without a starter\n\t\t\treturn i\n\t\t}\n\t}\n\tif p+int(info.size) != i { // trailing non-starter bytes: illegal UTF-8\n\t\treturn i\n\t}\n\tif info.BoundaryAfter() {\n\t\treturn i\n\t}\n\tss := streamSafe(0)\n\tv := ss.backwards(info)\n\tfor i = p; i >= 0 && v != ssStarter; i = p {\n\t\tinfo, p = lastRuneStart(fd, b[:i])\n\t\tif v = ss.backwards(info); v == ssOverflow {\n\t\t\tbreak\n\t\t}\n\t\tif p+int(info.size) != i {\n\t\t\tif p == -1 { // no boundary found\n\t\t\t\treturn -1\n\t\t\t}\n\t\t\treturn i // boundary after an illegal UTF-8 encoding\n\t\t}\n\t}\n\treturn i\n}\n\n// decomposeSegment scans the first segment in src into rb. It inserts 0x034f\n// (Grapheme Joiner) when it encounters a sequence of more than 30 non-starters\n// and returns the number of bytes consumed from src or iShortDst or iShortSrc.\nfunc decomposeSegment(rb *reorderBuffer, sp int, atEOF bool) int {\n\t// Force one character to be consumed.\n\tinfo := rb.f.info(rb.src, sp)\n\tif info.size == 0 {\n\t\treturn 0\n\t}\n\tif s := rb.ss.next(info); s == ssStarter {\n\t\t// TODO: this could be removed if we don't support merging.\n\t\tif rb.nrune > 0 {\n\t\t\tgoto end\n\t\t}\n\t} else if s == ssOverflow {\n\t\trb.insertCGJ()\n\t\tgoto end\n\t}\n\tif err := rb.insertFlush(rb.src, sp, info); err != iSuccess {\n\t\treturn int(err)\n\t}\n\tfor {\n\t\tsp += int(info.size)\n\t\tif sp >= rb.nsrc {\n\t\t\tif !atEOF && !info.BoundaryAfter() {\n\t\t\t\treturn int(iShortSrc)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tinfo = rb.f.info(rb.src, sp)\n\t\tif info.size == 0 {\n\t\t\tif !atEOF {\n\t\t\t\treturn int(iShortSrc)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tif s := rb.ss.next(info); s == ssStarter {\n\t\t\tbreak\n\t\t} else if s == ssOverflow {\n\t\t\trb.insertCGJ()\n\t\t\tbreak\n\t\t}\n\t\tif err := rb.insertFlush(rb.src, sp, info); err != iSuccess {\n\t\t\treturn int(err)\n\t\t}\n\t}\nend:\n\tif !rb.doFlush() {\n\t\treturn int(iShortDst)\n\t}\n\treturn sp\n}\n\n// lastRuneStart returns the runeInfo and position of the last\n// rune in buf or the zero runeInfo and -1 if no rune was found.\nfunc lastRuneStart(fd *formInfo, buf []byte) (Properties, int) {\n\tp := len(buf) - 1\n\tfor ; p >= 0 && !utf8.RuneStart(buf[p]); p-- {\n\t}\n\tif p < 0 {\n\t\treturn Properties{}, -1\n\t}\n\treturn fd.info(inputBytes(buf), p), p\n}\n\n// decomposeToLastBoundary finds an open segment at the end of the buffer\n// and scans it into rb. Returns the buffer minus the last segment.\nfunc decomposeToLastBoundary(rb *reorderBuffer) {\n\tfd := &rb.f\n\tinfo, i := lastRuneStart(fd, rb.out)\n\tif int(info.size) != len(rb.out)-i {\n\t\t// illegal trailing continuation bytes\n\t\treturn\n\t}\n\tif info.BoundaryAfter() {\n\t\treturn\n\t}\n\tvar add [maxNonStarters + 1]Properties // stores runeInfo in reverse order\n\tpadd := 0\n\tss := streamSafe(0)\n\tp := len(rb.out)\n\tfor {\n\t\tadd[padd] = info\n\t\tv := ss.backwards(info)\n\t\tif v == ssOverflow {\n\t\t\t// Note that if we have an overflow, it the string we are appending to\n\t\t\t// is not correctly normalized. In this case the behavior is undefined.\n\t\t\tbreak\n\t\t}\n\t\tpadd++\n\t\tp -= int(info.size)\n\t\tif v == ssStarter || p < 0 {\n\t\t\tbreak\n\t\t}\n\t\tinfo, i = lastRuneStart(fd, rb.out[:p])\n\t\tif int(info.size) != p-i {\n\t\t\tbreak\n\t\t}\n\t}\n\trb.ss = ss\n\t// Copy bytes for insertion as we may need to overwrite rb.out.\n\tvar buf [maxBufferSize * utf8.UTFMax]byte\n\tcp := buf[:copy(buf[:], rb.out[p:])]\n\trb.out = rb.out[:p]\n\tfor padd--; padd >= 0; padd-- {\n\t\tinfo = add[padd]\n\t\trb.insertUnsafe(inputBytes(cp), 0, info)\n\t\tcp = cp[info.size:]\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/readwriter.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport \"io\"\n\ntype normWriter struct {\n\trb  reorderBuffer\n\tw   io.Writer\n\tbuf []byte\n}\n\n// Write implements the standard write interface.  If the last characters are\n// not at a normalization boundary, the bytes will be buffered for the next\n// write. The remaining bytes will be written on close.\nfunc (w *normWriter) Write(data []byte) (n int, err error) {\n\t// Process data in pieces to keep w.buf size bounded.\n\tconst chunk = 4000\n\n\tfor len(data) > 0 {\n\t\t// Normalize into w.buf.\n\t\tm := len(data)\n\t\tif m > chunk {\n\t\t\tm = chunk\n\t\t}\n\t\tw.rb.src = inputBytes(data[:m])\n\t\tw.rb.nsrc = m\n\t\tw.buf = doAppend(&w.rb, w.buf, 0)\n\t\tdata = data[m:]\n\t\tn += m\n\n\t\t// Write out complete prefix, save remainder.\n\t\t// Note that lastBoundary looks back at most 31 runes.\n\t\ti := lastBoundary(&w.rb.f, w.buf)\n\t\tif i == -1 {\n\t\t\ti = 0\n\t\t}\n\t\tif i > 0 {\n\t\t\tif _, err = w.w.Write(w.buf[:i]); err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tbn := copy(w.buf, w.buf[i:])\n\t\t\tw.buf = w.buf[:bn]\n\t\t}\n\t}\n\treturn n, err\n}\n\n// Close forces data that remains in the buffer to be written.\nfunc (w *normWriter) Close() error {\n\tif len(w.buf) > 0 {\n\t\t_, err := w.w.Write(w.buf)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Writer returns a new writer that implements Write(b)\n// by writing f(b) to w. The returned writer may use an\n// internal buffer to maintain state across Write calls.\n// Calling its Close method writes any buffered data to w.\nfunc (f Form) Writer(w io.Writer) io.WriteCloser {\n\twr := &normWriter{rb: reorderBuffer{}, w: w}\n\twr.rb.init(f, nil)\n\treturn wr\n}\n\ntype normReader struct {\n\trb           reorderBuffer\n\tr            io.Reader\n\tinbuf        []byte\n\toutbuf       []byte\n\tbufStart     int\n\tlastBoundary int\n\terr          error\n}\n\n// Read implements the standard read interface.\nfunc (r *normReader) Read(p []byte) (int, error) {\n\tfor {\n\t\tif r.lastBoundary-r.bufStart > 0 {\n\t\t\tn := copy(p, r.outbuf[r.bufStart:r.lastBoundary])\n\t\t\tr.bufStart += n\n\t\t\tif r.lastBoundary-r.bufStart > 0 {\n\t\t\t\treturn n, nil\n\t\t\t}\n\t\t\treturn n, r.err\n\t\t}\n\t\tif r.err != nil {\n\t\t\treturn 0, r.err\n\t\t}\n\t\toutn := copy(r.outbuf, r.outbuf[r.lastBoundary:])\n\t\tr.outbuf = r.outbuf[0:outn]\n\t\tr.bufStart = 0\n\n\t\tn, err := r.r.Read(r.inbuf)\n\t\tr.rb.src = inputBytes(r.inbuf[0:n])\n\t\tr.rb.nsrc, r.err = n, err\n\t\tif n > 0 {\n\t\t\tr.outbuf = doAppend(&r.rb, r.outbuf, 0)\n\t\t}\n\t\tif err == io.EOF {\n\t\t\tr.lastBoundary = len(r.outbuf)\n\t\t} else {\n\t\t\tr.lastBoundary = lastBoundary(&r.rb.f, r.outbuf)\n\t\t\tif r.lastBoundary == -1 {\n\t\t\t\tr.lastBoundary = 0\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Reader returns a new reader that implements Read\n// by reading data from r and returning f(data).\nfunc (f Form) Reader(r io.Reader) io.Reader {\n\tconst chunk = 4000\n\tbuf := make([]byte, chunk)\n\trr := &normReader{rb: reorderBuffer{}, r: r, inbuf: buf}\n\trr.rb.init(f, buf)\n\treturn rr\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/tables15.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build !go1.27\n\npackage norm\n\nimport \"sync\"\n\nconst (\n\t// Version is the Unicode edition from which the tables are derived.\n\tVersion = \"15.0.0\"\n\n\t// MaxTransformChunkSize indicates the maximum number of bytes that Transform\n\t// may need to write atomically for any Form. Making a destination buffer at\n\t// least this size ensures that Transform can always make progress and that\n\t// the user does not need to grow the buffer on an ErrShortDst.\n\tMaxTransformChunkSize = 35 + maxNonStarters*4\n)\n\nvar ccc = [56]uint8{\n\t0, 1, 6, 7, 8, 9, 10, 11,\n\t12, 13, 14, 15, 16, 17, 18, 19,\n\t20, 21, 22, 23, 24, 25, 26, 27,\n\t28, 29, 30, 31, 32, 33, 34, 35,\n\t36, 84, 91, 103, 107, 118, 122, 129,\n\t130, 132, 202, 214, 216, 218, 220, 222,\n\t224, 226, 228, 230, 232, 233, 234, 240,\n}\n\nconst (\n\tfirstMulti            = 0x199A\n\tfirstCCC              = 0x2DD5\n\tendMulti              = 0x2EBF\n\tfirstLeadingCCC       = 0x4AEF\n\tfirstCCCZeroExcept    = 0x4BB9\n\tfirstStarterWithNLead = 0x4BE0\n\tlastDecomp            = 0x4BE2\n\tmaxDecomp             = 0x8000\n)\n\n// decomps: 19426 bytes\nvar decomps = [...]byte{\n\t// Bytes 0 - 3f\n\t0x00, 0x41, 0x20, 0x41, 0x21, 0x41, 0x22, 0x41,\n\t0x23, 0x41, 0x24, 0x41, 0x25, 0x41, 0x26, 0x41,\n\t0x27, 0x41, 0x28, 0x41, 0x29, 0x41, 0x2A, 0x41,\n\t0x2B, 0x41, 0x2C, 0x41, 0x2D, 0x41, 0x2E, 0x41,\n\t0x2F, 0x41, 0x30, 0x41, 0x31, 0x41, 0x32, 0x41,\n\t0x33, 0x41, 0x34, 0x41, 0x35, 0x41, 0x36, 0x41,\n\t0x37, 0x41, 0x38, 0x41, 0x39, 0x41, 0x3A, 0x41,\n\t0x3B, 0x41, 0x3C, 0x41, 0x3D, 0x41, 0x3E, 0x41,\n\t// Bytes 40 - 7f\n\t0x3F, 0x41, 0x40, 0x41, 0x41, 0x41, 0x42, 0x41,\n\t0x43, 0x41, 0x44, 0x41, 0x45, 0x41, 0x46, 0x41,\n\t0x47, 0x41, 0x48, 0x41, 0x49, 0x41, 0x4A, 0x41,\n\t0x4B, 0x41, 0x4C, 0x41, 0x4D, 0x41, 0x4E, 0x41,\n\t0x4F, 0x41, 0x50, 0x41, 0x51, 0x41, 0x52, 0x41,\n\t0x53, 0x41, 0x54, 0x41, 0x55, 0x41, 0x56, 0x41,\n\t0x57, 0x41, 0x58, 0x41, 0x59, 0x41, 0x5A, 0x41,\n\t0x5B, 0x41, 0x5C, 0x41, 0x5D, 0x41, 0x5E, 0x41,\n\t// Bytes 80 - bf\n\t0x5F, 0x41, 0x60, 0x41, 0x61, 0x41, 0x62, 0x41,\n\t0x63, 0x41, 0x64, 0x41, 0x65, 0x41, 0x66, 0x41,\n\t0x67, 0x41, 0x68, 0x41, 0x69, 0x41, 0x6A, 0x41,\n\t0x6B, 0x41, 0x6C, 0x41, 0x6D, 0x41, 0x6E, 0x41,\n\t0x6F, 0x41, 0x70, 0x41, 0x71, 0x41, 0x72, 0x41,\n\t0x73, 0x41, 0x74, 0x41, 0x75, 0x41, 0x76, 0x41,\n\t0x77, 0x41, 0x78, 0x41, 0x79, 0x41, 0x7A, 0x41,\n\t0x7B, 0x41, 0x7C, 0x41, 0x7D, 0x41, 0x7E, 0x42,\n\t// Bytes c0 - ff\n\t0xC2, 0xA2, 0x42, 0xC2, 0xA3, 0x42, 0xC2, 0xA5,\n\t0x42, 0xC2, 0xA6, 0x42, 0xC2, 0xAC, 0x42, 0xC2,\n\t0xB7, 0x42, 0xC3, 0x86, 0x42, 0xC3, 0xA6, 0x42,\n\t0xC3, 0xB0, 0x42, 0xC3, 0xB8, 0x42, 0xC4, 0xA6,\n\t0x42, 0xC4, 0xA7, 0x42, 0xC4, 0xB1, 0x42, 0xC5,\n\t0x8B, 0x42, 0xC5, 0x93, 0x42, 0xC6, 0x8E, 0x42,\n\t0xC6, 0x90, 0x42, 0xC6, 0xAB, 0x42, 0xC7, 0x80,\n\t0x42, 0xC7, 0x81, 0x42, 0xC7, 0x82, 0x42, 0xC8,\n\t// Bytes 100 - 13f\n\t0xA2, 0x42, 0xC8, 0xB7, 0x42, 0xC9, 0x90, 0x42,\n\t0xC9, 0x91, 0x42, 0xC9, 0x92, 0x42, 0xC9, 0x93,\n\t0x42, 0xC9, 0x94, 0x42, 0xC9, 0x95, 0x42, 0xC9,\n\t0x96, 0x42, 0xC9, 0x97, 0x42, 0xC9, 0x98, 0x42,\n\t0xC9, 0x99, 0x42, 0xC9, 0x9B, 0x42, 0xC9, 0x9C,\n\t0x42, 0xC9, 0x9E, 0x42, 0xC9, 0x9F, 0x42, 0xC9,\n\t0xA0, 0x42, 0xC9, 0xA1, 0x42, 0xC9, 0xA2, 0x42,\n\t0xC9, 0xA3, 0x42, 0xC9, 0xA4, 0x42, 0xC9, 0xA5,\n\t// Bytes 140 - 17f\n\t0x42, 0xC9, 0xA6, 0x42, 0xC9, 0xA7, 0x42, 0xC9,\n\t0xA8, 0x42, 0xC9, 0xA9, 0x42, 0xC9, 0xAA, 0x42,\n\t0xC9, 0xAB, 0x42, 0xC9, 0xAC, 0x42, 0xC9, 0xAD,\n\t0x42, 0xC9, 0xAE, 0x42, 0xC9, 0xAF, 0x42, 0xC9,\n\t0xB0, 0x42, 0xC9, 0xB1, 0x42, 0xC9, 0xB2, 0x42,\n\t0xC9, 0xB3, 0x42, 0xC9, 0xB4, 0x42, 0xC9, 0xB5,\n\t0x42, 0xC9, 0xB6, 0x42, 0xC9, 0xB7, 0x42, 0xC9,\n\t0xB8, 0x42, 0xC9, 0xB9, 0x42, 0xC9, 0xBA, 0x42,\n\t// Bytes 180 - 1bf\n\t0xC9, 0xBB, 0x42, 0xC9, 0xBD, 0x42, 0xC9, 0xBE,\n\t0x42, 0xCA, 0x80, 0x42, 0xCA, 0x81, 0x42, 0xCA,\n\t0x82, 0x42, 0xCA, 0x83, 0x42, 0xCA, 0x84, 0x42,\n\t0xCA, 0x88, 0x42, 0xCA, 0x89, 0x42, 0xCA, 0x8A,\n\t0x42, 0xCA, 0x8B, 0x42, 0xCA, 0x8C, 0x42, 0xCA,\n\t0x8D, 0x42, 0xCA, 0x8E, 0x42, 0xCA, 0x8F, 0x42,\n\t0xCA, 0x90, 0x42, 0xCA, 0x91, 0x42, 0xCA, 0x92,\n\t0x42, 0xCA, 0x95, 0x42, 0xCA, 0x98, 0x42, 0xCA,\n\t// Bytes 1c0 - 1ff\n\t0x99, 0x42, 0xCA, 0x9B, 0x42, 0xCA, 0x9C, 0x42,\n\t0xCA, 0x9D, 0x42, 0xCA, 0x9F, 0x42, 0xCA, 0xA1,\n\t0x42, 0xCA, 0xA2, 0x42, 0xCA, 0xA3, 0x42, 0xCA,\n\t0xA4, 0x42, 0xCA, 0xA5, 0x42, 0xCA, 0xA6, 0x42,\n\t0xCA, 0xA7, 0x42, 0xCA, 0xA8, 0x42, 0xCA, 0xA9,\n\t0x42, 0xCA, 0xAA, 0x42, 0xCA, 0xAB, 0x42, 0xCA,\n\t0xB9, 0x42, 0xCB, 0x90, 0x42, 0xCB, 0x91, 0x42,\n\t0xCE, 0x91, 0x42, 0xCE, 0x92, 0x42, 0xCE, 0x93,\n\t// Bytes 200 - 23f\n\t0x42, 0xCE, 0x94, 0x42, 0xCE, 0x95, 0x42, 0xCE,\n\t0x96, 0x42, 0xCE, 0x97, 0x42, 0xCE, 0x98, 0x42,\n\t0xCE, 0x99, 0x42, 0xCE, 0x9A, 0x42, 0xCE, 0x9B,\n\t0x42, 0xCE, 0x9C, 0x42, 0xCE, 0x9D, 0x42, 0xCE,\n\t0x9E, 0x42, 0xCE, 0x9F, 0x42, 0xCE, 0xA0, 0x42,\n\t0xCE, 0xA1, 0x42, 0xCE, 0xA3, 0x42, 0xCE, 0xA4,\n\t0x42, 0xCE, 0xA5, 0x42, 0xCE, 0xA6, 0x42, 0xCE,\n\t0xA7, 0x42, 0xCE, 0xA8, 0x42, 0xCE, 0xA9, 0x42,\n\t// Bytes 240 - 27f\n\t0xCE, 0xB1, 0x42, 0xCE, 0xB2, 0x42, 0xCE, 0xB3,\n\t0x42, 0xCE, 0xB4, 0x42, 0xCE, 0xB5, 0x42, 0xCE,\n\t0xB6, 0x42, 0xCE, 0xB7, 0x42, 0xCE, 0xB8, 0x42,\n\t0xCE, 0xB9, 0x42, 0xCE, 0xBA, 0x42, 0xCE, 0xBB,\n\t0x42, 0xCE, 0xBC, 0x42, 0xCE, 0xBD, 0x42, 0xCE,\n\t0xBE, 0x42, 0xCE, 0xBF, 0x42, 0xCF, 0x80, 0x42,\n\t0xCF, 0x81, 0x42, 0xCF, 0x82, 0x42, 0xCF, 0x83,\n\t0x42, 0xCF, 0x84, 0x42, 0xCF, 0x85, 0x42, 0xCF,\n\t// Bytes 280 - 2bf\n\t0x86, 0x42, 0xCF, 0x87, 0x42, 0xCF, 0x88, 0x42,\n\t0xCF, 0x89, 0x42, 0xCF, 0x9C, 0x42, 0xCF, 0x9D,\n\t0x42, 0xD0, 0xB0, 0x42, 0xD0, 0xB1, 0x42, 0xD0,\n\t0xB2, 0x42, 0xD0, 0xB3, 0x42, 0xD0, 0xB4, 0x42,\n\t0xD0, 0xB5, 0x42, 0xD0, 0xB6, 0x42, 0xD0, 0xB7,\n\t0x42, 0xD0, 0xB8, 0x42, 0xD0, 0xBA, 0x42, 0xD0,\n\t0xBB, 0x42, 0xD0, 0xBC, 0x42, 0xD0, 0xBD, 0x42,\n\t0xD0, 0xBE, 0x42, 0xD0, 0xBF, 0x42, 0xD1, 0x80,\n\t// Bytes 2c0 - 2ff\n\t0x42, 0xD1, 0x81, 0x42, 0xD1, 0x82, 0x42, 0xD1,\n\t0x83, 0x42, 0xD1, 0x84, 0x42, 0xD1, 0x85, 0x42,\n\t0xD1, 0x86, 0x42, 0xD1, 0x87, 0x42, 0xD1, 0x88,\n\t0x42, 0xD1, 0x8A, 0x42, 0xD1, 0x8B, 0x42, 0xD1,\n\t0x8C, 0x42, 0xD1, 0x8D, 0x42, 0xD1, 0x8E, 0x42,\n\t0xD1, 0x95, 0x42, 0xD1, 0x96, 0x42, 0xD1, 0x98,\n\t0x42, 0xD1, 0x9F, 0x42, 0xD2, 0x91, 0x42, 0xD2,\n\t0xAB, 0x42, 0xD2, 0xAF, 0x42, 0xD2, 0xB1, 0x42,\n\t// Bytes 300 - 33f\n\t0xD3, 0x8F, 0x42, 0xD3, 0x99, 0x42, 0xD3, 0xA9,\n\t0x42, 0xD7, 0x90, 0x42, 0xD7, 0x91, 0x42, 0xD7,\n\t0x92, 0x42, 0xD7, 0x93, 0x42, 0xD7, 0x94, 0x42,\n\t0xD7, 0x9B, 0x42, 0xD7, 0x9C, 0x42, 0xD7, 0x9D,\n\t0x42, 0xD7, 0xA2, 0x42, 0xD7, 0xA8, 0x42, 0xD7,\n\t0xAA, 0x42, 0xD8, 0xA1, 0x42, 0xD8, 0xA7, 0x42,\n\t0xD8, 0xA8, 0x42, 0xD8, 0xA9, 0x42, 0xD8, 0xAA,\n\t0x42, 0xD8, 0xAB, 0x42, 0xD8, 0xAC, 0x42, 0xD8,\n\t// Bytes 340 - 37f\n\t0xAD, 0x42, 0xD8, 0xAE, 0x42, 0xD8, 0xAF, 0x42,\n\t0xD8, 0xB0, 0x42, 0xD8, 0xB1, 0x42, 0xD8, 0xB2,\n\t0x42, 0xD8, 0xB3, 0x42, 0xD8, 0xB4, 0x42, 0xD8,\n\t0xB5, 0x42, 0xD8, 0xB6, 0x42, 0xD8, 0xB7, 0x42,\n\t0xD8, 0xB8, 0x42, 0xD8, 0xB9, 0x42, 0xD8, 0xBA,\n\t0x42, 0xD9, 0x81, 0x42, 0xD9, 0x82, 0x42, 0xD9,\n\t0x83, 0x42, 0xD9, 0x84, 0x42, 0xD9, 0x85, 0x42,\n\t0xD9, 0x86, 0x42, 0xD9, 0x87, 0x42, 0xD9, 0x88,\n\t// Bytes 380 - 3bf\n\t0x42, 0xD9, 0x89, 0x42, 0xD9, 0x8A, 0x42, 0xD9,\n\t0xAE, 0x42, 0xD9, 0xAF, 0x42, 0xD9, 0xB1, 0x42,\n\t0xD9, 0xB9, 0x42, 0xD9, 0xBA, 0x42, 0xD9, 0xBB,\n\t0x42, 0xD9, 0xBE, 0x42, 0xD9, 0xBF, 0x42, 0xDA,\n\t0x80, 0x42, 0xDA, 0x83, 0x42, 0xDA, 0x84, 0x42,\n\t0xDA, 0x86, 0x42, 0xDA, 0x87, 0x42, 0xDA, 0x88,\n\t0x42, 0xDA, 0x8C, 0x42, 0xDA, 0x8D, 0x42, 0xDA,\n\t0x8E, 0x42, 0xDA, 0x91, 0x42, 0xDA, 0x98, 0x42,\n\t// Bytes 3c0 - 3ff\n\t0xDA, 0xA1, 0x42, 0xDA, 0xA4, 0x42, 0xDA, 0xA6,\n\t0x42, 0xDA, 0xA9, 0x42, 0xDA, 0xAD, 0x42, 0xDA,\n\t0xAF, 0x42, 0xDA, 0xB1, 0x42, 0xDA, 0xB3, 0x42,\n\t0xDA, 0xBA, 0x42, 0xDA, 0xBB, 0x42, 0xDA, 0xBE,\n\t0x42, 0xDB, 0x81, 0x42, 0xDB, 0x85, 0x42, 0xDB,\n\t0x86, 0x42, 0xDB, 0x87, 0x42, 0xDB, 0x88, 0x42,\n\t0xDB, 0x89, 0x42, 0xDB, 0x8B, 0x42, 0xDB, 0x8C,\n\t0x42, 0xDB, 0x90, 0x42, 0xDB, 0x92, 0x43, 0xE0,\n\t// Bytes 400 - 43f\n\t0xBC, 0x8B, 0x43, 0xE1, 0x83, 0x9C, 0x43, 0xE1,\n\t0x84, 0x80, 0x43, 0xE1, 0x84, 0x81, 0x43, 0xE1,\n\t0x84, 0x82, 0x43, 0xE1, 0x84, 0x83, 0x43, 0xE1,\n\t0x84, 0x84, 0x43, 0xE1, 0x84, 0x85, 0x43, 0xE1,\n\t0x84, 0x86, 0x43, 0xE1, 0x84, 0x87, 0x43, 0xE1,\n\t0x84, 0x88, 0x43, 0xE1, 0x84, 0x89, 0x43, 0xE1,\n\t0x84, 0x8A, 0x43, 0xE1, 0x84, 0x8B, 0x43, 0xE1,\n\t0x84, 0x8C, 0x43, 0xE1, 0x84, 0x8D, 0x43, 0xE1,\n\t// Bytes 440 - 47f\n\t0x84, 0x8E, 0x43, 0xE1, 0x84, 0x8F, 0x43, 0xE1,\n\t0x84, 0x90, 0x43, 0xE1, 0x84, 0x91, 0x43, 0xE1,\n\t0x84, 0x92, 0x43, 0xE1, 0x84, 0x94, 0x43, 0xE1,\n\t0x84, 0x95, 0x43, 0xE1, 0x84, 0x9A, 0x43, 0xE1,\n\t0x84, 0x9C, 0x43, 0xE1, 0x84, 0x9D, 0x43, 0xE1,\n\t0x84, 0x9E, 0x43, 0xE1, 0x84, 0xA0, 0x43, 0xE1,\n\t0x84, 0xA1, 0x43, 0xE1, 0x84, 0xA2, 0x43, 0xE1,\n\t0x84, 0xA3, 0x43, 0xE1, 0x84, 0xA7, 0x43, 0xE1,\n\t// Bytes 480 - 4bf\n\t0x84, 0xA9, 0x43, 0xE1, 0x84, 0xAB, 0x43, 0xE1,\n\t0x84, 0xAC, 0x43, 0xE1, 0x84, 0xAD, 0x43, 0xE1,\n\t0x84, 0xAE, 0x43, 0xE1, 0x84, 0xAF, 0x43, 0xE1,\n\t0x84, 0xB2, 0x43, 0xE1, 0x84, 0xB6, 0x43, 0xE1,\n\t0x85, 0x80, 0x43, 0xE1, 0x85, 0x87, 0x43, 0xE1,\n\t0x85, 0x8C, 0x43, 0xE1, 0x85, 0x97, 0x43, 0xE1,\n\t0x85, 0x98, 0x43, 0xE1, 0x85, 0x99, 0x43, 0xE1,\n\t0x85, 0xA0, 0x43, 0xE1, 0x86, 0x84, 0x43, 0xE1,\n\t// Bytes 4c0 - 4ff\n\t0x86, 0x85, 0x43, 0xE1, 0x86, 0x88, 0x43, 0xE1,\n\t0x86, 0x91, 0x43, 0xE1, 0x86, 0x92, 0x43, 0xE1,\n\t0x86, 0x94, 0x43, 0xE1, 0x86, 0x9E, 0x43, 0xE1,\n\t0x86, 0xA1, 0x43, 0xE1, 0x87, 0x87, 0x43, 0xE1,\n\t0x87, 0x88, 0x43, 0xE1, 0x87, 0x8C, 0x43, 0xE1,\n\t0x87, 0x8E, 0x43, 0xE1, 0x87, 0x93, 0x43, 0xE1,\n\t0x87, 0x97, 0x43, 0xE1, 0x87, 0x99, 0x43, 0xE1,\n\t0x87, 0x9D, 0x43, 0xE1, 0x87, 0x9F, 0x43, 0xE1,\n\t// Bytes 500 - 53f\n\t0x87, 0xB1, 0x43, 0xE1, 0x87, 0xB2, 0x43, 0xE1,\n\t0xB4, 0x82, 0x43, 0xE1, 0xB4, 0x96, 0x43, 0xE1,\n\t0xB4, 0x97, 0x43, 0xE1, 0xB4, 0x9C, 0x43, 0xE1,\n\t0xB4, 0x9D, 0x43, 0xE1, 0xB4, 0xA5, 0x43, 0xE1,\n\t0xB5, 0xBB, 0x43, 0xE1, 0xB6, 0x85, 0x43, 0xE1,\n\t0xB6, 0x91, 0x43, 0xE2, 0x80, 0x82, 0x43, 0xE2,\n\t0x80, 0x83, 0x43, 0xE2, 0x80, 0x90, 0x43, 0xE2,\n\t0x80, 0x93, 0x43, 0xE2, 0x80, 0x94, 0x43, 0xE2,\n\t// Bytes 540 - 57f\n\t0x82, 0xA9, 0x43, 0xE2, 0x86, 0x90, 0x43, 0xE2,\n\t0x86, 0x91, 0x43, 0xE2, 0x86, 0x92, 0x43, 0xE2,\n\t0x86, 0x93, 0x43, 0xE2, 0x88, 0x82, 0x43, 0xE2,\n\t0x88, 0x87, 0x43, 0xE2, 0x88, 0x91, 0x43, 0xE2,\n\t0x88, 0x92, 0x43, 0xE2, 0x94, 0x82, 0x43, 0xE2,\n\t0x96, 0xA0, 0x43, 0xE2, 0x97, 0x8B, 0x43, 0xE2,\n\t0xA6, 0x85, 0x43, 0xE2, 0xA6, 0x86, 0x43, 0xE2,\n\t0xB1, 0xB1, 0x43, 0xE2, 0xB5, 0xA1, 0x43, 0xE3,\n\t// Bytes 580 - 5bf\n\t0x80, 0x81, 0x43, 0xE3, 0x80, 0x82, 0x43, 0xE3,\n\t0x80, 0x88, 0x43, 0xE3, 0x80, 0x89, 0x43, 0xE3,\n\t0x80, 0x8A, 0x43, 0xE3, 0x80, 0x8B, 0x43, 0xE3,\n\t0x80, 0x8C, 0x43, 0xE3, 0x80, 0x8D, 0x43, 0xE3,\n\t0x80, 0x8E, 0x43, 0xE3, 0x80, 0x8F, 0x43, 0xE3,\n\t0x80, 0x90, 0x43, 0xE3, 0x80, 0x91, 0x43, 0xE3,\n\t0x80, 0x92, 0x43, 0xE3, 0x80, 0x94, 0x43, 0xE3,\n\t0x80, 0x95, 0x43, 0xE3, 0x80, 0x96, 0x43, 0xE3,\n\t// Bytes 5c0 - 5ff\n\t0x80, 0x97, 0x43, 0xE3, 0x82, 0xA1, 0x43, 0xE3,\n\t0x82, 0xA2, 0x43, 0xE3, 0x82, 0xA3, 0x43, 0xE3,\n\t0x82, 0xA4, 0x43, 0xE3, 0x82, 0xA5, 0x43, 0xE3,\n\t0x82, 0xA6, 0x43, 0xE3, 0x82, 0xA7, 0x43, 0xE3,\n\t0x82, 0xA8, 0x43, 0xE3, 0x82, 0xA9, 0x43, 0xE3,\n\t0x82, 0xAA, 0x43, 0xE3, 0x82, 0xAB, 0x43, 0xE3,\n\t0x82, 0xAD, 0x43, 0xE3, 0x82, 0xAF, 0x43, 0xE3,\n\t0x82, 0xB1, 0x43, 0xE3, 0x82, 0xB3, 0x43, 0xE3,\n\t// Bytes 600 - 63f\n\t0x82, 0xB5, 0x43, 0xE3, 0x82, 0xB7, 0x43, 0xE3,\n\t0x82, 0xB9, 0x43, 0xE3, 0x82, 0xBB, 0x43, 0xE3,\n\t0x82, 0xBD, 0x43, 0xE3, 0x82, 0xBF, 0x43, 0xE3,\n\t0x83, 0x81, 0x43, 0xE3, 0x83, 0x83, 0x43, 0xE3,\n\t0x83, 0x84, 0x43, 0xE3, 0x83, 0x86, 0x43, 0xE3,\n\t0x83, 0x88, 0x43, 0xE3, 0x83, 0x8A, 0x43, 0xE3,\n\t0x83, 0x8B, 0x43, 0xE3, 0x83, 0x8C, 0x43, 0xE3,\n\t0x83, 0x8D, 0x43, 0xE3, 0x83, 0x8E, 0x43, 0xE3,\n\t// Bytes 640 - 67f\n\t0x83, 0x8F, 0x43, 0xE3, 0x83, 0x92, 0x43, 0xE3,\n\t0x83, 0x95, 0x43, 0xE3, 0x83, 0x98, 0x43, 0xE3,\n\t0x83, 0x9B, 0x43, 0xE3, 0x83, 0x9E, 0x43, 0xE3,\n\t0x83, 0x9F, 0x43, 0xE3, 0x83, 0xA0, 0x43, 0xE3,\n\t0x83, 0xA1, 0x43, 0xE3, 0x83, 0xA2, 0x43, 0xE3,\n\t0x83, 0xA3, 0x43, 0xE3, 0x83, 0xA4, 0x43, 0xE3,\n\t0x83, 0xA5, 0x43, 0xE3, 0x83, 0xA6, 0x43, 0xE3,\n\t0x83, 0xA7, 0x43, 0xE3, 0x83, 0xA8, 0x43, 0xE3,\n\t// Bytes 680 - 6bf\n\t0x83, 0xA9, 0x43, 0xE3, 0x83, 0xAA, 0x43, 0xE3,\n\t0x83, 0xAB, 0x43, 0xE3, 0x83, 0xAC, 0x43, 0xE3,\n\t0x83, 0xAD, 0x43, 0xE3, 0x83, 0xAF, 0x43, 0xE3,\n\t0x83, 0xB0, 0x43, 0xE3, 0x83, 0xB1, 0x43, 0xE3,\n\t0x83, 0xB2, 0x43, 0xE3, 0x83, 0xB3, 0x43, 0xE3,\n\t0x83, 0xBB, 0x43, 0xE3, 0x83, 0xBC, 0x43, 0xE3,\n\t0x92, 0x9E, 0x43, 0xE3, 0x92, 0xB9, 0x43, 0xE3,\n\t0x92, 0xBB, 0x43, 0xE3, 0x93, 0x9F, 0x43, 0xE3,\n\t// Bytes 6c0 - 6ff\n\t0x94, 0x95, 0x43, 0xE3, 0x9B, 0xAE, 0x43, 0xE3,\n\t0x9B, 0xBC, 0x43, 0xE3, 0x9E, 0x81, 0x43, 0xE3,\n\t0xA0, 0xAF, 0x43, 0xE3, 0xA1, 0xA2, 0x43, 0xE3,\n\t0xA1, 0xBC, 0x43, 0xE3, 0xA3, 0x87, 0x43, 0xE3,\n\t0xA3, 0xA3, 0x43, 0xE3, 0xA4, 0x9C, 0x43, 0xE3,\n\t0xA4, 0xBA, 0x43, 0xE3, 0xA8, 0xAE, 0x43, 0xE3,\n\t0xA9, 0xAC, 0x43, 0xE3, 0xAB, 0xA4, 0x43, 0xE3,\n\t0xAC, 0x88, 0x43, 0xE3, 0xAC, 0x99, 0x43, 0xE3,\n\t// Bytes 700 - 73f\n\t0xAD, 0x89, 0x43, 0xE3, 0xAE, 0x9D, 0x43, 0xE3,\n\t0xB0, 0x98, 0x43, 0xE3, 0xB1, 0x8E, 0x43, 0xE3,\n\t0xB4, 0xB3, 0x43, 0xE3, 0xB6, 0x96, 0x43, 0xE3,\n\t0xBA, 0xAC, 0x43, 0xE3, 0xBA, 0xB8, 0x43, 0xE3,\n\t0xBC, 0x9B, 0x43, 0xE3, 0xBF, 0xBC, 0x43, 0xE4,\n\t0x80, 0x88, 0x43, 0xE4, 0x80, 0x98, 0x43, 0xE4,\n\t0x80, 0xB9, 0x43, 0xE4, 0x81, 0x86, 0x43, 0xE4,\n\t0x82, 0x96, 0x43, 0xE4, 0x83, 0xA3, 0x43, 0xE4,\n\t// Bytes 740 - 77f\n\t0x84, 0xAF, 0x43, 0xE4, 0x88, 0x82, 0x43, 0xE4,\n\t0x88, 0xA7, 0x43, 0xE4, 0x8A, 0xA0, 0x43, 0xE4,\n\t0x8C, 0x81, 0x43, 0xE4, 0x8C, 0xB4, 0x43, 0xE4,\n\t0x8D, 0x99, 0x43, 0xE4, 0x8F, 0x95, 0x43, 0xE4,\n\t0x8F, 0x99, 0x43, 0xE4, 0x90, 0x8B, 0x43, 0xE4,\n\t0x91, 0xAB, 0x43, 0xE4, 0x94, 0xAB, 0x43, 0xE4,\n\t0x95, 0x9D, 0x43, 0xE4, 0x95, 0xA1, 0x43, 0xE4,\n\t0x95, 0xAB, 0x43, 0xE4, 0x97, 0x97, 0x43, 0xE4,\n\t// Bytes 780 - 7bf\n\t0x97, 0xB9, 0x43, 0xE4, 0x98, 0xB5, 0x43, 0xE4,\n\t0x9A, 0xBE, 0x43, 0xE4, 0x9B, 0x87, 0x43, 0xE4,\n\t0xA6, 0x95, 0x43, 0xE4, 0xA7, 0xA6, 0x43, 0xE4,\n\t0xA9, 0xAE, 0x43, 0xE4, 0xA9, 0xB6, 0x43, 0xE4,\n\t0xAA, 0xB2, 0x43, 0xE4, 0xAC, 0xB3, 0x43, 0xE4,\n\t0xAF, 0x8E, 0x43, 0xE4, 0xB3, 0x8E, 0x43, 0xE4,\n\t0xB3, 0xAD, 0x43, 0xE4, 0xB3, 0xB8, 0x43, 0xE4,\n\t0xB5, 0x96, 0x43, 0xE4, 0xB8, 0x80, 0x43, 0xE4,\n\t// Bytes 7c0 - 7ff\n\t0xB8, 0x81, 0x43, 0xE4, 0xB8, 0x83, 0x43, 0xE4,\n\t0xB8, 0x89, 0x43, 0xE4, 0xB8, 0x8A, 0x43, 0xE4,\n\t0xB8, 0x8B, 0x43, 0xE4, 0xB8, 0x8D, 0x43, 0xE4,\n\t0xB8, 0x99, 0x43, 0xE4, 0xB8, 0xA6, 0x43, 0xE4,\n\t0xB8, 0xA8, 0x43, 0xE4, 0xB8, 0xAD, 0x43, 0xE4,\n\t0xB8, 0xB2, 0x43, 0xE4, 0xB8, 0xB6, 0x43, 0xE4,\n\t0xB8, 0xB8, 0x43, 0xE4, 0xB8, 0xB9, 0x43, 0xE4,\n\t0xB8, 0xBD, 0x43, 0xE4, 0xB8, 0xBF, 0x43, 0xE4,\n\t// Bytes 800 - 83f\n\t0xB9, 0x81, 0x43, 0xE4, 0xB9, 0x99, 0x43, 0xE4,\n\t0xB9, 0x9D, 0x43, 0xE4, 0xBA, 0x82, 0x43, 0xE4,\n\t0xBA, 0x85, 0x43, 0xE4, 0xBA, 0x86, 0x43, 0xE4,\n\t0xBA, 0x8C, 0x43, 0xE4, 0xBA, 0x94, 0x43, 0xE4,\n\t0xBA, 0xA0, 0x43, 0xE4, 0xBA, 0xA4, 0x43, 0xE4,\n\t0xBA, 0xAE, 0x43, 0xE4, 0xBA, 0xBA, 0x43, 0xE4,\n\t0xBB, 0x80, 0x43, 0xE4, 0xBB, 0x8C, 0x43, 0xE4,\n\t0xBB, 0xA4, 0x43, 0xE4, 0xBC, 0x81, 0x43, 0xE4,\n\t// Bytes 840 - 87f\n\t0xBC, 0x91, 0x43, 0xE4, 0xBD, 0xA0, 0x43, 0xE4,\n\t0xBE, 0x80, 0x43, 0xE4, 0xBE, 0x86, 0x43, 0xE4,\n\t0xBE, 0x8B, 0x43, 0xE4, 0xBE, 0xAE, 0x43, 0xE4,\n\t0xBE, 0xBB, 0x43, 0xE4, 0xBE, 0xBF, 0x43, 0xE5,\n\t0x80, 0x82, 0x43, 0xE5, 0x80, 0xAB, 0x43, 0xE5,\n\t0x81, 0xBA, 0x43, 0xE5, 0x82, 0x99, 0x43, 0xE5,\n\t0x83, 0x8F, 0x43, 0xE5, 0x83, 0x9A, 0x43, 0xE5,\n\t0x83, 0xA7, 0x43, 0xE5, 0x84, 0xAA, 0x43, 0xE5,\n\t// Bytes 880 - 8bf\n\t0x84, 0xBF, 0x43, 0xE5, 0x85, 0x80, 0x43, 0xE5,\n\t0x85, 0x85, 0x43, 0xE5, 0x85, 0x8D, 0x43, 0xE5,\n\t0x85, 0x94, 0x43, 0xE5, 0x85, 0xA4, 0x43, 0xE5,\n\t0x85, 0xA5, 0x43, 0xE5, 0x85, 0xA7, 0x43, 0xE5,\n\t0x85, 0xA8, 0x43, 0xE5, 0x85, 0xA9, 0x43, 0xE5,\n\t0x85, 0xAB, 0x43, 0xE5, 0x85, 0xAD, 0x43, 0xE5,\n\t0x85, 0xB7, 0x43, 0xE5, 0x86, 0x80, 0x43, 0xE5,\n\t0x86, 0x82, 0x43, 0xE5, 0x86, 0x8D, 0x43, 0xE5,\n\t// Bytes 8c0 - 8ff\n\t0x86, 0x92, 0x43, 0xE5, 0x86, 0x95, 0x43, 0xE5,\n\t0x86, 0x96, 0x43, 0xE5, 0x86, 0x97, 0x43, 0xE5,\n\t0x86, 0x99, 0x43, 0xE5, 0x86, 0xA4, 0x43, 0xE5,\n\t0x86, 0xAB, 0x43, 0xE5, 0x86, 0xAC, 0x43, 0xE5,\n\t0x86, 0xB5, 0x43, 0xE5, 0x86, 0xB7, 0x43, 0xE5,\n\t0x87, 0x89, 0x43, 0xE5, 0x87, 0x8C, 0x43, 0xE5,\n\t0x87, 0x9C, 0x43, 0xE5, 0x87, 0x9E, 0x43, 0xE5,\n\t0x87, 0xA0, 0x43, 0xE5, 0x87, 0xB5, 0x43, 0xE5,\n\t// Bytes 900 - 93f\n\t0x88, 0x80, 0x43, 0xE5, 0x88, 0x83, 0x43, 0xE5,\n\t0x88, 0x87, 0x43, 0xE5, 0x88, 0x97, 0x43, 0xE5,\n\t0x88, 0x9D, 0x43, 0xE5, 0x88, 0xA9, 0x43, 0xE5,\n\t0x88, 0xBA, 0x43, 0xE5, 0x88, 0xBB, 0x43, 0xE5,\n\t0x89, 0x86, 0x43, 0xE5, 0x89, 0x8D, 0x43, 0xE5,\n\t0x89, 0xB2, 0x43, 0xE5, 0x89, 0xB7, 0x43, 0xE5,\n\t0x8A, 0x89, 0x43, 0xE5, 0x8A, 0x9B, 0x43, 0xE5,\n\t0x8A, 0xA3, 0x43, 0xE5, 0x8A, 0xB3, 0x43, 0xE5,\n\t// Bytes 940 - 97f\n\t0x8A, 0xB4, 0x43, 0xE5, 0x8B, 0x87, 0x43, 0xE5,\n\t0x8B, 0x89, 0x43, 0xE5, 0x8B, 0x92, 0x43, 0xE5,\n\t0x8B, 0x9E, 0x43, 0xE5, 0x8B, 0xA4, 0x43, 0xE5,\n\t0x8B, 0xB5, 0x43, 0xE5, 0x8B, 0xB9, 0x43, 0xE5,\n\t0x8B, 0xBA, 0x43, 0xE5, 0x8C, 0x85, 0x43, 0xE5,\n\t0x8C, 0x86, 0x43, 0xE5, 0x8C, 0x95, 0x43, 0xE5,\n\t0x8C, 0x97, 0x43, 0xE5, 0x8C, 0x9A, 0x43, 0xE5,\n\t0x8C, 0xB8, 0x43, 0xE5, 0x8C, 0xBB, 0x43, 0xE5,\n\t// Bytes 980 - 9bf\n\t0x8C, 0xBF, 0x43, 0xE5, 0x8D, 0x81, 0x43, 0xE5,\n\t0x8D, 0x84, 0x43, 0xE5, 0x8D, 0x85, 0x43, 0xE5,\n\t0x8D, 0x89, 0x43, 0xE5, 0x8D, 0x91, 0x43, 0xE5,\n\t0x8D, 0x94, 0x43, 0xE5, 0x8D, 0x9A, 0x43, 0xE5,\n\t0x8D, 0x9C, 0x43, 0xE5, 0x8D, 0xA9, 0x43, 0xE5,\n\t0x8D, 0xB0, 0x43, 0xE5, 0x8D, 0xB3, 0x43, 0xE5,\n\t0x8D, 0xB5, 0x43, 0xE5, 0x8D, 0xBD, 0x43, 0xE5,\n\t0x8D, 0xBF, 0x43, 0xE5, 0x8E, 0x82, 0x43, 0xE5,\n\t// Bytes 9c0 - 9ff\n\t0x8E, 0xB6, 0x43, 0xE5, 0x8F, 0x83, 0x43, 0xE5,\n\t0x8F, 0x88, 0x43, 0xE5, 0x8F, 0x8A, 0x43, 0xE5,\n\t0x8F, 0x8C, 0x43, 0xE5, 0x8F, 0x9F, 0x43, 0xE5,\n\t0x8F, 0xA3, 0x43, 0xE5, 0x8F, 0xA5, 0x43, 0xE5,\n\t0x8F, 0xAB, 0x43, 0xE5, 0x8F, 0xAF, 0x43, 0xE5,\n\t0x8F, 0xB1, 0x43, 0xE5, 0x8F, 0xB3, 0x43, 0xE5,\n\t0x90, 0x86, 0x43, 0xE5, 0x90, 0x88, 0x43, 0xE5,\n\t0x90, 0x8D, 0x43, 0xE5, 0x90, 0x8F, 0x43, 0xE5,\n\t// Bytes a00 - a3f\n\t0x90, 0x9D, 0x43, 0xE5, 0x90, 0xB8, 0x43, 0xE5,\n\t0x90, 0xB9, 0x43, 0xE5, 0x91, 0x82, 0x43, 0xE5,\n\t0x91, 0x88, 0x43, 0xE5, 0x91, 0xA8, 0x43, 0xE5,\n\t0x92, 0x9E, 0x43, 0xE5, 0x92, 0xA2, 0x43, 0xE5,\n\t0x92, 0xBD, 0x43, 0xE5, 0x93, 0xB6, 0x43, 0xE5,\n\t0x94, 0x90, 0x43, 0xE5, 0x95, 0x8F, 0x43, 0xE5,\n\t0x95, 0x93, 0x43, 0xE5, 0x95, 0x95, 0x43, 0xE5,\n\t0x95, 0xA3, 0x43, 0xE5, 0x96, 0x84, 0x43, 0xE5,\n\t// Bytes a40 - a7f\n\t0x96, 0x87, 0x43, 0xE5, 0x96, 0x99, 0x43, 0xE5,\n\t0x96, 0x9D, 0x43, 0xE5, 0x96, 0xAB, 0x43, 0xE5,\n\t0x96, 0xB3, 0x43, 0xE5, 0x96, 0xB6, 0x43, 0xE5,\n\t0x97, 0x80, 0x43, 0xE5, 0x97, 0x82, 0x43, 0xE5,\n\t0x97, 0xA2, 0x43, 0xE5, 0x98, 0x86, 0x43, 0xE5,\n\t0x99, 0x91, 0x43, 0xE5, 0x99, 0xA8, 0x43, 0xE5,\n\t0x99, 0xB4, 0x43, 0xE5, 0x9B, 0x97, 0x43, 0xE5,\n\t0x9B, 0x9B, 0x43, 0xE5, 0x9B, 0xB9, 0x43, 0xE5,\n\t// Bytes a80 - abf\n\t0x9C, 0x96, 0x43, 0xE5, 0x9C, 0x97, 0x43, 0xE5,\n\t0x9C, 0x9F, 0x43, 0xE5, 0x9C, 0xB0, 0x43, 0xE5,\n\t0x9E, 0x8B, 0x43, 0xE5, 0x9F, 0x8E, 0x43, 0xE5,\n\t0x9F, 0xB4, 0x43, 0xE5, 0xA0, 0x8D, 0x43, 0xE5,\n\t0xA0, 0xB1, 0x43, 0xE5, 0xA0, 0xB2, 0x43, 0xE5,\n\t0xA1, 0x80, 0x43, 0xE5, 0xA1, 0x9A, 0x43, 0xE5,\n\t0xA1, 0x9E, 0x43, 0xE5, 0xA2, 0xA8, 0x43, 0xE5,\n\t0xA2, 0xAC, 0x43, 0xE5, 0xA2, 0xB3, 0x43, 0xE5,\n\t// Bytes ac0 - aff\n\t0xA3, 0x98, 0x43, 0xE5, 0xA3, 0x9F, 0x43, 0xE5,\n\t0xA3, 0xAB, 0x43, 0xE5, 0xA3, 0xAE, 0x43, 0xE5,\n\t0xA3, 0xB0, 0x43, 0xE5, 0xA3, 0xB2, 0x43, 0xE5,\n\t0xA3, 0xB7, 0x43, 0xE5, 0xA4, 0x82, 0x43, 0xE5,\n\t0xA4, 0x86, 0x43, 0xE5, 0xA4, 0x8A, 0x43, 0xE5,\n\t0xA4, 0x95, 0x43, 0xE5, 0xA4, 0x9A, 0x43, 0xE5,\n\t0xA4, 0x9C, 0x43, 0xE5, 0xA4, 0xA2, 0x43, 0xE5,\n\t0xA4, 0xA7, 0x43, 0xE5, 0xA4, 0xA9, 0x43, 0xE5,\n\t// Bytes b00 - b3f\n\t0xA5, 0x84, 0x43, 0xE5, 0xA5, 0x88, 0x43, 0xE5,\n\t0xA5, 0x91, 0x43, 0xE5, 0xA5, 0x94, 0x43, 0xE5,\n\t0xA5, 0xA2, 0x43, 0xE5, 0xA5, 0xB3, 0x43, 0xE5,\n\t0xA7, 0x98, 0x43, 0xE5, 0xA7, 0xAC, 0x43, 0xE5,\n\t0xA8, 0x9B, 0x43, 0xE5, 0xA8, 0xA7, 0x43, 0xE5,\n\t0xA9, 0xA2, 0x43, 0xE5, 0xA9, 0xA6, 0x43, 0xE5,\n\t0xAA, 0xB5, 0x43, 0xE5, 0xAC, 0x88, 0x43, 0xE5,\n\t0xAC, 0xA8, 0x43, 0xE5, 0xAC, 0xBE, 0x43, 0xE5,\n\t// Bytes b40 - b7f\n\t0xAD, 0x90, 0x43, 0xE5, 0xAD, 0x97, 0x43, 0xE5,\n\t0xAD, 0xA6, 0x43, 0xE5, 0xAE, 0x80, 0x43, 0xE5,\n\t0xAE, 0x85, 0x43, 0xE5, 0xAE, 0x97, 0x43, 0xE5,\n\t0xAF, 0x83, 0x43, 0xE5, 0xAF, 0x98, 0x43, 0xE5,\n\t0xAF, 0xA7, 0x43, 0xE5, 0xAF, 0xAE, 0x43, 0xE5,\n\t0xAF, 0xB3, 0x43, 0xE5, 0xAF, 0xB8, 0x43, 0xE5,\n\t0xAF, 0xBF, 0x43, 0xE5, 0xB0, 0x86, 0x43, 0xE5,\n\t0xB0, 0x8F, 0x43, 0xE5, 0xB0, 0xA2, 0x43, 0xE5,\n\t// Bytes b80 - bbf\n\t0xB0, 0xB8, 0x43, 0xE5, 0xB0, 0xBF, 0x43, 0xE5,\n\t0xB1, 0xA0, 0x43, 0xE5, 0xB1, 0xA2, 0x43, 0xE5,\n\t0xB1, 0xA4, 0x43, 0xE5, 0xB1, 0xA5, 0x43, 0xE5,\n\t0xB1, 0xAE, 0x43, 0xE5, 0xB1, 0xB1, 0x43, 0xE5,\n\t0xB2, 0x8D, 0x43, 0xE5, 0xB3, 0x80, 0x43, 0xE5,\n\t0xB4, 0x99, 0x43, 0xE5, 0xB5, 0x83, 0x43, 0xE5,\n\t0xB5, 0x90, 0x43, 0xE5, 0xB5, 0xAB, 0x43, 0xE5,\n\t0xB5, 0xAE, 0x43, 0xE5, 0xB5, 0xBC, 0x43, 0xE5,\n\t// Bytes bc0 - bff\n\t0xB6, 0xB2, 0x43, 0xE5, 0xB6, 0xBA, 0x43, 0xE5,\n\t0xB7, 0x9B, 0x43, 0xE5, 0xB7, 0xA1, 0x43, 0xE5,\n\t0xB7, 0xA2, 0x43, 0xE5, 0xB7, 0xA5, 0x43, 0xE5,\n\t0xB7, 0xA6, 0x43, 0xE5, 0xB7, 0xB1, 0x43, 0xE5,\n\t0xB7, 0xBD, 0x43, 0xE5, 0xB7, 0xBE, 0x43, 0xE5,\n\t0xB8, 0xA8, 0x43, 0xE5, 0xB8, 0xBD, 0x43, 0xE5,\n\t0xB9, 0xA9, 0x43, 0xE5, 0xB9, 0xB2, 0x43, 0xE5,\n\t0xB9, 0xB4, 0x43, 0xE5, 0xB9, 0xBA, 0x43, 0xE5,\n\t// Bytes c00 - c3f\n\t0xB9, 0xBC, 0x43, 0xE5, 0xB9, 0xBF, 0x43, 0xE5,\n\t0xBA, 0xA6, 0x43, 0xE5, 0xBA, 0xB0, 0x43, 0xE5,\n\t0xBA, 0xB3, 0x43, 0xE5, 0xBA, 0xB6, 0x43, 0xE5,\n\t0xBB, 0x89, 0x43, 0xE5, 0xBB, 0x8A, 0x43, 0xE5,\n\t0xBB, 0x92, 0x43, 0xE5, 0xBB, 0x93, 0x43, 0xE5,\n\t0xBB, 0x99, 0x43, 0xE5, 0xBB, 0xAC, 0x43, 0xE5,\n\t0xBB, 0xB4, 0x43, 0xE5, 0xBB, 0xBE, 0x43, 0xE5,\n\t0xBC, 0x84, 0x43, 0xE5, 0xBC, 0x8B, 0x43, 0xE5,\n\t// Bytes c40 - c7f\n\t0xBC, 0x93, 0x43, 0xE5, 0xBC, 0xA2, 0x43, 0xE5,\n\t0xBD, 0x90, 0x43, 0xE5, 0xBD, 0x93, 0x43, 0xE5,\n\t0xBD, 0xA1, 0x43, 0xE5, 0xBD, 0xA2, 0x43, 0xE5,\n\t0xBD, 0xA9, 0x43, 0xE5, 0xBD, 0xAB, 0x43, 0xE5,\n\t0xBD, 0xB3, 0x43, 0xE5, 0xBE, 0x8B, 0x43, 0xE5,\n\t0xBE, 0x8C, 0x43, 0xE5, 0xBE, 0x97, 0x43, 0xE5,\n\t0xBE, 0x9A, 0x43, 0xE5, 0xBE, 0xA9, 0x43, 0xE5,\n\t0xBE, 0xAD, 0x43, 0xE5, 0xBF, 0x83, 0x43, 0xE5,\n\t// Bytes c80 - cbf\n\t0xBF, 0x8D, 0x43, 0xE5, 0xBF, 0x97, 0x43, 0xE5,\n\t0xBF, 0xB5, 0x43, 0xE5, 0xBF, 0xB9, 0x43, 0xE6,\n\t0x80, 0x92, 0x43, 0xE6, 0x80, 0x9C, 0x43, 0xE6,\n\t0x81, 0xB5, 0x43, 0xE6, 0x82, 0x81, 0x43, 0xE6,\n\t0x82, 0x94, 0x43, 0xE6, 0x83, 0x87, 0x43, 0xE6,\n\t0x83, 0x98, 0x43, 0xE6, 0x83, 0xA1, 0x43, 0xE6,\n\t0x84, 0x88, 0x43, 0xE6, 0x85, 0x84, 0x43, 0xE6,\n\t0x85, 0x88, 0x43, 0xE6, 0x85, 0x8C, 0x43, 0xE6,\n\t// Bytes cc0 - cff\n\t0x85, 0x8E, 0x43, 0xE6, 0x85, 0xA0, 0x43, 0xE6,\n\t0x85, 0xA8, 0x43, 0xE6, 0x85, 0xBA, 0x43, 0xE6,\n\t0x86, 0x8E, 0x43, 0xE6, 0x86, 0x90, 0x43, 0xE6,\n\t0x86, 0xA4, 0x43, 0xE6, 0x86, 0xAF, 0x43, 0xE6,\n\t0x86, 0xB2, 0x43, 0xE6, 0x87, 0x9E, 0x43, 0xE6,\n\t0x87, 0xB2, 0x43, 0xE6, 0x87, 0xB6, 0x43, 0xE6,\n\t0x88, 0x80, 0x43, 0xE6, 0x88, 0x88, 0x43, 0xE6,\n\t0x88, 0x90, 0x43, 0xE6, 0x88, 0x9B, 0x43, 0xE6,\n\t// Bytes d00 - d3f\n\t0x88, 0xAE, 0x43, 0xE6, 0x88, 0xB4, 0x43, 0xE6,\n\t0x88, 0xB6, 0x43, 0xE6, 0x89, 0x8B, 0x43, 0xE6,\n\t0x89, 0x93, 0x43, 0xE6, 0x89, 0x9D, 0x43, 0xE6,\n\t0x8A, 0x95, 0x43, 0xE6, 0x8A, 0xB1, 0x43, 0xE6,\n\t0x8B, 0x89, 0x43, 0xE6, 0x8B, 0x8F, 0x43, 0xE6,\n\t0x8B, 0x93, 0x43, 0xE6, 0x8B, 0x94, 0x43, 0xE6,\n\t0x8B, 0xBC, 0x43, 0xE6, 0x8B, 0xBE, 0x43, 0xE6,\n\t0x8C, 0x87, 0x43, 0xE6, 0x8C, 0xBD, 0x43, 0xE6,\n\t// Bytes d40 - d7f\n\t0x8D, 0x90, 0x43, 0xE6, 0x8D, 0x95, 0x43, 0xE6,\n\t0x8D, 0xA8, 0x43, 0xE6, 0x8D, 0xBB, 0x43, 0xE6,\n\t0x8E, 0x83, 0x43, 0xE6, 0x8E, 0xA0, 0x43, 0xE6,\n\t0x8E, 0xA9, 0x43, 0xE6, 0x8F, 0x84, 0x43, 0xE6,\n\t0x8F, 0x85, 0x43, 0xE6, 0x8F, 0xA4, 0x43, 0xE6,\n\t0x90, 0x9C, 0x43, 0xE6, 0x90, 0xA2, 0x43, 0xE6,\n\t0x91, 0x92, 0x43, 0xE6, 0x91, 0xA9, 0x43, 0xE6,\n\t0x91, 0xB7, 0x43, 0xE6, 0x91, 0xBE, 0x43, 0xE6,\n\t// Bytes d80 - dbf\n\t0x92, 0x9A, 0x43, 0xE6, 0x92, 0x9D, 0x43, 0xE6,\n\t0x93, 0x84, 0x43, 0xE6, 0x94, 0xAF, 0x43, 0xE6,\n\t0x94, 0xB4, 0x43, 0xE6, 0x95, 0x8F, 0x43, 0xE6,\n\t0x95, 0x96, 0x43, 0xE6, 0x95, 0xAC, 0x43, 0xE6,\n\t0x95, 0xB8, 0x43, 0xE6, 0x96, 0x87, 0x43, 0xE6,\n\t0x96, 0x97, 0x43, 0xE6, 0x96, 0x99, 0x43, 0xE6,\n\t0x96, 0xA4, 0x43, 0xE6, 0x96, 0xB0, 0x43, 0xE6,\n\t0x96, 0xB9, 0x43, 0xE6, 0x97, 0x85, 0x43, 0xE6,\n\t// Bytes dc0 - dff\n\t0x97, 0xA0, 0x43, 0xE6, 0x97, 0xA2, 0x43, 0xE6,\n\t0x97, 0xA3, 0x43, 0xE6, 0x97, 0xA5, 0x43, 0xE6,\n\t0x98, 0x93, 0x43, 0xE6, 0x98, 0xA0, 0x43, 0xE6,\n\t0x99, 0x89, 0x43, 0xE6, 0x99, 0xB4, 0x43, 0xE6,\n\t0x9A, 0x88, 0x43, 0xE6, 0x9A, 0x91, 0x43, 0xE6,\n\t0x9A, 0x9C, 0x43, 0xE6, 0x9A, 0xB4, 0x43, 0xE6,\n\t0x9B, 0x86, 0x43, 0xE6, 0x9B, 0xB0, 0x43, 0xE6,\n\t0x9B, 0xB4, 0x43, 0xE6, 0x9B, 0xB8, 0x43, 0xE6,\n\t// Bytes e00 - e3f\n\t0x9C, 0x80, 0x43, 0xE6, 0x9C, 0x88, 0x43, 0xE6,\n\t0x9C, 0x89, 0x43, 0xE6, 0x9C, 0x97, 0x43, 0xE6,\n\t0x9C, 0x9B, 0x43, 0xE6, 0x9C, 0xA1, 0x43, 0xE6,\n\t0x9C, 0xA8, 0x43, 0xE6, 0x9D, 0x8E, 0x43, 0xE6,\n\t0x9D, 0x93, 0x43, 0xE6, 0x9D, 0x96, 0x43, 0xE6,\n\t0x9D, 0x9E, 0x43, 0xE6, 0x9D, 0xBB, 0x43, 0xE6,\n\t0x9E, 0x85, 0x43, 0xE6, 0x9E, 0x97, 0x43, 0xE6,\n\t0x9F, 0xB3, 0x43, 0xE6, 0x9F, 0xBA, 0x43, 0xE6,\n\t// Bytes e40 - e7f\n\t0xA0, 0x97, 0x43, 0xE6, 0xA0, 0x9F, 0x43, 0xE6,\n\t0xA0, 0xAA, 0x43, 0xE6, 0xA1, 0x92, 0x43, 0xE6,\n\t0xA2, 0x81, 0x43, 0xE6, 0xA2, 0x85, 0x43, 0xE6,\n\t0xA2, 0x8E, 0x43, 0xE6, 0xA2, 0xA8, 0x43, 0xE6,\n\t0xA4, 0x94, 0x43, 0xE6, 0xA5, 0x82, 0x43, 0xE6,\n\t0xA6, 0xA3, 0x43, 0xE6, 0xA7, 0xAA, 0x43, 0xE6,\n\t0xA8, 0x82, 0x43, 0xE6, 0xA8, 0x93, 0x43, 0xE6,\n\t0xAA, 0xA8, 0x43, 0xE6, 0xAB, 0x93, 0x43, 0xE6,\n\t// Bytes e80 - ebf\n\t0xAB, 0x9B, 0x43, 0xE6, 0xAC, 0x84, 0x43, 0xE6,\n\t0xAC, 0xA0, 0x43, 0xE6, 0xAC, 0xA1, 0x43, 0xE6,\n\t0xAD, 0x94, 0x43, 0xE6, 0xAD, 0xA2, 0x43, 0xE6,\n\t0xAD, 0xA3, 0x43, 0xE6, 0xAD, 0xB2, 0x43, 0xE6,\n\t0xAD, 0xB7, 0x43, 0xE6, 0xAD, 0xB9, 0x43, 0xE6,\n\t0xAE, 0x9F, 0x43, 0xE6, 0xAE, 0xAE, 0x43, 0xE6,\n\t0xAE, 0xB3, 0x43, 0xE6, 0xAE, 0xBA, 0x43, 0xE6,\n\t0xAE, 0xBB, 0x43, 0xE6, 0xAF, 0x8B, 0x43, 0xE6,\n\t// Bytes ec0 - eff\n\t0xAF, 0x8D, 0x43, 0xE6, 0xAF, 0x94, 0x43, 0xE6,\n\t0xAF, 0x9B, 0x43, 0xE6, 0xB0, 0x8F, 0x43, 0xE6,\n\t0xB0, 0x94, 0x43, 0xE6, 0xB0, 0xB4, 0x43, 0xE6,\n\t0xB1, 0x8E, 0x43, 0xE6, 0xB1, 0xA7, 0x43, 0xE6,\n\t0xB2, 0x88, 0x43, 0xE6, 0xB2, 0xBF, 0x43, 0xE6,\n\t0xB3, 0x8C, 0x43, 0xE6, 0xB3, 0x8D, 0x43, 0xE6,\n\t0xB3, 0xA5, 0x43, 0xE6, 0xB3, 0xA8, 0x43, 0xE6,\n\t0xB4, 0x96, 0x43, 0xE6, 0xB4, 0x9B, 0x43, 0xE6,\n\t// Bytes f00 - f3f\n\t0xB4, 0x9E, 0x43, 0xE6, 0xB4, 0xB4, 0x43, 0xE6,\n\t0xB4, 0xBE, 0x43, 0xE6, 0xB5, 0x81, 0x43, 0xE6,\n\t0xB5, 0xA9, 0x43, 0xE6, 0xB5, 0xAA, 0x43, 0xE6,\n\t0xB5, 0xB7, 0x43, 0xE6, 0xB5, 0xB8, 0x43, 0xE6,\n\t0xB6, 0x85, 0x43, 0xE6, 0xB7, 0x8B, 0x43, 0xE6,\n\t0xB7, 0x9A, 0x43, 0xE6, 0xB7, 0xAA, 0x43, 0xE6,\n\t0xB7, 0xB9, 0x43, 0xE6, 0xB8, 0x9A, 0x43, 0xE6,\n\t0xB8, 0xAF, 0x43, 0xE6, 0xB9, 0xAE, 0x43, 0xE6,\n\t// Bytes f40 - f7f\n\t0xBA, 0x80, 0x43, 0xE6, 0xBA, 0x9C, 0x43, 0xE6,\n\t0xBA, 0xBA, 0x43, 0xE6, 0xBB, 0x87, 0x43, 0xE6,\n\t0xBB, 0x8B, 0x43, 0xE6, 0xBB, 0x91, 0x43, 0xE6,\n\t0xBB, 0x9B, 0x43, 0xE6, 0xBC, 0x8F, 0x43, 0xE6,\n\t0xBC, 0x94, 0x43, 0xE6, 0xBC, 0xA2, 0x43, 0xE6,\n\t0xBC, 0xA3, 0x43, 0xE6, 0xBD, 0xAE, 0x43, 0xE6,\n\t0xBF, 0x86, 0x43, 0xE6, 0xBF, 0xAB, 0x43, 0xE6,\n\t0xBF, 0xBE, 0x43, 0xE7, 0x80, 0x9B, 0x43, 0xE7,\n\t// Bytes f80 - fbf\n\t0x80, 0x9E, 0x43, 0xE7, 0x80, 0xB9, 0x43, 0xE7,\n\t0x81, 0x8A, 0x43, 0xE7, 0x81, 0xAB, 0x43, 0xE7,\n\t0x81, 0xB0, 0x43, 0xE7, 0x81, 0xB7, 0x43, 0xE7,\n\t0x81, 0xBD, 0x43, 0xE7, 0x82, 0x99, 0x43, 0xE7,\n\t0x82, 0xAD, 0x43, 0xE7, 0x83, 0x88, 0x43, 0xE7,\n\t0x83, 0x99, 0x43, 0xE7, 0x84, 0xA1, 0x43, 0xE7,\n\t0x85, 0x85, 0x43, 0xE7, 0x85, 0x89, 0x43, 0xE7,\n\t0x85, 0xAE, 0x43, 0xE7, 0x86, 0x9C, 0x43, 0xE7,\n\t// Bytes fc0 - fff\n\t0x87, 0x8E, 0x43, 0xE7, 0x87, 0x90, 0x43, 0xE7,\n\t0x88, 0x90, 0x43, 0xE7, 0x88, 0x9B, 0x43, 0xE7,\n\t0x88, 0xA8, 0x43, 0xE7, 0x88, 0xAA, 0x43, 0xE7,\n\t0x88, 0xAB, 0x43, 0xE7, 0x88, 0xB5, 0x43, 0xE7,\n\t0x88, 0xB6, 0x43, 0xE7, 0x88, 0xBB, 0x43, 0xE7,\n\t0x88, 0xBF, 0x43, 0xE7, 0x89, 0x87, 0x43, 0xE7,\n\t0x89, 0x90, 0x43, 0xE7, 0x89, 0x99, 0x43, 0xE7,\n\t0x89, 0x9B, 0x43, 0xE7, 0x89, 0xA2, 0x43, 0xE7,\n\t// Bytes 1000 - 103f\n\t0x89, 0xB9, 0x43, 0xE7, 0x8A, 0x80, 0x43, 0xE7,\n\t0x8A, 0x95, 0x43, 0xE7, 0x8A, 0xAC, 0x43, 0xE7,\n\t0x8A, 0xAF, 0x43, 0xE7, 0x8B, 0x80, 0x43, 0xE7,\n\t0x8B, 0xBC, 0x43, 0xE7, 0x8C, 0xAA, 0x43, 0xE7,\n\t0x8D, 0xB5, 0x43, 0xE7, 0x8D, 0xBA, 0x43, 0xE7,\n\t0x8E, 0x84, 0x43, 0xE7, 0x8E, 0x87, 0x43, 0xE7,\n\t0x8E, 0x89, 0x43, 0xE7, 0x8E, 0x8B, 0x43, 0xE7,\n\t0x8E, 0xA5, 0x43, 0xE7, 0x8E, 0xB2, 0x43, 0xE7,\n\t// Bytes 1040 - 107f\n\t0x8F, 0x9E, 0x43, 0xE7, 0x90, 0x86, 0x43, 0xE7,\n\t0x90, 0x89, 0x43, 0xE7, 0x90, 0xA2, 0x43, 0xE7,\n\t0x91, 0x87, 0x43, 0xE7, 0x91, 0x9C, 0x43, 0xE7,\n\t0x91, 0xA9, 0x43, 0xE7, 0x91, 0xB1, 0x43, 0xE7,\n\t0x92, 0x85, 0x43, 0xE7, 0x92, 0x89, 0x43, 0xE7,\n\t0x92, 0x98, 0x43, 0xE7, 0x93, 0x8A, 0x43, 0xE7,\n\t0x93, 0x9C, 0x43, 0xE7, 0x93, 0xA6, 0x43, 0xE7,\n\t0x94, 0x86, 0x43, 0xE7, 0x94, 0x98, 0x43, 0xE7,\n\t// Bytes 1080 - 10bf\n\t0x94, 0x9F, 0x43, 0xE7, 0x94, 0xA4, 0x43, 0xE7,\n\t0x94, 0xA8, 0x43, 0xE7, 0x94, 0xB0, 0x43, 0xE7,\n\t0x94, 0xB2, 0x43, 0xE7, 0x94, 0xB3, 0x43, 0xE7,\n\t0x94, 0xB7, 0x43, 0xE7, 0x94, 0xBB, 0x43, 0xE7,\n\t0x94, 0xBE, 0x43, 0xE7, 0x95, 0x99, 0x43, 0xE7,\n\t0x95, 0xA5, 0x43, 0xE7, 0x95, 0xB0, 0x43, 0xE7,\n\t0x96, 0x8B, 0x43, 0xE7, 0x96, 0x92, 0x43, 0xE7,\n\t0x97, 0xA2, 0x43, 0xE7, 0x98, 0x90, 0x43, 0xE7,\n\t// Bytes 10c0 - 10ff\n\t0x98, 0x9D, 0x43, 0xE7, 0x98, 0x9F, 0x43, 0xE7,\n\t0x99, 0x82, 0x43, 0xE7, 0x99, 0xA9, 0x43, 0xE7,\n\t0x99, 0xB6, 0x43, 0xE7, 0x99, 0xBD, 0x43, 0xE7,\n\t0x9A, 0xAE, 0x43, 0xE7, 0x9A, 0xBF, 0x43, 0xE7,\n\t0x9B, 0x8A, 0x43, 0xE7, 0x9B, 0x9B, 0x43, 0xE7,\n\t0x9B, 0xA3, 0x43, 0xE7, 0x9B, 0xA7, 0x43, 0xE7,\n\t0x9B, 0xAE, 0x43, 0xE7, 0x9B, 0xB4, 0x43, 0xE7,\n\t0x9C, 0x81, 0x43, 0xE7, 0x9C, 0x9E, 0x43, 0xE7,\n\t// Bytes 1100 - 113f\n\t0x9C, 0x9F, 0x43, 0xE7, 0x9D, 0x80, 0x43, 0xE7,\n\t0x9D, 0x8A, 0x43, 0xE7, 0x9E, 0x8B, 0x43, 0xE7,\n\t0x9E, 0xA7, 0x43, 0xE7, 0x9F, 0x9B, 0x43, 0xE7,\n\t0x9F, 0xA2, 0x43, 0xE7, 0x9F, 0xB3, 0x43, 0xE7,\n\t0xA1, 0x8E, 0x43, 0xE7, 0xA1, 0xAB, 0x43, 0xE7,\n\t0xA2, 0x8C, 0x43, 0xE7, 0xA2, 0x91, 0x43, 0xE7,\n\t0xA3, 0x8A, 0x43, 0xE7, 0xA3, 0x8C, 0x43, 0xE7,\n\t0xA3, 0xBB, 0x43, 0xE7, 0xA4, 0xAA, 0x43, 0xE7,\n\t// Bytes 1140 - 117f\n\t0xA4, 0xBA, 0x43, 0xE7, 0xA4, 0xBC, 0x43, 0xE7,\n\t0xA4, 0xBE, 0x43, 0xE7, 0xA5, 0x88, 0x43, 0xE7,\n\t0xA5, 0x89, 0x43, 0xE7, 0xA5, 0x90, 0x43, 0xE7,\n\t0xA5, 0x96, 0x43, 0xE7, 0xA5, 0x9D, 0x43, 0xE7,\n\t0xA5, 0x9E, 0x43, 0xE7, 0xA5, 0xA5, 0x43, 0xE7,\n\t0xA5, 0xBF, 0x43, 0xE7, 0xA6, 0x81, 0x43, 0xE7,\n\t0xA6, 0x8D, 0x43, 0xE7, 0xA6, 0x8E, 0x43, 0xE7,\n\t0xA6, 0x8F, 0x43, 0xE7, 0xA6, 0xAE, 0x43, 0xE7,\n\t// Bytes 1180 - 11bf\n\t0xA6, 0xB8, 0x43, 0xE7, 0xA6, 0xBE, 0x43, 0xE7,\n\t0xA7, 0x8A, 0x43, 0xE7, 0xA7, 0x98, 0x43, 0xE7,\n\t0xA7, 0xAB, 0x43, 0xE7, 0xA8, 0x9C, 0x43, 0xE7,\n\t0xA9, 0x80, 0x43, 0xE7, 0xA9, 0x8A, 0x43, 0xE7,\n\t0xA9, 0x8F, 0x43, 0xE7, 0xA9, 0xB4, 0x43, 0xE7,\n\t0xA9, 0xBA, 0x43, 0xE7, 0xAA, 0x81, 0x43, 0xE7,\n\t0xAA, 0xB1, 0x43, 0xE7, 0xAB, 0x8B, 0x43, 0xE7,\n\t0xAB, 0xAE, 0x43, 0xE7, 0xAB, 0xB9, 0x43, 0xE7,\n\t// Bytes 11c0 - 11ff\n\t0xAC, 0xA0, 0x43, 0xE7, 0xAE, 0x8F, 0x43, 0xE7,\n\t0xAF, 0x80, 0x43, 0xE7, 0xAF, 0x86, 0x43, 0xE7,\n\t0xAF, 0x89, 0x43, 0xE7, 0xB0, 0xBE, 0x43, 0xE7,\n\t0xB1, 0xA0, 0x43, 0xE7, 0xB1, 0xB3, 0x43, 0xE7,\n\t0xB1, 0xBB, 0x43, 0xE7, 0xB2, 0x92, 0x43, 0xE7,\n\t0xB2, 0xBE, 0x43, 0xE7, 0xB3, 0x92, 0x43, 0xE7,\n\t0xB3, 0x96, 0x43, 0xE7, 0xB3, 0xA3, 0x43, 0xE7,\n\t0xB3, 0xA7, 0x43, 0xE7, 0xB3, 0xA8, 0x43, 0xE7,\n\t// Bytes 1200 - 123f\n\t0xB3, 0xB8, 0x43, 0xE7, 0xB4, 0x80, 0x43, 0xE7,\n\t0xB4, 0x90, 0x43, 0xE7, 0xB4, 0xA2, 0x43, 0xE7,\n\t0xB4, 0xAF, 0x43, 0xE7, 0xB5, 0x82, 0x43, 0xE7,\n\t0xB5, 0x9B, 0x43, 0xE7, 0xB5, 0xA3, 0x43, 0xE7,\n\t0xB6, 0xA0, 0x43, 0xE7, 0xB6, 0xBE, 0x43, 0xE7,\n\t0xB7, 0x87, 0x43, 0xE7, 0xB7, 0xB4, 0x43, 0xE7,\n\t0xB8, 0x82, 0x43, 0xE7, 0xB8, 0x89, 0x43, 0xE7,\n\t0xB8, 0xB7, 0x43, 0xE7, 0xB9, 0x81, 0x43, 0xE7,\n\t// Bytes 1240 - 127f\n\t0xB9, 0x85, 0x43, 0xE7, 0xBC, 0xB6, 0x43, 0xE7,\n\t0xBC, 0xBE, 0x43, 0xE7, 0xBD, 0x91, 0x43, 0xE7,\n\t0xBD, 0xB2, 0x43, 0xE7, 0xBD, 0xB9, 0x43, 0xE7,\n\t0xBD, 0xBA, 0x43, 0xE7, 0xBE, 0x85, 0x43, 0xE7,\n\t0xBE, 0x8A, 0x43, 0xE7, 0xBE, 0x95, 0x43, 0xE7,\n\t0xBE, 0x9A, 0x43, 0xE7, 0xBE, 0xBD, 0x43, 0xE7,\n\t0xBF, 0xBA, 0x43, 0xE8, 0x80, 0x81, 0x43, 0xE8,\n\t0x80, 0x85, 0x43, 0xE8, 0x80, 0x8C, 0x43, 0xE8,\n\t// Bytes 1280 - 12bf\n\t0x80, 0x92, 0x43, 0xE8, 0x80, 0xB3, 0x43, 0xE8,\n\t0x81, 0x86, 0x43, 0xE8, 0x81, 0xA0, 0x43, 0xE8,\n\t0x81, 0xAF, 0x43, 0xE8, 0x81, 0xB0, 0x43, 0xE8,\n\t0x81, 0xBE, 0x43, 0xE8, 0x81, 0xBF, 0x43, 0xE8,\n\t0x82, 0x89, 0x43, 0xE8, 0x82, 0x8B, 0x43, 0xE8,\n\t0x82, 0xAD, 0x43, 0xE8, 0x82, 0xB2, 0x43, 0xE8,\n\t0x84, 0x83, 0x43, 0xE8, 0x84, 0xBE, 0x43, 0xE8,\n\t0x87, 0x98, 0x43, 0xE8, 0x87, 0xA3, 0x43, 0xE8,\n\t// Bytes 12c0 - 12ff\n\t0x87, 0xA8, 0x43, 0xE8, 0x87, 0xAA, 0x43, 0xE8,\n\t0x87, 0xAD, 0x43, 0xE8, 0x87, 0xB3, 0x43, 0xE8,\n\t0x87, 0xBC, 0x43, 0xE8, 0x88, 0x81, 0x43, 0xE8,\n\t0x88, 0x84, 0x43, 0xE8, 0x88, 0x8C, 0x43, 0xE8,\n\t0x88, 0x98, 0x43, 0xE8, 0x88, 0x9B, 0x43, 0xE8,\n\t0x88, 0x9F, 0x43, 0xE8, 0x89, 0xAE, 0x43, 0xE8,\n\t0x89, 0xAF, 0x43, 0xE8, 0x89, 0xB2, 0x43, 0xE8,\n\t0x89, 0xB8, 0x43, 0xE8, 0x89, 0xB9, 0x43, 0xE8,\n\t// Bytes 1300 - 133f\n\t0x8A, 0x8B, 0x43, 0xE8, 0x8A, 0x91, 0x43, 0xE8,\n\t0x8A, 0x9D, 0x43, 0xE8, 0x8A, 0xB1, 0x43, 0xE8,\n\t0x8A, 0xB3, 0x43, 0xE8, 0x8A, 0xBD, 0x43, 0xE8,\n\t0x8B, 0xA5, 0x43, 0xE8, 0x8B, 0xA6, 0x43, 0xE8,\n\t0x8C, 0x9D, 0x43, 0xE8, 0x8C, 0xA3, 0x43, 0xE8,\n\t0x8C, 0xB6, 0x43, 0xE8, 0x8D, 0x92, 0x43, 0xE8,\n\t0x8D, 0x93, 0x43, 0xE8, 0x8D, 0xA3, 0x43, 0xE8,\n\t0x8E, 0xAD, 0x43, 0xE8, 0x8E, 0xBD, 0x43, 0xE8,\n\t// Bytes 1340 - 137f\n\t0x8F, 0x89, 0x43, 0xE8, 0x8F, 0x8A, 0x43, 0xE8,\n\t0x8F, 0x8C, 0x43, 0xE8, 0x8F, 0x9C, 0x43, 0xE8,\n\t0x8F, 0xA7, 0x43, 0xE8, 0x8F, 0xAF, 0x43, 0xE8,\n\t0x8F, 0xB1, 0x43, 0xE8, 0x90, 0xBD, 0x43, 0xE8,\n\t0x91, 0x89, 0x43, 0xE8, 0x91, 0x97, 0x43, 0xE8,\n\t0x93, 0xAE, 0x43, 0xE8, 0x93, 0xB1, 0x43, 0xE8,\n\t0x93, 0xB3, 0x43, 0xE8, 0x93, 0xBC, 0x43, 0xE8,\n\t0x94, 0x96, 0x43, 0xE8, 0x95, 0xA4, 0x43, 0xE8,\n\t// Bytes 1380 - 13bf\n\t0x97, 0x8D, 0x43, 0xE8, 0x97, 0xBA, 0x43, 0xE8,\n\t0x98, 0x86, 0x43, 0xE8, 0x98, 0x92, 0x43, 0xE8,\n\t0x98, 0xAD, 0x43, 0xE8, 0x98, 0xBF, 0x43, 0xE8,\n\t0x99, 0x8D, 0x43, 0xE8, 0x99, 0x90, 0x43, 0xE8,\n\t0x99, 0x9C, 0x43, 0xE8, 0x99, 0xA7, 0x43, 0xE8,\n\t0x99, 0xA9, 0x43, 0xE8, 0x99, 0xAB, 0x43, 0xE8,\n\t0x9A, 0x88, 0x43, 0xE8, 0x9A, 0xA9, 0x43, 0xE8,\n\t0x9B, 0xA2, 0x43, 0xE8, 0x9C, 0x8E, 0x43, 0xE8,\n\t// Bytes 13c0 - 13ff\n\t0x9C, 0xA8, 0x43, 0xE8, 0x9D, 0xAB, 0x43, 0xE8,\n\t0x9D, 0xB9, 0x43, 0xE8, 0x9E, 0x86, 0x43, 0xE8,\n\t0x9E, 0xBA, 0x43, 0xE8, 0x9F, 0xA1, 0x43, 0xE8,\n\t0xA0, 0x81, 0x43, 0xE8, 0xA0, 0x9F, 0x43, 0xE8,\n\t0xA1, 0x80, 0x43, 0xE8, 0xA1, 0x8C, 0x43, 0xE8,\n\t0xA1, 0xA0, 0x43, 0xE8, 0xA1, 0xA3, 0x43, 0xE8,\n\t0xA3, 0x82, 0x43, 0xE8, 0xA3, 0x8F, 0x43, 0xE8,\n\t0xA3, 0x97, 0x43, 0xE8, 0xA3, 0x9E, 0x43, 0xE8,\n\t// Bytes 1400 - 143f\n\t0xA3, 0xA1, 0x43, 0xE8, 0xA3, 0xB8, 0x43, 0xE8,\n\t0xA3, 0xBA, 0x43, 0xE8, 0xA4, 0x90, 0x43, 0xE8,\n\t0xA5, 0x81, 0x43, 0xE8, 0xA5, 0xA4, 0x43, 0xE8,\n\t0xA5, 0xBE, 0x43, 0xE8, 0xA6, 0x86, 0x43, 0xE8,\n\t0xA6, 0x8B, 0x43, 0xE8, 0xA6, 0x96, 0x43, 0xE8,\n\t0xA7, 0x92, 0x43, 0xE8, 0xA7, 0xA3, 0x43, 0xE8,\n\t0xA8, 0x80, 0x43, 0xE8, 0xAA, 0xA0, 0x43, 0xE8,\n\t0xAA, 0xAA, 0x43, 0xE8, 0xAA, 0xBF, 0x43, 0xE8,\n\t// Bytes 1440 - 147f\n\t0xAB, 0x8B, 0x43, 0xE8, 0xAB, 0x92, 0x43, 0xE8,\n\t0xAB, 0x96, 0x43, 0xE8, 0xAB, 0xAD, 0x43, 0xE8,\n\t0xAB, 0xB8, 0x43, 0xE8, 0xAB, 0xBE, 0x43, 0xE8,\n\t0xAC, 0x81, 0x43, 0xE8, 0xAC, 0xB9, 0x43, 0xE8,\n\t0xAD, 0x98, 0x43, 0xE8, 0xAE, 0x80, 0x43, 0xE8,\n\t0xAE, 0x8A, 0x43, 0xE8, 0xB0, 0xB7, 0x43, 0xE8,\n\t0xB1, 0x86, 0x43, 0xE8, 0xB1, 0x88, 0x43, 0xE8,\n\t0xB1, 0x95, 0x43, 0xE8, 0xB1, 0xB8, 0x43, 0xE8,\n\t// Bytes 1480 - 14bf\n\t0xB2, 0x9D, 0x43, 0xE8, 0xB2, 0xA1, 0x43, 0xE8,\n\t0xB2, 0xA9, 0x43, 0xE8, 0xB2, 0xAB, 0x43, 0xE8,\n\t0xB3, 0x81, 0x43, 0xE8, 0xB3, 0x82, 0x43, 0xE8,\n\t0xB3, 0x87, 0x43, 0xE8, 0xB3, 0x88, 0x43, 0xE8,\n\t0xB3, 0x93, 0x43, 0xE8, 0xB4, 0x88, 0x43, 0xE8,\n\t0xB4, 0x9B, 0x43, 0xE8, 0xB5, 0xA4, 0x43, 0xE8,\n\t0xB5, 0xB0, 0x43, 0xE8, 0xB5, 0xB7, 0x43, 0xE8,\n\t0xB6, 0xB3, 0x43, 0xE8, 0xB6, 0xBC, 0x43, 0xE8,\n\t// Bytes 14c0 - 14ff\n\t0xB7, 0x8B, 0x43, 0xE8, 0xB7, 0xAF, 0x43, 0xE8,\n\t0xB7, 0xB0, 0x43, 0xE8, 0xBA, 0xAB, 0x43, 0xE8,\n\t0xBB, 0x8A, 0x43, 0xE8, 0xBB, 0x94, 0x43, 0xE8,\n\t0xBC, 0xA6, 0x43, 0xE8, 0xBC, 0xAA, 0x43, 0xE8,\n\t0xBC, 0xB8, 0x43, 0xE8, 0xBC, 0xBB, 0x43, 0xE8,\n\t0xBD, 0xA2, 0x43, 0xE8, 0xBE, 0x9B, 0x43, 0xE8,\n\t0xBE, 0x9E, 0x43, 0xE8, 0xBE, 0xB0, 0x43, 0xE8,\n\t0xBE, 0xB5, 0x43, 0xE8, 0xBE, 0xB6, 0x43, 0xE9,\n\t// Bytes 1500 - 153f\n\t0x80, 0xA3, 0x43, 0xE9, 0x80, 0xB8, 0x43, 0xE9,\n\t0x81, 0x8A, 0x43, 0xE9, 0x81, 0xA9, 0x43, 0xE9,\n\t0x81, 0xB2, 0x43, 0xE9, 0x81, 0xBC, 0x43, 0xE9,\n\t0x82, 0x8F, 0x43, 0xE9, 0x82, 0x91, 0x43, 0xE9,\n\t0x82, 0x94, 0x43, 0xE9, 0x83, 0x8E, 0x43, 0xE9,\n\t0x83, 0x9E, 0x43, 0xE9, 0x83, 0xB1, 0x43, 0xE9,\n\t0x83, 0xBD, 0x43, 0xE9, 0x84, 0x91, 0x43, 0xE9,\n\t0x84, 0x9B, 0x43, 0xE9, 0x85, 0x89, 0x43, 0xE9,\n\t// Bytes 1540 - 157f\n\t0x85, 0x8D, 0x43, 0xE9, 0x85, 0xAA, 0x43, 0xE9,\n\t0x86, 0x99, 0x43, 0xE9, 0x86, 0xB4, 0x43, 0xE9,\n\t0x87, 0x86, 0x43, 0xE9, 0x87, 0x8C, 0x43, 0xE9,\n\t0x87, 0x8F, 0x43, 0xE9, 0x87, 0x91, 0x43, 0xE9,\n\t0x88, 0xB4, 0x43, 0xE9, 0x88, 0xB8, 0x43, 0xE9,\n\t0x89, 0xB6, 0x43, 0xE9, 0x89, 0xBC, 0x43, 0xE9,\n\t0x8B, 0x97, 0x43, 0xE9, 0x8B, 0x98, 0x43, 0xE9,\n\t0x8C, 0x84, 0x43, 0xE9, 0x8D, 0x8A, 0x43, 0xE9,\n\t// Bytes 1580 - 15bf\n\t0x8F, 0xB9, 0x43, 0xE9, 0x90, 0x95, 0x43, 0xE9,\n\t0x95, 0xB7, 0x43, 0xE9, 0x96, 0x80, 0x43, 0xE9,\n\t0x96, 0x8B, 0x43, 0xE9, 0x96, 0xAD, 0x43, 0xE9,\n\t0x96, 0xB7, 0x43, 0xE9, 0x98, 0x9C, 0x43, 0xE9,\n\t0x98, 0xAE, 0x43, 0xE9, 0x99, 0x8B, 0x43, 0xE9,\n\t0x99, 0x8D, 0x43, 0xE9, 0x99, 0xB5, 0x43, 0xE9,\n\t0x99, 0xB8, 0x43, 0xE9, 0x99, 0xBC, 0x43, 0xE9,\n\t0x9A, 0x86, 0x43, 0xE9, 0x9A, 0xA3, 0x43, 0xE9,\n\t// Bytes 15c0 - 15ff\n\t0x9A, 0xB6, 0x43, 0xE9, 0x9A, 0xB7, 0x43, 0xE9,\n\t0x9A, 0xB8, 0x43, 0xE9, 0x9A, 0xB9, 0x43, 0xE9,\n\t0x9B, 0x83, 0x43, 0xE9, 0x9B, 0xA2, 0x43, 0xE9,\n\t0x9B, 0xA3, 0x43, 0xE9, 0x9B, 0xA8, 0x43, 0xE9,\n\t0x9B, 0xB6, 0x43, 0xE9, 0x9B, 0xB7, 0x43, 0xE9,\n\t0x9C, 0xA3, 0x43, 0xE9, 0x9C, 0xB2, 0x43, 0xE9,\n\t0x9D, 0x88, 0x43, 0xE9, 0x9D, 0x91, 0x43, 0xE9,\n\t0x9D, 0x96, 0x43, 0xE9, 0x9D, 0x9E, 0x43, 0xE9,\n\t// Bytes 1600 - 163f\n\t0x9D, 0xA2, 0x43, 0xE9, 0x9D, 0xA9, 0x43, 0xE9,\n\t0x9F, 0x8B, 0x43, 0xE9, 0x9F, 0x9B, 0x43, 0xE9,\n\t0x9F, 0xA0, 0x43, 0xE9, 0x9F, 0xAD, 0x43, 0xE9,\n\t0x9F, 0xB3, 0x43, 0xE9, 0x9F, 0xBF, 0x43, 0xE9,\n\t0xA0, 0x81, 0x43, 0xE9, 0xA0, 0x85, 0x43, 0xE9,\n\t0xA0, 0x8B, 0x43, 0xE9, 0xA0, 0x98, 0x43, 0xE9,\n\t0xA0, 0xA9, 0x43, 0xE9, 0xA0, 0xBB, 0x43, 0xE9,\n\t0xA1, 0x9E, 0x43, 0xE9, 0xA2, 0xA8, 0x43, 0xE9,\n\t// Bytes 1640 - 167f\n\t0xA3, 0x9B, 0x43, 0xE9, 0xA3, 0x9F, 0x43, 0xE9,\n\t0xA3, 0xA2, 0x43, 0xE9, 0xA3, 0xAF, 0x43, 0xE9,\n\t0xA3, 0xBC, 0x43, 0xE9, 0xA4, 0xA8, 0x43, 0xE9,\n\t0xA4, 0xA9, 0x43, 0xE9, 0xA6, 0x96, 0x43, 0xE9,\n\t0xA6, 0x99, 0x43, 0xE9, 0xA6, 0xA7, 0x43, 0xE9,\n\t0xA6, 0xAC, 0x43, 0xE9, 0xA7, 0x82, 0x43, 0xE9,\n\t0xA7, 0xB1, 0x43, 0xE9, 0xA7, 0xBE, 0x43, 0xE9,\n\t0xA9, 0xAA, 0x43, 0xE9, 0xAA, 0xA8, 0x43, 0xE9,\n\t// Bytes 1680 - 16bf\n\t0xAB, 0x98, 0x43, 0xE9, 0xAB, 0x9F, 0x43, 0xE9,\n\t0xAC, 0x92, 0x43, 0xE9, 0xAC, 0xA5, 0x43, 0xE9,\n\t0xAC, 0xAF, 0x43, 0xE9, 0xAC, 0xB2, 0x43, 0xE9,\n\t0xAC, 0xBC, 0x43, 0xE9, 0xAD, 0x9A, 0x43, 0xE9,\n\t0xAD, 0xAF, 0x43, 0xE9, 0xB1, 0x80, 0x43, 0xE9,\n\t0xB1, 0x97, 0x43, 0xE9, 0xB3, 0xA5, 0x43, 0xE9,\n\t0xB3, 0xBD, 0x43, 0xE9, 0xB5, 0xA7, 0x43, 0xE9,\n\t0xB6, 0xB4, 0x43, 0xE9, 0xB7, 0xBA, 0x43, 0xE9,\n\t// Bytes 16c0 - 16ff\n\t0xB8, 0x9E, 0x43, 0xE9, 0xB9, 0xB5, 0x43, 0xE9,\n\t0xB9, 0xBF, 0x43, 0xE9, 0xBA, 0x97, 0x43, 0xE9,\n\t0xBA, 0x9F, 0x43, 0xE9, 0xBA, 0xA5, 0x43, 0xE9,\n\t0xBA, 0xBB, 0x43, 0xE9, 0xBB, 0x83, 0x43, 0xE9,\n\t0xBB, 0x8D, 0x43, 0xE9, 0xBB, 0x8E, 0x43, 0xE9,\n\t0xBB, 0x91, 0x43, 0xE9, 0xBB, 0xB9, 0x43, 0xE9,\n\t0xBB, 0xBD, 0x43, 0xE9, 0xBB, 0xBE, 0x43, 0xE9,\n\t0xBC, 0x85, 0x43, 0xE9, 0xBC, 0x8E, 0x43, 0xE9,\n\t// Bytes 1700 - 173f\n\t0xBC, 0x8F, 0x43, 0xE9, 0xBC, 0x93, 0x43, 0xE9,\n\t0xBC, 0x96, 0x43, 0xE9, 0xBC, 0xA0, 0x43, 0xE9,\n\t0xBC, 0xBB, 0x43, 0xE9, 0xBD, 0x83, 0x43, 0xE9,\n\t0xBD, 0x8A, 0x43, 0xE9, 0xBD, 0x92, 0x43, 0xE9,\n\t0xBE, 0x8D, 0x43, 0xE9, 0xBE, 0x8E, 0x43, 0xE9,\n\t0xBE, 0x9C, 0x43, 0xE9, 0xBE, 0x9F, 0x43, 0xE9,\n\t0xBE, 0xA0, 0x43, 0xEA, 0x99, 0x91, 0x43, 0xEA,\n\t0x9A, 0x89, 0x43, 0xEA, 0x9C, 0xA7, 0x43, 0xEA,\n\t// Bytes 1740 - 177f\n\t0x9D, 0xAF, 0x43, 0xEA, 0x9E, 0x8E, 0x43, 0xEA,\n\t0xAC, 0xB7, 0x43, 0xEA, 0xAD, 0x92, 0x43, 0xEA,\n\t0xAD, 0xA6, 0x43, 0xEA, 0xAD, 0xA7, 0x44, 0xF0,\n\t0x9D, 0xBC, 0x84, 0x44, 0xF0, 0x9D, 0xBC, 0x85,\n\t0x44, 0xF0, 0x9D, 0xBC, 0x86, 0x44, 0xF0, 0x9D,\n\t0xBC, 0x88, 0x44, 0xF0, 0x9D, 0xBC, 0x8A, 0x44,\n\t0xF0, 0x9D, 0xBC, 0x9E, 0x44, 0xF0, 0xA0, 0x84,\n\t0xA2, 0x44, 0xF0, 0xA0, 0x94, 0x9C, 0x44, 0xF0,\n\t// Bytes 1780 - 17bf\n\t0xA0, 0x94, 0xA5, 0x44, 0xF0, 0xA0, 0x95, 0x8B,\n\t0x44, 0xF0, 0xA0, 0x98, 0xBA, 0x44, 0xF0, 0xA0,\n\t0xA0, 0x84, 0x44, 0xF0, 0xA0, 0xA3, 0x9E, 0x44,\n\t0xF0, 0xA0, 0xA8, 0xAC, 0x44, 0xF0, 0xA0, 0xAD,\n\t0xA3, 0x44, 0xF0, 0xA1, 0x93, 0xA4, 0x44, 0xF0,\n\t0xA1, 0x9A, 0xA8, 0x44, 0xF0, 0xA1, 0x9B, 0xAA,\n\t0x44, 0xF0, 0xA1, 0xA7, 0x88, 0x44, 0xF0, 0xA1,\n\t0xAC, 0x98, 0x44, 0xF0, 0xA1, 0xB4, 0x8B, 0x44,\n\t// Bytes 17c0 - 17ff\n\t0xF0, 0xA1, 0xB7, 0xA4, 0x44, 0xF0, 0xA1, 0xB7,\n\t0xA6, 0x44, 0xF0, 0xA2, 0x86, 0x83, 0x44, 0xF0,\n\t0xA2, 0x86, 0x9F, 0x44, 0xF0, 0xA2, 0x8C, 0xB1,\n\t0x44, 0xF0, 0xA2, 0x9B, 0x94, 0x44, 0xF0, 0xA2,\n\t0xA1, 0x84, 0x44, 0xF0, 0xA2, 0xA1, 0x8A, 0x44,\n\t0xF0, 0xA2, 0xAC, 0x8C, 0x44, 0xF0, 0xA2, 0xAF,\n\t0xB1, 0x44, 0xF0, 0xA3, 0x80, 0x8A, 0x44, 0xF0,\n\t0xA3, 0x8A, 0xB8, 0x44, 0xF0, 0xA3, 0x8D, 0x9F,\n\t// Bytes 1800 - 183f\n\t0x44, 0xF0, 0xA3, 0x8E, 0x93, 0x44, 0xF0, 0xA3,\n\t0x8E, 0x9C, 0x44, 0xF0, 0xA3, 0x8F, 0x83, 0x44,\n\t0xF0, 0xA3, 0x8F, 0x95, 0x44, 0xF0, 0xA3, 0x91,\n\t0xAD, 0x44, 0xF0, 0xA3, 0x9A, 0xA3, 0x44, 0xF0,\n\t0xA3, 0xA2, 0xA7, 0x44, 0xF0, 0xA3, 0xAA, 0x8D,\n\t0x44, 0xF0, 0xA3, 0xAB, 0xBA, 0x44, 0xF0, 0xA3,\n\t0xB2, 0xBC, 0x44, 0xF0, 0xA3, 0xB4, 0x9E, 0x44,\n\t0xF0, 0xA3, 0xBB, 0x91, 0x44, 0xF0, 0xA3, 0xBD,\n\t// Bytes 1840 - 187f\n\t0x9E, 0x44, 0xF0, 0xA3, 0xBE, 0x8E, 0x44, 0xF0,\n\t0xA4, 0x89, 0xA3, 0x44, 0xF0, 0xA4, 0x8B, 0xAE,\n\t0x44, 0xF0, 0xA4, 0x8E, 0xAB, 0x44, 0xF0, 0xA4,\n\t0x98, 0x88, 0x44, 0xF0, 0xA4, 0x9C, 0xB5, 0x44,\n\t0xF0, 0xA4, 0xA0, 0x94, 0x44, 0xF0, 0xA4, 0xB0,\n\t0xB6, 0x44, 0xF0, 0xA4, 0xB2, 0x92, 0x44, 0xF0,\n\t0xA4, 0xBE, 0xA1, 0x44, 0xF0, 0xA4, 0xBE, 0xB8,\n\t0x44, 0xF0, 0xA5, 0x81, 0x84, 0x44, 0xF0, 0xA5,\n\t// Bytes 1880 - 18bf\n\t0x83, 0xB2, 0x44, 0xF0, 0xA5, 0x83, 0xB3, 0x44,\n\t0xF0, 0xA5, 0x84, 0x99, 0x44, 0xF0, 0xA5, 0x84,\n\t0xB3, 0x44, 0xF0, 0xA5, 0x89, 0x89, 0x44, 0xF0,\n\t0xA5, 0x90, 0x9D, 0x44, 0xF0, 0xA5, 0x98, 0xA6,\n\t0x44, 0xF0, 0xA5, 0x9A, 0x9A, 0x44, 0xF0, 0xA5,\n\t0x9B, 0x85, 0x44, 0xF0, 0xA5, 0xA5, 0xBC, 0x44,\n\t0xF0, 0xA5, 0xAA, 0xA7, 0x44, 0xF0, 0xA5, 0xAE,\n\t0xAB, 0x44, 0xF0, 0xA5, 0xB2, 0x80, 0x44, 0xF0,\n\t// Bytes 18c0 - 18ff\n\t0xA5, 0xB3, 0x90, 0x44, 0xF0, 0xA5, 0xBE, 0x86,\n\t0x44, 0xF0, 0xA6, 0x87, 0x9A, 0x44, 0xF0, 0xA6,\n\t0x88, 0xA8, 0x44, 0xF0, 0xA6, 0x89, 0x87, 0x44,\n\t0xF0, 0xA6, 0x8B, 0x99, 0x44, 0xF0, 0xA6, 0x8C,\n\t0xBE, 0x44, 0xF0, 0xA6, 0x93, 0x9A, 0x44, 0xF0,\n\t0xA6, 0x94, 0xA3, 0x44, 0xF0, 0xA6, 0x96, 0xA8,\n\t0x44, 0xF0, 0xA6, 0x9E, 0xA7, 0x44, 0xF0, 0xA6,\n\t0x9E, 0xB5, 0x44, 0xF0, 0xA6, 0xAC, 0xBC, 0x44,\n\t// Bytes 1900 - 193f\n\t0xF0, 0xA6, 0xB0, 0xB6, 0x44, 0xF0, 0xA6, 0xB3,\n\t0x95, 0x44, 0xF0, 0xA6, 0xB5, 0xAB, 0x44, 0xF0,\n\t0xA6, 0xBC, 0xAC, 0x44, 0xF0, 0xA6, 0xBE, 0xB1,\n\t0x44, 0xF0, 0xA7, 0x83, 0x92, 0x44, 0xF0, 0xA7,\n\t0x8F, 0x8A, 0x44, 0xF0, 0xA7, 0x99, 0xA7, 0x44,\n\t0xF0, 0xA7, 0xA2, 0xAE, 0x44, 0xF0, 0xA7, 0xA5,\n\t0xA6, 0x44, 0xF0, 0xA7, 0xB2, 0xA8, 0x44, 0xF0,\n\t0xA7, 0xBB, 0x93, 0x44, 0xF0, 0xA7, 0xBC, 0xAF,\n\t// Bytes 1940 - 197f\n\t0x44, 0xF0, 0xA8, 0x97, 0x92, 0x44, 0xF0, 0xA8,\n\t0x97, 0xAD, 0x44, 0xF0, 0xA8, 0x9C, 0xAE, 0x44,\n\t0xF0, 0xA8, 0xAF, 0xBA, 0x44, 0xF0, 0xA8, 0xB5,\n\t0xB7, 0x44, 0xF0, 0xA9, 0x85, 0x85, 0x44, 0xF0,\n\t0xA9, 0x87, 0x9F, 0x44, 0xF0, 0xA9, 0x88, 0x9A,\n\t0x44, 0xF0, 0xA9, 0x90, 0x8A, 0x44, 0xF0, 0xA9,\n\t0x92, 0x96, 0x44, 0xF0, 0xA9, 0x96, 0xB6, 0x44,\n\t0xF0, 0xA9, 0xAC, 0xB0, 0x44, 0xF0, 0xAA, 0x83,\n\t// Bytes 1980 - 19bf\n\t0x8E, 0x44, 0xF0, 0xAA, 0x84, 0x85, 0x44, 0xF0,\n\t0xAA, 0x88, 0x8E, 0x44, 0xF0, 0xAA, 0x8A, 0x91,\n\t0x44, 0xF0, 0xAA, 0x8E, 0x92, 0x44, 0xF0, 0xAA,\n\t0x98, 0x80, 0x42, 0x21, 0x21, 0x42, 0x21, 0x3F,\n\t0x42, 0x2E, 0x2E, 0x42, 0x30, 0x2C, 0x42, 0x30,\n\t0x2E, 0x42, 0x31, 0x2C, 0x42, 0x31, 0x2E, 0x42,\n\t0x31, 0x30, 0x42, 0x31, 0x31, 0x42, 0x31, 0x32,\n\t0x42, 0x31, 0x33, 0x42, 0x31, 0x34, 0x42, 0x31,\n\t// Bytes 19c0 - 19ff\n\t0x35, 0x42, 0x31, 0x36, 0x42, 0x31, 0x37, 0x42,\n\t0x31, 0x38, 0x42, 0x31, 0x39, 0x42, 0x32, 0x2C,\n\t0x42, 0x32, 0x2E, 0x42, 0x32, 0x30, 0x42, 0x32,\n\t0x31, 0x42, 0x32, 0x32, 0x42, 0x32, 0x33, 0x42,\n\t0x32, 0x34, 0x42, 0x32, 0x35, 0x42, 0x32, 0x36,\n\t0x42, 0x32, 0x37, 0x42, 0x32, 0x38, 0x42, 0x32,\n\t0x39, 0x42, 0x33, 0x2C, 0x42, 0x33, 0x2E, 0x42,\n\t0x33, 0x30, 0x42, 0x33, 0x31, 0x42, 0x33, 0x32,\n\t// Bytes 1a00 - 1a3f\n\t0x42, 0x33, 0x33, 0x42, 0x33, 0x34, 0x42, 0x33,\n\t0x35, 0x42, 0x33, 0x36, 0x42, 0x33, 0x37, 0x42,\n\t0x33, 0x38, 0x42, 0x33, 0x39, 0x42, 0x34, 0x2C,\n\t0x42, 0x34, 0x2E, 0x42, 0x34, 0x30, 0x42, 0x34,\n\t0x31, 0x42, 0x34, 0x32, 0x42, 0x34, 0x33, 0x42,\n\t0x34, 0x34, 0x42, 0x34, 0x35, 0x42, 0x34, 0x36,\n\t0x42, 0x34, 0x37, 0x42, 0x34, 0x38, 0x42, 0x34,\n\t0x39, 0x42, 0x35, 0x2C, 0x42, 0x35, 0x2E, 0x42,\n\t// Bytes 1a40 - 1a7f\n\t0x35, 0x30, 0x42, 0x36, 0x2C, 0x42, 0x36, 0x2E,\n\t0x42, 0x37, 0x2C, 0x42, 0x37, 0x2E, 0x42, 0x38,\n\t0x2C, 0x42, 0x38, 0x2E, 0x42, 0x39, 0x2C, 0x42,\n\t0x39, 0x2E, 0x42, 0x3D, 0x3D, 0x42, 0x3F, 0x21,\n\t0x42, 0x3F, 0x3F, 0x42, 0x41, 0x55, 0x42, 0x42,\n\t0x71, 0x42, 0x43, 0x44, 0x42, 0x44, 0x4A, 0x42,\n\t0x44, 0x5A, 0x42, 0x44, 0x7A, 0x42, 0x47, 0x42,\n\t0x42, 0x47, 0x79, 0x42, 0x48, 0x50, 0x42, 0x48,\n\t// Bytes 1a80 - 1abf\n\t0x56, 0x42, 0x48, 0x67, 0x42, 0x48, 0x7A, 0x42,\n\t0x49, 0x49, 0x42, 0x49, 0x4A, 0x42, 0x49, 0x55,\n\t0x42, 0x49, 0x56, 0x42, 0x49, 0x58, 0x42, 0x4B,\n\t0x42, 0x42, 0x4B, 0x4B, 0x42, 0x4B, 0x4D, 0x42,\n\t0x4C, 0x4A, 0x42, 0x4C, 0x6A, 0x42, 0x4D, 0x42,\n\t0x42, 0x4D, 0x43, 0x42, 0x4D, 0x44, 0x42, 0x4D,\n\t0x52, 0x42, 0x4D, 0x56, 0x42, 0x4D, 0x57, 0x42,\n\t0x4E, 0x4A, 0x42, 0x4E, 0x6A, 0x42, 0x4E, 0x6F,\n\t// Bytes 1ac0 - 1aff\n\t0x42, 0x50, 0x48, 0x42, 0x50, 0x52, 0x42, 0x50,\n\t0x61, 0x42, 0x52, 0x73, 0x42, 0x53, 0x44, 0x42,\n\t0x53, 0x4D, 0x42, 0x53, 0x53, 0x42, 0x53, 0x76,\n\t0x42, 0x54, 0x4D, 0x42, 0x56, 0x49, 0x42, 0x57,\n\t0x43, 0x42, 0x57, 0x5A, 0x42, 0x57, 0x62, 0x42,\n\t0x58, 0x49, 0x42, 0x63, 0x63, 0x42, 0x63, 0x64,\n\t0x42, 0x63, 0x6D, 0x42, 0x64, 0x42, 0x42, 0x64,\n\t0x61, 0x42, 0x64, 0x6C, 0x42, 0x64, 0x6D, 0x42,\n\t// Bytes 1b00 - 1b3f\n\t0x64, 0x7A, 0x42, 0x65, 0x56, 0x42, 0x66, 0x66,\n\t0x42, 0x66, 0x69, 0x42, 0x66, 0x6C, 0x42, 0x66,\n\t0x6D, 0x42, 0x68, 0x61, 0x42, 0x69, 0x69, 0x42,\n\t0x69, 0x6A, 0x42, 0x69, 0x6E, 0x42, 0x69, 0x76,\n\t0x42, 0x69, 0x78, 0x42, 0x6B, 0x41, 0x42, 0x6B,\n\t0x56, 0x42, 0x6B, 0x57, 0x42, 0x6B, 0x67, 0x42,\n\t0x6B, 0x6C, 0x42, 0x6B, 0x6D, 0x42, 0x6B, 0x74,\n\t0x42, 0x6C, 0x6A, 0x42, 0x6C, 0x6D, 0x42, 0x6C,\n\t// Bytes 1b40 - 1b7f\n\t0x6E, 0x42, 0x6C, 0x78, 0x42, 0x6D, 0x32, 0x42,\n\t0x6D, 0x33, 0x42, 0x6D, 0x41, 0x42, 0x6D, 0x56,\n\t0x42, 0x6D, 0x57, 0x42, 0x6D, 0x62, 0x42, 0x6D,\n\t0x67, 0x42, 0x6D, 0x6C, 0x42, 0x6D, 0x6D, 0x42,\n\t0x6D, 0x73, 0x42, 0x6E, 0x41, 0x42, 0x6E, 0x46,\n\t0x42, 0x6E, 0x56, 0x42, 0x6E, 0x57, 0x42, 0x6E,\n\t0x6A, 0x42, 0x6E, 0x6D, 0x42, 0x6E, 0x73, 0x42,\n\t0x6F, 0x56, 0x42, 0x70, 0x41, 0x42, 0x70, 0x46,\n\t// Bytes 1b80 - 1bbf\n\t0x42, 0x70, 0x56, 0x42, 0x70, 0x57, 0x42, 0x70,\n\t0x63, 0x42, 0x70, 0x73, 0x42, 0x73, 0x72, 0x42,\n\t0x73, 0x74, 0x42, 0x76, 0x69, 0x42, 0x78, 0x69,\n\t0x43, 0x28, 0x31, 0x29, 0x43, 0x28, 0x32, 0x29,\n\t0x43, 0x28, 0x33, 0x29, 0x43, 0x28, 0x34, 0x29,\n\t0x43, 0x28, 0x35, 0x29, 0x43, 0x28, 0x36, 0x29,\n\t0x43, 0x28, 0x37, 0x29, 0x43, 0x28, 0x38, 0x29,\n\t0x43, 0x28, 0x39, 0x29, 0x43, 0x28, 0x41, 0x29,\n\t// Bytes 1bc0 - 1bff\n\t0x43, 0x28, 0x42, 0x29, 0x43, 0x28, 0x43, 0x29,\n\t0x43, 0x28, 0x44, 0x29, 0x43, 0x28, 0x45, 0x29,\n\t0x43, 0x28, 0x46, 0x29, 0x43, 0x28, 0x47, 0x29,\n\t0x43, 0x28, 0x48, 0x29, 0x43, 0x28, 0x49, 0x29,\n\t0x43, 0x28, 0x4A, 0x29, 0x43, 0x28, 0x4B, 0x29,\n\t0x43, 0x28, 0x4C, 0x29, 0x43, 0x28, 0x4D, 0x29,\n\t0x43, 0x28, 0x4E, 0x29, 0x43, 0x28, 0x4F, 0x29,\n\t0x43, 0x28, 0x50, 0x29, 0x43, 0x28, 0x51, 0x29,\n\t// Bytes 1c00 - 1c3f\n\t0x43, 0x28, 0x52, 0x29, 0x43, 0x28, 0x53, 0x29,\n\t0x43, 0x28, 0x54, 0x29, 0x43, 0x28, 0x55, 0x29,\n\t0x43, 0x28, 0x56, 0x29, 0x43, 0x28, 0x57, 0x29,\n\t0x43, 0x28, 0x58, 0x29, 0x43, 0x28, 0x59, 0x29,\n\t0x43, 0x28, 0x5A, 0x29, 0x43, 0x28, 0x61, 0x29,\n\t0x43, 0x28, 0x62, 0x29, 0x43, 0x28, 0x63, 0x29,\n\t0x43, 0x28, 0x64, 0x29, 0x43, 0x28, 0x65, 0x29,\n\t0x43, 0x28, 0x66, 0x29, 0x43, 0x28, 0x67, 0x29,\n\t// Bytes 1c40 - 1c7f\n\t0x43, 0x28, 0x68, 0x29, 0x43, 0x28, 0x69, 0x29,\n\t0x43, 0x28, 0x6A, 0x29, 0x43, 0x28, 0x6B, 0x29,\n\t0x43, 0x28, 0x6C, 0x29, 0x43, 0x28, 0x6D, 0x29,\n\t0x43, 0x28, 0x6E, 0x29, 0x43, 0x28, 0x6F, 0x29,\n\t0x43, 0x28, 0x70, 0x29, 0x43, 0x28, 0x71, 0x29,\n\t0x43, 0x28, 0x72, 0x29, 0x43, 0x28, 0x73, 0x29,\n\t0x43, 0x28, 0x74, 0x29, 0x43, 0x28, 0x75, 0x29,\n\t0x43, 0x28, 0x76, 0x29, 0x43, 0x28, 0x77, 0x29,\n\t// Bytes 1c80 - 1cbf\n\t0x43, 0x28, 0x78, 0x29, 0x43, 0x28, 0x79, 0x29,\n\t0x43, 0x28, 0x7A, 0x29, 0x43, 0x2E, 0x2E, 0x2E,\n\t0x43, 0x31, 0x30, 0x2E, 0x43, 0x31, 0x31, 0x2E,\n\t0x43, 0x31, 0x32, 0x2E, 0x43, 0x31, 0x33, 0x2E,\n\t0x43, 0x31, 0x34, 0x2E, 0x43, 0x31, 0x35, 0x2E,\n\t0x43, 0x31, 0x36, 0x2E, 0x43, 0x31, 0x37, 0x2E,\n\t0x43, 0x31, 0x38, 0x2E, 0x43, 0x31, 0x39, 0x2E,\n\t0x43, 0x32, 0x30, 0x2E, 0x43, 0x3A, 0x3A, 0x3D,\n\t// Bytes 1cc0 - 1cff\n\t0x43, 0x3D, 0x3D, 0x3D, 0x43, 0x43, 0x6F, 0x2E,\n\t0x43, 0x46, 0x41, 0x58, 0x43, 0x47, 0x48, 0x7A,\n\t0x43, 0x47, 0x50, 0x61, 0x43, 0x49, 0x49, 0x49,\n\t0x43, 0x4C, 0x54, 0x44, 0x43, 0x4C, 0xC2, 0xB7,\n\t0x43, 0x4D, 0x48, 0x7A, 0x43, 0x4D, 0x50, 0x61,\n\t0x43, 0x4D, 0xCE, 0xA9, 0x43, 0x50, 0x50, 0x4D,\n\t0x43, 0x50, 0x50, 0x56, 0x43, 0x50, 0x54, 0x45,\n\t0x43, 0x54, 0x45, 0x4C, 0x43, 0x54, 0x48, 0x7A,\n\t// Bytes 1d00 - 1d3f\n\t0x43, 0x56, 0x49, 0x49, 0x43, 0x58, 0x49, 0x49,\n\t0x43, 0x61, 0x2F, 0x63, 0x43, 0x61, 0x2F, 0x73,\n\t0x43, 0x61, 0xCA, 0xBE, 0x43, 0x62, 0x61, 0x72,\n\t0x43, 0x63, 0x2F, 0x6F, 0x43, 0x63, 0x2F, 0x75,\n\t0x43, 0x63, 0x61, 0x6C, 0x43, 0x63, 0x6D, 0x32,\n\t0x43, 0x63, 0x6D, 0x33, 0x43, 0x64, 0x6D, 0x32,\n\t0x43, 0x64, 0x6D, 0x33, 0x43, 0x65, 0x72, 0x67,\n\t0x43, 0x66, 0x66, 0x69, 0x43, 0x66, 0x66, 0x6C,\n\t// Bytes 1d40 - 1d7f\n\t0x43, 0x67, 0x61, 0x6C, 0x43, 0x68, 0x50, 0x61,\n\t0x43, 0x69, 0x69, 0x69, 0x43, 0x6B, 0x48, 0x7A,\n\t0x43, 0x6B, 0x50, 0x61, 0x43, 0x6B, 0x6D, 0x32,\n\t0x43, 0x6B, 0x6D, 0x33, 0x43, 0x6B, 0xCE, 0xA9,\n\t0x43, 0x6C, 0x6F, 0x67, 0x43, 0x6C, 0xC2, 0xB7,\n\t0x43, 0x6D, 0x69, 0x6C, 0x43, 0x6D, 0x6D, 0x32,\n\t0x43, 0x6D, 0x6D, 0x33, 0x43, 0x6D, 0x6F, 0x6C,\n\t0x43, 0x72, 0x61, 0x64, 0x43, 0x76, 0x69, 0x69,\n\t// Bytes 1d80 - 1dbf\n\t0x43, 0x78, 0x69, 0x69, 0x43, 0xC2, 0xB0, 0x43,\n\t0x43, 0xC2, 0xB0, 0x46, 0x43, 0xCA, 0xBC, 0x6E,\n\t0x43, 0xCE, 0xBC, 0x41, 0x43, 0xCE, 0xBC, 0x46,\n\t0x43, 0xCE, 0xBC, 0x56, 0x43, 0xCE, 0xBC, 0x57,\n\t0x43, 0xCE, 0xBC, 0x67, 0x43, 0xCE, 0xBC, 0x6C,\n\t0x43, 0xCE, 0xBC, 0x6D, 0x43, 0xCE, 0xBC, 0x73,\n\t0x44, 0x28, 0x31, 0x30, 0x29, 0x44, 0x28, 0x31,\n\t0x31, 0x29, 0x44, 0x28, 0x31, 0x32, 0x29, 0x44,\n\t// Bytes 1dc0 - 1dff\n\t0x28, 0x31, 0x33, 0x29, 0x44, 0x28, 0x31, 0x34,\n\t0x29, 0x44, 0x28, 0x31, 0x35, 0x29, 0x44, 0x28,\n\t0x31, 0x36, 0x29, 0x44, 0x28, 0x31, 0x37, 0x29,\n\t0x44, 0x28, 0x31, 0x38, 0x29, 0x44, 0x28, 0x31,\n\t0x39, 0x29, 0x44, 0x28, 0x32, 0x30, 0x29, 0x44,\n\t0x30, 0xE7, 0x82, 0xB9, 0x44, 0x31, 0xE2, 0x81,\n\t0x84, 0x44, 0x31, 0xE6, 0x97, 0xA5, 0x44, 0x31,\n\t0xE6, 0x9C, 0x88, 0x44, 0x31, 0xE7, 0x82, 0xB9,\n\t// Bytes 1e00 - 1e3f\n\t0x44, 0x32, 0xE6, 0x97, 0xA5, 0x44, 0x32, 0xE6,\n\t0x9C, 0x88, 0x44, 0x32, 0xE7, 0x82, 0xB9, 0x44,\n\t0x33, 0xE6, 0x97, 0xA5, 0x44, 0x33, 0xE6, 0x9C,\n\t0x88, 0x44, 0x33, 0xE7, 0x82, 0xB9, 0x44, 0x34,\n\t0xE6, 0x97, 0xA5, 0x44, 0x34, 0xE6, 0x9C, 0x88,\n\t0x44, 0x34, 0xE7, 0x82, 0xB9, 0x44, 0x35, 0xE6,\n\t0x97, 0xA5, 0x44, 0x35, 0xE6, 0x9C, 0x88, 0x44,\n\t0x35, 0xE7, 0x82, 0xB9, 0x44, 0x36, 0xE6, 0x97,\n\t// Bytes 1e40 - 1e7f\n\t0xA5, 0x44, 0x36, 0xE6, 0x9C, 0x88, 0x44, 0x36,\n\t0xE7, 0x82, 0xB9, 0x44, 0x37, 0xE6, 0x97, 0xA5,\n\t0x44, 0x37, 0xE6, 0x9C, 0x88, 0x44, 0x37, 0xE7,\n\t0x82, 0xB9, 0x44, 0x38, 0xE6, 0x97, 0xA5, 0x44,\n\t0x38, 0xE6, 0x9C, 0x88, 0x44, 0x38, 0xE7, 0x82,\n\t0xB9, 0x44, 0x39, 0xE6, 0x97, 0xA5, 0x44, 0x39,\n\t0xE6, 0x9C, 0x88, 0x44, 0x39, 0xE7, 0x82, 0xB9,\n\t0x44, 0x56, 0x49, 0x49, 0x49, 0x44, 0x61, 0x2E,\n\t// Bytes 1e80 - 1ebf\n\t0x6D, 0x2E, 0x44, 0x6B, 0x63, 0x61, 0x6C, 0x44,\n\t0x70, 0x2E, 0x6D, 0x2E, 0x44, 0x76, 0x69, 0x69,\n\t0x69, 0x44, 0xD5, 0xA5, 0xD6, 0x82, 0x44, 0xD5,\n\t0xB4, 0xD5, 0xA5, 0x44, 0xD5, 0xB4, 0xD5, 0xAB,\n\t0x44, 0xD5, 0xB4, 0xD5, 0xAD, 0x44, 0xD5, 0xB4,\n\t0xD5, 0xB6, 0x44, 0xD5, 0xBE, 0xD5, 0xB6, 0x44,\n\t0xD7, 0x90, 0xD7, 0x9C, 0x44, 0xD8, 0xA7, 0xD9,\n\t0xB4, 0x44, 0xD8, 0xA8, 0xD8, 0xAC, 0x44, 0xD8,\n\t// Bytes 1ec0 - 1eff\n\t0xA8, 0xD8, 0xAD, 0x44, 0xD8, 0xA8, 0xD8, 0xAE,\n\t0x44, 0xD8, 0xA8, 0xD8, 0xB1, 0x44, 0xD8, 0xA8,\n\t0xD8, 0xB2, 0x44, 0xD8, 0xA8, 0xD9, 0x85, 0x44,\n\t0xD8, 0xA8, 0xD9, 0x86, 0x44, 0xD8, 0xA8, 0xD9,\n\t0x87, 0x44, 0xD8, 0xA8, 0xD9, 0x89, 0x44, 0xD8,\n\t0xA8, 0xD9, 0x8A, 0x44, 0xD8, 0xAA, 0xD8, 0xAC,\n\t0x44, 0xD8, 0xAA, 0xD8, 0xAD, 0x44, 0xD8, 0xAA,\n\t0xD8, 0xAE, 0x44, 0xD8, 0xAA, 0xD8, 0xB1, 0x44,\n\t// Bytes 1f00 - 1f3f\n\t0xD8, 0xAA, 0xD8, 0xB2, 0x44, 0xD8, 0xAA, 0xD9,\n\t0x85, 0x44, 0xD8, 0xAA, 0xD9, 0x86, 0x44, 0xD8,\n\t0xAA, 0xD9, 0x87, 0x44, 0xD8, 0xAA, 0xD9, 0x89,\n\t0x44, 0xD8, 0xAA, 0xD9, 0x8A, 0x44, 0xD8, 0xAB,\n\t0xD8, 0xAC, 0x44, 0xD8, 0xAB, 0xD8, 0xB1, 0x44,\n\t0xD8, 0xAB, 0xD8, 0xB2, 0x44, 0xD8, 0xAB, 0xD9,\n\t0x85, 0x44, 0xD8, 0xAB, 0xD9, 0x86, 0x44, 0xD8,\n\t0xAB, 0xD9, 0x87, 0x44, 0xD8, 0xAB, 0xD9, 0x89,\n\t// Bytes 1f40 - 1f7f\n\t0x44, 0xD8, 0xAB, 0xD9, 0x8A, 0x44, 0xD8, 0xAC,\n\t0xD8, 0xAD, 0x44, 0xD8, 0xAC, 0xD9, 0x85, 0x44,\n\t0xD8, 0xAC, 0xD9, 0x89, 0x44, 0xD8, 0xAC, 0xD9,\n\t0x8A, 0x44, 0xD8, 0xAD, 0xD8, 0xAC, 0x44, 0xD8,\n\t0xAD, 0xD9, 0x85, 0x44, 0xD8, 0xAD, 0xD9, 0x89,\n\t0x44, 0xD8, 0xAD, 0xD9, 0x8A, 0x44, 0xD8, 0xAE,\n\t0xD8, 0xAC, 0x44, 0xD8, 0xAE, 0xD8, 0xAD, 0x44,\n\t0xD8, 0xAE, 0xD9, 0x85, 0x44, 0xD8, 0xAE, 0xD9,\n\t// Bytes 1f80 - 1fbf\n\t0x89, 0x44, 0xD8, 0xAE, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB3, 0xD8, 0xAC, 0x44, 0xD8, 0xB3, 0xD8, 0xAD,\n\t0x44, 0xD8, 0xB3, 0xD8, 0xAE, 0x44, 0xD8, 0xB3,\n\t0xD8, 0xB1, 0x44, 0xD8, 0xB3, 0xD9, 0x85, 0x44,\n\t0xD8, 0xB3, 0xD9, 0x87, 0x44, 0xD8, 0xB3, 0xD9,\n\t0x89, 0x44, 0xD8, 0xB3, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB4, 0xD8, 0xAC, 0x44, 0xD8, 0xB4, 0xD8, 0xAD,\n\t0x44, 0xD8, 0xB4, 0xD8, 0xAE, 0x44, 0xD8, 0xB4,\n\t// Bytes 1fc0 - 1fff\n\t0xD8, 0xB1, 0x44, 0xD8, 0xB4, 0xD9, 0x85, 0x44,\n\t0xD8, 0xB4, 0xD9, 0x87, 0x44, 0xD8, 0xB4, 0xD9,\n\t0x89, 0x44, 0xD8, 0xB4, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB5, 0xD8, 0xAD, 0x44, 0xD8, 0xB5, 0xD8, 0xAE,\n\t0x44, 0xD8, 0xB5, 0xD8, 0xB1, 0x44, 0xD8, 0xB5,\n\t0xD9, 0x85, 0x44, 0xD8, 0xB5, 0xD9, 0x89, 0x44,\n\t0xD8, 0xB5, 0xD9, 0x8A, 0x44, 0xD8, 0xB6, 0xD8,\n\t0xAC, 0x44, 0xD8, 0xB6, 0xD8, 0xAD, 0x44, 0xD8,\n\t// Bytes 2000 - 203f\n\t0xB6, 0xD8, 0xAE, 0x44, 0xD8, 0xB6, 0xD8, 0xB1,\n\t0x44, 0xD8, 0xB6, 0xD9, 0x85, 0x44, 0xD8, 0xB6,\n\t0xD9, 0x89, 0x44, 0xD8, 0xB6, 0xD9, 0x8A, 0x44,\n\t0xD8, 0xB7, 0xD8, 0xAD, 0x44, 0xD8, 0xB7, 0xD9,\n\t0x85, 0x44, 0xD8, 0xB7, 0xD9, 0x89, 0x44, 0xD8,\n\t0xB7, 0xD9, 0x8A, 0x44, 0xD8, 0xB8, 0xD9, 0x85,\n\t0x44, 0xD8, 0xB9, 0xD8, 0xAC, 0x44, 0xD8, 0xB9,\n\t0xD9, 0x85, 0x44, 0xD8, 0xB9, 0xD9, 0x89, 0x44,\n\t// Bytes 2040 - 207f\n\t0xD8, 0xB9, 0xD9, 0x8A, 0x44, 0xD8, 0xBA, 0xD8,\n\t0xAC, 0x44, 0xD8, 0xBA, 0xD9, 0x85, 0x44, 0xD8,\n\t0xBA, 0xD9, 0x89, 0x44, 0xD8, 0xBA, 0xD9, 0x8A,\n\t0x44, 0xD9, 0x81, 0xD8, 0xAC, 0x44, 0xD9, 0x81,\n\t0xD8, 0xAD, 0x44, 0xD9, 0x81, 0xD8, 0xAE, 0x44,\n\t0xD9, 0x81, 0xD9, 0x85, 0x44, 0xD9, 0x81, 0xD9,\n\t0x89, 0x44, 0xD9, 0x81, 0xD9, 0x8A, 0x44, 0xD9,\n\t0x82, 0xD8, 0xAD, 0x44, 0xD9, 0x82, 0xD9, 0x85,\n\t// Bytes 2080 - 20bf\n\t0x44, 0xD9, 0x82, 0xD9, 0x89, 0x44, 0xD9, 0x82,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x83, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x83, 0xD8, 0xAC, 0x44, 0xD9, 0x83, 0xD8,\n\t0xAD, 0x44, 0xD9, 0x83, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x83, 0xD9, 0x84, 0x44, 0xD9, 0x83, 0xD9, 0x85,\n\t0x44, 0xD9, 0x83, 0xD9, 0x89, 0x44, 0xD9, 0x83,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x84, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x84, 0xD8, 0xAC, 0x44, 0xD9, 0x84, 0xD8,\n\t// Bytes 20c0 - 20ff\n\t0xAD, 0x44, 0xD9, 0x84, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x84, 0xD9, 0x85, 0x44, 0xD9, 0x84, 0xD9, 0x87,\n\t0x44, 0xD9, 0x84, 0xD9, 0x89, 0x44, 0xD9, 0x84,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x85, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x85, 0xD8, 0xAC, 0x44, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x44, 0xD9, 0x85, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x85, 0xD9, 0x85, 0x44, 0xD9, 0x85, 0xD9, 0x89,\n\t0x44, 0xD9, 0x85, 0xD9, 0x8A, 0x44, 0xD9, 0x86,\n\t// Bytes 2100 - 213f\n\t0xD8, 0xAC, 0x44, 0xD9, 0x86, 0xD8, 0xAD, 0x44,\n\t0xD9, 0x86, 0xD8, 0xAE, 0x44, 0xD9, 0x86, 0xD8,\n\t0xB1, 0x44, 0xD9, 0x86, 0xD8, 0xB2, 0x44, 0xD9,\n\t0x86, 0xD9, 0x85, 0x44, 0xD9, 0x86, 0xD9, 0x86,\n\t0x44, 0xD9, 0x86, 0xD9, 0x87, 0x44, 0xD9, 0x86,\n\t0xD9, 0x89, 0x44, 0xD9, 0x86, 0xD9, 0x8A, 0x44,\n\t0xD9, 0x87, 0xD8, 0xAC, 0x44, 0xD9, 0x87, 0xD9,\n\t0x85, 0x44, 0xD9, 0x87, 0xD9, 0x89, 0x44, 0xD9,\n\t// Bytes 2140 - 217f\n\t0x87, 0xD9, 0x8A, 0x44, 0xD9, 0x88, 0xD9, 0xB4,\n\t0x44, 0xD9, 0x8A, 0xD8, 0xAC, 0x44, 0xD9, 0x8A,\n\t0xD8, 0xAD, 0x44, 0xD9, 0x8A, 0xD8, 0xAE, 0x44,\n\t0xD9, 0x8A, 0xD8, 0xB1, 0x44, 0xD9, 0x8A, 0xD8,\n\t0xB2, 0x44, 0xD9, 0x8A, 0xD9, 0x85, 0x44, 0xD9,\n\t0x8A, 0xD9, 0x86, 0x44, 0xD9, 0x8A, 0xD9, 0x87,\n\t0x44, 0xD9, 0x8A, 0xD9, 0x89, 0x44, 0xD9, 0x8A,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x8A, 0xD9, 0xB4, 0x44,\n\t// Bytes 2180 - 21bf\n\t0xDB, 0x87, 0xD9, 0xB4, 0x45, 0x28, 0xE1, 0x84,\n\t0x80, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x82, 0x29,\n\t0x45, 0x28, 0xE1, 0x84, 0x83, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x85, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x86, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x87, 0x29,\n\t0x45, 0x28, 0xE1, 0x84, 0x89, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x8B, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x8C, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x8E, 0x29,\n\t// Bytes 21c0 - 21ff\n\t0x45, 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x90, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x91, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x92, 0x29,\n\t0x45, 0x28, 0xE4, 0xB8, 0x80, 0x29, 0x45, 0x28,\n\t0xE4, 0xB8, 0x83, 0x29, 0x45, 0x28, 0xE4, 0xB8,\n\t0x89, 0x29, 0x45, 0x28, 0xE4, 0xB9, 0x9D, 0x29,\n\t0x45, 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x45, 0x28,\n\t0xE4, 0xBA, 0x94, 0x29, 0x45, 0x28, 0xE4, 0xBB,\n\t// Bytes 2200 - 223f\n\t0xA3, 0x29, 0x45, 0x28, 0xE4, 0xBC, 0x81, 0x29,\n\t0x45, 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x45, 0x28,\n\t0xE5, 0x85, 0xAB, 0x29, 0x45, 0x28, 0xE5, 0x85,\n\t0xAD, 0x29, 0x45, 0x28, 0xE5, 0x8A, 0xB4, 0x29,\n\t0x45, 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x45, 0x28,\n\t0xE5, 0x8D, 0x94, 0x29, 0x45, 0x28, 0xE5, 0x90,\n\t0x8D, 0x29, 0x45, 0x28, 0xE5, 0x91, 0xBC, 0x29,\n\t0x45, 0x28, 0xE5, 0x9B, 0x9B, 0x29, 0x45, 0x28,\n\t// Bytes 2240 - 227f\n\t0xE5, 0x9C, 0x9F, 0x29, 0x45, 0x28, 0xE5, 0xAD,\n\t0xA6, 0x29, 0x45, 0x28, 0xE6, 0x97, 0xA5, 0x29,\n\t0x45, 0x28, 0xE6, 0x9C, 0x88, 0x29, 0x45, 0x28,\n\t0xE6, 0x9C, 0x89, 0x29, 0x45, 0x28, 0xE6, 0x9C,\n\t0xA8, 0x29, 0x45, 0x28, 0xE6, 0xA0, 0xAA, 0x29,\n\t0x45, 0x28, 0xE6, 0xB0, 0xB4, 0x29, 0x45, 0x28,\n\t0xE7, 0x81, 0xAB, 0x29, 0x45, 0x28, 0xE7, 0x89,\n\t0xB9, 0x29, 0x45, 0x28, 0xE7, 0x9B, 0xA3, 0x29,\n\t// Bytes 2280 - 22bf\n\t0x45, 0x28, 0xE7, 0xA4, 0xBE, 0x29, 0x45, 0x28,\n\t0xE7, 0xA5, 0x9D, 0x29, 0x45, 0x28, 0xE7, 0xA5,\n\t0xAD, 0x29, 0x45, 0x28, 0xE8, 0x87, 0xAA, 0x29,\n\t0x45, 0x28, 0xE8, 0x87, 0xB3, 0x29, 0x45, 0x28,\n\t0xE8, 0xB2, 0xA1, 0x29, 0x45, 0x28, 0xE8, 0xB3,\n\t0x87, 0x29, 0x45, 0x28, 0xE9, 0x87, 0x91, 0x29,\n\t0x45, 0x30, 0xE2, 0x81, 0x84, 0x33, 0x45, 0x31,\n\t0x30, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x30, 0xE6,\n\t// Bytes 22c0 - 22ff\n\t0x9C, 0x88, 0x45, 0x31, 0x30, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x31, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x31, 0xE6, 0x9C, 0x88, 0x45, 0x31, 0x31, 0xE7,\n\t0x82, 0xB9, 0x45, 0x31, 0x32, 0xE6, 0x97, 0xA5,\n\t0x45, 0x31, 0x32, 0xE6, 0x9C, 0x88, 0x45, 0x31,\n\t0x32, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x33, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x33, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x34, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t// Bytes 2300 - 233f\n\t0x34, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x35, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x35, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x36, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x36, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x37, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x37, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x38, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x39, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x39, 0xE7, 0x82, 0xB9,\n\t// Bytes 2340 - 237f\n\t0x45, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x45, 0x31,\n\t0xE2, 0x81, 0x84, 0x33, 0x45, 0x31, 0xE2, 0x81,\n\t0x84, 0x34, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x35,\n\t0x45, 0x31, 0xE2, 0x81, 0x84, 0x36, 0x45, 0x31,\n\t0xE2, 0x81, 0x84, 0x37, 0x45, 0x31, 0xE2, 0x81,\n\t0x84, 0x38, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x39,\n\t0x45, 0x32, 0x30, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x30, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x31, 0xE6,\n\t// Bytes 2380 - 23bf\n\t0x97, 0xA5, 0x45, 0x32, 0x31, 0xE7, 0x82, 0xB9,\n\t0x45, 0x32, 0x32, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x32, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x33, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0x33, 0xE7, 0x82, 0xB9,\n\t0x45, 0x32, 0x34, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x34, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x35, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0x36, 0xE6, 0x97, 0xA5,\n\t0x45, 0x32, 0x37, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t// Bytes 23c0 - 23ff\n\t0x38, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x39, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0xE2, 0x81, 0x84, 0x33,\n\t0x45, 0x32, 0xE2, 0x81, 0x84, 0x35, 0x45, 0x33,\n\t0x30, 0xE6, 0x97, 0xA5, 0x45, 0x33, 0x31, 0xE6,\n\t0x97, 0xA5, 0x45, 0x33, 0xE2, 0x81, 0x84, 0x34,\n\t0x45, 0x33, 0xE2, 0x81, 0x84, 0x35, 0x45, 0x33,\n\t0xE2, 0x81, 0x84, 0x38, 0x45, 0x34, 0xE2, 0x81,\n\t0x84, 0x35, 0x45, 0x35, 0xE2, 0x81, 0x84, 0x36,\n\t// Bytes 2400 - 243f\n\t0x45, 0x35, 0xE2, 0x81, 0x84, 0x38, 0x45, 0x37,\n\t0xE2, 0x81, 0x84, 0x38, 0x45, 0x41, 0xE2, 0x88,\n\t0x95, 0x6D, 0x45, 0x56, 0xE2, 0x88, 0x95, 0x6D,\n\t0x45, 0x6D, 0xE2, 0x88, 0x95, 0x73, 0x46, 0x31,\n\t0xE2, 0x81, 0x84, 0x31, 0x30, 0x46, 0x43, 0xE2,\n\t0x88, 0x95, 0x6B, 0x67, 0x46, 0x6D, 0xE2, 0x88,\n\t0x95, 0x73, 0x32, 0x46, 0xD8, 0xA8, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD8, 0xA8, 0xD8, 0xAE, 0xD9,\n\t// Bytes 2440 - 247f\n\t0x8A, 0x46, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x85,\n\t0x46, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0x46,\n\t0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD8,\n\t0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0x46, 0xD8, 0xAA,\n\t0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD8, 0xAA, 0xD8,\n\t0xAE, 0xD9, 0x85, 0x46, 0xD8, 0xAA, 0xD8, 0xAE,\n\t0xD9, 0x89, 0x46, 0xD8, 0xAA, 0xD8, 0xAE, 0xD9,\n\t0x8A, 0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAC,\n\t// Bytes 2480 - 24bf\n\t0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0x46,\n\t0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAE, 0x46, 0xD8,\n\t0xAA, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xAA,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xAC, 0xD8,\n\t0xAD, 0xD9, 0x89, 0x46, 0xD8, 0xAC, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x89,\n\t0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x8A, 0x46,\n\t// Bytes 24c0 - 24ff\n\t0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD8,\n\t0xAD, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xAD,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xB3, 0xD8,\n\t0xAC, 0xD8, 0xAD, 0x46, 0xD8, 0xB3, 0xD8, 0xAC,\n\t0xD9, 0x89, 0x46, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8,\n\t0xAC, 0x46, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89,\n\t0x46, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x8A, 0x46,\n\t0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xAC, 0x46, 0xD8,\n\t// Bytes 2500 - 253f\n\t0xB3, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD8, 0xB3,\n\t0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB4, 0xD8,\n\t0xAC, 0xD9, 0x8A, 0x46, 0xD8, 0xB4, 0xD8, 0xAD,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB4, 0xD8, 0xAD, 0xD9,\n\t0x8A, 0x46, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE,\n\t0x46, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, 0x85, 0x46,\n\t0xD8, 0xB5, 0xD8, 0xAD, 0xD8, 0xAD, 0x46, 0xD8,\n\t0xB5, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xB5,\n\t// Bytes 2540 - 257f\n\t0xD9, 0x84, 0xD9, 0x89, 0x46, 0xD8, 0xB5, 0xD9,\n\t0x84, 0xDB, 0x92, 0x46, 0xD8, 0xB5, 0xD9, 0x85,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9,\n\t0x89, 0x46, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x8A,\n\t0x46, 0xD8, 0xB6, 0xD8, 0xAE, 0xD9, 0x85, 0x46,\n\t0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD8,\n\t0xB7, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB7,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xB9, 0xD8,\n\t// Bytes 2580 - 25bf\n\t0xAC, 0xD9, 0x85, 0x46, 0xD8, 0xB9, 0xD9, 0x85,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB9, 0xD9, 0x85, 0xD9,\n\t0x89, 0x46, 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x8A,\n\t0x46, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x85, 0x46,\n\t0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8,\n\t0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x81,\n\t0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD9, 0x81, 0xD9,\n\t0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x82, 0xD9, 0x84,\n\t// Bytes 25c0 - 25ff\n\t0xDB, 0x92, 0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD9, 0x85,\n\t0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD9, 0x8A, 0x46,\n\t0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD9,\n\t0x83, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x84,\n\t0xD8, 0xAC, 0xD8, 0xAC, 0x46, 0xD9, 0x84, 0xD8,\n\t0xAC, 0xD9, 0x85, 0x46, 0xD9, 0x84, 0xD8, 0xAC,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9,\n\t// Bytes 2600 - 263f\n\t0x85, 0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89,\n\t0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x8A, 0x46,\n\t0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD9,\n\t0x84, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD9, 0x84,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x85, 0xD8,\n\t0xAC, 0xD8, 0xAD, 0x46, 0xD9, 0x85, 0xD8, 0xAC,\n\t0xD8, 0xAE, 0x46, 0xD9, 0x85, 0xD8, 0xAC, 0xD9,\n\t0x85, 0x46, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A,\n\t// Bytes 2640 - 267f\n\t0x46, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0x46,\n\t0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD9,\n\t0x85, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD9, 0x85,\n\t0xD8, 0xAE, 0xD8, 0xAC, 0x46, 0xD9, 0x85, 0xD8,\n\t0xAE, 0xD9, 0x85, 0x46, 0xD9, 0x85, 0xD8, 0xAE,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x85, 0xD9, 0x85, 0xD9,\n\t0x8A, 0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD,\n\t0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0x46,\n\t// Bytes 2680 - 26bf\n\t0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x89, 0x46, 0xD9,\n\t0x86, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x86,\n\t0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD9, 0x86, 0xD8,\n\t0xAD, 0xD9, 0x89, 0x46, 0xD9, 0x86, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x86, 0xD9, 0x85, 0xD9,\n\t0x89, 0x46, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x8A,\n\t0x46, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0x46,\n\t0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD9,\n\t// Bytes 26c0 - 26ff\n\t0x8A, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x8A,\n\t0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD9, 0x8A, 0xD9,\n\t0x85, 0xD9, 0x85, 0x46, 0xD9, 0x8A, 0xD9, 0x85,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8,\n\t0xA7, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAC,\n\t0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, 0x46,\n\t0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0x46, 0xD9,\n\t0x8A, 0xD9, 0x94, 0xD8, 0xB1, 0x46, 0xD9, 0x8A,\n\t// Bytes 2700 - 273f\n\t0xD9, 0x94, 0xD8, 0xB2, 0x46, 0xD9, 0x8A, 0xD9,\n\t0x94, 0xD9, 0x85, 0x46, 0xD9, 0x8A, 0xD9, 0x94,\n\t0xD9, 0x86, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9,\n\t0x87, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88,\n\t0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0x46,\n\t0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0x46, 0xD9,\n\t0x8A, 0xD9, 0x94, 0xDB, 0x86, 0x46, 0xD9, 0x8A,\n\t0xD9, 0x94, 0xDB, 0x87, 0x46, 0xD9, 0x8A, 0xD9,\n\t// Bytes 2740 - 277f\n\t0x94, 0xDB, 0x88, 0x46, 0xD9, 0x8A, 0xD9, 0x94,\n\t0xDB, 0x90, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xDB,\n\t0x95, 0x46, 0xE0, 0xB9, 0x8D, 0xE0, 0xB8, 0xB2,\n\t0x46, 0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0x99, 0x46,\n\t0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0xA1, 0x46, 0xE0,\n\t0xBB, 0x8D, 0xE0, 0xBA, 0xB2, 0x46, 0xE0, 0xBD,\n\t0x80, 0xE0, 0xBE, 0xB5, 0x46, 0xE0, 0xBD, 0x82,\n\t0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x8C, 0xE0,\n\t// Bytes 2780 - 27bf\n\t0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x91, 0xE0, 0xBE,\n\t0xB7, 0x46, 0xE0, 0xBD, 0x96, 0xE0, 0xBE, 0xB7,\n\t0x46, 0xE0, 0xBD, 0x9B, 0xE0, 0xBE, 0xB7, 0x46,\n\t0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, 0x46, 0xE0,\n\t0xBE, 0x92, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE,\n\t0x9C, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xA1,\n\t0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xA6, 0xE0,\n\t0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE,\n\t// Bytes 27c0 - 27ff\n\t0xB7, 0x46, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2,\n\t0x46, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0x46,\n\t0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x46, 0xE2,\n\t0x88, 0xAE, 0xE2, 0x88, 0xAE, 0x46, 0xE3, 0x81,\n\t0xBB, 0xE3, 0x81, 0x8B, 0x46, 0xE3, 0x82, 0x88,\n\t0xE3, 0x82, 0x8A, 0x46, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0x46, 0xE3, 0x82, 0xB3, 0xE3, 0x82,\n\t0xB3, 0x46, 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0x88,\n\t// Bytes 2800 - 283f\n\t0x46, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, 0x46,\n\t0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8E, 0x46, 0xE3,\n\t0x83, 0x9B, 0xE3, 0x83, 0xB3, 0x46, 0xE3, 0x83,\n\t0x9F, 0xE3, 0x83, 0xAA, 0x46, 0xE3, 0x83, 0xAA,\n\t0xE3, 0x83, 0xA9, 0x46, 0xE3, 0x83, 0xAC, 0xE3,\n\t0x83, 0xA0, 0x46, 0xE4, 0xBB, 0xA4, 0xE5, 0x92,\n\t0x8C, 0x46, 0xE5, 0xA4, 0xA7, 0xE6, 0xAD, 0xA3,\n\t0x46, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, 0x90, 0x46,\n\t// Bytes 2840 - 287f\n\t0xE6, 0x98, 0x8E, 0xE6, 0xB2, 0xBB, 0x46, 0xE6,\n\t0x98, 0xAD, 0xE5, 0x92, 0x8C, 0x47, 0x72, 0x61,\n\t0x64, 0xE2, 0x88, 0x95, 0x73, 0x47, 0xE3, 0x80,\n\t0x94, 0x53, 0xE3, 0x80, 0x95, 0x48, 0x28, 0xE1,\n\t0x84, 0x80, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28,\n\t0xE1, 0x84, 0x82, 0xE1, 0x85, 0xA1, 0x29, 0x48,\n\t0x28, 0xE1, 0x84, 0x83, 0xE1, 0x85, 0xA1, 0x29,\n\t0x48, 0x28, 0xE1, 0x84, 0x85, 0xE1, 0x85, 0xA1,\n\t// Bytes 2880 - 28bf\n\t0x29, 0x48, 0x28, 0xE1, 0x84, 0x86, 0xE1, 0x85,\n\t0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x87, 0xE1,\n\t0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x89,\n\t0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84,\n\t0x8B, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1,\n\t0x84, 0x8C, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28,\n\t0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xAE, 0x29, 0x48,\n\t0x28, 0xE1, 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0x29,\n\t// Bytes 28c0 - 28ff\n\t0x48, 0x28, 0xE1, 0x84, 0x8F, 0xE1, 0x85, 0xA1,\n\t0x29, 0x48, 0x28, 0xE1, 0x84, 0x90, 0xE1, 0x85,\n\t0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x91, 0xE1,\n\t0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x92,\n\t0xE1, 0x85, 0xA1, 0x29, 0x48, 0x72, 0x61, 0x64,\n\t0xE2, 0x88, 0x95, 0x73, 0x32, 0x48, 0xD8, 0xA7,\n\t0xD9, 0x83, 0xD8, 0xA8, 0xD8, 0xB1, 0x48, 0xD8,\n\t0xA7, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x87, 0x48,\n\t// Bytes 2900 - 293f\n\t0xD8, 0xB1, 0xD8, 0xB3, 0xD9, 0x88, 0xD9, 0x84,\n\t0x48, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, 0xA7, 0xD9,\n\t0x84, 0x48, 0xD8, 0xB5, 0xD9, 0x84, 0xD8, 0xB9,\n\t0xD9, 0x85, 0x48, 0xD8, 0xB9, 0xD9, 0x84, 0xD9,\n\t0x8A, 0xD9, 0x87, 0x48, 0xD9, 0x85, 0xD8, 0xAD,\n\t0xD9, 0x85, 0xD8, 0xAF, 0x48, 0xD9, 0x88, 0xD8,\n\t0xB3, 0xD9, 0x84, 0xD9, 0x85, 0x49, 0xE2, 0x80,\n\t0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x49,\n\t// Bytes 2940 - 297f\n\t0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80,\n\t0xB5, 0x49, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB,\n\t0xE2, 0x88, 0xAB, 0x49, 0xE2, 0x88, 0xAE, 0xE2,\n\t0x88, 0xAE, 0xE2, 0x88, 0xAE, 0x49, 0xE3, 0x80,\n\t0x94, 0xE4, 0xB8, 0x89, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x80, 0x94, 0xE4, 0xBA, 0x8C, 0xE3, 0x80,\n\t0x95, 0x49, 0xE3, 0x80, 0x94, 0xE5, 0x8B, 0x9D,\n\t0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE5,\n\t// Bytes 2980 - 29bf\n\t0xAE, 0x89, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80,\n\t0x94, 0xE6, 0x89, 0x93, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x80, 0x94, 0xE6, 0x95, 0x97, 0xE3, 0x80,\n\t0x95, 0x49, 0xE3, 0x80, 0x94, 0xE6, 0x9C, 0xAC,\n\t0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE7,\n\t0x82, 0xB9, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80,\n\t0x94, 0xE7, 0x9B, 0x97, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t// Bytes 29c0 - 29ff\n\t0xAB, 0x49, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x81, 0x49, 0xE3, 0x82, 0xA6, 0xE3,\n\t0x82, 0xA9, 0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x82,\n\t0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0x49,\n\t0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xA0, 0x49, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x83, 0xAA, 0x49, 0xE3, 0x82, 0xB1, 0xE3,\n\t0x83, 0xBC, 0xE3, 0x82, 0xB9, 0x49, 0xE3, 0x82,\n\t// Bytes 2a00 - 2a3f\n\t0xB3, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x8A, 0x49,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83,\n\t0x81, 0x49, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0x49, 0xE3, 0x83, 0x86, 0xE3,\n\t0x82, 0x99, 0xE3, 0x82, 0xB7, 0x49, 0xE3, 0x83,\n\t0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0x49,\n\t0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x83, 0xE3, 0x83,\n\t0x88, 0x49, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0xA4,\n\t// Bytes 2a40 - 2a7f\n\t0xE3, 0x83, 0x84, 0x49, 0xE3, 0x83, 0x92, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83,\n\t0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB3, 0x49,\n\t0xE3, 0x83, 0x95, 0xE3, 0x83, 0xA9, 0xE3, 0x83,\n\t0xB3, 0x49, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A,\n\t0xE3, 0x82, 0xBD, 0x49, 0xE3, 0x83, 0x98, 0xE3,\n\t0x83, 0xAB, 0xE3, 0x83, 0x84, 0x49, 0xE3, 0x83,\n\t0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0x49,\n\t// Bytes 2a80 - 2abf\n\t0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xB3, 0x49, 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83, 0x9E, 0xE3,\n\t0x83, 0x83, 0xE3, 0x83, 0x8F, 0x49, 0xE3, 0x83,\n\t0x9E, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAF, 0x49,\n\t0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xAB, 0x49, 0xE3, 0x83, 0xA6, 0xE3, 0x82, 0xA2,\n\t0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x83, 0xAF, 0xE3,\n\t// Bytes 2ac0 - 2aff\n\t0x83, 0x83, 0xE3, 0x83, 0x88, 0x4C, 0xE2, 0x80,\n\t0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2,\n\t0x80, 0xB2, 0x4C, 0xE2, 0x88, 0xAB, 0xE2, 0x88,\n\t0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x4C,\n\t0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xAB, 0xE3, 0x83,\n\t0x95, 0xE3, 0x82, 0xA1, 0x4C, 0xE3, 0x82, 0xA8,\n\t0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x83,\n\t0xBC, 0x4C, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99,\n\t// Bytes 2b00 - 2b3f\n\t0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0x4C, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x9E, 0x4C, 0xE3, 0x82, 0xAB, 0xE3,\n\t0x83, 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88,\n\t0x4C, 0xE3, 0x82, 0xAB, 0xE3, 0x83, 0xAD, 0xE3,\n\t0x83, 0xAA, 0xE3, 0x83, 0xBC, 0x4C, 0xE3, 0x82,\n\t0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x8B, 0xE3,\n\t0x83, 0xBC, 0x4C, 0xE3, 0x82, 0xAD, 0xE3, 0x83,\n\t// Bytes 2b40 - 2b7f\n\t0xA5, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0x4C,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83,\n\t0xA9, 0xE3, 0x83, 0xA0, 0x4C, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0x8D, 0x4C, 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0x4C, 0xE3,\n\t0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x82, 0xB9, 0x4C, 0xE3, 0x83, 0x8F, 0xE3,\n\t// Bytes 2b80 - 2bbf\n\t0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x84,\n\t0x4C, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x83, 0xAB, 0x4C, 0xE3, 0x83,\n\t0x95, 0xE3, 0x82, 0xA3, 0xE3, 0x83, 0xBC, 0xE3,\n\t0x83, 0x88, 0x4C, 0xE3, 0x83, 0x98, 0xE3, 0x82,\n\t0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBF, 0x4C,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83,\n\t0x8B, 0xE3, 0x83, 0x92, 0x4C, 0xE3, 0x83, 0x98,\n\t// Bytes 2bc0 - 2bff\n\t0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x82,\n\t0xB9, 0x4C, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x88, 0x4C, 0xE3,\n\t0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x83, 0xAD, 0x4C, 0xE3, 0x83, 0x9F, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3,\n\t0x4C, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC, 0xE3,\n\t0x83, 0x88, 0xE3, 0x83, 0xAB, 0x4C, 0xE3, 0x83,\n\t// Bytes 2c00 - 2c3f\n\t0xAA, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3,\n\t0x83, 0xAB, 0x4C, 0xE3, 0x83, 0xAB, 0xE3, 0x83,\n\t0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0x4C,\n\t0xE6, 0xA0, 0xAA, 0xE5, 0xBC, 0x8F, 0xE4, 0xBC,\n\t0x9A, 0xE7, 0xA4, 0xBE, 0x4E, 0x28, 0xE1, 0x84,\n\t0x8B, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x92, 0xE1,\n\t0x85, 0xAE, 0x29, 0x4F, 0xD8, 0xAC, 0xD9, 0x84,\n\t0x20, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9,\n\t// Bytes 2c40 - 2c7f\n\t0x84, 0xD9, 0x87, 0x4F, 0xE3, 0x82, 0xA2, 0xE3,\n\t0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x82, 0xA2, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A,\n\t0xE3, 0x82, 0xA2, 0x4F, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x82, 0xB5, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0xBC,\n\t// Bytes 2c80 - 2cbf\n\t0xE3, 0x83, 0xA0, 0x4F, 0xE3, 0x83, 0x8F, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAC,\n\t0xE3, 0x83, 0xAB, 0x4F, 0xE3, 0x83, 0x98, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0xAB, 0x4F, 0xE3, 0x83, 0x9B, 0xE3,\n\t0x82, 0x9A, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x83, 0x9E, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0xA7,\n\t// Bytes 2cc0 - 2cff\n\t0xE3, 0x83, 0xB3, 0x4F, 0xE3, 0x83, 0xA1, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x88,\n\t0xE3, 0x83, 0xB3, 0x4F, 0xE3, 0x83, 0xAB, 0xE3,\n\t0x83, 0xBC, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xAB, 0x51, 0x28, 0xE1, 0x84, 0x8B,\n\t0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, 0xE1, 0x85,\n\t0xA5, 0xE1, 0x86, 0xAB, 0x29, 0x52, 0xE3, 0x82,\n\t0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3,\n\t// Bytes 2d00 - 2d3f\n\t0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC,\n\t0x52, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9,\n\t0xE3, 0x83, 0xA0, 0x52, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0x52, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9,\n\t0xE3, 0x83, 0xA0, 0xE3, 0x83, 0x88, 0xE3, 0x83,\n\t// Bytes 2d40 - 2d7f\n\t0xB3, 0x52, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, 0xE3, 0x82,\n\t0xA4, 0xE3, 0x83, 0xAD, 0x52, 0xE3, 0x83, 0x8F,\n\t0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82,\n\t0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0x52,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82,\n\t0xA2, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x88, 0xE3,\n\t0x83, 0xAB, 0x52, 0xE3, 0x83, 0x95, 0xE3, 0x82,\n\t// Bytes 2d80 - 2dbf\n\t0x99, 0xE3, 0x83, 0x83, 0xE3, 0x82, 0xB7, 0xE3,\n\t0x82, 0xA7, 0xE3, 0x83, 0xAB, 0x52, 0xE3, 0x83,\n\t0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x8F, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB,\n\t0x52, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xB3, 0xE3,\n\t0x83, 0x88, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xB3, 0x5F, 0xD8, 0xB5, 0xD9, 0x84,\n\t0xD9, 0x89, 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9,\n\t// Bytes 2dc0 - 2dff\n\t0x84, 0xD9, 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84,\n\t0xD9, 0x8A, 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8,\n\t0xB3, 0xD9, 0x84, 0xD9, 0x85, 0x44, 0x44, 0x5A,\n\t0xCC, 0x8C, 0xCD, 0x44, 0x44, 0x7A, 0xCC, 0x8C,\n\t0xCD, 0x44, 0x64, 0x7A, 0xCC, 0x8C, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x93, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x95, 0xB9, 0x49,\n\t// Bytes 2e00 - 2e3f\n\t0xE3, 0x83, 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82,\n\t0x99, 0x11, 0x4C, 0xE1, 0x84, 0x8C, 0xE1, 0x85,\n\t0xAE, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xB4, 0x01,\n\t0x4C, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0x11, 0x4C, 0xE3,\n\t0x82, 0xB3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x9B,\n\t0xE3, 0x82, 0x9A, 0x11, 0x4C, 0xE3, 0x83, 0xA4,\n\t0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82,\n\t// Bytes 2e40 - 2e7f\n\t0x99, 0x11, 0x4F, 0xE1, 0x84, 0x8E, 0xE1, 0x85,\n\t0xA1, 0xE1, 0x86, 0xB7, 0xE1, 0x84, 0x80, 0xE1,\n\t0x85, 0xA9, 0x01, 0x4F, 0xE3, 0x82, 0xA4, 0xE3,\n\t0x83, 0x8B, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3, 0x82, 0xB7,\n\t0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82,\n\t0xAF, 0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3, 0x83,\n\t0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3,\n\t// Bytes 2e80 - 2ebf\n\t0x82, 0xB7, 0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3,\n\t0x83, 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x52,\n\t0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xB9, 0xE3, 0x82,\n\t0xAF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3,\n\t0x82, 0x99, 0x11, 0x52, 0xE3, 0x83, 0x95, 0xE3,\n\t0x82, 0xA1, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0x83,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x03,\n\t// Bytes 2ec0 - 2eff\n\t0x3C, 0xCC, 0xB8, 0x05, 0x03, 0x3D, 0xCC, 0xB8,\n\t0x05, 0x03, 0x3E, 0xCC, 0xB8, 0x05, 0x03, 0x41,\n\t0xCC, 0x80, 0xCD, 0x03, 0x41, 0xCC, 0x81, 0xCD,\n\t0x03, 0x41, 0xCC, 0x83, 0xCD, 0x03, 0x41, 0xCC,\n\t0x84, 0xCD, 0x03, 0x41, 0xCC, 0x89, 0xCD, 0x03,\n\t0x41, 0xCC, 0x8C, 0xCD, 0x03, 0x41, 0xCC, 0x8F,\n\t0xCD, 0x03, 0x41, 0xCC, 0x91, 0xCD, 0x03, 0x41,\n\t0xCC, 0xA5, 0xB9, 0x03, 0x41, 0xCC, 0xA8, 0xA9,\n\t// Bytes 2f00 - 2f3f\n\t0x03, 0x42, 0xCC, 0x87, 0xCD, 0x03, 0x42, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x42, 0xCC, 0xB1, 0xB9, 0x03,\n\t0x43, 0xCC, 0x81, 0xCD, 0x03, 0x43, 0xCC, 0x82,\n\t0xCD, 0x03, 0x43, 0xCC, 0x87, 0xCD, 0x03, 0x43,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x44, 0xCC, 0x87, 0xCD,\n\t0x03, 0x44, 0xCC, 0x8C, 0xCD, 0x03, 0x44, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x44, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x44, 0xCC, 0xAD, 0xB9, 0x03, 0x44, 0xCC, 0xB1,\n\t// Bytes 2f40 - 2f7f\n\t0xB9, 0x03, 0x45, 0xCC, 0x80, 0xCD, 0x03, 0x45,\n\t0xCC, 0x81, 0xCD, 0x03, 0x45, 0xCC, 0x83, 0xCD,\n\t0x03, 0x45, 0xCC, 0x86, 0xCD, 0x03, 0x45, 0xCC,\n\t0x87, 0xCD, 0x03, 0x45, 0xCC, 0x88, 0xCD, 0x03,\n\t0x45, 0xCC, 0x89, 0xCD, 0x03, 0x45, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x45, 0xCC, 0x8F, 0xCD, 0x03, 0x45,\n\t0xCC, 0x91, 0xCD, 0x03, 0x45, 0xCC, 0xA8, 0xA9,\n\t0x03, 0x45, 0xCC, 0xAD, 0xB9, 0x03, 0x45, 0xCC,\n\t// Bytes 2f80 - 2fbf\n\t0xB0, 0xB9, 0x03, 0x46, 0xCC, 0x87, 0xCD, 0x03,\n\t0x47, 0xCC, 0x81, 0xCD, 0x03, 0x47, 0xCC, 0x82,\n\t0xCD, 0x03, 0x47, 0xCC, 0x84, 0xCD, 0x03, 0x47,\n\t0xCC, 0x86, 0xCD, 0x03, 0x47, 0xCC, 0x87, 0xCD,\n\t0x03, 0x47, 0xCC, 0x8C, 0xCD, 0x03, 0x47, 0xCC,\n\t0xA7, 0xA9, 0x03, 0x48, 0xCC, 0x82, 0xCD, 0x03,\n\t0x48, 0xCC, 0x87, 0xCD, 0x03, 0x48, 0xCC, 0x88,\n\t0xCD, 0x03, 0x48, 0xCC, 0x8C, 0xCD, 0x03, 0x48,\n\t// Bytes 2fc0 - 2fff\n\t0xCC, 0xA3, 0xB9, 0x03, 0x48, 0xCC, 0xA7, 0xA9,\n\t0x03, 0x48, 0xCC, 0xAE, 0xB9, 0x03, 0x49, 0xCC,\n\t0x80, 0xCD, 0x03, 0x49, 0xCC, 0x81, 0xCD, 0x03,\n\t0x49, 0xCC, 0x82, 0xCD, 0x03, 0x49, 0xCC, 0x83,\n\t0xCD, 0x03, 0x49, 0xCC, 0x84, 0xCD, 0x03, 0x49,\n\t0xCC, 0x86, 0xCD, 0x03, 0x49, 0xCC, 0x87, 0xCD,\n\t0x03, 0x49, 0xCC, 0x89, 0xCD, 0x03, 0x49, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x49, 0xCC, 0x8F, 0xCD, 0x03,\n\t// Bytes 3000 - 303f\n\t0x49, 0xCC, 0x91, 0xCD, 0x03, 0x49, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x49, 0xCC, 0xA8, 0xA9, 0x03, 0x49,\n\t0xCC, 0xB0, 0xB9, 0x03, 0x4A, 0xCC, 0x82, 0xCD,\n\t0x03, 0x4B, 0xCC, 0x81, 0xCD, 0x03, 0x4B, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x4B, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x4B, 0xCC, 0xA7, 0xA9, 0x03, 0x4B, 0xCC, 0xB1,\n\t0xB9, 0x03, 0x4C, 0xCC, 0x81, 0xCD, 0x03, 0x4C,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x4C, 0xCC, 0xA7, 0xA9,\n\t// Bytes 3040 - 307f\n\t0x03, 0x4C, 0xCC, 0xAD, 0xB9, 0x03, 0x4C, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x4D, 0xCC, 0x81, 0xCD, 0x03,\n\t0x4D, 0xCC, 0x87, 0xCD, 0x03, 0x4D, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x4E, 0xCC, 0x80, 0xCD, 0x03, 0x4E,\n\t0xCC, 0x81, 0xCD, 0x03, 0x4E, 0xCC, 0x83, 0xCD,\n\t0x03, 0x4E, 0xCC, 0x87, 0xCD, 0x03, 0x4E, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x4E, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x4E, 0xCC, 0xA7, 0xA9, 0x03, 0x4E, 0xCC, 0xAD,\n\t// Bytes 3080 - 30bf\n\t0xB9, 0x03, 0x4E, 0xCC, 0xB1, 0xB9, 0x03, 0x4F,\n\t0xCC, 0x80, 0xCD, 0x03, 0x4F, 0xCC, 0x81, 0xCD,\n\t0x03, 0x4F, 0xCC, 0x86, 0xCD, 0x03, 0x4F, 0xCC,\n\t0x89, 0xCD, 0x03, 0x4F, 0xCC, 0x8B, 0xCD, 0x03,\n\t0x4F, 0xCC, 0x8C, 0xCD, 0x03, 0x4F, 0xCC, 0x8F,\n\t0xCD, 0x03, 0x4F, 0xCC, 0x91, 0xCD, 0x03, 0x50,\n\t0xCC, 0x81, 0xCD, 0x03, 0x50, 0xCC, 0x87, 0xCD,\n\t0x03, 0x52, 0xCC, 0x81, 0xCD, 0x03, 0x52, 0xCC,\n\t// Bytes 30c0 - 30ff\n\t0x87, 0xCD, 0x03, 0x52, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x52, 0xCC, 0x8F, 0xCD, 0x03, 0x52, 0xCC, 0x91,\n\t0xCD, 0x03, 0x52, 0xCC, 0xA7, 0xA9, 0x03, 0x52,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x53, 0xCC, 0x82, 0xCD,\n\t0x03, 0x53, 0xCC, 0x87, 0xCD, 0x03, 0x53, 0xCC,\n\t0xA6, 0xB9, 0x03, 0x53, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x54, 0xCC, 0x87, 0xCD, 0x03, 0x54, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x54, 0xCC, 0xA3, 0xB9, 0x03, 0x54,\n\t// Bytes 3100 - 313f\n\t0xCC, 0xA6, 0xB9, 0x03, 0x54, 0xCC, 0xA7, 0xA9,\n\t0x03, 0x54, 0xCC, 0xAD, 0xB9, 0x03, 0x54, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x55, 0xCC, 0x80, 0xCD, 0x03,\n\t0x55, 0xCC, 0x81, 0xCD, 0x03, 0x55, 0xCC, 0x82,\n\t0xCD, 0x03, 0x55, 0xCC, 0x86, 0xCD, 0x03, 0x55,\n\t0xCC, 0x89, 0xCD, 0x03, 0x55, 0xCC, 0x8A, 0xCD,\n\t0x03, 0x55, 0xCC, 0x8B, 0xCD, 0x03, 0x55, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x55, 0xCC, 0x8F, 0xCD, 0x03,\n\t// Bytes 3140 - 317f\n\t0x55, 0xCC, 0x91, 0xCD, 0x03, 0x55, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x55, 0xCC, 0xA4, 0xB9, 0x03, 0x55,\n\t0xCC, 0xA8, 0xA9, 0x03, 0x55, 0xCC, 0xAD, 0xB9,\n\t0x03, 0x55, 0xCC, 0xB0, 0xB9, 0x03, 0x56, 0xCC,\n\t0x83, 0xCD, 0x03, 0x56, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x57, 0xCC, 0x80, 0xCD, 0x03, 0x57, 0xCC, 0x81,\n\t0xCD, 0x03, 0x57, 0xCC, 0x82, 0xCD, 0x03, 0x57,\n\t0xCC, 0x87, 0xCD, 0x03, 0x57, 0xCC, 0x88, 0xCD,\n\t// Bytes 3180 - 31bf\n\t0x03, 0x57, 0xCC, 0xA3, 0xB9, 0x03, 0x58, 0xCC,\n\t0x87, 0xCD, 0x03, 0x58, 0xCC, 0x88, 0xCD, 0x03,\n\t0x59, 0xCC, 0x80, 0xCD, 0x03, 0x59, 0xCC, 0x81,\n\t0xCD, 0x03, 0x59, 0xCC, 0x82, 0xCD, 0x03, 0x59,\n\t0xCC, 0x83, 0xCD, 0x03, 0x59, 0xCC, 0x84, 0xCD,\n\t0x03, 0x59, 0xCC, 0x87, 0xCD, 0x03, 0x59, 0xCC,\n\t0x88, 0xCD, 0x03, 0x59, 0xCC, 0x89, 0xCD, 0x03,\n\t0x59, 0xCC, 0xA3, 0xB9, 0x03, 0x5A, 0xCC, 0x81,\n\t// Bytes 31c0 - 31ff\n\t0xCD, 0x03, 0x5A, 0xCC, 0x82, 0xCD, 0x03, 0x5A,\n\t0xCC, 0x87, 0xCD, 0x03, 0x5A, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x5A, 0xCC, 0xA3, 0xB9, 0x03, 0x5A, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x61, 0xCC, 0x80, 0xCD, 0x03,\n\t0x61, 0xCC, 0x81, 0xCD, 0x03, 0x61, 0xCC, 0x83,\n\t0xCD, 0x03, 0x61, 0xCC, 0x84, 0xCD, 0x03, 0x61,\n\t0xCC, 0x89, 0xCD, 0x03, 0x61, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x61, 0xCC, 0x8F, 0xCD, 0x03, 0x61, 0xCC,\n\t// Bytes 3200 - 323f\n\t0x91, 0xCD, 0x03, 0x61, 0xCC, 0xA5, 0xB9, 0x03,\n\t0x61, 0xCC, 0xA8, 0xA9, 0x03, 0x62, 0xCC, 0x87,\n\t0xCD, 0x03, 0x62, 0xCC, 0xA3, 0xB9, 0x03, 0x62,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x63, 0xCC, 0x81, 0xCD,\n\t0x03, 0x63, 0xCC, 0x82, 0xCD, 0x03, 0x63, 0xCC,\n\t0x87, 0xCD, 0x03, 0x63, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x64, 0xCC, 0x87, 0xCD, 0x03, 0x64, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x64, 0xCC, 0xA3, 0xB9, 0x03, 0x64,\n\t// Bytes 3240 - 327f\n\t0xCC, 0xA7, 0xA9, 0x03, 0x64, 0xCC, 0xAD, 0xB9,\n\t0x03, 0x64, 0xCC, 0xB1, 0xB9, 0x03, 0x65, 0xCC,\n\t0x80, 0xCD, 0x03, 0x65, 0xCC, 0x81, 0xCD, 0x03,\n\t0x65, 0xCC, 0x83, 0xCD, 0x03, 0x65, 0xCC, 0x86,\n\t0xCD, 0x03, 0x65, 0xCC, 0x87, 0xCD, 0x03, 0x65,\n\t0xCC, 0x88, 0xCD, 0x03, 0x65, 0xCC, 0x89, 0xCD,\n\t0x03, 0x65, 0xCC, 0x8C, 0xCD, 0x03, 0x65, 0xCC,\n\t0x8F, 0xCD, 0x03, 0x65, 0xCC, 0x91, 0xCD, 0x03,\n\t// Bytes 3280 - 32bf\n\t0x65, 0xCC, 0xA8, 0xA9, 0x03, 0x65, 0xCC, 0xAD,\n\t0xB9, 0x03, 0x65, 0xCC, 0xB0, 0xB9, 0x03, 0x66,\n\t0xCC, 0x87, 0xCD, 0x03, 0x67, 0xCC, 0x81, 0xCD,\n\t0x03, 0x67, 0xCC, 0x82, 0xCD, 0x03, 0x67, 0xCC,\n\t0x84, 0xCD, 0x03, 0x67, 0xCC, 0x86, 0xCD, 0x03,\n\t0x67, 0xCC, 0x87, 0xCD, 0x03, 0x67, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x67, 0xCC, 0xA7, 0xA9, 0x03, 0x68,\n\t0xCC, 0x82, 0xCD, 0x03, 0x68, 0xCC, 0x87, 0xCD,\n\t// Bytes 32c0 - 32ff\n\t0x03, 0x68, 0xCC, 0x88, 0xCD, 0x03, 0x68, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x68, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x68, 0xCC, 0xA7, 0xA9, 0x03, 0x68, 0xCC, 0xAE,\n\t0xB9, 0x03, 0x68, 0xCC, 0xB1, 0xB9, 0x03, 0x69,\n\t0xCC, 0x80, 0xCD, 0x03, 0x69, 0xCC, 0x81, 0xCD,\n\t0x03, 0x69, 0xCC, 0x82, 0xCD, 0x03, 0x69, 0xCC,\n\t0x83, 0xCD, 0x03, 0x69, 0xCC, 0x84, 0xCD, 0x03,\n\t0x69, 0xCC, 0x86, 0xCD, 0x03, 0x69, 0xCC, 0x89,\n\t// Bytes 3300 - 333f\n\t0xCD, 0x03, 0x69, 0xCC, 0x8C, 0xCD, 0x03, 0x69,\n\t0xCC, 0x8F, 0xCD, 0x03, 0x69, 0xCC, 0x91, 0xCD,\n\t0x03, 0x69, 0xCC, 0xA3, 0xB9, 0x03, 0x69, 0xCC,\n\t0xA8, 0xA9, 0x03, 0x69, 0xCC, 0xB0, 0xB9, 0x03,\n\t0x6A, 0xCC, 0x82, 0xCD, 0x03, 0x6A, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x6B, 0xCC, 0x81, 0xCD, 0x03, 0x6B,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x6B, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x6B, 0xCC, 0xA7, 0xA9, 0x03, 0x6B, 0xCC,\n\t// Bytes 3340 - 337f\n\t0xB1, 0xB9, 0x03, 0x6C, 0xCC, 0x81, 0xCD, 0x03,\n\t0x6C, 0xCC, 0x8C, 0xCD, 0x03, 0x6C, 0xCC, 0xA7,\n\t0xA9, 0x03, 0x6C, 0xCC, 0xAD, 0xB9, 0x03, 0x6C,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x6D, 0xCC, 0x81, 0xCD,\n\t0x03, 0x6D, 0xCC, 0x87, 0xCD, 0x03, 0x6D, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x6E, 0xCC, 0x80, 0xCD, 0x03,\n\t0x6E, 0xCC, 0x81, 0xCD, 0x03, 0x6E, 0xCC, 0x83,\n\t0xCD, 0x03, 0x6E, 0xCC, 0x87, 0xCD, 0x03, 0x6E,\n\t// Bytes 3380 - 33bf\n\t0xCC, 0x8C, 0xCD, 0x03, 0x6E, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x6E, 0xCC, 0xA7, 0xA9, 0x03, 0x6E, 0xCC,\n\t0xAD, 0xB9, 0x03, 0x6E, 0xCC, 0xB1, 0xB9, 0x03,\n\t0x6F, 0xCC, 0x80, 0xCD, 0x03, 0x6F, 0xCC, 0x81,\n\t0xCD, 0x03, 0x6F, 0xCC, 0x86, 0xCD, 0x03, 0x6F,\n\t0xCC, 0x89, 0xCD, 0x03, 0x6F, 0xCC, 0x8B, 0xCD,\n\t0x03, 0x6F, 0xCC, 0x8C, 0xCD, 0x03, 0x6F, 0xCC,\n\t0x8F, 0xCD, 0x03, 0x6F, 0xCC, 0x91, 0xCD, 0x03,\n\t// Bytes 33c0 - 33ff\n\t0x70, 0xCC, 0x81, 0xCD, 0x03, 0x70, 0xCC, 0x87,\n\t0xCD, 0x03, 0x72, 0xCC, 0x81, 0xCD, 0x03, 0x72,\n\t0xCC, 0x87, 0xCD, 0x03, 0x72, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x72, 0xCC, 0x8F, 0xCD, 0x03, 0x72, 0xCC,\n\t0x91, 0xCD, 0x03, 0x72, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x72, 0xCC, 0xB1, 0xB9, 0x03, 0x73, 0xCC, 0x82,\n\t0xCD, 0x03, 0x73, 0xCC, 0x87, 0xCD, 0x03, 0x73,\n\t0xCC, 0xA6, 0xB9, 0x03, 0x73, 0xCC, 0xA7, 0xA9,\n\t// Bytes 3400 - 343f\n\t0x03, 0x74, 0xCC, 0x87, 0xCD, 0x03, 0x74, 0xCC,\n\t0x88, 0xCD, 0x03, 0x74, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x74, 0xCC, 0xA3, 0xB9, 0x03, 0x74, 0xCC, 0xA6,\n\t0xB9, 0x03, 0x74, 0xCC, 0xA7, 0xA9, 0x03, 0x74,\n\t0xCC, 0xAD, 0xB9, 0x03, 0x74, 0xCC, 0xB1, 0xB9,\n\t0x03, 0x75, 0xCC, 0x80, 0xCD, 0x03, 0x75, 0xCC,\n\t0x81, 0xCD, 0x03, 0x75, 0xCC, 0x82, 0xCD, 0x03,\n\t0x75, 0xCC, 0x86, 0xCD, 0x03, 0x75, 0xCC, 0x89,\n\t// Bytes 3440 - 347f\n\t0xCD, 0x03, 0x75, 0xCC, 0x8A, 0xCD, 0x03, 0x75,\n\t0xCC, 0x8B, 0xCD, 0x03, 0x75, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x75, 0xCC, 0x8F, 0xCD, 0x03, 0x75, 0xCC,\n\t0x91, 0xCD, 0x03, 0x75, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x75, 0xCC, 0xA4, 0xB9, 0x03, 0x75, 0xCC, 0xA8,\n\t0xA9, 0x03, 0x75, 0xCC, 0xAD, 0xB9, 0x03, 0x75,\n\t0xCC, 0xB0, 0xB9, 0x03, 0x76, 0xCC, 0x83, 0xCD,\n\t0x03, 0x76, 0xCC, 0xA3, 0xB9, 0x03, 0x77, 0xCC,\n\t// Bytes 3480 - 34bf\n\t0x80, 0xCD, 0x03, 0x77, 0xCC, 0x81, 0xCD, 0x03,\n\t0x77, 0xCC, 0x82, 0xCD, 0x03, 0x77, 0xCC, 0x87,\n\t0xCD, 0x03, 0x77, 0xCC, 0x88, 0xCD, 0x03, 0x77,\n\t0xCC, 0x8A, 0xCD, 0x03, 0x77, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x78, 0xCC, 0x87, 0xCD, 0x03, 0x78, 0xCC,\n\t0x88, 0xCD, 0x03, 0x79, 0xCC, 0x80, 0xCD, 0x03,\n\t0x79, 0xCC, 0x81, 0xCD, 0x03, 0x79, 0xCC, 0x82,\n\t0xCD, 0x03, 0x79, 0xCC, 0x83, 0xCD, 0x03, 0x79,\n\t// Bytes 34c0 - 34ff\n\t0xCC, 0x84, 0xCD, 0x03, 0x79, 0xCC, 0x87, 0xCD,\n\t0x03, 0x79, 0xCC, 0x88, 0xCD, 0x03, 0x79, 0xCC,\n\t0x89, 0xCD, 0x03, 0x79, 0xCC, 0x8A, 0xCD, 0x03,\n\t0x79, 0xCC, 0xA3, 0xB9, 0x03, 0x7A, 0xCC, 0x81,\n\t0xCD, 0x03, 0x7A, 0xCC, 0x82, 0xCD, 0x03, 0x7A,\n\t0xCC, 0x87, 0xCD, 0x03, 0x7A, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x7A, 0xCC, 0xA3, 0xB9, 0x03, 0x7A, 0xCC,\n\t0xB1, 0xB9, 0x04, 0xC2, 0xA8, 0xCC, 0x80, 0xCE,\n\t// Bytes 3500 - 353f\n\t0x04, 0xC2, 0xA8, 0xCC, 0x81, 0xCE, 0x04, 0xC2,\n\t0xA8, 0xCD, 0x82, 0xCE, 0x04, 0xC3, 0x86, 0xCC,\n\t0x81, 0xCD, 0x04, 0xC3, 0x86, 0xCC, 0x84, 0xCD,\n\t0x04, 0xC3, 0x98, 0xCC, 0x81, 0xCD, 0x04, 0xC3,\n\t0xA6, 0xCC, 0x81, 0xCD, 0x04, 0xC3, 0xA6, 0xCC,\n\t0x84, 0xCD, 0x04, 0xC3, 0xB8, 0xCC, 0x81, 0xCD,\n\t0x04, 0xC5, 0xBF, 0xCC, 0x87, 0xCD, 0x04, 0xC6,\n\t0xB7, 0xCC, 0x8C, 0xCD, 0x04, 0xCA, 0x92, 0xCC,\n\t// Bytes 3540 - 357f\n\t0x8C, 0xCD, 0x04, 0xCE, 0x91, 0xCC, 0x80, 0xCD,\n\t0x04, 0xCE, 0x91, 0xCC, 0x81, 0xCD, 0x04, 0xCE,\n\t0x91, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0x91, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0x91, 0xCD, 0x85, 0xDD,\n\t0x04, 0xCE, 0x95, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0x95, 0xCC, 0x81, 0xCD, 0x04, 0xCE, 0x97, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0x97, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0x97, 0xCD, 0x85, 0xDD, 0x04, 0xCE,\n\t// Bytes 3580 - 35bf\n\t0x99, 0xCC, 0x80, 0xCD, 0x04, 0xCE, 0x99, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCE, 0x99, 0xCC, 0x84, 0xCD,\n\t0x04, 0xCE, 0x99, 0xCC, 0x86, 0xCD, 0x04, 0xCE,\n\t0x99, 0xCC, 0x88, 0xCD, 0x04, 0xCE, 0x9F, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0x9F, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0xA1, 0xCC, 0x94, 0xCD, 0x04, 0xCE,\n\t0xA5, 0xCC, 0x80, 0xCD, 0x04, 0xCE, 0xA5, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCE, 0xA5, 0xCC, 0x84, 0xCD,\n\t// Bytes 35c0 - 35ff\n\t0x04, 0xCE, 0xA5, 0xCC, 0x86, 0xCD, 0x04, 0xCE,\n\t0xA5, 0xCC, 0x88, 0xCD, 0x04, 0xCE, 0xA9, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0xA9, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0xA9, 0xCD, 0x85, 0xDD, 0x04, 0xCE,\n\t0xB1, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0xB1, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0xB1, 0xCD, 0x85, 0xDD,\n\t0x04, 0xCE, 0xB5, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0xB5, 0xCC, 0x81, 0xCD, 0x04, 0xCE, 0xB7, 0xCD,\n\t// Bytes 3600 - 363f\n\t0x85, 0xDD, 0x04, 0xCE, 0xB9, 0xCC, 0x80, 0xCD,\n\t0x04, 0xCE, 0xB9, 0xCC, 0x81, 0xCD, 0x04, 0xCE,\n\t0xB9, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0xB9, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0xB9, 0xCD, 0x82, 0xCD,\n\t0x04, 0xCE, 0xBF, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0xBF, 0xCC, 0x81, 0xCD, 0x04, 0xCF, 0x81, 0xCC,\n\t0x93, 0xCD, 0x04, 0xCF, 0x81, 0xCC, 0x94, 0xCD,\n\t0x04, 0xCF, 0x85, 0xCC, 0x80, 0xCD, 0x04, 0xCF,\n\t// Bytes 3640 - 367f\n\t0x85, 0xCC, 0x81, 0xCD, 0x04, 0xCF, 0x85, 0xCC,\n\t0x84, 0xCD, 0x04, 0xCF, 0x85, 0xCC, 0x86, 0xCD,\n\t0x04, 0xCF, 0x85, 0xCD, 0x82, 0xCD, 0x04, 0xCF,\n\t0x89, 0xCD, 0x85, 0xDD, 0x04, 0xCF, 0x92, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCF, 0x92, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0x86, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0x90, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0x90, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0x93, 0xCC, 0x81, 0xCD,\n\t// Bytes 3680 - 36bf\n\t0x04, 0xD0, 0x95, 0xCC, 0x80, 0xCD, 0x04, 0xD0,\n\t0x95, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0x95, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0x96, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0x96, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0x97, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0x98, 0xCC,\n\t0x80, 0xCD, 0x04, 0xD0, 0x98, 0xCC, 0x84, 0xCD,\n\t0x04, 0xD0, 0x98, 0xCC, 0x86, 0xCD, 0x04, 0xD0,\n\t0x98, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0x9A, 0xCC,\n\t// Bytes 36c0 - 36ff\n\t0x81, 0xCD, 0x04, 0xD0, 0x9E, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0xA3, 0xCC, 0x84, 0xCD, 0x04, 0xD0,\n\t0xA3, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0xA3, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xA3, 0xCC, 0x8B, 0xCD,\n\t0x04, 0xD0, 0xA7, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0xAB, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0xAD, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xB0, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0xB0, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t// Bytes 3700 - 373f\n\t0xB3, 0xCC, 0x81, 0xCD, 0x04, 0xD0, 0xB5, 0xCC,\n\t0x80, 0xCD, 0x04, 0xD0, 0xB5, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0xB5, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0xB6, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0xB6, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xB7, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0xB8, 0xCC, 0x80, 0xCD, 0x04, 0xD0,\n\t0xB8, 0xCC, 0x84, 0xCD, 0x04, 0xD0, 0xB8, 0xCC,\n\t0x86, 0xCD, 0x04, 0xD0, 0xB8, 0xCC, 0x88, 0xCD,\n\t// Bytes 3740 - 377f\n\t0x04, 0xD0, 0xBA, 0xCC, 0x81, 0xCD, 0x04, 0xD0,\n\t0xBE, 0xCC, 0x88, 0xCD, 0x04, 0xD1, 0x83, 0xCC,\n\t0x84, 0xCD, 0x04, 0xD1, 0x83, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD1, 0x83, 0xCC, 0x88, 0xCD, 0x04, 0xD1,\n\t0x83, 0xCC, 0x8B, 0xCD, 0x04, 0xD1, 0x87, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD1, 0x8B, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD1, 0x8D, 0xCC, 0x88, 0xCD, 0x04, 0xD1,\n\t0x96, 0xCC, 0x88, 0xCD, 0x04, 0xD1, 0xB4, 0xCC,\n\t// Bytes 3780 - 37bf\n\t0x8F, 0xCD, 0x04, 0xD1, 0xB5, 0xCC, 0x8F, 0xCD,\n\t0x04, 0xD3, 0x98, 0xCC, 0x88, 0xCD, 0x04, 0xD3,\n\t0x99, 0xCC, 0x88, 0xCD, 0x04, 0xD3, 0xA8, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD3, 0xA9, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD8, 0xA7, 0xD9, 0x93, 0xCD, 0x04, 0xD8,\n\t0xA7, 0xD9, 0x94, 0xCD, 0x04, 0xD8, 0xA7, 0xD9,\n\t0x95, 0xB9, 0x04, 0xD9, 0x88, 0xD9, 0x94, 0xCD,\n\t0x04, 0xD9, 0x8A, 0xD9, 0x94, 0xCD, 0x04, 0xDB,\n\t// Bytes 37c0 - 37ff\n\t0x81, 0xD9, 0x94, 0xCD, 0x04, 0xDB, 0x92, 0xD9,\n\t0x94, 0xCD, 0x04, 0xDB, 0x95, 0xD9, 0x94, 0xCD,\n\t0x05, 0x41, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05,\n\t0x41, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x41,\n\t0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x41, 0xCC,\n\t0x82, 0xCC, 0x89, 0xCE, 0x05, 0x41, 0xCC, 0x86,\n\t0xCC, 0x80, 0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC,\n\t0x81, 0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC, 0x83,\n\t// Bytes 3800 - 383f\n\t0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC, 0x89, 0xCE,\n\t0x05, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05,\n\t0x41, 0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x41,\n\t0xCC, 0x8A, 0xCC, 0x81, 0xCE, 0x05, 0x41, 0xCC,\n\t0xA3, 0xCC, 0x82, 0xCE, 0x05, 0x41, 0xCC, 0xA3,\n\t0xCC, 0x86, 0xCE, 0x05, 0x43, 0xCC, 0xA7, 0xCC,\n\t0x81, 0xCE, 0x05, 0x45, 0xCC, 0x82, 0xCC, 0x80,\n\t0xCE, 0x05, 0x45, 0xCC, 0x82, 0xCC, 0x81, 0xCE,\n\t// Bytes 3840 - 387f\n\t0x05, 0x45, 0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05,\n\t0x45, 0xCC, 0x82, 0xCC, 0x89, 0xCE, 0x05, 0x45,\n\t0xCC, 0x84, 0xCC, 0x80, 0xCE, 0x05, 0x45, 0xCC,\n\t0x84, 0xCC, 0x81, 0xCE, 0x05, 0x45, 0xCC, 0xA3,\n\t0xCC, 0x82, 0xCE, 0x05, 0x45, 0xCC, 0xA7, 0xCC,\n\t0x86, 0xCE, 0x05, 0x49, 0xCC, 0x88, 0xCC, 0x81,\n\t0xCE, 0x05, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, 0xCE,\n\t0x05, 0x4F, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05,\n\t// Bytes 3880 - 38bf\n\t0x4F, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x4F,\n\t0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x4F, 0xCC,\n\t0x82, 0xCC, 0x89, 0xCE, 0x05, 0x4F, 0xCC, 0x83,\n\t0xCC, 0x81, 0xCE, 0x05, 0x4F, 0xCC, 0x83, 0xCC,\n\t0x84, 0xCE, 0x05, 0x4F, 0xCC, 0x83, 0xCC, 0x88,\n\t0xCE, 0x05, 0x4F, 0xCC, 0x84, 0xCC, 0x80, 0xCE,\n\t0x05, 0x4F, 0xCC, 0x84, 0xCC, 0x81, 0xCE, 0x05,\n\t0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x4F,\n\t// Bytes 38c0 - 38ff\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x4F, 0xCC,\n\t0x9B, 0xCC, 0x80, 0xCE, 0x05, 0x4F, 0xCC, 0x9B,\n\t0xCC, 0x81, 0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC,\n\t0x83, 0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0x89,\n\t0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA,\n\t0x05, 0x4F, 0xCC, 0xA3, 0xCC, 0x82, 0xCE, 0x05,\n\t0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xCE, 0x05, 0x52,\n\t0xCC, 0xA3, 0xCC, 0x84, 0xCE, 0x05, 0x53, 0xCC,\n\t// Bytes 3900 - 393f\n\t0x81, 0xCC, 0x87, 0xCE, 0x05, 0x53, 0xCC, 0x8C,\n\t0xCC, 0x87, 0xCE, 0x05, 0x53, 0xCC, 0xA3, 0xCC,\n\t0x87, 0xCE, 0x05, 0x55, 0xCC, 0x83, 0xCC, 0x81,\n\t0xCE, 0x05, 0x55, 0xCC, 0x84, 0xCC, 0x88, 0xCE,\n\t0x05, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x05,\n\t0x55, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x05, 0x55,\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x55, 0xCC,\n\t0x88, 0xCC, 0x8C, 0xCE, 0x05, 0x55, 0xCC, 0x9B,\n\t// Bytes 3940 - 397f\n\t0xCC, 0x80, 0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC,\n\t0x81, 0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC, 0x83,\n\t0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC, 0x89, 0xCE,\n\t0x05, 0x55, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05,\n\t0x61, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05, 0x61,\n\t0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x61, 0xCC,\n\t0x82, 0xCC, 0x83, 0xCE, 0x05, 0x61, 0xCC, 0x82,\n\t0xCC, 0x89, 0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC,\n\t// Bytes 3980 - 39bf\n\t0x80, 0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC, 0x81,\n\t0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xCE,\n\t0x05, 0x61, 0xCC, 0x86, 0xCC, 0x89, 0xCE, 0x05,\n\t0x61, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x61,\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x61, 0xCC,\n\t0x8A, 0xCC, 0x81, 0xCE, 0x05, 0x61, 0xCC, 0xA3,\n\t0xCC, 0x82, 0xCE, 0x05, 0x61, 0xCC, 0xA3, 0xCC,\n\t0x86, 0xCE, 0x05, 0x63, 0xCC, 0xA7, 0xCC, 0x81,\n\t// Bytes 39c0 - 39ff\n\t0xCE, 0x05, 0x65, 0xCC, 0x82, 0xCC, 0x80, 0xCE,\n\t0x05, 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05,\n\t0x65, 0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x65,\n\t0xCC, 0x82, 0xCC, 0x89, 0xCE, 0x05, 0x65, 0xCC,\n\t0x84, 0xCC, 0x80, 0xCE, 0x05, 0x65, 0xCC, 0x84,\n\t0xCC, 0x81, 0xCE, 0x05, 0x65, 0xCC, 0xA3, 0xCC,\n\t0x82, 0xCE, 0x05, 0x65, 0xCC, 0xA7, 0xCC, 0x86,\n\t0xCE, 0x05, 0x69, 0xCC, 0x88, 0xCC, 0x81, 0xCE,\n\t// Bytes 3a00 - 3a3f\n\t0x05, 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xCE, 0x05,\n\t0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05, 0x6F,\n\t0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x6F, 0xCC,\n\t0x82, 0xCC, 0x83, 0xCE, 0x05, 0x6F, 0xCC, 0x82,\n\t0xCC, 0x89, 0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC,\n\t0x81, 0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC, 0x84,\n\t0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xCE,\n\t0x05, 0x6F, 0xCC, 0x84, 0xCC, 0x80, 0xCE, 0x05,\n\t// Bytes 3a40 - 3a7f\n\t0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xCE, 0x05, 0x6F,\n\t0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x6F, 0xCC,\n\t0x88, 0xCC, 0x84, 0xCE, 0x05, 0x6F, 0xCC, 0x9B,\n\t0xCC, 0x80, 0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC,\n\t0x81, 0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0x83,\n\t0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xCE,\n\t0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05,\n\t0x6F, 0xCC, 0xA3, 0xCC, 0x82, 0xCE, 0x05, 0x6F,\n\t// Bytes 3a80 - 3abf\n\t0xCC, 0xA8, 0xCC, 0x84, 0xCE, 0x05, 0x72, 0xCC,\n\t0xA3, 0xCC, 0x84, 0xCE, 0x05, 0x73, 0xCC, 0x81,\n\t0xCC, 0x87, 0xCE, 0x05, 0x73, 0xCC, 0x8C, 0xCC,\n\t0x87, 0xCE, 0x05, 0x73, 0xCC, 0xA3, 0xCC, 0x87,\n\t0xCE, 0x05, 0x75, 0xCC, 0x83, 0xCC, 0x81, 0xCE,\n\t0x05, 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xCE, 0x05,\n\t0x75, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x05, 0x75,\n\t0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x05, 0x75, 0xCC,\n\t// Bytes 3ac0 - 3aff\n\t0x88, 0xCC, 0x84, 0xCE, 0x05, 0x75, 0xCC, 0x88,\n\t0xCC, 0x8C, 0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC,\n\t0x80, 0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x81,\n\t0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xCE,\n\t0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x89, 0xCE, 0x05,\n\t0x75, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05, 0xE1,\n\t0xBE, 0xBF, 0xCC, 0x80, 0xCE, 0x05, 0xE1, 0xBE,\n\t0xBF, 0xCC, 0x81, 0xCE, 0x05, 0xE1, 0xBE, 0xBF,\n\t// Bytes 3b00 - 3b3f\n\t0xCD, 0x82, 0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCC,\n\t0x80, 0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCC, 0x81,\n\t0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCD, 0x82, 0xCE,\n\t0x05, 0xE2, 0x86, 0x90, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x86, 0x92, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x86, 0x94, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87,\n\t0x90, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87, 0x92,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87, 0x94, 0xCC,\n\t// Bytes 3b40 - 3b7f\n\t0xB8, 0x05, 0x05, 0xE2, 0x88, 0x83, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x88, 0x88, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x88, 0x8B, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x88, 0xA3, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x88, 0xA5, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x88,\n\t0xBC, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0x83,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0x85, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x89, 0x88, 0xCC, 0xB8,\n\t// Bytes 3b80 - 3bbf\n\t0x05, 0x05, 0xE2, 0x89, 0x8D, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x89, 0xA1, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x89, 0xA4, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x89, 0xA5, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89,\n\t0xB2, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB3,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB6, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB7, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x89, 0xBA, 0xCC, 0xB8, 0x05,\n\t// Bytes 3bc0 - 3bff\n\t0x05, 0xE2, 0x89, 0xBB, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x89, 0xBC, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x89, 0xBD, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A,\n\t0x82, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x83,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x86, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x87, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x8A, 0x91, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x8A, 0x92, 0xCC, 0xB8, 0x05, 0x05,\n\t// Bytes 3c00 - 3c3f\n\t0xE2, 0x8A, 0xA2, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x8A, 0xA8, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A,\n\t0xA9, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xAB,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xB2, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xB3, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x8A, 0xB4, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x8A, 0xB5, 0xCC, 0xB8, 0x05, 0x06,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3c40 - 3c7f\n\t0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3c80 - 3cbf\n\t0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3cc0 - 3cff\n\t0xCE, 0x9F, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3d00 - 3d3f\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3d40 - 3d7f\n\t0xCE, 0xB7, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3d80 - 3dbf\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3dc0 - 3dff\n\t0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3e00 - 3e3f\n\t0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xE0, 0xA4, 0xA8, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t// Bytes 3e40 - 3e7f\n\t0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t0xE0, 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t0xE0, 0xA7, 0x87, 0xE0, 0xA6, 0xBE, 0x01, 0x06,\n\t0xE0, 0xA7, 0x87, 0xE0, 0xA7, 0x97, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAC, 0xBE, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x96, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x97, 0x01, 0x06,\n\t0xE0, 0xAE, 0x92, 0xE0, 0xAF, 0x97, 0x01, 0x06,\n\t// Bytes 3e80 - 3ebf\n\t0xE0, 0xAF, 0x86, 0xE0, 0xAE, 0xBE, 0x01, 0x06,\n\t0xE0, 0xAF, 0x86, 0xE0, 0xAF, 0x97, 0x01, 0x06,\n\t0xE0, 0xAF, 0x87, 0xE0, 0xAE, 0xBE, 0x01, 0x06,\n\t0xE0, 0xB1, 0x86, 0xE0, 0xB1, 0x96, 0x89, 0x06,\n\t0xE0, 0xB2, 0xBF, 0xE0, 0xB3, 0x95, 0x01, 0x06,\n\t0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, 0x01, 0x06,\n\t0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0x01, 0x06,\n\t0xE0, 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0x01, 0x06,\n\t// Bytes 3ec0 - 3eff\n\t0xE0, 0xB5, 0x86, 0xE0, 0xB5, 0x97, 0x01, 0x06,\n\t0xE0, 0xB5, 0x87, 0xE0, 0xB4, 0xBE, 0x01, 0x06,\n\t0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x8A, 0x15, 0x06,\n\t0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x9F, 0x01, 0x06,\n\t0xE1, 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0x01, 0x06,\n\t0xE1, 0xAC, 0x85, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x87, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x89, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t// Bytes 3f00 - 3f3f\n\t0xE1, 0xAC, 0x8B, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x8D, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x91, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBA, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBC, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBE, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBF, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAD, 0x82, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t// Bytes 3f40 - 3f7f\n\t0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x91, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x93, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x95, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x97, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 3f80 - 3fbf\n\t0xE3, 0x81, 0x99, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA4, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA6, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA8, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 3fc0 - 3fff\n\t0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB5, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB5, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB8, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB8, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t// Bytes 4000 - 403f\n\t0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x82, 0x9D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xA6, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4040 - 407f\n\t0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB5, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB7, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB9, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBD, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4080 - 40bf\n\t0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 40c0 - 40ff\n\t0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4100 - 413f\n\t0xE3, 0x83, 0xB2, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xBD, 0xE3, 0x82, 0x99, 0x11, 0x08,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x91,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t// Bytes 4140 - 417f\n\t0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x82,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x93,\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97,\n\t// Bytes 4180 - 41bf\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xA9,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82,\n\t// Bytes 41c0 - 41ff\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x93,\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x80,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t// Bytes 4200 - 423f\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x93,\n\t// Bytes 4240 - 427f\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t0xF0, 0x91, 0x82, 0x99, 0xF0, 0x91, 0x82, 0xBA,\n\t// Bytes 4280 - 42bf\n\t0x0D, 0x08, 0xF0, 0x91, 0x82, 0x9B, 0xF0, 0x91,\n\t0x82, 0xBA, 0x0D, 0x08, 0xF0, 0x91, 0x82, 0xA5,\n\t0xF0, 0x91, 0x82, 0xBA, 0x0D, 0x08, 0xF0, 0x91,\n\t0x84, 0xB1, 0xF0, 0x91, 0x84, 0xA7, 0x01, 0x08,\n\t0xF0, 0x91, 0x84, 0xB2, 0xF0, 0x91, 0x84, 0xA7,\n\t0x01, 0x08, 0xF0, 0x91, 0x8D, 0x87, 0xF0, 0x91,\n\t0x8C, 0xBE, 0x01, 0x08, 0xF0, 0x91, 0x8D, 0x87,\n\t0xF0, 0x91, 0x8D, 0x97, 0x01, 0x08, 0xF0, 0x91,\n\t// Bytes 42c0 - 42ff\n\t0x92, 0xB9, 0xF0, 0x91, 0x92, 0xB0, 0x01, 0x08,\n\t0xF0, 0x91, 0x92, 0xB9, 0xF0, 0x91, 0x92, 0xBA,\n\t0x01, 0x08, 0xF0, 0x91, 0x92, 0xB9, 0xF0, 0x91,\n\t0x92, 0xBD, 0x01, 0x08, 0xF0, 0x91, 0x96, 0xB8,\n\t0xF0, 0x91, 0x96, 0xAF, 0x01, 0x08, 0xF0, 0x91,\n\t0x96, 0xB9, 0xF0, 0x91, 0x96, 0xAF, 0x01, 0x08,\n\t0xF0, 0x91, 0xA4, 0xB5, 0xF0, 0x91, 0xA4, 0xB0,\n\t0x01, 0x09, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x82,\n\t// Bytes 4300 - 433f\n\t0xE0, 0xB3, 0x95, 0x02, 0x09, 0xE0, 0xB7, 0x99,\n\t0xE0, 0xB7, 0x8F, 0xE0, 0xB7, 0x8A, 0x16, 0x42,\n\t0xC2, 0xB4, 0x01, 0x43, 0x20, 0xCC, 0x81, 0xCD,\n\t0x43, 0x20, 0xCC, 0x83, 0xCD, 0x43, 0x20, 0xCC,\n\t0x84, 0xCD, 0x43, 0x20, 0xCC, 0x85, 0xCD, 0x43,\n\t0x20, 0xCC, 0x86, 0xCD, 0x43, 0x20, 0xCC, 0x87,\n\t0xCD, 0x43, 0x20, 0xCC, 0x88, 0xCD, 0x43, 0x20,\n\t0xCC, 0x8A, 0xCD, 0x43, 0x20, 0xCC, 0x8B, 0xCD,\n\t// Bytes 4340 - 437f\n\t0x43, 0x20, 0xCC, 0x93, 0xCD, 0x43, 0x20, 0xCC,\n\t0x94, 0xCD, 0x43, 0x20, 0xCC, 0xA7, 0xA9, 0x43,\n\t0x20, 0xCC, 0xA8, 0xA9, 0x43, 0x20, 0xCC, 0xB3,\n\t0xB9, 0x43, 0x20, 0xCD, 0x82, 0xCD, 0x43, 0x20,\n\t0xCD, 0x85, 0xDD, 0x43, 0x20, 0xD9, 0x8B, 0x5D,\n\t0x43, 0x20, 0xD9, 0x8C, 0x61, 0x43, 0x20, 0xD9,\n\t0x8D, 0x65, 0x43, 0x20, 0xD9, 0x8E, 0x69, 0x43,\n\t0x20, 0xD9, 0x8F, 0x6D, 0x43, 0x20, 0xD9, 0x90,\n\t// Bytes 4380 - 43bf\n\t0x71, 0x43, 0x20, 0xD9, 0x91, 0x75, 0x43, 0x20,\n\t0xD9, 0x92, 0x79, 0x43, 0x41, 0xCC, 0x8A, 0xCD,\n\t0x43, 0x73, 0xCC, 0x87, 0xCD, 0x44, 0x20, 0xE3,\n\t0x82, 0x99, 0x11, 0x44, 0x20, 0xE3, 0x82, 0x9A,\n\t0x11, 0x44, 0xC2, 0xA8, 0xCC, 0x81, 0xCE, 0x44,\n\t0xCE, 0x91, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0x95,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0x97, 0xCC, 0x81,\n\t0xCD, 0x44, 0xCE, 0x99, 0xCC, 0x81, 0xCD, 0x44,\n\t// Bytes 43c0 - 43ff\n\t0xCE, 0x9F, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xA5,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xA5, 0xCC, 0x88,\n\t0xCD, 0x44, 0xCE, 0xA9, 0xCC, 0x81, 0xCD, 0x44,\n\t0xCE, 0xB1, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xB5,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xB7, 0xCC, 0x81,\n\t0xCD, 0x44, 0xCE, 0xB9, 0xCC, 0x81, 0xCD, 0x44,\n\t0xCE, 0xBF, 0xCC, 0x81, 0xCD, 0x44, 0xCF, 0x85,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCF, 0x89, 0xCC, 0x81,\n\t// Bytes 4400 - 443f\n\t0xCD, 0x44, 0xD7, 0x90, 0xD6, 0xB7, 0x35, 0x44,\n\t0xD7, 0x90, 0xD6, 0xB8, 0x39, 0x44, 0xD7, 0x90,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x91, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x91, 0xD6, 0xBF, 0x4D, 0x44,\n\t0xD7, 0x92, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x93,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x94, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x95, 0xD6, 0xB9, 0x3D, 0x44,\n\t0xD7, 0x95, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x96,\n\t// Bytes 4440 - 447f\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x98, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x99, 0xD6, 0xB4, 0x29, 0x44,\n\t0xD7, 0x99, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x9A,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x9B, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x9B, 0xD6, 0xBF, 0x4D, 0x44,\n\t0xD7, 0x9C, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x9E,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA0, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0xA1, 0xD6, 0xBC, 0x45, 0x44,\n\t// Bytes 4480 - 44bf\n\t0xD7, 0xA3, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA4,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA4, 0xD6, 0xBF,\n\t0x4D, 0x44, 0xD7, 0xA6, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0xA7, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA8,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA9, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0xA9, 0xD7, 0x81, 0x51, 0x44,\n\t0xD7, 0xA9, 0xD7, 0x82, 0x55, 0x44, 0xD7, 0xAA,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xB2, 0xD6, 0xB7,\n\t// Bytes 44c0 - 44ff\n\t0x35, 0x44, 0xD8, 0xA7, 0xD9, 0x8B, 0x5D, 0x44,\n\t0xD8, 0xA7, 0xD9, 0x93, 0xCD, 0x44, 0xD8, 0xA7,\n\t0xD9, 0x94, 0xCD, 0x44, 0xD8, 0xA7, 0xD9, 0x95,\n\t0xB9, 0x44, 0xD8, 0xB0, 0xD9, 0xB0, 0x7D, 0x44,\n\t0xD8, 0xB1, 0xD9, 0xB0, 0x7D, 0x44, 0xD9, 0x80,\n\t0xD9, 0x8B, 0x5D, 0x44, 0xD9, 0x80, 0xD9, 0x8E,\n\t0x69, 0x44, 0xD9, 0x80, 0xD9, 0x8F, 0x6D, 0x44,\n\t0xD9, 0x80, 0xD9, 0x90, 0x71, 0x44, 0xD9, 0x80,\n\t// Bytes 4500 - 453f\n\t0xD9, 0x91, 0x75, 0x44, 0xD9, 0x80, 0xD9, 0x92,\n\t0x79, 0x44, 0xD9, 0x87, 0xD9, 0xB0, 0x7D, 0x44,\n\t0xD9, 0x88, 0xD9, 0x94, 0xCD, 0x44, 0xD9, 0x89,\n\t0xD9, 0xB0, 0x7D, 0x44, 0xD9, 0x8A, 0xD9, 0x94,\n\t0xCD, 0x44, 0xDB, 0x92, 0xD9, 0x94, 0xCD, 0x44,\n\t0xDB, 0x95, 0xD9, 0x94, 0xCD, 0x45, 0x20, 0xCC,\n\t0x88, 0xCC, 0x80, 0xCE, 0x45, 0x20, 0xCC, 0x88,\n\t0xCC, 0x81, 0xCE, 0x45, 0x20, 0xCC, 0x88, 0xCD,\n\t// Bytes 4540 - 457f\n\t0x82, 0xCE, 0x45, 0x20, 0xCC, 0x93, 0xCC, 0x80,\n\t0xCE, 0x45, 0x20, 0xCC, 0x93, 0xCC, 0x81, 0xCE,\n\t0x45, 0x20, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x45,\n\t0x20, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x45, 0x20,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x45, 0x20, 0xCC,\n\t0x94, 0xCD, 0x82, 0xCE, 0x45, 0x20, 0xD9, 0x8C,\n\t0xD9, 0x91, 0x76, 0x45, 0x20, 0xD9, 0x8D, 0xD9,\n\t0x91, 0x76, 0x45, 0x20, 0xD9, 0x8E, 0xD9, 0x91,\n\t// Bytes 4580 - 45bf\n\t0x76, 0x45, 0x20, 0xD9, 0x8F, 0xD9, 0x91, 0x76,\n\t0x45, 0x20, 0xD9, 0x90, 0xD9, 0x91, 0x76, 0x45,\n\t0x20, 0xD9, 0x91, 0xD9, 0xB0, 0x7E, 0x45, 0xE2,\n\t0xAB, 0x9D, 0xCC, 0xB8, 0x05, 0x46, 0xCE, 0xB9,\n\t0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x46, 0xCF, 0x85,\n\t0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x46, 0xD7, 0xA9,\n\t0xD6, 0xBC, 0xD7, 0x81, 0x52, 0x46, 0xD7, 0xA9,\n\t0xD6, 0xBC, 0xD7, 0x82, 0x56, 0x46, 0xD9, 0x80,\n\t// Bytes 45c0 - 45ff\n\t0xD9, 0x8E, 0xD9, 0x91, 0x76, 0x46, 0xD9, 0x80,\n\t0xD9, 0x8F, 0xD9, 0x91, 0x76, 0x46, 0xD9, 0x80,\n\t0xD9, 0x90, 0xD9, 0x91, 0x76, 0x46, 0xE0, 0xA4,\n\t0x95, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0x96, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0x97, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0x9C, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0xA1, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t// Bytes 4600 - 463f\n\t0xA2, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0xAB, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4,\n\t0xAF, 0xE0, 0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA6,\n\t0xA1, 0xE0, 0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA6,\n\t0xA2, 0xE0, 0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA6,\n\t0xAF, 0xE0, 0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t0x96, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t0x97, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t// Bytes 4640 - 467f\n\t0x9C, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t0xAB, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t0xB2, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8,\n\t0xB8, 0xE0, 0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xAC,\n\t0xA1, 0xE0, 0xAC, 0xBC, 0x0D, 0x46, 0xE0, 0xAC,\n\t0xA2, 0xE0, 0xAC, 0xBC, 0x0D, 0x46, 0xE0, 0xBE,\n\t0xB2, 0xE0, 0xBE, 0x80, 0xA1, 0x46, 0xE0, 0xBE,\n\t0xB3, 0xE0, 0xBE, 0x80, 0xA1, 0x46, 0xE1, 0x84,\n\t// Bytes 4680 - 46bf\n\t0x80, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x82, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x83, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x85, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x86, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x87, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x89, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x8B, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t// Bytes 46c0 - 46ff\n\t0x8B, 0xE1, 0x85, 0xAE, 0x01, 0x46, 0xE1, 0x84,\n\t0x8C, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x8E, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x8F, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x90, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x91, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84,\n\t0x92, 0xE1, 0x85, 0xA1, 0x01, 0x46, 0xE3, 0x83,\n\t0x86, 0xE3, 0x82, 0x99, 0x11, 0x48, 0xF0, 0x9D,\n\t// Bytes 4700 - 473f\n\t0x85, 0x97, 0xF0, 0x9D, 0x85, 0xA5, 0xB1, 0x48,\n\t0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xB1, 0x48, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xB1, 0x48, 0xF0, 0x9D, 0x86, 0xBA,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xB1, 0x49, 0xE0, 0xBE,\n\t0xB2, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xA2,\n\t0x49, 0xE0, 0xBE, 0xB3, 0xE0, 0xBD, 0xB1, 0xE0,\n\t0xBE, 0x80, 0xA2, 0x4C, 0xF0, 0x9D, 0x85, 0x98,\n\t// Bytes 4740 - 477f\n\t0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE,\n\t0xB2, 0x4C, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0xB2, 0x4C,\n\t0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xF0, 0x9D, 0x85, 0xB0, 0xB2, 0x4C, 0xF0, 0x9D,\n\t0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D,\n\t0x85, 0xB1, 0xB2, 0x4C, 0xF0, 0x9D, 0x85, 0x98,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2,\n\t// Bytes 4780 - 47bf\n\t0xB2, 0x4C, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xB2, 0x4C,\n\t0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xF0, 0x9D, 0x85, 0xAF, 0xB2, 0x4C, 0xF0, 0x9D,\n\t0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D,\n\t0x85, 0xAE, 0xB2, 0x4C, 0xF0, 0x9D, 0x86, 0xBA,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF,\n\t0xB2, 0x83, 0x41, 0xCC, 0x82, 0xCD, 0x83, 0x41,\n\t// Bytes 47c0 - 47ff\n\t0xCC, 0x86, 0xCD, 0x83, 0x41, 0xCC, 0x87, 0xCD,\n\t0x83, 0x41, 0xCC, 0x88, 0xCD, 0x83, 0x41, 0xCC,\n\t0x8A, 0xCD, 0x83, 0x41, 0xCC, 0xA3, 0xB9, 0x83,\n\t0x43, 0xCC, 0xA7, 0xA9, 0x83, 0x45, 0xCC, 0x82,\n\t0xCD, 0x83, 0x45, 0xCC, 0x84, 0xCD, 0x83, 0x45,\n\t0xCC, 0xA3, 0xB9, 0x83, 0x45, 0xCC, 0xA7, 0xA9,\n\t0x83, 0x49, 0xCC, 0x88, 0xCD, 0x83, 0x4C, 0xCC,\n\t0xA3, 0xB9, 0x83, 0x4F, 0xCC, 0x82, 0xCD, 0x83,\n\t// Bytes 4800 - 483f\n\t0x4F, 0xCC, 0x83, 0xCD, 0x83, 0x4F, 0xCC, 0x84,\n\t0xCD, 0x83, 0x4F, 0xCC, 0x87, 0xCD, 0x83, 0x4F,\n\t0xCC, 0x88, 0xCD, 0x83, 0x4F, 0xCC, 0x9B, 0xB1,\n\t0x83, 0x4F, 0xCC, 0xA3, 0xB9, 0x83, 0x4F, 0xCC,\n\t0xA8, 0xA9, 0x83, 0x52, 0xCC, 0xA3, 0xB9, 0x83,\n\t0x53, 0xCC, 0x81, 0xCD, 0x83, 0x53, 0xCC, 0x8C,\n\t0xCD, 0x83, 0x53, 0xCC, 0xA3, 0xB9, 0x83, 0x55,\n\t0xCC, 0x83, 0xCD, 0x83, 0x55, 0xCC, 0x84, 0xCD,\n\t// Bytes 4840 - 487f\n\t0x83, 0x55, 0xCC, 0x88, 0xCD, 0x83, 0x55, 0xCC,\n\t0x9B, 0xB1, 0x83, 0x61, 0xCC, 0x82, 0xCD, 0x83,\n\t0x61, 0xCC, 0x86, 0xCD, 0x83, 0x61, 0xCC, 0x87,\n\t0xCD, 0x83, 0x61, 0xCC, 0x88, 0xCD, 0x83, 0x61,\n\t0xCC, 0x8A, 0xCD, 0x83, 0x61, 0xCC, 0xA3, 0xB9,\n\t0x83, 0x63, 0xCC, 0xA7, 0xA9, 0x83, 0x65, 0xCC,\n\t0x82, 0xCD, 0x83, 0x65, 0xCC, 0x84, 0xCD, 0x83,\n\t0x65, 0xCC, 0xA3, 0xB9, 0x83, 0x65, 0xCC, 0xA7,\n\t// Bytes 4880 - 48bf\n\t0xA9, 0x83, 0x69, 0xCC, 0x88, 0xCD, 0x83, 0x6C,\n\t0xCC, 0xA3, 0xB9, 0x83, 0x6F, 0xCC, 0x82, 0xCD,\n\t0x83, 0x6F, 0xCC, 0x83, 0xCD, 0x83, 0x6F, 0xCC,\n\t0x84, 0xCD, 0x83, 0x6F, 0xCC, 0x87, 0xCD, 0x83,\n\t0x6F, 0xCC, 0x88, 0xCD, 0x83, 0x6F, 0xCC, 0x9B,\n\t0xB1, 0x83, 0x6F, 0xCC, 0xA3, 0xB9, 0x83, 0x6F,\n\t0xCC, 0xA8, 0xA9, 0x83, 0x72, 0xCC, 0xA3, 0xB9,\n\t0x83, 0x73, 0xCC, 0x81, 0xCD, 0x83, 0x73, 0xCC,\n\t// Bytes 48c0 - 48ff\n\t0x8C, 0xCD, 0x83, 0x73, 0xCC, 0xA3, 0xB9, 0x83,\n\t0x75, 0xCC, 0x83, 0xCD, 0x83, 0x75, 0xCC, 0x84,\n\t0xCD, 0x83, 0x75, 0xCC, 0x88, 0xCD, 0x83, 0x75,\n\t0xCC, 0x9B, 0xB1, 0x84, 0xCE, 0x91, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCE, 0x95, 0xCC, 0x93, 0xCD, 0x84, 0xCE, 0x95,\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0x97, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x84,\n\t// Bytes 4900 - 493f\n\t0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x84, 0xCE, 0x99,\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0x9F, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCE, 0x9F, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xA9,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xA9, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x84,\n\t0xCE, 0xB1, 0xCC, 0x81, 0xCD, 0x84, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB1, 0xCC, 0x94,\n\t// Bytes 4940 - 497f\n\t0xCD, 0x84, 0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x84,\n\t0xCE, 0xB5, 0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB5,\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xB7, 0xCC, 0x80,\n\t0xCD, 0x84, 0xCE, 0xB7, 0xCC, 0x81, 0xCD, 0x84,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xB7, 0xCD, 0x82,\n\t0xCD, 0x84, 0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x84,\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB9,\n\t// Bytes 4980 - 49bf\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xBF, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCE, 0xBF, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCD, 0x84, 0xCF, 0x85,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCF, 0x85, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCF, 0x89, 0xCC, 0x80, 0xCD, 0x84,\n\t0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x84, 0xCF, 0x89,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCF, 0x89, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCF, 0x89, 0xCD, 0x82, 0xCD, 0x86,\n\t// Bytes 49c0 - 49ff\n\t0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t// Bytes 4a00 - 4a3f\n\t0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t// Bytes 4a40 - 4a7f\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t// Bytes 4a80 - 4abf\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86,\n\t// Bytes 4ac0 - 4aff\n\t0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86,\n\t0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86,\n\t0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86,\n\t0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86,\n\t0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x82, 0x01, 0x86,\n\t0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x8F, 0x01, 0x42,\n\t0xCC, 0x80, 0xCD, 0x33, 0x42, 0xCC, 0x81, 0xCD,\n\t0x33, 0x42, 0xCC, 0x93, 0xCD, 0x33, 0x43, 0xE1,\n\t// Bytes 4b00 - 4b3f\n\t0x85, 0xA1, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA2,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xA3, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xA4, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xA5, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA6,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xA7, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xA8, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xA9, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAA,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xAB, 0x01, 0x00,\n\t// Bytes 4b40 - 4b7f\n\t0x43, 0xE1, 0x85, 0xAC, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xAD, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAE,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xAF, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xB0, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xB1, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xB2,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xB3, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xB4, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xB5, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xAA,\n\t// Bytes 4b80 - 4bbf\n\t0x01, 0x00, 0x43, 0xE1, 0x86, 0xAC, 0x01, 0x00,\n\t0x43, 0xE1, 0x86, 0xAD, 0x01, 0x00, 0x43, 0xE1,\n\t0x86, 0xB0, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB1,\n\t0x01, 0x00, 0x43, 0xE1, 0x86, 0xB2, 0x01, 0x00,\n\t0x43, 0xE1, 0x86, 0xB3, 0x01, 0x00, 0x43, 0xE1,\n\t0x86, 0xB4, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB5,\n\t0x01, 0x00, 0x44, 0xCC, 0x88, 0xCC, 0x81, 0xCE,\n\t0x33, 0x43, 0xE3, 0x82, 0x99, 0x11, 0x04, 0x43,\n\t// Bytes 4bc0 - 4bff\n\t0xE3, 0x82, 0x9A, 0x11, 0x04, 0x46, 0xE0, 0xBD,\n\t0xB1, 0xE0, 0xBD, 0xB2, 0xA2, 0x27, 0x46, 0xE0,\n\t0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xA6, 0x27, 0x46,\n\t0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xA2, 0x27,\n\t0x00, 0x01,\n}\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfcTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfcTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfcValues[c0]\n\t}\n\ti := nfcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfcTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfcTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfcValues[c0]\n\t}\n\ti := nfcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// nfcTrie. Total size: 10798 bytes (10.54 KiB). Checksum: 721e0f15a4524bda.\ntype nfcTrie struct{}\n\nfunc newNfcTrie(i int) *nfcTrie {\n\treturn &nfcTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *nfcTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 46:\n\t\treturn uint16(nfcValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 46\n\t\treturn uint16(nfcSparse.lookup(n, b))\n\t}\n}\n\n// nfcValues: 48 blocks, 3072 entries, 6144 bytes\n// The third block is the zero block.\nvar nfcValues = [3072]uint16{\n\t// Block 0x0, offset 0x0\n\t0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000,\n\t// Block 0x1, offset 0x40\n\t0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000,\n\t0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000,\n\t0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000,\n\t0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000,\n\t0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000,\n\t0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000,\n\t0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000,\n\t0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000,\n\t0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000,\n\t0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x2ece, 0xc1: 0x2ed3, 0xc2: 0x47b9, 0xc3: 0x2ed8, 0xc4: 0x47c8, 0xc5: 0x47cd,\n\t0xc6: 0xa000, 0xc7: 0x47d7, 0xc8: 0x2f41, 0xc9: 0x2f46, 0xca: 0x47dc, 0xcb: 0x2f5a,\n\t0xcc: 0x2fcd, 0xcd: 0x2fd2, 0xce: 0x2fd7, 0xcf: 0x47f0, 0xd1: 0x3063,\n\t0xd2: 0x3086, 0xd3: 0x308b, 0xd4: 0x47fa, 0xd5: 0x47ff, 0xd6: 0x480e,\n\t0xd8: 0xa000, 0xd9: 0x3112, 0xda: 0x3117, 0xdb: 0x311c, 0xdc: 0x4840, 0xdd: 0x3194,\n\t0xe0: 0x31da, 0xe1: 0x31df, 0xe2: 0x484a, 0xe3: 0x31e4,\n\t0xe4: 0x4859, 0xe5: 0x485e, 0xe6: 0xa000, 0xe7: 0x4868, 0xe8: 0x324d, 0xe9: 0x3252,\n\t0xea: 0x486d, 0xeb: 0x3266, 0xec: 0x32de, 0xed: 0x32e3, 0xee: 0x32e8, 0xef: 0x4881,\n\t0xf1: 0x3374, 0xf2: 0x3397, 0xf3: 0x339c, 0xf4: 0x488b, 0xf5: 0x4890,\n\t0xf6: 0x489f, 0xf8: 0xa000, 0xf9: 0x3428, 0xfa: 0x342d, 0xfb: 0x3432,\n\t0xfc: 0x48d1, 0xfd: 0x34af, 0xff: 0x34c8,\n\t// Block 0x4, offset 0x100\n\t0x100: 0x2edd, 0x101: 0x31e9, 0x102: 0x47be, 0x103: 0x484f, 0x104: 0x2efb, 0x105: 0x3207,\n\t0x106: 0x2f0f, 0x107: 0x321b, 0x108: 0x2f14, 0x109: 0x3220, 0x10a: 0x2f19, 0x10b: 0x3225,\n\t0x10c: 0x2f1e, 0x10d: 0x322a, 0x10e: 0x2f28, 0x10f: 0x3234,\n\t0x112: 0x47e1, 0x113: 0x4872, 0x114: 0x2f50, 0x115: 0x325c, 0x116: 0x2f55, 0x117: 0x3261,\n\t0x118: 0x2f73, 0x119: 0x327f, 0x11a: 0x2f64, 0x11b: 0x3270, 0x11c: 0x2f8c, 0x11d: 0x3298,\n\t0x11e: 0x2f96, 0x11f: 0x32a2, 0x120: 0x2f9b, 0x121: 0x32a7, 0x122: 0x2fa5, 0x123: 0x32b1,\n\t0x124: 0x2faa, 0x125: 0x32b6, 0x128: 0x2fdc, 0x129: 0x32ed,\n\t0x12a: 0x2fe1, 0x12b: 0x32f2, 0x12c: 0x2fe6, 0x12d: 0x32f7, 0x12e: 0x3009, 0x12f: 0x3315,\n\t0x130: 0x2feb, 0x134: 0x3013, 0x135: 0x331f,\n\t0x136: 0x3027, 0x137: 0x3338, 0x139: 0x3031, 0x13a: 0x3342, 0x13b: 0x303b,\n\t0x13c: 0x334c, 0x13d: 0x3036, 0x13e: 0x3347,\n\t// Block 0x5, offset 0x140\n\t0x143: 0x305e, 0x144: 0x336f, 0x145: 0x3077,\n\t0x146: 0x3388, 0x147: 0x306d, 0x148: 0x337e,\n\t0x14c: 0x4804, 0x14d: 0x4895, 0x14e: 0x3090, 0x14f: 0x33a1, 0x150: 0x309a, 0x151: 0x33ab,\n\t0x154: 0x30b8, 0x155: 0x33c9, 0x156: 0x30d1, 0x157: 0x33e2,\n\t0x158: 0x30c2, 0x159: 0x33d3, 0x15a: 0x4827, 0x15b: 0x48b8, 0x15c: 0x30db, 0x15d: 0x33ec,\n\t0x15e: 0x30ea, 0x15f: 0x33fb, 0x160: 0x482c, 0x161: 0x48bd, 0x162: 0x3103, 0x163: 0x3419,\n\t0x164: 0x30f4, 0x165: 0x340a, 0x168: 0x4836, 0x169: 0x48c7,\n\t0x16a: 0x483b, 0x16b: 0x48cc, 0x16c: 0x3121, 0x16d: 0x3437, 0x16e: 0x312b, 0x16f: 0x3441,\n\t0x170: 0x3130, 0x171: 0x3446, 0x172: 0x314e, 0x173: 0x3464, 0x174: 0x3171, 0x175: 0x3487,\n\t0x176: 0x3199, 0x177: 0x34b4, 0x178: 0x31ad, 0x179: 0x31bc, 0x17a: 0x34dc, 0x17b: 0x31c6,\n\t0x17c: 0x34e6, 0x17d: 0x31cb, 0x17e: 0x34eb, 0x17f: 0xa000,\n\t// Block 0x6, offset 0x180\n\t0x184: 0x8100, 0x185: 0x8100,\n\t0x186: 0x8100,\n\t0x18d: 0x2ee7, 0x18e: 0x31f3, 0x18f: 0x2ff5, 0x190: 0x3301, 0x191: 0x309f,\n\t0x192: 0x33b0, 0x193: 0x3135, 0x194: 0x344b, 0x195: 0x392e, 0x196: 0x3abd, 0x197: 0x3927,\n\t0x198: 0x3ab6, 0x199: 0x3935, 0x19a: 0x3ac4, 0x19b: 0x3920, 0x19c: 0x3aaf,\n\t0x19e: 0x380f, 0x19f: 0x399e, 0x1a0: 0x3808, 0x1a1: 0x3997, 0x1a2: 0x3512, 0x1a3: 0x3524,\n\t0x1a6: 0x2fa0, 0x1a7: 0x32ac, 0x1a8: 0x301d, 0x1a9: 0x332e,\n\t0x1aa: 0x481d, 0x1ab: 0x48ae, 0x1ac: 0x38ef, 0x1ad: 0x3a7e, 0x1ae: 0x3536, 0x1af: 0x353c,\n\t0x1b0: 0x3324, 0x1b4: 0x2f87, 0x1b5: 0x3293,\n\t0x1b8: 0x3059, 0x1b9: 0x336a, 0x1ba: 0x3816, 0x1bb: 0x39a5,\n\t0x1bc: 0x350c, 0x1bd: 0x351e, 0x1be: 0x3518, 0x1bf: 0x352a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x2eec, 0x1c1: 0x31f8, 0x1c2: 0x2ef1, 0x1c3: 0x31fd, 0x1c4: 0x2f69, 0x1c5: 0x3275,\n\t0x1c6: 0x2f6e, 0x1c7: 0x327a, 0x1c8: 0x2ffa, 0x1c9: 0x3306, 0x1ca: 0x2fff, 0x1cb: 0x330b,\n\t0x1cc: 0x30a4, 0x1cd: 0x33b5, 0x1ce: 0x30a9, 0x1cf: 0x33ba, 0x1d0: 0x30c7, 0x1d1: 0x33d8,\n\t0x1d2: 0x30cc, 0x1d3: 0x33dd, 0x1d4: 0x313a, 0x1d5: 0x3450, 0x1d6: 0x313f, 0x1d7: 0x3455,\n\t0x1d8: 0x30e5, 0x1d9: 0x33f6, 0x1da: 0x30fe, 0x1db: 0x3414,\n\t0x1de: 0x2fb9, 0x1df: 0x32c5,\n\t0x1e6: 0x47c3, 0x1e7: 0x4854, 0x1e8: 0x47eb, 0x1e9: 0x487c,\n\t0x1ea: 0x38be, 0x1eb: 0x3a4d, 0x1ec: 0x389b, 0x1ed: 0x3a2a, 0x1ee: 0x4809, 0x1ef: 0x489a,\n\t0x1f0: 0x38b7, 0x1f1: 0x3a46, 0x1f2: 0x31a3, 0x1f3: 0x34be,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9933, 0x201: 0x9933, 0x202: 0x9933, 0x203: 0x9933, 0x204: 0x9933, 0x205: 0x8133,\n\t0x206: 0x9933, 0x207: 0x9933, 0x208: 0x9933, 0x209: 0x9933, 0x20a: 0x9933, 0x20b: 0x9933,\n\t0x20c: 0x9933, 0x20d: 0x8133, 0x20e: 0x8133, 0x20f: 0x9933, 0x210: 0x8133, 0x211: 0x9933,\n\t0x212: 0x8133, 0x213: 0x9933, 0x214: 0x9933, 0x215: 0x8134, 0x216: 0x812e, 0x217: 0x812e,\n\t0x218: 0x812e, 0x219: 0x812e, 0x21a: 0x8134, 0x21b: 0x992c, 0x21c: 0x812e, 0x21d: 0x812e,\n\t0x21e: 0x812e, 0x21f: 0x812e, 0x220: 0x812e, 0x221: 0x812a, 0x222: 0x812a, 0x223: 0x992e,\n\t0x224: 0x992e, 0x225: 0x992e, 0x226: 0x992e, 0x227: 0x992a, 0x228: 0x992a, 0x229: 0x812e,\n\t0x22a: 0x812e, 0x22b: 0x812e, 0x22c: 0x812e, 0x22d: 0x992e, 0x22e: 0x992e, 0x22f: 0x812e,\n\t0x230: 0x992e, 0x231: 0x992e, 0x232: 0x812e, 0x233: 0x812e, 0x234: 0x8101, 0x235: 0x8101,\n\t0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812e, 0x23a: 0x812e, 0x23b: 0x812e,\n\t0x23c: 0x812e, 0x23d: 0x8133, 0x23e: 0x8133, 0x23f: 0x8133,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x4aef, 0x241: 0x4af4, 0x242: 0x9933, 0x243: 0x4af9, 0x244: 0x4bb2, 0x245: 0x9937,\n\t0x246: 0x8133, 0x247: 0x812e, 0x248: 0x812e, 0x249: 0x812e, 0x24a: 0x8133, 0x24b: 0x8133,\n\t0x24c: 0x8133, 0x24d: 0x812e, 0x24e: 0x812e, 0x250: 0x8133, 0x251: 0x8133,\n\t0x252: 0x8133, 0x253: 0x812e, 0x254: 0x812e, 0x255: 0x812e, 0x256: 0x812e, 0x257: 0x8133,\n\t0x258: 0x8134, 0x259: 0x812e, 0x25a: 0x812e, 0x25b: 0x8133, 0x25c: 0x8135, 0x25d: 0x8136,\n\t0x25e: 0x8136, 0x25f: 0x8135, 0x260: 0x8136, 0x261: 0x8136, 0x262: 0x8135, 0x263: 0x8133,\n\t0x264: 0x8133, 0x265: 0x8133, 0x266: 0x8133, 0x267: 0x8133, 0x268: 0x8133, 0x269: 0x8133,\n\t0x26a: 0x8133, 0x26b: 0x8133, 0x26c: 0x8133, 0x26d: 0x8133, 0x26e: 0x8133, 0x26f: 0x8133,\n\t0x274: 0x01ee,\n\t0x27a: 0x8100,\n\t0x27e: 0x0037,\n\t// Block 0xa, offset 0x280\n\t0x284: 0x8100, 0x285: 0x3500,\n\t0x286: 0x3548, 0x287: 0x00ce, 0x288: 0x3566, 0x289: 0x3572, 0x28a: 0x3584,\n\t0x28c: 0x35a2, 0x28e: 0x35b4, 0x28f: 0x35d2, 0x290: 0x3d67, 0x291: 0xa000,\n\t0x295: 0xa000, 0x297: 0xa000,\n\t0x299: 0xa000,\n\t0x29f: 0xa000, 0x2a1: 0xa000,\n\t0x2a5: 0xa000, 0x2a9: 0xa000,\n\t0x2aa: 0x3596, 0x2ab: 0x35c6, 0x2ac: 0x492f, 0x2ad: 0x35f6, 0x2ae: 0x4959, 0x2af: 0x3608,\n\t0x2b0: 0x3dcf, 0x2b1: 0xa000, 0x2b5: 0xa000,\n\t0x2b7: 0xa000, 0x2b9: 0xa000,\n\t0x2bf: 0xa000,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x3680, 0x2c1: 0x368c, 0x2c3: 0x367a,\n\t0x2c6: 0xa000, 0x2c7: 0x3668,\n\t0x2cc: 0x36bc, 0x2cd: 0x36a4, 0x2ce: 0x36ce, 0x2d0: 0xa000,\n\t0x2d3: 0xa000, 0x2d5: 0xa000, 0x2d6: 0xa000, 0x2d7: 0xa000,\n\t0x2d8: 0xa000, 0x2d9: 0x36b0, 0x2da: 0xa000,\n\t0x2de: 0xa000, 0x2e3: 0xa000,\n\t0x2e7: 0xa000,\n\t0x2eb: 0xa000, 0x2ed: 0xa000,\n\t0x2f0: 0xa000, 0x2f3: 0xa000, 0x2f5: 0xa000,\n\t0x2f6: 0xa000, 0x2f7: 0xa000, 0x2f8: 0xa000, 0x2f9: 0x3734, 0x2fa: 0xa000,\n\t0x2fe: 0xa000,\n\t// Block 0xc, offset 0x300\n\t0x301: 0x3692, 0x302: 0x3716,\n\t0x310: 0x366e, 0x311: 0x36f2,\n\t0x312: 0x3674, 0x313: 0x36f8, 0x316: 0x3686, 0x317: 0x370a,\n\t0x318: 0xa000, 0x319: 0xa000, 0x31a: 0x3788, 0x31b: 0x378e, 0x31c: 0x3698, 0x31d: 0x371c,\n\t0x31e: 0x369e, 0x31f: 0x3722, 0x322: 0x36aa, 0x323: 0x372e,\n\t0x324: 0x36b6, 0x325: 0x373a, 0x326: 0x36c2, 0x327: 0x3746, 0x328: 0xa000, 0x329: 0xa000,\n\t0x32a: 0x3794, 0x32b: 0x379a, 0x32c: 0x36ec, 0x32d: 0x3770, 0x32e: 0x36c8, 0x32f: 0x374c,\n\t0x330: 0x36d4, 0x331: 0x3758, 0x332: 0x36da, 0x333: 0x375e, 0x334: 0x36e0, 0x335: 0x3764,\n\t0x338: 0x36e6, 0x339: 0x376a,\n\t// Block 0xd, offset 0x340\n\t0x351: 0x812e,\n\t0x352: 0x8133, 0x353: 0x8133, 0x354: 0x8133, 0x355: 0x8133, 0x356: 0x812e, 0x357: 0x8133,\n\t0x358: 0x8133, 0x359: 0x8133, 0x35a: 0x812f, 0x35b: 0x812e, 0x35c: 0x8133, 0x35d: 0x8133,\n\t0x35e: 0x8133, 0x35f: 0x8133, 0x360: 0x8133, 0x361: 0x8133, 0x362: 0x812e, 0x363: 0x812e,\n\t0x364: 0x812e, 0x365: 0x812e, 0x366: 0x812e, 0x367: 0x812e, 0x368: 0x8133, 0x369: 0x8133,\n\t0x36a: 0x812e, 0x36b: 0x8133, 0x36c: 0x8133, 0x36d: 0x812f, 0x36e: 0x8132, 0x36f: 0x8133,\n\t0x370: 0x8106, 0x371: 0x8107, 0x372: 0x8108, 0x373: 0x8109, 0x374: 0x810a, 0x375: 0x810b,\n\t0x376: 0x810c, 0x377: 0x810d, 0x378: 0x810e, 0x379: 0x810f, 0x37a: 0x810f, 0x37b: 0x8110,\n\t0x37c: 0x8111, 0x37d: 0x8112, 0x37f: 0x8113,\n\t// Block 0xe, offset 0x380\n\t0x388: 0xa000, 0x38a: 0xa000, 0x38b: 0x8117,\n\t0x38c: 0x8118, 0x38d: 0x8119, 0x38e: 0x811a, 0x38f: 0x811b, 0x390: 0x811c, 0x391: 0x811d,\n\t0x392: 0x811e, 0x393: 0x9933, 0x394: 0x9933, 0x395: 0x992e, 0x396: 0x812e, 0x397: 0x8133,\n\t0x398: 0x8133, 0x399: 0x8133, 0x39a: 0x8133, 0x39b: 0x8133, 0x39c: 0x812e, 0x39d: 0x8133,\n\t0x39e: 0x8133, 0x39f: 0x812e,\n\t0x3b0: 0x811f,\n\t// Block 0xf, offset 0x3c0\n\t0x3ca: 0x8133, 0x3cb: 0x8133,\n\t0x3cc: 0x8133, 0x3cd: 0x8133, 0x3ce: 0x8133, 0x3cf: 0x812e, 0x3d0: 0x812e, 0x3d1: 0x812e,\n\t0x3d2: 0x812e, 0x3d3: 0x812e, 0x3d4: 0x8133, 0x3d5: 0x8133, 0x3d6: 0x8133, 0x3d7: 0x8133,\n\t0x3d8: 0x8133, 0x3d9: 0x8133, 0x3da: 0x8133, 0x3db: 0x8133, 0x3dc: 0x8133, 0x3dd: 0x8133,\n\t0x3de: 0x8133, 0x3df: 0x8133, 0x3e0: 0x8133, 0x3e1: 0x8133, 0x3e3: 0x812e,\n\t0x3e4: 0x8133, 0x3e5: 0x8133, 0x3e6: 0x812e, 0x3e7: 0x8133, 0x3e8: 0x8133, 0x3e9: 0x812e,\n\t0x3ea: 0x8133, 0x3eb: 0x8133, 0x3ec: 0x8133, 0x3ed: 0x812e, 0x3ee: 0x812e, 0x3ef: 0x812e,\n\t0x3f0: 0x8117, 0x3f1: 0x8118, 0x3f2: 0x8119, 0x3f3: 0x8133, 0x3f4: 0x8133, 0x3f5: 0x8133,\n\t0x3f6: 0x812e, 0x3f7: 0x8133, 0x3f8: 0x8133, 0x3f9: 0x812e, 0x3fa: 0x812e, 0x3fb: 0x8133,\n\t0x3fc: 0x8133, 0x3fd: 0x8133, 0x3fe: 0x8133, 0x3ff: 0x8133,\n\t// Block 0x10, offset 0x400\n\t0x405: 0xa000,\n\t0x406: 0x3ee7, 0x407: 0xa000, 0x408: 0x3eef, 0x409: 0xa000, 0x40a: 0x3ef7, 0x40b: 0xa000,\n\t0x40c: 0x3eff, 0x40d: 0xa000, 0x40e: 0x3f07, 0x411: 0xa000,\n\t0x412: 0x3f0f,\n\t0x434: 0x8103, 0x435: 0x9900,\n\t0x43a: 0xa000, 0x43b: 0x3f17,\n\t0x43c: 0xa000, 0x43d: 0x3f1f, 0x43e: 0xa000, 0x43f: 0xa000,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x8133, 0x441: 0x8133, 0x442: 0x812e, 0x443: 0x8133, 0x444: 0x8133, 0x445: 0x8133,\n\t0x446: 0x8133, 0x447: 0x8133, 0x448: 0x8133, 0x449: 0x8133, 0x44a: 0x812e, 0x44b: 0x8133,\n\t0x44c: 0x8133, 0x44d: 0x8136, 0x44e: 0x812b, 0x44f: 0x812e, 0x450: 0x812a, 0x451: 0x8133,\n\t0x452: 0x8133, 0x453: 0x8133, 0x454: 0x8133, 0x455: 0x8133, 0x456: 0x8133, 0x457: 0x8133,\n\t0x458: 0x8133, 0x459: 0x8133, 0x45a: 0x8133, 0x45b: 0x8133, 0x45c: 0x8133, 0x45d: 0x8133,\n\t0x45e: 0x8133, 0x45f: 0x8133, 0x460: 0x8133, 0x461: 0x8133, 0x462: 0x8133, 0x463: 0x8133,\n\t0x464: 0x8133, 0x465: 0x8133, 0x466: 0x8133, 0x467: 0x8133, 0x468: 0x8133, 0x469: 0x8133,\n\t0x46a: 0x8133, 0x46b: 0x8133, 0x46c: 0x8133, 0x46d: 0x8133, 0x46e: 0x8133, 0x46f: 0x8133,\n\t0x470: 0x8133, 0x471: 0x8133, 0x472: 0x8133, 0x473: 0x8133, 0x474: 0x8133, 0x475: 0x8133,\n\t0x476: 0x8134, 0x477: 0x8132, 0x478: 0x8132, 0x479: 0x812e, 0x47a: 0x812d, 0x47b: 0x8133,\n\t0x47c: 0x8135, 0x47d: 0x812e, 0x47e: 0x8133, 0x47f: 0x812e,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x2ef6, 0x481: 0x3202, 0x482: 0x2f00, 0x483: 0x320c, 0x484: 0x2f05, 0x485: 0x3211,\n\t0x486: 0x2f0a, 0x487: 0x3216, 0x488: 0x382b, 0x489: 0x39ba, 0x48a: 0x2f23, 0x48b: 0x322f,\n\t0x48c: 0x2f2d, 0x48d: 0x3239, 0x48e: 0x2f3c, 0x48f: 0x3248, 0x490: 0x2f32, 0x491: 0x323e,\n\t0x492: 0x2f37, 0x493: 0x3243, 0x494: 0x384e, 0x495: 0x39dd, 0x496: 0x3855, 0x497: 0x39e4,\n\t0x498: 0x2f78, 0x499: 0x3284, 0x49a: 0x2f7d, 0x49b: 0x3289, 0x49c: 0x3863, 0x49d: 0x39f2,\n\t0x49e: 0x2f82, 0x49f: 0x328e, 0x4a0: 0x2f91, 0x4a1: 0x329d, 0x4a2: 0x2faf, 0x4a3: 0x32bb,\n\t0x4a4: 0x2fbe, 0x4a5: 0x32ca, 0x4a6: 0x2fb4, 0x4a7: 0x32c0, 0x4a8: 0x2fc3, 0x4a9: 0x32cf,\n\t0x4aa: 0x2fc8, 0x4ab: 0x32d4, 0x4ac: 0x300e, 0x4ad: 0x331a, 0x4ae: 0x386a, 0x4af: 0x39f9,\n\t0x4b0: 0x3018, 0x4b1: 0x3329, 0x4b2: 0x3022, 0x4b3: 0x3333, 0x4b4: 0x302c, 0x4b5: 0x333d,\n\t0x4b6: 0x47f5, 0x4b7: 0x4886, 0x4b8: 0x3871, 0x4b9: 0x3a00, 0x4ba: 0x3045, 0x4bb: 0x3356,\n\t0x4bc: 0x3040, 0x4bd: 0x3351, 0x4be: 0x304a, 0x4bf: 0x335b,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x304f, 0x4c1: 0x3360, 0x4c2: 0x3054, 0x4c3: 0x3365, 0x4c4: 0x3068, 0x4c5: 0x3379,\n\t0x4c6: 0x3072, 0x4c7: 0x3383, 0x4c8: 0x3081, 0x4c9: 0x3392, 0x4ca: 0x307c, 0x4cb: 0x338d,\n\t0x4cc: 0x3894, 0x4cd: 0x3a23, 0x4ce: 0x38a2, 0x4cf: 0x3a31, 0x4d0: 0x38a9, 0x4d1: 0x3a38,\n\t0x4d2: 0x38b0, 0x4d3: 0x3a3f, 0x4d4: 0x30ae, 0x4d5: 0x33bf, 0x4d6: 0x30b3, 0x4d7: 0x33c4,\n\t0x4d8: 0x30bd, 0x4d9: 0x33ce, 0x4da: 0x4822, 0x4db: 0x48b3, 0x4dc: 0x38f6, 0x4dd: 0x3a85,\n\t0x4de: 0x30d6, 0x4df: 0x33e7, 0x4e0: 0x30e0, 0x4e1: 0x33f1, 0x4e2: 0x4831, 0x4e3: 0x48c2,\n\t0x4e4: 0x38fd, 0x4e5: 0x3a8c, 0x4e6: 0x3904, 0x4e7: 0x3a93, 0x4e8: 0x390b, 0x4e9: 0x3a9a,\n\t0x4ea: 0x30ef, 0x4eb: 0x3400, 0x4ec: 0x30f9, 0x4ed: 0x340f, 0x4ee: 0x310d, 0x4ef: 0x3423,\n\t0x4f0: 0x3108, 0x4f1: 0x341e, 0x4f2: 0x3149, 0x4f3: 0x345f, 0x4f4: 0x3158, 0x4f5: 0x346e,\n\t0x4f6: 0x3153, 0x4f7: 0x3469, 0x4f8: 0x3912, 0x4f9: 0x3aa1, 0x4fa: 0x3919, 0x4fb: 0x3aa8,\n\t0x4fc: 0x315d, 0x4fd: 0x3473, 0x4fe: 0x3162, 0x4ff: 0x3478,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x3167, 0x501: 0x347d, 0x502: 0x316c, 0x503: 0x3482, 0x504: 0x317b, 0x505: 0x3491,\n\t0x506: 0x3176, 0x507: 0x348c, 0x508: 0x3180, 0x509: 0x349b, 0x50a: 0x3185, 0x50b: 0x34a0,\n\t0x50c: 0x318a, 0x50d: 0x34a5, 0x50e: 0x31a8, 0x50f: 0x34c3, 0x510: 0x31c1, 0x511: 0x34e1,\n\t0x512: 0x31d0, 0x513: 0x34f0, 0x514: 0x31d5, 0x515: 0x34f5, 0x516: 0x32d9, 0x517: 0x3405,\n\t0x518: 0x3496, 0x519: 0x34d2, 0x51b: 0x3530,\n\t0x520: 0x47d2, 0x521: 0x4863, 0x522: 0x2ee2, 0x523: 0x31ee,\n\t0x524: 0x37d7, 0x525: 0x3966, 0x526: 0x37d0, 0x527: 0x395f, 0x528: 0x37e5, 0x529: 0x3974,\n\t0x52a: 0x37de, 0x52b: 0x396d, 0x52c: 0x381d, 0x52d: 0x39ac, 0x52e: 0x37f3, 0x52f: 0x3982,\n\t0x530: 0x37ec, 0x531: 0x397b, 0x532: 0x3801, 0x533: 0x3990, 0x534: 0x37fa, 0x535: 0x3989,\n\t0x536: 0x3824, 0x537: 0x39b3, 0x538: 0x47e6, 0x539: 0x4877, 0x53a: 0x2f5f, 0x53b: 0x326b,\n\t0x53c: 0x2f4b, 0x53d: 0x3257, 0x53e: 0x3839, 0x53f: 0x39c8,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x3832, 0x541: 0x39c1, 0x542: 0x3847, 0x543: 0x39d6, 0x544: 0x3840, 0x545: 0x39cf,\n\t0x546: 0x385c, 0x547: 0x39eb, 0x548: 0x2ff0, 0x549: 0x32fc, 0x54a: 0x3004, 0x54b: 0x3310,\n\t0x54c: 0x4818, 0x54d: 0x48a9, 0x54e: 0x3095, 0x54f: 0x33a6, 0x550: 0x387f, 0x551: 0x3a0e,\n\t0x552: 0x3878, 0x553: 0x3a07, 0x554: 0x388d, 0x555: 0x3a1c, 0x556: 0x3886, 0x557: 0x3a15,\n\t0x558: 0x38e8, 0x559: 0x3a77, 0x55a: 0x38cc, 0x55b: 0x3a5b, 0x55c: 0x38c5, 0x55d: 0x3a54,\n\t0x55e: 0x38da, 0x55f: 0x3a69, 0x560: 0x38d3, 0x561: 0x3a62, 0x562: 0x38e1, 0x563: 0x3a70,\n\t0x564: 0x3144, 0x565: 0x345a, 0x566: 0x3126, 0x567: 0x343c, 0x568: 0x3943, 0x569: 0x3ad2,\n\t0x56a: 0x393c, 0x56b: 0x3acb, 0x56c: 0x3951, 0x56d: 0x3ae0, 0x56e: 0x394a, 0x56f: 0x3ad9,\n\t0x570: 0x3958, 0x571: 0x3ae7, 0x572: 0x318f, 0x573: 0x34aa, 0x574: 0x31b7, 0x575: 0x34d7,\n\t0x576: 0x31b2, 0x577: 0x34cd, 0x578: 0x319e, 0x579: 0x34b9,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x4935, 0x581: 0x493b, 0x582: 0x4a4f, 0x583: 0x4a67, 0x584: 0x4a57, 0x585: 0x4a6f,\n\t0x586: 0x4a5f, 0x587: 0x4a77, 0x588: 0x48db, 0x589: 0x48e1, 0x58a: 0x49bf, 0x58b: 0x49d7,\n\t0x58c: 0x49c7, 0x58d: 0x49df, 0x58e: 0x49cf, 0x58f: 0x49e7, 0x590: 0x4947, 0x591: 0x494d,\n\t0x592: 0x3d17, 0x593: 0x3d27, 0x594: 0x3d1f, 0x595: 0x3d2f,\n\t0x598: 0x48e7, 0x599: 0x48ed, 0x59a: 0x3c47, 0x59b: 0x3c57, 0x59c: 0x3c4f, 0x59d: 0x3c5f,\n\t0x5a0: 0x495f, 0x5a1: 0x4965, 0x5a2: 0x4a7f, 0x5a3: 0x4a97,\n\t0x5a4: 0x4a87, 0x5a5: 0x4a9f, 0x5a6: 0x4a8f, 0x5a7: 0x4aa7, 0x5a8: 0x48f3, 0x5a9: 0x48f9,\n\t0x5aa: 0x49ef, 0x5ab: 0x4a07, 0x5ac: 0x49f7, 0x5ad: 0x4a0f, 0x5ae: 0x49ff, 0x5af: 0x4a17,\n\t0x5b0: 0x4977, 0x5b1: 0x497d, 0x5b2: 0x3d77, 0x5b3: 0x3d8f, 0x5b4: 0x3d7f, 0x5b5: 0x3d97,\n\t0x5b6: 0x3d87, 0x5b7: 0x3d9f, 0x5b8: 0x48ff, 0x5b9: 0x4905, 0x5ba: 0x3c77, 0x5bb: 0x3c8f,\n\t0x5bc: 0x3c7f, 0x5bd: 0x3c97, 0x5be: 0x3c87, 0x5bf: 0x3c9f,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x4983, 0x5c1: 0x4989, 0x5c2: 0x3da7, 0x5c3: 0x3db7, 0x5c4: 0x3daf, 0x5c5: 0x3dbf,\n\t0x5c8: 0x490b, 0x5c9: 0x4911, 0x5ca: 0x3ca7, 0x5cb: 0x3cb7,\n\t0x5cc: 0x3caf, 0x5cd: 0x3cbf, 0x5d0: 0x4995, 0x5d1: 0x499b,\n\t0x5d2: 0x3ddf, 0x5d3: 0x3df7, 0x5d4: 0x3de7, 0x5d5: 0x3dff, 0x5d6: 0x3def, 0x5d7: 0x3e07,\n\t0x5d9: 0x4917, 0x5db: 0x3cc7, 0x5dd: 0x3ccf,\n\t0x5df: 0x3cd7, 0x5e0: 0x49ad, 0x5e1: 0x49b3, 0x5e2: 0x4aaf, 0x5e3: 0x4ac7,\n\t0x5e4: 0x4ab7, 0x5e5: 0x4acf, 0x5e6: 0x4abf, 0x5e7: 0x4ad7, 0x5e8: 0x491d, 0x5e9: 0x4923,\n\t0x5ea: 0x4a1f, 0x5eb: 0x4a37, 0x5ec: 0x4a27, 0x5ed: 0x4a3f, 0x5ee: 0x4a2f, 0x5ef: 0x4a47,\n\t0x5f0: 0x4929, 0x5f1: 0x43d7, 0x5f2: 0x35f0, 0x5f3: 0x43dd, 0x5f4: 0x4953, 0x5f5: 0x43e3,\n\t0x5f6: 0x3602, 0x5f7: 0x43e9, 0x5f8: 0x3620, 0x5f9: 0x43ef, 0x5fa: 0x3638, 0x5fb: 0x43f5,\n\t0x5fc: 0x49a1, 0x5fd: 0x43fb,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3cff, 0x601: 0x3d07, 0x602: 0x41c3, 0x603: 0x41e1, 0x604: 0x41cd, 0x605: 0x41eb,\n\t0x606: 0x41d7, 0x607: 0x41f5, 0x608: 0x3c37, 0x609: 0x3c3f, 0x60a: 0x410f, 0x60b: 0x412d,\n\t0x60c: 0x4119, 0x60d: 0x4137, 0x60e: 0x4123, 0x60f: 0x4141, 0x610: 0x3d47, 0x611: 0x3d4f,\n\t0x612: 0x41ff, 0x613: 0x421d, 0x614: 0x4209, 0x615: 0x4227, 0x616: 0x4213, 0x617: 0x4231,\n\t0x618: 0x3c67, 0x619: 0x3c6f, 0x61a: 0x414b, 0x61b: 0x4169, 0x61c: 0x4155, 0x61d: 0x4173,\n\t0x61e: 0x415f, 0x61f: 0x417d, 0x620: 0x3e1f, 0x621: 0x3e27, 0x622: 0x423b, 0x623: 0x4259,\n\t0x624: 0x4245, 0x625: 0x4263, 0x626: 0x424f, 0x627: 0x426d, 0x628: 0x3cdf, 0x629: 0x3ce7,\n\t0x62a: 0x4187, 0x62b: 0x41a5, 0x62c: 0x4191, 0x62d: 0x41af, 0x62e: 0x419b, 0x62f: 0x41b9,\n\t0x630: 0x35e4, 0x631: 0x35de, 0x632: 0x3cef, 0x633: 0x35ea, 0x634: 0x3cf7,\n\t0x636: 0x4941, 0x637: 0x3d0f, 0x638: 0x3554, 0x639: 0x354e, 0x63a: 0x3542, 0x63b: 0x43a7,\n\t0x63c: 0x355a, 0x63d: 0x8100, 0x63e: 0x0257, 0x63f: 0xa100,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x8100, 0x641: 0x3506, 0x642: 0x3d37, 0x643: 0x35fc, 0x644: 0x3d3f,\n\t0x646: 0x496b, 0x647: 0x3d57, 0x648: 0x3560, 0x649: 0x43ad, 0x64a: 0x356c, 0x64b: 0x43b3,\n\t0x64c: 0x3578, 0x64d: 0x3aee, 0x64e: 0x3af5, 0x64f: 0x3afc, 0x650: 0x3614, 0x651: 0x360e,\n\t0x652: 0x3d5f, 0x653: 0x459d, 0x656: 0x361a, 0x657: 0x3d6f,\n\t0x658: 0x3590, 0x659: 0x358a, 0x65a: 0x357e, 0x65b: 0x43b9, 0x65d: 0x3b03,\n\t0x65e: 0x3b0a, 0x65f: 0x3b11, 0x660: 0x364a, 0x661: 0x3644, 0x662: 0x3dc7, 0x663: 0x45a5,\n\t0x664: 0x362c, 0x665: 0x3632, 0x666: 0x3650, 0x667: 0x3dd7, 0x668: 0x35c0, 0x669: 0x35ba,\n\t0x66a: 0x35ae, 0x66b: 0x43c5, 0x66c: 0x35a8, 0x66d: 0x34fa, 0x66e: 0x43a1, 0x66f: 0x0081,\n\t0x672: 0x3e0f, 0x673: 0x3656, 0x674: 0x3e17,\n\t0x676: 0x49b9, 0x677: 0x3e2f, 0x678: 0x359c, 0x679: 0x43bf, 0x67a: 0x35cc, 0x67b: 0x43d1,\n\t0x67c: 0x35d8, 0x67d: 0x430f, 0x67e: 0xa100,\n\t// Block 0x1a, offset 0x680\n\t0x681: 0x3b65, 0x683: 0xa000, 0x684: 0x3b6c, 0x685: 0xa000,\n\t0x687: 0x3b73, 0x688: 0xa000, 0x689: 0x3b7a,\n\t0x68d: 0xa000,\n\t0x6a0: 0x2ec4, 0x6a1: 0xa000, 0x6a2: 0x3b88,\n\t0x6a4: 0xa000, 0x6a5: 0xa000,\n\t0x6ad: 0x3b81, 0x6ae: 0x2ebf, 0x6af: 0x2ec9,\n\t0x6b0: 0x3b8f, 0x6b1: 0x3b96, 0x6b2: 0xa000, 0x6b3: 0xa000, 0x6b4: 0x3b9d, 0x6b5: 0x3ba4,\n\t0x6b6: 0xa000, 0x6b7: 0xa000, 0x6b8: 0x3bab, 0x6b9: 0x3bb2, 0x6ba: 0xa000, 0x6bb: 0xa000,\n\t0x6bc: 0xa000, 0x6bd: 0xa000,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3bb9, 0x6c1: 0x3bc0, 0x6c2: 0xa000, 0x6c3: 0xa000, 0x6c4: 0x3bd5, 0x6c5: 0x3bdc,\n\t0x6c6: 0xa000, 0x6c7: 0xa000, 0x6c8: 0x3be3, 0x6c9: 0x3bea,\n\t0x6d1: 0xa000,\n\t0x6d2: 0xa000,\n\t0x6e2: 0xa000,\n\t0x6e8: 0xa000, 0x6e9: 0xa000,\n\t0x6eb: 0xa000, 0x6ec: 0x3bff, 0x6ed: 0x3c06, 0x6ee: 0x3c0d, 0x6ef: 0x3c14,\n\t0x6f2: 0xa000, 0x6f3: 0xa000, 0x6f4: 0xa000, 0x6f5: 0xa000,\n\t// Block 0x1c, offset 0x700\n\t0x706: 0xa000, 0x70b: 0xa000,\n\t0x70c: 0x3f47, 0x70d: 0xa000, 0x70e: 0x3f4f, 0x70f: 0xa000, 0x710: 0x3f57, 0x711: 0xa000,\n\t0x712: 0x3f5f, 0x713: 0xa000, 0x714: 0x3f67, 0x715: 0xa000, 0x716: 0x3f6f, 0x717: 0xa000,\n\t0x718: 0x3f77, 0x719: 0xa000, 0x71a: 0x3f7f, 0x71b: 0xa000, 0x71c: 0x3f87, 0x71d: 0xa000,\n\t0x71e: 0x3f8f, 0x71f: 0xa000, 0x720: 0x3f97, 0x721: 0xa000, 0x722: 0x3f9f,\n\t0x724: 0xa000, 0x725: 0x3fa7, 0x726: 0xa000, 0x727: 0x3faf, 0x728: 0xa000, 0x729: 0x3fb7,\n\t0x72f: 0xa000,\n\t0x730: 0x3fbf, 0x731: 0x3fc7, 0x732: 0xa000, 0x733: 0x3fcf, 0x734: 0x3fd7, 0x735: 0xa000,\n\t0x736: 0x3fdf, 0x737: 0x3fe7, 0x738: 0xa000, 0x739: 0x3fef, 0x73a: 0x3ff7, 0x73b: 0xa000,\n\t0x73c: 0x3fff, 0x73d: 0x4007,\n\t// Block 0x1d, offset 0x740\n\t0x754: 0x3f3f,\n\t0x759: 0x9904, 0x75a: 0x9904, 0x75b: 0x8100, 0x75c: 0x8100, 0x75d: 0xa000,\n\t0x75e: 0x400f,\n\t0x766: 0xa000,\n\t0x76b: 0xa000, 0x76c: 0x401f, 0x76d: 0xa000, 0x76e: 0x4027, 0x76f: 0xa000,\n\t0x770: 0x402f, 0x771: 0xa000, 0x772: 0x4037, 0x773: 0xa000, 0x774: 0x403f, 0x775: 0xa000,\n\t0x776: 0x4047, 0x777: 0xa000, 0x778: 0x404f, 0x779: 0xa000, 0x77a: 0x4057, 0x77b: 0xa000,\n\t0x77c: 0x405f, 0x77d: 0xa000, 0x77e: 0x4067, 0x77f: 0xa000,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x406f, 0x781: 0xa000, 0x782: 0x4077, 0x784: 0xa000, 0x785: 0x407f,\n\t0x786: 0xa000, 0x787: 0x4087, 0x788: 0xa000, 0x789: 0x408f,\n\t0x78f: 0xa000, 0x790: 0x4097, 0x791: 0x409f,\n\t0x792: 0xa000, 0x793: 0x40a7, 0x794: 0x40af, 0x795: 0xa000, 0x796: 0x40b7, 0x797: 0x40bf,\n\t0x798: 0xa000, 0x799: 0x40c7, 0x79a: 0x40cf, 0x79b: 0xa000, 0x79c: 0x40d7, 0x79d: 0x40df,\n\t0x7af: 0xa000,\n\t0x7b0: 0xa000, 0x7b1: 0xa000, 0x7b2: 0xa000, 0x7b4: 0x4017,\n\t0x7b7: 0x40e7, 0x7b8: 0x40ef, 0x7b9: 0x40f7, 0x7ba: 0x40ff,\n\t0x7bd: 0xa000, 0x7be: 0x4107,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x1472, 0x7c1: 0x0df6, 0x7c2: 0x14ce, 0x7c3: 0x149a, 0x7c4: 0x0f52, 0x7c5: 0x07e6,\n\t0x7c6: 0x09da, 0x7c7: 0x1726, 0x7c8: 0x1726, 0x7c9: 0x0b06, 0x7ca: 0x155a, 0x7cb: 0x0a3e,\n\t0x7cc: 0x0b02, 0x7cd: 0x0cea, 0x7ce: 0x10ca, 0x7cf: 0x125a, 0x7d0: 0x1392, 0x7d1: 0x13ce,\n\t0x7d2: 0x1402, 0x7d3: 0x1516, 0x7d4: 0x0e6e, 0x7d5: 0x0efa, 0x7d6: 0x0fa6, 0x7d7: 0x103e,\n\t0x7d8: 0x135a, 0x7d9: 0x1542, 0x7da: 0x166e, 0x7db: 0x080a, 0x7dc: 0x09ae, 0x7dd: 0x0e82,\n\t0x7de: 0x0fca, 0x7df: 0x138e, 0x7e0: 0x16be, 0x7e1: 0x0bae, 0x7e2: 0x0f72, 0x7e3: 0x137e,\n\t0x7e4: 0x1412, 0x7e5: 0x0d1e, 0x7e6: 0x12b6, 0x7e7: 0x13da, 0x7e8: 0x0c1a, 0x7e9: 0x0e0a,\n\t0x7ea: 0x0f12, 0x7eb: 0x1016, 0x7ec: 0x1522, 0x7ed: 0x084a, 0x7ee: 0x08e2, 0x7ef: 0x094e,\n\t0x7f0: 0x0d86, 0x7f1: 0x0e7a, 0x7f2: 0x0fc6, 0x7f3: 0x10ea, 0x7f4: 0x1272, 0x7f5: 0x1386,\n\t0x7f6: 0x139e, 0x7f7: 0x14c2, 0x7f8: 0x15ea, 0x7f9: 0x169e, 0x7fa: 0x16ba, 0x7fb: 0x1126,\n\t0x7fc: 0x1166, 0x7fd: 0x121e, 0x7fe: 0x133e, 0x7ff: 0x1576,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x16c6, 0x801: 0x1446, 0x802: 0x0ac2, 0x803: 0x0c36, 0x804: 0x11d6, 0x805: 0x1296,\n\t0x806: 0x0ffa, 0x807: 0x112e, 0x808: 0x1492, 0x809: 0x15e2, 0x80a: 0x0abe, 0x80b: 0x0b8a,\n\t0x80c: 0x0e72, 0x80d: 0x0f26, 0x80e: 0x0f5a, 0x80f: 0x120e, 0x810: 0x1236, 0x811: 0x15a2,\n\t0x812: 0x094a, 0x813: 0x12a2, 0x814: 0x08ee, 0x815: 0x08ea, 0x816: 0x1192, 0x817: 0x1222,\n\t0x818: 0x1356, 0x819: 0x15aa, 0x81a: 0x1462, 0x81b: 0x0d22, 0x81c: 0x0e6e, 0x81d: 0x1452,\n\t0x81e: 0x07f2, 0x81f: 0x0b5e, 0x820: 0x0c8e, 0x821: 0x102a, 0x822: 0x10aa, 0x823: 0x096e,\n\t0x824: 0x1136, 0x825: 0x085a, 0x826: 0x0c72, 0x827: 0x07d2, 0x828: 0x0ee6, 0x829: 0x0d9e,\n\t0x82a: 0x120a, 0x82b: 0x09c2, 0x82c: 0x0aae, 0x82d: 0x10f6, 0x82e: 0x135e, 0x82f: 0x1436,\n\t0x830: 0x0eb2, 0x831: 0x14f2, 0x832: 0x0ede, 0x833: 0x0d32, 0x834: 0x1316, 0x835: 0x0d52,\n\t0x836: 0x10a6, 0x837: 0x0826, 0x838: 0x08a2, 0x839: 0x08e6, 0x83a: 0x0e4e, 0x83b: 0x11f6,\n\t0x83c: 0x12ee, 0x83d: 0x1442, 0x83e: 0x1556, 0x83f: 0x0956,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0a0a, 0x841: 0x0b12, 0x842: 0x0c2a, 0x843: 0x0dba, 0x844: 0x0f76, 0x845: 0x113a,\n\t0x846: 0x1592, 0x847: 0x1676, 0x848: 0x16ca, 0x849: 0x16e2, 0x84a: 0x0932, 0x84b: 0x0dee,\n\t0x84c: 0x0e9e, 0x84d: 0x14e6, 0x84e: 0x0bf6, 0x84f: 0x0cd2, 0x850: 0x0cee, 0x851: 0x0d7e,\n\t0x852: 0x0f66, 0x853: 0x0fb2, 0x854: 0x1062, 0x855: 0x1186, 0x856: 0x122a, 0x857: 0x128e,\n\t0x858: 0x14d6, 0x859: 0x1366, 0x85a: 0x14fe, 0x85b: 0x157a, 0x85c: 0x090a, 0x85d: 0x0936,\n\t0x85e: 0x0a1e, 0x85f: 0x0fa2, 0x860: 0x13ee, 0x861: 0x1436, 0x862: 0x0c16, 0x863: 0x0c86,\n\t0x864: 0x0d4a, 0x865: 0x0eaa, 0x866: 0x11d2, 0x867: 0x101e, 0x868: 0x0836, 0x869: 0x0a7a,\n\t0x86a: 0x0b5e, 0x86b: 0x0bc2, 0x86c: 0x0c92, 0x86d: 0x103a, 0x86e: 0x1056, 0x86f: 0x1266,\n\t0x870: 0x1286, 0x871: 0x155e, 0x872: 0x15de, 0x873: 0x15ee, 0x874: 0x162a, 0x875: 0x084e,\n\t0x876: 0x117a, 0x877: 0x154a, 0x878: 0x15c6, 0x879: 0x0caa, 0x87a: 0x0812, 0x87b: 0x0872,\n\t0x87c: 0x0b62, 0x87d: 0x0b82, 0x87e: 0x0daa, 0x87f: 0x0e6e,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0fbe, 0x881: 0x10c6, 0x882: 0x1372, 0x883: 0x1512, 0x884: 0x171e, 0x885: 0x0dde,\n\t0x886: 0x159e, 0x887: 0x092e, 0x888: 0x0e2a, 0x889: 0x0e36, 0x88a: 0x0f0a, 0x88b: 0x0f42,\n\t0x88c: 0x1046, 0x88d: 0x10a2, 0x88e: 0x1122, 0x88f: 0x1206, 0x890: 0x1636, 0x891: 0x08aa,\n\t0x892: 0x0cfe, 0x893: 0x15ae, 0x894: 0x0862, 0x895: 0x0ba6, 0x896: 0x0f2a, 0x897: 0x14da,\n\t0x898: 0x0c62, 0x899: 0x0cb2, 0x89a: 0x0e3e, 0x89b: 0x102a, 0x89c: 0x15b6, 0x89d: 0x0912,\n\t0x89e: 0x09fa, 0x89f: 0x0b92, 0x8a0: 0x0dce, 0x8a1: 0x0e1a, 0x8a2: 0x0e5a, 0x8a3: 0x0eee,\n\t0x8a4: 0x1042, 0x8a5: 0x10b6, 0x8a6: 0x1252, 0x8a7: 0x13f2, 0x8a8: 0x13fe, 0x8a9: 0x1552,\n\t0x8aa: 0x15d2, 0x8ab: 0x097e, 0x8ac: 0x0f46, 0x8ad: 0x09fe, 0x8ae: 0x0fc2, 0x8af: 0x1066,\n\t0x8b0: 0x1382, 0x8b1: 0x15ba, 0x8b2: 0x16a6, 0x8b3: 0x16ce, 0x8b4: 0x0e32, 0x8b5: 0x0f22,\n\t0x8b6: 0x12be, 0x8b7: 0x11b2, 0x8b8: 0x11be, 0x8b9: 0x11e2, 0x8ba: 0x1012, 0x8bb: 0x0f9a,\n\t0x8bc: 0x145e, 0x8bd: 0x082e, 0x8be: 0x1326, 0x8bf: 0x0916,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0906, 0x8c1: 0x0c06, 0x8c2: 0x0d26, 0x8c3: 0x11ee, 0x8c4: 0x0b4e, 0x8c5: 0x0efe,\n\t0x8c6: 0x0dea, 0x8c7: 0x14e2, 0x8c8: 0x13e2, 0x8c9: 0x15a6, 0x8ca: 0x141e, 0x8cb: 0x0c22,\n\t0x8cc: 0x0882, 0x8cd: 0x0a56, 0x8d0: 0x0aaa,\n\t0x8d2: 0x0dda, 0x8d5: 0x08f2, 0x8d6: 0x101a, 0x8d7: 0x10de,\n\t0x8d8: 0x1142, 0x8d9: 0x115e, 0x8da: 0x1162, 0x8db: 0x1176, 0x8dc: 0x15f6, 0x8dd: 0x11e6,\n\t0x8de: 0x126a, 0x8e0: 0x138a, 0x8e2: 0x144e,\n\t0x8e5: 0x1502, 0x8e6: 0x152e,\n\t0x8ea: 0x164a, 0x8eb: 0x164e, 0x8ec: 0x1652, 0x8ed: 0x16b6, 0x8ee: 0x1526, 0x8ef: 0x15c2,\n\t0x8f0: 0x0852, 0x8f1: 0x0876, 0x8f2: 0x088a, 0x8f3: 0x0946, 0x8f4: 0x0952, 0x8f5: 0x0992,\n\t0x8f6: 0x0a46, 0x8f7: 0x0a62, 0x8f8: 0x0a6a, 0x8f9: 0x0aa6, 0x8fa: 0x0ab2, 0x8fb: 0x0b8e,\n\t0x8fc: 0x0b96, 0x8fd: 0x0c9e, 0x8fe: 0x0cc6, 0x8ff: 0x0cce,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0ce6, 0x901: 0x0d92, 0x902: 0x0dc2, 0x903: 0x0de2, 0x904: 0x0e52, 0x905: 0x0f16,\n\t0x906: 0x0f32, 0x907: 0x0f62, 0x908: 0x0fb6, 0x909: 0x0fd6, 0x90a: 0x104a, 0x90b: 0x112a,\n\t0x90c: 0x1146, 0x90d: 0x114e, 0x90e: 0x114a, 0x90f: 0x1152, 0x910: 0x1156, 0x911: 0x115a,\n\t0x912: 0x116e, 0x913: 0x1172, 0x914: 0x1196, 0x915: 0x11aa, 0x916: 0x11c6, 0x917: 0x122a,\n\t0x918: 0x1232, 0x919: 0x123a, 0x91a: 0x124e, 0x91b: 0x1276, 0x91c: 0x12c6, 0x91d: 0x12fa,\n\t0x91e: 0x12fa, 0x91f: 0x1362, 0x920: 0x140a, 0x921: 0x1422, 0x922: 0x1456, 0x923: 0x145a,\n\t0x924: 0x149e, 0x925: 0x14a2, 0x926: 0x14fa, 0x927: 0x1502, 0x928: 0x15d6, 0x929: 0x161a,\n\t0x92a: 0x1632, 0x92b: 0x0c96, 0x92c: 0x184b, 0x92d: 0x12de,\n\t0x930: 0x07da, 0x931: 0x08de, 0x932: 0x089e, 0x933: 0x0846, 0x934: 0x0886, 0x935: 0x08b2,\n\t0x936: 0x0942, 0x937: 0x095e, 0x938: 0x0a46, 0x939: 0x0a32, 0x93a: 0x0a42, 0x93b: 0x0a5e,\n\t0x93c: 0x0aaa, 0x93d: 0x0aba, 0x93e: 0x0afe, 0x93f: 0x0b0a,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0b26, 0x941: 0x0b36, 0x942: 0x0c1e, 0x943: 0x0c26, 0x944: 0x0c56, 0x945: 0x0c76,\n\t0x946: 0x0ca6, 0x947: 0x0cbe, 0x948: 0x0cae, 0x949: 0x0cce, 0x94a: 0x0cc2, 0x94b: 0x0ce6,\n\t0x94c: 0x0d02, 0x94d: 0x0d5a, 0x94e: 0x0d66, 0x94f: 0x0d6e, 0x950: 0x0d96, 0x951: 0x0dda,\n\t0x952: 0x0e0a, 0x953: 0x0e0e, 0x954: 0x0e22, 0x955: 0x0ea2, 0x956: 0x0eb2, 0x957: 0x0f0a,\n\t0x958: 0x0f56, 0x959: 0x0f4e, 0x95a: 0x0f62, 0x95b: 0x0f7e, 0x95c: 0x0fb6, 0x95d: 0x110e,\n\t0x95e: 0x0fda, 0x95f: 0x100e, 0x960: 0x101a, 0x961: 0x105a, 0x962: 0x1076, 0x963: 0x109a,\n\t0x964: 0x10be, 0x965: 0x10c2, 0x966: 0x10de, 0x967: 0x10e2, 0x968: 0x10f2, 0x969: 0x1106,\n\t0x96a: 0x1102, 0x96b: 0x1132, 0x96c: 0x11ae, 0x96d: 0x11c6, 0x96e: 0x11de, 0x96f: 0x1216,\n\t0x970: 0x122a, 0x971: 0x1246, 0x972: 0x1276, 0x973: 0x132a, 0x974: 0x1352, 0x975: 0x13c6,\n\t0x976: 0x140e, 0x977: 0x141a, 0x978: 0x1422, 0x979: 0x143a, 0x97a: 0x144e, 0x97b: 0x143e,\n\t0x97c: 0x1456, 0x97d: 0x1452, 0x97e: 0x144a, 0x97f: 0x145a,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x1466, 0x981: 0x14a2, 0x982: 0x14de, 0x983: 0x150e, 0x984: 0x1546, 0x985: 0x1566,\n\t0x986: 0x15b2, 0x987: 0x15d6, 0x988: 0x15f6, 0x989: 0x160a, 0x98a: 0x161a, 0x98b: 0x1626,\n\t0x98c: 0x1632, 0x98d: 0x1686, 0x98e: 0x1726, 0x98f: 0x17e2, 0x990: 0x17dd, 0x991: 0x180f,\n\t0x992: 0x0702, 0x993: 0x072a, 0x994: 0x072e, 0x995: 0x1891, 0x996: 0x18be, 0x997: 0x1936,\n\t0x998: 0x1712, 0x999: 0x1722,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x07f6, 0x9c1: 0x07ee, 0x9c2: 0x07fe, 0x9c3: 0x1774, 0x9c4: 0x0842, 0x9c5: 0x0852,\n\t0x9c6: 0x0856, 0x9c7: 0x085e, 0x9c8: 0x0866, 0x9c9: 0x086a, 0x9ca: 0x0876, 0x9cb: 0x086e,\n\t0x9cc: 0x06ae, 0x9cd: 0x1788, 0x9ce: 0x088a, 0x9cf: 0x088e, 0x9d0: 0x0892, 0x9d1: 0x08ae,\n\t0x9d2: 0x1779, 0x9d3: 0x06b2, 0x9d4: 0x089a, 0x9d5: 0x08ba, 0x9d6: 0x1783, 0x9d7: 0x08ca,\n\t0x9d8: 0x08d2, 0x9d9: 0x0832, 0x9da: 0x08da, 0x9db: 0x08de, 0x9dc: 0x195e, 0x9dd: 0x08fa,\n\t0x9de: 0x0902, 0x9df: 0x06ba, 0x9e0: 0x091a, 0x9e1: 0x091e, 0x9e2: 0x0926, 0x9e3: 0x092a,\n\t0x9e4: 0x06be, 0x9e5: 0x0942, 0x9e6: 0x0946, 0x9e7: 0x0952, 0x9e8: 0x095e, 0x9e9: 0x0962,\n\t0x9ea: 0x0966, 0x9eb: 0x096e, 0x9ec: 0x098e, 0x9ed: 0x0992, 0x9ee: 0x099a, 0x9ef: 0x09aa,\n\t0x9f0: 0x09b2, 0x9f1: 0x09b6, 0x9f2: 0x09b6, 0x9f3: 0x09b6, 0x9f4: 0x1797, 0x9f5: 0x0f8e,\n\t0x9f6: 0x09ca, 0x9f7: 0x09d2, 0x9f8: 0x179c, 0x9f9: 0x09de, 0x9fa: 0x09e6, 0x9fb: 0x09ee,\n\t0x9fc: 0x0a16, 0x9fd: 0x0a02, 0x9fe: 0x0a0e, 0x9ff: 0x0a12,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0a1a, 0xa01: 0x0a22, 0xa02: 0x0a26, 0xa03: 0x0a2e, 0xa04: 0x0a36, 0xa05: 0x0a3a,\n\t0xa06: 0x0a3a, 0xa07: 0x0a42, 0xa08: 0x0a4a, 0xa09: 0x0a4e, 0xa0a: 0x0a5a, 0xa0b: 0x0a7e,\n\t0xa0c: 0x0a62, 0xa0d: 0x0a82, 0xa0e: 0x0a66, 0xa0f: 0x0a6e, 0xa10: 0x0906, 0xa11: 0x0aca,\n\t0xa12: 0x0a92, 0xa13: 0x0a96, 0xa14: 0x0a9a, 0xa15: 0x0a8e, 0xa16: 0x0aa2, 0xa17: 0x0a9e,\n\t0xa18: 0x0ab6, 0xa19: 0x17a1, 0xa1a: 0x0ad2, 0xa1b: 0x0ad6, 0xa1c: 0x0ade, 0xa1d: 0x0aea,\n\t0xa1e: 0x0af2, 0xa1f: 0x0b0e, 0xa20: 0x17a6, 0xa21: 0x17ab, 0xa22: 0x0b1a, 0xa23: 0x0b1e,\n\t0xa24: 0x0b22, 0xa25: 0x0b16, 0xa26: 0x0b2a, 0xa27: 0x06c2, 0xa28: 0x06c6, 0xa29: 0x0b32,\n\t0xa2a: 0x0b3a, 0xa2b: 0x0b3a, 0xa2c: 0x17b0, 0xa2d: 0x0b56, 0xa2e: 0x0b5a, 0xa2f: 0x0b5e,\n\t0xa30: 0x0b66, 0xa31: 0x17b5, 0xa32: 0x0b6e, 0xa33: 0x0b72, 0xa34: 0x0c4a, 0xa35: 0x0b7a,\n\t0xa36: 0x06ca, 0xa37: 0x0b86, 0xa38: 0x0b96, 0xa39: 0x0ba2, 0xa3a: 0x0b9e, 0xa3b: 0x17bf,\n\t0xa3c: 0x0baa, 0xa3d: 0x17c4, 0xa3e: 0x0bb6, 0xa3f: 0x0bb2,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0bba, 0xa41: 0x0bca, 0xa42: 0x0bce, 0xa43: 0x06ce, 0xa44: 0x0bde, 0xa45: 0x0be6,\n\t0xa46: 0x0bea, 0xa47: 0x0bee, 0xa48: 0x06d2, 0xa49: 0x17c9, 0xa4a: 0x06d6, 0xa4b: 0x0c0a,\n\t0xa4c: 0x0c0e, 0xa4d: 0x0c12, 0xa4e: 0x0c1a, 0xa4f: 0x1990, 0xa50: 0x0c32, 0xa51: 0x17d3,\n\t0xa52: 0x17d3, 0xa53: 0x12d2, 0xa54: 0x0c42, 0xa55: 0x0c42, 0xa56: 0x06da, 0xa57: 0x17f6,\n\t0xa58: 0x18c8, 0xa59: 0x0c52, 0xa5a: 0x0c5a, 0xa5b: 0x06de, 0xa5c: 0x0c6e, 0xa5d: 0x0c7e,\n\t0xa5e: 0x0c82, 0xa5f: 0x0c8a, 0xa60: 0x0c9a, 0xa61: 0x06e6, 0xa62: 0x06e2, 0xa63: 0x0c9e,\n\t0xa64: 0x17d8, 0xa65: 0x0ca2, 0xa66: 0x0cb6, 0xa67: 0x0cba, 0xa68: 0x0cbe, 0xa69: 0x0cba,\n\t0xa6a: 0x0cca, 0xa6b: 0x0cce, 0xa6c: 0x0cde, 0xa6d: 0x0cd6, 0xa6e: 0x0cda, 0xa6f: 0x0ce2,\n\t0xa70: 0x0ce6, 0xa71: 0x0cea, 0xa72: 0x0cf6, 0xa73: 0x0cfa, 0xa74: 0x0d12, 0xa75: 0x0d1a,\n\t0xa76: 0x0d2a, 0xa77: 0x0d3e, 0xa78: 0x17e7, 0xa79: 0x0d3a, 0xa7a: 0x0d2e, 0xa7b: 0x0d46,\n\t0xa7c: 0x0d4e, 0xa7d: 0x0d62, 0xa7e: 0x17ec, 0xa7f: 0x0d6a,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0x0d5e, 0xa81: 0x0d56, 0xa82: 0x06ea, 0xa83: 0x0d72, 0xa84: 0x0d7a, 0xa85: 0x0d82,\n\t0xa86: 0x0d76, 0xa87: 0x06ee, 0xa88: 0x0d92, 0xa89: 0x0d9a, 0xa8a: 0x17f1, 0xa8b: 0x0dc6,\n\t0xa8c: 0x0dfa, 0xa8d: 0x0dd6, 0xa8e: 0x06fa, 0xa8f: 0x0de2, 0xa90: 0x06f6, 0xa91: 0x06f2,\n\t0xa92: 0x08be, 0xa93: 0x08c2, 0xa94: 0x0dfe, 0xa95: 0x0de6, 0xa96: 0x12a6, 0xa97: 0x075e,\n\t0xa98: 0x0e0a, 0xa99: 0x0e0e, 0xa9a: 0x0e12, 0xa9b: 0x0e26, 0xa9c: 0x0e1e, 0xa9d: 0x180a,\n\t0xa9e: 0x06fe, 0xa9f: 0x0e3a, 0xaa0: 0x0e2e, 0xaa1: 0x0e4a, 0xaa2: 0x0e52, 0xaa3: 0x1814,\n\t0xaa4: 0x0e56, 0xaa5: 0x0e42, 0xaa6: 0x0e5e, 0xaa7: 0x0702, 0xaa8: 0x0e62, 0xaa9: 0x0e66,\n\t0xaaa: 0x0e6a, 0xaab: 0x0e76, 0xaac: 0x1819, 0xaad: 0x0e7e, 0xaae: 0x0706, 0xaaf: 0x0e8a,\n\t0xab0: 0x181e, 0xab1: 0x0e8e, 0xab2: 0x070a, 0xab3: 0x0e9a, 0xab4: 0x0ea6, 0xab5: 0x0eb2,\n\t0xab6: 0x0eb6, 0xab7: 0x1823, 0xab8: 0x17ba, 0xab9: 0x1828, 0xaba: 0x0ed6, 0xabb: 0x182d,\n\t0xabc: 0x0ee2, 0xabd: 0x0eea, 0xabe: 0x0eda, 0xabf: 0x0ef6,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0x0f06, 0xac1: 0x0f16, 0xac2: 0x0f0a, 0xac3: 0x0f0e, 0xac4: 0x0f1a, 0xac5: 0x0f1e,\n\t0xac6: 0x1832, 0xac7: 0x0f02, 0xac8: 0x0f36, 0xac9: 0x0f3a, 0xaca: 0x070e, 0xacb: 0x0f4e,\n\t0xacc: 0x0f4a, 0xacd: 0x1837, 0xace: 0x0f2e, 0xacf: 0x0f6a, 0xad0: 0x183c, 0xad1: 0x1841,\n\t0xad2: 0x0f6e, 0xad3: 0x0f82, 0xad4: 0x0f7e, 0xad5: 0x0f7a, 0xad6: 0x0712, 0xad7: 0x0f86,\n\t0xad8: 0x0f96, 0xad9: 0x0f92, 0xada: 0x0f9e, 0xadb: 0x177e, 0xadc: 0x0fae, 0xadd: 0x1846,\n\t0xade: 0x0fba, 0xadf: 0x1850, 0xae0: 0x0fce, 0xae1: 0x0fda, 0xae2: 0x0fee, 0xae3: 0x1855,\n\t0xae4: 0x1002, 0xae5: 0x1006, 0xae6: 0x185a, 0xae7: 0x185f, 0xae8: 0x1022, 0xae9: 0x1032,\n\t0xaea: 0x0716, 0xaeb: 0x1036, 0xaec: 0x071a, 0xaed: 0x071a, 0xaee: 0x104e, 0xaef: 0x1052,\n\t0xaf0: 0x105a, 0xaf1: 0x105e, 0xaf2: 0x106a, 0xaf3: 0x071e, 0xaf4: 0x1082, 0xaf5: 0x1864,\n\t0xaf6: 0x109e, 0xaf7: 0x1869, 0xaf8: 0x10aa, 0xaf9: 0x17ce, 0xafa: 0x10ba, 0xafb: 0x186e,\n\t0xafc: 0x1873, 0xafd: 0x1878, 0xafe: 0x0722, 0xaff: 0x0726,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x10f2, 0xb01: 0x1882, 0xb02: 0x187d, 0xb03: 0x1887, 0xb04: 0x188c, 0xb05: 0x10fa,\n\t0xb06: 0x10fe, 0xb07: 0x10fe, 0xb08: 0x1106, 0xb09: 0x072e, 0xb0a: 0x110a, 0xb0b: 0x0732,\n\t0xb0c: 0x0736, 0xb0d: 0x1896, 0xb0e: 0x111e, 0xb0f: 0x1126, 0xb10: 0x1132, 0xb11: 0x073a,\n\t0xb12: 0x189b, 0xb13: 0x1156, 0xb14: 0x18a0, 0xb15: 0x18a5, 0xb16: 0x1176, 0xb17: 0x118e,\n\t0xb18: 0x073e, 0xb19: 0x1196, 0xb1a: 0x119a, 0xb1b: 0x119e, 0xb1c: 0x18aa, 0xb1d: 0x18af,\n\t0xb1e: 0x18af, 0xb1f: 0x11b6, 0xb20: 0x0742, 0xb21: 0x18b4, 0xb22: 0x11ca, 0xb23: 0x11ce,\n\t0xb24: 0x0746, 0xb25: 0x18b9, 0xb26: 0x11ea, 0xb27: 0x074a, 0xb28: 0x11fa, 0xb29: 0x11f2,\n\t0xb2a: 0x1202, 0xb2b: 0x18c3, 0xb2c: 0x121a, 0xb2d: 0x074e, 0xb2e: 0x1226, 0xb2f: 0x122e,\n\t0xb30: 0x123e, 0xb31: 0x0752, 0xb32: 0x18cd, 0xb33: 0x18d2, 0xb34: 0x0756, 0xb35: 0x18d7,\n\t0xb36: 0x1256, 0xb37: 0x18dc, 0xb38: 0x1262, 0xb39: 0x126e, 0xb3a: 0x1276, 0xb3b: 0x18e1,\n\t0xb3c: 0x18e6, 0xb3d: 0x128a, 0xb3e: 0x18eb, 0xb3f: 0x1292,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x17fb, 0xb41: 0x075a, 0xb42: 0x12aa, 0xb43: 0x12ae, 0xb44: 0x0762, 0xb45: 0x12b2,\n\t0xb46: 0x0b2e, 0xb47: 0x18f0, 0xb48: 0x18f5, 0xb49: 0x1800, 0xb4a: 0x1805, 0xb4b: 0x12d2,\n\t0xb4c: 0x12d6, 0xb4d: 0x14ee, 0xb4e: 0x0766, 0xb4f: 0x1302, 0xb50: 0x12fe, 0xb51: 0x1306,\n\t0xb52: 0x093a, 0xb53: 0x130a, 0xb54: 0x130e, 0xb55: 0x1312, 0xb56: 0x131a, 0xb57: 0x18fa,\n\t0xb58: 0x1316, 0xb59: 0x131e, 0xb5a: 0x1332, 0xb5b: 0x1336, 0xb5c: 0x1322, 0xb5d: 0x133a,\n\t0xb5e: 0x134e, 0xb5f: 0x1362, 0xb60: 0x132e, 0xb61: 0x1342, 0xb62: 0x1346, 0xb63: 0x134a,\n\t0xb64: 0x18ff, 0xb65: 0x1909, 0xb66: 0x1904, 0xb67: 0x076a, 0xb68: 0x136a, 0xb69: 0x136e,\n\t0xb6a: 0x1376, 0xb6b: 0x191d, 0xb6c: 0x137a, 0xb6d: 0x190e, 0xb6e: 0x076e, 0xb6f: 0x0772,\n\t0xb70: 0x1913, 0xb71: 0x1918, 0xb72: 0x0776, 0xb73: 0x139a, 0xb74: 0x139e, 0xb75: 0x13a2,\n\t0xb76: 0x13a6, 0xb77: 0x13b2, 0xb78: 0x13ae, 0xb79: 0x13ba, 0xb7a: 0x13b6, 0xb7b: 0x13c6,\n\t0xb7c: 0x13be, 0xb7d: 0x13c2, 0xb7e: 0x13ca, 0xb7f: 0x077a,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x13d2, 0xb81: 0x13d6, 0xb82: 0x077e, 0xb83: 0x13e6, 0xb84: 0x13ea, 0xb85: 0x1922,\n\t0xb86: 0x13f6, 0xb87: 0x13fa, 0xb88: 0x0782, 0xb89: 0x1406, 0xb8a: 0x06b6, 0xb8b: 0x1927,\n\t0xb8c: 0x192c, 0xb8d: 0x0786, 0xb8e: 0x078a, 0xb8f: 0x1432, 0xb90: 0x144a, 0xb91: 0x1466,\n\t0xb92: 0x1476, 0xb93: 0x1931, 0xb94: 0x148a, 0xb95: 0x148e, 0xb96: 0x14a6, 0xb97: 0x14b2,\n\t0xb98: 0x193b, 0xb99: 0x178d, 0xb9a: 0x14be, 0xb9b: 0x14ba, 0xb9c: 0x14c6, 0xb9d: 0x1792,\n\t0xb9e: 0x14d2, 0xb9f: 0x14de, 0xba0: 0x1940, 0xba1: 0x1945, 0xba2: 0x151e, 0xba3: 0x152a,\n\t0xba4: 0x1532, 0xba5: 0x194a, 0xba6: 0x1536, 0xba7: 0x1562, 0xba8: 0x156e, 0xba9: 0x1572,\n\t0xbaa: 0x156a, 0xbab: 0x157e, 0xbac: 0x1582, 0xbad: 0x194f, 0xbae: 0x158e, 0xbaf: 0x078e,\n\t0xbb0: 0x1596, 0xbb1: 0x1954, 0xbb2: 0x0792, 0xbb3: 0x15ce, 0xbb4: 0x0bbe, 0xbb5: 0x15e6,\n\t0xbb6: 0x1959, 0xbb7: 0x1963, 0xbb8: 0x0796, 0xbb9: 0x079a, 0xbba: 0x160e, 0xbbb: 0x1968,\n\t0xbbc: 0x079e, 0xbbd: 0x196d, 0xbbe: 0x1626, 0xbbf: 0x1626,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x162e, 0xbc1: 0x1972, 0xbc2: 0x1646, 0xbc3: 0x07a2, 0xbc4: 0x1656, 0xbc5: 0x1662,\n\t0xbc6: 0x166a, 0xbc7: 0x1672, 0xbc8: 0x07a6, 0xbc9: 0x1977, 0xbca: 0x1686, 0xbcb: 0x16a2,\n\t0xbcc: 0x16ae, 0xbcd: 0x07aa, 0xbce: 0x07ae, 0xbcf: 0x16b2, 0xbd0: 0x197c, 0xbd1: 0x07b2,\n\t0xbd2: 0x1981, 0xbd3: 0x1986, 0xbd4: 0x198b, 0xbd5: 0x16d6, 0xbd6: 0x07b6, 0xbd7: 0x16ea,\n\t0xbd8: 0x16f2, 0xbd9: 0x16f6, 0xbda: 0x16fe, 0xbdb: 0x1706, 0xbdc: 0x170e, 0xbdd: 0x1995,\n}\n\n// nfcIndex: 22 blocks, 1408 entries, 1408 bytes\n// Block 0 is the zero block.\nvar nfcIndex = [1408]uint8{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x2e, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x2f, 0xc7: 0x04,\n\t0xc8: 0x05, 0xca: 0x30, 0xcb: 0x31, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x32,\n\t0xd0: 0x09, 0xd1: 0x33, 0xd2: 0x34, 0xd3: 0x0a, 0xd6: 0x0b, 0xd7: 0x35,\n\t0xd8: 0x36, 0xd9: 0x0c, 0xdb: 0x37, 0xdc: 0x38, 0xdd: 0x39, 0xdf: 0x3a,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,\n\t0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,\n\t0xf0: 0x13,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x3b, 0x121: 0x3c, 0x122: 0x3d, 0x123: 0x0d, 0x124: 0x3e, 0x125: 0x3f, 0x126: 0x40, 0x127: 0x41,\n\t0x128: 0x42, 0x129: 0x43, 0x12a: 0x44, 0x12b: 0x45, 0x12c: 0x40, 0x12d: 0x46, 0x12e: 0x47, 0x12f: 0x48,\n\t0x130: 0x44, 0x131: 0x49, 0x132: 0x4a, 0x133: 0x4b, 0x134: 0x4c, 0x135: 0x4d, 0x137: 0x4e,\n\t0x138: 0x4f, 0x139: 0x50, 0x13a: 0x51, 0x13b: 0x52, 0x13c: 0x53, 0x13d: 0x54, 0x13e: 0x55, 0x13f: 0x56,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x57, 0x142: 0x58, 0x144: 0x59, 0x145: 0x5a, 0x146: 0x5b, 0x147: 0x5c,\n\t0x14d: 0x5d,\n\t0x15c: 0x5e, 0x15f: 0x5f,\n\t0x162: 0x60, 0x164: 0x61,\n\t0x168: 0x62, 0x169: 0x63, 0x16a: 0x64, 0x16b: 0x65, 0x16c: 0x0e, 0x16d: 0x66, 0x16e: 0x67, 0x16f: 0x68,\n\t0x170: 0x69, 0x173: 0x6a, 0x177: 0x0f,\n\t0x178: 0x10, 0x179: 0x11, 0x17a: 0x12, 0x17b: 0x13, 0x17c: 0x14, 0x17d: 0x15, 0x17e: 0x16, 0x17f: 0x17,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x6b, 0x183: 0x6c, 0x184: 0x6d, 0x186: 0x6e, 0x187: 0x6f,\n\t0x188: 0x70, 0x189: 0x18, 0x18a: 0x19, 0x18b: 0x71, 0x18c: 0x72,\n\t0x1ab: 0x73,\n\t0x1b3: 0x74, 0x1b5: 0x75, 0x1b7: 0x76,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x77, 0x1c1: 0x1a, 0x1c2: 0x1b, 0x1c3: 0x1c, 0x1c4: 0x78, 0x1c5: 0x79,\n\t0x1c9: 0x7a, 0x1cc: 0x7b, 0x1cd: 0x7c,\n\t// Block 0x8, offset 0x200\n\t0x219: 0x7d, 0x21a: 0x7e, 0x21b: 0x7f,\n\t0x220: 0x80, 0x223: 0x81, 0x224: 0x82, 0x225: 0x83, 0x226: 0x84, 0x227: 0x85,\n\t0x22a: 0x86, 0x22b: 0x87, 0x22f: 0x88,\n\t0x230: 0x89, 0x231: 0x8a, 0x232: 0x8b, 0x233: 0x8c, 0x234: 0x8d, 0x235: 0x8e, 0x236: 0x8f, 0x237: 0x89,\n\t0x238: 0x8a, 0x239: 0x8b, 0x23a: 0x8c, 0x23b: 0x8d, 0x23c: 0x8e, 0x23d: 0x8f, 0x23e: 0x89, 0x23f: 0x8a,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x8b, 0x241: 0x8c, 0x242: 0x8d, 0x243: 0x8e, 0x244: 0x8f, 0x245: 0x89, 0x246: 0x8a, 0x247: 0x8b,\n\t0x248: 0x8c, 0x249: 0x8d, 0x24a: 0x8e, 0x24b: 0x8f, 0x24c: 0x89, 0x24d: 0x8a, 0x24e: 0x8b, 0x24f: 0x8c,\n\t0x250: 0x8d, 0x251: 0x8e, 0x252: 0x8f, 0x253: 0x89, 0x254: 0x8a, 0x255: 0x8b, 0x256: 0x8c, 0x257: 0x8d,\n\t0x258: 0x8e, 0x259: 0x8f, 0x25a: 0x89, 0x25b: 0x8a, 0x25c: 0x8b, 0x25d: 0x8c, 0x25e: 0x8d, 0x25f: 0x8e,\n\t0x260: 0x8f, 0x261: 0x89, 0x262: 0x8a, 0x263: 0x8b, 0x264: 0x8c, 0x265: 0x8d, 0x266: 0x8e, 0x267: 0x8f,\n\t0x268: 0x89, 0x269: 0x8a, 0x26a: 0x8b, 0x26b: 0x8c, 0x26c: 0x8d, 0x26d: 0x8e, 0x26e: 0x8f, 0x26f: 0x89,\n\t0x270: 0x8a, 0x271: 0x8b, 0x272: 0x8c, 0x273: 0x8d, 0x274: 0x8e, 0x275: 0x8f, 0x276: 0x89, 0x277: 0x8a,\n\t0x278: 0x8b, 0x279: 0x8c, 0x27a: 0x8d, 0x27b: 0x8e, 0x27c: 0x8f, 0x27d: 0x89, 0x27e: 0x8a, 0x27f: 0x8b,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x8c, 0x281: 0x8d, 0x282: 0x8e, 0x283: 0x8f, 0x284: 0x89, 0x285: 0x8a, 0x286: 0x8b, 0x287: 0x8c,\n\t0x288: 0x8d, 0x289: 0x8e, 0x28a: 0x8f, 0x28b: 0x89, 0x28c: 0x8a, 0x28d: 0x8b, 0x28e: 0x8c, 0x28f: 0x8d,\n\t0x290: 0x8e, 0x291: 0x8f, 0x292: 0x89, 0x293: 0x8a, 0x294: 0x8b, 0x295: 0x8c, 0x296: 0x8d, 0x297: 0x8e,\n\t0x298: 0x8f, 0x299: 0x89, 0x29a: 0x8a, 0x29b: 0x8b, 0x29c: 0x8c, 0x29d: 0x8d, 0x29e: 0x8e, 0x29f: 0x8f,\n\t0x2a0: 0x89, 0x2a1: 0x8a, 0x2a2: 0x8b, 0x2a3: 0x8c, 0x2a4: 0x8d, 0x2a5: 0x8e, 0x2a6: 0x8f, 0x2a7: 0x89,\n\t0x2a8: 0x8a, 0x2a9: 0x8b, 0x2aa: 0x8c, 0x2ab: 0x8d, 0x2ac: 0x8e, 0x2ad: 0x8f, 0x2ae: 0x89, 0x2af: 0x8a,\n\t0x2b0: 0x8b, 0x2b1: 0x8c, 0x2b2: 0x8d, 0x2b3: 0x8e, 0x2b4: 0x8f, 0x2b5: 0x89, 0x2b6: 0x8a, 0x2b7: 0x8b,\n\t0x2b8: 0x8c, 0x2b9: 0x8d, 0x2ba: 0x8e, 0x2bb: 0x8f, 0x2bc: 0x89, 0x2bd: 0x8a, 0x2be: 0x8b, 0x2bf: 0x8c,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x8d, 0x2c1: 0x8e, 0x2c2: 0x8f, 0x2c3: 0x89, 0x2c4: 0x8a, 0x2c5: 0x8b, 0x2c6: 0x8c, 0x2c7: 0x8d,\n\t0x2c8: 0x8e, 0x2c9: 0x8f, 0x2ca: 0x89, 0x2cb: 0x8a, 0x2cc: 0x8b, 0x2cd: 0x8c, 0x2ce: 0x8d, 0x2cf: 0x8e,\n\t0x2d0: 0x8f, 0x2d1: 0x89, 0x2d2: 0x8a, 0x2d3: 0x8b, 0x2d4: 0x8c, 0x2d5: 0x8d, 0x2d6: 0x8e, 0x2d7: 0x8f,\n\t0x2d8: 0x89, 0x2d9: 0x8a, 0x2da: 0x8b, 0x2db: 0x8c, 0x2dc: 0x8d, 0x2dd: 0x8e, 0x2de: 0x90,\n\t// Block 0xc, offset 0x300\n\t0x324: 0x1d, 0x325: 0x1e, 0x326: 0x1f, 0x327: 0x20,\n\t0x328: 0x21, 0x329: 0x22, 0x32a: 0x23, 0x32b: 0x24, 0x32c: 0x91, 0x32d: 0x92, 0x32e: 0x93,\n\t0x331: 0x94, 0x332: 0x95, 0x333: 0x96, 0x334: 0x97,\n\t0x338: 0x98, 0x339: 0x99, 0x33a: 0x9a, 0x33b: 0x9b, 0x33e: 0x9c, 0x33f: 0x9d,\n\t// Block 0xd, offset 0x340\n\t0x347: 0x9e,\n\t0x34b: 0x9f, 0x34d: 0xa0,\n\t0x368: 0xa1, 0x36b: 0xa2,\n\t0x374: 0xa3,\n\t0x37a: 0xa4, 0x37b: 0xa5, 0x37d: 0xa6, 0x37e: 0xa7,\n\t// Block 0xe, offset 0x380\n\t0x381: 0xa8, 0x382: 0xa9, 0x384: 0xaa, 0x385: 0x84, 0x387: 0xab,\n\t0x388: 0xac, 0x38b: 0xad, 0x38c: 0xae, 0x38d: 0xaf,\n\t0x391: 0xb0, 0x392: 0xb1, 0x393: 0xb2, 0x396: 0xb3, 0x397: 0xb4,\n\t0x398: 0x75, 0x39a: 0xb5, 0x39c: 0xb6,\n\t0x3a0: 0xb7, 0x3a4: 0xb8, 0x3a5: 0xb9, 0x3a7: 0xba,\n\t0x3a8: 0xbb, 0x3a9: 0xbc, 0x3aa: 0xbd,\n\t0x3b0: 0x75, 0x3b5: 0xbe, 0x3b6: 0xbf,\n\t0x3bd: 0xc0,\n\t// Block 0xf, offset 0x3c0\n\t0x3eb: 0xc1, 0x3ec: 0xc2,\n\t0x3ff: 0xc3,\n\t// Block 0x10, offset 0x400\n\t0x432: 0xc4,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xc5, 0x446: 0xc6, 0x447: 0xc7,\n\t0x449: 0xc8,\n\t// Block 0x12, offset 0x480\n\t0x480: 0xc9, 0x482: 0xca, 0x484: 0xc2,\n\t0x48a: 0xcb, 0x48b: 0xcc,\n\t0x493: 0xcd,\n\t0x4a3: 0xce, 0x4a5: 0xcf,\n\t// Block 0x13, offset 0x4c0\n\t0x4c8: 0xd0,\n\t// Block 0x14, offset 0x500\n\t0x520: 0x25, 0x521: 0x26, 0x522: 0x27, 0x523: 0x28, 0x524: 0x29, 0x525: 0x2a, 0x526: 0x2b, 0x527: 0x2c,\n\t0x528: 0x2d,\n\t// Block 0x15, offset 0x540\n\t0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d,\n\t0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11,\n\t0x56f: 0x12,\n}\n\n// nfcSparseOffset: 163 entries, 326 bytes\nvar nfcSparseOffset = []uint16{0x0, 0x5, 0x9, 0xb, 0xd, 0x18, 0x28, 0x2a, 0x2f, 0x3a, 0x49, 0x56, 0x5e, 0x63, 0x68, 0x6a, 0x6e, 0x76, 0x7d, 0x80, 0x88, 0x8c, 0x90, 0x92, 0x94, 0x9d, 0xa1, 0xa8, 0xad, 0xb0, 0xba, 0xbd, 0xc4, 0xcc, 0xcf, 0xd1, 0xd4, 0xd6, 0xdb, 0xec, 0xf8, 0xfa, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10a, 0x10c, 0x10f, 0x112, 0x114, 0x117, 0x11a, 0x11e, 0x124, 0x12b, 0x134, 0x136, 0x139, 0x13b, 0x146, 0x14a, 0x158, 0x15b, 0x161, 0x167, 0x172, 0x176, 0x178, 0x17a, 0x17c, 0x17e, 0x180, 0x186, 0x18a, 0x18c, 0x18e, 0x196, 0x19a, 0x19d, 0x19f, 0x1a1, 0x1a4, 0x1a7, 0x1a9, 0x1ab, 0x1ad, 0x1af, 0x1b5, 0x1b8, 0x1ba, 0x1c1, 0x1c7, 0x1cd, 0x1d5, 0x1db, 0x1e1, 0x1e7, 0x1eb, 0x1f9, 0x202, 0x205, 0x208, 0x20a, 0x20d, 0x20f, 0x213, 0x218, 0x21a, 0x21c, 0x221, 0x227, 0x229, 0x22b, 0x22d, 0x233, 0x236, 0x238, 0x23a, 0x23c, 0x242, 0x246, 0x24a, 0x252, 0x259, 0x25c, 0x25f, 0x261, 0x264, 0x26c, 0x270, 0x277, 0x27a, 0x280, 0x282, 0x285, 0x287, 0x28a, 0x28f, 0x291, 0x293, 0x295, 0x297, 0x299, 0x29c, 0x29e, 0x2a0, 0x2a2, 0x2a4, 0x2a6, 0x2a8, 0x2b5, 0x2bf, 0x2c1, 0x2c3, 0x2c9, 0x2cb, 0x2cd, 0x2cf, 0x2d3, 0x2d5, 0x2d8}\n\n// nfcSparseValues: 730 entries, 2920 bytes\nvar nfcSparseValues = [730]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0xa100, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8100, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8100, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8100, lo: 0xb8, hi: 0xb8},\n\t// Block 0x1, offset 0x5\n\t{value: 0x0091, lo: 0x03},\n\t{value: 0x4813, lo: 0xa0, hi: 0xa1},\n\t{value: 0x4845, lo: 0xaf, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb7, hi: 0xb7},\n\t// Block 0x2, offset 0x9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t// Block 0x3, offset 0xb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x98, hi: 0x9d},\n\t// Block 0x4, offset 0xd\n\t{value: 0x0006, lo: 0x0a},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x85, hi: 0x85},\n\t{value: 0xa000, lo: 0x89, hi: 0x89},\n\t{value: 0x4971, lo: 0x8a, hi: 0x8a},\n\t{value: 0x498f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3626, lo: 0x8c, hi: 0x8c},\n\t{value: 0x363e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x49a7, lo: 0x8e, hi: 0x8e},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x365c, lo: 0x93, hi: 0x94},\n\t// Block 0x5, offset 0x18\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0xa000, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3704, lo: 0x90, hi: 0x90},\n\t{value: 0x3710, lo: 0x91, hi: 0x91},\n\t{value: 0x36fe, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x96, hi: 0x96},\n\t{value: 0x3776, lo: 0x97, hi: 0x97},\n\t{value: 0x3740, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3728, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3752, lo: 0x9e, hi: 0x9e},\n\t{value: 0xa000, lo: 0xb4, hi: 0xb5},\n\t{value: 0x377c, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3782, lo: 0xb7, hi: 0xb7},\n\t// Block 0x6, offset 0x28\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x83, hi: 0x87},\n\t// Block 0x7, offset 0x2a\n\t{value: 0x0001, lo: 0x04},\n\t{value: 0x8114, lo: 0x81, hi: 0x82},\n\t{value: 0x8133, lo: 0x84, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t{value: 0x810e, lo: 0x87, hi: 0x87},\n\t// Block 0x8, offset 0x2f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x97},\n\t{value: 0x811a, lo: 0x98, hi: 0x98},\n\t{value: 0x811b, lo: 0x99, hi: 0x99},\n\t{value: 0x811c, lo: 0x9a, hi: 0x9a},\n\t{value: 0x37a0, lo: 0xa2, hi: 0xa2},\n\t{value: 0x37a6, lo: 0xa3, hi: 0xa3},\n\t{value: 0x37b2, lo: 0xa4, hi: 0xa4},\n\t{value: 0x37ac, lo: 0xa5, hi: 0xa5},\n\t{value: 0x37b8, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xa7, hi: 0xa7},\n\t// Block 0x9, offset 0x3a\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x37ca, lo: 0x80, hi: 0x80},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0x37be, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x37c4, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x95, hi: 0x95},\n\t{value: 0x8133, lo: 0x96, hi: 0x9c},\n\t{value: 0x8133, lo: 0x9f, hi: 0xa2},\n\t{value: 0x812e, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa8},\n\t{value: 0x812e, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t// Block 0xa, offset 0x49\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x8120, lo: 0x91, hi: 0x91},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x812e, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb6},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb9},\n\t{value: 0x8133, lo: 0xba, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbc},\n\t{value: 0x8133, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbe, hi: 0xbe},\n\t{value: 0x8133, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb, offset 0x56\n\t{value: 0x0005, lo: 0x07},\n\t{value: 0x8133, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x812e, lo: 0x82, hi: 0x83},\n\t{value: 0x812e, lo: 0x84, hi: 0x85},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x812e, lo: 0x88, hi: 0x89},\n\t{value: 0x8133, lo: 0x8a, hi: 0x8a},\n\t// Block 0xc, offset 0x5e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xab, hi: 0xb1},\n\t{value: 0x812e, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8133, lo: 0xb3, hi: 0xb3},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0xd, offset 0x63\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0x96, hi: 0x99},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa7},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0xe, offset 0x68\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t// Block 0xf, offset 0x6a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0x98, hi: 0x98},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t{value: 0x8133, lo: 0x9c, hi: 0x9f},\n\t// Block 0x10, offset 0x6e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3e37, lo: 0xa9, hi: 0xa9},\n\t{value: 0xa000, lo: 0xb0, hi: 0xb0},\n\t{value: 0x3e3f, lo: 0xb1, hi: 0xb1},\n\t{value: 0xa000, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3e47, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9903, lo: 0xbc, hi: 0xbc},\n\t// Block 0x11, offset 0x76\n\t{value: 0x0008, lo: 0x06},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x91, hi: 0x91},\n\t{value: 0x812e, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x93, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x94},\n\t{value: 0x45d5, lo: 0x98, hi: 0x9f},\n\t// Block 0x12, offset 0x7d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x13, offset 0x80\n\t{value: 0x0008, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e4f, lo: 0x8b, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x4615, lo: 0x9c, hi: 0x9d},\n\t{value: 0x4625, lo: 0x9f, hi: 0x9f},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbe},\n\t// Block 0x14, offset 0x88\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x464d, lo: 0xb3, hi: 0xb3},\n\t{value: 0x4655, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x15, offset 0x8c\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x462d, lo: 0x99, hi: 0x9b},\n\t{value: 0x4645, lo: 0x9e, hi: 0x9e},\n\t// Block 0x16, offset 0x90\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x17, offset 0x92\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t// Block 0x18, offset 0x94\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e67, lo: 0x88, hi: 0x88},\n\t{value: 0x3e5f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e6f, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x96, hi: 0x97},\n\t{value: 0x465d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x4665, lo: 0x9d, hi: 0x9d},\n\t// Block 0x19, offset 0x9d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x3e77, lo: 0x94, hi: 0x94},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1a, offset 0xa1\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3e7f, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3e8f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e87, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1b, offset 0xa8\n\t{value: 0x1801, lo: 0x04},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3e97, lo: 0x88, hi: 0x88},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8121, lo: 0x95, hi: 0x96},\n\t// Block 0x1c, offset 0xad\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa000, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1d, offset 0xb0\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3e9f, lo: 0x80, hi: 0x80},\n\t{value: 0x9900, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3ea7, lo: 0x87, hi: 0x87},\n\t{value: 0x3eaf, lo: 0x88, hi: 0x88},\n\t{value: 0x4adf, lo: 0x8a, hi: 0x8a},\n\t{value: 0x42f9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x95, hi: 0x96},\n\t// Block 0x1e, offset 0xba\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1f, offset 0xbd\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3eb7, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3ec7, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3ebf, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x20, offset 0xc4\n\t{value: 0x5a29, lo: 0x07},\n\t{value: 0x9905, lo: 0x8a, hi: 0x8a},\n\t{value: 0x9900, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x3ecf, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4ae7, lo: 0x9c, hi: 0x9c},\n\t{value: 0x4304, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3ed7, lo: 0x9e, hi: 0x9f},\n\t// Block 0x21, offset 0xcc\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8123, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x22, offset 0xcf\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8124, lo: 0x88, hi: 0x8b},\n\t// Block 0x23, offset 0xd1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8125, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x24, offset 0xd4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8126, lo: 0x88, hi: 0x8b},\n\t// Block 0x25, offset 0xd6\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x812e, lo: 0x98, hi: 0x99},\n\t{value: 0x812e, lo: 0xb5, hi: 0xb5},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb7},\n\t{value: 0x812c, lo: 0xb9, hi: 0xb9},\n\t// Block 0x26, offset 0xdb\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x2774, lo: 0x83, hi: 0x83},\n\t{value: 0x277b, lo: 0x8d, hi: 0x8d},\n\t{value: 0x2782, lo: 0x92, hi: 0x92},\n\t{value: 0x2789, lo: 0x97, hi: 0x97},\n\t{value: 0x2790, lo: 0x9c, hi: 0x9c},\n\t{value: 0x276d, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8127, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8128, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4bc5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8129, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4bce, lo: 0xb5, hi: 0xb5},\n\t{value: 0x466d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8200, lo: 0xb7, hi: 0xb7},\n\t{value: 0x4675, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8200, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8128, lo: 0xba, hi: 0xbd},\n\t// Block 0x27, offset 0xec\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x8128, lo: 0x80, hi: 0x80},\n\t{value: 0x4bd7, lo: 0x81, hi: 0x81},\n\t{value: 0x8133, lo: 0x82, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0x86, hi: 0x87},\n\t{value: 0x279e, lo: 0x93, hi: 0x93},\n\t{value: 0x27a5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x27ac, lo: 0xa2, hi: 0xa2},\n\t{value: 0x27b3, lo: 0xa7, hi: 0xa7},\n\t{value: 0x27ba, lo: 0xac, hi: 0xac},\n\t{value: 0x2797, lo: 0xb9, hi: 0xb9},\n\t// Block 0x28, offset 0xf8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x86, hi: 0x86},\n\t// Block 0x29, offset 0xfa\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3edf, lo: 0xa6, hi: 0xa6},\n\t{value: 0x9900, lo: 0xae, hi: 0xae},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x2a, offset 0x100\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t// Block 0x2b, offset 0x102\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x80, hi: 0x92},\n\t// Block 0x2c, offset 0x104\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xb900, lo: 0xa1, hi: 0xb5},\n\t// Block 0x2d, offset 0x106\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0xa8, hi: 0xbf},\n\t// Block 0x2e, offset 0x108\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0x80, hi: 0x82},\n\t// Block 0x2f, offset 0x10a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9f},\n\t// Block 0x30, offset 0x10c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x94, hi: 0x95},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x31, offset 0x10f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9d},\n\t// Block 0x32, offset 0x112\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8132, lo: 0xa9, hi: 0xa9},\n\t// Block 0x33, offset 0x114\n\t{value: 0x0004, lo: 0x02},\n\t{value: 0x812f, lo: 0xb9, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbb},\n\t// Block 0x34, offset 0x117\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x97, hi: 0x97},\n\t{value: 0x812e, lo: 0x98, hi: 0x98},\n\t// Block 0x35, offset 0x11a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8133, lo: 0xb5, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x36, offset 0x11e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t{value: 0x812e, lo: 0xb5, hi: 0xba},\n\t{value: 0x8133, lo: 0xbb, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x37, offset 0x124\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x812e, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x8133, lo: 0x8b, hi: 0x8e},\n\t// Block 0x38, offset 0x12b\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3f27, lo: 0x80, hi: 0x80},\n\t{value: 0x3f2f, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x3f37, lo: 0x83, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xab, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xac},\n\t{value: 0x8133, lo: 0xad, hi: 0xb3},\n\t// Block 0x39, offset 0x134\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xaa, hi: 0xab},\n\t// Block 0x3a, offset 0x136\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8105, lo: 0xb2, hi: 0xb3},\n\t// Block 0x3b, offset 0x139\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x3c, offset 0x13b\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x92},\n\t{value: 0x8101, lo: 0x94, hi: 0x94},\n\t{value: 0x812e, lo: 0x95, hi: 0x99},\n\t{value: 0x8133, lo: 0x9a, hi: 0x9b},\n\t{value: 0x812e, lo: 0x9c, hi: 0x9f},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8101, lo: 0xa2, hi: 0xa8},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t{value: 0x8133, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb9},\n\t// Block 0x3d, offset 0x146\n\t{value: 0x0004, lo: 0x03},\n\t{value: 0x052a, lo: 0x80, hi: 0x81},\n\t{value: 0x8100, lo: 0x97, hi: 0x97},\n\t{value: 0x8100, lo: 0xbe, hi: 0xbe},\n\t// Block 0x3e, offset 0x14a\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x8133, lo: 0x90, hi: 0x91},\n\t{value: 0x8101, lo: 0x92, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x97},\n\t{value: 0x8101, lo: 0x98, hi: 0x9a},\n\t{value: 0x8133, lo: 0x9b, hi: 0x9c},\n\t{value: 0x8133, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8101, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa7},\n\t{value: 0x812e, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8133, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8101, lo: 0xaa, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t// Block 0x3f, offset 0x158\n\t{value: 0x4334, lo: 0x02},\n\t{value: 0x023c, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0057, lo: 0xaa, hi: 0xab},\n\t// Block 0x40, offset 0x15b\n\t{value: 0x0007, lo: 0x05},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t{value: 0x3b18, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3b26, lo: 0xae, hi: 0xae},\n\t// Block 0x41, offset 0x161\n\t{value: 0x000e, lo: 0x05},\n\t{value: 0x3b2d, lo: 0x8d, hi: 0x8e},\n\t{value: 0x3b34, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t// Block 0x42, offset 0x167\n\t{value: 0x64a9, lo: 0x0a},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0x3b42, lo: 0x84, hi: 0x84},\n\t{value: 0xa000, lo: 0x88, hi: 0x88},\n\t{value: 0x3b49, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3b50, lo: 0x8c, hi: 0x8c},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3b57, lo: 0xa4, hi: 0xa5},\n\t{value: 0x3b5e, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xbc, hi: 0xbc},\n\t// Block 0x43, offset 0x172\n\t{value: 0x0007, lo: 0x03},\n\t{value: 0x3bc7, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3bf1, lo: 0xa2, hi: 0xa3},\n\t{value: 0x3c1b, lo: 0xaa, hi: 0xad},\n\t// Block 0x44, offset 0x176\n\t{value: 0x0004, lo: 0x01},\n\t{value: 0x0586, lo: 0xa9, hi: 0xaa},\n\t// Block 0x45, offset 0x178\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x4596, lo: 0x9c, hi: 0x9c},\n\t// Block 0x46, offset 0x17a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xaf, hi: 0xb1},\n\t// Block 0x47, offset 0x17c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x48, offset 0x17e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa0, hi: 0xbf},\n\t// Block 0x49, offset 0x180\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812d, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8132, lo: 0xab, hi: 0xab},\n\t{value: 0x8134, lo: 0xac, hi: 0xac},\n\t{value: 0x812f, lo: 0xad, hi: 0xad},\n\t{value: 0x8130, lo: 0xae, hi: 0xaf},\n\t// Block 0x4a, offset 0x186\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x4be0, lo: 0xb3, hi: 0xb3},\n\t{value: 0x4be0, lo: 0xb5, hi: 0xb6},\n\t{value: 0x4be0, lo: 0xba, hi: 0xbf},\n\t// Block 0x4b, offset 0x18a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x4be0, lo: 0x8f, hi: 0xa3},\n\t// Block 0x4c, offset 0x18c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xae, hi: 0xbe},\n\t// Block 0x4d, offset 0x18e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x8100, lo: 0x84, hi: 0x84},\n\t{value: 0x8100, lo: 0x87, hi: 0x87},\n\t{value: 0x8100, lo: 0x90, hi: 0x90},\n\t{value: 0x8100, lo: 0x9e, hi: 0x9e},\n\t{value: 0x8100, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8100, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8100, lo: 0xbb, hi: 0xbb},\n\t// Block 0x4e, offset 0x196\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8100, lo: 0x80, hi: 0x80},\n\t{value: 0x8100, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8100, lo: 0x8e, hi: 0x8e},\n\t// Block 0x4f, offset 0x19a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb4, hi: 0xbd},\n\t// Block 0x50, offset 0x19d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9f},\n\t// Block 0x51, offset 0x19f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb1},\n\t// Block 0x52, offset 0x1a1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xac, hi: 0xac},\n\t// Block 0x53, offset 0x1a4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xa0, hi: 0xb1},\n\t// Block 0x54, offset 0x1a7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xab, hi: 0xad},\n\t// Block 0x55, offset 0x1a9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x93, hi: 0x93},\n\t// Block 0x56, offset 0x1ab\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb3, hi: 0xb3},\n\t// Block 0x57, offset 0x1ad\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t// Block 0x58, offset 0x1af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb7, hi: 0xb8},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbf},\n\t// Block 0x59, offset 0x1b5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t// Block 0x5a, offset 0x1b8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xad, hi: 0xad},\n\t// Block 0x5b, offset 0x1ba\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe500, lo: 0x80, hi: 0x80},\n\t{value: 0xc600, lo: 0x81, hi: 0x9b},\n\t{value: 0xe500, lo: 0x9c, hi: 0x9c},\n\t{value: 0xc600, lo: 0x9d, hi: 0xb7},\n\t{value: 0xe500, lo: 0xb8, hi: 0xb8},\n\t{value: 0xc600, lo: 0xb9, hi: 0xbf},\n\t// Block 0x5c, offset 0x1c1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x93},\n\t{value: 0xe500, lo: 0x94, hi: 0x94},\n\t{value: 0xc600, lo: 0x95, hi: 0xaf},\n\t{value: 0xe500, lo: 0xb0, hi: 0xb0},\n\t{value: 0xc600, lo: 0xb1, hi: 0xbf},\n\t// Block 0x5d, offset 0x1c7\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8b},\n\t{value: 0xe500, lo: 0x8c, hi: 0x8c},\n\t{value: 0xc600, lo: 0x8d, hi: 0xa7},\n\t{value: 0xe500, lo: 0xa8, hi: 0xa8},\n\t{value: 0xc600, lo: 0xa9, hi: 0xbf},\n\t// Block 0x5e, offset 0x1cd\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xc600, lo: 0x80, hi: 0x83},\n\t{value: 0xe500, lo: 0x84, hi: 0x84},\n\t{value: 0xc600, lo: 0x85, hi: 0x9f},\n\t{value: 0xe500, lo: 0xa0, hi: 0xa0},\n\t{value: 0xc600, lo: 0xa1, hi: 0xbb},\n\t{value: 0xe500, lo: 0xbc, hi: 0xbc},\n\t{value: 0xc600, lo: 0xbd, hi: 0xbf},\n\t// Block 0x5f, offset 0x1d5\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x97},\n\t{value: 0xe500, lo: 0x98, hi: 0x98},\n\t{value: 0xc600, lo: 0x99, hi: 0xb3},\n\t{value: 0xe500, lo: 0xb4, hi: 0xb4},\n\t{value: 0xc600, lo: 0xb5, hi: 0xbf},\n\t// Block 0x60, offset 0x1db\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8f},\n\t{value: 0xe500, lo: 0x90, hi: 0x90},\n\t{value: 0xc600, lo: 0x91, hi: 0xab},\n\t{value: 0xe500, lo: 0xac, hi: 0xac},\n\t{value: 0xc600, lo: 0xad, hi: 0xbf},\n\t// Block 0x61, offset 0x1e1\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t{value: 0xe500, lo: 0xa4, hi: 0xa4},\n\t{value: 0xc600, lo: 0xa5, hi: 0xbf},\n\t// Block 0x62, offset 0x1e7\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t// Block 0x63, offset 0x1eb\n\t{value: 0x0006, lo: 0x0d},\n\t{value: 0x4449, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8116, lo: 0x9e, hi: 0x9e},\n\t{value: 0x44bb, lo: 0x9f, hi: 0x9f},\n\t{value: 0x44a9, lo: 0xaa, hi: 0xab},\n\t{value: 0x45ad, lo: 0xac, hi: 0xac},\n\t{value: 0x45b5, lo: 0xad, hi: 0xad},\n\t{value: 0x4401, lo: 0xae, hi: 0xb1},\n\t{value: 0x441f, lo: 0xb2, hi: 0xb4},\n\t{value: 0x4437, lo: 0xb5, hi: 0xb6},\n\t{value: 0x4443, lo: 0xb8, hi: 0xb8},\n\t{value: 0x444f, lo: 0xb9, hi: 0xbb},\n\t{value: 0x4467, lo: 0xbc, hi: 0xbc},\n\t{value: 0x446d, lo: 0xbe, hi: 0xbe},\n\t// Block 0x64, offset 0x1f9\n\t{value: 0x0006, lo: 0x08},\n\t{value: 0x4473, lo: 0x80, hi: 0x81},\n\t{value: 0x447f, lo: 0x83, hi: 0x84},\n\t{value: 0x4491, lo: 0x86, hi: 0x89},\n\t{value: 0x44b5, lo: 0x8a, hi: 0x8a},\n\t{value: 0x4431, lo: 0x8b, hi: 0x8b},\n\t{value: 0x4419, lo: 0x8c, hi: 0x8c},\n\t{value: 0x4461, lo: 0x8d, hi: 0x8d},\n\t{value: 0x448b, lo: 0x8e, hi: 0x8e},\n\t// Block 0x65, offset 0x202\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0xa4, hi: 0xa5},\n\t{value: 0x8100, lo: 0xb0, hi: 0xb1},\n\t// Block 0x66, offset 0x205\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0x9b, hi: 0x9d},\n\t{value: 0x8200, lo: 0x9e, hi: 0xa3},\n\t// Block 0x67, offset 0x208\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x90, hi: 0x90},\n\t// Block 0x68, offset 0x20a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0x99, hi: 0x99},\n\t{value: 0x8200, lo: 0xb2, hi: 0xb4},\n\t// Block 0x69, offset 0x20d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xbc, hi: 0xbd},\n\t// Block 0x6a, offset 0x20f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa6},\n\t{value: 0x812e, lo: 0xa7, hi: 0xad},\n\t{value: 0x8133, lo: 0xae, hi: 0xaf},\n\t// Block 0x6b, offset 0x213\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8100, lo: 0x89, hi: 0x8c},\n\t{value: 0x8100, lo: 0xb0, hi: 0xb2},\n\t{value: 0x8100, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8100, lo: 0xb6, hi: 0xbf},\n\t// Block 0x6c, offset 0x218\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x81, hi: 0x8c},\n\t// Block 0x6d, offset 0x21a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xb5, hi: 0xba},\n\t// Block 0x6e, offset 0x21c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x4be0, lo: 0x9e, hi: 0x9f},\n\t{value: 0x4be0, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4be0, lo: 0xa5, hi: 0xa6},\n\t{value: 0x4be0, lo: 0xaa, hi: 0xaf},\n\t// Block 0x6f, offset 0x221\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x4be0, lo: 0x82, hi: 0x87},\n\t{value: 0x4be0, lo: 0x8a, hi: 0x8f},\n\t{value: 0x4be0, lo: 0x92, hi: 0x97},\n\t{value: 0x4be0, lo: 0x9a, hi: 0x9c},\n\t{value: 0x8100, lo: 0xa3, hi: 0xa3},\n\t// Block 0x70, offset 0x227\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0x71, offset 0x229\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xa0, hi: 0xa0},\n\t// Block 0x72, offset 0x22b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb6, hi: 0xba},\n\t// Block 0x73, offset 0x22d\n\t{value: 0x002d, lo: 0x05},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8101, lo: 0xb9, hi: 0xba},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x74, offset 0x233\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t// Block 0x75, offset 0x236\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa7},\n\t// Block 0x76, offset 0x238\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t// Block 0x77, offset 0x23a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbf},\n\t// Block 0x78, offset 0x23c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x8133, lo: 0x88, hi: 0x8a},\n\t{value: 0x812e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8133, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x8d, hi: 0x90},\n\t// Block 0x79, offset 0x242\n\t{value: 0x0005, lo: 0x03},\n\t{value: 0x8133, lo: 0x82, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t// Block 0x7a, offset 0x246\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7b, offset 0x24a\n\t{value: 0x17fe, lo: 0x07},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x4277, lo: 0x9a, hi: 0x9a},\n\t{value: 0xa000, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4281, lo: 0x9c, hi: 0x9c},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x428b, lo: 0xab, hi: 0xab},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x7c, offset 0x252\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x8133, lo: 0x80, hi: 0x82},\n\t{value: 0x9900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4295, lo: 0xae, hi: 0xae},\n\t{value: 0x429f, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb1, hi: 0xb2},\n\t{value: 0x8105, lo: 0xb3, hi: 0xb4},\n\t// Block 0x7d, offset 0x259\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0x7e, offset 0x25c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb5, hi: 0xb5},\n\t{value: 0x8103, lo: 0xb6, hi: 0xb6},\n\t// Block 0x7f, offset 0x25f\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x8103, lo: 0xa9, hi: 0xaa},\n\t// Block 0x80, offset 0x261\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x81, offset 0x264\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x42a9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42b3, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x8133, lo: 0xa6, hi: 0xac},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t// Block 0x82, offset 0x26c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x86, hi: 0x86},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9e},\n\t// Block 0x83, offset 0x270\n\t{value: 0x5643, lo: 0x06},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb9, hi: 0xb9},\n\t{value: 0x9900, lo: 0xba, hi: 0xba},\n\t{value: 0x42c7, lo: 0xbb, hi: 0xbb},\n\t{value: 0x42bd, lo: 0xbc, hi: 0xbd},\n\t{value: 0x42d1, lo: 0xbe, hi: 0xbe},\n\t// Block 0x84, offset 0x277\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x85, offset 0x27a\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x9900, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb8, hi: 0xb9},\n\t{value: 0x42db, lo: 0xba, hi: 0xba},\n\t{value: 0x42e5, lo: 0xbb, hi: 0xbb},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x86, offset 0x280\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x80, hi: 0x80},\n\t// Block 0x87, offset 0x282\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x88, offset 0x285\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xab, hi: 0xab},\n\t// Block 0x89, offset 0x287\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8103, lo: 0xba, hi: 0xba},\n\t// Block 0x8a, offset 0x28a\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb5, hi: 0xb5},\n\t{value: 0x42ef, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8105, lo: 0xbd, hi: 0xbe},\n\t// Block 0x8b, offset 0x28f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x8c, offset 0x291\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t// Block 0x8d, offset 0x293\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x8e, offset 0x295\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x87, hi: 0x87},\n\t// Block 0x8f, offset 0x297\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x99, hi: 0x99},\n\t// Block 0x90, offset 0x299\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0x82, hi: 0x82},\n\t{value: 0x8105, lo: 0x84, hi: 0x85},\n\t// Block 0x91, offset 0x29c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x97, hi: 0x97},\n\t// Block 0x92, offset 0x29e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x81, hi: 0x82},\n\t// Block 0x93, offset 0x2a0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0xb0, hi: 0xb4},\n\t// Block 0x94, offset 0x2a2\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb6},\n\t// Block 0x95, offset 0x2a4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8102, lo: 0xb0, hi: 0xb1},\n\t// Block 0x96, offset 0x2a6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0x9e, hi: 0x9e},\n\t// Block 0x97, offset 0x2a8\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x46fd, lo: 0x9e, hi: 0x9e},\n\t{value: 0x4707, lo: 0x9f, hi: 0x9f},\n\t{value: 0x473b, lo: 0xa0, hi: 0xa0},\n\t{value: 0x4749, lo: 0xa1, hi: 0xa1},\n\t{value: 0x4757, lo: 0xa2, hi: 0xa2},\n\t{value: 0x4765, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4773, lo: 0xa4, hi: 0xa4},\n\t{value: 0x812c, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8101, lo: 0xa7, hi: 0xa9},\n\t{value: 0x8131, lo: 0xad, hi: 0xad},\n\t{value: 0x812c, lo: 0xae, hi: 0xb2},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbf},\n\t// Block 0x98, offset 0x2b5\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x812e, lo: 0x80, hi: 0x82},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8b},\n\t{value: 0x8133, lo: 0xaa, hi: 0xad},\n\t{value: 0x4711, lo: 0xbb, hi: 0xbb},\n\t{value: 0x471b, lo: 0xbc, hi: 0xbc},\n\t{value: 0x4781, lo: 0xbd, hi: 0xbd},\n\t{value: 0x479d, lo: 0xbe, hi: 0xbe},\n\t{value: 0x478f, lo: 0xbf, hi: 0xbf},\n\t// Block 0x99, offset 0x2bf\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x47ab, lo: 0x80, hi: 0x80},\n\t// Block 0x9a, offset 0x2c1\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x82, hi: 0x84},\n\t// Block 0x9b, offset 0x2c3\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0x80, hi: 0x86},\n\t{value: 0x8133, lo: 0x88, hi: 0x98},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa1},\n\t{value: 0x8133, lo: 0xa3, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa6, hi: 0xaa},\n\t// Block 0x9c, offset 0x2c9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t// Block 0x9d, offset 0x2cb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t// Block 0x9e, offset 0x2cd\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xac, hi: 0xaf},\n\t// Block 0x9f, offset 0x2cf\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8134, lo: 0xac, hi: 0xad},\n\t{value: 0x812e, lo: 0xae, hi: 0xae},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t// Block 0xa0, offset 0x2d3\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x90, hi: 0x96},\n\t// Block 0xa1, offset 0x2d5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x84, hi: 0x89},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0xa2, offset 0x2d8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x93, hi: 0x93},\n}\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfkcTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfkcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfkcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfkcTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfkcValues[c0]\n\t}\n\ti := nfkcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfkcTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfkcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfkcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfkcTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfkcValues[c0]\n\t}\n\ti := nfkcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// nfkcTrie. Total size: 19260 bytes (18.81 KiB). Checksum: 4d294206c9ae0ba8.\ntype nfkcTrie struct{}\n\nfunc newNfkcTrie(i int) *nfkcTrie {\n\treturn &nfkcTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *nfkcTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 95:\n\t\treturn uint16(nfkcValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 95\n\t\treturn uint16(nfkcSparse.lookup(n, b))\n\t}\n}\n\n// nfkcValues: 97 blocks, 6208 entries, 12416 bytes\n// The third block is the zero block.\nvar nfkcValues = [6208]uint16{\n\t// Block 0x0, offset 0x0\n\t0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000,\n\t// Block 0x1, offset 0x40\n\t0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000,\n\t0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000,\n\t0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000,\n\t0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000,\n\t0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000,\n\t0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000,\n\t0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000,\n\t0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000,\n\t0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000,\n\t0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x2ece, 0xc1: 0x2ed3, 0xc2: 0x47b9, 0xc3: 0x2ed8, 0xc4: 0x47c8, 0xc5: 0x47cd,\n\t0xc6: 0xa000, 0xc7: 0x47d7, 0xc8: 0x2f41, 0xc9: 0x2f46, 0xca: 0x47dc, 0xcb: 0x2f5a,\n\t0xcc: 0x2fcd, 0xcd: 0x2fd2, 0xce: 0x2fd7, 0xcf: 0x47f0, 0xd1: 0x3063,\n\t0xd2: 0x3086, 0xd3: 0x308b, 0xd4: 0x47fa, 0xd5: 0x47ff, 0xd6: 0x480e,\n\t0xd8: 0xa000, 0xd9: 0x3112, 0xda: 0x3117, 0xdb: 0x311c, 0xdc: 0x4840, 0xdd: 0x3194,\n\t0xe0: 0x31da, 0xe1: 0x31df, 0xe2: 0x484a, 0xe3: 0x31e4,\n\t0xe4: 0x4859, 0xe5: 0x485e, 0xe6: 0xa000, 0xe7: 0x4868, 0xe8: 0x324d, 0xe9: 0x3252,\n\t0xea: 0x486d, 0xeb: 0x3266, 0xec: 0x32de, 0xed: 0x32e3, 0xee: 0x32e8, 0xef: 0x4881,\n\t0xf1: 0x3374, 0xf2: 0x3397, 0xf3: 0x339c, 0xf4: 0x488b, 0xf5: 0x4890,\n\t0xf6: 0x489f, 0xf8: 0xa000, 0xf9: 0x3428, 0xfa: 0x342d, 0xfb: 0x3432,\n\t0xfc: 0x48d1, 0xfd: 0x34af, 0xff: 0x34c8,\n\t// Block 0x4, offset 0x100\n\t0x100: 0x2edd, 0x101: 0x31e9, 0x102: 0x47be, 0x103: 0x484f, 0x104: 0x2efb, 0x105: 0x3207,\n\t0x106: 0x2f0f, 0x107: 0x321b, 0x108: 0x2f14, 0x109: 0x3220, 0x10a: 0x2f19, 0x10b: 0x3225,\n\t0x10c: 0x2f1e, 0x10d: 0x322a, 0x10e: 0x2f28, 0x10f: 0x3234,\n\t0x112: 0x47e1, 0x113: 0x4872, 0x114: 0x2f50, 0x115: 0x325c, 0x116: 0x2f55, 0x117: 0x3261,\n\t0x118: 0x2f73, 0x119: 0x327f, 0x11a: 0x2f64, 0x11b: 0x3270, 0x11c: 0x2f8c, 0x11d: 0x3298,\n\t0x11e: 0x2f96, 0x11f: 0x32a2, 0x120: 0x2f9b, 0x121: 0x32a7, 0x122: 0x2fa5, 0x123: 0x32b1,\n\t0x124: 0x2faa, 0x125: 0x32b6, 0x128: 0x2fdc, 0x129: 0x32ed,\n\t0x12a: 0x2fe1, 0x12b: 0x32f2, 0x12c: 0x2fe6, 0x12d: 0x32f7, 0x12e: 0x3009, 0x12f: 0x3315,\n\t0x130: 0x2feb, 0x132: 0x1a8a, 0x133: 0x1b17, 0x134: 0x3013, 0x135: 0x331f,\n\t0x136: 0x3027, 0x137: 0x3338, 0x139: 0x3031, 0x13a: 0x3342, 0x13b: 0x303b,\n\t0x13c: 0x334c, 0x13d: 0x3036, 0x13e: 0x3347, 0x13f: 0x1cdc,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x1d64, 0x143: 0x305e, 0x144: 0x336f, 0x145: 0x3077,\n\t0x146: 0x3388, 0x147: 0x306d, 0x148: 0x337e, 0x149: 0x1d8c,\n\t0x14c: 0x4804, 0x14d: 0x4895, 0x14e: 0x3090, 0x14f: 0x33a1, 0x150: 0x309a, 0x151: 0x33ab,\n\t0x154: 0x30b8, 0x155: 0x33c9, 0x156: 0x30d1, 0x157: 0x33e2,\n\t0x158: 0x30c2, 0x159: 0x33d3, 0x15a: 0x4827, 0x15b: 0x48b8, 0x15c: 0x30db, 0x15d: 0x33ec,\n\t0x15e: 0x30ea, 0x15f: 0x33fb, 0x160: 0x482c, 0x161: 0x48bd, 0x162: 0x3103, 0x163: 0x3419,\n\t0x164: 0x30f4, 0x165: 0x340a, 0x168: 0x4836, 0x169: 0x48c7,\n\t0x16a: 0x483b, 0x16b: 0x48cc, 0x16c: 0x3121, 0x16d: 0x3437, 0x16e: 0x312b, 0x16f: 0x3441,\n\t0x170: 0x3130, 0x171: 0x3446, 0x172: 0x314e, 0x173: 0x3464, 0x174: 0x3171, 0x175: 0x3487,\n\t0x176: 0x3199, 0x177: 0x34b4, 0x178: 0x31ad, 0x179: 0x31bc, 0x17a: 0x34dc, 0x17b: 0x31c6,\n\t0x17c: 0x34e6, 0x17d: 0x31cb, 0x17e: 0x34eb, 0x17f: 0x00a7,\n\t// Block 0x6, offset 0x180\n\t0x184: 0x2dd5, 0x185: 0x2ddb,\n\t0x186: 0x2de1, 0x187: 0x1a9f, 0x188: 0x1aa2, 0x189: 0x1b38, 0x18a: 0x1ab7, 0x18b: 0x1aba,\n\t0x18c: 0x1b6e, 0x18d: 0x2ee7, 0x18e: 0x31f3, 0x18f: 0x2ff5, 0x190: 0x3301, 0x191: 0x309f,\n\t0x192: 0x33b0, 0x193: 0x3135, 0x194: 0x344b, 0x195: 0x392e, 0x196: 0x3abd, 0x197: 0x3927,\n\t0x198: 0x3ab6, 0x199: 0x3935, 0x19a: 0x3ac4, 0x19b: 0x3920, 0x19c: 0x3aaf,\n\t0x19e: 0x380f, 0x19f: 0x399e, 0x1a0: 0x3808, 0x1a1: 0x3997, 0x1a2: 0x3512, 0x1a3: 0x3524,\n\t0x1a6: 0x2fa0, 0x1a7: 0x32ac, 0x1a8: 0x301d, 0x1a9: 0x332e,\n\t0x1aa: 0x481d, 0x1ab: 0x48ae, 0x1ac: 0x38ef, 0x1ad: 0x3a7e, 0x1ae: 0x3536, 0x1af: 0x353c,\n\t0x1b0: 0x3324, 0x1b1: 0x1a6f, 0x1b2: 0x1a72, 0x1b3: 0x1aff, 0x1b4: 0x2f87, 0x1b5: 0x3293,\n\t0x1b8: 0x3059, 0x1b9: 0x336a, 0x1ba: 0x3816, 0x1bb: 0x39a5,\n\t0x1bc: 0x350c, 0x1bd: 0x351e, 0x1be: 0x3518, 0x1bf: 0x352a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x2eec, 0x1c1: 0x31f8, 0x1c2: 0x2ef1, 0x1c3: 0x31fd, 0x1c4: 0x2f69, 0x1c5: 0x3275,\n\t0x1c6: 0x2f6e, 0x1c7: 0x327a, 0x1c8: 0x2ffa, 0x1c9: 0x3306, 0x1ca: 0x2fff, 0x1cb: 0x330b,\n\t0x1cc: 0x30a4, 0x1cd: 0x33b5, 0x1ce: 0x30a9, 0x1cf: 0x33ba, 0x1d0: 0x30c7, 0x1d1: 0x33d8,\n\t0x1d2: 0x30cc, 0x1d3: 0x33dd, 0x1d4: 0x313a, 0x1d5: 0x3450, 0x1d6: 0x313f, 0x1d7: 0x3455,\n\t0x1d8: 0x30e5, 0x1d9: 0x33f6, 0x1da: 0x30fe, 0x1db: 0x3414,\n\t0x1de: 0x2fb9, 0x1df: 0x32c5,\n\t0x1e6: 0x47c3, 0x1e7: 0x4854, 0x1e8: 0x47eb, 0x1e9: 0x487c,\n\t0x1ea: 0x38be, 0x1eb: 0x3a4d, 0x1ec: 0x389b, 0x1ed: 0x3a2a, 0x1ee: 0x4809, 0x1ef: 0x489a,\n\t0x1f0: 0x38b7, 0x1f1: 0x3a46, 0x1f2: 0x31a3, 0x1f3: 0x34be,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9933, 0x201: 0x9933, 0x202: 0x9933, 0x203: 0x9933, 0x204: 0x9933, 0x205: 0x8133,\n\t0x206: 0x9933, 0x207: 0x9933, 0x208: 0x9933, 0x209: 0x9933, 0x20a: 0x9933, 0x20b: 0x9933,\n\t0x20c: 0x9933, 0x20d: 0x8133, 0x20e: 0x8133, 0x20f: 0x9933, 0x210: 0x8133, 0x211: 0x9933,\n\t0x212: 0x8133, 0x213: 0x9933, 0x214: 0x9933, 0x215: 0x8134, 0x216: 0x812e, 0x217: 0x812e,\n\t0x218: 0x812e, 0x219: 0x812e, 0x21a: 0x8134, 0x21b: 0x992c, 0x21c: 0x812e, 0x21d: 0x812e,\n\t0x21e: 0x812e, 0x21f: 0x812e, 0x220: 0x812e, 0x221: 0x812a, 0x222: 0x812a, 0x223: 0x992e,\n\t0x224: 0x992e, 0x225: 0x992e, 0x226: 0x992e, 0x227: 0x992a, 0x228: 0x992a, 0x229: 0x812e,\n\t0x22a: 0x812e, 0x22b: 0x812e, 0x22c: 0x812e, 0x22d: 0x992e, 0x22e: 0x992e, 0x22f: 0x812e,\n\t0x230: 0x992e, 0x231: 0x992e, 0x232: 0x812e, 0x233: 0x812e, 0x234: 0x8101, 0x235: 0x8101,\n\t0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812e, 0x23a: 0x812e, 0x23b: 0x812e,\n\t0x23c: 0x812e, 0x23d: 0x8133, 0x23e: 0x8133, 0x23f: 0x8133,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x4aef, 0x241: 0x4af4, 0x242: 0x9933, 0x243: 0x4af9, 0x244: 0x4bb2, 0x245: 0x9937,\n\t0x246: 0x8133, 0x247: 0x812e, 0x248: 0x812e, 0x249: 0x812e, 0x24a: 0x8133, 0x24b: 0x8133,\n\t0x24c: 0x8133, 0x24d: 0x812e, 0x24e: 0x812e, 0x250: 0x8133, 0x251: 0x8133,\n\t0x252: 0x8133, 0x253: 0x812e, 0x254: 0x812e, 0x255: 0x812e, 0x256: 0x812e, 0x257: 0x8133,\n\t0x258: 0x8134, 0x259: 0x812e, 0x25a: 0x812e, 0x25b: 0x8133, 0x25c: 0x8135, 0x25d: 0x8136,\n\t0x25e: 0x8136, 0x25f: 0x8135, 0x260: 0x8136, 0x261: 0x8136, 0x262: 0x8135, 0x263: 0x8133,\n\t0x264: 0x8133, 0x265: 0x8133, 0x266: 0x8133, 0x267: 0x8133, 0x268: 0x8133, 0x269: 0x8133,\n\t0x26a: 0x8133, 0x26b: 0x8133, 0x26c: 0x8133, 0x26d: 0x8133, 0x26e: 0x8133, 0x26f: 0x8133,\n\t0x274: 0x01ee,\n\t0x27a: 0x435e,\n\t0x27e: 0x0037,\n\t// Block 0xa, offset 0x280\n\t0x284: 0x4313, 0x285: 0x4534,\n\t0x286: 0x3548, 0x287: 0x00ce, 0x288: 0x3566, 0x289: 0x3572, 0x28a: 0x3584,\n\t0x28c: 0x35a2, 0x28e: 0x35b4, 0x28f: 0x35d2, 0x290: 0x3d67, 0x291: 0xa000,\n\t0x295: 0xa000, 0x297: 0xa000,\n\t0x299: 0xa000,\n\t0x29f: 0xa000, 0x2a1: 0xa000,\n\t0x2a5: 0xa000, 0x2a9: 0xa000,\n\t0x2aa: 0x3596, 0x2ab: 0x35c6, 0x2ac: 0x492f, 0x2ad: 0x35f6, 0x2ae: 0x4959, 0x2af: 0x3608,\n\t0x2b0: 0x3dcf, 0x2b1: 0xa000, 0x2b5: 0xa000,\n\t0x2b7: 0xa000, 0x2b9: 0xa000,\n\t0x2bf: 0xa000,\n\t// Block 0xb, offset 0x2c0\n\t0x2c1: 0xa000, 0x2c5: 0xa000,\n\t0x2c9: 0xa000, 0x2ca: 0x4971, 0x2cb: 0x498f,\n\t0x2cc: 0x3626, 0x2cd: 0x363e, 0x2ce: 0x49a7, 0x2d0: 0x0242, 0x2d1: 0x0254,\n\t0x2d2: 0x0230, 0x2d3: 0x43c5, 0x2d4: 0x43cb, 0x2d5: 0x027e, 0x2d6: 0x026c,\n\t0x2f0: 0x025a, 0x2f1: 0x026f, 0x2f2: 0x0272, 0x2f4: 0x020c, 0x2f5: 0x024b,\n\t0x2f9: 0x022a,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x3680, 0x301: 0x368c, 0x303: 0x367a,\n\t0x306: 0xa000, 0x307: 0x3668,\n\t0x30c: 0x36bc, 0x30d: 0x36a4, 0x30e: 0x36ce, 0x310: 0xa000,\n\t0x313: 0xa000, 0x315: 0xa000, 0x316: 0xa000, 0x317: 0xa000,\n\t0x318: 0xa000, 0x319: 0x36b0, 0x31a: 0xa000,\n\t0x31e: 0xa000, 0x323: 0xa000,\n\t0x327: 0xa000,\n\t0x32b: 0xa000, 0x32d: 0xa000,\n\t0x330: 0xa000, 0x333: 0xa000, 0x335: 0xa000,\n\t0x336: 0xa000, 0x337: 0xa000, 0x338: 0xa000, 0x339: 0x3734, 0x33a: 0xa000,\n\t0x33e: 0xa000,\n\t// Block 0xd, offset 0x340\n\t0x341: 0x3692, 0x342: 0x3716,\n\t0x350: 0x366e, 0x351: 0x36f2,\n\t0x352: 0x3674, 0x353: 0x36f8, 0x356: 0x3686, 0x357: 0x370a,\n\t0x358: 0xa000, 0x359: 0xa000, 0x35a: 0x3788, 0x35b: 0x378e, 0x35c: 0x3698, 0x35d: 0x371c,\n\t0x35e: 0x369e, 0x35f: 0x3722, 0x362: 0x36aa, 0x363: 0x372e,\n\t0x364: 0x36b6, 0x365: 0x373a, 0x366: 0x36c2, 0x367: 0x3746, 0x368: 0xa000, 0x369: 0xa000,\n\t0x36a: 0x3794, 0x36b: 0x379a, 0x36c: 0x36ec, 0x36d: 0x3770, 0x36e: 0x36c8, 0x36f: 0x374c,\n\t0x370: 0x36d4, 0x371: 0x3758, 0x372: 0x36da, 0x373: 0x375e, 0x374: 0x36e0, 0x375: 0x3764,\n\t0x378: 0x36e6, 0x379: 0x376a,\n\t// Block 0xe, offset 0x380\n\t0x387: 0x1e91,\n\t0x391: 0x812e,\n\t0x392: 0x8133, 0x393: 0x8133, 0x394: 0x8133, 0x395: 0x8133, 0x396: 0x812e, 0x397: 0x8133,\n\t0x398: 0x8133, 0x399: 0x8133, 0x39a: 0x812f, 0x39b: 0x812e, 0x39c: 0x8133, 0x39d: 0x8133,\n\t0x39e: 0x8133, 0x39f: 0x8133, 0x3a0: 0x8133, 0x3a1: 0x8133, 0x3a2: 0x812e, 0x3a3: 0x812e,\n\t0x3a4: 0x812e, 0x3a5: 0x812e, 0x3a6: 0x812e, 0x3a7: 0x812e, 0x3a8: 0x8133, 0x3a9: 0x8133,\n\t0x3aa: 0x812e, 0x3ab: 0x8133, 0x3ac: 0x8133, 0x3ad: 0x812f, 0x3ae: 0x8132, 0x3af: 0x8133,\n\t0x3b0: 0x8106, 0x3b1: 0x8107, 0x3b2: 0x8108, 0x3b3: 0x8109, 0x3b4: 0x810a, 0x3b5: 0x810b,\n\t0x3b6: 0x810c, 0x3b7: 0x810d, 0x3b8: 0x810e, 0x3b9: 0x810f, 0x3ba: 0x810f, 0x3bb: 0x8110,\n\t0x3bc: 0x8111, 0x3bd: 0x8112, 0x3bf: 0x8113,\n\t// Block 0xf, offset 0x3c0\n\t0x3c8: 0xa000, 0x3ca: 0xa000, 0x3cb: 0x8117,\n\t0x3cc: 0x8118, 0x3cd: 0x8119, 0x3ce: 0x811a, 0x3cf: 0x811b, 0x3d0: 0x811c, 0x3d1: 0x811d,\n\t0x3d2: 0x811e, 0x3d3: 0x9933, 0x3d4: 0x9933, 0x3d5: 0x992e, 0x3d6: 0x812e, 0x3d7: 0x8133,\n\t0x3d8: 0x8133, 0x3d9: 0x8133, 0x3da: 0x8133, 0x3db: 0x8133, 0x3dc: 0x812e, 0x3dd: 0x8133,\n\t0x3de: 0x8133, 0x3df: 0x812e,\n\t0x3f0: 0x811f, 0x3f5: 0x1eb4,\n\t0x3f6: 0x2143, 0x3f7: 0x217f, 0x3f8: 0x217a,\n\t// Block 0x10, offset 0x400\n\t0x40a: 0x8133, 0x40b: 0x8133,\n\t0x40c: 0x8133, 0x40d: 0x8133, 0x40e: 0x8133, 0x40f: 0x812e, 0x410: 0x812e, 0x411: 0x812e,\n\t0x412: 0x812e, 0x413: 0x812e, 0x414: 0x8133, 0x415: 0x8133, 0x416: 0x8133, 0x417: 0x8133,\n\t0x418: 0x8133, 0x419: 0x8133, 0x41a: 0x8133, 0x41b: 0x8133, 0x41c: 0x8133, 0x41d: 0x8133,\n\t0x41e: 0x8133, 0x41f: 0x8133, 0x420: 0x8133, 0x421: 0x8133, 0x423: 0x812e,\n\t0x424: 0x8133, 0x425: 0x8133, 0x426: 0x812e, 0x427: 0x8133, 0x428: 0x8133, 0x429: 0x812e,\n\t0x42a: 0x8133, 0x42b: 0x8133, 0x42c: 0x8133, 0x42d: 0x812e, 0x42e: 0x812e, 0x42f: 0x812e,\n\t0x430: 0x8117, 0x431: 0x8118, 0x432: 0x8119, 0x433: 0x8133, 0x434: 0x8133, 0x435: 0x8133,\n\t0x436: 0x812e, 0x437: 0x8133, 0x438: 0x8133, 0x439: 0x812e, 0x43a: 0x812e, 0x43b: 0x8133,\n\t0x43c: 0x8133, 0x43d: 0x8133, 0x43e: 0x8133, 0x43f: 0x8133,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xa000,\n\t0x446: 0x3ee7, 0x447: 0xa000, 0x448: 0x3eef, 0x449: 0xa000, 0x44a: 0x3ef7, 0x44b: 0xa000,\n\t0x44c: 0x3eff, 0x44d: 0xa000, 0x44e: 0x3f07, 0x451: 0xa000,\n\t0x452: 0x3f0f,\n\t0x474: 0x8103, 0x475: 0x9900,\n\t0x47a: 0xa000, 0x47b: 0x3f17,\n\t0x47c: 0xa000, 0x47d: 0x3f1f, 0x47e: 0xa000, 0x47f: 0xa000,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0069, 0x481: 0x006b, 0x482: 0x006f, 0x483: 0x0083, 0x484: 0x0104, 0x485: 0x0107,\n\t0x486: 0x0506, 0x487: 0x0085, 0x488: 0x0089, 0x489: 0x008b, 0x48a: 0x011f, 0x48b: 0x0122,\n\t0x48c: 0x0125, 0x48d: 0x008f, 0x48f: 0x0097, 0x490: 0x009b, 0x491: 0x00e6,\n\t0x492: 0x009f, 0x493: 0x0110, 0x494: 0x050a, 0x495: 0x050e, 0x496: 0x00a1, 0x497: 0x00a9,\n\t0x498: 0x00ab, 0x499: 0x0516, 0x49a: 0x015b, 0x49b: 0x00ad, 0x49c: 0x051a, 0x49d: 0x0242,\n\t0x49e: 0x0245, 0x49f: 0x0248, 0x4a0: 0x027e, 0x4a1: 0x0281, 0x4a2: 0x0093, 0x4a3: 0x00a5,\n\t0x4a4: 0x00ab, 0x4a5: 0x00ad, 0x4a6: 0x0242, 0x4a7: 0x0245, 0x4a8: 0x026f, 0x4a9: 0x027e,\n\t0x4aa: 0x0281,\n\t0x4b8: 0x02b4,\n\t// Block 0x13, offset 0x4c0\n\t0x4db: 0x010a, 0x4dc: 0x0087, 0x4dd: 0x0113,\n\t0x4de: 0x00d7, 0x4df: 0x0125, 0x4e0: 0x008d, 0x4e1: 0x012b, 0x4e2: 0x0131, 0x4e3: 0x013d,\n\t0x4e4: 0x0146, 0x4e5: 0x0149, 0x4e6: 0x014c, 0x4e7: 0x051e, 0x4e8: 0x01c7, 0x4e9: 0x0155,\n\t0x4ea: 0x0522, 0x4eb: 0x01ca, 0x4ec: 0x0161, 0x4ed: 0x015e, 0x4ee: 0x0164, 0x4ef: 0x0167,\n\t0x4f0: 0x016a, 0x4f1: 0x016d, 0x4f2: 0x0176, 0x4f3: 0x018e, 0x4f4: 0x0191, 0x4f5: 0x00f2,\n\t0x4f6: 0x019a, 0x4f7: 0x019d, 0x4f8: 0x0512, 0x4f9: 0x01a0, 0x4fa: 0x01a3, 0x4fb: 0x00b5,\n\t0x4fc: 0x01af, 0x4fd: 0x01b2, 0x4fe: 0x01b5, 0x4ff: 0x0254,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x8133, 0x501: 0x8133, 0x502: 0x812e, 0x503: 0x8133, 0x504: 0x8133, 0x505: 0x8133,\n\t0x506: 0x8133, 0x507: 0x8133, 0x508: 0x8133, 0x509: 0x8133, 0x50a: 0x812e, 0x50b: 0x8133,\n\t0x50c: 0x8133, 0x50d: 0x8136, 0x50e: 0x812b, 0x50f: 0x812e, 0x510: 0x812a, 0x511: 0x8133,\n\t0x512: 0x8133, 0x513: 0x8133, 0x514: 0x8133, 0x515: 0x8133, 0x516: 0x8133, 0x517: 0x8133,\n\t0x518: 0x8133, 0x519: 0x8133, 0x51a: 0x8133, 0x51b: 0x8133, 0x51c: 0x8133, 0x51d: 0x8133,\n\t0x51e: 0x8133, 0x51f: 0x8133, 0x520: 0x8133, 0x521: 0x8133, 0x522: 0x8133, 0x523: 0x8133,\n\t0x524: 0x8133, 0x525: 0x8133, 0x526: 0x8133, 0x527: 0x8133, 0x528: 0x8133, 0x529: 0x8133,\n\t0x52a: 0x8133, 0x52b: 0x8133, 0x52c: 0x8133, 0x52d: 0x8133, 0x52e: 0x8133, 0x52f: 0x8133,\n\t0x530: 0x8133, 0x531: 0x8133, 0x532: 0x8133, 0x533: 0x8133, 0x534: 0x8133, 0x535: 0x8133,\n\t0x536: 0x8134, 0x537: 0x8132, 0x538: 0x8132, 0x539: 0x812e, 0x53a: 0x812d, 0x53b: 0x8133,\n\t0x53c: 0x8135, 0x53d: 0x812e, 0x53e: 0x8133, 0x53f: 0x812e,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x2ef6, 0x541: 0x3202, 0x542: 0x2f00, 0x543: 0x320c, 0x544: 0x2f05, 0x545: 0x3211,\n\t0x546: 0x2f0a, 0x547: 0x3216, 0x548: 0x382b, 0x549: 0x39ba, 0x54a: 0x2f23, 0x54b: 0x322f,\n\t0x54c: 0x2f2d, 0x54d: 0x3239, 0x54e: 0x2f3c, 0x54f: 0x3248, 0x550: 0x2f32, 0x551: 0x323e,\n\t0x552: 0x2f37, 0x553: 0x3243, 0x554: 0x384e, 0x555: 0x39dd, 0x556: 0x3855, 0x557: 0x39e4,\n\t0x558: 0x2f78, 0x559: 0x3284, 0x55a: 0x2f7d, 0x55b: 0x3289, 0x55c: 0x3863, 0x55d: 0x39f2,\n\t0x55e: 0x2f82, 0x55f: 0x328e, 0x560: 0x2f91, 0x561: 0x329d, 0x562: 0x2faf, 0x563: 0x32bb,\n\t0x564: 0x2fbe, 0x565: 0x32ca, 0x566: 0x2fb4, 0x567: 0x32c0, 0x568: 0x2fc3, 0x569: 0x32cf,\n\t0x56a: 0x2fc8, 0x56b: 0x32d4, 0x56c: 0x300e, 0x56d: 0x331a, 0x56e: 0x386a, 0x56f: 0x39f9,\n\t0x570: 0x3018, 0x571: 0x3329, 0x572: 0x3022, 0x573: 0x3333, 0x574: 0x302c, 0x575: 0x333d,\n\t0x576: 0x47f5, 0x577: 0x4886, 0x578: 0x3871, 0x579: 0x3a00, 0x57a: 0x3045, 0x57b: 0x3356,\n\t0x57c: 0x3040, 0x57d: 0x3351, 0x57e: 0x304a, 0x57f: 0x335b,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x304f, 0x581: 0x3360, 0x582: 0x3054, 0x583: 0x3365, 0x584: 0x3068, 0x585: 0x3379,\n\t0x586: 0x3072, 0x587: 0x3383, 0x588: 0x3081, 0x589: 0x3392, 0x58a: 0x307c, 0x58b: 0x338d,\n\t0x58c: 0x3894, 0x58d: 0x3a23, 0x58e: 0x38a2, 0x58f: 0x3a31, 0x590: 0x38a9, 0x591: 0x3a38,\n\t0x592: 0x38b0, 0x593: 0x3a3f, 0x594: 0x30ae, 0x595: 0x33bf, 0x596: 0x30b3, 0x597: 0x33c4,\n\t0x598: 0x30bd, 0x599: 0x33ce, 0x59a: 0x4822, 0x59b: 0x48b3, 0x59c: 0x38f6, 0x59d: 0x3a85,\n\t0x59e: 0x30d6, 0x59f: 0x33e7, 0x5a0: 0x30e0, 0x5a1: 0x33f1, 0x5a2: 0x4831, 0x5a3: 0x48c2,\n\t0x5a4: 0x38fd, 0x5a5: 0x3a8c, 0x5a6: 0x3904, 0x5a7: 0x3a93, 0x5a8: 0x390b, 0x5a9: 0x3a9a,\n\t0x5aa: 0x30ef, 0x5ab: 0x3400, 0x5ac: 0x30f9, 0x5ad: 0x340f, 0x5ae: 0x310d, 0x5af: 0x3423,\n\t0x5b0: 0x3108, 0x5b1: 0x341e, 0x5b2: 0x3149, 0x5b3: 0x345f, 0x5b4: 0x3158, 0x5b5: 0x346e,\n\t0x5b6: 0x3153, 0x5b7: 0x3469, 0x5b8: 0x3912, 0x5b9: 0x3aa1, 0x5ba: 0x3919, 0x5bb: 0x3aa8,\n\t0x5bc: 0x315d, 0x5bd: 0x3473, 0x5be: 0x3162, 0x5bf: 0x3478,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x3167, 0x5c1: 0x347d, 0x5c2: 0x316c, 0x5c3: 0x3482, 0x5c4: 0x317b, 0x5c5: 0x3491,\n\t0x5c6: 0x3176, 0x5c7: 0x348c, 0x5c8: 0x3180, 0x5c9: 0x349b, 0x5ca: 0x3185, 0x5cb: 0x34a0,\n\t0x5cc: 0x318a, 0x5cd: 0x34a5, 0x5ce: 0x31a8, 0x5cf: 0x34c3, 0x5d0: 0x31c1, 0x5d1: 0x34e1,\n\t0x5d2: 0x31d0, 0x5d3: 0x34f0, 0x5d4: 0x31d5, 0x5d5: 0x34f5, 0x5d6: 0x32d9, 0x5d7: 0x3405,\n\t0x5d8: 0x3496, 0x5d9: 0x34d2, 0x5da: 0x1d10, 0x5db: 0x4390,\n\t0x5e0: 0x47d2, 0x5e1: 0x4863, 0x5e2: 0x2ee2, 0x5e3: 0x31ee,\n\t0x5e4: 0x37d7, 0x5e5: 0x3966, 0x5e6: 0x37d0, 0x5e7: 0x395f, 0x5e8: 0x37e5, 0x5e9: 0x3974,\n\t0x5ea: 0x37de, 0x5eb: 0x396d, 0x5ec: 0x381d, 0x5ed: 0x39ac, 0x5ee: 0x37f3, 0x5ef: 0x3982,\n\t0x5f0: 0x37ec, 0x5f1: 0x397b, 0x5f2: 0x3801, 0x5f3: 0x3990, 0x5f4: 0x37fa, 0x5f5: 0x3989,\n\t0x5f6: 0x3824, 0x5f7: 0x39b3, 0x5f8: 0x47e6, 0x5f9: 0x4877, 0x5fa: 0x2f5f, 0x5fb: 0x326b,\n\t0x5fc: 0x2f4b, 0x5fd: 0x3257, 0x5fe: 0x3839, 0x5ff: 0x39c8,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3832, 0x601: 0x39c1, 0x602: 0x3847, 0x603: 0x39d6, 0x604: 0x3840, 0x605: 0x39cf,\n\t0x606: 0x385c, 0x607: 0x39eb, 0x608: 0x2ff0, 0x609: 0x32fc, 0x60a: 0x3004, 0x60b: 0x3310,\n\t0x60c: 0x4818, 0x60d: 0x48a9, 0x60e: 0x3095, 0x60f: 0x33a6, 0x610: 0x387f, 0x611: 0x3a0e,\n\t0x612: 0x3878, 0x613: 0x3a07, 0x614: 0x388d, 0x615: 0x3a1c, 0x616: 0x3886, 0x617: 0x3a15,\n\t0x618: 0x38e8, 0x619: 0x3a77, 0x61a: 0x38cc, 0x61b: 0x3a5b, 0x61c: 0x38c5, 0x61d: 0x3a54,\n\t0x61e: 0x38da, 0x61f: 0x3a69, 0x620: 0x38d3, 0x621: 0x3a62, 0x622: 0x38e1, 0x623: 0x3a70,\n\t0x624: 0x3144, 0x625: 0x345a, 0x626: 0x3126, 0x627: 0x343c, 0x628: 0x3943, 0x629: 0x3ad2,\n\t0x62a: 0x393c, 0x62b: 0x3acb, 0x62c: 0x3951, 0x62d: 0x3ae0, 0x62e: 0x394a, 0x62f: 0x3ad9,\n\t0x630: 0x3958, 0x631: 0x3ae7, 0x632: 0x318f, 0x633: 0x34aa, 0x634: 0x31b7, 0x635: 0x34d7,\n\t0x636: 0x31b2, 0x637: 0x34cd, 0x638: 0x319e, 0x639: 0x34b9,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x4935, 0x641: 0x493b, 0x642: 0x4a4f, 0x643: 0x4a67, 0x644: 0x4a57, 0x645: 0x4a6f,\n\t0x646: 0x4a5f, 0x647: 0x4a77, 0x648: 0x48db, 0x649: 0x48e1, 0x64a: 0x49bf, 0x64b: 0x49d7,\n\t0x64c: 0x49c7, 0x64d: 0x49df, 0x64e: 0x49cf, 0x64f: 0x49e7, 0x650: 0x4947, 0x651: 0x494d,\n\t0x652: 0x3d17, 0x653: 0x3d27, 0x654: 0x3d1f, 0x655: 0x3d2f,\n\t0x658: 0x48e7, 0x659: 0x48ed, 0x65a: 0x3c47, 0x65b: 0x3c57, 0x65c: 0x3c4f, 0x65d: 0x3c5f,\n\t0x660: 0x495f, 0x661: 0x4965, 0x662: 0x4a7f, 0x663: 0x4a97,\n\t0x664: 0x4a87, 0x665: 0x4a9f, 0x666: 0x4a8f, 0x667: 0x4aa7, 0x668: 0x48f3, 0x669: 0x48f9,\n\t0x66a: 0x49ef, 0x66b: 0x4a07, 0x66c: 0x49f7, 0x66d: 0x4a0f, 0x66e: 0x49ff, 0x66f: 0x4a17,\n\t0x670: 0x4977, 0x671: 0x497d, 0x672: 0x3d77, 0x673: 0x3d8f, 0x674: 0x3d7f, 0x675: 0x3d97,\n\t0x676: 0x3d87, 0x677: 0x3d9f, 0x678: 0x48ff, 0x679: 0x4905, 0x67a: 0x3c77, 0x67b: 0x3c8f,\n\t0x67c: 0x3c7f, 0x67d: 0x3c97, 0x67e: 0x3c87, 0x67f: 0x3c9f,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x4983, 0x681: 0x4989, 0x682: 0x3da7, 0x683: 0x3db7, 0x684: 0x3daf, 0x685: 0x3dbf,\n\t0x688: 0x490b, 0x689: 0x4911, 0x68a: 0x3ca7, 0x68b: 0x3cb7,\n\t0x68c: 0x3caf, 0x68d: 0x3cbf, 0x690: 0x4995, 0x691: 0x499b,\n\t0x692: 0x3ddf, 0x693: 0x3df7, 0x694: 0x3de7, 0x695: 0x3dff, 0x696: 0x3def, 0x697: 0x3e07,\n\t0x699: 0x4917, 0x69b: 0x3cc7, 0x69d: 0x3ccf,\n\t0x69f: 0x3cd7, 0x6a0: 0x49ad, 0x6a1: 0x49b3, 0x6a2: 0x4aaf, 0x6a3: 0x4ac7,\n\t0x6a4: 0x4ab7, 0x6a5: 0x4acf, 0x6a6: 0x4abf, 0x6a7: 0x4ad7, 0x6a8: 0x491d, 0x6a9: 0x4923,\n\t0x6aa: 0x4a1f, 0x6ab: 0x4a37, 0x6ac: 0x4a27, 0x6ad: 0x4a3f, 0x6ae: 0x4a2f, 0x6af: 0x4a47,\n\t0x6b0: 0x4929, 0x6b1: 0x43d7, 0x6b2: 0x35f0, 0x6b3: 0x43dd, 0x6b4: 0x4953, 0x6b5: 0x43e3,\n\t0x6b6: 0x3602, 0x6b7: 0x43e9, 0x6b8: 0x3620, 0x6b9: 0x43ef, 0x6ba: 0x3638, 0x6bb: 0x43f5,\n\t0x6bc: 0x49a1, 0x6bd: 0x43fb,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3cff, 0x6c1: 0x3d07, 0x6c2: 0x41c3, 0x6c3: 0x41e1, 0x6c4: 0x41cd, 0x6c5: 0x41eb,\n\t0x6c6: 0x41d7, 0x6c7: 0x41f5, 0x6c8: 0x3c37, 0x6c9: 0x3c3f, 0x6ca: 0x410f, 0x6cb: 0x412d,\n\t0x6cc: 0x4119, 0x6cd: 0x4137, 0x6ce: 0x4123, 0x6cf: 0x4141, 0x6d0: 0x3d47, 0x6d1: 0x3d4f,\n\t0x6d2: 0x41ff, 0x6d3: 0x421d, 0x6d4: 0x4209, 0x6d5: 0x4227, 0x6d6: 0x4213, 0x6d7: 0x4231,\n\t0x6d8: 0x3c67, 0x6d9: 0x3c6f, 0x6da: 0x414b, 0x6db: 0x4169, 0x6dc: 0x4155, 0x6dd: 0x4173,\n\t0x6de: 0x415f, 0x6df: 0x417d, 0x6e0: 0x3e1f, 0x6e1: 0x3e27, 0x6e2: 0x423b, 0x6e3: 0x4259,\n\t0x6e4: 0x4245, 0x6e5: 0x4263, 0x6e6: 0x424f, 0x6e7: 0x426d, 0x6e8: 0x3cdf, 0x6e9: 0x3ce7,\n\t0x6ea: 0x4187, 0x6eb: 0x41a5, 0x6ec: 0x4191, 0x6ed: 0x41af, 0x6ee: 0x419b, 0x6ef: 0x41b9,\n\t0x6f0: 0x35e4, 0x6f1: 0x35de, 0x6f2: 0x3cef, 0x6f3: 0x35ea, 0x6f4: 0x3cf7,\n\t0x6f6: 0x4941, 0x6f7: 0x3d0f, 0x6f8: 0x3554, 0x6f9: 0x354e, 0x6fa: 0x3542, 0x6fb: 0x43a7,\n\t0x6fc: 0x355a, 0x6fd: 0x4340, 0x6fe: 0x0257, 0x6ff: 0x4340,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x4359, 0x701: 0x453b, 0x702: 0x3d37, 0x703: 0x35fc, 0x704: 0x3d3f,\n\t0x706: 0x496b, 0x707: 0x3d57, 0x708: 0x3560, 0x709: 0x43ad, 0x70a: 0x356c, 0x70b: 0x43b3,\n\t0x70c: 0x3578, 0x70d: 0x4542, 0x70e: 0x4549, 0x70f: 0x4550, 0x710: 0x3614, 0x711: 0x360e,\n\t0x712: 0x3d5f, 0x713: 0x459d, 0x716: 0x361a, 0x717: 0x3d6f,\n\t0x718: 0x3590, 0x719: 0x358a, 0x71a: 0x357e, 0x71b: 0x43b9, 0x71d: 0x4557,\n\t0x71e: 0x455e, 0x71f: 0x4565, 0x720: 0x364a, 0x721: 0x3644, 0x722: 0x3dc7, 0x723: 0x45a5,\n\t0x724: 0x362c, 0x725: 0x3632, 0x726: 0x3650, 0x727: 0x3dd7, 0x728: 0x35c0, 0x729: 0x35ba,\n\t0x72a: 0x35ae, 0x72b: 0x43c5, 0x72c: 0x35a8, 0x72d: 0x452d, 0x72e: 0x4534, 0x72f: 0x0081,\n\t0x732: 0x3e0f, 0x733: 0x3656, 0x734: 0x3e17,\n\t0x736: 0x49b9, 0x737: 0x3e2f, 0x738: 0x359c, 0x739: 0x43bf, 0x73a: 0x35cc, 0x73b: 0x43d1,\n\t0x73c: 0x35d8, 0x73d: 0x4313, 0x73e: 0x4345,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x1d08, 0x741: 0x1d0c, 0x742: 0x0047, 0x743: 0x1d84, 0x745: 0x1d18,\n\t0x746: 0x1d1c, 0x747: 0x00ef, 0x749: 0x1d88, 0x74a: 0x008f, 0x74b: 0x0051,\n\t0x74c: 0x0051, 0x74d: 0x0051, 0x74e: 0x0091, 0x74f: 0x00e0, 0x750: 0x0053, 0x751: 0x0053,\n\t0x752: 0x0059, 0x753: 0x0099, 0x755: 0x005d, 0x756: 0x1abd,\n\t0x759: 0x0061, 0x75a: 0x0063, 0x75b: 0x0065, 0x75c: 0x0065, 0x75d: 0x0065,\n\t0x760: 0x1acf, 0x761: 0x1cf8, 0x762: 0x1ad8,\n\t0x764: 0x0075, 0x766: 0x023c, 0x768: 0x0075,\n\t0x76a: 0x0057, 0x76b: 0x438b, 0x76c: 0x0045, 0x76d: 0x0047, 0x76f: 0x008b,\n\t0x770: 0x004b, 0x771: 0x004d, 0x773: 0x005b, 0x774: 0x009f, 0x775: 0x0308,\n\t0x776: 0x030b, 0x777: 0x030e, 0x778: 0x0311, 0x779: 0x0093, 0x77b: 0x1cc8,\n\t0x77c: 0x026c, 0x77d: 0x0245, 0x77e: 0x01fd, 0x77f: 0x0224,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x055a, 0x785: 0x0049,\n\t0x786: 0x0089, 0x787: 0x008b, 0x788: 0x0093, 0x789: 0x0095,\n\t0x790: 0x235e, 0x791: 0x236a,\n\t0x792: 0x241e, 0x793: 0x2346, 0x794: 0x23ca, 0x795: 0x2352, 0x796: 0x23d0, 0x797: 0x23e8,\n\t0x798: 0x23f4, 0x799: 0x2358, 0x79a: 0x23fa, 0x79b: 0x2364, 0x79c: 0x23ee, 0x79d: 0x2400,\n\t0x79e: 0x2406, 0x79f: 0x1dec, 0x7a0: 0x0053, 0x7a1: 0x1a87, 0x7a2: 0x1cd4, 0x7a3: 0x1a90,\n\t0x7a4: 0x006d, 0x7a5: 0x1adb, 0x7a6: 0x1d00, 0x7a7: 0x1e78, 0x7a8: 0x1a93, 0x7a9: 0x0071,\n\t0x7aa: 0x1ae7, 0x7ab: 0x1d04, 0x7ac: 0x0059, 0x7ad: 0x0047, 0x7ae: 0x0049, 0x7af: 0x005b,\n\t0x7b0: 0x0093, 0x7b1: 0x1b14, 0x7b2: 0x1d48, 0x7b3: 0x1b1d, 0x7b4: 0x00ad, 0x7b5: 0x1b92,\n\t0x7b6: 0x1d7c, 0x7b7: 0x1e8c, 0x7b8: 0x1b20, 0x7b9: 0x00b1, 0x7ba: 0x1b95, 0x7bb: 0x1d80,\n\t0x7bc: 0x0099, 0x7bd: 0x0087, 0x7be: 0x0089, 0x7bf: 0x009b,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c1: 0x3b65, 0x7c3: 0xa000, 0x7c4: 0x3b6c, 0x7c5: 0xa000,\n\t0x7c7: 0x3b73, 0x7c8: 0xa000, 0x7c9: 0x3b7a,\n\t0x7cd: 0xa000,\n\t0x7e0: 0x2ec4, 0x7e1: 0xa000, 0x7e2: 0x3b88,\n\t0x7e4: 0xa000, 0x7e5: 0xa000,\n\t0x7ed: 0x3b81, 0x7ee: 0x2ebf, 0x7ef: 0x2ec9,\n\t0x7f0: 0x3b8f, 0x7f1: 0x3b96, 0x7f2: 0xa000, 0x7f3: 0xa000, 0x7f4: 0x3b9d, 0x7f5: 0x3ba4,\n\t0x7f6: 0xa000, 0x7f7: 0xa000, 0x7f8: 0x3bab, 0x7f9: 0x3bb2, 0x7fa: 0xa000, 0x7fb: 0xa000,\n\t0x7fc: 0xa000, 0x7fd: 0xa000,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3bb9, 0x801: 0x3bc0, 0x802: 0xa000, 0x803: 0xa000, 0x804: 0x3bd5, 0x805: 0x3bdc,\n\t0x806: 0xa000, 0x807: 0xa000, 0x808: 0x3be3, 0x809: 0x3bea,\n\t0x811: 0xa000,\n\t0x812: 0xa000,\n\t0x822: 0xa000,\n\t0x828: 0xa000, 0x829: 0xa000,\n\t0x82b: 0xa000, 0x82c: 0x3bff, 0x82d: 0x3c06, 0x82e: 0x3c0d, 0x82f: 0x3c14,\n\t0x832: 0xa000, 0x833: 0xa000, 0x834: 0xa000, 0x835: 0xa000,\n\t// Block 0x21, offset 0x840\n\t0x860: 0x0023, 0x861: 0x0025, 0x862: 0x0027, 0x863: 0x0029,\n\t0x864: 0x002b, 0x865: 0x002d, 0x866: 0x002f, 0x867: 0x0031, 0x868: 0x0033, 0x869: 0x19af,\n\t0x86a: 0x19b2, 0x86b: 0x19b5, 0x86c: 0x19b8, 0x86d: 0x19bb, 0x86e: 0x19be, 0x86f: 0x19c1,\n\t0x870: 0x19c4, 0x871: 0x19c7, 0x872: 0x19ca, 0x873: 0x19d3, 0x874: 0x1b98, 0x875: 0x1b9c,\n\t0x876: 0x1ba0, 0x877: 0x1ba4, 0x878: 0x1ba8, 0x879: 0x1bac, 0x87a: 0x1bb0, 0x87b: 0x1bb4,\n\t0x87c: 0x1bb8, 0x87d: 0x1db0, 0x87e: 0x1db5, 0x87f: 0x1dba,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x1dbf, 0x881: 0x1dc4, 0x882: 0x1dc9, 0x883: 0x1dce, 0x884: 0x1dd3, 0x885: 0x1dd8,\n\t0x886: 0x1ddd, 0x887: 0x1de2, 0x888: 0x19ac, 0x889: 0x19d0, 0x88a: 0x19f4, 0x88b: 0x1a18,\n\t0x88c: 0x1a3c, 0x88d: 0x1a45, 0x88e: 0x1a4b, 0x88f: 0x1a51, 0x890: 0x1a57, 0x891: 0x1c90,\n\t0x892: 0x1c94, 0x893: 0x1c98, 0x894: 0x1c9c, 0x895: 0x1ca0, 0x896: 0x1ca4, 0x897: 0x1ca8,\n\t0x898: 0x1cac, 0x899: 0x1cb0, 0x89a: 0x1cb4, 0x89b: 0x1cb8, 0x89c: 0x1c24, 0x89d: 0x1c28,\n\t0x89e: 0x1c2c, 0x89f: 0x1c30, 0x8a0: 0x1c34, 0x8a1: 0x1c38, 0x8a2: 0x1c3c, 0x8a3: 0x1c40,\n\t0x8a4: 0x1c44, 0x8a5: 0x1c48, 0x8a6: 0x1c4c, 0x8a7: 0x1c50, 0x8a8: 0x1c54, 0x8a9: 0x1c58,\n\t0x8aa: 0x1c5c, 0x8ab: 0x1c60, 0x8ac: 0x1c64, 0x8ad: 0x1c68, 0x8ae: 0x1c6c, 0x8af: 0x1c70,\n\t0x8b0: 0x1c74, 0x8b1: 0x1c78, 0x8b2: 0x1c7c, 0x8b3: 0x1c80, 0x8b4: 0x1c84, 0x8b5: 0x1c88,\n\t0x8b6: 0x0043, 0x8b7: 0x0045, 0x8b8: 0x0047, 0x8b9: 0x0049, 0x8ba: 0x004b, 0x8bb: 0x004d,\n\t0x8bc: 0x004f, 0x8bd: 0x0051, 0x8be: 0x0053, 0x8bf: 0x0055,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x07ba, 0x8c1: 0x07de, 0x8c2: 0x07ea, 0x8c3: 0x07fa, 0x8c4: 0x0802, 0x8c5: 0x080e,\n\t0x8c6: 0x0816, 0x8c7: 0x081e, 0x8c8: 0x082a, 0x8c9: 0x087e, 0x8ca: 0x0896, 0x8cb: 0x08a6,\n\t0x8cc: 0x08b6, 0x8cd: 0x08c6, 0x8ce: 0x08d6, 0x8cf: 0x08f6, 0x8d0: 0x08fa, 0x8d1: 0x08fe,\n\t0x8d2: 0x0932, 0x8d3: 0x095a, 0x8d4: 0x096a, 0x8d5: 0x0972, 0x8d6: 0x0976, 0x8d7: 0x0982,\n\t0x8d8: 0x099e, 0x8d9: 0x09a2, 0x8da: 0x09ba, 0x8db: 0x09be, 0x8dc: 0x09c6, 0x8dd: 0x09d6,\n\t0x8de: 0x0a72, 0x8df: 0x0a86, 0x8e0: 0x0ac6, 0x8e1: 0x0ada, 0x8e2: 0x0ae2, 0x8e3: 0x0ae6,\n\t0x8e4: 0x0af6, 0x8e5: 0x0b12, 0x8e6: 0x0b3e, 0x8e7: 0x0b4a, 0x8e8: 0x0b6a, 0x8e9: 0x0b76,\n\t0x8ea: 0x0b7a, 0x8eb: 0x0b7e, 0x8ec: 0x0b96, 0x8ed: 0x0b9a, 0x8ee: 0x0bc6, 0x8ef: 0x0bd2,\n\t0x8f0: 0x0bda, 0x8f1: 0x0be2, 0x8f2: 0x0bf2, 0x8f3: 0x0bfa, 0x8f4: 0x0c02, 0x8f5: 0x0c2e,\n\t0x8f6: 0x0c32, 0x8f7: 0x0c3a, 0x8f8: 0x0c3e, 0x8f9: 0x0c46, 0x8fa: 0x0c4e, 0x8fb: 0x0c5e,\n\t0x8fc: 0x0c7a, 0x8fd: 0x0cf2, 0x8fe: 0x0d06, 0x8ff: 0x0d0a,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0d8a, 0x901: 0x0d8e, 0x902: 0x0da2, 0x903: 0x0da6, 0x904: 0x0dae, 0x905: 0x0db6,\n\t0x906: 0x0dbe, 0x907: 0x0dca, 0x908: 0x0df2, 0x909: 0x0e02, 0x90a: 0x0e16, 0x90b: 0x0e86,\n\t0x90c: 0x0e92, 0x90d: 0x0ea2, 0x90e: 0x0eae, 0x90f: 0x0eba, 0x910: 0x0ec2, 0x911: 0x0ec6,\n\t0x912: 0x0eca, 0x913: 0x0ece, 0x914: 0x0ed2, 0x915: 0x0f8a, 0x916: 0x0fd2, 0x917: 0x0fde,\n\t0x918: 0x0fe2, 0x919: 0x0fe6, 0x91a: 0x0fea, 0x91b: 0x0ff2, 0x91c: 0x0ff6, 0x91d: 0x100a,\n\t0x91e: 0x1026, 0x91f: 0x102e, 0x920: 0x106e, 0x921: 0x1072, 0x922: 0x107a, 0x923: 0x107e,\n\t0x924: 0x1086, 0x925: 0x108a, 0x926: 0x10ae, 0x927: 0x10b2, 0x928: 0x10ce, 0x929: 0x10d2,\n\t0x92a: 0x10d6, 0x92b: 0x10da, 0x92c: 0x10ee, 0x92d: 0x1112, 0x92e: 0x1116, 0x92f: 0x111a,\n\t0x930: 0x113e, 0x931: 0x117e, 0x932: 0x1182, 0x933: 0x11a2, 0x934: 0x11b2, 0x935: 0x11ba,\n\t0x936: 0x11da, 0x937: 0x11fe, 0x938: 0x1242, 0x939: 0x124a, 0x93a: 0x125e, 0x93b: 0x126a,\n\t0x93c: 0x1272, 0x93d: 0x127a, 0x93e: 0x127e, 0x93f: 0x1282,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x129a, 0x941: 0x129e, 0x942: 0x12ba, 0x943: 0x12c2, 0x944: 0x12ca, 0x945: 0x12ce,\n\t0x946: 0x12da, 0x947: 0x12e2, 0x948: 0x12e6, 0x949: 0x12ea, 0x94a: 0x12f2, 0x94b: 0x12f6,\n\t0x94c: 0x1396, 0x94d: 0x13aa, 0x94e: 0x13de, 0x94f: 0x13e2, 0x950: 0x13ea, 0x951: 0x1416,\n\t0x952: 0x141e, 0x953: 0x1426, 0x954: 0x142e, 0x955: 0x146a, 0x956: 0x146e, 0x957: 0x1476,\n\t0x958: 0x147a, 0x959: 0x147e, 0x95a: 0x14aa, 0x95b: 0x14ae, 0x95c: 0x14b6, 0x95d: 0x14ca,\n\t0x95e: 0x14ce, 0x95f: 0x14ea, 0x960: 0x14f2, 0x961: 0x14f6, 0x962: 0x151a, 0x963: 0x153a,\n\t0x964: 0x154e, 0x965: 0x1552, 0x966: 0x155a, 0x967: 0x1586, 0x968: 0x158a, 0x969: 0x159a,\n\t0x96a: 0x15be, 0x96b: 0x15ca, 0x96c: 0x15da, 0x96d: 0x15f2, 0x96e: 0x15fa, 0x96f: 0x15fe,\n\t0x970: 0x1602, 0x971: 0x1606, 0x972: 0x1612, 0x973: 0x1616, 0x974: 0x161e, 0x975: 0x163a,\n\t0x976: 0x163e, 0x977: 0x1642, 0x978: 0x165a, 0x979: 0x165e, 0x97a: 0x1666, 0x97b: 0x167a,\n\t0x97c: 0x167e, 0x97d: 0x1682, 0x97e: 0x168a, 0x97f: 0x168e,\n\t// Block 0x26, offset 0x980\n\t0x986: 0xa000, 0x98b: 0xa000,\n\t0x98c: 0x3f47, 0x98d: 0xa000, 0x98e: 0x3f4f, 0x98f: 0xa000, 0x990: 0x3f57, 0x991: 0xa000,\n\t0x992: 0x3f5f, 0x993: 0xa000, 0x994: 0x3f67, 0x995: 0xa000, 0x996: 0x3f6f, 0x997: 0xa000,\n\t0x998: 0x3f77, 0x999: 0xa000, 0x99a: 0x3f7f, 0x99b: 0xa000, 0x99c: 0x3f87, 0x99d: 0xa000,\n\t0x99e: 0x3f8f, 0x99f: 0xa000, 0x9a0: 0x3f97, 0x9a1: 0xa000, 0x9a2: 0x3f9f,\n\t0x9a4: 0xa000, 0x9a5: 0x3fa7, 0x9a6: 0xa000, 0x9a7: 0x3faf, 0x9a8: 0xa000, 0x9a9: 0x3fb7,\n\t0x9af: 0xa000,\n\t0x9b0: 0x3fbf, 0x9b1: 0x3fc7, 0x9b2: 0xa000, 0x9b3: 0x3fcf, 0x9b4: 0x3fd7, 0x9b5: 0xa000,\n\t0x9b6: 0x3fdf, 0x9b7: 0x3fe7, 0x9b8: 0xa000, 0x9b9: 0x3fef, 0x9ba: 0x3ff7, 0x9bb: 0xa000,\n\t0x9bc: 0x3fff, 0x9bd: 0x4007,\n\t// Block 0x27, offset 0x9c0\n\t0x9d4: 0x3f3f,\n\t0x9d9: 0x9904, 0x9da: 0x9904, 0x9db: 0x4395, 0x9dc: 0x439b, 0x9dd: 0xa000,\n\t0x9de: 0x400f, 0x9df: 0x27e4,\n\t0x9e6: 0xa000,\n\t0x9eb: 0xa000, 0x9ec: 0x401f, 0x9ed: 0xa000, 0x9ee: 0x4027, 0x9ef: 0xa000,\n\t0x9f0: 0x402f, 0x9f1: 0xa000, 0x9f2: 0x4037, 0x9f3: 0xa000, 0x9f4: 0x403f, 0x9f5: 0xa000,\n\t0x9f6: 0x4047, 0x9f7: 0xa000, 0x9f8: 0x404f, 0x9f9: 0xa000, 0x9fa: 0x4057, 0x9fb: 0xa000,\n\t0x9fc: 0x405f, 0x9fd: 0xa000, 0x9fe: 0x4067, 0x9ff: 0xa000,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x406f, 0xa01: 0xa000, 0xa02: 0x4077, 0xa04: 0xa000, 0xa05: 0x407f,\n\t0xa06: 0xa000, 0xa07: 0x4087, 0xa08: 0xa000, 0xa09: 0x408f,\n\t0xa0f: 0xa000, 0xa10: 0x4097, 0xa11: 0x409f,\n\t0xa12: 0xa000, 0xa13: 0x40a7, 0xa14: 0x40af, 0xa15: 0xa000, 0xa16: 0x40b7, 0xa17: 0x40bf,\n\t0xa18: 0xa000, 0xa19: 0x40c7, 0xa1a: 0x40cf, 0xa1b: 0xa000, 0xa1c: 0x40d7, 0xa1d: 0x40df,\n\t0xa2f: 0xa000,\n\t0xa30: 0xa000, 0xa31: 0xa000, 0xa32: 0xa000, 0xa34: 0x4017,\n\t0xa37: 0x40e7, 0xa38: 0x40ef, 0xa39: 0x40f7, 0xa3a: 0x40ff,\n\t0xa3d: 0xa000, 0xa3e: 0x4107, 0xa3f: 0x27f9,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x045a, 0xa41: 0x041e, 0xa42: 0x0422, 0xa43: 0x0426, 0xa44: 0x046e, 0xa45: 0x042a,\n\t0xa46: 0x042e, 0xa47: 0x0432, 0xa48: 0x0436, 0xa49: 0x043a, 0xa4a: 0x043e, 0xa4b: 0x0442,\n\t0xa4c: 0x0446, 0xa4d: 0x044a, 0xa4e: 0x044e, 0xa4f: 0x4afe, 0xa50: 0x4b04, 0xa51: 0x4b0a,\n\t0xa52: 0x4b10, 0xa53: 0x4b16, 0xa54: 0x4b1c, 0xa55: 0x4b22, 0xa56: 0x4b28, 0xa57: 0x4b2e,\n\t0xa58: 0x4b34, 0xa59: 0x4b3a, 0xa5a: 0x4b40, 0xa5b: 0x4b46, 0xa5c: 0x4b4c, 0xa5d: 0x4b52,\n\t0xa5e: 0x4b58, 0xa5f: 0x4b5e, 0xa60: 0x4b64, 0xa61: 0x4b6a, 0xa62: 0x4b70, 0xa63: 0x4b76,\n\t0xa64: 0x04b6, 0xa65: 0x0452, 0xa66: 0x0456, 0xa67: 0x04da, 0xa68: 0x04de, 0xa69: 0x04e2,\n\t0xa6a: 0x04e6, 0xa6b: 0x04ea, 0xa6c: 0x04ee, 0xa6d: 0x04f2, 0xa6e: 0x045e, 0xa6f: 0x04f6,\n\t0xa70: 0x04fa, 0xa71: 0x0462, 0xa72: 0x0466, 0xa73: 0x046a, 0xa74: 0x0472, 0xa75: 0x0476,\n\t0xa76: 0x047a, 0xa77: 0x047e, 0xa78: 0x0482, 0xa79: 0x0486, 0xa7a: 0x048a, 0xa7b: 0x048e,\n\t0xa7c: 0x0492, 0xa7d: 0x0496, 0xa7e: 0x049a, 0xa7f: 0x049e,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0x04a2, 0xa81: 0x04a6, 0xa82: 0x04fe, 0xa83: 0x0502, 0xa84: 0x04aa, 0xa85: 0x04ae,\n\t0xa86: 0x04b2, 0xa87: 0x04ba, 0xa88: 0x04be, 0xa89: 0x04c2, 0xa8a: 0x04c6, 0xa8b: 0x04ca,\n\t0xa8c: 0x04ce, 0xa8d: 0x04d2, 0xa8e: 0x04d6,\n\t0xa92: 0x07ba, 0xa93: 0x0816, 0xa94: 0x07c6, 0xa95: 0x0a76, 0xa96: 0x07ca, 0xa97: 0x07e2,\n\t0xa98: 0x07ce, 0xa99: 0x108e, 0xa9a: 0x0802, 0xa9b: 0x07d6, 0xa9c: 0x07be, 0xa9d: 0x0afa,\n\t0xa9e: 0x0a8a, 0xa9f: 0x082a,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0x2184, 0xac1: 0x218a, 0xac2: 0x2190, 0xac3: 0x2196, 0xac4: 0x219c, 0xac5: 0x21a2,\n\t0xac6: 0x21a8, 0xac7: 0x21ae, 0xac8: 0x21b4, 0xac9: 0x21ba, 0xaca: 0x21c0, 0xacb: 0x21c6,\n\t0xacc: 0x21cc, 0xacd: 0x21d2, 0xace: 0x285d, 0xacf: 0x2866, 0xad0: 0x286f, 0xad1: 0x2878,\n\t0xad2: 0x2881, 0xad3: 0x288a, 0xad4: 0x2893, 0xad5: 0x289c, 0xad6: 0x28a5, 0xad7: 0x28b7,\n\t0xad8: 0x28c0, 0xad9: 0x28c9, 0xada: 0x28d2, 0xadb: 0x28db, 0xadc: 0x28ae, 0xadd: 0x2ce3,\n\t0xade: 0x2c24, 0xae0: 0x21d8, 0xae1: 0x21f0, 0xae2: 0x21e4, 0xae3: 0x2238,\n\t0xae4: 0x21f6, 0xae5: 0x2214, 0xae6: 0x21de, 0xae7: 0x220e, 0xae8: 0x21ea, 0xae9: 0x2220,\n\t0xaea: 0x2250, 0xaeb: 0x226e, 0xaec: 0x2268, 0xaed: 0x225c, 0xaee: 0x22aa, 0xaef: 0x223e,\n\t0xaf0: 0x224a, 0xaf1: 0x2262, 0xaf2: 0x2256, 0xaf3: 0x2280, 0xaf4: 0x222c, 0xaf5: 0x2274,\n\t0xaf6: 0x229e, 0xaf7: 0x2286, 0xaf8: 0x221a, 0xaf9: 0x21fc, 0xafa: 0x2232, 0xafb: 0x2244,\n\t0xafc: 0x227a, 0xafd: 0x2202, 0xafe: 0x22a4, 0xaff: 0x2226,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x228c, 0xb01: 0x2208, 0xb02: 0x2292, 0xb03: 0x2298, 0xb04: 0x0a2a, 0xb05: 0x0bfe,\n\t0xb06: 0x0da2, 0xb07: 0x11c2,\n\t0xb10: 0x1cf4, 0xb11: 0x19d6,\n\t0xb12: 0x19d9, 0xb13: 0x19dc, 0xb14: 0x19df, 0xb15: 0x19e2, 0xb16: 0x19e5, 0xb17: 0x19e8,\n\t0xb18: 0x19eb, 0xb19: 0x19ee, 0xb1a: 0x19f7, 0xb1b: 0x19fa, 0xb1c: 0x19fd, 0xb1d: 0x1a00,\n\t0xb1e: 0x1a03, 0xb1f: 0x1a06, 0xb20: 0x0406, 0xb21: 0x040e, 0xb22: 0x0412, 0xb23: 0x041a,\n\t0xb24: 0x041e, 0xb25: 0x0422, 0xb26: 0x042a, 0xb27: 0x0432, 0xb28: 0x0436, 0xb29: 0x043e,\n\t0xb2a: 0x0442, 0xb2b: 0x0446, 0xb2c: 0x044a, 0xb2d: 0x044e, 0xb2e: 0x467d, 0xb2f: 0x4685,\n\t0xb30: 0x468d, 0xb31: 0x4695, 0xb32: 0x469d, 0xb33: 0x46a5, 0xb34: 0x46ad, 0xb35: 0x46b5,\n\t0xb36: 0x46c5, 0xb37: 0x46cd, 0xb38: 0x46d5, 0xb39: 0x46dd, 0xb3a: 0x46e5, 0xb3b: 0x46ed,\n\t0xb3c: 0x2e42, 0xb3d: 0x2e0a, 0xb3e: 0x46bd,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x07ba, 0xb41: 0x0816, 0xb42: 0x07c6, 0xb43: 0x0a76, 0xb44: 0x081a, 0xb45: 0x08aa,\n\t0xb46: 0x07c2, 0xb47: 0x08a6, 0xb48: 0x0806, 0xb49: 0x0982, 0xb4a: 0x0e02, 0xb4b: 0x0f8a,\n\t0xb4c: 0x0ed2, 0xb4d: 0x0e16, 0xb4e: 0x155a, 0xb4f: 0x0a86, 0xb50: 0x0dca, 0xb51: 0x0e46,\n\t0xb52: 0x0e06, 0xb53: 0x1146, 0xb54: 0x09f6, 0xb55: 0x0ffe, 0xb56: 0x1482, 0xb57: 0x115a,\n\t0xb58: 0x093e, 0xb59: 0x118a, 0xb5a: 0x1096, 0xb5b: 0x0b12, 0xb5c: 0x150a, 0xb5d: 0x087a,\n\t0xb5e: 0x09a6, 0xb5f: 0x0ef2, 0xb60: 0x1622, 0xb61: 0x083e, 0xb62: 0x08ce, 0xb63: 0x0e96,\n\t0xb64: 0x07ca, 0xb65: 0x07e2, 0xb66: 0x07ce, 0xb67: 0x0bd6, 0xb68: 0x09ea, 0xb69: 0x097a,\n\t0xb6a: 0x0b52, 0xb6b: 0x0b46, 0xb6c: 0x10e6, 0xb6d: 0x083a, 0xb6e: 0x1496, 0xb6f: 0x0996,\n\t0xb70: 0x0aee, 0xb71: 0x1a09, 0xb72: 0x1a0c, 0xb73: 0x1a0f, 0xb74: 0x1a12, 0xb75: 0x1a1b,\n\t0xb76: 0x1a1e, 0xb77: 0x1a21, 0xb78: 0x1a24, 0xb79: 0x1a27, 0xb7a: 0x1a2a, 0xb7b: 0x1a2d,\n\t0xb7c: 0x1a30, 0xb7d: 0x1a33, 0xb7e: 0x1a36, 0xb7f: 0x1a3f,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x1df6, 0xb81: 0x1e05, 0xb82: 0x1e14, 0xb83: 0x1e23, 0xb84: 0x1e32, 0xb85: 0x1e41,\n\t0xb86: 0x1e50, 0xb87: 0x1e5f, 0xb88: 0x1e6e, 0xb89: 0x22bc, 0xb8a: 0x22ce, 0xb8b: 0x22e0,\n\t0xb8c: 0x1a81, 0xb8d: 0x1d34, 0xb8e: 0x1b02, 0xb8f: 0x1cd8, 0xb90: 0x05c6, 0xb91: 0x05ce,\n\t0xb92: 0x05d6, 0xb93: 0x05de, 0xb94: 0x05e6, 0xb95: 0x05ea, 0xb96: 0x05ee, 0xb97: 0x05f2,\n\t0xb98: 0x05f6, 0xb99: 0x05fa, 0xb9a: 0x05fe, 0xb9b: 0x0602, 0xb9c: 0x0606, 0xb9d: 0x060a,\n\t0xb9e: 0x060e, 0xb9f: 0x0612, 0xba0: 0x0616, 0xba1: 0x061e, 0xba2: 0x0622, 0xba3: 0x0626,\n\t0xba4: 0x062a, 0xba5: 0x062e, 0xba6: 0x0632, 0xba7: 0x0636, 0xba8: 0x063a, 0xba9: 0x063e,\n\t0xbaa: 0x0642, 0xbab: 0x0646, 0xbac: 0x064a, 0xbad: 0x064e, 0xbae: 0x0652, 0xbaf: 0x0656,\n\t0xbb0: 0x065a, 0xbb1: 0x065e, 0xbb2: 0x0662, 0xbb3: 0x066a, 0xbb4: 0x0672, 0xbb5: 0x067a,\n\t0xbb6: 0x067e, 0xbb7: 0x0682, 0xbb8: 0x0686, 0xbb9: 0x068a, 0xbba: 0x068e, 0xbbb: 0x0692,\n\t0xbbc: 0x0696, 0xbbd: 0x069a, 0xbbe: 0x069e, 0xbbf: 0x282a,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x2c43, 0xbc1: 0x2adf, 0xbc2: 0x2c53, 0xbc3: 0x29b7, 0xbc4: 0x2e53, 0xbc5: 0x29c1,\n\t0xbc6: 0x29cb, 0xbc7: 0x2e97, 0xbc8: 0x2aec, 0xbc9: 0x29d5, 0xbca: 0x29df, 0xbcb: 0x29e9,\n\t0xbcc: 0x2b13, 0xbcd: 0x2b20, 0xbce: 0x2af9, 0xbcf: 0x2b06, 0xbd0: 0x2e18, 0xbd1: 0x2b2d,\n\t0xbd2: 0x2b3a, 0xbd3: 0x2cf5, 0xbd4: 0x27eb, 0xbd5: 0x2d08, 0xbd6: 0x2d1b, 0xbd7: 0x2c63,\n\t0xbd8: 0x2b47, 0xbd9: 0x2d2e, 0xbda: 0x2d41, 0xbdb: 0x2b54, 0xbdc: 0x29f3, 0xbdd: 0x29fd,\n\t0xbde: 0x2e26, 0xbdf: 0x2b61, 0xbe0: 0x2c73, 0xbe1: 0x2e64, 0xbe2: 0x2a07, 0xbe3: 0x2a11,\n\t0xbe4: 0x2b6e, 0xbe5: 0x2a1b, 0xbe6: 0x2a25, 0xbe7: 0x2800, 0xbe8: 0x2807, 0xbe9: 0x2a2f,\n\t0xbea: 0x2a39, 0xbeb: 0x2d54, 0xbec: 0x2b7b, 0xbed: 0x2c83, 0xbee: 0x2d67, 0xbef: 0x2b88,\n\t0xbf0: 0x2a4d, 0xbf1: 0x2a43, 0xbf2: 0x2eab, 0xbf3: 0x2b95, 0xbf4: 0x2d7a, 0xbf5: 0x2a57,\n\t0xbf6: 0x2c93, 0xbf7: 0x2a61, 0xbf8: 0x2baf, 0xbf9: 0x2a6b, 0xbfa: 0x2bbc, 0xbfb: 0x2e75,\n\t0xbfc: 0x2ba2, 0xbfd: 0x2ca3, 0xbfe: 0x2bc9, 0xbff: 0x280e,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x2e86, 0xc01: 0x2a75, 0xc02: 0x2a7f, 0xc03: 0x2bd6, 0xc04: 0x2a89, 0xc05: 0x2a93,\n\t0xc06: 0x2a9d, 0xc07: 0x2cb3, 0xc08: 0x2be3, 0xc09: 0x2815, 0xc0a: 0x2d8d, 0xc0b: 0x2dff,\n\t0xc0c: 0x2cc3, 0xc0d: 0x2bf0, 0xc0e: 0x2e34, 0xc0f: 0x2aa7, 0xc10: 0x2ab1, 0xc11: 0x2bfd,\n\t0xc12: 0x281c, 0xc13: 0x2c0a, 0xc14: 0x2cd3, 0xc15: 0x2823, 0xc16: 0x2da0, 0xc17: 0x2abb,\n\t0xc18: 0x1de7, 0xc19: 0x1dfb, 0xc1a: 0x1e0a, 0xc1b: 0x1e19, 0xc1c: 0x1e28, 0xc1d: 0x1e37,\n\t0xc1e: 0x1e46, 0xc1f: 0x1e55, 0xc20: 0x1e64, 0xc21: 0x1e73, 0xc22: 0x22c2, 0xc23: 0x22d4,\n\t0xc24: 0x22e6, 0xc25: 0x22f2, 0xc26: 0x22fe, 0xc27: 0x230a, 0xc28: 0x2316, 0xc29: 0x2322,\n\t0xc2a: 0x232e, 0xc2b: 0x233a, 0xc2c: 0x2376, 0xc2d: 0x2382, 0xc2e: 0x238e, 0xc2f: 0x239a,\n\t0xc30: 0x23a6, 0xc31: 0x1d44, 0xc32: 0x1af6, 0xc33: 0x1a63, 0xc34: 0x1d14, 0xc35: 0x1b77,\n\t0xc36: 0x1b86, 0xc37: 0x1afc, 0xc38: 0x1d2c, 0xc39: 0x1d30, 0xc3a: 0x1a8d, 0xc3b: 0x2838,\n\t0xc3c: 0x2846, 0xc3d: 0x2831, 0xc3e: 0x283f, 0xc3f: 0x2c17,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x1b7a, 0xc41: 0x1b62, 0xc42: 0x1d90, 0xc43: 0x1b4a, 0xc44: 0x1b23, 0xc45: 0x1a96,\n\t0xc46: 0x1aa5, 0xc47: 0x1a75, 0xc48: 0x1d20, 0xc49: 0x1e82, 0xc4a: 0x1b7d, 0xc4b: 0x1b65,\n\t0xc4c: 0x1d94, 0xc4d: 0x1da0, 0xc4e: 0x1b56, 0xc4f: 0x1b2c, 0xc50: 0x1a84, 0xc51: 0x1d4c,\n\t0xc52: 0x1ce0, 0xc53: 0x1ccc, 0xc54: 0x1cfc, 0xc55: 0x1da4, 0xc56: 0x1b59, 0xc57: 0x1af9,\n\t0xc58: 0x1b2f, 0xc59: 0x1b0e, 0xc5a: 0x1b71, 0xc5b: 0x1da8, 0xc5c: 0x1b5c, 0xc5d: 0x1af0,\n\t0xc5e: 0x1b32, 0xc5f: 0x1d6c, 0xc60: 0x1d24, 0xc61: 0x1b44, 0xc62: 0x1d54, 0xc63: 0x1d70,\n\t0xc64: 0x1d28, 0xc65: 0x1b47, 0xc66: 0x1d58, 0xc67: 0x2418, 0xc68: 0x242c, 0xc69: 0x1ac6,\n\t0xc6a: 0x1d50, 0xc6b: 0x1ce4, 0xc6c: 0x1cd0, 0xc6d: 0x1d78, 0xc6e: 0x284d, 0xc6f: 0x28e4,\n\t0xc70: 0x1b89, 0xc71: 0x1b74, 0xc72: 0x1dac, 0xc73: 0x1b5f, 0xc74: 0x1b80, 0xc75: 0x1b68,\n\t0xc76: 0x1d98, 0xc77: 0x1b4d, 0xc78: 0x1b26, 0xc79: 0x1ab1, 0xc7a: 0x1b83, 0xc7b: 0x1b6b,\n\t0xc7c: 0x1d9c, 0xc7d: 0x1b50, 0xc7e: 0x1b29, 0xc7f: 0x1ab4,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x1d5c, 0xc81: 0x1ce8, 0xc82: 0x1e7d, 0xc83: 0x1a66, 0xc84: 0x1aea, 0xc85: 0x1aed,\n\t0xc86: 0x2425, 0xc87: 0x1cc4, 0xc88: 0x1af3, 0xc89: 0x1a78, 0xc8a: 0x1b11, 0xc8b: 0x1a7b,\n\t0xc8c: 0x1b1a, 0xc8d: 0x1a99, 0xc8e: 0x1a9c, 0xc8f: 0x1b35, 0xc90: 0x1b3b, 0xc91: 0x1b3e,\n\t0xc92: 0x1d60, 0xc93: 0x1b41, 0xc94: 0x1b53, 0xc95: 0x1d68, 0xc96: 0x1d74, 0xc97: 0x1ac0,\n\t0xc98: 0x1e87, 0xc99: 0x1cec, 0xc9a: 0x1ac3, 0xc9b: 0x1b8c, 0xc9c: 0x1ad5, 0xc9d: 0x1ae4,\n\t0xc9e: 0x2412, 0xc9f: 0x240c, 0xca0: 0x1df1, 0xca1: 0x1e00, 0xca2: 0x1e0f, 0xca3: 0x1e1e,\n\t0xca4: 0x1e2d, 0xca5: 0x1e3c, 0xca6: 0x1e4b, 0xca7: 0x1e5a, 0xca8: 0x1e69, 0xca9: 0x22b6,\n\t0xcaa: 0x22c8, 0xcab: 0x22da, 0xcac: 0x22ec, 0xcad: 0x22f8, 0xcae: 0x2304, 0xcaf: 0x2310,\n\t0xcb0: 0x231c, 0xcb1: 0x2328, 0xcb2: 0x2334, 0xcb3: 0x2370, 0xcb4: 0x237c, 0xcb5: 0x2388,\n\t0xcb6: 0x2394, 0xcb7: 0x23a0, 0xcb8: 0x23ac, 0xcb9: 0x23b2, 0xcba: 0x23b8, 0xcbb: 0x23be,\n\t0xcbc: 0x23c4, 0xcbd: 0x23d6, 0xcbe: 0x23dc, 0xcbf: 0x1d40,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x1472, 0xcc1: 0x0df6, 0xcc2: 0x14ce, 0xcc3: 0x149a, 0xcc4: 0x0f52, 0xcc5: 0x07e6,\n\t0xcc6: 0x09da, 0xcc7: 0x1726, 0xcc8: 0x1726, 0xcc9: 0x0b06, 0xcca: 0x155a, 0xccb: 0x0a3e,\n\t0xccc: 0x0b02, 0xccd: 0x0cea, 0xcce: 0x10ca, 0xccf: 0x125a, 0xcd0: 0x1392, 0xcd1: 0x13ce,\n\t0xcd2: 0x1402, 0xcd3: 0x1516, 0xcd4: 0x0e6e, 0xcd5: 0x0efa, 0xcd6: 0x0fa6, 0xcd7: 0x103e,\n\t0xcd8: 0x135a, 0xcd9: 0x1542, 0xcda: 0x166e, 0xcdb: 0x080a, 0xcdc: 0x09ae, 0xcdd: 0x0e82,\n\t0xcde: 0x0fca, 0xcdf: 0x138e, 0xce0: 0x16be, 0xce1: 0x0bae, 0xce2: 0x0f72, 0xce3: 0x137e,\n\t0xce4: 0x1412, 0xce5: 0x0d1e, 0xce6: 0x12b6, 0xce7: 0x13da, 0xce8: 0x0c1a, 0xce9: 0x0e0a,\n\t0xcea: 0x0f12, 0xceb: 0x1016, 0xcec: 0x1522, 0xced: 0x084a, 0xcee: 0x08e2, 0xcef: 0x094e,\n\t0xcf0: 0x0d86, 0xcf1: 0x0e7a, 0xcf2: 0x0fc6, 0xcf3: 0x10ea, 0xcf4: 0x1272, 0xcf5: 0x1386,\n\t0xcf6: 0x139e, 0xcf7: 0x14c2, 0xcf8: 0x15ea, 0xcf9: 0x169e, 0xcfa: 0x16ba, 0xcfb: 0x1126,\n\t0xcfc: 0x1166, 0xcfd: 0x121e, 0xcfe: 0x133e, 0xcff: 0x1576,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x16c6, 0xd01: 0x1446, 0xd02: 0x0ac2, 0xd03: 0x0c36, 0xd04: 0x11d6, 0xd05: 0x1296,\n\t0xd06: 0x0ffa, 0xd07: 0x112e, 0xd08: 0x1492, 0xd09: 0x15e2, 0xd0a: 0x0abe, 0xd0b: 0x0b8a,\n\t0xd0c: 0x0e72, 0xd0d: 0x0f26, 0xd0e: 0x0f5a, 0xd0f: 0x120e, 0xd10: 0x1236, 0xd11: 0x15a2,\n\t0xd12: 0x094a, 0xd13: 0x12a2, 0xd14: 0x08ee, 0xd15: 0x08ea, 0xd16: 0x1192, 0xd17: 0x1222,\n\t0xd18: 0x1356, 0xd19: 0x15aa, 0xd1a: 0x1462, 0xd1b: 0x0d22, 0xd1c: 0x0e6e, 0xd1d: 0x1452,\n\t0xd1e: 0x07f2, 0xd1f: 0x0b5e, 0xd20: 0x0c8e, 0xd21: 0x102a, 0xd22: 0x10aa, 0xd23: 0x096e,\n\t0xd24: 0x1136, 0xd25: 0x085a, 0xd26: 0x0c72, 0xd27: 0x07d2, 0xd28: 0x0ee6, 0xd29: 0x0d9e,\n\t0xd2a: 0x120a, 0xd2b: 0x09c2, 0xd2c: 0x0aae, 0xd2d: 0x10f6, 0xd2e: 0x135e, 0xd2f: 0x1436,\n\t0xd30: 0x0eb2, 0xd31: 0x14f2, 0xd32: 0x0ede, 0xd33: 0x0d32, 0xd34: 0x1316, 0xd35: 0x0d52,\n\t0xd36: 0x10a6, 0xd37: 0x0826, 0xd38: 0x08a2, 0xd39: 0x08e6, 0xd3a: 0x0e4e, 0xd3b: 0x11f6,\n\t0xd3c: 0x12ee, 0xd3d: 0x1442, 0xd3e: 0x1556, 0xd3f: 0x0956,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x0a0a, 0xd41: 0x0b12, 0xd42: 0x0c2a, 0xd43: 0x0dba, 0xd44: 0x0f76, 0xd45: 0x113a,\n\t0xd46: 0x1592, 0xd47: 0x1676, 0xd48: 0x16ca, 0xd49: 0x16e2, 0xd4a: 0x0932, 0xd4b: 0x0dee,\n\t0xd4c: 0x0e9e, 0xd4d: 0x14e6, 0xd4e: 0x0bf6, 0xd4f: 0x0cd2, 0xd50: 0x0cee, 0xd51: 0x0d7e,\n\t0xd52: 0x0f66, 0xd53: 0x0fb2, 0xd54: 0x1062, 0xd55: 0x1186, 0xd56: 0x122a, 0xd57: 0x128e,\n\t0xd58: 0x14d6, 0xd59: 0x1366, 0xd5a: 0x14fe, 0xd5b: 0x157a, 0xd5c: 0x090a, 0xd5d: 0x0936,\n\t0xd5e: 0x0a1e, 0xd5f: 0x0fa2, 0xd60: 0x13ee, 0xd61: 0x1436, 0xd62: 0x0c16, 0xd63: 0x0c86,\n\t0xd64: 0x0d4a, 0xd65: 0x0eaa, 0xd66: 0x11d2, 0xd67: 0x101e, 0xd68: 0x0836, 0xd69: 0x0a7a,\n\t0xd6a: 0x0b5e, 0xd6b: 0x0bc2, 0xd6c: 0x0c92, 0xd6d: 0x103a, 0xd6e: 0x1056, 0xd6f: 0x1266,\n\t0xd70: 0x1286, 0xd71: 0x155e, 0xd72: 0x15de, 0xd73: 0x15ee, 0xd74: 0x162a, 0xd75: 0x084e,\n\t0xd76: 0x117a, 0xd77: 0x154a, 0xd78: 0x15c6, 0xd79: 0x0caa, 0xd7a: 0x0812, 0xd7b: 0x0872,\n\t0xd7c: 0x0b62, 0xd7d: 0x0b82, 0xd7e: 0x0daa, 0xd7f: 0x0e6e,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0fbe, 0xd81: 0x10c6, 0xd82: 0x1372, 0xd83: 0x1512, 0xd84: 0x171e, 0xd85: 0x0dde,\n\t0xd86: 0x159e, 0xd87: 0x092e, 0xd88: 0x0e2a, 0xd89: 0x0e36, 0xd8a: 0x0f0a, 0xd8b: 0x0f42,\n\t0xd8c: 0x1046, 0xd8d: 0x10a2, 0xd8e: 0x1122, 0xd8f: 0x1206, 0xd90: 0x1636, 0xd91: 0x08aa,\n\t0xd92: 0x0cfe, 0xd93: 0x15ae, 0xd94: 0x0862, 0xd95: 0x0ba6, 0xd96: 0x0f2a, 0xd97: 0x14da,\n\t0xd98: 0x0c62, 0xd99: 0x0cb2, 0xd9a: 0x0e3e, 0xd9b: 0x102a, 0xd9c: 0x15b6, 0xd9d: 0x0912,\n\t0xd9e: 0x09fa, 0xd9f: 0x0b92, 0xda0: 0x0dce, 0xda1: 0x0e1a, 0xda2: 0x0e5a, 0xda3: 0x0eee,\n\t0xda4: 0x1042, 0xda5: 0x10b6, 0xda6: 0x1252, 0xda7: 0x13f2, 0xda8: 0x13fe, 0xda9: 0x1552,\n\t0xdaa: 0x15d2, 0xdab: 0x097e, 0xdac: 0x0f46, 0xdad: 0x09fe, 0xdae: 0x0fc2, 0xdaf: 0x1066,\n\t0xdb0: 0x1382, 0xdb1: 0x15ba, 0xdb2: 0x16a6, 0xdb3: 0x16ce, 0xdb4: 0x0e32, 0xdb5: 0x0f22,\n\t0xdb6: 0x12be, 0xdb7: 0x11b2, 0xdb8: 0x11be, 0xdb9: 0x11e2, 0xdba: 0x1012, 0xdbb: 0x0f9a,\n\t0xdbc: 0x145e, 0xdbd: 0x082e, 0xdbe: 0x1326, 0xdbf: 0x0916,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0906, 0xdc1: 0x0c06, 0xdc2: 0x0d26, 0xdc3: 0x11ee, 0xdc4: 0x0b4e, 0xdc5: 0x0efe,\n\t0xdc6: 0x0dea, 0xdc7: 0x14e2, 0xdc8: 0x13e2, 0xdc9: 0x15a6, 0xdca: 0x141e, 0xdcb: 0x0c22,\n\t0xdcc: 0x0882, 0xdcd: 0x0a56, 0xdd0: 0x0aaa,\n\t0xdd2: 0x0dda, 0xdd5: 0x08f2, 0xdd6: 0x101a, 0xdd7: 0x10de,\n\t0xdd8: 0x1142, 0xdd9: 0x115e, 0xdda: 0x1162, 0xddb: 0x1176, 0xddc: 0x15f6, 0xddd: 0x11e6,\n\t0xdde: 0x126a, 0xde0: 0x138a, 0xde2: 0x144e,\n\t0xde5: 0x1502, 0xde6: 0x152e,\n\t0xdea: 0x164a, 0xdeb: 0x164e, 0xdec: 0x1652, 0xded: 0x16b6, 0xdee: 0x1526, 0xdef: 0x15c2,\n\t0xdf0: 0x0852, 0xdf1: 0x0876, 0xdf2: 0x088a, 0xdf3: 0x0946, 0xdf4: 0x0952, 0xdf5: 0x0992,\n\t0xdf6: 0x0a46, 0xdf7: 0x0a62, 0xdf8: 0x0a6a, 0xdf9: 0x0aa6, 0xdfa: 0x0ab2, 0xdfb: 0x0b8e,\n\t0xdfc: 0x0b96, 0xdfd: 0x0c9e, 0xdfe: 0x0cc6, 0xdff: 0x0cce,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0x0ce6, 0xe01: 0x0d92, 0xe02: 0x0dc2, 0xe03: 0x0de2, 0xe04: 0x0e52, 0xe05: 0x0f16,\n\t0xe06: 0x0f32, 0xe07: 0x0f62, 0xe08: 0x0fb6, 0xe09: 0x0fd6, 0xe0a: 0x104a, 0xe0b: 0x112a,\n\t0xe0c: 0x1146, 0xe0d: 0x114e, 0xe0e: 0x114a, 0xe0f: 0x1152, 0xe10: 0x1156, 0xe11: 0x115a,\n\t0xe12: 0x116e, 0xe13: 0x1172, 0xe14: 0x1196, 0xe15: 0x11aa, 0xe16: 0x11c6, 0xe17: 0x122a,\n\t0xe18: 0x1232, 0xe19: 0x123a, 0xe1a: 0x124e, 0xe1b: 0x1276, 0xe1c: 0x12c6, 0xe1d: 0x12fa,\n\t0xe1e: 0x12fa, 0xe1f: 0x1362, 0xe20: 0x140a, 0xe21: 0x1422, 0xe22: 0x1456, 0xe23: 0x145a,\n\t0xe24: 0x149e, 0xe25: 0x14a2, 0xe26: 0x14fa, 0xe27: 0x1502, 0xe28: 0x15d6, 0xe29: 0x161a,\n\t0xe2a: 0x1632, 0xe2b: 0x0c96, 0xe2c: 0x184b, 0xe2d: 0x12de,\n\t0xe30: 0x07da, 0xe31: 0x08de, 0xe32: 0x089e, 0xe33: 0x0846, 0xe34: 0x0886, 0xe35: 0x08b2,\n\t0xe36: 0x0942, 0xe37: 0x095e, 0xe38: 0x0a46, 0xe39: 0x0a32, 0xe3a: 0x0a42, 0xe3b: 0x0a5e,\n\t0xe3c: 0x0aaa, 0xe3d: 0x0aba, 0xe3e: 0x0afe, 0xe3f: 0x0b0a,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x0b26, 0xe41: 0x0b36, 0xe42: 0x0c1e, 0xe43: 0x0c26, 0xe44: 0x0c56, 0xe45: 0x0c76,\n\t0xe46: 0x0ca6, 0xe47: 0x0cbe, 0xe48: 0x0cae, 0xe49: 0x0cce, 0xe4a: 0x0cc2, 0xe4b: 0x0ce6,\n\t0xe4c: 0x0d02, 0xe4d: 0x0d5a, 0xe4e: 0x0d66, 0xe4f: 0x0d6e, 0xe50: 0x0d96, 0xe51: 0x0dda,\n\t0xe52: 0x0e0a, 0xe53: 0x0e0e, 0xe54: 0x0e22, 0xe55: 0x0ea2, 0xe56: 0x0eb2, 0xe57: 0x0f0a,\n\t0xe58: 0x0f56, 0xe59: 0x0f4e, 0xe5a: 0x0f62, 0xe5b: 0x0f7e, 0xe5c: 0x0fb6, 0xe5d: 0x110e,\n\t0xe5e: 0x0fda, 0xe5f: 0x100e, 0xe60: 0x101a, 0xe61: 0x105a, 0xe62: 0x1076, 0xe63: 0x109a,\n\t0xe64: 0x10be, 0xe65: 0x10c2, 0xe66: 0x10de, 0xe67: 0x10e2, 0xe68: 0x10f2, 0xe69: 0x1106,\n\t0xe6a: 0x1102, 0xe6b: 0x1132, 0xe6c: 0x11ae, 0xe6d: 0x11c6, 0xe6e: 0x11de, 0xe6f: 0x1216,\n\t0xe70: 0x122a, 0xe71: 0x1246, 0xe72: 0x1276, 0xe73: 0x132a, 0xe74: 0x1352, 0xe75: 0x13c6,\n\t0xe76: 0x140e, 0xe77: 0x141a, 0xe78: 0x1422, 0xe79: 0x143a, 0xe7a: 0x144e, 0xe7b: 0x143e,\n\t0xe7c: 0x1456, 0xe7d: 0x1452, 0xe7e: 0x144a, 0xe7f: 0x145a,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x1466, 0xe81: 0x14a2, 0xe82: 0x14de, 0xe83: 0x150e, 0xe84: 0x1546, 0xe85: 0x1566,\n\t0xe86: 0x15b2, 0xe87: 0x15d6, 0xe88: 0x15f6, 0xe89: 0x160a, 0xe8a: 0x161a, 0xe8b: 0x1626,\n\t0xe8c: 0x1632, 0xe8d: 0x1686, 0xe8e: 0x1726, 0xe8f: 0x17e2, 0xe90: 0x17dd, 0xe91: 0x180f,\n\t0xe92: 0x0702, 0xe93: 0x072a, 0xe94: 0x072e, 0xe95: 0x1891, 0xe96: 0x18be, 0xe97: 0x1936,\n\t0xe98: 0x1712, 0xe99: 0x1722,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x1b05, 0xec1: 0x1b08, 0xec2: 0x1b0b, 0xec3: 0x1d38, 0xec4: 0x1d3c, 0xec5: 0x1b8f,\n\t0xec6: 0x1b8f,\n\t0xed3: 0x1ea5, 0xed4: 0x1e96, 0xed5: 0x1e9b, 0xed6: 0x1eaa, 0xed7: 0x1ea0,\n\t0xedd: 0x4449,\n\t0xede: 0x8116, 0xedf: 0x44bb, 0xee0: 0x0320, 0xee1: 0x0308, 0xee2: 0x0311, 0xee3: 0x0314,\n\t0xee4: 0x0317, 0xee5: 0x031a, 0xee6: 0x031d, 0xee7: 0x0323, 0xee8: 0x0326, 0xee9: 0x0017,\n\t0xeea: 0x44a9, 0xeeb: 0x44af, 0xeec: 0x45ad, 0xeed: 0x45b5, 0xeee: 0x4401, 0xeef: 0x4407,\n\t0xef0: 0x440d, 0xef1: 0x4413, 0xef2: 0x441f, 0xef3: 0x4425, 0xef4: 0x442b, 0xef5: 0x4437,\n\t0xef6: 0x443d, 0xef8: 0x4443, 0xef9: 0x444f, 0xefa: 0x4455, 0xefb: 0x445b,\n\t0xefc: 0x4467, 0xefe: 0x446d,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x4473, 0xf01: 0x4479, 0xf03: 0x447f, 0xf04: 0x4485,\n\t0xf06: 0x4491, 0xf07: 0x4497, 0xf08: 0x449d, 0xf09: 0x44a3, 0xf0a: 0x44b5, 0xf0b: 0x4431,\n\t0xf0c: 0x4419, 0xf0d: 0x4461, 0xf0e: 0x448b, 0xf0f: 0x1eaf, 0xf10: 0x038c, 0xf11: 0x038c,\n\t0xf12: 0x0395, 0xf13: 0x0395, 0xf14: 0x0395, 0xf15: 0x0395, 0xf16: 0x0398, 0xf17: 0x0398,\n\t0xf18: 0x0398, 0xf19: 0x0398, 0xf1a: 0x039e, 0xf1b: 0x039e, 0xf1c: 0x039e, 0xf1d: 0x039e,\n\t0xf1e: 0x0392, 0xf1f: 0x0392, 0xf20: 0x0392, 0xf21: 0x0392, 0xf22: 0x039b, 0xf23: 0x039b,\n\t0xf24: 0x039b, 0xf25: 0x039b, 0xf26: 0x038f, 0xf27: 0x038f, 0xf28: 0x038f, 0xf29: 0x038f,\n\t0xf2a: 0x03c2, 0xf2b: 0x03c2, 0xf2c: 0x03c2, 0xf2d: 0x03c2, 0xf2e: 0x03c5, 0xf2f: 0x03c5,\n\t0xf30: 0x03c5, 0xf31: 0x03c5, 0xf32: 0x03a4, 0xf33: 0x03a4, 0xf34: 0x03a4, 0xf35: 0x03a4,\n\t0xf36: 0x03a1, 0xf37: 0x03a1, 0xf38: 0x03a1, 0xf39: 0x03a1, 0xf3a: 0x03a7, 0xf3b: 0x03a7,\n\t0xf3c: 0x03a7, 0xf3d: 0x03a7, 0xf3e: 0x03aa, 0xf3f: 0x03aa,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x03aa, 0xf41: 0x03aa, 0xf42: 0x03b3, 0xf43: 0x03b3, 0xf44: 0x03b0, 0xf45: 0x03b0,\n\t0xf46: 0x03b6, 0xf47: 0x03b6, 0xf48: 0x03ad, 0xf49: 0x03ad, 0xf4a: 0x03bc, 0xf4b: 0x03bc,\n\t0xf4c: 0x03b9, 0xf4d: 0x03b9, 0xf4e: 0x03c8, 0xf4f: 0x03c8, 0xf50: 0x03c8, 0xf51: 0x03c8,\n\t0xf52: 0x03ce, 0xf53: 0x03ce, 0xf54: 0x03ce, 0xf55: 0x03ce, 0xf56: 0x03d4, 0xf57: 0x03d4,\n\t0xf58: 0x03d4, 0xf59: 0x03d4, 0xf5a: 0x03d1, 0xf5b: 0x03d1, 0xf5c: 0x03d1, 0xf5d: 0x03d1,\n\t0xf5e: 0x03d7, 0xf5f: 0x03d7, 0xf60: 0x03da, 0xf61: 0x03da, 0xf62: 0x03da, 0xf63: 0x03da,\n\t0xf64: 0x4527, 0xf65: 0x4527, 0xf66: 0x03e0, 0xf67: 0x03e0, 0xf68: 0x03e0, 0xf69: 0x03e0,\n\t0xf6a: 0x03dd, 0xf6b: 0x03dd, 0xf6c: 0x03dd, 0xf6d: 0x03dd, 0xf6e: 0x03fb, 0xf6f: 0x03fb,\n\t0xf70: 0x4521, 0xf71: 0x4521,\n\t// Block 0x3e, offset 0xf80\n\t0xf93: 0x03cb, 0xf94: 0x03cb, 0xf95: 0x03cb, 0xf96: 0x03cb, 0xf97: 0x03e9,\n\t0xf98: 0x03e9, 0xf99: 0x03e6, 0xf9a: 0x03e6, 0xf9b: 0x03ec, 0xf9c: 0x03ec, 0xf9d: 0x217f,\n\t0xf9e: 0x03f2, 0xf9f: 0x03f2, 0xfa0: 0x03e3, 0xfa1: 0x03e3, 0xfa2: 0x03ef, 0xfa3: 0x03ef,\n\t0xfa4: 0x03f8, 0xfa5: 0x03f8, 0xfa6: 0x03f8, 0xfa7: 0x03f8, 0xfa8: 0x0380, 0xfa9: 0x0380,\n\t0xfaa: 0x26da, 0xfab: 0x26da, 0xfac: 0x274a, 0xfad: 0x274a, 0xfae: 0x2719, 0xfaf: 0x2719,\n\t0xfb0: 0x2735, 0xfb1: 0x2735, 0xfb2: 0x272e, 0xfb3: 0x272e, 0xfb4: 0x273c, 0xfb5: 0x273c,\n\t0xfb6: 0x2743, 0xfb7: 0x2743, 0xfb8: 0x2743, 0xfb9: 0x2720, 0xfba: 0x2720, 0xfbb: 0x2720,\n\t0xfbc: 0x03f5, 0xfbd: 0x03f5, 0xfbe: 0x03f5, 0xfbf: 0x03f5,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x26e1, 0xfc1: 0x26e8, 0xfc2: 0x2704, 0xfc3: 0x2720, 0xfc4: 0x2727, 0xfc5: 0x1eb9,\n\t0xfc6: 0x1ebe, 0xfc7: 0x1ec3, 0xfc8: 0x1ed2, 0xfc9: 0x1ee1, 0xfca: 0x1ee6, 0xfcb: 0x1eeb,\n\t0xfcc: 0x1ef0, 0xfcd: 0x1ef5, 0xfce: 0x1f04, 0xfcf: 0x1f13, 0xfd0: 0x1f18, 0xfd1: 0x1f1d,\n\t0xfd2: 0x1f2c, 0xfd3: 0x1f3b, 0xfd4: 0x1f40, 0xfd5: 0x1f45, 0xfd6: 0x1f4a, 0xfd7: 0x1f59,\n\t0xfd8: 0x1f5e, 0xfd9: 0x1f6d, 0xfda: 0x1f72, 0xfdb: 0x1f77, 0xfdc: 0x1f86, 0xfdd: 0x1f8b,\n\t0xfde: 0x1f90, 0xfdf: 0x1f9a, 0xfe0: 0x1fd6, 0xfe1: 0x1fe5, 0xfe2: 0x1ff4, 0xfe3: 0x1ff9,\n\t0xfe4: 0x1ffe, 0xfe5: 0x2008, 0xfe6: 0x2017, 0xfe7: 0x201c, 0xfe8: 0x202b, 0xfe9: 0x2030,\n\t0xfea: 0x2035, 0xfeb: 0x2044, 0xfec: 0x2049, 0xfed: 0x2058, 0xfee: 0x205d, 0xfef: 0x2062,\n\t0xff0: 0x2067, 0xff1: 0x206c, 0xff2: 0x2071, 0xff3: 0x2076, 0xff4: 0x207b, 0xff5: 0x2080,\n\t0xff6: 0x2085, 0xff7: 0x208a, 0xff8: 0x208f, 0xff9: 0x2094, 0xffa: 0x2099, 0xffb: 0x209e,\n\t0xffc: 0x20a3, 0xffd: 0x20a8, 0xffe: 0x20ad, 0xfff: 0x20b7,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x20bc, 0x1001: 0x20c1, 0x1002: 0x20c6, 0x1003: 0x20d0, 0x1004: 0x20d5, 0x1005: 0x20df,\n\t0x1006: 0x20e4, 0x1007: 0x20e9, 0x1008: 0x20ee, 0x1009: 0x20f3, 0x100a: 0x20f8, 0x100b: 0x20fd,\n\t0x100c: 0x2102, 0x100d: 0x2107, 0x100e: 0x2116, 0x100f: 0x2125, 0x1010: 0x212a, 0x1011: 0x212f,\n\t0x1012: 0x2134, 0x1013: 0x2139, 0x1014: 0x213e, 0x1015: 0x2148, 0x1016: 0x214d, 0x1017: 0x2152,\n\t0x1018: 0x2161, 0x1019: 0x2170, 0x101a: 0x2175, 0x101b: 0x44d9, 0x101c: 0x44df, 0x101d: 0x4515,\n\t0x101e: 0x456c, 0x101f: 0x4573, 0x1020: 0x457a, 0x1021: 0x4581, 0x1022: 0x4588, 0x1023: 0x458f,\n\t0x1024: 0x26f6, 0x1025: 0x26fd, 0x1026: 0x2704, 0x1027: 0x270b, 0x1028: 0x2720, 0x1029: 0x2727,\n\t0x102a: 0x1ec8, 0x102b: 0x1ecd, 0x102c: 0x1ed2, 0x102d: 0x1ed7, 0x102e: 0x1ee1, 0x102f: 0x1ee6,\n\t0x1030: 0x1efa, 0x1031: 0x1eff, 0x1032: 0x1f04, 0x1033: 0x1f09, 0x1034: 0x1f13, 0x1035: 0x1f18,\n\t0x1036: 0x1f22, 0x1037: 0x1f27, 0x1038: 0x1f2c, 0x1039: 0x1f31, 0x103a: 0x1f3b, 0x103b: 0x1f40,\n\t0x103c: 0x206c, 0x103d: 0x2071, 0x103e: 0x2080, 0x103f: 0x2085,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x208a, 0x1041: 0x209e, 0x1042: 0x20a3, 0x1043: 0x20a8, 0x1044: 0x20ad, 0x1045: 0x20c6,\n\t0x1046: 0x20d0, 0x1047: 0x20d5, 0x1048: 0x20da, 0x1049: 0x20ee, 0x104a: 0x210c, 0x104b: 0x2111,\n\t0x104c: 0x2116, 0x104d: 0x211b, 0x104e: 0x2125, 0x104f: 0x212a, 0x1050: 0x4515, 0x1051: 0x2157,\n\t0x1052: 0x215c, 0x1053: 0x2161, 0x1054: 0x2166, 0x1055: 0x2170, 0x1056: 0x2175, 0x1057: 0x26e1,\n\t0x1058: 0x26e8, 0x1059: 0x26ef, 0x105a: 0x2704, 0x105b: 0x2712, 0x105c: 0x1eb9, 0x105d: 0x1ebe,\n\t0x105e: 0x1ec3, 0x105f: 0x1ed2, 0x1060: 0x1edc, 0x1061: 0x1eeb, 0x1062: 0x1ef0, 0x1063: 0x1ef5,\n\t0x1064: 0x1f04, 0x1065: 0x1f0e, 0x1066: 0x1f2c, 0x1067: 0x1f45, 0x1068: 0x1f4a, 0x1069: 0x1f59,\n\t0x106a: 0x1f5e, 0x106b: 0x1f6d, 0x106c: 0x1f77, 0x106d: 0x1f86, 0x106e: 0x1f8b, 0x106f: 0x1f90,\n\t0x1070: 0x1f9a, 0x1071: 0x1fd6, 0x1072: 0x1fdb, 0x1073: 0x1fe5, 0x1074: 0x1ff4, 0x1075: 0x1ff9,\n\t0x1076: 0x1ffe, 0x1077: 0x2008, 0x1078: 0x2017, 0x1079: 0x202b, 0x107a: 0x2030, 0x107b: 0x2035,\n\t0x107c: 0x2044, 0x107d: 0x2049, 0x107e: 0x2058, 0x107f: 0x205d,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x2062, 0x1081: 0x2067, 0x1082: 0x2076, 0x1083: 0x207b, 0x1084: 0x208f, 0x1085: 0x2094,\n\t0x1086: 0x2099, 0x1087: 0x209e, 0x1088: 0x20a3, 0x1089: 0x20b7, 0x108a: 0x20bc, 0x108b: 0x20c1,\n\t0x108c: 0x20c6, 0x108d: 0x20cb, 0x108e: 0x20df, 0x108f: 0x20e4, 0x1090: 0x20e9, 0x1091: 0x20ee,\n\t0x1092: 0x20fd, 0x1093: 0x2102, 0x1094: 0x2107, 0x1095: 0x2116, 0x1096: 0x2120, 0x1097: 0x212f,\n\t0x1098: 0x2134, 0x1099: 0x4509, 0x109a: 0x2148, 0x109b: 0x214d, 0x109c: 0x2152, 0x109d: 0x2161,\n\t0x109e: 0x216b, 0x109f: 0x2704, 0x10a0: 0x2712, 0x10a1: 0x1ed2, 0x10a2: 0x1edc, 0x10a3: 0x1f04,\n\t0x10a4: 0x1f0e, 0x10a5: 0x1f2c, 0x10a6: 0x1f36, 0x10a7: 0x1f9a, 0x10a8: 0x1f9f, 0x10a9: 0x1fc2,\n\t0x10aa: 0x1fc7, 0x10ab: 0x209e, 0x10ac: 0x20a3, 0x10ad: 0x20c6, 0x10ae: 0x2116, 0x10af: 0x2120,\n\t0x10b0: 0x2161, 0x10b1: 0x216b, 0x10b2: 0x45bd, 0x10b3: 0x45c5, 0x10b4: 0x45cd, 0x10b5: 0x2021,\n\t0x10b6: 0x2026, 0x10b7: 0x203a, 0x10b8: 0x203f, 0x10b9: 0x204e, 0x10ba: 0x2053, 0x10bb: 0x1fa4,\n\t0x10bc: 0x1fa9, 0x10bd: 0x1fcc, 0x10be: 0x1fd1, 0x10bf: 0x1f63,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x1f68, 0x10c1: 0x1f4f, 0x10c2: 0x1f54, 0x10c3: 0x1f7c, 0x10c4: 0x1f81, 0x10c5: 0x1fea,\n\t0x10c6: 0x1fef, 0x10c7: 0x200d, 0x10c8: 0x2012, 0x10c9: 0x1fae, 0x10ca: 0x1fb3, 0x10cb: 0x1fb8,\n\t0x10cc: 0x1fc2, 0x10cd: 0x1fbd, 0x10ce: 0x1f95, 0x10cf: 0x1fe0, 0x10d0: 0x2003, 0x10d1: 0x2021,\n\t0x10d2: 0x2026, 0x10d3: 0x203a, 0x10d4: 0x203f, 0x10d5: 0x204e, 0x10d6: 0x2053, 0x10d7: 0x1fa4,\n\t0x10d8: 0x1fa9, 0x10d9: 0x1fcc, 0x10da: 0x1fd1, 0x10db: 0x1f63, 0x10dc: 0x1f68, 0x10dd: 0x1f4f,\n\t0x10de: 0x1f54, 0x10df: 0x1f7c, 0x10e0: 0x1f81, 0x10e1: 0x1fea, 0x10e2: 0x1fef, 0x10e3: 0x200d,\n\t0x10e4: 0x2012, 0x10e5: 0x1fae, 0x10e6: 0x1fb3, 0x10e7: 0x1fb8, 0x10e8: 0x1fc2, 0x10e9: 0x1fbd,\n\t0x10ea: 0x1f95, 0x10eb: 0x1fe0, 0x10ec: 0x2003, 0x10ed: 0x1fae, 0x10ee: 0x1fb3, 0x10ef: 0x1fb8,\n\t0x10f0: 0x1fc2, 0x10f1: 0x1f9f, 0x10f2: 0x1fc7, 0x10f3: 0x201c, 0x10f4: 0x1f86, 0x10f5: 0x1f8b,\n\t0x10f6: 0x1f90, 0x10f7: 0x1fae, 0x10f8: 0x1fb3, 0x10f9: 0x1fb8, 0x10fa: 0x201c, 0x10fb: 0x202b,\n\t0x10fc: 0x44c1, 0x10fd: 0x44c1,\n\t// Block 0x44, offset 0x1100\n\t0x1110: 0x2441, 0x1111: 0x2456,\n\t0x1112: 0x2456, 0x1113: 0x245d, 0x1114: 0x2464, 0x1115: 0x2479, 0x1116: 0x2480, 0x1117: 0x2487,\n\t0x1118: 0x24aa, 0x1119: 0x24aa, 0x111a: 0x24cd, 0x111b: 0x24c6, 0x111c: 0x24e2, 0x111d: 0x24d4,\n\t0x111e: 0x24db, 0x111f: 0x24fe, 0x1120: 0x24fe, 0x1121: 0x24f7, 0x1122: 0x2505, 0x1123: 0x2505,\n\t0x1124: 0x252f, 0x1125: 0x252f, 0x1126: 0x254b, 0x1127: 0x2513, 0x1128: 0x2513, 0x1129: 0x250c,\n\t0x112a: 0x2521, 0x112b: 0x2521, 0x112c: 0x2528, 0x112d: 0x2528, 0x112e: 0x2552, 0x112f: 0x2560,\n\t0x1130: 0x2560, 0x1131: 0x2567, 0x1132: 0x2567, 0x1133: 0x256e, 0x1134: 0x2575, 0x1135: 0x257c,\n\t0x1136: 0x2583, 0x1137: 0x2583, 0x1138: 0x258a, 0x1139: 0x2598, 0x113a: 0x25a6, 0x113b: 0x259f,\n\t0x113c: 0x25ad, 0x113d: 0x25ad, 0x113e: 0x25c2, 0x113f: 0x25c9,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0x25fa, 0x1141: 0x2608, 0x1142: 0x2601, 0x1143: 0x25e5, 0x1144: 0x25e5, 0x1145: 0x260f,\n\t0x1146: 0x260f, 0x1147: 0x2616, 0x1148: 0x2616, 0x1149: 0x2640, 0x114a: 0x2647, 0x114b: 0x264e,\n\t0x114c: 0x2624, 0x114d: 0x2632, 0x114e: 0x2655, 0x114f: 0x265c,\n\t0x1152: 0x262b, 0x1153: 0x26b0, 0x1154: 0x26b7, 0x1155: 0x268d, 0x1156: 0x2694, 0x1157: 0x2678,\n\t0x1158: 0x2678, 0x1159: 0x267f, 0x115a: 0x26a9, 0x115b: 0x26a2, 0x115c: 0x26cc, 0x115d: 0x26cc,\n\t0x115e: 0x243a, 0x115f: 0x244f, 0x1160: 0x2448, 0x1161: 0x2472, 0x1162: 0x246b, 0x1163: 0x2495,\n\t0x1164: 0x248e, 0x1165: 0x24b8, 0x1166: 0x249c, 0x1167: 0x24b1, 0x1168: 0x24e9, 0x1169: 0x2536,\n\t0x116a: 0x251a, 0x116b: 0x2559, 0x116c: 0x25f3, 0x116d: 0x261d, 0x116e: 0x26c5, 0x116f: 0x26be,\n\t0x1170: 0x26d3, 0x1171: 0x266a, 0x1172: 0x25d0, 0x1173: 0x269b, 0x1174: 0x25c2, 0x1175: 0x25fa,\n\t0x1176: 0x2591, 0x1177: 0x25de, 0x1178: 0x2671, 0x1179: 0x2663, 0x117a: 0x25ec, 0x117b: 0x25d7,\n\t0x117c: 0x25ec, 0x117d: 0x2671, 0x117e: 0x24a3, 0x117f: 0x24bf,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0x2639, 0x1181: 0x25b4, 0x1182: 0x2433, 0x1183: 0x25d7, 0x1184: 0x257c, 0x1185: 0x254b,\n\t0x1186: 0x24f0, 0x1187: 0x2686,\n\t0x11b0: 0x2544, 0x11b1: 0x25bb, 0x11b2: 0x28f6, 0x11b3: 0x28ed, 0x11b4: 0x2923, 0x11b5: 0x2911,\n\t0x11b6: 0x28ff, 0x11b7: 0x291a, 0x11b8: 0x292c, 0x11b9: 0x253d, 0x11ba: 0x2db3, 0x11bb: 0x2c33,\n\t0x11bc: 0x2908,\n\t// Block 0x47, offset 0x11c0\n\t0x11d0: 0x0019, 0x11d1: 0x057e,\n\t0x11d2: 0x0582, 0x11d3: 0x0035, 0x11d4: 0x0037, 0x11d5: 0x0003, 0x11d6: 0x003f, 0x11d7: 0x05ba,\n\t0x11d8: 0x05be, 0x11d9: 0x1c8c,\n\t0x11e0: 0x8133, 0x11e1: 0x8133, 0x11e2: 0x8133, 0x11e3: 0x8133,\n\t0x11e4: 0x8133, 0x11e5: 0x8133, 0x11e6: 0x8133, 0x11e7: 0x812e, 0x11e8: 0x812e, 0x11e9: 0x812e,\n\t0x11ea: 0x812e, 0x11eb: 0x812e, 0x11ec: 0x812e, 0x11ed: 0x812e, 0x11ee: 0x8133, 0x11ef: 0x8133,\n\t0x11f0: 0x19a0, 0x11f1: 0x053a, 0x11f2: 0x0536, 0x11f3: 0x007f, 0x11f4: 0x007f, 0x11f5: 0x0011,\n\t0x11f6: 0x0013, 0x11f7: 0x00b7, 0x11f8: 0x00bb, 0x11f9: 0x05b2, 0x11fa: 0x05b6, 0x11fb: 0x05a6,\n\t0x11fc: 0x05aa, 0x11fd: 0x058e, 0x11fe: 0x0592, 0x11ff: 0x0586,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x058a, 0x1201: 0x0596, 0x1202: 0x059a, 0x1203: 0x059e, 0x1204: 0x05a2,\n\t0x1207: 0x0077, 0x1208: 0x007b, 0x1209: 0x4322, 0x120a: 0x4322, 0x120b: 0x4322,\n\t0x120c: 0x4322, 0x120d: 0x007f, 0x120e: 0x007f, 0x120f: 0x007f, 0x1210: 0x0019, 0x1211: 0x057e,\n\t0x1212: 0x001d, 0x1214: 0x0037, 0x1215: 0x0035, 0x1216: 0x003f, 0x1217: 0x0003,\n\t0x1218: 0x053a, 0x1219: 0x0011, 0x121a: 0x0013, 0x121b: 0x00b7, 0x121c: 0x00bb, 0x121d: 0x05b2,\n\t0x121e: 0x05b6, 0x121f: 0x0007, 0x1220: 0x000d, 0x1221: 0x0015, 0x1222: 0x0017, 0x1223: 0x001b,\n\t0x1224: 0x0039, 0x1225: 0x003d, 0x1226: 0x003b, 0x1228: 0x0079, 0x1229: 0x0009,\n\t0x122a: 0x000b, 0x122b: 0x0041,\n\t0x1230: 0x4363, 0x1231: 0x44e5, 0x1232: 0x4368, 0x1234: 0x436d,\n\t0x1236: 0x4372, 0x1237: 0x44eb, 0x1238: 0x4377, 0x1239: 0x44f1, 0x123a: 0x437c, 0x123b: 0x44f7,\n\t0x123c: 0x4381, 0x123d: 0x44fd, 0x123e: 0x4386, 0x123f: 0x4503,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x0329, 0x1241: 0x44c7, 0x1242: 0x44c7, 0x1243: 0x44cd, 0x1244: 0x44cd, 0x1245: 0x450f,\n\t0x1246: 0x450f, 0x1247: 0x44d3, 0x1248: 0x44d3, 0x1249: 0x451b, 0x124a: 0x451b, 0x124b: 0x451b,\n\t0x124c: 0x451b, 0x124d: 0x032c, 0x124e: 0x032c, 0x124f: 0x032f, 0x1250: 0x032f, 0x1251: 0x032f,\n\t0x1252: 0x032f, 0x1253: 0x0332, 0x1254: 0x0332, 0x1255: 0x0335, 0x1256: 0x0335, 0x1257: 0x0335,\n\t0x1258: 0x0335, 0x1259: 0x0338, 0x125a: 0x0338, 0x125b: 0x0338, 0x125c: 0x0338, 0x125d: 0x033b,\n\t0x125e: 0x033b, 0x125f: 0x033b, 0x1260: 0x033b, 0x1261: 0x033e, 0x1262: 0x033e, 0x1263: 0x033e,\n\t0x1264: 0x033e, 0x1265: 0x0341, 0x1266: 0x0341, 0x1267: 0x0341, 0x1268: 0x0341, 0x1269: 0x0344,\n\t0x126a: 0x0344, 0x126b: 0x0347, 0x126c: 0x0347, 0x126d: 0x034a, 0x126e: 0x034a, 0x126f: 0x034d,\n\t0x1270: 0x034d, 0x1271: 0x0350, 0x1272: 0x0350, 0x1273: 0x0350, 0x1274: 0x0350, 0x1275: 0x0353,\n\t0x1276: 0x0353, 0x1277: 0x0353, 0x1278: 0x0353, 0x1279: 0x0356, 0x127a: 0x0356, 0x127b: 0x0356,\n\t0x127c: 0x0356, 0x127d: 0x0359, 0x127e: 0x0359, 0x127f: 0x0359,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x0359, 0x1281: 0x035c, 0x1282: 0x035c, 0x1283: 0x035c, 0x1284: 0x035c, 0x1285: 0x035f,\n\t0x1286: 0x035f, 0x1287: 0x035f, 0x1288: 0x035f, 0x1289: 0x0362, 0x128a: 0x0362, 0x128b: 0x0362,\n\t0x128c: 0x0362, 0x128d: 0x0365, 0x128e: 0x0365, 0x128f: 0x0365, 0x1290: 0x0365, 0x1291: 0x0368,\n\t0x1292: 0x0368, 0x1293: 0x0368, 0x1294: 0x0368, 0x1295: 0x036b, 0x1296: 0x036b, 0x1297: 0x036b,\n\t0x1298: 0x036b, 0x1299: 0x036e, 0x129a: 0x036e, 0x129b: 0x036e, 0x129c: 0x036e, 0x129d: 0x0371,\n\t0x129e: 0x0371, 0x129f: 0x0371, 0x12a0: 0x0371, 0x12a1: 0x0374, 0x12a2: 0x0374, 0x12a3: 0x0374,\n\t0x12a4: 0x0374, 0x12a5: 0x0377, 0x12a6: 0x0377, 0x12a7: 0x0377, 0x12a8: 0x0377, 0x12a9: 0x037a,\n\t0x12aa: 0x037a, 0x12ab: 0x037a, 0x12ac: 0x037a, 0x12ad: 0x037d, 0x12ae: 0x037d, 0x12af: 0x0380,\n\t0x12b0: 0x0380, 0x12b1: 0x0383, 0x12b2: 0x0383, 0x12b3: 0x0383, 0x12b4: 0x0383, 0x12b5: 0x2de7,\n\t0x12b6: 0x2de7, 0x12b7: 0x2def, 0x12b8: 0x2def, 0x12b9: 0x2df7, 0x12ba: 0x2df7, 0x12bb: 0x20b2,\n\t0x12bc: 0x20b2,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x0081, 0x12c1: 0x0083, 0x12c2: 0x0085, 0x12c3: 0x0087, 0x12c4: 0x0089, 0x12c5: 0x008b,\n\t0x12c6: 0x008d, 0x12c7: 0x008f, 0x12c8: 0x0091, 0x12c9: 0x0093, 0x12ca: 0x0095, 0x12cb: 0x0097,\n\t0x12cc: 0x0099, 0x12cd: 0x009b, 0x12ce: 0x009d, 0x12cf: 0x009f, 0x12d0: 0x00a1, 0x12d1: 0x00a3,\n\t0x12d2: 0x00a5, 0x12d3: 0x00a7, 0x12d4: 0x00a9, 0x12d5: 0x00ab, 0x12d6: 0x00ad, 0x12d7: 0x00af,\n\t0x12d8: 0x00b1, 0x12d9: 0x00b3, 0x12da: 0x00b5, 0x12db: 0x00b7, 0x12dc: 0x00b9, 0x12dd: 0x00bb,\n\t0x12de: 0x00bd, 0x12df: 0x056e, 0x12e0: 0x0572, 0x12e1: 0x0582, 0x12e2: 0x0596, 0x12e3: 0x059a,\n\t0x12e4: 0x057e, 0x12e5: 0x06a6, 0x12e6: 0x069e, 0x12e7: 0x05c2, 0x12e8: 0x05ca, 0x12e9: 0x05d2,\n\t0x12ea: 0x05da, 0x12eb: 0x05e2, 0x12ec: 0x0666, 0x12ed: 0x066e, 0x12ee: 0x0676, 0x12ef: 0x061a,\n\t0x12f0: 0x06aa, 0x12f1: 0x05c6, 0x12f2: 0x05ce, 0x12f3: 0x05d6, 0x12f4: 0x05de, 0x12f5: 0x05e6,\n\t0x12f6: 0x05ea, 0x12f7: 0x05ee, 0x12f8: 0x05f2, 0x12f9: 0x05f6, 0x12fa: 0x05fa, 0x12fb: 0x05fe,\n\t0x12fc: 0x0602, 0x12fd: 0x0606, 0x12fe: 0x060a, 0x12ff: 0x060e,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x0612, 0x1301: 0x0616, 0x1302: 0x061e, 0x1303: 0x0622, 0x1304: 0x0626, 0x1305: 0x062a,\n\t0x1306: 0x062e, 0x1307: 0x0632, 0x1308: 0x0636, 0x1309: 0x063a, 0x130a: 0x063e, 0x130b: 0x0642,\n\t0x130c: 0x0646, 0x130d: 0x064a, 0x130e: 0x064e, 0x130f: 0x0652, 0x1310: 0x0656, 0x1311: 0x065a,\n\t0x1312: 0x065e, 0x1313: 0x0662, 0x1314: 0x066a, 0x1315: 0x0672, 0x1316: 0x067a, 0x1317: 0x067e,\n\t0x1318: 0x0682, 0x1319: 0x0686, 0x131a: 0x068a, 0x131b: 0x068e, 0x131c: 0x0692, 0x131d: 0x06a2,\n\t0x131e: 0x4bb9, 0x131f: 0x4bbf, 0x1320: 0x04b6, 0x1321: 0x0406, 0x1322: 0x040a, 0x1323: 0x4b7c,\n\t0x1324: 0x040e, 0x1325: 0x4b82, 0x1326: 0x4b88, 0x1327: 0x0412, 0x1328: 0x0416, 0x1329: 0x041a,\n\t0x132a: 0x4b8e, 0x132b: 0x4b94, 0x132c: 0x4b9a, 0x132d: 0x4ba0, 0x132e: 0x4ba6, 0x132f: 0x4bac,\n\t0x1330: 0x045a, 0x1331: 0x041e, 0x1332: 0x0422, 0x1333: 0x0426, 0x1334: 0x046e, 0x1335: 0x042a,\n\t0x1336: 0x042e, 0x1337: 0x0432, 0x1338: 0x0436, 0x1339: 0x043a, 0x133a: 0x043e, 0x133b: 0x0442,\n\t0x133c: 0x0446, 0x133d: 0x044a, 0x133e: 0x044e,\n\t// Block 0x4d, offset 0x1340\n\t0x1342: 0x4afe, 0x1343: 0x4b04, 0x1344: 0x4b0a, 0x1345: 0x4b10,\n\t0x1346: 0x4b16, 0x1347: 0x4b1c, 0x134a: 0x4b22, 0x134b: 0x4b28,\n\t0x134c: 0x4b2e, 0x134d: 0x4b34, 0x134e: 0x4b3a, 0x134f: 0x4b40,\n\t0x1352: 0x4b46, 0x1353: 0x4b4c, 0x1354: 0x4b52, 0x1355: 0x4b58, 0x1356: 0x4b5e, 0x1357: 0x4b64,\n\t0x135a: 0x4b6a, 0x135b: 0x4b70, 0x135c: 0x4b76,\n\t0x1360: 0x00bf, 0x1361: 0x00c2, 0x1362: 0x00cb, 0x1363: 0x431d,\n\t0x1364: 0x00c8, 0x1365: 0x00c5, 0x1366: 0x053e, 0x1368: 0x0562, 0x1369: 0x0542,\n\t0x136a: 0x0546, 0x136b: 0x054a, 0x136c: 0x054e, 0x136d: 0x0566, 0x136e: 0x056a,\n\t// Block 0x4e, offset 0x1380\n\t0x1381: 0x01f1, 0x1382: 0x01f4, 0x1383: 0x00d4, 0x1384: 0x01be, 0x1385: 0x010d,\n\t0x1387: 0x01d3, 0x1388: 0x174e, 0x1389: 0x01d9, 0x138a: 0x01d6, 0x138b: 0x0116,\n\t0x138c: 0x0119, 0x138d: 0x0526, 0x138e: 0x011c, 0x138f: 0x0128, 0x1390: 0x01e5, 0x1391: 0x013a,\n\t0x1392: 0x0134, 0x1393: 0x012e, 0x1394: 0x01c1, 0x1395: 0x00e0, 0x1396: 0x01c4, 0x1397: 0x0143,\n\t0x1398: 0x0194, 0x1399: 0x01e8, 0x139a: 0x01eb, 0x139b: 0x0152, 0x139c: 0x1756, 0x139d: 0x1742,\n\t0x139e: 0x0158, 0x139f: 0x175b, 0x13a0: 0x01a9, 0x13a1: 0x1760, 0x13a2: 0x00da, 0x13a3: 0x0170,\n\t0x13a4: 0x0173, 0x13a5: 0x00a3, 0x13a6: 0x017c, 0x13a7: 0x1765, 0x13a8: 0x0182, 0x13a9: 0x0185,\n\t0x13aa: 0x0188, 0x13ab: 0x01e2, 0x13ac: 0x01dc, 0x13ad: 0x1752, 0x13ae: 0x01df, 0x13af: 0x0197,\n\t0x13b0: 0x0576, 0x13b2: 0x01ac, 0x13b3: 0x01cd, 0x13b4: 0x01d0, 0x13b5: 0x01bb,\n\t0x13b6: 0x00f5, 0x13b7: 0x00f8, 0x13b8: 0x00fb, 0x13b9: 0x176a, 0x13ba: 0x176f,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x0063, 0x13c1: 0x0065, 0x13c2: 0x0067, 0x13c3: 0x0069, 0x13c4: 0x006b, 0x13c5: 0x006d,\n\t0x13c6: 0x006f, 0x13c7: 0x0071, 0x13c8: 0x0073, 0x13c9: 0x0075, 0x13ca: 0x0083, 0x13cb: 0x0085,\n\t0x13cc: 0x0087, 0x13cd: 0x0089, 0x13ce: 0x008b, 0x13cf: 0x008d, 0x13d0: 0x008f, 0x13d1: 0x0091,\n\t0x13d2: 0x0093, 0x13d3: 0x0095, 0x13d4: 0x0097, 0x13d5: 0x0099, 0x13d6: 0x009b, 0x13d7: 0x009d,\n\t0x13d8: 0x009f, 0x13d9: 0x00a1, 0x13da: 0x00a3, 0x13db: 0x00a5, 0x13dc: 0x00a7, 0x13dd: 0x00a9,\n\t0x13de: 0x00ab, 0x13df: 0x00ad, 0x13e0: 0x00af, 0x13e1: 0x00b1, 0x13e2: 0x00b3, 0x13e3: 0x00b5,\n\t0x13e4: 0x00e3, 0x13e5: 0x0101, 0x13e8: 0x01f7, 0x13e9: 0x01fa,\n\t0x13ea: 0x01fd, 0x13eb: 0x0200, 0x13ec: 0x0203, 0x13ed: 0x0206, 0x13ee: 0x0209, 0x13ef: 0x020c,\n\t0x13f0: 0x020f, 0x13f1: 0x0212, 0x13f2: 0x0215, 0x13f3: 0x0218, 0x13f4: 0x021b, 0x13f5: 0x021e,\n\t0x13f6: 0x0221, 0x13f7: 0x0224, 0x13f8: 0x0227, 0x13f9: 0x020c, 0x13fa: 0x022a, 0x13fb: 0x022d,\n\t0x13fc: 0x0230, 0x13fd: 0x0233, 0x13fe: 0x0236, 0x13ff: 0x0239,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x0281, 0x1401: 0x0284, 0x1402: 0x0287, 0x1403: 0x0552, 0x1404: 0x024b, 0x1405: 0x0254,\n\t0x1406: 0x025a, 0x1407: 0x027e, 0x1408: 0x026f, 0x1409: 0x026c, 0x140a: 0x028a, 0x140b: 0x028d,\n\t0x140e: 0x0021, 0x140f: 0x0023, 0x1410: 0x0025, 0x1411: 0x0027,\n\t0x1412: 0x0029, 0x1413: 0x002b, 0x1414: 0x002d, 0x1415: 0x002f, 0x1416: 0x0031, 0x1417: 0x0033,\n\t0x1418: 0x0021, 0x1419: 0x0023, 0x141a: 0x0025, 0x141b: 0x0027, 0x141c: 0x0029, 0x141d: 0x002b,\n\t0x141e: 0x002d, 0x141f: 0x002f, 0x1420: 0x0031, 0x1421: 0x0033, 0x1422: 0x0021, 0x1423: 0x0023,\n\t0x1424: 0x0025, 0x1425: 0x0027, 0x1426: 0x0029, 0x1427: 0x002b, 0x1428: 0x002d, 0x1429: 0x002f,\n\t0x142a: 0x0031, 0x142b: 0x0033, 0x142c: 0x0021, 0x142d: 0x0023, 0x142e: 0x0025, 0x142f: 0x0027,\n\t0x1430: 0x0029, 0x1431: 0x002b, 0x1432: 0x002d, 0x1433: 0x002f, 0x1434: 0x0031, 0x1435: 0x0033,\n\t0x1436: 0x0021, 0x1437: 0x0023, 0x1438: 0x0025, 0x1439: 0x0027, 0x143a: 0x0029, 0x143b: 0x002b,\n\t0x143c: 0x002d, 0x143d: 0x002f, 0x143e: 0x0031, 0x143f: 0x0033,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x8133, 0x1441: 0x8133, 0x1442: 0x8133, 0x1443: 0x8133, 0x1444: 0x8133, 0x1445: 0x8133,\n\t0x1446: 0x8133, 0x1448: 0x8133, 0x1449: 0x8133, 0x144a: 0x8133, 0x144b: 0x8133,\n\t0x144c: 0x8133, 0x144d: 0x8133, 0x144e: 0x8133, 0x144f: 0x8133, 0x1450: 0x8133, 0x1451: 0x8133,\n\t0x1452: 0x8133, 0x1453: 0x8133, 0x1454: 0x8133, 0x1455: 0x8133, 0x1456: 0x8133, 0x1457: 0x8133,\n\t0x1458: 0x8133, 0x145b: 0x8133, 0x145c: 0x8133, 0x145d: 0x8133,\n\t0x145e: 0x8133, 0x145f: 0x8133, 0x1460: 0x8133, 0x1461: 0x8133, 0x1463: 0x8133,\n\t0x1464: 0x8133, 0x1466: 0x8133, 0x1467: 0x8133, 0x1468: 0x8133, 0x1469: 0x8133,\n\t0x146a: 0x8133,\n\t0x1470: 0x0290, 0x1471: 0x0293, 0x1472: 0x0296, 0x1473: 0x0299, 0x1474: 0x029c, 0x1475: 0x029f,\n\t0x1476: 0x02a2, 0x1477: 0x02a5, 0x1478: 0x02a8, 0x1479: 0x02ab, 0x147a: 0x02ae, 0x147b: 0x02b1,\n\t0x147c: 0x02b7, 0x147d: 0x02ba, 0x147e: 0x02bd, 0x147f: 0x02c0,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x02c3, 0x1481: 0x02c6, 0x1482: 0x02c9, 0x1483: 0x02cc, 0x1484: 0x02cf, 0x1485: 0x02d2,\n\t0x1486: 0x02d5, 0x1487: 0x02db, 0x1488: 0x02e1, 0x1489: 0x02e4, 0x148a: 0x1736, 0x148b: 0x0302,\n\t0x148c: 0x02ea, 0x148d: 0x02ed, 0x148e: 0x0305, 0x148f: 0x02f9, 0x1490: 0x02ff, 0x1491: 0x0290,\n\t0x1492: 0x0293, 0x1493: 0x0296, 0x1494: 0x0299, 0x1495: 0x029c, 0x1496: 0x029f, 0x1497: 0x02a2,\n\t0x1498: 0x02a5, 0x1499: 0x02a8, 0x149a: 0x02ab, 0x149b: 0x02ae, 0x149c: 0x02b7, 0x149d: 0x02ba,\n\t0x149e: 0x02c0, 0x149f: 0x02c6, 0x14a0: 0x02c9, 0x14a1: 0x02cc, 0x14a2: 0x02cf, 0x14a3: 0x02d2,\n\t0x14a4: 0x02d5, 0x14a5: 0x02d8, 0x14a6: 0x02db, 0x14a7: 0x02f3, 0x14a8: 0x02ea, 0x14a9: 0x02e7,\n\t0x14aa: 0x02f0, 0x14ab: 0x02f6, 0x14ac: 0x1732, 0x14ad: 0x02fc,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x032c, 0x14c1: 0x032f, 0x14c2: 0x033b, 0x14c3: 0x0344, 0x14c5: 0x037d,\n\t0x14c6: 0x034d, 0x14c7: 0x033e, 0x14c8: 0x035c, 0x14c9: 0x0383, 0x14ca: 0x036e, 0x14cb: 0x0371,\n\t0x14cc: 0x0374, 0x14cd: 0x0377, 0x14ce: 0x0350, 0x14cf: 0x0362, 0x14d0: 0x0368, 0x14d1: 0x0356,\n\t0x14d2: 0x036b, 0x14d3: 0x034a, 0x14d4: 0x0353, 0x14d5: 0x0335, 0x14d6: 0x0338, 0x14d7: 0x0341,\n\t0x14d8: 0x0347, 0x14d9: 0x0359, 0x14da: 0x035f, 0x14db: 0x0365, 0x14dc: 0x0386, 0x14dd: 0x03d7,\n\t0x14de: 0x03bf, 0x14df: 0x0389, 0x14e1: 0x032f, 0x14e2: 0x033b,\n\t0x14e4: 0x037a, 0x14e7: 0x033e, 0x14e9: 0x0383,\n\t0x14ea: 0x036e, 0x14eb: 0x0371, 0x14ec: 0x0374, 0x14ed: 0x0377, 0x14ee: 0x0350, 0x14ef: 0x0362,\n\t0x14f0: 0x0368, 0x14f1: 0x0356, 0x14f2: 0x036b, 0x14f4: 0x0353, 0x14f5: 0x0335,\n\t0x14f6: 0x0338, 0x14f7: 0x0341, 0x14f9: 0x0359, 0x14fb: 0x0365,\n\t// Block 0x54, offset 0x1500\n\t0x1502: 0x033b,\n\t0x1507: 0x033e, 0x1509: 0x0383, 0x150b: 0x0371,\n\t0x150d: 0x0377, 0x150e: 0x0350, 0x150f: 0x0362, 0x1511: 0x0356,\n\t0x1512: 0x036b, 0x1514: 0x0353, 0x1517: 0x0341,\n\t0x1519: 0x0359, 0x151b: 0x0365, 0x151d: 0x03d7,\n\t0x151f: 0x0389, 0x1521: 0x032f, 0x1522: 0x033b,\n\t0x1524: 0x037a, 0x1527: 0x033e, 0x1528: 0x035c, 0x1529: 0x0383,\n\t0x152a: 0x036e, 0x152c: 0x0374, 0x152d: 0x0377, 0x152e: 0x0350, 0x152f: 0x0362,\n\t0x1530: 0x0368, 0x1531: 0x0356, 0x1532: 0x036b, 0x1534: 0x0353, 0x1535: 0x0335,\n\t0x1536: 0x0338, 0x1537: 0x0341, 0x1539: 0x0359, 0x153a: 0x035f, 0x153b: 0x0365,\n\t0x153c: 0x0386, 0x153e: 0x03bf,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x032c, 0x1541: 0x032f, 0x1542: 0x033b, 0x1543: 0x0344, 0x1544: 0x037a, 0x1545: 0x037d,\n\t0x1546: 0x034d, 0x1547: 0x033e, 0x1548: 0x035c, 0x1549: 0x0383, 0x154b: 0x0371,\n\t0x154c: 0x0374, 0x154d: 0x0377, 0x154e: 0x0350, 0x154f: 0x0362, 0x1550: 0x0368, 0x1551: 0x0356,\n\t0x1552: 0x036b, 0x1553: 0x034a, 0x1554: 0x0353, 0x1555: 0x0335, 0x1556: 0x0338, 0x1557: 0x0341,\n\t0x1558: 0x0347, 0x1559: 0x0359, 0x155a: 0x035f, 0x155b: 0x0365,\n\t0x1561: 0x032f, 0x1562: 0x033b, 0x1563: 0x0344,\n\t0x1565: 0x037d, 0x1566: 0x034d, 0x1567: 0x033e, 0x1568: 0x035c, 0x1569: 0x0383,\n\t0x156b: 0x0371, 0x156c: 0x0374, 0x156d: 0x0377, 0x156e: 0x0350, 0x156f: 0x0362,\n\t0x1570: 0x0368, 0x1571: 0x0356, 0x1572: 0x036b, 0x1573: 0x034a, 0x1574: 0x0353, 0x1575: 0x0335,\n\t0x1576: 0x0338, 0x1577: 0x0341, 0x1578: 0x0347, 0x1579: 0x0359, 0x157a: 0x035f, 0x157b: 0x0365,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x19a6, 0x1581: 0x19a3, 0x1582: 0x19a9, 0x1583: 0x19cd, 0x1584: 0x19f1, 0x1585: 0x1a15,\n\t0x1586: 0x1a39, 0x1587: 0x1a42, 0x1588: 0x1a48, 0x1589: 0x1a4e, 0x158a: 0x1a54,\n\t0x1590: 0x1bbc, 0x1591: 0x1bc0,\n\t0x1592: 0x1bc4, 0x1593: 0x1bc8, 0x1594: 0x1bcc, 0x1595: 0x1bd0, 0x1596: 0x1bd4, 0x1597: 0x1bd8,\n\t0x1598: 0x1bdc, 0x1599: 0x1be0, 0x159a: 0x1be4, 0x159b: 0x1be8, 0x159c: 0x1bec, 0x159d: 0x1bf0,\n\t0x159e: 0x1bf4, 0x159f: 0x1bf8, 0x15a0: 0x1bfc, 0x15a1: 0x1c00, 0x15a2: 0x1c04, 0x15a3: 0x1c08,\n\t0x15a4: 0x1c0c, 0x15a5: 0x1c10, 0x15a6: 0x1c14, 0x15a7: 0x1c18, 0x15a8: 0x1c1c, 0x15a9: 0x1c20,\n\t0x15aa: 0x2855, 0x15ab: 0x0047, 0x15ac: 0x0065, 0x15ad: 0x1a69, 0x15ae: 0x1ae1,\n\t0x15b0: 0x0043, 0x15b1: 0x0045, 0x15b2: 0x0047, 0x15b3: 0x0049, 0x15b4: 0x004b, 0x15b5: 0x004d,\n\t0x15b6: 0x004f, 0x15b7: 0x0051, 0x15b8: 0x0053, 0x15b9: 0x0055, 0x15ba: 0x0057, 0x15bb: 0x0059,\n\t0x15bc: 0x005b, 0x15bd: 0x005d, 0x15be: 0x005f, 0x15bf: 0x0061,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x27dd, 0x15c1: 0x27f2, 0x15c2: 0x05fe,\n\t0x15d0: 0x0d0a, 0x15d1: 0x0b42,\n\t0x15d2: 0x09ce, 0x15d3: 0x46f5, 0x15d4: 0x0816, 0x15d5: 0x0aea, 0x15d6: 0x142a, 0x15d7: 0x0afa,\n\t0x15d8: 0x0822, 0x15d9: 0x0dd2, 0x15da: 0x0faa, 0x15db: 0x0daa, 0x15dc: 0x0922, 0x15dd: 0x0c66,\n\t0x15de: 0x08ba, 0x15df: 0x0db2, 0x15e0: 0x090e, 0x15e1: 0x1212, 0x15e2: 0x107e, 0x15e3: 0x1486,\n\t0x15e4: 0x0ace, 0x15e5: 0x0a06, 0x15e6: 0x0f5e, 0x15e7: 0x0d16, 0x15e8: 0x0d42, 0x15e9: 0x07ba,\n\t0x15ea: 0x07c6, 0x15eb: 0x1506, 0x15ec: 0x0bd6, 0x15ed: 0x07e2, 0x15ee: 0x09ea, 0x15ef: 0x0d36,\n\t0x15f0: 0x14ae, 0x15f1: 0x0d0e, 0x15f2: 0x116a, 0x15f3: 0x11a6, 0x15f4: 0x09f2, 0x15f5: 0x0f3e,\n\t0x15f6: 0x0e06, 0x15f7: 0x0e02, 0x15f8: 0x1092, 0x15f9: 0x0926, 0x15fa: 0x0a52, 0x15fb: 0x153e,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x07f6, 0x1601: 0x07ee, 0x1602: 0x07fe, 0x1603: 0x1774, 0x1604: 0x0842, 0x1605: 0x0852,\n\t0x1606: 0x0856, 0x1607: 0x085e, 0x1608: 0x0866, 0x1609: 0x086a, 0x160a: 0x0876, 0x160b: 0x086e,\n\t0x160c: 0x06ae, 0x160d: 0x1788, 0x160e: 0x088a, 0x160f: 0x088e, 0x1610: 0x0892, 0x1611: 0x08ae,\n\t0x1612: 0x1779, 0x1613: 0x06b2, 0x1614: 0x089a, 0x1615: 0x08ba, 0x1616: 0x1783, 0x1617: 0x08ca,\n\t0x1618: 0x08d2, 0x1619: 0x0832, 0x161a: 0x08da, 0x161b: 0x08de, 0x161c: 0x195e, 0x161d: 0x08fa,\n\t0x161e: 0x0902, 0x161f: 0x06ba, 0x1620: 0x091a, 0x1621: 0x091e, 0x1622: 0x0926, 0x1623: 0x092a,\n\t0x1624: 0x06be, 0x1625: 0x0942, 0x1626: 0x0946, 0x1627: 0x0952, 0x1628: 0x095e, 0x1629: 0x0962,\n\t0x162a: 0x0966, 0x162b: 0x096e, 0x162c: 0x098e, 0x162d: 0x0992, 0x162e: 0x099a, 0x162f: 0x09aa,\n\t0x1630: 0x09b2, 0x1631: 0x09b6, 0x1632: 0x09b6, 0x1633: 0x09b6, 0x1634: 0x1797, 0x1635: 0x0f8e,\n\t0x1636: 0x09ca, 0x1637: 0x09d2, 0x1638: 0x179c, 0x1639: 0x09de, 0x163a: 0x09e6, 0x163b: 0x09ee,\n\t0x163c: 0x0a16, 0x163d: 0x0a02, 0x163e: 0x0a0e, 0x163f: 0x0a12,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0a1a, 0x1641: 0x0a22, 0x1642: 0x0a26, 0x1643: 0x0a2e, 0x1644: 0x0a36, 0x1645: 0x0a3a,\n\t0x1646: 0x0a3a, 0x1647: 0x0a42, 0x1648: 0x0a4a, 0x1649: 0x0a4e, 0x164a: 0x0a5a, 0x164b: 0x0a7e,\n\t0x164c: 0x0a62, 0x164d: 0x0a82, 0x164e: 0x0a66, 0x164f: 0x0a6e, 0x1650: 0x0906, 0x1651: 0x0aca,\n\t0x1652: 0x0a92, 0x1653: 0x0a96, 0x1654: 0x0a9a, 0x1655: 0x0a8e, 0x1656: 0x0aa2, 0x1657: 0x0a9e,\n\t0x1658: 0x0ab6, 0x1659: 0x17a1, 0x165a: 0x0ad2, 0x165b: 0x0ad6, 0x165c: 0x0ade, 0x165d: 0x0aea,\n\t0x165e: 0x0af2, 0x165f: 0x0b0e, 0x1660: 0x17a6, 0x1661: 0x17ab, 0x1662: 0x0b1a, 0x1663: 0x0b1e,\n\t0x1664: 0x0b22, 0x1665: 0x0b16, 0x1666: 0x0b2a, 0x1667: 0x06c2, 0x1668: 0x06c6, 0x1669: 0x0b32,\n\t0x166a: 0x0b3a, 0x166b: 0x0b3a, 0x166c: 0x17b0, 0x166d: 0x0b56, 0x166e: 0x0b5a, 0x166f: 0x0b5e,\n\t0x1670: 0x0b66, 0x1671: 0x17b5, 0x1672: 0x0b6e, 0x1673: 0x0b72, 0x1674: 0x0c4a, 0x1675: 0x0b7a,\n\t0x1676: 0x06ca, 0x1677: 0x0b86, 0x1678: 0x0b96, 0x1679: 0x0ba2, 0x167a: 0x0b9e, 0x167b: 0x17bf,\n\t0x167c: 0x0baa, 0x167d: 0x17c4, 0x167e: 0x0bb6, 0x167f: 0x0bb2,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x0bba, 0x1681: 0x0bca, 0x1682: 0x0bce, 0x1683: 0x06ce, 0x1684: 0x0bde, 0x1685: 0x0be6,\n\t0x1686: 0x0bea, 0x1687: 0x0bee, 0x1688: 0x06d2, 0x1689: 0x17c9, 0x168a: 0x06d6, 0x168b: 0x0c0a,\n\t0x168c: 0x0c0e, 0x168d: 0x0c12, 0x168e: 0x0c1a, 0x168f: 0x1990, 0x1690: 0x0c32, 0x1691: 0x17d3,\n\t0x1692: 0x17d3, 0x1693: 0x12d2, 0x1694: 0x0c42, 0x1695: 0x0c42, 0x1696: 0x06da, 0x1697: 0x17f6,\n\t0x1698: 0x18c8, 0x1699: 0x0c52, 0x169a: 0x0c5a, 0x169b: 0x06de, 0x169c: 0x0c6e, 0x169d: 0x0c7e,\n\t0x169e: 0x0c82, 0x169f: 0x0c8a, 0x16a0: 0x0c9a, 0x16a1: 0x06e6, 0x16a2: 0x06e2, 0x16a3: 0x0c9e,\n\t0x16a4: 0x17d8, 0x16a5: 0x0ca2, 0x16a6: 0x0cb6, 0x16a7: 0x0cba, 0x16a8: 0x0cbe, 0x16a9: 0x0cba,\n\t0x16aa: 0x0cca, 0x16ab: 0x0cce, 0x16ac: 0x0cde, 0x16ad: 0x0cd6, 0x16ae: 0x0cda, 0x16af: 0x0ce2,\n\t0x16b0: 0x0ce6, 0x16b1: 0x0cea, 0x16b2: 0x0cf6, 0x16b3: 0x0cfa, 0x16b4: 0x0d12, 0x16b5: 0x0d1a,\n\t0x16b6: 0x0d2a, 0x16b7: 0x0d3e, 0x16b8: 0x17e7, 0x16b9: 0x0d3a, 0x16ba: 0x0d2e, 0x16bb: 0x0d46,\n\t0x16bc: 0x0d4e, 0x16bd: 0x0d62, 0x16be: 0x17ec, 0x16bf: 0x0d6a,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x0d5e, 0x16c1: 0x0d56, 0x16c2: 0x06ea, 0x16c3: 0x0d72, 0x16c4: 0x0d7a, 0x16c5: 0x0d82,\n\t0x16c6: 0x0d76, 0x16c7: 0x06ee, 0x16c8: 0x0d92, 0x16c9: 0x0d9a, 0x16ca: 0x17f1, 0x16cb: 0x0dc6,\n\t0x16cc: 0x0dfa, 0x16cd: 0x0dd6, 0x16ce: 0x06fa, 0x16cf: 0x0de2, 0x16d0: 0x06f6, 0x16d1: 0x06f2,\n\t0x16d2: 0x08be, 0x16d3: 0x08c2, 0x16d4: 0x0dfe, 0x16d5: 0x0de6, 0x16d6: 0x12a6, 0x16d7: 0x075e,\n\t0x16d8: 0x0e0a, 0x16d9: 0x0e0e, 0x16da: 0x0e12, 0x16db: 0x0e26, 0x16dc: 0x0e1e, 0x16dd: 0x180a,\n\t0x16de: 0x06fe, 0x16df: 0x0e3a, 0x16e0: 0x0e2e, 0x16e1: 0x0e4a, 0x16e2: 0x0e52, 0x16e3: 0x1814,\n\t0x16e4: 0x0e56, 0x16e5: 0x0e42, 0x16e6: 0x0e5e, 0x16e7: 0x0702, 0x16e8: 0x0e62, 0x16e9: 0x0e66,\n\t0x16ea: 0x0e6a, 0x16eb: 0x0e76, 0x16ec: 0x1819, 0x16ed: 0x0e7e, 0x16ee: 0x0706, 0x16ef: 0x0e8a,\n\t0x16f0: 0x181e, 0x16f1: 0x0e8e, 0x16f2: 0x070a, 0x16f3: 0x0e9a, 0x16f4: 0x0ea6, 0x16f5: 0x0eb2,\n\t0x16f6: 0x0eb6, 0x16f7: 0x1823, 0x16f8: 0x17ba, 0x16f9: 0x1828, 0x16fa: 0x0ed6, 0x16fb: 0x182d,\n\t0x16fc: 0x0ee2, 0x16fd: 0x0eea, 0x16fe: 0x0eda, 0x16ff: 0x0ef6,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0f06, 0x1701: 0x0f16, 0x1702: 0x0f0a, 0x1703: 0x0f0e, 0x1704: 0x0f1a, 0x1705: 0x0f1e,\n\t0x1706: 0x1832, 0x1707: 0x0f02, 0x1708: 0x0f36, 0x1709: 0x0f3a, 0x170a: 0x070e, 0x170b: 0x0f4e,\n\t0x170c: 0x0f4a, 0x170d: 0x1837, 0x170e: 0x0f2e, 0x170f: 0x0f6a, 0x1710: 0x183c, 0x1711: 0x1841,\n\t0x1712: 0x0f6e, 0x1713: 0x0f82, 0x1714: 0x0f7e, 0x1715: 0x0f7a, 0x1716: 0x0712, 0x1717: 0x0f86,\n\t0x1718: 0x0f96, 0x1719: 0x0f92, 0x171a: 0x0f9e, 0x171b: 0x177e, 0x171c: 0x0fae, 0x171d: 0x1846,\n\t0x171e: 0x0fba, 0x171f: 0x1850, 0x1720: 0x0fce, 0x1721: 0x0fda, 0x1722: 0x0fee, 0x1723: 0x1855,\n\t0x1724: 0x1002, 0x1725: 0x1006, 0x1726: 0x185a, 0x1727: 0x185f, 0x1728: 0x1022, 0x1729: 0x1032,\n\t0x172a: 0x0716, 0x172b: 0x1036, 0x172c: 0x071a, 0x172d: 0x071a, 0x172e: 0x104e, 0x172f: 0x1052,\n\t0x1730: 0x105a, 0x1731: 0x105e, 0x1732: 0x106a, 0x1733: 0x071e, 0x1734: 0x1082, 0x1735: 0x1864,\n\t0x1736: 0x109e, 0x1737: 0x1869, 0x1738: 0x10aa, 0x1739: 0x17ce, 0x173a: 0x10ba, 0x173b: 0x186e,\n\t0x173c: 0x1873, 0x173d: 0x1878, 0x173e: 0x0722, 0x173f: 0x0726,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x10f2, 0x1741: 0x1882, 0x1742: 0x187d, 0x1743: 0x1887, 0x1744: 0x188c, 0x1745: 0x10fa,\n\t0x1746: 0x10fe, 0x1747: 0x10fe, 0x1748: 0x1106, 0x1749: 0x072e, 0x174a: 0x110a, 0x174b: 0x0732,\n\t0x174c: 0x0736, 0x174d: 0x1896, 0x174e: 0x111e, 0x174f: 0x1126, 0x1750: 0x1132, 0x1751: 0x073a,\n\t0x1752: 0x189b, 0x1753: 0x1156, 0x1754: 0x18a0, 0x1755: 0x18a5, 0x1756: 0x1176, 0x1757: 0x118e,\n\t0x1758: 0x073e, 0x1759: 0x1196, 0x175a: 0x119a, 0x175b: 0x119e, 0x175c: 0x18aa, 0x175d: 0x18af,\n\t0x175e: 0x18af, 0x175f: 0x11b6, 0x1760: 0x0742, 0x1761: 0x18b4, 0x1762: 0x11ca, 0x1763: 0x11ce,\n\t0x1764: 0x0746, 0x1765: 0x18b9, 0x1766: 0x11ea, 0x1767: 0x074a, 0x1768: 0x11fa, 0x1769: 0x11f2,\n\t0x176a: 0x1202, 0x176b: 0x18c3, 0x176c: 0x121a, 0x176d: 0x074e, 0x176e: 0x1226, 0x176f: 0x122e,\n\t0x1770: 0x123e, 0x1771: 0x0752, 0x1772: 0x18cd, 0x1773: 0x18d2, 0x1774: 0x0756, 0x1775: 0x18d7,\n\t0x1776: 0x1256, 0x1777: 0x18dc, 0x1778: 0x1262, 0x1779: 0x126e, 0x177a: 0x1276, 0x177b: 0x18e1,\n\t0x177c: 0x18e6, 0x177d: 0x128a, 0x177e: 0x18eb, 0x177f: 0x1292,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x17fb, 0x1781: 0x075a, 0x1782: 0x12aa, 0x1783: 0x12ae, 0x1784: 0x0762, 0x1785: 0x12b2,\n\t0x1786: 0x0b2e, 0x1787: 0x18f0, 0x1788: 0x18f5, 0x1789: 0x1800, 0x178a: 0x1805, 0x178b: 0x12d2,\n\t0x178c: 0x12d6, 0x178d: 0x14ee, 0x178e: 0x0766, 0x178f: 0x1302, 0x1790: 0x12fe, 0x1791: 0x1306,\n\t0x1792: 0x093a, 0x1793: 0x130a, 0x1794: 0x130e, 0x1795: 0x1312, 0x1796: 0x131a, 0x1797: 0x18fa,\n\t0x1798: 0x1316, 0x1799: 0x131e, 0x179a: 0x1332, 0x179b: 0x1336, 0x179c: 0x1322, 0x179d: 0x133a,\n\t0x179e: 0x134e, 0x179f: 0x1362, 0x17a0: 0x132e, 0x17a1: 0x1342, 0x17a2: 0x1346, 0x17a3: 0x134a,\n\t0x17a4: 0x18ff, 0x17a5: 0x1909, 0x17a6: 0x1904, 0x17a7: 0x076a, 0x17a8: 0x136a, 0x17a9: 0x136e,\n\t0x17aa: 0x1376, 0x17ab: 0x191d, 0x17ac: 0x137a, 0x17ad: 0x190e, 0x17ae: 0x076e, 0x17af: 0x0772,\n\t0x17b0: 0x1913, 0x17b1: 0x1918, 0x17b2: 0x0776, 0x17b3: 0x139a, 0x17b4: 0x139e, 0x17b5: 0x13a2,\n\t0x17b6: 0x13a6, 0x17b7: 0x13b2, 0x17b8: 0x13ae, 0x17b9: 0x13ba, 0x17ba: 0x13b6, 0x17bb: 0x13c6,\n\t0x17bc: 0x13be, 0x17bd: 0x13c2, 0x17be: 0x13ca, 0x17bf: 0x077a,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x13d2, 0x17c1: 0x13d6, 0x17c2: 0x077e, 0x17c3: 0x13e6, 0x17c4: 0x13ea, 0x17c5: 0x1922,\n\t0x17c6: 0x13f6, 0x17c7: 0x13fa, 0x17c8: 0x0782, 0x17c9: 0x1406, 0x17ca: 0x06b6, 0x17cb: 0x1927,\n\t0x17cc: 0x192c, 0x17cd: 0x0786, 0x17ce: 0x078a, 0x17cf: 0x1432, 0x17d0: 0x144a, 0x17d1: 0x1466,\n\t0x17d2: 0x1476, 0x17d3: 0x1931, 0x17d4: 0x148a, 0x17d5: 0x148e, 0x17d6: 0x14a6, 0x17d7: 0x14b2,\n\t0x17d8: 0x193b, 0x17d9: 0x178d, 0x17da: 0x14be, 0x17db: 0x14ba, 0x17dc: 0x14c6, 0x17dd: 0x1792,\n\t0x17de: 0x14d2, 0x17df: 0x14de, 0x17e0: 0x1940, 0x17e1: 0x1945, 0x17e2: 0x151e, 0x17e3: 0x152a,\n\t0x17e4: 0x1532, 0x17e5: 0x194a, 0x17e6: 0x1536, 0x17e7: 0x1562, 0x17e8: 0x156e, 0x17e9: 0x1572,\n\t0x17ea: 0x156a, 0x17eb: 0x157e, 0x17ec: 0x1582, 0x17ed: 0x194f, 0x17ee: 0x158e, 0x17ef: 0x078e,\n\t0x17f0: 0x1596, 0x17f1: 0x1954, 0x17f2: 0x0792, 0x17f3: 0x15ce, 0x17f4: 0x0bbe, 0x17f5: 0x15e6,\n\t0x17f6: 0x1959, 0x17f7: 0x1963, 0x17f8: 0x0796, 0x17f9: 0x079a, 0x17fa: 0x160e, 0x17fb: 0x1968,\n\t0x17fc: 0x079e, 0x17fd: 0x196d, 0x17fe: 0x1626, 0x17ff: 0x1626,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x162e, 0x1801: 0x1972, 0x1802: 0x1646, 0x1803: 0x07a2, 0x1804: 0x1656, 0x1805: 0x1662,\n\t0x1806: 0x166a, 0x1807: 0x1672, 0x1808: 0x07a6, 0x1809: 0x1977, 0x180a: 0x1686, 0x180b: 0x16a2,\n\t0x180c: 0x16ae, 0x180d: 0x07aa, 0x180e: 0x07ae, 0x180f: 0x16b2, 0x1810: 0x197c, 0x1811: 0x07b2,\n\t0x1812: 0x1981, 0x1813: 0x1986, 0x1814: 0x198b, 0x1815: 0x16d6, 0x1816: 0x07b6, 0x1817: 0x16ea,\n\t0x1818: 0x16f2, 0x1819: 0x16f6, 0x181a: 0x16fe, 0x181b: 0x1706, 0x181c: 0x170e, 0x181d: 0x1995,\n}\n\n// nfkcIndex: 22 blocks, 1408 entries, 2816 bytes\n// Block 0 is the zero block.\nvar nfkcIndex = [1408]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x5f, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x60, 0xc7: 0x04,\n\t0xc8: 0x05, 0xca: 0x61, 0xcb: 0x62, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x09,\n\t0xd0: 0x0a, 0xd1: 0x63, 0xd2: 0x64, 0xd3: 0x0b, 0xd6: 0x0c, 0xd7: 0x65,\n\t0xd8: 0x66, 0xd9: 0x0d, 0xdb: 0x67, 0xdc: 0x68, 0xdd: 0x69, 0xdf: 0x6a,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,\n\t0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,\n\t0xf0: 0x13,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x6b, 0x121: 0x6c, 0x122: 0x6d, 0x123: 0x0e, 0x124: 0x6e, 0x125: 0x6f, 0x126: 0x70, 0x127: 0x71,\n\t0x128: 0x72, 0x129: 0x73, 0x12a: 0x74, 0x12b: 0x75, 0x12c: 0x70, 0x12d: 0x76, 0x12e: 0x77, 0x12f: 0x78,\n\t0x130: 0x74, 0x131: 0x79, 0x132: 0x7a, 0x133: 0x7b, 0x134: 0x7c, 0x135: 0x7d, 0x137: 0x7e,\n\t0x138: 0x7f, 0x139: 0x80, 0x13a: 0x81, 0x13b: 0x82, 0x13c: 0x83, 0x13d: 0x84, 0x13e: 0x85, 0x13f: 0x86,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x87, 0x142: 0x88, 0x143: 0x89, 0x144: 0x8a, 0x145: 0x8b, 0x146: 0x8c, 0x147: 0x8d,\n\t0x14d: 0x8e,\n\t0x15c: 0x8f, 0x15f: 0x90,\n\t0x162: 0x91, 0x164: 0x92,\n\t0x168: 0x93, 0x169: 0x94, 0x16a: 0x95, 0x16b: 0x96, 0x16c: 0x0f, 0x16d: 0x97, 0x16e: 0x98, 0x16f: 0x99,\n\t0x170: 0x9a, 0x173: 0x9b, 0x174: 0x9c, 0x175: 0x10, 0x176: 0x11, 0x177: 0x12,\n\t0x178: 0x13, 0x179: 0x14, 0x17a: 0x15, 0x17b: 0x16, 0x17c: 0x17, 0x17d: 0x18, 0x17e: 0x19, 0x17f: 0x1a,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x9d, 0x181: 0x9e, 0x182: 0x9f, 0x183: 0xa0, 0x184: 0x1b, 0x185: 0x1c, 0x186: 0xa1, 0x187: 0xa2,\n\t0x188: 0xa3, 0x189: 0x1d, 0x18a: 0x1e, 0x18b: 0xa4, 0x18c: 0xa5,\n\t0x191: 0x1f, 0x192: 0x20, 0x193: 0xa6,\n\t0x1a8: 0xa7, 0x1a9: 0xa8, 0x1ab: 0xa9,\n\t0x1b1: 0xaa, 0x1b3: 0xab, 0x1b5: 0xac, 0x1b7: 0xad,\n\t0x1ba: 0xae, 0x1bb: 0xaf, 0x1bc: 0x21, 0x1bd: 0x22, 0x1be: 0x23, 0x1bf: 0xb0,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0xb1, 0x1c1: 0x24, 0x1c2: 0x25, 0x1c3: 0x26, 0x1c4: 0xb2, 0x1c5: 0x27, 0x1c6: 0x28,\n\t0x1c8: 0x29, 0x1c9: 0x2a, 0x1ca: 0x2b, 0x1cb: 0x2c, 0x1cc: 0x2d, 0x1cd: 0x2e, 0x1ce: 0x2f, 0x1cf: 0x30,\n\t// Block 0x8, offset 0x200\n\t0x219: 0xb3, 0x21a: 0xb4, 0x21b: 0xb5, 0x21d: 0xb6, 0x21f: 0xb7,\n\t0x220: 0xb8, 0x223: 0xb9, 0x224: 0xba, 0x225: 0xbb, 0x226: 0xbc, 0x227: 0xbd,\n\t0x22a: 0xbe, 0x22b: 0xbf, 0x22d: 0xc0, 0x22f: 0xc1,\n\t0x230: 0xc2, 0x231: 0xc3, 0x232: 0xc4, 0x233: 0xc5, 0x234: 0xc6, 0x235: 0xc7, 0x236: 0xc8, 0x237: 0xc2,\n\t0x238: 0xc3, 0x239: 0xc4, 0x23a: 0xc5, 0x23b: 0xc6, 0x23c: 0xc7, 0x23d: 0xc8, 0x23e: 0xc2, 0x23f: 0xc3,\n\t// Block 0x9, offset 0x240\n\t0x240: 0xc4, 0x241: 0xc5, 0x242: 0xc6, 0x243: 0xc7, 0x244: 0xc8, 0x245: 0xc2, 0x246: 0xc3, 0x247: 0xc4,\n\t0x248: 0xc5, 0x249: 0xc6, 0x24a: 0xc7, 0x24b: 0xc8, 0x24c: 0xc2, 0x24d: 0xc3, 0x24e: 0xc4, 0x24f: 0xc5,\n\t0x250: 0xc6, 0x251: 0xc7, 0x252: 0xc8, 0x253: 0xc2, 0x254: 0xc3, 0x255: 0xc4, 0x256: 0xc5, 0x257: 0xc6,\n\t0x258: 0xc7, 0x259: 0xc8, 0x25a: 0xc2, 0x25b: 0xc3, 0x25c: 0xc4, 0x25d: 0xc5, 0x25e: 0xc6, 0x25f: 0xc7,\n\t0x260: 0xc8, 0x261: 0xc2, 0x262: 0xc3, 0x263: 0xc4, 0x264: 0xc5, 0x265: 0xc6, 0x266: 0xc7, 0x267: 0xc8,\n\t0x268: 0xc2, 0x269: 0xc3, 0x26a: 0xc4, 0x26b: 0xc5, 0x26c: 0xc6, 0x26d: 0xc7, 0x26e: 0xc8, 0x26f: 0xc2,\n\t0x270: 0xc3, 0x271: 0xc4, 0x272: 0xc5, 0x273: 0xc6, 0x274: 0xc7, 0x275: 0xc8, 0x276: 0xc2, 0x277: 0xc3,\n\t0x278: 0xc4, 0x279: 0xc5, 0x27a: 0xc6, 0x27b: 0xc7, 0x27c: 0xc8, 0x27d: 0xc2, 0x27e: 0xc3, 0x27f: 0xc4,\n\t// Block 0xa, offset 0x280\n\t0x280: 0xc5, 0x281: 0xc6, 0x282: 0xc7, 0x283: 0xc8, 0x284: 0xc2, 0x285: 0xc3, 0x286: 0xc4, 0x287: 0xc5,\n\t0x288: 0xc6, 0x289: 0xc7, 0x28a: 0xc8, 0x28b: 0xc2, 0x28c: 0xc3, 0x28d: 0xc4, 0x28e: 0xc5, 0x28f: 0xc6,\n\t0x290: 0xc7, 0x291: 0xc8, 0x292: 0xc2, 0x293: 0xc3, 0x294: 0xc4, 0x295: 0xc5, 0x296: 0xc6, 0x297: 0xc7,\n\t0x298: 0xc8, 0x299: 0xc2, 0x29a: 0xc3, 0x29b: 0xc4, 0x29c: 0xc5, 0x29d: 0xc6, 0x29e: 0xc7, 0x29f: 0xc8,\n\t0x2a0: 0xc2, 0x2a1: 0xc3, 0x2a2: 0xc4, 0x2a3: 0xc5, 0x2a4: 0xc6, 0x2a5: 0xc7, 0x2a6: 0xc8, 0x2a7: 0xc2,\n\t0x2a8: 0xc3, 0x2a9: 0xc4, 0x2aa: 0xc5, 0x2ab: 0xc6, 0x2ac: 0xc7, 0x2ad: 0xc8, 0x2ae: 0xc2, 0x2af: 0xc3,\n\t0x2b0: 0xc4, 0x2b1: 0xc5, 0x2b2: 0xc6, 0x2b3: 0xc7, 0x2b4: 0xc8, 0x2b5: 0xc2, 0x2b6: 0xc3, 0x2b7: 0xc4,\n\t0x2b8: 0xc5, 0x2b9: 0xc6, 0x2ba: 0xc7, 0x2bb: 0xc8, 0x2bc: 0xc2, 0x2bd: 0xc3, 0x2be: 0xc4, 0x2bf: 0xc5,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0xc6, 0x2c1: 0xc7, 0x2c2: 0xc8, 0x2c3: 0xc2, 0x2c4: 0xc3, 0x2c5: 0xc4, 0x2c6: 0xc5, 0x2c7: 0xc6,\n\t0x2c8: 0xc7, 0x2c9: 0xc8, 0x2ca: 0xc2, 0x2cb: 0xc3, 0x2cc: 0xc4, 0x2cd: 0xc5, 0x2ce: 0xc6, 0x2cf: 0xc7,\n\t0x2d0: 0xc8, 0x2d1: 0xc2, 0x2d2: 0xc3, 0x2d3: 0xc4, 0x2d4: 0xc5, 0x2d5: 0xc6, 0x2d6: 0xc7, 0x2d7: 0xc8,\n\t0x2d8: 0xc2, 0x2d9: 0xc3, 0x2da: 0xc4, 0x2db: 0xc5, 0x2dc: 0xc6, 0x2dd: 0xc7, 0x2de: 0xc9,\n\t// Block 0xc, offset 0x300\n\t0x324: 0x31, 0x325: 0x32, 0x326: 0x33, 0x327: 0x34,\n\t0x328: 0x35, 0x329: 0x36, 0x32a: 0x37, 0x32b: 0x38, 0x32c: 0x39, 0x32d: 0x3a, 0x32e: 0x3b, 0x32f: 0x3c,\n\t0x330: 0x3d, 0x331: 0x3e, 0x332: 0x3f, 0x333: 0x40, 0x334: 0x41, 0x335: 0x42, 0x336: 0x43, 0x337: 0x44,\n\t0x338: 0x45, 0x339: 0x46, 0x33a: 0x47, 0x33b: 0x48, 0x33c: 0xca, 0x33d: 0x49, 0x33e: 0x4a, 0x33f: 0x4b,\n\t// Block 0xd, offset 0x340\n\t0x347: 0xcb,\n\t0x34b: 0xcc, 0x34d: 0xcd,\n\t0x35e: 0x4c,\n\t0x368: 0xce, 0x36b: 0xcf,\n\t0x374: 0xd0,\n\t0x37a: 0xd1, 0x37b: 0xd2, 0x37d: 0xd3, 0x37e: 0xd4,\n\t// Block 0xe, offset 0x380\n\t0x381: 0xd5, 0x382: 0xd6, 0x384: 0xd7, 0x385: 0xbc, 0x387: 0xd8,\n\t0x388: 0xd9, 0x38b: 0xda, 0x38c: 0xdb, 0x38d: 0xdc,\n\t0x391: 0xdd, 0x392: 0xde, 0x393: 0xdf, 0x396: 0xe0, 0x397: 0xe1,\n\t0x398: 0xe2, 0x39a: 0xe3, 0x39c: 0xe4,\n\t0x3a0: 0xe5, 0x3a4: 0xe6, 0x3a5: 0xe7, 0x3a7: 0xe8,\n\t0x3a8: 0xe9, 0x3a9: 0xea, 0x3aa: 0xeb,\n\t0x3b0: 0xe2, 0x3b5: 0xec, 0x3b6: 0xed,\n\t0x3bd: 0xee,\n\t// Block 0xf, offset 0x3c0\n\t0x3eb: 0xef, 0x3ec: 0xf0,\n\t0x3ff: 0xf1,\n\t// Block 0x10, offset 0x400\n\t0x432: 0xf2,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xf3, 0x446: 0xf4, 0x447: 0xf5,\n\t0x449: 0xf6,\n\t0x450: 0xf7, 0x451: 0xf8, 0x452: 0xf9, 0x453: 0xfa, 0x454: 0xfb, 0x455: 0xfc, 0x456: 0xfd, 0x457: 0xfe,\n\t0x458: 0xff, 0x459: 0x100, 0x45a: 0x4d, 0x45b: 0x101, 0x45c: 0x102, 0x45d: 0x103, 0x45e: 0x104, 0x45f: 0x4e,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x4f, 0x481: 0x50, 0x482: 0x105, 0x484: 0xf0,\n\t0x48a: 0x106, 0x48b: 0x107,\n\t0x493: 0x108,\n\t0x4a3: 0x109, 0x4a5: 0x10a,\n\t0x4b8: 0x51, 0x4b9: 0x52, 0x4ba: 0x53,\n\t// Block 0x13, offset 0x4c0\n\t0x4c4: 0x54, 0x4c5: 0x10b, 0x4c6: 0x10c,\n\t0x4c8: 0x55, 0x4c9: 0x10d,\n\t0x4ef: 0x10e,\n\t// Block 0x14, offset 0x500\n\t0x520: 0x56, 0x521: 0x57, 0x522: 0x58, 0x523: 0x59, 0x524: 0x5a, 0x525: 0x5b, 0x526: 0x5c, 0x527: 0x5d,\n\t0x528: 0x5e,\n\t// Block 0x15, offset 0x540\n\t0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d,\n\t0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11,\n\t0x56f: 0x12,\n}\n\n// nfkcSparseOffset: 176 entries, 352 bytes\nvar nfkcSparseOffset = []uint16{0x0, 0xe, 0x12, 0x1c, 0x26, 0x36, 0x38, 0x3d, 0x48, 0x57, 0x64, 0x6c, 0x71, 0x76, 0x78, 0x7c, 0x84, 0x8b, 0x8e, 0x96, 0x9a, 0x9e, 0xa0, 0xa2, 0xab, 0xaf, 0xb6, 0xbb, 0xbe, 0xc8, 0xcb, 0xd2, 0xda, 0xde, 0xe0, 0xe4, 0xe8, 0xee, 0xff, 0x10b, 0x10d, 0x113, 0x115, 0x117, 0x119, 0x11b, 0x11d, 0x11f, 0x121, 0x124, 0x127, 0x129, 0x12c, 0x12f, 0x133, 0x139, 0x140, 0x149, 0x14b, 0x14e, 0x150, 0x15b, 0x166, 0x174, 0x182, 0x192, 0x1a0, 0x1a7, 0x1ad, 0x1bc, 0x1c0, 0x1c2, 0x1c6, 0x1c8, 0x1cb, 0x1cd, 0x1d0, 0x1d2, 0x1d5, 0x1d7, 0x1d9, 0x1db, 0x1e7, 0x1f1, 0x1fb, 0x1fe, 0x202, 0x204, 0x206, 0x20b, 0x20e, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21f, 0x222, 0x227, 0x229, 0x230, 0x236, 0x23c, 0x244, 0x24a, 0x250, 0x256, 0x25a, 0x25c, 0x25e, 0x260, 0x262, 0x268, 0x26b, 0x26d, 0x26f, 0x271, 0x277, 0x27b, 0x27f, 0x287, 0x28e, 0x291, 0x294, 0x296, 0x299, 0x2a1, 0x2a5, 0x2ac, 0x2af, 0x2b5, 0x2b7, 0x2b9, 0x2bc, 0x2be, 0x2c1, 0x2c6, 0x2c8, 0x2ca, 0x2cc, 0x2ce, 0x2d0, 0x2d3, 0x2d5, 0x2d7, 0x2d9, 0x2db, 0x2dd, 0x2df, 0x2ec, 0x2f6, 0x2f8, 0x2fa, 0x2fe, 0x303, 0x30f, 0x314, 0x31d, 0x323, 0x328, 0x32c, 0x331, 0x335, 0x345, 0x353, 0x361, 0x36f, 0x371, 0x373, 0x375, 0x379, 0x37b, 0x37e, 0x389, 0x38b, 0x395}\n\n// nfkcSparseValues: 919 entries, 3676 bytes\nvar nfkcSparseValues = [919]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0002, lo: 0x0d},\n\t{value: 0x0001, lo: 0xa0, hi: 0xa0},\n\t{value: 0x4331, lo: 0xa8, hi: 0xa8},\n\t{value: 0x0083, lo: 0xaa, hi: 0xaa},\n\t{value: 0x431d, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0025, lo: 0xb2, hi: 0xb3},\n\t{value: 0x4313, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0260, lo: 0xb5, hi: 0xb5},\n\t{value: 0x434a, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0023, lo: 0xb9, hi: 0xb9},\n\t{value: 0x009f, lo: 0xba, hi: 0xba},\n\t{value: 0x234c, lo: 0xbc, hi: 0xbc},\n\t{value: 0x2340, lo: 0xbd, hi: 0xbd},\n\t{value: 0x23e2, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1, offset 0xe\n\t{value: 0x0091, lo: 0x03},\n\t{value: 0x4813, lo: 0xa0, hi: 0xa1},\n\t{value: 0x4845, lo: 0xaf, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb7, hi: 0xb7},\n\t// Block 0x2, offset 0x12\n\t{value: 0x0004, lo: 0x09},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x0091, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0140, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0095, lo: 0xb2, hi: 0xb2},\n\t{value: 0x00a5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0179, lo: 0xb4, hi: 0xb4},\n\t{value: 0x017f, lo: 0xb5, hi: 0xb5},\n\t{value: 0x018b, lo: 0xb6, hi: 0xb6},\n\t{value: 0x00af, lo: 0xb7, hi: 0xb8},\n\t// Block 0x3, offset 0x1c\n\t{value: 0x000a, lo: 0x09},\n\t{value: 0x4327, lo: 0x98, hi: 0x98},\n\t{value: 0x432c, lo: 0x99, hi: 0x9a},\n\t{value: 0x434f, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4318, lo: 0x9c, hi: 0x9c},\n\t{value: 0x433b, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0137, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0099, lo: 0xa1, hi: 0xa1},\n\t{value: 0x00a7, lo: 0xa2, hi: 0xa3},\n\t{value: 0x01b8, lo: 0xa4, hi: 0xa4},\n\t// Block 0x4, offset 0x26\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0xa000, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3704, lo: 0x90, hi: 0x90},\n\t{value: 0x3710, lo: 0x91, hi: 0x91},\n\t{value: 0x36fe, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x96, hi: 0x96},\n\t{value: 0x3776, lo: 0x97, hi: 0x97},\n\t{value: 0x3740, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3728, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3752, lo: 0x9e, hi: 0x9e},\n\t{value: 0xa000, lo: 0xb4, hi: 0xb5},\n\t{value: 0x377c, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3782, lo: 0xb7, hi: 0xb7},\n\t// Block 0x5, offset 0x36\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x83, hi: 0x87},\n\t// Block 0x6, offset 0x38\n\t{value: 0x0001, lo: 0x04},\n\t{value: 0x8114, lo: 0x81, hi: 0x82},\n\t{value: 0x8133, lo: 0x84, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t{value: 0x810e, lo: 0x87, hi: 0x87},\n\t// Block 0x7, offset 0x3d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x97},\n\t{value: 0x811a, lo: 0x98, hi: 0x98},\n\t{value: 0x811b, lo: 0x99, hi: 0x99},\n\t{value: 0x811c, lo: 0x9a, hi: 0x9a},\n\t{value: 0x37a0, lo: 0xa2, hi: 0xa2},\n\t{value: 0x37a6, lo: 0xa3, hi: 0xa3},\n\t{value: 0x37b2, lo: 0xa4, hi: 0xa4},\n\t{value: 0x37ac, lo: 0xa5, hi: 0xa5},\n\t{value: 0x37b8, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xa7, hi: 0xa7},\n\t// Block 0x8, offset 0x48\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x37ca, lo: 0x80, hi: 0x80},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0x37be, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x37c4, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x95, hi: 0x95},\n\t{value: 0x8133, lo: 0x96, hi: 0x9c},\n\t{value: 0x8133, lo: 0x9f, hi: 0xa2},\n\t{value: 0x812e, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa8},\n\t{value: 0x812e, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t// Block 0x9, offset 0x57\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x8120, lo: 0x91, hi: 0x91},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x812e, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb6},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb9},\n\t{value: 0x8133, lo: 0xba, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbc},\n\t{value: 0x8133, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbe, hi: 0xbe},\n\t{value: 0x8133, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa, offset 0x64\n\t{value: 0x0005, lo: 0x07},\n\t{value: 0x8133, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x812e, lo: 0x82, hi: 0x83},\n\t{value: 0x812e, lo: 0x84, hi: 0x85},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x812e, lo: 0x88, hi: 0x89},\n\t{value: 0x8133, lo: 0x8a, hi: 0x8a},\n\t// Block 0xb, offset 0x6c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xab, hi: 0xb1},\n\t{value: 0x812e, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8133, lo: 0xb3, hi: 0xb3},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0xc, offset 0x71\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0x96, hi: 0x99},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa7},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0xd, offset 0x76\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t// Block 0xe, offset 0x78\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0x98, hi: 0x98},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t{value: 0x8133, lo: 0x9c, hi: 0x9f},\n\t// Block 0xf, offset 0x7c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3e37, lo: 0xa9, hi: 0xa9},\n\t{value: 0xa000, lo: 0xb0, hi: 0xb0},\n\t{value: 0x3e3f, lo: 0xb1, hi: 0xb1},\n\t{value: 0xa000, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3e47, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9903, lo: 0xbc, hi: 0xbc},\n\t// Block 0x10, offset 0x84\n\t{value: 0x0008, lo: 0x06},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x91, hi: 0x91},\n\t{value: 0x812e, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x93, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x94},\n\t{value: 0x45d5, lo: 0x98, hi: 0x9f},\n\t// Block 0x11, offset 0x8b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x12, offset 0x8e\n\t{value: 0x0008, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e4f, lo: 0x8b, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x4615, lo: 0x9c, hi: 0x9d},\n\t{value: 0x4625, lo: 0x9f, hi: 0x9f},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbe},\n\t// Block 0x13, offset 0x96\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x464d, lo: 0xb3, hi: 0xb3},\n\t{value: 0x4655, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x14, offset 0x9a\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x462d, lo: 0x99, hi: 0x9b},\n\t{value: 0x4645, lo: 0x9e, hi: 0x9e},\n\t// Block 0x15, offset 0x9e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x16, offset 0xa0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t// Block 0x17, offset 0xa2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e67, lo: 0x88, hi: 0x88},\n\t{value: 0x3e5f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e6f, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x96, hi: 0x97},\n\t{value: 0x465d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x4665, lo: 0x9d, hi: 0x9d},\n\t// Block 0x18, offset 0xab\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x3e77, lo: 0x94, hi: 0x94},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x19, offset 0xaf\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3e7f, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3e8f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e87, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1a, offset 0xb6\n\t{value: 0x1801, lo: 0x04},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3e97, lo: 0x88, hi: 0x88},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8121, lo: 0x95, hi: 0x96},\n\t// Block 0x1b, offset 0xbb\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa000, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1c, offset 0xbe\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3e9f, lo: 0x80, hi: 0x80},\n\t{value: 0x9900, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3ea7, lo: 0x87, hi: 0x87},\n\t{value: 0x3eaf, lo: 0x88, hi: 0x88},\n\t{value: 0x4adf, lo: 0x8a, hi: 0x8a},\n\t{value: 0x42f9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x95, hi: 0x96},\n\t// Block 0x1d, offset 0xc8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1e, offset 0xcb\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3eb7, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3ec7, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3ebf, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1f, offset 0xd2\n\t{value: 0x5a29, lo: 0x07},\n\t{value: 0x9905, lo: 0x8a, hi: 0x8a},\n\t{value: 0x9900, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x3ecf, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4ae7, lo: 0x9c, hi: 0x9c},\n\t{value: 0x4304, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3ed7, lo: 0x9e, hi: 0x9f},\n\t// Block 0x20, offset 0xda\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x2751, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8123, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x21, offset 0xde\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8124, lo: 0x88, hi: 0x8b},\n\t// Block 0x22, offset 0xe0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x2766, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8125, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x23, offset 0xe4\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8126, lo: 0x88, hi: 0x8b},\n\t{value: 0x2758, lo: 0x9c, hi: 0x9c},\n\t{value: 0x275f, lo: 0x9d, hi: 0x9d},\n\t// Block 0x24, offset 0xe8\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x03fe, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x98, hi: 0x99},\n\t{value: 0x812e, lo: 0xb5, hi: 0xb5},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb7},\n\t{value: 0x812c, lo: 0xb9, hi: 0xb9},\n\t// Block 0x25, offset 0xee\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x2774, lo: 0x83, hi: 0x83},\n\t{value: 0x277b, lo: 0x8d, hi: 0x8d},\n\t{value: 0x2782, lo: 0x92, hi: 0x92},\n\t{value: 0x2789, lo: 0x97, hi: 0x97},\n\t{value: 0x2790, lo: 0x9c, hi: 0x9c},\n\t{value: 0x276d, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8127, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8128, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4bc5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8129, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4bce, lo: 0xb5, hi: 0xb5},\n\t{value: 0x466d, lo: 0xb6, hi: 0xb6},\n\t{value: 0x4725, lo: 0xb7, hi: 0xb7},\n\t{value: 0x4675, lo: 0xb8, hi: 0xb8},\n\t{value: 0x4730, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8128, lo: 0xba, hi: 0xbd},\n\t// Block 0x26, offset 0xff\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x8128, lo: 0x80, hi: 0x80},\n\t{value: 0x4bd7, lo: 0x81, hi: 0x81},\n\t{value: 0x8133, lo: 0x82, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0x86, hi: 0x87},\n\t{value: 0x279e, lo: 0x93, hi: 0x93},\n\t{value: 0x27a5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x27ac, lo: 0xa2, hi: 0xa2},\n\t{value: 0x27b3, lo: 0xa7, hi: 0xa7},\n\t{value: 0x27ba, lo: 0xac, hi: 0xac},\n\t{value: 0x2797, lo: 0xb9, hi: 0xb9},\n\t// Block 0x27, offset 0x10b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x86, hi: 0x86},\n\t// Block 0x28, offset 0x10d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3edf, lo: 0xa6, hi: 0xa6},\n\t{value: 0x9900, lo: 0xae, hi: 0xae},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x29, offset 0x113\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t// Block 0x2a, offset 0x115\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0402, lo: 0xbc, hi: 0xbc},\n\t// Block 0x2b, offset 0x117\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x80, hi: 0x92},\n\t// Block 0x2c, offset 0x119\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xb900, lo: 0xa1, hi: 0xb5},\n\t// Block 0x2d, offset 0x11b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0xa8, hi: 0xbf},\n\t// Block 0x2e, offset 0x11d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0x80, hi: 0x82},\n\t// Block 0x2f, offset 0x11f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9f},\n\t// Block 0x30, offset 0x121\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x94, hi: 0x95},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x31, offset 0x124\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9d},\n\t// Block 0x32, offset 0x127\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8132, lo: 0xa9, hi: 0xa9},\n\t// Block 0x33, offset 0x129\n\t{value: 0x0004, lo: 0x02},\n\t{value: 0x812f, lo: 0xb9, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbb},\n\t// Block 0x34, offset 0x12c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x97, hi: 0x97},\n\t{value: 0x812e, lo: 0x98, hi: 0x98},\n\t// Block 0x35, offset 0x12f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8133, lo: 0xb5, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x36, offset 0x133\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t{value: 0x812e, lo: 0xb5, hi: 0xba},\n\t{value: 0x8133, lo: 0xbb, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x37, offset 0x139\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x812e, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x8133, lo: 0x8b, hi: 0x8e},\n\t// Block 0x38, offset 0x140\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3f27, lo: 0x80, hi: 0x80},\n\t{value: 0x3f2f, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x3f37, lo: 0x83, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xab, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xac},\n\t{value: 0x8133, lo: 0xad, hi: 0xb3},\n\t// Block 0x39, offset 0x149\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xaa, hi: 0xab},\n\t// Block 0x3a, offset 0x14b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8105, lo: 0xb2, hi: 0xb3},\n\t// Block 0x3b, offset 0x14e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x3c, offset 0x150\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x92},\n\t{value: 0x8101, lo: 0x94, hi: 0x94},\n\t{value: 0x812e, lo: 0x95, hi: 0x99},\n\t{value: 0x8133, lo: 0x9a, hi: 0x9b},\n\t{value: 0x812e, lo: 0x9c, hi: 0x9f},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8101, lo: 0xa2, hi: 0xa8},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t{value: 0x8133, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb9},\n\t// Block 0x3d, offset 0x15b\n\t{value: 0x0002, lo: 0x0a},\n\t{value: 0x0043, lo: 0xac, hi: 0xac},\n\t{value: 0x00d1, lo: 0xad, hi: 0xad},\n\t{value: 0x0045, lo: 0xae, hi: 0xae},\n\t{value: 0x0049, lo: 0xb0, hi: 0xb1},\n\t{value: 0x00ec, lo: 0xb2, hi: 0xb2},\n\t{value: 0x004f, lo: 0xb3, hi: 0xba},\n\t{value: 0x005f, lo: 0xbc, hi: 0xbc},\n\t{value: 0x00fe, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0061, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0065, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3e, offset 0x166\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0001, lo: 0x80, hi: 0x8a},\n\t{value: 0x0532, lo: 0x91, hi: 0x91},\n\t{value: 0x4354, lo: 0x97, hi: 0x97},\n\t{value: 0x001d, lo: 0xa4, hi: 0xa4},\n\t{value: 0x19a0, lo: 0xa5, hi: 0xa5},\n\t{value: 0x1c8c, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0001, lo: 0xaf, hi: 0xaf},\n\t{value: 0x27c1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2935, lo: 0xb4, hi: 0xb4},\n\t{value: 0x27c8, lo: 0xb6, hi: 0xb6},\n\t{value: 0x293f, lo: 0xb7, hi: 0xb7},\n\t{value: 0x199a, lo: 0xbc, hi: 0xbc},\n\t{value: 0x4322, lo: 0xbe, hi: 0xbe},\n\t// Block 0x3f, offset 0x174\n\t{value: 0x0002, lo: 0x0d},\n\t{value: 0x1a60, lo: 0x87, hi: 0x87},\n\t{value: 0x1a5d, lo: 0x88, hi: 0x88},\n\t{value: 0x199d, lo: 0x89, hi: 0x89},\n\t{value: 0x2ac5, lo: 0x97, hi: 0x97},\n\t{value: 0x0001, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0021, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0093, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0029, lo: 0xb4, hi: 0xb9},\n\t{value: 0x0017, lo: 0xba, hi: 0xba},\n\t{value: 0x055e, lo: 0xbb, hi: 0xbb},\n\t{value: 0x003b, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0011, lo: 0xbd, hi: 0xbe},\n\t{value: 0x009d, lo: 0xbf, hi: 0xbf},\n\t// Block 0x40, offset 0x182\n\t{value: 0x0002, lo: 0x0f},\n\t{value: 0x0021, lo: 0x80, hi: 0x89},\n\t{value: 0x0017, lo: 0x8a, hi: 0x8a},\n\t{value: 0x055e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x003b, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0011, lo: 0x8d, hi: 0x8e},\n\t{value: 0x0083, lo: 0x90, hi: 0x90},\n\t{value: 0x008b, lo: 0x91, hi: 0x91},\n\t{value: 0x009f, lo: 0x92, hi: 0x92},\n\t{value: 0x00b1, lo: 0x93, hi: 0x93},\n\t{value: 0x011f, lo: 0x94, hi: 0x94},\n\t{value: 0x0091, lo: 0x95, hi: 0x95},\n\t{value: 0x0097, lo: 0x96, hi: 0x99},\n\t{value: 0x00a1, lo: 0x9a, hi: 0x9a},\n\t{value: 0x00a7, lo: 0x9b, hi: 0x9c},\n\t{value: 0x1ac9, lo: 0xa8, hi: 0xa8},\n\t// Block 0x41, offset 0x192\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x8133, lo: 0x90, hi: 0x91},\n\t{value: 0x8101, lo: 0x92, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x97},\n\t{value: 0x8101, lo: 0x98, hi: 0x9a},\n\t{value: 0x8133, lo: 0x9b, hi: 0x9c},\n\t{value: 0x8133, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8101, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa7},\n\t{value: 0x812e, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8133, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8101, lo: 0xaa, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t// Block 0x42, offset 0x1a0\n\t{value: 0x0007, lo: 0x06},\n\t{value: 0x22b0, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t{value: 0x3b18, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3b26, lo: 0xae, hi: 0xae},\n\t// Block 0x43, offset 0x1a7\n\t{value: 0x000e, lo: 0x05},\n\t{value: 0x3b2d, lo: 0x8d, hi: 0x8e},\n\t{value: 0x3b34, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t// Block 0x44, offset 0x1ad\n\t{value: 0x017a, lo: 0x0e},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0x3b42, lo: 0x84, hi: 0x84},\n\t{value: 0xa000, lo: 0x88, hi: 0x88},\n\t{value: 0x3b49, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3b50, lo: 0x8c, hi: 0x8c},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3b57, lo: 0xa4, hi: 0xa4},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3b5e, lo: 0xa6, hi: 0xa6},\n\t{value: 0x27cf, lo: 0xac, hi: 0xad},\n\t{value: 0x27d6, lo: 0xaf, hi: 0xaf},\n\t{value: 0x2953, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xbc, hi: 0xbc},\n\t// Block 0x45, offset 0x1bc\n\t{value: 0x0007, lo: 0x03},\n\t{value: 0x3bc7, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3bf1, lo: 0xa2, hi: 0xa3},\n\t{value: 0x3c1b, lo: 0xaa, hi: 0xad},\n\t// Block 0x46, offset 0x1c0\n\t{value: 0x0004, lo: 0x01},\n\t{value: 0x0586, lo: 0xa9, hi: 0xaa},\n\t// Block 0x47, offset 0x1c2\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x0057, lo: 0x80, hi: 0x8f},\n\t{value: 0x0083, lo: 0x90, hi: 0xa9},\n\t{value: 0x0021, lo: 0xaa, hi: 0xaa},\n\t// Block 0x48, offset 0x1c6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x2ad2, lo: 0x8c, hi: 0x8c},\n\t// Block 0x49, offset 0x1c8\n\t{value: 0x0266, lo: 0x02},\n\t{value: 0x1cbc, lo: 0xb4, hi: 0xb4},\n\t{value: 0x1a5a, lo: 0xb5, hi: 0xb6},\n\t// Block 0x4a, offset 0x1cb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x4596, lo: 0x9c, hi: 0x9c},\n\t// Block 0x4b, offset 0x1cd\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0095, lo: 0xbc, hi: 0xbc},\n\t{value: 0x006d, lo: 0xbd, hi: 0xbd},\n\t// Block 0x4c, offset 0x1d0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xaf, hi: 0xb1},\n\t// Block 0x4d, offset 0x1d2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x057a, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x4e, offset 0x1d5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa0, hi: 0xbf},\n\t// Block 0x4f, offset 0x1d7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0ebe, lo: 0x9f, hi: 0x9f},\n\t// Block 0x50, offset 0x1d9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x172a, lo: 0xb3, hi: 0xb3},\n\t// Block 0x51, offset 0x1db\n\t{value: 0x0004, lo: 0x0b},\n\t{value: 0x1692, lo: 0x80, hi: 0x82},\n\t{value: 0x16aa, lo: 0x83, hi: 0x83},\n\t{value: 0x16c2, lo: 0x84, hi: 0x85},\n\t{value: 0x16d2, lo: 0x86, hi: 0x89},\n\t{value: 0x16e6, lo: 0x8a, hi: 0x8c},\n\t{value: 0x16fa, lo: 0x8d, hi: 0x8d},\n\t{value: 0x1702, lo: 0x8e, hi: 0x8e},\n\t{value: 0x170a, lo: 0x8f, hi: 0x90},\n\t{value: 0x1716, lo: 0x91, hi: 0x93},\n\t{value: 0x1726, lo: 0x94, hi: 0x94},\n\t{value: 0x172e, lo: 0x95, hi: 0x95},\n\t// Block 0x52, offset 0x1e7\n\t{value: 0x0004, lo: 0x09},\n\t{value: 0x0001, lo: 0x80, hi: 0x80},\n\t{value: 0x812d, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8132, lo: 0xab, hi: 0xab},\n\t{value: 0x8134, lo: 0xac, hi: 0xac},\n\t{value: 0x812f, lo: 0xad, hi: 0xad},\n\t{value: 0x8130, lo: 0xae, hi: 0xae},\n\t{value: 0x8130, lo: 0xaf, hi: 0xaf},\n\t{value: 0x05ae, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0982, lo: 0xb8, hi: 0xba},\n\t// Block 0x53, offset 0x1f1\n\t{value: 0x0006, lo: 0x09},\n\t{value: 0x0406, lo: 0xb1, hi: 0xb1},\n\t{value: 0x040a, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4b7c, lo: 0xb3, hi: 0xb3},\n\t{value: 0x040e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4b82, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0412, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0416, lo: 0xb8, hi: 0xb8},\n\t{value: 0x041a, lo: 0xb9, hi: 0xb9},\n\t{value: 0x4b8e, lo: 0xba, hi: 0xbf},\n\t// Block 0x54, offset 0x1fb\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb4, hi: 0xbd},\n\t// Block 0x55, offset 0x1fe\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x02d8, lo: 0x9c, hi: 0x9c},\n\t{value: 0x02de, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9f},\n\t// Block 0x56, offset 0x202\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb1},\n\t// Block 0x57, offset 0x204\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x173e, lo: 0xb0, hi: 0xb0},\n\t// Block 0x58, offset 0x206\n\t{value: 0x0006, lo: 0x04},\n\t{value: 0x0047, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0063, lo: 0xb4, hi: 0xb4},\n\t{value: 0x00dd, lo: 0xb8, hi: 0xb8},\n\t{value: 0x00e9, lo: 0xb9, hi: 0xb9},\n\t// Block 0x59, offset 0x20b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xac, hi: 0xac},\n\t// Block 0x5a, offset 0x20e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xa0, hi: 0xb1},\n\t// Block 0x5b, offset 0x211\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xab, hi: 0xad},\n\t// Block 0x5c, offset 0x213\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x93, hi: 0x93},\n\t// Block 0x5d, offset 0x215\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb3, hi: 0xb3},\n\t// Block 0x5e, offset 0x217\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t// Block 0x5f, offset 0x219\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb7, hi: 0xb8},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbf},\n\t// Block 0x60, offset 0x21f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t// Block 0x61, offset 0x222\n\t{value: 0x000c, lo: 0x04},\n\t{value: 0x173a, lo: 0x9c, hi: 0x9d},\n\t{value: 0x014f, lo: 0x9e, hi: 0x9e},\n\t{value: 0x174a, lo: 0x9f, hi: 0x9f},\n\t{value: 0x01a6, lo: 0xa9, hi: 0xa9},\n\t// Block 0x62, offset 0x227\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xad, hi: 0xad},\n\t// Block 0x63, offset 0x229\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe500, lo: 0x80, hi: 0x80},\n\t{value: 0xc600, lo: 0x81, hi: 0x9b},\n\t{value: 0xe500, lo: 0x9c, hi: 0x9c},\n\t{value: 0xc600, lo: 0x9d, hi: 0xb7},\n\t{value: 0xe500, lo: 0xb8, hi: 0xb8},\n\t{value: 0xc600, lo: 0xb9, hi: 0xbf},\n\t// Block 0x64, offset 0x230\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x93},\n\t{value: 0xe500, lo: 0x94, hi: 0x94},\n\t{value: 0xc600, lo: 0x95, hi: 0xaf},\n\t{value: 0xe500, lo: 0xb0, hi: 0xb0},\n\t{value: 0xc600, lo: 0xb1, hi: 0xbf},\n\t// Block 0x65, offset 0x236\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8b},\n\t{value: 0xe500, lo: 0x8c, hi: 0x8c},\n\t{value: 0xc600, lo: 0x8d, hi: 0xa7},\n\t{value: 0xe500, lo: 0xa8, hi: 0xa8},\n\t{value: 0xc600, lo: 0xa9, hi: 0xbf},\n\t// Block 0x66, offset 0x23c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xc600, lo: 0x80, hi: 0x83},\n\t{value: 0xe500, lo: 0x84, hi: 0x84},\n\t{value: 0xc600, lo: 0x85, hi: 0x9f},\n\t{value: 0xe500, lo: 0xa0, hi: 0xa0},\n\t{value: 0xc600, lo: 0xa1, hi: 0xbb},\n\t{value: 0xe500, lo: 0xbc, hi: 0xbc},\n\t{value: 0xc600, lo: 0xbd, hi: 0xbf},\n\t// Block 0x67, offset 0x244\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x97},\n\t{value: 0xe500, lo: 0x98, hi: 0x98},\n\t{value: 0xc600, lo: 0x99, hi: 0xb3},\n\t{value: 0xe500, lo: 0xb4, hi: 0xb4},\n\t{value: 0xc600, lo: 0xb5, hi: 0xbf},\n\t// Block 0x68, offset 0x24a\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8f},\n\t{value: 0xe500, lo: 0x90, hi: 0x90},\n\t{value: 0xc600, lo: 0x91, hi: 0xab},\n\t{value: 0xe500, lo: 0xac, hi: 0xac},\n\t{value: 0xc600, lo: 0xad, hi: 0xbf},\n\t// Block 0x69, offset 0x250\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t{value: 0xe500, lo: 0xa4, hi: 0xa4},\n\t{value: 0xc600, lo: 0xa5, hi: 0xbf},\n\t// Block 0x6a, offset 0x256\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t// Block 0x6b, offset 0x25a\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x0003, lo: 0x81, hi: 0xbf},\n\t// Block 0x6c, offset 0x25c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0x6d, offset 0x25e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xa0, hi: 0xa0},\n\t// Block 0x6e, offset 0x260\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb6, hi: 0xba},\n\t// Block 0x6f, offset 0x262\n\t{value: 0x002d, lo: 0x05},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8101, lo: 0xb9, hi: 0xba},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x70, offset 0x268\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t// Block 0x71, offset 0x26b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa7},\n\t// Block 0x72, offset 0x26d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t// Block 0x73, offset 0x26f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbf},\n\t// Block 0x74, offset 0x271\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x8133, lo: 0x88, hi: 0x8a},\n\t{value: 0x812e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8133, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x8d, hi: 0x90},\n\t// Block 0x75, offset 0x277\n\t{value: 0x0005, lo: 0x03},\n\t{value: 0x8133, lo: 0x82, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t// Block 0x76, offset 0x27b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x77, offset 0x27f\n\t{value: 0x17fe, lo: 0x07},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x4277, lo: 0x9a, hi: 0x9a},\n\t{value: 0xa000, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4281, lo: 0x9c, hi: 0x9c},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x428b, lo: 0xab, hi: 0xab},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x78, offset 0x287\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x8133, lo: 0x80, hi: 0x82},\n\t{value: 0x9900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4295, lo: 0xae, hi: 0xae},\n\t{value: 0x429f, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb1, hi: 0xb2},\n\t{value: 0x8105, lo: 0xb3, hi: 0xb4},\n\t// Block 0x79, offset 0x28e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0x7a, offset 0x291\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb5, hi: 0xb5},\n\t{value: 0x8103, lo: 0xb6, hi: 0xb6},\n\t// Block 0x7b, offset 0x294\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x8103, lo: 0xa9, hi: 0xaa},\n\t// Block 0x7c, offset 0x296\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x7d, offset 0x299\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x42a9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42b3, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x8133, lo: 0xa6, hi: 0xac},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t// Block 0x7e, offset 0x2a1\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x86, hi: 0x86},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9e},\n\t// Block 0x7f, offset 0x2a5\n\t{value: 0x5643, lo: 0x06},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb9, hi: 0xb9},\n\t{value: 0x9900, lo: 0xba, hi: 0xba},\n\t{value: 0x42c7, lo: 0xbb, hi: 0xbb},\n\t{value: 0x42bd, lo: 0xbc, hi: 0xbd},\n\t{value: 0x42d1, lo: 0xbe, hi: 0xbe},\n\t// Block 0x80, offset 0x2ac\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x81, offset 0x2af\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x9900, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb8, hi: 0xb9},\n\t{value: 0x42db, lo: 0xba, hi: 0xba},\n\t{value: 0x42e5, lo: 0xbb, hi: 0xbb},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x82, offset 0x2b5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x80, hi: 0x80},\n\t// Block 0x83, offset 0x2b7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x84, offset 0x2b9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x85, offset 0x2bc\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xab, hi: 0xab},\n\t// Block 0x86, offset 0x2be\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8103, lo: 0xba, hi: 0xba},\n\t// Block 0x87, offset 0x2c1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb5, hi: 0xb5},\n\t{value: 0x42ef, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8105, lo: 0xbd, hi: 0xbe},\n\t// Block 0x88, offset 0x2c6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x89, offset 0x2c8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t// Block 0x8a, offset 0x2ca\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x8b, offset 0x2cc\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x87, hi: 0x87},\n\t// Block 0x8c, offset 0x2ce\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x99, hi: 0x99},\n\t// Block 0x8d, offset 0x2d0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0x82, hi: 0x82},\n\t{value: 0x8105, lo: 0x84, hi: 0x85},\n\t// Block 0x8e, offset 0x2d3\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x97, hi: 0x97},\n\t// Block 0x8f, offset 0x2d5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x81, hi: 0x82},\n\t// Block 0x90, offset 0x2d7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0xb0, hi: 0xb4},\n\t// Block 0x91, offset 0x2d9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb6},\n\t// Block 0x92, offset 0x2db\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8102, lo: 0xb0, hi: 0xb1},\n\t// Block 0x93, offset 0x2dd\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0x9e, hi: 0x9e},\n\t// Block 0x94, offset 0x2df\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x46fd, lo: 0x9e, hi: 0x9e},\n\t{value: 0x4707, lo: 0x9f, hi: 0x9f},\n\t{value: 0x473b, lo: 0xa0, hi: 0xa0},\n\t{value: 0x4749, lo: 0xa1, hi: 0xa1},\n\t{value: 0x4757, lo: 0xa2, hi: 0xa2},\n\t{value: 0x4765, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4773, lo: 0xa4, hi: 0xa4},\n\t{value: 0x812c, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8101, lo: 0xa7, hi: 0xa9},\n\t{value: 0x8131, lo: 0xad, hi: 0xad},\n\t{value: 0x812c, lo: 0xae, hi: 0xb2},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbf},\n\t// Block 0x95, offset 0x2ec\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x812e, lo: 0x80, hi: 0x82},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8b},\n\t{value: 0x8133, lo: 0xaa, hi: 0xad},\n\t{value: 0x4711, lo: 0xbb, hi: 0xbb},\n\t{value: 0x471b, lo: 0xbc, hi: 0xbc},\n\t{value: 0x4781, lo: 0xbd, hi: 0xbd},\n\t{value: 0x479d, lo: 0xbe, hi: 0xbe},\n\t{value: 0x478f, lo: 0xbf, hi: 0xbf},\n\t// Block 0x96, offset 0x2f6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x47ab, lo: 0x80, hi: 0x80},\n\t// Block 0x97, offset 0x2f8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x82, hi: 0x84},\n\t// Block 0x98, offset 0x2fa\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x0043, lo: 0x80, hi: 0x99},\n\t{value: 0x0083, lo: 0x9a, hi: 0xb3},\n\t{value: 0x0043, lo: 0xb4, hi: 0xbf},\n\t// Block 0x99, offset 0x2fe\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x005b, lo: 0x80, hi: 0x8d},\n\t{value: 0x0083, lo: 0x8e, hi: 0x94},\n\t{value: 0x0093, lo: 0x96, hi: 0xa7},\n\t{value: 0x0043, lo: 0xa8, hi: 0xbf},\n\t// Block 0x9a, offset 0x303\n\t{value: 0x0002, lo: 0x0b},\n\t{value: 0x0073, lo: 0x80, hi: 0x81},\n\t{value: 0x0083, lo: 0x82, hi: 0x9b},\n\t{value: 0x0043, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0047, lo: 0x9e, hi: 0x9f},\n\t{value: 0x004f, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0055, lo: 0xa5, hi: 0xa6},\n\t{value: 0x005d, lo: 0xa9, hi: 0xac},\n\t{value: 0x0067, lo: 0xae, hi: 0xb5},\n\t{value: 0x0083, lo: 0xb6, hi: 0xb9},\n\t{value: 0x008d, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0091, lo: 0xbd, hi: 0xbf},\n\t// Block 0x9b, offset 0x30f\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x0097, lo: 0x80, hi: 0x83},\n\t{value: 0x00a1, lo: 0x85, hi: 0x8f},\n\t{value: 0x0043, lo: 0x90, hi: 0xa9},\n\t{value: 0x0083, lo: 0xaa, hi: 0xbf},\n\t// Block 0x9c, offset 0x314\n\t{value: 0x0002, lo: 0x08},\n\t{value: 0x00af, lo: 0x80, hi: 0x83},\n\t{value: 0x0043, lo: 0x84, hi: 0x85},\n\t{value: 0x0049, lo: 0x87, hi: 0x8a},\n\t{value: 0x0055, lo: 0x8d, hi: 0x94},\n\t{value: 0x0067, lo: 0x96, hi: 0x9c},\n\t{value: 0x0083, lo: 0x9e, hi: 0xb7},\n\t{value: 0x0043, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0049, lo: 0xbb, hi: 0xbe},\n\t// Block 0x9d, offset 0x31d\n\t{value: 0x0002, lo: 0x05},\n\t{value: 0x0053, lo: 0x80, hi: 0x84},\n\t{value: 0x005f, lo: 0x86, hi: 0x86},\n\t{value: 0x0067, lo: 0x8a, hi: 0x90},\n\t{value: 0x0083, lo: 0x92, hi: 0xab},\n\t{value: 0x0043, lo: 0xac, hi: 0xbf},\n\t// Block 0x9e, offset 0x323\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x006b, lo: 0x80, hi: 0x85},\n\t{value: 0x0083, lo: 0x86, hi: 0x9f},\n\t{value: 0x0043, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0083, lo: 0xba, hi: 0xbf},\n\t// Block 0x9f, offset 0x328\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x008f, lo: 0x80, hi: 0x93},\n\t{value: 0x0043, lo: 0x94, hi: 0xad},\n\t{value: 0x0083, lo: 0xae, hi: 0xbf},\n\t// Block 0xa0, offset 0x32c\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x00a7, lo: 0x80, hi: 0x87},\n\t{value: 0x0043, lo: 0x88, hi: 0xa1},\n\t{value: 0x0083, lo: 0xa2, hi: 0xbb},\n\t{value: 0x0043, lo: 0xbc, hi: 0xbf},\n\t// Block 0xa1, offset 0x331\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x004b, lo: 0x80, hi: 0x95},\n\t{value: 0x0083, lo: 0x96, hi: 0xaf},\n\t{value: 0x0043, lo: 0xb0, hi: 0xbf},\n\t// Block 0xa2, offset 0x335\n\t{value: 0x0003, lo: 0x0f},\n\t{value: 0x023c, lo: 0x80, hi: 0x80},\n\t{value: 0x0556, lo: 0x81, hi: 0x81},\n\t{value: 0x023f, lo: 0x82, hi: 0x9a},\n\t{value: 0x0552, lo: 0x9b, hi: 0x9b},\n\t{value: 0x024b, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0254, lo: 0x9d, hi: 0x9d},\n\t{value: 0x025a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x027e, lo: 0x9f, hi: 0x9f},\n\t{value: 0x026f, lo: 0xa0, hi: 0xa0},\n\t{value: 0x026c, lo: 0xa1, hi: 0xa1},\n\t{value: 0x01f7, lo: 0xa2, hi: 0xb2},\n\t{value: 0x020c, lo: 0xb3, hi: 0xb3},\n\t{value: 0x022a, lo: 0xb4, hi: 0xba},\n\t{value: 0x0556, lo: 0xbb, hi: 0xbb},\n\t{value: 0x023f, lo: 0xbc, hi: 0xbf},\n\t// Block 0xa3, offset 0x345\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x024b, lo: 0x80, hi: 0x94},\n\t{value: 0x0552, lo: 0x95, hi: 0x95},\n\t{value: 0x024b, lo: 0x96, hi: 0x96},\n\t{value: 0x0254, lo: 0x97, hi: 0x97},\n\t{value: 0x025a, lo: 0x98, hi: 0x98},\n\t{value: 0x027e, lo: 0x99, hi: 0x99},\n\t{value: 0x026f, lo: 0x9a, hi: 0x9a},\n\t{value: 0x026c, lo: 0x9b, hi: 0x9b},\n\t{value: 0x01f7, lo: 0x9c, hi: 0xac},\n\t{value: 0x020c, lo: 0xad, hi: 0xad},\n\t{value: 0x022a, lo: 0xae, hi: 0xb4},\n\t{value: 0x0556, lo: 0xb5, hi: 0xb5},\n\t{value: 0x023f, lo: 0xb6, hi: 0xbf},\n\t// Block 0xa4, offset 0x353\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x025d, lo: 0x80, hi: 0x8e},\n\t{value: 0x0552, lo: 0x8f, hi: 0x8f},\n\t{value: 0x024b, lo: 0x90, hi: 0x90},\n\t{value: 0x0254, lo: 0x91, hi: 0x91},\n\t{value: 0x025a, lo: 0x92, hi: 0x92},\n\t{value: 0x027e, lo: 0x93, hi: 0x93},\n\t{value: 0x026f, lo: 0x94, hi: 0x94},\n\t{value: 0x026c, lo: 0x95, hi: 0x95},\n\t{value: 0x01f7, lo: 0x96, hi: 0xa6},\n\t{value: 0x020c, lo: 0xa7, hi: 0xa7},\n\t{value: 0x022a, lo: 0xa8, hi: 0xae},\n\t{value: 0x0556, lo: 0xaf, hi: 0xaf},\n\t{value: 0x023f, lo: 0xb0, hi: 0xbf},\n\t// Block 0xa5, offset 0x361\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x026f, lo: 0x80, hi: 0x88},\n\t{value: 0x0552, lo: 0x89, hi: 0x89},\n\t{value: 0x024b, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0254, lo: 0x8b, hi: 0x8b},\n\t{value: 0x025a, lo: 0x8c, hi: 0x8c},\n\t{value: 0x027e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x026f, lo: 0x8e, hi: 0x8e},\n\t{value: 0x026c, lo: 0x8f, hi: 0x8f},\n\t{value: 0x01f7, lo: 0x90, hi: 0xa0},\n\t{value: 0x020c, lo: 0xa1, hi: 0xa1},\n\t{value: 0x022a, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0556, lo: 0xa9, hi: 0xa9},\n\t{value: 0x023f, lo: 0xaa, hi: 0xbf},\n\t// Block 0xa6, offset 0x36f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t// Block 0xa7, offset 0x371\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t// Block 0xa8, offset 0x373\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xac, hi: 0xaf},\n\t// Block 0xa9, offset 0x375\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8134, lo: 0xac, hi: 0xad},\n\t{value: 0x812e, lo: 0xae, hi: 0xae},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t// Block 0xaa, offset 0x379\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x90, hi: 0x96},\n\t// Block 0xab, offset 0x37b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x84, hi: 0x89},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0xac, offset 0x37e\n\t{value: 0x0002, lo: 0x0a},\n\t{value: 0x0063, lo: 0x80, hi: 0x89},\n\t{value: 0x1a7e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x1ab1, lo: 0x8b, hi: 0x8b},\n\t{value: 0x1acc, lo: 0x8c, hi: 0x8c},\n\t{value: 0x1ad2, lo: 0x8d, hi: 0x8d},\n\t{value: 0x1cf0, lo: 0x8e, hi: 0x8e},\n\t{value: 0x1ade, lo: 0x8f, hi: 0x8f},\n\t{value: 0x1aa8, lo: 0xaa, hi: 0xaa},\n\t{value: 0x1aab, lo: 0xab, hi: 0xab},\n\t{value: 0x1aae, lo: 0xac, hi: 0xac},\n\t// Block 0xad, offset 0x389\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x1a6c, lo: 0x90, hi: 0x90},\n\t// Block 0xae, offset 0x38b\n\t{value: 0x0028, lo: 0x09},\n\t{value: 0x2999, lo: 0x80, hi: 0x80},\n\t{value: 0x295d, lo: 0x81, hi: 0x81},\n\t{value: 0x2967, lo: 0x82, hi: 0x82},\n\t{value: 0x297b, lo: 0x83, hi: 0x84},\n\t{value: 0x2985, lo: 0x85, hi: 0x86},\n\t{value: 0x2971, lo: 0x87, hi: 0x87},\n\t{value: 0x298f, lo: 0x88, hi: 0x88},\n\t{value: 0x0c6a, lo: 0x90, hi: 0x90},\n\t{value: 0x09e2, lo: 0x91, hi: 0x91},\n\t// Block 0xaf, offset 0x395\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x0021, lo: 0xb0, hi: 0xb9},\n}\n\n// recompMap: 7528 bytes (entries only)\nvar recompMap map[uint32]rune\nvar recompMapOnce sync.Once\n\nconst recompMapPacked = \"\" +\n\t\"\\x00A\\x03\\x00\\x00\\x00\\x00\\xc0\" + // 0x00410300: 0x000000C0\n\t\"\\x00A\\x03\\x01\\x00\\x00\\x00\\xc1\" + // 0x00410301: 0x000000C1\n\t\"\\x00A\\x03\\x02\\x00\\x00\\x00\\xc2\" + // 0x00410302: 0x000000C2\n\t\"\\x00A\\x03\\x03\\x00\\x00\\x00\\xc3\" + // 0x00410303: 0x000000C3\n\t\"\\x00A\\x03\\b\\x00\\x00\\x00\\xc4\" + // 0x00410308: 0x000000C4\n\t\"\\x00A\\x03\\n\\x00\\x00\\x00\\xc5\" + // 0x0041030A: 0x000000C5\n\t\"\\x00C\\x03'\\x00\\x00\\x00\\xc7\" + // 0x00430327: 0x000000C7\n\t\"\\x00E\\x03\\x00\\x00\\x00\\x00\\xc8\" + // 0x00450300: 0x000000C8\n\t\"\\x00E\\x03\\x01\\x00\\x00\\x00\\xc9\" + // 0x00450301: 0x000000C9\n\t\"\\x00E\\x03\\x02\\x00\\x00\\x00\\xca\" + // 0x00450302: 0x000000CA\n\t\"\\x00E\\x03\\b\\x00\\x00\\x00\\xcb\" + // 0x00450308: 0x000000CB\n\t\"\\x00I\\x03\\x00\\x00\\x00\\x00\\xcc\" + // 0x00490300: 0x000000CC\n\t\"\\x00I\\x03\\x01\\x00\\x00\\x00\\xcd\" + // 0x00490301: 0x000000CD\n\t\"\\x00I\\x03\\x02\\x00\\x00\\x00\\xce\" + // 0x00490302: 0x000000CE\n\t\"\\x00I\\x03\\b\\x00\\x00\\x00\\xcf\" + // 0x00490308: 0x000000CF\n\t\"\\x00N\\x03\\x03\\x00\\x00\\x00\\xd1\" + // 0x004E0303: 0x000000D1\n\t\"\\x00O\\x03\\x00\\x00\\x00\\x00\\xd2\" + // 0x004F0300: 0x000000D2\n\t\"\\x00O\\x03\\x01\\x00\\x00\\x00\\xd3\" + // 0x004F0301: 0x000000D3\n\t\"\\x00O\\x03\\x02\\x00\\x00\\x00\\xd4\" + // 0x004F0302: 0x000000D4\n\t\"\\x00O\\x03\\x03\\x00\\x00\\x00\\xd5\" + // 0x004F0303: 0x000000D5\n\t\"\\x00O\\x03\\b\\x00\\x00\\x00\\xd6\" + // 0x004F0308: 0x000000D6\n\t\"\\x00U\\x03\\x00\\x00\\x00\\x00\\xd9\" + // 0x00550300: 0x000000D9\n\t\"\\x00U\\x03\\x01\\x00\\x00\\x00\\xda\" + // 0x00550301: 0x000000DA\n\t\"\\x00U\\x03\\x02\\x00\\x00\\x00\\xdb\" + // 0x00550302: 0x000000DB\n\t\"\\x00U\\x03\\b\\x00\\x00\\x00\\xdc\" + // 0x00550308: 0x000000DC\n\t\"\\x00Y\\x03\\x01\\x00\\x00\\x00\\xdd\" + // 0x00590301: 0x000000DD\n\t\"\\x00a\\x03\\x00\\x00\\x00\\x00\\xe0\" + // 0x00610300: 0x000000E0\n\t\"\\x00a\\x03\\x01\\x00\\x00\\x00\\xe1\" + // 0x00610301: 0x000000E1\n\t\"\\x00a\\x03\\x02\\x00\\x00\\x00\\xe2\" + // 0x00610302: 0x000000E2\n\t\"\\x00a\\x03\\x03\\x00\\x00\\x00\\xe3\" + // 0x00610303: 0x000000E3\n\t\"\\x00a\\x03\\b\\x00\\x00\\x00\\xe4\" + // 0x00610308: 0x000000E4\n\t\"\\x00a\\x03\\n\\x00\\x00\\x00\\xe5\" + // 0x0061030A: 0x000000E5\n\t\"\\x00c\\x03'\\x00\\x00\\x00\\xe7\" + // 0x00630327: 0x000000E7\n\t\"\\x00e\\x03\\x00\\x00\\x00\\x00\\xe8\" + // 0x00650300: 0x000000E8\n\t\"\\x00e\\x03\\x01\\x00\\x00\\x00\\xe9\" + // 0x00650301: 0x000000E9\n\t\"\\x00e\\x03\\x02\\x00\\x00\\x00\\xea\" + // 0x00650302: 0x000000EA\n\t\"\\x00e\\x03\\b\\x00\\x00\\x00\\xeb\" + // 0x00650308: 0x000000EB\n\t\"\\x00i\\x03\\x00\\x00\\x00\\x00\\xec\" + // 0x00690300: 0x000000EC\n\t\"\\x00i\\x03\\x01\\x00\\x00\\x00\\xed\" + // 0x00690301: 0x000000ED\n\t\"\\x00i\\x03\\x02\\x00\\x00\\x00\\xee\" + // 0x00690302: 0x000000EE\n\t\"\\x00i\\x03\\b\\x00\\x00\\x00\\xef\" + // 0x00690308: 0x000000EF\n\t\"\\x00n\\x03\\x03\\x00\\x00\\x00\\xf1\" + // 0x006E0303: 0x000000F1\n\t\"\\x00o\\x03\\x00\\x00\\x00\\x00\\xf2\" + // 0x006F0300: 0x000000F2\n\t\"\\x00o\\x03\\x01\\x00\\x00\\x00\\xf3\" + // 0x006F0301: 0x000000F3\n\t\"\\x00o\\x03\\x02\\x00\\x00\\x00\\xf4\" + // 0x006F0302: 0x000000F4\n\t\"\\x00o\\x03\\x03\\x00\\x00\\x00\\xf5\" + // 0x006F0303: 0x000000F5\n\t\"\\x00o\\x03\\b\\x00\\x00\\x00\\xf6\" + // 0x006F0308: 0x000000F6\n\t\"\\x00u\\x03\\x00\\x00\\x00\\x00\\xf9\" + // 0x00750300: 0x000000F9\n\t\"\\x00u\\x03\\x01\\x00\\x00\\x00\\xfa\" + // 0x00750301: 0x000000FA\n\t\"\\x00u\\x03\\x02\\x00\\x00\\x00\\xfb\" + // 0x00750302: 0x000000FB\n\t\"\\x00u\\x03\\b\\x00\\x00\\x00\\xfc\" + // 0x00750308: 0x000000FC\n\t\"\\x00y\\x03\\x01\\x00\\x00\\x00\\xfd\" + // 0x00790301: 0x000000FD\n\t\"\\x00y\\x03\\b\\x00\\x00\\x00\\xff\" + // 0x00790308: 0x000000FF\n\t\"\\x00A\\x03\\x04\\x00\\x00\\x01\\x00\" + // 0x00410304: 0x00000100\n\t\"\\x00a\\x03\\x04\\x00\\x00\\x01\\x01\" + // 0x00610304: 0x00000101\n\t\"\\x00A\\x03\\x06\\x00\\x00\\x01\\x02\" + // 0x00410306: 0x00000102\n\t\"\\x00a\\x03\\x06\\x00\\x00\\x01\\x03\" + // 0x00610306: 0x00000103\n\t\"\\x00A\\x03(\\x00\\x00\\x01\\x04\" + // 0x00410328: 0x00000104\n\t\"\\x00a\\x03(\\x00\\x00\\x01\\x05\" + // 0x00610328: 0x00000105\n\t\"\\x00C\\x03\\x01\\x00\\x00\\x01\\x06\" + // 0x00430301: 0x00000106\n\t\"\\x00c\\x03\\x01\\x00\\x00\\x01\\a\" + // 0x00630301: 0x00000107\n\t\"\\x00C\\x03\\x02\\x00\\x00\\x01\\b\" + // 0x00430302: 0x00000108\n\t\"\\x00c\\x03\\x02\\x00\\x00\\x01\\t\" + // 0x00630302: 0x00000109\n\t\"\\x00C\\x03\\a\\x00\\x00\\x01\\n\" + // 0x00430307: 0x0000010A\n\t\"\\x00c\\x03\\a\\x00\\x00\\x01\\v\" + // 0x00630307: 0x0000010B\n\t\"\\x00C\\x03\\f\\x00\\x00\\x01\\f\" + // 0x0043030C: 0x0000010C\n\t\"\\x00c\\x03\\f\\x00\\x00\\x01\\r\" + // 0x0063030C: 0x0000010D\n\t\"\\x00D\\x03\\f\\x00\\x00\\x01\\x0e\" + // 0x0044030C: 0x0000010E\n\t\"\\x00d\\x03\\f\\x00\\x00\\x01\\x0f\" + // 0x0064030C: 0x0000010F\n\t\"\\x00E\\x03\\x04\\x00\\x00\\x01\\x12\" + // 0x00450304: 0x00000112\n\t\"\\x00e\\x03\\x04\\x00\\x00\\x01\\x13\" + // 0x00650304: 0x00000113\n\t\"\\x00E\\x03\\x06\\x00\\x00\\x01\\x14\" + // 0x00450306: 0x00000114\n\t\"\\x00e\\x03\\x06\\x00\\x00\\x01\\x15\" + // 0x00650306: 0x00000115\n\t\"\\x00E\\x03\\a\\x00\\x00\\x01\\x16\" + // 0x00450307: 0x00000116\n\t\"\\x00e\\x03\\a\\x00\\x00\\x01\\x17\" + // 0x00650307: 0x00000117\n\t\"\\x00E\\x03(\\x00\\x00\\x01\\x18\" + // 0x00450328: 0x00000118\n\t\"\\x00e\\x03(\\x00\\x00\\x01\\x19\" + // 0x00650328: 0x00000119\n\t\"\\x00E\\x03\\f\\x00\\x00\\x01\\x1a\" + // 0x0045030C: 0x0000011A\n\t\"\\x00e\\x03\\f\\x00\\x00\\x01\\x1b\" + // 0x0065030C: 0x0000011B\n\t\"\\x00G\\x03\\x02\\x00\\x00\\x01\\x1c\" + // 0x00470302: 0x0000011C\n\t\"\\x00g\\x03\\x02\\x00\\x00\\x01\\x1d\" + // 0x00670302: 0x0000011D\n\t\"\\x00G\\x03\\x06\\x00\\x00\\x01\\x1e\" + // 0x00470306: 0x0000011E\n\t\"\\x00g\\x03\\x06\\x00\\x00\\x01\\x1f\" + // 0x00670306: 0x0000011F\n\t\"\\x00G\\x03\\a\\x00\\x00\\x01 \" + // 0x00470307: 0x00000120\n\t\"\\x00g\\x03\\a\\x00\\x00\\x01!\" + // 0x00670307: 0x00000121\n\t\"\\x00G\\x03'\\x00\\x00\\x01\\\"\" + // 0x00470327: 0x00000122\n\t\"\\x00g\\x03'\\x00\\x00\\x01#\" + // 0x00670327: 0x00000123\n\t\"\\x00H\\x03\\x02\\x00\\x00\\x01$\" + // 0x00480302: 0x00000124\n\t\"\\x00h\\x03\\x02\\x00\\x00\\x01%\" + // 0x00680302: 0x00000125\n\t\"\\x00I\\x03\\x03\\x00\\x00\\x01(\" + // 0x00490303: 0x00000128\n\t\"\\x00i\\x03\\x03\\x00\\x00\\x01)\" + // 0x00690303: 0x00000129\n\t\"\\x00I\\x03\\x04\\x00\\x00\\x01*\" + // 0x00490304: 0x0000012A\n\t\"\\x00i\\x03\\x04\\x00\\x00\\x01+\" + // 0x00690304: 0x0000012B\n\t\"\\x00I\\x03\\x06\\x00\\x00\\x01,\" + // 0x00490306: 0x0000012C\n\t\"\\x00i\\x03\\x06\\x00\\x00\\x01-\" + // 0x00690306: 0x0000012D\n\t\"\\x00I\\x03(\\x00\\x00\\x01.\" + // 0x00490328: 0x0000012E\n\t\"\\x00i\\x03(\\x00\\x00\\x01/\" + // 0x00690328: 0x0000012F\n\t\"\\x00I\\x03\\a\\x00\\x00\\x010\" + // 0x00490307: 0x00000130\n\t\"\\x00J\\x03\\x02\\x00\\x00\\x014\" + // 0x004A0302: 0x00000134\n\t\"\\x00j\\x03\\x02\\x00\\x00\\x015\" + // 0x006A0302: 0x00000135\n\t\"\\x00K\\x03'\\x00\\x00\\x016\" + // 0x004B0327: 0x00000136\n\t\"\\x00k\\x03'\\x00\\x00\\x017\" + // 0x006B0327: 0x00000137\n\t\"\\x00L\\x03\\x01\\x00\\x00\\x019\" + // 0x004C0301: 0x00000139\n\t\"\\x00l\\x03\\x01\\x00\\x00\\x01:\" + // 0x006C0301: 0x0000013A\n\t\"\\x00L\\x03'\\x00\\x00\\x01;\" + // 0x004C0327: 0x0000013B\n\t\"\\x00l\\x03'\\x00\\x00\\x01<\" + // 0x006C0327: 0x0000013C\n\t\"\\x00L\\x03\\f\\x00\\x00\\x01=\" + // 0x004C030C: 0x0000013D\n\t\"\\x00l\\x03\\f\\x00\\x00\\x01>\" + // 0x006C030C: 0x0000013E\n\t\"\\x00N\\x03\\x01\\x00\\x00\\x01C\" + // 0x004E0301: 0x00000143\n\t\"\\x00n\\x03\\x01\\x00\\x00\\x01D\" + // 0x006E0301: 0x00000144\n\t\"\\x00N\\x03'\\x00\\x00\\x01E\" + // 0x004E0327: 0x00000145\n\t\"\\x00n\\x03'\\x00\\x00\\x01F\" + // 0x006E0327: 0x00000146\n\t\"\\x00N\\x03\\f\\x00\\x00\\x01G\" + // 0x004E030C: 0x00000147\n\t\"\\x00n\\x03\\f\\x00\\x00\\x01H\" + // 0x006E030C: 0x00000148\n\t\"\\x00O\\x03\\x04\\x00\\x00\\x01L\" + // 0x004F0304: 0x0000014C\n\t\"\\x00o\\x03\\x04\\x00\\x00\\x01M\" + // 0x006F0304: 0x0000014D\n\t\"\\x00O\\x03\\x06\\x00\\x00\\x01N\" + // 0x004F0306: 0x0000014E\n\t\"\\x00o\\x03\\x06\\x00\\x00\\x01O\" + // 0x006F0306: 0x0000014F\n\t\"\\x00O\\x03\\v\\x00\\x00\\x01P\" + // 0x004F030B: 0x00000150\n\t\"\\x00o\\x03\\v\\x00\\x00\\x01Q\" + // 0x006F030B: 0x00000151\n\t\"\\x00R\\x03\\x01\\x00\\x00\\x01T\" + // 0x00520301: 0x00000154\n\t\"\\x00r\\x03\\x01\\x00\\x00\\x01U\" + // 0x00720301: 0x00000155\n\t\"\\x00R\\x03'\\x00\\x00\\x01V\" + // 0x00520327: 0x00000156\n\t\"\\x00r\\x03'\\x00\\x00\\x01W\" + // 0x00720327: 0x00000157\n\t\"\\x00R\\x03\\f\\x00\\x00\\x01X\" + // 0x0052030C: 0x00000158\n\t\"\\x00r\\x03\\f\\x00\\x00\\x01Y\" + // 0x0072030C: 0x00000159\n\t\"\\x00S\\x03\\x01\\x00\\x00\\x01Z\" + // 0x00530301: 0x0000015A\n\t\"\\x00s\\x03\\x01\\x00\\x00\\x01[\" + // 0x00730301: 0x0000015B\n\t\"\\x00S\\x03\\x02\\x00\\x00\\x01\\\\\" + // 0x00530302: 0x0000015C\n\t\"\\x00s\\x03\\x02\\x00\\x00\\x01]\" + // 0x00730302: 0x0000015D\n\t\"\\x00S\\x03'\\x00\\x00\\x01^\" + // 0x00530327: 0x0000015E\n\t\"\\x00s\\x03'\\x00\\x00\\x01_\" + // 0x00730327: 0x0000015F\n\t\"\\x00S\\x03\\f\\x00\\x00\\x01`\" + // 0x0053030C: 0x00000160\n\t\"\\x00s\\x03\\f\\x00\\x00\\x01a\" + // 0x0073030C: 0x00000161\n\t\"\\x00T\\x03'\\x00\\x00\\x01b\" + // 0x00540327: 0x00000162\n\t\"\\x00t\\x03'\\x00\\x00\\x01c\" + // 0x00740327: 0x00000163\n\t\"\\x00T\\x03\\f\\x00\\x00\\x01d\" + // 0x0054030C: 0x00000164\n\t\"\\x00t\\x03\\f\\x00\\x00\\x01e\" + // 0x0074030C: 0x00000165\n\t\"\\x00U\\x03\\x03\\x00\\x00\\x01h\" + // 0x00550303: 0x00000168\n\t\"\\x00u\\x03\\x03\\x00\\x00\\x01i\" + // 0x00750303: 0x00000169\n\t\"\\x00U\\x03\\x04\\x00\\x00\\x01j\" + // 0x00550304: 0x0000016A\n\t\"\\x00u\\x03\\x04\\x00\\x00\\x01k\" + // 0x00750304: 0x0000016B\n\t\"\\x00U\\x03\\x06\\x00\\x00\\x01l\" + // 0x00550306: 0x0000016C\n\t\"\\x00u\\x03\\x06\\x00\\x00\\x01m\" + // 0x00750306: 0x0000016D\n\t\"\\x00U\\x03\\n\\x00\\x00\\x01n\" + // 0x0055030A: 0x0000016E\n\t\"\\x00u\\x03\\n\\x00\\x00\\x01o\" + // 0x0075030A: 0x0000016F\n\t\"\\x00U\\x03\\v\\x00\\x00\\x01p\" + // 0x0055030B: 0x00000170\n\t\"\\x00u\\x03\\v\\x00\\x00\\x01q\" + // 0x0075030B: 0x00000171\n\t\"\\x00U\\x03(\\x00\\x00\\x01r\" + // 0x00550328: 0x00000172\n\t\"\\x00u\\x03(\\x00\\x00\\x01s\" + // 0x00750328: 0x00000173\n\t\"\\x00W\\x03\\x02\\x00\\x00\\x01t\" + // 0x00570302: 0x00000174\n\t\"\\x00w\\x03\\x02\\x00\\x00\\x01u\" + // 0x00770302: 0x00000175\n\t\"\\x00Y\\x03\\x02\\x00\\x00\\x01v\" + // 0x00590302: 0x00000176\n\t\"\\x00y\\x03\\x02\\x00\\x00\\x01w\" + // 0x00790302: 0x00000177\n\t\"\\x00Y\\x03\\b\\x00\\x00\\x01x\" + // 0x00590308: 0x00000178\n\t\"\\x00Z\\x03\\x01\\x00\\x00\\x01y\" + // 0x005A0301: 0x00000179\n\t\"\\x00z\\x03\\x01\\x00\\x00\\x01z\" + // 0x007A0301: 0x0000017A\n\t\"\\x00Z\\x03\\a\\x00\\x00\\x01{\" + // 0x005A0307: 0x0000017B\n\t\"\\x00z\\x03\\a\\x00\\x00\\x01|\" + // 0x007A0307: 0x0000017C\n\t\"\\x00Z\\x03\\f\\x00\\x00\\x01}\" + // 0x005A030C: 0x0000017D\n\t\"\\x00z\\x03\\f\\x00\\x00\\x01~\" + // 0x007A030C: 0x0000017E\n\t\"\\x00O\\x03\\x1b\\x00\\x00\\x01\\xa0\" + // 0x004F031B: 0x000001A0\n\t\"\\x00o\\x03\\x1b\\x00\\x00\\x01\\xa1\" + // 0x006F031B: 0x000001A1\n\t\"\\x00U\\x03\\x1b\\x00\\x00\\x01\\xaf\" + // 0x0055031B: 0x000001AF\n\t\"\\x00u\\x03\\x1b\\x00\\x00\\x01\\xb0\" + // 0x0075031B: 0x000001B0\n\t\"\\x00A\\x03\\f\\x00\\x00\\x01\\xcd\" + // 0x0041030C: 0x000001CD\n\t\"\\x00a\\x03\\f\\x00\\x00\\x01\\xce\" + // 0x0061030C: 0x000001CE\n\t\"\\x00I\\x03\\f\\x00\\x00\\x01\\xcf\" + // 0x0049030C: 0x000001CF\n\t\"\\x00i\\x03\\f\\x00\\x00\\x01\\xd0\" + // 0x0069030C: 0x000001D0\n\t\"\\x00O\\x03\\f\\x00\\x00\\x01\\xd1\" + // 0x004F030C: 0x000001D1\n\t\"\\x00o\\x03\\f\\x00\\x00\\x01\\xd2\" + // 0x006F030C: 0x000001D2\n\t\"\\x00U\\x03\\f\\x00\\x00\\x01\\xd3\" + // 0x0055030C: 0x000001D3\n\t\"\\x00u\\x03\\f\\x00\\x00\\x01\\xd4\" + // 0x0075030C: 0x000001D4\n\t\"\\x00\\xdc\\x03\\x04\\x00\\x00\\x01\\xd5\" + // 0x00DC0304: 0x000001D5\n\t\"\\x00\\xfc\\x03\\x04\\x00\\x00\\x01\\xd6\" + // 0x00FC0304: 0x000001D6\n\t\"\\x00\\xdc\\x03\\x01\\x00\\x00\\x01\\xd7\" + // 0x00DC0301: 0x000001D7\n\t\"\\x00\\xfc\\x03\\x01\\x00\\x00\\x01\\xd8\" + // 0x00FC0301: 0x000001D8\n\t\"\\x00\\xdc\\x03\\f\\x00\\x00\\x01\\xd9\" + // 0x00DC030C: 0x000001D9\n\t\"\\x00\\xfc\\x03\\f\\x00\\x00\\x01\\xda\" + // 0x00FC030C: 0x000001DA\n\t\"\\x00\\xdc\\x03\\x00\\x00\\x00\\x01\\xdb\" + // 0x00DC0300: 0x000001DB\n\t\"\\x00\\xfc\\x03\\x00\\x00\\x00\\x01\\xdc\" + // 0x00FC0300: 0x000001DC\n\t\"\\x00\\xc4\\x03\\x04\\x00\\x00\\x01\\xde\" + // 0x00C40304: 0x000001DE\n\t\"\\x00\\xe4\\x03\\x04\\x00\\x00\\x01\\xdf\" + // 0x00E40304: 0x000001DF\n\t\"\\x02&\\x03\\x04\\x00\\x00\\x01\\xe0\" + // 0x02260304: 0x000001E0\n\t\"\\x02'\\x03\\x04\\x00\\x00\\x01\\xe1\" + // 0x02270304: 0x000001E1\n\t\"\\x00\\xc6\\x03\\x04\\x00\\x00\\x01\\xe2\" + // 0x00C60304: 0x000001E2\n\t\"\\x00\\xe6\\x03\\x04\\x00\\x00\\x01\\xe3\" + // 0x00E60304: 0x000001E3\n\t\"\\x00G\\x03\\f\\x00\\x00\\x01\\xe6\" + // 0x0047030C: 0x000001E6\n\t\"\\x00g\\x03\\f\\x00\\x00\\x01\\xe7\" + // 0x0067030C: 0x000001E7\n\t\"\\x00K\\x03\\f\\x00\\x00\\x01\\xe8\" + // 0x004B030C: 0x000001E8\n\t\"\\x00k\\x03\\f\\x00\\x00\\x01\\xe9\" + // 0x006B030C: 0x000001E9\n\t\"\\x00O\\x03(\\x00\\x00\\x01\\xea\" + // 0x004F0328: 0x000001EA\n\t\"\\x00o\\x03(\\x00\\x00\\x01\\xeb\" + // 0x006F0328: 0x000001EB\n\t\"\\x01\\xea\\x03\\x04\\x00\\x00\\x01\\xec\" + // 0x01EA0304: 0x000001EC\n\t\"\\x01\\xeb\\x03\\x04\\x00\\x00\\x01\\xed\" + // 0x01EB0304: 0x000001ED\n\t\"\\x01\\xb7\\x03\\f\\x00\\x00\\x01\\xee\" + // 0x01B7030C: 0x000001EE\n\t\"\\x02\\x92\\x03\\f\\x00\\x00\\x01\\xef\" + // 0x0292030C: 0x000001EF\n\t\"\\x00j\\x03\\f\\x00\\x00\\x01\\xf0\" + // 0x006A030C: 0x000001F0\n\t\"\\x00G\\x03\\x01\\x00\\x00\\x01\\xf4\" + // 0x00470301: 0x000001F4\n\t\"\\x00g\\x03\\x01\\x00\\x00\\x01\\xf5\" + // 0x00670301: 0x000001F5\n\t\"\\x00N\\x03\\x00\\x00\\x00\\x01\\xf8\" + // 0x004E0300: 0x000001F8\n\t\"\\x00n\\x03\\x00\\x00\\x00\\x01\\xf9\" + // 0x006E0300: 0x000001F9\n\t\"\\x00\\xc5\\x03\\x01\\x00\\x00\\x01\\xfa\" + // 0x00C50301: 0x000001FA\n\t\"\\x00\\xe5\\x03\\x01\\x00\\x00\\x01\\xfb\" + // 0x00E50301: 0x000001FB\n\t\"\\x00\\xc6\\x03\\x01\\x00\\x00\\x01\\xfc\" + // 0x00C60301: 0x000001FC\n\t\"\\x00\\xe6\\x03\\x01\\x00\\x00\\x01\\xfd\" + // 0x00E60301: 0x000001FD\n\t\"\\x00\\xd8\\x03\\x01\\x00\\x00\\x01\\xfe\" + // 0x00D80301: 0x000001FE\n\t\"\\x00\\xf8\\x03\\x01\\x00\\x00\\x01\\xff\" + // 0x00F80301: 0x000001FF\n\t\"\\x00A\\x03\\x0f\\x00\\x00\\x02\\x00\" + // 0x0041030F: 0x00000200\n\t\"\\x00a\\x03\\x0f\\x00\\x00\\x02\\x01\" + // 0x0061030F: 0x00000201\n\t\"\\x00A\\x03\\x11\\x00\\x00\\x02\\x02\" + // 0x00410311: 0x00000202\n\t\"\\x00a\\x03\\x11\\x00\\x00\\x02\\x03\" + // 0x00610311: 0x00000203\n\t\"\\x00E\\x03\\x0f\\x00\\x00\\x02\\x04\" + // 0x0045030F: 0x00000204\n\t\"\\x00e\\x03\\x0f\\x00\\x00\\x02\\x05\" + // 0x0065030F: 0x00000205\n\t\"\\x00E\\x03\\x11\\x00\\x00\\x02\\x06\" + // 0x00450311: 0x00000206\n\t\"\\x00e\\x03\\x11\\x00\\x00\\x02\\a\" + // 0x00650311: 0x00000207\n\t\"\\x00I\\x03\\x0f\\x00\\x00\\x02\\b\" + // 0x0049030F: 0x00000208\n\t\"\\x00i\\x03\\x0f\\x00\\x00\\x02\\t\" + // 0x0069030F: 0x00000209\n\t\"\\x00I\\x03\\x11\\x00\\x00\\x02\\n\" + // 0x00490311: 0x0000020A\n\t\"\\x00i\\x03\\x11\\x00\\x00\\x02\\v\" + // 0x00690311: 0x0000020B\n\t\"\\x00O\\x03\\x0f\\x00\\x00\\x02\\f\" + // 0x004F030F: 0x0000020C\n\t\"\\x00o\\x03\\x0f\\x00\\x00\\x02\\r\" + // 0x006F030F: 0x0000020D\n\t\"\\x00O\\x03\\x11\\x00\\x00\\x02\\x0e\" + // 0x004F0311: 0x0000020E\n\t\"\\x00o\\x03\\x11\\x00\\x00\\x02\\x0f\" + // 0x006F0311: 0x0000020F\n\t\"\\x00R\\x03\\x0f\\x00\\x00\\x02\\x10\" + // 0x0052030F: 0x00000210\n\t\"\\x00r\\x03\\x0f\\x00\\x00\\x02\\x11\" + // 0x0072030F: 0x00000211\n\t\"\\x00R\\x03\\x11\\x00\\x00\\x02\\x12\" + // 0x00520311: 0x00000212\n\t\"\\x00r\\x03\\x11\\x00\\x00\\x02\\x13\" + // 0x00720311: 0x00000213\n\t\"\\x00U\\x03\\x0f\\x00\\x00\\x02\\x14\" + // 0x0055030F: 0x00000214\n\t\"\\x00u\\x03\\x0f\\x00\\x00\\x02\\x15\" + // 0x0075030F: 0x00000215\n\t\"\\x00U\\x03\\x11\\x00\\x00\\x02\\x16\" + // 0x00550311: 0x00000216\n\t\"\\x00u\\x03\\x11\\x00\\x00\\x02\\x17\" + // 0x00750311: 0x00000217\n\t\"\\x00S\\x03&\\x00\\x00\\x02\\x18\" + // 0x00530326: 0x00000218\n\t\"\\x00s\\x03&\\x00\\x00\\x02\\x19\" + // 0x00730326: 0x00000219\n\t\"\\x00T\\x03&\\x00\\x00\\x02\\x1a\" + // 0x00540326: 0x0000021A\n\t\"\\x00t\\x03&\\x00\\x00\\x02\\x1b\" + // 0x00740326: 0x0000021B\n\t\"\\x00H\\x03\\f\\x00\\x00\\x02\\x1e\" + // 0x0048030C: 0x0000021E\n\t\"\\x00h\\x03\\f\\x00\\x00\\x02\\x1f\" + // 0x0068030C: 0x0000021F\n\t\"\\x00A\\x03\\a\\x00\\x00\\x02&\" + // 0x00410307: 0x00000226\n\t\"\\x00a\\x03\\a\\x00\\x00\\x02'\" + // 0x00610307: 0x00000227\n\t\"\\x00E\\x03'\\x00\\x00\\x02(\" + // 0x00450327: 0x00000228\n\t\"\\x00e\\x03'\\x00\\x00\\x02)\" + // 0x00650327: 0x00000229\n\t\"\\x00\\xd6\\x03\\x04\\x00\\x00\\x02*\" + // 0x00D60304: 0x0000022A\n\t\"\\x00\\xf6\\x03\\x04\\x00\\x00\\x02+\" + // 0x00F60304: 0x0000022B\n\t\"\\x00\\xd5\\x03\\x04\\x00\\x00\\x02,\" + // 0x00D50304: 0x0000022C\n\t\"\\x00\\xf5\\x03\\x04\\x00\\x00\\x02-\" + // 0x00F50304: 0x0000022D\n\t\"\\x00O\\x03\\a\\x00\\x00\\x02.\" + // 0x004F0307: 0x0000022E\n\t\"\\x00o\\x03\\a\\x00\\x00\\x02/\" + // 0x006F0307: 0x0000022F\n\t\"\\x02.\\x03\\x04\\x00\\x00\\x020\" + // 0x022E0304: 0x00000230\n\t\"\\x02/\\x03\\x04\\x00\\x00\\x021\" + // 0x022F0304: 0x00000231\n\t\"\\x00Y\\x03\\x04\\x00\\x00\\x022\" + // 0x00590304: 0x00000232\n\t\"\\x00y\\x03\\x04\\x00\\x00\\x023\" + // 0x00790304: 0x00000233\n\t\"\\x00\\xa8\\x03\\x01\\x00\\x00\\x03\\x85\" + // 0x00A80301: 0x00000385\n\t\"\\x03\\x91\\x03\\x01\\x00\\x00\\x03\\x86\" + // 0x03910301: 0x00000386\n\t\"\\x03\\x95\\x03\\x01\\x00\\x00\\x03\\x88\" + // 0x03950301: 0x00000388\n\t\"\\x03\\x97\\x03\\x01\\x00\\x00\\x03\\x89\" + // 0x03970301: 0x00000389\n\t\"\\x03\\x99\\x03\\x01\\x00\\x00\\x03\\x8a\" + // 0x03990301: 0x0000038A\n\t\"\\x03\\x9f\\x03\\x01\\x00\\x00\\x03\\x8c\" + // 0x039F0301: 0x0000038C\n\t\"\\x03\\xa5\\x03\\x01\\x00\\x00\\x03\\x8e\" + // 0x03A50301: 0x0000038E\n\t\"\\x03\\xa9\\x03\\x01\\x00\\x00\\x03\\x8f\" + // 0x03A90301: 0x0000038F\n\t\"\\x03\\xca\\x03\\x01\\x00\\x00\\x03\\x90\" + // 0x03CA0301: 0x00000390\n\t\"\\x03\\x99\\x03\\b\\x00\\x00\\x03\\xaa\" + // 0x03990308: 0x000003AA\n\t\"\\x03\\xa5\\x03\\b\\x00\\x00\\x03\\xab\" + // 0x03A50308: 0x000003AB\n\t\"\\x03\\xb1\\x03\\x01\\x00\\x00\\x03\\xac\" + // 0x03B10301: 0x000003AC\n\t\"\\x03\\xb5\\x03\\x01\\x00\\x00\\x03\\xad\" + // 0x03B50301: 0x000003AD\n\t\"\\x03\\xb7\\x03\\x01\\x00\\x00\\x03\\xae\" + // 0x03B70301: 0x000003AE\n\t\"\\x03\\xb9\\x03\\x01\\x00\\x00\\x03\\xaf\" + // 0x03B90301: 0x000003AF\n\t\"\\x03\\xcb\\x03\\x01\\x00\\x00\\x03\\xb0\" + // 0x03CB0301: 0x000003B0\n\t\"\\x03\\xb9\\x03\\b\\x00\\x00\\x03\\xca\" + // 0x03B90308: 0x000003CA\n\t\"\\x03\\xc5\\x03\\b\\x00\\x00\\x03\\xcb\" + // 0x03C50308: 0x000003CB\n\t\"\\x03\\xbf\\x03\\x01\\x00\\x00\\x03\\xcc\" + // 0x03BF0301: 0x000003CC\n\t\"\\x03\\xc5\\x03\\x01\\x00\\x00\\x03\\xcd\" + // 0x03C50301: 0x000003CD\n\t\"\\x03\\xc9\\x03\\x01\\x00\\x00\\x03\\xce\" + // 0x03C90301: 0x000003CE\n\t\"\\x03\\xd2\\x03\\x01\\x00\\x00\\x03\\xd3\" + // 0x03D20301: 0x000003D3\n\t\"\\x03\\xd2\\x03\\b\\x00\\x00\\x03\\xd4\" + // 0x03D20308: 0x000003D4\n\t\"\\x04\\x15\\x03\\x00\\x00\\x00\\x04\\x00\" + // 0x04150300: 0x00000400\n\t\"\\x04\\x15\\x03\\b\\x00\\x00\\x04\\x01\" + // 0x04150308: 0x00000401\n\t\"\\x04\\x13\\x03\\x01\\x00\\x00\\x04\\x03\" + // 0x04130301: 0x00000403\n\t\"\\x04\\x06\\x03\\b\\x00\\x00\\x04\\a\" + // 0x04060308: 0x00000407\n\t\"\\x04\\x1a\\x03\\x01\\x00\\x00\\x04\\f\" + // 0x041A0301: 0x0000040C\n\t\"\\x04\\x18\\x03\\x00\\x00\\x00\\x04\\r\" + // 0x04180300: 0x0000040D\n\t\"\\x04#\\x03\\x06\\x00\\x00\\x04\\x0e\" + // 0x04230306: 0x0000040E\n\t\"\\x04\\x18\\x03\\x06\\x00\\x00\\x04\\x19\" + // 0x04180306: 0x00000419\n\t\"\\x048\\x03\\x06\\x00\\x00\\x049\" + // 0x04380306: 0x00000439\n\t\"\\x045\\x03\\x00\\x00\\x00\\x04P\" + // 0x04350300: 0x00000450\n\t\"\\x045\\x03\\b\\x00\\x00\\x04Q\" + // 0x04350308: 0x00000451\n\t\"\\x043\\x03\\x01\\x00\\x00\\x04S\" + // 0x04330301: 0x00000453\n\t\"\\x04V\\x03\\b\\x00\\x00\\x04W\" + // 0x04560308: 0x00000457\n\t\"\\x04:\\x03\\x01\\x00\\x00\\x04\\\\\" + // 0x043A0301: 0x0000045C\n\t\"\\x048\\x03\\x00\\x00\\x00\\x04]\" + // 0x04380300: 0x0000045D\n\t\"\\x04C\\x03\\x06\\x00\\x00\\x04^\" + // 0x04430306: 0x0000045E\n\t\"\\x04t\\x03\\x0f\\x00\\x00\\x04v\" + // 0x0474030F: 0x00000476\n\t\"\\x04u\\x03\\x0f\\x00\\x00\\x04w\" + // 0x0475030F: 0x00000477\n\t\"\\x04\\x16\\x03\\x06\\x00\\x00\\x04\\xc1\" + // 0x04160306: 0x000004C1\n\t\"\\x046\\x03\\x06\\x00\\x00\\x04\\xc2\" + // 0x04360306: 0x000004C2\n\t\"\\x04\\x10\\x03\\x06\\x00\\x00\\x04\\xd0\" + // 0x04100306: 0x000004D0\n\t\"\\x040\\x03\\x06\\x00\\x00\\x04\\xd1\" + // 0x04300306: 0x000004D1\n\t\"\\x04\\x10\\x03\\b\\x00\\x00\\x04\\xd2\" + // 0x04100308: 0x000004D2\n\t\"\\x040\\x03\\b\\x00\\x00\\x04\\xd3\" + // 0x04300308: 0x000004D3\n\t\"\\x04\\x15\\x03\\x06\\x00\\x00\\x04\\xd6\" + // 0x04150306: 0x000004D6\n\t\"\\x045\\x03\\x06\\x00\\x00\\x04\\xd7\" + // 0x04350306: 0x000004D7\n\t\"\\x04\\xd8\\x03\\b\\x00\\x00\\x04\\xda\" + // 0x04D80308: 0x000004DA\n\t\"\\x04\\xd9\\x03\\b\\x00\\x00\\x04\\xdb\" + // 0x04D90308: 0x000004DB\n\t\"\\x04\\x16\\x03\\b\\x00\\x00\\x04\\xdc\" + // 0x04160308: 0x000004DC\n\t\"\\x046\\x03\\b\\x00\\x00\\x04\\xdd\" + // 0x04360308: 0x000004DD\n\t\"\\x04\\x17\\x03\\b\\x00\\x00\\x04\\xde\" + // 0x04170308: 0x000004DE\n\t\"\\x047\\x03\\b\\x00\\x00\\x04\\xdf\" + // 0x04370308: 0x000004DF\n\t\"\\x04\\x18\\x03\\x04\\x00\\x00\\x04\\xe2\" + // 0x04180304: 0x000004E2\n\t\"\\x048\\x03\\x04\\x00\\x00\\x04\\xe3\" + // 0x04380304: 0x000004E3\n\t\"\\x04\\x18\\x03\\b\\x00\\x00\\x04\\xe4\" + // 0x04180308: 0x000004E4\n\t\"\\x048\\x03\\b\\x00\\x00\\x04\\xe5\" + // 0x04380308: 0x000004E5\n\t\"\\x04\\x1e\\x03\\b\\x00\\x00\\x04\\xe6\" + // 0x041E0308: 0x000004E6\n\t\"\\x04>\\x03\\b\\x00\\x00\\x04\\xe7\" + // 0x043E0308: 0x000004E7\n\t\"\\x04\\xe8\\x03\\b\\x00\\x00\\x04\\xea\" + // 0x04E80308: 0x000004EA\n\t\"\\x04\\xe9\\x03\\b\\x00\\x00\\x04\\xeb\" + // 0x04E90308: 0x000004EB\n\t\"\\x04-\\x03\\b\\x00\\x00\\x04\\xec\" + // 0x042D0308: 0x000004EC\n\t\"\\x04M\\x03\\b\\x00\\x00\\x04\\xed\" + // 0x044D0308: 0x000004ED\n\t\"\\x04#\\x03\\x04\\x00\\x00\\x04\\xee\" + // 0x04230304: 0x000004EE\n\t\"\\x04C\\x03\\x04\\x00\\x00\\x04\\xef\" + // 0x04430304: 0x000004EF\n\t\"\\x04#\\x03\\b\\x00\\x00\\x04\\xf0\" + // 0x04230308: 0x000004F0\n\t\"\\x04C\\x03\\b\\x00\\x00\\x04\\xf1\" + // 0x04430308: 0x000004F1\n\t\"\\x04#\\x03\\v\\x00\\x00\\x04\\xf2\" + // 0x0423030B: 0x000004F2\n\t\"\\x04C\\x03\\v\\x00\\x00\\x04\\xf3\" + // 0x0443030B: 0x000004F3\n\t\"\\x04'\\x03\\b\\x00\\x00\\x04\\xf4\" + // 0x04270308: 0x000004F4\n\t\"\\x04G\\x03\\b\\x00\\x00\\x04\\xf5\" + // 0x04470308: 0x000004F5\n\t\"\\x04+\\x03\\b\\x00\\x00\\x04\\xf8\" + // 0x042B0308: 0x000004F8\n\t\"\\x04K\\x03\\b\\x00\\x00\\x04\\xf9\" + // 0x044B0308: 0x000004F9\n\t\"\\x06'\\x06S\\x00\\x00\\x06\\\"\" + // 0x06270653: 0x00000622\n\t\"\\x06'\\x06T\\x00\\x00\\x06#\" + // 0x06270654: 0x00000623\n\t\"\\x06H\\x06T\\x00\\x00\\x06$\" + // 0x06480654: 0x00000624\n\t\"\\x06'\\x06U\\x00\\x00\\x06%\" + // 0x06270655: 0x00000625\n\t\"\\x06J\\x06T\\x00\\x00\\x06&\" + // 0x064A0654: 0x00000626\n\t\"\\x06\\xd5\\x06T\\x00\\x00\\x06\\xc0\" + // 0x06D50654: 0x000006C0\n\t\"\\x06\\xc1\\x06T\\x00\\x00\\x06\\xc2\" + // 0x06C10654: 0x000006C2\n\t\"\\x06\\xd2\\x06T\\x00\\x00\\x06\\xd3\" + // 0x06D20654: 0x000006D3\n\t\"\\t(\\t<\\x00\\x00\\t)\" + // 0x0928093C: 0x00000929\n\t\"\\t0\\t<\\x00\\x00\\t1\" + // 0x0930093C: 0x00000931\n\t\"\\t3\\t<\\x00\\x00\\t4\" + // 0x0933093C: 0x00000934\n\t\"\\t\\xc7\\t\\xbe\\x00\\x00\\t\\xcb\" + // 0x09C709BE: 0x000009CB\n\t\"\\t\\xc7\\t\\xd7\\x00\\x00\\t\\xcc\" + // 0x09C709D7: 0x000009CC\n\t\"\\vG\\vV\\x00\\x00\\vH\" + // 0x0B470B56: 0x00000B48\n\t\"\\vG\\v>\\x00\\x00\\vK\" + // 0x0B470B3E: 0x00000B4B\n\t\"\\vG\\vW\\x00\\x00\\vL\" + // 0x0B470B57: 0x00000B4C\n\t\"\\v\\x92\\v\\xd7\\x00\\x00\\v\\x94\" + // 0x0B920BD7: 0x00000B94\n\t\"\\v\\xc6\\v\\xbe\\x00\\x00\\v\\xca\" + // 0x0BC60BBE: 0x00000BCA\n\t\"\\v\\xc7\\v\\xbe\\x00\\x00\\v\\xcb\" + // 0x0BC70BBE: 0x00000BCB\n\t\"\\v\\xc6\\v\\xd7\\x00\\x00\\v\\xcc\" + // 0x0BC60BD7: 0x00000BCC\n\t\"\\fF\\fV\\x00\\x00\\fH\" + // 0x0C460C56: 0x00000C48\n\t\"\\f\\xbf\\f\\xd5\\x00\\x00\\f\\xc0\" + // 0x0CBF0CD5: 0x00000CC0\n\t\"\\f\\xc6\\f\\xd5\\x00\\x00\\f\\xc7\" + // 0x0CC60CD5: 0x00000CC7\n\t\"\\f\\xc6\\f\\xd6\\x00\\x00\\f\\xc8\" + // 0x0CC60CD6: 0x00000CC8\n\t\"\\f\\xc6\\f\\xc2\\x00\\x00\\f\\xca\" + // 0x0CC60CC2: 0x00000CCA\n\t\"\\f\\xca\\f\\xd5\\x00\\x00\\f\\xcb\" + // 0x0CCA0CD5: 0x00000CCB\n\t\"\\rF\\r>\\x00\\x00\\rJ\" + // 0x0D460D3E: 0x00000D4A\n\t\"\\rG\\r>\\x00\\x00\\rK\" + // 0x0D470D3E: 0x00000D4B\n\t\"\\rF\\rW\\x00\\x00\\rL\" + // 0x0D460D57: 0x00000D4C\n\t\"\\r\\xd9\\r\\xca\\x00\\x00\\r\\xda\" + // 0x0DD90DCA: 0x00000DDA\n\t\"\\r\\xd9\\r\\xcf\\x00\\x00\\r\\xdc\" + // 0x0DD90DCF: 0x00000DDC\n\t\"\\r\\xdc\\r\\xca\\x00\\x00\\r\\xdd\" + // 0x0DDC0DCA: 0x00000DDD\n\t\"\\r\\xd9\\r\\xdf\\x00\\x00\\r\\xde\" + // 0x0DD90DDF: 0x00000DDE\n\t\"\\x10%\\x10.\\x00\\x00\\x10&\" + // 0x1025102E: 0x00001026\n\t\"\\x1b\\x05\\x1b5\\x00\\x00\\x1b\\x06\" + // 0x1B051B35: 0x00001B06\n\t\"\\x1b\\a\\x1b5\\x00\\x00\\x1b\\b\" + // 0x1B071B35: 0x00001B08\n\t\"\\x1b\\t\\x1b5\\x00\\x00\\x1b\\n\" + // 0x1B091B35: 0x00001B0A\n\t\"\\x1b\\v\\x1b5\\x00\\x00\\x1b\\f\" + // 0x1B0B1B35: 0x00001B0C\n\t\"\\x1b\\r\\x1b5\\x00\\x00\\x1b\\x0e\" + // 0x1B0D1B35: 0x00001B0E\n\t\"\\x1b\\x11\\x1b5\\x00\\x00\\x1b\\x12\" + // 0x1B111B35: 0x00001B12\n\t\"\\x1b:\\x1b5\\x00\\x00\\x1b;\" + // 0x1B3A1B35: 0x00001B3B\n\t\"\\x1b<\\x1b5\\x00\\x00\\x1b=\" + // 0x1B3C1B35: 0x00001B3D\n\t\"\\x1b>\\x1b5\\x00\\x00\\x1b@\" + // 0x1B3E1B35: 0x00001B40\n\t\"\\x1b?\\x1b5\\x00\\x00\\x1bA\" + // 0x1B3F1B35: 0x00001B41\n\t\"\\x1bB\\x1b5\\x00\\x00\\x1bC\" + // 0x1B421B35: 0x00001B43\n\t\"\\x00A\\x03%\\x00\\x00\\x1e\\x00\" + // 0x00410325: 0x00001E00\n\t\"\\x00a\\x03%\\x00\\x00\\x1e\\x01\" + // 0x00610325: 0x00001E01\n\t\"\\x00B\\x03\\a\\x00\\x00\\x1e\\x02\" + // 0x00420307: 0x00001E02\n\t\"\\x00b\\x03\\a\\x00\\x00\\x1e\\x03\" + // 0x00620307: 0x00001E03\n\t\"\\x00B\\x03#\\x00\\x00\\x1e\\x04\" + // 0x00420323: 0x00001E04\n\t\"\\x00b\\x03#\\x00\\x00\\x1e\\x05\" + // 0x00620323: 0x00001E05\n\t\"\\x00B\\x031\\x00\\x00\\x1e\\x06\" + // 0x00420331: 0x00001E06\n\t\"\\x00b\\x031\\x00\\x00\\x1e\\a\" + // 0x00620331: 0x00001E07\n\t\"\\x00\\xc7\\x03\\x01\\x00\\x00\\x1e\\b\" + // 0x00C70301: 0x00001E08\n\t\"\\x00\\xe7\\x03\\x01\\x00\\x00\\x1e\\t\" + // 0x00E70301: 0x00001E09\n\t\"\\x00D\\x03\\a\\x00\\x00\\x1e\\n\" + // 0x00440307: 0x00001E0A\n\t\"\\x00d\\x03\\a\\x00\\x00\\x1e\\v\" + // 0x00640307: 0x00001E0B\n\t\"\\x00D\\x03#\\x00\\x00\\x1e\\f\" + // 0x00440323: 0x00001E0C\n\t\"\\x00d\\x03#\\x00\\x00\\x1e\\r\" + // 0x00640323: 0x00001E0D\n\t\"\\x00D\\x031\\x00\\x00\\x1e\\x0e\" + // 0x00440331: 0x00001E0E\n\t\"\\x00d\\x031\\x00\\x00\\x1e\\x0f\" + // 0x00640331: 0x00001E0F\n\t\"\\x00D\\x03'\\x00\\x00\\x1e\\x10\" + // 0x00440327: 0x00001E10\n\t\"\\x00d\\x03'\\x00\\x00\\x1e\\x11\" + // 0x00640327: 0x00001E11\n\t\"\\x00D\\x03-\\x00\\x00\\x1e\\x12\" + // 0x0044032D: 0x00001E12\n\t\"\\x00d\\x03-\\x00\\x00\\x1e\\x13\" + // 0x0064032D: 0x00001E13\n\t\"\\x01\\x12\\x03\\x00\\x00\\x00\\x1e\\x14\" + // 0x01120300: 0x00001E14\n\t\"\\x01\\x13\\x03\\x00\\x00\\x00\\x1e\\x15\" + // 0x01130300: 0x00001E15\n\t\"\\x01\\x12\\x03\\x01\\x00\\x00\\x1e\\x16\" + // 0x01120301: 0x00001E16\n\t\"\\x01\\x13\\x03\\x01\\x00\\x00\\x1e\\x17\" + // 0x01130301: 0x00001E17\n\t\"\\x00E\\x03-\\x00\\x00\\x1e\\x18\" + // 0x0045032D: 0x00001E18\n\t\"\\x00e\\x03-\\x00\\x00\\x1e\\x19\" + // 0x0065032D: 0x00001E19\n\t\"\\x00E\\x030\\x00\\x00\\x1e\\x1a\" + // 0x00450330: 0x00001E1A\n\t\"\\x00e\\x030\\x00\\x00\\x1e\\x1b\" + // 0x00650330: 0x00001E1B\n\t\"\\x02(\\x03\\x06\\x00\\x00\\x1e\\x1c\" + // 0x02280306: 0x00001E1C\n\t\"\\x02)\\x03\\x06\\x00\\x00\\x1e\\x1d\" + // 0x02290306: 0x00001E1D\n\t\"\\x00F\\x03\\a\\x00\\x00\\x1e\\x1e\" + // 0x00460307: 0x00001E1E\n\t\"\\x00f\\x03\\a\\x00\\x00\\x1e\\x1f\" + // 0x00660307: 0x00001E1F\n\t\"\\x00G\\x03\\x04\\x00\\x00\\x1e \" + // 0x00470304: 0x00001E20\n\t\"\\x00g\\x03\\x04\\x00\\x00\\x1e!\" + // 0x00670304: 0x00001E21\n\t\"\\x00H\\x03\\a\\x00\\x00\\x1e\\\"\" + // 0x00480307: 0x00001E22\n\t\"\\x00h\\x03\\a\\x00\\x00\\x1e#\" + // 0x00680307: 0x00001E23\n\t\"\\x00H\\x03#\\x00\\x00\\x1e$\" + // 0x00480323: 0x00001E24\n\t\"\\x00h\\x03#\\x00\\x00\\x1e%\" + // 0x00680323: 0x00001E25\n\t\"\\x00H\\x03\\b\\x00\\x00\\x1e&\" + // 0x00480308: 0x00001E26\n\t\"\\x00h\\x03\\b\\x00\\x00\\x1e'\" + // 0x00680308: 0x00001E27\n\t\"\\x00H\\x03'\\x00\\x00\\x1e(\" + // 0x00480327: 0x00001E28\n\t\"\\x00h\\x03'\\x00\\x00\\x1e)\" + // 0x00680327: 0x00001E29\n\t\"\\x00H\\x03.\\x00\\x00\\x1e*\" + // 0x0048032E: 0x00001E2A\n\t\"\\x00h\\x03.\\x00\\x00\\x1e+\" + // 0x0068032E: 0x00001E2B\n\t\"\\x00I\\x030\\x00\\x00\\x1e,\" + // 0x00490330: 0x00001E2C\n\t\"\\x00i\\x030\\x00\\x00\\x1e-\" + // 0x00690330: 0x00001E2D\n\t\"\\x00\\xcf\\x03\\x01\\x00\\x00\\x1e.\" + // 0x00CF0301: 0x00001E2E\n\t\"\\x00\\xef\\x03\\x01\\x00\\x00\\x1e/\" + // 0x00EF0301: 0x00001E2F\n\t\"\\x00K\\x03\\x01\\x00\\x00\\x1e0\" + // 0x004B0301: 0x00001E30\n\t\"\\x00k\\x03\\x01\\x00\\x00\\x1e1\" + // 0x006B0301: 0x00001E31\n\t\"\\x00K\\x03#\\x00\\x00\\x1e2\" + // 0x004B0323: 0x00001E32\n\t\"\\x00k\\x03#\\x00\\x00\\x1e3\" + // 0x006B0323: 0x00001E33\n\t\"\\x00K\\x031\\x00\\x00\\x1e4\" + // 0x004B0331: 0x00001E34\n\t\"\\x00k\\x031\\x00\\x00\\x1e5\" + // 0x006B0331: 0x00001E35\n\t\"\\x00L\\x03#\\x00\\x00\\x1e6\" + // 0x004C0323: 0x00001E36\n\t\"\\x00l\\x03#\\x00\\x00\\x1e7\" + // 0x006C0323: 0x00001E37\n\t\"\\x1e6\\x03\\x04\\x00\\x00\\x1e8\" + // 0x1E360304: 0x00001E38\n\t\"\\x1e7\\x03\\x04\\x00\\x00\\x1e9\" + // 0x1E370304: 0x00001E39\n\t\"\\x00L\\x031\\x00\\x00\\x1e:\" + // 0x004C0331: 0x00001E3A\n\t\"\\x00l\\x031\\x00\\x00\\x1e;\" + // 0x006C0331: 0x00001E3B\n\t\"\\x00L\\x03-\\x00\\x00\\x1e<\" + // 0x004C032D: 0x00001E3C\n\t\"\\x00l\\x03-\\x00\\x00\\x1e=\" + // 0x006C032D: 0x00001E3D\n\t\"\\x00M\\x03\\x01\\x00\\x00\\x1e>\" + // 0x004D0301: 0x00001E3E\n\t\"\\x00m\\x03\\x01\\x00\\x00\\x1e?\" + // 0x006D0301: 0x00001E3F\n\t\"\\x00M\\x03\\a\\x00\\x00\\x1e@\" + // 0x004D0307: 0x00001E40\n\t\"\\x00m\\x03\\a\\x00\\x00\\x1eA\" + // 0x006D0307: 0x00001E41\n\t\"\\x00M\\x03#\\x00\\x00\\x1eB\" + // 0x004D0323: 0x00001E42\n\t\"\\x00m\\x03#\\x00\\x00\\x1eC\" + // 0x006D0323: 0x00001E43\n\t\"\\x00N\\x03\\a\\x00\\x00\\x1eD\" + // 0x004E0307: 0x00001E44\n\t\"\\x00n\\x03\\a\\x00\\x00\\x1eE\" + // 0x006E0307: 0x00001E45\n\t\"\\x00N\\x03#\\x00\\x00\\x1eF\" + // 0x004E0323: 0x00001E46\n\t\"\\x00n\\x03#\\x00\\x00\\x1eG\" + // 0x006E0323: 0x00001E47\n\t\"\\x00N\\x031\\x00\\x00\\x1eH\" + // 0x004E0331: 0x00001E48\n\t\"\\x00n\\x031\\x00\\x00\\x1eI\" + // 0x006E0331: 0x00001E49\n\t\"\\x00N\\x03-\\x00\\x00\\x1eJ\" + // 0x004E032D: 0x00001E4A\n\t\"\\x00n\\x03-\\x00\\x00\\x1eK\" + // 0x006E032D: 0x00001E4B\n\t\"\\x00\\xd5\\x03\\x01\\x00\\x00\\x1eL\" + // 0x00D50301: 0x00001E4C\n\t\"\\x00\\xf5\\x03\\x01\\x00\\x00\\x1eM\" + // 0x00F50301: 0x00001E4D\n\t\"\\x00\\xd5\\x03\\b\\x00\\x00\\x1eN\" + // 0x00D50308: 0x00001E4E\n\t\"\\x00\\xf5\\x03\\b\\x00\\x00\\x1eO\" + // 0x00F50308: 0x00001E4F\n\t\"\\x01L\\x03\\x00\\x00\\x00\\x1eP\" + // 0x014C0300: 0x00001E50\n\t\"\\x01M\\x03\\x00\\x00\\x00\\x1eQ\" + // 0x014D0300: 0x00001E51\n\t\"\\x01L\\x03\\x01\\x00\\x00\\x1eR\" + // 0x014C0301: 0x00001E52\n\t\"\\x01M\\x03\\x01\\x00\\x00\\x1eS\" + // 0x014D0301: 0x00001E53\n\t\"\\x00P\\x03\\x01\\x00\\x00\\x1eT\" + // 0x00500301: 0x00001E54\n\t\"\\x00p\\x03\\x01\\x00\\x00\\x1eU\" + // 0x00700301: 0x00001E55\n\t\"\\x00P\\x03\\a\\x00\\x00\\x1eV\" + // 0x00500307: 0x00001E56\n\t\"\\x00p\\x03\\a\\x00\\x00\\x1eW\" + // 0x00700307: 0x00001E57\n\t\"\\x00R\\x03\\a\\x00\\x00\\x1eX\" + // 0x00520307: 0x00001E58\n\t\"\\x00r\\x03\\a\\x00\\x00\\x1eY\" + // 0x00720307: 0x00001E59\n\t\"\\x00R\\x03#\\x00\\x00\\x1eZ\" + // 0x00520323: 0x00001E5A\n\t\"\\x00r\\x03#\\x00\\x00\\x1e[\" + // 0x00720323: 0x00001E5B\n\t\"\\x1eZ\\x03\\x04\\x00\\x00\\x1e\\\\\" + // 0x1E5A0304: 0x00001E5C\n\t\"\\x1e[\\x03\\x04\\x00\\x00\\x1e]\" + // 0x1E5B0304: 0x00001E5D\n\t\"\\x00R\\x031\\x00\\x00\\x1e^\" + // 0x00520331: 0x00001E5E\n\t\"\\x00r\\x031\\x00\\x00\\x1e_\" + // 0x00720331: 0x00001E5F\n\t\"\\x00S\\x03\\a\\x00\\x00\\x1e`\" + // 0x00530307: 0x00001E60\n\t\"\\x00s\\x03\\a\\x00\\x00\\x1ea\" + // 0x00730307: 0x00001E61\n\t\"\\x00S\\x03#\\x00\\x00\\x1eb\" + // 0x00530323: 0x00001E62\n\t\"\\x00s\\x03#\\x00\\x00\\x1ec\" + // 0x00730323: 0x00001E63\n\t\"\\x01Z\\x03\\a\\x00\\x00\\x1ed\" + // 0x015A0307: 0x00001E64\n\t\"\\x01[\\x03\\a\\x00\\x00\\x1ee\" + // 0x015B0307: 0x00001E65\n\t\"\\x01`\\x03\\a\\x00\\x00\\x1ef\" + // 0x01600307: 0x00001E66\n\t\"\\x01a\\x03\\a\\x00\\x00\\x1eg\" + // 0x01610307: 0x00001E67\n\t\"\\x1eb\\x03\\a\\x00\\x00\\x1eh\" + // 0x1E620307: 0x00001E68\n\t\"\\x1ec\\x03\\a\\x00\\x00\\x1ei\" + // 0x1E630307: 0x00001E69\n\t\"\\x00T\\x03\\a\\x00\\x00\\x1ej\" + // 0x00540307: 0x00001E6A\n\t\"\\x00t\\x03\\a\\x00\\x00\\x1ek\" + // 0x00740307: 0x00001E6B\n\t\"\\x00T\\x03#\\x00\\x00\\x1el\" + // 0x00540323: 0x00001E6C\n\t\"\\x00t\\x03#\\x00\\x00\\x1em\" + // 0x00740323: 0x00001E6D\n\t\"\\x00T\\x031\\x00\\x00\\x1en\" + // 0x00540331: 0x00001E6E\n\t\"\\x00t\\x031\\x00\\x00\\x1eo\" + // 0x00740331: 0x00001E6F\n\t\"\\x00T\\x03-\\x00\\x00\\x1ep\" + // 0x0054032D: 0x00001E70\n\t\"\\x00t\\x03-\\x00\\x00\\x1eq\" + // 0x0074032D: 0x00001E71\n\t\"\\x00U\\x03$\\x00\\x00\\x1er\" + // 0x00550324: 0x00001E72\n\t\"\\x00u\\x03$\\x00\\x00\\x1es\" + // 0x00750324: 0x00001E73\n\t\"\\x00U\\x030\\x00\\x00\\x1et\" + // 0x00550330: 0x00001E74\n\t\"\\x00u\\x030\\x00\\x00\\x1eu\" + // 0x00750330: 0x00001E75\n\t\"\\x00U\\x03-\\x00\\x00\\x1ev\" + // 0x0055032D: 0x00001E76\n\t\"\\x00u\\x03-\\x00\\x00\\x1ew\" + // 0x0075032D: 0x00001E77\n\t\"\\x01h\\x03\\x01\\x00\\x00\\x1ex\" + // 0x01680301: 0x00001E78\n\t\"\\x01i\\x03\\x01\\x00\\x00\\x1ey\" + // 0x01690301: 0x00001E79\n\t\"\\x01j\\x03\\b\\x00\\x00\\x1ez\" + // 0x016A0308: 0x00001E7A\n\t\"\\x01k\\x03\\b\\x00\\x00\\x1e{\" + // 0x016B0308: 0x00001E7B\n\t\"\\x00V\\x03\\x03\\x00\\x00\\x1e|\" + // 0x00560303: 0x00001E7C\n\t\"\\x00v\\x03\\x03\\x00\\x00\\x1e}\" + // 0x00760303: 0x00001E7D\n\t\"\\x00V\\x03#\\x00\\x00\\x1e~\" + // 0x00560323: 0x00001E7E\n\t\"\\x00v\\x03#\\x00\\x00\\x1e\\x7f\" + // 0x00760323: 0x00001E7F\n\t\"\\x00W\\x03\\x00\\x00\\x00\\x1e\\x80\" + // 0x00570300: 0x00001E80\n\t\"\\x00w\\x03\\x00\\x00\\x00\\x1e\\x81\" + // 0x00770300: 0x00001E81\n\t\"\\x00W\\x03\\x01\\x00\\x00\\x1e\\x82\" + // 0x00570301: 0x00001E82\n\t\"\\x00w\\x03\\x01\\x00\\x00\\x1e\\x83\" + // 0x00770301: 0x00001E83\n\t\"\\x00W\\x03\\b\\x00\\x00\\x1e\\x84\" + // 0x00570308: 0x00001E84\n\t\"\\x00w\\x03\\b\\x00\\x00\\x1e\\x85\" + // 0x00770308: 0x00001E85\n\t\"\\x00W\\x03\\a\\x00\\x00\\x1e\\x86\" + // 0x00570307: 0x00001E86\n\t\"\\x00w\\x03\\a\\x00\\x00\\x1e\\x87\" + // 0x00770307: 0x00001E87\n\t\"\\x00W\\x03#\\x00\\x00\\x1e\\x88\" + // 0x00570323: 0x00001E88\n\t\"\\x00w\\x03#\\x00\\x00\\x1e\\x89\" + // 0x00770323: 0x00001E89\n\t\"\\x00X\\x03\\a\\x00\\x00\\x1e\\x8a\" + // 0x00580307: 0x00001E8A\n\t\"\\x00x\\x03\\a\\x00\\x00\\x1e\\x8b\" + // 0x00780307: 0x00001E8B\n\t\"\\x00X\\x03\\b\\x00\\x00\\x1e\\x8c\" + // 0x00580308: 0x00001E8C\n\t\"\\x00x\\x03\\b\\x00\\x00\\x1e\\x8d\" + // 0x00780308: 0x00001E8D\n\t\"\\x00Y\\x03\\a\\x00\\x00\\x1e\\x8e\" + // 0x00590307: 0x00001E8E\n\t\"\\x00y\\x03\\a\\x00\\x00\\x1e\\x8f\" + // 0x00790307: 0x00001E8F\n\t\"\\x00Z\\x03\\x02\\x00\\x00\\x1e\\x90\" + // 0x005A0302: 0x00001E90\n\t\"\\x00z\\x03\\x02\\x00\\x00\\x1e\\x91\" + // 0x007A0302: 0x00001E91\n\t\"\\x00Z\\x03#\\x00\\x00\\x1e\\x92\" + // 0x005A0323: 0x00001E92\n\t\"\\x00z\\x03#\\x00\\x00\\x1e\\x93\" + // 0x007A0323: 0x00001E93\n\t\"\\x00Z\\x031\\x00\\x00\\x1e\\x94\" + // 0x005A0331: 0x00001E94\n\t\"\\x00z\\x031\\x00\\x00\\x1e\\x95\" + // 0x007A0331: 0x00001E95\n\t\"\\x00h\\x031\\x00\\x00\\x1e\\x96\" + // 0x00680331: 0x00001E96\n\t\"\\x00t\\x03\\b\\x00\\x00\\x1e\\x97\" + // 0x00740308: 0x00001E97\n\t\"\\x00w\\x03\\n\\x00\\x00\\x1e\\x98\" + // 0x0077030A: 0x00001E98\n\t\"\\x00y\\x03\\n\\x00\\x00\\x1e\\x99\" + // 0x0079030A: 0x00001E99\n\t\"\\x01\\x7f\\x03\\a\\x00\\x00\\x1e\\x9b\" + // 0x017F0307: 0x00001E9B\n\t\"\\x00A\\x03#\\x00\\x00\\x1e\\xa0\" + // 0x00410323: 0x00001EA0\n\t\"\\x00a\\x03#\\x00\\x00\\x1e\\xa1\" + // 0x00610323: 0x00001EA1\n\t\"\\x00A\\x03\\t\\x00\\x00\\x1e\\xa2\" + // 0x00410309: 0x00001EA2\n\t\"\\x00a\\x03\\t\\x00\\x00\\x1e\\xa3\" + // 0x00610309: 0x00001EA3\n\t\"\\x00\\xc2\\x03\\x01\\x00\\x00\\x1e\\xa4\" + // 0x00C20301: 0x00001EA4\n\t\"\\x00\\xe2\\x03\\x01\\x00\\x00\\x1e\\xa5\" + // 0x00E20301: 0x00001EA5\n\t\"\\x00\\xc2\\x03\\x00\\x00\\x00\\x1e\\xa6\" + // 0x00C20300: 0x00001EA6\n\t\"\\x00\\xe2\\x03\\x00\\x00\\x00\\x1e\\xa7\" + // 0x00E20300: 0x00001EA7\n\t\"\\x00\\xc2\\x03\\t\\x00\\x00\\x1e\\xa8\" + // 0x00C20309: 0x00001EA8\n\t\"\\x00\\xe2\\x03\\t\\x00\\x00\\x1e\\xa9\" + // 0x00E20309: 0x00001EA9\n\t\"\\x00\\xc2\\x03\\x03\\x00\\x00\\x1e\\xaa\" + // 0x00C20303: 0x00001EAA\n\t\"\\x00\\xe2\\x03\\x03\\x00\\x00\\x1e\\xab\" + // 0x00E20303: 0x00001EAB\n\t\"\\x1e\\xa0\\x03\\x02\\x00\\x00\\x1e\\xac\" + // 0x1EA00302: 0x00001EAC\n\t\"\\x1e\\xa1\\x03\\x02\\x00\\x00\\x1e\\xad\" + // 0x1EA10302: 0x00001EAD\n\t\"\\x01\\x02\\x03\\x01\\x00\\x00\\x1e\\xae\" + // 0x01020301: 0x00001EAE\n\t\"\\x01\\x03\\x03\\x01\\x00\\x00\\x1e\\xaf\" + // 0x01030301: 0x00001EAF\n\t\"\\x01\\x02\\x03\\x00\\x00\\x00\\x1e\\xb0\" + // 0x01020300: 0x00001EB0\n\t\"\\x01\\x03\\x03\\x00\\x00\\x00\\x1e\\xb1\" + // 0x01030300: 0x00001EB1\n\t\"\\x01\\x02\\x03\\t\\x00\\x00\\x1e\\xb2\" + // 0x01020309: 0x00001EB2\n\t\"\\x01\\x03\\x03\\t\\x00\\x00\\x1e\\xb3\" + // 0x01030309: 0x00001EB3\n\t\"\\x01\\x02\\x03\\x03\\x00\\x00\\x1e\\xb4\" + // 0x01020303: 0x00001EB4\n\t\"\\x01\\x03\\x03\\x03\\x00\\x00\\x1e\\xb5\" + // 0x01030303: 0x00001EB5\n\t\"\\x1e\\xa0\\x03\\x06\\x00\\x00\\x1e\\xb6\" + // 0x1EA00306: 0x00001EB6\n\t\"\\x1e\\xa1\\x03\\x06\\x00\\x00\\x1e\\xb7\" + // 0x1EA10306: 0x00001EB7\n\t\"\\x00E\\x03#\\x00\\x00\\x1e\\xb8\" + // 0x00450323: 0x00001EB8\n\t\"\\x00e\\x03#\\x00\\x00\\x1e\\xb9\" + // 0x00650323: 0x00001EB9\n\t\"\\x00E\\x03\\t\\x00\\x00\\x1e\\xba\" + // 0x00450309: 0x00001EBA\n\t\"\\x00e\\x03\\t\\x00\\x00\\x1e\\xbb\" + // 0x00650309: 0x00001EBB\n\t\"\\x00E\\x03\\x03\\x00\\x00\\x1e\\xbc\" + // 0x00450303: 0x00001EBC\n\t\"\\x00e\\x03\\x03\\x00\\x00\\x1e\\xbd\" + // 0x00650303: 0x00001EBD\n\t\"\\x00\\xca\\x03\\x01\\x00\\x00\\x1e\\xbe\" + // 0x00CA0301: 0x00001EBE\n\t\"\\x00\\xea\\x03\\x01\\x00\\x00\\x1e\\xbf\" + // 0x00EA0301: 0x00001EBF\n\t\"\\x00\\xca\\x03\\x00\\x00\\x00\\x1e\\xc0\" + // 0x00CA0300: 0x00001EC0\n\t\"\\x00\\xea\\x03\\x00\\x00\\x00\\x1e\\xc1\" + // 0x00EA0300: 0x00001EC1\n\t\"\\x00\\xca\\x03\\t\\x00\\x00\\x1e\\xc2\" + // 0x00CA0309: 0x00001EC2\n\t\"\\x00\\xea\\x03\\t\\x00\\x00\\x1e\\xc3\" + // 0x00EA0309: 0x00001EC3\n\t\"\\x00\\xca\\x03\\x03\\x00\\x00\\x1e\\xc4\" + // 0x00CA0303: 0x00001EC4\n\t\"\\x00\\xea\\x03\\x03\\x00\\x00\\x1e\\xc5\" + // 0x00EA0303: 0x00001EC5\n\t\"\\x1e\\xb8\\x03\\x02\\x00\\x00\\x1e\\xc6\" + // 0x1EB80302: 0x00001EC6\n\t\"\\x1e\\xb9\\x03\\x02\\x00\\x00\\x1e\\xc7\" + // 0x1EB90302: 0x00001EC7\n\t\"\\x00I\\x03\\t\\x00\\x00\\x1e\\xc8\" + // 0x00490309: 0x00001EC8\n\t\"\\x00i\\x03\\t\\x00\\x00\\x1e\\xc9\" + // 0x00690309: 0x00001EC9\n\t\"\\x00I\\x03#\\x00\\x00\\x1e\\xca\" + // 0x00490323: 0x00001ECA\n\t\"\\x00i\\x03#\\x00\\x00\\x1e\\xcb\" + // 0x00690323: 0x00001ECB\n\t\"\\x00O\\x03#\\x00\\x00\\x1e\\xcc\" + // 0x004F0323: 0x00001ECC\n\t\"\\x00o\\x03#\\x00\\x00\\x1e\\xcd\" + // 0x006F0323: 0x00001ECD\n\t\"\\x00O\\x03\\t\\x00\\x00\\x1e\\xce\" + // 0x004F0309: 0x00001ECE\n\t\"\\x00o\\x03\\t\\x00\\x00\\x1e\\xcf\" + // 0x006F0309: 0x00001ECF\n\t\"\\x00\\xd4\\x03\\x01\\x00\\x00\\x1e\\xd0\" + // 0x00D40301: 0x00001ED0\n\t\"\\x00\\xf4\\x03\\x01\\x00\\x00\\x1e\\xd1\" + // 0x00F40301: 0x00001ED1\n\t\"\\x00\\xd4\\x03\\x00\\x00\\x00\\x1e\\xd2\" + // 0x00D40300: 0x00001ED2\n\t\"\\x00\\xf4\\x03\\x00\\x00\\x00\\x1e\\xd3\" + // 0x00F40300: 0x00001ED3\n\t\"\\x00\\xd4\\x03\\t\\x00\\x00\\x1e\\xd4\" + // 0x00D40309: 0x00001ED4\n\t\"\\x00\\xf4\\x03\\t\\x00\\x00\\x1e\\xd5\" + // 0x00F40309: 0x00001ED5\n\t\"\\x00\\xd4\\x03\\x03\\x00\\x00\\x1e\\xd6\" + // 0x00D40303: 0x00001ED6\n\t\"\\x00\\xf4\\x03\\x03\\x00\\x00\\x1e\\xd7\" + // 0x00F40303: 0x00001ED7\n\t\"\\x1e\\xcc\\x03\\x02\\x00\\x00\\x1e\\xd8\" + // 0x1ECC0302: 0x00001ED8\n\t\"\\x1e\\xcd\\x03\\x02\\x00\\x00\\x1e\\xd9\" + // 0x1ECD0302: 0x00001ED9\n\t\"\\x01\\xa0\\x03\\x01\\x00\\x00\\x1e\\xda\" + // 0x01A00301: 0x00001EDA\n\t\"\\x01\\xa1\\x03\\x01\\x00\\x00\\x1e\\xdb\" + // 0x01A10301: 0x00001EDB\n\t\"\\x01\\xa0\\x03\\x00\\x00\\x00\\x1e\\xdc\" + // 0x01A00300: 0x00001EDC\n\t\"\\x01\\xa1\\x03\\x00\\x00\\x00\\x1e\\xdd\" + // 0x01A10300: 0x00001EDD\n\t\"\\x01\\xa0\\x03\\t\\x00\\x00\\x1e\\xde\" + // 0x01A00309: 0x00001EDE\n\t\"\\x01\\xa1\\x03\\t\\x00\\x00\\x1e\\xdf\" + // 0x01A10309: 0x00001EDF\n\t\"\\x01\\xa0\\x03\\x03\\x00\\x00\\x1e\\xe0\" + // 0x01A00303: 0x00001EE0\n\t\"\\x01\\xa1\\x03\\x03\\x00\\x00\\x1e\\xe1\" + // 0x01A10303: 0x00001EE1\n\t\"\\x01\\xa0\\x03#\\x00\\x00\\x1e\\xe2\" + // 0x01A00323: 0x00001EE2\n\t\"\\x01\\xa1\\x03#\\x00\\x00\\x1e\\xe3\" + // 0x01A10323: 0x00001EE3\n\t\"\\x00U\\x03#\\x00\\x00\\x1e\\xe4\" + // 0x00550323: 0x00001EE4\n\t\"\\x00u\\x03#\\x00\\x00\\x1e\\xe5\" + // 0x00750323: 0x00001EE5\n\t\"\\x00U\\x03\\t\\x00\\x00\\x1e\\xe6\" + // 0x00550309: 0x00001EE6\n\t\"\\x00u\\x03\\t\\x00\\x00\\x1e\\xe7\" + // 0x00750309: 0x00001EE7\n\t\"\\x01\\xaf\\x03\\x01\\x00\\x00\\x1e\\xe8\" + // 0x01AF0301: 0x00001EE8\n\t\"\\x01\\xb0\\x03\\x01\\x00\\x00\\x1e\\xe9\" + // 0x01B00301: 0x00001EE9\n\t\"\\x01\\xaf\\x03\\x00\\x00\\x00\\x1e\\xea\" + // 0x01AF0300: 0x00001EEA\n\t\"\\x01\\xb0\\x03\\x00\\x00\\x00\\x1e\\xeb\" + // 0x01B00300: 0x00001EEB\n\t\"\\x01\\xaf\\x03\\t\\x00\\x00\\x1e\\xec\" + // 0x01AF0309: 0x00001EEC\n\t\"\\x01\\xb0\\x03\\t\\x00\\x00\\x1e\\xed\" + // 0x01B00309: 0x00001EED\n\t\"\\x01\\xaf\\x03\\x03\\x00\\x00\\x1e\\xee\" + // 0x01AF0303: 0x00001EEE\n\t\"\\x01\\xb0\\x03\\x03\\x00\\x00\\x1e\\xef\" + // 0x01B00303: 0x00001EEF\n\t\"\\x01\\xaf\\x03#\\x00\\x00\\x1e\\xf0\" + // 0x01AF0323: 0x00001EF0\n\t\"\\x01\\xb0\\x03#\\x00\\x00\\x1e\\xf1\" + // 0x01B00323: 0x00001EF1\n\t\"\\x00Y\\x03\\x00\\x00\\x00\\x1e\\xf2\" + // 0x00590300: 0x00001EF2\n\t\"\\x00y\\x03\\x00\\x00\\x00\\x1e\\xf3\" + // 0x00790300: 0x00001EF3\n\t\"\\x00Y\\x03#\\x00\\x00\\x1e\\xf4\" + // 0x00590323: 0x00001EF4\n\t\"\\x00y\\x03#\\x00\\x00\\x1e\\xf5\" + // 0x00790323: 0x00001EF5\n\t\"\\x00Y\\x03\\t\\x00\\x00\\x1e\\xf6\" + // 0x00590309: 0x00001EF6\n\t\"\\x00y\\x03\\t\\x00\\x00\\x1e\\xf7\" + // 0x00790309: 0x00001EF7\n\t\"\\x00Y\\x03\\x03\\x00\\x00\\x1e\\xf8\" + // 0x00590303: 0x00001EF8\n\t\"\\x00y\\x03\\x03\\x00\\x00\\x1e\\xf9\" + // 0x00790303: 0x00001EF9\n\t\"\\x03\\xb1\\x03\\x13\\x00\\x00\\x1f\\x00\" + // 0x03B10313: 0x00001F00\n\t\"\\x03\\xb1\\x03\\x14\\x00\\x00\\x1f\\x01\" + // 0x03B10314: 0x00001F01\n\t\"\\x1f\\x00\\x03\\x00\\x00\\x00\\x1f\\x02\" + // 0x1F000300: 0x00001F02\n\t\"\\x1f\\x01\\x03\\x00\\x00\\x00\\x1f\\x03\" + // 0x1F010300: 0x00001F03\n\t\"\\x1f\\x00\\x03\\x01\\x00\\x00\\x1f\\x04\" + // 0x1F000301: 0x00001F04\n\t\"\\x1f\\x01\\x03\\x01\\x00\\x00\\x1f\\x05\" + // 0x1F010301: 0x00001F05\n\t\"\\x1f\\x00\\x03B\\x00\\x00\\x1f\\x06\" + // 0x1F000342: 0x00001F06\n\t\"\\x1f\\x01\\x03B\\x00\\x00\\x1f\\a\" + // 0x1F010342: 0x00001F07\n\t\"\\x03\\x91\\x03\\x13\\x00\\x00\\x1f\\b\" + // 0x03910313: 0x00001F08\n\t\"\\x03\\x91\\x03\\x14\\x00\\x00\\x1f\\t\" + // 0x03910314: 0x00001F09\n\t\"\\x1f\\b\\x03\\x00\\x00\\x00\\x1f\\n\" + // 0x1F080300: 0x00001F0A\n\t\"\\x1f\\t\\x03\\x00\\x00\\x00\\x1f\\v\" + // 0x1F090300: 0x00001F0B\n\t\"\\x1f\\b\\x03\\x01\\x00\\x00\\x1f\\f\" + // 0x1F080301: 0x00001F0C\n\t\"\\x1f\\t\\x03\\x01\\x00\\x00\\x1f\\r\" + // 0x1F090301: 0x00001F0D\n\t\"\\x1f\\b\\x03B\\x00\\x00\\x1f\\x0e\" + // 0x1F080342: 0x00001F0E\n\t\"\\x1f\\t\\x03B\\x00\\x00\\x1f\\x0f\" + // 0x1F090342: 0x00001F0F\n\t\"\\x03\\xb5\\x03\\x13\\x00\\x00\\x1f\\x10\" + // 0x03B50313: 0x00001F10\n\t\"\\x03\\xb5\\x03\\x14\\x00\\x00\\x1f\\x11\" + // 0x03B50314: 0x00001F11\n\t\"\\x1f\\x10\\x03\\x00\\x00\\x00\\x1f\\x12\" + // 0x1F100300: 0x00001F12\n\t\"\\x1f\\x11\\x03\\x00\\x00\\x00\\x1f\\x13\" + // 0x1F110300: 0x00001F13\n\t\"\\x1f\\x10\\x03\\x01\\x00\\x00\\x1f\\x14\" + // 0x1F100301: 0x00001F14\n\t\"\\x1f\\x11\\x03\\x01\\x00\\x00\\x1f\\x15\" + // 0x1F110301: 0x00001F15\n\t\"\\x03\\x95\\x03\\x13\\x00\\x00\\x1f\\x18\" + // 0x03950313: 0x00001F18\n\t\"\\x03\\x95\\x03\\x14\\x00\\x00\\x1f\\x19\" + // 0x03950314: 0x00001F19\n\t\"\\x1f\\x18\\x03\\x00\\x00\\x00\\x1f\\x1a\" + // 0x1F180300: 0x00001F1A\n\t\"\\x1f\\x19\\x03\\x00\\x00\\x00\\x1f\\x1b\" + // 0x1F190300: 0x00001F1B\n\t\"\\x1f\\x18\\x03\\x01\\x00\\x00\\x1f\\x1c\" + // 0x1F180301: 0x00001F1C\n\t\"\\x1f\\x19\\x03\\x01\\x00\\x00\\x1f\\x1d\" + // 0x1F190301: 0x00001F1D\n\t\"\\x03\\xb7\\x03\\x13\\x00\\x00\\x1f \" + // 0x03B70313: 0x00001F20\n\t\"\\x03\\xb7\\x03\\x14\\x00\\x00\\x1f!\" + // 0x03B70314: 0x00001F21\n\t\"\\x1f \\x03\\x00\\x00\\x00\\x1f\\\"\" + // 0x1F200300: 0x00001F22\n\t\"\\x1f!\\x03\\x00\\x00\\x00\\x1f#\" + // 0x1F210300: 0x00001F23\n\t\"\\x1f \\x03\\x01\\x00\\x00\\x1f$\" + // 0x1F200301: 0x00001F24\n\t\"\\x1f!\\x03\\x01\\x00\\x00\\x1f%\" + // 0x1F210301: 0x00001F25\n\t\"\\x1f \\x03B\\x00\\x00\\x1f&\" + // 0x1F200342: 0x00001F26\n\t\"\\x1f!\\x03B\\x00\\x00\\x1f'\" + // 0x1F210342: 0x00001F27\n\t\"\\x03\\x97\\x03\\x13\\x00\\x00\\x1f(\" + // 0x03970313: 0x00001F28\n\t\"\\x03\\x97\\x03\\x14\\x00\\x00\\x1f)\" + // 0x03970314: 0x00001F29\n\t\"\\x1f(\\x03\\x00\\x00\\x00\\x1f*\" + // 0x1F280300: 0x00001F2A\n\t\"\\x1f)\\x03\\x00\\x00\\x00\\x1f+\" + // 0x1F290300: 0x00001F2B\n\t\"\\x1f(\\x03\\x01\\x00\\x00\\x1f,\" + // 0x1F280301: 0x00001F2C\n\t\"\\x1f)\\x03\\x01\\x00\\x00\\x1f-\" + // 0x1F290301: 0x00001F2D\n\t\"\\x1f(\\x03B\\x00\\x00\\x1f.\" + // 0x1F280342: 0x00001F2E\n\t\"\\x1f)\\x03B\\x00\\x00\\x1f/\" + // 0x1F290342: 0x00001F2F\n\t\"\\x03\\xb9\\x03\\x13\\x00\\x00\\x1f0\" + // 0x03B90313: 0x00001F30\n\t\"\\x03\\xb9\\x03\\x14\\x00\\x00\\x1f1\" + // 0x03B90314: 0x00001F31\n\t\"\\x1f0\\x03\\x00\\x00\\x00\\x1f2\" + // 0x1F300300: 0x00001F32\n\t\"\\x1f1\\x03\\x00\\x00\\x00\\x1f3\" + // 0x1F310300: 0x00001F33\n\t\"\\x1f0\\x03\\x01\\x00\\x00\\x1f4\" + // 0x1F300301: 0x00001F34\n\t\"\\x1f1\\x03\\x01\\x00\\x00\\x1f5\" + // 0x1F310301: 0x00001F35\n\t\"\\x1f0\\x03B\\x00\\x00\\x1f6\" + // 0x1F300342: 0x00001F36\n\t\"\\x1f1\\x03B\\x00\\x00\\x1f7\" + // 0x1F310342: 0x00001F37\n\t\"\\x03\\x99\\x03\\x13\\x00\\x00\\x1f8\" + // 0x03990313: 0x00001F38\n\t\"\\x03\\x99\\x03\\x14\\x00\\x00\\x1f9\" + // 0x03990314: 0x00001F39\n\t\"\\x1f8\\x03\\x00\\x00\\x00\\x1f:\" + // 0x1F380300: 0x00001F3A\n\t\"\\x1f9\\x03\\x00\\x00\\x00\\x1f;\" + // 0x1F390300: 0x00001F3B\n\t\"\\x1f8\\x03\\x01\\x00\\x00\\x1f<\" + // 0x1F380301: 0x00001F3C\n\t\"\\x1f9\\x03\\x01\\x00\\x00\\x1f=\" + // 0x1F390301: 0x00001F3D\n\t\"\\x1f8\\x03B\\x00\\x00\\x1f>\" + // 0x1F380342: 0x00001F3E\n\t\"\\x1f9\\x03B\\x00\\x00\\x1f?\" + // 0x1F390342: 0x00001F3F\n\t\"\\x03\\xbf\\x03\\x13\\x00\\x00\\x1f@\" + // 0x03BF0313: 0x00001F40\n\t\"\\x03\\xbf\\x03\\x14\\x00\\x00\\x1fA\" + // 0x03BF0314: 0x00001F41\n\t\"\\x1f@\\x03\\x00\\x00\\x00\\x1fB\" + // 0x1F400300: 0x00001F42\n\t\"\\x1fA\\x03\\x00\\x00\\x00\\x1fC\" + // 0x1F410300: 0x00001F43\n\t\"\\x1f@\\x03\\x01\\x00\\x00\\x1fD\" + // 0x1F400301: 0x00001F44\n\t\"\\x1fA\\x03\\x01\\x00\\x00\\x1fE\" + // 0x1F410301: 0x00001F45\n\t\"\\x03\\x9f\\x03\\x13\\x00\\x00\\x1fH\" + // 0x039F0313: 0x00001F48\n\t\"\\x03\\x9f\\x03\\x14\\x00\\x00\\x1fI\" + // 0x039F0314: 0x00001F49\n\t\"\\x1fH\\x03\\x00\\x00\\x00\\x1fJ\" + // 0x1F480300: 0x00001F4A\n\t\"\\x1fI\\x03\\x00\\x00\\x00\\x1fK\" + // 0x1F490300: 0x00001F4B\n\t\"\\x1fH\\x03\\x01\\x00\\x00\\x1fL\" + // 0x1F480301: 0x00001F4C\n\t\"\\x1fI\\x03\\x01\\x00\\x00\\x1fM\" + // 0x1F490301: 0x00001F4D\n\t\"\\x03\\xc5\\x03\\x13\\x00\\x00\\x1fP\" + // 0x03C50313: 0x00001F50\n\t\"\\x03\\xc5\\x03\\x14\\x00\\x00\\x1fQ\" + // 0x03C50314: 0x00001F51\n\t\"\\x1fP\\x03\\x00\\x00\\x00\\x1fR\" + // 0x1F500300: 0x00001F52\n\t\"\\x1fQ\\x03\\x00\\x00\\x00\\x1fS\" + // 0x1F510300: 0x00001F53\n\t\"\\x1fP\\x03\\x01\\x00\\x00\\x1fT\" + // 0x1F500301: 0x00001F54\n\t\"\\x1fQ\\x03\\x01\\x00\\x00\\x1fU\" + // 0x1F510301: 0x00001F55\n\t\"\\x1fP\\x03B\\x00\\x00\\x1fV\" + // 0x1F500342: 0x00001F56\n\t\"\\x1fQ\\x03B\\x00\\x00\\x1fW\" + // 0x1F510342: 0x00001F57\n\t\"\\x03\\xa5\\x03\\x14\\x00\\x00\\x1fY\" + // 0x03A50314: 0x00001F59\n\t\"\\x1fY\\x03\\x00\\x00\\x00\\x1f[\" + // 0x1F590300: 0x00001F5B\n\t\"\\x1fY\\x03\\x01\\x00\\x00\\x1f]\" + // 0x1F590301: 0x00001F5D\n\t\"\\x1fY\\x03B\\x00\\x00\\x1f_\" + // 0x1F590342: 0x00001F5F\n\t\"\\x03\\xc9\\x03\\x13\\x00\\x00\\x1f`\" + // 0x03C90313: 0x00001F60\n\t\"\\x03\\xc9\\x03\\x14\\x00\\x00\\x1fa\" + // 0x03C90314: 0x00001F61\n\t\"\\x1f`\\x03\\x00\\x00\\x00\\x1fb\" + // 0x1F600300: 0x00001F62\n\t\"\\x1fa\\x03\\x00\\x00\\x00\\x1fc\" + // 0x1F610300: 0x00001F63\n\t\"\\x1f`\\x03\\x01\\x00\\x00\\x1fd\" + // 0x1F600301: 0x00001F64\n\t\"\\x1fa\\x03\\x01\\x00\\x00\\x1fe\" + // 0x1F610301: 0x00001F65\n\t\"\\x1f`\\x03B\\x00\\x00\\x1ff\" + // 0x1F600342: 0x00001F66\n\t\"\\x1fa\\x03B\\x00\\x00\\x1fg\" + // 0x1F610342: 0x00001F67\n\t\"\\x03\\xa9\\x03\\x13\\x00\\x00\\x1fh\" + // 0x03A90313: 0x00001F68\n\t\"\\x03\\xa9\\x03\\x14\\x00\\x00\\x1fi\" + // 0x03A90314: 0x00001F69\n\t\"\\x1fh\\x03\\x00\\x00\\x00\\x1fj\" + // 0x1F680300: 0x00001F6A\n\t\"\\x1fi\\x03\\x00\\x00\\x00\\x1fk\" + // 0x1F690300: 0x00001F6B\n\t\"\\x1fh\\x03\\x01\\x00\\x00\\x1fl\" + // 0x1F680301: 0x00001F6C\n\t\"\\x1fi\\x03\\x01\\x00\\x00\\x1fm\" + // 0x1F690301: 0x00001F6D\n\t\"\\x1fh\\x03B\\x00\\x00\\x1fn\" + // 0x1F680342: 0x00001F6E\n\t\"\\x1fi\\x03B\\x00\\x00\\x1fo\" + // 0x1F690342: 0x00001F6F\n\t\"\\x03\\xb1\\x03\\x00\\x00\\x00\\x1fp\" + // 0x03B10300: 0x00001F70\n\t\"\\x03\\xb5\\x03\\x00\\x00\\x00\\x1fr\" + // 0x03B50300: 0x00001F72\n\t\"\\x03\\xb7\\x03\\x00\\x00\\x00\\x1ft\" + // 0x03B70300: 0x00001F74\n\t\"\\x03\\xb9\\x03\\x00\\x00\\x00\\x1fv\" + // 0x03B90300: 0x00001F76\n\t\"\\x03\\xbf\\x03\\x00\\x00\\x00\\x1fx\" + // 0x03BF0300: 0x00001F78\n\t\"\\x03\\xc5\\x03\\x00\\x00\\x00\\x1fz\" + // 0x03C50300: 0x00001F7A\n\t\"\\x03\\xc9\\x03\\x00\\x00\\x00\\x1f|\" + // 0x03C90300: 0x00001F7C\n\t\"\\x1f\\x00\\x03E\\x00\\x00\\x1f\\x80\" + // 0x1F000345: 0x00001F80\n\t\"\\x1f\\x01\\x03E\\x00\\x00\\x1f\\x81\" + // 0x1F010345: 0x00001F81\n\t\"\\x1f\\x02\\x03E\\x00\\x00\\x1f\\x82\" + // 0x1F020345: 0x00001F82\n\t\"\\x1f\\x03\\x03E\\x00\\x00\\x1f\\x83\" + // 0x1F030345: 0x00001F83\n\t\"\\x1f\\x04\\x03E\\x00\\x00\\x1f\\x84\" + // 0x1F040345: 0x00001F84\n\t\"\\x1f\\x05\\x03E\\x00\\x00\\x1f\\x85\" + // 0x1F050345: 0x00001F85\n\t\"\\x1f\\x06\\x03E\\x00\\x00\\x1f\\x86\" + // 0x1F060345: 0x00001F86\n\t\"\\x1f\\a\\x03E\\x00\\x00\\x1f\\x87\" + // 0x1F070345: 0x00001F87\n\t\"\\x1f\\b\\x03E\\x00\\x00\\x1f\\x88\" + // 0x1F080345: 0x00001F88\n\t\"\\x1f\\t\\x03E\\x00\\x00\\x1f\\x89\" + // 0x1F090345: 0x00001F89\n\t\"\\x1f\\n\\x03E\\x00\\x00\\x1f\\x8a\" + // 0x1F0A0345: 0x00001F8A\n\t\"\\x1f\\v\\x03E\\x00\\x00\\x1f\\x8b\" + // 0x1F0B0345: 0x00001F8B\n\t\"\\x1f\\f\\x03E\\x00\\x00\\x1f\\x8c\" + // 0x1F0C0345: 0x00001F8C\n\t\"\\x1f\\r\\x03E\\x00\\x00\\x1f\\x8d\" + // 0x1F0D0345: 0x00001F8D\n\t\"\\x1f\\x0e\\x03E\\x00\\x00\\x1f\\x8e\" + // 0x1F0E0345: 0x00001F8E\n\t\"\\x1f\\x0f\\x03E\\x00\\x00\\x1f\\x8f\" + // 0x1F0F0345: 0x00001F8F\n\t\"\\x1f \\x03E\\x00\\x00\\x1f\\x90\" + // 0x1F200345: 0x00001F90\n\t\"\\x1f!\\x03E\\x00\\x00\\x1f\\x91\" + // 0x1F210345: 0x00001F91\n\t\"\\x1f\\\"\\x03E\\x00\\x00\\x1f\\x92\" + // 0x1F220345: 0x00001F92\n\t\"\\x1f#\\x03E\\x00\\x00\\x1f\\x93\" + // 0x1F230345: 0x00001F93\n\t\"\\x1f$\\x03E\\x00\\x00\\x1f\\x94\" + // 0x1F240345: 0x00001F94\n\t\"\\x1f%\\x03E\\x00\\x00\\x1f\\x95\" + // 0x1F250345: 0x00001F95\n\t\"\\x1f&\\x03E\\x00\\x00\\x1f\\x96\" + // 0x1F260345: 0x00001F96\n\t\"\\x1f'\\x03E\\x00\\x00\\x1f\\x97\" + // 0x1F270345: 0x00001F97\n\t\"\\x1f(\\x03E\\x00\\x00\\x1f\\x98\" + // 0x1F280345: 0x00001F98\n\t\"\\x1f)\\x03E\\x00\\x00\\x1f\\x99\" + // 0x1F290345: 0x00001F99\n\t\"\\x1f*\\x03E\\x00\\x00\\x1f\\x9a\" + // 0x1F2A0345: 0x00001F9A\n\t\"\\x1f+\\x03E\\x00\\x00\\x1f\\x9b\" + // 0x1F2B0345: 0x00001F9B\n\t\"\\x1f,\\x03E\\x00\\x00\\x1f\\x9c\" + // 0x1F2C0345: 0x00001F9C\n\t\"\\x1f-\\x03E\\x00\\x00\\x1f\\x9d\" + // 0x1F2D0345: 0x00001F9D\n\t\"\\x1f.\\x03E\\x00\\x00\\x1f\\x9e\" + // 0x1F2E0345: 0x00001F9E\n\t\"\\x1f/\\x03E\\x00\\x00\\x1f\\x9f\" + // 0x1F2F0345: 0x00001F9F\n\t\"\\x1f`\\x03E\\x00\\x00\\x1f\\xa0\" + // 0x1F600345: 0x00001FA0\n\t\"\\x1fa\\x03E\\x00\\x00\\x1f\\xa1\" + // 0x1F610345: 0x00001FA1\n\t\"\\x1fb\\x03E\\x00\\x00\\x1f\\xa2\" + // 0x1F620345: 0x00001FA2\n\t\"\\x1fc\\x03E\\x00\\x00\\x1f\\xa3\" + // 0x1F630345: 0x00001FA3\n\t\"\\x1fd\\x03E\\x00\\x00\\x1f\\xa4\" + // 0x1F640345: 0x00001FA4\n\t\"\\x1fe\\x03E\\x00\\x00\\x1f\\xa5\" + // 0x1F650345: 0x00001FA5\n\t\"\\x1ff\\x03E\\x00\\x00\\x1f\\xa6\" + // 0x1F660345: 0x00001FA6\n\t\"\\x1fg\\x03E\\x00\\x00\\x1f\\xa7\" + // 0x1F670345: 0x00001FA7\n\t\"\\x1fh\\x03E\\x00\\x00\\x1f\\xa8\" + // 0x1F680345: 0x00001FA8\n\t\"\\x1fi\\x03E\\x00\\x00\\x1f\\xa9\" + // 0x1F690345: 0x00001FA9\n\t\"\\x1fj\\x03E\\x00\\x00\\x1f\\xaa\" + // 0x1F6A0345: 0x00001FAA\n\t\"\\x1fk\\x03E\\x00\\x00\\x1f\\xab\" + // 0x1F6B0345: 0x00001FAB\n\t\"\\x1fl\\x03E\\x00\\x00\\x1f\\xac\" + // 0x1F6C0345: 0x00001FAC\n\t\"\\x1fm\\x03E\\x00\\x00\\x1f\\xad\" + // 0x1F6D0345: 0x00001FAD\n\t\"\\x1fn\\x03E\\x00\\x00\\x1f\\xae\" + // 0x1F6E0345: 0x00001FAE\n\t\"\\x1fo\\x03E\\x00\\x00\\x1f\\xaf\" + // 0x1F6F0345: 0x00001FAF\n\t\"\\x03\\xb1\\x03\\x06\\x00\\x00\\x1f\\xb0\" + // 0x03B10306: 0x00001FB0\n\t\"\\x03\\xb1\\x03\\x04\\x00\\x00\\x1f\\xb1\" + // 0x03B10304: 0x00001FB1\n\t\"\\x1fp\\x03E\\x00\\x00\\x1f\\xb2\" + // 0x1F700345: 0x00001FB2\n\t\"\\x03\\xb1\\x03E\\x00\\x00\\x1f\\xb3\" + // 0x03B10345: 0x00001FB3\n\t\"\\x03\\xac\\x03E\\x00\\x00\\x1f\\xb4\" + // 0x03AC0345: 0x00001FB4\n\t\"\\x03\\xb1\\x03B\\x00\\x00\\x1f\\xb6\" + // 0x03B10342: 0x00001FB6\n\t\"\\x1f\\xb6\\x03E\\x00\\x00\\x1f\\xb7\" + // 0x1FB60345: 0x00001FB7\n\t\"\\x03\\x91\\x03\\x06\\x00\\x00\\x1f\\xb8\" + // 0x03910306: 0x00001FB8\n\t\"\\x03\\x91\\x03\\x04\\x00\\x00\\x1f\\xb9\" + // 0x03910304: 0x00001FB9\n\t\"\\x03\\x91\\x03\\x00\\x00\\x00\\x1f\\xba\" + // 0x03910300: 0x00001FBA\n\t\"\\x03\\x91\\x03E\\x00\\x00\\x1f\\xbc\" + // 0x03910345: 0x00001FBC\n\t\"\\x00\\xa8\\x03B\\x00\\x00\\x1f\\xc1\" + // 0x00A80342: 0x00001FC1\n\t\"\\x1ft\\x03E\\x00\\x00\\x1f\\xc2\" + // 0x1F740345: 0x00001FC2\n\t\"\\x03\\xb7\\x03E\\x00\\x00\\x1f\\xc3\" + // 0x03B70345: 0x00001FC3\n\t\"\\x03\\xae\\x03E\\x00\\x00\\x1f\\xc4\" + // 0x03AE0345: 0x00001FC4\n\t\"\\x03\\xb7\\x03B\\x00\\x00\\x1f\\xc6\" + // 0x03B70342: 0x00001FC6\n\t\"\\x1f\\xc6\\x03E\\x00\\x00\\x1f\\xc7\" + // 0x1FC60345: 0x00001FC7\n\t\"\\x03\\x95\\x03\\x00\\x00\\x00\\x1f\\xc8\" + // 0x03950300: 0x00001FC8\n\t\"\\x03\\x97\\x03\\x00\\x00\\x00\\x1f\\xca\" + // 0x03970300: 0x00001FCA\n\t\"\\x03\\x97\\x03E\\x00\\x00\\x1f\\xcc\" + // 0x03970345: 0x00001FCC\n\t\"\\x1f\\xbf\\x03\\x00\\x00\\x00\\x1f\\xcd\" + // 0x1FBF0300: 0x00001FCD\n\t\"\\x1f\\xbf\\x03\\x01\\x00\\x00\\x1f\\xce\" + // 0x1FBF0301: 0x00001FCE\n\t\"\\x1f\\xbf\\x03B\\x00\\x00\\x1f\\xcf\" + // 0x1FBF0342: 0x00001FCF\n\t\"\\x03\\xb9\\x03\\x06\\x00\\x00\\x1f\\xd0\" + // 0x03B90306: 0x00001FD0\n\t\"\\x03\\xb9\\x03\\x04\\x00\\x00\\x1f\\xd1\" + // 0x03B90304: 0x00001FD1\n\t\"\\x03\\xca\\x03\\x00\\x00\\x00\\x1f\\xd2\" + // 0x03CA0300: 0x00001FD2\n\t\"\\x03\\xb9\\x03B\\x00\\x00\\x1f\\xd6\" + // 0x03B90342: 0x00001FD6\n\t\"\\x03\\xca\\x03B\\x00\\x00\\x1f\\xd7\" + // 0x03CA0342: 0x00001FD7\n\t\"\\x03\\x99\\x03\\x06\\x00\\x00\\x1f\\xd8\" + // 0x03990306: 0x00001FD8\n\t\"\\x03\\x99\\x03\\x04\\x00\\x00\\x1f\\xd9\" + // 0x03990304: 0x00001FD9\n\t\"\\x03\\x99\\x03\\x00\\x00\\x00\\x1f\\xda\" + // 0x03990300: 0x00001FDA\n\t\"\\x1f\\xfe\\x03\\x00\\x00\\x00\\x1f\\xdd\" + // 0x1FFE0300: 0x00001FDD\n\t\"\\x1f\\xfe\\x03\\x01\\x00\\x00\\x1f\\xde\" + // 0x1FFE0301: 0x00001FDE\n\t\"\\x1f\\xfe\\x03B\\x00\\x00\\x1f\\xdf\" + // 0x1FFE0342: 0x00001FDF\n\t\"\\x03\\xc5\\x03\\x06\\x00\\x00\\x1f\\xe0\" + // 0x03C50306: 0x00001FE0\n\t\"\\x03\\xc5\\x03\\x04\\x00\\x00\\x1f\\xe1\" + // 0x03C50304: 0x00001FE1\n\t\"\\x03\\xcb\\x03\\x00\\x00\\x00\\x1f\\xe2\" + // 0x03CB0300: 0x00001FE2\n\t\"\\x03\\xc1\\x03\\x13\\x00\\x00\\x1f\\xe4\" + // 0x03C10313: 0x00001FE4\n\t\"\\x03\\xc1\\x03\\x14\\x00\\x00\\x1f\\xe5\" + // 0x03C10314: 0x00001FE5\n\t\"\\x03\\xc5\\x03B\\x00\\x00\\x1f\\xe6\" + // 0x03C50342: 0x00001FE6\n\t\"\\x03\\xcb\\x03B\\x00\\x00\\x1f\\xe7\" + // 0x03CB0342: 0x00001FE7\n\t\"\\x03\\xa5\\x03\\x06\\x00\\x00\\x1f\\xe8\" + // 0x03A50306: 0x00001FE8\n\t\"\\x03\\xa5\\x03\\x04\\x00\\x00\\x1f\\xe9\" + // 0x03A50304: 0x00001FE9\n\t\"\\x03\\xa5\\x03\\x00\\x00\\x00\\x1f\\xea\" + // 0x03A50300: 0x00001FEA\n\t\"\\x03\\xa1\\x03\\x14\\x00\\x00\\x1f\\xec\" + // 0x03A10314: 0x00001FEC\n\t\"\\x00\\xa8\\x03\\x00\\x00\\x00\\x1f\\xed\" + // 0x00A80300: 0x00001FED\n\t\"\\x1f|\\x03E\\x00\\x00\\x1f\\xf2\" + // 0x1F7C0345: 0x00001FF2\n\t\"\\x03\\xc9\\x03E\\x00\\x00\\x1f\\xf3\" + // 0x03C90345: 0x00001FF3\n\t\"\\x03\\xce\\x03E\\x00\\x00\\x1f\\xf4\" + // 0x03CE0345: 0x00001FF4\n\t\"\\x03\\xc9\\x03B\\x00\\x00\\x1f\\xf6\" + // 0x03C90342: 0x00001FF6\n\t\"\\x1f\\xf6\\x03E\\x00\\x00\\x1f\\xf7\" + // 0x1FF60345: 0x00001FF7\n\t\"\\x03\\x9f\\x03\\x00\\x00\\x00\\x1f\\xf8\" + // 0x039F0300: 0x00001FF8\n\t\"\\x03\\xa9\\x03\\x00\\x00\\x00\\x1f\\xfa\" + // 0x03A90300: 0x00001FFA\n\t\"\\x03\\xa9\\x03E\\x00\\x00\\x1f\\xfc\" + // 0x03A90345: 0x00001FFC\n\t\"!\\x90\\x038\\x00\\x00!\\x9a\" + // 0x21900338: 0x0000219A\n\t\"!\\x92\\x038\\x00\\x00!\\x9b\" + // 0x21920338: 0x0000219B\n\t\"!\\x94\\x038\\x00\\x00!\\xae\" + // 0x21940338: 0x000021AE\n\t\"!\\xd0\\x038\\x00\\x00!\\xcd\" + // 0x21D00338: 0x000021CD\n\t\"!\\xd4\\x038\\x00\\x00!\\xce\" + // 0x21D40338: 0x000021CE\n\t\"!\\xd2\\x038\\x00\\x00!\\xcf\" + // 0x21D20338: 0x000021CF\n\t\"\\\"\\x03\\x038\\x00\\x00\\\"\\x04\" + // 0x22030338: 0x00002204\n\t\"\\\"\\b\\x038\\x00\\x00\\\"\\t\" + // 0x22080338: 0x00002209\n\t\"\\\"\\v\\x038\\x00\\x00\\\"\\f\" + // 0x220B0338: 0x0000220C\n\t\"\\\"#\\x038\\x00\\x00\\\"$\" + // 0x22230338: 0x00002224\n\t\"\\\"%\\x038\\x00\\x00\\\"&\" + // 0x22250338: 0x00002226\n\t\"\\\"<\\x038\\x00\\x00\\\"A\" + // 0x223C0338: 0x00002241\n\t\"\\\"C\\x038\\x00\\x00\\\"D\" + // 0x22430338: 0x00002244\n\t\"\\\"E\\x038\\x00\\x00\\\"G\" + // 0x22450338: 0x00002247\n\t\"\\\"H\\x038\\x00\\x00\\\"I\" + // 0x22480338: 0x00002249\n\t\"\\x00=\\x038\\x00\\x00\\\"`\" + // 0x003D0338: 0x00002260\n\t\"\\\"a\\x038\\x00\\x00\\\"b\" + // 0x22610338: 0x00002262\n\t\"\\\"M\\x038\\x00\\x00\\\"m\" + // 0x224D0338: 0x0000226D\n\t\"\\x00<\\x038\\x00\\x00\\\"n\" + // 0x003C0338: 0x0000226E\n\t\"\\x00>\\x038\\x00\\x00\\\"o\" + // 0x003E0338: 0x0000226F\n\t\"\\\"d\\x038\\x00\\x00\\\"p\" + // 0x22640338: 0x00002270\n\t\"\\\"e\\x038\\x00\\x00\\\"q\" + // 0x22650338: 0x00002271\n\t\"\\\"r\\x038\\x00\\x00\\\"t\" + // 0x22720338: 0x00002274\n\t\"\\\"s\\x038\\x00\\x00\\\"u\" + // 0x22730338: 0x00002275\n\t\"\\\"v\\x038\\x00\\x00\\\"x\" + // 0x22760338: 0x00002278\n\t\"\\\"w\\x038\\x00\\x00\\\"y\" + // 0x22770338: 0x00002279\n\t\"\\\"z\\x038\\x00\\x00\\\"\\x80\" + // 0x227A0338: 0x00002280\n\t\"\\\"{\\x038\\x00\\x00\\\"\\x81\" + // 0x227B0338: 0x00002281\n\t\"\\\"\\x82\\x038\\x00\\x00\\\"\\x84\" + // 0x22820338: 0x00002284\n\t\"\\\"\\x83\\x038\\x00\\x00\\\"\\x85\" + // 0x22830338: 0x00002285\n\t\"\\\"\\x86\\x038\\x00\\x00\\\"\\x88\" + // 0x22860338: 0x00002288\n\t\"\\\"\\x87\\x038\\x00\\x00\\\"\\x89\" + // 0x22870338: 0x00002289\n\t\"\\\"\\xa2\\x038\\x00\\x00\\\"\\xac\" + // 0x22A20338: 0x000022AC\n\t\"\\\"\\xa8\\x038\\x00\\x00\\\"\\xad\" + // 0x22A80338: 0x000022AD\n\t\"\\\"\\xa9\\x038\\x00\\x00\\\"\\xae\" + // 0x22A90338: 0x000022AE\n\t\"\\\"\\xab\\x038\\x00\\x00\\\"\\xaf\" + // 0x22AB0338: 0x000022AF\n\t\"\\\"|\\x038\\x00\\x00\\\"\\xe0\" + // 0x227C0338: 0x000022E0\n\t\"\\\"}\\x038\\x00\\x00\\\"\\xe1\" + // 0x227D0338: 0x000022E1\n\t\"\\\"\\x91\\x038\\x00\\x00\\\"\\xe2\" + // 0x22910338: 0x000022E2\n\t\"\\\"\\x92\\x038\\x00\\x00\\\"\\xe3\" + // 0x22920338: 0x000022E3\n\t\"\\\"\\xb2\\x038\\x00\\x00\\\"\\xea\" + // 0x22B20338: 0x000022EA\n\t\"\\\"\\xb3\\x038\\x00\\x00\\\"\\xeb\" + // 0x22B30338: 0x000022EB\n\t\"\\\"\\xb4\\x038\\x00\\x00\\\"\\xec\" + // 0x22B40338: 0x000022EC\n\t\"\\\"\\xb5\\x038\\x00\\x00\\\"\\xed\" + // 0x22B50338: 0x000022ED\n\t\"0K0\\x99\\x00\\x000L\" + // 0x304B3099: 0x0000304C\n\t\"0M0\\x99\\x00\\x000N\" + // 0x304D3099: 0x0000304E\n\t\"0O0\\x99\\x00\\x000P\" + // 0x304F3099: 0x00003050\n\t\"0Q0\\x99\\x00\\x000R\" + // 0x30513099: 0x00003052\n\t\"0S0\\x99\\x00\\x000T\" + // 0x30533099: 0x00003054\n\t\"0U0\\x99\\x00\\x000V\" + // 0x30553099: 0x00003056\n\t\"0W0\\x99\\x00\\x000X\" + // 0x30573099: 0x00003058\n\t\"0Y0\\x99\\x00\\x000Z\" + // 0x30593099: 0x0000305A\n\t\"0[0\\x99\\x00\\x000\\\\\" + // 0x305B3099: 0x0000305C\n\t\"0]0\\x99\\x00\\x000^\" + // 0x305D3099: 0x0000305E\n\t\"0_0\\x99\\x00\\x000`\" + // 0x305F3099: 0x00003060\n\t\"0a0\\x99\\x00\\x000b\" + // 0x30613099: 0x00003062\n\t\"0d0\\x99\\x00\\x000e\" + // 0x30643099: 0x00003065\n\t\"0f0\\x99\\x00\\x000g\" + // 0x30663099: 0x00003067\n\t\"0h0\\x99\\x00\\x000i\" + // 0x30683099: 0x00003069\n\t\"0o0\\x99\\x00\\x000p\" + // 0x306F3099: 0x00003070\n\t\"0o0\\x9a\\x00\\x000q\" + // 0x306F309A: 0x00003071\n\t\"0r0\\x99\\x00\\x000s\" + // 0x30723099: 0x00003073\n\t\"0r0\\x9a\\x00\\x000t\" + // 0x3072309A: 0x00003074\n\t\"0u0\\x99\\x00\\x000v\" + // 0x30753099: 0x00003076\n\t\"0u0\\x9a\\x00\\x000w\" + // 0x3075309A: 0x00003077\n\t\"0x0\\x99\\x00\\x000y\" + // 0x30783099: 0x00003079\n\t\"0x0\\x9a\\x00\\x000z\" + // 0x3078309A: 0x0000307A\n\t\"0{0\\x99\\x00\\x000|\" + // 0x307B3099: 0x0000307C\n\t\"0{0\\x9a\\x00\\x000}\" + // 0x307B309A: 0x0000307D\n\t\"0F0\\x99\\x00\\x000\\x94\" + // 0x30463099: 0x00003094\n\t\"0\\x9d0\\x99\\x00\\x000\\x9e\" + // 0x309D3099: 0x0000309E\n\t\"0\\xab0\\x99\\x00\\x000\\xac\" + // 0x30AB3099: 0x000030AC\n\t\"0\\xad0\\x99\\x00\\x000\\xae\" + // 0x30AD3099: 0x000030AE\n\t\"0\\xaf0\\x99\\x00\\x000\\xb0\" + // 0x30AF3099: 0x000030B0\n\t\"0\\xb10\\x99\\x00\\x000\\xb2\" + // 0x30B13099: 0x000030B2\n\t\"0\\xb30\\x99\\x00\\x000\\xb4\" + // 0x30B33099: 0x000030B4\n\t\"0\\xb50\\x99\\x00\\x000\\xb6\" + // 0x30B53099: 0x000030B6\n\t\"0\\xb70\\x99\\x00\\x000\\xb8\" + // 0x30B73099: 0x000030B8\n\t\"0\\xb90\\x99\\x00\\x000\\xba\" + // 0x30B93099: 0x000030BA\n\t\"0\\xbb0\\x99\\x00\\x000\\xbc\" + // 0x30BB3099: 0x000030BC\n\t\"0\\xbd0\\x99\\x00\\x000\\xbe\" + // 0x30BD3099: 0x000030BE\n\t\"0\\xbf0\\x99\\x00\\x000\\xc0\" + // 0x30BF3099: 0x000030C0\n\t\"0\\xc10\\x99\\x00\\x000\\xc2\" + // 0x30C13099: 0x000030C2\n\t\"0\\xc40\\x99\\x00\\x000\\xc5\" + // 0x30C43099: 0x000030C5\n\t\"0\\xc60\\x99\\x00\\x000\\xc7\" + // 0x30C63099: 0x000030C7\n\t\"0\\xc80\\x99\\x00\\x000\\xc9\" + // 0x30C83099: 0x000030C9\n\t\"0\\xcf0\\x99\\x00\\x000\\xd0\" + // 0x30CF3099: 0x000030D0\n\t\"0\\xcf0\\x9a\\x00\\x000\\xd1\" + // 0x30CF309A: 0x000030D1\n\t\"0\\xd20\\x99\\x00\\x000\\xd3\" + // 0x30D23099: 0x000030D3\n\t\"0\\xd20\\x9a\\x00\\x000\\xd4\" + // 0x30D2309A: 0x000030D4\n\t\"0\\xd50\\x99\\x00\\x000\\xd6\" + // 0x30D53099: 0x000030D6\n\t\"0\\xd50\\x9a\\x00\\x000\\xd7\" + // 0x30D5309A: 0x000030D7\n\t\"0\\xd80\\x99\\x00\\x000\\xd9\" + // 0x30D83099: 0x000030D9\n\t\"0\\xd80\\x9a\\x00\\x000\\xda\" + // 0x30D8309A: 0x000030DA\n\t\"0\\xdb0\\x99\\x00\\x000\\xdc\" + // 0x30DB3099: 0x000030DC\n\t\"0\\xdb0\\x9a\\x00\\x000\\xdd\" + // 0x30DB309A: 0x000030DD\n\t\"0\\xa60\\x99\\x00\\x000\\xf4\" + // 0x30A63099: 0x000030F4\n\t\"0\\xef0\\x99\\x00\\x000\\xf7\" + // 0x30EF3099: 0x000030F7\n\t\"0\\xf00\\x99\\x00\\x000\\xf8\" + // 0x30F03099: 0x000030F8\n\t\"0\\xf10\\x99\\x00\\x000\\xf9\" + // 0x30F13099: 0x000030F9\n\t\"0\\xf20\\x99\\x00\\x000\\xfa\" + // 0x30F23099: 0x000030FA\n\t\"0\\xfd0\\x99\\x00\\x000\\xfe\" + // 0x30FD3099: 0x000030FE\n\t\"\\x10\\x99\\x10\\xba\\x00\\x01\\x10\\x9a\" + // 0x109910BA: 0x0001109A\n\t\"\\x10\\x9b\\x10\\xba\\x00\\x01\\x10\\x9c\" + // 0x109B10BA: 0x0001109C\n\t\"\\x10\\xa5\\x10\\xba\\x00\\x01\\x10\\xab\" + // 0x10A510BA: 0x000110AB\n\t\"\\x111\\x11'\\x00\\x01\\x11.\" + // 0x11311127: 0x0001112E\n\t\"\\x112\\x11'\\x00\\x01\\x11/\" + // 0x11321127: 0x0001112F\n\t\"\\x13G\\x13>\\x00\\x01\\x13K\" + // 0x1347133E: 0x0001134B\n\t\"\\x13G\\x13W\\x00\\x01\\x13L\" + // 0x13471357: 0x0001134C\n\t\"\\x14\\xb9\\x14\\xba\\x00\\x01\\x14\\xbb\" + // 0x14B914BA: 0x000114BB\n\t\"\\x14\\xb9\\x14\\xb0\\x00\\x01\\x14\\xbc\" + // 0x14B914B0: 0x000114BC\n\t\"\\x14\\xb9\\x14\\xbd\\x00\\x01\\x14\\xbe\" + // 0x14B914BD: 0x000114BE\n\t\"\\x15\\xb8\\x15\\xaf\\x00\\x01\\x15\\xba\" + // 0x15B815AF: 0x000115BA\n\t\"\\x15\\xb9\\x15\\xaf\\x00\\x01\\x15\\xbb\" + // 0x15B915AF: 0x000115BB\n\t\"\\x195\\x190\\x00\\x01\\x198\" + // 0x19351930: 0x00011938\n\t\"\"\n\t// Total size of tables: 56KB (57068 bytes)\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/tables17.0.0.go",
    "content": "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n//go:build go1.27\n\npackage norm\n\nimport \"sync\"\n\nconst (\n\t// Version is the Unicode edition from which the tables are derived.\n\tVersion = \"17.0.0\"\n\n\t// MaxTransformChunkSize indicates the maximum number of bytes that Transform\n\t// may need to write atomically for any Form. Making a destination buffer at\n\t// least this size ensures that Transform can always make progress and that\n\t// the user does not need to grow the buffer on an ErrShortDst.\n\tMaxTransformChunkSize = 35 + maxNonStarters*4\n)\n\nvar ccc = [56]uint8{\n\t0, 1, 6, 7, 8, 9, 10, 11,\n\t12, 13, 14, 15, 16, 17, 18, 19,\n\t20, 21, 22, 23, 24, 25, 26, 27,\n\t28, 29, 30, 31, 32, 33, 34, 35,\n\t36, 84, 91, 103, 107, 118, 122, 129,\n\t130, 132, 202, 214, 216, 218, 220, 222,\n\t224, 226, 228, 230, 232, 233, 234, 240,\n}\n\nconst (\n\tfirstMulti            = 0x199A\n\tfirstCCC              = 0x2DD5\n\tendMulti              = 0x2EBF\n\tfirstLeadingCCC       = 0x4B3F\n\tfirstCCCZeroExcept    = 0x4C99\n\tfirstStarterWithNLead = 0x4CC0\n\tlastDecomp            = 0x4CC2\n\tmaxDecomp             = 0x8000\n)\n\n// decomps: 19650 bytes\nvar decomps = [...]byte{\n\t// Bytes 0 - 3f\n\t0x00, 0x41, 0x20, 0x41, 0x21, 0x41, 0x22, 0x41,\n\t0x23, 0x41, 0x24, 0x41, 0x25, 0x41, 0x26, 0x41,\n\t0x27, 0x41, 0x28, 0x41, 0x29, 0x41, 0x2A, 0x41,\n\t0x2B, 0x41, 0x2C, 0x41, 0x2D, 0x41, 0x2E, 0x41,\n\t0x2F, 0x41, 0x30, 0x41, 0x31, 0x41, 0x32, 0x41,\n\t0x33, 0x41, 0x34, 0x41, 0x35, 0x41, 0x36, 0x41,\n\t0x37, 0x41, 0x38, 0x41, 0x39, 0x41, 0x3A, 0x41,\n\t0x3B, 0x41, 0x3C, 0x41, 0x3D, 0x41, 0x3E, 0x41,\n\t// Bytes 40 - 7f\n\t0x3F, 0x41, 0x40, 0x41, 0x41, 0x41, 0x42, 0x41,\n\t0x43, 0x41, 0x44, 0x41, 0x45, 0x41, 0x46, 0x41,\n\t0x47, 0x41, 0x48, 0x41, 0x49, 0x41, 0x4A, 0x41,\n\t0x4B, 0x41, 0x4C, 0x41, 0x4D, 0x41, 0x4E, 0x41,\n\t0x4F, 0x41, 0x50, 0x41, 0x51, 0x41, 0x52, 0x41,\n\t0x53, 0x41, 0x54, 0x41, 0x55, 0x41, 0x56, 0x41,\n\t0x57, 0x41, 0x58, 0x41, 0x59, 0x41, 0x5A, 0x41,\n\t0x5B, 0x41, 0x5C, 0x41, 0x5D, 0x41, 0x5E, 0x41,\n\t// Bytes 80 - bf\n\t0x5F, 0x41, 0x60, 0x41, 0x61, 0x41, 0x62, 0x41,\n\t0x63, 0x41, 0x64, 0x41, 0x65, 0x41, 0x66, 0x41,\n\t0x67, 0x41, 0x68, 0x41, 0x69, 0x41, 0x6A, 0x41,\n\t0x6B, 0x41, 0x6C, 0x41, 0x6D, 0x41, 0x6E, 0x41,\n\t0x6F, 0x41, 0x70, 0x41, 0x71, 0x41, 0x72, 0x41,\n\t0x73, 0x41, 0x74, 0x41, 0x75, 0x41, 0x76, 0x41,\n\t0x77, 0x41, 0x78, 0x41, 0x79, 0x41, 0x7A, 0x41,\n\t0x7B, 0x41, 0x7C, 0x41, 0x7D, 0x41, 0x7E, 0x42,\n\t// Bytes c0 - ff\n\t0xC2, 0xA2, 0x42, 0xC2, 0xA3, 0x42, 0xC2, 0xA5,\n\t0x42, 0xC2, 0xA6, 0x42, 0xC2, 0xAC, 0x42, 0xC2,\n\t0xB7, 0x42, 0xC3, 0x86, 0x42, 0xC3, 0xA6, 0x42,\n\t0xC3, 0xB0, 0x42, 0xC3, 0xB8, 0x42, 0xC4, 0xA6,\n\t0x42, 0xC4, 0xA7, 0x42, 0xC4, 0xB1, 0x42, 0xC5,\n\t0x8B, 0x42, 0xC5, 0x93, 0x42, 0xC6, 0x8E, 0x42,\n\t0xC6, 0x90, 0x42, 0xC6, 0xAB, 0x42, 0xC7, 0x80,\n\t0x42, 0xC7, 0x81, 0x42, 0xC7, 0x82, 0x42, 0xC8,\n\t// Bytes 100 - 13f\n\t0xA2, 0x42, 0xC8, 0xB7, 0x42, 0xC9, 0x90, 0x42,\n\t0xC9, 0x91, 0x42, 0xC9, 0x92, 0x42, 0xC9, 0x93,\n\t0x42, 0xC9, 0x94, 0x42, 0xC9, 0x95, 0x42, 0xC9,\n\t0x96, 0x42, 0xC9, 0x97, 0x42, 0xC9, 0x98, 0x42,\n\t0xC9, 0x99, 0x42, 0xC9, 0x9B, 0x42, 0xC9, 0x9C,\n\t0x42, 0xC9, 0x9E, 0x42, 0xC9, 0x9F, 0x42, 0xC9,\n\t0xA0, 0x42, 0xC9, 0xA1, 0x42, 0xC9, 0xA2, 0x42,\n\t0xC9, 0xA3, 0x42, 0xC9, 0xA4, 0x42, 0xC9, 0xA5,\n\t// Bytes 140 - 17f\n\t0x42, 0xC9, 0xA6, 0x42, 0xC9, 0xA7, 0x42, 0xC9,\n\t0xA8, 0x42, 0xC9, 0xA9, 0x42, 0xC9, 0xAA, 0x42,\n\t0xC9, 0xAB, 0x42, 0xC9, 0xAC, 0x42, 0xC9, 0xAD,\n\t0x42, 0xC9, 0xAE, 0x42, 0xC9, 0xAF, 0x42, 0xC9,\n\t0xB0, 0x42, 0xC9, 0xB1, 0x42, 0xC9, 0xB2, 0x42,\n\t0xC9, 0xB3, 0x42, 0xC9, 0xB4, 0x42, 0xC9, 0xB5,\n\t0x42, 0xC9, 0xB6, 0x42, 0xC9, 0xB7, 0x42, 0xC9,\n\t0xB8, 0x42, 0xC9, 0xB9, 0x42, 0xC9, 0xBA, 0x42,\n\t// Bytes 180 - 1bf\n\t0xC9, 0xBB, 0x42, 0xC9, 0xBD, 0x42, 0xC9, 0xBE,\n\t0x42, 0xCA, 0x80, 0x42, 0xCA, 0x81, 0x42, 0xCA,\n\t0x82, 0x42, 0xCA, 0x83, 0x42, 0xCA, 0x84, 0x42,\n\t0xCA, 0x88, 0x42, 0xCA, 0x89, 0x42, 0xCA, 0x8A,\n\t0x42, 0xCA, 0x8B, 0x42, 0xCA, 0x8C, 0x42, 0xCA,\n\t0x8D, 0x42, 0xCA, 0x8E, 0x42, 0xCA, 0x8F, 0x42,\n\t0xCA, 0x90, 0x42, 0xCA, 0x91, 0x42, 0xCA, 0x92,\n\t0x42, 0xCA, 0x95, 0x42, 0xCA, 0x98, 0x42, 0xCA,\n\t// Bytes 1c0 - 1ff\n\t0x99, 0x42, 0xCA, 0x9B, 0x42, 0xCA, 0x9C, 0x42,\n\t0xCA, 0x9D, 0x42, 0xCA, 0x9F, 0x42, 0xCA, 0xA1,\n\t0x42, 0xCA, 0xA2, 0x42, 0xCA, 0xA3, 0x42, 0xCA,\n\t0xA4, 0x42, 0xCA, 0xA5, 0x42, 0xCA, 0xA6, 0x42,\n\t0xCA, 0xA7, 0x42, 0xCA, 0xA8, 0x42, 0xCA, 0xA9,\n\t0x42, 0xCA, 0xAA, 0x42, 0xCA, 0xAB, 0x42, 0xCA,\n\t0xB9, 0x42, 0xCB, 0x90, 0x42, 0xCB, 0x91, 0x42,\n\t0xCE, 0x91, 0x42, 0xCE, 0x92, 0x42, 0xCE, 0x93,\n\t// Bytes 200 - 23f\n\t0x42, 0xCE, 0x94, 0x42, 0xCE, 0x95, 0x42, 0xCE,\n\t0x96, 0x42, 0xCE, 0x97, 0x42, 0xCE, 0x98, 0x42,\n\t0xCE, 0x99, 0x42, 0xCE, 0x9A, 0x42, 0xCE, 0x9B,\n\t0x42, 0xCE, 0x9C, 0x42, 0xCE, 0x9D, 0x42, 0xCE,\n\t0x9E, 0x42, 0xCE, 0x9F, 0x42, 0xCE, 0xA0, 0x42,\n\t0xCE, 0xA1, 0x42, 0xCE, 0xA3, 0x42, 0xCE, 0xA4,\n\t0x42, 0xCE, 0xA5, 0x42, 0xCE, 0xA6, 0x42, 0xCE,\n\t0xA7, 0x42, 0xCE, 0xA8, 0x42, 0xCE, 0xA9, 0x42,\n\t// Bytes 240 - 27f\n\t0xCE, 0xB1, 0x42, 0xCE, 0xB2, 0x42, 0xCE, 0xB3,\n\t0x42, 0xCE, 0xB4, 0x42, 0xCE, 0xB5, 0x42, 0xCE,\n\t0xB6, 0x42, 0xCE, 0xB7, 0x42, 0xCE, 0xB8, 0x42,\n\t0xCE, 0xB9, 0x42, 0xCE, 0xBA, 0x42, 0xCE, 0xBB,\n\t0x42, 0xCE, 0xBC, 0x42, 0xCE, 0xBD, 0x42, 0xCE,\n\t0xBE, 0x42, 0xCE, 0xBF, 0x42, 0xCF, 0x80, 0x42,\n\t0xCF, 0x81, 0x42, 0xCF, 0x82, 0x42, 0xCF, 0x83,\n\t0x42, 0xCF, 0x84, 0x42, 0xCF, 0x85, 0x42, 0xCF,\n\t// Bytes 280 - 2bf\n\t0x86, 0x42, 0xCF, 0x87, 0x42, 0xCF, 0x88, 0x42,\n\t0xCF, 0x89, 0x42, 0xCF, 0x9C, 0x42, 0xCF, 0x9D,\n\t0x42, 0xD0, 0xB0, 0x42, 0xD0, 0xB1, 0x42, 0xD0,\n\t0xB2, 0x42, 0xD0, 0xB3, 0x42, 0xD0, 0xB4, 0x42,\n\t0xD0, 0xB5, 0x42, 0xD0, 0xB6, 0x42, 0xD0, 0xB7,\n\t0x42, 0xD0, 0xB8, 0x42, 0xD0, 0xBA, 0x42, 0xD0,\n\t0xBB, 0x42, 0xD0, 0xBC, 0x42, 0xD0, 0xBD, 0x42,\n\t0xD0, 0xBE, 0x42, 0xD0, 0xBF, 0x42, 0xD1, 0x80,\n\t// Bytes 2c0 - 2ff\n\t0x42, 0xD1, 0x81, 0x42, 0xD1, 0x82, 0x42, 0xD1,\n\t0x83, 0x42, 0xD1, 0x84, 0x42, 0xD1, 0x85, 0x42,\n\t0xD1, 0x86, 0x42, 0xD1, 0x87, 0x42, 0xD1, 0x88,\n\t0x42, 0xD1, 0x8A, 0x42, 0xD1, 0x8B, 0x42, 0xD1,\n\t0x8C, 0x42, 0xD1, 0x8D, 0x42, 0xD1, 0x8E, 0x42,\n\t0xD1, 0x95, 0x42, 0xD1, 0x96, 0x42, 0xD1, 0x98,\n\t0x42, 0xD1, 0x9F, 0x42, 0xD2, 0x91, 0x42, 0xD2,\n\t0xAB, 0x42, 0xD2, 0xAF, 0x42, 0xD2, 0xB1, 0x42,\n\t// Bytes 300 - 33f\n\t0xD3, 0x8F, 0x42, 0xD3, 0x99, 0x42, 0xD3, 0xA9,\n\t0x42, 0xD7, 0x90, 0x42, 0xD7, 0x91, 0x42, 0xD7,\n\t0x92, 0x42, 0xD7, 0x93, 0x42, 0xD7, 0x94, 0x42,\n\t0xD7, 0x9B, 0x42, 0xD7, 0x9C, 0x42, 0xD7, 0x9D,\n\t0x42, 0xD7, 0xA2, 0x42, 0xD7, 0xA8, 0x42, 0xD7,\n\t0xAA, 0x42, 0xD8, 0xA1, 0x42, 0xD8, 0xA7, 0x42,\n\t0xD8, 0xA8, 0x42, 0xD8, 0xA9, 0x42, 0xD8, 0xAA,\n\t0x42, 0xD8, 0xAB, 0x42, 0xD8, 0xAC, 0x42, 0xD8,\n\t// Bytes 340 - 37f\n\t0xAD, 0x42, 0xD8, 0xAE, 0x42, 0xD8, 0xAF, 0x42,\n\t0xD8, 0xB0, 0x42, 0xD8, 0xB1, 0x42, 0xD8, 0xB2,\n\t0x42, 0xD8, 0xB3, 0x42, 0xD8, 0xB4, 0x42, 0xD8,\n\t0xB5, 0x42, 0xD8, 0xB6, 0x42, 0xD8, 0xB7, 0x42,\n\t0xD8, 0xB8, 0x42, 0xD8, 0xB9, 0x42, 0xD8, 0xBA,\n\t0x42, 0xD9, 0x81, 0x42, 0xD9, 0x82, 0x42, 0xD9,\n\t0x83, 0x42, 0xD9, 0x84, 0x42, 0xD9, 0x85, 0x42,\n\t0xD9, 0x86, 0x42, 0xD9, 0x87, 0x42, 0xD9, 0x88,\n\t// Bytes 380 - 3bf\n\t0x42, 0xD9, 0x89, 0x42, 0xD9, 0x8A, 0x42, 0xD9,\n\t0xAE, 0x42, 0xD9, 0xAF, 0x42, 0xD9, 0xB1, 0x42,\n\t0xD9, 0xB9, 0x42, 0xD9, 0xBA, 0x42, 0xD9, 0xBB,\n\t0x42, 0xD9, 0xBE, 0x42, 0xD9, 0xBF, 0x42, 0xDA,\n\t0x80, 0x42, 0xDA, 0x83, 0x42, 0xDA, 0x84, 0x42,\n\t0xDA, 0x86, 0x42, 0xDA, 0x87, 0x42, 0xDA, 0x88,\n\t0x42, 0xDA, 0x8C, 0x42, 0xDA, 0x8D, 0x42, 0xDA,\n\t0x8E, 0x42, 0xDA, 0x91, 0x42, 0xDA, 0x98, 0x42,\n\t// Bytes 3c0 - 3ff\n\t0xDA, 0xA1, 0x42, 0xDA, 0xA4, 0x42, 0xDA, 0xA6,\n\t0x42, 0xDA, 0xA9, 0x42, 0xDA, 0xAD, 0x42, 0xDA,\n\t0xAF, 0x42, 0xDA, 0xB1, 0x42, 0xDA, 0xB3, 0x42,\n\t0xDA, 0xBA, 0x42, 0xDA, 0xBB, 0x42, 0xDA, 0xBE,\n\t0x42, 0xDB, 0x81, 0x42, 0xDB, 0x85, 0x42, 0xDB,\n\t0x86, 0x42, 0xDB, 0x87, 0x42, 0xDB, 0x88, 0x42,\n\t0xDB, 0x89, 0x42, 0xDB, 0x8B, 0x42, 0xDB, 0x8C,\n\t0x42, 0xDB, 0x90, 0x42, 0xDB, 0x92, 0x43, 0xE0,\n\t// Bytes 400 - 43f\n\t0xBC, 0x8B, 0x43, 0xE1, 0x83, 0x9C, 0x43, 0xE1,\n\t0x84, 0x80, 0x43, 0xE1, 0x84, 0x81, 0x43, 0xE1,\n\t0x84, 0x82, 0x43, 0xE1, 0x84, 0x83, 0x43, 0xE1,\n\t0x84, 0x84, 0x43, 0xE1, 0x84, 0x85, 0x43, 0xE1,\n\t0x84, 0x86, 0x43, 0xE1, 0x84, 0x87, 0x43, 0xE1,\n\t0x84, 0x88, 0x43, 0xE1, 0x84, 0x89, 0x43, 0xE1,\n\t0x84, 0x8A, 0x43, 0xE1, 0x84, 0x8B, 0x43, 0xE1,\n\t0x84, 0x8C, 0x43, 0xE1, 0x84, 0x8D, 0x43, 0xE1,\n\t// Bytes 440 - 47f\n\t0x84, 0x8E, 0x43, 0xE1, 0x84, 0x8F, 0x43, 0xE1,\n\t0x84, 0x90, 0x43, 0xE1, 0x84, 0x91, 0x43, 0xE1,\n\t0x84, 0x92, 0x43, 0xE1, 0x84, 0x94, 0x43, 0xE1,\n\t0x84, 0x95, 0x43, 0xE1, 0x84, 0x9A, 0x43, 0xE1,\n\t0x84, 0x9C, 0x43, 0xE1, 0x84, 0x9D, 0x43, 0xE1,\n\t0x84, 0x9E, 0x43, 0xE1, 0x84, 0xA0, 0x43, 0xE1,\n\t0x84, 0xA1, 0x43, 0xE1, 0x84, 0xA2, 0x43, 0xE1,\n\t0x84, 0xA3, 0x43, 0xE1, 0x84, 0xA7, 0x43, 0xE1,\n\t// Bytes 480 - 4bf\n\t0x84, 0xA9, 0x43, 0xE1, 0x84, 0xAB, 0x43, 0xE1,\n\t0x84, 0xAC, 0x43, 0xE1, 0x84, 0xAD, 0x43, 0xE1,\n\t0x84, 0xAE, 0x43, 0xE1, 0x84, 0xAF, 0x43, 0xE1,\n\t0x84, 0xB2, 0x43, 0xE1, 0x84, 0xB6, 0x43, 0xE1,\n\t0x85, 0x80, 0x43, 0xE1, 0x85, 0x87, 0x43, 0xE1,\n\t0x85, 0x8C, 0x43, 0xE1, 0x85, 0x97, 0x43, 0xE1,\n\t0x85, 0x98, 0x43, 0xE1, 0x85, 0x99, 0x43, 0xE1,\n\t0x85, 0xA0, 0x43, 0xE1, 0x86, 0x84, 0x43, 0xE1,\n\t// Bytes 4c0 - 4ff\n\t0x86, 0x85, 0x43, 0xE1, 0x86, 0x88, 0x43, 0xE1,\n\t0x86, 0x91, 0x43, 0xE1, 0x86, 0x92, 0x43, 0xE1,\n\t0x86, 0x94, 0x43, 0xE1, 0x86, 0x9E, 0x43, 0xE1,\n\t0x86, 0xA1, 0x43, 0xE1, 0x87, 0x87, 0x43, 0xE1,\n\t0x87, 0x88, 0x43, 0xE1, 0x87, 0x8C, 0x43, 0xE1,\n\t0x87, 0x8E, 0x43, 0xE1, 0x87, 0x93, 0x43, 0xE1,\n\t0x87, 0x97, 0x43, 0xE1, 0x87, 0x99, 0x43, 0xE1,\n\t0x87, 0x9D, 0x43, 0xE1, 0x87, 0x9F, 0x43, 0xE1,\n\t// Bytes 500 - 53f\n\t0x87, 0xB1, 0x43, 0xE1, 0x87, 0xB2, 0x43, 0xE1,\n\t0xB4, 0x82, 0x43, 0xE1, 0xB4, 0x96, 0x43, 0xE1,\n\t0xB4, 0x97, 0x43, 0xE1, 0xB4, 0x9C, 0x43, 0xE1,\n\t0xB4, 0x9D, 0x43, 0xE1, 0xB4, 0xA5, 0x43, 0xE1,\n\t0xB5, 0xBB, 0x43, 0xE1, 0xB6, 0x85, 0x43, 0xE1,\n\t0xB6, 0x91, 0x43, 0xE2, 0x80, 0x82, 0x43, 0xE2,\n\t0x80, 0x83, 0x43, 0xE2, 0x80, 0x90, 0x43, 0xE2,\n\t0x80, 0x93, 0x43, 0xE2, 0x80, 0x94, 0x43, 0xE2,\n\t// Bytes 540 - 57f\n\t0x82, 0xA9, 0x43, 0xE2, 0x86, 0x90, 0x43, 0xE2,\n\t0x86, 0x91, 0x43, 0xE2, 0x86, 0x92, 0x43, 0xE2,\n\t0x86, 0x93, 0x43, 0xE2, 0x88, 0x82, 0x43, 0xE2,\n\t0x88, 0x87, 0x43, 0xE2, 0x88, 0x91, 0x43, 0xE2,\n\t0x88, 0x92, 0x43, 0xE2, 0x94, 0x82, 0x43, 0xE2,\n\t0x96, 0xA0, 0x43, 0xE2, 0x97, 0x8B, 0x43, 0xE2,\n\t0xA6, 0x85, 0x43, 0xE2, 0xA6, 0x86, 0x43, 0xE2,\n\t0xB1, 0xB1, 0x43, 0xE2, 0xB5, 0xA1, 0x43, 0xE3,\n\t// Bytes 580 - 5bf\n\t0x80, 0x81, 0x43, 0xE3, 0x80, 0x82, 0x43, 0xE3,\n\t0x80, 0x88, 0x43, 0xE3, 0x80, 0x89, 0x43, 0xE3,\n\t0x80, 0x8A, 0x43, 0xE3, 0x80, 0x8B, 0x43, 0xE3,\n\t0x80, 0x8C, 0x43, 0xE3, 0x80, 0x8D, 0x43, 0xE3,\n\t0x80, 0x8E, 0x43, 0xE3, 0x80, 0x8F, 0x43, 0xE3,\n\t0x80, 0x90, 0x43, 0xE3, 0x80, 0x91, 0x43, 0xE3,\n\t0x80, 0x92, 0x43, 0xE3, 0x80, 0x94, 0x43, 0xE3,\n\t0x80, 0x95, 0x43, 0xE3, 0x80, 0x96, 0x43, 0xE3,\n\t// Bytes 5c0 - 5ff\n\t0x80, 0x97, 0x43, 0xE3, 0x82, 0xA1, 0x43, 0xE3,\n\t0x82, 0xA2, 0x43, 0xE3, 0x82, 0xA3, 0x43, 0xE3,\n\t0x82, 0xA4, 0x43, 0xE3, 0x82, 0xA5, 0x43, 0xE3,\n\t0x82, 0xA6, 0x43, 0xE3, 0x82, 0xA7, 0x43, 0xE3,\n\t0x82, 0xA8, 0x43, 0xE3, 0x82, 0xA9, 0x43, 0xE3,\n\t0x82, 0xAA, 0x43, 0xE3, 0x82, 0xAB, 0x43, 0xE3,\n\t0x82, 0xAD, 0x43, 0xE3, 0x82, 0xAF, 0x43, 0xE3,\n\t0x82, 0xB1, 0x43, 0xE3, 0x82, 0xB3, 0x43, 0xE3,\n\t// Bytes 600 - 63f\n\t0x82, 0xB5, 0x43, 0xE3, 0x82, 0xB7, 0x43, 0xE3,\n\t0x82, 0xB9, 0x43, 0xE3, 0x82, 0xBB, 0x43, 0xE3,\n\t0x82, 0xBD, 0x43, 0xE3, 0x82, 0xBF, 0x43, 0xE3,\n\t0x83, 0x81, 0x43, 0xE3, 0x83, 0x83, 0x43, 0xE3,\n\t0x83, 0x84, 0x43, 0xE3, 0x83, 0x86, 0x43, 0xE3,\n\t0x83, 0x88, 0x43, 0xE3, 0x83, 0x8A, 0x43, 0xE3,\n\t0x83, 0x8B, 0x43, 0xE3, 0x83, 0x8C, 0x43, 0xE3,\n\t0x83, 0x8D, 0x43, 0xE3, 0x83, 0x8E, 0x43, 0xE3,\n\t// Bytes 640 - 67f\n\t0x83, 0x8F, 0x43, 0xE3, 0x83, 0x92, 0x43, 0xE3,\n\t0x83, 0x95, 0x43, 0xE3, 0x83, 0x98, 0x43, 0xE3,\n\t0x83, 0x9B, 0x43, 0xE3, 0x83, 0x9E, 0x43, 0xE3,\n\t0x83, 0x9F, 0x43, 0xE3, 0x83, 0xA0, 0x43, 0xE3,\n\t0x83, 0xA1, 0x43, 0xE3, 0x83, 0xA2, 0x43, 0xE3,\n\t0x83, 0xA3, 0x43, 0xE3, 0x83, 0xA4, 0x43, 0xE3,\n\t0x83, 0xA5, 0x43, 0xE3, 0x83, 0xA6, 0x43, 0xE3,\n\t0x83, 0xA7, 0x43, 0xE3, 0x83, 0xA8, 0x43, 0xE3,\n\t// Bytes 680 - 6bf\n\t0x83, 0xA9, 0x43, 0xE3, 0x83, 0xAA, 0x43, 0xE3,\n\t0x83, 0xAB, 0x43, 0xE3, 0x83, 0xAC, 0x43, 0xE3,\n\t0x83, 0xAD, 0x43, 0xE3, 0x83, 0xAF, 0x43, 0xE3,\n\t0x83, 0xB0, 0x43, 0xE3, 0x83, 0xB1, 0x43, 0xE3,\n\t0x83, 0xB2, 0x43, 0xE3, 0x83, 0xB3, 0x43, 0xE3,\n\t0x83, 0xBB, 0x43, 0xE3, 0x83, 0xBC, 0x43, 0xE3,\n\t0x92, 0x9E, 0x43, 0xE3, 0x92, 0xB9, 0x43, 0xE3,\n\t0x92, 0xBB, 0x43, 0xE3, 0x93, 0x9F, 0x43, 0xE3,\n\t// Bytes 6c0 - 6ff\n\t0x94, 0x95, 0x43, 0xE3, 0x9B, 0xAE, 0x43, 0xE3,\n\t0x9B, 0xBC, 0x43, 0xE3, 0x9E, 0x81, 0x43, 0xE3,\n\t0xA0, 0xAF, 0x43, 0xE3, 0xA1, 0xA2, 0x43, 0xE3,\n\t0xA1, 0xBC, 0x43, 0xE3, 0xA3, 0x87, 0x43, 0xE3,\n\t0xA3, 0xA3, 0x43, 0xE3, 0xA4, 0x9C, 0x43, 0xE3,\n\t0xA4, 0xBA, 0x43, 0xE3, 0xA8, 0xAE, 0x43, 0xE3,\n\t0xA9, 0xAC, 0x43, 0xE3, 0xAB, 0xA4, 0x43, 0xE3,\n\t0xAC, 0x88, 0x43, 0xE3, 0xAC, 0x99, 0x43, 0xE3,\n\t// Bytes 700 - 73f\n\t0xAD, 0x89, 0x43, 0xE3, 0xAE, 0x9D, 0x43, 0xE3,\n\t0xB0, 0x98, 0x43, 0xE3, 0xB1, 0x8E, 0x43, 0xE3,\n\t0xB4, 0xB3, 0x43, 0xE3, 0xB6, 0x96, 0x43, 0xE3,\n\t0xBA, 0xAC, 0x43, 0xE3, 0xBA, 0xB8, 0x43, 0xE3,\n\t0xBC, 0x9B, 0x43, 0xE3, 0xBF, 0xBC, 0x43, 0xE4,\n\t0x80, 0x88, 0x43, 0xE4, 0x80, 0x98, 0x43, 0xE4,\n\t0x80, 0xB9, 0x43, 0xE4, 0x81, 0x86, 0x43, 0xE4,\n\t0x82, 0x96, 0x43, 0xE4, 0x83, 0xA3, 0x43, 0xE4,\n\t// Bytes 740 - 77f\n\t0x84, 0xAF, 0x43, 0xE4, 0x88, 0x82, 0x43, 0xE4,\n\t0x88, 0xA7, 0x43, 0xE4, 0x8A, 0xA0, 0x43, 0xE4,\n\t0x8C, 0x81, 0x43, 0xE4, 0x8C, 0xB4, 0x43, 0xE4,\n\t0x8D, 0x99, 0x43, 0xE4, 0x8F, 0x95, 0x43, 0xE4,\n\t0x8F, 0x99, 0x43, 0xE4, 0x90, 0x8B, 0x43, 0xE4,\n\t0x91, 0xAB, 0x43, 0xE4, 0x94, 0xAB, 0x43, 0xE4,\n\t0x95, 0x9D, 0x43, 0xE4, 0x95, 0xA1, 0x43, 0xE4,\n\t0x95, 0xAB, 0x43, 0xE4, 0x97, 0x97, 0x43, 0xE4,\n\t// Bytes 780 - 7bf\n\t0x97, 0xB9, 0x43, 0xE4, 0x98, 0xB5, 0x43, 0xE4,\n\t0x9A, 0xBE, 0x43, 0xE4, 0x9B, 0x87, 0x43, 0xE4,\n\t0xA6, 0x95, 0x43, 0xE4, 0xA7, 0xA6, 0x43, 0xE4,\n\t0xA9, 0xAE, 0x43, 0xE4, 0xA9, 0xB6, 0x43, 0xE4,\n\t0xAA, 0xB2, 0x43, 0xE4, 0xAC, 0xB3, 0x43, 0xE4,\n\t0xAF, 0x8E, 0x43, 0xE4, 0xB3, 0x8E, 0x43, 0xE4,\n\t0xB3, 0xAD, 0x43, 0xE4, 0xB3, 0xB8, 0x43, 0xE4,\n\t0xB5, 0x96, 0x43, 0xE4, 0xB8, 0x80, 0x43, 0xE4,\n\t// Bytes 7c0 - 7ff\n\t0xB8, 0x81, 0x43, 0xE4, 0xB8, 0x83, 0x43, 0xE4,\n\t0xB8, 0x89, 0x43, 0xE4, 0xB8, 0x8A, 0x43, 0xE4,\n\t0xB8, 0x8B, 0x43, 0xE4, 0xB8, 0x8D, 0x43, 0xE4,\n\t0xB8, 0x99, 0x43, 0xE4, 0xB8, 0xA6, 0x43, 0xE4,\n\t0xB8, 0xA8, 0x43, 0xE4, 0xB8, 0xAD, 0x43, 0xE4,\n\t0xB8, 0xB2, 0x43, 0xE4, 0xB8, 0xB6, 0x43, 0xE4,\n\t0xB8, 0xB8, 0x43, 0xE4, 0xB8, 0xB9, 0x43, 0xE4,\n\t0xB8, 0xBD, 0x43, 0xE4, 0xB8, 0xBF, 0x43, 0xE4,\n\t// Bytes 800 - 83f\n\t0xB9, 0x81, 0x43, 0xE4, 0xB9, 0x99, 0x43, 0xE4,\n\t0xB9, 0x9D, 0x43, 0xE4, 0xBA, 0x82, 0x43, 0xE4,\n\t0xBA, 0x85, 0x43, 0xE4, 0xBA, 0x86, 0x43, 0xE4,\n\t0xBA, 0x8C, 0x43, 0xE4, 0xBA, 0x94, 0x43, 0xE4,\n\t0xBA, 0xA0, 0x43, 0xE4, 0xBA, 0xA4, 0x43, 0xE4,\n\t0xBA, 0xAE, 0x43, 0xE4, 0xBA, 0xBA, 0x43, 0xE4,\n\t0xBB, 0x80, 0x43, 0xE4, 0xBB, 0x8C, 0x43, 0xE4,\n\t0xBB, 0xA4, 0x43, 0xE4, 0xBC, 0x81, 0x43, 0xE4,\n\t// Bytes 840 - 87f\n\t0xBC, 0x91, 0x43, 0xE4, 0xBD, 0xA0, 0x43, 0xE4,\n\t0xBE, 0x80, 0x43, 0xE4, 0xBE, 0x86, 0x43, 0xE4,\n\t0xBE, 0x8B, 0x43, 0xE4, 0xBE, 0xAE, 0x43, 0xE4,\n\t0xBE, 0xBB, 0x43, 0xE4, 0xBE, 0xBF, 0x43, 0xE5,\n\t0x80, 0x82, 0x43, 0xE5, 0x80, 0xAB, 0x43, 0xE5,\n\t0x81, 0xBA, 0x43, 0xE5, 0x82, 0x99, 0x43, 0xE5,\n\t0x83, 0x8F, 0x43, 0xE5, 0x83, 0x9A, 0x43, 0xE5,\n\t0x83, 0xA7, 0x43, 0xE5, 0x84, 0xAA, 0x43, 0xE5,\n\t// Bytes 880 - 8bf\n\t0x84, 0xBF, 0x43, 0xE5, 0x85, 0x80, 0x43, 0xE5,\n\t0x85, 0x85, 0x43, 0xE5, 0x85, 0x8D, 0x43, 0xE5,\n\t0x85, 0x94, 0x43, 0xE5, 0x85, 0xA4, 0x43, 0xE5,\n\t0x85, 0xA5, 0x43, 0xE5, 0x85, 0xA7, 0x43, 0xE5,\n\t0x85, 0xA8, 0x43, 0xE5, 0x85, 0xA9, 0x43, 0xE5,\n\t0x85, 0xAB, 0x43, 0xE5, 0x85, 0xAD, 0x43, 0xE5,\n\t0x85, 0xB7, 0x43, 0xE5, 0x86, 0x80, 0x43, 0xE5,\n\t0x86, 0x82, 0x43, 0xE5, 0x86, 0x8D, 0x43, 0xE5,\n\t// Bytes 8c0 - 8ff\n\t0x86, 0x92, 0x43, 0xE5, 0x86, 0x95, 0x43, 0xE5,\n\t0x86, 0x96, 0x43, 0xE5, 0x86, 0x97, 0x43, 0xE5,\n\t0x86, 0x99, 0x43, 0xE5, 0x86, 0xA4, 0x43, 0xE5,\n\t0x86, 0xAB, 0x43, 0xE5, 0x86, 0xAC, 0x43, 0xE5,\n\t0x86, 0xB5, 0x43, 0xE5, 0x86, 0xB7, 0x43, 0xE5,\n\t0x87, 0x89, 0x43, 0xE5, 0x87, 0x8C, 0x43, 0xE5,\n\t0x87, 0x9C, 0x43, 0xE5, 0x87, 0x9E, 0x43, 0xE5,\n\t0x87, 0xA0, 0x43, 0xE5, 0x87, 0xB5, 0x43, 0xE5,\n\t// Bytes 900 - 93f\n\t0x88, 0x80, 0x43, 0xE5, 0x88, 0x83, 0x43, 0xE5,\n\t0x88, 0x87, 0x43, 0xE5, 0x88, 0x97, 0x43, 0xE5,\n\t0x88, 0x9D, 0x43, 0xE5, 0x88, 0xA9, 0x43, 0xE5,\n\t0x88, 0xBA, 0x43, 0xE5, 0x88, 0xBB, 0x43, 0xE5,\n\t0x89, 0x86, 0x43, 0xE5, 0x89, 0x8D, 0x43, 0xE5,\n\t0x89, 0xB2, 0x43, 0xE5, 0x89, 0xB7, 0x43, 0xE5,\n\t0x8A, 0x89, 0x43, 0xE5, 0x8A, 0x9B, 0x43, 0xE5,\n\t0x8A, 0xA3, 0x43, 0xE5, 0x8A, 0xB3, 0x43, 0xE5,\n\t// Bytes 940 - 97f\n\t0x8A, 0xB4, 0x43, 0xE5, 0x8B, 0x87, 0x43, 0xE5,\n\t0x8B, 0x89, 0x43, 0xE5, 0x8B, 0x92, 0x43, 0xE5,\n\t0x8B, 0x9E, 0x43, 0xE5, 0x8B, 0xA4, 0x43, 0xE5,\n\t0x8B, 0xB5, 0x43, 0xE5, 0x8B, 0xB9, 0x43, 0xE5,\n\t0x8B, 0xBA, 0x43, 0xE5, 0x8C, 0x85, 0x43, 0xE5,\n\t0x8C, 0x86, 0x43, 0xE5, 0x8C, 0x95, 0x43, 0xE5,\n\t0x8C, 0x97, 0x43, 0xE5, 0x8C, 0x9A, 0x43, 0xE5,\n\t0x8C, 0xB8, 0x43, 0xE5, 0x8C, 0xBB, 0x43, 0xE5,\n\t// Bytes 980 - 9bf\n\t0x8C, 0xBF, 0x43, 0xE5, 0x8D, 0x81, 0x43, 0xE5,\n\t0x8D, 0x84, 0x43, 0xE5, 0x8D, 0x85, 0x43, 0xE5,\n\t0x8D, 0x89, 0x43, 0xE5, 0x8D, 0x91, 0x43, 0xE5,\n\t0x8D, 0x94, 0x43, 0xE5, 0x8D, 0x9A, 0x43, 0xE5,\n\t0x8D, 0x9C, 0x43, 0xE5, 0x8D, 0xA9, 0x43, 0xE5,\n\t0x8D, 0xB0, 0x43, 0xE5, 0x8D, 0xB3, 0x43, 0xE5,\n\t0x8D, 0xB5, 0x43, 0xE5, 0x8D, 0xBD, 0x43, 0xE5,\n\t0x8D, 0xBF, 0x43, 0xE5, 0x8E, 0x82, 0x43, 0xE5,\n\t// Bytes 9c0 - 9ff\n\t0x8E, 0xB6, 0x43, 0xE5, 0x8F, 0x83, 0x43, 0xE5,\n\t0x8F, 0x88, 0x43, 0xE5, 0x8F, 0x8A, 0x43, 0xE5,\n\t0x8F, 0x8C, 0x43, 0xE5, 0x8F, 0x9F, 0x43, 0xE5,\n\t0x8F, 0xA3, 0x43, 0xE5, 0x8F, 0xA5, 0x43, 0xE5,\n\t0x8F, 0xAB, 0x43, 0xE5, 0x8F, 0xAF, 0x43, 0xE5,\n\t0x8F, 0xB1, 0x43, 0xE5, 0x8F, 0xB3, 0x43, 0xE5,\n\t0x90, 0x86, 0x43, 0xE5, 0x90, 0x88, 0x43, 0xE5,\n\t0x90, 0x8D, 0x43, 0xE5, 0x90, 0x8F, 0x43, 0xE5,\n\t// Bytes a00 - a3f\n\t0x90, 0x9D, 0x43, 0xE5, 0x90, 0xB8, 0x43, 0xE5,\n\t0x90, 0xB9, 0x43, 0xE5, 0x91, 0x82, 0x43, 0xE5,\n\t0x91, 0x88, 0x43, 0xE5, 0x91, 0xA8, 0x43, 0xE5,\n\t0x92, 0x9E, 0x43, 0xE5, 0x92, 0xA2, 0x43, 0xE5,\n\t0x92, 0xBD, 0x43, 0xE5, 0x93, 0xB6, 0x43, 0xE5,\n\t0x94, 0x90, 0x43, 0xE5, 0x95, 0x8F, 0x43, 0xE5,\n\t0x95, 0x93, 0x43, 0xE5, 0x95, 0x95, 0x43, 0xE5,\n\t0x95, 0xA3, 0x43, 0xE5, 0x96, 0x84, 0x43, 0xE5,\n\t// Bytes a40 - a7f\n\t0x96, 0x87, 0x43, 0xE5, 0x96, 0x99, 0x43, 0xE5,\n\t0x96, 0x9D, 0x43, 0xE5, 0x96, 0xAB, 0x43, 0xE5,\n\t0x96, 0xB3, 0x43, 0xE5, 0x96, 0xB6, 0x43, 0xE5,\n\t0x97, 0x80, 0x43, 0xE5, 0x97, 0x82, 0x43, 0xE5,\n\t0x97, 0xA2, 0x43, 0xE5, 0x98, 0x86, 0x43, 0xE5,\n\t0x99, 0x91, 0x43, 0xE5, 0x99, 0xA8, 0x43, 0xE5,\n\t0x99, 0xB4, 0x43, 0xE5, 0x9B, 0x97, 0x43, 0xE5,\n\t0x9B, 0x9B, 0x43, 0xE5, 0x9B, 0xB9, 0x43, 0xE5,\n\t// Bytes a80 - abf\n\t0x9C, 0x96, 0x43, 0xE5, 0x9C, 0x97, 0x43, 0xE5,\n\t0x9C, 0x9F, 0x43, 0xE5, 0x9C, 0xB0, 0x43, 0xE5,\n\t0x9E, 0x8B, 0x43, 0xE5, 0x9F, 0x8E, 0x43, 0xE5,\n\t0x9F, 0xB4, 0x43, 0xE5, 0xA0, 0x8D, 0x43, 0xE5,\n\t0xA0, 0xB1, 0x43, 0xE5, 0xA0, 0xB2, 0x43, 0xE5,\n\t0xA1, 0x80, 0x43, 0xE5, 0xA1, 0x9A, 0x43, 0xE5,\n\t0xA1, 0x9E, 0x43, 0xE5, 0xA2, 0xA8, 0x43, 0xE5,\n\t0xA2, 0xAC, 0x43, 0xE5, 0xA2, 0xB3, 0x43, 0xE5,\n\t// Bytes ac0 - aff\n\t0xA3, 0x98, 0x43, 0xE5, 0xA3, 0x9F, 0x43, 0xE5,\n\t0xA3, 0xAB, 0x43, 0xE5, 0xA3, 0xAE, 0x43, 0xE5,\n\t0xA3, 0xB0, 0x43, 0xE5, 0xA3, 0xB2, 0x43, 0xE5,\n\t0xA3, 0xB7, 0x43, 0xE5, 0xA4, 0x82, 0x43, 0xE5,\n\t0xA4, 0x86, 0x43, 0xE5, 0xA4, 0x8A, 0x43, 0xE5,\n\t0xA4, 0x95, 0x43, 0xE5, 0xA4, 0x9A, 0x43, 0xE5,\n\t0xA4, 0x9C, 0x43, 0xE5, 0xA4, 0xA2, 0x43, 0xE5,\n\t0xA4, 0xA7, 0x43, 0xE5, 0xA4, 0xA9, 0x43, 0xE5,\n\t// Bytes b00 - b3f\n\t0xA5, 0x84, 0x43, 0xE5, 0xA5, 0x88, 0x43, 0xE5,\n\t0xA5, 0x91, 0x43, 0xE5, 0xA5, 0x94, 0x43, 0xE5,\n\t0xA5, 0xA2, 0x43, 0xE5, 0xA5, 0xB3, 0x43, 0xE5,\n\t0xA7, 0x98, 0x43, 0xE5, 0xA7, 0xAC, 0x43, 0xE5,\n\t0xA8, 0x9B, 0x43, 0xE5, 0xA8, 0xA7, 0x43, 0xE5,\n\t0xA9, 0xA2, 0x43, 0xE5, 0xA9, 0xA6, 0x43, 0xE5,\n\t0xAA, 0xB5, 0x43, 0xE5, 0xAC, 0x88, 0x43, 0xE5,\n\t0xAC, 0xA8, 0x43, 0xE5, 0xAC, 0xBE, 0x43, 0xE5,\n\t// Bytes b40 - b7f\n\t0xAD, 0x90, 0x43, 0xE5, 0xAD, 0x97, 0x43, 0xE5,\n\t0xAD, 0xA6, 0x43, 0xE5, 0xAE, 0x80, 0x43, 0xE5,\n\t0xAE, 0x85, 0x43, 0xE5, 0xAE, 0x97, 0x43, 0xE5,\n\t0xAF, 0x83, 0x43, 0xE5, 0xAF, 0x98, 0x43, 0xE5,\n\t0xAF, 0xA7, 0x43, 0xE5, 0xAF, 0xAE, 0x43, 0xE5,\n\t0xAF, 0xB3, 0x43, 0xE5, 0xAF, 0xB8, 0x43, 0xE5,\n\t0xAF, 0xBF, 0x43, 0xE5, 0xB0, 0x86, 0x43, 0xE5,\n\t0xB0, 0x8F, 0x43, 0xE5, 0xB0, 0xA2, 0x43, 0xE5,\n\t// Bytes b80 - bbf\n\t0xB0, 0xB8, 0x43, 0xE5, 0xB0, 0xBF, 0x43, 0xE5,\n\t0xB1, 0xA0, 0x43, 0xE5, 0xB1, 0xA2, 0x43, 0xE5,\n\t0xB1, 0xA4, 0x43, 0xE5, 0xB1, 0xA5, 0x43, 0xE5,\n\t0xB1, 0xAE, 0x43, 0xE5, 0xB1, 0xB1, 0x43, 0xE5,\n\t0xB2, 0x8D, 0x43, 0xE5, 0xB3, 0x80, 0x43, 0xE5,\n\t0xB4, 0x99, 0x43, 0xE5, 0xB5, 0x83, 0x43, 0xE5,\n\t0xB5, 0x90, 0x43, 0xE5, 0xB5, 0xAB, 0x43, 0xE5,\n\t0xB5, 0xAE, 0x43, 0xE5, 0xB5, 0xBC, 0x43, 0xE5,\n\t// Bytes bc0 - bff\n\t0xB6, 0xB2, 0x43, 0xE5, 0xB6, 0xBA, 0x43, 0xE5,\n\t0xB7, 0x9B, 0x43, 0xE5, 0xB7, 0xA1, 0x43, 0xE5,\n\t0xB7, 0xA2, 0x43, 0xE5, 0xB7, 0xA5, 0x43, 0xE5,\n\t0xB7, 0xA6, 0x43, 0xE5, 0xB7, 0xB1, 0x43, 0xE5,\n\t0xB7, 0xBD, 0x43, 0xE5, 0xB7, 0xBE, 0x43, 0xE5,\n\t0xB8, 0xA8, 0x43, 0xE5, 0xB8, 0xBD, 0x43, 0xE5,\n\t0xB9, 0xA9, 0x43, 0xE5, 0xB9, 0xB2, 0x43, 0xE5,\n\t0xB9, 0xB4, 0x43, 0xE5, 0xB9, 0xBA, 0x43, 0xE5,\n\t// Bytes c00 - c3f\n\t0xB9, 0xBC, 0x43, 0xE5, 0xB9, 0xBF, 0x43, 0xE5,\n\t0xBA, 0xA6, 0x43, 0xE5, 0xBA, 0xB0, 0x43, 0xE5,\n\t0xBA, 0xB3, 0x43, 0xE5, 0xBA, 0xB6, 0x43, 0xE5,\n\t0xBB, 0x89, 0x43, 0xE5, 0xBB, 0x8A, 0x43, 0xE5,\n\t0xBB, 0x92, 0x43, 0xE5, 0xBB, 0x93, 0x43, 0xE5,\n\t0xBB, 0x99, 0x43, 0xE5, 0xBB, 0xAC, 0x43, 0xE5,\n\t0xBB, 0xB4, 0x43, 0xE5, 0xBB, 0xBE, 0x43, 0xE5,\n\t0xBC, 0x84, 0x43, 0xE5, 0xBC, 0x8B, 0x43, 0xE5,\n\t// Bytes c40 - c7f\n\t0xBC, 0x93, 0x43, 0xE5, 0xBC, 0xA2, 0x43, 0xE5,\n\t0xBD, 0x90, 0x43, 0xE5, 0xBD, 0x93, 0x43, 0xE5,\n\t0xBD, 0xA1, 0x43, 0xE5, 0xBD, 0xA2, 0x43, 0xE5,\n\t0xBD, 0xA9, 0x43, 0xE5, 0xBD, 0xAB, 0x43, 0xE5,\n\t0xBD, 0xB3, 0x43, 0xE5, 0xBE, 0x8B, 0x43, 0xE5,\n\t0xBE, 0x8C, 0x43, 0xE5, 0xBE, 0x97, 0x43, 0xE5,\n\t0xBE, 0x9A, 0x43, 0xE5, 0xBE, 0xA9, 0x43, 0xE5,\n\t0xBE, 0xAD, 0x43, 0xE5, 0xBF, 0x83, 0x43, 0xE5,\n\t// Bytes c80 - cbf\n\t0xBF, 0x8D, 0x43, 0xE5, 0xBF, 0x97, 0x43, 0xE5,\n\t0xBF, 0xB5, 0x43, 0xE5, 0xBF, 0xB9, 0x43, 0xE6,\n\t0x80, 0x92, 0x43, 0xE6, 0x80, 0x9C, 0x43, 0xE6,\n\t0x81, 0xB5, 0x43, 0xE6, 0x82, 0x81, 0x43, 0xE6,\n\t0x82, 0x94, 0x43, 0xE6, 0x83, 0x87, 0x43, 0xE6,\n\t0x83, 0x98, 0x43, 0xE6, 0x83, 0xA1, 0x43, 0xE6,\n\t0x84, 0x88, 0x43, 0xE6, 0x85, 0x84, 0x43, 0xE6,\n\t0x85, 0x88, 0x43, 0xE6, 0x85, 0x8C, 0x43, 0xE6,\n\t// Bytes cc0 - cff\n\t0x85, 0x8E, 0x43, 0xE6, 0x85, 0xA0, 0x43, 0xE6,\n\t0x85, 0xA8, 0x43, 0xE6, 0x85, 0xBA, 0x43, 0xE6,\n\t0x86, 0x8E, 0x43, 0xE6, 0x86, 0x90, 0x43, 0xE6,\n\t0x86, 0xA4, 0x43, 0xE6, 0x86, 0xAF, 0x43, 0xE6,\n\t0x86, 0xB2, 0x43, 0xE6, 0x87, 0x9E, 0x43, 0xE6,\n\t0x87, 0xB2, 0x43, 0xE6, 0x87, 0xB6, 0x43, 0xE6,\n\t0x88, 0x80, 0x43, 0xE6, 0x88, 0x88, 0x43, 0xE6,\n\t0x88, 0x90, 0x43, 0xE6, 0x88, 0x9B, 0x43, 0xE6,\n\t// Bytes d00 - d3f\n\t0x88, 0xAE, 0x43, 0xE6, 0x88, 0xB4, 0x43, 0xE6,\n\t0x88, 0xB6, 0x43, 0xE6, 0x89, 0x8B, 0x43, 0xE6,\n\t0x89, 0x93, 0x43, 0xE6, 0x89, 0x9D, 0x43, 0xE6,\n\t0x8A, 0x95, 0x43, 0xE6, 0x8A, 0xB1, 0x43, 0xE6,\n\t0x8B, 0x89, 0x43, 0xE6, 0x8B, 0x8F, 0x43, 0xE6,\n\t0x8B, 0x93, 0x43, 0xE6, 0x8B, 0x94, 0x43, 0xE6,\n\t0x8B, 0xBC, 0x43, 0xE6, 0x8B, 0xBE, 0x43, 0xE6,\n\t0x8C, 0x87, 0x43, 0xE6, 0x8C, 0xBD, 0x43, 0xE6,\n\t// Bytes d40 - d7f\n\t0x8D, 0x90, 0x43, 0xE6, 0x8D, 0x95, 0x43, 0xE6,\n\t0x8D, 0xA8, 0x43, 0xE6, 0x8D, 0xBB, 0x43, 0xE6,\n\t0x8E, 0x83, 0x43, 0xE6, 0x8E, 0xA0, 0x43, 0xE6,\n\t0x8E, 0xA9, 0x43, 0xE6, 0x8F, 0x84, 0x43, 0xE6,\n\t0x8F, 0x85, 0x43, 0xE6, 0x8F, 0xA4, 0x43, 0xE6,\n\t0x90, 0x9C, 0x43, 0xE6, 0x90, 0xA2, 0x43, 0xE6,\n\t0x91, 0x92, 0x43, 0xE6, 0x91, 0xA9, 0x43, 0xE6,\n\t0x91, 0xB7, 0x43, 0xE6, 0x91, 0xBE, 0x43, 0xE6,\n\t// Bytes d80 - dbf\n\t0x92, 0x9A, 0x43, 0xE6, 0x92, 0x9D, 0x43, 0xE6,\n\t0x93, 0x84, 0x43, 0xE6, 0x94, 0xAF, 0x43, 0xE6,\n\t0x94, 0xB4, 0x43, 0xE6, 0x95, 0x8F, 0x43, 0xE6,\n\t0x95, 0x96, 0x43, 0xE6, 0x95, 0xAC, 0x43, 0xE6,\n\t0x95, 0xB8, 0x43, 0xE6, 0x96, 0x87, 0x43, 0xE6,\n\t0x96, 0x97, 0x43, 0xE6, 0x96, 0x99, 0x43, 0xE6,\n\t0x96, 0xA4, 0x43, 0xE6, 0x96, 0xB0, 0x43, 0xE6,\n\t0x96, 0xB9, 0x43, 0xE6, 0x97, 0x85, 0x43, 0xE6,\n\t// Bytes dc0 - dff\n\t0x97, 0xA0, 0x43, 0xE6, 0x97, 0xA2, 0x43, 0xE6,\n\t0x97, 0xA3, 0x43, 0xE6, 0x97, 0xA5, 0x43, 0xE6,\n\t0x98, 0x93, 0x43, 0xE6, 0x98, 0xA0, 0x43, 0xE6,\n\t0x99, 0x89, 0x43, 0xE6, 0x99, 0xB4, 0x43, 0xE6,\n\t0x9A, 0x88, 0x43, 0xE6, 0x9A, 0x91, 0x43, 0xE6,\n\t0x9A, 0x9C, 0x43, 0xE6, 0x9A, 0xB4, 0x43, 0xE6,\n\t0x9B, 0x86, 0x43, 0xE6, 0x9B, 0xB0, 0x43, 0xE6,\n\t0x9B, 0xB4, 0x43, 0xE6, 0x9B, 0xB8, 0x43, 0xE6,\n\t// Bytes e00 - e3f\n\t0x9C, 0x80, 0x43, 0xE6, 0x9C, 0x88, 0x43, 0xE6,\n\t0x9C, 0x89, 0x43, 0xE6, 0x9C, 0x97, 0x43, 0xE6,\n\t0x9C, 0x9B, 0x43, 0xE6, 0x9C, 0xA1, 0x43, 0xE6,\n\t0x9C, 0xA8, 0x43, 0xE6, 0x9D, 0x8E, 0x43, 0xE6,\n\t0x9D, 0x93, 0x43, 0xE6, 0x9D, 0x96, 0x43, 0xE6,\n\t0x9D, 0x9E, 0x43, 0xE6, 0x9D, 0xBB, 0x43, 0xE6,\n\t0x9E, 0x85, 0x43, 0xE6, 0x9E, 0x97, 0x43, 0xE6,\n\t0x9F, 0xB3, 0x43, 0xE6, 0x9F, 0xBA, 0x43, 0xE6,\n\t// Bytes e40 - e7f\n\t0xA0, 0x97, 0x43, 0xE6, 0xA0, 0x9F, 0x43, 0xE6,\n\t0xA0, 0xAA, 0x43, 0xE6, 0xA1, 0x92, 0x43, 0xE6,\n\t0xA2, 0x81, 0x43, 0xE6, 0xA2, 0x85, 0x43, 0xE6,\n\t0xA2, 0x8E, 0x43, 0xE6, 0xA2, 0xA8, 0x43, 0xE6,\n\t0xA4, 0x94, 0x43, 0xE6, 0xA5, 0x82, 0x43, 0xE6,\n\t0xA6, 0xA3, 0x43, 0xE6, 0xA7, 0xAA, 0x43, 0xE6,\n\t0xA8, 0x82, 0x43, 0xE6, 0xA8, 0x93, 0x43, 0xE6,\n\t0xAA, 0xA8, 0x43, 0xE6, 0xAB, 0x93, 0x43, 0xE6,\n\t// Bytes e80 - ebf\n\t0xAB, 0x9B, 0x43, 0xE6, 0xAC, 0x84, 0x43, 0xE6,\n\t0xAC, 0xA0, 0x43, 0xE6, 0xAC, 0xA1, 0x43, 0xE6,\n\t0xAD, 0x94, 0x43, 0xE6, 0xAD, 0xA2, 0x43, 0xE6,\n\t0xAD, 0xA3, 0x43, 0xE6, 0xAD, 0xB2, 0x43, 0xE6,\n\t0xAD, 0xB7, 0x43, 0xE6, 0xAD, 0xB9, 0x43, 0xE6,\n\t0xAE, 0x9F, 0x43, 0xE6, 0xAE, 0xAE, 0x43, 0xE6,\n\t0xAE, 0xB3, 0x43, 0xE6, 0xAE, 0xBA, 0x43, 0xE6,\n\t0xAE, 0xBB, 0x43, 0xE6, 0xAF, 0x8B, 0x43, 0xE6,\n\t// Bytes ec0 - eff\n\t0xAF, 0x8D, 0x43, 0xE6, 0xAF, 0x94, 0x43, 0xE6,\n\t0xAF, 0x9B, 0x43, 0xE6, 0xB0, 0x8F, 0x43, 0xE6,\n\t0xB0, 0x94, 0x43, 0xE6, 0xB0, 0xB4, 0x43, 0xE6,\n\t0xB1, 0x8E, 0x43, 0xE6, 0xB1, 0xA7, 0x43, 0xE6,\n\t0xB2, 0x88, 0x43, 0xE6, 0xB2, 0xBF, 0x43, 0xE6,\n\t0xB3, 0x8C, 0x43, 0xE6, 0xB3, 0x8D, 0x43, 0xE6,\n\t0xB3, 0xA5, 0x43, 0xE6, 0xB3, 0xA8, 0x43, 0xE6,\n\t0xB4, 0x96, 0x43, 0xE6, 0xB4, 0x9B, 0x43, 0xE6,\n\t// Bytes f00 - f3f\n\t0xB4, 0x9E, 0x43, 0xE6, 0xB4, 0xB4, 0x43, 0xE6,\n\t0xB4, 0xBE, 0x43, 0xE6, 0xB5, 0x81, 0x43, 0xE6,\n\t0xB5, 0xA9, 0x43, 0xE6, 0xB5, 0xAA, 0x43, 0xE6,\n\t0xB5, 0xB7, 0x43, 0xE6, 0xB5, 0xB8, 0x43, 0xE6,\n\t0xB6, 0x85, 0x43, 0xE6, 0xB7, 0x8B, 0x43, 0xE6,\n\t0xB7, 0x9A, 0x43, 0xE6, 0xB7, 0xAA, 0x43, 0xE6,\n\t0xB7, 0xB9, 0x43, 0xE6, 0xB8, 0x9A, 0x43, 0xE6,\n\t0xB8, 0xAF, 0x43, 0xE6, 0xB9, 0xAE, 0x43, 0xE6,\n\t// Bytes f40 - f7f\n\t0xBA, 0x80, 0x43, 0xE6, 0xBA, 0x9C, 0x43, 0xE6,\n\t0xBA, 0xBA, 0x43, 0xE6, 0xBB, 0x87, 0x43, 0xE6,\n\t0xBB, 0x8B, 0x43, 0xE6, 0xBB, 0x91, 0x43, 0xE6,\n\t0xBB, 0x9B, 0x43, 0xE6, 0xBC, 0x8F, 0x43, 0xE6,\n\t0xBC, 0x94, 0x43, 0xE6, 0xBC, 0xA2, 0x43, 0xE6,\n\t0xBC, 0xA3, 0x43, 0xE6, 0xBD, 0xAE, 0x43, 0xE6,\n\t0xBF, 0x86, 0x43, 0xE6, 0xBF, 0xAB, 0x43, 0xE6,\n\t0xBF, 0xBE, 0x43, 0xE7, 0x80, 0x9B, 0x43, 0xE7,\n\t// Bytes f80 - fbf\n\t0x80, 0x9E, 0x43, 0xE7, 0x80, 0xB9, 0x43, 0xE7,\n\t0x81, 0x8A, 0x43, 0xE7, 0x81, 0xAB, 0x43, 0xE7,\n\t0x81, 0xB0, 0x43, 0xE7, 0x81, 0xB7, 0x43, 0xE7,\n\t0x81, 0xBD, 0x43, 0xE7, 0x82, 0x99, 0x43, 0xE7,\n\t0x82, 0xAD, 0x43, 0xE7, 0x83, 0x88, 0x43, 0xE7,\n\t0x83, 0x99, 0x43, 0xE7, 0x84, 0xA1, 0x43, 0xE7,\n\t0x85, 0x85, 0x43, 0xE7, 0x85, 0x89, 0x43, 0xE7,\n\t0x85, 0xAE, 0x43, 0xE7, 0x86, 0x9C, 0x43, 0xE7,\n\t// Bytes fc0 - fff\n\t0x87, 0x8E, 0x43, 0xE7, 0x87, 0x90, 0x43, 0xE7,\n\t0x88, 0x90, 0x43, 0xE7, 0x88, 0x9B, 0x43, 0xE7,\n\t0x88, 0xA8, 0x43, 0xE7, 0x88, 0xAA, 0x43, 0xE7,\n\t0x88, 0xAB, 0x43, 0xE7, 0x88, 0xB5, 0x43, 0xE7,\n\t0x88, 0xB6, 0x43, 0xE7, 0x88, 0xBB, 0x43, 0xE7,\n\t0x88, 0xBF, 0x43, 0xE7, 0x89, 0x87, 0x43, 0xE7,\n\t0x89, 0x90, 0x43, 0xE7, 0x89, 0x99, 0x43, 0xE7,\n\t0x89, 0x9B, 0x43, 0xE7, 0x89, 0xA2, 0x43, 0xE7,\n\t// Bytes 1000 - 103f\n\t0x89, 0xB9, 0x43, 0xE7, 0x8A, 0x80, 0x43, 0xE7,\n\t0x8A, 0x95, 0x43, 0xE7, 0x8A, 0xAC, 0x43, 0xE7,\n\t0x8A, 0xAF, 0x43, 0xE7, 0x8B, 0x80, 0x43, 0xE7,\n\t0x8B, 0xBC, 0x43, 0xE7, 0x8C, 0xAA, 0x43, 0xE7,\n\t0x8D, 0xB5, 0x43, 0xE7, 0x8D, 0xBA, 0x43, 0xE7,\n\t0x8E, 0x84, 0x43, 0xE7, 0x8E, 0x87, 0x43, 0xE7,\n\t0x8E, 0x89, 0x43, 0xE7, 0x8E, 0x8B, 0x43, 0xE7,\n\t0x8E, 0xA5, 0x43, 0xE7, 0x8E, 0xB2, 0x43, 0xE7,\n\t// Bytes 1040 - 107f\n\t0x8F, 0x9E, 0x43, 0xE7, 0x90, 0x86, 0x43, 0xE7,\n\t0x90, 0x89, 0x43, 0xE7, 0x90, 0xA2, 0x43, 0xE7,\n\t0x91, 0x87, 0x43, 0xE7, 0x91, 0x9C, 0x43, 0xE7,\n\t0x91, 0xA9, 0x43, 0xE7, 0x91, 0xB1, 0x43, 0xE7,\n\t0x92, 0x85, 0x43, 0xE7, 0x92, 0x89, 0x43, 0xE7,\n\t0x92, 0x98, 0x43, 0xE7, 0x93, 0x8A, 0x43, 0xE7,\n\t0x93, 0x9C, 0x43, 0xE7, 0x93, 0xA6, 0x43, 0xE7,\n\t0x94, 0x86, 0x43, 0xE7, 0x94, 0x98, 0x43, 0xE7,\n\t// Bytes 1080 - 10bf\n\t0x94, 0x9F, 0x43, 0xE7, 0x94, 0xA4, 0x43, 0xE7,\n\t0x94, 0xA8, 0x43, 0xE7, 0x94, 0xB0, 0x43, 0xE7,\n\t0x94, 0xB2, 0x43, 0xE7, 0x94, 0xB3, 0x43, 0xE7,\n\t0x94, 0xB7, 0x43, 0xE7, 0x94, 0xBB, 0x43, 0xE7,\n\t0x94, 0xBE, 0x43, 0xE7, 0x95, 0x99, 0x43, 0xE7,\n\t0x95, 0xA5, 0x43, 0xE7, 0x95, 0xB0, 0x43, 0xE7,\n\t0x96, 0x8B, 0x43, 0xE7, 0x96, 0x92, 0x43, 0xE7,\n\t0x97, 0xA2, 0x43, 0xE7, 0x98, 0x90, 0x43, 0xE7,\n\t// Bytes 10c0 - 10ff\n\t0x98, 0x9D, 0x43, 0xE7, 0x98, 0x9F, 0x43, 0xE7,\n\t0x99, 0x82, 0x43, 0xE7, 0x99, 0xA9, 0x43, 0xE7,\n\t0x99, 0xB6, 0x43, 0xE7, 0x99, 0xBD, 0x43, 0xE7,\n\t0x9A, 0xAE, 0x43, 0xE7, 0x9A, 0xBF, 0x43, 0xE7,\n\t0x9B, 0x8A, 0x43, 0xE7, 0x9B, 0x9B, 0x43, 0xE7,\n\t0x9B, 0xA3, 0x43, 0xE7, 0x9B, 0xA7, 0x43, 0xE7,\n\t0x9B, 0xAE, 0x43, 0xE7, 0x9B, 0xB4, 0x43, 0xE7,\n\t0x9C, 0x81, 0x43, 0xE7, 0x9C, 0x9E, 0x43, 0xE7,\n\t// Bytes 1100 - 113f\n\t0x9C, 0x9F, 0x43, 0xE7, 0x9D, 0x80, 0x43, 0xE7,\n\t0x9D, 0x8A, 0x43, 0xE7, 0x9E, 0x8B, 0x43, 0xE7,\n\t0x9E, 0xA7, 0x43, 0xE7, 0x9F, 0x9B, 0x43, 0xE7,\n\t0x9F, 0xA2, 0x43, 0xE7, 0x9F, 0xB3, 0x43, 0xE7,\n\t0xA1, 0x8E, 0x43, 0xE7, 0xA1, 0xAB, 0x43, 0xE7,\n\t0xA2, 0x8C, 0x43, 0xE7, 0xA2, 0x91, 0x43, 0xE7,\n\t0xA3, 0x8A, 0x43, 0xE7, 0xA3, 0x8C, 0x43, 0xE7,\n\t0xA3, 0xBB, 0x43, 0xE7, 0xA4, 0xAA, 0x43, 0xE7,\n\t// Bytes 1140 - 117f\n\t0xA4, 0xBA, 0x43, 0xE7, 0xA4, 0xBC, 0x43, 0xE7,\n\t0xA4, 0xBE, 0x43, 0xE7, 0xA5, 0x88, 0x43, 0xE7,\n\t0xA5, 0x89, 0x43, 0xE7, 0xA5, 0x90, 0x43, 0xE7,\n\t0xA5, 0x96, 0x43, 0xE7, 0xA5, 0x9D, 0x43, 0xE7,\n\t0xA5, 0x9E, 0x43, 0xE7, 0xA5, 0xA5, 0x43, 0xE7,\n\t0xA5, 0xBF, 0x43, 0xE7, 0xA6, 0x81, 0x43, 0xE7,\n\t0xA6, 0x8D, 0x43, 0xE7, 0xA6, 0x8E, 0x43, 0xE7,\n\t0xA6, 0x8F, 0x43, 0xE7, 0xA6, 0xAE, 0x43, 0xE7,\n\t// Bytes 1180 - 11bf\n\t0xA6, 0xB8, 0x43, 0xE7, 0xA6, 0xBE, 0x43, 0xE7,\n\t0xA7, 0x8A, 0x43, 0xE7, 0xA7, 0x98, 0x43, 0xE7,\n\t0xA7, 0xAB, 0x43, 0xE7, 0xA8, 0x9C, 0x43, 0xE7,\n\t0xA9, 0x80, 0x43, 0xE7, 0xA9, 0x8A, 0x43, 0xE7,\n\t0xA9, 0x8F, 0x43, 0xE7, 0xA9, 0xB4, 0x43, 0xE7,\n\t0xA9, 0xBA, 0x43, 0xE7, 0xAA, 0x81, 0x43, 0xE7,\n\t0xAA, 0xB1, 0x43, 0xE7, 0xAB, 0x8B, 0x43, 0xE7,\n\t0xAB, 0xAE, 0x43, 0xE7, 0xAB, 0xB9, 0x43, 0xE7,\n\t// Bytes 11c0 - 11ff\n\t0xAC, 0xA0, 0x43, 0xE7, 0xAE, 0x8F, 0x43, 0xE7,\n\t0xAF, 0x80, 0x43, 0xE7, 0xAF, 0x86, 0x43, 0xE7,\n\t0xAF, 0x89, 0x43, 0xE7, 0xB0, 0xBE, 0x43, 0xE7,\n\t0xB1, 0xA0, 0x43, 0xE7, 0xB1, 0xB3, 0x43, 0xE7,\n\t0xB1, 0xBB, 0x43, 0xE7, 0xB2, 0x92, 0x43, 0xE7,\n\t0xB2, 0xBE, 0x43, 0xE7, 0xB3, 0x92, 0x43, 0xE7,\n\t0xB3, 0x96, 0x43, 0xE7, 0xB3, 0xA3, 0x43, 0xE7,\n\t0xB3, 0xA7, 0x43, 0xE7, 0xB3, 0xA8, 0x43, 0xE7,\n\t// Bytes 1200 - 123f\n\t0xB3, 0xB8, 0x43, 0xE7, 0xB4, 0x80, 0x43, 0xE7,\n\t0xB4, 0x90, 0x43, 0xE7, 0xB4, 0xA2, 0x43, 0xE7,\n\t0xB4, 0xAF, 0x43, 0xE7, 0xB5, 0x82, 0x43, 0xE7,\n\t0xB5, 0x9B, 0x43, 0xE7, 0xB5, 0xA3, 0x43, 0xE7,\n\t0xB6, 0xA0, 0x43, 0xE7, 0xB6, 0xBE, 0x43, 0xE7,\n\t0xB7, 0x87, 0x43, 0xE7, 0xB7, 0xB4, 0x43, 0xE7,\n\t0xB8, 0x82, 0x43, 0xE7, 0xB8, 0x89, 0x43, 0xE7,\n\t0xB8, 0xB7, 0x43, 0xE7, 0xB9, 0x81, 0x43, 0xE7,\n\t// Bytes 1240 - 127f\n\t0xB9, 0x85, 0x43, 0xE7, 0xBC, 0xB6, 0x43, 0xE7,\n\t0xBC, 0xBE, 0x43, 0xE7, 0xBD, 0x91, 0x43, 0xE7,\n\t0xBD, 0xB2, 0x43, 0xE7, 0xBD, 0xB9, 0x43, 0xE7,\n\t0xBD, 0xBA, 0x43, 0xE7, 0xBE, 0x85, 0x43, 0xE7,\n\t0xBE, 0x8A, 0x43, 0xE7, 0xBE, 0x95, 0x43, 0xE7,\n\t0xBE, 0x9A, 0x43, 0xE7, 0xBE, 0xBD, 0x43, 0xE7,\n\t0xBF, 0xBA, 0x43, 0xE8, 0x80, 0x81, 0x43, 0xE8,\n\t0x80, 0x85, 0x43, 0xE8, 0x80, 0x8C, 0x43, 0xE8,\n\t// Bytes 1280 - 12bf\n\t0x80, 0x92, 0x43, 0xE8, 0x80, 0xB3, 0x43, 0xE8,\n\t0x81, 0x86, 0x43, 0xE8, 0x81, 0xA0, 0x43, 0xE8,\n\t0x81, 0xAF, 0x43, 0xE8, 0x81, 0xB0, 0x43, 0xE8,\n\t0x81, 0xBE, 0x43, 0xE8, 0x81, 0xBF, 0x43, 0xE8,\n\t0x82, 0x89, 0x43, 0xE8, 0x82, 0x8B, 0x43, 0xE8,\n\t0x82, 0xAD, 0x43, 0xE8, 0x82, 0xB2, 0x43, 0xE8,\n\t0x84, 0x83, 0x43, 0xE8, 0x84, 0xBE, 0x43, 0xE8,\n\t0x87, 0x98, 0x43, 0xE8, 0x87, 0xA3, 0x43, 0xE8,\n\t// Bytes 12c0 - 12ff\n\t0x87, 0xA8, 0x43, 0xE8, 0x87, 0xAA, 0x43, 0xE8,\n\t0x87, 0xAD, 0x43, 0xE8, 0x87, 0xB3, 0x43, 0xE8,\n\t0x87, 0xBC, 0x43, 0xE8, 0x88, 0x81, 0x43, 0xE8,\n\t0x88, 0x84, 0x43, 0xE8, 0x88, 0x8C, 0x43, 0xE8,\n\t0x88, 0x98, 0x43, 0xE8, 0x88, 0x9B, 0x43, 0xE8,\n\t0x88, 0x9F, 0x43, 0xE8, 0x89, 0xAE, 0x43, 0xE8,\n\t0x89, 0xAF, 0x43, 0xE8, 0x89, 0xB2, 0x43, 0xE8,\n\t0x89, 0xB8, 0x43, 0xE8, 0x89, 0xB9, 0x43, 0xE8,\n\t// Bytes 1300 - 133f\n\t0x8A, 0x8B, 0x43, 0xE8, 0x8A, 0x91, 0x43, 0xE8,\n\t0x8A, 0x9D, 0x43, 0xE8, 0x8A, 0xB1, 0x43, 0xE8,\n\t0x8A, 0xB3, 0x43, 0xE8, 0x8A, 0xBD, 0x43, 0xE8,\n\t0x8B, 0xA5, 0x43, 0xE8, 0x8B, 0xA6, 0x43, 0xE8,\n\t0x8C, 0x9D, 0x43, 0xE8, 0x8C, 0xA3, 0x43, 0xE8,\n\t0x8C, 0xB6, 0x43, 0xE8, 0x8D, 0x92, 0x43, 0xE8,\n\t0x8D, 0x93, 0x43, 0xE8, 0x8D, 0xA3, 0x43, 0xE8,\n\t0x8E, 0xAD, 0x43, 0xE8, 0x8E, 0xBD, 0x43, 0xE8,\n\t// Bytes 1340 - 137f\n\t0x8F, 0x89, 0x43, 0xE8, 0x8F, 0x8A, 0x43, 0xE8,\n\t0x8F, 0x8C, 0x43, 0xE8, 0x8F, 0x9C, 0x43, 0xE8,\n\t0x8F, 0xA7, 0x43, 0xE8, 0x8F, 0xAF, 0x43, 0xE8,\n\t0x8F, 0xB1, 0x43, 0xE8, 0x90, 0xBD, 0x43, 0xE8,\n\t0x91, 0x89, 0x43, 0xE8, 0x91, 0x97, 0x43, 0xE8,\n\t0x93, 0xAE, 0x43, 0xE8, 0x93, 0xB1, 0x43, 0xE8,\n\t0x93, 0xB3, 0x43, 0xE8, 0x93, 0xBC, 0x43, 0xE8,\n\t0x94, 0x96, 0x43, 0xE8, 0x95, 0xA4, 0x43, 0xE8,\n\t// Bytes 1380 - 13bf\n\t0x97, 0x8D, 0x43, 0xE8, 0x97, 0xBA, 0x43, 0xE8,\n\t0x98, 0x86, 0x43, 0xE8, 0x98, 0x92, 0x43, 0xE8,\n\t0x98, 0xAD, 0x43, 0xE8, 0x98, 0xBF, 0x43, 0xE8,\n\t0x99, 0x8D, 0x43, 0xE8, 0x99, 0x90, 0x43, 0xE8,\n\t0x99, 0x9C, 0x43, 0xE8, 0x99, 0xA7, 0x43, 0xE8,\n\t0x99, 0xA9, 0x43, 0xE8, 0x99, 0xAB, 0x43, 0xE8,\n\t0x9A, 0x88, 0x43, 0xE8, 0x9A, 0xA9, 0x43, 0xE8,\n\t0x9B, 0xA2, 0x43, 0xE8, 0x9C, 0x8E, 0x43, 0xE8,\n\t// Bytes 13c0 - 13ff\n\t0x9C, 0xA8, 0x43, 0xE8, 0x9D, 0xAB, 0x43, 0xE8,\n\t0x9D, 0xB9, 0x43, 0xE8, 0x9E, 0x86, 0x43, 0xE8,\n\t0x9E, 0xBA, 0x43, 0xE8, 0x9F, 0xA1, 0x43, 0xE8,\n\t0xA0, 0x81, 0x43, 0xE8, 0xA0, 0x9F, 0x43, 0xE8,\n\t0xA1, 0x80, 0x43, 0xE8, 0xA1, 0x8C, 0x43, 0xE8,\n\t0xA1, 0xA0, 0x43, 0xE8, 0xA1, 0xA3, 0x43, 0xE8,\n\t0xA3, 0x82, 0x43, 0xE8, 0xA3, 0x8F, 0x43, 0xE8,\n\t0xA3, 0x97, 0x43, 0xE8, 0xA3, 0x9E, 0x43, 0xE8,\n\t// Bytes 1400 - 143f\n\t0xA3, 0xA1, 0x43, 0xE8, 0xA3, 0xB8, 0x43, 0xE8,\n\t0xA3, 0xBA, 0x43, 0xE8, 0xA4, 0x90, 0x43, 0xE8,\n\t0xA5, 0x81, 0x43, 0xE8, 0xA5, 0xA4, 0x43, 0xE8,\n\t0xA5, 0xBE, 0x43, 0xE8, 0xA6, 0x86, 0x43, 0xE8,\n\t0xA6, 0x8B, 0x43, 0xE8, 0xA6, 0x96, 0x43, 0xE8,\n\t0xA7, 0x92, 0x43, 0xE8, 0xA7, 0xA3, 0x43, 0xE8,\n\t0xA8, 0x80, 0x43, 0xE8, 0xAA, 0xA0, 0x43, 0xE8,\n\t0xAA, 0xAA, 0x43, 0xE8, 0xAA, 0xBF, 0x43, 0xE8,\n\t// Bytes 1440 - 147f\n\t0xAB, 0x8B, 0x43, 0xE8, 0xAB, 0x92, 0x43, 0xE8,\n\t0xAB, 0x96, 0x43, 0xE8, 0xAB, 0xAD, 0x43, 0xE8,\n\t0xAB, 0xB8, 0x43, 0xE8, 0xAB, 0xBE, 0x43, 0xE8,\n\t0xAC, 0x81, 0x43, 0xE8, 0xAC, 0xB9, 0x43, 0xE8,\n\t0xAD, 0x98, 0x43, 0xE8, 0xAE, 0x80, 0x43, 0xE8,\n\t0xAE, 0x8A, 0x43, 0xE8, 0xB0, 0xB7, 0x43, 0xE8,\n\t0xB1, 0x86, 0x43, 0xE8, 0xB1, 0x88, 0x43, 0xE8,\n\t0xB1, 0x95, 0x43, 0xE8, 0xB1, 0xB8, 0x43, 0xE8,\n\t// Bytes 1480 - 14bf\n\t0xB2, 0x9D, 0x43, 0xE8, 0xB2, 0xA1, 0x43, 0xE8,\n\t0xB2, 0xA9, 0x43, 0xE8, 0xB2, 0xAB, 0x43, 0xE8,\n\t0xB3, 0x81, 0x43, 0xE8, 0xB3, 0x82, 0x43, 0xE8,\n\t0xB3, 0x87, 0x43, 0xE8, 0xB3, 0x88, 0x43, 0xE8,\n\t0xB3, 0x93, 0x43, 0xE8, 0xB4, 0x88, 0x43, 0xE8,\n\t0xB4, 0x9B, 0x43, 0xE8, 0xB5, 0xA4, 0x43, 0xE8,\n\t0xB5, 0xB0, 0x43, 0xE8, 0xB5, 0xB7, 0x43, 0xE8,\n\t0xB6, 0xB3, 0x43, 0xE8, 0xB6, 0xBC, 0x43, 0xE8,\n\t// Bytes 14c0 - 14ff\n\t0xB7, 0x8B, 0x43, 0xE8, 0xB7, 0xAF, 0x43, 0xE8,\n\t0xB7, 0xB0, 0x43, 0xE8, 0xBA, 0xAB, 0x43, 0xE8,\n\t0xBB, 0x8A, 0x43, 0xE8, 0xBB, 0x94, 0x43, 0xE8,\n\t0xBC, 0xA6, 0x43, 0xE8, 0xBC, 0xAA, 0x43, 0xE8,\n\t0xBC, 0xB8, 0x43, 0xE8, 0xBC, 0xBB, 0x43, 0xE8,\n\t0xBD, 0xA2, 0x43, 0xE8, 0xBE, 0x9B, 0x43, 0xE8,\n\t0xBE, 0x9E, 0x43, 0xE8, 0xBE, 0xB0, 0x43, 0xE8,\n\t0xBE, 0xB5, 0x43, 0xE8, 0xBE, 0xB6, 0x43, 0xE9,\n\t// Bytes 1500 - 153f\n\t0x80, 0xA3, 0x43, 0xE9, 0x80, 0xB8, 0x43, 0xE9,\n\t0x81, 0x8A, 0x43, 0xE9, 0x81, 0xA9, 0x43, 0xE9,\n\t0x81, 0xB2, 0x43, 0xE9, 0x81, 0xBC, 0x43, 0xE9,\n\t0x82, 0x8F, 0x43, 0xE9, 0x82, 0x91, 0x43, 0xE9,\n\t0x82, 0x94, 0x43, 0xE9, 0x83, 0x8E, 0x43, 0xE9,\n\t0x83, 0x9E, 0x43, 0xE9, 0x83, 0xB1, 0x43, 0xE9,\n\t0x83, 0xBD, 0x43, 0xE9, 0x84, 0x91, 0x43, 0xE9,\n\t0x84, 0x9B, 0x43, 0xE9, 0x85, 0x89, 0x43, 0xE9,\n\t// Bytes 1540 - 157f\n\t0x85, 0x8D, 0x43, 0xE9, 0x85, 0xAA, 0x43, 0xE9,\n\t0x86, 0x99, 0x43, 0xE9, 0x86, 0xB4, 0x43, 0xE9,\n\t0x87, 0x86, 0x43, 0xE9, 0x87, 0x8C, 0x43, 0xE9,\n\t0x87, 0x8F, 0x43, 0xE9, 0x87, 0x91, 0x43, 0xE9,\n\t0x88, 0xB4, 0x43, 0xE9, 0x88, 0xB8, 0x43, 0xE9,\n\t0x89, 0xB6, 0x43, 0xE9, 0x89, 0xBC, 0x43, 0xE9,\n\t0x8B, 0x97, 0x43, 0xE9, 0x8B, 0x98, 0x43, 0xE9,\n\t0x8C, 0x84, 0x43, 0xE9, 0x8D, 0x8A, 0x43, 0xE9,\n\t// Bytes 1580 - 15bf\n\t0x8F, 0xB9, 0x43, 0xE9, 0x90, 0x95, 0x43, 0xE9,\n\t0x95, 0xB7, 0x43, 0xE9, 0x96, 0x80, 0x43, 0xE9,\n\t0x96, 0x8B, 0x43, 0xE9, 0x96, 0xAD, 0x43, 0xE9,\n\t0x96, 0xB7, 0x43, 0xE9, 0x98, 0x9C, 0x43, 0xE9,\n\t0x98, 0xAE, 0x43, 0xE9, 0x99, 0x8B, 0x43, 0xE9,\n\t0x99, 0x8D, 0x43, 0xE9, 0x99, 0xB5, 0x43, 0xE9,\n\t0x99, 0xB8, 0x43, 0xE9, 0x99, 0xBC, 0x43, 0xE9,\n\t0x9A, 0x86, 0x43, 0xE9, 0x9A, 0xA3, 0x43, 0xE9,\n\t// Bytes 15c0 - 15ff\n\t0x9A, 0xB6, 0x43, 0xE9, 0x9A, 0xB7, 0x43, 0xE9,\n\t0x9A, 0xB8, 0x43, 0xE9, 0x9A, 0xB9, 0x43, 0xE9,\n\t0x9B, 0x83, 0x43, 0xE9, 0x9B, 0xA2, 0x43, 0xE9,\n\t0x9B, 0xA3, 0x43, 0xE9, 0x9B, 0xA8, 0x43, 0xE9,\n\t0x9B, 0xB6, 0x43, 0xE9, 0x9B, 0xB7, 0x43, 0xE9,\n\t0x9C, 0xA3, 0x43, 0xE9, 0x9C, 0xB2, 0x43, 0xE9,\n\t0x9D, 0x88, 0x43, 0xE9, 0x9D, 0x91, 0x43, 0xE9,\n\t0x9D, 0x96, 0x43, 0xE9, 0x9D, 0x9E, 0x43, 0xE9,\n\t// Bytes 1600 - 163f\n\t0x9D, 0xA2, 0x43, 0xE9, 0x9D, 0xA9, 0x43, 0xE9,\n\t0x9F, 0x8B, 0x43, 0xE9, 0x9F, 0x9B, 0x43, 0xE9,\n\t0x9F, 0xA0, 0x43, 0xE9, 0x9F, 0xAD, 0x43, 0xE9,\n\t0x9F, 0xB3, 0x43, 0xE9, 0x9F, 0xBF, 0x43, 0xE9,\n\t0xA0, 0x81, 0x43, 0xE9, 0xA0, 0x85, 0x43, 0xE9,\n\t0xA0, 0x8B, 0x43, 0xE9, 0xA0, 0x98, 0x43, 0xE9,\n\t0xA0, 0xA9, 0x43, 0xE9, 0xA0, 0xBB, 0x43, 0xE9,\n\t0xA1, 0x9E, 0x43, 0xE9, 0xA2, 0xA8, 0x43, 0xE9,\n\t// Bytes 1640 - 167f\n\t0xA3, 0x9B, 0x43, 0xE9, 0xA3, 0x9F, 0x43, 0xE9,\n\t0xA3, 0xA2, 0x43, 0xE9, 0xA3, 0xAF, 0x43, 0xE9,\n\t0xA3, 0xBC, 0x43, 0xE9, 0xA4, 0xA8, 0x43, 0xE9,\n\t0xA4, 0xA9, 0x43, 0xE9, 0xA6, 0x96, 0x43, 0xE9,\n\t0xA6, 0x99, 0x43, 0xE9, 0xA6, 0xA7, 0x43, 0xE9,\n\t0xA6, 0xAC, 0x43, 0xE9, 0xA7, 0x82, 0x43, 0xE9,\n\t0xA7, 0xB1, 0x43, 0xE9, 0xA7, 0xBE, 0x43, 0xE9,\n\t0xA9, 0xAA, 0x43, 0xE9, 0xAA, 0xA8, 0x43, 0xE9,\n\t// Bytes 1680 - 16bf\n\t0xAB, 0x98, 0x43, 0xE9, 0xAB, 0x9F, 0x43, 0xE9,\n\t0xAC, 0x92, 0x43, 0xE9, 0xAC, 0xA5, 0x43, 0xE9,\n\t0xAC, 0xAF, 0x43, 0xE9, 0xAC, 0xB2, 0x43, 0xE9,\n\t0xAC, 0xBC, 0x43, 0xE9, 0xAD, 0x9A, 0x43, 0xE9,\n\t0xAD, 0xAF, 0x43, 0xE9, 0xB1, 0x80, 0x43, 0xE9,\n\t0xB1, 0x97, 0x43, 0xE9, 0xB3, 0xA5, 0x43, 0xE9,\n\t0xB3, 0xBD, 0x43, 0xE9, 0xB5, 0xA7, 0x43, 0xE9,\n\t0xB6, 0xB4, 0x43, 0xE9, 0xB7, 0xBA, 0x43, 0xE9,\n\t// Bytes 16c0 - 16ff\n\t0xB8, 0x9E, 0x43, 0xE9, 0xB9, 0xB5, 0x43, 0xE9,\n\t0xB9, 0xBF, 0x43, 0xE9, 0xBA, 0x97, 0x43, 0xE9,\n\t0xBA, 0x9F, 0x43, 0xE9, 0xBA, 0xA5, 0x43, 0xE9,\n\t0xBA, 0xBB, 0x43, 0xE9, 0xBB, 0x83, 0x43, 0xE9,\n\t0xBB, 0x8D, 0x43, 0xE9, 0xBB, 0x8E, 0x43, 0xE9,\n\t0xBB, 0x91, 0x43, 0xE9, 0xBB, 0xB9, 0x43, 0xE9,\n\t0xBB, 0xBD, 0x43, 0xE9, 0xBB, 0xBE, 0x43, 0xE9,\n\t0xBC, 0x85, 0x43, 0xE9, 0xBC, 0x8E, 0x43, 0xE9,\n\t// Bytes 1700 - 173f\n\t0xBC, 0x8F, 0x43, 0xE9, 0xBC, 0x93, 0x43, 0xE9,\n\t0xBC, 0x96, 0x43, 0xE9, 0xBC, 0xA0, 0x43, 0xE9,\n\t0xBC, 0xBB, 0x43, 0xE9, 0xBD, 0x83, 0x43, 0xE9,\n\t0xBD, 0x8A, 0x43, 0xE9, 0xBD, 0x92, 0x43, 0xE9,\n\t0xBE, 0x8D, 0x43, 0xE9, 0xBE, 0x8E, 0x43, 0xE9,\n\t0xBE, 0x9C, 0x43, 0xE9, 0xBE, 0x9F, 0x43, 0xE9,\n\t0xBE, 0xA0, 0x43, 0xEA, 0x99, 0x91, 0x43, 0xEA,\n\t0x9A, 0x89, 0x43, 0xEA, 0x9C, 0xA7, 0x43, 0xEA,\n\t// Bytes 1740 - 177f\n\t0x9D, 0xAF, 0x43, 0xEA, 0x9E, 0x8E, 0x43, 0xEA,\n\t0xAC, 0xB7, 0x43, 0xEA, 0xAD, 0x92, 0x43, 0xEA,\n\t0xAD, 0xA6, 0x43, 0xEA, 0xAD, 0xA7, 0x44, 0xF0,\n\t0x9D, 0xBC, 0x84, 0x44, 0xF0, 0x9D, 0xBC, 0x85,\n\t0x44, 0xF0, 0x9D, 0xBC, 0x86, 0x44, 0xF0, 0x9D,\n\t0xBC, 0x88, 0x44, 0xF0, 0x9D, 0xBC, 0x8A, 0x44,\n\t0xF0, 0x9D, 0xBC, 0x9E, 0x44, 0xF0, 0xA0, 0x84,\n\t0xA2, 0x44, 0xF0, 0xA0, 0x94, 0x9C, 0x44, 0xF0,\n\t// Bytes 1780 - 17bf\n\t0xA0, 0x94, 0xA5, 0x44, 0xF0, 0xA0, 0x95, 0x8B,\n\t0x44, 0xF0, 0xA0, 0x98, 0xBA, 0x44, 0xF0, 0xA0,\n\t0xA0, 0x84, 0x44, 0xF0, 0xA0, 0xA3, 0x9E, 0x44,\n\t0xF0, 0xA0, 0xA8, 0xAC, 0x44, 0xF0, 0xA0, 0xAD,\n\t0xA3, 0x44, 0xF0, 0xA1, 0x93, 0xA4, 0x44, 0xF0,\n\t0xA1, 0x9A, 0xA8, 0x44, 0xF0, 0xA1, 0x9B, 0xAA,\n\t0x44, 0xF0, 0xA1, 0xA7, 0x88, 0x44, 0xF0, 0xA1,\n\t0xAC, 0x98, 0x44, 0xF0, 0xA1, 0xB4, 0x8B, 0x44,\n\t// Bytes 17c0 - 17ff\n\t0xF0, 0xA1, 0xB7, 0xA4, 0x44, 0xF0, 0xA1, 0xB7,\n\t0xA6, 0x44, 0xF0, 0xA2, 0x86, 0x83, 0x44, 0xF0,\n\t0xA2, 0x86, 0x9F, 0x44, 0xF0, 0xA2, 0x8C, 0xB1,\n\t0x44, 0xF0, 0xA2, 0x9B, 0x94, 0x44, 0xF0, 0xA2,\n\t0xA1, 0x84, 0x44, 0xF0, 0xA2, 0xA1, 0x8A, 0x44,\n\t0xF0, 0xA2, 0xAC, 0x8C, 0x44, 0xF0, 0xA2, 0xAF,\n\t0xB1, 0x44, 0xF0, 0xA3, 0x80, 0x8A, 0x44, 0xF0,\n\t0xA3, 0x8A, 0xB8, 0x44, 0xF0, 0xA3, 0x8D, 0x9F,\n\t// Bytes 1800 - 183f\n\t0x44, 0xF0, 0xA3, 0x8E, 0x93, 0x44, 0xF0, 0xA3,\n\t0x8E, 0x9C, 0x44, 0xF0, 0xA3, 0x8F, 0x83, 0x44,\n\t0xF0, 0xA3, 0x8F, 0x95, 0x44, 0xF0, 0xA3, 0x91,\n\t0xAD, 0x44, 0xF0, 0xA3, 0x9A, 0xA3, 0x44, 0xF0,\n\t0xA3, 0xA2, 0xA7, 0x44, 0xF0, 0xA3, 0xAA, 0x8D,\n\t0x44, 0xF0, 0xA3, 0xAB, 0xBA, 0x44, 0xF0, 0xA3,\n\t0xB2, 0xBC, 0x44, 0xF0, 0xA3, 0xB4, 0x9E, 0x44,\n\t0xF0, 0xA3, 0xBB, 0x91, 0x44, 0xF0, 0xA3, 0xBD,\n\t// Bytes 1840 - 187f\n\t0x9E, 0x44, 0xF0, 0xA3, 0xBE, 0x8E, 0x44, 0xF0,\n\t0xA4, 0x89, 0xA3, 0x44, 0xF0, 0xA4, 0x8B, 0xAE,\n\t0x44, 0xF0, 0xA4, 0x8E, 0xAB, 0x44, 0xF0, 0xA4,\n\t0x98, 0x88, 0x44, 0xF0, 0xA4, 0x9C, 0xB5, 0x44,\n\t0xF0, 0xA4, 0xA0, 0x94, 0x44, 0xF0, 0xA4, 0xB0,\n\t0xB6, 0x44, 0xF0, 0xA4, 0xB2, 0x92, 0x44, 0xF0,\n\t0xA4, 0xBE, 0xA1, 0x44, 0xF0, 0xA4, 0xBE, 0xB8,\n\t0x44, 0xF0, 0xA5, 0x81, 0x84, 0x44, 0xF0, 0xA5,\n\t// Bytes 1880 - 18bf\n\t0x83, 0xB2, 0x44, 0xF0, 0xA5, 0x83, 0xB3, 0x44,\n\t0xF0, 0xA5, 0x84, 0x99, 0x44, 0xF0, 0xA5, 0x84,\n\t0xB3, 0x44, 0xF0, 0xA5, 0x89, 0x89, 0x44, 0xF0,\n\t0xA5, 0x90, 0x9D, 0x44, 0xF0, 0xA5, 0x98, 0xA6,\n\t0x44, 0xF0, 0xA5, 0x9A, 0x9A, 0x44, 0xF0, 0xA5,\n\t0x9B, 0x85, 0x44, 0xF0, 0xA5, 0xA5, 0xBC, 0x44,\n\t0xF0, 0xA5, 0xAA, 0xA7, 0x44, 0xF0, 0xA5, 0xAE,\n\t0xAB, 0x44, 0xF0, 0xA5, 0xB2, 0x80, 0x44, 0xF0,\n\t// Bytes 18c0 - 18ff\n\t0xA5, 0xB3, 0x90, 0x44, 0xF0, 0xA5, 0xBE, 0x86,\n\t0x44, 0xF0, 0xA6, 0x87, 0x9A, 0x44, 0xF0, 0xA6,\n\t0x88, 0xA8, 0x44, 0xF0, 0xA6, 0x89, 0x87, 0x44,\n\t0xF0, 0xA6, 0x8B, 0x99, 0x44, 0xF0, 0xA6, 0x8C,\n\t0xBE, 0x44, 0xF0, 0xA6, 0x93, 0x9A, 0x44, 0xF0,\n\t0xA6, 0x94, 0xA3, 0x44, 0xF0, 0xA6, 0x96, 0xA8,\n\t0x44, 0xF0, 0xA6, 0x9E, 0xA7, 0x44, 0xF0, 0xA6,\n\t0x9E, 0xB5, 0x44, 0xF0, 0xA6, 0xAC, 0xBC, 0x44,\n\t// Bytes 1900 - 193f\n\t0xF0, 0xA6, 0xB0, 0xB6, 0x44, 0xF0, 0xA6, 0xB3,\n\t0x95, 0x44, 0xF0, 0xA6, 0xB5, 0xAB, 0x44, 0xF0,\n\t0xA6, 0xBC, 0xAC, 0x44, 0xF0, 0xA6, 0xBE, 0xB1,\n\t0x44, 0xF0, 0xA7, 0x83, 0x92, 0x44, 0xF0, 0xA7,\n\t0x8F, 0x8A, 0x44, 0xF0, 0xA7, 0x99, 0xA7, 0x44,\n\t0xF0, 0xA7, 0xA2, 0xAE, 0x44, 0xF0, 0xA7, 0xA5,\n\t0xA6, 0x44, 0xF0, 0xA7, 0xB2, 0xA8, 0x44, 0xF0,\n\t0xA7, 0xBB, 0x93, 0x44, 0xF0, 0xA7, 0xBC, 0xAF,\n\t// Bytes 1940 - 197f\n\t0x44, 0xF0, 0xA8, 0x97, 0x92, 0x44, 0xF0, 0xA8,\n\t0x97, 0xAD, 0x44, 0xF0, 0xA8, 0x9C, 0xAE, 0x44,\n\t0xF0, 0xA8, 0xAF, 0xBA, 0x44, 0xF0, 0xA8, 0xB5,\n\t0xB7, 0x44, 0xF0, 0xA9, 0x85, 0x85, 0x44, 0xF0,\n\t0xA9, 0x87, 0x9F, 0x44, 0xF0, 0xA9, 0x88, 0x9A,\n\t0x44, 0xF0, 0xA9, 0x90, 0x8A, 0x44, 0xF0, 0xA9,\n\t0x92, 0x96, 0x44, 0xF0, 0xA9, 0x96, 0xB6, 0x44,\n\t0xF0, 0xA9, 0xAC, 0xB0, 0x44, 0xF0, 0xAA, 0x83,\n\t// Bytes 1980 - 19bf\n\t0x8E, 0x44, 0xF0, 0xAA, 0x84, 0x85, 0x44, 0xF0,\n\t0xAA, 0x88, 0x8E, 0x44, 0xF0, 0xAA, 0x8A, 0x91,\n\t0x44, 0xF0, 0xAA, 0x8E, 0x92, 0x44, 0xF0, 0xAA,\n\t0x98, 0x80, 0x42, 0x21, 0x21, 0x42, 0x21, 0x3F,\n\t0x42, 0x2E, 0x2E, 0x42, 0x30, 0x2C, 0x42, 0x30,\n\t0x2E, 0x42, 0x31, 0x2C, 0x42, 0x31, 0x2E, 0x42,\n\t0x31, 0x30, 0x42, 0x31, 0x31, 0x42, 0x31, 0x32,\n\t0x42, 0x31, 0x33, 0x42, 0x31, 0x34, 0x42, 0x31,\n\t// Bytes 19c0 - 19ff\n\t0x35, 0x42, 0x31, 0x36, 0x42, 0x31, 0x37, 0x42,\n\t0x31, 0x38, 0x42, 0x31, 0x39, 0x42, 0x32, 0x2C,\n\t0x42, 0x32, 0x2E, 0x42, 0x32, 0x30, 0x42, 0x32,\n\t0x31, 0x42, 0x32, 0x32, 0x42, 0x32, 0x33, 0x42,\n\t0x32, 0x34, 0x42, 0x32, 0x35, 0x42, 0x32, 0x36,\n\t0x42, 0x32, 0x37, 0x42, 0x32, 0x38, 0x42, 0x32,\n\t0x39, 0x42, 0x33, 0x2C, 0x42, 0x33, 0x2E, 0x42,\n\t0x33, 0x30, 0x42, 0x33, 0x31, 0x42, 0x33, 0x32,\n\t// Bytes 1a00 - 1a3f\n\t0x42, 0x33, 0x33, 0x42, 0x33, 0x34, 0x42, 0x33,\n\t0x35, 0x42, 0x33, 0x36, 0x42, 0x33, 0x37, 0x42,\n\t0x33, 0x38, 0x42, 0x33, 0x39, 0x42, 0x34, 0x2C,\n\t0x42, 0x34, 0x2E, 0x42, 0x34, 0x30, 0x42, 0x34,\n\t0x31, 0x42, 0x34, 0x32, 0x42, 0x34, 0x33, 0x42,\n\t0x34, 0x34, 0x42, 0x34, 0x35, 0x42, 0x34, 0x36,\n\t0x42, 0x34, 0x37, 0x42, 0x34, 0x38, 0x42, 0x34,\n\t0x39, 0x42, 0x35, 0x2C, 0x42, 0x35, 0x2E, 0x42,\n\t// Bytes 1a40 - 1a7f\n\t0x35, 0x30, 0x42, 0x36, 0x2C, 0x42, 0x36, 0x2E,\n\t0x42, 0x37, 0x2C, 0x42, 0x37, 0x2E, 0x42, 0x38,\n\t0x2C, 0x42, 0x38, 0x2E, 0x42, 0x39, 0x2C, 0x42,\n\t0x39, 0x2E, 0x42, 0x3D, 0x3D, 0x42, 0x3F, 0x21,\n\t0x42, 0x3F, 0x3F, 0x42, 0x41, 0x55, 0x42, 0x42,\n\t0x71, 0x42, 0x43, 0x44, 0x42, 0x44, 0x4A, 0x42,\n\t0x44, 0x5A, 0x42, 0x44, 0x7A, 0x42, 0x47, 0x42,\n\t0x42, 0x47, 0x79, 0x42, 0x48, 0x50, 0x42, 0x48,\n\t// Bytes 1a80 - 1abf\n\t0x56, 0x42, 0x48, 0x67, 0x42, 0x48, 0x7A, 0x42,\n\t0x49, 0x49, 0x42, 0x49, 0x4A, 0x42, 0x49, 0x55,\n\t0x42, 0x49, 0x56, 0x42, 0x49, 0x58, 0x42, 0x4B,\n\t0x42, 0x42, 0x4B, 0x4B, 0x42, 0x4B, 0x4D, 0x42,\n\t0x4C, 0x4A, 0x42, 0x4C, 0x6A, 0x42, 0x4D, 0x42,\n\t0x42, 0x4D, 0x43, 0x42, 0x4D, 0x44, 0x42, 0x4D,\n\t0x52, 0x42, 0x4D, 0x56, 0x42, 0x4D, 0x57, 0x42,\n\t0x4E, 0x4A, 0x42, 0x4E, 0x6A, 0x42, 0x4E, 0x6F,\n\t// Bytes 1ac0 - 1aff\n\t0x42, 0x50, 0x48, 0x42, 0x50, 0x52, 0x42, 0x50,\n\t0x61, 0x42, 0x52, 0x73, 0x42, 0x53, 0x44, 0x42,\n\t0x53, 0x4D, 0x42, 0x53, 0x53, 0x42, 0x53, 0x76,\n\t0x42, 0x54, 0x4D, 0x42, 0x56, 0x49, 0x42, 0x57,\n\t0x43, 0x42, 0x57, 0x5A, 0x42, 0x57, 0x62, 0x42,\n\t0x58, 0x49, 0x42, 0x63, 0x63, 0x42, 0x63, 0x64,\n\t0x42, 0x63, 0x6D, 0x42, 0x64, 0x42, 0x42, 0x64,\n\t0x61, 0x42, 0x64, 0x6C, 0x42, 0x64, 0x6D, 0x42,\n\t// Bytes 1b00 - 1b3f\n\t0x64, 0x7A, 0x42, 0x65, 0x56, 0x42, 0x66, 0x66,\n\t0x42, 0x66, 0x69, 0x42, 0x66, 0x6C, 0x42, 0x66,\n\t0x6D, 0x42, 0x68, 0x61, 0x42, 0x69, 0x69, 0x42,\n\t0x69, 0x6A, 0x42, 0x69, 0x6E, 0x42, 0x69, 0x76,\n\t0x42, 0x69, 0x78, 0x42, 0x6B, 0x41, 0x42, 0x6B,\n\t0x56, 0x42, 0x6B, 0x57, 0x42, 0x6B, 0x67, 0x42,\n\t0x6B, 0x6C, 0x42, 0x6B, 0x6D, 0x42, 0x6B, 0x74,\n\t0x42, 0x6C, 0x6A, 0x42, 0x6C, 0x6D, 0x42, 0x6C,\n\t// Bytes 1b40 - 1b7f\n\t0x6E, 0x42, 0x6C, 0x78, 0x42, 0x6D, 0x32, 0x42,\n\t0x6D, 0x33, 0x42, 0x6D, 0x41, 0x42, 0x6D, 0x56,\n\t0x42, 0x6D, 0x57, 0x42, 0x6D, 0x62, 0x42, 0x6D,\n\t0x67, 0x42, 0x6D, 0x6C, 0x42, 0x6D, 0x6D, 0x42,\n\t0x6D, 0x73, 0x42, 0x6E, 0x41, 0x42, 0x6E, 0x46,\n\t0x42, 0x6E, 0x56, 0x42, 0x6E, 0x57, 0x42, 0x6E,\n\t0x6A, 0x42, 0x6E, 0x6D, 0x42, 0x6E, 0x73, 0x42,\n\t0x6F, 0x56, 0x42, 0x70, 0x41, 0x42, 0x70, 0x46,\n\t// Bytes 1b80 - 1bbf\n\t0x42, 0x70, 0x56, 0x42, 0x70, 0x57, 0x42, 0x70,\n\t0x63, 0x42, 0x70, 0x73, 0x42, 0x73, 0x72, 0x42,\n\t0x73, 0x74, 0x42, 0x76, 0x69, 0x42, 0x78, 0x69,\n\t0x43, 0x28, 0x31, 0x29, 0x43, 0x28, 0x32, 0x29,\n\t0x43, 0x28, 0x33, 0x29, 0x43, 0x28, 0x34, 0x29,\n\t0x43, 0x28, 0x35, 0x29, 0x43, 0x28, 0x36, 0x29,\n\t0x43, 0x28, 0x37, 0x29, 0x43, 0x28, 0x38, 0x29,\n\t0x43, 0x28, 0x39, 0x29, 0x43, 0x28, 0x41, 0x29,\n\t// Bytes 1bc0 - 1bff\n\t0x43, 0x28, 0x42, 0x29, 0x43, 0x28, 0x43, 0x29,\n\t0x43, 0x28, 0x44, 0x29, 0x43, 0x28, 0x45, 0x29,\n\t0x43, 0x28, 0x46, 0x29, 0x43, 0x28, 0x47, 0x29,\n\t0x43, 0x28, 0x48, 0x29, 0x43, 0x28, 0x49, 0x29,\n\t0x43, 0x28, 0x4A, 0x29, 0x43, 0x28, 0x4B, 0x29,\n\t0x43, 0x28, 0x4C, 0x29, 0x43, 0x28, 0x4D, 0x29,\n\t0x43, 0x28, 0x4E, 0x29, 0x43, 0x28, 0x4F, 0x29,\n\t0x43, 0x28, 0x50, 0x29, 0x43, 0x28, 0x51, 0x29,\n\t// Bytes 1c00 - 1c3f\n\t0x43, 0x28, 0x52, 0x29, 0x43, 0x28, 0x53, 0x29,\n\t0x43, 0x28, 0x54, 0x29, 0x43, 0x28, 0x55, 0x29,\n\t0x43, 0x28, 0x56, 0x29, 0x43, 0x28, 0x57, 0x29,\n\t0x43, 0x28, 0x58, 0x29, 0x43, 0x28, 0x59, 0x29,\n\t0x43, 0x28, 0x5A, 0x29, 0x43, 0x28, 0x61, 0x29,\n\t0x43, 0x28, 0x62, 0x29, 0x43, 0x28, 0x63, 0x29,\n\t0x43, 0x28, 0x64, 0x29, 0x43, 0x28, 0x65, 0x29,\n\t0x43, 0x28, 0x66, 0x29, 0x43, 0x28, 0x67, 0x29,\n\t// Bytes 1c40 - 1c7f\n\t0x43, 0x28, 0x68, 0x29, 0x43, 0x28, 0x69, 0x29,\n\t0x43, 0x28, 0x6A, 0x29, 0x43, 0x28, 0x6B, 0x29,\n\t0x43, 0x28, 0x6C, 0x29, 0x43, 0x28, 0x6D, 0x29,\n\t0x43, 0x28, 0x6E, 0x29, 0x43, 0x28, 0x6F, 0x29,\n\t0x43, 0x28, 0x70, 0x29, 0x43, 0x28, 0x71, 0x29,\n\t0x43, 0x28, 0x72, 0x29, 0x43, 0x28, 0x73, 0x29,\n\t0x43, 0x28, 0x74, 0x29, 0x43, 0x28, 0x75, 0x29,\n\t0x43, 0x28, 0x76, 0x29, 0x43, 0x28, 0x77, 0x29,\n\t// Bytes 1c80 - 1cbf\n\t0x43, 0x28, 0x78, 0x29, 0x43, 0x28, 0x79, 0x29,\n\t0x43, 0x28, 0x7A, 0x29, 0x43, 0x2E, 0x2E, 0x2E,\n\t0x43, 0x31, 0x30, 0x2E, 0x43, 0x31, 0x31, 0x2E,\n\t0x43, 0x31, 0x32, 0x2E, 0x43, 0x31, 0x33, 0x2E,\n\t0x43, 0x31, 0x34, 0x2E, 0x43, 0x31, 0x35, 0x2E,\n\t0x43, 0x31, 0x36, 0x2E, 0x43, 0x31, 0x37, 0x2E,\n\t0x43, 0x31, 0x38, 0x2E, 0x43, 0x31, 0x39, 0x2E,\n\t0x43, 0x32, 0x30, 0x2E, 0x43, 0x3A, 0x3A, 0x3D,\n\t// Bytes 1cc0 - 1cff\n\t0x43, 0x3D, 0x3D, 0x3D, 0x43, 0x43, 0x6F, 0x2E,\n\t0x43, 0x46, 0x41, 0x58, 0x43, 0x47, 0x48, 0x7A,\n\t0x43, 0x47, 0x50, 0x61, 0x43, 0x49, 0x49, 0x49,\n\t0x43, 0x4C, 0x54, 0x44, 0x43, 0x4C, 0xC2, 0xB7,\n\t0x43, 0x4D, 0x48, 0x7A, 0x43, 0x4D, 0x50, 0x61,\n\t0x43, 0x4D, 0xCE, 0xA9, 0x43, 0x50, 0x50, 0x4D,\n\t0x43, 0x50, 0x50, 0x56, 0x43, 0x50, 0x54, 0x45,\n\t0x43, 0x54, 0x45, 0x4C, 0x43, 0x54, 0x48, 0x7A,\n\t// Bytes 1d00 - 1d3f\n\t0x43, 0x56, 0x49, 0x49, 0x43, 0x58, 0x49, 0x49,\n\t0x43, 0x61, 0x2F, 0x63, 0x43, 0x61, 0x2F, 0x73,\n\t0x43, 0x61, 0xCA, 0xBE, 0x43, 0x62, 0x61, 0x72,\n\t0x43, 0x63, 0x2F, 0x6F, 0x43, 0x63, 0x2F, 0x75,\n\t0x43, 0x63, 0x61, 0x6C, 0x43, 0x63, 0x6D, 0x32,\n\t0x43, 0x63, 0x6D, 0x33, 0x43, 0x64, 0x6D, 0x32,\n\t0x43, 0x64, 0x6D, 0x33, 0x43, 0x65, 0x72, 0x67,\n\t0x43, 0x66, 0x66, 0x69, 0x43, 0x66, 0x66, 0x6C,\n\t// Bytes 1d40 - 1d7f\n\t0x43, 0x67, 0x61, 0x6C, 0x43, 0x68, 0x50, 0x61,\n\t0x43, 0x69, 0x69, 0x69, 0x43, 0x6B, 0x48, 0x7A,\n\t0x43, 0x6B, 0x50, 0x61, 0x43, 0x6B, 0x6D, 0x32,\n\t0x43, 0x6B, 0x6D, 0x33, 0x43, 0x6B, 0xCE, 0xA9,\n\t0x43, 0x6C, 0x6F, 0x67, 0x43, 0x6C, 0xC2, 0xB7,\n\t0x43, 0x6D, 0x69, 0x6C, 0x43, 0x6D, 0x6D, 0x32,\n\t0x43, 0x6D, 0x6D, 0x33, 0x43, 0x6D, 0x6F, 0x6C,\n\t0x43, 0x72, 0x61, 0x64, 0x43, 0x76, 0x69, 0x69,\n\t// Bytes 1d80 - 1dbf\n\t0x43, 0x78, 0x69, 0x69, 0x43, 0xC2, 0xB0, 0x43,\n\t0x43, 0xC2, 0xB0, 0x46, 0x43, 0xCA, 0xBC, 0x6E,\n\t0x43, 0xCE, 0xBC, 0x41, 0x43, 0xCE, 0xBC, 0x46,\n\t0x43, 0xCE, 0xBC, 0x56, 0x43, 0xCE, 0xBC, 0x57,\n\t0x43, 0xCE, 0xBC, 0x67, 0x43, 0xCE, 0xBC, 0x6C,\n\t0x43, 0xCE, 0xBC, 0x6D, 0x43, 0xCE, 0xBC, 0x73,\n\t0x44, 0x28, 0x31, 0x30, 0x29, 0x44, 0x28, 0x31,\n\t0x31, 0x29, 0x44, 0x28, 0x31, 0x32, 0x29, 0x44,\n\t// Bytes 1dc0 - 1dff\n\t0x28, 0x31, 0x33, 0x29, 0x44, 0x28, 0x31, 0x34,\n\t0x29, 0x44, 0x28, 0x31, 0x35, 0x29, 0x44, 0x28,\n\t0x31, 0x36, 0x29, 0x44, 0x28, 0x31, 0x37, 0x29,\n\t0x44, 0x28, 0x31, 0x38, 0x29, 0x44, 0x28, 0x31,\n\t0x39, 0x29, 0x44, 0x28, 0x32, 0x30, 0x29, 0x44,\n\t0x30, 0xE7, 0x82, 0xB9, 0x44, 0x31, 0xE2, 0x81,\n\t0x84, 0x44, 0x31, 0xE6, 0x97, 0xA5, 0x44, 0x31,\n\t0xE6, 0x9C, 0x88, 0x44, 0x31, 0xE7, 0x82, 0xB9,\n\t// Bytes 1e00 - 1e3f\n\t0x44, 0x32, 0xE6, 0x97, 0xA5, 0x44, 0x32, 0xE6,\n\t0x9C, 0x88, 0x44, 0x32, 0xE7, 0x82, 0xB9, 0x44,\n\t0x33, 0xE6, 0x97, 0xA5, 0x44, 0x33, 0xE6, 0x9C,\n\t0x88, 0x44, 0x33, 0xE7, 0x82, 0xB9, 0x44, 0x34,\n\t0xE6, 0x97, 0xA5, 0x44, 0x34, 0xE6, 0x9C, 0x88,\n\t0x44, 0x34, 0xE7, 0x82, 0xB9, 0x44, 0x35, 0xE6,\n\t0x97, 0xA5, 0x44, 0x35, 0xE6, 0x9C, 0x88, 0x44,\n\t0x35, 0xE7, 0x82, 0xB9, 0x44, 0x36, 0xE6, 0x97,\n\t// Bytes 1e40 - 1e7f\n\t0xA5, 0x44, 0x36, 0xE6, 0x9C, 0x88, 0x44, 0x36,\n\t0xE7, 0x82, 0xB9, 0x44, 0x37, 0xE6, 0x97, 0xA5,\n\t0x44, 0x37, 0xE6, 0x9C, 0x88, 0x44, 0x37, 0xE7,\n\t0x82, 0xB9, 0x44, 0x38, 0xE6, 0x97, 0xA5, 0x44,\n\t0x38, 0xE6, 0x9C, 0x88, 0x44, 0x38, 0xE7, 0x82,\n\t0xB9, 0x44, 0x39, 0xE6, 0x97, 0xA5, 0x44, 0x39,\n\t0xE6, 0x9C, 0x88, 0x44, 0x39, 0xE7, 0x82, 0xB9,\n\t0x44, 0x56, 0x49, 0x49, 0x49, 0x44, 0x61, 0x2E,\n\t// Bytes 1e80 - 1ebf\n\t0x6D, 0x2E, 0x44, 0x6B, 0x63, 0x61, 0x6C, 0x44,\n\t0x70, 0x2E, 0x6D, 0x2E, 0x44, 0x76, 0x69, 0x69,\n\t0x69, 0x44, 0xD5, 0xA5, 0xD6, 0x82, 0x44, 0xD5,\n\t0xB4, 0xD5, 0xA5, 0x44, 0xD5, 0xB4, 0xD5, 0xAB,\n\t0x44, 0xD5, 0xB4, 0xD5, 0xAD, 0x44, 0xD5, 0xB4,\n\t0xD5, 0xB6, 0x44, 0xD5, 0xBE, 0xD5, 0xB6, 0x44,\n\t0xD7, 0x90, 0xD7, 0x9C, 0x44, 0xD8, 0xA7, 0xD9,\n\t0xB4, 0x44, 0xD8, 0xA8, 0xD8, 0xAC, 0x44, 0xD8,\n\t// Bytes 1ec0 - 1eff\n\t0xA8, 0xD8, 0xAD, 0x44, 0xD8, 0xA8, 0xD8, 0xAE,\n\t0x44, 0xD8, 0xA8, 0xD8, 0xB1, 0x44, 0xD8, 0xA8,\n\t0xD8, 0xB2, 0x44, 0xD8, 0xA8, 0xD9, 0x85, 0x44,\n\t0xD8, 0xA8, 0xD9, 0x86, 0x44, 0xD8, 0xA8, 0xD9,\n\t0x87, 0x44, 0xD8, 0xA8, 0xD9, 0x89, 0x44, 0xD8,\n\t0xA8, 0xD9, 0x8A, 0x44, 0xD8, 0xAA, 0xD8, 0xAC,\n\t0x44, 0xD8, 0xAA, 0xD8, 0xAD, 0x44, 0xD8, 0xAA,\n\t0xD8, 0xAE, 0x44, 0xD8, 0xAA, 0xD8, 0xB1, 0x44,\n\t// Bytes 1f00 - 1f3f\n\t0xD8, 0xAA, 0xD8, 0xB2, 0x44, 0xD8, 0xAA, 0xD9,\n\t0x85, 0x44, 0xD8, 0xAA, 0xD9, 0x86, 0x44, 0xD8,\n\t0xAA, 0xD9, 0x87, 0x44, 0xD8, 0xAA, 0xD9, 0x89,\n\t0x44, 0xD8, 0xAA, 0xD9, 0x8A, 0x44, 0xD8, 0xAB,\n\t0xD8, 0xAC, 0x44, 0xD8, 0xAB, 0xD8, 0xB1, 0x44,\n\t0xD8, 0xAB, 0xD8, 0xB2, 0x44, 0xD8, 0xAB, 0xD9,\n\t0x85, 0x44, 0xD8, 0xAB, 0xD9, 0x86, 0x44, 0xD8,\n\t0xAB, 0xD9, 0x87, 0x44, 0xD8, 0xAB, 0xD9, 0x89,\n\t// Bytes 1f40 - 1f7f\n\t0x44, 0xD8, 0xAB, 0xD9, 0x8A, 0x44, 0xD8, 0xAC,\n\t0xD8, 0xAD, 0x44, 0xD8, 0xAC, 0xD9, 0x85, 0x44,\n\t0xD8, 0xAC, 0xD9, 0x89, 0x44, 0xD8, 0xAC, 0xD9,\n\t0x8A, 0x44, 0xD8, 0xAD, 0xD8, 0xAC, 0x44, 0xD8,\n\t0xAD, 0xD9, 0x85, 0x44, 0xD8, 0xAD, 0xD9, 0x89,\n\t0x44, 0xD8, 0xAD, 0xD9, 0x8A, 0x44, 0xD8, 0xAE,\n\t0xD8, 0xAC, 0x44, 0xD8, 0xAE, 0xD8, 0xAD, 0x44,\n\t0xD8, 0xAE, 0xD9, 0x85, 0x44, 0xD8, 0xAE, 0xD9,\n\t// Bytes 1f80 - 1fbf\n\t0x89, 0x44, 0xD8, 0xAE, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB3, 0xD8, 0xAC, 0x44, 0xD8, 0xB3, 0xD8, 0xAD,\n\t0x44, 0xD8, 0xB3, 0xD8, 0xAE, 0x44, 0xD8, 0xB3,\n\t0xD8, 0xB1, 0x44, 0xD8, 0xB3, 0xD9, 0x85, 0x44,\n\t0xD8, 0xB3, 0xD9, 0x87, 0x44, 0xD8, 0xB3, 0xD9,\n\t0x89, 0x44, 0xD8, 0xB3, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB4, 0xD8, 0xAC, 0x44, 0xD8, 0xB4, 0xD8, 0xAD,\n\t0x44, 0xD8, 0xB4, 0xD8, 0xAE, 0x44, 0xD8, 0xB4,\n\t// Bytes 1fc0 - 1fff\n\t0xD8, 0xB1, 0x44, 0xD8, 0xB4, 0xD9, 0x85, 0x44,\n\t0xD8, 0xB4, 0xD9, 0x87, 0x44, 0xD8, 0xB4, 0xD9,\n\t0x89, 0x44, 0xD8, 0xB4, 0xD9, 0x8A, 0x44, 0xD8,\n\t0xB5, 0xD8, 0xAD, 0x44, 0xD8, 0xB5, 0xD8, 0xAE,\n\t0x44, 0xD8, 0xB5, 0xD8, 0xB1, 0x44, 0xD8, 0xB5,\n\t0xD9, 0x85, 0x44, 0xD8, 0xB5, 0xD9, 0x89, 0x44,\n\t0xD8, 0xB5, 0xD9, 0x8A, 0x44, 0xD8, 0xB6, 0xD8,\n\t0xAC, 0x44, 0xD8, 0xB6, 0xD8, 0xAD, 0x44, 0xD8,\n\t// Bytes 2000 - 203f\n\t0xB6, 0xD8, 0xAE, 0x44, 0xD8, 0xB6, 0xD8, 0xB1,\n\t0x44, 0xD8, 0xB6, 0xD9, 0x85, 0x44, 0xD8, 0xB6,\n\t0xD9, 0x89, 0x44, 0xD8, 0xB6, 0xD9, 0x8A, 0x44,\n\t0xD8, 0xB7, 0xD8, 0xAD, 0x44, 0xD8, 0xB7, 0xD9,\n\t0x85, 0x44, 0xD8, 0xB7, 0xD9, 0x89, 0x44, 0xD8,\n\t0xB7, 0xD9, 0x8A, 0x44, 0xD8, 0xB8, 0xD9, 0x85,\n\t0x44, 0xD8, 0xB9, 0xD8, 0xAC, 0x44, 0xD8, 0xB9,\n\t0xD9, 0x85, 0x44, 0xD8, 0xB9, 0xD9, 0x89, 0x44,\n\t// Bytes 2040 - 207f\n\t0xD8, 0xB9, 0xD9, 0x8A, 0x44, 0xD8, 0xBA, 0xD8,\n\t0xAC, 0x44, 0xD8, 0xBA, 0xD9, 0x85, 0x44, 0xD8,\n\t0xBA, 0xD9, 0x89, 0x44, 0xD8, 0xBA, 0xD9, 0x8A,\n\t0x44, 0xD9, 0x81, 0xD8, 0xAC, 0x44, 0xD9, 0x81,\n\t0xD8, 0xAD, 0x44, 0xD9, 0x81, 0xD8, 0xAE, 0x44,\n\t0xD9, 0x81, 0xD9, 0x85, 0x44, 0xD9, 0x81, 0xD9,\n\t0x89, 0x44, 0xD9, 0x81, 0xD9, 0x8A, 0x44, 0xD9,\n\t0x82, 0xD8, 0xAD, 0x44, 0xD9, 0x82, 0xD9, 0x85,\n\t// Bytes 2080 - 20bf\n\t0x44, 0xD9, 0x82, 0xD9, 0x89, 0x44, 0xD9, 0x82,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x83, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x83, 0xD8, 0xAC, 0x44, 0xD9, 0x83, 0xD8,\n\t0xAD, 0x44, 0xD9, 0x83, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x83, 0xD9, 0x84, 0x44, 0xD9, 0x83, 0xD9, 0x85,\n\t0x44, 0xD9, 0x83, 0xD9, 0x89, 0x44, 0xD9, 0x83,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x84, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x84, 0xD8, 0xAC, 0x44, 0xD9, 0x84, 0xD8,\n\t// Bytes 20c0 - 20ff\n\t0xAD, 0x44, 0xD9, 0x84, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x84, 0xD9, 0x85, 0x44, 0xD9, 0x84, 0xD9, 0x87,\n\t0x44, 0xD9, 0x84, 0xD9, 0x89, 0x44, 0xD9, 0x84,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x85, 0xD8, 0xA7, 0x44,\n\t0xD9, 0x85, 0xD8, 0xAC, 0x44, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x44, 0xD9, 0x85, 0xD8, 0xAE, 0x44, 0xD9,\n\t0x85, 0xD9, 0x85, 0x44, 0xD9, 0x85, 0xD9, 0x89,\n\t0x44, 0xD9, 0x85, 0xD9, 0x8A, 0x44, 0xD9, 0x86,\n\t// Bytes 2100 - 213f\n\t0xD8, 0xAC, 0x44, 0xD9, 0x86, 0xD8, 0xAD, 0x44,\n\t0xD9, 0x86, 0xD8, 0xAE, 0x44, 0xD9, 0x86, 0xD8,\n\t0xB1, 0x44, 0xD9, 0x86, 0xD8, 0xB2, 0x44, 0xD9,\n\t0x86, 0xD9, 0x85, 0x44, 0xD9, 0x86, 0xD9, 0x86,\n\t0x44, 0xD9, 0x86, 0xD9, 0x87, 0x44, 0xD9, 0x86,\n\t0xD9, 0x89, 0x44, 0xD9, 0x86, 0xD9, 0x8A, 0x44,\n\t0xD9, 0x87, 0xD8, 0xAC, 0x44, 0xD9, 0x87, 0xD9,\n\t0x85, 0x44, 0xD9, 0x87, 0xD9, 0x89, 0x44, 0xD9,\n\t// Bytes 2140 - 217f\n\t0x87, 0xD9, 0x8A, 0x44, 0xD9, 0x88, 0xD9, 0xB4,\n\t0x44, 0xD9, 0x8A, 0xD8, 0xAC, 0x44, 0xD9, 0x8A,\n\t0xD8, 0xAD, 0x44, 0xD9, 0x8A, 0xD8, 0xAE, 0x44,\n\t0xD9, 0x8A, 0xD8, 0xB1, 0x44, 0xD9, 0x8A, 0xD8,\n\t0xB2, 0x44, 0xD9, 0x8A, 0xD9, 0x85, 0x44, 0xD9,\n\t0x8A, 0xD9, 0x86, 0x44, 0xD9, 0x8A, 0xD9, 0x87,\n\t0x44, 0xD9, 0x8A, 0xD9, 0x89, 0x44, 0xD9, 0x8A,\n\t0xD9, 0x8A, 0x44, 0xD9, 0x8A, 0xD9, 0xB4, 0x44,\n\t// Bytes 2180 - 21bf\n\t0xDB, 0x87, 0xD9, 0xB4, 0x45, 0x28, 0xE1, 0x84,\n\t0x80, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x82, 0x29,\n\t0x45, 0x28, 0xE1, 0x84, 0x83, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x85, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x86, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x87, 0x29,\n\t0x45, 0x28, 0xE1, 0x84, 0x89, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x8B, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x8C, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x8E, 0x29,\n\t// Bytes 21c0 - 21ff\n\t0x45, 0x28, 0xE1, 0x84, 0x8F, 0x29, 0x45, 0x28,\n\t0xE1, 0x84, 0x90, 0x29, 0x45, 0x28, 0xE1, 0x84,\n\t0x91, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x92, 0x29,\n\t0x45, 0x28, 0xE4, 0xB8, 0x80, 0x29, 0x45, 0x28,\n\t0xE4, 0xB8, 0x83, 0x29, 0x45, 0x28, 0xE4, 0xB8,\n\t0x89, 0x29, 0x45, 0x28, 0xE4, 0xB9, 0x9D, 0x29,\n\t0x45, 0x28, 0xE4, 0xBA, 0x8C, 0x29, 0x45, 0x28,\n\t0xE4, 0xBA, 0x94, 0x29, 0x45, 0x28, 0xE4, 0xBB,\n\t// Bytes 2200 - 223f\n\t0xA3, 0x29, 0x45, 0x28, 0xE4, 0xBC, 0x81, 0x29,\n\t0x45, 0x28, 0xE4, 0xBC, 0x91, 0x29, 0x45, 0x28,\n\t0xE5, 0x85, 0xAB, 0x29, 0x45, 0x28, 0xE5, 0x85,\n\t0xAD, 0x29, 0x45, 0x28, 0xE5, 0x8A, 0xB4, 0x29,\n\t0x45, 0x28, 0xE5, 0x8D, 0x81, 0x29, 0x45, 0x28,\n\t0xE5, 0x8D, 0x94, 0x29, 0x45, 0x28, 0xE5, 0x90,\n\t0x8D, 0x29, 0x45, 0x28, 0xE5, 0x91, 0xBC, 0x29,\n\t0x45, 0x28, 0xE5, 0x9B, 0x9B, 0x29, 0x45, 0x28,\n\t// Bytes 2240 - 227f\n\t0xE5, 0x9C, 0x9F, 0x29, 0x45, 0x28, 0xE5, 0xAD,\n\t0xA6, 0x29, 0x45, 0x28, 0xE6, 0x97, 0xA5, 0x29,\n\t0x45, 0x28, 0xE6, 0x9C, 0x88, 0x29, 0x45, 0x28,\n\t0xE6, 0x9C, 0x89, 0x29, 0x45, 0x28, 0xE6, 0x9C,\n\t0xA8, 0x29, 0x45, 0x28, 0xE6, 0xA0, 0xAA, 0x29,\n\t0x45, 0x28, 0xE6, 0xB0, 0xB4, 0x29, 0x45, 0x28,\n\t0xE7, 0x81, 0xAB, 0x29, 0x45, 0x28, 0xE7, 0x89,\n\t0xB9, 0x29, 0x45, 0x28, 0xE7, 0x9B, 0xA3, 0x29,\n\t// Bytes 2280 - 22bf\n\t0x45, 0x28, 0xE7, 0xA4, 0xBE, 0x29, 0x45, 0x28,\n\t0xE7, 0xA5, 0x9D, 0x29, 0x45, 0x28, 0xE7, 0xA5,\n\t0xAD, 0x29, 0x45, 0x28, 0xE8, 0x87, 0xAA, 0x29,\n\t0x45, 0x28, 0xE8, 0x87, 0xB3, 0x29, 0x45, 0x28,\n\t0xE8, 0xB2, 0xA1, 0x29, 0x45, 0x28, 0xE8, 0xB3,\n\t0x87, 0x29, 0x45, 0x28, 0xE9, 0x87, 0x91, 0x29,\n\t0x45, 0x30, 0xE2, 0x81, 0x84, 0x33, 0x45, 0x31,\n\t0x30, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x30, 0xE6,\n\t// Bytes 22c0 - 22ff\n\t0x9C, 0x88, 0x45, 0x31, 0x30, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x31, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x31, 0xE6, 0x9C, 0x88, 0x45, 0x31, 0x31, 0xE7,\n\t0x82, 0xB9, 0x45, 0x31, 0x32, 0xE6, 0x97, 0xA5,\n\t0x45, 0x31, 0x32, 0xE6, 0x9C, 0x88, 0x45, 0x31,\n\t0x32, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x33, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x33, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x34, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t// Bytes 2300 - 233f\n\t0x34, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x35, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x35, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x36, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x36, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x37, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x37, 0xE7, 0x82, 0xB9,\n\t0x45, 0x31, 0x38, 0xE6, 0x97, 0xA5, 0x45, 0x31,\n\t0x38, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x39, 0xE6,\n\t0x97, 0xA5, 0x45, 0x31, 0x39, 0xE7, 0x82, 0xB9,\n\t// Bytes 2340 - 237f\n\t0x45, 0x31, 0xE2, 0x81, 0x84, 0x32, 0x45, 0x31,\n\t0xE2, 0x81, 0x84, 0x33, 0x45, 0x31, 0xE2, 0x81,\n\t0x84, 0x34, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x35,\n\t0x45, 0x31, 0xE2, 0x81, 0x84, 0x36, 0x45, 0x31,\n\t0xE2, 0x81, 0x84, 0x37, 0x45, 0x31, 0xE2, 0x81,\n\t0x84, 0x38, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x39,\n\t0x45, 0x32, 0x30, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x30, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x31, 0xE6,\n\t// Bytes 2380 - 23bf\n\t0x97, 0xA5, 0x45, 0x32, 0x31, 0xE7, 0x82, 0xB9,\n\t0x45, 0x32, 0x32, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x32, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x33, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0x33, 0xE7, 0x82, 0xB9,\n\t0x45, 0x32, 0x34, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t0x34, 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x35, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0x36, 0xE6, 0x97, 0xA5,\n\t0x45, 0x32, 0x37, 0xE6, 0x97, 0xA5, 0x45, 0x32,\n\t// Bytes 23c0 - 23ff\n\t0x38, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x39, 0xE6,\n\t0x97, 0xA5, 0x45, 0x32, 0xE2, 0x81, 0x84, 0x33,\n\t0x45, 0x32, 0xE2, 0x81, 0x84, 0x35, 0x45, 0x33,\n\t0x30, 0xE6, 0x97, 0xA5, 0x45, 0x33, 0x31, 0xE6,\n\t0x97, 0xA5, 0x45, 0x33, 0xE2, 0x81, 0x84, 0x34,\n\t0x45, 0x33, 0xE2, 0x81, 0x84, 0x35, 0x45, 0x33,\n\t0xE2, 0x81, 0x84, 0x38, 0x45, 0x34, 0xE2, 0x81,\n\t0x84, 0x35, 0x45, 0x35, 0xE2, 0x81, 0x84, 0x36,\n\t// Bytes 2400 - 243f\n\t0x45, 0x35, 0xE2, 0x81, 0x84, 0x38, 0x45, 0x37,\n\t0xE2, 0x81, 0x84, 0x38, 0x45, 0x41, 0xE2, 0x88,\n\t0x95, 0x6D, 0x45, 0x56, 0xE2, 0x88, 0x95, 0x6D,\n\t0x45, 0x6D, 0xE2, 0x88, 0x95, 0x73, 0x46, 0x31,\n\t0xE2, 0x81, 0x84, 0x31, 0x30, 0x46, 0x43, 0xE2,\n\t0x88, 0x95, 0x6B, 0x67, 0x46, 0x6D, 0xE2, 0x88,\n\t0x95, 0x73, 0x32, 0x46, 0xD8, 0xA8, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD8, 0xA8, 0xD8, 0xAE, 0xD9,\n\t// Bytes 2440 - 247f\n\t0x8A, 0x46, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x85,\n\t0x46, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x89, 0x46,\n\t0xD8, 0xAA, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD8,\n\t0xAA, 0xD8, 0xAD, 0xD8, 0xAC, 0x46, 0xD8, 0xAA,\n\t0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD8, 0xAA, 0xD8,\n\t0xAE, 0xD9, 0x85, 0x46, 0xD8, 0xAA, 0xD8, 0xAE,\n\t0xD9, 0x89, 0x46, 0xD8, 0xAA, 0xD8, 0xAE, 0xD9,\n\t0x8A, 0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAC,\n\t// Bytes 2480 - 24bf\n\t0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAD, 0x46,\n\t0xD8, 0xAA, 0xD9, 0x85, 0xD8, 0xAE, 0x46, 0xD8,\n\t0xAA, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xAA,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xAC, 0xD8,\n\t0xAD, 0xD9, 0x89, 0x46, 0xD8, 0xAC, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x89,\n\t0x46, 0xD8, 0xAC, 0xD9, 0x85, 0xD9, 0x8A, 0x46,\n\t// Bytes 24c0 - 24ff\n\t0xD8, 0xAD, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD8,\n\t0xAD, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xAD,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xB3, 0xD8,\n\t0xAC, 0xD8, 0xAD, 0x46, 0xD8, 0xB3, 0xD8, 0xAC,\n\t0xD9, 0x89, 0x46, 0xD8, 0xB3, 0xD8, 0xAD, 0xD8,\n\t0xAC, 0x46, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x89,\n\t0x46, 0xD8, 0xB3, 0xD8, 0xAE, 0xD9, 0x8A, 0x46,\n\t0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xAC, 0x46, 0xD8,\n\t// Bytes 2500 - 253f\n\t0xB3, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD8, 0xB3,\n\t0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB4, 0xD8,\n\t0xAC, 0xD9, 0x8A, 0x46, 0xD8, 0xB4, 0xD8, 0xAD,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB4, 0xD8, 0xAD, 0xD9,\n\t0x8A, 0x46, 0xD8, 0xB4, 0xD9, 0x85, 0xD8, 0xAE,\n\t0x46, 0xD8, 0xB4, 0xD9, 0x85, 0xD9, 0x85, 0x46,\n\t0xD8, 0xB5, 0xD8, 0xAD, 0xD8, 0xAD, 0x46, 0xD8,\n\t0xB5, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xB5,\n\t// Bytes 2540 - 257f\n\t0xD9, 0x84, 0xD9, 0x89, 0x46, 0xD8, 0xB5, 0xD9,\n\t0x84, 0xDB, 0x92, 0x46, 0xD8, 0xB5, 0xD9, 0x85,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9,\n\t0x89, 0x46, 0xD8, 0xB6, 0xD8, 0xAD, 0xD9, 0x8A,\n\t0x46, 0xD8, 0xB6, 0xD8, 0xAE, 0xD9, 0x85, 0x46,\n\t0xD8, 0xB7, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD8,\n\t0xB7, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB7,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xB9, 0xD8,\n\t// Bytes 2580 - 25bf\n\t0xAC, 0xD9, 0x85, 0x46, 0xD8, 0xB9, 0xD9, 0x85,\n\t0xD9, 0x85, 0x46, 0xD8, 0xB9, 0xD9, 0x85, 0xD9,\n\t0x89, 0x46, 0xD8, 0xB9, 0xD9, 0x85, 0xD9, 0x8A,\n\t0x46, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x85, 0x46,\n\t0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8,\n\t0xBA, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x81,\n\t0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD9, 0x81, 0xD9,\n\t0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x82, 0xD9, 0x84,\n\t// Bytes 25c0 - 25ff\n\t0xDB, 0x92, 0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD8,\n\t0xAD, 0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD9, 0x85,\n\t0x46, 0xD9, 0x82, 0xD9, 0x85, 0xD9, 0x8A, 0x46,\n\t0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD9,\n\t0x83, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x84,\n\t0xD8, 0xAC, 0xD8, 0xAC, 0x46, 0xD9, 0x84, 0xD8,\n\t0xAC, 0xD9, 0x85, 0x46, 0xD9, 0x84, 0xD8, 0xAC,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9,\n\t// Bytes 2600 - 263f\n\t0x85, 0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x89,\n\t0x46, 0xD9, 0x84, 0xD8, 0xAD, 0xD9, 0x8A, 0x46,\n\t0xD9, 0x84, 0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD9,\n\t0x84, 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD9, 0x84,\n\t0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x85, 0xD8,\n\t0xAC, 0xD8, 0xAD, 0x46, 0xD9, 0x85, 0xD8, 0xAC,\n\t0xD8, 0xAE, 0x46, 0xD9, 0x85, 0xD8, 0xAC, 0xD9,\n\t0x85, 0x46, 0xD9, 0x85, 0xD8, 0xAC, 0xD9, 0x8A,\n\t// Bytes 2640 - 267f\n\t0x46, 0xD9, 0x85, 0xD8, 0xAD, 0xD8, 0xAC, 0x46,\n\t0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD9,\n\t0x85, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD9, 0x85,\n\t0xD8, 0xAE, 0xD8, 0xAC, 0x46, 0xD9, 0x85, 0xD8,\n\t0xAE, 0xD9, 0x85, 0x46, 0xD9, 0x85, 0xD8, 0xAE,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x85, 0xD9, 0x85, 0xD9,\n\t0x8A, 0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD8, 0xAD,\n\t0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x85, 0x46,\n\t// Bytes 2680 - 26bf\n\t0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x89, 0x46, 0xD9,\n\t0x86, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x86,\n\t0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD9, 0x86, 0xD8,\n\t0xAD, 0xD9, 0x89, 0x46, 0xD9, 0x86, 0xD8, 0xAD,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x86, 0xD9, 0x85, 0xD9,\n\t0x89, 0x46, 0xD9, 0x86, 0xD9, 0x85, 0xD9, 0x8A,\n\t0x46, 0xD9, 0x87, 0xD9, 0x85, 0xD8, 0xAC, 0x46,\n\t0xD9, 0x87, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD9,\n\t// Bytes 26c0 - 26ff\n\t0x8A, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x8A,\n\t0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD9, 0x8A, 0xD9,\n\t0x85, 0xD9, 0x85, 0x46, 0xD9, 0x8A, 0xD9, 0x85,\n\t0xD9, 0x8A, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8,\n\t0xA7, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAC,\n\t0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAD, 0x46,\n\t0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xAE, 0x46, 0xD9,\n\t0x8A, 0xD9, 0x94, 0xD8, 0xB1, 0x46, 0xD9, 0x8A,\n\t// Bytes 2700 - 273f\n\t0xD9, 0x94, 0xD8, 0xB2, 0x46, 0xD9, 0x8A, 0xD9,\n\t0x94, 0xD9, 0x85, 0x46, 0xD9, 0x8A, 0xD9, 0x94,\n\t0xD9, 0x86, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9,\n\t0x87, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x88,\n\t0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x89, 0x46,\n\t0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x8A, 0x46, 0xD9,\n\t0x8A, 0xD9, 0x94, 0xDB, 0x86, 0x46, 0xD9, 0x8A,\n\t0xD9, 0x94, 0xDB, 0x87, 0x46, 0xD9, 0x8A, 0xD9,\n\t// Bytes 2740 - 277f\n\t0x94, 0xDB, 0x88, 0x46, 0xD9, 0x8A, 0xD9, 0x94,\n\t0xDB, 0x90, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xDB,\n\t0x95, 0x46, 0xE0, 0xB9, 0x8D, 0xE0, 0xB8, 0xB2,\n\t0x46, 0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0x99, 0x46,\n\t0xE0, 0xBA, 0xAB, 0xE0, 0xBA, 0xA1, 0x46, 0xE0,\n\t0xBB, 0x8D, 0xE0, 0xBA, 0xB2, 0x46, 0xE0, 0xBD,\n\t0x80, 0xE0, 0xBE, 0xB5, 0x46, 0xE0, 0xBD, 0x82,\n\t0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x8C, 0xE0,\n\t// Bytes 2780 - 27bf\n\t0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x91, 0xE0, 0xBE,\n\t0xB7, 0x46, 0xE0, 0xBD, 0x96, 0xE0, 0xBE, 0xB7,\n\t0x46, 0xE0, 0xBD, 0x9B, 0xE0, 0xBE, 0xB7, 0x46,\n\t0xE0, 0xBE, 0x90, 0xE0, 0xBE, 0xB5, 0x46, 0xE0,\n\t0xBE, 0x92, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE,\n\t0x9C, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xA1,\n\t0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xA6, 0xE0,\n\t0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0xAB, 0xE0, 0xBE,\n\t// Bytes 27c0 - 27ff\n\t0xB7, 0x46, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2,\n\t0x46, 0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0x46,\n\t0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x46, 0xE2,\n\t0x88, 0xAE, 0xE2, 0x88, 0xAE, 0x46, 0xE3, 0x81,\n\t0xBB, 0xE3, 0x81, 0x8B, 0x46, 0xE3, 0x82, 0x88,\n\t0xE3, 0x82, 0x8A, 0x46, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0x46, 0xE3, 0x82, 0xB3, 0xE3, 0x82,\n\t0xB3, 0x46, 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0x88,\n\t// Bytes 2800 - 283f\n\t0x46, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, 0x46,\n\t0xE3, 0x83, 0x8A, 0xE3, 0x83, 0x8E, 0x46, 0xE3,\n\t0x83, 0x9B, 0xE3, 0x83, 0xB3, 0x46, 0xE3, 0x83,\n\t0x9F, 0xE3, 0x83, 0xAA, 0x46, 0xE3, 0x83, 0xAA,\n\t0xE3, 0x83, 0xA9, 0x46, 0xE3, 0x83, 0xAC, 0xE3,\n\t0x83, 0xA0, 0x46, 0xE4, 0xBB, 0xA4, 0xE5, 0x92,\n\t0x8C, 0x46, 0xE5, 0xA4, 0xA7, 0xE6, 0xAD, 0xA3,\n\t0x46, 0xE5, 0xB9, 0xB3, 0xE6, 0x88, 0x90, 0x46,\n\t// Bytes 2840 - 287f\n\t0xE6, 0x98, 0x8E, 0xE6, 0xB2, 0xBB, 0x46, 0xE6,\n\t0x98, 0xAD, 0xE5, 0x92, 0x8C, 0x47, 0x72, 0x61,\n\t0x64, 0xE2, 0x88, 0x95, 0x73, 0x47, 0xE3, 0x80,\n\t0x94, 0x53, 0xE3, 0x80, 0x95, 0x48, 0x28, 0xE1,\n\t0x84, 0x80, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28,\n\t0xE1, 0x84, 0x82, 0xE1, 0x85, 0xA1, 0x29, 0x48,\n\t0x28, 0xE1, 0x84, 0x83, 0xE1, 0x85, 0xA1, 0x29,\n\t0x48, 0x28, 0xE1, 0x84, 0x85, 0xE1, 0x85, 0xA1,\n\t// Bytes 2880 - 28bf\n\t0x29, 0x48, 0x28, 0xE1, 0x84, 0x86, 0xE1, 0x85,\n\t0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x87, 0xE1,\n\t0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x89,\n\t0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84,\n\t0x8B, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1,\n\t0x84, 0x8C, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28,\n\t0xE1, 0x84, 0x8C, 0xE1, 0x85, 0xAE, 0x29, 0x48,\n\t0x28, 0xE1, 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0x29,\n\t// Bytes 28c0 - 28ff\n\t0x48, 0x28, 0xE1, 0x84, 0x8F, 0xE1, 0x85, 0xA1,\n\t0x29, 0x48, 0x28, 0xE1, 0x84, 0x90, 0xE1, 0x85,\n\t0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x91, 0xE1,\n\t0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x92,\n\t0xE1, 0x85, 0xA1, 0x29, 0x48, 0x72, 0x61, 0x64,\n\t0xE2, 0x88, 0x95, 0x73, 0x32, 0x48, 0xD8, 0xA7,\n\t0xD9, 0x83, 0xD8, 0xA8, 0xD8, 0xB1, 0x48, 0xD8,\n\t0xA7, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x87, 0x48,\n\t// Bytes 2900 - 293f\n\t0xD8, 0xB1, 0xD8, 0xB3, 0xD9, 0x88, 0xD9, 0x84,\n\t0x48, 0xD8, 0xB1, 0xDB, 0x8C, 0xD8, 0xA7, 0xD9,\n\t0x84, 0x48, 0xD8, 0xB5, 0xD9, 0x84, 0xD8, 0xB9,\n\t0xD9, 0x85, 0x48, 0xD8, 0xB9, 0xD9, 0x84, 0xD9,\n\t0x8A, 0xD9, 0x87, 0x48, 0xD9, 0x85, 0xD8, 0xAD,\n\t0xD9, 0x85, 0xD8, 0xAF, 0x48, 0xD9, 0x88, 0xD8,\n\t0xB3, 0xD9, 0x84, 0xD9, 0x85, 0x49, 0xE2, 0x80,\n\t0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x49,\n\t// Bytes 2940 - 297f\n\t0xE2, 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0xE2, 0x80,\n\t0xB5, 0x49, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB,\n\t0xE2, 0x88, 0xAB, 0x49, 0xE2, 0x88, 0xAE, 0xE2,\n\t0x88, 0xAE, 0xE2, 0x88, 0xAE, 0x49, 0xE3, 0x80,\n\t0x94, 0xE4, 0xB8, 0x89, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x80, 0x94, 0xE4, 0xBA, 0x8C, 0xE3, 0x80,\n\t0x95, 0x49, 0xE3, 0x80, 0x94, 0xE5, 0x8B, 0x9D,\n\t0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE5,\n\t// Bytes 2980 - 29bf\n\t0xAE, 0x89, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80,\n\t0x94, 0xE6, 0x89, 0x93, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x80, 0x94, 0xE6, 0x95, 0x97, 0xE3, 0x80,\n\t0x95, 0x49, 0xE3, 0x80, 0x94, 0xE6, 0x9C, 0xAC,\n\t0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE7,\n\t0x82, 0xB9, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80,\n\t0x94, 0xE7, 0x9B, 0x97, 0xE3, 0x80, 0x95, 0x49,\n\t0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t// Bytes 29c0 - 29ff\n\t0xAB, 0x49, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x81, 0x49, 0xE3, 0x82, 0xA6, 0xE3,\n\t0x82, 0xA9, 0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x82,\n\t0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0x49,\n\t0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xA0, 0x49, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x83, 0xAA, 0x49, 0xE3, 0x82, 0xB1, 0xE3,\n\t0x83, 0xBC, 0xE3, 0x82, 0xB9, 0x49, 0xE3, 0x82,\n\t// Bytes 2a00 - 2a3f\n\t0xB3, 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x8A, 0x49,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83,\n\t0x81, 0x49, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0x49, 0xE3, 0x83, 0x86, 0xE3,\n\t0x82, 0x99, 0xE3, 0x82, 0xB7, 0x49, 0xE3, 0x83,\n\t0x88, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0x49,\n\t0xE3, 0x83, 0x8E, 0xE3, 0x83, 0x83, 0xE3, 0x83,\n\t0x88, 0x49, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0xA4,\n\t// Bytes 2a40 - 2a7f\n\t0xE3, 0x83, 0x84, 0x49, 0xE3, 0x83, 0x92, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83,\n\t0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xB3, 0x49,\n\t0xE3, 0x83, 0x95, 0xE3, 0x83, 0xA9, 0xE3, 0x83,\n\t0xB3, 0x49, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A,\n\t0xE3, 0x82, 0xBD, 0x49, 0xE3, 0x83, 0x98, 0xE3,\n\t0x83, 0xAB, 0xE3, 0x83, 0x84, 0x49, 0xE3, 0x83,\n\t0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0x49,\n\t// Bytes 2a80 - 2abf\n\t0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xB3, 0x49, 0xE3, 0x83, 0x9E, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83, 0x9E, 0xE3,\n\t0x83, 0x83, 0xE3, 0x83, 0x8F, 0x49, 0xE3, 0x83,\n\t0x9E, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xAF, 0x49,\n\t0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0xAB, 0x49, 0xE3, 0x83, 0xA6, 0xE3, 0x82, 0xA2,\n\t0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x83, 0xAF, 0xE3,\n\t// Bytes 2ac0 - 2aff\n\t0x83, 0x83, 0xE3, 0x83, 0x88, 0x4C, 0xE2, 0x80,\n\t0xB2, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0xE2,\n\t0x80, 0xB2, 0x4C, 0xE2, 0x88, 0xAB, 0xE2, 0x88,\n\t0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x4C,\n\t0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xAB, 0xE3, 0x83,\n\t0x95, 0xE3, 0x82, 0xA1, 0x4C, 0xE3, 0x82, 0xA8,\n\t0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xAB, 0xE3, 0x83,\n\t0xBC, 0x4C, 0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99,\n\t// Bytes 2b00 - 2b3f\n\t0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3, 0x4C, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x9E, 0x4C, 0xE3, 0x82, 0xAB, 0xE3,\n\t0x83, 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88,\n\t0x4C, 0xE3, 0x82, 0xAB, 0xE3, 0x83, 0xAD, 0xE3,\n\t0x83, 0xAA, 0xE3, 0x83, 0xBC, 0x4C, 0xE3, 0x82,\n\t0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x8B, 0xE3,\n\t0x83, 0xBC, 0x4C, 0xE3, 0x82, 0xAD, 0xE3, 0x83,\n\t// Bytes 2b40 - 2b7f\n\t0xA5, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xBC, 0x4C,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83,\n\t0xA9, 0xE3, 0x83, 0xA0, 0x4C, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xBC, 0xE3, 0x83,\n\t0x8D, 0x4C, 0xE3, 0x82, 0xB5, 0xE3, 0x82, 0xA4,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB, 0x4C, 0xE3,\n\t0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x82, 0xB9, 0x4C, 0xE3, 0x83, 0x8F, 0xE3,\n\t// Bytes 2b80 - 2bbf\n\t0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x84,\n\t0x4C, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x83, 0xAB, 0x4C, 0xE3, 0x83,\n\t0x95, 0xE3, 0x82, 0xA3, 0xE3, 0x83, 0xBC, 0xE3,\n\t0x83, 0x88, 0x4C, 0xE3, 0x83, 0x98, 0xE3, 0x82,\n\t0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xBF, 0x4C,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83,\n\t0x8B, 0xE3, 0x83, 0x92, 0x4C, 0xE3, 0x83, 0x98,\n\t// Bytes 2bc0 - 2bff\n\t0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x82,\n\t0xB9, 0x4C, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xAB, 0xE3, 0x83, 0x88, 0x4C, 0xE3,\n\t0x83, 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x83, 0xAD, 0x4C, 0xE3, 0x83, 0x9F, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xB3,\n\t0x4C, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC, 0xE3,\n\t0x83, 0x88, 0xE3, 0x83, 0xAB, 0x4C, 0xE3, 0x83,\n\t// Bytes 2c00 - 2c3f\n\t0xAA, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3,\n\t0x83, 0xAB, 0x4C, 0xE3, 0x83, 0xAB, 0xE3, 0x83,\n\t0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0x4C,\n\t0xE6, 0xA0, 0xAA, 0xE5, 0xBC, 0x8F, 0xE4, 0xBC,\n\t0x9A, 0xE7, 0xA4, 0xBE, 0x4E, 0x28, 0xE1, 0x84,\n\t0x8B, 0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x92, 0xE1,\n\t0x85, 0xAE, 0x29, 0x4F, 0xD8, 0xAC, 0xD9, 0x84,\n\t0x20, 0xD8, 0xAC, 0xD9, 0x84, 0xD8, 0xA7, 0xD9,\n\t// Bytes 2c40 - 2c7f\n\t0x84, 0xD9, 0x87, 0x4F, 0xE3, 0x82, 0xA2, 0xE3,\n\t0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x82, 0xA2, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A,\n\t0xE3, 0x82, 0xA2, 0x4F, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x82, 0xB5, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x83, 0x81, 0xE3, 0x83, 0xBC,\n\t// Bytes 2c80 - 2cbf\n\t0xE3, 0x83, 0xA0, 0x4F, 0xE3, 0x83, 0x8F, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAC,\n\t0xE3, 0x83, 0xAB, 0x4F, 0xE3, 0x83, 0x98, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0xBF, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0xAB, 0x4F, 0xE3, 0x83, 0x9B, 0xE3,\n\t0x82, 0x9A, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0x4F, 0xE3, 0x83, 0x9E, 0xE3,\n\t0x83, 0xB3, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0xA7,\n\t// Bytes 2cc0 - 2cff\n\t0xE3, 0x83, 0xB3, 0x4F, 0xE3, 0x83, 0xA1, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x88,\n\t0xE3, 0x83, 0xB3, 0x4F, 0xE3, 0x83, 0xAB, 0xE3,\n\t0x83, 0xBC, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xAB, 0x51, 0x28, 0xE1, 0x84, 0x8B,\n\t0xE1, 0x85, 0xA9, 0xE1, 0x84, 0x8C, 0xE1, 0x85,\n\t0xA5, 0xE1, 0x86, 0xAB, 0x29, 0x52, 0xE3, 0x82,\n\t0xAD, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3,\n\t// Bytes 2d00 - 2d3f\n\t0x82, 0xBF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC,\n\t0x52, 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9,\n\t0xE3, 0x83, 0xA0, 0x52, 0xE3, 0x82, 0xAD, 0xE3,\n\t0x83, 0xAD, 0xE3, 0x83, 0xA1, 0xE3, 0x83, 0xBC,\n\t0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0x52, 0xE3,\n\t0x82, 0xAF, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xA9,\n\t0xE3, 0x83, 0xA0, 0xE3, 0x83, 0x88, 0xE3, 0x83,\n\t// Bytes 2d40 - 2d7f\n\t0xB3, 0x52, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAB,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, 0xE3, 0x82,\n\t0xA4, 0xE3, 0x83, 0xAD, 0x52, 0xE3, 0x83, 0x8F,\n\t0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x82,\n\t0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0x52,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0xE3, 0x82,\n\t0xA2, 0xE3, 0x82, 0xB9, 0xE3, 0x83, 0x88, 0xE3,\n\t0x83, 0xAB, 0x52, 0xE3, 0x83, 0x95, 0xE3, 0x82,\n\t// Bytes 2d80 - 2dbf\n\t0x99, 0xE3, 0x83, 0x83, 0xE3, 0x82, 0xB7, 0xE3,\n\t0x82, 0xA7, 0xE3, 0x83, 0xAB, 0x52, 0xE3, 0x83,\n\t0x9F, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x8F, 0xE3,\n\t0x82, 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB,\n\t0x52, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xB3, 0xE3,\n\t0x83, 0x88, 0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99,\n\t0xE3, 0x83, 0xB3, 0x5F, 0xD8, 0xB5, 0xD9, 0x84,\n\t0xD9, 0x89, 0x20, 0xD8, 0xA7, 0xD9, 0x84, 0xD9,\n\t// Bytes 2dc0 - 2dff\n\t0x84, 0xD9, 0x87, 0x20, 0xD8, 0xB9, 0xD9, 0x84,\n\t0xD9, 0x8A, 0xD9, 0x87, 0x20, 0xD9, 0x88, 0xD8,\n\t0xB3, 0xD9, 0x84, 0xD9, 0x85, 0x44, 0x44, 0x5A,\n\t0xCC, 0x8C, 0xCD, 0x44, 0x44, 0x7A, 0xCC, 0x8C,\n\t0xCD, 0x44, 0x64, 0x7A, 0xCC, 0x8C, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x93, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x94, 0xCD, 0x46,\n\t0xD9, 0x84, 0xD8, 0xA7, 0xD9, 0x95, 0xB9, 0x49,\n\t// Bytes 2e00 - 2e3f\n\t0xE3, 0x83, 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82,\n\t0x99, 0x11, 0x4C, 0xE1, 0x84, 0x8C, 0xE1, 0x85,\n\t0xAE, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xB4, 0x01,\n\t0x4C, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, 0xE3,\n\t0x82, 0xAB, 0xE3, 0x82, 0x99, 0x11, 0x4C, 0xE3,\n\t0x82, 0xB3, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x9B,\n\t0xE3, 0x82, 0x9A, 0x11, 0x4C, 0xE3, 0x83, 0xA4,\n\t0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x82,\n\t// Bytes 2e40 - 2e7f\n\t0x99, 0x11, 0x4F, 0xE1, 0x84, 0x8E, 0xE1, 0x85,\n\t0xA1, 0xE1, 0x86, 0xB7, 0xE1, 0x84, 0x80, 0xE1,\n\t0x85, 0xA9, 0x01, 0x4F, 0xE3, 0x82, 0xA4, 0xE3,\n\t0x83, 0x8B, 0xE3, 0x83, 0xB3, 0xE3, 0x82, 0xAF,\n\t0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3, 0x82, 0xB7,\n\t0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xB3, 0xE3, 0x82,\n\t0xAF, 0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3, 0x83,\n\t0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xBC, 0xE3,\n\t// Bytes 2e80 - 2ebf\n\t0x82, 0xB7, 0xE3, 0x82, 0x99, 0x11, 0x4F, 0xE3,\n\t0x83, 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x83, 0xB3,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x52,\n\t0xE3, 0x82, 0xA8, 0xE3, 0x82, 0xB9, 0xE3, 0x82,\n\t0xAF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3,\n\t0x82, 0x99, 0x11, 0x52, 0xE3, 0x83, 0x95, 0xE3,\n\t0x82, 0xA1, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0x83,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x03,\n\t// Bytes 2ec0 - 2eff\n\t0x3C, 0xCC, 0xB8, 0x05, 0x03, 0x3D, 0xCC, 0xB8,\n\t0x05, 0x03, 0x3E, 0xCC, 0xB8, 0x05, 0x03, 0x41,\n\t0xCC, 0x80, 0xCD, 0x03, 0x41, 0xCC, 0x81, 0xCD,\n\t0x03, 0x41, 0xCC, 0x83, 0xCD, 0x03, 0x41, 0xCC,\n\t0x84, 0xCD, 0x03, 0x41, 0xCC, 0x89, 0xCD, 0x03,\n\t0x41, 0xCC, 0x8C, 0xCD, 0x03, 0x41, 0xCC, 0x8F,\n\t0xCD, 0x03, 0x41, 0xCC, 0x91, 0xCD, 0x03, 0x41,\n\t0xCC, 0xA5, 0xB9, 0x03, 0x41, 0xCC, 0xA8, 0xA9,\n\t// Bytes 2f00 - 2f3f\n\t0x03, 0x42, 0xCC, 0x87, 0xCD, 0x03, 0x42, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x42, 0xCC, 0xB1, 0xB9, 0x03,\n\t0x43, 0xCC, 0x81, 0xCD, 0x03, 0x43, 0xCC, 0x82,\n\t0xCD, 0x03, 0x43, 0xCC, 0x87, 0xCD, 0x03, 0x43,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x44, 0xCC, 0x87, 0xCD,\n\t0x03, 0x44, 0xCC, 0x8C, 0xCD, 0x03, 0x44, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x44, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x44, 0xCC, 0xAD, 0xB9, 0x03, 0x44, 0xCC, 0xB1,\n\t// Bytes 2f40 - 2f7f\n\t0xB9, 0x03, 0x45, 0xCC, 0x80, 0xCD, 0x03, 0x45,\n\t0xCC, 0x81, 0xCD, 0x03, 0x45, 0xCC, 0x83, 0xCD,\n\t0x03, 0x45, 0xCC, 0x86, 0xCD, 0x03, 0x45, 0xCC,\n\t0x87, 0xCD, 0x03, 0x45, 0xCC, 0x88, 0xCD, 0x03,\n\t0x45, 0xCC, 0x89, 0xCD, 0x03, 0x45, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x45, 0xCC, 0x8F, 0xCD, 0x03, 0x45,\n\t0xCC, 0x91, 0xCD, 0x03, 0x45, 0xCC, 0xA8, 0xA9,\n\t0x03, 0x45, 0xCC, 0xAD, 0xB9, 0x03, 0x45, 0xCC,\n\t// Bytes 2f80 - 2fbf\n\t0xB0, 0xB9, 0x03, 0x46, 0xCC, 0x87, 0xCD, 0x03,\n\t0x47, 0xCC, 0x81, 0xCD, 0x03, 0x47, 0xCC, 0x82,\n\t0xCD, 0x03, 0x47, 0xCC, 0x84, 0xCD, 0x03, 0x47,\n\t0xCC, 0x86, 0xCD, 0x03, 0x47, 0xCC, 0x87, 0xCD,\n\t0x03, 0x47, 0xCC, 0x8C, 0xCD, 0x03, 0x47, 0xCC,\n\t0xA7, 0xA9, 0x03, 0x48, 0xCC, 0x82, 0xCD, 0x03,\n\t0x48, 0xCC, 0x87, 0xCD, 0x03, 0x48, 0xCC, 0x88,\n\t0xCD, 0x03, 0x48, 0xCC, 0x8C, 0xCD, 0x03, 0x48,\n\t// Bytes 2fc0 - 2fff\n\t0xCC, 0xA3, 0xB9, 0x03, 0x48, 0xCC, 0xA7, 0xA9,\n\t0x03, 0x48, 0xCC, 0xAE, 0xB9, 0x03, 0x49, 0xCC,\n\t0x80, 0xCD, 0x03, 0x49, 0xCC, 0x81, 0xCD, 0x03,\n\t0x49, 0xCC, 0x82, 0xCD, 0x03, 0x49, 0xCC, 0x83,\n\t0xCD, 0x03, 0x49, 0xCC, 0x84, 0xCD, 0x03, 0x49,\n\t0xCC, 0x86, 0xCD, 0x03, 0x49, 0xCC, 0x87, 0xCD,\n\t0x03, 0x49, 0xCC, 0x89, 0xCD, 0x03, 0x49, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x49, 0xCC, 0x8F, 0xCD, 0x03,\n\t// Bytes 3000 - 303f\n\t0x49, 0xCC, 0x91, 0xCD, 0x03, 0x49, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x49, 0xCC, 0xA8, 0xA9, 0x03, 0x49,\n\t0xCC, 0xB0, 0xB9, 0x03, 0x4A, 0xCC, 0x82, 0xCD,\n\t0x03, 0x4B, 0xCC, 0x81, 0xCD, 0x03, 0x4B, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x4B, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x4B, 0xCC, 0xA7, 0xA9, 0x03, 0x4B, 0xCC, 0xB1,\n\t0xB9, 0x03, 0x4C, 0xCC, 0x81, 0xCD, 0x03, 0x4C,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x4C, 0xCC, 0xA7, 0xA9,\n\t// Bytes 3040 - 307f\n\t0x03, 0x4C, 0xCC, 0xAD, 0xB9, 0x03, 0x4C, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x4D, 0xCC, 0x81, 0xCD, 0x03,\n\t0x4D, 0xCC, 0x87, 0xCD, 0x03, 0x4D, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x4E, 0xCC, 0x80, 0xCD, 0x03, 0x4E,\n\t0xCC, 0x81, 0xCD, 0x03, 0x4E, 0xCC, 0x83, 0xCD,\n\t0x03, 0x4E, 0xCC, 0x87, 0xCD, 0x03, 0x4E, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x4E, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x4E, 0xCC, 0xA7, 0xA9, 0x03, 0x4E, 0xCC, 0xAD,\n\t// Bytes 3080 - 30bf\n\t0xB9, 0x03, 0x4E, 0xCC, 0xB1, 0xB9, 0x03, 0x4F,\n\t0xCC, 0x80, 0xCD, 0x03, 0x4F, 0xCC, 0x81, 0xCD,\n\t0x03, 0x4F, 0xCC, 0x86, 0xCD, 0x03, 0x4F, 0xCC,\n\t0x89, 0xCD, 0x03, 0x4F, 0xCC, 0x8B, 0xCD, 0x03,\n\t0x4F, 0xCC, 0x8C, 0xCD, 0x03, 0x4F, 0xCC, 0x8F,\n\t0xCD, 0x03, 0x4F, 0xCC, 0x91, 0xCD, 0x03, 0x50,\n\t0xCC, 0x81, 0xCD, 0x03, 0x50, 0xCC, 0x87, 0xCD,\n\t0x03, 0x52, 0xCC, 0x81, 0xCD, 0x03, 0x52, 0xCC,\n\t// Bytes 30c0 - 30ff\n\t0x87, 0xCD, 0x03, 0x52, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x52, 0xCC, 0x8F, 0xCD, 0x03, 0x52, 0xCC, 0x91,\n\t0xCD, 0x03, 0x52, 0xCC, 0xA7, 0xA9, 0x03, 0x52,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x53, 0xCC, 0x82, 0xCD,\n\t0x03, 0x53, 0xCC, 0x87, 0xCD, 0x03, 0x53, 0xCC,\n\t0xA6, 0xB9, 0x03, 0x53, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x54, 0xCC, 0x87, 0xCD, 0x03, 0x54, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x54, 0xCC, 0xA3, 0xB9, 0x03, 0x54,\n\t// Bytes 3100 - 313f\n\t0xCC, 0xA6, 0xB9, 0x03, 0x54, 0xCC, 0xA7, 0xA9,\n\t0x03, 0x54, 0xCC, 0xAD, 0xB9, 0x03, 0x54, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x55, 0xCC, 0x80, 0xCD, 0x03,\n\t0x55, 0xCC, 0x81, 0xCD, 0x03, 0x55, 0xCC, 0x82,\n\t0xCD, 0x03, 0x55, 0xCC, 0x86, 0xCD, 0x03, 0x55,\n\t0xCC, 0x89, 0xCD, 0x03, 0x55, 0xCC, 0x8A, 0xCD,\n\t0x03, 0x55, 0xCC, 0x8B, 0xCD, 0x03, 0x55, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x55, 0xCC, 0x8F, 0xCD, 0x03,\n\t// Bytes 3140 - 317f\n\t0x55, 0xCC, 0x91, 0xCD, 0x03, 0x55, 0xCC, 0xA3,\n\t0xB9, 0x03, 0x55, 0xCC, 0xA4, 0xB9, 0x03, 0x55,\n\t0xCC, 0xA8, 0xA9, 0x03, 0x55, 0xCC, 0xAD, 0xB9,\n\t0x03, 0x55, 0xCC, 0xB0, 0xB9, 0x03, 0x56, 0xCC,\n\t0x83, 0xCD, 0x03, 0x56, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x57, 0xCC, 0x80, 0xCD, 0x03, 0x57, 0xCC, 0x81,\n\t0xCD, 0x03, 0x57, 0xCC, 0x82, 0xCD, 0x03, 0x57,\n\t0xCC, 0x87, 0xCD, 0x03, 0x57, 0xCC, 0x88, 0xCD,\n\t// Bytes 3180 - 31bf\n\t0x03, 0x57, 0xCC, 0xA3, 0xB9, 0x03, 0x58, 0xCC,\n\t0x87, 0xCD, 0x03, 0x58, 0xCC, 0x88, 0xCD, 0x03,\n\t0x59, 0xCC, 0x80, 0xCD, 0x03, 0x59, 0xCC, 0x81,\n\t0xCD, 0x03, 0x59, 0xCC, 0x82, 0xCD, 0x03, 0x59,\n\t0xCC, 0x83, 0xCD, 0x03, 0x59, 0xCC, 0x84, 0xCD,\n\t0x03, 0x59, 0xCC, 0x87, 0xCD, 0x03, 0x59, 0xCC,\n\t0x88, 0xCD, 0x03, 0x59, 0xCC, 0x89, 0xCD, 0x03,\n\t0x59, 0xCC, 0xA3, 0xB9, 0x03, 0x5A, 0xCC, 0x81,\n\t// Bytes 31c0 - 31ff\n\t0xCD, 0x03, 0x5A, 0xCC, 0x82, 0xCD, 0x03, 0x5A,\n\t0xCC, 0x87, 0xCD, 0x03, 0x5A, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x5A, 0xCC, 0xA3, 0xB9, 0x03, 0x5A, 0xCC,\n\t0xB1, 0xB9, 0x03, 0x61, 0xCC, 0x80, 0xCD, 0x03,\n\t0x61, 0xCC, 0x81, 0xCD, 0x03, 0x61, 0xCC, 0x83,\n\t0xCD, 0x03, 0x61, 0xCC, 0x84, 0xCD, 0x03, 0x61,\n\t0xCC, 0x89, 0xCD, 0x03, 0x61, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x61, 0xCC, 0x8F, 0xCD, 0x03, 0x61, 0xCC,\n\t// Bytes 3200 - 323f\n\t0x91, 0xCD, 0x03, 0x61, 0xCC, 0xA5, 0xB9, 0x03,\n\t0x61, 0xCC, 0xA8, 0xA9, 0x03, 0x62, 0xCC, 0x87,\n\t0xCD, 0x03, 0x62, 0xCC, 0xA3, 0xB9, 0x03, 0x62,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x63, 0xCC, 0x81, 0xCD,\n\t0x03, 0x63, 0xCC, 0x82, 0xCD, 0x03, 0x63, 0xCC,\n\t0x87, 0xCD, 0x03, 0x63, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x64, 0xCC, 0x87, 0xCD, 0x03, 0x64, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x64, 0xCC, 0xA3, 0xB9, 0x03, 0x64,\n\t// Bytes 3240 - 327f\n\t0xCC, 0xA7, 0xA9, 0x03, 0x64, 0xCC, 0xAD, 0xB9,\n\t0x03, 0x64, 0xCC, 0xB1, 0xB9, 0x03, 0x65, 0xCC,\n\t0x80, 0xCD, 0x03, 0x65, 0xCC, 0x81, 0xCD, 0x03,\n\t0x65, 0xCC, 0x83, 0xCD, 0x03, 0x65, 0xCC, 0x86,\n\t0xCD, 0x03, 0x65, 0xCC, 0x87, 0xCD, 0x03, 0x65,\n\t0xCC, 0x88, 0xCD, 0x03, 0x65, 0xCC, 0x89, 0xCD,\n\t0x03, 0x65, 0xCC, 0x8C, 0xCD, 0x03, 0x65, 0xCC,\n\t0x8F, 0xCD, 0x03, 0x65, 0xCC, 0x91, 0xCD, 0x03,\n\t// Bytes 3280 - 32bf\n\t0x65, 0xCC, 0xA8, 0xA9, 0x03, 0x65, 0xCC, 0xAD,\n\t0xB9, 0x03, 0x65, 0xCC, 0xB0, 0xB9, 0x03, 0x66,\n\t0xCC, 0x87, 0xCD, 0x03, 0x67, 0xCC, 0x81, 0xCD,\n\t0x03, 0x67, 0xCC, 0x82, 0xCD, 0x03, 0x67, 0xCC,\n\t0x84, 0xCD, 0x03, 0x67, 0xCC, 0x86, 0xCD, 0x03,\n\t0x67, 0xCC, 0x87, 0xCD, 0x03, 0x67, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x67, 0xCC, 0xA7, 0xA9, 0x03, 0x68,\n\t0xCC, 0x82, 0xCD, 0x03, 0x68, 0xCC, 0x87, 0xCD,\n\t// Bytes 32c0 - 32ff\n\t0x03, 0x68, 0xCC, 0x88, 0xCD, 0x03, 0x68, 0xCC,\n\t0x8C, 0xCD, 0x03, 0x68, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x68, 0xCC, 0xA7, 0xA9, 0x03, 0x68, 0xCC, 0xAE,\n\t0xB9, 0x03, 0x68, 0xCC, 0xB1, 0xB9, 0x03, 0x69,\n\t0xCC, 0x80, 0xCD, 0x03, 0x69, 0xCC, 0x81, 0xCD,\n\t0x03, 0x69, 0xCC, 0x82, 0xCD, 0x03, 0x69, 0xCC,\n\t0x83, 0xCD, 0x03, 0x69, 0xCC, 0x84, 0xCD, 0x03,\n\t0x69, 0xCC, 0x86, 0xCD, 0x03, 0x69, 0xCC, 0x89,\n\t// Bytes 3300 - 333f\n\t0xCD, 0x03, 0x69, 0xCC, 0x8C, 0xCD, 0x03, 0x69,\n\t0xCC, 0x8F, 0xCD, 0x03, 0x69, 0xCC, 0x91, 0xCD,\n\t0x03, 0x69, 0xCC, 0xA3, 0xB9, 0x03, 0x69, 0xCC,\n\t0xA8, 0xA9, 0x03, 0x69, 0xCC, 0xB0, 0xB9, 0x03,\n\t0x6A, 0xCC, 0x82, 0xCD, 0x03, 0x6A, 0xCC, 0x8C,\n\t0xCD, 0x03, 0x6B, 0xCC, 0x81, 0xCD, 0x03, 0x6B,\n\t0xCC, 0x8C, 0xCD, 0x03, 0x6B, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x6B, 0xCC, 0xA7, 0xA9, 0x03, 0x6B, 0xCC,\n\t// Bytes 3340 - 337f\n\t0xB1, 0xB9, 0x03, 0x6C, 0xCC, 0x81, 0xCD, 0x03,\n\t0x6C, 0xCC, 0x8C, 0xCD, 0x03, 0x6C, 0xCC, 0xA7,\n\t0xA9, 0x03, 0x6C, 0xCC, 0xAD, 0xB9, 0x03, 0x6C,\n\t0xCC, 0xB1, 0xB9, 0x03, 0x6D, 0xCC, 0x81, 0xCD,\n\t0x03, 0x6D, 0xCC, 0x87, 0xCD, 0x03, 0x6D, 0xCC,\n\t0xA3, 0xB9, 0x03, 0x6E, 0xCC, 0x80, 0xCD, 0x03,\n\t0x6E, 0xCC, 0x81, 0xCD, 0x03, 0x6E, 0xCC, 0x83,\n\t0xCD, 0x03, 0x6E, 0xCC, 0x87, 0xCD, 0x03, 0x6E,\n\t// Bytes 3380 - 33bf\n\t0xCC, 0x8C, 0xCD, 0x03, 0x6E, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x6E, 0xCC, 0xA7, 0xA9, 0x03, 0x6E, 0xCC,\n\t0xAD, 0xB9, 0x03, 0x6E, 0xCC, 0xB1, 0xB9, 0x03,\n\t0x6F, 0xCC, 0x80, 0xCD, 0x03, 0x6F, 0xCC, 0x81,\n\t0xCD, 0x03, 0x6F, 0xCC, 0x86, 0xCD, 0x03, 0x6F,\n\t0xCC, 0x89, 0xCD, 0x03, 0x6F, 0xCC, 0x8B, 0xCD,\n\t0x03, 0x6F, 0xCC, 0x8C, 0xCD, 0x03, 0x6F, 0xCC,\n\t0x8F, 0xCD, 0x03, 0x6F, 0xCC, 0x91, 0xCD, 0x03,\n\t// Bytes 33c0 - 33ff\n\t0x70, 0xCC, 0x81, 0xCD, 0x03, 0x70, 0xCC, 0x87,\n\t0xCD, 0x03, 0x72, 0xCC, 0x81, 0xCD, 0x03, 0x72,\n\t0xCC, 0x87, 0xCD, 0x03, 0x72, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x72, 0xCC, 0x8F, 0xCD, 0x03, 0x72, 0xCC,\n\t0x91, 0xCD, 0x03, 0x72, 0xCC, 0xA7, 0xA9, 0x03,\n\t0x72, 0xCC, 0xB1, 0xB9, 0x03, 0x73, 0xCC, 0x82,\n\t0xCD, 0x03, 0x73, 0xCC, 0x87, 0xCD, 0x03, 0x73,\n\t0xCC, 0xA6, 0xB9, 0x03, 0x73, 0xCC, 0xA7, 0xA9,\n\t// Bytes 3400 - 343f\n\t0x03, 0x74, 0xCC, 0x87, 0xCD, 0x03, 0x74, 0xCC,\n\t0x88, 0xCD, 0x03, 0x74, 0xCC, 0x8C, 0xCD, 0x03,\n\t0x74, 0xCC, 0xA3, 0xB9, 0x03, 0x74, 0xCC, 0xA6,\n\t0xB9, 0x03, 0x74, 0xCC, 0xA7, 0xA9, 0x03, 0x74,\n\t0xCC, 0xAD, 0xB9, 0x03, 0x74, 0xCC, 0xB1, 0xB9,\n\t0x03, 0x75, 0xCC, 0x80, 0xCD, 0x03, 0x75, 0xCC,\n\t0x81, 0xCD, 0x03, 0x75, 0xCC, 0x82, 0xCD, 0x03,\n\t0x75, 0xCC, 0x86, 0xCD, 0x03, 0x75, 0xCC, 0x89,\n\t// Bytes 3440 - 347f\n\t0xCD, 0x03, 0x75, 0xCC, 0x8A, 0xCD, 0x03, 0x75,\n\t0xCC, 0x8B, 0xCD, 0x03, 0x75, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x75, 0xCC, 0x8F, 0xCD, 0x03, 0x75, 0xCC,\n\t0x91, 0xCD, 0x03, 0x75, 0xCC, 0xA3, 0xB9, 0x03,\n\t0x75, 0xCC, 0xA4, 0xB9, 0x03, 0x75, 0xCC, 0xA8,\n\t0xA9, 0x03, 0x75, 0xCC, 0xAD, 0xB9, 0x03, 0x75,\n\t0xCC, 0xB0, 0xB9, 0x03, 0x76, 0xCC, 0x83, 0xCD,\n\t0x03, 0x76, 0xCC, 0xA3, 0xB9, 0x03, 0x77, 0xCC,\n\t// Bytes 3480 - 34bf\n\t0x80, 0xCD, 0x03, 0x77, 0xCC, 0x81, 0xCD, 0x03,\n\t0x77, 0xCC, 0x82, 0xCD, 0x03, 0x77, 0xCC, 0x87,\n\t0xCD, 0x03, 0x77, 0xCC, 0x88, 0xCD, 0x03, 0x77,\n\t0xCC, 0x8A, 0xCD, 0x03, 0x77, 0xCC, 0xA3, 0xB9,\n\t0x03, 0x78, 0xCC, 0x87, 0xCD, 0x03, 0x78, 0xCC,\n\t0x88, 0xCD, 0x03, 0x79, 0xCC, 0x80, 0xCD, 0x03,\n\t0x79, 0xCC, 0x81, 0xCD, 0x03, 0x79, 0xCC, 0x82,\n\t0xCD, 0x03, 0x79, 0xCC, 0x83, 0xCD, 0x03, 0x79,\n\t// Bytes 34c0 - 34ff\n\t0xCC, 0x84, 0xCD, 0x03, 0x79, 0xCC, 0x87, 0xCD,\n\t0x03, 0x79, 0xCC, 0x88, 0xCD, 0x03, 0x79, 0xCC,\n\t0x89, 0xCD, 0x03, 0x79, 0xCC, 0x8A, 0xCD, 0x03,\n\t0x79, 0xCC, 0xA3, 0xB9, 0x03, 0x7A, 0xCC, 0x81,\n\t0xCD, 0x03, 0x7A, 0xCC, 0x82, 0xCD, 0x03, 0x7A,\n\t0xCC, 0x87, 0xCD, 0x03, 0x7A, 0xCC, 0x8C, 0xCD,\n\t0x03, 0x7A, 0xCC, 0xA3, 0xB9, 0x03, 0x7A, 0xCC,\n\t0xB1, 0xB9, 0x04, 0xC2, 0xA8, 0xCC, 0x80, 0xCE,\n\t// Bytes 3500 - 353f\n\t0x04, 0xC2, 0xA8, 0xCC, 0x81, 0xCE, 0x04, 0xC2,\n\t0xA8, 0xCD, 0x82, 0xCE, 0x04, 0xC3, 0x86, 0xCC,\n\t0x81, 0xCD, 0x04, 0xC3, 0x86, 0xCC, 0x84, 0xCD,\n\t0x04, 0xC3, 0x98, 0xCC, 0x81, 0xCD, 0x04, 0xC3,\n\t0xA6, 0xCC, 0x81, 0xCD, 0x04, 0xC3, 0xA6, 0xCC,\n\t0x84, 0xCD, 0x04, 0xC3, 0xB8, 0xCC, 0x81, 0xCD,\n\t0x04, 0xC5, 0xBF, 0xCC, 0x87, 0xCD, 0x04, 0xC6,\n\t0xB7, 0xCC, 0x8C, 0xCD, 0x04, 0xCA, 0x92, 0xCC,\n\t// Bytes 3540 - 357f\n\t0x8C, 0xCD, 0x04, 0xCE, 0x91, 0xCC, 0x80, 0xCD,\n\t0x04, 0xCE, 0x91, 0xCC, 0x81, 0xCD, 0x04, 0xCE,\n\t0x91, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0x91, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0x91, 0xCD, 0x85, 0xDD,\n\t0x04, 0xCE, 0x95, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0x95, 0xCC, 0x81, 0xCD, 0x04, 0xCE, 0x97, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0x97, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0x97, 0xCD, 0x85, 0xDD, 0x04, 0xCE,\n\t// Bytes 3580 - 35bf\n\t0x99, 0xCC, 0x80, 0xCD, 0x04, 0xCE, 0x99, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCE, 0x99, 0xCC, 0x84, 0xCD,\n\t0x04, 0xCE, 0x99, 0xCC, 0x86, 0xCD, 0x04, 0xCE,\n\t0x99, 0xCC, 0x88, 0xCD, 0x04, 0xCE, 0x9F, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0x9F, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0xA1, 0xCC, 0x94, 0xCD, 0x04, 0xCE,\n\t0xA5, 0xCC, 0x80, 0xCD, 0x04, 0xCE, 0xA5, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCE, 0xA5, 0xCC, 0x84, 0xCD,\n\t// Bytes 35c0 - 35ff\n\t0x04, 0xCE, 0xA5, 0xCC, 0x86, 0xCD, 0x04, 0xCE,\n\t0xA5, 0xCC, 0x88, 0xCD, 0x04, 0xCE, 0xA9, 0xCC,\n\t0x80, 0xCD, 0x04, 0xCE, 0xA9, 0xCC, 0x81, 0xCD,\n\t0x04, 0xCE, 0xA9, 0xCD, 0x85, 0xDD, 0x04, 0xCE,\n\t0xB1, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0xB1, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0xB1, 0xCD, 0x85, 0xDD,\n\t0x04, 0xCE, 0xB5, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0xB5, 0xCC, 0x81, 0xCD, 0x04, 0xCE, 0xB7, 0xCD,\n\t// Bytes 3600 - 363f\n\t0x85, 0xDD, 0x04, 0xCE, 0xB9, 0xCC, 0x80, 0xCD,\n\t0x04, 0xCE, 0xB9, 0xCC, 0x81, 0xCD, 0x04, 0xCE,\n\t0xB9, 0xCC, 0x84, 0xCD, 0x04, 0xCE, 0xB9, 0xCC,\n\t0x86, 0xCD, 0x04, 0xCE, 0xB9, 0xCD, 0x82, 0xCD,\n\t0x04, 0xCE, 0xBF, 0xCC, 0x80, 0xCD, 0x04, 0xCE,\n\t0xBF, 0xCC, 0x81, 0xCD, 0x04, 0xCF, 0x81, 0xCC,\n\t0x93, 0xCD, 0x04, 0xCF, 0x81, 0xCC, 0x94, 0xCD,\n\t0x04, 0xCF, 0x85, 0xCC, 0x80, 0xCD, 0x04, 0xCF,\n\t// Bytes 3640 - 367f\n\t0x85, 0xCC, 0x81, 0xCD, 0x04, 0xCF, 0x85, 0xCC,\n\t0x84, 0xCD, 0x04, 0xCF, 0x85, 0xCC, 0x86, 0xCD,\n\t0x04, 0xCF, 0x85, 0xCD, 0x82, 0xCD, 0x04, 0xCF,\n\t0x89, 0xCD, 0x85, 0xDD, 0x04, 0xCF, 0x92, 0xCC,\n\t0x81, 0xCD, 0x04, 0xCF, 0x92, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0x86, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0x90, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0x90, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0x93, 0xCC, 0x81, 0xCD,\n\t// Bytes 3680 - 36bf\n\t0x04, 0xD0, 0x95, 0xCC, 0x80, 0xCD, 0x04, 0xD0,\n\t0x95, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0x95, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0x96, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0x96, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0x97, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0x98, 0xCC,\n\t0x80, 0xCD, 0x04, 0xD0, 0x98, 0xCC, 0x84, 0xCD,\n\t0x04, 0xD0, 0x98, 0xCC, 0x86, 0xCD, 0x04, 0xD0,\n\t0x98, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0x9A, 0xCC,\n\t// Bytes 36c0 - 36ff\n\t0x81, 0xCD, 0x04, 0xD0, 0x9E, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0xA3, 0xCC, 0x84, 0xCD, 0x04, 0xD0,\n\t0xA3, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0xA3, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xA3, 0xCC, 0x8B, 0xCD,\n\t0x04, 0xD0, 0xA7, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0xAB, 0xCC, 0x88, 0xCD, 0x04, 0xD0, 0xAD, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xB0, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0xB0, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t// Bytes 3700 - 373f\n\t0xB3, 0xCC, 0x81, 0xCD, 0x04, 0xD0, 0xB5, 0xCC,\n\t0x80, 0xCD, 0x04, 0xD0, 0xB5, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD0, 0xB5, 0xCC, 0x88, 0xCD, 0x04, 0xD0,\n\t0xB6, 0xCC, 0x86, 0xCD, 0x04, 0xD0, 0xB6, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD0, 0xB7, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD0, 0xB8, 0xCC, 0x80, 0xCD, 0x04, 0xD0,\n\t0xB8, 0xCC, 0x84, 0xCD, 0x04, 0xD0, 0xB8, 0xCC,\n\t0x86, 0xCD, 0x04, 0xD0, 0xB8, 0xCC, 0x88, 0xCD,\n\t// Bytes 3740 - 377f\n\t0x04, 0xD0, 0xBA, 0xCC, 0x81, 0xCD, 0x04, 0xD0,\n\t0xBE, 0xCC, 0x88, 0xCD, 0x04, 0xD1, 0x83, 0xCC,\n\t0x84, 0xCD, 0x04, 0xD1, 0x83, 0xCC, 0x86, 0xCD,\n\t0x04, 0xD1, 0x83, 0xCC, 0x88, 0xCD, 0x04, 0xD1,\n\t0x83, 0xCC, 0x8B, 0xCD, 0x04, 0xD1, 0x87, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD1, 0x8B, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD1, 0x8D, 0xCC, 0x88, 0xCD, 0x04, 0xD1,\n\t0x96, 0xCC, 0x88, 0xCD, 0x04, 0xD1, 0xB4, 0xCC,\n\t// Bytes 3780 - 37bf\n\t0x8F, 0xCD, 0x04, 0xD1, 0xB5, 0xCC, 0x8F, 0xCD,\n\t0x04, 0xD3, 0x98, 0xCC, 0x88, 0xCD, 0x04, 0xD3,\n\t0x99, 0xCC, 0x88, 0xCD, 0x04, 0xD3, 0xA8, 0xCC,\n\t0x88, 0xCD, 0x04, 0xD3, 0xA9, 0xCC, 0x88, 0xCD,\n\t0x04, 0xD8, 0xA7, 0xD9, 0x93, 0xCD, 0x04, 0xD8,\n\t0xA7, 0xD9, 0x94, 0xCD, 0x04, 0xD8, 0xA7, 0xD9,\n\t0x95, 0xB9, 0x04, 0xD9, 0x88, 0xD9, 0x94, 0xCD,\n\t0x04, 0xD9, 0x8A, 0xD9, 0x94, 0xCD, 0x04, 0xDB,\n\t// Bytes 37c0 - 37ff\n\t0x81, 0xD9, 0x94, 0xCD, 0x04, 0xDB, 0x92, 0xD9,\n\t0x94, 0xCD, 0x04, 0xDB, 0x95, 0xD9, 0x94, 0xCD,\n\t0x05, 0x41, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05,\n\t0x41, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x41,\n\t0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x41, 0xCC,\n\t0x82, 0xCC, 0x89, 0xCE, 0x05, 0x41, 0xCC, 0x86,\n\t0xCC, 0x80, 0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC,\n\t0x81, 0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC, 0x83,\n\t// Bytes 3800 - 383f\n\t0xCE, 0x05, 0x41, 0xCC, 0x86, 0xCC, 0x89, 0xCE,\n\t0x05, 0x41, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05,\n\t0x41, 0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x41,\n\t0xCC, 0x8A, 0xCC, 0x81, 0xCE, 0x05, 0x41, 0xCC,\n\t0xA3, 0xCC, 0x82, 0xCE, 0x05, 0x41, 0xCC, 0xA3,\n\t0xCC, 0x86, 0xCE, 0x05, 0x43, 0xCC, 0xA7, 0xCC,\n\t0x81, 0xCE, 0x05, 0x45, 0xCC, 0x82, 0xCC, 0x80,\n\t0xCE, 0x05, 0x45, 0xCC, 0x82, 0xCC, 0x81, 0xCE,\n\t// Bytes 3840 - 387f\n\t0x05, 0x45, 0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05,\n\t0x45, 0xCC, 0x82, 0xCC, 0x89, 0xCE, 0x05, 0x45,\n\t0xCC, 0x84, 0xCC, 0x80, 0xCE, 0x05, 0x45, 0xCC,\n\t0x84, 0xCC, 0x81, 0xCE, 0x05, 0x45, 0xCC, 0xA3,\n\t0xCC, 0x82, 0xCE, 0x05, 0x45, 0xCC, 0xA7, 0xCC,\n\t0x86, 0xCE, 0x05, 0x49, 0xCC, 0x88, 0xCC, 0x81,\n\t0xCE, 0x05, 0x4C, 0xCC, 0xA3, 0xCC, 0x84, 0xCE,\n\t0x05, 0x4F, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05,\n\t// Bytes 3880 - 38bf\n\t0x4F, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x4F,\n\t0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x4F, 0xCC,\n\t0x82, 0xCC, 0x89, 0xCE, 0x05, 0x4F, 0xCC, 0x83,\n\t0xCC, 0x81, 0xCE, 0x05, 0x4F, 0xCC, 0x83, 0xCC,\n\t0x84, 0xCE, 0x05, 0x4F, 0xCC, 0x83, 0xCC, 0x88,\n\t0xCE, 0x05, 0x4F, 0xCC, 0x84, 0xCC, 0x80, 0xCE,\n\t0x05, 0x4F, 0xCC, 0x84, 0xCC, 0x81, 0xCE, 0x05,\n\t0x4F, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x4F,\n\t// Bytes 38c0 - 38ff\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x4F, 0xCC,\n\t0x9B, 0xCC, 0x80, 0xCE, 0x05, 0x4F, 0xCC, 0x9B,\n\t0xCC, 0x81, 0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC,\n\t0x83, 0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0x89,\n\t0xCE, 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA,\n\t0x05, 0x4F, 0xCC, 0xA3, 0xCC, 0x82, 0xCE, 0x05,\n\t0x4F, 0xCC, 0xA8, 0xCC, 0x84, 0xCE, 0x05, 0x52,\n\t0xCC, 0xA3, 0xCC, 0x84, 0xCE, 0x05, 0x53, 0xCC,\n\t// Bytes 3900 - 393f\n\t0x81, 0xCC, 0x87, 0xCE, 0x05, 0x53, 0xCC, 0x8C,\n\t0xCC, 0x87, 0xCE, 0x05, 0x53, 0xCC, 0xA3, 0xCC,\n\t0x87, 0xCE, 0x05, 0x55, 0xCC, 0x83, 0xCC, 0x81,\n\t0xCE, 0x05, 0x55, 0xCC, 0x84, 0xCC, 0x88, 0xCE,\n\t0x05, 0x55, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x05,\n\t0x55, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x05, 0x55,\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x55, 0xCC,\n\t0x88, 0xCC, 0x8C, 0xCE, 0x05, 0x55, 0xCC, 0x9B,\n\t// Bytes 3940 - 397f\n\t0xCC, 0x80, 0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC,\n\t0x81, 0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC, 0x83,\n\t0xCE, 0x05, 0x55, 0xCC, 0x9B, 0xCC, 0x89, 0xCE,\n\t0x05, 0x55, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05,\n\t0x61, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05, 0x61,\n\t0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x61, 0xCC,\n\t0x82, 0xCC, 0x83, 0xCE, 0x05, 0x61, 0xCC, 0x82,\n\t0xCC, 0x89, 0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC,\n\t// Bytes 3980 - 39bf\n\t0x80, 0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC, 0x81,\n\t0xCE, 0x05, 0x61, 0xCC, 0x86, 0xCC, 0x83, 0xCE,\n\t0x05, 0x61, 0xCC, 0x86, 0xCC, 0x89, 0xCE, 0x05,\n\t0x61, 0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x61,\n\t0xCC, 0x88, 0xCC, 0x84, 0xCE, 0x05, 0x61, 0xCC,\n\t0x8A, 0xCC, 0x81, 0xCE, 0x05, 0x61, 0xCC, 0xA3,\n\t0xCC, 0x82, 0xCE, 0x05, 0x61, 0xCC, 0xA3, 0xCC,\n\t0x86, 0xCE, 0x05, 0x63, 0xCC, 0xA7, 0xCC, 0x81,\n\t// Bytes 39c0 - 39ff\n\t0xCE, 0x05, 0x65, 0xCC, 0x82, 0xCC, 0x80, 0xCE,\n\t0x05, 0x65, 0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05,\n\t0x65, 0xCC, 0x82, 0xCC, 0x83, 0xCE, 0x05, 0x65,\n\t0xCC, 0x82, 0xCC, 0x89, 0xCE, 0x05, 0x65, 0xCC,\n\t0x84, 0xCC, 0x80, 0xCE, 0x05, 0x65, 0xCC, 0x84,\n\t0xCC, 0x81, 0xCE, 0x05, 0x65, 0xCC, 0xA3, 0xCC,\n\t0x82, 0xCE, 0x05, 0x65, 0xCC, 0xA7, 0xCC, 0x86,\n\t0xCE, 0x05, 0x69, 0xCC, 0x88, 0xCC, 0x81, 0xCE,\n\t// Bytes 3a00 - 3a3f\n\t0x05, 0x6C, 0xCC, 0xA3, 0xCC, 0x84, 0xCE, 0x05,\n\t0x6F, 0xCC, 0x82, 0xCC, 0x80, 0xCE, 0x05, 0x6F,\n\t0xCC, 0x82, 0xCC, 0x81, 0xCE, 0x05, 0x6F, 0xCC,\n\t0x82, 0xCC, 0x83, 0xCE, 0x05, 0x6F, 0xCC, 0x82,\n\t0xCC, 0x89, 0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC,\n\t0x81, 0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC, 0x84,\n\t0xCE, 0x05, 0x6F, 0xCC, 0x83, 0xCC, 0x88, 0xCE,\n\t0x05, 0x6F, 0xCC, 0x84, 0xCC, 0x80, 0xCE, 0x05,\n\t// Bytes 3a40 - 3a7f\n\t0x6F, 0xCC, 0x84, 0xCC, 0x81, 0xCE, 0x05, 0x6F,\n\t0xCC, 0x87, 0xCC, 0x84, 0xCE, 0x05, 0x6F, 0xCC,\n\t0x88, 0xCC, 0x84, 0xCE, 0x05, 0x6F, 0xCC, 0x9B,\n\t0xCC, 0x80, 0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC,\n\t0x81, 0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0x83,\n\t0xCE, 0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0x89, 0xCE,\n\t0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05,\n\t0x6F, 0xCC, 0xA3, 0xCC, 0x82, 0xCE, 0x05, 0x6F,\n\t// Bytes 3a80 - 3abf\n\t0xCC, 0xA8, 0xCC, 0x84, 0xCE, 0x05, 0x72, 0xCC,\n\t0xA3, 0xCC, 0x84, 0xCE, 0x05, 0x73, 0xCC, 0x81,\n\t0xCC, 0x87, 0xCE, 0x05, 0x73, 0xCC, 0x8C, 0xCC,\n\t0x87, 0xCE, 0x05, 0x73, 0xCC, 0xA3, 0xCC, 0x87,\n\t0xCE, 0x05, 0x75, 0xCC, 0x83, 0xCC, 0x81, 0xCE,\n\t0x05, 0x75, 0xCC, 0x84, 0xCC, 0x88, 0xCE, 0x05,\n\t0x75, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x05, 0x75,\n\t0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x05, 0x75, 0xCC,\n\t// Bytes 3ac0 - 3aff\n\t0x88, 0xCC, 0x84, 0xCE, 0x05, 0x75, 0xCC, 0x88,\n\t0xCC, 0x8C, 0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC,\n\t0x80, 0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x81,\n\t0xCE, 0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x83, 0xCE,\n\t0x05, 0x75, 0xCC, 0x9B, 0xCC, 0x89, 0xCE, 0x05,\n\t0x75, 0xCC, 0x9B, 0xCC, 0xA3, 0xBA, 0x05, 0xE1,\n\t0xBE, 0xBF, 0xCC, 0x80, 0xCE, 0x05, 0xE1, 0xBE,\n\t0xBF, 0xCC, 0x81, 0xCE, 0x05, 0xE1, 0xBE, 0xBF,\n\t// Bytes 3b00 - 3b3f\n\t0xCD, 0x82, 0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCC,\n\t0x80, 0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCC, 0x81,\n\t0xCE, 0x05, 0xE1, 0xBF, 0xBE, 0xCD, 0x82, 0xCE,\n\t0x05, 0xE2, 0x86, 0x90, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x86, 0x92, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x86, 0x94, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87,\n\t0x90, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87, 0x92,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x87, 0x94, 0xCC,\n\t// Bytes 3b40 - 3b7f\n\t0xB8, 0x05, 0x05, 0xE2, 0x88, 0x83, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x88, 0x88, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x88, 0x8B, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x88, 0xA3, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x88, 0xA5, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x88,\n\t0xBC, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0x83,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0x85, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x89, 0x88, 0xCC, 0xB8,\n\t// Bytes 3b80 - 3bbf\n\t0x05, 0x05, 0xE2, 0x89, 0x8D, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x89, 0xA1, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x89, 0xA4, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x89, 0xA5, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89,\n\t0xB2, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB3,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB6, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x89, 0xB7, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x89, 0xBA, 0xCC, 0xB8, 0x05,\n\t// Bytes 3bc0 - 3bff\n\t0x05, 0xE2, 0x89, 0xBB, 0xCC, 0xB8, 0x05, 0x05,\n\t0xE2, 0x89, 0xBC, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x89, 0xBD, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A,\n\t0x82, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x83,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x86, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x87, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x8A, 0x91, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x8A, 0x92, 0xCC, 0xB8, 0x05, 0x05,\n\t// Bytes 3c00 - 3c3f\n\t0xE2, 0x8A, 0xA2, 0xCC, 0xB8, 0x05, 0x05, 0xE2,\n\t0x8A, 0xA8, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A,\n\t0xA9, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xAB,\n\t0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xB2, 0xCC,\n\t0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xB3, 0xCC, 0xB8,\n\t0x05, 0x05, 0xE2, 0x8A, 0xB4, 0xCC, 0xB8, 0x05,\n\t0x05, 0xE2, 0x8A, 0xB5, 0xCC, 0xB8, 0x05, 0x06,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3c40 - 3c7f\n\t0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x95, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3c80 - 3cbf\n\t0xCE, 0x99, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x99, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0x9F, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3cc0 - 3cff\n\t0xCE, 0x9F, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xA5, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3d00 - 3d3f\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB5, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t// Bytes 3d40 - 3d7f\n\t0xCE, 0xB7, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB7, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3d80 - 3dbf\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xB9, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3dc0 - 3dff\n\t0xCE, 0xBF, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x88, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x06,\n\t// Bytes 3e00 - 3e3f\n\t0xCF, 0x85, 0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x06,\n\t0xCF, 0x85, 0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x80, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x85, 0xDE, 0x06,\n\t0xCF, 0x89, 0xCD, 0x82, 0xCD, 0x85, 0xDE, 0x06,\n\t0xE0, 0xA4, 0xA8, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t// Bytes 3e40 - 3e7f\n\t0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t0xE0, 0xA4, 0xB3, 0xE0, 0xA4, 0xBC, 0x0D, 0x06,\n\t0xE0, 0xA7, 0x87, 0xE0, 0xA6, 0xBE, 0x01, 0x06,\n\t0xE0, 0xA7, 0x87, 0xE0, 0xA7, 0x97, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAC, 0xBE, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x96, 0x01, 0x06,\n\t0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x97, 0x01, 0x06,\n\t0xE0, 0xAE, 0x92, 0xE0, 0xAF, 0x97, 0x01, 0x06,\n\t// Bytes 3e80 - 3ebf\n\t0xE0, 0xAF, 0x86, 0xE0, 0xAE, 0xBE, 0x01, 0x06,\n\t0xE0, 0xAF, 0x86, 0xE0, 0xAF, 0x97, 0x01, 0x06,\n\t0xE0, 0xAF, 0x87, 0xE0, 0xAE, 0xBE, 0x01, 0x06,\n\t0xE0, 0xB1, 0x86, 0xE0, 0xB1, 0x96, 0x89, 0x06,\n\t0xE0, 0xB2, 0xBF, 0xE0, 0xB3, 0x95, 0x01, 0x06,\n\t0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, 0x01, 0x06,\n\t0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x96, 0x01, 0x06,\n\t0xE0, 0xB5, 0x86, 0xE0, 0xB4, 0xBE, 0x01, 0x06,\n\t// Bytes 3ec0 - 3eff\n\t0xE0, 0xB5, 0x86, 0xE0, 0xB5, 0x97, 0x01, 0x06,\n\t0xE0, 0xB5, 0x87, 0xE0, 0xB4, 0xBE, 0x01, 0x06,\n\t0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x8A, 0x15, 0x06,\n\t0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x9F, 0x01, 0x06,\n\t0xE1, 0x80, 0xA5, 0xE1, 0x80, 0xAE, 0x01, 0x06,\n\t0xE1, 0xAC, 0x85, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x87, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x89, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t// Bytes 3f00 - 3f3f\n\t0xE1, 0xAC, 0x8B, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x8D, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0x91, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBA, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBC, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBE, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAC, 0xBF, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t0xE1, 0xAD, 0x82, 0xE1, 0xAC, 0xB5, 0x01, 0x06,\n\t// Bytes 3f40 - 3f7f\n\t0xE3, 0x81, 0x86, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x8F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x91, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x93, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x95, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x97, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 3f80 - 3fbf\n\t0xE3, 0x81, 0x99, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0x9F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA4, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA6, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xA8, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 3fc0 - 3fff\n\t0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xAF, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB2, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB5, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB5, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x81, 0xB8, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xB8, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t// Bytes 4000 - 403f\n\t0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x81, 0xBB, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x82, 0x9D, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xA6, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4040 - 407f\n\t0xE3, 0x82, 0xB3, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB5, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB7, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xB9, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBB, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBD, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x82, 0xBF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x81, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4080 - 40bf\n\t0xE3, 0x83, 0x84, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x95, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 40c0 - 40ff\n\t0xE3, 0x83, 0x95, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0x11, 0x06,\n\t0xE3, 0x83, 0xAF, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xB0, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xB1, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t// Bytes 4100 - 413f\n\t0xE3, 0x83, 0xB2, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xE3, 0x83, 0xBD, 0xE3, 0x82, 0x99, 0x11, 0x06,\n\t0xF0, 0x90, 0x97, 0x92, 0xCC, 0x87, 0xCD, 0x06,\n\t0xF0, 0x90, 0x97, 0x9A, 0xCC, 0x87, 0xCD, 0x08,\n\t0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x91,\n\t// Bytes 4140 - 417f\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x82,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x93,\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80,\n\t// Bytes 4180 - 41bf\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0x97,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xA9,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t// Bytes 41c0 - 41ff\n\t0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x93,\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x80,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1, 0xCC, 0x94,\n\t// Bytes 4200 - 423f\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB1,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x81,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x93,\n\t0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85,\n\t// Bytes 4240 - 427f\n\t0xDF, 0x08, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x93,\n\t0xCC, 0x80, 0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08,\n\t0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85,\n\t0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80,\n\t0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCD, 0x85, 0xDF, 0x08, 0xCF, 0x89,\n\t// Bytes 4280 - 42bf\n\t0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDF, 0x08,\n\t0xF0, 0x91, 0x82, 0x99, 0xF0, 0x91, 0x82, 0xBA,\n\t0x0D, 0x08, 0xF0, 0x91, 0x82, 0x9B, 0xF0, 0x91,\n\t0x82, 0xBA, 0x0D, 0x08, 0xF0, 0x91, 0x82, 0xA5,\n\t0xF0, 0x91, 0x82, 0xBA, 0x0D, 0x08, 0xF0, 0x91,\n\t0x84, 0xB1, 0xF0, 0x91, 0x84, 0xA7, 0x01, 0x08,\n\t0xF0, 0x91, 0x84, 0xB2, 0xF0, 0x91, 0x84, 0xA7,\n\t0x01, 0x08, 0xF0, 0x91, 0x8D, 0x87, 0xF0, 0x91,\n\t// Bytes 42c0 - 42ff\n\t0x8C, 0xBE, 0x01, 0x08, 0xF0, 0x91, 0x8D, 0x87,\n\t0xF0, 0x91, 0x8D, 0x97, 0x01, 0x08, 0xF0, 0x91,\n\t0x8E, 0x82, 0xF0, 0x91, 0x8F, 0x89, 0x01, 0x08,\n\t0xF0, 0x91, 0x8E, 0x84, 0xF0, 0x91, 0x8E, 0xBB,\n\t0x01, 0x08, 0xF0, 0x91, 0x8E, 0x8B, 0xF0, 0x91,\n\t0x8F, 0x82, 0x01, 0x08, 0xF0, 0x91, 0x8E, 0x90,\n\t0xF0, 0x91, 0x8F, 0x89, 0x01, 0x08, 0xF0, 0x91,\n\t0x92, 0xB9, 0xF0, 0x91, 0x92, 0xB0, 0x01, 0x08,\n\t// Bytes 4300 - 433f\n\t0xF0, 0x91, 0x92, 0xB9, 0xF0, 0x91, 0x92, 0xBA,\n\t0x01, 0x08, 0xF0, 0x91, 0x92, 0xB9, 0xF0, 0x91,\n\t0x92, 0xBD, 0x01, 0x08, 0xF0, 0x91, 0x96, 0xB8,\n\t0xF0, 0x91, 0x96, 0xAF, 0x01, 0x08, 0xF0, 0x91,\n\t0x96, 0xB9, 0xF0, 0x91, 0x96, 0xAF, 0x01, 0x08,\n\t0xF0, 0x91, 0xA4, 0xB5, 0xF0, 0x91, 0xA4, 0xB0,\n\t0x01, 0x09, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x82,\n\t0xE0, 0xB3, 0x95, 0x02, 0x09, 0xE0, 0xB7, 0x99,\n\t// Bytes 4340 - 437f\n\t0xE0, 0xB7, 0x8F, 0xE0, 0xB7, 0x8A, 0x16, 0x0C,\n\t0xF0, 0x96, 0xB5, 0xA3, 0xF0, 0x96, 0xB5, 0xA7,\n\t0xF0, 0x96, 0xB5, 0xA7, 0x02, 0x42, 0xC2, 0xB4,\n\t0x01, 0x43, 0x20, 0xCC, 0x81, 0xCD, 0x43, 0x20,\n\t0xCC, 0x83, 0xCD, 0x43, 0x20, 0xCC, 0x84, 0xCD,\n\t0x43, 0x20, 0xCC, 0x85, 0xCD, 0x43, 0x20, 0xCC,\n\t0x86, 0xCD, 0x43, 0x20, 0xCC, 0x87, 0xCD, 0x43,\n\t0x20, 0xCC, 0x88, 0xCD, 0x43, 0x20, 0xCC, 0x8A,\n\t// Bytes 4380 - 43bf\n\t0xCD, 0x43, 0x20, 0xCC, 0x8B, 0xCD, 0x43, 0x20,\n\t0xCC, 0x93, 0xCD, 0x43, 0x20, 0xCC, 0x94, 0xCD,\n\t0x43, 0x20, 0xCC, 0xA7, 0xA9, 0x43, 0x20, 0xCC,\n\t0xA8, 0xA9, 0x43, 0x20, 0xCC, 0xB3, 0xB9, 0x43,\n\t0x20, 0xCD, 0x82, 0xCD, 0x43, 0x20, 0xCD, 0x85,\n\t0xDD, 0x43, 0x20, 0xD9, 0x8B, 0x5D, 0x43, 0x20,\n\t0xD9, 0x8C, 0x61, 0x43, 0x20, 0xD9, 0x8D, 0x65,\n\t0x43, 0x20, 0xD9, 0x8E, 0x69, 0x43, 0x20, 0xD9,\n\t// Bytes 43c0 - 43ff\n\t0x8F, 0x6D, 0x43, 0x20, 0xD9, 0x90, 0x71, 0x43,\n\t0x20, 0xD9, 0x91, 0x75, 0x43, 0x20, 0xD9, 0x92,\n\t0x79, 0x43, 0x41, 0xCC, 0x8A, 0xCD, 0x43, 0x73,\n\t0xCC, 0x87, 0xCD, 0x44, 0x20, 0xE3, 0x82, 0x99,\n\t0x11, 0x44, 0x20, 0xE3, 0x82, 0x9A, 0x11, 0x44,\n\t0xC2, 0xA8, 0xCC, 0x81, 0xCE, 0x44, 0xCE, 0x91,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0x95, 0xCC, 0x81,\n\t0xCD, 0x44, 0xCE, 0x97, 0xCC, 0x81, 0xCD, 0x44,\n\t// Bytes 4400 - 443f\n\t0xCE, 0x99, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0x9F,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xA5, 0xCC, 0x81,\n\t0xCD, 0x44, 0xCE, 0xA5, 0xCC, 0x88, 0xCD, 0x44,\n\t0xCE, 0xA9, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xB1,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xB5, 0xCC, 0x81,\n\t0xCD, 0x44, 0xCE, 0xB7, 0xCC, 0x81, 0xCD, 0x44,\n\t0xCE, 0xB9, 0xCC, 0x81, 0xCD, 0x44, 0xCE, 0xBF,\n\t0xCC, 0x81, 0xCD, 0x44, 0xCF, 0x85, 0xCC, 0x81,\n\t// Bytes 4440 - 447f\n\t0xCD, 0x44, 0xCF, 0x89, 0xCC, 0x81, 0xCD, 0x44,\n\t0xD7, 0x90, 0xD6, 0xB7, 0x35, 0x44, 0xD7, 0x90,\n\t0xD6, 0xB8, 0x39, 0x44, 0xD7, 0x90, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x91, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0x91, 0xD6, 0xBF, 0x4D, 0x44, 0xD7, 0x92,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x93, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x94, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0x95, 0xD6, 0xB9, 0x3D, 0x44, 0xD7, 0x95,\n\t// Bytes 4480 - 44bf\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x96, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x98, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0x99, 0xD6, 0xB4, 0x29, 0x44, 0xD7, 0x99,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x9A, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0x9B, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0x9B, 0xD6, 0xBF, 0x4D, 0x44, 0xD7, 0x9C,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0x9E, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0xA0, 0xD6, 0xBC, 0x45, 0x44,\n\t// Bytes 44c0 - 44ff\n\t0xD7, 0xA1, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA3,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA4, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0xA4, 0xD6, 0xBF, 0x4D, 0x44,\n\t0xD7, 0xA6, 0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA7,\n\t0xD6, 0xBC, 0x45, 0x44, 0xD7, 0xA8, 0xD6, 0xBC,\n\t0x45, 0x44, 0xD7, 0xA9, 0xD6, 0xBC, 0x45, 0x44,\n\t0xD7, 0xA9, 0xD7, 0x81, 0x51, 0x44, 0xD7, 0xA9,\n\t0xD7, 0x82, 0x55, 0x44, 0xD7, 0xAA, 0xD6, 0xBC,\n\t// Bytes 4500 - 453f\n\t0x45, 0x44, 0xD7, 0xB2, 0xD6, 0xB7, 0x35, 0x44,\n\t0xD8, 0xA7, 0xD9, 0x8B, 0x5D, 0x44, 0xD8, 0xA7,\n\t0xD9, 0x93, 0xCD, 0x44, 0xD8, 0xA7, 0xD9, 0x94,\n\t0xCD, 0x44, 0xD8, 0xA7, 0xD9, 0x95, 0xB9, 0x44,\n\t0xD8, 0xB0, 0xD9, 0xB0, 0x7D, 0x44, 0xD8, 0xB1,\n\t0xD9, 0xB0, 0x7D, 0x44, 0xD9, 0x80, 0xD9, 0x8B,\n\t0x5D, 0x44, 0xD9, 0x80, 0xD9, 0x8E, 0x69, 0x44,\n\t0xD9, 0x80, 0xD9, 0x8F, 0x6D, 0x44, 0xD9, 0x80,\n\t// Bytes 4540 - 457f\n\t0xD9, 0x90, 0x71, 0x44, 0xD9, 0x80, 0xD9, 0x91,\n\t0x75, 0x44, 0xD9, 0x80, 0xD9, 0x92, 0x79, 0x44,\n\t0xD9, 0x87, 0xD9, 0xB0, 0x7D, 0x44, 0xD9, 0x88,\n\t0xD9, 0x94, 0xCD, 0x44, 0xD9, 0x89, 0xD9, 0xB0,\n\t0x7D, 0x44, 0xD9, 0x8A, 0xD9, 0x94, 0xCD, 0x44,\n\t0xDB, 0x92, 0xD9, 0x94, 0xCD, 0x44, 0xDB, 0x95,\n\t0xD9, 0x94, 0xCD, 0x45, 0x20, 0xCC, 0x88, 0xCC,\n\t0x80, 0xCE, 0x45, 0x20, 0xCC, 0x88, 0xCC, 0x81,\n\t// Bytes 4580 - 45bf\n\t0xCE, 0x45, 0x20, 0xCC, 0x88, 0xCD, 0x82, 0xCE,\n\t0x45, 0x20, 0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x45,\n\t0x20, 0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x45, 0x20,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x45, 0x20, 0xCC,\n\t0x94, 0xCC, 0x80, 0xCE, 0x45, 0x20, 0xCC, 0x94,\n\t0xCC, 0x81, 0xCE, 0x45, 0x20, 0xCC, 0x94, 0xCD,\n\t0x82, 0xCE, 0x45, 0x20, 0xD9, 0x8C, 0xD9, 0x91,\n\t0x76, 0x45, 0x20, 0xD9, 0x8D, 0xD9, 0x91, 0x76,\n\t// Bytes 45c0 - 45ff\n\t0x45, 0x20, 0xD9, 0x8E, 0xD9, 0x91, 0x76, 0x45,\n\t0x20, 0xD9, 0x8F, 0xD9, 0x91, 0x76, 0x45, 0x20,\n\t0xD9, 0x90, 0xD9, 0x91, 0x76, 0x45, 0x20, 0xD9,\n\t0x91, 0xD9, 0xB0, 0x7E, 0x45, 0xE2, 0xAB, 0x9D,\n\t0xCC, 0xB8, 0x05, 0x46, 0xCE, 0xB9, 0xCC, 0x88,\n\t0xCC, 0x81, 0xCE, 0x46, 0xCF, 0x85, 0xCC, 0x88,\n\t0xCC, 0x81, 0xCE, 0x46, 0xD7, 0xA9, 0xD6, 0xBC,\n\t0xD7, 0x81, 0x52, 0x46, 0xD7, 0xA9, 0xD6, 0xBC,\n\t// Bytes 4600 - 463f\n\t0xD7, 0x82, 0x56, 0x46, 0xD9, 0x80, 0xD9, 0x8E,\n\t0xD9, 0x91, 0x76, 0x46, 0xD9, 0x80, 0xD9, 0x8F,\n\t0xD9, 0x91, 0x76, 0x46, 0xD9, 0x80, 0xD9, 0x90,\n\t0xD9, 0x91, 0x76, 0x46, 0xE0, 0xA4, 0x95, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0x96, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0x97, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0x9C, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0xA1, 0xE0,\n\t// Bytes 4640 - 467f\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0xA2, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0xAB, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA4, 0xAF, 0xE0,\n\t0xA4, 0xBC, 0x0D, 0x46, 0xE0, 0xA6, 0xA1, 0xE0,\n\t0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA6, 0xA2, 0xE0,\n\t0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA6, 0xAF, 0xE0,\n\t0xA6, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0x96, 0xE0,\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0x97, 0xE0,\n\t// Bytes 4680 - 46bf\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0x9C, 0xE0,\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0xAB, 0xE0,\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0xB2, 0xE0,\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xA8, 0xB8, 0xE0,\n\t0xA8, 0xBC, 0x0D, 0x46, 0xE0, 0xAC, 0xA1, 0xE0,\n\t0xAC, 0xBC, 0x0D, 0x46, 0xE0, 0xAC, 0xA2, 0xE0,\n\t0xAC, 0xBC, 0x0D, 0x46, 0xE0, 0xBE, 0xB2, 0xE0,\n\t0xBE, 0x80, 0xA1, 0x46, 0xE0, 0xBE, 0xB3, 0xE0,\n\t// Bytes 46c0 - 46ff\n\t0xBE, 0x80, 0xA1, 0x46, 0xE1, 0x84, 0x80, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x82, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x83, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x85, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x86, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x87, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x89, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8B, 0xE1,\n\t// Bytes 4700 - 473f\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8B, 0xE1,\n\t0x85, 0xAE, 0x01, 0x46, 0xE1, 0x84, 0x8C, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8E, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8F, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x90, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x91, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x92, 0xE1,\n\t0x85, 0xA1, 0x01, 0x46, 0xE3, 0x83, 0x86, 0xE3,\n\t// Bytes 4740 - 477f\n\t0x82, 0x99, 0x11, 0x48, 0xF0, 0x9D, 0x85, 0x97,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xB1, 0x48, 0xF0, 0x9D,\n\t0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xB1, 0x48,\n\t0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xB1, 0x48, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xB1, 0x49, 0xE0, 0xBE, 0xB2, 0xE0,\n\t0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xA2, 0x49, 0xE0,\n\t0xBE, 0xB3, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80,\n\t// Bytes 4780 - 47bf\n\t0xA2, 0x4C, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, 0xB2, 0x4C,\n\t0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xF0, 0x9D, 0x85, 0xAF, 0xB2, 0x4C, 0xF0, 0x9D,\n\t0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D,\n\t0x85, 0xB0, 0xB2, 0x4C, 0xF0, 0x9D, 0x85, 0x98,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB1,\n\t0xB2, 0x4C, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D,\n\t// Bytes 47c0 - 47ff\n\t0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB2, 0xB2, 0x4C,\n\t0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5,\n\t0xF0, 0x9D, 0x85, 0xAE, 0xB2, 0x4C, 0xF0, 0x9D,\n\t0x86, 0xB9, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D,\n\t0x85, 0xAF, 0xB2, 0x4C, 0xF0, 0x9D, 0x86, 0xBA,\n\t0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE,\n\t0xB2, 0x4C, 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D,\n\t0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0xB2, 0x83,\n\t// Bytes 4800 - 483f\n\t0x41, 0xCC, 0x82, 0xCD, 0x83, 0x41, 0xCC, 0x86,\n\t0xCD, 0x83, 0x41, 0xCC, 0x87, 0xCD, 0x83, 0x41,\n\t0xCC, 0x88, 0xCD, 0x83, 0x41, 0xCC, 0x8A, 0xCD,\n\t0x83, 0x41, 0xCC, 0xA3, 0xB9, 0x83, 0x43, 0xCC,\n\t0xA7, 0xA9, 0x83, 0x45, 0xCC, 0x82, 0xCD, 0x83,\n\t0x45, 0xCC, 0x84, 0xCD, 0x83, 0x45, 0xCC, 0xA3,\n\t0xB9, 0x83, 0x45, 0xCC, 0xA7, 0xA9, 0x83, 0x49,\n\t0xCC, 0x88, 0xCD, 0x83, 0x4C, 0xCC, 0xA3, 0xB9,\n\t// Bytes 4840 - 487f\n\t0x83, 0x4F, 0xCC, 0x82, 0xCD, 0x83, 0x4F, 0xCC,\n\t0x83, 0xCD, 0x83, 0x4F, 0xCC, 0x84, 0xCD, 0x83,\n\t0x4F, 0xCC, 0x87, 0xCD, 0x83, 0x4F, 0xCC, 0x88,\n\t0xCD, 0x83, 0x4F, 0xCC, 0x9B, 0xB1, 0x83, 0x4F,\n\t0xCC, 0xA3, 0xB9, 0x83, 0x4F, 0xCC, 0xA8, 0xA9,\n\t0x83, 0x52, 0xCC, 0xA3, 0xB9, 0x83, 0x53, 0xCC,\n\t0x81, 0xCD, 0x83, 0x53, 0xCC, 0x8C, 0xCD, 0x83,\n\t0x53, 0xCC, 0xA3, 0xB9, 0x83, 0x55, 0xCC, 0x83,\n\t// Bytes 4880 - 48bf\n\t0xCD, 0x83, 0x55, 0xCC, 0x84, 0xCD, 0x83, 0x55,\n\t0xCC, 0x88, 0xCD, 0x83, 0x55, 0xCC, 0x9B, 0xB1,\n\t0x83, 0x61, 0xCC, 0x82, 0xCD, 0x83, 0x61, 0xCC,\n\t0x86, 0xCD, 0x83, 0x61, 0xCC, 0x87, 0xCD, 0x83,\n\t0x61, 0xCC, 0x88, 0xCD, 0x83, 0x61, 0xCC, 0x8A,\n\t0xCD, 0x83, 0x61, 0xCC, 0xA3, 0xB9, 0x83, 0x63,\n\t0xCC, 0xA7, 0xA9, 0x83, 0x65, 0xCC, 0x82, 0xCD,\n\t0x83, 0x65, 0xCC, 0x84, 0xCD, 0x83, 0x65, 0xCC,\n\t// Bytes 48c0 - 48ff\n\t0xA3, 0xB9, 0x83, 0x65, 0xCC, 0xA7, 0xA9, 0x83,\n\t0x69, 0xCC, 0x88, 0xCD, 0x83, 0x6C, 0xCC, 0xA3,\n\t0xB9, 0x83, 0x6F, 0xCC, 0x82, 0xCD, 0x83, 0x6F,\n\t0xCC, 0x83, 0xCD, 0x83, 0x6F, 0xCC, 0x84, 0xCD,\n\t0x83, 0x6F, 0xCC, 0x87, 0xCD, 0x83, 0x6F, 0xCC,\n\t0x88, 0xCD, 0x83, 0x6F, 0xCC, 0x9B, 0xB1, 0x83,\n\t0x6F, 0xCC, 0xA3, 0xB9, 0x83, 0x6F, 0xCC, 0xA8,\n\t0xA9, 0x83, 0x72, 0xCC, 0xA3, 0xB9, 0x83, 0x73,\n\t// Bytes 4900 - 493f\n\t0xCC, 0x81, 0xCD, 0x83, 0x73, 0xCC, 0x8C, 0xCD,\n\t0x83, 0x73, 0xCC, 0xA3, 0xB9, 0x83, 0x75, 0xCC,\n\t0x83, 0xCD, 0x83, 0x75, 0xCC, 0x84, 0xCD, 0x83,\n\t0x75, 0xCC, 0x88, 0xCD, 0x83, 0x75, 0xCC, 0x9B,\n\t0xB1, 0x84, 0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x84,\n\t0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x84, 0xCE, 0x95,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0x95, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x84,\n\t// Bytes 4940 - 497f\n\t0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x84, 0xCE, 0x99,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0x99, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0x9F, 0xCC, 0x93, 0xCD, 0x84,\n\t0xCE, 0x9F, 0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xA5,\n\t0xCC, 0x94, 0xCD, 0x84, 0xCE, 0xA9, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCE, 0xB1, 0xCC, 0x80, 0xCD, 0x84, 0xCE, 0xB1,\n\t0xCC, 0x81, 0xCD, 0x84, 0xCE, 0xB1, 0xCC, 0x93,\n\t// Bytes 4980 - 49bf\n\t0xCD, 0x84, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCE, 0xB1, 0xCD, 0x82, 0xCD, 0x84, 0xCE, 0xB5,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB5, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0xB7, 0xCC, 0x80, 0xCD, 0x84,\n\t0xCE, 0xB7, 0xCC, 0x81, 0xCD, 0x84, 0xCE, 0xB7,\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB7, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0xB7, 0xCD, 0x82, 0xCD, 0x84,\n\t0xCE, 0xB9, 0xCC, 0x88, 0xCD, 0x84, 0xCE, 0xB9,\n\t// Bytes 49c0 - 49ff\n\t0xCC, 0x93, 0xCD, 0x84, 0xCE, 0xB9, 0xCC, 0x94,\n\t0xCD, 0x84, 0xCE, 0xBF, 0xCC, 0x93, 0xCD, 0x84,\n\t0xCE, 0xBF, 0xCC, 0x94, 0xCD, 0x84, 0xCF, 0x85,\n\t0xCC, 0x88, 0xCD, 0x84, 0xCF, 0x85, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCF, 0x85, 0xCC, 0x94, 0xCD, 0x84,\n\t0xCF, 0x89, 0xCC, 0x80, 0xCD, 0x84, 0xCF, 0x89,\n\t0xCC, 0x81, 0xCD, 0x84, 0xCF, 0x89, 0xCC, 0x93,\n\t0xCD, 0x84, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x84,\n\t// Bytes 4a00 - 4a3f\n\t0xCF, 0x89, 0xCD, 0x82, 0xCD, 0x86, 0xCE, 0x91,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0x91,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0x91,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0x91,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0x91,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0x91,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0x97,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0x97,\n\t// Bytes 4a40 - 4a7f\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0x97,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0x97,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0x97,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0x97,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xA9,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xA9,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xA9,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xA9,\n\t// Bytes 4a80 - 4abf\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xA9,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xA9,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xB1,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xB1,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xB1,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xB1,\n\t// Bytes 4ac0 - 4aff\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCE, 0xB7,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xCF, 0x89,\n\t0xCC, 0x93, 0xCC, 0x80, 0xCE, 0x86, 0xCF, 0x89,\n\t// Bytes 4b00 - 4b3f\n\t0xCC, 0x93, 0xCC, 0x81, 0xCE, 0x86, 0xCF, 0x89,\n\t0xCC, 0x93, 0xCD, 0x82, 0xCE, 0x86, 0xCF, 0x89,\n\t0xCC, 0x94, 0xCC, 0x80, 0xCE, 0x86, 0xCF, 0x89,\n\t0xCC, 0x94, 0xCC, 0x81, 0xCE, 0x86, 0xCF, 0x89,\n\t0xCC, 0x94, 0xCD, 0x82, 0xCE, 0x86, 0xE0, 0xB3,\n\t0x86, 0xE0, 0xB3, 0x82, 0x01, 0x86, 0xE0, 0xB7,\n\t0x99, 0xE0, 0xB7, 0x8F, 0x01, 0x88, 0xF0, 0x96,\n\t0xB5, 0xA3, 0xF0, 0x96, 0xB5, 0xA7, 0x01, 0x42,\n\t// Bytes 4b40 - 4b7f\n\t0xCC, 0x80, 0xCD, 0x33, 0x42, 0xCC, 0x81, 0xCD,\n\t0x33, 0x42, 0xCC, 0x93, 0xCD, 0x33, 0x43, 0xE1,\n\t0x85, 0xA1, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA2,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xA3, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xA4, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xA5, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA6,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xA7, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xA8, 0x01, 0x00, 0x43, 0xE1,\n\t// Bytes 4b80 - 4bbf\n\t0x85, 0xA9, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAA,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xAB, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xAC, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xAD, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAE,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xAF, 0x01, 0x00,\n\t0x43, 0xE1, 0x85, 0xB0, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xB1, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xB2,\n\t0x01, 0x00, 0x43, 0xE1, 0x85, 0xB3, 0x01, 0x00,\n\t// Bytes 4bc0 - 4bff\n\t0x43, 0xE1, 0x85, 0xB4, 0x01, 0x00, 0x43, 0xE1,\n\t0x85, 0xB5, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xAA,\n\t0x01, 0x00, 0x43, 0xE1, 0x86, 0xAC, 0x01, 0x00,\n\t0x43, 0xE1, 0x86, 0xAD, 0x01, 0x00, 0x43, 0xE1,\n\t0x86, 0xB0, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB1,\n\t0x01, 0x00, 0x43, 0xE1, 0x86, 0xB2, 0x01, 0x00,\n\t0x43, 0xE1, 0x86, 0xB3, 0x01, 0x00, 0x43, 0xE1,\n\t0x86, 0xB4, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB5,\n\t// Bytes 4c00 - 4c3f\n\t0x01, 0x00, 0x44, 0xCC, 0x88, 0xCC, 0x81, 0xCE,\n\t0x33, 0x68, 0xF0, 0x91, 0x8F, 0x82, 0xF0, 0x91,\n\t0x8E, 0xB8, 0x02, 0x00, 0x68, 0xF0, 0x91, 0x8F,\n\t0x82, 0xF0, 0x91, 0x8F, 0x82, 0x02, 0x00, 0x68,\n\t0xF0, 0x91, 0x8F, 0x82, 0xF0, 0x91, 0x8F, 0x89,\n\t0x02, 0x00, 0x68, 0xF0, 0x96, 0x84, 0x9E, 0xF0,\n\t0x96, 0x84, 0x9F, 0x02, 0x00, 0x68, 0xF0, 0x96,\n\t0x84, 0x9E, 0xF0, 0x96, 0x84, 0xA0, 0x02, 0x00,\n\t// Bytes 4c40 - 4c7f\n\t0x68, 0xF0, 0x96, 0x84, 0xA9, 0xF0, 0x96, 0x84,\n\t0x9F, 0x02, 0x00, 0x68, 0xF0, 0x96, 0xB5, 0xA7,\n\t0xF0, 0x96, 0xB5, 0xA7, 0x02, 0x00, 0x6C, 0xF0,\n\t0x96, 0x84, 0x9E, 0xF0, 0x96, 0x84, 0x9E, 0xF0,\n\t0x96, 0x84, 0x9F, 0x03, 0x00, 0x6C, 0xF0, 0x96,\n\t0x84, 0x9E, 0xF0, 0x96, 0x84, 0x9E, 0xF0, 0x96,\n\t0x84, 0xA0, 0x03, 0x00, 0x6C, 0xF0, 0x96, 0x84,\n\t0x9E, 0xF0, 0x96, 0x84, 0xA9, 0xF0, 0x96, 0x84,\n\t// Bytes 4c80 - 4cbf\n\t0x9F, 0x03, 0x00, 0xE8, 0xF0, 0x96, 0x84, 0x9E,\n\t0xF0, 0x96, 0x84, 0x9E, 0x02, 0x00, 0xE8, 0xF0,\n\t0x96, 0x84, 0x9E, 0xF0, 0x96, 0x84, 0xA9, 0x02,\n\t0x00, 0x43, 0xE3, 0x82, 0x99, 0x11, 0x04, 0x43,\n\t0xE3, 0x82, 0x9A, 0x11, 0x04, 0x46, 0xE0, 0xBD,\n\t0xB1, 0xE0, 0xBD, 0xB2, 0xA2, 0x27, 0x46, 0xE0,\n\t0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xA6, 0x27, 0x46,\n\t0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, 0xA2, 0x27,\n\t// Bytes 4cc0 - 4cff\n\t0x00, 0x01,\n}\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfcTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfcTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfcValues[c0]\n\t}\n\ti := nfcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfcTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfcTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfcValues[c0]\n\t}\n\ti := nfcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// nfcTrie. Total size: 11042 bytes (10.78 KiB). Checksum: cd75f956cd2316a9.\ntype nfcTrie struct{}\n\nfunc newNfcTrie(i int) *nfcTrie {\n\treturn &nfcTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *nfcTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 46:\n\t\treturn uint16(nfcValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 46\n\t\treturn uint16(nfcSparse.lookup(n, b))\n\t}\n}\n\n// nfcValues: 48 blocks, 3072 entries, 6144 bytes\n// The third block is the zero block.\nvar nfcValues = [3072]uint16{\n\t// Block 0x0, offset 0x0\n\t0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000,\n\t// Block 0x1, offset 0x40\n\t0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000,\n\t0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000,\n\t0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000,\n\t0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000,\n\t0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000,\n\t0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000,\n\t0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000,\n\t0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000,\n\t0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000,\n\t0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x2ece, 0xc1: 0x2ed3, 0xc2: 0x47ff, 0xc3: 0x2ed8, 0xc4: 0x480e, 0xc5: 0x4813,\n\t0xc6: 0xa000, 0xc7: 0x481d, 0xc8: 0x2f41, 0xc9: 0x2f46, 0xca: 0x4822, 0xcb: 0x2f5a,\n\t0xcc: 0x2fcd, 0xcd: 0x2fd2, 0xce: 0x2fd7, 0xcf: 0x4836, 0xd1: 0x3063,\n\t0xd2: 0x3086, 0xd3: 0x308b, 0xd4: 0x4840, 0xd5: 0x4845, 0xd6: 0x4854,\n\t0xd8: 0xa000, 0xd9: 0x3112, 0xda: 0x3117, 0xdb: 0x311c, 0xdc: 0x4886, 0xdd: 0x3194,\n\t0xe0: 0x31da, 0xe1: 0x31df, 0xe2: 0x4890, 0xe3: 0x31e4,\n\t0xe4: 0x489f, 0xe5: 0x48a4, 0xe6: 0xa000, 0xe7: 0x48ae, 0xe8: 0x324d, 0xe9: 0x3252,\n\t0xea: 0x48b3, 0xeb: 0x3266, 0xec: 0x32de, 0xed: 0x32e3, 0xee: 0x32e8, 0xef: 0x48c7,\n\t0xf1: 0x3374, 0xf2: 0x3397, 0xf3: 0x339c, 0xf4: 0x48d1, 0xf5: 0x48d6,\n\t0xf6: 0x48e5, 0xf8: 0xa000, 0xf9: 0x3428, 0xfa: 0x342d, 0xfb: 0x3432,\n\t0xfc: 0x4917, 0xfd: 0x34af, 0xff: 0x34c8,\n\t// Block 0x4, offset 0x100\n\t0x100: 0x2edd, 0x101: 0x31e9, 0x102: 0x4804, 0x103: 0x4895, 0x104: 0x2efb, 0x105: 0x3207,\n\t0x106: 0x2f0f, 0x107: 0x321b, 0x108: 0x2f14, 0x109: 0x3220, 0x10a: 0x2f19, 0x10b: 0x3225,\n\t0x10c: 0x2f1e, 0x10d: 0x322a, 0x10e: 0x2f28, 0x10f: 0x3234,\n\t0x112: 0x4827, 0x113: 0x48b8, 0x114: 0x2f50, 0x115: 0x325c, 0x116: 0x2f55, 0x117: 0x3261,\n\t0x118: 0x2f73, 0x119: 0x327f, 0x11a: 0x2f64, 0x11b: 0x3270, 0x11c: 0x2f8c, 0x11d: 0x3298,\n\t0x11e: 0x2f96, 0x11f: 0x32a2, 0x120: 0x2f9b, 0x121: 0x32a7, 0x122: 0x2fa5, 0x123: 0x32b1,\n\t0x124: 0x2faa, 0x125: 0x32b6, 0x128: 0x2fdc, 0x129: 0x32ed,\n\t0x12a: 0x2fe1, 0x12b: 0x32f2, 0x12c: 0x2fe6, 0x12d: 0x32f7, 0x12e: 0x3009, 0x12f: 0x3315,\n\t0x130: 0x2feb, 0x134: 0x3013, 0x135: 0x331f,\n\t0x136: 0x3027, 0x137: 0x3338, 0x139: 0x3031, 0x13a: 0x3342, 0x13b: 0x303b,\n\t0x13c: 0x334c, 0x13d: 0x3036, 0x13e: 0x3347,\n\t// Block 0x5, offset 0x140\n\t0x143: 0x305e, 0x144: 0x336f, 0x145: 0x3077,\n\t0x146: 0x3388, 0x147: 0x306d, 0x148: 0x337e,\n\t0x14c: 0x484a, 0x14d: 0x48db, 0x14e: 0x3090, 0x14f: 0x33a1, 0x150: 0x309a, 0x151: 0x33ab,\n\t0x154: 0x30b8, 0x155: 0x33c9, 0x156: 0x30d1, 0x157: 0x33e2,\n\t0x158: 0x30c2, 0x159: 0x33d3, 0x15a: 0x486d, 0x15b: 0x48fe, 0x15c: 0x30db, 0x15d: 0x33ec,\n\t0x15e: 0x30ea, 0x15f: 0x33fb, 0x160: 0x4872, 0x161: 0x4903, 0x162: 0x3103, 0x163: 0x3419,\n\t0x164: 0x30f4, 0x165: 0x340a, 0x168: 0x487c, 0x169: 0x490d,\n\t0x16a: 0x4881, 0x16b: 0x4912, 0x16c: 0x3121, 0x16d: 0x3437, 0x16e: 0x312b, 0x16f: 0x3441,\n\t0x170: 0x3130, 0x171: 0x3446, 0x172: 0x314e, 0x173: 0x3464, 0x174: 0x3171, 0x175: 0x3487,\n\t0x176: 0x3199, 0x177: 0x34b4, 0x178: 0x31ad, 0x179: 0x31bc, 0x17a: 0x34dc, 0x17b: 0x31c6,\n\t0x17c: 0x34e6, 0x17d: 0x31cb, 0x17e: 0x34eb, 0x17f: 0xa000,\n\t// Block 0x6, offset 0x180\n\t0x184: 0x8100, 0x185: 0x8100,\n\t0x186: 0x8100,\n\t0x18d: 0x2ee7, 0x18e: 0x31f3, 0x18f: 0x2ff5, 0x190: 0x3301, 0x191: 0x309f,\n\t0x192: 0x33b0, 0x193: 0x3135, 0x194: 0x344b, 0x195: 0x392e, 0x196: 0x3abd, 0x197: 0x3927,\n\t0x198: 0x3ab6, 0x199: 0x3935, 0x19a: 0x3ac4, 0x19b: 0x3920, 0x19c: 0x3aaf,\n\t0x19e: 0x380f, 0x19f: 0x399e, 0x1a0: 0x3808, 0x1a1: 0x3997, 0x1a2: 0x3512, 0x1a3: 0x3524,\n\t0x1a6: 0x2fa0, 0x1a7: 0x32ac, 0x1a8: 0x301d, 0x1a9: 0x332e,\n\t0x1aa: 0x4863, 0x1ab: 0x48f4, 0x1ac: 0x38ef, 0x1ad: 0x3a7e, 0x1ae: 0x3536, 0x1af: 0x353c,\n\t0x1b0: 0x3324, 0x1b4: 0x2f87, 0x1b5: 0x3293,\n\t0x1b8: 0x3059, 0x1b9: 0x336a, 0x1ba: 0x3816, 0x1bb: 0x39a5,\n\t0x1bc: 0x350c, 0x1bd: 0x351e, 0x1be: 0x3518, 0x1bf: 0x352a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x2eec, 0x1c1: 0x31f8, 0x1c2: 0x2ef1, 0x1c3: 0x31fd, 0x1c4: 0x2f69, 0x1c5: 0x3275,\n\t0x1c6: 0x2f6e, 0x1c7: 0x327a, 0x1c8: 0x2ffa, 0x1c9: 0x3306, 0x1ca: 0x2fff, 0x1cb: 0x330b,\n\t0x1cc: 0x30a4, 0x1cd: 0x33b5, 0x1ce: 0x30a9, 0x1cf: 0x33ba, 0x1d0: 0x30c7, 0x1d1: 0x33d8,\n\t0x1d2: 0x30cc, 0x1d3: 0x33dd, 0x1d4: 0x313a, 0x1d5: 0x3450, 0x1d6: 0x313f, 0x1d7: 0x3455,\n\t0x1d8: 0x30e5, 0x1d9: 0x33f6, 0x1da: 0x30fe, 0x1db: 0x3414,\n\t0x1de: 0x2fb9, 0x1df: 0x32c5,\n\t0x1e6: 0x4809, 0x1e7: 0x489a, 0x1e8: 0x4831, 0x1e9: 0x48c2,\n\t0x1ea: 0x38be, 0x1eb: 0x3a4d, 0x1ec: 0x389b, 0x1ed: 0x3a2a, 0x1ee: 0x484f, 0x1ef: 0x48e0,\n\t0x1f0: 0x38b7, 0x1f1: 0x3a46, 0x1f2: 0x31a3, 0x1f3: 0x34be,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9933, 0x201: 0x9933, 0x202: 0x9933, 0x203: 0x9933, 0x204: 0x9933, 0x205: 0x8133,\n\t0x206: 0x9933, 0x207: 0x9933, 0x208: 0x9933, 0x209: 0x9933, 0x20a: 0x9933, 0x20b: 0x9933,\n\t0x20c: 0x9933, 0x20d: 0x8133, 0x20e: 0x8133, 0x20f: 0x9933, 0x210: 0x8133, 0x211: 0x9933,\n\t0x212: 0x8133, 0x213: 0x9933, 0x214: 0x9933, 0x215: 0x8134, 0x216: 0x812e, 0x217: 0x812e,\n\t0x218: 0x812e, 0x219: 0x812e, 0x21a: 0x8134, 0x21b: 0x992c, 0x21c: 0x812e, 0x21d: 0x812e,\n\t0x21e: 0x812e, 0x21f: 0x812e, 0x220: 0x812e, 0x221: 0x812a, 0x222: 0x812a, 0x223: 0x992e,\n\t0x224: 0x992e, 0x225: 0x992e, 0x226: 0x992e, 0x227: 0x992a, 0x228: 0x992a, 0x229: 0x812e,\n\t0x22a: 0x812e, 0x22b: 0x812e, 0x22c: 0x812e, 0x22d: 0x992e, 0x22e: 0x992e, 0x22f: 0x812e,\n\t0x230: 0x992e, 0x231: 0x992e, 0x232: 0x812e, 0x233: 0x812e, 0x234: 0x8101, 0x235: 0x8101,\n\t0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812e, 0x23a: 0x812e, 0x23b: 0x812e,\n\t0x23c: 0x812e, 0x23d: 0x8133, 0x23e: 0x8133, 0x23f: 0x8133,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x4b3f, 0x241: 0x4b44, 0x242: 0x9933, 0x243: 0x4b49, 0x244: 0x4c02, 0x245: 0x9937,\n\t0x246: 0x8133, 0x247: 0x812e, 0x248: 0x812e, 0x249: 0x812e, 0x24a: 0x8133, 0x24b: 0x8133,\n\t0x24c: 0x8133, 0x24d: 0x812e, 0x24e: 0x812e, 0x250: 0x8133, 0x251: 0x8133,\n\t0x252: 0x8133, 0x253: 0x812e, 0x254: 0x812e, 0x255: 0x812e, 0x256: 0x812e, 0x257: 0x8133,\n\t0x258: 0x8134, 0x259: 0x812e, 0x25a: 0x812e, 0x25b: 0x8133, 0x25c: 0x8135, 0x25d: 0x8136,\n\t0x25e: 0x8136, 0x25f: 0x8135, 0x260: 0x8136, 0x261: 0x8136, 0x262: 0x8135, 0x263: 0x8133,\n\t0x264: 0x8133, 0x265: 0x8133, 0x266: 0x8133, 0x267: 0x8133, 0x268: 0x8133, 0x269: 0x8133,\n\t0x26a: 0x8133, 0x26b: 0x8133, 0x26c: 0x8133, 0x26d: 0x8133, 0x26e: 0x8133, 0x26f: 0x8133,\n\t0x274: 0x01ee,\n\t0x27a: 0x8100,\n\t0x27e: 0x0037,\n\t// Block 0xa, offset 0x280\n\t0x284: 0x8100, 0x285: 0x3500,\n\t0x286: 0x3548, 0x287: 0x00ce, 0x288: 0x3566, 0x289: 0x3572, 0x28a: 0x3584,\n\t0x28c: 0x35a2, 0x28e: 0x35b4, 0x28f: 0x35d2, 0x290: 0x3d67, 0x291: 0xa000,\n\t0x295: 0xa000, 0x297: 0xa000,\n\t0x299: 0xa000,\n\t0x29f: 0xa000, 0x2a1: 0xa000,\n\t0x2a5: 0xa000, 0x2a9: 0xa000,\n\t0x2aa: 0x3596, 0x2ab: 0x35c6, 0x2ac: 0x4975, 0x2ad: 0x35f6, 0x2ae: 0x499f, 0x2af: 0x3608,\n\t0x2b0: 0x3dcf, 0x2b1: 0xa000, 0x2b5: 0xa000,\n\t0x2b7: 0xa000, 0x2b9: 0xa000,\n\t0x2bf: 0xa000,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x3680, 0x2c1: 0x368c, 0x2c3: 0x367a,\n\t0x2c6: 0xa000, 0x2c7: 0x3668,\n\t0x2cc: 0x36bc, 0x2cd: 0x36a4, 0x2ce: 0x36ce, 0x2d0: 0xa000,\n\t0x2d3: 0xa000, 0x2d5: 0xa000, 0x2d6: 0xa000, 0x2d7: 0xa000,\n\t0x2d8: 0xa000, 0x2d9: 0x36b0, 0x2da: 0xa000,\n\t0x2de: 0xa000, 0x2e3: 0xa000,\n\t0x2e7: 0xa000,\n\t0x2eb: 0xa000, 0x2ed: 0xa000,\n\t0x2f0: 0xa000, 0x2f3: 0xa000, 0x2f5: 0xa000,\n\t0x2f6: 0xa000, 0x2f7: 0xa000, 0x2f8: 0xa000, 0x2f9: 0x3734, 0x2fa: 0xa000,\n\t0x2fe: 0xa000,\n\t// Block 0xc, offset 0x300\n\t0x301: 0x3692, 0x302: 0x3716,\n\t0x310: 0x366e, 0x311: 0x36f2,\n\t0x312: 0x3674, 0x313: 0x36f8, 0x316: 0x3686, 0x317: 0x370a,\n\t0x318: 0xa000, 0x319: 0xa000, 0x31a: 0x3788, 0x31b: 0x378e, 0x31c: 0x3698, 0x31d: 0x371c,\n\t0x31e: 0x369e, 0x31f: 0x3722, 0x322: 0x36aa, 0x323: 0x372e,\n\t0x324: 0x36b6, 0x325: 0x373a, 0x326: 0x36c2, 0x327: 0x3746, 0x328: 0xa000, 0x329: 0xa000,\n\t0x32a: 0x3794, 0x32b: 0x379a, 0x32c: 0x36ec, 0x32d: 0x3770, 0x32e: 0x36c8, 0x32f: 0x374c,\n\t0x330: 0x36d4, 0x331: 0x3758, 0x332: 0x36da, 0x333: 0x375e, 0x334: 0x36e0, 0x335: 0x3764,\n\t0x338: 0x36e6, 0x339: 0x376a,\n\t// Block 0xd, offset 0x340\n\t0x351: 0x812e,\n\t0x352: 0x8133, 0x353: 0x8133, 0x354: 0x8133, 0x355: 0x8133, 0x356: 0x812e, 0x357: 0x8133,\n\t0x358: 0x8133, 0x359: 0x8133, 0x35a: 0x812f, 0x35b: 0x812e, 0x35c: 0x8133, 0x35d: 0x8133,\n\t0x35e: 0x8133, 0x35f: 0x8133, 0x360: 0x8133, 0x361: 0x8133, 0x362: 0x812e, 0x363: 0x812e,\n\t0x364: 0x812e, 0x365: 0x812e, 0x366: 0x812e, 0x367: 0x812e, 0x368: 0x8133, 0x369: 0x8133,\n\t0x36a: 0x812e, 0x36b: 0x8133, 0x36c: 0x8133, 0x36d: 0x812f, 0x36e: 0x8132, 0x36f: 0x8133,\n\t0x370: 0x8106, 0x371: 0x8107, 0x372: 0x8108, 0x373: 0x8109, 0x374: 0x810a, 0x375: 0x810b,\n\t0x376: 0x810c, 0x377: 0x810d, 0x378: 0x810e, 0x379: 0x810f, 0x37a: 0x810f, 0x37b: 0x8110,\n\t0x37c: 0x8111, 0x37d: 0x8112, 0x37f: 0x8113,\n\t// Block 0xe, offset 0x380\n\t0x388: 0xa000, 0x38a: 0xa000, 0x38b: 0x8117,\n\t0x38c: 0x8118, 0x38d: 0x8119, 0x38e: 0x811a, 0x38f: 0x811b, 0x390: 0x811c, 0x391: 0x811d,\n\t0x392: 0x811e, 0x393: 0x9933, 0x394: 0x9933, 0x395: 0x992e, 0x396: 0x812e, 0x397: 0x8133,\n\t0x398: 0x8133, 0x399: 0x8133, 0x39a: 0x8133, 0x39b: 0x8133, 0x39c: 0x812e, 0x39d: 0x8133,\n\t0x39e: 0x8133, 0x39f: 0x812e,\n\t0x3b0: 0x811f,\n\t// Block 0xf, offset 0x3c0\n\t0x3ca: 0x8133, 0x3cb: 0x8133,\n\t0x3cc: 0x8133, 0x3cd: 0x8133, 0x3ce: 0x8133, 0x3cf: 0x812e, 0x3d0: 0x812e, 0x3d1: 0x812e,\n\t0x3d2: 0x812e, 0x3d3: 0x812e, 0x3d4: 0x8133, 0x3d5: 0x8133, 0x3d6: 0x8133, 0x3d7: 0x8133,\n\t0x3d8: 0x8133, 0x3d9: 0x8133, 0x3da: 0x8133, 0x3db: 0x8133, 0x3dc: 0x8133, 0x3dd: 0x8133,\n\t0x3de: 0x8133, 0x3df: 0x8133, 0x3e0: 0x8133, 0x3e1: 0x8133, 0x3e3: 0x812e,\n\t0x3e4: 0x8133, 0x3e5: 0x8133, 0x3e6: 0x812e, 0x3e7: 0x8133, 0x3e8: 0x8133, 0x3e9: 0x812e,\n\t0x3ea: 0x8133, 0x3eb: 0x8133, 0x3ec: 0x8133, 0x3ed: 0x812e, 0x3ee: 0x812e, 0x3ef: 0x812e,\n\t0x3f0: 0x8117, 0x3f1: 0x8118, 0x3f2: 0x8119, 0x3f3: 0x8133, 0x3f4: 0x8133, 0x3f5: 0x8133,\n\t0x3f6: 0x812e, 0x3f7: 0x8133, 0x3f8: 0x8133, 0x3f9: 0x812e, 0x3fa: 0x812e, 0x3fb: 0x8133,\n\t0x3fc: 0x8133, 0x3fd: 0x8133, 0x3fe: 0x8133, 0x3ff: 0x8133,\n\t// Block 0x10, offset 0x400\n\t0x405: 0xa000,\n\t0x406: 0x3ee7, 0x407: 0xa000, 0x408: 0x3eef, 0x409: 0xa000, 0x40a: 0x3ef7, 0x40b: 0xa000,\n\t0x40c: 0x3eff, 0x40d: 0xa000, 0x40e: 0x3f07, 0x411: 0xa000,\n\t0x412: 0x3f0f,\n\t0x434: 0x8103, 0x435: 0x9900,\n\t0x43a: 0xa000, 0x43b: 0x3f17,\n\t0x43c: 0xa000, 0x43d: 0x3f1f, 0x43e: 0xa000, 0x43f: 0xa000,\n\t// Block 0x11, offset 0x440\n\t0x440: 0x8133, 0x441: 0x8133, 0x442: 0x812e, 0x443: 0x8133, 0x444: 0x8133, 0x445: 0x8133,\n\t0x446: 0x8133, 0x447: 0x8133, 0x448: 0x8133, 0x449: 0x8133, 0x44a: 0x812e, 0x44b: 0x8133,\n\t0x44c: 0x8133, 0x44d: 0x8136, 0x44e: 0x812b, 0x44f: 0x812e, 0x450: 0x812a, 0x451: 0x8133,\n\t0x452: 0x8133, 0x453: 0x8133, 0x454: 0x8133, 0x455: 0x8133, 0x456: 0x8133, 0x457: 0x8133,\n\t0x458: 0x8133, 0x459: 0x8133, 0x45a: 0x8133, 0x45b: 0x8133, 0x45c: 0x8133, 0x45d: 0x8133,\n\t0x45e: 0x8133, 0x45f: 0x8133, 0x460: 0x8133, 0x461: 0x8133, 0x462: 0x8133, 0x463: 0x8133,\n\t0x464: 0x8133, 0x465: 0x8133, 0x466: 0x8133, 0x467: 0x8133, 0x468: 0x8133, 0x469: 0x8133,\n\t0x46a: 0x8133, 0x46b: 0x8133, 0x46c: 0x8133, 0x46d: 0x8133, 0x46e: 0x8133, 0x46f: 0x8133,\n\t0x470: 0x8133, 0x471: 0x8133, 0x472: 0x8133, 0x473: 0x8133, 0x474: 0x8133, 0x475: 0x8133,\n\t0x476: 0x8134, 0x477: 0x8132, 0x478: 0x8132, 0x479: 0x812e, 0x47a: 0x812d, 0x47b: 0x8133,\n\t0x47c: 0x8135, 0x47d: 0x812e, 0x47e: 0x8133, 0x47f: 0x812e,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x2ef6, 0x481: 0x3202, 0x482: 0x2f00, 0x483: 0x320c, 0x484: 0x2f05, 0x485: 0x3211,\n\t0x486: 0x2f0a, 0x487: 0x3216, 0x488: 0x382b, 0x489: 0x39ba, 0x48a: 0x2f23, 0x48b: 0x322f,\n\t0x48c: 0x2f2d, 0x48d: 0x3239, 0x48e: 0x2f3c, 0x48f: 0x3248, 0x490: 0x2f32, 0x491: 0x323e,\n\t0x492: 0x2f37, 0x493: 0x3243, 0x494: 0x384e, 0x495: 0x39dd, 0x496: 0x3855, 0x497: 0x39e4,\n\t0x498: 0x2f78, 0x499: 0x3284, 0x49a: 0x2f7d, 0x49b: 0x3289, 0x49c: 0x3863, 0x49d: 0x39f2,\n\t0x49e: 0x2f82, 0x49f: 0x328e, 0x4a0: 0x2f91, 0x4a1: 0x329d, 0x4a2: 0x2faf, 0x4a3: 0x32bb,\n\t0x4a4: 0x2fbe, 0x4a5: 0x32ca, 0x4a6: 0x2fb4, 0x4a7: 0x32c0, 0x4a8: 0x2fc3, 0x4a9: 0x32cf,\n\t0x4aa: 0x2fc8, 0x4ab: 0x32d4, 0x4ac: 0x300e, 0x4ad: 0x331a, 0x4ae: 0x386a, 0x4af: 0x39f9,\n\t0x4b0: 0x3018, 0x4b1: 0x3329, 0x4b2: 0x3022, 0x4b3: 0x3333, 0x4b4: 0x302c, 0x4b5: 0x333d,\n\t0x4b6: 0x483b, 0x4b7: 0x48cc, 0x4b8: 0x3871, 0x4b9: 0x3a00, 0x4ba: 0x3045, 0x4bb: 0x3356,\n\t0x4bc: 0x3040, 0x4bd: 0x3351, 0x4be: 0x304a, 0x4bf: 0x335b,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x304f, 0x4c1: 0x3360, 0x4c2: 0x3054, 0x4c3: 0x3365, 0x4c4: 0x3068, 0x4c5: 0x3379,\n\t0x4c6: 0x3072, 0x4c7: 0x3383, 0x4c8: 0x3081, 0x4c9: 0x3392, 0x4ca: 0x307c, 0x4cb: 0x338d,\n\t0x4cc: 0x3894, 0x4cd: 0x3a23, 0x4ce: 0x38a2, 0x4cf: 0x3a31, 0x4d0: 0x38a9, 0x4d1: 0x3a38,\n\t0x4d2: 0x38b0, 0x4d3: 0x3a3f, 0x4d4: 0x30ae, 0x4d5: 0x33bf, 0x4d6: 0x30b3, 0x4d7: 0x33c4,\n\t0x4d8: 0x30bd, 0x4d9: 0x33ce, 0x4da: 0x4868, 0x4db: 0x48f9, 0x4dc: 0x38f6, 0x4dd: 0x3a85,\n\t0x4de: 0x30d6, 0x4df: 0x33e7, 0x4e0: 0x30e0, 0x4e1: 0x33f1, 0x4e2: 0x4877, 0x4e3: 0x4908,\n\t0x4e4: 0x38fd, 0x4e5: 0x3a8c, 0x4e6: 0x3904, 0x4e7: 0x3a93, 0x4e8: 0x390b, 0x4e9: 0x3a9a,\n\t0x4ea: 0x30ef, 0x4eb: 0x3400, 0x4ec: 0x30f9, 0x4ed: 0x340f, 0x4ee: 0x310d, 0x4ef: 0x3423,\n\t0x4f0: 0x3108, 0x4f1: 0x341e, 0x4f2: 0x3149, 0x4f3: 0x345f, 0x4f4: 0x3158, 0x4f5: 0x346e,\n\t0x4f6: 0x3153, 0x4f7: 0x3469, 0x4f8: 0x3912, 0x4f9: 0x3aa1, 0x4fa: 0x3919, 0x4fb: 0x3aa8,\n\t0x4fc: 0x315d, 0x4fd: 0x3473, 0x4fe: 0x3162, 0x4ff: 0x3478,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x3167, 0x501: 0x347d, 0x502: 0x316c, 0x503: 0x3482, 0x504: 0x317b, 0x505: 0x3491,\n\t0x506: 0x3176, 0x507: 0x348c, 0x508: 0x3180, 0x509: 0x349b, 0x50a: 0x3185, 0x50b: 0x34a0,\n\t0x50c: 0x318a, 0x50d: 0x34a5, 0x50e: 0x31a8, 0x50f: 0x34c3, 0x510: 0x31c1, 0x511: 0x34e1,\n\t0x512: 0x31d0, 0x513: 0x34f0, 0x514: 0x31d5, 0x515: 0x34f5, 0x516: 0x32d9, 0x517: 0x3405,\n\t0x518: 0x3496, 0x519: 0x34d2, 0x51b: 0x3530,\n\t0x520: 0x4818, 0x521: 0x48a9, 0x522: 0x2ee2, 0x523: 0x31ee,\n\t0x524: 0x37d7, 0x525: 0x3966, 0x526: 0x37d0, 0x527: 0x395f, 0x528: 0x37e5, 0x529: 0x3974,\n\t0x52a: 0x37de, 0x52b: 0x396d, 0x52c: 0x381d, 0x52d: 0x39ac, 0x52e: 0x37f3, 0x52f: 0x3982,\n\t0x530: 0x37ec, 0x531: 0x397b, 0x532: 0x3801, 0x533: 0x3990, 0x534: 0x37fa, 0x535: 0x3989,\n\t0x536: 0x3824, 0x537: 0x39b3, 0x538: 0x482c, 0x539: 0x48bd, 0x53a: 0x2f5f, 0x53b: 0x326b,\n\t0x53c: 0x2f4b, 0x53d: 0x3257, 0x53e: 0x3839, 0x53f: 0x39c8,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x3832, 0x541: 0x39c1, 0x542: 0x3847, 0x543: 0x39d6, 0x544: 0x3840, 0x545: 0x39cf,\n\t0x546: 0x385c, 0x547: 0x39eb, 0x548: 0x2ff0, 0x549: 0x32fc, 0x54a: 0x3004, 0x54b: 0x3310,\n\t0x54c: 0x485e, 0x54d: 0x48ef, 0x54e: 0x3095, 0x54f: 0x33a6, 0x550: 0x387f, 0x551: 0x3a0e,\n\t0x552: 0x3878, 0x553: 0x3a07, 0x554: 0x388d, 0x555: 0x3a1c, 0x556: 0x3886, 0x557: 0x3a15,\n\t0x558: 0x38e8, 0x559: 0x3a77, 0x55a: 0x38cc, 0x55b: 0x3a5b, 0x55c: 0x38c5, 0x55d: 0x3a54,\n\t0x55e: 0x38da, 0x55f: 0x3a69, 0x560: 0x38d3, 0x561: 0x3a62, 0x562: 0x38e1, 0x563: 0x3a70,\n\t0x564: 0x3144, 0x565: 0x345a, 0x566: 0x3126, 0x567: 0x343c, 0x568: 0x3943, 0x569: 0x3ad2,\n\t0x56a: 0x393c, 0x56b: 0x3acb, 0x56c: 0x3951, 0x56d: 0x3ae0, 0x56e: 0x394a, 0x56f: 0x3ad9,\n\t0x570: 0x3958, 0x571: 0x3ae7, 0x572: 0x318f, 0x573: 0x34aa, 0x574: 0x31b7, 0x575: 0x34d7,\n\t0x576: 0x31b2, 0x577: 0x34cd, 0x578: 0x319e, 0x579: 0x34b9,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x497b, 0x581: 0x4981, 0x582: 0x4a95, 0x583: 0x4aad, 0x584: 0x4a9d, 0x585: 0x4ab5,\n\t0x586: 0x4aa5, 0x587: 0x4abd, 0x588: 0x4921, 0x589: 0x4927, 0x58a: 0x4a05, 0x58b: 0x4a1d,\n\t0x58c: 0x4a0d, 0x58d: 0x4a25, 0x58e: 0x4a15, 0x58f: 0x4a2d, 0x590: 0x498d, 0x591: 0x4993,\n\t0x592: 0x3d17, 0x593: 0x3d27, 0x594: 0x3d1f, 0x595: 0x3d2f,\n\t0x598: 0x492d, 0x599: 0x4933, 0x59a: 0x3c47, 0x59b: 0x3c57, 0x59c: 0x3c4f, 0x59d: 0x3c5f,\n\t0x5a0: 0x49a5, 0x5a1: 0x49ab, 0x5a2: 0x4ac5, 0x5a3: 0x4add,\n\t0x5a4: 0x4acd, 0x5a5: 0x4ae5, 0x5a6: 0x4ad5, 0x5a7: 0x4aed, 0x5a8: 0x4939, 0x5a9: 0x493f,\n\t0x5aa: 0x4a35, 0x5ab: 0x4a4d, 0x5ac: 0x4a3d, 0x5ad: 0x4a55, 0x5ae: 0x4a45, 0x5af: 0x4a5d,\n\t0x5b0: 0x49bd, 0x5b1: 0x49c3, 0x5b2: 0x3d77, 0x5b3: 0x3d8f, 0x5b4: 0x3d7f, 0x5b5: 0x3d97,\n\t0x5b6: 0x3d87, 0x5b7: 0x3d9f, 0x5b8: 0x4945, 0x5b9: 0x494b, 0x5ba: 0x3c77, 0x5bb: 0x3c8f,\n\t0x5bc: 0x3c7f, 0x5bd: 0x3c97, 0x5be: 0x3c87, 0x5bf: 0x3c9f,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x49c9, 0x5c1: 0x49cf, 0x5c2: 0x3da7, 0x5c3: 0x3db7, 0x5c4: 0x3daf, 0x5c5: 0x3dbf,\n\t0x5c8: 0x4951, 0x5c9: 0x4957, 0x5ca: 0x3ca7, 0x5cb: 0x3cb7,\n\t0x5cc: 0x3caf, 0x5cd: 0x3cbf, 0x5d0: 0x49db, 0x5d1: 0x49e1,\n\t0x5d2: 0x3ddf, 0x5d3: 0x3df7, 0x5d4: 0x3de7, 0x5d5: 0x3dff, 0x5d6: 0x3def, 0x5d7: 0x3e07,\n\t0x5d9: 0x495d, 0x5db: 0x3cc7, 0x5dd: 0x3ccf,\n\t0x5df: 0x3cd7, 0x5e0: 0x49f3, 0x5e1: 0x49f9, 0x5e2: 0x4af5, 0x5e3: 0x4b0d,\n\t0x5e4: 0x4afd, 0x5e5: 0x4b15, 0x5e6: 0x4b05, 0x5e7: 0x4b1d, 0x5e8: 0x4963, 0x5e9: 0x4969,\n\t0x5ea: 0x4a65, 0x5eb: 0x4a7d, 0x5ec: 0x4a6d, 0x5ed: 0x4a85, 0x5ee: 0x4a75, 0x5ef: 0x4a8d,\n\t0x5f0: 0x496f, 0x5f1: 0x441d, 0x5f2: 0x35f0, 0x5f3: 0x4423, 0x5f4: 0x4999, 0x5f5: 0x4429,\n\t0x5f6: 0x3602, 0x5f7: 0x442f, 0x5f8: 0x3620, 0x5f9: 0x4435, 0x5fa: 0x3638, 0x5fb: 0x443b,\n\t0x5fc: 0x49e7, 0x5fd: 0x4441,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3cff, 0x601: 0x3d07, 0x602: 0x41d3, 0x603: 0x41f1, 0x604: 0x41dd, 0x605: 0x41fb,\n\t0x606: 0x41e7, 0x607: 0x4205, 0x608: 0x3c37, 0x609: 0x3c3f, 0x60a: 0x411f, 0x60b: 0x413d,\n\t0x60c: 0x4129, 0x60d: 0x4147, 0x60e: 0x4133, 0x60f: 0x4151, 0x610: 0x3d47, 0x611: 0x3d4f,\n\t0x612: 0x420f, 0x613: 0x422d, 0x614: 0x4219, 0x615: 0x4237, 0x616: 0x4223, 0x617: 0x4241,\n\t0x618: 0x3c67, 0x619: 0x3c6f, 0x61a: 0x415b, 0x61b: 0x4179, 0x61c: 0x4165, 0x61d: 0x4183,\n\t0x61e: 0x416f, 0x61f: 0x418d, 0x620: 0x3e1f, 0x621: 0x3e27, 0x622: 0x424b, 0x623: 0x4269,\n\t0x624: 0x4255, 0x625: 0x4273, 0x626: 0x425f, 0x627: 0x427d, 0x628: 0x3cdf, 0x629: 0x3ce7,\n\t0x62a: 0x4197, 0x62b: 0x41b5, 0x62c: 0x41a1, 0x62d: 0x41bf, 0x62e: 0x41ab, 0x62f: 0x41c9,\n\t0x630: 0x35e4, 0x631: 0x35de, 0x632: 0x3cef, 0x633: 0x35ea, 0x634: 0x3cf7,\n\t0x636: 0x4987, 0x637: 0x3d0f, 0x638: 0x3554, 0x639: 0x354e, 0x63a: 0x3542, 0x63b: 0x43ed,\n\t0x63c: 0x355a, 0x63d: 0x8100, 0x63e: 0x0257, 0x63f: 0xa100,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x8100, 0x641: 0x3506, 0x642: 0x3d37, 0x643: 0x35fc, 0x644: 0x3d3f,\n\t0x646: 0x49b1, 0x647: 0x3d57, 0x648: 0x3560, 0x649: 0x43f3, 0x64a: 0x356c, 0x64b: 0x43f9,\n\t0x64c: 0x3578, 0x64d: 0x3aee, 0x64e: 0x3af5, 0x64f: 0x3afc, 0x650: 0x3614, 0x651: 0x360e,\n\t0x652: 0x3d5f, 0x653: 0x45e3, 0x656: 0x361a, 0x657: 0x3d6f,\n\t0x658: 0x3590, 0x659: 0x358a, 0x65a: 0x357e, 0x65b: 0x43ff, 0x65d: 0x3b03,\n\t0x65e: 0x3b0a, 0x65f: 0x3b11, 0x660: 0x364a, 0x661: 0x3644, 0x662: 0x3dc7, 0x663: 0x45eb,\n\t0x664: 0x362c, 0x665: 0x3632, 0x666: 0x3650, 0x667: 0x3dd7, 0x668: 0x35c0, 0x669: 0x35ba,\n\t0x66a: 0x35ae, 0x66b: 0x440b, 0x66c: 0x35a8, 0x66d: 0x34fa, 0x66e: 0x43e7, 0x66f: 0x0081,\n\t0x672: 0x3e0f, 0x673: 0x3656, 0x674: 0x3e17,\n\t0x676: 0x49ff, 0x677: 0x3e2f, 0x678: 0x359c, 0x679: 0x4405, 0x67a: 0x35cc, 0x67b: 0x4417,\n\t0x67c: 0x35d8, 0x67d: 0x4355, 0x67e: 0xa100,\n\t// Block 0x1a, offset 0x680\n\t0x681: 0x3b65, 0x683: 0xa000, 0x684: 0x3b6c, 0x685: 0xa000,\n\t0x687: 0x3b73, 0x688: 0xa000, 0x689: 0x3b7a,\n\t0x68d: 0xa000,\n\t0x6a0: 0x2ec4, 0x6a1: 0xa000, 0x6a2: 0x3b88,\n\t0x6a4: 0xa000, 0x6a5: 0xa000,\n\t0x6ad: 0x3b81, 0x6ae: 0x2ebf, 0x6af: 0x2ec9,\n\t0x6b0: 0x3b8f, 0x6b1: 0x3b96, 0x6b2: 0xa000, 0x6b3: 0xa000, 0x6b4: 0x3b9d, 0x6b5: 0x3ba4,\n\t0x6b6: 0xa000, 0x6b7: 0xa000, 0x6b8: 0x3bab, 0x6b9: 0x3bb2, 0x6ba: 0xa000, 0x6bb: 0xa000,\n\t0x6bc: 0xa000, 0x6bd: 0xa000,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3bb9, 0x6c1: 0x3bc0, 0x6c2: 0xa000, 0x6c3: 0xa000, 0x6c4: 0x3bd5, 0x6c5: 0x3bdc,\n\t0x6c6: 0xa000, 0x6c7: 0xa000, 0x6c8: 0x3be3, 0x6c9: 0x3bea,\n\t0x6d1: 0xa000,\n\t0x6d2: 0xa000,\n\t0x6e2: 0xa000,\n\t0x6e8: 0xa000, 0x6e9: 0xa000,\n\t0x6eb: 0xa000, 0x6ec: 0x3bff, 0x6ed: 0x3c06, 0x6ee: 0x3c0d, 0x6ef: 0x3c14,\n\t0x6f2: 0xa000, 0x6f3: 0xa000, 0x6f4: 0xa000, 0x6f5: 0xa000,\n\t// Block 0x1c, offset 0x700\n\t0x706: 0xa000, 0x70b: 0xa000,\n\t0x70c: 0x3f47, 0x70d: 0xa000, 0x70e: 0x3f4f, 0x70f: 0xa000, 0x710: 0x3f57, 0x711: 0xa000,\n\t0x712: 0x3f5f, 0x713: 0xa000, 0x714: 0x3f67, 0x715: 0xa000, 0x716: 0x3f6f, 0x717: 0xa000,\n\t0x718: 0x3f77, 0x719: 0xa000, 0x71a: 0x3f7f, 0x71b: 0xa000, 0x71c: 0x3f87, 0x71d: 0xa000,\n\t0x71e: 0x3f8f, 0x71f: 0xa000, 0x720: 0x3f97, 0x721: 0xa000, 0x722: 0x3f9f,\n\t0x724: 0xa000, 0x725: 0x3fa7, 0x726: 0xa000, 0x727: 0x3faf, 0x728: 0xa000, 0x729: 0x3fb7,\n\t0x72f: 0xa000,\n\t0x730: 0x3fbf, 0x731: 0x3fc7, 0x732: 0xa000, 0x733: 0x3fcf, 0x734: 0x3fd7, 0x735: 0xa000,\n\t0x736: 0x3fdf, 0x737: 0x3fe7, 0x738: 0xa000, 0x739: 0x3fef, 0x73a: 0x3ff7, 0x73b: 0xa000,\n\t0x73c: 0x3fff, 0x73d: 0x4007,\n\t// Block 0x1d, offset 0x740\n\t0x754: 0x3f3f,\n\t0x759: 0x9904, 0x75a: 0x9904, 0x75b: 0x8100, 0x75c: 0x8100, 0x75d: 0xa000,\n\t0x75e: 0x400f,\n\t0x766: 0xa000,\n\t0x76b: 0xa000, 0x76c: 0x401f, 0x76d: 0xa000, 0x76e: 0x4027, 0x76f: 0xa000,\n\t0x770: 0x402f, 0x771: 0xa000, 0x772: 0x4037, 0x773: 0xa000, 0x774: 0x403f, 0x775: 0xa000,\n\t0x776: 0x4047, 0x777: 0xa000, 0x778: 0x404f, 0x779: 0xa000, 0x77a: 0x4057, 0x77b: 0xa000,\n\t0x77c: 0x405f, 0x77d: 0xa000, 0x77e: 0x4067, 0x77f: 0xa000,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x406f, 0x781: 0xa000, 0x782: 0x4077, 0x784: 0xa000, 0x785: 0x407f,\n\t0x786: 0xa000, 0x787: 0x4087, 0x788: 0xa000, 0x789: 0x408f,\n\t0x78f: 0xa000, 0x790: 0x4097, 0x791: 0x409f,\n\t0x792: 0xa000, 0x793: 0x40a7, 0x794: 0x40af, 0x795: 0xa000, 0x796: 0x40b7, 0x797: 0x40bf,\n\t0x798: 0xa000, 0x799: 0x40c7, 0x79a: 0x40cf, 0x79b: 0xa000, 0x79c: 0x40d7, 0x79d: 0x40df,\n\t0x7af: 0xa000,\n\t0x7b0: 0xa000, 0x7b1: 0xa000, 0x7b2: 0xa000, 0x7b4: 0x4017,\n\t0x7b7: 0x40e7, 0x7b8: 0x40ef, 0x7b9: 0x40f7, 0x7ba: 0x40ff,\n\t0x7bd: 0xa000, 0x7be: 0x4107,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c0: 0x1472, 0x7c1: 0x0df6, 0x7c2: 0x14ce, 0x7c3: 0x149a, 0x7c4: 0x0f52, 0x7c5: 0x07e6,\n\t0x7c6: 0x09da, 0x7c7: 0x1726, 0x7c8: 0x1726, 0x7c9: 0x0b06, 0x7ca: 0x155a, 0x7cb: 0x0a3e,\n\t0x7cc: 0x0b02, 0x7cd: 0x0cea, 0x7ce: 0x10ca, 0x7cf: 0x125a, 0x7d0: 0x1392, 0x7d1: 0x13ce,\n\t0x7d2: 0x1402, 0x7d3: 0x1516, 0x7d4: 0x0e6e, 0x7d5: 0x0efa, 0x7d6: 0x0fa6, 0x7d7: 0x103e,\n\t0x7d8: 0x135a, 0x7d9: 0x1542, 0x7da: 0x166e, 0x7db: 0x080a, 0x7dc: 0x09ae, 0x7dd: 0x0e82,\n\t0x7de: 0x0fca, 0x7df: 0x138e, 0x7e0: 0x16be, 0x7e1: 0x0bae, 0x7e2: 0x0f72, 0x7e3: 0x137e,\n\t0x7e4: 0x1412, 0x7e5: 0x0d1e, 0x7e6: 0x12b6, 0x7e7: 0x13da, 0x7e8: 0x0c1a, 0x7e9: 0x0e0a,\n\t0x7ea: 0x0f12, 0x7eb: 0x1016, 0x7ec: 0x1522, 0x7ed: 0x084a, 0x7ee: 0x08e2, 0x7ef: 0x094e,\n\t0x7f0: 0x0d86, 0x7f1: 0x0e7a, 0x7f2: 0x0fc6, 0x7f3: 0x10ea, 0x7f4: 0x1272, 0x7f5: 0x1386,\n\t0x7f6: 0x139e, 0x7f7: 0x14c2, 0x7f8: 0x15ea, 0x7f9: 0x169e, 0x7fa: 0x16ba, 0x7fb: 0x1126,\n\t0x7fc: 0x1166, 0x7fd: 0x121e, 0x7fe: 0x133e, 0x7ff: 0x1576,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x16c6, 0x801: 0x1446, 0x802: 0x0ac2, 0x803: 0x0c36, 0x804: 0x11d6, 0x805: 0x1296,\n\t0x806: 0x0ffa, 0x807: 0x112e, 0x808: 0x1492, 0x809: 0x15e2, 0x80a: 0x0abe, 0x80b: 0x0b8a,\n\t0x80c: 0x0e72, 0x80d: 0x0f26, 0x80e: 0x0f5a, 0x80f: 0x120e, 0x810: 0x1236, 0x811: 0x15a2,\n\t0x812: 0x094a, 0x813: 0x12a2, 0x814: 0x08ee, 0x815: 0x08ea, 0x816: 0x1192, 0x817: 0x1222,\n\t0x818: 0x1356, 0x819: 0x15aa, 0x81a: 0x1462, 0x81b: 0x0d22, 0x81c: 0x0e6e, 0x81d: 0x1452,\n\t0x81e: 0x07f2, 0x81f: 0x0b5e, 0x820: 0x0c8e, 0x821: 0x102a, 0x822: 0x10aa, 0x823: 0x096e,\n\t0x824: 0x1136, 0x825: 0x085a, 0x826: 0x0c72, 0x827: 0x07d2, 0x828: 0x0ee6, 0x829: 0x0d9e,\n\t0x82a: 0x120a, 0x82b: 0x09c2, 0x82c: 0x0aae, 0x82d: 0x10f6, 0x82e: 0x135e, 0x82f: 0x1436,\n\t0x830: 0x0eb2, 0x831: 0x14f2, 0x832: 0x0ede, 0x833: 0x0d32, 0x834: 0x1316, 0x835: 0x0d52,\n\t0x836: 0x10a6, 0x837: 0x0826, 0x838: 0x08a2, 0x839: 0x08e6, 0x83a: 0x0e4e, 0x83b: 0x11f6,\n\t0x83c: 0x12ee, 0x83d: 0x1442, 0x83e: 0x1556, 0x83f: 0x0956,\n\t// Block 0x21, offset 0x840\n\t0x840: 0x0a0a, 0x841: 0x0b12, 0x842: 0x0c2a, 0x843: 0x0dba, 0x844: 0x0f76, 0x845: 0x113a,\n\t0x846: 0x1592, 0x847: 0x1676, 0x848: 0x16ca, 0x849: 0x16e2, 0x84a: 0x0932, 0x84b: 0x0dee,\n\t0x84c: 0x0e9e, 0x84d: 0x14e6, 0x84e: 0x0bf6, 0x84f: 0x0cd2, 0x850: 0x0cee, 0x851: 0x0d7e,\n\t0x852: 0x0f66, 0x853: 0x0fb2, 0x854: 0x1062, 0x855: 0x1186, 0x856: 0x122a, 0x857: 0x128e,\n\t0x858: 0x14d6, 0x859: 0x1366, 0x85a: 0x14fe, 0x85b: 0x157a, 0x85c: 0x090a, 0x85d: 0x0936,\n\t0x85e: 0x0a1e, 0x85f: 0x0fa2, 0x860: 0x13ee, 0x861: 0x1436, 0x862: 0x0c16, 0x863: 0x0c86,\n\t0x864: 0x0d4a, 0x865: 0x0eaa, 0x866: 0x11d2, 0x867: 0x101e, 0x868: 0x0836, 0x869: 0x0a7a,\n\t0x86a: 0x0b5e, 0x86b: 0x0bc2, 0x86c: 0x0c92, 0x86d: 0x103a, 0x86e: 0x1056, 0x86f: 0x1266,\n\t0x870: 0x1286, 0x871: 0x155e, 0x872: 0x15de, 0x873: 0x15ee, 0x874: 0x162a, 0x875: 0x084e,\n\t0x876: 0x117a, 0x877: 0x154a, 0x878: 0x15c6, 0x879: 0x0caa, 0x87a: 0x0812, 0x87b: 0x0872,\n\t0x87c: 0x0b62, 0x87d: 0x0b82, 0x87e: 0x0daa, 0x87f: 0x0e6e,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x0fbe, 0x881: 0x10c6, 0x882: 0x1372, 0x883: 0x1512, 0x884: 0x171e, 0x885: 0x0dde,\n\t0x886: 0x159e, 0x887: 0x092e, 0x888: 0x0e2a, 0x889: 0x0e36, 0x88a: 0x0f0a, 0x88b: 0x0f42,\n\t0x88c: 0x1046, 0x88d: 0x10a2, 0x88e: 0x1122, 0x88f: 0x1206, 0x890: 0x1636, 0x891: 0x08aa,\n\t0x892: 0x0cfe, 0x893: 0x15ae, 0x894: 0x0862, 0x895: 0x0ba6, 0x896: 0x0f2a, 0x897: 0x14da,\n\t0x898: 0x0c62, 0x899: 0x0cb2, 0x89a: 0x0e3e, 0x89b: 0x102a, 0x89c: 0x15b6, 0x89d: 0x0912,\n\t0x89e: 0x09fa, 0x89f: 0x0b92, 0x8a0: 0x0dce, 0x8a1: 0x0e1a, 0x8a2: 0x0e5a, 0x8a3: 0x0eee,\n\t0x8a4: 0x1042, 0x8a5: 0x10b6, 0x8a6: 0x1252, 0x8a7: 0x13f2, 0x8a8: 0x13fe, 0x8a9: 0x1552,\n\t0x8aa: 0x15d2, 0x8ab: 0x097e, 0x8ac: 0x0f46, 0x8ad: 0x09fe, 0x8ae: 0x0fc2, 0x8af: 0x1066,\n\t0x8b0: 0x1382, 0x8b1: 0x15ba, 0x8b2: 0x16a6, 0x8b3: 0x16ce, 0x8b4: 0x0e32, 0x8b5: 0x0f22,\n\t0x8b6: 0x12be, 0x8b7: 0x11b2, 0x8b8: 0x11be, 0x8b9: 0x11e2, 0x8ba: 0x1012, 0x8bb: 0x0f9a,\n\t0x8bc: 0x145e, 0x8bd: 0x082e, 0x8be: 0x1326, 0x8bf: 0x0916,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x0906, 0x8c1: 0x0c06, 0x8c2: 0x0d26, 0x8c3: 0x11ee, 0x8c4: 0x0b4e, 0x8c5: 0x0efe,\n\t0x8c6: 0x0dea, 0x8c7: 0x14e2, 0x8c8: 0x13e2, 0x8c9: 0x15a6, 0x8ca: 0x141e, 0x8cb: 0x0c22,\n\t0x8cc: 0x0882, 0x8cd: 0x0a56, 0x8d0: 0x0aaa,\n\t0x8d2: 0x0dda, 0x8d5: 0x08f2, 0x8d6: 0x101a, 0x8d7: 0x10de,\n\t0x8d8: 0x1142, 0x8d9: 0x115e, 0x8da: 0x1162, 0x8db: 0x1176, 0x8dc: 0x15f6, 0x8dd: 0x11e6,\n\t0x8de: 0x126a, 0x8e0: 0x138a, 0x8e2: 0x144e,\n\t0x8e5: 0x1502, 0x8e6: 0x152e,\n\t0x8ea: 0x164a, 0x8eb: 0x164e, 0x8ec: 0x1652, 0x8ed: 0x16b6, 0x8ee: 0x1526, 0x8ef: 0x15c2,\n\t0x8f0: 0x0852, 0x8f1: 0x0876, 0x8f2: 0x088a, 0x8f3: 0x0946, 0x8f4: 0x0952, 0x8f5: 0x0992,\n\t0x8f6: 0x0a46, 0x8f7: 0x0a62, 0x8f8: 0x0a6a, 0x8f9: 0x0aa6, 0x8fa: 0x0ab2, 0x8fb: 0x0b8e,\n\t0x8fc: 0x0b96, 0x8fd: 0x0c9e, 0x8fe: 0x0cc6, 0x8ff: 0x0cce,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0ce6, 0x901: 0x0d92, 0x902: 0x0dc2, 0x903: 0x0de2, 0x904: 0x0e52, 0x905: 0x0f16,\n\t0x906: 0x0f32, 0x907: 0x0f62, 0x908: 0x0fb6, 0x909: 0x0fd6, 0x90a: 0x104a, 0x90b: 0x112a,\n\t0x90c: 0x1146, 0x90d: 0x114e, 0x90e: 0x114a, 0x90f: 0x1152, 0x910: 0x1156, 0x911: 0x115a,\n\t0x912: 0x116e, 0x913: 0x1172, 0x914: 0x1196, 0x915: 0x11aa, 0x916: 0x11c6, 0x917: 0x122a,\n\t0x918: 0x1232, 0x919: 0x123a, 0x91a: 0x124e, 0x91b: 0x1276, 0x91c: 0x12c6, 0x91d: 0x12fa,\n\t0x91e: 0x12fa, 0x91f: 0x1362, 0x920: 0x140a, 0x921: 0x1422, 0x922: 0x1456, 0x923: 0x145a,\n\t0x924: 0x149e, 0x925: 0x14a2, 0x926: 0x14fa, 0x927: 0x1502, 0x928: 0x15d6, 0x929: 0x161a,\n\t0x92a: 0x1632, 0x92b: 0x0c96, 0x92c: 0x184b, 0x92d: 0x12de,\n\t0x930: 0x07da, 0x931: 0x08de, 0x932: 0x089e, 0x933: 0x0846, 0x934: 0x0886, 0x935: 0x08b2,\n\t0x936: 0x0942, 0x937: 0x095e, 0x938: 0x0a46, 0x939: 0x0a32, 0x93a: 0x0a42, 0x93b: 0x0a5e,\n\t0x93c: 0x0aaa, 0x93d: 0x0aba, 0x93e: 0x0afe, 0x93f: 0x0b0a,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x0b26, 0x941: 0x0b36, 0x942: 0x0c1e, 0x943: 0x0c26, 0x944: 0x0c56, 0x945: 0x0c76,\n\t0x946: 0x0ca6, 0x947: 0x0cbe, 0x948: 0x0cae, 0x949: 0x0cce, 0x94a: 0x0cc2, 0x94b: 0x0ce6,\n\t0x94c: 0x0d02, 0x94d: 0x0d5a, 0x94e: 0x0d66, 0x94f: 0x0d6e, 0x950: 0x0d96, 0x951: 0x0dda,\n\t0x952: 0x0e0a, 0x953: 0x0e0e, 0x954: 0x0e22, 0x955: 0x0ea2, 0x956: 0x0eb2, 0x957: 0x0f0a,\n\t0x958: 0x0f56, 0x959: 0x0f4e, 0x95a: 0x0f62, 0x95b: 0x0f7e, 0x95c: 0x0fb6, 0x95d: 0x110e,\n\t0x95e: 0x0fda, 0x95f: 0x100e, 0x960: 0x101a, 0x961: 0x105a, 0x962: 0x1076, 0x963: 0x109a,\n\t0x964: 0x10be, 0x965: 0x10c2, 0x966: 0x10de, 0x967: 0x10e2, 0x968: 0x10f2, 0x969: 0x1106,\n\t0x96a: 0x1102, 0x96b: 0x1132, 0x96c: 0x11ae, 0x96d: 0x11c6, 0x96e: 0x11de, 0x96f: 0x1216,\n\t0x970: 0x122a, 0x971: 0x1246, 0x972: 0x1276, 0x973: 0x132a, 0x974: 0x1352, 0x975: 0x13c6,\n\t0x976: 0x140e, 0x977: 0x141a, 0x978: 0x1422, 0x979: 0x143a, 0x97a: 0x144e, 0x97b: 0x143e,\n\t0x97c: 0x1456, 0x97d: 0x1452, 0x97e: 0x144a, 0x97f: 0x145a,\n\t// Block 0x26, offset 0x980\n\t0x980: 0x1466, 0x981: 0x14a2, 0x982: 0x14de, 0x983: 0x150e, 0x984: 0x1546, 0x985: 0x1566,\n\t0x986: 0x15b2, 0x987: 0x15d6, 0x988: 0x15f6, 0x989: 0x160a, 0x98a: 0x161a, 0x98b: 0x1626,\n\t0x98c: 0x1632, 0x98d: 0x1686, 0x98e: 0x1726, 0x98f: 0x17e2, 0x990: 0x17dd, 0x991: 0x180f,\n\t0x992: 0x0702, 0x993: 0x072a, 0x994: 0x072e, 0x995: 0x1891, 0x996: 0x18be, 0x997: 0x1936,\n\t0x998: 0x1712, 0x999: 0x1722,\n\t// Block 0x27, offset 0x9c0\n\t0x9c0: 0x07f6, 0x9c1: 0x07ee, 0x9c2: 0x07fe, 0x9c3: 0x1774, 0x9c4: 0x0842, 0x9c5: 0x0852,\n\t0x9c6: 0x0856, 0x9c7: 0x085e, 0x9c8: 0x0866, 0x9c9: 0x086a, 0x9ca: 0x0876, 0x9cb: 0x086e,\n\t0x9cc: 0x06ae, 0x9cd: 0x1788, 0x9ce: 0x088a, 0x9cf: 0x088e, 0x9d0: 0x0892, 0x9d1: 0x08ae,\n\t0x9d2: 0x1779, 0x9d3: 0x06b2, 0x9d4: 0x089a, 0x9d5: 0x08ba, 0x9d6: 0x1783, 0x9d7: 0x08ca,\n\t0x9d8: 0x08d2, 0x9d9: 0x0832, 0x9da: 0x08da, 0x9db: 0x08de, 0x9dc: 0x195e, 0x9dd: 0x08fa,\n\t0x9de: 0x0902, 0x9df: 0x06ba, 0x9e0: 0x091a, 0x9e1: 0x091e, 0x9e2: 0x0926, 0x9e3: 0x092a,\n\t0x9e4: 0x06be, 0x9e5: 0x0942, 0x9e6: 0x0946, 0x9e7: 0x0952, 0x9e8: 0x095e, 0x9e9: 0x0962,\n\t0x9ea: 0x0966, 0x9eb: 0x096e, 0x9ec: 0x098e, 0x9ed: 0x0992, 0x9ee: 0x099a, 0x9ef: 0x09aa,\n\t0x9f0: 0x09b2, 0x9f1: 0x09b6, 0x9f2: 0x09b6, 0x9f3: 0x09b6, 0x9f4: 0x1797, 0x9f5: 0x0f8e,\n\t0x9f6: 0x09ca, 0x9f7: 0x09d2, 0x9f8: 0x179c, 0x9f9: 0x09de, 0x9fa: 0x09e6, 0x9fb: 0x09ee,\n\t0x9fc: 0x0a16, 0x9fd: 0x0a02, 0x9fe: 0x0a0e, 0x9ff: 0x0a12,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x0a1a, 0xa01: 0x0a22, 0xa02: 0x0a26, 0xa03: 0x0a2e, 0xa04: 0x0a36, 0xa05: 0x0a3a,\n\t0xa06: 0x0a3a, 0xa07: 0x0a42, 0xa08: 0x0a4a, 0xa09: 0x0a4e, 0xa0a: 0x0a5a, 0xa0b: 0x0a7e,\n\t0xa0c: 0x0a62, 0xa0d: 0x0a82, 0xa0e: 0x0a66, 0xa0f: 0x0a6e, 0xa10: 0x0906, 0xa11: 0x0aca,\n\t0xa12: 0x0a92, 0xa13: 0x0a96, 0xa14: 0x0a9a, 0xa15: 0x0a8e, 0xa16: 0x0aa2, 0xa17: 0x0a9e,\n\t0xa18: 0x0ab6, 0xa19: 0x17a1, 0xa1a: 0x0ad2, 0xa1b: 0x0ad6, 0xa1c: 0x0ade, 0xa1d: 0x0aea,\n\t0xa1e: 0x0af2, 0xa1f: 0x0b0e, 0xa20: 0x17a6, 0xa21: 0x17ab, 0xa22: 0x0b1a, 0xa23: 0x0b1e,\n\t0xa24: 0x0b22, 0xa25: 0x0b16, 0xa26: 0x0b2a, 0xa27: 0x06c2, 0xa28: 0x06c6, 0xa29: 0x0b32,\n\t0xa2a: 0x0b3a, 0xa2b: 0x0b3a, 0xa2c: 0x17b0, 0xa2d: 0x0b56, 0xa2e: 0x0b5a, 0xa2f: 0x0b5e,\n\t0xa30: 0x0b66, 0xa31: 0x17b5, 0xa32: 0x0b6e, 0xa33: 0x0b72, 0xa34: 0x0c4a, 0xa35: 0x0b7a,\n\t0xa36: 0x06ca, 0xa37: 0x0b86, 0xa38: 0x0b96, 0xa39: 0x0ba2, 0xa3a: 0x0b9e, 0xa3b: 0x17bf,\n\t0xa3c: 0x0baa, 0xa3d: 0x17c4, 0xa3e: 0x0bb6, 0xa3f: 0x0bb2,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x0bba, 0xa41: 0x0bca, 0xa42: 0x0bce, 0xa43: 0x06ce, 0xa44: 0x0bde, 0xa45: 0x0be6,\n\t0xa46: 0x0bea, 0xa47: 0x0bee, 0xa48: 0x06d2, 0xa49: 0x17c9, 0xa4a: 0x06d6, 0xa4b: 0x0c0a,\n\t0xa4c: 0x0c0e, 0xa4d: 0x0c12, 0xa4e: 0x0c1a, 0xa4f: 0x1990, 0xa50: 0x0c32, 0xa51: 0x17d3,\n\t0xa52: 0x17d3, 0xa53: 0x12d2, 0xa54: 0x0c42, 0xa55: 0x0c42, 0xa56: 0x06da, 0xa57: 0x17f6,\n\t0xa58: 0x18c8, 0xa59: 0x0c52, 0xa5a: 0x0c5a, 0xa5b: 0x06de, 0xa5c: 0x0c6e, 0xa5d: 0x0c7e,\n\t0xa5e: 0x0c82, 0xa5f: 0x0c8a, 0xa60: 0x0c9a, 0xa61: 0x06e6, 0xa62: 0x06e2, 0xa63: 0x0c9e,\n\t0xa64: 0x17d8, 0xa65: 0x0ca2, 0xa66: 0x0cb6, 0xa67: 0x0cba, 0xa68: 0x0cbe, 0xa69: 0x0cba,\n\t0xa6a: 0x0cca, 0xa6b: 0x0cce, 0xa6c: 0x0cde, 0xa6d: 0x0cd6, 0xa6e: 0x0cda, 0xa6f: 0x0ce2,\n\t0xa70: 0x0ce6, 0xa71: 0x0cea, 0xa72: 0x0cf6, 0xa73: 0x0cfa, 0xa74: 0x0d12, 0xa75: 0x0d1a,\n\t0xa76: 0x0d2a, 0xa77: 0x0d3e, 0xa78: 0x17e7, 0xa79: 0x0d3a, 0xa7a: 0x0d2e, 0xa7b: 0x0d46,\n\t0xa7c: 0x0d4e, 0xa7d: 0x0d62, 0xa7e: 0x17ec, 0xa7f: 0x0d6a,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0x0d5e, 0xa81: 0x0d56, 0xa82: 0x06ea, 0xa83: 0x0d72, 0xa84: 0x0d7a, 0xa85: 0x0d82,\n\t0xa86: 0x0d76, 0xa87: 0x06ee, 0xa88: 0x0d92, 0xa89: 0x0d9a, 0xa8a: 0x17f1, 0xa8b: 0x0dc6,\n\t0xa8c: 0x0dfa, 0xa8d: 0x0dd6, 0xa8e: 0x06fa, 0xa8f: 0x0de2, 0xa90: 0x06f6, 0xa91: 0x06f2,\n\t0xa92: 0x08be, 0xa93: 0x08c2, 0xa94: 0x0dfe, 0xa95: 0x0de6, 0xa96: 0x12a6, 0xa97: 0x075e,\n\t0xa98: 0x0e0a, 0xa99: 0x0e0e, 0xa9a: 0x0e12, 0xa9b: 0x0e26, 0xa9c: 0x0e1e, 0xa9d: 0x180a,\n\t0xa9e: 0x06fe, 0xa9f: 0x0e3a, 0xaa0: 0x0e2e, 0xaa1: 0x0e4a, 0xaa2: 0x0e52, 0xaa3: 0x1814,\n\t0xaa4: 0x0e56, 0xaa5: 0x0e42, 0xaa6: 0x0e5e, 0xaa7: 0x0702, 0xaa8: 0x0e62, 0xaa9: 0x0e66,\n\t0xaaa: 0x0e6a, 0xaab: 0x0e76, 0xaac: 0x1819, 0xaad: 0x0e7e, 0xaae: 0x0706, 0xaaf: 0x0e8a,\n\t0xab0: 0x181e, 0xab1: 0x0e8e, 0xab2: 0x070a, 0xab3: 0x0e9a, 0xab4: 0x0ea6, 0xab5: 0x0eb2,\n\t0xab6: 0x0eb6, 0xab7: 0x1823, 0xab8: 0x17ba, 0xab9: 0x1828, 0xaba: 0x0ed6, 0xabb: 0x182d,\n\t0xabc: 0x0ee2, 0xabd: 0x0eea, 0xabe: 0x0eda, 0xabf: 0x0ef6,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0x0f06, 0xac1: 0x0f16, 0xac2: 0x0f0a, 0xac3: 0x0f0e, 0xac4: 0x0f1a, 0xac5: 0x0f1e,\n\t0xac6: 0x1832, 0xac7: 0x0f02, 0xac8: 0x0f36, 0xac9: 0x0f3a, 0xaca: 0x070e, 0xacb: 0x0f4e,\n\t0xacc: 0x0f4a, 0xacd: 0x1837, 0xace: 0x0f2e, 0xacf: 0x0f6a, 0xad0: 0x183c, 0xad1: 0x1841,\n\t0xad2: 0x0f6e, 0xad3: 0x0f82, 0xad4: 0x0f7e, 0xad5: 0x0f7a, 0xad6: 0x0712, 0xad7: 0x0f86,\n\t0xad8: 0x0f96, 0xad9: 0x0f92, 0xada: 0x0f9e, 0xadb: 0x177e, 0xadc: 0x0fae, 0xadd: 0x1846,\n\t0xade: 0x0fba, 0xadf: 0x1850, 0xae0: 0x0fce, 0xae1: 0x0fda, 0xae2: 0x0fee, 0xae3: 0x1855,\n\t0xae4: 0x1002, 0xae5: 0x1006, 0xae6: 0x185a, 0xae7: 0x185f, 0xae8: 0x1022, 0xae9: 0x1032,\n\t0xaea: 0x0716, 0xaeb: 0x1036, 0xaec: 0x071a, 0xaed: 0x071a, 0xaee: 0x104e, 0xaef: 0x1052,\n\t0xaf0: 0x105a, 0xaf1: 0x105e, 0xaf2: 0x106a, 0xaf3: 0x071e, 0xaf4: 0x1082, 0xaf5: 0x1864,\n\t0xaf6: 0x109e, 0xaf7: 0x1869, 0xaf8: 0x10aa, 0xaf9: 0x17ce, 0xafa: 0x10ba, 0xafb: 0x186e,\n\t0xafc: 0x1873, 0xafd: 0x1878, 0xafe: 0x0722, 0xaff: 0x0726,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x10f2, 0xb01: 0x1882, 0xb02: 0x187d, 0xb03: 0x1887, 0xb04: 0x188c, 0xb05: 0x10fa,\n\t0xb06: 0x10fe, 0xb07: 0x10fe, 0xb08: 0x1106, 0xb09: 0x072e, 0xb0a: 0x110a, 0xb0b: 0x0732,\n\t0xb0c: 0x0736, 0xb0d: 0x1896, 0xb0e: 0x111e, 0xb0f: 0x1126, 0xb10: 0x1132, 0xb11: 0x073a,\n\t0xb12: 0x189b, 0xb13: 0x1156, 0xb14: 0x18a0, 0xb15: 0x18a5, 0xb16: 0x1176, 0xb17: 0x118e,\n\t0xb18: 0x073e, 0xb19: 0x1196, 0xb1a: 0x119a, 0xb1b: 0x119e, 0xb1c: 0x18aa, 0xb1d: 0x18af,\n\t0xb1e: 0x18af, 0xb1f: 0x11b6, 0xb20: 0x0742, 0xb21: 0x18b4, 0xb22: 0x11ca, 0xb23: 0x11ce,\n\t0xb24: 0x0746, 0xb25: 0x18b9, 0xb26: 0x11ea, 0xb27: 0x074a, 0xb28: 0x11fa, 0xb29: 0x11f2,\n\t0xb2a: 0x1202, 0xb2b: 0x18c3, 0xb2c: 0x121a, 0xb2d: 0x074e, 0xb2e: 0x1226, 0xb2f: 0x122e,\n\t0xb30: 0x123e, 0xb31: 0x0752, 0xb32: 0x18cd, 0xb33: 0x18d2, 0xb34: 0x0756, 0xb35: 0x18d7,\n\t0xb36: 0x1256, 0xb37: 0x18dc, 0xb38: 0x1262, 0xb39: 0x126e, 0xb3a: 0x1276, 0xb3b: 0x18e1,\n\t0xb3c: 0x18e6, 0xb3d: 0x128a, 0xb3e: 0x18eb, 0xb3f: 0x1292,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x17fb, 0xb41: 0x075a, 0xb42: 0x12aa, 0xb43: 0x12ae, 0xb44: 0x0762, 0xb45: 0x12b2,\n\t0xb46: 0x0b2e, 0xb47: 0x18f0, 0xb48: 0x18f5, 0xb49: 0x1800, 0xb4a: 0x1805, 0xb4b: 0x12d2,\n\t0xb4c: 0x12d6, 0xb4d: 0x14ee, 0xb4e: 0x0766, 0xb4f: 0x1302, 0xb50: 0x12fe, 0xb51: 0x1306,\n\t0xb52: 0x093a, 0xb53: 0x130a, 0xb54: 0x130e, 0xb55: 0x1312, 0xb56: 0x131a, 0xb57: 0x18fa,\n\t0xb58: 0x1316, 0xb59: 0x131e, 0xb5a: 0x1332, 0xb5b: 0x1336, 0xb5c: 0x1322, 0xb5d: 0x133a,\n\t0xb5e: 0x134e, 0xb5f: 0x1362, 0xb60: 0x132e, 0xb61: 0x1342, 0xb62: 0x1346, 0xb63: 0x134a,\n\t0xb64: 0x18ff, 0xb65: 0x1909, 0xb66: 0x1904, 0xb67: 0x076a, 0xb68: 0x136a, 0xb69: 0x136e,\n\t0xb6a: 0x1376, 0xb6b: 0x191d, 0xb6c: 0x137a, 0xb6d: 0x190e, 0xb6e: 0x076e, 0xb6f: 0x0772,\n\t0xb70: 0x1913, 0xb71: 0x1918, 0xb72: 0x0776, 0xb73: 0x139a, 0xb74: 0x139e, 0xb75: 0x13a2,\n\t0xb76: 0x13a6, 0xb77: 0x13b2, 0xb78: 0x13ae, 0xb79: 0x13ba, 0xb7a: 0x13b6, 0xb7b: 0x13c6,\n\t0xb7c: 0x13be, 0xb7d: 0x13c2, 0xb7e: 0x13ca, 0xb7f: 0x077a,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x13d2, 0xb81: 0x13d6, 0xb82: 0x077e, 0xb83: 0x13e6, 0xb84: 0x13ea, 0xb85: 0x1922,\n\t0xb86: 0x13f6, 0xb87: 0x13fa, 0xb88: 0x0782, 0xb89: 0x1406, 0xb8a: 0x06b6, 0xb8b: 0x1927,\n\t0xb8c: 0x192c, 0xb8d: 0x0786, 0xb8e: 0x078a, 0xb8f: 0x1432, 0xb90: 0x144a, 0xb91: 0x1466,\n\t0xb92: 0x1476, 0xb93: 0x1931, 0xb94: 0x148a, 0xb95: 0x148e, 0xb96: 0x14a6, 0xb97: 0x14b2,\n\t0xb98: 0x193b, 0xb99: 0x178d, 0xb9a: 0x14be, 0xb9b: 0x14ba, 0xb9c: 0x14c6, 0xb9d: 0x1792,\n\t0xb9e: 0x14d2, 0xb9f: 0x14de, 0xba0: 0x1940, 0xba1: 0x1945, 0xba2: 0x151e, 0xba3: 0x152a,\n\t0xba4: 0x1532, 0xba5: 0x194a, 0xba6: 0x1536, 0xba7: 0x1562, 0xba8: 0x156e, 0xba9: 0x1572,\n\t0xbaa: 0x156a, 0xbab: 0x157e, 0xbac: 0x1582, 0xbad: 0x194f, 0xbae: 0x158e, 0xbaf: 0x078e,\n\t0xbb0: 0x1596, 0xbb1: 0x1954, 0xbb2: 0x0792, 0xbb3: 0x15ce, 0xbb4: 0x0bbe, 0xbb5: 0x15e6,\n\t0xbb6: 0x1959, 0xbb7: 0x1963, 0xbb8: 0x0796, 0xbb9: 0x079a, 0xbba: 0x160e, 0xbbb: 0x1968,\n\t0xbbc: 0x079e, 0xbbd: 0x196d, 0xbbe: 0x1626, 0xbbf: 0x1626,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x162e, 0xbc1: 0x1972, 0xbc2: 0x1646, 0xbc3: 0x07a2, 0xbc4: 0x1656, 0xbc5: 0x1662,\n\t0xbc6: 0x166a, 0xbc7: 0x1672, 0xbc8: 0x07a6, 0xbc9: 0x1977, 0xbca: 0x1686, 0xbcb: 0x16a2,\n\t0xbcc: 0x16ae, 0xbcd: 0x07aa, 0xbce: 0x07ae, 0xbcf: 0x16b2, 0xbd0: 0x197c, 0xbd1: 0x07b2,\n\t0xbd2: 0x1981, 0xbd3: 0x1986, 0xbd4: 0x198b, 0xbd5: 0x16d6, 0xbd6: 0x07b6, 0xbd7: 0x16ea,\n\t0xbd8: 0x16f2, 0xbd9: 0x16f6, 0xbda: 0x16fe, 0xbdb: 0x1706, 0xbdc: 0x170e, 0xbdd: 0x1995,\n}\n\n// nfcIndex: 22 blocks, 1408 entries, 1408 bytes\n// Block 0 is the zero block.\nvar nfcIndex = [1408]uint8{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x2e, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x2f, 0xc7: 0x04,\n\t0xc8: 0x05, 0xca: 0x30, 0xcb: 0x31, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x32,\n\t0xd0: 0x09, 0xd1: 0x33, 0xd2: 0x34, 0xd3: 0x0a, 0xd6: 0x0b, 0xd7: 0x35,\n\t0xd8: 0x36, 0xd9: 0x0c, 0xdb: 0x37, 0xdc: 0x38, 0xdd: 0x39, 0xdf: 0x3a,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,\n\t0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,\n\t0xf0: 0x13,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x3b, 0x121: 0x3c, 0x122: 0x3d, 0x123: 0x0d, 0x124: 0x3e, 0x125: 0x3f, 0x126: 0x40, 0x127: 0x41,\n\t0x128: 0x42, 0x129: 0x43, 0x12a: 0x44, 0x12b: 0x45, 0x12c: 0x40, 0x12d: 0x46, 0x12e: 0x47, 0x12f: 0x48,\n\t0x130: 0x44, 0x131: 0x49, 0x132: 0x4a, 0x133: 0x4b, 0x134: 0x4c, 0x135: 0x4d, 0x137: 0x4e,\n\t0x138: 0x4f, 0x139: 0x50, 0x13a: 0x51, 0x13b: 0x52, 0x13c: 0x53, 0x13d: 0x54, 0x13e: 0x55, 0x13f: 0x56,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x57, 0x142: 0x58, 0x144: 0x59, 0x145: 0x5a, 0x146: 0x5b, 0x147: 0x5c,\n\t0x14d: 0x5d,\n\t0x15c: 0x5e, 0x15f: 0x5f,\n\t0x162: 0x60, 0x164: 0x61,\n\t0x168: 0x62, 0x169: 0x63, 0x16a: 0x64, 0x16b: 0x65, 0x16c: 0x0e, 0x16d: 0x66, 0x16e: 0x67, 0x16f: 0x68,\n\t0x170: 0x69, 0x173: 0x6a, 0x177: 0x0f,\n\t0x178: 0x10, 0x179: 0x11, 0x17a: 0x12, 0x17b: 0x13, 0x17c: 0x14, 0x17d: 0x15, 0x17e: 0x16, 0x17f: 0x17,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x6b, 0x183: 0x6c, 0x184: 0x6d, 0x186: 0x6e, 0x187: 0x6f,\n\t0x188: 0x70, 0x189: 0x18, 0x18a: 0x19, 0x18b: 0x71, 0x18c: 0x72,\n\t0x1ab: 0x73,\n\t0x1b3: 0x74, 0x1b5: 0x75, 0x1b7: 0x76,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x77, 0x1c1: 0x1a, 0x1c2: 0x1b, 0x1c3: 0x1c, 0x1c4: 0x78, 0x1c5: 0x79,\n\t0x1c9: 0x7a, 0x1cc: 0x7b, 0x1cd: 0x7c,\n\t// Block 0x8, offset 0x200\n\t0x219: 0x7d, 0x21a: 0x7e, 0x21b: 0x7f,\n\t0x220: 0x80, 0x223: 0x81, 0x224: 0x82, 0x225: 0x83, 0x226: 0x84, 0x227: 0x85,\n\t0x22a: 0x86, 0x22b: 0x87, 0x22f: 0x88,\n\t0x230: 0x89, 0x231: 0x8a, 0x232: 0x8b, 0x233: 0x8c, 0x234: 0x8d, 0x235: 0x8e, 0x236: 0x8f, 0x237: 0x89,\n\t0x238: 0x8a, 0x239: 0x8b, 0x23a: 0x8c, 0x23b: 0x8d, 0x23c: 0x8e, 0x23d: 0x8f, 0x23e: 0x89, 0x23f: 0x8a,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x8b, 0x241: 0x8c, 0x242: 0x8d, 0x243: 0x8e, 0x244: 0x8f, 0x245: 0x89, 0x246: 0x8a, 0x247: 0x8b,\n\t0x248: 0x8c, 0x249: 0x8d, 0x24a: 0x8e, 0x24b: 0x8f, 0x24c: 0x89, 0x24d: 0x8a, 0x24e: 0x8b, 0x24f: 0x8c,\n\t0x250: 0x8d, 0x251: 0x8e, 0x252: 0x8f, 0x253: 0x89, 0x254: 0x8a, 0x255: 0x8b, 0x256: 0x8c, 0x257: 0x8d,\n\t0x258: 0x8e, 0x259: 0x8f, 0x25a: 0x89, 0x25b: 0x8a, 0x25c: 0x8b, 0x25d: 0x8c, 0x25e: 0x8d, 0x25f: 0x8e,\n\t0x260: 0x8f, 0x261: 0x89, 0x262: 0x8a, 0x263: 0x8b, 0x264: 0x8c, 0x265: 0x8d, 0x266: 0x8e, 0x267: 0x8f,\n\t0x268: 0x89, 0x269: 0x8a, 0x26a: 0x8b, 0x26b: 0x8c, 0x26c: 0x8d, 0x26d: 0x8e, 0x26e: 0x8f, 0x26f: 0x89,\n\t0x270: 0x8a, 0x271: 0x8b, 0x272: 0x8c, 0x273: 0x8d, 0x274: 0x8e, 0x275: 0x8f, 0x276: 0x89, 0x277: 0x8a,\n\t0x278: 0x8b, 0x279: 0x8c, 0x27a: 0x8d, 0x27b: 0x8e, 0x27c: 0x8f, 0x27d: 0x89, 0x27e: 0x8a, 0x27f: 0x8b,\n\t// Block 0xa, offset 0x280\n\t0x280: 0x8c, 0x281: 0x8d, 0x282: 0x8e, 0x283: 0x8f, 0x284: 0x89, 0x285: 0x8a, 0x286: 0x8b, 0x287: 0x8c,\n\t0x288: 0x8d, 0x289: 0x8e, 0x28a: 0x8f, 0x28b: 0x89, 0x28c: 0x8a, 0x28d: 0x8b, 0x28e: 0x8c, 0x28f: 0x8d,\n\t0x290: 0x8e, 0x291: 0x8f, 0x292: 0x89, 0x293: 0x8a, 0x294: 0x8b, 0x295: 0x8c, 0x296: 0x8d, 0x297: 0x8e,\n\t0x298: 0x8f, 0x299: 0x89, 0x29a: 0x8a, 0x29b: 0x8b, 0x29c: 0x8c, 0x29d: 0x8d, 0x29e: 0x8e, 0x29f: 0x8f,\n\t0x2a0: 0x89, 0x2a1: 0x8a, 0x2a2: 0x8b, 0x2a3: 0x8c, 0x2a4: 0x8d, 0x2a5: 0x8e, 0x2a6: 0x8f, 0x2a7: 0x89,\n\t0x2a8: 0x8a, 0x2a9: 0x8b, 0x2aa: 0x8c, 0x2ab: 0x8d, 0x2ac: 0x8e, 0x2ad: 0x8f, 0x2ae: 0x89, 0x2af: 0x8a,\n\t0x2b0: 0x8b, 0x2b1: 0x8c, 0x2b2: 0x8d, 0x2b3: 0x8e, 0x2b4: 0x8f, 0x2b5: 0x89, 0x2b6: 0x8a, 0x2b7: 0x8b,\n\t0x2b8: 0x8c, 0x2b9: 0x8d, 0x2ba: 0x8e, 0x2bb: 0x8f, 0x2bc: 0x89, 0x2bd: 0x8a, 0x2be: 0x8b, 0x2bf: 0x8c,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0x8d, 0x2c1: 0x8e, 0x2c2: 0x8f, 0x2c3: 0x89, 0x2c4: 0x8a, 0x2c5: 0x8b, 0x2c6: 0x8c, 0x2c7: 0x8d,\n\t0x2c8: 0x8e, 0x2c9: 0x8f, 0x2ca: 0x89, 0x2cb: 0x8a, 0x2cc: 0x8b, 0x2cd: 0x8c, 0x2ce: 0x8d, 0x2cf: 0x8e,\n\t0x2d0: 0x8f, 0x2d1: 0x89, 0x2d2: 0x8a, 0x2d3: 0x8b, 0x2d4: 0x8c, 0x2d5: 0x8d, 0x2d6: 0x8e, 0x2d7: 0x8f,\n\t0x2d8: 0x89, 0x2d9: 0x8a, 0x2da: 0x8b, 0x2db: 0x8c, 0x2dc: 0x8d, 0x2dd: 0x8e, 0x2de: 0x90,\n\t// Block 0xc, offset 0x300\n\t0x324: 0x1d, 0x325: 0x1e, 0x326: 0x1f, 0x327: 0x20,\n\t0x328: 0x21, 0x329: 0x22, 0x32a: 0x23, 0x32b: 0x24, 0x32c: 0x91, 0x32d: 0x92, 0x32e: 0x93,\n\t0x331: 0x94, 0x332: 0x95, 0x333: 0x96, 0x334: 0x97,\n\t0x338: 0x98, 0x339: 0x99, 0x33a: 0x9a, 0x33b: 0x9b, 0x33e: 0x9c, 0x33f: 0x9d,\n\t// Block 0xd, offset 0x340\n\t0x347: 0x9e,\n\t0x34b: 0x9f, 0x34d: 0xa0,\n\t0x357: 0xa1,\n\t0x368: 0xa2, 0x36b: 0xa3,\n\t0x374: 0xa4, 0x375: 0xa5,\n\t0x37a: 0xa6, 0x37b: 0xa7, 0x37d: 0xa8, 0x37e: 0xa9,\n\t// Block 0xe, offset 0x380\n\t0x381: 0xaa, 0x382: 0xab, 0x384: 0xac, 0x385: 0x84, 0x387: 0xad,\n\t0x388: 0xae, 0x38b: 0xaf, 0x38c: 0xb0, 0x38d: 0xb1, 0x38e: 0xb2, 0x38f: 0xb3,\n\t0x391: 0xb4, 0x392: 0xb5, 0x393: 0xb6, 0x396: 0xb7, 0x397: 0xb8,\n\t0x398: 0x75, 0x39a: 0xb9, 0x39c: 0xba,\n\t0x3a0: 0xbb, 0x3a4: 0xbc, 0x3a5: 0xbd, 0x3a7: 0xbe,\n\t0x3a8: 0xbf, 0x3a9: 0xc0, 0x3aa: 0xc1,\n\t0x3b0: 0x75, 0x3b5: 0xc2, 0x3b6: 0xc3,\n\t0x3bd: 0xc4,\n\t// Block 0xf, offset 0x3c0\n\t0x3c4: 0xc5,\n\t0x3eb: 0xc6, 0x3ec: 0xc7,\n\t0x3f5: 0xc8,\n\t0x3ff: 0xc9,\n\t// Block 0x10, offset 0x400\n\t0x432: 0xca,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xcb, 0x446: 0xcc, 0x447: 0xcd,\n\t0x449: 0xce,\n\t// Block 0x12, offset 0x480\n\t0x480: 0xcf, 0x482: 0xd0, 0x484: 0xc7,\n\t0x48a: 0xd1, 0x48b: 0xd2,\n\t0x493: 0xd3, 0x497: 0xd4,\n\t0x49b: 0xd5,\n\t0x4a3: 0xd6, 0x4a5: 0xd7,\n\t// Block 0x13, offset 0x4c0\n\t0x4c8: 0xd8,\n\t// Block 0x14, offset 0x500\n\t0x520: 0x25, 0x521: 0x26, 0x522: 0x27, 0x523: 0x28, 0x524: 0x29, 0x525: 0x2a, 0x526: 0x2b, 0x527: 0x2c,\n\t0x528: 0x2d,\n\t// Block 0x15, offset 0x540\n\t0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d,\n\t0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11,\n\t0x56f: 0x12,\n}\n\n// nfcSparseOffset: 171 entries, 342 bytes\nvar nfcSparseOffset = []uint16{0x0, 0x5, 0x9, 0xb, 0xd, 0x18, 0x28, 0x2a, 0x2f, 0x3a, 0x49, 0x56, 0x5e, 0x63, 0x68, 0x6a, 0x6e, 0x76, 0x7d, 0x80, 0x88, 0x8c, 0x90, 0x92, 0x94, 0x9d, 0xa1, 0xa8, 0xad, 0xb0, 0xba, 0xbd, 0xc4, 0xcc, 0xcf, 0xd1, 0xd4, 0xd6, 0xdb, 0xec, 0xf8, 0xfa, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10a, 0x10c, 0x10f, 0x112, 0x114, 0x117, 0x11a, 0x11e, 0x124, 0x130, 0x139, 0x13b, 0x13e, 0x140, 0x14b, 0x14f, 0x15d, 0x160, 0x166, 0x16c, 0x177, 0x17b, 0x17d, 0x17f, 0x181, 0x183, 0x185, 0x18b, 0x18f, 0x191, 0x193, 0x19b, 0x19f, 0x1a2, 0x1a4, 0x1a6, 0x1a9, 0x1ac, 0x1ae, 0x1b0, 0x1b2, 0x1b4, 0x1ba, 0x1bd, 0x1bf, 0x1c6, 0x1cc, 0x1d2, 0x1da, 0x1e0, 0x1e6, 0x1ec, 0x1f0, 0x1fe, 0x207, 0x20a, 0x20d, 0x20f, 0x212, 0x214, 0x218, 0x21d, 0x21f, 0x221, 0x226, 0x22c, 0x22e, 0x230, 0x232, 0x237, 0x23d, 0x240, 0x242, 0x244, 0x246, 0x249, 0x24f, 0x253, 0x257, 0x25f, 0x266, 0x269, 0x26c, 0x26e, 0x271, 0x279, 0x283, 0x28a, 0x28e, 0x295, 0x298, 0x29e, 0x2a0, 0x2a3, 0x2a5, 0x2a8, 0x2ad, 0x2af, 0x2b1, 0x2b3, 0x2b5, 0x2b7, 0x2ba, 0x2bc, 0x2be, 0x2cb, 0x2cd, 0x2cf, 0x2d5, 0x2d7, 0x2d9, 0x2e6, 0x2f0, 0x2f2, 0x2f4, 0x2fa, 0x2fc, 0x2fe, 0x300, 0x304, 0x307, 0x30c, 0x30e, 0x311}\n\n// nfcSparseValues: 787 entries, 3148 bytes\nvar nfcSparseValues = [787]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0xa100, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8100, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8100, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8100, lo: 0xb8, hi: 0xb8},\n\t// Block 0x1, offset 0x5\n\t{value: 0x0091, lo: 0x03},\n\t{value: 0x4859, lo: 0xa0, hi: 0xa1},\n\t{value: 0x488b, lo: 0xaf, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb7, hi: 0xb7},\n\t// Block 0x2, offset 0x9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t// Block 0x3, offset 0xb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x98, hi: 0x9d},\n\t// Block 0x4, offset 0xd\n\t{value: 0x0006, lo: 0x0a},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x85, hi: 0x85},\n\t{value: 0xa000, lo: 0x89, hi: 0x89},\n\t{value: 0x49b7, lo: 0x8a, hi: 0x8a},\n\t{value: 0x49d5, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3626, lo: 0x8c, hi: 0x8c},\n\t{value: 0x363e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x49ed, lo: 0x8e, hi: 0x8e},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x365c, lo: 0x93, hi: 0x94},\n\t// Block 0x5, offset 0x18\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0xa000, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3704, lo: 0x90, hi: 0x90},\n\t{value: 0x3710, lo: 0x91, hi: 0x91},\n\t{value: 0x36fe, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x96, hi: 0x96},\n\t{value: 0x3776, lo: 0x97, hi: 0x97},\n\t{value: 0x3740, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3728, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3752, lo: 0x9e, hi: 0x9e},\n\t{value: 0xa000, lo: 0xb4, hi: 0xb5},\n\t{value: 0x377c, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3782, lo: 0xb7, hi: 0xb7},\n\t// Block 0x6, offset 0x28\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x83, hi: 0x87},\n\t// Block 0x7, offset 0x2a\n\t{value: 0x0001, lo: 0x04},\n\t{value: 0x8114, lo: 0x81, hi: 0x82},\n\t{value: 0x8133, lo: 0x84, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t{value: 0x810e, lo: 0x87, hi: 0x87},\n\t// Block 0x8, offset 0x2f\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x97},\n\t{value: 0x811a, lo: 0x98, hi: 0x98},\n\t{value: 0x811b, lo: 0x99, hi: 0x99},\n\t{value: 0x811c, lo: 0x9a, hi: 0x9a},\n\t{value: 0x37a0, lo: 0xa2, hi: 0xa2},\n\t{value: 0x37a6, lo: 0xa3, hi: 0xa3},\n\t{value: 0x37b2, lo: 0xa4, hi: 0xa4},\n\t{value: 0x37ac, lo: 0xa5, hi: 0xa5},\n\t{value: 0x37b8, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xa7, hi: 0xa7},\n\t// Block 0x9, offset 0x3a\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x37ca, lo: 0x80, hi: 0x80},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0x37be, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x37c4, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x95, hi: 0x95},\n\t{value: 0x8133, lo: 0x96, hi: 0x9c},\n\t{value: 0x8133, lo: 0x9f, hi: 0xa2},\n\t{value: 0x812e, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa8},\n\t{value: 0x812e, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t// Block 0xa, offset 0x49\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x8120, lo: 0x91, hi: 0x91},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x812e, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb6},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb9},\n\t{value: 0x8133, lo: 0xba, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbc},\n\t{value: 0x8133, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbe, hi: 0xbe},\n\t{value: 0x8133, lo: 0xbf, hi: 0xbf},\n\t// Block 0xb, offset 0x56\n\t{value: 0x0005, lo: 0x07},\n\t{value: 0x8133, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x812e, lo: 0x82, hi: 0x83},\n\t{value: 0x812e, lo: 0x84, hi: 0x85},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x812e, lo: 0x88, hi: 0x89},\n\t{value: 0x8133, lo: 0x8a, hi: 0x8a},\n\t// Block 0xc, offset 0x5e\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xab, hi: 0xb1},\n\t{value: 0x812e, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8133, lo: 0xb3, hi: 0xb3},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0xd, offset 0x63\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0x96, hi: 0x99},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa7},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0xe, offset 0x68\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t// Block 0xf, offset 0x6a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0x97, hi: 0x98},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t{value: 0x8133, lo: 0x9c, hi: 0x9f},\n\t// Block 0x10, offset 0x6e\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3e37, lo: 0xa9, hi: 0xa9},\n\t{value: 0xa000, lo: 0xb0, hi: 0xb0},\n\t{value: 0x3e3f, lo: 0xb1, hi: 0xb1},\n\t{value: 0xa000, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3e47, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9903, lo: 0xbc, hi: 0xbc},\n\t// Block 0x11, offset 0x76\n\t{value: 0x0008, lo: 0x06},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x91, hi: 0x91},\n\t{value: 0x812e, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x93, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x94},\n\t{value: 0x461b, lo: 0x98, hi: 0x9f},\n\t// Block 0x12, offset 0x7d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x13, offset 0x80\n\t{value: 0x0008, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e4f, lo: 0x8b, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x465b, lo: 0x9c, hi: 0x9d},\n\t{value: 0x466b, lo: 0x9f, hi: 0x9f},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbe},\n\t// Block 0x14, offset 0x88\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x4693, lo: 0xb3, hi: 0xb3},\n\t{value: 0x469b, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x15, offset 0x8c\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x4673, lo: 0x99, hi: 0x9b},\n\t{value: 0x468b, lo: 0x9e, hi: 0x9e},\n\t// Block 0x16, offset 0x90\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x17, offset 0x92\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t// Block 0x18, offset 0x94\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e67, lo: 0x88, hi: 0x88},\n\t{value: 0x3e5f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e6f, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x96, hi: 0x97},\n\t{value: 0x46a3, lo: 0x9c, hi: 0x9c},\n\t{value: 0x46ab, lo: 0x9d, hi: 0x9d},\n\t// Block 0x19, offset 0x9d\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x3e77, lo: 0x94, hi: 0x94},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1a, offset 0xa1\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3e7f, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3e8f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e87, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1b, offset 0xa8\n\t{value: 0x1801, lo: 0x04},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3e97, lo: 0x88, hi: 0x88},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8121, lo: 0x95, hi: 0x96},\n\t// Block 0x1c, offset 0xad\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa000, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1d, offset 0xb0\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3e9f, lo: 0x80, hi: 0x80},\n\t{value: 0x9900, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3ea7, lo: 0x87, hi: 0x87},\n\t{value: 0x3eaf, lo: 0x88, hi: 0x88},\n\t{value: 0x4b25, lo: 0x8a, hi: 0x8a},\n\t{value: 0x4331, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x95, hi: 0x96},\n\t// Block 0x1e, offset 0xba\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1f, offset 0xbd\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3eb7, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3ec7, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3ebf, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x20, offset 0xc4\n\t{value: 0x5a29, lo: 0x07},\n\t{value: 0x9905, lo: 0x8a, hi: 0x8a},\n\t{value: 0x9900, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x3ecf, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4b2d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x433c, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3ed7, lo: 0x9e, hi: 0x9f},\n\t// Block 0x21, offset 0xcc\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8123, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x22, offset 0xcf\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8124, lo: 0x88, hi: 0x8b},\n\t// Block 0x23, offset 0xd1\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8125, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x24, offset 0xd4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8126, lo: 0x88, hi: 0x8b},\n\t// Block 0x25, offset 0xd6\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x812e, lo: 0x98, hi: 0x99},\n\t{value: 0x812e, lo: 0xb5, hi: 0xb5},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb7},\n\t{value: 0x812c, lo: 0xb9, hi: 0xb9},\n\t// Block 0x26, offset 0xdb\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x2774, lo: 0x83, hi: 0x83},\n\t{value: 0x277b, lo: 0x8d, hi: 0x8d},\n\t{value: 0x2782, lo: 0x92, hi: 0x92},\n\t{value: 0x2789, lo: 0x97, hi: 0x97},\n\t{value: 0x2790, lo: 0x9c, hi: 0x9c},\n\t{value: 0x276d, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8127, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8128, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4ca5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8129, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4cae, lo: 0xb5, hi: 0xb5},\n\t{value: 0x46b3, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8200, lo: 0xb7, hi: 0xb7},\n\t{value: 0x46bb, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8200, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8128, lo: 0xba, hi: 0xbd},\n\t// Block 0x27, offset 0xec\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x8128, lo: 0x80, hi: 0x80},\n\t{value: 0x4cb7, lo: 0x81, hi: 0x81},\n\t{value: 0x8133, lo: 0x82, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0x86, hi: 0x87},\n\t{value: 0x279e, lo: 0x93, hi: 0x93},\n\t{value: 0x27a5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x27ac, lo: 0xa2, hi: 0xa2},\n\t{value: 0x27b3, lo: 0xa7, hi: 0xa7},\n\t{value: 0x27ba, lo: 0xac, hi: 0xac},\n\t{value: 0x2797, lo: 0xb9, hi: 0xb9},\n\t// Block 0x28, offset 0xf8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x86, hi: 0x86},\n\t// Block 0x29, offset 0xfa\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3edf, lo: 0xa6, hi: 0xa6},\n\t{value: 0x9900, lo: 0xae, hi: 0xae},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x2a, offset 0x100\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t// Block 0x2b, offset 0x102\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x80, hi: 0x92},\n\t// Block 0x2c, offset 0x104\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xb900, lo: 0xa1, hi: 0xb5},\n\t// Block 0x2d, offset 0x106\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0xa8, hi: 0xbf},\n\t// Block 0x2e, offset 0x108\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0x80, hi: 0x82},\n\t// Block 0x2f, offset 0x10a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9f},\n\t// Block 0x30, offset 0x10c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x94, hi: 0x95},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x31, offset 0x10f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9d},\n\t// Block 0x32, offset 0x112\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8132, lo: 0xa9, hi: 0xa9},\n\t// Block 0x33, offset 0x114\n\t{value: 0x0004, lo: 0x02},\n\t{value: 0x812f, lo: 0xb9, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbb},\n\t// Block 0x34, offset 0x117\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x97, hi: 0x97},\n\t{value: 0x812e, lo: 0x98, hi: 0x98},\n\t// Block 0x35, offset 0x11a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8133, lo: 0xb5, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x36, offset 0x11e\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t{value: 0x812e, lo: 0xb5, hi: 0xba},\n\t{value: 0x8133, lo: 0xbb, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x37, offset 0x124\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x812e, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x8133, lo: 0x8b, hi: 0x9c},\n\t{value: 0x812e, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xaa},\n\t{value: 0x8136, lo: 0xab, hi: 0xab},\n\t// Block 0x38, offset 0x130\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3f27, lo: 0x80, hi: 0x80},\n\t{value: 0x3f2f, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x3f37, lo: 0x83, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xab, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xac},\n\t{value: 0x8133, lo: 0xad, hi: 0xb3},\n\t// Block 0x39, offset 0x139\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xaa, hi: 0xab},\n\t// Block 0x3a, offset 0x13b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8105, lo: 0xb2, hi: 0xb3},\n\t// Block 0x3b, offset 0x13e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x3c, offset 0x140\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x92},\n\t{value: 0x8101, lo: 0x94, hi: 0x94},\n\t{value: 0x812e, lo: 0x95, hi: 0x99},\n\t{value: 0x8133, lo: 0x9a, hi: 0x9b},\n\t{value: 0x812e, lo: 0x9c, hi: 0x9f},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8101, lo: 0xa2, hi: 0xa8},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t{value: 0x8133, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb9},\n\t// Block 0x3d, offset 0x14b\n\t{value: 0x0004, lo: 0x03},\n\t{value: 0x052a, lo: 0x80, hi: 0x81},\n\t{value: 0x8100, lo: 0x97, hi: 0x97},\n\t{value: 0x8100, lo: 0xbe, hi: 0xbe},\n\t// Block 0x3e, offset 0x14f\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x8133, lo: 0x90, hi: 0x91},\n\t{value: 0x8101, lo: 0x92, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x97},\n\t{value: 0x8101, lo: 0x98, hi: 0x9a},\n\t{value: 0x8133, lo: 0x9b, hi: 0x9c},\n\t{value: 0x8133, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8101, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa7},\n\t{value: 0x812e, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8133, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8101, lo: 0xaa, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t// Block 0x3f, offset 0x15d\n\t{value: 0x437a, lo: 0x02},\n\t{value: 0x023c, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0057, lo: 0xaa, hi: 0xab},\n\t// Block 0x40, offset 0x160\n\t{value: 0x0007, lo: 0x05},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t{value: 0x3b18, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3b26, lo: 0xae, hi: 0xae},\n\t// Block 0x41, offset 0x166\n\t{value: 0x000e, lo: 0x05},\n\t{value: 0x3b2d, lo: 0x8d, hi: 0x8e},\n\t{value: 0x3b34, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t// Block 0x42, offset 0x16c\n\t{value: 0x64a9, lo: 0x0a},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0x3b42, lo: 0x84, hi: 0x84},\n\t{value: 0xa000, lo: 0x88, hi: 0x88},\n\t{value: 0x3b49, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3b50, lo: 0x8c, hi: 0x8c},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3b57, lo: 0xa4, hi: 0xa5},\n\t{value: 0x3b5e, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xbc, hi: 0xbc},\n\t// Block 0x43, offset 0x177\n\t{value: 0x0007, lo: 0x03},\n\t{value: 0x3bc7, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3bf1, lo: 0xa2, hi: 0xa3},\n\t{value: 0x3c1b, lo: 0xaa, hi: 0xad},\n\t// Block 0x44, offset 0x17b\n\t{value: 0x0004, lo: 0x01},\n\t{value: 0x0586, lo: 0xa9, hi: 0xaa},\n\t// Block 0x45, offset 0x17d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x45dc, lo: 0x9c, hi: 0x9c},\n\t// Block 0x46, offset 0x17f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xaf, hi: 0xb1},\n\t// Block 0x47, offset 0x181\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x48, offset 0x183\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa0, hi: 0xbf},\n\t// Block 0x49, offset 0x185\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812d, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8132, lo: 0xab, hi: 0xab},\n\t{value: 0x8134, lo: 0xac, hi: 0xac},\n\t{value: 0x812f, lo: 0xad, hi: 0xad},\n\t{value: 0x8130, lo: 0xae, hi: 0xaf},\n\t// Block 0x4a, offset 0x18b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x4cc0, lo: 0xb3, hi: 0xb3},\n\t{value: 0x4cc0, lo: 0xb5, hi: 0xb6},\n\t{value: 0x4cc0, lo: 0xba, hi: 0xbf},\n\t// Block 0x4b, offset 0x18f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x4cc0, lo: 0x8f, hi: 0xa3},\n\t// Block 0x4c, offset 0x191\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xae, hi: 0xbe},\n\t// Block 0x4d, offset 0x193\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0x8100, lo: 0x84, hi: 0x84},\n\t{value: 0x8100, lo: 0x87, hi: 0x87},\n\t{value: 0x8100, lo: 0x90, hi: 0x90},\n\t{value: 0x8100, lo: 0x9e, hi: 0x9e},\n\t{value: 0x8100, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8100, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8100, lo: 0xbb, hi: 0xbb},\n\t// Block 0x4e, offset 0x19b\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8100, lo: 0x80, hi: 0x80},\n\t{value: 0x8100, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8100, lo: 0x8e, hi: 0x8e},\n\t// Block 0x4f, offset 0x19f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb4, hi: 0xbd},\n\t// Block 0x50, offset 0x1a2\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9f},\n\t// Block 0x51, offset 0x1a4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb1},\n\t// Block 0x52, offset 0x1a6\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xac, hi: 0xac},\n\t// Block 0x53, offset 0x1a9\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xa0, hi: 0xb1},\n\t// Block 0x54, offset 0x1ac\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xab, hi: 0xad},\n\t// Block 0x55, offset 0x1ae\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x93, hi: 0x93},\n\t// Block 0x56, offset 0x1b0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb3, hi: 0xb3},\n\t// Block 0x57, offset 0x1b2\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t// Block 0x58, offset 0x1b4\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb7, hi: 0xb8},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbf},\n\t// Block 0x59, offset 0x1ba\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t// Block 0x5a, offset 0x1bd\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xad, hi: 0xad},\n\t// Block 0x5b, offset 0x1bf\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe500, lo: 0x80, hi: 0x80},\n\t{value: 0xc600, lo: 0x81, hi: 0x9b},\n\t{value: 0xe500, lo: 0x9c, hi: 0x9c},\n\t{value: 0xc600, lo: 0x9d, hi: 0xb7},\n\t{value: 0xe500, lo: 0xb8, hi: 0xb8},\n\t{value: 0xc600, lo: 0xb9, hi: 0xbf},\n\t// Block 0x5c, offset 0x1c6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x93},\n\t{value: 0xe500, lo: 0x94, hi: 0x94},\n\t{value: 0xc600, lo: 0x95, hi: 0xaf},\n\t{value: 0xe500, lo: 0xb0, hi: 0xb0},\n\t{value: 0xc600, lo: 0xb1, hi: 0xbf},\n\t// Block 0x5d, offset 0x1cc\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8b},\n\t{value: 0xe500, lo: 0x8c, hi: 0x8c},\n\t{value: 0xc600, lo: 0x8d, hi: 0xa7},\n\t{value: 0xe500, lo: 0xa8, hi: 0xa8},\n\t{value: 0xc600, lo: 0xa9, hi: 0xbf},\n\t// Block 0x5e, offset 0x1d2\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xc600, lo: 0x80, hi: 0x83},\n\t{value: 0xe500, lo: 0x84, hi: 0x84},\n\t{value: 0xc600, lo: 0x85, hi: 0x9f},\n\t{value: 0xe500, lo: 0xa0, hi: 0xa0},\n\t{value: 0xc600, lo: 0xa1, hi: 0xbb},\n\t{value: 0xe500, lo: 0xbc, hi: 0xbc},\n\t{value: 0xc600, lo: 0xbd, hi: 0xbf},\n\t// Block 0x5f, offset 0x1da\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x97},\n\t{value: 0xe500, lo: 0x98, hi: 0x98},\n\t{value: 0xc600, lo: 0x99, hi: 0xb3},\n\t{value: 0xe500, lo: 0xb4, hi: 0xb4},\n\t{value: 0xc600, lo: 0xb5, hi: 0xbf},\n\t// Block 0x60, offset 0x1e0\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8f},\n\t{value: 0xe500, lo: 0x90, hi: 0x90},\n\t{value: 0xc600, lo: 0x91, hi: 0xab},\n\t{value: 0xe500, lo: 0xac, hi: 0xac},\n\t{value: 0xc600, lo: 0xad, hi: 0xbf},\n\t// Block 0x61, offset 0x1e6\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t{value: 0xe500, lo: 0xa4, hi: 0xa4},\n\t{value: 0xc600, lo: 0xa5, hi: 0xbf},\n\t// Block 0x62, offset 0x1ec\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t// Block 0x63, offset 0x1f0\n\t{value: 0x0006, lo: 0x0d},\n\t{value: 0x448f, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8116, lo: 0x9e, hi: 0x9e},\n\t{value: 0x4501, lo: 0x9f, hi: 0x9f},\n\t{value: 0x44ef, lo: 0xaa, hi: 0xab},\n\t{value: 0x45f3, lo: 0xac, hi: 0xac},\n\t{value: 0x45fb, lo: 0xad, hi: 0xad},\n\t{value: 0x4447, lo: 0xae, hi: 0xb1},\n\t{value: 0x4465, lo: 0xb2, hi: 0xb4},\n\t{value: 0x447d, lo: 0xb5, hi: 0xb6},\n\t{value: 0x4489, lo: 0xb8, hi: 0xb8},\n\t{value: 0x4495, lo: 0xb9, hi: 0xbb},\n\t{value: 0x44ad, lo: 0xbc, hi: 0xbc},\n\t{value: 0x44b3, lo: 0xbe, hi: 0xbe},\n\t// Block 0x64, offset 0x1fe\n\t{value: 0x0006, lo: 0x08},\n\t{value: 0x44b9, lo: 0x80, hi: 0x81},\n\t{value: 0x44c5, lo: 0x83, hi: 0x84},\n\t{value: 0x44d7, lo: 0x86, hi: 0x89},\n\t{value: 0x44fb, lo: 0x8a, hi: 0x8a},\n\t{value: 0x4477, lo: 0x8b, hi: 0x8b},\n\t{value: 0x445f, lo: 0x8c, hi: 0x8c},\n\t{value: 0x44a7, lo: 0x8d, hi: 0x8d},\n\t{value: 0x44d1, lo: 0x8e, hi: 0x8e},\n\t// Block 0x65, offset 0x207\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0xa4, hi: 0xa5},\n\t{value: 0x8100, lo: 0xb0, hi: 0xb1},\n\t// Block 0x66, offset 0x20a\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0x9b, hi: 0x9d},\n\t{value: 0x8200, lo: 0x9e, hi: 0xa3},\n\t// Block 0x67, offset 0x20d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x90, hi: 0x90},\n\t// Block 0x68, offset 0x20f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8100, lo: 0x99, hi: 0x99},\n\t{value: 0x8200, lo: 0xb2, hi: 0xb4},\n\t// Block 0x69, offset 0x212\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xbc, hi: 0xbd},\n\t// Block 0x6a, offset 0x214\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa6},\n\t{value: 0x812e, lo: 0xa7, hi: 0xad},\n\t{value: 0x8133, lo: 0xae, hi: 0xaf},\n\t// Block 0x6b, offset 0x218\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8100, lo: 0x89, hi: 0x8c},\n\t{value: 0x8100, lo: 0xb0, hi: 0xb2},\n\t{value: 0x8100, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8100, lo: 0xb6, hi: 0xbf},\n\t// Block 0x6c, offset 0x21d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x81, hi: 0x8c},\n\t// Block 0x6d, offset 0x21f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0xb5, hi: 0xba},\n\t// Block 0x6e, offset 0x221\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x4cc0, lo: 0x9e, hi: 0x9f},\n\t{value: 0x4cc0, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4cc0, lo: 0xa5, hi: 0xa6},\n\t{value: 0x4cc0, lo: 0xaa, hi: 0xaf},\n\t// Block 0x6f, offset 0x226\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x4cc0, lo: 0x82, hi: 0x87},\n\t{value: 0x4cc0, lo: 0x8a, hi: 0x8f},\n\t{value: 0x4cc0, lo: 0x92, hi: 0x97},\n\t{value: 0x4cc0, lo: 0x9a, hi: 0x9c},\n\t{value: 0x8100, lo: 0xa3, hi: 0xa3},\n\t// Block 0x70, offset 0x22c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0x71, offset 0x22e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xa0, hi: 0xa0},\n\t// Block 0x72, offset 0x230\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb6, hi: 0xba},\n\t// Block 0x73, offset 0x232\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x410f, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4117, lo: 0xa4, hi: 0xa4},\n\t// Block 0x74, offset 0x237\n\t{value: 0x002d, lo: 0x05},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8101, lo: 0xb9, hi: 0xba},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x75, offset 0x23d\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t// Block 0x76, offset 0x240\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa7},\n\t// Block 0x77, offset 0x242\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0x78, offset 0x244\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t// Block 0x79, offset 0x246\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x812e, lo: 0xba, hi: 0xbb},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbf},\n\t// Block 0x7a, offset 0x249\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x8133, lo: 0x88, hi: 0x8a},\n\t{value: 0x812e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8133, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x8d, hi: 0x90},\n\t// Block 0x7b, offset 0x24f\n\t{value: 0x0005, lo: 0x03},\n\t{value: 0x8133, lo: 0x82, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t// Block 0x7c, offset 0x253\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x7d, offset 0x257\n\t{value: 0x17fe, lo: 0x07},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x4287, lo: 0x9a, hi: 0x9a},\n\t{value: 0xa000, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4291, lo: 0x9c, hi: 0x9c},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x429b, lo: 0xab, hi: 0xab},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x7e, offset 0x25f\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x8133, lo: 0x80, hi: 0x82},\n\t{value: 0x9900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x42a5, lo: 0xae, hi: 0xae},\n\t{value: 0x42af, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb1, hi: 0xb2},\n\t{value: 0x8105, lo: 0xb3, hi: 0xb4},\n\t// Block 0x7f, offset 0x266\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0x80, offset 0x269\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb5, hi: 0xb5},\n\t{value: 0x8103, lo: 0xb6, hi: 0xb6},\n\t// Block 0x81, offset 0x26c\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x8103, lo: 0xa9, hi: 0xaa},\n\t// Block 0x82, offset 0x26e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x83, offset 0x271\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x42b9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42c3, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x8133, lo: 0xa6, hi: 0xac},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t// Block 0x84, offset 0x279\n\t{value: 0x5d33, lo: 0x09},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x42cd, lo: 0x83, hi: 0x84},\n\t{value: 0x42d7, lo: 0x85, hi: 0x85},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42e1, lo: 0x8e, hi: 0x8e},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0x42eb, lo: 0x91, hi: 0x91},\n\t{value: 0x9900, lo: 0xb8, hi: 0xb8},\n\t{value: 0x9900, lo: 0xbb, hi: 0xbb},\n\t// Block 0x85, offset 0x283\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xb900, lo: 0x82, hi: 0x82},\n\t{value: 0x4c14, lo: 0x85, hi: 0x85},\n\t{value: 0x4c09, lo: 0x87, hi: 0x87},\n\t{value: 0x4c1f, lo: 0x88, hi: 0x88},\n\t{value: 0x9900, lo: 0x89, hi: 0x89},\n\t{value: 0x8105, lo: 0x8e, hi: 0x90},\n\t// Block 0x86, offset 0x28a\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x86, hi: 0x86},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9e},\n\t// Block 0x87, offset 0x28e\n\t{value: 0x560b, lo: 0x06},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb9, hi: 0xb9},\n\t{value: 0x9900, lo: 0xba, hi: 0xba},\n\t{value: 0x42ff, lo: 0xbb, hi: 0xbb},\n\t{value: 0x42f5, lo: 0xbc, hi: 0xbd},\n\t{value: 0x4309, lo: 0xbe, hi: 0xbe},\n\t// Block 0x88, offset 0x295\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x89, offset 0x298\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x9900, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb8, hi: 0xb9},\n\t{value: 0x4313, lo: 0xba, hi: 0xba},\n\t{value: 0x431d, lo: 0xbb, hi: 0xbb},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x8a, offset 0x29e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x80, hi: 0x80},\n\t// Block 0x8b, offset 0x2a0\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x8c, offset 0x2a3\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xab, hi: 0xab},\n\t// Block 0x8d, offset 0x2a5\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8103, lo: 0xba, hi: 0xba},\n\t// Block 0x8e, offset 0x2a8\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb5, hi: 0xb5},\n\t{value: 0x4327, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8105, lo: 0xbd, hi: 0xbe},\n\t// Block 0x8f, offset 0x2ad\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x90, offset 0x2af\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t// Block 0x91, offset 0x2b1\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x92, offset 0x2b3\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x87, hi: 0x87},\n\t// Block 0x93, offset 0x2b5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x99, hi: 0x99},\n\t// Block 0x94, offset 0x2b7\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0x82, hi: 0x82},\n\t{value: 0x8105, lo: 0x84, hi: 0x85},\n\t// Block 0x95, offset 0x2ba\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x97, hi: 0x97},\n\t// Block 0x96, offset 0x2bc\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x81, hi: 0x82},\n\t// Block 0x97, offset 0x2be\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0xb900, lo: 0x9e, hi: 0x9e},\n\t{value: 0x9900, lo: 0x9f, hi: 0xa0},\n\t{value: 0x4c83, lo: 0xa1, hi: 0xa1},\n\t{value: 0x4c8e, lo: 0xa2, hi: 0xa2},\n\t{value: 0x4c2a, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4c40, lo: 0xa4, hi: 0xa4},\n\t{value: 0x4c35, lo: 0xa5, hi: 0xa5},\n\t{value: 0x4c56, lo: 0xa6, hi: 0xa6},\n\t{value: 0x4c74, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4c65, lo: 0xa8, hi: 0xa8},\n\t{value: 0xb900, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8105, lo: 0xaf, hi: 0xaf},\n\t// Block 0x98, offset 0x2cb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0xb0, hi: 0xb4},\n\t// Block 0x99, offset 0x2cd\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb6},\n\t// Block 0x9a, offset 0x2cf\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4c4b, lo: 0xa8, hi: 0xa8},\n\t{value: 0x4b35, lo: 0xa9, hi: 0xa9},\n\t{value: 0x4347, lo: 0xaa, hi: 0xaa},\n\t// Block 0x9b, offset 0x2d5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8102, lo: 0xb0, hi: 0xb1},\n\t// Block 0x9c, offset 0x2d7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0x9e, hi: 0x9e},\n\t// Block 0x9d, offset 0x2d9\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x4743, lo: 0x9e, hi: 0x9e},\n\t{value: 0x474d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x4781, lo: 0xa0, hi: 0xa0},\n\t{value: 0x478f, lo: 0xa1, hi: 0xa1},\n\t{value: 0x479d, lo: 0xa2, hi: 0xa2},\n\t{value: 0x47ab, lo: 0xa3, hi: 0xa3},\n\t{value: 0x47b9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x812c, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8101, lo: 0xa7, hi: 0xa9},\n\t{value: 0x8131, lo: 0xad, hi: 0xad},\n\t{value: 0x812c, lo: 0xae, hi: 0xb2},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9e, offset 0x2e6\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x812e, lo: 0x80, hi: 0x82},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8b},\n\t{value: 0x8133, lo: 0xaa, hi: 0xad},\n\t{value: 0x4757, lo: 0xbb, hi: 0xbb},\n\t{value: 0x4761, lo: 0xbc, hi: 0xbc},\n\t{value: 0x47c7, lo: 0xbd, hi: 0xbd},\n\t{value: 0x47e3, lo: 0xbe, hi: 0xbe},\n\t{value: 0x47d5, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9f, offset 0x2f0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x47f1, lo: 0x80, hi: 0x80},\n\t// Block 0xa0, offset 0x2f2\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x82, hi: 0x84},\n\t// Block 0xa1, offset 0x2f4\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0x80, hi: 0x86},\n\t{value: 0x8133, lo: 0x88, hi: 0x98},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa1},\n\t{value: 0x8133, lo: 0xa3, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa6, hi: 0xaa},\n\t// Block 0xa2, offset 0x2fa\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t// Block 0xa3, offset 0x2fc\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t// Block 0xa4, offset 0x2fe\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xac, hi: 0xaf},\n\t// Block 0xa5, offset 0x300\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8134, lo: 0xac, hi: 0xad},\n\t{value: 0x812e, lo: 0xae, hi: 0xae},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t// Block 0xa6, offset 0x304\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t{value: 0x812e, lo: 0xaf, hi: 0xaf},\n\t// Block 0xa7, offset 0x307\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8133, lo: 0xae, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb5},\n\t// Block 0xa8, offset 0x30c\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x90, hi: 0x96},\n\t// Block 0xa9, offset 0x30e\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x84, hi: 0x89},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0xaa, offset 0x311\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8100, lo: 0x93, hi: 0x93},\n}\n\n// lookup returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfkcTrie) lookup(s []byte) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfkcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfkcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfkcTrie) lookupUnsafe(s []byte) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfkcValues[c0]\n\t}\n\ti := nfkcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// lookupString returns the trie value for the first UTF-8 encoding in s and\n// the width in bytes of this encoding. The size will be 0 if s does not\n// hold enough bytes to complete the encoding. len(s) must be greater than 0.\nfunc (t *nfkcTrie) lookupString(s string) (v uint16, sz int) {\n\tc0 := s[0]\n\tswitch {\n\tcase c0 < 0x80: // is ASCII\n\t\treturn nfkcValues[c0], 1\n\tcase c0 < 0xC2:\n\t\treturn 0, 1 // Illegal UTF-8: not a starter, not ASCII.\n\tcase c0 < 0xE0: // 2-byte UTF-8\n\t\tif len(s) < 2 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c1), 2\n\tcase c0 < 0xF0: // 3-byte UTF-8\n\t\tif len(s) < 3 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c2), 3\n\tcase c0 < 0xF8: // 4-byte UTF-8\n\t\tif len(s) < 4 {\n\t\t\treturn 0, 0\n\t\t}\n\t\ti := nfkcIndex[c0]\n\t\tc1 := s[1]\n\t\tif c1 < 0x80 || 0xC0 <= c1 {\n\t\t\treturn 0, 1 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to := uint32(i)<<6 + uint32(c1)\n\t\ti = nfkcIndex[o]\n\t\tc2 := s[2]\n\t\tif c2 < 0x80 || 0xC0 <= c2 {\n\t\t\treturn 0, 2 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\to = uint32(i)<<6 + uint32(c2)\n\t\ti = nfkcIndex[o]\n\t\tc3 := s[3]\n\t\tif c3 < 0x80 || 0xC0 <= c3 {\n\t\t\treturn 0, 3 // Illegal UTF-8: not a continuation byte.\n\t\t}\n\t\treturn t.lookupValue(uint32(i), c3), 4\n\t}\n\t// Illegal rune\n\treturn 0, 1\n}\n\n// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.\n// s must start with a full and valid UTF-8 encoded rune.\nfunc (t *nfkcTrie) lookupStringUnsafe(s string) uint16 {\n\tc0 := s[0]\n\tif c0 < 0x80 { // is ASCII\n\t\treturn nfkcValues[c0]\n\t}\n\ti := nfkcIndex[c0]\n\tif c0 < 0xE0 { // 2-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[1])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[1])]\n\tif c0 < 0xF0 { // 3-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[2])\n\t}\n\ti = nfkcIndex[uint32(i)<<6+uint32(s[2])]\n\tif c0 < 0xF8 { // 4-byte UTF-8\n\t\treturn t.lookupValue(uint32(i), s[3])\n\t}\n\treturn 0\n}\n\n// nfkcTrie. Total size: 19650 bytes (19.19 KiB). Checksum: 29892d851eed0531.\ntype nfkcTrie struct{}\n\nfunc newNfkcTrie(i int) *nfkcTrie {\n\treturn &nfkcTrie{}\n}\n\n// lookupValue determines the type of block n and looks up the value for b.\nfunc (t *nfkcTrie) lookupValue(n uint32, b byte) uint16 {\n\tswitch {\n\tcase n < 95:\n\t\treturn uint16(nfkcValues[n<<6+uint32(b)])\n\tdefault:\n\t\tn -= 95\n\t\treturn uint16(nfkcSparse.lookup(n, b))\n\t}\n}\n\n// nfkcValues: 97 blocks, 6208 entries, 12416 bytes\n// The third block is the zero block.\nvar nfkcValues = [6208]uint16{\n\t// Block 0x0, offset 0x0\n\t0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000,\n\t// Block 0x1, offset 0x40\n\t0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000,\n\t0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000,\n\t0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000,\n\t0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000,\n\t0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000,\n\t0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000,\n\t0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000,\n\t0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000,\n\t0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000,\n\t0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000,\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc0: 0x2ece, 0xc1: 0x2ed3, 0xc2: 0x47ff, 0xc3: 0x2ed8, 0xc4: 0x480e, 0xc5: 0x4813,\n\t0xc6: 0xa000, 0xc7: 0x481d, 0xc8: 0x2f41, 0xc9: 0x2f46, 0xca: 0x4822, 0xcb: 0x2f5a,\n\t0xcc: 0x2fcd, 0xcd: 0x2fd2, 0xce: 0x2fd7, 0xcf: 0x4836, 0xd1: 0x3063,\n\t0xd2: 0x3086, 0xd3: 0x308b, 0xd4: 0x4840, 0xd5: 0x4845, 0xd6: 0x4854,\n\t0xd8: 0xa000, 0xd9: 0x3112, 0xda: 0x3117, 0xdb: 0x311c, 0xdc: 0x4886, 0xdd: 0x3194,\n\t0xe0: 0x31da, 0xe1: 0x31df, 0xe2: 0x4890, 0xe3: 0x31e4,\n\t0xe4: 0x489f, 0xe5: 0x48a4, 0xe6: 0xa000, 0xe7: 0x48ae, 0xe8: 0x324d, 0xe9: 0x3252,\n\t0xea: 0x48b3, 0xeb: 0x3266, 0xec: 0x32de, 0xed: 0x32e3, 0xee: 0x32e8, 0xef: 0x48c7,\n\t0xf1: 0x3374, 0xf2: 0x3397, 0xf3: 0x339c, 0xf4: 0x48d1, 0xf5: 0x48d6,\n\t0xf6: 0x48e5, 0xf8: 0xa000, 0xf9: 0x3428, 0xfa: 0x342d, 0xfb: 0x3432,\n\t0xfc: 0x4917, 0xfd: 0x34af, 0xff: 0x34c8,\n\t// Block 0x4, offset 0x100\n\t0x100: 0x2edd, 0x101: 0x31e9, 0x102: 0x4804, 0x103: 0x4895, 0x104: 0x2efb, 0x105: 0x3207,\n\t0x106: 0x2f0f, 0x107: 0x321b, 0x108: 0x2f14, 0x109: 0x3220, 0x10a: 0x2f19, 0x10b: 0x3225,\n\t0x10c: 0x2f1e, 0x10d: 0x322a, 0x10e: 0x2f28, 0x10f: 0x3234,\n\t0x112: 0x4827, 0x113: 0x48b8, 0x114: 0x2f50, 0x115: 0x325c, 0x116: 0x2f55, 0x117: 0x3261,\n\t0x118: 0x2f73, 0x119: 0x327f, 0x11a: 0x2f64, 0x11b: 0x3270, 0x11c: 0x2f8c, 0x11d: 0x3298,\n\t0x11e: 0x2f96, 0x11f: 0x32a2, 0x120: 0x2f9b, 0x121: 0x32a7, 0x122: 0x2fa5, 0x123: 0x32b1,\n\t0x124: 0x2faa, 0x125: 0x32b6, 0x128: 0x2fdc, 0x129: 0x32ed,\n\t0x12a: 0x2fe1, 0x12b: 0x32f2, 0x12c: 0x2fe6, 0x12d: 0x32f7, 0x12e: 0x3009, 0x12f: 0x3315,\n\t0x130: 0x2feb, 0x132: 0x1a8a, 0x133: 0x1b17, 0x134: 0x3013, 0x135: 0x331f,\n\t0x136: 0x3027, 0x137: 0x3338, 0x139: 0x3031, 0x13a: 0x3342, 0x13b: 0x303b,\n\t0x13c: 0x334c, 0x13d: 0x3036, 0x13e: 0x3347, 0x13f: 0x1cdc,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x1d64, 0x143: 0x305e, 0x144: 0x336f, 0x145: 0x3077,\n\t0x146: 0x3388, 0x147: 0x306d, 0x148: 0x337e, 0x149: 0x1d8c,\n\t0x14c: 0x484a, 0x14d: 0x48db, 0x14e: 0x3090, 0x14f: 0x33a1, 0x150: 0x309a, 0x151: 0x33ab,\n\t0x154: 0x30b8, 0x155: 0x33c9, 0x156: 0x30d1, 0x157: 0x33e2,\n\t0x158: 0x30c2, 0x159: 0x33d3, 0x15a: 0x486d, 0x15b: 0x48fe, 0x15c: 0x30db, 0x15d: 0x33ec,\n\t0x15e: 0x30ea, 0x15f: 0x33fb, 0x160: 0x4872, 0x161: 0x4903, 0x162: 0x3103, 0x163: 0x3419,\n\t0x164: 0x30f4, 0x165: 0x340a, 0x168: 0x487c, 0x169: 0x490d,\n\t0x16a: 0x4881, 0x16b: 0x4912, 0x16c: 0x3121, 0x16d: 0x3437, 0x16e: 0x312b, 0x16f: 0x3441,\n\t0x170: 0x3130, 0x171: 0x3446, 0x172: 0x314e, 0x173: 0x3464, 0x174: 0x3171, 0x175: 0x3487,\n\t0x176: 0x3199, 0x177: 0x34b4, 0x178: 0x31ad, 0x179: 0x31bc, 0x17a: 0x34dc, 0x17b: 0x31c6,\n\t0x17c: 0x34e6, 0x17d: 0x31cb, 0x17e: 0x34eb, 0x17f: 0x00a7,\n\t// Block 0x6, offset 0x180\n\t0x184: 0x2dd5, 0x185: 0x2ddb,\n\t0x186: 0x2de1, 0x187: 0x1a9f, 0x188: 0x1aa2, 0x189: 0x1b38, 0x18a: 0x1ab7, 0x18b: 0x1aba,\n\t0x18c: 0x1b6e, 0x18d: 0x2ee7, 0x18e: 0x31f3, 0x18f: 0x2ff5, 0x190: 0x3301, 0x191: 0x309f,\n\t0x192: 0x33b0, 0x193: 0x3135, 0x194: 0x344b, 0x195: 0x392e, 0x196: 0x3abd, 0x197: 0x3927,\n\t0x198: 0x3ab6, 0x199: 0x3935, 0x19a: 0x3ac4, 0x19b: 0x3920, 0x19c: 0x3aaf,\n\t0x19e: 0x380f, 0x19f: 0x399e, 0x1a0: 0x3808, 0x1a1: 0x3997, 0x1a2: 0x3512, 0x1a3: 0x3524,\n\t0x1a6: 0x2fa0, 0x1a7: 0x32ac, 0x1a8: 0x301d, 0x1a9: 0x332e,\n\t0x1aa: 0x4863, 0x1ab: 0x48f4, 0x1ac: 0x38ef, 0x1ad: 0x3a7e, 0x1ae: 0x3536, 0x1af: 0x353c,\n\t0x1b0: 0x3324, 0x1b1: 0x1a6f, 0x1b2: 0x1a72, 0x1b3: 0x1aff, 0x1b4: 0x2f87, 0x1b5: 0x3293,\n\t0x1b8: 0x3059, 0x1b9: 0x336a, 0x1ba: 0x3816, 0x1bb: 0x39a5,\n\t0x1bc: 0x350c, 0x1bd: 0x351e, 0x1be: 0x3518, 0x1bf: 0x352a,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0x2eec, 0x1c1: 0x31f8, 0x1c2: 0x2ef1, 0x1c3: 0x31fd, 0x1c4: 0x2f69, 0x1c5: 0x3275,\n\t0x1c6: 0x2f6e, 0x1c7: 0x327a, 0x1c8: 0x2ffa, 0x1c9: 0x3306, 0x1ca: 0x2fff, 0x1cb: 0x330b,\n\t0x1cc: 0x30a4, 0x1cd: 0x33b5, 0x1ce: 0x30a9, 0x1cf: 0x33ba, 0x1d0: 0x30c7, 0x1d1: 0x33d8,\n\t0x1d2: 0x30cc, 0x1d3: 0x33dd, 0x1d4: 0x313a, 0x1d5: 0x3450, 0x1d6: 0x313f, 0x1d7: 0x3455,\n\t0x1d8: 0x30e5, 0x1d9: 0x33f6, 0x1da: 0x30fe, 0x1db: 0x3414,\n\t0x1de: 0x2fb9, 0x1df: 0x32c5,\n\t0x1e6: 0x4809, 0x1e7: 0x489a, 0x1e8: 0x4831, 0x1e9: 0x48c2,\n\t0x1ea: 0x38be, 0x1eb: 0x3a4d, 0x1ec: 0x389b, 0x1ed: 0x3a2a, 0x1ee: 0x484f, 0x1ef: 0x48e0,\n\t0x1f0: 0x38b7, 0x1f1: 0x3a46, 0x1f2: 0x31a3, 0x1f3: 0x34be,\n\t// Block 0x8, offset 0x200\n\t0x200: 0x9933, 0x201: 0x9933, 0x202: 0x9933, 0x203: 0x9933, 0x204: 0x9933, 0x205: 0x8133,\n\t0x206: 0x9933, 0x207: 0x9933, 0x208: 0x9933, 0x209: 0x9933, 0x20a: 0x9933, 0x20b: 0x9933,\n\t0x20c: 0x9933, 0x20d: 0x8133, 0x20e: 0x8133, 0x20f: 0x9933, 0x210: 0x8133, 0x211: 0x9933,\n\t0x212: 0x8133, 0x213: 0x9933, 0x214: 0x9933, 0x215: 0x8134, 0x216: 0x812e, 0x217: 0x812e,\n\t0x218: 0x812e, 0x219: 0x812e, 0x21a: 0x8134, 0x21b: 0x992c, 0x21c: 0x812e, 0x21d: 0x812e,\n\t0x21e: 0x812e, 0x21f: 0x812e, 0x220: 0x812e, 0x221: 0x812a, 0x222: 0x812a, 0x223: 0x992e,\n\t0x224: 0x992e, 0x225: 0x992e, 0x226: 0x992e, 0x227: 0x992a, 0x228: 0x992a, 0x229: 0x812e,\n\t0x22a: 0x812e, 0x22b: 0x812e, 0x22c: 0x812e, 0x22d: 0x992e, 0x22e: 0x992e, 0x22f: 0x812e,\n\t0x230: 0x992e, 0x231: 0x992e, 0x232: 0x812e, 0x233: 0x812e, 0x234: 0x8101, 0x235: 0x8101,\n\t0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812e, 0x23a: 0x812e, 0x23b: 0x812e,\n\t0x23c: 0x812e, 0x23d: 0x8133, 0x23e: 0x8133, 0x23f: 0x8133,\n\t// Block 0x9, offset 0x240\n\t0x240: 0x4b3f, 0x241: 0x4b44, 0x242: 0x9933, 0x243: 0x4b49, 0x244: 0x4c02, 0x245: 0x9937,\n\t0x246: 0x8133, 0x247: 0x812e, 0x248: 0x812e, 0x249: 0x812e, 0x24a: 0x8133, 0x24b: 0x8133,\n\t0x24c: 0x8133, 0x24d: 0x812e, 0x24e: 0x812e, 0x250: 0x8133, 0x251: 0x8133,\n\t0x252: 0x8133, 0x253: 0x812e, 0x254: 0x812e, 0x255: 0x812e, 0x256: 0x812e, 0x257: 0x8133,\n\t0x258: 0x8134, 0x259: 0x812e, 0x25a: 0x812e, 0x25b: 0x8133, 0x25c: 0x8135, 0x25d: 0x8136,\n\t0x25e: 0x8136, 0x25f: 0x8135, 0x260: 0x8136, 0x261: 0x8136, 0x262: 0x8135, 0x263: 0x8133,\n\t0x264: 0x8133, 0x265: 0x8133, 0x266: 0x8133, 0x267: 0x8133, 0x268: 0x8133, 0x269: 0x8133,\n\t0x26a: 0x8133, 0x26b: 0x8133, 0x26c: 0x8133, 0x26d: 0x8133, 0x26e: 0x8133, 0x26f: 0x8133,\n\t0x274: 0x01ee,\n\t0x27a: 0x43a4,\n\t0x27e: 0x0037,\n\t// Block 0xa, offset 0x280\n\t0x284: 0x4359, 0x285: 0x457a,\n\t0x286: 0x3548, 0x287: 0x00ce, 0x288: 0x3566, 0x289: 0x3572, 0x28a: 0x3584,\n\t0x28c: 0x35a2, 0x28e: 0x35b4, 0x28f: 0x35d2, 0x290: 0x3d67, 0x291: 0xa000,\n\t0x295: 0xa000, 0x297: 0xa000,\n\t0x299: 0xa000,\n\t0x29f: 0xa000, 0x2a1: 0xa000,\n\t0x2a5: 0xa000, 0x2a9: 0xa000,\n\t0x2aa: 0x3596, 0x2ab: 0x35c6, 0x2ac: 0x4975, 0x2ad: 0x35f6, 0x2ae: 0x499f, 0x2af: 0x3608,\n\t0x2b0: 0x3dcf, 0x2b1: 0xa000, 0x2b5: 0xa000,\n\t0x2b7: 0xa000, 0x2b9: 0xa000,\n\t0x2bf: 0xa000,\n\t// Block 0xb, offset 0x2c0\n\t0x2c1: 0xa000, 0x2c5: 0xa000,\n\t0x2c9: 0xa000, 0x2ca: 0x49b7, 0x2cb: 0x49d5,\n\t0x2cc: 0x3626, 0x2cd: 0x363e, 0x2ce: 0x49ed, 0x2d0: 0x0242, 0x2d1: 0x0254,\n\t0x2d2: 0x0230, 0x2d3: 0x440b, 0x2d4: 0x4411, 0x2d5: 0x027e, 0x2d6: 0x026c,\n\t0x2f0: 0x025a, 0x2f1: 0x026f, 0x2f2: 0x0272, 0x2f4: 0x020c, 0x2f5: 0x024b,\n\t0x2f9: 0x022a,\n\t// Block 0xc, offset 0x300\n\t0x300: 0x3680, 0x301: 0x368c, 0x303: 0x367a,\n\t0x306: 0xa000, 0x307: 0x3668,\n\t0x30c: 0x36bc, 0x30d: 0x36a4, 0x30e: 0x36ce, 0x310: 0xa000,\n\t0x313: 0xa000, 0x315: 0xa000, 0x316: 0xa000, 0x317: 0xa000,\n\t0x318: 0xa000, 0x319: 0x36b0, 0x31a: 0xa000,\n\t0x31e: 0xa000, 0x323: 0xa000,\n\t0x327: 0xa000,\n\t0x32b: 0xa000, 0x32d: 0xa000,\n\t0x330: 0xa000, 0x333: 0xa000, 0x335: 0xa000,\n\t0x336: 0xa000, 0x337: 0xa000, 0x338: 0xa000, 0x339: 0x3734, 0x33a: 0xa000,\n\t0x33e: 0xa000,\n\t// Block 0xd, offset 0x340\n\t0x341: 0x3692, 0x342: 0x3716,\n\t0x350: 0x366e, 0x351: 0x36f2,\n\t0x352: 0x3674, 0x353: 0x36f8, 0x356: 0x3686, 0x357: 0x370a,\n\t0x358: 0xa000, 0x359: 0xa000, 0x35a: 0x3788, 0x35b: 0x378e, 0x35c: 0x3698, 0x35d: 0x371c,\n\t0x35e: 0x369e, 0x35f: 0x3722, 0x362: 0x36aa, 0x363: 0x372e,\n\t0x364: 0x36b6, 0x365: 0x373a, 0x366: 0x36c2, 0x367: 0x3746, 0x368: 0xa000, 0x369: 0xa000,\n\t0x36a: 0x3794, 0x36b: 0x379a, 0x36c: 0x36ec, 0x36d: 0x3770, 0x36e: 0x36c8, 0x36f: 0x374c,\n\t0x370: 0x36d4, 0x371: 0x3758, 0x372: 0x36da, 0x373: 0x375e, 0x374: 0x36e0, 0x375: 0x3764,\n\t0x378: 0x36e6, 0x379: 0x376a,\n\t// Block 0xe, offset 0x380\n\t0x387: 0x1e91,\n\t0x391: 0x812e,\n\t0x392: 0x8133, 0x393: 0x8133, 0x394: 0x8133, 0x395: 0x8133, 0x396: 0x812e, 0x397: 0x8133,\n\t0x398: 0x8133, 0x399: 0x8133, 0x39a: 0x812f, 0x39b: 0x812e, 0x39c: 0x8133, 0x39d: 0x8133,\n\t0x39e: 0x8133, 0x39f: 0x8133, 0x3a0: 0x8133, 0x3a1: 0x8133, 0x3a2: 0x812e, 0x3a3: 0x812e,\n\t0x3a4: 0x812e, 0x3a5: 0x812e, 0x3a6: 0x812e, 0x3a7: 0x812e, 0x3a8: 0x8133, 0x3a9: 0x8133,\n\t0x3aa: 0x812e, 0x3ab: 0x8133, 0x3ac: 0x8133, 0x3ad: 0x812f, 0x3ae: 0x8132, 0x3af: 0x8133,\n\t0x3b0: 0x8106, 0x3b1: 0x8107, 0x3b2: 0x8108, 0x3b3: 0x8109, 0x3b4: 0x810a, 0x3b5: 0x810b,\n\t0x3b6: 0x810c, 0x3b7: 0x810d, 0x3b8: 0x810e, 0x3b9: 0x810f, 0x3ba: 0x810f, 0x3bb: 0x8110,\n\t0x3bc: 0x8111, 0x3bd: 0x8112, 0x3bf: 0x8113,\n\t// Block 0xf, offset 0x3c0\n\t0x3c8: 0xa000, 0x3ca: 0xa000, 0x3cb: 0x8117,\n\t0x3cc: 0x8118, 0x3cd: 0x8119, 0x3ce: 0x811a, 0x3cf: 0x811b, 0x3d0: 0x811c, 0x3d1: 0x811d,\n\t0x3d2: 0x811e, 0x3d3: 0x9933, 0x3d4: 0x9933, 0x3d5: 0x992e, 0x3d6: 0x812e, 0x3d7: 0x8133,\n\t0x3d8: 0x8133, 0x3d9: 0x8133, 0x3da: 0x8133, 0x3db: 0x8133, 0x3dc: 0x812e, 0x3dd: 0x8133,\n\t0x3de: 0x8133, 0x3df: 0x812e,\n\t0x3f0: 0x811f, 0x3f5: 0x1eb4,\n\t0x3f6: 0x2143, 0x3f7: 0x217f, 0x3f8: 0x217a,\n\t// Block 0x10, offset 0x400\n\t0x40a: 0x8133, 0x40b: 0x8133,\n\t0x40c: 0x8133, 0x40d: 0x8133, 0x40e: 0x8133, 0x40f: 0x812e, 0x410: 0x812e, 0x411: 0x812e,\n\t0x412: 0x812e, 0x413: 0x812e, 0x414: 0x8133, 0x415: 0x8133, 0x416: 0x8133, 0x417: 0x8133,\n\t0x418: 0x8133, 0x419: 0x8133, 0x41a: 0x8133, 0x41b: 0x8133, 0x41c: 0x8133, 0x41d: 0x8133,\n\t0x41e: 0x8133, 0x41f: 0x8133, 0x420: 0x8133, 0x421: 0x8133, 0x423: 0x812e,\n\t0x424: 0x8133, 0x425: 0x8133, 0x426: 0x812e, 0x427: 0x8133, 0x428: 0x8133, 0x429: 0x812e,\n\t0x42a: 0x8133, 0x42b: 0x8133, 0x42c: 0x8133, 0x42d: 0x812e, 0x42e: 0x812e, 0x42f: 0x812e,\n\t0x430: 0x8117, 0x431: 0x8118, 0x432: 0x8119, 0x433: 0x8133, 0x434: 0x8133, 0x435: 0x8133,\n\t0x436: 0x812e, 0x437: 0x8133, 0x438: 0x8133, 0x439: 0x812e, 0x43a: 0x812e, 0x43b: 0x8133,\n\t0x43c: 0x8133, 0x43d: 0x8133, 0x43e: 0x8133, 0x43f: 0x8133,\n\t// Block 0x11, offset 0x440\n\t0x445: 0xa000,\n\t0x446: 0x3ee7, 0x447: 0xa000, 0x448: 0x3eef, 0x449: 0xa000, 0x44a: 0x3ef7, 0x44b: 0xa000,\n\t0x44c: 0x3eff, 0x44d: 0xa000, 0x44e: 0x3f07, 0x451: 0xa000,\n\t0x452: 0x3f0f,\n\t0x474: 0x8103, 0x475: 0x9900,\n\t0x47a: 0xa000, 0x47b: 0x3f17,\n\t0x47c: 0xa000, 0x47d: 0x3f1f, 0x47e: 0xa000, 0x47f: 0xa000,\n\t// Block 0x12, offset 0x480\n\t0x480: 0x0069, 0x481: 0x006b, 0x482: 0x006f, 0x483: 0x0083, 0x484: 0x0104, 0x485: 0x0107,\n\t0x486: 0x0506, 0x487: 0x0085, 0x488: 0x0089, 0x489: 0x008b, 0x48a: 0x011f, 0x48b: 0x0122,\n\t0x48c: 0x0125, 0x48d: 0x008f, 0x48f: 0x0097, 0x490: 0x009b, 0x491: 0x00e6,\n\t0x492: 0x009f, 0x493: 0x0110, 0x494: 0x050a, 0x495: 0x050e, 0x496: 0x00a1, 0x497: 0x00a9,\n\t0x498: 0x00ab, 0x499: 0x0516, 0x49a: 0x015b, 0x49b: 0x00ad, 0x49c: 0x051a, 0x49d: 0x0242,\n\t0x49e: 0x0245, 0x49f: 0x0248, 0x4a0: 0x027e, 0x4a1: 0x0281, 0x4a2: 0x0093, 0x4a3: 0x00a5,\n\t0x4a4: 0x00ab, 0x4a5: 0x00ad, 0x4a6: 0x0242, 0x4a7: 0x0245, 0x4a8: 0x026f, 0x4a9: 0x027e,\n\t0x4aa: 0x0281,\n\t0x4b8: 0x02b4,\n\t// Block 0x13, offset 0x4c0\n\t0x4db: 0x010a, 0x4dc: 0x0087, 0x4dd: 0x0113,\n\t0x4de: 0x00d7, 0x4df: 0x0125, 0x4e0: 0x008d, 0x4e1: 0x012b, 0x4e2: 0x0131, 0x4e3: 0x013d,\n\t0x4e4: 0x0146, 0x4e5: 0x0149, 0x4e6: 0x014c, 0x4e7: 0x051e, 0x4e8: 0x01c7, 0x4e9: 0x0155,\n\t0x4ea: 0x0522, 0x4eb: 0x01ca, 0x4ec: 0x0161, 0x4ed: 0x015e, 0x4ee: 0x0164, 0x4ef: 0x0167,\n\t0x4f0: 0x016a, 0x4f1: 0x016d, 0x4f2: 0x0176, 0x4f3: 0x018e, 0x4f4: 0x0191, 0x4f5: 0x00f2,\n\t0x4f6: 0x019a, 0x4f7: 0x019d, 0x4f8: 0x0512, 0x4f9: 0x01a0, 0x4fa: 0x01a3, 0x4fb: 0x00b5,\n\t0x4fc: 0x01af, 0x4fd: 0x01b2, 0x4fe: 0x01b5, 0x4ff: 0x0254,\n\t// Block 0x14, offset 0x500\n\t0x500: 0x8133, 0x501: 0x8133, 0x502: 0x812e, 0x503: 0x8133, 0x504: 0x8133, 0x505: 0x8133,\n\t0x506: 0x8133, 0x507: 0x8133, 0x508: 0x8133, 0x509: 0x8133, 0x50a: 0x812e, 0x50b: 0x8133,\n\t0x50c: 0x8133, 0x50d: 0x8136, 0x50e: 0x812b, 0x50f: 0x812e, 0x510: 0x812a, 0x511: 0x8133,\n\t0x512: 0x8133, 0x513: 0x8133, 0x514: 0x8133, 0x515: 0x8133, 0x516: 0x8133, 0x517: 0x8133,\n\t0x518: 0x8133, 0x519: 0x8133, 0x51a: 0x8133, 0x51b: 0x8133, 0x51c: 0x8133, 0x51d: 0x8133,\n\t0x51e: 0x8133, 0x51f: 0x8133, 0x520: 0x8133, 0x521: 0x8133, 0x522: 0x8133, 0x523: 0x8133,\n\t0x524: 0x8133, 0x525: 0x8133, 0x526: 0x8133, 0x527: 0x8133, 0x528: 0x8133, 0x529: 0x8133,\n\t0x52a: 0x8133, 0x52b: 0x8133, 0x52c: 0x8133, 0x52d: 0x8133, 0x52e: 0x8133, 0x52f: 0x8133,\n\t0x530: 0x8133, 0x531: 0x8133, 0x532: 0x8133, 0x533: 0x8133, 0x534: 0x8133, 0x535: 0x8133,\n\t0x536: 0x8134, 0x537: 0x8132, 0x538: 0x8132, 0x539: 0x812e, 0x53a: 0x812d, 0x53b: 0x8133,\n\t0x53c: 0x8135, 0x53d: 0x812e, 0x53e: 0x8133, 0x53f: 0x812e,\n\t// Block 0x15, offset 0x540\n\t0x540: 0x2ef6, 0x541: 0x3202, 0x542: 0x2f00, 0x543: 0x320c, 0x544: 0x2f05, 0x545: 0x3211,\n\t0x546: 0x2f0a, 0x547: 0x3216, 0x548: 0x382b, 0x549: 0x39ba, 0x54a: 0x2f23, 0x54b: 0x322f,\n\t0x54c: 0x2f2d, 0x54d: 0x3239, 0x54e: 0x2f3c, 0x54f: 0x3248, 0x550: 0x2f32, 0x551: 0x323e,\n\t0x552: 0x2f37, 0x553: 0x3243, 0x554: 0x384e, 0x555: 0x39dd, 0x556: 0x3855, 0x557: 0x39e4,\n\t0x558: 0x2f78, 0x559: 0x3284, 0x55a: 0x2f7d, 0x55b: 0x3289, 0x55c: 0x3863, 0x55d: 0x39f2,\n\t0x55e: 0x2f82, 0x55f: 0x328e, 0x560: 0x2f91, 0x561: 0x329d, 0x562: 0x2faf, 0x563: 0x32bb,\n\t0x564: 0x2fbe, 0x565: 0x32ca, 0x566: 0x2fb4, 0x567: 0x32c0, 0x568: 0x2fc3, 0x569: 0x32cf,\n\t0x56a: 0x2fc8, 0x56b: 0x32d4, 0x56c: 0x300e, 0x56d: 0x331a, 0x56e: 0x386a, 0x56f: 0x39f9,\n\t0x570: 0x3018, 0x571: 0x3329, 0x572: 0x3022, 0x573: 0x3333, 0x574: 0x302c, 0x575: 0x333d,\n\t0x576: 0x483b, 0x577: 0x48cc, 0x578: 0x3871, 0x579: 0x3a00, 0x57a: 0x3045, 0x57b: 0x3356,\n\t0x57c: 0x3040, 0x57d: 0x3351, 0x57e: 0x304a, 0x57f: 0x335b,\n\t// Block 0x16, offset 0x580\n\t0x580: 0x304f, 0x581: 0x3360, 0x582: 0x3054, 0x583: 0x3365, 0x584: 0x3068, 0x585: 0x3379,\n\t0x586: 0x3072, 0x587: 0x3383, 0x588: 0x3081, 0x589: 0x3392, 0x58a: 0x307c, 0x58b: 0x338d,\n\t0x58c: 0x3894, 0x58d: 0x3a23, 0x58e: 0x38a2, 0x58f: 0x3a31, 0x590: 0x38a9, 0x591: 0x3a38,\n\t0x592: 0x38b0, 0x593: 0x3a3f, 0x594: 0x30ae, 0x595: 0x33bf, 0x596: 0x30b3, 0x597: 0x33c4,\n\t0x598: 0x30bd, 0x599: 0x33ce, 0x59a: 0x4868, 0x59b: 0x48f9, 0x59c: 0x38f6, 0x59d: 0x3a85,\n\t0x59e: 0x30d6, 0x59f: 0x33e7, 0x5a0: 0x30e0, 0x5a1: 0x33f1, 0x5a2: 0x4877, 0x5a3: 0x4908,\n\t0x5a4: 0x38fd, 0x5a5: 0x3a8c, 0x5a6: 0x3904, 0x5a7: 0x3a93, 0x5a8: 0x390b, 0x5a9: 0x3a9a,\n\t0x5aa: 0x30ef, 0x5ab: 0x3400, 0x5ac: 0x30f9, 0x5ad: 0x340f, 0x5ae: 0x310d, 0x5af: 0x3423,\n\t0x5b0: 0x3108, 0x5b1: 0x341e, 0x5b2: 0x3149, 0x5b3: 0x345f, 0x5b4: 0x3158, 0x5b5: 0x346e,\n\t0x5b6: 0x3153, 0x5b7: 0x3469, 0x5b8: 0x3912, 0x5b9: 0x3aa1, 0x5ba: 0x3919, 0x5bb: 0x3aa8,\n\t0x5bc: 0x315d, 0x5bd: 0x3473, 0x5be: 0x3162, 0x5bf: 0x3478,\n\t// Block 0x17, offset 0x5c0\n\t0x5c0: 0x3167, 0x5c1: 0x347d, 0x5c2: 0x316c, 0x5c3: 0x3482, 0x5c4: 0x317b, 0x5c5: 0x3491,\n\t0x5c6: 0x3176, 0x5c7: 0x348c, 0x5c8: 0x3180, 0x5c9: 0x349b, 0x5ca: 0x3185, 0x5cb: 0x34a0,\n\t0x5cc: 0x318a, 0x5cd: 0x34a5, 0x5ce: 0x31a8, 0x5cf: 0x34c3, 0x5d0: 0x31c1, 0x5d1: 0x34e1,\n\t0x5d2: 0x31d0, 0x5d3: 0x34f0, 0x5d4: 0x31d5, 0x5d5: 0x34f5, 0x5d6: 0x32d9, 0x5d7: 0x3405,\n\t0x5d8: 0x3496, 0x5d9: 0x34d2, 0x5da: 0x1d10, 0x5db: 0x43d6,\n\t0x5e0: 0x4818, 0x5e1: 0x48a9, 0x5e2: 0x2ee2, 0x5e3: 0x31ee,\n\t0x5e4: 0x37d7, 0x5e5: 0x3966, 0x5e6: 0x37d0, 0x5e7: 0x395f, 0x5e8: 0x37e5, 0x5e9: 0x3974,\n\t0x5ea: 0x37de, 0x5eb: 0x396d, 0x5ec: 0x381d, 0x5ed: 0x39ac, 0x5ee: 0x37f3, 0x5ef: 0x3982,\n\t0x5f0: 0x37ec, 0x5f1: 0x397b, 0x5f2: 0x3801, 0x5f3: 0x3990, 0x5f4: 0x37fa, 0x5f5: 0x3989,\n\t0x5f6: 0x3824, 0x5f7: 0x39b3, 0x5f8: 0x482c, 0x5f9: 0x48bd, 0x5fa: 0x2f5f, 0x5fb: 0x326b,\n\t0x5fc: 0x2f4b, 0x5fd: 0x3257, 0x5fe: 0x3839, 0x5ff: 0x39c8,\n\t// Block 0x18, offset 0x600\n\t0x600: 0x3832, 0x601: 0x39c1, 0x602: 0x3847, 0x603: 0x39d6, 0x604: 0x3840, 0x605: 0x39cf,\n\t0x606: 0x385c, 0x607: 0x39eb, 0x608: 0x2ff0, 0x609: 0x32fc, 0x60a: 0x3004, 0x60b: 0x3310,\n\t0x60c: 0x485e, 0x60d: 0x48ef, 0x60e: 0x3095, 0x60f: 0x33a6, 0x610: 0x387f, 0x611: 0x3a0e,\n\t0x612: 0x3878, 0x613: 0x3a07, 0x614: 0x388d, 0x615: 0x3a1c, 0x616: 0x3886, 0x617: 0x3a15,\n\t0x618: 0x38e8, 0x619: 0x3a77, 0x61a: 0x38cc, 0x61b: 0x3a5b, 0x61c: 0x38c5, 0x61d: 0x3a54,\n\t0x61e: 0x38da, 0x61f: 0x3a69, 0x620: 0x38d3, 0x621: 0x3a62, 0x622: 0x38e1, 0x623: 0x3a70,\n\t0x624: 0x3144, 0x625: 0x345a, 0x626: 0x3126, 0x627: 0x343c, 0x628: 0x3943, 0x629: 0x3ad2,\n\t0x62a: 0x393c, 0x62b: 0x3acb, 0x62c: 0x3951, 0x62d: 0x3ae0, 0x62e: 0x394a, 0x62f: 0x3ad9,\n\t0x630: 0x3958, 0x631: 0x3ae7, 0x632: 0x318f, 0x633: 0x34aa, 0x634: 0x31b7, 0x635: 0x34d7,\n\t0x636: 0x31b2, 0x637: 0x34cd, 0x638: 0x319e, 0x639: 0x34b9,\n\t// Block 0x19, offset 0x640\n\t0x640: 0x497b, 0x641: 0x4981, 0x642: 0x4a95, 0x643: 0x4aad, 0x644: 0x4a9d, 0x645: 0x4ab5,\n\t0x646: 0x4aa5, 0x647: 0x4abd, 0x648: 0x4921, 0x649: 0x4927, 0x64a: 0x4a05, 0x64b: 0x4a1d,\n\t0x64c: 0x4a0d, 0x64d: 0x4a25, 0x64e: 0x4a15, 0x64f: 0x4a2d, 0x650: 0x498d, 0x651: 0x4993,\n\t0x652: 0x3d17, 0x653: 0x3d27, 0x654: 0x3d1f, 0x655: 0x3d2f,\n\t0x658: 0x492d, 0x659: 0x4933, 0x65a: 0x3c47, 0x65b: 0x3c57, 0x65c: 0x3c4f, 0x65d: 0x3c5f,\n\t0x660: 0x49a5, 0x661: 0x49ab, 0x662: 0x4ac5, 0x663: 0x4add,\n\t0x664: 0x4acd, 0x665: 0x4ae5, 0x666: 0x4ad5, 0x667: 0x4aed, 0x668: 0x4939, 0x669: 0x493f,\n\t0x66a: 0x4a35, 0x66b: 0x4a4d, 0x66c: 0x4a3d, 0x66d: 0x4a55, 0x66e: 0x4a45, 0x66f: 0x4a5d,\n\t0x670: 0x49bd, 0x671: 0x49c3, 0x672: 0x3d77, 0x673: 0x3d8f, 0x674: 0x3d7f, 0x675: 0x3d97,\n\t0x676: 0x3d87, 0x677: 0x3d9f, 0x678: 0x4945, 0x679: 0x494b, 0x67a: 0x3c77, 0x67b: 0x3c8f,\n\t0x67c: 0x3c7f, 0x67d: 0x3c97, 0x67e: 0x3c87, 0x67f: 0x3c9f,\n\t// Block 0x1a, offset 0x680\n\t0x680: 0x49c9, 0x681: 0x49cf, 0x682: 0x3da7, 0x683: 0x3db7, 0x684: 0x3daf, 0x685: 0x3dbf,\n\t0x688: 0x4951, 0x689: 0x4957, 0x68a: 0x3ca7, 0x68b: 0x3cb7,\n\t0x68c: 0x3caf, 0x68d: 0x3cbf, 0x690: 0x49db, 0x691: 0x49e1,\n\t0x692: 0x3ddf, 0x693: 0x3df7, 0x694: 0x3de7, 0x695: 0x3dff, 0x696: 0x3def, 0x697: 0x3e07,\n\t0x699: 0x495d, 0x69b: 0x3cc7, 0x69d: 0x3ccf,\n\t0x69f: 0x3cd7, 0x6a0: 0x49f3, 0x6a1: 0x49f9, 0x6a2: 0x4af5, 0x6a3: 0x4b0d,\n\t0x6a4: 0x4afd, 0x6a5: 0x4b15, 0x6a6: 0x4b05, 0x6a7: 0x4b1d, 0x6a8: 0x4963, 0x6a9: 0x4969,\n\t0x6aa: 0x4a65, 0x6ab: 0x4a7d, 0x6ac: 0x4a6d, 0x6ad: 0x4a85, 0x6ae: 0x4a75, 0x6af: 0x4a8d,\n\t0x6b0: 0x496f, 0x6b1: 0x441d, 0x6b2: 0x35f0, 0x6b3: 0x4423, 0x6b4: 0x4999, 0x6b5: 0x4429,\n\t0x6b6: 0x3602, 0x6b7: 0x442f, 0x6b8: 0x3620, 0x6b9: 0x4435, 0x6ba: 0x3638, 0x6bb: 0x443b,\n\t0x6bc: 0x49e7, 0x6bd: 0x4441,\n\t// Block 0x1b, offset 0x6c0\n\t0x6c0: 0x3cff, 0x6c1: 0x3d07, 0x6c2: 0x41d3, 0x6c3: 0x41f1, 0x6c4: 0x41dd, 0x6c5: 0x41fb,\n\t0x6c6: 0x41e7, 0x6c7: 0x4205, 0x6c8: 0x3c37, 0x6c9: 0x3c3f, 0x6ca: 0x411f, 0x6cb: 0x413d,\n\t0x6cc: 0x4129, 0x6cd: 0x4147, 0x6ce: 0x4133, 0x6cf: 0x4151, 0x6d0: 0x3d47, 0x6d1: 0x3d4f,\n\t0x6d2: 0x420f, 0x6d3: 0x422d, 0x6d4: 0x4219, 0x6d5: 0x4237, 0x6d6: 0x4223, 0x6d7: 0x4241,\n\t0x6d8: 0x3c67, 0x6d9: 0x3c6f, 0x6da: 0x415b, 0x6db: 0x4179, 0x6dc: 0x4165, 0x6dd: 0x4183,\n\t0x6de: 0x416f, 0x6df: 0x418d, 0x6e0: 0x3e1f, 0x6e1: 0x3e27, 0x6e2: 0x424b, 0x6e3: 0x4269,\n\t0x6e4: 0x4255, 0x6e5: 0x4273, 0x6e6: 0x425f, 0x6e7: 0x427d, 0x6e8: 0x3cdf, 0x6e9: 0x3ce7,\n\t0x6ea: 0x4197, 0x6eb: 0x41b5, 0x6ec: 0x41a1, 0x6ed: 0x41bf, 0x6ee: 0x41ab, 0x6ef: 0x41c9,\n\t0x6f0: 0x35e4, 0x6f1: 0x35de, 0x6f2: 0x3cef, 0x6f3: 0x35ea, 0x6f4: 0x3cf7,\n\t0x6f6: 0x4987, 0x6f7: 0x3d0f, 0x6f8: 0x3554, 0x6f9: 0x354e, 0x6fa: 0x3542, 0x6fb: 0x43ed,\n\t0x6fc: 0x355a, 0x6fd: 0x4386, 0x6fe: 0x0257, 0x6ff: 0x4386,\n\t// Block 0x1c, offset 0x700\n\t0x700: 0x439f, 0x701: 0x4581, 0x702: 0x3d37, 0x703: 0x35fc, 0x704: 0x3d3f,\n\t0x706: 0x49b1, 0x707: 0x3d57, 0x708: 0x3560, 0x709: 0x43f3, 0x70a: 0x356c, 0x70b: 0x43f9,\n\t0x70c: 0x3578, 0x70d: 0x4588, 0x70e: 0x458f, 0x70f: 0x4596, 0x710: 0x3614, 0x711: 0x360e,\n\t0x712: 0x3d5f, 0x713: 0x45e3, 0x716: 0x361a, 0x717: 0x3d6f,\n\t0x718: 0x3590, 0x719: 0x358a, 0x71a: 0x357e, 0x71b: 0x43ff, 0x71d: 0x459d,\n\t0x71e: 0x45a4, 0x71f: 0x45ab, 0x720: 0x364a, 0x721: 0x3644, 0x722: 0x3dc7, 0x723: 0x45eb,\n\t0x724: 0x362c, 0x725: 0x3632, 0x726: 0x3650, 0x727: 0x3dd7, 0x728: 0x35c0, 0x729: 0x35ba,\n\t0x72a: 0x35ae, 0x72b: 0x440b, 0x72c: 0x35a8, 0x72d: 0x4573, 0x72e: 0x457a, 0x72f: 0x0081,\n\t0x732: 0x3e0f, 0x733: 0x3656, 0x734: 0x3e17,\n\t0x736: 0x49ff, 0x737: 0x3e2f, 0x738: 0x359c, 0x739: 0x4405, 0x73a: 0x35cc, 0x73b: 0x4417,\n\t0x73c: 0x35d8, 0x73d: 0x4359, 0x73e: 0x438b,\n\t// Block 0x1d, offset 0x740\n\t0x740: 0x1d08, 0x741: 0x1d0c, 0x742: 0x0047, 0x743: 0x1d84, 0x745: 0x1d18,\n\t0x746: 0x1d1c, 0x747: 0x00ef, 0x749: 0x1d88, 0x74a: 0x008f, 0x74b: 0x0051,\n\t0x74c: 0x0051, 0x74d: 0x0051, 0x74e: 0x0091, 0x74f: 0x00e0, 0x750: 0x0053, 0x751: 0x0053,\n\t0x752: 0x0059, 0x753: 0x0099, 0x755: 0x005d, 0x756: 0x1abd,\n\t0x759: 0x0061, 0x75a: 0x0063, 0x75b: 0x0065, 0x75c: 0x0065, 0x75d: 0x0065,\n\t0x760: 0x1acf, 0x761: 0x1cf8, 0x762: 0x1ad8,\n\t0x764: 0x0075, 0x766: 0x023c, 0x768: 0x0075,\n\t0x76a: 0x0057, 0x76b: 0x43d1, 0x76c: 0x0045, 0x76d: 0x0047, 0x76f: 0x008b,\n\t0x770: 0x004b, 0x771: 0x004d, 0x773: 0x005b, 0x774: 0x009f, 0x775: 0x0308,\n\t0x776: 0x030b, 0x777: 0x030e, 0x778: 0x0311, 0x779: 0x0093, 0x77b: 0x1cc8,\n\t0x77c: 0x026c, 0x77d: 0x0245, 0x77e: 0x01fd, 0x77f: 0x0224,\n\t// Block 0x1e, offset 0x780\n\t0x780: 0x055a, 0x785: 0x0049,\n\t0x786: 0x0089, 0x787: 0x008b, 0x788: 0x0093, 0x789: 0x0095,\n\t0x790: 0x235e, 0x791: 0x236a,\n\t0x792: 0x241e, 0x793: 0x2346, 0x794: 0x23ca, 0x795: 0x2352, 0x796: 0x23d0, 0x797: 0x23e8,\n\t0x798: 0x23f4, 0x799: 0x2358, 0x79a: 0x23fa, 0x79b: 0x2364, 0x79c: 0x23ee, 0x79d: 0x2400,\n\t0x79e: 0x2406, 0x79f: 0x1dec, 0x7a0: 0x0053, 0x7a1: 0x1a87, 0x7a2: 0x1cd4, 0x7a3: 0x1a90,\n\t0x7a4: 0x006d, 0x7a5: 0x1adb, 0x7a6: 0x1d00, 0x7a7: 0x1e78, 0x7a8: 0x1a93, 0x7a9: 0x0071,\n\t0x7aa: 0x1ae7, 0x7ab: 0x1d04, 0x7ac: 0x0059, 0x7ad: 0x0047, 0x7ae: 0x0049, 0x7af: 0x005b,\n\t0x7b0: 0x0093, 0x7b1: 0x1b14, 0x7b2: 0x1d48, 0x7b3: 0x1b1d, 0x7b4: 0x00ad, 0x7b5: 0x1b92,\n\t0x7b6: 0x1d7c, 0x7b7: 0x1e8c, 0x7b8: 0x1b20, 0x7b9: 0x00b1, 0x7ba: 0x1b95, 0x7bb: 0x1d80,\n\t0x7bc: 0x0099, 0x7bd: 0x0087, 0x7be: 0x0089, 0x7bf: 0x009b,\n\t// Block 0x1f, offset 0x7c0\n\t0x7c1: 0x3b65, 0x7c3: 0xa000, 0x7c4: 0x3b6c, 0x7c5: 0xa000,\n\t0x7c7: 0x3b73, 0x7c8: 0xa000, 0x7c9: 0x3b7a,\n\t0x7cd: 0xa000,\n\t0x7e0: 0x2ec4, 0x7e1: 0xa000, 0x7e2: 0x3b88,\n\t0x7e4: 0xa000, 0x7e5: 0xa000,\n\t0x7ed: 0x3b81, 0x7ee: 0x2ebf, 0x7ef: 0x2ec9,\n\t0x7f0: 0x3b8f, 0x7f1: 0x3b96, 0x7f2: 0xa000, 0x7f3: 0xa000, 0x7f4: 0x3b9d, 0x7f5: 0x3ba4,\n\t0x7f6: 0xa000, 0x7f7: 0xa000, 0x7f8: 0x3bab, 0x7f9: 0x3bb2, 0x7fa: 0xa000, 0x7fb: 0xa000,\n\t0x7fc: 0xa000, 0x7fd: 0xa000,\n\t// Block 0x20, offset 0x800\n\t0x800: 0x3bb9, 0x801: 0x3bc0, 0x802: 0xa000, 0x803: 0xa000, 0x804: 0x3bd5, 0x805: 0x3bdc,\n\t0x806: 0xa000, 0x807: 0xa000, 0x808: 0x3be3, 0x809: 0x3bea,\n\t0x811: 0xa000,\n\t0x812: 0xa000,\n\t0x822: 0xa000,\n\t0x828: 0xa000, 0x829: 0xa000,\n\t0x82b: 0xa000, 0x82c: 0x3bff, 0x82d: 0x3c06, 0x82e: 0x3c0d, 0x82f: 0x3c14,\n\t0x832: 0xa000, 0x833: 0xa000, 0x834: 0xa000, 0x835: 0xa000,\n\t// Block 0x21, offset 0x840\n\t0x860: 0x0023, 0x861: 0x0025, 0x862: 0x0027, 0x863: 0x0029,\n\t0x864: 0x002b, 0x865: 0x002d, 0x866: 0x002f, 0x867: 0x0031, 0x868: 0x0033, 0x869: 0x19af,\n\t0x86a: 0x19b2, 0x86b: 0x19b5, 0x86c: 0x19b8, 0x86d: 0x19bb, 0x86e: 0x19be, 0x86f: 0x19c1,\n\t0x870: 0x19c4, 0x871: 0x19c7, 0x872: 0x19ca, 0x873: 0x19d3, 0x874: 0x1b98, 0x875: 0x1b9c,\n\t0x876: 0x1ba0, 0x877: 0x1ba4, 0x878: 0x1ba8, 0x879: 0x1bac, 0x87a: 0x1bb0, 0x87b: 0x1bb4,\n\t0x87c: 0x1bb8, 0x87d: 0x1db0, 0x87e: 0x1db5, 0x87f: 0x1dba,\n\t// Block 0x22, offset 0x880\n\t0x880: 0x1dbf, 0x881: 0x1dc4, 0x882: 0x1dc9, 0x883: 0x1dce, 0x884: 0x1dd3, 0x885: 0x1dd8,\n\t0x886: 0x1ddd, 0x887: 0x1de2, 0x888: 0x19ac, 0x889: 0x19d0, 0x88a: 0x19f4, 0x88b: 0x1a18,\n\t0x88c: 0x1a3c, 0x88d: 0x1a45, 0x88e: 0x1a4b, 0x88f: 0x1a51, 0x890: 0x1a57, 0x891: 0x1c90,\n\t0x892: 0x1c94, 0x893: 0x1c98, 0x894: 0x1c9c, 0x895: 0x1ca0, 0x896: 0x1ca4, 0x897: 0x1ca8,\n\t0x898: 0x1cac, 0x899: 0x1cb0, 0x89a: 0x1cb4, 0x89b: 0x1cb8, 0x89c: 0x1c24, 0x89d: 0x1c28,\n\t0x89e: 0x1c2c, 0x89f: 0x1c30, 0x8a0: 0x1c34, 0x8a1: 0x1c38, 0x8a2: 0x1c3c, 0x8a3: 0x1c40,\n\t0x8a4: 0x1c44, 0x8a5: 0x1c48, 0x8a6: 0x1c4c, 0x8a7: 0x1c50, 0x8a8: 0x1c54, 0x8a9: 0x1c58,\n\t0x8aa: 0x1c5c, 0x8ab: 0x1c60, 0x8ac: 0x1c64, 0x8ad: 0x1c68, 0x8ae: 0x1c6c, 0x8af: 0x1c70,\n\t0x8b0: 0x1c74, 0x8b1: 0x1c78, 0x8b2: 0x1c7c, 0x8b3: 0x1c80, 0x8b4: 0x1c84, 0x8b5: 0x1c88,\n\t0x8b6: 0x0043, 0x8b7: 0x0045, 0x8b8: 0x0047, 0x8b9: 0x0049, 0x8ba: 0x004b, 0x8bb: 0x004d,\n\t0x8bc: 0x004f, 0x8bd: 0x0051, 0x8be: 0x0053, 0x8bf: 0x0055,\n\t// Block 0x23, offset 0x8c0\n\t0x8c0: 0x07ba, 0x8c1: 0x07de, 0x8c2: 0x07ea, 0x8c3: 0x07fa, 0x8c4: 0x0802, 0x8c5: 0x080e,\n\t0x8c6: 0x0816, 0x8c7: 0x081e, 0x8c8: 0x082a, 0x8c9: 0x087e, 0x8ca: 0x0896, 0x8cb: 0x08a6,\n\t0x8cc: 0x08b6, 0x8cd: 0x08c6, 0x8ce: 0x08d6, 0x8cf: 0x08f6, 0x8d0: 0x08fa, 0x8d1: 0x08fe,\n\t0x8d2: 0x0932, 0x8d3: 0x095a, 0x8d4: 0x096a, 0x8d5: 0x0972, 0x8d6: 0x0976, 0x8d7: 0x0982,\n\t0x8d8: 0x099e, 0x8d9: 0x09a2, 0x8da: 0x09ba, 0x8db: 0x09be, 0x8dc: 0x09c6, 0x8dd: 0x09d6,\n\t0x8de: 0x0a72, 0x8df: 0x0a86, 0x8e0: 0x0ac6, 0x8e1: 0x0ada, 0x8e2: 0x0ae2, 0x8e3: 0x0ae6,\n\t0x8e4: 0x0af6, 0x8e5: 0x0b12, 0x8e6: 0x0b3e, 0x8e7: 0x0b4a, 0x8e8: 0x0b6a, 0x8e9: 0x0b76,\n\t0x8ea: 0x0b7a, 0x8eb: 0x0b7e, 0x8ec: 0x0b96, 0x8ed: 0x0b9a, 0x8ee: 0x0bc6, 0x8ef: 0x0bd2,\n\t0x8f0: 0x0bda, 0x8f1: 0x0be2, 0x8f2: 0x0bf2, 0x8f3: 0x0bfa, 0x8f4: 0x0c02, 0x8f5: 0x0c2e,\n\t0x8f6: 0x0c32, 0x8f7: 0x0c3a, 0x8f8: 0x0c3e, 0x8f9: 0x0c46, 0x8fa: 0x0c4e, 0x8fb: 0x0c5e,\n\t0x8fc: 0x0c7a, 0x8fd: 0x0cf2, 0x8fe: 0x0d06, 0x8ff: 0x0d0a,\n\t// Block 0x24, offset 0x900\n\t0x900: 0x0d8a, 0x901: 0x0d8e, 0x902: 0x0da2, 0x903: 0x0da6, 0x904: 0x0dae, 0x905: 0x0db6,\n\t0x906: 0x0dbe, 0x907: 0x0dca, 0x908: 0x0df2, 0x909: 0x0e02, 0x90a: 0x0e16, 0x90b: 0x0e86,\n\t0x90c: 0x0e92, 0x90d: 0x0ea2, 0x90e: 0x0eae, 0x90f: 0x0eba, 0x910: 0x0ec2, 0x911: 0x0ec6,\n\t0x912: 0x0eca, 0x913: 0x0ece, 0x914: 0x0ed2, 0x915: 0x0f8a, 0x916: 0x0fd2, 0x917: 0x0fde,\n\t0x918: 0x0fe2, 0x919: 0x0fe6, 0x91a: 0x0fea, 0x91b: 0x0ff2, 0x91c: 0x0ff6, 0x91d: 0x100a,\n\t0x91e: 0x1026, 0x91f: 0x102e, 0x920: 0x106e, 0x921: 0x1072, 0x922: 0x107a, 0x923: 0x107e,\n\t0x924: 0x1086, 0x925: 0x108a, 0x926: 0x10ae, 0x927: 0x10b2, 0x928: 0x10ce, 0x929: 0x10d2,\n\t0x92a: 0x10d6, 0x92b: 0x10da, 0x92c: 0x10ee, 0x92d: 0x1112, 0x92e: 0x1116, 0x92f: 0x111a,\n\t0x930: 0x113e, 0x931: 0x117e, 0x932: 0x1182, 0x933: 0x11a2, 0x934: 0x11b2, 0x935: 0x11ba,\n\t0x936: 0x11da, 0x937: 0x11fe, 0x938: 0x1242, 0x939: 0x124a, 0x93a: 0x125e, 0x93b: 0x126a,\n\t0x93c: 0x1272, 0x93d: 0x127a, 0x93e: 0x127e, 0x93f: 0x1282,\n\t// Block 0x25, offset 0x940\n\t0x940: 0x129a, 0x941: 0x129e, 0x942: 0x12ba, 0x943: 0x12c2, 0x944: 0x12ca, 0x945: 0x12ce,\n\t0x946: 0x12da, 0x947: 0x12e2, 0x948: 0x12e6, 0x949: 0x12ea, 0x94a: 0x12f2, 0x94b: 0x12f6,\n\t0x94c: 0x1396, 0x94d: 0x13aa, 0x94e: 0x13de, 0x94f: 0x13e2, 0x950: 0x13ea, 0x951: 0x1416,\n\t0x952: 0x141e, 0x953: 0x1426, 0x954: 0x142e, 0x955: 0x146a, 0x956: 0x146e, 0x957: 0x1476,\n\t0x958: 0x147a, 0x959: 0x147e, 0x95a: 0x14aa, 0x95b: 0x14ae, 0x95c: 0x14b6, 0x95d: 0x14ca,\n\t0x95e: 0x14ce, 0x95f: 0x14ea, 0x960: 0x14f2, 0x961: 0x14f6, 0x962: 0x151a, 0x963: 0x153a,\n\t0x964: 0x154e, 0x965: 0x1552, 0x966: 0x155a, 0x967: 0x1586, 0x968: 0x158a, 0x969: 0x159a,\n\t0x96a: 0x15be, 0x96b: 0x15ca, 0x96c: 0x15da, 0x96d: 0x15f2, 0x96e: 0x15fa, 0x96f: 0x15fe,\n\t0x970: 0x1602, 0x971: 0x1606, 0x972: 0x1612, 0x973: 0x1616, 0x974: 0x161e, 0x975: 0x163a,\n\t0x976: 0x163e, 0x977: 0x1642, 0x978: 0x165a, 0x979: 0x165e, 0x97a: 0x1666, 0x97b: 0x167a,\n\t0x97c: 0x167e, 0x97d: 0x1682, 0x97e: 0x168a, 0x97f: 0x168e,\n\t// Block 0x26, offset 0x980\n\t0x986: 0xa000, 0x98b: 0xa000,\n\t0x98c: 0x3f47, 0x98d: 0xa000, 0x98e: 0x3f4f, 0x98f: 0xa000, 0x990: 0x3f57, 0x991: 0xa000,\n\t0x992: 0x3f5f, 0x993: 0xa000, 0x994: 0x3f67, 0x995: 0xa000, 0x996: 0x3f6f, 0x997: 0xa000,\n\t0x998: 0x3f77, 0x999: 0xa000, 0x99a: 0x3f7f, 0x99b: 0xa000, 0x99c: 0x3f87, 0x99d: 0xa000,\n\t0x99e: 0x3f8f, 0x99f: 0xa000, 0x9a0: 0x3f97, 0x9a1: 0xa000, 0x9a2: 0x3f9f,\n\t0x9a4: 0xa000, 0x9a5: 0x3fa7, 0x9a6: 0xa000, 0x9a7: 0x3faf, 0x9a8: 0xa000, 0x9a9: 0x3fb7,\n\t0x9af: 0xa000,\n\t0x9b0: 0x3fbf, 0x9b1: 0x3fc7, 0x9b2: 0xa000, 0x9b3: 0x3fcf, 0x9b4: 0x3fd7, 0x9b5: 0xa000,\n\t0x9b6: 0x3fdf, 0x9b7: 0x3fe7, 0x9b8: 0xa000, 0x9b9: 0x3fef, 0x9ba: 0x3ff7, 0x9bb: 0xa000,\n\t0x9bc: 0x3fff, 0x9bd: 0x4007,\n\t// Block 0x27, offset 0x9c0\n\t0x9d4: 0x3f3f,\n\t0x9d9: 0x9904, 0x9da: 0x9904, 0x9db: 0x43db, 0x9dc: 0x43e1, 0x9dd: 0xa000,\n\t0x9de: 0x400f, 0x9df: 0x27e4,\n\t0x9e6: 0xa000,\n\t0x9eb: 0xa000, 0x9ec: 0x401f, 0x9ed: 0xa000, 0x9ee: 0x4027, 0x9ef: 0xa000,\n\t0x9f0: 0x402f, 0x9f1: 0xa000, 0x9f2: 0x4037, 0x9f3: 0xa000, 0x9f4: 0x403f, 0x9f5: 0xa000,\n\t0x9f6: 0x4047, 0x9f7: 0xa000, 0x9f8: 0x404f, 0x9f9: 0xa000, 0x9fa: 0x4057, 0x9fb: 0xa000,\n\t0x9fc: 0x405f, 0x9fd: 0xa000, 0x9fe: 0x4067, 0x9ff: 0xa000,\n\t// Block 0x28, offset 0xa00\n\t0xa00: 0x406f, 0xa01: 0xa000, 0xa02: 0x4077, 0xa04: 0xa000, 0xa05: 0x407f,\n\t0xa06: 0xa000, 0xa07: 0x4087, 0xa08: 0xa000, 0xa09: 0x408f,\n\t0xa0f: 0xa000, 0xa10: 0x4097, 0xa11: 0x409f,\n\t0xa12: 0xa000, 0xa13: 0x40a7, 0xa14: 0x40af, 0xa15: 0xa000, 0xa16: 0x40b7, 0xa17: 0x40bf,\n\t0xa18: 0xa000, 0xa19: 0x40c7, 0xa1a: 0x40cf, 0xa1b: 0xa000, 0xa1c: 0x40d7, 0xa1d: 0x40df,\n\t0xa2f: 0xa000,\n\t0xa30: 0xa000, 0xa31: 0xa000, 0xa32: 0xa000, 0xa34: 0x4017,\n\t0xa37: 0x40e7, 0xa38: 0x40ef, 0xa39: 0x40f7, 0xa3a: 0x40ff,\n\t0xa3d: 0xa000, 0xa3e: 0x4107, 0xa3f: 0x27f9,\n\t// Block 0x29, offset 0xa40\n\t0xa40: 0x045a, 0xa41: 0x041e, 0xa42: 0x0422, 0xa43: 0x0426, 0xa44: 0x046e, 0xa45: 0x042a,\n\t0xa46: 0x042e, 0xa47: 0x0432, 0xa48: 0x0436, 0xa49: 0x043a, 0xa4a: 0x043e, 0xa4b: 0x0442,\n\t0xa4c: 0x0446, 0xa4d: 0x044a, 0xa4e: 0x044e, 0xa4f: 0x4b4e, 0xa50: 0x4b54, 0xa51: 0x4b5a,\n\t0xa52: 0x4b60, 0xa53: 0x4b66, 0xa54: 0x4b6c, 0xa55: 0x4b72, 0xa56: 0x4b78, 0xa57: 0x4b7e,\n\t0xa58: 0x4b84, 0xa59: 0x4b8a, 0xa5a: 0x4b90, 0xa5b: 0x4b96, 0xa5c: 0x4b9c, 0xa5d: 0x4ba2,\n\t0xa5e: 0x4ba8, 0xa5f: 0x4bae, 0xa60: 0x4bb4, 0xa61: 0x4bba, 0xa62: 0x4bc0, 0xa63: 0x4bc6,\n\t0xa64: 0x04b6, 0xa65: 0x0452, 0xa66: 0x0456, 0xa67: 0x04da, 0xa68: 0x04de, 0xa69: 0x04e2,\n\t0xa6a: 0x04e6, 0xa6b: 0x04ea, 0xa6c: 0x04ee, 0xa6d: 0x04f2, 0xa6e: 0x045e, 0xa6f: 0x04f6,\n\t0xa70: 0x04fa, 0xa71: 0x0462, 0xa72: 0x0466, 0xa73: 0x046a, 0xa74: 0x0472, 0xa75: 0x0476,\n\t0xa76: 0x047a, 0xa77: 0x047e, 0xa78: 0x0482, 0xa79: 0x0486, 0xa7a: 0x048a, 0xa7b: 0x048e,\n\t0xa7c: 0x0492, 0xa7d: 0x0496, 0xa7e: 0x049a, 0xa7f: 0x049e,\n\t// Block 0x2a, offset 0xa80\n\t0xa80: 0x04a2, 0xa81: 0x04a6, 0xa82: 0x04fe, 0xa83: 0x0502, 0xa84: 0x04aa, 0xa85: 0x04ae,\n\t0xa86: 0x04b2, 0xa87: 0x04ba, 0xa88: 0x04be, 0xa89: 0x04c2, 0xa8a: 0x04c6, 0xa8b: 0x04ca,\n\t0xa8c: 0x04ce, 0xa8d: 0x04d2, 0xa8e: 0x04d6,\n\t0xa92: 0x07ba, 0xa93: 0x0816, 0xa94: 0x07c6, 0xa95: 0x0a76, 0xa96: 0x07ca, 0xa97: 0x07e2,\n\t0xa98: 0x07ce, 0xa99: 0x108e, 0xa9a: 0x0802, 0xa9b: 0x07d6, 0xa9c: 0x07be, 0xa9d: 0x0afa,\n\t0xa9e: 0x0a8a, 0xa9f: 0x082a,\n\t// Block 0x2b, offset 0xac0\n\t0xac0: 0x2184, 0xac1: 0x218a, 0xac2: 0x2190, 0xac3: 0x2196, 0xac4: 0x219c, 0xac5: 0x21a2,\n\t0xac6: 0x21a8, 0xac7: 0x21ae, 0xac8: 0x21b4, 0xac9: 0x21ba, 0xaca: 0x21c0, 0xacb: 0x21c6,\n\t0xacc: 0x21cc, 0xacd: 0x21d2, 0xace: 0x285d, 0xacf: 0x2866, 0xad0: 0x286f, 0xad1: 0x2878,\n\t0xad2: 0x2881, 0xad3: 0x288a, 0xad4: 0x2893, 0xad5: 0x289c, 0xad6: 0x28a5, 0xad7: 0x28b7,\n\t0xad8: 0x28c0, 0xad9: 0x28c9, 0xada: 0x28d2, 0xadb: 0x28db, 0xadc: 0x28ae, 0xadd: 0x2ce3,\n\t0xade: 0x2c24, 0xae0: 0x21d8, 0xae1: 0x21f0, 0xae2: 0x21e4, 0xae3: 0x2238,\n\t0xae4: 0x21f6, 0xae5: 0x2214, 0xae6: 0x21de, 0xae7: 0x220e, 0xae8: 0x21ea, 0xae9: 0x2220,\n\t0xaea: 0x2250, 0xaeb: 0x226e, 0xaec: 0x2268, 0xaed: 0x225c, 0xaee: 0x22aa, 0xaef: 0x223e,\n\t0xaf0: 0x224a, 0xaf1: 0x2262, 0xaf2: 0x2256, 0xaf3: 0x2280, 0xaf4: 0x222c, 0xaf5: 0x2274,\n\t0xaf6: 0x229e, 0xaf7: 0x2286, 0xaf8: 0x221a, 0xaf9: 0x21fc, 0xafa: 0x2232, 0xafb: 0x2244,\n\t0xafc: 0x227a, 0xafd: 0x2202, 0xafe: 0x22a4, 0xaff: 0x2226,\n\t// Block 0x2c, offset 0xb00\n\t0xb00: 0x228c, 0xb01: 0x2208, 0xb02: 0x2292, 0xb03: 0x2298, 0xb04: 0x0a2a, 0xb05: 0x0bfe,\n\t0xb06: 0x0da2, 0xb07: 0x11c2,\n\t0xb10: 0x1cf4, 0xb11: 0x19d6,\n\t0xb12: 0x19d9, 0xb13: 0x19dc, 0xb14: 0x19df, 0xb15: 0x19e2, 0xb16: 0x19e5, 0xb17: 0x19e8,\n\t0xb18: 0x19eb, 0xb19: 0x19ee, 0xb1a: 0x19f7, 0xb1b: 0x19fa, 0xb1c: 0x19fd, 0xb1d: 0x1a00,\n\t0xb1e: 0x1a03, 0xb1f: 0x1a06, 0xb20: 0x0406, 0xb21: 0x040e, 0xb22: 0x0412, 0xb23: 0x041a,\n\t0xb24: 0x041e, 0xb25: 0x0422, 0xb26: 0x042a, 0xb27: 0x0432, 0xb28: 0x0436, 0xb29: 0x043e,\n\t0xb2a: 0x0442, 0xb2b: 0x0446, 0xb2c: 0x044a, 0xb2d: 0x044e, 0xb2e: 0x46c3, 0xb2f: 0x46cb,\n\t0xb30: 0x46d3, 0xb31: 0x46db, 0xb32: 0x46e3, 0xb33: 0x46eb, 0xb34: 0x46f3, 0xb35: 0x46fb,\n\t0xb36: 0x470b, 0xb37: 0x4713, 0xb38: 0x471b, 0xb39: 0x4723, 0xb3a: 0x472b, 0xb3b: 0x4733,\n\t0xb3c: 0x2e42, 0xb3d: 0x2e0a, 0xb3e: 0x4703,\n\t// Block 0x2d, offset 0xb40\n\t0xb40: 0x07ba, 0xb41: 0x0816, 0xb42: 0x07c6, 0xb43: 0x0a76, 0xb44: 0x081a, 0xb45: 0x08aa,\n\t0xb46: 0x07c2, 0xb47: 0x08a6, 0xb48: 0x0806, 0xb49: 0x0982, 0xb4a: 0x0e02, 0xb4b: 0x0f8a,\n\t0xb4c: 0x0ed2, 0xb4d: 0x0e16, 0xb4e: 0x155a, 0xb4f: 0x0a86, 0xb50: 0x0dca, 0xb51: 0x0e46,\n\t0xb52: 0x0e06, 0xb53: 0x1146, 0xb54: 0x09f6, 0xb55: 0x0ffe, 0xb56: 0x1482, 0xb57: 0x115a,\n\t0xb58: 0x093e, 0xb59: 0x118a, 0xb5a: 0x1096, 0xb5b: 0x0b12, 0xb5c: 0x150a, 0xb5d: 0x087a,\n\t0xb5e: 0x09a6, 0xb5f: 0x0ef2, 0xb60: 0x1622, 0xb61: 0x083e, 0xb62: 0x08ce, 0xb63: 0x0e96,\n\t0xb64: 0x07ca, 0xb65: 0x07e2, 0xb66: 0x07ce, 0xb67: 0x0bd6, 0xb68: 0x09ea, 0xb69: 0x097a,\n\t0xb6a: 0x0b52, 0xb6b: 0x0b46, 0xb6c: 0x10e6, 0xb6d: 0x083a, 0xb6e: 0x1496, 0xb6f: 0x0996,\n\t0xb70: 0x0aee, 0xb71: 0x1a09, 0xb72: 0x1a0c, 0xb73: 0x1a0f, 0xb74: 0x1a12, 0xb75: 0x1a1b,\n\t0xb76: 0x1a1e, 0xb77: 0x1a21, 0xb78: 0x1a24, 0xb79: 0x1a27, 0xb7a: 0x1a2a, 0xb7b: 0x1a2d,\n\t0xb7c: 0x1a30, 0xb7d: 0x1a33, 0xb7e: 0x1a36, 0xb7f: 0x1a3f,\n\t// Block 0x2e, offset 0xb80\n\t0xb80: 0x1df6, 0xb81: 0x1e05, 0xb82: 0x1e14, 0xb83: 0x1e23, 0xb84: 0x1e32, 0xb85: 0x1e41,\n\t0xb86: 0x1e50, 0xb87: 0x1e5f, 0xb88: 0x1e6e, 0xb89: 0x22bc, 0xb8a: 0x22ce, 0xb8b: 0x22e0,\n\t0xb8c: 0x1a81, 0xb8d: 0x1d34, 0xb8e: 0x1b02, 0xb8f: 0x1cd8, 0xb90: 0x05c6, 0xb91: 0x05ce,\n\t0xb92: 0x05d6, 0xb93: 0x05de, 0xb94: 0x05e6, 0xb95: 0x05ea, 0xb96: 0x05ee, 0xb97: 0x05f2,\n\t0xb98: 0x05f6, 0xb99: 0x05fa, 0xb9a: 0x05fe, 0xb9b: 0x0602, 0xb9c: 0x0606, 0xb9d: 0x060a,\n\t0xb9e: 0x060e, 0xb9f: 0x0612, 0xba0: 0x0616, 0xba1: 0x061e, 0xba2: 0x0622, 0xba3: 0x0626,\n\t0xba4: 0x062a, 0xba5: 0x062e, 0xba6: 0x0632, 0xba7: 0x0636, 0xba8: 0x063a, 0xba9: 0x063e,\n\t0xbaa: 0x0642, 0xbab: 0x0646, 0xbac: 0x064a, 0xbad: 0x064e, 0xbae: 0x0652, 0xbaf: 0x0656,\n\t0xbb0: 0x065a, 0xbb1: 0x065e, 0xbb2: 0x0662, 0xbb3: 0x066a, 0xbb4: 0x0672, 0xbb5: 0x067a,\n\t0xbb6: 0x067e, 0xbb7: 0x0682, 0xbb8: 0x0686, 0xbb9: 0x068a, 0xbba: 0x068e, 0xbbb: 0x0692,\n\t0xbbc: 0x0696, 0xbbd: 0x069a, 0xbbe: 0x069e, 0xbbf: 0x282a,\n\t// Block 0x2f, offset 0xbc0\n\t0xbc0: 0x2c43, 0xbc1: 0x2adf, 0xbc2: 0x2c53, 0xbc3: 0x29b7, 0xbc4: 0x2e53, 0xbc5: 0x29c1,\n\t0xbc6: 0x29cb, 0xbc7: 0x2e97, 0xbc8: 0x2aec, 0xbc9: 0x29d5, 0xbca: 0x29df, 0xbcb: 0x29e9,\n\t0xbcc: 0x2b13, 0xbcd: 0x2b20, 0xbce: 0x2af9, 0xbcf: 0x2b06, 0xbd0: 0x2e18, 0xbd1: 0x2b2d,\n\t0xbd2: 0x2b3a, 0xbd3: 0x2cf5, 0xbd4: 0x27eb, 0xbd5: 0x2d08, 0xbd6: 0x2d1b, 0xbd7: 0x2c63,\n\t0xbd8: 0x2b47, 0xbd9: 0x2d2e, 0xbda: 0x2d41, 0xbdb: 0x2b54, 0xbdc: 0x29f3, 0xbdd: 0x29fd,\n\t0xbde: 0x2e26, 0xbdf: 0x2b61, 0xbe0: 0x2c73, 0xbe1: 0x2e64, 0xbe2: 0x2a07, 0xbe3: 0x2a11,\n\t0xbe4: 0x2b6e, 0xbe5: 0x2a1b, 0xbe6: 0x2a25, 0xbe7: 0x2800, 0xbe8: 0x2807, 0xbe9: 0x2a2f,\n\t0xbea: 0x2a39, 0xbeb: 0x2d54, 0xbec: 0x2b7b, 0xbed: 0x2c83, 0xbee: 0x2d67, 0xbef: 0x2b88,\n\t0xbf0: 0x2a4d, 0xbf1: 0x2a43, 0xbf2: 0x2eab, 0xbf3: 0x2b95, 0xbf4: 0x2d7a, 0xbf5: 0x2a57,\n\t0xbf6: 0x2c93, 0xbf7: 0x2a61, 0xbf8: 0x2baf, 0xbf9: 0x2a6b, 0xbfa: 0x2bbc, 0xbfb: 0x2e75,\n\t0xbfc: 0x2ba2, 0xbfd: 0x2ca3, 0xbfe: 0x2bc9, 0xbff: 0x280e,\n\t// Block 0x30, offset 0xc00\n\t0xc00: 0x2e86, 0xc01: 0x2a75, 0xc02: 0x2a7f, 0xc03: 0x2bd6, 0xc04: 0x2a89, 0xc05: 0x2a93,\n\t0xc06: 0x2a9d, 0xc07: 0x2cb3, 0xc08: 0x2be3, 0xc09: 0x2815, 0xc0a: 0x2d8d, 0xc0b: 0x2dff,\n\t0xc0c: 0x2cc3, 0xc0d: 0x2bf0, 0xc0e: 0x2e34, 0xc0f: 0x2aa7, 0xc10: 0x2ab1, 0xc11: 0x2bfd,\n\t0xc12: 0x281c, 0xc13: 0x2c0a, 0xc14: 0x2cd3, 0xc15: 0x2823, 0xc16: 0x2da0, 0xc17: 0x2abb,\n\t0xc18: 0x1de7, 0xc19: 0x1dfb, 0xc1a: 0x1e0a, 0xc1b: 0x1e19, 0xc1c: 0x1e28, 0xc1d: 0x1e37,\n\t0xc1e: 0x1e46, 0xc1f: 0x1e55, 0xc20: 0x1e64, 0xc21: 0x1e73, 0xc22: 0x22c2, 0xc23: 0x22d4,\n\t0xc24: 0x22e6, 0xc25: 0x22f2, 0xc26: 0x22fe, 0xc27: 0x230a, 0xc28: 0x2316, 0xc29: 0x2322,\n\t0xc2a: 0x232e, 0xc2b: 0x233a, 0xc2c: 0x2376, 0xc2d: 0x2382, 0xc2e: 0x238e, 0xc2f: 0x239a,\n\t0xc30: 0x23a6, 0xc31: 0x1d44, 0xc32: 0x1af6, 0xc33: 0x1a63, 0xc34: 0x1d14, 0xc35: 0x1b77,\n\t0xc36: 0x1b86, 0xc37: 0x1afc, 0xc38: 0x1d2c, 0xc39: 0x1d30, 0xc3a: 0x1a8d, 0xc3b: 0x2838,\n\t0xc3c: 0x2846, 0xc3d: 0x2831, 0xc3e: 0x283f, 0xc3f: 0x2c17,\n\t// Block 0x31, offset 0xc40\n\t0xc40: 0x1b7a, 0xc41: 0x1b62, 0xc42: 0x1d90, 0xc43: 0x1b4a, 0xc44: 0x1b23, 0xc45: 0x1a96,\n\t0xc46: 0x1aa5, 0xc47: 0x1a75, 0xc48: 0x1d20, 0xc49: 0x1e82, 0xc4a: 0x1b7d, 0xc4b: 0x1b65,\n\t0xc4c: 0x1d94, 0xc4d: 0x1da0, 0xc4e: 0x1b56, 0xc4f: 0x1b2c, 0xc50: 0x1a84, 0xc51: 0x1d4c,\n\t0xc52: 0x1ce0, 0xc53: 0x1ccc, 0xc54: 0x1cfc, 0xc55: 0x1da4, 0xc56: 0x1b59, 0xc57: 0x1af9,\n\t0xc58: 0x1b2f, 0xc59: 0x1b0e, 0xc5a: 0x1b71, 0xc5b: 0x1da8, 0xc5c: 0x1b5c, 0xc5d: 0x1af0,\n\t0xc5e: 0x1b32, 0xc5f: 0x1d6c, 0xc60: 0x1d24, 0xc61: 0x1b44, 0xc62: 0x1d54, 0xc63: 0x1d70,\n\t0xc64: 0x1d28, 0xc65: 0x1b47, 0xc66: 0x1d58, 0xc67: 0x2418, 0xc68: 0x242c, 0xc69: 0x1ac6,\n\t0xc6a: 0x1d50, 0xc6b: 0x1ce4, 0xc6c: 0x1cd0, 0xc6d: 0x1d78, 0xc6e: 0x284d, 0xc6f: 0x28e4,\n\t0xc70: 0x1b89, 0xc71: 0x1b74, 0xc72: 0x1dac, 0xc73: 0x1b5f, 0xc74: 0x1b80, 0xc75: 0x1b68,\n\t0xc76: 0x1d98, 0xc77: 0x1b4d, 0xc78: 0x1b26, 0xc79: 0x1ab1, 0xc7a: 0x1b83, 0xc7b: 0x1b6b,\n\t0xc7c: 0x1d9c, 0xc7d: 0x1b50, 0xc7e: 0x1b29, 0xc7f: 0x1ab4,\n\t// Block 0x32, offset 0xc80\n\t0xc80: 0x1d5c, 0xc81: 0x1ce8, 0xc82: 0x1e7d, 0xc83: 0x1a66, 0xc84: 0x1aea, 0xc85: 0x1aed,\n\t0xc86: 0x2425, 0xc87: 0x1cc4, 0xc88: 0x1af3, 0xc89: 0x1a78, 0xc8a: 0x1b11, 0xc8b: 0x1a7b,\n\t0xc8c: 0x1b1a, 0xc8d: 0x1a99, 0xc8e: 0x1a9c, 0xc8f: 0x1b35, 0xc90: 0x1b3b, 0xc91: 0x1b3e,\n\t0xc92: 0x1d60, 0xc93: 0x1b41, 0xc94: 0x1b53, 0xc95: 0x1d68, 0xc96: 0x1d74, 0xc97: 0x1ac0,\n\t0xc98: 0x1e87, 0xc99: 0x1cec, 0xc9a: 0x1ac3, 0xc9b: 0x1b8c, 0xc9c: 0x1ad5, 0xc9d: 0x1ae4,\n\t0xc9e: 0x2412, 0xc9f: 0x240c, 0xca0: 0x1df1, 0xca1: 0x1e00, 0xca2: 0x1e0f, 0xca3: 0x1e1e,\n\t0xca4: 0x1e2d, 0xca5: 0x1e3c, 0xca6: 0x1e4b, 0xca7: 0x1e5a, 0xca8: 0x1e69, 0xca9: 0x22b6,\n\t0xcaa: 0x22c8, 0xcab: 0x22da, 0xcac: 0x22ec, 0xcad: 0x22f8, 0xcae: 0x2304, 0xcaf: 0x2310,\n\t0xcb0: 0x231c, 0xcb1: 0x2328, 0xcb2: 0x2334, 0xcb3: 0x2370, 0xcb4: 0x237c, 0xcb5: 0x2388,\n\t0xcb6: 0x2394, 0xcb7: 0x23a0, 0xcb8: 0x23ac, 0xcb9: 0x23b2, 0xcba: 0x23b8, 0xcbb: 0x23be,\n\t0xcbc: 0x23c4, 0xcbd: 0x23d6, 0xcbe: 0x23dc, 0xcbf: 0x1d40,\n\t// Block 0x33, offset 0xcc0\n\t0xcc0: 0x1472, 0xcc1: 0x0df6, 0xcc2: 0x14ce, 0xcc3: 0x149a, 0xcc4: 0x0f52, 0xcc5: 0x07e6,\n\t0xcc6: 0x09da, 0xcc7: 0x1726, 0xcc8: 0x1726, 0xcc9: 0x0b06, 0xcca: 0x155a, 0xccb: 0x0a3e,\n\t0xccc: 0x0b02, 0xccd: 0x0cea, 0xcce: 0x10ca, 0xccf: 0x125a, 0xcd0: 0x1392, 0xcd1: 0x13ce,\n\t0xcd2: 0x1402, 0xcd3: 0x1516, 0xcd4: 0x0e6e, 0xcd5: 0x0efa, 0xcd6: 0x0fa6, 0xcd7: 0x103e,\n\t0xcd8: 0x135a, 0xcd9: 0x1542, 0xcda: 0x166e, 0xcdb: 0x080a, 0xcdc: 0x09ae, 0xcdd: 0x0e82,\n\t0xcde: 0x0fca, 0xcdf: 0x138e, 0xce0: 0x16be, 0xce1: 0x0bae, 0xce2: 0x0f72, 0xce3: 0x137e,\n\t0xce4: 0x1412, 0xce5: 0x0d1e, 0xce6: 0x12b6, 0xce7: 0x13da, 0xce8: 0x0c1a, 0xce9: 0x0e0a,\n\t0xcea: 0x0f12, 0xceb: 0x1016, 0xcec: 0x1522, 0xced: 0x084a, 0xcee: 0x08e2, 0xcef: 0x094e,\n\t0xcf0: 0x0d86, 0xcf1: 0x0e7a, 0xcf2: 0x0fc6, 0xcf3: 0x10ea, 0xcf4: 0x1272, 0xcf5: 0x1386,\n\t0xcf6: 0x139e, 0xcf7: 0x14c2, 0xcf8: 0x15ea, 0xcf9: 0x169e, 0xcfa: 0x16ba, 0xcfb: 0x1126,\n\t0xcfc: 0x1166, 0xcfd: 0x121e, 0xcfe: 0x133e, 0xcff: 0x1576,\n\t// Block 0x34, offset 0xd00\n\t0xd00: 0x16c6, 0xd01: 0x1446, 0xd02: 0x0ac2, 0xd03: 0x0c36, 0xd04: 0x11d6, 0xd05: 0x1296,\n\t0xd06: 0x0ffa, 0xd07: 0x112e, 0xd08: 0x1492, 0xd09: 0x15e2, 0xd0a: 0x0abe, 0xd0b: 0x0b8a,\n\t0xd0c: 0x0e72, 0xd0d: 0x0f26, 0xd0e: 0x0f5a, 0xd0f: 0x120e, 0xd10: 0x1236, 0xd11: 0x15a2,\n\t0xd12: 0x094a, 0xd13: 0x12a2, 0xd14: 0x08ee, 0xd15: 0x08ea, 0xd16: 0x1192, 0xd17: 0x1222,\n\t0xd18: 0x1356, 0xd19: 0x15aa, 0xd1a: 0x1462, 0xd1b: 0x0d22, 0xd1c: 0x0e6e, 0xd1d: 0x1452,\n\t0xd1e: 0x07f2, 0xd1f: 0x0b5e, 0xd20: 0x0c8e, 0xd21: 0x102a, 0xd22: 0x10aa, 0xd23: 0x096e,\n\t0xd24: 0x1136, 0xd25: 0x085a, 0xd26: 0x0c72, 0xd27: 0x07d2, 0xd28: 0x0ee6, 0xd29: 0x0d9e,\n\t0xd2a: 0x120a, 0xd2b: 0x09c2, 0xd2c: 0x0aae, 0xd2d: 0x10f6, 0xd2e: 0x135e, 0xd2f: 0x1436,\n\t0xd30: 0x0eb2, 0xd31: 0x14f2, 0xd32: 0x0ede, 0xd33: 0x0d32, 0xd34: 0x1316, 0xd35: 0x0d52,\n\t0xd36: 0x10a6, 0xd37: 0x0826, 0xd38: 0x08a2, 0xd39: 0x08e6, 0xd3a: 0x0e4e, 0xd3b: 0x11f6,\n\t0xd3c: 0x12ee, 0xd3d: 0x1442, 0xd3e: 0x1556, 0xd3f: 0x0956,\n\t// Block 0x35, offset 0xd40\n\t0xd40: 0x0a0a, 0xd41: 0x0b12, 0xd42: 0x0c2a, 0xd43: 0x0dba, 0xd44: 0x0f76, 0xd45: 0x113a,\n\t0xd46: 0x1592, 0xd47: 0x1676, 0xd48: 0x16ca, 0xd49: 0x16e2, 0xd4a: 0x0932, 0xd4b: 0x0dee,\n\t0xd4c: 0x0e9e, 0xd4d: 0x14e6, 0xd4e: 0x0bf6, 0xd4f: 0x0cd2, 0xd50: 0x0cee, 0xd51: 0x0d7e,\n\t0xd52: 0x0f66, 0xd53: 0x0fb2, 0xd54: 0x1062, 0xd55: 0x1186, 0xd56: 0x122a, 0xd57: 0x128e,\n\t0xd58: 0x14d6, 0xd59: 0x1366, 0xd5a: 0x14fe, 0xd5b: 0x157a, 0xd5c: 0x090a, 0xd5d: 0x0936,\n\t0xd5e: 0x0a1e, 0xd5f: 0x0fa2, 0xd60: 0x13ee, 0xd61: 0x1436, 0xd62: 0x0c16, 0xd63: 0x0c86,\n\t0xd64: 0x0d4a, 0xd65: 0x0eaa, 0xd66: 0x11d2, 0xd67: 0x101e, 0xd68: 0x0836, 0xd69: 0x0a7a,\n\t0xd6a: 0x0b5e, 0xd6b: 0x0bc2, 0xd6c: 0x0c92, 0xd6d: 0x103a, 0xd6e: 0x1056, 0xd6f: 0x1266,\n\t0xd70: 0x1286, 0xd71: 0x155e, 0xd72: 0x15de, 0xd73: 0x15ee, 0xd74: 0x162a, 0xd75: 0x084e,\n\t0xd76: 0x117a, 0xd77: 0x154a, 0xd78: 0x15c6, 0xd79: 0x0caa, 0xd7a: 0x0812, 0xd7b: 0x0872,\n\t0xd7c: 0x0b62, 0xd7d: 0x0b82, 0xd7e: 0x0daa, 0xd7f: 0x0e6e,\n\t// Block 0x36, offset 0xd80\n\t0xd80: 0x0fbe, 0xd81: 0x10c6, 0xd82: 0x1372, 0xd83: 0x1512, 0xd84: 0x171e, 0xd85: 0x0dde,\n\t0xd86: 0x159e, 0xd87: 0x092e, 0xd88: 0x0e2a, 0xd89: 0x0e36, 0xd8a: 0x0f0a, 0xd8b: 0x0f42,\n\t0xd8c: 0x1046, 0xd8d: 0x10a2, 0xd8e: 0x1122, 0xd8f: 0x1206, 0xd90: 0x1636, 0xd91: 0x08aa,\n\t0xd92: 0x0cfe, 0xd93: 0x15ae, 0xd94: 0x0862, 0xd95: 0x0ba6, 0xd96: 0x0f2a, 0xd97: 0x14da,\n\t0xd98: 0x0c62, 0xd99: 0x0cb2, 0xd9a: 0x0e3e, 0xd9b: 0x102a, 0xd9c: 0x15b6, 0xd9d: 0x0912,\n\t0xd9e: 0x09fa, 0xd9f: 0x0b92, 0xda0: 0x0dce, 0xda1: 0x0e1a, 0xda2: 0x0e5a, 0xda3: 0x0eee,\n\t0xda4: 0x1042, 0xda5: 0x10b6, 0xda6: 0x1252, 0xda7: 0x13f2, 0xda8: 0x13fe, 0xda9: 0x1552,\n\t0xdaa: 0x15d2, 0xdab: 0x097e, 0xdac: 0x0f46, 0xdad: 0x09fe, 0xdae: 0x0fc2, 0xdaf: 0x1066,\n\t0xdb0: 0x1382, 0xdb1: 0x15ba, 0xdb2: 0x16a6, 0xdb3: 0x16ce, 0xdb4: 0x0e32, 0xdb5: 0x0f22,\n\t0xdb6: 0x12be, 0xdb7: 0x11b2, 0xdb8: 0x11be, 0xdb9: 0x11e2, 0xdba: 0x1012, 0xdbb: 0x0f9a,\n\t0xdbc: 0x145e, 0xdbd: 0x082e, 0xdbe: 0x1326, 0xdbf: 0x0916,\n\t// Block 0x37, offset 0xdc0\n\t0xdc0: 0x0906, 0xdc1: 0x0c06, 0xdc2: 0x0d26, 0xdc3: 0x11ee, 0xdc4: 0x0b4e, 0xdc5: 0x0efe,\n\t0xdc6: 0x0dea, 0xdc7: 0x14e2, 0xdc8: 0x13e2, 0xdc9: 0x15a6, 0xdca: 0x141e, 0xdcb: 0x0c22,\n\t0xdcc: 0x0882, 0xdcd: 0x0a56, 0xdd0: 0x0aaa,\n\t0xdd2: 0x0dda, 0xdd5: 0x08f2, 0xdd6: 0x101a, 0xdd7: 0x10de,\n\t0xdd8: 0x1142, 0xdd9: 0x115e, 0xdda: 0x1162, 0xddb: 0x1176, 0xddc: 0x15f6, 0xddd: 0x11e6,\n\t0xdde: 0x126a, 0xde0: 0x138a, 0xde2: 0x144e,\n\t0xde5: 0x1502, 0xde6: 0x152e,\n\t0xdea: 0x164a, 0xdeb: 0x164e, 0xdec: 0x1652, 0xded: 0x16b6, 0xdee: 0x1526, 0xdef: 0x15c2,\n\t0xdf0: 0x0852, 0xdf1: 0x0876, 0xdf2: 0x088a, 0xdf3: 0x0946, 0xdf4: 0x0952, 0xdf5: 0x0992,\n\t0xdf6: 0x0a46, 0xdf7: 0x0a62, 0xdf8: 0x0a6a, 0xdf9: 0x0aa6, 0xdfa: 0x0ab2, 0xdfb: 0x0b8e,\n\t0xdfc: 0x0b96, 0xdfd: 0x0c9e, 0xdfe: 0x0cc6, 0xdff: 0x0cce,\n\t// Block 0x38, offset 0xe00\n\t0xe00: 0x0ce6, 0xe01: 0x0d92, 0xe02: 0x0dc2, 0xe03: 0x0de2, 0xe04: 0x0e52, 0xe05: 0x0f16,\n\t0xe06: 0x0f32, 0xe07: 0x0f62, 0xe08: 0x0fb6, 0xe09: 0x0fd6, 0xe0a: 0x104a, 0xe0b: 0x112a,\n\t0xe0c: 0x1146, 0xe0d: 0x114e, 0xe0e: 0x114a, 0xe0f: 0x1152, 0xe10: 0x1156, 0xe11: 0x115a,\n\t0xe12: 0x116e, 0xe13: 0x1172, 0xe14: 0x1196, 0xe15: 0x11aa, 0xe16: 0x11c6, 0xe17: 0x122a,\n\t0xe18: 0x1232, 0xe19: 0x123a, 0xe1a: 0x124e, 0xe1b: 0x1276, 0xe1c: 0x12c6, 0xe1d: 0x12fa,\n\t0xe1e: 0x12fa, 0xe1f: 0x1362, 0xe20: 0x140a, 0xe21: 0x1422, 0xe22: 0x1456, 0xe23: 0x145a,\n\t0xe24: 0x149e, 0xe25: 0x14a2, 0xe26: 0x14fa, 0xe27: 0x1502, 0xe28: 0x15d6, 0xe29: 0x161a,\n\t0xe2a: 0x1632, 0xe2b: 0x0c96, 0xe2c: 0x184b, 0xe2d: 0x12de,\n\t0xe30: 0x07da, 0xe31: 0x08de, 0xe32: 0x089e, 0xe33: 0x0846, 0xe34: 0x0886, 0xe35: 0x08b2,\n\t0xe36: 0x0942, 0xe37: 0x095e, 0xe38: 0x0a46, 0xe39: 0x0a32, 0xe3a: 0x0a42, 0xe3b: 0x0a5e,\n\t0xe3c: 0x0aaa, 0xe3d: 0x0aba, 0xe3e: 0x0afe, 0xe3f: 0x0b0a,\n\t// Block 0x39, offset 0xe40\n\t0xe40: 0x0b26, 0xe41: 0x0b36, 0xe42: 0x0c1e, 0xe43: 0x0c26, 0xe44: 0x0c56, 0xe45: 0x0c76,\n\t0xe46: 0x0ca6, 0xe47: 0x0cbe, 0xe48: 0x0cae, 0xe49: 0x0cce, 0xe4a: 0x0cc2, 0xe4b: 0x0ce6,\n\t0xe4c: 0x0d02, 0xe4d: 0x0d5a, 0xe4e: 0x0d66, 0xe4f: 0x0d6e, 0xe50: 0x0d96, 0xe51: 0x0dda,\n\t0xe52: 0x0e0a, 0xe53: 0x0e0e, 0xe54: 0x0e22, 0xe55: 0x0ea2, 0xe56: 0x0eb2, 0xe57: 0x0f0a,\n\t0xe58: 0x0f56, 0xe59: 0x0f4e, 0xe5a: 0x0f62, 0xe5b: 0x0f7e, 0xe5c: 0x0fb6, 0xe5d: 0x110e,\n\t0xe5e: 0x0fda, 0xe5f: 0x100e, 0xe60: 0x101a, 0xe61: 0x105a, 0xe62: 0x1076, 0xe63: 0x109a,\n\t0xe64: 0x10be, 0xe65: 0x10c2, 0xe66: 0x10de, 0xe67: 0x10e2, 0xe68: 0x10f2, 0xe69: 0x1106,\n\t0xe6a: 0x1102, 0xe6b: 0x1132, 0xe6c: 0x11ae, 0xe6d: 0x11c6, 0xe6e: 0x11de, 0xe6f: 0x1216,\n\t0xe70: 0x122a, 0xe71: 0x1246, 0xe72: 0x1276, 0xe73: 0x132a, 0xe74: 0x1352, 0xe75: 0x13c6,\n\t0xe76: 0x140e, 0xe77: 0x141a, 0xe78: 0x1422, 0xe79: 0x143a, 0xe7a: 0x144e, 0xe7b: 0x143e,\n\t0xe7c: 0x1456, 0xe7d: 0x1452, 0xe7e: 0x144a, 0xe7f: 0x145a,\n\t// Block 0x3a, offset 0xe80\n\t0xe80: 0x1466, 0xe81: 0x14a2, 0xe82: 0x14de, 0xe83: 0x150e, 0xe84: 0x1546, 0xe85: 0x1566,\n\t0xe86: 0x15b2, 0xe87: 0x15d6, 0xe88: 0x15f6, 0xe89: 0x160a, 0xe8a: 0x161a, 0xe8b: 0x1626,\n\t0xe8c: 0x1632, 0xe8d: 0x1686, 0xe8e: 0x1726, 0xe8f: 0x17e2, 0xe90: 0x17dd, 0xe91: 0x180f,\n\t0xe92: 0x0702, 0xe93: 0x072a, 0xe94: 0x072e, 0xe95: 0x1891, 0xe96: 0x18be, 0xe97: 0x1936,\n\t0xe98: 0x1712, 0xe99: 0x1722,\n\t// Block 0x3b, offset 0xec0\n\t0xec0: 0x1b05, 0xec1: 0x1b08, 0xec2: 0x1b0b, 0xec3: 0x1d38, 0xec4: 0x1d3c, 0xec5: 0x1b8f,\n\t0xec6: 0x1b8f,\n\t0xed3: 0x1ea5, 0xed4: 0x1e96, 0xed5: 0x1e9b, 0xed6: 0x1eaa, 0xed7: 0x1ea0,\n\t0xedd: 0x448f,\n\t0xede: 0x8116, 0xedf: 0x4501, 0xee0: 0x0320, 0xee1: 0x0308, 0xee2: 0x0311, 0xee3: 0x0314,\n\t0xee4: 0x0317, 0xee5: 0x031a, 0xee6: 0x031d, 0xee7: 0x0323, 0xee8: 0x0326, 0xee9: 0x0017,\n\t0xeea: 0x44ef, 0xeeb: 0x44f5, 0xeec: 0x45f3, 0xeed: 0x45fb, 0xeee: 0x4447, 0xeef: 0x444d,\n\t0xef0: 0x4453, 0xef1: 0x4459, 0xef2: 0x4465, 0xef3: 0x446b, 0xef4: 0x4471, 0xef5: 0x447d,\n\t0xef6: 0x4483, 0xef8: 0x4489, 0xef9: 0x4495, 0xefa: 0x449b, 0xefb: 0x44a1,\n\t0xefc: 0x44ad, 0xefe: 0x44b3,\n\t// Block 0x3c, offset 0xf00\n\t0xf00: 0x44b9, 0xf01: 0x44bf, 0xf03: 0x44c5, 0xf04: 0x44cb,\n\t0xf06: 0x44d7, 0xf07: 0x44dd, 0xf08: 0x44e3, 0xf09: 0x44e9, 0xf0a: 0x44fb, 0xf0b: 0x4477,\n\t0xf0c: 0x445f, 0xf0d: 0x44a7, 0xf0e: 0x44d1, 0xf0f: 0x1eaf, 0xf10: 0x038c, 0xf11: 0x038c,\n\t0xf12: 0x0395, 0xf13: 0x0395, 0xf14: 0x0395, 0xf15: 0x0395, 0xf16: 0x0398, 0xf17: 0x0398,\n\t0xf18: 0x0398, 0xf19: 0x0398, 0xf1a: 0x039e, 0xf1b: 0x039e, 0xf1c: 0x039e, 0xf1d: 0x039e,\n\t0xf1e: 0x0392, 0xf1f: 0x0392, 0xf20: 0x0392, 0xf21: 0x0392, 0xf22: 0x039b, 0xf23: 0x039b,\n\t0xf24: 0x039b, 0xf25: 0x039b, 0xf26: 0x038f, 0xf27: 0x038f, 0xf28: 0x038f, 0xf29: 0x038f,\n\t0xf2a: 0x03c2, 0xf2b: 0x03c2, 0xf2c: 0x03c2, 0xf2d: 0x03c2, 0xf2e: 0x03c5, 0xf2f: 0x03c5,\n\t0xf30: 0x03c5, 0xf31: 0x03c5, 0xf32: 0x03a4, 0xf33: 0x03a4, 0xf34: 0x03a4, 0xf35: 0x03a4,\n\t0xf36: 0x03a1, 0xf37: 0x03a1, 0xf38: 0x03a1, 0xf39: 0x03a1, 0xf3a: 0x03a7, 0xf3b: 0x03a7,\n\t0xf3c: 0x03a7, 0xf3d: 0x03a7, 0xf3e: 0x03aa, 0xf3f: 0x03aa,\n\t// Block 0x3d, offset 0xf40\n\t0xf40: 0x03aa, 0xf41: 0x03aa, 0xf42: 0x03b3, 0xf43: 0x03b3, 0xf44: 0x03b0, 0xf45: 0x03b0,\n\t0xf46: 0x03b6, 0xf47: 0x03b6, 0xf48: 0x03ad, 0xf49: 0x03ad, 0xf4a: 0x03bc, 0xf4b: 0x03bc,\n\t0xf4c: 0x03b9, 0xf4d: 0x03b9, 0xf4e: 0x03c8, 0xf4f: 0x03c8, 0xf50: 0x03c8, 0xf51: 0x03c8,\n\t0xf52: 0x03ce, 0xf53: 0x03ce, 0xf54: 0x03ce, 0xf55: 0x03ce, 0xf56: 0x03d4, 0xf57: 0x03d4,\n\t0xf58: 0x03d4, 0xf59: 0x03d4, 0xf5a: 0x03d1, 0xf5b: 0x03d1, 0xf5c: 0x03d1, 0xf5d: 0x03d1,\n\t0xf5e: 0x03d7, 0xf5f: 0x03d7, 0xf60: 0x03da, 0xf61: 0x03da, 0xf62: 0x03da, 0xf63: 0x03da,\n\t0xf64: 0x456d, 0xf65: 0x456d, 0xf66: 0x03e0, 0xf67: 0x03e0, 0xf68: 0x03e0, 0xf69: 0x03e0,\n\t0xf6a: 0x03dd, 0xf6b: 0x03dd, 0xf6c: 0x03dd, 0xf6d: 0x03dd, 0xf6e: 0x03fb, 0xf6f: 0x03fb,\n\t0xf70: 0x4567, 0xf71: 0x4567,\n\t// Block 0x3e, offset 0xf80\n\t0xf93: 0x03cb, 0xf94: 0x03cb, 0xf95: 0x03cb, 0xf96: 0x03cb, 0xf97: 0x03e9,\n\t0xf98: 0x03e9, 0xf99: 0x03e6, 0xf9a: 0x03e6, 0xf9b: 0x03ec, 0xf9c: 0x03ec, 0xf9d: 0x217f,\n\t0xf9e: 0x03f2, 0xf9f: 0x03f2, 0xfa0: 0x03e3, 0xfa1: 0x03e3, 0xfa2: 0x03ef, 0xfa3: 0x03ef,\n\t0xfa4: 0x03f8, 0xfa5: 0x03f8, 0xfa6: 0x03f8, 0xfa7: 0x03f8, 0xfa8: 0x0380, 0xfa9: 0x0380,\n\t0xfaa: 0x26da, 0xfab: 0x26da, 0xfac: 0x274a, 0xfad: 0x274a, 0xfae: 0x2719, 0xfaf: 0x2719,\n\t0xfb0: 0x2735, 0xfb1: 0x2735, 0xfb2: 0x272e, 0xfb3: 0x272e, 0xfb4: 0x273c, 0xfb5: 0x273c,\n\t0xfb6: 0x2743, 0xfb7: 0x2743, 0xfb8: 0x2743, 0xfb9: 0x2720, 0xfba: 0x2720, 0xfbb: 0x2720,\n\t0xfbc: 0x03f5, 0xfbd: 0x03f5, 0xfbe: 0x03f5, 0xfbf: 0x03f5,\n\t// Block 0x3f, offset 0xfc0\n\t0xfc0: 0x26e1, 0xfc1: 0x26e8, 0xfc2: 0x2704, 0xfc3: 0x2720, 0xfc4: 0x2727, 0xfc5: 0x1eb9,\n\t0xfc6: 0x1ebe, 0xfc7: 0x1ec3, 0xfc8: 0x1ed2, 0xfc9: 0x1ee1, 0xfca: 0x1ee6, 0xfcb: 0x1eeb,\n\t0xfcc: 0x1ef0, 0xfcd: 0x1ef5, 0xfce: 0x1f04, 0xfcf: 0x1f13, 0xfd0: 0x1f18, 0xfd1: 0x1f1d,\n\t0xfd2: 0x1f2c, 0xfd3: 0x1f3b, 0xfd4: 0x1f40, 0xfd5: 0x1f45, 0xfd6: 0x1f4a, 0xfd7: 0x1f59,\n\t0xfd8: 0x1f5e, 0xfd9: 0x1f6d, 0xfda: 0x1f72, 0xfdb: 0x1f77, 0xfdc: 0x1f86, 0xfdd: 0x1f8b,\n\t0xfde: 0x1f90, 0xfdf: 0x1f9a, 0xfe0: 0x1fd6, 0xfe1: 0x1fe5, 0xfe2: 0x1ff4, 0xfe3: 0x1ff9,\n\t0xfe4: 0x1ffe, 0xfe5: 0x2008, 0xfe6: 0x2017, 0xfe7: 0x201c, 0xfe8: 0x202b, 0xfe9: 0x2030,\n\t0xfea: 0x2035, 0xfeb: 0x2044, 0xfec: 0x2049, 0xfed: 0x2058, 0xfee: 0x205d, 0xfef: 0x2062,\n\t0xff0: 0x2067, 0xff1: 0x206c, 0xff2: 0x2071, 0xff3: 0x2076, 0xff4: 0x207b, 0xff5: 0x2080,\n\t0xff6: 0x2085, 0xff7: 0x208a, 0xff8: 0x208f, 0xff9: 0x2094, 0xffa: 0x2099, 0xffb: 0x209e,\n\t0xffc: 0x20a3, 0xffd: 0x20a8, 0xffe: 0x20ad, 0xfff: 0x20b7,\n\t// Block 0x40, offset 0x1000\n\t0x1000: 0x20bc, 0x1001: 0x20c1, 0x1002: 0x20c6, 0x1003: 0x20d0, 0x1004: 0x20d5, 0x1005: 0x20df,\n\t0x1006: 0x20e4, 0x1007: 0x20e9, 0x1008: 0x20ee, 0x1009: 0x20f3, 0x100a: 0x20f8, 0x100b: 0x20fd,\n\t0x100c: 0x2102, 0x100d: 0x2107, 0x100e: 0x2116, 0x100f: 0x2125, 0x1010: 0x212a, 0x1011: 0x212f,\n\t0x1012: 0x2134, 0x1013: 0x2139, 0x1014: 0x213e, 0x1015: 0x2148, 0x1016: 0x214d, 0x1017: 0x2152,\n\t0x1018: 0x2161, 0x1019: 0x2170, 0x101a: 0x2175, 0x101b: 0x451f, 0x101c: 0x4525, 0x101d: 0x455b,\n\t0x101e: 0x45b2, 0x101f: 0x45b9, 0x1020: 0x45c0, 0x1021: 0x45c7, 0x1022: 0x45ce, 0x1023: 0x45d5,\n\t0x1024: 0x26f6, 0x1025: 0x26fd, 0x1026: 0x2704, 0x1027: 0x270b, 0x1028: 0x2720, 0x1029: 0x2727,\n\t0x102a: 0x1ec8, 0x102b: 0x1ecd, 0x102c: 0x1ed2, 0x102d: 0x1ed7, 0x102e: 0x1ee1, 0x102f: 0x1ee6,\n\t0x1030: 0x1efa, 0x1031: 0x1eff, 0x1032: 0x1f04, 0x1033: 0x1f09, 0x1034: 0x1f13, 0x1035: 0x1f18,\n\t0x1036: 0x1f22, 0x1037: 0x1f27, 0x1038: 0x1f2c, 0x1039: 0x1f31, 0x103a: 0x1f3b, 0x103b: 0x1f40,\n\t0x103c: 0x206c, 0x103d: 0x2071, 0x103e: 0x2080, 0x103f: 0x2085,\n\t// Block 0x41, offset 0x1040\n\t0x1040: 0x208a, 0x1041: 0x209e, 0x1042: 0x20a3, 0x1043: 0x20a8, 0x1044: 0x20ad, 0x1045: 0x20c6,\n\t0x1046: 0x20d0, 0x1047: 0x20d5, 0x1048: 0x20da, 0x1049: 0x20ee, 0x104a: 0x210c, 0x104b: 0x2111,\n\t0x104c: 0x2116, 0x104d: 0x211b, 0x104e: 0x2125, 0x104f: 0x212a, 0x1050: 0x455b, 0x1051: 0x2157,\n\t0x1052: 0x215c, 0x1053: 0x2161, 0x1054: 0x2166, 0x1055: 0x2170, 0x1056: 0x2175, 0x1057: 0x26e1,\n\t0x1058: 0x26e8, 0x1059: 0x26ef, 0x105a: 0x2704, 0x105b: 0x2712, 0x105c: 0x1eb9, 0x105d: 0x1ebe,\n\t0x105e: 0x1ec3, 0x105f: 0x1ed2, 0x1060: 0x1edc, 0x1061: 0x1eeb, 0x1062: 0x1ef0, 0x1063: 0x1ef5,\n\t0x1064: 0x1f04, 0x1065: 0x1f0e, 0x1066: 0x1f2c, 0x1067: 0x1f45, 0x1068: 0x1f4a, 0x1069: 0x1f59,\n\t0x106a: 0x1f5e, 0x106b: 0x1f6d, 0x106c: 0x1f77, 0x106d: 0x1f86, 0x106e: 0x1f8b, 0x106f: 0x1f90,\n\t0x1070: 0x1f9a, 0x1071: 0x1fd6, 0x1072: 0x1fdb, 0x1073: 0x1fe5, 0x1074: 0x1ff4, 0x1075: 0x1ff9,\n\t0x1076: 0x1ffe, 0x1077: 0x2008, 0x1078: 0x2017, 0x1079: 0x202b, 0x107a: 0x2030, 0x107b: 0x2035,\n\t0x107c: 0x2044, 0x107d: 0x2049, 0x107e: 0x2058, 0x107f: 0x205d,\n\t// Block 0x42, offset 0x1080\n\t0x1080: 0x2062, 0x1081: 0x2067, 0x1082: 0x2076, 0x1083: 0x207b, 0x1084: 0x208f, 0x1085: 0x2094,\n\t0x1086: 0x2099, 0x1087: 0x209e, 0x1088: 0x20a3, 0x1089: 0x20b7, 0x108a: 0x20bc, 0x108b: 0x20c1,\n\t0x108c: 0x20c6, 0x108d: 0x20cb, 0x108e: 0x20df, 0x108f: 0x20e4, 0x1090: 0x20e9, 0x1091: 0x20ee,\n\t0x1092: 0x20fd, 0x1093: 0x2102, 0x1094: 0x2107, 0x1095: 0x2116, 0x1096: 0x2120, 0x1097: 0x212f,\n\t0x1098: 0x2134, 0x1099: 0x454f, 0x109a: 0x2148, 0x109b: 0x214d, 0x109c: 0x2152, 0x109d: 0x2161,\n\t0x109e: 0x216b, 0x109f: 0x2704, 0x10a0: 0x2712, 0x10a1: 0x1ed2, 0x10a2: 0x1edc, 0x10a3: 0x1f04,\n\t0x10a4: 0x1f0e, 0x10a5: 0x1f2c, 0x10a6: 0x1f36, 0x10a7: 0x1f9a, 0x10a8: 0x1f9f, 0x10a9: 0x1fc2,\n\t0x10aa: 0x1fc7, 0x10ab: 0x209e, 0x10ac: 0x20a3, 0x10ad: 0x20c6, 0x10ae: 0x2116, 0x10af: 0x2120,\n\t0x10b0: 0x2161, 0x10b1: 0x216b, 0x10b2: 0x4603, 0x10b3: 0x460b, 0x10b4: 0x4613, 0x10b5: 0x2021,\n\t0x10b6: 0x2026, 0x10b7: 0x203a, 0x10b8: 0x203f, 0x10b9: 0x204e, 0x10ba: 0x2053, 0x10bb: 0x1fa4,\n\t0x10bc: 0x1fa9, 0x10bd: 0x1fcc, 0x10be: 0x1fd1, 0x10bf: 0x1f63,\n\t// Block 0x43, offset 0x10c0\n\t0x10c0: 0x1f68, 0x10c1: 0x1f4f, 0x10c2: 0x1f54, 0x10c3: 0x1f7c, 0x10c4: 0x1f81, 0x10c5: 0x1fea,\n\t0x10c6: 0x1fef, 0x10c7: 0x200d, 0x10c8: 0x2012, 0x10c9: 0x1fae, 0x10ca: 0x1fb3, 0x10cb: 0x1fb8,\n\t0x10cc: 0x1fc2, 0x10cd: 0x1fbd, 0x10ce: 0x1f95, 0x10cf: 0x1fe0, 0x10d0: 0x2003, 0x10d1: 0x2021,\n\t0x10d2: 0x2026, 0x10d3: 0x203a, 0x10d4: 0x203f, 0x10d5: 0x204e, 0x10d6: 0x2053, 0x10d7: 0x1fa4,\n\t0x10d8: 0x1fa9, 0x10d9: 0x1fcc, 0x10da: 0x1fd1, 0x10db: 0x1f63, 0x10dc: 0x1f68, 0x10dd: 0x1f4f,\n\t0x10de: 0x1f54, 0x10df: 0x1f7c, 0x10e0: 0x1f81, 0x10e1: 0x1fea, 0x10e2: 0x1fef, 0x10e3: 0x200d,\n\t0x10e4: 0x2012, 0x10e5: 0x1fae, 0x10e6: 0x1fb3, 0x10e7: 0x1fb8, 0x10e8: 0x1fc2, 0x10e9: 0x1fbd,\n\t0x10ea: 0x1f95, 0x10eb: 0x1fe0, 0x10ec: 0x2003, 0x10ed: 0x1fae, 0x10ee: 0x1fb3, 0x10ef: 0x1fb8,\n\t0x10f0: 0x1fc2, 0x10f1: 0x1f9f, 0x10f2: 0x1fc7, 0x10f3: 0x201c, 0x10f4: 0x1f86, 0x10f5: 0x1f8b,\n\t0x10f6: 0x1f90, 0x10f7: 0x1fae, 0x10f8: 0x1fb3, 0x10f9: 0x1fb8, 0x10fa: 0x201c, 0x10fb: 0x202b,\n\t0x10fc: 0x4507, 0x10fd: 0x4507,\n\t// Block 0x44, offset 0x1100\n\t0x1110: 0x2441, 0x1111: 0x2456,\n\t0x1112: 0x2456, 0x1113: 0x245d, 0x1114: 0x2464, 0x1115: 0x2479, 0x1116: 0x2480, 0x1117: 0x2487,\n\t0x1118: 0x24aa, 0x1119: 0x24aa, 0x111a: 0x24cd, 0x111b: 0x24c6, 0x111c: 0x24e2, 0x111d: 0x24d4,\n\t0x111e: 0x24db, 0x111f: 0x24fe, 0x1120: 0x24fe, 0x1121: 0x24f7, 0x1122: 0x2505, 0x1123: 0x2505,\n\t0x1124: 0x252f, 0x1125: 0x252f, 0x1126: 0x254b, 0x1127: 0x2513, 0x1128: 0x2513, 0x1129: 0x250c,\n\t0x112a: 0x2521, 0x112b: 0x2521, 0x112c: 0x2528, 0x112d: 0x2528, 0x112e: 0x2552, 0x112f: 0x2560,\n\t0x1130: 0x2560, 0x1131: 0x2567, 0x1132: 0x2567, 0x1133: 0x256e, 0x1134: 0x2575, 0x1135: 0x257c,\n\t0x1136: 0x2583, 0x1137: 0x2583, 0x1138: 0x258a, 0x1139: 0x2598, 0x113a: 0x25a6, 0x113b: 0x259f,\n\t0x113c: 0x25ad, 0x113d: 0x25ad, 0x113e: 0x25c2, 0x113f: 0x25c9,\n\t// Block 0x45, offset 0x1140\n\t0x1140: 0x25fa, 0x1141: 0x2608, 0x1142: 0x2601, 0x1143: 0x25e5, 0x1144: 0x25e5, 0x1145: 0x260f,\n\t0x1146: 0x260f, 0x1147: 0x2616, 0x1148: 0x2616, 0x1149: 0x2640, 0x114a: 0x2647, 0x114b: 0x264e,\n\t0x114c: 0x2624, 0x114d: 0x2632, 0x114e: 0x2655, 0x114f: 0x265c,\n\t0x1152: 0x262b, 0x1153: 0x26b0, 0x1154: 0x26b7, 0x1155: 0x268d, 0x1156: 0x2694, 0x1157: 0x2678,\n\t0x1158: 0x2678, 0x1159: 0x267f, 0x115a: 0x26a9, 0x115b: 0x26a2, 0x115c: 0x26cc, 0x115d: 0x26cc,\n\t0x115e: 0x243a, 0x115f: 0x244f, 0x1160: 0x2448, 0x1161: 0x2472, 0x1162: 0x246b, 0x1163: 0x2495,\n\t0x1164: 0x248e, 0x1165: 0x24b8, 0x1166: 0x249c, 0x1167: 0x24b1, 0x1168: 0x24e9, 0x1169: 0x2536,\n\t0x116a: 0x251a, 0x116b: 0x2559, 0x116c: 0x25f3, 0x116d: 0x261d, 0x116e: 0x26c5, 0x116f: 0x26be,\n\t0x1170: 0x26d3, 0x1171: 0x266a, 0x1172: 0x25d0, 0x1173: 0x269b, 0x1174: 0x25c2, 0x1175: 0x25fa,\n\t0x1176: 0x2591, 0x1177: 0x25de, 0x1178: 0x2671, 0x1179: 0x2663, 0x117a: 0x25ec, 0x117b: 0x25d7,\n\t0x117c: 0x25ec, 0x117d: 0x2671, 0x117e: 0x24a3, 0x117f: 0x24bf,\n\t// Block 0x46, offset 0x1180\n\t0x1180: 0x2639, 0x1181: 0x25b4, 0x1182: 0x2433, 0x1183: 0x25d7, 0x1184: 0x257c, 0x1185: 0x254b,\n\t0x1186: 0x24f0, 0x1187: 0x2686,\n\t0x11b0: 0x2544, 0x11b1: 0x25bb, 0x11b2: 0x28f6, 0x11b3: 0x28ed, 0x11b4: 0x2923, 0x11b5: 0x2911,\n\t0x11b6: 0x28ff, 0x11b7: 0x291a, 0x11b8: 0x292c, 0x11b9: 0x253d, 0x11ba: 0x2db3, 0x11bb: 0x2c33,\n\t0x11bc: 0x2908,\n\t// Block 0x47, offset 0x11c0\n\t0x11d0: 0x0019, 0x11d1: 0x057e,\n\t0x11d2: 0x0582, 0x11d3: 0x0035, 0x11d4: 0x0037, 0x11d5: 0x0003, 0x11d6: 0x003f, 0x11d7: 0x05ba,\n\t0x11d8: 0x05be, 0x11d9: 0x1c8c,\n\t0x11e0: 0x8133, 0x11e1: 0x8133, 0x11e2: 0x8133, 0x11e3: 0x8133,\n\t0x11e4: 0x8133, 0x11e5: 0x8133, 0x11e6: 0x8133, 0x11e7: 0x812e, 0x11e8: 0x812e, 0x11e9: 0x812e,\n\t0x11ea: 0x812e, 0x11eb: 0x812e, 0x11ec: 0x812e, 0x11ed: 0x812e, 0x11ee: 0x8133, 0x11ef: 0x8133,\n\t0x11f0: 0x19a0, 0x11f1: 0x053a, 0x11f2: 0x0536, 0x11f3: 0x007f, 0x11f4: 0x007f, 0x11f5: 0x0011,\n\t0x11f6: 0x0013, 0x11f7: 0x00b7, 0x11f8: 0x00bb, 0x11f9: 0x05b2, 0x11fa: 0x05b6, 0x11fb: 0x05a6,\n\t0x11fc: 0x05aa, 0x11fd: 0x058e, 0x11fe: 0x0592, 0x11ff: 0x0586,\n\t// Block 0x48, offset 0x1200\n\t0x1200: 0x058a, 0x1201: 0x0596, 0x1202: 0x059a, 0x1203: 0x059e, 0x1204: 0x05a2,\n\t0x1207: 0x0077, 0x1208: 0x007b, 0x1209: 0x4368, 0x120a: 0x4368, 0x120b: 0x4368,\n\t0x120c: 0x4368, 0x120d: 0x007f, 0x120e: 0x007f, 0x120f: 0x007f, 0x1210: 0x0019, 0x1211: 0x057e,\n\t0x1212: 0x001d, 0x1214: 0x0037, 0x1215: 0x0035, 0x1216: 0x003f, 0x1217: 0x0003,\n\t0x1218: 0x053a, 0x1219: 0x0011, 0x121a: 0x0013, 0x121b: 0x00b7, 0x121c: 0x00bb, 0x121d: 0x05b2,\n\t0x121e: 0x05b6, 0x121f: 0x0007, 0x1220: 0x000d, 0x1221: 0x0015, 0x1222: 0x0017, 0x1223: 0x001b,\n\t0x1224: 0x0039, 0x1225: 0x003d, 0x1226: 0x003b, 0x1228: 0x0079, 0x1229: 0x0009,\n\t0x122a: 0x000b, 0x122b: 0x0041,\n\t0x1230: 0x43a9, 0x1231: 0x452b, 0x1232: 0x43ae, 0x1234: 0x43b3,\n\t0x1236: 0x43b8, 0x1237: 0x4531, 0x1238: 0x43bd, 0x1239: 0x4537, 0x123a: 0x43c2, 0x123b: 0x453d,\n\t0x123c: 0x43c7, 0x123d: 0x4543, 0x123e: 0x43cc, 0x123f: 0x4549,\n\t// Block 0x49, offset 0x1240\n\t0x1240: 0x0329, 0x1241: 0x450d, 0x1242: 0x450d, 0x1243: 0x4513, 0x1244: 0x4513, 0x1245: 0x4555,\n\t0x1246: 0x4555, 0x1247: 0x4519, 0x1248: 0x4519, 0x1249: 0x4561, 0x124a: 0x4561, 0x124b: 0x4561,\n\t0x124c: 0x4561, 0x124d: 0x032c, 0x124e: 0x032c, 0x124f: 0x032f, 0x1250: 0x032f, 0x1251: 0x032f,\n\t0x1252: 0x032f, 0x1253: 0x0332, 0x1254: 0x0332, 0x1255: 0x0335, 0x1256: 0x0335, 0x1257: 0x0335,\n\t0x1258: 0x0335, 0x1259: 0x0338, 0x125a: 0x0338, 0x125b: 0x0338, 0x125c: 0x0338, 0x125d: 0x033b,\n\t0x125e: 0x033b, 0x125f: 0x033b, 0x1260: 0x033b, 0x1261: 0x033e, 0x1262: 0x033e, 0x1263: 0x033e,\n\t0x1264: 0x033e, 0x1265: 0x0341, 0x1266: 0x0341, 0x1267: 0x0341, 0x1268: 0x0341, 0x1269: 0x0344,\n\t0x126a: 0x0344, 0x126b: 0x0347, 0x126c: 0x0347, 0x126d: 0x034a, 0x126e: 0x034a, 0x126f: 0x034d,\n\t0x1270: 0x034d, 0x1271: 0x0350, 0x1272: 0x0350, 0x1273: 0x0350, 0x1274: 0x0350, 0x1275: 0x0353,\n\t0x1276: 0x0353, 0x1277: 0x0353, 0x1278: 0x0353, 0x1279: 0x0356, 0x127a: 0x0356, 0x127b: 0x0356,\n\t0x127c: 0x0356, 0x127d: 0x0359, 0x127e: 0x0359, 0x127f: 0x0359,\n\t// Block 0x4a, offset 0x1280\n\t0x1280: 0x0359, 0x1281: 0x035c, 0x1282: 0x035c, 0x1283: 0x035c, 0x1284: 0x035c, 0x1285: 0x035f,\n\t0x1286: 0x035f, 0x1287: 0x035f, 0x1288: 0x035f, 0x1289: 0x0362, 0x128a: 0x0362, 0x128b: 0x0362,\n\t0x128c: 0x0362, 0x128d: 0x0365, 0x128e: 0x0365, 0x128f: 0x0365, 0x1290: 0x0365, 0x1291: 0x0368,\n\t0x1292: 0x0368, 0x1293: 0x0368, 0x1294: 0x0368, 0x1295: 0x036b, 0x1296: 0x036b, 0x1297: 0x036b,\n\t0x1298: 0x036b, 0x1299: 0x036e, 0x129a: 0x036e, 0x129b: 0x036e, 0x129c: 0x036e, 0x129d: 0x0371,\n\t0x129e: 0x0371, 0x129f: 0x0371, 0x12a0: 0x0371, 0x12a1: 0x0374, 0x12a2: 0x0374, 0x12a3: 0x0374,\n\t0x12a4: 0x0374, 0x12a5: 0x0377, 0x12a6: 0x0377, 0x12a7: 0x0377, 0x12a8: 0x0377, 0x12a9: 0x037a,\n\t0x12aa: 0x037a, 0x12ab: 0x037a, 0x12ac: 0x037a, 0x12ad: 0x037d, 0x12ae: 0x037d, 0x12af: 0x0380,\n\t0x12b0: 0x0380, 0x12b1: 0x0383, 0x12b2: 0x0383, 0x12b3: 0x0383, 0x12b4: 0x0383, 0x12b5: 0x2de7,\n\t0x12b6: 0x2de7, 0x12b7: 0x2def, 0x12b8: 0x2def, 0x12b9: 0x2df7, 0x12ba: 0x2df7, 0x12bb: 0x20b2,\n\t0x12bc: 0x20b2,\n\t// Block 0x4b, offset 0x12c0\n\t0x12c0: 0x0081, 0x12c1: 0x0083, 0x12c2: 0x0085, 0x12c3: 0x0087, 0x12c4: 0x0089, 0x12c5: 0x008b,\n\t0x12c6: 0x008d, 0x12c7: 0x008f, 0x12c8: 0x0091, 0x12c9: 0x0093, 0x12ca: 0x0095, 0x12cb: 0x0097,\n\t0x12cc: 0x0099, 0x12cd: 0x009b, 0x12ce: 0x009d, 0x12cf: 0x009f, 0x12d0: 0x00a1, 0x12d1: 0x00a3,\n\t0x12d2: 0x00a5, 0x12d3: 0x00a7, 0x12d4: 0x00a9, 0x12d5: 0x00ab, 0x12d6: 0x00ad, 0x12d7: 0x00af,\n\t0x12d8: 0x00b1, 0x12d9: 0x00b3, 0x12da: 0x00b5, 0x12db: 0x00b7, 0x12dc: 0x00b9, 0x12dd: 0x00bb,\n\t0x12de: 0x00bd, 0x12df: 0x056e, 0x12e0: 0x0572, 0x12e1: 0x0582, 0x12e2: 0x0596, 0x12e3: 0x059a,\n\t0x12e4: 0x057e, 0x12e5: 0x06a6, 0x12e6: 0x069e, 0x12e7: 0x05c2, 0x12e8: 0x05ca, 0x12e9: 0x05d2,\n\t0x12ea: 0x05da, 0x12eb: 0x05e2, 0x12ec: 0x0666, 0x12ed: 0x066e, 0x12ee: 0x0676, 0x12ef: 0x061a,\n\t0x12f0: 0x06aa, 0x12f1: 0x05c6, 0x12f2: 0x05ce, 0x12f3: 0x05d6, 0x12f4: 0x05de, 0x12f5: 0x05e6,\n\t0x12f6: 0x05ea, 0x12f7: 0x05ee, 0x12f8: 0x05f2, 0x12f9: 0x05f6, 0x12fa: 0x05fa, 0x12fb: 0x05fe,\n\t0x12fc: 0x0602, 0x12fd: 0x0606, 0x12fe: 0x060a, 0x12ff: 0x060e,\n\t// Block 0x4c, offset 0x1300\n\t0x1300: 0x0612, 0x1301: 0x0616, 0x1302: 0x061e, 0x1303: 0x0622, 0x1304: 0x0626, 0x1305: 0x062a,\n\t0x1306: 0x062e, 0x1307: 0x0632, 0x1308: 0x0636, 0x1309: 0x063a, 0x130a: 0x063e, 0x130b: 0x0642,\n\t0x130c: 0x0646, 0x130d: 0x064a, 0x130e: 0x064e, 0x130f: 0x0652, 0x1310: 0x0656, 0x1311: 0x065a,\n\t0x1312: 0x065e, 0x1313: 0x0662, 0x1314: 0x066a, 0x1315: 0x0672, 0x1316: 0x067a, 0x1317: 0x067e,\n\t0x1318: 0x0682, 0x1319: 0x0686, 0x131a: 0x068a, 0x131b: 0x068e, 0x131c: 0x0692, 0x131d: 0x06a2,\n\t0x131e: 0x4c99, 0x131f: 0x4c9f, 0x1320: 0x04b6, 0x1321: 0x0406, 0x1322: 0x040a, 0x1323: 0x4bcc,\n\t0x1324: 0x040e, 0x1325: 0x4bd2, 0x1326: 0x4bd8, 0x1327: 0x0412, 0x1328: 0x0416, 0x1329: 0x041a,\n\t0x132a: 0x4bde, 0x132b: 0x4be4, 0x132c: 0x4bea, 0x132d: 0x4bf0, 0x132e: 0x4bf6, 0x132f: 0x4bfc,\n\t0x1330: 0x045a, 0x1331: 0x041e, 0x1332: 0x0422, 0x1333: 0x0426, 0x1334: 0x046e, 0x1335: 0x042a,\n\t0x1336: 0x042e, 0x1337: 0x0432, 0x1338: 0x0436, 0x1339: 0x043a, 0x133a: 0x043e, 0x133b: 0x0442,\n\t0x133c: 0x0446, 0x133d: 0x044a, 0x133e: 0x044e,\n\t// Block 0x4d, offset 0x1340\n\t0x1342: 0x4b4e, 0x1343: 0x4b54, 0x1344: 0x4b5a, 0x1345: 0x4b60,\n\t0x1346: 0x4b66, 0x1347: 0x4b6c, 0x134a: 0x4b72, 0x134b: 0x4b78,\n\t0x134c: 0x4b7e, 0x134d: 0x4b84, 0x134e: 0x4b8a, 0x134f: 0x4b90,\n\t0x1352: 0x4b96, 0x1353: 0x4b9c, 0x1354: 0x4ba2, 0x1355: 0x4ba8, 0x1356: 0x4bae, 0x1357: 0x4bb4,\n\t0x135a: 0x4bba, 0x135b: 0x4bc0, 0x135c: 0x4bc6,\n\t0x1360: 0x00bf, 0x1361: 0x00c2, 0x1362: 0x00cb, 0x1363: 0x4363,\n\t0x1364: 0x00c8, 0x1365: 0x00c5, 0x1366: 0x053e, 0x1368: 0x0562, 0x1369: 0x0542,\n\t0x136a: 0x0546, 0x136b: 0x054a, 0x136c: 0x054e, 0x136d: 0x0566, 0x136e: 0x056a,\n\t// Block 0x4e, offset 0x1380\n\t0x1381: 0x01f1, 0x1382: 0x01f4, 0x1383: 0x00d4, 0x1384: 0x01be, 0x1385: 0x010d,\n\t0x1387: 0x01d3, 0x1388: 0x174e, 0x1389: 0x01d9, 0x138a: 0x01d6, 0x138b: 0x0116,\n\t0x138c: 0x0119, 0x138d: 0x0526, 0x138e: 0x011c, 0x138f: 0x0128, 0x1390: 0x01e5, 0x1391: 0x013a,\n\t0x1392: 0x0134, 0x1393: 0x012e, 0x1394: 0x01c1, 0x1395: 0x00e0, 0x1396: 0x01c4, 0x1397: 0x0143,\n\t0x1398: 0x0194, 0x1399: 0x01e8, 0x139a: 0x01eb, 0x139b: 0x0152, 0x139c: 0x1756, 0x139d: 0x1742,\n\t0x139e: 0x0158, 0x139f: 0x175b, 0x13a0: 0x01a9, 0x13a1: 0x1760, 0x13a2: 0x00da, 0x13a3: 0x0170,\n\t0x13a4: 0x0173, 0x13a5: 0x00a3, 0x13a6: 0x017c, 0x13a7: 0x1765, 0x13a8: 0x0182, 0x13a9: 0x0185,\n\t0x13aa: 0x0188, 0x13ab: 0x01e2, 0x13ac: 0x01dc, 0x13ad: 0x1752, 0x13ae: 0x01df, 0x13af: 0x0197,\n\t0x13b0: 0x0576, 0x13b2: 0x01ac, 0x13b3: 0x01cd, 0x13b4: 0x01d0, 0x13b5: 0x01bb,\n\t0x13b6: 0x00f5, 0x13b7: 0x00f8, 0x13b8: 0x00fb, 0x13b9: 0x176a, 0x13ba: 0x176f,\n\t// Block 0x4f, offset 0x13c0\n\t0x13c0: 0x0063, 0x13c1: 0x0065, 0x13c2: 0x0067, 0x13c3: 0x0069, 0x13c4: 0x006b, 0x13c5: 0x006d,\n\t0x13c6: 0x006f, 0x13c7: 0x0071, 0x13c8: 0x0073, 0x13c9: 0x0075, 0x13ca: 0x0083, 0x13cb: 0x0085,\n\t0x13cc: 0x0087, 0x13cd: 0x0089, 0x13ce: 0x008b, 0x13cf: 0x008d, 0x13d0: 0x008f, 0x13d1: 0x0091,\n\t0x13d2: 0x0093, 0x13d3: 0x0095, 0x13d4: 0x0097, 0x13d5: 0x0099, 0x13d6: 0x009b, 0x13d7: 0x009d,\n\t0x13d8: 0x009f, 0x13d9: 0x00a1, 0x13da: 0x00a3, 0x13db: 0x00a5, 0x13dc: 0x00a7, 0x13dd: 0x00a9,\n\t0x13de: 0x00ab, 0x13df: 0x00ad, 0x13e0: 0x00af, 0x13e1: 0x00b1, 0x13e2: 0x00b3, 0x13e3: 0x00b5,\n\t0x13e4: 0x00e3, 0x13e5: 0x0101, 0x13e8: 0x01f7, 0x13e9: 0x01fa,\n\t0x13ea: 0x01fd, 0x13eb: 0x0200, 0x13ec: 0x0203, 0x13ed: 0x0206, 0x13ee: 0x0209, 0x13ef: 0x020c,\n\t0x13f0: 0x020f, 0x13f1: 0x0212, 0x13f2: 0x0215, 0x13f3: 0x0218, 0x13f4: 0x021b, 0x13f5: 0x021e,\n\t0x13f6: 0x0221, 0x13f7: 0x0224, 0x13f8: 0x0227, 0x13f9: 0x020c, 0x13fa: 0x022a, 0x13fb: 0x022d,\n\t0x13fc: 0x0230, 0x13fd: 0x0233, 0x13fe: 0x0236, 0x13ff: 0x0239,\n\t// Block 0x50, offset 0x1400\n\t0x1400: 0x0281, 0x1401: 0x0284, 0x1402: 0x0287, 0x1403: 0x0552, 0x1404: 0x024b, 0x1405: 0x0254,\n\t0x1406: 0x025a, 0x1407: 0x027e, 0x1408: 0x026f, 0x1409: 0x026c, 0x140a: 0x028a, 0x140b: 0x028d,\n\t0x140e: 0x0021, 0x140f: 0x0023, 0x1410: 0x0025, 0x1411: 0x0027,\n\t0x1412: 0x0029, 0x1413: 0x002b, 0x1414: 0x002d, 0x1415: 0x002f, 0x1416: 0x0031, 0x1417: 0x0033,\n\t0x1418: 0x0021, 0x1419: 0x0023, 0x141a: 0x0025, 0x141b: 0x0027, 0x141c: 0x0029, 0x141d: 0x002b,\n\t0x141e: 0x002d, 0x141f: 0x002f, 0x1420: 0x0031, 0x1421: 0x0033, 0x1422: 0x0021, 0x1423: 0x0023,\n\t0x1424: 0x0025, 0x1425: 0x0027, 0x1426: 0x0029, 0x1427: 0x002b, 0x1428: 0x002d, 0x1429: 0x002f,\n\t0x142a: 0x0031, 0x142b: 0x0033, 0x142c: 0x0021, 0x142d: 0x0023, 0x142e: 0x0025, 0x142f: 0x0027,\n\t0x1430: 0x0029, 0x1431: 0x002b, 0x1432: 0x002d, 0x1433: 0x002f, 0x1434: 0x0031, 0x1435: 0x0033,\n\t0x1436: 0x0021, 0x1437: 0x0023, 0x1438: 0x0025, 0x1439: 0x0027, 0x143a: 0x0029, 0x143b: 0x002b,\n\t0x143c: 0x002d, 0x143d: 0x002f, 0x143e: 0x0031, 0x143f: 0x0033,\n\t// Block 0x51, offset 0x1440\n\t0x1440: 0x8133, 0x1441: 0x8133, 0x1442: 0x8133, 0x1443: 0x8133, 0x1444: 0x8133, 0x1445: 0x8133,\n\t0x1446: 0x8133, 0x1448: 0x8133, 0x1449: 0x8133, 0x144a: 0x8133, 0x144b: 0x8133,\n\t0x144c: 0x8133, 0x144d: 0x8133, 0x144e: 0x8133, 0x144f: 0x8133, 0x1450: 0x8133, 0x1451: 0x8133,\n\t0x1452: 0x8133, 0x1453: 0x8133, 0x1454: 0x8133, 0x1455: 0x8133, 0x1456: 0x8133, 0x1457: 0x8133,\n\t0x1458: 0x8133, 0x145b: 0x8133, 0x145c: 0x8133, 0x145d: 0x8133,\n\t0x145e: 0x8133, 0x145f: 0x8133, 0x1460: 0x8133, 0x1461: 0x8133, 0x1463: 0x8133,\n\t0x1464: 0x8133, 0x1466: 0x8133, 0x1467: 0x8133, 0x1468: 0x8133, 0x1469: 0x8133,\n\t0x146a: 0x8133,\n\t0x1470: 0x0290, 0x1471: 0x0293, 0x1472: 0x0296, 0x1473: 0x0299, 0x1474: 0x029c, 0x1475: 0x029f,\n\t0x1476: 0x02a2, 0x1477: 0x02a5, 0x1478: 0x02a8, 0x1479: 0x02ab, 0x147a: 0x02ae, 0x147b: 0x02b1,\n\t0x147c: 0x02b7, 0x147d: 0x02ba, 0x147e: 0x02bd, 0x147f: 0x02c0,\n\t// Block 0x52, offset 0x1480\n\t0x1480: 0x02c3, 0x1481: 0x02c6, 0x1482: 0x02c9, 0x1483: 0x02cc, 0x1484: 0x02cf, 0x1485: 0x02d2,\n\t0x1486: 0x02d5, 0x1487: 0x02db, 0x1488: 0x02e1, 0x1489: 0x02e4, 0x148a: 0x1736, 0x148b: 0x0302,\n\t0x148c: 0x02ea, 0x148d: 0x02ed, 0x148e: 0x0305, 0x148f: 0x02f9, 0x1490: 0x02ff, 0x1491: 0x0290,\n\t0x1492: 0x0293, 0x1493: 0x0296, 0x1494: 0x0299, 0x1495: 0x029c, 0x1496: 0x029f, 0x1497: 0x02a2,\n\t0x1498: 0x02a5, 0x1499: 0x02a8, 0x149a: 0x02ab, 0x149b: 0x02ae, 0x149c: 0x02b7, 0x149d: 0x02ba,\n\t0x149e: 0x02c0, 0x149f: 0x02c6, 0x14a0: 0x02c9, 0x14a1: 0x02cc, 0x14a2: 0x02cf, 0x14a3: 0x02d2,\n\t0x14a4: 0x02d5, 0x14a5: 0x02d8, 0x14a6: 0x02db, 0x14a7: 0x02f3, 0x14a8: 0x02ea, 0x14a9: 0x02e7,\n\t0x14aa: 0x02f0, 0x14ab: 0x02f6, 0x14ac: 0x1732, 0x14ad: 0x02fc,\n\t// Block 0x53, offset 0x14c0\n\t0x14c0: 0x032c, 0x14c1: 0x032f, 0x14c2: 0x033b, 0x14c3: 0x0344, 0x14c5: 0x037d,\n\t0x14c6: 0x034d, 0x14c7: 0x033e, 0x14c8: 0x035c, 0x14c9: 0x0383, 0x14ca: 0x036e, 0x14cb: 0x0371,\n\t0x14cc: 0x0374, 0x14cd: 0x0377, 0x14ce: 0x0350, 0x14cf: 0x0362, 0x14d0: 0x0368, 0x14d1: 0x0356,\n\t0x14d2: 0x036b, 0x14d3: 0x034a, 0x14d4: 0x0353, 0x14d5: 0x0335, 0x14d6: 0x0338, 0x14d7: 0x0341,\n\t0x14d8: 0x0347, 0x14d9: 0x0359, 0x14da: 0x035f, 0x14db: 0x0365, 0x14dc: 0x0386, 0x14dd: 0x03d7,\n\t0x14de: 0x03bf, 0x14df: 0x0389, 0x14e1: 0x032f, 0x14e2: 0x033b,\n\t0x14e4: 0x037a, 0x14e7: 0x033e, 0x14e9: 0x0383,\n\t0x14ea: 0x036e, 0x14eb: 0x0371, 0x14ec: 0x0374, 0x14ed: 0x0377, 0x14ee: 0x0350, 0x14ef: 0x0362,\n\t0x14f0: 0x0368, 0x14f1: 0x0356, 0x14f2: 0x036b, 0x14f4: 0x0353, 0x14f5: 0x0335,\n\t0x14f6: 0x0338, 0x14f7: 0x0341, 0x14f9: 0x0359, 0x14fb: 0x0365,\n\t// Block 0x54, offset 0x1500\n\t0x1502: 0x033b,\n\t0x1507: 0x033e, 0x1509: 0x0383, 0x150b: 0x0371,\n\t0x150d: 0x0377, 0x150e: 0x0350, 0x150f: 0x0362, 0x1511: 0x0356,\n\t0x1512: 0x036b, 0x1514: 0x0353, 0x1517: 0x0341,\n\t0x1519: 0x0359, 0x151b: 0x0365, 0x151d: 0x03d7,\n\t0x151f: 0x0389, 0x1521: 0x032f, 0x1522: 0x033b,\n\t0x1524: 0x037a, 0x1527: 0x033e, 0x1528: 0x035c, 0x1529: 0x0383,\n\t0x152a: 0x036e, 0x152c: 0x0374, 0x152d: 0x0377, 0x152e: 0x0350, 0x152f: 0x0362,\n\t0x1530: 0x0368, 0x1531: 0x0356, 0x1532: 0x036b, 0x1534: 0x0353, 0x1535: 0x0335,\n\t0x1536: 0x0338, 0x1537: 0x0341, 0x1539: 0x0359, 0x153a: 0x035f, 0x153b: 0x0365,\n\t0x153c: 0x0386, 0x153e: 0x03bf,\n\t// Block 0x55, offset 0x1540\n\t0x1540: 0x032c, 0x1541: 0x032f, 0x1542: 0x033b, 0x1543: 0x0344, 0x1544: 0x037a, 0x1545: 0x037d,\n\t0x1546: 0x034d, 0x1547: 0x033e, 0x1548: 0x035c, 0x1549: 0x0383, 0x154b: 0x0371,\n\t0x154c: 0x0374, 0x154d: 0x0377, 0x154e: 0x0350, 0x154f: 0x0362, 0x1550: 0x0368, 0x1551: 0x0356,\n\t0x1552: 0x036b, 0x1553: 0x034a, 0x1554: 0x0353, 0x1555: 0x0335, 0x1556: 0x0338, 0x1557: 0x0341,\n\t0x1558: 0x0347, 0x1559: 0x0359, 0x155a: 0x035f, 0x155b: 0x0365,\n\t0x1561: 0x032f, 0x1562: 0x033b, 0x1563: 0x0344,\n\t0x1565: 0x037d, 0x1566: 0x034d, 0x1567: 0x033e, 0x1568: 0x035c, 0x1569: 0x0383,\n\t0x156b: 0x0371, 0x156c: 0x0374, 0x156d: 0x0377, 0x156e: 0x0350, 0x156f: 0x0362,\n\t0x1570: 0x0368, 0x1571: 0x0356, 0x1572: 0x036b, 0x1573: 0x034a, 0x1574: 0x0353, 0x1575: 0x0335,\n\t0x1576: 0x0338, 0x1577: 0x0341, 0x1578: 0x0347, 0x1579: 0x0359, 0x157a: 0x035f, 0x157b: 0x0365,\n\t// Block 0x56, offset 0x1580\n\t0x1580: 0x19a6, 0x1581: 0x19a3, 0x1582: 0x19a9, 0x1583: 0x19cd, 0x1584: 0x19f1, 0x1585: 0x1a15,\n\t0x1586: 0x1a39, 0x1587: 0x1a42, 0x1588: 0x1a48, 0x1589: 0x1a4e, 0x158a: 0x1a54,\n\t0x1590: 0x1bbc, 0x1591: 0x1bc0,\n\t0x1592: 0x1bc4, 0x1593: 0x1bc8, 0x1594: 0x1bcc, 0x1595: 0x1bd0, 0x1596: 0x1bd4, 0x1597: 0x1bd8,\n\t0x1598: 0x1bdc, 0x1599: 0x1be0, 0x159a: 0x1be4, 0x159b: 0x1be8, 0x159c: 0x1bec, 0x159d: 0x1bf0,\n\t0x159e: 0x1bf4, 0x159f: 0x1bf8, 0x15a0: 0x1bfc, 0x15a1: 0x1c00, 0x15a2: 0x1c04, 0x15a3: 0x1c08,\n\t0x15a4: 0x1c0c, 0x15a5: 0x1c10, 0x15a6: 0x1c14, 0x15a7: 0x1c18, 0x15a8: 0x1c1c, 0x15a9: 0x1c20,\n\t0x15aa: 0x2855, 0x15ab: 0x0047, 0x15ac: 0x0065, 0x15ad: 0x1a69, 0x15ae: 0x1ae1,\n\t0x15b0: 0x0043, 0x15b1: 0x0045, 0x15b2: 0x0047, 0x15b3: 0x0049, 0x15b4: 0x004b, 0x15b5: 0x004d,\n\t0x15b6: 0x004f, 0x15b7: 0x0051, 0x15b8: 0x0053, 0x15b9: 0x0055, 0x15ba: 0x0057, 0x15bb: 0x0059,\n\t0x15bc: 0x005b, 0x15bd: 0x005d, 0x15be: 0x005f, 0x15bf: 0x0061,\n\t// Block 0x57, offset 0x15c0\n\t0x15c0: 0x27dd, 0x15c1: 0x27f2, 0x15c2: 0x05fe,\n\t0x15d0: 0x0d0a, 0x15d1: 0x0b42,\n\t0x15d2: 0x09ce, 0x15d3: 0x473b, 0x15d4: 0x0816, 0x15d5: 0x0aea, 0x15d6: 0x142a, 0x15d7: 0x0afa,\n\t0x15d8: 0x0822, 0x15d9: 0x0dd2, 0x15da: 0x0faa, 0x15db: 0x0daa, 0x15dc: 0x0922, 0x15dd: 0x0c66,\n\t0x15de: 0x08ba, 0x15df: 0x0db2, 0x15e0: 0x090e, 0x15e1: 0x1212, 0x15e2: 0x107e, 0x15e3: 0x1486,\n\t0x15e4: 0x0ace, 0x15e5: 0x0a06, 0x15e6: 0x0f5e, 0x15e7: 0x0d16, 0x15e8: 0x0d42, 0x15e9: 0x07ba,\n\t0x15ea: 0x07c6, 0x15eb: 0x1506, 0x15ec: 0x0bd6, 0x15ed: 0x07e2, 0x15ee: 0x09ea, 0x15ef: 0x0d36,\n\t0x15f0: 0x14ae, 0x15f1: 0x0d0e, 0x15f2: 0x116a, 0x15f3: 0x11a6, 0x15f4: 0x09f2, 0x15f5: 0x0f3e,\n\t0x15f6: 0x0e06, 0x15f7: 0x0e02, 0x15f8: 0x1092, 0x15f9: 0x0926, 0x15fa: 0x0a52, 0x15fb: 0x153e,\n\t// Block 0x58, offset 0x1600\n\t0x1600: 0x07f6, 0x1601: 0x07ee, 0x1602: 0x07fe, 0x1603: 0x1774, 0x1604: 0x0842, 0x1605: 0x0852,\n\t0x1606: 0x0856, 0x1607: 0x085e, 0x1608: 0x0866, 0x1609: 0x086a, 0x160a: 0x0876, 0x160b: 0x086e,\n\t0x160c: 0x06ae, 0x160d: 0x1788, 0x160e: 0x088a, 0x160f: 0x088e, 0x1610: 0x0892, 0x1611: 0x08ae,\n\t0x1612: 0x1779, 0x1613: 0x06b2, 0x1614: 0x089a, 0x1615: 0x08ba, 0x1616: 0x1783, 0x1617: 0x08ca,\n\t0x1618: 0x08d2, 0x1619: 0x0832, 0x161a: 0x08da, 0x161b: 0x08de, 0x161c: 0x195e, 0x161d: 0x08fa,\n\t0x161e: 0x0902, 0x161f: 0x06ba, 0x1620: 0x091a, 0x1621: 0x091e, 0x1622: 0x0926, 0x1623: 0x092a,\n\t0x1624: 0x06be, 0x1625: 0x0942, 0x1626: 0x0946, 0x1627: 0x0952, 0x1628: 0x095e, 0x1629: 0x0962,\n\t0x162a: 0x0966, 0x162b: 0x096e, 0x162c: 0x098e, 0x162d: 0x0992, 0x162e: 0x099a, 0x162f: 0x09aa,\n\t0x1630: 0x09b2, 0x1631: 0x09b6, 0x1632: 0x09b6, 0x1633: 0x09b6, 0x1634: 0x1797, 0x1635: 0x0f8e,\n\t0x1636: 0x09ca, 0x1637: 0x09d2, 0x1638: 0x179c, 0x1639: 0x09de, 0x163a: 0x09e6, 0x163b: 0x09ee,\n\t0x163c: 0x0a16, 0x163d: 0x0a02, 0x163e: 0x0a0e, 0x163f: 0x0a12,\n\t// Block 0x59, offset 0x1640\n\t0x1640: 0x0a1a, 0x1641: 0x0a22, 0x1642: 0x0a26, 0x1643: 0x0a2e, 0x1644: 0x0a36, 0x1645: 0x0a3a,\n\t0x1646: 0x0a3a, 0x1647: 0x0a42, 0x1648: 0x0a4a, 0x1649: 0x0a4e, 0x164a: 0x0a5a, 0x164b: 0x0a7e,\n\t0x164c: 0x0a62, 0x164d: 0x0a82, 0x164e: 0x0a66, 0x164f: 0x0a6e, 0x1650: 0x0906, 0x1651: 0x0aca,\n\t0x1652: 0x0a92, 0x1653: 0x0a96, 0x1654: 0x0a9a, 0x1655: 0x0a8e, 0x1656: 0x0aa2, 0x1657: 0x0a9e,\n\t0x1658: 0x0ab6, 0x1659: 0x17a1, 0x165a: 0x0ad2, 0x165b: 0x0ad6, 0x165c: 0x0ade, 0x165d: 0x0aea,\n\t0x165e: 0x0af2, 0x165f: 0x0b0e, 0x1660: 0x17a6, 0x1661: 0x17ab, 0x1662: 0x0b1a, 0x1663: 0x0b1e,\n\t0x1664: 0x0b22, 0x1665: 0x0b16, 0x1666: 0x0b2a, 0x1667: 0x06c2, 0x1668: 0x06c6, 0x1669: 0x0b32,\n\t0x166a: 0x0b3a, 0x166b: 0x0b3a, 0x166c: 0x17b0, 0x166d: 0x0b56, 0x166e: 0x0b5a, 0x166f: 0x0b5e,\n\t0x1670: 0x0b66, 0x1671: 0x17b5, 0x1672: 0x0b6e, 0x1673: 0x0b72, 0x1674: 0x0c4a, 0x1675: 0x0b7a,\n\t0x1676: 0x06ca, 0x1677: 0x0b86, 0x1678: 0x0b96, 0x1679: 0x0ba2, 0x167a: 0x0b9e, 0x167b: 0x17bf,\n\t0x167c: 0x0baa, 0x167d: 0x17c4, 0x167e: 0x0bb6, 0x167f: 0x0bb2,\n\t// Block 0x5a, offset 0x1680\n\t0x1680: 0x0bba, 0x1681: 0x0bca, 0x1682: 0x0bce, 0x1683: 0x06ce, 0x1684: 0x0bde, 0x1685: 0x0be6,\n\t0x1686: 0x0bea, 0x1687: 0x0bee, 0x1688: 0x06d2, 0x1689: 0x17c9, 0x168a: 0x06d6, 0x168b: 0x0c0a,\n\t0x168c: 0x0c0e, 0x168d: 0x0c12, 0x168e: 0x0c1a, 0x168f: 0x1990, 0x1690: 0x0c32, 0x1691: 0x17d3,\n\t0x1692: 0x17d3, 0x1693: 0x12d2, 0x1694: 0x0c42, 0x1695: 0x0c42, 0x1696: 0x06da, 0x1697: 0x17f6,\n\t0x1698: 0x18c8, 0x1699: 0x0c52, 0x169a: 0x0c5a, 0x169b: 0x06de, 0x169c: 0x0c6e, 0x169d: 0x0c7e,\n\t0x169e: 0x0c82, 0x169f: 0x0c8a, 0x16a0: 0x0c9a, 0x16a1: 0x06e6, 0x16a2: 0x06e2, 0x16a3: 0x0c9e,\n\t0x16a4: 0x17d8, 0x16a5: 0x0ca2, 0x16a6: 0x0cb6, 0x16a7: 0x0cba, 0x16a8: 0x0cbe, 0x16a9: 0x0cba,\n\t0x16aa: 0x0cca, 0x16ab: 0x0cce, 0x16ac: 0x0cde, 0x16ad: 0x0cd6, 0x16ae: 0x0cda, 0x16af: 0x0ce2,\n\t0x16b0: 0x0ce6, 0x16b1: 0x0cea, 0x16b2: 0x0cf6, 0x16b3: 0x0cfa, 0x16b4: 0x0d12, 0x16b5: 0x0d1a,\n\t0x16b6: 0x0d2a, 0x16b7: 0x0d3e, 0x16b8: 0x17e7, 0x16b9: 0x0d3a, 0x16ba: 0x0d2e, 0x16bb: 0x0d46,\n\t0x16bc: 0x0d4e, 0x16bd: 0x0d62, 0x16be: 0x17ec, 0x16bf: 0x0d6a,\n\t// Block 0x5b, offset 0x16c0\n\t0x16c0: 0x0d5e, 0x16c1: 0x0d56, 0x16c2: 0x06ea, 0x16c3: 0x0d72, 0x16c4: 0x0d7a, 0x16c5: 0x0d82,\n\t0x16c6: 0x0d76, 0x16c7: 0x06ee, 0x16c8: 0x0d92, 0x16c9: 0x0d9a, 0x16ca: 0x17f1, 0x16cb: 0x0dc6,\n\t0x16cc: 0x0dfa, 0x16cd: 0x0dd6, 0x16ce: 0x06fa, 0x16cf: 0x0de2, 0x16d0: 0x06f6, 0x16d1: 0x06f2,\n\t0x16d2: 0x08be, 0x16d3: 0x08c2, 0x16d4: 0x0dfe, 0x16d5: 0x0de6, 0x16d6: 0x12a6, 0x16d7: 0x075e,\n\t0x16d8: 0x0e0a, 0x16d9: 0x0e0e, 0x16da: 0x0e12, 0x16db: 0x0e26, 0x16dc: 0x0e1e, 0x16dd: 0x180a,\n\t0x16de: 0x06fe, 0x16df: 0x0e3a, 0x16e0: 0x0e2e, 0x16e1: 0x0e4a, 0x16e2: 0x0e52, 0x16e3: 0x1814,\n\t0x16e4: 0x0e56, 0x16e5: 0x0e42, 0x16e6: 0x0e5e, 0x16e7: 0x0702, 0x16e8: 0x0e62, 0x16e9: 0x0e66,\n\t0x16ea: 0x0e6a, 0x16eb: 0x0e76, 0x16ec: 0x1819, 0x16ed: 0x0e7e, 0x16ee: 0x0706, 0x16ef: 0x0e8a,\n\t0x16f0: 0x181e, 0x16f1: 0x0e8e, 0x16f2: 0x070a, 0x16f3: 0x0e9a, 0x16f4: 0x0ea6, 0x16f5: 0x0eb2,\n\t0x16f6: 0x0eb6, 0x16f7: 0x1823, 0x16f8: 0x17ba, 0x16f9: 0x1828, 0x16fa: 0x0ed6, 0x16fb: 0x182d,\n\t0x16fc: 0x0ee2, 0x16fd: 0x0eea, 0x16fe: 0x0eda, 0x16ff: 0x0ef6,\n\t// Block 0x5c, offset 0x1700\n\t0x1700: 0x0f06, 0x1701: 0x0f16, 0x1702: 0x0f0a, 0x1703: 0x0f0e, 0x1704: 0x0f1a, 0x1705: 0x0f1e,\n\t0x1706: 0x1832, 0x1707: 0x0f02, 0x1708: 0x0f36, 0x1709: 0x0f3a, 0x170a: 0x070e, 0x170b: 0x0f4e,\n\t0x170c: 0x0f4a, 0x170d: 0x1837, 0x170e: 0x0f2e, 0x170f: 0x0f6a, 0x1710: 0x183c, 0x1711: 0x1841,\n\t0x1712: 0x0f6e, 0x1713: 0x0f82, 0x1714: 0x0f7e, 0x1715: 0x0f7a, 0x1716: 0x0712, 0x1717: 0x0f86,\n\t0x1718: 0x0f96, 0x1719: 0x0f92, 0x171a: 0x0f9e, 0x171b: 0x177e, 0x171c: 0x0fae, 0x171d: 0x1846,\n\t0x171e: 0x0fba, 0x171f: 0x1850, 0x1720: 0x0fce, 0x1721: 0x0fda, 0x1722: 0x0fee, 0x1723: 0x1855,\n\t0x1724: 0x1002, 0x1725: 0x1006, 0x1726: 0x185a, 0x1727: 0x185f, 0x1728: 0x1022, 0x1729: 0x1032,\n\t0x172a: 0x0716, 0x172b: 0x1036, 0x172c: 0x071a, 0x172d: 0x071a, 0x172e: 0x104e, 0x172f: 0x1052,\n\t0x1730: 0x105a, 0x1731: 0x105e, 0x1732: 0x106a, 0x1733: 0x071e, 0x1734: 0x1082, 0x1735: 0x1864,\n\t0x1736: 0x109e, 0x1737: 0x1869, 0x1738: 0x10aa, 0x1739: 0x17ce, 0x173a: 0x10ba, 0x173b: 0x186e,\n\t0x173c: 0x1873, 0x173d: 0x1878, 0x173e: 0x0722, 0x173f: 0x0726,\n\t// Block 0x5d, offset 0x1740\n\t0x1740: 0x10f2, 0x1741: 0x1882, 0x1742: 0x187d, 0x1743: 0x1887, 0x1744: 0x188c, 0x1745: 0x10fa,\n\t0x1746: 0x10fe, 0x1747: 0x10fe, 0x1748: 0x1106, 0x1749: 0x072e, 0x174a: 0x110a, 0x174b: 0x0732,\n\t0x174c: 0x0736, 0x174d: 0x1896, 0x174e: 0x111e, 0x174f: 0x1126, 0x1750: 0x1132, 0x1751: 0x073a,\n\t0x1752: 0x189b, 0x1753: 0x1156, 0x1754: 0x18a0, 0x1755: 0x18a5, 0x1756: 0x1176, 0x1757: 0x118e,\n\t0x1758: 0x073e, 0x1759: 0x1196, 0x175a: 0x119a, 0x175b: 0x119e, 0x175c: 0x18aa, 0x175d: 0x18af,\n\t0x175e: 0x18af, 0x175f: 0x11b6, 0x1760: 0x0742, 0x1761: 0x18b4, 0x1762: 0x11ca, 0x1763: 0x11ce,\n\t0x1764: 0x0746, 0x1765: 0x18b9, 0x1766: 0x11ea, 0x1767: 0x074a, 0x1768: 0x11fa, 0x1769: 0x11f2,\n\t0x176a: 0x1202, 0x176b: 0x18c3, 0x176c: 0x121a, 0x176d: 0x074e, 0x176e: 0x1226, 0x176f: 0x122e,\n\t0x1770: 0x123e, 0x1771: 0x0752, 0x1772: 0x18cd, 0x1773: 0x18d2, 0x1774: 0x0756, 0x1775: 0x18d7,\n\t0x1776: 0x1256, 0x1777: 0x18dc, 0x1778: 0x1262, 0x1779: 0x126e, 0x177a: 0x1276, 0x177b: 0x18e1,\n\t0x177c: 0x18e6, 0x177d: 0x128a, 0x177e: 0x18eb, 0x177f: 0x1292,\n\t// Block 0x5e, offset 0x1780\n\t0x1780: 0x17fb, 0x1781: 0x075a, 0x1782: 0x12aa, 0x1783: 0x12ae, 0x1784: 0x0762, 0x1785: 0x12b2,\n\t0x1786: 0x0b2e, 0x1787: 0x18f0, 0x1788: 0x18f5, 0x1789: 0x1800, 0x178a: 0x1805, 0x178b: 0x12d2,\n\t0x178c: 0x12d6, 0x178d: 0x14ee, 0x178e: 0x0766, 0x178f: 0x1302, 0x1790: 0x12fe, 0x1791: 0x1306,\n\t0x1792: 0x093a, 0x1793: 0x130a, 0x1794: 0x130e, 0x1795: 0x1312, 0x1796: 0x131a, 0x1797: 0x18fa,\n\t0x1798: 0x1316, 0x1799: 0x131e, 0x179a: 0x1332, 0x179b: 0x1336, 0x179c: 0x1322, 0x179d: 0x133a,\n\t0x179e: 0x134e, 0x179f: 0x1362, 0x17a0: 0x132e, 0x17a1: 0x1342, 0x17a2: 0x1346, 0x17a3: 0x134a,\n\t0x17a4: 0x18ff, 0x17a5: 0x1909, 0x17a6: 0x1904, 0x17a7: 0x076a, 0x17a8: 0x136a, 0x17a9: 0x136e,\n\t0x17aa: 0x1376, 0x17ab: 0x191d, 0x17ac: 0x137a, 0x17ad: 0x190e, 0x17ae: 0x076e, 0x17af: 0x0772,\n\t0x17b0: 0x1913, 0x17b1: 0x1918, 0x17b2: 0x0776, 0x17b3: 0x139a, 0x17b4: 0x139e, 0x17b5: 0x13a2,\n\t0x17b6: 0x13a6, 0x17b7: 0x13b2, 0x17b8: 0x13ae, 0x17b9: 0x13ba, 0x17ba: 0x13b6, 0x17bb: 0x13c6,\n\t0x17bc: 0x13be, 0x17bd: 0x13c2, 0x17be: 0x13ca, 0x17bf: 0x077a,\n\t// Block 0x5f, offset 0x17c0\n\t0x17c0: 0x13d2, 0x17c1: 0x13d6, 0x17c2: 0x077e, 0x17c3: 0x13e6, 0x17c4: 0x13ea, 0x17c5: 0x1922,\n\t0x17c6: 0x13f6, 0x17c7: 0x13fa, 0x17c8: 0x0782, 0x17c9: 0x1406, 0x17ca: 0x06b6, 0x17cb: 0x1927,\n\t0x17cc: 0x192c, 0x17cd: 0x0786, 0x17ce: 0x078a, 0x17cf: 0x1432, 0x17d0: 0x144a, 0x17d1: 0x1466,\n\t0x17d2: 0x1476, 0x17d3: 0x1931, 0x17d4: 0x148a, 0x17d5: 0x148e, 0x17d6: 0x14a6, 0x17d7: 0x14b2,\n\t0x17d8: 0x193b, 0x17d9: 0x178d, 0x17da: 0x14be, 0x17db: 0x14ba, 0x17dc: 0x14c6, 0x17dd: 0x1792,\n\t0x17de: 0x14d2, 0x17df: 0x14de, 0x17e0: 0x1940, 0x17e1: 0x1945, 0x17e2: 0x151e, 0x17e3: 0x152a,\n\t0x17e4: 0x1532, 0x17e5: 0x194a, 0x17e6: 0x1536, 0x17e7: 0x1562, 0x17e8: 0x156e, 0x17e9: 0x1572,\n\t0x17ea: 0x156a, 0x17eb: 0x157e, 0x17ec: 0x1582, 0x17ed: 0x194f, 0x17ee: 0x158e, 0x17ef: 0x078e,\n\t0x17f0: 0x1596, 0x17f1: 0x1954, 0x17f2: 0x0792, 0x17f3: 0x15ce, 0x17f4: 0x0bbe, 0x17f5: 0x15e6,\n\t0x17f6: 0x1959, 0x17f7: 0x1963, 0x17f8: 0x0796, 0x17f9: 0x079a, 0x17fa: 0x160e, 0x17fb: 0x1968,\n\t0x17fc: 0x079e, 0x17fd: 0x196d, 0x17fe: 0x1626, 0x17ff: 0x1626,\n\t// Block 0x60, offset 0x1800\n\t0x1800: 0x162e, 0x1801: 0x1972, 0x1802: 0x1646, 0x1803: 0x07a2, 0x1804: 0x1656, 0x1805: 0x1662,\n\t0x1806: 0x166a, 0x1807: 0x1672, 0x1808: 0x07a6, 0x1809: 0x1977, 0x180a: 0x1686, 0x180b: 0x16a2,\n\t0x180c: 0x16ae, 0x180d: 0x07aa, 0x180e: 0x07ae, 0x180f: 0x16b2, 0x1810: 0x197c, 0x1811: 0x07b2,\n\t0x1812: 0x1981, 0x1813: 0x1986, 0x1814: 0x198b, 0x1815: 0x16d6, 0x1816: 0x07b6, 0x1817: 0x16ea,\n\t0x1818: 0x16f2, 0x1819: 0x16f6, 0x181a: 0x16fe, 0x181b: 0x1706, 0x181c: 0x170e, 0x181d: 0x1995,\n}\n\n// nfkcIndex: 23 blocks, 1472 entries, 2944 bytes\n// Block 0 is the zero block.\nvar nfkcIndex = [1472]uint16{\n\t// Block 0x0, offset 0x0\n\t// Block 0x1, offset 0x40\n\t// Block 0x2, offset 0x80\n\t// Block 0x3, offset 0xc0\n\t0xc2: 0x5f, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x60, 0xc7: 0x04,\n\t0xc8: 0x05, 0xca: 0x61, 0xcb: 0x62, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x09,\n\t0xd0: 0x0a, 0xd1: 0x63, 0xd2: 0x64, 0xd3: 0x0b, 0xd6: 0x0c, 0xd7: 0x65,\n\t0xd8: 0x66, 0xd9: 0x0d, 0xdb: 0x67, 0xdc: 0x68, 0xdd: 0x69, 0xdf: 0x6a,\n\t0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05,\n\t0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a,\n\t0xf0: 0x14,\n\t// Block 0x4, offset 0x100\n\t0x120: 0x6b, 0x121: 0x6c, 0x122: 0x6d, 0x123: 0x0e, 0x124: 0x6e, 0x125: 0x6f, 0x126: 0x70, 0x127: 0x71,\n\t0x128: 0x72, 0x129: 0x73, 0x12a: 0x74, 0x12b: 0x75, 0x12c: 0x70, 0x12d: 0x76, 0x12e: 0x77, 0x12f: 0x78,\n\t0x130: 0x74, 0x131: 0x79, 0x132: 0x7a, 0x133: 0x7b, 0x134: 0x7c, 0x135: 0x7d, 0x137: 0x7e,\n\t0x138: 0x7f, 0x139: 0x80, 0x13a: 0x81, 0x13b: 0x82, 0x13c: 0x83, 0x13d: 0x84, 0x13e: 0x85, 0x13f: 0x86,\n\t// Block 0x5, offset 0x140\n\t0x140: 0x87, 0x142: 0x88, 0x143: 0x89, 0x144: 0x8a, 0x145: 0x8b, 0x146: 0x8c, 0x147: 0x8d,\n\t0x14d: 0x8e,\n\t0x15c: 0x8f, 0x15f: 0x90,\n\t0x162: 0x91, 0x164: 0x92,\n\t0x168: 0x93, 0x169: 0x94, 0x16a: 0x95, 0x16b: 0x96, 0x16c: 0x0f, 0x16d: 0x97, 0x16e: 0x98, 0x16f: 0x99,\n\t0x170: 0x9a, 0x173: 0x9b, 0x174: 0x9c, 0x175: 0x10, 0x176: 0x11, 0x177: 0x12,\n\t0x178: 0x13, 0x179: 0x14, 0x17a: 0x15, 0x17b: 0x16, 0x17c: 0x17, 0x17d: 0x18, 0x17e: 0x19, 0x17f: 0x1a,\n\t// Block 0x6, offset 0x180\n\t0x180: 0x9d, 0x181: 0x9e, 0x182: 0x9f, 0x183: 0xa0, 0x184: 0x1b, 0x185: 0x1c, 0x186: 0xa1, 0x187: 0xa2,\n\t0x188: 0xa3, 0x189: 0x1d, 0x18a: 0x1e, 0x18b: 0xa4, 0x18c: 0xa5,\n\t0x191: 0x1f, 0x192: 0x20, 0x193: 0xa6,\n\t0x1a8: 0xa7, 0x1a9: 0xa8, 0x1ab: 0xa9,\n\t0x1b1: 0xaa, 0x1b3: 0xab, 0x1b5: 0xac, 0x1b7: 0xad,\n\t0x1ba: 0xae, 0x1bb: 0xaf, 0x1bc: 0x21, 0x1bd: 0x22, 0x1be: 0x23, 0x1bf: 0xb0,\n\t// Block 0x7, offset 0x1c0\n\t0x1c0: 0xb1, 0x1c1: 0x24, 0x1c2: 0x25, 0x1c3: 0x26, 0x1c4: 0xb2, 0x1c5: 0x27, 0x1c6: 0x28,\n\t0x1c8: 0x29, 0x1c9: 0x2a, 0x1ca: 0x2b, 0x1cb: 0x2c, 0x1cc: 0x2d, 0x1cd: 0x2e, 0x1ce: 0x2f, 0x1cf: 0x30,\n\t// Block 0x8, offset 0x200\n\t0x219: 0xb3, 0x21a: 0xb4, 0x21b: 0xb5, 0x21d: 0xb6, 0x21f: 0xb7,\n\t0x220: 0xb8, 0x223: 0xb9, 0x224: 0xba, 0x225: 0xbb, 0x226: 0xbc, 0x227: 0xbd,\n\t0x22a: 0xbe, 0x22b: 0xbf, 0x22d: 0xc0, 0x22f: 0xc1,\n\t0x230: 0xc2, 0x231: 0xc3, 0x232: 0xc4, 0x233: 0xc5, 0x234: 0xc6, 0x235: 0xc7, 0x236: 0xc8, 0x237: 0xc2,\n\t0x238: 0xc3, 0x239: 0xc4, 0x23a: 0xc5, 0x23b: 0xc6, 0x23c: 0xc7, 0x23d: 0xc8, 0x23e: 0xc2, 0x23f: 0xc3,\n\t// Block 0x9, offset 0x240\n\t0x240: 0xc4, 0x241: 0xc5, 0x242: 0xc6, 0x243: 0xc7, 0x244: 0xc8, 0x245: 0xc2, 0x246: 0xc3, 0x247: 0xc4,\n\t0x248: 0xc5, 0x249: 0xc6, 0x24a: 0xc7, 0x24b: 0xc8, 0x24c: 0xc2, 0x24d: 0xc3, 0x24e: 0xc4, 0x24f: 0xc5,\n\t0x250: 0xc6, 0x251: 0xc7, 0x252: 0xc8, 0x253: 0xc2, 0x254: 0xc3, 0x255: 0xc4, 0x256: 0xc5, 0x257: 0xc6,\n\t0x258: 0xc7, 0x259: 0xc8, 0x25a: 0xc2, 0x25b: 0xc3, 0x25c: 0xc4, 0x25d: 0xc5, 0x25e: 0xc6, 0x25f: 0xc7,\n\t0x260: 0xc8, 0x261: 0xc2, 0x262: 0xc3, 0x263: 0xc4, 0x264: 0xc5, 0x265: 0xc6, 0x266: 0xc7, 0x267: 0xc8,\n\t0x268: 0xc2, 0x269: 0xc3, 0x26a: 0xc4, 0x26b: 0xc5, 0x26c: 0xc6, 0x26d: 0xc7, 0x26e: 0xc8, 0x26f: 0xc2,\n\t0x270: 0xc3, 0x271: 0xc4, 0x272: 0xc5, 0x273: 0xc6, 0x274: 0xc7, 0x275: 0xc8, 0x276: 0xc2, 0x277: 0xc3,\n\t0x278: 0xc4, 0x279: 0xc5, 0x27a: 0xc6, 0x27b: 0xc7, 0x27c: 0xc8, 0x27d: 0xc2, 0x27e: 0xc3, 0x27f: 0xc4,\n\t// Block 0xa, offset 0x280\n\t0x280: 0xc5, 0x281: 0xc6, 0x282: 0xc7, 0x283: 0xc8, 0x284: 0xc2, 0x285: 0xc3, 0x286: 0xc4, 0x287: 0xc5,\n\t0x288: 0xc6, 0x289: 0xc7, 0x28a: 0xc8, 0x28b: 0xc2, 0x28c: 0xc3, 0x28d: 0xc4, 0x28e: 0xc5, 0x28f: 0xc6,\n\t0x290: 0xc7, 0x291: 0xc8, 0x292: 0xc2, 0x293: 0xc3, 0x294: 0xc4, 0x295: 0xc5, 0x296: 0xc6, 0x297: 0xc7,\n\t0x298: 0xc8, 0x299: 0xc2, 0x29a: 0xc3, 0x29b: 0xc4, 0x29c: 0xc5, 0x29d: 0xc6, 0x29e: 0xc7, 0x29f: 0xc8,\n\t0x2a0: 0xc2, 0x2a1: 0xc3, 0x2a2: 0xc4, 0x2a3: 0xc5, 0x2a4: 0xc6, 0x2a5: 0xc7, 0x2a6: 0xc8, 0x2a7: 0xc2,\n\t0x2a8: 0xc3, 0x2a9: 0xc4, 0x2aa: 0xc5, 0x2ab: 0xc6, 0x2ac: 0xc7, 0x2ad: 0xc8, 0x2ae: 0xc2, 0x2af: 0xc3,\n\t0x2b0: 0xc4, 0x2b1: 0xc5, 0x2b2: 0xc6, 0x2b3: 0xc7, 0x2b4: 0xc8, 0x2b5: 0xc2, 0x2b6: 0xc3, 0x2b7: 0xc4,\n\t0x2b8: 0xc5, 0x2b9: 0xc6, 0x2ba: 0xc7, 0x2bb: 0xc8, 0x2bc: 0xc2, 0x2bd: 0xc3, 0x2be: 0xc4, 0x2bf: 0xc5,\n\t// Block 0xb, offset 0x2c0\n\t0x2c0: 0xc6, 0x2c1: 0xc7, 0x2c2: 0xc8, 0x2c3: 0xc2, 0x2c4: 0xc3, 0x2c5: 0xc4, 0x2c6: 0xc5, 0x2c7: 0xc6,\n\t0x2c8: 0xc7, 0x2c9: 0xc8, 0x2ca: 0xc2, 0x2cb: 0xc3, 0x2cc: 0xc4, 0x2cd: 0xc5, 0x2ce: 0xc6, 0x2cf: 0xc7,\n\t0x2d0: 0xc8, 0x2d1: 0xc2, 0x2d2: 0xc3, 0x2d3: 0xc4, 0x2d4: 0xc5, 0x2d5: 0xc6, 0x2d6: 0xc7, 0x2d7: 0xc8,\n\t0x2d8: 0xc2, 0x2d9: 0xc3, 0x2da: 0xc4, 0x2db: 0xc5, 0x2dc: 0xc6, 0x2dd: 0xc7, 0x2de: 0xc9,\n\t// Block 0xc, offset 0x300\n\t0x324: 0x31, 0x325: 0x32, 0x326: 0x33, 0x327: 0x34,\n\t0x328: 0x35, 0x329: 0x36, 0x32a: 0x37, 0x32b: 0x38, 0x32c: 0x39, 0x32d: 0x3a, 0x32e: 0x3b, 0x32f: 0x3c,\n\t0x330: 0x3d, 0x331: 0x3e, 0x332: 0x3f, 0x333: 0x40, 0x334: 0x41, 0x335: 0x42, 0x336: 0x43, 0x337: 0x44,\n\t0x338: 0x45, 0x339: 0x46, 0x33a: 0x47, 0x33b: 0x48, 0x33c: 0xca, 0x33d: 0x49, 0x33e: 0x4a, 0x33f: 0x4b,\n\t// Block 0xd, offset 0x340\n\t0x347: 0xcb,\n\t0x34b: 0xcc, 0x34d: 0xcd,\n\t0x357: 0xce,\n\t0x35e: 0x4c,\n\t0x368: 0xcf, 0x36b: 0xd0,\n\t0x374: 0xd1, 0x375: 0xd2,\n\t0x37a: 0xd3, 0x37b: 0xd4, 0x37d: 0xd5, 0x37e: 0xd6,\n\t// Block 0xe, offset 0x380\n\t0x381: 0xd7, 0x382: 0xd8, 0x384: 0xd9, 0x385: 0xbc, 0x387: 0xda,\n\t0x388: 0xdb, 0x38b: 0xdc, 0x38c: 0xdd, 0x38d: 0xde, 0x38e: 0xdf, 0x38f: 0xe0,\n\t0x391: 0xe1, 0x392: 0xe2, 0x393: 0xe3, 0x396: 0xe4, 0x397: 0xe5,\n\t0x398: 0xe6, 0x39a: 0xe7, 0x39c: 0xe8,\n\t0x3a0: 0xe9, 0x3a4: 0xea, 0x3a5: 0xeb, 0x3a7: 0xec,\n\t0x3a8: 0xed, 0x3a9: 0xee, 0x3aa: 0xef,\n\t0x3b0: 0xe6, 0x3b5: 0xf0, 0x3b6: 0xf1,\n\t0x3bd: 0xf2,\n\t// Block 0xf, offset 0x3c0\n\t0x3c4: 0xf3,\n\t0x3eb: 0xf4, 0x3ec: 0xf5,\n\t0x3f5: 0xf6,\n\t0x3ff: 0xf7,\n\t// Block 0x10, offset 0x400\n\t0x432: 0xf8,\n\t// Block 0x11, offset 0x440\n\t0x473: 0xf9,\n\t// Block 0x12, offset 0x480\n\t0x485: 0xfa, 0x486: 0xfb, 0x487: 0xfc,\n\t0x489: 0xfd,\n\t0x490: 0xfe, 0x491: 0xff, 0x492: 0x100, 0x493: 0x101, 0x494: 0x102, 0x495: 0x103, 0x496: 0x104, 0x497: 0x105,\n\t0x498: 0x106, 0x499: 0x107, 0x49a: 0x4d, 0x49b: 0x108, 0x49c: 0x109, 0x49d: 0x10a, 0x49e: 0x10b, 0x49f: 0x4e,\n\t// Block 0x13, offset 0x4c0\n\t0x4c0: 0x4f, 0x4c1: 0x50, 0x4c2: 0x10c, 0x4c4: 0xf5,\n\t0x4ca: 0x10d, 0x4cb: 0x10e,\n\t0x4d3: 0x10f, 0x4d7: 0x110,\n\t0x4db: 0x111,\n\t0x4e3: 0x112, 0x4e5: 0x113,\n\t0x4f8: 0x51, 0x4f9: 0x52, 0x4fa: 0x53,\n\t// Block 0x14, offset 0x500\n\t0x504: 0x54, 0x505: 0x114, 0x506: 0x115,\n\t0x508: 0x55, 0x509: 0x116,\n\t0x52f: 0x117,\n\t// Block 0x15, offset 0x540\n\t0x560: 0x56, 0x561: 0x57, 0x562: 0x58, 0x563: 0x59, 0x564: 0x5a, 0x565: 0x5b, 0x566: 0x5c, 0x567: 0x5d,\n\t0x568: 0x5e,\n\t// Block 0x16, offset 0x580\n\t0x590: 0x0b, 0x591: 0x0c, 0x596: 0x0d,\n\t0x59b: 0x0e, 0x59c: 0x0f, 0x59d: 0x10, 0x59e: 0x11, 0x59f: 0x12,\n\t0x5af: 0x13,\n}\n\n// nfkcSparseOffset: 185 entries, 370 bytes\nvar nfkcSparseOffset = []uint16{0x0, 0xe, 0x12, 0x1c, 0x26, 0x36, 0x38, 0x3d, 0x48, 0x57, 0x64, 0x6c, 0x71, 0x76, 0x78, 0x7c, 0x84, 0x8b, 0x8e, 0x96, 0x9a, 0x9e, 0xa0, 0xa2, 0xab, 0xaf, 0xb6, 0xbb, 0xbe, 0xc8, 0xcb, 0xd2, 0xda, 0xde, 0xe0, 0xe4, 0xe8, 0xee, 0xff, 0x10b, 0x10d, 0x113, 0x115, 0x117, 0x119, 0x11b, 0x11d, 0x11f, 0x121, 0x124, 0x127, 0x129, 0x12c, 0x12f, 0x133, 0x139, 0x145, 0x14e, 0x150, 0x153, 0x155, 0x160, 0x16b, 0x179, 0x187, 0x197, 0x1a5, 0x1ac, 0x1b2, 0x1c1, 0x1c5, 0x1c7, 0x1cb, 0x1cd, 0x1d0, 0x1d2, 0x1d5, 0x1d7, 0x1da, 0x1dc, 0x1de, 0x1e0, 0x1ec, 0x1f6, 0x200, 0x203, 0x207, 0x209, 0x20b, 0x211, 0x214, 0x217, 0x219, 0x21b, 0x21d, 0x21f, 0x225, 0x228, 0x22d, 0x22f, 0x236, 0x23c, 0x242, 0x24a, 0x250, 0x256, 0x25c, 0x260, 0x262, 0x264, 0x266, 0x268, 0x26d, 0x273, 0x276, 0x278, 0x27a, 0x27c, 0x27f, 0x285, 0x289, 0x28d, 0x295, 0x29c, 0x29f, 0x2a2, 0x2a4, 0x2a7, 0x2af, 0x2b9, 0x2c0, 0x2c4, 0x2cb, 0x2ce, 0x2d4, 0x2d6, 0x2d8, 0x2db, 0x2dd, 0x2e0, 0x2e5, 0x2e7, 0x2e9, 0x2eb, 0x2ed, 0x2ef, 0x2f2, 0x2f4, 0x2f6, 0x303, 0x305, 0x307, 0x30d, 0x30f, 0x311, 0x314, 0x321, 0x32b, 0x32d, 0x32f, 0x333, 0x338, 0x344, 0x349, 0x352, 0x358, 0x35d, 0x361, 0x366, 0x36a, 0x37a, 0x388, 0x396, 0x3a4, 0x3a6, 0x3a8, 0x3aa, 0x3ae, 0x3b1, 0x3b6, 0x3b8, 0x3bb, 0x3c6, 0x3c8, 0x3d2}\n\n// nfkcSparseValues: 980 entries, 3920 bytes\nvar nfkcSparseValues = [980]valueRange{\n\t// Block 0x0, offset 0x0\n\t{value: 0x0002, lo: 0x0d},\n\t{value: 0x0001, lo: 0xa0, hi: 0xa0},\n\t{value: 0x4377, lo: 0xa8, hi: 0xa8},\n\t{value: 0x0083, lo: 0xaa, hi: 0xaa},\n\t{value: 0x4363, lo: 0xaf, hi: 0xaf},\n\t{value: 0x0025, lo: 0xb2, hi: 0xb3},\n\t{value: 0x4359, lo: 0xb4, hi: 0xb4},\n\t{value: 0x0260, lo: 0xb5, hi: 0xb5},\n\t{value: 0x4390, lo: 0xb8, hi: 0xb8},\n\t{value: 0x0023, lo: 0xb9, hi: 0xb9},\n\t{value: 0x009f, lo: 0xba, hi: 0xba},\n\t{value: 0x234c, lo: 0xbc, hi: 0xbc},\n\t{value: 0x2340, lo: 0xbd, hi: 0xbd},\n\t{value: 0x23e2, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1, offset 0xe\n\t{value: 0x0091, lo: 0x03},\n\t{value: 0x4859, lo: 0xa0, hi: 0xa1},\n\t{value: 0x488b, lo: 0xaf, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb7, hi: 0xb7},\n\t// Block 0x2, offset 0x12\n\t{value: 0x0004, lo: 0x09},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x0091, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0140, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0095, lo: 0xb2, hi: 0xb2},\n\t{value: 0x00a5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x0179, lo: 0xb4, hi: 0xb4},\n\t{value: 0x017f, lo: 0xb5, hi: 0xb5},\n\t{value: 0x018b, lo: 0xb6, hi: 0xb6},\n\t{value: 0x00af, lo: 0xb7, hi: 0xb8},\n\t// Block 0x3, offset 0x1c\n\t{value: 0x000a, lo: 0x09},\n\t{value: 0x436d, lo: 0x98, hi: 0x98},\n\t{value: 0x4372, lo: 0x99, hi: 0x9a},\n\t{value: 0x4395, lo: 0x9b, hi: 0x9b},\n\t{value: 0x435e, lo: 0x9c, hi: 0x9c},\n\t{value: 0x4381, lo: 0x9d, hi: 0x9d},\n\t{value: 0x0137, lo: 0xa0, hi: 0xa0},\n\t{value: 0x0099, lo: 0xa1, hi: 0xa1},\n\t{value: 0x00a7, lo: 0xa2, hi: 0xa3},\n\t{value: 0x01b8, lo: 0xa4, hi: 0xa4},\n\t// Block 0x4, offset 0x26\n\t{value: 0x0000, lo: 0x0f},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0xa000, lo: 0x8d, hi: 0x8d},\n\t{value: 0x3704, lo: 0x90, hi: 0x90},\n\t{value: 0x3710, lo: 0x91, hi: 0x91},\n\t{value: 0x36fe, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x96, hi: 0x96},\n\t{value: 0x3776, lo: 0x97, hi: 0x97},\n\t{value: 0x3740, lo: 0x9c, hi: 0x9c},\n\t{value: 0x3728, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3752, lo: 0x9e, hi: 0x9e},\n\t{value: 0xa000, lo: 0xb4, hi: 0xb5},\n\t{value: 0x377c, lo: 0xb6, hi: 0xb6},\n\t{value: 0x3782, lo: 0xb7, hi: 0xb7},\n\t// Block 0x5, offset 0x36\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x83, hi: 0x87},\n\t// Block 0x6, offset 0x38\n\t{value: 0x0001, lo: 0x04},\n\t{value: 0x8114, lo: 0x81, hi: 0x82},\n\t{value: 0x8133, lo: 0x84, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t{value: 0x810e, lo: 0x87, hi: 0x87},\n\t// Block 0x7, offset 0x3d\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x97},\n\t{value: 0x811a, lo: 0x98, hi: 0x98},\n\t{value: 0x811b, lo: 0x99, hi: 0x99},\n\t{value: 0x811c, lo: 0x9a, hi: 0x9a},\n\t{value: 0x37a0, lo: 0xa2, hi: 0xa2},\n\t{value: 0x37a6, lo: 0xa3, hi: 0xa3},\n\t{value: 0x37b2, lo: 0xa4, hi: 0xa4},\n\t{value: 0x37ac, lo: 0xa5, hi: 0xa5},\n\t{value: 0x37b8, lo: 0xa6, hi: 0xa6},\n\t{value: 0xa000, lo: 0xa7, hi: 0xa7},\n\t// Block 0x8, offset 0x48\n\t{value: 0x0000, lo: 0x0e},\n\t{value: 0x37ca, lo: 0x80, hi: 0x80},\n\t{value: 0xa000, lo: 0x81, hi: 0x81},\n\t{value: 0x37be, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x37c4, lo: 0x93, hi: 0x93},\n\t{value: 0xa000, lo: 0x95, hi: 0x95},\n\t{value: 0x8133, lo: 0x96, hi: 0x9c},\n\t{value: 0x8133, lo: 0x9f, hi: 0xa2},\n\t{value: 0x812e, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa4},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa8},\n\t{value: 0x812e, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t// Block 0x9, offset 0x57\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x8120, lo: 0x91, hi: 0x91},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x812e, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb6},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb9},\n\t{value: 0x8133, lo: 0xba, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbc},\n\t{value: 0x8133, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbe, hi: 0xbe},\n\t{value: 0x8133, lo: 0xbf, hi: 0xbf},\n\t// Block 0xa, offset 0x64\n\t{value: 0x0005, lo: 0x07},\n\t{value: 0x8133, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x812e, lo: 0x82, hi: 0x83},\n\t{value: 0x812e, lo: 0x84, hi: 0x85},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x812e, lo: 0x88, hi: 0x89},\n\t{value: 0x8133, lo: 0x8a, hi: 0x8a},\n\t// Block 0xb, offset 0x6c\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xab, hi: 0xb1},\n\t{value: 0x812e, lo: 0xb2, hi: 0xb2},\n\t{value: 0x8133, lo: 0xb3, hi: 0xb3},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0xc, offset 0x71\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0x96, hi: 0x99},\n\t{value: 0x8133, lo: 0x9b, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa7},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0xd, offset 0x76\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t// Block 0xe, offset 0x78\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8133, lo: 0x97, hi: 0x98},\n\t{value: 0x812e, lo: 0x99, hi: 0x9b},\n\t{value: 0x8133, lo: 0x9c, hi: 0x9f},\n\t// Block 0xf, offset 0x7c\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0xa8, hi: 0xa8},\n\t{value: 0x3e37, lo: 0xa9, hi: 0xa9},\n\t{value: 0xa000, lo: 0xb0, hi: 0xb0},\n\t{value: 0x3e3f, lo: 0xb1, hi: 0xb1},\n\t{value: 0xa000, lo: 0xb3, hi: 0xb3},\n\t{value: 0x3e47, lo: 0xb4, hi: 0xb4},\n\t{value: 0x9903, lo: 0xbc, hi: 0xbc},\n\t// Block 0x10, offset 0x84\n\t{value: 0x0008, lo: 0x06},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x91, hi: 0x91},\n\t{value: 0x812e, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x93, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x94},\n\t{value: 0x461b, lo: 0x98, hi: 0x9f},\n\t// Block 0x11, offset 0x8b\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x12, offset 0x8e\n\t{value: 0x0008, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e4f, lo: 0x8b, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x465b, lo: 0x9c, hi: 0x9d},\n\t{value: 0x466b, lo: 0x9f, hi: 0x9f},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbe},\n\t// Block 0x13, offset 0x96\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x4693, lo: 0xb3, hi: 0xb3},\n\t{value: 0x469b, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x14, offset 0x9a\n\t{value: 0x0008, lo: 0x03},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x4673, lo: 0x99, hi: 0x9b},\n\t{value: 0x468b, lo: 0x9e, hi: 0x9e},\n\t// Block 0x15, offset 0x9e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t// Block 0x16, offset 0xa0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t// Block 0x17, offset 0xa2\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x3e67, lo: 0x88, hi: 0x88},\n\t{value: 0x3e5f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e6f, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x96, hi: 0x97},\n\t{value: 0x46a3, lo: 0x9c, hi: 0x9c},\n\t{value: 0x46ab, lo: 0x9d, hi: 0x9d},\n\t// Block 0x18, offset 0xab\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0x3e77, lo: 0x94, hi: 0x94},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x19, offset 0xaf\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3e7f, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3e8f, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3e87, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1a, offset 0xb6\n\t{value: 0x1801, lo: 0x04},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3e97, lo: 0x88, hi: 0x88},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8121, lo: 0x95, hi: 0x96},\n\t// Block 0x1b, offset 0xbb\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbc, hi: 0xbc},\n\t{value: 0xa000, lo: 0xbf, hi: 0xbf},\n\t// Block 0x1c, offset 0xbe\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x3e9f, lo: 0x80, hi: 0x80},\n\t{value: 0x9900, lo: 0x82, hi: 0x82},\n\t{value: 0xa000, lo: 0x86, hi: 0x86},\n\t{value: 0x3ea7, lo: 0x87, hi: 0x87},\n\t{value: 0x3eaf, lo: 0x88, hi: 0x88},\n\t{value: 0x4b25, lo: 0x8a, hi: 0x8a},\n\t{value: 0x4331, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x95, hi: 0x96},\n\t// Block 0x1d, offset 0xc8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x1e, offset 0xcb\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xa000, lo: 0x86, hi: 0x87},\n\t{value: 0x3eb7, lo: 0x8a, hi: 0x8a},\n\t{value: 0x3ec7, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3ebf, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t// Block 0x1f, offset 0xd2\n\t{value: 0x5a29, lo: 0x07},\n\t{value: 0x9905, lo: 0x8a, hi: 0x8a},\n\t{value: 0x9900, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x3ecf, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4b2d, lo: 0x9c, hi: 0x9c},\n\t{value: 0x433c, lo: 0x9d, hi: 0x9d},\n\t{value: 0x3ed7, lo: 0x9e, hi: 0x9f},\n\t// Block 0x20, offset 0xda\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x2751, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8123, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x21, offset 0xde\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8124, lo: 0x88, hi: 0x8b},\n\t// Block 0x22, offset 0xe0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x2766, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8125, lo: 0xb8, hi: 0xb9},\n\t{value: 0x8105, lo: 0xba, hi: 0xba},\n\t// Block 0x23, offset 0xe4\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8126, lo: 0x88, hi: 0x8b},\n\t{value: 0x2758, lo: 0x9c, hi: 0x9c},\n\t{value: 0x275f, lo: 0x9d, hi: 0x9d},\n\t// Block 0x24, offset 0xe8\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x03fe, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x98, hi: 0x99},\n\t{value: 0x812e, lo: 0xb5, hi: 0xb5},\n\t{value: 0x812e, lo: 0xb7, hi: 0xb7},\n\t{value: 0x812c, lo: 0xb9, hi: 0xb9},\n\t// Block 0x25, offset 0xee\n\t{value: 0x0000, lo: 0x10},\n\t{value: 0x2774, lo: 0x83, hi: 0x83},\n\t{value: 0x277b, lo: 0x8d, hi: 0x8d},\n\t{value: 0x2782, lo: 0x92, hi: 0x92},\n\t{value: 0x2789, lo: 0x97, hi: 0x97},\n\t{value: 0x2790, lo: 0x9c, hi: 0x9c},\n\t{value: 0x276d, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8127, lo: 0xb1, hi: 0xb1},\n\t{value: 0x8128, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4ca5, lo: 0xb3, hi: 0xb3},\n\t{value: 0x8129, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4cae, lo: 0xb5, hi: 0xb5},\n\t{value: 0x46b3, lo: 0xb6, hi: 0xb6},\n\t{value: 0x476b, lo: 0xb7, hi: 0xb7},\n\t{value: 0x46bb, lo: 0xb8, hi: 0xb8},\n\t{value: 0x4776, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8128, lo: 0xba, hi: 0xbd},\n\t// Block 0x26, offset 0xff\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x8128, lo: 0x80, hi: 0x80},\n\t{value: 0x4cb7, lo: 0x81, hi: 0x81},\n\t{value: 0x8133, lo: 0x82, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0x86, hi: 0x87},\n\t{value: 0x279e, lo: 0x93, hi: 0x93},\n\t{value: 0x27a5, lo: 0x9d, hi: 0x9d},\n\t{value: 0x27ac, lo: 0xa2, hi: 0xa2},\n\t{value: 0x27b3, lo: 0xa7, hi: 0xa7},\n\t{value: 0x27ba, lo: 0xac, hi: 0xac},\n\t{value: 0x2797, lo: 0xb9, hi: 0xb9},\n\t// Block 0x27, offset 0x10b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x86, hi: 0x86},\n\t// Block 0x28, offset 0x10d\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3edf, lo: 0xa6, hi: 0xa6},\n\t{value: 0x9900, lo: 0xae, hi: 0xae},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x29, offset 0x113\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t// Block 0x2a, offset 0x115\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0402, lo: 0xbc, hi: 0xbc},\n\t// Block 0x2b, offset 0x117\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xa000, lo: 0x80, hi: 0x92},\n\t// Block 0x2c, offset 0x119\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0xb900, lo: 0xa1, hi: 0xb5},\n\t// Block 0x2d, offset 0x11b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0xa8, hi: 0xbf},\n\t// Block 0x2e, offset 0x11d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x9900, lo: 0x80, hi: 0x82},\n\t// Block 0x2f, offset 0x11f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9f},\n\t// Block 0x30, offset 0x121\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x94, hi: 0x95},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x31, offset 0x124\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x92, hi: 0x92},\n\t{value: 0x8133, lo: 0x9d, hi: 0x9d},\n\t// Block 0x32, offset 0x127\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8132, lo: 0xa9, hi: 0xa9},\n\t// Block 0x33, offset 0x129\n\t{value: 0x0004, lo: 0x02},\n\t{value: 0x812f, lo: 0xb9, hi: 0xba},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbb},\n\t// Block 0x34, offset 0x12c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x97, hi: 0x97},\n\t{value: 0x812e, lo: 0x98, hi: 0x98},\n\t// Block 0x35, offset 0x12f\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8133, lo: 0xb5, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x36, offset 0x133\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t{value: 0x812e, lo: 0xb5, hi: 0xba},\n\t{value: 0x8133, lo: 0xbb, hi: 0xbc},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t{value: 0x812e, lo: 0xbf, hi: 0xbf},\n\t// Block 0x37, offset 0x139\n\t{value: 0x0000, lo: 0x0b},\n\t{value: 0x812e, lo: 0x80, hi: 0x80},\n\t{value: 0x8133, lo: 0x81, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x8133, lo: 0x8b, hi: 0x9c},\n\t{value: 0x812e, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xaa},\n\t{value: 0x8136, lo: 0xab, hi: 0xab},\n\t// Block 0x38, offset 0x145\n\t{value: 0x0000, lo: 0x08},\n\t{value: 0x3f27, lo: 0x80, hi: 0x80},\n\t{value: 0x3f2f, lo: 0x81, hi: 0x81},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x3f37, lo: 0x83, hi: 0x83},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xab, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xac},\n\t{value: 0x8133, lo: 0xad, hi: 0xb3},\n\t// Block 0x39, offset 0x14e\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xaa, hi: 0xab},\n\t// Block 0x3a, offset 0x150\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8105, lo: 0xb2, hi: 0xb3},\n\t// Block 0x3b, offset 0x153\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x3c, offset 0x155\n\t{value: 0x0000, lo: 0x0a},\n\t{value: 0x8133, lo: 0x90, hi: 0x92},\n\t{value: 0x8101, lo: 0x94, hi: 0x94},\n\t{value: 0x812e, lo: 0x95, hi: 0x99},\n\t{value: 0x8133, lo: 0x9a, hi: 0x9b},\n\t{value: 0x812e, lo: 0x9c, hi: 0x9f},\n\t{value: 0x8133, lo: 0xa0, hi: 0xa0},\n\t{value: 0x8101, lo: 0xa2, hi: 0xa8},\n\t{value: 0x812e, lo: 0xad, hi: 0xad},\n\t{value: 0x8133, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb9},\n\t// Block 0x3d, offset 0x160\n\t{value: 0x0002, lo: 0x0a},\n\t{value: 0x0043, lo: 0xac, hi: 0xac},\n\t{value: 0x00d1, lo: 0xad, hi: 0xad},\n\t{value: 0x0045, lo: 0xae, hi: 0xae},\n\t{value: 0x0049, lo: 0xb0, hi: 0xb1},\n\t{value: 0x00ec, lo: 0xb2, hi: 0xb2},\n\t{value: 0x004f, lo: 0xb3, hi: 0xba},\n\t{value: 0x005f, lo: 0xbc, hi: 0xbc},\n\t{value: 0x00fe, lo: 0xbd, hi: 0xbd},\n\t{value: 0x0061, lo: 0xbe, hi: 0xbe},\n\t{value: 0x0065, lo: 0xbf, hi: 0xbf},\n\t// Block 0x3e, offset 0x16b\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x0001, lo: 0x80, hi: 0x8a},\n\t{value: 0x0532, lo: 0x91, hi: 0x91},\n\t{value: 0x439a, lo: 0x97, hi: 0x97},\n\t{value: 0x001d, lo: 0xa4, hi: 0xa4},\n\t{value: 0x19a0, lo: 0xa5, hi: 0xa5},\n\t{value: 0x1c8c, lo: 0xa6, hi: 0xa6},\n\t{value: 0x0001, lo: 0xaf, hi: 0xaf},\n\t{value: 0x27c1, lo: 0xb3, hi: 0xb3},\n\t{value: 0x2935, lo: 0xb4, hi: 0xb4},\n\t{value: 0x27c8, lo: 0xb6, hi: 0xb6},\n\t{value: 0x293f, lo: 0xb7, hi: 0xb7},\n\t{value: 0x199a, lo: 0xbc, hi: 0xbc},\n\t{value: 0x4368, lo: 0xbe, hi: 0xbe},\n\t// Block 0x3f, offset 0x179\n\t{value: 0x0002, lo: 0x0d},\n\t{value: 0x1a60, lo: 0x87, hi: 0x87},\n\t{value: 0x1a5d, lo: 0x88, hi: 0x88},\n\t{value: 0x199d, lo: 0x89, hi: 0x89},\n\t{value: 0x2ac5, lo: 0x97, hi: 0x97},\n\t{value: 0x0001, lo: 0x9f, hi: 0x9f},\n\t{value: 0x0021, lo: 0xb0, hi: 0xb0},\n\t{value: 0x0093, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0029, lo: 0xb4, hi: 0xb9},\n\t{value: 0x0017, lo: 0xba, hi: 0xba},\n\t{value: 0x055e, lo: 0xbb, hi: 0xbb},\n\t{value: 0x003b, lo: 0xbc, hi: 0xbc},\n\t{value: 0x0011, lo: 0xbd, hi: 0xbe},\n\t{value: 0x009d, lo: 0xbf, hi: 0xbf},\n\t// Block 0x40, offset 0x187\n\t{value: 0x0002, lo: 0x0f},\n\t{value: 0x0021, lo: 0x80, hi: 0x89},\n\t{value: 0x0017, lo: 0x8a, hi: 0x8a},\n\t{value: 0x055e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x003b, lo: 0x8c, hi: 0x8c},\n\t{value: 0x0011, lo: 0x8d, hi: 0x8e},\n\t{value: 0x0083, lo: 0x90, hi: 0x90},\n\t{value: 0x008b, lo: 0x91, hi: 0x91},\n\t{value: 0x009f, lo: 0x92, hi: 0x92},\n\t{value: 0x00b1, lo: 0x93, hi: 0x93},\n\t{value: 0x011f, lo: 0x94, hi: 0x94},\n\t{value: 0x0091, lo: 0x95, hi: 0x95},\n\t{value: 0x0097, lo: 0x96, hi: 0x99},\n\t{value: 0x00a1, lo: 0x9a, hi: 0x9a},\n\t{value: 0x00a7, lo: 0x9b, hi: 0x9c},\n\t{value: 0x1ac9, lo: 0xa8, hi: 0xa8},\n\t// Block 0x41, offset 0x197\n\t{value: 0x0000, lo: 0x0d},\n\t{value: 0x8133, lo: 0x90, hi: 0x91},\n\t{value: 0x8101, lo: 0x92, hi: 0x93},\n\t{value: 0x8133, lo: 0x94, hi: 0x97},\n\t{value: 0x8101, lo: 0x98, hi: 0x9a},\n\t{value: 0x8133, lo: 0x9b, hi: 0x9c},\n\t{value: 0x8133, lo: 0xa1, hi: 0xa1},\n\t{value: 0x8101, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8133, lo: 0xa7, hi: 0xa7},\n\t{value: 0x812e, lo: 0xa8, hi: 0xa8},\n\t{value: 0x8133, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8101, lo: 0xaa, hi: 0xab},\n\t{value: 0x812e, lo: 0xac, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t// Block 0x42, offset 0x1a5\n\t{value: 0x0007, lo: 0x06},\n\t{value: 0x22b0, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t{value: 0x3b18, lo: 0x9a, hi: 0x9b},\n\t{value: 0x3b26, lo: 0xae, hi: 0xae},\n\t// Block 0x43, offset 0x1ac\n\t{value: 0x000e, lo: 0x05},\n\t{value: 0x3b2d, lo: 0x8d, hi: 0x8e},\n\t{value: 0x3b34, lo: 0x8f, hi: 0x8f},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x94, hi: 0x94},\n\t// Block 0x44, offset 0x1b2\n\t{value: 0x017a, lo: 0x0e},\n\t{value: 0xa000, lo: 0x83, hi: 0x83},\n\t{value: 0x3b42, lo: 0x84, hi: 0x84},\n\t{value: 0xa000, lo: 0x88, hi: 0x88},\n\t{value: 0x3b49, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x3b50, lo: 0x8c, hi: 0x8c},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0x3b57, lo: 0xa4, hi: 0xa4},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x3b5e, lo: 0xa6, hi: 0xa6},\n\t{value: 0x27cf, lo: 0xac, hi: 0xad},\n\t{value: 0x27d6, lo: 0xaf, hi: 0xaf},\n\t{value: 0x2953, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xbc, hi: 0xbc},\n\t// Block 0x45, offset 0x1c1\n\t{value: 0x0007, lo: 0x03},\n\t{value: 0x3bc7, lo: 0xa0, hi: 0xa1},\n\t{value: 0x3bf1, lo: 0xa2, hi: 0xa3},\n\t{value: 0x3c1b, lo: 0xaa, hi: 0xad},\n\t// Block 0x46, offset 0x1c5\n\t{value: 0x0004, lo: 0x01},\n\t{value: 0x0586, lo: 0xa9, hi: 0xaa},\n\t// Block 0x47, offset 0x1c7\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x0057, lo: 0x80, hi: 0x8f},\n\t{value: 0x0083, lo: 0x90, hi: 0xa9},\n\t{value: 0x0021, lo: 0xaa, hi: 0xaa},\n\t// Block 0x48, offset 0x1cb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x2ad2, lo: 0x8c, hi: 0x8c},\n\t// Block 0x49, offset 0x1cd\n\t{value: 0x0266, lo: 0x02},\n\t{value: 0x1cbc, lo: 0xb4, hi: 0xb4},\n\t{value: 0x1a5a, lo: 0xb5, hi: 0xb6},\n\t// Block 0x4a, offset 0x1d0\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x45dc, lo: 0x9c, hi: 0x9c},\n\t// Block 0x4b, offset 0x1d2\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x0095, lo: 0xbc, hi: 0xbc},\n\t{value: 0x006d, lo: 0xbd, hi: 0xbd},\n\t// Block 0x4c, offset 0x1d5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xaf, hi: 0xb1},\n\t// Block 0x4d, offset 0x1d7\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x057a, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x4e, offset 0x1da\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa0, hi: 0xbf},\n\t// Block 0x4f, offset 0x1dc\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x0ebe, lo: 0x9f, hi: 0x9f},\n\t// Block 0x50, offset 0x1de\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x172a, lo: 0xb3, hi: 0xb3},\n\t// Block 0x51, offset 0x1e0\n\t{value: 0x0004, lo: 0x0b},\n\t{value: 0x1692, lo: 0x80, hi: 0x82},\n\t{value: 0x16aa, lo: 0x83, hi: 0x83},\n\t{value: 0x16c2, lo: 0x84, hi: 0x85},\n\t{value: 0x16d2, lo: 0x86, hi: 0x89},\n\t{value: 0x16e6, lo: 0x8a, hi: 0x8c},\n\t{value: 0x16fa, lo: 0x8d, hi: 0x8d},\n\t{value: 0x1702, lo: 0x8e, hi: 0x8e},\n\t{value: 0x170a, lo: 0x8f, hi: 0x90},\n\t{value: 0x1716, lo: 0x91, hi: 0x93},\n\t{value: 0x1726, lo: 0x94, hi: 0x94},\n\t{value: 0x172e, lo: 0x95, hi: 0x95},\n\t// Block 0x52, offset 0x1ec\n\t{value: 0x0004, lo: 0x09},\n\t{value: 0x0001, lo: 0x80, hi: 0x80},\n\t{value: 0x812d, lo: 0xaa, hi: 0xaa},\n\t{value: 0x8132, lo: 0xab, hi: 0xab},\n\t{value: 0x8134, lo: 0xac, hi: 0xac},\n\t{value: 0x812f, lo: 0xad, hi: 0xad},\n\t{value: 0x8130, lo: 0xae, hi: 0xae},\n\t{value: 0x8130, lo: 0xaf, hi: 0xaf},\n\t{value: 0x05ae, lo: 0xb6, hi: 0xb6},\n\t{value: 0x0982, lo: 0xb8, hi: 0xba},\n\t// Block 0x53, offset 0x1f6\n\t{value: 0x0006, lo: 0x09},\n\t{value: 0x0406, lo: 0xb1, hi: 0xb1},\n\t{value: 0x040a, lo: 0xb2, hi: 0xb2},\n\t{value: 0x4bcc, lo: 0xb3, hi: 0xb3},\n\t{value: 0x040e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x4bd2, lo: 0xb5, hi: 0xb6},\n\t{value: 0x0412, lo: 0xb7, hi: 0xb7},\n\t{value: 0x0416, lo: 0xb8, hi: 0xb8},\n\t{value: 0x041a, lo: 0xb9, hi: 0xb9},\n\t{value: 0x4bde, lo: 0xba, hi: 0xbf},\n\t// Block 0x54, offset 0x200\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb4, hi: 0xbd},\n\t// Block 0x55, offset 0x203\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x02d8, lo: 0x9c, hi: 0x9c},\n\t{value: 0x02de, lo: 0x9d, hi: 0x9d},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9f},\n\t// Block 0x56, offset 0x207\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb1},\n\t// Block 0x57, offset 0x209\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x173e, lo: 0xb0, hi: 0xb0},\n\t// Block 0x58, offset 0x20b\n\t{value: 0x0006, lo: 0x05},\n\t{value: 0x0067, lo: 0xb1, hi: 0xb1},\n\t{value: 0x0047, lo: 0xb2, hi: 0xb3},\n\t{value: 0x0063, lo: 0xb4, hi: 0xb4},\n\t{value: 0x00dd, lo: 0xb8, hi: 0xb8},\n\t{value: 0x00e9, lo: 0xb9, hi: 0xb9},\n\t// Block 0x59, offset 0x211\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xac, hi: 0xac},\n\t// Block 0x5a, offset 0x214\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x84, hi: 0x84},\n\t{value: 0x8133, lo: 0xa0, hi: 0xb1},\n\t// Block 0x5b, offset 0x217\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xab, hi: 0xad},\n\t// Block 0x5c, offset 0x219\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x93, hi: 0x93},\n\t// Block 0x5d, offset 0x21b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0xb3, hi: 0xb3},\n\t// Block 0x5e, offset 0x21d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t// Block 0x5f, offset 0x21f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8133, lo: 0xb2, hi: 0xb3},\n\t{value: 0x812e, lo: 0xb4, hi: 0xb4},\n\t{value: 0x8133, lo: 0xb7, hi: 0xb8},\n\t{value: 0x8133, lo: 0xbe, hi: 0xbf},\n\t// Block 0x60, offset 0x225\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x81, hi: 0x81},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t// Block 0x61, offset 0x228\n\t{value: 0x000c, lo: 0x04},\n\t{value: 0x173a, lo: 0x9c, hi: 0x9d},\n\t{value: 0x014f, lo: 0x9e, hi: 0x9e},\n\t{value: 0x174a, lo: 0x9f, hi: 0x9f},\n\t{value: 0x01a6, lo: 0xa9, hi: 0xa9},\n\t// Block 0x62, offset 0x22d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xad, hi: 0xad},\n\t// Block 0x63, offset 0x22f\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xe500, lo: 0x80, hi: 0x80},\n\t{value: 0xc600, lo: 0x81, hi: 0x9b},\n\t{value: 0xe500, lo: 0x9c, hi: 0x9c},\n\t{value: 0xc600, lo: 0x9d, hi: 0xb7},\n\t{value: 0xe500, lo: 0xb8, hi: 0xb8},\n\t{value: 0xc600, lo: 0xb9, hi: 0xbf},\n\t// Block 0x64, offset 0x236\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x93},\n\t{value: 0xe500, lo: 0x94, hi: 0x94},\n\t{value: 0xc600, lo: 0x95, hi: 0xaf},\n\t{value: 0xe500, lo: 0xb0, hi: 0xb0},\n\t{value: 0xc600, lo: 0xb1, hi: 0xbf},\n\t// Block 0x65, offset 0x23c\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8b},\n\t{value: 0xe500, lo: 0x8c, hi: 0x8c},\n\t{value: 0xc600, lo: 0x8d, hi: 0xa7},\n\t{value: 0xe500, lo: 0xa8, hi: 0xa8},\n\t{value: 0xc600, lo: 0xa9, hi: 0xbf},\n\t// Block 0x66, offset 0x242\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xc600, lo: 0x80, hi: 0x83},\n\t{value: 0xe500, lo: 0x84, hi: 0x84},\n\t{value: 0xc600, lo: 0x85, hi: 0x9f},\n\t{value: 0xe500, lo: 0xa0, hi: 0xa0},\n\t{value: 0xc600, lo: 0xa1, hi: 0xbb},\n\t{value: 0xe500, lo: 0xbc, hi: 0xbc},\n\t{value: 0xc600, lo: 0xbd, hi: 0xbf},\n\t// Block 0x67, offset 0x24a\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x97},\n\t{value: 0xe500, lo: 0x98, hi: 0x98},\n\t{value: 0xc600, lo: 0x99, hi: 0xb3},\n\t{value: 0xe500, lo: 0xb4, hi: 0xb4},\n\t{value: 0xc600, lo: 0xb5, hi: 0xbf},\n\t// Block 0x68, offset 0x250\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x8f},\n\t{value: 0xe500, lo: 0x90, hi: 0x90},\n\t{value: 0xc600, lo: 0x91, hi: 0xab},\n\t{value: 0xe500, lo: 0xac, hi: 0xac},\n\t{value: 0xc600, lo: 0xad, hi: 0xbf},\n\t// Block 0x69, offset 0x256\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t{value: 0xe500, lo: 0xa4, hi: 0xa4},\n\t{value: 0xc600, lo: 0xa5, hi: 0xbf},\n\t// Block 0x6a, offset 0x25c\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0xc600, lo: 0x80, hi: 0x87},\n\t{value: 0xe500, lo: 0x88, hi: 0x88},\n\t{value: 0xc600, lo: 0x89, hi: 0xa3},\n\t// Block 0x6b, offset 0x260\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x0003, lo: 0x81, hi: 0xbf},\n\t// Block 0x6c, offset 0x262\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbd},\n\t// Block 0x6d, offset 0x264\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0xa0, hi: 0xa0},\n\t// Block 0x6e, offset 0x266\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb6, hi: 0xba},\n\t// Block 0x6f, offset 0x268\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x410f, lo: 0x89, hi: 0x89},\n\t{value: 0xa000, lo: 0x92, hi: 0x92},\n\t{value: 0xa000, lo: 0x9a, hi: 0x9a},\n\t{value: 0x4117, lo: 0xa4, hi: 0xa4},\n\t// Block 0x70, offset 0x26d\n\t{value: 0x002d, lo: 0x05},\n\t{value: 0x812e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t{value: 0x8133, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8101, lo: 0xb9, hi: 0xba},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x71, offset 0x273\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xa5, hi: 0xa5},\n\t{value: 0x812e, lo: 0xa6, hi: 0xa6},\n\t// Block 0x72, offset 0x276\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa4, hi: 0xa7},\n\t// Block 0x73, offset 0x278\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xa9, hi: 0xad},\n\t// Block 0x74, offset 0x27a\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xab, hi: 0xac},\n\t// Block 0x75, offset 0x27c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x812e, lo: 0xba, hi: 0xbb},\n\t{value: 0x812e, lo: 0xbd, hi: 0xbf},\n\t// Block 0x76, offset 0x27f\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x812e, lo: 0x86, hi: 0x87},\n\t{value: 0x8133, lo: 0x88, hi: 0x8a},\n\t{value: 0x812e, lo: 0x8b, hi: 0x8b},\n\t{value: 0x8133, lo: 0x8c, hi: 0x8c},\n\t{value: 0x812e, lo: 0x8d, hi: 0x90},\n\t// Block 0x77, offset 0x285\n\t{value: 0x0005, lo: 0x03},\n\t{value: 0x8133, lo: 0x82, hi: 0x82},\n\t{value: 0x812e, lo: 0x83, hi: 0x84},\n\t{value: 0x812e, lo: 0x85, hi: 0x85},\n\t// Block 0x78, offset 0x289\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x86, hi: 0x86},\n\t{value: 0x8105, lo: 0xb0, hi: 0xb0},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x79, offset 0x28d\n\t{value: 0x17fe, lo: 0x07},\n\t{value: 0xa000, lo: 0x99, hi: 0x99},\n\t{value: 0x4287, lo: 0x9a, hi: 0x9a},\n\t{value: 0xa000, lo: 0x9b, hi: 0x9b},\n\t{value: 0x4291, lo: 0x9c, hi: 0x9c},\n\t{value: 0xa000, lo: 0xa5, hi: 0xa5},\n\t{value: 0x429b, lo: 0xab, hi: 0xab},\n\t{value: 0x8105, lo: 0xb9, hi: 0xba},\n\t// Block 0x7a, offset 0x295\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0x8133, lo: 0x80, hi: 0x82},\n\t{value: 0x9900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x42a5, lo: 0xae, hi: 0xae},\n\t{value: 0x42af, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb1, hi: 0xb2},\n\t{value: 0x8105, lo: 0xb3, hi: 0xb4},\n\t// Block 0x7b, offset 0x29c\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x80, hi: 0x80},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0x7c, offset 0x29f\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb5, hi: 0xb5},\n\t{value: 0x8103, lo: 0xb6, hi: 0xb6},\n\t// Block 0x7d, offset 0x2a2\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x8103, lo: 0xa9, hi: 0xaa},\n\t// Block 0x7e, offset 0x2a4\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0xbb, hi: 0xbc},\n\t{value: 0x9900, lo: 0xbe, hi: 0xbe},\n\t// Block 0x7f, offset 0x2a7\n\t{value: 0x0000, lo: 0x07},\n\t{value: 0xa000, lo: 0x87, hi: 0x87},\n\t{value: 0x42b9, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42c3, lo: 0x8c, hi: 0x8c},\n\t{value: 0x8105, lo: 0x8d, hi: 0x8d},\n\t{value: 0x9900, lo: 0x97, hi: 0x97},\n\t{value: 0x8133, lo: 0xa6, hi: 0xac},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb4},\n\t// Block 0x80, offset 0x2af\n\t{value: 0x5d33, lo: 0x09},\n\t{value: 0xa000, lo: 0x82, hi: 0x82},\n\t{value: 0x42cd, lo: 0x83, hi: 0x84},\n\t{value: 0x42d7, lo: 0x85, hi: 0x85},\n\t{value: 0xa000, lo: 0x8b, hi: 0x8b},\n\t{value: 0x42e1, lo: 0x8e, hi: 0x8e},\n\t{value: 0xa000, lo: 0x90, hi: 0x90},\n\t{value: 0x42eb, lo: 0x91, hi: 0x91},\n\t{value: 0x9900, lo: 0xb8, hi: 0xb8},\n\t{value: 0x9900, lo: 0xbb, hi: 0xbb},\n\t// Block 0x81, offset 0x2b9\n\t{value: 0x0000, lo: 0x06},\n\t{value: 0xb900, lo: 0x82, hi: 0x82},\n\t{value: 0x4c14, lo: 0x85, hi: 0x85},\n\t{value: 0x4c09, lo: 0x87, hi: 0x87},\n\t{value: 0x4c1f, lo: 0x88, hi: 0x88},\n\t{value: 0x9900, lo: 0x89, hi: 0x89},\n\t{value: 0x8105, lo: 0x8e, hi: 0x90},\n\t// Block 0x82, offset 0x2c0\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x86, hi: 0x86},\n\t{value: 0x8133, lo: 0x9e, hi: 0x9e},\n\t// Block 0x83, offset 0x2c4\n\t{value: 0x560b, lo: 0x06},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb9, hi: 0xb9},\n\t{value: 0x9900, lo: 0xba, hi: 0xba},\n\t{value: 0x42ff, lo: 0xbb, hi: 0xbb},\n\t{value: 0x42f5, lo: 0xbc, hi: 0xbd},\n\t{value: 0x4309, lo: 0xbe, hi: 0xbe},\n\t// Block 0x84, offset 0x2cb\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0x82, hi: 0x82},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x85, offset 0x2ce\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0x9900, lo: 0xaf, hi: 0xaf},\n\t{value: 0xa000, lo: 0xb8, hi: 0xb9},\n\t{value: 0x4313, lo: 0xba, hi: 0xba},\n\t{value: 0x431d, lo: 0xbb, hi: 0xbb},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x86, offset 0x2d4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x80, hi: 0x80},\n\t// Block 0x87, offset 0x2d6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xbf, hi: 0xbf},\n\t// Block 0x88, offset 0x2d8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb6, hi: 0xb6},\n\t{value: 0x8103, lo: 0xb7, hi: 0xb7},\n\t// Block 0x89, offset 0x2db\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xab, hi: 0xab},\n\t// Block 0x8a, offset 0x2dd\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8105, lo: 0xb9, hi: 0xb9},\n\t{value: 0x8103, lo: 0xba, hi: 0xba},\n\t// Block 0x8b, offset 0x2e0\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x9900, lo: 0xb0, hi: 0xb0},\n\t{value: 0xa000, lo: 0xb5, hi: 0xb5},\n\t{value: 0x4327, lo: 0xb8, hi: 0xb8},\n\t{value: 0x8105, lo: 0xbd, hi: 0xbe},\n\t// Block 0x8c, offset 0x2e5\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8103, lo: 0x83, hi: 0x83},\n\t// Block 0x8d, offset 0x2e7\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xa0, hi: 0xa0},\n\t// Block 0x8e, offset 0x2e9\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0xb4, hi: 0xb4},\n\t// Block 0x8f, offset 0x2eb\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x87, hi: 0x87},\n\t// Block 0x90, offset 0x2ed\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x99, hi: 0x99},\n\t// Block 0x91, offset 0x2ef\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8103, lo: 0x82, hi: 0x82},\n\t{value: 0x8105, lo: 0x84, hi: 0x85},\n\t// Block 0x92, offset 0x2f2\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x97, hi: 0x97},\n\t// Block 0x93, offset 0x2f4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8105, lo: 0x81, hi: 0x82},\n\t// Block 0x94, offset 0x2f6\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0xb900, lo: 0x9e, hi: 0x9e},\n\t{value: 0x9900, lo: 0x9f, hi: 0xa0},\n\t{value: 0x4c83, lo: 0xa1, hi: 0xa1},\n\t{value: 0x4c8e, lo: 0xa2, hi: 0xa2},\n\t{value: 0x4c2a, lo: 0xa3, hi: 0xa3},\n\t{value: 0x4c40, lo: 0xa4, hi: 0xa4},\n\t{value: 0x4c35, lo: 0xa5, hi: 0xa5},\n\t{value: 0x4c56, lo: 0xa6, hi: 0xa6},\n\t{value: 0x4c74, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4c65, lo: 0xa8, hi: 0xa8},\n\t{value: 0xb900, lo: 0xa9, hi: 0xa9},\n\t{value: 0x8105, lo: 0xaf, hi: 0xaf},\n\t// Block 0x95, offset 0x303\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0xb0, hi: 0xb4},\n\t// Block 0x96, offset 0x305\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xb0, hi: 0xb6},\n\t// Block 0x97, offset 0x307\n\t{value: 0x0000, lo: 0x05},\n\t{value: 0xa000, lo: 0xa3, hi: 0xa3},\n\t{value: 0xb900, lo: 0xa7, hi: 0xa7},\n\t{value: 0x4c4b, lo: 0xa8, hi: 0xa8},\n\t{value: 0x4b35, lo: 0xa9, hi: 0xa9},\n\t{value: 0x4347, lo: 0xaa, hi: 0xaa},\n\t// Block 0x98, offset 0x30d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8102, lo: 0xb0, hi: 0xb1},\n\t// Block 0x99, offset 0x30f\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8101, lo: 0x9e, hi: 0x9e},\n\t// Block 0x9a, offset 0x311\n\t{value: 0x0002, lo: 0x02},\n\t{value: 0x0043, lo: 0x96, hi: 0xaf},\n\t{value: 0x0021, lo: 0xb0, hi: 0xb9},\n\t// Block 0x9b, offset 0x314\n\t{value: 0x0000, lo: 0x0c},\n\t{value: 0x4743, lo: 0x9e, hi: 0x9e},\n\t{value: 0x474d, lo: 0x9f, hi: 0x9f},\n\t{value: 0x4781, lo: 0xa0, hi: 0xa0},\n\t{value: 0x478f, lo: 0xa1, hi: 0xa1},\n\t{value: 0x479d, lo: 0xa2, hi: 0xa2},\n\t{value: 0x47ab, lo: 0xa3, hi: 0xa3},\n\t{value: 0x47b9, lo: 0xa4, hi: 0xa4},\n\t{value: 0x812c, lo: 0xa5, hi: 0xa6},\n\t{value: 0x8101, lo: 0xa7, hi: 0xa9},\n\t{value: 0x8131, lo: 0xad, hi: 0xad},\n\t{value: 0x812c, lo: 0xae, hi: 0xb2},\n\t{value: 0x812e, lo: 0xbb, hi: 0xbf},\n\t// Block 0x9c, offset 0x321\n\t{value: 0x0000, lo: 0x09},\n\t{value: 0x812e, lo: 0x80, hi: 0x82},\n\t{value: 0x8133, lo: 0x85, hi: 0x89},\n\t{value: 0x812e, lo: 0x8a, hi: 0x8b},\n\t{value: 0x8133, lo: 0xaa, hi: 0xad},\n\t{value: 0x4757, lo: 0xbb, hi: 0xbb},\n\t{value: 0x4761, lo: 0xbc, hi: 0xbc},\n\t{value: 0x47c7, lo: 0xbd, hi: 0xbd},\n\t{value: 0x47e3, lo: 0xbe, hi: 0xbe},\n\t{value: 0x47d5, lo: 0xbf, hi: 0xbf},\n\t// Block 0x9d, offset 0x32b\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x47f1, lo: 0x80, hi: 0x80},\n\t// Block 0x9e, offset 0x32d\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x82, hi: 0x84},\n\t// Block 0x9f, offset 0x32f\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x0043, lo: 0x80, hi: 0x99},\n\t{value: 0x0083, lo: 0x9a, hi: 0xb3},\n\t{value: 0x0043, lo: 0xb4, hi: 0xbf},\n\t// Block 0xa0, offset 0x333\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x005b, lo: 0x80, hi: 0x8d},\n\t{value: 0x0083, lo: 0x8e, hi: 0x94},\n\t{value: 0x0093, lo: 0x96, hi: 0xa7},\n\t{value: 0x0043, lo: 0xa8, hi: 0xbf},\n\t// Block 0xa1, offset 0x338\n\t{value: 0x0002, lo: 0x0b},\n\t{value: 0x0073, lo: 0x80, hi: 0x81},\n\t{value: 0x0083, lo: 0x82, hi: 0x9b},\n\t{value: 0x0043, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0047, lo: 0x9e, hi: 0x9f},\n\t{value: 0x004f, lo: 0xa2, hi: 0xa2},\n\t{value: 0x0055, lo: 0xa5, hi: 0xa6},\n\t{value: 0x005d, lo: 0xa9, hi: 0xac},\n\t{value: 0x0067, lo: 0xae, hi: 0xb5},\n\t{value: 0x0083, lo: 0xb6, hi: 0xb9},\n\t{value: 0x008d, lo: 0xbb, hi: 0xbb},\n\t{value: 0x0091, lo: 0xbd, hi: 0xbf},\n\t// Block 0xa2, offset 0x344\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x0097, lo: 0x80, hi: 0x83},\n\t{value: 0x00a1, lo: 0x85, hi: 0x8f},\n\t{value: 0x0043, lo: 0x90, hi: 0xa9},\n\t{value: 0x0083, lo: 0xaa, hi: 0xbf},\n\t// Block 0xa3, offset 0x349\n\t{value: 0x0002, lo: 0x08},\n\t{value: 0x00af, lo: 0x80, hi: 0x83},\n\t{value: 0x0043, lo: 0x84, hi: 0x85},\n\t{value: 0x0049, lo: 0x87, hi: 0x8a},\n\t{value: 0x0055, lo: 0x8d, hi: 0x94},\n\t{value: 0x0067, lo: 0x96, hi: 0x9c},\n\t{value: 0x0083, lo: 0x9e, hi: 0xb7},\n\t{value: 0x0043, lo: 0xb8, hi: 0xb9},\n\t{value: 0x0049, lo: 0xbb, hi: 0xbe},\n\t// Block 0xa4, offset 0x352\n\t{value: 0x0002, lo: 0x05},\n\t{value: 0x0053, lo: 0x80, hi: 0x84},\n\t{value: 0x005f, lo: 0x86, hi: 0x86},\n\t{value: 0x0067, lo: 0x8a, hi: 0x90},\n\t{value: 0x0083, lo: 0x92, hi: 0xab},\n\t{value: 0x0043, lo: 0xac, hi: 0xbf},\n\t// Block 0xa5, offset 0x358\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x006b, lo: 0x80, hi: 0x85},\n\t{value: 0x0083, lo: 0x86, hi: 0x9f},\n\t{value: 0x0043, lo: 0xa0, hi: 0xb9},\n\t{value: 0x0083, lo: 0xba, hi: 0xbf},\n\t// Block 0xa6, offset 0x35d\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x008f, lo: 0x80, hi: 0x93},\n\t{value: 0x0043, lo: 0x94, hi: 0xad},\n\t{value: 0x0083, lo: 0xae, hi: 0xbf},\n\t// Block 0xa7, offset 0x361\n\t{value: 0x0002, lo: 0x04},\n\t{value: 0x00a7, lo: 0x80, hi: 0x87},\n\t{value: 0x0043, lo: 0x88, hi: 0xa1},\n\t{value: 0x0083, lo: 0xa2, hi: 0xbb},\n\t{value: 0x0043, lo: 0xbc, hi: 0xbf},\n\t// Block 0xa8, offset 0x366\n\t{value: 0x0002, lo: 0x03},\n\t{value: 0x004b, lo: 0x80, hi: 0x95},\n\t{value: 0x0083, lo: 0x96, hi: 0xaf},\n\t{value: 0x0043, lo: 0xb0, hi: 0xbf},\n\t// Block 0xa9, offset 0x36a\n\t{value: 0x0003, lo: 0x0f},\n\t{value: 0x023c, lo: 0x80, hi: 0x80},\n\t{value: 0x0556, lo: 0x81, hi: 0x81},\n\t{value: 0x023f, lo: 0x82, hi: 0x9a},\n\t{value: 0x0552, lo: 0x9b, hi: 0x9b},\n\t{value: 0x024b, lo: 0x9c, hi: 0x9c},\n\t{value: 0x0254, lo: 0x9d, hi: 0x9d},\n\t{value: 0x025a, lo: 0x9e, hi: 0x9e},\n\t{value: 0x027e, lo: 0x9f, hi: 0x9f},\n\t{value: 0x026f, lo: 0xa0, hi: 0xa0},\n\t{value: 0x026c, lo: 0xa1, hi: 0xa1},\n\t{value: 0x01f7, lo: 0xa2, hi: 0xb2},\n\t{value: 0x020c, lo: 0xb3, hi: 0xb3},\n\t{value: 0x022a, lo: 0xb4, hi: 0xba},\n\t{value: 0x0556, lo: 0xbb, hi: 0xbb},\n\t{value: 0x023f, lo: 0xbc, hi: 0xbf},\n\t// Block 0xaa, offset 0x37a\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x024b, lo: 0x80, hi: 0x94},\n\t{value: 0x0552, lo: 0x95, hi: 0x95},\n\t{value: 0x024b, lo: 0x96, hi: 0x96},\n\t{value: 0x0254, lo: 0x97, hi: 0x97},\n\t{value: 0x025a, lo: 0x98, hi: 0x98},\n\t{value: 0x027e, lo: 0x99, hi: 0x99},\n\t{value: 0x026f, lo: 0x9a, hi: 0x9a},\n\t{value: 0x026c, lo: 0x9b, hi: 0x9b},\n\t{value: 0x01f7, lo: 0x9c, hi: 0xac},\n\t{value: 0x020c, lo: 0xad, hi: 0xad},\n\t{value: 0x022a, lo: 0xae, hi: 0xb4},\n\t{value: 0x0556, lo: 0xb5, hi: 0xb5},\n\t{value: 0x023f, lo: 0xb6, hi: 0xbf},\n\t// Block 0xab, offset 0x388\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x025d, lo: 0x80, hi: 0x8e},\n\t{value: 0x0552, lo: 0x8f, hi: 0x8f},\n\t{value: 0x024b, lo: 0x90, hi: 0x90},\n\t{value: 0x0254, lo: 0x91, hi: 0x91},\n\t{value: 0x025a, lo: 0x92, hi: 0x92},\n\t{value: 0x027e, lo: 0x93, hi: 0x93},\n\t{value: 0x026f, lo: 0x94, hi: 0x94},\n\t{value: 0x026c, lo: 0x95, hi: 0x95},\n\t{value: 0x01f7, lo: 0x96, hi: 0xa6},\n\t{value: 0x020c, lo: 0xa7, hi: 0xa7},\n\t{value: 0x022a, lo: 0xa8, hi: 0xae},\n\t{value: 0x0556, lo: 0xaf, hi: 0xaf},\n\t{value: 0x023f, lo: 0xb0, hi: 0xbf},\n\t// Block 0xac, offset 0x396\n\t{value: 0x0003, lo: 0x0d},\n\t{value: 0x026f, lo: 0x80, hi: 0x88},\n\t{value: 0x0552, lo: 0x89, hi: 0x89},\n\t{value: 0x024b, lo: 0x8a, hi: 0x8a},\n\t{value: 0x0254, lo: 0x8b, hi: 0x8b},\n\t{value: 0x025a, lo: 0x8c, hi: 0x8c},\n\t{value: 0x027e, lo: 0x8d, hi: 0x8d},\n\t{value: 0x026f, lo: 0x8e, hi: 0x8e},\n\t{value: 0x026c, lo: 0x8f, hi: 0x8f},\n\t{value: 0x01f7, lo: 0x90, hi: 0xa0},\n\t{value: 0x020c, lo: 0xa1, hi: 0xa1},\n\t{value: 0x022a, lo: 0xa2, hi: 0xa8},\n\t{value: 0x0556, lo: 0xa9, hi: 0xa9},\n\t{value: 0x023f, lo: 0xaa, hi: 0xbf},\n\t// Block 0xad, offset 0x3a4\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0x8f, hi: 0x8f},\n\t// Block 0xae, offset 0x3a6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t// Block 0xaf, offset 0x3a8\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x8133, lo: 0xac, hi: 0xaf},\n\t// Block 0xb0, offset 0x3aa\n\t{value: 0x0000, lo: 0x03},\n\t{value: 0x8134, lo: 0xac, hi: 0xad},\n\t{value: 0x812e, lo: 0xae, hi: 0xae},\n\t{value: 0x8133, lo: 0xaf, hi: 0xaf},\n\t// Block 0xb1, offset 0x3ae\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0xae, hi: 0xae},\n\t{value: 0x812e, lo: 0xaf, hi: 0xaf},\n\t// Block 0xb2, offset 0x3b1\n\t{value: 0x0000, lo: 0x04},\n\t{value: 0x8133, lo: 0xa3, hi: 0xa3},\n\t{value: 0x8133, lo: 0xa6, hi: 0xa6},\n\t{value: 0x8133, lo: 0xae, hi: 0xaf},\n\t{value: 0x8133, lo: 0xb5, hi: 0xb5},\n\t// Block 0xb3, offset 0x3b6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x812e, lo: 0x90, hi: 0x96},\n\t// Block 0xb4, offset 0x3b8\n\t{value: 0x0000, lo: 0x02},\n\t{value: 0x8133, lo: 0x84, hi: 0x89},\n\t{value: 0x8103, lo: 0x8a, hi: 0x8a},\n\t// Block 0xb5, offset 0x3bb\n\t{value: 0x0002, lo: 0x0a},\n\t{value: 0x0063, lo: 0x80, hi: 0x89},\n\t{value: 0x1a7e, lo: 0x8a, hi: 0x8a},\n\t{value: 0x1ab1, lo: 0x8b, hi: 0x8b},\n\t{value: 0x1acc, lo: 0x8c, hi: 0x8c},\n\t{value: 0x1ad2, lo: 0x8d, hi: 0x8d},\n\t{value: 0x1cf0, lo: 0x8e, hi: 0x8e},\n\t{value: 0x1ade, lo: 0x8f, hi: 0x8f},\n\t{value: 0x1aa8, lo: 0xaa, hi: 0xaa},\n\t{value: 0x1aab, lo: 0xab, hi: 0xab},\n\t{value: 0x1aae, lo: 0xac, hi: 0xac},\n\t// Block 0xb6, offset 0x3c6\n\t{value: 0x0000, lo: 0x01},\n\t{value: 0x1a6c, lo: 0x90, hi: 0x90},\n\t// Block 0xb7, offset 0x3c8\n\t{value: 0x0028, lo: 0x09},\n\t{value: 0x2999, lo: 0x80, hi: 0x80},\n\t{value: 0x295d, lo: 0x81, hi: 0x81},\n\t{value: 0x2967, lo: 0x82, hi: 0x82},\n\t{value: 0x297b, lo: 0x83, hi: 0x84},\n\t{value: 0x2985, lo: 0x85, hi: 0x86},\n\t{value: 0x2971, lo: 0x87, hi: 0x87},\n\t{value: 0x298f, lo: 0x88, hi: 0x88},\n\t{value: 0x0c6a, lo: 0x90, hi: 0x90},\n\t{value: 0x09e2, lo: 0x91, hi: 0x91},\n\t// Block 0xb8, offset 0x3d2\n\t{value: 0x0002, lo: 0x01},\n\t{value: 0x0021, lo: 0xb0, hi: 0xb9},\n}\n\n// recompMap: 7688 bytes (entries only)\nvar recompMap map[uint32]rune\nvar recompMapOnce sync.Once\n\nconst recompMapPacked = \"\" +\n\t\"\\x00A\\x03\\x00\\x00\\x00\\x00\\xc0\" + // 0x00410300: 0x000000C0\n\t\"\\x00A\\x03\\x01\\x00\\x00\\x00\\xc1\" + // 0x00410301: 0x000000C1\n\t\"\\x00A\\x03\\x02\\x00\\x00\\x00\\xc2\" + // 0x00410302: 0x000000C2\n\t\"\\x00A\\x03\\x03\\x00\\x00\\x00\\xc3\" + // 0x00410303: 0x000000C3\n\t\"\\x00A\\x03\\b\\x00\\x00\\x00\\xc4\" + // 0x00410308: 0x000000C4\n\t\"\\x00A\\x03\\n\\x00\\x00\\x00\\xc5\" + // 0x0041030A: 0x000000C5\n\t\"\\x00C\\x03'\\x00\\x00\\x00\\xc7\" + // 0x00430327: 0x000000C7\n\t\"\\x00E\\x03\\x00\\x00\\x00\\x00\\xc8\" + // 0x00450300: 0x000000C8\n\t\"\\x00E\\x03\\x01\\x00\\x00\\x00\\xc9\" + // 0x00450301: 0x000000C9\n\t\"\\x00E\\x03\\x02\\x00\\x00\\x00\\xca\" + // 0x00450302: 0x000000CA\n\t\"\\x00E\\x03\\b\\x00\\x00\\x00\\xcb\" + // 0x00450308: 0x000000CB\n\t\"\\x00I\\x03\\x00\\x00\\x00\\x00\\xcc\" + // 0x00490300: 0x000000CC\n\t\"\\x00I\\x03\\x01\\x00\\x00\\x00\\xcd\" + // 0x00490301: 0x000000CD\n\t\"\\x00I\\x03\\x02\\x00\\x00\\x00\\xce\" + // 0x00490302: 0x000000CE\n\t\"\\x00I\\x03\\b\\x00\\x00\\x00\\xcf\" + // 0x00490308: 0x000000CF\n\t\"\\x00N\\x03\\x03\\x00\\x00\\x00\\xd1\" + // 0x004E0303: 0x000000D1\n\t\"\\x00O\\x03\\x00\\x00\\x00\\x00\\xd2\" + // 0x004F0300: 0x000000D2\n\t\"\\x00O\\x03\\x01\\x00\\x00\\x00\\xd3\" + // 0x004F0301: 0x000000D3\n\t\"\\x00O\\x03\\x02\\x00\\x00\\x00\\xd4\" + // 0x004F0302: 0x000000D4\n\t\"\\x00O\\x03\\x03\\x00\\x00\\x00\\xd5\" + // 0x004F0303: 0x000000D5\n\t\"\\x00O\\x03\\b\\x00\\x00\\x00\\xd6\" + // 0x004F0308: 0x000000D6\n\t\"\\x00U\\x03\\x00\\x00\\x00\\x00\\xd9\" + // 0x00550300: 0x000000D9\n\t\"\\x00U\\x03\\x01\\x00\\x00\\x00\\xda\" + // 0x00550301: 0x000000DA\n\t\"\\x00U\\x03\\x02\\x00\\x00\\x00\\xdb\" + // 0x00550302: 0x000000DB\n\t\"\\x00U\\x03\\b\\x00\\x00\\x00\\xdc\" + // 0x00550308: 0x000000DC\n\t\"\\x00Y\\x03\\x01\\x00\\x00\\x00\\xdd\" + // 0x00590301: 0x000000DD\n\t\"\\x00a\\x03\\x00\\x00\\x00\\x00\\xe0\" + // 0x00610300: 0x000000E0\n\t\"\\x00a\\x03\\x01\\x00\\x00\\x00\\xe1\" + // 0x00610301: 0x000000E1\n\t\"\\x00a\\x03\\x02\\x00\\x00\\x00\\xe2\" + // 0x00610302: 0x000000E2\n\t\"\\x00a\\x03\\x03\\x00\\x00\\x00\\xe3\" + // 0x00610303: 0x000000E3\n\t\"\\x00a\\x03\\b\\x00\\x00\\x00\\xe4\" + // 0x00610308: 0x000000E4\n\t\"\\x00a\\x03\\n\\x00\\x00\\x00\\xe5\" + // 0x0061030A: 0x000000E5\n\t\"\\x00c\\x03'\\x00\\x00\\x00\\xe7\" + // 0x00630327: 0x000000E7\n\t\"\\x00e\\x03\\x00\\x00\\x00\\x00\\xe8\" + // 0x00650300: 0x000000E8\n\t\"\\x00e\\x03\\x01\\x00\\x00\\x00\\xe9\" + // 0x00650301: 0x000000E9\n\t\"\\x00e\\x03\\x02\\x00\\x00\\x00\\xea\" + // 0x00650302: 0x000000EA\n\t\"\\x00e\\x03\\b\\x00\\x00\\x00\\xeb\" + // 0x00650308: 0x000000EB\n\t\"\\x00i\\x03\\x00\\x00\\x00\\x00\\xec\" + // 0x00690300: 0x000000EC\n\t\"\\x00i\\x03\\x01\\x00\\x00\\x00\\xed\" + // 0x00690301: 0x000000ED\n\t\"\\x00i\\x03\\x02\\x00\\x00\\x00\\xee\" + // 0x00690302: 0x000000EE\n\t\"\\x00i\\x03\\b\\x00\\x00\\x00\\xef\" + // 0x00690308: 0x000000EF\n\t\"\\x00n\\x03\\x03\\x00\\x00\\x00\\xf1\" + // 0x006E0303: 0x000000F1\n\t\"\\x00o\\x03\\x00\\x00\\x00\\x00\\xf2\" + // 0x006F0300: 0x000000F2\n\t\"\\x00o\\x03\\x01\\x00\\x00\\x00\\xf3\" + // 0x006F0301: 0x000000F3\n\t\"\\x00o\\x03\\x02\\x00\\x00\\x00\\xf4\" + // 0x006F0302: 0x000000F4\n\t\"\\x00o\\x03\\x03\\x00\\x00\\x00\\xf5\" + // 0x006F0303: 0x000000F5\n\t\"\\x00o\\x03\\b\\x00\\x00\\x00\\xf6\" + // 0x006F0308: 0x000000F6\n\t\"\\x00u\\x03\\x00\\x00\\x00\\x00\\xf9\" + // 0x00750300: 0x000000F9\n\t\"\\x00u\\x03\\x01\\x00\\x00\\x00\\xfa\" + // 0x00750301: 0x000000FA\n\t\"\\x00u\\x03\\x02\\x00\\x00\\x00\\xfb\" + // 0x00750302: 0x000000FB\n\t\"\\x00u\\x03\\b\\x00\\x00\\x00\\xfc\" + // 0x00750308: 0x000000FC\n\t\"\\x00y\\x03\\x01\\x00\\x00\\x00\\xfd\" + // 0x00790301: 0x000000FD\n\t\"\\x00y\\x03\\b\\x00\\x00\\x00\\xff\" + // 0x00790308: 0x000000FF\n\t\"\\x00A\\x03\\x04\\x00\\x00\\x01\\x00\" + // 0x00410304: 0x00000100\n\t\"\\x00a\\x03\\x04\\x00\\x00\\x01\\x01\" + // 0x00610304: 0x00000101\n\t\"\\x00A\\x03\\x06\\x00\\x00\\x01\\x02\" + // 0x00410306: 0x00000102\n\t\"\\x00a\\x03\\x06\\x00\\x00\\x01\\x03\" + // 0x00610306: 0x00000103\n\t\"\\x00A\\x03(\\x00\\x00\\x01\\x04\" + // 0x00410328: 0x00000104\n\t\"\\x00a\\x03(\\x00\\x00\\x01\\x05\" + // 0x00610328: 0x00000105\n\t\"\\x00C\\x03\\x01\\x00\\x00\\x01\\x06\" + // 0x00430301: 0x00000106\n\t\"\\x00c\\x03\\x01\\x00\\x00\\x01\\a\" + // 0x00630301: 0x00000107\n\t\"\\x00C\\x03\\x02\\x00\\x00\\x01\\b\" + // 0x00430302: 0x00000108\n\t\"\\x00c\\x03\\x02\\x00\\x00\\x01\\t\" + // 0x00630302: 0x00000109\n\t\"\\x00C\\x03\\a\\x00\\x00\\x01\\n\" + // 0x00430307: 0x0000010A\n\t\"\\x00c\\x03\\a\\x00\\x00\\x01\\v\" + // 0x00630307: 0x0000010B\n\t\"\\x00C\\x03\\f\\x00\\x00\\x01\\f\" + // 0x0043030C: 0x0000010C\n\t\"\\x00c\\x03\\f\\x00\\x00\\x01\\r\" + // 0x0063030C: 0x0000010D\n\t\"\\x00D\\x03\\f\\x00\\x00\\x01\\x0e\" + // 0x0044030C: 0x0000010E\n\t\"\\x00d\\x03\\f\\x00\\x00\\x01\\x0f\" + // 0x0064030C: 0x0000010F\n\t\"\\x00E\\x03\\x04\\x00\\x00\\x01\\x12\" + // 0x00450304: 0x00000112\n\t\"\\x00e\\x03\\x04\\x00\\x00\\x01\\x13\" + // 0x00650304: 0x00000113\n\t\"\\x00E\\x03\\x06\\x00\\x00\\x01\\x14\" + // 0x00450306: 0x00000114\n\t\"\\x00e\\x03\\x06\\x00\\x00\\x01\\x15\" + // 0x00650306: 0x00000115\n\t\"\\x00E\\x03\\a\\x00\\x00\\x01\\x16\" + // 0x00450307: 0x00000116\n\t\"\\x00e\\x03\\a\\x00\\x00\\x01\\x17\" + // 0x00650307: 0x00000117\n\t\"\\x00E\\x03(\\x00\\x00\\x01\\x18\" + // 0x00450328: 0x00000118\n\t\"\\x00e\\x03(\\x00\\x00\\x01\\x19\" + // 0x00650328: 0x00000119\n\t\"\\x00E\\x03\\f\\x00\\x00\\x01\\x1a\" + // 0x0045030C: 0x0000011A\n\t\"\\x00e\\x03\\f\\x00\\x00\\x01\\x1b\" + // 0x0065030C: 0x0000011B\n\t\"\\x00G\\x03\\x02\\x00\\x00\\x01\\x1c\" + // 0x00470302: 0x0000011C\n\t\"\\x00g\\x03\\x02\\x00\\x00\\x01\\x1d\" + // 0x00670302: 0x0000011D\n\t\"\\x00G\\x03\\x06\\x00\\x00\\x01\\x1e\" + // 0x00470306: 0x0000011E\n\t\"\\x00g\\x03\\x06\\x00\\x00\\x01\\x1f\" + // 0x00670306: 0x0000011F\n\t\"\\x00G\\x03\\a\\x00\\x00\\x01 \" + // 0x00470307: 0x00000120\n\t\"\\x00g\\x03\\a\\x00\\x00\\x01!\" + // 0x00670307: 0x00000121\n\t\"\\x00G\\x03'\\x00\\x00\\x01\\\"\" + // 0x00470327: 0x00000122\n\t\"\\x00g\\x03'\\x00\\x00\\x01#\" + // 0x00670327: 0x00000123\n\t\"\\x00H\\x03\\x02\\x00\\x00\\x01$\" + // 0x00480302: 0x00000124\n\t\"\\x00h\\x03\\x02\\x00\\x00\\x01%\" + // 0x00680302: 0x00000125\n\t\"\\x00I\\x03\\x03\\x00\\x00\\x01(\" + // 0x00490303: 0x00000128\n\t\"\\x00i\\x03\\x03\\x00\\x00\\x01)\" + // 0x00690303: 0x00000129\n\t\"\\x00I\\x03\\x04\\x00\\x00\\x01*\" + // 0x00490304: 0x0000012A\n\t\"\\x00i\\x03\\x04\\x00\\x00\\x01+\" + // 0x00690304: 0x0000012B\n\t\"\\x00I\\x03\\x06\\x00\\x00\\x01,\" + // 0x00490306: 0x0000012C\n\t\"\\x00i\\x03\\x06\\x00\\x00\\x01-\" + // 0x00690306: 0x0000012D\n\t\"\\x00I\\x03(\\x00\\x00\\x01.\" + // 0x00490328: 0x0000012E\n\t\"\\x00i\\x03(\\x00\\x00\\x01/\" + // 0x00690328: 0x0000012F\n\t\"\\x00I\\x03\\a\\x00\\x00\\x010\" + // 0x00490307: 0x00000130\n\t\"\\x00J\\x03\\x02\\x00\\x00\\x014\" + // 0x004A0302: 0x00000134\n\t\"\\x00j\\x03\\x02\\x00\\x00\\x015\" + // 0x006A0302: 0x00000135\n\t\"\\x00K\\x03'\\x00\\x00\\x016\" + // 0x004B0327: 0x00000136\n\t\"\\x00k\\x03'\\x00\\x00\\x017\" + // 0x006B0327: 0x00000137\n\t\"\\x00L\\x03\\x01\\x00\\x00\\x019\" + // 0x004C0301: 0x00000139\n\t\"\\x00l\\x03\\x01\\x00\\x00\\x01:\" + // 0x006C0301: 0x0000013A\n\t\"\\x00L\\x03'\\x00\\x00\\x01;\" + // 0x004C0327: 0x0000013B\n\t\"\\x00l\\x03'\\x00\\x00\\x01<\" + // 0x006C0327: 0x0000013C\n\t\"\\x00L\\x03\\f\\x00\\x00\\x01=\" + // 0x004C030C: 0x0000013D\n\t\"\\x00l\\x03\\f\\x00\\x00\\x01>\" + // 0x006C030C: 0x0000013E\n\t\"\\x00N\\x03\\x01\\x00\\x00\\x01C\" + // 0x004E0301: 0x00000143\n\t\"\\x00n\\x03\\x01\\x00\\x00\\x01D\" + // 0x006E0301: 0x00000144\n\t\"\\x00N\\x03'\\x00\\x00\\x01E\" + // 0x004E0327: 0x00000145\n\t\"\\x00n\\x03'\\x00\\x00\\x01F\" + // 0x006E0327: 0x00000146\n\t\"\\x00N\\x03\\f\\x00\\x00\\x01G\" + // 0x004E030C: 0x00000147\n\t\"\\x00n\\x03\\f\\x00\\x00\\x01H\" + // 0x006E030C: 0x00000148\n\t\"\\x00O\\x03\\x04\\x00\\x00\\x01L\" + // 0x004F0304: 0x0000014C\n\t\"\\x00o\\x03\\x04\\x00\\x00\\x01M\" + // 0x006F0304: 0x0000014D\n\t\"\\x00O\\x03\\x06\\x00\\x00\\x01N\" + // 0x004F0306: 0x0000014E\n\t\"\\x00o\\x03\\x06\\x00\\x00\\x01O\" + // 0x006F0306: 0x0000014F\n\t\"\\x00O\\x03\\v\\x00\\x00\\x01P\" + // 0x004F030B: 0x00000150\n\t\"\\x00o\\x03\\v\\x00\\x00\\x01Q\" + // 0x006F030B: 0x00000151\n\t\"\\x00R\\x03\\x01\\x00\\x00\\x01T\" + // 0x00520301: 0x00000154\n\t\"\\x00r\\x03\\x01\\x00\\x00\\x01U\" + // 0x00720301: 0x00000155\n\t\"\\x00R\\x03'\\x00\\x00\\x01V\" + // 0x00520327: 0x00000156\n\t\"\\x00r\\x03'\\x00\\x00\\x01W\" + // 0x00720327: 0x00000157\n\t\"\\x00R\\x03\\f\\x00\\x00\\x01X\" + // 0x0052030C: 0x00000158\n\t\"\\x00r\\x03\\f\\x00\\x00\\x01Y\" + // 0x0072030C: 0x00000159\n\t\"\\x00S\\x03\\x01\\x00\\x00\\x01Z\" + // 0x00530301: 0x0000015A\n\t\"\\x00s\\x03\\x01\\x00\\x00\\x01[\" + // 0x00730301: 0x0000015B\n\t\"\\x00S\\x03\\x02\\x00\\x00\\x01\\\\\" + // 0x00530302: 0x0000015C\n\t\"\\x00s\\x03\\x02\\x00\\x00\\x01]\" + // 0x00730302: 0x0000015D\n\t\"\\x00S\\x03'\\x00\\x00\\x01^\" + // 0x00530327: 0x0000015E\n\t\"\\x00s\\x03'\\x00\\x00\\x01_\" + // 0x00730327: 0x0000015F\n\t\"\\x00S\\x03\\f\\x00\\x00\\x01`\" + // 0x0053030C: 0x00000160\n\t\"\\x00s\\x03\\f\\x00\\x00\\x01a\" + // 0x0073030C: 0x00000161\n\t\"\\x00T\\x03'\\x00\\x00\\x01b\" + // 0x00540327: 0x00000162\n\t\"\\x00t\\x03'\\x00\\x00\\x01c\" + // 0x00740327: 0x00000163\n\t\"\\x00T\\x03\\f\\x00\\x00\\x01d\" + // 0x0054030C: 0x00000164\n\t\"\\x00t\\x03\\f\\x00\\x00\\x01e\" + // 0x0074030C: 0x00000165\n\t\"\\x00U\\x03\\x03\\x00\\x00\\x01h\" + // 0x00550303: 0x00000168\n\t\"\\x00u\\x03\\x03\\x00\\x00\\x01i\" + // 0x00750303: 0x00000169\n\t\"\\x00U\\x03\\x04\\x00\\x00\\x01j\" + // 0x00550304: 0x0000016A\n\t\"\\x00u\\x03\\x04\\x00\\x00\\x01k\" + // 0x00750304: 0x0000016B\n\t\"\\x00U\\x03\\x06\\x00\\x00\\x01l\" + // 0x00550306: 0x0000016C\n\t\"\\x00u\\x03\\x06\\x00\\x00\\x01m\" + // 0x00750306: 0x0000016D\n\t\"\\x00U\\x03\\n\\x00\\x00\\x01n\" + // 0x0055030A: 0x0000016E\n\t\"\\x00u\\x03\\n\\x00\\x00\\x01o\" + // 0x0075030A: 0x0000016F\n\t\"\\x00U\\x03\\v\\x00\\x00\\x01p\" + // 0x0055030B: 0x00000170\n\t\"\\x00u\\x03\\v\\x00\\x00\\x01q\" + // 0x0075030B: 0x00000171\n\t\"\\x00U\\x03(\\x00\\x00\\x01r\" + // 0x00550328: 0x00000172\n\t\"\\x00u\\x03(\\x00\\x00\\x01s\" + // 0x00750328: 0x00000173\n\t\"\\x00W\\x03\\x02\\x00\\x00\\x01t\" + // 0x00570302: 0x00000174\n\t\"\\x00w\\x03\\x02\\x00\\x00\\x01u\" + // 0x00770302: 0x00000175\n\t\"\\x00Y\\x03\\x02\\x00\\x00\\x01v\" + // 0x00590302: 0x00000176\n\t\"\\x00y\\x03\\x02\\x00\\x00\\x01w\" + // 0x00790302: 0x00000177\n\t\"\\x00Y\\x03\\b\\x00\\x00\\x01x\" + // 0x00590308: 0x00000178\n\t\"\\x00Z\\x03\\x01\\x00\\x00\\x01y\" + // 0x005A0301: 0x00000179\n\t\"\\x00z\\x03\\x01\\x00\\x00\\x01z\" + // 0x007A0301: 0x0000017A\n\t\"\\x00Z\\x03\\a\\x00\\x00\\x01{\" + // 0x005A0307: 0x0000017B\n\t\"\\x00z\\x03\\a\\x00\\x00\\x01|\" + // 0x007A0307: 0x0000017C\n\t\"\\x00Z\\x03\\f\\x00\\x00\\x01}\" + // 0x005A030C: 0x0000017D\n\t\"\\x00z\\x03\\f\\x00\\x00\\x01~\" + // 0x007A030C: 0x0000017E\n\t\"\\x00O\\x03\\x1b\\x00\\x00\\x01\\xa0\" + // 0x004F031B: 0x000001A0\n\t\"\\x00o\\x03\\x1b\\x00\\x00\\x01\\xa1\" + // 0x006F031B: 0x000001A1\n\t\"\\x00U\\x03\\x1b\\x00\\x00\\x01\\xaf\" + // 0x0055031B: 0x000001AF\n\t\"\\x00u\\x03\\x1b\\x00\\x00\\x01\\xb0\" + // 0x0075031B: 0x000001B0\n\t\"\\x00A\\x03\\f\\x00\\x00\\x01\\xcd\" + // 0x0041030C: 0x000001CD\n\t\"\\x00a\\x03\\f\\x00\\x00\\x01\\xce\" + // 0x0061030C: 0x000001CE\n\t\"\\x00I\\x03\\f\\x00\\x00\\x01\\xcf\" + // 0x0049030C: 0x000001CF\n\t\"\\x00i\\x03\\f\\x00\\x00\\x01\\xd0\" + // 0x0069030C: 0x000001D0\n\t\"\\x00O\\x03\\f\\x00\\x00\\x01\\xd1\" + // 0x004F030C: 0x000001D1\n\t\"\\x00o\\x03\\f\\x00\\x00\\x01\\xd2\" + // 0x006F030C: 0x000001D2\n\t\"\\x00U\\x03\\f\\x00\\x00\\x01\\xd3\" + // 0x0055030C: 0x000001D3\n\t\"\\x00u\\x03\\f\\x00\\x00\\x01\\xd4\" + // 0x0075030C: 0x000001D4\n\t\"\\x00\\xdc\\x03\\x04\\x00\\x00\\x01\\xd5\" + // 0x00DC0304: 0x000001D5\n\t\"\\x00\\xfc\\x03\\x04\\x00\\x00\\x01\\xd6\" + // 0x00FC0304: 0x000001D6\n\t\"\\x00\\xdc\\x03\\x01\\x00\\x00\\x01\\xd7\" + // 0x00DC0301: 0x000001D7\n\t\"\\x00\\xfc\\x03\\x01\\x00\\x00\\x01\\xd8\" + // 0x00FC0301: 0x000001D8\n\t\"\\x00\\xdc\\x03\\f\\x00\\x00\\x01\\xd9\" + // 0x00DC030C: 0x000001D9\n\t\"\\x00\\xfc\\x03\\f\\x00\\x00\\x01\\xda\" + // 0x00FC030C: 0x000001DA\n\t\"\\x00\\xdc\\x03\\x00\\x00\\x00\\x01\\xdb\" + // 0x00DC0300: 0x000001DB\n\t\"\\x00\\xfc\\x03\\x00\\x00\\x00\\x01\\xdc\" + // 0x00FC0300: 0x000001DC\n\t\"\\x00\\xc4\\x03\\x04\\x00\\x00\\x01\\xde\" + // 0x00C40304: 0x000001DE\n\t\"\\x00\\xe4\\x03\\x04\\x00\\x00\\x01\\xdf\" + // 0x00E40304: 0x000001DF\n\t\"\\x02&\\x03\\x04\\x00\\x00\\x01\\xe0\" + // 0x02260304: 0x000001E0\n\t\"\\x02'\\x03\\x04\\x00\\x00\\x01\\xe1\" + // 0x02270304: 0x000001E1\n\t\"\\x00\\xc6\\x03\\x04\\x00\\x00\\x01\\xe2\" + // 0x00C60304: 0x000001E2\n\t\"\\x00\\xe6\\x03\\x04\\x00\\x00\\x01\\xe3\" + // 0x00E60304: 0x000001E3\n\t\"\\x00G\\x03\\f\\x00\\x00\\x01\\xe6\" + // 0x0047030C: 0x000001E6\n\t\"\\x00g\\x03\\f\\x00\\x00\\x01\\xe7\" + // 0x0067030C: 0x000001E7\n\t\"\\x00K\\x03\\f\\x00\\x00\\x01\\xe8\" + // 0x004B030C: 0x000001E8\n\t\"\\x00k\\x03\\f\\x00\\x00\\x01\\xe9\" + // 0x006B030C: 0x000001E9\n\t\"\\x00O\\x03(\\x00\\x00\\x01\\xea\" + // 0x004F0328: 0x000001EA\n\t\"\\x00o\\x03(\\x00\\x00\\x01\\xeb\" + // 0x006F0328: 0x000001EB\n\t\"\\x01\\xea\\x03\\x04\\x00\\x00\\x01\\xec\" + // 0x01EA0304: 0x000001EC\n\t\"\\x01\\xeb\\x03\\x04\\x00\\x00\\x01\\xed\" + // 0x01EB0304: 0x000001ED\n\t\"\\x01\\xb7\\x03\\f\\x00\\x00\\x01\\xee\" + // 0x01B7030C: 0x000001EE\n\t\"\\x02\\x92\\x03\\f\\x00\\x00\\x01\\xef\" + // 0x0292030C: 0x000001EF\n\t\"\\x00j\\x03\\f\\x00\\x00\\x01\\xf0\" + // 0x006A030C: 0x000001F0\n\t\"\\x00G\\x03\\x01\\x00\\x00\\x01\\xf4\" + // 0x00470301: 0x000001F4\n\t\"\\x00g\\x03\\x01\\x00\\x00\\x01\\xf5\" + // 0x00670301: 0x000001F5\n\t\"\\x00N\\x03\\x00\\x00\\x00\\x01\\xf8\" + // 0x004E0300: 0x000001F8\n\t\"\\x00n\\x03\\x00\\x00\\x00\\x01\\xf9\" + // 0x006E0300: 0x000001F9\n\t\"\\x00\\xc5\\x03\\x01\\x00\\x00\\x01\\xfa\" + // 0x00C50301: 0x000001FA\n\t\"\\x00\\xe5\\x03\\x01\\x00\\x00\\x01\\xfb\" + // 0x00E50301: 0x000001FB\n\t\"\\x00\\xc6\\x03\\x01\\x00\\x00\\x01\\xfc\" + // 0x00C60301: 0x000001FC\n\t\"\\x00\\xe6\\x03\\x01\\x00\\x00\\x01\\xfd\" + // 0x00E60301: 0x000001FD\n\t\"\\x00\\xd8\\x03\\x01\\x00\\x00\\x01\\xfe\" + // 0x00D80301: 0x000001FE\n\t\"\\x00\\xf8\\x03\\x01\\x00\\x00\\x01\\xff\" + // 0x00F80301: 0x000001FF\n\t\"\\x00A\\x03\\x0f\\x00\\x00\\x02\\x00\" + // 0x0041030F: 0x00000200\n\t\"\\x00a\\x03\\x0f\\x00\\x00\\x02\\x01\" + // 0x0061030F: 0x00000201\n\t\"\\x00A\\x03\\x11\\x00\\x00\\x02\\x02\" + // 0x00410311: 0x00000202\n\t\"\\x00a\\x03\\x11\\x00\\x00\\x02\\x03\" + // 0x00610311: 0x00000203\n\t\"\\x00E\\x03\\x0f\\x00\\x00\\x02\\x04\" + // 0x0045030F: 0x00000204\n\t\"\\x00e\\x03\\x0f\\x00\\x00\\x02\\x05\" + // 0x0065030F: 0x00000205\n\t\"\\x00E\\x03\\x11\\x00\\x00\\x02\\x06\" + // 0x00450311: 0x00000206\n\t\"\\x00e\\x03\\x11\\x00\\x00\\x02\\a\" + // 0x00650311: 0x00000207\n\t\"\\x00I\\x03\\x0f\\x00\\x00\\x02\\b\" + // 0x0049030F: 0x00000208\n\t\"\\x00i\\x03\\x0f\\x00\\x00\\x02\\t\" + // 0x0069030F: 0x00000209\n\t\"\\x00I\\x03\\x11\\x00\\x00\\x02\\n\" + // 0x00490311: 0x0000020A\n\t\"\\x00i\\x03\\x11\\x00\\x00\\x02\\v\" + // 0x00690311: 0x0000020B\n\t\"\\x00O\\x03\\x0f\\x00\\x00\\x02\\f\" + // 0x004F030F: 0x0000020C\n\t\"\\x00o\\x03\\x0f\\x00\\x00\\x02\\r\" + // 0x006F030F: 0x0000020D\n\t\"\\x00O\\x03\\x11\\x00\\x00\\x02\\x0e\" + // 0x004F0311: 0x0000020E\n\t\"\\x00o\\x03\\x11\\x00\\x00\\x02\\x0f\" + // 0x006F0311: 0x0000020F\n\t\"\\x00R\\x03\\x0f\\x00\\x00\\x02\\x10\" + // 0x0052030F: 0x00000210\n\t\"\\x00r\\x03\\x0f\\x00\\x00\\x02\\x11\" + // 0x0072030F: 0x00000211\n\t\"\\x00R\\x03\\x11\\x00\\x00\\x02\\x12\" + // 0x00520311: 0x00000212\n\t\"\\x00r\\x03\\x11\\x00\\x00\\x02\\x13\" + // 0x00720311: 0x00000213\n\t\"\\x00U\\x03\\x0f\\x00\\x00\\x02\\x14\" + // 0x0055030F: 0x00000214\n\t\"\\x00u\\x03\\x0f\\x00\\x00\\x02\\x15\" + // 0x0075030F: 0x00000215\n\t\"\\x00U\\x03\\x11\\x00\\x00\\x02\\x16\" + // 0x00550311: 0x00000216\n\t\"\\x00u\\x03\\x11\\x00\\x00\\x02\\x17\" + // 0x00750311: 0x00000217\n\t\"\\x00S\\x03&\\x00\\x00\\x02\\x18\" + // 0x00530326: 0x00000218\n\t\"\\x00s\\x03&\\x00\\x00\\x02\\x19\" + // 0x00730326: 0x00000219\n\t\"\\x00T\\x03&\\x00\\x00\\x02\\x1a\" + // 0x00540326: 0x0000021A\n\t\"\\x00t\\x03&\\x00\\x00\\x02\\x1b\" + // 0x00740326: 0x0000021B\n\t\"\\x00H\\x03\\f\\x00\\x00\\x02\\x1e\" + // 0x0048030C: 0x0000021E\n\t\"\\x00h\\x03\\f\\x00\\x00\\x02\\x1f\" + // 0x0068030C: 0x0000021F\n\t\"\\x00A\\x03\\a\\x00\\x00\\x02&\" + // 0x00410307: 0x00000226\n\t\"\\x00a\\x03\\a\\x00\\x00\\x02'\" + // 0x00610307: 0x00000227\n\t\"\\x00E\\x03'\\x00\\x00\\x02(\" + // 0x00450327: 0x00000228\n\t\"\\x00e\\x03'\\x00\\x00\\x02)\" + // 0x00650327: 0x00000229\n\t\"\\x00\\xd6\\x03\\x04\\x00\\x00\\x02*\" + // 0x00D60304: 0x0000022A\n\t\"\\x00\\xf6\\x03\\x04\\x00\\x00\\x02+\" + // 0x00F60304: 0x0000022B\n\t\"\\x00\\xd5\\x03\\x04\\x00\\x00\\x02,\" + // 0x00D50304: 0x0000022C\n\t\"\\x00\\xf5\\x03\\x04\\x00\\x00\\x02-\" + // 0x00F50304: 0x0000022D\n\t\"\\x00O\\x03\\a\\x00\\x00\\x02.\" + // 0x004F0307: 0x0000022E\n\t\"\\x00o\\x03\\a\\x00\\x00\\x02/\" + // 0x006F0307: 0x0000022F\n\t\"\\x02.\\x03\\x04\\x00\\x00\\x020\" + // 0x022E0304: 0x00000230\n\t\"\\x02/\\x03\\x04\\x00\\x00\\x021\" + // 0x022F0304: 0x00000231\n\t\"\\x00Y\\x03\\x04\\x00\\x00\\x022\" + // 0x00590304: 0x00000232\n\t\"\\x00y\\x03\\x04\\x00\\x00\\x023\" + // 0x00790304: 0x00000233\n\t\"\\x00\\xa8\\x03\\x01\\x00\\x00\\x03\\x85\" + // 0x00A80301: 0x00000385\n\t\"\\x03\\x91\\x03\\x01\\x00\\x00\\x03\\x86\" + // 0x03910301: 0x00000386\n\t\"\\x03\\x95\\x03\\x01\\x00\\x00\\x03\\x88\" + // 0x03950301: 0x00000388\n\t\"\\x03\\x97\\x03\\x01\\x00\\x00\\x03\\x89\" + // 0x03970301: 0x00000389\n\t\"\\x03\\x99\\x03\\x01\\x00\\x00\\x03\\x8a\" + // 0x03990301: 0x0000038A\n\t\"\\x03\\x9f\\x03\\x01\\x00\\x00\\x03\\x8c\" + // 0x039F0301: 0x0000038C\n\t\"\\x03\\xa5\\x03\\x01\\x00\\x00\\x03\\x8e\" + // 0x03A50301: 0x0000038E\n\t\"\\x03\\xa9\\x03\\x01\\x00\\x00\\x03\\x8f\" + // 0x03A90301: 0x0000038F\n\t\"\\x03\\xca\\x03\\x01\\x00\\x00\\x03\\x90\" + // 0x03CA0301: 0x00000390\n\t\"\\x03\\x99\\x03\\b\\x00\\x00\\x03\\xaa\" + // 0x03990308: 0x000003AA\n\t\"\\x03\\xa5\\x03\\b\\x00\\x00\\x03\\xab\" + // 0x03A50308: 0x000003AB\n\t\"\\x03\\xb1\\x03\\x01\\x00\\x00\\x03\\xac\" + // 0x03B10301: 0x000003AC\n\t\"\\x03\\xb5\\x03\\x01\\x00\\x00\\x03\\xad\" + // 0x03B50301: 0x000003AD\n\t\"\\x03\\xb7\\x03\\x01\\x00\\x00\\x03\\xae\" + // 0x03B70301: 0x000003AE\n\t\"\\x03\\xb9\\x03\\x01\\x00\\x00\\x03\\xaf\" + // 0x03B90301: 0x000003AF\n\t\"\\x03\\xcb\\x03\\x01\\x00\\x00\\x03\\xb0\" + // 0x03CB0301: 0x000003B0\n\t\"\\x03\\xb9\\x03\\b\\x00\\x00\\x03\\xca\" + // 0x03B90308: 0x000003CA\n\t\"\\x03\\xc5\\x03\\b\\x00\\x00\\x03\\xcb\" + // 0x03C50308: 0x000003CB\n\t\"\\x03\\xbf\\x03\\x01\\x00\\x00\\x03\\xcc\" + // 0x03BF0301: 0x000003CC\n\t\"\\x03\\xc5\\x03\\x01\\x00\\x00\\x03\\xcd\" + // 0x03C50301: 0x000003CD\n\t\"\\x03\\xc9\\x03\\x01\\x00\\x00\\x03\\xce\" + // 0x03C90301: 0x000003CE\n\t\"\\x03\\xd2\\x03\\x01\\x00\\x00\\x03\\xd3\" + // 0x03D20301: 0x000003D3\n\t\"\\x03\\xd2\\x03\\b\\x00\\x00\\x03\\xd4\" + // 0x03D20308: 0x000003D4\n\t\"\\x04\\x15\\x03\\x00\\x00\\x00\\x04\\x00\" + // 0x04150300: 0x00000400\n\t\"\\x04\\x15\\x03\\b\\x00\\x00\\x04\\x01\" + // 0x04150308: 0x00000401\n\t\"\\x04\\x13\\x03\\x01\\x00\\x00\\x04\\x03\" + // 0x04130301: 0x00000403\n\t\"\\x04\\x06\\x03\\b\\x00\\x00\\x04\\a\" + // 0x04060308: 0x00000407\n\t\"\\x04\\x1a\\x03\\x01\\x00\\x00\\x04\\f\" + // 0x041A0301: 0x0000040C\n\t\"\\x04\\x18\\x03\\x00\\x00\\x00\\x04\\r\" + // 0x04180300: 0x0000040D\n\t\"\\x04#\\x03\\x06\\x00\\x00\\x04\\x0e\" + // 0x04230306: 0x0000040E\n\t\"\\x04\\x18\\x03\\x06\\x00\\x00\\x04\\x19\" + // 0x04180306: 0x00000419\n\t\"\\x048\\x03\\x06\\x00\\x00\\x049\" + // 0x04380306: 0x00000439\n\t\"\\x045\\x03\\x00\\x00\\x00\\x04P\" + // 0x04350300: 0x00000450\n\t\"\\x045\\x03\\b\\x00\\x00\\x04Q\" + // 0x04350308: 0x00000451\n\t\"\\x043\\x03\\x01\\x00\\x00\\x04S\" + // 0x04330301: 0x00000453\n\t\"\\x04V\\x03\\b\\x00\\x00\\x04W\" + // 0x04560308: 0x00000457\n\t\"\\x04:\\x03\\x01\\x00\\x00\\x04\\\\\" + // 0x043A0301: 0x0000045C\n\t\"\\x048\\x03\\x00\\x00\\x00\\x04]\" + // 0x04380300: 0x0000045D\n\t\"\\x04C\\x03\\x06\\x00\\x00\\x04^\" + // 0x04430306: 0x0000045E\n\t\"\\x04t\\x03\\x0f\\x00\\x00\\x04v\" + // 0x0474030F: 0x00000476\n\t\"\\x04u\\x03\\x0f\\x00\\x00\\x04w\" + // 0x0475030F: 0x00000477\n\t\"\\x04\\x16\\x03\\x06\\x00\\x00\\x04\\xc1\" + // 0x04160306: 0x000004C1\n\t\"\\x046\\x03\\x06\\x00\\x00\\x04\\xc2\" + // 0x04360306: 0x000004C2\n\t\"\\x04\\x10\\x03\\x06\\x00\\x00\\x04\\xd0\" + // 0x04100306: 0x000004D0\n\t\"\\x040\\x03\\x06\\x00\\x00\\x04\\xd1\" + // 0x04300306: 0x000004D1\n\t\"\\x04\\x10\\x03\\b\\x00\\x00\\x04\\xd2\" + // 0x04100308: 0x000004D2\n\t\"\\x040\\x03\\b\\x00\\x00\\x04\\xd3\" + // 0x04300308: 0x000004D3\n\t\"\\x04\\x15\\x03\\x06\\x00\\x00\\x04\\xd6\" + // 0x04150306: 0x000004D6\n\t\"\\x045\\x03\\x06\\x00\\x00\\x04\\xd7\" + // 0x04350306: 0x000004D7\n\t\"\\x04\\xd8\\x03\\b\\x00\\x00\\x04\\xda\" + // 0x04D80308: 0x000004DA\n\t\"\\x04\\xd9\\x03\\b\\x00\\x00\\x04\\xdb\" + // 0x04D90308: 0x000004DB\n\t\"\\x04\\x16\\x03\\b\\x00\\x00\\x04\\xdc\" + // 0x04160308: 0x000004DC\n\t\"\\x046\\x03\\b\\x00\\x00\\x04\\xdd\" + // 0x04360308: 0x000004DD\n\t\"\\x04\\x17\\x03\\b\\x00\\x00\\x04\\xde\" + // 0x04170308: 0x000004DE\n\t\"\\x047\\x03\\b\\x00\\x00\\x04\\xdf\" + // 0x04370308: 0x000004DF\n\t\"\\x04\\x18\\x03\\x04\\x00\\x00\\x04\\xe2\" + // 0x04180304: 0x000004E2\n\t\"\\x048\\x03\\x04\\x00\\x00\\x04\\xe3\" + // 0x04380304: 0x000004E3\n\t\"\\x04\\x18\\x03\\b\\x00\\x00\\x04\\xe4\" + // 0x04180308: 0x000004E4\n\t\"\\x048\\x03\\b\\x00\\x00\\x04\\xe5\" + // 0x04380308: 0x000004E5\n\t\"\\x04\\x1e\\x03\\b\\x00\\x00\\x04\\xe6\" + // 0x041E0308: 0x000004E6\n\t\"\\x04>\\x03\\b\\x00\\x00\\x04\\xe7\" + // 0x043E0308: 0x000004E7\n\t\"\\x04\\xe8\\x03\\b\\x00\\x00\\x04\\xea\" + // 0x04E80308: 0x000004EA\n\t\"\\x04\\xe9\\x03\\b\\x00\\x00\\x04\\xeb\" + // 0x04E90308: 0x000004EB\n\t\"\\x04-\\x03\\b\\x00\\x00\\x04\\xec\" + // 0x042D0308: 0x000004EC\n\t\"\\x04M\\x03\\b\\x00\\x00\\x04\\xed\" + // 0x044D0308: 0x000004ED\n\t\"\\x04#\\x03\\x04\\x00\\x00\\x04\\xee\" + // 0x04230304: 0x000004EE\n\t\"\\x04C\\x03\\x04\\x00\\x00\\x04\\xef\" + // 0x04430304: 0x000004EF\n\t\"\\x04#\\x03\\b\\x00\\x00\\x04\\xf0\" + // 0x04230308: 0x000004F0\n\t\"\\x04C\\x03\\b\\x00\\x00\\x04\\xf1\" + // 0x04430308: 0x000004F1\n\t\"\\x04#\\x03\\v\\x00\\x00\\x04\\xf2\" + // 0x0423030B: 0x000004F2\n\t\"\\x04C\\x03\\v\\x00\\x00\\x04\\xf3\" + // 0x0443030B: 0x000004F3\n\t\"\\x04'\\x03\\b\\x00\\x00\\x04\\xf4\" + // 0x04270308: 0x000004F4\n\t\"\\x04G\\x03\\b\\x00\\x00\\x04\\xf5\" + // 0x04470308: 0x000004F5\n\t\"\\x04+\\x03\\b\\x00\\x00\\x04\\xf8\" + // 0x042B0308: 0x000004F8\n\t\"\\x04K\\x03\\b\\x00\\x00\\x04\\xf9\" + // 0x044B0308: 0x000004F9\n\t\"\\x06'\\x06S\\x00\\x00\\x06\\\"\" + // 0x06270653: 0x00000622\n\t\"\\x06'\\x06T\\x00\\x00\\x06#\" + // 0x06270654: 0x00000623\n\t\"\\x06H\\x06T\\x00\\x00\\x06$\" + // 0x06480654: 0x00000624\n\t\"\\x06'\\x06U\\x00\\x00\\x06%\" + // 0x06270655: 0x00000625\n\t\"\\x06J\\x06T\\x00\\x00\\x06&\" + // 0x064A0654: 0x00000626\n\t\"\\x06\\xd5\\x06T\\x00\\x00\\x06\\xc0\" + // 0x06D50654: 0x000006C0\n\t\"\\x06\\xc1\\x06T\\x00\\x00\\x06\\xc2\" + // 0x06C10654: 0x000006C2\n\t\"\\x06\\xd2\\x06T\\x00\\x00\\x06\\xd3\" + // 0x06D20654: 0x000006D3\n\t\"\\t(\\t<\\x00\\x00\\t)\" + // 0x0928093C: 0x00000929\n\t\"\\t0\\t<\\x00\\x00\\t1\" + // 0x0930093C: 0x00000931\n\t\"\\t3\\t<\\x00\\x00\\t4\" + // 0x0933093C: 0x00000934\n\t\"\\t\\xc7\\t\\xbe\\x00\\x00\\t\\xcb\" + // 0x09C709BE: 0x000009CB\n\t\"\\t\\xc7\\t\\xd7\\x00\\x00\\t\\xcc\" + // 0x09C709D7: 0x000009CC\n\t\"\\vG\\vV\\x00\\x00\\vH\" + // 0x0B470B56: 0x00000B48\n\t\"\\vG\\v>\\x00\\x00\\vK\" + // 0x0B470B3E: 0x00000B4B\n\t\"\\vG\\vW\\x00\\x00\\vL\" + // 0x0B470B57: 0x00000B4C\n\t\"\\v\\x92\\v\\xd7\\x00\\x00\\v\\x94\" + // 0x0B920BD7: 0x00000B94\n\t\"\\v\\xc6\\v\\xbe\\x00\\x00\\v\\xca\" + // 0x0BC60BBE: 0x00000BCA\n\t\"\\v\\xc7\\v\\xbe\\x00\\x00\\v\\xcb\" + // 0x0BC70BBE: 0x00000BCB\n\t\"\\v\\xc6\\v\\xd7\\x00\\x00\\v\\xcc\" + // 0x0BC60BD7: 0x00000BCC\n\t\"\\fF\\fV\\x00\\x00\\fH\" + // 0x0C460C56: 0x00000C48\n\t\"\\f\\xbf\\f\\xd5\\x00\\x00\\f\\xc0\" + // 0x0CBF0CD5: 0x00000CC0\n\t\"\\f\\xc6\\f\\xd5\\x00\\x00\\f\\xc7\" + // 0x0CC60CD5: 0x00000CC7\n\t\"\\f\\xc6\\f\\xd6\\x00\\x00\\f\\xc8\" + // 0x0CC60CD6: 0x00000CC8\n\t\"\\f\\xc6\\f\\xc2\\x00\\x00\\f\\xca\" + // 0x0CC60CC2: 0x00000CCA\n\t\"\\f\\xca\\f\\xd5\\x00\\x00\\f\\xcb\" + // 0x0CCA0CD5: 0x00000CCB\n\t\"\\rF\\r>\\x00\\x00\\rJ\" + // 0x0D460D3E: 0x00000D4A\n\t\"\\rG\\r>\\x00\\x00\\rK\" + // 0x0D470D3E: 0x00000D4B\n\t\"\\rF\\rW\\x00\\x00\\rL\" + // 0x0D460D57: 0x00000D4C\n\t\"\\r\\xd9\\r\\xca\\x00\\x00\\r\\xda\" + // 0x0DD90DCA: 0x00000DDA\n\t\"\\r\\xd9\\r\\xcf\\x00\\x00\\r\\xdc\" + // 0x0DD90DCF: 0x00000DDC\n\t\"\\r\\xdc\\r\\xca\\x00\\x00\\r\\xdd\" + // 0x0DDC0DCA: 0x00000DDD\n\t\"\\r\\xd9\\r\\xdf\\x00\\x00\\r\\xde\" + // 0x0DD90DDF: 0x00000DDE\n\t\"\\x10%\\x10.\\x00\\x00\\x10&\" + // 0x1025102E: 0x00001026\n\t\"\\x1b\\x05\\x1b5\\x00\\x00\\x1b\\x06\" + // 0x1B051B35: 0x00001B06\n\t\"\\x1b\\a\\x1b5\\x00\\x00\\x1b\\b\" + // 0x1B071B35: 0x00001B08\n\t\"\\x1b\\t\\x1b5\\x00\\x00\\x1b\\n\" + // 0x1B091B35: 0x00001B0A\n\t\"\\x1b\\v\\x1b5\\x00\\x00\\x1b\\f\" + // 0x1B0B1B35: 0x00001B0C\n\t\"\\x1b\\r\\x1b5\\x00\\x00\\x1b\\x0e\" + // 0x1B0D1B35: 0x00001B0E\n\t\"\\x1b\\x11\\x1b5\\x00\\x00\\x1b\\x12\" + // 0x1B111B35: 0x00001B12\n\t\"\\x1b:\\x1b5\\x00\\x00\\x1b;\" + // 0x1B3A1B35: 0x00001B3B\n\t\"\\x1b<\\x1b5\\x00\\x00\\x1b=\" + // 0x1B3C1B35: 0x00001B3D\n\t\"\\x1b>\\x1b5\\x00\\x00\\x1b@\" + // 0x1B3E1B35: 0x00001B40\n\t\"\\x1b?\\x1b5\\x00\\x00\\x1bA\" + // 0x1B3F1B35: 0x00001B41\n\t\"\\x1bB\\x1b5\\x00\\x00\\x1bC\" + // 0x1B421B35: 0x00001B43\n\t\"\\x00A\\x03%\\x00\\x00\\x1e\\x00\" + // 0x00410325: 0x00001E00\n\t\"\\x00a\\x03%\\x00\\x00\\x1e\\x01\" + // 0x00610325: 0x00001E01\n\t\"\\x00B\\x03\\a\\x00\\x00\\x1e\\x02\" + // 0x00420307: 0x00001E02\n\t\"\\x00b\\x03\\a\\x00\\x00\\x1e\\x03\" + // 0x00620307: 0x00001E03\n\t\"\\x00B\\x03#\\x00\\x00\\x1e\\x04\" + // 0x00420323: 0x00001E04\n\t\"\\x00b\\x03#\\x00\\x00\\x1e\\x05\" + // 0x00620323: 0x00001E05\n\t\"\\x00B\\x031\\x00\\x00\\x1e\\x06\" + // 0x00420331: 0x00001E06\n\t\"\\x00b\\x031\\x00\\x00\\x1e\\a\" + // 0x00620331: 0x00001E07\n\t\"\\x00\\xc7\\x03\\x01\\x00\\x00\\x1e\\b\" + // 0x00C70301: 0x00001E08\n\t\"\\x00\\xe7\\x03\\x01\\x00\\x00\\x1e\\t\" + // 0x00E70301: 0x00001E09\n\t\"\\x00D\\x03\\a\\x00\\x00\\x1e\\n\" + // 0x00440307: 0x00001E0A\n\t\"\\x00d\\x03\\a\\x00\\x00\\x1e\\v\" + // 0x00640307: 0x00001E0B\n\t\"\\x00D\\x03#\\x00\\x00\\x1e\\f\" + // 0x00440323: 0x00001E0C\n\t\"\\x00d\\x03#\\x00\\x00\\x1e\\r\" + // 0x00640323: 0x00001E0D\n\t\"\\x00D\\x031\\x00\\x00\\x1e\\x0e\" + // 0x00440331: 0x00001E0E\n\t\"\\x00d\\x031\\x00\\x00\\x1e\\x0f\" + // 0x00640331: 0x00001E0F\n\t\"\\x00D\\x03'\\x00\\x00\\x1e\\x10\" + // 0x00440327: 0x00001E10\n\t\"\\x00d\\x03'\\x00\\x00\\x1e\\x11\" + // 0x00640327: 0x00001E11\n\t\"\\x00D\\x03-\\x00\\x00\\x1e\\x12\" + // 0x0044032D: 0x00001E12\n\t\"\\x00d\\x03-\\x00\\x00\\x1e\\x13\" + // 0x0064032D: 0x00001E13\n\t\"\\x01\\x12\\x03\\x00\\x00\\x00\\x1e\\x14\" + // 0x01120300: 0x00001E14\n\t\"\\x01\\x13\\x03\\x00\\x00\\x00\\x1e\\x15\" + // 0x01130300: 0x00001E15\n\t\"\\x01\\x12\\x03\\x01\\x00\\x00\\x1e\\x16\" + // 0x01120301: 0x00001E16\n\t\"\\x01\\x13\\x03\\x01\\x00\\x00\\x1e\\x17\" + // 0x01130301: 0x00001E17\n\t\"\\x00E\\x03-\\x00\\x00\\x1e\\x18\" + // 0x0045032D: 0x00001E18\n\t\"\\x00e\\x03-\\x00\\x00\\x1e\\x19\" + // 0x0065032D: 0x00001E19\n\t\"\\x00E\\x030\\x00\\x00\\x1e\\x1a\" + // 0x00450330: 0x00001E1A\n\t\"\\x00e\\x030\\x00\\x00\\x1e\\x1b\" + // 0x00650330: 0x00001E1B\n\t\"\\x02(\\x03\\x06\\x00\\x00\\x1e\\x1c\" + // 0x02280306: 0x00001E1C\n\t\"\\x02)\\x03\\x06\\x00\\x00\\x1e\\x1d\" + // 0x02290306: 0x00001E1D\n\t\"\\x00F\\x03\\a\\x00\\x00\\x1e\\x1e\" + // 0x00460307: 0x00001E1E\n\t\"\\x00f\\x03\\a\\x00\\x00\\x1e\\x1f\" + // 0x00660307: 0x00001E1F\n\t\"\\x00G\\x03\\x04\\x00\\x00\\x1e \" + // 0x00470304: 0x00001E20\n\t\"\\x00g\\x03\\x04\\x00\\x00\\x1e!\" + // 0x00670304: 0x00001E21\n\t\"\\x00H\\x03\\a\\x00\\x00\\x1e\\\"\" + // 0x00480307: 0x00001E22\n\t\"\\x00h\\x03\\a\\x00\\x00\\x1e#\" + // 0x00680307: 0x00001E23\n\t\"\\x00H\\x03#\\x00\\x00\\x1e$\" + // 0x00480323: 0x00001E24\n\t\"\\x00h\\x03#\\x00\\x00\\x1e%\" + // 0x00680323: 0x00001E25\n\t\"\\x00H\\x03\\b\\x00\\x00\\x1e&\" + // 0x00480308: 0x00001E26\n\t\"\\x00h\\x03\\b\\x00\\x00\\x1e'\" + // 0x00680308: 0x00001E27\n\t\"\\x00H\\x03'\\x00\\x00\\x1e(\" + // 0x00480327: 0x00001E28\n\t\"\\x00h\\x03'\\x00\\x00\\x1e)\" + // 0x00680327: 0x00001E29\n\t\"\\x00H\\x03.\\x00\\x00\\x1e*\" + // 0x0048032E: 0x00001E2A\n\t\"\\x00h\\x03.\\x00\\x00\\x1e+\" + // 0x0068032E: 0x00001E2B\n\t\"\\x00I\\x030\\x00\\x00\\x1e,\" + // 0x00490330: 0x00001E2C\n\t\"\\x00i\\x030\\x00\\x00\\x1e-\" + // 0x00690330: 0x00001E2D\n\t\"\\x00\\xcf\\x03\\x01\\x00\\x00\\x1e.\" + // 0x00CF0301: 0x00001E2E\n\t\"\\x00\\xef\\x03\\x01\\x00\\x00\\x1e/\" + // 0x00EF0301: 0x00001E2F\n\t\"\\x00K\\x03\\x01\\x00\\x00\\x1e0\" + // 0x004B0301: 0x00001E30\n\t\"\\x00k\\x03\\x01\\x00\\x00\\x1e1\" + // 0x006B0301: 0x00001E31\n\t\"\\x00K\\x03#\\x00\\x00\\x1e2\" + // 0x004B0323: 0x00001E32\n\t\"\\x00k\\x03#\\x00\\x00\\x1e3\" + // 0x006B0323: 0x00001E33\n\t\"\\x00K\\x031\\x00\\x00\\x1e4\" + // 0x004B0331: 0x00001E34\n\t\"\\x00k\\x031\\x00\\x00\\x1e5\" + // 0x006B0331: 0x00001E35\n\t\"\\x00L\\x03#\\x00\\x00\\x1e6\" + // 0x004C0323: 0x00001E36\n\t\"\\x00l\\x03#\\x00\\x00\\x1e7\" + // 0x006C0323: 0x00001E37\n\t\"\\x1e6\\x03\\x04\\x00\\x00\\x1e8\" + // 0x1E360304: 0x00001E38\n\t\"\\x1e7\\x03\\x04\\x00\\x00\\x1e9\" + // 0x1E370304: 0x00001E39\n\t\"\\x00L\\x031\\x00\\x00\\x1e:\" + // 0x004C0331: 0x00001E3A\n\t\"\\x00l\\x031\\x00\\x00\\x1e;\" + // 0x006C0331: 0x00001E3B\n\t\"\\x00L\\x03-\\x00\\x00\\x1e<\" + // 0x004C032D: 0x00001E3C\n\t\"\\x00l\\x03-\\x00\\x00\\x1e=\" + // 0x006C032D: 0x00001E3D\n\t\"\\x00M\\x03\\x01\\x00\\x00\\x1e>\" + // 0x004D0301: 0x00001E3E\n\t\"\\x00m\\x03\\x01\\x00\\x00\\x1e?\" + // 0x006D0301: 0x00001E3F\n\t\"\\x00M\\x03\\a\\x00\\x00\\x1e@\" + // 0x004D0307: 0x00001E40\n\t\"\\x00m\\x03\\a\\x00\\x00\\x1eA\" + // 0x006D0307: 0x00001E41\n\t\"\\x00M\\x03#\\x00\\x00\\x1eB\" + // 0x004D0323: 0x00001E42\n\t\"\\x00m\\x03#\\x00\\x00\\x1eC\" + // 0x006D0323: 0x00001E43\n\t\"\\x00N\\x03\\a\\x00\\x00\\x1eD\" + // 0x004E0307: 0x00001E44\n\t\"\\x00n\\x03\\a\\x00\\x00\\x1eE\" + // 0x006E0307: 0x00001E45\n\t\"\\x00N\\x03#\\x00\\x00\\x1eF\" + // 0x004E0323: 0x00001E46\n\t\"\\x00n\\x03#\\x00\\x00\\x1eG\" + // 0x006E0323: 0x00001E47\n\t\"\\x00N\\x031\\x00\\x00\\x1eH\" + // 0x004E0331: 0x00001E48\n\t\"\\x00n\\x031\\x00\\x00\\x1eI\" + // 0x006E0331: 0x00001E49\n\t\"\\x00N\\x03-\\x00\\x00\\x1eJ\" + // 0x004E032D: 0x00001E4A\n\t\"\\x00n\\x03-\\x00\\x00\\x1eK\" + // 0x006E032D: 0x00001E4B\n\t\"\\x00\\xd5\\x03\\x01\\x00\\x00\\x1eL\" + // 0x00D50301: 0x00001E4C\n\t\"\\x00\\xf5\\x03\\x01\\x00\\x00\\x1eM\" + // 0x00F50301: 0x00001E4D\n\t\"\\x00\\xd5\\x03\\b\\x00\\x00\\x1eN\" + // 0x00D50308: 0x00001E4E\n\t\"\\x00\\xf5\\x03\\b\\x00\\x00\\x1eO\" + // 0x00F50308: 0x00001E4F\n\t\"\\x01L\\x03\\x00\\x00\\x00\\x1eP\" + // 0x014C0300: 0x00001E50\n\t\"\\x01M\\x03\\x00\\x00\\x00\\x1eQ\" + // 0x014D0300: 0x00001E51\n\t\"\\x01L\\x03\\x01\\x00\\x00\\x1eR\" + // 0x014C0301: 0x00001E52\n\t\"\\x01M\\x03\\x01\\x00\\x00\\x1eS\" + // 0x014D0301: 0x00001E53\n\t\"\\x00P\\x03\\x01\\x00\\x00\\x1eT\" + // 0x00500301: 0x00001E54\n\t\"\\x00p\\x03\\x01\\x00\\x00\\x1eU\" + // 0x00700301: 0x00001E55\n\t\"\\x00P\\x03\\a\\x00\\x00\\x1eV\" + // 0x00500307: 0x00001E56\n\t\"\\x00p\\x03\\a\\x00\\x00\\x1eW\" + // 0x00700307: 0x00001E57\n\t\"\\x00R\\x03\\a\\x00\\x00\\x1eX\" + // 0x00520307: 0x00001E58\n\t\"\\x00r\\x03\\a\\x00\\x00\\x1eY\" + // 0x00720307: 0x00001E59\n\t\"\\x00R\\x03#\\x00\\x00\\x1eZ\" + // 0x00520323: 0x00001E5A\n\t\"\\x00r\\x03#\\x00\\x00\\x1e[\" + // 0x00720323: 0x00001E5B\n\t\"\\x1eZ\\x03\\x04\\x00\\x00\\x1e\\\\\" + // 0x1E5A0304: 0x00001E5C\n\t\"\\x1e[\\x03\\x04\\x00\\x00\\x1e]\" + // 0x1E5B0304: 0x00001E5D\n\t\"\\x00R\\x031\\x00\\x00\\x1e^\" + // 0x00520331: 0x00001E5E\n\t\"\\x00r\\x031\\x00\\x00\\x1e_\" + // 0x00720331: 0x00001E5F\n\t\"\\x00S\\x03\\a\\x00\\x00\\x1e`\" + // 0x00530307: 0x00001E60\n\t\"\\x00s\\x03\\a\\x00\\x00\\x1ea\" + // 0x00730307: 0x00001E61\n\t\"\\x00S\\x03#\\x00\\x00\\x1eb\" + // 0x00530323: 0x00001E62\n\t\"\\x00s\\x03#\\x00\\x00\\x1ec\" + // 0x00730323: 0x00001E63\n\t\"\\x01Z\\x03\\a\\x00\\x00\\x1ed\" + // 0x015A0307: 0x00001E64\n\t\"\\x01[\\x03\\a\\x00\\x00\\x1ee\" + // 0x015B0307: 0x00001E65\n\t\"\\x01`\\x03\\a\\x00\\x00\\x1ef\" + // 0x01600307: 0x00001E66\n\t\"\\x01a\\x03\\a\\x00\\x00\\x1eg\" + // 0x01610307: 0x00001E67\n\t\"\\x1eb\\x03\\a\\x00\\x00\\x1eh\" + // 0x1E620307: 0x00001E68\n\t\"\\x1ec\\x03\\a\\x00\\x00\\x1ei\" + // 0x1E630307: 0x00001E69\n\t\"\\x00T\\x03\\a\\x00\\x00\\x1ej\" + // 0x00540307: 0x00001E6A\n\t\"\\x00t\\x03\\a\\x00\\x00\\x1ek\" + // 0x00740307: 0x00001E6B\n\t\"\\x00T\\x03#\\x00\\x00\\x1el\" + // 0x00540323: 0x00001E6C\n\t\"\\x00t\\x03#\\x00\\x00\\x1em\" + // 0x00740323: 0x00001E6D\n\t\"\\x00T\\x031\\x00\\x00\\x1en\" + // 0x00540331: 0x00001E6E\n\t\"\\x00t\\x031\\x00\\x00\\x1eo\" + // 0x00740331: 0x00001E6F\n\t\"\\x00T\\x03-\\x00\\x00\\x1ep\" + // 0x0054032D: 0x00001E70\n\t\"\\x00t\\x03-\\x00\\x00\\x1eq\" + // 0x0074032D: 0x00001E71\n\t\"\\x00U\\x03$\\x00\\x00\\x1er\" + // 0x00550324: 0x00001E72\n\t\"\\x00u\\x03$\\x00\\x00\\x1es\" + // 0x00750324: 0x00001E73\n\t\"\\x00U\\x030\\x00\\x00\\x1et\" + // 0x00550330: 0x00001E74\n\t\"\\x00u\\x030\\x00\\x00\\x1eu\" + // 0x00750330: 0x00001E75\n\t\"\\x00U\\x03-\\x00\\x00\\x1ev\" + // 0x0055032D: 0x00001E76\n\t\"\\x00u\\x03-\\x00\\x00\\x1ew\" + // 0x0075032D: 0x00001E77\n\t\"\\x01h\\x03\\x01\\x00\\x00\\x1ex\" + // 0x01680301: 0x00001E78\n\t\"\\x01i\\x03\\x01\\x00\\x00\\x1ey\" + // 0x01690301: 0x00001E79\n\t\"\\x01j\\x03\\b\\x00\\x00\\x1ez\" + // 0x016A0308: 0x00001E7A\n\t\"\\x01k\\x03\\b\\x00\\x00\\x1e{\" + // 0x016B0308: 0x00001E7B\n\t\"\\x00V\\x03\\x03\\x00\\x00\\x1e|\" + // 0x00560303: 0x00001E7C\n\t\"\\x00v\\x03\\x03\\x00\\x00\\x1e}\" + // 0x00760303: 0x00001E7D\n\t\"\\x00V\\x03#\\x00\\x00\\x1e~\" + // 0x00560323: 0x00001E7E\n\t\"\\x00v\\x03#\\x00\\x00\\x1e\\x7f\" + // 0x00760323: 0x00001E7F\n\t\"\\x00W\\x03\\x00\\x00\\x00\\x1e\\x80\" + // 0x00570300: 0x00001E80\n\t\"\\x00w\\x03\\x00\\x00\\x00\\x1e\\x81\" + // 0x00770300: 0x00001E81\n\t\"\\x00W\\x03\\x01\\x00\\x00\\x1e\\x82\" + // 0x00570301: 0x00001E82\n\t\"\\x00w\\x03\\x01\\x00\\x00\\x1e\\x83\" + // 0x00770301: 0x00001E83\n\t\"\\x00W\\x03\\b\\x00\\x00\\x1e\\x84\" + // 0x00570308: 0x00001E84\n\t\"\\x00w\\x03\\b\\x00\\x00\\x1e\\x85\" + // 0x00770308: 0x00001E85\n\t\"\\x00W\\x03\\a\\x00\\x00\\x1e\\x86\" + // 0x00570307: 0x00001E86\n\t\"\\x00w\\x03\\a\\x00\\x00\\x1e\\x87\" + // 0x00770307: 0x00001E87\n\t\"\\x00W\\x03#\\x00\\x00\\x1e\\x88\" + // 0x00570323: 0x00001E88\n\t\"\\x00w\\x03#\\x00\\x00\\x1e\\x89\" + // 0x00770323: 0x00001E89\n\t\"\\x00X\\x03\\a\\x00\\x00\\x1e\\x8a\" + // 0x00580307: 0x00001E8A\n\t\"\\x00x\\x03\\a\\x00\\x00\\x1e\\x8b\" + // 0x00780307: 0x00001E8B\n\t\"\\x00X\\x03\\b\\x00\\x00\\x1e\\x8c\" + // 0x00580308: 0x00001E8C\n\t\"\\x00x\\x03\\b\\x00\\x00\\x1e\\x8d\" + // 0x00780308: 0x00001E8D\n\t\"\\x00Y\\x03\\a\\x00\\x00\\x1e\\x8e\" + // 0x00590307: 0x00001E8E\n\t\"\\x00y\\x03\\a\\x00\\x00\\x1e\\x8f\" + // 0x00790307: 0x00001E8F\n\t\"\\x00Z\\x03\\x02\\x00\\x00\\x1e\\x90\" + // 0x005A0302: 0x00001E90\n\t\"\\x00z\\x03\\x02\\x00\\x00\\x1e\\x91\" + // 0x007A0302: 0x00001E91\n\t\"\\x00Z\\x03#\\x00\\x00\\x1e\\x92\" + // 0x005A0323: 0x00001E92\n\t\"\\x00z\\x03#\\x00\\x00\\x1e\\x93\" + // 0x007A0323: 0x00001E93\n\t\"\\x00Z\\x031\\x00\\x00\\x1e\\x94\" + // 0x005A0331: 0x00001E94\n\t\"\\x00z\\x031\\x00\\x00\\x1e\\x95\" + // 0x007A0331: 0x00001E95\n\t\"\\x00h\\x031\\x00\\x00\\x1e\\x96\" + // 0x00680331: 0x00001E96\n\t\"\\x00t\\x03\\b\\x00\\x00\\x1e\\x97\" + // 0x00740308: 0x00001E97\n\t\"\\x00w\\x03\\n\\x00\\x00\\x1e\\x98\" + // 0x0077030A: 0x00001E98\n\t\"\\x00y\\x03\\n\\x00\\x00\\x1e\\x99\" + // 0x0079030A: 0x00001E99\n\t\"\\x01\\x7f\\x03\\a\\x00\\x00\\x1e\\x9b\" + // 0x017F0307: 0x00001E9B\n\t\"\\x00A\\x03#\\x00\\x00\\x1e\\xa0\" + // 0x00410323: 0x00001EA0\n\t\"\\x00a\\x03#\\x00\\x00\\x1e\\xa1\" + // 0x00610323: 0x00001EA1\n\t\"\\x00A\\x03\\t\\x00\\x00\\x1e\\xa2\" + // 0x00410309: 0x00001EA2\n\t\"\\x00a\\x03\\t\\x00\\x00\\x1e\\xa3\" + // 0x00610309: 0x00001EA3\n\t\"\\x00\\xc2\\x03\\x01\\x00\\x00\\x1e\\xa4\" + // 0x00C20301: 0x00001EA4\n\t\"\\x00\\xe2\\x03\\x01\\x00\\x00\\x1e\\xa5\" + // 0x00E20301: 0x00001EA5\n\t\"\\x00\\xc2\\x03\\x00\\x00\\x00\\x1e\\xa6\" + // 0x00C20300: 0x00001EA6\n\t\"\\x00\\xe2\\x03\\x00\\x00\\x00\\x1e\\xa7\" + // 0x00E20300: 0x00001EA7\n\t\"\\x00\\xc2\\x03\\t\\x00\\x00\\x1e\\xa8\" + // 0x00C20309: 0x00001EA8\n\t\"\\x00\\xe2\\x03\\t\\x00\\x00\\x1e\\xa9\" + // 0x00E20309: 0x00001EA9\n\t\"\\x00\\xc2\\x03\\x03\\x00\\x00\\x1e\\xaa\" + // 0x00C20303: 0x00001EAA\n\t\"\\x00\\xe2\\x03\\x03\\x00\\x00\\x1e\\xab\" + // 0x00E20303: 0x00001EAB\n\t\"\\x1e\\xa0\\x03\\x02\\x00\\x00\\x1e\\xac\" + // 0x1EA00302: 0x00001EAC\n\t\"\\x1e\\xa1\\x03\\x02\\x00\\x00\\x1e\\xad\" + // 0x1EA10302: 0x00001EAD\n\t\"\\x01\\x02\\x03\\x01\\x00\\x00\\x1e\\xae\" + // 0x01020301: 0x00001EAE\n\t\"\\x01\\x03\\x03\\x01\\x00\\x00\\x1e\\xaf\" + // 0x01030301: 0x00001EAF\n\t\"\\x01\\x02\\x03\\x00\\x00\\x00\\x1e\\xb0\" + // 0x01020300: 0x00001EB0\n\t\"\\x01\\x03\\x03\\x00\\x00\\x00\\x1e\\xb1\" + // 0x01030300: 0x00001EB1\n\t\"\\x01\\x02\\x03\\t\\x00\\x00\\x1e\\xb2\" + // 0x01020309: 0x00001EB2\n\t\"\\x01\\x03\\x03\\t\\x00\\x00\\x1e\\xb3\" + // 0x01030309: 0x00001EB3\n\t\"\\x01\\x02\\x03\\x03\\x00\\x00\\x1e\\xb4\" + // 0x01020303: 0x00001EB4\n\t\"\\x01\\x03\\x03\\x03\\x00\\x00\\x1e\\xb5\" + // 0x01030303: 0x00001EB5\n\t\"\\x1e\\xa0\\x03\\x06\\x00\\x00\\x1e\\xb6\" + // 0x1EA00306: 0x00001EB6\n\t\"\\x1e\\xa1\\x03\\x06\\x00\\x00\\x1e\\xb7\" + // 0x1EA10306: 0x00001EB7\n\t\"\\x00E\\x03#\\x00\\x00\\x1e\\xb8\" + // 0x00450323: 0x00001EB8\n\t\"\\x00e\\x03#\\x00\\x00\\x1e\\xb9\" + // 0x00650323: 0x00001EB9\n\t\"\\x00E\\x03\\t\\x00\\x00\\x1e\\xba\" + // 0x00450309: 0x00001EBA\n\t\"\\x00e\\x03\\t\\x00\\x00\\x1e\\xbb\" + // 0x00650309: 0x00001EBB\n\t\"\\x00E\\x03\\x03\\x00\\x00\\x1e\\xbc\" + // 0x00450303: 0x00001EBC\n\t\"\\x00e\\x03\\x03\\x00\\x00\\x1e\\xbd\" + // 0x00650303: 0x00001EBD\n\t\"\\x00\\xca\\x03\\x01\\x00\\x00\\x1e\\xbe\" + // 0x00CA0301: 0x00001EBE\n\t\"\\x00\\xea\\x03\\x01\\x00\\x00\\x1e\\xbf\" + // 0x00EA0301: 0x00001EBF\n\t\"\\x00\\xca\\x03\\x00\\x00\\x00\\x1e\\xc0\" + // 0x00CA0300: 0x00001EC0\n\t\"\\x00\\xea\\x03\\x00\\x00\\x00\\x1e\\xc1\" + // 0x00EA0300: 0x00001EC1\n\t\"\\x00\\xca\\x03\\t\\x00\\x00\\x1e\\xc2\" + // 0x00CA0309: 0x00001EC2\n\t\"\\x00\\xea\\x03\\t\\x00\\x00\\x1e\\xc3\" + // 0x00EA0309: 0x00001EC3\n\t\"\\x00\\xca\\x03\\x03\\x00\\x00\\x1e\\xc4\" + // 0x00CA0303: 0x00001EC4\n\t\"\\x00\\xea\\x03\\x03\\x00\\x00\\x1e\\xc5\" + // 0x00EA0303: 0x00001EC5\n\t\"\\x1e\\xb8\\x03\\x02\\x00\\x00\\x1e\\xc6\" + // 0x1EB80302: 0x00001EC6\n\t\"\\x1e\\xb9\\x03\\x02\\x00\\x00\\x1e\\xc7\" + // 0x1EB90302: 0x00001EC7\n\t\"\\x00I\\x03\\t\\x00\\x00\\x1e\\xc8\" + // 0x00490309: 0x00001EC8\n\t\"\\x00i\\x03\\t\\x00\\x00\\x1e\\xc9\" + // 0x00690309: 0x00001EC9\n\t\"\\x00I\\x03#\\x00\\x00\\x1e\\xca\" + // 0x00490323: 0x00001ECA\n\t\"\\x00i\\x03#\\x00\\x00\\x1e\\xcb\" + // 0x00690323: 0x00001ECB\n\t\"\\x00O\\x03#\\x00\\x00\\x1e\\xcc\" + // 0x004F0323: 0x00001ECC\n\t\"\\x00o\\x03#\\x00\\x00\\x1e\\xcd\" + // 0x006F0323: 0x00001ECD\n\t\"\\x00O\\x03\\t\\x00\\x00\\x1e\\xce\" + // 0x004F0309: 0x00001ECE\n\t\"\\x00o\\x03\\t\\x00\\x00\\x1e\\xcf\" + // 0x006F0309: 0x00001ECF\n\t\"\\x00\\xd4\\x03\\x01\\x00\\x00\\x1e\\xd0\" + // 0x00D40301: 0x00001ED0\n\t\"\\x00\\xf4\\x03\\x01\\x00\\x00\\x1e\\xd1\" + // 0x00F40301: 0x00001ED1\n\t\"\\x00\\xd4\\x03\\x00\\x00\\x00\\x1e\\xd2\" + // 0x00D40300: 0x00001ED2\n\t\"\\x00\\xf4\\x03\\x00\\x00\\x00\\x1e\\xd3\" + // 0x00F40300: 0x00001ED3\n\t\"\\x00\\xd4\\x03\\t\\x00\\x00\\x1e\\xd4\" + // 0x00D40309: 0x00001ED4\n\t\"\\x00\\xf4\\x03\\t\\x00\\x00\\x1e\\xd5\" + // 0x00F40309: 0x00001ED5\n\t\"\\x00\\xd4\\x03\\x03\\x00\\x00\\x1e\\xd6\" + // 0x00D40303: 0x00001ED6\n\t\"\\x00\\xf4\\x03\\x03\\x00\\x00\\x1e\\xd7\" + // 0x00F40303: 0x00001ED7\n\t\"\\x1e\\xcc\\x03\\x02\\x00\\x00\\x1e\\xd8\" + // 0x1ECC0302: 0x00001ED8\n\t\"\\x1e\\xcd\\x03\\x02\\x00\\x00\\x1e\\xd9\" + // 0x1ECD0302: 0x00001ED9\n\t\"\\x01\\xa0\\x03\\x01\\x00\\x00\\x1e\\xda\" + // 0x01A00301: 0x00001EDA\n\t\"\\x01\\xa1\\x03\\x01\\x00\\x00\\x1e\\xdb\" + // 0x01A10301: 0x00001EDB\n\t\"\\x01\\xa0\\x03\\x00\\x00\\x00\\x1e\\xdc\" + // 0x01A00300: 0x00001EDC\n\t\"\\x01\\xa1\\x03\\x00\\x00\\x00\\x1e\\xdd\" + // 0x01A10300: 0x00001EDD\n\t\"\\x01\\xa0\\x03\\t\\x00\\x00\\x1e\\xde\" + // 0x01A00309: 0x00001EDE\n\t\"\\x01\\xa1\\x03\\t\\x00\\x00\\x1e\\xdf\" + // 0x01A10309: 0x00001EDF\n\t\"\\x01\\xa0\\x03\\x03\\x00\\x00\\x1e\\xe0\" + // 0x01A00303: 0x00001EE0\n\t\"\\x01\\xa1\\x03\\x03\\x00\\x00\\x1e\\xe1\" + // 0x01A10303: 0x00001EE1\n\t\"\\x01\\xa0\\x03#\\x00\\x00\\x1e\\xe2\" + // 0x01A00323: 0x00001EE2\n\t\"\\x01\\xa1\\x03#\\x00\\x00\\x1e\\xe3\" + // 0x01A10323: 0x00001EE3\n\t\"\\x00U\\x03#\\x00\\x00\\x1e\\xe4\" + // 0x00550323: 0x00001EE4\n\t\"\\x00u\\x03#\\x00\\x00\\x1e\\xe5\" + // 0x00750323: 0x00001EE5\n\t\"\\x00U\\x03\\t\\x00\\x00\\x1e\\xe6\" + // 0x00550309: 0x00001EE6\n\t\"\\x00u\\x03\\t\\x00\\x00\\x1e\\xe7\" + // 0x00750309: 0x00001EE7\n\t\"\\x01\\xaf\\x03\\x01\\x00\\x00\\x1e\\xe8\" + // 0x01AF0301: 0x00001EE8\n\t\"\\x01\\xb0\\x03\\x01\\x00\\x00\\x1e\\xe9\" + // 0x01B00301: 0x00001EE9\n\t\"\\x01\\xaf\\x03\\x00\\x00\\x00\\x1e\\xea\" + // 0x01AF0300: 0x00001EEA\n\t\"\\x01\\xb0\\x03\\x00\\x00\\x00\\x1e\\xeb\" + // 0x01B00300: 0x00001EEB\n\t\"\\x01\\xaf\\x03\\t\\x00\\x00\\x1e\\xec\" + // 0x01AF0309: 0x00001EEC\n\t\"\\x01\\xb0\\x03\\t\\x00\\x00\\x1e\\xed\" + // 0x01B00309: 0x00001EED\n\t\"\\x01\\xaf\\x03\\x03\\x00\\x00\\x1e\\xee\" + // 0x01AF0303: 0x00001EEE\n\t\"\\x01\\xb0\\x03\\x03\\x00\\x00\\x1e\\xef\" + // 0x01B00303: 0x00001EEF\n\t\"\\x01\\xaf\\x03#\\x00\\x00\\x1e\\xf0\" + // 0x01AF0323: 0x00001EF0\n\t\"\\x01\\xb0\\x03#\\x00\\x00\\x1e\\xf1\" + // 0x01B00323: 0x00001EF1\n\t\"\\x00Y\\x03\\x00\\x00\\x00\\x1e\\xf2\" + // 0x00590300: 0x00001EF2\n\t\"\\x00y\\x03\\x00\\x00\\x00\\x1e\\xf3\" + // 0x00790300: 0x00001EF3\n\t\"\\x00Y\\x03#\\x00\\x00\\x1e\\xf4\" + // 0x00590323: 0x00001EF4\n\t\"\\x00y\\x03#\\x00\\x00\\x1e\\xf5\" + // 0x00790323: 0x00001EF5\n\t\"\\x00Y\\x03\\t\\x00\\x00\\x1e\\xf6\" + // 0x00590309: 0x00001EF6\n\t\"\\x00y\\x03\\t\\x00\\x00\\x1e\\xf7\" + // 0x00790309: 0x00001EF7\n\t\"\\x00Y\\x03\\x03\\x00\\x00\\x1e\\xf8\" + // 0x00590303: 0x00001EF8\n\t\"\\x00y\\x03\\x03\\x00\\x00\\x1e\\xf9\" + // 0x00790303: 0x00001EF9\n\t\"\\x03\\xb1\\x03\\x13\\x00\\x00\\x1f\\x00\" + // 0x03B10313: 0x00001F00\n\t\"\\x03\\xb1\\x03\\x14\\x00\\x00\\x1f\\x01\" + // 0x03B10314: 0x00001F01\n\t\"\\x1f\\x00\\x03\\x00\\x00\\x00\\x1f\\x02\" + // 0x1F000300: 0x00001F02\n\t\"\\x1f\\x01\\x03\\x00\\x00\\x00\\x1f\\x03\" + // 0x1F010300: 0x00001F03\n\t\"\\x1f\\x00\\x03\\x01\\x00\\x00\\x1f\\x04\" + // 0x1F000301: 0x00001F04\n\t\"\\x1f\\x01\\x03\\x01\\x00\\x00\\x1f\\x05\" + // 0x1F010301: 0x00001F05\n\t\"\\x1f\\x00\\x03B\\x00\\x00\\x1f\\x06\" + // 0x1F000342: 0x00001F06\n\t\"\\x1f\\x01\\x03B\\x00\\x00\\x1f\\a\" + // 0x1F010342: 0x00001F07\n\t\"\\x03\\x91\\x03\\x13\\x00\\x00\\x1f\\b\" + // 0x03910313: 0x00001F08\n\t\"\\x03\\x91\\x03\\x14\\x00\\x00\\x1f\\t\" + // 0x03910314: 0x00001F09\n\t\"\\x1f\\b\\x03\\x00\\x00\\x00\\x1f\\n\" + // 0x1F080300: 0x00001F0A\n\t\"\\x1f\\t\\x03\\x00\\x00\\x00\\x1f\\v\" + // 0x1F090300: 0x00001F0B\n\t\"\\x1f\\b\\x03\\x01\\x00\\x00\\x1f\\f\" + // 0x1F080301: 0x00001F0C\n\t\"\\x1f\\t\\x03\\x01\\x00\\x00\\x1f\\r\" + // 0x1F090301: 0x00001F0D\n\t\"\\x1f\\b\\x03B\\x00\\x00\\x1f\\x0e\" + // 0x1F080342: 0x00001F0E\n\t\"\\x1f\\t\\x03B\\x00\\x00\\x1f\\x0f\" + // 0x1F090342: 0x00001F0F\n\t\"\\x03\\xb5\\x03\\x13\\x00\\x00\\x1f\\x10\" + // 0x03B50313: 0x00001F10\n\t\"\\x03\\xb5\\x03\\x14\\x00\\x00\\x1f\\x11\" + // 0x03B50314: 0x00001F11\n\t\"\\x1f\\x10\\x03\\x00\\x00\\x00\\x1f\\x12\" + // 0x1F100300: 0x00001F12\n\t\"\\x1f\\x11\\x03\\x00\\x00\\x00\\x1f\\x13\" + // 0x1F110300: 0x00001F13\n\t\"\\x1f\\x10\\x03\\x01\\x00\\x00\\x1f\\x14\" + // 0x1F100301: 0x00001F14\n\t\"\\x1f\\x11\\x03\\x01\\x00\\x00\\x1f\\x15\" + // 0x1F110301: 0x00001F15\n\t\"\\x03\\x95\\x03\\x13\\x00\\x00\\x1f\\x18\" + // 0x03950313: 0x00001F18\n\t\"\\x03\\x95\\x03\\x14\\x00\\x00\\x1f\\x19\" + // 0x03950314: 0x00001F19\n\t\"\\x1f\\x18\\x03\\x00\\x00\\x00\\x1f\\x1a\" + // 0x1F180300: 0x00001F1A\n\t\"\\x1f\\x19\\x03\\x00\\x00\\x00\\x1f\\x1b\" + // 0x1F190300: 0x00001F1B\n\t\"\\x1f\\x18\\x03\\x01\\x00\\x00\\x1f\\x1c\" + // 0x1F180301: 0x00001F1C\n\t\"\\x1f\\x19\\x03\\x01\\x00\\x00\\x1f\\x1d\" + // 0x1F190301: 0x00001F1D\n\t\"\\x03\\xb7\\x03\\x13\\x00\\x00\\x1f \" + // 0x03B70313: 0x00001F20\n\t\"\\x03\\xb7\\x03\\x14\\x00\\x00\\x1f!\" + // 0x03B70314: 0x00001F21\n\t\"\\x1f \\x03\\x00\\x00\\x00\\x1f\\\"\" + // 0x1F200300: 0x00001F22\n\t\"\\x1f!\\x03\\x00\\x00\\x00\\x1f#\" + // 0x1F210300: 0x00001F23\n\t\"\\x1f \\x03\\x01\\x00\\x00\\x1f$\" + // 0x1F200301: 0x00001F24\n\t\"\\x1f!\\x03\\x01\\x00\\x00\\x1f%\" + // 0x1F210301: 0x00001F25\n\t\"\\x1f \\x03B\\x00\\x00\\x1f&\" + // 0x1F200342: 0x00001F26\n\t\"\\x1f!\\x03B\\x00\\x00\\x1f'\" + // 0x1F210342: 0x00001F27\n\t\"\\x03\\x97\\x03\\x13\\x00\\x00\\x1f(\" + // 0x03970313: 0x00001F28\n\t\"\\x03\\x97\\x03\\x14\\x00\\x00\\x1f)\" + // 0x03970314: 0x00001F29\n\t\"\\x1f(\\x03\\x00\\x00\\x00\\x1f*\" + // 0x1F280300: 0x00001F2A\n\t\"\\x1f)\\x03\\x00\\x00\\x00\\x1f+\" + // 0x1F290300: 0x00001F2B\n\t\"\\x1f(\\x03\\x01\\x00\\x00\\x1f,\" + // 0x1F280301: 0x00001F2C\n\t\"\\x1f)\\x03\\x01\\x00\\x00\\x1f-\" + // 0x1F290301: 0x00001F2D\n\t\"\\x1f(\\x03B\\x00\\x00\\x1f.\" + // 0x1F280342: 0x00001F2E\n\t\"\\x1f)\\x03B\\x00\\x00\\x1f/\" + // 0x1F290342: 0x00001F2F\n\t\"\\x03\\xb9\\x03\\x13\\x00\\x00\\x1f0\" + // 0x03B90313: 0x00001F30\n\t\"\\x03\\xb9\\x03\\x14\\x00\\x00\\x1f1\" + // 0x03B90314: 0x00001F31\n\t\"\\x1f0\\x03\\x00\\x00\\x00\\x1f2\" + // 0x1F300300: 0x00001F32\n\t\"\\x1f1\\x03\\x00\\x00\\x00\\x1f3\" + // 0x1F310300: 0x00001F33\n\t\"\\x1f0\\x03\\x01\\x00\\x00\\x1f4\" + // 0x1F300301: 0x00001F34\n\t\"\\x1f1\\x03\\x01\\x00\\x00\\x1f5\" + // 0x1F310301: 0x00001F35\n\t\"\\x1f0\\x03B\\x00\\x00\\x1f6\" + // 0x1F300342: 0x00001F36\n\t\"\\x1f1\\x03B\\x00\\x00\\x1f7\" + // 0x1F310342: 0x00001F37\n\t\"\\x03\\x99\\x03\\x13\\x00\\x00\\x1f8\" + // 0x03990313: 0x00001F38\n\t\"\\x03\\x99\\x03\\x14\\x00\\x00\\x1f9\" + // 0x03990314: 0x00001F39\n\t\"\\x1f8\\x03\\x00\\x00\\x00\\x1f:\" + // 0x1F380300: 0x00001F3A\n\t\"\\x1f9\\x03\\x00\\x00\\x00\\x1f;\" + // 0x1F390300: 0x00001F3B\n\t\"\\x1f8\\x03\\x01\\x00\\x00\\x1f<\" + // 0x1F380301: 0x00001F3C\n\t\"\\x1f9\\x03\\x01\\x00\\x00\\x1f=\" + // 0x1F390301: 0x00001F3D\n\t\"\\x1f8\\x03B\\x00\\x00\\x1f>\" + // 0x1F380342: 0x00001F3E\n\t\"\\x1f9\\x03B\\x00\\x00\\x1f?\" + // 0x1F390342: 0x00001F3F\n\t\"\\x03\\xbf\\x03\\x13\\x00\\x00\\x1f@\" + // 0x03BF0313: 0x00001F40\n\t\"\\x03\\xbf\\x03\\x14\\x00\\x00\\x1fA\" + // 0x03BF0314: 0x00001F41\n\t\"\\x1f@\\x03\\x00\\x00\\x00\\x1fB\" + // 0x1F400300: 0x00001F42\n\t\"\\x1fA\\x03\\x00\\x00\\x00\\x1fC\" + // 0x1F410300: 0x00001F43\n\t\"\\x1f@\\x03\\x01\\x00\\x00\\x1fD\" + // 0x1F400301: 0x00001F44\n\t\"\\x1fA\\x03\\x01\\x00\\x00\\x1fE\" + // 0x1F410301: 0x00001F45\n\t\"\\x03\\x9f\\x03\\x13\\x00\\x00\\x1fH\" + // 0x039F0313: 0x00001F48\n\t\"\\x03\\x9f\\x03\\x14\\x00\\x00\\x1fI\" + // 0x039F0314: 0x00001F49\n\t\"\\x1fH\\x03\\x00\\x00\\x00\\x1fJ\" + // 0x1F480300: 0x00001F4A\n\t\"\\x1fI\\x03\\x00\\x00\\x00\\x1fK\" + // 0x1F490300: 0x00001F4B\n\t\"\\x1fH\\x03\\x01\\x00\\x00\\x1fL\" + // 0x1F480301: 0x00001F4C\n\t\"\\x1fI\\x03\\x01\\x00\\x00\\x1fM\" + // 0x1F490301: 0x00001F4D\n\t\"\\x03\\xc5\\x03\\x13\\x00\\x00\\x1fP\" + // 0x03C50313: 0x00001F50\n\t\"\\x03\\xc5\\x03\\x14\\x00\\x00\\x1fQ\" + // 0x03C50314: 0x00001F51\n\t\"\\x1fP\\x03\\x00\\x00\\x00\\x1fR\" + // 0x1F500300: 0x00001F52\n\t\"\\x1fQ\\x03\\x00\\x00\\x00\\x1fS\" + // 0x1F510300: 0x00001F53\n\t\"\\x1fP\\x03\\x01\\x00\\x00\\x1fT\" + // 0x1F500301: 0x00001F54\n\t\"\\x1fQ\\x03\\x01\\x00\\x00\\x1fU\" + // 0x1F510301: 0x00001F55\n\t\"\\x1fP\\x03B\\x00\\x00\\x1fV\" + // 0x1F500342: 0x00001F56\n\t\"\\x1fQ\\x03B\\x00\\x00\\x1fW\" + // 0x1F510342: 0x00001F57\n\t\"\\x03\\xa5\\x03\\x14\\x00\\x00\\x1fY\" + // 0x03A50314: 0x00001F59\n\t\"\\x1fY\\x03\\x00\\x00\\x00\\x1f[\" + // 0x1F590300: 0x00001F5B\n\t\"\\x1fY\\x03\\x01\\x00\\x00\\x1f]\" + // 0x1F590301: 0x00001F5D\n\t\"\\x1fY\\x03B\\x00\\x00\\x1f_\" + // 0x1F590342: 0x00001F5F\n\t\"\\x03\\xc9\\x03\\x13\\x00\\x00\\x1f`\" + // 0x03C90313: 0x00001F60\n\t\"\\x03\\xc9\\x03\\x14\\x00\\x00\\x1fa\" + // 0x03C90314: 0x00001F61\n\t\"\\x1f`\\x03\\x00\\x00\\x00\\x1fb\" + // 0x1F600300: 0x00001F62\n\t\"\\x1fa\\x03\\x00\\x00\\x00\\x1fc\" + // 0x1F610300: 0x00001F63\n\t\"\\x1f`\\x03\\x01\\x00\\x00\\x1fd\" + // 0x1F600301: 0x00001F64\n\t\"\\x1fa\\x03\\x01\\x00\\x00\\x1fe\" + // 0x1F610301: 0x00001F65\n\t\"\\x1f`\\x03B\\x00\\x00\\x1ff\" + // 0x1F600342: 0x00001F66\n\t\"\\x1fa\\x03B\\x00\\x00\\x1fg\" + // 0x1F610342: 0x00001F67\n\t\"\\x03\\xa9\\x03\\x13\\x00\\x00\\x1fh\" + // 0x03A90313: 0x00001F68\n\t\"\\x03\\xa9\\x03\\x14\\x00\\x00\\x1fi\" + // 0x03A90314: 0x00001F69\n\t\"\\x1fh\\x03\\x00\\x00\\x00\\x1fj\" + // 0x1F680300: 0x00001F6A\n\t\"\\x1fi\\x03\\x00\\x00\\x00\\x1fk\" + // 0x1F690300: 0x00001F6B\n\t\"\\x1fh\\x03\\x01\\x00\\x00\\x1fl\" + // 0x1F680301: 0x00001F6C\n\t\"\\x1fi\\x03\\x01\\x00\\x00\\x1fm\" + // 0x1F690301: 0x00001F6D\n\t\"\\x1fh\\x03B\\x00\\x00\\x1fn\" + // 0x1F680342: 0x00001F6E\n\t\"\\x1fi\\x03B\\x00\\x00\\x1fo\" + // 0x1F690342: 0x00001F6F\n\t\"\\x03\\xb1\\x03\\x00\\x00\\x00\\x1fp\" + // 0x03B10300: 0x00001F70\n\t\"\\x03\\xb5\\x03\\x00\\x00\\x00\\x1fr\" + // 0x03B50300: 0x00001F72\n\t\"\\x03\\xb7\\x03\\x00\\x00\\x00\\x1ft\" + // 0x03B70300: 0x00001F74\n\t\"\\x03\\xb9\\x03\\x00\\x00\\x00\\x1fv\" + // 0x03B90300: 0x00001F76\n\t\"\\x03\\xbf\\x03\\x00\\x00\\x00\\x1fx\" + // 0x03BF0300: 0x00001F78\n\t\"\\x03\\xc5\\x03\\x00\\x00\\x00\\x1fz\" + // 0x03C50300: 0x00001F7A\n\t\"\\x03\\xc9\\x03\\x00\\x00\\x00\\x1f|\" + // 0x03C90300: 0x00001F7C\n\t\"\\x1f\\x00\\x03E\\x00\\x00\\x1f\\x80\" + // 0x1F000345: 0x00001F80\n\t\"\\x1f\\x01\\x03E\\x00\\x00\\x1f\\x81\" + // 0x1F010345: 0x00001F81\n\t\"\\x1f\\x02\\x03E\\x00\\x00\\x1f\\x82\" + // 0x1F020345: 0x00001F82\n\t\"\\x1f\\x03\\x03E\\x00\\x00\\x1f\\x83\" + // 0x1F030345: 0x00001F83\n\t\"\\x1f\\x04\\x03E\\x00\\x00\\x1f\\x84\" + // 0x1F040345: 0x00001F84\n\t\"\\x1f\\x05\\x03E\\x00\\x00\\x1f\\x85\" + // 0x1F050345: 0x00001F85\n\t\"\\x1f\\x06\\x03E\\x00\\x00\\x1f\\x86\" + // 0x1F060345: 0x00001F86\n\t\"\\x1f\\a\\x03E\\x00\\x00\\x1f\\x87\" + // 0x1F070345: 0x00001F87\n\t\"\\x1f\\b\\x03E\\x00\\x00\\x1f\\x88\" + // 0x1F080345: 0x00001F88\n\t\"\\x1f\\t\\x03E\\x00\\x00\\x1f\\x89\" + // 0x1F090345: 0x00001F89\n\t\"\\x1f\\n\\x03E\\x00\\x00\\x1f\\x8a\" + // 0x1F0A0345: 0x00001F8A\n\t\"\\x1f\\v\\x03E\\x00\\x00\\x1f\\x8b\" + // 0x1F0B0345: 0x00001F8B\n\t\"\\x1f\\f\\x03E\\x00\\x00\\x1f\\x8c\" + // 0x1F0C0345: 0x00001F8C\n\t\"\\x1f\\r\\x03E\\x00\\x00\\x1f\\x8d\" + // 0x1F0D0345: 0x00001F8D\n\t\"\\x1f\\x0e\\x03E\\x00\\x00\\x1f\\x8e\" + // 0x1F0E0345: 0x00001F8E\n\t\"\\x1f\\x0f\\x03E\\x00\\x00\\x1f\\x8f\" + // 0x1F0F0345: 0x00001F8F\n\t\"\\x1f \\x03E\\x00\\x00\\x1f\\x90\" + // 0x1F200345: 0x00001F90\n\t\"\\x1f!\\x03E\\x00\\x00\\x1f\\x91\" + // 0x1F210345: 0x00001F91\n\t\"\\x1f\\\"\\x03E\\x00\\x00\\x1f\\x92\" + // 0x1F220345: 0x00001F92\n\t\"\\x1f#\\x03E\\x00\\x00\\x1f\\x93\" + // 0x1F230345: 0x00001F93\n\t\"\\x1f$\\x03E\\x00\\x00\\x1f\\x94\" + // 0x1F240345: 0x00001F94\n\t\"\\x1f%\\x03E\\x00\\x00\\x1f\\x95\" + // 0x1F250345: 0x00001F95\n\t\"\\x1f&\\x03E\\x00\\x00\\x1f\\x96\" + // 0x1F260345: 0x00001F96\n\t\"\\x1f'\\x03E\\x00\\x00\\x1f\\x97\" + // 0x1F270345: 0x00001F97\n\t\"\\x1f(\\x03E\\x00\\x00\\x1f\\x98\" + // 0x1F280345: 0x00001F98\n\t\"\\x1f)\\x03E\\x00\\x00\\x1f\\x99\" + // 0x1F290345: 0x00001F99\n\t\"\\x1f*\\x03E\\x00\\x00\\x1f\\x9a\" + // 0x1F2A0345: 0x00001F9A\n\t\"\\x1f+\\x03E\\x00\\x00\\x1f\\x9b\" + // 0x1F2B0345: 0x00001F9B\n\t\"\\x1f,\\x03E\\x00\\x00\\x1f\\x9c\" + // 0x1F2C0345: 0x00001F9C\n\t\"\\x1f-\\x03E\\x00\\x00\\x1f\\x9d\" + // 0x1F2D0345: 0x00001F9D\n\t\"\\x1f.\\x03E\\x00\\x00\\x1f\\x9e\" + // 0x1F2E0345: 0x00001F9E\n\t\"\\x1f/\\x03E\\x00\\x00\\x1f\\x9f\" + // 0x1F2F0345: 0x00001F9F\n\t\"\\x1f`\\x03E\\x00\\x00\\x1f\\xa0\" + // 0x1F600345: 0x00001FA0\n\t\"\\x1fa\\x03E\\x00\\x00\\x1f\\xa1\" + // 0x1F610345: 0x00001FA1\n\t\"\\x1fb\\x03E\\x00\\x00\\x1f\\xa2\" + // 0x1F620345: 0x00001FA2\n\t\"\\x1fc\\x03E\\x00\\x00\\x1f\\xa3\" + // 0x1F630345: 0x00001FA3\n\t\"\\x1fd\\x03E\\x00\\x00\\x1f\\xa4\" + // 0x1F640345: 0x00001FA4\n\t\"\\x1fe\\x03E\\x00\\x00\\x1f\\xa5\" + // 0x1F650345: 0x00001FA5\n\t\"\\x1ff\\x03E\\x00\\x00\\x1f\\xa6\" + // 0x1F660345: 0x00001FA6\n\t\"\\x1fg\\x03E\\x00\\x00\\x1f\\xa7\" + // 0x1F670345: 0x00001FA7\n\t\"\\x1fh\\x03E\\x00\\x00\\x1f\\xa8\" + // 0x1F680345: 0x00001FA8\n\t\"\\x1fi\\x03E\\x00\\x00\\x1f\\xa9\" + // 0x1F690345: 0x00001FA9\n\t\"\\x1fj\\x03E\\x00\\x00\\x1f\\xaa\" + // 0x1F6A0345: 0x00001FAA\n\t\"\\x1fk\\x03E\\x00\\x00\\x1f\\xab\" + // 0x1F6B0345: 0x00001FAB\n\t\"\\x1fl\\x03E\\x00\\x00\\x1f\\xac\" + // 0x1F6C0345: 0x00001FAC\n\t\"\\x1fm\\x03E\\x00\\x00\\x1f\\xad\" + // 0x1F6D0345: 0x00001FAD\n\t\"\\x1fn\\x03E\\x00\\x00\\x1f\\xae\" + // 0x1F6E0345: 0x00001FAE\n\t\"\\x1fo\\x03E\\x00\\x00\\x1f\\xaf\" + // 0x1F6F0345: 0x00001FAF\n\t\"\\x03\\xb1\\x03\\x06\\x00\\x00\\x1f\\xb0\" + // 0x03B10306: 0x00001FB0\n\t\"\\x03\\xb1\\x03\\x04\\x00\\x00\\x1f\\xb1\" + // 0x03B10304: 0x00001FB1\n\t\"\\x1fp\\x03E\\x00\\x00\\x1f\\xb2\" + // 0x1F700345: 0x00001FB2\n\t\"\\x03\\xb1\\x03E\\x00\\x00\\x1f\\xb3\" + // 0x03B10345: 0x00001FB3\n\t\"\\x03\\xac\\x03E\\x00\\x00\\x1f\\xb4\" + // 0x03AC0345: 0x00001FB4\n\t\"\\x03\\xb1\\x03B\\x00\\x00\\x1f\\xb6\" + // 0x03B10342: 0x00001FB6\n\t\"\\x1f\\xb6\\x03E\\x00\\x00\\x1f\\xb7\" + // 0x1FB60345: 0x00001FB7\n\t\"\\x03\\x91\\x03\\x06\\x00\\x00\\x1f\\xb8\" + // 0x03910306: 0x00001FB8\n\t\"\\x03\\x91\\x03\\x04\\x00\\x00\\x1f\\xb9\" + // 0x03910304: 0x00001FB9\n\t\"\\x03\\x91\\x03\\x00\\x00\\x00\\x1f\\xba\" + // 0x03910300: 0x00001FBA\n\t\"\\x03\\x91\\x03E\\x00\\x00\\x1f\\xbc\" + // 0x03910345: 0x00001FBC\n\t\"\\x00\\xa8\\x03B\\x00\\x00\\x1f\\xc1\" + // 0x00A80342: 0x00001FC1\n\t\"\\x1ft\\x03E\\x00\\x00\\x1f\\xc2\" + // 0x1F740345: 0x00001FC2\n\t\"\\x03\\xb7\\x03E\\x00\\x00\\x1f\\xc3\" + // 0x03B70345: 0x00001FC3\n\t\"\\x03\\xae\\x03E\\x00\\x00\\x1f\\xc4\" + // 0x03AE0345: 0x00001FC4\n\t\"\\x03\\xb7\\x03B\\x00\\x00\\x1f\\xc6\" + // 0x03B70342: 0x00001FC6\n\t\"\\x1f\\xc6\\x03E\\x00\\x00\\x1f\\xc7\" + // 0x1FC60345: 0x00001FC7\n\t\"\\x03\\x95\\x03\\x00\\x00\\x00\\x1f\\xc8\" + // 0x03950300: 0x00001FC8\n\t\"\\x03\\x97\\x03\\x00\\x00\\x00\\x1f\\xca\" + // 0x03970300: 0x00001FCA\n\t\"\\x03\\x97\\x03E\\x00\\x00\\x1f\\xcc\" + // 0x03970345: 0x00001FCC\n\t\"\\x1f\\xbf\\x03\\x00\\x00\\x00\\x1f\\xcd\" + // 0x1FBF0300: 0x00001FCD\n\t\"\\x1f\\xbf\\x03\\x01\\x00\\x00\\x1f\\xce\" + // 0x1FBF0301: 0x00001FCE\n\t\"\\x1f\\xbf\\x03B\\x00\\x00\\x1f\\xcf\" + // 0x1FBF0342: 0x00001FCF\n\t\"\\x03\\xb9\\x03\\x06\\x00\\x00\\x1f\\xd0\" + // 0x03B90306: 0x00001FD0\n\t\"\\x03\\xb9\\x03\\x04\\x00\\x00\\x1f\\xd1\" + // 0x03B90304: 0x00001FD1\n\t\"\\x03\\xca\\x03\\x00\\x00\\x00\\x1f\\xd2\" + // 0x03CA0300: 0x00001FD2\n\t\"\\x03\\xb9\\x03B\\x00\\x00\\x1f\\xd6\" + // 0x03B90342: 0x00001FD6\n\t\"\\x03\\xca\\x03B\\x00\\x00\\x1f\\xd7\" + // 0x03CA0342: 0x00001FD7\n\t\"\\x03\\x99\\x03\\x06\\x00\\x00\\x1f\\xd8\" + // 0x03990306: 0x00001FD8\n\t\"\\x03\\x99\\x03\\x04\\x00\\x00\\x1f\\xd9\" + // 0x03990304: 0x00001FD9\n\t\"\\x03\\x99\\x03\\x00\\x00\\x00\\x1f\\xda\" + // 0x03990300: 0x00001FDA\n\t\"\\x1f\\xfe\\x03\\x00\\x00\\x00\\x1f\\xdd\" + // 0x1FFE0300: 0x00001FDD\n\t\"\\x1f\\xfe\\x03\\x01\\x00\\x00\\x1f\\xde\" + // 0x1FFE0301: 0x00001FDE\n\t\"\\x1f\\xfe\\x03B\\x00\\x00\\x1f\\xdf\" + // 0x1FFE0342: 0x00001FDF\n\t\"\\x03\\xc5\\x03\\x06\\x00\\x00\\x1f\\xe0\" + // 0x03C50306: 0x00001FE0\n\t\"\\x03\\xc5\\x03\\x04\\x00\\x00\\x1f\\xe1\" + // 0x03C50304: 0x00001FE1\n\t\"\\x03\\xcb\\x03\\x00\\x00\\x00\\x1f\\xe2\" + // 0x03CB0300: 0x00001FE2\n\t\"\\x03\\xc1\\x03\\x13\\x00\\x00\\x1f\\xe4\" + // 0x03C10313: 0x00001FE4\n\t\"\\x03\\xc1\\x03\\x14\\x00\\x00\\x1f\\xe5\" + // 0x03C10314: 0x00001FE5\n\t\"\\x03\\xc5\\x03B\\x00\\x00\\x1f\\xe6\" + // 0x03C50342: 0x00001FE6\n\t\"\\x03\\xcb\\x03B\\x00\\x00\\x1f\\xe7\" + // 0x03CB0342: 0x00001FE7\n\t\"\\x03\\xa5\\x03\\x06\\x00\\x00\\x1f\\xe8\" + // 0x03A50306: 0x00001FE8\n\t\"\\x03\\xa5\\x03\\x04\\x00\\x00\\x1f\\xe9\" + // 0x03A50304: 0x00001FE9\n\t\"\\x03\\xa5\\x03\\x00\\x00\\x00\\x1f\\xea\" + // 0x03A50300: 0x00001FEA\n\t\"\\x03\\xa1\\x03\\x14\\x00\\x00\\x1f\\xec\" + // 0x03A10314: 0x00001FEC\n\t\"\\x00\\xa8\\x03\\x00\\x00\\x00\\x1f\\xed\" + // 0x00A80300: 0x00001FED\n\t\"\\x1f|\\x03E\\x00\\x00\\x1f\\xf2\" + // 0x1F7C0345: 0x00001FF2\n\t\"\\x03\\xc9\\x03E\\x00\\x00\\x1f\\xf3\" + // 0x03C90345: 0x00001FF3\n\t\"\\x03\\xce\\x03E\\x00\\x00\\x1f\\xf4\" + // 0x03CE0345: 0x00001FF4\n\t\"\\x03\\xc9\\x03B\\x00\\x00\\x1f\\xf6\" + // 0x03C90342: 0x00001FF6\n\t\"\\x1f\\xf6\\x03E\\x00\\x00\\x1f\\xf7\" + // 0x1FF60345: 0x00001FF7\n\t\"\\x03\\x9f\\x03\\x00\\x00\\x00\\x1f\\xf8\" + // 0x039F0300: 0x00001FF8\n\t\"\\x03\\xa9\\x03\\x00\\x00\\x00\\x1f\\xfa\" + // 0x03A90300: 0x00001FFA\n\t\"\\x03\\xa9\\x03E\\x00\\x00\\x1f\\xfc\" + // 0x03A90345: 0x00001FFC\n\t\"!\\x90\\x038\\x00\\x00!\\x9a\" + // 0x21900338: 0x0000219A\n\t\"!\\x92\\x038\\x00\\x00!\\x9b\" + // 0x21920338: 0x0000219B\n\t\"!\\x94\\x038\\x00\\x00!\\xae\" + // 0x21940338: 0x000021AE\n\t\"!\\xd0\\x038\\x00\\x00!\\xcd\" + // 0x21D00338: 0x000021CD\n\t\"!\\xd4\\x038\\x00\\x00!\\xce\" + // 0x21D40338: 0x000021CE\n\t\"!\\xd2\\x038\\x00\\x00!\\xcf\" + // 0x21D20338: 0x000021CF\n\t\"\\\"\\x03\\x038\\x00\\x00\\\"\\x04\" + // 0x22030338: 0x00002204\n\t\"\\\"\\b\\x038\\x00\\x00\\\"\\t\" + // 0x22080338: 0x00002209\n\t\"\\\"\\v\\x038\\x00\\x00\\\"\\f\" + // 0x220B0338: 0x0000220C\n\t\"\\\"#\\x038\\x00\\x00\\\"$\" + // 0x22230338: 0x00002224\n\t\"\\\"%\\x038\\x00\\x00\\\"&\" + // 0x22250338: 0x00002226\n\t\"\\\"<\\x038\\x00\\x00\\\"A\" + // 0x223C0338: 0x00002241\n\t\"\\\"C\\x038\\x00\\x00\\\"D\" + // 0x22430338: 0x00002244\n\t\"\\\"E\\x038\\x00\\x00\\\"G\" + // 0x22450338: 0x00002247\n\t\"\\\"H\\x038\\x00\\x00\\\"I\" + // 0x22480338: 0x00002249\n\t\"\\x00=\\x038\\x00\\x00\\\"`\" + // 0x003D0338: 0x00002260\n\t\"\\\"a\\x038\\x00\\x00\\\"b\" + // 0x22610338: 0x00002262\n\t\"\\\"M\\x038\\x00\\x00\\\"m\" + // 0x224D0338: 0x0000226D\n\t\"\\x00<\\x038\\x00\\x00\\\"n\" + // 0x003C0338: 0x0000226E\n\t\"\\x00>\\x038\\x00\\x00\\\"o\" + // 0x003E0338: 0x0000226F\n\t\"\\\"d\\x038\\x00\\x00\\\"p\" + // 0x22640338: 0x00002270\n\t\"\\\"e\\x038\\x00\\x00\\\"q\" + // 0x22650338: 0x00002271\n\t\"\\\"r\\x038\\x00\\x00\\\"t\" + // 0x22720338: 0x00002274\n\t\"\\\"s\\x038\\x00\\x00\\\"u\" + // 0x22730338: 0x00002275\n\t\"\\\"v\\x038\\x00\\x00\\\"x\" + // 0x22760338: 0x00002278\n\t\"\\\"w\\x038\\x00\\x00\\\"y\" + // 0x22770338: 0x00002279\n\t\"\\\"z\\x038\\x00\\x00\\\"\\x80\" + // 0x227A0338: 0x00002280\n\t\"\\\"{\\x038\\x00\\x00\\\"\\x81\" + // 0x227B0338: 0x00002281\n\t\"\\\"\\x82\\x038\\x00\\x00\\\"\\x84\" + // 0x22820338: 0x00002284\n\t\"\\\"\\x83\\x038\\x00\\x00\\\"\\x85\" + // 0x22830338: 0x00002285\n\t\"\\\"\\x86\\x038\\x00\\x00\\\"\\x88\" + // 0x22860338: 0x00002288\n\t\"\\\"\\x87\\x038\\x00\\x00\\\"\\x89\" + // 0x22870338: 0x00002289\n\t\"\\\"\\xa2\\x038\\x00\\x00\\\"\\xac\" + // 0x22A20338: 0x000022AC\n\t\"\\\"\\xa8\\x038\\x00\\x00\\\"\\xad\" + // 0x22A80338: 0x000022AD\n\t\"\\\"\\xa9\\x038\\x00\\x00\\\"\\xae\" + // 0x22A90338: 0x000022AE\n\t\"\\\"\\xab\\x038\\x00\\x00\\\"\\xaf\" + // 0x22AB0338: 0x000022AF\n\t\"\\\"|\\x038\\x00\\x00\\\"\\xe0\" + // 0x227C0338: 0x000022E0\n\t\"\\\"}\\x038\\x00\\x00\\\"\\xe1\" + // 0x227D0338: 0x000022E1\n\t\"\\\"\\x91\\x038\\x00\\x00\\\"\\xe2\" + // 0x22910338: 0x000022E2\n\t\"\\\"\\x92\\x038\\x00\\x00\\\"\\xe3\" + // 0x22920338: 0x000022E3\n\t\"\\\"\\xb2\\x038\\x00\\x00\\\"\\xea\" + // 0x22B20338: 0x000022EA\n\t\"\\\"\\xb3\\x038\\x00\\x00\\\"\\xeb\" + // 0x22B30338: 0x000022EB\n\t\"\\\"\\xb4\\x038\\x00\\x00\\\"\\xec\" + // 0x22B40338: 0x000022EC\n\t\"\\\"\\xb5\\x038\\x00\\x00\\\"\\xed\" + // 0x22B50338: 0x000022ED\n\t\"0K0\\x99\\x00\\x000L\" + // 0x304B3099: 0x0000304C\n\t\"0M0\\x99\\x00\\x000N\" + // 0x304D3099: 0x0000304E\n\t\"0O0\\x99\\x00\\x000P\" + // 0x304F3099: 0x00003050\n\t\"0Q0\\x99\\x00\\x000R\" + // 0x30513099: 0x00003052\n\t\"0S0\\x99\\x00\\x000T\" + // 0x30533099: 0x00003054\n\t\"0U0\\x99\\x00\\x000V\" + // 0x30553099: 0x00003056\n\t\"0W0\\x99\\x00\\x000X\" + // 0x30573099: 0x00003058\n\t\"0Y0\\x99\\x00\\x000Z\" + // 0x30593099: 0x0000305A\n\t\"0[0\\x99\\x00\\x000\\\\\" + // 0x305B3099: 0x0000305C\n\t\"0]0\\x99\\x00\\x000^\" + // 0x305D3099: 0x0000305E\n\t\"0_0\\x99\\x00\\x000`\" + // 0x305F3099: 0x00003060\n\t\"0a0\\x99\\x00\\x000b\" + // 0x30613099: 0x00003062\n\t\"0d0\\x99\\x00\\x000e\" + // 0x30643099: 0x00003065\n\t\"0f0\\x99\\x00\\x000g\" + // 0x30663099: 0x00003067\n\t\"0h0\\x99\\x00\\x000i\" + // 0x30683099: 0x00003069\n\t\"0o0\\x99\\x00\\x000p\" + // 0x306F3099: 0x00003070\n\t\"0o0\\x9a\\x00\\x000q\" + // 0x306F309A: 0x00003071\n\t\"0r0\\x99\\x00\\x000s\" + // 0x30723099: 0x00003073\n\t\"0r0\\x9a\\x00\\x000t\" + // 0x3072309A: 0x00003074\n\t\"0u0\\x99\\x00\\x000v\" + // 0x30753099: 0x00003076\n\t\"0u0\\x9a\\x00\\x000w\" + // 0x3075309A: 0x00003077\n\t\"0x0\\x99\\x00\\x000y\" + // 0x30783099: 0x00003079\n\t\"0x0\\x9a\\x00\\x000z\" + // 0x3078309A: 0x0000307A\n\t\"0{0\\x99\\x00\\x000|\" + // 0x307B3099: 0x0000307C\n\t\"0{0\\x9a\\x00\\x000}\" + // 0x307B309A: 0x0000307D\n\t\"0F0\\x99\\x00\\x000\\x94\" + // 0x30463099: 0x00003094\n\t\"0\\x9d0\\x99\\x00\\x000\\x9e\" + // 0x309D3099: 0x0000309E\n\t\"0\\xab0\\x99\\x00\\x000\\xac\" + // 0x30AB3099: 0x000030AC\n\t\"0\\xad0\\x99\\x00\\x000\\xae\" + // 0x30AD3099: 0x000030AE\n\t\"0\\xaf0\\x99\\x00\\x000\\xb0\" + // 0x30AF3099: 0x000030B0\n\t\"0\\xb10\\x99\\x00\\x000\\xb2\" + // 0x30B13099: 0x000030B2\n\t\"0\\xb30\\x99\\x00\\x000\\xb4\" + // 0x30B33099: 0x000030B4\n\t\"0\\xb50\\x99\\x00\\x000\\xb6\" + // 0x30B53099: 0x000030B6\n\t\"0\\xb70\\x99\\x00\\x000\\xb8\" + // 0x30B73099: 0x000030B8\n\t\"0\\xb90\\x99\\x00\\x000\\xba\" + // 0x30B93099: 0x000030BA\n\t\"0\\xbb0\\x99\\x00\\x000\\xbc\" + // 0x30BB3099: 0x000030BC\n\t\"0\\xbd0\\x99\\x00\\x000\\xbe\" + // 0x30BD3099: 0x000030BE\n\t\"0\\xbf0\\x99\\x00\\x000\\xc0\" + // 0x30BF3099: 0x000030C0\n\t\"0\\xc10\\x99\\x00\\x000\\xc2\" + // 0x30C13099: 0x000030C2\n\t\"0\\xc40\\x99\\x00\\x000\\xc5\" + // 0x30C43099: 0x000030C5\n\t\"0\\xc60\\x99\\x00\\x000\\xc7\" + // 0x30C63099: 0x000030C7\n\t\"0\\xc80\\x99\\x00\\x000\\xc9\" + // 0x30C83099: 0x000030C9\n\t\"0\\xcf0\\x99\\x00\\x000\\xd0\" + // 0x30CF3099: 0x000030D0\n\t\"0\\xcf0\\x9a\\x00\\x000\\xd1\" + // 0x30CF309A: 0x000030D1\n\t\"0\\xd20\\x99\\x00\\x000\\xd3\" + // 0x30D23099: 0x000030D3\n\t\"0\\xd20\\x9a\\x00\\x000\\xd4\" + // 0x30D2309A: 0x000030D4\n\t\"0\\xd50\\x99\\x00\\x000\\xd6\" + // 0x30D53099: 0x000030D6\n\t\"0\\xd50\\x9a\\x00\\x000\\xd7\" + // 0x30D5309A: 0x000030D7\n\t\"0\\xd80\\x99\\x00\\x000\\xd9\" + // 0x30D83099: 0x000030D9\n\t\"0\\xd80\\x9a\\x00\\x000\\xda\" + // 0x30D8309A: 0x000030DA\n\t\"0\\xdb0\\x99\\x00\\x000\\xdc\" + // 0x30DB3099: 0x000030DC\n\t\"0\\xdb0\\x9a\\x00\\x000\\xdd\" + // 0x30DB309A: 0x000030DD\n\t\"0\\xa60\\x99\\x00\\x000\\xf4\" + // 0x30A63099: 0x000030F4\n\t\"0\\xef0\\x99\\x00\\x000\\xf7\" + // 0x30EF3099: 0x000030F7\n\t\"0\\xf00\\x99\\x00\\x000\\xf8\" + // 0x30F03099: 0x000030F8\n\t\"0\\xf10\\x99\\x00\\x000\\xf9\" + // 0x30F13099: 0x000030F9\n\t\"0\\xf20\\x99\\x00\\x000\\xfa\" + // 0x30F23099: 0x000030FA\n\t\"0\\xfd0\\x99\\x00\\x000\\xfe\" + // 0x30FD3099: 0x000030FE\n\t\"\\x05\\xd2\\x03\\a\\x00\\x01\\x05\\xc9\" + // 0x05D20307: 0x000105C9\n\t\"\\x05\\xda\\x03\\a\\x00\\x01\\x05\\xe4\" + // 0x05DA0307: 0x000105E4\n\t\"\\x10\\x99\\x10\\xba\\x00\\x01\\x10\\x9a\" + // 0x109910BA: 0x0001109A\n\t\"\\x10\\x9b\\x10\\xba\\x00\\x01\\x10\\x9c\" + // 0x109B10BA: 0x0001109C\n\t\"\\x10\\xa5\\x10\\xba\\x00\\x01\\x10\\xab\" + // 0x10A510BA: 0x000110AB\n\t\"\\x111\\x11'\\x00\\x01\\x11.\" + // 0x11311127: 0x0001112E\n\t\"\\x112\\x11'\\x00\\x01\\x11/\" + // 0x11321127: 0x0001112F\n\t\"\\x13G\\x13>\\x00\\x01\\x13K\" + // 0x1347133E: 0x0001134B\n\t\"\\x13G\\x13W\\x00\\x01\\x13L\" + // 0x13471357: 0x0001134C\n\t\"\\x13\\x82\\x13\\xc9\\x00\\x01\\x13\\x83\" + // 0x138213C9: 0x00011383\n\t\"\\x13\\x84\\x13\\xbb\\x00\\x01\\x13\\x85\" + // 0x138413BB: 0x00011385\n\t\"\\x13\\x8b\\x13\\xc2\\x00\\x01\\x13\\x8e\" + // 0x138B13C2: 0x0001138E\n\t\"\\x13\\x90\\x13\\xc9\\x00\\x01\\x13\\x91\" + // 0x139013C9: 0x00011391\n\t\"\\x13\\xc2\\x13\\xc2\\x00\\x01\\x13\\xc5\" + // 0x13C213C2: 0x000113C5\n\t\"\\x13\\xc2\\x13\\xb8\\x00\\x01\\x13\\xc7\" + // 0x13C213B8: 0x000113C7\n\t\"\\x13\\xc2\\x13\\xc9\\x00\\x01\\x13\\xc8\" + // 0x13C213C9: 0x000113C8\n\t\"\\x14\\xb9\\x14\\xba\\x00\\x01\\x14\\xbb\" + // 0x14B914BA: 0x000114BB\n\t\"\\x14\\xb9\\x14\\xb0\\x00\\x01\\x14\\xbc\" + // 0x14B914B0: 0x000114BC\n\t\"\\x14\\xb9\\x14\\xbd\\x00\\x01\\x14\\xbe\" + // 0x14B914BD: 0x000114BE\n\t\"\\x15\\xb8\\x15\\xaf\\x00\\x01\\x15\\xba\" + // 0x15B815AF: 0x000115BA\n\t\"\\x15\\xb9\\x15\\xaf\\x00\\x01\\x15\\xbb\" + // 0x15B915AF: 0x000115BB\n\t\"\\x195\\x190\\x00\\x01\\x198\" + // 0x19351930: 0x00011938\n\t\"a\\x1ea\\x1e\\x00\\x01a!\" + // 0x611E611E: 0x00016121\n\t\"a\\x1ea)\\x00\\x01a\\\"\" + // 0x611E6129: 0x00016122\n\t\"a\\x1ea\\x1f\\x00\\x01a#\" + // 0x611E611F: 0x00016123\n\t\"a)a\\x1f\\x00\\x01a$\" + // 0x6129611F: 0x00016124\n\t\"a\\x1ea \\x00\\x01a%\" + // 0x611E6120: 0x00016125\n\t\"a!a\\x1f\\x00\\x01a&\" + // 0x6121611F: 0x00016126\n\t\"a\\\"a\\x1f\\x00\\x01a'\" + // 0x6122611F: 0x00016127\n\t\"a!a \\x00\\x01a(\" + // 0x61216120: 0x00016128\n\t\"mgmg\\x00\\x01mh\" + // 0x6D676D67: 0x00016D68\n\t\"mcmg\\x00\\x01mi\" + // 0x6D636D67: 0x00016D69\n\t\"mimg\\x00\\x01mj\" + // 0x6D696D67: 0x00016D6A\n\t\"\"\n\t// Total size of tables: 57KB (58086 bytes)\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/transform.go",
    "content": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\nimport (\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/text/transform\"\n)\n\n// Reset implements the Reset method of the transform.Transformer interface.\nfunc (Form) Reset() {}\n\n// Transform implements the Transform method of the transform.Transformer\n// interface. It may need to write segments of up to MaxSegmentSize at once.\n// Users should either catch ErrShortDst and allow dst to grow or have dst be at\n// least of size MaxTransformChunkSize to be guaranteed of progress.\nfunc (f Form) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\t// Cap the maximum number of src bytes to check.\n\tb := src\n\teof := atEOF\n\tif ns := len(dst); ns < len(b) {\n\t\terr = transform.ErrShortDst\n\t\teof = false\n\t\tb = b[:ns]\n\t}\n\ti, ok := formTable[f].quickSpan(inputBytes(b), 0, len(b), eof)\n\tn := copy(dst, b[:i])\n\tif !ok {\n\t\tnDst, nSrc, err = f.transform(dst[n:], src[n:], atEOF)\n\t\treturn nDst + n, nSrc + n, err\n\t}\n\n\tif err == nil && n < len(src) && !atEOF {\n\t\terr = transform.ErrShortSrc\n\t}\n\treturn n, n, err\n}\n\nfunc flushTransform(rb *reorderBuffer) bool {\n\t// Write out (must fully fit in dst, or else it is an ErrShortDst).\n\tif len(rb.out) < rb.nrune*utf8.UTFMax {\n\t\treturn false\n\t}\n\trb.out = rb.out[rb.flushCopy(rb.out):]\n\treturn true\n}\n\nvar errs = []error{nil, transform.ErrShortDst, transform.ErrShortSrc}\n\n// transform implements the transform.Transformer interface. It is only called\n// when quickSpan does not pass for a given string.\nfunc (f Form) transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {\n\t// TODO: get rid of reorderBuffer. See CL 23460044.\n\trb := reorderBuffer{}\n\trb.init(f, src)\n\tfor {\n\t\t// Load segment into reorder buffer.\n\t\trb.setFlusher(dst[nDst:], flushTransform)\n\t\tend := decomposeSegment(&rb, nSrc, atEOF)\n\t\tif end < 0 {\n\t\t\treturn nDst, nSrc, errs[-end]\n\t\t}\n\t\tnDst = len(dst) - len(rb.out)\n\t\tnSrc = end\n\n\t\t// Next quickSpan.\n\t\tend = rb.nsrc\n\t\teof := atEOF\n\t\tif n := nSrc + len(dst) - nDst; n < end {\n\t\t\terr = transform.ErrShortDst\n\t\t\tend = n\n\t\t\teof = false\n\t\t}\n\t\tend, ok := rb.f.quickSpan(rb.src, nSrc, end, eof)\n\t\tn := copy(dst[nDst:], rb.src.bytes[nSrc:end])\n\t\tnSrc += n\n\t\tnDst += n\n\t\tif ok {\n\t\t\tif err == nil && n < rb.nsrc && !atEOF {\n\t\t\t\terr = transform.ErrShortSrc\n\t\t\t}\n\t\t\treturn nDst, nSrc, err\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/golang.org/x/text/unicode/norm/trie.go",
    "content": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage norm\n\ntype valueRange struct {\n\tvalue  uint16 // header: value:stride\n\tlo, hi byte   // header: lo:n\n}\n\ntype sparseBlocks struct {\n\tvalues []valueRange\n\toffset []uint16\n}\n\nvar nfcSparse = sparseBlocks{\n\tvalues: nfcSparseValues[:],\n\toffset: nfcSparseOffset[:],\n}\n\nvar nfkcSparse = sparseBlocks{\n\tvalues: nfkcSparseValues[:],\n\toffset: nfkcSparseOffset[:],\n}\n\nvar (\n\tnfcData  = newNfcTrie(0)\n\tnfkcData = newNfkcTrie(0)\n)\n\n// lookup determines the type of block n and looks up the value for b.\n// For n < t.cutoff, the block is a simple lookup table. Otherwise, the block\n// is a list of ranges with an accompanying value. Given a matching range r,\n// the value for b is by r.value + (b - r.lo) * stride.\nfunc (t *sparseBlocks) lookup(n uint32, b byte) uint16 {\n\toffset := t.offset[n]\n\theader := t.values[offset]\n\tlo := offset + 1\n\thi := lo + uint16(header.lo)\n\tfor lo < hi {\n\t\tm := lo + (hi-lo)/2\n\t\tr := t.values[m]\n\t\tif r.lo <= b && b <= r.hi {\n\t\t\treturn r.value + uint16(b-r.lo)*header.value\n\t\t}\n\t\tif b < r.lo {\n\t\t\thi = m\n\t\t} else {\n\t\t\tlo = m + 1\n\t\t}\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/LICENSE",
    "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 [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": "vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/annotations.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.MethodOptions)(nil),\n\t\tExtensionType: (*HttpRule)(nil),\n\t\tField:         72295728,\n\t\tName:          \"google.api.http\",\n\t\tTag:           \"bytes,72295728,opt,name=http\",\n\t\tFilename:      \"google/api/annotations.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.MethodOptions.\nvar (\n\t// See `HttpRule`.\n\t//\n\t// optional google.api.HttpRule http = 72295728;\n\tE_Http = &file_google_api_annotations_proto_extTypes[0]\n)\n\nvar File_google_api_annotations_proto protoreflect.FileDescriptor\n\nvar file_google_api_annotations_proto_rawDesc = []byte{\n\t0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,\n\t0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,\n\t0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65,\n\t0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,\n\t0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70,\n\t0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,\n\t0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50,\n\t0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67,\n\t0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70,\n\t0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e,\n\t0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49,\n\t0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar file_google_api_annotations_proto_goTypes = []interface{}{\n\t(*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions\n\t(*HttpRule)(nil),                   // 1: google.api.HttpRule\n}\nvar file_google_api_annotations_proto_depIdxs = []int32{\n\t0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions\n\t1, // 1: google.api.http:type_name -> google.api.HttpRule\n\t2, // [2:2] is the sub-list for method output_type\n\t2, // [2:2] is the sub-list for method input_type\n\t1, // [1:2] is the sub-list for extension type_name\n\t0, // [0:1] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_annotations_proto_init() }\nfunc file_google_api_annotations_proto_init() {\n\tif File_google_api_annotations_proto != nil {\n\t\treturn\n\t}\n\tfile_google_api_http_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_annotations_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 1,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_annotations_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_annotations_proto_depIdxs,\n\t\tExtensionInfos:    file_google_api_annotations_proto_extTypes,\n\t}.Build()\n\tFile_google_api_annotations_proto = out.File\n\tfile_google_api_annotations_proto_rawDesc = nil\n\tfile_google_api_annotations_proto_goTypes = nil\n\tfile_google_api_annotations_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/client.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tapi \"google.golang.org/genproto/googleapis/api\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The organization for which the client libraries are being published.\n// Affects the url where generated docs are published, etc.\ntype ClientLibraryOrganization int32\n\nconst (\n\t// Not useful.\n\tClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED ClientLibraryOrganization = 0\n\t// Google Cloud Platform Org.\n\tClientLibraryOrganization_CLOUD ClientLibraryOrganization = 1\n\t// Ads (Advertising) Org.\n\tClientLibraryOrganization_ADS ClientLibraryOrganization = 2\n\t// Photos Org.\n\tClientLibraryOrganization_PHOTOS ClientLibraryOrganization = 3\n\t// Street View Org.\n\tClientLibraryOrganization_STREET_VIEW ClientLibraryOrganization = 4\n\t// Shopping Org.\n\tClientLibraryOrganization_SHOPPING ClientLibraryOrganization = 5\n\t// Geo Org.\n\tClientLibraryOrganization_GEO ClientLibraryOrganization = 6\n\t// Generative AI - https://developers.generativeai.google\n\tClientLibraryOrganization_GENERATIVE_AI ClientLibraryOrganization = 7\n)\n\n// Enum value maps for ClientLibraryOrganization.\nvar (\n\tClientLibraryOrganization_name = map[int32]string{\n\t\t0: \"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\",\n\t\t1: \"CLOUD\",\n\t\t2: \"ADS\",\n\t\t3: \"PHOTOS\",\n\t\t4: \"STREET_VIEW\",\n\t\t5: \"SHOPPING\",\n\t\t6: \"GEO\",\n\t\t7: \"GENERATIVE_AI\",\n\t}\n\tClientLibraryOrganization_value = map[string]int32{\n\t\t\"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\": 0,\n\t\t\"CLOUD\":         1,\n\t\t\"ADS\":           2,\n\t\t\"PHOTOS\":        3,\n\t\t\"STREET_VIEW\":   4,\n\t\t\"SHOPPING\":      5,\n\t\t\"GEO\":           6,\n\t\t\"GENERATIVE_AI\": 7,\n\t}\n)\n\nfunc (x ClientLibraryOrganization) Enum() *ClientLibraryOrganization {\n\tp := new(ClientLibraryOrganization)\n\t*p = x\n\treturn p\n}\n\nfunc (x ClientLibraryOrganization) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ClientLibraryOrganization) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_client_proto_enumTypes[0].Descriptor()\n}\n\nfunc (ClientLibraryOrganization) Type() protoreflect.EnumType {\n\treturn &file_google_api_client_proto_enumTypes[0]\n}\n\nfunc (x ClientLibraryOrganization) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ClientLibraryOrganization.Descriptor instead.\nfunc (ClientLibraryOrganization) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{0}\n}\n\n// To where should client libraries be published?\ntype ClientLibraryDestination int32\n\nconst (\n\t// Client libraries will neither be generated nor published to package\n\t// managers.\n\tClientLibraryDestination_CLIENT_LIBRARY_DESTINATION_UNSPECIFIED ClientLibraryDestination = 0\n\t// Generate the client library in a repo under github.com/googleapis,\n\t// but don't publish it to package managers.\n\tClientLibraryDestination_GITHUB ClientLibraryDestination = 10\n\t// Publish the library to package managers like nuget.org and npmjs.com.\n\tClientLibraryDestination_PACKAGE_MANAGER ClientLibraryDestination = 20\n)\n\n// Enum value maps for ClientLibraryDestination.\nvar (\n\tClientLibraryDestination_name = map[int32]string{\n\t\t0:  \"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\",\n\t\t10: \"GITHUB\",\n\t\t20: \"PACKAGE_MANAGER\",\n\t}\n\tClientLibraryDestination_value = map[string]int32{\n\t\t\"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\": 0,\n\t\t\"GITHUB\":                                 10,\n\t\t\"PACKAGE_MANAGER\":                        20,\n\t}\n)\n\nfunc (x ClientLibraryDestination) Enum() *ClientLibraryDestination {\n\tp := new(ClientLibraryDestination)\n\t*p = x\n\treturn p\n}\n\nfunc (x ClientLibraryDestination) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ClientLibraryDestination) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_client_proto_enumTypes[1].Descriptor()\n}\n\nfunc (ClientLibraryDestination) Type() protoreflect.EnumType {\n\treturn &file_google_api_client_proto_enumTypes[1]\n}\n\nfunc (x ClientLibraryDestination) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ClientLibraryDestination.Descriptor instead.\nfunc (ClientLibraryDestination) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{1}\n}\n\n// Required information for every language.\ntype CommonLanguageSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Link to automatically generated reference documentation.  Example:\n\t// https://cloud.google.com/nodejs/docs/reference/asset/latest\n\t//\n\t// Deprecated: Do not use.\n\tReferenceDocsUri string `protobuf:\"bytes,1,opt,name=reference_docs_uri,json=referenceDocsUri,proto3\" json:\"reference_docs_uri,omitempty\"`\n\t// The destination where API teams want this client library to be published.\n\tDestinations []ClientLibraryDestination `protobuf:\"varint,2,rep,packed,name=destinations,proto3,enum=google.api.ClientLibraryDestination\" json:\"destinations,omitempty\"`\n\t// Configuration for which RPCs should be generated in the GAPIC client.\n\tSelectiveGapicGeneration *SelectiveGapicGeneration `protobuf:\"bytes,3,opt,name=selective_gapic_generation,json=selectiveGapicGeneration,proto3\" json:\"selective_gapic_generation,omitempty\"`\n}\n\nfunc (x *CommonLanguageSettings) Reset() {\n\t*x = CommonLanguageSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CommonLanguageSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CommonLanguageSettings) ProtoMessage() {}\n\nfunc (x *CommonLanguageSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CommonLanguageSettings.ProtoReflect.Descriptor instead.\nfunc (*CommonLanguageSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{0}\n}\n\n// Deprecated: Do not use.\nfunc (x *CommonLanguageSettings) GetReferenceDocsUri() string {\n\tif x != nil {\n\t\treturn x.ReferenceDocsUri\n\t}\n\treturn \"\"\n}\n\nfunc (x *CommonLanguageSettings) GetDestinations() []ClientLibraryDestination {\n\tif x != nil {\n\t\treturn x.Destinations\n\t}\n\treturn nil\n}\n\nfunc (x *CommonLanguageSettings) GetSelectiveGapicGeneration() *SelectiveGapicGeneration {\n\tif x != nil {\n\t\treturn x.SelectiveGapicGeneration\n\t}\n\treturn nil\n}\n\n// Details about how and where to publish client libraries.\ntype ClientLibrarySettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Version of the API to apply these settings to. This is the full protobuf\n\t// package for the API, ending in the version element.\n\t// Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".\n\tVersion string `protobuf:\"bytes,1,opt,name=version,proto3\" json:\"version,omitempty\"`\n\t// Launch stage of this version of the API.\n\tLaunchStage api.LaunchStage `protobuf:\"varint,2,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage\" json:\"launch_stage,omitempty\"`\n\t// When using transport=rest, the client request will encode enums as\n\t// numbers rather than strings.\n\tRestNumericEnums bool `protobuf:\"varint,3,opt,name=rest_numeric_enums,json=restNumericEnums,proto3\" json:\"rest_numeric_enums,omitempty\"`\n\t// Settings for legacy Java features, supported in the Service YAML.\n\tJavaSettings *JavaSettings `protobuf:\"bytes,21,opt,name=java_settings,json=javaSettings,proto3\" json:\"java_settings,omitempty\"`\n\t// Settings for C++ client libraries.\n\tCppSettings *CppSettings `protobuf:\"bytes,22,opt,name=cpp_settings,json=cppSettings,proto3\" json:\"cpp_settings,omitempty\"`\n\t// Settings for PHP client libraries.\n\tPhpSettings *PhpSettings `protobuf:\"bytes,23,opt,name=php_settings,json=phpSettings,proto3\" json:\"php_settings,omitempty\"`\n\t// Settings for Python client libraries.\n\tPythonSettings *PythonSettings `protobuf:\"bytes,24,opt,name=python_settings,json=pythonSettings,proto3\" json:\"python_settings,omitempty\"`\n\t// Settings for Node client libraries.\n\tNodeSettings *NodeSettings `protobuf:\"bytes,25,opt,name=node_settings,json=nodeSettings,proto3\" json:\"node_settings,omitempty\"`\n\t// Settings for .NET client libraries.\n\tDotnetSettings *DotnetSettings `protobuf:\"bytes,26,opt,name=dotnet_settings,json=dotnetSettings,proto3\" json:\"dotnet_settings,omitempty\"`\n\t// Settings for Ruby client libraries.\n\tRubySettings *RubySettings `protobuf:\"bytes,27,opt,name=ruby_settings,json=rubySettings,proto3\" json:\"ruby_settings,omitempty\"`\n\t// Settings for Go client libraries.\n\tGoSettings *GoSettings `protobuf:\"bytes,28,opt,name=go_settings,json=goSettings,proto3\" json:\"go_settings,omitempty\"`\n}\n\nfunc (x *ClientLibrarySettings) Reset() {\n\t*x = ClientLibrarySettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ClientLibrarySettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ClientLibrarySettings) ProtoMessage() {}\n\nfunc (x *ClientLibrarySettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ClientLibrarySettings.ProtoReflect.Descriptor instead.\nfunc (*ClientLibrarySettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *ClientLibrarySettings) GetVersion() string {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn \"\"\n}\n\nfunc (x *ClientLibrarySettings) GetLaunchStage() api.LaunchStage {\n\tif x != nil {\n\t\treturn x.LaunchStage\n\t}\n\treturn api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED\n}\n\nfunc (x *ClientLibrarySettings) GetRestNumericEnums() bool {\n\tif x != nil {\n\t\treturn x.RestNumericEnums\n\t}\n\treturn false\n}\n\nfunc (x *ClientLibrarySettings) GetJavaSettings() *JavaSettings {\n\tif x != nil {\n\t\treturn x.JavaSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetCppSettings() *CppSettings {\n\tif x != nil {\n\t\treturn x.CppSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetPhpSettings() *PhpSettings {\n\tif x != nil {\n\t\treturn x.PhpSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetPythonSettings() *PythonSettings {\n\tif x != nil {\n\t\treturn x.PythonSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetNodeSettings() *NodeSettings {\n\tif x != nil {\n\t\treturn x.NodeSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetDotnetSettings() *DotnetSettings {\n\tif x != nil {\n\t\treturn x.DotnetSettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetRubySettings() *RubySettings {\n\tif x != nil {\n\t\treturn x.RubySettings\n\t}\n\treturn nil\n}\n\nfunc (x *ClientLibrarySettings) GetGoSettings() *GoSettings {\n\tif x != nil {\n\t\treturn x.GoSettings\n\t}\n\treturn nil\n}\n\n// This message configures the settings for publishing [Google Cloud Client\n// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)\n// generated from the service config.\ntype Publishing struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// A list of API method settings, e.g. the behavior for methods that use the\n\t// long-running operation pattern.\n\tMethodSettings []*MethodSettings `protobuf:\"bytes,2,rep,name=method_settings,json=methodSettings,proto3\" json:\"method_settings,omitempty\"`\n\t// Link to a *public* URI where users can report issues.  Example:\n\t// https://issuetracker.google.com/issues/new?component=190865&template=1161103\n\tNewIssueUri string `protobuf:\"bytes,101,opt,name=new_issue_uri,json=newIssueUri,proto3\" json:\"new_issue_uri,omitempty\"`\n\t// Link to product home page.  Example:\n\t// https://cloud.google.com/asset-inventory/docs/overview\n\tDocumentationUri string `protobuf:\"bytes,102,opt,name=documentation_uri,json=documentationUri,proto3\" json:\"documentation_uri,omitempty\"`\n\t// Used as a tracking tag when collecting data about the APIs developer\n\t// relations artifacts like docs, packages delivered to package managers,\n\t// etc.  Example: \"speech\".\n\tApiShortName string `protobuf:\"bytes,103,opt,name=api_short_name,json=apiShortName,proto3\" json:\"api_short_name,omitempty\"`\n\t// GitHub label to apply to issues and pull requests opened for this API.\n\tGithubLabel string `protobuf:\"bytes,104,opt,name=github_label,json=githubLabel,proto3\" json:\"github_label,omitempty\"`\n\t// GitHub teams to be added to CODEOWNERS in the directory in GitHub\n\t// containing source code for the client libraries for this API.\n\tCodeownerGithubTeams []string `protobuf:\"bytes,105,rep,name=codeowner_github_teams,json=codeownerGithubTeams,proto3\" json:\"codeowner_github_teams,omitempty\"`\n\t// A prefix used in sample code when demarking regions to be included in\n\t// documentation.\n\tDocTagPrefix string `protobuf:\"bytes,106,opt,name=doc_tag_prefix,json=docTagPrefix,proto3\" json:\"doc_tag_prefix,omitempty\"`\n\t// For whom the client library is being published.\n\tOrganization ClientLibraryOrganization `protobuf:\"varint,107,opt,name=organization,proto3,enum=google.api.ClientLibraryOrganization\" json:\"organization,omitempty\"`\n\t// Client library settings.  If the same version string appears multiple\n\t// times in this list, then the last one wins.  Settings from earlier\n\t// settings with the same version string are discarded.\n\tLibrarySettings []*ClientLibrarySettings `protobuf:\"bytes,109,rep,name=library_settings,json=librarySettings,proto3\" json:\"library_settings,omitempty\"`\n\t// Optional link to proto reference documentation.  Example:\n\t// https://cloud.google.com/pubsub/lite/docs/reference/rpc\n\tProtoReferenceDocumentationUri string `protobuf:\"bytes,110,opt,name=proto_reference_documentation_uri,json=protoReferenceDocumentationUri,proto3\" json:\"proto_reference_documentation_uri,omitempty\"`\n\t// Optional link to REST reference documentation.  Example:\n\t// https://cloud.google.com/pubsub/lite/docs/reference/rest\n\tRestReferenceDocumentationUri string `protobuf:\"bytes,111,opt,name=rest_reference_documentation_uri,json=restReferenceDocumentationUri,proto3\" json:\"rest_reference_documentation_uri,omitempty\"`\n}\n\nfunc (x *Publishing) Reset() {\n\t*x = Publishing{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Publishing) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Publishing) ProtoMessage() {}\n\nfunc (x *Publishing) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Publishing.ProtoReflect.Descriptor instead.\nfunc (*Publishing) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *Publishing) GetMethodSettings() []*MethodSettings {\n\tif x != nil {\n\t\treturn x.MethodSettings\n\t}\n\treturn nil\n}\n\nfunc (x *Publishing) GetNewIssueUri() string {\n\tif x != nil {\n\t\treturn x.NewIssueUri\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetDocumentationUri() string {\n\tif x != nil {\n\t\treturn x.DocumentationUri\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetApiShortName() string {\n\tif x != nil {\n\t\treturn x.ApiShortName\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetGithubLabel() string {\n\tif x != nil {\n\t\treturn x.GithubLabel\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetCodeownerGithubTeams() []string {\n\tif x != nil {\n\t\treturn x.CodeownerGithubTeams\n\t}\n\treturn nil\n}\n\nfunc (x *Publishing) GetDocTagPrefix() string {\n\tif x != nil {\n\t\treturn x.DocTagPrefix\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetOrganization() ClientLibraryOrganization {\n\tif x != nil {\n\t\treturn x.Organization\n\t}\n\treturn ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\n}\n\nfunc (x *Publishing) GetLibrarySettings() []*ClientLibrarySettings {\n\tif x != nil {\n\t\treturn x.LibrarySettings\n\t}\n\treturn nil\n}\n\nfunc (x *Publishing) GetProtoReferenceDocumentationUri() string {\n\tif x != nil {\n\t\treturn x.ProtoReferenceDocumentationUri\n\t}\n\treturn \"\"\n}\n\nfunc (x *Publishing) GetRestReferenceDocumentationUri() string {\n\tif x != nil {\n\t\treturn x.RestReferenceDocumentationUri\n\t}\n\treturn \"\"\n}\n\n// Settings for Java client libraries.\ntype JavaSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The package name to use in Java. Clobbers the java_package option\n\t// set in the protobuf. This should be used **only** by APIs\n\t// who have already set the language_settings.java.package_name\" field\n\t// in gapic.yaml. API teams should use the protobuf java_package option\n\t// where possible.\n\t//\n\t// Example of a YAML configuration::\n\t//\n\t//\tpublishing:\n\t//\t  java_settings:\n\t//\t    library_package: com.google.cloud.pubsub.v1\n\tLibraryPackage string `protobuf:\"bytes,1,opt,name=library_package,json=libraryPackage,proto3\" json:\"library_package,omitempty\"`\n\t// Configure the Java class name to use instead of the service's for its\n\t// corresponding generated GAPIC client. Keys are fully-qualified\n\t// service names as they appear in the protobuf (including the full\n\t// the language_settings.java.interface_names\" field in gapic.yaml. API\n\t// teams should otherwise use the service name as it appears in the\n\t// protobuf.\n\t//\n\t// Example of a YAML configuration::\n\t//\n\t//\tpublishing:\n\t//\t  java_settings:\n\t//\t    service_class_names:\n\t//\t      - google.pubsub.v1.Publisher: TopicAdmin\n\t//\t      - google.pubsub.v1.Subscriber: SubscriptionAdmin\n\tServiceClassNames map[string]string `protobuf:\"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3\" json:\"service_class_names,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\"`\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,3,opt,name=common,proto3\" json:\"common,omitempty\"`\n}\n\nfunc (x *JavaSettings) Reset() {\n\t*x = JavaSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *JavaSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*JavaSettings) ProtoMessage() {}\n\nfunc (x *JavaSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use JavaSettings.ProtoReflect.Descriptor instead.\nfunc (*JavaSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *JavaSettings) GetLibraryPackage() string {\n\tif x != nil {\n\t\treturn x.LibraryPackage\n\t}\n\treturn \"\"\n}\n\nfunc (x *JavaSettings) GetServiceClassNames() map[string]string {\n\tif x != nil {\n\t\treturn x.ServiceClassNames\n\t}\n\treturn nil\n}\n\nfunc (x *JavaSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\n// Settings for C++ client libraries.\ntype CppSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n}\n\nfunc (x *CppSettings) Reset() {\n\t*x = CppSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CppSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CppSettings) ProtoMessage() {}\n\nfunc (x *CppSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CppSettings.ProtoReflect.Descriptor instead.\nfunc (*CppSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *CppSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\n// Settings for Php client libraries.\ntype PhpSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n}\n\nfunc (x *PhpSettings) Reset() {\n\t*x = PhpSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PhpSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PhpSettings) ProtoMessage() {}\n\nfunc (x *PhpSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PhpSettings.ProtoReflect.Descriptor instead.\nfunc (*PhpSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *PhpSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\n// Settings for Python client libraries.\ntype PythonSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n\t// Experimental features to be included during client library generation.\n\tExperimentalFeatures *PythonSettings_ExperimentalFeatures `protobuf:\"bytes,2,opt,name=experimental_features,json=experimentalFeatures,proto3\" json:\"experimental_features,omitempty\"`\n}\n\nfunc (x *PythonSettings) Reset() {\n\t*x = PythonSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PythonSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PythonSettings) ProtoMessage() {}\n\nfunc (x *PythonSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PythonSettings.ProtoReflect.Descriptor instead.\nfunc (*PythonSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *PythonSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\nfunc (x *PythonSettings) GetExperimentalFeatures() *PythonSettings_ExperimentalFeatures {\n\tif x != nil {\n\t\treturn x.ExperimentalFeatures\n\t}\n\treturn nil\n}\n\n// Settings for Node client libraries.\ntype NodeSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n}\n\nfunc (x *NodeSettings) Reset() {\n\t*x = NodeSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *NodeSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*NodeSettings) ProtoMessage() {}\n\nfunc (x *NodeSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use NodeSettings.ProtoReflect.Descriptor instead.\nfunc (*NodeSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *NodeSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\n// Settings for Dotnet client libraries.\ntype DotnetSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n\t// Map from original service names to renamed versions.\n\t// This is used when the default generated types\n\t// would cause a naming conflict. (Neither name is\n\t// fully-qualified.)\n\t// Example: Subscriber to SubscriberServiceApi.\n\tRenamedServices map[string]string `protobuf:\"bytes,2,rep,name=renamed_services,json=renamedServices,proto3\" json:\"renamed_services,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\"`\n\t// Map from full resource types to the effective short name\n\t// for the resource. This is used when otherwise resource\n\t// named from different services would cause naming collisions.\n\t// Example entry:\n\t// \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"\n\tRenamedResources map[string]string `protobuf:\"bytes,3,rep,name=renamed_resources,json=renamedResources,proto3\" json:\"renamed_resources,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\"`\n\t// List of full resource types to ignore during generation.\n\t// This is typically used for API-specific Location resources,\n\t// which should be handled by the generator as if they were actually\n\t// the common Location resources.\n\t// Example entry: \"documentai.googleapis.com/Location\"\n\tIgnoredResources []string `protobuf:\"bytes,4,rep,name=ignored_resources,json=ignoredResources,proto3\" json:\"ignored_resources,omitempty\"`\n\t// Namespaces which must be aliased in snippets due to\n\t// a known (but non-generator-predictable) naming collision\n\tForcedNamespaceAliases []string `protobuf:\"bytes,5,rep,name=forced_namespace_aliases,json=forcedNamespaceAliases,proto3\" json:\"forced_namespace_aliases,omitempty\"`\n\t// Method signatures (in the form \"service.method(signature)\")\n\t// which are provided separately, so shouldn't be generated.\n\t// Snippets *calling* these methods are still generated, however.\n\tHandwrittenSignatures []string `protobuf:\"bytes,6,rep,name=handwritten_signatures,json=handwrittenSignatures,proto3\" json:\"handwritten_signatures,omitempty\"`\n}\n\nfunc (x *DotnetSettings) Reset() {\n\t*x = DotnetSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DotnetSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DotnetSettings) ProtoMessage() {}\n\nfunc (x *DotnetSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DotnetSettings.ProtoReflect.Descriptor instead.\nfunc (*DotnetSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *DotnetSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\nfunc (x *DotnetSettings) GetRenamedServices() map[string]string {\n\tif x != nil {\n\t\treturn x.RenamedServices\n\t}\n\treturn nil\n}\n\nfunc (x *DotnetSettings) GetRenamedResources() map[string]string {\n\tif x != nil {\n\t\treturn x.RenamedResources\n\t}\n\treturn nil\n}\n\nfunc (x *DotnetSettings) GetIgnoredResources() []string {\n\tif x != nil {\n\t\treturn x.IgnoredResources\n\t}\n\treturn nil\n}\n\nfunc (x *DotnetSettings) GetForcedNamespaceAliases() []string {\n\tif x != nil {\n\t\treturn x.ForcedNamespaceAliases\n\t}\n\treturn nil\n}\n\nfunc (x *DotnetSettings) GetHandwrittenSignatures() []string {\n\tif x != nil {\n\t\treturn x.HandwrittenSignatures\n\t}\n\treturn nil\n}\n\n// Settings for Ruby client libraries.\ntype RubySettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n}\n\nfunc (x *RubySettings) Reset() {\n\t*x = RubySettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RubySettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RubySettings) ProtoMessage() {}\n\nfunc (x *RubySettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RubySettings.ProtoReflect.Descriptor instead.\nfunc (*RubySettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *RubySettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\n// Settings for Go client libraries.\ntype GoSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Some settings.\n\tCommon *CommonLanguageSettings `protobuf:\"bytes,1,opt,name=common,proto3\" json:\"common,omitempty\"`\n\t// Map of service names to renamed services. Keys are the package relative\n\t// service names and values are the name to be used for the service client\n\t// and call options.\n\t//\n\t// publishing:\n\t//\n\t//\tgo_settings:\n\t//\t  renamed_services:\n\t//\t    Publisher: TopicAdmin\n\tRenamedServices map[string]string `protobuf:\"bytes,2,rep,name=renamed_services,json=renamedServices,proto3\" json:\"renamed_services,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\"`\n}\n\nfunc (x *GoSettings) Reset() {\n\t*x = GoSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *GoSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GoSettings) ProtoMessage() {}\n\nfunc (x *GoSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GoSettings.ProtoReflect.Descriptor instead.\nfunc (*GoSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *GoSettings) GetCommon() *CommonLanguageSettings {\n\tif x != nil {\n\t\treturn x.Common\n\t}\n\treturn nil\n}\n\nfunc (x *GoSettings) GetRenamedServices() map[string]string {\n\tif x != nil {\n\t\treturn x.RenamedServices\n\t}\n\treturn nil\n}\n\n// Describes the generator configuration for a method.\ntype MethodSettings struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The fully qualified name of the method, for which the options below apply.\n\t// This is used to find the method to apply the options.\n\t//\n\t// Example:\n\t//\n\t//\tpublishing:\n\t//\t  method_settings:\n\t//\t  - selector: google.storage.control.v2.StorageControl.CreateFolder\n\t//\t    # method settings for CreateFolder...\n\tSelector string `protobuf:\"bytes,1,opt,name=selector,proto3\" json:\"selector,omitempty\"`\n\t// Describes settings to use for long-running operations when generating\n\t// API methods for RPCs. Complements RPCs that use the annotations in\n\t// google/longrunning/operations.proto.\n\t//\n\t// Example of a YAML configuration::\n\t//\n\t//\tpublishing:\n\t//\t  method_settings:\n\t//\t  - selector: google.cloud.speech.v2.Speech.BatchRecognize\n\t//\t    long_running:\n\t//\t      initial_poll_delay: 60s # 1 minute\n\t//\t      poll_delay_multiplier: 1.5\n\t//\t      max_poll_delay: 360s # 6 minutes\n\t//\t      total_poll_timeout: 54000s # 90 minutes\n\tLongRunning *MethodSettings_LongRunning `protobuf:\"bytes,2,opt,name=long_running,json=longRunning,proto3\" json:\"long_running,omitempty\"`\n\t// List of top-level fields of the request message, that should be\n\t// automatically populated by the client libraries based on their\n\t// (google.api.field_info).format. Currently supported format: UUID4.\n\t//\n\t// Example of a YAML configuration:\n\t//\n\t//\tpublishing:\n\t//\t  method_settings:\n\t//\t  - selector: google.example.v1.ExampleService.CreateExample\n\t//\t    auto_populated_fields:\n\t//\t    - request_id\n\tAutoPopulatedFields []string `protobuf:\"bytes,3,rep,name=auto_populated_fields,json=autoPopulatedFields,proto3\" json:\"auto_populated_fields,omitempty\"`\n}\n\nfunc (x *MethodSettings) Reset() {\n\t*x = MethodSettings{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *MethodSettings) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MethodSettings) ProtoMessage() {}\n\nfunc (x *MethodSettings) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MethodSettings.ProtoReflect.Descriptor instead.\nfunc (*MethodSettings) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *MethodSettings) GetSelector() string {\n\tif x != nil {\n\t\treturn x.Selector\n\t}\n\treturn \"\"\n}\n\nfunc (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning {\n\tif x != nil {\n\t\treturn x.LongRunning\n\t}\n\treturn nil\n}\n\nfunc (x *MethodSettings) GetAutoPopulatedFields() []string {\n\tif x != nil {\n\t\treturn x.AutoPopulatedFields\n\t}\n\treturn nil\n}\n\n// This message is used to configure the generation of a subset of the RPCs in\n// a service for client libraries.\ntype SelectiveGapicGeneration struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// An allowlist of the fully qualified names of RPCs that should be included\n\t// on public client surfaces.\n\tMethods []string `protobuf:\"bytes,1,rep,name=methods,proto3\" json:\"methods,omitempty\"`\n\t// Setting this to true indicates to the client generators that methods\n\t// that would be excluded from the generation should instead be generated\n\t// in a way that indicates these methods should not be consumed by\n\t// end users. How this is expressed is up to individual language\n\t// implementations to decide. Some examples may be: added annotations,\n\t// obfuscated identifiers, or other language idiomatic patterns.\n\tGenerateOmittedAsInternal bool `protobuf:\"varint,2,opt,name=generate_omitted_as_internal,json=generateOmittedAsInternal,proto3\" json:\"generate_omitted_as_internal,omitempty\"`\n}\n\nfunc (x *SelectiveGapicGeneration) Reset() {\n\t*x = SelectiveGapicGeneration{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *SelectiveGapicGeneration) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SelectiveGapicGeneration) ProtoMessage() {}\n\nfunc (x *SelectiveGapicGeneration) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SelectiveGapicGeneration.ProtoReflect.Descriptor instead.\nfunc (*SelectiveGapicGeneration) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *SelectiveGapicGeneration) GetMethods() []string {\n\tif x != nil {\n\t\treturn x.Methods\n\t}\n\treturn nil\n}\n\nfunc (x *SelectiveGapicGeneration) GetGenerateOmittedAsInternal() bool {\n\tif x != nil {\n\t\treturn x.GenerateOmittedAsInternal\n\t}\n\treturn false\n}\n\n// Experimental features to be included during client library generation.\n// These fields will be deprecated once the feature graduates and is enabled\n// by default.\ntype PythonSettings_ExperimentalFeatures struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Enables generation of asynchronous REST clients if `rest` transport is\n\t// enabled. By default, asynchronous REST clients will not be generated.\n\t// This feature will be enabled by default 1 month after launching the\n\t// feature in preview packages.\n\tRestAsyncIoEnabled bool `protobuf:\"varint,1,opt,name=rest_async_io_enabled,json=restAsyncIoEnabled,proto3\" json:\"rest_async_io_enabled,omitempty\"`\n\t// Enables generation of protobuf code using new types that are more\n\t// Pythonic which are included in `protobuf>=5.29.x`. This feature will be\n\t// enabled by default 1 month after launching the feature in preview\n\t// packages.\n\tProtobufPythonicTypesEnabled bool `protobuf:\"varint,2,opt,name=protobuf_pythonic_types_enabled,json=protobufPythonicTypesEnabled,proto3\" json:\"protobuf_pythonic_types_enabled,omitempty\"`\n\t// Disables generation of an unversioned Python package for this client\n\t// library. This means that the module names will need to be versioned in\n\t// import statements. For example `import google.cloud.library_v2` instead\n\t// of `import google.cloud.library`.\n\tUnversionedPackageDisabled bool `protobuf:\"varint,3,opt,name=unversioned_package_disabled,json=unversionedPackageDisabled,proto3\" json:\"unversioned_package_disabled,omitempty\"`\n}\n\nfunc (x *PythonSettings_ExperimentalFeatures) Reset() {\n\t*x = PythonSettings_ExperimentalFeatures{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[14]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PythonSettings_ExperimentalFeatures) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PythonSettings_ExperimentalFeatures) ProtoMessage() {}\n\nfunc (x *PythonSettings_ExperimentalFeatures) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[14]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PythonSettings_ExperimentalFeatures.ProtoReflect.Descriptor instead.\nfunc (*PythonSettings_ExperimentalFeatures) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{6, 0}\n}\n\nfunc (x *PythonSettings_ExperimentalFeatures) GetRestAsyncIoEnabled() bool {\n\tif x != nil {\n\t\treturn x.RestAsyncIoEnabled\n\t}\n\treturn false\n}\n\nfunc (x *PythonSettings_ExperimentalFeatures) GetProtobufPythonicTypesEnabled() bool {\n\tif x != nil {\n\t\treturn x.ProtobufPythonicTypesEnabled\n\t}\n\treturn false\n}\n\nfunc (x *PythonSettings_ExperimentalFeatures) GetUnversionedPackageDisabled() bool {\n\tif x != nil {\n\t\treturn x.UnversionedPackageDisabled\n\t}\n\treturn false\n}\n\n// Describes settings to use when generating API methods that use the\n// long-running operation pattern.\n// All default values below are from those used in the client library\n// generators (e.g.\n// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).\ntype MethodSettings_LongRunning struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Initial delay after which the first poll request will be made.\n\t// Default value: 5 seconds.\n\tInitialPollDelay *durationpb.Duration `protobuf:\"bytes,1,opt,name=initial_poll_delay,json=initialPollDelay,proto3\" json:\"initial_poll_delay,omitempty\"`\n\t// Multiplier to gradually increase delay between subsequent polls until it\n\t// reaches max_poll_delay.\n\t// Default value: 1.5.\n\tPollDelayMultiplier float32 `protobuf:\"fixed32,2,opt,name=poll_delay_multiplier,json=pollDelayMultiplier,proto3\" json:\"poll_delay_multiplier,omitempty\"`\n\t// Maximum time between two subsequent poll requests.\n\t// Default value: 45 seconds.\n\tMaxPollDelay *durationpb.Duration `protobuf:\"bytes,3,opt,name=max_poll_delay,json=maxPollDelay,proto3\" json:\"max_poll_delay,omitempty\"`\n\t// Total polling timeout.\n\t// Default value: 5 minutes.\n\tTotalPollTimeout *durationpb.Duration `protobuf:\"bytes,4,opt,name=total_poll_timeout,json=totalPollTimeout,proto3\" json:\"total_poll_timeout,omitempty\"`\n}\n\nfunc (x *MethodSettings_LongRunning) Reset() {\n\t*x = MethodSettings_LongRunning{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_client_proto_msgTypes[18]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *MethodSettings_LongRunning) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MethodSettings_LongRunning) ProtoMessage() {}\n\nfunc (x *MethodSettings_LongRunning) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_client_proto_msgTypes[18]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MethodSettings_LongRunning.ProtoReflect.Descriptor instead.\nfunc (*MethodSettings_LongRunning) Descriptor() ([]byte, []int) {\n\treturn file_google_api_client_proto_rawDescGZIP(), []int{11, 0}\n}\n\nfunc (x *MethodSettings_LongRunning) GetInitialPollDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.InitialPollDelay\n\t}\n\treturn nil\n}\n\nfunc (x *MethodSettings_LongRunning) GetPollDelayMultiplier() float32 {\n\tif x != nil {\n\t\treturn x.PollDelayMultiplier\n\t}\n\treturn 0\n}\n\nfunc (x *MethodSettings_LongRunning) GetMaxPollDelay() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.MaxPollDelay\n\t}\n\treturn nil\n}\n\nfunc (x *MethodSettings_LongRunning) GetTotalPollTimeout() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.TotalPollTimeout\n\t}\n\treturn nil\n}\n\nvar file_google_api_client_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.MethodOptions)(nil),\n\t\tExtensionType: ([]string)(nil),\n\t\tField:         1051,\n\t\tName:          \"google.api.method_signature\",\n\t\tTag:           \"bytes,1051,rep,name=method_signature\",\n\t\tFilename:      \"google/api/client.proto\",\n\t},\n\t{\n\t\tExtendedType:  (*descriptorpb.ServiceOptions)(nil),\n\t\tExtensionType: (*string)(nil),\n\t\tField:         1049,\n\t\tName:          \"google.api.default_host\",\n\t\tTag:           \"bytes,1049,opt,name=default_host\",\n\t\tFilename:      \"google/api/client.proto\",\n\t},\n\t{\n\t\tExtendedType:  (*descriptorpb.ServiceOptions)(nil),\n\t\tExtensionType: (*string)(nil),\n\t\tField:         1050,\n\t\tName:          \"google.api.oauth_scopes\",\n\t\tTag:           \"bytes,1050,opt,name=oauth_scopes\",\n\t\tFilename:      \"google/api/client.proto\",\n\t},\n\t{\n\t\tExtendedType:  (*descriptorpb.ServiceOptions)(nil),\n\t\tExtensionType: (*string)(nil),\n\t\tField:         525000001,\n\t\tName:          \"google.api.api_version\",\n\t\tTag:           \"bytes,525000001,opt,name=api_version\",\n\t\tFilename:      \"google/api/client.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.MethodOptions.\nvar (\n\t// A definition of a client library method signature.\n\t//\n\t// In client libraries, each proto RPC corresponds to one or more methods\n\t// which the end user is able to call, and calls the underlying RPC.\n\t// Normally, this method receives a single argument (a struct or instance\n\t// corresponding to the RPC request object). Defining this field will\n\t// add one or more overloads providing flattened or simpler method signatures\n\t// in some languages.\n\t//\n\t// The fields on the method signature are provided as a comma-separated\n\t// string.\n\t//\n\t// For example, the proto RPC and annotation:\n\t//\n\t//\trpc CreateSubscription(CreateSubscriptionRequest)\n\t//\t    returns (Subscription) {\n\t//\t  option (google.api.method_signature) = \"name,topic\";\n\t//\t}\n\t//\n\t// Would add the following Java overload (in addition to the method accepting\n\t// the request object):\n\t//\n\t//\tpublic final Subscription createSubscription(String name, String topic)\n\t//\n\t// The following backwards-compatibility guidelines apply:\n\t//\n\t//   - Adding this annotation to an unannotated method is backwards\n\t//     compatible.\n\t//   - Adding this annotation to a method which already has existing\n\t//     method signature annotations is backwards compatible if and only if\n\t//     the new method signature annotation is last in the sequence.\n\t//   - Modifying or removing an existing method signature annotation is\n\t//     a breaking change.\n\t//   - Re-ordering existing method signature annotations is a breaking\n\t//     change.\n\t//\n\t// repeated string method_signature = 1051;\n\tE_MethodSignature = &file_google_api_client_proto_extTypes[0]\n)\n\n// Extension fields to descriptorpb.ServiceOptions.\nvar (\n\t// The hostname for this service.\n\t// This should be specified with no prefix or protocol.\n\t//\n\t// Example:\n\t//\n\t//\tservice Foo {\n\t//\t  option (google.api.default_host) = \"foo.googleapi.com\";\n\t//\t  ...\n\t//\t}\n\t//\n\t// optional string default_host = 1049;\n\tE_DefaultHost = &file_google_api_client_proto_extTypes[1]\n\t// OAuth scopes needed for the client.\n\t//\n\t// Example:\n\t//\n\t//\tservice Foo {\n\t//\t  option (google.api.oauth_scopes) = \\\n\t//\t    \"https://www.googleapis.com/auth/cloud-platform\";\n\t//\t  ...\n\t//\t}\n\t//\n\t// If there is more than one scope, use a comma-separated string:\n\t//\n\t// Example:\n\t//\n\t//\tservice Foo {\n\t//\t  option (google.api.oauth_scopes) = \\\n\t//\t    \"https://www.googleapis.com/auth/cloud-platform,\"\n\t//\t    \"https://www.googleapis.com/auth/monitoring\";\n\t//\t  ...\n\t//\t}\n\t//\n\t// optional string oauth_scopes = 1050;\n\tE_OauthScopes = &file_google_api_client_proto_extTypes[2]\n\t// The API version of this service, which should be sent by version-aware\n\t// clients to the service. This allows services to abide by the schema and\n\t// behavior of the service at the time this API version was deployed.\n\t// The format of the API version must be treated as opaque by clients.\n\t// Services may use a format with an apparent structure, but clients must\n\t// not rely on this to determine components within an API version, or attempt\n\t// to construct other valid API versions. Note that this is for upcoming\n\t// functionality and may not be implemented for all services.\n\t//\n\t// Example:\n\t//\n\t//\tservice Foo {\n\t//\t  option (google.api.api_version) = \"v1_20230821_preview\";\n\t//\t}\n\t//\n\t// optional string api_version = 525000001;\n\tE_ApiVersion = &file_google_api_client_proto_extTypes[3]\n)\n\nvar File_google_api_client_proto protoreflect.FileDescriptor\n\nvar file_google_api_client_proto_rawDesc = []byte{\n\t0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,\n\t0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,\n\t0x69, 0x2f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,\n\t0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,\n\t0x73, 0x12, 0x30, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64,\n\t0x6f, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18,\n\t0x01, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x73,\n\t0x55, 0x72, 0x69, 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62,\n\t0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,\n\t0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a,\n\t0x1a, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x69, 0x63,\n\t0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,\n\t0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53,\n\t0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x70, 0x69, 0x63, 0x47, 0x65, 0x6e,\n\t0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69,\n\t0x76, 0x65, 0x47, 0x61, 0x70, 0x69, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x22, 0x93, 0x05, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72,\n\t0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,\n\t0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f,\n\t0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53,\n\t0x74, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67,\n\t0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69,\n\t0x63, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72,\n\t0x65, 0x73, 0x74, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x12,\n\t0x3d, 0x0a, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n\t0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n\t0x52, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a,\n\t0x0a, 0x0c, 0x63, 0x70, 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,\n\t0x69, 0x2e, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x63,\n\t0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x68,\n\t0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b,\n\t0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x68,\n\t0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x70, 0x68, 0x70, 0x53, 0x65,\n\t0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e,\n\t0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74,\n\t0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x70, 0x79, 0x74,\n\t0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6e,\n\t0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x19, 0x20, 0x01,\n\t0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,\n\t0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6e, 0x6f,\n\t0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x6f,\n\t0x74, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,\n\t0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,\n\t0x0e, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,\n\t0x3d, 0x0a, 0x0d, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n\t0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n\t0x52, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x37,\n\t0x0a, 0x0b, 0x67, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,\n\t0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53,\n\t0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c,\n\t0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,\n\t0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,\n\t0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74,\n\t0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x74,\n\t0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e,\n\t0x65, 0x77, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x65, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x49, 0x73, 0x73, 0x75, 0x65, 0x55, 0x72, 0x69, 0x12,\n\t0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x5f, 0x75, 0x72, 0x69, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75,\n\t0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x24, 0x0a, 0x0e,\n\t0x61, 0x70, 0x69, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x67,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, 0x69, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61,\n\t0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x61, 0x62,\n\t0x65, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,\n\t0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e,\n\t0x65, 0x72, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18,\n\t0x69, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72,\n\t0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x64,\n\t0x6f, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x6a, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x63, 0x54, 0x61, 0x67, 0x50, 0x72, 0x65, 0x66, 0x69,\n\t0x78, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,\n\t0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x10,\n\t0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,\n\t0x18, 0x6d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72,\n\t0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61,\n\t0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x21, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f,\n\t0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18,\n\t0x6e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x66, 0x65,\n\t0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,\n\t0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65,\n\t0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x1d, 0x72, 0x65, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f,\n\t0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x22, 0x9a,\n\t0x02, 0x0a, 0x0c, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,\n\t0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61,\n\t0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72,\n\t0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18,\n\t0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,\n\t0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,\n\t0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65,\n\t0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,\n\t0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d,\n\t0x6d, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e,\n\t0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63,\n\t0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,\n\t0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,\n\t0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0b, 0x43,\n\t0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f,\n\t0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61,\n\t0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06,\n\t0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74,\n\t0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,\n\t0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,\n\t0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,\n\t0x6e, 0x22, 0x87, 0x03, 0x0a, 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74,\n\t0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,\n\t0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,\n\t0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,\n\t0x12, 0x64, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c,\n\t0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,\n\t0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74,\n\t0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x65,\n\t0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,\n\t0x52, 0x14, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65,\n\t0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0xd2, 0x01, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x65, 0x72,\n\t0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12,\n\t0x31, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6f,\n\t0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12,\n\t0x72, 0x65, 0x73, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6f, 0x45, 0x6e, 0x61, 0x62, 0x6c,\n\t0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70,\n\t0x79, 0x74, 0x68, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x65, 0x6e,\n\t0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x69, 0x63, 0x54, 0x79, 0x70,\n\t0x65, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x75, 0x6e, 0x76,\n\t0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,\n\t0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,\n\t0x1a, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b,\n\t0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x0c, 0x4e,\n\t0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63,\n\t0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c,\n\t0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,\n\t0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xae, 0x04, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e,\n\t0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f,\n\t0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61,\n\t0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06,\n\t0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65,\n\t0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,\n\t0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f,\n\t0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e,\n\t0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72,\n\t0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65,\n\t0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65,\n\t0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,\n\t0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73,\n\t0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x67,\n\t0x6e, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38,\n\t0x0a, 0x18, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,\n\t0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09,\n\t0x52, 0x16, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,\n\t0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x16, 0x68, 0x61, 0x6e, 0x64,\n\t0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,\n\t0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72,\n\t0x69, 0x74, 0x74, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a,\n\t0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,\n\t0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,\n\t0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,\n\t0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,\n\t0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,\n\t0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x75, 0x62, 0x79,\n\t0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,\n\t0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67,\n\t0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f,\n\t0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69,\n\t0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,\n\t0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53,\n\t0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,\n\t0x56, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,\n\t0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,\n\t0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53,\n\t0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d,\n\t0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,\n\t0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,\n\t0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x03, 0x0a, 0x0e,\n\t0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a,\n\t0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f,\n\t0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,\n\t0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65,\n\t0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e,\n\t0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75,\n\t0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x6f,\n\t0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03,\n\t0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61,\n\t0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x94, 0x02, 0x0a, 0x0b, 0x4c, 0x6f,\n\t0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x12, 0x69, 0x6e, 0x69,\n\t0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,\n\t0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c,\n\t0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79,\n\t0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x75, 0x6c, 0x74,\n\t0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f,\n\t0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,\n\t0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x6f,\n\t0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c,\n\t0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20,\n\t0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10,\n\t0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,\n\t0x22, 0x75, 0x0a, 0x18, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x70,\n\t0x69, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,\n\t0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d,\n\t0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,\n\t0x74, 0x65, 0x5f, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x6e,\n\t0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x67, 0x65,\n\t0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x41, 0x73, 0x49,\n\t0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65,\n\t0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f,\n\t0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41,\n\t0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,\n\t0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a,\n\t0x03, 0x41, 0x44, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53,\n\t0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45,\n\t0x57, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10,\n\t0x05, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45,\n\t0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a,\n\t0x18, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65,\n\t0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49,\n\t0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54,\n\t0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,\n\t0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10,\n\t0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e,\n\t0x41, 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,\n\t0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74,\n\t0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28,\n\t0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,\n\t0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f,\n\t0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61,\n\t0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68,\n\t0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x44, 0x0a, 0x0b,\n\t0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f,\n\t0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65,\n\t0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xba, 0xab,\n\t0xfa, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x42, 0x69, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74,\n\t0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61,\n\t0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,\n\t0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_client_proto_rawDescOnce sync.Once\n\tfile_google_api_client_proto_rawDescData = file_google_api_client_proto_rawDesc\n)\n\nfunc file_google_api_client_proto_rawDescGZIP() []byte {\n\tfile_google_api_client_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_client_proto_rawDescData)\n\t})\n\treturn file_google_api_client_proto_rawDescData\n}\n\nvar file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 19)\nvar file_google_api_client_proto_goTypes = []interface{}{\n\t(ClientLibraryOrganization)(0),              // 0: google.api.ClientLibraryOrganization\n\t(ClientLibraryDestination)(0),               // 1: google.api.ClientLibraryDestination\n\t(*CommonLanguageSettings)(nil),              // 2: google.api.CommonLanguageSettings\n\t(*ClientLibrarySettings)(nil),               // 3: google.api.ClientLibrarySettings\n\t(*Publishing)(nil),                          // 4: google.api.Publishing\n\t(*JavaSettings)(nil),                        // 5: google.api.JavaSettings\n\t(*CppSettings)(nil),                         // 6: google.api.CppSettings\n\t(*PhpSettings)(nil),                         // 7: google.api.PhpSettings\n\t(*PythonSettings)(nil),                      // 8: google.api.PythonSettings\n\t(*NodeSettings)(nil),                        // 9: google.api.NodeSettings\n\t(*DotnetSettings)(nil),                      // 10: google.api.DotnetSettings\n\t(*RubySettings)(nil),                        // 11: google.api.RubySettings\n\t(*GoSettings)(nil),                          // 12: google.api.GoSettings\n\t(*MethodSettings)(nil),                      // 13: google.api.MethodSettings\n\t(*SelectiveGapicGeneration)(nil),            // 14: google.api.SelectiveGapicGeneration\n\tnil,                                         // 15: google.api.JavaSettings.ServiceClassNamesEntry\n\t(*PythonSettings_ExperimentalFeatures)(nil), // 16: google.api.PythonSettings.ExperimentalFeatures\n\tnil,                                 // 17: google.api.DotnetSettings.RenamedServicesEntry\n\tnil,                                 // 18: google.api.DotnetSettings.RenamedResourcesEntry\n\tnil,                                 // 19: google.api.GoSettings.RenamedServicesEntry\n\t(*MethodSettings_LongRunning)(nil),  // 20: google.api.MethodSettings.LongRunning\n\t(api.LaunchStage)(0),                // 21: google.api.LaunchStage\n\t(*durationpb.Duration)(nil),         // 22: google.protobuf.Duration\n\t(*descriptorpb.MethodOptions)(nil),  // 23: google.protobuf.MethodOptions\n\t(*descriptorpb.ServiceOptions)(nil), // 24: google.protobuf.ServiceOptions\n}\nvar file_google_api_client_proto_depIdxs = []int32{\n\t1,  // 0: google.api.CommonLanguageSettings.destinations:type_name -> google.api.ClientLibraryDestination\n\t14, // 1: google.api.CommonLanguageSettings.selective_gapic_generation:type_name -> google.api.SelectiveGapicGeneration\n\t21, // 2: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage\n\t5,  // 3: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings\n\t6,  // 4: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings\n\t7,  // 5: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings\n\t8,  // 6: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings\n\t9,  // 7: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings\n\t10, // 8: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings\n\t11, // 9: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings\n\t12, // 10: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings\n\t13, // 11: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings\n\t0,  // 12: google.api.Publishing.organization:type_name -> google.api.ClientLibraryOrganization\n\t3,  // 13: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings\n\t15, // 14: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry\n\t2,  // 15: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings\n\t2,  // 16: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings\n\t2,  // 17: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings\n\t2,  // 18: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings\n\t16, // 19: google.api.PythonSettings.experimental_features:type_name -> google.api.PythonSettings.ExperimentalFeatures\n\t2,  // 20: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings\n\t2,  // 21: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings\n\t17, // 22: google.api.DotnetSettings.renamed_services:type_name -> google.api.DotnetSettings.RenamedServicesEntry\n\t18, // 23: google.api.DotnetSettings.renamed_resources:type_name -> google.api.DotnetSettings.RenamedResourcesEntry\n\t2,  // 24: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings\n\t2,  // 25: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings\n\t19, // 26: google.api.GoSettings.renamed_services:type_name -> google.api.GoSettings.RenamedServicesEntry\n\t20, // 27: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning\n\t22, // 28: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration\n\t22, // 29: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration\n\t22, // 30: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration\n\t23, // 31: google.api.method_signature:extendee -> google.protobuf.MethodOptions\n\t24, // 32: google.api.default_host:extendee -> google.protobuf.ServiceOptions\n\t24, // 33: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions\n\t24, // 34: google.api.api_version:extendee -> google.protobuf.ServiceOptions\n\t35, // [35:35] is the sub-list for method output_type\n\t35, // [35:35] is the sub-list for method input_type\n\t35, // [35:35] is the sub-list for extension type_name\n\t31, // [31:35] is the sub-list for extension extendee\n\t0,  // [0:31] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_client_proto_init() }\nfunc file_google_api_client_proto_init() {\n\tif File_google_api_client_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CommonLanguageSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ClientLibrarySettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Publishing); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*JavaSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CppSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PhpSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PythonSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*NodeSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*DotnetSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RubySettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*GoSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*MethodSettings); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*SelectiveGapicGeneration); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*PythonSettings_ExperimentalFeatures); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_client_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*MethodSettings_LongRunning); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_client_proto_rawDesc,\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   19,\n\t\t\tNumExtensions: 4,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_client_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_client_proto_depIdxs,\n\t\tEnumInfos:         file_google_api_client_proto_enumTypes,\n\t\tMessageInfos:      file_google_api_client_proto_msgTypes,\n\t\tExtensionInfos:    file_google_api_client_proto_extTypes,\n\t}.Build()\n\tFile_google_api_client_proto = out.File\n\tfile_google_api_client_proto_rawDesc = nil\n\tfile_google_api_client_proto_goTypes = nil\n\tfile_google_api_client_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/field_behavior.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// An indicator of the behavior of a given field (for example, that a field\n// is required in requests, or given as output but ignored as input).\n// This **does not** change the behavior in protocol buffers itself; it only\n// denotes the behavior and may affect how API tooling handles the field.\n//\n// Note: This enum **may** receive new values in the future.\ntype FieldBehavior int32\n\nconst (\n\t// Conventional default for enums. Do not use this.\n\tFieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0\n\t// Specifically denotes a field as optional.\n\t// While all fields in protocol buffers are optional, this may be specified\n\t// for emphasis if appropriate.\n\tFieldBehavior_OPTIONAL FieldBehavior = 1\n\t// Denotes a field as required.\n\t// This indicates that the field **must** be provided as part of the request,\n\t// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).\n\tFieldBehavior_REQUIRED FieldBehavior = 2\n\t// Denotes a field as output only.\n\t// This indicates that the field is provided in responses, but including the\n\t// field in a request does nothing (the server *must* ignore it and\n\t// *must not* throw an error as a result of the field's presence).\n\tFieldBehavior_OUTPUT_ONLY FieldBehavior = 3\n\t// Denotes a field as input only.\n\t// This indicates that the field is provided in requests, and the\n\t// corresponding field is not included in output.\n\tFieldBehavior_INPUT_ONLY FieldBehavior = 4\n\t// Denotes a field as immutable.\n\t// This indicates that the field may be set once in a request to create a\n\t// resource, but may not be changed thereafter.\n\tFieldBehavior_IMMUTABLE FieldBehavior = 5\n\t// Denotes that a (repeated) field is an unordered list.\n\t// This indicates that the service may provide the elements of the list\n\t// in any arbitrary  order, rather than the order the user originally\n\t// provided. Additionally, the list's order may or may not be stable.\n\tFieldBehavior_UNORDERED_LIST FieldBehavior = 6\n\t// Denotes that this field returns a non-empty default value if not set.\n\t// This indicates that if the user provides the empty value in a request,\n\t// a non-empty value will be returned. The user will not be aware of what\n\t// non-empty value to expect.\n\tFieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7\n\t// Denotes that the field in a resource (a message annotated with\n\t// google.api.resource) is used in the resource name to uniquely identify the\n\t// resource. For AIP-compliant APIs, this should only be applied to the\n\t// `name` field on the resource.\n\t//\n\t// This behavior should not be applied to references to other resources within\n\t// the message.\n\t//\n\t// The identifier field of resources often have different field behavior\n\t// depending on the request it is embedded in (e.g. for Create methods name\n\t// is optional and unused, while for Update methods it is required). Instead\n\t// of method-specific annotations, only `IDENTIFIER` is required.\n\tFieldBehavior_IDENTIFIER FieldBehavior = 8\n)\n\n// Enum value maps for FieldBehavior.\nvar (\n\tFieldBehavior_name = map[int32]string{\n\t\t0: \"FIELD_BEHAVIOR_UNSPECIFIED\",\n\t\t1: \"OPTIONAL\",\n\t\t2: \"REQUIRED\",\n\t\t3: \"OUTPUT_ONLY\",\n\t\t4: \"INPUT_ONLY\",\n\t\t5: \"IMMUTABLE\",\n\t\t6: \"UNORDERED_LIST\",\n\t\t7: \"NON_EMPTY_DEFAULT\",\n\t\t8: \"IDENTIFIER\",\n\t}\n\tFieldBehavior_value = map[string]int32{\n\t\t\"FIELD_BEHAVIOR_UNSPECIFIED\": 0,\n\t\t\"OPTIONAL\":                   1,\n\t\t\"REQUIRED\":                   2,\n\t\t\"OUTPUT_ONLY\":                3,\n\t\t\"INPUT_ONLY\":                 4,\n\t\t\"IMMUTABLE\":                  5,\n\t\t\"UNORDERED_LIST\":             6,\n\t\t\"NON_EMPTY_DEFAULT\":          7,\n\t\t\"IDENTIFIER\":                 8,\n\t}\n)\n\nfunc (x FieldBehavior) Enum() *FieldBehavior {\n\tp := new(FieldBehavior)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldBehavior) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldBehavior) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_field_behavior_proto_enumTypes[0].Descriptor()\n}\n\nfunc (FieldBehavior) Type() protoreflect.EnumType {\n\treturn &file_google_api_field_behavior_proto_enumTypes[0]\n}\n\nfunc (x FieldBehavior) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use FieldBehavior.Descriptor instead.\nfunc (FieldBehavior) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_field_behavior_proto_rawDescGZIP(), []int{0}\n}\n\nvar file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.FieldOptions)(nil),\n\t\tExtensionType: ([]FieldBehavior)(nil),\n\t\tField:         1052,\n\t\tName:          \"google.api.field_behavior\",\n\t\tTag:           \"varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior\",\n\t\tFilename:      \"google/api/field_behavior.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.FieldOptions.\nvar (\n\t// A designation of a specific field behavior (required, output only, etc.)\n\t// in protobuf messages.\n\t//\n\t// Examples:\n\t//\n\t//\tstring name = 1 [(google.api.field_behavior) = REQUIRED];\n\t//\tState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];\n\t//\tgoogle.protobuf.Duration ttl = 1\n\t//\t  [(google.api.field_behavior) = INPUT_ONLY];\n\t//\tgoogle.protobuf.Timestamp expire_time = 1\n\t//\t  [(google.api.field_behavior) = OUTPUT_ONLY,\n\t//\t   (google.api.field_behavior) = IMMUTABLE];\n\t//\n\t// repeated google.api.FieldBehavior field_behavior = 1052;\n\tE_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0]\n)\n\nvar File_google_api_field_behavior_proto protoreflect.FileDescriptor\n\nvar file_google_api_field_behavior_proto_rawDesc = []byte{\n\t0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,\n\t0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64,\n\t0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a,\n\t0xb6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f,\n\t0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56,\n\t0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,\n\t0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12,\n\t0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a,\n\t0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e,\n\t0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d,\n\t0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a,\n\t0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10,\n\t0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44,\n\t0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4e,\n\t0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x08, 0x3a, 0x64, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c,\n\t0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,\n\t0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e,\n\t0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,\n\t0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x02, 0x10, 0x00, 0x52,\n\t0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70,\n\t0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,\n\t0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50,\n\t0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67,\n\t0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70,\n\t0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e,\n\t0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49,\n\t0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_field_behavior_proto_rawDescOnce sync.Once\n\tfile_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc\n)\n\nfunc file_google_api_field_behavior_proto_rawDescGZIP() []byte {\n\tfile_google_api_field_behavior_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData)\n\t})\n\treturn file_google_api_field_behavior_proto_rawDescData\n}\n\nvar file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_google_api_field_behavior_proto_goTypes = []interface{}{\n\t(FieldBehavior)(0),                // 0: google.api.FieldBehavior\n\t(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions\n}\nvar file_google_api_field_behavior_proto_depIdxs = []int32{\n\t1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions\n\t0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior\n\t2, // [2:2] is the sub-list for method output_type\n\t2, // [2:2] is the sub-list for method input_type\n\t1, // [1:2] is the sub-list for extension type_name\n\t0, // [0:1] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_field_behavior_proto_init() }\nfunc file_google_api_field_behavior_proto_init() {\n\tif File_google_api_field_behavior_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_field_behavior_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 1,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_field_behavior_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_field_behavior_proto_depIdxs,\n\t\tEnumInfos:         file_google_api_field_behavior_proto_enumTypes,\n\t\tExtensionInfos:    file_google_api_field_behavior_proto_extTypes,\n\t}.Build()\n\tFile_google_api_field_behavior_proto = out.File\n\tfile_google_api_field_behavior_proto_rawDesc = nil\n\tfile_google_api_field_behavior_proto_goTypes = nil\n\tfile_google_api_field_behavior_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/field_info.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The standard format of a field value. The supported formats are all backed\n// by either an RFC defined by the IETF or a Google-defined AIP.\ntype FieldInfo_Format int32\n\nconst (\n\t// Default, unspecified value.\n\tFieldInfo_FORMAT_UNSPECIFIED FieldInfo_Format = 0\n\t// Universally Unique Identifier, version 4, value as defined by\n\t// https://datatracker.ietf.org/doc/html/rfc4122. The value may be\n\t// normalized to entirely lowercase letters. For example, the value\n\t// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to\n\t// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.\n\tFieldInfo_UUID4 FieldInfo_Format = 1\n\t// Internet Protocol v4 value as defined by [RFC\n\t// 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be\n\t// condensed, with leading zeros in each octet stripped. For example,\n\t// `001.022.233.040` would be condensed to `1.22.233.40`.\n\tFieldInfo_IPV4 FieldInfo_Format = 2\n\t// Internet Protocol v6 value as defined by [RFC\n\t// 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be\n\t// normalized to entirely lowercase letters with zeros compressed, following\n\t// [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,\n\t// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.\n\tFieldInfo_IPV6 FieldInfo_Format = 3\n\t// An IP address in either v4 or v6 format as described by the individual\n\t// values defined herein. See the comments on the IPV4 and IPV6 types for\n\t// allowed normalizations of each.\n\tFieldInfo_IPV4_OR_IPV6 FieldInfo_Format = 4\n)\n\n// Enum value maps for FieldInfo_Format.\nvar (\n\tFieldInfo_Format_name = map[int32]string{\n\t\t0: \"FORMAT_UNSPECIFIED\",\n\t\t1: \"UUID4\",\n\t\t2: \"IPV4\",\n\t\t3: \"IPV6\",\n\t\t4: \"IPV4_OR_IPV6\",\n\t}\n\tFieldInfo_Format_value = map[string]int32{\n\t\t\"FORMAT_UNSPECIFIED\": 0,\n\t\t\"UUID4\":              1,\n\t\t\"IPV4\":               2,\n\t\t\"IPV6\":               3,\n\t\t\"IPV4_OR_IPV6\":       4,\n\t}\n)\n\nfunc (x FieldInfo_Format) Enum() *FieldInfo_Format {\n\tp := new(FieldInfo_Format)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldInfo_Format) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldInfo_Format) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_field_info_proto_enumTypes[0].Descriptor()\n}\n\nfunc (FieldInfo_Format) Type() protoreflect.EnumType {\n\treturn &file_google_api_field_info_proto_enumTypes[0]\n}\n\nfunc (x FieldInfo_Format) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use FieldInfo_Format.Descriptor instead.\nfunc (FieldInfo_Format) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_field_info_proto_rawDescGZIP(), []int{0, 0}\n}\n\n// Rich semantic information of an API field beyond basic typing.\ntype FieldInfo struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The standard format of a field value. This does not explicitly configure\n\t// any API consumer, just documents the API's format for the field it is\n\t// applied to.\n\tFormat FieldInfo_Format `protobuf:\"varint,1,opt,name=format,proto3,enum=google.api.FieldInfo_Format\" json:\"format,omitempty\"`\n\t// The type(s) that the annotated, generic field may represent.\n\t//\n\t// Currently, this must only be used on fields of type `google.protobuf.Any`.\n\t// Supporting other generic types may be considered in the future.\n\tReferencedTypes []*TypeReference `protobuf:\"bytes,2,rep,name=referenced_types,json=referencedTypes,proto3\" json:\"referenced_types,omitempty\"`\n}\n\nfunc (x *FieldInfo) Reset() {\n\t*x = FieldInfo{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_field_info_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *FieldInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FieldInfo) ProtoMessage() {}\n\nfunc (x *FieldInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_field_info_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FieldInfo.ProtoReflect.Descriptor instead.\nfunc (*FieldInfo) Descriptor() ([]byte, []int) {\n\treturn file_google_api_field_info_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *FieldInfo) GetFormat() FieldInfo_Format {\n\tif x != nil {\n\t\treturn x.Format\n\t}\n\treturn FieldInfo_FORMAT_UNSPECIFIED\n}\n\nfunc (x *FieldInfo) GetReferencedTypes() []*TypeReference {\n\tif x != nil {\n\t\treturn x.ReferencedTypes\n\t}\n\treturn nil\n}\n\n// A reference to a message type, for use in [FieldInfo][google.api.FieldInfo].\ntype TypeReference struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of the type that the annotated, generic field may represent.\n\t// If the type is in the same protobuf package, the value can be the simple\n\t// message name e.g., `\"MyMessage\"`. Otherwise, the value must be the\n\t// fully-qualified message name e.g., `\"google.library.v1.Book\"`.\n\t//\n\t// If the type(s) are unknown to the service (e.g. the field accepts generic\n\t// user input), use the wildcard `\"*\"` to denote this behavior.\n\t//\n\t// See [AIP-202](https://google.aip.dev/202#type-references) for more details.\n\tTypeName string `protobuf:\"bytes,1,opt,name=type_name,json=typeName,proto3\" json:\"type_name,omitempty\"`\n}\n\nfunc (x *TypeReference) Reset() {\n\t*x = TypeReference{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_field_info_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *TypeReference) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*TypeReference) ProtoMessage() {}\n\nfunc (x *TypeReference) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_field_info_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use TypeReference.ProtoReflect.Descriptor instead.\nfunc (*TypeReference) Descriptor() ([]byte, []int) {\n\treturn file_google_api_field_info_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *TypeReference) GetTypeName() string {\n\tif x != nil {\n\t\treturn x.TypeName\n\t}\n\treturn \"\"\n}\n\nvar file_google_api_field_info_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.FieldOptions)(nil),\n\t\tExtensionType: (*FieldInfo)(nil),\n\t\tField:         291403980,\n\t\tName:          \"google.api.field_info\",\n\t\tTag:           \"bytes,291403980,opt,name=field_info\",\n\t\tFilename:      \"google/api/field_info.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.FieldOptions.\nvar (\n\t// Rich semantic descriptor of an API field beyond the basic typing.\n\t//\n\t// Examples:\n\t//\n\t//\tstring request_id = 1 [(google.api.field_info).format = UUID4];\n\t//\tstring old_ip_address = 2 [(google.api.field_info).format = IPV4];\n\t//\tstring new_ip_address = 3 [(google.api.field_info).format = IPV6];\n\t//\tstring actual_ip_address = 4 [\n\t//\t  (google.api.field_info).format = IPV4_OR_IPV6\n\t//\t];\n\t//\tgoogle.protobuf.Any generic_field = 5 [\n\t//\t  (google.api.field_info).referenced_types = {type_name: \"ActualType\"},\n\t//\t  (google.api.field_info).referenced_types = {type_name: \"OtherType\"},\n\t//\t];\n\t//\tgoogle.protobuf.Any generic_user_input = 5 [\n\t//\t  (google.api.field_info).referenced_types = {type_name: \"*\"},\n\t//\t];\n\t//\n\t// optional google.api.FieldInfo field_info = 291403980;\n\tE_FieldInfo = &file_google_api_field_info_proto_extTypes[0]\n)\n\nvar File_google_api_field_info_proto protoreflect.FileDescriptor\n\nvar file_google_api_field_info_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,\n\t0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,\n\t0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, 0x09,\n\t0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72,\n\t0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,\n\t0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,\n\t0x44, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x79,\n\t0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72,\n\t0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64,\n\t0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,\n\t0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,\n\t0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x55, 0x49, 0x44, 0x34,\n\t0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04,\n\t0x49, 0x50, 0x56, 0x36, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x50, 0x56, 0x34, 0x5f, 0x4f,\n\t0x52, 0x5f, 0x49, 0x50, 0x56, 0x36, 0x10, 0x04, 0x22, 0x2c, 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65,\n\t0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70,\n\t0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79,\n\t0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x57, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,\n\t0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x18, 0xcc, 0xf1, 0xf9, 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,\n\t0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42,\n\t0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,\n\t0x69, 0x42, 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74,\n\t0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61,\n\t0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,\n\t0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,\n\t0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_field_info_proto_rawDescOnce sync.Once\n\tfile_google_api_field_info_proto_rawDescData = file_google_api_field_info_proto_rawDesc\n)\n\nfunc file_google_api_field_info_proto_rawDescGZIP() []byte {\n\tfile_google_api_field_info_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_field_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_info_proto_rawDescData)\n\t})\n\treturn file_google_api_field_info_proto_rawDescData\n}\n\nvar file_google_api_field_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_google_api_field_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_google_api_field_info_proto_goTypes = []interface{}{\n\t(FieldInfo_Format)(0),             // 0: google.api.FieldInfo.Format\n\t(*FieldInfo)(nil),                 // 1: google.api.FieldInfo\n\t(*TypeReference)(nil),             // 2: google.api.TypeReference\n\t(*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions\n}\nvar file_google_api_field_info_proto_depIdxs = []int32{\n\t0, // 0: google.api.FieldInfo.format:type_name -> google.api.FieldInfo.Format\n\t2, // 1: google.api.FieldInfo.referenced_types:type_name -> google.api.TypeReference\n\t3, // 2: google.api.field_info:extendee -> google.protobuf.FieldOptions\n\t1, // 3: google.api.field_info:type_name -> google.api.FieldInfo\n\t4, // [4:4] is the sub-list for method output_type\n\t4, // [4:4] is the sub-list for method input_type\n\t3, // [3:4] is the sub-list for extension type_name\n\t2, // [2:3] is the sub-list for extension extendee\n\t0, // [0:2] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_field_info_proto_init() }\nfunc file_google_api_field_info_proto_init() {\n\tif File_google_api_field_info_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_api_field_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*FieldInfo); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_field_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*TypeReference); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_field_info_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   2,\n\t\t\tNumExtensions: 1,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_field_info_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_field_info_proto_depIdxs,\n\t\tEnumInfos:         file_google_api_field_info_proto_enumTypes,\n\t\tMessageInfos:      file_google_api_field_info_proto_msgTypes,\n\t\tExtensionInfos:    file_google_api_field_info_proto_extTypes,\n\t}.Build()\n\tFile_google_api_field_info_proto = out.File\n\tfile_google_api_field_info_proto_rawDesc = nil\n\tfile_google_api_field_info_proto_goTypes = nil\n\tfile_google_api_field_info_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/http.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Defines the HTTP configuration for an API service. It contains a list of\n// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method\n// to one or more HTTP REST API methods.\ntype Http struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// A list of HTTP configuration rules that apply to individual API methods.\n\t//\n\t// **NOTE:** All service configuration rules follow \"last one wins\" order.\n\tRules []*HttpRule `protobuf:\"bytes,1,rep,name=rules,proto3\" json:\"rules,omitempty\"`\n\t// When set to true, URL path parameters will be fully URI-decoded except in\n\t// cases of single segment matches in reserved expansion, where \"%2F\" will be\n\t// left encoded.\n\t//\n\t// The default behavior is to not decode RFC 6570 reserved characters in multi\n\t// segment matches.\n\tFullyDecodeReservedExpansion bool `protobuf:\"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3\" json:\"fully_decode_reserved_expansion,omitempty\"`\n}\n\nfunc (x *Http) Reset() {\n\t*x = Http{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_http_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Http) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Http) ProtoMessage() {}\n\nfunc (x *Http) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_http_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Http.ProtoReflect.Descriptor instead.\nfunc (*Http) Descriptor() ([]byte, []int) {\n\treturn file_google_api_http_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Http) GetRules() []*HttpRule {\n\tif x != nil {\n\t\treturn x.Rules\n\t}\n\treturn nil\n}\n\nfunc (x *Http) GetFullyDecodeReservedExpansion() bool {\n\tif x != nil {\n\t\treturn x.FullyDecodeReservedExpansion\n\t}\n\treturn false\n}\n\n// gRPC Transcoding\n//\n// gRPC Transcoding is a feature for mapping between a gRPC method and one or\n// more HTTP REST endpoints. It allows developers to build a single API service\n// that supports both gRPC APIs and REST APIs. Many systems, including [Google\n// APIs](https://github.com/googleapis/googleapis),\n// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\n// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),\n// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\n// and use it for large scale production services.\n//\n// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\n// how different portions of the gRPC request message are mapped to the URL\n// path, URL query parameters, and HTTP request body. It also controls how the\n// gRPC response message is mapped to the HTTP response body. `HttpRule` is\n// typically specified as an `google.api.http` annotation on the gRPC method.\n//\n// Each mapping specifies a URL path template and an HTTP method. The path\n// template may refer to one or more fields in the gRPC request message, as long\n// as each field is a non-repeated field with a primitive (non-message) type.\n// The path template controls how fields of the request message are mapped to\n// the URL path.\n//\n// Example:\n//\n//\tservice Messaging {\n//\t  rpc GetMessage(GetMessageRequest) returns (Message) {\n//\t    option (google.api.http) = {\n//\t        get: \"/v1/{name=messages/*}\"\n//\t    };\n//\t  }\n//\t}\n//\tmessage GetMessageRequest {\n//\t  string name = 1; // Mapped to URL path.\n//\t}\n//\tmessage Message {\n//\t  string text = 1; // The resource content.\n//\t}\n//\n// This enables an HTTP REST to gRPC mapping as below:\n//\n// - HTTP: `GET /v1/messages/123456`\n// - gRPC: `GetMessage(name: \"messages/123456\")`\n//\n// Any fields in the request message which are not bound by the path template\n// automatically become HTTP query parameters if there is no HTTP request body.\n// For example:\n//\n//\tservice Messaging {\n//\t  rpc GetMessage(GetMessageRequest) returns (Message) {\n//\t    option (google.api.http) = {\n//\t        get:\"/v1/messages/{message_id}\"\n//\t    };\n//\t  }\n//\t}\n//\tmessage GetMessageRequest {\n//\t  message SubMessage {\n//\t    string subfield = 1;\n//\t  }\n//\t  string message_id = 1; // Mapped to URL path.\n//\t  int64 revision = 2;    // Mapped to URL query parameter `revision`.\n//\t  SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.\n//\t}\n//\n// This enables a HTTP JSON to RPC mapping as below:\n//\n// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`\n// - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub:\n// SubMessage(subfield: \"foo\"))`\n//\n// Note that fields which are mapped to URL query parameters must have a\n// primitive type or a repeated primitive type or a non-repeated message type.\n// In the case of a repeated type, the parameter can be repeated in the URL\n// as `...?param=A&param=B`. In the case of a message type, each field of the\n// message is mapped to a separate parameter, such as\n// `...?foo.a=A&foo.b=B&foo.c=C`.\n//\n// For HTTP methods that allow a request body, the `body` field\n// specifies the mapping. Consider a REST update method on the\n// message resource collection:\n//\n//\tservice Messaging {\n//\t  rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n//\t    option (google.api.http) = {\n//\t      patch: \"/v1/messages/{message_id}\"\n//\t      body: \"message\"\n//\t    };\n//\t  }\n//\t}\n//\tmessage UpdateMessageRequest {\n//\t  string message_id = 1; // mapped to the URL\n//\t  Message message = 2;   // mapped to the body\n//\t}\n//\n// The following HTTP JSON to RPC mapping is enabled, where the\n// representation of the JSON in the request body is determined by\n// protos JSON encoding:\n//\n// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n// - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n//\n// The special name `*` can be used in the body mapping to define that\n// every field not bound by the path template should be mapped to the\n// request body.  This enables the following alternative definition of\n// the update method:\n//\n//\tservice Messaging {\n//\t  rpc UpdateMessage(Message) returns (Message) {\n//\t    option (google.api.http) = {\n//\t      patch: \"/v1/messages/{message_id}\"\n//\t      body: \"*\"\n//\t    };\n//\t  }\n//\t}\n//\tmessage Message {\n//\t  string message_id = 1;\n//\t  string text = 2;\n//\t}\n//\n// The following HTTP JSON to RPC mapping is enabled:\n//\n// - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }`\n// - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n//\n// Note that when using `*` in the body mapping, it is not possible to\n// have HTTP parameters, as all fields not bound by the path end in\n// the body. This makes this option more rarely used in practice when\n// defining REST APIs. The common usage of `*` is in custom methods\n// which don't use the URL at all for transferring data.\n//\n// It is possible to define multiple HTTP methods for one RPC by using\n// the `additional_bindings` option. Example:\n//\n//\tservice Messaging {\n//\t  rpc GetMessage(GetMessageRequest) returns (Message) {\n//\t    option (google.api.http) = {\n//\t      get: \"/v1/messages/{message_id}\"\n//\t      additional_bindings {\n//\t        get: \"/v1/users/{user_id}/messages/{message_id}\"\n//\t      }\n//\t    };\n//\t  }\n//\t}\n//\tmessage GetMessageRequest {\n//\t  string message_id = 1;\n//\t  string user_id = 2;\n//\t}\n//\n// This enables the following two alternative HTTP JSON to RPC mappings:\n//\n// - HTTP: `GET /v1/messages/123456`\n// - gRPC: `GetMessage(message_id: \"123456\")`\n//\n// - HTTP: `GET /v1/users/me/messages/123456`\n// - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")`\n//\n// # Rules for HTTP mapping\n//\n//  1. Leaf request fields (recursive expansion nested messages in the request\n//     message) are classified into three categories:\n//     - Fields referred by the path template. They are passed via the URL path.\n//     - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They\n//     are passed via the HTTP\n//     request body.\n//     - All other fields are passed via the URL query parameters, and the\n//     parameter name is the field path in the request message. A repeated\n//     field can be represented as multiple query parameters under the same\n//     name.\n//  2. If [HttpRule.body][google.api.HttpRule.body] is \"*\", there is no URL\n//     query parameter, all fields\n//     are passed via URL path and HTTP request body.\n//  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP\n//     request body, all\n//     fields are passed via URL path and URL query parameters.\n//\n// Path template syntax\n//\n//\tTemplate = \"/\" Segments [ Verb ] ;\n//\tSegments = Segment { \"/\" Segment } ;\n//\tSegment  = \"*\" | \"**\" | LITERAL | Variable ;\n//\tVariable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n//\tFieldPath = IDENT { \".\" IDENT } ;\n//\tVerb     = \":\" LITERAL ;\n//\n// The syntax `*` matches a single URL path segment. The syntax `**` matches\n// zero or more URL path segments, which must be the last part of the URL path\n// except the `Verb`.\n//\n// The syntax `Variable` matches part of the URL path as specified by its\n// template. A variable template must not contain other variables. If a variable\n// matches a single path segment, its template may be omitted, e.g. `{var}`\n// is equivalent to `{var=*}`.\n//\n// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\n// contains any reserved character, such characters should be percent-encoded\n// before the matching.\n//\n// If a variable contains exactly one path segment, such as `\"{var}\"` or\n// `\"{var=*}\"`, when such a variable is expanded into a URL path on the client\n// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\n// server side does the reverse decoding. Such variables show up in the\n// [Discovery\n// Document](https://developers.google.com/discovery/v1/reference/apis) as\n// `{var}`.\n//\n// If a variable contains multiple path segments, such as `\"{var=foo/*}\"`\n// or `\"{var=**}\"`, when such a variable is expanded into a URL path on the\n// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\n// The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\n// unchanged. Such variables show up in the\n// [Discovery\n// Document](https://developers.google.com/discovery/v1/reference/apis) as\n// `{+var}`.\n//\n// # Using gRPC API Service Configuration\n//\n// gRPC API Service Configuration (service config) is a configuration language\n// for configuring a gRPC service to become a user-facing product. The\n// service config is simply the YAML representation of the `google.api.Service`\n// proto message.\n//\n// As an alternative to annotating your proto file, you can configure gRPC\n// transcoding in your service config YAML files. You do this by specifying a\n// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\n// effect as the proto annotation. This can be particularly useful if you\n// have a proto that is reused in multiple services. Note that any transcoding\n// specified in the service config will override any matching transcoding\n// configuration in the proto.\n//\n// The following example selects a gRPC method and applies an `HttpRule` to it:\n//\n//\thttp:\n//\t  rules:\n//\t    - selector: example.v1.Messaging.GetMessage\n//\t      get: /v1/messages/{message_id}/{sub.subfield}\n//\n// # Special notes\n//\n// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\n// proto to JSON conversion must follow the [proto3\n// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n//\n// While the single segment variable follows the semantics of\n// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\n// Expansion, the multi segment variable **does not** follow RFC 6570 Section\n// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\n// does not expand special characters like `?` and `#`, which would lead\n// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding\n// for multi segment variables.\n//\n// The path variables **must not** refer to any repeated or mapped field,\n// because client libraries are not capable of handling such variable expansion.\n//\n// The path variables **must not** capture the leading \"/\" character. The reason\n// is that the most common use case \"{var}\" does not capture the leading \"/\"\n// character. For consistency, all path variables must share the same behavior.\n//\n// Repeated message fields must not be mapped to URL query parameters, because\n// no client library can support such complicated mapping.\n//\n// If an API needs to use a JSON array for request or response body, it can map\n// the request or response body to a repeated field. However, some gRPC\n// Transcoding implementations may not support this feature.\ntype HttpRule struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// Selects a method to which this rule applies.\n\t//\n\t// Refer to [selector][google.api.DocumentationRule.selector] for syntax\n\t// details.\n\tSelector string `protobuf:\"bytes,1,opt,name=selector,proto3\" json:\"selector,omitempty\"`\n\t// Determines the URL pattern is matched by this rules. This pattern can be\n\t// used with any of the {get|put|post|delete|patch} methods. A custom method\n\t// can be defined using the 'custom' field.\n\t//\n\t// Types that are assignable to Pattern:\n\t//\n\t//\t*HttpRule_Get\n\t//\t*HttpRule_Put\n\t//\t*HttpRule_Post\n\t//\t*HttpRule_Delete\n\t//\t*HttpRule_Patch\n\t//\t*HttpRule_Custom\n\tPattern isHttpRule_Pattern `protobuf_oneof:\"pattern\"`\n\t// The name of the request field whose value is mapped to the HTTP request\n\t// body, or `*` for mapping all request fields not captured by the path\n\t// pattern to the HTTP body, or omitted for not having any HTTP request body.\n\t//\n\t// NOTE: the referred field must be present at the top-level of the request\n\t// message type.\n\tBody string `protobuf:\"bytes,7,opt,name=body,proto3\" json:\"body,omitempty\"`\n\t// Optional. The name of the response field whose value is mapped to the HTTP\n\t// response body. When omitted, the entire response message will be used\n\t// as the HTTP response body.\n\t//\n\t// NOTE: The referred field must be present at the top-level of the response\n\t// message type.\n\tResponseBody string `protobuf:\"bytes,12,opt,name=response_body,json=responseBody,proto3\" json:\"response_body,omitempty\"`\n\t// Additional HTTP bindings for the selector. Nested bindings must\n\t// not contain an `additional_bindings` field themselves (that is,\n\t// the nesting may only be one level deep).\n\tAdditionalBindings []*HttpRule `protobuf:\"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3\" json:\"additional_bindings,omitempty\"`\n}\n\nfunc (x *HttpRule) Reset() {\n\t*x = HttpRule{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_http_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *HttpRule) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*HttpRule) ProtoMessage() {}\n\nfunc (x *HttpRule) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_http_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use HttpRule.ProtoReflect.Descriptor instead.\nfunc (*HttpRule) Descriptor() ([]byte, []int) {\n\treturn file_google_api_http_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *HttpRule) GetSelector() string {\n\tif x != nil {\n\t\treturn x.Selector\n\t}\n\treturn \"\"\n}\n\nfunc (m *HttpRule) GetPattern() isHttpRule_Pattern {\n\tif m != nil {\n\t\treturn m.Pattern\n\t}\n\treturn nil\n}\n\nfunc (x *HttpRule) GetGet() string {\n\tif x, ok := x.GetPattern().(*HttpRule_Get); ok {\n\t\treturn x.Get\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetPut() string {\n\tif x, ok := x.GetPattern().(*HttpRule_Put); ok {\n\t\treturn x.Put\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetPost() string {\n\tif x, ok := x.GetPattern().(*HttpRule_Post); ok {\n\t\treturn x.Post\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetDelete() string {\n\tif x, ok := x.GetPattern().(*HttpRule_Delete); ok {\n\t\treturn x.Delete\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetPatch() string {\n\tif x, ok := x.GetPattern().(*HttpRule_Patch); ok {\n\t\treturn x.Patch\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetCustom() *CustomHttpPattern {\n\tif x, ok := x.GetPattern().(*HttpRule_Custom); ok {\n\t\treturn x.Custom\n\t}\n\treturn nil\n}\n\nfunc (x *HttpRule) GetBody() string {\n\tif x != nil {\n\t\treturn x.Body\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetResponseBody() string {\n\tif x != nil {\n\t\treturn x.ResponseBody\n\t}\n\treturn \"\"\n}\n\nfunc (x *HttpRule) GetAdditionalBindings() []*HttpRule {\n\tif x != nil {\n\t\treturn x.AdditionalBindings\n\t}\n\treturn nil\n}\n\ntype isHttpRule_Pattern interface {\n\tisHttpRule_Pattern()\n}\n\ntype HttpRule_Get struct {\n\t// Maps to HTTP GET. Used for listing and getting information about\n\t// resources.\n\tGet string `protobuf:\"bytes,2,opt,name=get,proto3,oneof\"`\n}\n\ntype HttpRule_Put struct {\n\t// Maps to HTTP PUT. Used for replacing a resource.\n\tPut string `protobuf:\"bytes,3,opt,name=put,proto3,oneof\"`\n}\n\ntype HttpRule_Post struct {\n\t// Maps to HTTP POST. Used for creating a resource or performing an action.\n\tPost string `protobuf:\"bytes,4,opt,name=post,proto3,oneof\"`\n}\n\ntype HttpRule_Delete struct {\n\t// Maps to HTTP DELETE. Used for deleting a resource.\n\tDelete string `protobuf:\"bytes,5,opt,name=delete,proto3,oneof\"`\n}\n\ntype HttpRule_Patch struct {\n\t// Maps to HTTP PATCH. Used for updating a resource.\n\tPatch string `protobuf:\"bytes,6,opt,name=patch,proto3,oneof\"`\n}\n\ntype HttpRule_Custom struct {\n\t// The custom pattern is used for specifying an HTTP method that is not\n\t// included in the `pattern` field, such as HEAD, or \"*\" to leave the\n\t// HTTP method unspecified for this rule. The wild-card rule is useful\n\t// for services that provide content to Web (HTML) clients.\n\tCustom *CustomHttpPattern `protobuf:\"bytes,8,opt,name=custom,proto3,oneof\"`\n}\n\nfunc (*HttpRule_Get) isHttpRule_Pattern() {}\n\nfunc (*HttpRule_Put) isHttpRule_Pattern() {}\n\nfunc (*HttpRule_Post) isHttpRule_Pattern() {}\n\nfunc (*HttpRule_Delete) isHttpRule_Pattern() {}\n\nfunc (*HttpRule_Patch) isHttpRule_Pattern() {}\n\nfunc (*HttpRule_Custom) isHttpRule_Pattern() {}\n\n// A custom pattern is used for defining custom HTTP verb.\ntype CustomHttpPattern struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The name of this custom HTTP verb.\n\tKind string `protobuf:\"bytes,1,opt,name=kind,proto3\" json:\"kind,omitempty\"`\n\t// The path matched by this custom verb.\n\tPath string `protobuf:\"bytes,2,opt,name=path,proto3\" json:\"path,omitempty\"`\n}\n\nfunc (x *CustomHttpPattern) Reset() {\n\t*x = CustomHttpPattern{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_http_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *CustomHttpPattern) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CustomHttpPattern) ProtoMessage() {}\n\nfunc (x *CustomHttpPattern) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_http_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead.\nfunc (*CustomHttpPattern) Descriptor() ([]byte, []int) {\n\treturn file_google_api_http_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *CustomHttpPattern) GetKind() string {\n\tif x != nil {\n\t\treturn x.Kind\n\t}\n\treturn \"\"\n}\n\nfunc (x *CustomHttpPattern) GetPath() string {\n\tif x != nil {\n\t\treturn x.Path\n\t}\n\treturn \"\"\n}\n\nvar File_google_api_http_proto protoreflect.FileDescriptor\n\nvar file_google_api_http_proto_rawDesc = []byte{\n\t0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74,\n\t0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72,\n\t0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65,\n\t0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79,\n\t0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,\n\t0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,\n\t0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73,\n\t0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda,\n\t0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73,\n\t0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73,\n\t0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70,\n\t0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12,\n\t0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,\n\t0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18,\n\t0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,\n\t0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,\n\t0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f,\n\t0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50,\n\t0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,\n\t0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,\n\t0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64,\n\t0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,\n\t0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64,\n\t0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,\n\t0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43,\n\t0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,\n\t0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,\n\t0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x67, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70,\n\t0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,\n\t0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61,\n\t0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61,\n\t0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50,\n\t0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_http_proto_rawDescOnce sync.Once\n\tfile_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc\n)\n\nfunc file_google_api_http_proto_rawDescGZIP() []byte {\n\tfile_google_api_http_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData)\n\t})\n\treturn file_google_api_http_proto_rawDescData\n}\n\nvar file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3)\nvar file_google_api_http_proto_goTypes = []interface{}{\n\t(*Http)(nil),              // 0: google.api.Http\n\t(*HttpRule)(nil),          // 1: google.api.HttpRule\n\t(*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern\n}\nvar file_google_api_http_proto_depIdxs = []int32{\n\t1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule\n\t2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern\n\t1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule\n\t3, // [3:3] is the sub-list for method output_type\n\t3, // [3:3] is the sub-list for method input_type\n\t3, // [3:3] is the sub-list for extension type_name\n\t3, // [3:3] is the sub-list for extension extendee\n\t0, // [0:3] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_http_proto_init() }\nfunc file_google_api_http_proto_init() {\n\tif File_google_api_http_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Http); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*HttpRule); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*CustomHttpPattern); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\tfile_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{\n\t\t(*HttpRule_Get)(nil),\n\t\t(*HttpRule_Put)(nil),\n\t\t(*HttpRule_Post)(nil),\n\t\t(*HttpRule_Delete)(nil),\n\t\t(*HttpRule_Patch)(nil),\n\t\t(*HttpRule_Custom)(nil),\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_http_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   3,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_http_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_http_proto_depIdxs,\n\t\tMessageInfos:      file_google_api_http_proto_msgTypes,\n\t}.Build()\n\tFile_google_api_http_proto = out.File\n\tfile_google_api_http_proto_rawDesc = nil\n\tfile_google_api_http_proto_goTypes = nil\n\tfile_google_api_http_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/resource.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// A description of the historical or future-looking state of the\n// resource pattern.\ntype ResourceDescriptor_History int32\n\nconst (\n\t// The \"unset\" value.\n\tResourceDescriptor_HISTORY_UNSPECIFIED ResourceDescriptor_History = 0\n\t// The resource originally had one pattern and launched as such, and\n\t// additional patterns were added later.\n\tResourceDescriptor_ORIGINALLY_SINGLE_PATTERN ResourceDescriptor_History = 1\n\t// The resource has one pattern, but the API owner expects to add more\n\t// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents\n\t// that from being necessary once there are multiple patterns.)\n\tResourceDescriptor_FUTURE_MULTI_PATTERN ResourceDescriptor_History = 2\n)\n\n// Enum value maps for ResourceDescriptor_History.\nvar (\n\tResourceDescriptor_History_name = map[int32]string{\n\t\t0: \"HISTORY_UNSPECIFIED\",\n\t\t1: \"ORIGINALLY_SINGLE_PATTERN\",\n\t\t2: \"FUTURE_MULTI_PATTERN\",\n\t}\n\tResourceDescriptor_History_value = map[string]int32{\n\t\t\"HISTORY_UNSPECIFIED\":       0,\n\t\t\"ORIGINALLY_SINGLE_PATTERN\": 1,\n\t\t\"FUTURE_MULTI_PATTERN\":      2,\n\t}\n)\n\nfunc (x ResourceDescriptor_History) Enum() *ResourceDescriptor_History {\n\tp := new(ResourceDescriptor_History)\n\t*p = x\n\treturn p\n}\n\nfunc (x ResourceDescriptor_History) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ResourceDescriptor_History) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_resource_proto_enumTypes[0].Descriptor()\n}\n\nfunc (ResourceDescriptor_History) Type() protoreflect.EnumType {\n\treturn &file_google_api_resource_proto_enumTypes[0]\n}\n\nfunc (x ResourceDescriptor_History) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ResourceDescriptor_History.Descriptor instead.\nfunc (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_resource_proto_rawDescGZIP(), []int{0, 0}\n}\n\n// A flag representing a specific style that a resource claims to conform to.\ntype ResourceDescriptor_Style int32\n\nconst (\n\t// The unspecified value. Do not use.\n\tResourceDescriptor_STYLE_UNSPECIFIED ResourceDescriptor_Style = 0\n\t// This resource is intended to be \"declarative-friendly\".\n\t//\n\t// Declarative-friendly resources must be more strictly consistent, and\n\t// setting this to true communicates to tools that this resource should\n\t// adhere to declarative-friendly expectations.\n\t//\n\t// Note: This is used by the API linter (linter.aip.dev) to enable\n\t// additional checks.\n\tResourceDescriptor_DECLARATIVE_FRIENDLY ResourceDescriptor_Style = 1\n)\n\n// Enum value maps for ResourceDescriptor_Style.\nvar (\n\tResourceDescriptor_Style_name = map[int32]string{\n\t\t0: \"STYLE_UNSPECIFIED\",\n\t\t1: \"DECLARATIVE_FRIENDLY\",\n\t}\n\tResourceDescriptor_Style_value = map[string]int32{\n\t\t\"STYLE_UNSPECIFIED\":    0,\n\t\t\"DECLARATIVE_FRIENDLY\": 1,\n\t}\n)\n\nfunc (x ResourceDescriptor_Style) Enum() *ResourceDescriptor_Style {\n\tp := new(ResourceDescriptor_Style)\n\t*p = x\n\treturn p\n}\n\nfunc (x ResourceDescriptor_Style) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ResourceDescriptor_Style) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_resource_proto_enumTypes[1].Descriptor()\n}\n\nfunc (ResourceDescriptor_Style) Type() protoreflect.EnumType {\n\treturn &file_google_api_resource_proto_enumTypes[1]\n}\n\nfunc (x ResourceDescriptor_Style) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ResourceDescriptor_Style.Descriptor instead.\nfunc (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_resource_proto_rawDescGZIP(), []int{0, 1}\n}\n\n// A simple descriptor of a resource type.\n//\n// ResourceDescriptor annotates a resource message (either by means of a\n// protobuf annotation or use in the service config), and associates the\n// resource's schema, the resource type, and the pattern of the resource name.\n//\n// Example:\n//\n//\tmessage Topic {\n//\t  // Indicates this message defines a resource schema.\n//\t  // Declares the resource type in the format of {service}/{kind}.\n//\t  // For Kubernetes resources, the format is {api group}/{kind}.\n//\t  option (google.api.resource) = {\n//\t    type: \"pubsub.googleapis.com/Topic\"\n//\t    pattern: \"projects/{project}/topics/{topic}\"\n//\t  };\n//\t}\n//\n// The ResourceDescriptor Yaml config will look like:\n//\n//\tresources:\n//\t- type: \"pubsub.googleapis.com/Topic\"\n//\t  pattern: \"projects/{project}/topics/{topic}\"\n//\n// Sometimes, resources have multiple patterns, typically because they can\n// live under multiple parents.\n//\n// Example:\n//\n//\tmessage LogEntry {\n//\t  option (google.api.resource) = {\n//\t    type: \"logging.googleapis.com/LogEntry\"\n//\t    pattern: \"projects/{project}/logs/{log}\"\n//\t    pattern: \"folders/{folder}/logs/{log}\"\n//\t    pattern: \"organizations/{organization}/logs/{log}\"\n//\t    pattern: \"billingAccounts/{billing_account}/logs/{log}\"\n//\t  };\n//\t}\n//\n// The ResourceDescriptor Yaml config will look like:\n//\n//\tresources:\n//\t- type: 'logging.googleapis.com/LogEntry'\n//\t  pattern: \"projects/{project}/logs/{log}\"\n//\t  pattern: \"folders/{folder}/logs/{log}\"\n//\t  pattern: \"organizations/{organization}/logs/{log}\"\n//\t  pattern: \"billingAccounts/{billing_account}/logs/{log}\"\ntype ResourceDescriptor struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource type. It must be in the format of\n\t// {service_name}/{resource_type_kind}. The `resource_type_kind` must be\n\t// singular and must not include version numbers.\n\t//\n\t// Example: `storage.googleapis.com/Bucket`\n\t//\n\t// The value of the resource_type_kind must follow the regular expression\n\t// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and\n\t// should use PascalCase (UpperCamelCase). The maximum number of\n\t// characters allowed for the `resource_type_kind` is 100.\n\tType string `protobuf:\"bytes,1,opt,name=type,proto3\" json:\"type,omitempty\"`\n\t// Optional. The relative resource name pattern associated with this resource\n\t// type. The DNS prefix of the full resource name shouldn't be specified here.\n\t//\n\t// The path pattern must follow the syntax, which aligns with HTTP binding\n\t// syntax:\n\t//\n\t//\tTemplate = Segment { \"/\" Segment } ;\n\t//\tSegment = LITERAL | Variable ;\n\t//\tVariable = \"{\" LITERAL \"}\" ;\n\t//\n\t// Examples:\n\t//\n\t//   - \"projects/{project}/topics/{topic}\"\n\t//   - \"projects/{project}/knowledgeBases/{knowledge_base}\"\n\t//\n\t// The components in braces correspond to the IDs for each resource in the\n\t// hierarchy. It is expected that, if multiple patterns are provided,\n\t// the same component name (e.g. \"project\") refers to IDs of the same\n\t// type of resource.\n\tPattern []string `protobuf:\"bytes,2,rep,name=pattern,proto3\" json:\"pattern,omitempty\"`\n\t// Optional. The field on the resource that designates the resource name\n\t// field. If omitted, this is assumed to be \"name\".\n\tNameField string `protobuf:\"bytes,3,opt,name=name_field,json=nameField,proto3\" json:\"name_field,omitempty\"`\n\t// Optional. The historical or future-looking state of the resource pattern.\n\t//\n\t// Example:\n\t//\n\t//\t// The InspectTemplate message originally only supported resource\n\t//\t// names with organization, and project was added later.\n\t//\tmessage InspectTemplate {\n\t//\t  option (google.api.resource) = {\n\t//\t    type: \"dlp.googleapis.com/InspectTemplate\"\n\t//\t    pattern:\n\t//\t    \"organizations/{organization}/inspectTemplates/{inspect_template}\"\n\t//\t    pattern: \"projects/{project}/inspectTemplates/{inspect_template}\"\n\t//\t    history: ORIGINALLY_SINGLE_PATTERN\n\t//\t  };\n\t//\t}\n\tHistory ResourceDescriptor_History `protobuf:\"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History\" json:\"history,omitempty\"`\n\t// The plural name used in the resource name and permission names, such as\n\t// 'projects' for the resource name of 'projects/{project}' and the permission\n\t// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception\n\t// to this is for Nested Collections that have stuttering names, as defined\n\t// in [AIP-122](https://google.aip.dev/122#nested-collections), where the\n\t// collection ID in the resource name pattern does not necessarily directly\n\t// match the `plural` value.\n\t//\n\t// It is the same concept of the `plural` field in k8s CRD spec\n\t// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/\n\t//\n\t// Note: The plural form is required even for singleton resources. See\n\t// https://aip.dev/156\n\tPlural string `protobuf:\"bytes,5,opt,name=plural,proto3\" json:\"plural,omitempty\"`\n\t// The same concept of the `singular` field in k8s CRD spec\n\t// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/\n\t// Such as \"project\" for the `resourcemanager.googleapis.com/Project` type.\n\tSingular string `protobuf:\"bytes,6,opt,name=singular,proto3\" json:\"singular,omitempty\"`\n\t// Style flag(s) for this resource.\n\t// These indicate that a resource is expected to conform to a given\n\t// style. See the specific style flags for additional information.\n\tStyle []ResourceDescriptor_Style `protobuf:\"varint,10,rep,packed,name=style,proto3,enum=google.api.ResourceDescriptor_Style\" json:\"style,omitempty\"`\n}\n\nfunc (x *ResourceDescriptor) Reset() {\n\t*x = ResourceDescriptor{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_resource_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ResourceDescriptor) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ResourceDescriptor) ProtoMessage() {}\n\nfunc (x *ResourceDescriptor) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_resource_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ResourceDescriptor.ProtoReflect.Descriptor instead.\nfunc (*ResourceDescriptor) Descriptor() ([]byte, []int) {\n\treturn file_google_api_resource_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *ResourceDescriptor) GetType() string {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn \"\"\n}\n\nfunc (x *ResourceDescriptor) GetPattern() []string {\n\tif x != nil {\n\t\treturn x.Pattern\n\t}\n\treturn nil\n}\n\nfunc (x *ResourceDescriptor) GetNameField() string {\n\tif x != nil {\n\t\treturn x.NameField\n\t}\n\treturn \"\"\n}\n\nfunc (x *ResourceDescriptor) GetHistory() ResourceDescriptor_History {\n\tif x != nil {\n\t\treturn x.History\n\t}\n\treturn ResourceDescriptor_HISTORY_UNSPECIFIED\n}\n\nfunc (x *ResourceDescriptor) GetPlural() string {\n\tif x != nil {\n\t\treturn x.Plural\n\t}\n\treturn \"\"\n}\n\nfunc (x *ResourceDescriptor) GetSingular() string {\n\tif x != nil {\n\t\treturn x.Singular\n\t}\n\treturn \"\"\n}\n\nfunc (x *ResourceDescriptor) GetStyle() []ResourceDescriptor_Style {\n\tif x != nil {\n\t\treturn x.Style\n\t}\n\treturn nil\n}\n\n// Defines a proto annotation that describes a string field that refers to\n// an API resource.\ntype ResourceReference struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The resource type that the annotated field references.\n\t//\n\t// Example:\n\t//\n\t//\tmessage Subscription {\n\t//\t  string topic = 2 [(google.api.resource_reference) = {\n\t//\t    type: \"pubsub.googleapis.com/Topic\"\n\t//\t  }];\n\t//\t}\n\t//\n\t// Occasionally, a field may reference an arbitrary resource. In this case,\n\t// APIs use the special value * in their resource reference.\n\t//\n\t// Example:\n\t//\n\t//\tmessage GetIamPolicyRequest {\n\t//\t  string resource = 2 [(google.api.resource_reference) = {\n\t//\t    type: \"*\"\n\t//\t  }];\n\t//\t}\n\tType string `protobuf:\"bytes,1,opt,name=type,proto3\" json:\"type,omitempty\"`\n\t// The resource type of a child collection that the annotated field\n\t// references. This is useful for annotating the `parent` field that\n\t// doesn't have a fixed resource type.\n\t//\n\t// Example:\n\t//\n\t//\tmessage ListLogEntriesRequest {\n\t//\t  string parent = 1 [(google.api.resource_reference) = {\n\t//\t    child_type: \"logging.googleapis.com/LogEntry\"\n\t//\t  };\n\t//\t}\n\tChildType string `protobuf:\"bytes,2,opt,name=child_type,json=childType,proto3\" json:\"child_type,omitempty\"`\n}\n\nfunc (x *ResourceReference) Reset() {\n\t*x = ResourceReference{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_resource_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ResourceReference) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ResourceReference) ProtoMessage() {}\n\nfunc (x *ResourceReference) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_resource_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ResourceReference.ProtoReflect.Descriptor instead.\nfunc (*ResourceReference) Descriptor() ([]byte, []int) {\n\treturn file_google_api_resource_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *ResourceReference) GetType() string {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn \"\"\n}\n\nfunc (x *ResourceReference) GetChildType() string {\n\tif x != nil {\n\t\treturn x.ChildType\n\t}\n\treturn \"\"\n}\n\nvar file_google_api_resource_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.FieldOptions)(nil),\n\t\tExtensionType: (*ResourceReference)(nil),\n\t\tField:         1055,\n\t\tName:          \"google.api.resource_reference\",\n\t\tTag:           \"bytes,1055,opt,name=resource_reference\",\n\t\tFilename:      \"google/api/resource.proto\",\n\t},\n\t{\n\t\tExtendedType:  (*descriptorpb.FileOptions)(nil),\n\t\tExtensionType: ([]*ResourceDescriptor)(nil),\n\t\tField:         1053,\n\t\tName:          \"google.api.resource_definition\",\n\t\tTag:           \"bytes,1053,rep,name=resource_definition\",\n\t\tFilename:      \"google/api/resource.proto\",\n\t},\n\t{\n\t\tExtendedType:  (*descriptorpb.MessageOptions)(nil),\n\t\tExtensionType: (*ResourceDescriptor)(nil),\n\t\tField:         1053,\n\t\tName:          \"google.api.resource\",\n\t\tTag:           \"bytes,1053,opt,name=resource\",\n\t\tFilename:      \"google/api/resource.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.FieldOptions.\nvar (\n\t// An annotation that describes a resource reference, see\n\t// [ResourceReference][].\n\t//\n\t// optional google.api.ResourceReference resource_reference = 1055;\n\tE_ResourceReference = &file_google_api_resource_proto_extTypes[0]\n)\n\n// Extension fields to descriptorpb.FileOptions.\nvar (\n\t// An annotation that describes a resource definition without a corresponding\n\t// message; see [ResourceDescriptor][].\n\t//\n\t// repeated google.api.ResourceDescriptor resource_definition = 1053;\n\tE_ResourceDefinition = &file_google_api_resource_proto_extTypes[1]\n)\n\n// Extension fields to descriptorpb.MessageOptions.\nvar (\n\t// An annotation that describes a resource definition, see\n\t// [ResourceDescriptor][].\n\t//\n\t// optional google.api.ResourceDescriptor resource = 1053;\n\tE_Resource = &file_google_api_resource_proto_extTypes[2]\n)\n\nvar File_google_api_resource_proto protoreflect.FileDescriptor\n\nvar file_google_api_resource_proto_rawDesc = []byte{\n\t0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73,\n\t0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,\n\t0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x03, 0x0a, 0x12, 0x52, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,\n\t0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,\n\t0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18,\n\t0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1d,\n\t0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x0a,\n\t0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f,\n\t0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x48,\n\t0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12,\n\t0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x6e, 0x67, 0x75,\n\t0x6c, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x69, 0x6e, 0x67, 0x75,\n\t0x6c, 0x61, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x03,\n\t0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,\n\t0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,\n\t0x6f, 0x72, 0x2e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x22,\n\t0x5b, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x49,\n\t0x53, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,\n\t0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x4c,\n\t0x59, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x54, 0x45, 0x52, 0x4e,\n\t0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x4d, 0x55, 0x4c,\n\t0x54, 0x49, 0x5f, 0x50, 0x41, 0x54, 0x54, 0x45, 0x52, 0x4e, 0x10, 0x02, 0x22, 0x38, 0x0a, 0x05,\n\t0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x59, 0x4c, 0x45, 0x5f, 0x55,\n\t0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14,\n\t0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x49, 0x45,\n\t0x4e, 0x44, 0x4c, 0x59, 0x10, 0x01, 0x22, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74,\n\t0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,\n\t0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x6c,\n\t0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72,\n\t0x65, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,\n\t0x6f, 0x6e, 0x73, 0x18, 0x9f, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,\n\t0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75,\n\t0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x6e, 0x0a, 0x13,\n\t0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74,\n\t0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,\n\t0x73, 0x18, 0x9d, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65,\n\t0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,\n\t0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x5c, 0x0a, 0x08,\n\t0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,\n\t0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9d, 0x08, 0x20, 0x01, 0x28, 0x0b,\n\t0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,\n\t0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6b, 0x0a, 0x0e, 0x63, 0x6f,\n\t0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x52, 0x65,\n\t0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67,\n\t0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,\n\t0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,\n\t0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,\n\t0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_resource_proto_rawDescOnce sync.Once\n\tfile_google_api_resource_proto_rawDescData = file_google_api_resource_proto_rawDesc\n)\n\nfunc file_google_api_resource_proto_rawDescGZIP() []byte {\n\tfile_google_api_resource_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_resource_proto_rawDescData)\n\t})\n\treturn file_google_api_resource_proto_rawDescData\n}\n\nvar file_google_api_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_google_api_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_google_api_resource_proto_goTypes = []interface{}{\n\t(ResourceDescriptor_History)(0),     // 0: google.api.ResourceDescriptor.History\n\t(ResourceDescriptor_Style)(0),       // 1: google.api.ResourceDescriptor.Style\n\t(*ResourceDescriptor)(nil),          // 2: google.api.ResourceDescriptor\n\t(*ResourceReference)(nil),           // 3: google.api.ResourceReference\n\t(*descriptorpb.FieldOptions)(nil),   // 4: google.protobuf.FieldOptions\n\t(*descriptorpb.FileOptions)(nil),    // 5: google.protobuf.FileOptions\n\t(*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions\n}\nvar file_google_api_resource_proto_depIdxs = []int32{\n\t0, // 0: google.api.ResourceDescriptor.history:type_name -> google.api.ResourceDescriptor.History\n\t1, // 1: google.api.ResourceDescriptor.style:type_name -> google.api.ResourceDescriptor.Style\n\t4, // 2: google.api.resource_reference:extendee -> google.protobuf.FieldOptions\n\t5, // 3: google.api.resource_definition:extendee -> google.protobuf.FileOptions\n\t6, // 4: google.api.resource:extendee -> google.protobuf.MessageOptions\n\t3, // 5: google.api.resource_reference:type_name -> google.api.ResourceReference\n\t2, // 6: google.api.resource_definition:type_name -> google.api.ResourceDescriptor\n\t2, // 7: google.api.resource:type_name -> google.api.ResourceDescriptor\n\t8, // [8:8] is the sub-list for method output_type\n\t8, // [8:8] is the sub-list for method input_type\n\t5, // [5:8] is the sub-list for extension type_name\n\t2, // [2:5] is the sub-list for extension extendee\n\t0, // [0:2] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_resource_proto_init() }\nfunc file_google_api_resource_proto_init() {\n\tif File_google_api_resource_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_api_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ResourceDescriptor); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*ResourceReference); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_resource_proto_rawDesc,\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   2,\n\t\t\tNumExtensions: 3,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_resource_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_resource_proto_depIdxs,\n\t\tEnumInfos:         file_google_api_resource_proto_enumTypes,\n\t\tMessageInfos:      file_google_api_resource_proto_msgTypes,\n\t\tExtensionInfos:    file_google_api_resource_proto_extTypes,\n\t}.Build()\n\tFile_google_api_resource_proto = out.File\n\tfile_google_api_resource_proto_rawDesc = nil\n\tfile_google_api_resource_proto_goTypes = nil\n\tfile_google_api_resource_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/routing.proto\n\npackage annotations\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Specifies the routing information that should be sent along with the request\n// in the form of routing header.\n// **NOTE:** All service configuration rules follow the \"last one wins\" order.\n//\n// The examples below will apply to an RPC which has the following request type:\n//\n// Message Definition:\n//\n//\tmessage Request {\n//\t  // The name of the Table\n//\t  // Values can be of the following formats:\n//\t  // - `projects/<project>/tables/<table>`\n//\t  // - `projects/<project>/instances/<instance>/tables/<table>`\n//\t  // - `region/<region>/zones/<zone>/tables/<table>`\n//\t  string table_name = 1;\n//\n//\t  // This value specifies routing for replication.\n//\t  // It can be in the following formats:\n//\t  // - `profiles/<profile_id>`\n//\t  // - a legacy `profile_id` that can be any string\n//\t  string app_profile_id = 2;\n//\t}\n//\n// Example message:\n//\n//\t{\n//\t  table_name: projects/proj_foo/instances/instance_bar/table/table_baz,\n//\t  app_profile_id: profiles/prof_qux\n//\t}\n//\n// The routing header consists of one or multiple key-value pairs. Every key\n// and value must be percent-encoded, and joined together in the format of\n// `key1=value1&key2=value2`.\n// The examples below skip the percent-encoding for readability.\n//\n// # Example 1\n//\n// Extracting a field from the request to put into the routing header\n// unchanged, with the key equal to the field name.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take the `app_profile_id`.\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params: app_profile_id=profiles/prof_qux\n//\n// # Example 2\n//\n// Extracting a field from the request to put into the routing header\n// unchanged, with the key different from the field name.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take the `app_profile_id`, but name it `routing_id` in the header.\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t    path_template: \"{routing_id=**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params: routing_id=profiles/prof_qux\n//\n// # Example 3\n//\n// Extracting a field from the request to put into the routing\n// header, while matching a path template syntax on the field's value.\n//\n// NB: it is more useful to send nothing than to send garbage for the purpose\n// of dynamic routing, since garbage pollutes cache. Thus the matching.\n//\n// # Sub-example 3a\n//\n// The field matches the template.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take the `table_name`, if it's well-formed (with project-based\n//\t  // syntax).\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{table_name=projects/*/instances/*/**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\ttable_name=projects/proj_foo/instances/instance_bar/table/table_baz\n//\n// # Sub-example 3b\n//\n// The field does not match the template.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take the `table_name`, if it's well-formed (with region-based\n//\t  // syntax).\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{table_name=regions/*/zones/*/**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\t<no routing header will be sent>\n//\n// # Sub-example 3c\n//\n// Multiple alternative conflictingly named path templates are\n// specified. The one that matches is used to construct the header.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take the `table_name`, if it's well-formed, whether\n//\t  // using the region- or projects-based syntax.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{table_name=regions/*/zones/*/**}\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{table_name=projects/*/instances/*/**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\ttable_name=projects/proj_foo/instances/instance_bar/table/table_baz\n//\n// # Example 4\n//\n// Extracting a single routing header key-value pair by matching a\n// template syntax on (a part of) a single request field.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // Take just the project id from the `table_name` field.\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{routing_id=projects/*}/**\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params: routing_id=projects/proj_foo\n//\n// # Example 5\n//\n// Extracting a single routing header key-value pair by matching\n// several conflictingly named path templates on (parts of) a single request\n// field. The last template to match \"wins\" the conflict.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // If the `table_name` does not have instances information,\n//\t  // take just the project id for routing.\n//\t  // Otherwise take project + instance.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{routing_id=projects/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{routing_id=projects/*/instances/*}/**\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\trouting_id=projects/proj_foo/instances/instance_bar\n//\n// # Example 6\n//\n// Extracting multiple routing header key-value pairs by matching\n// several non-conflicting path templates on (parts of) a single request field.\n//\n// # Sub-example 6a\n//\n// Make the templates strict, so that if the `table_name` does not\n// have an instance information, nothing is sent.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // The routing code needs two keys instead of one composite\n//\t  // but works only for the tables with the \"project-instance\" name\n//\t  // syntax.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{project_id=projects/*}/instances/*/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"projects/*/{instance_id=instances/*}/**\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\tproject_id=projects/proj_foo&instance_id=instances/instance_bar\n//\n// # Sub-example 6b\n//\n// Make the templates loose, so that if the `table_name` does not\n// have an instance information, just the project id part is sent.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // The routing code wants two keys instead of one composite\n//\t  // but will work with just the `project_id` for tables without\n//\t  // an instance in the `table_name`.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{project_id=projects/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"projects/*/{instance_id=instances/*}/**\"\n//\t  }\n//\t};\n//\n// result (is the same as 6a for our example message because it has the instance\n// information):\n//\n//\tx-goog-request-params:\n//\tproject_id=projects/proj_foo&instance_id=instances/instance_bar\n//\n// # Example 7\n//\n// Extracting multiple routing header key-value pairs by matching\n// several path templates on multiple request fields.\n//\n// NB: note that here there is no way to specify sending nothing if one of the\n// fields does not match its template. E.g. if the `table_name` is in the wrong\n// format, the `project_id` will not be sent, but the `routing_id` will be.\n// The backend routing code has to be aware of that and be prepared to not\n// receive a full complement of keys if it expects multiple.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // The routing needs both `project_id` and `routing_id`\n//\t  // (from the `app_profile_id` field) for routing.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{project_id=projects/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t    path_template: \"{routing_id=**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\tproject_id=projects/proj_foo&routing_id=profiles/prof_qux\n//\n// # Example 8\n//\n// Extracting a single routing header key-value pair by matching\n// several conflictingly named path templates on several request fields. The\n// last template to match \"wins\" the conflict.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // The `routing_id` can be a project id or a region id depending on\n//\t  // the table name format, but only if the `app_profile_id` is not set.\n//\t  // If `app_profile_id` is set it should be used instead.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{routing_id=projects/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t     field: \"table_name\"\n//\t     path_template: \"{routing_id=regions/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t    path_template: \"{routing_id=**}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params: routing_id=profiles/prof_qux\n//\n// # Example 9\n//\n// Bringing it all together.\n//\n// annotation:\n//\n//\toption (google.api.routing) = {\n//\t  // For routing both `table_location` and a `routing_id` are needed.\n//\t  //\n//\t  // table_location can be either an instance id or a region+zone id.\n//\t  //\n//\t  // For `routing_id`, take the value of `app_profile_id`\n//\t  // - If it's in the format `profiles/<profile_id>`, send\n//\t  // just the `<profile_id>` part.\n//\t  // - If it's any other literal, send it as is.\n//\t  // If the `app_profile_id` is empty, and the `table_name` starts with\n//\t  // the project_id, send that instead.\n//\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"projects/*/{table_location=instances/*}/tables/*\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{table_location=regions/*/zones/*}/tables/*\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"table_name\"\n//\t    path_template: \"{routing_id=projects/*}/**\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t    path_template: \"{routing_id=**}\"\n//\t  }\n//\t  routing_parameters {\n//\t    field: \"app_profile_id\"\n//\t    path_template: \"profiles/{routing_id=*}\"\n//\t  }\n//\t};\n//\n// result:\n//\n//\tx-goog-request-params:\n//\ttable_location=instances/instance_bar&routing_id=prof_qux\ntype RoutingRule struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// A collection of Routing Parameter specifications.\n\t// **NOTE:** If multiple Routing Parameters describe the same key\n\t// (via the `path_template` field or via the `field` field when\n\t// `path_template` is not provided), \"last one wins\" rule\n\t// determines which Parameter gets used.\n\t// See the examples for more details.\n\tRoutingParameters []*RoutingParameter `protobuf:\"bytes,2,rep,name=routing_parameters,json=routingParameters,proto3\" json:\"routing_parameters,omitempty\"`\n}\n\nfunc (x *RoutingRule) Reset() {\n\t*x = RoutingRule{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_routing_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RoutingRule) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RoutingRule) ProtoMessage() {}\n\nfunc (x *RoutingRule) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_routing_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.\nfunc (*RoutingRule) Descriptor() ([]byte, []int) {\n\treturn file_google_api_routing_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *RoutingRule) GetRoutingParameters() []*RoutingParameter {\n\tif x != nil {\n\t\treturn x.RoutingParameters\n\t}\n\treturn nil\n}\n\n// A projection from an input message to the GRPC or REST header.\ntype RoutingParameter struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// A request field to extract the header key-value pair from.\n\tField string `protobuf:\"bytes,1,opt,name=field,proto3\" json:\"field,omitempty\"`\n\t// A pattern matching the key-value field. Optional.\n\t// If not specified, the whole field specified in the `field` field will be\n\t// taken as value, and its name used as key. If specified, it MUST contain\n\t// exactly one named segment (along with any number of unnamed segments) The\n\t// pattern will be matched over the field specified in the `field` field, then\n\t// if the match is successful:\n\t// - the name of the single named segment will be used as a header name,\n\t// - the match value of the segment will be used as a header value;\n\t// if the match is NOT successful, nothing will be sent.\n\t//\n\t// Example:\n\t//\n\t//\t          -- This is a field in the request message\n\t//\t         |   that the header value will be extracted from.\n\t//\t         |\n\t//\t         |                     -- This is the key name in the\n\t//\t         |                    |   routing header.\n\t//\t         V                    |\n\t//\tfield: \"table_name\"           v\n\t//\tpath_template: \"projects/*/{table_location=instances/*}/tables/*\"\n\t//\t                                           ^            ^\n\t//\t                                           |            |\n\t//\t  In the {} brackets is the pattern that --             |\n\t//\t  specifies what to extract from the                    |\n\t//\t  field as a value to be sent.                          |\n\t//\t                                                        |\n\t//\t The string in the field must match the whole pattern --\n\t//\t before brackets, inside brackets, after brackets.\n\t//\n\t// When looking at this specific example, we can see that:\n\t//   - A key-value pair with the key `table_location`\n\t//     and the value matching `instances/*` should be added\n\t//     to the x-goog-request-params routing header.\n\t//   - The value is extracted from the request message's `table_name` field\n\t//     if it matches the full pattern specified:\n\t//     `projects/*/instances/*/tables/*`.\n\t//\n\t// **NB:** If the `path_template` field is not provided, the key name is\n\t// equal to the field name, and the whole field should be sent as a value.\n\t// This makes the pattern for the field and the value functionally equivalent\n\t// to `**`, and the configuration\n\t//\n\t//\t{\n\t//\t  field: \"table_name\"\n\t//\t}\n\t//\n\t// is a functionally equivalent shorthand to:\n\t//\n\t//\t{\n\t//\t  field: \"table_name\"\n\t//\t  path_template: \"{table_name=**}\"\n\t//\t}\n\t//\n\t// See Example 1 for more details.\n\tPathTemplate string `protobuf:\"bytes,2,opt,name=path_template,json=pathTemplate,proto3\" json:\"path_template,omitempty\"`\n}\n\nfunc (x *RoutingParameter) Reset() {\n\t*x = RoutingParameter{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_api_routing_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *RoutingParameter) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RoutingParameter) ProtoMessage() {}\n\nfunc (x *RoutingParameter) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_api_routing_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RoutingParameter.ProtoReflect.Descriptor instead.\nfunc (*RoutingParameter) Descriptor() ([]byte, []int) {\n\treturn file_google_api_routing_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *RoutingParameter) GetField() string {\n\tif x != nil {\n\t\treturn x.Field\n\t}\n\treturn \"\"\n}\n\nfunc (x *RoutingParameter) GetPathTemplate() string {\n\tif x != nil {\n\t\treturn x.PathTemplate\n\t}\n\treturn \"\"\n}\n\nvar file_google_api_routing_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.MethodOptions)(nil),\n\t\tExtensionType: (*RoutingRule)(nil),\n\t\tField:         72295729,\n\t\tName:          \"google.api.routing\",\n\t\tTag:           \"bytes,72295729,opt,name=routing\",\n\t\tFilename:      \"google/api/routing.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.MethodOptions.\nvar (\n\t// See RoutingRule.\n\t//\n\t// optional google.api.RoutingRule routing = 72295729;\n\tE_Routing = &file_google_api_routing_proto_extTypes[0]\n)\n\nvar File_google_api_routing_proto protoreflect.FileDescriptor\n\nvar file_google_api_routing_proto_rawDesc = []byte{\n\t0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75,\n\t0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,\n\t0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74,\n\t0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69,\n\t0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20,\n\t0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,\n\t0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,\n\t0x72, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,\n\t0x74, 0x65, 0x72, 0x73, 0x22, 0x4d, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50,\n\t0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,\n\t0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23,\n\t0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c,\n\t0x61, 0x74, 0x65, 0x3a, 0x54, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,\n\t0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb1,\n\t0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,\n\t0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65,\n\t0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d,\n\t0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x52, 0x6f, 0x75,\n\t0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67,\n\t0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,\n\t0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,\n\t0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02,\n\t0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_routing_proto_rawDescOnce sync.Once\n\tfile_google_api_routing_proto_rawDescData = file_google_api_routing_proto_rawDesc\n)\n\nfunc file_google_api_routing_proto_rawDescGZIP() []byte {\n\tfile_google_api_routing_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_routing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_routing_proto_rawDescData)\n\t})\n\treturn file_google_api_routing_proto_rawDescData\n}\n\nvar file_google_api_routing_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_google_api_routing_proto_goTypes = []interface{}{\n\t(*RoutingRule)(nil),                // 0: google.api.RoutingRule\n\t(*RoutingParameter)(nil),           // 1: google.api.RoutingParameter\n\t(*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions\n}\nvar file_google_api_routing_proto_depIdxs = []int32{\n\t1, // 0: google.api.RoutingRule.routing_parameters:type_name -> google.api.RoutingParameter\n\t2, // 1: google.api.routing:extendee -> google.protobuf.MethodOptions\n\t0, // 2: google.api.routing:type_name -> google.api.RoutingRule\n\t3, // [3:3] is the sub-list for method output_type\n\t3, // [3:3] is the sub-list for method input_type\n\t2, // [2:3] is the sub-list for extension type_name\n\t1, // [1:2] is the sub-list for extension extendee\n\t0, // [0:1] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_routing_proto_init() }\nfunc file_google_api_routing_proto_init() {\n\tif File_google_api_routing_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_api_routing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RoutingRule); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_google_api_routing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*RoutingParameter); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_routing_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   2,\n\t\t\tNumExtensions: 1,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_routing_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_routing_proto_depIdxs,\n\t\tMessageInfos:      file_google_api_routing_proto_msgTypes,\n\t\tExtensionInfos:    file_google_api_routing_proto_extTypes,\n\t}.Build()\n\tFile_google_api_routing_proto = out.File\n\tfile_google_api_routing_proto_rawDesc = nil\n\tfile_google_api_routing_proto_goTypes = nil\n\tfile_google_api_routing_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/api/launch_stage.proto\n\npackage api\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The launch stage as defined by [Google Cloud Platform\n// Launch Stages](https://cloud.google.com/terms/launch-stages).\ntype LaunchStage int32\n\nconst (\n\t// Do not use this default value.\n\tLaunchStage_LAUNCH_STAGE_UNSPECIFIED LaunchStage = 0\n\t// The feature is not yet implemented. Users can not use it.\n\tLaunchStage_UNIMPLEMENTED LaunchStage = 6\n\t// Prelaunch features are hidden from users and are only visible internally.\n\tLaunchStage_PRELAUNCH LaunchStage = 7\n\t// Early Access features are limited to a closed group of testers. To use\n\t// these features, you must sign up in advance and sign a Trusted Tester\n\t// agreement (which includes confidentiality provisions). These features may\n\t// be unstable, changed in backward-incompatible ways, and are not\n\t// guaranteed to be released.\n\tLaunchStage_EARLY_ACCESS LaunchStage = 1\n\t// Alpha is a limited availability test for releases before they are cleared\n\t// for widespread use. By Alpha, all significant design issues are resolved\n\t// and we are in the process of verifying functionality. Alpha customers\n\t// need to apply for access, agree to applicable terms, and have their\n\t// projects allowlisted. Alpha releases don't have to be feature complete,\n\t// no SLAs are provided, and there are no technical support obligations, but\n\t// they will be far enough along that customers can actually use them in\n\t// test environments or for limited-use tests -- just like they would in\n\t// normal production cases.\n\tLaunchStage_ALPHA LaunchStage = 2\n\t// Beta is the point at which we are ready to open a release for any\n\t// customer to use. There are no SLA or technical support obligations in a\n\t// Beta release. Products will be complete from a feature perspective, but\n\t// may have some open outstanding issues. Beta releases are suitable for\n\t// limited production use cases.\n\tLaunchStage_BETA LaunchStage = 3\n\t// GA features are open to all developers and are considered stable and\n\t// fully qualified for production use.\n\tLaunchStage_GA LaunchStage = 4\n\t// Deprecated features are scheduled to be shut down and removed. For more\n\t// information, see the \"Deprecation Policy\" section of our [Terms of\n\t// Service](https://cloud.google.com/terms/)\n\t// and the [Google Cloud Platform Subject to the Deprecation\n\t// Policy](https://cloud.google.com/terms/deprecation) documentation.\n\tLaunchStage_DEPRECATED LaunchStage = 5\n)\n\n// Enum value maps for LaunchStage.\nvar (\n\tLaunchStage_name = map[int32]string{\n\t\t0: \"LAUNCH_STAGE_UNSPECIFIED\",\n\t\t6: \"UNIMPLEMENTED\",\n\t\t7: \"PRELAUNCH\",\n\t\t1: \"EARLY_ACCESS\",\n\t\t2: \"ALPHA\",\n\t\t3: \"BETA\",\n\t\t4: \"GA\",\n\t\t5: \"DEPRECATED\",\n\t}\n\tLaunchStage_value = map[string]int32{\n\t\t\"LAUNCH_STAGE_UNSPECIFIED\": 0,\n\t\t\"UNIMPLEMENTED\":            6,\n\t\t\"PRELAUNCH\":                7,\n\t\t\"EARLY_ACCESS\":             1,\n\t\t\"ALPHA\":                    2,\n\t\t\"BETA\":                     3,\n\t\t\"GA\":                       4,\n\t\t\"DEPRECATED\":               5,\n\t}\n)\n\nfunc (x LaunchStage) Enum() *LaunchStage {\n\tp := new(LaunchStage)\n\t*p = x\n\treturn p\n}\n\nfunc (x LaunchStage) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (LaunchStage) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_api_launch_stage_proto_enumTypes[0].Descriptor()\n}\n\nfunc (LaunchStage) Type() protoreflect.EnumType {\n\treturn &file_google_api_launch_stage_proto_enumTypes[0]\n}\n\nfunc (x LaunchStage) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use LaunchStage.Descriptor instead.\nfunc (LaunchStage) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_api_launch_stage_proto_rawDescGZIP(), []int{0}\n}\n\nvar File_google_api_launch_stage_proto protoreflect.FileDescriptor\n\nvar file_google_api_launch_stage_proto_rawDesc = []byte{\n\t0x0a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x75,\n\t0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,\n\t0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2a, 0x8c, 0x01, 0x0a, 0x0b,\n\t0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4c,\n\t0x41, 0x55, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,\n\t0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49,\n\t0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09,\n\t0x50, 0x52, 0x45, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x45,\n\t0x41, 0x52, 0x4c, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a,\n\t0x05, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x54, 0x41,\n\t0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x41, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45,\n\t0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x5a, 0x0a, 0x0e, 0x63, 0x6f,\n\t0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10, 0x4c, 0x61,\n\t0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,\n\t0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e,\n\t0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f,\n\t0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2,\n\t0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_api_launch_stage_proto_rawDescOnce sync.Once\n\tfile_google_api_launch_stage_proto_rawDescData = file_google_api_launch_stage_proto_rawDesc\n)\n\nfunc file_google_api_launch_stage_proto_rawDescGZIP() []byte {\n\tfile_google_api_launch_stage_proto_rawDescOnce.Do(func() {\n\t\tfile_google_api_launch_stage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_launch_stage_proto_rawDescData)\n\t})\n\treturn file_google_api_launch_stage_proto_rawDescData\n}\n\nvar file_google_api_launch_stage_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_google_api_launch_stage_proto_goTypes = []interface{}{\n\t(LaunchStage)(0), // 0: google.api.LaunchStage\n}\nvar file_google_api_launch_stage_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_api_launch_stage_proto_init() }\nfunc file_google_api_launch_stage_proto_init() {\n\tif File_google_api_launch_stage_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_api_launch_stage_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_api_launch_stage_proto_goTypes,\n\t\tDependencyIndexes: file_google_api_launch_stage_proto_depIdxs,\n\t\tEnumInfos:         file_google_api_launch_stage_proto_enumTypes,\n\t}.Build()\n\tFile_google_api_launch_stage_proto = out.File\n\tfile_google_api_launch_stage_proto_rawDesc = nil\n\tfile_google_api_launch_stage_proto_goTypes = nil\n\tfile_google_api_launch_stage_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/genproto/googleapis/rpc/LICENSE",
    "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 [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": "vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go",
    "content": "// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.26.0\n// \tprotoc        v4.24.4\n// source: google/rpc/status.proto\n\npackage status\n\nimport (\n\treflect \"reflect\"\n\tsync \"sync\"\n\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tanypb \"google.golang.org/protobuf/types/known/anypb\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// The `Status` type defines a logical error model that is suitable for\n// different programming environments, including REST APIs and RPC APIs. It is\n// used by [gRPC](https://github.com/grpc). Each `Status` message contains\n// three pieces of data: error code, error message, and error details.\n//\n// You can find out more about this error model and how to work with it in the\n// [API Design Guide](https://cloud.google.com/apis/design/errors).\ntype Status struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\t// The status code, which should be an enum value of\n\t// [google.rpc.Code][google.rpc.Code].\n\tCode int32 `protobuf:\"varint,1,opt,name=code,proto3\" json:\"code,omitempty\"`\n\t// A developer-facing error message, which should be in English. Any\n\t// user-facing error message should be localized and sent in the\n\t// [google.rpc.Status.details][google.rpc.Status.details] field, or localized\n\t// by the client.\n\tMessage string `protobuf:\"bytes,2,opt,name=message,proto3\" json:\"message,omitempty\"`\n\t// A list of messages that carry the error details.  There is a common set of\n\t// message types for APIs to use.\n\tDetails []*anypb.Any `protobuf:\"bytes,3,rep,name=details,proto3\" json:\"details,omitempty\"`\n}\n\nfunc (x *Status) Reset() {\n\t*x = Status{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_google_rpc_status_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Status) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Status) ProtoMessage() {}\n\nfunc (x *Status) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_rpc_status_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Status.ProtoReflect.Descriptor instead.\nfunc (*Status) Descriptor() ([]byte, []int) {\n\treturn file_google_rpc_status_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Status) GetCode() int32 {\n\tif x != nil {\n\t\treturn x.Code\n\t}\n\treturn 0\n}\n\nfunc (x *Status) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\nfunc (x *Status) GetDetails() []*anypb.Any {\n\tif x != nil {\n\t\treturn x.Details\n\t}\n\treturn nil\n}\n\nvar File_google_rpc_status_proto protoreflect.FileDescriptor\n\nvar file_google_rpc_status_proto_rawDesc = []byte{\n\t0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61,\n\t0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x22, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,\n\t0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18,\n\t0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61,\n\t0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,\n\t0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,\n\t0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x61, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,\n\t0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0b, 0x53, 0x74, 0x61, 0x74,\n\t0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c,\n\t0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,\n\t0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74,\n\t0x75, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_google_rpc_status_proto_rawDescOnce sync.Once\n\tfile_google_rpc_status_proto_rawDescData = file_google_rpc_status_proto_rawDesc\n)\n\nfunc file_google_rpc_status_proto_rawDescGZIP() []byte {\n\tfile_google_rpc_status_proto_rawDescOnce.Do(func() {\n\t\tfile_google_rpc_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_status_proto_rawDescData)\n\t})\n\treturn file_google_rpc_status_proto_rawDescData\n}\n\nvar file_google_rpc_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_google_rpc_status_proto_goTypes = []interface{}{\n\t(*Status)(nil),    // 0: google.rpc.Status\n\t(*anypb.Any)(nil), // 1: google.protobuf.Any\n}\nvar file_google_rpc_status_proto_depIdxs = []int32{\n\t1, // 0: google.rpc.Status.details:type_name -> google.protobuf.Any\n\t1, // [1:1] is the sub-list for method output_type\n\t1, // [1:1] is the sub-list for method input_type\n\t1, // [1:1] is the sub-list for extension type_name\n\t1, // [1:1] is the sub-list for extension extendee\n\t0, // [0:1] is the sub-list for field type_name\n}\n\nfunc init() { file_google_rpc_status_proto_init() }\nfunc file_google_rpc_status_proto_init() {\n\tif File_google_rpc_status_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_google_rpc_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {\n\t\t\tswitch v := v.(*Status); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_google_rpc_status_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_rpc_status_proto_goTypes,\n\t\tDependencyIndexes: file_google_rpc_status_proto_depIdxs,\n\t\tMessageInfos:      file_google_rpc_status_proto_msgTypes,\n\t}.Build()\n\tFile_google_rpc_status_proto = out.File\n\tfile_google_rpc_status_proto_rawDesc = nil\n\tfile_google_rpc_status_proto_goTypes = nil\n\tfile_google_rpc_status_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/AUTHORS",
    "content": "Google Inc.\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md",
    "content": "## Community Code of Conduct\n\ngRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/CONTRIBUTING.md",
    "content": "# How to contribute\n\nWe welcome your patches and contributions to gRPC! Please read the gRPC\norganization's [governance\nrules](https://github.com/grpc/grpc-community/blob/master/governance.md) before\nproceeding.\n\nIf you are new to GitHub, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/)\n\n## Legal requirements\n\nIn order to protect both you and ourselves, you will need to sign the\n[Contributor License\nAgreement](https://identity.linuxfoundation.org/projects/cncf). When you create\nyour first PR, a link will be added as a comment that contains the steps needed\nto complete this process.\n\n## Getting Started\n\nA great way to start is by searching through our open issues. [Unassigned issues\nlabeled as \"help\nwanted\"](https://github.com/grpc/grpc-go/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3A%22Status%3A%20Help%20Wanted%22%20no%3Aassignee)\nare especially nice for first-time contributors, as they should be well-defined\nproblems that already have agreed-upon solutions.\n\n## Code Style\n\nWe follow [Google's published Go style\nguide](https://google.github.io/styleguide/go/). Note that there are three\nprimary documents that make up this style guide; please follow them as closely\nas possible. If a reviewer recommends something that contradicts those\nguidelines, there may be valid reasons to do so, but it should be rare.\n\n## Guidelines for Pull Requests\n\nPlease read the following carefully to ensure your contributions can be merged\nsmoothly and quickly.\n\n### PR Contents\n\n- Create **small PRs** that are narrowly focused on **addressing a single\n  concern**. We often receive PRs that attempt to fix several things at the same\n  time, and if one part of the PR has a problem, that will hold up the entire\n  PR.\n\n- If your change does not address an **open issue** with an **agreed\n  resolution**, consider opening an issue and discussing it first. If you are\n  suggesting a behavioral or API change, consider starting with a [gRFC\n  proposal](https://github.com/grpc/proposal). Many new features that are not\n  bug fixes will require cross-language agreement.\n\n- If you want to fix **formatting or style**, consider whether your changes are\n  an obvious improvement or might be considered a personal preference. If a\n  style change is based on preference, it likely will not be accepted. If it\n  corrects widely agreed-upon anti-patterns, then please do create a PR and\n  explain the benefits of the change.\n\n- For correcting **misspellings**, please be aware that we use some terms that\n  are sometimes flagged by spell checkers. As an example, \"if an only if\" is\n  often written as \"iff\". Please do not make spelling correction changes unless\n  you are certain they are misspellings.\n\n- **All tests need to be passing** before your change can be merged. We\n  recommend you run tests locally before creating your PR to catch breakages\n  early on:\n\n  - `./scripts/vet.sh` to catch vet errors.\n  - `go test -cpu 1,4 -timeout 7m ./...` to run the tests.\n  - `go test -race -cpu 1,4 -timeout 7m ./...` to run tests in race mode.\n\n  Note that we have a multi-module repo, so `go test` commands may need to be\n  run from the root of each module in order to cause all tests to run.\n\n  *Alternatively*, you may find it easier to push your changes to your fork on\n  GitHub, which will trigger a GitHub Actions run that you can use to verify\n  everything is passing.\n\n- Note that there are two GitHub actions checks that need not be green:\n\n  1. We test the freshness of the generated proto code we maintain via the\n     `vet-proto` check. If the source proto files are updated, but our repo is\n     not updated, an optional checker will fail. This will be fixed by our team\n     in a separate PR and will not prevent the merge of your PR.\n\n  2. We run a checker that will fail if there is any change in dependencies of\n     an exported package via the `dependencies` check. If new dependencies are\n     added that are not appropriate, we may not accept your PR (see below).\n\n- If you are adding a **new file**, make sure it has the **copyright message**\n  template at the top as a comment. You can copy the message from an existing\n  file and update the year.\n\n- The grpc package should only depend on standard Go packages and a small number\n  of exceptions. **If your contribution introduces new dependencies**, you will\n  need a discussion with gRPC-Go maintainers.\n\n### PR Descriptions\n\n- **PR titles** should start with the name of the component being addressed, or\n  the type of change. Examples: transport, client, server, round_robin, xds,\n  cleanup, deps.\n\n- Read and follow the **guidelines for PR titles and descriptions** here:\n  https://google.github.io/eng-practices/review/developer/cl-descriptions.html\n\n  *particularly* the sections \"First Line\" and \"Body is Informative\".\n\n  Note: your PR description will be used as the git commit message in a\n  squash-and-merge if your PR is approved. We may make changes to this as\n  necessary.\n\n- **Does this PR relate to an open issue?** On the first line, please use the\n  tag `Fixes #<issue>` to ensure the issue is closed when the PR is merged. Or\n  use `Updates #<issue>` if the PR is related to an open issue, but does not fix\n  it. Consider filing an issue if one does not already exist.\n\n- PR descriptions *must* conclude with **release notes** as follows:\n\n  ```\n  RELEASE NOTES:\n  * <component>: <summary>\n  ```\n\n  This need not match the PR title.\n\n  The summary must:\n\n  * be something that gRPC users will understand.\n\n  * clearly explain the feature being added, the issue being fixed, or the\n    behavior being changed, etc. If fixing a bug, be clear about how the bug\n    can be triggered by an end-user.\n\n  * begin with a capital letter and use complete sentences.\n\n  * be as short as possible to describe the change being made.\n\n  If a PR is *not* end-user visible -- e.g. a cleanup, testing change, or\n  GitHub-related, use `RELEASE NOTES: n/a`.\n\n### PR Process\n\n- Please **self-review** your code changes before sending your PR. This will\n  prevent simple, obvious errors from causing delays.\n\n- Maintain a **clean commit history** and use **meaningful commit messages**.\n  PRs with messy commit histories are difficult to review and won't be merged.\n  Before sending your PR, ensure your changes are based on top of the latest\n  `upstream/master` commits, and avoid rebasing in the middle of a code review.\n  You should **never use `git push -f`** unless absolutely necessary during a\n  review, as it can interfere with GitHub's tracking of comments.\n\n- Unless your PR is trivial, you should **expect reviewer comments** that you\n  will need to address before merging. We'll label the PR as `Status: Requires\n  Reporter Clarification` if we expect you to respond to these comments in a\n  timely manner. If the PR remains inactive for 6 days, it will be marked as\n  `stale`, and we will automatically close it after 7 days if we don't hear back\n  from you. Please feel free to ping issues or bugs if you do not get a response\n  within a week.\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/GOVERNANCE.md",
    "content": "This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md).\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/LICENSE",
    "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 [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": "vendor/google.golang.org/grpc/MAINTAINERS.md",
    "content": "This page lists all active maintainers of this repository. If you were a\nmaintainer and would like to add your name to the Emeritus list, please send us a\nPR.\n\nSee [GOVERNANCE.md](https://github.com/grpc/grpc-community/blob/master/governance.md)\nfor governance guidelines and how to become a maintainer.\nSee [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md)\nfor general contribution guidelines.\n\n## Maintainers (in alphabetical order)\n\n- [arjan-bal](https://github.com/arjan-bal), Google LLC\n- [arvindbr8](https://github.com/arvindbr8), Google LLC\n- [atollena](https://github.com/atollena), Datadog, Inc.\n- [dfawley](https://github.com/dfawley), Google LLC\n- [easwars](https://github.com/easwars), Google LLC\n- [gtcooke94](https://github.com/gtcooke94), Google LLC\n\n## Emeritus Maintainers (in alphabetical order)\n- [adelez](https://github.com/adelez)\n- [aranjans](https://github.com/aranjans)\n- [canguler](https://github.com/canguler)\n- [cesarghali](https://github.com/cesarghali)\n- [erm-g](https://github.com/erm-g)\n- [iamqizhao](https://github.com/iamqizhao)\n- [jeanbza](https://github.com/jeanbza)\n- [jtattermusch](https://github.com/jtattermusch)\n- [lyuxuan](https://github.com/lyuxuan)\n- [makmukhi](https://github.com/makmukhi)\n- [matt-kwong](https://github.com/matt-kwong)\n- [menghanl](https://github.com/menghanl)\n- [nicolasnoble](https://github.com/nicolasnoble)\n- [purnesh42h](https://github.com/purnesh42h)\n- [srini100](https://github.com/srini100)\n- [yongni](https://github.com/yongni)\n- [zasweq](https://github.com/zasweq)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/Makefile",
    "content": "all: vet test testrace\n\nbuild:\n\tgo build google.golang.org/grpc/...\n\nclean:\n\tgo clean -i google.golang.org/grpc/...\n\ndeps:\n\tGO111MODULE=on go get -d -v google.golang.org/grpc/...\n\nproto:\n\t@ if ! which protoc > /dev/null; then \\\n\t\techo \"error: protoc not installed\" >&2; \\\n\t\texit 1; \\\n\tfi\n\tgo generate google.golang.org/grpc/...\n\ntest:\n\tgo test -cpu 1,4 -timeout 7m google.golang.org/grpc/...\n\ntestsubmodule:\n\tcd security/advancedtls && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/advancedtls/...\n\tcd security/authorization && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/authorization/...\n\ntestrace:\n\tgo test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/...\n\ntestdeps:\n\tGO111MODULE=on go get -d -v -t google.golang.org/grpc/...\n\nvet: vetdeps\n\t./scripts/vet.sh\n\nvetdeps:\n\t./scripts/vet.sh -install\n\n.PHONY: \\\n\tall \\\n\tbuild \\\n\tclean \\\n\tdeps \\\n\tproto \\\n\ttest \\\n\ttestsubmodule \\\n\ttestrace \\\n\ttestdeps \\\n\tvet \\\n\tvetdeps\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/NOTICE.txt",
    "content": "Copyright 2014 gRPC authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/README.md",
    "content": "# gRPC-Go\n\n[![GoDoc](https://pkg.go.dev/badge/google.golang.org/grpc)][API]\n[![GoReportCard](https://goreportcard.com/badge/grpc/grpc-go)](https://goreportcard.com/report/github.com/grpc/grpc-go)\n[![codecov](https://codecov.io/gh/grpc/grpc-go/graph/badge.svg)](https://codecov.io/gh/grpc/grpc-go)\n\nThe [Go][] implementation of [gRPC][]: A high performance, open source, general\nRPC framework that puts mobile and HTTP/2 first. For more information see the\n[Go gRPC docs][], or jump directly into the [quick start][].\n\n## Prerequisites\n\n- **[Go][]**: any one of the **two latest major** [releases][go-releases].\n\n## Installation\n\nSimply add the following import to your code, and then `go [build|run|test]`\nwill automatically fetch the necessary dependencies:\n\n\n```go\nimport \"google.golang.org/grpc\"\n```\n\n> **Note:** If you are trying to access `grpc-go` from **China**, see the\n> [FAQ](#FAQ) below.\n\n## Learn more\n\n- [Go gRPC docs][], which include a [quick start][] and [API\n  reference][API] among other resources\n- [Low-level technical docs](Documentation) from this repository\n- [Performance benchmark][]\n- [Examples](examples)\n- [Contribution guidelines](CONTRIBUTING.md)\n\n## FAQ\n\n### I/O Timeout Errors\n\nThe `golang.org` domain may be blocked from some countries. `go get` usually\nproduces an error like the following when this happens:\n\n```console\n$ go get -u google.golang.org/grpc\npackage google.golang.org/grpc: unrecognized import path \"google.golang.org/grpc\" (https fetch: Get https://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)\n```\n\nTo build Go code, there are several options:\n\n- Set up a VPN and access google.golang.org through that.\n\n- With Go module support: it is possible to use the `replace` feature of `go\n  mod` to create aliases for golang.org packages.  In your project's directory:\n\n  ```sh\n  go mod edit -replace=google.golang.org/grpc=github.com/grpc/grpc-go@latest\n  go mod tidy\n  go mod vendor\n  go build -mod=vendor\n  ```\n\n  Again, this will need to be done for all transitive dependencies hosted on\n  golang.org as well. For details, refer to [golang/go issue\n  #28652](https://github.com/golang/go/issues/28652).\n\n### Compiling error, undefined: grpc.SupportPackageIsVersion\n\nPlease update to the latest version of gRPC-Go using\n`go get google.golang.org/grpc`.\n\n### How to turn on logging\n\nThe default logger is controlled by environment variables. Turn everything on\nlike this:\n\n```console\n$ export GRPC_GO_LOG_VERBOSITY_LEVEL=99\n$ export GRPC_GO_LOG_SEVERITY_LEVEL=info\n```\n\n### The RPC failed with error `\"code = Unavailable desc = transport is closing\"`\n\nThis error means the connection the RPC is using was closed, and there are many\npossible reasons, including:\n 1. mis-configured transport credentials, connection failed on handshaking\n 1. bytes disrupted, possibly by a proxy in between\n 1. server shutdown\n 1. Keepalive parameters caused connection shutdown, for example if you have\n    configured your server to terminate connections regularly to [trigger DNS\n    lookups](https://github.com/grpc/grpc-go/issues/3170#issuecomment-552517779).\n    If this is the case, you may want to increase your\n    [MaxConnectionAgeGrace](https://pkg.go.dev/google.golang.org/grpc/keepalive?tab=doc#ServerParameters),\n    to allow longer RPC calls to finish.\n\nIt can be tricky to debug this because the error happens on the client side but\nthe root cause of the connection being closed is on the server side. Turn on\nlogging on __both client and server__, and see if there are any transport\nerrors.\n\n[API]: https://pkg.go.dev/google.golang.org/grpc\n[Go]: https://golang.org\n[Go module]: https://github.com/golang/go/wiki/Modules\n[gRPC]: https://grpc.io\n[Go gRPC docs]: https://grpc.io/docs/languages/go\n[Performance benchmark]: https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5180705743044608\n[quick start]: https://grpc.io/docs/languages/go/quickstart\n[go-releases]: https://golang.org/doc/devel/release.html\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/SECURITY.md",
    "content": "# Security Policy\n\nFor information on gRPC Security Policy and reporting potential security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md).\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/attributes/attributes.go",
    "content": "/*\n *\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package attributes defines a generic key/value store used in various gRPC\n// components.\n//\n// # Experimental\n//\n// Notice: This package is EXPERIMENTAL and may be changed or removed in a\n// later release.\npackage attributes\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Attributes is an immutable struct for storing and retrieving generic\n// key/value pairs.  Keys must be hashable, and users should define their own\n// types for keys.  Values should not be modified after they are added to an\n// Attributes or if they were received from one.  If values implement 'Equal(o\n// any) bool', it will be called by (*Attributes).Equal to determine whether\n// two values with the same key should be considered equal.\ntype Attributes struct {\n\tm map[any]any\n}\n\n// New returns a new Attributes containing the key/value pair.\nfunc New(key, value any) *Attributes {\n\treturn &Attributes{m: map[any]any{key: value}}\n}\n\n// WithValue returns a new Attributes containing the previous keys and values\n// and the new key/value pair.  If the same key appears multiple times, the\n// last value overwrites all previous values for that key.  To remove an\n// existing key, use a nil value.  value should not be modified later.\nfunc (a *Attributes) WithValue(key, value any) *Attributes {\n\tif a == nil {\n\t\treturn New(key, value)\n\t}\n\tn := &Attributes{m: make(map[any]any, len(a.m)+1)}\n\tfor k, v := range a.m {\n\t\tn.m[k] = v\n\t}\n\tn.m[key] = value\n\treturn n\n}\n\n// Value returns the value associated with these attributes for key, or nil if\n// no value is associated with key.  The returned value should not be modified.\nfunc (a *Attributes) Value(key any) any {\n\tif a == nil {\n\t\treturn nil\n\t}\n\treturn a.m[key]\n}\n\n// Equal returns whether a and o are equivalent.  If 'Equal(o any) bool' is\n// implemented for a value in the attributes, it is called to determine if the\n// value matches the one stored in the other attributes.  If Equal is not\n// implemented, standard equality is used to determine if the two values are\n// equal. Note that some types (e.g. maps) aren't comparable by default, so\n// they must be wrapped in a struct, or in an alias type, with Equal defined.\nfunc (a *Attributes) Equal(o *Attributes) bool {\n\tif a == nil && o == nil {\n\t\treturn true\n\t}\n\tif a == nil || o == nil {\n\t\treturn false\n\t}\n\tif len(a.m) != len(o.m) {\n\t\treturn false\n\t}\n\tfor k, v := range a.m {\n\t\tov, ok := o.m[k]\n\t\tif !ok {\n\t\t\t// o missing element of a\n\t\t\treturn false\n\t\t}\n\t\tif eq, ok := v.(interface{ Equal(o any) bool }); ok {\n\t\t\tif !eq.Equal(ov) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else if v != ov {\n\t\t\t// Fallback to a standard equality check if Value is unimplemented.\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// String prints the attribute map. If any key or values throughout the map\n// implement fmt.Stringer, it calls that method and appends.\nfunc (a *Attributes) String() string {\n\tvar sb strings.Builder\n\tsb.WriteString(\"{\")\n\tfirst := true\n\tfor k, v := range a.m {\n\t\tif !first {\n\t\t\tsb.WriteString(\", \")\n\t\t}\n\t\tsb.WriteString(fmt.Sprintf(\"%q: %q \", str(k), str(v)))\n\t\tfirst = false\n\t}\n\tsb.WriteString(\"}\")\n\treturn sb.String()\n}\n\nfunc str(x any) (s string) {\n\tif v, ok := x.(fmt.Stringer); ok {\n\t\treturn fmt.Sprint(v)\n\t} else if v, ok := x.(string); ok {\n\t\treturn v\n\t}\n\treturn fmt.Sprintf(\"<%p>\", x)\n}\n\n// MarshalJSON helps implement the json.Marshaler interface, thereby rendering\n// the Attributes correctly when printing (via pretty.JSON) structs containing\n// Attributes as fields.\n//\n// Is it impossible to unmarshal attributes from a JSON representation and this\n// method is meant only for debugging purposes.\nfunc (a *Attributes) MarshalJSON() ([]byte, error) {\n\treturn []byte(a.String()), nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/backoff/backoff.go",
    "content": "/*\n *\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package backoff provides configuration options for backoff.\n//\n// More details can be found at:\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\n//\n// All APIs in this package are experimental.\npackage backoff\n\nimport \"time\"\n\n// Config defines the configuration options for backoff.\ntype Config struct {\n\t// BaseDelay is the amount of time to backoff after the first failure.\n\tBaseDelay time.Duration\n\t// Multiplier is the factor with which to multiply backoffs after a\n\t// failed retry. Should ideally be greater than 1.\n\tMultiplier float64\n\t// Jitter is the factor with which backoffs are randomized.\n\tJitter float64\n\t// MaxDelay is the upper bound of backoff delay.\n\tMaxDelay time.Duration\n}\n\n// DefaultConfig is a backoff configuration with the default values specified\n// at https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\n//\n// This should be useful for callers who want to configure backoff with\n// non-default values only for a subset of the options.\nvar DefaultConfig = Config{\n\tBaseDelay:  1.0 * time.Second,\n\tMultiplier: 1.6,\n\tJitter:     0.2,\n\tMaxDelay:   120 * time.Second,\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/backoff.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// See internal/backoff package for the backoff implementation. This file is\n// kept for the exported types and API backward compatibility.\n\npackage grpc\n\nimport (\n\t\"time\"\n\n\t\"google.golang.org/grpc/backoff\"\n)\n\n// DefaultBackoffConfig uses values specified for backoff in\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\n//\n// Deprecated: use ConnectParams instead. Will be supported throughout 1.x.\nvar DefaultBackoffConfig = BackoffConfig{\n\tMaxDelay: 120 * time.Second,\n}\n\n// BackoffConfig defines the parameters for the default gRPC backoff strategy.\n//\n// Deprecated: use ConnectParams instead. Will be supported throughout 1.x.\ntype BackoffConfig struct {\n\t// MaxDelay is the upper bound of backoff delay.\n\tMaxDelay time.Duration\n}\n\n// ConnectParams defines the parameters for connecting and retrying. Users are\n// encouraged to use this instead of the BackoffConfig type defined above. See\n// here for more details:\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype ConnectParams struct {\n\t// Backoff specifies the configuration options for connection backoff.\n\tBackoff backoff.Config\n\t// MinConnectTimeout is the minimum amount of time we are willing to give a\n\t// connection to complete.\n\tMinConnectTimeout time.Duration\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/balancer.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package balancer defines APIs for load balancing in gRPC.\n// All APIs in this package are experimental.\npackage balancer\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/channelz\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/credentials\"\n\testats \"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nvar (\n\t// m is a map from name to balancer builder.\n\tm = make(map[string]Builder)\n\n\tlogger = grpclog.Component(\"balancer\")\n)\n\n// Register registers the balancer builder to the balancer map. b.Name\n// (lowercased) will be used as the name registered with this builder.  If the\n// Builder implements ConfigParser, ParseConfig will be called when new service\n// configs are received by the resolver, and the result will be provided to the\n// Balancer in UpdateClientConnState.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple Balancers are\n// registered with the same name, the one registered last will take effect.\nfunc Register(b Builder) {\n\tname := strings.ToLower(b.Name())\n\tif name != b.Name() {\n\t\t// TODO: Skip the use of strings.ToLower() to index the map after v1.59\n\t\t// is released to switch to case sensitive balancer registry. Also,\n\t\t// remove this warning and update the docstrings for Register and Get.\n\t\tlogger.Warningf(\"Balancer registered with name %q. grpc-go will be switching to case sensitive balancer registries soon\", b.Name())\n\t}\n\tm[name] = b\n}\n\n// unregisterForTesting deletes the balancer with the given name from the\n// balancer map.\n//\n// This function is not thread-safe.\nfunc unregisterForTesting(name string) {\n\tdelete(m, name)\n}\n\nfunc init() {\n\tinternal.BalancerUnregister = unregisterForTesting\n\tinternal.ConnectedAddress = connectedAddress\n\tinternal.SetConnectedAddress = setConnectedAddress\n}\n\n// Get returns the resolver builder registered with the given name.\n// Note that the compare is done in a case-insensitive fashion.\n// If no builder is register with the name, nil will be returned.\nfunc Get(name string) Builder {\n\tif strings.ToLower(name) != name {\n\t\t// TODO: Skip the use of strings.ToLower() to index the map after v1.59\n\t\t// is released to switch to case sensitive balancer registry. Also,\n\t\t// remove this warning and update the docstrings for Register and Get.\n\t\tlogger.Warningf(\"Balancer retrieved for name %q. grpc-go will be switching to case sensitive balancer registries soon\", name)\n\t}\n\tif b, ok := m[strings.ToLower(name)]; ok {\n\t\treturn b\n\t}\n\treturn nil\n}\n\n// NewSubConnOptions contains options to create new SubConn.\ntype NewSubConnOptions struct {\n\t// CredsBundle is the credentials bundle that will be used in the created\n\t// SubConn. If it's nil, the original creds from grpc DialOptions will be\n\t// used.\n\t//\n\t// Deprecated: Use the Attributes field in resolver.Address to pass\n\t// arbitrary data to the credential handshaker.\n\tCredsBundle credentials.Bundle\n\t// HealthCheckEnabled indicates whether health check service should be\n\t// enabled on this SubConn\n\tHealthCheckEnabled bool\n\t// StateListener is called when the state of the subconn changes.  If nil,\n\t// Balancer.UpdateSubConnState will be called instead.  Will never be\n\t// invoked until after Connect() is called on the SubConn created with\n\t// these options.\n\tStateListener func(SubConnState)\n}\n\n// State contains the balancer's state relevant to the gRPC ClientConn.\ntype State struct {\n\t// State contains the connectivity state of the balancer, which is used to\n\t// determine the state of the ClientConn.\n\tConnectivityState connectivity.State\n\t// Picker is used to choose connections (SubConns) for RPCs.\n\tPicker Picker\n}\n\n// ClientConn represents a gRPC ClientConn.\n//\n// This interface is to be implemented by gRPC. Users should not need a\n// brand new implementation of this interface. For the situations like\n// testing, the new implementation should embed this interface. This allows\n// gRPC to add new methods to this interface.\n//\n// NOTICE: This interface is intended to be implemented by gRPC, or intercepted\n// by custom load balancing polices.  Users should not need their own complete\n// implementation of this interface -- they should always delegate to a\n// ClientConn passed to Builder.Build() by embedding it in their\n// implementations. An embedded ClientConn must never be nil, or runtime panics\n// will occur.\ntype ClientConn interface {\n\t// NewSubConn is called by balancer to create a new SubConn.\n\t// It doesn't block and wait for the connections to be established.\n\t// Behaviors of the SubConn can be controlled by options.\n\t//\n\t// Deprecated: please be aware that in a future version, SubConns will only\n\t// support one address per SubConn.\n\tNewSubConn([]resolver.Address, NewSubConnOptions) (SubConn, error)\n\t// RemoveSubConn removes the SubConn from ClientConn.\n\t// The SubConn will be shutdown.\n\t//\n\t// Deprecated: use SubConn.Shutdown instead.\n\tRemoveSubConn(SubConn)\n\t// UpdateAddresses updates the addresses used in the passed in SubConn.\n\t// gRPC checks if the currently connected address is still in the new list.\n\t// If so, the connection will be kept. Else, the connection will be\n\t// gracefully closed, and a new connection will be created.\n\t//\n\t// This may trigger a state transition for the SubConn.\n\t//\n\t// Deprecated: this method will be removed.  Create new SubConns for new\n\t// addresses instead.\n\tUpdateAddresses(SubConn, []resolver.Address)\n\n\t// UpdateState notifies gRPC that the balancer's internal state has\n\t// changed.\n\t//\n\t// gRPC will update the connectivity state of the ClientConn, and will call\n\t// Pick on the new Picker to pick new SubConns.\n\tUpdateState(State)\n\n\t// ResolveNow is called by balancer to notify gRPC to do a name resolving.\n\tResolveNow(resolver.ResolveNowOptions)\n\n\t// Target returns the dial target for this ClientConn.\n\t//\n\t// Deprecated: Use the Target field in the BuildOptions instead.\n\tTarget() string\n\n\t// MetricsRecorder provides the metrics recorder that balancers can use to\n\t// record metrics. Balancer implementations which do not register metrics on\n\t// metrics registry and record on them can ignore this method. The returned\n\t// MetricsRecorder is guaranteed to never be nil.\n\tMetricsRecorder() estats.MetricsRecorder\n\n\t// EnforceClientConnEmbedding is included to force implementers to embed\n\t// another implementation of this interface, allowing gRPC to add methods\n\t// without breaking users.\n\tinternal.EnforceClientConnEmbedding\n}\n\n// BuildOptions contains additional information for Build.\ntype BuildOptions struct {\n\t// DialCreds is the transport credentials to use when communicating with a\n\t// remote load balancer server. Balancer implementations which do not\n\t// communicate with a remote load balancer server can ignore this field.\n\tDialCreds credentials.TransportCredentials\n\t// CredsBundle is the credentials bundle to use when communicating with a\n\t// remote load balancer server. Balancer implementations which do not\n\t// communicate with a remote load balancer server can ignore this field.\n\tCredsBundle credentials.Bundle\n\t// Dialer is the custom dialer to use when communicating with a remote load\n\t// balancer server. Balancer implementations which do not communicate with a\n\t// remote load balancer server can ignore this field.\n\tDialer func(context.Context, string) (net.Conn, error)\n\t// Authority is the server name to use as part of the authentication\n\t// handshake when communicating with a remote load balancer server. Balancer\n\t// implementations which do not communicate with a remote load balancer\n\t// server can ignore this field.\n\tAuthority string\n\t// ChannelzParent is the parent ClientConn's channelz channel.\n\tChannelzParent channelz.Identifier\n\t// CustomUserAgent is the custom user agent set on the parent ClientConn.\n\t// The balancer should set the same custom user agent if it creates a\n\t// ClientConn.\n\tCustomUserAgent string\n\t// Target contains the parsed address info of the dial target. It is the\n\t// same resolver.Target as passed to the resolver. See the documentation for\n\t// the resolver.Target type for details about what it contains.\n\tTarget resolver.Target\n}\n\n// Builder creates a balancer.\ntype Builder interface {\n\t// Build creates a new balancer with the ClientConn.\n\tBuild(cc ClientConn, opts BuildOptions) Balancer\n\t// Name returns the name of balancers built by this builder.\n\t// It will be used to pick balancers (for example in service config).\n\tName() string\n}\n\n// ConfigParser parses load balancer configs.\ntype ConfigParser interface {\n\t// ParseConfig parses the JSON load balancer config provided into an\n\t// internal form or returns an error if the config is invalid.  For future\n\t// compatibility reasons, unknown fields in the config should be ignored.\n\tParseConfig(LoadBalancingConfigJSON json.RawMessage) (serviceconfig.LoadBalancingConfig, error)\n}\n\n// PickInfo contains additional information for the Pick operation.\ntype PickInfo struct {\n\t// FullMethodName is the method name that NewClientStream() is called\n\t// with. The canonical format is /service/Method.\n\tFullMethodName string\n\t// Ctx is the RPC's context, and may contain relevant RPC-level information\n\t// like the outgoing header metadata.\n\tCtx context.Context\n}\n\n// DoneInfo contains additional information for done.\ntype DoneInfo struct {\n\t// Err is the rpc error the RPC finished with. It could be nil.\n\tErr error\n\t// Trailer contains the metadata from the RPC's trailer, if present.\n\tTrailer metadata.MD\n\t// BytesSent indicates if any bytes have been sent to the server.\n\tBytesSent bool\n\t// BytesReceived indicates if any byte has been received from the server.\n\tBytesReceived bool\n\t// ServerLoad is the load received from server. It's usually sent as part of\n\t// trailing metadata.\n\t//\n\t// The only supported type now is *orca_v3.LoadReport.\n\tServerLoad any\n}\n\nvar (\n\t// ErrNoSubConnAvailable indicates no SubConn is available for pick().\n\t// gRPC will block the RPC until a new picker is available via UpdateState().\n\tErrNoSubConnAvailable = errors.New(\"no SubConn is available\")\n\t// ErrTransientFailure indicates all SubConns are in TransientFailure.\n\t// WaitForReady RPCs will block, non-WaitForReady RPCs will fail.\n\t//\n\t// Deprecated: return an appropriate error based on the last resolution or\n\t// connection attempt instead.  The behavior is the same for any non-gRPC\n\t// status error.\n\tErrTransientFailure = errors.New(\"all SubConns are in TransientFailure\")\n)\n\n// PickResult contains information related to a connection chosen for an RPC.\ntype PickResult struct {\n\t// SubConn is the connection to use for this pick, if its state is Ready.\n\t// If the state is not Ready, gRPC will block the RPC until a new Picker is\n\t// provided by the balancer (using ClientConn.UpdateState).  The SubConn\n\t// must be one returned by ClientConn.NewSubConn.\n\tSubConn SubConn\n\n\t// Done is called when the RPC is completed.  If the SubConn is not ready,\n\t// this will be called with a nil parameter.  If the SubConn is not a valid\n\t// type, Done may not be called.  May be nil if the balancer does not wish\n\t// to be notified when the RPC completes.\n\tDone func(DoneInfo)\n\n\t// Metadata provides a way for LB policies to inject arbitrary per-call\n\t// metadata. Any metadata returned here will be merged with existing\n\t// metadata added by the client application.\n\t//\n\t// LB policies with child policies are responsible for propagating metadata\n\t// injected by their children to the ClientConn, as part of Pick().\n\tMetadata metadata.MD\n}\n\n// TransientFailureError returns e.  It exists for backward compatibility and\n// will be deleted soon.\n//\n// Deprecated: no longer necessary, picker errors are treated this way by\n// default.\nfunc TransientFailureError(e error) error { return e }\n\n// Picker is used by gRPC to pick a SubConn to send an RPC.\n// Balancer is expected to generate a new picker from its snapshot every time its\n// internal state has changed.\n//\n// The pickers used by gRPC can be updated by ClientConn.UpdateState().\ntype Picker interface {\n\t// Pick returns the connection to use for this RPC and related information.\n\t//\n\t// Pick should not block.  If the balancer needs to do I/O or any blocking\n\t// or time-consuming work to service this call, it should return\n\t// ErrNoSubConnAvailable, and the Pick call will be repeated by gRPC when\n\t// the Picker is updated (using ClientConn.UpdateState).\n\t//\n\t// If an error is returned:\n\t//\n\t// - If the error is ErrNoSubConnAvailable, gRPC will block until a new\n\t//   Picker is provided by the balancer (using ClientConn.UpdateState).\n\t//\n\t// - If the error is a status error (implemented by the grpc/status\n\t//   package), gRPC will terminate the RPC with the code and message\n\t//   provided.\n\t//\n\t// - For all other errors, wait for ready RPCs will wait, but non-wait for\n\t//   ready RPCs will be terminated with this error's Error() string and\n\t//   status code Unavailable.\n\tPick(info PickInfo) (PickResult, error)\n}\n\n// Balancer takes input from gRPC, manages SubConns, and collects and aggregates\n// the connectivity states.\n//\n// It also generates and updates the Picker used by gRPC to pick SubConns for RPCs.\n//\n// UpdateClientConnState, ResolverError, UpdateSubConnState, and Close are\n// guaranteed to be called synchronously from the same goroutine.  There's no\n// guarantee on picker.Pick, it may be called anytime.\ntype Balancer interface {\n\t// UpdateClientConnState is called by gRPC when the state of the ClientConn\n\t// changes.  If the error returned is ErrBadResolverState, the ClientConn\n\t// will begin calling ResolveNow on the active name resolver with\n\t// exponential backoff until a subsequent call to UpdateClientConnState\n\t// returns a nil error.  Any other errors are currently ignored.\n\tUpdateClientConnState(ClientConnState) error\n\t// ResolverError is called by gRPC when the name resolver reports an error.\n\tResolverError(error)\n\t// UpdateSubConnState is called by gRPC when the state of a SubConn\n\t// changes.\n\t//\n\t// Deprecated: Use NewSubConnOptions.StateListener when creating the\n\t// SubConn instead.\n\tUpdateSubConnState(SubConn, SubConnState)\n\t// Close closes the balancer. The balancer is not currently required to\n\t// call SubConn.Shutdown for its existing SubConns; however, this will be\n\t// required in a future release, so it is recommended.\n\tClose()\n\t// ExitIdle instructs the LB policy to reconnect to backends / exit the\n\t// IDLE state, if appropriate and possible.  Note that SubConns that enter\n\t// the IDLE state will not reconnect until SubConn.Connect is called.\n\tExitIdle()\n}\n\n// ExitIdler is an optional interface for balancers to implement.  If\n// implemented, ExitIdle will be called when ClientConn.Connect is called, if\n// the ClientConn is idle.  If unimplemented, ClientConn.Connect will cause\n// all SubConns to connect.\n//\n// Deprecated: All balancers must implement this interface. This interface will\n// be removed in a future release.\ntype ExitIdler interface {\n\t// ExitIdle instructs the LB policy to reconnect to backends / exit the\n\t// IDLE state, if appropriate and possible.  Note that SubConns that enter\n\t// the IDLE state will not reconnect until SubConn.Connect is called.\n\tExitIdle()\n}\n\n// ClientConnState describes the state of a ClientConn relevant to the\n// balancer.\ntype ClientConnState struct {\n\tResolverState resolver.State\n\t// The parsed load balancing configuration returned by the builder's\n\t// ParseConfig method, if implemented.\n\tBalancerConfig serviceconfig.LoadBalancingConfig\n}\n\n// ErrBadResolverState may be returned by UpdateClientConnState to indicate a\n// problem with the provided name resolver data.\nvar ErrBadResolverState = errors.New(\"bad resolver state\")\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/base/balancer.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage base\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\nvar logger = grpclog.Component(\"balancer\")\n\ntype baseBuilder struct {\n\tname          string\n\tpickerBuilder PickerBuilder\n\tconfig        Config\n}\n\nfunc (bb *baseBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer {\n\tbal := &baseBalancer{\n\t\tcc:            cc,\n\t\tpickerBuilder: bb.pickerBuilder,\n\n\t\tsubConns: resolver.NewAddressMapV2[balancer.SubConn](),\n\t\tscStates: make(map[balancer.SubConn]connectivity.State),\n\t\tcsEvltr:  &balancer.ConnectivityStateEvaluator{},\n\t\tconfig:   bb.config,\n\t\tstate:    connectivity.Connecting,\n\t}\n\t// Initialize picker to a picker that always returns\n\t// ErrNoSubConnAvailable, because when state of a SubConn changes, we\n\t// may call UpdateState with this picker.\n\tbal.picker = NewErrPicker(balancer.ErrNoSubConnAvailable)\n\treturn bal\n}\n\nfunc (bb *baseBuilder) Name() string {\n\treturn bb.name\n}\n\ntype baseBalancer struct {\n\tcc            balancer.ClientConn\n\tpickerBuilder PickerBuilder\n\n\tcsEvltr *balancer.ConnectivityStateEvaluator\n\tstate   connectivity.State\n\n\tsubConns *resolver.AddressMapV2[balancer.SubConn]\n\tscStates map[balancer.SubConn]connectivity.State\n\tpicker   balancer.Picker\n\tconfig   Config\n\n\tresolverErr error // the last error reported by the resolver; cleared on successful resolution\n\tconnErr     error // the last connection error; cleared upon leaving TransientFailure\n}\n\nfunc (b *baseBalancer) ResolverError(err error) {\n\tb.resolverErr = err\n\tif b.subConns.Len() == 0 {\n\t\tb.state = connectivity.TransientFailure\n\t}\n\n\tif b.state != connectivity.TransientFailure {\n\t\t// The picker will not change since the balancer does not currently\n\t\t// report an error.\n\t\treturn\n\t}\n\tb.regeneratePicker()\n\tb.cc.UpdateState(balancer.State{\n\t\tConnectivityState: b.state,\n\t\tPicker:            b.picker,\n\t})\n}\n\nfunc (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error {\n\t// TODO: handle s.ResolverState.ServiceConfig?\n\tif logger.V(2) {\n\t\tlogger.Info(\"base.baseBalancer: got new ClientConn state: \", s)\n\t}\n\t// Successful resolution; clear resolver error and ensure we return nil.\n\tb.resolverErr = nil\n\t// addrsSet is the set converted from addrs, it's used for quick lookup of an address.\n\taddrsSet := resolver.NewAddressMapV2[any]()\n\tfor _, a := range s.ResolverState.Addresses {\n\t\taddrsSet.Set(a, nil)\n\t\tif _, ok := b.subConns.Get(a); !ok {\n\t\t\t// a is a new address (not existing in b.subConns).\n\t\t\tvar sc balancer.SubConn\n\t\t\topts := balancer.NewSubConnOptions{\n\t\t\t\tHealthCheckEnabled: b.config.HealthCheck,\n\t\t\t\tStateListener:      func(scs balancer.SubConnState) { b.updateSubConnState(sc, scs) },\n\t\t\t}\n\t\t\tsc, err := b.cc.NewSubConn([]resolver.Address{a}, opts)\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warningf(\"base.baseBalancer: failed to create new SubConn: %v\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tb.subConns.Set(a, sc)\n\t\t\tb.scStates[sc] = connectivity.Idle\n\t\t\tb.csEvltr.RecordTransition(connectivity.Shutdown, connectivity.Idle)\n\t\t\tsc.Connect()\n\t\t}\n\t}\n\tfor _, a := range b.subConns.Keys() {\n\t\tsc, _ := b.subConns.Get(a)\n\t\t// a was removed by resolver.\n\t\tif _, ok := addrsSet.Get(a); !ok {\n\t\t\tsc.Shutdown()\n\t\t\tb.subConns.Delete(a)\n\t\t\t// Keep the state of this sc in b.scStates until sc's state becomes Shutdown.\n\t\t\t// The entry will be deleted in updateSubConnState.\n\t\t}\n\t}\n\t// If resolver state contains no addresses, return an error so ClientConn\n\t// will trigger re-resolve. Also records this as a resolver error, so when\n\t// the overall state turns transient failure, the error message will have\n\t// the zero address information.\n\tif len(s.ResolverState.Addresses) == 0 {\n\t\tb.ResolverError(errors.New(\"produced zero addresses\"))\n\t\treturn balancer.ErrBadResolverState\n\t}\n\n\tb.regeneratePicker()\n\tb.cc.UpdateState(balancer.State{ConnectivityState: b.state, Picker: b.picker})\n\treturn nil\n}\n\n// mergeErrors builds an error from the last connection error and the last\n// resolver error.  Must only be called if b.state is TransientFailure.\nfunc (b *baseBalancer) mergeErrors() error {\n\t// connErr must always be non-nil unless there are no SubConns, in which\n\t// case resolverErr must be non-nil.\n\tif b.connErr == nil {\n\t\treturn fmt.Errorf(\"last resolver error: %v\", b.resolverErr)\n\t}\n\tif b.resolverErr == nil {\n\t\treturn fmt.Errorf(\"last connection error: %v\", b.connErr)\n\t}\n\treturn fmt.Errorf(\"last connection error: %v; last resolver error: %v\", b.connErr, b.resolverErr)\n}\n\n// regeneratePicker takes a snapshot of the balancer, and generates a picker\n// from it. The picker is\n//   - errPicker if the balancer is in TransientFailure,\n//   - built by the pickerBuilder with all READY SubConns otherwise.\nfunc (b *baseBalancer) regeneratePicker() {\n\tif b.state == connectivity.TransientFailure {\n\t\tb.picker = NewErrPicker(b.mergeErrors())\n\t\treturn\n\t}\n\treadySCs := make(map[balancer.SubConn]SubConnInfo)\n\n\t// Filter out all ready SCs from full subConn map.\n\tfor _, addr := range b.subConns.Keys() {\n\t\tsc, _ := b.subConns.Get(addr)\n\t\tif st, ok := b.scStates[sc]; ok && st == connectivity.Ready {\n\t\t\treadySCs[sc] = SubConnInfo{Address: addr}\n\t\t}\n\t}\n\tb.picker = b.pickerBuilder.Build(PickerBuildInfo{ReadySCs: readySCs})\n}\n\n// UpdateSubConnState is a nop because a StateListener is always set in NewSubConn.\nfunc (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.SubConnState) {\n\tlogger.Errorf(\"base.baseBalancer: UpdateSubConnState(%v, %+v) called unexpectedly\", sc, state)\n}\n\nfunc (b *baseBalancer) updateSubConnState(sc balancer.SubConn, state balancer.SubConnState) {\n\ts := state.ConnectivityState\n\tif logger.V(2) {\n\t\tlogger.Infof(\"base.baseBalancer: handle SubConn state change: %p, %v\", sc, s)\n\t}\n\toldS, ok := b.scStates[sc]\n\tif !ok {\n\t\tif logger.V(2) {\n\t\t\tlogger.Infof(\"base.baseBalancer: got state changes for an unknown SubConn: %p, %v\", sc, s)\n\t\t}\n\t\treturn\n\t}\n\tif oldS == connectivity.TransientFailure &&\n\t\t(s == connectivity.Connecting || s == connectivity.Idle) {\n\t\t// Once a subconn enters TRANSIENT_FAILURE, ignore subsequent IDLE or\n\t\t// CONNECTING transitions to prevent the aggregated state from being\n\t\t// always CONNECTING when many backends exist but are all down.\n\t\tif s == connectivity.Idle {\n\t\t\tsc.Connect()\n\t\t}\n\t\treturn\n\t}\n\tb.scStates[sc] = s\n\tswitch s {\n\tcase connectivity.Idle:\n\t\tsc.Connect()\n\tcase connectivity.Shutdown:\n\t\t// When an address was removed by resolver, b called Shutdown but kept\n\t\t// the sc's state in scStates. Remove state for this sc here.\n\t\tdelete(b.scStates, sc)\n\tcase connectivity.TransientFailure:\n\t\t// Save error to be reported via picker.\n\t\tb.connErr = state.ConnectionError\n\t}\n\n\tb.state = b.csEvltr.RecordTransition(oldS, s)\n\n\t// Regenerate picker when one of the following happens:\n\t//  - this sc entered or left ready\n\t//  - the aggregated state of balancer is TransientFailure\n\t//    (may need to update error message)\n\tif (s == connectivity.Ready) != (oldS == connectivity.Ready) ||\n\t\tb.state == connectivity.TransientFailure {\n\t\tb.regeneratePicker()\n\t}\n\tb.cc.UpdateState(balancer.State{ConnectivityState: b.state, Picker: b.picker})\n}\n\n// Close is a nop because base balancer doesn't have internal state to clean up,\n// and it doesn't need to call Shutdown for the SubConns.\nfunc (b *baseBalancer) Close() {\n}\n\n// ExitIdle is a nop because the base balancer attempts to stay connected to\n// all SubConns at all times.\nfunc (b *baseBalancer) ExitIdle() {\n}\n\n// NewErrPicker returns a Picker that always returns err on Pick().\nfunc NewErrPicker(err error) balancer.Picker {\n\treturn &errPicker{err: err}\n}\n\n// NewErrPickerV2 is temporarily defined for backward compatibility reasons.\n//\n// Deprecated: use NewErrPicker instead.\nvar NewErrPickerV2 = NewErrPicker\n\ntype errPicker struct {\n\terr error // Pick() always returns this err.\n}\n\nfunc (p *errPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) {\n\treturn balancer.PickResult{}, p.err\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/base/base.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package base defines a balancer base that can be used to build balancers with\n// different picking algorithms.\n//\n// The base balancer creates a new SubConn for each resolved address. The\n// provided picker will only be notified about READY SubConns.\n//\n// This package is the base of round_robin balancer, its purpose is to be used\n// to build round_robin like balancers with complex picking algorithms.\n// Balancers with more complicated logic should try to implement a balancer\n// builder from scratch.\n//\n// All APIs in this package are experimental.\npackage base\n\nimport (\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// PickerBuilder creates balancer.Picker.\ntype PickerBuilder interface {\n\t// Build returns a picker that will be used by gRPC to pick a SubConn.\n\tBuild(info PickerBuildInfo) balancer.Picker\n}\n\n// PickerBuildInfo contains information needed by the picker builder to\n// construct a picker.\ntype PickerBuildInfo struct {\n\t// ReadySCs is a map from all ready SubConns to the Addresses used to\n\t// create them.\n\tReadySCs map[balancer.SubConn]SubConnInfo\n}\n\n// SubConnInfo contains information about a SubConn created by the base\n// balancer.\ntype SubConnInfo struct {\n\tAddress resolver.Address // the address used to create this SubConn\n}\n\n// Config contains the config info about the base balancer builder.\ntype Config struct {\n\t// HealthCheck indicates whether health checking should be enabled for this specific balancer.\n\tHealthCheck bool\n}\n\n// NewBalancerBuilder returns a base balancer builder configured by the provided config.\nfunc NewBalancerBuilder(name string, pb PickerBuilder, config Config) balancer.Builder {\n\treturn &baseBuilder{\n\t\tname:          name,\n\t\tpickerBuilder: pb,\n\t\tconfig:        config,\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go",
    "content": "/*\n *\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage balancer\n\nimport \"google.golang.org/grpc/connectivity\"\n\n// ConnectivityStateEvaluator takes the connectivity states of multiple SubConns\n// and returns one aggregated connectivity state.\n//\n// It's not thread safe.\ntype ConnectivityStateEvaluator struct {\n\tnumReady            uint64 // Number of addrConns in ready state.\n\tnumConnecting       uint64 // Number of addrConns in connecting state.\n\tnumTransientFailure uint64 // Number of addrConns in transient failure state.\n\tnumIdle             uint64 // Number of addrConns in idle state.\n}\n\n// RecordTransition records state change happening in subConn and based on that\n// it evaluates what aggregated state should be.\n//\n//   - If at least one SubConn in Ready, the aggregated state is Ready;\n//   - Else if at least one SubConn in Connecting, the aggregated state is Connecting;\n//   - Else if at least one SubConn is Idle, the aggregated state is Idle;\n//   - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure.\n//\n// Shutdown is not considered.\nfunc (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {\n\t// Update counters.\n\tfor idx, state := range []connectivity.State{oldState, newState} {\n\t\tupdateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.\n\t\tswitch state {\n\t\tcase connectivity.Ready:\n\t\t\tcse.numReady += updateVal\n\t\tcase connectivity.Connecting:\n\t\t\tcse.numConnecting += updateVal\n\t\tcase connectivity.TransientFailure:\n\t\t\tcse.numTransientFailure += updateVal\n\t\tcase connectivity.Idle:\n\t\t\tcse.numIdle += updateVal\n\t\t}\n\t}\n\treturn cse.CurrentState()\n}\n\n// CurrentState returns the current aggregate conn state by evaluating the counters\nfunc (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State {\n\t// Evaluate.\n\tif cse.numReady > 0 {\n\t\treturn connectivity.Ready\n\t}\n\tif cse.numConnecting > 0 {\n\t\treturn connectivity.Connecting\n\t}\n\tif cse.numIdle > 0 {\n\t\treturn connectivity.Idle\n\t}\n\treturn connectivity.TransientFailure\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/endpointsharding/endpointsharding.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package endpointsharding implements a load balancing policy that manages\n// homogeneous child policies each owning a single endpoint.\n//\n// # Experimental\n//\n// Notice: This package is EXPERIMENTAL and may be changed or removed in a\n// later release.\npackage endpointsharding\n\nimport (\n\t\"errors\"\n\trand \"math/rand/v2\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/base\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\nvar randIntN = rand.IntN\n\n// ChildState is the balancer state of a child along with the endpoint which\n// identifies the child balancer.\ntype ChildState struct {\n\tEndpoint resolver.Endpoint\n\tState    balancer.State\n\n\t// Balancer exposes only the ExitIdler interface of the child LB policy.\n\t// Other methods of the child policy are called only by endpointsharding.\n\tBalancer ExitIdler\n}\n\n// ExitIdler provides access to only the ExitIdle method of the child balancer.\ntype ExitIdler interface {\n\t// ExitIdle instructs the LB policy to reconnect to backends / exit the\n\t// IDLE state, if appropriate and possible.  Note that SubConns that enter\n\t// the IDLE state will not reconnect until SubConn.Connect is called.\n\tExitIdle()\n}\n\n// Options are the options to configure the behaviour of the\n// endpointsharding balancer.\ntype Options struct {\n\t// DisableAutoReconnect allows the balancer to keep child balancer in the\n\t// IDLE state until they are explicitly triggered to exit using the\n\t// ChildState obtained from the endpointsharding picker. When set to false,\n\t// the endpointsharding balancer will automatically call ExitIdle on child\n\t// connections that report IDLE.\n\tDisableAutoReconnect bool\n}\n\n// ChildBuilderFunc creates a new balancer with the ClientConn. It has the same\n// type as the balancer.Builder.Build method.\ntype ChildBuilderFunc func(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer\n\n// NewBalancer returns a load balancing policy that manages homogeneous child\n// policies each owning a single endpoint. The endpointsharding balancer\n// forwards the LoadBalancingConfig in ClientConn state updates to its children.\nfunc NewBalancer(cc balancer.ClientConn, opts balancer.BuildOptions, childBuilder ChildBuilderFunc, esOpts Options) balancer.Balancer {\n\tes := &endpointSharding{\n\t\tcc:           cc,\n\t\tbOpts:        opts,\n\t\tesOpts:       esOpts,\n\t\tchildBuilder: childBuilder,\n\t}\n\tes.children.Store(resolver.NewEndpointMap[*balancerWrapper]())\n\treturn es\n}\n\n// endpointSharding is a balancer that wraps child balancers. It creates a child\n// balancer with child config for every unique Endpoint received. It updates the\n// child states on any update from parent or child.\ntype endpointSharding struct {\n\tcc           balancer.ClientConn\n\tbOpts        balancer.BuildOptions\n\tesOpts       Options\n\tchildBuilder ChildBuilderFunc\n\n\t// childMu synchronizes calls to any single child. It must be held for all\n\t// calls into a child. To avoid deadlocks, do not acquire childMu while\n\t// holding mu.\n\tchildMu  sync.Mutex\n\tchildren atomic.Pointer[resolver.EndpointMap[*balancerWrapper]]\n\n\t// inhibitChildUpdates is set during UpdateClientConnState/ResolverError\n\t// calls (calls to children will each produce an update, only want one\n\t// update).\n\tinhibitChildUpdates atomic.Bool\n\n\t// mu synchronizes access to the state stored in balancerWrappers in the\n\t// children field. mu must not be held during calls into a child since\n\t// synchronous calls back from the child may require taking mu, causing a\n\t// deadlock. To avoid deadlocks, do not acquire childMu while holding mu.\n\tmu sync.Mutex\n}\n\n// rotateEndpoints returns a slice of all the input endpoints rotated a random\n// amount.\nfunc rotateEndpoints(es []resolver.Endpoint) []resolver.Endpoint {\n\tles := len(es)\n\tif les == 0 {\n\t\treturn es\n\t}\n\tr := randIntN(les)\n\t// Make a copy to avoid mutating data beyond the end of es.\n\tret := make([]resolver.Endpoint, les)\n\tcopy(ret, es[r:])\n\tcopy(ret[les-r:], es[:r])\n\treturn ret\n}\n\n// UpdateClientConnState creates a child for new endpoints and deletes children\n// for endpoints that are no longer present. It also updates all the children,\n// and sends a single synchronous update of the childrens' aggregated state at\n// the end of the UpdateClientConnState operation. If any endpoint has no\n// addresses it will ignore that endpoint. Otherwise, returns first error found\n// from a child, but fully processes the new update.\nfunc (es *endpointSharding) UpdateClientConnState(state balancer.ClientConnState) error {\n\tes.childMu.Lock()\n\tdefer es.childMu.Unlock()\n\n\tes.inhibitChildUpdates.Store(true)\n\tdefer func() {\n\t\tes.inhibitChildUpdates.Store(false)\n\t\tes.updateState()\n\t}()\n\tvar ret error\n\n\tchildren := es.children.Load()\n\tnewChildren := resolver.NewEndpointMap[*balancerWrapper]()\n\n\t// Update/Create new children.\n\tfor _, endpoint := range rotateEndpoints(state.ResolverState.Endpoints) {\n\t\tif _, ok := newChildren.Get(endpoint); ok {\n\t\t\t// Endpoint child was already created, continue to avoid duplicate\n\t\t\t// update.\n\t\t\tcontinue\n\t\t}\n\t\tchildBalancer, ok := children.Get(endpoint)\n\t\tif ok {\n\t\t\t// Endpoint attributes may have changed, update the stored endpoint.\n\t\t\tes.mu.Lock()\n\t\t\tchildBalancer.childState.Endpoint = endpoint\n\t\t\tes.mu.Unlock()\n\t\t} else {\n\t\t\tchildBalancer = &balancerWrapper{\n\t\t\t\tchildState: ChildState{Endpoint: endpoint},\n\t\t\t\tClientConn: es.cc,\n\t\t\t\tes:         es,\n\t\t\t}\n\t\t\tchildBalancer.childState.Balancer = childBalancer\n\t\t\tchildBalancer.child = es.childBuilder(childBalancer, es.bOpts)\n\t\t}\n\t\tnewChildren.Set(endpoint, childBalancer)\n\t\tif err := childBalancer.updateClientConnStateLocked(balancer.ClientConnState{\n\t\t\tBalancerConfig: state.BalancerConfig,\n\t\t\tResolverState: resolver.State{\n\t\t\t\tEndpoints:  []resolver.Endpoint{endpoint},\n\t\t\t\tAttributes: state.ResolverState.Attributes,\n\t\t\t},\n\t\t}); err != nil && ret == nil {\n\t\t\t// Return first error found, and always commit full processing of\n\t\t\t// updating children. If desired to process more specific errors\n\t\t\t// across all endpoints, caller should make these specific\n\t\t\t// validations, this is a current limitation for simplicity sake.\n\t\t\tret = err\n\t\t}\n\t}\n\t// Delete old children that are no longer present.\n\tfor _, e := range children.Keys() {\n\t\tchild, _ := children.Get(e)\n\t\tif _, ok := newChildren.Get(e); !ok {\n\t\t\tchild.closeLocked()\n\t\t}\n\t}\n\tes.children.Store(newChildren)\n\tif newChildren.Len() == 0 {\n\t\treturn balancer.ErrBadResolverState\n\t}\n\treturn ret\n}\n\n// ResolverError forwards the resolver error to all of the endpointSharding's\n// children and sends a single synchronous update of the childStates at the end\n// of the ResolverError operation.\nfunc (es *endpointSharding) ResolverError(err error) {\n\tes.childMu.Lock()\n\tdefer es.childMu.Unlock()\n\tes.inhibitChildUpdates.Store(true)\n\tdefer func() {\n\t\tes.inhibitChildUpdates.Store(false)\n\t\tes.updateState()\n\t}()\n\tchildren := es.children.Load()\n\tfor _, child := range children.Values() {\n\t\tchild.resolverErrorLocked(err)\n\t}\n}\n\nfunc (es *endpointSharding) UpdateSubConnState(balancer.SubConn, balancer.SubConnState) {\n\t// UpdateSubConnState is deprecated.\n}\n\nfunc (es *endpointSharding) Close() {\n\tes.childMu.Lock()\n\tdefer es.childMu.Unlock()\n\tchildren := es.children.Load()\n\tfor _, child := range children.Values() {\n\t\tchild.closeLocked()\n\t}\n}\n\nfunc (es *endpointSharding) ExitIdle() {\n\tes.childMu.Lock()\n\tdefer es.childMu.Unlock()\n\tfor _, bw := range es.children.Load().Values() {\n\t\tif !bw.isClosed {\n\t\t\tbw.child.ExitIdle()\n\t\t}\n\t}\n}\n\n// updateState updates this component's state. It sends the aggregated state,\n// and a picker with round robin behavior with all the child states present if\n// needed.\nfunc (es *endpointSharding) updateState() {\n\tif es.inhibitChildUpdates.Load() {\n\t\treturn\n\t}\n\tvar readyPickers, connectingPickers, idlePickers, transientFailurePickers []balancer.Picker\n\n\tes.mu.Lock()\n\tdefer es.mu.Unlock()\n\n\tchildren := es.children.Load()\n\tchildStates := make([]ChildState, 0, children.Len())\n\n\tfor _, child := range children.Values() {\n\t\tchildState := child.childState\n\t\tchildStates = append(childStates, childState)\n\t\tchildPicker := childState.State.Picker\n\t\tswitch childState.State.ConnectivityState {\n\t\tcase connectivity.Ready:\n\t\t\treadyPickers = append(readyPickers, childPicker)\n\t\tcase connectivity.Connecting:\n\t\t\tconnectingPickers = append(connectingPickers, childPicker)\n\t\tcase connectivity.Idle:\n\t\t\tidlePickers = append(idlePickers, childPicker)\n\t\tcase connectivity.TransientFailure:\n\t\t\ttransientFailurePickers = append(transientFailurePickers, childPicker)\n\t\t\t// connectivity.Shutdown shouldn't appear.\n\t\t}\n\t}\n\n\t// Construct the round robin picker based off the aggregated state. Whatever\n\t// the aggregated state, use the pickers present that are currently in that\n\t// state only.\n\tvar aggState connectivity.State\n\tvar pickers []balancer.Picker\n\tif len(readyPickers) >= 1 {\n\t\taggState = connectivity.Ready\n\t\tpickers = readyPickers\n\t} else if len(connectingPickers) >= 1 {\n\t\taggState = connectivity.Connecting\n\t\tpickers = connectingPickers\n\t} else if len(idlePickers) >= 1 {\n\t\taggState = connectivity.Idle\n\t\tpickers = idlePickers\n\t} else if len(transientFailurePickers) >= 1 {\n\t\taggState = connectivity.TransientFailure\n\t\tpickers = transientFailurePickers\n\t} else {\n\t\taggState = connectivity.TransientFailure\n\t\tpickers = []balancer.Picker{base.NewErrPicker(errors.New(\"no children to pick from\"))}\n\t} // No children (resolver error before valid update).\n\tp := &pickerWithChildStates{\n\t\tpickers:     pickers,\n\t\tchildStates: childStates,\n\t\tnext:        uint32(randIntN(len(pickers))),\n\t}\n\tes.cc.UpdateState(balancer.State{\n\t\tConnectivityState: aggState,\n\t\tPicker:            p,\n\t})\n}\n\n// pickerWithChildStates delegates to the pickers it holds in a round robin\n// fashion. It also contains the childStates of all the endpointSharding's\n// children.\ntype pickerWithChildStates struct {\n\tpickers     []balancer.Picker\n\tchildStates []ChildState\n\tnext        uint32\n}\n\nfunc (p *pickerWithChildStates) Pick(info balancer.PickInfo) (balancer.PickResult, error) {\n\tnextIndex := atomic.AddUint32(&p.next, 1)\n\tpicker := p.pickers[nextIndex%uint32(len(p.pickers))]\n\treturn picker.Pick(info)\n}\n\n// ChildStatesFromPicker returns the state of all the children managed by the\n// endpoint sharding balancer that created this picker.\nfunc ChildStatesFromPicker(picker balancer.Picker) []ChildState {\n\tp, ok := picker.(*pickerWithChildStates)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn p.childStates\n}\n\n// balancerWrapper is a wrapper of a balancer. It ID's a child balancer by\n// endpoint, and persists recent child balancer state.\ntype balancerWrapper struct {\n\t// The following fields are initialized at build time and read-only after\n\t// that and therefore do not need to be guarded by a mutex.\n\n\t// child contains the wrapped balancer. Access its methods only through\n\t// methods on balancerWrapper to ensure proper synchronization\n\tchild               balancer.Balancer\n\tbalancer.ClientConn // embed to intercept UpdateState, doesn't deal with SubConns\n\n\tes *endpointSharding\n\n\t// Access to the following fields is guarded by es.mu.\n\n\tchildState ChildState\n\tisClosed   bool\n}\n\nfunc (bw *balancerWrapper) UpdateState(state balancer.State) {\n\tbw.es.mu.Lock()\n\tbw.childState.State = state\n\tbw.es.mu.Unlock()\n\tif state.ConnectivityState == connectivity.Idle && !bw.es.esOpts.DisableAutoReconnect {\n\t\tbw.ExitIdle()\n\t}\n\tbw.es.updateState()\n}\n\n// ExitIdle pings an IDLE child balancer to exit idle in a new goroutine to\n// avoid deadlocks due to synchronous balancer state updates.\nfunc (bw *balancerWrapper) ExitIdle() {\n\tgo func() {\n\t\tbw.es.childMu.Lock()\n\t\tif !bw.isClosed {\n\t\t\tbw.child.ExitIdle()\n\t\t}\n\t\tbw.es.childMu.Unlock()\n\t}()\n}\n\n// updateClientConnStateLocked delivers the ClientConnState to the child\n// balancer. Callers must hold the child mutex of the parent endpointsharding\n// balancer.\nfunc (bw *balancerWrapper) updateClientConnStateLocked(ccs balancer.ClientConnState) error {\n\treturn bw.child.UpdateClientConnState(ccs)\n}\n\n// closeLocked closes the child balancer. Callers must hold the child mutext of\n// the parent endpointsharding balancer.\nfunc (bw *balancerWrapper) closeLocked() {\n\tbw.child.Close()\n\tbw.isClosed = true\n}\n\nfunc (bw *balancerWrapper) resolverErrorLocked(err error) {\n\tbw.child.ResolverError(err)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/grpclb/state/state.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package state declares grpclb types to be set by resolvers wishing to pass\n// information to grpclb via resolver.State Attributes.\npackage state\n\nimport (\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// keyType is the key to use for storing State in Attributes.\ntype keyType string\n\nconst key = keyType(\"grpc.grpclb.state\")\n\n// State contains gRPCLB-relevant data passed from the name resolver.\ntype State struct {\n\t// BalancerAddresses contains the remote load balancer address(es).  If\n\t// set, overrides any resolver-provided addresses with Type of GRPCLB.\n\tBalancerAddresses []resolver.Address\n}\n\n// Set returns a copy of the provided state with attributes containing s.  s's\n// data should not be mutated after calling Set.\nfunc Set(state resolver.State, s *State) resolver.State {\n\tstate.Attributes = state.Attributes.WithValue(key, s)\n\treturn state\n}\n\n// Get returns the grpclb State in the resolver.State, or nil if not present.\n// The returned data should not be mutated.\nfunc Get(state resolver.State) *State {\n\ts, _ := state.Attributes.Value(key).(*State)\n\treturn s\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go",
    "content": "/*\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package internal contains code internal to the pickfirst package.\npackage internal\n\nimport (\n\trand \"math/rand/v2\"\n\t\"time\"\n)\n\nvar (\n\t// RandShuffle pseudo-randomizes the order of addresses.\n\tRandShuffle = rand.Shuffle\n\t// TimeAfterFunc allows mocking the timer for testing connection delay\n\t// related functionality.\n\tTimeAfterFunc = func(d time.Duration, f func()) func() {\n\t\ttimer := time.AfterFunc(d, f)\n\t\treturn func() { timer.Stop() }\n\t}\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package pickfirst contains the pick_first load balancing policy which\n// is the universal leaf policy.\npackage pickfirst\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/netip\"\n\t\"sync\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/pickfirst/internal\"\n\t\"google.golang.org/grpc/connectivity\"\n\texpstats \"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/grpclog\"\n\tinternalgrpclog \"google.golang.org/grpc/internal/grpclog\"\n\t\"google.golang.org/grpc/internal/pretty\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nfunc init() {\n\tbalancer.Register(pickfirstBuilder{})\n}\n\n// Name is the name of the pick_first balancer.\nconst Name = \"pick_first\"\n\n// enableHealthListenerKeyType is a unique key type used in resolver\n// attributes to indicate whether the health listener usage is enabled.\ntype enableHealthListenerKeyType struct{}\n\nvar (\n\tlogger               = grpclog.Component(\"pick-first-leaf-lb\")\n\tdisconnectionsMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:        \"grpc.lb.pick_first.disconnections\",\n\t\tDescription: \"EXPERIMENTAL. Number of times the selected subchannel becomes disconnected.\",\n\t\tUnit:        \"{disconnection}\",\n\t\tLabels:      []string{\"grpc.target\"},\n\t\tDefault:     false,\n\t})\n\tconnectionAttemptsSucceededMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:        \"grpc.lb.pick_first.connection_attempts_succeeded\",\n\t\tDescription: \"EXPERIMENTAL. Number of successful connection attempts.\",\n\t\tUnit:        \"{attempt}\",\n\t\tLabels:      []string{\"grpc.target\"},\n\t\tDefault:     false,\n\t})\n\tconnectionAttemptsFailedMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:        \"grpc.lb.pick_first.connection_attempts_failed\",\n\t\tDescription: \"EXPERIMENTAL. Number of failed connection attempts.\",\n\t\tUnit:        \"{attempt}\",\n\t\tLabels:      []string{\"grpc.target\"},\n\t\tDefault:     false,\n\t})\n)\n\nconst (\n\t// TODO: change to pick-first when this becomes the default pick_first policy.\n\tlogPrefix = \"[pick-first-leaf-lb %p] \"\n\t// connectionDelayInterval is the time to wait for during the happy eyeballs\n\t// pass before starting the next connection attempt.\n\tconnectionDelayInterval = 250 * time.Millisecond\n)\n\ntype ipAddrFamily int\n\nconst (\n\t// ipAddrFamilyUnknown represents strings that can't be parsed as an IP\n\t// address.\n\tipAddrFamilyUnknown ipAddrFamily = iota\n\tipAddrFamilyV4\n\tipAddrFamilyV6\n)\n\ntype pickfirstBuilder struct{}\n\nfunc (pickfirstBuilder) Build(cc balancer.ClientConn, bo balancer.BuildOptions) balancer.Balancer {\n\tb := &pickfirstBalancer{\n\t\tcc:              cc,\n\t\ttarget:          bo.Target.String(),\n\t\tmetricsRecorder: cc.MetricsRecorder(),\n\n\t\tsubConns:              resolver.NewAddressMapV2[*scData](),\n\t\tstate:                 connectivity.Connecting,\n\t\tcancelConnectionTimer: func() {},\n\t}\n\tb.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b))\n\treturn b\n}\n\nfunc (b pickfirstBuilder) Name() string {\n\treturn Name\n}\n\nfunc (pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {\n\tvar cfg pfConfig\n\tif err := json.Unmarshal(js, &cfg); err != nil {\n\t\treturn nil, fmt.Errorf(\"pickfirst: unable to unmarshal LB policy config: %s, error: %v\", string(js), err)\n\t}\n\treturn cfg, nil\n}\n\n// EnableHealthListener updates the state to configure pickfirst for using a\n// generic health listener.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a later\n// release.\nfunc EnableHealthListener(state resolver.State) resolver.State {\n\tstate.Attributes = state.Attributes.WithValue(enableHealthListenerKeyType{}, true)\n\treturn state\n}\n\ntype pfConfig struct {\n\tserviceconfig.LoadBalancingConfig `json:\"-\"`\n\n\t// If set to true, instructs the LB policy to shuffle the order of the list\n\t// of endpoints received from the name resolver before attempting to\n\t// connect to them.\n\tShuffleAddressList bool `json:\"shuffleAddressList\"`\n}\n\n// scData keeps track of the current state of the subConn.\n// It is not safe for concurrent access.\ntype scData struct {\n\t// The following fields are initialized at build time and read-only after\n\t// that.\n\tsubConn balancer.SubConn\n\taddr    resolver.Address\n\n\trawConnectivityState connectivity.State\n\t// The effective connectivity state based on raw connectivity, health state\n\t// and after following sticky TransientFailure behaviour defined in A62.\n\teffectiveState              connectivity.State\n\tlastErr                     error\n\tconnectionFailedInFirstPass bool\n}\n\nfunc (b *pickfirstBalancer) newSCData(addr resolver.Address) (*scData, error) {\n\tsd := &scData{\n\t\trawConnectivityState: connectivity.Idle,\n\t\teffectiveState:       connectivity.Idle,\n\t\taddr:                 addr,\n\t}\n\tsc, err := b.cc.NewSubConn([]resolver.Address{addr}, balancer.NewSubConnOptions{\n\t\tStateListener: func(state balancer.SubConnState) {\n\t\t\tb.updateSubConnState(sd, state)\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsd.subConn = sc\n\treturn sd, nil\n}\n\ntype pickfirstBalancer struct {\n\t// The following fields are initialized at build time and read-only after\n\t// that and therefore do not need to be guarded by a mutex.\n\tlogger          *internalgrpclog.PrefixLogger\n\tcc              balancer.ClientConn\n\ttarget          string\n\tmetricsRecorder expstats.MetricsRecorder // guaranteed to be non nil\n\n\t// The mutex is used to ensure synchronization of updates triggered\n\t// from the idle picker and the already serialized resolver,\n\t// SubConn state updates.\n\tmu sync.Mutex\n\t// State reported to the channel based on SubConn states and resolver\n\t// updates.\n\tstate connectivity.State\n\t// scData for active subonns mapped by address.\n\tsubConns              *resolver.AddressMapV2[*scData]\n\taddressList           addressList\n\tfirstPass             bool\n\tnumTF                 int\n\tcancelConnectionTimer func()\n\thealthCheckingEnabled bool\n}\n\n// ResolverError is called by the ClientConn when the name resolver produces\n// an error or when pickfirst determined the resolver update to be invalid.\nfunc (b *pickfirstBalancer) ResolverError(err error) {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tb.resolverErrorLocked(err)\n}\n\nfunc (b *pickfirstBalancer) resolverErrorLocked(err error) {\n\tif b.logger.V(2) {\n\t\tb.logger.Infof(\"Received error from the name resolver: %v\", err)\n\t}\n\n\t// The picker will not change since the balancer does not currently\n\t// report an error. If the balancer hasn't received a single good resolver\n\t// update yet, transition to TRANSIENT_FAILURE.\n\tif b.state != connectivity.TransientFailure && b.addressList.size() > 0 {\n\t\tif b.logger.V(2) {\n\t\t\tb.logger.Infof(\"Ignoring resolver error because balancer is using a previous good update.\")\n\t\t}\n\t\treturn\n\t}\n\n\tb.updateBalancerState(balancer.State{\n\t\tConnectivityState: connectivity.TransientFailure,\n\t\tPicker:            &picker{err: fmt.Errorf(\"name resolver error: %v\", err)},\n\t})\n}\n\nfunc (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tb.cancelConnectionTimer()\n\tif len(state.ResolverState.Addresses) == 0 && len(state.ResolverState.Endpoints) == 0 {\n\t\t// Cleanup state pertaining to the previous resolver state.\n\t\t// Treat an empty address list like an error by calling b.ResolverError.\n\t\tb.closeSubConnsLocked()\n\t\tb.addressList.updateAddrs(nil)\n\t\tb.resolverErrorLocked(errors.New(\"produced zero addresses\"))\n\t\treturn balancer.ErrBadResolverState\n\t}\n\tb.healthCheckingEnabled = state.ResolverState.Attributes.Value(enableHealthListenerKeyType{}) != nil\n\tcfg, ok := state.BalancerConfig.(pfConfig)\n\tif state.BalancerConfig != nil && !ok {\n\t\treturn fmt.Errorf(\"pickfirst: received illegal BalancerConfig (type %T): %v: %w\", state.BalancerConfig, state.BalancerConfig, balancer.ErrBadResolverState)\n\t}\n\n\tif b.logger.V(2) {\n\t\tb.logger.Infof(\"Received new config %s, resolver state %s\", pretty.ToJSON(cfg), pretty.ToJSON(state.ResolverState))\n\t}\n\n\tvar newAddrs []resolver.Address\n\tif endpoints := state.ResolverState.Endpoints; len(endpoints) != 0 {\n\t\t// Perform the optional shuffling described in gRFC A62. The shuffling\n\t\t// will change the order of endpoints but not touch the order of the\n\t\t// addresses within each endpoint. - A61\n\t\tif cfg.ShuffleAddressList {\n\t\t\tendpoints = append([]resolver.Endpoint{}, endpoints...)\n\t\t\tinternal.RandShuffle(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] })\n\t\t}\n\n\t\t// \"Flatten the list by concatenating the ordered list of addresses for\n\t\t// each of the endpoints, in order.\" - A61\n\t\tfor _, endpoint := range endpoints {\n\t\t\tnewAddrs = append(newAddrs, endpoint.Addresses...)\n\t\t}\n\t} else {\n\t\t// Endpoints not set, process addresses until we migrate resolver\n\t\t// emissions fully to Endpoints. The top channel does wrap emitted\n\t\t// addresses with endpoints, however some balancers such as weighted\n\t\t// target do not forward the corresponding correct endpoints down/split\n\t\t// endpoints properly. Once all balancers correctly forward endpoints\n\t\t// down, can delete this else conditional.\n\t\tnewAddrs = state.ResolverState.Addresses\n\t\tif cfg.ShuffleAddressList {\n\t\t\tnewAddrs = append([]resolver.Address{}, newAddrs...)\n\t\t\tinternal.RandShuffle(len(newAddrs), func(i, j int) { newAddrs[i], newAddrs[j] = newAddrs[j], newAddrs[i] })\n\t\t}\n\t}\n\n\t// If an address appears in multiple endpoints or in the same endpoint\n\t// multiple times, we keep it only once. We will create only one SubConn\n\t// for the address because an AddressMap is used to store SubConns.\n\t// Not de-duplicating would result in attempting to connect to the same\n\t// SubConn multiple times in the same pass. We don't want this.\n\tnewAddrs = deDupAddresses(newAddrs)\n\tnewAddrs = interleaveAddresses(newAddrs)\n\n\tprevAddr := b.addressList.currentAddress()\n\tprevSCData, found := b.subConns.Get(prevAddr)\n\tprevAddrsCount := b.addressList.size()\n\tisPrevRawConnectivityStateReady := found && prevSCData.rawConnectivityState == connectivity.Ready\n\tb.addressList.updateAddrs(newAddrs)\n\n\t// If the previous ready SubConn exists in new address list,\n\t// keep this connection and don't create new SubConns.\n\tif isPrevRawConnectivityStateReady && b.addressList.seekTo(prevAddr) {\n\t\treturn nil\n\t}\n\n\tb.reconcileSubConnsLocked(newAddrs)\n\t// If it's the first resolver update or the balancer was already READY\n\t// (but the new address list does not contain the ready SubConn) or\n\t// CONNECTING, enter CONNECTING.\n\t// We may be in TRANSIENT_FAILURE due to a previous empty address list,\n\t// we should still enter CONNECTING because the sticky TF behaviour\n\t//  mentioned in A62 applies only when the TRANSIENT_FAILURE is reported\n\t// due to connectivity failures.\n\tif isPrevRawConnectivityStateReady || b.state == connectivity.Connecting || prevAddrsCount == 0 {\n\t\t// Start connection attempt at first address.\n\t\tb.forceUpdateConcludedStateLocked(balancer.State{\n\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\tPicker:            &picker{err: balancer.ErrNoSubConnAvailable},\n\t\t})\n\t\tb.startFirstPassLocked()\n\t} else if b.state == connectivity.TransientFailure {\n\t\t// If we're in TRANSIENT_FAILURE, we stay in TRANSIENT_FAILURE until\n\t\t// we're READY. See A62.\n\t\tb.startFirstPassLocked()\n\t}\n\treturn nil\n}\n\n// UpdateSubConnState is unused as a StateListener is always registered when\n// creating SubConns.\nfunc (b *pickfirstBalancer) UpdateSubConnState(subConn balancer.SubConn, state balancer.SubConnState) {\n\tb.logger.Errorf(\"UpdateSubConnState(%v, %+v) called unexpectedly\", subConn, state)\n}\n\nfunc (b *pickfirstBalancer) Close() {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tb.closeSubConnsLocked()\n\tb.cancelConnectionTimer()\n\tb.state = connectivity.Shutdown\n}\n\n// ExitIdle moves the balancer out of idle state. It can be called concurrently\n// by the idlePicker and clientConn so access to variables should be\n// synchronized.\nfunc (b *pickfirstBalancer) ExitIdle() {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tif b.state == connectivity.Idle {\n\t\t// Move the balancer into CONNECTING state immediately. This is done to\n\t\t// avoid staying in IDLE if a resolver update arrives before the first\n\t\t// SubConn reports CONNECTING.\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\tPicker:            &picker{err: balancer.ErrNoSubConnAvailable},\n\t\t})\n\t\tb.startFirstPassLocked()\n\t}\n}\n\nfunc (b *pickfirstBalancer) startFirstPassLocked() {\n\tb.firstPass = true\n\tb.numTF = 0\n\t// Reset the connection attempt record for existing SubConns.\n\tfor _, sd := range b.subConns.Values() {\n\t\tsd.connectionFailedInFirstPass = false\n\t}\n\tb.requestConnectionLocked()\n}\n\nfunc (b *pickfirstBalancer) closeSubConnsLocked() {\n\tfor _, sd := range b.subConns.Values() {\n\t\tsd.subConn.Shutdown()\n\t}\n\tb.subConns = resolver.NewAddressMapV2[*scData]()\n}\n\n// deDupAddresses ensures that each address appears only once in the slice.\nfunc deDupAddresses(addrs []resolver.Address) []resolver.Address {\n\tseenAddrs := resolver.NewAddressMapV2[bool]()\n\tretAddrs := []resolver.Address{}\n\n\tfor _, addr := range addrs {\n\t\tif _, ok := seenAddrs.Get(addr); ok {\n\t\t\tcontinue\n\t\t}\n\t\tseenAddrs.Set(addr, true)\n\t\tretAddrs = append(retAddrs, addr)\n\t}\n\treturn retAddrs\n}\n\n// interleaveAddresses interleaves addresses of both families (IPv4 and IPv6)\n// as per RFC-8305 section 4.\n// Whichever address family is first in the list is followed by an address of\n// the other address family; that is, if the first address in the list is IPv6,\n// then the first IPv4 address should be moved up in the list to be second in\n// the list. It doesn't support configuring \"First Address Family Count\", i.e.\n// there will always be a single member of the first address family at the\n// beginning of the interleaved list.\n// Addresses that are neither IPv4 nor IPv6 are treated as part of a third\n// \"unknown\" family for interleaving.\n// See: https://datatracker.ietf.org/doc/html/rfc8305#autoid-6\nfunc interleaveAddresses(addrs []resolver.Address) []resolver.Address {\n\tfamilyAddrsMap := map[ipAddrFamily][]resolver.Address{}\n\tinterleavingOrder := []ipAddrFamily{}\n\tfor _, addr := range addrs {\n\t\tfamily := addressFamily(addr.Addr)\n\t\tif _, found := familyAddrsMap[family]; !found {\n\t\t\tinterleavingOrder = append(interleavingOrder, family)\n\t\t}\n\t\tfamilyAddrsMap[family] = append(familyAddrsMap[family], addr)\n\t}\n\n\tinterleavedAddrs := make([]resolver.Address, 0, len(addrs))\n\n\tfor curFamilyIdx := 0; len(interleavedAddrs) < len(addrs); curFamilyIdx = (curFamilyIdx + 1) % len(interleavingOrder) {\n\t\t// Some IP types may have fewer addresses than others, so we look for\n\t\t// the next type that has a remaining member to add to the interleaved\n\t\t// list.\n\t\tfamily := interleavingOrder[curFamilyIdx]\n\t\tremainingMembers := familyAddrsMap[family]\n\t\tif len(remainingMembers) > 0 {\n\t\t\tinterleavedAddrs = append(interleavedAddrs, remainingMembers[0])\n\t\t\tfamilyAddrsMap[family] = remainingMembers[1:]\n\t\t}\n\t}\n\n\treturn interleavedAddrs\n}\n\n// addressFamily returns the ipAddrFamily after parsing the address string.\n// If the address isn't of the format \"ip-address:port\", it returns\n// ipAddrFamilyUnknown. The address may be valid even if it's not an IP when\n// using a resolver like passthrough where the address may be a hostname in\n// some format that the dialer can resolve.\nfunc addressFamily(address string) ipAddrFamily {\n\t// Parse the IP after removing the port.\n\thost, _, err := net.SplitHostPort(address)\n\tif err != nil {\n\t\treturn ipAddrFamilyUnknown\n\t}\n\tip, err := netip.ParseAddr(host)\n\tif err != nil {\n\t\treturn ipAddrFamilyUnknown\n\t}\n\tswitch {\n\tcase ip.Is4() || ip.Is4In6():\n\t\treturn ipAddrFamilyV4\n\tcase ip.Is6():\n\t\treturn ipAddrFamilyV6\n\tdefault:\n\t\treturn ipAddrFamilyUnknown\n\t}\n}\n\n// reconcileSubConnsLocked updates the active subchannels based on a new address\n// list from the resolver. It does this by:\n//   - closing subchannels: any existing subchannels associated with addresses\n//     that are no longer in the updated list are shut down.\n//   - removing subchannels: entries for these closed subchannels are removed\n//     from the subchannel map.\n//\n// This ensures that the subchannel map accurately reflects the current set of\n// addresses received from the name resolver.\nfunc (b *pickfirstBalancer) reconcileSubConnsLocked(newAddrs []resolver.Address) {\n\tnewAddrsMap := resolver.NewAddressMapV2[bool]()\n\tfor _, addr := range newAddrs {\n\t\tnewAddrsMap.Set(addr, true)\n\t}\n\n\tfor _, oldAddr := range b.subConns.Keys() {\n\t\tif _, ok := newAddrsMap.Get(oldAddr); ok {\n\t\t\tcontinue\n\t\t}\n\t\tval, _ := b.subConns.Get(oldAddr)\n\t\tval.subConn.Shutdown()\n\t\tb.subConns.Delete(oldAddr)\n\t}\n}\n\n// shutdownRemainingLocked shuts down remaining subConns. Called when a subConn\n// becomes ready, which means that all other subConn must be shutdown.\nfunc (b *pickfirstBalancer) shutdownRemainingLocked(selected *scData) {\n\tb.cancelConnectionTimer()\n\tfor _, sd := range b.subConns.Values() {\n\t\tif sd.subConn != selected.subConn {\n\t\t\tsd.subConn.Shutdown()\n\t\t}\n\t}\n\tb.subConns = resolver.NewAddressMapV2[*scData]()\n\tb.subConns.Set(selected.addr, selected)\n}\n\n// requestConnectionLocked starts connecting on the subchannel corresponding to\n// the current address. If no subchannel exists, one is created. If the current\n// subchannel is in TransientFailure, a connection to the next address is\n// attempted until a subchannel is found.\nfunc (b *pickfirstBalancer) requestConnectionLocked() {\n\tif !b.addressList.isValid() {\n\t\treturn\n\t}\n\tvar lastErr error\n\tfor valid := true; valid; valid = b.addressList.increment() {\n\t\tcurAddr := b.addressList.currentAddress()\n\t\tsd, ok := b.subConns.Get(curAddr)\n\t\tif !ok {\n\t\t\tvar err error\n\t\t\t// We want to assign the new scData to sd from the outer scope,\n\t\t\t// hence we can't use := below.\n\t\t\tsd, err = b.newSCData(curAddr)\n\t\t\tif err != nil {\n\t\t\t\t// This should never happen, unless the clientConn is being shut\n\t\t\t\t// down.\n\t\t\t\tif b.logger.V(2) {\n\t\t\t\t\tb.logger.Infof(\"Failed to create a subConn for address %v: %v\", curAddr.String(), err)\n\t\t\t\t}\n\t\t\t\t// Do nothing, the LB policy will be closed soon.\n\t\t\t\treturn\n\t\t\t}\n\t\t\tb.subConns.Set(curAddr, sd)\n\t\t}\n\n\t\tswitch sd.rawConnectivityState {\n\t\tcase connectivity.Idle:\n\t\t\tsd.subConn.Connect()\n\t\t\tb.scheduleNextConnectionLocked()\n\t\t\treturn\n\t\tcase connectivity.TransientFailure:\n\t\t\t// The SubConn is being re-used and failed during a previous pass\n\t\t\t// over the addressList. It has not completed backoff yet.\n\t\t\t// Mark it as having failed and try the next address.\n\t\t\tsd.connectionFailedInFirstPass = true\n\t\t\tlastErr = sd.lastErr\n\t\t\tcontinue\n\t\tcase connectivity.Connecting:\n\t\t\t// Wait for the connection attempt to complete or the timer to fire\n\t\t\t// before attempting the next address.\n\t\t\tb.scheduleNextConnectionLocked()\n\t\t\treturn\n\t\tdefault:\n\t\t\tb.logger.Errorf(\"SubConn with unexpected state %v present in SubConns map.\", sd.rawConnectivityState)\n\t\t\treturn\n\n\t\t}\n\t}\n\n\t// All the remaining addresses in the list are in TRANSIENT_FAILURE, end the\n\t// first pass if possible.\n\tb.endFirstPassIfPossibleLocked(lastErr)\n}\n\nfunc (b *pickfirstBalancer) scheduleNextConnectionLocked() {\n\tb.cancelConnectionTimer()\n\tif !b.addressList.hasNext() {\n\t\treturn\n\t}\n\tcurAddr := b.addressList.currentAddress()\n\tcancelled := false // Access to this is protected by the balancer's mutex.\n\tcloseFn := internal.TimeAfterFunc(connectionDelayInterval, func() {\n\t\tb.mu.Lock()\n\t\tdefer b.mu.Unlock()\n\t\t// If the scheduled task is cancelled while acquiring the mutex, return.\n\t\tif cancelled {\n\t\t\treturn\n\t\t}\n\t\tif b.logger.V(2) {\n\t\t\tb.logger.Infof(\"Happy Eyeballs timer expired while waiting for connection to %q.\", curAddr.Addr)\n\t\t}\n\t\tif b.addressList.increment() {\n\t\t\tb.requestConnectionLocked()\n\t\t}\n\t})\n\t// Access to the cancellation callback held by the balancer is guarded by\n\t// the balancer's mutex, so it's safe to set the boolean from the callback.\n\tb.cancelConnectionTimer = sync.OnceFunc(func() {\n\t\tcancelled = true\n\t\tcloseFn()\n\t})\n}\n\nfunc (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.SubConnState) {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\toldState := sd.rawConnectivityState\n\tsd.rawConnectivityState = newState.ConnectivityState\n\t// Previously relevant SubConns can still callback with state updates.\n\t// To prevent pickers from returning these obsolete SubConns, this logic\n\t// is included to check if the current list of active SubConns includes this\n\t// SubConn.\n\tif !b.isActiveSCData(sd) {\n\t\treturn\n\t}\n\tif newState.ConnectivityState == connectivity.Shutdown {\n\t\tsd.effectiveState = connectivity.Shutdown\n\t\treturn\n\t}\n\n\t// Record a connection attempt when exiting CONNECTING.\n\tif newState.ConnectivityState == connectivity.TransientFailure {\n\t\tsd.connectionFailedInFirstPass = true\n\t\tconnectionAttemptsFailedMetric.Record(b.metricsRecorder, 1, b.target)\n\t}\n\n\tif newState.ConnectivityState == connectivity.Ready {\n\t\tconnectionAttemptsSucceededMetric.Record(b.metricsRecorder, 1, b.target)\n\t\tb.shutdownRemainingLocked(sd)\n\t\tif !b.addressList.seekTo(sd.addr) {\n\t\t\t// This should not fail as we should have only one SubConn after\n\t\t\t// entering READY. The SubConn should be present in the addressList.\n\t\t\tb.logger.Errorf(\"Address %q not found address list in %v\", sd.addr, b.addressList.addresses)\n\t\t\treturn\n\t\t}\n\t\tif !b.healthCheckingEnabled {\n\t\t\tif b.logger.V(2) {\n\t\t\t\tb.logger.Infof(\"SubConn %p reported connectivity state READY and the health listener is disabled. Transitioning SubConn to READY.\", sd.subConn)\n\t\t\t}\n\n\t\t\tsd.effectiveState = connectivity.Ready\n\t\t\tb.updateBalancerState(balancer.State{\n\t\t\t\tConnectivityState: connectivity.Ready,\n\t\t\t\tPicker:            &picker{result: balancer.PickResult{SubConn: sd.subConn}},\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tif b.logger.V(2) {\n\t\t\tb.logger.Infof(\"SubConn %p reported connectivity state READY. Registering health listener.\", sd.subConn)\n\t\t}\n\t\t// Send a CONNECTING update to take the SubConn out of sticky-TF if\n\t\t// required.\n\t\tsd.effectiveState = connectivity.Connecting\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\tPicker:            &picker{err: balancer.ErrNoSubConnAvailable},\n\t\t})\n\t\tsd.subConn.RegisterHealthListener(func(scs balancer.SubConnState) {\n\t\t\tb.updateSubConnHealthState(sd, scs)\n\t\t})\n\t\treturn\n\t}\n\n\t// If the LB policy is READY, and it receives a subchannel state change,\n\t// it means that the READY subchannel has failed.\n\t// A SubConn can also transition from CONNECTING directly to IDLE when\n\t// a transport is successfully created, but the connection fails\n\t// before the SubConn can send the notification for READY. We treat\n\t// this as a successful connection and transition to IDLE.\n\t// TODO: https://github.com/grpc/grpc-go/issues/7862 - Remove the second\n\t// part of the if condition below once the issue is fixed.\n\tif oldState == connectivity.Ready || (oldState == connectivity.Connecting && newState.ConnectivityState == connectivity.Idle) {\n\t\t// Once a transport fails, the balancer enters IDLE and starts from\n\t\t// the first address when the picker is used.\n\t\tb.shutdownRemainingLocked(sd)\n\t\tsd.effectiveState = newState.ConnectivityState\n\t\t// READY SubConn interspliced in between CONNECTING and IDLE, need to\n\t\t// account for that.\n\t\tif oldState == connectivity.Connecting {\n\t\t\t// A known issue (https://github.com/grpc/grpc-go/issues/7862)\n\t\t\t// causes a race that prevents the READY state change notification.\n\t\t\t// This works around it.\n\t\t\tconnectionAttemptsSucceededMetric.Record(b.metricsRecorder, 1, b.target)\n\t\t}\n\t\tdisconnectionsMetric.Record(b.metricsRecorder, 1, b.target)\n\t\tb.addressList.reset()\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.Idle,\n\t\t\tPicker:            &idlePicker{exitIdle: sync.OnceFunc(b.ExitIdle)},\n\t\t})\n\t\treturn\n\t}\n\n\tif b.firstPass {\n\t\tswitch newState.ConnectivityState {\n\t\tcase connectivity.Connecting:\n\t\t\t// The effective state can be in either IDLE, CONNECTING or\n\t\t\t// TRANSIENT_FAILURE. If it's  TRANSIENT_FAILURE, stay in\n\t\t\t// TRANSIENT_FAILURE until it's READY. See A62.\n\t\t\tif sd.effectiveState != connectivity.TransientFailure {\n\t\t\t\tsd.effectiveState = connectivity.Connecting\n\t\t\t\tb.updateBalancerState(balancer.State{\n\t\t\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\t\t\tPicker:            &picker{err: balancer.ErrNoSubConnAvailable},\n\t\t\t\t})\n\t\t\t}\n\t\tcase connectivity.TransientFailure:\n\t\t\tsd.lastErr = newState.ConnectionError\n\t\t\tsd.effectiveState = connectivity.TransientFailure\n\t\t\t// Since we're re-using common SubConns while handling resolver\n\t\t\t// updates, we could receive an out of turn TRANSIENT_FAILURE from\n\t\t\t// a pass over the previous address list. Happy Eyeballs will also\n\t\t\t// cause out of order updates to arrive.\n\n\t\t\tif curAddr := b.addressList.currentAddress(); equalAddressIgnoringBalAttributes(&curAddr, &sd.addr) {\n\t\t\t\tb.cancelConnectionTimer()\n\t\t\t\tif b.addressList.increment() {\n\t\t\t\t\tb.requestConnectionLocked()\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// End the first pass if we've seen a TRANSIENT_FAILURE from all\n\t\t\t// SubConns once.\n\t\t\tb.endFirstPassIfPossibleLocked(newState.ConnectionError)\n\t\t}\n\t\treturn\n\t}\n\n\t// We have finished the first pass, keep re-connecting failing SubConns.\n\tswitch newState.ConnectivityState {\n\tcase connectivity.TransientFailure:\n\t\tb.numTF = (b.numTF + 1) % b.subConns.Len()\n\t\tsd.lastErr = newState.ConnectionError\n\t\tif b.numTF%b.subConns.Len() == 0 {\n\t\t\tb.updateBalancerState(balancer.State{\n\t\t\t\tConnectivityState: connectivity.TransientFailure,\n\t\t\t\tPicker:            &picker{err: newState.ConnectionError},\n\t\t\t})\n\t\t}\n\t\t// We don't need to request re-resolution since the SubConn already\n\t\t// does that before reporting TRANSIENT_FAILURE.\n\t\t// TODO: #7534 - Move re-resolution requests from SubConn into\n\t\t// pick_first.\n\tcase connectivity.Idle:\n\t\tsd.subConn.Connect()\n\t}\n}\n\n// endFirstPassIfPossibleLocked ends the first happy-eyeballs pass if all the\n// addresses are tried and their SubConns have reported a failure.\nfunc (b *pickfirstBalancer) endFirstPassIfPossibleLocked(lastErr error) {\n\t// An optimization to avoid iterating over the entire SubConn map.\n\tif b.addressList.isValid() {\n\t\treturn\n\t}\n\t// Connect() has been called on all the SubConns. The first pass can be\n\t// ended if all the SubConns have reported a failure.\n\tfor _, sd := range b.subConns.Values() {\n\t\tif !sd.connectionFailedInFirstPass {\n\t\t\treturn\n\t\t}\n\t}\n\tb.firstPass = false\n\tb.updateBalancerState(balancer.State{\n\t\tConnectivityState: connectivity.TransientFailure,\n\t\tPicker:            &picker{err: lastErr},\n\t})\n\t// Start re-connecting all the SubConns that are already in IDLE.\n\tfor _, sd := range b.subConns.Values() {\n\t\tif sd.rawConnectivityState == connectivity.Idle {\n\t\t\tsd.subConn.Connect()\n\t\t}\n\t}\n}\n\nfunc (b *pickfirstBalancer) isActiveSCData(sd *scData) bool {\n\tactiveSD, found := b.subConns.Get(sd.addr)\n\treturn found && activeSD == sd\n}\n\nfunc (b *pickfirstBalancer) updateSubConnHealthState(sd *scData, state balancer.SubConnState) {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\t// Previously relevant SubConns can still callback with state updates.\n\t// To prevent pickers from returning these obsolete SubConns, this logic\n\t// is included to check if the current list of active SubConns includes\n\t// this SubConn.\n\tif !b.isActiveSCData(sd) {\n\t\treturn\n\t}\n\tsd.effectiveState = state.ConnectivityState\n\tswitch state.ConnectivityState {\n\tcase connectivity.Ready:\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.Ready,\n\t\t\tPicker:            &picker{result: balancer.PickResult{SubConn: sd.subConn}},\n\t\t})\n\tcase connectivity.TransientFailure:\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.TransientFailure,\n\t\t\tPicker:            &picker{err: fmt.Errorf(\"pickfirst: health check failure: %v\", state.ConnectionError)},\n\t\t})\n\tcase connectivity.Connecting:\n\t\tb.updateBalancerState(balancer.State{\n\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\tPicker:            &picker{err: balancer.ErrNoSubConnAvailable},\n\t\t})\n\tdefault:\n\t\tb.logger.Errorf(\"Got unexpected health update for SubConn %p: %v\", state)\n\t}\n}\n\n// updateBalancerState stores the state reported to the channel and calls\n// ClientConn.UpdateState(). As an optimization, it avoids sending duplicate\n// updates to the channel.\nfunc (b *pickfirstBalancer) updateBalancerState(newState balancer.State) {\n\t// In case of TransientFailures allow the picker to be updated to update\n\t// the connectivity error, in all other cases don't send duplicate state\n\t// updates.\n\tif newState.ConnectivityState == b.state && b.state != connectivity.TransientFailure {\n\t\treturn\n\t}\n\tb.forceUpdateConcludedStateLocked(newState)\n}\n\n// forceUpdateConcludedStateLocked stores the state reported to the channel and\n// calls ClientConn.UpdateState().\n// A separate function is defined to force update the ClientConn state since the\n// channel doesn't correctly assume that LB policies start in CONNECTING and\n// relies on LB policy to send an initial CONNECTING update.\nfunc (b *pickfirstBalancer) forceUpdateConcludedStateLocked(newState balancer.State) {\n\tb.state = newState.ConnectivityState\n\tb.cc.UpdateState(newState)\n}\n\ntype picker struct {\n\tresult balancer.PickResult\n\terr    error\n}\n\nfunc (p *picker) Pick(balancer.PickInfo) (balancer.PickResult, error) {\n\treturn p.result, p.err\n}\n\n// idlePicker is used when the SubConn is IDLE and kicks the SubConn into\n// CONNECTING when Pick is called.\ntype idlePicker struct {\n\texitIdle func()\n}\n\nfunc (i *idlePicker) Pick(balancer.PickInfo) (balancer.PickResult, error) {\n\ti.exitIdle()\n\treturn balancer.PickResult{}, balancer.ErrNoSubConnAvailable\n}\n\n// addressList manages sequentially iterating over addresses present in a list\n// of endpoints. It provides a 1 dimensional view of the addresses present in\n// the endpoints.\n// This type is not safe for concurrent access.\ntype addressList struct {\n\taddresses []resolver.Address\n\tidx       int\n}\n\nfunc (al *addressList) isValid() bool {\n\treturn al.idx < len(al.addresses)\n}\n\nfunc (al *addressList) size() int {\n\treturn len(al.addresses)\n}\n\n// increment moves to the next index in the address list.\n// This method returns false if it went off the list, true otherwise.\nfunc (al *addressList) increment() bool {\n\tif !al.isValid() {\n\t\treturn false\n\t}\n\tal.idx++\n\treturn al.idx < len(al.addresses)\n}\n\n// currentAddress returns the current address pointed to in the addressList.\n// If the list is in an invalid state, it returns an empty address instead.\nfunc (al *addressList) currentAddress() resolver.Address {\n\tif !al.isValid() {\n\t\treturn resolver.Address{}\n\t}\n\treturn al.addresses[al.idx]\n}\n\nfunc (al *addressList) reset() {\n\tal.idx = 0\n}\n\nfunc (al *addressList) updateAddrs(addrs []resolver.Address) {\n\tal.addresses = addrs\n\tal.reset()\n}\n\n// seekTo returns false if the needle was not found and the current index was\n// left unchanged.\nfunc (al *addressList) seekTo(needle resolver.Address) bool {\n\tfor ai, addr := range al.addresses {\n\t\tif !equalAddressIgnoringBalAttributes(&addr, &needle) {\n\t\t\tcontinue\n\t\t}\n\t\tal.idx = ai\n\t\treturn true\n\t}\n\treturn false\n}\n\n// hasNext returns whether incrementing the addressList will result in moving\n// past the end of the list. If the list has already moved past the end, it\n// returns false.\nfunc (al *addressList) hasNext() bool {\n\tif !al.isValid() {\n\t\treturn false\n\t}\n\treturn al.idx+1 < len(al.addresses)\n}\n\n// equalAddressIgnoringBalAttributes returns true is a and b are considered\n// equal. This is different from the Equal method on the resolver.Address type\n// which considers all fields to determine equality. Here, we only consider\n// fields that are meaningful to the SubConn.\nfunc equalAddressIgnoringBalAttributes(a, b *resolver.Address) bool {\n\treturn a.Addr == b.Addr && a.ServerName == b.ServerName &&\n\t\ta.Attributes.Equal(b.Attributes)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package roundrobin defines a roundrobin balancer. Roundrobin balancer is\n// installed as one of the default balancers in gRPC, users don't need to\n// explicitly install this balancer.\npackage roundrobin\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/endpointsharding\"\n\t\"google.golang.org/grpc/balancer/pickfirst\"\n\t\"google.golang.org/grpc/grpclog\"\n\tinternalgrpclog \"google.golang.org/grpc/internal/grpclog\"\n)\n\n// Name is the name of round_robin balancer.\nconst Name = \"round_robin\"\n\nvar logger = grpclog.Component(\"roundrobin\")\n\nfunc init() {\n\tbalancer.Register(builder{})\n}\n\ntype builder struct{}\n\nfunc (bb builder) Name() string {\n\treturn Name\n}\n\nfunc (bb builder) Build(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer {\n\tchildBuilder := balancer.Get(pickfirst.Name).Build\n\tbal := &rrBalancer{\n\t\tcc:       cc,\n\t\tBalancer: endpointsharding.NewBalancer(cc, opts, childBuilder, endpointsharding.Options{}),\n\t}\n\tbal.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(\"[%p] \", bal))\n\tbal.logger.Infof(\"Created\")\n\treturn bal\n}\n\ntype rrBalancer struct {\n\tbalancer.Balancer\n\tcc     balancer.ClientConn\n\tlogger *internalgrpclog.PrefixLogger\n}\n\nfunc (b *rrBalancer) UpdateClientConnState(ccs balancer.ClientConnState) error {\n\treturn b.Balancer.UpdateClientConnState(balancer.ClientConnState{\n\t\t// Enable the health listener in pickfirst children for client side health\n\t\t// checks and outlier detection, if configured.\n\t\tResolverState: pickfirst.EnableHealthListener(ccs.ResolverState),\n\t})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer/subconn.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage balancer\n\nimport (\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// A SubConn represents a single connection to a gRPC backend service.\n//\n// All SubConns start in IDLE, and will not try to connect. To trigger a\n// connection attempt, Balancers must call Connect.\n//\n// If the connection attempt fails, the SubConn will transition to\n// TRANSIENT_FAILURE for a backoff period, and then return to IDLE.  If the\n// connection attempt succeeds, it will transition to READY.\n//\n// If a READY SubConn becomes disconnected, the SubConn will transition to IDLE.\n//\n// If a connection re-enters IDLE, Balancers must call Connect again to trigger\n// a new connection attempt.\n//\n// Each SubConn contains a list of addresses.  gRPC will try to connect to the\n// addresses in sequence, and stop trying the remainder once the first\n// connection is successful.  However, this behavior is deprecated.  SubConns\n// should only use a single address.\n//\n// NOTICE: This interface is intended to be implemented by gRPC, or intercepted\n// by custom load balancing polices.  Users should not need their own complete\n// implementation of this interface -- they should always delegate to a SubConn\n// returned by ClientConn.NewSubConn() by embedding it in their implementations.\n// An embedded SubConn must never be nil, or runtime panics will occur.\ntype SubConn interface {\n\t// UpdateAddresses updates the addresses used in this SubConn.\n\t// gRPC checks if currently-connected address is still in the new list.\n\t// If it's in the list, the connection will be kept.\n\t// If it's not in the list, the connection will gracefully close, and\n\t// a new connection will be created.\n\t//\n\t// This will trigger a state transition for the SubConn.\n\t//\n\t// Deprecated: this method will be removed.  Create new SubConns for new\n\t// addresses instead.\n\tUpdateAddresses([]resolver.Address)\n\t// Connect starts the connecting for this SubConn.\n\tConnect()\n\t// GetOrBuildProducer returns a reference to the existing Producer for this\n\t// ProducerBuilder in this SubConn, or, if one does not currently exist,\n\t// creates a new one and returns it.  Returns a close function which may be\n\t// called when the Producer is no longer needed.  Otherwise the producer\n\t// will automatically be closed upon connection loss or subchannel close.\n\t// Should only be called on a SubConn in state Ready.  Otherwise the\n\t// producer will be unable to create streams.\n\tGetOrBuildProducer(ProducerBuilder) (p Producer, close func())\n\t// Shutdown shuts down the SubConn gracefully.  Any started RPCs will be\n\t// allowed to complete.  No future calls should be made on the SubConn.\n\t// One final state update will be delivered to the StateListener (or\n\t// UpdateSubConnState; deprecated) with ConnectivityState of Shutdown to\n\t// indicate the shutdown operation.  This may be delivered before\n\t// in-progress RPCs are complete and the actual connection is closed.\n\tShutdown()\n\t// RegisterHealthListener registers a health listener that receives health\n\t// updates for a Ready SubConn. Only one health listener can be registered\n\t// at a time. A health listener should be registered each time the SubConn's\n\t// connectivity state changes to READY. Registering a health listener when\n\t// the connectivity state is not READY may result in undefined behaviour.\n\t// This method must not be called synchronously while handling an update\n\t// from a previously registered health listener.\n\tRegisterHealthListener(func(SubConnState))\n\t// EnforceSubConnEmbedding is included to force implementers to embed\n\t// another implementation of this interface, allowing gRPC to add methods\n\t// without breaking users.\n\tinternal.EnforceSubConnEmbedding\n}\n\n// A ProducerBuilder is a simple constructor for a Producer.  It is used by the\n// SubConn to create producers when needed.\ntype ProducerBuilder interface {\n\t// Build creates a Producer.  The first parameter is always a\n\t// grpc.ClientConnInterface (a type to allow creating RPCs/streams on the\n\t// associated SubConn), but is declared as `any` to avoid a dependency\n\t// cycle.  Build also returns a close function that will be called when all\n\t// references to the Producer have been given up for a SubConn, or when a\n\t// connectivity state change occurs on the SubConn.  The close function\n\t// should always block until all asynchronous cleanup work is completed.\n\tBuild(grpcClientConnInterface any) (p Producer, close func())\n}\n\n// SubConnState describes the state of a SubConn.\ntype SubConnState struct {\n\t// ConnectivityState is the connectivity state of the SubConn.\n\tConnectivityState connectivity.State\n\t// ConnectionError is set if the ConnectivityState is TransientFailure,\n\t// describing the reason the SubConn failed.  Otherwise, it is nil.\n\tConnectionError error\n\t// connectedAddr contains the connected address when ConnectivityState is\n\t// Ready. Otherwise, it is indeterminate.\n\tconnectedAddress resolver.Address\n}\n\n// connectedAddress returns the connected address for a SubConnState. The\n// address is only valid if the state is READY.\nfunc connectedAddress(scs SubConnState) resolver.Address {\n\treturn scs.connectedAddress\n}\n\n// setConnectedAddress sets the connected address for a SubConnState.\nfunc setConnectedAddress(scs *SubConnState, addr resolver.Address) {\n\tscs.connectedAddress = addr\n}\n\n// A Producer is a type shared among potentially many consumers.  It is\n// associated with a SubConn, and an implementation will typically contain\n// other methods to provide additional functionality, e.g. configuration or\n// subscription registration.\ntype Producer any\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/balancer_wrapper.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/balancer/gracefulswitch\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/status\"\n)\n\nvar (\n\tsetConnectedAddress = internal.SetConnectedAddress.(func(*balancer.SubConnState, resolver.Address))\n\t// noOpRegisterHealthListenerFn is used when client side health checking is\n\t// disabled. It sends a single READY update on the registered listener.\n\tnoOpRegisterHealthListenerFn = func(_ context.Context, listener func(balancer.SubConnState)) func() {\n\t\tlistener(balancer.SubConnState{ConnectivityState: connectivity.Ready})\n\t\treturn func() {}\n\t}\n)\n\n// ccBalancerWrapper sits between the ClientConn and the Balancer.\n//\n// ccBalancerWrapper implements methods corresponding to the ones on the\n// balancer.Balancer interface. The ClientConn is free to call these methods\n// concurrently and the ccBalancerWrapper ensures that calls from the ClientConn\n// to the Balancer happen in order by performing them in the serializer, without\n// any mutexes held.\n//\n// ccBalancerWrapper also implements the balancer.ClientConn interface and is\n// passed to the Balancer implementations. It invokes unexported methods on the\n// ClientConn to handle these calls from the Balancer.\n//\n// It uses the gracefulswitch.Balancer internally to ensure that balancer\n// switches happen in a graceful manner.\ntype ccBalancerWrapper struct {\n\tinternal.EnforceClientConnEmbedding\n\t// The following fields are initialized when the wrapper is created and are\n\t// read-only afterwards, and therefore can be accessed without a mutex.\n\tcc               *ClientConn\n\topts             balancer.BuildOptions\n\tserializer       *grpcsync.CallbackSerializer\n\tserializerCancel context.CancelFunc\n\n\t// The following fields are only accessed within the serializer or during\n\t// initialization.\n\tcurBalancerName string\n\tbalancer        *gracefulswitch.Balancer\n\n\t// The following field is protected by mu.  Caller must take cc.mu before\n\t// taking mu.\n\tmu     sync.Mutex\n\tclosed bool\n}\n\n// newCCBalancerWrapper creates a new balancer wrapper in idle state. The\n// underlying balancer is not created until the updateClientConnState() method\n// is invoked.\nfunc newCCBalancerWrapper(cc *ClientConn) *ccBalancerWrapper {\n\tctx, cancel := context.WithCancel(cc.ctx)\n\tccb := &ccBalancerWrapper{\n\t\tcc: cc,\n\t\topts: balancer.BuildOptions{\n\t\t\tDialCreds:       cc.dopts.copts.TransportCredentials,\n\t\t\tCredsBundle:     cc.dopts.copts.CredsBundle,\n\t\t\tDialer:          cc.dopts.copts.Dialer,\n\t\t\tAuthority:       cc.authority,\n\t\t\tCustomUserAgent: cc.dopts.copts.UserAgent,\n\t\t\tChannelzParent:  cc.channelz,\n\t\t\tTarget:          cc.parsedTarget,\n\t\t},\n\t\tserializer:       grpcsync.NewCallbackSerializer(ctx),\n\t\tserializerCancel: cancel,\n\t}\n\tccb.balancer = gracefulswitch.NewBalancer(ccb, ccb.opts)\n\treturn ccb\n}\n\nfunc (ccb *ccBalancerWrapper) MetricsRecorder() stats.MetricsRecorder {\n\treturn ccb.cc.metricsRecorderList\n}\n\n// updateClientConnState is invoked by grpc to push a ClientConnState update to\n// the underlying balancer.  This is always executed from the serializer, so\n// it is safe to call into the balancer here.\nfunc (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error {\n\terrCh := make(chan error)\n\tuccs := func(ctx context.Context) {\n\t\tdefer close(errCh)\n\t\tif ctx.Err() != nil || ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\tname := gracefulswitch.ChildName(ccs.BalancerConfig)\n\t\tif ccb.curBalancerName != name {\n\t\t\tccb.curBalancerName = name\n\t\t\tchannelz.Infof(logger, ccb.cc.channelz, \"Channel switches to new LB policy %q\", name)\n\t\t}\n\t\terr := ccb.balancer.UpdateClientConnState(*ccs)\n\t\tif logger.V(2) && err != nil {\n\t\t\tlogger.Infof(\"error from balancer.UpdateClientConnState: %v\", err)\n\t\t}\n\t\terrCh <- err\n\t}\n\tonFailure := func() { close(errCh) }\n\n\t// UpdateClientConnState can race with Close, and when the latter wins, the\n\t// serializer is closed, and the attempt to schedule the callback will fail.\n\t// It is acceptable to ignore this failure. But since we want to handle the\n\t// state update in a blocking fashion (when we successfully schedule the\n\t// callback), we have to use the ScheduleOr method and not the MaybeSchedule\n\t// method on the serializer.\n\tccb.serializer.ScheduleOr(uccs, onFailure)\n\treturn <-errCh\n}\n\n// resolverError is invoked by grpc to push a resolver error to the underlying\n// balancer.  The call to the balancer is executed from the serializer.\nfunc (ccb *ccBalancerWrapper) resolverError(err error) {\n\tccb.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil || ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\tccb.balancer.ResolverError(err)\n\t})\n}\n\n// close initiates async shutdown of the wrapper.  cc.mu must be held when\n// calling this function.  To determine the wrapper has finished shutting down,\n// the channel should block on ccb.serializer.Done() without cc.mu held.\nfunc (ccb *ccBalancerWrapper) close() {\n\tccb.mu.Lock()\n\tccb.closed = true\n\tccb.mu.Unlock()\n\tchannelz.Info(logger, ccb.cc.channelz, \"ccBalancerWrapper: closing\")\n\tccb.serializer.TrySchedule(func(context.Context) {\n\t\tif ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\tccb.balancer.Close()\n\t\tccb.balancer = nil\n\t})\n\tccb.serializerCancel()\n}\n\n// exitIdle invokes the balancer's exitIdle method in the serializer.\nfunc (ccb *ccBalancerWrapper) exitIdle() {\n\tccb.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil || ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\tccb.balancer.ExitIdle()\n\t})\n}\n\nfunc (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) {\n\tccb.cc.mu.Lock()\n\tdefer ccb.cc.mu.Unlock()\n\n\tccb.mu.Lock()\n\tif ccb.closed {\n\t\tccb.mu.Unlock()\n\t\treturn nil, fmt.Errorf(\"balancer is being closed; no new SubConns allowed\")\n\t}\n\tccb.mu.Unlock()\n\n\tif len(addrs) == 0 {\n\t\treturn nil, fmt.Errorf(\"grpc: cannot create SubConn with empty address list\")\n\t}\n\tac, err := ccb.cc.newAddrConnLocked(addrs, opts)\n\tif err != nil {\n\t\tchannelz.Warningf(logger, ccb.cc.channelz, \"acBalancerWrapper: NewSubConn: failed to newAddrConn: %v\", err)\n\t\treturn nil, err\n\t}\n\tacbw := &acBalancerWrapper{\n\t\tccb:           ccb,\n\t\tac:            ac,\n\t\tproducers:     make(map[balancer.ProducerBuilder]*refCountedProducer),\n\t\tstateListener: opts.StateListener,\n\t\thealthData:    newHealthData(connectivity.Idle),\n\t}\n\tac.acbw = acbw\n\treturn acbw, nil\n}\n\nfunc (ccb *ccBalancerWrapper) RemoveSubConn(balancer.SubConn) {\n\t// The graceful switch balancer will never call this.\n\tlogger.Errorf(\"ccb RemoveSubConn(%v) called unexpectedly, sc\")\n}\n\nfunc (ccb *ccBalancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) {\n\tacbw, ok := sc.(*acBalancerWrapper)\n\tif !ok {\n\t\treturn\n\t}\n\tacbw.UpdateAddresses(addrs)\n}\n\nfunc (ccb *ccBalancerWrapper) UpdateState(s balancer.State) {\n\tccb.cc.mu.Lock()\n\tdefer ccb.cc.mu.Unlock()\n\tif ccb.cc.conns == nil {\n\t\t// The CC has been closed; ignore this update.\n\t\treturn\n\t}\n\n\tccb.mu.Lock()\n\tif ccb.closed {\n\t\tccb.mu.Unlock()\n\t\treturn\n\t}\n\tccb.mu.Unlock()\n\t// Update picker before updating state.  Even though the ordering here does\n\t// not matter, it can lead to multiple calls of Pick in the common start-up\n\t// case where we wait for ready and then perform an RPC.  If the picker is\n\t// updated later, we could call the \"connecting\" picker when the state is\n\t// updated, and then call the \"ready\" picker after the picker gets updated.\n\n\t// Note that there is no need to check if the balancer wrapper was closed,\n\t// as we know the graceful switch LB policy will not call cc if it has been\n\t// closed.\n\tccb.cc.pickerWrapper.updatePicker(s.Picker)\n\tccb.cc.csMgr.updateState(s.ConnectivityState)\n}\n\nfunc (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOptions) {\n\tccb.cc.mu.RLock()\n\tdefer ccb.cc.mu.RUnlock()\n\n\tccb.mu.Lock()\n\tif ccb.closed {\n\t\tccb.mu.Unlock()\n\t\treturn\n\t}\n\tccb.mu.Unlock()\n\tccb.cc.resolveNowLocked(o)\n}\n\nfunc (ccb *ccBalancerWrapper) Target() string {\n\treturn ccb.cc.target\n}\n\n// acBalancerWrapper is a wrapper on top of ac for balancers.\n// It implements balancer.SubConn interface.\ntype acBalancerWrapper struct {\n\tinternal.EnforceSubConnEmbedding\n\tac            *addrConn          // read-only\n\tccb           *ccBalancerWrapper // read-only\n\tstateListener func(balancer.SubConnState)\n\n\tproducersMu sync.Mutex\n\tproducers   map[balancer.ProducerBuilder]*refCountedProducer\n\n\t// Access to healthData is protected by healthMu.\n\thealthMu sync.Mutex\n\t// healthData is stored as a pointer to detect when the health listener is\n\t// dropped or updated. This is required as closures can't be compared for\n\t// equality.\n\thealthData *healthData\n}\n\n// healthData holds data related to health state reporting.\ntype healthData struct {\n\t// connectivityState stores the most recent connectivity state delivered\n\t// to the LB policy. This is stored to avoid sending updates when the\n\t// SubConn has already exited connectivity state READY.\n\tconnectivityState connectivity.State\n\t// closeHealthProducer stores function to close the ref counted health\n\t// producer. The health producer is automatically closed when the SubConn\n\t// state changes.\n\tcloseHealthProducer func()\n}\n\nfunc newHealthData(s connectivity.State) *healthData {\n\treturn &healthData{\n\t\tconnectivityState:   s,\n\t\tcloseHealthProducer: func() {},\n\t}\n}\n\n// updateState is invoked by grpc to push a subConn state update to the\n// underlying balancer.\nfunc (acbw *acBalancerWrapper) updateState(s connectivity.State, curAddr resolver.Address, err error) {\n\tacbw.ccb.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil || acbw.ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\t// Invalidate all producers on any state change.\n\t\tacbw.closeProducers()\n\n\t\t// Even though it is optional for balancers, gracefulswitch ensures\n\t\t// opts.StateListener is set, so this cannot ever be nil.\n\t\t// TODO: delete this comment when UpdateSubConnState is removed.\n\t\tscs := balancer.SubConnState{ConnectivityState: s, ConnectionError: err}\n\t\tif s == connectivity.Ready {\n\t\t\tsetConnectedAddress(&scs, curAddr)\n\t\t}\n\t\t// Invalidate the health listener by updating the healthData.\n\t\tacbw.healthMu.Lock()\n\t\t// A race may occur if a health listener is registered soon after the\n\t\t// connectivity state is set but before the stateListener is called.\n\t\t// Two cases may arise:\n\t\t// 1. The new state is not READY: RegisterHealthListener has checks to\n\t\t//    ensure no updates are sent when the connectivity state is not\n\t\t//    READY.\n\t\t// 2. The new state is READY: This means that the old state wasn't Ready.\n\t\t//    The RegisterHealthListener API mentions that a health listener\n\t\t//    must not be registered when a SubConn is not ready to avoid such\n\t\t//    races. When this happens, the LB policy would get health updates\n\t\t//    on the old listener. When the LB policy registers a new listener\n\t\t//    on receiving the connectivity update, the health updates will be\n\t\t//    sent to the new health listener.\n\t\tacbw.healthData = newHealthData(scs.ConnectivityState)\n\t\tacbw.healthMu.Unlock()\n\n\t\tacbw.stateListener(scs)\n\t})\n}\n\nfunc (acbw *acBalancerWrapper) String() string {\n\treturn fmt.Sprintf(\"SubConn(id:%d)\", acbw.ac.channelz.ID)\n}\n\nfunc (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {\n\tacbw.ac.updateAddrs(addrs)\n}\n\nfunc (acbw *acBalancerWrapper) Connect() {\n\tgo acbw.ac.connect()\n}\n\nfunc (acbw *acBalancerWrapper) Shutdown() {\n\tacbw.closeProducers()\n\tacbw.ccb.cc.removeAddrConn(acbw.ac, errConnDrain)\n}\n\n// NewStream begins a streaming RPC on the addrConn.  If the addrConn is not\n// ready, blocks until it is or ctx expires.  Returns an error when the context\n// expires or the addrConn is shut down.\nfunc (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) {\n\ttransport := acbw.ac.getReadyTransport()\n\tif transport == nil {\n\t\treturn nil, status.Errorf(codes.Unavailable, \"SubConn state is not Ready\")\n\n\t}\n\treturn newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...)\n}\n\n// Invoke performs a unary RPC.  If the addrConn is not ready, returns\n// errSubConnNotReady.\nfunc (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error {\n\tcs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := cs.SendMsg(args); err != nil {\n\t\treturn err\n\t}\n\treturn cs.RecvMsg(reply)\n}\n\ntype refCountedProducer struct {\n\tproducer balancer.Producer\n\trefs     int    // number of current refs to the producer\n\tclose    func() // underlying producer's close function\n}\n\nfunc (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) {\n\tacbw.producersMu.Lock()\n\tdefer acbw.producersMu.Unlock()\n\n\t// Look up existing producer from this builder.\n\tpData := acbw.producers[pb]\n\tif pData == nil {\n\t\t// Not found; create a new one and add it to the producers map.\n\t\tp, closeFn := pb.Build(acbw)\n\t\tpData = &refCountedProducer{producer: p, close: closeFn}\n\t\tacbw.producers[pb] = pData\n\t}\n\t// Account for this new reference.\n\tpData.refs++\n\n\t// Return a cleanup function wrapped in a OnceFunc to remove this reference\n\t// and delete the refCountedProducer from the map if the total reference\n\t// count goes to zero.\n\tunref := func() {\n\t\tacbw.producersMu.Lock()\n\t\t// If closeProducers has already closed this producer instance, refs is\n\t\t// set to 0, so the check after decrementing will never pass, and the\n\t\t// producer will not be double-closed.\n\t\tpData.refs--\n\t\tif pData.refs == 0 {\n\t\t\tdefer pData.close() // Run outside the acbw mutex\n\t\t\tdelete(acbw.producers, pb)\n\t\t}\n\t\tacbw.producersMu.Unlock()\n\t}\n\treturn pData.producer, sync.OnceFunc(unref)\n}\n\nfunc (acbw *acBalancerWrapper) closeProducers() {\n\tacbw.producersMu.Lock()\n\tdefer acbw.producersMu.Unlock()\n\tfor pb, pData := range acbw.producers {\n\t\tpData.refs = 0\n\t\tpData.close()\n\t\tdelete(acbw.producers, pb)\n\t}\n}\n\n// healthProducerRegisterFn is a type alias for the health producer's function\n// for registering listeners.\ntype healthProducerRegisterFn = func(context.Context, balancer.SubConn, string, func(balancer.SubConnState)) func()\n\n// healthListenerRegFn returns a function to register a listener for health\n// updates. If client side health checks are disabled, the registered listener\n// will get a single READY (raw connectivity state) update.\n//\n// Client side health checking is enabled when all the following\n// conditions are satisfied:\n// 1. Health checking is not disabled using the dial option.\n// 2. The health package is imported.\n// 3. The health check config is present in the service config.\nfunc (acbw *acBalancerWrapper) healthListenerRegFn() func(context.Context, func(balancer.SubConnState)) func() {\n\tif acbw.ccb.cc.dopts.disableHealthCheck {\n\t\treturn noOpRegisterHealthListenerFn\n\t}\n\tcfg := acbw.ac.cc.healthCheckConfig()\n\tif cfg == nil {\n\t\treturn noOpRegisterHealthListenerFn\n\t}\n\tregHealthLisFn := internal.RegisterClientHealthCheckListener\n\tif regHealthLisFn == nil {\n\t\t// The health package is not imported.\n\t\tchannelz.Error(logger, acbw.ac.channelz, \"Health check is requested but health package is not imported.\")\n\t\treturn noOpRegisterHealthListenerFn\n\t}\n\treturn func(ctx context.Context, listener func(balancer.SubConnState)) func() {\n\t\treturn regHealthLisFn.(healthProducerRegisterFn)(ctx, acbw, cfg.ServiceName, listener)\n\t}\n}\n\n// RegisterHealthListener accepts a health listener from the LB policy. It sends\n// updates to the health listener as long as the SubConn's connectivity state\n// doesn't change and a new health listener is not registered. To invalidate\n// the currently registered health listener, acbw updates the healthData. If a\n// nil listener is registered, the active health listener is dropped.\nfunc (acbw *acBalancerWrapper) RegisterHealthListener(listener func(balancer.SubConnState)) {\n\tacbw.healthMu.Lock()\n\tdefer acbw.healthMu.Unlock()\n\tacbw.healthData.closeHealthProducer()\n\t// listeners should not be registered when the connectivity state\n\t// isn't Ready. This may happen when the balancer registers a listener\n\t// after the connectivityState is updated, but before it is notified\n\t// of the update.\n\tif acbw.healthData.connectivityState != connectivity.Ready {\n\t\treturn\n\t}\n\t// Replace the health data to stop sending updates to any previously\n\t// registered health listeners.\n\thd := newHealthData(connectivity.Ready)\n\tacbw.healthData = hd\n\tif listener == nil {\n\t\treturn\n\t}\n\n\tregisterFn := acbw.healthListenerRegFn()\n\tacbw.ccb.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil || acbw.ccb.balancer == nil {\n\t\t\treturn\n\t\t}\n\t\t// Don't send updates if a new listener is registered.\n\t\tacbw.healthMu.Lock()\n\t\tdefer acbw.healthMu.Unlock()\n\t\tif acbw.healthData != hd {\n\t\t\treturn\n\t\t}\n\t\t// Serialize the health updates from the health producer with\n\t\t// other calls into the LB policy.\n\t\tlistenerWrapper := func(scs balancer.SubConnState) {\n\t\t\tacbw.ccb.serializer.TrySchedule(func(ctx context.Context) {\n\t\t\t\tif ctx.Err() != nil || acbw.ccb.balancer == nil {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tacbw.healthMu.Lock()\n\t\t\t\tdefer acbw.healthMu.Unlock()\n\t\t\t\tif acbw.healthData != hd {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tlistener(scs)\n\t\t\t})\n\t\t}\n\n\t\thd.closeHealthProducer = registerFn(ctx, listenerWrapper)\n\t})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go",
    "content": "// Copyright 2018 The gRPC Authors\n// All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF 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 canonical version of this proto can be found at\n// https://github.com/grpc/grpc-proto/blob/master/grpc/binlog/v1/binarylog.proto\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.10\n// \tprotoc        v5.27.1\n// source: grpc/binlog/v1/binarylog.proto\n\npackage grpc_binarylog_v1\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdurationpb \"google.golang.org/protobuf/types/known/durationpb\"\n\ttimestamppb \"google.golang.org/protobuf/types/known/timestamppb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Enumerates the type of event\n// Note the terminology is different from the RPC semantics\n// definition, but the same meaning is expressed here.\ntype GrpcLogEntry_EventType int32\n\nconst (\n\tGrpcLogEntry_EVENT_TYPE_UNKNOWN GrpcLogEntry_EventType = 0\n\t// Header sent from client to server\n\tGrpcLogEntry_EVENT_TYPE_CLIENT_HEADER GrpcLogEntry_EventType = 1\n\t// Header sent from server to client\n\tGrpcLogEntry_EVENT_TYPE_SERVER_HEADER GrpcLogEntry_EventType = 2\n\t// Message sent from client to server\n\tGrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE GrpcLogEntry_EventType = 3\n\t// Message sent from server to client\n\tGrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE GrpcLogEntry_EventType = 4\n\t// A signal that client is done sending\n\tGrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE GrpcLogEntry_EventType = 5\n\t// Trailer indicates the end of the RPC.\n\t// On client side, this event means a trailer was either received\n\t// from the network or the gRPC library locally generated a status\n\t// to inform the application about a failure.\n\t// On server side, this event means the server application requested\n\t// to send a trailer. Note: EVENT_TYPE_CANCEL may still arrive after\n\t// this due to races on server side.\n\tGrpcLogEntry_EVENT_TYPE_SERVER_TRAILER GrpcLogEntry_EventType = 6\n\t// A signal that the RPC is cancelled. On client side, this\n\t// indicates the client application requests a cancellation.\n\t// On server side, this indicates that cancellation was detected.\n\t// Note: This marks the end of the RPC. Events may arrive after\n\t// this due to races. For example, on client side a trailer\n\t// may arrive even though the application requested to cancel the RPC.\n\tGrpcLogEntry_EVENT_TYPE_CANCEL GrpcLogEntry_EventType = 7\n)\n\n// Enum value maps for GrpcLogEntry_EventType.\nvar (\n\tGrpcLogEntry_EventType_name = map[int32]string{\n\t\t0: \"EVENT_TYPE_UNKNOWN\",\n\t\t1: \"EVENT_TYPE_CLIENT_HEADER\",\n\t\t2: \"EVENT_TYPE_SERVER_HEADER\",\n\t\t3: \"EVENT_TYPE_CLIENT_MESSAGE\",\n\t\t4: \"EVENT_TYPE_SERVER_MESSAGE\",\n\t\t5: \"EVENT_TYPE_CLIENT_HALF_CLOSE\",\n\t\t6: \"EVENT_TYPE_SERVER_TRAILER\",\n\t\t7: \"EVENT_TYPE_CANCEL\",\n\t}\n\tGrpcLogEntry_EventType_value = map[string]int32{\n\t\t\"EVENT_TYPE_UNKNOWN\":           0,\n\t\t\"EVENT_TYPE_CLIENT_HEADER\":     1,\n\t\t\"EVENT_TYPE_SERVER_HEADER\":     2,\n\t\t\"EVENT_TYPE_CLIENT_MESSAGE\":    3,\n\t\t\"EVENT_TYPE_SERVER_MESSAGE\":    4,\n\t\t\"EVENT_TYPE_CLIENT_HALF_CLOSE\": 5,\n\t\t\"EVENT_TYPE_SERVER_TRAILER\":    6,\n\t\t\"EVENT_TYPE_CANCEL\":            7,\n\t}\n)\n\nfunc (x GrpcLogEntry_EventType) Enum() *GrpcLogEntry_EventType {\n\tp := new(GrpcLogEntry_EventType)\n\t*p = x\n\treturn p\n}\n\nfunc (x GrpcLogEntry_EventType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (GrpcLogEntry_EventType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_grpc_binlog_v1_binarylog_proto_enumTypes[0].Descriptor()\n}\n\nfunc (GrpcLogEntry_EventType) Type() protoreflect.EnumType {\n\treturn &file_grpc_binlog_v1_binarylog_proto_enumTypes[0]\n}\n\nfunc (x GrpcLogEntry_EventType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use GrpcLogEntry_EventType.Descriptor instead.\nfunc (GrpcLogEntry_EventType) EnumDescriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0, 0}\n}\n\n// Enumerates the entity that generates the log entry\ntype GrpcLogEntry_Logger int32\n\nconst (\n\tGrpcLogEntry_LOGGER_UNKNOWN GrpcLogEntry_Logger = 0\n\tGrpcLogEntry_LOGGER_CLIENT  GrpcLogEntry_Logger = 1\n\tGrpcLogEntry_LOGGER_SERVER  GrpcLogEntry_Logger = 2\n)\n\n// Enum value maps for GrpcLogEntry_Logger.\nvar (\n\tGrpcLogEntry_Logger_name = map[int32]string{\n\t\t0: \"LOGGER_UNKNOWN\",\n\t\t1: \"LOGGER_CLIENT\",\n\t\t2: \"LOGGER_SERVER\",\n\t}\n\tGrpcLogEntry_Logger_value = map[string]int32{\n\t\t\"LOGGER_UNKNOWN\": 0,\n\t\t\"LOGGER_CLIENT\":  1,\n\t\t\"LOGGER_SERVER\":  2,\n\t}\n)\n\nfunc (x GrpcLogEntry_Logger) Enum() *GrpcLogEntry_Logger {\n\tp := new(GrpcLogEntry_Logger)\n\t*p = x\n\treturn p\n}\n\nfunc (x GrpcLogEntry_Logger) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (GrpcLogEntry_Logger) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_grpc_binlog_v1_binarylog_proto_enumTypes[1].Descriptor()\n}\n\nfunc (GrpcLogEntry_Logger) Type() protoreflect.EnumType {\n\treturn &file_grpc_binlog_v1_binarylog_proto_enumTypes[1]\n}\n\nfunc (x GrpcLogEntry_Logger) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use GrpcLogEntry_Logger.Descriptor instead.\nfunc (GrpcLogEntry_Logger) EnumDescriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0, 1}\n}\n\ntype Address_Type int32\n\nconst (\n\tAddress_TYPE_UNKNOWN Address_Type = 0\n\t// address is in 1.2.3.4 form\n\tAddress_TYPE_IPV4 Address_Type = 1\n\t// address is in IPv6 canonical form (RFC5952 section 4)\n\t// The scope is NOT included in the address string.\n\tAddress_TYPE_IPV6 Address_Type = 2\n\t// address is UDS string\n\tAddress_TYPE_UNIX Address_Type = 3\n)\n\n// Enum value maps for Address_Type.\nvar (\n\tAddress_Type_name = map[int32]string{\n\t\t0: \"TYPE_UNKNOWN\",\n\t\t1: \"TYPE_IPV4\",\n\t\t2: \"TYPE_IPV6\",\n\t\t3: \"TYPE_UNIX\",\n\t}\n\tAddress_Type_value = map[string]int32{\n\t\t\"TYPE_UNKNOWN\": 0,\n\t\t\"TYPE_IPV4\":    1,\n\t\t\"TYPE_IPV6\":    2,\n\t\t\"TYPE_UNIX\":    3,\n\t}\n)\n\nfunc (x Address_Type) Enum() *Address_Type {\n\tp := new(Address_Type)\n\t*p = x\n\treturn p\n}\n\nfunc (x Address_Type) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Address_Type) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_grpc_binlog_v1_binarylog_proto_enumTypes[2].Descriptor()\n}\n\nfunc (Address_Type) Type() protoreflect.EnumType {\n\treturn &file_grpc_binlog_v1_binarylog_proto_enumTypes[2]\n}\n\nfunc (x Address_Type) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Address_Type.Descriptor instead.\nfunc (Address_Type) EnumDescriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{7, 0}\n}\n\n// Log entry we store in binary logs\ntype GrpcLogEntry struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The timestamp of the binary log message\n\tTimestamp *timestamppb.Timestamp `protobuf:\"bytes,1,opt,name=timestamp,proto3\" json:\"timestamp,omitempty\"`\n\t// Uniquely identifies a call. The value must not be 0 in order to disambiguate\n\t// from an unset value.\n\t// Each call may have several log entries, they will all have the same call_id.\n\t// Nothing is guaranteed about their value other than they are unique across\n\t// different RPCs in the same gRPC process.\n\tCallId uint64 `protobuf:\"varint,2,opt,name=call_id,json=callId,proto3\" json:\"call_id,omitempty\"`\n\t// The entry sequence id for this call. The first GrpcLogEntry has a\n\t// value of 1, to disambiguate from an unset value. The purpose of\n\t// this field is to detect missing entries in environments where\n\t// durability or ordering is not guaranteed.\n\tSequenceIdWithinCall uint64                 `protobuf:\"varint,3,opt,name=sequence_id_within_call,json=sequenceIdWithinCall,proto3\" json:\"sequence_id_within_call,omitempty\"`\n\tType                 GrpcLogEntry_EventType `protobuf:\"varint,4,opt,name=type,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_EventType\" json:\"type,omitempty\"`\n\tLogger               GrpcLogEntry_Logger    `protobuf:\"varint,5,opt,name=logger,proto3,enum=grpc.binarylog.v1.GrpcLogEntry_Logger\" json:\"logger,omitempty\"` // One of the above Logger enum\n\t// The logger uses one of the following fields to record the payload,\n\t// according to the type of the log entry.\n\t//\n\t// Types that are valid to be assigned to Payload:\n\t//\n\t//\t*GrpcLogEntry_ClientHeader\n\t//\t*GrpcLogEntry_ServerHeader\n\t//\t*GrpcLogEntry_Message\n\t//\t*GrpcLogEntry_Trailer\n\tPayload isGrpcLogEntry_Payload `protobuf_oneof:\"payload\"`\n\t// true if payload does not represent the full message or metadata.\n\tPayloadTruncated bool `protobuf:\"varint,10,opt,name=payload_truncated,json=payloadTruncated,proto3\" json:\"payload_truncated,omitempty\"`\n\t// Peer address information, will only be recorded on the first\n\t// incoming event. On client side, peer is logged on\n\t// EVENT_TYPE_SERVER_HEADER normally or EVENT_TYPE_SERVER_TRAILER in\n\t// the case of trailers-only. On server side, peer is always\n\t// logged on EVENT_TYPE_CLIENT_HEADER.\n\tPeer          *Address `protobuf:\"bytes,11,opt,name=peer,proto3\" json:\"peer,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GrpcLogEntry) Reset() {\n\t*x = GrpcLogEntry{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GrpcLogEntry) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GrpcLogEntry) ProtoMessage() {}\n\nfunc (x *GrpcLogEntry) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GrpcLogEntry.ProtoReflect.Descriptor instead.\nfunc (*GrpcLogEntry) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *GrpcLogEntry) GetTimestamp() *timestamppb.Timestamp {\n\tif x != nil {\n\t\treturn x.Timestamp\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetCallId() uint64 {\n\tif x != nil {\n\t\treturn x.CallId\n\t}\n\treturn 0\n}\n\nfunc (x *GrpcLogEntry) GetSequenceIdWithinCall() uint64 {\n\tif x != nil {\n\t\treturn x.SequenceIdWithinCall\n\t}\n\treturn 0\n}\n\nfunc (x *GrpcLogEntry) GetType() GrpcLogEntry_EventType {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn GrpcLogEntry_EVENT_TYPE_UNKNOWN\n}\n\nfunc (x *GrpcLogEntry) GetLogger() GrpcLogEntry_Logger {\n\tif x != nil {\n\t\treturn x.Logger\n\t}\n\treturn GrpcLogEntry_LOGGER_UNKNOWN\n}\n\nfunc (x *GrpcLogEntry) GetPayload() isGrpcLogEntry_Payload {\n\tif x != nil {\n\t\treturn x.Payload\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetClientHeader() *ClientHeader {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*GrpcLogEntry_ClientHeader); ok {\n\t\t\treturn x.ClientHeader\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetServerHeader() *ServerHeader {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*GrpcLogEntry_ServerHeader); ok {\n\t\t\treturn x.ServerHeader\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetMessage() *Message {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*GrpcLogEntry_Message); ok {\n\t\t\treturn x.Message\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetTrailer() *Trailer {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*GrpcLogEntry_Trailer); ok {\n\t\t\treturn x.Trailer\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *GrpcLogEntry) GetPayloadTruncated() bool {\n\tif x != nil {\n\t\treturn x.PayloadTruncated\n\t}\n\treturn false\n}\n\nfunc (x *GrpcLogEntry) GetPeer() *Address {\n\tif x != nil {\n\t\treturn x.Peer\n\t}\n\treturn nil\n}\n\ntype isGrpcLogEntry_Payload interface {\n\tisGrpcLogEntry_Payload()\n}\n\ntype GrpcLogEntry_ClientHeader struct {\n\tClientHeader *ClientHeader `protobuf:\"bytes,6,opt,name=client_header,json=clientHeader,proto3,oneof\"`\n}\n\ntype GrpcLogEntry_ServerHeader struct {\n\tServerHeader *ServerHeader `protobuf:\"bytes,7,opt,name=server_header,json=serverHeader,proto3,oneof\"`\n}\n\ntype GrpcLogEntry_Message struct {\n\t// Used by EVENT_TYPE_CLIENT_MESSAGE, EVENT_TYPE_SERVER_MESSAGE\n\tMessage *Message `protobuf:\"bytes,8,opt,name=message,proto3,oneof\"`\n}\n\ntype GrpcLogEntry_Trailer struct {\n\tTrailer *Trailer `protobuf:\"bytes,9,opt,name=trailer,proto3,oneof\"`\n}\n\nfunc (*GrpcLogEntry_ClientHeader) isGrpcLogEntry_Payload() {}\n\nfunc (*GrpcLogEntry_ServerHeader) isGrpcLogEntry_Payload() {}\n\nfunc (*GrpcLogEntry_Message) isGrpcLogEntry_Payload() {}\n\nfunc (*GrpcLogEntry_Trailer) isGrpcLogEntry_Payload() {}\n\ntype ClientHeader struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// This contains only the metadata from the application.\n\tMetadata *Metadata `protobuf:\"bytes,1,opt,name=metadata,proto3\" json:\"metadata,omitempty\"`\n\t// The name of the RPC method, which looks something like:\n\t// /<service>/<method>\n\t// Note the leading \"/\" character.\n\tMethodName string `protobuf:\"bytes,2,opt,name=method_name,json=methodName,proto3\" json:\"method_name,omitempty\"`\n\t// A single process may be used to run multiple virtual\n\t// servers with different identities.\n\t// The authority is the name of such a server identity.\n\t// It is typically a portion of the URI in the form of\n\t// <host> or <host>:<port> .\n\tAuthority string `protobuf:\"bytes,3,opt,name=authority,proto3\" json:\"authority,omitempty\"`\n\t// the RPC timeout\n\tTimeout       *durationpb.Duration `protobuf:\"bytes,4,opt,name=timeout,proto3\" json:\"timeout,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ClientHeader) Reset() {\n\t*x = ClientHeader{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ClientHeader) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ClientHeader) ProtoMessage() {}\n\nfunc (x *ClientHeader) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ClientHeader.ProtoReflect.Descriptor instead.\nfunc (*ClientHeader) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *ClientHeader) GetMetadata() *Metadata {\n\tif x != nil {\n\t\treturn x.Metadata\n\t}\n\treturn nil\n}\n\nfunc (x *ClientHeader) GetMethodName() string {\n\tif x != nil {\n\t\treturn x.MethodName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ClientHeader) GetAuthority() string {\n\tif x != nil {\n\t\treturn x.Authority\n\t}\n\treturn \"\"\n}\n\nfunc (x *ClientHeader) GetTimeout() *durationpb.Duration {\n\tif x != nil {\n\t\treturn x.Timeout\n\t}\n\treturn nil\n}\n\ntype ServerHeader struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// This contains only the metadata from the application.\n\tMetadata      *Metadata `protobuf:\"bytes,1,opt,name=metadata,proto3\" json:\"metadata,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ServerHeader) Reset() {\n\t*x = ServerHeader{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ServerHeader) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ServerHeader) ProtoMessage() {}\n\nfunc (x *ServerHeader) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ServerHeader.ProtoReflect.Descriptor instead.\nfunc (*ServerHeader) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *ServerHeader) GetMetadata() *Metadata {\n\tif x != nil {\n\t\treturn x.Metadata\n\t}\n\treturn nil\n}\n\ntype Trailer struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// This contains only the metadata from the application.\n\tMetadata *Metadata `protobuf:\"bytes,1,opt,name=metadata,proto3\" json:\"metadata,omitempty\"`\n\t// The gRPC status code.\n\tStatusCode uint32 `protobuf:\"varint,2,opt,name=status_code,json=statusCode,proto3\" json:\"status_code,omitempty\"`\n\t// An original status message before any transport specific\n\t// encoding.\n\tStatusMessage string `protobuf:\"bytes,3,opt,name=status_message,json=statusMessage,proto3\" json:\"status_message,omitempty\"`\n\t// The value of the 'grpc-status-details-bin' metadata key. If\n\t// present, this is always an encoded 'google.rpc.Status' message.\n\tStatusDetails []byte `protobuf:\"bytes,4,opt,name=status_details,json=statusDetails,proto3\" json:\"status_details,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *Trailer) Reset() {\n\t*x = Trailer{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Trailer) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Trailer) ProtoMessage() {}\n\nfunc (x *Trailer) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Trailer.ProtoReflect.Descriptor instead.\nfunc (*Trailer) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *Trailer) GetMetadata() *Metadata {\n\tif x != nil {\n\t\treturn x.Metadata\n\t}\n\treturn nil\n}\n\nfunc (x *Trailer) GetStatusCode() uint32 {\n\tif x != nil {\n\t\treturn x.StatusCode\n\t}\n\treturn 0\n}\n\nfunc (x *Trailer) GetStatusMessage() string {\n\tif x != nil {\n\t\treturn x.StatusMessage\n\t}\n\treturn \"\"\n}\n\nfunc (x *Trailer) GetStatusDetails() []byte {\n\tif x != nil {\n\t\treturn x.StatusDetails\n\t}\n\treturn nil\n}\n\n// Message payload, used by CLIENT_MESSAGE and SERVER_MESSAGE\ntype Message struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Length of the message. It may not be the same as the length of the\n\t// data field, as the logging payload can be truncated or omitted.\n\tLength uint32 `protobuf:\"varint,1,opt,name=length,proto3\" json:\"length,omitempty\"`\n\t// May be truncated or omitted.\n\tData          []byte `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *Message) Reset() {\n\t*x = Message{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Message) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Message) ProtoMessage() {}\n\nfunc (x *Message) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Message.ProtoReflect.Descriptor instead.\nfunc (*Message) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *Message) GetLength() uint32 {\n\tif x != nil {\n\t\treturn x.Length\n\t}\n\treturn 0\n}\n\nfunc (x *Message) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\n// A list of metadata pairs, used in the payload of client header,\n// server header, and server trailer.\n// Implementations may omit some entries to honor the header limits\n// of GRPC_BINARY_LOG_CONFIG.\n//\n// Header keys added by gRPC are omitted. To be more specific,\n// implementations will not log the following entries, and this is\n// not to be treated as a truncation:\n//   - entries handled by grpc that are not user visible, such as those\n//     that begin with 'grpc-' (with exception of grpc-trace-bin)\n//     or keys like 'lb-token'\n//   - transport specific entries, including but not limited to:\n//     ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc\n//   - entries added for call credentials\n//\n// Implementations must always log grpc-trace-bin if it is present.\n// Practically speaking it will only be visible on server side because\n// grpc-trace-bin is managed by low level client side mechanisms\n// inaccessible from the application level. On server side, the\n// header is just a normal metadata key.\n// The pair will not count towards the size limit.\ntype Metadata struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tEntry         []*MetadataEntry       `protobuf:\"bytes,1,rep,name=entry,proto3\" json:\"entry,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *Metadata) Reset() {\n\t*x = Metadata{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Metadata) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Metadata) ProtoMessage() {}\n\nfunc (x *Metadata) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Metadata.ProtoReflect.Descriptor instead.\nfunc (*Metadata) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *Metadata) GetEntry() []*MetadataEntry {\n\tif x != nil {\n\t\treturn x.Entry\n\t}\n\treturn nil\n}\n\n// A metadata key value pair\ntype MetadataEntry struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tKey           string                 `protobuf:\"bytes,1,opt,name=key,proto3\" json:\"key,omitempty\"`\n\tValue         []byte                 `protobuf:\"bytes,2,opt,name=value,proto3\" json:\"value,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *MetadataEntry) Reset() {\n\t*x = MetadataEntry{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MetadataEntry) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MetadataEntry) ProtoMessage() {}\n\nfunc (x *MetadataEntry) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MetadataEntry.ProtoReflect.Descriptor instead.\nfunc (*MetadataEntry) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *MetadataEntry) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nfunc (x *MetadataEntry) GetValue() []byte {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn nil\n}\n\n// Address information\ntype Address struct {\n\tstate   protoimpl.MessageState `protogen:\"open.v1\"`\n\tType    Address_Type           `protobuf:\"varint,1,opt,name=type,proto3,enum=grpc.binarylog.v1.Address_Type\" json:\"type,omitempty\"`\n\tAddress string                 `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// only for TYPE_IPV4 and TYPE_IPV6\n\tIpPort        uint32 `protobuf:\"varint,3,opt,name=ip_port,json=ipPort,proto3\" json:\"ip_port,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *Address) Reset() {\n\t*x = Address{}\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Address) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Address) ProtoMessage() {}\n\nfunc (x *Address) ProtoReflect() protoreflect.Message {\n\tmi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Address.ProtoReflect.Descriptor instead.\nfunc (*Address) Descriptor() ([]byte, []int) {\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *Address) GetType() Address_Type {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn Address_TYPE_UNKNOWN\n}\n\nfunc (x *Address) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *Address) GetIpPort() uint32 {\n\tif x != nil {\n\t\treturn x.IpPort\n\t}\n\treturn 0\n}\n\nvar File_grpc_binlog_v1_binarylog_proto protoreflect.FileDescriptor\n\nconst file_grpc_binlog_v1_binarylog_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x1egrpc/binlog/v1/binarylog.proto\\x12\\x11grpc.binarylog.v1\\x1a\\x1egoogle/protobuf/duration.proto\\x1a\\x1fgoogle/protobuf/timestamp.proto\\\"\\xbb\\a\\n\" +\n\t\"\\fGrpcLogEntry\\x128\\n\" +\n\t\"\\ttimestamp\\x18\\x01 \\x01(\\v2\\x1a.google.protobuf.TimestampR\\ttimestamp\\x12\\x17\\n\" +\n\t\"\\acall_id\\x18\\x02 \\x01(\\x04R\\x06callId\\x125\\n\" +\n\t\"\\x17sequence_id_within_call\\x18\\x03 \\x01(\\x04R\\x14sequenceIdWithinCall\\x12=\\n\" +\n\t\"\\x04type\\x18\\x04 \\x01(\\x0e2).grpc.binarylog.v1.GrpcLogEntry.EventTypeR\\x04type\\x12>\\n\" +\n\t\"\\x06logger\\x18\\x05 \\x01(\\x0e2&.grpc.binarylog.v1.GrpcLogEntry.LoggerR\\x06logger\\x12F\\n\" +\n\t\"\\rclient_header\\x18\\x06 \\x01(\\v2\\x1f.grpc.binarylog.v1.ClientHeaderH\\x00R\\fclientHeader\\x12F\\n\" +\n\t\"\\rserver_header\\x18\\a \\x01(\\v2\\x1f.grpc.binarylog.v1.ServerHeaderH\\x00R\\fserverHeader\\x126\\n\" +\n\t\"\\amessage\\x18\\b \\x01(\\v2\\x1a.grpc.binarylog.v1.MessageH\\x00R\\amessage\\x126\\n\" +\n\t\"\\atrailer\\x18\\t \\x01(\\v2\\x1a.grpc.binarylog.v1.TrailerH\\x00R\\atrailer\\x12+\\n\" +\n\t\"\\x11payload_truncated\\x18\\n\" +\n\t\" \\x01(\\bR\\x10payloadTruncated\\x12.\\n\" +\n\t\"\\x04peer\\x18\\v \\x01(\\v2\\x1a.grpc.binarylog.v1.AddressR\\x04peer\\\"\\xf5\\x01\\n\" +\n\t\"\\tEventType\\x12\\x16\\n\" +\n\t\"\\x12EVENT_TYPE_UNKNOWN\\x10\\x00\\x12\\x1c\\n\" +\n\t\"\\x18EVENT_TYPE_CLIENT_HEADER\\x10\\x01\\x12\\x1c\\n\" +\n\t\"\\x18EVENT_TYPE_SERVER_HEADER\\x10\\x02\\x12\\x1d\\n\" +\n\t\"\\x19EVENT_TYPE_CLIENT_MESSAGE\\x10\\x03\\x12\\x1d\\n\" +\n\t\"\\x19EVENT_TYPE_SERVER_MESSAGE\\x10\\x04\\x12 \\n\" +\n\t\"\\x1cEVENT_TYPE_CLIENT_HALF_CLOSE\\x10\\x05\\x12\\x1d\\n\" +\n\t\"\\x19EVENT_TYPE_SERVER_TRAILER\\x10\\x06\\x12\\x15\\n\" +\n\t\"\\x11EVENT_TYPE_CANCEL\\x10\\a\\\"B\\n\" +\n\t\"\\x06Logger\\x12\\x12\\n\" +\n\t\"\\x0eLOGGER_UNKNOWN\\x10\\x00\\x12\\x11\\n\" +\n\t\"\\rLOGGER_CLIENT\\x10\\x01\\x12\\x11\\n\" +\n\t\"\\rLOGGER_SERVER\\x10\\x02B\\t\\n\" +\n\t\"\\apayload\\\"\\xbb\\x01\\n\" +\n\t\"\\fClientHeader\\x127\\n\" +\n\t\"\\bmetadata\\x18\\x01 \\x01(\\v2\\x1b.grpc.binarylog.v1.MetadataR\\bmetadata\\x12\\x1f\\n\" +\n\t\"\\vmethod_name\\x18\\x02 \\x01(\\tR\\n\" +\n\t\"methodName\\x12\\x1c\\n\" +\n\t\"\\tauthority\\x18\\x03 \\x01(\\tR\\tauthority\\x123\\n\" +\n\t\"\\atimeout\\x18\\x04 \\x01(\\v2\\x19.google.protobuf.DurationR\\atimeout\\\"G\\n\" +\n\t\"\\fServerHeader\\x127\\n\" +\n\t\"\\bmetadata\\x18\\x01 \\x01(\\v2\\x1b.grpc.binarylog.v1.MetadataR\\bmetadata\\\"\\xb1\\x01\\n\" +\n\t\"\\aTrailer\\x127\\n\" +\n\t\"\\bmetadata\\x18\\x01 \\x01(\\v2\\x1b.grpc.binarylog.v1.MetadataR\\bmetadata\\x12\\x1f\\n\" +\n\t\"\\vstatus_code\\x18\\x02 \\x01(\\rR\\n\" +\n\t\"statusCode\\x12%\\n\" +\n\t\"\\x0estatus_message\\x18\\x03 \\x01(\\tR\\rstatusMessage\\x12%\\n\" +\n\t\"\\x0estatus_details\\x18\\x04 \\x01(\\fR\\rstatusDetails\\\"5\\n\" +\n\t\"\\aMessage\\x12\\x16\\n\" +\n\t\"\\x06length\\x18\\x01 \\x01(\\rR\\x06length\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\x02 \\x01(\\fR\\x04data\\\"B\\n\" +\n\t\"\\bMetadata\\x126\\n\" +\n\t\"\\x05entry\\x18\\x01 \\x03(\\v2 .grpc.binarylog.v1.MetadataEntryR\\x05entry\\\"7\\n\" +\n\t\"\\rMetadataEntry\\x12\\x10\\n\" +\n\t\"\\x03key\\x18\\x01 \\x01(\\tR\\x03key\\x12\\x14\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\fR\\x05value\\\"\\xb8\\x01\\n\" +\n\t\"\\aAddress\\x123\\n\" +\n\t\"\\x04type\\x18\\x01 \\x01(\\x0e2\\x1f.grpc.binarylog.v1.Address.TypeR\\x04type\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\x12\\x17\\n\" +\n\t\"\\aip_port\\x18\\x03 \\x01(\\rR\\x06ipPort\\\"E\\n\" +\n\t\"\\x04Type\\x12\\x10\\n\" +\n\t\"\\fTYPE_UNKNOWN\\x10\\x00\\x12\\r\\n\" +\n\t\"\\tTYPE_IPV4\\x10\\x01\\x12\\r\\n\" +\n\t\"\\tTYPE_IPV6\\x10\\x02\\x12\\r\\n\" +\n\t\"\\tTYPE_UNIX\\x10\\x03B\\\\\\n\" +\n\t\"\\x14io.grpc.binarylog.v1B\\x0eBinaryLogProtoP\\x01Z2google.golang.org/grpc/binarylog/grpc_binarylog_v1b\\x06proto3\"\n\nvar (\n\tfile_grpc_binlog_v1_binarylog_proto_rawDescOnce sync.Once\n\tfile_grpc_binlog_v1_binarylog_proto_rawDescData []byte\n)\n\nfunc file_grpc_binlog_v1_binarylog_proto_rawDescGZIP() []byte {\n\tfile_grpc_binlog_v1_binarylog_proto_rawDescOnce.Do(func() {\n\t\tfile_grpc_binlog_v1_binarylog_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_binlog_v1_binarylog_proto_rawDesc), len(file_grpc_binlog_v1_binarylog_proto_rawDesc)))\n\t})\n\treturn file_grpc_binlog_v1_binarylog_proto_rawDescData\n}\n\nvar file_grpc_binlog_v1_binarylog_proto_enumTypes = make([]protoimpl.EnumInfo, 3)\nvar file_grpc_binlog_v1_binarylog_proto_msgTypes = make([]protoimpl.MessageInfo, 8)\nvar file_grpc_binlog_v1_binarylog_proto_goTypes = []any{\n\t(GrpcLogEntry_EventType)(0),   // 0: grpc.binarylog.v1.GrpcLogEntry.EventType\n\t(GrpcLogEntry_Logger)(0),      // 1: grpc.binarylog.v1.GrpcLogEntry.Logger\n\t(Address_Type)(0),             // 2: grpc.binarylog.v1.Address.Type\n\t(*GrpcLogEntry)(nil),          // 3: grpc.binarylog.v1.GrpcLogEntry\n\t(*ClientHeader)(nil),          // 4: grpc.binarylog.v1.ClientHeader\n\t(*ServerHeader)(nil),          // 5: grpc.binarylog.v1.ServerHeader\n\t(*Trailer)(nil),               // 6: grpc.binarylog.v1.Trailer\n\t(*Message)(nil),               // 7: grpc.binarylog.v1.Message\n\t(*Metadata)(nil),              // 8: grpc.binarylog.v1.Metadata\n\t(*MetadataEntry)(nil),         // 9: grpc.binarylog.v1.MetadataEntry\n\t(*Address)(nil),               // 10: grpc.binarylog.v1.Address\n\t(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp\n\t(*durationpb.Duration)(nil),   // 12: google.protobuf.Duration\n}\nvar file_grpc_binlog_v1_binarylog_proto_depIdxs = []int32{\n\t11, // 0: grpc.binarylog.v1.GrpcLogEntry.timestamp:type_name -> google.protobuf.Timestamp\n\t0,  // 1: grpc.binarylog.v1.GrpcLogEntry.type:type_name -> grpc.binarylog.v1.GrpcLogEntry.EventType\n\t1,  // 2: grpc.binarylog.v1.GrpcLogEntry.logger:type_name -> grpc.binarylog.v1.GrpcLogEntry.Logger\n\t4,  // 3: grpc.binarylog.v1.GrpcLogEntry.client_header:type_name -> grpc.binarylog.v1.ClientHeader\n\t5,  // 4: grpc.binarylog.v1.GrpcLogEntry.server_header:type_name -> grpc.binarylog.v1.ServerHeader\n\t7,  // 5: grpc.binarylog.v1.GrpcLogEntry.message:type_name -> grpc.binarylog.v1.Message\n\t6,  // 6: grpc.binarylog.v1.GrpcLogEntry.trailer:type_name -> grpc.binarylog.v1.Trailer\n\t10, // 7: grpc.binarylog.v1.GrpcLogEntry.peer:type_name -> grpc.binarylog.v1.Address\n\t8,  // 8: grpc.binarylog.v1.ClientHeader.metadata:type_name -> grpc.binarylog.v1.Metadata\n\t12, // 9: grpc.binarylog.v1.ClientHeader.timeout:type_name -> google.protobuf.Duration\n\t8,  // 10: grpc.binarylog.v1.ServerHeader.metadata:type_name -> grpc.binarylog.v1.Metadata\n\t8,  // 11: grpc.binarylog.v1.Trailer.metadata:type_name -> grpc.binarylog.v1.Metadata\n\t9,  // 12: grpc.binarylog.v1.Metadata.entry:type_name -> grpc.binarylog.v1.MetadataEntry\n\t2,  // 13: grpc.binarylog.v1.Address.type:type_name -> grpc.binarylog.v1.Address.Type\n\t14, // [14:14] is the sub-list for method output_type\n\t14, // [14:14] is the sub-list for method input_type\n\t14, // [14:14] is the sub-list for extension type_name\n\t14, // [14:14] is the sub-list for extension extendee\n\t0,  // [0:14] is the sub-list for field type_name\n}\n\nfunc init() { file_grpc_binlog_v1_binarylog_proto_init() }\nfunc file_grpc_binlog_v1_binarylog_proto_init() {\n\tif File_grpc_binlog_v1_binarylog_proto != nil {\n\t\treturn\n\t}\n\tfile_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []any{\n\t\t(*GrpcLogEntry_ClientHeader)(nil),\n\t\t(*GrpcLogEntry_ServerHeader)(nil),\n\t\t(*GrpcLogEntry_Message)(nil),\n\t\t(*GrpcLogEntry_Trailer)(nil),\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_binlog_v1_binarylog_proto_rawDesc), len(file_grpc_binlog_v1_binarylog_proto_rawDesc)),\n\t\t\tNumEnums:      3,\n\t\t\tNumMessages:   8,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_grpc_binlog_v1_binarylog_proto_goTypes,\n\t\tDependencyIndexes: file_grpc_binlog_v1_binarylog_proto_depIdxs,\n\t\tEnumInfos:         file_grpc_binlog_v1_binarylog_proto_enumTypes,\n\t\tMessageInfos:      file_grpc_binlog_v1_binarylog_proto_msgTypes,\n\t}.Build()\n\tFile_grpc_binlog_v1_binarylog_proto = out.File\n\tfile_grpc_binlog_v1_binarylog_proto_goTypes = nil\n\tfile_grpc_binlog_v1_binarylog_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/call.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n)\n\n// Invoke sends the RPC request on the wire and returns after response is\n// received.  This is typically called by generated code.\n//\n// All errors returned by Invoke are compatible with the status package.\nfunc (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply any, opts ...CallOption) error {\n\t// allow interceptor to see all applicable call options, which means those\n\t// configured as defaults from dial option as well as per-call options\n\topts = combine(cc.dopts.callOptions, opts)\n\n\tif cc.dopts.unaryInt != nil {\n\t\treturn cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...)\n\t}\n\treturn invoke(ctx, method, args, reply, cc, opts...)\n}\n\nfunc combine(o1 []CallOption, o2 []CallOption) []CallOption {\n\t// we don't use append because o1 could have extra capacity whose\n\t// elements would be overwritten, which could cause inadvertent\n\t// sharing (and race conditions) between concurrent calls\n\tif len(o1) == 0 {\n\t\treturn o2\n\t} else if len(o2) == 0 {\n\t\treturn o1\n\t}\n\tret := make([]CallOption, len(o1)+len(o2))\n\tcopy(ret, o1)\n\tcopy(ret[len(o1):], o2)\n\treturn ret\n}\n\n// Invoke sends the RPC request on the wire and returns after response is\n// received.  This is typically called by generated code.\n//\n// DEPRECATED: Use ClientConn.Invoke instead.\nfunc Invoke(ctx context.Context, method string, args, reply any, cc *ClientConn, opts ...CallOption) error {\n\treturn cc.Invoke(ctx, method, args, reply, opts...)\n}\n\nvar unaryStreamDesc = &StreamDesc{ServerStreams: false, ClientStreams: false}\n\nfunc invoke(ctx context.Context, method string, req, reply any, cc *ClientConn, opts ...CallOption) error {\n\tcs, err := newClientStream(ctx, unaryStreamDesc, cc, method, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := cs.SendMsg(req); err != nil {\n\t\treturn err\n\t}\n\treturn cs.RecvMsg(reply)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/channelz/channelz.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package channelz exports internals of the channelz implementation as required\n// by other gRPC packages.\n//\n// The implementation of the channelz spec as defined in\n// https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by\n// the `internal/channelz` package.\n//\n// # Experimental\n//\n// Notice: All APIs in this package are experimental and may be removed in a\n// later release.\npackage channelz\n\nimport \"google.golang.org/grpc/internal/channelz\"\n\n// Identifier is an opaque identifier which uniquely identifies an entity in the\n// channelz database.\ntype Identifier = channelz.Identifier\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/clientconn.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"net/url\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/base\"\n\t\"google.golang.org/grpc/balancer/pickfirst\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/credentials\"\n\texpstats \"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/internal/idle\"\n\tiresolver \"google.golang.org/grpc/internal/resolver\"\n\tistats \"google.golang.org/grpc/internal/stats\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n\n\t_ \"google.golang.org/grpc/balancer/roundrobin\"           // To register roundrobin.\n\t_ \"google.golang.org/grpc/internal/resolver/passthrough\" // To register passthrough resolver.\n\t_ \"google.golang.org/grpc/internal/resolver/unix\"        // To register unix resolver.\n\t_ \"google.golang.org/grpc/resolver/dns\"                  // To register dns resolver.\n)\n\nconst (\n\t// minimum time to give a connection to complete\n\tminConnectTimeout = 20 * time.Second\n)\n\nvar (\n\t// ErrClientConnClosing indicates that the operation is illegal because\n\t// the ClientConn is closing.\n\t//\n\t// Deprecated: this error should not be relied upon by users; use the status\n\t// code of Canceled instead.\n\tErrClientConnClosing = status.Error(codes.Canceled, \"grpc: the client connection is closing\")\n\t// errConnDrain indicates that the connection starts to be drained and does not accept any new RPCs.\n\terrConnDrain = errors.New(\"grpc: the connection is drained\")\n\t// errConnClosing indicates that the connection is closing.\n\terrConnClosing = errors.New(\"grpc: the connection is closing\")\n\t// errConnIdling indicates the connection is being closed as the channel\n\t// is moving to an idle mode due to inactivity.\n\terrConnIdling = errors.New(\"grpc: the connection is closing due to channel idleness\")\n\t// invalidDefaultServiceConfigErrPrefix is used to prefix the json parsing error for the default\n\t// service config.\n\tinvalidDefaultServiceConfigErrPrefix = \"grpc: the provided default service config is invalid\"\n\t// PickFirstBalancerName is the name of the pick_first balancer.\n\tPickFirstBalancerName = pickfirst.Name\n)\n\n// The following errors are returned from Dial and DialContext\nvar (\n\t// errNoTransportSecurity indicates that there is no transport security\n\t// being set for ClientConn. Users should either set one or explicitly\n\t// call WithInsecure DialOption to disable security.\n\terrNoTransportSecurity = errors.New(\"grpc: no transport security set (use grpc.WithTransportCredentials(insecure.NewCredentials()) explicitly or set credentials)\")\n\t// errTransportCredsAndBundle indicates that creds bundle is used together\n\t// with other individual Transport Credentials.\n\terrTransportCredsAndBundle = errors.New(\"grpc: credentials.Bundle may not be used with individual TransportCredentials\")\n\t// errNoTransportCredsInBundle indicated that the configured creds bundle\n\t// returned a transport credentials which was nil.\n\terrNoTransportCredsInBundle = errors.New(\"grpc: credentials.Bundle must return non-nil transport credentials\")\n\t// errTransportCredentialsMissing indicates that users want to transmit\n\t// security information (e.g., OAuth2 token) which requires secure\n\t// connection on an insecure connection.\n\terrTransportCredentialsMissing = errors.New(\"grpc: the credentials require transport level security (use grpc.WithTransportCredentials() to set)\")\n)\n\nvar (\n\tdisconnectionsMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:           \"grpc.subchannel.disconnections\",\n\t\tDescription:    \"EXPERIMENTAL. Number of times the selected subchannel becomes disconnected.\",\n\t\tUnit:           \"{disconnection}\",\n\t\tLabels:         []string{\"grpc.target\"},\n\t\tOptionalLabels: []string{\"grpc.lb.backend_service\", \"grpc.lb.locality\", \"grpc.disconnect_error\"},\n\t\tDefault:        false,\n\t})\n\tconnectionAttemptsSucceededMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:           \"grpc.subchannel.connection_attempts_succeeded\",\n\t\tDescription:    \"EXPERIMENTAL. Number of successful connection attempts.\",\n\t\tUnit:           \"{attempt}\",\n\t\tLabels:         []string{\"grpc.target\"},\n\t\tOptionalLabels: []string{\"grpc.lb.backend_service\", \"grpc.lb.locality\"},\n\t\tDefault:        false,\n\t})\n\tconnectionAttemptsFailedMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{\n\t\tName:           \"grpc.subchannel.connection_attempts_failed\",\n\t\tDescription:    \"EXPERIMENTAL. Number of failed connection attempts.\",\n\t\tUnit:           \"{attempt}\",\n\t\tLabels:         []string{\"grpc.target\"},\n\t\tOptionalLabels: []string{\"grpc.lb.backend_service\", \"grpc.lb.locality\"},\n\t\tDefault:        false,\n\t})\n\topenConnectionsMetric = expstats.RegisterInt64UpDownCount(expstats.MetricDescriptor{\n\t\tName:           \"grpc.subchannel.open_connections\",\n\t\tDescription:    \"EXPERIMENTAL. Number of open connections.\",\n\t\tUnit:           \"{attempt}\",\n\t\tLabels:         []string{\"grpc.target\"},\n\t\tOptionalLabels: []string{\"grpc.lb.backend_service\", \"grpc.security_level\", \"grpc.lb.locality\"},\n\t\tDefault:        false,\n\t})\n)\n\nconst (\n\tdefaultClientMaxReceiveMessageSize = 1024 * 1024 * 4\n\tdefaultClientMaxSendMessageSize    = math.MaxInt32\n\t// http2IOBufSize specifies the buffer size for sending frames.\n\tdefaultWriteBufSize = 32 * 1024\n\tdefaultReadBufSize  = 32 * 1024\n)\n\ntype defaultConfigSelector struct {\n\tsc *ServiceConfig\n}\n\nfunc (dcs *defaultConfigSelector) SelectConfig(rpcInfo iresolver.RPCInfo) (*iresolver.RPCConfig, error) {\n\treturn &iresolver.RPCConfig{\n\t\tContext:      rpcInfo.Context,\n\t\tMethodConfig: getMethodConfig(dcs.sc, rpcInfo.Method),\n\t}, nil\n}\n\n// NewClient creates a new gRPC \"channel\" for the target URI provided.  No I/O\n// is performed.  Use of the ClientConn for RPCs will automatically cause it to\n// connect.  The Connect method may be called to manually create a connection,\n// but for most users this should be unnecessary.\n//\n// The target name syntax is defined in\n// https://github.com/grpc/grpc/blob/master/doc/naming.md.  E.g. to use the dns\n// name resolver, a \"dns:///\" prefix may be applied to the target.  The default\n// name resolver will be used if no scheme is detected, or if the parsed scheme\n// is not a registered name resolver.  The default resolver is \"dns\" but can be\n// overridden using the resolver package's SetDefaultScheme.\n//\n// Examples:\n//\n//   - \"foo.googleapis.com:8080\"\n//   - \"dns:///foo.googleapis.com:8080\"\n//   - \"dns:///foo.googleapis.com\"\n//   - \"dns:///10.0.0.213:8080\"\n//   - \"dns:///%5B2001:db8:85a3:8d3:1319:8a2e:370:7348%5D:443\"\n//   - \"dns://8.8.8.8/foo.googleapis.com:8080\"\n//   - \"dns://8.8.8.8/foo.googleapis.com\"\n//   - \"zookeeper://zk.example.com:9900/example_service\"\n//\n// The DialOptions returned by WithBlock, WithTimeout,\n// WithReturnConnectionError, and FailOnNonTempDialError are ignored by this\n// function.\nfunc NewClient(target string, opts ...DialOption) (conn *ClientConn, err error) {\n\tcc := &ClientConn{\n\t\ttarget: target,\n\t\tconns:  make(map[*addrConn]struct{}),\n\t\tdopts:  defaultDialOptions(),\n\t}\n\n\tcc.retryThrottler.Store((*retryThrottler)(nil))\n\tcc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil})\n\tcc.ctx, cc.cancel = context.WithCancel(context.Background())\n\n\t// Apply dial options.\n\tdisableGlobalOpts := false\n\tfor _, opt := range opts {\n\t\tif _, ok := opt.(*disableGlobalDialOptions); ok {\n\t\t\tdisableGlobalOpts = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !disableGlobalOpts {\n\t\tfor _, opt := range globalDialOptions {\n\t\t\topt.apply(&cc.dopts)\n\t\t}\n\t}\n\n\tfor _, opt := range opts {\n\t\topt.apply(&cc.dopts)\n\t}\n\n\t// Determine the resolver to use.\n\tif err := cc.initParsedTargetAndResolverBuilder(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, opt := range globalPerTargetDialOptions {\n\t\topt.DialOptionForTarget(cc.parsedTarget.URL).apply(&cc.dopts)\n\t}\n\n\tchainUnaryClientInterceptors(cc)\n\tchainStreamClientInterceptors(cc)\n\n\tif err := cc.validateTransportCredentials(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif cc.dopts.defaultServiceConfigRawJSON != nil {\n\t\tscpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON, cc.dopts.maxCallAttempts)\n\t\tif scpr.Err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%s: %v\", invalidDefaultServiceConfigErrPrefix, scpr.Err)\n\t\t}\n\t\tcc.dopts.defaultServiceConfig, _ = scpr.Config.(*ServiceConfig)\n\t}\n\tcc.keepaliveParams = cc.dopts.copts.KeepaliveParams\n\n\tif err = cc.initAuthority(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Register ClientConn with channelz. Note that this is only done after\n\t// channel creation cannot fail.\n\tcc.channelzRegistration(target)\n\tchannelz.Infof(logger, cc.channelz, \"parsed dial target is: %#v\", cc.parsedTarget)\n\tchannelz.Infof(logger, cc.channelz, \"Channel authority set to %q\", cc.authority)\n\n\tcc.csMgr = newConnectivityStateManager(cc.ctx, cc.channelz)\n\tcc.pickerWrapper = newPickerWrapper()\n\n\tcc.metricsRecorderList = istats.NewMetricsRecorderList(cc.dopts.copts.StatsHandlers)\n\tcc.statsHandler = istats.NewCombinedHandler(cc.dopts.copts.StatsHandlers...)\n\n\tcc.initIdleStateLocked() // Safe to call without the lock, since nothing else has a reference to cc.\n\tcc.idlenessMgr = idle.NewManager((*idler)(cc), cc.dopts.idleTimeout)\n\n\treturn cc, nil\n}\n\n// Dial calls DialContext(context.Background(), target, opts...).\n//\n// Deprecated: use NewClient instead.  Will be supported throughout 1.x.\nfunc Dial(target string, opts ...DialOption) (*ClientConn, error) {\n\treturn DialContext(context.Background(), target, opts...)\n}\n\n// DialContext calls NewClient and then exits idle mode.  If WithBlock(true) is\n// used, it calls Connect and WaitForStateChange until either the context\n// expires or the state of the ClientConn is Ready.\n//\n// One subtle difference between NewClient and Dial and DialContext is that the\n// former uses \"dns\" as the default name resolver, while the latter use\n// \"passthrough\" for backward compatibility.  This distinction should not matter\n// to most users, but could matter to legacy users that specify a custom dialer\n// and expect it to receive the target string directly.\n//\n// Deprecated: use NewClient instead.  Will be supported throughout 1.x.\nfunc DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) {\n\t// At the end of this method, we kick the channel out of idle, rather than\n\t// waiting for the first rpc.\n\t//\n\t// WithLocalDNSResolution dial option in `grpc.Dial` ensures that it\n\t// preserves behavior: when default scheme passthrough is used, skip\n\t// hostname resolution, when \"dns\" is used for resolution, perform\n\t// resolution on the client.\n\topts = append([]DialOption{withDefaultScheme(\"passthrough\"), WithLocalDNSResolution()}, opts...)\n\tcc, err := NewClient(target, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// We start the channel off in idle mode, but kick it out of idle now,\n\t// instead of waiting for the first RPC.  This is the legacy behavior of\n\t// Dial.\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tcc.Close()\n\t\t}\n\t}()\n\n\t// This creates the name resolver, load balancer, etc.\n\tif err := cc.exitIdleMode(); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to exit idle mode: %w\", err)\n\t}\n\tcc.idlenessMgr.UnsafeSetNotIdle()\n\n\t// Return now for non-blocking dials.\n\tif !cc.dopts.block {\n\t\treturn cc, nil\n\t}\n\n\tif cc.dopts.timeout > 0 {\n\t\tvar cancel context.CancelFunc\n\t\tctx, cancel = context.WithTimeout(ctx, cc.dopts.timeout)\n\t\tdefer cancel()\n\t}\n\tdefer func() {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\tswitch {\n\t\t\tcase ctx.Err() == err:\n\t\t\t\tconn = nil\n\t\t\tcase err == nil || !cc.dopts.returnLastError:\n\t\t\t\tconn, err = nil, ctx.Err()\n\t\t\tdefault:\n\t\t\t\tconn, err = nil, fmt.Errorf(\"%v: %v\", ctx.Err(), err)\n\t\t\t}\n\t\tdefault:\n\t\t}\n\t}()\n\n\t// A blocking dial blocks until the clientConn is ready.\n\tfor {\n\t\ts := cc.GetState()\n\t\tif s == connectivity.Idle {\n\t\t\tcc.Connect()\n\t\t}\n\t\tif s == connectivity.Ready {\n\t\t\treturn cc, nil\n\t\t} else if cc.dopts.copts.FailOnNonTempDialError && s == connectivity.TransientFailure {\n\t\t\tif err = cc.connectionError(); err != nil {\n\t\t\t\tterr, ok := err.(interface {\n\t\t\t\t\tTemporary() bool\n\t\t\t\t})\n\t\t\t\tif ok && !terr.Temporary() {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif !cc.WaitForStateChange(ctx, s) {\n\t\t\t// ctx got timeout or canceled.\n\t\t\tif err = cc.connectionError(); err != nil && cc.dopts.returnLastError {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn nil, ctx.Err()\n\t\t}\n\t}\n}\n\n// addTraceEvent is a helper method to add a trace event on the channel. If the\n// channel is a nested one, the same event is also added on the parent channel.\nfunc (cc *ClientConn) addTraceEvent(msg string) {\n\tted := &channelz.TraceEvent{\n\t\tDesc:     fmt.Sprintf(\"Channel %s\", msg),\n\t\tSeverity: channelz.CtInfo,\n\t}\n\tif cc.dopts.channelzParent != nil {\n\t\tted.Parent = &channelz.TraceEvent{\n\t\t\tDesc:     fmt.Sprintf(\"Nested channel(id:%d) %s\", cc.channelz.ID, msg),\n\t\t\tSeverity: channelz.CtInfo,\n\t\t}\n\t}\n\tchannelz.AddTraceEvent(logger, cc.channelz, 1, ted)\n}\n\ntype idler ClientConn\n\nfunc (i *idler) EnterIdleMode() {\n\t(*ClientConn)(i).enterIdleMode()\n}\n\nfunc (i *idler) ExitIdleMode() {\n\t// Ignore the error returned from this method, because from the perspective\n\t// of the caller (idleness manager), the channel would have always moved out\n\t// of IDLE by the time this method returns.\n\t(*ClientConn)(i).exitIdleMode()\n}\n\n// exitIdleMode moves the channel out of idle mode by recreating the name\n// resolver and load balancer.  This should never be called directly; use\n// cc.idlenessMgr.ExitIdleMode instead.\nfunc (cc *ClientConn) exitIdleMode() error {\n\tcc.mu.Lock()\n\tif cc.conns == nil {\n\t\tcc.mu.Unlock()\n\t\treturn errConnClosing\n\t}\n\tcc.mu.Unlock()\n\n\t// Set state to CONNECTING before building the name resolver\n\t// so the channel does not remain in IDLE.\n\tcc.csMgr.updateState(connectivity.Connecting)\n\n\t// This needs to be called without cc.mu because this builds a new resolver\n\t// which might update state or report error inline, which would then need to\n\t// acquire cc.mu.\n\tif err := cc.resolverWrapper.start(); err != nil {\n\t\t// If resolver creation fails, treat it like an error reported by the\n\t\t// resolver before any valid updates. Set channel's state to\n\t\t// TransientFailure, and set an erroring picker with the resolver build\n\t\t// error, which will returned as part of any subsequent RPCs.\n\t\tlogger.Warningf(\"Failed to start resolver: %v\", err)\n\t\tcc.csMgr.updateState(connectivity.TransientFailure)\n\t\tcc.mu.Lock()\n\t\tcc.updateResolverStateAndUnlock(resolver.State{}, err)\n\t\treturn fmt.Errorf(\"failed to start resolver: %w\", err)\n\t}\n\n\tcc.addTraceEvent(\"exiting idle mode\")\n\treturn nil\n}\n\n// initIdleStateLocked initializes common state to how it should be while idle.\nfunc (cc *ClientConn) initIdleStateLocked() {\n\tcc.resolverWrapper = newCCResolverWrapper(cc)\n\tcc.balancerWrapper = newCCBalancerWrapper(cc)\n\tcc.firstResolveEvent = grpcsync.NewEvent()\n\t// cc.conns == nil is a proxy for the ClientConn being closed. So, instead\n\t// of setting it to nil here, we recreate the map. This also means that we\n\t// don't have to do this when exiting idle mode.\n\tcc.conns = make(map[*addrConn]struct{})\n}\n\n// enterIdleMode puts the channel in idle mode, and as part of it shuts down the\n// name resolver, load balancer, and any subchannels.  This should never be\n// called directly; use cc.idlenessMgr.EnterIdleMode instead.\nfunc (cc *ClientConn) enterIdleMode() {\n\tcc.mu.Lock()\n\n\tif cc.conns == nil {\n\t\tcc.mu.Unlock()\n\t\treturn\n\t}\n\n\tconns := cc.conns\n\n\trWrapper := cc.resolverWrapper\n\trWrapper.close()\n\tcc.pickerWrapper.reset()\n\tbWrapper := cc.balancerWrapper\n\tbWrapper.close()\n\tcc.csMgr.updateState(connectivity.Idle)\n\tcc.addTraceEvent(\"entering idle mode\")\n\n\tcc.initIdleStateLocked()\n\n\tcc.mu.Unlock()\n\n\t// Block until the name resolver and LB policy are closed.\n\t<-rWrapper.serializer.Done()\n\t<-bWrapper.serializer.Done()\n\n\t// Close all subchannels after the LB policy is closed.\n\tfor ac := range conns {\n\t\tac.tearDown(errConnIdling)\n\t}\n}\n\n// validateTransportCredentials performs a series of checks on the configured\n// transport credentials. It returns a non-nil error if any of these conditions\n// are met:\n//   - no transport creds and no creds bundle is configured\n//   - both transport creds and creds bundle are configured\n//   - creds bundle is configured, but it lacks a transport credentials\n//   - insecure transport creds configured alongside call creds that require\n//     transport level security\n//\n// If none of the above conditions are met, the configured credentials are\n// deemed valid and a nil error is returned.\nfunc (cc *ClientConn) validateTransportCredentials() error {\n\tif cc.dopts.copts.TransportCredentials == nil && cc.dopts.copts.CredsBundle == nil {\n\t\treturn errNoTransportSecurity\n\t}\n\tif cc.dopts.copts.TransportCredentials != nil && cc.dopts.copts.CredsBundle != nil {\n\t\treturn errTransportCredsAndBundle\n\t}\n\tif cc.dopts.copts.CredsBundle != nil && cc.dopts.copts.CredsBundle.TransportCredentials() == nil {\n\t\treturn errNoTransportCredsInBundle\n\t}\n\ttransportCreds := cc.dopts.copts.TransportCredentials\n\tif transportCreds == nil {\n\t\ttransportCreds = cc.dopts.copts.CredsBundle.TransportCredentials()\n\t}\n\tif transportCreds.Info().SecurityProtocol == \"insecure\" {\n\t\tfor _, cd := range cc.dopts.copts.PerRPCCredentials {\n\t\t\tif cd.RequireTransportSecurity() {\n\t\t\t\treturn errTransportCredentialsMissing\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// channelzRegistration registers the newly created ClientConn with channelz and\n// stores the returned identifier in `cc.channelz`.  A channelz trace event is\n// emitted for ClientConn creation. If the newly created ClientConn is a nested\n// one, i.e a valid parent ClientConn ID is specified via a dial option, the\n// trace event is also added to the parent.\n//\n// Doesn't grab cc.mu as this method is expected to be called only at Dial time.\nfunc (cc *ClientConn) channelzRegistration(target string) {\n\tparentChannel, _ := cc.dopts.channelzParent.(*channelz.Channel)\n\tcc.channelz = channelz.RegisterChannel(parentChannel, target)\n\tcc.addTraceEvent(fmt.Sprintf(\"created for target %q\", target))\n}\n\n// chainUnaryClientInterceptors chains all unary client interceptors into one.\nfunc chainUnaryClientInterceptors(cc *ClientConn) {\n\tinterceptors := cc.dopts.chainUnaryInts\n\t// Prepend dopts.unaryInt to the chaining interceptors if it exists, since unaryInt will\n\t// be executed before any other chained interceptors.\n\tif cc.dopts.unaryInt != nil {\n\t\tinterceptors = append([]UnaryClientInterceptor{cc.dopts.unaryInt}, interceptors...)\n\t}\n\tvar chainedInt UnaryClientInterceptor\n\tif len(interceptors) == 0 {\n\t\tchainedInt = nil\n\t} else if len(interceptors) == 1 {\n\t\tchainedInt = interceptors[0]\n\t} else {\n\t\tchainedInt = func(ctx context.Context, method string, req, reply any, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error {\n\t\t\treturn interceptors[0](ctx, method, req, reply, cc, getChainUnaryInvoker(interceptors, 0, invoker), opts...)\n\t\t}\n\t}\n\tcc.dopts.unaryInt = chainedInt\n}\n\n// getChainUnaryInvoker recursively generate the chained unary invoker.\nfunc getChainUnaryInvoker(interceptors []UnaryClientInterceptor, curr int, finalInvoker UnaryInvoker) UnaryInvoker {\n\tif curr == len(interceptors)-1 {\n\t\treturn finalInvoker\n\t}\n\treturn func(ctx context.Context, method string, req, reply any, cc *ClientConn, opts ...CallOption) error {\n\t\treturn interceptors[curr+1](ctx, method, req, reply, cc, getChainUnaryInvoker(interceptors, curr+1, finalInvoker), opts...)\n\t}\n}\n\n// chainStreamClientInterceptors chains all stream client interceptors into one.\nfunc chainStreamClientInterceptors(cc *ClientConn) {\n\tinterceptors := cc.dopts.chainStreamInts\n\t// Prepend dopts.streamInt to the chaining interceptors if it exists, since streamInt will\n\t// be executed before any other chained interceptors.\n\tif cc.dopts.streamInt != nil {\n\t\tinterceptors = append([]StreamClientInterceptor{cc.dopts.streamInt}, interceptors...)\n\t}\n\tvar chainedInt StreamClientInterceptor\n\tif len(interceptors) == 0 {\n\t\tchainedInt = nil\n\t} else if len(interceptors) == 1 {\n\t\tchainedInt = interceptors[0]\n\t} else {\n\t\tchainedInt = func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error) {\n\t\t\treturn interceptors[0](ctx, desc, cc, method, getChainStreamer(interceptors, 0, streamer), opts...)\n\t\t}\n\t}\n\tcc.dopts.streamInt = chainedInt\n}\n\n// getChainStreamer recursively generate the chained client stream constructor.\nfunc getChainStreamer(interceptors []StreamClientInterceptor, curr int, finalStreamer Streamer) Streamer {\n\tif curr == len(interceptors)-1 {\n\t\treturn finalStreamer\n\t}\n\treturn func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error) {\n\t\treturn interceptors[curr+1](ctx, desc, cc, method, getChainStreamer(interceptors, curr+1, finalStreamer), opts...)\n\t}\n}\n\n// newConnectivityStateManager creates an connectivityStateManager with\n// the specified channel.\nfunc newConnectivityStateManager(ctx context.Context, channel *channelz.Channel) *connectivityStateManager {\n\treturn &connectivityStateManager{\n\t\tchannelz: channel,\n\t\tpubSub:   grpcsync.NewPubSub(ctx),\n\t}\n}\n\n// connectivityStateManager keeps the connectivity.State of ClientConn.\n// This struct will eventually be exported so the balancers can access it.\n//\n// TODO: If possible, get rid of the `connectivityStateManager` type, and\n// provide this functionality using the `PubSub`, to avoid keeping track of\n// the connectivity state at two places.\ntype connectivityStateManager struct {\n\tmu         sync.Mutex\n\tstate      connectivity.State\n\tnotifyChan chan struct{}\n\tchannelz   *channelz.Channel\n\tpubSub     *grpcsync.PubSub\n}\n\n// updateState updates the connectivity.State of ClientConn.\n// If there's a change it notifies goroutines waiting on state change to\n// happen.\nfunc (csm *connectivityStateManager) updateState(state connectivity.State) {\n\tcsm.mu.Lock()\n\tdefer csm.mu.Unlock()\n\tif csm.state == connectivity.Shutdown {\n\t\treturn\n\t}\n\tif csm.state == state {\n\t\treturn\n\t}\n\tcsm.state = state\n\tcsm.channelz.ChannelMetrics.State.Store(&state)\n\tcsm.pubSub.Publish(state)\n\n\tchannelz.Infof(logger, csm.channelz, \"Channel Connectivity change to %v\", state)\n\tif csm.notifyChan != nil {\n\t\t// There are other goroutines waiting on this channel.\n\t\tclose(csm.notifyChan)\n\t\tcsm.notifyChan = nil\n\t}\n}\n\nfunc (csm *connectivityStateManager) getState() connectivity.State {\n\tcsm.mu.Lock()\n\tdefer csm.mu.Unlock()\n\treturn csm.state\n}\n\nfunc (csm *connectivityStateManager) getNotifyChan() <-chan struct{} {\n\tcsm.mu.Lock()\n\tdefer csm.mu.Unlock()\n\tif csm.notifyChan == nil {\n\t\tcsm.notifyChan = make(chan struct{})\n\t}\n\treturn csm.notifyChan\n}\n\n// ClientConnInterface defines the functions clients need to perform unary and\n// streaming RPCs.  It is implemented by *ClientConn, and is only intended to\n// be referenced by generated code.\ntype ClientConnInterface interface {\n\t// Invoke performs a unary RPC and returns after the response is received\n\t// into reply.\n\tInvoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error\n\t// NewStream begins a streaming RPC.\n\tNewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error)\n}\n\n// Assert *ClientConn implements ClientConnInterface.\nvar _ ClientConnInterface = (*ClientConn)(nil)\n\n// ClientConn represents a virtual connection to a conceptual endpoint, to\n// perform RPCs.\n//\n// A ClientConn is free to have zero or more actual connections to the endpoint\n// based on configuration, load, etc. It is also free to determine which actual\n// endpoints to use and may change it every RPC, permitting client-side load\n// balancing.\n//\n// A ClientConn encapsulates a range of functionality including name\n// resolution, TCP connection establishment (with retries and backoff) and TLS\n// handshakes. It also handles errors on established connections by\n// re-resolving the name and reconnecting.\ntype ClientConn struct {\n\tctx    context.Context    // Initialized using the background context at dial time.\n\tcancel context.CancelFunc // Cancelled on close.\n\n\t// The following are initialized at dial time, and are read-only after that.\n\ttarget              string            // User's dial target.\n\tparsedTarget        resolver.Target   // See initParsedTargetAndResolverBuilder().\n\tauthority           string            // See initAuthority().\n\tdopts               dialOptions       // Default and user specified dial options.\n\tchannelz            *channelz.Channel // Channelz object.\n\tresolverBuilder     resolver.Builder  // See initParsedTargetAndResolverBuilder().\n\tidlenessMgr         *idle.Manager\n\tmetricsRecorderList *istats.MetricsRecorderList\n\tstatsHandler        stats.Handler\n\n\t// The following provide their own synchronization, and therefore don't\n\t// require cc.mu to be held to access them.\n\tcsMgr              *connectivityStateManager\n\tpickerWrapper      *pickerWrapper\n\tsafeConfigSelector iresolver.SafeConfigSelector\n\tretryThrottler     atomic.Value // Updated from service config.\n\n\t// mu protects the following fields.\n\t// TODO: split mu so the same mutex isn't used for everything.\n\tmu              sync.RWMutex\n\tresolverWrapper *ccResolverWrapper         // Always recreated whenever entering idle to simplify Close.\n\tbalancerWrapper *ccBalancerWrapper         // Always recreated whenever entering idle to simplify Close.\n\tsc              *ServiceConfig             // Latest service config received from the resolver.\n\tconns           map[*addrConn]struct{}     // Set to nil on close.\n\tkeepaliveParams keepalive.ClientParameters // May be updated upon receipt of a GoAway.\n\t// firstResolveEvent is used to track whether the name resolver sent us at\n\t// least one update. RPCs block on this event.  May be accessed without mu\n\t// if we know we cannot be asked to enter idle mode while accessing it (e.g.\n\t// when the idle manager has already been closed, or if we are already\n\t// entering idle mode).\n\tfirstResolveEvent *grpcsync.Event\n\n\tlceMu               sync.Mutex // protects lastConnectionError\n\tlastConnectionError error\n}\n\n// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or\n// ctx expires. A true value is returned in former case and false in latter.\nfunc (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool {\n\tch := cc.csMgr.getNotifyChan()\n\tif cc.csMgr.getState() != sourceState {\n\t\treturn true\n\t}\n\tselect {\n\tcase <-ctx.Done():\n\t\treturn false\n\tcase <-ch:\n\t\treturn true\n\t}\n}\n\n// GetState returns the connectivity.State of ClientConn.\nfunc (cc *ClientConn) GetState() connectivity.State {\n\treturn cc.csMgr.getState()\n}\n\n// Connect causes all subchannels in the ClientConn to attempt to connect if\n// the channel is idle.  Does not wait for the connection attempts to begin\n// before returning.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a later\n// release.\nfunc (cc *ClientConn) Connect() {\n\tcc.idlenessMgr.ExitIdleMode()\n\n\t// If the ClientConn was not in idle mode, we need to call ExitIdle on the\n\t// LB policy so that connections can be created.\n\tcc.mu.Lock()\n\tcc.balancerWrapper.exitIdle()\n\tcc.mu.Unlock()\n}\n\n// waitForResolvedAddrs blocks until the resolver provides addresses or the\n// context expires, whichever happens first.\n//\n// Error is nil unless the context expires first; otherwise returns a status\n// error based on the context.\n//\n// The returned boolean indicates whether it did block or not. If the\n// resolution has already happened once before, it returns false without\n// blocking. Otherwise, it wait for the resolution and return true if\n// resolution has succeeded or return false along with error if resolution has\n// failed.\nfunc (cc *ClientConn) waitForResolvedAddrs(ctx context.Context) (bool, error) {\n\t// This is on the RPC path, so we use a fast path to avoid the\n\t// more-expensive \"select\" below after the resolver has returned once.\n\tif cc.firstResolveEvent.HasFired() {\n\t\treturn false, nil\n\t}\n\tinternal.NewStreamWaitingForResolver()\n\tselect {\n\tcase <-cc.firstResolveEvent.Done():\n\t\treturn true, nil\n\tcase <-ctx.Done():\n\t\treturn false, status.FromContextError(ctx.Err()).Err()\n\tcase <-cc.ctx.Done():\n\t\treturn false, ErrClientConnClosing\n\t}\n}\n\nvar emptyServiceConfig *ServiceConfig\n\nfunc init() {\n\tcfg := parseServiceConfig(\"{}\", defaultMaxCallAttempts)\n\tif cfg.Err != nil {\n\t\tpanic(fmt.Sprintf(\"impossible error parsing empty service config: %v\", cfg.Err))\n\t}\n\temptyServiceConfig = cfg.Config.(*ServiceConfig)\n\n\tinternal.SubscribeToConnectivityStateChanges = func(cc *ClientConn, s grpcsync.Subscriber) func() {\n\t\treturn cc.csMgr.pubSub.Subscribe(s)\n\t}\n\tinternal.EnterIdleModeForTesting = func(cc *ClientConn) {\n\t\tcc.idlenessMgr.EnterIdleModeForTesting()\n\t}\n\tinternal.ExitIdleModeForTesting = func(cc *ClientConn) {\n\t\tcc.idlenessMgr.ExitIdleMode()\n\t}\n}\n\nfunc (cc *ClientConn) maybeApplyDefaultServiceConfig() {\n\tif cc.sc != nil {\n\t\tcc.applyServiceConfigAndBalancer(cc.sc, nil)\n\t\treturn\n\t}\n\tif cc.dopts.defaultServiceConfig != nil {\n\t\tcc.applyServiceConfigAndBalancer(cc.dopts.defaultServiceConfig, &defaultConfigSelector{cc.dopts.defaultServiceConfig})\n\t} else {\n\t\tcc.applyServiceConfigAndBalancer(emptyServiceConfig, &defaultConfigSelector{emptyServiceConfig})\n\t}\n}\n\nfunc (cc *ClientConn) updateResolverStateAndUnlock(s resolver.State, err error) error {\n\tdefer cc.firstResolveEvent.Fire()\n\t// Check if the ClientConn is already closed. Some fields (e.g.\n\t// balancerWrapper) are set to nil when closing the ClientConn, and could\n\t// cause nil pointer panic if we don't have this check.\n\tif cc.conns == nil {\n\t\tcc.mu.Unlock()\n\t\treturn nil\n\t}\n\n\tif err != nil {\n\t\t// May need to apply the initial service config in case the resolver\n\t\t// doesn't support service configs, or doesn't provide a service config\n\t\t// with the new addresses.\n\t\tcc.maybeApplyDefaultServiceConfig()\n\n\t\tcc.balancerWrapper.resolverError(err)\n\n\t\t// No addresses are valid with err set; return early.\n\t\tcc.mu.Unlock()\n\t\treturn balancer.ErrBadResolverState\n\t}\n\n\tvar ret error\n\tif cc.dopts.disableServiceConfig {\n\t\tchannelz.Infof(logger, cc.channelz, \"ignoring service config from resolver (%v) and applying the default because service config is disabled\", s.ServiceConfig)\n\t\tcc.maybeApplyDefaultServiceConfig()\n\t} else if s.ServiceConfig == nil {\n\t\tcc.maybeApplyDefaultServiceConfig()\n\t\t// TODO: do we need to apply a failing LB policy if there is no\n\t\t// default, per the error handling design?\n\t} else {\n\t\tif sc, ok := s.ServiceConfig.Config.(*ServiceConfig); s.ServiceConfig.Err == nil && ok {\n\t\t\tconfigSelector := iresolver.GetConfigSelector(s)\n\t\t\tif configSelector != nil {\n\t\t\t\tif len(s.ServiceConfig.Config.(*ServiceConfig).Methods) != 0 {\n\t\t\t\t\tchannelz.Infof(logger, cc.channelz, \"method configs in service config will be ignored due to presence of config selector\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconfigSelector = &defaultConfigSelector{sc}\n\t\t\t}\n\t\t\tcc.applyServiceConfigAndBalancer(sc, configSelector)\n\t\t} else {\n\t\t\tret = balancer.ErrBadResolverState\n\t\t\tif cc.sc == nil {\n\t\t\t\t// Apply the failing LB only if we haven't received valid service config\n\t\t\t\t// from the name resolver in the past.\n\t\t\t\tcc.applyFailingLBLocked(s.ServiceConfig)\n\t\t\t\tcc.mu.Unlock()\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\t}\n\n\tbalCfg := cc.sc.lbConfig\n\tbw := cc.balancerWrapper\n\tcc.mu.Unlock()\n\n\tuccsErr := bw.updateClientConnState(&balancer.ClientConnState{ResolverState: s, BalancerConfig: balCfg})\n\tif ret == nil {\n\t\tret = uccsErr // prefer ErrBadResolver state since any other error is\n\t\t// currently meaningless to the caller.\n\t}\n\treturn ret\n}\n\n// applyFailingLBLocked is akin to configuring an LB policy on the channel which\n// always fails RPCs. Here, an actual LB policy is not configured, but an always\n// erroring picker is configured, which returns errors with information about\n// what was invalid in the received service config. A config selector with no\n// service config is configured, and the connectivity state of the channel is\n// set to TransientFailure.\nfunc (cc *ClientConn) applyFailingLBLocked(sc *serviceconfig.ParseResult) {\n\tvar err error\n\tif sc.Err != nil {\n\t\terr = status.Errorf(codes.Unavailable, \"error parsing service config: %v\", sc.Err)\n\t} else {\n\t\terr = status.Errorf(codes.Unavailable, \"illegal service config type: %T\", sc.Config)\n\t}\n\tcc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil})\n\tcc.pickerWrapper.updatePicker(base.NewErrPicker(err))\n\tcc.csMgr.updateState(connectivity.TransientFailure)\n}\n\n// Makes a copy of the input addresses slice. Addresses are passed during\n// subconn creation and address update operations.\nfunc copyAddresses(in []resolver.Address) []resolver.Address {\n\tout := make([]resolver.Address, len(in))\n\tcopy(out, in)\n\treturn out\n}\n\n// newAddrConnLocked creates an addrConn for addrs and adds it to cc.conns.\n//\n// Caller needs to make sure len(addrs) > 0.\nfunc (cc *ClientConn) newAddrConnLocked(addrs []resolver.Address, opts balancer.NewSubConnOptions) (*addrConn, error) {\n\tif cc.conns == nil {\n\t\treturn nil, ErrClientConnClosing\n\t}\n\n\tac := &addrConn{\n\t\tstate:        connectivity.Idle,\n\t\tcc:           cc,\n\t\taddrs:        copyAddresses(addrs),\n\t\tscopts:       opts,\n\t\tdopts:        cc.dopts,\n\t\tchannelz:     channelz.RegisterSubChannel(cc.channelz, \"\"),\n\t\tresetBackoff: make(chan struct{}),\n\t}\n\tac.updateTelemetryLabelsLocked()\n\tac.ctx, ac.cancel = context.WithCancel(cc.ctx)\n\t// Start with our address set to the first address; this may be updated if\n\t// we connect to different addresses.\n\tac.channelz.ChannelMetrics.Target.Store(&addrs[0].Addr)\n\n\tchannelz.AddTraceEvent(logger, ac.channelz, 0, &channelz.TraceEvent{\n\t\tDesc:     \"Subchannel created\",\n\t\tSeverity: channelz.CtInfo,\n\t\tParent: &channelz.TraceEvent{\n\t\t\tDesc:     fmt.Sprintf(\"Subchannel(id:%d) created\", ac.channelz.ID),\n\t\t\tSeverity: channelz.CtInfo,\n\t\t},\n\t})\n\n\t// Track ac in cc. This needs to be done before any getTransport(...) is called.\n\tcc.conns[ac] = struct{}{}\n\treturn ac, nil\n}\n\n// removeAddrConn removes the addrConn in the subConn from clientConn.\n// It also tears down the ac with the given error.\nfunc (cc *ClientConn) removeAddrConn(ac *addrConn, err error) {\n\tcc.mu.Lock()\n\tif cc.conns == nil {\n\t\tcc.mu.Unlock()\n\t\treturn\n\t}\n\tdelete(cc.conns, ac)\n\tcc.mu.Unlock()\n\tac.tearDown(err)\n}\n\n// Target returns the target string of the ClientConn.\nfunc (cc *ClientConn) Target() string {\n\treturn cc.target\n}\n\n// CanonicalTarget returns the canonical target string used when creating cc.\n//\n// This always has the form \"<scheme>://[authority]/<endpoint>\".  For example:\n//\n//   - \"dns:///example.com:42\"\n//   - \"dns://8.8.8.8/example.com:42\"\n//   - \"unix:///path/to/socket\"\nfunc (cc *ClientConn) CanonicalTarget() string {\n\treturn cc.parsedTarget.String()\n}\n\nfunc (cc *ClientConn) incrCallsStarted() {\n\tcc.channelz.ChannelMetrics.CallsStarted.Add(1)\n\tcc.channelz.ChannelMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano())\n}\n\nfunc (cc *ClientConn) incrCallsSucceeded() {\n\tcc.channelz.ChannelMetrics.CallsSucceeded.Add(1)\n}\n\nfunc (cc *ClientConn) incrCallsFailed() {\n\tcc.channelz.ChannelMetrics.CallsFailed.Add(1)\n}\n\n// connect starts creating a transport.\n// It does nothing if the ac is not IDLE.\n// TODO(bar) Move this to the addrConn section.\nfunc (ac *addrConn) connect() error {\n\tac.mu.Lock()\n\tif ac.state == connectivity.Shutdown {\n\t\tif logger.V(2) {\n\t\t\tlogger.Infof(\"connect called on shutdown addrConn; ignoring.\")\n\t\t}\n\t\tac.mu.Unlock()\n\t\treturn errConnClosing\n\t}\n\tif ac.state != connectivity.Idle {\n\t\tif logger.V(2) {\n\t\t\tlogger.Infof(\"connect called on addrConn in non-idle state (%v); ignoring.\", ac.state)\n\t\t}\n\t\tac.mu.Unlock()\n\t\treturn nil\n\t}\n\n\tac.resetTransportAndUnlock()\n\treturn nil\n}\n\n// equalAddressIgnoringBalAttributes returns true is a and b are considered equal.\n// This is different from the Equal method on the resolver.Address type which\n// considers all fields to determine equality. Here, we only consider fields\n// that are meaningful to the subConn.\nfunc equalAddressIgnoringBalAttributes(a, b *resolver.Address) bool {\n\treturn a.Addr == b.Addr && a.ServerName == b.ServerName &&\n\t\ta.Attributes.Equal(b.Attributes) &&\n\t\ta.Metadata == b.Metadata\n}\n\nfunc equalAddressesIgnoringBalAttributes(a, b []resolver.Address) bool {\n\treturn slices.EqualFunc(a, b, func(a, b resolver.Address) bool { return equalAddressIgnoringBalAttributes(&a, &b) })\n}\n\n// updateAddrs updates ac.addrs with the new addresses list and handles active\n// connections or connection attempts.\nfunc (ac *addrConn) updateAddrs(addrs []resolver.Address) {\n\taddrs = copyAddresses(addrs)\n\tlimit := len(addrs)\n\tif limit > 5 {\n\t\tlimit = 5\n\t}\n\tchannelz.Infof(logger, ac.channelz, \"addrConn: updateAddrs addrs (%d of %d): %v\", limit, len(addrs), addrs[:limit])\n\n\tac.mu.Lock()\n\tif equalAddressesIgnoringBalAttributes(ac.addrs, addrs) {\n\t\tac.mu.Unlock()\n\t\treturn\n\t}\n\n\tac.addrs = addrs\n\tac.updateTelemetryLabelsLocked()\n\tif ac.state == connectivity.Shutdown ||\n\t\tac.state == connectivity.TransientFailure ||\n\t\tac.state == connectivity.Idle {\n\t\t// We were not connecting, so do nothing but update the addresses.\n\t\tac.mu.Unlock()\n\t\treturn\n\t}\n\n\tif ac.state == connectivity.Ready {\n\t\t// Try to find the connected address.\n\t\tfor _, a := range addrs {\n\t\t\ta.ServerName = ac.cc.getServerName(a)\n\t\t\tif equalAddressIgnoringBalAttributes(&a, &ac.curAddr) {\n\t\t\t\t// We are connected to a valid address, so do nothing but\n\t\t\t\t// update the addresses.\n\t\t\t\tac.mu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\t// We are either connected to the wrong address or currently connecting.\n\t// Stop the current iteration and restart.\n\n\tac.cancel()\n\tac.ctx, ac.cancel = context.WithCancel(ac.cc.ctx)\n\n\t// We have to defer here because GracefulClose => onClose, which requires\n\t// locking ac.mu.\n\tif ac.transport != nil {\n\t\tdefer ac.transport.GracefulClose()\n\t\tac.transport = nil\n\t}\n\n\tif len(addrs) == 0 {\n\t\tac.updateConnectivityState(connectivity.Idle, nil)\n\t}\n\n\t// Since we were connecting/connected, we should start a new connection\n\t// attempt.\n\tgo ac.resetTransportAndUnlock()\n}\n\n// getServerName determines the serverName to be used in the connection\n// handshake. The default value for the serverName is the authority on the\n// ClientConn, which either comes from the user's dial target or through an\n// authority override specified using the WithAuthority dial option. Name\n// resolvers can specify a per-address override for the serverName through the\n// resolver.Address.ServerName field which is used only if the WithAuthority\n// dial option was not used. The rationale is that per-address authority\n// overrides specified by the name resolver can represent a security risk, while\n// an override specified by the user is more dependable since they probably know\n// what they are doing.\nfunc (cc *ClientConn) getServerName(addr resolver.Address) string {\n\tif cc.dopts.authority != \"\" {\n\t\treturn cc.dopts.authority\n\t}\n\tif addr.ServerName != \"\" {\n\t\treturn addr.ServerName\n\t}\n\treturn cc.authority\n}\n\nfunc getMethodConfig(sc *ServiceConfig, method string) MethodConfig {\n\tif sc == nil {\n\t\treturn MethodConfig{}\n\t}\n\tif m, ok := sc.Methods[method]; ok {\n\t\treturn m\n\t}\n\ti := strings.LastIndex(method, \"/\")\n\tif m, ok := sc.Methods[method[:i+1]]; ok {\n\t\treturn m\n\t}\n\treturn sc.Methods[\"\"]\n}\n\n// GetMethodConfig gets the method config of the input method.\n// If there's an exact match for input method (i.e. /service/method), we return\n// the corresponding MethodConfig.\n// If there isn't an exact match for the input method, we look for the service's default\n// config under the service (i.e /service/) and then for the default for all services (empty string).\n//\n// If there is a default MethodConfig for the service, we return it.\n// Otherwise, we return an empty MethodConfig.\nfunc (cc *ClientConn) GetMethodConfig(method string) MethodConfig {\n\t// TODO: Avoid the locking here.\n\tcc.mu.RLock()\n\tdefer cc.mu.RUnlock()\n\treturn getMethodConfig(cc.sc, method)\n}\n\nfunc (cc *ClientConn) healthCheckConfig() *healthCheckConfig {\n\tcc.mu.RLock()\n\tdefer cc.mu.RUnlock()\n\tif cc.sc == nil {\n\t\treturn nil\n\t}\n\treturn cc.sc.healthCheckConfig\n}\n\nfunc (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, configSelector iresolver.ConfigSelector) {\n\tif sc == nil {\n\t\t// should never reach here.\n\t\treturn\n\t}\n\tcc.sc = sc\n\tif configSelector != nil {\n\t\tcc.safeConfigSelector.UpdateConfigSelector(configSelector)\n\t}\n\n\tif cc.sc.retryThrottling != nil {\n\t\tnewThrottler := &retryThrottler{\n\t\t\ttokens: cc.sc.retryThrottling.MaxTokens,\n\t\t\tmax:    cc.sc.retryThrottling.MaxTokens,\n\t\t\tthresh: cc.sc.retryThrottling.MaxTokens / 2,\n\t\t\tratio:  cc.sc.retryThrottling.TokenRatio,\n\t\t}\n\t\tcc.retryThrottler.Store(newThrottler)\n\t} else {\n\t\tcc.retryThrottler.Store((*retryThrottler)(nil))\n\t}\n}\n\nfunc (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) {\n\tcc.mu.RLock()\n\tcc.resolverWrapper.resolveNow(o)\n\tcc.mu.RUnlock()\n}\n\nfunc (cc *ClientConn) resolveNowLocked(o resolver.ResolveNowOptions) {\n\tcc.resolverWrapper.resolveNow(o)\n}\n\n// ResetConnectBackoff wakes up all subchannels in transient failure and causes\n// them to attempt another connection immediately.  It also resets the backoff\n// times used for subsequent attempts regardless of the current state.\n//\n// In general, this function should not be used.  Typical service or network\n// outages result in a reasonable client reconnection strategy by default.\n// However, if a previously unavailable network becomes available, this may be\n// used to trigger an immediate reconnect.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc (cc *ClientConn) ResetConnectBackoff() {\n\tcc.mu.Lock()\n\tconns := cc.conns\n\tcc.mu.Unlock()\n\tfor ac := range conns {\n\t\tac.resetConnectBackoff()\n\t}\n}\n\n// Close tears down the ClientConn and all underlying connections.\nfunc (cc *ClientConn) Close() error {\n\tdefer func() {\n\t\tcc.cancel()\n\t\t<-cc.csMgr.pubSub.Done()\n\t}()\n\n\t// Prevent calls to enter/exit idle immediately, and ensure we are not\n\t// currently entering/exiting idle mode.\n\tcc.idlenessMgr.Close()\n\n\tcc.mu.Lock()\n\tif cc.conns == nil {\n\t\tcc.mu.Unlock()\n\t\treturn ErrClientConnClosing\n\t}\n\n\tconns := cc.conns\n\tcc.conns = nil\n\tcc.csMgr.updateState(connectivity.Shutdown)\n\n\t// We can safely unlock and continue to access all fields now as\n\t// cc.conns==nil, preventing any further operations on cc.\n\tcc.mu.Unlock()\n\n\tcc.resolverWrapper.close()\n\t// The order of closing matters here since the balancer wrapper assumes the\n\t// picker is closed before it is closed.\n\tcc.pickerWrapper.close()\n\tcc.balancerWrapper.close()\n\n\t<-cc.resolverWrapper.serializer.Done()\n\t<-cc.balancerWrapper.serializer.Done()\n\tvar wg sync.WaitGroup\n\tfor ac := range conns {\n\t\twg.Add(1)\n\t\tgo func(ac *addrConn) {\n\t\t\tdefer wg.Done()\n\t\t\tac.tearDown(ErrClientConnClosing)\n\t\t}(ac)\n\t}\n\twg.Wait()\n\tcc.addTraceEvent(\"deleted\")\n\t// TraceEvent needs to be called before RemoveEntry, as TraceEvent may add\n\t// trace reference to the entity being deleted, and thus prevent it from being\n\t// deleted right away.\n\tchannelz.RemoveEntry(cc.channelz.ID)\n\n\treturn nil\n}\n\n// addrConn is a network connection to a given address.\ntype addrConn struct {\n\tctx    context.Context\n\tcancel context.CancelFunc\n\n\tcc     *ClientConn\n\tdopts  dialOptions\n\tacbw   *acBalancerWrapper\n\tscopts balancer.NewSubConnOptions\n\n\t// transport is set when there's a viable transport (note: ac state may not be READY as LB channel\n\t// health checking may require server to report healthy to set ac to READY), and is reset\n\t// to nil when the current transport should no longer be used to create a stream (e.g. after GoAway\n\t// is received, transport is closed, ac has been torn down).\n\ttransport transport.ClientTransport // The current transport.\n\n\t// This mutex is used on the RPC path, so its usage should be minimized as\n\t// much as possible.\n\t// TODO: Find a lock-free way to retrieve the transport and state from the\n\t// addrConn.\n\tmu      sync.Mutex\n\tcurAddr resolver.Address   // The current address.\n\taddrs   []resolver.Address // All addresses that the resolver resolved to.\n\n\t// Use updateConnectivityState for updating addrConn's connectivity state.\n\tstate connectivity.State\n\n\tbackoffIdx   int // Needs to be stateful for resetConnectBackoff.\n\tresetBackoff chan struct{}\n\n\tchannelz *channelz.SubChannel\n\n\tlocalityLabel       string\n\tbackendServiceLabel string\n}\n\n// Note: this requires a lock on ac.mu.\nfunc (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) {\n\tif ac.state == s {\n\t\treturn\n\t}\n\n\t// If we are transitioning out of Ready, it means there is a disconnection.\n\t// A SubConn can also transition from CONNECTING directly to IDLE when\n\t// a transport is successfully created, but the connection fails\n\t// before the SubConn can send the notification for READY. We treat\n\t// this as a successful connection and transition to IDLE.\n\t// TODO: https://github.com/grpc/grpc-go/issues/7862 - Remove the second\n\t// part of the if condition below once the issue is fixed.\n\tif ac.state == connectivity.Ready || (ac.state == connectivity.Connecting && s == connectivity.Idle) {\n\t\tdisconnectionsMetric.Record(ac.cc.metricsRecorderList, 1, ac.cc.target, ac.backendServiceLabel, ac.localityLabel, \"unknown\")\n\t\topenConnectionsMetric.Record(ac.cc.metricsRecorderList, -1, ac.cc.target, ac.backendServiceLabel, ac.securityLevelLocked(), ac.localityLabel)\n\t}\n\tac.state = s\n\tac.channelz.ChannelMetrics.State.Store(&s)\n\tif lastErr == nil {\n\t\tchannelz.Infof(logger, ac.channelz, \"Subchannel Connectivity change to %v\", s)\n\t} else {\n\t\tchannelz.Infof(logger, ac.channelz, \"Subchannel Connectivity change to %v, last error: %s\", s, lastErr)\n\t}\n\tac.acbw.updateState(s, ac.curAddr, lastErr)\n}\n\n// adjustParams updates parameters used to create transports upon\n// receiving a GoAway.\nfunc (ac *addrConn) adjustParams(r transport.GoAwayReason) {\n\tif r == transport.GoAwayTooManyPings {\n\t\tv := 2 * ac.dopts.copts.KeepaliveParams.Time\n\t\tac.cc.mu.Lock()\n\t\tif v > ac.cc.keepaliveParams.Time {\n\t\t\tac.cc.keepaliveParams.Time = v\n\t\t}\n\t\tac.cc.mu.Unlock()\n\t}\n}\n\n// resetTransportAndUnlock unconditionally connects the addrConn.\n//\n// ac.mu must be held by the caller, and this function will guarantee it is released.\nfunc (ac *addrConn) resetTransportAndUnlock() {\n\tacCtx := ac.ctx\n\tif acCtx.Err() != nil {\n\t\tac.mu.Unlock()\n\t\treturn\n\t}\n\n\taddrs := ac.addrs\n\tbackoffFor := ac.dopts.bs.Backoff(ac.backoffIdx)\n\t// This will be the duration that dial gets to finish.\n\tdialDuration := minConnectTimeout\n\tif ac.dopts.minConnectTimeout != nil {\n\t\tdialDuration = ac.dopts.minConnectTimeout()\n\t}\n\n\tif dialDuration < backoffFor {\n\t\t// Give dial more time as we keep failing to connect.\n\t\tdialDuration = backoffFor\n\t}\n\t// We can potentially spend all the time trying the first address, and\n\t// if the server accepts the connection and then hangs, the following\n\t// addresses will never be tried.\n\t//\n\t// The spec doesn't mention what should be done for multiple addresses.\n\t// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md#proposed-backoff-algorithm\n\tconnectDeadline := time.Now().Add(dialDuration)\n\n\tac.updateConnectivityState(connectivity.Connecting, nil)\n\tac.mu.Unlock()\n\n\tif err := ac.tryAllAddrs(acCtx, addrs, connectDeadline); err != nil {\n\t\tif !errors.Is(err, context.Canceled) {\n\t\t\tconnectionAttemptsFailedMetric.Record(ac.cc.metricsRecorderList, 1, ac.cc.target, ac.backendServiceLabel, ac.localityLabel)\n\t\t} else {\n\t\t\tif logger.V(2) {\n\t\t\t\t// This records cancelled connection attempts which can be later\n\t\t\t\t// replaced by a metric.\n\t\t\t\tlogger.Infof(\"Context cancellation detected; not recording this as a failed connection attempt.\")\n\t\t\t}\n\t\t}\n\t\t// TODO: #7534 - Move re-resolution requests into the pick_first LB policy\n\t\t// to ensure one resolution request per pass instead of per subconn failure.\n\t\tac.cc.resolveNow(resolver.ResolveNowOptions{})\n\t\tac.mu.Lock()\n\t\tif acCtx.Err() != nil {\n\t\t\t// addrConn was torn down.\n\t\t\tac.mu.Unlock()\n\t\t\treturn\n\t\t}\n\t\t// After exhausting all addresses, the addrConn enters\n\t\t// TRANSIENT_FAILURE.\n\t\tac.updateConnectivityState(connectivity.TransientFailure, err)\n\n\t\t// Backoff.\n\t\tb := ac.resetBackoff\n\t\tac.mu.Unlock()\n\n\t\ttimer := time.NewTimer(backoffFor)\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\tac.mu.Lock()\n\t\t\tac.backoffIdx++\n\t\t\tac.mu.Unlock()\n\t\tcase <-b:\n\t\t\ttimer.Stop()\n\t\tcase <-acCtx.Done():\n\t\t\ttimer.Stop()\n\t\t\treturn\n\t\t}\n\n\t\tac.mu.Lock()\n\t\tif acCtx.Err() == nil {\n\t\t\tac.updateConnectivityState(connectivity.Idle, err)\n\t\t}\n\t\tac.mu.Unlock()\n\t\treturn\n\t}\n\t// Success; reset backoff.\n\tac.mu.Lock()\n\tconnectionAttemptsSucceededMetric.Record(ac.cc.metricsRecorderList, 1, ac.cc.target, ac.backendServiceLabel, ac.localityLabel)\n\topenConnectionsMetric.Record(ac.cc.metricsRecorderList, 1, ac.cc.target, ac.backendServiceLabel, ac.securityLevelLocked(), ac.localityLabel)\n\tac.backoffIdx = 0\n\tac.mu.Unlock()\n}\n\n// updateTelemetryLabelsLocked calculates and caches the telemetry labels based on the\n// first address in addrConn.\nfunc (ac *addrConn) updateTelemetryLabelsLocked() {\n\tlabelsFunc, ok := internal.AddressToTelemetryLabels.(func(resolver.Address) map[string]string)\n\tif !ok || len(ac.addrs) == 0 {\n\t\t// Reset defaults\n\t\tac.localityLabel = \"\"\n\t\tac.backendServiceLabel = \"\"\n\t\treturn\n\t}\n\tlabels := labelsFunc(ac.addrs[0])\n\tac.localityLabel = labels[\"grpc.lb.locality\"]\n\tac.backendServiceLabel = labels[\"grpc.lb.backend_service\"]\n}\n\ntype securityLevelKey struct{}\n\nfunc (ac *addrConn) securityLevelLocked() string {\n\tvar secLevel string\n\t// During disconnection, ac.transport is nil. Fall back to the security level\n\t// stored in the current address during connection.\n\tif ac.transport == nil {\n\t\tsecLevel, _ = ac.curAddr.Attributes.Value(securityLevelKey{}).(string)\n\t\treturn secLevel\n\t}\n\tauthInfo := ac.transport.Peer().AuthInfo\n\tif ci, ok := authInfo.(interface {\n\t\tGetCommonAuthInfo() credentials.CommonAuthInfo\n\t}); ok {\n\t\tsecLevel = ci.GetCommonAuthInfo().SecurityLevel.String()\n\t\t// Store the security level in the current address' attributes so\n\t\t// that it remains available for disconnection metrics after the\n\t\t// transport is closed.\n\t\tac.curAddr.Attributes = ac.curAddr.Attributes.WithValue(securityLevelKey{}, secLevel)\n\t}\n\treturn secLevel\n}\n\n// tryAllAddrs tries to create a connection to the addresses, and stop when at\n// the first successful one. It returns an error if no address was successfully\n// connected, or updates ac appropriately with the new transport.\nfunc (ac *addrConn) tryAllAddrs(ctx context.Context, addrs []resolver.Address, connectDeadline time.Time) error {\n\tvar firstConnErr error\n\tfor _, addr := range addrs {\n\t\tac.channelz.ChannelMetrics.Target.Store(&addr.Addr)\n\t\tif ctx.Err() != nil {\n\t\t\treturn errConnClosing\n\t\t}\n\t\tac.mu.Lock()\n\n\t\tac.cc.mu.RLock()\n\t\tac.dopts.copts.KeepaliveParams = ac.cc.keepaliveParams\n\t\tac.cc.mu.RUnlock()\n\n\t\tcopts := ac.dopts.copts\n\t\tif ac.scopts.CredsBundle != nil {\n\t\t\tcopts.CredsBundle = ac.scopts.CredsBundle\n\t\t}\n\t\tac.mu.Unlock()\n\n\t\tchannelz.Infof(logger, ac.channelz, \"Subchannel picks a new address %q to connect\", addr.Addr)\n\n\t\terr := ac.createTransport(ctx, addr, copts, connectDeadline)\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\t\tif firstConnErr == nil {\n\t\t\tfirstConnErr = err\n\t\t}\n\t\tac.cc.updateConnectionError(err)\n\t}\n\n\t// Couldn't connect to any address.\n\treturn firstConnErr\n}\n\n// createTransport creates a connection to addr. It returns an error if the\n// address was not successfully connected, or updates ac appropriately with the\n// new transport.\nfunc (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error {\n\taddr.ServerName = ac.cc.getServerName(addr)\n\thctx, hcancel := context.WithCancel(ctx)\n\n\tonClose := func(r transport.GoAwayReason) {\n\t\tac.mu.Lock()\n\t\tdefer ac.mu.Unlock()\n\t\t// adjust params based on GoAwayReason\n\t\tac.adjustParams(r)\n\t\tif ctx.Err() != nil {\n\t\t\t// Already shut down or connection attempt canceled.  tearDown() or\n\t\t\t// updateAddrs() already cleared the transport and canceled hctx\n\t\t\t// via ac.ctx, and we expected this connection to be closed, so do\n\t\t\t// nothing here.\n\t\t\treturn\n\t\t}\n\t\thcancel()\n\t\tif ac.transport == nil {\n\t\t\t// We're still connecting to this address, which could error.  Do\n\t\t\t// not update the connectivity state or resolve; these will happen\n\t\t\t// at the end of the tryAllAddrs connection loop in the event of an\n\t\t\t// error.\n\t\t\treturn\n\t\t}\n\t\tac.transport = nil\n\t\t// Refresh the name resolver on any connection loss.\n\t\tac.cc.resolveNow(resolver.ResolveNowOptions{})\n\t\t// Always go idle and wait for the LB policy to initiate a new\n\t\t// connection attempt.\n\t\tac.updateConnectivityState(connectivity.Idle, nil)\n\t}\n\n\tconnectCtx, cancel := context.WithDeadline(ctx, connectDeadline)\n\tdefer cancel()\n\tcopts.ChannelzParent = ac.channelz\n\n\tnewTr, err := transport.NewHTTP2Client(connectCtx, ac.cc.ctx, addr, copts, onClose)\n\tif err != nil {\n\t\tif logger.V(2) {\n\t\t\tlogger.Infof(\"Creating new client transport to %q: %v\", addr, err)\n\t\t}\n\t\t// newTr is either nil, or closed.\n\t\thcancel()\n\t\tchannelz.Warningf(logger, ac.channelz, \"grpc: addrConn.createTransport failed to connect to %s. Err: %v\", addr, err)\n\t\treturn err\n\t}\n\n\tac.mu.Lock()\n\tdefer ac.mu.Unlock()\n\tif ctx.Err() != nil {\n\t\t// This can happen if the subConn was removed while in `Connecting`\n\t\t// state. tearDown() would have set the state to `Shutdown`, but\n\t\t// would not have closed the transport since ac.transport would not\n\t\t// have been set at that point.\n\t\t//\n\t\t// We run this in a goroutine because newTr.Close() calls onClose()\n\t\t// inline, which requires locking ac.mu.\n\t\t//\n\t\t// The error we pass to Close() is immaterial since there are no open\n\t\t// streams at this point, so no trailers with error details will be sent\n\t\t// out. We just need to pass a non-nil error.\n\t\t//\n\t\t// This can also happen when updateAddrs is called during a connection\n\t\t// attempt.\n\t\tgo newTr.Close(transport.ErrConnClosing)\n\t\treturn nil\n\t}\n\tif hctx.Err() != nil {\n\t\t// onClose was already called for this connection, but the connection\n\t\t// was successfully established first.  Consider it a success and set\n\t\t// the new state to Idle.\n\t\tac.updateConnectivityState(connectivity.Idle, nil)\n\t\treturn nil\n\t}\n\tac.curAddr = addr\n\tac.transport = newTr\n\tac.startHealthCheck(hctx) // Will set state to READY if appropriate.\n\treturn nil\n}\n\n// startHealthCheck starts the health checking stream (RPC) to watch the health\n// stats of this connection if health checking is requested and configured.\n//\n// LB channel health checking is enabled when all requirements below are met:\n// 1. it is not disabled by the user with the WithDisableHealthCheck DialOption\n// 2. internal.HealthCheckFunc is set by importing the grpc/health package\n// 3. a service config with non-empty healthCheckConfig field is provided\n// 4. the load balancer requests it\n//\n// It sets addrConn to READY if the health checking stream is not started.\n//\n// Caller must hold ac.mu.\nfunc (ac *addrConn) startHealthCheck(ctx context.Context) {\n\tvar healthcheckManagingState bool\n\tdefer func() {\n\t\tif !healthcheckManagingState {\n\t\t\tac.updateConnectivityState(connectivity.Ready, nil)\n\t\t}\n\t}()\n\n\tif ac.cc.dopts.disableHealthCheck {\n\t\treturn\n\t}\n\thealthCheckConfig := ac.cc.healthCheckConfig()\n\tif healthCheckConfig == nil {\n\t\treturn\n\t}\n\tif !ac.scopts.HealthCheckEnabled {\n\t\treturn\n\t}\n\thealthCheckFunc := internal.HealthCheckFunc\n\tif healthCheckFunc == nil {\n\t\t// The health package is not imported to set health check function.\n\t\t//\n\t\t// TODO: add a link to the health check doc in the error message.\n\t\tchannelz.Error(logger, ac.channelz, \"Health check is requested but health check function is not set.\")\n\t\treturn\n\t}\n\n\thealthcheckManagingState = true\n\n\t// Set up the health check helper functions.\n\tcurrentTr := ac.transport\n\tnewStream := func(method string) (any, error) {\n\t\tac.mu.Lock()\n\t\tif ac.transport != currentTr {\n\t\t\tac.mu.Unlock()\n\t\t\treturn nil, status.Error(codes.Canceled, \"the provided transport is no longer valid to use\")\n\t\t}\n\t\tac.mu.Unlock()\n\t\treturn newNonRetryClientStream(ctx, &StreamDesc{ServerStreams: true}, method, currentTr, ac)\n\t}\n\tsetConnectivityState := func(s connectivity.State, lastErr error) {\n\t\tac.mu.Lock()\n\t\tdefer ac.mu.Unlock()\n\t\tif ac.transport != currentTr {\n\t\t\treturn\n\t\t}\n\t\tac.updateConnectivityState(s, lastErr)\n\t}\n\t// Start the health checking stream.\n\tgo func() {\n\t\terr := healthCheckFunc(ctx, newStream, setConnectivityState, healthCheckConfig.ServiceName)\n\t\tif err != nil {\n\t\t\tif status.Code(err) == codes.Unimplemented {\n\t\t\t\tchannelz.Error(logger, ac.channelz, \"Subchannel health check is unimplemented at server side, thus health check is disabled\")\n\t\t\t} else {\n\t\t\t\tchannelz.Errorf(logger, ac.channelz, \"Health checking failed: %v\", err)\n\t\t\t}\n\t\t}\n\t}()\n}\n\nfunc (ac *addrConn) resetConnectBackoff() {\n\tac.mu.Lock()\n\tclose(ac.resetBackoff)\n\tac.backoffIdx = 0\n\tac.resetBackoff = make(chan struct{})\n\tac.mu.Unlock()\n}\n\n// getReadyTransport returns the transport if ac's state is READY or nil if not.\nfunc (ac *addrConn) getReadyTransport() transport.ClientTransport {\n\tac.mu.Lock()\n\tdefer ac.mu.Unlock()\n\tif ac.state == connectivity.Ready {\n\t\treturn ac.transport\n\t}\n\treturn nil\n}\n\n// tearDown starts to tear down the addrConn.\n//\n// Note that tearDown doesn't remove ac from ac.cc.conns, so the addrConn struct\n// will leak. In most cases, call cc.removeAddrConn() instead.\nfunc (ac *addrConn) tearDown(err error) {\n\tac.mu.Lock()\n\tif ac.state == connectivity.Shutdown {\n\t\tac.mu.Unlock()\n\t\treturn\n\t}\n\tcurTr := ac.transport\n\tac.transport = nil\n\t// We have to set the state to Shutdown before anything else to prevent races\n\t// between setting the state and logic that waits on context cancellation / etc.\n\tac.updateConnectivityState(connectivity.Shutdown, nil)\n\tac.cancel()\n\tac.curAddr = resolver.Address{}\n\n\tchannelz.AddTraceEvent(logger, ac.channelz, 0, &channelz.TraceEvent{\n\t\tDesc:     \"Subchannel deleted\",\n\t\tSeverity: channelz.CtInfo,\n\t\tParent: &channelz.TraceEvent{\n\t\t\tDesc:     fmt.Sprintf(\"Subchannel(id:%d) deleted\", ac.channelz.ID),\n\t\t\tSeverity: channelz.CtInfo,\n\t\t},\n\t})\n\t// TraceEvent needs to be called before RemoveEntry, as TraceEvent may add\n\t// trace reference to the entity being deleted, and thus prevent it from\n\t// being deleted right away.\n\tchannelz.RemoveEntry(ac.channelz.ID)\n\tac.mu.Unlock()\n\n\t// We have to release the lock before the call to GracefulClose/Close here\n\t// because both of them call onClose(), which requires locking ac.mu.\n\tif curTr != nil {\n\t\tif err == errConnDrain {\n\t\t\t// Close the transport gracefully when the subConn is being shutdown.\n\t\t\t//\n\t\t\t// GracefulClose() may be executed multiple times if:\n\t\t\t// - multiple GoAway frames are received from the server\n\t\t\t// - there are concurrent name resolver or balancer triggered\n\t\t\t//   address removal and GoAway\n\t\t\tcurTr.GracefulClose()\n\t\t} else {\n\t\t\t// Hard close the transport when the channel is entering idle or is\n\t\t\t// being shutdown. In the case where the channel is being shutdown,\n\t\t\t// closing of transports is also taken care of by cancellation of cc.ctx.\n\t\t\t// But in the case where the channel is entering idle, we need to\n\t\t\t// explicitly close the transports here. Instead of distinguishing\n\t\t\t// between these two cases, it is simpler to close the transport\n\t\t\t// unconditionally here.\n\t\t\tcurTr.Close(err)\n\t\t}\n\t}\n}\n\ntype retryThrottler struct {\n\tmax    float64\n\tthresh float64\n\tratio  float64\n\n\tmu     sync.Mutex\n\ttokens float64 // TODO(dfawley): replace with atomic and remove lock.\n}\n\n// throttle subtracts a retry token from the pool and returns whether a retry\n// should be throttled (disallowed) based upon the retry throttling policy in\n// the service config.\nfunc (rt *retryThrottler) throttle() bool {\n\tif rt == nil {\n\t\treturn false\n\t}\n\trt.mu.Lock()\n\tdefer rt.mu.Unlock()\n\trt.tokens--\n\tif rt.tokens < 0 {\n\t\trt.tokens = 0\n\t}\n\treturn rt.tokens <= rt.thresh\n}\n\nfunc (rt *retryThrottler) successfulRPC() {\n\tif rt == nil {\n\t\treturn\n\t}\n\trt.mu.Lock()\n\tdefer rt.mu.Unlock()\n\trt.tokens += rt.ratio\n\tif rt.tokens > rt.max {\n\t\trt.tokens = rt.max\n\t}\n}\n\nfunc (ac *addrConn) incrCallsStarted() {\n\tac.channelz.ChannelMetrics.CallsStarted.Add(1)\n\tac.channelz.ChannelMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano())\n}\n\nfunc (ac *addrConn) incrCallsSucceeded() {\n\tac.channelz.ChannelMetrics.CallsSucceeded.Add(1)\n}\n\nfunc (ac *addrConn) incrCallsFailed() {\n\tac.channelz.ChannelMetrics.CallsFailed.Add(1)\n}\n\n// ErrClientConnTimeout indicates that the ClientConn cannot establish the\n// underlying connections within the specified timeout.\n//\n// Deprecated: This error is never returned by grpc and should not be\n// referenced by users.\nvar ErrClientConnTimeout = errors.New(\"grpc: timed out when dialing\")\n\n// getResolver finds the scheme in the cc's resolvers or the global registry.\n// scheme should always be lowercase (typically by virtue of url.Parse()\n// performing proper RFC3986 behavior).\nfunc (cc *ClientConn) getResolver(scheme string) resolver.Builder {\n\tfor _, rb := range cc.dopts.resolvers {\n\t\tif scheme == rb.Scheme() {\n\t\t\treturn rb\n\t\t}\n\t}\n\treturn resolver.Get(scheme)\n}\n\nfunc (cc *ClientConn) updateConnectionError(err error) {\n\tcc.lceMu.Lock()\n\tcc.lastConnectionError = err\n\tcc.lceMu.Unlock()\n}\n\nfunc (cc *ClientConn) connectionError() error {\n\tcc.lceMu.Lock()\n\tdefer cc.lceMu.Unlock()\n\treturn cc.lastConnectionError\n}\n\n// initParsedTargetAndResolverBuilder parses the user's dial target and stores\n// the parsed target in `cc.parsedTarget`.\n//\n// The resolver to use is determined based on the scheme in the parsed target\n// and the same is stored in `cc.resolverBuilder`.\n//\n// Doesn't grab cc.mu as this method is expected to be called only at Dial time.\nfunc (cc *ClientConn) initParsedTargetAndResolverBuilder() error {\n\tlogger.Infof(\"original dial target is: %q\", cc.target)\n\n\tvar rb resolver.Builder\n\tparsedTarget, err := parseTarget(cc.target)\n\tif err == nil {\n\t\trb = cc.getResolver(parsedTarget.URL.Scheme)\n\t\tif rb != nil {\n\t\t\tcc.parsedTarget = parsedTarget\n\t\t\tcc.resolverBuilder = rb\n\t\t\treturn nil\n\t\t}\n\t}\n\n\t// We are here because the user's dial target did not contain a scheme or\n\t// specified an unregistered scheme. We should fallback to the default\n\t// scheme, except when a custom dialer is specified in which case, we should\n\t// always use passthrough scheme. For either case, we need to respect any overridden\n\t// global defaults set by the user.\n\tdefScheme := cc.dopts.defaultScheme\n\tif internal.UserSetDefaultScheme {\n\t\tdefScheme = resolver.GetDefaultScheme()\n\t}\n\n\tcanonicalTarget := defScheme + \":///\" + cc.target\n\n\tparsedTarget, err = parseTarget(canonicalTarget)\n\tif err != nil {\n\t\treturn err\n\t}\n\trb = cc.getResolver(parsedTarget.URL.Scheme)\n\tif rb == nil {\n\t\treturn fmt.Errorf(\"could not get resolver for default scheme: %q\", parsedTarget.URL.Scheme)\n\t}\n\tcc.parsedTarget = parsedTarget\n\tcc.resolverBuilder = rb\n\treturn nil\n}\n\n// parseTarget uses RFC 3986 semantics to parse the given target into a\n// resolver.Target struct containing url. Query params are stripped from the\n// endpoint.\nfunc parseTarget(target string) (resolver.Target, error) {\n\tu, err := url.Parse(target)\n\tif err != nil {\n\t\treturn resolver.Target{}, err\n\t}\n\n\treturn resolver.Target{URL: *u}, nil\n}\n\n// encodeAuthority escapes the authority string based on valid chars defined in\n// https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.\nfunc encodeAuthority(authority string) string {\n\tconst upperhex = \"0123456789ABCDEF\"\n\n\t// Return for characters that must be escaped as per\n\t// Valid chars are mentioned here:\n\t// https://datatracker.ietf.org/doc/html/rfc3986#section-3.2\n\tshouldEscape := func(c byte) bool {\n\t\t// Alphanum are always allowed.\n\t\tif 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' {\n\t\t\treturn false\n\t\t}\n\t\tswitch c {\n\t\tcase '-', '_', '.', '~': // Unreserved characters\n\t\t\treturn false\n\t\tcase '!', '$', '&', '\\'', '(', ')', '*', '+', ',', ';', '=': // Subdelim characters\n\t\t\treturn false\n\t\tcase ':', '[', ']', '@': // Authority related delimiters\n\t\t\treturn false\n\t\t}\n\t\t// Everything else must be escaped.\n\t\treturn true\n\t}\n\n\thexCount := 0\n\tfor i := 0; i < len(authority); i++ {\n\t\tc := authority[i]\n\t\tif shouldEscape(c) {\n\t\t\thexCount++\n\t\t}\n\t}\n\n\tif hexCount == 0 {\n\t\treturn authority\n\t}\n\n\trequired := len(authority) + 2*hexCount\n\tt := make([]byte, required)\n\n\tj := 0\n\t// This logic is a barebones version of escape in the go net/url library.\n\tfor i := 0; i < len(authority); i++ {\n\t\tswitch c := authority[i]; {\n\t\tcase shouldEscape(c):\n\t\t\tt[j] = '%'\n\t\t\tt[j+1] = upperhex[c>>4]\n\t\t\tt[j+2] = upperhex[c&15]\n\t\t\tj += 3\n\t\tdefault:\n\t\t\tt[j] = authority[i]\n\t\t\tj++\n\t\t}\n\t}\n\treturn string(t)\n}\n\n// Determine channel authority. The order of precedence is as follows:\n// - user specified authority override using `WithAuthority` dial option\n// - creds' notion of server name for the authentication handshake\n// - endpoint from dial target of the form \"scheme://[authority]/endpoint\"\n//\n// Stores the determined authority in `cc.authority`.\n//\n// Returns a non-nil error if the authority returned by the transport\n// credentials do not match the authority configured through the dial option.\n//\n// Doesn't grab cc.mu as this method is expected to be called only at Dial time.\nfunc (cc *ClientConn) initAuthority() error {\n\tdopts := cc.dopts\n\t// Historically, we had two options for users to specify the serverName or\n\t// authority for a channel. One was through the transport credentials\n\t// (either in its constructor, or through the OverrideServerName() method).\n\t// The other option (for cases where WithInsecure() dial option was used)\n\t// was to use the WithAuthority() dial option.\n\t//\n\t// A few things have changed since:\n\t// - `insecure` package with an implementation of the `TransportCredentials`\n\t//   interface for the insecure case\n\t// - WithAuthority() dial option support for secure credentials\n\tauthorityFromCreds := \"\"\n\tif creds := dopts.copts.TransportCredentials; creds != nil && creds.Info().ServerName != \"\" {\n\t\tauthorityFromCreds = creds.Info().ServerName\n\t}\n\tauthorityFromDialOption := dopts.authority\n\tif (authorityFromCreds != \"\" && authorityFromDialOption != \"\") && authorityFromCreds != authorityFromDialOption {\n\t\treturn fmt.Errorf(\"ClientConn's authority from transport creds %q and dial option %q don't match\", authorityFromCreds, authorityFromDialOption)\n\t}\n\n\tendpoint := cc.parsedTarget.Endpoint()\n\tif authorityFromDialOption != \"\" {\n\t\tcc.authority = authorityFromDialOption\n\t} else if authorityFromCreds != \"\" {\n\t\tcc.authority = authorityFromCreds\n\t} else if auth, ok := cc.resolverBuilder.(resolver.AuthorityOverrider); ok {\n\t\tcc.authority = auth.OverrideAuthority(cc.parsedTarget)\n\t} else if strings.HasPrefix(endpoint, \":\") {\n\t\tcc.authority = \"localhost\" + encodeAuthority(endpoint)\n\t} else {\n\t\tcc.authority = encodeAuthority(endpoint)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/codec.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"google.golang.org/grpc/encoding\"\n\t_ \"google.golang.org/grpc/encoding/proto\" // to register the Codec for \"proto\"\n\t\"google.golang.org/grpc/mem\"\n)\n\n// baseCodec captures the new encoding.CodecV2 interface without the Name\n// function, allowing it to be implemented by older Codec and encoding.Codec\n// implementations. The omitted Name function is only needed for the register in\n// the encoding package and is not part of the core functionality.\ntype baseCodec interface {\n\tMarshal(v any) (mem.BufferSlice, error)\n\tUnmarshal(data mem.BufferSlice, v any) error\n}\n\n// getCodec returns an encoding.CodecV2 for the codec of the given name (if\n// registered). Initially checks the V2 registry with encoding.GetCodecV2 and\n// returns the V2 codec if it is registered. Otherwise, it checks the V1 registry\n// with encoding.GetCodec and if it is registered wraps it with newCodecV1Bridge\n// to turn it into an encoding.CodecV2. Returns nil otherwise.\nfunc getCodec(name string) encoding.CodecV2 {\n\tif codecV1 := encoding.GetCodec(name); codecV1 != nil {\n\t\treturn newCodecV1Bridge(codecV1)\n\t}\n\n\treturn encoding.GetCodecV2(name)\n}\n\nfunc newCodecV0Bridge(c Codec) baseCodec {\n\treturn codecV0Bridge{codec: c}\n}\n\nfunc newCodecV1Bridge(c encoding.Codec) encoding.CodecV2 {\n\treturn codecV1Bridge{\n\t\tcodecV0Bridge: codecV0Bridge{codec: c},\n\t\tname:          c.Name(),\n\t}\n}\n\nvar _ baseCodec = codecV0Bridge{}\n\ntype codecV0Bridge struct {\n\tcodec interface {\n\t\tMarshal(v any) ([]byte, error)\n\t\tUnmarshal(data []byte, v any) error\n\t}\n}\n\nfunc (c codecV0Bridge) Marshal(v any) (mem.BufferSlice, error) {\n\tdata, err := c.codec.Marshal(v)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn mem.BufferSlice{mem.SliceBuffer(data)}, nil\n}\n\nfunc (c codecV0Bridge) Unmarshal(data mem.BufferSlice, v any) (err error) {\n\treturn c.codec.Unmarshal(data.Materialize(), v)\n}\n\nvar _ encoding.CodecV2 = codecV1Bridge{}\n\ntype codecV1Bridge struct {\n\tcodecV0Bridge\n\tname string\n}\n\nfunc (c codecV1Bridge) Name() string {\n\treturn c.name\n}\n\n// Codec defines the interface gRPC uses to encode and decode messages.\n// Note that implementations of this interface must be thread safe;\n// a Codec's methods can be called from concurrent goroutines.\n//\n// Deprecated: use encoding.Codec instead.\ntype Codec interface {\n\t// Marshal returns the wire format of v.\n\tMarshal(v any) ([]byte, error)\n\t// Unmarshal parses the wire format into v.\n\tUnmarshal(data []byte, v any) error\n\t// String returns the name of the Codec implementation.  This is unused by\n\t// gRPC.\n\tString() string\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/codes/code_string.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage codes\n\nimport (\n\t\"strconv\"\n\n\t\"google.golang.org/grpc/internal\"\n)\n\nfunc init() {\n\tinternal.CanonicalString = canonicalString\n}\n\nfunc (c Code) String() string {\n\tswitch c {\n\tcase OK:\n\t\treturn \"OK\"\n\tcase Canceled:\n\t\treturn \"Canceled\"\n\tcase Unknown:\n\t\treturn \"Unknown\"\n\tcase InvalidArgument:\n\t\treturn \"InvalidArgument\"\n\tcase DeadlineExceeded:\n\t\treturn \"DeadlineExceeded\"\n\tcase NotFound:\n\t\treturn \"NotFound\"\n\tcase AlreadyExists:\n\t\treturn \"AlreadyExists\"\n\tcase PermissionDenied:\n\t\treturn \"PermissionDenied\"\n\tcase ResourceExhausted:\n\t\treturn \"ResourceExhausted\"\n\tcase FailedPrecondition:\n\t\treturn \"FailedPrecondition\"\n\tcase Aborted:\n\t\treturn \"Aborted\"\n\tcase OutOfRange:\n\t\treturn \"OutOfRange\"\n\tcase Unimplemented:\n\t\treturn \"Unimplemented\"\n\tcase Internal:\n\t\treturn \"Internal\"\n\tcase Unavailable:\n\t\treturn \"Unavailable\"\n\tcase DataLoss:\n\t\treturn \"DataLoss\"\n\tcase Unauthenticated:\n\t\treturn \"Unauthenticated\"\n\tdefault:\n\t\treturn \"Code(\" + strconv.FormatInt(int64(c), 10) + \")\"\n\t}\n}\n\nfunc canonicalString(c Code) string {\n\tswitch c {\n\tcase OK:\n\t\treturn \"OK\"\n\tcase Canceled:\n\t\treturn \"CANCELLED\"\n\tcase Unknown:\n\t\treturn \"UNKNOWN\"\n\tcase InvalidArgument:\n\t\treturn \"INVALID_ARGUMENT\"\n\tcase DeadlineExceeded:\n\t\treturn \"DEADLINE_EXCEEDED\"\n\tcase NotFound:\n\t\treturn \"NOT_FOUND\"\n\tcase AlreadyExists:\n\t\treturn \"ALREADY_EXISTS\"\n\tcase PermissionDenied:\n\t\treturn \"PERMISSION_DENIED\"\n\tcase ResourceExhausted:\n\t\treturn \"RESOURCE_EXHAUSTED\"\n\tcase FailedPrecondition:\n\t\treturn \"FAILED_PRECONDITION\"\n\tcase Aborted:\n\t\treturn \"ABORTED\"\n\tcase OutOfRange:\n\t\treturn \"OUT_OF_RANGE\"\n\tcase Unimplemented:\n\t\treturn \"UNIMPLEMENTED\"\n\tcase Internal:\n\t\treturn \"INTERNAL\"\n\tcase Unavailable:\n\t\treturn \"UNAVAILABLE\"\n\tcase DataLoss:\n\t\treturn \"DATA_LOSS\"\n\tcase Unauthenticated:\n\t\treturn \"UNAUTHENTICATED\"\n\tdefault:\n\t\treturn \"CODE(\" + strconv.FormatInt(int64(c), 10) + \")\"\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/codes/codes.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package codes defines the canonical error codes used by gRPC. It is\n// consistent across various languages.\npackage codes // import \"google.golang.org/grpc/codes\"\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\n// A Code is a status code defined according to the [gRPC documentation].\n//\n// Only the codes defined as consts in this package are valid codes. Do not use\n// other code values.  Behavior of other codes is implementation-specific and\n// interoperability between implementations is not guaranteed.\n//\n// [gRPC documentation]: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md\ntype Code uint32\n\nconst (\n\t// OK is returned on success.\n\tOK Code = 0\n\n\t// Canceled indicates the operation was canceled (typically by the caller).\n\t//\n\t// The gRPC framework will generate this error code when cancellation\n\t// is requested.\n\tCanceled Code = 1\n\n\t// Unknown error. An example of where this error may be returned is\n\t// if a Status value received from another address space belongs to\n\t// an error-space that is not known in this address space. Also\n\t// errors raised by APIs that do not return enough error information\n\t// may be converted to this error.\n\t//\n\t// The gRPC framework will generate this error code in the above two\n\t// mentioned cases.\n\tUnknown Code = 2\n\n\t// InvalidArgument indicates client specified an invalid argument.\n\t// Note that this differs from FailedPrecondition. It indicates arguments\n\t// that are problematic regardless of the state of the system\n\t// (e.g., a malformed file name).\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tInvalidArgument Code = 3\n\n\t// DeadlineExceeded means operation expired before completion.\n\t// For operations that change the state of the system, this error may be\n\t// returned even if the operation has completed successfully. For\n\t// example, a successful response from a server could have been delayed\n\t// long enough for the deadline to expire.\n\t//\n\t// The gRPC framework will generate this error code when the deadline is\n\t// exceeded.\n\tDeadlineExceeded Code = 4\n\n\t// NotFound means some requested entity (e.g., file or directory) was\n\t// not found.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tNotFound Code = 5\n\n\t// AlreadyExists means an attempt to create an entity failed because one\n\t// already exists.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tAlreadyExists Code = 6\n\n\t// PermissionDenied indicates the caller does not have permission to\n\t// execute the specified operation. It must not be used for rejections\n\t// caused by exhausting some resource (use ResourceExhausted\n\t// instead for those errors). It must not be\n\t// used if the caller cannot be identified (use Unauthenticated\n\t// instead for those errors).\n\t//\n\t// This error code will not be generated by the gRPC core framework,\n\t// but expect authentication middleware to use it.\n\tPermissionDenied Code = 7\n\n\t// ResourceExhausted indicates some resource has been exhausted, perhaps\n\t// a per-user quota, or perhaps the entire file system is out of space.\n\t//\n\t// This error code will be generated by the gRPC framework in\n\t// out-of-memory and server overload situations, or when a message is\n\t// larger than the configured maximum size.\n\tResourceExhausted Code = 8\n\n\t// FailedPrecondition indicates operation was rejected because the\n\t// system is not in a state required for the operation's execution.\n\t// For example, directory to be deleted may be non-empty, an rmdir\n\t// operation is applied to a non-directory, etc.\n\t//\n\t// A litmus test that may help a service implementor in deciding\n\t// between FailedPrecondition, Aborted, and Unavailable:\n\t//  (a) Use Unavailable if the client can retry just the failing call.\n\t//  (b) Use Aborted if the client should retry at a higher-level\n\t//      (e.g., restarting a read-modify-write sequence).\n\t//  (c) Use FailedPrecondition if the client should not retry until\n\t//      the system state has been explicitly fixed. E.g., if an \"rmdir\"\n\t//      fails because the directory is non-empty, FailedPrecondition\n\t//      should be returned since the client should not retry unless\n\t//      they have first fixed up the directory by deleting files from it.\n\t//  (d) Use FailedPrecondition if the client performs conditional\n\t//      REST Get/Update/Delete on a resource and the resource on the\n\t//      server does not match the condition. E.g., conflicting\n\t//      read-modify-write on the same resource.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tFailedPrecondition Code = 9\n\n\t// Aborted indicates the operation was aborted, typically due to a\n\t// concurrency issue like sequencer check failures, transaction aborts,\n\t// etc.\n\t//\n\t// See litmus test above for deciding between FailedPrecondition,\n\t// Aborted, and Unavailable.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tAborted Code = 10\n\n\t// OutOfRange means operation was attempted past the valid range.\n\t// E.g., seeking or reading past end of file.\n\t//\n\t// Unlike InvalidArgument, this error indicates a problem that may\n\t// be fixed if the system state changes. For example, a 32-bit file\n\t// system will generate InvalidArgument if asked to read at an\n\t// offset that is not in the range [0,2^32-1], but it will generate\n\t// OutOfRange if asked to read from an offset past the current\n\t// file size.\n\t//\n\t// There is a fair bit of overlap between FailedPrecondition and\n\t// OutOfRange. We recommend using OutOfRange (the more specific\n\t// error) when it applies so that callers who are iterating through\n\t// a space can easily look for an OutOfRange error to detect when\n\t// they are done.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tOutOfRange Code = 11\n\n\t// Unimplemented indicates operation is not implemented or not\n\t// supported/enabled in this service.\n\t//\n\t// This error code will be generated by the gRPC framework. Most\n\t// commonly, you will see this error code when a method implementation\n\t// is missing on the server. It can also be generated for unknown\n\t// compression algorithms or a disagreement as to whether an RPC should\n\t// be streaming.\n\tUnimplemented Code = 12\n\n\t// Internal errors. Means some invariants expected by underlying\n\t// system has been broken. If you see one of these errors,\n\t// something is very broken.\n\t//\n\t// This error code will be generated by the gRPC framework in several\n\t// internal error conditions.\n\tInternal Code = 13\n\n\t// Unavailable indicates the service is currently unavailable.\n\t// This is a most likely a transient condition and may be corrected\n\t// by retrying with a backoff. Note that it is not always safe to retry\n\t// non-idempotent operations.\n\t//\n\t// See litmus test above for deciding between FailedPrecondition,\n\t// Aborted, and Unavailable.\n\t//\n\t// This error code will be generated by the gRPC framework during\n\t// abrupt shutdown of a server process or network connection.\n\tUnavailable Code = 14\n\n\t// DataLoss indicates unrecoverable data loss or corruption.\n\t//\n\t// This error code will not be generated by the gRPC framework.\n\tDataLoss Code = 15\n\n\t// Unauthenticated indicates the request does not have valid\n\t// authentication credentials for the operation.\n\t//\n\t// The gRPC framework will generate this error code when the\n\t// authentication metadata is invalid or a Credentials callback fails,\n\t// but also expect authentication middleware to generate it.\n\tUnauthenticated Code = 16\n\n\t_maxCode = 17\n)\n\nvar strToCode = map[string]Code{\n\t`\"OK\"`: OK,\n\t`\"CANCELLED\"`:/* [sic] */ Canceled,\n\t`\"UNKNOWN\"`:             Unknown,\n\t`\"INVALID_ARGUMENT\"`:    InvalidArgument,\n\t`\"DEADLINE_EXCEEDED\"`:   DeadlineExceeded,\n\t`\"NOT_FOUND\"`:           NotFound,\n\t`\"ALREADY_EXISTS\"`:      AlreadyExists,\n\t`\"PERMISSION_DENIED\"`:   PermissionDenied,\n\t`\"RESOURCE_EXHAUSTED\"`:  ResourceExhausted,\n\t`\"FAILED_PRECONDITION\"`: FailedPrecondition,\n\t`\"ABORTED\"`:             Aborted,\n\t`\"OUT_OF_RANGE\"`:        OutOfRange,\n\t`\"UNIMPLEMENTED\"`:       Unimplemented,\n\t`\"INTERNAL\"`:            Internal,\n\t`\"UNAVAILABLE\"`:         Unavailable,\n\t`\"DATA_LOSS\"`:           DataLoss,\n\t`\"UNAUTHENTICATED\"`:     Unauthenticated,\n}\n\n// UnmarshalJSON unmarshals b into the Code.\nfunc (c *Code) UnmarshalJSON(b []byte) error {\n\t// From json.Unmarshaler: By convention, to approximate the behavior of\n\t// Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte(\"null\")) as\n\t// a no-op.\n\tif string(b) == \"null\" {\n\t\treturn nil\n\t}\n\tif c == nil {\n\t\treturn fmt.Errorf(\"nil receiver passed to UnmarshalJSON\")\n\t}\n\n\tif ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {\n\t\tif ci >= _maxCode {\n\t\t\treturn fmt.Errorf(\"invalid code: %d\", ci)\n\t\t}\n\n\t\t*c = Code(ci)\n\t\treturn nil\n\t}\n\n\tif jc, ok := strToCode[string(b)]; ok {\n\t\t*c = jc\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"invalid code: %q\", string(b))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/connectivity/connectivity.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package connectivity defines connectivity semantics.\n// For details, see https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md.\npackage connectivity\n\nimport (\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nvar logger = grpclog.Component(\"core\")\n\n// State indicates the state of connectivity.\n// It can be the state of a ClientConn or SubConn.\ntype State int\n\nfunc (s State) String() string {\n\tswitch s {\n\tcase Idle:\n\t\treturn \"IDLE\"\n\tcase Connecting:\n\t\treturn \"CONNECTING\"\n\tcase Ready:\n\t\treturn \"READY\"\n\tcase TransientFailure:\n\t\treturn \"TRANSIENT_FAILURE\"\n\tcase Shutdown:\n\t\treturn \"SHUTDOWN\"\n\tdefault:\n\t\tlogger.Errorf(\"unknown connectivity state: %d\", s)\n\t\treturn \"INVALID_STATE\"\n\t}\n}\n\nconst (\n\t// Idle indicates the ClientConn is idle.\n\tIdle State = iota\n\t// Connecting indicates the ClientConn is connecting.\n\tConnecting\n\t// Ready indicates the ClientConn is ready for work.\n\tReady\n\t// TransientFailure indicates the ClientConn has seen a failure but expects to recover.\n\tTransientFailure\n\t// Shutdown indicates the ClientConn has started shutting down.\n\tShutdown\n)\n\n// ServingMode indicates the current mode of operation of the server.\n//\n// Only xDS enabled gRPC servers currently report their serving mode.\ntype ServingMode int\n\nconst (\n\t// ServingModeStarting indicates that the server is starting up.\n\tServingModeStarting ServingMode = iota\n\t// ServingModeServing indicates that the server contains all required\n\t// configuration and is serving RPCs.\n\tServingModeServing\n\t// ServingModeNotServing indicates that the server is not accepting new\n\t// connections. Existing connections will be closed gracefully, allowing\n\t// in-progress RPCs to complete. A server enters this mode when it does not\n\t// contain the required configuration to serve RPCs.\n\tServingModeNotServing\n)\n\nfunc (s ServingMode) String() string {\n\tswitch s {\n\tcase ServingModeStarting:\n\t\treturn \"STARTING\"\n\tcase ServingModeServing:\n\t\treturn \"SERVING\"\n\tcase ServingModeNotServing:\n\t\treturn \"NOT_SERVING\"\n\tdefault:\n\t\tlogger.Errorf(\"unknown serving mode: %d\", s)\n\t\treturn \"INVALID_MODE\"\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/credentials/credentials.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package credentials implements various credentials supported by gRPC library,\n// which encapsulate all the state needed by a client to authenticate with a\n// server and make various assertions, e.g., about the client's identity, role,\n// or whether it is authorized to make a particular call.\npackage credentials // import \"google.golang.org/grpc/credentials\"\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\n\t\"google.golang.org/grpc/attributes\"\n\ticredentials \"google.golang.org/grpc/internal/credentials\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// PerRPCCredentials defines the common interface for the credentials which need to\n// attach security information to every RPC (e.g., oauth2).\ntype PerRPCCredentials interface {\n\t// GetRequestMetadata gets the current request metadata, refreshing tokens\n\t// if required. This should be called by the transport layer on each\n\t// request, and the data should be populated in headers or other\n\t// context. If a status code is returned, it will be used as the status for\n\t// the RPC (restricted to an allowable set of codes as defined by gRFC\n\t// A54). uri is the URI of the entry point for the request.  When supported\n\t// by the underlying implementation, ctx can be used for timeout and\n\t// cancellation. Additionally, RequestInfo data will be available via ctx\n\t// to this call.\n\tGetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)\n\t// RequireTransportSecurity indicates whether the credentials requires\n\t// transport security.\n\tRequireTransportSecurity() bool\n}\n\n// SecurityLevel defines the protection level on an established connection.\n//\n// This API is experimental.\ntype SecurityLevel int\n\nconst (\n\t// InvalidSecurityLevel indicates an invalid security level.\n\t// The zero SecurityLevel value is invalid for backward compatibility.\n\tInvalidSecurityLevel SecurityLevel = iota\n\t// NoSecurity indicates a connection is insecure.\n\tNoSecurity\n\t// IntegrityOnly indicates a connection only provides integrity protection.\n\tIntegrityOnly\n\t// PrivacyAndIntegrity indicates a connection provides both privacy and integrity protection.\n\tPrivacyAndIntegrity\n)\n\n// String returns SecurityLevel in a string format.\nfunc (s SecurityLevel) String() string {\n\tswitch s {\n\tcase NoSecurity:\n\t\treturn \"NoSecurity\"\n\tcase IntegrityOnly:\n\t\treturn \"IntegrityOnly\"\n\tcase PrivacyAndIntegrity:\n\t\treturn \"PrivacyAndIntegrity\"\n\t}\n\treturn fmt.Sprintf(\"invalid SecurityLevel: %v\", int(s))\n}\n\n// CommonAuthInfo contains authenticated information common to AuthInfo implementations.\n// It should be embedded in a struct implementing AuthInfo to provide additional information\n// about the credentials.\n//\n// This API is experimental.\ntype CommonAuthInfo struct {\n\tSecurityLevel SecurityLevel\n}\n\n// GetCommonAuthInfo returns the pointer to CommonAuthInfo struct.\nfunc (c CommonAuthInfo) GetCommonAuthInfo() CommonAuthInfo {\n\treturn c\n}\n\n// ProtocolInfo provides static information regarding transport credentials.\ntype ProtocolInfo struct {\n\t// ProtocolVersion is the gRPC wire protocol version.\n\t//\n\t// Deprecated: this is unused by gRPC.\n\tProtocolVersion string\n\t// SecurityProtocol is the security protocol in use.\n\tSecurityProtocol string\n\t// SecurityVersion is the security protocol version.  It is a static version string from the\n\t// credentials, not a value that reflects per-connection protocol negotiation.  To retrieve\n\t// details about the credentials used for a connection, use the Peer's AuthInfo field instead.\n\t//\n\t// Deprecated: please use Peer.AuthInfo.\n\tSecurityVersion string\n\t// ServerName is the user-configured server name.  If set, this overrides\n\t// the default :authority header used for all RPCs on the channel using the\n\t// containing credentials, unless grpc.WithAuthority is set on the channel,\n\t// in which case that setting will take precedence.\n\t//\n\t// This must be a valid `:authority` header according to\n\t// [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2).\n\t//\n\t// Deprecated: Users should use grpc.WithAuthority to override the authority\n\t// on a channel instead of configuring the credentials.\n\tServerName string\n}\n\n// AuthInfo defines the common interface for the auth information the users are interested in.\n// A struct that implements AuthInfo should embed CommonAuthInfo by including additional\n// information about the credentials in it.\ntype AuthInfo interface {\n\tAuthType() string\n}\n\n// AuthorityValidator validates the authority used to override the `:authority`\n// header. This is an optional interface that implementations of AuthInfo can\n// implement if they support per-RPC authority overrides. It is invoked when the\n// application attempts to override the HTTP/2 `:authority` header using the\n// CallAuthority call option.\ntype AuthorityValidator interface {\n\t// ValidateAuthority checks the authority value used to override the\n\t// `:authority` header. The authority parameter is the override value\n\t// provided by the application via the CallAuthority option. This value\n\t// typically corresponds to the server hostname or endpoint the RPC is\n\t// targeting. It returns non-nil error if the validation fails.\n\tValidateAuthority(authority string) error\n}\n\n// ErrConnDispatched indicates that rawConn has been dispatched out of gRPC\n// and the caller should not close rawConn.\nvar ErrConnDispatched = errors.New(\"credentials: rawConn is dispatched out of gRPC\")\n\n// TransportCredentials defines the common interface for all the live gRPC wire\n// protocols and supported transport security protocols (e.g., TLS, SSL).\ntype TransportCredentials interface {\n\t// ClientHandshake does the authentication handshake specified by the\n\t// corresponding authentication protocol on rawConn for clients. It returns\n\t// the authenticated connection and the corresponding auth information\n\t// about the connection.  The auth information should embed CommonAuthInfo\n\t// to return additional information about the credentials. Implementations\n\t// must use the provided context to implement timely cancellation.  gRPC\n\t// will try to reconnect if the error returned is a temporary error\n\t// (io.EOF, context.DeadlineExceeded or err.Temporary() == true).  If the\n\t// returned error is a wrapper error, implementations should make sure that\n\t// the error implements Temporary() to have the correct retry behaviors.\n\t// Additionally, ClientHandshakeInfo data will be available via the context\n\t// passed to this call.\n\t//\n\t// The second argument to this method is the `:authority` header value used\n\t// while creating new streams on this connection after authentication\n\t// succeeds. Implementations must use this as the server name during the\n\t// authentication handshake.\n\t//\n\t// If the returned net.Conn is closed, it MUST close the net.Conn provided.\n\tClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error)\n\t// ServerHandshake does the authentication handshake for servers. It returns\n\t// the authenticated connection and the corresponding auth information about\n\t// the connection. The auth information should embed CommonAuthInfo to return additional information\n\t// about the credentials.\n\t//\n\t// If the returned net.Conn is closed, it MUST close the net.Conn provided.\n\tServerHandshake(net.Conn) (net.Conn, AuthInfo, error)\n\t// Info provides the ProtocolInfo of this TransportCredentials.\n\tInfo() ProtocolInfo\n\t// Clone makes a copy of this TransportCredentials.\n\tClone() TransportCredentials\n\t// OverrideServerName specifies the value used for the following:\n\t//\n\t// - verifying the hostname on the returned certificates\n\t// - as SNI in the client's handshake to support virtual hosting\n\t// - as the value for `:authority` header at stream creation time\n\t//\n\t// The provided string should be a valid `:authority` header according to\n\t// [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2).\n\t//\n\t// Deprecated: this method is unused by gRPC.  Users should use\n\t// grpc.WithAuthority to override the authority on a channel instead of\n\t// configuring the credentials.\n\tOverrideServerName(string) error\n}\n\n// Bundle is a combination of TransportCredentials and PerRPCCredentials.\n//\n// It also contains a mode switching method, so it can be used as a combination\n// of different credential policies.\n//\n// Bundle cannot be used together with individual TransportCredentials.\n// PerRPCCredentials from Bundle will be appended to other PerRPCCredentials.\n//\n// This API is experimental.\ntype Bundle interface {\n\t// TransportCredentials returns the transport credentials from the Bundle.\n\t//\n\t// Implementations must return non-nil transport credentials. If transport\n\t// security is not needed by the Bundle, implementations may choose to\n\t// return insecure.NewCredentials().\n\tTransportCredentials() TransportCredentials\n\n\t// PerRPCCredentials returns the per-RPC credentials from the Bundle.\n\t//\n\t// May be nil if per-RPC credentials are not needed.\n\tPerRPCCredentials() PerRPCCredentials\n\n\t// NewWithMode should make a copy of Bundle, and switch mode. Modifying the\n\t// existing Bundle may cause races.\n\t//\n\t// NewWithMode returns nil if the requested mode is not supported.\n\tNewWithMode(mode string) (Bundle, error)\n}\n\n// RequestInfo contains request data attached to the context passed to GetRequestMetadata calls.\n//\n// This API is experimental.\ntype RequestInfo struct {\n\t// The method passed to Invoke or NewStream for this RPC. (For proto methods, this has the format \"/some.Service/Method\")\n\tMethod string\n\t// AuthInfo contains the information from a security handshake (TransportCredentials.ClientHandshake, TransportCredentials.ServerHandshake)\n\tAuthInfo AuthInfo\n}\n\n// requestInfoKey is a struct to be used as the key to store RequestInfo in a\n// context.\ntype requestInfoKey struct{}\n\n// RequestInfoFromContext extracts the RequestInfo from the context if it exists.\n//\n// This API is experimental.\nfunc RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) {\n\tri, ok = ctx.Value(requestInfoKey{}).(RequestInfo)\n\treturn ri, ok\n}\n\n// NewContextWithRequestInfo creates a new context from ctx and attaches ri to it.\n//\n// This RequestInfo will be accessible via RequestInfoFromContext.\n//\n// Intended to be used from tests for PerRPCCredentials implementations (that\n// often need to check connection's SecurityLevel). Should not be used from\n// non-test code: the gRPC client already prepares a context with the correct\n// RequestInfo attached when calling PerRPCCredentials.GetRequestMetadata.\n//\n// This API is experimental.\nfunc NewContextWithRequestInfo(ctx context.Context, ri RequestInfo) context.Context {\n\treturn context.WithValue(ctx, requestInfoKey{}, ri)\n}\n\n// ClientHandshakeInfo holds data to be passed to ClientHandshake. This makes\n// it possible to pass arbitrary data to the handshaker from gRPC, resolver,\n// balancer etc. Individual credential implementations control the actual\n// format of the data that they are willing to receive.\n//\n// This API is experimental.\ntype ClientHandshakeInfo struct {\n\t// Attributes contains the attributes for the address. It could be provided\n\t// by the gRPC, resolver, balancer etc.\n\tAttributes *attributes.Attributes\n}\n\n// ClientHandshakeInfoFromContext returns the ClientHandshakeInfo struct stored\n// in ctx.\n//\n// This API is experimental.\nfunc ClientHandshakeInfoFromContext(ctx context.Context) ClientHandshakeInfo {\n\tchi, _ := icredentials.ClientHandshakeInfoFromContext(ctx).(ClientHandshakeInfo)\n\treturn chi\n}\n\n// CheckSecurityLevel checks if a connection's security level is greater than or equal to the specified one.\n// It returns success if 1) the condition is satisfied or 2) AuthInfo struct does not implement GetCommonAuthInfo() method\n// or 3) CommonAuthInfo.SecurityLevel has an invalid zero value. For 2) and 3), it is for the purpose of backward-compatibility.\n//\n// This API is experimental.\nfunc CheckSecurityLevel(ai AuthInfo, level SecurityLevel) error {\n\ttype internalInfo interface {\n\t\tGetCommonAuthInfo() CommonAuthInfo\n\t}\n\tif ai == nil {\n\t\treturn errors.New(\"AuthInfo is nil\")\n\t}\n\tif ci, ok := ai.(internalInfo); ok {\n\t\t// CommonAuthInfo.SecurityLevel has an invalid value.\n\t\tif ci.GetCommonAuthInfo().SecurityLevel == InvalidSecurityLevel {\n\t\t\treturn nil\n\t\t}\n\t\tif ci.GetCommonAuthInfo().SecurityLevel < level {\n\t\t\treturn fmt.Errorf(\"requires SecurityLevel %v; connection has %v\", level, ci.GetCommonAuthInfo().SecurityLevel)\n\t\t}\n\t}\n\t// The condition is satisfied or AuthInfo struct does not implement GetCommonAuthInfo() method.\n\treturn nil\n}\n\n// ChannelzSecurityInfo defines the interface that security protocols should implement\n// in order to provide security info to channelz.\n//\n// This API is experimental.\ntype ChannelzSecurityInfo interface {\n\tGetSecurityValue() ChannelzSecurityValue\n}\n\n// ChannelzSecurityValue defines the interface that GetSecurityValue() return value\n// should satisfy. This interface should only be satisfied by *TLSChannelzSecurityValue\n// and *OtherChannelzSecurityValue.\n//\n// This API is experimental.\ntype ChannelzSecurityValue interface {\n\tisChannelzSecurityValue()\n}\n\n// OtherChannelzSecurityValue defines the struct that non-TLS protocol should return\n// from GetSecurityValue(), which contains protocol specific security info. Note\n// the Value field will be sent to users of channelz requesting channel info, and\n// thus sensitive info should better be avoided.\n//\n// This API is experimental.\ntype OtherChannelzSecurityValue struct {\n\tChannelzSecurityValue\n\tName  string\n\tValue proto.Message\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/credentials/insecure/insecure.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package insecure provides an implementation of the\n// credentials.TransportCredentials interface which disables transport security.\npackage insecure\n\nimport (\n\t\"context\"\n\t\"net\"\n\n\t\"google.golang.org/grpc/credentials\"\n)\n\n// NewCredentials returns a credentials which disables transport security.\n//\n// Note that using this credentials with per-RPC credentials which require\n// transport security is incompatible and will cause RPCs to fail.\nfunc NewCredentials() credentials.TransportCredentials {\n\treturn insecureTC{}\n}\n\n// insecureTC implements the insecure transport credentials. The handshake\n// methods simply return the passed in net.Conn and set the security level to\n// NoSecurity.\ntype insecureTC struct{}\n\nfunc (insecureTC) ClientHandshake(_ context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error) {\n\treturn conn, info{credentials.CommonAuthInfo{SecurityLevel: credentials.NoSecurity}}, nil\n}\n\nfunc (insecureTC) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error) {\n\treturn conn, info{credentials.CommonAuthInfo{SecurityLevel: credentials.NoSecurity}}, nil\n}\n\nfunc (insecureTC) Info() credentials.ProtocolInfo {\n\treturn credentials.ProtocolInfo{SecurityProtocol: \"insecure\"}\n}\n\nfunc (insecureTC) Clone() credentials.TransportCredentials {\n\treturn insecureTC{}\n}\n\nfunc (insecureTC) OverrideServerName(string) error {\n\treturn nil\n}\n\n// info contains the auth information for an insecure connection.\n// It implements the AuthInfo interface.\ntype info struct {\n\tcredentials.CommonAuthInfo\n}\n\n// AuthType returns the type of info as a string.\nfunc (info) AuthType() string {\n\treturn \"insecure\"\n}\n\n// ValidateAuthority allows any value to be overridden for the :authority\n// header.\nfunc (info) ValidateAuthority(string) error {\n\treturn nil\n}\n\n// insecureBundle implements an insecure bundle.\n// An insecure bundle provides a thin wrapper around insecureTC to support\n// the credentials.Bundle interface.\ntype insecureBundle struct{}\n\n// NewBundle returns a bundle with disabled transport security and no per rpc credential.\nfunc NewBundle() credentials.Bundle {\n\treturn insecureBundle{}\n}\n\n// NewWithMode returns a new insecure Bundle. The mode is ignored.\nfunc (insecureBundle) NewWithMode(string) (credentials.Bundle, error) {\n\treturn insecureBundle{}, nil\n}\n\n// PerRPCCredentials returns an nil implementation as insecure\n// bundle does not support a per rpc credential.\nfunc (insecureBundle) PerRPCCredentials() credentials.PerRPCCredentials {\n\treturn nil\n}\n\n// TransportCredentials returns the underlying insecure transport credential.\nfunc (insecureBundle) TransportCredentials() credentials.TransportCredentials {\n\treturn NewCredentials()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/credentials/tls.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage credentials\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/url\"\n\t\"os\"\n\n\t\"google.golang.org/grpc/grpclog\"\n\tcredinternal \"google.golang.org/grpc/internal/credentials\"\n\t\"google.golang.org/grpc/internal/envconfig\"\n)\n\nconst alpnFailureHelpMessage = \"If you upgraded from a grpc-go version earlier than 1.67, your TLS connections may have stopped working due to ALPN enforcement. For more details, see: https://github.com/grpc/grpc-go/issues/434\"\n\nvar logger = grpclog.Component(\"credentials\")\n\n// TLSInfo contains the auth information for a TLS authenticated connection.\n// It implements the AuthInfo interface.\ntype TLSInfo struct {\n\tState tls.ConnectionState\n\tCommonAuthInfo\n\t// This API is experimental.\n\tSPIFFEID *url.URL\n}\n\n// AuthType returns the type of TLSInfo as a string.\nfunc (t TLSInfo) AuthType() string {\n\treturn \"tls\"\n}\n\n// ValidateAuthority validates the provided authority being used to override the\n// :authority header by verifying it against the peer certificates. It returns a\n// non-nil error if the validation fails.\nfunc (t TLSInfo) ValidateAuthority(authority string) error {\n\tvar errs []error\n\tfor _, cert := range t.State.PeerCertificates {\n\t\tvar err error\n\t\tif err = cert.VerifyHostname(authority); err == nil {\n\t\t\treturn nil\n\t\t}\n\t\terrs = append(errs, err)\n\t}\n\treturn fmt.Errorf(\"credentials: invalid authority %q: %v\", authority, errors.Join(errs...))\n}\n\n// cipherSuiteLookup returns the string version of a TLS cipher suite ID.\nfunc cipherSuiteLookup(cipherSuiteID uint16) string {\n\tfor _, s := range tls.CipherSuites() {\n\t\tif s.ID == cipherSuiteID {\n\t\t\treturn s.Name\n\t\t}\n\t}\n\tfor _, s := range tls.InsecureCipherSuites() {\n\t\tif s.ID == cipherSuiteID {\n\t\t\treturn s.Name\n\t\t}\n\t}\n\treturn fmt.Sprintf(\"unknown ID: %v\", cipherSuiteID)\n}\n\n// GetSecurityValue returns security info requested by channelz.\nfunc (t TLSInfo) GetSecurityValue() ChannelzSecurityValue {\n\tv := &TLSChannelzSecurityValue{\n\t\tStandardName: cipherSuiteLookup(t.State.CipherSuite),\n\t}\n\t// Currently there's no way to get LocalCertificate info from tls package.\n\tif len(t.State.PeerCertificates) > 0 {\n\t\tv.RemoteCertificate = t.State.PeerCertificates[0].Raw\n\t}\n\treturn v\n}\n\n// tlsCreds is the credentials required for authenticating a connection using TLS.\ntype tlsCreds struct {\n\t// TLS configuration\n\tconfig *tls.Config\n}\n\nfunc (c tlsCreds) Info() ProtocolInfo {\n\treturn ProtocolInfo{\n\t\tSecurityProtocol: \"tls\",\n\t\tSecurityVersion:  \"1.2\",\n\t\tServerName:       c.config.ServerName,\n\t}\n}\n\nfunc (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) {\n\t// use local cfg to avoid clobbering ServerName if using multiple endpoints\n\tcfg := credinternal.CloneTLSConfig(c.config)\n\n\tserverName, _, err := net.SplitHostPort(authority)\n\tif err != nil {\n\t\t// If the authority had no host port or if the authority cannot be parsed, use it as-is.\n\t\tserverName = authority\n\t}\n\tcfg.ServerName = serverName\n\n\tconn := tls.Client(rawConn, cfg)\n\terrChannel := make(chan error, 1)\n\tgo func() {\n\t\terrChannel <- conn.Handshake()\n\t\tclose(errChannel)\n\t}()\n\tselect {\n\tcase err := <-errChannel:\n\t\tif err != nil {\n\t\t\tconn.Close()\n\t\t\treturn nil, nil, err\n\t\t}\n\tcase <-ctx.Done():\n\t\tconn.Close()\n\t\treturn nil, nil, ctx.Err()\n\t}\n\n\t// The negotiated protocol can be either of the following:\n\t// 1. h2: When the server supports ALPN. Only HTTP/2 can be negotiated since\n\t//    it is the only protocol advertised by the client during the handshake.\n\t//    The tls library ensures that the server chooses a protocol advertised\n\t//    by the client.\n\t// 2. \"\" (empty string): If the server doesn't support ALPN. ALPN is a requirement\n\t//    for using HTTP/2 over TLS. We can terminate the connection immediately.\n\tnp := conn.ConnectionState().NegotiatedProtocol\n\tif np == \"\" {\n\t\tif envconfig.EnforceALPNEnabled {\n\t\t\tconn.Close()\n\t\t\treturn nil, nil, fmt.Errorf(\"credentials: cannot check peer: missing selected ALPN property. %s\", alpnFailureHelpMessage)\n\t\t}\n\t\tlogger.Warningf(\"Allowing TLS connection to server %q with ALPN disabled. TLS connections to servers with ALPN disabled will be disallowed in future grpc-go releases\", cfg.ServerName)\n\t}\n\ttlsInfo := TLSInfo{\n\t\tState: conn.ConnectionState(),\n\t\tCommonAuthInfo: CommonAuthInfo{\n\t\t\tSecurityLevel: PrivacyAndIntegrity,\n\t\t},\n\t}\n\tid := credinternal.SPIFFEIDFromState(conn.ConnectionState())\n\tif id != nil {\n\t\ttlsInfo.SPIFFEID = id\n\t}\n\treturn credinternal.WrapSyscallConn(rawConn, conn), tlsInfo, nil\n}\n\nfunc (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) {\n\tconn := tls.Server(rawConn, c.config)\n\tif err := conn.Handshake(); err != nil {\n\t\tconn.Close()\n\t\treturn nil, nil, err\n\t}\n\tcs := conn.ConnectionState()\n\t// The negotiated application protocol can be empty only if the client doesn't\n\t// support ALPN. In such cases, we can close the connection since ALPN is required\n\t// for using HTTP/2 over TLS.\n\tif cs.NegotiatedProtocol == \"\" {\n\t\tif envconfig.EnforceALPNEnabled {\n\t\t\tconn.Close()\n\t\t\treturn nil, nil, fmt.Errorf(\"credentials: cannot check peer: missing selected ALPN property. %s\", alpnFailureHelpMessage)\n\t\t} else if logger.V(2) {\n\t\t\tlogger.Info(\"Allowing TLS connection from client with ALPN disabled. TLS connections with ALPN disabled will be disallowed in future grpc-go releases\")\n\t\t}\n\t}\n\ttlsInfo := TLSInfo{\n\t\tState: cs,\n\t\tCommonAuthInfo: CommonAuthInfo{\n\t\t\tSecurityLevel: PrivacyAndIntegrity,\n\t\t},\n\t}\n\tid := credinternal.SPIFFEIDFromState(conn.ConnectionState())\n\tif id != nil {\n\t\ttlsInfo.SPIFFEID = id\n\t}\n\treturn credinternal.WrapSyscallConn(rawConn, conn), tlsInfo, nil\n}\n\nfunc (c *tlsCreds) Clone() TransportCredentials {\n\treturn NewTLS(c.config)\n}\n\nfunc (c *tlsCreds) OverrideServerName(serverNameOverride string) error {\n\tc.config.ServerName = serverNameOverride\n\treturn nil\n}\n\n// The following cipher suites are forbidden for use with HTTP/2 by\n// https://datatracker.ietf.org/doc/html/rfc7540#appendix-A\nvar tls12ForbiddenCipherSuites = map[uint16]struct{}{\n\ttls.TLS_RSA_WITH_AES_128_CBC_SHA:         {},\n\ttls.TLS_RSA_WITH_AES_256_CBC_SHA:         {},\n\ttls.TLS_RSA_WITH_AES_128_GCM_SHA256:      {},\n\ttls.TLS_RSA_WITH_AES_256_GCM_SHA384:      {},\n\ttls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: {},\n\ttls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: {},\n\ttls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:   {},\n\ttls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:   {},\n}\n\n// NewTLS uses c to construct a TransportCredentials based on TLS.\nfunc NewTLS(c *tls.Config) TransportCredentials {\n\tconfig := applyDefaults(c)\n\tif config.GetConfigForClient != nil {\n\t\toldFn := config.GetConfigForClient\n\t\tconfig.GetConfigForClient = func(hello *tls.ClientHelloInfo) (*tls.Config, error) {\n\t\t\tcfgForClient, err := oldFn(hello)\n\t\t\tif err != nil || cfgForClient == nil {\n\t\t\t\treturn cfgForClient, err\n\t\t\t}\n\t\t\treturn applyDefaults(cfgForClient), nil\n\t\t}\n\t}\n\treturn &tlsCreds{config: config}\n}\n\nfunc applyDefaults(c *tls.Config) *tls.Config {\n\tconfig := credinternal.CloneTLSConfig(c)\n\tconfig.NextProtos = credinternal.AppendH2ToNextProtos(config.NextProtos)\n\t// If the user did not configure a MinVersion and did not configure a\n\t// MaxVersion < 1.2, use MinVersion=1.2, which is required by\n\t// https://datatracker.ietf.org/doc/html/rfc7540#section-9.2\n\tif config.MinVersion == 0 && (config.MaxVersion == 0 || config.MaxVersion >= tls.VersionTLS12) {\n\t\tconfig.MinVersion = tls.VersionTLS12\n\t}\n\t// If the user did not configure CipherSuites, use all \"secure\" cipher\n\t// suites reported by the TLS package, but remove some explicitly forbidden\n\t// by https://datatracker.ietf.org/doc/html/rfc7540#appendix-A\n\tif config.CipherSuites == nil {\n\t\tfor _, cs := range tls.CipherSuites() {\n\t\t\tif _, ok := tls12ForbiddenCipherSuites[cs.ID]; !ok {\n\t\t\t\tconfig.CipherSuites = append(config.CipherSuites, cs.ID)\n\t\t\t}\n\t\t}\n\t}\n\treturn config\n}\n\n// NewClientTLSFromCert constructs TLS credentials from the provided root\n// certificate authority certificate(s) to validate server connections. If\n// certificates to establish the identity of the client need to be included in\n// the credentials (eg: for mTLS), use NewTLS instead, where a complete\n// tls.Config can be specified.\n//\n// serverNameOverride is for testing only. If set to a non empty string, it will\n// override the virtual host name of authority (e.g. :authority header field) in\n// requests.  Users should use grpc.WithAuthority passed to grpc.NewClient to\n// override the authority of the client instead.\nfunc NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials {\n\treturn NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp})\n}\n\n// NewClientTLSFromFile constructs TLS credentials from the provided root\n// certificate authority certificate file(s) to validate server connections. If\n// certificates to establish the identity of the client need to be included in\n// the credentials (eg: for mTLS), use NewTLS instead, where a complete\n// tls.Config can be specified.\n//\n// serverNameOverride is for testing only. If set to a non empty string, it will\n// override the virtual host name of authority (e.g. :authority header field) in\n// requests.  Users should use grpc.WithAuthority passed to grpc.NewClient to\n// override the authority of the client instead.\nfunc NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) {\n\tb, err := os.ReadFile(certFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcp := x509.NewCertPool()\n\tif !cp.AppendCertsFromPEM(b) {\n\t\treturn nil, fmt.Errorf(\"credentials: failed to append certificates\")\n\t}\n\treturn NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil\n}\n\n// NewServerTLSFromCert constructs TLS credentials from the input certificate for server.\nfunc NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials {\n\treturn NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}})\n}\n\n// NewServerTLSFromFile constructs TLS credentials from the input certificate file and key\n// file for server.\nfunc NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) {\n\tcert, err := tls.LoadX509KeyPair(certFile, keyFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil\n}\n\n// TLSChannelzSecurityValue defines the struct that TLS protocol should return\n// from GetSecurityValue(), containing security info like cipher and certificate used.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype TLSChannelzSecurityValue struct {\n\tChannelzSecurityValue\n\tStandardName      string\n\tLocalCertificate  []byte\n\tRemoteCertificate []byte\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/dialoptions.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/backoff\"\n\t\"google.golang.org/grpc/channelz\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\t\"google.golang.org/grpc/internal\"\n\tinternalbackoff \"google.golang.org/grpc/internal/backoff\"\n\t\"google.golang.org/grpc/internal/binarylog\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/stats\"\n)\n\nconst (\n\t// https://github.com/grpc/proposal/blob/master/A6-client-retries.md#limits-on-retries-and-hedges\n\tdefaultMaxCallAttempts = 5\n)\n\nfunc init() {\n\tinternal.AddGlobalDialOptions = func(opt ...DialOption) {\n\t\tglobalDialOptions = append(globalDialOptions, opt...)\n\t}\n\tinternal.ClearGlobalDialOptions = func() {\n\t\tglobalDialOptions = nil\n\t}\n\tinternal.AddGlobalPerTargetDialOptions = func(opt any) {\n\t\tif ptdo, ok := opt.(perTargetDialOption); ok {\n\t\t\tglobalPerTargetDialOptions = append(globalPerTargetDialOptions, ptdo)\n\t\t}\n\t}\n\tinternal.ClearGlobalPerTargetDialOptions = func() {\n\t\tglobalPerTargetDialOptions = nil\n\t}\n\tinternal.WithBinaryLogger = withBinaryLogger\n\tinternal.JoinDialOptions = newJoinDialOption\n\tinternal.DisableGlobalDialOptions = newDisableGlobalDialOptions\n\tinternal.WithBufferPool = withBufferPool\n}\n\n// dialOptions configure a Dial call. dialOptions are set by the DialOption\n// values passed to Dial.\ntype dialOptions struct {\n\tunaryInt  UnaryClientInterceptor\n\tstreamInt StreamClientInterceptor\n\n\tchainUnaryInts  []UnaryClientInterceptor\n\tchainStreamInts []StreamClientInterceptor\n\n\tcompressorV0                Compressor\n\tdc                          Decompressor\n\tbs                          internalbackoff.Strategy\n\tblock                       bool\n\treturnLastError             bool\n\ttimeout                     time.Duration\n\tauthority                   string\n\tbinaryLogger                binarylog.Logger\n\tcopts                       transport.ConnectOptions\n\tcallOptions                 []CallOption\n\tchannelzParent              channelz.Identifier\n\tdisableServiceConfig        bool\n\tdisableRetry                bool\n\tdisableHealthCheck          bool\n\tminConnectTimeout           func() time.Duration\n\tdefaultServiceConfig        *ServiceConfig // defaultServiceConfig is parsed from defaultServiceConfigRawJSON.\n\tdefaultServiceConfigRawJSON *string\n\tresolvers                   []resolver.Builder\n\tidleTimeout                 time.Duration\n\tdefaultScheme               string\n\tmaxCallAttempts             int\n\tenableLocalDNSResolution    bool // Specifies if target hostnames should be resolved when proxying is enabled.\n\tuseProxy                    bool // Specifies if a server should be connected via proxy.\n}\n\n// DialOption configures how we set up the connection.\ntype DialOption interface {\n\tapply(*dialOptions)\n}\n\nvar globalDialOptions []DialOption\n\n// perTargetDialOption takes a parsed target and returns a dial option to apply.\n//\n// This gets called after NewClient() parses the target, and allows per target\n// configuration set through a returned DialOption. The DialOption will not take\n// effect if specifies a resolver builder, as that Dial Option is factored in\n// while parsing target.\ntype perTargetDialOption interface {\n\t// DialOption returns a Dial Option to apply.\n\tDialOptionForTarget(parsedTarget url.URL) DialOption\n}\n\nvar globalPerTargetDialOptions []perTargetDialOption\n\n// EmptyDialOption does not alter the dial configuration. It can be embedded in\n// another structure to build custom dial options.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype EmptyDialOption struct{}\n\nfunc (EmptyDialOption) apply(*dialOptions) {}\n\ntype disableGlobalDialOptions struct{}\n\nfunc (disableGlobalDialOptions) apply(*dialOptions) {}\n\n// newDisableGlobalDialOptions returns a DialOption that prevents the ClientConn\n// from applying the global DialOptions (set via AddGlobalDialOptions).\nfunc newDisableGlobalDialOptions() DialOption {\n\treturn &disableGlobalDialOptions{}\n}\n\n// funcDialOption wraps a function that modifies dialOptions into an\n// implementation of the DialOption interface.\ntype funcDialOption struct {\n\tf func(*dialOptions)\n}\n\nfunc (fdo *funcDialOption) apply(do *dialOptions) {\n\tfdo.f(do)\n}\n\nfunc newFuncDialOption(f func(*dialOptions)) *funcDialOption {\n\treturn &funcDialOption{\n\t\tf: f,\n\t}\n}\n\ntype joinDialOption struct {\n\topts []DialOption\n}\n\nfunc (jdo *joinDialOption) apply(do *dialOptions) {\n\tfor _, opt := range jdo.opts {\n\t\topt.apply(do)\n\t}\n}\n\nfunc newJoinDialOption(opts ...DialOption) DialOption {\n\treturn &joinDialOption{opts: opts}\n}\n\n// WithSharedWriteBuffer allows reusing per-connection transport write buffer.\n// If this option is set to true every connection will release the buffer after\n// flushing the data on the wire.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithSharedWriteBuffer(val bool) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.SharedWriteBuffer = val\n\t})\n}\n\n// WithWriteBufferSize determines how much data can be batched before doing a\n// write on the wire. The default value for this buffer is 32KB.\n//\n// Zero or negative values will disable the write buffer such that each write\n// will be on underlying connection. Note: A Send call may not directly\n// translate to a write.\nfunc WithWriteBufferSize(s int) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.WriteBufferSize = s\n\t})\n}\n\n// WithReadBufferSize lets you set the size of read buffer, this determines how\n// much data can be read at most for each read syscall.\n//\n// The default value for this buffer is 32KB. Zero or negative values will\n// disable read buffer for a connection so data framer can access the\n// underlying conn directly.\nfunc WithReadBufferSize(s int) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.ReadBufferSize = s\n\t})\n}\n\n// WithInitialWindowSize returns a DialOption which sets the value for initial\n// window size on a stream. The lower bound for window size is 64K and any value\n// smaller than that will be ignored.\nfunc WithInitialWindowSize(s int32) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.InitialWindowSize = s\n\t\to.copts.StaticWindowSize = true\n\t})\n}\n\n// WithInitialConnWindowSize returns a DialOption which sets the value for\n// initial window size on a connection. The lower bound for window size is 64K\n// and any value smaller than that will be ignored.\nfunc WithInitialConnWindowSize(s int32) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.InitialConnWindowSize = s\n\t\to.copts.StaticWindowSize = true\n\t})\n}\n\n// WithStaticStreamWindowSize returns a DialOption which sets the initial\n// stream window size to the value provided and disables dynamic flow control.\nfunc WithStaticStreamWindowSize(s int32) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.InitialWindowSize = s\n\t\to.copts.StaticWindowSize = true\n\t})\n}\n\n// WithStaticConnWindowSize returns a DialOption which sets the initial\n// connection window size to the value provided and disables dynamic flow\n// control.\nfunc WithStaticConnWindowSize(s int32) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.InitialConnWindowSize = s\n\t\to.copts.StaticWindowSize = true\n\t})\n}\n\n// WithMaxMsgSize returns a DialOption which sets the maximum message size the\n// client can receive.\n//\n// Deprecated: use WithDefaultCallOptions(MaxCallRecvMsgSize(s)) instead.  Will\n// be supported throughout 1.x.\nfunc WithMaxMsgSize(s int) DialOption {\n\treturn WithDefaultCallOptions(MaxCallRecvMsgSize(s))\n}\n\n// WithDefaultCallOptions returns a DialOption which sets the default\n// CallOptions for calls over the connection.\nfunc WithDefaultCallOptions(cos ...CallOption) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.callOptions = append(o.callOptions, cos...)\n\t})\n}\n\n// WithCodec returns a DialOption which sets a codec for message marshaling and\n// unmarshaling.\n//\n// Deprecated: use WithDefaultCallOptions(ForceCodec(_)) instead.  Will be\n// supported throughout 1.x.\nfunc WithCodec(c Codec) DialOption {\n\treturn WithDefaultCallOptions(CallCustomCodec(c))\n}\n\n// WithCompressor returns a DialOption which sets a Compressor to use for\n// message compression. It has lower priority than the compressor set by the\n// UseCompressor CallOption.\n//\n// Deprecated: use UseCompressor instead.  Will be supported throughout 1.x.\nfunc WithCompressor(cp Compressor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.compressorV0 = cp\n\t})\n}\n\n// WithDecompressor returns a DialOption which sets a Decompressor to use for\n// incoming message decompression.  If incoming response messages are encoded\n// using the decompressor's Type(), it will be used.  Otherwise, the message\n// encoding will be used to look up the compressor registered via\n// encoding.RegisterCompressor, which will then be used to decompress the\n// message.  If no compressor is registered for the encoding, an Unimplemented\n// status error will be returned.\n//\n// Deprecated: use encoding.RegisterCompressor instead.  Will be supported\n// throughout 1.x.\nfunc WithDecompressor(dc Decompressor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.dc = dc\n\t})\n}\n\n// WithConnectParams configures the ClientConn to use the provided ConnectParams\n// for creating and maintaining connections to servers.\n//\n// The backoff configuration specified as part of the ConnectParams overrides\n// all defaults specified in\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. Consider\n// using the backoff.DefaultConfig as a base, in cases where you want to\n// override only a subset of the backoff configuration.\nfunc WithConnectParams(p ConnectParams) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.bs = internalbackoff.Exponential{Config: p.Backoff}\n\t\to.minConnectTimeout = func() time.Duration {\n\t\t\treturn p.MinConnectTimeout\n\t\t}\n\t})\n}\n\n// WithBackoffMaxDelay configures the dialer to use the provided maximum delay\n// when backing off after failed connection attempts.\n//\n// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x.\nfunc WithBackoffMaxDelay(md time.Duration) DialOption {\n\treturn WithBackoffConfig(BackoffConfig{MaxDelay: md})\n}\n\n// WithBackoffConfig configures the dialer to use the provided backoff\n// parameters after connection failures.\n//\n// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x.\nfunc WithBackoffConfig(b BackoffConfig) DialOption {\n\tbc := backoff.DefaultConfig\n\tbc.MaxDelay = b.MaxDelay\n\treturn withBackoff(internalbackoff.Exponential{Config: bc})\n}\n\n// withBackoff sets the backoff strategy used for connectRetryNum after a failed\n// connection attempt.\n//\n// This can be exported if arbitrary backoff strategies are allowed by gRPC.\nfunc withBackoff(bs internalbackoff.Strategy) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.bs = bs\n\t})\n}\n\n// WithBlock returns a DialOption which makes callers of Dial block until the\n// underlying connection is up. Without this, Dial returns immediately and\n// connecting the server happens in background.\n//\n// Use of this feature is not recommended.  For more information, please see:\n// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md\n//\n// Deprecated: this DialOption is not supported by NewClient.\n// Will be supported throughout 1.x.\nfunc WithBlock() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.block = true\n\t})\n}\n\n// WithReturnConnectionError returns a DialOption which makes the client connection\n// return a string containing both the last connection error that occurred and\n// the context.DeadlineExceeded error.\n// Implies WithBlock()\n//\n// Use of this feature is not recommended.  For more information, please see:\n// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md\n//\n// Deprecated: this DialOption is not supported by NewClient.\n// Will be supported throughout 1.x.\nfunc WithReturnConnectionError() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.block = true\n\t\to.returnLastError = true\n\t})\n}\n\n// WithInsecure returns a DialOption which disables transport security for this\n// ClientConn. Under the hood, it uses insecure.NewCredentials().\n//\n// Note that using this DialOption with per-RPC credentials (through\n// WithCredentialsBundle or WithPerRPCCredentials) which require transport\n// security is incompatible and will cause RPCs to fail.\n//\n// Deprecated: use WithTransportCredentials and insecure.NewCredentials()\n// instead. Will be supported throughout 1.x.\nfunc WithInsecure() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.TransportCredentials = insecure.NewCredentials()\n\t})\n}\n\n// WithNoProxy returns a DialOption which disables the use of proxies for this\n// ClientConn. This is ignored if WithDialer or WithContextDialer are used.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithNoProxy() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.useProxy = false\n\t})\n}\n\n// WithLocalDNSResolution forces local DNS name resolution even when a proxy is\n// specified in the environment.  By default, the server name is provided\n// directly to the proxy as part of the CONNECT handshake. This is ignored if\n// WithNoProxy is used.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithLocalDNSResolution() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.enableLocalDNSResolution = true\n\t})\n}\n\n// WithTransportCredentials returns a DialOption which configures a connection\n// level security credentials (e.g., TLS/SSL). This should not be used together\n// with WithCredentialsBundle.\nfunc WithTransportCredentials(creds credentials.TransportCredentials) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.TransportCredentials = creds\n\t})\n}\n\n// WithPerRPCCredentials returns a DialOption which sets credentials and places\n// auth state on each outbound RPC.\nfunc WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.PerRPCCredentials = append(o.copts.PerRPCCredentials, creds)\n\t})\n}\n\n// WithCredentialsBundle returns a DialOption to set a credentials bundle for\n// the ClientConn.WithCreds. This should not be used together with\n// WithTransportCredentials.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithCredentialsBundle(b credentials.Bundle) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.CredsBundle = b\n\t})\n}\n\n// WithTimeout returns a DialOption that configures a timeout for dialing a\n// ClientConn initially. This is valid if and only if WithBlock() is present.\n//\n// Deprecated: this DialOption is not supported by NewClient.\n// Will be supported throughout 1.x.\nfunc WithTimeout(d time.Duration) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.timeout = d\n\t})\n}\n\n// WithContextDialer returns a DialOption that sets a dialer to create\n// connections. If FailOnNonTempDialError() is set to true, and an error is\n// returned by f, gRPC checks the error's Temporary() method to decide if it\n// should try to reconnect to the network address.\n//\n// Note that gRPC by default performs name resolution on the target passed to\n// NewClient. To bypass name resolution and cause the target string to be\n// passed directly to the dialer here instead, use the \"passthrough\" resolver\n// by specifying it in the target string, e.g. \"passthrough:target\".\n//\n// Note: All supported releases of Go (as of December 2023) override the OS\n// defaults for TCP keepalive time and interval to 15s. To enable TCP keepalive\n// with OS defaults for keepalive time and interval, use a net.Dialer that sets\n// the KeepAlive field to a negative value, and sets the SO_KEEPALIVE socket\n// option to true from the Control field. For a concrete example of how to do\n// this, see internal.NetDialerWithTCPKeepalive().\n//\n// For more information, please see [issue 23459] in the Go GitHub repo.\n//\n// [issue 23459]: https://github.com/golang/go/issues/23459\nfunc WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.Dialer = f\n\t})\n}\n\n// WithDialer returns a DialOption that specifies a function to use for dialing\n// network addresses. If FailOnNonTempDialError() is set to true, and an error\n// is returned by f, gRPC checks the error's Temporary() method to decide if it\n// should try to reconnect to the network address.\n//\n// Deprecated: use WithContextDialer instead.  Will be supported throughout\n// 1.x.\nfunc WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {\n\treturn WithContextDialer(\n\t\tfunc(ctx context.Context, addr string) (net.Conn, error) {\n\t\t\tif deadline, ok := ctx.Deadline(); ok {\n\t\t\t\treturn f(addr, time.Until(deadline))\n\t\t\t}\n\t\t\treturn f(addr, 0)\n\t\t})\n}\n\n// WithStatsHandler returns a DialOption that specifies the stats handler for\n// all the RPCs and underlying network connections in this ClientConn.\nfunc WithStatsHandler(h stats.Handler) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\tif h == nil {\n\t\t\tlogger.Error(\"ignoring nil parameter in grpc.WithStatsHandler ClientOption\")\n\t\t\t// Do not allow a nil stats handler, which would otherwise cause\n\t\t\t// panics.\n\t\t\treturn\n\t\t}\n\t\to.copts.StatsHandlers = append(o.copts.StatsHandlers, h)\n\t})\n}\n\n// withBinaryLogger returns a DialOption that specifies the binary logger for\n// this ClientConn.\nfunc withBinaryLogger(bl binarylog.Logger) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.binaryLogger = bl\n\t})\n}\n\n// FailOnNonTempDialError returns a DialOption that specifies if gRPC fails on\n// non-temporary dial errors. If f is true, and dialer returns a non-temporary\n// error, gRPC will fail the connection to the network address and won't try to\n// reconnect. The default value of FailOnNonTempDialError is false.\n//\n// FailOnNonTempDialError only affects the initial dial, and does not do\n// anything useful unless you are also using WithBlock().\n//\n// Use of this feature is not recommended.  For more information, please see:\n// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md\n//\n// Deprecated: this DialOption is not supported by NewClient.\n// This API may be changed or removed in a\n// later release.\nfunc FailOnNonTempDialError(f bool) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.FailOnNonTempDialError = f\n\t})\n}\n\n// WithUserAgent returns a DialOption that specifies a user agent string for all\n// the RPCs.\nfunc WithUserAgent(s string) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.UserAgent = s + \" \" + grpcUA\n\t})\n}\n\n// WithKeepaliveParams returns a DialOption that specifies keepalive parameters\n// for the client transport.\n//\n// Keepalive is disabled by default.\nfunc WithKeepaliveParams(kp keepalive.ClientParameters) DialOption {\n\tif kp.Time < internal.KeepaliveMinPingTime {\n\t\tlogger.Warningf(\"Adjusting keepalive ping interval to minimum period of %v\", internal.KeepaliveMinPingTime)\n\t\tkp.Time = internal.KeepaliveMinPingTime\n\t}\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.KeepaliveParams = kp\n\t})\n}\n\n// WithUnaryInterceptor returns a DialOption that specifies the interceptor for\n// unary RPCs.\nfunc WithUnaryInterceptor(f UnaryClientInterceptor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.unaryInt = f\n\t})\n}\n\n// WithChainUnaryInterceptor returns a DialOption that specifies the chained\n// interceptor for unary RPCs. The first interceptor will be the outer most,\n// while the last interceptor will be the inner most wrapper around the real call.\n// All interceptors added by this method will be chained, and the interceptor\n// defined by WithUnaryInterceptor will always be prepended to the chain.\nfunc WithChainUnaryInterceptor(interceptors ...UnaryClientInterceptor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.chainUnaryInts = append(o.chainUnaryInts, interceptors...)\n\t})\n}\n\n// WithStreamInterceptor returns a DialOption that specifies the interceptor for\n// streaming RPCs.\nfunc WithStreamInterceptor(f StreamClientInterceptor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.streamInt = f\n\t})\n}\n\n// WithChainStreamInterceptor returns a DialOption that specifies the chained\n// interceptor for streaming RPCs. The first interceptor will be the outer most,\n// while the last interceptor will be the inner most wrapper around the real call.\n// All interceptors added by this method will be chained, and the interceptor\n// defined by WithStreamInterceptor will always be prepended to the chain.\nfunc WithChainStreamInterceptor(interceptors ...StreamClientInterceptor) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.chainStreamInts = append(o.chainStreamInts, interceptors...)\n\t})\n}\n\n// WithAuthority returns a DialOption that specifies the value to be used as the\n// :authority pseudo-header and as the server name in authentication handshake.\n// This overrides all other ways of setting authority on the channel, but can be\n// overridden per-call by using grpc.CallAuthority.\nfunc WithAuthority(a string) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.authority = a\n\t})\n}\n\n// WithChannelzParentID returns a DialOption that specifies the channelz ID of\n// current ClientConn's parent. This function is used in nested channel creation\n// (e.g. grpclb dial).\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithChannelzParentID(c channelz.Identifier) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.channelzParent = c\n\t})\n}\n\n// WithDisableServiceConfig returns a DialOption that causes gRPC to ignore any\n// service config provided by the resolver and provides a hint to the resolver\n// to not fetch service configs.\n//\n// Note that this dial option only disables service config from resolver. If\n// default service config is provided, gRPC will use the default service config.\nfunc WithDisableServiceConfig() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.disableServiceConfig = true\n\t})\n}\n\n// WithDefaultServiceConfig returns a DialOption that configures the default\n// service config, which will be used in cases where:\n//\n// 1. WithDisableServiceConfig is also used, or\n//\n// 2. The name resolver does not provide a service config or provides an\n// invalid service config.\n//\n// The parameter s is the JSON representation of the default service config.\n// For more information about service configs, see:\n// https://github.com/grpc/grpc/blob/master/doc/service_config.md\n// For a simple example of usage, see:\n// examples/features/load_balancing/client/main.go\nfunc WithDefaultServiceConfig(s string) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.defaultServiceConfigRawJSON = &s\n\t})\n}\n\n// WithDisableRetry returns a DialOption that disables retries, even if the\n// service config enables them.  This does not impact transparent retries, which\n// will happen automatically if no data is written to the wire or if the RPC is\n// unprocessed by the remote server.\nfunc WithDisableRetry() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.disableRetry = true\n\t})\n}\n\n// MaxHeaderListSizeDialOption is a DialOption that specifies the maximum\n// (uncompressed) size of header list that the client is prepared to accept.\ntype MaxHeaderListSizeDialOption struct {\n\tMaxHeaderListSize uint32\n}\n\nfunc (o MaxHeaderListSizeDialOption) apply(do *dialOptions) {\n\tdo.copts.MaxHeaderListSize = &o.MaxHeaderListSize\n}\n\n// WithMaxHeaderListSize returns a DialOption that specifies the maximum\n// (uncompressed) size of header list that the client is prepared to accept.\nfunc WithMaxHeaderListSize(s uint32) DialOption {\n\treturn MaxHeaderListSizeDialOption{\n\t\tMaxHeaderListSize: s,\n\t}\n}\n\n// WithDisableHealthCheck disables the LB channel health checking for all\n// SubConns of this ClientConn.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithDisableHealthCheck() DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.disableHealthCheck = true\n\t})\n}\n\nfunc defaultDialOptions() dialOptions {\n\treturn dialOptions{\n\t\tcopts: transport.ConnectOptions{\n\t\t\tReadBufferSize:  defaultReadBufSize,\n\t\t\tWriteBufferSize: defaultWriteBufSize,\n\t\t\tUserAgent:       grpcUA,\n\t\t\tBufferPool:      mem.DefaultBufferPool(),\n\t\t},\n\t\tbs:                       internalbackoff.DefaultExponential,\n\t\tidleTimeout:              30 * time.Minute,\n\t\tdefaultScheme:            \"dns\",\n\t\tmaxCallAttempts:          defaultMaxCallAttempts,\n\t\tuseProxy:                 true,\n\t\tenableLocalDNSResolution: false,\n\t}\n}\n\n// withMinConnectDeadline specifies the function that clientconn uses to\n// get minConnectDeadline. This can be used to make connection attempts happen\n// faster/slower.\n//\n// For testing purpose only.\nfunc withMinConnectDeadline(f func() time.Duration) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.minConnectTimeout = f\n\t})\n}\n\n// withDefaultScheme is used to allow Dial to use \"passthrough\" as the default\n// name resolver, while NewClient uses \"dns\" otherwise.\nfunc withDefaultScheme(s string) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.defaultScheme = s\n\t})\n}\n\n// WithResolvers allows a list of resolver implementations to be registered\n// locally with the ClientConn without needing to be globally registered via\n// resolver.Register.  They will be matched against the scheme used for the\n// current Dial only, and will take precedence over the global registry.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithResolvers(rs ...resolver.Builder) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.resolvers = append(o.resolvers, rs...)\n\t})\n}\n\n// WithIdleTimeout returns a DialOption that configures an idle timeout for the\n// channel. If the channel is idle for the configured timeout, i.e there are no\n// ongoing RPCs and no new RPCs are initiated, the channel will enter idle mode\n// and as a result the name resolver and load balancer will be shut down. The\n// channel will exit idle mode when the Connect() method is called or when an\n// RPC is initiated.\n//\n// A default timeout of 30 minutes will be used if this dial option is not set\n// at dial time and idleness can be disabled by passing a timeout of zero.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WithIdleTimeout(d time.Duration) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.idleTimeout = d\n\t})\n}\n\n// WithMaxCallAttempts returns a DialOption that configures the maximum number\n// of attempts per call (including retries and hedging) using the channel.\n// Service owners may specify a higher value for these parameters, but higher\n// values will be treated as equal to the maximum value by the client\n// implementation. This mitigates security concerns related to the service\n// config being transferred to the client via DNS.\n//\n// A value of 5 will be used if this dial option is not set or n < 2.\nfunc WithMaxCallAttempts(n int) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\tif n < 2 {\n\t\t\tn = defaultMaxCallAttempts\n\t\t}\n\t\to.maxCallAttempts = n\n\t})\n}\n\nfunc withBufferPool(bufferPool mem.BufferPool) DialOption {\n\treturn newFuncDialOption(func(o *dialOptions) {\n\t\to.copts.BufferPool = bufferPool\n\t})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/doc.go",
    "content": "/*\n *\n * Copyright 2015 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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//go:generate ./scripts/regenerate.sh\n\n/*\nPackage grpc implements an RPC system called gRPC.\n\nSee grpc.io for more information about gRPC.\n*/\npackage grpc // import \"google.golang.org/grpc\"\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/encoding/encoding.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package encoding defines the interface for the compressor and codec, and\n// functions to register and retrieve compressors and codecs.\n//\n// # Experimental\n//\n// Notice: This package is EXPERIMENTAL and may be changed or removed in a\n// later release.\npackage encoding\n\nimport (\n\t\"io\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/encoding/internal\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n)\n\n// Identity specifies the optional encoding for uncompressed streams.\n// It is intended for grpc internal use only.\nconst Identity = \"identity\"\n\nfunc init() {\n\tinternal.RegisterCompressorForTesting = func(c Compressor) func() {\n\t\tname := c.Name()\n\t\tcurCompressor, found := registeredCompressor[name]\n\t\tRegisterCompressor(c)\n\t\treturn func() {\n\t\t\tif found {\n\t\t\t\tregisteredCompressor[name] = curCompressor\n\t\t\t\treturn\n\t\t\t}\n\t\t\tdelete(registeredCompressor, name)\n\t\t\tgrpcutil.RegisteredCompressorNames = slices.DeleteFunc(grpcutil.RegisteredCompressorNames, func(s string) bool {\n\t\t\t\treturn s == name\n\t\t\t})\n\t\t}\n\t}\n}\n\n// Compressor is used for compressing and decompressing when sending or\n// receiving messages.\n//\n// If a Compressor implements `DecompressedSize(compressedBytes []byte) int`,\n// gRPC will invoke it to determine the size of the buffer allocated for the\n// result of decompression.  A return value of -1 indicates unknown size.\ntype Compressor interface {\n\t// Compress writes the data written to wc to w after compressing it.  If an\n\t// error occurs while initializing the compressor, that error is returned\n\t// instead.\n\tCompress(w io.Writer) (io.WriteCloser, error)\n\t// Decompress reads data from r, decompresses it, and provides the\n\t// uncompressed data via the returned io.Reader.  If an error occurs while\n\t// initializing the decompressor, that error is returned instead.\n\tDecompress(r io.Reader) (io.Reader, error)\n\t// Name is the name of the compression codec and is used to set the content\n\t// coding header.  The result must be static; the result cannot change\n\t// between calls.\n\tName() string\n}\n\nvar registeredCompressor = make(map[string]Compressor)\n\n// RegisterCompressor registers the compressor with gRPC by its name.  It can\n// be activated when sending an RPC via grpc.UseCompressor().  It will be\n// automatically accessed when receiving a message based on the content coding\n// header.  Servers also use it to send a response with the same encoding as\n// the request.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe.  If multiple Compressors are\n// registered with the same name, the one registered last will take effect.\nfunc RegisterCompressor(c Compressor) {\n\tregisteredCompressor[c.Name()] = c\n\tif !grpcutil.IsCompressorNameRegistered(c.Name()) {\n\t\tgrpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name())\n\t}\n}\n\n// GetCompressor returns Compressor for the given compressor name.\nfunc GetCompressor(name string) Compressor {\n\treturn registeredCompressor[name]\n}\n\n// Codec defines the interface gRPC uses to encode and decode messages.  Note\n// that implementations of this interface must be thread safe; a Codec's\n// methods can be called from concurrent goroutines.\ntype Codec interface {\n\t// Marshal returns the wire format of v.\n\tMarshal(v any) ([]byte, error)\n\t// Unmarshal parses the wire format into v.\n\tUnmarshal(data []byte, v any) error\n\t// Name returns the name of the Codec implementation. The returned string\n\t// will be used as part of content type in transmission.  The result must be\n\t// static; the result cannot change between calls.\n\tName() string\n}\n\nvar registeredCodecs = make(map[string]any)\n\n// RegisterCodec registers the provided Codec for use with all gRPC clients and\n// servers.\n//\n// The Codec will be stored and looked up by result of its Name() method, which\n// should match the content-subtype of the encoding handled by the Codec.  This\n// is case-insensitive, and is stored and looked up as lowercase.  If the\n// result of calling Name() is an empty string, RegisterCodec will panic. See\n// Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe.  If multiple Codecs are\n// registered with the same name, the one registered last will take effect.\nfunc RegisterCodec(codec Codec) {\n\tif codec == nil {\n\t\tpanic(\"cannot register a nil Codec\")\n\t}\n\tif codec.Name() == \"\" {\n\t\tpanic(\"cannot register Codec with empty string result for Name()\")\n\t}\n\tcontentSubtype := strings.ToLower(codec.Name())\n\tregisteredCodecs[contentSubtype] = codec\n}\n\n// GetCodec gets a registered Codec by content-subtype, or nil if no Codec is\n// registered for the content-subtype.\n//\n// The content-subtype is expected to be lowercase.\nfunc GetCodec(contentSubtype string) Codec {\n\tc, _ := registeredCodecs[contentSubtype].(Codec)\n\treturn c\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/encoding/encoding_v2.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage encoding\n\nimport (\n\t\"strings\"\n\n\t\"google.golang.org/grpc/mem\"\n)\n\n// CodecV2 defines the interface gRPC uses to encode and decode messages. Note\n// that implementations of this interface must be thread safe; a CodecV2's\n// methods can be called from concurrent goroutines.\ntype CodecV2 interface {\n\t// Marshal returns the wire format of v. The buffers in the returned\n\t// [mem.BufferSlice] must have at least one reference each, which will be freed\n\t// by gRPC when they are no longer needed.\n\tMarshal(v any) (out mem.BufferSlice, err error)\n\t// Unmarshal parses the wire format into v. Note that data will be freed as soon\n\t// as this function returns. If the codec wishes to guarantee access to the data\n\t// after this function, it must take its own reference that it frees when it is\n\t// no longer needed.\n\tUnmarshal(data mem.BufferSlice, v any) error\n\t// Name returns the name of the Codec implementation. The returned string\n\t// will be used as part of content type in transmission.  The result must be\n\t// static; the result cannot change between calls.\n\tName() string\n}\n\n// RegisterCodecV2 registers the provided CodecV2 for use with all gRPC clients and\n// servers.\n//\n// The CodecV2 will be stored and looked up by result of its Name() method, which\n// should match the content-subtype of the encoding handled by the CodecV2.  This\n// is case-insensitive, and is stored and looked up as lowercase.  If the\n// result of calling Name() is an empty string, RegisterCodecV2 will panic. See\n// Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details.\n//\n// If both a Codec and CodecV2 are registered with the same name, the CodecV2\n// will be used.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe.  If multiple Codecs are\n// registered with the same name, the one registered last will take effect.\nfunc RegisterCodecV2(codec CodecV2) {\n\tif codec == nil {\n\t\tpanic(\"cannot register a nil CodecV2\")\n\t}\n\tif codec.Name() == \"\" {\n\t\tpanic(\"cannot register CodecV2 with empty string result for Name()\")\n\t}\n\tcontentSubtype := strings.ToLower(codec.Name())\n\tregisteredCodecs[contentSubtype] = codec\n}\n\n// GetCodecV2 gets a registered CodecV2 by content-subtype, or nil if no CodecV2 is\n// registered for the content-subtype.\n//\n// The content-subtype is expected to be lowercase.\nfunc GetCodecV2(contentSubtype string) CodecV2 {\n\tc, _ := registeredCodecs[contentSubtype].(CodecV2)\n\treturn c\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/encoding/internal/internal.go",
    "content": "/*\n *\n * Copyright 2025 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package internal contains code internal to the encoding package.\npackage internal\n\n// RegisterCompressorForTesting registers a compressor in the global compressor\n// registry. It returns a cleanup function that should be called at the end\n// of the test to unregister the compressor.\n//\n// This prevents compressors registered in one test from appearing in the\n// encoding headers of subsequent tests.\nvar RegisterCompressorForTesting any // func RegisterCompressor(c Compressor) func()\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/encoding/proto/proto.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package proto defines the protobuf codec. Importing this package will\n// register the codec.\npackage proto\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/encoding\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/protoadapt\"\n)\n\n// Name is the name registered for the proto compressor.\nconst Name = \"proto\"\n\nfunc init() {\n\tencoding.RegisterCodecV2(&codecV2{})\n}\n\n// codec is a CodecV2 implementation with protobuf. It is the default codec for\n// gRPC.\ntype codecV2 struct{}\n\nfunc (c *codecV2) Marshal(v any) (data mem.BufferSlice, err error) {\n\tvv := messageV2Of(v)\n\tif vv == nil {\n\t\treturn nil, fmt.Errorf(\"proto: failed to marshal, message is %T, want proto.Message\", v)\n\t}\n\n\t// Important: if we remove this Size call then we cannot use\n\t// UseCachedSize in MarshalOptions below.\n\tsize := proto.Size(vv)\n\n\t// MarshalOptions with UseCachedSize allows reusing the result from the\n\t// previous Size call. This is safe here because:\n\t//\n\t// 1. We just computed the size.\n\t// 2. We assume the message is not being mutated concurrently.\n\t//\n\t// Important: If the proto.Size call above is removed, using UseCachedSize\n\t// becomes unsafe and may lead to incorrect marshaling.\n\t//\n\t// For more details, see the doc of UseCachedSize:\n\t// https://pkg.go.dev/google.golang.org/protobuf/proto#MarshalOptions\n\tmarshalOptions := proto.MarshalOptions{UseCachedSize: true}\n\n\tif mem.IsBelowBufferPoolingThreshold(size) {\n\t\tbuf, err := marshalOptions.Marshal(vv)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata = append(data, mem.SliceBuffer(buf))\n\t} else {\n\t\tpool := mem.DefaultBufferPool()\n\t\tbuf := pool.Get(size)\n\t\tif _, err := marshalOptions.MarshalAppend((*buf)[:0], vv); err != nil {\n\t\t\tpool.Put(buf)\n\t\t\treturn nil, err\n\t\t}\n\t\tdata = append(data, mem.NewBuffer(buf, pool))\n\t}\n\n\treturn data, nil\n}\n\nfunc (c *codecV2) Unmarshal(data mem.BufferSlice, v any) (err error) {\n\tvv := messageV2Of(v)\n\tif vv == nil {\n\t\treturn fmt.Errorf(\"failed to unmarshal, message is %T, want proto.Message\", v)\n\t}\n\n\tbuf := data.MaterializeToBuffer(mem.DefaultBufferPool())\n\tdefer buf.Free()\n\t// TODO: Upgrade proto.Unmarshal to support mem.BufferSlice. Right now, it's not\n\t//  really possible without a major overhaul of the proto package, but the\n\t//  vtprotobuf library may be able to support this.\n\treturn proto.Unmarshal(buf.ReadOnlyData(), vv)\n}\n\nfunc messageV2Of(v any) proto.Message {\n\tswitch v := v.(type) {\n\tcase protoadapt.MessageV1:\n\t\treturn protoadapt.MessageV2Of(v)\n\tcase protoadapt.MessageV2:\n\t\treturn v\n\t}\n\n\treturn nil\n}\n\nfunc (c *codecV2) Name() string {\n\treturn Name\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/experimental/stats/metricregistry.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage stats\n\nimport (\n\t\"maps\"\n\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/stats\"\n)\n\nfunc init() {\n\tinternal.SnapshotMetricRegistryForTesting = snapshotMetricsRegistryForTesting\n}\n\nvar logger = grpclog.Component(\"metrics-registry\")\n\n// DefaultMetrics are the default metrics registered through global metrics\n// registry. This is written to at initialization time only, and is read only\n// after initialization.\nvar DefaultMetrics = stats.NewMetricSet()\n\n// MetricDescriptor is the data for a registered metric.\ntype MetricDescriptor struct {\n\t// The name of this metric. This name must be unique across the whole binary\n\t// (including any per call metrics). See\n\t// https://github.com/grpc/proposal/blob/master/A79-non-per-call-metrics-architecture.md#metric-instrument-naming-conventions\n\t// for metric naming conventions.\n\tName string\n\t// The description of this metric.\n\tDescription string\n\t// The unit (e.g. entries, seconds) of this metric.\n\tUnit string\n\t// The required label keys for this metric. These are intended to\n\t// metrics emitted from a stats handler.\n\tLabels []string\n\t// The optional label keys for this metric. These are intended to attached\n\t// to metrics emitted from a stats handler if configured.\n\tOptionalLabels []string\n\t// Whether this metric is on by default.\n\tDefault bool\n\t// The type of metric. This is set by the metric registry, and not intended\n\t// to be set by a component registering a metric.\n\tType MetricType\n\t// Bounds are the bounds of this metric. This only applies to histogram\n\t// metrics. If unset or set with length 0, stats handlers will fall back to\n\t// default bounds.\n\tBounds []float64\n}\n\n// MetricType is the type of metric.\ntype MetricType int\n\n// Type of metric supported by this instrument registry.\nconst (\n\tMetricTypeIntCount MetricType = iota\n\tMetricTypeFloatCount\n\tMetricTypeIntHisto\n\tMetricTypeFloatHisto\n\tMetricTypeIntGauge\n\tMetricTypeIntUpDownCount\n\tMetricTypeIntAsyncGauge\n)\n\n// Int64CountHandle is a typed handle for a int count metric. This handle\n// is passed at the recording point in order to know which metric to record\n// on.\ntype Int64CountHandle MetricDescriptor\n\n// Descriptor returns the int64 count handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Int64CountHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the int64 count value on the metrics recorder provided.\nfunc (h *Int64CountHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) {\n\trecorder.RecordInt64Count(h, incr, labels...)\n}\n\n// Int64UpDownCountHandle is a typed handle for an int up-down counter metric.\n// This handle is passed at the recording point in order to know which metric\n// to record on.\ntype Int64UpDownCountHandle MetricDescriptor\n\n// Descriptor returns the int64 up-down counter handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Int64UpDownCountHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the int64 up-down counter value on the metrics recorder provided.\n// The value 'v' can be positive to increment or negative to decrement.\nfunc (h *Int64UpDownCountHandle) Record(recorder MetricsRecorder, v int64, labels ...string) {\n\trecorder.RecordInt64UpDownCount(h, v, labels...)\n}\n\n// Float64CountHandle is a typed handle for a float count metric. This handle is\n// passed at the recording point in order to know which metric to record on.\ntype Float64CountHandle MetricDescriptor\n\n// Descriptor returns the float64 count handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Float64CountHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the float64 count value on the metrics recorder provided.\nfunc (h *Float64CountHandle) Record(recorder MetricsRecorder, incr float64, labels ...string) {\n\trecorder.RecordFloat64Count(h, incr, labels...)\n}\n\n// Int64HistoHandle is a typed handle for an int histogram metric. This handle\n// is passed at the recording point in order to know which metric to record on.\ntype Int64HistoHandle MetricDescriptor\n\n// Descriptor returns the int64 histo handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Int64HistoHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the int64 histo value on the metrics recorder provided.\nfunc (h *Int64HistoHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) {\n\trecorder.RecordInt64Histo(h, incr, labels...)\n}\n\n// Float64HistoHandle is a typed handle for a float histogram metric. This\n// handle is passed at the recording point in order to know which metric to\n// record on.\ntype Float64HistoHandle MetricDescriptor\n\n// Descriptor returns the float64 histo handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Float64HistoHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the float64 histo value on the metrics recorder provided.\nfunc (h *Float64HistoHandle) Record(recorder MetricsRecorder, incr float64, labels ...string) {\n\trecorder.RecordFloat64Histo(h, incr, labels...)\n}\n\n// Int64GaugeHandle is a typed handle for an int gauge metric. This handle is\n// passed at the recording point in order to know which metric to record on.\ntype Int64GaugeHandle MetricDescriptor\n\n// Descriptor returns the int64 gauge handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Int64GaugeHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the int64 histo value on the metrics recorder provided.\nfunc (h *Int64GaugeHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) {\n\trecorder.RecordInt64Gauge(h, incr, labels...)\n}\n\n// AsyncMetric is a marker interface for asynchronous metric types.\ntype AsyncMetric interface {\n\tisAsync()\n\tDescriptor() *MetricDescriptor\n}\n\n// Int64AsyncGaugeHandle is a typed handle for an int gauge metric. This handle is\n// passed at the recording point in order to know which metric to record on.\ntype Int64AsyncGaugeHandle MetricDescriptor\n\n// isAsync implements the AsyncMetric interface.\nfunc (h *Int64AsyncGaugeHandle) isAsync() {}\n\n// Descriptor returns the int64 gauge handle typecast to a pointer to a\n// MetricDescriptor.\nfunc (h *Int64AsyncGaugeHandle) Descriptor() *MetricDescriptor {\n\treturn (*MetricDescriptor)(h)\n}\n\n// Record records the int64 gauge value on the metrics recorder provided.\nfunc (h *Int64AsyncGaugeHandle) Record(recorder AsyncMetricsRecorder, value int64, labels ...string) {\n\trecorder.RecordInt64AsyncGauge(h, value, labels...)\n}\n\n// registeredMetrics are the registered metric descriptor names.\nvar registeredMetrics = make(map[string]bool)\n\n// metricsRegistry contains all of the registered metrics.\n//\n// This is written to only at init time, and read only after that.\nvar metricsRegistry = make(map[string]*MetricDescriptor)\n\n// DescriptorForMetric returns the MetricDescriptor from the global registry.\n//\n// Returns nil if MetricDescriptor not present.\nfunc DescriptorForMetric(metricName string) *MetricDescriptor {\n\treturn metricsRegistry[metricName]\n}\n\nfunc registerMetric(metricName string, def bool) {\n\tif registeredMetrics[metricName] {\n\t\tlogger.Fatalf(\"metric %v already registered\", metricName)\n\t}\n\tregisteredMetrics[metricName] = true\n\tif def {\n\t\tDefaultMetrics = DefaultMetrics.Add(metricName)\n\t}\n}\n\n// RegisterInt64Count registers the metric description onto the global registry.\n// It returns a typed handle to use to recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterInt64Count(descriptor MetricDescriptor) *Int64CountHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeIntCount\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Int64CountHandle)(descPtr)\n}\n\n// RegisterFloat64Count registers the metric description onto the global\n// registry. It returns a typed handle to use to recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterFloat64Count(descriptor MetricDescriptor) *Float64CountHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeFloatCount\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Float64CountHandle)(descPtr)\n}\n\n// RegisterInt64Histo registers the metric description onto the global registry.\n// It returns a typed handle to use to recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterInt64Histo(descriptor MetricDescriptor) *Int64HistoHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeIntHisto\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Int64HistoHandle)(descPtr)\n}\n\n// RegisterFloat64Histo registers the metric description onto the global\n// registry. It returns a typed handle to use to recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterFloat64Histo(descriptor MetricDescriptor) *Float64HistoHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeFloatHisto\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Float64HistoHandle)(descPtr)\n}\n\n// RegisterInt64Gauge registers the metric description onto the global registry.\n// It returns a typed handle to use to recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterInt64Gauge(descriptor MetricDescriptor) *Int64GaugeHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeIntGauge\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Int64GaugeHandle)(descPtr)\n}\n\n// RegisterInt64UpDownCount registers the metric description onto the global registry.\n// It returns a typed handle to use for recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterInt64UpDownCount(descriptor MetricDescriptor) *Int64UpDownCountHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\t// Set the specific metric type for the up-down counter\n\tdescriptor.Type = MetricTypeIntUpDownCount\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Int64UpDownCountHandle)(descPtr)\n}\n\n// RegisterInt64AsyncGauge registers the metric description onto the global registry.\n// It returns a typed handle to use for recording data.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple metrics are\n// registered with the same name, this function will panic.\nfunc RegisterInt64AsyncGauge(descriptor MetricDescriptor) *Int64AsyncGaugeHandle {\n\tregisterMetric(descriptor.Name, descriptor.Default)\n\tdescriptor.Type = MetricTypeIntAsyncGauge\n\tdescPtr := &descriptor\n\tmetricsRegistry[descriptor.Name] = descPtr\n\treturn (*Int64AsyncGaugeHandle)(descPtr)\n}\n\n// snapshotMetricsRegistryForTesting snapshots the global data of the metrics\n// registry. Returns a cleanup function that sets the metrics registry to its\n// original state.\nfunc snapshotMetricsRegistryForTesting() func() {\n\toldDefaultMetrics := DefaultMetrics\n\toldRegisteredMetrics := registeredMetrics\n\toldMetricsRegistry := metricsRegistry\n\n\tregisteredMetrics = make(map[string]bool)\n\tmetricsRegistry = make(map[string]*MetricDescriptor)\n\tmaps.Copy(registeredMetrics, registeredMetrics)\n\tmaps.Copy(metricsRegistry, metricsRegistry)\n\n\treturn func() {\n\t\tDefaultMetrics = oldDefaultMetrics\n\t\tregisteredMetrics = oldRegisteredMetrics\n\t\tmetricsRegistry = oldMetricsRegistry\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/experimental/stats/metrics.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package stats contains experimental metrics/stats API's.\npackage stats\n\nimport \"google.golang.org/grpc/stats\"\n\n// MetricsRecorder records on metrics derived from metric registry.\ntype MetricsRecorder interface {\n\t// RecordInt64Count records the measurement alongside labels on the int\n\t// count associated with the provided handle.\n\tRecordInt64Count(handle *Int64CountHandle, incr int64, labels ...string)\n\t// RecordFloat64Count records the measurement alongside labels on the float\n\t// count associated with the provided handle.\n\tRecordFloat64Count(handle *Float64CountHandle, incr float64, labels ...string)\n\t// RecordInt64Histo records the measurement alongside labels on the int\n\t// histo associated with the provided handle.\n\tRecordInt64Histo(handle *Int64HistoHandle, incr int64, labels ...string)\n\t// RecordFloat64Histo records the measurement alongside labels on the float\n\t// histo associated with the provided handle.\n\tRecordFloat64Histo(handle *Float64HistoHandle, incr float64, labels ...string)\n\t// RecordInt64Gauge records the measurement alongside labels on the int\n\t// gauge associated with the provided handle.\n\tRecordInt64Gauge(handle *Int64GaugeHandle, incr int64, labels ...string)\n\t// RecordInt64UpDownCounter records the measurement alongside labels on the int\n\t// count associated with the provided handle.\n\tRecordInt64UpDownCount(handle *Int64UpDownCountHandle, incr int64, labels ...string)\n}\n\n// AsyncMetricsRecorder records on asynchronous metrics derived from metric registry.\ntype AsyncMetricsRecorder interface {\n\t// RecordInt64AsyncGauge records the measurement alongside labels on the int\n\t// count associated with the provided handle asynchronously\n\tRecordInt64AsyncGauge(handle *Int64AsyncGaugeHandle, incr int64, labels ...string)\n}\n\n// Metrics is an experimental legacy alias of the now-stable stats.MetricSet.\n// Metrics will be deleted in a future release.\ntype Metrics = stats.MetricSet\n\n// Metric was replaced by direct usage of strings.\ntype Metric = string\n\n// NewMetrics is an experimental legacy alias of the now-stable\n// stats.NewMetricSet.  NewMetrics will be deleted in a future release.\nfunc NewMetrics(metrics ...Metric) *Metrics {\n\treturn stats.NewMetricSet(metrics...)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/component.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpclog\n\nimport (\n\t\"fmt\"\n)\n\n// componentData records the settings for a component.\ntype componentData struct {\n\tname string\n}\n\nvar cache = map[string]*componentData{}\n\nfunc (c *componentData) InfoDepth(depth int, args ...any) {\n\targs = append([]any{\"[\" + string(c.name) + \"]\"}, args...)\n\tInfoDepth(depth+1, args...)\n}\n\nfunc (c *componentData) WarningDepth(depth int, args ...any) {\n\targs = append([]any{\"[\" + string(c.name) + \"]\"}, args...)\n\tWarningDepth(depth+1, args...)\n}\n\nfunc (c *componentData) ErrorDepth(depth int, args ...any) {\n\targs = append([]any{\"[\" + string(c.name) + \"]\"}, args...)\n\tErrorDepth(depth+1, args...)\n}\n\nfunc (c *componentData) FatalDepth(depth int, args ...any) {\n\targs = append([]any{\"[\" + string(c.name) + \"]\"}, args...)\n\tFatalDepth(depth+1, args...)\n}\n\nfunc (c *componentData) Info(args ...any) {\n\tc.InfoDepth(1, args...)\n}\n\nfunc (c *componentData) Warning(args ...any) {\n\tc.WarningDepth(1, args...)\n}\n\nfunc (c *componentData) Error(args ...any) {\n\tc.ErrorDepth(1, args...)\n}\n\nfunc (c *componentData) Fatal(args ...any) {\n\tc.FatalDepth(1, args...)\n}\n\nfunc (c *componentData) Infof(format string, args ...any) {\n\tc.InfoDepth(1, fmt.Sprintf(format, args...))\n}\n\nfunc (c *componentData) Warningf(format string, args ...any) {\n\tc.WarningDepth(1, fmt.Sprintf(format, args...))\n}\n\nfunc (c *componentData) Errorf(format string, args ...any) {\n\tc.ErrorDepth(1, fmt.Sprintf(format, args...))\n}\n\nfunc (c *componentData) Fatalf(format string, args ...any) {\n\tc.FatalDepth(1, fmt.Sprintf(format, args...))\n}\n\nfunc (c *componentData) Infoln(args ...any) {\n\tc.InfoDepth(1, args...)\n}\n\nfunc (c *componentData) Warningln(args ...any) {\n\tc.WarningDepth(1, args...)\n}\n\nfunc (c *componentData) Errorln(args ...any) {\n\tc.ErrorDepth(1, args...)\n}\n\nfunc (c *componentData) Fatalln(args ...any) {\n\tc.FatalDepth(1, args...)\n}\n\nfunc (c *componentData) V(l int) bool {\n\treturn V(l)\n}\n\n// Component creates a new component and returns it for logging. If a component\n// with the name already exists, nothing will be created and it will be\n// returned. SetLoggerV2 will panic if it is called with a logger created by\n// Component.\nfunc Component(componentName string) DepthLoggerV2 {\n\tif cData, ok := cache[componentName]; ok {\n\t\treturn cData\n\t}\n\tc := &componentData{componentName}\n\tcache[componentName] = c\n\treturn c\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/grpclog.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package grpclog defines logging for grpc.\n//\n// In the default logger, severity level can be set by environment variable\n// GRPC_GO_LOG_SEVERITY_LEVEL, verbosity level can be set by\n// GRPC_GO_LOG_VERBOSITY_LEVEL.\npackage grpclog\n\nimport (\n\t\"os\"\n\n\t\"google.golang.org/grpc/grpclog/internal\"\n)\n\nfunc init() {\n\tSetLoggerV2(newLoggerV2())\n}\n\n// V reports whether verbosity level l is at least the requested verbose level.\nfunc V(l int) bool {\n\treturn internal.LoggerV2Impl.V(l)\n}\n\n// Info logs to the INFO log.\nfunc Info(args ...any) {\n\tinternal.LoggerV2Impl.Info(args...)\n}\n\n// Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf.\nfunc Infof(format string, args ...any) {\n\tinternal.LoggerV2Impl.Infof(format, args...)\n}\n\n// Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println.\nfunc Infoln(args ...any) {\n\tinternal.LoggerV2Impl.Infoln(args...)\n}\n\n// Warning logs to the WARNING log.\nfunc Warning(args ...any) {\n\tinternal.LoggerV2Impl.Warning(args...)\n}\n\n// Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf.\nfunc Warningf(format string, args ...any) {\n\tinternal.LoggerV2Impl.Warningf(format, args...)\n}\n\n// Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println.\nfunc Warningln(args ...any) {\n\tinternal.LoggerV2Impl.Warningln(args...)\n}\n\n// Error logs to the ERROR log.\nfunc Error(args ...any) {\n\tinternal.LoggerV2Impl.Error(args...)\n}\n\n// Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf.\nfunc Errorf(format string, args ...any) {\n\tinternal.LoggerV2Impl.Errorf(format, args...)\n}\n\n// Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println.\nfunc Errorln(args ...any) {\n\tinternal.LoggerV2Impl.Errorln(args...)\n}\n\n// Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print.\n// It calls os.Exit() with exit code 1.\nfunc Fatal(args ...any) {\n\tinternal.LoggerV2Impl.Fatal(args...)\n\t// Make sure fatal logs will exit.\n\tos.Exit(1)\n}\n\n// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.\n// It calls os.Exit() with exit code 1.\nfunc Fatalf(format string, args ...any) {\n\tinternal.LoggerV2Impl.Fatalf(format, args...)\n\t// Make sure fatal logs will exit.\n\tos.Exit(1)\n}\n\n// Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println.\n// It calls os.Exit() with exit code 1.\nfunc Fatalln(args ...any) {\n\tinternal.LoggerV2Impl.Fatalln(args...)\n\t// Make sure fatal logs will exit.\n\tos.Exit(1)\n}\n\n// Print prints to the logger. Arguments are handled in the manner of fmt.Print.\n//\n// Deprecated: use Info.\nfunc Print(args ...any) {\n\tinternal.LoggerV2Impl.Info(args...)\n}\n\n// Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.\n//\n// Deprecated: use Infof.\nfunc Printf(format string, args ...any) {\n\tinternal.LoggerV2Impl.Infof(format, args...)\n}\n\n// Println prints to the logger. Arguments are handled in the manner of fmt.Println.\n//\n// Deprecated: use Infoln.\nfunc Println(args ...any) {\n\tinternal.LoggerV2Impl.Infoln(args...)\n}\n\n// InfoDepth logs to the INFO log at the specified depth.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc InfoDepth(depth int, args ...any) {\n\tif internal.DepthLoggerV2Impl != nil {\n\t\tinternal.DepthLoggerV2Impl.InfoDepth(depth, args...)\n\t} else {\n\t\tinternal.LoggerV2Impl.Infoln(args...)\n\t}\n}\n\n// WarningDepth logs to the WARNING log at the specified depth.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WarningDepth(depth int, args ...any) {\n\tif internal.DepthLoggerV2Impl != nil {\n\t\tinternal.DepthLoggerV2Impl.WarningDepth(depth, args...)\n\t} else {\n\t\tinternal.LoggerV2Impl.Warningln(args...)\n\t}\n}\n\n// ErrorDepth logs to the ERROR log at the specified depth.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ErrorDepth(depth int, args ...any) {\n\tif internal.DepthLoggerV2Impl != nil {\n\t\tinternal.DepthLoggerV2Impl.ErrorDepth(depth, args...)\n\t} else {\n\t\tinternal.LoggerV2Impl.Errorln(args...)\n\t}\n}\n\n// FatalDepth logs to the FATAL log at the specified depth.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc FatalDepth(depth int, args ...any) {\n\tif internal.DepthLoggerV2Impl != nil {\n\t\tinternal.DepthLoggerV2Impl.FatalDepth(depth, args...)\n\t} else {\n\t\tinternal.LoggerV2Impl.Fatalln(args...)\n\t}\n\tos.Exit(1)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/internal/grpclog.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package internal contains functionality internal to the grpclog package.\npackage internal\n\n// LoggerV2Impl is the logger used for the non-depth log functions.\nvar LoggerV2Impl LoggerV2\n\n// DepthLoggerV2Impl is the logger used for the depth log functions.\nvar DepthLoggerV2Impl DepthLoggerV2\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/internal/logger.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\n// Logger mimics golang's standard Logger as an interface.\n//\n// Deprecated: use LoggerV2.\ntype Logger interface {\n\tFatal(args ...any)\n\tFatalf(format string, args ...any)\n\tFatalln(args ...any)\n\tPrint(args ...any)\n\tPrintf(format string, args ...any)\n\tPrintln(args ...any)\n}\n\n// LoggerWrapper wraps Logger into a LoggerV2.\ntype LoggerWrapper struct {\n\tLogger\n}\n\n// Info logs to INFO log. Arguments are handled in the manner of fmt.Print.\nfunc (l *LoggerWrapper) Info(args ...any) {\n\tl.Logger.Print(args...)\n}\n\n// Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println.\nfunc (l *LoggerWrapper) Infoln(args ...any) {\n\tl.Logger.Println(args...)\n}\n\n// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.\nfunc (l *LoggerWrapper) Infof(format string, args ...any) {\n\tl.Logger.Printf(format, args...)\n}\n\n// Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print.\nfunc (l *LoggerWrapper) Warning(args ...any) {\n\tl.Logger.Print(args...)\n}\n\n// Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.\nfunc (l *LoggerWrapper) Warningln(args ...any) {\n\tl.Logger.Println(args...)\n}\n\n// Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.\nfunc (l *LoggerWrapper) Warningf(format string, args ...any) {\n\tl.Logger.Printf(format, args...)\n}\n\n// Error logs to ERROR log. Arguments are handled in the manner of fmt.Print.\nfunc (l *LoggerWrapper) Error(args ...any) {\n\tl.Logger.Print(args...)\n}\n\n// Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println.\nfunc (l *LoggerWrapper) Errorln(args ...any) {\n\tl.Logger.Println(args...)\n}\n\n// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.\nfunc (l *LoggerWrapper) Errorf(format string, args ...any) {\n\tl.Logger.Printf(format, args...)\n}\n\n// V reports whether verbosity level l is at least the requested verbose level.\nfunc (*LoggerWrapper) V(int) bool {\n\t// Returns true for all verbose level.\n\treturn true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n)\n\n// LoggerV2 does underlying logging work for grpclog.\ntype LoggerV2 interface {\n\t// Info logs to INFO log. Arguments are handled in the manner of fmt.Print.\n\tInfo(args ...any)\n\t// Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println.\n\tInfoln(args ...any)\n\t// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.\n\tInfof(format string, args ...any)\n\t// Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print.\n\tWarning(args ...any)\n\t// Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println.\n\tWarningln(args ...any)\n\t// Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf.\n\tWarningf(format string, args ...any)\n\t// Error logs to ERROR log. Arguments are handled in the manner of fmt.Print.\n\tError(args ...any)\n\t// Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println.\n\tErrorln(args ...any)\n\t// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.\n\tErrorf(format string, args ...any)\n\t// Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print.\n\t// gRPC ensures that all Fatal logs will exit with os.Exit(1).\n\t// Implementations may also call os.Exit() with a non-zero exit code.\n\tFatal(args ...any)\n\t// Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println.\n\t// gRPC ensures that all Fatal logs will exit with os.Exit(1).\n\t// Implementations may also call os.Exit() with a non-zero exit code.\n\tFatalln(args ...any)\n\t// Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.\n\t// gRPC ensures that all Fatal logs will exit with os.Exit(1).\n\t// Implementations may also call os.Exit() with a non-zero exit code.\n\tFatalf(format string, args ...any)\n\t// V reports whether verbosity level l is at least the requested verbose level.\n\tV(l int) bool\n}\n\n// DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements\n// DepthLoggerV2, the below functions will be called with the appropriate stack\n// depth set for trivial functions the logger may ignore.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype DepthLoggerV2 interface {\n\tLoggerV2\n\t// InfoDepth logs to INFO log at the specified depth. Arguments are handled in the manner of fmt.Println.\n\tInfoDepth(depth int, args ...any)\n\t// WarningDepth logs to WARNING log at the specified depth. Arguments are handled in the manner of fmt.Println.\n\tWarningDepth(depth int, args ...any)\n\t// ErrorDepth logs to ERROR log at the specified depth. Arguments are handled in the manner of fmt.Println.\n\tErrorDepth(depth int, args ...any)\n\t// FatalDepth logs to FATAL log at the specified depth. Arguments are handled in the manner of fmt.Println.\n\tFatalDepth(depth int, args ...any)\n}\n\nconst (\n\t// infoLog indicates Info severity.\n\tinfoLog int = iota\n\t// warningLog indicates Warning severity.\n\twarningLog\n\t// errorLog indicates Error severity.\n\terrorLog\n\t// fatalLog indicates Fatal severity.\n\tfatalLog\n)\n\n// severityName contains the string representation of each severity.\nvar severityName = []string{\n\tinfoLog:    \"INFO\",\n\twarningLog: \"WARNING\",\n\terrorLog:   \"ERROR\",\n\tfatalLog:   \"FATAL\",\n}\n\n// sprintf is fmt.Sprintf.\n// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.\nvar sprintf = fmt.Sprintf\n\n// sprint is fmt.Sprint.\n// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.\nvar sprint = fmt.Sprint\n\n// sprintln is fmt.Sprintln.\n// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.\nvar sprintln = fmt.Sprintln\n\n// exit is os.Exit.\n// This var exists to make it possible to test functions calling os.Exit.\nvar exit = os.Exit\n\n// loggerT is the default logger used by grpclog.\ntype loggerT struct {\n\tm          []*log.Logger\n\tv          int\n\tjsonFormat bool\n}\n\nfunc (g *loggerT) output(severity int, s string) {\n\tsevStr := severityName[severity]\n\tif !g.jsonFormat {\n\t\tg.m[severity].Output(2, sevStr+\": \"+s)\n\t\treturn\n\t}\n\t// TODO: we can also include the logging component, but that needs more\n\t// (API) changes.\n\tb, _ := json.Marshal(map[string]string{\n\t\t\"severity\": sevStr,\n\t\t\"message\":  s,\n\t})\n\tg.m[severity].Output(2, string(b))\n}\n\nfunc (g *loggerT) printf(severity int, format string, args ...any) {\n\t// Note the discard check is duplicated in each print func, rather than in\n\t// output, to avoid the expensive Sprint calls.\n\t// De-duplicating this by moving to output would be a significant performance regression!\n\tif lg := g.m[severity]; lg.Writer() == io.Discard {\n\t\treturn\n\t}\n\tg.output(severity, sprintf(format, args...))\n}\n\nfunc (g *loggerT) print(severity int, v ...any) {\n\tif lg := g.m[severity]; lg.Writer() == io.Discard {\n\t\treturn\n\t}\n\tg.output(severity, sprint(v...))\n}\n\nfunc (g *loggerT) println(severity int, v ...any) {\n\tif lg := g.m[severity]; lg.Writer() == io.Discard {\n\t\treturn\n\t}\n\tg.output(severity, sprintln(v...))\n}\n\nfunc (g *loggerT) Info(args ...any) {\n\tg.print(infoLog, args...)\n}\n\nfunc (g *loggerT) Infoln(args ...any) {\n\tg.println(infoLog, args...)\n}\n\nfunc (g *loggerT) Infof(format string, args ...any) {\n\tg.printf(infoLog, format, args...)\n}\n\nfunc (g *loggerT) Warning(args ...any) {\n\tg.print(warningLog, args...)\n}\n\nfunc (g *loggerT) Warningln(args ...any) {\n\tg.println(warningLog, args...)\n}\n\nfunc (g *loggerT) Warningf(format string, args ...any) {\n\tg.printf(warningLog, format, args...)\n}\n\nfunc (g *loggerT) Error(args ...any) {\n\tg.print(errorLog, args...)\n}\n\nfunc (g *loggerT) Errorln(args ...any) {\n\tg.println(errorLog, args...)\n}\n\nfunc (g *loggerT) Errorf(format string, args ...any) {\n\tg.printf(errorLog, format, args...)\n}\n\nfunc (g *loggerT) Fatal(args ...any) {\n\tg.print(fatalLog, args...)\n\texit(1)\n}\n\nfunc (g *loggerT) Fatalln(args ...any) {\n\tg.println(fatalLog, args...)\n\texit(1)\n}\n\nfunc (g *loggerT) Fatalf(format string, args ...any) {\n\tg.printf(fatalLog, format, args...)\n\texit(1)\n}\n\nfunc (g *loggerT) V(l int) bool {\n\treturn l <= g.v\n}\n\n// LoggerV2Config configures the LoggerV2 implementation.\ntype LoggerV2Config struct {\n\t// Verbosity sets the verbosity level of the logger.\n\tVerbosity int\n\t// FormatJSON controls whether the logger should output logs in JSON format.\n\tFormatJSON bool\n}\n\n// combineLoggers returns a combined logger for both higher & lower severity logs,\n// or only one if the other is io.Discard.\n//\n// This uses io.Discard instead of io.MultiWriter when all loggers\n// are set to io.Discard. Both this package and the standard log package have\n// significant optimizations for io.Discard, which io.MultiWriter lacks (as of\n// this writing).\nfunc combineLoggers(lower, higher io.Writer) io.Writer {\n\tif lower == io.Discard {\n\t\treturn higher\n\t}\n\tif higher == io.Discard {\n\t\treturn lower\n\t}\n\treturn io.MultiWriter(lower, higher)\n}\n\n// NewLoggerV2 creates a new LoggerV2 instance with the provided configuration.\n// The infoW, warningW, and errorW writers are used to write log messages of\n// different severity levels.\nfunc NewLoggerV2(infoW, warningW, errorW io.Writer, c LoggerV2Config) LoggerV2 {\n\tflag := log.LstdFlags\n\tif c.FormatJSON {\n\t\tflag = 0\n\t}\n\n\twarningW = combineLoggers(infoW, warningW)\n\terrorW = combineLoggers(errorW, warningW)\n\n\tfatalW := errorW\n\n\tm := []*log.Logger{\n\t\tlog.New(infoW, \"\", flag),\n\t\tlog.New(warningW, \"\", flag),\n\t\tlog.New(errorW, \"\", flag),\n\t\tlog.New(fatalW, \"\", flag),\n\t}\n\treturn &loggerT{m: m, v: c.Verbosity, jsonFormat: c.FormatJSON}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/logger.go",
    "content": "/*\n *\n * Copyright 2015 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpclog\n\nimport \"google.golang.org/grpc/grpclog/internal\"\n\n// Logger mimics golang's standard Logger as an interface.\n//\n// Deprecated: use LoggerV2.\ntype Logger internal.Logger\n\n// SetLogger sets the logger that is used in grpc. Call only from\n// init() functions.\n//\n// Deprecated: use SetLoggerV2.\nfunc SetLogger(l Logger) {\n\tinternal.LoggerV2Impl = &internal.LoggerWrapper{Logger: l}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/grpclog/loggerv2.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpclog\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/grpclog/internal\"\n)\n\n// LoggerV2 does underlying logging work for grpclog.\ntype LoggerV2 internal.LoggerV2\n\n// SetLoggerV2 sets logger that is used in grpc to a V2 logger.\n// Not mutex-protected, should be called before any gRPC functions.\nfunc SetLoggerV2(l LoggerV2) {\n\tif _, ok := l.(*componentData); ok {\n\t\tpanic(\"cannot use component logger as grpclog logger\")\n\t}\n\tinternal.LoggerV2Impl = l\n\tinternal.DepthLoggerV2Impl, _ = l.(internal.DepthLoggerV2)\n}\n\n// NewLoggerV2 creates a loggerV2 with the provided writers.\n// Fatal logs will be written to errorW, warningW, infoW, followed by exit(1).\n// Error logs will be written to errorW, warningW and infoW.\n// Warning logs will be written to warningW and infoW.\n// Info logs will be written to infoW.\nfunc NewLoggerV2(infoW, warningW, errorW io.Writer) LoggerV2 {\n\treturn internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{})\n}\n\n// NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers and\n// verbosity level.\nfunc NewLoggerV2WithVerbosity(infoW, warningW, errorW io.Writer, v int) LoggerV2 {\n\treturn internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{Verbosity: v})\n}\n\n// newLoggerV2 creates a loggerV2 to be used as default logger.\n// All logs are written to stderr.\nfunc newLoggerV2() LoggerV2 {\n\terrorW := io.Discard\n\twarningW := io.Discard\n\tinfoW := io.Discard\n\n\tlogLevel := os.Getenv(\"GRPC_GO_LOG_SEVERITY_LEVEL\")\n\tswitch logLevel {\n\tcase \"\", \"ERROR\", \"error\": // If env is unset, set level to ERROR.\n\t\terrorW = os.Stderr\n\tcase \"WARNING\", \"warning\":\n\t\twarningW = os.Stderr\n\tcase \"INFO\", \"info\":\n\t\tinfoW = os.Stderr\n\t}\n\n\tvar v int\n\tvLevel := os.Getenv(\"GRPC_GO_LOG_VERBOSITY_LEVEL\")\n\tif vl, err := strconv.Atoi(vLevel); err == nil {\n\t\tv = vl\n\t}\n\n\tjsonFormat := strings.EqualFold(os.Getenv(\"GRPC_GO_LOG_FORMATTER\"), \"json\")\n\n\treturn internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{\n\t\tVerbosity:  v,\n\t\tFormatJSON: jsonFormat,\n\t})\n}\n\n// DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements\n// DepthLoggerV2, the below functions will be called with the appropriate stack\n// depth set for trivial functions the logger may ignore.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype DepthLoggerV2 internal.DepthLoggerV2\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/interceptor.go",
    "content": "/*\n *\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n)\n\n// UnaryInvoker is called by UnaryClientInterceptor to complete RPCs.\ntype UnaryInvoker func(ctx context.Context, method string, req, reply any, cc *ClientConn, opts ...CallOption) error\n\n// UnaryClientInterceptor intercepts the execution of a unary RPC on the client.\n// Unary interceptors can be specified as a DialOption, using\n// WithUnaryInterceptor() or WithChainUnaryInterceptor(), when creating a\n// ClientConn. When a unary interceptor(s) is set on a ClientConn, gRPC\n// delegates all unary RPC invocations to the interceptor, and it is the\n// responsibility of the interceptor to call invoker to complete the processing\n// of the RPC.\n//\n// method is the RPC name. req and reply are the corresponding request and\n// response messages. cc is the ClientConn on which the RPC was invoked. invoker\n// is the handler to complete the RPC and it is the responsibility of the\n// interceptor to call it. opts contain all applicable call options, including\n// defaults from the ClientConn as well as per-call options.\n//\n// The returned error must be compatible with the status package.\ntype UnaryClientInterceptor func(ctx context.Context, method string, req, reply any, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error\n\n// Streamer is called by StreamClientInterceptor to create a ClientStream.\ntype Streamer func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error)\n\n// StreamClientInterceptor intercepts the creation of a ClientStream. Stream\n// interceptors can be specified as a DialOption, using WithStreamInterceptor()\n// or WithChainStreamInterceptor(), when creating a ClientConn. When a stream\n// interceptor(s) is set on the ClientConn, gRPC delegates all stream creations\n// to the interceptor, and it is the responsibility of the interceptor to call\n// streamer.\n//\n// desc contains a description of the stream. cc is the ClientConn on which the\n// RPC was invoked. streamer is the handler to create a ClientStream and it is\n// the responsibility of the interceptor to call it. opts contain all applicable\n// call options, including defaults from the ClientConn as well as per-call\n// options.\n//\n// StreamClientInterceptor may return a custom ClientStream to intercept all I/O\n// operations. The returned error must be compatible with the status package.\ntype StreamClientInterceptor func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error)\n\n// UnaryServerInfo consists of various information about a unary RPC on\n// server side. All per-rpc information may be mutated by the interceptor.\ntype UnaryServerInfo struct {\n\t// Server is the service implementation the user provides. This is read-only.\n\tServer any\n\t// FullMethod is the full RPC method string, i.e., /package.service/method.\n\tFullMethod string\n}\n\n// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal\n// execution of a unary RPC.\n//\n// If a UnaryHandler returns an error, it should either be produced by the\n// status package, or be one of the context errors. Otherwise, gRPC will use\n// codes.Unknown as the status code and err.Error() as the status message of the\n// RPC.\ntype UnaryHandler func(ctx context.Context, req any) (any, error)\n\n// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info\n// contains all the information of this RPC the interceptor can operate on. And handler is the wrapper\n// of the service method implementation. It is the responsibility of the interceptor to invoke handler\n// to complete the RPC.\ntype UnaryServerInterceptor func(ctx context.Context, req any, info *UnaryServerInfo, handler UnaryHandler) (resp any, err error)\n\n// StreamServerInfo consists of various information about a streaming RPC on\n// server side. All per-rpc information may be mutated by the interceptor.\ntype StreamServerInfo struct {\n\t// FullMethod is the full RPC method string, i.e., /package.service/method.\n\tFullMethod string\n\t// IsClientStream indicates whether the RPC is a client streaming RPC.\n\tIsClientStream bool\n\t// IsServerStream indicates whether the RPC is a server streaming RPC.\n\tIsServerStream bool\n}\n\n// StreamServerInterceptor provides a hook to intercept the execution of a streaming RPC on the server.\n// info contains all the information of this RPC the interceptor can operate on. And handler is the\n// service method implementation. It is the responsibility of the interceptor to invoke handler to\n// complete the RPC.\ntype StreamServerInterceptor func(srv any, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/backoff/backoff.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package backoff implement the backoff strategy for gRPC.\n//\n// This is kept in internal until the gRPC project decides whether or not to\n// allow alternative backoff strategies.\npackage backoff\n\nimport (\n\t\"context\"\n\t\"errors\"\n\trand \"math/rand/v2\"\n\t\"time\"\n\n\tgrpcbackoff \"google.golang.org/grpc/backoff\"\n)\n\n// Strategy defines the methodology for backing off after a grpc connection\n// failure.\ntype Strategy interface {\n\t// Backoff returns the amount of time to wait before the next retry given\n\t// the number of consecutive failures.\n\tBackoff(retries int) time.Duration\n}\n\n// DefaultExponential is an exponential backoff implementation using the\n// default values for all the configurable knobs defined in\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\nvar DefaultExponential = Exponential{Config: grpcbackoff.DefaultConfig}\n\n// Exponential implements exponential backoff algorithm as defined in\n// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.\ntype Exponential struct {\n\t// Config contains all options to configure the backoff algorithm.\n\tConfig grpcbackoff.Config\n}\n\n// Backoff returns the amount of time to wait before the next retry given the\n// number of retries.\nfunc (bc Exponential) Backoff(retries int) time.Duration {\n\tif retries == 0 {\n\t\treturn bc.Config.BaseDelay\n\t}\n\tbackoff, max := float64(bc.Config.BaseDelay), float64(bc.Config.MaxDelay)\n\tfor backoff < max && retries > 0 {\n\t\tbackoff *= bc.Config.Multiplier\n\t\tretries--\n\t}\n\tif backoff > max {\n\t\tbackoff = max\n\t}\n\t// Randomize backoff delays so that if a cluster of requests start at\n\t// the same time, they won't operate in lockstep.\n\tbackoff *= 1 + bc.Config.Jitter*(rand.Float64()*2-1)\n\tif backoff < 0 {\n\t\treturn 0\n\t}\n\treturn time.Duration(backoff)\n}\n\n// ErrResetBackoff is the error to be returned by the function executed by RunF,\n// to instruct the latter to reset its backoff state.\nvar ErrResetBackoff = errors.New(\"reset backoff state\")\n\n// RunF provides a convenient way to run a function f repeatedly until the\n// context expires or f returns a non-nil error that is not ErrResetBackoff.\n// When f returns ErrResetBackoff, RunF continues to run f, but resets its\n// backoff state before doing so. backoff accepts an integer representing the\n// number of retries, and returns the amount of time to backoff.\nfunc RunF(ctx context.Context, f func() error, backoff func(int) time.Duration) {\n\tattempt := 0\n\ttimer := time.NewTimer(0)\n\tfor ctx.Err() == nil {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\tcase <-ctx.Done():\n\t\t\ttimer.Stop()\n\t\t\treturn\n\t\t}\n\n\t\terr := f()\n\t\tif errors.Is(err, ErrResetBackoff) {\n\t\t\ttimer.Reset(0)\n\t\t\tattempt = 0\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\ttimer.Reset(backoff(attempt))\n\t\tattempt++\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage gracefulswitch\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\ntype lbConfig struct {\n\tserviceconfig.LoadBalancingConfig\n\n\tchildBuilder balancer.Builder\n\tchildConfig  serviceconfig.LoadBalancingConfig\n}\n\n// ChildName returns the name of the child balancer of the gracefulswitch\n// Balancer.\nfunc ChildName(l serviceconfig.LoadBalancingConfig) string {\n\treturn l.(*lbConfig).childBuilder.Name()\n}\n\n// ParseConfig parses a child config list and returns a LB config for the\n// gracefulswitch Balancer.\n//\n// cfg is expected to be a json.RawMessage containing a JSON array of LB policy\n// names + configs as the format of the \"loadBalancingConfig\" field in\n// ServiceConfig.  It returns a type that should be passed to\n// UpdateClientConnState in the BalancerConfig field.\nfunc ParseConfig(cfg json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {\n\tvar lbCfg []map[string]json.RawMessage\n\tif err := json.Unmarshal(cfg, &lbCfg); err != nil {\n\t\treturn nil, err\n\t}\n\tfor i, e := range lbCfg {\n\t\tif len(e) != 1 {\n\t\t\treturn nil, fmt.Errorf(\"expected a JSON struct with one entry; received entry %v at index %d\", e, i)\n\t\t}\n\n\t\tvar name string\n\t\tvar jsonCfg json.RawMessage\n\t\tfor name, jsonCfg = range e {\n\t\t}\n\n\t\tbuilder := balancer.Get(name)\n\t\tif builder == nil {\n\t\t\t// Skip unregistered balancer names.\n\t\t\tcontinue\n\t\t}\n\n\t\tparser, ok := builder.(balancer.ConfigParser)\n\t\tif !ok {\n\t\t\t// This is a valid child with no config.\n\t\t\treturn &lbConfig{childBuilder: builder}, nil\n\t\t}\n\n\t\tcfg, err := parser.ParseConfig(jsonCfg)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing config for policy %q: %v\", name, err)\n\t\t}\n\t\treturn &lbConfig{childBuilder: builder, childConfig: cfg}, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"no supported policies found in config: %v\", string(cfg))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go",
    "content": "/*\n *\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package gracefulswitch implements a graceful switch load balancer.\npackage gracefulswitch\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/base\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\nvar errBalancerClosed = errors.New(\"gracefulSwitchBalancer is closed\")\nvar _ balancer.Balancer = (*Balancer)(nil)\n\n// NewBalancer returns a graceful switch Balancer.\nfunc NewBalancer(cc balancer.ClientConn, opts balancer.BuildOptions) *Balancer {\n\treturn &Balancer{\n\t\tcc:    cc,\n\t\tbOpts: opts,\n\t}\n}\n\n// Balancer is a utility to gracefully switch from one balancer to\n// a new balancer. It implements the balancer.Balancer interface.\ntype Balancer struct {\n\tbOpts balancer.BuildOptions\n\tcc    balancer.ClientConn\n\n\t// mu protects the following fields and all fields within balancerCurrent\n\t// and balancerPending. mu does not need to be held when calling into the\n\t// child balancers, as all calls into these children happen only as a direct\n\t// result of a call into the gracefulSwitchBalancer, which are also\n\t// guaranteed to be synchronous. There is one exception: an UpdateState call\n\t// from a child balancer when current and pending are populated can lead to\n\t// calling Close() on the current. To prevent that racing with an\n\t// UpdateSubConnState from the channel, we hold currentMu during Close and\n\t// UpdateSubConnState calls.\n\tmu              sync.Mutex\n\tbalancerCurrent *balancerWrapper\n\tbalancerPending *balancerWrapper\n\tclosed          bool // set to true when this balancer is closed\n\n\t// currentMu must be locked before mu. This mutex guards against this\n\t// sequence of events: UpdateSubConnState() called, finds the\n\t// balancerCurrent, gives up lock, updateState comes in, causes Close() on\n\t// balancerCurrent before the UpdateSubConnState is called on the\n\t// balancerCurrent.\n\tcurrentMu sync.Mutex\n\n\t// activeGoroutines tracks all the goroutines that this balancer has started\n\t// and that should be waited on when the balancer closes.\n\tactiveGoroutines sync.WaitGroup\n}\n\n// swap swaps out the current lb with the pending lb and updates the ClientConn.\n// The caller must hold gsb.mu.\nfunc (gsb *Balancer) swap() {\n\tgsb.cc.UpdateState(gsb.balancerPending.lastState)\n\tcur := gsb.balancerCurrent\n\tgsb.balancerCurrent = gsb.balancerPending\n\tgsb.balancerPending = nil\n\tgsb.activeGoroutines.Add(1)\n\tgo func() {\n\t\tdefer gsb.activeGoroutines.Done()\n\t\tgsb.currentMu.Lock()\n\t\tdefer gsb.currentMu.Unlock()\n\t\tcur.Close()\n\t}()\n}\n\n// Helper function that checks if the balancer passed in is current or pending.\n// The caller must hold gsb.mu.\nfunc (gsb *Balancer) balancerCurrentOrPending(bw *balancerWrapper) bool {\n\treturn bw == gsb.balancerCurrent || bw == gsb.balancerPending\n}\n\n// SwitchTo initializes the graceful switch process, which completes based on\n// connectivity state changes on the current/pending balancer. Thus, the switch\n// process is not complete when this method returns. This method must be called\n// synchronously alongside the rest of the balancer.Balancer methods this\n// Graceful Switch Balancer implements.\n//\n// Deprecated: use ParseConfig and pass a parsed config to UpdateClientConnState\n// to cause the Balancer to automatically change to the new child when necessary.\nfunc (gsb *Balancer) SwitchTo(builder balancer.Builder) error {\n\t_, err := gsb.switchTo(builder)\n\treturn err\n}\n\nfunc (gsb *Balancer) switchTo(builder balancer.Builder) (*balancerWrapper, error) {\n\tgsb.mu.Lock()\n\tif gsb.closed {\n\t\tgsb.mu.Unlock()\n\t\treturn nil, errBalancerClosed\n\t}\n\tbw := &balancerWrapper{\n\t\tClientConn: gsb.cc,\n\t\tbuilder:    builder,\n\t\tgsb:        gsb,\n\t\tlastState: balancer.State{\n\t\t\tConnectivityState: connectivity.Connecting,\n\t\t\tPicker:            base.NewErrPicker(balancer.ErrNoSubConnAvailable),\n\t\t},\n\t\tsubconns: make(map[balancer.SubConn]bool),\n\t}\n\tbalToClose := gsb.balancerPending // nil if there is no pending balancer\n\tif gsb.balancerCurrent == nil {\n\t\tgsb.balancerCurrent = bw\n\t} else {\n\t\tgsb.balancerPending = bw\n\t}\n\tgsb.mu.Unlock()\n\tbalToClose.Close()\n\t// This function takes a builder instead of a balancer because builder.Build\n\t// can call back inline, and this utility needs to handle the callbacks.\n\tnewBalancer := builder.Build(bw, gsb.bOpts)\n\tif newBalancer == nil {\n\t\t// This is illegal and should never happen; we clear the balancerWrapper\n\t\t// we were constructing if it happens to avoid a potential panic.\n\t\tgsb.mu.Lock()\n\t\tif gsb.balancerPending != nil {\n\t\t\tgsb.balancerPending = nil\n\t\t} else {\n\t\t\tgsb.balancerCurrent = nil\n\t\t}\n\t\tgsb.mu.Unlock()\n\t\treturn nil, balancer.ErrBadResolverState\n\t}\n\n\t// This write doesn't need to take gsb.mu because this field never gets read\n\t// or written to on any calls from the current or pending. Calls from grpc\n\t// to this balancer are guaranteed to be called synchronously, so this\n\t// bw.Balancer field will never be forwarded to until this SwitchTo()\n\t// function returns.\n\tbw.Balancer = newBalancer\n\treturn bw, nil\n}\n\n// Returns nil if the graceful switch balancer is closed.\nfunc (gsb *Balancer) latestBalancer() *balancerWrapper {\n\tgsb.mu.Lock()\n\tdefer gsb.mu.Unlock()\n\tif gsb.balancerPending != nil {\n\t\treturn gsb.balancerPending\n\t}\n\treturn gsb.balancerCurrent\n}\n\n// UpdateClientConnState forwards the update to the latest balancer created.\n//\n// If the state's BalancerConfig is the config returned by a call to\n// gracefulswitch.ParseConfig, then this function will automatically SwitchTo\n// the balancer indicated by the config before forwarding its config to it, if\n// necessary.\nfunc (gsb *Balancer) UpdateClientConnState(state balancer.ClientConnState) error {\n\t// The resolver data is only relevant to the most recent LB Policy.\n\tbalToUpdate := gsb.latestBalancer()\n\tgsbCfg, ok := state.BalancerConfig.(*lbConfig)\n\tif ok {\n\t\t// Switch to the child in the config unless it is already active.\n\t\tif balToUpdate == nil || gsbCfg.childBuilder.Name() != balToUpdate.builder.Name() {\n\t\t\tvar err error\n\t\t\tbalToUpdate, err = gsb.switchTo(gsbCfg.childBuilder)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not switch to new child balancer: %w\", err)\n\t\t\t}\n\t\t}\n\t\t// Unwrap the child balancer's config.\n\t\tstate.BalancerConfig = gsbCfg.childConfig\n\t}\n\n\tif balToUpdate == nil {\n\t\treturn errBalancerClosed\n\t}\n\n\t// Perform this call without gsb.mu to prevent deadlocks if the child calls\n\t// back into the channel. The latest balancer can never be closed during a\n\t// call from the channel, even without gsb.mu held.\n\treturn balToUpdate.UpdateClientConnState(state)\n}\n\n// ResolverError forwards the error to the latest balancer created.\nfunc (gsb *Balancer) ResolverError(err error) {\n\t// The resolver data is only relevant to the most recent LB Policy.\n\tbalToUpdate := gsb.latestBalancer()\n\tif balToUpdate == nil {\n\t\tgsb.cc.UpdateState(balancer.State{\n\t\t\tConnectivityState: connectivity.TransientFailure,\n\t\t\tPicker:            base.NewErrPicker(err),\n\t\t})\n\t\treturn\n\t}\n\t// Perform this call without gsb.mu to prevent deadlocks if the child calls\n\t// back into the channel. The latest balancer can never be closed during a\n\t// call from the channel, even without gsb.mu held.\n\tbalToUpdate.ResolverError(err)\n}\n\n// ExitIdle forwards the call to the latest balancer created.\n//\n// If the latest balancer does not support ExitIdle, the subConns are\n// re-connected to manually.\nfunc (gsb *Balancer) ExitIdle() {\n\tbalToUpdate := gsb.latestBalancer()\n\tif balToUpdate == nil {\n\t\treturn\n\t}\n\t// There is no need to protect this read with a mutex, as the write to the\n\t// Balancer field happens in SwitchTo, which completes before this can be\n\t// called.\n\tbalToUpdate.ExitIdle()\n}\n\n// updateSubConnState forwards the update to the appropriate child.\nfunc (gsb *Balancer) updateSubConnState(sc balancer.SubConn, state balancer.SubConnState, cb func(balancer.SubConnState)) {\n\tgsb.currentMu.Lock()\n\tdefer gsb.currentMu.Unlock()\n\tgsb.mu.Lock()\n\t// Forward update to the appropriate child.  Even if there is a pending\n\t// balancer, the current balancer should continue to get SubConn updates to\n\t// maintain the proper state while the pending is still connecting.\n\tvar balToUpdate *balancerWrapper\n\tif gsb.balancerCurrent != nil && gsb.balancerCurrent.subconns[sc] {\n\t\tbalToUpdate = gsb.balancerCurrent\n\t} else if gsb.balancerPending != nil && gsb.balancerPending.subconns[sc] {\n\t\tbalToUpdate = gsb.balancerPending\n\t}\n\tif balToUpdate == nil {\n\t\t// SubConn belonged to a stale lb policy that has not yet fully closed,\n\t\t// or the balancer was already closed.\n\t\tgsb.mu.Unlock()\n\t\treturn\n\t}\n\tif state.ConnectivityState == connectivity.Shutdown {\n\t\tdelete(balToUpdate.subconns, sc)\n\t}\n\tgsb.mu.Unlock()\n\tif cb != nil {\n\t\tcb(state)\n\t} else {\n\t\tbalToUpdate.UpdateSubConnState(sc, state)\n\t}\n}\n\n// UpdateSubConnState forwards the update to the appropriate child.\nfunc (gsb *Balancer) UpdateSubConnState(sc balancer.SubConn, state balancer.SubConnState) {\n\tgsb.updateSubConnState(sc, state, nil)\n}\n\n// Close closes any active child balancers.\nfunc (gsb *Balancer) Close() {\n\tgsb.mu.Lock()\n\tgsb.closed = true\n\tcurrentBalancerToClose := gsb.balancerCurrent\n\tgsb.balancerCurrent = nil\n\tpendingBalancerToClose := gsb.balancerPending\n\tgsb.balancerPending = nil\n\tgsb.mu.Unlock()\n\n\tcurrentBalancerToClose.Close()\n\tpendingBalancerToClose.Close()\n\tgsb.activeGoroutines.Wait()\n}\n\n// balancerWrapper wraps a balancer.Balancer, and overrides some Balancer\n// methods to help cleanup SubConns created by the wrapped balancer.\n//\n// It implements the balancer.ClientConn interface and is passed down in that\n// capacity to the wrapped balancer. It maintains a set of subConns created by\n// the wrapped balancer and calls from the latter to create/update/shutdown\n// SubConns update this set before being forwarded to the parent ClientConn.\n// State updates from the wrapped balancer can result in invocation of the\n// graceful switch logic.\ntype balancerWrapper struct {\n\tbalancer.ClientConn\n\tbalancer.Balancer\n\tgsb     *Balancer\n\tbuilder balancer.Builder\n\n\tlastState balancer.State\n\tsubconns  map[balancer.SubConn]bool // subconns created by this balancer\n}\n\n// Close closes the underlying LB policy and shuts down the subconns it\n// created. bw must not be referenced via balancerCurrent or balancerPending in\n// gsb when called. gsb.mu must not be held.  Does not panic with a nil\n// receiver.\nfunc (bw *balancerWrapper) Close() {\n\t// before Close is called.\n\tif bw == nil {\n\t\treturn\n\t}\n\t// There is no need to protect this read with a mutex, as Close() is\n\t// impossible to be called concurrently with the write in SwitchTo(). The\n\t// callsites of Close() for this balancer in Graceful Switch Balancer will\n\t// never be called until SwitchTo() returns.\n\tbw.Balancer.Close()\n\tbw.gsb.mu.Lock()\n\tfor sc := range bw.subconns {\n\t\tsc.Shutdown()\n\t}\n\tbw.gsb.mu.Unlock()\n}\n\nfunc (bw *balancerWrapper) UpdateState(state balancer.State) {\n\t// Hold the mutex for this entire call to ensure it cannot occur\n\t// concurrently with other updateState() calls. This causes updates to\n\t// lastState and calls to cc.UpdateState to happen atomically.\n\tbw.gsb.mu.Lock()\n\tdefer bw.gsb.mu.Unlock()\n\tbw.lastState = state\n\n\t// If Close() acquires the mutex before UpdateState(), the balancer\n\t// will already have been removed from the current or pending state when\n\t// reaching this point.\n\tif !bw.gsb.balancerCurrentOrPending(bw) {\n\t\t// Returning here ensures that (*Balancer).swap() is not invoked after\n\t\t// (*Balancer).Close() and therefore prevents \"use after close\".\n\t\treturn\n\t}\n\n\tif bw == bw.gsb.balancerCurrent {\n\t\t// In the case that the current balancer exits READY, and there is a pending\n\t\t// balancer, you can forward the pending balancer's cached State up to\n\t\t// ClientConn and swap the pending into the current. This is because there\n\t\t// is no reason to gracefully switch from and keep using the old policy as\n\t\t// the ClientConn is not connected to any backends.\n\t\tif state.ConnectivityState != connectivity.Ready && bw.gsb.balancerPending != nil {\n\t\t\tbw.gsb.swap()\n\t\t\treturn\n\t\t}\n\t\t// Even if there is a pending balancer waiting to be gracefully switched to,\n\t\t// continue to forward current balancer updates to the Client Conn. Ignoring\n\t\t// state + picker from the current would cause undefined behavior/cause the\n\t\t// system to behave incorrectly from the current LB policies perspective.\n\t\t// Also, the current LB is still being used by grpc to choose SubConns per\n\t\t// RPC, and thus should use the most updated form of the current balancer.\n\t\tbw.gsb.cc.UpdateState(state)\n\t\treturn\n\t}\n\t// This method is now dealing with a state update from the pending balancer.\n\t// If the current balancer is currently in a state other than READY, the new\n\t// policy can be swapped into place immediately. This is because there is no\n\t// reason to gracefully switch from and keep using the old policy as the\n\t// ClientConn is not connected to any backends.\n\tif state.ConnectivityState != connectivity.Connecting || bw.gsb.balancerCurrent.lastState.ConnectivityState != connectivity.Ready {\n\t\tbw.gsb.swap()\n\t}\n}\n\nfunc (bw *balancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) {\n\tbw.gsb.mu.Lock()\n\tif !bw.gsb.balancerCurrentOrPending(bw) {\n\t\tbw.gsb.mu.Unlock()\n\t\treturn nil, fmt.Errorf(\"%T at address %p that called NewSubConn is deleted\", bw, bw)\n\t}\n\tbw.gsb.mu.Unlock()\n\n\tvar sc balancer.SubConn\n\toldListener := opts.StateListener\n\topts.StateListener = func(state balancer.SubConnState) { bw.gsb.updateSubConnState(sc, state, oldListener) }\n\tsc, err := bw.gsb.cc.NewSubConn(addrs, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbw.gsb.mu.Lock()\n\tif !bw.gsb.balancerCurrentOrPending(bw) { // balancer was closed during this call\n\t\tsc.Shutdown()\n\t\tbw.gsb.mu.Unlock()\n\t\treturn nil, fmt.Errorf(\"%T at address %p that called NewSubConn is deleted\", bw, bw)\n\t}\n\tbw.subconns[sc] = true\n\tbw.gsb.mu.Unlock()\n\treturn sc, nil\n}\n\nfunc (bw *balancerWrapper) ResolveNow(opts resolver.ResolveNowOptions) {\n\t// Ignore ResolveNow requests from anything other than the most recent\n\t// balancer, because older balancers were already removed from the config.\n\tif bw != bw.gsb.latestBalancer() {\n\t\treturn\n\t}\n\tbw.gsb.cc.ResolveNow(opts)\n}\n\nfunc (bw *balancerWrapper) RemoveSubConn(sc balancer.SubConn) {\n\t// Note: existing third party balancers may call this, so it must remain\n\t// until RemoveSubConn is fully removed.\n\tsc.Shutdown()\n}\n\nfunc (bw *balancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) {\n\tbw.gsb.mu.Lock()\n\tif !bw.gsb.balancerCurrentOrPending(bw) {\n\t\tbw.gsb.mu.Unlock()\n\t\treturn\n\t}\n\tbw.gsb.mu.Unlock()\n\tbw.gsb.cc.UpdateAddresses(sc, addrs)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/balancerload/load.go",
    "content": "/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Package balancerload defines APIs to parse server loads in trailers. The\n// parsed loads are sent to balancers in DoneInfo.\npackage balancerload\n\nimport (\n\t\"google.golang.org/grpc/metadata\"\n)\n\n// Parser converts loads from metadata into a concrete type.\ntype Parser interface {\n\t// Parse parses loads from metadata.\n\tParse(md metadata.MD) any\n}\n\nvar parser Parser\n\n// SetParser sets the load parser.\n//\n// Not mutex-protected, should be called before any gRPC functions.\nfunc SetParser(lr Parser) {\n\tparser = lr\n}\n\n// Parse calls parser.Read().\nfunc Parse(md metadata.MD) any {\n\tif parser == nil {\n\t\treturn nil\n\t}\n\treturn parser.Parse(md)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/binarylog/binarylog.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package binarylog implementation binary logging as defined in\n// https://github.com/grpc/proposal/blob/master/A16-binary-logging.md.\npackage binarylog\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n)\n\nvar grpclogLogger = grpclog.Component(\"binarylog\")\n\n// Logger specifies MethodLoggers for method names with a Log call that\n// takes a context.\n//\n// This is used in the 1.0 release of gcp/observability, and thus must not be\n// deleted or changed.\ntype Logger interface {\n\tGetMethodLogger(methodName string) MethodLogger\n}\n\n// binLogger is the global binary logger for the binary. One of this should be\n// built at init time from the configuration (environment variable or flags).\n//\n// It is used to get a MethodLogger for each individual method.\nvar binLogger Logger\n\n// SetLogger sets the binary logger.\n//\n// Only call this at init time.\nfunc SetLogger(l Logger) {\n\tbinLogger = l\n}\n\n// GetLogger gets the binary logger.\n//\n// Only call this at init time.\nfunc GetLogger() Logger {\n\treturn binLogger\n}\n\n// GetMethodLogger returns the MethodLogger for the given methodName.\n//\n// methodName should be in the format of \"/service/method\".\n//\n// Each MethodLogger returned by this method is a new instance. This is to\n// generate sequence id within the call.\nfunc GetMethodLogger(methodName string) MethodLogger {\n\tif binLogger == nil {\n\t\treturn nil\n\t}\n\treturn binLogger.GetMethodLogger(methodName)\n}\n\nfunc init() {\n\tconst envStr = \"GRPC_BINARY_LOG_FILTER\"\n\tconfigStr := os.Getenv(envStr)\n\tbinLogger = NewLoggerFromConfigString(configStr)\n}\n\n// MethodLoggerConfig contains the setting for logging behavior of a method\n// logger. Currently, it contains the max length of header and message.\ntype MethodLoggerConfig struct {\n\t// Max length of header and message.\n\tHeader, Message uint64\n}\n\n// LoggerConfig contains the config for loggers to create method loggers.\ntype LoggerConfig struct {\n\tAll      *MethodLoggerConfig\n\tServices map[string]*MethodLoggerConfig\n\tMethods  map[string]*MethodLoggerConfig\n\n\tBlacklist map[string]struct{}\n}\n\ntype logger struct {\n\tconfig LoggerConfig\n}\n\n// NewLoggerFromConfig builds a logger with the given LoggerConfig.\nfunc NewLoggerFromConfig(config LoggerConfig) Logger {\n\treturn &logger{config: config}\n}\n\n// newEmptyLogger creates an empty logger. The map fields need to be filled in\n// using the set* functions.\nfunc newEmptyLogger() *logger {\n\treturn &logger{}\n}\n\n// Set method logger for \"*\".\nfunc (l *logger) setDefaultMethodLogger(ml *MethodLoggerConfig) error {\n\tif l.config.All != nil {\n\t\treturn fmt.Errorf(\"conflicting global rules found\")\n\t}\n\tl.config.All = ml\n\treturn nil\n}\n\n// Set method logger for \"service/*\".\n//\n// New MethodLogger with same service overrides the old one.\nfunc (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig) error {\n\tif _, ok := l.config.Services[service]; ok {\n\t\treturn fmt.Errorf(\"conflicting service rules for service %v found\", service)\n\t}\n\tif l.config.Services == nil {\n\t\tl.config.Services = make(map[string]*MethodLoggerConfig)\n\t}\n\tl.config.Services[service] = ml\n\treturn nil\n}\n\n// Set method logger for \"service/method\".\n//\n// New MethodLogger with same method overrides the old one.\nfunc (l *logger) setMethodMethodLogger(method string, ml *MethodLoggerConfig) error {\n\tif _, ok := l.config.Blacklist[method]; ok {\n\t\treturn fmt.Errorf(\"conflicting blacklist rules for method %v found\", method)\n\t}\n\tif _, ok := l.config.Methods[method]; ok {\n\t\treturn fmt.Errorf(\"conflicting method rules for method %v found\", method)\n\t}\n\tif l.config.Methods == nil {\n\t\tl.config.Methods = make(map[string]*MethodLoggerConfig)\n\t}\n\tl.config.Methods[method] = ml\n\treturn nil\n}\n\n// Set blacklist method for \"-service/method\".\nfunc (l *logger) setBlacklist(method string) error {\n\tif _, ok := l.config.Blacklist[method]; ok {\n\t\treturn fmt.Errorf(\"conflicting blacklist rules for method %v found\", method)\n\t}\n\tif _, ok := l.config.Methods[method]; ok {\n\t\treturn fmt.Errorf(\"conflicting method rules for method %v found\", method)\n\t}\n\tif l.config.Blacklist == nil {\n\t\tl.config.Blacklist = make(map[string]struct{})\n\t}\n\tl.config.Blacklist[method] = struct{}{}\n\treturn nil\n}\n\n// getMethodLogger returns the MethodLogger for the given methodName.\n//\n// methodName should be in the format of \"/service/method\".\n//\n// Each MethodLogger returned by this method is a new instance. This is to\n// generate sequence id within the call.\nfunc (l *logger) GetMethodLogger(methodName string) MethodLogger {\n\ts, m, err := grpcutil.ParseMethod(methodName)\n\tif err != nil {\n\t\tgrpclogLogger.Infof(\"binarylogging: failed to parse %q: %v\", methodName, err)\n\t\treturn nil\n\t}\n\tif ml, ok := l.config.Methods[s+\"/\"+m]; ok {\n\t\treturn NewTruncatingMethodLogger(ml.Header, ml.Message)\n\t}\n\tif _, ok := l.config.Blacklist[s+\"/\"+m]; ok {\n\t\treturn nil\n\t}\n\tif ml, ok := l.config.Services[s]; ok {\n\t\treturn NewTruncatingMethodLogger(ml.Header, ml.Message)\n\t}\n\tif l.config.All == nil {\n\t\treturn nil\n\t}\n\treturn NewTruncatingMethodLogger(l.config.All.Header, l.config.All.Message)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/binarylog/binarylog_testutil.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 exported variables/functions that are exported for testing\n// only.\n//\n// An ideal way for this would be to put those in a *_test.go but in binarylog\n// package. But this doesn't work with staticcheck with go module. Error was:\n// \"MdToMetadataProto not declared by package binarylog\". This could be caused\n// by the way staticcheck looks for files for a certain package, which doesn't\n// support *_test.go files.\n//\n// Move those to binary_test.go when staticcheck is fixed.\n\npackage binarylog\n\nvar (\n\t// AllLogger is a logger that logs all headers/messages for all RPCs. It's\n\t// for testing only.\n\tAllLogger = NewLoggerFromConfigString(\"*\")\n\t// MdToMetadataProto converts metadata to a binary logging proto message.\n\t// It's for testing only.\n\tMdToMetadataProto = mdToMetadataProto\n\t// AddrToProto converts an address to a binary logging proto message. It's\n\t// for testing only.\n\tAddrToProto = addrToProto\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/binarylog/env_config.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage binarylog\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// NewLoggerFromConfigString reads the string and build a logger. It can be used\n// to build a new logger and assign it to binarylog.Logger.\n//\n// Example filter config strings:\n//   - \"\" Nothing will be logged\n//   - \"*\" All headers and messages will be fully logged.\n//   - \"*{h}\" Only headers will be logged.\n//   - \"*{m:256}\" Only the first 256 bytes of each message will be logged.\n//   - \"Foo/*\" Logs every method in service Foo\n//   - \"Foo/*,-Foo/Bar\" Logs every method in service Foo except method /Foo/Bar\n//   - \"Foo/*,Foo/Bar{m:256}\" Logs the first 256 bytes of each message in method\n//     /Foo/Bar, logs all headers and messages in every other method in service\n//     Foo.\n//\n// If two configs exist for one certain method or service, the one specified\n// later overrides the previous config.\nfunc NewLoggerFromConfigString(s string) Logger {\n\tif s == \"\" {\n\t\treturn nil\n\t}\n\tl := newEmptyLogger()\n\tmethods := strings.Split(s, \",\")\n\tfor _, method := range methods {\n\t\tif err := l.fillMethodLoggerWithConfigString(method); err != nil {\n\t\t\tgrpclogLogger.Warningf(\"failed to parse binary log config: %v\", err)\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn l\n}\n\n// fillMethodLoggerWithConfigString parses config, creates TruncatingMethodLogger and adds\n// it to the right map in the logger.\nfunc (l *logger) fillMethodLoggerWithConfigString(config string) error {\n\t// \"\" is invalid.\n\tif config == \"\" {\n\t\treturn errors.New(\"empty string is not a valid method binary logging config\")\n\t}\n\n\t// \"-service/method\", blacklist, no * or {} allowed.\n\tif config[0] == '-' {\n\t\ts, m, suffix, err := parseMethodConfigAndSuffix(config[1:])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %q, %v\", config, err)\n\t\t}\n\t\tif m == \"*\" {\n\t\t\treturn fmt.Errorf(\"invalid config: %q, %v\", config, \"* not allowed in blacklist config\")\n\t\t}\n\t\tif suffix != \"\" {\n\t\t\treturn fmt.Errorf(\"invalid config: %q, %v\", config, \"header/message limit not allowed in blacklist config\")\n\t\t}\n\t\tif err := l.setBlacklist(s + \"/\" + m); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %v\", err)\n\t\t}\n\t\treturn nil\n\t}\n\n\t// \"*{h:256;m:256}\"\n\tif config[0] == '*' {\n\t\thdr, msg, err := parseHeaderMessageLengthConfig(config[1:])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %q, %v\", config, err)\n\t\t}\n\t\tif err := l.setDefaultMethodLogger(&MethodLoggerConfig{Header: hdr, Message: msg}); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %v\", err)\n\t\t}\n\t\treturn nil\n\t}\n\n\ts, m, suffix, err := parseMethodConfigAndSuffix(config)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid config: %q, %v\", config, err)\n\t}\n\thdr, msg, err := parseHeaderMessageLengthConfig(suffix)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid header/message length config: %q, %v\", suffix, err)\n\t}\n\tif m == \"*\" {\n\t\tif err := l.setServiceMethodLogger(s, &MethodLoggerConfig{Header: hdr, Message: msg}); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %v\", err)\n\t\t}\n\t} else {\n\t\tif err := l.setMethodMethodLogger(s+\"/\"+m, &MethodLoggerConfig{Header: hdr, Message: msg}); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid config: %v\", err)\n\t\t}\n\t}\n\treturn nil\n}\n\nconst (\n\t// TODO: this const is only used by env_config now. But could be useful for\n\t// other config. Move to binarylog.go if necessary.\n\tmaxUInt = ^uint64(0)\n\n\t// For \"p.s/m\" plus any suffix. Suffix will be parsed again. See test for\n\t// expected output.\n\tlongMethodConfigRegexpStr = `^([\\w./]+)/((?:\\w+)|[*])(.+)?$`\n\n\t// For suffix from above, \"{h:123,m:123}\". See test for expected output.\n\toptionalLengthRegexpStr      = `(?::(\\d+))?` // Optional \":123\".\n\theaderConfigRegexpStr        = `^{h` + optionalLengthRegexpStr + `}$`\n\tmessageConfigRegexpStr       = `^{m` + optionalLengthRegexpStr + `}$`\n\theaderMessageConfigRegexpStr = `^{h` + optionalLengthRegexpStr + `;m` + optionalLengthRegexpStr + `}$`\n)\n\nvar (\n\tlongMethodConfigRegexp    = regexp.MustCompile(longMethodConfigRegexpStr)\n\theaderConfigRegexp        = regexp.MustCompile(headerConfigRegexpStr)\n\tmessageConfigRegexp       = regexp.MustCompile(messageConfigRegexpStr)\n\theaderMessageConfigRegexp = regexp.MustCompile(headerMessageConfigRegexpStr)\n)\n\n// Turn \"service/method{h;m}\" into \"service\", \"method\", \"{h;m}\".\nfunc parseMethodConfigAndSuffix(c string) (service, method, suffix string, _ error) {\n\t// Regexp result:\n\t//\n\t// in:  \"p.s/m{h:123,m:123}\",\n\t// out: []string{\"p.s/m{h:123,m:123}\", \"p.s\", \"m\", \"{h:123,m:123}\"},\n\tmatch := longMethodConfigRegexp.FindStringSubmatch(c)\n\tif match == nil {\n\t\treturn \"\", \"\", \"\", fmt.Errorf(\"%q contains invalid substring\", c)\n\t}\n\tservice = match[1]\n\tmethod = match[2]\n\tsuffix = match[3]\n\treturn\n}\n\n// Turn \"{h:123;m:345}\" into 123, 345.\n//\n// Return maxUInt if length is unspecified.\nfunc parseHeaderMessageLengthConfig(c string) (hdrLenStr, msgLenStr uint64, err error) {\n\tif c == \"\" {\n\t\treturn maxUInt, maxUInt, nil\n\t}\n\t// Header config only.\n\tif match := headerConfigRegexp.FindStringSubmatch(c); match != nil {\n\t\tif s := match[1]; s != \"\" {\n\t\t\thdrLenStr, err = strconv.ParseUint(s, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, 0, fmt.Errorf(\"failed to convert %q to uint\", s)\n\t\t\t}\n\t\t\treturn hdrLenStr, 0, nil\n\t\t}\n\t\treturn maxUInt, 0, nil\n\t}\n\n\t// Message config only.\n\tif match := messageConfigRegexp.FindStringSubmatch(c); match != nil {\n\t\tif s := match[1]; s != \"\" {\n\t\t\tmsgLenStr, err = strconv.ParseUint(s, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, 0, fmt.Errorf(\"failed to convert %q to uint\", s)\n\t\t\t}\n\t\t\treturn 0, msgLenStr, nil\n\t\t}\n\t\treturn 0, maxUInt, nil\n\t}\n\n\t// Header and message config both.\n\tif match := headerMessageConfigRegexp.FindStringSubmatch(c); match != nil {\n\t\t// Both hdr and msg are specified, but one or two of them might be empty.\n\t\thdrLenStr = maxUInt\n\t\tmsgLenStr = maxUInt\n\t\tif s := match[1]; s != \"\" {\n\t\t\thdrLenStr, err = strconv.ParseUint(s, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, 0, fmt.Errorf(\"failed to convert %q to uint\", s)\n\t\t\t}\n\t\t}\n\t\tif s := match[2]; s != \"\" {\n\t\t\tmsgLenStr, err = strconv.ParseUint(s, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, 0, fmt.Errorf(\"failed to convert %q to uint\", s)\n\t\t\t}\n\t\t}\n\t\treturn hdrLenStr, msgLenStr, nil\n\t}\n\treturn 0, 0, fmt.Errorf(\"%q contains invalid substring\", c)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/binarylog/method_logger.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage binarylog\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"strings\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\tbinlogpb \"google.golang.org/grpc/binarylog/grpc_binarylog_v1\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/types/known/durationpb\"\n\t\"google.golang.org/protobuf/types/known/timestamppb\"\n)\n\ntype callIDGenerator struct {\n\tid uint64\n}\n\nfunc (g *callIDGenerator) next() uint64 {\n\tid := atomic.AddUint64(&g.id, 1)\n\treturn id\n}\n\n// reset is for testing only, and doesn't need to be thread safe.\nfunc (g *callIDGenerator) reset() {\n\tg.id = 0\n}\n\nvar idGen callIDGenerator\n\n// MethodLogger is the sub-logger for each method.\n//\n// This is used in the 1.0 release of gcp/observability, and thus must not be\n// deleted or changed.\ntype MethodLogger interface {\n\tLog(context.Context, LogEntryConfig)\n}\n\n// TruncatingMethodLogger is a method logger that truncates headers and messages\n// based on configured fields.\ntype TruncatingMethodLogger struct {\n\theaderMaxLen, messageMaxLen uint64\n\n\tcallID          uint64\n\tidWithinCallGen *callIDGenerator\n\n\tsink Sink // TODO(blog): make this pluggable.\n}\n\n// NewTruncatingMethodLogger returns a new truncating method logger.\n//\n// This is used in the 1.0 release of gcp/observability, and thus must not be\n// deleted or changed.\nfunc NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger {\n\treturn &TruncatingMethodLogger{\n\t\theaderMaxLen:  h,\n\t\tmessageMaxLen: m,\n\n\t\tcallID:          idGen.next(),\n\t\tidWithinCallGen: &callIDGenerator{},\n\n\t\tsink: DefaultSink, // TODO(blog): make it pluggable.\n\t}\n}\n\n// Build is an internal only method for building the proto message out of the\n// input event. It's made public to enable other library to reuse as much logic\n// in TruncatingMethodLogger as possible.\nfunc (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry {\n\tm := c.toProto()\n\ttimestamp := timestamppb.Now()\n\tm.Timestamp = timestamp\n\tm.CallId = ml.callID\n\tm.SequenceIdWithinCall = ml.idWithinCallGen.next()\n\n\tswitch pay := m.Payload.(type) {\n\tcase *binlogpb.GrpcLogEntry_ClientHeader:\n\t\tm.PayloadTruncated = ml.truncateMetadata(pay.ClientHeader.GetMetadata())\n\tcase *binlogpb.GrpcLogEntry_ServerHeader:\n\t\tm.PayloadTruncated = ml.truncateMetadata(pay.ServerHeader.GetMetadata())\n\tcase *binlogpb.GrpcLogEntry_Message:\n\t\tm.PayloadTruncated = ml.truncateMessage(pay.Message)\n\t}\n\treturn m\n}\n\n// Log creates a proto binary log entry, and logs it to the sink.\nfunc (ml *TruncatingMethodLogger) Log(_ context.Context, c LogEntryConfig) {\n\tml.sink.Write(ml.Build(c))\n}\n\nfunc (ml *TruncatingMethodLogger) truncateMetadata(mdPb *binlogpb.Metadata) (truncated bool) {\n\tif ml.headerMaxLen == maxUInt {\n\t\treturn false\n\t}\n\tvar (\n\t\tbytesLimit = ml.headerMaxLen\n\t\tindex      int\n\t)\n\t// At the end of the loop, index will be the first entry where the total\n\t// size is greater than the limit:\n\t//\n\t// len(entry[:index]) <= ml.hdr && len(entry[:index+1]) > ml.hdr.\n\tfor ; index < len(mdPb.Entry); index++ {\n\t\tentry := mdPb.Entry[index]\n\t\tif entry.Key == \"grpc-trace-bin\" {\n\t\t\t// \"grpc-trace-bin\" is a special key. It's kept in the log entry,\n\t\t\t// but not counted towards the size limit.\n\t\t\tcontinue\n\t\t}\n\t\tcurrentEntryLen := uint64(len(entry.GetKey())) + uint64(len(entry.GetValue()))\n\t\tif currentEntryLen > bytesLimit {\n\t\t\tbreak\n\t\t}\n\t\tbytesLimit -= currentEntryLen\n\t}\n\ttruncated = index < len(mdPb.Entry)\n\tmdPb.Entry = mdPb.Entry[:index]\n\treturn truncated\n}\n\nfunc (ml *TruncatingMethodLogger) truncateMessage(msgPb *binlogpb.Message) (truncated bool) {\n\tif ml.messageMaxLen == maxUInt {\n\t\treturn false\n\t}\n\tif ml.messageMaxLen >= uint64(len(msgPb.Data)) {\n\t\treturn false\n\t}\n\tmsgPb.Data = msgPb.Data[:ml.messageMaxLen]\n\treturn true\n}\n\n// LogEntryConfig represents the configuration for binary log entry.\n//\n// This is used in the 1.0 release of gcp/observability, and thus must not be\n// deleted or changed.\ntype LogEntryConfig interface {\n\ttoProto() *binlogpb.GrpcLogEntry\n}\n\n// ClientHeader configs the binary log entry to be a ClientHeader entry.\ntype ClientHeader struct {\n\tOnClientSide bool\n\tHeader       metadata.MD\n\tMethodName   string\n\tAuthority    string\n\tTimeout      time.Duration\n\t// PeerAddr is required only when it's on server side.\n\tPeerAddr net.Addr\n}\n\nfunc (c *ClientHeader) toProto() *binlogpb.GrpcLogEntry {\n\t// This function doesn't need to set all the fields (e.g. seq ID). The Log\n\t// function will set the fields when necessary.\n\tclientHeader := &binlogpb.ClientHeader{\n\t\tMetadata:   mdToMetadataProto(c.Header),\n\t\tMethodName: c.MethodName,\n\t\tAuthority:  c.Authority,\n\t}\n\tif c.Timeout > 0 {\n\t\tclientHeader.Timeout = durationpb.New(c.Timeout)\n\t}\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER,\n\t\tPayload: &binlogpb.GrpcLogEntry_ClientHeader{\n\t\t\tClientHeader: clientHeader,\n\t\t},\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\tif c.PeerAddr != nil {\n\t\tret.Peer = addrToProto(c.PeerAddr)\n\t}\n\treturn ret\n}\n\n// ServerHeader configs the binary log entry to be a ServerHeader entry.\ntype ServerHeader struct {\n\tOnClientSide bool\n\tHeader       metadata.MD\n\t// PeerAddr is required only when it's on client side.\n\tPeerAddr net.Addr\n}\n\nfunc (c *ServerHeader) toProto() *binlogpb.GrpcLogEntry {\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER,\n\t\tPayload: &binlogpb.GrpcLogEntry_ServerHeader{\n\t\t\tServerHeader: &binlogpb.ServerHeader{\n\t\t\t\tMetadata: mdToMetadataProto(c.Header),\n\t\t\t},\n\t\t},\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\tif c.PeerAddr != nil {\n\t\tret.Peer = addrToProto(c.PeerAddr)\n\t}\n\treturn ret\n}\n\n// ClientMessage configs the binary log entry to be a ClientMessage entry.\ntype ClientMessage struct {\n\tOnClientSide bool\n\t// Message can be a proto.Message or []byte. Other messages formats are not\n\t// supported.\n\tMessage any\n}\n\nfunc (c *ClientMessage) toProto() *binlogpb.GrpcLogEntry {\n\tvar (\n\t\tdata []byte\n\t\terr  error\n\t)\n\tif m, ok := c.Message.(proto.Message); ok {\n\t\tdata, err = proto.Marshal(m)\n\t\tif err != nil {\n\t\t\tgrpclogLogger.Infof(\"binarylogging: failed to marshal proto message: %v\", err)\n\t\t}\n\t} else if b, ok := c.Message.([]byte); ok {\n\t\tdata = b\n\t} else {\n\t\tgrpclogLogger.Infof(\"binarylogging: message to log is neither proto.message nor []byte\")\n\t}\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE,\n\t\tPayload: &binlogpb.GrpcLogEntry_Message{\n\t\t\tMessage: &binlogpb.Message{\n\t\t\t\tLength: uint32(len(data)),\n\t\t\t\tData:   data,\n\t\t\t},\n\t\t},\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\treturn ret\n}\n\n// ServerMessage configs the binary log entry to be a ServerMessage entry.\ntype ServerMessage struct {\n\tOnClientSide bool\n\t// Message can be a proto.Message or []byte. Other messages formats are not\n\t// supported.\n\tMessage any\n}\n\nfunc (c *ServerMessage) toProto() *binlogpb.GrpcLogEntry {\n\tvar (\n\t\tdata []byte\n\t\terr  error\n\t)\n\tif m, ok := c.Message.(proto.Message); ok {\n\t\tdata, err = proto.Marshal(m)\n\t\tif err != nil {\n\t\t\tgrpclogLogger.Infof(\"binarylogging: failed to marshal proto message: %v\", err)\n\t\t}\n\t} else if b, ok := c.Message.([]byte); ok {\n\t\tdata = b\n\t} else {\n\t\tgrpclogLogger.Infof(\"binarylogging: message to log is neither proto.message nor []byte\")\n\t}\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE,\n\t\tPayload: &binlogpb.GrpcLogEntry_Message{\n\t\t\tMessage: &binlogpb.Message{\n\t\t\t\tLength: uint32(len(data)),\n\t\t\t\tData:   data,\n\t\t\t},\n\t\t},\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\treturn ret\n}\n\n// ClientHalfClose configs the binary log entry to be a ClientHalfClose entry.\ntype ClientHalfClose struct {\n\tOnClientSide bool\n}\n\nfunc (c *ClientHalfClose) toProto() *binlogpb.GrpcLogEntry {\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType:    binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE,\n\t\tPayload: nil, // No payload here.\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\treturn ret\n}\n\n// ServerTrailer configs the binary log entry to be a ServerTrailer entry.\ntype ServerTrailer struct {\n\tOnClientSide bool\n\tTrailer      metadata.MD\n\t// Err is the status error.\n\tErr error\n\t// PeerAddr is required only when it's on client side and the RPC is trailer\n\t// only.\n\tPeerAddr net.Addr\n}\n\nfunc (c *ServerTrailer) toProto() *binlogpb.GrpcLogEntry {\n\tst, ok := status.FromError(c.Err)\n\tif !ok {\n\t\tgrpclogLogger.Info(\"binarylogging: error in trailer is not a status error\")\n\t}\n\tvar (\n\t\tdetailsBytes []byte\n\t\terr          error\n\t)\n\tstProto := st.Proto()\n\tif stProto != nil && len(stProto.Details) != 0 {\n\t\tdetailsBytes, err = proto.Marshal(stProto)\n\t\tif err != nil {\n\t\t\tgrpclogLogger.Infof(\"binarylogging: failed to marshal status proto: %v\", err)\n\t\t}\n\t}\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER,\n\t\tPayload: &binlogpb.GrpcLogEntry_Trailer{\n\t\t\tTrailer: &binlogpb.Trailer{\n\t\t\t\tMetadata:      mdToMetadataProto(c.Trailer),\n\t\t\t\tStatusCode:    uint32(st.Code()),\n\t\t\t\tStatusMessage: st.Message(),\n\t\t\t\tStatusDetails: detailsBytes,\n\t\t\t},\n\t\t},\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\tif c.PeerAddr != nil {\n\t\tret.Peer = addrToProto(c.PeerAddr)\n\t}\n\treturn ret\n}\n\n// Cancel configs the binary log entry to be a Cancel entry.\ntype Cancel struct {\n\tOnClientSide bool\n}\n\nfunc (c *Cancel) toProto() *binlogpb.GrpcLogEntry {\n\tret := &binlogpb.GrpcLogEntry{\n\t\tType:    binlogpb.GrpcLogEntry_EVENT_TYPE_CANCEL,\n\t\tPayload: nil,\n\t}\n\tif c.OnClientSide {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT\n\t} else {\n\t\tret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER\n\t}\n\treturn ret\n}\n\n// metadataKeyOmit returns whether the metadata entry with this key should be\n// omitted.\nfunc metadataKeyOmit(key string) bool {\n\tswitch key {\n\tcase \"lb-token\", \":path\", \":authority\", \"content-encoding\", \"content-type\", \"user-agent\", \"te\":\n\t\treturn true\n\tcase \"grpc-trace-bin\": // grpc-trace-bin is special because it's visible to users.\n\t\treturn false\n\t}\n\treturn strings.HasPrefix(key, \"grpc-\")\n}\n\nfunc mdToMetadataProto(md metadata.MD) *binlogpb.Metadata {\n\tret := &binlogpb.Metadata{}\n\tfor k, vv := range md {\n\t\tif metadataKeyOmit(k) {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\tret.Entry = append(ret.Entry,\n\t\t\t\t&binlogpb.MetadataEntry{\n\t\t\t\t\tKey:   k,\n\t\t\t\t\tValue: []byte(v),\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\t}\n\treturn ret\n}\n\nfunc addrToProto(addr net.Addr) *binlogpb.Address {\n\tret := &binlogpb.Address{}\n\tswitch a := addr.(type) {\n\tcase *net.TCPAddr:\n\t\tif a.IP.To4() != nil {\n\t\t\tret.Type = binlogpb.Address_TYPE_IPV4\n\t\t} else if a.IP.To16() != nil {\n\t\t\tret.Type = binlogpb.Address_TYPE_IPV6\n\t\t} else {\n\t\t\tret.Type = binlogpb.Address_TYPE_UNKNOWN\n\t\t\t// Do not set address and port fields.\n\t\t\tbreak\n\t\t}\n\t\tret.Address = a.IP.String()\n\t\tret.IpPort = uint32(a.Port)\n\tcase *net.UnixAddr:\n\t\tret.Type = binlogpb.Address_TYPE_UNIX\n\t\tret.Address = a.String()\n\tdefault:\n\t\tret.Type = binlogpb.Address_TYPE_UNKNOWN\n\t}\n\treturn ret\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/binarylog/sink.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage binarylog\n\nimport (\n\t\"bufio\"\n\t\"encoding/binary\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n\n\tbinlogpb \"google.golang.org/grpc/binarylog/grpc_binarylog_v1\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\nvar (\n\t// DefaultSink is the sink where the logs will be written to. It's exported\n\t// for the binarylog package to update.\n\tDefaultSink Sink = &noopSink{} // TODO(blog): change this default (file in /tmp).\n)\n\n// Sink writes log entry into the binary log sink.\n//\n// sink is a copy of the exported binarylog.Sink, to avoid circular dependency.\ntype Sink interface {\n\t// Write will be called to write the log entry into the sink.\n\t//\n\t// It should be thread-safe so it can be called in parallel.\n\tWrite(*binlogpb.GrpcLogEntry) error\n\t// Close will be called when the Sink is replaced by a new Sink.\n\tClose() error\n}\n\ntype noopSink struct{}\n\nfunc (ns *noopSink) Write(*binlogpb.GrpcLogEntry) error { return nil }\nfunc (ns *noopSink) Close() error                       { return nil }\n\n// newWriterSink creates a binary log sink with the given writer.\n//\n// Write() marshals the proto message and writes it to the given writer. Each\n// message is prefixed with a 4 byte big endian unsigned integer as the length.\n//\n// No buffer is done, Close() doesn't try to close the writer.\nfunc newWriterSink(w io.Writer) Sink {\n\treturn &writerSink{out: w}\n}\n\ntype writerSink struct {\n\tout io.Writer\n}\n\nfunc (ws *writerSink) Write(e *binlogpb.GrpcLogEntry) error {\n\tb, err := proto.Marshal(e)\n\tif err != nil {\n\t\tgrpclogLogger.Errorf(\"binary logging: failed to marshal proto message: %v\", err)\n\t\treturn err\n\t}\n\thdr := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(hdr, uint32(len(b)))\n\tif _, err := ws.out.Write(hdr); err != nil {\n\t\treturn err\n\t}\n\tif _, err := ws.out.Write(b); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (ws *writerSink) Close() error { return nil }\n\ntype bufferedSink struct {\n\tmu             sync.Mutex\n\tcloser         io.Closer\n\tout            Sink          // out is built on buf.\n\tbuf            *bufio.Writer // buf is kept for flush.\n\tflusherStarted bool\n\n\twriteTicker *time.Ticker\n\tdone        chan struct{}\n}\n\nfunc (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error {\n\tfs.mu.Lock()\n\tdefer fs.mu.Unlock()\n\tif !fs.flusherStarted {\n\t\t// Start the write loop when Write is called.\n\t\tfs.startFlushGoroutine()\n\t\tfs.flusherStarted = true\n\t}\n\tif err := fs.out.Write(e); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nconst (\n\tbufFlushDuration = 60 * time.Second\n)\n\nfunc (fs *bufferedSink) startFlushGoroutine() {\n\tfs.writeTicker = time.NewTicker(bufFlushDuration)\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase <-fs.done:\n\t\t\t\treturn\n\t\t\tcase <-fs.writeTicker.C:\n\t\t\t}\n\t\t\tfs.mu.Lock()\n\t\t\tif err := fs.buf.Flush(); err != nil {\n\t\t\t\tgrpclogLogger.Warningf(\"failed to flush to Sink: %v\", err)\n\t\t\t}\n\t\t\tfs.mu.Unlock()\n\t\t}\n\t}()\n}\n\nfunc (fs *bufferedSink) Close() error {\n\tfs.mu.Lock()\n\tdefer fs.mu.Unlock()\n\tif fs.writeTicker != nil {\n\t\tfs.writeTicker.Stop()\n\t}\n\tclose(fs.done)\n\tif err := fs.buf.Flush(); err != nil {\n\t\tgrpclogLogger.Warningf(\"failed to flush to Sink: %v\", err)\n\t}\n\tif err := fs.closer.Close(); err != nil {\n\t\tgrpclogLogger.Warningf(\"failed to close the underlying WriterCloser: %v\", err)\n\t}\n\tif err := fs.out.Close(); err != nil {\n\t\tgrpclogLogger.Warningf(\"failed to close the Sink: %v\", err)\n\t}\n\treturn nil\n}\n\n// NewBufferedSink creates a binary log sink with the given WriteCloser.\n//\n// Write() marshals the proto message and writes it to the given writer. Each\n// message is prefixed with a 4 byte big endian unsigned integer as the length.\n//\n// Content is kept in a buffer, and is flushed every 60 seconds.\n//\n// Close closes the WriteCloser.\nfunc NewBufferedSink(o io.WriteCloser) Sink {\n\tbufW := bufio.NewWriter(o)\n\treturn &bufferedSink{\n\t\tcloser: o,\n\t\tout:    newWriterSink(bufW),\n\t\tbuf:    bufW,\n\t\tdone:   make(chan struct{}),\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/buffer/unbounded.go",
    "content": "/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package buffer provides an implementation of an unbounded buffer.\npackage buffer\n\nimport (\n\t\"errors\"\n\t\"sync\"\n)\n\n// Unbounded is an implementation of an unbounded buffer which does not use\n// extra goroutines. This is typically used for passing updates from one entity\n// to another within gRPC.\n//\n// All methods on this type are thread-safe and don't block on anything except\n// the underlying mutex used for synchronization.\n//\n// Unbounded supports values of any type to be stored in it by using a channel\n// of `any`. This means that a call to Put() incurs an extra memory allocation,\n// and also that users need a type assertion while reading. For performance\n// critical code paths, using Unbounded is strongly discouraged and defining a\n// new type specific implementation of this buffer is preferred. See\n// internal/transport/transport.go for an example of this.\ntype Unbounded struct {\n\tc       chan any\n\tclosed  bool\n\tclosing bool\n\tmu      sync.Mutex\n\tbacklog []any\n}\n\n// NewUnbounded returns a new instance of Unbounded.\nfunc NewUnbounded() *Unbounded {\n\treturn &Unbounded{c: make(chan any, 1)}\n}\n\nvar errBufferClosed = errors.New(\"Put called on closed buffer.Unbounded\")\n\n// Put adds t to the unbounded buffer.\nfunc (b *Unbounded) Put(t any) error {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tif b.closing {\n\t\treturn errBufferClosed\n\t}\n\tif len(b.backlog) == 0 {\n\t\tselect {\n\t\tcase b.c <- t:\n\t\t\treturn nil\n\t\tdefault:\n\t\t}\n\t}\n\tb.backlog = append(b.backlog, t)\n\treturn nil\n}\n\n// Load sends the earliest buffered data, if any, onto the read channel returned\n// by Get(). Users are expected to call this every time they successfully read a\n// value from the read channel.\nfunc (b *Unbounded) Load() {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tif len(b.backlog) > 0 {\n\t\tselect {\n\t\tcase b.c <- b.backlog[0]:\n\t\t\tb.backlog[0] = nil\n\t\t\tb.backlog = b.backlog[1:]\n\t\tdefault:\n\t\t}\n\t} else if b.closing && !b.closed {\n\t\tb.closed = true\n\t\tclose(b.c)\n\t}\n}\n\n// Get returns a read channel on which values added to the buffer, via Put(),\n// are sent on.\n//\n// Upon reading a value from this channel, users are expected to call Load() to\n// send the next buffered value onto the channel if there is any.\n//\n// If the unbounded buffer is closed, the read channel returned by this method\n// is closed after all data is drained.\nfunc (b *Unbounded) Get() <-chan any {\n\treturn b.c\n}\n\n// Close closes the unbounded buffer. No subsequent data may be Put(), and the\n// channel returned from Get() will be closed after all the data is read and\n// Load() is called for the final time.\nfunc (b *Unbounded) Close() {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tif b.closing {\n\t\treturn\n\t}\n\tb.closing = true\n\tif len(b.backlog) == 0 {\n\t\tb.closed = true\n\t\tclose(b.c)\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/channel.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/grpc/connectivity\"\n)\n\n// Channel represents a channel within channelz, which includes metrics and\n// internal channelz data, such as channelz id, child list, etc.\ntype Channel struct {\n\tEntity\n\t// ID is the channelz id of this channel.\n\tID int64\n\t// RefName is the human readable reference string of this channel.\n\tRefName string\n\n\tcloseCalled bool\n\tnestedChans map[int64]string\n\tsubChans    map[int64]string\n\tParent      *Channel\n\ttrace       *ChannelTrace\n\t// traceRefCount is the number of trace events that reference this channel.\n\t// Non-zero traceRefCount means the trace of this channel cannot be deleted.\n\ttraceRefCount int32\n\n\t// ChannelMetrics holds connectivity state, target and call metrics for the\n\t// channel within channelz.\n\tChannelMetrics ChannelMetrics\n}\n\n// Implemented to make Channel implement the Identifier interface used for\n// nesting.\nfunc (c *Channel) channelzIdentifier() {}\n\n// String returns a string representation of the Channel, including its parent\n// entity and ID.\nfunc (c *Channel) String() string {\n\tif c.Parent == nil {\n\t\treturn fmt.Sprintf(\"Channel #%d\", c.ID)\n\t}\n\treturn fmt.Sprintf(\"%s Channel #%d\", c.Parent, c.ID)\n}\n\nfunc (c *Channel) id() int64 {\n\treturn c.ID\n}\n\n// SubChans returns a copy of the map of sub-channels associated with the\n// Channel.\nfunc (c *Channel) SubChans() map[int64]string {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn copyMap(c.subChans)\n}\n\n// NestedChans returns a copy of the map of nested channels associated with the\n// Channel.\nfunc (c *Channel) NestedChans() map[int64]string {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn copyMap(c.nestedChans)\n}\n\n// Trace returns a copy of the Channel's trace data.\nfunc (c *Channel) Trace() *ChannelTrace {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn c.trace.copy()\n}\n\n// ChannelMetrics holds connectivity state, target and call metrics for the\n// channel within channelz.\ntype ChannelMetrics struct {\n\t// The current connectivity state of the channel.\n\tState atomic.Pointer[connectivity.State]\n\t// The target this channel originally tried to connect to.  May be absent\n\tTarget atomic.Pointer[string]\n\t// The number of calls started on the channel.\n\tCallsStarted atomic.Int64\n\t// The number of calls that have completed with an OK status.\n\tCallsSucceeded atomic.Int64\n\t// The number of calls that have a completed with a non-OK status.\n\tCallsFailed atomic.Int64\n\t// The last time a call was started on the channel.\n\tLastCallStartedTimestamp atomic.Int64\n}\n\n// CopyFrom copies the metrics in o to c.  For testing only.\nfunc (c *ChannelMetrics) CopyFrom(o *ChannelMetrics) {\n\tc.State.Store(o.State.Load())\n\tc.Target.Store(o.Target.Load())\n\tc.CallsStarted.Store(o.CallsStarted.Load())\n\tc.CallsSucceeded.Store(o.CallsSucceeded.Load())\n\tc.CallsFailed.Store(o.CallsFailed.Load())\n\tc.LastCallStartedTimestamp.Store(o.LastCallStartedTimestamp.Load())\n}\n\n// Equal returns true iff the metrics of c are the same as the metrics of o.\n// For testing only.\nfunc (c *ChannelMetrics) Equal(o any) bool {\n\toc, ok := o.(*ChannelMetrics)\n\tif !ok {\n\t\treturn false\n\t}\n\tif (c.State.Load() == nil) != (oc.State.Load() == nil) {\n\t\treturn false\n\t}\n\tif c.State.Load() != nil && *c.State.Load() != *oc.State.Load() {\n\t\treturn false\n\t}\n\tif (c.Target.Load() == nil) != (oc.Target.Load() == nil) {\n\t\treturn false\n\t}\n\tif c.Target.Load() != nil && *c.Target.Load() != *oc.Target.Load() {\n\t\treturn false\n\t}\n\treturn c.CallsStarted.Load() == oc.CallsStarted.Load() &&\n\t\tc.CallsFailed.Load() == oc.CallsFailed.Load() &&\n\t\tc.CallsSucceeded.Load() == oc.CallsSucceeded.Load() &&\n\t\tc.LastCallStartedTimestamp.Load() == oc.LastCallStartedTimestamp.Load()\n}\n\nfunc strFromPointer(s *string) string {\n\tif s == nil {\n\t\treturn \"\"\n\t}\n\treturn *s\n}\n\n// String returns a string representation of the ChannelMetrics, including its\n// state, target, and call metrics.\nfunc (c *ChannelMetrics) String() string {\n\treturn fmt.Sprintf(\"State: %v, Target: %s, CallsStarted: %v, CallsSucceeded: %v, CallsFailed: %v, LastCallStartedTimestamp: %v\",\n\t\tc.State.Load(), strFromPointer(c.Target.Load()), c.CallsStarted.Load(), c.CallsSucceeded.Load(), c.CallsFailed.Load(), c.LastCallStartedTimestamp.Load(),\n\t)\n}\n\n// NewChannelMetricForTesting creates a new instance of ChannelMetrics with\n// specified initial values for testing purposes.\nfunc NewChannelMetricForTesting(state connectivity.State, target string, started, succeeded, failed, timestamp int64) *ChannelMetrics {\n\tc := &ChannelMetrics{}\n\tc.State.Store(&state)\n\tc.Target.Store(&target)\n\tc.CallsStarted.Store(started)\n\tc.CallsSucceeded.Store(succeeded)\n\tc.CallsFailed.Store(failed)\n\tc.LastCallStartedTimestamp.Store(timestamp)\n\treturn c\n}\n\nfunc (c *Channel) addChild(id int64, e entry) {\n\tswitch v := e.(type) {\n\tcase *SubChannel:\n\t\tc.subChans[id] = v.RefName\n\tcase *Channel:\n\t\tc.nestedChans[id] = v.RefName\n\tdefault:\n\t\tlogger.Errorf(\"cannot add a child (id = %d) of type %T to a channel\", id, e)\n\t}\n}\n\nfunc (c *Channel) deleteChild(id int64) {\n\tdelete(c.subChans, id)\n\tdelete(c.nestedChans, id)\n\tc.deleteSelfIfReady()\n}\n\nfunc (c *Channel) triggerDelete() {\n\tc.closeCalled = true\n\tc.deleteSelfIfReady()\n}\n\nfunc (c *Channel) getParentID() int64 {\n\tif c.Parent == nil {\n\t\treturn -1\n\t}\n\treturn c.Parent.ID\n}\n\n// deleteSelfFromTree tries to delete the channel from the channelz entry relation tree, which means\n// deleting the channel reference from its parent's child list.\n//\n// In order for a channel to be deleted from the tree, it must meet the criteria that, removal of the\n// corresponding grpc object has been invoked, and the channel does not have any children left.\n//\n// The returned boolean value indicates whether the channel has been successfully deleted from tree.\nfunc (c *Channel) deleteSelfFromTree() (deleted bool) {\n\tif !c.closeCalled || len(c.subChans)+len(c.nestedChans) != 0 {\n\t\treturn false\n\t}\n\t// not top channel\n\tif c.Parent != nil {\n\t\tc.Parent.deleteChild(c.ID)\n\t}\n\treturn true\n}\n\n// deleteSelfFromMap checks whether it is valid to delete the channel from the map, which means\n// deleting the channel from channelz's tracking entirely. Users can no longer use id to query the\n// channel, and its memory will be garbage collected.\n//\n// The trace reference count of the channel must be 0 in order to be deleted from the map. This is\n// specified in the channel tracing gRFC that as long as some other trace has reference to an entity,\n// the trace of the referenced entity must not be deleted. In order to release the resource allocated\n// by grpc, the reference to the grpc object is reset to a dummy object.\n//\n// deleteSelfFromMap must be called after deleteSelfFromTree returns true.\n//\n// It returns a bool to indicate whether the channel can be safely deleted from map.\nfunc (c *Channel) deleteSelfFromMap() (delete bool) {\n\treturn c.getTraceRefCount() == 0\n}\n\n// deleteSelfIfReady tries to delete the channel itself from the channelz database.\n// The delete process includes two steps:\n//  1. delete the channel from the entry relation tree, i.e. delete the channel reference from its\n//     parent's child list.\n//  2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id\n//     will return entry not found error.\nfunc (c *Channel) deleteSelfIfReady() {\n\tif !c.deleteSelfFromTree() {\n\t\treturn\n\t}\n\tif !c.deleteSelfFromMap() {\n\t\treturn\n\t}\n\tdb.deleteEntry(c.ID)\n\tc.trace.clear()\n}\n\nfunc (c *Channel) getChannelTrace() *ChannelTrace {\n\treturn c.trace\n}\n\nfunc (c *Channel) incrTraceRefCount() {\n\tatomic.AddInt32(&c.traceRefCount, 1)\n}\n\nfunc (c *Channel) decrTraceRefCount() {\n\tatomic.AddInt32(&c.traceRefCount, -1)\n}\n\nfunc (c *Channel) getTraceRefCount() int {\n\ti := atomic.LoadInt32(&c.traceRefCount)\n\treturn int(i)\n}\n\nfunc (c *Channel) getRefName() string {\n\treturn c.RefName\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/channelmap.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"sync\"\n\t\"time\"\n)\n\n// entry represents a node in the channelz database.\ntype entry interface {\n\t// addChild adds a child e, whose channelz id is id to child list\n\taddChild(id int64, e entry)\n\t// deleteChild deletes a child with channelz id to be id from child list\n\tdeleteChild(id int64)\n\t// triggerDelete tries to delete self from channelz database. However, if\n\t// child list is not empty, then deletion from the database is on hold until\n\t// the last child is deleted from database.\n\ttriggerDelete()\n\t// deleteSelfIfReady check whether triggerDelete() has been called before,\n\t// and whether child list is now empty. If both conditions are met, then\n\t// delete self from database.\n\tdeleteSelfIfReady()\n\t// getParentID returns parent ID of the entry. 0 value parent ID means no parent.\n\tgetParentID() int64\n\tEntity\n}\n\n// channelMap is the storage data structure for channelz.\n//\n// Methods of channelMap can be divided into two categories with respect to\n// locking.\n//\n// 1. Methods acquire the global lock.\n// 2. Methods that can only be called when global lock is held.\n//\n// A second type of method need always to be called inside a first type of method.\ntype channelMap struct {\n\tmu               sync.RWMutex\n\ttopLevelChannels map[int64]struct{}\n\tchannels         map[int64]*Channel\n\tsubChannels      map[int64]*SubChannel\n\tsockets          map[int64]*Socket\n\tservers          map[int64]*Server\n}\n\nfunc newChannelMap() *channelMap {\n\treturn &channelMap{\n\t\ttopLevelChannels: make(map[int64]struct{}),\n\t\tchannels:         make(map[int64]*Channel),\n\t\tsubChannels:      make(map[int64]*SubChannel),\n\t\tsockets:          make(map[int64]*Socket),\n\t\tservers:          make(map[int64]*Server),\n\t}\n}\n\nfunc (c *channelMap) addServer(id int64, s *Server) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\ts.cm = c\n\tc.servers[id] = s\n}\n\nfunc (c *channelMap) addChannel(id int64, cn *Channel, isTopChannel bool, pid int64) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tcn.trace.cm = c\n\tc.channels[id] = cn\n\tif isTopChannel {\n\t\tc.topLevelChannels[id] = struct{}{}\n\t} else if p := c.channels[pid]; p != nil {\n\t\tp.addChild(id, cn)\n\t} else {\n\t\tlogger.Infof(\"channel %d references invalid parent ID %d\", id, pid)\n\t}\n}\n\nfunc (c *channelMap) addSubChannel(id int64, sc *SubChannel, pid int64) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tsc.trace.cm = c\n\tc.subChannels[id] = sc\n\tif p := c.channels[pid]; p != nil {\n\t\tp.addChild(id, sc)\n\t} else {\n\t\tlogger.Infof(\"subchannel %d references invalid parent ID %d\", id, pid)\n\t}\n}\n\nfunc (c *channelMap) addSocket(s *Socket) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\ts.cm = c\n\tc.sockets[s.ID] = s\n\tif s.Parent == nil {\n\t\tlogger.Infof(\"normal socket %d has no parent\", s.ID)\n\t}\n\ts.Parent.(entry).addChild(s.ID, s)\n}\n\n// removeEntry triggers the removal of an entry, which may not indeed delete the\n// entry, if it has to wait on the deletion of its children and until no other\n// entity's channel trace references it.  It may lead to a chain of entry\n// deletion. For example, deleting the last socket of a gracefully shutting down\n// server will lead to the server being also deleted.\nfunc (c *channelMap) removeEntry(id int64) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tc.findEntry(id).triggerDelete()\n}\n\n// tracedChannel represents tracing operations which are present on both\n// channels and subChannels.\ntype tracedChannel interface {\n\tgetChannelTrace() *ChannelTrace\n\tincrTraceRefCount()\n\tdecrTraceRefCount()\n\tgetRefName() string\n}\n\n// c.mu must be held by the caller\nfunc (c *channelMap) decrTraceRefCount(id int64) {\n\te := c.findEntry(id)\n\tif v, ok := e.(tracedChannel); ok {\n\t\tv.decrTraceRefCount()\n\t\te.deleteSelfIfReady()\n\t}\n}\n\n// c.mu must be held by the caller.\nfunc (c *channelMap) findEntry(id int64) entry {\n\tif v, ok := c.channels[id]; ok {\n\t\treturn v\n\t}\n\tif v, ok := c.subChannels[id]; ok {\n\t\treturn v\n\t}\n\tif v, ok := c.servers[id]; ok {\n\t\treturn v\n\t}\n\tif v, ok := c.sockets[id]; ok {\n\t\treturn v\n\t}\n\treturn &dummyEntry{idNotFound: id}\n}\n\n// c.mu must be held by the caller\n//\n// deleteEntry deletes an entry from the channelMap. Before calling this method,\n// caller must check this entry is ready to be deleted, i.e removeEntry() has\n// been called on it, and no children still exist.\nfunc (c *channelMap) deleteEntry(id int64) entry {\n\tif v, ok := c.sockets[id]; ok {\n\t\tdelete(c.sockets, id)\n\t\treturn v\n\t}\n\tif v, ok := c.subChannels[id]; ok {\n\t\tdelete(c.subChannels, id)\n\t\treturn v\n\t}\n\tif v, ok := c.channels[id]; ok {\n\t\tdelete(c.channels, id)\n\t\tdelete(c.topLevelChannels, id)\n\t\treturn v\n\t}\n\tif v, ok := c.servers[id]; ok {\n\t\tdelete(c.servers, id)\n\t\treturn v\n\t}\n\treturn &dummyEntry{idNotFound: id}\n}\n\nfunc (c *channelMap) traceEvent(id int64, desc *TraceEvent) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\tchild := c.findEntry(id)\n\tchildTC, ok := child.(tracedChannel)\n\tif !ok {\n\t\treturn\n\t}\n\tchildTC.getChannelTrace().append(&traceEvent{Desc: desc.Desc, Severity: desc.Severity, Timestamp: time.Now()})\n\tif desc.Parent != nil {\n\t\tparent := c.findEntry(child.getParentID())\n\t\tvar chanType RefChannelType\n\t\tswitch child.(type) {\n\t\tcase *Channel:\n\t\t\tchanType = RefChannel\n\t\tcase *SubChannel:\n\t\t\tchanType = RefSubChannel\n\t\t}\n\t\tif parentTC, ok := parent.(tracedChannel); ok {\n\t\t\tparentTC.getChannelTrace().append(&traceEvent{\n\t\t\t\tDesc:      desc.Parent.Desc,\n\t\t\t\tSeverity:  desc.Parent.Severity,\n\t\t\t\tTimestamp: time.Now(),\n\t\t\t\tRefID:     id,\n\t\t\t\tRefName:   childTC.getRefName(),\n\t\t\t\tRefType:   chanType,\n\t\t\t})\n\t\t\tchildTC.incrTraceRefCount()\n\t\t}\n\t}\n}\n\ntype int64Slice []int64\n\nfunc (s int64Slice) Len() int           { return len(s) }\nfunc (s int64Slice) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }\nfunc (s int64Slice) Less(i, j int) bool { return s[i] < s[j] }\n\nfunc copyMap(m map[int64]string) map[int64]string {\n\tn := make(map[int64]string)\n\tfor k, v := range m {\n\t\tn[k] = v\n\t}\n\treturn n\n}\n\nfunc (c *channelMap) getTopChannels(id int64, maxResults int) ([]*Channel, bool) {\n\tif maxResults <= 0 {\n\t\tmaxResults = EntriesPerPage\n\t}\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\tl := int64(len(c.topLevelChannels))\n\tids := make([]int64, 0, l)\n\n\tfor k := range c.topLevelChannels {\n\t\tids = append(ids, k)\n\t}\n\tsort.Sort(int64Slice(ids))\n\tidx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id })\n\tend := true\n\tvar t []*Channel\n\tfor _, v := range ids[idx:] {\n\t\tif len(t) == maxResults {\n\t\t\tend = false\n\t\t\tbreak\n\t\t}\n\t\tif cn, ok := c.channels[v]; ok {\n\t\t\tt = append(t, cn)\n\t\t}\n\t}\n\treturn t, end\n}\n\nfunc (c *channelMap) getServers(id int64, maxResults int) ([]*Server, bool) {\n\tif maxResults <= 0 {\n\t\tmaxResults = EntriesPerPage\n\t}\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\tids := make([]int64, 0, len(c.servers))\n\tfor k := range c.servers {\n\t\tids = append(ids, k)\n\t}\n\tsort.Sort(int64Slice(ids))\n\tidx := sort.Search(len(ids), func(i int) bool { return ids[i] >= id })\n\tend := true\n\tvar s []*Server\n\tfor _, v := range ids[idx:] {\n\t\tif len(s) == maxResults {\n\t\t\tend = false\n\t\t\tbreak\n\t\t}\n\t\tif svr, ok := c.servers[v]; ok {\n\t\t\ts = append(s, svr)\n\t\t}\n\t}\n\treturn s, end\n}\n\nfunc (c *channelMap) getServerSockets(id int64, startID int64, maxResults int) ([]*Socket, bool) {\n\tif maxResults <= 0 {\n\t\tmaxResults = EntriesPerPage\n\t}\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\tsvr, ok := c.servers[id]\n\tif !ok {\n\t\t// server with id doesn't exist.\n\t\treturn nil, true\n\t}\n\tsvrskts := svr.sockets\n\tids := make([]int64, 0, len(svrskts))\n\tsks := make([]*Socket, 0, min(len(svrskts), maxResults))\n\tfor k := range svrskts {\n\t\tids = append(ids, k)\n\t}\n\tsort.Sort(int64Slice(ids))\n\tidx := sort.Search(len(ids), func(i int) bool { return ids[i] >= startID })\n\tend := true\n\tfor _, v := range ids[idx:] {\n\t\tif len(sks) == maxResults {\n\t\t\tend = false\n\t\t\tbreak\n\t\t}\n\t\tif ns, ok := c.sockets[v]; ok {\n\t\t\tsks = append(sks, ns)\n\t\t}\n\t}\n\treturn sks, end\n}\n\nfunc (c *channelMap) getChannel(id int64) *Channel {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.channels[id]\n}\n\nfunc (c *channelMap) getSubChannel(id int64) *SubChannel {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.subChannels[id]\n}\n\nfunc (c *channelMap) getSocket(id int64) *Socket {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.sockets[id]\n}\n\nfunc (c *channelMap) getServer(id int64) *Server {\n\tc.mu.RLock()\n\tdefer c.mu.RUnlock()\n\treturn c.servers[id]\n}\n\ntype dummyEntry struct {\n\t// dummyEntry is a fake entry to handle entry not found case.\n\tidNotFound int64\n\tEntity\n}\n\nfunc (d *dummyEntry) String() string {\n\treturn fmt.Sprintf(\"non-existent entity #%d\", d.idNotFound)\n}\n\nfunc (d *dummyEntry) ID() int64 { return d.idNotFound }\n\nfunc (d *dummyEntry) addChild(id int64, e entry) {\n\t// Note: It is possible for a normal program to reach here under race\n\t// condition.  For example, there could be a race between ClientConn.Close()\n\t// info being propagated to addrConn and http2Client. ClientConn.Close()\n\t// cancel the context and result in http2Client to error. The error info is\n\t// then caught by transport monitor and before addrConn.tearDown() is called\n\t// in side ClientConn.Close(). Therefore, the addrConn will create a new\n\t// transport. And when registering the new transport in channelz, its parent\n\t// addrConn could have already been torn down and deleted from channelz\n\t// tracking, and thus reach the code here.\n\tlogger.Infof(\"attempt to add child of type %T with id %d to a parent (id=%d) that doesn't currently exist\", e, id, d.idNotFound)\n}\n\nfunc (d *dummyEntry) deleteChild(id int64) {\n\t// It is possible for a normal program to reach here under race condition.\n\t// Refer to the example described in addChild().\n\tlogger.Infof(\"attempt to delete child with id %d from a parent (id=%d) that doesn't currently exist\", id, d.idNotFound)\n}\n\nfunc (d *dummyEntry) triggerDelete() {\n\tlogger.Warningf(\"attempt to delete an entry (id=%d) that doesn't currently exist\", d.idNotFound)\n}\n\nfunc (*dummyEntry) deleteSelfIfReady() {\n\t// code should not reach here. deleteSelfIfReady is always called on an existing entry.\n}\n\nfunc (*dummyEntry) getParentID() int64 {\n\treturn 0\n}\n\n// Entity is implemented by all channelz types.\ntype Entity interface {\n\tisEntity()\n\tfmt.Stringer\n\tid() int64\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/funcs.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package channelz defines internal APIs for enabling channelz service, entry\n// registration/deletion, and accessing channelz data. It also defines channelz\n// metric struct formats.\npackage channelz\n\nimport (\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/internal\"\n)\n\nvar (\n\t// IDGen is the global channelz entity ID generator.  It should not be used\n\t// outside this package except by tests.\n\tIDGen IDGenerator\n\n\tdb = newChannelMap()\n\t// EntriesPerPage defines the number of channelz entries to be shown on a web page.\n\tEntriesPerPage = 50\n\tcurState       int32\n)\n\n// TurnOn turns on channelz data collection.\nfunc TurnOn() {\n\tatomic.StoreInt32(&curState, 1)\n}\n\nfunc init() {\n\tinternal.ChannelzTurnOffForTesting = func() {\n\t\tatomic.StoreInt32(&curState, 0)\n\t}\n}\n\n// IsOn returns whether channelz data collection is on.\nfunc IsOn() bool {\n\treturn atomic.LoadInt32(&curState) == 1\n}\n\n// GetTopChannels returns a slice of top channel's ChannelMetric, along with a\n// boolean indicating whether there's more top channels to be queried for.\n//\n// The arg id specifies that only top channel with id at or above it will be\n// included in the result. The returned slice is up to a length of the arg\n// maxResults or EntriesPerPage if maxResults is zero, and is sorted in ascending\n// id order.\nfunc GetTopChannels(id int64, maxResults int) ([]*Channel, bool) {\n\treturn db.getTopChannels(id, maxResults)\n}\n\n// GetServers returns a slice of server's ServerMetric, along with a\n// boolean indicating whether there's more servers to be queried for.\n//\n// The arg id specifies that only server with id at or above it will be included\n// in the result. The returned slice is up to a length of the arg maxResults or\n// EntriesPerPage if maxResults is zero, and is sorted in ascending id order.\nfunc GetServers(id int64, maxResults int) ([]*Server, bool) {\n\treturn db.getServers(id, maxResults)\n}\n\n// GetServerSockets returns a slice of server's (identified by id) normal socket's\n// SocketMetrics, along with a boolean indicating whether there's more sockets to\n// be queried for.\n//\n// The arg startID specifies that only sockets with id at or above it will be\n// included in the result. The returned slice is up to a length of the arg maxResults\n// or EntriesPerPage if maxResults is zero, and is sorted in ascending id order.\nfunc GetServerSockets(id int64, startID int64, maxResults int) ([]*Socket, bool) {\n\treturn db.getServerSockets(id, startID, maxResults)\n}\n\n// GetChannel returns the Channel for the channel (identified by id).\nfunc GetChannel(id int64) *Channel {\n\treturn db.getChannel(id)\n}\n\n// GetSubChannel returns the SubChannel for the subchannel (identified by id).\nfunc GetSubChannel(id int64) *SubChannel {\n\treturn db.getSubChannel(id)\n}\n\n// GetSocket returns the Socket for the socket (identified by id).\nfunc GetSocket(id int64) *Socket {\n\treturn db.getSocket(id)\n}\n\n// GetServer returns the ServerMetric for the server (identified by id).\nfunc GetServer(id int64) *Server {\n\treturn db.getServer(id)\n}\n\n// RegisterChannel registers the given channel c in the channelz database with\n// target as its target and reference name, and adds it to the child list of its\n// parent.  parent == nil means no parent.\n//\n// Returns a unique channelz identifier assigned to this channel.\n//\n// If channelz is not turned ON, the channelz database is not mutated.\nfunc RegisterChannel(parent *Channel, target string) *Channel {\n\tid := IDGen.genID()\n\n\tif !IsOn() {\n\t\treturn &Channel{ID: id}\n\t}\n\n\tisTopChannel := parent == nil\n\n\tcn := &Channel{\n\t\tID:          id,\n\t\tRefName:     target,\n\t\tnestedChans: make(map[int64]string),\n\t\tsubChans:    make(map[int64]string),\n\t\tParent:      parent,\n\t\ttrace:       &ChannelTrace{CreationTime: time.Now(), Events: make([]*traceEvent, 0, getMaxTraceEntry())},\n\t}\n\tcn.ChannelMetrics.Target.Store(&target)\n\tdb.addChannel(id, cn, isTopChannel, cn.getParentID())\n\treturn cn\n}\n\n// RegisterSubChannel registers the given subChannel c in the channelz database\n// with ref as its reference name, and adds it to the child list of its parent\n// (identified by pid).\n//\n// Returns a unique channelz identifier assigned to this subChannel.\n//\n// If channelz is not turned ON, the channelz database is not mutated.\nfunc RegisterSubChannel(parent *Channel, ref string) *SubChannel {\n\tid := IDGen.genID()\n\tsc := &SubChannel{\n\t\tID:      id,\n\t\tRefName: ref,\n\t\tparent:  parent,\n\t}\n\n\tif !IsOn() {\n\t\treturn sc\n\t}\n\n\tsc.sockets = make(map[int64]string)\n\tsc.trace = &ChannelTrace{CreationTime: time.Now(), Events: make([]*traceEvent, 0, getMaxTraceEntry())}\n\tdb.addSubChannel(id, sc, parent.ID)\n\treturn sc\n}\n\n// RegisterServer registers the given server s in channelz database. It returns\n// the unique channelz tracking id assigned to this server.\n//\n// If channelz is not turned ON, the channelz database is not mutated.\nfunc RegisterServer(ref string) *Server {\n\tid := IDGen.genID()\n\tif !IsOn() {\n\t\treturn &Server{ID: id}\n\t}\n\n\tsvr := &Server{\n\t\tRefName:       ref,\n\t\tsockets:       make(map[int64]string),\n\t\tlistenSockets: make(map[int64]string),\n\t\tID:            id,\n\t}\n\tdb.addServer(id, svr)\n\treturn svr\n}\n\n// RegisterSocket registers the given normal socket s in channelz database\n// with ref as its reference name, and adds it to the child list of its parent\n// (identified by skt.Parent, which must be set). It returns the unique channelz\n// tracking id assigned to this normal socket.\n//\n// If channelz is not turned ON, the channelz database is not mutated.\nfunc RegisterSocket(skt *Socket) *Socket {\n\tskt.ID = IDGen.genID()\n\tif IsOn() {\n\t\tdb.addSocket(skt)\n\t}\n\treturn skt\n}\n\n// RemoveEntry removes an entry with unique channelz tracking id to be id from\n// channelz database.\n//\n// If channelz is not turned ON, this function is a no-op.\nfunc RemoveEntry(id int64) {\n\tif !IsOn() {\n\t\treturn\n\t}\n\tdb.removeEntry(id)\n}\n\n// IDGenerator is an incrementing atomic that tracks IDs for channelz entities.\ntype IDGenerator struct {\n\tid int64\n}\n\n// Reset resets the generated ID back to zero.  Should only be used at\n// initialization or by tests sensitive to the ID number.\nfunc (i *IDGenerator) Reset() {\n\tatomic.StoreInt64(&i.id, 0)\n}\n\nfunc (i *IDGenerator) genID() int64 {\n\treturn atomic.AddInt64(&i.id, 1)\n}\n\n// Identifier is an opaque channelz identifier used to expose channelz symbols\n// outside of grpc.  Currently only implemented by Channel since no other\n// types require exposure outside grpc.\ntype Identifier interface {\n\tEntity\n\tchannelzIdentifier()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/logging.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nvar logger = grpclog.Component(\"channelz\")\n\n// Info logs and adds a trace event if channelz is on.\nfunc Info(l grpclog.DepthLoggerV2, e Entity, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprint(args...),\n\t\tSeverity: CtInfo,\n\t})\n}\n\n// Infof logs and adds a trace event if channelz is on.\nfunc Infof(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprintf(format, args...),\n\t\tSeverity: CtInfo,\n\t})\n}\n\n// Warning logs and adds a trace event if channelz is on.\nfunc Warning(l grpclog.DepthLoggerV2, e Entity, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprint(args...),\n\t\tSeverity: CtWarning,\n\t})\n}\n\n// Warningf logs and adds a trace event if channelz is on.\nfunc Warningf(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprintf(format, args...),\n\t\tSeverity: CtWarning,\n\t})\n}\n\n// Error logs and adds a trace event if channelz is on.\nfunc Error(l grpclog.DepthLoggerV2, e Entity, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprint(args...),\n\t\tSeverity: CtError,\n\t})\n}\n\n// Errorf logs and adds a trace event if channelz is on.\nfunc Errorf(l grpclog.DepthLoggerV2, e Entity, format string, args ...any) {\n\tAddTraceEvent(l, e, 1, &TraceEvent{\n\t\tDesc:     fmt.Sprintf(format, args...),\n\t\tSeverity: CtError,\n\t})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/server.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"sync/atomic\"\n)\n\n// Server is the channelz representation of a server.\ntype Server struct {\n\tEntity\n\tID      int64\n\tRefName string\n\n\tServerMetrics ServerMetrics\n\n\tcloseCalled   bool\n\tsockets       map[int64]string\n\tlistenSockets map[int64]string\n\tcm            *channelMap\n}\n\n// ServerMetrics defines a struct containing metrics for servers.\ntype ServerMetrics struct {\n\t// The number of incoming calls started on the server.\n\tCallsStarted atomic.Int64\n\t// The number of incoming calls that have completed with an OK status.\n\tCallsSucceeded atomic.Int64\n\t// The number of incoming calls that have a completed with a non-OK status.\n\tCallsFailed atomic.Int64\n\t// The last time a call was started on the server.\n\tLastCallStartedTimestamp atomic.Int64\n}\n\n// NewServerMetricsForTesting returns an initialized ServerMetrics.\nfunc NewServerMetricsForTesting(started, succeeded, failed, timestamp int64) *ServerMetrics {\n\tsm := &ServerMetrics{}\n\tsm.CallsStarted.Store(started)\n\tsm.CallsSucceeded.Store(succeeded)\n\tsm.CallsFailed.Store(failed)\n\tsm.LastCallStartedTimestamp.Store(timestamp)\n\treturn sm\n}\n\n// CopyFrom copies the metrics data from the provided ServerMetrics\n// instance into the current instance.\nfunc (sm *ServerMetrics) CopyFrom(o *ServerMetrics) {\n\tsm.CallsStarted.Store(o.CallsStarted.Load())\n\tsm.CallsSucceeded.Store(o.CallsSucceeded.Load())\n\tsm.CallsFailed.Store(o.CallsFailed.Load())\n\tsm.LastCallStartedTimestamp.Store(o.LastCallStartedTimestamp.Load())\n}\n\n// ListenSockets returns the listening sockets for s.\nfunc (s *Server) ListenSockets() map[int64]string {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn copyMap(s.listenSockets)\n}\n\n// String returns a printable description of s.\nfunc (s *Server) String() string {\n\treturn fmt.Sprintf(\"Server #%d\", s.ID)\n}\n\nfunc (s *Server) id() int64 {\n\treturn s.ID\n}\n\nfunc (s *Server) addChild(id int64, e entry) {\n\tswitch v := e.(type) {\n\tcase *Socket:\n\t\tswitch v.SocketType {\n\t\tcase SocketTypeNormal:\n\t\t\ts.sockets[id] = v.RefName\n\t\tcase SocketTypeListen:\n\t\t\ts.listenSockets[id] = v.RefName\n\t\t}\n\tdefault:\n\t\tlogger.Errorf(\"cannot add a child (id = %d) of type %T to a server\", id, e)\n\t}\n}\n\nfunc (s *Server) deleteChild(id int64) {\n\tdelete(s.sockets, id)\n\tdelete(s.listenSockets, id)\n\ts.deleteSelfIfReady()\n}\n\nfunc (s *Server) triggerDelete() {\n\ts.closeCalled = true\n\ts.deleteSelfIfReady()\n}\n\nfunc (s *Server) deleteSelfIfReady() {\n\tif !s.closeCalled || len(s.sockets)+len(s.listenSockets) != 0 {\n\t\treturn\n\t}\n\ts.cm.deleteEntry(s.ID)\n}\n\nfunc (s *Server) getParentID() int64 {\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/socket.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/grpc/credentials\"\n)\n\n// SocketMetrics defines the struct that the implementor of Socket interface\n// should return from ChannelzMetric().\ntype SocketMetrics struct {\n\t// The number of streams that have been started.\n\tStreamsStarted atomic.Int64\n\t// The number of streams that have ended successfully:\n\t// On client side, receiving frame with eos bit set.\n\t// On server side, sending frame with eos bit set.\n\tStreamsSucceeded atomic.Int64\n\t// The number of streams that have ended unsuccessfully:\n\t// On client side, termination without receiving frame with eos bit set.\n\t// On server side, termination without sending frame with eos bit set.\n\tStreamsFailed atomic.Int64\n\t// The number of messages successfully sent on this socket.\n\tMessagesSent     atomic.Int64\n\tMessagesReceived atomic.Int64\n\t// The number of keep alives sent.  This is typically implemented with HTTP/2\n\t// ping messages.\n\tKeepAlivesSent atomic.Int64\n\t// The last time a stream was created by this endpoint.  Usually unset for\n\t// servers.\n\tLastLocalStreamCreatedTimestamp atomic.Int64\n\t// The last time a stream was created by the remote endpoint.  Usually unset\n\t// for clients.\n\tLastRemoteStreamCreatedTimestamp atomic.Int64\n\t// The last time a message was sent by this endpoint.\n\tLastMessageSentTimestamp atomic.Int64\n\t// The last time a message was received by this endpoint.\n\tLastMessageReceivedTimestamp atomic.Int64\n}\n\n// EphemeralSocketMetrics are metrics that change rapidly and are tracked\n// outside of channelz.\ntype EphemeralSocketMetrics struct {\n\t// The amount of window, granted to the local endpoint by the remote endpoint.\n\t// This may be slightly out of date due to network latency.  This does NOT\n\t// include stream level or TCP level flow control info.\n\tLocalFlowControlWindow int64\n\t// The amount of window, granted to the remote endpoint by the local endpoint.\n\t// This may be slightly out of date due to network latency.  This does NOT\n\t// include stream level or TCP level flow control info.\n\tRemoteFlowControlWindow int64\n}\n\n// SocketType represents the type of socket.\ntype SocketType string\n\n// SocketType can be one of these.\nconst (\n\tSocketTypeNormal = \"NormalSocket\"\n\tSocketTypeListen = \"ListenSocket\"\n)\n\n// Socket represents a socket within channelz which includes socket\n// metrics and data related to socket activity and provides methods\n// for managing and interacting with sockets.\ntype Socket struct {\n\tEntity\n\tSocketType       SocketType\n\tID               int64\n\tParent           Entity\n\tcm               *channelMap\n\tSocketMetrics    SocketMetrics\n\tEphemeralMetrics func() *EphemeralSocketMetrics\n\n\tRefName string\n\t// The locally bound address.  Immutable.\n\tLocalAddr net.Addr\n\t// The remote bound address.  May be absent.  Immutable.\n\tRemoteAddr net.Addr\n\t// Optional, represents the name of the remote endpoint, if different than\n\t// the original target name.  Immutable.\n\tRemoteName string\n\t// Immutable.\n\tSocketOptions *SocketOptionData\n\t// Immutable.\n\tSecurity credentials.ChannelzSecurityValue\n}\n\n// String returns a string representation of the Socket, including its parent\n// entity, socket type, and ID.\nfunc (ls *Socket) String() string {\n\treturn fmt.Sprintf(\"%s %s #%d\", ls.Parent, ls.SocketType, ls.ID)\n}\n\nfunc (ls *Socket) id() int64 {\n\treturn ls.ID\n}\n\nfunc (ls *Socket) addChild(id int64, e entry) {\n\tlogger.Errorf(\"cannot add a child (id = %d) of type %T to a listen socket\", id, e)\n}\n\nfunc (ls *Socket) deleteChild(id int64) {\n\tlogger.Errorf(\"cannot delete a child (id = %d) from a listen socket\", id)\n}\n\nfunc (ls *Socket) triggerDelete() {\n\tls.cm.deleteEntry(ls.ID)\n\tls.Parent.(entry).deleteChild(ls.ID)\n}\n\nfunc (ls *Socket) deleteSelfIfReady() {\n\tlogger.Errorf(\"cannot call deleteSelfIfReady on a listen socket\")\n}\n\nfunc (ls *Socket) getParentID() int64 {\n\treturn ls.Parent.id()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/subchannel.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"sync/atomic\"\n)\n\n// SubChannel is the channelz representation of a subchannel.\ntype SubChannel struct {\n\tEntity\n\t// ID is the channelz id of this subchannel.\n\tID int64\n\t// RefName is the human readable reference string of this subchannel.\n\tRefName       string\n\tcloseCalled   bool\n\tsockets       map[int64]string\n\tparent        *Channel\n\ttrace         *ChannelTrace\n\ttraceRefCount int32\n\n\tChannelMetrics ChannelMetrics\n}\n\nfunc (sc *SubChannel) String() string {\n\treturn fmt.Sprintf(\"%s SubChannel #%d\", sc.parent, sc.ID)\n}\n\nfunc (sc *SubChannel) id() int64 {\n\treturn sc.ID\n}\n\n// Sockets returns a copy of the sockets map associated with the SubChannel.\nfunc (sc *SubChannel) Sockets() map[int64]string {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn copyMap(sc.sockets)\n}\n\n// Trace returns a copy of the ChannelTrace associated with the SubChannel.\nfunc (sc *SubChannel) Trace() *ChannelTrace {\n\tdb.mu.RLock()\n\tdefer db.mu.RUnlock()\n\treturn sc.trace.copy()\n}\n\nfunc (sc *SubChannel) addChild(id int64, e entry) {\n\tif v, ok := e.(*Socket); ok && v.SocketType == SocketTypeNormal {\n\t\tsc.sockets[id] = v.RefName\n\t} else {\n\t\tlogger.Errorf(\"cannot add a child (id = %d) of type %T to a subChannel\", id, e)\n\t}\n}\n\nfunc (sc *SubChannel) deleteChild(id int64) {\n\tdelete(sc.sockets, id)\n\tsc.deleteSelfIfReady()\n}\n\nfunc (sc *SubChannel) triggerDelete() {\n\tsc.closeCalled = true\n\tsc.deleteSelfIfReady()\n}\n\nfunc (sc *SubChannel) getParentID() int64 {\n\treturn sc.parent.ID\n}\n\n// deleteSelfFromTree tries to delete the subchannel from the channelz entry relation tree, which\n// means deleting the subchannel reference from its parent's child list.\n//\n// In order for a subchannel to be deleted from the tree, it must meet the criteria that, removal of\n// the corresponding grpc object has been invoked, and the subchannel does not have any children left.\n//\n// The returned boolean value indicates whether the channel has been successfully deleted from tree.\nfunc (sc *SubChannel) deleteSelfFromTree() (deleted bool) {\n\tif !sc.closeCalled || len(sc.sockets) != 0 {\n\t\treturn false\n\t}\n\tsc.parent.deleteChild(sc.ID)\n\treturn true\n}\n\n// deleteSelfFromMap checks whether it is valid to delete the subchannel from the map, which means\n// deleting the subchannel from channelz's tracking entirely. Users can no longer use id to query\n// the subchannel, and its memory will be garbage collected.\n//\n// The trace reference count of the subchannel must be 0 in order to be deleted from the map. This is\n// specified in the channel tracing gRFC that as long as some other trace has reference to an entity,\n// the trace of the referenced entity must not be deleted. In order to release the resource allocated\n// by grpc, the reference to the grpc object is reset to a dummy object.\n//\n// deleteSelfFromMap must be called after deleteSelfFromTree returns true.\n//\n// It returns a bool to indicate whether the channel can be safely deleted from map.\nfunc (sc *SubChannel) deleteSelfFromMap() (delete bool) {\n\treturn sc.getTraceRefCount() == 0\n}\n\n// deleteSelfIfReady tries to delete the subchannel itself from the channelz database.\n// The delete process includes two steps:\n//  1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from\n//     its parent's child list.\n//  2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup\n//     by id will return entry not found error.\nfunc (sc *SubChannel) deleteSelfIfReady() {\n\tif !sc.deleteSelfFromTree() {\n\t\treturn\n\t}\n\tif !sc.deleteSelfFromMap() {\n\t\treturn\n\t}\n\tdb.deleteEntry(sc.ID)\n\tsc.trace.clear()\n}\n\nfunc (sc *SubChannel) getChannelTrace() *ChannelTrace {\n\treturn sc.trace\n}\n\nfunc (sc *SubChannel) incrTraceRefCount() {\n\tatomic.AddInt32(&sc.traceRefCount, 1)\n}\n\nfunc (sc *SubChannel) decrTraceRefCount() {\n\tatomic.AddInt32(&sc.traceRefCount, -1)\n}\n\nfunc (sc *SubChannel) getTraceRefCount() int {\n\ti := atomic.LoadInt32(&sc.traceRefCount)\n\treturn int(i)\n}\n\nfunc (sc *SubChannel) getRefName() string {\n\treturn sc.RefName\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/syscall_linux.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"syscall\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// SocketOptionData defines the struct to hold socket option data, and related\n// getter function to obtain info from fd.\ntype SocketOptionData struct {\n\tLinger      *unix.Linger\n\tRecvTimeout *unix.Timeval\n\tSendTimeout *unix.Timeval\n\tTCPInfo     *unix.TCPInfo\n}\n\n// Getsockopt defines the function to get socket options requested by channelz.\n// It is to be passed to syscall.RawConn.Control().\nfunc (s *SocketOptionData) Getsockopt(fd uintptr) {\n\tif v, err := unix.GetsockoptLinger(int(fd), syscall.SOL_SOCKET, syscall.SO_LINGER); err == nil {\n\t\ts.Linger = v\n\t}\n\tif v, err := unix.GetsockoptTimeval(int(fd), syscall.SOL_SOCKET, syscall.SO_RCVTIMEO); err == nil {\n\t\ts.RecvTimeout = v\n\t}\n\tif v, err := unix.GetsockoptTimeval(int(fd), syscall.SOL_SOCKET, syscall.SO_SNDTIMEO); err == nil {\n\t\ts.SendTimeout = v\n\t}\n\tif v, err := unix.GetsockoptTCPInfo(int(fd), syscall.SOL_TCP, syscall.TCP_INFO); err == nil {\n\t\ts.TCPInfo = v\n\t}\n}\n\n// GetSocketOption gets the socket option info of the conn.\nfunc GetSocketOption(socket any) *SocketOptionData {\n\tc, ok := socket.(syscall.Conn)\n\tif !ok {\n\t\treturn nil\n\t}\n\tdata := &SocketOptionData{}\n\tif rawConn, err := c.SyscallConn(); err == nil {\n\t\trawConn.Control(data.Getsockopt)\n\t\treturn data\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go",
    "content": "//go:build !linux\n\n/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"sync\"\n)\n\nvar once sync.Once\n\n// SocketOptionData defines the struct to hold socket option data, and related\n// getter function to obtain info from fd.\n// Windows OS doesn't support Socket Option\ntype SocketOptionData struct {\n}\n\n// Getsockopt defines the function to get socket options requested by channelz.\n// It is to be passed to syscall.RawConn.Control().\n// Windows OS doesn't support Socket Option\nfunc (s *SocketOptionData) Getsockopt(uintptr) {\n\tonce.Do(func() {\n\t\tlogger.Warning(\"Channelz: socket options are not supported on non-linux environments\")\n\t})\n}\n\n// GetSocketOption gets the socket option info of the conn.\nfunc GetSocketOption(any) *SocketOptionData {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/channelz/trace.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage channelz\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nconst (\n\tdefaultMaxTraceEntry int32 = 30\n)\n\nvar maxTraceEntry = defaultMaxTraceEntry\n\n// SetMaxTraceEntry sets maximum number of trace entries per entity (i.e.\n// channel/subchannel).  Setting it to 0 will disable channel tracing.\nfunc SetMaxTraceEntry(i int32) {\n\tatomic.StoreInt32(&maxTraceEntry, i)\n}\n\n// ResetMaxTraceEntryToDefault resets the maximum number of trace entries per\n// entity to default.\nfunc ResetMaxTraceEntryToDefault() {\n\tatomic.StoreInt32(&maxTraceEntry, defaultMaxTraceEntry)\n}\n\nfunc getMaxTraceEntry() int {\n\ti := atomic.LoadInt32(&maxTraceEntry)\n\treturn int(i)\n}\n\n// traceEvent is an internal representation of a single trace event\ntype traceEvent struct {\n\t// Desc is a simple description of the trace event.\n\tDesc string\n\t// Severity states the severity of this trace event.\n\tSeverity Severity\n\t// Timestamp is the event time.\n\tTimestamp time.Time\n\t// RefID is the id of the entity that gets referenced in the event. RefID is 0 if no other entity is\n\t// involved in this event.\n\t// e.g. SubChannel (id: 4[]) Created. --> RefID = 4, RefName = \"\" (inside [])\n\tRefID int64\n\t// RefName is the reference name for the entity that gets referenced in the event.\n\tRefName string\n\t// RefType indicates the referenced entity type, i.e Channel or SubChannel.\n\tRefType RefChannelType\n}\n\n// TraceEvent is what the caller of AddTraceEvent should provide to describe the\n// event to be added to the channel trace.\n//\n// The Parent field is optional. It is used for an event that will be recorded\n// in the entity's parent trace.\ntype TraceEvent struct {\n\tDesc     string\n\tSeverity Severity\n\tParent   *TraceEvent\n}\n\n// ChannelTrace provides tracing information for a channel.\n// It tracks various events and metadata related to the channel's lifecycle\n// and operations.\ntype ChannelTrace struct {\n\tcm          *channelMap\n\tclearCalled bool\n\t// The time when the trace was created.\n\tCreationTime time.Time\n\t// A counter for the number of events recorded in the\n\t// trace.\n\tEventNum int64\n\tmu       sync.Mutex\n\t// A slice of traceEvent pointers representing the events recorded for\n\t// this channel.\n\tEvents []*traceEvent\n}\n\nfunc (c *ChannelTrace) copy() *ChannelTrace {\n\treturn &ChannelTrace{\n\t\tCreationTime: c.CreationTime,\n\t\tEventNum:     c.EventNum,\n\t\tEvents:       append(([]*traceEvent)(nil), c.Events...),\n\t}\n}\n\nfunc (c *ChannelTrace) append(e *traceEvent) {\n\tc.mu.Lock()\n\tif len(c.Events) == getMaxTraceEntry() {\n\t\tdel := c.Events[0]\n\t\tc.Events = c.Events[1:]\n\t\tif del.RefID != 0 {\n\t\t\t// start recursive cleanup in a goroutine to not block the call originated from grpc.\n\t\t\tgo func() {\n\t\t\t\t// need to acquire c.cm.mu lock to call the unlocked attemptCleanup func.\n\t\t\t\tc.cm.mu.Lock()\n\t\t\t\tc.cm.decrTraceRefCount(del.RefID)\n\t\t\t\tc.cm.mu.Unlock()\n\t\t\t}()\n\t\t}\n\t}\n\te.Timestamp = time.Now()\n\tc.Events = append(c.Events, e)\n\tc.EventNum++\n\tc.mu.Unlock()\n}\n\nfunc (c *ChannelTrace) clear() {\n\tif c.clearCalled {\n\t\treturn\n\t}\n\tc.clearCalled = true\n\tc.mu.Lock()\n\tfor _, e := range c.Events {\n\t\tif e.RefID != 0 {\n\t\t\t// caller should have already held the c.cm.mu lock.\n\t\t\tc.cm.decrTraceRefCount(e.RefID)\n\t\t}\n\t}\n\tc.mu.Unlock()\n}\n\n// Severity is the severity level of a trace event.\n// The canonical enumeration of all valid values is here:\n// https://github.com/grpc/grpc-proto/blob/9b13d199cc0d4703c7ea26c9c330ba695866eb23/grpc/channelz/v1/channelz.proto#L126.\ntype Severity int\n\nconst (\n\t// CtUnknown indicates unknown severity of a trace event.\n\tCtUnknown Severity = iota\n\t// CtInfo indicates info level severity of a trace event.\n\tCtInfo\n\t// CtWarning indicates warning level severity of a trace event.\n\tCtWarning\n\t// CtError indicates error level severity of a trace event.\n\tCtError\n)\n\n// RefChannelType is the type of the entity being referenced in a trace event.\ntype RefChannelType int\n\nconst (\n\t// RefUnknown indicates an unknown entity type, the zero value for this type.\n\tRefUnknown RefChannelType = iota\n\t// RefChannel indicates the referenced entity is a Channel.\n\tRefChannel\n\t// RefSubChannel indicates the referenced entity is a SubChannel.\n\tRefSubChannel\n\t// RefServer indicates the referenced entity is a Server.\n\tRefServer\n\t// RefListenSocket indicates the referenced entity is a ListenSocket.\n\tRefListenSocket\n\t// RefNormalSocket indicates the referenced entity is a NormalSocket.\n\tRefNormalSocket\n)\n\nvar refChannelTypeToString = map[RefChannelType]string{\n\tRefUnknown:      \"Unknown\",\n\tRefChannel:      \"Channel\",\n\tRefSubChannel:   \"SubChannel\",\n\tRefServer:       \"Server\",\n\tRefListenSocket: \"ListenSocket\",\n\tRefNormalSocket: \"NormalSocket\",\n}\n\n// String returns a string representation of the RefChannelType\nfunc (r RefChannelType) String() string {\n\treturn refChannelTypeToString[r]\n}\n\n// AddTraceEvent adds trace related to the entity with specified id, using the\n// provided TraceEventDesc.\n//\n// If channelz is not turned ON, this will simply log the event descriptions.\nfunc AddTraceEvent(l grpclog.DepthLoggerV2, e Entity, depth int, desc *TraceEvent) {\n\t// Log only the trace description associated with the bottom most entity.\n\td := fmt.Sprintf(\"[%s] %s\", e, desc.Desc)\n\tswitch desc.Severity {\n\tcase CtUnknown, CtInfo:\n\t\tl.InfoDepth(depth+1, d)\n\tcase CtWarning:\n\t\tl.WarningDepth(depth+1, d)\n\tcase CtError:\n\t\tl.ErrorDepth(depth+1, d)\n\t}\n\n\tif getMaxTraceEntry() == 0 {\n\t\treturn\n\t}\n\tif IsOn() {\n\t\tdb.traceEvent(e.id(), desc)\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/credentials/credentials.go",
    "content": "/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage credentials\n\nimport (\n\t\"context\"\n)\n\n// clientHandshakeInfoKey is a struct used as the key to store\n// ClientHandshakeInfo in a context.\ntype clientHandshakeInfoKey struct{}\n\n// ClientHandshakeInfoFromContext extracts the ClientHandshakeInfo from ctx.\nfunc ClientHandshakeInfoFromContext(ctx context.Context) any {\n\treturn ctx.Value(clientHandshakeInfoKey{})\n}\n\n// NewClientHandshakeInfoContext creates a context with chi.\nfunc NewClientHandshakeInfoContext(ctx context.Context, chi any) context.Context {\n\treturn context.WithValue(ctx, clientHandshakeInfoKey{}, chi)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/credentials/spiffe.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package credentials defines APIs for parsing SPIFFE ID.\n//\n// All APIs in this package are experimental.\npackage credentials\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"net/url\"\n\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nvar logger = grpclog.Component(\"credentials\")\n\n// SPIFFEIDFromState parses the SPIFFE ID from State. If the SPIFFE ID format\n// is invalid, return nil with warning.\nfunc SPIFFEIDFromState(state tls.ConnectionState) *url.URL {\n\tif len(state.PeerCertificates) == 0 || len(state.PeerCertificates[0].URIs) == 0 {\n\t\treturn nil\n\t}\n\treturn SPIFFEIDFromCert(state.PeerCertificates[0])\n}\n\n// SPIFFEIDFromCert parses the SPIFFE ID from x509.Certificate. If the SPIFFE\n// ID format is invalid, return nil with warning.\nfunc SPIFFEIDFromCert(cert *x509.Certificate) *url.URL {\n\tif cert == nil || cert.URIs == nil {\n\t\treturn nil\n\t}\n\tvar spiffeID *url.URL\n\tfor _, uri := range cert.URIs {\n\t\tif uri == nil || uri.Scheme != \"spiffe\" || uri.Opaque != \"\" || (uri.User != nil && uri.User.Username() != \"\") {\n\t\t\tcontinue\n\t\t}\n\t\t// From this point, we assume the uri is intended for a SPIFFE ID.\n\t\tif len(uri.String()) > 2048 {\n\t\t\tlogger.Warning(\"invalid SPIFFE ID: total ID length larger than 2048 bytes\")\n\t\t\treturn nil\n\t\t}\n\t\tif len(uri.Host) == 0 || len(uri.Path) == 0 {\n\t\t\tlogger.Warning(\"invalid SPIFFE ID: domain or workload ID is empty\")\n\t\t\treturn nil\n\t\t}\n\t\tif len(uri.Host) > 255 {\n\t\t\tlogger.Warning(\"invalid SPIFFE ID: domain length larger than 255 characters\")\n\t\t\treturn nil\n\t\t}\n\t\t// A valid SPIFFE certificate can only have exactly one URI SAN field.\n\t\tif len(cert.URIs) > 1 {\n\t\t\tlogger.Warning(\"invalid SPIFFE ID: multiple URI SANs\")\n\t\t\treturn nil\n\t\t}\n\t\tspiffeID = uri\n\t}\n\treturn spiffeID\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/credentials/syscallconn.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage credentials\n\nimport (\n\t\"net\"\n\t\"syscall\"\n)\n\ntype sysConn = syscall.Conn\n\n// syscallConn keeps reference of rawConn to support syscall.Conn for channelz.\n// SyscallConn() (the method in interface syscall.Conn) is explicitly\n// implemented on this type,\n//\n// Interface syscall.Conn is implemented by most net.Conn implementations (e.g.\n// TCPConn, UnixConn), but is not part of net.Conn interface. So wrapper conns\n// that embed net.Conn don't implement syscall.Conn. (Side note: tls.Conn\n// doesn't embed net.Conn, so even if syscall.Conn is part of net.Conn, it won't\n// help here).\ntype syscallConn struct {\n\tnet.Conn\n\t// sysConn is a type alias of syscall.Conn. It's necessary because the name\n\t// `Conn` collides with `net.Conn`.\n\tsysConn\n}\n\n// WrapSyscallConn tries to wrap rawConn and newConn into a net.Conn that\n// implements syscall.Conn. rawConn will be used to support syscall, and newConn\n// will be used for read/write.\n//\n// This function returns newConn if rawConn doesn't implement syscall.Conn.\nfunc WrapSyscallConn(rawConn, newConn net.Conn) net.Conn {\n\tsysConn, ok := rawConn.(syscall.Conn)\n\tif !ok {\n\t\treturn newConn\n\t}\n\treturn &syscallConn{\n\t\tConn:    newConn,\n\t\tsysConn: sysConn,\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/credentials/util.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage credentials\n\nimport (\n\t\"crypto/tls\"\n)\n\nconst alpnProtoStrH2 = \"h2\"\n\n// AppendH2ToNextProtos appends h2 to next protos.\nfunc AppendH2ToNextProtos(ps []string) []string {\n\tfor _, p := range ps {\n\t\tif p == alpnProtoStrH2 {\n\t\t\treturn ps\n\t\t}\n\t}\n\tret := make([]string, 0, len(ps)+1)\n\tret = append(ret, ps...)\n\treturn append(ret, alpnProtoStrH2)\n}\n\n// CloneTLSConfig returns a shallow clone of the exported\n// fields of cfg, ignoring the unexported sync.Once, which\n// contains a mutex and must not be copied.\n//\n// If cfg is nil, a new zero tls.Config is returned.\n//\n// TODO: inline this function if possible.\nfunc CloneTLSConfig(cfg *tls.Config) *tls.Config {\n\tif cfg == nil {\n\t\treturn &tls.Config{}\n\t}\n\n\treturn cfg.Clone()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/envconfig/envconfig.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package envconfig contains grpc settings configured by environment variables.\npackage envconfig\n\nimport (\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nvar (\n\t// EnableTXTServiceConfig is set if the DNS resolver should perform TXT\n\t// lookups for service config (\"GRPC_ENABLE_TXT_SERVICE_CONFIG\" is not\n\t// \"false\").\n\tEnableTXTServiceConfig = boolFromEnv(\"GRPC_ENABLE_TXT_SERVICE_CONFIG\", true)\n\n\t// TXTErrIgnore is set if TXT errors should be ignored\n\t// (\"GRPC_GO_IGNORE_TXT_ERRORS\" is not \"false\").\n\tTXTErrIgnore = boolFromEnv(\"GRPC_GO_IGNORE_TXT_ERRORS\", true)\n\n\t// RingHashCap indicates the maximum ring size which defaults to 4096\n\t// entries but may be overridden by setting the environment variable\n\t// \"GRPC_RING_HASH_CAP\".  This does not override the default bounds\n\t// checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M).\n\tRingHashCap = uint64FromEnv(\"GRPC_RING_HASH_CAP\", 4096, 1, 8*1024*1024)\n\n\t// ALTSMaxConcurrentHandshakes is the maximum number of concurrent ALTS\n\t// handshakes that can be performed.\n\tALTSMaxConcurrentHandshakes = uint64FromEnv(\"GRPC_ALTS_MAX_CONCURRENT_HANDSHAKES\", 100, 1, 100)\n\n\t// EnforceALPNEnabled is set if TLS connections to servers with ALPN disabled\n\t// should be rejected. The HTTP/2 protocol requires ALPN to be enabled, this\n\t// option is present for backward compatibility. This option may be overridden\n\t// by setting the environment variable \"GRPC_ENFORCE_ALPN_ENABLED\" to \"true\"\n\t// or \"false\".\n\tEnforceALPNEnabled = boolFromEnv(\"GRPC_ENFORCE_ALPN_ENABLED\", true)\n\n\t// XDSEndpointHashKeyBackwardCompat controls the parsing of the endpoint hash\n\t// key from EDS LbEndpoint metadata. Endpoint hash keys can be disabled by\n\t// setting \"GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT\" to \"true\". When the\n\t// implementation of A76 is stable, we will flip the default value to false\n\t// in a subsequent release. A final release will remove this environment\n\t// variable, enabling the new behavior unconditionally.\n\tXDSEndpointHashKeyBackwardCompat = boolFromEnv(\"GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT\", true)\n\n\t// RingHashSetRequestHashKey is set if the ring hash balancer can get the\n\t// request hash header by setting the \"requestHashHeader\" field, according\n\t// to gRFC A76. It can be enabled by setting the environment variable\n\t// \"GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY\" to \"true\".\n\tRingHashSetRequestHashKey = boolFromEnv(\"GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY\", false)\n\n\t// ALTSHandshakerKeepaliveParams is set if we should add the\n\t// KeepaliveParams when dial the ALTS handshaker service.\n\tALTSHandshakerKeepaliveParams = boolFromEnv(\"GRPC_EXPERIMENTAL_ALTS_HANDSHAKER_KEEPALIVE_PARAMS\", false)\n\n\t// EnableDefaultPortForProxyTarget controls whether the resolver adds a default port 443\n\t// to a target address that lacks one. This flag only has an effect when all of\n\t// the following conditions are met:\n\t//   - A connect proxy is being used.\n\t//   - Target resolution is disabled.\n\t//   - The DNS resolver is being used.\n\tEnableDefaultPortForProxyTarget = boolFromEnv(\"GRPC_EXPERIMENTAL_ENABLE_DEFAULT_PORT_FOR_PROXY_TARGET\", true)\n\n\t// XDSAuthorityRewrite indicates whether xDS authority rewriting is enabled.\n\t// This feature is defined in gRFC A81 and is enabled by setting the\n\t// environment variable GRPC_EXPERIMENTAL_XDS_AUTHORITY_REWRITE to \"true\".\n\tXDSAuthorityRewrite = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_AUTHORITY_REWRITE\", false)\n)\n\nfunc boolFromEnv(envVar string, def bool) bool {\n\tif def {\n\t\t// The default is true; return true unless the variable is \"false\".\n\t\treturn !strings.EqualFold(os.Getenv(envVar), \"false\")\n\t}\n\t// The default is false; return false unless the variable is \"true\".\n\treturn strings.EqualFold(os.Getenv(envVar), \"true\")\n}\n\nfunc uint64FromEnv(envVar string, def, min, max uint64) uint64 {\n\tv, err := strconv.ParseUint(os.Getenv(envVar), 10, 64)\n\tif err != nil {\n\t\treturn def\n\t}\n\tif v < min {\n\t\treturn min\n\t}\n\tif v > max {\n\t\treturn max\n\t}\n\treturn v\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/envconfig/observability.go",
    "content": "/*\n *\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage envconfig\n\nimport \"os\"\n\nconst (\n\tenvObservabilityConfig     = \"GRPC_GCP_OBSERVABILITY_CONFIG\"\n\tenvObservabilityConfigFile = \"GRPC_GCP_OBSERVABILITY_CONFIG_FILE\"\n)\n\nvar (\n\t// ObservabilityConfig is the json configuration for the gcp/observability\n\t// package specified directly in the envObservabilityConfig env var.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tObservabilityConfig = os.Getenv(envObservabilityConfig)\n\t// ObservabilityConfigFile is the json configuration for the\n\t// gcp/observability specified in a file with the location specified in\n\t// envObservabilityConfigFile env var.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tObservabilityConfigFile = os.Getenv(envObservabilityConfigFile)\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/envconfig/xds.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage envconfig\n\nimport (\n\t\"os\"\n)\n\nconst (\n\t// XDSBootstrapFileNameEnv is the env variable to set bootstrap file name.\n\t// Do not use this and read from env directly. Its value is read and kept in\n\t// variable XDSBootstrapFileName.\n\t//\n\t// When both bootstrap FileName and FileContent are set, FileName is used.\n\tXDSBootstrapFileNameEnv = \"GRPC_XDS_BOOTSTRAP\"\n\t// XDSBootstrapFileContentEnv is the env variable to set bootstrap file\n\t// content. Do not use this and read from env directly. Its value is read\n\t// and kept in variable XDSBootstrapFileContent.\n\t//\n\t// When both bootstrap FileName and FileContent are set, FileName is used.\n\tXDSBootstrapFileContentEnv = \"GRPC_XDS_BOOTSTRAP_CONFIG\"\n)\n\nvar (\n\t// XDSBootstrapFileName holds the name of the file which contains xDS\n\t// bootstrap configuration. Users can specify the location of the bootstrap\n\t// file by setting the environment variable \"GRPC_XDS_BOOTSTRAP\".\n\t//\n\t// When both bootstrap FileName and FileContent are set, FileName is used.\n\tXDSBootstrapFileName = os.Getenv(XDSBootstrapFileNameEnv)\n\t// XDSBootstrapFileContent holds the content of the xDS bootstrap\n\t// configuration. Users can specify the bootstrap config by setting the\n\t// environment variable \"GRPC_XDS_BOOTSTRAP_CONFIG\".\n\t//\n\t// When both bootstrap FileName and FileContent are set, FileName is used.\n\tXDSBootstrapFileContent = os.Getenv(XDSBootstrapFileContentEnv)\n\n\t// C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing.\n\tC2PResolverTestOnlyTrafficDirectorURI = os.Getenv(\"GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI\")\n\n\t// XDSDualstackEndpointsEnabled is true if gRPC should read the\n\t// \"additional addresses\" in the xDS endpoint resource.\n\tXDSDualstackEndpointsEnabled = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS\", true)\n\n\t// XDSSystemRootCertsEnabled is true when xDS enabled gRPC clients can use\n\t// the system's default root certificates for TLS certificate validation.\n\t// For more details, see:\n\t// https://github.com/grpc/proposal/blob/master/A82-xds-system-root-certs.md.\n\tXDSSystemRootCertsEnabled = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_SYSTEM_ROOT_CERTS\", false)\n\n\t// XDSSPIFFEEnabled controls if SPIFFE Bundle Maps can be used as roots of\n\t// trust.  For more details, see:\n\t// https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md\n\tXDSSPIFFEEnabled = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_MTLS_SPIFFE\", false)\n\n\t// XDSHTTPConnectEnabled is true if gRPC should parse custom Metadata\n\t// configuring use of an HTTP CONNECT proxy via xDS from cluster resources.\n\t// For more details, see:\n\t// https://github.com/grpc/proposal/blob/master/A86-xds-http-connect.md\n\tXDSHTTPConnectEnabled = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_HTTP_CONNECT\", false)\n\n\t// XDSBootstrapCallCredsEnabled controls if call credentials can be used in\n\t// xDS bootstrap configuration via the `call_creds` field. For more details,\n\t// see: https://github.com/grpc/proposal/blob/master/A97-xds-jwt-call-creds.md\n\tXDSBootstrapCallCredsEnabled = boolFromEnv(\"GRPC_EXPERIMENTAL_XDS_BOOTSTRAP_CALL_CREDS\", false)\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/experimental.go",
    "content": "/*\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\nvar (\n\t// WithBufferPool is implemented by the grpc package and returns a dial\n\t// option to configure a shared buffer pool for a grpc.ClientConn.\n\tWithBufferPool any // func (grpc.SharedBufferPool) grpc.DialOption\n\n\t// BufferPool is implemented by the grpc package and returns a server\n\t// option to configure a shared buffer pool for a grpc.Server.\n\tBufferPool any // func (grpc.SharedBufferPool) grpc.ServerOption\n\n\t// AcceptCompressors is implemented by the grpc package and returns\n\t// a call option that restricts the grpc-accept-encoding header for a call.\n\tAcceptCompressors any // func(...string) grpc.CallOption\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpclog/prefix_logger.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package grpclog provides logging functionality for internal gRPC packages,\n// outside of the functionality provided by the external `grpclog` package.\npackage grpclog\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/grpclog\"\n)\n\n// PrefixLogger does logging with a prefix.\n//\n// Logging method on a nil logs without any prefix.\ntype PrefixLogger struct {\n\tlogger grpclog.DepthLoggerV2\n\tprefix string\n}\n\n// Infof does info logging.\nfunc (pl *PrefixLogger) Infof(format string, args ...any) {\n\tif pl != nil {\n\t\t// Handle nil, so the tests can pass in a nil logger.\n\t\tformat = pl.prefix + format\n\t\tpl.logger.InfoDepth(1, fmt.Sprintf(format, args...))\n\t\treturn\n\t}\n\tgrpclog.InfoDepth(1, fmt.Sprintf(format, args...))\n}\n\n// Warningf does warning logging.\nfunc (pl *PrefixLogger) Warningf(format string, args ...any) {\n\tif pl != nil {\n\t\tformat = pl.prefix + format\n\t\tpl.logger.WarningDepth(1, fmt.Sprintf(format, args...))\n\t\treturn\n\t}\n\tgrpclog.WarningDepth(1, fmt.Sprintf(format, args...))\n}\n\n// Errorf does error logging.\nfunc (pl *PrefixLogger) Errorf(format string, args ...any) {\n\tif pl != nil {\n\t\tformat = pl.prefix + format\n\t\tpl.logger.ErrorDepth(1, fmt.Sprintf(format, args...))\n\t\treturn\n\t}\n\tgrpclog.ErrorDepth(1, fmt.Sprintf(format, args...))\n}\n\n// V reports whether verbosity level l is at least the requested verbose level.\nfunc (pl *PrefixLogger) V(l int) bool {\n\tif pl != nil {\n\t\treturn pl.logger.V(l)\n\t}\n\treturn true\n}\n\n// NewPrefixLogger creates a prefix logger with the given prefix.\nfunc NewPrefixLogger(logger grpclog.DepthLoggerV2, prefix string) *PrefixLogger {\n\treturn &PrefixLogger{logger: logger, prefix: prefix}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go",
    "content": "/*\n *\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcsync\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/grpc/internal/buffer\"\n)\n\n// CallbackSerializer provides a mechanism to schedule callbacks in a\n// synchronized manner. It provides a FIFO guarantee on the order of execution\n// of scheduled callbacks. New callbacks can be scheduled by invoking the\n// Schedule() method.\n//\n// This type is safe for concurrent access.\ntype CallbackSerializer struct {\n\t// done is closed once the serializer is shut down completely, i.e all\n\t// scheduled callbacks are executed and the serializer has deallocated all\n\t// its resources.\n\tdone chan struct{}\n\n\tcallbacks *buffer.Unbounded\n}\n\n// NewCallbackSerializer returns a new CallbackSerializer instance. The provided\n// context will be passed to the scheduled callbacks. Users should cancel the\n// provided context to shutdown the CallbackSerializer. It is guaranteed that no\n// callbacks will be added once this context is canceled, and any pending un-run\n// callbacks will be executed before the serializer is shut down.\nfunc NewCallbackSerializer(ctx context.Context) *CallbackSerializer {\n\tcs := &CallbackSerializer{\n\t\tdone:      make(chan struct{}),\n\t\tcallbacks: buffer.NewUnbounded(),\n\t}\n\tgo cs.run(ctx)\n\treturn cs\n}\n\n// TrySchedule tries to schedule the provided callback function f to be\n// executed in the order it was added. This is a best-effort operation. If the\n// context passed to NewCallbackSerializer was canceled before this method is\n// called, the callback will not be scheduled.\n//\n// Callbacks are expected to honor the context when performing any blocking\n// operations, and should return early when the context is canceled.\nfunc (cs *CallbackSerializer) TrySchedule(f func(ctx context.Context)) {\n\tcs.callbacks.Put(f)\n}\n\n// ScheduleOr schedules the provided callback function f to be executed in the\n// order it was added. If the context passed to NewCallbackSerializer has been\n// canceled before this method is called, the onFailure callback will be\n// executed inline instead.\n//\n// Callbacks are expected to honor the context when performing any blocking\n// operations, and should return early when the context is canceled.\nfunc (cs *CallbackSerializer) ScheduleOr(f func(ctx context.Context), onFailure func()) {\n\tif cs.callbacks.Put(f) != nil {\n\t\tonFailure()\n\t}\n}\n\nfunc (cs *CallbackSerializer) run(ctx context.Context) {\n\tdefer close(cs.done)\n\n\t// Close the buffer when the context is canceled\n\t// to prevent new callbacks from being added.\n\tcontext.AfterFunc(ctx, cs.callbacks.Close)\n\n\t// Run all callbacks.\n\tfor cb := range cs.callbacks.Get() {\n\t\tcs.callbacks.Load()\n\t\tcb.(func(context.Context))(ctx)\n\t}\n}\n\n// Done returns a channel that is closed after the context passed to\n// NewCallbackSerializer is canceled and all callbacks have been executed.\nfunc (cs *CallbackSerializer) Done() <-chan struct{} {\n\treturn cs.done\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcsync/event.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package grpcsync implements additional synchronization primitives built upon\n// the sync package.\npackage grpcsync\n\nimport (\n\t\"sync/atomic\"\n)\n\n// Event represents a one-time event that may occur in the future.\ntype Event struct {\n\tfired atomic.Bool\n\tc     chan struct{}\n}\n\n// Fire causes e to complete.  It is safe to call multiple times, and\n// concurrently.  It returns true iff this call to Fire caused the signaling\n// channel returned by Done to close. If Fire returns false, it is possible\n// the Done channel has not been closed yet.\nfunc (e *Event) Fire() bool {\n\tif e.fired.CompareAndSwap(false, true) {\n\t\tclose(e.c)\n\t\treturn true\n\t}\n\treturn false\n}\n\n// Done returns a channel that will be closed when Fire is called.\nfunc (e *Event) Done() <-chan struct{} {\n\treturn e.c\n}\n\n// HasFired returns true if Fire has been called.\nfunc (e *Event) HasFired() bool {\n\treturn e.fired.Load()\n}\n\n// NewEvent returns a new, ready-to-use Event.\nfunc NewEvent() *Event {\n\treturn &Event{c: make(chan struct{})}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go",
    "content": "/*\n *\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcsync\n\nimport (\n\t\"context\"\n\t\"sync\"\n)\n\n// Subscriber represents an entity that is subscribed to messages published on\n// a PubSub. It wraps the callback to be invoked by the PubSub when a new\n// message is published.\ntype Subscriber interface {\n\t// OnMessage is invoked when a new message is published. Implementations\n\t// must not block in this method.\n\tOnMessage(msg any)\n}\n\n// PubSub is a simple one-to-many publish-subscribe system that supports\n// messages of arbitrary type. It guarantees that messages are delivered in\n// the same order in which they were published.\n//\n// Publisher invokes the Publish() method to publish new messages, while\n// subscribers interested in receiving these messages register a callback\n// via the Subscribe() method.\n//\n// Once a PubSub is stopped, no more messages can be published, but any pending\n// published messages will be delivered to the subscribers.  Done may be used\n// to determine when all published messages have been delivered.\ntype PubSub struct {\n\tcs *CallbackSerializer\n\n\t// Access to the below fields are guarded by this mutex.\n\tmu          sync.Mutex\n\tmsg         any\n\tsubscribers map[Subscriber]bool\n}\n\n// NewPubSub returns a new PubSub instance.  Users should cancel the\n// provided context to shutdown the PubSub.\nfunc NewPubSub(ctx context.Context) *PubSub {\n\treturn &PubSub{\n\t\tcs:          NewCallbackSerializer(ctx),\n\t\tsubscribers: map[Subscriber]bool{},\n\t}\n}\n\n// Subscribe registers the provided Subscriber to the PubSub.\n//\n// If the PubSub contains a previously published message, the Subscriber's\n// OnMessage() callback will be invoked asynchronously with the existing\n// message to begin with, and subsequently for every newly published message.\n//\n// The caller is responsible for invoking the returned cancel function to\n// unsubscribe itself from the PubSub.\nfunc (ps *PubSub) Subscribe(sub Subscriber) (cancel func()) {\n\tps.mu.Lock()\n\tdefer ps.mu.Unlock()\n\n\tps.subscribers[sub] = true\n\n\tif ps.msg != nil {\n\t\tmsg := ps.msg\n\t\tps.cs.TrySchedule(func(context.Context) {\n\t\t\tps.mu.Lock()\n\t\t\tdefer ps.mu.Unlock()\n\t\t\tif !ps.subscribers[sub] {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsub.OnMessage(msg)\n\t\t})\n\t}\n\n\treturn func() {\n\t\tps.mu.Lock()\n\t\tdefer ps.mu.Unlock()\n\t\tdelete(ps.subscribers, sub)\n\t}\n}\n\n// Publish publishes the provided message to the PubSub, and invokes\n// callbacks registered by subscribers asynchronously.\nfunc (ps *PubSub) Publish(msg any) {\n\tps.mu.Lock()\n\tdefer ps.mu.Unlock()\n\n\tps.msg = msg\n\tfor sub := range ps.subscribers {\n\t\ts := sub\n\t\tps.cs.TrySchedule(func(context.Context) {\n\t\t\tps.mu.Lock()\n\t\t\tdefer ps.mu.Unlock()\n\t\t\tif !ps.subscribers[s] {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ts.OnMessage(msg)\n\t\t})\n\t}\n}\n\n// Done returns a channel that is closed after the context passed to NewPubSub\n// is canceled and all updates have been sent to subscribers.\nfunc (ps *PubSub) Done() <-chan struct{} {\n\treturn ps.cs.Done()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/compressor.go",
    "content": "/*\n *\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcutil\n\nimport (\n\t\"strings\"\n)\n\n// RegisteredCompressorNames holds names of the registered compressors.\nvar RegisteredCompressorNames []string\n\n// IsCompressorNameRegistered returns true when name is available in registry.\nfunc IsCompressorNameRegistered(name string) bool {\n\tfor _, compressor := range RegisteredCompressorNames {\n\t\tif compressor == name {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// RegisteredCompressors returns a string of registered compressor names\n// separated by comma.\nfunc RegisteredCompressors() string {\n\treturn strings.Join(RegisteredCompressorNames, \",\")\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/encode_duration.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcutil\n\nimport (\n\t\"strconv\"\n\t\"time\"\n)\n\nconst maxTimeoutValue int64 = 100000000 - 1\n\n// div does integer division and round-up the result. Note that this is\n// equivalent to (d+r-1)/r but has less chance to overflow.\nfunc div(d, r time.Duration) int64 {\n\tif d%r > 0 {\n\t\treturn int64(d/r + 1)\n\t}\n\treturn int64(d / r)\n}\n\n// EncodeDuration encodes the duration to the format grpc-timeout header\n// accepts.\n//\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests\nfunc EncodeDuration(t time.Duration) string {\n\t// TODO: This is simplistic and not bandwidth efficient. Improve it.\n\tif t <= 0 {\n\t\treturn \"0n\"\n\t}\n\tif d := div(t, time.Nanosecond); d <= maxTimeoutValue {\n\t\treturn strconv.FormatInt(d, 10) + \"n\"\n\t}\n\tif d := div(t, time.Microsecond); d <= maxTimeoutValue {\n\t\treturn strconv.FormatInt(d, 10) + \"u\"\n\t}\n\tif d := div(t, time.Millisecond); d <= maxTimeoutValue {\n\t\treturn strconv.FormatInt(d, 10) + \"m\"\n\t}\n\tif d := div(t, time.Second); d <= maxTimeoutValue {\n\t\treturn strconv.FormatInt(d, 10) + \"S\"\n\t}\n\tif d := div(t, time.Minute); d <= maxTimeoutValue {\n\t\treturn strconv.FormatInt(d, 10) + \"M\"\n\t}\n\t// Note that maxTimeoutValue * time.Hour > MaxInt64.\n\treturn strconv.FormatInt(div(t, time.Hour), 10) + \"H\"\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go",
    "content": "/*\n *\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package grpcutil provides utility functions used across the gRPC codebase.\npackage grpcutil\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/metadata.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcutil\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/grpc/metadata\"\n)\n\ntype mdExtraKey struct{}\n\n// WithExtraMetadata creates a new context with incoming md attached.\nfunc WithExtraMetadata(ctx context.Context, md metadata.MD) context.Context {\n\treturn context.WithValue(ctx, mdExtraKey{}, md)\n}\n\n// ExtraMetadata returns the incoming metadata in ctx if it exists.  The\n// returned MD should not be modified. Writing to it may cause races.\n// Modification should be made to copies of the returned MD.\nfunc ExtraMetadata(ctx context.Context) (md metadata.MD, ok bool) {\n\tmd, ok = ctx.Value(mdExtraKey{}).(metadata.MD)\n\treturn\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/method.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcutil\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\n// ParseMethod splits service and method from the input. It expects format\n// \"/service/method\".\nfunc ParseMethod(methodName string) (service, method string, _ error) {\n\tif !strings.HasPrefix(methodName, \"/\") {\n\t\treturn \"\", \"\", errors.New(\"invalid method name: should start with /\")\n\t}\n\tmethodName = methodName[1:]\n\n\tpos := strings.LastIndex(methodName, \"/\")\n\tif pos < 0 {\n\t\treturn \"\", \"\", errors.New(\"invalid method name: suffix /method is missing\")\n\t}\n\treturn methodName[:pos], methodName[pos+1:], nil\n}\n\n// baseContentType is the base content-type for gRPC.  This is a valid\n// content-type on its own, but can also include a content-subtype such as\n// \"proto\" as a suffix after \"+\" or \";\".  See\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests\n// for more details.\nconst baseContentType = \"application/grpc\"\n\n// ContentSubtype returns the content-subtype for the given content-type.  The\n// given content-type must be a valid content-type that starts with\n// \"application/grpc\". A content-subtype will follow \"application/grpc\" after a\n// \"+\" or \";\". See\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details.\n//\n// If contentType is not a valid content-type for gRPC, the boolean\n// will be false, otherwise true. If content-type == \"application/grpc\",\n// \"application/grpc+\", or \"application/grpc;\", the boolean will be true,\n// but no content-subtype will be returned.\n//\n// contentType is assumed to be lowercase already.\nfunc ContentSubtype(contentType string) (string, bool) {\n\tif contentType == baseContentType {\n\t\treturn \"\", true\n\t}\n\tif !strings.HasPrefix(contentType, baseContentType) {\n\t\treturn \"\", false\n\t}\n\t// guaranteed since != baseContentType and has baseContentType prefix\n\tswitch contentType[len(baseContentType)] {\n\tcase '+', ';':\n\t\t// this will return true for \"application/grpc+\" or \"application/grpc;\"\n\t\t// which the previous validContentType function tested to be valid, so we\n\t\t// just say that no content-subtype is specified in this case\n\t\treturn contentType[len(baseContentType)+1:], true\n\tdefault:\n\t\treturn \"\", false\n\t}\n}\n\n// ContentType builds full content type with the given sub-type.\n//\n// contentSubtype is assumed to be lowercase\nfunc ContentType(contentSubtype string) string {\n\tif contentSubtype == \"\" {\n\t\treturn baseContentType\n\t}\n\treturn baseContentType + \"+\" + contentSubtype\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/grpcutil/regex.go",
    "content": "/*\n *\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpcutil\n\nimport \"regexp\"\n\n// FullMatchWithRegex returns whether the full text matches the regex provided.\nfunc FullMatchWithRegex(re *regexp.Regexp, text string) bool {\n\tif len(text) == 0 {\n\t\treturn re.MatchString(text)\n\t}\n\tre.Longest()\n\trem := re.FindString(text)\n\treturn len(rem) == len(text)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/idle/idle.go",
    "content": "/*\n *\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package idle contains a component for managing idleness (entering and exiting)\n// based on RPC activity.\npackage idle\n\nimport (\n\t\"math\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n)\n\n// For overriding in unit tests.\nvar timeAfterFunc = func(d time.Duration, f func()) *time.Timer {\n\treturn time.AfterFunc(d, f)\n}\n\n// ClientConn is the functionality provided by grpc.ClientConn to enter and exit\n// from idle mode.\ntype ClientConn interface {\n\tExitIdleMode()\n\tEnterIdleMode()\n}\n\n// Manager implements idleness detection and calls the ClientConn to enter/exit\n// idle mode when appropriate. Must be created by NewManager.\ntype Manager struct {\n\t// State accessed atomically.\n\tlastCallEndTime           int64 // Unix timestamp in nanos; time when the most recent RPC completed.\n\tactiveCallsCount          int32 // Count of active RPCs; -math.MaxInt32 means channel is idle or is trying to get there.\n\tactiveSinceLastTimerCheck int32 // Boolean; True if there was an RPC since the last timer callback.\n\tclosed                    int32 // Boolean; True when the manager is closed.\n\n\t// Can be accessed without atomics or mutex since these are set at creation\n\t// time and read-only after that.\n\tcc      ClientConn // Functionality provided by grpc.ClientConn.\n\ttimeout time.Duration\n\n\t// idleMu is used to guarantee mutual exclusion in two scenarios:\n\t// - Opposing intentions:\n\t//   - a: Idle timeout has fired and handleIdleTimeout() is trying to put\n\t//     the channel in idle mode because the channel has been inactive.\n\t//   - b: At the same time an RPC is made on the channel, and OnCallBegin()\n\t//     is trying to prevent the channel from going idle.\n\t// - Competing intentions:\n\t//   - The channel is in idle mode and there are multiple RPCs starting at\n\t//     the same time, all trying to move the channel out of idle. Only one\n\t//     of them should succeed in doing so, while the other RPCs should\n\t//     piggyback on the first one and be successfully handled.\n\tidleMu       sync.RWMutex\n\tactuallyIdle bool\n\ttimer        *time.Timer\n}\n\n// NewManager creates a new idleness manager implementation for the\n// given idle timeout.  It begins in idle mode.\nfunc NewManager(cc ClientConn, timeout time.Duration) *Manager {\n\treturn &Manager{\n\t\tcc:               cc,\n\t\ttimeout:          timeout,\n\t\tactuallyIdle:     true,\n\t\tactiveCallsCount: -math.MaxInt32,\n\t}\n}\n\n// resetIdleTimerLocked resets the idle timer to the given duration.  Called\n// when exiting idle mode or when the timer fires and we need to reset it.\nfunc (m *Manager) resetIdleTimerLocked(d time.Duration) {\n\tif m.isClosed() || m.timeout == 0 || m.actuallyIdle {\n\t\treturn\n\t}\n\n\t// It is safe to ignore the return value from Reset() because this method is\n\t// only ever called from the timer callback or when exiting idle mode.\n\tif m.timer != nil {\n\t\tm.timer.Stop()\n\t}\n\tm.timer = timeAfterFunc(d, m.handleIdleTimeout)\n}\n\nfunc (m *Manager) resetIdleTimer(d time.Duration) {\n\tm.idleMu.Lock()\n\tdefer m.idleMu.Unlock()\n\tm.resetIdleTimerLocked(d)\n}\n\n// handleIdleTimeout is the timer callback that is invoked upon expiry of the\n// configured idle timeout. The channel is considered inactive if there are no\n// ongoing calls and no RPC activity since the last time the timer fired.\nfunc (m *Manager) handleIdleTimeout() {\n\tif m.isClosed() {\n\t\treturn\n\t}\n\n\tif atomic.LoadInt32(&m.activeCallsCount) > 0 {\n\t\tm.resetIdleTimer(m.timeout)\n\t\treturn\n\t}\n\n\t// There has been activity on the channel since we last got here. Reset the\n\t// timer and return.\n\tif atomic.LoadInt32(&m.activeSinceLastTimerCheck) == 1 {\n\t\t// Set the timer to fire after a duration of idle timeout, calculated\n\t\t// from the time the most recent RPC completed.\n\t\tatomic.StoreInt32(&m.activeSinceLastTimerCheck, 0)\n\t\tm.resetIdleTimer(time.Duration(atomic.LoadInt64(&m.lastCallEndTime)-time.Now().UnixNano()) + m.timeout)\n\t\treturn\n\t}\n\n\t// Now that we've checked that there has been no activity, attempt to enter\n\t// idle mode, which is very likely to succeed.\n\tif m.tryEnterIdleMode(true) {\n\t\t// Successfully entered idle mode. No timer needed until we exit idle.\n\t\treturn\n\t}\n\n\t// Failed to enter idle mode due to a concurrent RPC that kept the channel\n\t// active, or because of an error from the channel. Undo the attempt to\n\t// enter idle, and reset the timer to try again later.\n\tm.resetIdleTimer(m.timeout)\n}\n\n// tryEnterIdleMode instructs the channel to enter idle mode. But before\n// that, it performs a last minute check to ensure that no new RPC has come in,\n// making the channel active.\n//\n// checkActivity controls if a check for RPC activity, since the last time the\n// idle_timeout fired, is made.\n\n// Return value indicates whether or not the channel moved to idle mode.\n//\n// Holds idleMu which ensures mutual exclusion with exitIdleMode.\nfunc (m *Manager) tryEnterIdleMode(checkActivity bool) bool {\n\t// Setting the activeCallsCount to -math.MaxInt32 indicates to OnCallBegin()\n\t// that the channel is either in idle mode or is trying to get there.\n\tif !atomic.CompareAndSwapInt32(&m.activeCallsCount, 0, -math.MaxInt32) {\n\t\t// This CAS operation can fail if an RPC started after we checked for\n\t\t// activity in the timer handler, or one was ongoing from before the\n\t\t// last time the timer fired, or if a test is attempting to enter idle\n\t\t// mode without checking.  In all cases, abort going into idle mode.\n\t\treturn false\n\t}\n\t// N.B. if we fail to enter idle mode after this, we must re-add\n\t// math.MaxInt32 to m.activeCallsCount.\n\n\tm.idleMu.Lock()\n\tdefer m.idleMu.Unlock()\n\n\tif atomic.LoadInt32(&m.activeCallsCount) != -math.MaxInt32 {\n\t\t// We raced and lost to a new RPC. Very rare, but stop entering idle.\n\t\tatomic.AddInt32(&m.activeCallsCount, math.MaxInt32)\n\t\treturn false\n\t}\n\tif checkActivity && atomic.LoadInt32(&m.activeSinceLastTimerCheck) == 1 {\n\t\t// A very short RPC could have come in (and also finished) after we\n\t\t// checked for calls count and activity in handleIdleTimeout(), but\n\t\t// before the CAS operation. So, we need to check for activity again.\n\t\tatomic.AddInt32(&m.activeCallsCount, math.MaxInt32)\n\t\treturn false\n\t}\n\n\t// No new RPCs have come in since we set the active calls count value to\n\t// -math.MaxInt32. And since we have the lock, it is safe to enter idle mode\n\t// unconditionally now.\n\tm.cc.EnterIdleMode()\n\tm.actuallyIdle = true\n\treturn true\n}\n\n// EnterIdleModeForTesting instructs the channel to enter idle mode.\nfunc (m *Manager) EnterIdleModeForTesting() {\n\tm.tryEnterIdleMode(false)\n}\n\n// OnCallBegin is invoked at the start of every RPC.\nfunc (m *Manager) OnCallBegin() {\n\tif m.isClosed() {\n\t\treturn\n\t}\n\n\tif atomic.AddInt32(&m.activeCallsCount, 1) > 0 {\n\t\t// Channel is not idle now. Set the activity bit and allow the call.\n\t\tatomic.StoreInt32(&m.activeSinceLastTimerCheck, 1)\n\t\treturn\n\t}\n\n\t// Channel is either in idle mode or is in the process of moving to idle\n\t// mode. Attempt to exit idle mode to allow this RPC.\n\tm.ExitIdleMode()\n\tatomic.StoreInt32(&m.activeSinceLastTimerCheck, 1)\n}\n\n// ExitIdleMode instructs m to call the ClientConn's ExitIdleMode and update its\n// internal state.\nfunc (m *Manager) ExitIdleMode() {\n\t// Holds idleMu which ensures mutual exclusion with tryEnterIdleMode.\n\tm.idleMu.Lock()\n\tdefer m.idleMu.Unlock()\n\n\tif m.isClosed() || !m.actuallyIdle {\n\t\t// This can happen in three scenarios:\n\t\t// - handleIdleTimeout() set the calls count to -math.MaxInt32 and called\n\t\t//   tryEnterIdleMode(). But before the latter could grab the lock, an RPC\n\t\t//   came in and OnCallBegin() noticed that the calls count is negative.\n\t\t// - Channel is in idle mode, and multiple new RPCs come in at the same\n\t\t//   time, all of them notice a negative calls count in OnCallBegin and get\n\t\t//   here. The first one to get the lock would get the channel to exit idle.\n\t\t// - Channel is not in idle mode, and the user calls Connect which calls\n\t\t//   m.ExitIdleMode.\n\t\t//\n\t\t// In any case, there is nothing to do here.\n\t\treturn\n\t}\n\n\tm.cc.ExitIdleMode()\n\n\t// Undo the idle entry process. This also respects any new RPC attempts.\n\tatomic.AddInt32(&m.activeCallsCount, math.MaxInt32)\n\tm.actuallyIdle = false\n\n\t// Start a new timer to fire after the configured idle timeout.\n\tm.resetIdleTimerLocked(m.timeout)\n}\n\n// UnsafeSetNotIdle instructs the Manager to update its internal state to\n// reflect the reality that the channel is no longer in IDLE mode.\n//\n// N.B. This method is intended only for internal use by the gRPC client\n// when it exits IDLE mode **manually** from `Dial`. The callsite must ensure:\n//   - The channel was **actually in IDLE mode** immediately prior to the call.\n//   - There is **no concurrent activity** that could cause the channel to exit\n//     IDLE mode *naturally* at the same time.\nfunc (m *Manager) UnsafeSetNotIdle() {\n\tm.idleMu.Lock()\n\tdefer m.idleMu.Unlock()\n\n\tatomic.AddInt32(&m.activeCallsCount, math.MaxInt32)\n\tm.actuallyIdle = false\n\tm.resetIdleTimerLocked(m.timeout)\n}\n\n// OnCallEnd is invoked at the end of every RPC.\nfunc (m *Manager) OnCallEnd() {\n\tif m.isClosed() {\n\t\treturn\n\t}\n\n\t// Record the time at which the most recent call finished.\n\tatomic.StoreInt64(&m.lastCallEndTime, time.Now().UnixNano())\n\n\t// Decrement the active calls count. This count can temporarily go negative\n\t// when the timer callback is in the process of moving the channel to idle\n\t// mode, but one or more RPCs come in and complete before the timer callback\n\t// can get done with the process of moving to idle mode.\n\tatomic.AddInt32(&m.activeCallsCount, -1)\n}\n\nfunc (m *Manager) isClosed() bool {\n\treturn atomic.LoadInt32(&m.closed) == 1\n}\n\n// Close stops the timer associated with the Manager, if it exists.\nfunc (m *Manager) Close() {\n\tatomic.StoreInt32(&m.closed, 1)\n\n\tm.idleMu.Lock()\n\tif m.timer != nil {\n\t\tm.timer.Stop()\n\t\tm.timer = nil\n\t}\n\tm.idleMu.Unlock()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/internal.go",
    "content": "/*\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package internal contains gRPC-internal code, to avoid polluting\n// the godoc of the top-level grpc package.  It must not import any grpc\n// symbols to avoid circular dependencies.\npackage internal\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nvar (\n\t// HealthCheckFunc is used to provide client-side LB channel health checking\n\tHealthCheckFunc HealthChecker\n\t// RegisterClientHealthCheckListener is used to provide a listener for\n\t// updates from the client-side health checking service. It returns a\n\t// function that can be called to stop the health producer.\n\tRegisterClientHealthCheckListener any // func(ctx context.Context, sc balancer.SubConn, serviceName string, listener func(balancer.SubConnState)) func()\n\t// BalancerUnregister is exported by package balancer to unregister a balancer.\n\tBalancerUnregister func(name string)\n\t// KeepaliveMinPingTime is the minimum ping interval.  This must be 10s by\n\t// default, but tests may wish to set it lower for convenience.\n\tKeepaliveMinPingTime = 10 * time.Second\n\t// KeepaliveMinServerPingTime is the minimum ping interval for servers.\n\t// This must be 1s by default, but tests may wish to set it lower for\n\t// convenience.\n\tKeepaliveMinServerPingTime = time.Second\n\t// ParseServiceConfig parses a JSON representation of the service config.\n\tParseServiceConfig any // func(string) *serviceconfig.ParseResult\n\t// EqualServiceConfigForTesting is for testing service config generation and\n\t// parsing. Both a and b should be returned by ParseServiceConfig.\n\t// This function compares the config without rawJSON stripped, in case the\n\t// there's difference in white space.\n\tEqualServiceConfigForTesting func(a, b serviceconfig.Config) bool\n\t// GetCertificateProviderBuilder returns the registered builder for the\n\t// given name. This is set by package certprovider for use from xDS\n\t// bootstrap code while parsing certificate provider configs in the\n\t// bootstrap file.\n\tGetCertificateProviderBuilder any // func(string) certprovider.Builder\n\t// GetXDSHandshakeInfoForTesting returns a pointer to the xds.HandshakeInfo\n\t// stored in the passed in attributes. This is set by\n\t// credentials/xds/xds.go.\n\tGetXDSHandshakeInfoForTesting any // func (*attributes.Attributes) *unsafe.Pointer\n\t// GetServerCredentials returns the transport credentials configured on a\n\t// gRPC server. An xDS-enabled server needs to know what type of credentials\n\t// is configured on the underlying gRPC server. This is set by server.go.\n\tGetServerCredentials any // func (*grpc.Server) credentials.TransportCredentials\n\t// MetricsRecorderForServer returns the MetricsRecorderList derived from a\n\t// server's stats handlers.\n\tMetricsRecorderForServer any // func (*grpc.Server) estats.MetricsRecorder\n\t// CanonicalString returns the canonical string of the code defined here:\n\t// https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tCanonicalString any // func (codes.Code) string\n\t// IsRegisteredMethod returns whether the passed in method is registered as\n\t// a method on the server.\n\tIsRegisteredMethod any // func(*grpc.Server, string) bool\n\t// ServerFromContext returns the server from the context.\n\tServerFromContext any // func(context.Context) *grpc.Server\n\t// AddGlobalServerOptions adds an array of ServerOption that will be\n\t// effective globally for newly created servers. The priority will be: 1.\n\t// user-provided; 2. this method; 3. default values.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tAddGlobalServerOptions any // func(opt ...ServerOption)\n\t// ClearGlobalServerOptions clears the array of extra ServerOption. This\n\t// method is useful in testing and benchmarking.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tClearGlobalServerOptions func()\n\t// AddGlobalDialOptions adds an array of DialOption that will be effective\n\t// globally for newly created client channels. The priority will be: 1.\n\t// user-provided; 2. this method; 3. default values.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tAddGlobalDialOptions any // func(opt ...DialOption)\n\t// DisableGlobalDialOptions returns a DialOption that prevents the\n\t// ClientConn from applying the global DialOptions (set via\n\t// AddGlobalDialOptions).\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tDisableGlobalDialOptions any // func() grpc.DialOption\n\t// ClearGlobalDialOptions clears the array of extra DialOption. This\n\t// method is useful in testing and benchmarking.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tClearGlobalDialOptions func()\n\n\t// AddGlobalPerTargetDialOptions adds a PerTargetDialOption that will be\n\t// configured for newly created ClientConns.\n\tAddGlobalPerTargetDialOptions any // func (opt any)\n\t// ClearGlobalPerTargetDialOptions clears the slice of global late apply\n\t// dial options.\n\tClearGlobalPerTargetDialOptions func()\n\n\t// JoinDialOptions combines the dial options passed as arguments into a\n\t// single dial option.\n\tJoinDialOptions any // func(...grpc.DialOption) grpc.DialOption\n\t// JoinServerOptions combines the server options passed as arguments into a\n\t// single server option.\n\tJoinServerOptions any // func(...grpc.ServerOption) grpc.ServerOption\n\n\t// WithBinaryLogger returns a DialOption that specifies the binary logger\n\t// for a ClientConn.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tWithBinaryLogger any // func(binarylog.Logger) grpc.DialOption\n\t// BinaryLogger returns a ServerOption that can set the binary logger for a\n\t// server.\n\t//\n\t// This is used in the 1.0 release of gcp/observability, and thus must not be\n\t// deleted or changed.\n\tBinaryLogger any // func(binarylog.Logger) grpc.ServerOption\n\n\t// SubscribeToConnectivityStateChanges adds a grpcsync.Subscriber to a\n\t// provided grpc.ClientConn.\n\tSubscribeToConnectivityStateChanges any // func(*grpc.ClientConn, grpcsync.Subscriber)\n\n\t// NewXDSResolverWithConfigForTesting creates a new xds resolver builder using\n\t// the provided xds bootstrap config instead of the global configuration from\n\t// the supported environment variables.  The resolver.Builder is meant to be\n\t// used in conjunction with the grpc.WithResolvers DialOption.\n\t//\n\t// Testing Only\n\t//\n\t// This function should ONLY be used for testing and may not work with some\n\t// other features, including the CSDS service.\n\tNewXDSResolverWithConfigForTesting any // func([]byte) (resolver.Builder, error)\n\n\t// NewXDSResolverWithPoolForTesting creates a new xDS resolver builder\n\t// using the provided xDS pool instead of creating a new one using the\n\t// bootstrap configuration specified by the supported environment variables.\n\t// The resolver.Builder is meant to be used in conjunction with the\n\t// grpc.WithResolvers DialOption. The resolver.Builder does not take\n\t// ownership of the provided xDS client and it is the responsibility of the\n\t// caller to close the client when no longer required.\n\t//\n\t// Testing Only\n\t//\n\t// This function should ONLY be used for testing and may not work with some\n\t// other features, including the CSDS service.\n\tNewXDSResolverWithPoolForTesting any // func(*xdsclient.Pool) (resolver.Builder, error)\n\n\t// NewXDSResolverWithClientForTesting creates a new xDS resolver builder\n\t// using the provided xDS client instead of creating a new one using the\n\t// bootstrap configuration specified by the supported environment variables.\n\t// The resolver.Builder is meant to be used in conjunction with the\n\t// grpc.WithResolvers DialOption. The resolver.Builder does not take\n\t// ownership of the provided xDS client and it is the responsibility of the\n\t// caller to close the client when no longer required.\n\t//\n\t// Testing Only\n\t//\n\t// This function should ONLY be used for testing and may not work with some\n\t// other features, including the CSDS service.\n\tNewXDSResolverWithClientForTesting any // func(xdsclient.XDSClient) (resolver.Builder, error)\n\n\t// ORCAAllowAnyMinReportingInterval is for examples/orca use ONLY.\n\tORCAAllowAnyMinReportingInterval any // func(so *orca.ServiceOptions)\n\n\t// GRPCResolverSchemeExtraMetadata determines when gRPC will add extra\n\t// metadata to RPCs.\n\tGRPCResolverSchemeExtraMetadata = \"xds\"\n\n\t// EnterIdleModeForTesting gets the ClientConn to enter IDLE mode.\n\tEnterIdleModeForTesting any // func(*grpc.ClientConn)\n\n\t// ExitIdleModeForTesting gets the ClientConn to exit IDLE mode.\n\tExitIdleModeForTesting any // func(*grpc.ClientConn) error\n\n\t// ChannelzTurnOffForTesting disables the Channelz service for testing\n\t// purposes.\n\tChannelzTurnOffForTesting func()\n\n\t// TriggerXDSResourceNotFoundForTesting causes the provided xDS Client to\n\t// invoke resource-not-found error for the given resource type and name.\n\tTriggerXDSResourceNotFoundForTesting any // func(xdsclient.XDSClient, xdsresource.Type, string) error\n\n\t// FromOutgoingContextRaw returns the un-merged, intermediary contents of\n\t// metadata.rawMD.\n\tFromOutgoingContextRaw any // func(context.Context) (metadata.MD, [][]string, bool)\n\n\t// UserSetDefaultScheme is set to true if the user has overridden the\n\t// default resolver scheme.\n\tUserSetDefaultScheme = false\n\n\t// ConnectedAddress returns the connected address for a SubConnState. The\n\t// address is only valid if the state is READY.\n\tConnectedAddress any // func (scs SubConnState) resolver.Address\n\n\t// SetConnectedAddress sets the connected address for a SubConnState.\n\tSetConnectedAddress any // func(scs *SubConnState, addr resolver.Address)\n\n\t// SnapshotMetricRegistryForTesting snapshots the global data of the metric\n\t// registry. Returns a cleanup function that sets the metric registry to its\n\t// original state. Only called in testing functions.\n\tSnapshotMetricRegistryForTesting func() func()\n\n\t// SetDefaultBufferPoolForTesting updates the default buffer pool, for\n\t// testing purposes.\n\tSetDefaultBufferPoolForTesting any // func(mem.BufferPool)\n\n\t// SetBufferPoolingThresholdForTesting updates the buffer pooling threshold, for\n\t// testing purposes.\n\tSetBufferPoolingThresholdForTesting any // func(int)\n\n\t// TimeAfterFunc is used to create timers. During tests the function is\n\t// replaced to track allocated timers and fail the test if a timer isn't\n\t// cancelled.\n\tTimeAfterFunc = func(d time.Duration, f func()) Timer {\n\t\treturn time.AfterFunc(d, f)\n\t}\n\n\t// NewStreamWaitingForResolver is a test hook that is triggered when a\n\t// new stream blocks while waiting for name resolution. This can be\n\t// used in tests to synchronize resolver updates and avoid race conditions.\n\t// When set, the function will be called before the stream enters\n\t// the blocking state.\n\tNewStreamWaitingForResolver = func() {}\n\n\t// AddressToTelemetryLabels is an xDS-provided function to extract telemetry\n\t// labels from a resolver.Address. Callers must assert its type before calling.\n\tAddressToTelemetryLabels any // func(addr resolver.Address) map[string]string\n)\n\n// HealthChecker defines the signature of the client-side LB channel health\n// checking function.\n//\n// The implementation is expected to create a health checking RPC stream by\n// calling newStream(), watch for the health status of serviceName, and report\n// its health back by calling setConnectivityState().\n//\n// The health checking protocol is defined at:\n// https://github.com/grpc/grpc/blob/master/doc/health-checking.md\ntype HealthChecker func(ctx context.Context, newStream func(string) (any, error), setConnectivityState func(connectivity.State, error), serviceName string) error\n\nconst (\n\t// CredsBundleModeFallback switches GoogleDefaultCreds to fallback mode.\n\tCredsBundleModeFallback = \"fallback\"\n\t// CredsBundleModeBalancer switches GoogleDefaultCreds to grpclb balancer\n\t// mode.\n\tCredsBundleModeBalancer = \"balancer\"\n\t// CredsBundleModeBackendFromBalancer switches GoogleDefaultCreds to mode\n\t// that supports backend returned by grpclb balancer.\n\tCredsBundleModeBackendFromBalancer = \"backend-from-balancer\"\n)\n\n// RLSLoadBalancingPolicyName is the name of the RLS LB policy.\n//\n// It currently has an experimental suffix which would be removed once\n// end-to-end testing of the policy is completed.\nconst RLSLoadBalancingPolicyName = \"rls_experimental\"\n\n// EnforceSubConnEmbedding is used to enforce proper SubConn implementation\n// embedding.\ntype EnforceSubConnEmbedding interface {\n\tenforceSubConnEmbedding()\n}\n\n// EnforceClientConnEmbedding is used to enforce proper ClientConn implementation\n// embedding.\ntype EnforceClientConnEmbedding interface {\n\tenforceClientConnEmbedding()\n}\n\n// Timer is an interface to allow injecting different time.Timer implementations\n// during tests.\ntype Timer interface {\n\tStop() bool\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/metadata/metadata.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package metadata contains functions to set and get metadata from addresses.\n//\n// This package is experimental.\npackage metadata\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\ntype mdKeyType string\n\nconst mdKey = mdKeyType(\"grpc.internal.address.metadata\")\n\ntype mdValue metadata.MD\n\nfunc (m mdValue) Equal(o any) bool {\n\tom, ok := o.(mdValue)\n\tif !ok {\n\t\treturn false\n\t}\n\tif len(m) != len(om) {\n\t\treturn false\n\t}\n\tfor k, v := range m {\n\t\tov := om[k]\n\t\tif len(ov) != len(v) {\n\t\t\treturn false\n\t\t}\n\t\tfor i, ve := range v {\n\t\t\tif ov[i] != ve {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\n// Get returns the metadata of addr.\nfunc Get(addr resolver.Address) metadata.MD {\n\tattrs := addr.Attributes\n\tif attrs == nil {\n\t\treturn nil\n\t}\n\tmd, _ := attrs.Value(mdKey).(mdValue)\n\treturn metadata.MD(md)\n}\n\n// Set sets (overrides) the metadata in addr.\n//\n// When a SubConn is created with this address, the RPCs sent on it will all\n// have this metadata.\nfunc Set(addr resolver.Address, md metadata.MD) resolver.Address {\n\taddr.Attributes = addr.Attributes.WithValue(mdKey, mdValue(md))\n\treturn addr\n}\n\n// Validate validates every pair in md with ValidatePair.\nfunc Validate(md metadata.MD) error {\n\tfor k, vals := range md {\n\t\tif err := ValidatePair(k, vals...); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// hasNotPrintable return true if msg contains any characters which are not in %x20-%x7E\nfunc hasNotPrintable(msg string) bool {\n\t// for i that saving a conversion if not using for range\n\tfor i := 0; i < len(msg); i++ {\n\t\tif msg[i] < 0x20 || msg[i] > 0x7E {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// ValidateKey validates a key with the following rules (pseudo-headers are\n// skipped):\n// - the key must contain one or more characters.\n// - the characters in the key must be in [0-9 a-z _ - .].\nfunc ValidateKey(key string) error {\n\t// key should not be empty\n\tif key == \"\" {\n\t\treturn fmt.Errorf(\"there is an empty key in the header\")\n\t}\n\t// pseudo-header will be ignored\n\tif key[0] == ':' {\n\t\treturn nil\n\t}\n\t// check key, for i that saving a conversion if not using for range\n\tfor i := 0; i < len(key); i++ {\n\t\tr := key[i]\n\t\tif !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '.' && r != '-' && r != '_' {\n\t\t\treturn fmt.Errorf(\"header key %q contains illegal characters not in [0-9a-z-_.]\", key)\n\t\t}\n\t}\n\treturn nil\n}\n\n// ValidatePair validates a key-value pair with the following rules\n// (pseudo-header are skipped):\n//   - the key must contain one or more characters.\n//   - the characters in the key must be in [0-9 a-z _ - .].\n//   - if the key ends with a \"-bin\" suffix, no validation of the corresponding\n//     value is performed.\n//   - the characters in every value must be printable (in [%x20-%x7E]).\nfunc ValidatePair(key string, vals ...string) error {\n\tif err := ValidateKey(key); err != nil {\n\t\treturn err\n\t}\n\tif strings.HasSuffix(key, \"-bin\") {\n\t\treturn nil\n\t}\n\t// check value\n\tfor _, val := range vals {\n\t\tif hasNotPrintable(val) {\n\t\t\treturn fmt.Errorf(\"header key %q contains value with non-printable ASCII characters\", key)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/pretty/pretty.go",
    "content": "/*\n *\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package pretty defines helper functions to pretty-print structs for logging.\npackage pretty\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/encoding/protojson\"\n\t\"google.golang.org/protobuf/protoadapt\"\n)\n\nconst jsonIndent = \"  \"\n\n// ToJSON marshals the input into a json string.\n//\n// If marshal fails, it falls back to fmt.Sprintf(\"%+v\").\nfunc ToJSON(e any) string {\n\tif ee, ok := e.(protoadapt.MessageV1); ok {\n\t\te = protoadapt.MessageV2Of(ee)\n\t}\n\n\tif ee, ok := e.(protoadapt.MessageV2); ok {\n\t\tmm := protojson.MarshalOptions{\n\t\t\tIndent:    jsonIndent,\n\t\t\tMultiline: true,\n\t\t}\n\t\tret, err := mm.Marshal(ee)\n\t\tif err != nil {\n\t\t\t// This may fail for proto.Anys, e.g. for xDS v2, LDS, the v2\n\t\t\t// messages are not imported, and this will fail because the message\n\t\t\t// is not found.\n\t\t\treturn fmt.Sprintf(\"%+v\", ee)\n\t\t}\n\t\treturn string(ret)\n\t}\n\n\tret, err := json.MarshalIndent(e, \"\", jsonIndent)\n\tif err != nil {\n\t\treturn fmt.Sprintf(\"%+v\", e)\n\t}\n\treturn string(ret)\n}\n\n// FormatJSON formats the input json bytes with indentation.\n//\n// If Indent fails, it returns the unchanged input as string.\nfunc FormatJSON(b []byte) string {\n\tvar out bytes.Buffer\n\terr := json.Indent(&out, b, \"\", jsonIndent)\n\tif err != nil {\n\t\treturn string(b)\n\t}\n\treturn out.String()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/proxyattributes/proxyattributes.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package proxyattributes contains functions for getting and setting proxy\n// attributes like the CONNECT address and user info.\npackage proxyattributes\n\nimport (\n\t\"net/url\"\n\n\t\"google.golang.org/grpc/resolver\"\n)\n\ntype keyType string\n\nconst proxyOptionsKey = keyType(\"grpc.resolver.delegatingresolver.proxyOptions\")\n\n// Options holds the proxy connection details needed during the CONNECT\n// handshake.\ntype Options struct {\n\tUser        *url.Userinfo\n\tConnectAddr string\n}\n\n// Set returns a copy of addr with opts set in its attributes.\nfunc Set(addr resolver.Address, opts Options) resolver.Address {\n\taddr.Attributes = addr.Attributes.WithValue(proxyOptionsKey, opts)\n\treturn addr\n}\n\n// Get returns the Options for the proxy [resolver.Address] and a boolean\n// value representing if the attribute is present or not. The returned data\n// should not be mutated.\nfunc Get(addr resolver.Address) (Options, bool) {\n\tif a := addr.Attributes.Value(proxyOptionsKey); a != nil {\n\t\treturn a.(Options), true\n\t}\n\treturn Options{}, false\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/config_selector.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package resolver provides internal resolver-related functionality.\npackage resolver\n\nimport (\n\t\"context\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/internal/serviceconfig\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// ConfigSelector controls what configuration to use for every RPC.\ntype ConfigSelector interface {\n\t// Selects the configuration for the RPC, or terminates it using the error.\n\t// This error will be converted by the gRPC library to a status error with\n\t// code UNKNOWN if it is not returned as a status error.\n\tSelectConfig(RPCInfo) (*RPCConfig, error)\n}\n\n// RPCInfo contains RPC information needed by a ConfigSelector.\ntype RPCInfo struct {\n\t// Context is the user's context for the RPC and contains headers and\n\t// application timeout.  It is passed for interception purposes and for\n\t// efficiency reasons.  SelectConfig should not be blocking.\n\tContext context.Context\n\tMethod  string // i.e. \"/Service/Method\"\n}\n\n// RPCConfig describes the configuration to use for each RPC.\ntype RPCConfig struct {\n\t// The context to use for the remainder of the RPC; can pass info to LB\n\t// policy or affect timeout or metadata.\n\tContext      context.Context\n\tMethodConfig serviceconfig.MethodConfig // configuration to use for this RPC\n\tOnCommitted  func()                     // Called when the RPC has been committed (retries no longer possible)\n\tInterceptor  ClientInterceptor\n}\n\n// ClientStream is the same as grpc.ClientStream, but defined here for circular\n// dependency reasons.\ntype ClientStream interface {\n\t// Header returns the header metadata received from the server if there\n\t// is any. It blocks if the metadata is not ready to read.\n\tHeader() (metadata.MD, error)\n\t// Trailer returns the trailer metadata from the server, if there is any.\n\t// It must only be called after stream.CloseAndRecv has returned, or\n\t// stream.Recv has returned a non-nil error (including io.EOF).\n\tTrailer() metadata.MD\n\t// CloseSend closes the send direction of the stream. It closes the stream\n\t// when non-nil error is met. It is also not safe to call CloseSend\n\t// concurrently with SendMsg.\n\tCloseSend() error\n\t// Context returns the context for this stream.\n\t//\n\t// It should not be called until after Header or RecvMsg has returned. Once\n\t// called, subsequent client-side retries are disabled.\n\tContext() context.Context\n\t// SendMsg is generally called by generated code. On error, SendMsg aborts\n\t// the stream. If the error was generated by the client, the status is\n\t// returned directly; otherwise, io.EOF is returned and the status of\n\t// the stream may be discovered using RecvMsg.\n\t//\n\t// SendMsg blocks until:\n\t//   - There is sufficient flow control to schedule m with the transport, or\n\t//   - The stream is done, or\n\t//   - The stream breaks.\n\t//\n\t// SendMsg does not wait until the message is received by the server. An\n\t// untimely stream closure may result in lost messages. To ensure delivery,\n\t// users should ensure the RPC completed successfully using RecvMsg.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not safe\n\t// to call SendMsg on the same stream in different goroutines. It is also\n\t// not safe to call CloseSend concurrently with SendMsg.\n\tSendMsg(m any) error\n\t// RecvMsg blocks until it receives a message into m or the stream is\n\t// done. It returns io.EOF when the stream completes successfully. On\n\t// any other error, the stream is aborted and the error contains the RPC\n\t// status.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not\n\t// safe to call RecvMsg on the same stream in different goroutines.\n\tRecvMsg(m any) error\n}\n\n// ClientInterceptor is an interceptor for gRPC client streams.\ntype ClientInterceptor interface {\n\t// NewStream produces a ClientStream for an RPC which may optionally use\n\t// the provided function to produce a stream for delegation.  Note:\n\t// RPCInfo.Context should not be used (will be nil).\n\t//\n\t// done is invoked when the RPC is finished using its connection, or could\n\t// not be assigned a connection.  RPC operations may still occur on\n\t// ClientStream after done is called, since the interceptor is invoked by\n\t// application-layer operations.  done must never be nil when called.\n\tNewStream(ctx context.Context, ri RPCInfo, done func(), newStream func(ctx context.Context, done func()) (ClientStream, error)) (ClientStream, error)\n}\n\n// ServerInterceptor is an interceptor for incoming RPC's on gRPC server side.\ntype ServerInterceptor interface {\n\t// AllowRPC checks if an incoming RPC is allowed to proceed based on\n\t// information about connection RPC was received on, and HTTP Headers. This\n\t// information will be piped into context.\n\tAllowRPC(ctx context.Context) error // TODO: Make this a real interceptor for filters such as rate limiting.\n}\n\ntype csKeyType string\n\nconst csKey = csKeyType(\"grpc.internal.resolver.configSelector\")\n\n// SetConfigSelector sets the config selector in state and returns the new\n// state.\nfunc SetConfigSelector(state resolver.State, cs ConfigSelector) resolver.State {\n\tstate.Attributes = state.Attributes.WithValue(csKey, cs)\n\treturn state\n}\n\n// GetConfigSelector retrieves the config selector from state, if present, and\n// returns it or nil if absent.\nfunc GetConfigSelector(state resolver.State) ConfigSelector {\n\tcs, _ := state.Attributes.Value(csKey).(ConfigSelector)\n\treturn cs\n}\n\n// SafeConfigSelector allows for safe switching of ConfigSelector\n// implementations such that previous values are guaranteed to not be in use\n// when UpdateConfigSelector returns.\ntype SafeConfigSelector struct {\n\tmu sync.RWMutex\n\tcs ConfigSelector\n}\n\n// UpdateConfigSelector swaps to the provided ConfigSelector and blocks until\n// all uses of the previous ConfigSelector have completed.\nfunc (scs *SafeConfigSelector) UpdateConfigSelector(cs ConfigSelector) {\n\tscs.mu.Lock()\n\tdefer scs.mu.Unlock()\n\tscs.cs = cs\n}\n\n// SelectConfig defers to the current ConfigSelector in scs.\nfunc (scs *SafeConfigSelector) SelectConfig(r RPCInfo) (*RPCConfig, error) {\n\tscs.mu.RLock()\n\tdefer scs.mu.RUnlock()\n\treturn scs.cs.SelectConfig(r)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/delegatingresolver/delegatingresolver.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package delegatingresolver implements a resolver capable of resolving both\n// target URIs and proxy addresses.\npackage delegatingresolver\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal/envconfig\"\n\t\"google.golang.org/grpc/internal/proxyattributes\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/internal/transport/networktype\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nvar (\n\tlogger = grpclog.Component(\"delegating-resolver\")\n\t// HTTPSProxyFromEnvironment will be overwritten in the tests\n\tHTTPSProxyFromEnvironment = http.ProxyFromEnvironment\n)\n\nconst defaultPort = \"443\"\n\n// delegatingResolver manages both target URI and proxy address resolution by\n// delegating these tasks to separate child resolvers. Essentially, it acts as\n// an intermediary between the gRPC ClientConn and the child resolvers.\n//\n// It implements the [resolver.Resolver] interface.\ntype delegatingResolver struct {\n\ttarget   resolver.Target     // parsed target URI to be resolved\n\tcc       resolver.ClientConn // gRPC ClientConn\n\tproxyURL *url.URL            // proxy URL, derived from proxy environment and target\n\n\t// We do not hold both mu and childMu in the same goroutine. Avoid holding\n\t// both locks when calling into the child, as the child resolver may\n\t// synchronously callback into the channel.\n\tmu                  sync.Mutex         // protects all the fields below\n\ttargetResolverState *resolver.State    // state of the target resolver\n\tproxyAddrs          []resolver.Address // resolved proxy addresses; empty if no proxy is configured\n\n\t// childMu serializes calls into child resolvers. It also protects access to\n\t// the following fields.\n\tchildMu        sync.Mutex\n\ttargetResolver resolver.Resolver // resolver for the target URI, based on its scheme\n\tproxyResolver  resolver.Resolver // resolver for the proxy URI; nil if no proxy is configured\n}\n\n// nopResolver is a resolver that does nothing.\ntype nopResolver struct{}\n\nfunc (nopResolver) ResolveNow(resolver.ResolveNowOptions) {}\n\nfunc (nopResolver) Close() {}\n\n// proxyURLForTarget determines the proxy URL for the given address based on the\n// environment. It can return the following:\n//   - nil URL, nil error: No proxy is configured or the address is excluded\n//     using the `NO_PROXY` environment variable or if req.URL.Host is\n//     \"localhost\" (with or without // a port number)\n//   - nil URL, non-nil error: An error occurred while retrieving the proxy URL.\n//   - non-nil URL, nil error: A proxy is configured, and the proxy URL was\n//     retrieved successfully without any errors.\nfunc proxyURLForTarget(address string) (*url.URL, error) {\n\treq := &http.Request{URL: &url.URL{\n\t\tScheme: \"https\",\n\t\tHost:   address,\n\t}}\n\treturn HTTPSProxyFromEnvironment(req)\n}\n\n// New creates a new delegating resolver that can create up to two child\n// resolvers:\n//   - one to resolve the proxy address specified using the supported\n//     environment variables. This uses the registered resolver for the \"dns\"\n//     scheme. It is lazily built when a target resolver update contains at least\n//     one TCP address.\n//   - one to resolve the target URI using the resolver specified by the scheme\n//     in the target URI or specified by the user using the WithResolvers dial\n//     option. As a special case, if the target URI's scheme is \"dns\" and a\n//     proxy is specified using the supported environment variables, the target\n//     URI's path portion is used as the resolved address unless target\n//     resolution is enabled using the dial option.\nfunc New(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions, targetResolverBuilder resolver.Builder, targetResolutionEnabled bool) (resolver.Resolver, error) {\n\tr := &delegatingResolver{\n\t\ttarget:         target,\n\t\tcc:             cc,\n\t\tproxyResolver:  nopResolver{},\n\t\ttargetResolver: nopResolver{},\n\t}\n\n\taddr := target.Endpoint()\n\tvar err error\n\tif target.URL.Scheme == \"dns\" && !targetResolutionEnabled && envconfig.EnableDefaultPortForProxyTarget {\n\t\taddr, err = parseTarget(addr)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"delegating_resolver: invalid target address %q: %v\", target.Endpoint(), err)\n\t\t}\n\t}\n\n\tr.proxyURL, err = proxyURLForTarget(addr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"delegating_resolver: failed to determine proxy URL for target %q: %v\", target, err)\n\t}\n\n\t// proxy is not configured or proxy address excluded using `NO_PROXY` env\n\t// var, so only target resolver is used.\n\tif r.proxyURL == nil {\n\t\treturn targetResolverBuilder.Build(target, cc, opts)\n\t}\n\n\tif logger.V(2) {\n\t\tlogger.Infof(\"Proxy URL detected : %s\", r.proxyURL)\n\t}\n\n\t// Resolver updates from one child may trigger calls into the other. Block\n\t// updates until the children are initialized.\n\tr.childMu.Lock()\n\tdefer r.childMu.Unlock()\n\t// When the scheme is 'dns' and target resolution on client is not enabled,\n\t// resolution should be handled by the proxy, not the client. Therefore, we\n\t// bypass the target resolver and store the unresolved target address.\n\tif target.URL.Scheme == \"dns\" && !targetResolutionEnabled {\n\t\tr.targetResolverState = &resolver.State{\n\t\t\tAddresses: []resolver.Address{{Addr: addr}},\n\t\t\tEndpoints: []resolver.Endpoint{{Addresses: []resolver.Address{{Addr: addr}}}},\n\t\t}\n\t\tr.updateTargetResolverState(*r.targetResolverState)\n\t\treturn r, nil\n\t}\n\twcc := &wrappingClientConn{\n\t\tstateListener: r.updateTargetResolverState,\n\t\tparent:        r,\n\t}\n\tif r.targetResolver, err = targetResolverBuilder.Build(target, wcc, opts); err != nil {\n\t\treturn nil, fmt.Errorf(\"delegating_resolver: unable to build the resolver for target %s: %v\", target, err)\n\t}\n\treturn r, nil\n}\n\n// proxyURIResolver creates a resolver for resolving proxy URIs using the \"dns\"\n// scheme. It adjusts the proxyURL to conform to the \"dns:///\" format and builds\n// a resolver with a wrappingClientConn to capture resolved addresses.\nfunc (r *delegatingResolver) proxyURIResolver(opts resolver.BuildOptions) (resolver.Resolver, error) {\n\tproxyBuilder := resolver.Get(\"dns\")\n\tif proxyBuilder == nil {\n\t\tpanic(\"delegating_resolver: resolver for proxy not found for scheme dns\")\n\t}\n\turl := *r.proxyURL\n\turl.Scheme = \"dns\"\n\turl.Path = \"/\" + r.proxyURL.Host\n\turl.Host = \"\" // Clear the Host field to conform to the \"dns:///\" format\n\n\tproxyTarget := resolver.Target{URL: url}\n\twcc := &wrappingClientConn{\n\t\tstateListener: r.updateProxyResolverState,\n\t\tparent:        r,\n\t}\n\treturn proxyBuilder.Build(proxyTarget, wcc, opts)\n}\n\nfunc (r *delegatingResolver) ResolveNow(o resolver.ResolveNowOptions) {\n\tr.childMu.Lock()\n\tdefer r.childMu.Unlock()\n\tr.targetResolver.ResolveNow(o)\n\tr.proxyResolver.ResolveNow(o)\n}\n\nfunc (r *delegatingResolver) Close() {\n\tr.childMu.Lock()\n\tdefer r.childMu.Unlock()\n\tr.targetResolver.Close()\n\tr.targetResolver = nil\n\n\tr.proxyResolver.Close()\n\tr.proxyResolver = nil\n}\n\nfunc needsProxyResolver(state *resolver.State) bool {\n\tfor _, addr := range state.Addresses {\n\t\tif !skipProxy(addr) {\n\t\t\treturn true\n\t\t}\n\t}\n\tfor _, endpoint := range state.Endpoints {\n\t\tfor _, addr := range endpoint.Addresses {\n\t\t\tif !skipProxy(addr) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\n// parseTarget takes a target string and ensures it is a valid \"host:port\" target.\n//\n// It does the following:\n//  1. If the target already has a port (e.g., \"host:port\", \"[ipv6]:port\"),\n//     it is returned as is.\n//  2. If the host part is empty (e.g., \":80\"), it defaults to \"localhost\",\n//     returning \"localhost:80\".\n//  3. If the target is missing a port (e.g., \"host\", \"ipv6\"), the defaultPort\n//     is added.\n//\n// An error is returned for empty targets or targets with a trailing colon\n// but no port (e.g., \"host:\").\nfunc parseTarget(target string) (string, error) {\n\tif target == \"\" {\n\t\treturn \"\", fmt.Errorf(\"missing address\")\n\t}\n\n\thost, port, err := net.SplitHostPort(target)\n\tif err != nil {\n\t\t// If SplitHostPort fails, it's likely because the port is missing.\n\t\t// We append the default port and return the result.\n\t\treturn net.JoinHostPort(target, defaultPort), nil\n\t}\n\n\t// If SplitHostPort succeeds, we check for edge cases.\n\tif port == \"\" {\n\t\t// A success with an empty port means the target had a trailing colon,\n\t\t// e.g., \"host:\", which is an error.\n\t\treturn \"\", fmt.Errorf(\"missing port after port-separator colon\")\n\t}\n\tif host == \"\" {\n\t\t// A success with an empty host means the target was like \":80\".\n\t\t// We default the host to \"localhost\".\n\t\thost = \"localhost\"\n\t}\n\treturn net.JoinHostPort(host, port), nil\n}\n\nfunc skipProxy(address resolver.Address) bool {\n\t// Avoid proxy when network is not tcp.\n\tnetworkType, ok := networktype.Get(address)\n\tif !ok {\n\t\tnetworkType, _ = transport.ParseDialTarget(address.Addr)\n\t}\n\tif networkType != \"tcp\" {\n\t\treturn true\n\t}\n\n\treq := &http.Request{URL: &url.URL{\n\t\tScheme: \"https\",\n\t\tHost:   address.Addr,\n\t}}\n\t// Avoid proxy when address included in `NO_PROXY` environment variable or\n\t// fails to get the proxy address.\n\turl, err := HTTPSProxyFromEnvironment(req)\n\tif err != nil || url == nil {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// updateClientConnStateLocked constructs a combined list of addresses by\n// pairing each proxy address with every target address of type TCP. For each\n// pair, it creates a new [resolver.Address] using the proxy address and\n// attaches the corresponding target address and user info as attributes. Target\n// addresses that are not of type TCP are appended to the list as-is. The\n// function returns nil if either resolver has not yet provided an update, and\n// returns the result of ClientConn.UpdateState once both resolvers have\n// provided at least one update.\nfunc (r *delegatingResolver) updateClientConnStateLocked() error {\n\tif r.targetResolverState == nil || r.proxyAddrs == nil {\n\t\treturn nil\n\t}\n\n\t// If multiple resolved proxy addresses are present, we send only the\n\t// unresolved proxy host and let net.Dial handle the proxy host name\n\t// resolution when creating the transport. Sending all resolved addresses\n\t// would increase the number of addresses passed to the ClientConn and\n\t// subsequently to load balancing (LB) policies like Round Robin, leading\n\t// to additional TCP connections. However, if there's only one resolved\n\t// proxy address, we send it directly, as it doesn't affect the address\n\t// count returned by the target resolver and the address count sent to the\n\t// ClientConn.\n\tvar proxyAddr resolver.Address\n\tif len(r.proxyAddrs) == 1 {\n\t\tproxyAddr = r.proxyAddrs[0]\n\t} else {\n\t\tproxyAddr = resolver.Address{Addr: r.proxyURL.Host}\n\t}\n\tvar addresses []resolver.Address\n\tfor _, targetAddr := range (*r.targetResolverState).Addresses {\n\t\tif skipProxy(targetAddr) {\n\t\t\taddresses = append(addresses, targetAddr)\n\t\t\tcontinue\n\t\t}\n\t\taddresses = append(addresses, proxyattributes.Set(proxyAddr, proxyattributes.Options{\n\t\t\tUser:        r.proxyURL.User,\n\t\t\tConnectAddr: targetAddr.Addr,\n\t\t}))\n\t}\n\n\t// For each target endpoint, construct a new [resolver.Endpoint] that\n\t// includes all addresses from all proxy endpoints and the addresses from\n\t// that target endpoint, preserving the number of target endpoints.\n\tvar endpoints []resolver.Endpoint\n\tfor _, endpt := range (*r.targetResolverState).Endpoints {\n\t\tvar addrs []resolver.Address\n\t\tfor _, targetAddr := range endpt.Addresses {\n\t\t\t// Avoid proxy when network is not tcp.\n\t\t\tif skipProxy(targetAddr) {\n\t\t\t\taddrs = append(addrs, targetAddr)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor _, proxyAddr := range r.proxyAddrs {\n\t\t\t\taddrs = append(addrs, proxyattributes.Set(proxyAddr, proxyattributes.Options{\n\t\t\t\t\tUser:        r.proxyURL.User,\n\t\t\t\t\tConnectAddr: targetAddr.Addr,\n\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t\tendpoints = append(endpoints, resolver.Endpoint{Addresses: addrs})\n\t}\n\t// Use the targetResolverState for its service config and attributes\n\t// contents. The state update is only sent after both the target and proxy\n\t// resolvers have sent their updates, and curState has been updated with the\n\t// combined addresses.\n\tcurState := *r.targetResolverState\n\tcurState.Addresses = addresses\n\tcurState.Endpoints = endpoints\n\treturn r.cc.UpdateState(curState)\n}\n\n// updateProxyResolverState updates the proxy resolver state by storing proxy\n// addresses and endpoints, marking the resolver as ready, and triggering a\n// state update if both proxy and target resolvers are ready. If the ClientConn\n// returns a non-nil error, it calls `ResolveNow()` on the target resolver.  It\n// is a StateListener function of wrappingClientConn passed to the proxy\n// resolver.\nfunc (r *delegatingResolver) updateProxyResolverState(state resolver.State) error {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\tif logger.V(2) {\n\t\tlogger.Infof(\"Addresses received from proxy resolver: %s\", state.Addresses)\n\t}\n\tif len(state.Endpoints) > 0 {\n\t\t// We expect exactly one address per endpoint because the proxy resolver\n\t\t// uses \"dns\" resolution.\n\t\tr.proxyAddrs = make([]resolver.Address, 0, len(state.Endpoints))\n\t\tfor _, endpoint := range state.Endpoints {\n\t\t\tr.proxyAddrs = append(r.proxyAddrs, endpoint.Addresses...)\n\t\t}\n\t} else if state.Addresses != nil {\n\t\tr.proxyAddrs = state.Addresses\n\t} else {\n\t\tr.proxyAddrs = []resolver.Address{} // ensure proxyAddrs is non-nil to indicate an update has been received\n\t}\n\terr := r.updateClientConnStateLocked()\n\t// Another possible approach was to block until updates are received from\n\t// both resolvers. But this is not used because calling `New()` triggers\n\t// `Build()` for the first resolver, which calls `UpdateState()`. And the\n\t// second resolver hasn't sent an update yet, so it would cause `New()` to\n\t// block indefinitely.\n\tif err != nil {\n\t\tgo func() {\n\t\t\tr.childMu.Lock()\n\t\t\tdefer r.childMu.Unlock()\n\t\t\tif r.targetResolver != nil {\n\t\t\t\tr.targetResolver.ResolveNow(resolver.ResolveNowOptions{})\n\t\t\t}\n\t\t}()\n\t}\n\treturn err\n}\n\n// updateTargetResolverState is the StateListener function provided to the\n// target resolver via wrappingClientConn. It updates the resolver state and\n// marks the target resolver as ready. If the update includes at least one TCP\n// address and the proxy resolver has not yet been constructed, it initializes\n// the proxy resolver. A combined state update is triggered once both resolvers\n// are ready. If all addresses are non-TCP, it proceeds without waiting for the\n// proxy resolver. If ClientConn.UpdateState returns a non-nil error,\n// ResolveNow() is called on the proxy resolver.\nfunc (r *delegatingResolver) updateTargetResolverState(state resolver.State) error {\n\tr.mu.Lock()\n\tdefer r.mu.Unlock()\n\n\tif logger.V(2) {\n\t\tlogger.Infof(\"Addresses received from target resolver: %v\", state.Addresses)\n\t}\n\tr.targetResolverState = &state\n\t// If all addresses returned by the target resolver have a non-TCP network\n\t// type, or are listed in the `NO_PROXY` environment variable, do not wait\n\t// for proxy update.\n\tif !needsProxyResolver(r.targetResolverState) {\n\t\treturn r.cc.UpdateState(*r.targetResolverState)\n\t}\n\n\t// The proxy resolver may be rebuilt multiple times, specifically each time\n\t// the target resolver sends an update, even if the target resolver is built\n\t// successfully but building the proxy resolver fails.\n\tif len(r.proxyAddrs) == 0 {\n\t\tgo func() {\n\t\t\tr.childMu.Lock()\n\t\t\tdefer r.childMu.Unlock()\n\t\t\tif _, ok := r.proxyResolver.(nopResolver); !ok {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tproxyResolver, err := r.proxyURIResolver(resolver.BuildOptions{})\n\t\t\tif err != nil {\n\t\t\t\tr.cc.ReportError(fmt.Errorf(\"delegating_resolver: unable to build the proxy resolver: %v\", err))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tr.proxyResolver = proxyResolver\n\t\t}()\n\t}\n\n\terr := r.updateClientConnStateLocked()\n\tif err != nil {\n\t\tgo func() {\n\t\t\tr.childMu.Lock()\n\t\t\tdefer r.childMu.Unlock()\n\t\t\tif r.proxyResolver != nil {\n\t\t\t\tr.proxyResolver.ResolveNow(resolver.ResolveNowOptions{})\n\t\t\t}\n\t\t}()\n\t}\n\treturn nil\n}\n\n// wrappingClientConn serves as an intermediary between the parent ClientConn\n// and the child resolvers created here. It implements the resolver.ClientConn\n// interface and is passed in that capacity to the child resolvers.\ntype wrappingClientConn struct {\n\t// Callback to deliver resolver state updates\n\tstateListener func(state resolver.State) error\n\tparent        *delegatingResolver\n}\n\n// UpdateState receives resolver state updates and forwards them to the\n// appropriate listener function (either for the proxy or target resolver).\nfunc (wcc *wrappingClientConn) UpdateState(state resolver.State) error {\n\treturn wcc.stateListener(state)\n}\n\n// ReportError intercepts errors from the child resolvers and passes them to\n// ClientConn.\nfunc (wcc *wrappingClientConn) ReportError(err error) {\n\twcc.parent.cc.ReportError(err)\n}\n\n// NewAddress intercepts the new resolved address from the child resolvers and\n// passes them to ClientConn.\nfunc (wcc *wrappingClientConn) NewAddress(addrs []resolver.Address) {\n\twcc.UpdateState(resolver.State{Addresses: addrs})\n}\n\n// ParseServiceConfig parses the provided service config and returns an object\n// that provides the parsed config.\nfunc (wcc *wrappingClientConn) ParseServiceConfig(serviceConfigJSON string) *serviceconfig.ParseResult {\n\treturn wcc.parent.cc.ParseServiceConfig(serviceConfigJSON)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package dns implements a dns resolver to be installed as the default resolver\n// in grpc.\npackage dns\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\trand \"math/rand/v2\"\n\t\"net\"\n\t\"net/netip\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tgrpclbstate \"google.golang.org/grpc/balancer/grpclb/state\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal/backoff\"\n\t\"google.golang.org/grpc/internal/envconfig\"\n\t\"google.golang.org/grpc/internal/resolver/dns/internal\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nvar (\n\t// EnableSRVLookups controls whether the DNS resolver attempts to fetch gRPCLB\n\t// addresses from SRV records.  Must not be changed after init time.\n\tEnableSRVLookups = false\n\n\t// MinResolutionInterval is the minimum interval at which re-resolutions are\n\t// allowed. This helps to prevent excessive re-resolution.\n\tMinResolutionInterval = 30 * time.Second\n\n\t// ResolvingTimeout specifies the maximum duration for a DNS resolution request.\n\t// If the timeout expires before a response is received, the request will be canceled.\n\t//\n\t// It is recommended to set this value at application startup. Avoid modifying this variable\n\t// after initialization as it's not thread-safe for concurrent modification.\n\tResolvingTimeout = 30 * time.Second\n\n\tlogger = grpclog.Component(\"dns\")\n)\n\nfunc init() {\n\tresolver.Register(NewBuilder())\n\tinternal.TimeAfterFunc = time.After\n\tinternal.TimeNowFunc = time.Now\n\tinternal.TimeUntilFunc = time.Until\n\tinternal.NewNetResolver = newNetResolver\n\tinternal.AddressDialer = addressDialer\n}\n\nconst (\n\tdefaultPort       = \"443\"\n\tdefaultDNSSvrPort = \"53\"\n\tgolang            = \"GO\"\n\t// txtPrefix is the prefix string to be prepended to the host name for txt\n\t// record lookup.\n\ttxtPrefix = \"_grpc_config.\"\n\t// In DNS, service config is encoded in a TXT record via the mechanism\n\t// described in RFC-1464 using the attribute name grpc_config.\n\ttxtAttribute = \"grpc_config=\"\n)\n\nvar addressDialer = func(address string) func(context.Context, string, string) (net.Conn, error) {\n\treturn func(ctx context.Context, network, _ string) (net.Conn, error) {\n\t\tvar dialer net.Dialer\n\t\treturn dialer.DialContext(ctx, network, address)\n\t}\n}\n\nvar newNetResolver = func(authority string) (internal.NetResolver, error) {\n\tif authority == \"\" {\n\t\treturn net.DefaultResolver, nil\n\t}\n\n\thost, port, err := parseTarget(authority, defaultDNSSvrPort)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tauthorityWithPort := net.JoinHostPort(host, port)\n\n\treturn &net.Resolver{\n\t\tPreferGo: true,\n\t\tDial:     internal.AddressDialer(authorityWithPort),\n\t}, nil\n}\n\n// NewBuilder creates a dnsBuilder which is used to factory DNS resolvers.\nfunc NewBuilder() resolver.Builder {\n\treturn &dnsBuilder{}\n}\n\ntype dnsBuilder struct{}\n\n// Build creates and starts a DNS resolver that watches the name resolution of\n// the target.\nfunc (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {\n\thost, port, err := parseTarget(target.Endpoint(), defaultPort)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// IP address.\n\tif ipAddr, err := formatIP(host); err == nil {\n\t\taddr := []resolver.Address{{Addr: ipAddr + \":\" + port}}\n\t\tcc.UpdateState(resolver.State{Addresses: addr})\n\t\treturn deadResolver{}, nil\n\t}\n\n\t// DNS address (non-IP).\n\tctx, cancel := context.WithCancel(context.Background())\n\td := &dnsResolver{\n\t\thost:                host,\n\t\tport:                port,\n\t\tctx:                 ctx,\n\t\tcancel:              cancel,\n\t\tcc:                  cc,\n\t\trn:                  make(chan struct{}, 1),\n\t\tenableServiceConfig: envconfig.EnableTXTServiceConfig && !opts.DisableServiceConfig,\n\t}\n\n\td.resolver, err = internal.NewNetResolver(target.URL.Host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\td.wg.Add(1)\n\tgo d.watcher()\n\treturn d, nil\n}\n\n// Scheme returns the naming scheme of this resolver builder, which is \"dns\".\nfunc (b *dnsBuilder) Scheme() string {\n\treturn \"dns\"\n}\n\n// deadResolver is a resolver that does nothing.\ntype deadResolver struct{}\n\nfunc (deadResolver) ResolveNow(resolver.ResolveNowOptions) {}\n\nfunc (deadResolver) Close() {}\n\n// dnsResolver watches for the name resolution update for a non-IP target.\ntype dnsResolver struct {\n\thost     string\n\tport     string\n\tresolver internal.NetResolver\n\tctx      context.Context\n\tcancel   context.CancelFunc\n\tcc       resolver.ClientConn\n\t// rn channel is used by ResolveNow() to force an immediate resolution of the\n\t// target.\n\trn chan struct{}\n\t// wg is used to enforce Close() to return after the watcher() goroutine has\n\t// finished. Otherwise, data race will be possible. [Race Example] in\n\t// dns_resolver_test we replace the real lookup functions with mocked ones to\n\t// facilitate testing. If Close() doesn't wait for watcher() goroutine\n\t// finishes, race detector sometimes will warn lookup (READ the lookup\n\t// function pointers) inside watcher() goroutine has data race with\n\t// replaceNetFunc (WRITE the lookup function pointers).\n\twg                  sync.WaitGroup\n\tenableServiceConfig bool\n}\n\n// ResolveNow invoke an immediate resolution of the target that this\n// dnsResolver watches.\nfunc (d *dnsResolver) ResolveNow(resolver.ResolveNowOptions) {\n\tselect {\n\tcase d.rn <- struct{}{}:\n\tdefault:\n\t}\n}\n\n// Close closes the dnsResolver.\nfunc (d *dnsResolver) Close() {\n\td.cancel()\n\td.wg.Wait()\n}\n\nfunc (d *dnsResolver) watcher() {\n\tdefer d.wg.Done()\n\tbackoffIndex := 1\n\tfor {\n\t\tstate, err := d.lookup()\n\t\tif err != nil {\n\t\t\t// Report error to the underlying grpc.ClientConn.\n\t\t\td.cc.ReportError(err)\n\t\t} else {\n\t\t\terr = d.cc.UpdateState(*state)\n\t\t}\n\n\t\tvar nextResolutionTime time.Time\n\t\tif err == nil {\n\t\t\t// Success resolving, wait for the next ResolveNow. However, also wait 30\n\t\t\t// seconds at the very least to prevent constantly re-resolving.\n\t\t\tbackoffIndex = 1\n\t\t\tnextResolutionTime = internal.TimeNowFunc().Add(MinResolutionInterval)\n\t\t\tselect {\n\t\t\tcase <-d.ctx.Done():\n\t\t\t\treturn\n\t\t\tcase <-d.rn:\n\t\t\t}\n\t\t} else {\n\t\t\t// Poll on an error found in DNS Resolver or an error received from\n\t\t\t// ClientConn.\n\t\t\tnextResolutionTime = internal.TimeNowFunc().Add(backoff.DefaultExponential.Backoff(backoffIndex))\n\t\t\tbackoffIndex++\n\t\t}\n\t\tselect {\n\t\tcase <-d.ctx.Done():\n\t\t\treturn\n\t\tcase <-internal.TimeAfterFunc(internal.TimeUntilFunc(nextResolutionTime)):\n\t\t}\n\t}\n}\n\nfunc (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error) {\n\t// Skip this particular host to avoid timeouts with some versions of\n\t// systemd-resolved.\n\tif !EnableSRVLookups || d.host == \"metadata.google.internal.\" {\n\t\treturn nil, nil\n\t}\n\tvar newAddrs []resolver.Address\n\t_, srvs, err := d.resolver.LookupSRV(ctx, \"grpclb\", \"tcp\", d.host)\n\tif err != nil {\n\t\terr = handleDNSError(err, \"SRV\") // may become nil\n\t\treturn nil, err\n\t}\n\tfor _, s := range srvs {\n\t\tlbAddrs, err := d.resolver.LookupHost(ctx, s.Target)\n\t\tif err != nil {\n\t\t\terr = handleDNSError(err, \"A\") // may become nil\n\t\t\tif err == nil {\n\t\t\t\t// If there are other SRV records, look them up and ignore this\n\t\t\t\t// one that does not exist.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, a := range lbAddrs {\n\t\t\tip, err := formatIP(a)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"dns: error parsing A record IP address %v: %v\", a, err)\n\t\t\t}\n\t\t\taddr := ip + \":\" + strconv.Itoa(int(s.Port))\n\t\t\tnewAddrs = append(newAddrs, resolver.Address{Addr: addr, ServerName: s.Target})\n\t\t}\n\t}\n\treturn newAddrs, nil\n}\n\nfunc handleDNSError(err error, lookupType string) error {\n\tdnsErr, ok := err.(*net.DNSError)\n\tif ok && !dnsErr.IsTimeout && !dnsErr.IsTemporary {\n\t\t// Timeouts and temporary errors should be communicated to gRPC to\n\t\t// attempt another DNS query (with backoff).  Other errors should be\n\t\t// suppressed (they may represent the absence of a TXT record).\n\t\treturn nil\n\t}\n\tif err != nil {\n\t\terr = fmt.Errorf(\"dns: %v record lookup error: %v\", lookupType, err)\n\t\tlogger.Info(err)\n\t}\n\treturn err\n}\n\nfunc (d *dnsResolver) lookupTXT(ctx context.Context) *serviceconfig.ParseResult {\n\tss, err := d.resolver.LookupTXT(ctx, txtPrefix+d.host)\n\tif err != nil {\n\t\tif envconfig.TXTErrIgnore {\n\t\t\treturn nil\n\t\t}\n\t\tif err = handleDNSError(err, \"TXT\"); err != nil {\n\t\t\treturn &serviceconfig.ParseResult{Err: err}\n\t\t}\n\t\treturn nil\n\t}\n\tvar res string\n\tfor _, s := range ss {\n\t\tres += s\n\t}\n\n\t// TXT record must have \"grpc_config=\" attribute in order to be used as\n\t// service config.\n\tif !strings.HasPrefix(res, txtAttribute) {\n\t\tlogger.Warningf(\"dns: TXT record %v missing %v attribute\", res, txtAttribute)\n\t\t// This is not an error; it is the equivalent of not having a service\n\t\t// config.\n\t\treturn nil\n\t}\n\tsc := canaryingSC(strings.TrimPrefix(res, txtAttribute))\n\treturn d.cc.ParseServiceConfig(sc)\n}\n\nfunc (d *dnsResolver) lookupHost(ctx context.Context) ([]resolver.Address, error) {\n\taddrs, err := d.resolver.LookupHost(ctx, d.host)\n\tif err != nil {\n\t\terr = handleDNSError(err, \"A\")\n\t\treturn nil, err\n\t}\n\tnewAddrs := make([]resolver.Address, 0, len(addrs))\n\tfor _, a := range addrs {\n\t\tip, err := formatIP(a)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"dns: error parsing A record IP address %v: %v\", a, err)\n\t\t}\n\t\taddr := ip + \":\" + d.port\n\t\tnewAddrs = append(newAddrs, resolver.Address{Addr: addr})\n\t}\n\treturn newAddrs, nil\n}\n\nfunc (d *dnsResolver) lookup() (*resolver.State, error) {\n\tctx, cancel := context.WithTimeout(d.ctx, ResolvingTimeout)\n\tdefer cancel()\n\tsrv, srvErr := d.lookupSRV(ctx)\n\taddrs, hostErr := d.lookupHost(ctx)\n\tif hostErr != nil && (srvErr != nil || len(srv) == 0) {\n\t\treturn nil, hostErr\n\t}\n\n\tstate := resolver.State{Addresses: addrs}\n\tif len(srv) > 0 {\n\t\tstate = grpclbstate.Set(state, &grpclbstate.State{BalancerAddresses: srv})\n\t}\n\tif d.enableServiceConfig {\n\t\tstate.ServiceConfig = d.lookupTXT(ctx)\n\t}\n\treturn &state, nil\n}\n\n// formatIP returns an error if addr is not a valid textual representation of\n// an IP address. If addr is an IPv4 address, return the addr and error = nil.\n// If addr is an IPv6 address, return the addr enclosed in square brackets and\n// error = nil.\nfunc formatIP(addr string) (string, error) {\n\tip, err := netip.ParseAddr(addr)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif ip.Is4() {\n\t\treturn addr, nil\n\t}\n\treturn \"[\" + addr + \"]\", nil\n}\n\n// parseTarget takes the user input target string and default port, returns\n// formatted host and port info. If target doesn't specify a port, set the port\n// to be the defaultPort. If target is in IPv6 format and host-name is enclosed\n// in square brackets, brackets are stripped when setting the host.\n// examples:\n// target: \"www.google.com\" defaultPort: \"443\" returns host: \"www.google.com\", port: \"443\"\n// target: \"ipv4-host:80\" defaultPort: \"443\" returns host: \"ipv4-host\", port: \"80\"\n// target: \"[ipv6-host]\" defaultPort: \"443\" returns host: \"ipv6-host\", port: \"443\"\n// target: \":80\" defaultPort: \"443\" returns host: \"localhost\", port: \"80\"\nfunc parseTarget(target, defaultPort string) (host, port string, err error) {\n\tif target == \"\" {\n\t\treturn \"\", \"\", internal.ErrMissingAddr\n\t}\n\tif _, err := netip.ParseAddr(target); err == nil {\n\t\t// target is an IPv4 or IPv6(without brackets) address\n\t\treturn target, defaultPort, nil\n\t}\n\tif host, port, err = net.SplitHostPort(target); err == nil {\n\t\tif port == \"\" {\n\t\t\t// If the port field is empty (target ends with colon), e.g. \"[::1]:\",\n\t\t\t// this is an error.\n\t\t\treturn \"\", \"\", internal.ErrEndsWithColon\n\t\t}\n\t\t// target has port, i.e ipv4-host:port, [ipv6-host]:port, host-name:port\n\t\tif host == \"\" {\n\t\t\t// Keep consistent with net.Dial(): If the host is empty, as in \":80\",\n\t\t\t// the local system is assumed.\n\t\t\thost = \"localhost\"\n\t\t}\n\t\treturn host, port, nil\n\t}\n\tif host, port, err = net.SplitHostPort(target + \":\" + defaultPort); err == nil {\n\t\t// target doesn't have port\n\t\treturn host, port, nil\n\t}\n\treturn \"\", \"\", fmt.Errorf(\"invalid target address %v, error info: %v\", target, err)\n}\n\ntype rawChoice struct {\n\tClientLanguage *[]string        `json:\"clientLanguage,omitempty\"`\n\tPercentage     *int             `json:\"percentage,omitempty\"`\n\tClientHostName *[]string        `json:\"clientHostName,omitempty\"`\n\tServiceConfig  *json.RawMessage `json:\"serviceConfig,omitempty\"`\n}\n\nfunc containsString(a *[]string, b string) bool {\n\tif a == nil {\n\t\treturn true\n\t}\n\tfor _, c := range *a {\n\t\tif c == b {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc chosenByPercentage(a *int) bool {\n\tif a == nil {\n\t\treturn true\n\t}\n\treturn rand.IntN(100)+1 <= *a\n}\n\nfunc canaryingSC(js string) string {\n\tif js == \"\" {\n\t\treturn \"\"\n\t}\n\tvar rcs []rawChoice\n\terr := json.Unmarshal([]byte(js), &rcs)\n\tif err != nil {\n\t\tlogger.Warningf(\"dns: error parsing service config json: %v\", err)\n\t\treturn \"\"\n\t}\n\tcliHostname, err := os.Hostname()\n\tif err != nil {\n\t\tlogger.Warningf(\"dns: error getting client hostname: %v\", err)\n\t\treturn \"\"\n\t}\n\tvar sc string\n\tfor _, c := range rcs {\n\t\tif !containsString(c.ClientLanguage, golang) ||\n\t\t\t!chosenByPercentage(c.Percentage) ||\n\t\t\t!containsString(c.ClientHostName, cliHostname) ||\n\t\t\tc.ServiceConfig == nil {\n\t\t\tcontinue\n\t\t}\n\t\tsc = string(*c.ServiceConfig)\n\t\tbreak\n\t}\n\treturn sc\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/dns/internal/internal.go",
    "content": "/*\n *\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package internal contains functionality internal to the dns resolver package.\npackage internal\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"net\"\n\t\"time\"\n)\n\n// NetResolver groups the methods on net.Resolver that are used by the DNS\n// resolver implementation. This allows the default net.Resolver instance to be\n// overridden from tests.\ntype NetResolver interface {\n\tLookupHost(ctx context.Context, host string) (addrs []string, err error)\n\tLookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*net.SRV, err error)\n\tLookupTXT(ctx context.Context, name string) (txts []string, err error)\n}\n\nvar (\n\t// ErrMissingAddr is the error returned when building a DNS resolver when\n\t// the provided target name is empty.\n\tErrMissingAddr = errors.New(\"dns resolver: missing address\")\n\n\t// ErrEndsWithColon is the error returned when building a DNS resolver when\n\t// the provided target name ends with a colon that is supposed to be the\n\t// separator between host and port.  E.g. \"::\" is a valid address as it is\n\t// an IPv6 address (host only) and \"[::]:\" is invalid as it ends with a\n\t// colon as the host and port separator\n\tErrEndsWithColon = errors.New(\"dns resolver: missing port after port-separator colon\")\n)\n\n// The following vars are overridden from tests.\nvar (\n\t// TimeAfterFunc is used by the DNS resolver to wait for the given duration\n\t// to elapse. In non-test code, this is implemented by time.After. In test\n\t// code, this can be used to control the amount of time the resolver is\n\t// blocked waiting for the duration to elapse.\n\tTimeAfterFunc func(time.Duration) <-chan time.Time\n\n\t// TimeNowFunc is used by the DNS resolver to get the current time.\n\t// In non-test code, this is implemented by time.Now. In test code,\n\t// this can be used to control the current time for the resolver.\n\tTimeNowFunc func() time.Time\n\n\t// TimeUntilFunc is used by the DNS resolver to calculate the remaining\n\t// wait time for re-resolution. In non-test code, this is implemented by\n\t// time.Until. In test code, this can be used to control the remaining\n\t// time for resolver to wait for re-resolution.\n\tTimeUntilFunc func(time.Time) time.Duration\n\n\t// NewNetResolver returns the net.Resolver instance for the given target.\n\tNewNetResolver func(string) (NetResolver, error)\n\n\t// AddressDialer is the dialer used to dial the DNS server. It accepts the\n\t// Host portion of the URL corresponding to the user's dial target and\n\t// returns a dial function.\n\tAddressDialer func(address string) func(context.Context, string, string) (net.Conn, error)\n)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package passthrough implements a pass-through resolver. It sends the target\n// name without scheme back to gRPC as resolved address.\npackage passthrough\n\nimport (\n\t\"errors\"\n\n\t\"google.golang.org/grpc/resolver\"\n)\n\nconst scheme = \"passthrough\"\n\ntype passthroughBuilder struct{}\n\nfunc (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {\n\tif target.Endpoint() == \"\" && opts.Dialer == nil {\n\t\treturn nil, errors.New(\"passthrough: received empty target in Build()\")\n\t}\n\tr := &passthroughResolver{\n\t\ttarget: target,\n\t\tcc:     cc,\n\t}\n\tr.start()\n\treturn r, nil\n}\n\nfunc (*passthroughBuilder) Scheme() string {\n\treturn scheme\n}\n\ntype passthroughResolver struct {\n\ttarget resolver.Target\n\tcc     resolver.ClientConn\n}\n\nfunc (r *passthroughResolver) start() {\n\tr.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}})\n}\n\nfunc (*passthroughResolver) ResolveNow(resolver.ResolveNowOptions) {}\n\nfunc (*passthroughResolver) Close() {}\n\nfunc init() {\n\tresolver.Register(&passthroughBuilder{})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/resolver/unix/unix.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package unix implements a resolver for unix targets.\npackage unix\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/internal/transport/networktype\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\nconst unixScheme = \"unix\"\nconst unixAbstractScheme = \"unix-abstract\"\n\ntype builder struct {\n\tscheme string\n}\n\nfunc (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolver.BuildOptions) (resolver.Resolver, error) {\n\tif target.URL.Host != \"\" {\n\t\treturn nil, fmt.Errorf(\"invalid (non-empty) authority: %v\", target.URL.Host)\n\t}\n\n\t// gRPC was parsing the dial target manually before PR #4817, and we\n\t// switched to using url.Parse() in that PR. To avoid breaking existing\n\t// resolver implementations we ended up stripping the leading \"/\" from the\n\t// endpoint. This obviously does not work for the \"unix\" scheme. Hence we\n\t// end up using the parsed URL instead.\n\tendpoint := target.URL.Path\n\tif endpoint == \"\" {\n\t\tendpoint = target.URL.Opaque\n\t}\n\taddr := resolver.Address{Addr: endpoint}\n\tif b.scheme == unixAbstractScheme {\n\t\t// We can not prepend \\0 as c++ gRPC does, as in Golang '@' is used to signify we do\n\t\t// not want trailing \\0 in address.\n\t\taddr.Addr = \"@\" + addr.Addr\n\t}\n\tcc.UpdateState(resolver.State{Addresses: []resolver.Address{networktype.Set(addr, \"unix\")}})\n\treturn &nopResolver{}, nil\n}\n\nfunc (b *builder) Scheme() string {\n\treturn b.scheme\n}\n\nfunc (b *builder) OverrideAuthority(resolver.Target) string {\n\treturn \"localhost\"\n}\n\ntype nopResolver struct {\n}\n\nfunc (*nopResolver) ResolveNow(resolver.ResolveNowOptions) {}\n\nfunc (*nopResolver) Close() {}\n\nfunc init() {\n\tresolver.Register(&builder{scheme: unixScheme})\n\tresolver.Register(&builder{scheme: unixAbstractScheme})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/serviceconfig/duration.go",
    "content": "/*\n *\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage serviceconfig\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Duration defines JSON marshal and unmarshal methods to conform to the\n// protobuf JSON spec defined [here].\n//\n// [here]: https://protobuf.dev/reference/protobuf/google.protobuf/#duration\ntype Duration time.Duration\n\nfunc (d Duration) String() string {\n\treturn fmt.Sprint(time.Duration(d))\n}\n\n// MarshalJSON converts from d to a JSON string output.\nfunc (d Duration) MarshalJSON() ([]byte, error) {\n\tns := time.Duration(d).Nanoseconds()\n\tsec := ns / int64(time.Second)\n\tns = ns % int64(time.Second)\n\n\tvar sign string\n\tif sec < 0 || ns < 0 {\n\t\tsign, sec, ns = \"-\", -1*sec, -1*ns\n\t}\n\n\t// Generated output always contains 0, 3, 6, or 9 fractional digits,\n\t// depending on required precision.\n\tstr := fmt.Sprintf(\"%s%d.%09d\", sign, sec, ns)\n\tstr = strings.TrimSuffix(str, \"000\")\n\tstr = strings.TrimSuffix(str, \"000\")\n\tstr = strings.TrimSuffix(str, \".000\")\n\treturn []byte(fmt.Sprintf(\"\\\"%ss\\\"\", str)), nil\n}\n\n// UnmarshalJSON unmarshals b as a duration JSON string into d.\nfunc (d *Duration) UnmarshalJSON(b []byte) error {\n\tvar s string\n\tif err := json.Unmarshal(b, &s); err != nil {\n\t\treturn err\n\t}\n\tif !strings.HasSuffix(s, \"s\") {\n\t\treturn fmt.Errorf(\"malformed duration %q: missing seconds unit\", s)\n\t}\n\tneg := false\n\tif s[0] == '-' {\n\t\tneg = true\n\t\ts = s[1:]\n\t}\n\tss := strings.SplitN(s[:len(s)-1], \".\", 3)\n\tif len(ss) > 2 {\n\t\treturn fmt.Errorf(\"malformed duration %q: too many decimals\", s)\n\t}\n\t// hasDigits is set if either the whole or fractional part of the number is\n\t// present, since both are optional but one is required.\n\thasDigits := false\n\tvar sec, ns int64\n\tif len(ss[0]) > 0 {\n\t\tvar err error\n\t\tif sec, err = strconv.ParseInt(ss[0], 10, 64); err != nil {\n\t\t\treturn fmt.Errorf(\"malformed duration %q: %v\", s, err)\n\t\t}\n\t\t// Maximum seconds value per the durationpb spec.\n\t\tconst maxProtoSeconds = 315_576_000_000\n\t\tif sec > maxProtoSeconds {\n\t\t\treturn fmt.Errorf(\"out of range: %q\", s)\n\t\t}\n\t\thasDigits = true\n\t}\n\tif len(ss) == 2 && len(ss[1]) > 0 {\n\t\tif len(ss[1]) > 9 {\n\t\t\treturn fmt.Errorf(\"malformed duration %q: too many digits after decimal\", s)\n\t\t}\n\t\tvar err error\n\t\tif ns, err = strconv.ParseInt(ss[1], 10, 64); err != nil {\n\t\t\treturn fmt.Errorf(\"malformed duration %q: %v\", s, err)\n\t\t}\n\t\tfor i := 9; i > len(ss[1]); i-- {\n\t\t\tns *= 10\n\t\t}\n\t\thasDigits = true\n\t}\n\tif !hasDigits {\n\t\treturn fmt.Errorf(\"malformed duration %q: contains no numbers\", s)\n\t}\n\n\tif neg {\n\t\tsec *= -1\n\t\tns *= -1\n\t}\n\n\t// Maximum/minimum seconds/nanoseconds representable by Go's time.Duration.\n\tconst maxSeconds = math.MaxInt64 / int64(time.Second)\n\tconst maxNanosAtMaxSeconds = math.MaxInt64 % int64(time.Second)\n\tconst minSeconds = math.MinInt64 / int64(time.Second)\n\tconst minNanosAtMinSeconds = math.MinInt64 % int64(time.Second)\n\n\tif sec > maxSeconds || (sec == maxSeconds && ns >= maxNanosAtMaxSeconds) {\n\t\t*d = Duration(math.MaxInt64)\n\t} else if sec < minSeconds || (sec == minSeconds && ns <= minNanosAtMinSeconds) {\n\t\t*d = Duration(math.MinInt64)\n\t} else {\n\t\t*d = Duration(sec*int64(time.Second) + ns)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package serviceconfig contains utility functions to parse service config.\npackage serviceconfig\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\texternalserviceconfig \"google.golang.org/grpc/serviceconfig\"\n)\n\nvar logger = grpclog.Component(\"core\")\n\n// BalancerConfig wraps the name and config associated with one load balancing\n// policy. It corresponds to a single entry of the loadBalancingConfig field\n// from ServiceConfig.\n//\n// It implements the json.Unmarshaler interface.\n//\n// https://github.com/grpc/grpc-proto/blob/54713b1e8bc6ed2d4f25fb4dff527842150b91b2/grpc/service_config/service_config.proto#L247\ntype BalancerConfig struct {\n\tName   string\n\tConfig externalserviceconfig.LoadBalancingConfig\n}\n\ntype intermediateBalancerConfig []map[string]json.RawMessage\n\n// MarshalJSON implements the json.Marshaler interface.\n//\n// It marshals the balancer and config into a length-1 slice\n// ([]map[string]config).\nfunc (bc *BalancerConfig) MarshalJSON() ([]byte, error) {\n\tif bc.Config == nil {\n\t\t// If config is nil, return empty config `{}`.\n\t\treturn []byte(fmt.Sprintf(`[{%q: %v}]`, bc.Name, \"{}\")), nil\n\t}\n\tc, err := json.Marshal(bc.Config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn []byte(fmt.Sprintf(`[{%q: %s}]`, bc.Name, c)), nil\n}\n\n// UnmarshalJSON implements the json.Unmarshaler interface.\n//\n// ServiceConfig contains a list of loadBalancingConfigs, each with a name and\n// config. This method iterates through that list in order, and stops at the\n// first policy that is supported.\n//   - If the config for the first supported policy is invalid, the whole service\n//     config is invalid.\n//   - If the list doesn't contain any supported policy, the whole service config\n//     is invalid.\nfunc (bc *BalancerConfig) UnmarshalJSON(b []byte) error {\n\tvar ir intermediateBalancerConfig\n\terr := json.Unmarshal(b, &ir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar names []string\n\tfor i, lbcfg := range ir {\n\t\tif len(lbcfg) != 1 {\n\t\t\treturn fmt.Errorf(\"invalid loadBalancingConfig: entry %v does not contain exactly 1 policy/config pair: %q\", i, lbcfg)\n\t\t}\n\n\t\tvar (\n\t\t\tname    string\n\t\t\tjsonCfg json.RawMessage\n\t\t)\n\t\t// Get the key:value pair from the map. We have already made sure that\n\t\t// the map contains a single entry.\n\t\tfor name, jsonCfg = range lbcfg {\n\t\t}\n\n\t\tnames = append(names, name)\n\t\tbuilder := balancer.Get(name)\n\t\tif builder == nil {\n\t\t\t// If the balancer is not registered, move on to the next config.\n\t\t\t// This is not an error.\n\t\t\tcontinue\n\t\t}\n\t\tbc.Name = name\n\n\t\tparser, ok := builder.(balancer.ConfigParser)\n\t\tif !ok {\n\t\t\tif string(jsonCfg) != \"{}\" {\n\t\t\t\tlogger.Warningf(\"non-empty balancer configuration %q, but balancer does not implement ParseConfig\", string(jsonCfg))\n\t\t\t}\n\t\t\t// Stop at this, though the builder doesn't support parsing config.\n\t\t\treturn nil\n\t\t}\n\n\t\tcfg, err := parser.ParseConfig(jsonCfg)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing loadBalancingConfig for policy %q: %v\", name, err)\n\t\t}\n\t\tbc.Config = cfg\n\t\treturn nil\n\t}\n\t// This is reached when the for loop iterates over all entries, but didn't\n\t// return. This means we had a loadBalancingConfig slice but did not\n\t// encounter a registered policy. The config is considered invalid in this\n\t// case.\n\treturn fmt.Errorf(\"invalid loadBalancingConfig: no supported policies found in %v\", names)\n}\n\n// MethodConfig defines the configuration recommended by the service providers for a\n// particular method.\ntype MethodConfig struct {\n\t// WaitForReady indicates whether RPCs sent to this method should wait until\n\t// the connection is ready by default (!failfast). The value specified via the\n\t// gRPC client API will override the value set here.\n\tWaitForReady *bool\n\t// Timeout is the default timeout for RPCs sent to this method. The actual\n\t// deadline used will be the minimum of the value specified here and the value\n\t// set by the application via the gRPC client API.  If either one is not set,\n\t// then the other will be used.  If neither is set, then the RPC has no deadline.\n\tTimeout *time.Duration\n\t// MaxReqSize is the maximum allowed payload size for an individual request in a\n\t// stream (client->server) in bytes. The size which is measured is the serialized\n\t// payload after per-message compression (but before stream compression) in bytes.\n\t// The actual value used is the minimum of the value specified here and the value set\n\t// by the application via the gRPC client API. If either one is not set, then the other\n\t// will be used.  If neither is set, then the built-in default is used.\n\tMaxReqSize *int\n\t// MaxRespSize is the maximum allowed payload size for an individual response in a\n\t// stream (server->client) in bytes.\n\tMaxRespSize *int\n\t// RetryPolicy configures retry options for the method.\n\tRetryPolicy *RetryPolicy\n}\n\n// RetryPolicy defines the go-native version of the retry policy defined by the\n// service config here:\n// https://github.com/grpc/proposal/blob/master/A6-client-retries.md#integration-with-service-config\ntype RetryPolicy struct {\n\t// MaxAttempts is the maximum number of attempts, including the original RPC.\n\t//\n\t// This field is required and must be two or greater.\n\tMaxAttempts int\n\n\t// Exponential backoff parameters. The initial retry attempt will occur at\n\t// random(0, initialBackoff). In general, the nth attempt will occur at\n\t// random(0,\n\t//   min(initialBackoff*backoffMultiplier**(n-1), maxBackoff)).\n\t//\n\t// These fields are required and must be greater than zero.\n\tInitialBackoff    time.Duration\n\tMaxBackoff        time.Duration\n\tBackoffMultiplier float64\n\n\t// The set of status codes which may be retried.\n\t//\n\t// Status codes are specified as strings, e.g., \"UNAVAILABLE\".\n\t//\n\t// This field is required and must be non-empty.\n\t// Note: a set is used to store this for easy lookup.\n\tRetryableStatusCodes map[codes.Code]bool\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/stats/labels.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package stats provides internal stats related functionality.\npackage stats\n\nimport \"context\"\n\n// Labels are the labels for metrics.\ntype Labels struct {\n\t// TelemetryLabels are the telemetry labels to record.\n\tTelemetryLabels map[string]string\n}\n\ntype labelsKey struct{}\n\n// GetLabels returns the Labels stored in the context, or nil if there is one.\nfunc GetLabels(ctx context.Context) *Labels {\n\tlabels, _ := ctx.Value(labelsKey{}).(*Labels)\n\treturn labels\n}\n\n// SetLabels sets the Labels in the context.\nfunc SetLabels(ctx context.Context, labels *Labels) context.Context {\n\t// could also append\n\treturn context.WithValue(ctx, labelsKey{}, labels)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/stats/metrics_recorder_list.go",
    "content": "/*\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage stats\n\nimport (\n\t\"fmt\"\n\n\testats \"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/stats\"\n)\n\n// MetricsRecorderList forwards Record calls to all of its metricsRecorders.\n//\n// It eats any record calls where the label values provided do not match the\n// number of label keys.\ntype MetricsRecorderList struct {\n\t// metricsRecorders are the metrics recorders this list will forward to.\n\tmetricsRecorders []estats.MetricsRecorder\n}\n\n// NewMetricsRecorderList creates a new metric recorder list with all the stats\n// handlers provided which implement the MetricsRecorder interface.\n// If no stats handlers provided implement the MetricsRecorder interface,\n// the MetricsRecorder list returned is a no-op.\nfunc NewMetricsRecorderList(shs []stats.Handler) *MetricsRecorderList {\n\tvar mrs []estats.MetricsRecorder\n\tfor _, sh := range shs {\n\t\tif mr, ok := sh.(estats.MetricsRecorder); ok {\n\t\t\tmrs = append(mrs, mr)\n\t\t}\n\t}\n\treturn &MetricsRecorderList{\n\t\tmetricsRecorders: mrs,\n\t}\n}\n\nfunc verifyLabels(desc *estats.MetricDescriptor, labelsRecv ...string) {\n\tif got, want := len(labelsRecv), len(desc.Labels)+len(desc.OptionalLabels); got != want {\n\t\tpanic(fmt.Sprintf(\"Received %d labels in call to record metric %q, but expected %d.\", got, desc.Name, want))\n\t}\n}\n\n// RecordInt64Count records the measurement alongside labels on the int\n// count associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordInt64Count(handle *estats.Int64CountHandle, incr int64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordInt64Count(handle, incr, labels...)\n\t}\n}\n\n// RecordInt64UpDownCount records the measurement alongside labels on the int\n// count associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordInt64UpDownCount(handle *estats.Int64UpDownCountHandle, incr int64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordInt64UpDownCount(handle, incr, labels...)\n\t}\n}\n\n// RecordFloat64Count records the measurement alongside labels on the float\n// count associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordFloat64Count(handle *estats.Float64CountHandle, incr float64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordFloat64Count(handle, incr, labels...)\n\t}\n}\n\n// RecordInt64Histo records the measurement alongside labels on the int\n// histo associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordInt64Histo(handle *estats.Int64HistoHandle, incr int64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordInt64Histo(handle, incr, labels...)\n\t}\n}\n\n// RecordFloat64Histo records the measurement alongside labels on the float\n// histo associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordFloat64Histo(handle *estats.Float64HistoHandle, incr float64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordFloat64Histo(handle, incr, labels...)\n\t}\n}\n\n// RecordInt64Gauge records the measurement alongside labels on the int\n// gauge associated with the provided handle.\nfunc (l *MetricsRecorderList) RecordInt64Gauge(handle *estats.Int64GaugeHandle, incr int64, labels ...string) {\n\tverifyLabels(handle.Descriptor(), labels...)\n\n\tfor _, metricRecorder := range l.metricsRecorders {\n\t\tmetricRecorder.RecordInt64Gauge(handle, incr, labels...)\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/stats/stats.go",
    "content": "/*\n *\n * Copyright 2025 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage stats\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/grpc/stats\"\n)\n\ntype combinedHandler struct {\n\thandlers []stats.Handler\n}\n\n// NewCombinedHandler combines multiple stats.Handlers into a single handler.\n//\n// It returns nil if no handlers are provided. If only one handler is\n// provided, it is returned directly without wrapping.\nfunc NewCombinedHandler(handlers ...stats.Handler) stats.Handler {\n\tswitch len(handlers) {\n\tcase 0:\n\t\treturn nil\n\tcase 1:\n\t\treturn handlers[0]\n\tdefault:\n\t\treturn &combinedHandler{handlers: handlers}\n\t}\n}\n\nfunc (ch *combinedHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {\n\tfor _, h := range ch.handlers {\n\t\tctx = h.TagRPC(ctx, info)\n\t}\n\treturn ctx\n}\n\nfunc (ch *combinedHandler) HandleRPC(ctx context.Context, stats stats.RPCStats) {\n\tfor _, h := range ch.handlers {\n\t\th.HandleRPC(ctx, stats)\n\t}\n}\n\nfunc (ch *combinedHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {\n\tfor _, h := range ch.handlers {\n\t\tctx = h.TagConn(ctx, info)\n\t}\n\treturn ctx\n}\n\nfunc (ch *combinedHandler) HandleConn(ctx context.Context, stats stats.ConnStats) {\n\tfor _, h := range ch.handlers {\n\t\th.HandleConn(ctx, stats)\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/status/status.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package status implements errors returned by gRPC.  These errors are\n// serialized and transmitted on the wire between server and client, and allow\n// for additional data to be transmitted via the Details field in the status\n// proto.  gRPC service handlers should return an error created by this\n// package, and gRPC clients should expect a corresponding error to be\n// returned from the RPC call.\n//\n// This package upholds the invariants that a non-nil error may not\n// contain an OK code, and an OK code must result in a nil error.\npackage status\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tspb \"google.golang.org/genproto/googleapis/rpc/status\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/protoadapt\"\n\t\"google.golang.org/protobuf/types/known/anypb\"\n)\n\n// Status represents an RPC status code, message, and details.  It is immutable\n// and should be created with New, Newf, or FromProto.\ntype Status struct {\n\ts *spb.Status\n}\n\n// NewWithProto returns a new status including details from statusProto.  This\n// is meant to be used by the gRPC library only.\nfunc NewWithProto(code codes.Code, message string, statusProto []string) *Status {\n\tif len(statusProto) != 1 {\n\t\t// No grpc-status-details bin header, or multiple; just ignore.\n\t\treturn &Status{s: &spb.Status{Code: int32(code), Message: message}}\n\t}\n\tst := &spb.Status{}\n\tif err := proto.Unmarshal([]byte(statusProto[0]), st); err != nil {\n\t\t// Probably not a google.rpc.Status proto; do not provide details.\n\t\treturn &Status{s: &spb.Status{Code: int32(code), Message: message}}\n\t}\n\tif st.Code == int32(code) {\n\t\t// The codes match between the grpc-status header and the\n\t\t// grpc-status-details-bin header; use the full details proto.\n\t\treturn &Status{s: st}\n\t}\n\treturn &Status{\n\t\ts: &spb.Status{\n\t\t\tCode: int32(codes.Internal),\n\t\t\tMessage: fmt.Sprintf(\n\t\t\t\t\"grpc-status-details-bin mismatch: grpc-status=%v, grpc-message=%q, grpc-status-details-bin=%+v\",\n\t\t\t\tcode, message, st,\n\t\t\t),\n\t\t},\n\t}\n}\n\n// New returns a Status representing c and msg.\nfunc New(c codes.Code, msg string) *Status {\n\treturn &Status{s: &spb.Status{Code: int32(c), Message: msg}}\n}\n\n// Newf returns New(c, fmt.Sprintf(format, a...)).\nfunc Newf(c codes.Code, format string, a ...any) *Status {\n\treturn New(c, fmt.Sprintf(format, a...))\n}\n\n// FromProto returns a Status representing s.\nfunc FromProto(s *spb.Status) *Status {\n\treturn &Status{s: proto.Clone(s).(*spb.Status)}\n}\n\n// Err returns an error representing c and msg.  If c is OK, returns nil.\nfunc Err(c codes.Code, msg string) error {\n\treturn New(c, msg).Err()\n}\n\n// Errorf returns Error(c, fmt.Sprintf(format, a...)).\nfunc Errorf(c codes.Code, format string, a ...any) error {\n\treturn Err(c, fmt.Sprintf(format, a...))\n}\n\n// Code returns the status code contained in s.\nfunc (s *Status) Code() codes.Code {\n\tif s == nil || s.s == nil {\n\t\treturn codes.OK\n\t}\n\treturn codes.Code(s.s.Code)\n}\n\n// Message returns the message contained in s.\nfunc (s *Status) Message() string {\n\tif s == nil || s.s == nil {\n\t\treturn \"\"\n\t}\n\treturn s.s.Message\n}\n\n// Proto returns s's status as an spb.Status proto message.\nfunc (s *Status) Proto() *spb.Status {\n\tif s == nil {\n\t\treturn nil\n\t}\n\treturn proto.Clone(s.s).(*spb.Status)\n}\n\n// Err returns an immutable error representing s; returns nil if s.Code() is OK.\nfunc (s *Status) Err() error {\n\tif s.Code() == codes.OK {\n\t\treturn nil\n\t}\n\treturn &Error{s: s}\n}\n\n// WithDetails returns a new status with the provided details messages appended to the status.\n// If any errors are encountered, it returns nil and the first error encountered.\nfunc (s *Status) WithDetails(details ...protoadapt.MessageV1) (*Status, error) {\n\tif s.Code() == codes.OK {\n\t\treturn nil, errors.New(\"no error details for status with code OK\")\n\t}\n\t// s.Code() != OK implies that s.Proto() != nil.\n\tp := s.Proto()\n\tfor _, detail := range details {\n\t\tm, err := anypb.New(protoadapt.MessageV2Of(detail))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tp.Details = append(p.Details, m)\n\t}\n\treturn &Status{s: p}, nil\n}\n\n// Details returns a slice of details messages attached to the status.\n// If a detail cannot be decoded, the error is returned in place of the detail.\n// If the detail can be decoded, the proto message returned is of the same\n// type that was given to WithDetails().\nfunc (s *Status) Details() []any {\n\tif s == nil || s.s == nil {\n\t\treturn nil\n\t}\n\tdetails := make([]any, 0, len(s.s.Details))\n\tfor _, any := range s.s.Details {\n\t\tdetail, err := any.UnmarshalNew()\n\t\tif err != nil {\n\t\t\tdetails = append(details, err)\n\t\t\tcontinue\n\t\t}\n\t\t// The call to MessageV1Of is required to unwrap the proto message if\n\t\t// it implemented only the MessageV1 API. The proto message would have\n\t\t// been wrapped in a V2 wrapper in Status.WithDetails. V2 messages are\n\t\t// added to a global registry used by any.UnmarshalNew().\n\t\t// MessageV1Of has the following behaviour:\n\t\t// 1. If the given message is a wrapped MessageV1, it returns the\n\t\t//   unwrapped value.\n\t\t// 2. If the given message already implements MessageV1, it returns it\n\t\t//   as is.\n\t\t// 3. Else, it wraps the MessageV2 in a MessageV1 wrapper.\n\t\t//\n\t\t// Since the Status.WithDetails() API only accepts MessageV1, calling\n\t\t// MessageV1Of ensures we return the same type that was given to\n\t\t// WithDetails:\n\t\t// * If the give type implemented only MessageV1, the unwrapping from\n\t\t//   point 1 above will restore the type.\n\t\t// * If the given type implemented both MessageV1 and MessageV2, point 2\n\t\t//   above will ensure no wrapping is performed.\n\t\t// * If the given type implemented only MessageV2 and was wrapped using\n\t\t//   MessageV1Of before passing to WithDetails(), it would be unwrapped\n\t\t//   in WithDetails by calling MessageV2Of(). Point 3 above will ensure\n\t\t//   that the type is wrapped in a MessageV1 wrapper again before\n\t\t//   returning. Note that protoc-gen-go doesn't generate code which\n\t\t//   implements ONLY MessageV2 at the time of writing.\n\t\t//\n\t\t// NOTE: Status details can also be added using the FromProto method.\n\t\t// This could theoretically allow passing a Detail message that only\n\t\t// implements the V2 API. In such a case the message will be wrapped in\n\t\t// a MessageV1 wrapper when fetched using Details().\n\t\t// Since protoc-gen-go generates only code that implements both V1 and\n\t\t// V2 APIs for backward compatibility, this is not a concern.\n\t\tdetails = append(details, protoadapt.MessageV1Of(detail))\n\t}\n\treturn details\n}\n\nfunc (s *Status) String() string {\n\treturn fmt.Sprintf(\"rpc error: code = %s desc = %s\", s.Code(), s.Message())\n}\n\n// Error wraps a pointer of a status proto. It implements error and Status,\n// and a nil *Error should never be returned by this package.\ntype Error struct {\n\ts *Status\n}\n\nfunc (e *Error) Error() string {\n\treturn e.s.String()\n}\n\n// GRPCStatus returns the Status represented by se.\nfunc (e *Error) GRPCStatus() *Status {\n\treturn e.s\n}\n\n// Is implements future error.Is functionality.\n// A Error is equivalent if the code and message are identical.\nfunc (e *Error) Is(target error) bool {\n\ttse, ok := target.(*Error)\n\tif !ok {\n\t\treturn false\n\t}\n\treturn proto.Equal(e.s.s, tse.s.s)\n}\n\n// IsRestrictedControlPlaneCode returns whether the status includes a code\n// restricted for control plane usage as defined by gRFC A54.\nfunc IsRestrictedControlPlaneCode(s *Status) bool {\n\tswitch s.Code() {\n\tcase codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// RawStatusProto returns the internal protobuf message for use by gRPC itself.\nfunc RawStatusProto(s *Status) *spb.Status {\n\tif s == nil {\n\t\treturn nil\n\t}\n\treturn s.s\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package syscall provides functionalities that grpc uses to get low-level operating system\n// stats/info.\npackage syscall\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"golang.org/x/sys/unix\"\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nvar logger = grpclog.Component(\"core\")\n\n// GetCPUTime returns the how much CPU time has passed since the start of this process.\nfunc GetCPUTime() int64 {\n\tvar ts unix.Timespec\n\tif err := unix.ClockGettime(unix.CLOCK_PROCESS_CPUTIME_ID, &ts); err != nil {\n\t\tlogger.Fatal(err)\n\t}\n\treturn ts.Nano()\n}\n\n// Rusage is an alias for syscall.Rusage under linux environment.\ntype Rusage = syscall.Rusage\n\n// GetRusage returns the resource usage of current process.\nfunc GetRusage() *Rusage {\n\trusage := new(Rusage)\n\tsyscall.Getrusage(syscall.RUSAGE_SELF, rusage)\n\treturn rusage\n}\n\n// CPUTimeDiff returns the differences of user CPU time and system CPU time used\n// between two Rusage structs.\nfunc CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64) {\n\tvar (\n\t\tutimeDiffs  = latest.Utime.Sec - first.Utime.Sec\n\t\tutimeDiffus = latest.Utime.Usec - first.Utime.Usec\n\t\tstimeDiffs  = latest.Stime.Sec - first.Stime.Sec\n\t\tstimeDiffus = latest.Stime.Usec - first.Stime.Usec\n\t)\n\n\tuTimeElapsed := float64(utimeDiffs) + float64(utimeDiffus)*1.0e-6\n\tsTimeElapsed := float64(stimeDiffs) + float64(stimeDiffus)*1.0e-6\n\n\treturn uTimeElapsed, sTimeElapsed\n}\n\n// SetTCPUserTimeout sets the TCP user timeout on a connection's socket\nfunc SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error {\n\ttcpconn, ok := conn.(*net.TCPConn)\n\tif !ok {\n\t\t// not a TCP connection. exit early\n\t\treturn nil\n\t}\n\trawConn, err := tcpconn.SyscallConn()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error getting raw connection: %v\", err)\n\t}\n\terr = rawConn.Control(func(fd uintptr) {\n\t\terr = syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, int(timeout/time.Millisecond))\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error setting option on socket: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// GetTCPUserTimeout gets the TCP user timeout on a connection's socket\nfunc GetTCPUserTimeout(conn net.Conn) (opt int, err error) {\n\ttcpconn, ok := conn.(*net.TCPConn)\n\tif !ok {\n\t\terr = fmt.Errorf(\"conn is not *net.TCPConn. got %T\", conn)\n\t\treturn\n\t}\n\trawConn, err := tcpconn.SyscallConn()\n\tif err != nil {\n\t\terr = fmt.Errorf(\"error getting raw connection: %v\", err)\n\t\treturn\n\t}\n\terr = rawConn.Control(func(fd uintptr) {\n\t\topt, err = syscall.GetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT)\n\t})\n\tif err != nil {\n\t\terr = fmt.Errorf(\"error getting option on socket: %v\", err)\n\t\treturn\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go",
    "content": "//go:build !linux\n// +build !linux\n\n/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package syscall provides functionalities that grpc uses to get low-level\n// operating system stats/info.\npackage syscall\n\nimport (\n\t\"net\"\n\t\"sync\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nvar once sync.Once\nvar logger = grpclog.Component(\"core\")\n\nfunc log() {\n\tonce.Do(func() {\n\t\tlogger.Info(\"CPU time info is unavailable on non-linux environments.\")\n\t})\n}\n\n// GetCPUTime returns the how much CPU time has passed since the start of this\n// process. It always returns 0 under non-linux environments.\nfunc GetCPUTime() int64 {\n\tlog()\n\treturn 0\n}\n\n// Rusage is an empty struct under non-linux environments.\ntype Rusage struct{}\n\n// GetRusage is a no-op function under non-linux environments.\nfunc GetRusage() *Rusage {\n\tlog()\n\treturn nil\n}\n\n// CPUTimeDiff returns the differences of user CPU time and system CPU time used\n// between two Rusage structs. It a no-op function for non-linux environments.\nfunc CPUTimeDiff(*Rusage, *Rusage) (float64, float64) {\n\tlog()\n\treturn 0, 0\n}\n\n// SetTCPUserTimeout is a no-op function under non-linux environments.\nfunc SetTCPUserTimeout(net.Conn, time.Duration) error {\n\tlog()\n\treturn nil\n}\n\n// GetTCPUserTimeout is a no-op function under non-linux environments.\n// A negative return value indicates the operation is not supported\nfunc GetTCPUserTimeout(net.Conn) (int, error) {\n\tlog()\n\treturn -1, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/tcp_keepalive_others.go",
    "content": "//go:build !unix && !windows\n\n/*\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\nimport (\n\t\"net\"\n)\n\n// NetDialerWithTCPKeepalive returns a vanilla net.Dialer on non-unix platforms.\nfunc NetDialerWithTCPKeepalive() *net.Dialer {\n\treturn &net.Dialer{}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go",
    "content": "//go:build unix\n\n/*\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\nimport (\n\t\"net\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// NetDialerWithTCPKeepalive returns a net.Dialer that enables TCP keepalives on\n// the underlying connection with OS default values for keepalive parameters.\n//\n// TODO: Once https://github.com/golang/go/issues/62254 lands, and the\n// appropriate Go version becomes less than our least supported Go version, we\n// should look into using the new API to make things more straightforward.\nfunc NetDialerWithTCPKeepalive() *net.Dialer {\n\treturn &net.Dialer{\n\t\t// Setting a negative value here prevents the Go stdlib from overriding\n\t\t// the values of TCP keepalive time and interval. It also prevents the\n\t\t// Go stdlib from enabling TCP keepalives by default.\n\t\tKeepAlive: time.Duration(-1),\n\t\t// This method is called after the underlying network socket is created,\n\t\t// but before dialing the socket (or calling its connect() method). The\n\t\t// combination of unconditionally enabling TCP keepalives here, and\n\t\t// disabling the overriding of TCP keepalive parameters by setting the\n\t\t// KeepAlive field to a negative value above, results in OS defaults for\n\t\t// the TCP keepalive interval and time parameters.\n\t\tControl: func(_, _ string, c syscall.RawConn) error {\n\t\t\treturn c.Control(func(fd uintptr) {\n\t\t\t\tunix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_KEEPALIVE, 1)\n\t\t\t})\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go",
    "content": "//go:build windows\n\n/*\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage internal\n\nimport (\n\t\"net\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\n// NetDialerWithTCPKeepalive returns a net.Dialer that enables TCP keepalives on\n// the underlying connection with OS default values for keepalive parameters.\n//\n// TODO: Once https://github.com/golang/go/issues/62254 lands, and the\n// appropriate Go version becomes less than our least supported Go version, we\n// should look into using the new API to make things more straightforward.\nfunc NetDialerWithTCPKeepalive() *net.Dialer {\n\treturn &net.Dialer{\n\t\t// Setting a negative value here prevents the Go stdlib from overriding\n\t\t// the values of TCP keepalive time and interval. It also prevents the\n\t\t// Go stdlib from enabling TCP keepalives by default.\n\t\tKeepAlive: time.Duration(-1),\n\t\t// This method is called after the underlying network socket is created,\n\t\t// but before dialing the socket (or calling its connect() method). The\n\t\t// combination of unconditionally enabling TCP keepalives here, and\n\t\t// disabling the overriding of TCP keepalive parameters by setting the\n\t\t// KeepAlive field to a negative value above, results in OS defaults for\n\t\t// the TCP keepalive interval and time parameters.\n\t\tControl: func(_, _ string, c syscall.RawConn) error {\n\t\t\treturn c.Control(func(fd uintptr) {\n\t\t\t\twindows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_KEEPALIVE, 1)\n\t\t\t})\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/bdp_estimator.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"sync\"\n\t\"time\"\n)\n\nconst (\n\t// bdpLimit is the maximum value the flow control windows will be increased\n\t// to.  TCP typically limits this to 4MB, but some systems go up to 16MB.\n\t// Since this is only a limit, it is safe to make it optimistic.\n\tbdpLimit = (1 << 20) * 16\n\t// alpha is a constant factor used to keep a moving average\n\t// of RTTs.\n\talpha = 0.9\n\t// If the current bdp sample is greater than or equal to\n\t// our beta * our estimated bdp and the current bandwidth\n\t// sample is the maximum bandwidth observed so far, we\n\t// increase our bbp estimate by a factor of gamma.\n\tbeta = 0.66\n\t// To put our bdp to be smaller than or equal to twice the real BDP,\n\t// we should multiply our current sample with 4/3, however to round things out\n\t// we use 2 as the multiplication factor.\n\tgamma = 2\n)\n\n// Adding arbitrary data to ping so that its ack can be identified.\n// Easter-egg: what does the ping message say?\nvar bdpPing = &ping{data: [8]byte{2, 4, 16, 16, 9, 14, 7, 7}}\n\ntype bdpEstimator struct {\n\t// sentAt is the time when the ping was sent.\n\tsentAt time.Time\n\n\tmu sync.Mutex\n\t// bdp is the current bdp estimate.\n\tbdp uint32\n\t// sample is the number of bytes received in one measurement cycle.\n\tsample uint32\n\t// bwMax is the maximum bandwidth noted so far (bytes/sec).\n\tbwMax float64\n\t// bool to keep track of the beginning of a new measurement cycle.\n\tisSent bool\n\t// Callback to update the window sizes.\n\tupdateFlowControl func(n uint32)\n\t// sampleCount is the number of samples taken so far.\n\tsampleCount uint64\n\t// round trip time (seconds)\n\trtt float64\n}\n\n// timesnap registers the time bdp ping was sent out so that\n// network rtt can be calculated when its ack is received.\n// It is called (by controller) when the bdpPing is\n// being written on the wire.\nfunc (b *bdpEstimator) timesnap(d [8]byte) {\n\tif bdpPing.data != d {\n\t\treturn\n\t}\n\tb.sentAt = time.Now()\n}\n\n// add adds bytes to the current sample for calculating bdp.\n// It returns true only if a ping must be sent. This can be used\n// by the caller (handleData) to make decision about batching\n// a window update with it.\nfunc (b *bdpEstimator) add(n uint32) bool {\n\tb.mu.Lock()\n\tdefer b.mu.Unlock()\n\tif b.bdp == bdpLimit {\n\t\treturn false\n\t}\n\tif !b.isSent {\n\t\tb.isSent = true\n\t\tb.sample = n\n\t\tb.sentAt = time.Time{}\n\t\tb.sampleCount++\n\t\treturn true\n\t}\n\tb.sample += n\n\treturn false\n}\n\n// calculate is called when an ack for a bdp ping is received.\n// Here we calculate the current bdp and bandwidth sample and\n// decide if the flow control windows should go up.\nfunc (b *bdpEstimator) calculate(d [8]byte) {\n\t// Check if the ping acked for was the bdp ping.\n\tif bdpPing.data != d {\n\t\treturn\n\t}\n\tb.mu.Lock()\n\trttSample := time.Since(b.sentAt).Seconds()\n\tif b.sampleCount < 10 {\n\t\t// Bootstrap rtt with an average of first 10 rtt samples.\n\t\tb.rtt += (rttSample - b.rtt) / float64(b.sampleCount)\n\t} else {\n\t\t// Heed to the recent past more.\n\t\tb.rtt += (rttSample - b.rtt) * float64(alpha)\n\t}\n\tb.isSent = false\n\t// The number of bytes accumulated so far in the sample is smaller\n\t// than or equal to 1.5 times the real BDP on a saturated connection.\n\tbwCurrent := float64(b.sample) / (b.rtt * float64(1.5))\n\tif bwCurrent > b.bwMax {\n\t\tb.bwMax = bwCurrent\n\t}\n\t// If the current sample (which is smaller than or equal to the 1.5 times the real BDP) is\n\t// greater than or equal to 2/3rd our perceived bdp AND this is the maximum bandwidth seen so far, we\n\t// should update our perception of the network BDP.\n\tif float64(b.sample) >= beta*float64(b.bdp) && bwCurrent == b.bwMax && b.bdp != bdpLimit {\n\t\tsampleFloat := float64(b.sample)\n\t\tb.bdp = uint32(gamma * sampleFloat)\n\t\tif b.bdp > bdpLimit {\n\t\t\tb.bdp = bdpLimit\n\t\t}\n\t\tbdp := b.bdp\n\t\tb.mu.Unlock()\n\t\tb.updateFlowControl(bdp)\n\t\treturn\n\t}\n\tb.mu.Unlock()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/client_stream.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"sync/atomic\"\n\n\t\"golang.org/x/net/http2\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// ClientStream implements streaming functionality for a gRPC client.\ntype ClientStream struct {\n\tStream // Embed for common stream functionality.\n\n\tct       *http2Client\n\tdone     chan struct{} // closed at the end of stream to unblock writers.\n\tdoneFunc func()        // invoked at the end of stream.\n\n\theaderChan chan struct{} // closed to indicate the end of header metadata.\n\theader     metadata.MD   // the received header metadata\n\n\tstatus *status.Status // the status error received from the server\n\n\t// Non-pointer fields are at the end to optimize GC allocations.\n\n\t// headerValid indicates whether a valid header was received.  Only\n\t// meaningful after headerChan is closed (always call waitOnHeader() before\n\t// reading its value).\n\theaderValid      bool\n\tnoHeaders        bool        // set if the client never received headers (set only after the stream is done).\n\theaderChanClosed uint32      // set when headerChan is closed. Used to avoid closing headerChan multiple times.\n\tbytesReceived    atomic.Bool // indicates whether any bytes have been received on this stream\n\tunprocessed      atomic.Bool // set if the server sends a refused stream or GOAWAY including this stream\n}\n\n// Read reads an n byte message from the input stream.\nfunc (s *ClientStream) Read(n int) (mem.BufferSlice, error) {\n\tb, err := s.Stream.read(n)\n\tif err == nil {\n\t\ts.ct.incrMsgRecv()\n\t}\n\treturn b, err\n}\n\n// Close closes the stream and propagates err to any readers.\nfunc (s *ClientStream) Close(err error) {\n\tvar (\n\t\trst     bool\n\t\trstCode http2.ErrCode\n\t)\n\tif err != nil {\n\t\trst = true\n\t\trstCode = http2.ErrCodeCancel\n\t}\n\ts.ct.closeStream(s, err, rst, rstCode, status.Convert(err), nil, false)\n}\n\n// Write writes the hdr and data bytes to the output stream.\nfunc (s *ClientStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {\n\treturn s.ct.write(s, hdr, data, opts)\n}\n\n// BytesReceived indicates whether any bytes have been received on this stream.\nfunc (s *ClientStream) BytesReceived() bool {\n\treturn s.bytesReceived.Load()\n}\n\n// Unprocessed indicates whether the server did not process this stream --\n// i.e. it sent a refused stream or GOAWAY including this stream ID.\nfunc (s *ClientStream) Unprocessed() bool {\n\treturn s.unprocessed.Load()\n}\n\nfunc (s *ClientStream) waitOnHeader() {\n\tselect {\n\tcase <-s.ctx.Done():\n\t\t// Close the stream to prevent headers/trailers from changing after\n\t\t// this function returns.\n\t\ts.Close(ContextErr(s.ctx.Err()))\n\t\t// headerChan could possibly not be closed yet if closeStream raced\n\t\t// with operateHeaders; wait until it is closed explicitly here.\n\t\t<-s.headerChan\n\tcase <-s.headerChan:\n\t}\n}\n\n// RecvCompress returns the compression algorithm applied to the inbound\n// message. It is empty string if there is no compression applied.\nfunc (s *ClientStream) RecvCompress() string {\n\ts.waitOnHeader()\n\treturn s.recvCompress\n}\n\n// Done returns a channel which is closed when it receives the final status\n// from the server.\nfunc (s *ClientStream) Done() <-chan struct{} {\n\treturn s.done\n}\n\n// Header returns the header metadata of the stream. Acquires the key-value\n// pairs of header metadata once it is available. It blocks until i) the\n// metadata is ready or ii) there is no header metadata or iii) the stream is\n// canceled/expired.\nfunc (s *ClientStream) Header() (metadata.MD, error) {\n\ts.waitOnHeader()\n\n\tif !s.headerValid || s.noHeaders {\n\t\treturn nil, s.status.Err()\n\t}\n\n\treturn s.header.Copy(), nil\n}\n\n// TrailersOnly blocks until a header or trailers-only frame is received and\n// then returns true if the stream was trailers-only.  If the stream ends\n// before headers are received, returns true, nil.\nfunc (s *ClientStream) TrailersOnly() bool {\n\ts.waitOnHeader()\n\treturn s.noHeaders\n}\n\n// Status returns the status received from the server.\n// Status can be read safely only after the stream has ended,\n// that is, after Done() is closed.\nfunc (s *ClientStream) Status() *status.Status {\n\treturn s.status\n}\n\nfunc (s *ClientStream) requestRead(n int) {\n\ts.ct.adjustWindow(s, uint32(n))\n}\n\nfunc (s *ClientStream) updateWindow(n int) {\n\ts.ct.updateWindow(s, uint32(n))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/controlbuf.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"golang.org/x/net/http2\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"google.golang.org/grpc/internal/grpclog\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/status\"\n)\n\nvar updateHeaderTblSize = func(e *hpack.Encoder, v uint32) {\n\te.SetMaxDynamicTableSizeLimit(v)\n}\n\n// itemNodePool is used to reduce heap allocations.\nvar itemNodePool = sync.Pool{\n\tNew: func() any {\n\t\treturn &itemNode{}\n\t},\n}\n\ntype itemNode struct {\n\tit   any\n\tnext *itemNode\n}\n\ntype itemList struct {\n\thead *itemNode\n\ttail *itemNode\n}\n\nfunc (il *itemList) enqueue(i any) {\n\tn := itemNodePool.Get().(*itemNode)\n\tn.next = nil\n\tn.it = i\n\tif il.tail == nil {\n\t\til.head, il.tail = n, n\n\t\treturn\n\t}\n\til.tail.next = n\n\til.tail = n\n}\n\n// peek returns the first item in the list without removing it from the\n// list.\nfunc (il *itemList) peek() any {\n\treturn il.head.it\n}\n\nfunc (il *itemList) dequeue() any {\n\tif il.head == nil {\n\t\treturn nil\n\t}\n\ti := il.head.it\n\ttemp := il.head\n\til.head = il.head.next\n\titemNodePool.Put(temp)\n\tif il.head == nil {\n\t\til.tail = nil\n\t}\n\treturn i\n}\n\nfunc (il *itemList) dequeueAll() *itemNode {\n\th := il.head\n\til.head, il.tail = nil, nil\n\treturn h\n}\n\nfunc (il *itemList) isEmpty() bool {\n\treturn il.head == nil\n}\n\n// The following defines various control items which could flow through\n// the control buffer of transport. They represent different aspects of\n// control tasks, e.g., flow control, settings, streaming resetting, etc.\n\n// maxQueuedTransportResponseFrames is the most queued \"transport response\"\n// frames we will buffer before preventing new reads from occurring on the\n// transport.  These are control frames sent in response to client requests,\n// such as RST_STREAM due to bad headers or settings acks.\nconst maxQueuedTransportResponseFrames = 50\n\ntype cbItem interface {\n\tisTransportResponseFrame() bool\n}\n\n// registerStream is used to register an incoming stream with loopy writer.\ntype registerStream struct {\n\tstreamID uint32\n\twq       *writeQuota\n}\n\nfunc (*registerStream) isTransportResponseFrame() bool { return false }\n\n// headerFrame is also used to register stream on the client-side.\ntype headerFrame struct {\n\tstreamID   uint32\n\thf         []hpack.HeaderField\n\tendStream  bool               // Valid on server side.\n\tinitStream func(uint32) error // Used only on the client side.\n\tonWrite    func()\n\twq         *writeQuota    // write quota for the stream created.\n\tcleanup    *cleanupStream // Valid on the server side.\n\tonOrphaned func(error)    // Valid on client-side\n}\n\nfunc (h *headerFrame) isTransportResponseFrame() bool {\n\treturn h.cleanup != nil && h.cleanup.rst // Results in a RST_STREAM\n}\n\ntype cleanupStream struct {\n\tstreamID uint32\n\trst      bool\n\trstCode  http2.ErrCode\n\tonWrite  func()\n}\n\nfunc (c *cleanupStream) isTransportResponseFrame() bool { return c.rst } // Results in a RST_STREAM\n\ntype earlyAbortStream struct {\n\thttpStatus     uint32\n\tstreamID       uint32\n\tcontentSubtype string\n\tstatus         *status.Status\n\trst            bool\n}\n\nfunc (*earlyAbortStream) isTransportResponseFrame() bool { return false }\n\ntype dataFrame struct {\n\tstreamID   uint32\n\tendStream  bool\n\th          []byte\n\tdata       mem.BufferSlice\n\tprocessing bool\n\t// onEachWrite is called every time\n\t// a part of data is written out.\n\tonEachWrite func()\n}\n\nfunc (*dataFrame) isTransportResponseFrame() bool { return false }\n\ntype incomingWindowUpdate struct {\n\tstreamID  uint32\n\tincrement uint32\n}\n\nfunc (*incomingWindowUpdate) isTransportResponseFrame() bool { return false }\n\ntype outgoingWindowUpdate struct {\n\tstreamID  uint32\n\tincrement uint32\n}\n\nfunc (*outgoingWindowUpdate) isTransportResponseFrame() bool {\n\treturn false // window updates are throttled by thresholds\n}\n\ntype incomingSettings struct {\n\tss []http2.Setting\n}\n\nfunc (*incomingSettings) isTransportResponseFrame() bool { return true } // Results in a settings ACK\n\ntype outgoingSettings struct {\n\tss []http2.Setting\n}\n\nfunc (*outgoingSettings) isTransportResponseFrame() bool { return false }\n\ntype incomingGoAway struct {\n}\n\nfunc (*incomingGoAway) isTransportResponseFrame() bool { return false }\n\ntype goAway struct {\n\tcode      http2.ErrCode\n\tdebugData []byte\n\theadsUp   bool\n\tcloseConn error // if set, loopyWriter will exit with this error\n}\n\nfunc (*goAway) isTransportResponseFrame() bool { return false }\n\ntype ping struct {\n\tack  bool\n\tdata [8]byte\n}\n\nfunc (*ping) isTransportResponseFrame() bool { return true }\n\ntype outFlowControlSizeRequest struct {\n\tresp chan uint32\n}\n\nfunc (*outFlowControlSizeRequest) isTransportResponseFrame() bool { return false }\n\n// closeConnection is an instruction to tell the loopy writer to flush the\n// framer and exit, which will cause the transport's connection to be closed\n// (by the client or server).  The transport itself will close after the reader\n// encounters the EOF caused by the connection closure.\ntype closeConnection struct{}\n\nfunc (closeConnection) isTransportResponseFrame() bool { return false }\n\ntype outStreamState int\n\nconst (\n\tactive outStreamState = iota\n\tempty\n\twaitingOnStreamQuota\n)\n\ntype outStream struct {\n\tid               uint32\n\tstate            outStreamState\n\titl              *itemList\n\tbytesOutStanding int\n\twq               *writeQuota\n\treader           mem.Reader\n\n\tnext *outStream\n\tprev *outStream\n}\n\nfunc (s *outStream) deleteSelf() {\n\tif s.prev != nil {\n\t\ts.prev.next = s.next\n\t}\n\tif s.next != nil {\n\t\ts.next.prev = s.prev\n\t}\n\ts.next, s.prev = nil, nil\n}\n\ntype outStreamList struct {\n\t// Following are sentinel objects that mark the\n\t// beginning and end of the list. They do not\n\t// contain any item lists. All valid objects are\n\t// inserted in between them.\n\t// This is needed so that an outStream object can\n\t// deleteSelf() in O(1) time without knowing which\n\t// list it belongs to.\n\thead *outStream\n\ttail *outStream\n}\n\nfunc newOutStreamList() *outStreamList {\n\thead, tail := new(outStream), new(outStream)\n\thead.next = tail\n\ttail.prev = head\n\treturn &outStreamList{\n\t\thead: head,\n\t\ttail: tail,\n\t}\n}\n\nfunc (l *outStreamList) enqueue(s *outStream) {\n\te := l.tail.prev\n\te.next = s\n\ts.prev = e\n\ts.next = l.tail\n\tl.tail.prev = s\n}\n\n// remove from the beginning of the list.\nfunc (l *outStreamList) dequeue() *outStream {\n\tb := l.head.next\n\tif b == l.tail {\n\t\treturn nil\n\t}\n\tb.deleteSelf()\n\treturn b\n}\n\n// controlBuffer is a way to pass information to loopy.\n//\n// Information is passed as specific struct types called control frames. A\n// control frame not only represents data, messages or headers to be sent out\n// but can also be used to instruct loopy to update its internal state. It\n// shouldn't be confused with an HTTP2 frame, although some of the control\n// frames like dataFrame and headerFrame do go out on wire as HTTP2 frames.\ntype controlBuffer struct {\n\twakeupCh chan struct{}   // Unblocks readers waiting for something to read.\n\tdone     <-chan struct{} // Closed when the transport is done.\n\n\t// Mutex guards all the fields below, except trfChan which can be read\n\t// atomically without holding mu.\n\tmu              sync.Mutex\n\tconsumerWaiting bool      // True when readers are blocked waiting for new data.\n\tclosed          bool      // True when the controlbuf is finished.\n\tlist            *itemList // List of queued control frames.\n\n\t// transportResponseFrames counts the number of queued items that represent\n\t// the response of an action initiated by the peer.  trfChan is created\n\t// when transportResponseFrames >= maxQueuedTransportResponseFrames and is\n\t// closed and nilled when transportResponseFrames drops below the\n\t// threshold.  Both fields are protected by mu.\n\ttransportResponseFrames int\n\ttrfChan                 atomic.Pointer[chan struct{}]\n}\n\nfunc newControlBuffer(done <-chan struct{}) *controlBuffer {\n\treturn &controlBuffer{\n\t\twakeupCh: make(chan struct{}, 1),\n\t\tlist:     &itemList{},\n\t\tdone:     done,\n\t}\n}\n\n// throttle blocks if there are too many frames in the control buf that\n// represent the response of an action initiated by the peer, like\n// incomingSettings cleanupStreams etc.\nfunc (c *controlBuffer) throttle() {\n\tif ch := c.trfChan.Load(); ch != nil {\n\t\tselect {\n\t\tcase <-(*ch):\n\t\tcase <-c.done:\n\t\t}\n\t}\n}\n\n// put adds an item to the controlbuf.\nfunc (c *controlBuffer) put(it cbItem) error {\n\t_, err := c.executeAndPut(nil, it)\n\treturn err\n}\n\n// executeAndPut runs f, and if the return value is true, adds the given item to\n// the controlbuf. The item could be nil, in which case, this method simply\n// executes f and does not add the item to the controlbuf.\n//\n// The first return value indicates whether the item was successfully added to\n// the control buffer. A non-nil error, specifically ErrConnClosing, is returned\n// if the control buffer is already closed.\nfunc (c *controlBuffer) executeAndPut(f func() bool, it cbItem) (bool, error) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\n\tif c.closed {\n\t\treturn false, ErrConnClosing\n\t}\n\tif f != nil {\n\t\tif !f() { // f wasn't successful\n\t\t\treturn false, nil\n\t\t}\n\t}\n\tif it == nil {\n\t\treturn true, nil\n\t}\n\n\tvar wakeUp bool\n\tif c.consumerWaiting {\n\t\twakeUp = true\n\t\tc.consumerWaiting = false\n\t}\n\tc.list.enqueue(it)\n\tif it.isTransportResponseFrame() {\n\t\tc.transportResponseFrames++\n\t\tif c.transportResponseFrames == maxQueuedTransportResponseFrames {\n\t\t\t// We are adding the frame that puts us over the threshold; create\n\t\t\t// a throttling channel.\n\t\t\tch := make(chan struct{})\n\t\t\tc.trfChan.Store(&ch)\n\t\t}\n\t}\n\tif wakeUp {\n\t\tselect {\n\t\tcase c.wakeupCh <- struct{}{}:\n\t\tdefault:\n\t\t}\n\t}\n\treturn true, nil\n}\n\n// get returns the next control frame from the control buffer. If block is true\n// **and** there are no control frames in the control buffer, the call blocks\n// until one of the conditions is met: there is a frame to return or the\n// transport is closed.\nfunc (c *controlBuffer) get(block bool) (any, error) {\n\tfor {\n\t\tc.mu.Lock()\n\t\tframe, err := c.getOnceLocked()\n\t\tif frame != nil || err != nil || !block {\n\t\t\t// If we read a frame or an error, we can return to the caller. The\n\t\t\t// call to getOnceLocked() returns a nil frame and a nil error if\n\t\t\t// there is nothing to read, and in that case, if the caller asked\n\t\t\t// us not to block, we can return now as well.\n\t\t\tc.mu.Unlock()\n\t\t\treturn frame, err\n\t\t}\n\t\tc.consumerWaiting = true\n\t\tc.mu.Unlock()\n\n\t\t// Release the lock above and wait to be woken up.\n\t\tselect {\n\t\tcase <-c.wakeupCh:\n\t\tcase <-c.done:\n\t\t\treturn nil, errors.New(\"transport closed by client\")\n\t\t}\n\t}\n}\n\n// Callers must not use this method, but should instead use get().\n//\n// Caller must hold c.mu.\nfunc (c *controlBuffer) getOnceLocked() (any, error) {\n\tif c.closed {\n\t\treturn false, ErrConnClosing\n\t}\n\tif c.list.isEmpty() {\n\t\treturn nil, nil\n\t}\n\th := c.list.dequeue().(cbItem)\n\tif h.isTransportResponseFrame() {\n\t\tif c.transportResponseFrames == maxQueuedTransportResponseFrames {\n\t\t\t// We are removing the frame that put us over the\n\t\t\t// threshold; close and clear the throttling channel.\n\t\t\tch := c.trfChan.Swap(nil)\n\t\t\tclose(*ch)\n\t\t}\n\t\tc.transportResponseFrames--\n\t}\n\treturn h, nil\n}\n\n// finish closes the control buffer, cleaning up any streams that have queued\n// header frames. Once this method returns, no more frames can be added to the\n// control buffer, and attempts to do so will return ErrConnClosing.\nfunc (c *controlBuffer) finish() {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\n\tif c.closed {\n\t\treturn\n\t}\n\tc.closed = true\n\t// There may be headers for streams in the control buffer.\n\t// These streams need to be cleaned out since the transport\n\t// is still not aware of these yet.\n\tfor head := c.list.dequeueAll(); head != nil; head = head.next {\n\t\tswitch v := head.it.(type) {\n\t\tcase *headerFrame:\n\t\t\tif v.onOrphaned != nil { // It will be nil on the server-side.\n\t\t\t\tv.onOrphaned(ErrConnClosing)\n\t\t\t}\n\t\tcase *dataFrame:\n\t\t\tif !v.processing {\n\t\t\t\tv.data.Free()\n\t\t\t}\n\t\t}\n\t}\n\n\t// In case throttle() is currently in flight, it needs to be unblocked.\n\t// Otherwise, the transport may not close, since the transport is closed by\n\t// the reader encountering the connection error.\n\tch := c.trfChan.Swap(nil)\n\tif ch != nil {\n\t\tclose(*ch)\n\t}\n}\n\ntype side int\n\nconst (\n\tclientSide side = iota\n\tserverSide\n)\n\n// maxWriteBufSize is the maximum length (number of elements) the cached\n// writeBuf can grow to. The length depends on the number of buffers\n// contained within the BufferSlice produced by the codec, which is\n// generally small.\n//\n// If a writeBuf larger than this limit is required, it will be allocated\n// and freed after use, rather than being cached. This avoids holding\n// on to large amounts of memory.\nconst maxWriteBufSize = 64\n\n// Loopy receives frames from the control buffer.\n// Each frame is handled individually; most of the work done by loopy goes\n// into handling data frames. Loopy maintains a queue of active streams, and each\n// stream maintains a queue of data frames; as loopy receives data frames\n// it gets added to the queue of the relevant stream.\n// Loopy goes over this list of active streams by processing one node every iteration,\n// thereby closely resembling a round-robin scheduling over all streams. While\n// processing a stream, loopy writes out data bytes from this stream capped by the min\n// of http2MaxFrameLen, connection-level flow control and stream-level flow control.\ntype loopyWriter struct {\n\tside      side\n\tcbuf      *controlBuffer\n\tsendQuota uint32\n\toiws      uint32 // outbound initial window size.\n\t// estdStreams is map of all established streams that are not cleaned-up yet.\n\t// On client-side, this is all streams whose headers were sent out.\n\t// On server-side, this is all streams whose headers were received.\n\testdStreams map[uint32]*outStream // Established streams.\n\t// activeStreams is a linked-list of all streams that have data to send and some\n\t// stream-level flow control quota.\n\t// Each of these streams internally have a list of data items(and perhaps trailers\n\t// on the server-side) to be sent out.\n\tactiveStreams *outStreamList\n\tframer        *framer\n\thBuf          *bytes.Buffer  // The buffer for HPACK encoding.\n\thEnc          *hpack.Encoder // HPACK encoder.\n\tbdpEst        *bdpEstimator\n\tdraining      bool\n\tconn          net.Conn\n\tlogger        *grpclog.PrefixLogger\n\tbufferPool    mem.BufferPool\n\n\t// Side-specific handlers\n\tssGoAwayHandler func(*goAway) (bool, error)\n\n\twriteBuf [][]byte // cached slice to avoid heap allocations for calls to mem.Reader.Peek.\n}\n\nfunc newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger, goAwayHandler func(*goAway) (bool, error), bufferPool mem.BufferPool) *loopyWriter {\n\tvar buf bytes.Buffer\n\tl := &loopyWriter{\n\t\tside:            s,\n\t\tcbuf:            cbuf,\n\t\tsendQuota:       defaultWindowSize,\n\t\toiws:            defaultWindowSize,\n\t\testdStreams:     make(map[uint32]*outStream),\n\t\tactiveStreams:   newOutStreamList(),\n\t\tframer:          fr,\n\t\thBuf:            &buf,\n\t\thEnc:            hpack.NewEncoder(&buf),\n\t\tbdpEst:          bdpEst,\n\t\tconn:            conn,\n\t\tlogger:          logger,\n\t\tssGoAwayHandler: goAwayHandler,\n\t\tbufferPool:      bufferPool,\n\t}\n\treturn l\n}\n\nconst minBatchSize = 1000\n\n// run should be run in a separate goroutine.\n// It reads control frames from controlBuf and processes them by:\n// 1. Updating loopy's internal state, or/and\n// 2. Writing out HTTP2 frames on the wire.\n//\n// Loopy keeps all active streams with data to send in a linked-list.\n// All streams in the activeStreams linked-list must have both:\n// 1. Data to send, and\n// 2. Stream level flow control quota available.\n//\n// In each iteration of run loop, other than processing the incoming control\n// frame, loopy calls processData, which processes one node from the\n// activeStreams linked-list.  This results in writing of HTTP2 frames into an\n// underlying write buffer.  When there's no more control frames to read from\n// controlBuf, loopy flushes the write buffer.  As an optimization, to increase\n// the batch size for each flush, loopy yields the processor, once if the batch\n// size is too low to give stream goroutines a chance to fill it up.\n//\n// Upon exiting, if the error causing the exit is not an I/O error, run()\n// flushes the underlying connection.  The connection is always left open to\n// allow different closing behavior on the client and server.\nfunc (l *loopyWriter) run() (err error) {\n\tdefer func() {\n\t\tif l.logger.V(logLevel) {\n\t\t\tl.logger.Infof(\"loopyWriter exiting with error: %v\", err)\n\t\t}\n\t\tif !isIOError(err) {\n\t\t\tl.framer.writer.Flush()\n\t\t}\n\t\tl.cbuf.finish()\n\t}()\n\tfor {\n\t\tit, err := l.cbuf.get(true)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err = l.handle(it); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err = l.processData(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgosched := true\n\thasdata:\n\t\tfor {\n\t\t\tit, err := l.cbuf.get(false)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif it != nil {\n\t\t\t\tif err = l.handle(it); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif _, err = l.processData(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tcontinue hasdata\n\t\t\t}\n\t\t\tisEmpty, err := l.processData()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif !isEmpty {\n\t\t\t\tcontinue hasdata\n\t\t\t}\n\t\t\tif gosched {\n\t\t\t\tgosched = false\n\t\t\t\tif l.framer.writer.offset < minBatchSize {\n\t\t\t\t\truntime.Gosched()\n\t\t\t\t\tcontinue hasdata\n\t\t\t\t}\n\t\t\t}\n\t\t\tl.framer.writer.Flush()\n\t\t\tbreak hasdata\n\t\t}\n\t}\n}\n\nfunc (l *loopyWriter) outgoingWindowUpdateHandler(w *outgoingWindowUpdate) error {\n\treturn l.framer.fr.WriteWindowUpdate(w.streamID, w.increment)\n}\n\nfunc (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) {\n\t// Otherwise update the quota.\n\tif w.streamID == 0 {\n\t\tl.sendQuota += w.increment\n\t\treturn\n\t}\n\t// Find the stream and update it.\n\tif str, ok := l.estdStreams[w.streamID]; ok {\n\t\tstr.bytesOutStanding -= int(w.increment)\n\t\tif strQuota := int(l.oiws) - str.bytesOutStanding; strQuota > 0 && str.state == waitingOnStreamQuota {\n\t\t\tstr.state = active\n\t\t\tl.activeStreams.enqueue(str)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (l *loopyWriter) outgoingSettingsHandler(s *outgoingSettings) error {\n\treturn l.framer.fr.WriteSettings(s.ss...)\n}\n\nfunc (l *loopyWriter) incomingSettingsHandler(s *incomingSettings) error {\n\tl.applySettings(s.ss)\n\treturn l.framer.fr.WriteSettingsAck()\n}\n\nfunc (l *loopyWriter) registerStreamHandler(h *registerStream) {\n\tstr := &outStream{\n\t\tid:    h.streamID,\n\t\tstate: empty,\n\t\titl:   &itemList{},\n\t\twq:    h.wq,\n\t}\n\tl.estdStreams[h.streamID] = str\n}\n\nfunc (l *loopyWriter) headerHandler(h *headerFrame) error {\n\tif l.side == serverSide {\n\t\tstr, ok := l.estdStreams[h.streamID]\n\t\tif !ok {\n\t\t\tif l.logger.V(logLevel) {\n\t\t\t\tl.logger.Infof(\"Unrecognized streamID %d in loopyWriter\", h.streamID)\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\t// Case 1.A: Server is responding back with headers.\n\t\tif !h.endStream {\n\t\t\treturn l.writeHeader(h.streamID, h.endStream, h.hf, h.onWrite)\n\t\t}\n\t\t// else:  Case 1.B: Server wants to close stream.\n\n\t\tif str.state != empty { // either active or waiting on stream quota.\n\t\t\t// add it str's list of items.\n\t\t\tstr.itl.enqueue(h)\n\t\t\treturn nil\n\t\t}\n\t\tif err := l.writeHeader(h.streamID, h.endStream, h.hf, h.onWrite); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn l.cleanupStreamHandler(h.cleanup)\n\t}\n\t// Case 2: Client wants to originate stream.\n\tstr := &outStream{\n\t\tid:    h.streamID,\n\t\tstate: empty,\n\t\titl:   &itemList{},\n\t\twq:    h.wq,\n\t}\n\treturn l.originateStream(str, h)\n}\n\nfunc (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error {\n\t// l.draining is set when handling GoAway. In which case, we want to avoid\n\t// creating new streams.\n\tif l.draining {\n\t\t// TODO: provide a better error with the reason we are in draining.\n\t\thdr.onOrphaned(errStreamDrain)\n\t\treturn nil\n\t}\n\tif err := hdr.initStream(str.id); err != nil {\n\t\treturn err\n\t}\n\tif err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil {\n\t\treturn err\n\t}\n\tl.estdStreams[str.id] = str\n\treturn nil\n}\n\nfunc (l *loopyWriter) writeHeader(streamID uint32, endStream bool, hf []hpack.HeaderField, onWrite func()) error {\n\tif onWrite != nil {\n\t\tonWrite()\n\t}\n\tl.hBuf.Reset()\n\tfor _, f := range hf {\n\t\tif err := l.hEnc.WriteField(f); err != nil {\n\t\t\tif l.logger.V(logLevel) {\n\t\t\t\tl.logger.Warningf(\"Encountered error while encoding headers: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\tvar (\n\t\terr               error\n\t\tendHeaders, first bool\n\t)\n\tfirst = true\n\tfor !endHeaders {\n\t\tsize := l.hBuf.Len()\n\t\tif size > http2MaxFrameLen {\n\t\t\tsize = http2MaxFrameLen\n\t\t} else {\n\t\t\tendHeaders = true\n\t\t}\n\t\tif first {\n\t\t\tfirst = false\n\t\t\terr = l.framer.fr.WriteHeaders(http2.HeadersFrameParam{\n\t\t\t\tStreamID:      streamID,\n\t\t\t\tBlockFragment: l.hBuf.Next(size),\n\t\t\t\tEndStream:     endStream,\n\t\t\t\tEndHeaders:    endHeaders,\n\t\t\t})\n\t\t} else {\n\t\t\terr = l.framer.fr.WriteContinuation(\n\t\t\t\tstreamID,\n\t\t\t\tendHeaders,\n\t\t\t\tl.hBuf.Next(size),\n\t\t\t)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) preprocessData(df *dataFrame) {\n\tstr, ok := l.estdStreams[df.streamID]\n\tif !ok {\n\t\treturn\n\t}\n\t// If we got data for a stream it means that\n\t// stream was originated and the headers were sent out.\n\tstr.itl.enqueue(df)\n\tif str.state == empty {\n\t\tstr.state = active\n\t\tl.activeStreams.enqueue(str)\n\t}\n}\n\nfunc (l *loopyWriter) pingHandler(p *ping) error {\n\tif !p.ack {\n\t\tl.bdpEst.timesnap(p.data)\n\t}\n\treturn l.framer.fr.WritePing(p.ack, p.data)\n\n}\n\nfunc (l *loopyWriter) outFlowControlSizeRequestHandler(o *outFlowControlSizeRequest) {\n\to.resp <- l.sendQuota\n}\n\nfunc (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error {\n\tc.onWrite()\n\tif str, ok := l.estdStreams[c.streamID]; ok {\n\t\t// On the server side it could be a trailers-only response or\n\t\t// a RST_STREAM before stream initialization thus the stream might\n\t\t// not be established yet.\n\t\tdelete(l.estdStreams, c.streamID)\n\t\tstr.reader.Close()\n\t\tstr.deleteSelf()\n\t\tfor head := str.itl.dequeueAll(); head != nil; head = head.next {\n\t\t\tif df, ok := head.it.(*dataFrame); ok {\n\t\t\t\tif !df.processing {\n\t\t\t\t\tdf.data.Free()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif c.rst { // If RST_STREAM needs to be sent.\n\t\tif err := l.framer.fr.WriteRSTStream(c.streamID, c.rstCode); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif l.draining && len(l.estdStreams) == 0 {\n\t\t// Flush and close the connection; we are done with it.\n\t\treturn errors.New(\"finished processing active streams while in draining mode\")\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) earlyAbortStreamHandler(eas *earlyAbortStream) error {\n\tif l.side == clientSide {\n\t\treturn errors.New(\"earlyAbortStream not handled on client\")\n\t}\n\t// In case the caller forgets to set the http status, default to 200.\n\tif eas.httpStatus == 0 {\n\t\teas.httpStatus = 200\n\t}\n\theaderFields := []hpack.HeaderField{\n\t\t{Name: \":status\", Value: strconv.Itoa(int(eas.httpStatus))},\n\t\t{Name: \"content-type\", Value: grpcutil.ContentType(eas.contentSubtype)},\n\t\t{Name: \"grpc-status\", Value: strconv.Itoa(int(eas.status.Code()))},\n\t\t{Name: \"grpc-message\", Value: encodeGrpcMessage(eas.status.Message())},\n\t}\n\n\tif err := l.writeHeader(eas.streamID, true, headerFields, nil); err != nil {\n\t\treturn err\n\t}\n\tif eas.rst {\n\t\tif err := l.framer.fr.WriteRSTStream(eas.streamID, http2.ErrCodeNo); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) incomingGoAwayHandler(*incomingGoAway) error {\n\tif l.side == clientSide {\n\t\tl.draining = true\n\t\tif len(l.estdStreams) == 0 {\n\t\t\t// Flush and close the connection; we are done with it.\n\t\t\treturn errors.New(\"received GOAWAY with no active streams\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) goAwayHandler(g *goAway) error {\n\t// Handling of outgoing GoAway is very specific to side.\n\tif l.ssGoAwayHandler != nil {\n\t\tdraining, err := l.ssGoAwayHandler(g)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tl.draining = draining\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) handle(i any) error {\n\tswitch i := i.(type) {\n\tcase *incomingWindowUpdate:\n\t\tl.incomingWindowUpdateHandler(i)\n\tcase *outgoingWindowUpdate:\n\t\treturn l.outgoingWindowUpdateHandler(i)\n\tcase *incomingSettings:\n\t\treturn l.incomingSettingsHandler(i)\n\tcase *outgoingSettings:\n\t\treturn l.outgoingSettingsHandler(i)\n\tcase *headerFrame:\n\t\treturn l.headerHandler(i)\n\tcase *registerStream:\n\t\tl.registerStreamHandler(i)\n\tcase *cleanupStream:\n\t\treturn l.cleanupStreamHandler(i)\n\tcase *earlyAbortStream:\n\t\treturn l.earlyAbortStreamHandler(i)\n\tcase *incomingGoAway:\n\t\treturn l.incomingGoAwayHandler(i)\n\tcase *dataFrame:\n\t\tl.preprocessData(i)\n\tcase *ping:\n\t\treturn l.pingHandler(i)\n\tcase *goAway:\n\t\treturn l.goAwayHandler(i)\n\tcase *outFlowControlSizeRequest:\n\t\tl.outFlowControlSizeRequestHandler(i)\n\tcase closeConnection:\n\t\t// Just return a non-I/O error and run() will flush and close the\n\t\t// connection.\n\t\treturn ErrConnClosing\n\tdefault:\n\t\treturn fmt.Errorf(\"transport: unknown control message type %T\", i)\n\t}\n\treturn nil\n}\n\nfunc (l *loopyWriter) applySettings(ss []http2.Setting) {\n\tfor _, s := range ss {\n\t\tswitch s.ID {\n\t\tcase http2.SettingInitialWindowSize:\n\t\t\to := l.oiws\n\t\t\tl.oiws = s.Val\n\t\t\tif o < l.oiws {\n\t\t\t\t// If the new limit is greater make all depleted streams active.\n\t\t\t\tfor _, stream := range l.estdStreams {\n\t\t\t\t\tif stream.state == waitingOnStreamQuota {\n\t\t\t\t\t\tstream.state = active\n\t\t\t\t\t\tl.activeStreams.enqueue(stream)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcase http2.SettingHeaderTableSize:\n\t\t\tupdateHeaderTblSize(l.hEnc, s.Val)\n\t\t}\n\t}\n}\n\n// processData removes the first stream from active streams, writes out at most 16KB\n// of its data and then puts it at the end of activeStreams if there's still more data\n// to be sent and stream has some stream-level flow control.\nfunc (l *loopyWriter) processData() (bool, error) {\n\tif l.sendQuota == 0 {\n\t\treturn true, nil\n\t}\n\tstr := l.activeStreams.dequeue() // Remove the first stream.\n\tif str == nil {\n\t\treturn true, nil\n\t}\n\treader := &str.reader\n\tdataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream.\n\tif !dataItem.processing {\n\t\tdataItem.processing = true\n\t\treader.Reset(dataItem.data)\n\t\tdataItem.data.Free()\n\t}\n\t// A data item is represented by a dataFrame, since it later translates into\n\t// multiple HTTP2 data frames.\n\t// Every dataFrame has two buffers; h that keeps grpc-message header and data\n\t// that is the actual message. As an optimization to keep wire traffic low, data\n\t// from data is copied to h to make as big as the maximum possible HTTP2 frame\n\t// size.\n\n\tif len(dataItem.h) == 0 && reader.Remaining() == 0 { // Empty data frame\n\t\t// Client sends out empty data frame with endStream = true\n\t\tif err := l.framer.writeData(dataItem.streamID, dataItem.endStream, nil); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tstr.itl.dequeue() // remove the empty data item from stream\n\t\treader.Close()\n\t\tif str.itl.isEmpty() {\n\t\t\tstr.state = empty\n\t\t} else if trailer, ok := str.itl.peek().(*headerFrame); ok { // the next item is trailers.\n\t\t\tif err := l.writeHeader(trailer.streamID, trailer.endStream, trailer.hf, trailer.onWrite); err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\tif err := l.cleanupStreamHandler(trailer.cleanup); err != nil {\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t} else {\n\t\t\tl.activeStreams.enqueue(str)\n\t\t}\n\t\treturn false, nil\n\t}\n\n\t// Figure out the maximum size we can send\n\tmaxSize := http2MaxFrameLen\n\tif strQuota := int(l.oiws) - str.bytesOutStanding; strQuota <= 0 { // stream-level flow control.\n\t\tstr.state = waitingOnStreamQuota\n\t\treturn false, nil\n\t} else if maxSize > strQuota {\n\t\tmaxSize = strQuota\n\t}\n\tif maxSize > int(l.sendQuota) { // connection-level flow control.\n\t\tmaxSize = int(l.sendQuota)\n\t}\n\t// Compute how much of the header and data we can send within quota and max frame length\n\thSize := min(maxSize, len(dataItem.h))\n\tdSize := min(maxSize-hSize, reader.Remaining())\n\tremainingBytes := len(dataItem.h) + reader.Remaining() - hSize - dSize\n\tsize := hSize + dSize\n\n\tl.writeBuf = l.writeBuf[:0]\n\tif hSize > 0 {\n\t\tl.writeBuf = append(l.writeBuf, dataItem.h[:hSize])\n\t}\n\tif dSize > 0 {\n\t\tvar err error\n\t\tl.writeBuf, err = reader.Peek(dSize, l.writeBuf)\n\t\tif err != nil {\n\t\t\t// This must never happen since the reader must have at least dSize\n\t\t\t// bytes.\n\t\t\t// Log an error to fail tests.\n\t\t\tl.logger.Errorf(\"unexpected error while reading Data frame payload: %v\", err)\n\t\t\treturn false, err\n\t\t}\n\t}\n\n\t// Now that outgoing flow controls are checked we can replenish str's write quota\n\tstr.wq.replenish(size)\n\tvar endStream bool\n\t// If this is the last data message on this stream and all of it can be written in this iteration.\n\tif dataItem.endStream && remainingBytes == 0 {\n\t\tendStream = true\n\t}\n\tif dataItem.onEachWrite != nil {\n\t\tdataItem.onEachWrite()\n\t}\n\terr := l.framer.writeData(dataItem.streamID, endStream, l.writeBuf)\n\treader.Discard(dSize)\n\tif cap(l.writeBuf) > maxWriteBufSize {\n\t\tl.writeBuf = nil\n\t} else {\n\t\tclear(l.writeBuf)\n\t}\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tstr.bytesOutStanding += size\n\tl.sendQuota -= uint32(size)\n\tdataItem.h = dataItem.h[hSize:]\n\n\tif remainingBytes == 0 { // All the data from that message was written out.\n\t\treader.Close()\n\t\tstr.itl.dequeue()\n\t}\n\tif str.itl.isEmpty() {\n\t\tstr.state = empty\n\t} else if trailer, ok := str.itl.peek().(*headerFrame); ok { // The next item is trailers.\n\t\tif err := l.writeHeader(trailer.streamID, trailer.endStream, trailer.hf, trailer.onWrite); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tif err := l.cleanupStreamHandler(trailer.cleanup); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t} else if int(l.oiws)-str.bytesOutStanding <= 0 { // Ran out of stream quota.\n\t\tstr.state = waitingOnStreamQuota\n\t} else { // Otherwise add it back to the list of active streams.\n\t\tl.activeStreams.enqueue(str)\n\t}\n\treturn false, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/defaults.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"math\"\n\t\"time\"\n)\n\nconst (\n\t// The default value of flow control window size in HTTP2 spec.\n\tdefaultWindowSize = 65535\n\t// The initial window size for flow control.\n\tinitialWindowSize             = defaultWindowSize // for an RPC\n\tinfinity                      = time.Duration(math.MaxInt64)\n\tdefaultClientKeepaliveTime    = infinity\n\tdefaultClientKeepaliveTimeout = 20 * time.Second\n\tdefaultMaxStreamsClient       = 100\n\tdefaultMaxConnectionIdle      = infinity\n\tdefaultMaxConnectionAge       = infinity\n\tdefaultMaxConnectionAgeGrace  = infinity\n\tdefaultServerKeepaliveTime    = 2 * time.Hour\n\tdefaultServerKeepaliveTimeout = 20 * time.Second\n\tdefaultKeepalivePolicyMinTime = 5 * time.Minute\n\t// max window limit set by HTTP2 Specs.\n\tmaxWindowSize = math.MaxInt32\n\t// defaultWriteQuota is the default value for number of data\n\t// bytes that each stream can schedule before some of it being\n\t// flushed out.\n\tdefaultWriteQuota              = 64 * 1024\n\tdefaultClientMaxHeaderListSize = uint32(16 << 20)\n\tdefaultServerMaxHeaderListSize = uint32(16 << 20)\n)\n\n// MaxStreamID is the upper bound for the stream ID before the current\n// transport gracefully closes and new transport is created for subsequent RPCs.\n// This is set to 75% of 2^31-1. Streams are identified with an unsigned 31-bit\n// integer. It's exported so that tests can override it.\nvar MaxStreamID = uint32(math.MaxInt32 * 3 / 4)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/flowcontrol.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sync\"\n\t\"sync/atomic\"\n)\n\n// writeQuota is a soft limit on the amount of data a stream can\n// schedule before some of it is written out.\ntype writeQuota struct {\n\t_ noCopy\n\t// get waits on read from when quota goes less than or equal to zero.\n\t// replenish writes on it when quota goes positive again.\n\tch chan struct{}\n\t// done is triggered in error case.\n\tdone <-chan struct{}\n\t// replenish is called by loopyWriter to give quota back to.\n\t// It is implemented as a field so that it can be updated\n\t// by tests.\n\treplenish func(n int)\n\tquota     int32\n}\n\n// init allows a writeQuota to be initialized in-place, which is useful for\n// resetting a buffer or for avoiding a heap allocation when the buffer is\n// embedded in another struct.\nfunc (w *writeQuota) init(sz int32, done <-chan struct{}) {\n\tw.quota = sz\n\tw.ch = make(chan struct{}, 1)\n\tw.done = done\n\tw.replenish = w.realReplenish\n}\n\nfunc (w *writeQuota) get(sz int32) error {\n\tfor {\n\t\tif atomic.LoadInt32(&w.quota) > 0 {\n\t\t\tatomic.AddInt32(&w.quota, -sz)\n\t\t\treturn nil\n\t\t}\n\t\tselect {\n\t\tcase <-w.ch:\n\t\t\tcontinue\n\t\tcase <-w.done:\n\t\t\treturn errStreamDone\n\t\t}\n\t}\n}\n\nfunc (w *writeQuota) realReplenish(n int) {\n\tsz := int32(n)\n\tnewQuota := atomic.AddInt32(&w.quota, sz)\n\tpreviousQuota := newQuota - sz\n\tif previousQuota <= 0 && newQuota > 0 {\n\t\tselect {\n\t\tcase w.ch <- struct{}{}:\n\t\tdefault:\n\t\t}\n\t}\n}\n\ntype trInFlow struct {\n\tlimit               uint32\n\tunacked             uint32\n\teffectiveWindowSize uint32\n}\n\nfunc (f *trInFlow) newLimit(n uint32) uint32 {\n\td := n - f.limit\n\tf.limit = n\n\tf.updateEffectiveWindowSize()\n\treturn d\n}\n\nfunc (f *trInFlow) onData(n uint32) uint32 {\n\tf.unacked += n\n\tif f.unacked < f.limit/4 {\n\t\tf.updateEffectiveWindowSize()\n\t\treturn 0\n\t}\n\treturn f.reset()\n}\n\nfunc (f *trInFlow) reset() uint32 {\n\tw := f.unacked\n\tf.unacked = 0\n\tf.updateEffectiveWindowSize()\n\treturn w\n}\n\nfunc (f *trInFlow) updateEffectiveWindowSize() {\n\tatomic.StoreUint32(&f.effectiveWindowSize, f.limit-f.unacked)\n}\n\nfunc (f *trInFlow) getSize() uint32 {\n\treturn atomic.LoadUint32(&f.effectiveWindowSize)\n}\n\n// TODO(mmukhi): Simplify this code.\n// inFlow deals with inbound flow control\ntype inFlow struct {\n\tmu sync.Mutex\n\t// The inbound flow control limit for pending data.\n\tlimit uint32\n\t// pendingData is the overall data which have been received but not been\n\t// consumed by applications.\n\tpendingData uint32\n\t// The amount of data the application has consumed but grpc has not sent\n\t// window update for them. Used to reduce window update frequency.\n\tpendingUpdate uint32\n\t// delta is the extra window update given by receiver when an application\n\t// is reading data bigger in size than the inFlow limit.\n\tdelta uint32\n}\n\n// newLimit updates the inflow window to a new value n.\n// It assumes that n is always greater than the old limit.\nfunc (f *inFlow) newLimit(n uint32) {\n\tf.mu.Lock()\n\tf.limit = n\n\tf.mu.Unlock()\n}\n\nfunc (f *inFlow) maybeAdjust(n uint32) uint32 {\n\tif n > uint32(math.MaxInt32) {\n\t\tn = uint32(math.MaxInt32)\n\t}\n\tf.mu.Lock()\n\tdefer f.mu.Unlock()\n\t// estSenderQuota is the receiver's view of the maximum number of bytes the sender\n\t// can send without a window update.\n\testSenderQuota := int32(f.limit - (f.pendingData + f.pendingUpdate))\n\t// estUntransmittedData is the maximum number of bytes the sends might not have put\n\t// on the wire yet. A value of 0 or less means that we have already received all or\n\t// more bytes than the application is requesting to read.\n\testUntransmittedData := int32(n - f.pendingData) // Casting into int32 since it could be negative.\n\t// This implies that unless we send a window update, the sender won't be able to send all the bytes\n\t// for this message. Therefore we must send an update over the limit since there's an active read\n\t// request from the application.\n\tif estUntransmittedData > estSenderQuota {\n\t\t// Sender's window shouldn't go more than 2^31 - 1 as specified in the HTTP spec.\n\t\tif f.limit+n > maxWindowSize {\n\t\t\tf.delta = maxWindowSize - f.limit\n\t\t} else {\n\t\t\t// Send a window update for the whole message and not just the difference between\n\t\t\t// estUntransmittedData and estSenderQuota. This will be helpful in case the message\n\t\t\t// is padded; We will fallback on the current available window(at least a 1/4th of the limit).\n\t\t\tf.delta = n\n\t\t}\n\t\treturn f.delta\n\t}\n\treturn 0\n}\n\n// onData is invoked when some data frame is received. It updates pendingData.\nfunc (f *inFlow) onData(n uint32) error {\n\tf.mu.Lock()\n\tf.pendingData += n\n\tif f.pendingData+f.pendingUpdate > f.limit+f.delta {\n\t\tlimit := f.limit\n\t\trcvd := f.pendingData + f.pendingUpdate\n\t\tf.mu.Unlock()\n\t\treturn fmt.Errorf(\"received %d-bytes data exceeding the limit %d bytes\", rcvd, limit)\n\t}\n\tf.mu.Unlock()\n\treturn nil\n}\n\n// onRead is invoked when the application reads the data. It returns the window size\n// to be sent to the peer.\nfunc (f *inFlow) onRead(n uint32) uint32 {\n\tf.mu.Lock()\n\tif f.pendingData == 0 {\n\t\tf.mu.Unlock()\n\t\treturn 0\n\t}\n\tf.pendingData -= n\n\tif n > f.delta {\n\t\tn -= f.delta\n\t\tf.delta = 0\n\t} else {\n\t\tf.delta -= n\n\t\tn = 0\n\t}\n\tf.pendingUpdate += n\n\tif f.pendingUpdate >= f.limit/4 {\n\t\twu := f.pendingUpdate\n\t\tf.pendingUpdate = 0\n\t\tf.mu.Unlock()\n\t\treturn wu\n\t}\n\tf.mu.Unlock()\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/handler_server.go",
    "content": "/*\n *\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 is the implementation of a gRPC server using HTTP/2 which\n// uses the standard Go http2 Server implementation (via the\n// http.Handler interface), rather than speaking low-level HTTP/2\n// frames itself. It is the implementation of *grpc.Server.ServeHTTP.\n\npackage transport\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"golang.org/x/net/http2\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/internal/grpclog\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// NewServerHandlerTransport returns a ServerTransport handling gRPC from\n// inside an http.Handler, or writes an HTTP error to w and returns an error.\n// It requires that the http Server supports HTTP/2.\nfunc NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats stats.Handler, bufferPool mem.BufferPool) (ServerTransport, error) {\n\tif r.Method != http.MethodPost {\n\t\tw.Header().Set(\"Allow\", http.MethodPost)\n\t\tmsg := fmt.Sprintf(\"invalid gRPC request method %q\", r.Method)\n\t\thttp.Error(w, msg, http.StatusMethodNotAllowed)\n\t\treturn nil, errors.New(msg)\n\t}\n\tcontentType := r.Header.Get(\"Content-Type\")\n\t// TODO: do we assume contentType is lowercase? we did before\n\tcontentSubtype, validContentType := grpcutil.ContentSubtype(contentType)\n\tif !validContentType {\n\t\tmsg := fmt.Sprintf(\"invalid gRPC request content-type %q\", contentType)\n\t\thttp.Error(w, msg, http.StatusUnsupportedMediaType)\n\t\treturn nil, errors.New(msg)\n\t}\n\tif r.ProtoMajor != 2 {\n\t\tmsg := \"gRPC requires HTTP/2\"\n\t\thttp.Error(w, msg, http.StatusHTTPVersionNotSupported)\n\t\treturn nil, errors.New(msg)\n\t}\n\tif _, ok := w.(http.Flusher); !ok {\n\t\tmsg := \"gRPC requires a ResponseWriter supporting http.Flusher\"\n\t\thttp.Error(w, msg, http.StatusInternalServerError)\n\t\treturn nil, errors.New(msg)\n\t}\n\n\tvar localAddr net.Addr\n\tif la := r.Context().Value(http.LocalAddrContextKey); la != nil {\n\t\tlocalAddr, _ = la.(net.Addr)\n\t}\n\tvar authInfo credentials.AuthInfo\n\tif r.TLS != nil {\n\t\tauthInfo = credentials.TLSInfo{State: *r.TLS, CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.PrivacyAndIntegrity}}\n\t}\n\tp := peer.Peer{\n\t\tAddr:      strAddr(r.RemoteAddr),\n\t\tLocalAddr: localAddr,\n\t\tAuthInfo:  authInfo,\n\t}\n\tst := &serverHandlerTransport{\n\t\trw:             w,\n\t\treq:            r,\n\t\tclosedCh:       make(chan struct{}),\n\t\twrites:         make(chan func()),\n\t\tpeer:           p,\n\t\tcontentType:    contentType,\n\t\tcontentSubtype: contentSubtype,\n\t\tstats:          stats,\n\t\tbufferPool:     bufferPool,\n\t}\n\tst.logger = prefixLoggerForServerHandlerTransport(st)\n\n\tif v := r.Header.Get(\"grpc-timeout\"); v != \"\" {\n\t\tto, err := decodeTimeout(v)\n\t\tif err != nil {\n\t\t\tmsg := fmt.Sprintf(\"malformed grpc-timeout: %v\", err)\n\t\t\thttp.Error(w, msg, http.StatusBadRequest)\n\t\t\treturn nil, status.Error(codes.Internal, msg)\n\t\t}\n\t\tst.timeoutSet = true\n\t\tst.timeout = to\n\t}\n\n\tmetakv := []string{\"content-type\", contentType}\n\tif r.Host != \"\" {\n\t\tmetakv = append(metakv, \":authority\", r.Host)\n\t}\n\tfor k, vv := range r.Header {\n\t\tk = strings.ToLower(k)\n\t\tif isReservedHeader(k) && !isWhitelistedHeader(k) {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\tv, err := decodeMetadataHeader(k, v)\n\t\t\tif err != nil {\n\t\t\t\tmsg := fmt.Sprintf(\"malformed binary metadata %q in header %q: %v\", v, k, err)\n\t\t\t\thttp.Error(w, msg, http.StatusBadRequest)\n\t\t\t\treturn nil, status.Error(codes.Internal, msg)\n\t\t\t}\n\t\t\tmetakv = append(metakv, k, v)\n\t\t}\n\t}\n\tst.headerMD = metadata.Pairs(metakv...)\n\n\treturn st, nil\n}\n\n// serverHandlerTransport is an implementation of ServerTransport\n// which replies to exactly one gRPC request (exactly one HTTP request),\n// using the net/http.Handler interface. This http.Handler is guaranteed\n// at this point to be speaking over HTTP/2, so it's able to speak valid\n// gRPC.\ntype serverHandlerTransport struct {\n\trw         http.ResponseWriter\n\treq        *http.Request\n\ttimeoutSet bool\n\ttimeout    time.Duration\n\n\theaderMD metadata.MD\n\n\tpeer peer.Peer\n\n\tcloseOnce sync.Once\n\tclosedCh  chan struct{} // closed on Close\n\n\t// writes is a channel of code to run serialized in the\n\t// ServeHTTP (HandleStreams) goroutine. The channel is closed\n\t// when WriteStatus is called.\n\twrites chan func()\n\n\t// block concurrent WriteStatus calls\n\t// e.g. grpc/(*serverStream).SendMsg/RecvMsg\n\twriteStatusMu sync.Mutex\n\n\t// we just mirror the request content-type\n\tcontentType string\n\t// we store both contentType and contentSubtype so we don't keep recreating them\n\t// TODO make sure this is consistent across handler_server and http2_server\n\tcontentSubtype string\n\n\tstats  stats.Handler\n\tlogger *grpclog.PrefixLogger\n\n\tbufferPool mem.BufferPool\n}\n\nfunc (ht *serverHandlerTransport) Close(err error) {\n\tht.closeOnce.Do(func() {\n\t\tif ht.logger.V(logLevel) {\n\t\t\tht.logger.Infof(\"Closing: %v\", err)\n\t\t}\n\t\tclose(ht.closedCh)\n\t})\n}\n\nfunc (ht *serverHandlerTransport) Peer() *peer.Peer {\n\treturn &peer.Peer{\n\t\tAddr:      ht.peer.Addr,\n\t\tLocalAddr: ht.peer.LocalAddr,\n\t\tAuthInfo:  ht.peer.AuthInfo,\n\t}\n}\n\n// strAddr is a net.Addr backed by either a TCP \"ip:port\" string, or\n// the empty string if unknown.\ntype strAddr string\n\nfunc (a strAddr) Network() string {\n\tif a != \"\" {\n\t\t// Per the documentation on net/http.Request.RemoteAddr, if this is\n\t\t// set, it's set to the IP:port of the peer (hence, TCP):\n\t\t// https://golang.org/pkg/net/http/#Request\n\t\t//\n\t\t// If we want to support Unix sockets later, we can\n\t\t// add our own grpc-specific convention within the\n\t\t// grpc codebase to set RemoteAddr to a different\n\t\t// format, or probably better: we can attach it to the\n\t\t// context and use that from serverHandlerTransport.RemoteAddr.\n\t\treturn \"tcp\"\n\t}\n\treturn \"\"\n}\n\nfunc (a strAddr) String() string { return string(a) }\n\n// do runs fn in the ServeHTTP goroutine.\nfunc (ht *serverHandlerTransport) do(fn func()) error {\n\tselect {\n\tcase <-ht.closedCh:\n\t\treturn ErrConnClosing\n\tcase ht.writes <- fn:\n\t\treturn nil\n\t}\n}\n\nfunc (ht *serverHandlerTransport) writeStatus(s *ServerStream, st *status.Status) error {\n\tht.writeStatusMu.Lock()\n\tdefer ht.writeStatusMu.Unlock()\n\n\theadersWritten := s.updateHeaderSent()\n\terr := ht.do(func() {\n\t\tif !headersWritten {\n\t\t\tht.writePendingHeaders(s)\n\t\t}\n\n\t\t// And flush, in case no header or body has been sent yet.\n\t\t// This forces a separation of headers and trailers if this is the\n\t\t// first call (for example, in end2end tests's TestNoService).\n\t\tht.rw.(http.Flusher).Flush()\n\n\t\th := ht.rw.Header()\n\t\th.Set(\"Grpc-Status\", fmt.Sprintf(\"%d\", st.Code()))\n\t\tif m := st.Message(); m != \"\" {\n\t\t\th.Set(\"Grpc-Message\", encodeGrpcMessage(m))\n\t\t}\n\n\t\ts.hdrMu.Lock()\n\t\tdefer s.hdrMu.Unlock()\n\t\tif p := st.Proto(); p != nil && len(p.Details) > 0 {\n\t\t\tdelete(s.trailer, grpcStatusDetailsBinHeader)\n\t\t\tstBytes, err := proto.Marshal(p)\n\t\t\tif err != nil {\n\t\t\t\t// TODO: return error instead, when callers are able to handle it.\n\t\t\t\tpanic(err)\n\t\t\t}\n\n\t\t\th.Set(grpcStatusDetailsBinHeader, encodeBinHeader(stBytes))\n\t\t}\n\n\t\tif len(s.trailer) > 0 {\n\t\t\tfor k, vv := range s.trailer {\n\t\t\t\t// Clients don't tolerate reading restricted headers after some non restricted ones were sent.\n\t\t\t\tif isReservedHeader(k) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor _, v := range vv {\n\t\t\t\t\t// http2 ResponseWriter mechanism to send undeclared Trailers after\n\t\t\t\t\t// the headers have possibly been written.\n\t\t\t\t\th.Add(http2.TrailerPrefix+k, encodeMetadataHeader(k, v))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tif err == nil && ht.stats != nil { // transport has not been closed\n\t\t// Note: The trailer fields are compressed with hpack after this call returns.\n\t\t// No WireLength field is set here.\n\t\ts.hdrMu.Lock()\n\t\tht.stats.HandleRPC(s.Context(), &stats.OutTrailer{\n\t\t\tTrailer: s.trailer.Copy(),\n\t\t})\n\t\ts.hdrMu.Unlock()\n\t}\n\tht.Close(errors.New(\"finished writing status\"))\n\treturn err\n}\n\n// writePendingHeaders sets common and custom headers on the first\n// write call (Write, WriteHeader, or WriteStatus)\nfunc (ht *serverHandlerTransport) writePendingHeaders(s *ServerStream) {\n\tht.writeCommonHeaders(s)\n\tht.writeCustomHeaders(s)\n}\n\n// writeCommonHeaders sets common headers on the first write\n// call (Write, WriteHeader, or WriteStatus).\nfunc (ht *serverHandlerTransport) writeCommonHeaders(s *ServerStream) {\n\th := ht.rw.Header()\n\th[\"Date\"] = nil // suppress Date to make tests happy; TODO: restore\n\th.Set(\"Content-Type\", ht.contentType)\n\n\t// Predeclare trailers we'll set later in WriteStatus (after the body).\n\t// This is a SHOULD in the HTTP RFC, and the way you add (known)\n\t// Trailers per the net/http.ResponseWriter contract.\n\t// See https://golang.org/pkg/net/http/#ResponseWriter\n\t// and https://golang.org/pkg/net/http/#example_ResponseWriter_trailers\n\th.Add(\"Trailer\", \"Grpc-Status\")\n\th.Add(\"Trailer\", \"Grpc-Message\")\n\th.Add(\"Trailer\", \"Grpc-Status-Details-Bin\")\n\n\tif s.sendCompress != \"\" {\n\t\th.Set(\"Grpc-Encoding\", s.sendCompress)\n\t}\n}\n\n// writeCustomHeaders sets custom headers set on the stream via SetHeader\n// on the first write call (Write, WriteHeader, or WriteStatus)\nfunc (ht *serverHandlerTransport) writeCustomHeaders(s *ServerStream) {\n\th := ht.rw.Header()\n\n\ts.hdrMu.Lock()\n\tfor k, vv := range s.header {\n\t\tif isReservedHeader(k) {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\th.Add(k, encodeMetadataHeader(k, v))\n\t\t}\n\t}\n\n\ts.hdrMu.Unlock()\n}\n\nfunc (ht *serverHandlerTransport) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _ *WriteOptions) error {\n\t// Always take a reference because otherwise there is no guarantee the data will\n\t// be available after this function returns. This is what callers to Write\n\t// expect.\n\tdata.Ref()\n\theadersWritten := s.updateHeaderSent()\n\terr := ht.do(func() {\n\t\tdefer data.Free()\n\t\tif !headersWritten {\n\t\t\tht.writePendingHeaders(s)\n\t\t}\n\t\tht.rw.Write(hdr)\n\t\tfor _, b := range data {\n\t\t\t_, _ = ht.rw.Write(b.ReadOnlyData())\n\t\t}\n\t\tht.rw.(http.Flusher).Flush()\n\t})\n\tif err != nil {\n\t\tdata.Free()\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (ht *serverHandlerTransport) writeHeader(s *ServerStream, md metadata.MD) error {\n\tif err := s.SetHeader(md); err != nil {\n\t\treturn err\n\t}\n\n\theadersWritten := s.updateHeaderSent()\n\terr := ht.do(func() {\n\t\tif !headersWritten {\n\t\t\tht.writePendingHeaders(s)\n\t\t}\n\n\t\tht.rw.WriteHeader(200)\n\t\tht.rw.(http.Flusher).Flush()\n\t})\n\n\tif err == nil && ht.stats != nil {\n\t\t// Note: The header fields are compressed with hpack after this call returns.\n\t\t// No WireLength field is set here.\n\t\tht.stats.HandleRPC(s.Context(), &stats.OutHeader{\n\t\t\tHeader:      md.Copy(),\n\t\t\tCompression: s.sendCompress,\n\t\t})\n\t}\n\treturn err\n}\n\nfunc (ht *serverHandlerTransport) adjustWindow(*ServerStream, uint32) {\n}\n\nfunc (ht *serverHandlerTransport) updateWindow(*ServerStream, uint32) {\n}\n\nfunc (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream func(*ServerStream)) {\n\t// With this transport type there will be exactly 1 stream: this HTTP request.\n\tvar cancel context.CancelFunc\n\tif ht.timeoutSet {\n\t\tctx, cancel = context.WithTimeout(ctx, ht.timeout)\n\t} else {\n\t\tctx, cancel = context.WithCancel(ctx)\n\t}\n\n\t// requestOver is closed when the status has been written via WriteStatus.\n\trequestOver := make(chan struct{})\n\tgo func() {\n\t\tselect {\n\t\tcase <-requestOver:\n\t\tcase <-ht.closedCh:\n\t\tcase <-ht.req.Context().Done():\n\t\t}\n\t\tcancel()\n\t\tht.Close(errors.New(\"request is done processing\"))\n\t}()\n\n\tctx = metadata.NewIncomingContext(ctx, ht.headerMD)\n\treq := ht.req\n\ts := &ServerStream{\n\t\tStream: Stream{\n\t\t\tid:             0, // irrelevant\n\t\t\tctx:            ctx,\n\t\t\tmethod:         req.URL.Path,\n\t\t\trecvCompress:   req.Header.Get(\"grpc-encoding\"),\n\t\t\tcontentSubtype: ht.contentSubtype,\n\t\t},\n\t\tcancel:           cancel,\n\t\tst:               ht,\n\t\theaderWireLength: 0, // won't have access to header wire length until golang/go#18997.\n\t}\n\ts.Stream.buf.init()\n\ts.readRequester = s\n\ts.trReader = transportReader{\n\t\treader:        recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: &s.buf},\n\t\twindowHandler: s,\n\t}\n\n\t// readerDone is closed when the Body.Read-ing goroutine exits.\n\treaderDone := make(chan struct{})\n\tgo func() {\n\t\tdefer close(readerDone)\n\n\t\tfor {\n\t\t\tbuf := ht.bufferPool.Get(http2MaxFrameLen)\n\t\t\tn, err := req.Body.Read(*buf)\n\t\t\tif n > 0 {\n\t\t\t\t*buf = (*buf)[:n]\n\t\t\t\ts.buf.put(recvMsg{buffer: mem.NewBuffer(buf, ht.bufferPool)})\n\t\t\t} else {\n\t\t\t\tht.bufferPool.Put(buf)\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\ts.buf.put(recvMsg{err: mapRecvMsgError(err)})\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\n\t// startStream is provided by the *grpc.Server's serveStreams.\n\t// It starts a goroutine serving s and exits immediately.\n\t// The goroutine that is started is the one that then calls\n\t// into ht, calling WriteHeader, Write, WriteStatus, Close, etc.\n\tstartStream(s)\n\n\tht.runStream()\n\tclose(requestOver)\n\n\t// Wait for reading goroutine to finish.\n\treq.Body.Close()\n\t<-readerDone\n}\n\nfunc (ht *serverHandlerTransport) runStream() {\n\tfor {\n\t\tselect {\n\t\tcase fn := <-ht.writes:\n\t\t\tfn()\n\t\tcase <-ht.closedCh:\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (ht *serverHandlerTransport) incrMsgRecv() {}\n\nfunc (ht *serverHandlerTransport) Drain(string) {\n\tpanic(\"Drain() is not implemented\")\n}\n\n// mapRecvMsgError returns the non-nil err into the appropriate\n// error value as expected by callers of *grpc.parser.recvMsg.\n// In particular, in can only be:\n//   - io.EOF\n//   - io.ErrUnexpectedEOF\n//   - of type transport.ConnectionError\n//   - an error from the status package\nfunc mapRecvMsgError(err error) error {\n\tif err == io.EOF || err == io.ErrUnexpectedEOF {\n\t\treturn err\n\t}\n\tif se, ok := err.(http2.StreamError); ok {\n\t\tif code, ok := http2ErrConvTab[se.Code]; ok {\n\t\t\treturn status.Error(code, se.Error())\n\t\t}\n\t}\n\tif strings.Contains(err.Error(), \"body closed by handler\") {\n\t\treturn status.Error(codes.Canceled, err.Error())\n\t}\n\treturn connectionErrorf(true, err, \"%s\", err.Error())\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/http2_client.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"net\"\n\t\"net/http\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"golang.org/x/net/http2\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\ticredentials \"google.golang.org/grpc/internal/credentials\"\n\t\"google.golang.org/grpc/internal/grpclog\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\timetadata \"google.golang.org/grpc/internal/metadata\"\n\t\"google.golang.org/grpc/internal/proxyattributes\"\n\tistats \"google.golang.org/grpc/internal/stats\"\n\tistatus \"google.golang.org/grpc/internal/status\"\n\tisyscall \"google.golang.org/grpc/internal/syscall\"\n\t\"google.golang.org/grpc/internal/transport/networktype\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// clientConnectionCounter counts the number of connections a client has\n// initiated (equal to the number of http2Clients created). Must be accessed\n// atomically.\nvar clientConnectionCounter uint64\n\nvar goAwayLoopyWriterTimeout = 5 * time.Second\n\nvar metadataFromOutgoingContextRaw = internal.FromOutgoingContextRaw.(func(context.Context) (metadata.MD, [][]string, bool))\n\n// http2Client implements the ClientTransport interface with HTTP2.\ntype http2Client struct {\n\tlastRead  int64 // Keep this field 64-bit aligned. Accessed atomically.\n\tctx       context.Context\n\tcancel    context.CancelFunc\n\tctxDone   <-chan struct{} // Cache the ctx.Done() chan.\n\tuserAgent string\n\t// address contains the resolver returned address for this transport.\n\t// If the `ServerName` field is set, it takes precedence over `CallHdr.Host`\n\t// passed to `NewStream`, when determining the :authority header.\n\taddress    resolver.Address\n\tmd         metadata.MD\n\tconn       net.Conn // underlying communication channel\n\tloopy      *loopyWriter\n\tremoteAddr net.Addr\n\tlocalAddr  net.Addr\n\tauthInfo   credentials.AuthInfo // auth info about the connection\n\n\treaderDone chan struct{} // sync point to enable testing.\n\twriterDone chan struct{} // sync point to enable testing.\n\t// goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor)\n\t// that the server sent GoAway on this transport.\n\tgoAway        chan struct{}\n\tkeepaliveDone chan struct{} // Closed when the keepalive goroutine exits.\n\tframer        *framer\n\t// controlBuf delivers all the control related tasks (e.g., window\n\t// updates, reset streams, and various settings) to the controller.\n\t// Do not access controlBuf with mu held.\n\tcontrolBuf *controlBuffer\n\tfc         *trInFlow\n\t// The scheme used: https if TLS is on, http otherwise.\n\tscheme string\n\n\tisSecure bool\n\n\tperRPCCreds []credentials.PerRPCCredentials\n\n\tkp               keepalive.ClientParameters\n\tkeepaliveEnabled bool\n\n\tstatsHandler stats.Handler\n\n\tinitialWindowSize int32\n\n\t// configured by peer through SETTINGS_MAX_HEADER_LIST_SIZE\n\tmaxSendHeaderListSize *uint32\n\n\tbdpEst *bdpEstimator\n\n\tmaxConcurrentStreams  uint32\n\tstreamQuota           int64\n\tstreamsQuotaAvailable chan struct{}\n\twaitingStreams        uint32\n\tregisteredCompressors string\n\n\t// Do not access controlBuf with mu held.\n\tmu            sync.Mutex // guard the following variables\n\tnextID        uint32\n\tstate         transportState\n\tactiveStreams map[uint32]*ClientStream\n\t// prevGoAway ID records the Last-Stream-ID in the previous GOAway frame.\n\tprevGoAwayID uint32\n\t// goAwayReason records the http2.ErrCode and debug data received with the\n\t// GoAway frame.\n\tgoAwayReason GoAwayReason\n\t// goAwayDebugMessage contains a detailed human readable string about a\n\t// GoAway frame, useful for error messages.\n\tgoAwayDebugMessage string\n\t// A condition variable used to signal when the keepalive goroutine should\n\t// go dormant. The condition for dormancy is based on the number of active\n\t// streams and the `PermitWithoutStream` keepalive client parameter. And\n\t// since the number of active streams is guarded by the above mutex, we use\n\t// the same for this condition variable as well.\n\tkpDormancyCond *sync.Cond\n\t// A boolean to track whether the keepalive goroutine is dormant or not.\n\t// This is checked before attempting to signal the above condition\n\t// variable.\n\tkpDormant bool\n\n\tchannelz *channelz.Socket\n\n\tonClose func(GoAwayReason)\n\n\tbufferPool mem.BufferPool\n\n\tconnectionID uint64\n\tlogger       *grpclog.PrefixLogger\n}\n\nfunc dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr resolver.Address, grpcUA string) (net.Conn, error) {\n\taddress := addr.Addr\n\tnetworkType, ok := networktype.Get(addr)\n\tif fn != nil {\n\t\t// Special handling for unix scheme with custom dialer. Back in the day,\n\t\t// we did not have a unix resolver and therefore targets with a unix\n\t\t// scheme would end up using the passthrough resolver. So, user's used a\n\t\t// custom dialer in this case and expected the original dial target to\n\t\t// be passed to the custom dialer. Now, we have a unix resolver. But if\n\t\t// a custom dialer is specified, we want to retain the old behavior in\n\t\t// terms of the address being passed to the custom dialer.\n\t\tif networkType == \"unix\" && !strings.HasPrefix(address, \"\\x00\") {\n\t\t\t// Supported unix targets are either \"unix://absolute-path\" or\n\t\t\t// \"unix:relative-path\".\n\t\t\tif filepath.IsAbs(address) {\n\t\t\t\treturn fn(ctx, \"unix://\"+address)\n\t\t\t}\n\t\t\treturn fn(ctx, \"unix:\"+address)\n\t\t}\n\t\treturn fn(ctx, address)\n\t}\n\tif !ok {\n\t\tnetworkType, address = ParseDialTarget(address)\n\t}\n\tif opts, present := proxyattributes.Get(addr); present {\n\t\treturn proxyDial(ctx, addr, grpcUA, opts)\n\t}\n\treturn internal.NetDialerWithTCPKeepalive().DialContext(ctx, networkType, address)\n}\n\nfunc isTemporary(err error) bool {\n\tswitch err := err.(type) {\n\tcase interface {\n\t\tTemporary() bool\n\t}:\n\t\treturn err.Temporary()\n\tcase interface {\n\t\tTimeout() bool\n\t}:\n\t\t// Timeouts may be resolved upon retry, and are thus treated as\n\t\t// temporary.\n\t\treturn err.Timeout()\n\t}\n\treturn true\n}\n\n// NewHTTP2Client constructs a connected ClientTransport to addr based on HTTP2\n// and starts to receive messages on it. Non-nil error returns if construction\n// fails.\nfunc NewHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ ClientTransport, err error) {\n\tscheme := \"http\"\n\tctx, cancel := context.WithCancel(ctx)\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tcancel()\n\t\t}\n\t}()\n\n\t// gRPC, resolver, balancer etc. can specify arbitrary data in the\n\t// Attributes field of resolver.Address, which is shoved into connectCtx\n\t// and passed to the dialer and credential handshaker. This makes it possible for\n\t// address specific arbitrary data to reach custom dialers and credential handshakers.\n\tconnectCtx = icredentials.NewClientHandshakeInfoContext(connectCtx, credentials.ClientHandshakeInfo{Attributes: addr.Attributes})\n\n\tconn, err := dial(connectCtx, opts.Dialer, addr, opts.UserAgent)\n\tif err != nil {\n\t\tif opts.FailOnNonTempDialError {\n\t\t\treturn nil, connectionErrorf(isTemporary(err), err, \"transport: error while dialing: %v\", err)\n\t\t}\n\t\treturn nil, connectionErrorf(true, err, \"transport: Error while dialing: %v\", err)\n\t}\n\n\t// Any further errors will close the underlying connection\n\tdefer func(conn net.Conn) {\n\t\tif err != nil {\n\t\t\tconn.Close()\n\t\t}\n\t}(conn)\n\n\t// The following defer and goroutine monitor the connectCtx for cancellation\n\t// and deadline.  On context expiration, the connection is hard closed and\n\t// this function will naturally fail as a result.  Otherwise, the defer\n\t// waits for the goroutine to exit to prevent the context from being\n\t// monitored (and to prevent the connection from ever being closed) after\n\t// returning from this function.\n\tctxMonitorDone := grpcsync.NewEvent()\n\tnewClientCtx, newClientDone := context.WithCancel(connectCtx)\n\tdefer func() {\n\t\tnewClientDone()         // Awaken the goroutine below if connectCtx hasn't expired.\n\t\t<-ctxMonitorDone.Done() // Wait for the goroutine below to exit.\n\t}()\n\tgo func(conn net.Conn) {\n\t\tdefer ctxMonitorDone.Fire() // Signal this goroutine has exited.\n\t\t<-newClientCtx.Done()       // Block until connectCtx expires or the defer above executes.\n\t\tif err := connectCtx.Err(); err != nil {\n\t\t\t// connectCtx expired before exiting the function.  Hard close the connection.\n\t\t\tif logger.V(logLevel) {\n\t\t\t\tlogger.Infof(\"Aborting due to connect deadline expiring: %v\", err)\n\t\t\t}\n\t\t\tconn.Close()\n\t\t}\n\t}(conn)\n\n\tkp := opts.KeepaliveParams\n\t// Validate keepalive parameters.\n\tif kp.Time == 0 {\n\t\tkp.Time = defaultClientKeepaliveTime\n\t}\n\tif kp.Timeout == 0 {\n\t\tkp.Timeout = defaultClientKeepaliveTimeout\n\t}\n\tkeepaliveEnabled := false\n\tif kp.Time != infinity {\n\t\tif err = isyscall.SetTCPUserTimeout(conn, kp.Timeout); err != nil {\n\t\t\treturn nil, connectionErrorf(false, err, \"transport: failed to set TCP_USER_TIMEOUT: %v\", err)\n\t\t}\n\t\tkeepaliveEnabled = true\n\t}\n\tvar (\n\t\tisSecure bool\n\t\tauthInfo credentials.AuthInfo\n\t)\n\ttransportCreds := opts.TransportCredentials\n\tperRPCCreds := opts.PerRPCCredentials\n\n\tif b := opts.CredsBundle; b != nil {\n\t\tif t := b.TransportCredentials(); t != nil {\n\t\t\ttransportCreds = t\n\t\t}\n\t\tif t := b.PerRPCCredentials(); t != nil {\n\t\t\tperRPCCreds = append(perRPCCreds, t)\n\t\t}\n\t}\n\tif transportCreds != nil {\n\t\tconn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn)\n\t\tif err != nil {\n\t\t\treturn nil, connectionErrorf(isTemporary(err), err, \"transport: authentication handshake failed: %v\", err)\n\t\t}\n\t\tfor _, cd := range perRPCCreds {\n\t\t\tif cd.RequireTransportSecurity() {\n\t\t\t\tif ci, ok := authInfo.(interface {\n\t\t\t\t\tGetCommonAuthInfo() credentials.CommonAuthInfo\n\t\t\t\t}); ok {\n\t\t\t\t\tsecLevel := ci.GetCommonAuthInfo().SecurityLevel\n\t\t\t\t\tif secLevel != credentials.InvalidSecurityLevel && secLevel < credentials.PrivacyAndIntegrity {\n\t\t\t\t\t\treturn nil, connectionErrorf(true, nil, \"transport: cannot send secure credentials on an insecure connection\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tisSecure = true\n\t\tif transportCreds.Info().SecurityProtocol == \"tls\" {\n\t\t\tscheme = \"https\"\n\t\t}\n\t}\n\ticwz := int32(initialWindowSize)\n\tif opts.InitialConnWindowSize >= defaultWindowSize {\n\t\ticwz = opts.InitialConnWindowSize\n\t}\n\twriteBufSize := opts.WriteBufferSize\n\treadBufSize := opts.ReadBufferSize\n\tmaxHeaderListSize := defaultClientMaxHeaderListSize\n\tif opts.MaxHeaderListSize != nil {\n\t\tmaxHeaderListSize = *opts.MaxHeaderListSize\n\t}\n\n\tt := &http2Client{\n\t\tctx:                   ctx,\n\t\tctxDone:               ctx.Done(), // Cache Done chan.\n\t\tcancel:                cancel,\n\t\tuserAgent:             opts.UserAgent,\n\t\tregisteredCompressors: grpcutil.RegisteredCompressors(),\n\t\taddress:               addr,\n\t\tconn:                  conn,\n\t\tremoteAddr:            conn.RemoteAddr(),\n\t\tlocalAddr:             conn.LocalAddr(),\n\t\tauthInfo:              authInfo,\n\t\treaderDone:            make(chan struct{}),\n\t\twriterDone:            make(chan struct{}),\n\t\tgoAway:                make(chan struct{}),\n\t\tkeepaliveDone:         make(chan struct{}),\n\t\tframer:                newFramer(conn, writeBufSize, readBufSize, opts.SharedWriteBuffer, maxHeaderListSize, opts.BufferPool),\n\t\tfc:                    &trInFlow{limit: uint32(icwz)},\n\t\tscheme:                scheme,\n\t\tactiveStreams:         make(map[uint32]*ClientStream),\n\t\tisSecure:              isSecure,\n\t\tperRPCCreds:           perRPCCreds,\n\t\tkp:                    kp,\n\t\tstatsHandler:          istats.NewCombinedHandler(opts.StatsHandlers...),\n\t\tinitialWindowSize:     initialWindowSize,\n\t\tnextID:                1,\n\t\tmaxConcurrentStreams:  defaultMaxStreamsClient,\n\t\tstreamQuota:           defaultMaxStreamsClient,\n\t\tstreamsQuotaAvailable: make(chan struct{}, 1),\n\t\tkeepaliveEnabled:      keepaliveEnabled,\n\t\tbufferPool:            opts.BufferPool,\n\t\tonClose:               onClose,\n\t}\n\tvar czSecurity credentials.ChannelzSecurityValue\n\tif au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok {\n\t\tczSecurity = au.GetSecurityValue()\n\t}\n\tt.channelz = channelz.RegisterSocket(\n\t\t&channelz.Socket{\n\t\t\tSocketType:       channelz.SocketTypeNormal,\n\t\t\tParent:           opts.ChannelzParent,\n\t\t\tSocketMetrics:    channelz.SocketMetrics{},\n\t\t\tEphemeralMetrics: t.socketMetrics,\n\t\t\tLocalAddr:        t.localAddr,\n\t\t\tRemoteAddr:       t.remoteAddr,\n\t\t\tSocketOptions:    channelz.GetSocketOption(t.conn),\n\t\t\tSecurity:         czSecurity,\n\t\t})\n\tt.logger = prefixLoggerForClientTransport(t)\n\t// Add peer information to the http2client context.\n\tt.ctx = peer.NewContext(t.ctx, t.Peer())\n\n\tif md, ok := addr.Metadata.(*metadata.MD); ok {\n\t\tt.md = *md\n\t} else if md := imetadata.Get(addr); md != nil {\n\t\tt.md = md\n\t}\n\tt.controlBuf = newControlBuffer(t.ctxDone)\n\tif opts.InitialWindowSize >= defaultWindowSize {\n\t\tt.initialWindowSize = opts.InitialWindowSize\n\t}\n\tif !opts.StaticWindowSize {\n\t\tt.bdpEst = &bdpEstimator{\n\t\t\tbdp:               initialWindowSize,\n\t\t\tupdateFlowControl: t.updateFlowControl,\n\t\t}\n\t}\n\tif t.statsHandler != nil {\n\t\tt.ctx = t.statsHandler.TagConn(t.ctx, &stats.ConnTagInfo{\n\t\t\tRemoteAddr: t.remoteAddr,\n\t\t\tLocalAddr:  t.localAddr,\n\t\t})\n\t\tt.statsHandler.HandleConn(t.ctx, &stats.ConnBegin{\n\t\t\tClient: true,\n\t\t})\n\t}\n\tif t.keepaliveEnabled {\n\t\tt.kpDormancyCond = sync.NewCond(&t.mu)\n\t\tgo t.keepalive()\n\t}\n\n\t// Start the reader goroutine for incoming messages. Each transport has a\n\t// dedicated goroutine which reads HTTP2 frames from the network. Then it\n\t// dispatches the frame to the corresponding stream entity.  When the\n\t// server preface is received, readerErrCh is closed.  If an error occurs\n\t// first, an error is pushed to the channel.  This must be checked before\n\t// returning from this function.\n\treaderErrCh := make(chan error, 1)\n\tgo t.reader(readerErrCh)\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t// writerDone should be closed since the loopy goroutine\n\t\t\t// wouldn't have started in the case this function returns an error.\n\t\t\tclose(t.writerDone)\n\t\t\tt.Close(err)\n\t\t}\n\t}()\n\n\t// Send connection preface to server.\n\tn, err := t.conn.Write(clientPreface)\n\tif err != nil {\n\t\terr = connectionErrorf(true, err, \"transport: failed to write client preface: %v\", err)\n\t\treturn nil, err\n\t}\n\tif n != len(clientPreface) {\n\t\terr = connectionErrorf(true, nil, \"transport: preface mismatch, wrote %d bytes; want %d\", n, len(clientPreface))\n\t\treturn nil, err\n\t}\n\tvar ss []http2.Setting\n\n\tif t.initialWindowSize != defaultWindowSize {\n\t\tss = append(ss, http2.Setting{\n\t\t\tID:  http2.SettingInitialWindowSize,\n\t\t\tVal: uint32(t.initialWindowSize),\n\t\t})\n\t}\n\tif opts.MaxHeaderListSize != nil {\n\t\tss = append(ss, http2.Setting{\n\t\t\tID:  http2.SettingMaxHeaderListSize,\n\t\t\tVal: *opts.MaxHeaderListSize,\n\t\t})\n\t}\n\terr = t.framer.fr.WriteSettings(ss...)\n\tif err != nil {\n\t\terr = connectionErrorf(true, err, \"transport: failed to write initial settings frame: %v\", err)\n\t\treturn nil, err\n\t}\n\t// Adjust the connection flow control window if needed.\n\tif delta := uint32(icwz - defaultWindowSize); delta > 0 {\n\t\tif err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil {\n\t\t\terr = connectionErrorf(true, err, \"transport: failed to write window update: %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tt.connectionID = atomic.AddUint64(&clientConnectionCounter, 1)\n\n\tif err := t.framer.writer.Flush(); err != nil {\n\t\treturn nil, err\n\t}\n\t// Block until the server preface is received successfully or an error occurs.\n\tif err = <-readerErrCh; err != nil {\n\t\treturn nil, err\n\t}\n\tgo func() {\n\t\tt.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler, t.bufferPool)\n\t\tif err := t.loopy.run(); !isIOError(err) {\n\t\t\t// Immediately close the connection, as the loopy writer returns\n\t\t\t// when there are no more active streams and we were draining (the\n\t\t\t// server sent a GOAWAY).  For I/O errors, the reader will hit it\n\t\t\t// after draining any remaining incoming data.\n\t\t\tt.conn.Close()\n\t\t}\n\t\tclose(t.writerDone)\n\t}()\n\treturn t, nil\n}\n\nfunc (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *ClientStream {\n\t// TODO(zhaoq): Handle uint32 overflow of Stream.id.\n\ts := &ClientStream{\n\t\tStream: Stream{\n\t\t\tmethod:         callHdr.Method,\n\t\t\tsendCompress:   callHdr.SendCompress,\n\t\t\tcontentSubtype: callHdr.ContentSubtype,\n\t\t},\n\t\tct:         t,\n\t\tdone:       make(chan struct{}),\n\t\theaderChan: make(chan struct{}),\n\t\tdoneFunc:   callHdr.DoneFunc,\n\t}\n\ts.Stream.buf.init()\n\ts.Stream.wq.init(defaultWriteQuota, s.done)\n\ts.readRequester = s\n\t// The client side stream context should have exactly the same life cycle with the user provided context.\n\t// That means, s.ctx should be read-only. And s.ctx is done iff ctx is done.\n\t// So we use the original context here instead of creating a copy.\n\ts.ctx = ctx\n\ts.trReader = transportReader{\n\t\treader: recvBufferReader{\n\t\t\tctx:          s.ctx,\n\t\t\tctxDone:      s.ctx.Done(),\n\t\t\trecv:         &s.buf,\n\t\t\tclientStream: s,\n\t\t},\n\t\twindowHandler: s,\n\t}\n\treturn s\n}\n\nfunc (t *http2Client) Peer() *peer.Peer {\n\treturn &peer.Peer{\n\t\tAddr:      t.remoteAddr,\n\t\tAuthInfo:  t.authInfo, // Can be nil\n\t\tLocalAddr: t.localAddr,\n\t}\n}\n\n// OutgoingGoAwayHandler writes a GOAWAY to the connection.  Always returns (false, err) as we want the GoAway\n// to be the last frame loopy writes to the transport.\nfunc (t *http2Client) outgoingGoAwayHandler(g *goAway) (bool, error) {\n\tt.mu.Lock()\n\tmaxStreamID := t.nextID - 2\n\tt.mu.Unlock()\n\tif err := t.framer.fr.WriteGoAway(maxStreamID, http2.ErrCodeNo, g.debugData); err != nil {\n\t\treturn false, err\n\t}\n\treturn false, g.closeConn\n}\n\nfunc (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) ([]hpack.HeaderField, error) {\n\taud := t.createAudience(callHdr)\n\tri := credentials.RequestInfo{\n\t\tMethod:   callHdr.Method,\n\t\tAuthInfo: t.authInfo,\n\t}\n\tctxWithRequestInfo := credentials.NewContextWithRequestInfo(ctx, ri)\n\tauthData, err := t.getTrAuthData(ctxWithRequestInfo, aud)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcallAuthData, err := t.getCallAuthData(ctxWithRequestInfo, aud, callHdr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields\n\t// first and create a slice of that exact size.\n\t// Make the slice of certain predictable size to reduce allocations made by append.\n\thfLen := 7 // :method, :scheme, :path, :authority, content-type, user-agent, te\n\thfLen += len(authData) + len(callAuthData)\n\tregisteredCompressors := t.registeredCompressors\n\tif callHdr.AcceptedCompressors != nil {\n\t\tregisteredCompressors = *callHdr.AcceptedCompressors\n\t}\n\tif callHdr.PreviousAttempts > 0 {\n\t\thfLen++\n\t}\n\tif callHdr.SendCompress != \"\" {\n\t\thfLen++\n\t}\n\tif registeredCompressors != \"\" {\n\t\thfLen++\n\t}\n\tif _, ok := ctx.Deadline(); ok {\n\t\thfLen++\n\t}\n\theaderFields := make([]hpack.HeaderField, 0, hfLen)\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \":method\", Value: \"POST\"})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \":scheme\", Value: t.scheme})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \":path\", Value: callHdr.Method})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \":authority\", Value: callHdr.Host})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"content-type\", Value: grpcutil.ContentType(callHdr.ContentSubtype)})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"user-agent\", Value: t.userAgent})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"te\", Value: \"trailers\"})\n\tif callHdr.PreviousAttempts > 0 {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-previous-rpc-attempts\", Value: strconv.Itoa(callHdr.PreviousAttempts)})\n\t}\n\n\tif callHdr.SendCompress != \"\" {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-encoding\", Value: callHdr.SendCompress})\n\t\t// Include the outgoing compressor name when compressor is not registered\n\t\t// via encoding.RegisterCompressor. This is possible when client uses\n\t\t// WithCompressor dial option.\n\t\tif !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) {\n\t\t\tif registeredCompressors != \"\" {\n\t\t\t\tregisteredCompressors += \",\"\n\t\t\t}\n\t\t\tregisteredCompressors += callHdr.SendCompress\n\t\t}\n\t}\n\n\tif registeredCompressors != \"\" {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-accept-encoding\", Value: registeredCompressors})\n\t}\n\tif dl, ok := ctx.Deadline(); ok {\n\t\t// Send out timeout regardless its value. The server can detect timeout context by itself.\n\t\t// TODO(mmukhi): Perhaps this field should be updated when actually writing out to the wire.\n\t\ttimeout := time.Until(dl)\n\t\tif timeout <= 0 {\n\t\t\treturn nil, status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error())\n\t\t}\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-timeout\", Value: grpcutil.EncodeDuration(timeout)})\n\t}\n\tfor k, v := range authData {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t}\n\tfor k, v := range callAuthData {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t}\n\n\tif md, added, ok := metadataFromOutgoingContextRaw(ctx); ok {\n\t\tvar k string\n\t\tfor k, vv := range md {\n\t\t\t// HTTP doesn't allow you to set pseudoheaders after non pseudoheaders were set.\n\t\t\tif isReservedHeader(k) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor _, v := range vv {\n\t\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t\t\t}\n\t\t}\n\t\tfor _, vv := range added {\n\t\t\tfor i, v := range vv {\n\t\t\t\tif i%2 == 0 {\n\t\t\t\t\tk = strings.ToLower(v)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// HTTP doesn't allow you to set pseudoheaders after non pseudoheaders were set.\n\t\t\t\tif isReservedHeader(k) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t\t\t}\n\t\t}\n\t}\n\tfor k, vv := range t.md {\n\t\tif isReservedHeader(k) {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t\t}\n\t}\n\treturn headerFields, nil\n}\n\nfunc (t *http2Client) createAudience(callHdr *CallHdr) string {\n\t// Create an audience string only if needed.\n\tif len(t.perRPCCreds) == 0 && callHdr.Creds == nil {\n\t\treturn \"\"\n\t}\n\t// Construct URI required to get auth request metadata.\n\t// Omit port if it is the default one.\n\thost := strings.TrimSuffix(callHdr.Host, \":443\")\n\tpos := strings.LastIndex(callHdr.Method, \"/\")\n\tif pos == -1 {\n\t\tpos = len(callHdr.Method)\n\t}\n\treturn \"https://\" + host + callHdr.Method[:pos]\n}\n\nfunc (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[string]string, error) {\n\tif len(t.perRPCCreds) == 0 {\n\t\treturn nil, nil\n\t}\n\tauthData := map[string]string{}\n\tfor _, c := range t.perRPCCreds {\n\t\tdata, err := c.GetRequestMetadata(ctx, audience)\n\t\tif err != nil {\n\t\t\tif st, ok := status.FromError(err); ok {\n\t\t\t\t// Restrict the code to the list allowed by gRFC A54.\n\t\t\t\tif istatus.IsRestrictedControlPlaneCode(st) {\n\t\t\t\t\terr = status.Errorf(codes.Internal, \"transport: received per-RPC creds error with illegal status: %v\", err)\n\t\t\t\t}\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn nil, status.Errorf(codes.Unauthenticated, \"transport: per-RPC creds failed due to error: %v\", err)\n\t\t}\n\t\tfor k, v := range data {\n\t\t\t// Capital header names are illegal in HTTP/2.\n\t\t\tk = strings.ToLower(k)\n\t\t\tauthData[k] = v\n\t\t}\n\t}\n\treturn authData, nil\n}\n\nfunc (t *http2Client) getCallAuthData(ctx context.Context, audience string, callHdr *CallHdr) (map[string]string, error) {\n\tvar callAuthData map[string]string\n\t// Check if credentials.PerRPCCredentials were provided via call options.\n\t// Note: if these credentials are provided both via dial options and call\n\t// options, then both sets of credentials will be applied.\n\tif callCreds := callHdr.Creds; callCreds != nil {\n\t\tif callCreds.RequireTransportSecurity() {\n\t\t\tri, _ := credentials.RequestInfoFromContext(ctx)\n\t\t\tif !t.isSecure || credentials.CheckSecurityLevel(ri.AuthInfo, credentials.PrivacyAndIntegrity) != nil {\n\t\t\t\treturn nil, status.Error(codes.Unauthenticated, \"transport: cannot send secure credentials on an insecure connection\")\n\t\t\t}\n\t\t}\n\t\tdata, err := callCreds.GetRequestMetadata(ctx, audience)\n\t\tif err != nil {\n\t\t\tif st, ok := status.FromError(err); ok {\n\t\t\t\t// Restrict the code to the list allowed by gRFC A54.\n\t\t\t\tif istatus.IsRestrictedControlPlaneCode(st) {\n\t\t\t\t\terr = status.Errorf(codes.Internal, \"transport: received per-RPC creds error with illegal status: %v\", err)\n\t\t\t\t}\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn nil, status.Errorf(codes.Internal, \"transport: per-RPC creds failed due to error: %v\", err)\n\t\t}\n\t\tcallAuthData = make(map[string]string, len(data))\n\t\tfor k, v := range data {\n\t\t\t// Capital header names are illegal in HTTP/2\n\t\t\tk = strings.ToLower(k)\n\t\t\tcallAuthData[k] = v\n\t\t}\n\t}\n\treturn callAuthData, nil\n}\n\n// NewStreamError wraps an error and reports additional information.  Typically\n// NewStream errors result in transparent retry, as they mean nothing went onto\n// the wire.  However, there are two notable exceptions:\n//\n//  1. If the stream headers violate the max header list size allowed by the\n//     server.  It's possible this could succeed on another transport, even if\n//     it's unlikely, but do not transparently retry.\n//  2. If the credentials errored when requesting their headers.  In this case,\n//     it's possible a retry can fix the problem, but indefinitely transparently\n//     retrying is not appropriate as it is likely the credentials, if they can\n//     eventually succeed, would need I/O to do so.\ntype NewStreamError struct {\n\tErr error\n\n\tAllowTransparentRetry bool\n}\n\nfunc (e NewStreamError) Error() string {\n\treturn e.Err.Error()\n}\n\n// NewStream creates a stream and registers it into the transport as \"active\"\n// streams.  All non-nil errors returned will be *NewStreamError.\nfunc (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*ClientStream, error) {\n\tctx = peer.NewContext(ctx, t.Peer())\n\n\t// ServerName field of the resolver returned address takes precedence over\n\t// Host field of CallHdr to determine the :authority header. This is because,\n\t// the ServerName field takes precedence for server authentication during\n\t// TLS handshake, and the :authority header should match the value used\n\t// for server authentication.\n\tif t.address.ServerName != \"\" {\n\t\tnewCallHdr := *callHdr\n\t\tnewCallHdr.Host = t.address.ServerName\n\t\tcallHdr = &newCallHdr\n\t}\n\n\t// The authority specified via the `CallAuthority` CallOption takes the\n\t// highest precedence when determining the `:authority` header. It overrides\n\t// any value present in the Host field of CallHdr. Before applying this\n\t// override, the authority string is validated. If the credentials do not\n\t// implement the AuthorityValidator interface, or if validation fails, the\n\t// RPC is failed with a status code of `UNAVAILABLE`.\n\tif callHdr.Authority != \"\" {\n\t\tauth, ok := t.authInfo.(credentials.AuthorityValidator)\n\t\tif !ok {\n\t\t\treturn nil, &NewStreamError{Err: status.Errorf(codes.Unavailable, \"credentials type %q does not implement the AuthorityValidator interface, but authority override specified with CallAuthority call option\", t.authInfo.AuthType())}\n\t\t}\n\t\tif err := auth.ValidateAuthority(callHdr.Authority); err != nil {\n\t\t\treturn nil, &NewStreamError{Err: status.Errorf(codes.Unavailable, \"failed to validate authority %q : %v\", callHdr.Authority, err)}\n\t\t}\n\t\tnewCallHdr := *callHdr\n\t\tnewCallHdr.Host = callHdr.Authority\n\t\tcallHdr = &newCallHdr\n\t}\n\n\theaderFields, err := t.createHeaderFields(ctx, callHdr)\n\tif err != nil {\n\t\treturn nil, &NewStreamError{Err: err, AllowTransparentRetry: false}\n\t}\n\ts := t.newStream(ctx, callHdr)\n\tcleanup := func(err error) {\n\t\tif s.swapState(streamDone) == streamDone {\n\t\t\t// If it was already done, return.\n\t\t\treturn\n\t\t}\n\t\t// The stream was unprocessed by the server.\n\t\ts.unprocessed.Store(true)\n\t\ts.write(recvMsg{err: err})\n\t\tclose(s.done)\n\t\t// If headerChan isn't closed, then close it.\n\t\tif atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) {\n\t\t\tclose(s.headerChan)\n\t\t}\n\t}\n\thdr := &headerFrame{\n\t\thf:        headerFields,\n\t\tendStream: false,\n\t\tinitStream: func(uint32) error {\n\t\t\tt.mu.Lock()\n\t\t\t// TODO: handle transport closure in loopy instead and remove this\n\t\t\t// initStream is never called when transport is draining.\n\t\t\tif t.state == closing {\n\t\t\t\tt.mu.Unlock()\n\t\t\t\tcleanup(ErrConnClosing)\n\t\t\t\treturn ErrConnClosing\n\t\t\t}\n\t\t\tif channelz.IsOn() {\n\t\t\t\tt.channelz.SocketMetrics.StreamsStarted.Add(1)\n\t\t\t\tt.channelz.SocketMetrics.LastLocalStreamCreatedTimestamp.Store(time.Now().UnixNano())\n\t\t\t}\n\t\t\t// If the keepalive goroutine has gone dormant, wake it up.\n\t\t\tif t.kpDormant {\n\t\t\t\tt.kpDormancyCond.Signal()\n\t\t\t}\n\t\t\tt.mu.Unlock()\n\t\t\treturn nil\n\t\t},\n\t\tonOrphaned: cleanup,\n\t\twq:         &s.wq,\n\t}\n\tfirstTry := true\n\tvar ch chan struct{}\n\ttransportDrainRequired := false\n\tcheckForStreamQuota := func() bool {\n\t\tif t.streamQuota <= 0 { // Can go negative if server decreases it.\n\t\t\tif firstTry {\n\t\t\t\tt.waitingStreams++\n\t\t\t}\n\t\t\tch = t.streamsQuotaAvailable\n\t\t\treturn false\n\t\t}\n\t\tif !firstTry {\n\t\t\tt.waitingStreams--\n\t\t}\n\t\tt.streamQuota--\n\n\t\tt.mu.Lock()\n\t\tif t.state == draining || t.activeStreams == nil { // Can be niled from Close().\n\t\t\tt.mu.Unlock()\n\t\t\treturn false // Don't create a stream if the transport is already closed.\n\t\t}\n\n\t\thdr.streamID = t.nextID\n\t\tt.nextID += 2\n\t\t// Drain client transport if nextID > MaxStreamID which signals gRPC that\n\t\t// the connection is closed and a new one must be created for subsequent RPCs.\n\t\ttransportDrainRequired = t.nextID > MaxStreamID\n\n\t\ts.id = hdr.streamID\n\t\ts.fc = inFlow{limit: uint32(t.initialWindowSize)}\n\t\tt.activeStreams[s.id] = s\n\t\tt.mu.Unlock()\n\n\t\tif t.streamQuota > 0 && t.waitingStreams > 0 {\n\t\t\tselect {\n\t\t\tcase t.streamsQuotaAvailable <- struct{}{}:\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\tvar hdrListSizeErr error\n\tcheckForHeaderListSize := func() bool {\n\t\tif t.maxSendHeaderListSize == nil {\n\t\t\treturn true\n\t\t}\n\t\tvar sz int64\n\t\tfor _, f := range hdr.hf {\n\t\t\tif sz += int64(f.Size()); sz > int64(*t.maxSendHeaderListSize) {\n\t\t\t\thdrListSizeErr = status.Errorf(codes.Internal, \"header list size to send violates the maximum size (%d bytes) set by server\", *t.maxSendHeaderListSize)\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\tfor {\n\t\tsuccess, err := t.controlBuf.executeAndPut(func() bool {\n\t\t\treturn checkForHeaderListSize() && checkForStreamQuota()\n\t\t}, hdr)\n\t\tif err != nil {\n\t\t\t// Connection closed.\n\t\t\treturn nil, &NewStreamError{Err: err, AllowTransparentRetry: true}\n\t\t}\n\t\tif success {\n\t\t\tbreak\n\t\t}\n\t\tif hdrListSizeErr != nil {\n\t\t\treturn nil, &NewStreamError{Err: hdrListSizeErr}\n\t\t}\n\t\tfirstTry = false\n\t\tselect {\n\t\tcase <-ch:\n\t\tcase <-ctx.Done():\n\t\t\treturn nil, &NewStreamError{Err: ContextErr(ctx.Err())}\n\t\tcase <-t.goAway:\n\t\t\treturn nil, &NewStreamError{Err: errStreamDrain, AllowTransparentRetry: true}\n\t\tcase <-t.ctx.Done():\n\t\t\treturn nil, &NewStreamError{Err: ErrConnClosing, AllowTransparentRetry: true}\n\t\t}\n\t}\n\tif t.statsHandler != nil {\n\t\theader, ok := metadata.FromOutgoingContext(ctx)\n\t\tif ok {\n\t\t\theader.Set(\"user-agent\", t.userAgent)\n\t\t} else {\n\t\t\theader = metadata.Pairs(\"user-agent\", t.userAgent)\n\t\t}\n\t\t// Note: The header fields are compressed with hpack after this call returns.\n\t\t// No WireLength field is set here.\n\t\tt.statsHandler.HandleRPC(s.ctx, &stats.OutHeader{\n\t\t\tClient:      true,\n\t\t\tFullMethod:  callHdr.Method,\n\t\t\tRemoteAddr:  t.remoteAddr,\n\t\t\tLocalAddr:   t.localAddr,\n\t\t\tCompression: callHdr.SendCompress,\n\t\t\tHeader:      header,\n\t\t})\n\t}\n\tif transportDrainRequired {\n\t\tif t.logger.V(logLevel) {\n\t\t\tt.logger.Infof(\"Draining transport: t.nextID > MaxStreamID\")\n\t\t}\n\t\tt.GracefulClose()\n\t}\n\treturn s, nil\n}\n\nfunc (t *http2Client) closeStream(s *ClientStream, err error, rst bool, rstCode http2.ErrCode, st *status.Status, mdata map[string][]string, eosReceived bool) {\n\t// Set stream status to done.\n\tif s.swapState(streamDone) == streamDone {\n\t\t// If it was already done, return.  If multiple closeStream calls\n\t\t// happen simultaneously, wait for the first to finish.\n\t\t<-s.done\n\t\treturn\n\t}\n\t// status and trailers can be updated here without any synchronization because the stream goroutine will\n\t// only read it after it sees an io.EOF error from read or write and we'll write those errors\n\t// only after updating this.\n\ts.status = st\n\tif len(mdata) > 0 {\n\t\ts.trailer = mdata\n\t}\n\tif err != nil {\n\t\t// This will unblock reads eventually.\n\t\ts.write(recvMsg{err: err})\n\t}\n\t// If headerChan isn't closed, then close it.\n\tif atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) {\n\t\ts.noHeaders = true\n\t\tclose(s.headerChan)\n\t}\n\tcleanup := &cleanupStream{\n\t\tstreamID: s.id,\n\t\tonWrite: func() {\n\t\t\tt.mu.Lock()\n\t\t\tif t.activeStreams != nil {\n\t\t\t\tdelete(t.activeStreams, s.id)\n\t\t\t}\n\t\t\tt.mu.Unlock()\n\t\t\tif channelz.IsOn() {\n\t\t\t\tif eosReceived {\n\t\t\t\t\tt.channelz.SocketMetrics.StreamsSucceeded.Add(1)\n\t\t\t\t} else {\n\t\t\t\t\tt.channelz.SocketMetrics.StreamsFailed.Add(1)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trst:     rst,\n\t\trstCode: rstCode,\n\t}\n\taddBackStreamQuota := func() bool {\n\t\tt.streamQuota++\n\t\tif t.streamQuota > 0 && t.waitingStreams > 0 {\n\t\t\tselect {\n\t\t\tcase t.streamsQuotaAvailable <- struct{}{}:\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\tt.controlBuf.executeAndPut(addBackStreamQuota, cleanup)\n\t// This will unblock write.\n\tclose(s.done)\n\tif s.doneFunc != nil {\n\t\ts.doneFunc()\n\t}\n}\n\n// Close kicks off the shutdown process of the transport. This should be called\n// only once on a transport. Once it is called, the transport should not be\n// accessed anymore.\nfunc (t *http2Client) Close(err error) {\n\tt.conn.SetWriteDeadline(time.Now().Add(time.Second * 10))\n\t// For background on the deadline value chosen here, see\n\t// https://github.com/grpc/grpc-go/issues/8425#issuecomment-3057938248 .\n\tt.conn.SetReadDeadline(time.Now().Add(time.Second))\n\tt.mu.Lock()\n\t// Make sure we only close once.\n\tif t.state == closing {\n\t\tt.mu.Unlock()\n\t\treturn\n\t}\n\tif t.logger.V(logLevel) {\n\t\tt.logger.Infof(\"Closing: %v\", err)\n\t}\n\t// Call t.onClose ASAP to prevent the client from attempting to create new\n\t// streams.\n\tif t.state != draining {\n\t\tt.onClose(GoAwayInvalid)\n\t}\n\tt.state = closing\n\tstreams := t.activeStreams\n\tt.activeStreams = nil\n\tif t.kpDormant {\n\t\t// If the keepalive goroutine is blocked on this condition variable, we\n\t\t// should unblock it so that the goroutine eventually exits.\n\t\tt.kpDormancyCond.Signal()\n\t}\n\t// Append info about previous goaways if there were any, since this may be important\n\t// for understanding the root cause for this connection to be closed.\n\tgoAwayDebugMessage := t.goAwayDebugMessage\n\tt.mu.Unlock()\n\n\t// Per HTTP/2 spec, a GOAWAY frame must be sent before closing the\n\t// connection. See https://httpwg.org/specs/rfc7540.html#GOAWAY. It\n\t// also waits for loopyWriter to be closed with a timer to avoid the\n\t// long blocking in case the connection is blackholed, i.e. TCP is\n\t// just stuck.\n\tt.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(\"client transport shutdown\"), closeConn: err})\n\ttimer := time.NewTimer(goAwayLoopyWriterTimeout)\n\tdefer timer.Stop()\n\tselect {\n\tcase <-t.writerDone: // success\n\tcase <-timer.C:\n\t\tt.logger.Infof(\"Failed to write a GOAWAY frame as part of connection close after %s. Giving up and closing the transport.\", goAwayLoopyWriterTimeout)\n\t}\n\tt.cancel()\n\tt.conn.Close()\n\t// Waits for the reader and keepalive goroutines to exit before returning to\n\t// ensure all resources are cleaned up before Close can return.\n\t<-t.readerDone\n\tif t.keepaliveEnabled {\n\t\t<-t.keepaliveDone\n\t}\n\tchannelz.RemoveEntry(t.channelz.ID)\n\tvar st *status.Status\n\tif len(goAwayDebugMessage) > 0 {\n\t\tst = status.Newf(codes.Unavailable, \"closing transport due to: %v, received prior goaway: %v\", err, goAwayDebugMessage)\n\t\terr = st.Err()\n\t} else {\n\t\tst = status.New(codes.Unavailable, err.Error())\n\t}\n\n\t// Notify all active streams.\n\tfor _, s := range streams {\n\t\tt.closeStream(s, err, false, http2.ErrCodeNo, st, nil, false)\n\t}\n\tif t.statsHandler != nil {\n\t\tt.statsHandler.HandleConn(t.ctx, &stats.ConnEnd{\n\t\t\tClient: true,\n\t\t})\n\t}\n}\n\n// GracefulClose sets the state to draining, which prevents new streams from\n// being created and causes the transport to be closed when the last active\n// stream is closed.  If there are no active streams, the transport is closed\n// immediately.  This does nothing if the transport is already draining or\n// closing.\nfunc (t *http2Client) GracefulClose() {\n\tt.mu.Lock()\n\t// Make sure we move to draining only from active.\n\tif t.state == draining || t.state == closing {\n\t\tt.mu.Unlock()\n\t\treturn\n\t}\n\tif t.logger.V(logLevel) {\n\t\tt.logger.Infof(\"GracefulClose called\")\n\t}\n\tt.onClose(GoAwayInvalid)\n\tt.state = draining\n\tactive := len(t.activeStreams)\n\tt.mu.Unlock()\n\tif active == 0 {\n\t\tt.Close(connectionErrorf(true, nil, \"no active streams left to process while draining\"))\n\t\treturn\n\t}\n\tt.controlBuf.put(&incomingGoAway{})\n}\n\n// Write formats the data into HTTP2 data frame(s) and sends it out. The caller\n// should proceed only if Write returns nil.\nfunc (t *http2Client) write(s *ClientStream, hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {\n\tif opts.Last {\n\t\t// If it's the last message, update stream state.\n\t\tif !s.compareAndSwapState(streamActive, streamWriteDone) {\n\t\t\treturn errStreamDone\n\t\t}\n\t} else if s.getState() != streamActive {\n\t\treturn errStreamDone\n\t}\n\tdf := &dataFrame{\n\t\tstreamID:  s.id,\n\t\tendStream: opts.Last,\n\t\th:         hdr,\n\t\tdata:      data,\n\t}\n\tdataLen := data.Len()\n\tif hdr != nil || dataLen != 0 { // If it's not an empty data frame, check quota.\n\t\tif err := s.wq.get(int32(len(hdr) + dataLen)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tdata.Ref()\n\tif err := t.controlBuf.put(df); err != nil {\n\t\tdata.Free()\n\t\treturn err\n\t}\n\tt.incrMsgSent()\n\treturn nil\n}\n\nfunc (t *http2Client) getStream(f http2.Frame) *ClientStream {\n\tt.mu.Lock()\n\ts := t.activeStreams[f.Header().StreamID]\n\tt.mu.Unlock()\n\treturn s\n}\n\n// adjustWindow sends out extra window update over the initial window size\n// of stream if the application is requesting data larger in size than\n// the window.\nfunc (t *http2Client) adjustWindow(s *ClientStream, n uint32) {\n\tif w := s.fc.maybeAdjust(n); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})\n\t}\n}\n\n// updateWindow adjusts the inbound quota for the stream.\n// Window updates will be sent out when the cumulative quota\n// exceeds the corresponding threshold.\nfunc (t *http2Client) updateWindow(s *ClientStream, n uint32) {\n\tif w := s.fc.onRead(n); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})\n\t}\n}\n\n// updateFlowControl updates the incoming flow control windows\n// for the transport and the stream based on the current bdp\n// estimation.\nfunc (t *http2Client) updateFlowControl(n uint32) {\n\tupdateIWS := func() bool {\n\t\tt.initialWindowSize = int32(n)\n\t\tt.mu.Lock()\n\t\tfor _, s := range t.activeStreams {\n\t\t\ts.fc.newLimit(n)\n\t\t}\n\t\tt.mu.Unlock()\n\t\treturn true\n\t}\n\tt.controlBuf.executeAndPut(updateIWS, &outgoingWindowUpdate{streamID: 0, increment: t.fc.newLimit(n)})\n\tt.controlBuf.put(&outgoingSettings{\n\t\tss: []http2.Setting{\n\t\t\t{\n\t\t\t\tID:  http2.SettingInitialWindowSize,\n\t\t\t\tVal: n,\n\t\t\t},\n\t\t},\n\t})\n}\n\nfunc (t *http2Client) handleData(f *parsedDataFrame) {\n\tsize := f.Header().Length\n\tvar sendBDPPing bool\n\tif t.bdpEst != nil {\n\t\tsendBDPPing = t.bdpEst.add(size)\n\t}\n\t// Decouple connection's flow control from application's read.\n\t// An update on connection's flow control should not depend on\n\t// whether user application has read the data or not. Such a\n\t// restriction is already imposed on the stream's flow control,\n\t// and therefore the sender will be blocked anyways.\n\t// Decoupling the connection flow control will prevent other\n\t// active(fast) streams from starving in presence of slow or\n\t// inactive streams.\n\t//\n\tif w := t.fc.onData(size); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{\n\t\t\tstreamID:  0,\n\t\t\tincrement: w,\n\t\t})\n\t}\n\tif sendBDPPing {\n\t\t// Avoid excessive ping detection (e.g. in an L7 proxy)\n\t\t// by sending a window update prior to the BDP ping.\n\n\t\tif w := t.fc.reset(); w > 0 {\n\t\t\tt.controlBuf.put(&outgoingWindowUpdate{\n\t\t\t\tstreamID:  0,\n\t\t\t\tincrement: w,\n\t\t\t})\n\t\t}\n\n\t\tt.controlBuf.put(bdpPing)\n\t}\n\t// Select the right stream to dispatch.\n\ts := t.getStream(f)\n\tif s == nil {\n\t\treturn\n\t}\n\tif size > 0 {\n\t\tif err := s.fc.onData(size); err != nil {\n\t\t\tt.closeStream(s, io.EOF, true, http2.ErrCodeFlowControl, status.New(codes.Internal, err.Error()), nil, false)\n\t\t\treturn\n\t\t}\n\t\tdataLen := f.data.Len()\n\t\tif f.Header().Flags.Has(http2.FlagDataPadded) {\n\t\t\tif w := s.fc.onRead(size - uint32(dataLen)); w > 0 {\n\t\t\t\tt.controlBuf.put(&outgoingWindowUpdate{s.id, w})\n\t\t\t}\n\t\t}\n\t\tif dataLen > 0 {\n\t\t\tf.data.Ref()\n\t\t\ts.write(recvMsg{buffer: f.data})\n\t\t}\n\t}\n\t// The server has closed the stream without sending trailers.  Record that\n\t// the read direction is closed, and set the status appropriately.\n\tif f.StreamEnded() {\n\t\tt.closeStream(s, io.EOF, false, http2.ErrCodeNo, status.New(codes.Internal, \"server closed the stream without sending trailers\"), nil, true)\n\t}\n}\n\nfunc (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {\n\ts := t.getStream(f)\n\tif s == nil {\n\t\treturn\n\t}\n\tif f.ErrCode == http2.ErrCodeRefusedStream {\n\t\t// The stream was unprocessed by the server.\n\t\ts.unprocessed.Store(true)\n\t}\n\tstatusCode, ok := http2ErrConvTab[f.ErrCode]\n\tif !ok {\n\t\tif t.logger.V(logLevel) {\n\t\t\tt.logger.Infof(\"Received a RST_STREAM frame with code %q, but found no mapped gRPC status\", f.ErrCode)\n\t\t}\n\t\tstatusCode = codes.Unknown\n\t}\n\tif statusCode == codes.Canceled {\n\t\tif d, ok := s.ctx.Deadline(); ok && !d.After(time.Now()) {\n\t\t\t// Our deadline was already exceeded, and that was likely the cause\n\t\t\t// of this cancellation.  Alter the status code accordingly.\n\t\t\tstatusCode = codes.DeadlineExceeded\n\t\t}\n\t}\n\tst := status.Newf(statusCode, \"stream terminated by RST_STREAM with error code: %v\", f.ErrCode)\n\tt.closeStream(s, st.Err(), false, http2.ErrCodeNo, st, nil, false)\n}\n\nfunc (t *http2Client) handleSettings(f *http2.SettingsFrame, isFirst bool) {\n\tif f.IsAck() {\n\t\treturn\n\t}\n\tvar maxStreams *uint32\n\tvar ss []http2.Setting\n\tvar updateFuncs []func()\n\tf.ForeachSetting(func(s http2.Setting) error {\n\t\tswitch s.ID {\n\t\tcase http2.SettingMaxConcurrentStreams:\n\t\t\tmaxStreams = new(uint32)\n\t\t\t*maxStreams = s.Val\n\t\tcase http2.SettingMaxHeaderListSize:\n\t\t\tupdateFuncs = append(updateFuncs, func() {\n\t\t\t\tt.maxSendHeaderListSize = new(uint32)\n\t\t\t\t*t.maxSendHeaderListSize = s.Val\n\t\t\t})\n\t\tdefault:\n\t\t\tss = append(ss, s)\n\t\t}\n\t\treturn nil\n\t})\n\tif isFirst && maxStreams == nil {\n\t\tmaxStreams = new(uint32)\n\t\t*maxStreams = math.MaxUint32\n\t}\n\tsf := &incomingSettings{\n\t\tss: ss,\n\t}\n\tif maxStreams != nil {\n\t\tupdateStreamQuota := func() {\n\t\t\tdelta := int64(*maxStreams) - int64(t.maxConcurrentStreams)\n\t\t\tt.maxConcurrentStreams = *maxStreams\n\t\t\tt.streamQuota += delta\n\t\t\tif delta > 0 && t.waitingStreams > 0 {\n\t\t\t\tclose(t.streamsQuotaAvailable) // wake all of them up.\n\t\t\t\tt.streamsQuotaAvailable = make(chan struct{}, 1)\n\t\t\t}\n\t\t}\n\t\tupdateFuncs = append(updateFuncs, updateStreamQuota)\n\t}\n\tt.controlBuf.executeAndPut(func() bool {\n\t\tfor _, f := range updateFuncs {\n\t\t\tf()\n\t\t}\n\t\treturn true\n\t}, sf)\n}\n\nfunc (t *http2Client) handlePing(f *http2.PingFrame) {\n\tif f.IsAck() {\n\t\t// Maybe it's a BDP ping.\n\t\tif t.bdpEst != nil {\n\t\t\tt.bdpEst.calculate(f.Data)\n\t\t}\n\t\treturn\n\t}\n\tpingAck := &ping{ack: true}\n\tcopy(pingAck.data[:], f.Data[:])\n\tt.controlBuf.put(pingAck)\n}\n\nfunc (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error {\n\tt.mu.Lock()\n\tif t.state == closing {\n\t\tt.mu.Unlock()\n\t\treturn nil\n\t}\n\tif f.ErrCode == http2.ErrCodeEnhanceYourCalm && string(f.DebugData()) == \"too_many_pings\" {\n\t\t// When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug\n\t\t// data equal to ASCII \"too_many_pings\", it should log the occurrence at a log level that is\n\t\t// enabled by default and double the configure KEEPALIVE_TIME used for new connections\n\t\t// on that channel.\n\t\tlogger.Errorf(\"Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII \\\"too_many_pings\\\".\")\n\t}\n\tid := f.LastStreamID\n\tif id > 0 && id%2 == 0 {\n\t\tt.mu.Unlock()\n\t\treturn connectionErrorf(true, nil, \"received goaway with non-zero even-numbered stream id: %v\", id)\n\t}\n\t// A client can receive multiple GoAways from the server (see\n\t// https://github.com/grpc/grpc-go/issues/1387).  The idea is that the first\n\t// GoAway will be sent with an ID of MaxInt32 and the second GoAway will be\n\t// sent after an RTT delay with the ID of the last stream the server will\n\t// process.\n\t//\n\t// Therefore, when we get the first GoAway we don't necessarily close any\n\t// streams. While in case of second GoAway we close all streams created after\n\t// the GoAwayId. This way streams that were in-flight while the GoAway from\n\t// server was being sent don't get killed.\n\tselect {\n\tcase <-t.goAway: // t.goAway has been closed (i.e.,multiple GoAways).\n\t\t// If there are multiple GoAways the first one should always have an ID greater than the following ones.\n\t\tif id > t.prevGoAwayID {\n\t\t\tt.mu.Unlock()\n\t\t\treturn connectionErrorf(true, nil, \"received goaway with stream id: %v, which exceeds stream id of previous goaway: %v\", id, t.prevGoAwayID)\n\t\t}\n\tdefault:\n\t\tt.setGoAwayReason(f)\n\t\tclose(t.goAway)\n\t\tdefer t.controlBuf.put(&incomingGoAway{}) // Defer as t.mu is currently held.\n\t\t// Notify the clientconn about the GOAWAY before we set the state to\n\t\t// draining, to allow the client to stop attempting to create streams\n\t\t// before disallowing new streams on this connection.\n\t\tif t.state != draining {\n\t\t\tt.onClose(t.goAwayReason)\n\t\t\tt.state = draining\n\t\t}\n\t}\n\t// All streams with IDs greater than the GoAwayId\n\t// and smaller than the previous GoAway ID should be killed.\n\tupperLimit := t.prevGoAwayID\n\tif upperLimit == 0 { // This is the first GoAway Frame.\n\t\tupperLimit = math.MaxUint32 // Kill all streams after the GoAway ID.\n\t}\n\n\tt.prevGoAwayID = id\n\tif len(t.activeStreams) == 0 {\n\t\tt.mu.Unlock()\n\t\treturn connectionErrorf(true, nil, \"received goaway and there are no active streams\")\n\t}\n\n\tstreamsToClose := make([]*ClientStream, 0)\n\tfor streamID, stream := range t.activeStreams {\n\t\tif streamID > id && streamID <= upperLimit {\n\t\t\t// The stream was unprocessed by the server.\n\t\t\tstream.unprocessed.Store(true)\n\t\t\tstreamsToClose = append(streamsToClose, stream)\n\t\t}\n\t}\n\tt.mu.Unlock()\n\t// Called outside t.mu because closeStream can take controlBuf's mu, which\n\t// could induce deadlock and is not allowed.\n\tfor _, stream := range streamsToClose {\n\t\tt.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false)\n\t}\n\treturn nil\n}\n\n// setGoAwayReason sets the value of t.goAwayReason based\n// on the GoAway frame received.\n// It expects a lock on transport's mutex to be held by\n// the caller.\nfunc (t *http2Client) setGoAwayReason(f *http2.GoAwayFrame) {\n\tt.goAwayReason = GoAwayNoReason\n\tif f.ErrCode == http2.ErrCodeEnhanceYourCalm {\n\t\tif string(f.DebugData()) == \"too_many_pings\" {\n\t\t\tt.goAwayReason = GoAwayTooManyPings\n\t\t}\n\t}\n\tif len(f.DebugData()) == 0 {\n\t\tt.goAwayDebugMessage = fmt.Sprintf(\"code: %s\", f.ErrCode)\n\t} else {\n\t\tt.goAwayDebugMessage = fmt.Sprintf(\"code: %s, debug data: %q\", f.ErrCode, string(f.DebugData()))\n\t}\n}\n\nfunc (t *http2Client) GetGoAwayReason() (GoAwayReason, string) {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\treturn t.goAwayReason, t.goAwayDebugMessage\n}\n\nfunc (t *http2Client) handleWindowUpdate(f *http2.WindowUpdateFrame) {\n\tt.controlBuf.put(&incomingWindowUpdate{\n\t\tstreamID:  f.Header().StreamID,\n\t\tincrement: f.Increment,\n\t})\n}\n\n// operateHeaders takes action on the decoded headers.\nfunc (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {\n\ts := t.getStream(frame)\n\tif s == nil {\n\t\treturn\n\t}\n\tendStream := frame.StreamEnded()\n\ts.bytesReceived.Store(true)\n\tinitialHeader := atomic.LoadUint32(&s.headerChanClosed) == 0\n\n\tif !initialHeader && !endStream {\n\t\t// As specified by gRPC over HTTP2, a HEADERS frame (and associated CONTINUATION frames) can only appear at the start or end of a stream. Therefore, second HEADERS frame must have EOS bit set.\n\t\tst := status.New(codes.Internal, \"a HEADERS frame cannot appear in the middle of a stream\")\n\t\tt.closeStream(s, st.Err(), true, http2.ErrCodeProtocol, st, nil, false)\n\t\treturn\n\t}\n\n\t// frame.Truncated is set to true when framer detects that the current header\n\t// list size hits MaxHeaderListSize limit.\n\tif frame.Truncated {\n\t\tse := status.New(codes.Internal, \"peer header list size exceeded limit\")\n\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeFrameSize, se, nil, endStream)\n\t\treturn\n\t}\n\n\tvar (\n\t\t// If a gRPC Response-Headers has already been received, then it means\n\t\t// that the peer is speaking gRPC and we are in gRPC mode.\n\t\tisGRPC         = !initialHeader\n\t\tmdata          = make(map[string][]string)\n\t\tcontentTypeErr = \"malformed header: missing HTTP content-type\"\n\t\tgrpcMessage    string\n\t\trecvCompress   string\n\t\thttpStatusErr  string\n\t\t// the code from the grpc-status header, if present\n\t\tgrpcStatusCode = codes.Unknown\n\t\t// headerError is set if an error is encountered while parsing the headers\n\t\theaderError string\n\t\thttpStatus  string\n\t)\n\n\tfor _, hf := range frame.Fields {\n\t\tswitch hf.Name {\n\t\tcase \"content-type\":\n\t\t\tif _, validContentType := grpcutil.ContentSubtype(hf.Value); !validContentType {\n\t\t\t\tcontentTypeErr = fmt.Sprintf(\"transport: received unexpected content-type %q\", hf.Value)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcontentTypeErr = \"\"\n\t\t\tmdata[hf.Name] = append(mdata[hf.Name], hf.Value)\n\t\t\tisGRPC = true\n\t\tcase \"grpc-encoding\":\n\t\t\trecvCompress = hf.Value\n\t\tcase \"grpc-status\":\n\t\t\tcode, err := strconv.ParseInt(hf.Value, 10, 32)\n\t\t\tif err != nil {\n\t\t\t\tse := status.New(codes.Unknown, fmt.Sprintf(\"transport: malformed grpc-status: %v\", err))\n\t\t\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tgrpcStatusCode = codes.Code(uint32(code))\n\t\tcase \"grpc-message\":\n\t\t\tgrpcMessage = decodeGrpcMessage(hf.Value)\n\t\tcase \":status\":\n\t\t\thttpStatus = hf.Value\n\t\tdefault:\n\t\t\tif isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv, err := decodeMetadataHeader(hf.Name, hf.Value)\n\t\t\tif err != nil {\n\t\t\t\theaderError = fmt.Sprintf(\"transport: malformed %s: %v\", hf.Name, err)\n\t\t\t\tlogger.Warningf(\"Failed to decode metadata header (%q, %q): %v\", hf.Name, hf.Value, err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tmdata[hf.Name] = append(mdata[hf.Name], v)\n\t\t}\n\t}\n\n\t// If a non-gRPC response is received, then evaluate the HTTP status to\n\t// process the response and close the stream.\n\t// In case http status doesn't provide any error information (status : 200),\n\t// then evalute response code to be Unknown.\n\tif !isGRPC {\n\t\tvar grpcErrorCode = codes.Internal\n\t\tif httpStatus == \"\" {\n\t\t\thttpStatusErr = \"malformed header: missing HTTP status\"\n\t\t} else {\n\t\t\t// Parse the status codes (e.g. \"200\", 404\").\n\t\t\tstatusCode, err := strconv.Atoi(httpStatus)\n\t\t\tif err != nil {\n\t\t\t\tse := status.New(grpcErrorCode, fmt.Sprintf(\"transport: malformed http-status: %v\", err))\n\t\t\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif statusCode >= 100 && statusCode < 200 {\n\t\t\t\tif endStream {\n\t\t\t\t\tse := status.New(codes.Internal, fmt.Sprintf(\n\t\t\t\t\t\t\"protocol error: informational header with status code %d must not have END_STREAM set\", statusCode))\n\t\t\t\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)\n\t\t\t\t}\n\t\t\t\t// In case of informational headers, return.\n\t\t\t\treturn\n\t\t\t}\n\t\t\thttpStatusErr = fmt.Sprintf(\n\t\t\t\t\"unexpected HTTP status code received from server: %d (%s)\",\n\t\t\t\tstatusCode,\n\t\t\t\thttp.StatusText(statusCode),\n\t\t\t)\n\t\t\tvar ok bool\n\t\t\tgrpcErrorCode, ok = HTTPStatusConvTab[statusCode]\n\t\t\tif !ok {\n\t\t\t\tgrpcErrorCode = codes.Unknown\n\t\t\t}\n\t\t}\n\t\tvar errs []string\n\t\tif httpStatusErr != \"\" {\n\t\t\terrs = append(errs, httpStatusErr)\n\t\t}\n\n\t\tif contentTypeErr != \"\" {\n\t\t\terrs = append(errs, contentTypeErr)\n\t\t}\n\n\t\tse := status.New(grpcErrorCode, strings.Join(errs, \"; \"))\n\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)\n\t\treturn\n\t}\n\n\tif headerError != \"\" {\n\t\tse := status.New(codes.Internal, headerError)\n\t\tt.closeStream(s, se.Err(), true, http2.ErrCodeProtocol, se, nil, endStream)\n\t\treturn\n\t}\n\n\t// For headers, set them in s.header and close headerChan.  For trailers or\n\t// trailers-only, closeStream will set the trailers and close headerChan as\n\t// needed.\n\tif !endStream {\n\t\t// If headerChan hasn't been closed yet (expected, given we checked it\n\t\t// above, but something else could have potentially closed the whole\n\t\t// stream).\n\t\tif atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) {\n\t\t\ts.headerValid = true\n\t\t\t// These values can be set without any synchronization because\n\t\t\t// stream goroutine will read it only after seeing a closed\n\t\t\t// headerChan which we'll close after setting this.\n\t\t\ts.recvCompress = recvCompress\n\t\t\tif len(mdata) > 0 {\n\t\t\t\ts.header = mdata\n\t\t\t}\n\t\t\tclose(s.headerChan)\n\t\t}\n\t}\n\n\tif t.statsHandler != nil {\n\t\tif !endStream {\n\t\t\tt.statsHandler.HandleRPC(s.ctx, &stats.InHeader{\n\t\t\t\tClient:      true,\n\t\t\t\tWireLength:  int(frame.Header().Length),\n\t\t\t\tHeader:      metadata.MD(mdata).Copy(),\n\t\t\t\tCompression: s.recvCompress,\n\t\t\t})\n\t\t} else {\n\t\t\tt.statsHandler.HandleRPC(s.ctx, &stats.InTrailer{\n\t\t\t\tClient:     true,\n\t\t\t\tWireLength: int(frame.Header().Length),\n\t\t\t\tTrailer:    metadata.MD(mdata).Copy(),\n\t\t\t})\n\t\t}\n\t}\n\n\tif !endStream {\n\t\treturn\n\t}\n\n\tstatus := istatus.NewWithProto(grpcStatusCode, grpcMessage, mdata[grpcStatusDetailsBinHeader])\n\n\t// If client received END_STREAM from server while stream was still active,\n\t// send RST_STREAM.\n\trstStream := s.getState() == streamActive\n\tt.closeStream(s, io.EOF, rstStream, http2.ErrCodeNo, status, mdata, true)\n}\n\n// readServerPreface reads and handles the initial settings frame from the\n// server.\nfunc (t *http2Client) readServerPreface() error {\n\tframe, err := t.framer.fr.ReadFrame()\n\tif err != nil {\n\t\treturn connectionErrorf(true, err, \"error reading server preface: %v\", err)\n\t}\n\tsf, ok := frame.(*http2.SettingsFrame)\n\tif !ok {\n\t\treturn connectionErrorf(true, nil, \"initial http2 frame from server is not a settings frame: %T\", frame)\n\t}\n\tt.handleSettings(sf, true)\n\treturn nil\n}\n\n// reader verifies the server preface and reads all subsequent data from\n// network connection.  If the server preface is not read successfully, an\n// error is pushed to errCh; otherwise errCh is closed with no error.\nfunc (t *http2Client) reader(errCh chan<- error) {\n\tvar errClose error\n\tdefer func() {\n\t\tclose(t.readerDone)\n\t\tif errClose != nil {\n\t\t\tt.Close(errClose)\n\t\t}\n\t}()\n\n\tif err := t.readServerPreface(); err != nil {\n\t\terrCh <- err\n\t\treturn\n\t}\n\tclose(errCh)\n\tif t.keepaliveEnabled {\n\t\tatomic.StoreInt64(&t.lastRead, time.Now().UnixNano())\n\t}\n\n\t// loop to keep reading incoming messages on this transport.\n\tfor {\n\t\tt.controlBuf.throttle()\n\t\tframe, err := t.framer.readFrame()\n\t\tif t.keepaliveEnabled {\n\t\t\tatomic.StoreInt64(&t.lastRead, time.Now().UnixNano())\n\t\t}\n\t\tif err != nil {\n\t\t\t// Abort an active stream if the http2.Framer returns a\n\t\t\t// http2.StreamError. This can happen only if the server's response\n\t\t\t// is malformed http2.\n\t\t\tif se, ok := err.(http2.StreamError); ok {\n\t\t\t\tt.mu.Lock()\n\t\t\t\ts := t.activeStreams[se.StreamID]\n\t\t\t\tt.mu.Unlock()\n\t\t\t\tif s != nil {\n\t\t\t\t\t// use error detail to provide better err message\n\t\t\t\t\tcode := http2ErrConvTab[se.Code]\n\t\t\t\t\terrorDetail := t.framer.errorDetail()\n\t\t\t\t\tvar msg string\n\t\t\t\t\tif errorDetail != nil {\n\t\t\t\t\t\tmsg = errorDetail.Error()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsg = \"received invalid frame\"\n\t\t\t\t\t}\n\t\t\t\t\tt.closeStream(s, status.Error(code, msg), true, http2.ErrCodeProtocol, status.New(code, msg), nil, false)\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Transport error.\n\t\t\terrClose = connectionErrorf(true, err, \"error reading from server: %v\", err)\n\t\t\treturn\n\t\t}\n\t\tswitch frame := frame.(type) {\n\t\tcase *http2.MetaHeadersFrame:\n\t\t\tt.operateHeaders(frame)\n\t\tcase *parsedDataFrame:\n\t\t\tt.handleData(frame)\n\t\t\tframe.data.Free()\n\t\tcase *http2.RSTStreamFrame:\n\t\t\tt.handleRSTStream(frame)\n\t\tcase *http2.SettingsFrame:\n\t\t\tt.handleSettings(frame, false)\n\t\tcase *http2.PingFrame:\n\t\t\tt.handlePing(frame)\n\t\tcase *http2.GoAwayFrame:\n\t\t\terrClose = t.handleGoAway(frame)\n\t\tcase *http2.WindowUpdateFrame:\n\t\t\tt.handleWindowUpdate(frame)\n\t\tdefault:\n\t\t\tif logger.V(logLevel) {\n\t\t\t\tlogger.Errorf(\"transport: http2Client.reader got unhandled frame type %v.\", frame)\n\t\t\t}\n\t\t}\n\t}\n}\n\n// keepalive running in a separate goroutine makes sure the connection is alive by sending pings.\nfunc (t *http2Client) keepalive() {\n\tvar err error\n\tdefer func() {\n\t\tclose(t.keepaliveDone)\n\t\tif err != nil {\n\t\t\tt.Close(err)\n\t\t}\n\t}()\n\tp := &ping{data: [8]byte{}}\n\t// True iff a ping has been sent, and no data has been received since then.\n\toutstandingPing := false\n\t// Amount of time remaining before which we should receive an ACK for the\n\t// last sent ping.\n\ttimeoutLeft := time.Duration(0)\n\t// Records the last value of t.lastRead before we go block on the timer.\n\t// This is required to check for read activity since then.\n\tprevNano := time.Now().UnixNano()\n\ttimer := time.NewTimer(t.kp.Time)\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\tlastRead := atomic.LoadInt64(&t.lastRead)\n\t\t\tif lastRead > prevNano {\n\t\t\t\t// There has been read activity since the last time we were here.\n\t\t\t\toutstandingPing = false\n\t\t\t\t// Next timer should fire at kp.Time seconds from lastRead time.\n\t\t\t\ttimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))\n\t\t\t\tprevNano = lastRead\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif outstandingPing && timeoutLeft <= 0 {\n\t\t\t\terr = connectionErrorf(true, nil, \"keepalive ping failed to receive ACK within timeout\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\tt.mu.Lock()\n\t\t\tif t.state == closing {\n\t\t\t\t// If the transport is closing, we should exit from the\n\t\t\t\t// keepalive goroutine here. If not, we could have a race\n\t\t\t\t// between the call to Signal() from Close() and the call to\n\t\t\t\t// Wait() here, whereby the keepalive goroutine ends up\n\t\t\t\t// blocking on the condition variable which will never be\n\t\t\t\t// signalled again.\n\t\t\t\tt.mu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream {\n\t\t\t\t// If a ping was sent out previously (because there were active\n\t\t\t\t// streams at that point) which wasn't acked and its timeout\n\t\t\t\t// hadn't fired, but we got here and are about to go dormant,\n\t\t\t\t// we should make sure that we unconditionally send a ping once\n\t\t\t\t// we awaken.\n\t\t\t\toutstandingPing = false\n\t\t\t\tt.kpDormant = true\n\t\t\t\tt.kpDormancyCond.Wait()\n\t\t\t}\n\t\t\tt.kpDormant = false\n\t\t\tt.mu.Unlock()\n\n\t\t\t// We get here either because we were dormant and a new stream was\n\t\t\t// created which unblocked the Wait() call, or because the\n\t\t\t// keepalive timer expired. In both cases, we need to send a ping.\n\t\t\tif !outstandingPing {\n\t\t\t\tif channelz.IsOn() {\n\t\t\t\t\tt.channelz.SocketMetrics.KeepAlivesSent.Add(1)\n\t\t\t\t}\n\t\t\t\tt.controlBuf.put(p)\n\t\t\t\ttimeoutLeft = t.kp.Timeout\n\t\t\t\toutstandingPing = true\n\t\t\t}\n\t\t\t// The amount of time to sleep here is the minimum of kp.Time and\n\t\t\t// timeoutLeft. This will ensure that we wait only for kp.Time\n\t\t\t// before sending out the next ping (for cases where the ping is\n\t\t\t// acked).\n\t\t\tsleepDuration := min(t.kp.Time, timeoutLeft)\n\t\t\ttimeoutLeft -= sleepDuration\n\t\t\ttimer.Reset(sleepDuration)\n\t\tcase <-t.ctx.Done():\n\t\t\tif !timer.Stop() {\n\t\t\t\t<-timer.C\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (t *http2Client) Error() <-chan struct{} {\n\treturn t.ctx.Done()\n}\n\nfunc (t *http2Client) GoAway() <-chan struct{} {\n\treturn t.goAway\n}\n\nfunc (t *http2Client) socketMetrics() *channelz.EphemeralSocketMetrics {\n\treturn &channelz.EphemeralSocketMetrics{\n\t\tLocalFlowControlWindow:  int64(t.fc.getSize()),\n\t\tRemoteFlowControlWindow: t.getOutFlowWindow(),\n\t}\n}\n\nfunc (t *http2Client) incrMsgSent() {\n\tif channelz.IsOn() {\n\t\tt.channelz.SocketMetrics.MessagesSent.Add(1)\n\t\tt.channelz.SocketMetrics.LastMessageSentTimestamp.Store(time.Now().UnixNano())\n\t}\n}\n\nfunc (t *http2Client) incrMsgRecv() {\n\tif channelz.IsOn() {\n\t\tt.channelz.SocketMetrics.MessagesReceived.Add(1)\n\t\tt.channelz.SocketMetrics.LastMessageReceivedTimestamp.Store(time.Now().UnixNano())\n\t}\n}\n\nfunc (t *http2Client) getOutFlowWindow() int64 {\n\tresp := make(chan uint32, 1)\n\ttimer := time.NewTimer(time.Second)\n\tdefer timer.Stop()\n\tt.controlBuf.put(&outFlowControlSizeRequest{resp})\n\tselect {\n\tcase sz := <-resp:\n\t\treturn int64(sz)\n\tcase <-t.ctxDone:\n\t\treturn -1\n\tcase <-timer.C:\n\t\treturn -2\n\t}\n}\n\nfunc (t *http2Client) stateForTesting() transportState {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\treturn t.state\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/http2_server.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\trand \"math/rand/v2\"\n\t\"net\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"golang.org/x/net/http2\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"google.golang.org/protobuf/proto\"\n\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/grpclog\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\t\"google.golang.org/grpc/internal/pretty\"\n\tistatus \"google.golang.org/grpc/internal/status\"\n\t\"google.golang.org/grpc/internal/syscall\"\n\t\"google.golang.org/grpc/mem\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/grpc/tap\"\n)\n\nvar (\n\t// ErrIllegalHeaderWrite indicates that setting header is illegal because of\n\t// the stream's state.\n\tErrIllegalHeaderWrite = status.Error(codes.Internal, \"transport: SendHeader called multiple times\")\n\t// ErrHeaderListSizeLimitViolation indicates that the header list size is larger\n\t// than the limit set by peer.\n\tErrHeaderListSizeLimitViolation = status.Error(codes.Internal, \"transport: trying to send header list size larger than the limit set by peer\")\n)\n\n// serverConnectionCounter counts the number of connections a server has seen\n// (equal to the number of http2Servers created). Must be accessed atomically.\nvar serverConnectionCounter uint64\n\n// http2Server implements the ServerTransport interface with HTTP2.\ntype http2Server struct {\n\tlastRead        int64 // Keep this field 64-bit aligned. Accessed atomically.\n\tdone            chan struct{}\n\tconn            net.Conn\n\tloopy           *loopyWriter\n\treaderDone      chan struct{} // sync point to enable testing.\n\tloopyWriterDone chan struct{}\n\tpeer            peer.Peer\n\tinTapHandle     tap.ServerInHandle\n\tframer          *framer\n\t// The max number of concurrent streams.\n\tmaxStreams uint32\n\t// controlBuf delivers all the control related tasks (e.g., window\n\t// updates, reset streams, and various settings) to the controller.\n\tcontrolBuf *controlBuffer\n\tfc         *trInFlow\n\tstats      stats.Handler\n\t// Keepalive and max-age parameters for the server.\n\tkp keepalive.ServerParameters\n\t// Keepalive enforcement policy.\n\tkep keepalive.EnforcementPolicy\n\t// The time instance last ping was received.\n\tlastPingAt time.Time\n\t// Number of times the client has violated keepalive ping policy so far.\n\tpingStrikes uint8\n\t// Flag to signify that number of ping strikes should be reset to 0.\n\t// This is set whenever data or header frames are sent.\n\t// 1 means yes.\n\tresetPingStrikes      uint32 // Accessed atomically.\n\tinitialWindowSize     int32\n\tbdpEst                *bdpEstimator\n\tmaxSendHeaderListSize *uint32\n\n\tmu sync.Mutex // guard the following\n\n\t// drainEvent is initialized when Drain() is called the first time. After\n\t// which the server writes out the first GoAway(with ID 2^31-1) frame. Then\n\t// an independent goroutine will be launched to later send the second\n\t// GoAway. During this time we don't want to write another first GoAway(with\n\t// ID 2^31 -1) frame. Thus call to Drain() will be a no-op if drainEvent is\n\t// already initialized since draining is already underway.\n\tdrainEvent    *grpcsync.Event\n\tstate         transportState\n\tactiveStreams map[uint32]*ServerStream\n\t// idle is the time instant when the connection went idle.\n\t// This is either the beginning of the connection or when the number of\n\t// RPCs go down to 0.\n\t// When the connection is busy, this value is set to 0.\n\tidle time.Time\n\n\t// Fields below are for channelz metric collection.\n\tchannelz   *channelz.Socket\n\tbufferPool mem.BufferPool\n\n\tconnectionID uint64\n\n\t// maxStreamMu guards the maximum stream ID\n\t// This lock may not be taken if mu is already held.\n\tmaxStreamMu sync.Mutex\n\tmaxStreamID uint32 // max stream ID ever seen\n\n\tlogger *grpclog.PrefixLogger\n\t// setResetPingStrikes is stored as a closure instead of making this a\n\t// method on http2Server to avoid a heap allocation when converting a method\n\t// to a closure for passing to frames objects.\n\tsetResetPingStrikes func()\n}\n\n// NewServerTransport creates a http2 transport with conn and configuration\n// options from config.\n//\n// It returns a non-nil transport and a nil error on success. On failure, it\n// returns a nil transport and a non-nil error. For a special case where the\n// underlying conn gets closed before the client preface could be read, it\n// returns a nil transport and a nil error.\nfunc NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) {\n\tvar authInfo credentials.AuthInfo\n\trawConn := conn\n\tif config.Credentials != nil {\n\t\tvar err error\n\t\tconn, authInfo, err = config.Credentials.ServerHandshake(rawConn)\n\t\tif err != nil {\n\t\t\t// ErrConnDispatched means that the connection was dispatched away\n\t\t\t// from gRPC; those connections should be left open. io.EOF means\n\t\t\t// the connection was closed before handshaking completed, which can\n\t\t\t// happen naturally from probers. Return these errors directly.\n\t\t\tif err == credentials.ErrConnDispatched || err == io.EOF {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn nil, connectionErrorf(false, err, \"ServerHandshake(%q) failed: %v\", rawConn.RemoteAddr(), err)\n\t\t}\n\t}\n\twriteBufSize := config.WriteBufferSize\n\treadBufSize := config.ReadBufferSize\n\tmaxHeaderListSize := defaultServerMaxHeaderListSize\n\tif config.MaxHeaderListSize != nil {\n\t\tmaxHeaderListSize = *config.MaxHeaderListSize\n\t}\n\tframer := newFramer(conn, writeBufSize, readBufSize, config.SharedWriteBuffer, maxHeaderListSize, config.BufferPool)\n\t// Send initial settings as connection preface to client.\n\tisettings := []http2.Setting{{\n\t\tID:  http2.SettingMaxFrameSize,\n\t\tVal: http2MaxFrameLen,\n\t}}\n\tif config.MaxStreams != math.MaxUint32 {\n\t\tisettings = append(isettings, http2.Setting{\n\t\t\tID:  http2.SettingMaxConcurrentStreams,\n\t\t\tVal: config.MaxStreams,\n\t\t})\n\t}\n\tiwz := int32(initialWindowSize)\n\tif config.InitialWindowSize >= defaultWindowSize {\n\t\tiwz = config.InitialWindowSize\n\t}\n\ticwz := int32(initialWindowSize)\n\tif config.InitialConnWindowSize >= defaultWindowSize {\n\t\ticwz = config.InitialConnWindowSize\n\t}\n\tif iwz != defaultWindowSize {\n\t\tisettings = append(isettings, http2.Setting{\n\t\t\tID:  http2.SettingInitialWindowSize,\n\t\t\tVal: uint32(iwz)})\n\t}\n\tif config.MaxHeaderListSize != nil {\n\t\tisettings = append(isettings, http2.Setting{\n\t\t\tID:  http2.SettingMaxHeaderListSize,\n\t\t\tVal: *config.MaxHeaderListSize,\n\t\t})\n\t}\n\tif config.HeaderTableSize != nil {\n\t\tisettings = append(isettings, http2.Setting{\n\t\t\tID:  http2.SettingHeaderTableSize,\n\t\t\tVal: *config.HeaderTableSize,\n\t\t})\n\t}\n\tif err := framer.fr.WriteSettings(isettings...); err != nil {\n\t\treturn nil, connectionErrorf(false, err, \"transport: %v\", err)\n\t}\n\t// Adjust the connection flow control window if needed.\n\tif delta := uint32(icwz - defaultWindowSize); delta > 0 {\n\t\tif err := framer.fr.WriteWindowUpdate(0, delta); err != nil {\n\t\t\treturn nil, connectionErrorf(false, err, \"transport: %v\", err)\n\t\t}\n\t}\n\tkp := config.KeepaliveParams\n\tif kp.MaxConnectionIdle == 0 {\n\t\tkp.MaxConnectionIdle = defaultMaxConnectionIdle\n\t}\n\tif kp.MaxConnectionAge == 0 {\n\t\tkp.MaxConnectionAge = defaultMaxConnectionAge\n\t}\n\t// Add a jitter to MaxConnectionAge.\n\tkp.MaxConnectionAge += getJitter(kp.MaxConnectionAge)\n\tif kp.MaxConnectionAgeGrace == 0 {\n\t\tkp.MaxConnectionAgeGrace = defaultMaxConnectionAgeGrace\n\t}\n\tif kp.Time == 0 {\n\t\tkp.Time = defaultServerKeepaliveTime\n\t}\n\tif kp.Timeout == 0 {\n\t\tkp.Timeout = defaultServerKeepaliveTimeout\n\t}\n\tif kp.Time != infinity {\n\t\tif err = syscall.SetTCPUserTimeout(rawConn, kp.Timeout); err != nil {\n\t\t\treturn nil, connectionErrorf(false, err, \"transport: failed to set TCP_USER_TIMEOUT: %v\", err)\n\t\t}\n\t}\n\tkep := config.KeepalivePolicy\n\tif kep.MinTime == 0 {\n\t\tkep.MinTime = defaultKeepalivePolicyMinTime\n\t}\n\n\tdone := make(chan struct{})\n\tpeer := peer.Peer{\n\t\tAddr:      conn.RemoteAddr(),\n\t\tLocalAddr: conn.LocalAddr(),\n\t\tAuthInfo:  authInfo,\n\t}\n\tt := &http2Server{\n\t\tdone:              done,\n\t\tconn:              conn,\n\t\tpeer:              peer,\n\t\tframer:            framer,\n\t\treaderDone:        make(chan struct{}),\n\t\tloopyWriterDone:   make(chan struct{}),\n\t\tmaxStreams:        config.MaxStreams,\n\t\tinTapHandle:       config.InTapHandle,\n\t\tfc:                &trInFlow{limit: uint32(icwz)},\n\t\tstate:             reachable,\n\t\tactiveStreams:     make(map[uint32]*ServerStream),\n\t\tstats:             config.StatsHandler,\n\t\tkp:                kp,\n\t\tidle:              time.Now(),\n\t\tkep:               kep,\n\t\tinitialWindowSize: iwz,\n\t\tbufferPool:        config.BufferPool,\n\t}\n\tt.setResetPingStrikes = func() {\n\t\tatomic.StoreUint32(&t.resetPingStrikes, 1)\n\t}\n\tvar czSecurity credentials.ChannelzSecurityValue\n\tif au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok {\n\t\tczSecurity = au.GetSecurityValue()\n\t}\n\tt.channelz = channelz.RegisterSocket(\n\t\t&channelz.Socket{\n\t\t\tSocketType:       channelz.SocketTypeNormal,\n\t\t\tParent:           config.ChannelzParent,\n\t\t\tSocketMetrics:    channelz.SocketMetrics{},\n\t\t\tEphemeralMetrics: t.socketMetrics,\n\t\t\tLocalAddr:        t.peer.LocalAddr,\n\t\t\tRemoteAddr:       t.peer.Addr,\n\t\t\tSocketOptions:    channelz.GetSocketOption(t.conn),\n\t\t\tSecurity:         czSecurity,\n\t\t},\n\t)\n\tt.logger = prefixLoggerForServerTransport(t)\n\n\tt.controlBuf = newControlBuffer(t.done)\n\tif !config.StaticWindowSize {\n\t\tt.bdpEst = &bdpEstimator{\n\t\t\tbdp:               initialWindowSize,\n\t\t\tupdateFlowControl: t.updateFlowControl,\n\t\t}\n\t}\n\n\tt.connectionID = atomic.AddUint64(&serverConnectionCounter, 1)\n\tt.framer.writer.Flush()\n\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tt.Close(err)\n\t\t}\n\t}()\n\n\t// Check the validity of client preface.\n\tpreface := make([]byte, len(clientPreface))\n\tif _, err := io.ReadFull(t.conn, preface); err != nil {\n\t\t// In deployments where a gRPC server runs behind a cloud load balancer\n\t\t// which performs regular TCP level health checks, the connection is\n\t\t// closed immediately by the latter.  Returning io.EOF here allows the\n\t\t// grpc server implementation to recognize this scenario and suppress\n\t\t// logging to reduce spam.\n\t\tif err == io.EOF {\n\t\t\treturn nil, io.EOF\n\t\t}\n\t\treturn nil, connectionErrorf(false, err, \"transport: http2Server.HandleStreams failed to receive the preface from client: %v\", err)\n\t}\n\tif !bytes.Equal(preface, clientPreface) {\n\t\treturn nil, connectionErrorf(false, nil, \"transport: http2Server.HandleStreams received bogus greeting from client: %q\", preface)\n\t}\n\n\tframe, err := t.framer.fr.ReadFrame()\n\tif err == io.EOF || err == io.ErrUnexpectedEOF {\n\t\treturn nil, err\n\t}\n\tif err != nil {\n\t\treturn nil, connectionErrorf(false, err, \"transport: http2Server.HandleStreams failed to read initial settings frame: %v\", err)\n\t}\n\tatomic.StoreInt64(&t.lastRead, time.Now().UnixNano())\n\tsf, ok := frame.(*http2.SettingsFrame)\n\tif !ok {\n\t\treturn nil, connectionErrorf(false, nil, \"transport: http2Server.HandleStreams saw invalid preface type %T from client\", frame)\n\t}\n\tt.handleSettings(sf)\n\n\tgo func() {\n\t\tt.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler, t.bufferPool)\n\t\terr := t.loopy.run()\n\t\tclose(t.loopyWriterDone)\n\t\tif !isIOError(err) {\n\t\t\t// Close the connection if a non-I/O error occurs (for I/O errors\n\t\t\t// the reader will also encounter the error and close).  Wait 1\n\t\t\t// second before closing the connection, or when the reader is done\n\t\t\t// (i.e. the client already closed the connection or a connection\n\t\t\t// error occurred).  This avoids the potential problem where there\n\t\t\t// is unread data on the receive side of the connection, which, if\n\t\t\t// closed, would lead to a TCP RST instead of FIN, and the client\n\t\t\t// encountering errors.  For more info:\n\t\t\t// https://github.com/grpc/grpc-go/issues/5358\n\t\t\ttimer := time.NewTimer(time.Second)\n\t\t\tdefer timer.Stop()\n\t\t\tselect {\n\t\t\tcase <-t.readerDone:\n\t\t\tcase <-timer.C:\n\t\t\t}\n\t\t\tt.conn.Close()\n\t\t}\n\t}()\n\tgo t.keepalive()\n\treturn t, nil\n}\n\n// operateHeaders takes action on the decoded headers. Returns an error if fatal\n// error encountered and transport needs to close, otherwise returns nil.\nfunc (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeadersFrame, handle func(*ServerStream)) error {\n\t// Acquire max stream ID lock for entire duration\n\tt.maxStreamMu.Lock()\n\tdefer t.maxStreamMu.Unlock()\n\n\tstreamID := frame.Header().StreamID\n\n\t// frame.Truncated is set to true when framer detects that the current header\n\t// list size hits MaxHeaderListSize limit.\n\tif frame.Truncated {\n\t\tt.controlBuf.put(&cleanupStream{\n\t\t\tstreamID: streamID,\n\t\t\trst:      true,\n\t\t\trstCode:  http2.ErrCodeFrameSize,\n\t\t\tonWrite:  func() {},\n\t\t})\n\t\treturn nil\n\t}\n\n\tif streamID%2 != 1 || streamID <= t.maxStreamID {\n\t\t// illegal gRPC stream id.\n\t\treturn fmt.Errorf(\"received an illegal stream id: %v. headers frame: %+v\", streamID, frame)\n\t}\n\tt.maxStreamID = streamID\n\n\ts := &ServerStream{\n\t\tStream: Stream{\n\t\t\tid: streamID,\n\t\t\tfc: inFlow{limit: uint32(t.initialWindowSize)},\n\t\t},\n\t\tst:               t,\n\t\theaderWireLength: int(frame.Header().Length),\n\t}\n\ts.Stream.buf.init()\n\tvar (\n\t\t// if false, content-type was missing or invalid\n\t\tisGRPC      = false\n\t\tcontentType = \"\"\n\t\tmdata       = make(metadata.MD, len(frame.Fields))\n\t\thttpMethod  string\n\t\t// these are set if an error is encountered while parsing the headers\n\t\tprotocolError bool\n\t\theaderError   *status.Status\n\n\t\ttimeoutSet bool\n\t\ttimeout    time.Duration\n\t)\n\n\tfor _, hf := range frame.Fields {\n\t\tswitch hf.Name {\n\t\tcase \"content-type\":\n\t\t\tcontentSubtype, validContentType := grpcutil.ContentSubtype(hf.Value)\n\t\t\tif !validContentType {\n\t\t\t\tcontentType = hf.Value\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tmdata[hf.Name] = append(mdata[hf.Name], hf.Value)\n\t\t\ts.contentSubtype = contentSubtype\n\t\t\tisGRPC = true\n\n\t\tcase \"grpc-accept-encoding\":\n\t\t\tmdata[hf.Name] = append(mdata[hf.Name], hf.Value)\n\t\t\tif hf.Value == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcompressors := hf.Value\n\t\t\tif s.clientAdvertisedCompressors != \"\" {\n\t\t\t\tcompressors = s.clientAdvertisedCompressors + \",\" + compressors\n\t\t\t}\n\t\t\ts.clientAdvertisedCompressors = compressors\n\t\tcase \"grpc-encoding\":\n\t\t\ts.recvCompress = hf.Value\n\t\tcase \":method\":\n\t\t\thttpMethod = hf.Value\n\t\tcase \":path\":\n\t\t\ts.method = hf.Value\n\t\tcase \"grpc-timeout\":\n\t\t\ttimeoutSet = true\n\t\t\tvar err error\n\t\t\tif timeout, err = decodeTimeout(hf.Value); err != nil {\n\t\t\t\theaderError = status.Newf(codes.Internal, \"malformed grpc-timeout: %v\", err)\n\t\t\t}\n\t\t// \"Transports must consider requests containing the Connection header\n\t\t// as malformed.\" - A41\n\t\tcase \"connection\":\n\t\t\tif t.logger.V(logLevel) {\n\t\t\t\tt.logger.Infof(\"Received a HEADERS frame with a :connection header which makes the request malformed, as per the HTTP/2 spec\")\n\t\t\t}\n\t\t\tprotocolError = true\n\t\tdefault:\n\t\t\tif isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tv, err := decodeMetadataHeader(hf.Name, hf.Value)\n\t\t\tif err != nil {\n\t\t\t\theaderError = status.Newf(codes.Internal, \"malformed binary metadata %q in header %q: %v\", hf.Value, hf.Name, err)\n\t\t\t\tt.logger.Warningf(\"Failed to decode metadata header (%q, %q): %v\", hf.Name, hf.Value, err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tmdata[hf.Name] = append(mdata[hf.Name], v)\n\t\t}\n\t}\n\n\t// \"If multiple Host headers or multiple :authority headers are present, the\n\t// request must be rejected with an HTTP status code 400 as required by Host\n\t// validation in RFC 7230 §5.4, gRPC status code INTERNAL, or RST_STREAM\n\t// with HTTP/2 error code PROTOCOL_ERROR.\" - A41. Since this is a HTTP/2\n\t// error, this takes precedence over a client not speaking gRPC.\n\tif len(mdata[\":authority\"]) > 1 || len(mdata[\"host\"]) > 1 {\n\t\terrMsg := fmt.Sprintf(\"num values of :authority: %v, num values of host: %v, both must only have 1 value as per HTTP/2 spec\", len(mdata[\":authority\"]), len(mdata[\"host\"]))\n\t\tif t.logger.V(logLevel) {\n\t\t\tt.logger.Infof(\"Aborting the stream early: %v\", errMsg)\n\t\t}\n\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\thttpStatus:     http.StatusBadRequest,\n\t\t\tstreamID:       streamID,\n\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\tstatus:         status.New(codes.Internal, errMsg),\n\t\t\trst:            !frame.StreamEnded(),\n\t\t})\n\t\treturn nil\n\t}\n\n\tif protocolError {\n\t\tt.controlBuf.put(&cleanupStream{\n\t\t\tstreamID: streamID,\n\t\t\trst:      true,\n\t\t\trstCode:  http2.ErrCodeProtocol,\n\t\t\tonWrite:  func() {},\n\t\t})\n\t\treturn nil\n\t}\n\tif !isGRPC {\n\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\thttpStatus:     http.StatusUnsupportedMediaType,\n\t\t\tstreamID:       streamID,\n\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\tstatus:         status.Newf(codes.InvalidArgument, \"invalid gRPC request content-type %q\", contentType),\n\t\t\trst:            !frame.StreamEnded(),\n\t\t})\n\t\treturn nil\n\t}\n\tif headerError != nil {\n\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\thttpStatus:     http.StatusBadRequest,\n\t\t\tstreamID:       streamID,\n\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\tstatus:         headerError,\n\t\t\trst:            !frame.StreamEnded(),\n\t\t})\n\t\treturn nil\n\t}\n\n\t// \"If :authority is missing, Host must be renamed to :authority.\" - A41\n\tif len(mdata[\":authority\"]) == 0 {\n\t\t// No-op if host isn't present, no eventual :authority header is a valid\n\t\t// RPC.\n\t\tif host, ok := mdata[\"host\"]; ok {\n\t\t\tmdata[\":authority\"] = host\n\t\t\tdelete(mdata, \"host\")\n\t\t}\n\t} else {\n\t\t// \"If :authority is present, Host must be discarded\" - A41\n\t\tdelete(mdata, \"host\")\n\t}\n\n\tif frame.StreamEnded() {\n\t\t// s is just created by the caller. No lock needed.\n\t\ts.state = streamReadDone\n\t}\n\tif timeoutSet {\n\t\ts.ctx, s.cancel = context.WithTimeout(ctx, timeout)\n\t} else {\n\t\ts.ctx, s.cancel = context.WithCancel(ctx)\n\t}\n\n\t// Attach the received metadata to the context.\n\tif len(mdata) > 0 {\n\t\ts.ctx = metadata.NewIncomingContext(s.ctx, mdata)\n\t}\n\tt.mu.Lock()\n\tif t.state != reachable {\n\t\tt.mu.Unlock()\n\t\ts.cancel()\n\t\treturn nil\n\t}\n\tif uint32(len(t.activeStreams)) >= t.maxStreams {\n\t\tt.mu.Unlock()\n\t\tt.controlBuf.put(&cleanupStream{\n\t\t\tstreamID: streamID,\n\t\t\trst:      true,\n\t\t\trstCode:  http2.ErrCodeRefusedStream,\n\t\t\tonWrite:  func() {},\n\t\t})\n\t\ts.cancel()\n\t\treturn nil\n\t}\n\tif httpMethod != http.MethodPost {\n\t\tt.mu.Unlock()\n\t\terrMsg := fmt.Sprintf(\"Received a HEADERS frame with :method %q which should be POST\", httpMethod)\n\t\tif t.logger.V(logLevel) {\n\t\t\tt.logger.Infof(\"Aborting the stream early: %v\", errMsg)\n\t\t}\n\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\thttpStatus:     http.StatusMethodNotAllowed,\n\t\t\tstreamID:       streamID,\n\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\tstatus:         status.New(codes.Internal, errMsg),\n\t\t\trst:            !frame.StreamEnded(),\n\t\t})\n\t\ts.cancel()\n\t\treturn nil\n\t}\n\tif t.inTapHandle != nil {\n\t\tvar err error\n\t\tif s.ctx, err = t.inTapHandle(s.ctx, &tap.Info{FullMethodName: s.method, Header: mdata}); err != nil {\n\t\t\tt.mu.Unlock()\n\t\t\tif t.logger.V(logLevel) {\n\t\t\t\tt.logger.Infof(\"Aborting the stream early due to InTapHandle failure: %v\", err)\n\t\t\t}\n\t\t\tstat, ok := status.FromError(err)\n\t\t\tif !ok {\n\t\t\t\tstat = status.New(codes.PermissionDenied, err.Error())\n\t\t\t}\n\t\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\t\thttpStatus:     http.StatusOK,\n\t\t\t\tstreamID:       s.id,\n\t\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\t\tstatus:         stat,\n\t\t\t\trst:            !frame.StreamEnded(),\n\t\t\t})\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tif s.ctx.Err() != nil {\n\t\tt.mu.Unlock()\n\t\t// Early abort in case the timeout was zero or so low it already fired.\n\t\tt.controlBuf.put(&earlyAbortStream{\n\t\t\thttpStatus:     http.StatusOK,\n\t\t\tstreamID:       s.id,\n\t\t\tcontentSubtype: s.contentSubtype,\n\t\t\tstatus:         status.New(codes.DeadlineExceeded, context.DeadlineExceeded.Error()),\n\t\t\trst:            !frame.StreamEnded(),\n\t\t})\n\t\treturn nil\n\t}\n\n\tt.activeStreams[streamID] = s\n\tif len(t.activeStreams) == 1 {\n\t\tt.idle = time.Time{}\n\t}\n\n\t// Start a timer to close the stream on reaching the deadline.\n\tif timeoutSet {\n\t\t// We need to wait for s.cancel to be updated before calling\n\t\t// t.closeStream to avoid data races.\n\t\tcancelUpdated := make(chan struct{})\n\t\ttimer := internal.TimeAfterFunc(timeout, func() {\n\t\t\t<-cancelUpdated\n\t\t\tt.closeStream(s, true, http2.ErrCodeCancel, false)\n\t\t})\n\t\toldCancel := s.cancel\n\t\ts.cancel = func() {\n\t\t\toldCancel()\n\t\t\ttimer.Stop()\n\t\t}\n\t\tclose(cancelUpdated)\n\t}\n\tt.mu.Unlock()\n\tif channelz.IsOn() {\n\t\tt.channelz.SocketMetrics.StreamsStarted.Add(1)\n\t\tt.channelz.SocketMetrics.LastRemoteStreamCreatedTimestamp.Store(time.Now().UnixNano())\n\t}\n\ts.readRequester = s\n\ts.ctxDone = s.ctx.Done()\n\ts.Stream.wq.init(defaultWriteQuota, s.ctxDone)\n\ts.trReader = transportReader{\n\t\treader: recvBufferReader{\n\t\t\tctx:     s.ctx,\n\t\t\tctxDone: s.ctxDone,\n\t\t\trecv:    &s.buf,\n\t\t},\n\t\twindowHandler: s,\n\t}\n\t// Register the stream with loopy.\n\tt.controlBuf.put(&registerStream{\n\t\tstreamID: s.id,\n\t\twq:       &s.wq,\n\t})\n\thandle(s)\n\treturn nil\n}\n\n// HandleStreams receives incoming streams using the given handler. This is\n// typically run in a separate goroutine.\n// traceCtx attaches trace to ctx and returns the new context.\nfunc (t *http2Server) HandleStreams(ctx context.Context, handle func(*ServerStream)) {\n\tdefer func() {\n\t\tclose(t.readerDone)\n\t\t<-t.loopyWriterDone\n\t}()\n\tfor {\n\t\tt.controlBuf.throttle()\n\t\tframe, err := t.framer.readFrame()\n\t\tatomic.StoreInt64(&t.lastRead, time.Now().UnixNano())\n\t\tif err != nil {\n\t\t\tif se, ok := err.(http2.StreamError); ok {\n\t\t\t\tif t.logger.V(logLevel) {\n\t\t\t\t\tt.logger.Warningf(\"Encountered http2.StreamError: %v\", se)\n\t\t\t\t}\n\t\t\t\tt.mu.Lock()\n\t\t\t\ts := t.activeStreams[se.StreamID]\n\t\t\t\tt.mu.Unlock()\n\t\t\t\tif s != nil {\n\t\t\t\t\tt.closeStream(s, true, se.Code, false)\n\t\t\t\t} else {\n\t\t\t\t\tt.controlBuf.put(&cleanupStream{\n\t\t\t\t\t\tstreamID: se.StreamID,\n\t\t\t\t\t\trst:      true,\n\t\t\t\t\t\trstCode:  se.Code,\n\t\t\t\t\t\tonWrite:  func() {},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tt.Close(err)\n\t\t\treturn\n\t\t}\n\t\tswitch frame := frame.(type) {\n\t\tcase *http2.MetaHeadersFrame:\n\t\t\tif err := t.operateHeaders(ctx, frame, handle); err != nil {\n\t\t\t\t// Any error processing client headers, e.g. invalid stream ID,\n\t\t\t\t// is considered a protocol violation.\n\t\t\t\tt.controlBuf.put(&goAway{\n\t\t\t\t\tcode:      http2.ErrCodeProtocol,\n\t\t\t\t\tdebugData: []byte(err.Error()),\n\t\t\t\t\tcloseConn: err,\n\t\t\t\t})\n\t\t\t\tcontinue\n\t\t\t}\n\t\tcase *parsedDataFrame:\n\t\t\tt.handleData(frame)\n\t\t\tframe.data.Free()\n\t\tcase *http2.RSTStreamFrame:\n\t\t\tt.handleRSTStream(frame)\n\t\tcase *http2.SettingsFrame:\n\t\t\tt.handleSettings(frame)\n\t\tcase *http2.PingFrame:\n\t\t\tt.handlePing(frame)\n\t\tcase *http2.WindowUpdateFrame:\n\t\t\tt.handleWindowUpdate(frame)\n\t\tcase *http2.GoAwayFrame:\n\t\t\t// TODO: Handle GoAway from the client appropriately.\n\t\tdefault:\n\t\t\tif t.logger.V(logLevel) {\n\t\t\t\tt.logger.Infof(\"Received unsupported frame type %T\", frame)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (t *http2Server) getStream(f http2.Frame) (*ServerStream, bool) {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\tif t.activeStreams == nil {\n\t\t// The transport is closing.\n\t\treturn nil, false\n\t}\n\ts, ok := t.activeStreams[f.Header().StreamID]\n\tif !ok {\n\t\t// The stream is already done.\n\t\treturn nil, false\n\t}\n\treturn s, true\n}\n\n// adjustWindow sends out extra window update over the initial window size\n// of stream if the application is requesting data larger in size than\n// the window.\nfunc (t *http2Server) adjustWindow(s *ServerStream, n uint32) {\n\tif w := s.fc.maybeAdjust(n); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})\n\t}\n\n}\n\n// updateWindow adjusts the inbound quota for the stream and the transport.\n// Window updates will deliver to the controller for sending when\n// the cumulative quota exceeds the corresponding threshold.\nfunc (t *http2Server) updateWindow(s *ServerStream, n uint32) {\n\tif w := s.fc.onRead(n); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{streamID: s.id,\n\t\t\tincrement: w,\n\t\t})\n\t}\n}\n\n// updateFlowControl updates the incoming flow control windows\n// for the transport and the stream based on the current bdp\n// estimation.\nfunc (t *http2Server) updateFlowControl(n uint32) {\n\tt.mu.Lock()\n\tfor _, s := range t.activeStreams {\n\t\ts.fc.newLimit(n)\n\t}\n\tt.initialWindowSize = int32(n)\n\tt.mu.Unlock()\n\tt.controlBuf.put(&outgoingWindowUpdate{\n\t\tstreamID:  0,\n\t\tincrement: t.fc.newLimit(n),\n\t})\n\tt.controlBuf.put(&outgoingSettings{\n\t\tss: []http2.Setting{\n\t\t\t{\n\t\t\t\tID:  http2.SettingInitialWindowSize,\n\t\t\t\tVal: n,\n\t\t\t},\n\t\t},\n\t})\n\n}\n\nfunc (t *http2Server) handleData(f *parsedDataFrame) {\n\tsize := f.Header().Length\n\tvar sendBDPPing bool\n\tif t.bdpEst != nil {\n\t\tsendBDPPing = t.bdpEst.add(size)\n\t}\n\t// Decouple connection's flow control from application's read.\n\t// An update on connection's flow control should not depend on\n\t// whether user application has read the data or not. Such a\n\t// restriction is already imposed on the stream's flow control,\n\t// and therefore the sender will be blocked anyways.\n\t// Decoupling the connection flow control will prevent other\n\t// active(fast) streams from starving in presence of slow or\n\t// inactive streams.\n\tif w := t.fc.onData(size); w > 0 {\n\t\tt.controlBuf.put(&outgoingWindowUpdate{\n\t\t\tstreamID:  0,\n\t\t\tincrement: w,\n\t\t})\n\t}\n\tif sendBDPPing {\n\t\t// Avoid excessive ping detection (e.g. in an L7 proxy)\n\t\t// by sending a window update prior to the BDP ping.\n\t\tif w := t.fc.reset(); w > 0 {\n\t\t\tt.controlBuf.put(&outgoingWindowUpdate{\n\t\t\t\tstreamID:  0,\n\t\t\t\tincrement: w,\n\t\t\t})\n\t\t}\n\t\tt.controlBuf.put(bdpPing)\n\t}\n\t// Select the right stream to dispatch.\n\ts, ok := t.getStream(f)\n\tif !ok {\n\t\treturn\n\t}\n\tif s.getState() == streamReadDone {\n\t\tt.closeStream(s, true, http2.ErrCodeStreamClosed, false)\n\t\treturn\n\t}\n\tif size > 0 {\n\t\tif err := s.fc.onData(size); err != nil {\n\t\t\tt.closeStream(s, true, http2.ErrCodeFlowControl, false)\n\t\t\treturn\n\t\t}\n\t\tdataLen := f.data.Len()\n\t\tif f.Header().Flags.Has(http2.FlagDataPadded) {\n\t\t\tif w := s.fc.onRead(size - uint32(dataLen)); w > 0 {\n\t\t\t\tt.controlBuf.put(&outgoingWindowUpdate{s.id, w})\n\t\t\t}\n\t\t}\n\t\tif dataLen > 0 {\n\t\t\tf.data.Ref()\n\t\t\ts.write(recvMsg{buffer: f.data})\n\t\t}\n\t}\n\tif f.StreamEnded() {\n\t\t// Received the end of stream from the client.\n\t\ts.compareAndSwapState(streamActive, streamReadDone)\n\t\ts.write(recvMsg{err: io.EOF})\n\t}\n}\n\nfunc (t *http2Server) handleRSTStream(f *http2.RSTStreamFrame) {\n\t// If the stream is not deleted from the transport's active streams map, then do a regular close stream.\n\tif s, ok := t.getStream(f); ok {\n\t\tt.closeStream(s, false, 0, false)\n\t\treturn\n\t}\n\t// If the stream is already deleted from the active streams map, then put a cleanupStream item into controlbuf to delete the stream from loopy writer's established streams map.\n\tt.controlBuf.put(&cleanupStream{\n\t\tstreamID: f.Header().StreamID,\n\t\trst:      false,\n\t\trstCode:  0,\n\t\tonWrite:  func() {},\n\t})\n}\n\nfunc (t *http2Server) handleSettings(f *http2.SettingsFrame) {\n\tif f.IsAck() {\n\t\treturn\n\t}\n\tvar ss []http2.Setting\n\tvar updateFuncs []func()\n\tf.ForeachSetting(func(s http2.Setting) error {\n\t\tswitch s.ID {\n\t\tcase http2.SettingMaxHeaderListSize:\n\t\t\tupdateFuncs = append(updateFuncs, func() {\n\t\t\t\tt.maxSendHeaderListSize = new(uint32)\n\t\t\t\t*t.maxSendHeaderListSize = s.Val\n\t\t\t})\n\t\tdefault:\n\t\t\tss = append(ss, s)\n\t\t}\n\t\treturn nil\n\t})\n\tt.controlBuf.executeAndPut(func() bool {\n\t\tfor _, f := range updateFuncs {\n\t\t\tf()\n\t\t}\n\t\treturn true\n\t}, &incomingSettings{\n\t\tss: ss,\n\t})\n}\n\nconst (\n\tmaxPingStrikes     = 2\n\tdefaultPingTimeout = 2 * time.Hour\n)\n\nfunc (t *http2Server) handlePing(f *http2.PingFrame) {\n\tif f.IsAck() {\n\t\tif f.Data == goAwayPing.data && t.drainEvent != nil {\n\t\t\tt.drainEvent.Fire()\n\t\t\treturn\n\t\t}\n\t\t// Maybe it's a BDP ping.\n\t\tif t.bdpEst != nil {\n\t\t\tt.bdpEst.calculate(f.Data)\n\t\t}\n\t\treturn\n\t}\n\tpingAck := &ping{ack: true}\n\tcopy(pingAck.data[:], f.Data[:])\n\tt.controlBuf.put(pingAck)\n\n\tnow := time.Now()\n\tdefer func() {\n\t\tt.lastPingAt = now\n\t}()\n\t// A reset ping strikes means that we don't need to check for policy\n\t// violation for this ping and the pingStrikes counter should be set\n\t// to 0.\n\tif atomic.CompareAndSwapUint32(&t.resetPingStrikes, 1, 0) {\n\t\tt.pingStrikes = 0\n\t\treturn\n\t}\n\tt.mu.Lock()\n\tns := len(t.activeStreams)\n\tt.mu.Unlock()\n\tif ns < 1 && !t.kep.PermitWithoutStream {\n\t\t// Keepalive shouldn't be active thus, this new ping should\n\t\t// have come after at least defaultPingTimeout.\n\t\tif t.lastPingAt.Add(defaultPingTimeout).After(now) {\n\t\t\tt.pingStrikes++\n\t\t}\n\t} else {\n\t\t// Check if keepalive policy is respected.\n\t\tif t.lastPingAt.Add(t.kep.MinTime).After(now) {\n\t\t\tt.pingStrikes++\n\t\t}\n\t}\n\n\tif t.pingStrikes > maxPingStrikes {\n\t\t// Send goaway and close the connection.\n\t\tt.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte(\"too_many_pings\"), closeConn: errors.New(\"got too many pings from the client\")})\n\t}\n}\n\nfunc (t *http2Server) handleWindowUpdate(f *http2.WindowUpdateFrame) {\n\tt.controlBuf.put(&incomingWindowUpdate{\n\t\tstreamID:  f.Header().StreamID,\n\t\tincrement: f.Increment,\n\t})\n}\n\nfunc appendHeaderFieldsFromMD(headerFields []hpack.HeaderField, md metadata.MD) []hpack.HeaderField {\n\tfor k, vv := range md {\n\t\tif isReservedHeader(k) {\n\t\t\t// Clients don't tolerate reading restricted headers after some non restricted ones were sent.\n\t\t\tcontinue\n\t\t}\n\t\tfor _, v := range vv {\n\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})\n\t\t}\n\t}\n\treturn headerFields\n}\n\nfunc (t *http2Server) checkForHeaderListSize(it any) bool {\n\tif t.maxSendHeaderListSize == nil {\n\t\treturn true\n\t}\n\thdrFrame := it.(*headerFrame)\n\tvar sz int64\n\tfor _, f := range hdrFrame.hf {\n\t\tif sz += int64(f.Size()); sz > int64(*t.maxSendHeaderListSize) {\n\t\t\tif t.logger.V(logLevel) {\n\t\t\t\tt.logger.Infof(\"Header list size to send violates the maximum size (%d bytes) set by client\", *t.maxSendHeaderListSize)\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc (t *http2Server) streamContextErr(s *ServerStream) error {\n\tselect {\n\tcase <-t.done:\n\t\treturn ErrConnClosing\n\tdefault:\n\t}\n\treturn ContextErr(s.ctx.Err())\n}\n\n// WriteHeader sends the header metadata md back to the client.\nfunc (t *http2Server) writeHeader(s *ServerStream, md metadata.MD) error {\n\ts.hdrMu.Lock()\n\tdefer s.hdrMu.Unlock()\n\tif s.getState() == streamDone {\n\t\treturn t.streamContextErr(s)\n\t}\n\n\tif s.updateHeaderSent() {\n\t\treturn ErrIllegalHeaderWrite\n\t}\n\n\tif md.Len() > 0 {\n\t\tif s.header.Len() > 0 {\n\t\t\ts.header = metadata.Join(s.header, md)\n\t\t} else {\n\t\t\ts.header = md\n\t\t}\n\t}\n\tif err := t.writeHeaderLocked(s); err != nil {\n\t\tswitch e := err.(type) {\n\t\tcase ConnectionError:\n\t\t\treturn status.Error(codes.Unavailable, e.Desc)\n\t\tdefault:\n\t\t\treturn status.Convert(err).Err()\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (t *http2Server) writeHeaderLocked(s *ServerStream) error {\n\t// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields\n\t// first and create a slice of that exact size.\n\theaderFields := make([]hpack.HeaderField, 0, 2) // at least :status, content-type will be there if none else.\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \":status\", Value: \"200\"})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"content-type\", Value: grpcutil.ContentType(s.contentSubtype)})\n\tif s.sendCompress != \"\" {\n\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-encoding\", Value: s.sendCompress})\n\t}\n\theaderFields = appendHeaderFieldsFromMD(headerFields, s.header)\n\thf := &headerFrame{\n\t\tstreamID:  s.id,\n\t\thf:        headerFields,\n\t\tendStream: false,\n\t\tonWrite:   t.setResetPingStrikes,\n\t}\n\tsuccess, err := t.controlBuf.executeAndPut(func() bool { return t.checkForHeaderListSize(hf) }, hf)\n\tif !success {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tt.closeStream(s, true, http2.ErrCodeInternal, false)\n\t\treturn ErrHeaderListSizeLimitViolation\n\t}\n\tif t.stats != nil {\n\t\t// Note: Headers are compressed with hpack after this call returns.\n\t\t// No WireLength field is set here.\n\t\tt.stats.HandleRPC(s.Context(), &stats.OutHeader{\n\t\t\tHeader:      s.header.Copy(),\n\t\t\tCompression: s.sendCompress,\n\t\t})\n\t}\n\treturn nil\n}\n\n// writeStatus sends stream status to the client and terminates the stream.\n// There is no further I/O operations being able to perform on this stream.\n// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early\n// OK is adopted.\nfunc (t *http2Server) writeStatus(s *ServerStream, st *status.Status) error {\n\ts.hdrMu.Lock()\n\tdefer s.hdrMu.Unlock()\n\n\tif s.getState() == streamDone {\n\t\treturn nil\n\t}\n\n\t// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields\n\t// first and create a slice of that exact size.\n\theaderFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else.\n\tif !s.updateHeaderSent() {                      // No headers have been sent.\n\t\tif len(s.header) > 0 { // Send a separate header frame.\n\t\t\tif err := t.writeHeaderLocked(s); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else { // Send a trailer only response.\n\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \":status\", Value: \"200\"})\n\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: \"content-type\", Value: grpcutil.ContentType(s.contentSubtype)})\n\t\t}\n\t}\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-status\", Value: strconv.Itoa(int(st.Code()))})\n\theaderFields = append(headerFields, hpack.HeaderField{Name: \"grpc-message\", Value: encodeGrpcMessage(st.Message())})\n\n\tif p := istatus.RawStatusProto(st); len(p.GetDetails()) > 0 {\n\t\t// Do not use the user's grpc-status-details-bin (if present) if we are\n\t\t// even attempting to set our own.\n\t\tdelete(s.trailer, grpcStatusDetailsBinHeader)\n\t\tstBytes, err := proto.Marshal(p)\n\t\tif err != nil {\n\t\t\t// TODO: return error instead, when callers are able to handle it.\n\t\t\tt.logger.Errorf(\"Failed to marshal rpc status: %s, error: %v\", pretty.ToJSON(p), err)\n\t\t} else {\n\t\t\theaderFields = append(headerFields, hpack.HeaderField{Name: grpcStatusDetailsBinHeader, Value: encodeBinHeader(stBytes)})\n\t\t}\n\t}\n\n\t// Attach the trailer metadata.\n\theaderFields = appendHeaderFieldsFromMD(headerFields, s.trailer)\n\ttrailingHeader := &headerFrame{\n\t\tstreamID:  s.id,\n\t\thf:        headerFields,\n\t\tendStream: true,\n\t\tonWrite:   t.setResetPingStrikes,\n\t}\n\n\tsuccess, err := t.controlBuf.executeAndPut(func() bool {\n\t\treturn t.checkForHeaderListSize(trailingHeader)\n\t}, nil)\n\tif !success {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tt.closeStream(s, true, http2.ErrCodeInternal, false)\n\t\treturn ErrHeaderListSizeLimitViolation\n\t}\n\t// Send a RST_STREAM after the trailers if the client has not already half-closed.\n\trst := s.getState() == streamActive\n\tt.finishStream(s, rst, http2.ErrCodeNo, trailingHeader, true)\n\tif t.stats != nil {\n\t\t// Note: The trailer fields are compressed with hpack after this call returns.\n\t\t// No WireLength field is set here.\n\t\tt.stats.HandleRPC(s.Context(), &stats.OutTrailer{\n\t\t\tTrailer: s.trailer.Copy(),\n\t\t})\n\t}\n\treturn nil\n}\n\n// Write converts the data into HTTP2 data frame and sends it out. Non-nil error\n// is returns if it fails (e.g., framing error, transport error).\nfunc (t *http2Server) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _ *WriteOptions) error {\n\tif !s.isHeaderSent() { // Headers haven't been written yet.\n\t\tif err := t.writeHeader(s, nil); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\t// Writing headers checks for this condition.\n\t\tif s.getState() == streamDone {\n\t\t\treturn t.streamContextErr(s)\n\t\t}\n\t}\n\n\tdf := &dataFrame{\n\t\tstreamID:    s.id,\n\t\th:           hdr,\n\t\tdata:        data,\n\t\tonEachWrite: t.setResetPingStrikes,\n\t}\n\tdataLen := data.Len()\n\tif err := s.wq.get(int32(len(hdr) + dataLen)); err != nil {\n\t\treturn t.streamContextErr(s)\n\t}\n\tdata.Ref()\n\tif err := t.controlBuf.put(df); err != nil {\n\t\tdata.Free()\n\t\treturn err\n\t}\n\tt.incrMsgSent()\n\treturn nil\n}\n\n// keepalive running in a separate goroutine does the following:\n// 1. Gracefully closes an idle connection after a duration of keepalive.MaxConnectionIdle.\n// 2. Gracefully closes any connection after a duration of keepalive.MaxConnectionAge.\n// 3. Forcibly closes a connection after an additive period of keepalive.MaxConnectionAgeGrace over keepalive.MaxConnectionAge.\n// 4. Makes sure a connection is alive by sending pings with a frequency of keepalive.Time and closes a non-responsive connection\n// after an additional duration of keepalive.Timeout.\nfunc (t *http2Server) keepalive() {\n\tp := &ping{}\n\t// True iff a ping has been sent, and no data has been received since then.\n\toutstandingPing := false\n\t// Amount of time remaining before which we should receive an ACK for the\n\t// last sent ping.\n\tkpTimeoutLeft := time.Duration(0)\n\t// Records the last value of t.lastRead before we go block on the timer.\n\t// This is required to check for read activity since then.\n\tprevNano := time.Now().UnixNano()\n\t// Initialize the different timers to their default values.\n\tidleTimer := time.NewTimer(t.kp.MaxConnectionIdle)\n\tageTimer := time.NewTimer(t.kp.MaxConnectionAge)\n\tkpTimer := time.NewTimer(t.kp.Time)\n\tdefer func() {\n\t\t// We need to drain the underlying channel in these timers after a call\n\t\t// to Stop(), only if we are interested in resetting them. Clearly we\n\t\t// are not interested in resetting them here.\n\t\tidleTimer.Stop()\n\t\tageTimer.Stop()\n\t\tkpTimer.Stop()\n\t}()\n\n\tfor {\n\t\tselect {\n\t\tcase <-idleTimer.C:\n\t\t\tt.mu.Lock()\n\t\t\tidle := t.idle\n\t\t\tif idle.IsZero() { // The connection is non-idle.\n\t\t\t\tt.mu.Unlock()\n\t\t\t\tidleTimer.Reset(t.kp.MaxConnectionIdle)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tval := t.kp.MaxConnectionIdle - time.Since(idle)\n\t\t\tt.mu.Unlock()\n\t\t\tif val <= 0 {\n\t\t\t\t// The connection has been idle for a duration of keepalive.MaxConnectionIdle or more.\n\t\t\t\t// Gracefully close the connection.\n\t\t\t\tt.Drain(\"max_idle\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\tidleTimer.Reset(val)\n\t\tcase <-ageTimer.C:\n\t\t\tt.Drain(\"max_age\")\n\t\t\tageTimer.Reset(t.kp.MaxConnectionAgeGrace)\n\t\t\tselect {\n\t\t\tcase <-ageTimer.C:\n\t\t\t\t// Close the connection after grace period.\n\t\t\t\tif t.logger.V(logLevel) {\n\t\t\t\t\tt.logger.Infof(\"Closing server transport due to maximum connection age\")\n\t\t\t\t}\n\t\t\t\tt.controlBuf.put(closeConnection{})\n\t\t\tcase <-t.done:\n\t\t\t}\n\t\t\treturn\n\t\tcase <-kpTimer.C:\n\t\t\tlastRead := atomic.LoadInt64(&t.lastRead)\n\t\t\tif lastRead > prevNano {\n\t\t\t\t// There has been read activity since the last time we were\n\t\t\t\t// here. Setup the timer to fire at kp.Time seconds from\n\t\t\t\t// lastRead time and continue.\n\t\t\t\toutstandingPing = false\n\t\t\t\tkpTimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))\n\t\t\t\tprevNano = lastRead\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif outstandingPing && kpTimeoutLeft <= 0 {\n\t\t\t\tt.Close(fmt.Errorf(\"keepalive ping not acked within timeout %s\", t.kp.Timeout))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif !outstandingPing {\n\t\t\t\tif channelz.IsOn() {\n\t\t\t\t\tt.channelz.SocketMetrics.KeepAlivesSent.Add(1)\n\t\t\t\t}\n\t\t\t\tt.controlBuf.put(p)\n\t\t\t\tkpTimeoutLeft = t.kp.Timeout\n\t\t\t\toutstandingPing = true\n\t\t\t}\n\t\t\t// The amount of time to sleep here is the minimum of kp.Time and\n\t\t\t// timeoutLeft. This will ensure that we wait only for kp.Time\n\t\t\t// before sending out the next ping (for cases where the ping is\n\t\t\t// acked).\n\t\t\tsleepDuration := min(t.kp.Time, kpTimeoutLeft)\n\t\t\tkpTimeoutLeft -= sleepDuration\n\t\t\tkpTimer.Reset(sleepDuration)\n\t\tcase <-t.done:\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// Close starts shutting down the http2Server transport.\n// TODO(zhaoq): Now the destruction is not blocked on any pending streams. This\n// could cause some resource issue. Revisit this later.\nfunc (t *http2Server) Close(err error) {\n\tt.mu.Lock()\n\tif t.state == closing {\n\t\tt.mu.Unlock()\n\t\treturn\n\t}\n\tif t.logger.V(logLevel) {\n\t\tt.logger.Infof(\"Closing: %v\", err)\n\t}\n\tt.state = closing\n\tstreams := t.activeStreams\n\tt.activeStreams = nil\n\tt.mu.Unlock()\n\tt.controlBuf.finish()\n\tclose(t.done)\n\tif err := t.conn.Close(); err != nil && t.logger.V(logLevel) {\n\t\tt.logger.Infof(\"Error closing underlying net.Conn during Close: %v\", err)\n\t}\n\tchannelz.RemoveEntry(t.channelz.ID)\n\t// Cancel all active streams.\n\tfor _, s := range streams {\n\t\ts.cancel()\n\t}\n}\n\n// deleteStream deletes the stream s from transport's active streams.\nfunc (t *http2Server) deleteStream(s *ServerStream, eosReceived bool) {\n\tt.mu.Lock()\n\t_, isActive := t.activeStreams[s.id]\n\tif isActive {\n\t\tdelete(t.activeStreams, s.id)\n\t\tif len(t.activeStreams) == 0 {\n\t\t\tt.idle = time.Now()\n\t\t}\n\t}\n\tt.mu.Unlock()\n\n\tif isActive && channelz.IsOn() {\n\t\tif eosReceived {\n\t\t\tt.channelz.SocketMetrics.StreamsSucceeded.Add(1)\n\t\t} else {\n\t\t\tt.channelz.SocketMetrics.StreamsFailed.Add(1)\n\t\t}\n\t}\n}\n\n// finishStream closes the stream and puts the trailing headerFrame into controlbuf.\nfunc (t *http2Server) finishStream(s *ServerStream, rst bool, rstCode http2.ErrCode, hdr *headerFrame, eosReceived bool) {\n\t// In case stream sending and receiving are invoked in separate\n\t// goroutines (e.g., bi-directional streaming), cancel needs to be\n\t// called to interrupt the potential blocking on other goroutines.\n\ts.cancel()\n\n\toldState := s.swapState(streamDone)\n\tif oldState == streamDone {\n\t\t// If the stream was already done, return.\n\t\treturn\n\t}\n\n\thdr.cleanup = &cleanupStream{\n\t\tstreamID: s.id,\n\t\trst:      rst,\n\t\trstCode:  rstCode,\n\t\tonWrite: func() {\n\t\t\tt.deleteStream(s, eosReceived)\n\t\t},\n\t}\n\tt.controlBuf.put(hdr)\n}\n\n// closeStream clears the footprint of a stream when the stream is not needed any more.\nfunc (t *http2Server) closeStream(s *ServerStream, rst bool, rstCode http2.ErrCode, eosReceived bool) {\n\t// In case stream sending and receiving are invoked in separate\n\t// goroutines (e.g., bi-directional streaming), cancel needs to be\n\t// called to interrupt the potential blocking on other goroutines.\n\ts.cancel()\n\n\t// We can't return early even if the stream's state is \"done\" as the state\n\t// might have been set by the `finishStream` method. Deleting the stream via\n\t// `finishStream` can get blocked on flow control.\n\ts.swapState(streamDone)\n\tt.deleteStream(s, eosReceived)\n\n\tt.controlBuf.put(&cleanupStream{\n\t\tstreamID: s.id,\n\t\trst:      rst,\n\t\trstCode:  rstCode,\n\t\tonWrite:  func() {},\n\t})\n}\n\nfunc (t *http2Server) Drain(debugData string) {\n\tt.mu.Lock()\n\tdefer t.mu.Unlock()\n\tif t.drainEvent != nil {\n\t\treturn\n\t}\n\tt.drainEvent = grpcsync.NewEvent()\n\tt.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(debugData), headsUp: true})\n}\n\nvar goAwayPing = &ping{data: [8]byte{1, 6, 1, 8, 0, 3, 3, 9}}\n\n// Handles outgoing GoAway and returns true if loopy needs to put itself\n// in draining mode.\nfunc (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) {\n\tt.maxStreamMu.Lock()\n\tt.mu.Lock()\n\tif t.state == closing { // TODO(mmukhi): This seems unnecessary.\n\t\tt.mu.Unlock()\n\t\tt.maxStreamMu.Unlock()\n\t\t// The transport is closing.\n\t\treturn false, ErrConnClosing\n\t}\n\tif !g.headsUp {\n\t\t// Stop accepting more streams now.\n\t\tt.state = draining\n\t\tsid := t.maxStreamID\n\t\tretErr := g.closeConn\n\t\tif len(t.activeStreams) == 0 {\n\t\t\tretErr = errors.New(\"second GOAWAY written and no active streams left to process\")\n\t\t}\n\t\tt.mu.Unlock()\n\t\tt.maxStreamMu.Unlock()\n\t\tif err := t.framer.fr.WriteGoAway(sid, g.code, g.debugData); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t\tt.framer.writer.Flush()\n\t\tif retErr != nil {\n\t\t\treturn false, retErr\n\t\t}\n\t\treturn true, nil\n\t}\n\tt.mu.Unlock()\n\tt.maxStreamMu.Unlock()\n\t// For a graceful close, send out a GoAway with stream ID of MaxUInt32,\n\t// Follow that with a ping and wait for the ack to come back or a timer\n\t// to expire. During this time accept new streams since they might have\n\t// originated before the GoAway reaches the client.\n\t// After getting the ack or timer expiration send out another GoAway this\n\t// time with an ID of the max stream server intends to process.\n\tif err := t.framer.fr.WriteGoAway(math.MaxUint32, http2.ErrCodeNo, g.debugData); err != nil {\n\t\treturn false, err\n\t}\n\tif err := t.framer.fr.WritePing(false, goAwayPing.data); err != nil {\n\t\treturn false, err\n\t}\n\tgo func() {\n\t\ttimer := time.NewTimer(5 * time.Second)\n\t\tdefer timer.Stop()\n\t\tselect {\n\t\tcase <-t.drainEvent.Done():\n\t\tcase <-timer.C:\n\t\tcase <-t.done:\n\t\t\treturn\n\t\t}\n\t\tt.controlBuf.put(&goAway{code: g.code, debugData: g.debugData})\n\t}()\n\treturn false, nil\n}\n\nfunc (t *http2Server) socketMetrics() *channelz.EphemeralSocketMetrics {\n\treturn &channelz.EphemeralSocketMetrics{\n\t\tLocalFlowControlWindow:  int64(t.fc.getSize()),\n\t\tRemoteFlowControlWindow: t.getOutFlowWindow(),\n\t}\n}\n\nfunc (t *http2Server) incrMsgSent() {\n\tif channelz.IsOn() {\n\t\tt.channelz.SocketMetrics.MessagesSent.Add(1)\n\t\tt.channelz.SocketMetrics.LastMessageSentTimestamp.Add(1)\n\t}\n}\n\nfunc (t *http2Server) incrMsgRecv() {\n\tif channelz.IsOn() {\n\t\tt.channelz.SocketMetrics.MessagesReceived.Add(1)\n\t\tt.channelz.SocketMetrics.LastMessageReceivedTimestamp.Add(1)\n\t}\n}\n\nfunc (t *http2Server) getOutFlowWindow() int64 {\n\tresp := make(chan uint32, 1)\n\ttimer := time.NewTimer(time.Second)\n\tdefer timer.Stop()\n\tt.controlBuf.put(&outFlowControlSizeRequest{resp})\n\tselect {\n\tcase sz := <-resp:\n\t\treturn int64(sz)\n\tcase <-t.done:\n\t\treturn -1\n\tcase <-timer.C:\n\t\treturn -2\n\t}\n}\n\n// Peer returns the peer of the transport.\nfunc (t *http2Server) Peer() *peer.Peer {\n\treturn &peer.Peer{\n\t\tAddr:      t.peer.Addr,\n\t\tLocalAddr: t.peer.LocalAddr,\n\t\tAuthInfo:  t.peer.AuthInfo, // Can be nil\n\t}\n}\n\nfunc getJitter(v time.Duration) time.Duration {\n\tif v == infinity {\n\t\treturn 0\n\t}\n\t// Generate a jitter between +/- 10% of the value.\n\tr := int64(v / 10)\n\tj := rand.Int64N(2*r) - r\n\treturn time.Duration(j)\n}\n\ntype connectionKey struct{}\n\n// GetConnection gets the connection from the context.\nfunc GetConnection(ctx context.Context) net.Conn {\n\tconn, _ := ctx.Value(connectionKey{}).(net.Conn)\n\treturn conn\n}\n\n// SetConnection adds the connection to the context to be able to get\n// information about the destination ip and port for an incoming RPC. This also\n// allows any unary or streaming interceptors to see the connection.\nfunc SetConnection(ctx context.Context, conn net.Conn) context.Context {\n\treturn context.WithValue(ctx, connectionKey{}, conn)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/http_util.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"bufio\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\t\"unicode/utf8\"\n\n\t\"golang.org/x/net/http2\"\n\t\"golang.org/x/net/http2/hpack\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/mem\"\n)\n\nconst (\n\t// http2MaxFrameLen specifies the max length of a HTTP2 frame.\n\thttp2MaxFrameLen = 16384 // 16KB frame\n\t// https://httpwg.org/specs/rfc7540.html#SettingValues\n\thttp2InitHeaderTableSize = 4096\n)\n\nvar (\n\tclientPreface   = []byte(http2.ClientPreface)\n\thttp2ErrConvTab = map[http2.ErrCode]codes.Code{\n\t\thttp2.ErrCodeNo:                 codes.Internal,\n\t\thttp2.ErrCodeProtocol:           codes.Internal,\n\t\thttp2.ErrCodeInternal:           codes.Internal,\n\t\thttp2.ErrCodeFlowControl:        codes.ResourceExhausted,\n\t\thttp2.ErrCodeSettingsTimeout:    codes.Internal,\n\t\thttp2.ErrCodeStreamClosed:       codes.Internal,\n\t\thttp2.ErrCodeFrameSize:          codes.Internal,\n\t\thttp2.ErrCodeRefusedStream:      codes.Unavailable,\n\t\thttp2.ErrCodeCancel:             codes.Canceled,\n\t\thttp2.ErrCodeCompression:        codes.Internal,\n\t\thttp2.ErrCodeConnect:            codes.Internal,\n\t\thttp2.ErrCodeEnhanceYourCalm:    codes.ResourceExhausted,\n\t\thttp2.ErrCodeInadequateSecurity: codes.PermissionDenied,\n\t\thttp2.ErrCodeHTTP11Required:     codes.Internal,\n\t}\n\t// HTTPStatusConvTab is the HTTP status code to gRPC error code conversion table.\n\tHTTPStatusConvTab = map[int]codes.Code{\n\t\t// 400 Bad Request - INTERNAL.\n\t\thttp.StatusBadRequest: codes.Internal,\n\t\t// 401 Unauthorized  - UNAUTHENTICATED.\n\t\thttp.StatusUnauthorized: codes.Unauthenticated,\n\t\t// 403 Forbidden - PERMISSION_DENIED.\n\t\thttp.StatusForbidden: codes.PermissionDenied,\n\t\t// 404 Not Found - UNIMPLEMENTED.\n\t\thttp.StatusNotFound: codes.Unimplemented,\n\t\t// 429 Too Many Requests - UNAVAILABLE.\n\t\thttp.StatusTooManyRequests: codes.Unavailable,\n\t\t// 502 Bad Gateway - UNAVAILABLE.\n\t\thttp.StatusBadGateway: codes.Unavailable,\n\t\t// 503 Service Unavailable - UNAVAILABLE.\n\t\thttp.StatusServiceUnavailable: codes.Unavailable,\n\t\t// 504 Gateway timeout - UNAVAILABLE.\n\t\thttp.StatusGatewayTimeout: codes.Unavailable,\n\t}\n)\n\nvar grpcStatusDetailsBinHeader = \"grpc-status-details-bin\"\n\n// isReservedHeader checks whether hdr belongs to HTTP2 headers\n// reserved by gRPC protocol. Any other headers are classified as the\n// user-specified metadata.\nfunc isReservedHeader(hdr string) bool {\n\tif hdr != \"\" && hdr[0] == ':' {\n\t\treturn true\n\t}\n\tswitch hdr {\n\tcase \"content-type\",\n\t\t\"user-agent\",\n\t\t\"grpc-message-type\",\n\t\t\"grpc-encoding\",\n\t\t\"grpc-message\",\n\t\t\"grpc-status\",\n\t\t\"grpc-timeout\",\n\t\t// Intentionally exclude grpc-previous-rpc-attempts and\n\t\t// grpc-retry-pushback-ms, which are \"reserved\", but their API\n\t\t// intentionally works via metadata.\n\t\t\"te\":\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// isWhitelistedHeader checks whether hdr should be propagated into metadata\n// visible to users, even though it is classified as \"reserved\", above.\nfunc isWhitelistedHeader(hdr string) bool {\n\tswitch hdr {\n\tcase \":authority\", \"user-agent\":\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nconst binHdrSuffix = \"-bin\"\n\nfunc encodeBinHeader(v []byte) string {\n\treturn base64.RawStdEncoding.EncodeToString(v)\n}\n\nfunc decodeBinHeader(v string) ([]byte, error) {\n\tif len(v)%4 == 0 {\n\t\t// Input was padded, or padding was not necessary.\n\t\treturn base64.StdEncoding.DecodeString(v)\n\t}\n\treturn base64.RawStdEncoding.DecodeString(v)\n}\n\nfunc encodeMetadataHeader(k, v string) string {\n\tif strings.HasSuffix(k, binHdrSuffix) {\n\t\treturn encodeBinHeader(([]byte)(v))\n\t}\n\treturn v\n}\n\nfunc decodeMetadataHeader(k, v string) (string, error) {\n\tif strings.HasSuffix(k, binHdrSuffix) {\n\t\tb, err := decodeBinHeader(v)\n\t\treturn string(b), err\n\t}\n\treturn v, nil\n}\n\ntype timeoutUnit uint8\n\nconst (\n\thour        timeoutUnit = 'H'\n\tminute      timeoutUnit = 'M'\n\tsecond      timeoutUnit = 'S'\n\tmillisecond timeoutUnit = 'm'\n\tmicrosecond timeoutUnit = 'u'\n\tnanosecond  timeoutUnit = 'n'\n)\n\nfunc timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) {\n\tswitch u {\n\tcase hour:\n\t\treturn time.Hour, true\n\tcase minute:\n\t\treturn time.Minute, true\n\tcase second:\n\t\treturn time.Second, true\n\tcase millisecond:\n\t\treturn time.Millisecond, true\n\tcase microsecond:\n\t\treturn time.Microsecond, true\n\tcase nanosecond:\n\t\treturn time.Nanosecond, true\n\tdefault:\n\t}\n\treturn\n}\n\nfunc decodeTimeout(s string) (time.Duration, error) {\n\tsize := len(s)\n\tif size < 2 {\n\t\treturn 0, fmt.Errorf(\"transport: timeout string is too short: %q\", s)\n\t}\n\tif size > 9 {\n\t\t// Spec allows for 8 digits plus the unit.\n\t\treturn 0, fmt.Errorf(\"transport: timeout string is too long: %q\", s)\n\t}\n\tunit := timeoutUnit(s[size-1])\n\td, ok := timeoutUnitToDuration(unit)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"transport: timeout unit is not recognized: %q\", s)\n\t}\n\tt, err := strconv.ParseUint(s[:size-1], 10, 64)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tconst maxHours = math.MaxInt64 / uint64(time.Hour)\n\tif d == time.Hour && t > maxHours {\n\t\t// This timeout would overflow math.MaxInt64; clamp it.\n\t\treturn time.Duration(math.MaxInt64), nil\n\t}\n\treturn d * time.Duration(t), nil\n}\n\nconst (\n\tspaceByte   = ' '\n\ttildeByte   = '~'\n\tpercentByte = '%'\n)\n\n// encodeGrpcMessage is used to encode status code in header field\n// \"grpc-message\". It does percent encoding and also replaces invalid utf-8\n// characters with Unicode replacement character.\n//\n// It checks to see if each individual byte in msg is an allowable byte, and\n// then either percent encoding or passing it through. When percent encoding,\n// the byte is converted into hexadecimal notation with a '%' prepended.\nfunc encodeGrpcMessage(msg string) string {\n\tif msg == \"\" {\n\t\treturn \"\"\n\t}\n\tlenMsg := len(msg)\n\tfor i := 0; i < lenMsg; i++ {\n\t\tc := msg[i]\n\t\tif !(c >= spaceByte && c <= tildeByte && c != percentByte) {\n\t\t\treturn encodeGrpcMessageUnchecked(msg)\n\t\t}\n\t}\n\treturn msg\n}\n\nfunc encodeGrpcMessageUnchecked(msg string) string {\n\tvar sb strings.Builder\n\tfor len(msg) > 0 {\n\t\tr, size := utf8.DecodeRuneInString(msg)\n\t\tfor _, b := range []byte(string(r)) {\n\t\t\tif size > 1 {\n\t\t\t\t// If size > 1, r is not ascii. Always do percent encoding.\n\t\t\t\tfmt.Fprintf(&sb, \"%%%02X\", b)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// The for loop is necessary even if size == 1. r could be\n\t\t\t// utf8.RuneError.\n\t\t\t//\n\t\t\t// fmt.Sprintf(\"%%%02X\", utf8.RuneError) gives \"%FFFD\".\n\t\t\tif b >= spaceByte && b <= tildeByte && b != percentByte {\n\t\t\t\tsb.WriteByte(b)\n\t\t\t} else {\n\t\t\t\tfmt.Fprintf(&sb, \"%%%02X\", b)\n\t\t\t}\n\t\t}\n\t\tmsg = msg[size:]\n\t}\n\treturn sb.String()\n}\n\n// decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage.\nfunc decodeGrpcMessage(msg string) string {\n\tif msg == \"\" {\n\t\treturn \"\"\n\t}\n\tlenMsg := len(msg)\n\tfor i := 0; i < lenMsg; i++ {\n\t\tif msg[i] == percentByte && i+2 < lenMsg {\n\t\t\treturn decodeGrpcMessageUnchecked(msg)\n\t\t}\n\t}\n\treturn msg\n}\n\nfunc decodeGrpcMessageUnchecked(msg string) string {\n\tvar sb strings.Builder\n\tlenMsg := len(msg)\n\tfor i := 0; i < lenMsg; i++ {\n\t\tc := msg[i]\n\t\tif c == percentByte && i+2 < lenMsg {\n\t\t\tparsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8)\n\t\t\tif err != nil {\n\t\t\t\tsb.WriteByte(c)\n\t\t\t} else {\n\t\t\t\tsb.WriteByte(byte(parsed))\n\t\t\t\ti += 2\n\t\t\t}\n\t\t} else {\n\t\t\tsb.WriteByte(c)\n\t\t}\n\t}\n\treturn sb.String()\n}\n\ntype bufWriter struct {\n\tpool      *sync.Pool\n\tbuf       []byte\n\toffset    int\n\tbatchSize int\n\tconn      io.Writer\n\terr       error\n}\n\nfunc newBufWriter(conn io.Writer, batchSize int, pool *sync.Pool) *bufWriter {\n\tw := &bufWriter{\n\t\tbatchSize: batchSize,\n\t\tconn:      conn,\n\t\tpool:      pool,\n\t}\n\t// this indicates that we should use non shared buf\n\tif pool == nil {\n\t\tw.buf = make([]byte, batchSize)\n\t}\n\treturn w\n}\n\nfunc (w *bufWriter) Write(b []byte) (int, error) {\n\tif w.err != nil {\n\t\treturn 0, w.err\n\t}\n\tif w.batchSize == 0 { // Buffer has been disabled.\n\t\tn, err := w.conn.Write(b)\n\t\treturn n, toIOError(err)\n\t}\n\tif w.buf == nil {\n\t\tb := w.pool.Get().(*[]byte)\n\t\tw.buf = *b\n\t}\n\twritten := 0\n\tfor len(b) > 0 {\n\t\tcopied := copy(w.buf[w.offset:], b)\n\t\tb = b[copied:]\n\t\twritten += copied\n\t\tw.offset += copied\n\t\tif w.offset < w.batchSize {\n\t\t\tcontinue\n\t\t}\n\t\tif err := w.flushKeepBuffer(); err != nil {\n\t\t\treturn written, err\n\t\t}\n\t}\n\treturn written, nil\n}\n\nfunc (w *bufWriter) Flush() error {\n\terr := w.flushKeepBuffer()\n\t// Only release the buffer if we are in a \"shared\" mode\n\tif w.buf != nil && w.pool != nil {\n\t\tb := w.buf\n\t\tw.pool.Put(&b)\n\t\tw.buf = nil\n\t}\n\treturn err\n}\n\nfunc (w *bufWriter) flushKeepBuffer() error {\n\tif w.err != nil {\n\t\treturn w.err\n\t}\n\tif w.offset == 0 {\n\t\treturn nil\n\t}\n\t_, w.err = w.conn.Write(w.buf[:w.offset])\n\tw.err = toIOError(w.err)\n\tw.offset = 0\n\treturn w.err\n}\n\ntype ioError struct {\n\terror\n}\n\nfunc (i ioError) Unwrap() error {\n\treturn i.error\n}\n\nfunc isIOError(err error) bool {\n\treturn errors.As(err, &ioError{})\n}\n\nfunc toIOError(err error) error {\n\tif err == nil {\n\t\treturn nil\n\t}\n\treturn ioError{error: err}\n}\n\ntype parsedDataFrame struct {\n\thttp2.FrameHeader\n\tdata mem.Buffer\n}\n\nfunc (df *parsedDataFrame) StreamEnded() bool {\n\treturn df.FrameHeader.Flags.Has(http2.FlagDataEndStream)\n}\n\ntype framer struct {\n\twriter    *bufWriter\n\tfr        *http2.Framer\n\theaderBuf []byte // cached slice for framer headers to reduce heap allocs.\n\treader    io.Reader\n\tdataFrame parsedDataFrame // Cached data frame to avoid heap allocations.\n\tpool      mem.BufferPool\n\terrDetail error\n}\n\nvar writeBufferPoolMap = make(map[int]*sync.Pool)\nvar writeBufferMutex sync.Mutex\n\nfunc newFramer(conn io.ReadWriter, writeBufferSize, readBufferSize int, sharedWriteBuffer bool, maxHeaderListSize uint32, memPool mem.BufferPool) *framer {\n\tif writeBufferSize < 0 {\n\t\twriteBufferSize = 0\n\t}\n\tvar r io.Reader = conn\n\tif readBufferSize > 0 {\n\t\tr = bufio.NewReaderSize(r, readBufferSize)\n\t}\n\tvar pool *sync.Pool\n\tif sharedWriteBuffer {\n\t\tpool = getWriteBufferPool(writeBufferSize)\n\t}\n\tw := newBufWriter(conn, writeBufferSize, pool)\n\tf := &framer{\n\t\twriter: w,\n\t\tfr:     http2.NewFramer(w, r),\n\t\treader: r,\n\t\tpool:   memPool,\n\t}\n\tf.fr.SetMaxReadFrameSize(http2MaxFrameLen)\n\t// Opt-in to Frame reuse API on framer to reduce garbage.\n\t// Frames aren't safe to read from after a subsequent call to ReadFrame.\n\tf.fr.SetReuseFrames()\n\tf.fr.MaxHeaderListSize = maxHeaderListSize\n\tf.fr.ReadMetaHeaders = hpack.NewDecoder(http2InitHeaderTableSize, nil)\n\treturn f\n}\n\n// writeData writes a DATA frame.\n//\n// It is the caller's responsibility not to violate the maximum frame size.\nfunc (f *framer) writeData(streamID uint32, endStream bool, data [][]byte) error {\n\tvar flags http2.Flags\n\tif endStream {\n\t\tflags = http2.FlagDataEndStream\n\t}\n\tlength := uint32(0)\n\tfor _, d := range data {\n\t\tlength += uint32(len(d))\n\t}\n\t// TODO: Replace the header write with the framer API being added in\n\t// https://github.com/golang/go/issues/66655.\n\tf.headerBuf = append(f.headerBuf[:0],\n\t\tbyte(length>>16),\n\t\tbyte(length>>8),\n\t\tbyte(length),\n\t\tbyte(http2.FrameData),\n\t\tbyte(flags),\n\t\tbyte(streamID>>24),\n\t\tbyte(streamID>>16),\n\t\tbyte(streamID>>8),\n\t\tbyte(streamID))\n\tif _, err := f.writer.Write(f.headerBuf); err != nil {\n\t\treturn err\n\t}\n\tfor _, d := range data {\n\t\tif _, err := f.writer.Write(d); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// readFrame reads a single frame. The returned Frame is only valid\n// until the next call to readFrame.\nfunc (f *framer) readFrame() (any, error) {\n\tf.errDetail = nil\n\tfh, err := f.fr.ReadFrameHeader()\n\tif err != nil {\n\t\tf.errDetail = f.fr.ErrorDetail()\n\t\treturn nil, err\n\t}\n\t// Read the data frame directly from the underlying io.Reader to avoid\n\t// copies.\n\tif fh.Type == http2.FrameData {\n\t\terr = f.readDataFrame(fh)\n\t\treturn &f.dataFrame, err\n\t}\n\tfr, err := f.fr.ReadFrameForHeader(fh)\n\tif err != nil {\n\t\tf.errDetail = f.fr.ErrorDetail()\n\t\treturn nil, err\n\t}\n\treturn fr, err\n}\n\n// errorDetail returns a more detailed error of the last error\n// returned by framer.readFrame. For instance, if readFrame\n// returns a StreamError with code PROTOCOL_ERROR, errorDetail\n// will say exactly what was invalid. errorDetail is not guaranteed\n// to return a non-nil value.\n// errorDetail is reset after the next call to readFrame.\nfunc (f *framer) errorDetail() error {\n\treturn f.errDetail\n}\n\nfunc (f *framer) readDataFrame(fh http2.FrameHeader) (err error) {\n\tif fh.StreamID == 0 {\n\t\t// DATA frames MUST be associated with a stream. If a\n\t\t// DATA frame is received whose stream identifier\n\t\t// field is 0x0, the recipient MUST respond with a\n\t\t// connection error (Section 5.4.1) of type\n\t\t// PROTOCOL_ERROR.\n\t\tf.errDetail = errors.New(\"DATA frame with stream ID 0\")\n\t\treturn http2.ConnectionError(http2.ErrCodeProtocol)\n\t}\n\t// Converting a *[]byte to a mem.SliceBuffer incurs a heap allocation. This\n\t// conversion is performed by mem.NewBuffer. To avoid the extra allocation\n\t// a []byte is allocated directly if required and cast to a mem.SliceBuffer.\n\tvar buf []byte\n\t// poolHandle is the pointer returned by the buffer pool (if it's used.).\n\tvar poolHandle *[]byte\n\tuseBufferPool := !mem.IsBelowBufferPoolingThreshold(int(fh.Length))\n\tif useBufferPool {\n\t\tpoolHandle = f.pool.Get(int(fh.Length))\n\t\tbuf = *poolHandle\n\t\tdefer func() {\n\t\t\tif err != nil {\n\t\t\t\tf.pool.Put(poolHandle)\n\t\t\t}\n\t\t}()\n\t} else {\n\t\tbuf = make([]byte, int(fh.Length))\n\t}\n\tif fh.Flags.Has(http2.FlagDataPadded) {\n\t\tif fh.Length == 0 {\n\t\t\treturn io.ErrUnexpectedEOF\n\t\t}\n\t\t// This initial 1-byte read can be inefficient for unbuffered readers,\n\t\t// but it allows the rest of the payload to be read directly to the\n\t\t// start of the destination slice. This makes it easy to return the\n\t\t// original slice back to the buffer pool.\n\t\tif _, err := io.ReadFull(f.reader, buf[:1]); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpadSize := buf[0]\n\t\tbuf = buf[:len(buf)-1]\n\t\tif int(padSize) > len(buf) {\n\t\t\t// If the length of the padding is greater than the\n\t\t\t// length of the frame payload, the recipient MUST\n\t\t\t// treat this as a connection error.\n\t\t\t// Filed: https://github.com/http2/http2-spec/issues/610\n\t\t\tf.errDetail = errors.New(\"pad size larger than data payload\")\n\t\t\treturn http2.ConnectionError(http2.ErrCodeProtocol)\n\t\t}\n\t\tif _, err := io.ReadFull(f.reader, buf); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbuf = buf[:len(buf)-int(padSize)]\n\t} else if _, err := io.ReadFull(f.reader, buf); err != nil {\n\t\treturn err\n\t}\n\n\tf.dataFrame.FrameHeader = fh\n\tif useBufferPool {\n\t\t// Update the handle to point to the (potentially re-sliced) buf.\n\t\t*poolHandle = buf\n\t\tf.dataFrame.data = mem.NewBuffer(poolHandle, f.pool)\n\t} else {\n\t\tf.dataFrame.data = mem.SliceBuffer(buf)\n\t}\n\treturn nil\n}\n\nfunc (df *parsedDataFrame) Header() http2.FrameHeader {\n\treturn df.FrameHeader\n}\n\nfunc getWriteBufferPool(size int) *sync.Pool {\n\twriteBufferMutex.Lock()\n\tdefer writeBufferMutex.Unlock()\n\tpool, ok := writeBufferPoolMap[size]\n\tif ok {\n\t\treturn pool\n\t}\n\tpool = &sync.Pool{\n\t\tNew: func() any {\n\t\t\tb := make([]byte, size)\n\t\t\treturn &b\n\t\t},\n\t}\n\twriteBufferPoolMap[size] = pool\n\treturn pool\n}\n\n// ParseDialTarget returns the network and address to pass to dialer.\nfunc ParseDialTarget(target string) (string, string) {\n\tnet := \"tcp\"\n\tm1 := strings.Index(target, \":\")\n\tm2 := strings.Index(target, \":/\")\n\t// handle unix:addr which will fail with url.Parse\n\tif m1 >= 0 && m2 < 0 {\n\t\tif n := target[0:m1]; n == \"unix\" {\n\t\t\treturn n, target[m1+1:]\n\t\t}\n\t}\n\tif m2 >= 0 {\n\t\tt, err := url.Parse(target)\n\t\tif err != nil {\n\t\t\treturn net, target\n\t\t}\n\t\tscheme := t.Scheme\n\t\taddr := t.Path\n\t\tif scheme == \"unix\" {\n\t\t\tif addr == \"\" {\n\t\t\t\taddr = t.Host\n\t\t\t}\n\t\t\treturn scheme, addr\n\t\t}\n\t}\n\treturn net, target\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/logging.go",
    "content": "/*\n *\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/grpc/grpclog\"\n\tinternalgrpclog \"google.golang.org/grpc/internal/grpclog\"\n)\n\nvar logger = grpclog.Component(\"transport\")\n\nfunc prefixLoggerForServerTransport(p *http2Server) *internalgrpclog.PrefixLogger {\n\treturn internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(\"[server-transport %p] \", p))\n}\n\nfunc prefixLoggerForServerHandlerTransport(p *serverHandlerTransport) *internalgrpclog.PrefixLogger {\n\treturn internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(\"[server-handler-transport %p] \", p))\n}\n\nfunc prefixLoggerForClientTransport(p *http2Client) *internalgrpclog.PrefixLogger {\n\treturn internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(\"[client-transport %p] \", p))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go",
    "content": "/*\n *\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package networktype declares the network type to be used in the default\n// dialer. Attribute of a resolver.Address.\npackage networktype\n\nimport (\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// keyType is the key to use for storing State in Attributes.\ntype keyType string\n\nconst key = keyType(\"grpc.internal.transport.networktype\")\n\n// Set returns a copy of the provided address with attributes containing networkType.\nfunc Set(address resolver.Address, networkType string) resolver.Address {\n\taddress.Attributes = address.Attributes.WithValue(key, networkType)\n\treturn address\n}\n\n// Get returns the network type in the resolver.Address and true, or \"\", false\n// if not present.\nfunc Get(address resolver.Address) (string, bool) {\n\tv := address.Attributes.Value(key)\n\tif v == nil {\n\t\treturn \"\", false\n\t}\n\treturn v.(string), true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/proxy.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"net/url\"\n\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/proxyattributes\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\nconst proxyAuthHeaderKey = \"Proxy-Authorization\"\n\n// To read a response from a net.Conn, http.ReadResponse() takes a bufio.Reader.\n// It's possible that this reader reads more than what's need for the response\n// and stores those bytes in the buffer. bufConn wraps the original net.Conn\n// and the bufio.Reader to make sure we don't lose the bytes in the buffer.\ntype bufConn struct {\n\tnet.Conn\n\tr io.Reader\n}\n\nfunc (c *bufConn) Read(b []byte) (int, error) {\n\treturn c.r.Read(b)\n}\n\nfunc basicAuth(username, password string) string {\n\tauth := username + \":\" + password\n\treturn base64.StdEncoding.EncodeToString([]byte(auth))\n}\n\nfunc doHTTPConnectHandshake(ctx context.Context, conn net.Conn, grpcUA string, opts proxyattributes.Options) (_ net.Conn, err error) {\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tconn.Close()\n\t\t}\n\t}()\n\n\treq := &http.Request{\n\t\tMethod: http.MethodConnect,\n\t\tURL:    &url.URL{Host: opts.ConnectAddr},\n\t\tHeader: map[string][]string{\"User-Agent\": {grpcUA}},\n\t}\n\tif user := opts.User; user != nil {\n\t\tu := user.Username()\n\t\tp, _ := user.Password()\n\t\treq.Header.Add(proxyAuthHeaderKey, \"Basic \"+basicAuth(u, p))\n\t}\n\tif err := sendHTTPRequest(ctx, req, conn); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to write the HTTP request: %v\", err)\n\t}\n\n\tr := bufio.NewReader(conn)\n\tresp, err := http.ReadResponse(r, req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading server HTTP response: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK {\n\t\tdump, err := httputil.DumpResponse(resp, true)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to do connect handshake, status code: %s\", resp.Status)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"failed to do connect handshake, response: %q\", dump)\n\t}\n\t// The buffer could contain extra bytes from the target server, so we can't\n\t// discard it. However, in many cases where the server waits for the client\n\t// to send the first message (e.g. when TLS is being used), the buffer will\n\t// be empty, so we can avoid the overhead of reading through this buffer.\n\tif r.Buffered() != 0 {\n\t\treturn &bufConn{Conn: conn, r: r}, nil\n\t}\n\treturn conn, nil\n}\n\n// proxyDial establishes a TCP connection to the specified address and performs an HTTP CONNECT handshake.\nfunc proxyDial(ctx context.Context, addr resolver.Address, grpcUA string, opts proxyattributes.Options) (net.Conn, error) {\n\tconn, err := internal.NetDialerWithTCPKeepalive().DialContext(ctx, \"tcp\", addr.Addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn doHTTPConnectHandshake(ctx, conn, grpcUA, opts)\n}\n\nfunc sendHTTPRequest(ctx context.Context, req *http.Request, conn net.Conn) error {\n\treq = req.WithContext(ctx)\n\tif err := req.Write(conn); err != nil {\n\t\treturn fmt.Errorf(\"failed to write the HTTP request: %v\", err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/server_stream.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage transport\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// ServerStream implements streaming functionality for a gRPC server.\ntype ServerStream struct {\n\tStream // Embed for common stream functionality.\n\n\tst      internalServerTransport\n\tctxDone <-chan struct{} // closed at the end of stream.  Cache of ctx.Done() (for performance)\n\t// cancel is invoked at the end of stream to cancel ctx. It also stops the\n\t// timer for monitoring the rpc deadline if configured.\n\tcancel func()\n\n\t// Holds compressor names passed in grpc-accept-encoding metadata from the\n\t// client.\n\tclientAdvertisedCompressors string\n\n\t// hdrMu protects outgoing header and trailer metadata.\n\thdrMu      sync.Mutex\n\theader     metadata.MD // the outgoing header metadata.  Updated by WriteHeader.\n\theaderSent atomic.Bool // atomically set when the headers are sent out.\n\n\theaderWireLength int\n}\n\n// Read reads an n byte message from the input stream.\nfunc (s *ServerStream) Read(n int) (mem.BufferSlice, error) {\n\tb, err := s.Stream.read(n)\n\tif err == nil {\n\t\ts.st.incrMsgRecv()\n\t}\n\treturn b, err\n}\n\n// SendHeader sends the header metadata for the given stream.\nfunc (s *ServerStream) SendHeader(md metadata.MD) error {\n\treturn s.st.writeHeader(s, md)\n}\n\n// Write writes the hdr and data bytes to the output stream.\nfunc (s *ServerStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {\n\treturn s.st.write(s, hdr, data, opts)\n}\n\n// WriteStatus sends the status of a stream to the client.  WriteStatus is\n// the final call made on a stream and always occurs.\nfunc (s *ServerStream) WriteStatus(st *status.Status) error {\n\treturn s.st.writeStatus(s, st)\n}\n\n// isHeaderSent indicates whether headers have been sent.\nfunc (s *ServerStream) isHeaderSent() bool {\n\treturn s.headerSent.Load()\n}\n\n// updateHeaderSent updates headerSent and returns true\n// if it was already set.\nfunc (s *ServerStream) updateHeaderSent() bool {\n\treturn s.headerSent.Swap(true)\n}\n\n// RecvCompress returns the compression algorithm applied to the inbound\n// message. It is empty string if there is no compression applied.\nfunc (s *ServerStream) RecvCompress() string {\n\treturn s.recvCompress\n}\n\n// SendCompress returns the send compressor name.\nfunc (s *ServerStream) SendCompress() string {\n\treturn s.sendCompress\n}\n\n// ContentSubtype returns the content-subtype for a request. For example, a\n// content-subtype of \"proto\" will result in a content-type of\n// \"application/grpc+proto\". This will always be lowercase.  See\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details.\nfunc (s *ServerStream) ContentSubtype() string {\n\treturn s.contentSubtype\n}\n\n// SetSendCompress sets the compression algorithm to the stream.\nfunc (s *ServerStream) SetSendCompress(name string) error {\n\tif s.isHeaderSent() || s.getState() == streamDone {\n\t\treturn errors.New(\"transport: set send compressor called after headers sent or stream done\")\n\t}\n\n\ts.sendCompress = name\n\treturn nil\n}\n\n// SetContext sets the context of the stream. This will be deleted once the\n// stats handler callouts all move to gRPC layer.\nfunc (s *ServerStream) SetContext(ctx context.Context) {\n\ts.ctx = ctx\n}\n\n// ClientAdvertisedCompressors returns the compressor names advertised by the\n// client via grpc-accept-encoding header.\nfunc (s *ServerStream) ClientAdvertisedCompressors() []string {\n\tvalues := strings.Split(s.clientAdvertisedCompressors, \",\")\n\tfor i, v := range values {\n\t\tvalues[i] = strings.TrimSpace(v)\n\t}\n\treturn values\n}\n\n// Header returns the header metadata of the stream.  It returns the out header\n// after t.WriteHeader is called.  It does not block and must not be called\n// until after WriteHeader.\nfunc (s *ServerStream) Header() (metadata.MD, error) {\n\t// Return the header in stream. It will be the out\n\t// header after t.WriteHeader is called.\n\treturn s.header.Copy(), nil\n}\n\n// HeaderWireLength returns the size of the headers of the stream as received\n// from the wire.\nfunc (s *ServerStream) HeaderWireLength() int {\n\treturn s.headerWireLength\n}\n\n// SetHeader sets the header metadata. This can be called multiple times.\n// This should not be called in parallel to other data writes.\nfunc (s *ServerStream) SetHeader(md metadata.MD) error {\n\tif md.Len() == 0 {\n\t\treturn nil\n\t}\n\tif s.isHeaderSent() || s.getState() == streamDone {\n\t\treturn ErrIllegalHeaderWrite\n\t}\n\ts.hdrMu.Lock()\n\ts.header = metadata.Join(s.header, md)\n\ts.hdrMu.Unlock()\n\treturn nil\n}\n\n// SetTrailer sets the trailer metadata which will be sent with the RPC status\n// by the server. This can be called multiple times.\n// This should not be called parallel to other data writes.\nfunc (s *ServerStream) SetTrailer(md metadata.MD) error {\n\tif md.Len() == 0 {\n\t\treturn nil\n\t}\n\tif s.getState() == streamDone {\n\t\treturn ErrIllegalHeaderWrite\n\t}\n\ts.hdrMu.Lock()\n\ts.trailer = metadata.Join(s.trailer, md)\n\ts.hdrMu.Unlock()\n\treturn nil\n}\n\nfunc (s *ServerStream) requestRead(n int) {\n\ts.st.adjustWindow(s, uint32(n))\n}\n\nfunc (s *ServerStream) updateWindow(n int) {\n\ts.st.updateWindow(s, uint32(n))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/internal/transport/transport.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package transport defines and implements message oriented communication\n// channel to complete various transactions (e.g., an RPC).  It is meant for\n// grpc-internal usage and is not intended to be imported directly by users.\npackage transport\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/grpc/tap\"\n)\n\nconst logLevel = 2\n\n// recvMsg represents the received msg from the transport. All transport\n// protocol specific info has been removed.\ntype recvMsg struct {\n\tbuffer mem.Buffer\n\t// nil: received some data\n\t// io.EOF: stream is completed. data is nil.\n\t// other non-nil error: transport failure. data is nil.\n\terr error\n}\n\n// recvBuffer is an unbounded channel of recvMsg structs.\n//\n// Note: recvBuffer differs from buffer.Unbounded only in the fact that it\n// holds a channel of recvMsg structs instead of objects implementing \"item\"\n// interface. recvBuffer is written to much more often and using strict recvMsg\n// structs helps avoid allocation in \"recvBuffer.put\"\ntype recvBuffer struct {\n\tc       chan recvMsg\n\tmu      sync.Mutex\n\tbacklog []recvMsg\n\terr     error\n}\n\n// init allows a recvBuffer to be initialized in-place, which is useful\n// for resetting a buffer or for avoiding a heap allocation when the buffer\n// is embedded in another struct.\nfunc (b *recvBuffer) init() {\n\tb.c = make(chan recvMsg, 1)\n}\n\nfunc (b *recvBuffer) put(r recvMsg) {\n\tb.mu.Lock()\n\tif b.err != nil {\n\t\t// drop the buffer on the floor. Since b.err is not nil, any subsequent reads\n\t\t// will always return an error, making this buffer inaccessible.\n\t\tr.buffer.Free()\n\t\tb.mu.Unlock()\n\t\t// An error had occurred earlier, don't accept more\n\t\t// data or errors.\n\t\treturn\n\t}\n\tb.err = r.err\n\tif len(b.backlog) == 0 {\n\t\tselect {\n\t\tcase b.c <- r:\n\t\t\tb.mu.Unlock()\n\t\t\treturn\n\t\tdefault:\n\t\t}\n\t}\n\tb.backlog = append(b.backlog, r)\n\tb.mu.Unlock()\n}\n\nfunc (b *recvBuffer) load() {\n\tb.mu.Lock()\n\tif len(b.backlog) > 0 {\n\t\tselect {\n\t\tcase b.c <- b.backlog[0]:\n\t\t\tb.backlog[0] = recvMsg{}\n\t\t\tb.backlog = b.backlog[1:]\n\t\tdefault:\n\t\t}\n\t}\n\tb.mu.Unlock()\n}\n\n// get returns the channel that receives a recvMsg in the buffer.\n//\n// Upon receipt of a recvMsg, the caller should call load to send another\n// recvMsg onto the channel if there is any.\nfunc (b *recvBuffer) get() <-chan recvMsg {\n\treturn b.c\n}\n\n// recvBufferReader implements io.Reader interface to read the data from\n// recvBuffer.\ntype recvBufferReader struct {\n\t_            noCopy\n\tclientStream *ClientStream // The client transport stream is closed with a status representing ctx.Err() and nil trailer metadata.\n\tctx          context.Context\n\tctxDone      <-chan struct{} // cache of ctx.Done() (for performance).\n\trecv         *recvBuffer\n\tlast         mem.Buffer // Stores the remaining data in the previous calls.\n\terr          error\n}\n\nfunc (r *recvBufferReader) ReadMessageHeader(header []byte) (n int, err error) {\n\tif r.err != nil {\n\t\treturn 0, r.err\n\t}\n\tif r.last != nil {\n\t\tn, r.last = mem.ReadUnsafe(header, r.last)\n\t\treturn n, nil\n\t}\n\tif r.clientStream != nil {\n\t\tn, r.err = r.readMessageHeaderClient(header)\n\t} else {\n\t\tn, r.err = r.readMessageHeader(header)\n\t}\n\treturn n, r.err\n}\n\n// Read reads the next n bytes from last. If last is drained, it tries to read\n// additional data from recv. It blocks if there no additional data available in\n// recv. If Read returns any non-nil error, it will continue to return that\n// error.\nfunc (r *recvBufferReader) Read(n int) (buf mem.Buffer, err error) {\n\tif r.err != nil {\n\t\treturn nil, r.err\n\t}\n\tif r.last != nil {\n\t\tbuf = r.last\n\t\tif r.last.Len() > n {\n\t\t\tbuf, r.last = mem.SplitUnsafe(buf, n)\n\t\t} else {\n\t\t\tr.last = nil\n\t\t}\n\t\treturn buf, nil\n\t}\n\tif r.clientStream != nil {\n\t\tbuf, r.err = r.readClient(n)\n\t} else {\n\t\tbuf, r.err = r.read(n)\n\t}\n\treturn buf, r.err\n}\n\nfunc (r *recvBufferReader) readMessageHeader(header []byte) (n int, err error) {\n\tselect {\n\tcase <-r.ctxDone:\n\t\treturn 0, ContextErr(r.ctx.Err())\n\tcase m := <-r.recv.get():\n\t\treturn r.readMessageHeaderAdditional(m, header)\n\t}\n}\n\nfunc (r *recvBufferReader) read(n int) (buf mem.Buffer, err error) {\n\tselect {\n\tcase <-r.ctxDone:\n\t\treturn nil, ContextErr(r.ctx.Err())\n\tcase m := <-r.recv.get():\n\t\treturn r.readAdditional(m, n)\n\t}\n}\n\nfunc (r *recvBufferReader) readMessageHeaderClient(header []byte) (n int, err error) {\n\t// If the context is canceled, then closes the stream with nil metadata.\n\t// closeStream writes its error parameter to r.recv as a recvMsg.\n\t// r.readAdditional acts on that message and returns the necessary error.\n\tselect {\n\tcase <-r.ctxDone:\n\t\t// Note that this adds the ctx error to the end of recv buffer, and\n\t\t// reads from the head. This will delay the error until recv buffer is\n\t\t// empty, thus will delay ctx cancellation in Recv().\n\t\t//\n\t\t// It's done this way to fix a race between ctx cancel and trailer. The\n\t\t// race was, stream.Recv() may return ctx error if ctxDone wins the\n\t\t// race, but stream.Trailer() may return a non-nil md because the stream\n\t\t// was not marked as done when trailer is received. This closeStream\n\t\t// call will mark stream as done, thus fix the race.\n\t\t//\n\t\t// TODO: delaying ctx error seems like a unnecessary side effect. What\n\t\t// we really want is to mark the stream as done, and return ctx error\n\t\t// faster.\n\t\tr.clientStream.Close(ContextErr(r.ctx.Err()))\n\t\tm := <-r.recv.get()\n\t\treturn r.readMessageHeaderAdditional(m, header)\n\tcase m := <-r.recv.get():\n\t\treturn r.readMessageHeaderAdditional(m, header)\n\t}\n}\n\nfunc (r *recvBufferReader) readClient(n int) (buf mem.Buffer, err error) {\n\t// If the context is canceled, then closes the stream with nil metadata.\n\t// closeStream writes its error parameter to r.recv as a recvMsg.\n\t// r.readAdditional acts on that message and returns the necessary error.\n\tselect {\n\tcase <-r.ctxDone:\n\t\t// Note that this adds the ctx error to the end of recv buffer, and\n\t\t// reads from the head. This will delay the error until recv buffer is\n\t\t// empty, thus will delay ctx cancellation in Recv().\n\t\t//\n\t\t// It's done this way to fix a race between ctx cancel and trailer. The\n\t\t// race was, stream.Recv() may return ctx error if ctxDone wins the\n\t\t// race, but stream.Trailer() may return a non-nil md because the stream\n\t\t// was not marked as done when trailer is received. This closeStream\n\t\t// call will mark stream as done, thus fix the race.\n\t\t//\n\t\t// TODO: delaying ctx error seems like a unnecessary side effect. What\n\t\t// we really want is to mark the stream as done, and return ctx error\n\t\t// faster.\n\t\tr.clientStream.Close(ContextErr(r.ctx.Err()))\n\t\tm := <-r.recv.get()\n\t\treturn r.readAdditional(m, n)\n\tcase m := <-r.recv.get():\n\t\treturn r.readAdditional(m, n)\n\t}\n}\n\nfunc (r *recvBufferReader) readMessageHeaderAdditional(m recvMsg, header []byte) (n int, err error) {\n\tr.recv.load()\n\tif m.err != nil {\n\t\tif m.buffer != nil {\n\t\t\tm.buffer.Free()\n\t\t}\n\t\treturn 0, m.err\n\t}\n\n\tn, r.last = mem.ReadUnsafe(header, m.buffer)\n\n\treturn n, nil\n}\n\nfunc (r *recvBufferReader) readAdditional(m recvMsg, n int) (b mem.Buffer, err error) {\n\tr.recv.load()\n\tif m.err != nil {\n\t\tif m.buffer != nil {\n\t\t\tm.buffer.Free()\n\t\t}\n\t\treturn nil, m.err\n\t}\n\n\tif m.buffer.Len() > n {\n\t\tm.buffer, r.last = mem.SplitUnsafe(m.buffer, n)\n\t}\n\n\treturn m.buffer, nil\n}\n\ntype streamState uint32\n\nconst (\n\tstreamActive    streamState = iota\n\tstreamWriteDone             // EndStream sent\n\tstreamReadDone              // EndStream received\n\tstreamDone                  // the entire stream is finished.\n)\n\n// Stream represents an RPC in the transport layer.\ntype Stream struct {\n\tctx          context.Context // the associated context of the stream\n\tmethod       string          // the associated RPC method of the stream\n\trecvCompress string\n\tsendCompress string\n\n\treadRequester readRequester\n\n\t// contentSubtype is the content-subtype for requests.\n\t// this must be lowercase or the behavior is undefined.\n\tcontentSubtype string\n\n\ttrailer metadata.MD // the key-value map of trailer metadata.\n\n\t// Non-pointer fields are at the end to optimize GC performance.\n\tstate    streamState\n\tid       uint32\n\tbuf      recvBuffer\n\ttrReader transportReader\n\tfc       inFlow\n\twq       writeQuota\n}\n\n// readRequester is used to state application's intentions to read data. This\n// is used to adjust flow control, if needed.\ntype readRequester interface {\n\trequestRead(int)\n}\n\nfunc (s *Stream) swapState(st streamState) streamState {\n\treturn streamState(atomic.SwapUint32((*uint32)(&s.state), uint32(st)))\n}\n\nfunc (s *Stream) compareAndSwapState(oldState, newState streamState) bool {\n\treturn atomic.CompareAndSwapUint32((*uint32)(&s.state), uint32(oldState), uint32(newState))\n}\n\nfunc (s *Stream) getState() streamState {\n\treturn streamState(atomic.LoadUint32((*uint32)(&s.state)))\n}\n\n// Trailer returns the cached trailer metadata. Note that if it is not called\n// after the entire stream is done, it could return an empty MD.\n// It can be safely read only after stream has ended that is either read\n// or write have returned io.EOF.\nfunc (s *Stream) Trailer() metadata.MD {\n\treturn s.trailer.Copy()\n}\n\n// Context returns the context of the stream.\nfunc (s *Stream) Context() context.Context {\n\treturn s.ctx\n}\n\n// Method returns the method for the stream.\nfunc (s *Stream) Method() string {\n\treturn s.method\n}\n\nfunc (s *Stream) write(m recvMsg) {\n\ts.buf.put(m)\n}\n\n// ReadMessageHeader reads data into the provided header slice from the stream.\n// It first checks if there was an error during a previous read operation and\n// returns it if present. It then requests a read operation for the length of\n// the header. It continues to read from the stream until the entire header\n// slice is filled or an error occurs. If an `io.EOF` error is encountered with\n// partially read data, it is converted to `io.ErrUnexpectedEOF` to indicate an\n// unexpected end of the stream. The method returns any error encountered during\n// the read process or nil if the header was successfully read.\nfunc (s *Stream) ReadMessageHeader(header []byte) (err error) {\n\t// Don't request a read if there was an error earlier\n\tif er := s.trReader.er; er != nil {\n\t\treturn er\n\t}\n\ts.readRequester.requestRead(len(header))\n\tfor len(header) != 0 {\n\t\tn, err := s.trReader.ReadMessageHeader(header)\n\t\theader = header[n:]\n\t\tif len(header) == 0 {\n\t\t\terr = nil\n\t\t}\n\t\tif err != nil {\n\t\t\tif n > 0 && err == io.EOF {\n\t\t\t\terr = io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Read reads n bytes from the wire for this stream.\nfunc (s *Stream) read(n int) (data mem.BufferSlice, err error) {\n\t// Don't request a read if there was an error earlier\n\tif er := s.trReader.er; er != nil {\n\t\treturn nil, er\n\t}\n\ts.readRequester.requestRead(n)\n\tfor n != 0 {\n\t\tbuf, err := s.trReader.Read(n)\n\t\tvar bufLen int\n\t\tif buf != nil {\n\t\t\tbufLen = buf.Len()\n\t\t}\n\t\tn -= bufLen\n\t\tif n == 0 {\n\t\t\terr = nil\n\t\t}\n\t\tif err != nil {\n\t\t\tif bufLen > 0 && err == io.EOF {\n\t\t\t\terr = io.ErrUnexpectedEOF\n\t\t\t}\n\t\t\tdata.Free()\n\t\t\treturn nil, err\n\t\t}\n\t\tdata = append(data, buf)\n\t}\n\treturn data, nil\n}\n\n// noCopy may be embedded into structs which must not be copied\n// after the first use.\n//\n// See https://golang.org/issues/8005#issuecomment-190753527\n// for details.\ntype noCopy struct {\n}\n\nfunc (*noCopy) Lock()   {}\nfunc (*noCopy) Unlock() {}\n\n// transportReader reads all the data available for this Stream from the transport and\n// passes them into the decoder, which converts them into a gRPC message stream.\n// The error is io.EOF when the stream is done or another non-nil error if\n// the stream broke.\ntype transportReader struct {\n\t_ noCopy\n\t// The handler to control the window update procedure for both this\n\t// particular stream and the associated transport.\n\twindowHandler windowHandler\n\ter            error\n\treader        recvBufferReader\n}\n\n// The handler to control the window update procedure for both this\n// particular stream and the associated transport.\ntype windowHandler interface {\n\tupdateWindow(int)\n}\n\nfunc (t *transportReader) ReadMessageHeader(header []byte) (int, error) {\n\tn, err := t.reader.ReadMessageHeader(header)\n\tif err != nil {\n\t\tt.er = err\n\t\treturn 0, err\n\t}\n\tt.windowHandler.updateWindow(n)\n\treturn n, nil\n}\n\nfunc (t *transportReader) Read(n int) (mem.Buffer, error) {\n\tbuf, err := t.reader.Read(n)\n\tif err != nil {\n\t\tt.er = err\n\t\treturn buf, err\n\t}\n\tt.windowHandler.updateWindow(buf.Len())\n\treturn buf, nil\n}\n\n// GoString is implemented by Stream so context.String() won't\n// race when printing %#v.\nfunc (s *Stream) GoString() string {\n\treturn fmt.Sprintf(\"<stream: %p, %v>\", s, s.method)\n}\n\n// state of transport\ntype transportState int\n\nconst (\n\treachable transportState = iota\n\tclosing\n\tdraining\n)\n\n// ServerConfig consists of all the configurations to establish a server transport.\ntype ServerConfig struct {\n\tMaxStreams            uint32\n\tConnectionTimeout     time.Duration\n\tCredentials           credentials.TransportCredentials\n\tInTapHandle           tap.ServerInHandle\n\tStatsHandler          stats.Handler\n\tKeepaliveParams       keepalive.ServerParameters\n\tKeepalivePolicy       keepalive.EnforcementPolicy\n\tInitialWindowSize     int32\n\tInitialConnWindowSize int32\n\tWriteBufferSize       int\n\tReadBufferSize        int\n\tSharedWriteBuffer     bool\n\tChannelzParent        *channelz.Server\n\tMaxHeaderListSize     *uint32\n\tHeaderTableSize       *uint32\n\tBufferPool            mem.BufferPool\n\tStaticWindowSize      bool\n}\n\n// ConnectOptions covers all relevant options for communicating with the server.\ntype ConnectOptions struct {\n\t// UserAgent is the application user agent.\n\tUserAgent string\n\t// Dialer specifies how to dial a network address.\n\tDialer func(context.Context, string) (net.Conn, error)\n\t// FailOnNonTempDialError specifies if gRPC fails on non-temporary dial errors.\n\tFailOnNonTempDialError bool\n\t// PerRPCCredentials stores the PerRPCCredentials required to issue RPCs.\n\tPerRPCCredentials []credentials.PerRPCCredentials\n\t// TransportCredentials stores the Authenticator required to setup a client\n\t// connection. Only one of TransportCredentials and CredsBundle is non-nil.\n\tTransportCredentials credentials.TransportCredentials\n\t// CredsBundle is the credentials bundle to be used. Only one of\n\t// TransportCredentials and CredsBundle is non-nil.\n\tCredsBundle credentials.Bundle\n\t// KeepaliveParams stores the keepalive parameters.\n\tKeepaliveParams keepalive.ClientParameters\n\t// StatsHandlers stores the handler for stats.\n\tStatsHandlers []stats.Handler\n\t// InitialWindowSize sets the initial window size for a stream.\n\tInitialWindowSize int32\n\t// InitialConnWindowSize sets the initial window size for a connection.\n\tInitialConnWindowSize int32\n\t// WriteBufferSize sets the size of write buffer which in turn determines how much data can be batched before it's written on the wire.\n\tWriteBufferSize int\n\t// ReadBufferSize sets the size of read buffer, which in turn determines how much data can be read at most for one read syscall.\n\tReadBufferSize int\n\t// SharedWriteBuffer indicates whether connections should reuse write buffer\n\tSharedWriteBuffer bool\n\t// ChannelzParent sets the addrConn id which initiated the creation of this client transport.\n\tChannelzParent *channelz.SubChannel\n\t// MaxHeaderListSize sets the max (uncompressed) size of header list that is prepared to be received.\n\tMaxHeaderListSize *uint32\n\t// The mem.BufferPool to use when reading/writing to the wire.\n\tBufferPool mem.BufferPool\n\t// StaticWindowSize controls whether dynamic window sizing is enabled.\n\tStaticWindowSize bool\n}\n\n// WriteOptions provides additional hints and information for message\n// transmission.\ntype WriteOptions struct {\n\t// Last indicates whether this write is the last piece for\n\t// this stream.\n\tLast bool\n}\n\n// CallHdr carries the information of a particular RPC.\ntype CallHdr struct {\n\t// Host specifies the peer's host.\n\tHost string\n\n\t// Method specifies the operation to perform.\n\tMethod string\n\n\t// SendCompress specifies the compression algorithm applied on\n\t// outbound message.\n\tSendCompress string\n\n\t// AcceptedCompressors overrides the grpc-accept-encoding header for this\n\t// call. When nil, the transport advertises the default set of registered\n\t// compressors. A non-nil pointer overrides that value (including the empty\n\t// string to advertise none).\n\tAcceptedCompressors *string\n\n\t// Creds specifies credentials.PerRPCCredentials for a call.\n\tCreds credentials.PerRPCCredentials\n\n\t// ContentSubtype specifies the content-subtype for a request. For example, a\n\t// content-subtype of \"proto\" will result in a content-type of\n\t// \"application/grpc+proto\". The value of ContentSubtype must be all\n\t// lowercase, otherwise the behavior is undefined. See\n\t// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests\n\t// for more details.\n\tContentSubtype string\n\n\tPreviousAttempts int // value of grpc-previous-rpc-attempts header to set\n\n\tDoneFunc func() // called when the stream is finished\n\n\t// Authority is used to explicitly override the `:authority` header. If set,\n\t// this value takes precedence over the Host field and will be used as the\n\t// value for the `:authority` header.\n\tAuthority string\n}\n\n// ClientTransport is the common interface for all gRPC client-side transport\n// implementations.\ntype ClientTransport interface {\n\t// Close tears down this transport. Once it returns, the transport\n\t// should not be accessed any more. The caller must make sure this\n\t// is called only once.\n\tClose(err error)\n\n\t// GracefulClose starts to tear down the transport: the transport will stop\n\t// accepting new RPCs and NewStream will return error. Once all streams are\n\t// finished, the transport will close.\n\t//\n\t// It does not block.\n\tGracefulClose()\n\n\t// NewStream creates a Stream for an RPC.\n\tNewStream(ctx context.Context, callHdr *CallHdr) (*ClientStream, error)\n\n\t// Error returns a channel that is closed when some I/O error\n\t// happens. Typically the caller should have a goroutine to monitor\n\t// this in order to take action (e.g., close the current transport\n\t// and create a new one) in error case. It should not return nil\n\t// once the transport is initiated.\n\tError() <-chan struct{}\n\n\t// GoAway returns a channel that is closed when ClientTransport\n\t// receives the draining signal from the server (e.g., GOAWAY frame in\n\t// HTTP/2).\n\tGoAway() <-chan struct{}\n\n\t// GetGoAwayReason returns the reason why GoAway frame was received, along\n\t// with a human readable string with debug info.\n\tGetGoAwayReason() (GoAwayReason, string)\n\n\t// Peer returns information about the peer associated with the Transport.\n\t// The returned information includes authentication and network address details.\n\tPeer() *peer.Peer\n}\n\n// ServerTransport is the common interface for all gRPC server-side transport\n// implementations.\n//\n// Methods may be called concurrently from multiple goroutines, but\n// Write methods for a given Stream will be called serially.\ntype ServerTransport interface {\n\t// HandleStreams receives incoming streams using the given handler.\n\tHandleStreams(context.Context, func(*ServerStream))\n\n\t// Close tears down the transport. Once it is called, the transport\n\t// should not be accessed any more. All the pending streams and their\n\t// handlers will be terminated asynchronously.\n\tClose(err error)\n\n\t// Peer returns the peer of the server transport.\n\tPeer() *peer.Peer\n\n\t// Drain notifies the client this ServerTransport stops accepting new RPCs.\n\tDrain(debugData string)\n}\n\ntype internalServerTransport interface {\n\tServerTransport\n\twriteHeader(s *ServerStream, md metadata.MD) error\n\twrite(s *ServerStream, hdr []byte, data mem.BufferSlice, opts *WriteOptions) error\n\twriteStatus(s *ServerStream, st *status.Status) error\n\tincrMsgRecv()\n\tadjustWindow(s *ServerStream, n uint32)\n\tupdateWindow(s *ServerStream, n uint32)\n}\n\n// connectionErrorf creates an ConnectionError with the specified error description.\nfunc connectionErrorf(temp bool, e error, format string, a ...any) ConnectionError {\n\treturn ConnectionError{\n\t\tDesc: fmt.Sprintf(format, a...),\n\t\ttemp: temp,\n\t\terr:  e,\n\t}\n}\n\n// ConnectionError is an error that results in the termination of the\n// entire connection and the retry of all the active streams.\ntype ConnectionError struct {\n\tDesc string\n\ttemp bool\n\terr  error\n}\n\nfunc (e ConnectionError) Error() string {\n\treturn fmt.Sprintf(\"connection error: desc = %q\", e.Desc)\n}\n\n// Temporary indicates if this connection error is temporary or fatal.\nfunc (e ConnectionError) Temporary() bool {\n\treturn e.temp\n}\n\n// Origin returns the original error of this connection error.\nfunc (e ConnectionError) Origin() error {\n\t// Never return nil error here.\n\t// If the original error is nil, return itself.\n\tif e.err == nil {\n\t\treturn e\n\t}\n\treturn e.err\n}\n\n// Unwrap returns the original error of this connection error or nil when the\n// origin is nil.\nfunc (e ConnectionError) Unwrap() error {\n\treturn e.err\n}\n\nvar (\n\t// ErrConnClosing indicates that the transport is closing.\n\tErrConnClosing = connectionErrorf(true, nil, \"transport is closing\")\n\t// errStreamDrain indicates that the stream is rejected because the\n\t// connection is draining. This could be caused by goaway or balancer\n\t// removing the address.\n\terrStreamDrain = status.Error(codes.Unavailable, \"the connection is draining\")\n\t// errStreamDone is returned from write at the client side to indicate application\n\t// layer of an error.\n\terrStreamDone = errors.New(\"the stream is done\")\n\t// StatusGoAway indicates that the server sent a GOAWAY that included this\n\t// stream's ID in unprocessed RPCs.\n\tstatusGoAway = status.New(codes.Unavailable, \"the stream is rejected because server is draining the connection\")\n)\n\n// GoAwayReason contains the reason for the GoAway frame received.\ntype GoAwayReason uint8\n\nconst (\n\t// GoAwayInvalid indicates that no GoAway frame is received.\n\tGoAwayInvalid GoAwayReason = 0\n\t// GoAwayNoReason is the default value when GoAway frame is received.\n\tGoAwayNoReason GoAwayReason = 1\n\t// GoAwayTooManyPings indicates that a GoAway frame with\n\t// ErrCodeEnhanceYourCalm was received and that the debug data said\n\t// \"too_many_pings\".\n\tGoAwayTooManyPings GoAwayReason = 2\n)\n\n// ContextErr converts the error from context package into a status error.\nfunc ContextErr(err error) error {\n\tswitch err {\n\tcase context.DeadlineExceeded:\n\t\treturn status.Error(codes.DeadlineExceeded, err.Error())\n\tcase context.Canceled:\n\t\treturn status.Error(codes.Canceled, err.Error())\n\t}\n\treturn status.Errorf(codes.Internal, \"Unexpected error from context packet: %v\", err)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/keepalive/keepalive.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package keepalive defines configurable parameters for point-to-point\n// healthcheck.\npackage keepalive\n\nimport (\n\t\"time\"\n)\n\n// ClientParameters is used to set keepalive parameters on the client-side.\n// These configure how the client will actively probe to notice when a\n// connection is broken and send pings so intermediaries will be aware of the\n// liveness of the connection. Make sure these parameters are set in\n// coordination with the keepalive policy on the server, as incompatible\n// settings can result in closing of connection.\ntype ClientParameters struct {\n\t// After a duration of this time if the client doesn't see any activity it\n\t// pings the server to see if the transport is still alive.\n\t// If set below 10s, a minimum value of 10s will be used instead.\n\t//\n\t// Note that gRPC servers have a default EnforcementPolicy.MinTime of 5\n\t// minutes (which means the client shouldn't ping more frequently than every\n\t// 5 minutes).\n\t//\n\t// Though not ideal, it's not a strong requirement for Time to be less than\n\t// EnforcementPolicy.MinTime.  Time will automatically double if the server\n\t// disconnects due to its enforcement policy.\n\t//\n\t// For more details, see\n\t// https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md\n\tTime time.Duration\n\t// After having pinged for keepalive check, the client waits for a duration\n\t// of Timeout and if no activity is seen even after that the connection is\n\t// closed.\n\t//\n\t// If keepalive is enabled, and this value is not explicitly set, the default\n\t// is 20 seconds.\n\tTimeout time.Duration\n\t// If true, client sends keepalive pings even with no active RPCs. If false,\n\t// when there are no active RPCs, Time and Timeout will be ignored and no\n\t// keepalive pings will be sent.\n\tPermitWithoutStream bool\n}\n\n// ServerParameters is used to set keepalive and max-age parameters on the\n// server-side.\ntype ServerParameters struct {\n\t// MaxConnectionIdle is a duration for the amount of time after which an\n\t// idle connection would be closed by sending a GoAway. Idleness duration is\n\t// defined since the most recent time the number of outstanding RPCs became\n\t// zero or the connection establishment.\n\tMaxConnectionIdle time.Duration // The current default value is infinity.\n\t// MaxConnectionAge is a duration for the maximum amount of time a\n\t// connection may exist before it will be closed by sending a GoAway. A\n\t// random jitter of +/-10% will be added to MaxConnectionAge to spread out\n\t// connection storms.\n\tMaxConnectionAge time.Duration // The current default value is infinity.\n\t// MaxConnectionAgeGrace is an additive period after MaxConnectionAge after\n\t// which the connection will be forcibly closed.\n\tMaxConnectionAgeGrace time.Duration // The current default value is infinity.\n\t// After a duration of this time if the server doesn't see any activity it\n\t// pings the client to see if the transport is still alive.\n\t// If set below 1s, a minimum value of 1s will be used instead.\n\tTime time.Duration // The current default value is 2 hours.\n\t// After having pinged for keepalive check, the server waits for a duration\n\t// of Timeout and if no activity is seen even after that the connection is\n\t// closed.\n\tTimeout time.Duration // The current default value is 20 seconds.\n}\n\n// EnforcementPolicy is used to set keepalive enforcement policy on the\n// server-side. Server will close connection with a client that violates this\n// policy.\ntype EnforcementPolicy struct {\n\t// MinTime is the minimum amount of time a client should wait before sending\n\t// a keepalive ping.\n\tMinTime time.Duration // The current default value is 5 minutes.\n\t// If true, server allows keepalive pings even when there are no active\n\t// streams(RPCs). If false, and client sends ping when there are no active\n\t// streams, server will send GOAWAY and close the connection.\n\tPermitWithoutStream bool // false by default.\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/mem/buffer_pool.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage mem\n\nimport (\n\t\"sort\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/internal\"\n)\n\n// BufferPool is a pool of buffers that can be shared and reused, resulting in\n// decreased memory allocation.\ntype BufferPool interface {\n\t// Get returns a buffer with specified length from the pool.\n\tGet(length int) *[]byte\n\n\t// Put returns a buffer to the pool.\n\t//\n\t// The provided pointer must hold a prefix of the buffer obtained via\n\t// BufferPool.Get to ensure the buffer's entire capacity can be re-used.\n\tPut(*[]byte)\n}\n\nconst goPageSize = 4 << 10 // 4KiB. N.B. this must be a power of 2.\n\nvar defaultBufferPoolSizes = []int{\n\t256,\n\tgoPageSize,\n\t16 << 10, // 16KB (max HTTP/2 frame size used by gRPC)\n\t32 << 10, // 32KB (default buffer size for io.Copy)\n\t1 << 20,  // 1MB\n}\n\nvar defaultBufferPool BufferPool\n\nfunc init() {\n\tdefaultBufferPool = NewTieredBufferPool(defaultBufferPoolSizes...)\n\n\tinternal.SetDefaultBufferPoolForTesting = func(pool BufferPool) {\n\t\tdefaultBufferPool = pool\n\t}\n\n\tinternal.SetBufferPoolingThresholdForTesting = func(threshold int) {\n\t\tbufferPoolingThreshold = threshold\n\t}\n}\n\n// DefaultBufferPool returns the current default buffer pool. It is a BufferPool\n// created with NewBufferPool that uses a set of default sizes optimized for\n// expected workflows.\nfunc DefaultBufferPool() BufferPool {\n\treturn defaultBufferPool\n}\n\n// NewTieredBufferPool returns a BufferPool implementation that uses multiple\n// underlying pools of the given pool sizes.\nfunc NewTieredBufferPool(poolSizes ...int) BufferPool {\n\tsort.Ints(poolSizes)\n\tpools := make([]*sizedBufferPool, len(poolSizes))\n\tfor i, s := range poolSizes {\n\t\tpools[i] = newSizedBufferPool(s)\n\t}\n\treturn &tieredBufferPool{\n\t\tsizedPools: pools,\n\t}\n}\n\n// tieredBufferPool implements the BufferPool interface with multiple tiers of\n// buffer pools for different sizes of buffers.\ntype tieredBufferPool struct {\n\tsizedPools   []*sizedBufferPool\n\tfallbackPool simpleBufferPool\n}\n\nfunc (p *tieredBufferPool) Get(size int) *[]byte {\n\treturn p.getPool(size).Get(size)\n}\n\nfunc (p *tieredBufferPool) Put(buf *[]byte) {\n\tp.getPool(cap(*buf)).Put(buf)\n}\n\nfunc (p *tieredBufferPool) getPool(size int) BufferPool {\n\tpoolIdx := sort.Search(len(p.sizedPools), func(i int) bool {\n\t\treturn p.sizedPools[i].defaultSize >= size\n\t})\n\n\tif poolIdx == len(p.sizedPools) {\n\t\treturn &p.fallbackPool\n\t}\n\n\treturn p.sizedPools[poolIdx]\n}\n\n// sizedBufferPool is a BufferPool implementation that is optimized for specific\n// buffer sizes. For example, HTTP/2 frames within gRPC have a default max size\n// of 16kb and a sizedBufferPool can be configured to only return buffers with a\n// capacity of 16kb. Note that however it does not support returning larger\n// buffers and in fact panics if such a buffer is requested. Because of this,\n// this BufferPool implementation is not meant to be used on its own and rather\n// is intended to be embedded in a tieredBufferPool such that Get is only\n// invoked when the required size is smaller than or equal to defaultSize.\ntype sizedBufferPool struct {\n\tpool        sync.Pool\n\tdefaultSize int\n}\n\nfunc (p *sizedBufferPool) Get(size int) *[]byte {\n\tbuf, ok := p.pool.Get().(*[]byte)\n\tif !ok {\n\t\tbuf := make([]byte, size, p.defaultSize)\n\t\treturn &buf\n\t}\n\tb := *buf\n\tclear(b[:cap(b)])\n\t*buf = b[:size]\n\treturn buf\n}\n\nfunc (p *sizedBufferPool) Put(buf *[]byte) {\n\tif cap(*buf) < p.defaultSize {\n\t\t// Ignore buffers that are too small to fit in the pool. Otherwise, when\n\t\t// Get is called it will panic as it tries to index outside the bounds\n\t\t// of the buffer.\n\t\treturn\n\t}\n\tp.pool.Put(buf)\n}\n\nfunc newSizedBufferPool(size int) *sizedBufferPool {\n\treturn &sizedBufferPool{\n\t\tdefaultSize: size,\n\t}\n}\n\nvar _ BufferPool = (*simpleBufferPool)(nil)\n\n// simpleBufferPool is an implementation of the BufferPool interface that\n// attempts to pool buffers with a sync.Pool. When Get is invoked, it tries to\n// acquire a buffer from the pool but if that buffer is too small, it returns it\n// to the pool and creates a new one.\ntype simpleBufferPool struct {\n\tpool sync.Pool\n}\n\nfunc (p *simpleBufferPool) Get(size int) *[]byte {\n\tbs, ok := p.pool.Get().(*[]byte)\n\tif ok && cap(*bs) >= size {\n\t\tclear((*bs)[:cap(*bs)])\n\t\t*bs = (*bs)[:size]\n\t\treturn bs\n\t}\n\n\t// A buffer was pulled from the pool, but it is too small. Put it back in\n\t// the pool and create one large enough.\n\tif ok {\n\t\tp.pool.Put(bs)\n\t}\n\n\t// If we're going to allocate, round up to the nearest page. This way if\n\t// requests frequently arrive with small variation we don't allocate\n\t// repeatedly if we get unlucky and they increase over time. By default we\n\t// only allocate here if size > 1MiB. Because goPageSize is a power of 2, we\n\t// can round up efficiently.\n\tallocSize := (size + goPageSize - 1) & ^(goPageSize - 1)\n\n\tb := make([]byte, size, allocSize)\n\treturn &b\n}\n\nfunc (p *simpleBufferPool) Put(buf *[]byte) {\n\tp.pool.Put(buf)\n}\n\nvar _ BufferPool = NopBufferPool{}\n\n// NopBufferPool is a buffer pool that returns new buffers without pooling.\ntype NopBufferPool struct{}\n\n// Get returns a buffer with specified length from the pool.\nfunc (NopBufferPool) Get(length int) *[]byte {\n\tb := make([]byte, length)\n\treturn &b\n}\n\n// Put returns a buffer to the pool.\nfunc (NopBufferPool) Put(*[]byte) {\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/mem/buffer_slice.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage mem\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\nconst (\n\t// 32 KiB is what io.Copy uses.\n\treadAllBufSize = 32 * 1024\n)\n\n// BufferSlice offers a means to represent data that spans one or more Buffer\n// instances. A BufferSlice is meant to be immutable after creation, and methods\n// like Ref create and return copies of the slice. This is why all methods have\n// value receivers rather than pointer receivers.\n//\n// Note that any of the methods that read the underlying buffers such as Ref,\n// Len or CopyTo etc., will panic if any underlying buffers have already been\n// freed. It is recommended to not directly interact with any of the underlying\n// buffers directly, rather such interactions should be mediated through the\n// various methods on this type.\n//\n// By convention, any APIs that return (mem.BufferSlice, error) should reduce\n// the burden on the caller by never returning a mem.BufferSlice that needs to\n// be freed if the error is non-nil, unless explicitly stated.\ntype BufferSlice []Buffer\n\n// Len returns the sum of the length of all the Buffers in this slice.\n//\n// # Warning\n//\n// Invoking the built-in len on a BufferSlice will return the number of buffers\n// in the slice, and *not* the value returned by this function.\nfunc (s BufferSlice) Len() int {\n\tvar length int\n\tfor _, b := range s {\n\t\tlength += b.Len()\n\t}\n\treturn length\n}\n\n// Ref invokes Ref on each buffer in the slice.\nfunc (s BufferSlice) Ref() {\n\tfor _, b := range s {\n\t\tb.Ref()\n\t}\n}\n\n// Free invokes Buffer.Free() on each Buffer in the slice.\nfunc (s BufferSlice) Free() {\n\tfor _, b := range s {\n\t\tb.Free()\n\t}\n}\n\n// CopyTo copies each of the underlying Buffer's data into the given buffer,\n// returning the number of bytes copied. Has the same semantics as the copy\n// builtin in that it will copy as many bytes as it can, stopping when either dst\n// is full or s runs out of data, returning the minimum of s.Len() and len(dst).\nfunc (s BufferSlice) CopyTo(dst []byte) int {\n\toff := 0\n\tfor _, b := range s {\n\t\toff += copy(dst[off:], b.ReadOnlyData())\n\t}\n\treturn off\n}\n\n// Materialize concatenates all the underlying Buffer's data into a single\n// contiguous buffer using CopyTo.\nfunc (s BufferSlice) Materialize() []byte {\n\tl := s.Len()\n\tif l == 0 {\n\t\treturn nil\n\t}\n\tout := make([]byte, l)\n\ts.CopyTo(out)\n\treturn out\n}\n\n// MaterializeToBuffer functions like Materialize except that it writes the data\n// to a single Buffer pulled from the given BufferPool.\n//\n// As a special case, if the input BufferSlice only actually has one Buffer, this\n// function simply increases the refcount before returning said Buffer. Freeing this\n// buffer won't release it until the BufferSlice is itself released.\nfunc (s BufferSlice) MaterializeToBuffer(pool BufferPool) Buffer {\n\tif len(s) == 1 {\n\t\ts[0].Ref()\n\t\treturn s[0]\n\t}\n\tsLen := s.Len()\n\tif sLen == 0 {\n\t\treturn emptyBuffer{}\n\t}\n\tbuf := pool.Get(sLen)\n\ts.CopyTo(*buf)\n\treturn NewBuffer(buf, pool)\n}\n\n// Reader returns a new Reader for the input slice after taking references to\n// each underlying buffer.\nfunc (s BufferSlice) Reader() *Reader {\n\ts.Ref()\n\treturn &Reader{\n\t\tdata: s,\n\t\tlen:  s.Len(),\n\t}\n}\n\n// Reader exposes a BufferSlice's data as an io.Reader, allowing it to interface\n// with other systems.\n//\n// Buffers will be freed as they are read.\n//\n// A Reader can be constructed from a BufferSlice; alternatively the zero value\n// of a Reader may be used after calling Reset on it.\ntype Reader struct {\n\tdata BufferSlice\n\tlen  int\n\t// The index into data[0].ReadOnlyData().\n\tbufferIdx int\n}\n\n// Remaining returns the number of unread bytes remaining in the slice.\nfunc (r *Reader) Remaining() int {\n\treturn r.len\n}\n\n// Reset frees the currently held buffer slice and starts reading from the\n// provided slice. This allows reusing the reader object.\nfunc (r *Reader) Reset(s BufferSlice) {\n\tr.data.Free()\n\ts.Ref()\n\tr.data = s\n\tr.len = s.Len()\n\tr.bufferIdx = 0\n}\n\n// Close frees the underlying BufferSlice and never returns an error. Subsequent\n// calls to Read will return (0, io.EOF).\nfunc (r *Reader) Close() error {\n\tr.data.Free()\n\tr.data = nil\n\tr.len = 0\n\treturn nil\n}\n\nfunc (r *Reader) freeFirstBufferIfEmpty() bool {\n\tif len(r.data) == 0 || r.bufferIdx != len(r.data[0].ReadOnlyData()) {\n\t\treturn false\n\t}\n\n\tr.data[0].Free()\n\tr.data = r.data[1:]\n\tr.bufferIdx = 0\n\treturn true\n}\n\nfunc (r *Reader) Read(buf []byte) (n int, _ error) {\n\tif r.len == 0 {\n\t\treturn 0, io.EOF\n\t}\n\n\tfor len(buf) != 0 && r.len != 0 {\n\t\t// Copy as much as possible from the first Buffer in the slice into the\n\t\t// given byte slice.\n\t\tdata := r.data[0].ReadOnlyData()\n\t\tcopied := copy(buf, data[r.bufferIdx:])\n\t\tr.len -= copied       // Reduce len by the number of bytes copied.\n\t\tr.bufferIdx += copied // Increment the buffer index.\n\t\tn += copied           // Increment the total number of bytes read.\n\t\tbuf = buf[copied:]    // Shrink the given byte slice.\n\n\t\t// If we have copied all the data from the first Buffer, free it and advance to\n\t\t// the next in the slice.\n\t\tr.freeFirstBufferIfEmpty()\n\t}\n\n\treturn n, nil\n}\n\n// ReadByte reads a single byte.\nfunc (r *Reader) ReadByte() (byte, error) {\n\tif r.len == 0 {\n\t\treturn 0, io.EOF\n\t}\n\n\t// There may be any number of empty buffers in the slice, clear them all until a\n\t// non-empty buffer is reached. This is guaranteed to exit since r.len is not 0.\n\tfor r.freeFirstBufferIfEmpty() {\n\t}\n\n\tb := r.data[0].ReadOnlyData()[r.bufferIdx]\n\tr.len--\n\tr.bufferIdx++\n\t// Free the first buffer in the slice if the last byte was read\n\tr.freeFirstBufferIfEmpty()\n\treturn b, nil\n}\n\nvar _ io.Writer = (*writer)(nil)\n\ntype writer struct {\n\tbuffers *BufferSlice\n\tpool    BufferPool\n}\n\nfunc (w *writer) Write(p []byte) (n int, err error) {\n\tb := Copy(p, w.pool)\n\t*w.buffers = append(*w.buffers, b)\n\treturn b.Len(), nil\n}\n\n// NewWriter wraps the given BufferSlice and BufferPool to implement the\n// io.Writer interface. Every call to Write copies the contents of the given\n// buffer into a new Buffer pulled from the given pool and the Buffer is\n// added to the given BufferSlice.\nfunc NewWriter(buffers *BufferSlice, pool BufferPool) io.Writer {\n\treturn &writer{buffers: buffers, pool: pool}\n}\n\n// ReadAll reads from r until an error or EOF and returns the data it read.\n// A successful call returns err == nil, not err == EOF. Because ReadAll is\n// defined to read from src until EOF, it does not treat an EOF from Read\n// as an error to be reported.\n//\n// Important: A failed call returns a non-nil error and may also return\n// partially read buffers. It is the responsibility of the caller to free the\n// BufferSlice returned, or its memory will not be reused.\nfunc ReadAll(r io.Reader, pool BufferPool) (BufferSlice, error) {\n\tvar result BufferSlice\n\tif wt, ok := r.(io.WriterTo); ok {\n\t\t// This is more optimal since wt knows the size of chunks it wants to\n\t\t// write and, hence, we can allocate buffers of an optimal size to fit\n\t\t// them. E.g. might be a single big chunk, and we wouldn't chop it\n\t\t// into pieces.\n\t\tw := NewWriter(&result, pool)\n\t\t_, err := wt.WriteTo(w)\n\t\treturn result, err\n\t}\nnextBuffer:\n\tfor {\n\t\tbuf := pool.Get(readAllBufSize)\n\t\t// We asked for 32KiB but may have been given a bigger buffer.\n\t\t// Use all of it if that's the case.\n\t\t*buf = (*buf)[:cap(*buf)]\n\t\tusedCap := 0\n\t\tfor {\n\t\t\tn, err := r.Read((*buf)[usedCap:])\n\t\t\tusedCap += n\n\t\t\tif err != nil {\n\t\t\t\tif usedCap == 0 {\n\t\t\t\t\t// Nothing in this buf, put it back\n\t\t\t\t\tpool.Put(buf)\n\t\t\t\t} else {\n\t\t\t\t\t*buf = (*buf)[:usedCap]\n\t\t\t\t\tresult = append(result, NewBuffer(buf, pool))\n\t\t\t\t}\n\t\t\t\tif err == io.EOF {\n\t\t\t\t\terr = nil\n\t\t\t\t}\n\t\t\t\treturn result, err\n\t\t\t}\n\t\t\tif len(*buf) == usedCap {\n\t\t\t\tresult = append(result, NewBuffer(buf, pool))\n\t\t\t\tcontinue nextBuffer\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Discard skips the next n bytes, returning the number of bytes discarded.\n//\n// It frees buffers as they are fully consumed.\n//\n// If Discard skips fewer than n bytes, it also returns an error.\nfunc (r *Reader) Discard(n int) (discarded int, err error) {\n\ttotal := n\n\tfor n > 0 && r.len > 0 {\n\t\tcurData := r.data[0].ReadOnlyData()\n\t\tcurSize := min(n, len(curData)-r.bufferIdx)\n\t\tn -= curSize\n\t\tr.len -= curSize\n\t\tr.bufferIdx += curSize\n\t\tif r.bufferIdx >= len(curData) {\n\t\t\tr.data[0].Free()\n\t\t\tr.data = r.data[1:]\n\t\t\tr.bufferIdx = 0\n\t\t}\n\t}\n\tdiscarded = total - n\n\tif n > 0 {\n\t\treturn discarded, fmt.Errorf(\"insufficient bytes in reader\")\n\t}\n\treturn discarded, nil\n}\n\n// Peek returns the next n bytes without advancing the reader.\n//\n// Peek appends results to the provided res slice and returns the updated slice.\n// This pattern allows re-using the storage of res if it has sufficient\n// capacity.\n//\n// The returned subslices are views into the underlying buffers and are only\n// valid until the reader is advanced past the corresponding buffer.\n//\n// If Peek returns fewer than n bytes, it also returns an error.\nfunc (r *Reader) Peek(n int, res [][]byte) ([][]byte, error) {\n\tfor i := 0; n > 0 && i < len(r.data); i++ {\n\t\tcurData := r.data[i].ReadOnlyData()\n\t\tstart := 0\n\t\tif i == 0 {\n\t\t\tstart = r.bufferIdx\n\t\t}\n\t\tcurSize := min(n, len(curData)-start)\n\t\tif curSize == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tres = append(res, curData[start:start+curSize])\n\t\tn -= curSize\n\t}\n\tif n > 0 {\n\t\treturn nil, fmt.Errorf(\"insufficient bytes in reader\")\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/mem/buffers.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package mem provides utilities that facilitate memory reuse in byte slices\n// that are used as buffers.\n//\n// # Experimental\n//\n// Notice: All APIs in this package are EXPERIMENTAL and may be changed or\n// removed in a later release.\npackage mem\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"sync/atomic\"\n)\n\n// A Buffer represents a reference counted piece of data (in bytes) that can be\n// acquired by a call to NewBuffer() or Copy(). A reference to a Buffer may be\n// released by calling Free(), which invokes the free function given at creation\n// only after all references are released.\n//\n// Note that a Buffer is not safe for concurrent access and instead each\n// goroutine should use its own reference to the data, which can be acquired via\n// a call to Ref().\n//\n// Attempts to access the underlying data after releasing the reference to the\n// Buffer will panic.\ntype Buffer interface {\n\t// ReadOnlyData returns the underlying byte slice. Note that it is undefined\n\t// behavior to modify the contents of this slice in any way.\n\tReadOnlyData() []byte\n\t// Ref increases the reference counter for this Buffer.\n\tRef()\n\t// Free decrements this Buffer's reference counter and frees the underlying\n\t// byte slice if the counter reaches 0 as a result of this call.\n\tFree()\n\t// Len returns the Buffer's size.\n\tLen() int\n\n\tsplit(n int) (left, right Buffer)\n\tread(buf []byte) (int, Buffer)\n}\n\nvar (\n\tbufferPoolingThreshold = 1 << 10\n\n\tbufferObjectPool = sync.Pool{New: func() any { return new(buffer) }}\n\trefObjectPool    = sync.Pool{New: func() any { return new(atomic.Int32) }}\n)\n\n// IsBelowBufferPoolingThreshold returns true if the given size is less than or\n// equal to the threshold for buffer pooling. This is used to determine whether\n// to pool buffers or allocate them directly.\nfunc IsBelowBufferPoolingThreshold(size int) bool {\n\treturn size <= bufferPoolingThreshold\n}\n\ntype buffer struct {\n\torigData *[]byte\n\tdata     []byte\n\trefs     *atomic.Int32\n\tpool     BufferPool\n}\n\nfunc newBuffer() *buffer {\n\treturn bufferObjectPool.Get().(*buffer)\n}\n\n// NewBuffer creates a new Buffer from the given data, initializing the reference\n// counter to 1. The data will then be returned to the given pool when all\n// references to the returned Buffer are released. As a special case to avoid\n// additional allocations, if the given buffer pool is nil, the returned buffer\n// will be a \"no-op\" Buffer where invoking Buffer.Free() does nothing and the\n// underlying data is never freed.\n//\n// Note that the backing array of the given data is not copied.\nfunc NewBuffer(data *[]byte, pool BufferPool) Buffer {\n\t// Use the buffer's capacity instead of the length, otherwise buffers may\n\t// not be reused under certain conditions. For example, if a large buffer\n\t// is acquired from the pool, but fewer bytes than the buffering threshold\n\t// are written to it, the buffer will not be returned to the pool.\n\tif pool == nil || IsBelowBufferPoolingThreshold(cap(*data)) {\n\t\treturn (SliceBuffer)(*data)\n\t}\n\tb := newBuffer()\n\tb.origData = data\n\tb.data = *data\n\tb.pool = pool\n\tb.refs = refObjectPool.Get().(*atomic.Int32)\n\tb.refs.Add(1)\n\treturn b\n}\n\n// Copy creates a new Buffer from the given data, initializing the reference\n// counter to 1.\n//\n// It acquires a []byte from the given pool and copies over the backing array\n// of the given data. The []byte acquired from the pool is returned to the\n// pool when all references to the returned Buffer are released.\nfunc Copy(data []byte, pool BufferPool) Buffer {\n\tif IsBelowBufferPoolingThreshold(len(data)) {\n\t\tbuf := make(SliceBuffer, len(data))\n\t\tcopy(buf, data)\n\t\treturn buf\n\t}\n\n\tbuf := pool.Get(len(data))\n\tcopy(*buf, data)\n\treturn NewBuffer(buf, pool)\n}\n\nfunc (b *buffer) ReadOnlyData() []byte {\n\tif b.refs == nil {\n\t\tpanic(\"Cannot read freed buffer\")\n\t}\n\treturn b.data\n}\n\nfunc (b *buffer) Ref() {\n\tif b.refs == nil {\n\t\tpanic(\"Cannot ref freed buffer\")\n\t}\n\tb.refs.Add(1)\n}\n\nfunc (b *buffer) Free() {\n\tif b.refs == nil {\n\t\tpanic(\"Cannot free freed buffer\")\n\t}\n\n\trefs := b.refs.Add(-1)\n\tswitch {\n\tcase refs > 0:\n\t\treturn\n\tcase refs == 0:\n\t\tif b.pool != nil {\n\t\t\tb.pool.Put(b.origData)\n\t\t}\n\n\t\trefObjectPool.Put(b.refs)\n\t\tb.origData = nil\n\t\tb.data = nil\n\t\tb.refs = nil\n\t\tb.pool = nil\n\t\tbufferObjectPool.Put(b)\n\tdefault:\n\t\tpanic(\"Cannot free freed buffer\")\n\t}\n}\n\nfunc (b *buffer) Len() int {\n\treturn len(b.ReadOnlyData())\n}\n\nfunc (b *buffer) split(n int) (Buffer, Buffer) {\n\tif b.refs == nil {\n\t\tpanic(\"Cannot split freed buffer\")\n\t}\n\n\tb.refs.Add(1)\n\tsplit := newBuffer()\n\tsplit.origData = b.origData\n\tsplit.data = b.data[n:]\n\tsplit.refs = b.refs\n\tsplit.pool = b.pool\n\n\tb.data = b.data[:n]\n\n\treturn b, split\n}\n\nfunc (b *buffer) read(buf []byte) (int, Buffer) {\n\tif b.refs == nil {\n\t\tpanic(\"Cannot read freed buffer\")\n\t}\n\n\tn := copy(buf, b.data)\n\tif n == len(b.data) {\n\t\tb.Free()\n\t\treturn n, nil\n\t}\n\n\tb.data = b.data[n:]\n\treturn n, b\n}\n\nfunc (b *buffer) String() string {\n\treturn fmt.Sprintf(\"mem.Buffer(%p, data: %p, length: %d)\", b, b.ReadOnlyData(), len(b.ReadOnlyData()))\n}\n\n// ReadUnsafe reads bytes from the given Buffer into the provided slice.\n// It does not perform safety checks.\nfunc ReadUnsafe(dst []byte, buf Buffer) (int, Buffer) {\n\treturn buf.read(dst)\n}\n\n// SplitUnsafe modifies the receiver to point to the first n bytes while it\n// returns a new reference to the remaining bytes. The returned Buffer\n// functions just like a normal reference acquired using Ref().\nfunc SplitUnsafe(buf Buffer, n int) (left, right Buffer) {\n\treturn buf.split(n)\n}\n\ntype emptyBuffer struct{}\n\nfunc (e emptyBuffer) ReadOnlyData() []byte {\n\treturn nil\n}\n\nfunc (e emptyBuffer) Ref()  {}\nfunc (e emptyBuffer) Free() {}\n\nfunc (e emptyBuffer) Len() int {\n\treturn 0\n}\n\nfunc (e emptyBuffer) split(int) (left, right Buffer) {\n\treturn e, e\n}\n\nfunc (e emptyBuffer) read([]byte) (int, Buffer) {\n\treturn 0, e\n}\n\n// SliceBuffer is a Buffer implementation that wraps a byte slice. It provides\n// methods for reading, splitting, and managing the byte slice.\ntype SliceBuffer []byte\n\n// ReadOnlyData returns the byte slice.\nfunc (s SliceBuffer) ReadOnlyData() []byte { return s }\n\n// Ref is a noop implementation of Ref.\nfunc (s SliceBuffer) Ref() {}\n\n// Free is a noop implementation of Free.\nfunc (s SliceBuffer) Free() {}\n\n// Len is a noop implementation of Len.\nfunc (s SliceBuffer) Len() int { return len(s) }\n\nfunc (s SliceBuffer) split(n int) (left, right Buffer) {\n\treturn s[:n], s[n:]\n}\n\nfunc (s SliceBuffer) read(buf []byte) (int, Buffer) {\n\tn := copy(buf, s)\n\tif n == len(s) {\n\t\treturn n, nil\n\t}\n\treturn n, s[n:]\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/metadata/metadata.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package metadata define the structure of the metadata supported by gRPC library.\n// Please refer to https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md\n// for more information about custom-metadata.\npackage metadata // import \"google.golang.org/grpc/metadata\"\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/internal\"\n)\n\nfunc init() {\n\tinternal.FromOutgoingContextRaw = fromOutgoingContextRaw\n}\n\n// DecodeKeyValue returns k, v, nil.\n//\n// Deprecated: use k and v directly instead.\nfunc DecodeKeyValue(k, v string) (string, string, error) {\n\treturn k, v, nil\n}\n\n// MD is a mapping from metadata keys to values. Users should use the following\n// two convenience functions New and Pairs to generate MD.\ntype MD map[string][]string\n\n// New creates an MD from a given key-value map.\n//\n// Only the following ASCII characters are allowed in keys:\n//   - digits: 0-9\n//   - uppercase letters: A-Z (normalized to lower)\n//   - lowercase letters: a-z\n//   - special characters: -_.\n//\n// Uppercase letters are automatically converted to lowercase.\n//\n// Keys beginning with \"grpc-\" are reserved for grpc-internal use only and may\n// result in errors if set in metadata.\nfunc New(m map[string]string) MD {\n\tmd := make(MD, len(m))\n\tfor k, val := range m {\n\t\tkey := strings.ToLower(k)\n\t\tmd[key] = append(md[key], val)\n\t}\n\treturn md\n}\n\n// Pairs returns an MD formed by the mapping of key, value ...\n// Pairs panics if len(kv) is odd.\n//\n// Only the following ASCII characters are allowed in keys:\n//   - digits: 0-9\n//   - uppercase letters: A-Z (normalized to lower)\n//   - lowercase letters: a-z\n//   - special characters: -_.\n//\n// Uppercase letters are automatically converted to lowercase.\n//\n// Keys beginning with \"grpc-\" are reserved for grpc-internal use only and may\n// result in errors if set in metadata.\nfunc Pairs(kv ...string) MD {\n\tif len(kv)%2 == 1 {\n\t\tpanic(fmt.Sprintf(\"metadata: Pairs got the odd number of input pairs for metadata: %d\", len(kv)))\n\t}\n\tmd := make(MD, len(kv)/2)\n\tfor i := 0; i < len(kv); i += 2 {\n\t\tkey := strings.ToLower(kv[i])\n\t\tmd[key] = append(md[key], kv[i+1])\n\t}\n\treturn md\n}\n\n// Len returns the number of items in md.\nfunc (md MD) Len() int {\n\treturn len(md)\n}\n\n// Copy returns a copy of md.\nfunc (md MD) Copy() MD {\n\tout := make(MD, len(md))\n\tfor k, v := range md {\n\t\tout[k] = copyOf(v)\n\t}\n\treturn out\n}\n\n// Get obtains the values for a given key.\n//\n// k is converted to lowercase before searching in md.\nfunc (md MD) Get(k string) []string {\n\tk = strings.ToLower(k)\n\treturn md[k]\n}\n\n// Set sets the value of a given key with a slice of values.\n//\n// k is converted to lowercase before storing in md.\nfunc (md MD) Set(k string, vals ...string) {\n\tif len(vals) == 0 {\n\t\treturn\n\t}\n\tk = strings.ToLower(k)\n\tmd[k] = vals\n}\n\n// Append adds the values to key k, not overwriting what was already stored at\n// that key.\n//\n// k is converted to lowercase before storing in md.\nfunc (md MD) Append(k string, vals ...string) {\n\tif len(vals) == 0 {\n\t\treturn\n\t}\n\tk = strings.ToLower(k)\n\tmd[k] = append(md[k], vals...)\n}\n\n// Delete removes the values for a given key k which is converted to lowercase\n// before removing it from md.\nfunc (md MD) Delete(k string) {\n\tk = strings.ToLower(k)\n\tdelete(md, k)\n}\n\n// Join joins any number of mds into a single MD.\n//\n// The order of values for each key is determined by the order in which the mds\n// containing those values are presented to Join.\nfunc Join(mds ...MD) MD {\n\tout := MD{}\n\tfor _, md := range mds {\n\t\tfor k, v := range md {\n\t\t\tout[k] = append(out[k], v...)\n\t\t}\n\t}\n\treturn out\n}\n\ntype mdIncomingKey struct{}\ntype mdOutgoingKey struct{}\n\n// NewIncomingContext creates a new context with incoming md attached. md must\n// not be modified after calling this function.\nfunc NewIncomingContext(ctx context.Context, md MD) context.Context {\n\treturn context.WithValue(ctx, mdIncomingKey{}, md)\n}\n\n// NewOutgoingContext creates a new context with outgoing md attached. If used\n// in conjunction with AppendToOutgoingContext, NewOutgoingContext will\n// overwrite any previously-appended metadata. md must not be modified after\n// calling this function.\nfunc NewOutgoingContext(ctx context.Context, md MD) context.Context {\n\treturn context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md})\n}\n\n// AppendToOutgoingContext returns a new context with the provided kv merged\n// with any existing metadata in the context. Please refer to the documentation\n// of Pairs for a description of kv.\nfunc AppendToOutgoingContext(ctx context.Context, kv ...string) context.Context {\n\tif len(kv)%2 == 1 {\n\t\tpanic(fmt.Sprintf(\"metadata: AppendToOutgoingContext got an odd number of input pairs for metadata: %d\", len(kv)))\n\t}\n\tmd, _ := ctx.Value(mdOutgoingKey{}).(rawMD)\n\tadded := make([][]string, len(md.added)+1)\n\tcopy(added, md.added)\n\tkvCopy := make([]string, 0, len(kv))\n\tfor i := 0; i < len(kv); i += 2 {\n\t\tkvCopy = append(kvCopy, strings.ToLower(kv[i]), kv[i+1])\n\t}\n\tadded[len(added)-1] = kvCopy\n\treturn context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md.md, added: added})\n}\n\n// FromIncomingContext returns the incoming metadata in ctx if it exists.\n//\n// All keys in the returned MD are lowercase.\nfunc FromIncomingContext(ctx context.Context) (MD, bool) {\n\tmd, ok := ctx.Value(mdIncomingKey{}).(MD)\n\tif !ok {\n\t\treturn nil, false\n\t}\n\tout := make(MD, len(md))\n\tfor k, v := range md {\n\t\t// We need to manually convert all keys to lower case, because MD is a\n\t\t// map, and there's no guarantee that the MD attached to the context is\n\t\t// created using our helper functions.\n\t\tkey := strings.ToLower(k)\n\t\tout[key] = copyOf(v)\n\t}\n\treturn out, true\n}\n\n// ValueFromIncomingContext returns the metadata value corresponding to the metadata\n// key from the incoming metadata if it exists. Keys are matched in a case insensitive\n// manner.\nfunc ValueFromIncomingContext(ctx context.Context, key string) []string {\n\tmd, ok := ctx.Value(mdIncomingKey{}).(MD)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\tif v, ok := md[key]; ok {\n\t\treturn copyOf(v)\n\t}\n\tfor k, v := range md {\n\t\t// Case insensitive comparison: MD is a map, and there's no guarantee\n\t\t// that the MD attached to the context is created using our helper\n\t\t// functions.\n\t\tif strings.EqualFold(k, key) {\n\t\t\treturn copyOf(v)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc copyOf(v []string) []string {\n\tvals := make([]string, len(v))\n\tcopy(vals, v)\n\treturn vals\n}\n\n// fromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD.\n//\n// Remember to perform strings.ToLower on the keys, for both the returned MD (MD\n// is a map, there's no guarantee it's created using our helper functions) and\n// the extra kv pairs (AppendToOutgoingContext doesn't turn them into\n// lowercase).\nfunc fromOutgoingContextRaw(ctx context.Context) (MD, [][]string, bool) {\n\traw, ok := ctx.Value(mdOutgoingKey{}).(rawMD)\n\tif !ok {\n\t\treturn nil, nil, false\n\t}\n\n\treturn raw.md, raw.added, true\n}\n\n// FromOutgoingContext returns the outgoing metadata in ctx if it exists.\n//\n// All keys in the returned MD are lowercase.\nfunc FromOutgoingContext(ctx context.Context) (MD, bool) {\n\traw, ok := ctx.Value(mdOutgoingKey{}).(rawMD)\n\tif !ok {\n\t\treturn nil, false\n\t}\n\n\tmdSize := len(raw.md)\n\tfor i := range raw.added {\n\t\tmdSize += len(raw.added[i]) / 2\n\t}\n\n\tout := make(MD, mdSize)\n\tfor k, v := range raw.md {\n\t\t// We need to manually convert all keys to lower case, because MD is a\n\t\t// map, and there's no guarantee that the MD attached to the context is\n\t\t// created using our helper functions.\n\t\tkey := strings.ToLower(k)\n\t\tout[key] = copyOf(v)\n\t}\n\tfor _, added := range raw.added {\n\t\tif len(added)%2 == 1 {\n\t\t\tpanic(fmt.Sprintf(\"metadata: FromOutgoingContext got an odd number of input pairs for metadata: %d\", len(added)))\n\t\t}\n\n\t\tfor i := 0; i < len(added); i += 2 {\n\t\t\tkey := strings.ToLower(added[i])\n\t\t\tout[key] = append(out[key], added[i+1])\n\t\t}\n\t}\n\treturn out, ok\n}\n\ntype rawMD struct {\n\tmd    MD\n\tadded [][]string\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/peer/peer.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package peer defines various peer information associated with RPCs and\n// corresponding utils.\npackage peer\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/credentials\"\n)\n\n// Peer contains the information of the peer for an RPC, such as the address\n// and authentication information.\ntype Peer struct {\n\t// Addr is the peer address.\n\tAddr net.Addr\n\t// LocalAddr is the local address.\n\tLocalAddr net.Addr\n\t// AuthInfo is the authentication information of the transport.\n\t// It is nil if there is no transport security being used.\n\tAuthInfo credentials.AuthInfo\n}\n\n// String ensures the Peer types implements the Stringer interface in order to\n// allow to print a context with a peerKey value effectively.\nfunc (p *Peer) String() string {\n\tif p == nil {\n\t\treturn \"Peer<nil>\"\n\t}\n\tsb := &strings.Builder{}\n\tsb.WriteString(\"Peer{\")\n\tif p.Addr != nil {\n\t\tfmt.Fprintf(sb, \"Addr: '%s', \", p.Addr.String())\n\t} else {\n\t\tfmt.Fprintf(sb, \"Addr: <nil>, \")\n\t}\n\tif p.LocalAddr != nil {\n\t\tfmt.Fprintf(sb, \"LocalAddr: '%s', \", p.LocalAddr.String())\n\t} else {\n\t\tfmt.Fprintf(sb, \"LocalAddr: <nil>, \")\n\t}\n\tif p.AuthInfo != nil {\n\t\tfmt.Fprintf(sb, \"AuthInfo: '%s'\", p.AuthInfo.AuthType())\n\t} else {\n\t\tfmt.Fprintf(sb, \"AuthInfo: <nil>\")\n\t}\n\tsb.WriteString(\"}\")\n\n\treturn sb.String()\n}\n\ntype peerKey struct{}\n\n// NewContext creates a new context with peer information attached.\nfunc NewContext(ctx context.Context, p *Peer) context.Context {\n\treturn context.WithValue(ctx, peerKey{}, p)\n}\n\n// FromContext returns the peer information in ctx if it exists.\nfunc FromContext(ctx context.Context) (p *Peer, ok bool) {\n\tp, ok = ctx.Value(peerKey{}).(*Peer)\n\treturn\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/picker_wrapper.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\tistatus \"google.golang.org/grpc/internal/status\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// pickerGeneration stores a picker and a channel used to signal that a picker\n// newer than this one is available.\ntype pickerGeneration struct {\n\t// picker is the picker produced by the LB policy.  May be nil if a picker\n\t// has never been produced.\n\tpicker balancer.Picker\n\t// blockingCh is closed when the picker has been invalidated because there\n\t// is a new one available.\n\tblockingCh chan struct{}\n}\n\n// pickerWrapper is a wrapper of balancer.Picker. It blocks on certain pick\n// actions and unblock when there's a picker update.\ntype pickerWrapper struct {\n\t// If pickerGen holds a nil pointer, the pickerWrapper is closed.\n\tpickerGen atomic.Pointer[pickerGeneration]\n}\n\nfunc newPickerWrapper() *pickerWrapper {\n\tpw := &pickerWrapper{}\n\tpw.pickerGen.Store(&pickerGeneration{\n\t\tblockingCh: make(chan struct{}),\n\t})\n\treturn pw\n}\n\n// updatePicker is called by UpdateState calls from the LB policy. It\n// unblocks all blocked pick.\nfunc (pw *pickerWrapper) updatePicker(p balancer.Picker) {\n\told := pw.pickerGen.Swap(&pickerGeneration{\n\t\tpicker:     p,\n\t\tblockingCh: make(chan struct{}),\n\t})\n\tclose(old.blockingCh)\n}\n\n// doneChannelzWrapper performs the following:\n//   - increments the calls started channelz counter\n//   - wraps the done function in the passed in result to increment the calls\n//     failed or calls succeeded channelz counter before invoking the actual\n//     done function.\nfunc doneChannelzWrapper(acbw *acBalancerWrapper, result *balancer.PickResult) {\n\tac := acbw.ac\n\tac.incrCallsStarted()\n\tdone := result.Done\n\tresult.Done = func(b balancer.DoneInfo) {\n\t\tif b.Err != nil && b.Err != io.EOF {\n\t\t\tac.incrCallsFailed()\n\t\t} else {\n\t\t\tac.incrCallsSucceeded()\n\t\t}\n\t\tif done != nil {\n\t\t\tdone(b)\n\t\t}\n\t}\n}\n\ntype pick struct {\n\ttransport transport.ClientTransport // the selected transport\n\tresult    balancer.PickResult       // the contents of the pick from the LB policy\n\tblocked   bool                      // set if a picker call queued for a new picker\n}\n\n// pick returns the transport that will be used for the RPC.\n// It may block in the following cases:\n// - there's no picker\n// - the current picker returns ErrNoSubConnAvailable\n// - the current picker returns other errors and failfast is false.\n// - the subConn returned by the current picker is not READY\n// When one of these situations happens, pick blocks until the picker gets updated.\nfunc (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (pick, error) {\n\tvar ch chan struct{}\n\n\tvar lastPickErr error\n\tpickBlocked := false\n\n\tfor {\n\t\tpg := pw.pickerGen.Load()\n\t\tif pg == nil {\n\t\t\treturn pick{}, ErrClientConnClosing\n\t\t}\n\t\tif pg.picker == nil {\n\t\t\tch = pg.blockingCh\n\t\t}\n\t\tif ch == pg.blockingCh {\n\t\t\t// This could happen when either:\n\t\t\t// - pw.picker is nil (the previous if condition), or\n\t\t\t// - we have already called pick on the current picker.\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\tvar errStr string\n\t\t\t\tif lastPickErr != nil {\n\t\t\t\t\terrStr = \"latest balancer error: \" + lastPickErr.Error()\n\t\t\t\t} else {\n\t\t\t\t\terrStr = fmt.Sprintf(\"%v while waiting for connections to become ready\", ctx.Err())\n\t\t\t\t}\n\t\t\t\tswitch ctx.Err() {\n\t\t\t\tcase context.DeadlineExceeded:\n\t\t\t\t\treturn pick{}, status.Error(codes.DeadlineExceeded, errStr)\n\t\t\t\tcase context.Canceled:\n\t\t\t\t\treturn pick{}, status.Error(codes.Canceled, errStr)\n\t\t\t\t}\n\t\t\tcase <-ch:\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// If the channel is set, it means that the pick call had to wait for a\n\t\t// new picker at some point. Either it's the first iteration and this\n\t\t// function received the first picker, or a picker errored with\n\t\t// ErrNoSubConnAvailable or errored with failfast set to false, which\n\t\t// will trigger a continue to the next iteration. In the first case this\n\t\t// conditional will hit if this call had to block (the channel is set).\n\t\t// In the second case, the only way it will get to this conditional is\n\t\t// if there is a new picker.\n\t\tif ch != nil {\n\t\t\tpickBlocked = true\n\t\t}\n\n\t\tch = pg.blockingCh\n\t\tp := pg.picker\n\n\t\tpickResult, err := p.Pick(info)\n\t\tif err != nil {\n\t\t\tif err == balancer.ErrNoSubConnAvailable {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif st, ok := status.FromError(err); ok {\n\t\t\t\t// Status error: end the RPC unconditionally with this status.\n\t\t\t\t// First restrict the code to the list allowed by gRFC A54.\n\t\t\t\tif istatus.IsRestrictedControlPlaneCode(st) {\n\t\t\t\t\terr = status.Errorf(codes.Internal, \"received picker error with illegal status: %v\", err)\n\t\t\t\t}\n\t\t\t\treturn pick{}, dropError{error: err}\n\t\t\t}\n\t\t\t// For all other errors, wait for ready RPCs should block and other\n\t\t\t// RPCs should fail with unavailable.\n\t\t\tif !failfast {\n\t\t\t\tlastPickErr = err\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn pick{}, status.Error(codes.Unavailable, err.Error())\n\t\t}\n\n\t\tacbw, ok := pickResult.SubConn.(*acBalancerWrapper)\n\t\tif !ok {\n\t\t\tlogger.Errorf(\"subconn returned from pick is type %T, not *acBalancerWrapper\", pickResult.SubConn)\n\t\t\tcontinue\n\t\t}\n\t\tif t := acbw.ac.getReadyTransport(); t != nil {\n\t\t\tif channelz.IsOn() {\n\t\t\t\tdoneChannelzWrapper(acbw, &pickResult)\n\t\t\t}\n\t\t\treturn pick{transport: t, result: pickResult, blocked: pickBlocked}, nil\n\t\t}\n\t\tif pickResult.Done != nil {\n\t\t\t// Calling done with nil error, no bytes sent and no bytes received.\n\t\t\t// DoneInfo with default value works.\n\t\t\tpickResult.Done(balancer.DoneInfo{})\n\t\t}\n\t\tlogger.Infof(\"blockingPicker: the picked transport is not ready, loop back to repick\")\n\t\t// If ok == false, ac.state is not READY.\n\t\t// A valid picker always returns READY subConn. This means the state of ac\n\t\t// just changed, and picker will be updated shortly.\n\t\t// continue back to the beginning of the for loop to repick.\n\t}\n}\n\nfunc (pw *pickerWrapper) close() {\n\told := pw.pickerGen.Swap(nil)\n\tclose(old.blockingCh)\n}\n\n// reset clears the pickerWrapper and prepares it for being used again when idle\n// mode is exited.\nfunc (pw *pickerWrapper) reset() {\n\told := pw.pickerGen.Swap(&pickerGeneration{blockingCh: make(chan struct{})})\n\tclose(old.blockingCh)\n}\n\n// dropError is a wrapper error that indicates the LB policy wishes to drop the\n// RPC and not retry it.\ntype dropError struct {\n\terror\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/preloader.go",
    "content": "/*\n *\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// PreparedMsg is responsible for creating a Marshalled and Compressed object.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype PreparedMsg struct {\n\t// Struct for preparing msg before sending them\n\tencodedData mem.BufferSlice\n\thdr         []byte\n\tpayload     mem.BufferSlice\n\tpf          payloadFormat\n}\n\n// Encode marshalls and compresses the message using the codec and compressor for the stream.\nfunc (p *PreparedMsg) Encode(s Stream, msg any) error {\n\tctx := s.Context()\n\trpcInfo, ok := rpcInfoFromContext(ctx)\n\tif !ok {\n\t\treturn status.Errorf(codes.Internal, \"grpc: unable to get rpcInfo\")\n\t}\n\n\t// check if the context has the relevant information to prepareMsg\n\tif rpcInfo.preloaderInfo.codec == nil {\n\t\treturn status.Errorf(codes.Internal, \"grpc: rpcInfo.preloaderInfo.codec is nil\")\n\t}\n\n\t// prepare the msg\n\tdata, err := encode(rpcInfo.preloaderInfo.codec, msg)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmaterializedData := data.Materialize()\n\tdata.Free()\n\tp.encodedData = mem.BufferSlice{mem.SliceBuffer(materializedData)}\n\n\t// TODO: it should be possible to grab the bufferPool from the underlying\n\t//  stream implementation with a type cast to its actual type (such as\n\t//  addrConnStream) and accessing the buffer pool directly.\n\tvar compData mem.BufferSlice\n\tcompData, p.pf, err = compress(p.encodedData, rpcInfo.preloaderInfo.cp, rpcInfo.preloaderInfo.comp, mem.DefaultBufferPool())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif p.pf.isCompressed() {\n\t\tmaterializedCompData := compData.Materialize()\n\t\tcompData.Free()\n\t\tcompData = mem.BufferSlice{mem.SliceBuffer(materializedCompData)}\n\t}\n\n\tp.hdr, p.payload = msgHeader(p.encodedData, compData, p.pf)\n\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package dns implements a dns resolver to be installed as the default resolver\n// in grpc.\npackage dns\n\nimport (\n\t\"time\"\n\n\t\"google.golang.org/grpc/internal/resolver/dns\"\n\t\"google.golang.org/grpc/resolver\"\n)\n\n// SetResolvingTimeout sets the maximum duration for DNS resolution requests.\n//\n// This function affects the global timeout used by all channels using the DNS\n// name resolver scheme.\n//\n// It must be called only at application startup, before any gRPC calls are\n// made. Modifying this value after initialization is not thread-safe.\n//\n// The default value is 30 seconds. Setting the timeout too low may result in\n// premature timeouts during resolution, while setting it too high may lead to\n// unnecessary delays in service discovery. Choose a value appropriate for your\n// specific needs and network environment.\nfunc SetResolvingTimeout(timeout time.Duration) {\n\tdns.ResolvingTimeout = timeout\n}\n\n// NewBuilder creates a dnsBuilder which is used to factory DNS resolvers.\n//\n// Deprecated: import grpc and use resolver.Get(\"dns\") instead.\nfunc NewBuilder() resolver.Builder {\n\treturn dns.NewBuilder()\n}\n\n// SetMinResolutionInterval sets the default minimum interval at which DNS\n// re-resolutions are allowed. This helps to prevent excessive re-resolution.\n//\n// It must be called only at application startup, before any gRPC calls are\n// made. Modifying this value after initialization is not thread-safe.\nfunc SetMinResolutionInterval(d time.Duration) {\n\tdns.MinResolutionInterval = d\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/resolver/map.go",
    "content": "/*\n *\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage resolver\n\nimport (\n\t\"encoding/base64\"\n\t\"sort\"\n\t\"strings\"\n)\n\ntype addressMapEntry[T any] struct {\n\taddr  Address\n\tvalue T\n}\n\n// AddressMap is an AddressMapV2[any].  It will be deleted in an upcoming\n// release of grpc-go.\n//\n// Deprecated: use the generic AddressMapV2 type instead.\ntype AddressMap = AddressMapV2[any]\n\n// AddressMapV2 is a map of addresses to arbitrary values taking into account\n// Attributes.  BalancerAttributes are ignored, as are Metadata and Type.\n// Multiple accesses may not be performed concurrently.  Must be created via\n// NewAddressMap; do not construct directly.\ntype AddressMapV2[T any] struct {\n\t// The underlying map is keyed by an Address with fields that we don't care\n\t// about being set to their zero values. The only fields that we care about\n\t// are `Addr`, `ServerName` and `Attributes`. Since we need to be able to\n\t// distinguish between addresses with same `Addr` and `ServerName`, but\n\t// different `Attributes`, we cannot store the `Attributes` in the map key.\n\t//\n\t// The comparison operation for structs work as follows:\n\t//  Struct values are comparable if all their fields are comparable. Two\n\t//  struct values are equal if their corresponding non-blank fields are equal.\n\t//\n\t// The value type of the map contains a slice of addresses which match the key\n\t// in their `Addr` and `ServerName` fields and contain the corresponding value\n\t// associated with them.\n\tm map[Address]addressMapEntryList[T]\n}\n\nfunc toMapKey(addr *Address) Address {\n\treturn Address{Addr: addr.Addr, ServerName: addr.ServerName}\n}\n\ntype addressMapEntryList[T any] []*addressMapEntry[T]\n\n// NewAddressMap creates a new AddressMapV2[any].\n//\n// Deprecated: use the generic NewAddressMapV2 constructor instead.\nfunc NewAddressMap() *AddressMap {\n\treturn NewAddressMapV2[any]()\n}\n\n// NewAddressMapV2 creates a new AddressMapV2.\nfunc NewAddressMapV2[T any]() *AddressMapV2[T] {\n\treturn &AddressMapV2[T]{m: make(map[Address]addressMapEntryList[T])}\n}\n\n// find returns the index of addr in the addressMapEntry slice, or -1 if not\n// present.\nfunc (l addressMapEntryList[T]) find(addr Address) int {\n\tfor i, entry := range l {\n\t\t// Attributes are the only thing to match on here, since `Addr` and\n\t\t// `ServerName` are already equal.\n\t\tif entry.addr.Attributes.Equal(addr.Attributes) {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn -1\n}\n\n// Get returns the value for the address in the map, if present.\nfunc (a *AddressMapV2[T]) Get(addr Address) (value T, ok bool) {\n\taddrKey := toMapKey(&addr)\n\tentryList := a.m[addrKey]\n\tif entry := entryList.find(addr); entry != -1 {\n\t\treturn entryList[entry].value, true\n\t}\n\treturn value, false\n}\n\n// Set updates or adds the value to the address in the map.\nfunc (a *AddressMapV2[T]) Set(addr Address, value T) {\n\taddrKey := toMapKey(&addr)\n\tentryList := a.m[addrKey]\n\tif entry := entryList.find(addr); entry != -1 {\n\t\tentryList[entry].value = value\n\t\treturn\n\t}\n\ta.m[addrKey] = append(entryList, &addressMapEntry[T]{addr: addr, value: value})\n}\n\n// Delete removes addr from the map.\nfunc (a *AddressMapV2[T]) Delete(addr Address) {\n\taddrKey := toMapKey(&addr)\n\tentryList := a.m[addrKey]\n\tentry := entryList.find(addr)\n\tif entry == -1 {\n\t\treturn\n\t}\n\tif len(entryList) == 1 {\n\t\tentryList = nil\n\t} else {\n\t\tcopy(entryList[entry:], entryList[entry+1:])\n\t\tentryList = entryList[:len(entryList)-1]\n\t}\n\ta.m[addrKey] = entryList\n}\n\n// Len returns the number of entries in the map.\nfunc (a *AddressMapV2[T]) Len() int {\n\tret := 0\n\tfor _, entryList := range a.m {\n\t\tret += len(entryList)\n\t}\n\treturn ret\n}\n\n// Keys returns a slice of all current map keys.\nfunc (a *AddressMapV2[T]) Keys() []Address {\n\tret := make([]Address, 0, a.Len())\n\tfor _, entryList := range a.m {\n\t\tfor _, entry := range entryList {\n\t\t\tret = append(ret, entry.addr)\n\t\t}\n\t}\n\treturn ret\n}\n\n// Values returns a slice of all current map values.\nfunc (a *AddressMapV2[T]) Values() []T {\n\tret := make([]T, 0, a.Len())\n\tfor _, entryList := range a.m {\n\t\tfor _, entry := range entryList {\n\t\t\tret = append(ret, entry.value)\n\t\t}\n\t}\n\treturn ret\n}\n\ntype endpointMapKey string\n\n// EndpointMap is a map of endpoints to arbitrary values keyed on only the\n// unordered set of address strings within an endpoint. This map is not thread\n// safe, thus it is unsafe to access concurrently. Must be created via\n// NewEndpointMap; do not construct directly.\ntype EndpointMap[T any] struct {\n\tendpoints map[endpointMapKey]endpointData[T]\n}\n\ntype endpointData[T any] struct {\n\t// decodedKey stores the original key to avoid decoding when iterating on\n\t// EndpointMap keys.\n\tdecodedKey Endpoint\n\tvalue      T\n}\n\n// NewEndpointMap creates a new EndpointMap.\nfunc NewEndpointMap[T any]() *EndpointMap[T] {\n\treturn &EndpointMap[T]{\n\t\tendpoints: make(map[endpointMapKey]endpointData[T]),\n\t}\n}\n\n// encodeEndpoint returns a string that uniquely identifies the unordered set of\n// addresses within an endpoint.\nfunc encodeEndpoint(e Endpoint) endpointMapKey {\n\taddrs := make([]string, 0, len(e.Addresses))\n\t// base64 encoding the address strings restricts the characters present\n\t// within the strings. This allows us to use a delimiter without the need of\n\t// escape characters.\n\tfor _, addr := range e.Addresses {\n\t\taddrs = append(addrs, base64.StdEncoding.EncodeToString([]byte(addr.Addr)))\n\t}\n\tsort.Strings(addrs)\n\t// \" \" should not appear in base64 encoded strings.\n\treturn endpointMapKey(strings.Join(addrs, \" \"))\n}\n\n// Get returns the value for the address in the map, if present.\nfunc (em *EndpointMap[T]) Get(e Endpoint) (value T, ok bool) {\n\tval, found := em.endpoints[encodeEndpoint(e)]\n\tif found {\n\t\treturn val.value, true\n\t}\n\treturn value, false\n}\n\n// Set updates or adds the value to the address in the map.\nfunc (em *EndpointMap[T]) Set(e Endpoint, value T) {\n\ten := encodeEndpoint(e)\n\tem.endpoints[en] = endpointData[T]{\n\t\tdecodedKey: Endpoint{Addresses: e.Addresses},\n\t\tvalue:      value,\n\t}\n}\n\n// Len returns the number of entries in the map.\nfunc (em *EndpointMap[T]) Len() int {\n\treturn len(em.endpoints)\n}\n\n// Keys returns a slice of all current map keys, as endpoints specifying the\n// addresses present in the endpoint keys, in which uniqueness is determined by\n// the unordered set of addresses. Thus, endpoint information returned is not\n// the full endpoint data (drops duplicated addresses and attributes) but can be\n// used for EndpointMap accesses.\nfunc (em *EndpointMap[T]) Keys() []Endpoint {\n\tret := make([]Endpoint, 0, len(em.endpoints))\n\tfor _, en := range em.endpoints {\n\t\tret = append(ret, en.decodedKey)\n\t}\n\treturn ret\n}\n\n// Values returns a slice of all current map values.\nfunc (em *EndpointMap[T]) Values() []T {\n\tret := make([]T, 0, len(em.endpoints))\n\tfor _, val := range em.endpoints {\n\t\tret = append(ret, val.value)\n\t}\n\treturn ret\n}\n\n// Delete removes the specified endpoint from the map.\nfunc (em *EndpointMap[T]) Delete(e Endpoint) {\n\ten := encodeEndpoint(e)\n\tdelete(em.endpoints, en)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/resolver/resolver.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package resolver defines APIs for name resolution in gRPC.\n// All APIs in this package are experimental.\npackage resolver\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"google.golang.org/grpc/attributes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nvar (\n\t// m is a map from scheme to resolver builder.\n\tm = make(map[string]Builder)\n\t// defaultScheme is the default scheme to use.\n\tdefaultScheme = \"passthrough\"\n)\n\n// TODO(bar) install dns resolver in init(){}.\n\n// Register registers the resolver builder to the resolver map. b.Scheme will\n// be used as the scheme registered with this builder. The registry is case\n// sensitive, and schemes should not contain any uppercase characters.\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. If multiple Resolvers are\n// registered with the same name, the one registered last will take effect.\nfunc Register(b Builder) {\n\tm[b.Scheme()] = b\n}\n\n// Get returns the resolver builder registered with the given scheme.\n//\n// If no builder is register with the scheme, nil will be returned.\nfunc Get(scheme string) Builder {\n\tif b, ok := m[scheme]; ok {\n\t\treturn b\n\t}\n\treturn nil\n}\n\n// SetDefaultScheme sets the default scheme that will be used. The default\n// scheme is initially set to \"passthrough\".\n//\n// NOTE: this function must only be called during initialization time (i.e. in\n// an init() function), and is not thread-safe. The scheme set last overrides\n// previously set values.\nfunc SetDefaultScheme(scheme string) {\n\tdefaultScheme = scheme\n\tinternal.UserSetDefaultScheme = true\n}\n\n// GetDefaultScheme gets the default scheme that will be used by grpc.Dial.  If\n// SetDefaultScheme is never called, the default scheme used by grpc.NewClient is \"dns\" instead.\nfunc GetDefaultScheme() string {\n\treturn defaultScheme\n}\n\n// Address represents a server the client connects to.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype Address struct {\n\t// Addr is the server address on which a connection will be established.\n\tAddr string\n\n\t// ServerName is the name of this address.\n\t// If non-empty, the ServerName is used as the transport certification authority for\n\t// the address, instead of the hostname from the Dial target string. In most cases,\n\t// this should not be set.\n\t//\n\t// WARNING: ServerName must only be populated with trusted values. It\n\t// is insecure to populate it with data from untrusted inputs since untrusted\n\t// values could be used to bypass the authority checks performed by TLS.\n\tServerName string\n\n\t// Attributes contains arbitrary data about this address intended for\n\t// consumption by the SubConn.\n\tAttributes *attributes.Attributes\n\n\t// BalancerAttributes contains arbitrary data about this address intended\n\t// for consumption by the LB policy.  These attributes do not affect SubConn\n\t// creation, connection establishment, handshaking, etc.\n\t//\n\t// Deprecated: when an Address is inside an Endpoint, this field should not\n\t// be used, and it will eventually be removed entirely.\n\tBalancerAttributes *attributes.Attributes\n\n\t// Metadata is the information associated with Addr, which may be used\n\t// to make load balancing decision.\n\t//\n\t// Deprecated: use Attributes instead.\n\tMetadata any\n}\n\n// Equal returns whether a and o are identical.  Metadata is compared directly,\n// not with any recursive introspection.\n//\n// This method compares all fields of the address. When used to tell apart\n// addresses during subchannel creation or connection establishment, it might be\n// more appropriate for the caller to implement custom equality logic.\nfunc (a Address) Equal(o Address) bool {\n\treturn a.Addr == o.Addr && a.ServerName == o.ServerName &&\n\t\ta.Attributes.Equal(o.Attributes) &&\n\t\ta.BalancerAttributes.Equal(o.BalancerAttributes) &&\n\t\ta.Metadata == o.Metadata\n}\n\n// String returns JSON formatted string representation of the address.\nfunc (a Address) String() string {\n\tvar sb strings.Builder\n\tsb.WriteString(fmt.Sprintf(\"{Addr: %q, \", a.Addr))\n\tsb.WriteString(fmt.Sprintf(\"ServerName: %q, \", a.ServerName))\n\tif a.Attributes != nil {\n\t\tsb.WriteString(fmt.Sprintf(\"Attributes: %v, \", a.Attributes.String()))\n\t}\n\tif a.BalancerAttributes != nil {\n\t\tsb.WriteString(fmt.Sprintf(\"BalancerAttributes: %v\", a.BalancerAttributes.String()))\n\t}\n\tsb.WriteString(\"}\")\n\treturn sb.String()\n}\n\n// BuildOptions includes additional information for the builder to create\n// the resolver.\ntype BuildOptions struct {\n\t// DisableServiceConfig indicates whether a resolver implementation should\n\t// fetch service config data.\n\tDisableServiceConfig bool\n\t// DialCreds is the transport credentials used by the ClientConn for\n\t// communicating with the target gRPC service (set via\n\t// WithTransportCredentials). In cases where a name resolution service\n\t// requires the same credentials, the resolver may use this field. In most\n\t// cases though, it is not appropriate, and this field may be ignored.\n\tDialCreds credentials.TransportCredentials\n\t// CredsBundle is the credentials bundle used by the ClientConn for\n\t// communicating with the target gRPC service (set via\n\t// WithCredentialsBundle). In cases where a name resolution service\n\t// requires the same credentials, the resolver may use this field. In most\n\t// cases though, it is not appropriate, and this field may be ignored.\n\tCredsBundle credentials.Bundle\n\t// Dialer is the custom dialer used by the ClientConn for dialling the\n\t// target gRPC service (set via WithDialer). In cases where a name\n\t// resolution service requires the same dialer, the resolver may use this\n\t// field. In most cases though, it is not appropriate, and this field may\n\t// be ignored.\n\tDialer func(context.Context, string) (net.Conn, error)\n\t// Authority is the effective authority of the clientconn for which the\n\t// resolver is built.\n\tAuthority string\n\t// MetricsRecorder is the metrics recorder to do recording.\n\tMetricsRecorder stats.MetricsRecorder\n}\n\n// An Endpoint is one network endpoint, or server, which may have multiple\n// addresses with which it can be accessed.\ntype Endpoint struct {\n\t// Addresses contains a list of addresses used to access this endpoint.\n\tAddresses []Address\n\n\t// Attributes contains arbitrary data about this endpoint intended for\n\t// consumption by the LB policy.\n\tAttributes *attributes.Attributes\n}\n\n// State contains the current Resolver state relevant to the ClientConn.\ntype State struct {\n\t// Addresses is the latest set of resolved addresses for the target.\n\t//\n\t// If a resolver sets Addresses but does not set Endpoints, one Endpoint\n\t// will be created for each Address before the State is passed to the LB\n\t// policy.  The BalancerAttributes of each entry in Addresses will be set\n\t// in Endpoints.Attributes, and be cleared in the Endpoint's Address's\n\t// BalancerAttributes.\n\t//\n\t// Soon, Addresses will be deprecated and replaced fully by Endpoints.\n\tAddresses []Address\n\n\t// Endpoints is the latest set of resolved endpoints for the target.\n\t//\n\t// If a resolver produces a State containing Endpoints but not Addresses,\n\t// it must take care to ensure the LB policies it selects will support\n\t// Endpoints.\n\tEndpoints []Endpoint\n\n\t// ServiceConfig contains the result from parsing the latest service\n\t// config.  If it is nil, it indicates no service config is present or the\n\t// resolver does not provide service configs.\n\tServiceConfig *serviceconfig.ParseResult\n\n\t// Attributes contains arbitrary data about the resolver intended for\n\t// consumption by the load balancing policy.\n\tAttributes *attributes.Attributes\n}\n\n// ClientConn contains the callbacks for resolver to notify any updates\n// to the gRPC ClientConn.\n//\n// This interface is to be implemented by gRPC. Users should not need a\n// brand new implementation of this interface. For the situations like\n// testing, the new implementation should embed this interface. This allows\n// gRPC to add new methods to this interface.\ntype ClientConn interface {\n\t// UpdateState updates the state of the ClientConn appropriately.\n\t//\n\t// If an error is returned, the resolver should try to resolve the\n\t// target again. The resolver should use a backoff timer to prevent\n\t// overloading the server with requests. If a resolver is certain that\n\t// reresolving will not change the result, e.g. because it is\n\t// a watch-based resolver, returned errors can be ignored.\n\t//\n\t// If the resolved State is the same as the last reported one, calling\n\t// UpdateState can be omitted.\n\tUpdateState(State) error\n\t// ReportError notifies the ClientConn that the Resolver encountered an\n\t// error. The ClientConn then forwards this error to the load balancing\n\t// policy.\n\tReportError(error)\n\t// NewAddress is called by resolver to notify ClientConn a new list\n\t// of resolved addresses.\n\t// The address list should be the complete list of resolved addresses.\n\t//\n\t// Deprecated: Use UpdateState instead.\n\tNewAddress(addresses []Address)\n\t// ParseServiceConfig parses the provided service config and returns an\n\t// object that provides the parsed config.\n\tParseServiceConfig(serviceConfigJSON string) *serviceconfig.ParseResult\n}\n\n// Target represents a target for gRPC, as specified in:\n// https://github.com/grpc/grpc/blob/master/doc/naming.md.\n// It is parsed from the target string that gets passed into Dial or DialContext\n// by the user. And gRPC passes it to the resolver and the balancer.\n//\n// If the target follows the naming spec, and the parsed scheme is registered\n// with gRPC, we will parse the target string according to the spec. If the\n// target does not contain a scheme or if the parsed scheme is not registered\n// (i.e. no corresponding resolver available to resolve the endpoint), we will\n// apply the default scheme, and will attempt to reparse it.\ntype Target struct {\n\t// URL contains the parsed dial target with an optional default scheme added\n\t// to it if the original dial target contained no scheme or contained an\n\t// unregistered scheme. Any query params specified in the original dial\n\t// target can be accessed from here.\n\tURL url.URL\n}\n\n// Endpoint retrieves endpoint without leading \"/\" from either `URL.Path`\n// or `URL.Opaque`. The latter is used when the former is empty.\nfunc (t Target) Endpoint() string {\n\tendpoint := t.URL.Path\n\tif endpoint == \"\" {\n\t\tendpoint = t.URL.Opaque\n\t}\n\t// For targets of the form \"[scheme]://[authority]/endpoint, the endpoint\n\t// value returned from url.Parse() contains a leading \"/\". Although this is\n\t// in accordance with RFC 3986, we do not want to break existing resolver\n\t// implementations which expect the endpoint without the leading \"/\". So, we\n\t// end up stripping the leading \"/\" here. But this will result in an\n\t// incorrect parsing for something like \"unix:///path/to/socket\". Since we\n\t// own the \"unix\" resolver, we can workaround in the unix resolver by using\n\t// the `URL` field.\n\treturn strings.TrimPrefix(endpoint, \"/\")\n}\n\n// String returns the canonical string representation of Target.\nfunc (t Target) String() string {\n\treturn t.URL.Scheme + \"://\" + t.URL.Host + \"/\" + t.Endpoint()\n}\n\n// Builder creates a resolver that will be used to watch name resolution updates.\ntype Builder interface {\n\t// Build creates a new resolver for the given target.\n\t//\n\t// gRPC dial calls Build synchronously, and fails if the returned error is\n\t// not nil.\n\tBuild(target Target, cc ClientConn, opts BuildOptions) (Resolver, error)\n\t// Scheme returns the scheme supported by this resolver.  Scheme is defined\n\t// at https://github.com/grpc/grpc/blob/master/doc/naming.md.  The returned\n\t// string should not contain uppercase characters, as they will not match\n\t// the parsed target's scheme as defined in RFC 3986.\n\tScheme() string\n}\n\n// ResolveNowOptions includes additional information for ResolveNow.\ntype ResolveNowOptions struct{}\n\n// Resolver watches for the updates on the specified target.\n// Updates include address updates and service config updates.\ntype Resolver interface {\n\t// ResolveNow will be called by gRPC to try to resolve the target name\n\t// again. It's just a hint, resolver can ignore this if it's not necessary.\n\t//\n\t// It could be called multiple times concurrently.\n\tResolveNow(ResolveNowOptions)\n\t// Close closes the resolver.\n\tClose()\n}\n\n// AuthorityOverrider is implemented by Builders that wish to override the\n// default authority for the ClientConn.\n// By default, the authority used is target.Endpoint().\ntype AuthorityOverrider interface {\n\t// OverrideAuthority returns the authority to use for a ClientConn with the\n\t// given target. The implementation must generate it without blocking,\n\t// typically in line, and must keep it unchanged.\n\t//\n\t// The returned string must be a valid \":authority\" header value, i.e. be\n\t// encoded according to\n\t// [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2) as\n\t// necessary.\n\tOverrideAuthority(Target) string\n}\n\n// ValidateEndpoints validates endpoints from a petiole policy's perspective.\n// Petiole policies should call this before calling into their children. See\n// [gRPC A61](https://github.com/grpc/proposal/blob/master/A61-IPv4-IPv6-dualstack-backends.md)\n// for details.\nfunc ValidateEndpoints(endpoints []Endpoint) error {\n\tif len(endpoints) == 0 {\n\t\treturn errors.New(\"endpoints list is empty\")\n\t}\n\n\tfor _, endpoint := range endpoints {\n\t\tfor range endpoint.Addresses {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn errors.New(\"endpoints list contains no addresses\")\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/resolver_wrapper.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/internal/pretty\"\n\t\"google.golang.org/grpc/internal/resolver/delegatingresolver\"\n\t\"google.golang.org/grpc/resolver\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\n// ccResolverWrapper is a wrapper on top of cc for resolvers.\n// It implements resolver.ClientConn interface.\ntype ccResolverWrapper struct {\n\t// The following fields are initialized when the wrapper is created and are\n\t// read-only afterwards, and therefore can be accessed without a mutex.\n\tcc                  *ClientConn\n\tignoreServiceConfig bool\n\tserializer          *grpcsync.CallbackSerializer\n\tserializerCancel    context.CancelFunc\n\n\tresolver resolver.Resolver // only accessed within the serializer\n\n\t// The following fields are protected by mu.  Caller must take cc.mu before\n\t// taking mu.\n\tmu       sync.Mutex\n\tcurState resolver.State\n\tclosed   bool\n}\n\n// newCCResolverWrapper initializes the ccResolverWrapper.  It can only be used\n// after calling start, which builds the resolver.\nfunc newCCResolverWrapper(cc *ClientConn) *ccResolverWrapper {\n\tctx, cancel := context.WithCancel(cc.ctx)\n\treturn &ccResolverWrapper{\n\t\tcc:                  cc,\n\t\tignoreServiceConfig: cc.dopts.disableServiceConfig,\n\t\tserializer:          grpcsync.NewCallbackSerializer(ctx),\n\t\tserializerCancel:    cancel,\n\t}\n}\n\n// start builds the name resolver using the resolver.Builder in cc and returns\n// any error encountered.  It must always be the first operation performed on\n// any newly created ccResolverWrapper, except that close may be called instead.\nfunc (ccr *ccResolverWrapper) start() error {\n\terrCh := make(chan error)\n\tccr.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil {\n\t\t\terrCh <- ctx.Err()\n\t\t\treturn\n\t\t}\n\t\topts := resolver.BuildOptions{\n\t\t\tDisableServiceConfig: ccr.cc.dopts.disableServiceConfig,\n\t\t\tDialCreds:            ccr.cc.dopts.copts.TransportCredentials,\n\t\t\tCredsBundle:          ccr.cc.dopts.copts.CredsBundle,\n\t\t\tDialer:               ccr.cc.dopts.copts.Dialer,\n\t\t\tAuthority:            ccr.cc.authority,\n\t\t\tMetricsRecorder:      ccr.cc.metricsRecorderList,\n\t\t}\n\t\tvar err error\n\t\t// The delegating resolver is used unless:\n\t\t//   - A custom dialer is provided via WithContextDialer dialoption or\n\t\t//   - Proxy usage is disabled through WithNoProxy dialoption.\n\t\t// In these cases, the resolver is built based on the scheme of target,\n\t\t// using the appropriate resolver builder.\n\t\tif ccr.cc.dopts.copts.Dialer != nil || !ccr.cc.dopts.useProxy {\n\t\t\tccr.resolver, err = ccr.cc.resolverBuilder.Build(ccr.cc.parsedTarget, ccr, opts)\n\t\t} else {\n\t\t\tccr.resolver, err = delegatingresolver.New(ccr.cc.parsedTarget, ccr, opts, ccr.cc.resolverBuilder, ccr.cc.dopts.enableLocalDNSResolution)\n\t\t}\n\t\terrCh <- err\n\t})\n\treturn <-errCh\n}\n\nfunc (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) {\n\tccr.serializer.TrySchedule(func(ctx context.Context) {\n\t\tif ctx.Err() != nil || ccr.resolver == nil {\n\t\t\treturn\n\t\t}\n\t\tccr.resolver.ResolveNow(o)\n\t})\n}\n\n// close initiates async shutdown of the wrapper.  To determine the wrapper has\n// finished shutting down, the channel should block on ccr.serializer.Done()\n// without cc.mu held.\nfunc (ccr *ccResolverWrapper) close() {\n\tchannelz.Info(logger, ccr.cc.channelz, \"Closing the name resolver\")\n\tccr.mu.Lock()\n\tccr.closed = true\n\tccr.mu.Unlock()\n\n\tccr.serializer.TrySchedule(func(context.Context) {\n\t\tif ccr.resolver == nil {\n\t\t\treturn\n\t\t}\n\t\tccr.resolver.Close()\n\t\tccr.resolver = nil\n\t})\n\tccr.serializerCancel()\n}\n\n// UpdateState is called by resolver implementations to report new state to gRPC\n// which includes addresses and service config.\nfunc (ccr *ccResolverWrapper) UpdateState(s resolver.State) error {\n\tccr.cc.mu.Lock()\n\tccr.mu.Lock()\n\tif ccr.closed {\n\t\tccr.mu.Unlock()\n\t\tccr.cc.mu.Unlock()\n\t\treturn nil\n\t}\n\tif s.Endpoints == nil {\n\t\ts.Endpoints = addressesToEndpoints(s.Addresses)\n\t}\n\tccr.addChannelzTraceEvent(s)\n\tccr.curState = s\n\tccr.mu.Unlock()\n\treturn ccr.cc.updateResolverStateAndUnlock(s, nil)\n}\n\n// ReportError is called by resolver implementations to report errors\n// encountered during name resolution to gRPC.\nfunc (ccr *ccResolverWrapper) ReportError(err error) {\n\tccr.cc.mu.Lock()\n\tccr.mu.Lock()\n\tif ccr.closed {\n\t\tccr.mu.Unlock()\n\t\tccr.cc.mu.Unlock()\n\t\treturn\n\t}\n\tccr.mu.Unlock()\n\tchannelz.Warningf(logger, ccr.cc.channelz, \"ccResolverWrapper: reporting error to cc: %v\", err)\n\tccr.cc.updateResolverStateAndUnlock(resolver.State{}, err)\n}\n\n// NewAddress is called by the resolver implementation to send addresses to\n// gRPC.\nfunc (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) {\n\tccr.cc.mu.Lock()\n\tccr.mu.Lock()\n\tif ccr.closed {\n\t\tccr.mu.Unlock()\n\t\tccr.cc.mu.Unlock()\n\t\treturn\n\t}\n\ts := resolver.State{\n\t\tAddresses:     addrs,\n\t\tServiceConfig: ccr.curState.ServiceConfig,\n\t\tEndpoints:     addressesToEndpoints(addrs),\n\t}\n\tccr.addChannelzTraceEvent(s)\n\tccr.curState = s\n\tccr.mu.Unlock()\n\tccr.cc.updateResolverStateAndUnlock(s, nil)\n}\n\n// ParseServiceConfig is called by resolver implementations to parse a JSON\n// representation of the service config.\nfunc (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult {\n\treturn parseServiceConfig(scJSON, ccr.cc.dopts.maxCallAttempts)\n}\n\n// addChannelzTraceEvent adds a channelz trace event containing the new\n// state received from resolver implementations.\nfunc (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) {\n\tif !logger.V(0) && !channelz.IsOn() {\n\t\treturn\n\t}\n\tvar updates []string\n\tvar oldSC, newSC *ServiceConfig\n\tvar oldOK, newOK bool\n\tif ccr.curState.ServiceConfig != nil {\n\t\toldSC, oldOK = ccr.curState.ServiceConfig.Config.(*ServiceConfig)\n\t}\n\tif s.ServiceConfig != nil {\n\t\tnewSC, newOK = s.ServiceConfig.Config.(*ServiceConfig)\n\t}\n\tif oldOK != newOK || (oldOK && newOK && oldSC.rawJSONString != newSC.rawJSONString) {\n\t\tupdates = append(updates, \"service config updated\")\n\t}\n\tif len(ccr.curState.Addresses) > 0 && len(s.Addresses) == 0 {\n\t\tupdates = append(updates, \"resolver returned an empty address list\")\n\t} else if len(ccr.curState.Addresses) == 0 && len(s.Addresses) > 0 {\n\t\tupdates = append(updates, \"resolver returned new addresses\")\n\t}\n\tchannelz.Infof(logger, ccr.cc.channelz, \"Resolver state updated: %s (%v)\", pretty.ToJSON(s), strings.Join(updates, \"; \"))\n}\n\nfunc addressesToEndpoints(addrs []resolver.Address) []resolver.Endpoint {\n\tendpoints := make([]resolver.Endpoint, 0, len(addrs))\n\tfor _, a := range addrs {\n\t\tep := resolver.Endpoint{Addresses: []resolver.Address{a}, Attributes: a.BalancerAttributes}\n\t\tep.Addresses[0].BalancerAttributes = nil\n\t\tendpoints = append(endpoints, ep)\n\t}\n\treturn endpoints\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/rpc_util.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"compress/gzip\"\n\t\"context\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/encoding\"\n\t\"google.golang.org/grpc/encoding/proto\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n)\n\nfunc init() {\n\tinternal.AcceptCompressors = acceptCompressors\n}\n\n// Compressor defines the interface gRPC uses to compress a message.\n//\n// Deprecated: use package encoding.\ntype Compressor interface {\n\t// Do compresses p into w.\n\tDo(w io.Writer, p []byte) error\n\t// Type returns the compression algorithm the Compressor uses.\n\tType() string\n}\n\ntype gzipCompressor struct {\n\tpool sync.Pool\n}\n\n// NewGZIPCompressor creates a Compressor based on GZIP.\n//\n// Deprecated: use package encoding/gzip.\nfunc NewGZIPCompressor() Compressor {\n\tc, _ := NewGZIPCompressorWithLevel(gzip.DefaultCompression)\n\treturn c\n}\n\n// NewGZIPCompressorWithLevel is like NewGZIPCompressor but specifies the gzip compression level instead\n// of assuming DefaultCompression.\n//\n// The error returned will be nil if the level is valid.\n//\n// Deprecated: use package encoding/gzip.\nfunc NewGZIPCompressorWithLevel(level int) (Compressor, error) {\n\tif level < gzip.DefaultCompression || level > gzip.BestCompression {\n\t\treturn nil, fmt.Errorf(\"grpc: invalid compression level: %d\", level)\n\t}\n\treturn &gzipCompressor{\n\t\tpool: sync.Pool{\n\t\t\tNew: func() any {\n\t\t\t\tw, err := gzip.NewWriterLevel(io.Discard, level)\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t\treturn w\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\nfunc (c *gzipCompressor) Do(w io.Writer, p []byte) error {\n\tz := c.pool.Get().(*gzip.Writer)\n\tdefer c.pool.Put(z)\n\tz.Reset(w)\n\tif _, err := z.Write(p); err != nil {\n\t\treturn err\n\t}\n\treturn z.Close()\n}\n\nfunc (c *gzipCompressor) Type() string {\n\treturn \"gzip\"\n}\n\n// Decompressor defines the interface gRPC uses to decompress a message.\n//\n// Deprecated: use package encoding.\ntype Decompressor interface {\n\t// Do reads the data from r and uncompress them.\n\tDo(r io.Reader) ([]byte, error)\n\t// Type returns the compression algorithm the Decompressor uses.\n\tType() string\n}\n\ntype gzipDecompressor struct {\n\tpool sync.Pool\n}\n\n// NewGZIPDecompressor creates a Decompressor based on GZIP.\n//\n// Deprecated: use package encoding/gzip.\nfunc NewGZIPDecompressor() Decompressor {\n\treturn &gzipDecompressor{}\n}\n\nfunc (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) {\n\tvar z *gzip.Reader\n\tswitch maybeZ := d.pool.Get().(type) {\n\tcase nil:\n\t\tnewZ, err := gzip.NewReader(r)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tz = newZ\n\tcase *gzip.Reader:\n\t\tz = maybeZ\n\t\tif err := z.Reset(r); err != nil {\n\t\t\td.pool.Put(z)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tdefer func() {\n\t\tz.Close()\n\t\td.pool.Put(z)\n\t}()\n\treturn io.ReadAll(z)\n}\n\nfunc (d *gzipDecompressor) Type() string {\n\treturn \"gzip\"\n}\n\n// callInfo contains all related configuration and information about an RPC.\ntype callInfo struct {\n\tcompressorName              string\n\tfailFast                    bool\n\tmaxReceiveMessageSize       *int\n\tmaxSendMessageSize          *int\n\tcreds                       credentials.PerRPCCredentials\n\tcontentSubtype              string\n\tcodec                       baseCodec\n\tmaxRetryRPCBufferSize       int\n\tonFinish                    []func(err error)\n\tauthority                   string\n\tacceptedResponseCompressors []string\n}\n\nfunc acceptedCompressorAllows(allowed []string, name string) bool {\n\tif allowed == nil {\n\t\treturn true\n\t}\n\tif name == \"\" || name == encoding.Identity {\n\t\treturn true\n\t}\n\tfor _, a := range allowed {\n\t\tif a == name {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc defaultCallInfo() *callInfo {\n\treturn &callInfo{\n\t\tfailFast:              true,\n\t\tmaxRetryRPCBufferSize: 256 * 1024, // 256KB\n\t}\n}\n\nfunc newAcceptedCompressionConfig(names []string) ([]string, error) {\n\tif len(names) == 0 {\n\t\treturn nil, nil\n\t}\n\tvar allowed []string\n\tseen := make(map[string]struct{}, len(names))\n\tfor _, name := range names {\n\t\tname = strings.TrimSpace(name)\n\t\tif name == \"\" || name == encoding.Identity {\n\t\t\tcontinue\n\t\t}\n\t\tif !grpcutil.IsCompressorNameRegistered(name) {\n\t\t\treturn nil, status.Errorf(codes.InvalidArgument, \"grpc: compressor %q is not registered\", name)\n\t\t}\n\t\tif _, dup := seen[name]; dup {\n\t\t\tcontinue\n\t\t}\n\t\tseen[name] = struct{}{}\n\t\tallowed = append(allowed, name)\n\t}\n\treturn allowed, nil\n}\n\n// CallOption configures a Call before it starts or extracts information from\n// a Call after it completes.\ntype CallOption interface {\n\t// before is called before the call is sent to any server.  If before\n\t// returns a non-nil error, the RPC fails with that error.\n\tbefore(*callInfo) error\n\n\t// after is called after the call has completed.  after cannot return an\n\t// error, so any failures should be reported via output parameters.\n\tafter(*callInfo, *csAttempt)\n}\n\n// EmptyCallOption does not alter the Call configuration.\n// It can be embedded in another structure to carry satellite data for use\n// by interceptors.\ntype EmptyCallOption struct{}\n\nfunc (EmptyCallOption) before(*callInfo) error      { return nil }\nfunc (EmptyCallOption) after(*callInfo, *csAttempt) {}\n\n// StaticMethod returns a CallOption which specifies that a call is being made\n// to a method that is static, which means the method is known at compile time\n// and doesn't change at runtime. This can be used as a signal to stats plugins\n// that this method is safe to include as a key to a measurement.\nfunc StaticMethod() CallOption {\n\treturn StaticMethodCallOption{}\n}\n\n// StaticMethodCallOption is a CallOption that specifies that a call comes\n// from a static method.\ntype StaticMethodCallOption struct {\n\tEmptyCallOption\n}\n\n// Header returns a CallOptions that retrieves the header metadata\n// for a unary RPC.\nfunc Header(md *metadata.MD) CallOption {\n\treturn HeaderCallOption{HeaderAddr: md}\n}\n\n// HeaderCallOption is a CallOption for collecting response header metadata.\n// The metadata field will be populated *after* the RPC completes.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype HeaderCallOption struct {\n\tHeaderAddr *metadata.MD\n}\n\nfunc (o HeaderCallOption) before(*callInfo) error { return nil }\nfunc (o HeaderCallOption) after(_ *callInfo, attempt *csAttempt) {\n\t*o.HeaderAddr, _ = attempt.transportStream.Header()\n}\n\n// Trailer returns a CallOptions that retrieves the trailer metadata\n// for a unary RPC.\nfunc Trailer(md *metadata.MD) CallOption {\n\treturn TrailerCallOption{TrailerAddr: md}\n}\n\n// TrailerCallOption is a CallOption for collecting response trailer metadata.\n// The metadata field will be populated *after* the RPC completes.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype TrailerCallOption struct {\n\tTrailerAddr *metadata.MD\n}\n\nfunc (o TrailerCallOption) before(*callInfo) error { return nil }\nfunc (o TrailerCallOption) after(_ *callInfo, attempt *csAttempt) {\n\t*o.TrailerAddr = attempt.transportStream.Trailer()\n}\n\n// Peer returns a CallOption that retrieves peer information for a unary RPC.\n// The peer field will be populated *after* the RPC completes.\nfunc Peer(p *peer.Peer) CallOption {\n\treturn PeerCallOption{PeerAddr: p}\n}\n\n// PeerCallOption is a CallOption for collecting the identity of the remote\n// peer. The peer field will be populated *after* the RPC completes.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype PeerCallOption struct {\n\tPeerAddr *peer.Peer\n}\n\nfunc (o PeerCallOption) before(*callInfo) error { return nil }\nfunc (o PeerCallOption) after(_ *callInfo, attempt *csAttempt) {\n\tif x, ok := peer.FromContext(attempt.transportStream.Context()); ok {\n\t\t*o.PeerAddr = *x\n\t}\n}\n\n// WaitForReady configures the RPC's behavior when the client is in\n// TRANSIENT_FAILURE, which occurs when all addresses fail to connect.  If\n// waitForReady is false, the RPC will fail immediately.  Otherwise, the client\n// will wait until a connection becomes available or the RPC's deadline is\n// reached.\n//\n// By default, RPCs do not \"wait for ready\".\nfunc WaitForReady(waitForReady bool) CallOption {\n\treturn FailFastCallOption{FailFast: !waitForReady}\n}\n\n// FailFast is the opposite of WaitForReady.\n//\n// Deprecated: use WaitForReady.\nfunc FailFast(failFast bool) CallOption {\n\treturn FailFastCallOption{FailFast: failFast}\n}\n\n// FailFastCallOption is a CallOption for indicating whether an RPC should fail\n// fast or not.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype FailFastCallOption struct {\n\tFailFast bool\n}\n\nfunc (o FailFastCallOption) before(c *callInfo) error {\n\tc.failFast = o.FailFast\n\treturn nil\n}\nfunc (o FailFastCallOption) after(*callInfo, *csAttempt) {}\n\n// OnFinish returns a CallOption that configures a callback to be called when\n// the call completes. The error passed to the callback is the status of the\n// RPC, and may be nil. The onFinish callback provided will only be called once\n// by gRPC. This is mainly used to be used by streaming interceptors, to be\n// notified when the RPC completes along with information about the status of\n// the RPC.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc OnFinish(onFinish func(err error)) CallOption {\n\treturn OnFinishCallOption{\n\t\tOnFinish: onFinish,\n\t}\n}\n\n// OnFinishCallOption is CallOption that indicates a callback to be called when\n// the call completes.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype OnFinishCallOption struct {\n\tOnFinish func(error)\n}\n\nfunc (o OnFinishCallOption) before(c *callInfo) error {\n\tc.onFinish = append(c.onFinish, o.OnFinish)\n\treturn nil\n}\n\nfunc (o OnFinishCallOption) after(*callInfo, *csAttempt) {}\n\n// MaxCallRecvMsgSize returns a CallOption which sets the maximum message size\n// in bytes the client can receive. If this is not set, gRPC uses the default\n// 4MB.\nfunc MaxCallRecvMsgSize(bytes int) CallOption {\n\treturn MaxRecvMsgSizeCallOption{MaxRecvMsgSize: bytes}\n}\n\n// MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message\n// size in bytes the client can receive.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype MaxRecvMsgSizeCallOption struct {\n\tMaxRecvMsgSize int\n}\n\nfunc (o MaxRecvMsgSizeCallOption) before(c *callInfo) error {\n\tc.maxReceiveMessageSize = &o.MaxRecvMsgSize\n\treturn nil\n}\nfunc (o MaxRecvMsgSizeCallOption) after(*callInfo, *csAttempt) {}\n\n// CallAuthority returns a CallOption that sets the HTTP/2 :authority header of\n// an RPC to the specified value. When using CallAuthority, the credentials in\n// use must implement the AuthorityValidator interface.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a later\n// release.\nfunc CallAuthority(authority string) CallOption {\n\treturn AuthorityOverrideCallOption{Authority: authority}\n}\n\n// AuthorityOverrideCallOption is a CallOption that indicates the HTTP/2\n// :authority header value to use for the call.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a later\n// release.\ntype AuthorityOverrideCallOption struct {\n\tAuthority string\n}\n\nfunc (o AuthorityOverrideCallOption) before(c *callInfo) error {\n\tc.authority = o.Authority\n\treturn nil\n}\n\nfunc (o AuthorityOverrideCallOption) after(*callInfo, *csAttempt) {}\n\n// MaxCallSendMsgSize returns a CallOption which sets the maximum message size\n// in bytes the client can send. If this is not set, gRPC uses the default\n// `math.MaxInt32`.\nfunc MaxCallSendMsgSize(bytes int) CallOption {\n\treturn MaxSendMsgSizeCallOption{MaxSendMsgSize: bytes}\n}\n\n// MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message\n// size in bytes the client can send.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype MaxSendMsgSizeCallOption struct {\n\tMaxSendMsgSize int\n}\n\nfunc (o MaxSendMsgSizeCallOption) before(c *callInfo) error {\n\tc.maxSendMessageSize = &o.MaxSendMsgSize\n\treturn nil\n}\nfunc (o MaxSendMsgSizeCallOption) after(*callInfo, *csAttempt) {}\n\n// PerRPCCredentials returns a CallOption that sets credentials.PerRPCCredentials\n// for a call.\nfunc PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption {\n\treturn PerRPCCredsCallOption{Creds: creds}\n}\n\n// PerRPCCredsCallOption is a CallOption that indicates the per-RPC\n// credentials to use for the call.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype PerRPCCredsCallOption struct {\n\tCreds credentials.PerRPCCredentials\n}\n\nfunc (o PerRPCCredsCallOption) before(c *callInfo) error {\n\tc.creds = o.Creds\n\treturn nil\n}\nfunc (o PerRPCCredsCallOption) after(*callInfo, *csAttempt) {}\n\n// UseCompressor returns a CallOption which sets the compressor used when\n// sending the request.  If WithCompressor is also set, UseCompressor has\n// higher priority.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc UseCompressor(name string) CallOption {\n\treturn CompressorCallOption{CompressorType: name}\n}\n\n// CompressorCallOption is a CallOption that indicates the compressor to use.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype CompressorCallOption struct {\n\tCompressorType string\n}\n\nfunc (o CompressorCallOption) before(c *callInfo) error {\n\tc.compressorName = o.CompressorType\n\treturn nil\n}\nfunc (o CompressorCallOption) after(*callInfo, *csAttempt) {}\n\n// acceptCompressors returns a CallOption that limits the compression algorithms\n// advertised in the grpc-accept-encoding header for response messages.\n// Compression algorithms not in the provided list will not be advertised, and\n// responses compressed with non-listed algorithms will be rejected.\nfunc acceptCompressors(names ...string) CallOption {\n\tcp := append([]string(nil), names...)\n\treturn acceptCompressorsCallOption{names: cp}\n}\n\n// acceptCompressorsCallOption is a CallOption that limits response compression.\ntype acceptCompressorsCallOption struct {\n\tnames []string\n}\n\nfunc (o acceptCompressorsCallOption) before(c *callInfo) error {\n\tallowed, err := newAcceptedCompressionConfig(o.names)\n\tif err != nil {\n\t\treturn err\n\t}\n\tc.acceptedResponseCompressors = allowed\n\treturn nil\n}\n\nfunc (acceptCompressorsCallOption) after(*callInfo, *csAttempt) {}\n\n// CallContentSubtype returns a CallOption that will set the content-subtype\n// for a call. For example, if content-subtype is \"json\", the Content-Type over\n// the wire will be \"application/grpc+json\". The content-subtype is converted\n// to lowercase before being included in Content-Type. See Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details.\n//\n// If ForceCodec is not also used, the content-subtype will be used to look up\n// the Codec to use in the registry controlled by RegisterCodec. See the\n// documentation on RegisterCodec for details on registration. The lookup of\n// content-subtype is case-insensitive. If no such Codec is found, the call\n// will result in an error with code codes.Internal.\n//\n// If ForceCodec is also used, that Codec will be used for all request and\n// response messages, with the content-subtype set to the given contentSubtype\n// here for requests.\nfunc CallContentSubtype(contentSubtype string) CallOption {\n\treturn ContentSubtypeCallOption{ContentSubtype: strings.ToLower(contentSubtype)}\n}\n\n// ContentSubtypeCallOption is a CallOption that indicates the content-subtype\n// used for marshaling messages.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype ContentSubtypeCallOption struct {\n\tContentSubtype string\n}\n\nfunc (o ContentSubtypeCallOption) before(c *callInfo) error {\n\tc.contentSubtype = o.ContentSubtype\n\treturn nil\n}\nfunc (o ContentSubtypeCallOption) after(*callInfo, *csAttempt) {}\n\n// ForceCodec returns a CallOption that will set codec to be used for all\n// request and response messages for a call. The result of calling Name() will\n// be used as the content-subtype after converting to lowercase, unless\n// CallContentSubtype is also used.\n//\n// See Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details. Also see the documentation on RegisterCodec and\n// CallContentSubtype for more details on the interaction between Codec and\n// content-subtype.\n//\n// This function is provided for advanced users; prefer to use only\n// CallContentSubtype to select a registered codec instead.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ForceCodec(codec encoding.Codec) CallOption {\n\treturn ForceCodecCallOption{Codec: codec}\n}\n\n// ForceCodecCallOption is a CallOption that indicates the codec used for\n// marshaling messages.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype ForceCodecCallOption struct {\n\tCodec encoding.Codec\n}\n\nfunc (o ForceCodecCallOption) before(c *callInfo) error {\n\tc.codec = newCodecV1Bridge(o.Codec)\n\treturn nil\n}\nfunc (o ForceCodecCallOption) after(*callInfo, *csAttempt) {}\n\n// ForceCodecV2 returns a CallOption that will set codec to be used for all\n// request and response messages for a call. The result of calling Name() will\n// be used as the content-subtype after converting to lowercase, unless\n// CallContentSubtype is also used.\n//\n// See Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details. Also see the documentation on RegisterCodec and\n// CallContentSubtype for more details on the interaction between Codec and\n// content-subtype.\n//\n// This function is provided for advanced users; prefer to use only\n// CallContentSubtype to select a registered codec instead.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ForceCodecV2(codec encoding.CodecV2) CallOption {\n\treturn ForceCodecV2CallOption{CodecV2: codec}\n}\n\n// ForceCodecV2CallOption is a CallOption that indicates the codec used for\n// marshaling messages.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype ForceCodecV2CallOption struct {\n\tCodecV2 encoding.CodecV2\n}\n\nfunc (o ForceCodecV2CallOption) before(c *callInfo) error {\n\tc.codec = o.CodecV2\n\treturn nil\n}\n\nfunc (o ForceCodecV2CallOption) after(*callInfo, *csAttempt) {}\n\n// CallCustomCodec behaves like ForceCodec, but accepts a grpc.Codec instead of\n// an encoding.Codec.\n//\n// Deprecated: use ForceCodec instead.\nfunc CallCustomCodec(codec Codec) CallOption {\n\treturn CustomCodecCallOption{Codec: codec}\n}\n\n// CustomCodecCallOption is a CallOption that indicates the codec used for\n// marshaling messages.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype CustomCodecCallOption struct {\n\tCodec Codec\n}\n\nfunc (o CustomCodecCallOption) before(c *callInfo) error {\n\tc.codec = newCodecV0Bridge(o.Codec)\n\treturn nil\n}\nfunc (o CustomCodecCallOption) after(*callInfo, *csAttempt) {}\n\n// MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory\n// used for buffering this RPC's requests for retry purposes.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc MaxRetryRPCBufferSize(bytes int) CallOption {\n\treturn MaxRetryRPCBufferSizeCallOption{bytes}\n}\n\n// MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of\n// memory to be used for caching this RPC for retry purposes.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype MaxRetryRPCBufferSizeCallOption struct {\n\tMaxRetryRPCBufferSize int\n}\n\nfunc (o MaxRetryRPCBufferSizeCallOption) before(c *callInfo) error {\n\tc.maxRetryRPCBufferSize = o.MaxRetryRPCBufferSize\n\treturn nil\n}\nfunc (o MaxRetryRPCBufferSizeCallOption) after(*callInfo, *csAttempt) {}\n\n// The format of the payload: compressed or not?\ntype payloadFormat uint8\n\nconst (\n\tcompressionNone payloadFormat = 0 // no compression\n\tcompressionMade payloadFormat = 1 // compressed\n)\n\nfunc (pf payloadFormat) isCompressed() bool {\n\treturn pf == compressionMade\n}\n\ntype streamReader interface {\n\tReadMessageHeader(header []byte) error\n\tRead(n int) (mem.BufferSlice, error)\n}\n\n// noCopy may be embedded into structs which must not be copied\n// after the first use.\n//\n// See https://golang.org/issues/8005#issuecomment-190753527\n// for details.\ntype noCopy struct {\n}\n\nfunc (*noCopy) Lock()   {}\nfunc (*noCopy) Unlock() {}\n\n// parser reads complete gRPC messages from the underlying reader.\ntype parser struct {\n\t_ noCopy\n\t// r is the underlying reader.\n\t// See the comment on recvMsg for the permissible\n\t// error types.\n\tr streamReader\n\n\t// The header of a gRPC message. Find more detail at\n\t// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md\n\theader [5]byte\n\n\t// bufferPool is the pool of shared receive buffers.\n\tbufferPool mem.BufferPool\n}\n\n// recvMsg reads a complete gRPC message from the stream.\n//\n// It returns the message and its payload (compression/encoding)\n// format. The caller owns the returned msg memory.\n//\n// If there is an error, possible values are:\n//   - io.EOF, when no messages remain\n//   - io.ErrUnexpectedEOF\n//   - of type transport.ConnectionError\n//   - an error from the status package\n//\n// No other error values or types must be returned, which also means\n// that the underlying streamReader must not return an incompatible\n// error.\nfunc (p *parser) recvMsg(maxReceiveMessageSize int) (payloadFormat, mem.BufferSlice, error) {\n\terr := p.r.ReadMessageHeader(p.header[:])\n\tif err != nil {\n\t\treturn 0, nil, err\n\t}\n\n\tpf := payloadFormat(p.header[0])\n\tlength := binary.BigEndian.Uint32(p.header[1:])\n\n\tif int64(length) > int64(maxInt) {\n\t\treturn 0, nil, status.Errorf(codes.ResourceExhausted, \"grpc: received message larger than max length allowed on current machine (%d vs. %d)\", length, maxInt)\n\t}\n\tif int(length) > maxReceiveMessageSize {\n\t\treturn 0, nil, status.Errorf(codes.ResourceExhausted, \"grpc: received message larger than max (%d vs. %d)\", length, maxReceiveMessageSize)\n\t}\n\n\tdata, err := p.r.Read(int(length))\n\tif err != nil {\n\t\tif err == io.EOF {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t}\n\t\treturn 0, nil, err\n\t}\n\treturn pf, data, nil\n}\n\n// encode serializes msg and returns a buffer containing the message, or an\n// error if it is too large to be transmitted by grpc.  If msg is nil, it\n// generates an empty message.\nfunc encode(c baseCodec, msg any) (mem.BufferSlice, error) {\n\tif msg == nil { // NOTE: typed nils will not be caught by this check\n\t\treturn nil, nil\n\t}\n\tb, err := c.Marshal(msg)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.Internal, \"grpc: error while marshaling: %v\", err.Error())\n\t}\n\tif bufSize := uint(b.Len()); bufSize > math.MaxUint32 {\n\t\tb.Free()\n\t\treturn nil, status.Errorf(codes.ResourceExhausted, \"grpc: message too large (%d bytes)\", bufSize)\n\t}\n\treturn b, nil\n}\n\n// compress returns the input bytes compressed by compressor or cp.\n// If both compressors are nil, or if the message has zero length, returns nil,\n// indicating no compression was done.\n//\n// TODO(dfawley): eliminate cp parameter by wrapping Compressor in an encoding.Compressor.\nfunc compress(in mem.BufferSlice, cp Compressor, compressor encoding.Compressor, pool mem.BufferPool) (mem.BufferSlice, payloadFormat, error) {\n\tif (compressor == nil && cp == nil) || in.Len() == 0 {\n\t\treturn nil, compressionNone, nil\n\t}\n\tvar out mem.BufferSlice\n\tw := mem.NewWriter(&out, pool)\n\twrapErr := func(err error) error {\n\t\tout.Free()\n\t\treturn status.Errorf(codes.Internal, \"grpc: error while compressing: %v\", err.Error())\n\t}\n\tif compressor != nil {\n\t\tz, err := compressor.Compress(w)\n\t\tif err != nil {\n\t\t\treturn nil, 0, wrapErr(err)\n\t\t}\n\t\tfor _, b := range in {\n\t\t\tif _, err := z.Write(b.ReadOnlyData()); err != nil {\n\t\t\t\treturn nil, 0, wrapErr(err)\n\t\t\t}\n\t\t}\n\t\tif err := z.Close(); err != nil {\n\t\t\treturn nil, 0, wrapErr(err)\n\t\t}\n\t} else {\n\t\t// This is obviously really inefficient since it fully materializes the data, but\n\t\t// there is no way around this with the old Compressor API. At least it attempts\n\t\t// to return the buffer to the provider, in the hopes it can be reused (maybe\n\t\t// even by a subsequent call to this very function).\n\t\tbuf := in.MaterializeToBuffer(pool)\n\t\tdefer buf.Free()\n\t\tif err := cp.Do(w, buf.ReadOnlyData()); err != nil {\n\t\t\treturn nil, 0, wrapErr(err)\n\t\t}\n\t}\n\treturn out, compressionMade, nil\n}\n\nconst (\n\tpayloadLen = 1\n\tsizeLen    = 4\n\theaderLen  = payloadLen + sizeLen\n)\n\n// msgHeader returns a 5-byte header for the message being transmitted and the\n// payload, which is compData if non-nil or data otherwise.\nfunc msgHeader(data, compData mem.BufferSlice, pf payloadFormat) (hdr []byte, payload mem.BufferSlice) {\n\thdr = make([]byte, headerLen)\n\thdr[0] = byte(pf)\n\n\tvar length uint32\n\tif pf.isCompressed() {\n\t\tlength = uint32(compData.Len())\n\t\tpayload = compData\n\t} else {\n\t\tlength = uint32(data.Len())\n\t\tpayload = data\n\t}\n\n\t// Write length of payload into buf\n\tbinary.BigEndian.PutUint32(hdr[payloadLen:], length)\n\treturn hdr, payload\n}\n\nfunc outPayload(client bool, msg any, dataLength, payloadLength int, t time.Time) *stats.OutPayload {\n\treturn &stats.OutPayload{\n\t\tClient:           client,\n\t\tPayload:          msg,\n\t\tLength:           dataLength,\n\t\tWireLength:       payloadLength + headerLen,\n\t\tCompressedLength: payloadLength,\n\t\tSentTime:         t,\n\t}\n}\n\nfunc checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool, isServer bool) *status.Status {\n\tswitch pf {\n\tcase compressionNone:\n\tcase compressionMade:\n\t\tif recvCompress == \"\" || recvCompress == encoding.Identity {\n\t\t\treturn status.New(codes.Internal, \"grpc: compressed flag set with identity or empty encoding\")\n\t\t}\n\t\tif !haveCompressor {\n\t\t\tif isServer {\n\t\t\t\treturn status.Newf(codes.Unimplemented, \"grpc: Decompressor is not installed for grpc-encoding %q\", recvCompress)\n\t\t\t}\n\t\t\treturn status.Newf(codes.Internal, \"grpc: Decompressor is not installed for grpc-encoding %q\", recvCompress)\n\t\t}\n\tdefault:\n\t\treturn status.Newf(codes.Internal, \"grpc: received unexpected payload format %d\", pf)\n\t}\n\treturn nil\n}\n\ntype payloadInfo struct {\n\tcompressedLength  int // The compressed length got from wire.\n\tuncompressedBytes mem.BufferSlice\n}\n\nfunc (p *payloadInfo) free() {\n\tif p != nil && p.uncompressedBytes != nil {\n\t\tp.uncompressedBytes.Free()\n\t}\n}\n\n// recvAndDecompress reads a message from the stream, decompressing it if necessary.\n//\n// Cancelling the returned cancel function releases the buffer back to the pool. So the caller should cancel as soon as\n// the buffer is no longer needed.\n// TODO: Refactor this function to reduce the number of arguments.\n// See: https://google.github.io/styleguide/go/best-practices.html#function-argument-lists\nfunc recvAndDecompress(p *parser, s recvCompressor, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool) (out mem.BufferSlice, err error) {\n\tpf, compressed, err := p.recvMsg(maxReceiveMessageSize)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcompressedLength := compressed.Len()\n\n\tif st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil, isServer); st != nil {\n\t\tcompressed.Free()\n\t\treturn nil, st.Err()\n\t}\n\n\tif pf.isCompressed() {\n\t\tdefer compressed.Free()\n\t\t// To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor,\n\t\t// use this decompressor as the default.\n\t\tout, err = decompress(compressor, compressed, dc, maxReceiveMessageSize, p.bufferPool)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tout = compressed\n\t}\n\n\tif payInfo != nil {\n\t\tpayInfo.compressedLength = compressedLength\n\t\tout.Ref()\n\t\tpayInfo.uncompressedBytes = out\n\t}\n\n\treturn out, nil\n}\n\n// decompress processes the given data by decompressing it using either a custom decompressor or a standard compressor.\n// If a custom decompressor is provided, it takes precedence. The function validates that the decompressed data\n// does not exceed the specified maximum size and returns an error if this limit is exceeded.\n// On success, it returns the decompressed data. Otherwise, it returns an error if decompression fails or the data exceeds the size limit.\nfunc decompress(compressor encoding.Compressor, d mem.BufferSlice, dc Decompressor, maxReceiveMessageSize int, pool mem.BufferPool) (mem.BufferSlice, error) {\n\tif dc != nil {\n\t\tuncompressed, err := dc.Do(d.Reader())\n\t\tif err != nil {\n\t\t\treturn nil, status.Errorf(codes.Internal, \"grpc: failed to decompress the received message: %v\", err)\n\t\t}\n\t\tif len(uncompressed) > maxReceiveMessageSize {\n\t\t\treturn nil, status.Errorf(codes.ResourceExhausted, \"grpc: message after decompression larger than max (%d vs. %d)\", len(uncompressed), maxReceiveMessageSize)\n\t\t}\n\t\treturn mem.BufferSlice{mem.SliceBuffer(uncompressed)}, nil\n\t}\n\tif compressor != nil {\n\t\tdcReader, err := compressor.Decompress(d.Reader())\n\t\tif err != nil {\n\t\t\treturn nil, status.Errorf(codes.Internal, \"grpc: failed to decompress the message: %v\", err)\n\t\t}\n\n\t\t// Read at most one byte more than the limit from the decompressor.\n\t\t// Unless the limit is MaxInt64, in which case, that's impossible, so\n\t\t// apply no limit.\n\t\tif limit := int64(maxReceiveMessageSize); limit < math.MaxInt64 {\n\t\t\tdcReader = io.LimitReader(dcReader, limit+1)\n\t\t}\n\t\tout, err := mem.ReadAll(dcReader, pool)\n\t\tif err != nil {\n\t\t\tout.Free()\n\t\t\treturn nil, status.Errorf(codes.Internal, \"grpc: failed to read decompressed data: %v\", err)\n\t\t}\n\n\t\tif out.Len() > maxReceiveMessageSize {\n\t\t\tout.Free()\n\t\t\treturn nil, status.Errorf(codes.ResourceExhausted, \"grpc: received message after decompression larger than max %d\", maxReceiveMessageSize)\n\t\t}\n\t\treturn out, nil\n\t}\n\treturn nil, status.Errorf(codes.Internal, \"grpc: no decompressor available for compressed payload\")\n}\n\ntype recvCompressor interface {\n\tRecvCompress() string\n}\n\n// For the two compressor parameters, both should not be set, but if they are,\n// dc takes precedence over compressor.\n// TODO(dfawley): wrap the old compressor/decompressor using the new API?\nfunc recv(p *parser, c baseCodec, s recvCompressor, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool) error {\n\tdata, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor, isServer)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If the codec wants its own reference to the data, it can get it. Otherwise, always\n\t// free the buffers.\n\tdefer data.Free()\n\n\tif err := c.Unmarshal(data, m); err != nil {\n\t\treturn status.Errorf(codes.Internal, \"grpc: failed to unmarshal the received message: %v\", err)\n\t}\n\n\treturn nil\n}\n\n// Information about RPC\ntype rpcInfo struct {\n\tfailfast      bool\n\tpreloaderInfo compressorInfo\n}\n\n// Information about Preloader\n// Responsible for storing codec, and compressors\n// If stream (s) has  context s.Context which stores rpcInfo that has non nil\n// pointers to codec, and compressors, then we can use preparedMsg for Async message prep\n// and reuse marshalled bytes\ntype compressorInfo struct {\n\tcodec baseCodec\n\tcp    Compressor\n\tcomp  encoding.Compressor\n}\n\ntype rpcInfoContextKey struct{}\n\nfunc newContextWithRPCInfo(ctx context.Context, failfast bool, codec baseCodec, cp Compressor, comp encoding.Compressor) context.Context {\n\treturn context.WithValue(ctx, rpcInfoContextKey{}, &rpcInfo{\n\t\tfailfast: failfast,\n\t\tpreloaderInfo: compressorInfo{\n\t\t\tcodec: codec,\n\t\t\tcp:    cp,\n\t\t\tcomp:  comp,\n\t\t},\n\t})\n}\n\nfunc rpcInfoFromContext(ctx context.Context) (s *rpcInfo, ok bool) {\n\ts, ok = ctx.Value(rpcInfoContextKey{}).(*rpcInfo)\n\treturn\n}\n\n// Code returns the error code for err if it was produced by the rpc system.\n// Otherwise, it returns codes.Unknown.\n//\n// Deprecated: use status.Code instead.\nfunc Code(err error) codes.Code {\n\treturn status.Code(err)\n}\n\n// ErrorDesc returns the error description of err if it was produced by the rpc system.\n// Otherwise, it returns err.Error() or empty string when err is nil.\n//\n// Deprecated: use status.Convert and Message method instead.\nfunc ErrorDesc(err error) string {\n\treturn status.Convert(err).Message()\n}\n\n// Errorf returns an error containing an error code and a description;\n// Errorf returns nil if c is OK.\n//\n// Deprecated: use status.Errorf instead.\nfunc Errorf(c codes.Code, format string, a ...any) error {\n\treturn status.Errorf(c, format, a...)\n}\n\nvar errContextCanceled = status.Error(codes.Canceled, context.Canceled.Error())\nvar errContextDeadline = status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error())\n\n// toRPCErr converts an error into an error from the status package.\nfunc toRPCErr(err error) error {\n\tswitch err {\n\tcase nil, io.EOF:\n\t\treturn err\n\tcase context.DeadlineExceeded:\n\t\treturn errContextDeadline\n\tcase context.Canceled:\n\t\treturn errContextCanceled\n\tcase io.ErrUnexpectedEOF:\n\t\treturn status.Error(codes.Internal, err.Error())\n\t}\n\n\tswitch e := err.(type) {\n\tcase transport.ConnectionError:\n\t\treturn status.Error(codes.Unavailable, e.Desc)\n\tcase *transport.NewStreamError:\n\t\treturn toRPCErr(e.Err)\n\t}\n\n\tif _, ok := status.FromError(err); ok {\n\t\treturn err\n\t}\n\n\treturn status.Error(codes.Unknown, err.Error())\n}\n\n// setCallInfoCodec should only be called after CallOptions have been applied.\nfunc setCallInfoCodec(c *callInfo) error {\n\tif c.codec != nil {\n\t\t// codec was already set by a CallOption; use it, but set the content\n\t\t// subtype if it is not set.\n\t\tif c.contentSubtype == \"\" {\n\t\t\t// c.codec is a baseCodec to hide the difference between grpc.Codec and\n\t\t\t// encoding.Codec (Name vs. String method name).  We only support\n\t\t\t// setting content subtype from encoding.Codec to avoid a behavior\n\t\t\t// change with the deprecated version.\n\t\t\tif ec, ok := c.codec.(encoding.CodecV2); ok {\n\t\t\t\tc.contentSubtype = strings.ToLower(ec.Name())\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tif c.contentSubtype == \"\" {\n\t\t// No codec specified in CallOptions; use proto by default.\n\t\tc.codec = getCodec(proto.Name)\n\t\treturn nil\n\t}\n\n\t// c.contentSubtype is already lowercased in CallContentSubtype\n\tc.codec = getCodec(c.contentSubtype)\n\tif c.codec == nil {\n\t\treturn status.Errorf(codes.Internal, \"no codec registered for content-subtype %s\", c.contentSubtype)\n\t}\n\treturn nil\n}\n\n// The SupportPackageIsVersion variables are referenced from generated protocol\n// buffer files to ensure compatibility with the gRPC version used.  The latest\n// support package version is 9.\n//\n// Older versions are kept for compatibility.\n//\n// These constants should not be referenced from any other code.\nconst (\n\tSupportPackageIsVersion3 = true\n\tSupportPackageIsVersion4 = true\n\tSupportPackageIsVersion5 = true\n\tSupportPackageIsVersion6 = true\n\tSupportPackageIsVersion7 = true\n\tSupportPackageIsVersion8 = true\n\tSupportPackageIsVersion9 = true\n)\n\nconst grpcUA = \"grpc-go/\" + Version\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/server.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"net\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/encoding\"\n\t\"google.golang.org/grpc/encoding/proto\"\n\testats \"google.golang.org/grpc/experimental/stats\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/binarylog\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcsync\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\tistats \"google.golang.org/grpc/internal/stats\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/keepalive\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/grpc/tap\"\n)\n\nconst (\n\tdefaultServerMaxReceiveMessageSize = 1024 * 1024 * 4\n\tdefaultServerMaxSendMessageSize    = math.MaxInt32\n\n\t// Server transports are tracked in a map which is keyed on listener\n\t// address. For regular gRPC traffic, connections are accepted in Serve()\n\t// through a call to Accept(), and we use the actual listener address as key\n\t// when we add it to the map. But for connections received through\n\t// ServeHTTP(), we do not have a listener and hence use this dummy value.\n\tlistenerAddressForServeHTTP = \"listenerAddressForServeHTTP\"\n)\n\nfunc init() {\n\tinternal.GetServerCredentials = func(srv *Server) credentials.TransportCredentials {\n\t\treturn srv.opts.creds\n\t}\n\tinternal.IsRegisteredMethod = func(srv *Server, method string) bool {\n\t\treturn srv.isRegisteredMethod(method)\n\t}\n\tinternal.ServerFromContext = serverFromContext\n\tinternal.AddGlobalServerOptions = func(opt ...ServerOption) {\n\t\tglobalServerOptions = append(globalServerOptions, opt...)\n\t}\n\tinternal.ClearGlobalServerOptions = func() {\n\t\tglobalServerOptions = nil\n\t}\n\tinternal.BinaryLogger = binaryLogger\n\tinternal.JoinServerOptions = newJoinServerOption\n\tinternal.BufferPool = bufferPool\n\tinternal.MetricsRecorderForServer = func(srv *Server) estats.MetricsRecorder {\n\t\treturn istats.NewMetricsRecorderList(srv.opts.statsHandlers)\n\t}\n}\n\nvar statusOK = status.New(codes.OK, \"\")\nvar logger = grpclog.Component(\"core\")\n\n// MethodHandler is a function type that processes a unary RPC method call.\ntype MethodHandler func(srv any, ctx context.Context, dec func(any) error, interceptor UnaryServerInterceptor) (any, error)\n\n// MethodDesc represents an RPC service's method specification.\ntype MethodDesc struct {\n\tMethodName string\n\tHandler    MethodHandler\n}\n\n// ServiceDesc represents an RPC service's specification.\ntype ServiceDesc struct {\n\tServiceName string\n\t// The pointer to the service interface. Used to check whether the user\n\t// provided implementation satisfies the interface requirements.\n\tHandlerType any\n\tMethods     []MethodDesc\n\tStreams     []StreamDesc\n\tMetadata    any\n}\n\n// serviceInfo wraps information about a service. It is very similar to\n// ServiceDesc and is constructed from it for internal purposes.\ntype serviceInfo struct {\n\t// Contains the implementation for the methods in this service.\n\tserviceImpl any\n\tmethods     map[string]*MethodDesc\n\tstreams     map[string]*StreamDesc\n\tmdata       any\n}\n\n// Server is a gRPC server to serve RPC requests.\ntype Server struct {\n\topts         serverOptions\n\tstatsHandler stats.Handler\n\n\tmu  sync.Mutex // guards following\n\tlis map[net.Listener]bool\n\t// conns contains all active server transports. It is a map keyed on a\n\t// listener address with the value being the set of active transports\n\t// belonging to that listener.\n\tconns    map[string]map[transport.ServerTransport]bool\n\tserve    bool\n\tdrain    bool\n\tcv       *sync.Cond              // signaled when connections close for GracefulStop\n\tservices map[string]*serviceInfo // service name -> service info\n\tevents   traceEventLog\n\n\tquit               *grpcsync.Event\n\tdone               *grpcsync.Event\n\tchannelzRemoveOnce sync.Once\n\tserveWG            sync.WaitGroup // counts active Serve goroutines for Stop/GracefulStop\n\thandlersWG         sync.WaitGroup // counts active method handler goroutines\n\n\tchannelz *channelz.Server\n\n\tserverWorkerChannel      chan func()\n\tserverWorkerChannelClose func()\n}\n\ntype serverOptions struct {\n\tcreds                 credentials.TransportCredentials\n\tcodec                 baseCodec\n\tcp                    Compressor\n\tdc                    Decompressor\n\tunaryInt              UnaryServerInterceptor\n\tstreamInt             StreamServerInterceptor\n\tchainUnaryInts        []UnaryServerInterceptor\n\tchainStreamInts       []StreamServerInterceptor\n\tbinaryLogger          binarylog.Logger\n\tinTapHandle           tap.ServerInHandle\n\tstatsHandlers         []stats.Handler\n\tmaxConcurrentStreams  uint32\n\tmaxReceiveMessageSize int\n\tmaxSendMessageSize    int\n\tunknownStreamDesc     *StreamDesc\n\tkeepaliveParams       keepalive.ServerParameters\n\tkeepalivePolicy       keepalive.EnforcementPolicy\n\tinitialWindowSize     int32\n\tinitialConnWindowSize int32\n\twriteBufferSize       int\n\treadBufferSize        int\n\tsharedWriteBuffer     bool\n\tconnectionTimeout     time.Duration\n\tmaxHeaderListSize     *uint32\n\theaderTableSize       *uint32\n\tnumServerWorkers      uint32\n\tbufferPool            mem.BufferPool\n\twaitForHandlers       bool\n\tstaticWindowSize      bool\n}\n\nvar defaultServerOptions = serverOptions{\n\tmaxConcurrentStreams:  math.MaxUint32,\n\tmaxReceiveMessageSize: defaultServerMaxReceiveMessageSize,\n\tmaxSendMessageSize:    defaultServerMaxSendMessageSize,\n\tconnectionTimeout:     120 * time.Second,\n\twriteBufferSize:       defaultWriteBufSize,\n\treadBufferSize:        defaultReadBufSize,\n\tbufferPool:            mem.DefaultBufferPool(),\n}\nvar globalServerOptions []ServerOption\n\n// A ServerOption sets options such as credentials, codec and keepalive parameters, etc.\ntype ServerOption interface {\n\tapply(*serverOptions)\n}\n\n// EmptyServerOption does not alter the server configuration. It can be embedded\n// in another structure to build custom server options.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype EmptyServerOption struct{}\n\nfunc (EmptyServerOption) apply(*serverOptions) {}\n\n// funcServerOption wraps a function that modifies serverOptions into an\n// implementation of the ServerOption interface.\ntype funcServerOption struct {\n\tf func(*serverOptions)\n}\n\nfunc (fdo *funcServerOption) apply(do *serverOptions) {\n\tfdo.f(do)\n}\n\nfunc newFuncServerOption(f func(*serverOptions)) *funcServerOption {\n\treturn &funcServerOption{\n\t\tf: f,\n\t}\n}\n\n// joinServerOption provides a way to combine arbitrary number of server\n// options into one.\ntype joinServerOption struct {\n\topts []ServerOption\n}\n\nfunc (mdo *joinServerOption) apply(do *serverOptions) {\n\tfor _, opt := range mdo.opts {\n\t\topt.apply(do)\n\t}\n}\n\nfunc newJoinServerOption(opts ...ServerOption) ServerOption {\n\treturn &joinServerOption{opts: opts}\n}\n\n// SharedWriteBuffer allows reusing per-connection transport write buffer.\n// If this option is set to true every connection will release the buffer after\n// flushing the data on the wire.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc SharedWriteBuffer(val bool) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.sharedWriteBuffer = val\n\t})\n}\n\n// WriteBufferSize determines how much data can be batched before doing a write\n// on the wire. The default value for this buffer is 32KB. Zero or negative\n// values will disable the write buffer such that each write will be on underlying\n// connection. Note: A Send call may not directly translate to a write.\nfunc WriteBufferSize(s int) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.writeBufferSize = s\n\t})\n}\n\n// ReadBufferSize lets you set the size of read buffer, this determines how much\n// data can be read at most for one read syscall. The default value for this\n// buffer is 32KB. Zero or negative values will disable read buffer for a\n// connection so data framer can access the underlying conn directly.\nfunc ReadBufferSize(s int) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.readBufferSize = s\n\t})\n}\n\n// InitialWindowSize returns a ServerOption that sets window size for stream.\n// The lower bound for window size is 64K and any value smaller than that will be ignored.\nfunc InitialWindowSize(s int32) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.initialWindowSize = s\n\t\to.staticWindowSize = true\n\t})\n}\n\n// InitialConnWindowSize returns a ServerOption that sets window size for a connection.\n// The lower bound for window size is 64K and any value smaller than that will be ignored.\nfunc InitialConnWindowSize(s int32) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.initialConnWindowSize = s\n\t\to.staticWindowSize = true\n\t})\n}\n\n// StaticStreamWindowSize returns a ServerOption to set the initial stream\n// window size to the value provided and disables dynamic flow control.\n// The lower bound for window size is 64K and any value smaller than that\n// will be ignored.\nfunc StaticStreamWindowSize(s int32) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.initialWindowSize = s\n\t\to.staticWindowSize = true\n\t})\n}\n\n// StaticConnWindowSize returns a ServerOption to set the initial connection\n// window size to the value provided and disables dynamic flow control.\n// The lower bound for window size is 64K and any value smaller than that\n// will be ignored.\nfunc StaticConnWindowSize(s int32) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.initialConnWindowSize = s\n\t\to.staticWindowSize = true\n\t})\n}\n\n// KeepaliveParams returns a ServerOption that sets keepalive and max-age parameters for the server.\nfunc KeepaliveParams(kp keepalive.ServerParameters) ServerOption {\n\tif kp.Time > 0 && kp.Time < internal.KeepaliveMinServerPingTime {\n\t\tlogger.Warning(\"Adjusting keepalive ping interval to minimum period of 1s\")\n\t\tkp.Time = internal.KeepaliveMinServerPingTime\n\t}\n\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.keepaliveParams = kp\n\t})\n}\n\n// KeepaliveEnforcementPolicy returns a ServerOption that sets keepalive enforcement policy for the server.\nfunc KeepaliveEnforcementPolicy(kep keepalive.EnforcementPolicy) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.keepalivePolicy = kep\n\t})\n}\n\n// CustomCodec returns a ServerOption that sets a codec for message marshaling and unmarshaling.\n//\n// This will override any lookups by content-subtype for Codecs registered with RegisterCodec.\n//\n// Deprecated: register codecs using encoding.RegisterCodec. The server will\n// automatically use registered codecs based on the incoming requests' headers.\n// See also\n// https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec.\n// Will be supported throughout 1.x.\nfunc CustomCodec(codec Codec) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.codec = newCodecV0Bridge(codec)\n\t})\n}\n\n// ForceServerCodec returns a ServerOption that sets a codec for message\n// marshaling and unmarshaling.\n//\n// This will override any lookups by content-subtype for Codecs registered\n// with RegisterCodec.\n//\n// See Content-Type on\n// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for\n// more details. Also see the documentation on RegisterCodec and\n// CallContentSubtype for more details on the interaction between encoding.Codec\n// and content-subtype.\n//\n// This function is provided for advanced users; prefer to register codecs\n// using encoding.RegisterCodec.\n// The server will automatically use registered codecs based on the incoming\n// requests' headers. See also\n// https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec.\n// Will be supported throughout 1.x.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ForceServerCodec(codec encoding.Codec) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.codec = newCodecV1Bridge(codec)\n\t})\n}\n\n// ForceServerCodecV2 is the equivalent of ForceServerCodec, but for the new\n// CodecV2 interface.\n//\n// Will be supported throughout 1.x.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ForceServerCodecV2(codecV2 encoding.CodecV2) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.codec = codecV2\n\t})\n}\n\n// RPCCompressor returns a ServerOption that sets a compressor for outbound\n// messages.  For backward compatibility, all outbound messages will be sent\n// using this compressor, regardless of incoming message compression.  By\n// default, server messages will be sent using the same compressor with which\n// request messages were sent.\n//\n// Deprecated: use encoding.RegisterCompressor instead. Will be supported\n// throughout 1.x.\nfunc RPCCompressor(cp Compressor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.cp = cp\n\t})\n}\n\n// RPCDecompressor returns a ServerOption that sets a decompressor for inbound\n// messages.  It has higher priority than decompressors registered via\n// encoding.RegisterCompressor.\n//\n// Deprecated: use encoding.RegisterCompressor instead. Will be supported\n// throughout 1.x.\nfunc RPCDecompressor(dc Decompressor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.dc = dc\n\t})\n}\n\n// MaxMsgSize returns a ServerOption to set the max message size in bytes the server can receive.\n// If this is not set, gRPC uses the default limit.\n//\n// Deprecated: use MaxRecvMsgSize instead. Will be supported throughout 1.x.\nfunc MaxMsgSize(m int) ServerOption {\n\treturn MaxRecvMsgSize(m)\n}\n\n// MaxRecvMsgSize returns a ServerOption to set the max message size in bytes the server can receive.\n// If this is not set, gRPC uses the default 4MB.\nfunc MaxRecvMsgSize(m int) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.maxReceiveMessageSize = m\n\t})\n}\n\n// MaxSendMsgSize returns a ServerOption to set the max message size in bytes the server can send.\n// If this is not set, gRPC uses the default `math.MaxInt32`.\nfunc MaxSendMsgSize(m int) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.maxSendMessageSize = m\n\t})\n}\n\n// MaxConcurrentStreams returns a ServerOption that will apply a limit on the number\n// of concurrent streams to each ServerTransport.\nfunc MaxConcurrentStreams(n uint32) ServerOption {\n\tif n == 0 {\n\t\tn = math.MaxUint32\n\t}\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.maxConcurrentStreams = n\n\t})\n}\n\n// Creds returns a ServerOption that sets credentials for server connections.\nfunc Creds(c credentials.TransportCredentials) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.creds = c\n\t})\n}\n\n// UnaryInterceptor returns a ServerOption that sets the UnaryServerInterceptor for the\n// server. Only one unary interceptor can be installed. The construction of multiple\n// interceptors (e.g., chaining) can be implemented at the caller.\nfunc UnaryInterceptor(i UnaryServerInterceptor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\tif o.unaryInt != nil {\n\t\t\tpanic(\"The unary server interceptor was already set and may not be reset.\")\n\t\t}\n\t\to.unaryInt = i\n\t})\n}\n\n// ChainUnaryInterceptor returns a ServerOption that specifies the chained interceptor\n// for unary RPCs. The first interceptor will be the outer most,\n// while the last interceptor will be the inner most wrapper around the real call.\n// All unary interceptors added by this method will be chained.\nfunc ChainUnaryInterceptor(interceptors ...UnaryServerInterceptor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.chainUnaryInts = append(o.chainUnaryInts, interceptors...)\n\t})\n}\n\n// StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the\n// server. Only one stream interceptor can be installed.\nfunc StreamInterceptor(i StreamServerInterceptor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\tif o.streamInt != nil {\n\t\t\tpanic(\"The stream server interceptor was already set and may not be reset.\")\n\t\t}\n\t\to.streamInt = i\n\t})\n}\n\n// ChainStreamInterceptor returns a ServerOption that specifies the chained interceptor\n// for streaming RPCs. The first interceptor will be the outer most,\n// while the last interceptor will be the inner most wrapper around the real call.\n// All stream interceptors added by this method will be chained.\nfunc ChainStreamInterceptor(interceptors ...StreamServerInterceptor) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.chainStreamInts = append(o.chainStreamInts, interceptors...)\n\t})\n}\n\n// InTapHandle returns a ServerOption that sets the tap handle for all the server\n// transport to be created. Only one can be installed.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc InTapHandle(h tap.ServerInHandle) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\tif o.inTapHandle != nil {\n\t\t\tpanic(\"The tap handle was already set and may not be reset.\")\n\t\t}\n\t\to.inTapHandle = h\n\t})\n}\n\n// StatsHandler returns a ServerOption that sets the stats handler for the server.\nfunc StatsHandler(h stats.Handler) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\tif h == nil {\n\t\t\tlogger.Error(\"ignoring nil parameter in grpc.StatsHandler ServerOption\")\n\t\t\t// Do not allow a nil stats handler, which would otherwise cause\n\t\t\t// panics.\n\t\t\treturn\n\t\t}\n\t\to.statsHandlers = append(o.statsHandlers, h)\n\t})\n}\n\n// binaryLogger returns a ServerOption that can set the binary logger for the\n// server.\nfunc binaryLogger(bl binarylog.Logger) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.binaryLogger = bl\n\t})\n}\n\n// UnknownServiceHandler returns a ServerOption that allows for adding a custom\n// unknown service handler. The provided method is a bidi-streaming RPC service\n// handler that will be invoked instead of returning the \"unimplemented\" gRPC\n// error whenever a request is received for an unregistered service or method.\n// The handling function and stream interceptor (if set) have full access to\n// the ServerStream, including its Context.\nfunc UnknownServiceHandler(streamHandler StreamHandler) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.unknownStreamDesc = &StreamDesc{\n\t\t\tStreamName: \"unknown_service_handler\",\n\t\t\tHandler:    streamHandler,\n\t\t\t// We need to assume that the users of the streamHandler will want to use both.\n\t\t\tClientStreams: true,\n\t\t\tServerStreams: true,\n\t\t}\n\t})\n}\n\n// ConnectionTimeout returns a ServerOption that sets the timeout for\n// connection establishment (up to and including HTTP/2 handshaking) for all\n// new connections.  If this is not set, the default is 120 seconds.  A zero or\n// negative value will result in an immediate timeout.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ConnectionTimeout(d time.Duration) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.connectionTimeout = d\n\t})\n}\n\n// MaxHeaderListSizeServerOption is a ServerOption that sets the max\n// (uncompressed) size of header list that the server is prepared to accept.\ntype MaxHeaderListSizeServerOption struct {\n\tMaxHeaderListSize uint32\n}\n\nfunc (o MaxHeaderListSizeServerOption) apply(so *serverOptions) {\n\tso.maxHeaderListSize = &o.MaxHeaderListSize\n}\n\n// MaxHeaderListSize returns a ServerOption that sets the max (uncompressed) size\n// of header list that the server is prepared to accept.\nfunc MaxHeaderListSize(s uint32) ServerOption {\n\treturn MaxHeaderListSizeServerOption{\n\t\tMaxHeaderListSize: s,\n\t}\n}\n\n// HeaderTableSize returns a ServerOption that sets the size of dynamic\n// header table for stream.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc HeaderTableSize(s uint32) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.headerTableSize = &s\n\t})\n}\n\n// NumStreamWorkers returns a ServerOption that sets the number of worker\n// goroutines that should be used to process incoming streams. Setting this to\n// zero (default) will disable workers and spawn a new goroutine for each\n// stream.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc NumStreamWorkers(numServerWorkers uint32) ServerOption {\n\t// TODO: If/when this API gets stabilized (i.e. stream workers become the\n\t// only way streams are processed), change the behavior of the zero value to\n\t// a sane default. Preliminary experiments suggest that a value equal to the\n\t// number of CPUs available is most performant; requires thorough testing.\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.numServerWorkers = numServerWorkers\n\t})\n}\n\n// WaitForHandlers cause Stop to wait until all outstanding method handlers have\n// exited before returning.  If false, Stop will return as soon as all\n// connections have closed, but method handlers may still be running. By\n// default, Stop does not wait for method handlers to return.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc WaitForHandlers(w bool) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.waitForHandlers = w\n\t})\n}\n\nfunc bufferPool(bufferPool mem.BufferPool) ServerOption {\n\treturn newFuncServerOption(func(o *serverOptions) {\n\t\to.bufferPool = bufferPool\n\t})\n}\n\n// serverWorkerResetThreshold defines how often the stack must be reset. Every\n// N requests, by spawning a new goroutine in its place, a worker can reset its\n// stack so that large stacks don't live in memory forever. 2^16 should allow\n// each goroutine stack to live for at least a few seconds in a typical\n// workload (assuming a QPS of a few thousand requests/sec).\nconst serverWorkerResetThreshold = 1 << 16\n\n// serverWorker blocks on a *transport.ServerStream channel forever and waits\n// for data to be fed by serveStreams. This allows multiple requests to be\n// processed by the same goroutine, removing the need for expensive stack\n// re-allocations (see the runtime.morestack problem [1]).\n//\n// [1] https://github.com/golang/go/issues/18138\nfunc (s *Server) serverWorker() {\n\tfor completed := 0; completed < serverWorkerResetThreshold; completed++ {\n\t\tf, ok := <-s.serverWorkerChannel\n\t\tif !ok {\n\t\t\treturn\n\t\t}\n\t\tf()\n\t}\n\tgo s.serverWorker()\n}\n\n// initServerWorkers creates worker goroutines and a channel to process incoming\n// connections to reduce the time spent overall on runtime.morestack.\nfunc (s *Server) initServerWorkers() {\n\ts.serverWorkerChannel = make(chan func())\n\ts.serverWorkerChannelClose = sync.OnceFunc(func() {\n\t\tclose(s.serverWorkerChannel)\n\t})\n\tfor i := uint32(0); i < s.opts.numServerWorkers; i++ {\n\t\tgo s.serverWorker()\n\t}\n}\n\n// NewServer creates a gRPC server which has no service registered and has not\n// started to accept requests yet.\nfunc NewServer(opt ...ServerOption) *Server {\n\topts := defaultServerOptions\n\tfor _, o := range globalServerOptions {\n\t\to.apply(&opts)\n\t}\n\tfor _, o := range opt {\n\t\to.apply(&opts)\n\t}\n\ts := &Server{\n\t\tlis:          make(map[net.Listener]bool),\n\t\topts:         opts,\n\t\tstatsHandler: istats.NewCombinedHandler(opts.statsHandlers...),\n\t\tconns:        make(map[string]map[transport.ServerTransport]bool),\n\t\tservices:     make(map[string]*serviceInfo),\n\t\tquit:         grpcsync.NewEvent(),\n\t\tdone:         grpcsync.NewEvent(),\n\t\tchannelz:     channelz.RegisterServer(\"\"),\n\t}\n\tchainUnaryServerInterceptors(s)\n\tchainStreamServerInterceptors(s)\n\ts.cv = sync.NewCond(&s.mu)\n\tif EnableTracing {\n\t\t_, file, line, _ := runtime.Caller(1)\n\t\ts.events = newTraceEventLog(\"grpc.Server\", fmt.Sprintf(\"%s:%d\", file, line))\n\t}\n\n\tif s.opts.numServerWorkers > 0 {\n\t\ts.initServerWorkers()\n\t}\n\n\tchannelz.Info(logger, s.channelz, \"Server created\")\n\treturn s\n}\n\n// printf records an event in s's event log, unless s has been stopped.\n// REQUIRES s.mu is held.\nfunc (s *Server) printf(format string, a ...any) {\n\tif s.events != nil {\n\t\ts.events.Printf(format, a...)\n\t}\n}\n\n// errorf records an error in s's event log, unless s has been stopped.\n// REQUIRES s.mu is held.\nfunc (s *Server) errorf(format string, a ...any) {\n\tif s.events != nil {\n\t\ts.events.Errorf(format, a...)\n\t}\n}\n\n// ServiceRegistrar wraps a single method that supports service registration. It\n// enables users to pass concrete types other than grpc.Server to the service\n// registration methods exported by the IDL generated code.\ntype ServiceRegistrar interface {\n\t// RegisterService registers a service and its implementation to the\n\t// concrete type implementing this interface.  It may not be called\n\t// once the server has started serving.\n\t// desc describes the service and its methods and handlers. impl is the\n\t// service implementation which is passed to the method handlers.\n\tRegisterService(desc *ServiceDesc, impl any)\n}\n\n// RegisterService registers a service and its implementation to the gRPC\n// server. It is called from the IDL generated code. This must be called before\n// invoking Serve. If ss is non-nil (for legacy code), its type is checked to\n// ensure it implements sd.HandlerType.\nfunc (s *Server) RegisterService(sd *ServiceDesc, ss any) {\n\tif ss != nil {\n\t\tht := reflect.TypeOf(sd.HandlerType).Elem()\n\t\tst := reflect.TypeOf(ss)\n\t\tif !st.Implements(ht) {\n\t\t\tlogger.Fatalf(\"grpc: Server.RegisterService found the handler of type %v that does not satisfy %v\", st, ht)\n\t\t}\n\t}\n\ts.register(sd, ss)\n}\n\nfunc (s *Server) register(sd *ServiceDesc, ss any) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\ts.printf(\"RegisterService(%q)\", sd.ServiceName)\n\tif s.serve {\n\t\tlogger.Fatalf(\"grpc: Server.RegisterService after Server.Serve for %q\", sd.ServiceName)\n\t}\n\tif _, ok := s.services[sd.ServiceName]; ok {\n\t\tlogger.Fatalf(\"grpc: Server.RegisterService found duplicate service registration for %q\", sd.ServiceName)\n\t}\n\tinfo := &serviceInfo{\n\t\tserviceImpl: ss,\n\t\tmethods:     make(map[string]*MethodDesc),\n\t\tstreams:     make(map[string]*StreamDesc),\n\t\tmdata:       sd.Metadata,\n\t}\n\tfor i := range sd.Methods {\n\t\td := &sd.Methods[i]\n\t\tinfo.methods[d.MethodName] = d\n\t}\n\tfor i := range sd.Streams {\n\t\td := &sd.Streams[i]\n\t\tinfo.streams[d.StreamName] = d\n\t}\n\ts.services[sd.ServiceName] = info\n}\n\n// MethodInfo contains the information of an RPC including its method name and type.\ntype MethodInfo struct {\n\t// Name is the method name only, without the service name or package name.\n\tName string\n\t// IsClientStream indicates whether the RPC is a client streaming RPC.\n\tIsClientStream bool\n\t// IsServerStream indicates whether the RPC is a server streaming RPC.\n\tIsServerStream bool\n}\n\n// ServiceInfo contains unary RPC method info, streaming RPC method info and metadata for a service.\ntype ServiceInfo struct {\n\tMethods []MethodInfo\n\t// Metadata is the metadata specified in ServiceDesc when registering service.\n\tMetadata any\n}\n\n// GetServiceInfo returns a map from service names to ServiceInfo.\n// Service names include the package names, in the form of <package>.<service>.\nfunc (s *Server) GetServiceInfo() map[string]ServiceInfo {\n\tret := make(map[string]ServiceInfo)\n\tfor n, srv := range s.services {\n\t\tmethods := make([]MethodInfo, 0, len(srv.methods)+len(srv.streams))\n\t\tfor m := range srv.methods {\n\t\t\tmethods = append(methods, MethodInfo{\n\t\t\t\tName:           m,\n\t\t\t\tIsClientStream: false,\n\t\t\t\tIsServerStream: false,\n\t\t\t})\n\t\t}\n\t\tfor m, d := range srv.streams {\n\t\t\tmethods = append(methods, MethodInfo{\n\t\t\t\tName:           m,\n\t\t\t\tIsClientStream: d.ClientStreams,\n\t\t\t\tIsServerStream: d.ServerStreams,\n\t\t\t})\n\t\t}\n\n\t\tret[n] = ServiceInfo{\n\t\t\tMethods:  methods,\n\t\t\tMetadata: srv.mdata,\n\t\t}\n\t}\n\treturn ret\n}\n\n// ErrServerStopped indicates that the operation is now illegal because of\n// the server being stopped.\nvar ErrServerStopped = errors.New(\"grpc: the server has been stopped\")\n\ntype listenSocket struct {\n\tnet.Listener\n\tchannelz *channelz.Socket\n}\n\nfunc (l *listenSocket) Close() error {\n\terr := l.Listener.Close()\n\tchannelz.RemoveEntry(l.channelz.ID)\n\tchannelz.Info(logger, l.channelz, \"ListenSocket deleted\")\n\treturn err\n}\n\n// Serve accepts incoming connections on the listener lis, creating a new\n// ServerTransport and service goroutine for each. The service goroutines\n// read gRPC requests and then call the registered handlers to reply to them.\n// Serve returns when lis.Accept fails with fatal errors.  lis will be closed when\n// this method returns.\n// Serve will return a non-nil error unless Stop or GracefulStop is called.\n//\n// Note: All supported releases of Go (as of December 2023) override the OS\n// defaults for TCP keepalive time and interval to 15s. To enable TCP keepalive\n// with OS defaults for keepalive time and interval, callers need to do the\n// following two things:\n//   - pass a net.Listener created by calling the Listen method on a\n//     net.ListenConfig with the `KeepAlive` field set to a negative value. This\n//     will result in the Go standard library not overriding OS defaults for TCP\n//     keepalive interval and time. But this will also result in the Go standard\n//     library not enabling TCP keepalives by default.\n//   - override the Accept method on the passed in net.Listener and set the\n//     SO_KEEPALIVE socket option to enable TCP keepalives, with OS defaults.\nfunc (s *Server) Serve(lis net.Listener) error {\n\ts.mu.Lock()\n\ts.printf(\"serving\")\n\ts.serve = true\n\tif s.lis == nil {\n\t\t// Serve called after Stop or GracefulStop.\n\t\ts.mu.Unlock()\n\t\tlis.Close()\n\t\treturn ErrServerStopped\n\t}\n\n\ts.serveWG.Add(1)\n\tdefer func() {\n\t\ts.serveWG.Done()\n\t\tif s.quit.HasFired() {\n\t\t\t// Stop or GracefulStop called; block until done and return nil.\n\t\t\t<-s.done.Done()\n\t\t}\n\t}()\n\n\tls := &listenSocket{\n\t\tListener: lis,\n\t\tchannelz: channelz.RegisterSocket(&channelz.Socket{\n\t\t\tSocketType:    channelz.SocketTypeListen,\n\t\t\tParent:        s.channelz,\n\t\t\tRefName:       lis.Addr().String(),\n\t\t\tLocalAddr:     lis.Addr(),\n\t\t\tSocketOptions: channelz.GetSocketOption(lis)},\n\t\t),\n\t}\n\ts.lis[ls] = true\n\n\tdefer func() {\n\t\ts.mu.Lock()\n\t\tif s.lis != nil && s.lis[ls] {\n\t\t\tls.Close()\n\t\t\tdelete(s.lis, ls)\n\t\t}\n\t\ts.mu.Unlock()\n\t}()\n\n\ts.mu.Unlock()\n\tchannelz.Info(logger, ls.channelz, \"ListenSocket created\")\n\n\tvar tempDelay time.Duration // how long to sleep on accept failure\n\tfor {\n\t\trawConn, err := lis.Accept()\n\t\tif err != nil {\n\t\t\tif ne, ok := err.(interface {\n\t\t\t\tTemporary() bool\n\t\t\t}); ok && ne.Temporary() {\n\t\t\t\tif tempDelay == 0 {\n\t\t\t\t\ttempDelay = 5 * time.Millisecond\n\t\t\t\t} else {\n\t\t\t\t\ttempDelay *= 2\n\t\t\t\t}\n\t\t\t\tif max := 1 * time.Second; tempDelay > max {\n\t\t\t\t\ttempDelay = max\n\t\t\t\t}\n\t\t\t\ts.mu.Lock()\n\t\t\t\ts.printf(\"Accept error: %v; retrying in %v\", err, tempDelay)\n\t\t\t\ts.mu.Unlock()\n\t\t\t\ttimer := time.NewTimer(tempDelay)\n\t\t\t\tselect {\n\t\t\t\tcase <-timer.C:\n\t\t\t\tcase <-s.quit.Done():\n\t\t\t\t\ttimer.Stop()\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ts.mu.Lock()\n\t\t\ts.printf(\"done serving; Accept = %v\", err)\n\t\t\ts.mu.Unlock()\n\n\t\t\tif s.quit.HasFired() {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\ttempDelay = 0\n\t\t// Start a new goroutine to deal with rawConn so we don't stall this Accept\n\t\t// loop goroutine.\n\t\t//\n\t\t// Make sure we account for the goroutine so GracefulStop doesn't nil out\n\t\t// s.conns before this conn can be added.\n\t\ts.serveWG.Add(1)\n\t\tgo func() {\n\t\t\ts.handleRawConn(lis.Addr().String(), rawConn)\n\t\t\ts.serveWG.Done()\n\t\t}()\n\t}\n}\n\n// handleRawConn forks a goroutine to handle a just-accepted connection that\n// has not had any I/O performed on it yet.\nfunc (s *Server) handleRawConn(lisAddr string, rawConn net.Conn) {\n\tif s.quit.HasFired() {\n\t\trawConn.Close()\n\t\treturn\n\t}\n\trawConn.SetDeadline(time.Now().Add(s.opts.connectionTimeout))\n\n\t// Finish handshaking (HTTP2)\n\tst := s.newHTTP2Transport(rawConn)\n\trawConn.SetDeadline(time.Time{})\n\tif st == nil {\n\t\treturn\n\t}\n\n\tif cc, ok := rawConn.(interface {\n\t\tPassServerTransport(transport.ServerTransport)\n\t}); ok {\n\t\tcc.PassServerTransport(st)\n\t}\n\n\tif !s.addConn(lisAddr, st) {\n\t\treturn\n\t}\n\tgo func() {\n\t\ts.serveStreams(context.Background(), st, rawConn)\n\t\ts.removeConn(lisAddr, st)\n\t}()\n}\n\n// newHTTP2Transport sets up a http/2 transport (using the\n// gRPC http2 server transport in transport/http2_server.go).\nfunc (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport {\n\tconfig := &transport.ServerConfig{\n\t\tMaxStreams:            s.opts.maxConcurrentStreams,\n\t\tConnectionTimeout:     s.opts.connectionTimeout,\n\t\tCredentials:           s.opts.creds,\n\t\tInTapHandle:           s.opts.inTapHandle,\n\t\tStatsHandler:          s.statsHandler,\n\t\tKeepaliveParams:       s.opts.keepaliveParams,\n\t\tKeepalivePolicy:       s.opts.keepalivePolicy,\n\t\tInitialWindowSize:     s.opts.initialWindowSize,\n\t\tInitialConnWindowSize: s.opts.initialConnWindowSize,\n\t\tWriteBufferSize:       s.opts.writeBufferSize,\n\t\tReadBufferSize:        s.opts.readBufferSize,\n\t\tSharedWriteBuffer:     s.opts.sharedWriteBuffer,\n\t\tChannelzParent:        s.channelz,\n\t\tMaxHeaderListSize:     s.opts.maxHeaderListSize,\n\t\tHeaderTableSize:       s.opts.headerTableSize,\n\t\tBufferPool:            s.opts.bufferPool,\n\t\tStaticWindowSize:      s.opts.staticWindowSize,\n\t}\n\tst, err := transport.NewServerTransport(c, config)\n\tif err != nil {\n\t\ts.mu.Lock()\n\t\ts.errorf(\"NewServerTransport(%q) failed: %v\", c.RemoteAddr(), err)\n\t\ts.mu.Unlock()\n\t\t// ErrConnDispatched means that the connection was dispatched away from\n\t\t// gRPC; those connections should be left open.\n\t\tif err != credentials.ErrConnDispatched {\n\t\t\t// Don't log on ErrConnDispatched and io.EOF to prevent log spam.\n\t\t\tif err != io.EOF {\n\t\t\t\tchannelz.Info(logger, s.channelz, \"grpc: Server.Serve failed to create ServerTransport: \", err)\n\t\t\t}\n\t\t\tc.Close()\n\t\t}\n\t\treturn nil\n\t}\n\n\treturn st\n}\n\nfunc (s *Server) serveStreams(ctx context.Context, st transport.ServerTransport, rawConn net.Conn) {\n\tctx = transport.SetConnection(ctx, rawConn)\n\tctx = peer.NewContext(ctx, st.Peer())\n\tif s.statsHandler != nil {\n\t\tctx = s.statsHandler.TagConn(ctx, &stats.ConnTagInfo{\n\t\t\tRemoteAddr: st.Peer().Addr,\n\t\t\tLocalAddr:  st.Peer().LocalAddr,\n\t\t})\n\t\ts.statsHandler.HandleConn(ctx, &stats.ConnBegin{})\n\t}\n\n\tdefer func() {\n\t\tst.Close(errors.New(\"finished serving streams for the server transport\"))\n\t\tif s.statsHandler != nil {\n\t\t\ts.statsHandler.HandleConn(ctx, &stats.ConnEnd{})\n\t\t}\n\t}()\n\n\tstreamQuota := newHandlerQuota(s.opts.maxConcurrentStreams)\n\tst.HandleStreams(ctx, func(stream *transport.ServerStream) {\n\t\ts.handlersWG.Add(1)\n\t\tstreamQuota.acquire()\n\t\tf := func() {\n\t\t\tdefer streamQuota.release()\n\t\t\tdefer s.handlersWG.Done()\n\t\t\ts.handleStream(st, stream)\n\t\t}\n\n\t\tif s.opts.numServerWorkers > 0 {\n\t\t\tselect {\n\t\t\tcase s.serverWorkerChannel <- f:\n\t\t\t\treturn\n\t\t\tdefault:\n\t\t\t\t// If all stream workers are busy, fallback to the default code path.\n\t\t\t}\n\t\t}\n\t\tgo f()\n\t})\n}\n\nvar _ http.Handler = (*Server)(nil)\n\n// ServeHTTP implements the Go standard library's http.Handler\n// interface by responding to the gRPC request r, by looking up\n// the requested gRPC method in the gRPC server s.\n//\n// The provided HTTP request must have arrived on an HTTP/2\n// connection. When using the Go standard library's server,\n// practically this means that the Request must also have arrived\n// over TLS.\n//\n// To share one port (such as 443 for https) between gRPC and an\n// existing http.Handler, use a root http.Handler such as:\n//\n//\tif r.ProtoMajor == 2 && strings.HasPrefix(\n//\t\tr.Header.Get(\"Content-Type\"), \"application/grpc\") {\n//\t\tgrpcServer.ServeHTTP(w, r)\n//\t} else {\n//\t\tyourMux.ServeHTTP(w, r)\n//\t}\n//\n// Note that ServeHTTP uses Go's HTTP/2 server implementation which is totally\n// separate from grpc-go's HTTP/2 server. Performance and features may vary\n// between the two paths. ServeHTTP does not support some gRPC features\n// available through grpc-go's HTTP/2 server.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tst, err := transport.NewServerHandlerTransport(w, r, s.statsHandler, s.opts.bufferPool)\n\tif err != nil {\n\t\t// Errors returned from transport.NewServerHandlerTransport have\n\t\t// already been written to w.\n\t\treturn\n\t}\n\tif !s.addConn(listenerAddressForServeHTTP, st) {\n\t\treturn\n\t}\n\tdefer s.removeConn(listenerAddressForServeHTTP, st)\n\ts.serveStreams(r.Context(), st, nil)\n}\n\nfunc (s *Server) addConn(addr string, st transport.ServerTransport) bool {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\tif s.conns == nil {\n\t\tst.Close(errors.New(\"Server.addConn called when server has already been stopped\"))\n\t\treturn false\n\t}\n\tif s.drain {\n\t\t// Transport added after we drained our existing conns: drain it\n\t\t// immediately.\n\t\tst.Drain(\"\")\n\t}\n\n\tif s.conns[addr] == nil {\n\t\t// Create a map entry if this is the first connection on this listener.\n\t\ts.conns[addr] = make(map[transport.ServerTransport]bool)\n\t}\n\ts.conns[addr][st] = true\n\treturn true\n}\n\nfunc (s *Server) removeConn(addr string, st transport.ServerTransport) {\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tconns := s.conns[addr]\n\tif conns != nil {\n\t\tdelete(conns, st)\n\t\tif len(conns) == 0 {\n\t\t\t// If the last connection for this address is being removed, also\n\t\t\t// remove the map entry corresponding to the address. This is used\n\t\t\t// in GracefulStop() when waiting for all connections to be closed.\n\t\t\tdelete(s.conns, addr)\n\t\t}\n\t\ts.cv.Broadcast()\n\t}\n}\n\nfunc (s *Server) incrCallsStarted() {\n\ts.channelz.ServerMetrics.CallsStarted.Add(1)\n\ts.channelz.ServerMetrics.LastCallStartedTimestamp.Store(time.Now().UnixNano())\n}\n\nfunc (s *Server) incrCallsSucceeded() {\n\ts.channelz.ServerMetrics.CallsSucceeded.Add(1)\n}\n\nfunc (s *Server) incrCallsFailed() {\n\ts.channelz.ServerMetrics.CallsFailed.Add(1)\n}\n\nfunc (s *Server) sendResponse(ctx context.Context, stream *transport.ServerStream, msg any, cp Compressor, opts *transport.WriteOptions, comp encoding.Compressor) error {\n\tdata, err := encode(s.getCodec(stream.ContentSubtype()), msg)\n\tif err != nil {\n\t\tchannelz.Error(logger, s.channelz, \"grpc: server failed to encode response: \", err)\n\t\treturn err\n\t}\n\n\tcompData, pf, err := compress(data, cp, comp, s.opts.bufferPool)\n\tif err != nil {\n\t\tdata.Free()\n\t\tchannelz.Error(logger, s.channelz, \"grpc: server failed to compress response: \", err)\n\t\treturn err\n\t}\n\n\thdr, payload := msgHeader(data, compData, pf)\n\n\tdefer func() {\n\t\tcompData.Free()\n\t\tdata.Free()\n\t\t// payload does not need to be freed here, it is either data or compData, both of\n\t\t// which are already freed.\n\t}()\n\n\tdataLen := data.Len()\n\tpayloadLen := payload.Len()\n\t// TODO(dfawley): should we be checking len(data) instead?\n\tif payloadLen > s.opts.maxSendMessageSize {\n\t\treturn status.Errorf(codes.ResourceExhausted, \"grpc: trying to send message larger than max (%d vs. %d)\", payloadLen, s.opts.maxSendMessageSize)\n\t}\n\terr = stream.Write(hdr, payload, opts)\n\tif err == nil && s.statsHandler != nil {\n\t\ts.statsHandler.HandleRPC(ctx, outPayload(false, msg, dataLen, payloadLen, time.Now()))\n\t}\n\treturn err\n}\n\n// chainUnaryServerInterceptors chains all unary server interceptors into one.\nfunc chainUnaryServerInterceptors(s *Server) {\n\t// Prepend opts.unaryInt to the chaining interceptors if it exists, since unaryInt will\n\t// be executed before any other chained interceptors.\n\tinterceptors := s.opts.chainUnaryInts\n\tif s.opts.unaryInt != nil {\n\t\tinterceptors = append([]UnaryServerInterceptor{s.opts.unaryInt}, s.opts.chainUnaryInts...)\n\t}\n\n\tvar chainedInt UnaryServerInterceptor\n\tif len(interceptors) == 0 {\n\t\tchainedInt = nil\n\t} else if len(interceptors) == 1 {\n\t\tchainedInt = interceptors[0]\n\t} else {\n\t\tchainedInt = chainUnaryInterceptors(interceptors)\n\t}\n\n\ts.opts.unaryInt = chainedInt\n}\n\nfunc chainUnaryInterceptors(interceptors []UnaryServerInterceptor) UnaryServerInterceptor {\n\treturn func(ctx context.Context, req any, info *UnaryServerInfo, handler UnaryHandler) (any, error) {\n\t\treturn interceptors[0](ctx, req, info, getChainUnaryHandler(interceptors, 0, info, handler))\n\t}\n}\n\nfunc getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info *UnaryServerInfo, finalHandler UnaryHandler) UnaryHandler {\n\tif curr == len(interceptors)-1 {\n\t\treturn finalHandler\n\t}\n\treturn func(ctx context.Context, req any) (any, error) {\n\t\treturn interceptors[curr+1](ctx, req, info, getChainUnaryHandler(interceptors, curr+1, info, finalHandler))\n\t}\n}\n\nfunc (s *Server) processUnaryRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) {\n\tsh := s.statsHandler\n\tif sh != nil || trInfo != nil || channelz.IsOn() {\n\t\tif channelz.IsOn() {\n\t\t\ts.incrCallsStarted()\n\t\t}\n\t\tvar statsBegin *stats.Begin\n\t\tif sh != nil {\n\t\t\tstatsBegin = &stats.Begin{\n\t\t\t\tBeginTime:      time.Now(),\n\t\t\t\tIsClientStream: false,\n\t\t\t\tIsServerStream: false,\n\t\t\t}\n\t\t\tsh.HandleRPC(ctx, statsBegin)\n\t\t}\n\t\tif trInfo != nil {\n\t\t\ttrInfo.tr.LazyLog(&trInfo.firstLine, false)\n\t\t}\n\t\t// The deferred error handling for tracing, stats handler and channelz are\n\t\t// combined into one function to reduce stack usage -- a defer takes ~56-64\n\t\t// bytes on the stack, so overflowing the stack will require a stack\n\t\t// re-allocation, which is expensive.\n\t\t//\n\t\t// To maintain behavior similar to separate deferred statements, statements\n\t\t// should be executed in the reverse order. That is, tracing first, stats\n\t\t// handler second, and channelz last. Note that panics *within* defers will\n\t\t// lead to different behavior, but that's an acceptable compromise; that\n\t\t// would be undefined behavior territory anyway.\n\t\tdefer func() {\n\t\t\tif trInfo != nil {\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\ttrInfo.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\t\t\ttrInfo.tr.SetError()\n\t\t\t\t}\n\t\t\t\ttrInfo.tr.Finish()\n\t\t\t}\n\n\t\t\tif sh != nil {\n\t\t\t\tend := &stats.End{\n\t\t\t\t\tBeginTime: statsBegin.BeginTime,\n\t\t\t\t\tEndTime:   time.Now(),\n\t\t\t\t}\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\tend.Error = toRPCErr(err)\n\t\t\t\t}\n\t\t\t\tsh.HandleRPC(ctx, end)\n\t\t\t}\n\n\t\t\tif channelz.IsOn() {\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\ts.incrCallsFailed()\n\t\t\t\t} else {\n\t\t\t\t\ts.incrCallsSucceeded()\n\t\t\t\t}\n\t\t\t}\n\t\t}()\n\t}\n\tvar binlogs []binarylog.MethodLogger\n\tif ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {\n\t\tbinlogs = append(binlogs, ml)\n\t}\n\tif s.opts.binaryLogger != nil {\n\t\tif ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {\n\t\t\tbinlogs = append(binlogs, ml)\n\t\t}\n\t}\n\tif len(binlogs) != 0 {\n\t\tmd, _ := metadata.FromIncomingContext(ctx)\n\t\tlogEntry := &binarylog.ClientHeader{\n\t\t\tHeader:     md,\n\t\t\tMethodName: stream.Method(),\n\t\t\tPeerAddr:   nil,\n\t\t}\n\t\tif deadline, ok := ctx.Deadline(); ok {\n\t\t\tlogEntry.Timeout = time.Until(deadline)\n\t\t\tif logEntry.Timeout < 0 {\n\t\t\t\tlogEntry.Timeout = 0\n\t\t\t}\n\t\t}\n\t\tif a := md[\":authority\"]; len(a) > 0 {\n\t\t\tlogEntry.Authority = a[0]\n\t\t}\n\t\tif peer, ok := peer.FromContext(ctx); ok {\n\t\t\tlogEntry.PeerAddr = peer.Addr\n\t\t}\n\t\tfor _, binlog := range binlogs {\n\t\t\tbinlog.Log(ctx, logEntry)\n\t\t}\n\t}\n\n\t// comp and cp are used for compression.  decomp and dc are used for\n\t// decompression.  If comp and decomp are both set, they are the same;\n\t// however they are kept separate to ensure that at most one of the\n\t// compressor/decompressor variable pairs are set for use later.\n\tvar comp, decomp encoding.Compressor\n\tvar cp Compressor\n\tvar dc Decompressor\n\tvar sendCompressorName string\n\n\t// If dc is set and matches the stream's compression, use it.  Otherwise, try\n\t// to find a matching registered compressor for decomp.\n\tif rc := stream.RecvCompress(); s.opts.dc != nil && s.opts.dc.Type() == rc {\n\t\tdc = s.opts.dc\n\t} else if rc != \"\" && rc != encoding.Identity {\n\t\tdecomp = encoding.GetCompressor(rc)\n\t\tif decomp == nil {\n\t\t\tst := status.Newf(codes.Unimplemented, \"grpc: Decompressor is not installed for grpc-encoding %q\", rc)\n\t\t\tstream.WriteStatus(st)\n\t\t\treturn st.Err()\n\t\t}\n\t}\n\n\t// If cp is set, use it.  Otherwise, attempt to compress the response using\n\t// the incoming message compression method.\n\t//\n\t// NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.\n\tif s.opts.cp != nil {\n\t\tcp = s.opts.cp\n\t\tsendCompressorName = cp.Type()\n\t} else if rc := stream.RecvCompress(); rc != \"\" && rc != encoding.Identity {\n\t\t// Legacy compressor not specified; attempt to respond with same encoding.\n\t\tcomp = encoding.GetCompressor(rc)\n\t\tif comp != nil {\n\t\t\tsendCompressorName = comp.Name()\n\t\t}\n\t}\n\n\tif sendCompressorName != \"\" {\n\t\tif err := stream.SetSendCompress(sendCompressorName); err != nil {\n\t\t\treturn status.Errorf(codes.Internal, \"grpc: failed to set send compressor: %v\", err)\n\t\t}\n\t}\n\n\tvar payInfo *payloadInfo\n\tif sh != nil || len(binlogs) != 0 {\n\t\tpayInfo = &payloadInfo{}\n\t\tdefer payInfo.free()\n\t}\n\n\td, err := recvAndDecompress(&parser{r: stream, bufferPool: s.opts.bufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp, true)\n\tif err != nil {\n\t\tif e := stream.WriteStatus(status.Convert(err)); e != nil {\n\t\t\tchannelz.Warningf(logger, s.channelz, \"grpc: Server.processUnaryRPC failed to write status: %v\", e)\n\t\t}\n\t\treturn err\n\t}\n\tfreed := false\n\tdataFree := func() {\n\t\tif !freed {\n\t\t\td.Free()\n\t\t\tfreed = true\n\t\t}\n\t}\n\tdefer dataFree()\n\tdf := func(v any) error {\n\t\tdefer dataFree()\n\t\tif err := s.getCodec(stream.ContentSubtype()).Unmarshal(d, v); err != nil {\n\t\t\treturn status.Errorf(codes.Internal, \"grpc: error unmarshalling request: %v\", err)\n\t\t}\n\n\t\tif sh != nil {\n\t\t\tsh.HandleRPC(ctx, &stats.InPayload{\n\t\t\t\tRecvTime:         time.Now(),\n\t\t\t\tPayload:          v,\n\t\t\t\tLength:           d.Len(),\n\t\t\t\tWireLength:       payInfo.compressedLength + headerLen,\n\t\t\t\tCompressedLength: payInfo.compressedLength,\n\t\t\t})\n\t\t}\n\t\tif len(binlogs) != 0 {\n\t\t\tcm := &binarylog.ClientMessage{\n\t\t\t\tMessage: d.Materialize(),\n\t\t\t}\n\t\t\tfor _, binlog := range binlogs {\n\t\t\t\tbinlog.Log(ctx, cm)\n\t\t\t}\n\t\t}\n\t\tif trInfo != nil {\n\t\t\ttrInfo.tr.LazyLog(&payload{sent: false, msg: v}, true)\n\t\t}\n\t\treturn nil\n\t}\n\tctx = NewContextWithServerTransportStream(ctx, stream)\n\treply, appErr := md.Handler(info.serviceImpl, ctx, df, s.opts.unaryInt)\n\tif appErr != nil {\n\t\tappStatus, ok := status.FromError(appErr)\n\t\tif !ok {\n\t\t\t// Convert non-status application error to a status error with code\n\t\t\t// Unknown, but handle context errors specifically.\n\t\t\tappStatus = status.FromContextError(appErr)\n\t\t\tappErr = appStatus.Err()\n\t\t}\n\t\tif trInfo != nil {\n\t\t\ttrInfo.tr.LazyLog(stringer(appStatus.Message()), true)\n\t\t\ttrInfo.tr.SetError()\n\t\t}\n\t\tif e := stream.WriteStatus(appStatus); e != nil {\n\t\t\tchannelz.Warningf(logger, s.channelz, \"grpc: Server.processUnaryRPC failed to write status: %v\", e)\n\t\t}\n\t\tif len(binlogs) != 0 {\n\t\t\tif h, _ := stream.Header(); h.Len() > 0 {\n\t\t\t\t// Only log serverHeader if there was header. Otherwise it can\n\t\t\t\t// be trailer only.\n\t\t\t\tsh := &binarylog.ServerHeader{\n\t\t\t\t\tHeader: h,\n\t\t\t\t}\n\t\t\t\tfor _, binlog := range binlogs {\n\t\t\t\t\tbinlog.Log(ctx, sh)\n\t\t\t\t}\n\t\t\t}\n\t\t\tst := &binarylog.ServerTrailer{\n\t\t\t\tTrailer: stream.Trailer(),\n\t\t\t\tErr:     appErr,\n\t\t\t}\n\t\t\tfor _, binlog := range binlogs {\n\t\t\t\tbinlog.Log(ctx, st)\n\t\t\t}\n\t\t}\n\t\treturn appErr\n\t}\n\tif trInfo != nil {\n\t\ttrInfo.tr.LazyLog(stringer(\"OK\"), false)\n\t}\n\topts := &transport.WriteOptions{Last: true}\n\n\t// Server handler could have set new compressor by calling SetSendCompressor.\n\t// In case it is set, we need to use it for compressing outbound message.\n\tif stream.SendCompress() != sendCompressorName {\n\t\tcomp = encoding.GetCompressor(stream.SendCompress())\n\t}\n\tif err := s.sendResponse(ctx, stream, reply, cp, opts, comp); err != nil {\n\t\tif err == io.EOF {\n\t\t\t// The entire stream is done (for unary RPC only).\n\t\t\treturn err\n\t\t}\n\t\tif sts, ok := status.FromError(err); ok {\n\t\t\tif e := stream.WriteStatus(sts); e != nil {\n\t\t\t\tchannelz.Warningf(logger, s.channelz, \"grpc: Server.processUnaryRPC failed to write status: %v\", e)\n\t\t\t}\n\t\t} else {\n\t\t\tswitch st := err.(type) {\n\t\t\tcase transport.ConnectionError:\n\t\t\t\t// Nothing to do here.\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"grpc: Unexpected error (%T) from sendResponse: %v\", st, st))\n\t\t\t}\n\t\t}\n\t\tif len(binlogs) != 0 {\n\t\t\th, _ := stream.Header()\n\t\t\tsh := &binarylog.ServerHeader{\n\t\t\t\tHeader: h,\n\t\t\t}\n\t\t\tst := &binarylog.ServerTrailer{\n\t\t\t\tTrailer: stream.Trailer(),\n\t\t\t\tErr:     appErr,\n\t\t\t}\n\t\t\tfor _, binlog := range binlogs {\n\t\t\t\tbinlog.Log(ctx, sh)\n\t\t\t\tbinlog.Log(ctx, st)\n\t\t\t}\n\t\t}\n\t\treturn err\n\t}\n\tif len(binlogs) != 0 {\n\t\th, _ := stream.Header()\n\t\tsh := &binarylog.ServerHeader{\n\t\t\tHeader: h,\n\t\t}\n\t\tsm := &binarylog.ServerMessage{\n\t\t\tMessage: reply,\n\t\t}\n\t\tfor _, binlog := range binlogs {\n\t\t\tbinlog.Log(ctx, sh)\n\t\t\tbinlog.Log(ctx, sm)\n\t\t}\n\t}\n\tif trInfo != nil {\n\t\ttrInfo.tr.LazyLog(&payload{sent: true, msg: reply}, true)\n\t}\n\t// TODO: Should we be logging if writing status failed here, like above?\n\t// Should the logging be in WriteStatus?  Should we ignore the WriteStatus\n\t// error or allow the stats handler to see it?\n\tif len(binlogs) != 0 {\n\t\tst := &binarylog.ServerTrailer{\n\t\t\tTrailer: stream.Trailer(),\n\t\t\tErr:     appErr,\n\t\t}\n\t\tfor _, binlog := range binlogs {\n\t\t\tbinlog.Log(ctx, st)\n\t\t}\n\t}\n\treturn stream.WriteStatus(statusOK)\n}\n\n// chainStreamServerInterceptors chains all stream server interceptors into one.\nfunc chainStreamServerInterceptors(s *Server) {\n\t// Prepend opts.streamInt to the chaining interceptors if it exists, since streamInt will\n\t// be executed before any other chained interceptors.\n\tinterceptors := s.opts.chainStreamInts\n\tif s.opts.streamInt != nil {\n\t\tinterceptors = append([]StreamServerInterceptor{s.opts.streamInt}, s.opts.chainStreamInts...)\n\t}\n\n\tvar chainedInt StreamServerInterceptor\n\tif len(interceptors) == 0 {\n\t\tchainedInt = nil\n\t} else if len(interceptors) == 1 {\n\t\tchainedInt = interceptors[0]\n\t} else {\n\t\tchainedInt = chainStreamInterceptors(interceptors)\n\t}\n\n\ts.opts.streamInt = chainedInt\n}\n\nfunc chainStreamInterceptors(interceptors []StreamServerInterceptor) StreamServerInterceptor {\n\treturn func(srv any, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error {\n\t\treturn interceptors[0](srv, ss, info, getChainStreamHandler(interceptors, 0, info, handler))\n\t}\n}\n\nfunc getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, info *StreamServerInfo, finalHandler StreamHandler) StreamHandler {\n\tif curr == len(interceptors)-1 {\n\t\treturn finalHandler\n\t}\n\treturn func(srv any, stream ServerStream) error {\n\t\treturn interceptors[curr+1](srv, stream, info, getChainStreamHandler(interceptors, curr+1, info, finalHandler))\n\t}\n}\n\nfunc (s *Server) processStreamingRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {\n\tif channelz.IsOn() {\n\t\ts.incrCallsStarted()\n\t}\n\tsh := s.statsHandler\n\tvar statsBegin *stats.Begin\n\tif sh != nil {\n\t\tstatsBegin = &stats.Begin{\n\t\t\tBeginTime:      time.Now(),\n\t\t\tIsClientStream: sd.ClientStreams,\n\t\t\tIsServerStream: sd.ServerStreams,\n\t\t}\n\t\tsh.HandleRPC(ctx, statsBegin)\n\t}\n\tctx = NewContextWithServerTransportStream(ctx, stream)\n\tss := &serverStream{\n\t\tctx:                   ctx,\n\t\ts:                     stream,\n\t\tp:                     parser{r: stream, bufferPool: s.opts.bufferPool},\n\t\tcodec:                 s.getCodec(stream.ContentSubtype()),\n\t\tdesc:                  sd,\n\t\tmaxReceiveMessageSize: s.opts.maxReceiveMessageSize,\n\t\tmaxSendMessageSize:    s.opts.maxSendMessageSize,\n\t\ttrInfo:                trInfo,\n\t\tstatsHandler:          sh,\n\t}\n\n\tif sh != nil || trInfo != nil || channelz.IsOn() {\n\t\t// See comment in processUnaryRPC on defers.\n\t\tdefer func() {\n\t\t\tif trInfo != nil {\n\t\t\t\tss.mu.Lock()\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\tss.trInfo.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\t\t\tss.trInfo.tr.SetError()\n\t\t\t\t}\n\t\t\t\tss.trInfo.tr.Finish()\n\t\t\t\tss.trInfo.tr = nil\n\t\t\t\tss.mu.Unlock()\n\t\t\t}\n\n\t\t\tif sh != nil {\n\t\t\t\tend := &stats.End{\n\t\t\t\t\tBeginTime: statsBegin.BeginTime,\n\t\t\t\t\tEndTime:   time.Now(),\n\t\t\t\t}\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\tend.Error = toRPCErr(err)\n\t\t\t\t}\n\t\t\t\tsh.HandleRPC(ctx, end)\n\t\t\t}\n\n\t\t\tif channelz.IsOn() {\n\t\t\t\tif err != nil && err != io.EOF {\n\t\t\t\t\ts.incrCallsFailed()\n\t\t\t\t} else {\n\t\t\t\t\ts.incrCallsSucceeded()\n\t\t\t\t}\n\t\t\t}\n\t\t}()\n\t}\n\n\tif ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {\n\t\tss.binlogs = append(ss.binlogs, ml)\n\t}\n\tif s.opts.binaryLogger != nil {\n\t\tif ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {\n\t\t\tss.binlogs = append(ss.binlogs, ml)\n\t\t}\n\t}\n\tif len(ss.binlogs) != 0 {\n\t\tmd, _ := metadata.FromIncomingContext(ctx)\n\t\tlogEntry := &binarylog.ClientHeader{\n\t\t\tHeader:     md,\n\t\t\tMethodName: stream.Method(),\n\t\t\tPeerAddr:   nil,\n\t\t}\n\t\tif deadline, ok := ctx.Deadline(); ok {\n\t\t\tlogEntry.Timeout = time.Until(deadline)\n\t\t\tif logEntry.Timeout < 0 {\n\t\t\t\tlogEntry.Timeout = 0\n\t\t\t}\n\t\t}\n\t\tif a := md[\":authority\"]; len(a) > 0 {\n\t\t\tlogEntry.Authority = a[0]\n\t\t}\n\t\tif peer, ok := peer.FromContext(ss.Context()); ok {\n\t\t\tlogEntry.PeerAddr = peer.Addr\n\t\t}\n\t\tfor _, binlog := range ss.binlogs {\n\t\t\tbinlog.Log(ctx, logEntry)\n\t\t}\n\t}\n\n\t// If dc is set and matches the stream's compression, use it.  Otherwise, try\n\t// to find a matching registered compressor for decomp.\n\tif rc := stream.RecvCompress(); s.opts.dc != nil && s.opts.dc.Type() == rc {\n\t\tss.decompressorV0 = s.opts.dc\n\t} else if rc != \"\" && rc != encoding.Identity {\n\t\tss.decompressorV1 = encoding.GetCompressor(rc)\n\t\tif ss.decompressorV1 == nil {\n\t\t\tst := status.Newf(codes.Unimplemented, \"grpc: Decompressor is not installed for grpc-encoding %q\", rc)\n\t\t\tss.s.WriteStatus(st)\n\t\t\treturn st.Err()\n\t\t}\n\t}\n\n\t// If cp is set, use it.  Otherwise, attempt to compress the response using\n\t// the incoming message compression method.\n\t//\n\t// NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.\n\tif s.opts.cp != nil {\n\t\tss.compressorV0 = s.opts.cp\n\t\tss.sendCompressorName = s.opts.cp.Type()\n\t} else if rc := stream.RecvCompress(); rc != \"\" && rc != encoding.Identity {\n\t\t// Legacy compressor not specified; attempt to respond with same encoding.\n\t\tss.compressorV1 = encoding.GetCompressor(rc)\n\t\tif ss.compressorV1 != nil {\n\t\t\tss.sendCompressorName = rc\n\t\t}\n\t}\n\n\tif ss.sendCompressorName != \"\" {\n\t\tif err := stream.SetSendCompress(ss.sendCompressorName); err != nil {\n\t\t\treturn status.Errorf(codes.Internal, \"grpc: failed to set send compressor: %v\", err)\n\t\t}\n\t}\n\n\tss.ctx = newContextWithRPCInfo(ss.ctx, false, ss.codec, ss.compressorV0, ss.compressorV1)\n\n\tif trInfo != nil {\n\t\ttrInfo.tr.LazyLog(&trInfo.firstLine, false)\n\t}\n\tvar appErr error\n\tvar server any\n\tif info != nil {\n\t\tserver = info.serviceImpl\n\t}\n\tif s.opts.streamInt == nil {\n\t\tappErr = sd.Handler(server, ss)\n\t} else {\n\t\tinfo := &StreamServerInfo{\n\t\t\tFullMethod:     stream.Method(),\n\t\t\tIsClientStream: sd.ClientStreams,\n\t\t\tIsServerStream: sd.ServerStreams,\n\t\t}\n\t\tappErr = s.opts.streamInt(server, ss, info, sd.Handler)\n\t}\n\tif appErr != nil {\n\t\tappStatus, ok := status.FromError(appErr)\n\t\tif !ok {\n\t\t\t// Convert non-status application error to a status error with code\n\t\t\t// Unknown, but handle context errors specifically.\n\t\t\tappStatus = status.FromContextError(appErr)\n\t\t\tappErr = appStatus.Err()\n\t\t}\n\t\tif trInfo != nil {\n\t\t\tss.mu.Lock()\n\t\t\tss.trInfo.tr.LazyLog(stringer(appStatus.Message()), true)\n\t\t\tss.trInfo.tr.SetError()\n\t\t\tss.mu.Unlock()\n\t\t}\n\t\tif len(ss.binlogs) != 0 {\n\t\t\tst := &binarylog.ServerTrailer{\n\t\t\t\tTrailer: ss.s.Trailer(),\n\t\t\t\tErr:     appErr,\n\t\t\t}\n\t\t\tfor _, binlog := range ss.binlogs {\n\t\t\t\tbinlog.Log(ctx, st)\n\t\t\t}\n\t\t}\n\t\tss.s.WriteStatus(appStatus)\n\t\t// TODO: Should we log an error from WriteStatus here and below?\n\t\treturn appErr\n\t}\n\tif trInfo != nil {\n\t\tss.mu.Lock()\n\t\tss.trInfo.tr.LazyLog(stringer(\"OK\"), false)\n\t\tss.mu.Unlock()\n\t}\n\tif len(ss.binlogs) != 0 {\n\t\tst := &binarylog.ServerTrailer{\n\t\t\tTrailer: ss.s.Trailer(),\n\t\t\tErr:     appErr,\n\t\t}\n\t\tfor _, binlog := range ss.binlogs {\n\t\t\tbinlog.Log(ctx, st)\n\t\t}\n\t}\n\treturn ss.s.WriteStatus(statusOK)\n}\n\nfunc (s *Server) handleStream(t transport.ServerTransport, stream *transport.ServerStream) {\n\tctx := stream.Context()\n\tctx = contextWithServer(ctx, s)\n\tvar ti *traceInfo\n\tif EnableTracing {\n\t\ttr := newTrace(\"grpc.Recv.\"+methodFamily(stream.Method()), stream.Method())\n\t\tctx = newTraceContext(ctx, tr)\n\t\tti = &traceInfo{\n\t\t\ttr: tr,\n\t\t\tfirstLine: firstLine{\n\t\t\t\tclient:     false,\n\t\t\t\tremoteAddr: t.Peer().Addr,\n\t\t\t},\n\t\t}\n\t\tif dl, ok := ctx.Deadline(); ok {\n\t\t\tti.firstLine.deadline = time.Until(dl)\n\t\t}\n\t}\n\n\tsm := stream.Method()\n\tif sm != \"\" && sm[0] == '/' {\n\t\tsm = sm[1:]\n\t}\n\tpos := strings.LastIndex(sm, \"/\")\n\tif pos == -1 {\n\t\tif ti != nil {\n\t\t\tti.tr.LazyLog(&fmtStringer{\"Malformed method name %q\", []any{sm}}, true)\n\t\t\tti.tr.SetError()\n\t\t}\n\t\terrDesc := fmt.Sprintf(\"malformed method name: %q\", stream.Method())\n\t\tif err := stream.WriteStatus(status.New(codes.Unimplemented, errDesc)); err != nil {\n\t\t\tif ti != nil {\n\t\t\t\tti.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\t\tti.tr.SetError()\n\t\t\t}\n\t\t\tchannelz.Warningf(logger, s.channelz, \"grpc: Server.handleStream failed to write status: %v\", err)\n\t\t}\n\t\tif ti != nil {\n\t\t\tti.tr.Finish()\n\t\t}\n\t\treturn\n\t}\n\tservice := sm[:pos]\n\tmethod := sm[pos+1:]\n\n\t// FromIncomingContext is expensive: skip if there are no statsHandlers\n\tif s.statsHandler != nil {\n\t\tmd, _ := metadata.FromIncomingContext(ctx)\n\t\tctx = s.statsHandler.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: stream.Method()})\n\t\ts.statsHandler.HandleRPC(ctx, &stats.InHeader{\n\t\t\tFullMethod:  stream.Method(),\n\t\t\tRemoteAddr:  t.Peer().Addr,\n\t\t\tLocalAddr:   t.Peer().LocalAddr,\n\t\t\tCompression: stream.RecvCompress(),\n\t\t\tWireLength:  stream.HeaderWireLength(),\n\t\t\tHeader:      md,\n\t\t})\n\t}\n\t// To have calls in stream callouts work. Will delete once all stats handler\n\t// calls come from the gRPC layer.\n\tstream.SetContext(ctx)\n\n\tsrv, knownService := s.services[service]\n\tif knownService {\n\t\tif md, ok := srv.methods[method]; ok {\n\t\t\ts.processUnaryRPC(ctx, stream, srv, md, ti)\n\t\t\treturn\n\t\t}\n\t\tif sd, ok := srv.streams[method]; ok {\n\t\t\ts.processStreamingRPC(ctx, stream, srv, sd, ti)\n\t\t\treturn\n\t\t}\n\t}\n\t// Unknown service, or known server unknown method.\n\tif unknownDesc := s.opts.unknownStreamDesc; unknownDesc != nil {\n\t\ts.processStreamingRPC(ctx, stream, nil, unknownDesc, ti)\n\t\treturn\n\t}\n\tvar errDesc string\n\tif !knownService {\n\t\terrDesc = fmt.Sprintf(\"unknown service %v\", service)\n\t} else {\n\t\terrDesc = fmt.Sprintf(\"unknown method %v for service %v\", method, service)\n\t}\n\tif ti != nil {\n\t\tti.tr.LazyPrintf(\"%s\", errDesc)\n\t\tti.tr.SetError()\n\t}\n\tif err := stream.WriteStatus(status.New(codes.Unimplemented, errDesc)); err != nil {\n\t\tif ti != nil {\n\t\t\tti.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\tti.tr.SetError()\n\t\t}\n\t\tchannelz.Warningf(logger, s.channelz, \"grpc: Server.handleStream failed to write status: %v\", err)\n\t}\n\tif ti != nil {\n\t\tti.tr.Finish()\n\t}\n}\n\n// The key to save ServerTransportStream in the context.\ntype streamKey struct{}\n\n// NewContextWithServerTransportStream creates a new context from ctx and\n// attaches stream to it.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc NewContextWithServerTransportStream(ctx context.Context, stream ServerTransportStream) context.Context {\n\treturn context.WithValue(ctx, streamKey{}, stream)\n}\n\n// ServerTransportStream is a minimal interface that a transport stream must\n// implement. This can be used to mock an actual transport stream for tests of\n// handler code that use, for example, grpc.SetHeader (which requires some\n// stream to be in context).\n//\n// See also NewContextWithServerTransportStream.\n//\n// # Experimental\n//\n// Notice: This type is EXPERIMENTAL and may be changed or removed in a\n// later release.\ntype ServerTransportStream interface {\n\tMethod() string\n\tSetHeader(md metadata.MD) error\n\tSendHeader(md metadata.MD) error\n\tSetTrailer(md metadata.MD) error\n}\n\n// ServerTransportStreamFromContext returns the ServerTransportStream saved in\n// ctx. Returns nil if the given context has no stream associated with it\n// (which implies it is not an RPC invocation context).\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ServerTransportStreamFromContext(ctx context.Context) ServerTransportStream {\n\ts, _ := ctx.Value(streamKey{}).(ServerTransportStream)\n\treturn s\n}\n\n// Stop stops the gRPC server. It immediately closes all open\n// connections and listeners.\n// It cancels all active RPCs on the server side and the corresponding\n// pending RPCs on the client side will get notified by connection\n// errors.\nfunc (s *Server) Stop() {\n\ts.stop(false)\n}\n\n// GracefulStop stops the gRPC server gracefully. It stops the server from\n// accepting new connections and RPCs and blocks until all the pending RPCs are\n// finished.\nfunc (s *Server) GracefulStop() {\n\ts.stop(true)\n}\n\nfunc (s *Server) stop(graceful bool) {\n\ts.quit.Fire()\n\tdefer s.done.Fire()\n\n\ts.channelzRemoveOnce.Do(func() { channelz.RemoveEntry(s.channelz.ID) })\n\ts.mu.Lock()\n\ts.closeListenersLocked()\n\t// Wait for serving threads to be ready to exit.  Only then can we be sure no\n\t// new conns will be created.\n\ts.mu.Unlock()\n\ts.serveWG.Wait()\n\n\ts.mu.Lock()\n\tdefer s.mu.Unlock()\n\n\tif graceful {\n\t\ts.drainAllServerTransportsLocked()\n\t} else {\n\t\ts.closeServerTransportsLocked()\n\t}\n\n\tfor len(s.conns) != 0 {\n\t\ts.cv.Wait()\n\t}\n\ts.conns = nil\n\n\tif s.opts.numServerWorkers > 0 {\n\t\t// Closing the channel (only once, via sync.OnceFunc) after all the\n\t\t// connections have been closed above ensures that there are no\n\t\t// goroutines executing the callback passed to st.HandleStreams (where\n\t\t// the channel is written to).\n\t\ts.serverWorkerChannelClose()\n\t}\n\n\tif graceful || s.opts.waitForHandlers {\n\t\ts.handlersWG.Wait()\n\t}\n\n\tif s.events != nil {\n\t\ts.events.Finish()\n\t\ts.events = nil\n\t}\n}\n\n// s.mu must be held by the caller.\nfunc (s *Server) closeServerTransportsLocked() {\n\tfor _, conns := range s.conns {\n\t\tfor st := range conns {\n\t\t\tst.Close(errors.New(\"Server.Stop called\"))\n\t\t}\n\t}\n}\n\n// s.mu must be held by the caller.\nfunc (s *Server) drainAllServerTransportsLocked() {\n\tif !s.drain {\n\t\tfor _, conns := range s.conns {\n\t\t\tfor st := range conns {\n\t\t\t\tst.Drain(\"graceful_stop\")\n\t\t\t}\n\t\t}\n\t\ts.drain = true\n\t}\n}\n\n// s.mu must be held by the caller.\nfunc (s *Server) closeListenersLocked() {\n\tfor lis := range s.lis {\n\t\tlis.Close()\n\t}\n\ts.lis = nil\n}\n\n// contentSubtype must be lowercase\n// cannot return nil\nfunc (s *Server) getCodec(contentSubtype string) baseCodec {\n\tif s.opts.codec != nil {\n\t\treturn s.opts.codec\n\t}\n\tif contentSubtype == \"\" {\n\t\treturn getCodec(proto.Name)\n\t}\n\tcodec := getCodec(contentSubtype)\n\tif codec == nil {\n\t\tlogger.Warningf(\"Unsupported codec %q. Defaulting to %q for now. This will start to fail in future releases.\", contentSubtype, proto.Name)\n\t\treturn getCodec(proto.Name)\n\t}\n\treturn codec\n}\n\ntype serverKey struct{}\n\n// serverFromContext gets the Server from the context.\nfunc serverFromContext(ctx context.Context) *Server {\n\ts, _ := ctx.Value(serverKey{}).(*Server)\n\treturn s\n}\n\n// contextWithServer sets the Server in the context.\nfunc contextWithServer(ctx context.Context, server *Server) context.Context {\n\treturn context.WithValue(ctx, serverKey{}, server)\n}\n\n// isRegisteredMethod returns whether the passed in method is registered as a\n// method on the server. /service/method and service/method will match if the\n// service and method are registered on the server.\nfunc (s *Server) isRegisteredMethod(serviceMethod string) bool {\n\tif serviceMethod != \"\" && serviceMethod[0] == '/' {\n\t\tserviceMethod = serviceMethod[1:]\n\t}\n\tpos := strings.LastIndex(serviceMethod, \"/\")\n\tif pos == -1 { // Invalid method name syntax.\n\t\treturn false\n\t}\n\tservice := serviceMethod[:pos]\n\tmethod := serviceMethod[pos+1:]\n\tsrv, knownService := s.services[service]\n\tif knownService {\n\t\tif _, ok := srv.methods[method]; ok {\n\t\t\treturn true\n\t\t}\n\t\tif _, ok := srv.streams[method]; ok {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// SetHeader sets the header metadata to be sent from the server to the client.\n// The context provided must be the context passed to the server's handler.\n//\n// Streaming RPCs should prefer the SetHeader method of the ServerStream.\n//\n// When called multiple times, all the provided metadata will be merged.  All\n// the metadata will be sent out when one of the following happens:\n//\n//   - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader.\n//   - The first response message is sent.  For unary handlers, this occurs when\n//     the handler returns; for streaming handlers, this can happen when stream's\n//     SendMsg method is called.\n//   - An RPC status is sent out (error or success).  This occurs when the handler\n//     returns.\n//\n// SetHeader will fail if called after any of the events above.\n//\n// The error returned is compatible with the status package.  However, the\n// status code will often not match the RPC status as seen by the client\n// application, and therefore, should not be relied upon for this purpose.\nfunc SetHeader(ctx context.Context, md metadata.MD) error {\n\tif md.Len() == 0 {\n\t\treturn nil\n\t}\n\tstream := ServerTransportStreamFromContext(ctx)\n\tif stream == nil {\n\t\treturn status.Errorf(codes.Internal, \"grpc: failed to fetch the stream from the context %v\", ctx)\n\t}\n\treturn stream.SetHeader(md)\n}\n\n// SendHeader sends header metadata. It may be called at most once, and may not\n// be called after any event that causes headers to be sent (see SetHeader for\n// a complete list).  The provided md and headers set by SetHeader() will be\n// sent.\n//\n// The error returned is compatible with the status package.  However, the\n// status code will often not match the RPC status as seen by the client\n// application, and therefore, should not be relied upon for this purpose.\nfunc SendHeader(ctx context.Context, md metadata.MD) error {\n\tstream := ServerTransportStreamFromContext(ctx)\n\tif stream == nil {\n\t\treturn status.Errorf(codes.Internal, \"grpc: failed to fetch the stream from the context %v\", ctx)\n\t}\n\tif err := stream.SendHeader(md); err != nil {\n\t\treturn toRPCErr(err)\n\t}\n\treturn nil\n}\n\n// SetSendCompressor sets a compressor for outbound messages from the server.\n// It must not be called after any event that causes headers to be sent\n// (see ServerStream.SetHeader for the complete list). Provided compressor is\n// used when below conditions are met:\n//\n//   - compressor is registered via encoding.RegisterCompressor\n//   - compressor name must exist in the client advertised compressor names\n//     sent in grpc-accept-encoding header. Use ClientSupportedCompressors to\n//     get client supported compressor names.\n//\n// The context provided must be the context passed to the server's handler.\n// It must be noted that compressor name encoding.Identity disables the\n// outbound compression.\n// By default, server messages will be sent using the same compressor with\n// which request messages were sent.\n//\n// It is not safe to call SetSendCompressor concurrently with SendHeader and\n// SendMsg.\n//\n// # Experimental\n//\n// Notice: This function is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc SetSendCompressor(ctx context.Context, name string) error {\n\tstream, ok := ServerTransportStreamFromContext(ctx).(*transport.ServerStream)\n\tif !ok || stream == nil {\n\t\treturn fmt.Errorf(\"failed to fetch the stream from the given context\")\n\t}\n\n\tif err := validateSendCompressor(name, stream.ClientAdvertisedCompressors()); err != nil {\n\t\treturn fmt.Errorf(\"unable to set send compressor: %w\", err)\n\t}\n\n\treturn stream.SetSendCompress(name)\n}\n\n// ClientSupportedCompressors returns compressor names advertised by the client\n// via grpc-accept-encoding header.\n//\n// The context provided must be the context passed to the server's handler.\n//\n// # Experimental\n//\n// Notice: This function is EXPERIMENTAL and may be changed or removed in a\n// later release.\nfunc ClientSupportedCompressors(ctx context.Context) ([]string, error) {\n\tstream, ok := ServerTransportStreamFromContext(ctx).(*transport.ServerStream)\n\tif !ok || stream == nil {\n\t\treturn nil, fmt.Errorf(\"failed to fetch the stream from the given context %v\", ctx)\n\t}\n\n\treturn stream.ClientAdvertisedCompressors(), nil\n}\n\n// SetTrailer sets the trailer metadata that will be sent when an RPC returns.\n// When called more than once, all the provided metadata will be merged.\n//\n// The error returned is compatible with the status package.  However, the\n// status code will often not match the RPC status as seen by the client\n// application, and therefore, should not be relied upon for this purpose.\nfunc SetTrailer(ctx context.Context, md metadata.MD) error {\n\tif md.Len() == 0 {\n\t\treturn nil\n\t}\n\tstream := ServerTransportStreamFromContext(ctx)\n\tif stream == nil {\n\t\treturn status.Errorf(codes.Internal, \"grpc: failed to fetch the stream from the context %v\", ctx)\n\t}\n\treturn stream.SetTrailer(md)\n}\n\n// Method returns the method string for the server context.  The returned\n// string is in the format of \"/service/method\".\nfunc Method(ctx context.Context) (string, bool) {\n\ts := ServerTransportStreamFromContext(ctx)\n\tif s == nil {\n\t\treturn \"\", false\n\t}\n\treturn s.Method(), true\n}\n\n// validateSendCompressor returns an error when given compressor name cannot be\n// handled by the server or the client based on the advertised compressors.\nfunc validateSendCompressor(name string, clientCompressors []string) error {\n\tif name == encoding.Identity {\n\t\treturn nil\n\t}\n\n\tif !grpcutil.IsCompressorNameRegistered(name) {\n\t\treturn fmt.Errorf(\"compressor not registered %q\", name)\n\t}\n\n\tfor _, c := range clientCompressors {\n\t\tif c == name {\n\t\t\treturn nil // found match\n\t\t}\n\t}\n\treturn fmt.Errorf(\"client does not support compressor %q\", name)\n}\n\n// atomicSemaphore implements a blocking, counting semaphore. acquire should be\n// called synchronously; release may be called asynchronously.\ntype atomicSemaphore struct {\n\tn    atomic.Int64\n\twait chan struct{}\n}\n\nfunc (q *atomicSemaphore) acquire() {\n\tif q.n.Add(-1) < 0 {\n\t\t// We ran out of quota.  Block until a release happens.\n\t\t<-q.wait\n\t}\n}\n\nfunc (q *atomicSemaphore) release() {\n\t// N.B. the \"<= 0\" check below should allow for this to work with multiple\n\t// concurrent calls to acquire, but also note that with synchronous calls to\n\t// acquire, as our system does, n will never be less than -1.  There are\n\t// fairness issues (queuing) to consider if this was to be generalized.\n\tif q.n.Add(1) <= 0 {\n\t\t// An acquire was waiting on us.  Unblock it.\n\t\tq.wait <- struct{}{}\n\t}\n}\n\nfunc newHandlerQuota(n uint32) *atomicSemaphore {\n\ta := &atomicSemaphore{wait: make(chan struct{}, 1)}\n\ta.n.Store(int64(n))\n\treturn a\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/service_config.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/balancer/pickfirst\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/balancer/gracefulswitch\"\n\tinternalserviceconfig \"google.golang.org/grpc/internal/serviceconfig\"\n\t\"google.golang.org/grpc/serviceconfig\"\n)\n\nconst maxInt = int(^uint(0) >> 1)\n\n// MethodConfig defines the configuration recommended by the service providers for a\n// particular method.\n//\n// Deprecated: Users should not use this struct. Service config should be received\n// through name resolver, as specified here\n// https://github.com/grpc/grpc/blob/master/doc/service_config.md\ntype MethodConfig = internalserviceconfig.MethodConfig\n\n// ServiceConfig is provided by the service provider and contains parameters for how\n// clients that connect to the service should behave.\n//\n// Deprecated: Users should not use this struct. Service config should be received\n// through name resolver, as specified here\n// https://github.com/grpc/grpc/blob/master/doc/service_config.md\ntype ServiceConfig struct {\n\tserviceconfig.Config\n\n\t// lbConfig is the service config's load balancing configuration.  If\n\t// lbConfig and LB are both present, lbConfig will be used.\n\tlbConfig serviceconfig.LoadBalancingConfig\n\n\t// Methods contains a map for the methods in this service.  If there is an\n\t// exact match for a method (i.e. /service/method) in the map, use the\n\t// corresponding MethodConfig.  If there's no exact match, look for the\n\t// default config for the service (/service/) and use the corresponding\n\t// MethodConfig if it exists.  Otherwise, the method has no MethodConfig to\n\t// use.\n\tMethods map[string]MethodConfig\n\n\t// If a retryThrottlingPolicy is provided, gRPC will automatically throttle\n\t// retry attempts and hedged RPCs when the client’s ratio of failures to\n\t// successes exceeds a threshold.\n\t//\n\t// For each server name, the gRPC client will maintain a token_count which is\n\t// initially set to maxTokens, and can take values between 0 and maxTokens.\n\t//\n\t// Every outgoing RPC (regardless of service or method invoked) will change\n\t// token_count as follows:\n\t//\n\t//   - Every failed RPC will decrement the token_count by 1.\n\t//   - Every successful RPC will increment the token_count by tokenRatio.\n\t//\n\t// If token_count is less than or equal to maxTokens / 2, then RPCs will not\n\t// be retried and hedged RPCs will not be sent.\n\tretryThrottling *retryThrottlingPolicy\n\t// healthCheckConfig must be set as one of the requirement to enable LB channel\n\t// health check.\n\thealthCheckConfig *healthCheckConfig\n\t// rawJSONString stores service config json string that get parsed into\n\t// this service config struct.\n\trawJSONString string\n}\n\n// healthCheckConfig defines the go-native version of the LB channel health check config.\ntype healthCheckConfig struct {\n\t// serviceName is the service name to use in the health-checking request.\n\tServiceName string\n}\n\ntype jsonRetryPolicy struct {\n\tMaxAttempts          int\n\tInitialBackoff       internalserviceconfig.Duration\n\tMaxBackoff           internalserviceconfig.Duration\n\tBackoffMultiplier    float64\n\tRetryableStatusCodes []codes.Code\n}\n\n// retryThrottlingPolicy defines the go-native version of the retry throttling\n// policy defined by the service config here:\n// https://github.com/grpc/proposal/blob/master/A6-client-retries.md#integration-with-service-config\ntype retryThrottlingPolicy struct {\n\t// The number of tokens starts at maxTokens. The token_count will always be\n\t// between 0 and maxTokens.\n\t//\n\t// This field is required and must be greater than zero.\n\tMaxTokens float64\n\t// The amount of tokens to add on each successful RPC. Typically this will\n\t// be some number between 0 and 1, e.g., 0.1.\n\t//\n\t// This field is required and must be greater than zero. Up to 3 decimal\n\t// places are supported.\n\tTokenRatio float64\n}\n\ntype jsonName struct {\n\tService string\n\tMethod  string\n}\n\nvar (\n\terrDuplicatedName             = errors.New(\"duplicated name\")\n\terrEmptyServiceNonEmptyMethod = errors.New(\"cannot combine empty 'service' and non-empty 'method'\")\n)\n\nfunc (j jsonName) generatePath() (string, error) {\n\tif j.Service == \"\" {\n\t\tif j.Method != \"\" {\n\t\t\treturn \"\", errEmptyServiceNonEmptyMethod\n\t\t}\n\t\treturn \"\", nil\n\t}\n\tres := \"/\" + j.Service + \"/\"\n\tif j.Method != \"\" {\n\t\tres += j.Method\n\t}\n\treturn res, nil\n}\n\n// TODO(lyuxuan): delete this struct after cleaning up old service config implementation.\ntype jsonMC struct {\n\tName                    *[]jsonName\n\tWaitForReady            *bool\n\tTimeout                 *internalserviceconfig.Duration\n\tMaxRequestMessageBytes  *int64\n\tMaxResponseMessageBytes *int64\n\tRetryPolicy             *jsonRetryPolicy\n}\n\n// TODO(lyuxuan): delete this struct after cleaning up old service config implementation.\ntype jsonSC struct {\n\tLoadBalancingPolicy *string\n\tLoadBalancingConfig *json.RawMessage\n\tMethodConfig        *[]jsonMC\n\tRetryThrottling     *retryThrottlingPolicy\n\tHealthCheckConfig   *healthCheckConfig\n}\n\nfunc init() {\n\tinternal.ParseServiceConfig = func(js string) *serviceconfig.ParseResult {\n\t\treturn parseServiceConfig(js, defaultMaxCallAttempts)\n\t}\n}\n\nfunc parseServiceConfig(js string, maxAttempts int) *serviceconfig.ParseResult {\n\tif len(js) == 0 {\n\t\treturn &serviceconfig.ParseResult{Err: fmt.Errorf(\"no JSON service config provided\")}\n\t}\n\tvar rsc jsonSC\n\terr := json.Unmarshal([]byte(js), &rsc)\n\tif err != nil {\n\t\tlogger.Warningf(\"grpc: unmarshalling service config %s: %v\", js, err)\n\t\treturn &serviceconfig.ParseResult{Err: err}\n\t}\n\tsc := ServiceConfig{\n\t\tMethods:           make(map[string]MethodConfig),\n\t\tretryThrottling:   rsc.RetryThrottling,\n\t\thealthCheckConfig: rsc.HealthCheckConfig,\n\t\trawJSONString:     js,\n\t}\n\tc := rsc.LoadBalancingConfig\n\tif c == nil {\n\t\tname := pickfirst.Name\n\t\tif rsc.LoadBalancingPolicy != nil {\n\t\t\tname = *rsc.LoadBalancingPolicy\n\t\t}\n\t\tif balancer.Get(name) == nil {\n\t\t\tname = pickfirst.Name\n\t\t}\n\t\tcfg := []map[string]any{{name: struct{}{}}}\n\t\tstrCfg, err := json.Marshal(cfg)\n\t\tif err != nil {\n\t\t\treturn &serviceconfig.ParseResult{Err: fmt.Errorf(\"unexpected error marshaling simple LB config: %w\", err)}\n\t\t}\n\t\tr := json.RawMessage(strCfg)\n\t\tc = &r\n\t}\n\tcfg, err := gracefulswitch.ParseConfig(*c)\n\tif err != nil {\n\t\treturn &serviceconfig.ParseResult{Err: err}\n\t}\n\tsc.lbConfig = cfg\n\n\tif rsc.MethodConfig == nil {\n\t\treturn &serviceconfig.ParseResult{Config: &sc}\n\t}\n\n\tpaths := map[string]struct{}{}\n\tfor _, m := range *rsc.MethodConfig {\n\t\tif m.Name == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tmc := MethodConfig{\n\t\t\tWaitForReady: m.WaitForReady,\n\t\t\tTimeout:      (*time.Duration)(m.Timeout),\n\t\t}\n\t\tif mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy, maxAttempts); err != nil {\n\t\t\tlogger.Warningf(\"grpc: unmarshalling service config %s: %v\", js, err)\n\t\t\treturn &serviceconfig.ParseResult{Err: err}\n\t\t}\n\t\tif m.MaxRequestMessageBytes != nil {\n\t\t\tif *m.MaxRequestMessageBytes > int64(maxInt) {\n\t\t\t\tmc.MaxReqSize = newInt(maxInt)\n\t\t\t} else {\n\t\t\t\tmc.MaxReqSize = newInt(int(*m.MaxRequestMessageBytes))\n\t\t\t}\n\t\t}\n\t\tif m.MaxResponseMessageBytes != nil {\n\t\t\tif *m.MaxResponseMessageBytes > int64(maxInt) {\n\t\t\t\tmc.MaxRespSize = newInt(maxInt)\n\t\t\t} else {\n\t\t\t\tmc.MaxRespSize = newInt(int(*m.MaxResponseMessageBytes))\n\t\t\t}\n\t\t}\n\t\tfor i, n := range *m.Name {\n\t\t\tpath, err := n.generatePath()\n\t\t\tif err != nil {\n\t\t\t\tlogger.Warningf(\"grpc: error unmarshalling service config %s due to methodConfig[%d]: %v\", js, i, err)\n\t\t\t\treturn &serviceconfig.ParseResult{Err: err}\n\t\t\t}\n\n\t\t\tif _, ok := paths[path]; ok {\n\t\t\t\terr = errDuplicatedName\n\t\t\t\tlogger.Warningf(\"grpc: error unmarshalling service config %s due to methodConfig[%d]: %v\", js, i, err)\n\t\t\t\treturn &serviceconfig.ParseResult{Err: err}\n\t\t\t}\n\t\t\tpaths[path] = struct{}{}\n\t\t\tsc.Methods[path] = mc\n\t\t}\n\t}\n\n\tif sc.retryThrottling != nil {\n\t\tif mt := sc.retryThrottling.MaxTokens; mt <= 0 || mt > 1000 {\n\t\t\treturn &serviceconfig.ParseResult{Err: fmt.Errorf(\"invalid retry throttling config: maxTokens (%v) out of range (0, 1000]\", mt)}\n\t\t}\n\t\tif tr := sc.retryThrottling.TokenRatio; tr <= 0 {\n\t\t\treturn &serviceconfig.ParseResult{Err: fmt.Errorf(\"invalid retry throttling config: tokenRatio (%v) may not be negative\", tr)}\n\t\t}\n\t}\n\treturn &serviceconfig.ParseResult{Config: &sc}\n}\n\nfunc isValidRetryPolicy(jrp *jsonRetryPolicy) bool {\n\treturn jrp.MaxAttempts > 1 &&\n\t\tjrp.InitialBackoff > 0 &&\n\t\tjrp.MaxBackoff > 0 &&\n\t\tjrp.BackoffMultiplier > 0 &&\n\t\tlen(jrp.RetryableStatusCodes) > 0\n}\n\nfunc convertRetryPolicy(jrp *jsonRetryPolicy, maxAttempts int) (p *internalserviceconfig.RetryPolicy, err error) {\n\tif jrp == nil {\n\t\treturn nil, nil\n\t}\n\n\tif !isValidRetryPolicy(jrp) {\n\t\treturn nil, fmt.Errorf(\"invalid retry policy (%+v): \", jrp)\n\t}\n\n\tif jrp.MaxAttempts < maxAttempts {\n\t\tmaxAttempts = jrp.MaxAttempts\n\t}\n\trp := &internalserviceconfig.RetryPolicy{\n\t\tMaxAttempts:          maxAttempts,\n\t\tInitialBackoff:       time.Duration(jrp.InitialBackoff),\n\t\tMaxBackoff:           time.Duration(jrp.MaxBackoff),\n\t\tBackoffMultiplier:    jrp.BackoffMultiplier,\n\t\tRetryableStatusCodes: make(map[codes.Code]bool),\n\t}\n\tfor _, code := range jrp.RetryableStatusCodes {\n\t\trp.RetryableStatusCodes[code] = true\n\t}\n\treturn rp, nil\n}\n\nfunc minPointers(a, b *int) *int {\n\tif *a < *b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc getMaxSize(mcMax, doptMax *int, defaultVal int) *int {\n\tif mcMax == nil && doptMax == nil {\n\t\treturn &defaultVal\n\t}\n\tif mcMax != nil && doptMax != nil {\n\t\treturn minPointers(mcMax, doptMax)\n\t}\n\tif mcMax != nil {\n\t\treturn mcMax\n\t}\n\treturn doptMax\n}\n\nfunc newInt(b int) *int {\n\treturn &b\n}\n\nfunc init() {\n\tinternal.EqualServiceConfigForTesting = equalServiceConfig\n}\n\n// equalServiceConfig compares two configs. The rawJSONString field is ignored,\n// because they may diff in white spaces.\n//\n// If any of them is NOT *ServiceConfig, return false.\nfunc equalServiceConfig(a, b serviceconfig.Config) bool {\n\tif a == nil && b == nil {\n\t\treturn true\n\t}\n\taa, ok := a.(*ServiceConfig)\n\tif !ok {\n\t\treturn false\n\t}\n\tbb, ok := b.(*ServiceConfig)\n\tif !ok {\n\t\treturn false\n\t}\n\taaRaw := aa.rawJSONString\n\taa.rawJSONString = \"\"\n\tbbRaw := bb.rawJSONString\n\tbb.rawJSONString = \"\"\n\tdefer func() {\n\t\taa.rawJSONString = aaRaw\n\t\tbb.rawJSONString = bbRaw\n\t}()\n\t// Using reflect.DeepEqual instead of cmp.Equal because many balancer\n\t// configs are unexported, and cmp.Equal cannot compare unexported fields\n\t// from unexported structs.\n\treturn reflect.DeepEqual(aa, bb)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go",
    "content": "/*\n *\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package serviceconfig defines types and methods for operating on gRPC\n// service configs.\n//\n// # Experimental\n//\n// Notice: This package is EXPERIMENTAL and may be changed or removed in a\n// later release.\npackage serviceconfig\n\n// Config represents an opaque data structure holding a service config.\ntype Config interface {\n\tisServiceConfig()\n}\n\n// LoadBalancingConfig represents an opaque data structure holding a load\n// balancing config.\ntype LoadBalancingConfig interface {\n\tisLoadBalancingConfig()\n}\n\n// ParseResult contains a service config or an error.  Exactly one must be\n// non-nil.\ntype ParseResult struct {\n\tConfig Config\n\tErr    error\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/stats/handlers.go",
    "content": "/*\n *\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage stats\n\nimport (\n\t\"context\"\n\t\"net\"\n)\n\n// ConnTagInfo defines the relevant information needed by connection context tagger.\ntype ConnTagInfo struct {\n\t// RemoteAddr is the remote address of the corresponding connection.\n\tRemoteAddr net.Addr\n\t// LocalAddr is the local address of the corresponding connection.\n\tLocalAddr net.Addr\n}\n\n// RPCTagInfo defines the relevant information needed by RPC context tagger.\ntype RPCTagInfo struct {\n\t// FullMethodName is the RPC method in the format of /package.service/method.\n\tFullMethodName string\n\t// FailFast indicates if this RPC is failfast.\n\t// This field is only valid on client side, it's always false on server side.\n\tFailFast bool\n\t// NameResolutionDelay indicates if the RPC needed to wait for the\n\t// initial name resolver update before it could begin. This should only\n\t// happen if the channel is IDLE when the RPC is started.  Note that\n\t// all retry or hedging attempts for an RPC that experienced a delay\n\t// will have it set.\n\t//\n\t// This field is only valid on the client side; it is always false on\n\t// the server side.\n\tNameResolutionDelay bool\n}\n\n// Handler defines the interface for the related stats handling (e.g., RPCs, connections).\ntype Handler interface {\n\t// TagRPC can attach some information to the given context.\n\t// The context used for the rest lifetime of the RPC will be derived from\n\t// the returned context.\n\tTagRPC(context.Context, *RPCTagInfo) context.Context\n\t// HandleRPC processes the RPC stats.\n\tHandleRPC(context.Context, RPCStats)\n\n\t// TagConn can attach some information to the given context.\n\t// The returned context will be used for stats handling.\n\t// For conn stats handling, the context used in HandleConn for this\n\t// connection will be derived from the context returned.\n\t// For RPC stats handling,\n\t//  - On server side, the context used in HandleRPC for all RPCs on this\n\t// connection will be derived from the context returned.\n\t//  - On client side, the context is not derived from the context returned.\n\tTagConn(context.Context, *ConnTagInfo) context.Context\n\t// HandleConn processes the Conn stats.\n\tHandleConn(context.Context, ConnStats)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/stats/metrics.go",
    "content": "/*\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage stats\n\nimport \"maps\"\n\n// MetricSet is a set of metrics to record. Once created, MetricSet is immutable,\n// however Add and Remove can make copies with specific metrics added or\n// removed, respectively.\n//\n// Do not construct directly; use NewMetricSet instead.\ntype MetricSet struct {\n\t// metrics are the set of metrics to initialize.\n\tmetrics map[string]bool\n}\n\n// NewMetricSet returns a MetricSet containing metricNames.\nfunc NewMetricSet(metricNames ...string) *MetricSet {\n\tnewMetrics := make(map[string]bool)\n\tfor _, metric := range metricNames {\n\t\tnewMetrics[metric] = true\n\t}\n\treturn &MetricSet{metrics: newMetrics}\n}\n\n// Metrics returns the metrics set. The returned map is read-only and must not\n// be modified.\nfunc (m *MetricSet) Metrics() map[string]bool {\n\treturn m.metrics\n}\n\n// Add adds the metricNames to the metrics set and returns a new copy with the\n// additional metrics.\nfunc (m *MetricSet) Add(metricNames ...string) *MetricSet {\n\tnewMetrics := make(map[string]bool)\n\tfor metric := range m.metrics {\n\t\tnewMetrics[metric] = true\n\t}\n\n\tfor _, metric := range metricNames {\n\t\tnewMetrics[metric] = true\n\t}\n\treturn &MetricSet{metrics: newMetrics}\n}\n\n// Join joins the metrics passed in with the metrics set, and returns a new copy\n// with the merged metrics.\nfunc (m *MetricSet) Join(metrics *MetricSet) *MetricSet {\n\tnewMetrics := make(map[string]bool)\n\tmaps.Copy(newMetrics, m.metrics)\n\tmaps.Copy(newMetrics, metrics.metrics)\n\treturn &MetricSet{metrics: newMetrics}\n}\n\n// Remove removes the metricNames from the metrics set and returns a new copy\n// with the metrics removed.\nfunc (m *MetricSet) Remove(metricNames ...string) *MetricSet {\n\tnewMetrics := make(map[string]bool)\n\tfor metric := range m.metrics {\n\t\tnewMetrics[metric] = true\n\t}\n\n\tfor _, metric := range metricNames {\n\t\tdelete(newMetrics, metric)\n\t}\n\treturn &MetricSet{metrics: newMetrics}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/stats/stats.go",
    "content": "/*\n *\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package stats is for collecting and reporting various network and RPC stats.\n// This package is for monitoring purpose only. All fields are read-only.\n// All APIs are experimental.\npackage stats // import \"google.golang.org/grpc/stats\"\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/metadata\"\n)\n\n// RPCStats contains stats information about RPCs.\ntype RPCStats interface {\n\tisRPCStats()\n\t// IsClient returns true if this RPCStats is from client side.\n\tIsClient() bool\n}\n\n// Begin contains stats for the start of an RPC attempt.\n//\n//   - Server-side: Triggered after `InHeader`, as headers are processed\n//     before the RPC lifecycle begins.\n//   - Client-side: The first stats event recorded.\n//\n// FailFast is only valid if this Begin is from client side.\ntype Begin struct {\n\t// Client is true if this Begin is from client side.\n\tClient bool\n\t// BeginTime is the time when the RPC attempt begins.\n\tBeginTime time.Time\n\t// FailFast indicates if this RPC is failfast.\n\tFailFast bool\n\t// IsClientStream indicates whether the RPC is a client streaming RPC.\n\tIsClientStream bool\n\t// IsServerStream indicates whether the RPC is a server streaming RPC.\n\tIsServerStream bool\n\t// IsTransparentRetryAttempt indicates whether this attempt was initiated\n\t// due to transparently retrying a previous attempt.\n\tIsTransparentRetryAttempt bool\n}\n\n// IsClient indicates if the stats information is from client side.\nfunc (s *Begin) IsClient() bool { return s.Client }\n\nfunc (s *Begin) isRPCStats() {}\n\n// DelayedPickComplete indicates that the RPC is unblocked following a delay in\n// selecting a connection for the call.\ntype DelayedPickComplete struct{}\n\n// IsClient indicates DelayedPickComplete is available on the client.\nfunc (*DelayedPickComplete) IsClient() bool { return true }\n\nfunc (*DelayedPickComplete) isRPCStats() {}\n\n// PickerUpdated indicates that the RPC is unblocked following a delay in\n// selecting a connection for the call.\n//\n// Deprecated: will be removed in a future release; use DelayedPickComplete\n// instead.\ntype PickerUpdated = DelayedPickComplete\n\n// InPayload contains stats about an incoming payload.\ntype InPayload struct {\n\t// Client is true if this InPayload is from client side.\n\tClient bool\n\t// Payload is the payload with original type.  This may be modified after\n\t// the call to HandleRPC which provides the InPayload returns and must be\n\t// copied if needed later.\n\tPayload any\n\n\t// Length is the size of the uncompressed payload data. Does not include any\n\t// framing (gRPC or HTTP/2).\n\tLength int\n\t// CompressedLength is the size of the compressed payload data. Does not\n\t// include any framing (gRPC or HTTP/2). Same as Length if compression not\n\t// enabled.\n\tCompressedLength int\n\t// WireLength is the size of the compressed payload data plus gRPC framing.\n\t// Does not include HTTP/2 framing.\n\tWireLength int\n\n\t// RecvTime is the time when the payload is received.\n\tRecvTime time.Time\n}\n\n// IsClient indicates if the stats information is from client side.\nfunc (s *InPayload) IsClient() bool { return s.Client }\n\nfunc (s *InPayload) isRPCStats() {}\n\n// InHeader contains stats about header reception.\n//\n// - Server-side: The first stats event after the RPC request is received.\ntype InHeader struct {\n\t// Client is true if this InHeader is from client side.\n\tClient bool\n\t// WireLength is the wire length of header.\n\tWireLength int\n\t// Compression is the compression algorithm used for the RPC.\n\tCompression string\n\t// Header contains the header metadata received.\n\tHeader metadata.MD\n\n\t// The following fields are valid only if Client is false.\n\t// FullMethod is the full RPC method string, i.e., /package.service/method.\n\tFullMethod string\n\t// RemoteAddr is the remote address of the corresponding connection.\n\tRemoteAddr net.Addr\n\t// LocalAddr is the local address of the corresponding connection.\n\tLocalAddr net.Addr\n}\n\n// IsClient indicates if the stats information is from client side.\nfunc (s *InHeader) IsClient() bool { return s.Client }\n\nfunc (s *InHeader) isRPCStats() {}\n\n// InTrailer contains stats about trailer reception.\ntype InTrailer struct {\n\t// Client is true if this InTrailer is from client side.\n\tClient bool\n\t// WireLength is the wire length of trailer.\n\tWireLength int\n\t// Trailer contains the trailer metadata received from the server. This\n\t// field is only valid if this InTrailer is from the client side.\n\tTrailer metadata.MD\n}\n\n// IsClient indicates if the stats information is from client side.\nfunc (s *InTrailer) IsClient() bool { return s.Client }\n\nfunc (s *InTrailer) isRPCStats() {}\n\n// OutPayload contains stats about an outgoing payload.\ntype OutPayload struct {\n\t// Client is true if this OutPayload is from client side.\n\tClient bool\n\t// Payload is the payload with original type.  This may be modified after\n\t// the call to HandleRPC which provides the OutPayload returns and must be\n\t// copied if needed later.\n\tPayload any\n\t// Length is the size of the uncompressed payload data. Does not include any\n\t// framing (gRPC or HTTP/2).\n\tLength int\n\t// CompressedLength is the size of the compressed payload data. Does not\n\t// include any framing (gRPC or HTTP/2). Same as Length if compression not\n\t// enabled.\n\tCompressedLength int\n\t// WireLength is the size of the compressed payload data plus gRPC framing.\n\t// Does not include HTTP/2 framing.\n\tWireLength int\n\t// SentTime is the time when the payload is sent.\n\tSentTime time.Time\n}\n\n// IsClient indicates if this stats information is from client side.\nfunc (s *OutPayload) IsClient() bool { return s.Client }\n\nfunc (s *OutPayload) isRPCStats() {}\n\n// OutHeader contains stats about header transmission.\n//\n//   - Client-side: Only occurs after 'Begin', as headers are always the first\n//     thing sent on a stream.\ntype OutHeader struct {\n\t// Client is true if this OutHeader is from client side.\n\tClient bool\n\t// Compression is the compression algorithm used for the RPC.\n\tCompression string\n\t// Header contains the header metadata sent.\n\tHeader metadata.MD\n\n\t// The following fields are valid only if Client is true.\n\t// FullMethod is the full RPC method string, i.e., /package.service/method.\n\tFullMethod string\n\t// RemoteAddr is the remote address of the corresponding connection.\n\tRemoteAddr net.Addr\n\t// LocalAddr is the local address of the corresponding connection.\n\tLocalAddr net.Addr\n}\n\n// IsClient indicates if this stats information is from client side.\nfunc (s *OutHeader) IsClient() bool { return s.Client }\n\nfunc (s *OutHeader) isRPCStats() {}\n\n// OutTrailer contains stats about trailer transmission.\ntype OutTrailer struct {\n\t// Client is true if this OutTrailer is from client side.\n\tClient bool\n\t// WireLength is the wire length of trailer.\n\t//\n\t// Deprecated: This field is never set. The length is not known when this\n\t// message is emitted because the trailer fields are compressed with hpack\n\t// after that.\n\tWireLength int\n\t// Trailer contains the trailer metadata sent to the client. This\n\t// field is only valid if this OutTrailer is from the server side.\n\tTrailer metadata.MD\n}\n\n// IsClient indicates if this stats information is from client side.\nfunc (s *OutTrailer) IsClient() bool { return s.Client }\n\nfunc (s *OutTrailer) isRPCStats() {}\n\n// End contains stats about RPC completion.\ntype End struct {\n\t// Client is true if this End is from client side.\n\tClient bool\n\t// BeginTime is the time when the RPC began.\n\tBeginTime time.Time\n\t// EndTime is the time when the RPC ends.\n\tEndTime time.Time\n\t// Trailer contains the trailer metadata received from the server. This\n\t// field is only valid if this End is from the client side.\n\t// Deprecated: use Trailer in InTrailer instead.\n\tTrailer metadata.MD\n\t// Error is the error the RPC ended with. It is an error generated from\n\t// status.Status and can be converted back to status.Status using\n\t// status.FromError if non-nil.\n\tError error\n}\n\n// IsClient indicates if this is from client side.\nfunc (s *End) IsClient() bool { return s.Client }\n\nfunc (s *End) isRPCStats() {}\n\n// ConnStats contains stats information about connections.\ntype ConnStats interface {\n\tisConnStats()\n\t// IsClient returns true if this ConnStats is from client side.\n\tIsClient() bool\n}\n\n// ConnBegin contains stats about connection establishment.\ntype ConnBegin struct {\n\t// Client is true if this ConnBegin is from client side.\n\tClient bool\n}\n\n// IsClient indicates if this is from client side.\nfunc (s *ConnBegin) IsClient() bool { return s.Client }\n\nfunc (s *ConnBegin) isConnStats() {}\n\n// ConnEnd contains stats about connection termination.\ntype ConnEnd struct {\n\t// Client is true if this ConnEnd is from client side.\n\tClient bool\n}\n\n// IsClient indicates if this is from client side.\nfunc (s *ConnEnd) IsClient() bool { return s.Client }\n\nfunc (s *ConnEnd) isConnStats() {}\n\n// SetTags attaches stats tagging data to the context, which will be sent in\n// the outgoing RPC with the header grpc-tags-bin.  Subsequent calls to\n// SetTags will overwrite the values from earlier calls.\n//\n// Deprecated: set the `grpc-tags-bin` header in the metadata instead.\nfunc SetTags(ctx context.Context, b []byte) context.Context {\n\treturn metadata.AppendToOutgoingContext(ctx, \"grpc-tags-bin\", string(b))\n}\n\n// Tags returns the tags from the context for the inbound RPC.\n//\n// Deprecated: obtain the `grpc-tags-bin` header from metadata instead.\nfunc Tags(ctx context.Context) []byte {\n\ttraceValues := metadata.ValueFromIncomingContext(ctx, \"grpc-tags-bin\")\n\tif len(traceValues) == 0 {\n\t\treturn nil\n\t}\n\treturn []byte(traceValues[len(traceValues)-1])\n}\n\n// SetTrace attaches stats tagging data to the context, which will be sent in\n// the outgoing RPC with the header grpc-trace-bin.  Subsequent calls to\n// SetTrace will overwrite the values from earlier calls.\n//\n// Deprecated: set the `grpc-trace-bin` header in the metadata instead.\nfunc SetTrace(ctx context.Context, b []byte) context.Context {\n\treturn metadata.AppendToOutgoingContext(ctx, \"grpc-trace-bin\", string(b))\n}\n\n// Trace returns the trace from the context for the inbound RPC.\n//\n// Deprecated: obtain the `grpc-trace-bin` header from metadata instead.\nfunc Trace(ctx context.Context) []byte {\n\ttraceValues := metadata.ValueFromIncomingContext(ctx, \"grpc-trace-bin\")\n\tif len(traceValues) == 0 {\n\t\treturn nil\n\t}\n\treturn []byte(traceValues[len(traceValues)-1])\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/status/status.go",
    "content": "/*\n *\n * Copyright 2017 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package status implements errors returned by gRPC.  These errors are\n// serialized and transmitted on the wire between server and client, and allow\n// for additional data to be transmitted via the Details field in the status\n// proto.  gRPC service handlers should return an error created by this\n// package, and gRPC clients should expect a corresponding error to be\n// returned from the RPC call.\n//\n// This package upholds the invariants that a non-nil error may not\n// contain an OK code, and an OK code must result in a nil error.\npackage status\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\tspb \"google.golang.org/genproto/googleapis/rpc/status\"\n\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/internal/status\"\n)\n\n// Status references google.golang.org/grpc/internal/status. It represents an\n// RPC status code, message, and details.  It is immutable and should be\n// created with New, Newf, or FromProto.\n// https://godoc.org/google.golang.org/grpc/internal/status\ntype Status = status.Status\n\n// New returns a Status representing c and msg.\nfunc New(c codes.Code, msg string) *Status {\n\treturn status.New(c, msg)\n}\n\n// Newf returns New(c, fmt.Sprintf(format, a...)).\nfunc Newf(c codes.Code, format string, a ...any) *Status {\n\treturn New(c, fmt.Sprintf(format, a...))\n}\n\n// Error returns an error representing c and msg.  If c is OK, returns nil.\nfunc Error(c codes.Code, msg string) error {\n\treturn New(c, msg).Err()\n}\n\n// Errorf returns Error(c, fmt.Sprintf(format, a...)).\nfunc Errorf(c codes.Code, format string, a ...any) error {\n\treturn Error(c, fmt.Sprintf(format, a...))\n}\n\n// ErrorProto returns an error representing s.  If s.Code is OK, returns nil.\nfunc ErrorProto(s *spb.Status) error {\n\treturn FromProto(s).Err()\n}\n\n// FromProto returns a Status representing s.\nfunc FromProto(s *spb.Status) *Status {\n\treturn status.FromProto(s)\n}\n\n// FromError returns a Status representation of err.\n//\n//   - If err was produced by this package or implements the method `GRPCStatus()\n//     *Status` and `GRPCStatus()` does not return nil, or if err wraps a type\n//     satisfying this, the Status from `GRPCStatus()` is returned.  For wrapped\n//     errors, the message returned contains the entire err.Error() text and not\n//     just the wrapped status. In that case, ok is true.\n//\n//   - If err is nil, a Status is returned with codes.OK and no message, and ok\n//     is true.\n//\n//   - If err implements the method `GRPCStatus() *Status` and `GRPCStatus()`\n//     returns nil (which maps to Codes.OK), or if err wraps a type\n//     satisfying this, a Status is returned with codes.Unknown and err's\n//     Error() message, and ok is false.\n//\n//   - Otherwise, err is an error not compatible with this package.  In this\n//     case, a Status is returned with codes.Unknown and err's Error() message,\n//     and ok is false.\nfunc FromError(err error) (s *Status, ok bool) {\n\tif err == nil {\n\t\treturn nil, true\n\t}\n\ttype grpcstatus interface{ GRPCStatus() *Status }\n\tif gs, ok := err.(grpcstatus); ok {\n\t\tgrpcStatus := gs.GRPCStatus()\n\t\tif grpcStatus == nil {\n\t\t\t// Error has status nil, which maps to codes.OK. There\n\t\t\t// is no sensible behavior for this, so we turn it into\n\t\t\t// an error with codes.Unknown and discard the existing\n\t\t\t// status.\n\t\t\treturn New(codes.Unknown, err.Error()), false\n\t\t}\n\t\treturn grpcStatus, true\n\t}\n\tvar gs grpcstatus\n\tif errors.As(err, &gs) {\n\t\tgrpcStatus := gs.GRPCStatus()\n\t\tif grpcStatus == nil {\n\t\t\t// Error wraps an error that has status nil, which maps\n\t\t\t// to codes.OK.  There is no sensible behavior for this,\n\t\t\t// so we turn it into an error with codes.Unknown and\n\t\t\t// discard the existing status.\n\t\t\treturn New(codes.Unknown, err.Error()), false\n\t\t}\n\t\tp := grpcStatus.Proto()\n\t\tp.Message = err.Error()\n\t\treturn status.FromProto(p), true\n\t}\n\treturn New(codes.Unknown, err.Error()), false\n}\n\n// Convert is a convenience function which removes the need to handle the\n// boolean return value from FromError.\nfunc Convert(err error) *Status {\n\ts, _ := FromError(err)\n\treturn s\n}\n\n// Code returns the Code of the error if it is a Status error or if it wraps a\n// Status error. If that is not the case, it returns codes.OK if err is nil, or\n// codes.Unknown otherwise.\nfunc Code(err error) codes.Code {\n\t// Don't use FromError to avoid allocation of OK status.\n\tif err == nil {\n\t\treturn codes.OK\n\t}\n\n\treturn Convert(err).Code()\n}\n\n// FromContextError converts a context error or wrapped context error into a\n// Status.  It returns a Status with codes.OK if err is nil, or a Status with\n// codes.Unknown if err is non-nil and not a context error.\nfunc FromContextError(err error) *Status {\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif errors.Is(err, context.DeadlineExceeded) {\n\t\treturn New(codes.DeadlineExceeded, err.Error())\n\t}\n\tif errors.Is(err, context.Canceled) {\n\t\treturn New(codes.Canceled, err.Error())\n\t}\n\treturn New(codes.Unknown, err.Error())\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/stream.go",
    "content": "/*\n *\n * Copyright 2014 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"math\"\n\trand \"math/rand/v2\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"google.golang.org/grpc/balancer\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/encoding\"\n\t\"google.golang.org/grpc/internal\"\n\t\"google.golang.org/grpc/internal/balancerload\"\n\t\"google.golang.org/grpc/internal/binarylog\"\n\t\"google.golang.org/grpc/internal/channelz\"\n\t\"google.golang.org/grpc/internal/grpcutil\"\n\timetadata \"google.golang.org/grpc/internal/metadata\"\n\tiresolver \"google.golang.org/grpc/internal/resolver\"\n\t\"google.golang.org/grpc/internal/serviceconfig\"\n\tistatus \"google.golang.org/grpc/internal/status\"\n\t\"google.golang.org/grpc/internal/transport\"\n\t\"google.golang.org/grpc/mem\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/peer\"\n\t\"google.golang.org/grpc/stats\"\n\t\"google.golang.org/grpc/status\"\n)\n\nvar metadataFromOutgoingContextRaw = internal.FromOutgoingContextRaw.(func(context.Context) (metadata.MD, [][]string, bool))\n\n// StreamHandler defines the handler called by gRPC server to complete the\n// execution of a streaming RPC.\n//\n// If a StreamHandler returns an error, it should either be produced by the\n// status package, or be one of the context errors. Otherwise, gRPC will use\n// codes.Unknown as the status code and err.Error() as the status message of the\n// RPC.\ntype StreamHandler func(srv any, stream ServerStream) error\n\n// StreamDesc represents a streaming RPC service's method specification.  Used\n// on the server when registering services and on the client when initiating\n// new streams.\ntype StreamDesc struct {\n\t// StreamName and Handler are only used when registering handlers on a\n\t// server.\n\tStreamName string        // the name of the method excluding the service\n\tHandler    StreamHandler // the handler called for the method\n\n\t// ServerStreams and ClientStreams are used for registering handlers on a\n\t// server as well as defining RPC behavior when passed to NewClientStream\n\t// and ClientConn.NewStream.  At least one must be true.\n\tServerStreams bool // indicates the server can perform streaming sends\n\tClientStreams bool // indicates the client can perform streaming sends\n}\n\n// Stream defines the common interface a client or server stream has to satisfy.\n//\n// Deprecated: See ClientStream and ServerStream documentation instead.\ntype Stream interface {\n\t// Deprecated: See ClientStream and ServerStream documentation instead.\n\tContext() context.Context\n\t// Deprecated: See ClientStream and ServerStream documentation instead.\n\tSendMsg(m any) error\n\t// Deprecated: See ClientStream and ServerStream documentation instead.\n\tRecvMsg(m any) error\n}\n\n// ClientStream defines the client-side behavior of a streaming RPC.\n//\n// All errors returned from ClientStream methods are compatible with the\n// status package.\ntype ClientStream interface {\n\t// Header returns the header metadata received from the server if there\n\t// is any. It blocks if the metadata is not ready to read.  If the metadata\n\t// is nil and the error is also nil, then the stream was terminated without\n\t// headers, and the status can be discovered by calling RecvMsg.\n\tHeader() (metadata.MD, error)\n\t// Trailer returns the trailer metadata from the server, if there is any.\n\t// It must only be called after stream.CloseAndRecv has returned, or\n\t// stream.Recv has returned a non-nil error (including io.EOF).\n\tTrailer() metadata.MD\n\t// CloseSend closes the send direction of the stream. This method always\n\t// returns a nil error. The status of the stream may be discovered using\n\t// RecvMsg. It is also not safe to call CloseSend concurrently with SendMsg.\n\tCloseSend() error\n\t// Context returns the context for this stream.\n\t//\n\t// It should not be called until after Header or RecvMsg has returned. Once\n\t// called, subsequent client-side retries are disabled.\n\tContext() context.Context\n\t// SendMsg is generally called by generated code. On error, SendMsg aborts\n\t// the stream. If the error was generated by the client, the status is\n\t// returned directly; otherwise, io.EOF is returned and the status of\n\t// the stream may be discovered using RecvMsg. For unary or server-streaming\n\t// RPCs (StreamDesc.ClientStreams is false), a nil error is returned\n\t// unconditionally.\n\t//\n\t// SendMsg blocks until:\n\t//   - There is sufficient flow control to schedule m with the transport, or\n\t//   - The stream is done, or\n\t//   - The stream breaks.\n\t//\n\t// SendMsg does not wait until the message is received by the server. An\n\t// untimely stream closure may result in lost messages. To ensure delivery,\n\t// users should ensure the RPC completed successfully using RecvMsg.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not safe\n\t// to call SendMsg on the same stream in different goroutines. It is also\n\t// not safe to call CloseSend concurrently with SendMsg.\n\t//\n\t// It is not safe to modify the message after calling SendMsg. Tracing\n\t// libraries and stats handlers may use the message lazily.\n\tSendMsg(m any) error\n\t// RecvMsg blocks until it receives a message into m or the stream is\n\t// done. It returns io.EOF when the stream completes successfully. On\n\t// any other error, the stream is aborted and the error contains the RPC\n\t// status.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not\n\t// safe to call RecvMsg on the same stream in different goroutines.\n\tRecvMsg(m any) error\n}\n\n// NewStream creates a new Stream for the client side. This is typically\n// called by generated code. ctx is used for the lifetime of the stream.\n//\n// To ensure resources are not leaked due to the stream returned, one of the following\n// actions must be performed:\n//\n//  1. Call Close on the ClientConn.\n//  2. Cancel the context provided.\n//  3. Call RecvMsg until a non-nil error is returned. A protobuf-generated\n//     client-streaming RPC, for instance, might use the helper function\n//     CloseAndRecv (note that CloseSend does not Recv, therefore is not\n//     guaranteed to release all resources).\n//  4. Receive a non-nil, non-io.EOF error from Header or SendMsg.\n//\n// If none of the above happen, a goroutine and a context will be leaked, and grpc\n// will not call the optionally-configured stats handler with a stats.End message.\nfunc (cc *ClientConn) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) {\n\t// allow interceptor to see all applicable call options, which means those\n\t// configured as defaults from dial option as well as per-call options\n\topts = combine(cc.dopts.callOptions, opts)\n\n\tif cc.dopts.streamInt != nil {\n\t\treturn cc.dopts.streamInt(ctx, desc, cc, method, newClientStream, opts...)\n\t}\n\treturn newClientStream(ctx, desc, cc, method, opts...)\n}\n\n// NewClientStream is a wrapper for ClientConn.NewStream.\nfunc NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error) {\n\treturn cc.NewStream(ctx, desc, method, opts...)\n}\n\nvar emptyMethodConfig = serviceconfig.MethodConfig{}\n\n// endOfClientStream performs cleanup actions required for both successful and\n// failed streams. This includes incrementing channelz stats and invoking all\n// registered OnFinish call options.\nfunc endOfClientStream(cc *ClientConn, err error, opts ...CallOption) {\n\tif channelz.IsOn() {\n\t\tif err != nil {\n\t\t\tcc.incrCallsFailed()\n\t\t} else {\n\t\t\tcc.incrCallsSucceeded()\n\t\t}\n\t}\n\n\tfor _, o := range opts {\n\t\tif o, ok := o.(OnFinishCallOption); ok {\n\t\t\to.OnFinish(err)\n\t\t}\n\t}\n}\n\nfunc newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) {\n\tif channelz.IsOn() {\n\t\tcc.incrCallsStarted()\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\t// Ensure cleanup when stream creation fails.\n\t\t\tendOfClientStream(cc, err, opts...)\n\t\t}\n\t}()\n\n\t// Start tracking the RPC for idleness purposes. This is where a stream is\n\t// created for both streaming and unary RPCs, and hence is a good place to\n\t// track active RPC count.\n\tcc.idlenessMgr.OnCallBegin()\n\n\t// Add a calloption, to decrement the active call count, that gets executed\n\t// when the RPC completes.\n\topts = append([]CallOption{OnFinish(func(error) { cc.idlenessMgr.OnCallEnd() })}, opts...)\n\n\tif md, added, ok := metadataFromOutgoingContextRaw(ctx); ok {\n\t\t// validate md\n\t\tif err := imetadata.Validate(md); err != nil {\n\t\t\treturn nil, status.Error(codes.Internal, err.Error())\n\t\t}\n\t\t// validate added\n\t\tfor _, kvs := range added {\n\t\t\tfor i := 0; i < len(kvs); i += 2 {\n\t\t\t\tif err := imetadata.ValidatePair(kvs[i], kvs[i+1]); err != nil {\n\t\t\t\t\treturn nil, status.Error(codes.Internal, err.Error())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Provide an opportunity for the first RPC to see the first service config\n\t// provided by the resolver.\n\tnameResolutionDelayed, err := cc.waitForResolvedAddrs(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmc := &emptyMethodConfig\n\tvar onCommit func()\n\tnewStream := func(ctx context.Context, done func()) (iresolver.ClientStream, error) {\n\t\treturn newClientStreamWithParams(ctx, desc, cc, method, mc, onCommit, done, nameResolutionDelayed, opts...)\n\t}\n\n\trpcInfo := iresolver.RPCInfo{Context: ctx, Method: method}\n\trpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo)\n\tif err != nil {\n\t\tif st, ok := status.FromError(err); ok {\n\t\t\t// Restrict the code to the list allowed by gRFC A54.\n\t\t\tif istatus.IsRestrictedControlPlaneCode(st) {\n\t\t\t\terr = status.Errorf(codes.Internal, \"config selector returned illegal status: %v\", err)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, toRPCErr(err)\n\t}\n\n\tif rpcConfig != nil {\n\t\tif rpcConfig.Context != nil {\n\t\t\tctx = rpcConfig.Context\n\t\t}\n\t\tmc = &rpcConfig.MethodConfig\n\t\tonCommit = rpcConfig.OnCommitted\n\t\tif rpcConfig.Interceptor != nil {\n\t\t\trpcInfo.Context = nil\n\t\t\tns := newStream\n\t\t\tnewStream = func(ctx context.Context, done func()) (iresolver.ClientStream, error) {\n\t\t\t\tcs, err := rpcConfig.Interceptor.NewStream(ctx, rpcInfo, done, ns)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, toRPCErr(err)\n\t\t\t\t}\n\t\t\t\treturn cs, nil\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newStream(ctx, func() {})\n}\n\nfunc newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, mc *serviceconfig.MethodConfig, onCommit, doneFunc func(), nameResolutionDelayed bool, opts ...CallOption) (_ iresolver.ClientStream, err error) {\n\tcallInfo := defaultCallInfo()\n\tif mc.WaitForReady != nil {\n\t\tcallInfo.failFast = !*mc.WaitForReady\n\t}\n\n\t// Possible context leak:\n\t// The cancel function for the child context we create will only be called\n\t// when RecvMsg returns a non-nil error, if the ClientConn is closed, or if\n\t// an error is generated by SendMsg.\n\t// https://github.com/grpc/grpc-go/issues/1818.\n\tvar cancel context.CancelFunc\n\tif mc.Timeout != nil && *mc.Timeout >= 0 {\n\t\tctx, cancel = context.WithTimeout(ctx, *mc.Timeout)\n\t} else {\n\t\tctx, cancel = context.WithCancel(ctx)\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tcancel()\n\t\t}\n\t}()\n\n\tfor _, o := range opts {\n\t\tif err := o.before(callInfo); err != nil {\n\t\t\treturn nil, toRPCErr(err)\n\t\t}\n\t}\n\tcallInfo.maxSendMessageSize = getMaxSize(mc.MaxReqSize, callInfo.maxSendMessageSize, defaultClientMaxSendMessageSize)\n\tcallInfo.maxReceiveMessageSize = getMaxSize(mc.MaxRespSize, callInfo.maxReceiveMessageSize, defaultClientMaxReceiveMessageSize)\n\tif err := setCallInfoCodec(callInfo); err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallHdr := &transport.CallHdr{\n\t\tHost:           cc.authority,\n\t\tMethod:         method,\n\t\tContentSubtype: callInfo.contentSubtype,\n\t\tDoneFunc:       doneFunc,\n\t\tAuthority:      callInfo.authority,\n\t}\n\tif allowed := callInfo.acceptedResponseCompressors; len(allowed) > 0 {\n\t\theaderValue := strings.Join(allowed, \",\")\n\t\tcallHdr.AcceptedCompressors = &headerValue\n\t}\n\n\t// Set our outgoing compression according to the UseCompressor CallOption, if\n\t// set.  In that case, also find the compressor from the encoding package.\n\t// Otherwise, use the compressor configured by the WithCompressor DialOption,\n\t// if set.\n\tvar compressorV0 Compressor\n\tvar compressorV1 encoding.Compressor\n\tif ct := callInfo.compressorName; ct != \"\" {\n\t\tcallHdr.SendCompress = ct\n\t\tif ct != encoding.Identity {\n\t\t\tcompressorV1 = encoding.GetCompressor(ct)\n\t\t\tif compressorV1 == nil {\n\t\t\t\treturn nil, status.Errorf(codes.Internal, \"grpc: Compressor is not installed for requested grpc-encoding %q\", ct)\n\t\t\t}\n\t\t}\n\t} else if cc.dopts.compressorV0 != nil {\n\t\tcallHdr.SendCompress = cc.dopts.compressorV0.Type()\n\t\tcompressorV0 = cc.dopts.compressorV0\n\t}\n\tif callInfo.creds != nil {\n\t\tcallHdr.Creds = callInfo.creds\n\t}\n\n\tcs := &clientStream{\n\t\tcallHdr:             callHdr,\n\t\tctx:                 ctx,\n\t\tmethodConfig:        mc,\n\t\topts:                opts,\n\t\tcallInfo:            callInfo,\n\t\tcc:                  cc,\n\t\tdesc:                desc,\n\t\tcodec:               callInfo.codec,\n\t\tcompressorV0:        compressorV0,\n\t\tcompressorV1:        compressorV1,\n\t\tcancel:              cancel,\n\t\tfirstAttempt:        true,\n\t\tonCommit:            onCommit,\n\t\tnameResolutionDelay: nameResolutionDelayed,\n\t}\n\tif !cc.dopts.disableRetry {\n\t\tcs.retryThrottler = cc.retryThrottler.Load().(*retryThrottler)\n\t}\n\tif ml := binarylog.GetMethodLogger(method); ml != nil {\n\t\tcs.binlogs = append(cs.binlogs, ml)\n\t}\n\tif cc.dopts.binaryLogger != nil {\n\t\tif ml := cc.dopts.binaryLogger.GetMethodLogger(method); ml != nil {\n\t\t\tcs.binlogs = append(cs.binlogs, ml)\n\t\t}\n\t}\n\n\t// Pick the transport to use and create a new stream on the transport.\n\t// Assign cs.attempt upon success.\n\top := func(a *csAttempt) error {\n\t\tif err := a.getTransport(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := a.newStream(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Because this operation is always called either here (while creating\n\t\t// the clientStream) or by the retry code while locked when replaying\n\t\t// the operation, it is safe to access cs.attempt directly.\n\t\tcs.attempt = a\n\t\treturn nil\n\t}\n\tif err := cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op, nil) }); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(cs.binlogs) != 0 {\n\t\tmd, _ := metadata.FromOutgoingContext(ctx)\n\t\tlogEntry := &binarylog.ClientHeader{\n\t\t\tOnClientSide: true,\n\t\t\tHeader:       md,\n\t\t\tMethodName:   method,\n\t\t\tAuthority:    cs.cc.authority,\n\t\t}\n\t\tif deadline, ok := ctx.Deadline(); ok {\n\t\t\tlogEntry.Timeout = time.Until(deadline)\n\t\t\tif logEntry.Timeout < 0 {\n\t\t\t\tlogEntry.Timeout = 0\n\t\t\t}\n\t\t}\n\t\tfor _, binlog := range cs.binlogs {\n\t\t\tbinlog.Log(cs.ctx, logEntry)\n\t\t}\n\t}\n\n\tif desc != unaryStreamDesc {\n\t\t// Listen on cc and stream contexts to cleanup when the user closes the\n\t\t// ClientConn or cancels the stream context.  In all other cases, an error\n\t\t// should already be injected into the recv buffer by the transport, which\n\t\t// the client will eventually receive, and then we will cancel the stream's\n\t\t// context in clientStream.finish.\n\t\tgo func() {\n\t\t\tselect {\n\t\t\tcase <-cc.ctx.Done():\n\t\t\t\tcs.finish(ErrClientConnClosing)\n\t\t\tcase <-ctx.Done():\n\t\t\t\tcs.finish(toRPCErr(ctx.Err()))\n\t\t\t}\n\t\t}()\n\t}\n\treturn cs, nil\n}\n\n// newAttemptLocked creates a new csAttempt without a transport or stream.\nfunc (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) {\n\tif err := cs.ctx.Err(); err != nil {\n\t\treturn nil, toRPCErr(err)\n\t}\n\tif err := cs.cc.ctx.Err(); err != nil {\n\t\treturn nil, ErrClientConnClosing\n\t}\n\n\tctx := newContextWithRPCInfo(cs.ctx, cs.callInfo.failFast, cs.callInfo.codec, cs.compressorV0, cs.compressorV1)\n\tmethod := cs.callHdr.Method\n\tvar beginTime time.Time\n\tsh := cs.cc.statsHandler\n\tif sh != nil {\n\t\tbeginTime = time.Now()\n\t\tctx = sh.TagRPC(ctx, &stats.RPCTagInfo{\n\t\t\tFullMethodName: method, FailFast: cs.callInfo.failFast,\n\t\t\tNameResolutionDelay: cs.nameResolutionDelay,\n\t\t})\n\t\tsh.HandleRPC(ctx, &stats.Begin{\n\t\t\tClient:                    true,\n\t\t\tBeginTime:                 beginTime,\n\t\t\tFailFast:                  cs.callInfo.failFast,\n\t\t\tIsClientStream:            cs.desc.ClientStreams,\n\t\t\tIsServerStream:            cs.desc.ServerStreams,\n\t\t\tIsTransparentRetryAttempt: isTransparent,\n\t\t})\n\t}\n\n\tvar trInfo *traceInfo\n\tif EnableTracing {\n\t\ttrInfo = &traceInfo{\n\t\t\ttr: newTrace(\"grpc.Sent.\"+methodFamily(method), method),\n\t\t\tfirstLine: firstLine{\n\t\t\t\tclient: true,\n\t\t\t},\n\t\t}\n\t\tif deadline, ok := ctx.Deadline(); ok {\n\t\t\ttrInfo.firstLine.deadline = time.Until(deadline)\n\t\t}\n\t\ttrInfo.tr.LazyLog(&trInfo.firstLine, false)\n\t\tctx = newTraceContext(ctx, trInfo.tr)\n\t}\n\n\tif cs.cc.parsedTarget.URL.Scheme == internal.GRPCResolverSchemeExtraMetadata {\n\t\t// Add extra metadata (metadata that will be added by transport) to context\n\t\t// so the balancer can see them.\n\t\tctx = grpcutil.WithExtraMetadata(ctx, metadata.Pairs(\n\t\t\t\"content-type\", grpcutil.ContentType(cs.callHdr.ContentSubtype),\n\t\t))\n\t}\n\n\treturn &csAttempt{\n\t\tctx:            ctx,\n\t\tbeginTime:      beginTime,\n\t\tcs:             cs,\n\t\tdecompressorV0: cs.cc.dopts.dc,\n\t\tstatsHandler:   sh,\n\t\ttrInfo:         trInfo,\n\t}, nil\n}\n\nfunc (a *csAttempt) getTransport() error {\n\tcs := a.cs\n\n\tpickInfo := balancer.PickInfo{Ctx: a.ctx, FullMethodName: cs.callHdr.Method}\n\tpick, err := cs.cc.pickerWrapper.pick(a.ctx, cs.callInfo.failFast, pickInfo)\n\ta.transport, a.pickResult = pick.transport, pick.result\n\tif err != nil {\n\t\tif de, ok := err.(dropError); ok {\n\t\t\terr = de.error\n\t\t\ta.drop = true\n\t\t}\n\t\treturn err\n\t}\n\tif a.trInfo != nil {\n\t\ta.trInfo.firstLine.SetRemoteAddr(a.transport.Peer().Addr)\n\t}\n\tif pick.blocked && a.statsHandler != nil {\n\t\ta.statsHandler.HandleRPC(a.ctx, &stats.DelayedPickComplete{})\n\t}\n\treturn nil\n}\n\nfunc (a *csAttempt) newStream() error {\n\tcs := a.cs\n\tcs.callHdr.PreviousAttempts = cs.numRetries\n\n\t// Merge metadata stored in PickResult, if any, with existing call metadata.\n\t// It is safe to overwrite the csAttempt's context here, since all state\n\t// maintained in it are local to the attempt. When the attempt has to be\n\t// retried, a new instance of csAttempt will be created.\n\tif a.pickResult.Metadata != nil {\n\t\t// We currently do not have a function it the metadata package which\n\t\t// merges given metadata with existing metadata in a context. Existing\n\t\t// function `AppendToOutgoingContext()` takes a variadic argument of key\n\t\t// value pairs.\n\t\t//\n\t\t// TODO: Make it possible to retrieve key value pairs from metadata.MD\n\t\t// in a form passable to AppendToOutgoingContext(), or create a version\n\t\t// of AppendToOutgoingContext() that accepts a metadata.MD.\n\t\tmd, _ := metadata.FromOutgoingContext(a.ctx)\n\t\tmd = metadata.Join(md, a.pickResult.Metadata)\n\t\ta.ctx = metadata.NewOutgoingContext(a.ctx, md)\n\t}\n\n\ts, err := a.transport.NewStream(a.ctx, cs.callHdr)\n\tif err != nil {\n\t\tnse, ok := err.(*transport.NewStreamError)\n\t\tif !ok {\n\t\t\t// Unexpected.\n\t\t\treturn err\n\t\t}\n\n\t\tif nse.AllowTransparentRetry {\n\t\t\ta.allowTransparentRetry = true\n\t\t}\n\n\t\t// Unwrap and convert error.\n\t\treturn toRPCErr(nse.Err)\n\t}\n\ta.transportStream = s\n\ta.ctx = s.Context()\n\ta.parser = parser{r: s, bufferPool: a.cs.cc.dopts.copts.BufferPool}\n\treturn nil\n}\n\n// clientStream implements a client side Stream.\ntype clientStream struct {\n\tcallHdr  *transport.CallHdr\n\topts     []CallOption\n\tcallInfo *callInfo\n\tcc       *ClientConn\n\tdesc     *StreamDesc\n\n\tcodec        baseCodec\n\tcompressorV0 Compressor\n\tcompressorV1 encoding.Compressor\n\n\tcancel context.CancelFunc // cancels all attempts\n\n\tsentLast bool // sent an end stream\n\n\treceivedFirstMsg bool // set after the first message is received\n\n\tmethodConfig *MethodConfig\n\n\tctx context.Context // the application's context, wrapped by stats/tracing\n\n\tretryThrottler *retryThrottler // The throttler active when the RPC began.\n\n\tbinlogs []binarylog.MethodLogger\n\t// serverHeaderBinlogged is a boolean for whether server header has been\n\t// logged. Server header will be logged when the first time one of those\n\t// happens: stream.Header(), stream.Recv().\n\t//\n\t// It's only read and used by Recv() and Header(), so it doesn't need to be\n\t// synchronized.\n\tserverHeaderBinlogged bool\n\n\tmu                      sync.Mutex\n\tfirstAttempt            bool // if true, transparent retry is valid\n\tnumRetries              int  // exclusive of transparent retry attempt(s)\n\tnumRetriesSincePushback int  // retries since pushback; to reset backoff\n\tfinished                bool // TODO: replace with atomic cmpxchg or sync.Once?\n\t// attempt is the active client stream attempt.\n\t// The only place where it is written is the newAttemptLocked method and this method never writes nil.\n\t// So, attempt can be nil only inside newClientStream function when clientStream is first created.\n\t// One of the first things done after clientStream's creation, is to call newAttemptLocked which either\n\t// assigns a non nil value to the attempt or returns an error. If an error is returned from newAttemptLocked,\n\t// then newClientStream calls finish on the clientStream and returns. So, finish method is the only\n\t// place where we need to check if the attempt is nil.\n\tattempt *csAttempt\n\t// TODO(hedging): hedging will have multiple attempts simultaneously.\n\tcommitted        bool // active attempt committed for retry?\n\tonCommit         func()\n\treplayBuffer     []replayOp // operations to replay on retry\n\treplayBufferSize int        // current size of replayBuffer\n\t// nameResolutionDelay indicates if there was a delay in the name resolution.\n\t// This field is only valid on client side, it's always false on server side.\n\tnameResolutionDelay bool\n}\n\ntype replayOp struct {\n\top      func(a *csAttempt) error\n\tcleanup func()\n}\n\n// csAttempt implements a single transport stream attempt within a\n// clientStream.\ntype csAttempt struct {\n\tctx             context.Context\n\tcs              *clientStream\n\ttransport       transport.ClientTransport\n\ttransportStream *transport.ClientStream\n\tparser          parser\n\tpickResult      balancer.PickResult\n\n\tfinished        bool\n\tdecompressorV0  Decompressor\n\tdecompressorV1  encoding.Compressor\n\tdecompressorSet bool\n\n\tmu sync.Mutex // guards trInfo.tr\n\t// trInfo may be nil (if EnableTracing is false).\n\t// trInfo.tr is set when created (if EnableTracing is true),\n\t// and cleared when the finish method is called.\n\ttrInfo *traceInfo\n\n\tstatsHandler stats.Handler\n\tbeginTime    time.Time\n\n\t// set for newStream errors that may be transparently retried\n\tallowTransparentRetry bool\n\t// set for pick errors that are returned as a status\n\tdrop bool\n}\n\nfunc (cs *clientStream) commitAttemptLocked() {\n\tif !cs.committed && cs.onCommit != nil {\n\t\tcs.onCommit()\n\t}\n\tcs.committed = true\n\tfor _, op := range cs.replayBuffer {\n\t\tif op.cleanup != nil {\n\t\t\top.cleanup()\n\t\t}\n\t}\n\tcs.replayBuffer = nil\n}\n\nfunc (cs *clientStream) commitAttempt() {\n\tcs.mu.Lock()\n\tcs.commitAttemptLocked()\n\tcs.mu.Unlock()\n}\n\n// shouldRetry returns nil if the RPC should be retried; otherwise it returns\n// the error that should be returned by the operation.  If the RPC should be\n// retried, the bool indicates whether it is being retried transparently.\nfunc (a *csAttempt) shouldRetry(err error) (bool, error) {\n\tcs := a.cs\n\n\tif cs.finished || cs.committed || a.drop {\n\t\t// RPC is finished or committed or was dropped by the picker; cannot retry.\n\t\treturn false, err\n\t}\n\tif a.transportStream == nil && a.allowTransparentRetry {\n\t\treturn true, nil\n\t}\n\t// Wait for the trailers.\n\tunprocessed := false\n\tif a.transportStream != nil {\n\t\t<-a.transportStream.Done()\n\t\tunprocessed = a.transportStream.Unprocessed()\n\t}\n\tif cs.firstAttempt && unprocessed {\n\t\t// First attempt, stream unprocessed: transparently retry.\n\t\treturn true, nil\n\t}\n\tif cs.cc.dopts.disableRetry {\n\t\treturn false, err\n\t}\n\n\tpushback := 0\n\thasPushback := false\n\tif a.transportStream != nil {\n\t\tif !a.transportStream.TrailersOnly() {\n\t\t\treturn false, err\n\t\t}\n\n\t\t// TODO(retry): Move down if the spec changes to not check server pushback\n\t\t// before considering this a failure for throttling.\n\t\tsps := a.transportStream.Trailer()[\"grpc-retry-pushback-ms\"]\n\t\tif len(sps) == 1 {\n\t\t\tvar e error\n\t\t\tif pushback, e = strconv.Atoi(sps[0]); e != nil || pushback < 0 {\n\t\t\t\tchannelz.Infof(logger, cs.cc.channelz, \"Server retry pushback specified to abort (%q).\", sps[0])\n\t\t\t\tcs.retryThrottler.throttle() // This counts as a failure for throttling.\n\t\t\t\treturn false, err\n\t\t\t}\n\t\t\thasPushback = true\n\t\t} else if len(sps) > 1 {\n\t\t\tchannelz.Warningf(logger, cs.cc.channelz, \"Server retry pushback specified multiple values (%q); not retrying.\", sps)\n\t\t\tcs.retryThrottler.throttle() // This counts as a failure for throttling.\n\t\t\treturn false, err\n\t\t}\n\t}\n\n\tvar code codes.Code\n\tif a.transportStream != nil {\n\t\tcode = a.transportStream.Status().Code()\n\t} else {\n\t\tcode = status.Code(err)\n\t}\n\n\trp := cs.methodConfig.RetryPolicy\n\tif rp == nil || !rp.RetryableStatusCodes[code] {\n\t\treturn false, err\n\t}\n\n\t// Note: the ordering here is important; we count this as a failure\n\t// only if the code matched a retryable code.\n\tif cs.retryThrottler.throttle() {\n\t\treturn false, err\n\t}\n\tif cs.numRetries+1 >= rp.MaxAttempts {\n\t\treturn false, err\n\t}\n\n\tvar dur time.Duration\n\tif hasPushback {\n\t\tdur = time.Millisecond * time.Duration(pushback)\n\t\tcs.numRetriesSincePushback = 0\n\t} else {\n\t\tfact := math.Pow(rp.BackoffMultiplier, float64(cs.numRetriesSincePushback))\n\t\tcur := min(float64(rp.InitialBackoff)*fact, float64(rp.MaxBackoff))\n\t\t// Apply jitter by multiplying with a random factor between 0.8 and 1.2\n\t\tcur *= 0.8 + 0.4*rand.Float64()\n\t\tdur = time.Duration(int64(cur))\n\t\tcs.numRetriesSincePushback++\n\t}\n\n\t// TODO(dfawley): we could eagerly fail here if dur puts us past the\n\t// deadline, but unsure if it is worth doing.\n\tt := time.NewTimer(dur)\n\tselect {\n\tcase <-t.C:\n\t\tcs.numRetries++\n\t\treturn false, nil\n\tcase <-cs.ctx.Done():\n\t\tt.Stop()\n\t\treturn false, status.FromContextError(cs.ctx.Err()).Err()\n\t}\n}\n\n// Returns nil if a retry was performed and succeeded; error otherwise.\nfunc (cs *clientStream) retryLocked(attempt *csAttempt, lastErr error) error {\n\tfor {\n\t\tattempt.finish(toRPCErr(lastErr))\n\t\tisTransparent, err := attempt.shouldRetry(lastErr)\n\t\tif err != nil {\n\t\t\tcs.commitAttemptLocked()\n\t\t\treturn err\n\t\t}\n\t\tcs.firstAttempt = false\n\t\tattempt, err = cs.newAttemptLocked(isTransparent)\n\t\tif err != nil {\n\t\t\t// Only returns error if the clientconn is closed or the context of\n\t\t\t// the stream is canceled.\n\t\t\treturn err\n\t\t}\n\t\t// Note that the first op in replayBuffer always sets cs.attempt\n\t\t// if it is able to pick a transport and create a stream.\n\t\tif lastErr = cs.replayBufferLocked(attempt); lastErr == nil {\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\nfunc (cs *clientStream) Context() context.Context {\n\tcs.commitAttempt()\n\t// No need to lock before using attempt, since we know it is committed and\n\t// cannot change.\n\tif cs.attempt.transportStream != nil {\n\t\treturn cs.attempt.transportStream.Context()\n\t}\n\treturn cs.ctx\n}\n\nfunc (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) error {\n\tcs.mu.Lock()\n\tfor {\n\t\tif cs.committed {\n\t\t\tcs.mu.Unlock()\n\t\t\t// toRPCErr is used in case the error from the attempt comes from\n\t\t\t// NewClientStream, which intentionally doesn't return a status\n\t\t\t// error to allow for further inspection; all other errors should\n\t\t\t// already be status errors.\n\t\t\treturn toRPCErr(op(cs.attempt))\n\t\t}\n\t\tif len(cs.replayBuffer) == 0 {\n\t\t\t// For the first op, which controls creation of the stream and\n\t\t\t// assigns cs.attempt, we need to create a new attempt inline\n\t\t\t// before executing the first op.  On subsequent ops, the attempt\n\t\t\t// is created immediately before replaying the ops.\n\t\t\tvar err error\n\t\t\tif cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */); err != nil {\n\t\t\t\tcs.mu.Unlock()\n\t\t\t\tcs.finish(err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\ta := cs.attempt\n\t\tcs.mu.Unlock()\n\t\terr := op(a)\n\t\tcs.mu.Lock()\n\t\tif a != cs.attempt {\n\t\t\t// We started another attempt already.\n\t\t\tcontinue\n\t\t}\n\t\tif err == io.EOF {\n\t\t\t<-a.transportStream.Done()\n\t\t}\n\t\tif err == nil || (err == io.EOF && a.transportStream.Status().Code() == codes.OK) {\n\t\t\tonSuccess()\n\t\t\tcs.mu.Unlock()\n\t\t\treturn err\n\t\t}\n\t\tif err := cs.retryLocked(a, err); err != nil {\n\t\t\tcs.mu.Unlock()\n\t\t\treturn err\n\t\t}\n\t}\n}\n\nfunc (cs *clientStream) Header() (metadata.MD, error) {\n\tvar m metadata.MD\n\terr := cs.withRetry(func(a *csAttempt) error {\n\t\tvar err error\n\t\tm, err = a.transportStream.Header()\n\t\treturn toRPCErr(err)\n\t}, cs.commitAttemptLocked)\n\n\tif m == nil && err == nil {\n\t\t// The stream ended with success.  Finish the clientStream.\n\t\terr = io.EOF\n\t}\n\n\tif err != nil {\n\t\tcs.finish(err)\n\t\t// Do not return the error.  The user should get it by calling Recv().\n\t\treturn nil, nil\n\t}\n\n\tif len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && m != nil {\n\t\t// Only log if binary log is on and header has not been logged, and\n\t\t// there is actually headers to log.\n\t\tlogEntry := &binarylog.ServerHeader{\n\t\t\tOnClientSide: true,\n\t\t\tHeader:       m,\n\t\t\tPeerAddr:     nil,\n\t\t}\n\t\tif peer, ok := peer.FromContext(cs.Context()); ok {\n\t\t\tlogEntry.PeerAddr = peer.Addr\n\t\t}\n\t\tcs.serverHeaderBinlogged = true\n\t\tfor _, binlog := range cs.binlogs {\n\t\t\tbinlog.Log(cs.ctx, logEntry)\n\t\t}\n\t}\n\n\treturn m, nil\n}\n\nfunc (cs *clientStream) Trailer() metadata.MD {\n\t// On RPC failure, we never need to retry, because usage requires that\n\t// RecvMsg() returned a non-nil error before calling this function is valid.\n\t// We would have retried earlier if necessary.\n\t//\n\t// Commit the attempt anyway, just in case users are not following those\n\t// directions -- it will prevent races and should not meaningfully impact\n\t// performance.\n\tcs.commitAttempt()\n\tif cs.attempt.transportStream == nil {\n\t\treturn nil\n\t}\n\treturn cs.attempt.transportStream.Trailer()\n}\n\nfunc (cs *clientStream) replayBufferLocked(attempt *csAttempt) error {\n\tfor _, f := range cs.replayBuffer {\n\t\tif err := f.op(attempt); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (cs *clientStream) bufferForRetryLocked(sz int, op func(a *csAttempt) error, cleanup func()) {\n\t// Note: we still will buffer if retry is disabled (for transparent retries).\n\tif cs.committed {\n\t\treturn\n\t}\n\tcs.replayBufferSize += sz\n\tif cs.replayBufferSize > cs.callInfo.maxRetryRPCBufferSize {\n\t\tcs.commitAttemptLocked()\n\t\tcleanup()\n\t\treturn\n\t}\n\tcs.replayBuffer = append(cs.replayBuffer, replayOp{op: op, cleanup: cleanup})\n}\n\nfunc (cs *clientStream) SendMsg(m any) (err error) {\n\tdefer func() {\n\t\tif err != nil && err != io.EOF {\n\t\t\t// Call finish on the client stream for errors generated by this SendMsg\n\t\t\t// call, as these indicate problems created by this client.  (Transport\n\t\t\t// errors are converted to an io.EOF error in csAttempt.sendMsg; the real\n\t\t\t// error will be returned from RecvMsg eventually in that case, or be\n\t\t\t// retried.)\n\t\t\tcs.finish(err)\n\t\t}\n\t}()\n\tif cs.sentLast {\n\t\treturn status.Errorf(codes.Internal, \"SendMsg called after CloseSend\")\n\t}\n\tif !cs.desc.ClientStreams {\n\t\tcs.sentLast = true\n\t}\n\n\t// load hdr, payload, data\n\thdr, data, payload, pf, err := prepareMsg(m, cs.codec, cs.compressorV0, cs.compressorV1, cs.cc.dopts.copts.BufferPool)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\tdata.Free()\n\t\t// only free payload if compression was made, and therefore it is a different set\n\t\t// of buffers from data.\n\t\tif pf.isCompressed() {\n\t\t\tpayload.Free()\n\t\t}\n\t}()\n\n\tdataLen := data.Len()\n\tpayloadLen := payload.Len()\n\t// TODO(dfawley): should we be checking len(data) instead?\n\tif payloadLen > *cs.callInfo.maxSendMessageSize {\n\t\treturn status.Errorf(codes.ResourceExhausted, \"trying to send message larger than max (%d vs. %d)\", payloadLen, *cs.callInfo.maxSendMessageSize)\n\t}\n\n\t// always take an extra ref in case data == payload (i.e. when the data isn't\n\t// compressed). The original ref will always be freed by the deferred free above.\n\tpayload.Ref()\n\top := func(a *csAttempt) error {\n\t\treturn a.sendMsg(m, hdr, payload, dataLen, payloadLen)\n\t}\n\n\t// onSuccess is invoked when the op is captured for a subsequent retry. If the\n\t// stream was established by a previous message and therefore retries are\n\t// disabled, onSuccess will not be invoked, and payloadRef can be freed\n\t// immediately.\n\tonSuccessCalled := false\n\terr = cs.withRetry(op, func() {\n\t\tcs.bufferForRetryLocked(len(hdr)+payloadLen, op, payload.Free)\n\t\tonSuccessCalled = true\n\t})\n\tif !onSuccessCalled {\n\t\tpayload.Free()\n\t}\n\tif len(cs.binlogs) != 0 && err == nil {\n\t\tcm := &binarylog.ClientMessage{\n\t\t\tOnClientSide: true,\n\t\t\tMessage:      data.Materialize(),\n\t\t}\n\t\tfor _, binlog := range cs.binlogs {\n\t\t\tbinlog.Log(cs.ctx, cm)\n\t\t}\n\t}\n\treturn err\n}\n\nfunc (cs *clientStream) RecvMsg(m any) error {\n\tif len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged {\n\t\t// Call Header() to binary log header if it's not already logged.\n\t\tcs.Header()\n\t}\n\tvar recvInfo *payloadInfo\n\tif len(cs.binlogs) != 0 {\n\t\trecvInfo = &payloadInfo{}\n\t\tdefer recvInfo.free()\n\t}\n\terr := cs.withRetry(func(a *csAttempt) error {\n\t\treturn a.recvMsg(m, recvInfo)\n\t}, cs.commitAttemptLocked)\n\tif len(cs.binlogs) != 0 && err == nil {\n\t\tsm := &binarylog.ServerMessage{\n\t\t\tOnClientSide: true,\n\t\t\tMessage:      recvInfo.uncompressedBytes.Materialize(),\n\t\t}\n\t\tfor _, binlog := range cs.binlogs {\n\t\t\tbinlog.Log(cs.ctx, sm)\n\t\t}\n\t}\n\tif err != nil || !cs.desc.ServerStreams {\n\t\t// err != nil or non-server-streaming indicates end of stream.\n\t\tcs.finish(err)\n\t}\n\treturn err\n}\n\nfunc (cs *clientStream) CloseSend() error {\n\tif cs.sentLast {\n\t\t// Return a nil error on repeated calls to this method.\n\t\treturn nil\n\t}\n\tcs.sentLast = true\n\top := func(a *csAttempt) error {\n\t\ta.transportStream.Write(nil, nil, &transport.WriteOptions{Last: true})\n\t\t// Always return nil; io.EOF is the only error that might make sense\n\t\t// instead, but there is no need to signal the client to call RecvMsg\n\t\t// as the only use left for the stream after CloseSend is to call\n\t\t// RecvMsg.  This also matches historical behavior.\n\t\treturn nil\n\t}\n\tcs.withRetry(op, func() { cs.bufferForRetryLocked(0, op, nil) })\n\tif len(cs.binlogs) != 0 {\n\t\tchc := &binarylog.ClientHalfClose{\n\t\t\tOnClientSide: true,\n\t\t}\n\t\tfor _, binlog := range cs.binlogs {\n\t\t\tbinlog.Log(cs.ctx, chc)\n\t\t}\n\t}\n\t// We don't return an error here as we expect users to read all messages\n\t// from the stream and get the RPC status from RecvMsg().  Note that\n\t// SendMsg() must return an error when one occurs so the application\n\t// knows to stop sending messages, but that does not apply here.\n\treturn nil\n}\n\nfunc (cs *clientStream) finish(err error) {\n\tif err == io.EOF {\n\t\t// Ending a stream with EOF indicates a success.\n\t\terr = nil\n\t}\n\tcs.mu.Lock()\n\tif cs.finished {\n\t\tcs.mu.Unlock()\n\t\treturn\n\t}\n\tcs.finished = true\n\tcs.commitAttemptLocked()\n\tif cs.attempt != nil {\n\t\tcs.attempt.finish(err)\n\t\t// after functions all rely upon having a stream.\n\t\tif cs.attempt.transportStream != nil {\n\t\t\tfor _, o := range cs.opts {\n\t\t\t\to.after(cs.callInfo, cs.attempt)\n\t\t\t}\n\t\t}\n\t}\n\n\tcs.mu.Unlock()\n\t// Only one of cancel or trailer needs to be logged.\n\tif len(cs.binlogs) != 0 {\n\t\tswitch err {\n\t\tcase errContextCanceled, errContextDeadline, ErrClientConnClosing:\n\t\t\tc := &binarylog.Cancel{\n\t\t\t\tOnClientSide: true,\n\t\t\t}\n\t\t\tfor _, binlog := range cs.binlogs {\n\t\t\t\tbinlog.Log(cs.ctx, c)\n\t\t\t}\n\t\tdefault:\n\t\t\tlogEntry := &binarylog.ServerTrailer{\n\t\t\t\tOnClientSide: true,\n\t\t\t\tTrailer:      cs.Trailer(),\n\t\t\t\tErr:          err,\n\t\t\t}\n\t\t\tif peer, ok := peer.FromContext(cs.Context()); ok {\n\t\t\t\tlogEntry.PeerAddr = peer.Addr\n\t\t\t}\n\t\t\tfor _, binlog := range cs.binlogs {\n\t\t\t\tbinlog.Log(cs.ctx, logEntry)\n\t\t\t}\n\t\t}\n\t}\n\tif err == nil {\n\t\tcs.retryThrottler.successfulRPC()\n\t}\n\tendOfClientStream(cs.cc, err, cs.opts...)\n\tcs.cancel()\n}\n\nfunc (a *csAttempt) sendMsg(m any, hdr []byte, payld mem.BufferSlice, dataLength, payloadLength int) error {\n\tcs := a.cs\n\tif a.trInfo != nil {\n\t\ta.mu.Lock()\n\t\tif a.trInfo.tr != nil {\n\t\t\ta.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true)\n\t\t}\n\t\ta.mu.Unlock()\n\t}\n\tif err := a.transportStream.Write(hdr, payld, &transport.WriteOptions{Last: !cs.desc.ClientStreams}); err != nil {\n\t\tif !cs.desc.ClientStreams {\n\t\t\t// For non-client-streaming RPCs, we return nil instead of EOF on error\n\t\t\t// because the generated code requires it.  finish is not called; RecvMsg()\n\t\t\t// will call it with the stream's status independently.\n\t\t\treturn nil\n\t\t}\n\t\treturn io.EOF\n\t}\n\tif a.statsHandler != nil {\n\t\ta.statsHandler.HandleRPC(a.ctx, outPayload(true, m, dataLength, payloadLength, time.Now()))\n\t}\n\treturn nil\n}\n\nfunc (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) {\n\tcs := a.cs\n\tif a.statsHandler != nil && payInfo == nil {\n\t\tpayInfo = &payloadInfo{}\n\t\tdefer payInfo.free()\n\t}\n\n\tif !a.decompressorSet {\n\t\t// Block until we receive headers containing received message encoding.\n\t\tif ct := a.transportStream.RecvCompress(); ct != \"\" && ct != encoding.Identity {\n\t\t\tif a.decompressorV0 == nil || a.decompressorV0.Type() != ct {\n\t\t\t\t// No configured decompressor, or it does not match the incoming\n\t\t\t\t// message encoding; attempt to find a registered compressor that does.\n\t\t\t\ta.decompressorV0 = nil\n\t\t\t\ta.decompressorV1 = encoding.GetCompressor(ct)\n\t\t\t}\n\t\t\t// Validate that the compression method is acceptable for this call.\n\t\t\tif !acceptedCompressorAllows(cs.callInfo.acceptedResponseCompressors, ct) {\n\t\t\t\treturn status.Errorf(codes.Internal, \"grpc: peer compressed the response with %q which is not allowed by AcceptCompressors\", ct)\n\t\t\t}\n\t\t} else {\n\t\t\t// No compression is used; disable our decompressor.\n\t\t\ta.decompressorV0 = nil\n\t\t}\n\t\t// Only initialize this state once per stream.\n\t\ta.decompressorSet = true\n\t}\n\tif err := recv(&a.parser, cs.codec, a.transportStream, a.decompressorV0, m, *cs.callInfo.maxReceiveMessageSize, payInfo, a.decompressorV1, false); err != nil {\n\t\tif err == io.EOF {\n\t\t\tif statusErr := a.transportStream.Status().Err(); statusErr != nil {\n\t\t\t\treturn statusErr\n\t\t\t}\n\t\t\t// Received no msg and status OK for non-server streaming rpcs.\n\t\t\tif !cs.desc.ServerStreams && !cs.receivedFirstMsg {\n\t\t\t\treturn status.Error(codes.Internal, \"cardinality violation: received no response message from non-server-streaming RPC\")\n\t\t\t}\n\t\t\treturn io.EOF // indicates successful end of stream.\n\t\t}\n\n\t\treturn toRPCErr(err)\n\t}\n\tcs.receivedFirstMsg = true\n\tif a.trInfo != nil {\n\t\ta.mu.Lock()\n\t\tif a.trInfo.tr != nil {\n\t\t\ta.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true)\n\t\t}\n\t\ta.mu.Unlock()\n\t}\n\tif a.statsHandler != nil {\n\t\ta.statsHandler.HandleRPC(a.ctx, &stats.InPayload{\n\t\t\tClient:           true,\n\t\t\tRecvTime:         time.Now(),\n\t\t\tPayload:          m,\n\t\t\tWireLength:       payInfo.compressedLength + headerLen,\n\t\t\tCompressedLength: payInfo.compressedLength,\n\t\t\tLength:           payInfo.uncompressedBytes.Len(),\n\t\t})\n\t}\n\tif cs.desc.ServerStreams {\n\t\t// Subsequent messages should be received by subsequent RecvMsg calls.\n\t\treturn nil\n\t}\n\t// Special handling for non-server-stream rpcs.\n\t// This recv expects EOF or errors, so we don't collect inPayload.\n\tif err := recv(&a.parser, cs.codec, a.transportStream, a.decompressorV0, m, *cs.callInfo.maxReceiveMessageSize, nil, a.decompressorV1, false); err == io.EOF {\n\t\treturn a.transportStream.Status().Err() // non-server streaming Recv returns nil on success\n\t} else if err != nil {\n\t\treturn toRPCErr(err)\n\t}\n\treturn status.Error(codes.Internal, \"cardinality violation: expected <EOF> for non server-streaming RPCs, but received another message\")\n}\n\nfunc (a *csAttempt) finish(err error) {\n\ta.mu.Lock()\n\tif a.finished {\n\t\ta.mu.Unlock()\n\t\treturn\n\t}\n\ta.finished = true\n\tif err == io.EOF {\n\t\t// Ending a stream with EOF indicates a success.\n\t\terr = nil\n\t}\n\tvar tr metadata.MD\n\tif a.transportStream != nil {\n\t\ta.transportStream.Close(err)\n\t\ttr = a.transportStream.Trailer()\n\t}\n\n\tif a.pickResult.Done != nil {\n\t\tbr := false\n\t\tif a.transportStream != nil {\n\t\t\tbr = a.transportStream.BytesReceived()\n\t\t}\n\t\ta.pickResult.Done(balancer.DoneInfo{\n\t\t\tErr:           err,\n\t\t\tTrailer:       tr,\n\t\t\tBytesSent:     a.transportStream != nil,\n\t\t\tBytesReceived: br,\n\t\t\tServerLoad:    balancerload.Parse(tr),\n\t\t})\n\t}\n\tif a.statsHandler != nil {\n\t\ta.statsHandler.HandleRPC(a.ctx, &stats.End{\n\t\t\tClient:    true,\n\t\t\tBeginTime: a.beginTime,\n\t\t\tEndTime:   time.Now(),\n\t\t\tTrailer:   tr,\n\t\t\tError:     err,\n\t\t})\n\t}\n\tif a.trInfo != nil && a.trInfo.tr != nil {\n\t\tif err == nil {\n\t\t\ta.trInfo.tr.LazyPrintf(\"RPC: [OK]\")\n\t\t} else {\n\t\t\ta.trInfo.tr.LazyPrintf(\"RPC: [%v]\", err)\n\t\t\ta.trInfo.tr.SetError()\n\t\t}\n\t\ta.trInfo.tr.Finish()\n\t\ta.trInfo.tr = nil\n\t}\n\ta.mu.Unlock()\n}\n\n// newNonRetryClientStream creates a ClientStream with the specified transport, on the\n// given addrConn.\n//\n// It's expected that the given transport is either the same one in addrConn, or\n// is already closed. To avoid race, transport is specified separately, instead\n// of using ac.transport.\n//\n// Main difference between this and ClientConn.NewStream:\n// - no retry\n// - no service config (or wait for service config)\n// - no tracing or stats\nfunc newNonRetryClientStream(ctx context.Context, desc *StreamDesc, method string, t transport.ClientTransport, ac *addrConn, opts ...CallOption) (_ ClientStream, err error) {\n\tif t == nil {\n\t\t// TODO: return RPC error here?\n\t\treturn nil, errors.New(\"transport provided is nil\")\n\t}\n\t// defaultCallInfo contains unnecessary info(i.e. failfast, maxRetryRPCBufferSize), so we just initialize an empty struct.\n\tc := &callInfo{}\n\n\t// Possible context leak:\n\t// The cancel function for the child context we create will only be called\n\t// when RecvMsg returns a non-nil error, if the ClientConn is closed, or if\n\t// an error is generated by SendMsg.\n\t// https://github.com/grpc/grpc-go/issues/1818.\n\tctx, cancel := context.WithCancel(ctx)\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tcancel()\n\t\t}\n\t}()\n\n\tfor _, o := range opts {\n\t\tif err := o.before(c); err != nil {\n\t\t\treturn nil, toRPCErr(err)\n\t\t}\n\t}\n\tc.maxReceiveMessageSize = getMaxSize(nil, c.maxReceiveMessageSize, defaultClientMaxReceiveMessageSize)\n\tc.maxSendMessageSize = getMaxSize(nil, c.maxSendMessageSize, defaultServerMaxSendMessageSize)\n\tif err := setCallInfoCodec(c); err != nil {\n\t\treturn nil, err\n\t}\n\n\tcallHdr := &transport.CallHdr{\n\t\tHost:           ac.cc.authority,\n\t\tMethod:         method,\n\t\tContentSubtype: c.contentSubtype,\n\t}\n\n\t// Set our outgoing compression according to the UseCompressor CallOption, if\n\t// set.  In that case, also find the compressor from the encoding package.\n\t// Otherwise, use the compressor configured by the WithCompressor DialOption,\n\t// if set.\n\tvar cp Compressor\n\tvar comp encoding.Compressor\n\tif ct := c.compressorName; ct != \"\" {\n\t\tcallHdr.SendCompress = ct\n\t\tif ct != encoding.Identity {\n\t\t\tcomp = encoding.GetCompressor(ct)\n\t\t\tif comp == nil {\n\t\t\t\treturn nil, status.Errorf(codes.Internal, \"grpc: Compressor is not installed for requested grpc-encoding %q\", ct)\n\t\t\t}\n\t\t}\n\t} else if ac.cc.dopts.compressorV0 != nil {\n\t\tcallHdr.SendCompress = ac.cc.dopts.compressorV0.Type()\n\t\tcp = ac.cc.dopts.compressorV0\n\t}\n\tif c.creds != nil {\n\t\tcallHdr.Creds = c.creds\n\t}\n\n\t// Use a special addrConnStream to avoid retry.\n\tas := &addrConnStream{\n\t\tcallHdr:          callHdr,\n\t\tac:               ac,\n\t\tctx:              ctx,\n\t\tcancel:           cancel,\n\t\topts:             opts,\n\t\tcallInfo:         c,\n\t\tdesc:             desc,\n\t\tcodec:            c.codec,\n\t\tsendCompressorV0: cp,\n\t\tsendCompressorV1: comp,\n\t\ttransport:        t,\n\t}\n\n\ts, err := as.transport.NewStream(as.ctx, as.callHdr)\n\tif err != nil {\n\t\terr = toRPCErr(err)\n\t\treturn nil, err\n\t}\n\tas.transportStream = s\n\tas.parser = parser{r: s, bufferPool: ac.dopts.copts.BufferPool}\n\tac.incrCallsStarted()\n\tif desc != unaryStreamDesc {\n\t\t// Listen on stream context to cleanup when the stream context is\n\t\t// canceled.  Also listen for the addrConn's context in case the\n\t\t// addrConn is closed or reconnects to a different address.  In all\n\t\t// other cases, an error should already be injected into the recv\n\t\t// buffer by the transport, which the client will eventually receive,\n\t\t// and then we will cancel the stream's context in\n\t\t// addrConnStream.finish.\n\t\tgo func() {\n\t\t\tac.mu.Lock()\n\t\t\tacCtx := ac.ctx\n\t\t\tac.mu.Unlock()\n\t\t\tselect {\n\t\t\tcase <-acCtx.Done():\n\t\t\t\tas.finish(status.Error(codes.Canceled, \"grpc: the SubConn is closing\"))\n\t\t\tcase <-ctx.Done():\n\t\t\t\tas.finish(toRPCErr(ctx.Err()))\n\t\t\t}\n\t\t}()\n\t}\n\treturn as, nil\n}\n\ntype addrConnStream struct {\n\ttransportStream  *transport.ClientStream\n\tac               *addrConn\n\tcallHdr          *transport.CallHdr\n\tcancel           context.CancelFunc\n\topts             []CallOption\n\tcallInfo         *callInfo\n\ttransport        transport.ClientTransport\n\tctx              context.Context\n\tsentLast         bool\n\treceivedFirstMsg bool\n\tdesc             *StreamDesc\n\tcodec            baseCodec\n\tsendCompressorV0 Compressor\n\tsendCompressorV1 encoding.Compressor\n\tdecompressorSet  bool\n\tdecompressorV0   Decompressor\n\tdecompressorV1   encoding.Compressor\n\tparser           parser\n\n\t// mu guards finished and is held for the entire finish method.\n\tmu       sync.Mutex\n\tfinished bool\n}\n\nfunc (as *addrConnStream) Header() (metadata.MD, error) {\n\tm, err := as.transportStream.Header()\n\tif err != nil {\n\t\tas.finish(toRPCErr(err))\n\t}\n\treturn m, err\n}\n\nfunc (as *addrConnStream) Trailer() metadata.MD {\n\treturn as.transportStream.Trailer()\n}\n\nfunc (as *addrConnStream) CloseSend() error {\n\tif as.sentLast {\n\t\t// Return a nil error on repeated calls to this method.\n\t\treturn nil\n\t}\n\tas.sentLast = true\n\n\tas.transportStream.Write(nil, nil, &transport.WriteOptions{Last: true})\n\t// Always return nil; io.EOF is the only error that might make sense\n\t// instead, but there is no need to signal the client to call RecvMsg\n\t// as the only use left for the stream after CloseSend is to call\n\t// RecvMsg.  This also matches historical behavior.\n\treturn nil\n}\n\nfunc (as *addrConnStream) Context() context.Context {\n\treturn as.transportStream.Context()\n}\n\nfunc (as *addrConnStream) SendMsg(m any) (err error) {\n\tdefer func() {\n\t\tif err != nil && err != io.EOF {\n\t\t\t// Call finish on the client stream for errors generated by this SendMsg\n\t\t\t// call, as these indicate problems created by this client.  (Transport\n\t\t\t// errors are converted to an io.EOF error in csAttempt.sendMsg; the real\n\t\t\t// error will be returned from RecvMsg eventually in that case, or be\n\t\t\t// retried.)\n\t\t\tas.finish(err)\n\t\t}\n\t}()\n\tif as.sentLast {\n\t\treturn status.Errorf(codes.Internal, \"SendMsg called after CloseSend\")\n\t}\n\tif !as.desc.ClientStreams {\n\t\tas.sentLast = true\n\t}\n\n\t// load hdr, payload, data\n\thdr, data, payload, pf, err := prepareMsg(m, as.codec, as.sendCompressorV0, as.sendCompressorV1, as.ac.dopts.copts.BufferPool)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\tdata.Free()\n\t\t// only free payload if compression was made, and therefore it is a different set\n\t\t// of buffers from data.\n\t\tif pf.isCompressed() {\n\t\t\tpayload.Free()\n\t\t}\n\t}()\n\n\t// TODO(dfawley): should we be checking len(data) instead?\n\tif payload.Len() > *as.callInfo.maxSendMessageSize {\n\t\treturn status.Errorf(codes.ResourceExhausted, \"trying to send message larger than max (%d vs. %d)\", payload.Len(), *as.callInfo.maxSendMessageSize)\n\t}\n\n\tif err := as.transportStream.Write(hdr, payload, &transport.WriteOptions{Last: !as.desc.ClientStreams}); err != nil {\n\t\tif !as.desc.ClientStreams {\n\t\t\t// For non-client-streaming RPCs, we return nil instead of EOF on error\n\t\t\t// because the generated code requires it.  finish is not called; RecvMsg()\n\t\t\t// will call it with the stream's status independently.\n\t\t\treturn nil\n\t\t}\n\t\treturn io.EOF\n\t}\n\n\treturn nil\n}\n\nfunc (as *addrConnStream) RecvMsg(m any) (err error) {\n\tdefer func() {\n\t\tif err != nil || !as.desc.ServerStreams {\n\t\t\t// err != nil or non-server-streaming indicates end of stream.\n\t\t\tas.finish(err)\n\t\t}\n\t}()\n\n\tif !as.decompressorSet {\n\t\t// Block until we receive headers containing received message encoding.\n\t\tif ct := as.transportStream.RecvCompress(); ct != \"\" && ct != encoding.Identity {\n\t\t\tif as.decompressorV0 == nil || as.decompressorV0.Type() != ct {\n\t\t\t\t// No configured decompressor, or it does not match the incoming\n\t\t\t\t// message encoding; attempt to find a registered compressor that does.\n\t\t\t\tas.decompressorV0 = nil\n\t\t\t\tas.decompressorV1 = encoding.GetCompressor(ct)\n\t\t\t}\n\t\t\t// Validate that the compression method is acceptable for this call.\n\t\t\tif !acceptedCompressorAllows(as.callInfo.acceptedResponseCompressors, ct) {\n\t\t\t\treturn status.Errorf(codes.Internal, \"grpc: peer compressed the response with %q which is not allowed by AcceptCompressors\", ct)\n\t\t\t}\n\t\t} else {\n\t\t\t// No compression is used; disable our decompressor.\n\t\t\tas.decompressorV0 = nil\n\t\t}\n\t\t// Only initialize this state once per stream.\n\t\tas.decompressorSet = true\n\t}\n\tif err := recv(&as.parser, as.codec, as.transportStream, as.decompressorV0, m, *as.callInfo.maxReceiveMessageSize, nil, as.decompressorV1, false); err != nil {\n\t\tif err == io.EOF {\n\t\t\tif statusErr := as.transportStream.Status().Err(); statusErr != nil {\n\t\t\t\treturn statusErr\n\t\t\t}\n\t\t\t// Received no msg and status OK for non-server streaming rpcs.\n\t\t\tif !as.desc.ServerStreams && !as.receivedFirstMsg {\n\t\t\t\treturn status.Error(codes.Internal, \"cardinality violation: received no response message from non-server-streaming RPC\")\n\t\t\t}\n\t\t\treturn io.EOF // indicates successful end of stream.\n\t\t}\n\t\treturn toRPCErr(err)\n\t}\n\tas.receivedFirstMsg = true\n\n\tif as.desc.ServerStreams {\n\t\t// Subsequent messages should be received by subsequent RecvMsg calls.\n\t\treturn nil\n\t}\n\n\t// Special handling for non-server-stream rpcs.\n\t// This recv expects EOF or errors, so we don't collect inPayload.\n\tif err := recv(&as.parser, as.codec, as.transportStream, as.decompressorV0, m, *as.callInfo.maxReceiveMessageSize, nil, as.decompressorV1, false); err == io.EOF {\n\t\treturn as.transportStream.Status().Err() // non-server streaming Recv returns nil on success\n\t} else if err != nil {\n\t\treturn toRPCErr(err)\n\t}\n\treturn status.Error(codes.Internal, \"cardinality violation: expected <EOF> for non server-streaming RPCs, but received another message\")\n}\n\nfunc (as *addrConnStream) finish(err error) {\n\tas.mu.Lock()\n\tif as.finished {\n\t\tas.mu.Unlock()\n\t\treturn\n\t}\n\tas.finished = true\n\tif err == io.EOF {\n\t\t// Ending a stream with EOF indicates a success.\n\t\terr = nil\n\t}\n\tif as.transportStream != nil {\n\t\tas.transportStream.Close(err)\n\t}\n\n\tif err != nil {\n\t\tas.ac.incrCallsFailed()\n\t} else {\n\t\tas.ac.incrCallsSucceeded()\n\t}\n\tas.cancel()\n\tas.mu.Unlock()\n}\n\n// ServerStream defines the server-side behavior of a streaming RPC.\n//\n// Errors returned from ServerStream methods are compatible with the status\n// package.  However, the status code will often not match the RPC status as\n// seen by the client application, and therefore, should not be relied upon for\n// this purpose.\ntype ServerStream interface {\n\t// SetHeader sets the header metadata. It may be called multiple times.\n\t// When call multiple times, all the provided metadata will be merged.\n\t// All the metadata will be sent out when one of the following happens:\n\t//  - ServerStream.SendHeader() is called;\n\t//  - The first response is sent out;\n\t//  - An RPC status is sent out (error or success).\n\tSetHeader(metadata.MD) error\n\t// SendHeader sends the header metadata.\n\t// The provided md and headers set by SetHeader() will be sent.\n\t// It fails if called multiple times.\n\tSendHeader(metadata.MD) error\n\t// SetTrailer sets the trailer metadata which will be sent with the RPC status.\n\t// When called more than once, all the provided metadata will be merged.\n\tSetTrailer(metadata.MD)\n\t// Context returns the context for this stream.\n\tContext() context.Context\n\t// SendMsg sends a message. On error, SendMsg aborts the stream and the\n\t// error is returned directly.\n\t//\n\t// SendMsg blocks until:\n\t//   - There is sufficient flow control to schedule m with the transport, or\n\t//   - The stream is done, or\n\t//   - The stream breaks.\n\t//\n\t// SendMsg does not wait until the message is received by the client. An\n\t// untimely stream closure may result in lost messages.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not safe\n\t// to call SendMsg on the same stream in different goroutines.\n\t//\n\t// It is not safe to modify the message after calling SendMsg. Tracing\n\t// libraries and stats handlers may use the message lazily.\n\tSendMsg(m any) error\n\t// RecvMsg blocks until it receives a message into m or the stream is\n\t// done. It returns io.EOF when the client has performed a CloseSend. On\n\t// any non-EOF error, the stream is aborted and the error contains the\n\t// RPC status.\n\t//\n\t// It is safe to have a goroutine calling SendMsg and another goroutine\n\t// calling RecvMsg on the same stream at the same time, but it is not\n\t// safe to call RecvMsg on the same stream in different goroutines.\n\tRecvMsg(m any) error\n}\n\n// serverStream implements a server side Stream.\ntype serverStream struct {\n\tctx   context.Context\n\ts     *transport.ServerStream\n\tp     parser\n\tcodec baseCodec\n\tdesc  *StreamDesc\n\n\tcompressorV0   Compressor\n\tcompressorV1   encoding.Compressor\n\tdecompressorV0 Decompressor\n\tdecompressorV1 encoding.Compressor\n\n\tsendCompressorName string\n\n\trecvFirstMsg bool // set after the first message is received\n\n\tmaxReceiveMessageSize int\n\tmaxSendMessageSize    int\n\ttrInfo                *traceInfo\n\n\tstatsHandler stats.Handler\n\n\tbinlogs []binarylog.MethodLogger\n\t// serverHeaderBinlogged indicates whether server header has been logged. It\n\t// will happen when one of the following two happens: stream.SendHeader(),\n\t// stream.Send().\n\t//\n\t// It's only checked in send and sendHeader, doesn't need to be\n\t// synchronized.\n\tserverHeaderBinlogged bool\n\n\tmu sync.Mutex // protects trInfo.tr after the service handler runs.\n}\n\nfunc (ss *serverStream) Context() context.Context {\n\treturn ss.ctx\n}\n\nfunc (ss *serverStream) SetHeader(md metadata.MD) error {\n\tif md.Len() == 0 {\n\t\treturn nil\n\t}\n\terr := imetadata.Validate(md)\n\tif err != nil {\n\t\treturn status.Error(codes.Internal, err.Error())\n\t}\n\treturn ss.s.SetHeader(md)\n}\n\nfunc (ss *serverStream) SendHeader(md metadata.MD) error {\n\terr := imetadata.Validate(md)\n\tif err != nil {\n\t\treturn status.Error(codes.Internal, err.Error())\n\t}\n\n\terr = ss.s.SendHeader(md)\n\tif len(ss.binlogs) != 0 && !ss.serverHeaderBinlogged {\n\t\th, _ := ss.s.Header()\n\t\tsh := &binarylog.ServerHeader{\n\t\t\tHeader: h,\n\t\t}\n\t\tss.serverHeaderBinlogged = true\n\t\tfor _, binlog := range ss.binlogs {\n\t\t\tbinlog.Log(ss.ctx, sh)\n\t\t}\n\t}\n\treturn err\n}\n\nfunc (ss *serverStream) SetTrailer(md metadata.MD) {\n\tif md.Len() == 0 {\n\t\treturn\n\t}\n\tif err := imetadata.Validate(md); err != nil {\n\t\tlogger.Errorf(\"stream: failed to validate md when setting trailer, err: %v\", err)\n\t}\n\tss.s.SetTrailer(md)\n}\n\nfunc (ss *serverStream) SendMsg(m any) (err error) {\n\tdefer func() {\n\t\tif ss.trInfo != nil {\n\t\t\tss.mu.Lock()\n\t\t\tif ss.trInfo.tr != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\tss.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true)\n\t\t\t\t} else {\n\t\t\t\t\tss.trInfo.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\t\t\tss.trInfo.tr.SetError()\n\t\t\t\t}\n\t\t\t}\n\t\t\tss.mu.Unlock()\n\t\t}\n\t\tif err != nil && err != io.EOF {\n\t\t\tst, _ := status.FromError(toRPCErr(err))\n\t\t\tss.s.WriteStatus(st)\n\t\t\t// Non-user specified status was sent out. This should be an error\n\t\t\t// case (as a server side Cancel maybe).\n\t\t\t//\n\t\t\t// This is not handled specifically now. User will return a final\n\t\t\t// status from the service handler, we will log that error instead.\n\t\t\t// This behavior is similar to an interceptor.\n\t\t}\n\t}()\n\n\t// Server handler could have set new compressor by calling SetSendCompressor.\n\t// In case it is set, we need to use it for compressing outbound message.\n\tif sendCompressorsName := ss.s.SendCompress(); sendCompressorsName != ss.sendCompressorName {\n\t\tss.compressorV1 = encoding.GetCompressor(sendCompressorsName)\n\t\tss.sendCompressorName = sendCompressorsName\n\t}\n\n\t// load hdr, payload, data\n\thdr, data, payload, pf, err := prepareMsg(m, ss.codec, ss.compressorV0, ss.compressorV1, ss.p.bufferPool)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer func() {\n\t\tdata.Free()\n\t\t// only free payload if compression was made, and therefore it is a different set\n\t\t// of buffers from data.\n\t\tif pf.isCompressed() {\n\t\t\tpayload.Free()\n\t\t}\n\t}()\n\n\tdataLen := data.Len()\n\tpayloadLen := payload.Len()\n\n\t// TODO(dfawley): should we be checking len(data) instead?\n\tif payloadLen > ss.maxSendMessageSize {\n\t\treturn status.Errorf(codes.ResourceExhausted, \"trying to send message larger than max (%d vs. %d)\", payloadLen, ss.maxSendMessageSize)\n\t}\n\tif err := ss.s.Write(hdr, payload, &transport.WriteOptions{Last: false}); err != nil {\n\t\treturn toRPCErr(err)\n\t}\n\n\tif len(ss.binlogs) != 0 {\n\t\tif !ss.serverHeaderBinlogged {\n\t\t\th, _ := ss.s.Header()\n\t\t\tsh := &binarylog.ServerHeader{\n\t\t\t\tHeader: h,\n\t\t\t}\n\t\t\tss.serverHeaderBinlogged = true\n\t\t\tfor _, binlog := range ss.binlogs {\n\t\t\t\tbinlog.Log(ss.ctx, sh)\n\t\t\t}\n\t\t}\n\t\tsm := &binarylog.ServerMessage{\n\t\t\tMessage: data.Materialize(),\n\t\t}\n\t\tfor _, binlog := range ss.binlogs {\n\t\t\tbinlog.Log(ss.ctx, sm)\n\t\t}\n\t}\n\tif ss.statsHandler != nil {\n\t\tss.statsHandler.HandleRPC(ss.s.Context(), outPayload(false, m, dataLen, payloadLen, time.Now()))\n\t}\n\treturn nil\n}\n\nfunc (ss *serverStream) RecvMsg(m any) (err error) {\n\tdefer func() {\n\t\tif ss.trInfo != nil {\n\t\t\tss.mu.Lock()\n\t\t\tif ss.trInfo.tr != nil {\n\t\t\t\tif err == nil {\n\t\t\t\t\tss.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true)\n\t\t\t\t} else if err != io.EOF {\n\t\t\t\t\tss.trInfo.tr.LazyLog(&fmtStringer{\"%v\", []any{err}}, true)\n\t\t\t\t\tss.trInfo.tr.SetError()\n\t\t\t\t}\n\t\t\t}\n\t\t\tss.mu.Unlock()\n\t\t}\n\t\tif err != nil && err != io.EOF {\n\t\t\tst, _ := status.FromError(toRPCErr(err))\n\t\t\tss.s.WriteStatus(st)\n\t\t\t// Non-user specified status was sent out. This should be an error\n\t\t\t// case (as a server side Cancel maybe).\n\t\t\t//\n\t\t\t// This is not handled specifically now. User will return a final\n\t\t\t// status from the service handler, we will log that error instead.\n\t\t\t// This behavior is similar to an interceptor.\n\t\t}\n\t}()\n\tvar payInfo *payloadInfo\n\tif ss.statsHandler != nil || len(ss.binlogs) != 0 {\n\t\tpayInfo = &payloadInfo{}\n\t\tdefer payInfo.free()\n\t}\n\tif err := recv(&ss.p, ss.codec, ss.s, ss.decompressorV0, m, ss.maxReceiveMessageSize, payInfo, ss.decompressorV1, true); err != nil {\n\t\tif err == io.EOF {\n\t\t\tif len(ss.binlogs) != 0 {\n\t\t\t\tchc := &binarylog.ClientHalfClose{}\n\t\t\t\tfor _, binlog := range ss.binlogs {\n\t\t\t\t\tbinlog.Log(ss.ctx, chc)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Received no request msg for non-client streaming rpcs.\n\t\t\tif !ss.desc.ClientStreams && !ss.recvFirstMsg {\n\t\t\t\treturn status.Error(codes.Internal, \"cardinality violation: received no request message from non-client-streaming RPC\")\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tif err == io.ErrUnexpectedEOF {\n\t\t\terr = status.Error(codes.Internal, io.ErrUnexpectedEOF.Error())\n\t\t}\n\t\treturn toRPCErr(err)\n\t}\n\tss.recvFirstMsg = true\n\tif ss.statsHandler != nil {\n\t\tss.statsHandler.HandleRPC(ss.s.Context(), &stats.InPayload{\n\t\t\tRecvTime:         time.Now(),\n\t\t\tPayload:          m,\n\t\t\tLength:           payInfo.uncompressedBytes.Len(),\n\t\t\tWireLength:       payInfo.compressedLength + headerLen,\n\t\t\tCompressedLength: payInfo.compressedLength,\n\t\t})\n\t}\n\tif len(ss.binlogs) != 0 {\n\t\tcm := &binarylog.ClientMessage{\n\t\t\tMessage: payInfo.uncompressedBytes.Materialize(),\n\t\t}\n\t\tfor _, binlog := range ss.binlogs {\n\t\t\tbinlog.Log(ss.ctx, cm)\n\t\t}\n\t}\n\n\tif ss.desc.ClientStreams {\n\t\t// Subsequent messages should be received by subsequent RecvMsg calls.\n\t\treturn nil\n\t}\n\t// Special handling for non-client-stream rpcs.\n\t// This recv expects EOF or errors, so we don't collect inPayload.\n\tif err := recv(&ss.p, ss.codec, ss.s, ss.decompressorV0, m, ss.maxReceiveMessageSize, nil, ss.decompressorV1, true); err == io.EOF {\n\t\treturn nil\n\t} else if err != nil {\n\t\treturn err\n\t}\n\treturn status.Error(codes.Internal, \"cardinality violation: received multiple request messages for non-client-streaming RPC\")\n}\n\n// MethodFromServerStream returns the method string for the input stream.\n// The returned string is in the format of \"/service/method\".\nfunc MethodFromServerStream(stream ServerStream) (string, bool) {\n\treturn Method(stream.Context())\n}\n\n// prepareMsg returns the hdr, payload and data using the compressors passed or\n// using the passed preparedmsg. The returned boolean indicates whether\n// compression was made and therefore whether the payload needs to be freed in\n// addition to the returned data. Freeing the payload if the returned boolean is\n// false can lead to undefined behavior.\nfunc prepareMsg(m any, codec baseCodec, cp Compressor, comp encoding.Compressor, pool mem.BufferPool) (hdr []byte, data, payload mem.BufferSlice, pf payloadFormat, err error) {\n\tif preparedMsg, ok := m.(*PreparedMsg); ok {\n\t\treturn preparedMsg.hdr, preparedMsg.encodedData, preparedMsg.payload, preparedMsg.pf, nil\n\t}\n\t// The input interface is not a prepared msg.\n\t// Marshal and Compress the data at this point\n\tdata, err = encode(codec, m)\n\tif err != nil {\n\t\treturn nil, nil, nil, 0, err\n\t}\n\tcompData, pf, err := compress(data, cp, comp, pool)\n\tif err != nil {\n\t\tdata.Free()\n\t\treturn nil, nil, nil, 0, err\n\t}\n\thdr, payload = msgHeader(data, compData, pf)\n\treturn hdr, data, payload, pf, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/stream_interfaces.go",
    "content": "/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\n// ServerStreamingClient represents the client side of a server-streaming (one\n// request, many responses) RPC. It is generic over the type of the response\n// message. It is used in generated code.\ntype ServerStreamingClient[Res any] interface {\n\t// Recv receives the next response message from the server. The client may\n\t// repeatedly call Recv to read messages from the response stream.  If\n\t// io.EOF is returned, the stream has terminated with an OK status.  Any\n\t// other error is compatible with the status package and indicates the\n\t// RPC's status code and message.\n\tRecv() (*Res, error)\n\n\t// ClientStream is embedded to provide Context, Header, and Trailer\n\t// functionality.  No other methods in the ClientStream should be called\n\t// directly.\n\tClientStream\n}\n\n// ServerStreamingServer represents the server side of a server-streaming (one\n// request, many responses) RPC. It is generic over the type of the response\n// message. It is used in generated code.\n//\n// To terminate the response stream, return from the handler method and return\n// an error from the status package, or use nil to indicate an OK status code.\ntype ServerStreamingServer[Res any] interface {\n\t// Send sends a response message to the client.  The server handler may\n\t// call Send multiple times to send multiple messages to the client.  An\n\t// error is returned if the stream was terminated unexpectedly, and the\n\t// handler method should return, as the stream is no longer usable.\n\tSend(*Res) error\n\n\t// ServerStream is embedded to provide Context, SetHeader, SendHeader, and\n\t// SetTrailer functionality.  No other methods in the ServerStream should\n\t// be called directly.\n\tServerStream\n}\n\n// ClientStreamingClient represents the client side of a client-streaming (many\n// requests, one response) RPC. It is generic over both the type of the request\n// message stream and the type of the unary response message. It is used in\n// generated code.\ntype ClientStreamingClient[Req any, Res any] interface {\n\t// Send sends a request message to the server.  The client may call Send\n\t// multiple times to send multiple messages to the server.  On error, Send\n\t// aborts the stream.  If the error was generated by the client, the status\n\t// is returned directly.  Otherwise, io.EOF is returned, and the status of\n\t// the stream may be discovered using CloseAndRecv().\n\tSend(*Req) error\n\n\t// CloseAndRecv closes the request stream and waits for the server's\n\t// response.  This method must be called once and only once after sending\n\t// all request messages.  Any error returned is implemented by the status\n\t// package.\n\tCloseAndRecv() (*Res, error)\n\n\t// ClientStream is embedded to provide Context, Header, and Trailer\n\t// functionality.  No other methods in the ClientStream should be called\n\t// directly.\n\tClientStream\n}\n\n// ClientStreamingServer represents the server side of a client-streaming (many\n// requests, one response) RPC. It is generic over both the type of the request\n// message stream and the type of the unary response message. It is used in\n// generated code.\n//\n// To terminate the RPC, call SendAndClose and return nil from the method\n// handler or do not call SendAndClose and return an error from the status\n// package.\ntype ClientStreamingServer[Req any, Res any] interface {\n\t// Recv receives the next request message from the client.  The server may\n\t// repeatedly call Recv to read messages from the request stream.  If\n\t// io.EOF is returned, it indicates the client called CloseAndRecv on its\n\t// ClientStreamingClient.  Any other error indicates the stream was\n\t// terminated unexpectedly, and the handler method should return, as the\n\t// stream is no longer usable.\n\tRecv() (*Req, error)\n\n\t// SendAndClose sends a single response message to the client and closes\n\t// the stream.  This method must be called once and only once after all\n\t// request messages have been processed.  Recv should not be called after\n\t// calling SendAndClose.\n\tSendAndClose(*Res) error\n\n\t// ServerStream is embedded to provide Context, SetHeader, SendHeader, and\n\t// SetTrailer functionality.  No other methods in the ServerStream should\n\t// be called directly.\n\tServerStream\n}\n\n// BidiStreamingClient represents the client side of a bidirectional-streaming\n// (many requests, many responses) RPC. It is generic over both the type of the\n// request message stream and the type of the response message stream. It is\n// used in generated code.\ntype BidiStreamingClient[Req any, Res any] interface {\n\t// Send sends a request message to the server.  The client may call Send\n\t// multiple times to send multiple messages to the server.  On error, Send\n\t// aborts the stream.  If the error was generated by the client, the status\n\t// is returned directly.  Otherwise, io.EOF is returned, and the status of\n\t// the stream may be discovered using Recv().\n\tSend(*Req) error\n\n\t// Recv receives the next response message from the server. The client may\n\t// repeatedly call Recv to read messages from the response stream.  If\n\t// io.EOF is returned, the stream has terminated with an OK status.  Any\n\t// other error is compatible with the status package and indicates the\n\t// RPC's status code and message.\n\tRecv() (*Res, error)\n\n\t// ClientStream is embedded to provide Context, Header, Trailer, and\n\t// CloseSend functionality.  No other methods in the ClientStream should be\n\t// called directly.\n\tClientStream\n}\n\n// BidiStreamingServer represents the server side of a bidirectional-streaming\n// (many requests, many responses) RPC. It is generic over both the type of the\n// request message stream and the type of the response message stream. It is\n// used in generated code.\n//\n// To terminate the stream, return from the handler method and return\n// an error from the status package, or use nil to indicate an OK status code.\ntype BidiStreamingServer[Req any, Res any] interface {\n\t// Recv receives the next request message from the client.  The server may\n\t// repeatedly call Recv to read messages from the request stream.  If\n\t// io.EOF is returned, it indicates the client called CloseSend on its\n\t// BidiStreamingClient.  Any other error indicates the stream was\n\t// terminated unexpectedly, and the handler method should return, as the\n\t// stream is no longer usable.\n\tRecv() (*Req, error)\n\n\t// Send sends a response message to the client.  The server handler may\n\t// call Send multiple times to send multiple messages to the client.  An\n\t// error is returned if the stream was terminated unexpectedly, and the\n\t// handler method should return, as the stream is no longer usable.\n\tSend(*Res) error\n\n\t// ServerStream is embedded to provide Context, SetHeader, SendHeader, and\n\t// SetTrailer functionality.  No other methods in the ServerStream should\n\t// be called directly.\n\tServerStream\n}\n\n// GenericClientStream implements the ServerStreamingClient, ClientStreamingClient,\n// and BidiStreamingClient interfaces. It is used in generated code.\ntype GenericClientStream[Req any, Res any] struct {\n\tClientStream\n}\n\nvar _ ServerStreamingClient[string] = (*GenericClientStream[int, string])(nil)\nvar _ ClientStreamingClient[int, string] = (*GenericClientStream[int, string])(nil)\nvar _ BidiStreamingClient[int, string] = (*GenericClientStream[int, string])(nil)\n\n// Send pushes one message into the stream of requests to be consumed by the\n// server. The type of message which can be sent is determined by the Req type\n// parameter of the GenericClientStream receiver.\nfunc (x *GenericClientStream[Req, Res]) Send(m *Req) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\n// Recv reads one message from the stream of responses generated by the server.\n// The type of the message returned is determined by the Res type parameter\n// of the GenericClientStream receiver.\nfunc (x *GenericClientStream[Req, Res]) Recv() (*Res, error) {\n\tm := new(Res)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// CloseAndRecv closes the sending side of the stream, then receives the unary\n// response from the server. The type of message which it returns is determined\n// by the Res type parameter of the GenericClientStream receiver.\nfunc (x *GenericClientStream[Req, Res]) CloseAndRecv() (*Res, error) {\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\tm := new(Res)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// GenericServerStream implements the ServerStreamingServer, ClientStreamingServer,\n// and BidiStreamingServer interfaces. It is used in generated code.\ntype GenericServerStream[Req any, Res any] struct {\n\tServerStream\n}\n\nvar _ ServerStreamingServer[string] = (*GenericServerStream[int, string])(nil)\nvar _ ClientStreamingServer[int, string] = (*GenericServerStream[int, string])(nil)\nvar _ BidiStreamingServer[int, string] = (*GenericServerStream[int, string])(nil)\n\n// Send pushes one message into the stream of responses to be consumed by the\n// client. The type of message which can be sent is determined by the Res\n// type parameter of the serverStreamServer receiver.\nfunc (x *GenericServerStream[Req, Res]) Send(m *Res) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\n// SendAndClose pushes the unary response to the client. The type of message\n// which can be sent is determined by the Res type parameter of the\n// clientStreamServer receiver.\nfunc (x *GenericServerStream[Req, Res]) SendAndClose(m *Res) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\n// Recv reads one message from the stream of requests generated by the client.\n// The type of the message returned is determined by the Req type parameter\n// of the clientStreamServer receiver.\nfunc (x *GenericServerStream[Req, Res]) Recv() (*Req, error) {\n\tm := new(Req)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/tap/tap.go",
    "content": "/*\n *\n * Copyright 2016 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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// Package tap defines the function handles which are executed on the transport\n// layer of gRPC-Go and related information.\n//\n// # Experimental\n//\n// Notice: This API is EXPERIMENTAL and may be changed or removed in a\n// later release.\npackage tap\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/grpc/metadata\"\n)\n\n// Info defines the relevant information needed by the handles.\ntype Info struct {\n\t// FullMethodName is the string of grpc method (in the format of\n\t// /package.service/method).\n\tFullMethodName string\n\n\t// Header contains the header metadata received.\n\tHeader metadata.MD\n\n\t// TODO: More to be added.\n}\n\n// ServerInHandle defines the function which runs before a new stream is\n// created on the server side. If it returns a non-nil error, the stream will\n// not be created and an error will be returned to the client.  If the error\n// returned is a status error, that status code and message will be used,\n// otherwise PermissionDenied will be the code and err.Error() will be the\n// message.\n//\n// It's intended to be used in situations where you don't want to waste the\n// resources to accept the new stream (e.g. rate-limiting). For other general\n// usages, please use interceptors.\n//\n// Note that it is executed in the per-connection I/O goroutine(s) instead of\n// per-RPC goroutine. Therefore, users should NOT have any\n// blocking/time-consuming work in this handle. Otherwise all the RPCs would\n// slow down. Also, for the same reason, this handle won't be called\n// concurrently by gRPC.\ntype ServerInHandle func(ctx context.Context, info *Info) (context.Context, error)\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/trace.go",
    "content": "/*\n *\n * Copyright 2015 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\n// EnableTracing controls whether to trace RPCs using the golang.org/x/net/trace package.\n// This should only be set before any RPCs are sent or received by this program.\nvar EnableTracing bool\n\n// methodFamily returns the trace family for the given method.\n// It turns \"/pkg.Service/GetFoo\" into \"pkg.Service\".\nfunc methodFamily(m string) string {\n\tm = strings.TrimPrefix(m, \"/\") // remove leading slash\n\tif i := strings.Index(m, \"/\"); i >= 0 {\n\t\tm = m[:i] // remove everything from second slash\n\t}\n\treturn m\n}\n\n// traceEventLog mirrors golang.org/x/net/trace.EventLog.\n//\n// It exists in order to avoid importing x/net/trace on grpcnotrace builds.\ntype traceEventLog interface {\n\tPrintf(format string, a ...any)\n\tErrorf(format string, a ...any)\n\tFinish()\n}\n\n// traceLog mirrors golang.org/x/net/trace.Trace.\n//\n// It exists in order to avoid importing x/net/trace on grpcnotrace builds.\ntype traceLog interface {\n\tLazyLog(x fmt.Stringer, sensitive bool)\n\tLazyPrintf(format string, a ...any)\n\tSetError()\n\tSetRecycler(f func(any))\n\tSetTraceInfo(traceID, spanID uint64)\n\tSetMaxEvents(m int)\n\tFinish()\n}\n\n// traceInfo contains tracing information for an RPC.\ntype traceInfo struct {\n\ttr        traceLog\n\tfirstLine firstLine\n}\n\n// firstLine is the first line of an RPC trace.\n// It may be mutated after construction; remoteAddr specifically may change\n// during client-side use.\ntype firstLine struct {\n\tmu         sync.Mutex\n\tclient     bool // whether this is a client (outgoing) RPC\n\tremoteAddr net.Addr\n\tdeadline   time.Duration // may be zero\n}\n\nfunc (f *firstLine) SetRemoteAddr(addr net.Addr) {\n\tf.mu.Lock()\n\tf.remoteAddr = addr\n\tf.mu.Unlock()\n}\n\nfunc (f *firstLine) String() string {\n\tf.mu.Lock()\n\tdefer f.mu.Unlock()\n\n\tvar line bytes.Buffer\n\tio.WriteString(&line, \"RPC: \")\n\tif f.client {\n\t\tio.WriteString(&line, \"to\")\n\t} else {\n\t\tio.WriteString(&line, \"from\")\n\t}\n\tfmt.Fprintf(&line, \" %v deadline:\", f.remoteAddr)\n\tif f.deadline != 0 {\n\t\tfmt.Fprint(&line, f.deadline)\n\t} else {\n\t\tio.WriteString(&line, \"none\")\n\t}\n\treturn line.String()\n}\n\nconst truncateSize = 100\n\nfunc truncate(x string, l int) string {\n\tif l > len(x) {\n\t\treturn x\n\t}\n\treturn x[:l]\n}\n\n// payload represents an RPC request or response payload.\ntype payload struct {\n\tsent bool // whether this is an outgoing payload\n\tmsg  any  // e.g. a proto.Message\n\t// TODO(dsymonds): add stringifying info to codec, and limit how much we hold here?\n}\n\nfunc (p payload) String() string {\n\tif p.sent {\n\t\treturn truncate(fmt.Sprintf(\"sent: %v\", p.msg), truncateSize)\n\t}\n\treturn truncate(fmt.Sprintf(\"recv: %v\", p.msg), truncateSize)\n}\n\ntype fmtStringer struct {\n\tformat string\n\ta      []any\n}\n\nfunc (f *fmtStringer) String() string {\n\treturn fmt.Sprintf(f.format, f.a...)\n}\n\ntype stringer string\n\nfunc (s stringer) String() string { return string(s) }\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/trace_notrace.go",
    "content": "//go:build grpcnotrace\n\n/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\n// grpcnotrace can be used to avoid importing golang.org/x/net/trace, which in\n// turn enables binaries using gRPC-Go for dead code elimination, which can\n// yield 10-15% improvements in binary size when tracing is not needed.\n\nimport (\n\t\"context\"\n\t\"fmt\"\n)\n\ntype notrace struct{}\n\nfunc (notrace) LazyLog(x fmt.Stringer, sensitive bool) {}\nfunc (notrace) LazyPrintf(format string, a ...any)     {}\nfunc (notrace) SetError()                              {}\nfunc (notrace) SetRecycler(f func(any))                {}\nfunc (notrace) SetTraceInfo(traceID, spanID uint64)    {}\nfunc (notrace) SetMaxEvents(m int)                     {}\nfunc (notrace) Finish()                                {}\n\nfunc newTrace(family, title string) traceLog {\n\treturn notrace{}\n}\n\nfunc newTraceContext(ctx context.Context, tr traceLog) context.Context {\n\treturn ctx\n}\n\nfunc newTraceEventLog(family, title string) traceEventLog {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/trace_withtrace.go",
    "content": "//go:build !grpcnotrace\n\n/*\n *\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\nimport (\n\t\"context\"\n\n\tt \"golang.org/x/net/trace\"\n)\n\nfunc newTrace(family, title string) traceLog {\n\treturn t.New(family, title)\n}\n\nfunc newTraceContext(ctx context.Context, tr traceLog) context.Context {\n\treturn t.NewContext(ctx, tr)\n}\n\nfunc newTraceEventLog(family, title string) traceEventLog {\n\treturn t.NewEventLog(family, title)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/grpc/version.go",
    "content": "/*\n *\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\npackage grpc\n\n// Version is the current grpc version.\nconst Version = \"1.78.0\"\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/LICENSE",
    "content": "Copyright (c) 2018 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n   * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n   * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/PATENTS",
    "content": "Additional IP Rights Grant (Patents)\n\n\"This implementation\" means the copyrightable works distributed by\nGoogle as part of the Go project.\n\nGoogle hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section)\npatent license to make, have made, use, offer to sell, sell, import,\ntransfer and otherwise run, modify and propagate the contents of this\nimplementation of Go, where such license applies only to those patent\nclaims, both currently owned or controlled by Google and acquired in\nthe future, licensable by Google that are necessarily infringed by this\nimplementation of Go.  This grant does not include claims that would be\ninfringed only as a consequence of further modification of this\nimplementation.  If you or your agent or exclusive licensee institute or\norder or agree to the institution of patent litigation against any\nentity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat this implementation of Go or any code incorporated within this\nimplementation of Go constitutes direct or contributory patent\ninfringement, or inducement of patent infringement, then any patent\nrights granted to you under this License for this implementation of Go\nshall terminate as of the date such litigation is filed.\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/protojson/decode.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protojson\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/json\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/internal/set\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\n// Unmarshal reads the given []byte into the given [proto.Message].\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\nfunc Unmarshal(b []byte, m proto.Message) error {\n\treturn UnmarshalOptions{}.Unmarshal(b, m)\n}\n\n// UnmarshalOptions is a configurable JSON format parser.\ntype UnmarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// If AllowPartial is set, input for messages that will result in missing\n\t// required fields will not return an error.\n\tAllowPartial bool\n\n\t// If DiscardUnknown is set, unknown fields and enum name values are ignored.\n\tDiscardUnknown bool\n\n\t// Resolver is used for looking up types when unmarshaling\n\t// google.protobuf.Any messages or extension fields.\n\t// If nil, this defaults to using protoregistry.GlobalTypes.\n\tResolver interface {\n\t\tprotoregistry.MessageTypeResolver\n\t\tprotoregistry.ExtensionTypeResolver\n\t}\n\n\t// RecursionLimit limits how deeply messages may be nested.\n\t// If zero, a default limit is applied.\n\tRecursionLimit int\n}\n\n// Unmarshal reads the given []byte and populates the given [proto.Message]\n// using options in the UnmarshalOptions object.\n// It will clear the message first before setting the fields.\n// If it returns an error, the given message may be partially set.\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\nfunc (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {\n\treturn o.unmarshal(b, m)\n}\n\n// unmarshal is a centralized function that all unmarshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for unmarshal that do not go through this.\nfunc (o UnmarshalOptions) unmarshal(b []byte, m proto.Message) error {\n\tproto.Reset(m)\n\n\tif o.Resolver == nil {\n\t\to.Resolver = protoregistry.GlobalTypes\n\t}\n\tif o.RecursionLimit == 0 {\n\t\to.RecursionLimit = protowire.DefaultRecursionLimit\n\t}\n\n\tdec := decoder{json.NewDecoder(b), o}\n\tif err := dec.unmarshalMessage(m.ProtoReflect(), false); err != nil {\n\t\treturn err\n\t}\n\n\t// Check for EOF.\n\ttok, err := dec.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.EOF {\n\t\treturn dec.unexpectedTokenError(tok)\n\t}\n\n\tif o.AllowPartial {\n\t\treturn nil\n\t}\n\treturn proto.CheckInitialized(m)\n}\n\ntype decoder struct {\n\t*json.Decoder\n\topts UnmarshalOptions\n}\n\n// newError returns an error object with position info.\nfunc (d decoder) newError(pos int, f string, x ...any) error {\n\tline, column := d.Position(pos)\n\thead := fmt.Sprintf(\"(line %d:%d): \", line, column)\n\treturn errors.New(head+f, x...)\n}\n\n// unexpectedTokenError returns a syntax error for the given unexpected token.\nfunc (d decoder) unexpectedTokenError(tok json.Token) error {\n\treturn d.syntaxError(tok.Pos(), \"unexpected token %s\", tok.RawString())\n}\n\n// syntaxError returns a syntax error for given position.\nfunc (d decoder) syntaxError(pos int, f string, x ...any) error {\n\tline, column := d.Position(pos)\n\thead := fmt.Sprintf(\"syntax error (line %d:%d): \", line, column)\n\treturn errors.New(head+f, x...)\n}\n\n// unmarshalMessage unmarshals a message into the given protoreflect.Message.\nfunc (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) error {\n\td.opts.RecursionLimit--\n\tif d.opts.RecursionLimit < 0 {\n\t\treturn errors.New(\"exceeded max recursion depth\")\n\t}\n\tif unmarshal := wellKnownTypeUnmarshaler(m.Descriptor().FullName()); unmarshal != nil {\n\t\treturn unmarshal(d, m)\n\t}\n\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.ObjectOpen {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\tmessageDesc := m.Descriptor()\n\tif !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {\n\t\treturn errors.New(\"no support for proto1 MessageSets\")\n\t}\n\n\tvar seenNums set.Ints\n\tvar seenOneofs set.Ints\n\tfieldDescs := messageDesc.Fields()\n\tfor {\n\t\t// Read field name.\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tdefault:\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\tcase json.ObjectClose:\n\t\t\treturn nil\n\t\tcase json.Name:\n\t\t\t// Continue below.\n\t\t}\n\n\t\tname := tok.Name()\n\t\t// Unmarshaling a non-custom embedded message in Any will contain the\n\t\t// JSON field \"@type\" which should be skipped because it is not a field\n\t\t// of the embedded message, but simply an artifact of the Any format.\n\t\tif skipTypeURL && name == \"@type\" {\n\t\t\td.Read()\n\t\t\tcontinue\n\t\t}\n\n\t\t// Get the FieldDescriptor.\n\t\tvar fd protoreflect.FieldDescriptor\n\t\tif strings.HasPrefix(name, \"[\") && strings.HasSuffix(name, \"]\") {\n\t\t\t// Only extension names are in [name] format.\n\t\t\textName := protoreflect.FullName(name[1 : len(name)-1])\n\t\t\textType, err := d.opts.Resolver.FindExtensionByName(extName)\n\t\t\tif err != nil && err != protoregistry.NotFound {\n\t\t\t\treturn d.newError(tok.Pos(), \"unable to resolve %s: %v\", tok.RawString(), err)\n\t\t\t}\n\t\t\tif extType != nil {\n\t\t\t\tfd = extType.TypeDescriptor()\n\t\t\t\tif !messageDesc.ExtensionRanges().Has(fd.Number()) || fd.ContainingMessage().FullName() != messageDesc.FullName() {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"message %v cannot be extended by %v\", messageDesc.FullName(), fd.FullName())\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The name can either be the JSON name or the proto field name.\n\t\t\tfd = fieldDescs.ByJSONName(name)\n\t\t\tif fd == nil {\n\t\t\t\tfd = fieldDescs.ByTextName(name)\n\t\t\t}\n\t\t}\n\n\t\tif fd == nil {\n\t\t\t// Field is unknown.\n\t\t\tif d.opts.DiscardUnknown {\n\t\t\t\tif err := d.skipJSONValue(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn d.newError(tok.Pos(), \"unknown field %v\", tok.RawString())\n\t\t}\n\n\t\t// Do not allow duplicate fields.\n\t\tnum := uint64(fd.Number())\n\t\tif seenNums.Has(num) {\n\t\t\treturn d.newError(tok.Pos(), \"duplicate field %v\", tok.RawString())\n\t\t}\n\t\tseenNums.Set(num)\n\n\t\t// No need to set values for JSON null unless the field type is\n\t\t// google.protobuf.Value or google.protobuf.NullValue.\n\t\tif tok, _ := d.Peek(); tok.Kind() == json.Null && !isKnownValue(fd) && !isNullValue(fd) {\n\t\t\td.Read()\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch {\n\t\tcase fd.IsList():\n\t\t\tlist := m.Mutable(fd).List()\n\t\t\tif err := d.unmarshalList(list, fd); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase fd.IsMap():\n\t\t\tmmap := m.Mutable(fd).Map()\n\t\t\tif err := d.unmarshalMap(mmap, fd); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tdefault:\n\t\t\t// If field is a oneof, check if it has already been set.\n\t\t\tif od := fd.ContainingOneof(); od != nil {\n\t\t\t\tidx := uint64(od.Index())\n\t\t\t\tif seenOneofs.Has(idx) {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"error parsing %s, oneof %v is already set\", tok.RawString(), od.FullName())\n\t\t\t\t}\n\t\t\t\tseenOneofs.Set(idx)\n\t\t\t}\n\n\t\t\t// Required or optional fields.\n\t\t\tif err := d.unmarshalSingular(m, fd); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc isKnownValue(fd protoreflect.FieldDescriptor) bool {\n\tmd := fd.Message()\n\treturn md != nil && md.FullName() == genid.Value_message_fullname\n}\n\nfunc isNullValue(fd protoreflect.FieldDescriptor) bool {\n\ted := fd.Enum()\n\treturn ed != nil && ed.FullName() == genid.NullValue_enum_fullname\n}\n\n// unmarshalSingular unmarshals to the non-repeated field specified\n// by the given FieldDescriptor.\nfunc (d decoder) unmarshalSingular(m protoreflect.Message, fd protoreflect.FieldDescriptor) error {\n\tvar val protoreflect.Value\n\tvar err error\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tval = m.NewField(fd)\n\t\terr = d.unmarshalMessage(val.Message(), false)\n\tdefault:\n\t\tval, err = d.unmarshalScalar(fd)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tif val.IsValid() {\n\t\tm.Set(fd, val)\n\t}\n\treturn nil\n}\n\n// unmarshalScalar unmarshals to a scalar/enum protoreflect.Value specified by\n// the given FieldDescriptor.\nfunc (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {\n\tconst b32 int = 32\n\tconst b64 int = 64\n\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn protoreflect.Value{}, err\n\t}\n\n\tkind := fd.Kind()\n\tswitch kind {\n\tcase protoreflect.BoolKind:\n\t\tif tok.Kind() == json.Bool {\n\t\t\treturn protoreflect.ValueOfBool(tok.Bool()), nil\n\t\t}\n\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif v, ok := unmarshalInt(tok, b32); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif v, ok := unmarshalInt(tok, b64); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif v, ok := unmarshalUint(tok, b32); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif v, ok := unmarshalUint(tok, b64); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.FloatKind:\n\t\tif v, ok := unmarshalFloat(tok, b32); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.DoubleKind:\n\t\tif v, ok := unmarshalFloat(tok, b64); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.StringKind:\n\t\tif tok.Kind() == json.String {\n\t\t\treturn protoreflect.ValueOfString(tok.ParsedString()), nil\n\t\t}\n\n\tcase protoreflect.BytesKind:\n\t\tif v, ok := unmarshalBytes(tok); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tcase protoreflect.EnumKind:\n\t\tif v, ok := unmarshalEnum(tok, fd, d.opts.DiscardUnknown); ok {\n\t\t\treturn v, nil\n\t\t}\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unmarshalScalar: invalid scalar kind %v\", kind))\n\t}\n\n\treturn protoreflect.Value{}, d.newError(tok.Pos(), \"invalid value for %v field %v: %v\", kind, fd.JSONName(), tok.RawString())\n}\n\nfunc unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tswitch tok.Kind() {\n\tcase json.Number:\n\t\treturn getInt(tok, bitSize)\n\n\tcase json.String:\n\t\t// Decode number from string.\n\t\ts := strings.TrimSpace(tok.ParsedString())\n\t\tif len(s) != len(tok.ParsedString()) {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\tdec := json.NewDecoder([]byte(s))\n\t\ttok, err := dec.Read()\n\t\tif err != nil {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\treturn getInt(tok, bitSize)\n\t}\n\treturn protoreflect.Value{}, false\n}\n\nfunc getInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tn, ok := tok.Int(bitSize)\n\tif !ok {\n\t\treturn protoreflect.Value{}, false\n\t}\n\tif bitSize == 32 {\n\t\treturn protoreflect.ValueOfInt32(int32(n)), true\n\t}\n\treturn protoreflect.ValueOfInt64(n), true\n}\n\nfunc unmarshalUint(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tswitch tok.Kind() {\n\tcase json.Number:\n\t\treturn getUint(tok, bitSize)\n\n\tcase json.String:\n\t\t// Decode number from string.\n\t\ts := strings.TrimSpace(tok.ParsedString())\n\t\tif len(s) != len(tok.ParsedString()) {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\tdec := json.NewDecoder([]byte(s))\n\t\ttok, err := dec.Read()\n\t\tif err != nil {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\treturn getUint(tok, bitSize)\n\t}\n\treturn protoreflect.Value{}, false\n}\n\nfunc getUint(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tn, ok := tok.Uint(bitSize)\n\tif !ok {\n\t\treturn protoreflect.Value{}, false\n\t}\n\tif bitSize == 32 {\n\t\treturn protoreflect.ValueOfUint32(uint32(n)), true\n\t}\n\treturn protoreflect.ValueOfUint64(n), true\n}\n\nfunc unmarshalFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tswitch tok.Kind() {\n\tcase json.Number:\n\t\treturn getFloat(tok, bitSize)\n\n\tcase json.String:\n\t\ts := tok.ParsedString()\n\t\tswitch s {\n\t\tcase \"NaN\":\n\t\t\tif bitSize == 32 {\n\t\t\t\treturn protoreflect.ValueOfFloat32(float32(math.NaN())), true\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfFloat64(math.NaN()), true\n\t\tcase \"Infinity\":\n\t\t\tif bitSize == 32 {\n\t\t\t\treturn protoreflect.ValueOfFloat32(float32(math.Inf(+1))), true\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfFloat64(math.Inf(+1)), true\n\t\tcase \"-Infinity\":\n\t\t\tif bitSize == 32 {\n\t\t\t\treturn protoreflect.ValueOfFloat32(float32(math.Inf(-1))), true\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfFloat64(math.Inf(-1)), true\n\t\t}\n\n\t\t// Decode number from string.\n\t\tif len(s) != len(strings.TrimSpace(s)) {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\tdec := json.NewDecoder([]byte(s))\n\t\ttok, err := dec.Read()\n\t\tif err != nil {\n\t\t\treturn protoreflect.Value{}, false\n\t\t}\n\t\treturn getFloat(tok, bitSize)\n\t}\n\treturn protoreflect.Value{}, false\n}\n\nfunc getFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) {\n\tn, ok := tok.Float(bitSize)\n\tif !ok {\n\t\treturn protoreflect.Value{}, false\n\t}\n\tif bitSize == 32 {\n\t\treturn protoreflect.ValueOfFloat32(float32(n)), true\n\t}\n\treturn protoreflect.ValueOfFloat64(n), true\n}\n\nfunc unmarshalBytes(tok json.Token) (protoreflect.Value, bool) {\n\tif tok.Kind() != json.String {\n\t\treturn protoreflect.Value{}, false\n\t}\n\n\ts := tok.ParsedString()\n\tenc := base64.StdEncoding\n\tif strings.ContainsAny(s, \"-_\") {\n\t\tenc = base64.URLEncoding\n\t}\n\tif len(s)%4 != 0 {\n\t\tenc = enc.WithPadding(base64.NoPadding)\n\t}\n\tb, err := enc.DecodeString(s)\n\tif err != nil {\n\t\treturn protoreflect.Value{}, false\n\t}\n\treturn protoreflect.ValueOfBytes(b), true\n}\n\nfunc unmarshalEnum(tok json.Token, fd protoreflect.FieldDescriptor, discardUnknown bool) (protoreflect.Value, bool) {\n\tswitch tok.Kind() {\n\tcase json.String:\n\t\t// Lookup EnumNumber based on name.\n\t\ts := tok.ParsedString()\n\t\tif enumVal := fd.Enum().Values().ByName(protoreflect.Name(s)); enumVal != nil {\n\t\t\treturn protoreflect.ValueOfEnum(enumVal.Number()), true\n\t\t}\n\t\tif discardUnknown {\n\t\t\treturn protoreflect.Value{}, true\n\t\t}\n\n\tcase json.Number:\n\t\tif n, ok := tok.Int(32); ok {\n\t\t\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(n)), true\n\t\t}\n\n\tcase json.Null:\n\t\t// This is only valid for google.protobuf.NullValue.\n\t\tif isNullValue(fd) {\n\t\t\treturn protoreflect.ValueOfEnum(0), true\n\t\t}\n\t}\n\n\treturn protoreflect.Value{}, false\n}\n\nfunc (d decoder) unmarshalList(list protoreflect.List, fd protoreflect.FieldDescriptor) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.ArrayOpen {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tfor {\n\t\t\ttok, err := d.Peek()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif tok.Kind() == json.ArrayClose {\n\t\t\t\td.Read()\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tval := list.NewElement()\n\t\t\tif err := d.unmarshalMessage(val.Message(), false); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tlist.Append(val)\n\t\t}\n\tdefault:\n\t\tfor {\n\t\t\ttok, err := d.Peek()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif tok.Kind() == json.ArrayClose {\n\t\t\t\td.Read()\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tval, err := d.unmarshalScalar(fd)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif val.IsValid() {\n\t\t\t\tlist.Append(val)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (d decoder) unmarshalMap(mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.ObjectOpen {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\t// Determine ahead whether map entry is a scalar type or a message type in\n\t// order to call the appropriate unmarshalMapValue func inside the for loop\n\t// below.\n\tvar unmarshalMapValue func() (protoreflect.Value, error)\n\tswitch fd.MapValue().Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tunmarshalMapValue = func() (protoreflect.Value, error) {\n\t\t\tval := mmap.NewValue()\n\t\t\tif err := d.unmarshalMessage(val.Message(), false); err != nil {\n\t\t\t\treturn protoreflect.Value{}, err\n\t\t\t}\n\t\t\treturn val, nil\n\t\t}\n\tdefault:\n\t\tunmarshalMapValue = func() (protoreflect.Value, error) {\n\t\t\treturn d.unmarshalScalar(fd.MapValue())\n\t\t}\n\t}\n\nLoop:\n\tfor {\n\t\t// Read field name.\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tdefault:\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\tcase json.ObjectClose:\n\t\t\tbreak Loop\n\t\tcase json.Name:\n\t\t\t// Continue.\n\t\t}\n\n\t\t// Unmarshal field name.\n\t\tpkey, err := d.unmarshalMapKey(tok, fd.MapKey())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Check for duplicate field name.\n\t\tif mmap.Has(pkey) {\n\t\t\treturn d.newError(tok.Pos(), \"duplicate map key %v\", tok.RawString())\n\t\t}\n\n\t\t// Read and unmarshal field value.\n\t\tpval, err := unmarshalMapValue()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif pval.IsValid() {\n\t\t\tmmap.Set(pkey, pval)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// unmarshalMapKey converts given token of Name kind into a protoreflect.MapKey.\n// A map key type is any integral or string type.\nfunc (d decoder) unmarshalMapKey(tok json.Token, fd protoreflect.FieldDescriptor) (protoreflect.MapKey, error) {\n\tconst b32 = 32\n\tconst b64 = 64\n\tconst base10 = 10\n\n\tname := tok.Name()\n\tkind := fd.Kind()\n\tswitch kind {\n\tcase protoreflect.StringKind:\n\t\treturn protoreflect.ValueOfString(name).MapKey(), nil\n\n\tcase protoreflect.BoolKind:\n\t\tswitch name {\n\t\tcase \"true\":\n\t\t\treturn protoreflect.ValueOfBool(true).MapKey(), nil\n\t\tcase \"false\":\n\t\t\treturn protoreflect.ValueOfBool(false).MapKey(), nil\n\t\t}\n\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif n, err := strconv.ParseInt(name, base10, b32); err == nil {\n\t\t\treturn protoreflect.ValueOfInt32(int32(n)).MapKey(), nil\n\t\t}\n\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif n, err := strconv.ParseInt(name, base10, b64); err == nil {\n\t\t\treturn protoreflect.ValueOfInt64(int64(n)).MapKey(), nil\n\t\t}\n\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif n, err := strconv.ParseUint(name, base10, b32); err == nil {\n\t\t\treturn protoreflect.ValueOfUint32(uint32(n)).MapKey(), nil\n\t\t}\n\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif n, err := strconv.ParseUint(name, base10, b64); err == nil {\n\t\t\treturn protoreflect.ValueOfUint64(uint64(n)).MapKey(), nil\n\t\t}\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"invalid kind for map key: %v\", kind))\n\t}\n\n\treturn protoreflect.MapKey{}, d.newError(tok.Pos(), \"invalid value for %v key: %s\", kind, tok.RawString())\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/protojson/doc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protojson marshals and unmarshals protocol buffer messages as JSON\n// format. It follows the guide at\n// https://protobuf.dev/programming-guides/proto3#json.\n//\n// This package produces a different output than the standard [encoding/json]\n// package, which does not operate correctly on protocol buffer messages.\npackage protojson\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/protojson/encode.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protojson\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/internal/encoding/json\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\nconst defaultIndent = \"  \"\n\n// Format formats the message as a multiline string.\n// This function is only intended for human consumption and ignores errors.\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc Format(m proto.Message) string {\n\treturn MarshalOptions{Multiline: true}.Format(m)\n}\n\n// Marshal writes the given [proto.Message] in JSON format using default options.\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc Marshal(m proto.Message) ([]byte, error) {\n\treturn MarshalOptions{}.Marshal(m)\n}\n\n// MarshalOptions is a configurable JSON format marshaler.\ntype MarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// Multiline specifies whether the marshaler should format the output in\n\t// indented-form with every textual element on a new line.\n\t// If Indent is an empty string, then an arbitrary indent is chosen.\n\tMultiline bool\n\n\t// Indent specifies the set of indentation characters to use in a multiline\n\t// formatted output such that every entry is preceded by Indent and\n\t// terminated by a newline. If non-empty, then Multiline is treated as true.\n\t// Indent can only be composed of space or tab characters.\n\tIndent string\n\n\t// AllowPartial allows messages that have missing required fields to marshal\n\t// without returning an error. If AllowPartial is false (the default),\n\t// Marshal will return error if there are any missing required fields.\n\tAllowPartial bool\n\n\t// UseProtoNames uses proto field name instead of lowerCamelCase name in JSON\n\t// field names.\n\tUseProtoNames bool\n\n\t// UseEnumNumbers emits enum values as numbers.\n\tUseEnumNumbers bool\n\n\t// EmitUnpopulated specifies whether to emit unpopulated fields. It does not\n\t// emit unpopulated oneof fields or unpopulated extension fields.\n\t// The JSON value emitted for unpopulated fields are as follows:\n\t//  ╔═══════╤════════════════════════════╗\n\t//  ║ JSON  │ Protobuf field             ║\n\t//  ╠═══════╪════════════════════════════╣\n\t//  ║ false │ proto3 boolean fields      ║\n\t//  ║ 0     │ proto3 numeric fields      ║\n\t//  ║ \"\"    │ proto3 string/bytes fields ║\n\t//  ║ null  │ proto2 scalar fields       ║\n\t//  ║ null  │ message fields             ║\n\t//  ║ []    │ list fields                ║\n\t//  ║ {}    │ map fields                 ║\n\t//  ╚═══════╧════════════════════════════╝\n\tEmitUnpopulated bool\n\n\t// EmitDefaultValues specifies whether to emit default-valued primitive fields,\n\t// empty lists, and empty maps. The fields affected are as follows:\n\t//  ╔═══════╤════════════════════════════════════════╗\n\t//  ║ JSON  │ Protobuf field                         ║\n\t//  ╠═══════╪════════════════════════════════════════╣\n\t//  ║ false │ non-optional scalar boolean fields     ║\n\t//  ║ 0     │ non-optional scalar numeric fields     ║\n\t//  ║ \"\"    │ non-optional scalar string/byte fields ║\n\t//  ║ []    │ empty repeated fields                  ║\n\t//  ║ {}    │ empty map fields                       ║\n\t//  ╚═══════╧════════════════════════════════════════╝\n\t//\n\t// Behaves similarly to EmitUnpopulated, but does not emit \"null\"-value fields,\n\t// i.e. presence-sensing fields that are omitted will remain omitted to preserve\n\t// presence-sensing.\n\t// EmitUnpopulated takes precedence over EmitDefaultValues since the former generates\n\t// a strict superset of the latter.\n\tEmitDefaultValues bool\n\n\t// Resolver is used for looking up types when expanding google.protobuf.Any\n\t// messages. If nil, this defaults to using protoregistry.GlobalTypes.\n\tResolver interface {\n\t\tprotoregistry.ExtensionTypeResolver\n\t\tprotoregistry.MessageTypeResolver\n\t}\n}\n\n// Format formats the message as a string.\n// This method is only intended for human consumption and ignores errors.\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc (o MarshalOptions) Format(m proto.Message) string {\n\tif m == nil || !m.ProtoReflect().IsValid() {\n\t\treturn \"<nil>\" // invalid syntax, but okay since this is for debugging\n\t}\n\to.AllowPartial = true\n\tb, _ := o.Marshal(m)\n\treturn string(b)\n}\n\n// Marshal marshals the given [proto.Message] in the JSON format using options in\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {\n\treturn o.marshal(nil, m)\n}\n\n// MarshalAppend appends the JSON format encoding of m to b,\n// returning the result.\nfunc (o MarshalOptions) MarshalAppend(b []byte, m proto.Message) ([]byte, error) {\n\treturn o.marshal(b, m)\n}\n\n// marshal is a centralized function that all marshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for marshal that do not go through this.\nfunc (o MarshalOptions) marshal(b []byte, m proto.Message) ([]byte, error) {\n\tif o.Multiline && o.Indent == \"\" {\n\t\to.Indent = defaultIndent\n\t}\n\tif o.Resolver == nil {\n\t\to.Resolver = protoregistry.GlobalTypes\n\t}\n\n\tinternalEnc, err := json.NewEncoder(b, o.Indent)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Treat nil message interface as an empty message,\n\t// in which case the output in an empty JSON object.\n\tif m == nil {\n\t\treturn append(b, '{', '}'), nil\n\t}\n\n\tenc := encoder{internalEnc, o}\n\tif err := enc.marshalMessage(m.ProtoReflect(), \"\"); err != nil {\n\t\treturn nil, err\n\t}\n\tif o.AllowPartial {\n\t\treturn enc.Bytes(), nil\n\t}\n\treturn enc.Bytes(), proto.CheckInitialized(m)\n}\n\ntype encoder struct {\n\t*json.Encoder\n\topts MarshalOptions\n}\n\n// typeFieldDesc is a synthetic field descriptor used for the \"@type\" field.\nvar typeFieldDesc = func() protoreflect.FieldDescriptor {\n\tvar fd filedesc.Field\n\tfd.L0.FullName = \"@type\"\n\tfd.L0.Index = -1\n\tfd.L1.Cardinality = protoreflect.Optional\n\tfd.L1.Kind = protoreflect.StringKind\n\treturn &fd\n}()\n\n// typeURLFieldRanger wraps a protoreflect.Message and modifies its Range method\n// to additionally iterate over a synthetic field for the type URL.\ntype typeURLFieldRanger struct {\n\torder.FieldRanger\n\ttypeURL string\n}\n\nfunc (m typeURLFieldRanger) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\tif !f(typeFieldDesc, protoreflect.ValueOfString(m.typeURL)) {\n\t\treturn\n\t}\n\tm.FieldRanger.Range(f)\n}\n\n// unpopulatedFieldRanger wraps a protoreflect.Message and modifies its Range\n// method to additionally iterate over unpopulated fields.\ntype unpopulatedFieldRanger struct {\n\tprotoreflect.Message\n\n\tskipNull bool\n}\n\nfunc (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\tfds := m.Descriptor().Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tfd := fds.Get(i)\n\t\tif m.Has(fd) || fd.ContainingOneof() != nil {\n\t\t\tcontinue // ignore populated fields and fields within a oneofs\n\t\t}\n\n\t\tv := m.Get(fd)\n\t\tif fd.HasPresence() {\n\t\t\tif m.skipNull {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tv = protoreflect.Value{} // use invalid value to emit null\n\t\t}\n\t\tif !f(fd, v) {\n\t\t\treturn\n\t\t}\n\t}\n\tm.Message.Range(f)\n}\n\n// marshalMessage marshals the fields in the given protoreflect.Message.\n// If the typeURL is non-empty, then a synthetic \"@type\" field is injected\n// containing the URL as the value.\nfunc (e encoder) marshalMessage(m protoreflect.Message, typeURL string) error {\n\tif !flags.ProtoLegacy && messageset.IsMessageSet(m.Descriptor()) {\n\t\treturn errors.New(\"no support for proto1 MessageSets\")\n\t}\n\n\tif marshal := wellKnownTypeMarshaler(m.Descriptor().FullName()); marshal != nil {\n\t\treturn marshal(e, m)\n\t}\n\n\te.StartObject()\n\tdefer e.EndObject()\n\n\tvar fields order.FieldRanger = m\n\tswitch {\n\tcase e.opts.EmitUnpopulated:\n\t\tfields = unpopulatedFieldRanger{Message: m, skipNull: false}\n\tcase e.opts.EmitDefaultValues:\n\t\tfields = unpopulatedFieldRanger{Message: m, skipNull: true}\n\t}\n\tif typeURL != \"\" {\n\t\tfields = typeURLFieldRanger{fields, typeURL}\n\t}\n\n\tvar err error\n\torder.RangeFields(fields, order.IndexNameFieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tname := fd.JSONName()\n\t\tif e.opts.UseProtoNames {\n\t\t\tname = fd.TextName()\n\t\t}\n\n\t\tif err = e.WriteName(name); err != nil {\n\t\t\treturn false\n\t\t}\n\t\tif err = e.marshalValue(v, fd); err != nil {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t})\n\treturn err\n}\n\n// marshalValue marshals the given protoreflect.Value.\nfunc (e encoder) marshalValue(val protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tswitch {\n\tcase fd.IsList():\n\t\treturn e.marshalList(val.List(), fd)\n\tcase fd.IsMap():\n\t\treturn e.marshalMap(val.Map(), fd)\n\tdefault:\n\t\treturn e.marshalSingular(val, fd)\n\t}\n}\n\n// marshalSingular marshals the given non-repeated field value. This includes\n// all scalar types, enums, messages, and groups.\nfunc (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tif !val.IsValid() {\n\t\te.WriteNull()\n\t\treturn nil\n\t}\n\n\tswitch kind := fd.Kind(); kind {\n\tcase protoreflect.BoolKind:\n\t\te.WriteBool(val.Bool())\n\n\tcase protoreflect.StringKind:\n\t\tif e.WriteString(val.String()) != nil {\n\t\t\treturn errors.InvalidUTF8(string(fd.FullName()))\n\t\t}\n\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\te.WriteInt(val.Int())\n\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\te.WriteUint(val.Uint())\n\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Uint64Kind,\n\t\tprotoreflect.Sfixed64Kind, protoreflect.Fixed64Kind:\n\t\t// 64-bit integers are written out as JSON string.\n\t\te.WriteString(val.String())\n\n\tcase protoreflect.FloatKind:\n\t\t// Encoder.WriteFloat handles the special numbers NaN and infinites.\n\t\te.WriteFloat(val.Float(), 32)\n\n\tcase protoreflect.DoubleKind:\n\t\t// Encoder.WriteFloat handles the special numbers NaN and infinites.\n\t\te.WriteFloat(val.Float(), 64)\n\n\tcase protoreflect.BytesKind:\n\t\te.WriteString(base64.StdEncoding.EncodeToString(val.Bytes()))\n\n\tcase protoreflect.EnumKind:\n\t\tif fd.Enum().FullName() == genid.NullValue_enum_fullname {\n\t\t\te.WriteNull()\n\t\t} else {\n\t\t\tdesc := fd.Enum().Values().ByNumber(val.Enum())\n\t\t\tif e.opts.UseEnumNumbers || desc == nil {\n\t\t\t\te.WriteInt(int64(val.Enum()))\n\t\t\t} else {\n\t\t\t\te.WriteString(string(desc.Name()))\n\t\t\t}\n\t\t}\n\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tif err := e.marshalMessage(val.Message(), \"\"); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"%v has unknown kind: %v\", fd.FullName(), kind))\n\t}\n\treturn nil\n}\n\n// marshalList marshals the given protoreflect.List.\nfunc (e encoder) marshalList(list protoreflect.List, fd protoreflect.FieldDescriptor) error {\n\te.StartArray()\n\tdefer e.EndArray()\n\n\tfor i := 0; i < list.Len(); i++ {\n\t\titem := list.Get(i)\n\t\tif err := e.marshalSingular(item, fd); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// marshalMap marshals given protoreflect.Map.\nfunc (e encoder) marshalMap(mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error {\n\te.StartObject()\n\tdefer e.EndObject()\n\n\tvar err error\n\torder.RangeEntries(mmap, order.GenericKeyOrder, func(k protoreflect.MapKey, v protoreflect.Value) bool {\n\t\tif err = e.WriteName(k.String()); err != nil {\n\t\t\treturn false\n\t\t}\n\t\tif err = e.marshalSingular(v, fd.MapValue()); err != nil {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t})\n\treturn err\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protojson\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"google.golang.org/protobuf/internal/encoding/json\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype marshalFunc func(encoder, protoreflect.Message) error\n\n// wellKnownTypeMarshaler returns a marshal function if the message type\n// has specialized serialization behavior. It returns nil otherwise.\nfunc wellKnownTypeMarshaler(name protoreflect.FullName) marshalFunc {\n\tif name.Parent() == genid.GoogleProtobuf_package {\n\t\tswitch name.Name() {\n\t\tcase genid.Any_message_name:\n\t\t\treturn encoder.marshalAny\n\t\tcase genid.Timestamp_message_name:\n\t\t\treturn encoder.marshalTimestamp\n\t\tcase genid.Duration_message_name:\n\t\t\treturn encoder.marshalDuration\n\t\tcase genid.BoolValue_message_name,\n\t\t\tgenid.Int32Value_message_name,\n\t\t\tgenid.Int64Value_message_name,\n\t\t\tgenid.UInt32Value_message_name,\n\t\t\tgenid.UInt64Value_message_name,\n\t\t\tgenid.FloatValue_message_name,\n\t\t\tgenid.DoubleValue_message_name,\n\t\t\tgenid.StringValue_message_name,\n\t\t\tgenid.BytesValue_message_name:\n\t\t\treturn encoder.marshalWrapperType\n\t\tcase genid.Struct_message_name:\n\t\t\treturn encoder.marshalStruct\n\t\tcase genid.ListValue_message_name:\n\t\t\treturn encoder.marshalListValue\n\t\tcase genid.Value_message_name:\n\t\t\treturn encoder.marshalKnownValue\n\t\tcase genid.FieldMask_message_name:\n\t\t\treturn encoder.marshalFieldMask\n\t\tcase genid.Empty_message_name:\n\t\t\treturn encoder.marshalEmpty\n\t\t}\n\t}\n\treturn nil\n}\n\ntype unmarshalFunc func(decoder, protoreflect.Message) error\n\n// wellKnownTypeUnmarshaler returns a unmarshal function if the message type\n// has specialized serialization behavior. It returns nil otherwise.\nfunc wellKnownTypeUnmarshaler(name protoreflect.FullName) unmarshalFunc {\n\tif name.Parent() == genid.GoogleProtobuf_package {\n\t\tswitch name.Name() {\n\t\tcase genid.Any_message_name:\n\t\t\treturn decoder.unmarshalAny\n\t\tcase genid.Timestamp_message_name:\n\t\t\treturn decoder.unmarshalTimestamp\n\t\tcase genid.Duration_message_name:\n\t\t\treturn decoder.unmarshalDuration\n\t\tcase genid.BoolValue_message_name,\n\t\t\tgenid.Int32Value_message_name,\n\t\t\tgenid.Int64Value_message_name,\n\t\t\tgenid.UInt32Value_message_name,\n\t\t\tgenid.UInt64Value_message_name,\n\t\t\tgenid.FloatValue_message_name,\n\t\t\tgenid.DoubleValue_message_name,\n\t\t\tgenid.StringValue_message_name,\n\t\t\tgenid.BytesValue_message_name:\n\t\t\treturn decoder.unmarshalWrapperType\n\t\tcase genid.Struct_message_name:\n\t\t\treturn decoder.unmarshalStruct\n\t\tcase genid.ListValue_message_name:\n\t\t\treturn decoder.unmarshalListValue\n\t\tcase genid.Value_message_name:\n\t\t\treturn decoder.unmarshalKnownValue\n\t\tcase genid.FieldMask_message_name:\n\t\t\treturn decoder.unmarshalFieldMask\n\t\tcase genid.Empty_message_name:\n\t\t\treturn decoder.unmarshalEmpty\n\t\t}\n\t}\n\treturn nil\n}\n\n// The JSON representation of an Any message uses the regular representation of\n// the deserialized, embedded message, with an additional field `@type` which\n// contains the type URL. If the embedded message type is well-known and has a\n// custom JSON representation, that representation will be embedded adding a\n// field `value` which holds the custom JSON in addition to the `@type` field.\n\nfunc (e encoder) marshalAny(m protoreflect.Message) error {\n\tfds := m.Descriptor().Fields()\n\tfdType := fds.ByNumber(genid.Any_TypeUrl_field_number)\n\tfdValue := fds.ByNumber(genid.Any_Value_field_number)\n\n\tif !m.Has(fdType) {\n\t\tif !m.Has(fdValue) {\n\t\t\t// If message is empty, marshal out empty JSON object.\n\t\t\te.StartObject()\n\t\t\te.EndObject()\n\t\t\treturn nil\n\t\t} else {\n\t\t\t// Return error if type_url field is not set, but value is set.\n\t\t\treturn errors.New(\"%s: %v is not set\", genid.Any_message_fullname, genid.Any_TypeUrl_field_name)\n\t\t}\n\t}\n\n\ttypeVal := m.Get(fdType)\n\tvalueVal := m.Get(fdValue)\n\n\t// Resolve the type in order to unmarshal value field.\n\ttypeURL := typeVal.String()\n\temt, err := e.opts.Resolver.FindMessageByURL(typeURL)\n\tif err != nil {\n\t\treturn errors.New(\"%s: unable to resolve %q: %v\", genid.Any_message_fullname, typeURL, err)\n\t}\n\n\tem := emt.New()\n\terr = proto.UnmarshalOptions{\n\t\tAllowPartial: true, // never check required fields inside an Any\n\t\tResolver:     e.opts.Resolver,\n\t}.Unmarshal(valueVal.Bytes(), em.Interface())\n\tif err != nil {\n\t\treturn errors.New(\"%s: unable to unmarshal %q: %v\", genid.Any_message_fullname, typeURL, err)\n\t}\n\n\t// If type of value has custom JSON encoding, marshal out a field \"value\"\n\t// with corresponding custom JSON encoding of the embedded message as a\n\t// field.\n\tif marshal := wellKnownTypeMarshaler(emt.Descriptor().FullName()); marshal != nil {\n\t\te.StartObject()\n\t\tdefer e.EndObject()\n\n\t\t// Marshal out @type field.\n\t\te.WriteName(\"@type\")\n\t\tif err := e.WriteString(typeURL); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\te.WriteName(\"value\")\n\t\treturn marshal(e, em)\n\t}\n\n\t// Else, marshal out the embedded message's fields in this Any object.\n\tif err := e.marshalMessage(em, typeURL); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (d decoder) unmarshalAny(m protoreflect.Message) error {\n\t// Peek to check for json.ObjectOpen to avoid advancing a read.\n\tstart, err := d.Peek()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif start.Kind() != json.ObjectOpen {\n\t\treturn d.unexpectedTokenError(start)\n\t}\n\n\t// Use another decoder to parse the unread bytes for @type field. This\n\t// avoids advancing a read from current decoder because the current JSON\n\t// object may contain the fields of the embedded type.\n\tdec := decoder{d.Clone(), UnmarshalOptions{RecursionLimit: d.opts.RecursionLimit}}\n\ttok, err := findTypeURL(dec)\n\tswitch err {\n\tcase errEmptyObject:\n\t\t// An empty JSON object translates to an empty Any message.\n\t\td.Read() // Read json.ObjectOpen.\n\t\td.Read() // Read json.ObjectClose.\n\t\treturn nil\n\n\tcase errMissingType:\n\t\tif d.opts.DiscardUnknown {\n\t\t\t// Treat all fields as unknowns, similar to an empty object.\n\t\t\treturn d.skipJSONValue()\n\t\t}\n\t\t// Use start.Pos() for line position.\n\t\treturn d.newError(start.Pos(), err.Error())\n\n\tdefault:\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\ttypeURL := tok.ParsedString()\n\temt, err := d.opts.Resolver.FindMessageByURL(typeURL)\n\tif err != nil {\n\t\treturn d.newError(tok.Pos(), \"unable to resolve %v: %q\", tok.RawString(), err)\n\t}\n\n\t// Create new message for the embedded message type and unmarshal into it.\n\tem := emt.New()\n\tif unmarshal := wellKnownTypeUnmarshaler(emt.Descriptor().FullName()); unmarshal != nil {\n\t\t// If embedded message is a custom type,\n\t\t// unmarshal the JSON \"value\" field into it.\n\t\tif err := d.unmarshalAnyValue(unmarshal, em); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\t// Else unmarshal the current JSON object into it.\n\t\tif err := d.unmarshalMessage(em, true); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// Serialize the embedded message and assign the resulting bytes to the\n\t// proto value field.\n\tb, err := proto.MarshalOptions{\n\t\tAllowPartial:  true, // No need to check required fields inside an Any.\n\t\tDeterministic: true,\n\t}.Marshal(em.Interface())\n\tif err != nil {\n\t\treturn d.newError(start.Pos(), \"error in marshaling Any.value field: %v\", err)\n\t}\n\n\tfds := m.Descriptor().Fields()\n\tfdType := fds.ByNumber(genid.Any_TypeUrl_field_number)\n\tfdValue := fds.ByNumber(genid.Any_Value_field_number)\n\n\tm.Set(fdType, protoreflect.ValueOfString(typeURL))\n\tm.Set(fdValue, protoreflect.ValueOfBytes(b))\n\treturn nil\n}\n\nvar errEmptyObject = fmt.Errorf(`empty object`)\nvar errMissingType = fmt.Errorf(`missing \"@type\" field`)\n\n// findTypeURL returns the token for the \"@type\" field value from the given\n// JSON bytes. It is expected that the given bytes start with json.ObjectOpen.\n// It returns errEmptyObject if the JSON object is empty or errMissingType if\n// @type field does not exist. It returns other error if the @type field is not\n// valid or other decoding issues.\nfunc findTypeURL(d decoder) (json.Token, error) {\n\tvar typeURL string\n\tvar typeTok json.Token\n\tnumFields := 0\n\t// Skip start object.\n\td.Read()\n\nLoop:\n\tfor {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn json.Token{}, err\n\t\t}\n\n\t\tswitch tok.Kind() {\n\t\tcase json.ObjectClose:\n\t\t\tif typeURL == \"\" {\n\t\t\t\t// Did not find @type field.\n\t\t\t\tif numFields > 0 {\n\t\t\t\t\treturn json.Token{}, errMissingType\n\t\t\t\t}\n\t\t\t\treturn json.Token{}, errEmptyObject\n\t\t\t}\n\t\t\tbreak Loop\n\n\t\tcase json.Name:\n\t\t\tnumFields++\n\t\t\tif tok.Name() != \"@type\" {\n\t\t\t\t// Skip value.\n\t\t\t\tif err := d.skipJSONValue(); err != nil {\n\t\t\t\t\treturn json.Token{}, err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Return error if this was previously set already.\n\t\t\tif typeURL != \"\" {\n\t\t\t\treturn json.Token{}, d.newError(tok.Pos(), `duplicate \"@type\" field`)\n\t\t\t}\n\t\t\t// Read field value.\n\t\t\ttok, err := d.Read()\n\t\t\tif err != nil {\n\t\t\t\treturn json.Token{}, err\n\t\t\t}\n\t\t\tif tok.Kind() != json.String {\n\t\t\t\treturn json.Token{}, d.newError(tok.Pos(), `@type field value is not a string: %v`, tok.RawString())\n\t\t\t}\n\t\t\ttypeURL = tok.ParsedString()\n\t\t\tif typeURL == \"\" {\n\t\t\t\treturn json.Token{}, d.newError(tok.Pos(), `@type field contains empty value`)\n\t\t\t}\n\t\t\ttypeTok = tok\n\t\t}\n\t}\n\n\treturn typeTok, nil\n}\n\n// skipJSONValue parses a JSON value (null, boolean, string, number, object and\n// array) in order to advance the read to the next JSON value. It relies on\n// the decoder returning an error if the types are not in valid sequence.\nfunc (d decoder) skipJSONValue() error {\n\tvar open int\n\tfor {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tcase json.ObjectClose, json.ArrayClose:\n\t\t\topen--\n\t\tcase json.ObjectOpen, json.ArrayOpen:\n\t\t\topen++\n\t\t\tif open > d.opts.RecursionLimit {\n\t\t\t\treturn errors.New(\"exceeded max recursion depth\")\n\t\t\t}\n\t\tcase json.EOF:\n\t\t\t// This can only happen if there's a bug in Decoder.Read.\n\t\t\t// Avoid an infinite loop if this does happen.\n\t\t\treturn errors.New(\"unexpected EOF\")\n\t\t}\n\t\tif open == 0 {\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\n// unmarshalAnyValue unmarshals the given custom-type message from the JSON\n// object's \"value\" field.\nfunc (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m protoreflect.Message) error {\n\t// Skip ObjectOpen, and start reading the fields.\n\td.Read()\n\n\tvar found bool // Used for detecting duplicate \"value\".\n\tfor {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tcase json.ObjectClose:\n\t\t\tif !found {\n\t\t\t\t// We tolerate an omitted `value` field with the google.protobuf.Empty Well-Known-Type,\n\t\t\t\t// for compatibility with other proto runtimes that have interpreted the spec differently.\n\t\t\t\tif m.Descriptor().FullName() != genid.Empty_message_fullname {\n\t\t\t\t\treturn d.newError(tok.Pos(), `missing \"value\" field`)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil\n\n\t\tcase json.Name:\n\t\t\tswitch tok.Name() {\n\t\t\tcase \"@type\":\n\t\t\t\t// Skip the value as this was previously parsed already.\n\t\t\t\td.Read()\n\n\t\t\tcase \"value\":\n\t\t\t\tif found {\n\t\t\t\t\treturn d.newError(tok.Pos(), `duplicate \"value\" field`)\n\t\t\t\t}\n\t\t\t\t// Unmarshal the field value into the given message.\n\t\t\t\tif err := unmarshal(d, m); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tfound = true\n\n\t\t\tdefault:\n\t\t\t\tif d.opts.DiscardUnknown {\n\t\t\t\t\tif err := d.skipJSONValue(); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn d.newError(tok.Pos(), \"unknown field %v\", tok.RawString())\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Wrapper types are encoded as JSON primitives like string, number or boolean.\n\nfunc (e encoder) marshalWrapperType(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.WrapperValue_Value_field_number)\n\tval := m.Get(fd)\n\treturn e.marshalSingular(val, fd)\n}\n\nfunc (d decoder) unmarshalWrapperType(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.WrapperValue_Value_field_number)\n\tval, err := d.unmarshalScalar(fd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.Set(fd, val)\n\treturn nil\n}\n\n// The JSON representation for Empty is an empty JSON object.\n\nfunc (e encoder) marshalEmpty(protoreflect.Message) error {\n\te.StartObject()\n\te.EndObject()\n\treturn nil\n}\n\nfunc (d decoder) unmarshalEmpty(protoreflect.Message) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.ObjectOpen {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\tfor {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tcase json.ObjectClose:\n\t\t\treturn nil\n\n\t\tcase json.Name:\n\t\t\tif d.opts.DiscardUnknown {\n\t\t\t\tif err := d.skipJSONValue(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn d.newError(tok.Pos(), \"unknown field %v\", tok.RawString())\n\n\t\tdefault:\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\t}\n}\n\n// The JSON representation for Struct is a JSON object that contains the encoded\n// Struct.fields map and follows the serialization rules for a map.\n\nfunc (e encoder) marshalStruct(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.Struct_Fields_field_number)\n\treturn e.marshalMap(m.Get(fd).Map(), fd)\n}\n\nfunc (d decoder) unmarshalStruct(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.Struct_Fields_field_number)\n\treturn d.unmarshalMap(m.Mutable(fd).Map(), fd)\n}\n\n// The JSON representation for ListValue is JSON array that contains the encoded\n// ListValue.values repeated field and follows the serialization rules for a\n// repeated field.\n\nfunc (e encoder) marshalListValue(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.ListValue_Values_field_number)\n\treturn e.marshalList(m.Get(fd).List(), fd)\n}\n\nfunc (d decoder) unmarshalListValue(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.ListValue_Values_field_number)\n\treturn d.unmarshalList(m.Mutable(fd).List(), fd)\n}\n\n// The JSON representation for a Value is dependent on the oneof field that is\n// set. Each of the field in the oneof has its own custom serialization rule. A\n// Value message needs to be a oneof field set, else it is an error.\n\nfunc (e encoder) marshalKnownValue(m protoreflect.Message) error {\n\tod := m.Descriptor().Oneofs().ByName(genid.Value_Kind_oneof_name)\n\tfd := m.WhichOneof(od)\n\tif fd == nil {\n\t\treturn errors.New(\"%s: none of the oneof fields is set\", genid.Value_message_fullname)\n\t}\n\tif fd.Number() == genid.Value_NumberValue_field_number {\n\t\tif v := m.Get(fd).Float(); math.IsNaN(v) || math.IsInf(v, 0) {\n\t\t\treturn errors.New(\"%s: invalid %v value\", genid.Value_NumberValue_field_fullname, v)\n\t\t}\n\t}\n\treturn e.marshalSingular(m.Get(fd), fd)\n}\n\nfunc (d decoder) unmarshalKnownValue(m protoreflect.Message) error {\n\ttok, err := d.Peek()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar fd protoreflect.FieldDescriptor\n\tvar val protoreflect.Value\n\tswitch tok.Kind() {\n\tcase json.Null:\n\t\td.Read()\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_NullValue_field_number)\n\t\tval = protoreflect.ValueOfEnum(0)\n\n\tcase json.Bool:\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_BoolValue_field_number)\n\t\tval = protoreflect.ValueOfBool(tok.Bool())\n\n\tcase json.Number:\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_NumberValue_field_number)\n\t\tvar ok bool\n\t\tval, ok = unmarshalFloat(tok, 64)\n\t\tif !ok {\n\t\t\treturn d.newError(tok.Pos(), \"invalid %v: %v\", genid.Value_message_fullname, tok.RawString())\n\t\t}\n\n\tcase json.String:\n\t\t// A JSON string may have been encoded from the number_value field,\n\t\t// e.g. \"NaN\", \"Infinity\", etc. Parsing a proto double type also allows\n\t\t// for it to be in JSON string form. Given this custom encoding spec,\n\t\t// however, there is no way to identify that and hence a JSON string is\n\t\t// always assigned to the string_value field, which means that certain\n\t\t// encoding cannot be parsed back to the same field.\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_StringValue_field_number)\n\t\tval = protoreflect.ValueOfString(tok.ParsedString())\n\n\tcase json.ObjectOpen:\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_StructValue_field_number)\n\t\tval = m.NewField(fd)\n\t\tif err := d.unmarshalStruct(val.Message()); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase json.ArrayOpen:\n\t\tfd = m.Descriptor().Fields().ByNumber(genid.Value_ListValue_field_number)\n\t\tval = m.NewField(fd)\n\t\tif err := d.unmarshalListValue(val.Message()); err != nil {\n\t\t\treturn err\n\t\t}\n\n\tdefault:\n\t\treturn d.newError(tok.Pos(), \"invalid %v: %v\", genid.Value_message_fullname, tok.RawString())\n\t}\n\n\tm.Set(fd, val)\n\treturn nil\n}\n\n// The JSON representation for a Duration is a JSON string that ends in the\n// suffix \"s\" (indicating seconds) and is preceded by the number of seconds,\n// with nanoseconds expressed as fractional seconds.\n//\n// Durations less than one second are represented with a 0 seconds field and a\n// positive or negative nanos field. For durations of one second or more, a\n// non-zero value for the nanos field must be of the same sign as the seconds\n// field.\n//\n// Duration.seconds must be from -315,576,000,000 to +315,576,000,000 inclusive.\n// Duration.nanos must be from -999,999,999 to +999,999,999 inclusive.\n\nconst (\n\tsecondsInNanos       = 999999999\n\tmaxSecondsInDuration = 315576000000\n)\n\nfunc (e encoder) marshalDuration(m protoreflect.Message) error {\n\tfds := m.Descriptor().Fields()\n\tfdSeconds := fds.ByNumber(genid.Duration_Seconds_field_number)\n\tfdNanos := fds.ByNumber(genid.Duration_Nanos_field_number)\n\n\tsecsVal := m.Get(fdSeconds)\n\tnanosVal := m.Get(fdNanos)\n\tsecs := secsVal.Int()\n\tnanos := nanosVal.Int()\n\tif secs < -maxSecondsInDuration || secs > maxSecondsInDuration {\n\t\treturn errors.New(\"%s: seconds out of range %v\", genid.Duration_message_fullname, secs)\n\t}\n\tif nanos < -secondsInNanos || nanos > secondsInNanos {\n\t\treturn errors.New(\"%s: nanos out of range %v\", genid.Duration_message_fullname, nanos)\n\t}\n\tif (secs > 0 && nanos < 0) || (secs < 0 && nanos > 0) {\n\t\treturn errors.New(\"%s: signs of seconds and nanos do not match\", genid.Duration_message_fullname)\n\t}\n\t// Generated output always contains 0, 3, 6, or 9 fractional digits,\n\t// depending on required precision, followed by the suffix \"s\".\n\tvar sign string\n\tif secs < 0 || nanos < 0 {\n\t\tsign, secs, nanos = \"-\", -1*secs, -1*nanos\n\t}\n\tx := fmt.Sprintf(\"%s%d.%09d\", sign, secs, nanos)\n\tx = strings.TrimSuffix(x, \"000\")\n\tx = strings.TrimSuffix(x, \"000\")\n\tx = strings.TrimSuffix(x, \".000\")\n\te.WriteString(x + \"s\")\n\treturn nil\n}\n\nfunc (d decoder) unmarshalDuration(m protoreflect.Message) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.String {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\tsecs, nanos, ok := parseDuration(tok.ParsedString())\n\tif !ok {\n\t\treturn d.newError(tok.Pos(), \"invalid %v value %v\", genid.Duration_message_fullname, tok.RawString())\n\t}\n\t// Validate seconds. No need to validate nanos because parseDuration would\n\t// have covered that already.\n\tif secs < -maxSecondsInDuration || secs > maxSecondsInDuration {\n\t\treturn d.newError(tok.Pos(), \"%v value out of range: %v\", genid.Duration_message_fullname, tok.RawString())\n\t}\n\n\tfds := m.Descriptor().Fields()\n\tfdSeconds := fds.ByNumber(genid.Duration_Seconds_field_number)\n\tfdNanos := fds.ByNumber(genid.Duration_Nanos_field_number)\n\n\tm.Set(fdSeconds, protoreflect.ValueOfInt64(secs))\n\tm.Set(fdNanos, protoreflect.ValueOfInt32(nanos))\n\treturn nil\n}\n\n// parseDuration parses the given input string for seconds and nanoseconds value\n// for the Duration JSON format. The format is a decimal number with a suffix\n// 's'. It can have optional plus/minus sign. There needs to be at least an\n// integer or fractional part. Fractional part is limited to 9 digits only for\n// nanoseconds precision, regardless of whether there are trailing zero digits.\n// Example values are 1s, 0.1s, 1.s, .1s, +1s, -1s, -.1s.\nfunc parseDuration(input string) (int64, int32, bool) {\n\tb := []byte(input)\n\tsize := len(b)\n\tif size < 2 {\n\t\treturn 0, 0, false\n\t}\n\tif b[size-1] != 's' {\n\t\treturn 0, 0, false\n\t}\n\tb = b[:size-1]\n\n\t// Read optional plus/minus symbol.\n\tvar neg bool\n\tswitch b[0] {\n\tcase '-':\n\t\tneg = true\n\t\tb = b[1:]\n\tcase '+':\n\t\tb = b[1:]\n\t}\n\tif len(b) == 0 {\n\t\treturn 0, 0, false\n\t}\n\n\t// Read the integer part.\n\tvar intp []byte\n\tswitch {\n\tcase b[0] == '0':\n\t\tb = b[1:]\n\n\tcase '1' <= b[0] && b[0] <= '9':\n\t\tintp = b[0:]\n\t\tb = b[1:]\n\t\tn := 1\n\t\tfor len(b) > 0 && '0' <= b[0] && b[0] <= '9' {\n\t\t\tn++\n\t\t\tb = b[1:]\n\t\t}\n\t\tintp = intp[:n]\n\n\tcase b[0] == '.':\n\t\t// Continue below.\n\n\tdefault:\n\t\treturn 0, 0, false\n\t}\n\n\thasFrac := false\n\tvar frac [9]byte\n\tif len(b) > 0 {\n\t\tif b[0] != '.' {\n\t\t\treturn 0, 0, false\n\t\t}\n\t\t// Read the fractional part.\n\t\tb = b[1:]\n\t\tn := 0\n\t\tfor len(b) > 0 && n < 9 && '0' <= b[0] && b[0] <= '9' {\n\t\t\tfrac[n] = b[0]\n\t\t\tn++\n\t\t\tb = b[1:]\n\t\t}\n\t\t// It is not valid if there are more bytes left.\n\t\tif len(b) > 0 {\n\t\t\treturn 0, 0, false\n\t\t}\n\t\t// Pad fractional part with 0s.\n\t\tfor i := n; i < 9; i++ {\n\t\t\tfrac[i] = '0'\n\t\t}\n\t\thasFrac = true\n\t}\n\n\tvar secs int64\n\tif len(intp) > 0 {\n\t\tvar err error\n\t\tsecs, err = strconv.ParseInt(string(intp), 10, 64)\n\t\tif err != nil {\n\t\t\treturn 0, 0, false\n\t\t}\n\t}\n\n\tvar nanos int64\n\tif hasFrac {\n\t\tnanob := bytes.TrimLeft(frac[:], \"0\")\n\t\tif len(nanob) > 0 {\n\t\t\tvar err error\n\t\t\tnanos, err = strconv.ParseInt(string(nanob), 10, 32)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, 0, false\n\t\t\t}\n\t\t}\n\t}\n\n\tif neg {\n\t\tif secs > 0 {\n\t\t\tsecs = -secs\n\t\t}\n\t\tif nanos > 0 {\n\t\t\tnanos = -nanos\n\t\t}\n\t}\n\treturn secs, int32(nanos), true\n}\n\n// The JSON representation for a Timestamp is a JSON string in the RFC 3339\n// format, i.e. \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where\n// {year} is always expressed using four digits while {month}, {day}, {hour},\n// {min}, and {sec} are zero-padded to two digits each. The fractional seconds,\n// which can go up to 9 digits, up to 1 nanosecond resolution, is optional. The\n// \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. Encoding\n// should always use UTC (as indicated by \"Z\") and a decoder should be able to\n// accept both UTC and other timezones (as indicated by an offset).\n//\n// Timestamp.seconds must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z\n// inclusive.\n// Timestamp.nanos must be from 0 to 999,999,999 inclusive.\n\nconst (\n\tmaxTimestampSeconds = 253402300799\n\tminTimestampSeconds = -62135596800\n)\n\nfunc (e encoder) marshalTimestamp(m protoreflect.Message) error {\n\tfds := m.Descriptor().Fields()\n\tfdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number)\n\tfdNanos := fds.ByNumber(genid.Timestamp_Nanos_field_number)\n\n\tsecsVal := m.Get(fdSeconds)\n\tnanosVal := m.Get(fdNanos)\n\tsecs := secsVal.Int()\n\tnanos := nanosVal.Int()\n\tif secs < minTimestampSeconds || secs > maxTimestampSeconds {\n\t\treturn errors.New(\"%s: seconds out of range %v\", genid.Timestamp_message_fullname, secs)\n\t}\n\tif nanos < 0 || nanos > secondsInNanos {\n\t\treturn errors.New(\"%s: nanos out of range %v\", genid.Timestamp_message_fullname, nanos)\n\t}\n\t// Uses RFC 3339, where generated output will be Z-normalized and uses 0, 3,\n\t// 6 or 9 fractional digits.\n\tt := time.Unix(secs, nanos).UTC()\n\tx := t.Format(\"2006-01-02T15:04:05.000000000\")\n\tx = strings.TrimSuffix(x, \"000\")\n\tx = strings.TrimSuffix(x, \"000\")\n\tx = strings.TrimSuffix(x, \".000\")\n\te.WriteString(x + \"Z\")\n\treturn nil\n}\n\nfunc (d decoder) unmarshalTimestamp(m protoreflect.Message) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.String {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\n\ts := tok.ParsedString()\n\tt, err := time.Parse(time.RFC3339Nano, s)\n\tif err != nil {\n\t\treturn d.newError(tok.Pos(), \"invalid %v value %v\", genid.Timestamp_message_fullname, tok.RawString())\n\t}\n\t// Validate seconds.\n\tsecs := t.Unix()\n\tif secs < minTimestampSeconds || secs > maxTimestampSeconds {\n\t\treturn d.newError(tok.Pos(), \"%v value out of range: %v\", genid.Timestamp_message_fullname, tok.RawString())\n\t}\n\t// Validate subseconds.\n\ti := strings.LastIndexByte(s, '.')  // start of subsecond field\n\tj := strings.LastIndexAny(s, \"Z-+\") // start of timezone field\n\tif i >= 0 && j >= i && j-i > len(\".999999999\") {\n\t\treturn d.newError(tok.Pos(), \"invalid %v value %v\", genid.Timestamp_message_fullname, tok.RawString())\n\t}\n\n\tfds := m.Descriptor().Fields()\n\tfdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number)\n\tfdNanos := fds.ByNumber(genid.Timestamp_Nanos_field_number)\n\n\tm.Set(fdSeconds, protoreflect.ValueOfInt64(secs))\n\tm.Set(fdNanos, protoreflect.ValueOfInt32(int32(t.Nanosecond())))\n\treturn nil\n}\n\n// The JSON representation for a FieldMask is a JSON string where paths are\n// separated by a comma. Fields name in each path are converted to/from\n// lower-camel naming conventions. Encoding should fail if the path name would\n// end up differently after a round-trip.\n\nfunc (e encoder) marshalFieldMask(m protoreflect.Message) error {\n\tfd := m.Descriptor().Fields().ByNumber(genid.FieldMask_Paths_field_number)\n\tlist := m.Get(fd).List()\n\tpaths := make([]string, 0, list.Len())\n\n\tfor i := 0; i < list.Len(); i++ {\n\t\ts := list.Get(i).String()\n\t\tif !protoreflect.FullName(s).IsValid() {\n\t\t\treturn errors.New(\"%s contains invalid path: %q\", genid.FieldMask_Paths_field_fullname, s)\n\t\t}\n\t\t// Return error if conversion to camelCase is not reversible.\n\t\tcc := strs.JSONCamelCase(s)\n\t\tif s != strs.JSONSnakeCase(cc) {\n\t\t\treturn errors.New(\"%s contains irreversible value %q\", genid.FieldMask_Paths_field_fullname, s)\n\t\t}\n\t\tpaths = append(paths, cc)\n\t}\n\n\te.WriteString(strings.Join(paths, \",\"))\n\treturn nil\n}\n\nfunc (d decoder) unmarshalFieldMask(m protoreflect.Message) error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif tok.Kind() != json.String {\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n\tstr := strings.TrimSpace(tok.ParsedString())\n\tif str == \"\" {\n\t\treturn nil\n\t}\n\tpaths := strings.Split(str, \",\")\n\n\tfd := m.Descriptor().Fields().ByNumber(genid.FieldMask_Paths_field_number)\n\tlist := m.Mutable(fd).List()\n\n\tfor _, s0 := range paths {\n\t\ts := strs.JSONSnakeCase(s0)\n\t\tif strings.Contains(s0, \"_\") || !protoreflect.FullName(s).IsValid() {\n\t\t\treturn d.newError(tok.Pos(), \"%v contains invalid path: %q\", genid.FieldMask_Paths_field_fullname, s0)\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfString(s))\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/prototext/decode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage prototext\n\nimport (\n\t\"fmt\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/encoding/text\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/internal/set\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\n// Unmarshal reads the given []byte into the given [proto.Message].\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\nfunc Unmarshal(b []byte, m proto.Message) error {\n\treturn UnmarshalOptions{}.Unmarshal(b, m)\n}\n\n// UnmarshalOptions is a configurable textproto format unmarshaler.\ntype UnmarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// AllowPartial accepts input for messages that will result in missing\n\t// required fields. If AllowPartial is false (the default), Unmarshal will\n\t// return error if there are any missing required fields.\n\tAllowPartial bool\n\n\t// DiscardUnknown specifies whether to ignore unknown fields when parsing.\n\t// An unknown field is any field whose field name or field number does not\n\t// resolve to any known or extension field in the message.\n\t// By default, unmarshal rejects unknown fields as an error.\n\tDiscardUnknown bool\n\n\t// Resolver is used for looking up types when unmarshaling\n\t// google.protobuf.Any messages or extension fields.\n\t// If nil, this defaults to using protoregistry.GlobalTypes.\n\tResolver interface {\n\t\tprotoregistry.MessageTypeResolver\n\t\tprotoregistry.ExtensionTypeResolver\n\t}\n}\n\n// Unmarshal reads the given []byte and populates the given [proto.Message]\n// using options in the UnmarshalOptions object.\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\nfunc (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {\n\treturn o.unmarshal(b, m)\n}\n\n// unmarshal is a centralized function that all unmarshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for unmarshal that do not go through this.\nfunc (o UnmarshalOptions) unmarshal(b []byte, m proto.Message) error {\n\tproto.Reset(m)\n\n\tif o.Resolver == nil {\n\t\to.Resolver = protoregistry.GlobalTypes\n\t}\n\n\tdec := decoder{text.NewDecoder(b), o}\n\tif err := dec.unmarshalMessage(m.ProtoReflect(), false); err != nil {\n\t\treturn err\n\t}\n\tif o.AllowPartial {\n\t\treturn nil\n\t}\n\treturn proto.CheckInitialized(m)\n}\n\ntype decoder struct {\n\t*text.Decoder\n\topts UnmarshalOptions\n}\n\n// newError returns an error object with position info.\nfunc (d decoder) newError(pos int, f string, x ...any) error {\n\tline, column := d.Position(pos)\n\thead := fmt.Sprintf(\"(line %d:%d): \", line, column)\n\treturn errors.New(head+f, x...)\n}\n\n// unexpectedTokenError returns a syntax error for the given unexpected token.\nfunc (d decoder) unexpectedTokenError(tok text.Token) error {\n\treturn d.syntaxError(tok.Pos(), \"unexpected token: %s\", tok.RawString())\n}\n\n// syntaxError returns a syntax error for given position.\nfunc (d decoder) syntaxError(pos int, f string, x ...any) error {\n\tline, column := d.Position(pos)\n\thead := fmt.Sprintf(\"syntax error (line %d:%d): \", line, column)\n\treturn errors.New(head+f, x...)\n}\n\n// unmarshalMessage unmarshals into the given protoreflect.Message.\nfunc (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error {\n\tmessageDesc := m.Descriptor()\n\tif !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {\n\t\treturn errors.New(\"no support for proto1 MessageSets\")\n\t}\n\n\tif messageDesc.FullName() == genid.Any_message_fullname {\n\t\treturn d.unmarshalAny(m, checkDelims)\n\t}\n\n\tif checkDelims {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif tok.Kind() != text.MessageOpen {\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\t}\n\n\tvar seenNums set.Ints\n\tvar seenOneofs set.Ints\n\tfieldDescs := messageDesc.Fields()\n\n\tfor {\n\t\t// Read field name.\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch typ := tok.Kind(); typ {\n\t\tcase text.Name:\n\t\t\t// Continue below.\n\t\tcase text.EOF:\n\t\t\tif checkDelims {\n\t\t\t\treturn text.ErrUnexpectedEOF\n\t\t\t}\n\t\t\treturn nil\n\t\tdefault:\n\t\t\tif checkDelims && typ == text.MessageClose {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\n\t\t// Resolve the field descriptor.\n\t\tvar name protoreflect.Name\n\t\tvar fd protoreflect.FieldDescriptor\n\t\tvar xt protoreflect.ExtensionType\n\t\tvar xtErr error\n\t\tvar isFieldNumberName bool\n\n\t\tswitch tok.NameKind() {\n\t\tcase text.IdentName:\n\t\t\tname = protoreflect.Name(tok.IdentName())\n\t\t\tfd = fieldDescs.ByTextName(string(name))\n\n\t\tcase text.TypeName:\n\t\t\t// Handle extensions only. This code path is not for Any.\n\t\t\txt, xtErr = d.opts.Resolver.FindExtensionByName(protoreflect.FullName(tok.TypeName()))\n\n\t\tcase text.FieldNumber:\n\t\t\tisFieldNumberName = true\n\t\t\tnum := protoreflect.FieldNumber(tok.FieldNumber())\n\t\t\tif !num.IsValid() {\n\t\t\t\treturn d.newError(tok.Pos(), \"invalid field number: %d\", num)\n\t\t\t}\n\t\t\tfd = fieldDescs.ByNumber(num)\n\t\t\tif fd == nil {\n\t\t\t\txt, xtErr = d.opts.Resolver.FindExtensionByNumber(messageDesc.FullName(), num)\n\t\t\t}\n\t\t}\n\n\t\tif xt != nil {\n\t\t\tfd = xt.TypeDescriptor()\n\t\t\tif !messageDesc.ExtensionRanges().Has(fd.Number()) || fd.ContainingMessage().FullName() != messageDesc.FullName() {\n\t\t\t\treturn d.newError(tok.Pos(), \"message %v cannot be extended by %v\", messageDesc.FullName(), fd.FullName())\n\t\t\t}\n\t\t} else if xtErr != nil && xtErr != protoregistry.NotFound {\n\t\t\treturn d.newError(tok.Pos(), \"unable to resolve [%s]: %v\", tok.RawString(), xtErr)\n\t\t}\n\n\t\t// Handle unknown fields.\n\t\tif fd == nil {\n\t\t\tif d.opts.DiscardUnknown || messageDesc.ReservedNames().Has(name) {\n\t\t\t\td.skipValue()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn d.newError(tok.Pos(), \"unknown field: %v\", tok.RawString())\n\t\t}\n\n\t\t// Handle fields identified by field number.\n\t\tif isFieldNumberName {\n\t\t\t// TODO: Add an option to permit parsing field numbers.\n\t\t\t//\n\t\t\t// This requires careful thought as the MarshalOptions.EmitUnknown\n\t\t\t// option allows formatting unknown fields as the field number and the\n\t\t\t// best-effort textual representation of the field value.  In that case,\n\t\t\t// it may not be possible to unmarshal the value from a parser that does\n\t\t\t// have information about the unknown field.\n\t\t\treturn d.newError(tok.Pos(), \"cannot specify field by number: %v\", tok.RawString())\n\t\t}\n\n\t\tswitch {\n\t\tcase fd.IsList():\n\t\t\tkind := fd.Kind()\n\t\t\tif kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() {\n\t\t\t\treturn d.syntaxError(tok.Pos(), \"missing field separator :\")\n\t\t\t}\n\n\t\t\tlist := m.Mutable(fd).List()\n\t\t\tif err := d.unmarshalList(fd, list); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase fd.IsMap():\n\t\t\tmmap := m.Mutable(fd).Map()\n\t\t\tif err := d.unmarshalMap(fd, mmap); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tdefault:\n\t\t\tkind := fd.Kind()\n\t\t\tif kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() {\n\t\t\t\treturn d.syntaxError(tok.Pos(), \"missing field separator :\")\n\t\t\t}\n\n\t\t\t// If field is a oneof, check if it has already been set.\n\t\t\tif od := fd.ContainingOneof(); od != nil {\n\t\t\t\tidx := uint64(od.Index())\n\t\t\t\tif seenOneofs.Has(idx) {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"error parsing %q, oneof %v is already set\", tok.RawString(), od.FullName())\n\t\t\t\t}\n\t\t\t\tseenOneofs.Set(idx)\n\t\t\t}\n\n\t\t\tnum := uint64(fd.Number())\n\t\t\tif seenNums.Has(num) {\n\t\t\t\treturn d.newError(tok.Pos(), \"non-repeated field %q is repeated\", tok.RawString())\n\t\t\t}\n\n\t\t\tif err := d.unmarshalSingular(fd, m); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tseenNums.Set(num)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// unmarshalSingular unmarshals a non-repeated field value specified by the\n// given FieldDescriptor.\nfunc (d decoder) unmarshalSingular(fd protoreflect.FieldDescriptor, m protoreflect.Message) error {\n\tvar val protoreflect.Value\n\tvar err error\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tval = m.NewField(fd)\n\t\terr = d.unmarshalMessage(val.Message(), true)\n\tdefault:\n\t\tval, err = d.unmarshalScalar(fd)\n\t}\n\tif err == nil {\n\t\tm.Set(fd, val)\n\t}\n\treturn err\n}\n\n// unmarshalScalar unmarshals a scalar/enum protoreflect.Value specified by the\n// given FieldDescriptor.\nfunc (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn protoreflect.Value{}, err\n\t}\n\n\tif tok.Kind() != text.Scalar {\n\t\treturn protoreflect.Value{}, d.unexpectedTokenError(tok)\n\t}\n\n\tkind := fd.Kind()\n\tswitch kind {\n\tcase protoreflect.BoolKind:\n\t\tif b, ok := tok.Bool(); ok {\n\t\t\treturn protoreflect.ValueOfBool(b), nil\n\t\t}\n\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif n, ok := tok.Int32(); ok {\n\t\t\treturn protoreflect.ValueOfInt32(n), nil\n\t\t}\n\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif n, ok := tok.Int64(); ok {\n\t\t\treturn protoreflect.ValueOfInt64(n), nil\n\t\t}\n\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif n, ok := tok.Uint32(); ok {\n\t\t\treturn protoreflect.ValueOfUint32(n), nil\n\t\t}\n\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif n, ok := tok.Uint64(); ok {\n\t\t\treturn protoreflect.ValueOfUint64(n), nil\n\t\t}\n\n\tcase protoreflect.FloatKind:\n\t\tif n, ok := tok.Float32(); ok {\n\t\t\treturn protoreflect.ValueOfFloat32(n), nil\n\t\t}\n\n\tcase protoreflect.DoubleKind:\n\t\tif n, ok := tok.Float64(); ok {\n\t\t\treturn protoreflect.ValueOfFloat64(n), nil\n\t\t}\n\n\tcase protoreflect.StringKind:\n\t\tif s, ok := tok.String(); ok {\n\t\t\tif strs.EnforceUTF8(fd) && !utf8.ValidString(s) {\n\t\t\t\treturn protoreflect.Value{}, d.newError(tok.Pos(), \"contains invalid UTF-8\")\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfString(s), nil\n\t\t}\n\n\tcase protoreflect.BytesKind:\n\t\tif b, ok := tok.String(); ok {\n\t\t\treturn protoreflect.ValueOfBytes([]byte(b)), nil\n\t\t}\n\n\tcase protoreflect.EnumKind:\n\t\tif lit, ok := tok.Enum(); ok {\n\t\t\t// Lookup EnumNumber based on name.\n\t\t\tif enumVal := fd.Enum().Values().ByName(protoreflect.Name(lit)); enumVal != nil {\n\t\t\t\treturn protoreflect.ValueOfEnum(enumVal.Number()), nil\n\t\t\t}\n\t\t}\n\t\tif num, ok := tok.Int32(); ok {\n\t\t\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(num)), nil\n\t\t}\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"invalid scalar kind %v\", kind))\n\t}\n\n\treturn protoreflect.Value{}, d.newError(tok.Pos(), \"invalid value for %v type: %v\", kind, tok.RawString())\n}\n\n// unmarshalList unmarshals into given protoreflect.List. A list value can\n// either be in [] syntax or simply just a single scalar/message value.\nfunc (d decoder) unmarshalList(fd protoreflect.FieldDescriptor, list protoreflect.List) error {\n\ttok, err := d.Peek()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tswitch tok.Kind() {\n\t\tcase text.ListOpen:\n\t\t\td.Read()\n\t\t\tfor {\n\t\t\t\ttok, err := d.Peek()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tswitch tok.Kind() {\n\t\t\t\tcase text.ListClose:\n\t\t\t\t\td.Read()\n\t\t\t\t\treturn nil\n\t\t\t\tcase text.MessageOpen:\n\t\t\t\t\tpval := list.NewElement()\n\t\t\t\t\tif err := d.unmarshalMessage(pval.Message(), true); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tlist.Append(pval)\n\t\t\t\tdefault:\n\t\t\t\t\treturn d.unexpectedTokenError(tok)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase text.MessageOpen:\n\t\t\tpval := list.NewElement()\n\t\t\tif err := d.unmarshalMessage(pval.Message(), true); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tlist.Append(pval)\n\t\t\treturn nil\n\t\t}\n\n\tdefault:\n\t\tswitch tok.Kind() {\n\t\tcase text.ListOpen:\n\t\t\td.Read()\n\t\t\tfor {\n\t\t\t\ttok, err := d.Peek()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tswitch tok.Kind() {\n\t\t\t\tcase text.ListClose:\n\t\t\t\t\td.Read()\n\t\t\t\t\treturn nil\n\t\t\t\tcase text.Scalar:\n\t\t\t\t\tpval, err := d.unmarshalScalar(fd)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tlist.Append(pval)\n\t\t\t\tdefault:\n\t\t\t\t\treturn d.unexpectedTokenError(tok)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase text.Scalar:\n\t\t\tpval, err := d.unmarshalScalar(fd)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tlist.Append(pval)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn d.unexpectedTokenError(tok)\n}\n\n// unmarshalMap unmarshals into given protoreflect.Map. A map value is a\n// textproto message containing {key: <kvalue>, value: <mvalue>}.\nfunc (d decoder) unmarshalMap(fd protoreflect.FieldDescriptor, mmap protoreflect.Map) error {\n\t// Determine ahead whether map entry is a scalar type or a message type in\n\t// order to call the appropriate unmarshalMapValue func inside\n\t// unmarshalMapEntry.\n\tvar unmarshalMapValue func() (protoreflect.Value, error)\n\tswitch fd.MapValue().Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tunmarshalMapValue = func() (protoreflect.Value, error) {\n\t\t\tpval := mmap.NewValue()\n\t\t\tif err := d.unmarshalMessage(pval.Message(), true); err != nil {\n\t\t\t\treturn protoreflect.Value{}, err\n\t\t\t}\n\t\t\treturn pval, nil\n\t\t}\n\tdefault:\n\t\tunmarshalMapValue = func() (protoreflect.Value, error) {\n\t\t\treturn d.unmarshalScalar(fd.MapValue())\n\t\t}\n\t}\n\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\tswitch tok.Kind() {\n\tcase text.MessageOpen:\n\t\treturn d.unmarshalMapEntry(fd, mmap, unmarshalMapValue)\n\n\tcase text.ListOpen:\n\t\tfor {\n\t\t\ttok, err := d.Read()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tswitch tok.Kind() {\n\t\t\tcase text.ListClose:\n\t\t\t\treturn nil\n\t\t\tcase text.MessageOpen:\n\t\t\t\tif err := d.unmarshalMapEntry(fd, mmap, unmarshalMapValue); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn d.unexpectedTokenError(tok)\n\t\t\t}\n\t\t}\n\n\tdefault:\n\t\treturn d.unexpectedTokenError(tok)\n\t}\n}\n\n// unmarshalMap unmarshals into given protoreflect.Map. A map value is a\n// textproto message containing {key: <kvalue>, value: <mvalue>}.\nfunc (d decoder) unmarshalMapEntry(fd protoreflect.FieldDescriptor, mmap protoreflect.Map, unmarshalMapValue func() (protoreflect.Value, error)) error {\n\tvar key protoreflect.MapKey\n\tvar pval protoreflect.Value\nLoop:\n\tfor {\n\t\t// Read field name.\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tcase text.Name:\n\t\t\tif tok.NameKind() != text.IdentName {\n\t\t\t\tif !d.opts.DiscardUnknown {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"unknown map entry field %q\", tok.RawString())\n\t\t\t\t}\n\t\t\t\td.skipValue()\n\t\t\t\tcontinue Loop\n\t\t\t}\n\t\t\t// Continue below.\n\t\tcase text.MessageClose:\n\t\t\tbreak Loop\n\t\tdefault:\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\n\t\tswitch name := protoreflect.Name(tok.IdentName()); name {\n\t\tcase genid.MapEntry_Key_field_name:\n\t\t\tif !tok.HasSeparator() {\n\t\t\t\treturn d.syntaxError(tok.Pos(), \"missing field separator :\")\n\t\t\t}\n\t\t\tif key.IsValid() {\n\t\t\t\treturn d.newError(tok.Pos(), \"map entry %q cannot be repeated\", name)\n\t\t\t}\n\t\t\tval, err := d.unmarshalScalar(fd.MapKey())\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tkey = val.MapKey()\n\n\t\tcase genid.MapEntry_Value_field_name:\n\t\t\tif kind := fd.MapValue().Kind(); (kind != protoreflect.MessageKind) && (kind != protoreflect.GroupKind) {\n\t\t\t\tif !tok.HasSeparator() {\n\t\t\t\t\treturn d.syntaxError(tok.Pos(), \"missing field separator :\")\n\t\t\t\t}\n\t\t\t}\n\t\t\tif pval.IsValid() {\n\t\t\t\treturn d.newError(tok.Pos(), \"map entry %q cannot be repeated\", name)\n\t\t\t}\n\t\t\tpval, err = unmarshalMapValue()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tdefault:\n\t\t\tif !d.opts.DiscardUnknown {\n\t\t\t\treturn d.newError(tok.Pos(), \"unknown map entry field %q\", name)\n\t\t\t}\n\t\t\td.skipValue()\n\t\t}\n\t}\n\n\tif !key.IsValid() {\n\t\tkey = fd.MapKey().Default().MapKey()\n\t}\n\tif !pval.IsValid() {\n\t\tswitch fd.MapValue().Kind() {\n\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\t// If value field is not set for message/group types, construct an\n\t\t\t// empty one as default.\n\t\t\tpval = mmap.NewValue()\n\t\tdefault:\n\t\t\tpval = fd.MapValue().Default()\n\t\t}\n\t}\n\tmmap.Set(key, pval)\n\treturn nil\n}\n\n// unmarshalAny unmarshals an Any textproto. It can either be in expanded form\n// or non-expanded form.\nfunc (d decoder) unmarshalAny(m protoreflect.Message, checkDelims bool) error {\n\tvar typeURL string\n\tvar bValue []byte\n\tvar seenTypeUrl bool\n\tvar seenValue bool\n\tvar isExpanded bool\n\n\tif checkDelims {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif tok.Kind() != text.MessageOpen {\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\t}\n\nLoop:\n\tfor {\n\t\t// Read field name. Can only have 3 possible field names, i.e. type_url,\n\t\t// value and type URL name inside [].\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif typ := tok.Kind(); typ != text.Name {\n\t\t\tif checkDelims {\n\t\t\t\tif typ == text.MessageClose {\n\t\t\t\t\tbreak Loop\n\t\t\t\t}\n\t\t\t} else if typ == text.EOF {\n\t\t\t\tbreak Loop\n\t\t\t}\n\t\t\treturn d.unexpectedTokenError(tok)\n\t\t}\n\n\t\tswitch tok.NameKind() {\n\t\tcase text.IdentName:\n\t\t\t// Both type_url and value fields require field separator :.\n\t\t\tif !tok.HasSeparator() {\n\t\t\t\treturn d.syntaxError(tok.Pos(), \"missing field separator :\")\n\t\t\t}\n\n\t\t\tswitch name := protoreflect.Name(tok.IdentName()); name {\n\t\t\tcase genid.Any_TypeUrl_field_name:\n\t\t\t\tif seenTypeUrl {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"duplicate %v field\", genid.Any_TypeUrl_field_fullname)\n\t\t\t\t}\n\t\t\t\tif isExpanded {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"conflict with [%s] field\", typeURL)\n\t\t\t\t}\n\t\t\t\ttok, err := d.Read()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tvar ok bool\n\t\t\t\ttypeURL, ok = tok.String()\n\t\t\t\tif !ok {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"invalid %v field value: %v\", genid.Any_TypeUrl_field_fullname, tok.RawString())\n\t\t\t\t}\n\t\t\t\tseenTypeUrl = true\n\n\t\t\tcase genid.Any_Value_field_name:\n\t\t\t\tif seenValue {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"duplicate %v field\", genid.Any_Value_field_fullname)\n\t\t\t\t}\n\t\t\t\tif isExpanded {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"conflict with [%s] field\", typeURL)\n\t\t\t\t}\n\t\t\t\ttok, err := d.Read()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\ts, ok := tok.String()\n\t\t\t\tif !ok {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"invalid %v field value: %v\", genid.Any_Value_field_fullname, tok.RawString())\n\t\t\t\t}\n\t\t\t\tbValue = []byte(s)\n\t\t\t\tseenValue = true\n\n\t\t\tdefault:\n\t\t\t\tif !d.opts.DiscardUnknown {\n\t\t\t\t\treturn d.newError(tok.Pos(), \"invalid field name %q in %v message\", tok.RawString(), genid.Any_message_fullname)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase text.TypeName:\n\t\t\tif isExpanded {\n\t\t\t\treturn d.newError(tok.Pos(), \"cannot have more than one type\")\n\t\t\t}\n\t\t\tif seenTypeUrl {\n\t\t\t\treturn d.newError(tok.Pos(), \"conflict with type_url field\")\n\t\t\t}\n\t\t\ttypeURL = tok.TypeName()\n\t\t\tvar err error\n\t\t\tbValue, err = d.unmarshalExpandedAny(typeURL, tok.Pos())\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tisExpanded = true\n\n\t\tdefault:\n\t\t\tif !d.opts.DiscardUnknown {\n\t\t\t\treturn d.newError(tok.Pos(), \"invalid field name %q in %v message\", tok.RawString(), genid.Any_message_fullname)\n\t\t\t}\n\t\t}\n\t}\n\n\tfds := m.Descriptor().Fields()\n\tif len(typeURL) > 0 {\n\t\tm.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), protoreflect.ValueOfString(typeURL))\n\t}\n\tif len(bValue) > 0 {\n\t\tm.Set(fds.ByNumber(genid.Any_Value_field_number), protoreflect.ValueOfBytes(bValue))\n\t}\n\treturn nil\n}\n\nfunc (d decoder) unmarshalExpandedAny(typeURL string, pos int) ([]byte, error) {\n\tmt, err := d.opts.Resolver.FindMessageByURL(typeURL)\n\tif err != nil {\n\t\treturn nil, d.newError(pos, \"unable to resolve message [%v]: %v\", typeURL, err)\n\t}\n\t// Create new message for the embedded message type and unmarshal the value\n\t// field into it.\n\tm := mt.New()\n\tif err := d.unmarshalMessage(m, true); err != nil {\n\t\treturn nil, err\n\t}\n\t// Serialize the embedded message and return the resulting bytes.\n\tb, err := proto.MarshalOptions{\n\t\tAllowPartial:  true, // Never check required fields inside an Any.\n\t\tDeterministic: true,\n\t}.Marshal(m.Interface())\n\tif err != nil {\n\t\treturn nil, d.newError(pos, \"error in marshaling message into Any.value: %v\", err)\n\t}\n\treturn b, nil\n}\n\n// skipValue makes the decoder parse a field value in order to advance the read\n// to the next field. It relies on Read returning an error if the types are not\n// in valid sequence.\nfunc (d decoder) skipValue() error {\n\ttok, err := d.Read()\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Only need to continue reading for messages and lists.\n\tswitch tok.Kind() {\n\tcase text.MessageOpen:\n\t\treturn d.skipMessageValue()\n\n\tcase text.ListOpen:\n\t\tfor {\n\t\t\ttok, err := d.Read()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tswitch tok.Kind() {\n\t\t\tcase text.ListClose:\n\t\t\t\treturn nil\n\t\t\tcase text.MessageOpen:\n\t\t\t\tif err := d.skipMessageValue(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\t// Skip items. This will not validate whether skipped values are\n\t\t\t\t// of the same type or not, same behavior as C++\n\t\t\t\t// TextFormat::Parser::AllowUnknownField(true) version 3.8.0.\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// skipMessageValue makes the decoder parse and skip over all fields in a\n// message. It assumes that the previous read type is MessageOpen.\nfunc (d decoder) skipMessageValue() error {\n\tfor {\n\t\ttok, err := d.Read()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch tok.Kind() {\n\t\tcase text.MessageClose:\n\t\t\treturn nil\n\t\tcase text.Name:\n\t\t\tif err := d.skipValue(); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/prototext/doc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package prototext marshals and unmarshals protocol buffer messages as the\n// textproto format.\npackage prototext\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/prototext/encode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage prototext\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/encoding/text\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\nconst defaultIndent = \"  \"\n\n// Format formats the message as a multiline string.\n// This function is only intended for human consumption and ignores errors.\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc Format(m proto.Message) string {\n\treturn MarshalOptions{Multiline: true}.Format(m)\n}\n\n// Marshal writes the given [proto.Message] in textproto format using default\n// options. Do not depend on the output being stable. Its output will change\n// across different builds of your program, even when using the same version of\n// the protobuf module.\nfunc Marshal(m proto.Message) ([]byte, error) {\n\treturn MarshalOptions{}.Marshal(m)\n}\n\n// MarshalOptions is a configurable text format marshaler.\ntype MarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// Multiline specifies whether the marshaler should format the output in\n\t// indented-form with every textual element on a new line.\n\t// If Indent is an empty string, then an arbitrary indent is chosen.\n\tMultiline bool\n\n\t// Indent specifies the set of indentation characters to use in a multiline\n\t// formatted output such that every entry is preceded by Indent and\n\t// terminated by a newline. If non-empty, then Multiline is treated as true.\n\t// Indent can only be composed of space or tab characters.\n\tIndent string\n\n\t// EmitASCII specifies whether to format strings and bytes as ASCII only\n\t// as opposed to using UTF-8 encoding when possible.\n\tEmitASCII bool\n\n\t// allowInvalidUTF8 specifies whether to permit the encoding of strings\n\t// with invalid UTF-8. This is unexported as it is intended to only\n\t// be specified by the Format method.\n\tallowInvalidUTF8 bool\n\n\t// AllowPartial allows messages that have missing required fields to marshal\n\t// without returning an error. If AllowPartial is false (the default),\n\t// Marshal will return error if there are any missing required fields.\n\tAllowPartial bool\n\n\t// EmitUnknown specifies whether to emit unknown fields in the output.\n\t// If specified, the unmarshaler may be unable to parse the output.\n\t// The default is to exclude unknown fields.\n\tEmitUnknown bool\n\n\t// Resolver is used for looking up types when expanding google.protobuf.Any\n\t// messages. If nil, this defaults to using protoregistry.GlobalTypes.\n\tResolver interface {\n\t\tprotoregistry.ExtensionTypeResolver\n\t\tprotoregistry.MessageTypeResolver\n\t}\n}\n\n// Format formats the message as a string.\n// This method is only intended for human consumption and ignores errors.\n// Do not depend on the output being stable. Its output will change across\n// different builds of your program, even when using the same version of the\n// protobuf module.\nfunc (o MarshalOptions) Format(m proto.Message) string {\n\tif m == nil || !m.ProtoReflect().IsValid() {\n\t\treturn \"<nil>\" // invalid syntax, but okay since this is for debugging\n\t}\n\to.allowInvalidUTF8 = true\n\to.AllowPartial = true\n\to.EmitUnknown = true\n\tb, _ := o.Marshal(m)\n\treturn string(b)\n}\n\n// Marshal writes the given [proto.Message] in textproto format using options in\n// MarshalOptions object. Do not depend on the output being stable. Its output\n// will change across different builds of your program, even when using the\n// same version of the protobuf module.\nfunc (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {\n\treturn o.marshal(nil, m)\n}\n\n// MarshalAppend appends the textproto format encoding of m to b,\n// returning the result.\nfunc (o MarshalOptions) MarshalAppend(b []byte, m proto.Message) ([]byte, error) {\n\treturn o.marshal(b, m)\n}\n\n// marshal is a centralized function that all marshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for marshal that do not go through this.\nfunc (o MarshalOptions) marshal(b []byte, m proto.Message) ([]byte, error) {\n\tvar delims = [2]byte{'{', '}'}\n\n\tif o.Multiline && o.Indent == \"\" {\n\t\to.Indent = defaultIndent\n\t}\n\tif o.Resolver == nil {\n\t\to.Resolver = protoregistry.GlobalTypes\n\t}\n\n\tinternalEnc, err := text.NewEncoder(b, o.Indent, delims, o.EmitASCII)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Treat nil message interface as an empty message,\n\t// in which case there is nothing to output.\n\tif m == nil {\n\t\treturn b, nil\n\t}\n\n\tenc := encoder{internalEnc, o}\n\terr = enc.marshalMessage(m.ProtoReflect(), false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tout := enc.Bytes()\n\tif len(o.Indent) > 0 && len(out) > 0 {\n\t\tout = append(out, '\\n')\n\t}\n\tif o.AllowPartial {\n\t\treturn out, nil\n\t}\n\treturn out, proto.CheckInitialized(m)\n}\n\ntype encoder struct {\n\t*text.Encoder\n\topts MarshalOptions\n}\n\n// marshalMessage marshals the given protoreflect.Message.\nfunc (e encoder) marshalMessage(m protoreflect.Message, inclDelims bool) error {\n\tmessageDesc := m.Descriptor()\n\tif !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) {\n\t\treturn errors.New(\"no support for proto1 MessageSets\")\n\t}\n\n\tif inclDelims {\n\t\te.StartMessage()\n\t\tdefer e.EndMessage()\n\t}\n\n\t// Handle Any expansion.\n\tif messageDesc.FullName() == genid.Any_message_fullname {\n\t\tif e.marshalAny(m) {\n\t\t\treturn nil\n\t\t}\n\t\t// If unable to expand, continue on to marshal Any as a regular message.\n\t}\n\n\t// Marshal fields.\n\tvar err error\n\torder.RangeFields(m, order.IndexNameFieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tif err = e.marshalField(fd.TextName(), v, fd); err != nil {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Marshal unknown fields.\n\tif e.opts.EmitUnknown {\n\t\te.marshalUnknown(m.GetUnknown())\n\t}\n\n\treturn nil\n}\n\n// marshalField marshals the given field with protoreflect.Value.\nfunc (e encoder) marshalField(name string, val protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tswitch {\n\tcase fd.IsList():\n\t\treturn e.marshalList(name, val.List(), fd)\n\tcase fd.IsMap():\n\t\treturn e.marshalMap(name, val.Map(), fd)\n\tdefault:\n\t\te.WriteName(name)\n\t\treturn e.marshalSingular(val, fd)\n\t}\n}\n\n// marshalSingular marshals the given non-repeated field value. This includes\n// all scalar types, enums, messages, and groups.\nfunc (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error {\n\tkind := fd.Kind()\n\tswitch kind {\n\tcase protoreflect.BoolKind:\n\t\te.WriteBool(val.Bool())\n\n\tcase protoreflect.StringKind:\n\t\ts := val.String()\n\t\tif !e.opts.allowInvalidUTF8 && strs.EnforceUTF8(fd) && !utf8.ValidString(s) {\n\t\t\treturn errors.InvalidUTF8(string(fd.FullName()))\n\t\t}\n\t\te.WriteString(s)\n\n\tcase protoreflect.Int32Kind, protoreflect.Int64Kind,\n\t\tprotoreflect.Sint32Kind, protoreflect.Sint64Kind,\n\t\tprotoreflect.Sfixed32Kind, protoreflect.Sfixed64Kind:\n\t\te.WriteInt(val.Int())\n\n\tcase protoreflect.Uint32Kind, protoreflect.Uint64Kind,\n\t\tprotoreflect.Fixed32Kind, protoreflect.Fixed64Kind:\n\t\te.WriteUint(val.Uint())\n\n\tcase protoreflect.FloatKind:\n\t\t// Encoder.WriteFloat handles the special numbers NaN and infinites.\n\t\te.WriteFloat(val.Float(), 32)\n\n\tcase protoreflect.DoubleKind:\n\t\t// Encoder.WriteFloat handles the special numbers NaN and infinites.\n\t\te.WriteFloat(val.Float(), 64)\n\n\tcase protoreflect.BytesKind:\n\t\te.WriteString(string(val.Bytes()))\n\n\tcase protoreflect.EnumKind:\n\t\tnum := val.Enum()\n\t\tif desc := fd.Enum().Values().ByNumber(num); desc != nil {\n\t\t\te.WriteLiteral(string(desc.Name()))\n\t\t} else {\n\t\t\t// Use numeric value if there is no enum description.\n\t\t\te.WriteInt(int64(num))\n\t\t}\n\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn e.marshalMessage(val.Message(), true)\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"%v has unknown kind: %v\", fd.FullName(), kind))\n\t}\n\treturn nil\n}\n\n// marshalList marshals the given protoreflect.List as multiple name-value fields.\nfunc (e encoder) marshalList(name string, list protoreflect.List, fd protoreflect.FieldDescriptor) error {\n\tsize := list.Len()\n\tfor i := 0; i < size; i++ {\n\t\te.WriteName(name)\n\t\tif err := e.marshalSingular(list.Get(i), fd); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// marshalMap marshals the given protoreflect.Map as multiple name-value fields.\nfunc (e encoder) marshalMap(name string, mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error {\n\tvar err error\n\torder.RangeEntries(mmap, order.GenericKeyOrder, func(key protoreflect.MapKey, val protoreflect.Value) bool {\n\t\te.WriteName(name)\n\t\te.StartMessage()\n\t\tdefer e.EndMessage()\n\n\t\te.WriteName(string(genid.MapEntry_Key_field_name))\n\t\terr = e.marshalSingular(key.Value(), fd.MapKey())\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\n\t\te.WriteName(string(genid.MapEntry_Value_field_name))\n\t\terr = e.marshalSingular(val, fd.MapValue())\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t})\n\treturn err\n}\n\n// marshalUnknown parses the given []byte and marshals fields out.\n// This function assumes proper encoding in the given []byte.\nfunc (e encoder) marshalUnknown(b []byte) {\n\tconst dec = 10\n\tconst hex = 16\n\tfor len(b) > 0 {\n\t\tnum, wtype, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\te.WriteName(strconv.FormatInt(int64(num), dec))\n\n\t\tswitch wtype {\n\t\tcase protowire.VarintType:\n\t\t\tvar v uint64\n\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\te.WriteUint(v)\n\t\tcase protowire.Fixed32Type:\n\t\t\tvar v uint32\n\t\t\tv, n = protowire.ConsumeFixed32(b)\n\t\t\te.WriteLiteral(\"0x\" + strconv.FormatUint(uint64(v), hex))\n\t\tcase protowire.Fixed64Type:\n\t\t\tvar v uint64\n\t\t\tv, n = protowire.ConsumeFixed64(b)\n\t\t\te.WriteLiteral(\"0x\" + strconv.FormatUint(v, hex))\n\t\tcase protowire.BytesType:\n\t\t\tvar v []byte\n\t\t\tv, n = protowire.ConsumeBytes(b)\n\t\t\te.WriteString(string(v))\n\t\tcase protowire.StartGroupType:\n\t\t\te.StartMessage()\n\t\t\tvar v []byte\n\t\t\tv, n = protowire.ConsumeGroup(num, b)\n\t\t\te.marshalUnknown(v)\n\t\t\te.EndMessage()\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"prototext: error parsing unknown field wire type: %v\", wtype))\n\t\t}\n\n\t\tb = b[n:]\n\t}\n}\n\n// marshalAny marshals the given google.protobuf.Any message in expanded form.\n// It returns true if it was able to marshal, else false.\nfunc (e encoder) marshalAny(any protoreflect.Message) bool {\n\t// Construct the embedded message.\n\tfds := any.Descriptor().Fields()\n\tfdType := fds.ByNumber(genid.Any_TypeUrl_field_number)\n\ttypeURL := any.Get(fdType).String()\n\tmt, err := e.opts.Resolver.FindMessageByURL(typeURL)\n\tif err != nil {\n\t\treturn false\n\t}\n\tm := mt.New().Interface()\n\n\t// Unmarshal bytes into embedded message.\n\tfdValue := fds.ByNumber(genid.Any_Value_field_number)\n\tvalue := any.Get(fdValue)\n\terr = proto.UnmarshalOptions{\n\t\tAllowPartial: true,\n\t\tResolver:     e.opts.Resolver,\n\t}.Unmarshal(value.Bytes(), m)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\t// Get current encoder position. If marshaling fails, reset encoder output\n\t// back to this position.\n\tpos := e.Snapshot()\n\n\t// Field name is the proto field name enclosed in [].\n\te.WriteName(\"[\" + typeURL + \"]\")\n\terr = e.marshalMessage(m.ProtoReflect(), true)\n\tif err != nil {\n\t\te.Reset(pos)\n\t\treturn false\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/encoding/protowire/wire.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protowire parses and formats the raw wire encoding.\n// See https://protobuf.dev/programming-guides/encoding.\n//\n// For marshaling and unmarshaling entire protobuf messages,\n// use the [google.golang.org/protobuf/proto] package instead.\npackage protowire\n\nimport (\n\t\"io\"\n\t\"math\"\n\t\"math/bits\"\n\n\t\"google.golang.org/protobuf/internal/errors\"\n)\n\n// Number represents the field number.\ntype Number int32\n\nconst (\n\tMinValidNumber        Number = 1\n\tFirstReservedNumber   Number = 19000\n\tLastReservedNumber    Number = 19999\n\tMaxValidNumber        Number = 1<<29 - 1\n\tDefaultRecursionLimit        = 10000\n)\n\n// IsValid reports whether the field number is semantically valid.\nfunc (n Number) IsValid() bool {\n\treturn MinValidNumber <= n && n <= MaxValidNumber\n}\n\n// Type represents the wire type.\ntype Type int8\n\nconst (\n\tVarintType     Type = 0\n\tFixed32Type    Type = 5\n\tFixed64Type    Type = 1\n\tBytesType      Type = 2\n\tStartGroupType Type = 3\n\tEndGroupType   Type = 4\n)\n\nconst (\n\t_ = -iota\n\terrCodeTruncated\n\terrCodeFieldNumber\n\terrCodeOverflow\n\terrCodeReserved\n\terrCodeEndGroup\n\terrCodeRecursionDepth\n)\n\nvar (\n\terrFieldNumber = errors.New(\"invalid field number\")\n\terrOverflow    = errors.New(\"variable length integer overflow\")\n\terrReserved    = errors.New(\"cannot parse reserved wire type\")\n\terrEndGroup    = errors.New(\"mismatching end group marker\")\n\terrParse       = errors.New(\"parse error\")\n)\n\n// ParseError converts an error code into an error value.\n// This returns nil if n is a non-negative number.\nfunc ParseError(n int) error {\n\tif n >= 0 {\n\t\treturn nil\n\t}\n\tswitch n {\n\tcase errCodeTruncated:\n\t\treturn io.ErrUnexpectedEOF\n\tcase errCodeFieldNumber:\n\t\treturn errFieldNumber\n\tcase errCodeOverflow:\n\t\treturn errOverflow\n\tcase errCodeReserved:\n\t\treturn errReserved\n\tcase errCodeEndGroup:\n\t\treturn errEndGroup\n\tdefault:\n\t\treturn errParse\n\t}\n}\n\n// ConsumeField parses an entire field record (both tag and value) and returns\n// the field number, the wire type, and the total length.\n// This returns a negative length upon an error (see [ParseError]).\n//\n// The total length includes the tag header and the end group marker (if the\n// field is a group).\nfunc ConsumeField(b []byte) (Number, Type, int) {\n\tnum, typ, n := ConsumeTag(b)\n\tif n < 0 {\n\t\treturn 0, 0, n // forward error code\n\t}\n\tm := ConsumeFieldValue(num, typ, b[n:])\n\tif m < 0 {\n\t\treturn 0, 0, m // forward error code\n\t}\n\treturn num, typ, n + m\n}\n\n// ConsumeFieldValue parses a field value and returns its length.\n// This assumes that the field [Number] and wire [Type] have already been parsed.\n// This returns a negative length upon an error (see [ParseError]).\n//\n// When parsing a group, the length includes the end group marker and\n// the end group is verified to match the starting field number.\nfunc ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {\n\treturn consumeFieldValueD(num, typ, b, DefaultRecursionLimit)\n}\n\nfunc consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) {\n\tswitch typ {\n\tcase VarintType:\n\t\t_, n = ConsumeVarint(b)\n\t\treturn n\n\tcase Fixed32Type:\n\t\t_, n = ConsumeFixed32(b)\n\t\treturn n\n\tcase Fixed64Type:\n\t\t_, n = ConsumeFixed64(b)\n\t\treturn n\n\tcase BytesType:\n\t\t_, n = ConsumeBytes(b)\n\t\treturn n\n\tcase StartGroupType:\n\t\tif depth < 0 {\n\t\t\treturn errCodeRecursionDepth\n\t\t}\n\t\tn0 := len(b)\n\t\tfor {\n\t\t\tnum2, typ2, n := ConsumeTag(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn n // forward error code\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tif typ2 == EndGroupType {\n\t\t\t\tif num != num2 {\n\t\t\t\t\treturn errCodeEndGroup\n\t\t\t\t}\n\t\t\t\treturn n0 - len(b)\n\t\t\t}\n\n\t\t\tn = consumeFieldValueD(num2, typ2, b, depth-1)\n\t\t\tif n < 0 {\n\t\t\t\treturn n // forward error code\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t}\n\tcase EndGroupType:\n\t\treturn errCodeEndGroup\n\tdefault:\n\t\treturn errCodeReserved\n\t}\n}\n\n// AppendTag encodes num and typ as a varint-encoded tag and appends it to b.\nfunc AppendTag(b []byte, num Number, typ Type) []byte {\n\treturn AppendVarint(b, EncodeTag(num, typ))\n}\n\n// ConsumeTag parses b as a varint-encoded tag, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeTag(b []byte) (Number, Type, int) {\n\tv, n := ConsumeVarint(b)\n\tif n < 0 {\n\t\treturn 0, 0, n // forward error code\n\t}\n\tnum, typ := DecodeTag(v)\n\tif num < MinValidNumber {\n\t\treturn 0, 0, errCodeFieldNumber\n\t}\n\treturn num, typ, n\n}\n\nfunc SizeTag(num Number) int {\n\treturn SizeVarint(EncodeTag(num, 0)) // wire type has no effect on size\n}\n\n// AppendVarint appends v to b as a varint-encoded uint64.\nfunc AppendVarint(b []byte, v uint64) []byte {\n\tswitch {\n\tcase v < 1<<7:\n\t\tb = append(b, byte(v))\n\tcase v < 1<<14:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte(v>>7))\n\tcase v < 1<<21:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte(v>>14))\n\tcase v < 1<<28:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte(v>>21))\n\tcase v < 1<<35:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte(v>>28))\n\tcase v < 1<<42:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte((v>>28)&0x7f|0x80),\n\t\t\tbyte(v>>35))\n\tcase v < 1<<49:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte((v>>28)&0x7f|0x80),\n\t\t\tbyte((v>>35)&0x7f|0x80),\n\t\t\tbyte(v>>42))\n\tcase v < 1<<56:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte((v>>28)&0x7f|0x80),\n\t\t\tbyte((v>>35)&0x7f|0x80),\n\t\t\tbyte((v>>42)&0x7f|0x80),\n\t\t\tbyte(v>>49))\n\tcase v < 1<<63:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte((v>>28)&0x7f|0x80),\n\t\t\tbyte((v>>35)&0x7f|0x80),\n\t\t\tbyte((v>>42)&0x7f|0x80),\n\t\t\tbyte((v>>49)&0x7f|0x80),\n\t\t\tbyte(v>>56))\n\tdefault:\n\t\tb = append(b,\n\t\t\tbyte((v>>0)&0x7f|0x80),\n\t\t\tbyte((v>>7)&0x7f|0x80),\n\t\t\tbyte((v>>14)&0x7f|0x80),\n\t\t\tbyte((v>>21)&0x7f|0x80),\n\t\t\tbyte((v>>28)&0x7f|0x80),\n\t\t\tbyte((v>>35)&0x7f|0x80),\n\t\t\tbyte((v>>42)&0x7f|0x80),\n\t\t\tbyte((v>>49)&0x7f|0x80),\n\t\t\tbyte((v>>56)&0x7f|0x80),\n\t\t\t1)\n\t}\n\treturn b\n}\n\n// ConsumeVarint parses b as a varint-encoded uint64, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeVarint(b []byte) (v uint64, n int) {\n\tvar y uint64\n\tif len(b) <= 0 {\n\t\treturn 0, errCodeTruncated\n\t}\n\tv = uint64(b[0])\n\tif v < 0x80 {\n\t\treturn v, 1\n\t}\n\tv -= 0x80\n\n\tif len(b) <= 1 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[1])\n\tv += y << 7\n\tif y < 0x80 {\n\t\treturn v, 2\n\t}\n\tv -= 0x80 << 7\n\n\tif len(b) <= 2 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[2])\n\tv += y << 14\n\tif y < 0x80 {\n\t\treturn v, 3\n\t}\n\tv -= 0x80 << 14\n\n\tif len(b) <= 3 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[3])\n\tv += y << 21\n\tif y < 0x80 {\n\t\treturn v, 4\n\t}\n\tv -= 0x80 << 21\n\n\tif len(b) <= 4 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[4])\n\tv += y << 28\n\tif y < 0x80 {\n\t\treturn v, 5\n\t}\n\tv -= 0x80 << 28\n\n\tif len(b) <= 5 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[5])\n\tv += y << 35\n\tif y < 0x80 {\n\t\treturn v, 6\n\t}\n\tv -= 0x80 << 35\n\n\tif len(b) <= 6 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[6])\n\tv += y << 42\n\tif y < 0x80 {\n\t\treturn v, 7\n\t}\n\tv -= 0x80 << 42\n\n\tif len(b) <= 7 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[7])\n\tv += y << 49\n\tif y < 0x80 {\n\t\treturn v, 8\n\t}\n\tv -= 0x80 << 49\n\n\tif len(b) <= 8 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[8])\n\tv += y << 56\n\tif y < 0x80 {\n\t\treturn v, 9\n\t}\n\tv -= 0x80 << 56\n\n\tif len(b) <= 9 {\n\t\treturn 0, errCodeTruncated\n\t}\n\ty = uint64(b[9])\n\tv += y << 63\n\tif y < 2 {\n\t\treturn v, 10\n\t}\n\treturn 0, errCodeOverflow\n}\n\n// SizeVarint returns the encoded size of a varint.\n// The size is guaranteed to be within 1 and 10, inclusive.\nfunc SizeVarint(v uint64) int {\n\t// This computes 1 + (bits.Len64(v)-1)/7.\n\t// 9/64 is a good enough approximation of 1/7\n\t//\n\t// The Go compiler can translate the bits.LeadingZeros64 call into the LZCNT\n\t// instruction, which is very fast on CPUs from the last few years. The\n\t// specific way of expressing the calculation matches C++ Protobuf, see\n\t// https://godbolt.org/z/4P3h53oM4 for the C++ code and how gcc/clang\n\t// optimize that function for GOAMD64=v1 and GOAMD64=v3 (-march=haswell).\n\n\t// By OR'ing v with 1, we guarantee that v is never 0, without changing the\n\t// result of SizeVarint. LZCNT is not defined for 0, meaning the compiler\n\t// needs to add extra instructions to handle that case.\n\t//\n\t// The Go compiler currently (go1.24.4) does not make use of this knowledge.\n\t// This opportunity (removing the XOR instruction, which handles the 0 case)\n\t// results in a small (1%) performance win across CPU architectures.\n\t//\n\t// Independently of avoiding the 0 case, we need the v |= 1 line because\n\t// it allows the Go compiler to eliminate an extra XCHGL barrier.\n\tv |= 1\n\n\t// It would be clearer to write log2value := 63 - uint32(...), but\n\t// writing uint32(...) ^ 63 is much more efficient (-14% ARM, -20% Intel).\n\t// Proof of identity for our value range [0..63]:\n\t// https://go.dev/play/p/Pdn9hEWYakX\n\tlog2value := uint32(bits.LeadingZeros64(v)) ^ 63\n\treturn int((log2value*9 + (64 + 9)) / 64)\n}\n\n// AppendFixed32 appends v to b as a little-endian uint32.\nfunc AppendFixed32(b []byte, v uint32) []byte {\n\treturn append(b,\n\t\tbyte(v>>0),\n\t\tbyte(v>>8),\n\t\tbyte(v>>16),\n\t\tbyte(v>>24))\n}\n\n// ConsumeFixed32 parses b as a little-endian uint32, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeFixed32(b []byte) (v uint32, n int) {\n\tif len(b) < 4 {\n\t\treturn 0, errCodeTruncated\n\t}\n\tv = uint32(b[0])<<0 | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24\n\treturn v, 4\n}\n\n// SizeFixed32 returns the encoded size of a fixed32; which is always 4.\nfunc SizeFixed32() int {\n\treturn 4\n}\n\n// AppendFixed64 appends v to b as a little-endian uint64.\nfunc AppendFixed64(b []byte, v uint64) []byte {\n\treturn append(b,\n\t\tbyte(v>>0),\n\t\tbyte(v>>8),\n\t\tbyte(v>>16),\n\t\tbyte(v>>24),\n\t\tbyte(v>>32),\n\t\tbyte(v>>40),\n\t\tbyte(v>>48),\n\t\tbyte(v>>56))\n}\n\n// ConsumeFixed64 parses b as a little-endian uint64, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeFixed64(b []byte) (v uint64, n int) {\n\tif len(b) < 8 {\n\t\treturn 0, errCodeTruncated\n\t}\n\tv = uint64(b[0])<<0 | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56\n\treturn v, 8\n}\n\n// SizeFixed64 returns the encoded size of a fixed64; which is always 8.\nfunc SizeFixed64() int {\n\treturn 8\n}\n\n// AppendBytes appends v to b as a length-prefixed bytes value.\nfunc AppendBytes(b []byte, v []byte) []byte {\n\treturn append(AppendVarint(b, uint64(len(v))), v...)\n}\n\n// ConsumeBytes parses b as a length-prefixed bytes value, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeBytes(b []byte) (v []byte, n int) {\n\tm, n := ConsumeVarint(b)\n\tif n < 0 {\n\t\treturn nil, n // forward error code\n\t}\n\tif m > uint64(len(b[n:])) {\n\t\treturn nil, errCodeTruncated\n\t}\n\treturn b[n:][:m], n + int(m)\n}\n\n// SizeBytes returns the encoded size of a length-prefixed bytes value,\n// given only the length.\nfunc SizeBytes(n int) int {\n\treturn SizeVarint(uint64(n)) + n\n}\n\n// AppendString appends v to b as a length-prefixed bytes value.\nfunc AppendString(b []byte, v string) []byte {\n\treturn append(AppendVarint(b, uint64(len(v))), v...)\n}\n\n// ConsumeString parses b as a length-prefixed bytes value, reporting its length.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeString(b []byte) (v string, n int) {\n\tbb, n := ConsumeBytes(b)\n\treturn string(bb), n\n}\n\n// AppendGroup appends v to b as group value, with a trailing end group marker.\n// The value v must not contain the end marker.\nfunc AppendGroup(b []byte, num Number, v []byte) []byte {\n\treturn AppendVarint(append(b, v...), EncodeTag(num, EndGroupType))\n}\n\n// ConsumeGroup parses b as a group value until the trailing end group marker,\n// and verifies that the end marker matches the provided num. The value v\n// does not contain the end marker, while the length does contain the end marker.\n// This returns a negative length upon an error (see [ParseError]).\nfunc ConsumeGroup(num Number, b []byte) (v []byte, n int) {\n\tn = ConsumeFieldValue(num, StartGroupType, b)\n\tif n < 0 {\n\t\treturn nil, n // forward error code\n\t}\n\tb = b[:n]\n\n\t// Truncate off end group marker, but need to handle denormalized varints.\n\t// Assuming end marker is never 0 (which is always the case since\n\t// EndGroupType is non-zero), we can truncate all trailing bytes where the\n\t// lower 7 bits are all zero (implying that the varint is denormalized).\n\tfor len(b) > 0 && b[len(b)-1]&0x7f == 0 {\n\t\tb = b[:len(b)-1]\n\t}\n\tb = b[:len(b)-SizeTag(num)]\n\treturn b, n\n}\n\n// SizeGroup returns the encoded size of a group, given only the length.\nfunc SizeGroup(num Number, n int) int {\n\treturn n + SizeTag(num)\n}\n\n// DecodeTag decodes the field [Number] and wire [Type] from its unified form.\n// The [Number] is -1 if the decoded field number overflows int32.\n// Other than overflow, this does not check for field number validity.\nfunc DecodeTag(x uint64) (Number, Type) {\n\t// NOTE: MessageSet allows for larger field numbers than normal.\n\tif x>>3 > uint64(math.MaxInt32) {\n\t\treturn -1, 0\n\t}\n\treturn Number(x >> 3), Type(x & 7)\n}\n\n// EncodeTag encodes the field [Number] and wire [Type] into its unified form.\nfunc EncodeTag(num Number, typ Type) uint64 {\n\treturn uint64(num)<<3 | uint64(typ&7)\n}\n\n// DecodeZigZag decodes a zig-zag-encoded uint64 as an int64.\n//\n//\tInput:  {…,  5,  3,  1,  0,  2,  4,  6, …}\n//\tOutput: {…, -3, -2, -1,  0, +1, +2, +3, …}\nfunc DecodeZigZag(x uint64) int64 {\n\treturn int64(x>>1) ^ int64(x)<<63>>63\n}\n\n// EncodeZigZag encodes an int64 as a zig-zag-encoded uint64.\n//\n//\tInput:  {…, -3, -2, -1,  0, +1, +2, +3, …}\n//\tOutput: {…,  5,  3,  1,  0,  2,  4,  6, …}\nfunc EncodeZigZag(x int64) uint64 {\n\treturn uint64(x<<1) ^ uint64(x>>63)\n}\n\n// DecodeBool decodes a uint64 as a bool.\n//\n//\tInput:  {    0,    1,    2, …}\n//\tOutput: {false, true, true, …}\nfunc DecodeBool(x uint64) bool {\n\treturn x != 0\n}\n\n// EncodeBool encodes a bool as a uint64.\n//\n//\tInput:  {false, true}\n//\tOutput: {    0,    1}\nfunc EncodeBool(x bool) uint64 {\n\tif x {\n\t\treturn 1\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/descfmt/stringer.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package descfmt provides functionality to format descriptors.\npackage descfmt\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/internal/detrand\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype list interface {\n\tLen() int\n\tpragma.DoNotImplement\n}\n\nfunc FormatList(s fmt.State, r rune, vs list) {\n\tio.WriteString(s, formatListOpt(vs, true, r == 'v' && (s.Flag('+') || s.Flag('#'))))\n}\nfunc formatListOpt(vs list, isRoot, allowMulti bool) string {\n\tstart, end := \"[\", \"]\"\n\tif isRoot {\n\t\tvar name string\n\t\tswitch vs.(type) {\n\t\tcase protoreflect.Names:\n\t\t\tname = \"Names\"\n\t\tcase protoreflect.FieldNumbers:\n\t\t\tname = \"FieldNumbers\"\n\t\tcase protoreflect.FieldRanges:\n\t\t\tname = \"FieldRanges\"\n\t\tcase protoreflect.EnumRanges:\n\t\t\tname = \"EnumRanges\"\n\t\tcase protoreflect.FileImports:\n\t\t\tname = \"FileImports\"\n\t\tcase protoreflect.Descriptor:\n\t\t\tname = reflect.ValueOf(vs).MethodByName(\"Get\").Type().Out(0).Name() + \"s\"\n\t\tdefault:\n\t\t\tname = reflect.ValueOf(vs).Elem().Type().Name()\n\t\t}\n\t\tstart, end = name+\"{\", \"}\"\n\t}\n\n\tvar ss []string\n\tswitch vs := vs.(type) {\n\tcase protoreflect.Names:\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tss = append(ss, fmt.Sprint(vs.Get(i)))\n\t\t}\n\t\treturn start + joinStrings(ss, false) + end\n\tcase protoreflect.FieldNumbers:\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tss = append(ss, fmt.Sprint(vs.Get(i)))\n\t\t}\n\t\treturn start + joinStrings(ss, false) + end\n\tcase protoreflect.FieldRanges:\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tr := vs.Get(i)\n\t\t\tif r[0]+1 == r[1] {\n\t\t\t\tss = append(ss, fmt.Sprintf(\"%d\", r[0]))\n\t\t\t} else {\n\t\t\t\tss = append(ss, fmt.Sprintf(\"%d:%d\", r[0], r[1])) // enum ranges are end exclusive\n\t\t\t}\n\t\t}\n\t\treturn start + joinStrings(ss, false) + end\n\tcase protoreflect.EnumRanges:\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tr := vs.Get(i)\n\t\t\tif r[0] == r[1] {\n\t\t\t\tss = append(ss, fmt.Sprintf(\"%d\", r[0]))\n\t\t\t} else {\n\t\t\t\tss = append(ss, fmt.Sprintf(\"%d:%d\", r[0], int64(r[1])+1)) // enum ranges are end inclusive\n\t\t\t}\n\t\t}\n\t\treturn start + joinStrings(ss, false) + end\n\tcase protoreflect.FileImports:\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tvar rs records\n\t\t\trv := reflect.ValueOf(vs.Get(i))\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Path\"), \"Path\"},\n\t\t\t\t{rv.MethodByName(\"Package\"), \"Package\"},\n\t\t\t\t{rv.MethodByName(\"IsPublic\"), \"IsPublic\"},\n\t\t\t\t{rv.MethodByName(\"IsWeak\"), \"IsWeak\"},\n\t\t\t}...)\n\t\t\tss = append(ss, \"{\"+rs.Join()+\"}\")\n\t\t}\n\t\treturn start + joinStrings(ss, allowMulti) + end\n\tdefault:\n\t\t_, isEnumValue := vs.(protoreflect.EnumValueDescriptors)\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tm := reflect.ValueOf(vs).MethodByName(\"Get\")\n\t\t\tv := m.Call([]reflect.Value{reflect.ValueOf(i)})[0].Interface()\n\t\t\tss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue, nil))\n\t\t}\n\t\treturn start + joinStrings(ss, allowMulti && isEnumValue) + end\n\t}\n}\n\ntype methodAndName struct {\n\tmethod reflect.Value\n\tname   string\n}\n\nfunc FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) {\n\tio.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')), nil))\n}\n\nfunc InternalFormatDescOptForTesting(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string {\n\treturn formatDescOpt(t, isRoot, allowMulti, record)\n}\n\nfunc formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record func(string)) string {\n\trv := reflect.ValueOf(t)\n\trt := rv.MethodByName(\"ProtoType\").Type().In(0)\n\n\tstart, end := \"{\", \"}\"\n\tif isRoot {\n\t\tstart = rt.Name() + \"{\"\n\t}\n\n\t_, isFile := t.(protoreflect.FileDescriptor)\n\trs := records{\n\t\tallowMulti: allowMulti,\n\t\trecord:     record,\n\t}\n\tif t.IsPlaceholder() {\n\t\tif isFile {\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Path\"), \"Path\"},\n\t\t\t\t{rv.MethodByName(\"Package\"), \"Package\"},\n\t\t\t\t{rv.MethodByName(\"IsPlaceholder\"), \"IsPlaceholder\"},\n\t\t\t}...)\n\t\t} else {\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"FullName\"), \"FullName\"},\n\t\t\t\t{rv.MethodByName(\"IsPlaceholder\"), \"IsPlaceholder\"},\n\t\t\t}...)\n\t\t}\n\t} else {\n\t\tswitch {\n\t\tcase isFile:\n\t\t\trs.Append(rv, methodAndName{rv.MethodByName(\"Syntax\"), \"Syntax\"})\n\t\tcase isRoot:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Syntax\"), \"Syntax\"},\n\t\t\t\t{rv.MethodByName(\"FullName\"), \"FullName\"},\n\t\t\t}...)\n\t\tdefault:\n\t\t\trs.Append(rv, methodAndName{rv.MethodByName(\"Name\"), \"Name\"})\n\t\t}\n\t\tswitch t := t.(type) {\n\t\tcase protoreflect.FieldDescriptor:\n\t\t\taccessors := []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Number\"), \"Number\"},\n\t\t\t\t{rv.MethodByName(\"Cardinality\"), \"Cardinality\"},\n\t\t\t\t{rv.MethodByName(\"Kind\"), \"Kind\"},\n\t\t\t\t{rv.MethodByName(\"HasJSONName\"), \"HasJSONName\"},\n\t\t\t\t{rv.MethodByName(\"JSONName\"), \"JSONName\"},\n\t\t\t\t{rv.MethodByName(\"HasPresence\"), \"HasPresence\"},\n\t\t\t\t{rv.MethodByName(\"IsExtension\"), \"IsExtension\"},\n\t\t\t\t{rv.MethodByName(\"IsPacked\"), \"IsPacked\"},\n\t\t\t\t{rv.MethodByName(\"IsWeak\"), \"IsWeak\"},\n\t\t\t\t{rv.MethodByName(\"IsList\"), \"IsList\"},\n\t\t\t\t{rv.MethodByName(\"IsMap\"), \"IsMap\"},\n\t\t\t\t{rv.MethodByName(\"MapKey\"), \"MapKey\"},\n\t\t\t\t{rv.MethodByName(\"MapValue\"), \"MapValue\"},\n\t\t\t\t{rv.MethodByName(\"HasDefault\"), \"HasDefault\"},\n\t\t\t\t{rv.MethodByName(\"Default\"), \"Default\"},\n\t\t\t\t{rv.MethodByName(\"ContainingOneof\"), \"ContainingOneof\"},\n\t\t\t\t{rv.MethodByName(\"ContainingMessage\"), \"ContainingMessage\"},\n\t\t\t\t{rv.MethodByName(\"Message\"), \"Message\"},\n\t\t\t\t{rv.MethodByName(\"Enum\"), \"Enum\"},\n\t\t\t}\n\t\t\tfor _, s := range accessors {\n\t\t\t\tswitch s.name {\n\t\t\t\tcase \"MapKey\":\n\t\t\t\t\tif k := t.MapKey(); k != nil {\n\t\t\t\t\t\trs.recs = append(rs.recs, [2]string{\"MapKey\", k.Kind().String()})\n\t\t\t\t\t}\n\t\t\t\tcase \"MapValue\":\n\t\t\t\t\tif v := t.MapValue(); v != nil {\n\t\t\t\t\t\tswitch v.Kind() {\n\t\t\t\t\t\tcase protoreflect.EnumKind:\n\t\t\t\t\t\t\trs.AppendRecs(\"MapValue\", [2]string{\"MapValue\", string(v.Enum().FullName())})\n\t\t\t\t\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\t\t\t\t\trs.AppendRecs(\"MapValue\", [2]string{\"MapValue\", string(v.Message().FullName())})\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\trs.AppendRecs(\"MapValue\", [2]string{\"MapValue\", v.Kind().String()})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tcase \"ContainingOneof\":\n\t\t\t\t\tif od := t.ContainingOneof(); od != nil {\n\t\t\t\t\t\trs.AppendRecs(\"ContainingOneof\", [2]string{\"Oneof\", string(od.Name())})\n\t\t\t\t\t}\n\t\t\t\tcase \"ContainingMessage\":\n\t\t\t\t\tif t.IsExtension() {\n\t\t\t\t\t\trs.AppendRecs(\"ContainingMessage\", [2]string{\"Extendee\", string(t.ContainingMessage().FullName())})\n\t\t\t\t\t}\n\t\t\t\tcase \"Message\":\n\t\t\t\t\tif !t.IsMap() {\n\t\t\t\t\t\trs.Append(rv, s)\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\trs.Append(rv, s)\n\t\t\t\t}\n\t\t\t}\n\t\tcase protoreflect.OneofDescriptor:\n\t\t\tvar ss []string\n\t\t\tfs := t.Fields()\n\t\t\tfor i := 0; i < fs.Len(); i++ {\n\t\t\t\tss = append(ss, string(fs.Get(i).Name()))\n\t\t\t}\n\t\t\tif len(ss) > 0 {\n\t\t\t\trs.AppendRecs(\"Fields\", [2]string{\"Fields\", \"[\" + joinStrings(ss, false) + \"]\"})\n\t\t\t}\n\n\t\tcase protoreflect.FileDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Path\"), \"Path\"},\n\t\t\t\t{rv.MethodByName(\"Package\"), \"Package\"},\n\t\t\t\t{rv.MethodByName(\"Imports\"), \"Imports\"},\n\t\t\t\t{rv.MethodByName(\"Messages\"), \"Messages\"},\n\t\t\t\t{rv.MethodByName(\"Enums\"), \"Enums\"},\n\t\t\t\t{rv.MethodByName(\"Extensions\"), \"Extensions\"},\n\t\t\t\t{rv.MethodByName(\"Services\"), \"Services\"},\n\t\t\t}...)\n\n\t\tcase protoreflect.MessageDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"IsMapEntry\"), \"IsMapEntry\"},\n\t\t\t\t{rv.MethodByName(\"Fields\"), \"Fields\"},\n\t\t\t\t{rv.MethodByName(\"Oneofs\"), \"Oneofs\"},\n\t\t\t\t{rv.MethodByName(\"ReservedNames\"), \"ReservedNames\"},\n\t\t\t\t{rv.MethodByName(\"ReservedRanges\"), \"ReservedRanges\"},\n\t\t\t\t{rv.MethodByName(\"RequiredNumbers\"), \"RequiredNumbers\"},\n\t\t\t\t{rv.MethodByName(\"ExtensionRanges\"), \"ExtensionRanges\"},\n\t\t\t\t{rv.MethodByName(\"Messages\"), \"Messages\"},\n\t\t\t\t{rv.MethodByName(\"Enums\"), \"Enums\"},\n\t\t\t\t{rv.MethodByName(\"Extensions\"), \"Extensions\"},\n\t\t\t}...)\n\n\t\tcase protoreflect.EnumDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Values\"), \"Values\"},\n\t\t\t\t{rv.MethodByName(\"ReservedNames\"), \"ReservedNames\"},\n\t\t\t\t{rv.MethodByName(\"ReservedRanges\"), \"ReservedRanges\"},\n\t\t\t\t{rv.MethodByName(\"IsClosed\"), \"IsClosed\"},\n\t\t\t}...)\n\n\t\tcase protoreflect.EnumValueDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Number\"), \"Number\"},\n\t\t\t}...)\n\n\t\tcase protoreflect.ServiceDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Methods\"), \"Methods\"},\n\t\t\t}...)\n\n\t\tcase protoreflect.MethodDescriptor:\n\t\t\trs.Append(rv, []methodAndName{\n\t\t\t\t{rv.MethodByName(\"Input\"), \"Input\"},\n\t\t\t\t{rv.MethodByName(\"Output\"), \"Output\"},\n\t\t\t\t{rv.MethodByName(\"IsStreamingClient\"), \"IsStreamingClient\"},\n\t\t\t\t{rv.MethodByName(\"IsStreamingServer\"), \"IsStreamingServer\"},\n\t\t\t}...)\n\t\t}\n\t\tif m := rv.MethodByName(\"GoType\"); m.IsValid() {\n\t\t\trs.Append(rv, methodAndName{m, \"GoType\"})\n\t\t}\n\t}\n\treturn start + rs.Join() + end\n}\n\ntype records struct {\n\trecs       [][2]string\n\tallowMulti bool\n\n\t// record is a function that will be called for every Append() or\n\t// AppendRecs() call, to be used for testing with the\n\t// InternalFormatDescOptForTesting function.\n\trecord func(string)\n}\n\nfunc (rs *records) AppendRecs(fieldName string, newRecs [2]string) {\n\tif rs.record != nil {\n\t\trs.record(fieldName)\n\t}\n\trs.recs = append(rs.recs, newRecs)\n}\n\nfunc (rs *records) Append(v reflect.Value, accessors ...methodAndName) {\n\tfor _, a := range accessors {\n\t\tif rs.record != nil {\n\t\t\trs.record(a.name)\n\t\t}\n\t\tvar rv reflect.Value\n\t\tif a.method.IsValid() {\n\t\t\trv = a.method.Call(nil)[0]\n\t\t}\n\t\tif v.Kind() == reflect.Struct && !rv.IsValid() {\n\t\t\trv = v.FieldByName(a.name)\n\t\t}\n\t\tif !rv.IsValid() {\n\t\t\tpanic(fmt.Sprintf(\"unknown accessor: %v.%s\", v.Type(), a.name))\n\t\t}\n\t\tif _, ok := rv.Interface().(protoreflect.Value); ok {\n\t\t\trv = rv.MethodByName(\"Interface\").Call(nil)[0]\n\t\t\tif !rv.IsNil() {\n\t\t\t\trv = rv.Elem()\n\t\t\t}\n\t\t}\n\n\t\t// Ignore zero values.\n\t\tvar isZero bool\n\t\tswitch rv.Kind() {\n\t\tcase reflect.Interface, reflect.Slice:\n\t\t\tisZero = rv.IsNil()\n\t\tcase reflect.Bool:\n\t\t\tisZero = rv.Bool() == false\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\tisZero = rv.Int() == 0\n\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\t\tisZero = rv.Uint() == 0\n\t\tcase reflect.String:\n\t\t\tisZero = rv.String() == \"\"\n\t\t}\n\t\tif n, ok := rv.Interface().(list); ok {\n\t\t\tisZero = n.Len() == 0\n\t\t}\n\t\tif isZero {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Format the value.\n\t\tvar s string\n\t\tv := rv.Interface()\n\t\tswitch v := v.(type) {\n\t\tcase list:\n\t\t\ts = formatListOpt(v, false, rs.allowMulti)\n\t\tcase protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor:\n\t\t\ts = string(v.(protoreflect.Descriptor).Name())\n\t\tcase protoreflect.Descriptor:\n\t\t\ts = string(v.FullName())\n\t\tcase string:\n\t\t\ts = strconv.Quote(v)\n\t\tcase []byte:\n\t\t\ts = fmt.Sprintf(\"%q\", v)\n\t\tdefault:\n\t\t\ts = fmt.Sprint(v)\n\t\t}\n\t\trs.recs = append(rs.recs, [2]string{a.name, s})\n\t}\n}\n\nfunc (rs *records) Join() string {\n\tvar ss []string\n\n\t// In single line mode, simply join all records with commas.\n\tif !rs.allowMulti {\n\t\tfor _, r := range rs.recs {\n\t\t\tss = append(ss, r[0]+formatColon(0)+r[1])\n\t\t}\n\t\treturn joinStrings(ss, false)\n\t}\n\n\t// In allowMulti line mode, align single line records for more readable output.\n\tvar maxLen int\n\tflush := func(i int) {\n\t\tfor _, r := range rs.recs[len(ss):i] {\n\t\t\tss = append(ss, r[0]+formatColon(maxLen-len(r[0]))+r[1])\n\t\t}\n\t\tmaxLen = 0\n\t}\n\tfor i, r := range rs.recs {\n\t\tif isMulti := strings.Contains(r[1], \"\\n\"); isMulti {\n\t\t\tflush(i)\n\t\t\tss = append(ss, r[0]+formatColon(0)+strings.Join(strings.Split(r[1], \"\\n\"), \"\\n\\t\"))\n\t\t} else if maxLen < len(r[0]) {\n\t\t\tmaxLen = len(r[0])\n\t\t}\n\t}\n\tflush(len(rs.recs))\n\treturn joinStrings(ss, true)\n}\n\nfunc formatColon(padding int) string {\n\t// Deliberately introduce instability into the debug output to\n\t// discourage users from performing string comparisons.\n\t// This provides us flexibility to change the output in the future.\n\tif detrand.Bool() {\n\t\treturn \":\" + strings.Repeat(\" \", 1+padding) // use non-breaking spaces (U+00a0)\n\t} else {\n\t\treturn \":\" + strings.Repeat(\" \", 1+padding) // use regular spaces (U+0020)\n\t}\n}\n\nfunc joinStrings(ss []string, isMulti bool) string {\n\tif len(ss) == 0 {\n\t\treturn \"\"\n\t}\n\tif isMulti {\n\t\treturn \"\\n\\t\" + strings.Join(ss, \"\\n\\t\") + \"\\n\"\n\t}\n\treturn strings.Join(ss, \", \")\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/descopts/options.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package descopts contains the nil pointers to concrete descriptor options.\n//\n// This package exists as a form of reverse dependency injection so that certain\n// packages (e.g., internal/filedesc and internal/filetype can avoid a direct\n// dependency on the descriptor proto package).\npackage descopts\n\nimport \"google.golang.org/protobuf/reflect/protoreflect\"\n\n// These variables are set by the init function in descriptor.pb.go via logic\n// in internal/filetype. In other words, so long as the descriptor proto package\n// is linked in, these variables will be populated.\n//\n// Each variable is populated with a nil pointer to the options struct.\nvar (\n\tFile           protoreflect.ProtoMessage\n\tEnum           protoreflect.ProtoMessage\n\tEnumValue      protoreflect.ProtoMessage\n\tMessage        protoreflect.ProtoMessage\n\tField          protoreflect.ProtoMessage\n\tOneof          protoreflect.ProtoMessage\n\tExtensionRange protoreflect.ProtoMessage\n\tService        protoreflect.ProtoMessage\n\tMethod         protoreflect.ProtoMessage\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/detrand/rand.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package detrand provides deterministically random functionality.\n//\n// The pseudo-randomness of these functions is seeded by the program binary\n// itself and guarantees that the output does not change within a program,\n// while ensuring that the output is unstable across different builds.\npackage detrand\n\nimport (\n\t\"encoding/binary\"\n\t\"hash/fnv\"\n\t\"os\"\n)\n\n// Disable disables detrand such that all functions returns the zero value.\n// This function is not concurrent-safe and must be called during program init.\nfunc Disable() {\n\trandSeed = 0\n}\n\n// Bool returns a deterministically random boolean.\nfunc Bool() bool {\n\treturn randSeed%2 == 1\n}\n\n// Intn returns a deterministically random integer between 0 and n-1, inclusive.\nfunc Intn(n int) int {\n\tif n <= 0 {\n\t\tpanic(\"must be positive\")\n\t}\n\treturn int(randSeed % uint64(n))\n}\n\n// randSeed is a best-effort at an approximate hash of the Go binary.\nvar randSeed = binaryHash()\n\nfunc binaryHash() uint64 {\n\t// Open the Go binary.\n\ts, err := os.Executable()\n\tif err != nil {\n\t\treturn 0\n\t}\n\tf, err := os.Open(s)\n\tif err != nil {\n\t\treturn 0\n\t}\n\tdefer f.Close()\n\n\t// Hash the size and several samples of the Go binary.\n\tconst numSamples = 8\n\tvar buf [64]byte\n\th := fnv.New64()\n\tfi, err := f.Stat()\n\tif err != nil {\n\t\treturn 0\n\t}\n\tbinary.LittleEndian.PutUint64(buf[:8], uint64(fi.Size()))\n\th.Write(buf[:8])\n\tfor i := int64(0); i < numSamples; i++ {\n\t\tif _, err := f.ReadAt(buf[:], i*fi.Size()/numSamples); err != nil {\n\t\t\treturn 0\n\t\t}\n\t\th.Write(buf[:])\n\t}\n\treturn h.Sum64()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package editiondefaults contains the binary representation of the editions\n// defaults.\npackage editiondefaults\n\nimport _ \"embed\"\n\n//go:embed editions_defaults.binpb\nvar Defaults []byte\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/editionssupport/editions.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package editionssupport defines constants for editions that are supported.\npackage editionssupport\n\nimport \"google.golang.org/protobuf/types/descriptorpb\"\n\nconst (\n\tMinimum = descriptorpb.Edition_EDITION_PROTO2\n\tMaximum = descriptorpb.Edition_EDITION_2024\n\n\t// MaximumKnown is the maximum edition that is known to Go Protobuf, but not\n\t// declared as supported. In other words: end users cannot use it, but\n\t// testprotos inside Go Protobuf can.\n\tMaximumKnown = descriptorpb.Edition_EDITION_2024\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/defval/default.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package defval marshals and unmarshals textual forms of default values.\n//\n// This package handles both the form historically used in Go struct field tags\n// and also the form used by google.protobuf.FieldDescriptorProto.default_value\n// since they differ in superficial ways.\npackage defval\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\n\tptext \"google.golang.org/protobuf/internal/encoding/text\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// Format is the serialization format used to represent the default value.\ntype Format int\n\nconst (\n\t_ Format = iota\n\n\t// Descriptor uses the serialization format that protoc uses with the\n\t// google.protobuf.FieldDescriptorProto.default_value field.\n\tDescriptor\n\n\t// GoTag uses the historical serialization format in Go struct field tags.\n\tGoTag\n)\n\n// Unmarshal deserializes the default string s according to the given kind k.\n// When k is an enum, a list of enum value descriptors must be provided.\nfunc Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescriptors, f Format) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) {\n\tswitch k {\n\tcase protoreflect.BoolKind:\n\t\tif f == GoTag {\n\t\t\tswitch s {\n\t\t\tcase \"1\":\n\t\t\t\treturn protoreflect.ValueOfBool(true), nil, nil\n\t\t\tcase \"0\":\n\t\t\t\treturn protoreflect.ValueOfBool(false), nil, nil\n\t\t\t}\n\t\t} else {\n\t\t\tswitch s {\n\t\t\tcase \"true\":\n\t\t\t\treturn protoreflect.ValueOfBool(true), nil, nil\n\t\t\tcase \"false\":\n\t\t\t\treturn protoreflect.ValueOfBool(false), nil, nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.EnumKind:\n\t\tif f == GoTag {\n\t\t\t// Go tags use the numeric form of the enum value.\n\t\t\tif n, err := strconv.ParseInt(s, 10, 32); err == nil {\n\t\t\t\tif ev := evs.ByNumber(protoreflect.EnumNumber(n)); ev != nil {\n\t\t\t\t\treturn protoreflect.ValueOfEnum(ev.Number()), ev, nil\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Descriptor default_value use the enum identifier.\n\t\t\tev := evs.ByName(protoreflect.Name(s))\n\t\t\tif ev != nil {\n\t\t\t\treturn protoreflect.ValueOfEnum(ev.Number()), ev, nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif v, err := strconv.ParseInt(s, 10, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfInt32(int32(v)), nil, nil\n\t\t}\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif v, err := strconv.ParseInt(s, 10, 64); err == nil {\n\t\t\treturn protoreflect.ValueOfInt64(int64(v)), nil, nil\n\t\t}\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif v, err := strconv.ParseUint(s, 10, 32); err == nil {\n\t\t\treturn protoreflect.ValueOfUint32(uint32(v)), nil, nil\n\t\t}\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif v, err := strconv.ParseUint(s, 10, 64); err == nil {\n\t\t\treturn protoreflect.ValueOfUint64(uint64(v)), nil, nil\n\t\t}\n\tcase protoreflect.FloatKind, protoreflect.DoubleKind:\n\t\tvar v float64\n\t\tvar err error\n\t\tswitch s {\n\t\tcase \"-inf\":\n\t\t\tv = math.Inf(-1)\n\t\tcase \"inf\":\n\t\t\tv = math.Inf(+1)\n\t\tcase \"nan\":\n\t\t\tv = math.NaN()\n\t\tdefault:\n\t\t\tv, err = strconv.ParseFloat(s, 64)\n\t\t}\n\t\tif err == nil {\n\t\t\tif k == protoreflect.FloatKind {\n\t\t\t\treturn protoreflect.ValueOfFloat32(float32(v)), nil, nil\n\t\t\t} else {\n\t\t\t\treturn protoreflect.ValueOfFloat64(float64(v)), nil, nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.StringKind:\n\t\t// String values are already unescaped and can be used as is.\n\t\treturn protoreflect.ValueOfString(s), nil, nil\n\tcase protoreflect.BytesKind:\n\t\tif b, ok := unmarshalBytes(s); ok {\n\t\t\treturn protoreflect.ValueOfBytes(b), nil, nil\n\t\t}\n\t}\n\treturn protoreflect.Value{}, nil, errors.New(\"could not parse value for %v: %q\", k, s)\n}\n\n// Marshal serializes v as the default string according to the given kind k.\n// When specifying the Descriptor format for an enum kind, the associated\n// enum value descriptor must be provided.\nfunc Marshal(v protoreflect.Value, ev protoreflect.EnumValueDescriptor, k protoreflect.Kind, f Format) (string, error) {\n\tswitch k {\n\tcase protoreflect.BoolKind:\n\t\tif f == GoTag {\n\t\t\tif v.Bool() {\n\t\t\t\treturn \"1\", nil\n\t\t\t} else {\n\t\t\t\treturn \"0\", nil\n\t\t\t}\n\t\t} else {\n\t\t\tif v.Bool() {\n\t\t\t\treturn \"true\", nil\n\t\t\t} else {\n\t\t\t\treturn \"false\", nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.EnumKind:\n\t\tif f == GoTag {\n\t\t\treturn strconv.FormatInt(int64(v.Enum()), 10), nil\n\t\t} else {\n\t\t\treturn string(ev.Name()), nil\n\t\t}\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\treturn strconv.FormatInt(v.Int(), 10), nil\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\treturn strconv.FormatUint(v.Uint(), 10), nil\n\tcase protoreflect.FloatKind, protoreflect.DoubleKind:\n\t\tf := v.Float()\n\t\tswitch {\n\t\tcase math.IsInf(f, -1):\n\t\t\treturn \"-inf\", nil\n\t\tcase math.IsInf(f, +1):\n\t\t\treturn \"inf\", nil\n\t\tcase math.IsNaN(f):\n\t\t\treturn \"nan\", nil\n\t\tdefault:\n\t\t\tif k == protoreflect.FloatKind {\n\t\t\t\treturn strconv.FormatFloat(f, 'g', -1, 32), nil\n\t\t\t} else {\n\t\t\t\treturn strconv.FormatFloat(f, 'g', -1, 64), nil\n\t\t\t}\n\t\t}\n\tcase protoreflect.StringKind:\n\t\t// String values are serialized as is without any escaping.\n\t\treturn v.String(), nil\n\tcase protoreflect.BytesKind:\n\t\tif s, ok := marshalBytes(v.Bytes()); ok {\n\t\t\treturn s, nil\n\t\t}\n\t}\n\treturn \"\", errors.New(\"could not format value for %v: %v\", k, v)\n}\n\n// unmarshalBytes deserializes bytes by applying C unescaping.\nfunc unmarshalBytes(s string) ([]byte, bool) {\n\t// Bytes values use the same escaping as the text format,\n\t// however they lack the surrounding double quotes.\n\tv, err := ptext.UnmarshalString(`\"` + s + `\"`)\n\tif err != nil {\n\t\treturn nil, false\n\t}\n\treturn []byte(v), true\n}\n\n// marshalBytes serializes bytes by using C escaping.\n// To match the exact output of protoc, this is identical to the\n// CEscape function in strutil.cc of the protoc source code.\nfunc marshalBytes(b []byte) (string, bool) {\n\tvar s []byte\n\tfor _, c := range b {\n\t\tswitch c {\n\t\tcase '\\n':\n\t\t\ts = append(s, `\\n`...)\n\t\tcase '\\r':\n\t\t\ts = append(s, `\\r`...)\n\t\tcase '\\t':\n\t\t\ts = append(s, `\\t`...)\n\t\tcase '\"':\n\t\t\ts = append(s, `\\\"`...)\n\t\tcase '\\'':\n\t\t\ts = append(s, `\\'`...)\n\t\tcase '\\\\':\n\t\t\ts = append(s, `\\\\`...)\n\t\tdefault:\n\t\t\tif printableASCII := c >= 0x20 && c <= 0x7e; printableASCII {\n\t\t\t\ts = append(s, c)\n\t\t\t} else {\n\t\t\t\ts = append(s, fmt.Sprintf(`\\%03o`, c)...)\n\t\t\t}\n\t\t}\n\t}\n\treturn string(s), true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/json/decode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"regexp\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/errors\"\n)\n\n// call specifies which Decoder method was invoked.\ntype call uint8\n\nconst (\n\treadCall call = iota\n\tpeekCall\n)\n\nconst unexpectedFmt = \"unexpected token %s\"\n\n// ErrUnexpectedEOF means that EOF was encountered in the middle of the input.\nvar ErrUnexpectedEOF = errors.New(\"%v\", io.ErrUnexpectedEOF)\n\n// Decoder is a token-based JSON decoder.\ntype Decoder struct {\n\t// lastCall is last method called, either readCall or peekCall.\n\t// Initial value is readCall.\n\tlastCall call\n\n\t// lastToken contains the last read token.\n\tlastToken Token\n\n\t// lastErr contains the last read error.\n\tlastErr error\n\n\t// openStack is a stack containing ObjectOpen and ArrayOpen values. The\n\t// top of stack represents the object or the array the current value is\n\t// directly located in.\n\topenStack []Kind\n\n\t// orig is used in reporting line and column.\n\torig []byte\n\t// in contains the unconsumed input.\n\tin []byte\n}\n\n// NewDecoder returns a Decoder to read the given []byte.\nfunc NewDecoder(b []byte) *Decoder {\n\treturn &Decoder{orig: b, in: b}\n}\n\n// Peek looks ahead and returns the next token kind without advancing a read.\nfunc (d *Decoder) Peek() (Token, error) {\n\tdefer func() { d.lastCall = peekCall }()\n\tif d.lastCall == readCall {\n\t\td.lastToken, d.lastErr = d.Read()\n\t}\n\treturn d.lastToken, d.lastErr\n}\n\n// Read returns the next JSON token.\n// It will return an error if there is no valid token.\nfunc (d *Decoder) Read() (Token, error) {\n\tconst scalar = Null | Bool | Number | String\n\n\tdefer func() { d.lastCall = readCall }()\n\tif d.lastCall == peekCall {\n\t\treturn d.lastToken, d.lastErr\n\t}\n\n\ttok, err := d.parseNext()\n\tif err != nil {\n\t\treturn Token{}, err\n\t}\n\n\tswitch tok.kind {\n\tcase EOF:\n\t\tif len(d.openStack) != 0 ||\n\t\t\td.lastToken.kind&scalar|ObjectClose|ArrayClose == 0 {\n\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t}\n\n\tcase Null:\n\t\tif !d.isValueNext() {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\n\tcase Bool, Number:\n\t\tif !d.isValueNext() {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\n\tcase String:\n\t\tif d.isValueNext() {\n\t\t\tbreak\n\t\t}\n\t\t// This string token should only be for a field name.\n\t\tif d.lastToken.kind&(ObjectOpen|comma) == 0 {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\t\tif len(d.in) == 0 {\n\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t}\n\t\tif c := d.in[0]; c != ':' {\n\t\t\treturn Token{}, d.newSyntaxError(d.currPos(), `unexpected character %s, missing \":\" after field name`, string(c))\n\t\t}\n\t\ttok.kind = Name\n\t\td.consume(1)\n\n\tcase ObjectOpen, ArrayOpen:\n\t\tif !d.isValueNext() {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\t\td.openStack = append(d.openStack, tok.kind)\n\n\tcase ObjectClose:\n\t\tif len(d.openStack) == 0 ||\n\t\t\td.lastToken.kind&(Name|comma) != 0 ||\n\t\t\td.openStack[len(d.openStack)-1] != ObjectOpen {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\t\td.openStack = d.openStack[:len(d.openStack)-1]\n\n\tcase ArrayClose:\n\t\tif len(d.openStack) == 0 ||\n\t\t\td.lastToken.kind == comma ||\n\t\t\td.openStack[len(d.openStack)-1] != ArrayOpen {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\t\td.openStack = d.openStack[:len(d.openStack)-1]\n\n\tcase comma:\n\t\tif len(d.openStack) == 0 ||\n\t\t\td.lastToken.kind&(scalar|ObjectClose|ArrayClose) == 0 {\n\t\t\treturn Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())\n\t\t}\n\t}\n\n\t// Update d.lastToken only after validating token to be in the right sequence.\n\td.lastToken = tok\n\n\tif d.lastToken.kind == comma {\n\t\treturn d.Read()\n\t}\n\treturn tok, nil\n}\n\n// Any sequence that looks like a non-delimiter (for error reporting).\nvar errRegexp = regexp.MustCompile(`^([-+._a-zA-Z0-9]{1,32}|.)`)\n\n// parseNext parses for the next JSON token. It returns a Token object for\n// different types, except for Name. It does not handle whether the next token\n// is in a valid sequence or not.\nfunc (d *Decoder) parseNext() (Token, error) {\n\t// Trim leading spaces.\n\td.consume(0)\n\n\tin := d.in\n\tif len(in) == 0 {\n\t\treturn d.consumeToken(EOF, 0), nil\n\t}\n\n\tswitch in[0] {\n\tcase 'n':\n\t\tif n := matchWithDelim(\"null\", in); n != 0 {\n\t\t\treturn d.consumeToken(Null, n), nil\n\t\t}\n\n\tcase 't':\n\t\tif n := matchWithDelim(\"true\", in); n != 0 {\n\t\t\treturn d.consumeBoolToken(true, n), nil\n\t\t}\n\n\tcase 'f':\n\t\tif n := matchWithDelim(\"false\", in); n != 0 {\n\t\t\treturn d.consumeBoolToken(false, n), nil\n\t\t}\n\n\tcase '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':\n\t\tif n, ok := parseNumber(in); ok {\n\t\t\treturn d.consumeToken(Number, n), nil\n\t\t}\n\n\tcase '\"':\n\t\ts, n, err := d.parseString(in)\n\t\tif err != nil {\n\t\t\treturn Token{}, err\n\t\t}\n\t\treturn d.consumeStringToken(s, n), nil\n\n\tcase '{':\n\t\treturn d.consumeToken(ObjectOpen, 1), nil\n\n\tcase '}':\n\t\treturn d.consumeToken(ObjectClose, 1), nil\n\n\tcase '[':\n\t\treturn d.consumeToken(ArrayOpen, 1), nil\n\n\tcase ']':\n\t\treturn d.consumeToken(ArrayClose, 1), nil\n\n\tcase ',':\n\t\treturn d.consumeToken(comma, 1), nil\n\t}\n\treturn Token{}, d.newSyntaxError(d.currPos(), \"invalid value %s\", errRegexp.Find(in))\n}\n\n// newSyntaxError returns an error with line and column information useful for\n// syntax errors.\nfunc (d *Decoder) newSyntaxError(pos int, f string, x ...any) error {\n\te := errors.New(f, x...)\n\tline, column := d.Position(pos)\n\treturn errors.New(\"syntax error (line %d:%d): %v\", line, column, e)\n}\n\n// Position returns line and column number of given index of the original input.\n// It will panic if index is out of range.\nfunc (d *Decoder) Position(idx int) (line int, column int) {\n\tb := d.orig[:idx]\n\tline = bytes.Count(b, []byte(\"\\n\")) + 1\n\tif i := bytes.LastIndexByte(b, '\\n'); i >= 0 {\n\t\tb = b[i+1:]\n\t}\n\tcolumn = utf8.RuneCount(b) + 1 // ignore multi-rune characters\n\treturn line, column\n}\n\n// currPos returns the current index position of d.in from d.orig.\nfunc (d *Decoder) currPos() int {\n\treturn len(d.orig) - len(d.in)\n}\n\n// matchWithDelim matches s with the input b and verifies that the match\n// terminates with a delimiter of some form (e.g., r\"[^-+_.a-zA-Z0-9]\").\n// As a special case, EOF is considered a delimiter. It returns the length of s\n// if there is a match, else 0.\nfunc matchWithDelim(s string, b []byte) int {\n\tif !bytes.HasPrefix(b, []byte(s)) {\n\t\treturn 0\n\t}\n\n\tn := len(s)\n\tif n < len(b) && isNotDelim(b[n]) {\n\t\treturn 0\n\t}\n\treturn n\n}\n\n// isNotDelim returns true if given byte is a not delimiter character.\nfunc isNotDelim(c byte) bool {\n\treturn (c == '-' || c == '+' || c == '.' || c == '_' ||\n\t\t('a' <= c && c <= 'z') ||\n\t\t('A' <= c && c <= 'Z') ||\n\t\t('0' <= c && c <= '9'))\n}\n\n// consume consumes n bytes of input and any subsequent whitespace.\nfunc (d *Decoder) consume(n int) {\n\td.in = d.in[n:]\n\tfor len(d.in) > 0 {\n\t\tswitch d.in[0] {\n\t\tcase ' ', '\\n', '\\r', '\\t':\n\t\t\td.in = d.in[1:]\n\t\tdefault:\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// isValueNext returns true if next type should be a JSON value: Null,\n// Number, String or Bool.\nfunc (d *Decoder) isValueNext() bool {\n\tif len(d.openStack) == 0 {\n\t\treturn d.lastToken.kind == 0\n\t}\n\n\tstart := d.openStack[len(d.openStack)-1]\n\tswitch start {\n\tcase ObjectOpen:\n\t\treturn d.lastToken.kind&Name != 0\n\tcase ArrayOpen:\n\t\treturn d.lastToken.kind&(ArrayOpen|comma) != 0\n\t}\n\tpanic(fmt.Sprintf(\n\t\t\"unreachable logic in Decoder.isValueNext, lastToken.kind: %v, openStack: %v\",\n\t\td.lastToken.kind, start))\n}\n\n// consumeToken constructs a Token for given Kind with raw value derived from\n// current d.in and given size, and consumes the given size-length of it.\nfunc (d *Decoder) consumeToken(kind Kind, size int) Token {\n\ttok := Token{\n\t\tkind: kind,\n\t\traw:  d.in[:size],\n\t\tpos:  len(d.orig) - len(d.in),\n\t}\n\td.consume(size)\n\treturn tok\n}\n\n// consumeBoolToken constructs a Token for a Bool kind with raw value derived from\n// current d.in and given size.\nfunc (d *Decoder) consumeBoolToken(b bool, size int) Token {\n\ttok := Token{\n\t\tkind: Bool,\n\t\traw:  d.in[:size],\n\t\tpos:  len(d.orig) - len(d.in),\n\t\tboo:  b,\n\t}\n\td.consume(size)\n\treturn tok\n}\n\n// consumeStringToken constructs a Token for a String kind with raw value derived\n// from current d.in and given size.\nfunc (d *Decoder) consumeStringToken(s string, size int) Token {\n\ttok := Token{\n\t\tkind: String,\n\t\traw:  d.in[:size],\n\t\tpos:  len(d.orig) - len(d.in),\n\t\tstr:  s,\n\t}\n\td.consume(size)\n\treturn tok\n}\n\n// Clone returns a copy of the Decoder for use in reading ahead the next JSON\n// object, array or other values without affecting current Decoder.\nfunc (d *Decoder) Clone() *Decoder {\n\tret := *d\n\tret.openStack = append([]Kind(nil), ret.openStack...)\n\treturn &ret\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/json/decode_number.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"bytes\"\n\t\"strconv\"\n)\n\n// parseNumber reads the given []byte for a valid JSON number. If it is valid,\n// it returns the number of bytes.  Parsing logic follows the definition in\n// https://tools.ietf.org/html/rfc7159#section-6, and is based off\n// encoding/json.isValidNumber function.\nfunc parseNumber(input []byte) (int, bool) {\n\tvar n int\n\n\ts := input\n\tif len(s) == 0 {\n\t\treturn 0, false\n\t}\n\n\t// Optional -\n\tif s[0] == '-' {\n\t\ts = s[1:]\n\t\tn++\n\t\tif len(s) == 0 {\n\t\t\treturn 0, false\n\t\t}\n\t}\n\n\t// Digits\n\tswitch {\n\tcase s[0] == '0':\n\t\ts = s[1:]\n\t\tn++\n\n\tcase '1' <= s[0] && s[0] <= '9':\n\t\ts = s[1:]\n\t\tn++\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\n\tdefault:\n\t\treturn 0, false\n\t}\n\n\t// . followed by 1 or more digits.\n\tif len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' {\n\t\ts = s[2:]\n\t\tn += 2\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t}\n\n\t// e or E followed by an optional - or + and\n\t// 1 or more digits.\n\tif len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {\n\t\ts = s[1:]\n\t\tn++\n\t\tif s[0] == '+' || s[0] == '-' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t\tif len(s) == 0 {\n\t\t\t\treturn 0, false\n\t\t\t}\n\t\t}\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t}\n\n\t// Check that next byte is a delimiter or it is at the end.\n\tif n < len(input) && isNotDelim(input[n]) {\n\t\treturn 0, false\n\t}\n\n\treturn n, true\n}\n\n// numberParts is the result of parsing out a valid JSON number. It contains\n// the parts of a number. The parts are used for integer conversion.\ntype numberParts struct {\n\tneg  bool\n\tintp []byte\n\tfrac []byte\n\texp  []byte\n}\n\n// parseNumber constructs numberParts from given []byte. The logic here is\n// similar to consumeNumber above with the difference of having to construct\n// numberParts. The slice fields in numberParts are subslices of the input.\nfunc parseNumberParts(input []byte) (numberParts, bool) {\n\tvar neg bool\n\tvar intp []byte\n\tvar frac []byte\n\tvar exp []byte\n\n\ts := input\n\tif len(s) == 0 {\n\t\treturn numberParts{}, false\n\t}\n\n\t// Optional -\n\tif s[0] == '-' {\n\t\tneg = true\n\t\ts = s[1:]\n\t\tif len(s) == 0 {\n\t\t\treturn numberParts{}, false\n\t\t}\n\t}\n\n\t// Digits\n\tswitch {\n\tcase s[0] == '0':\n\t\t// Skip first 0 and no need to store.\n\t\ts = s[1:]\n\n\tcase '1' <= s[0] && s[0] <= '9':\n\t\tintp = s\n\t\tn := 1\n\t\ts = s[1:]\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\tintp = intp[:n]\n\n\tdefault:\n\t\treturn numberParts{}, false\n\t}\n\n\t// . followed by 1 or more digits.\n\tif len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' {\n\t\tfrac = s[1:]\n\t\tn := 1\n\t\ts = s[2:]\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\tfrac = frac[:n]\n\t}\n\n\t// e or E followed by an optional - or + and\n\t// 1 or more digits.\n\tif len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {\n\t\ts = s[1:]\n\t\texp = s\n\t\tn := 0\n\t\tif s[0] == '+' || s[0] == '-' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t\tif len(s) == 0 {\n\t\t\t\treturn numberParts{}, false\n\t\t\t}\n\t\t}\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\texp = exp[:n]\n\t}\n\n\treturn numberParts{\n\t\tneg:  neg,\n\t\tintp: intp,\n\t\tfrac: bytes.TrimRight(frac, \"0\"), // Remove unnecessary 0s to the right.\n\t\texp:  exp,\n\t}, true\n}\n\n// normalizeToIntString returns an integer string in normal form without the\n// E-notation for given numberParts. It will return false if it is not an\n// integer or if the exponent exceeds than max/min int value.\nfunc normalizeToIntString(n numberParts) (string, bool) {\n\tintpSize := len(n.intp)\n\tfracSize := len(n.frac)\n\n\tif intpSize == 0 && fracSize == 0 {\n\t\treturn \"0\", true\n\t}\n\n\tvar exp int\n\tif len(n.exp) > 0 {\n\t\ti, err := strconv.ParseInt(string(n.exp), 10, 32)\n\t\tif err != nil {\n\t\t\treturn \"\", false\n\t\t}\n\t\texp = int(i)\n\t}\n\n\tvar num []byte\n\tif exp >= 0 {\n\t\t// For positive E, shift fraction digits into integer part and also pad\n\t\t// with zeroes as needed.\n\n\t\t// If there are more digits in fraction than the E value, then the\n\t\t// number is not an integer.\n\t\tif fracSize > exp {\n\t\t\treturn \"\", false\n\t\t}\n\n\t\t// Make sure resulting digits are within max value limit to avoid\n\t\t// unnecessarily constructing a large byte slice that may simply fail\n\t\t// later on.\n\t\tconst maxDigits = 20 // Max uint64 value has 20 decimal digits.\n\t\tif intpSize+exp > maxDigits {\n\t\t\treturn \"\", false\n\t\t}\n\n\t\t// Set cap to make a copy of integer part when appended.\n\t\tnum = n.intp[:len(n.intp):len(n.intp)]\n\t\tnum = append(num, n.frac...)\n\t\tfor i := 0; i < exp-fracSize; i++ {\n\t\t\tnum = append(num, '0')\n\t\t}\n\t} else {\n\t\t// For negative E, shift digits in integer part out.\n\n\t\t// If there are fractions, then the number is not an integer.\n\t\tif fracSize > 0 {\n\t\t\treturn \"\", false\n\t\t}\n\n\t\t// index is where the decimal point will be after adjusting for negative\n\t\t// exponent.\n\t\tindex := intpSize + exp\n\t\tif index < 0 {\n\t\t\treturn \"\", false\n\t\t}\n\n\t\tnum = n.intp\n\t\t// If any of the digits being shifted to the right of the decimal point\n\t\t// is non-zero, then the number is not an integer.\n\t\tfor i := index; i < intpSize; i++ {\n\t\t\tif num[i] != '0' {\n\t\t\t\treturn \"\", false\n\t\t\t}\n\t\t}\n\t\tnum = num[:index]\n\t}\n\n\tif n.neg {\n\t\treturn \"-\" + string(num), true\n\t}\n\treturn string(num), true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/json/decode_string.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"strconv\"\n\t\"unicode\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/strs\"\n)\n\nfunc (d *Decoder) parseString(in []byte) (string, int, error) {\n\tin0 := in\n\tif len(in) == 0 {\n\t\treturn \"\", 0, ErrUnexpectedEOF\n\t}\n\tif in[0] != '\"' {\n\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid character %q at start of string\", in[0])\n\t}\n\tin = in[1:]\n\ti := indexNeedEscapeInBytes(in)\n\tin, out := in[i:], in[:i:i] // set cap to prevent mutations\n\tfor len(in) > 0 {\n\t\tswitch r, n := utf8.DecodeRune(in); {\n\t\tcase r == utf8.RuneError && n == 1:\n\t\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid UTF-8 in string\")\n\t\tcase r < ' ':\n\t\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid character %q in string\", r)\n\t\tcase r == '\"':\n\t\t\tin = in[1:]\n\t\t\tn := len(in0) - len(in)\n\t\t\treturn string(out), n, nil\n\t\tcase r == '\\\\':\n\t\t\tif len(in) < 2 {\n\t\t\t\treturn \"\", 0, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch r := in[1]; r {\n\t\t\tcase '\"', '\\\\', '/':\n\t\t\t\tin, out = in[2:], append(out, r)\n\t\t\tcase 'b':\n\t\t\t\tin, out = in[2:], append(out, '\\b')\n\t\t\tcase 'f':\n\t\t\t\tin, out = in[2:], append(out, '\\f')\n\t\t\tcase 'n':\n\t\t\t\tin, out = in[2:], append(out, '\\n')\n\t\t\tcase 'r':\n\t\t\t\tin, out = in[2:], append(out, '\\r')\n\t\t\tcase 't':\n\t\t\t\tin, out = in[2:], append(out, '\\t')\n\t\t\tcase 'u':\n\t\t\t\tif len(in) < 6 {\n\t\t\t\t\treturn \"\", 0, ErrUnexpectedEOF\n\t\t\t\t}\n\t\t\t\tv, err := strconv.ParseUint(string(in[2:6]), 16, 16)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid escape code %q in string\", in[:6])\n\t\t\t\t}\n\t\t\t\tin = in[6:]\n\n\t\t\t\tr := rune(v)\n\t\t\t\tif utf16.IsSurrogate(r) {\n\t\t\t\t\tif len(in) < 6 {\n\t\t\t\t\t\treturn \"\", 0, ErrUnexpectedEOF\n\t\t\t\t\t}\n\t\t\t\t\tv, err := strconv.ParseUint(string(in[2:6]), 16, 16)\n\t\t\t\t\tr = utf16.DecodeRune(r, rune(v))\n\t\t\t\t\tif in[0] != '\\\\' || in[1] != 'u' ||\n\t\t\t\t\t\tr == unicode.ReplacementChar || err != nil {\n\t\t\t\t\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid escape code %q in string\", in[:6])\n\t\t\t\t\t}\n\t\t\t\t\tin = in[6:]\n\t\t\t\t}\n\t\t\t\tout = append(out, string(r)...)\n\t\t\tdefault:\n\t\t\t\treturn \"\", 0, d.newSyntaxError(d.currPos(), \"invalid escape code %q in string\", in[:2])\n\t\t\t}\n\t\tdefault:\n\t\t\ti := indexNeedEscapeInBytes(in[n:])\n\t\t\tin, out = in[n+i:], append(out, in[:n+i]...)\n\t\t}\n\t}\n\treturn \"\", 0, ErrUnexpectedEOF\n}\n\n// indexNeedEscapeInBytes returns the index of the character that needs\n// escaping. If no characters need escaping, this returns the input length.\nfunc indexNeedEscapeInBytes(b []byte) int { return indexNeedEscapeInString(strs.UnsafeString(b)) }\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/json/decode_token.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strconv\"\n)\n\n// Kind represents a token kind expressible in the JSON format.\ntype Kind uint16\n\nconst (\n\tInvalid Kind = (1 << iota) / 2\n\tEOF\n\tNull\n\tBool\n\tNumber\n\tString\n\tName\n\tObjectOpen\n\tObjectClose\n\tArrayOpen\n\tArrayClose\n\n\t// comma is only for parsing in between tokens and\n\t// does not need to be exported.\n\tcomma\n)\n\nfunc (k Kind) String() string {\n\tswitch k {\n\tcase EOF:\n\t\treturn \"eof\"\n\tcase Null:\n\t\treturn \"null\"\n\tcase Bool:\n\t\treturn \"bool\"\n\tcase Number:\n\t\treturn \"number\"\n\tcase String:\n\t\treturn \"string\"\n\tcase ObjectOpen:\n\t\treturn \"{\"\n\tcase ObjectClose:\n\t\treturn \"}\"\n\tcase Name:\n\t\treturn \"name\"\n\tcase ArrayOpen:\n\t\treturn \"[\"\n\tcase ArrayClose:\n\t\treturn \"]\"\n\tcase comma:\n\t\treturn \",\"\n\t}\n\treturn \"<invalid>\"\n}\n\n// Token provides a parsed token kind and value.\n//\n// Values are provided by the difference accessor methods. The accessor methods\n// Name, Bool, and ParsedString will panic if called on the wrong kind. There\n// are different accessor methods for the Number kind for converting to the\n// appropriate Go numeric type and those methods have the ok return value.\ntype Token struct {\n\t// Token kind.\n\tkind Kind\n\t// pos provides the position of the token in the original input.\n\tpos int\n\t// raw bytes of the serialized token.\n\t// This is a subslice into the original input.\n\traw []byte\n\t// boo is parsed boolean value.\n\tboo bool\n\t// str is parsed string value.\n\tstr string\n}\n\n// Kind returns the token kind.\nfunc (t Token) Kind() Kind {\n\treturn t.kind\n}\n\n// RawString returns the read value in string.\nfunc (t Token) RawString() string {\n\treturn string(t.raw)\n}\n\n// Pos returns the token position from the input.\nfunc (t Token) Pos() int {\n\treturn t.pos\n}\n\n// Name returns the object name if token is Name, else it panics.\nfunc (t Token) Name() string {\n\tif t.kind == Name {\n\t\treturn t.str\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a Name: %v\", t.RawString()))\n}\n\n// Bool returns the bool value if token kind is Bool, else it panics.\nfunc (t Token) Bool() bool {\n\tif t.kind == Bool {\n\t\treturn t.boo\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a Bool: %v\", t.RawString()))\n}\n\n// ParsedString returns the string value for a JSON string token or the read\n// value in string if token is not a string.\nfunc (t Token) ParsedString() string {\n\tif t.kind == String {\n\t\treturn t.str\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a String: %v\", t.RawString()))\n}\n\n// Float returns the floating-point number if token kind is Number.\n//\n// The floating-point precision is specified by the bitSize parameter: 32 for\n// float32 or 64 for float64. If bitSize=32, the result still has type float64,\n// but it will be convertible to float32 without changing its value. It will\n// return false if the number exceeds the floating point limits for given\n// bitSize.\nfunc (t Token) Float(bitSize int) (float64, bool) {\n\tif t.kind != Number {\n\t\treturn 0, false\n\t}\n\tf, err := strconv.ParseFloat(t.RawString(), bitSize)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\treturn f, true\n}\n\n// Int returns the signed integer number if token is Number.\n//\n// The given bitSize specifies the integer type that the result must fit into.\n// It returns false if the number is not an integer value or if the result\n// exceeds the limits for given bitSize.\nfunc (t Token) Int(bitSize int) (int64, bool) {\n\ts, ok := t.getIntStr()\n\tif !ok {\n\t\treturn 0, false\n\t}\n\tn, err := strconv.ParseInt(s, 10, bitSize)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\treturn n, true\n}\n\n// Uint returns the signed integer number if token is Number.\n//\n// The given bitSize specifies the unsigned integer type that the result must\n// fit into. It returns false if the number is not an unsigned integer value\n// or if the result exceeds the limits for given bitSize.\nfunc (t Token) Uint(bitSize int) (uint64, bool) {\n\ts, ok := t.getIntStr()\n\tif !ok {\n\t\treturn 0, false\n\t}\n\tn, err := strconv.ParseUint(s, 10, bitSize)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\treturn n, true\n}\n\nfunc (t Token) getIntStr() (string, bool) {\n\tif t.kind != Number {\n\t\treturn \"\", false\n\t}\n\tparts, ok := parseNumberParts(t.raw)\n\tif !ok {\n\t\treturn \"\", false\n\t}\n\treturn normalizeToIntString(parts)\n}\n\n// TokenEquals returns true if given Tokens are equal, else false.\nfunc TokenEquals(x, y Token) bool {\n\treturn x.kind == y.kind &&\n\t\tx.pos == y.pos &&\n\t\tbytes.Equal(x.raw, y.raw) &&\n\t\tx.boo == y.boo &&\n\t\tx.str == y.str\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/json/encode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage json\n\nimport (\n\t\"math\"\n\t\"math/bits\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/detrand\"\n\t\"google.golang.org/protobuf/internal/errors\"\n)\n\n// kind represents an encoding type.\ntype kind uint8\n\nconst (\n\t_ kind = (1 << iota) / 2\n\tname\n\tscalar\n\tobjectOpen\n\tobjectClose\n\tarrayOpen\n\tarrayClose\n)\n\n// Encoder provides methods to write out JSON constructs and values. The user is\n// responsible for producing valid sequences of JSON constructs and values.\ntype Encoder struct {\n\tindent   string\n\tlastKind kind\n\tindents  []byte\n\tout      []byte\n}\n\n// NewEncoder returns an Encoder.\n//\n// If indent is a non-empty string, it causes every entry for an Array or Object\n// to be preceded by the indent and trailed by a newline.\nfunc NewEncoder(buf []byte, indent string) (*Encoder, error) {\n\te := &Encoder{\n\t\tout: buf,\n\t}\n\tif len(indent) > 0 {\n\t\tif strings.Trim(indent, \" \\t\") != \"\" {\n\t\t\treturn nil, errors.New(\"indent may only be composed of space or tab characters\")\n\t\t}\n\t\te.indent = indent\n\t}\n\treturn e, nil\n}\n\n// Bytes returns the content of the written bytes.\nfunc (e *Encoder) Bytes() []byte {\n\treturn e.out\n}\n\n// WriteNull writes out the null value.\nfunc (e *Encoder) WriteNull() {\n\te.prepareNext(scalar)\n\te.out = append(e.out, \"null\"...)\n}\n\n// WriteBool writes out the given boolean value.\nfunc (e *Encoder) WriteBool(b bool) {\n\te.prepareNext(scalar)\n\tif b {\n\t\te.out = append(e.out, \"true\"...)\n\t} else {\n\t\te.out = append(e.out, \"false\"...)\n\t}\n}\n\n// WriteString writes out the given string in JSON string value. Returns error\n// if input string contains invalid UTF-8.\nfunc (e *Encoder) WriteString(s string) error {\n\te.prepareNext(scalar)\n\tvar err error\n\tif e.out, err = appendString(e.out, s); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Sentinel error used for indicating invalid UTF-8.\nvar errInvalidUTF8 = errors.New(\"invalid UTF-8\")\n\nfunc appendString(out []byte, in string) ([]byte, error) {\n\tout = append(out, '\"')\n\ti := indexNeedEscapeInString(in)\n\tin, out = in[i:], append(out, in[:i]...)\n\tfor len(in) > 0 {\n\t\tswitch r, n := utf8.DecodeRuneInString(in); {\n\t\tcase r == utf8.RuneError && n == 1:\n\t\t\treturn out, errInvalidUTF8\n\t\tcase r < ' ' || r == '\"' || r == '\\\\':\n\t\t\tout = append(out, '\\\\')\n\t\t\tswitch r {\n\t\t\tcase '\"', '\\\\':\n\t\t\t\tout = append(out, byte(r))\n\t\t\tcase '\\b':\n\t\t\t\tout = append(out, 'b')\n\t\t\tcase '\\f':\n\t\t\t\tout = append(out, 'f')\n\t\t\tcase '\\n':\n\t\t\t\tout = append(out, 'n')\n\t\t\tcase '\\r':\n\t\t\t\tout = append(out, 'r')\n\t\t\tcase '\\t':\n\t\t\t\tout = append(out, 't')\n\t\t\tdefault:\n\t\t\t\tout = append(out, 'u')\n\t\t\t\tout = append(out, \"0000\"[1+(bits.Len32(uint32(r))-1)/4:]...)\n\t\t\t\tout = strconv.AppendUint(out, uint64(r), 16)\n\t\t\t}\n\t\t\tin = in[n:]\n\t\tdefault:\n\t\t\ti := indexNeedEscapeInString(in[n:])\n\t\t\tin, out = in[n+i:], append(out, in[:n+i]...)\n\t\t}\n\t}\n\tout = append(out, '\"')\n\treturn out, nil\n}\n\n// indexNeedEscapeInString returns the index of the character that needs\n// escaping. If no characters need escaping, this returns the input length.\nfunc indexNeedEscapeInString(s string) int {\n\tfor i, r := range s {\n\t\tif r < ' ' || r == '\\\\' || r == '\"' || r == utf8.RuneError {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn len(s)\n}\n\n// WriteFloat writes out the given float and bitSize in JSON number value.\nfunc (e *Encoder) WriteFloat(n float64, bitSize int) {\n\te.prepareNext(scalar)\n\te.out = appendFloat(e.out, n, bitSize)\n}\n\n// appendFloat formats given float in bitSize, and appends to the given []byte.\nfunc appendFloat(out []byte, n float64, bitSize int) []byte {\n\tswitch {\n\tcase math.IsNaN(n):\n\t\treturn append(out, `\"NaN\"`...)\n\tcase math.IsInf(n, +1):\n\t\treturn append(out, `\"Infinity\"`...)\n\tcase math.IsInf(n, -1):\n\t\treturn append(out, `\"-Infinity\"`...)\n\t}\n\n\t// JSON number formatting logic based on encoding/json.\n\t// See floatEncoder.encode for reference.\n\tfmt := byte('f')\n\tif abs := math.Abs(n); abs != 0 {\n\t\tif bitSize == 64 && (abs < 1e-6 || abs >= 1e21) ||\n\t\t\tbitSize == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) {\n\t\t\tfmt = 'e'\n\t\t}\n\t}\n\tout = strconv.AppendFloat(out, n, fmt, -1, bitSize)\n\tif fmt == 'e' {\n\t\tn := len(out)\n\t\tif n >= 4 && out[n-4] == 'e' && out[n-3] == '-' && out[n-2] == '0' {\n\t\t\tout[n-2] = out[n-1]\n\t\t\tout = out[:n-1]\n\t\t}\n\t}\n\treturn out\n}\n\n// WriteInt writes out the given signed integer in JSON number value.\nfunc (e *Encoder) WriteInt(n int64) {\n\te.prepareNext(scalar)\n\te.out = strconv.AppendInt(e.out, n, 10)\n}\n\n// WriteUint writes out the given unsigned integer in JSON number value.\nfunc (e *Encoder) WriteUint(n uint64) {\n\te.prepareNext(scalar)\n\te.out = strconv.AppendUint(e.out, n, 10)\n}\n\n// StartObject writes out the '{' symbol.\nfunc (e *Encoder) StartObject() {\n\te.prepareNext(objectOpen)\n\te.out = append(e.out, '{')\n}\n\n// EndObject writes out the '}' symbol.\nfunc (e *Encoder) EndObject() {\n\te.prepareNext(objectClose)\n\te.out = append(e.out, '}')\n}\n\n// WriteName writes out the given string in JSON string value and the name\n// separator ':'. Returns error if input string contains invalid UTF-8, which\n// should not be likely as protobuf field names should be valid.\nfunc (e *Encoder) WriteName(s string) error {\n\te.prepareNext(name)\n\tvar err error\n\t// Append to output regardless of error.\n\te.out, err = appendString(e.out, s)\n\te.out = append(e.out, ':')\n\treturn err\n}\n\n// StartArray writes out the '[' symbol.\nfunc (e *Encoder) StartArray() {\n\te.prepareNext(arrayOpen)\n\te.out = append(e.out, '[')\n}\n\n// EndArray writes out the ']' symbol.\nfunc (e *Encoder) EndArray() {\n\te.prepareNext(arrayClose)\n\te.out = append(e.out, ']')\n}\n\n// prepareNext adds possible comma and indentation for the next value based\n// on last type and indent option. It also updates lastKind to next.\nfunc (e *Encoder) prepareNext(next kind) {\n\tdefer func() {\n\t\t// Set lastKind to next.\n\t\te.lastKind = next\n\t}()\n\n\tif len(e.indent) == 0 {\n\t\t// Need to add comma on the following condition.\n\t\tif e.lastKind&(scalar|objectClose|arrayClose) != 0 &&\n\t\t\tnext&(name|scalar|objectOpen|arrayOpen) != 0 {\n\t\t\te.out = append(e.out, ',')\n\t\t\t// For single-line output, add a random extra space after each\n\t\t\t// comma to make output unstable.\n\t\t\tif detrand.Bool() {\n\t\t\t\te.out = append(e.out, ' ')\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tswitch {\n\tcase e.lastKind&(objectOpen|arrayOpen) != 0:\n\t\t// If next type is NOT closing, add indent and newline.\n\t\tif next&(objectClose|arrayClose) == 0 {\n\t\t\te.indents = append(e.indents, e.indent...)\n\t\t\te.out = append(e.out, '\\n')\n\t\t\te.out = append(e.out, e.indents...)\n\t\t}\n\n\tcase e.lastKind&(scalar|objectClose|arrayClose) != 0:\n\t\tswitch {\n\t\t// If next type is either a value or name, add comma and newline.\n\t\tcase next&(name|scalar|objectOpen|arrayOpen) != 0:\n\t\t\te.out = append(e.out, ',', '\\n')\n\n\t\t// If next type is a closing object or array, adjust indentation.\n\t\tcase next&(objectClose|arrayClose) != 0:\n\t\t\te.indents = e.indents[:len(e.indents)-len(e.indent)]\n\t\t\te.out = append(e.out, '\\n')\n\t\t}\n\t\te.out = append(e.out, e.indents...)\n\n\tcase e.lastKind&name != 0:\n\t\te.out = append(e.out, ' ')\n\t\t// For multi-line output, add a random extra space after key: to make\n\t\t// output unstable.\n\t\tif detrand.Bool() {\n\t\t\te.out = append(e.out, ' ')\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package messageset encodes and decodes the obsolete MessageSet wire format.\npackage messageset\n\nimport (\n\t\"math\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// The MessageSet wire format is equivalent to a message defined as follows,\n// where each Item defines an extension field with a field number of 'type_id'\n// and content of 'message'. MessageSet extensions must be non-repeated message\n// fields.\n//\n//\tmessage MessageSet {\n//\t\trepeated group Item = 1 {\n//\t\t\trequired int32 type_id = 2;\n//\t\t\trequired string message = 3;\n//\t\t}\n//\t}\nconst (\n\tFieldItem    = protowire.Number(1)\n\tFieldTypeID  = protowire.Number(2)\n\tFieldMessage = protowire.Number(3)\n)\n\n// ExtensionName is the field name for extensions of MessageSet.\n//\n// A valid MessageSet extension must be of the form:\n//\n//\tmessage MyMessage {\n//\t\textend proto2.bridge.MessageSet {\n//\t\t\toptional MyMessage message_set_extension = 1234;\n//\t\t}\n//\t\t...\n//\t}\nconst ExtensionName = \"message_set_extension\"\n\n// IsMessageSet returns whether the message uses the MessageSet wire format.\nfunc IsMessageSet(md protoreflect.MessageDescriptor) bool {\n\txmd, ok := md.(interface{ IsMessageSet() bool })\n\treturn ok && xmd.IsMessageSet()\n}\n\n// IsMessageSetExtension reports this field properly extends a MessageSet.\nfunc IsMessageSetExtension(fd protoreflect.FieldDescriptor) bool {\n\tswitch {\n\tcase fd.Name() != ExtensionName:\n\t\treturn false\n\tcase !IsMessageSet(fd.ContainingMessage()):\n\t\treturn false\n\tcase fd.FullName().Parent() != fd.Message().FullName():\n\t\treturn false\n\t}\n\treturn true\n}\n\n// SizeField returns the size of a MessageSet item field containing an extension\n// with the given field number, not counting the contents of the message subfield.\nfunc SizeField(num protowire.Number) int {\n\treturn 2*protowire.SizeTag(FieldItem) + protowire.SizeTag(FieldTypeID) + protowire.SizeVarint(uint64(num))\n}\n\n// Unmarshal parses a MessageSet.\n//\n// It calls fn with the type ID and value of each item in the MessageSet.\n// Unknown fields are discarded.\n//\n// If wantLen is true, the item values include the varint length prefix.\n// This is ugly, but simplifies the fast-path decoder in internal/impl.\nfunc Unmarshal(b []byte, wantLen bool, fn func(typeID protowire.Number, value []byte) error) error {\n\tfor len(b) > 0 {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn protowire.ParseError(n)\n\t\t}\n\t\tb = b[n:]\n\t\tif num != FieldItem || wtyp != protowire.StartGroupType {\n\t\t\tn := protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protowire.ParseError(n)\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tcontinue\n\t\t}\n\t\ttypeID, value, n, err := ConsumeFieldValue(b, wantLen)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tb = b[n:]\n\t\tif typeID == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif err := fn(typeID, value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// ConsumeFieldValue parses b as a MessageSet item field value until and including\n// the trailing end group marker. It assumes the start group tag has already been parsed.\n// It returns the contents of the type_id and message subfields and the total\n// item length.\n//\n// If wantLen is true, the returned message value includes the length prefix.\nfunc ConsumeFieldValue(b []byte, wantLen bool) (typeid protowire.Number, message []byte, n int, err error) {\n\tilen := len(b)\n\tfor {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn 0, nil, 0, protowire.ParseError(n)\n\t\t}\n\t\tb = b[n:]\n\t\tswitch {\n\t\tcase num == FieldItem && wtyp == protowire.EndGroupType:\n\t\t\tif wantLen && len(message) == 0 {\n\t\t\t\t// The message field was missing, which should never happen.\n\t\t\t\t// Be prepared for this case anyway.\n\t\t\t\tmessage = protowire.AppendVarint(message, 0)\n\t\t\t}\n\t\t\treturn typeid, message, ilen - len(b), nil\n\t\tcase num == FieldTypeID && wtyp == protowire.VarintType:\n\t\t\tv, n := protowire.ConsumeVarint(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, nil, 0, protowire.ParseError(n)\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t\tif v < 1 || v > math.MaxInt32 {\n\t\t\t\treturn 0, nil, 0, errors.New(\"invalid type_id in message set\")\n\t\t\t}\n\t\t\ttypeid = protowire.Number(v)\n\t\tcase num == FieldMessage && wtyp == protowire.BytesType:\n\t\t\tm, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, nil, 0, protowire.ParseError(n)\n\t\t\t}\n\t\t\tif message == nil {\n\t\t\t\tif wantLen {\n\t\t\t\t\tmessage = b[:n:n]\n\t\t\t\t} else {\n\t\t\t\t\tmessage = m[:len(m):len(m)]\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// This case should never happen in practice, but handle it for\n\t\t\t\t// correctness: The MessageSet item contains multiple message\n\t\t\t\t// fields, which need to be merged.\n\t\t\t\t//\n\t\t\t\t// In the case where we're returning the length, this becomes\n\t\t\t\t// quite inefficient since we need to strip the length off\n\t\t\t\t// the existing data and reconstruct it with the combined length.\n\t\t\t\tif wantLen {\n\t\t\t\t\t_, nn := protowire.ConsumeVarint(message)\n\t\t\t\t\tm0 := message[nn:]\n\t\t\t\t\tmessage = nil\n\t\t\t\t\tmessage = protowire.AppendVarint(message, uint64(len(m0)+len(m)))\n\t\t\t\t\tmessage = append(message, m0...)\n\t\t\t\t\tmessage = append(message, m...)\n\t\t\t\t} else {\n\t\t\t\t\tmessage = append(message, m...)\n\t\t\t\t}\n\t\t\t}\n\t\t\tb = b[n:]\n\t\tdefault:\n\t\t\t// We have no place to put it, so we just ignore unknown fields.\n\t\t\tn := protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, nil, 0, protowire.ParseError(n)\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t}\n\t}\n}\n\n// AppendFieldStart appends the start of a MessageSet item field containing\n// an extension with the given number. The caller must add the message\n// subfield (including the tag).\nfunc AppendFieldStart(b []byte, num protowire.Number) []byte {\n\tb = protowire.AppendTag(b, FieldItem, protowire.StartGroupType)\n\tb = protowire.AppendTag(b, FieldTypeID, protowire.VarintType)\n\tb = protowire.AppendVarint(b, uint64(num))\n\treturn b\n}\n\n// AppendFieldEnd appends the trailing end group marker for a MessageSet item field.\nfunc AppendFieldEnd(b []byte) []byte {\n\treturn protowire.AppendTag(b, FieldItem, protowire.EndGroupType)\n}\n\n// SizeUnknown returns the size of an unknown fields section in MessageSet format.\n//\n// See AppendUnknown.\nfunc SizeUnknown(unknown []byte) (size int) {\n\tfor len(unknown) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(unknown)\n\t\tif n < 0 || typ != protowire.BytesType {\n\t\t\treturn 0\n\t\t}\n\t\tunknown = unknown[n:]\n\t\t_, n = protowire.ConsumeBytes(unknown)\n\t\tif n < 0 {\n\t\t\treturn 0\n\t\t}\n\t\tunknown = unknown[n:]\n\t\tsize += SizeField(num) + protowire.SizeTag(FieldMessage) + n\n\t}\n\treturn size\n}\n\n// AppendUnknown appends unknown fields to b in MessageSet format.\n//\n// For historic reasons, unresolved items in a MessageSet are stored in a\n// message's unknown fields section in non-MessageSet format. That is, an\n// unknown item with typeID T and value V appears in the unknown fields as\n// a field with number T and value V.\n//\n// This function converts the unknown fields back into MessageSet form.\nfunc AppendUnknown(b, unknown []byte) ([]byte, error) {\n\tfor len(unknown) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(unknown)\n\t\tif n < 0 || typ != protowire.BytesType {\n\t\t\treturn nil, errors.New(\"invalid data in message set unknown fields\")\n\t\t}\n\t\tunknown = unknown[n:]\n\t\t_, n = protowire.ConsumeBytes(unknown)\n\t\tif n < 0 {\n\t\t\treturn nil, errors.New(\"invalid data in message set unknown fields\")\n\t\t}\n\t\tb = AppendFieldStart(b, num)\n\t\tb = protowire.AppendTag(b, FieldMessage, protowire.BytesType)\n\t\tb = append(b, unknown[:n]...)\n\t\tb = AppendFieldEnd(b)\n\t\tunknown = unknown[n:]\n\t}\n\treturn b, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package tag marshals and unmarshals the legacy struct tags as generated\n// by historical versions of protoc-gen-go.\npackage tag\n\nimport (\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/internal/encoding/defval\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nvar byteType = reflect.TypeOf(byte(0))\n\n// Unmarshal decodes the tag into a prototype.Field.\n//\n// The goType is needed to determine the original protoreflect.Kind since the\n// tag does not record sufficient information to determine that.\n// The type is the underlying field type (e.g., a repeated field may be\n// represented by []T, but the Go type passed in is just T).\n// A list of enum value descriptors must be provided for enum fields.\n// This does not populate the Enum or Message.\n//\n// This function is a best effort attempt; parsing errors are ignored.\nfunc Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor {\n\tf := new(filedesc.Field)\n\tf.L0.ParentFile = filedesc.SurrogateProto2\n\tpacked := false\n\tfor len(tag) > 0 {\n\t\ti := strings.IndexByte(tag, ',')\n\t\tif i < 0 {\n\t\t\ti = len(tag)\n\t\t}\n\t\tswitch s := tag[:i]; {\n\t\tcase strings.HasPrefix(s, \"name=\"):\n\t\t\tf.L0.FullName = protoreflect.FullName(s[len(\"name=\"):])\n\t\tcase strings.Trim(s, \"0123456789\") == \"\":\n\t\t\tn, _ := strconv.ParseUint(s, 10, 32)\n\t\t\tf.L1.Number = protoreflect.FieldNumber(n)\n\t\tcase s == \"opt\":\n\t\t\tf.L1.Cardinality = protoreflect.Optional\n\t\tcase s == \"req\":\n\t\t\tf.L1.Cardinality = protoreflect.Required\n\t\tcase s == \"rep\":\n\t\t\tf.L1.Cardinality = protoreflect.Repeated\n\t\tcase s == \"varint\":\n\t\t\tswitch goType.Kind() {\n\t\t\tcase reflect.Bool:\n\t\t\t\tf.L1.Kind = protoreflect.BoolKind\n\t\t\tcase reflect.Int32:\n\t\t\t\tf.L1.Kind = protoreflect.Int32Kind\n\t\t\tcase reflect.Int64:\n\t\t\t\tf.L1.Kind = protoreflect.Int64Kind\n\t\t\tcase reflect.Uint32:\n\t\t\t\tf.L1.Kind = protoreflect.Uint32Kind\n\t\t\tcase reflect.Uint64:\n\t\t\t\tf.L1.Kind = protoreflect.Uint64Kind\n\t\t\t}\n\t\tcase s == \"zigzag32\":\n\t\t\tif goType.Kind() == reflect.Int32 {\n\t\t\t\tf.L1.Kind = protoreflect.Sint32Kind\n\t\t\t}\n\t\tcase s == \"zigzag64\":\n\t\t\tif goType.Kind() == reflect.Int64 {\n\t\t\t\tf.L1.Kind = protoreflect.Sint64Kind\n\t\t\t}\n\t\tcase s == \"fixed32\":\n\t\t\tswitch goType.Kind() {\n\t\t\tcase reflect.Int32:\n\t\t\t\tf.L1.Kind = protoreflect.Sfixed32Kind\n\t\t\tcase reflect.Uint32:\n\t\t\t\tf.L1.Kind = protoreflect.Fixed32Kind\n\t\t\tcase reflect.Float32:\n\t\t\t\tf.L1.Kind = protoreflect.FloatKind\n\t\t\t}\n\t\tcase s == \"fixed64\":\n\t\t\tswitch goType.Kind() {\n\t\t\tcase reflect.Int64:\n\t\t\t\tf.L1.Kind = protoreflect.Sfixed64Kind\n\t\t\tcase reflect.Uint64:\n\t\t\t\tf.L1.Kind = protoreflect.Fixed64Kind\n\t\t\tcase reflect.Float64:\n\t\t\t\tf.L1.Kind = protoreflect.DoubleKind\n\t\t\t}\n\t\tcase s == \"bytes\":\n\t\t\tswitch {\n\t\t\tcase goType.Kind() == reflect.String:\n\t\t\t\tf.L1.Kind = protoreflect.StringKind\n\t\t\tcase goType.Kind() == reflect.Slice && goType.Elem() == byteType:\n\t\t\t\tf.L1.Kind = protoreflect.BytesKind\n\t\t\tdefault:\n\t\t\t\tf.L1.Kind = protoreflect.MessageKind\n\t\t\t}\n\t\tcase s == \"group\":\n\t\t\tf.L1.Kind = protoreflect.GroupKind\n\t\tcase strings.HasPrefix(s, \"enum=\"):\n\t\t\tf.L1.Kind = protoreflect.EnumKind\n\t\tcase strings.HasPrefix(s, \"json=\"):\n\t\t\tjsonName := s[len(\"json=\"):]\n\t\t\tif jsonName != strs.JSONCamelCase(string(f.L0.FullName.Name())) {\n\t\t\t\tf.L1.StringName.InitJSON(jsonName)\n\t\t\t}\n\t\tcase s == \"packed\":\n\t\t\tpacked = true\n\t\tcase strings.HasPrefix(s, \"def=\"):\n\t\t\t// The default tag is special in that everything afterwards is the\n\t\t\t// default regardless of the presence of commas.\n\t\t\ts, i = tag[len(\"def=\"):], len(tag)\n\t\t\tv, ev, _ := defval.Unmarshal(s, f.L1.Kind, evs, defval.GoTag)\n\t\t\tf.L1.Default = filedesc.DefaultValue(v, ev)\n\t\tcase s == \"proto3\":\n\t\t\tf.L0.ParentFile = filedesc.SurrogateProto3\n\t\t}\n\t\ttag = strings.TrimPrefix(tag[i:], \",\")\n\t}\n\n\t// Update EditionFeatures after the loop and after we know whether this is\n\t// a proto2 or proto3 field.\n\tf.L1.EditionFeatures = f.L0.ParentFile.L1.EditionFeatures\n\tif packed {\n\t\tf.L1.EditionFeatures.IsPacked = true\n\t}\n\n\t// The generator uses the group message name instead of the field name.\n\t// We obtain the real field name by lowercasing the group name.\n\tif f.L1.Kind == protoreflect.GroupKind {\n\t\tf.L0.FullName = protoreflect.FullName(strings.ToLower(string(f.L0.FullName)))\n\t}\n\treturn f\n}\n\n// Marshal encodes the protoreflect.FieldDescriptor as a tag.\n//\n// The enumName must be provided if the kind is an enum.\n// Historically, the formulation of the enum \"name\" was the proto package\n// dot-concatenated with the generated Go identifier for the enum type.\n// Depending on the context on how Marshal is called, there are different ways\n// through which that information is determined. As such it is the caller's\n// responsibility to provide a function to obtain that information.\nfunc Marshal(fd protoreflect.FieldDescriptor, enumName string) string {\n\tvar tag []string\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind, protoreflect.EnumKind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind:\n\t\ttag = append(tag, \"varint\")\n\tcase protoreflect.Sint32Kind:\n\t\ttag = append(tag, \"zigzag32\")\n\tcase protoreflect.Sint64Kind:\n\t\ttag = append(tag, \"zigzag64\")\n\tcase protoreflect.Sfixed32Kind, protoreflect.Fixed32Kind, protoreflect.FloatKind:\n\t\ttag = append(tag, \"fixed32\")\n\tcase protoreflect.Sfixed64Kind, protoreflect.Fixed64Kind, protoreflect.DoubleKind:\n\t\ttag = append(tag, \"fixed64\")\n\tcase protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind:\n\t\ttag = append(tag, \"bytes\")\n\tcase protoreflect.GroupKind:\n\t\ttag = append(tag, \"group\")\n\t}\n\ttag = append(tag, strconv.Itoa(int(fd.Number())))\n\tswitch fd.Cardinality() {\n\tcase protoreflect.Optional:\n\t\ttag = append(tag, \"opt\")\n\tcase protoreflect.Required:\n\t\ttag = append(tag, \"req\")\n\tcase protoreflect.Repeated:\n\t\ttag = append(tag, \"rep\")\n\t}\n\tif fd.IsPacked() {\n\t\ttag = append(tag, \"packed\")\n\t}\n\tname := string(fd.Name())\n\tif fd.Kind() == protoreflect.GroupKind {\n\t\t// The name of the FieldDescriptor for a group field is\n\t\t// lowercased. To find the original capitalization, we\n\t\t// look in the field's MessageType.\n\t\tname = string(fd.Message().Name())\n\t}\n\ttag = append(tag, \"name=\"+name)\n\tif jsonName := fd.JSONName(); jsonName != \"\" && jsonName != name && !fd.IsExtension() {\n\t\t// NOTE: The jsonName != name condition is suspect, but it preserve\n\t\t// the exact same semantics from the previous generator.\n\t\ttag = append(tag, \"json=\"+jsonName)\n\t}\n\t// The previous implementation does not tag extension fields as proto3,\n\t// even when the field is defined in a proto3 file. Match that behavior\n\t// for consistency.\n\tif fd.Syntax() == protoreflect.Proto3 && !fd.IsExtension() {\n\t\ttag = append(tag, \"proto3\")\n\t}\n\tif fd.Kind() == protoreflect.EnumKind && enumName != \"\" {\n\t\ttag = append(tag, \"enum=\"+enumName)\n\t}\n\tif fd.ContainingOneof() != nil {\n\t\ttag = append(tag, \"oneof\")\n\t}\n\t// This must appear last in the tag, since commas in strings aren't escaped.\n\tif fd.HasDefault() {\n\t\tdef, _ := defval.Marshal(fd.Default(), fd.DefaultEnumValue(), fd.Kind(), defval.GoTag)\n\t\ttag = append(tag, \"def=\"+def)\n\t}\n\treturn strings.Join(tag, \",\")\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/decode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage text\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"strconv\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/errors\"\n)\n\n// Decoder is a token-based textproto decoder.\ntype Decoder struct {\n\t// lastCall is last method called, either readCall or peekCall.\n\t// Initial value is readCall.\n\tlastCall call\n\n\t// lastToken contains the last read token.\n\tlastToken Token\n\n\t// lastErr contains the last read error.\n\tlastErr error\n\n\t// openStack is a stack containing the byte characters for MessageOpen and\n\t// ListOpen kinds. The top of stack represents the message or the list that\n\t// the current token is nested in. An empty stack means the current token is\n\t// at the top level message. The characters '{' and '<' both represent the\n\t// MessageOpen kind.\n\topenStack []byte\n\n\t// orig is used in reporting line and column.\n\torig []byte\n\t// in contains the unconsumed input.\n\tin []byte\n}\n\n// NewDecoder returns a Decoder to read the given []byte.\nfunc NewDecoder(b []byte) *Decoder {\n\treturn &Decoder{orig: b, in: b}\n}\n\n// ErrUnexpectedEOF means that EOF was encountered in the middle of the input.\nvar ErrUnexpectedEOF = errors.New(\"%v\", io.ErrUnexpectedEOF)\n\n// call specifies which Decoder method was invoked.\ntype call uint8\n\nconst (\n\treadCall call = iota\n\tpeekCall\n)\n\n// Peek looks ahead and returns the next token and error without advancing a read.\nfunc (d *Decoder) Peek() (Token, error) {\n\tdefer func() { d.lastCall = peekCall }()\n\tif d.lastCall == readCall {\n\t\td.lastToken, d.lastErr = d.Read()\n\t}\n\treturn d.lastToken, d.lastErr\n}\n\n// Read returns the next token.\n// It will return an error if there is no valid token.\nfunc (d *Decoder) Read() (Token, error) {\n\tdefer func() { d.lastCall = readCall }()\n\tif d.lastCall == peekCall {\n\t\treturn d.lastToken, d.lastErr\n\t}\n\n\ttok, err := d.parseNext(d.lastToken.kind)\n\tif err != nil {\n\t\treturn Token{}, err\n\t}\n\n\tswitch tok.kind {\n\tcase comma, semicolon:\n\t\ttok, err = d.parseNext(tok.kind)\n\t\tif err != nil {\n\t\t\treturn Token{}, err\n\t\t}\n\t}\n\td.lastToken = tok\n\treturn tok, nil\n}\n\nconst (\n\tmismatchedFmt = \"mismatched close character %q\"\n\tunexpectedFmt = \"unexpected character %q\"\n)\n\n// parseNext parses the next Token based on given last kind.\nfunc (d *Decoder) parseNext(lastKind Kind) (Token, error) {\n\t// Trim leading spaces.\n\td.consume(0)\n\tisEOF := false\n\tif len(d.in) == 0 {\n\t\tisEOF = true\n\t}\n\n\tswitch lastKind {\n\tcase EOF:\n\t\treturn d.consumeToken(EOF, 0, 0), nil\n\n\tcase bof:\n\t\t// Start of top level message. Next token can be EOF or Name.\n\t\tif isEOF {\n\t\t\treturn d.consumeToken(EOF, 0, 0), nil\n\t\t}\n\t\treturn d.parseFieldName()\n\n\tcase Name:\n\t\t// Next token can be MessageOpen, ListOpen or Scalar.\n\t\tif isEOF {\n\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t}\n\t\tswitch ch := d.in[0]; ch {\n\t\tcase '{', '<':\n\t\t\td.pushOpenStack(ch)\n\t\t\treturn d.consumeToken(MessageOpen, 1, 0), nil\n\t\tcase '[':\n\t\t\td.pushOpenStack(ch)\n\t\t\treturn d.consumeToken(ListOpen, 1, 0), nil\n\t\tdefault:\n\t\t\treturn d.parseScalar()\n\t\t}\n\n\tcase Scalar:\n\t\topenKind, closeCh := d.currentOpenKind()\n\t\tswitch openKind {\n\t\tcase bof:\n\t\t\t// Top level message.\n\t\t\t// \tNext token can be EOF, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn d.consumeToken(EOF, 0, 0), nil\n\t\t\t}\n\t\t\tswitch d.in[0] {\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase MessageOpen:\n\t\t\t// Next token can be MessageClose, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase closeCh:\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(MessageClose, 1, 0), nil\n\t\t\tcase otherCloseChar[closeCh]:\n\t\t\t\treturn Token{}, d.newSyntaxError(mismatchedFmt, ch)\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase ListOpen:\n\t\t\t// Next token can be ListClose or comma.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase ']':\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(ListClose, 1, 0), nil\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn Token{}, d.newSyntaxError(unexpectedFmt, ch)\n\t\t\t}\n\t\t}\n\n\tcase MessageOpen:\n\t\t// Next token can be MessageClose or Name.\n\t\tif isEOF {\n\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t}\n\t\t_, closeCh := d.currentOpenKind()\n\t\tswitch ch := d.in[0]; ch {\n\t\tcase closeCh:\n\t\t\td.popOpenStack()\n\t\t\treturn d.consumeToken(MessageClose, 1, 0), nil\n\t\tcase otherCloseChar[closeCh]:\n\t\t\treturn Token{}, d.newSyntaxError(mismatchedFmt, ch)\n\t\tdefault:\n\t\t\treturn d.parseFieldName()\n\t\t}\n\n\tcase MessageClose:\n\t\topenKind, closeCh := d.currentOpenKind()\n\t\tswitch openKind {\n\t\tcase bof:\n\t\t\t// Top level message.\n\t\t\t// Next token can be EOF, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn d.consumeToken(EOF, 0, 0), nil\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase MessageOpen:\n\t\t\t// Next token can be MessageClose, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase closeCh:\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(MessageClose, 1, 0), nil\n\t\t\tcase otherCloseChar[closeCh]:\n\t\t\t\treturn Token{}, d.newSyntaxError(mismatchedFmt, ch)\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase ListOpen:\n\t\t\t// Next token can be ListClose or comma\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase closeCh:\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(ListClose, 1, 0), nil\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn Token{}, d.newSyntaxError(unexpectedFmt, ch)\n\t\t\t}\n\t\t}\n\n\tcase ListOpen:\n\t\t// Next token can be ListClose, MessageStart or Scalar.\n\t\tif isEOF {\n\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t}\n\t\tswitch ch := d.in[0]; ch {\n\t\tcase ']':\n\t\t\td.popOpenStack()\n\t\t\treturn d.consumeToken(ListClose, 1, 0), nil\n\t\tcase '{', '<':\n\t\t\td.pushOpenStack(ch)\n\t\t\treturn d.consumeToken(MessageOpen, 1, 0), nil\n\t\tdefault:\n\t\t\treturn d.parseScalar()\n\t\t}\n\n\tcase ListClose:\n\t\topenKind, closeCh := d.currentOpenKind()\n\t\tswitch openKind {\n\t\tcase bof:\n\t\t\t// Top level message.\n\t\t\t// Next token can be EOF, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn d.consumeToken(EOF, 0, 0), nil\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase MessageOpen:\n\t\t\t// Next token can be MessageClose, comma, semicolon or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase closeCh:\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(MessageClose, 1, 0), nil\n\t\t\tcase otherCloseChar[closeCh]:\n\t\t\t\treturn Token{}, d.newSyntaxError(mismatchedFmt, ch)\n\t\t\tcase ',':\n\t\t\t\treturn d.consumeToken(comma, 1, 0), nil\n\t\t\tcase ';':\n\t\t\t\treturn d.consumeToken(semicolon, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tdefault:\n\t\t\t// It is not possible to have this case. Let it panic below.\n\t\t}\n\n\tcase comma, semicolon:\n\t\topenKind, closeCh := d.currentOpenKind()\n\t\tswitch openKind {\n\t\tcase bof:\n\t\t\t// Top level message. Next token can be EOF or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn d.consumeToken(EOF, 0, 0), nil\n\t\t\t}\n\t\t\treturn d.parseFieldName()\n\n\t\tcase MessageOpen:\n\t\t\t// Next token can be MessageClose or Name.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase closeCh:\n\t\t\t\td.popOpenStack()\n\t\t\t\treturn d.consumeToken(MessageClose, 1, 0), nil\n\t\t\tcase otherCloseChar[closeCh]:\n\t\t\t\treturn Token{}, d.newSyntaxError(mismatchedFmt, ch)\n\t\t\tdefault:\n\t\t\t\treturn d.parseFieldName()\n\t\t\t}\n\n\t\tcase ListOpen:\n\t\t\tif lastKind == semicolon {\n\t\t\t\t// It is not be possible to have this case as logic here\n\t\t\t\t// should not have produced a semicolon Token when inside a\n\t\t\t\t// list. Let it panic below.\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Next token can be MessageOpen or Scalar.\n\t\t\tif isEOF {\n\t\t\t\treturn Token{}, ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch ch := d.in[0]; ch {\n\t\t\tcase '{', '<':\n\t\t\t\td.pushOpenStack(ch)\n\t\t\t\treturn d.consumeToken(MessageOpen, 1, 0), nil\n\t\t\tdefault:\n\t\t\t\treturn d.parseScalar()\n\t\t\t}\n\t\t}\n\t}\n\n\tline, column := d.Position(len(d.orig) - len(d.in))\n\tpanic(fmt.Sprintf(\"Decoder.parseNext: bug at handling line %d:%d with lastKind=%v\", line, column, lastKind))\n}\n\nvar otherCloseChar = map[byte]byte{\n\t'}': '>',\n\t'>': '}',\n}\n\n// currentOpenKind indicates whether current position is inside a message, list\n// or top-level message by returning MessageOpen, ListOpen or bof respectively.\n// If the returned kind is either a MessageOpen or ListOpen, it also returns the\n// corresponding closing character.\nfunc (d *Decoder) currentOpenKind() (Kind, byte) {\n\tif len(d.openStack) == 0 {\n\t\treturn bof, 0\n\t}\n\topenCh := d.openStack[len(d.openStack)-1]\n\tswitch openCh {\n\tcase '{':\n\t\treturn MessageOpen, '}'\n\tcase '<':\n\t\treturn MessageOpen, '>'\n\tcase '[':\n\t\treturn ListOpen, ']'\n\t}\n\tpanic(fmt.Sprintf(\"Decoder: openStack contains invalid byte %c\", openCh))\n}\n\nfunc (d *Decoder) pushOpenStack(ch byte) {\n\td.openStack = append(d.openStack, ch)\n}\n\nfunc (d *Decoder) popOpenStack() {\n\td.openStack = d.openStack[:len(d.openStack)-1]\n}\n\n// parseFieldName parses field name and separator.\nfunc (d *Decoder) parseFieldName() (tok Token, err error) {\n\tdefer func() {\n\t\tif err == nil && d.tryConsumeChar(':') {\n\t\t\ttok.attrs |= hasSeparator\n\t\t}\n\t}()\n\n\t// Extension or Any type URL.\n\tif d.in[0] == '[' {\n\t\treturn d.parseTypeName()\n\t}\n\n\t// Identifier.\n\tif size := parseIdent(d.in, false); size > 0 {\n\t\treturn d.consumeToken(Name, size, uint8(IdentName)), nil\n\t}\n\n\t// Field number. Identify if input is a valid number that is not negative\n\t// and is decimal integer within 32-bit range.\n\tif num := parseNumber(d.in); num.size > 0 {\n\t\tstr := num.string(d.in)\n\t\tif !num.neg && num.kind == numDec {\n\t\t\tif _, err := strconv.ParseInt(str, 10, 32); err == nil {\n\t\t\t\treturn d.consumeToken(Name, num.size, uint8(FieldNumber)), nil\n\t\t\t}\n\t\t}\n\t\treturn Token{}, d.newSyntaxError(\"invalid field number: %s\", str)\n\t}\n\n\treturn Token{}, d.newSyntaxError(\"invalid field name: %s\", errId(d.in))\n}\n\n// parseTypeName parses an Any type URL or an extension field name. The name is\n// enclosed in [ and ] characters. We allow almost arbitrary type URL prefixes,\n// closely following the text-format spec [1,2]. We implement \"ExtensionName |\n// AnyName\" as follows (with some exceptions for backwards compatibility):\n//\n// char      = [-_a-zA-Z0-9]\n// url_char  = char | [.~!$&'()*+,;=] | \"%\", hex, hex\n//\n// Ident         = char, { char }\n// TypeName      = Ident, { \".\", Ident } ;\n// UrlPrefix     = url_char, { url_char | \"/\" } ;\n// ExtensionName = \"[\", TypeName, \"]\" ;\n// AnyName       = \"[\", UrlPrefix, \"/\", TypeName, \"]\" ;\n//\n// Additionally, we allow arbitrary whitespace and comments between [ and ].\n//\n// [1] https://protobuf.dev/reference/protobuf/textformat-spec/#characters\n// [2] https://protobuf.dev/reference/protobuf/textformat-spec/#field-names\nfunc (d *Decoder) parseTypeName() (Token, error) {\n\t// Use alias s to advance first in order to use d.in for error handling.\n\t// Caller already checks for [ as first character (d.in[0] == '[').\n\ts := consume(d.in[1:], 0)\n\tif len(s) == 0 {\n\t\treturn Token{}, ErrUnexpectedEOF\n\t}\n\n\t// Collect everything between [ and ] in name.\n\tvar name []byte\n\tvar closed bool\n\tfor len(s) > 0 && !closed {\n\t\tswitch {\n\t\tcase s[0] == ']':\n\t\t\ts = s[1:]\n\t\t\tclosed = true\n\n\t\tcase s[0] == '/' || isTypeNameChar(s[0]) || isUrlExtraChar(s[0]):\n\t\t\tname = append(name, s[0])\n\t\t\ts = consume(s[1:], 0)\n\n\t\t// URL percent-encoded chars\n\t\tcase s[0] == '%':\n\t\t\tif len(s) < 3 || !isHexChar(s[1]) || !isHexChar(s[2]) {\n\t\t\t\treturn Token{}, d.parseTypeNameError(s, 3)\n\t\t\t}\n\t\t\tname = append(name, s[0], s[1], s[2])\n\t\t\ts = consume(s[3:], 0)\n\n\t\tdefault:\n\t\t\treturn Token{}, d.parseTypeNameError(s, 1)\n\t\t}\n\t}\n\n\tif !closed {\n\t\treturn Token{}, ErrUnexpectedEOF\n\t}\n\n\t// Split collected name on last '/' into urlPrefix and typeName (if '/' is\n\t// present).\n\ttypeName := name\n\tif i := bytes.LastIndexByte(name, '/'); i != -1 {\n\t\turlPrefix := name[:i]\n\t\ttypeName = name[i+1:]\n\n\t\t// urlPrefix may be empty (for backwards compatibility).\n\t\t// If non-empty, it must not start with '/'.\n\t\tif len(urlPrefix) > 0 && urlPrefix[0] == '/' {\n\t\t\treturn Token{}, d.parseTypeNameError(s, 0)\n\t\t}\n\t}\n\n\t// typeName must not be empty (note: \"\" splits to [\"\"]) and all identifier\n\t// parts must not be empty.\n\tfor _, ident := range bytes.Split(typeName, []byte{'.'}) {\n\t\tif len(ident) == 0 {\n\t\t\treturn Token{}, d.parseTypeNameError(s, 0)\n\t\t}\n\t}\n\n\t// typeName must not contain any percent-encoded or special URL chars.\n\tfor _, b := range typeName {\n\t\tif b == '%' || (b != '.' && isUrlExtraChar(b)) {\n\t\t\treturn Token{}, d.parseTypeNameError(s, 0)\n\t\t}\n\t}\n\n\tstartPos := len(d.orig) - len(d.in)\n\tendPos := len(d.orig) - len(s)\n\td.in = s\n\td.consume(0)\n\n\treturn Token{\n\t\tkind:  Name,\n\t\tattrs: uint8(TypeName),\n\t\tpos:   startPos,\n\t\traw:   d.orig[startPos:endPos],\n\t\tstr:   string(name),\n\t}, nil\n}\n\nfunc (d *Decoder) parseTypeNameError(s []byte, numUnconsumedChars int) error {\n\treturn d.newSyntaxError(\n\t\t\"invalid type URL/extension field name: %s\",\n\t\td.in[:len(d.in)-len(s)+min(numUnconsumedChars, len(s))],\n\t)\n}\n\nfunc isHexChar(b byte) bool {\n\treturn ('0' <= b && b <= '9') ||\n\t\t('a' <= b && b <= 'f') ||\n\t\t('A' <= b && b <= 'F')\n}\n\nfunc isTypeNameChar(b byte) bool {\n\treturn b == '-' || b == '_' ||\n\t\t('0' <= b && b <= '9') ||\n\t\t('a' <= b && b <= 'z') ||\n\t\t('A' <= b && b <= 'Z')\n}\n\n// isUrlExtraChar complements isTypeNameChar with extra characters that we allow\n// in URLs but not in type names. Note that '/' is not included so that it can\n// be treated specially.\nfunc isUrlExtraChar(b byte) bool {\n\tswitch b {\n\tcase '.', '~', '!', '$', '&', '(', ')', '*', '+', ',', ';', '=':\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// parseIdent parses an unquoted proto identifier and returns size.\n// If allowNeg is true, it allows '-' to be the first character in the\n// identifier. This is used when parsing literal values like -infinity, etc.\n// Regular expression matches an identifier: `^[_a-zA-Z][_a-zA-Z0-9]*`\nfunc parseIdent(input []byte, allowNeg bool) int {\n\tvar size int\n\n\ts := input\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\n\tif allowNeg && s[0] == '-' {\n\t\ts = s[1:]\n\t\tsize++\n\t\tif len(s) == 0 {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\tswitch {\n\tcase s[0] == '_',\n\t\t'a' <= s[0] && s[0] <= 'z',\n\t\t'A' <= s[0] && s[0] <= 'Z':\n\t\ts = s[1:]\n\t\tsize++\n\tdefault:\n\t\treturn 0\n\t}\n\n\tfor len(s) > 0 && (s[0] == '_' ||\n\t\t'a' <= s[0] && s[0] <= 'z' ||\n\t\t'A' <= s[0] && s[0] <= 'Z' ||\n\t\t'0' <= s[0] && s[0] <= '9') {\n\t\ts = s[1:]\n\t\tsize++\n\t}\n\n\tif len(s) > 0 && !isDelim(s[0]) {\n\t\treturn 0\n\t}\n\n\treturn size\n}\n\n// parseScalar parses for a string, literal or number value.\nfunc (d *Decoder) parseScalar() (Token, error) {\n\tif d.in[0] == '\"' || d.in[0] == '\\'' {\n\t\treturn d.parseStringValue()\n\t}\n\n\tif tok, ok := d.parseLiteralValue(); ok {\n\t\treturn tok, nil\n\t}\n\n\tif tok, ok := d.parseNumberValue(); ok {\n\t\treturn tok, nil\n\t}\n\n\treturn Token{}, d.newSyntaxError(\"invalid scalar value: %s\", errId(d.in))\n}\n\n// parseLiteralValue parses a literal value. A literal value is used for\n// bools, special floats and enums. This function simply identifies that the\n// field value is a literal.\nfunc (d *Decoder) parseLiteralValue() (Token, bool) {\n\tsize := parseIdent(d.in, true)\n\tif size == 0 {\n\t\treturn Token{}, false\n\t}\n\treturn d.consumeToken(Scalar, size, literalValue), true\n}\n\n// consumeToken constructs a Token for given Kind from d.in and consumes given\n// size-length from it.\nfunc (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token {\n\t// Important to compute raw and pos before consuming.\n\ttok := Token{\n\t\tkind:  kind,\n\t\tattrs: attrs,\n\t\tpos:   len(d.orig) - len(d.in),\n\t\traw:   d.in[:size],\n\t}\n\td.consume(size)\n\treturn tok\n}\n\n// newSyntaxError returns a syntax error with line and column information for\n// current position.\nfunc (d *Decoder) newSyntaxError(f string, x ...any) error {\n\te := errors.New(f, x...)\n\tline, column := d.Position(len(d.orig) - len(d.in))\n\treturn errors.New(\"syntax error (line %d:%d): %v\", line, column, e)\n}\n\n// Position returns line and column number of given index of the original input.\n// It will panic if index is out of range.\nfunc (d *Decoder) Position(idx int) (line int, column int) {\n\tb := d.orig[:idx]\n\tline = bytes.Count(b, []byte(\"\\n\")) + 1\n\tif i := bytes.LastIndexByte(b, '\\n'); i >= 0 {\n\t\tb = b[i+1:]\n\t}\n\tcolumn = utf8.RuneCount(b) + 1 // ignore multi-rune characters\n\treturn line, column\n}\n\nfunc (d *Decoder) tryConsumeChar(c byte) bool {\n\tif len(d.in) > 0 && d.in[0] == c {\n\t\td.consume(1)\n\t\treturn true\n\t}\n\treturn false\n}\n\n// consume consumes n bytes of input and any subsequent whitespace or comments.\nfunc (d *Decoder) consume(n int) {\n\td.in = consume(d.in, n)\n\treturn\n}\n\n// consume consumes n bytes of input and any subsequent whitespace or comments.\nfunc consume(b []byte, n int) []byte {\n\tb = b[n:]\n\tfor len(b) > 0 {\n\t\tswitch b[0] {\n\t\tcase ' ', '\\n', '\\r', '\\t':\n\t\t\tb = b[1:]\n\t\tcase '#':\n\t\t\tif i := bytes.IndexByte(b, '\\n'); i >= 0 {\n\t\t\t\tb = b[i+len(\"\\n\"):]\n\t\t\t} else {\n\t\t\t\tb = nil\n\t\t\t}\n\t\tdefault:\n\t\t\treturn b\n\t\t}\n\t}\n\treturn b\n}\n\n// errId extracts a byte sequence that looks like an invalid ID\n// (for the purposes of error reporting).\nfunc errId(seq []byte) []byte {\n\tconst maxLen = 32\n\tfor i := 0; i < len(seq); {\n\t\tif i > maxLen {\n\t\t\treturn append(seq[:i:i], \"…\"...)\n\t\t}\n\t\tr, size := utf8.DecodeRune(seq[i:])\n\t\tif r > utf8.RuneSelf || (r != '/' && isDelim(byte(r))) {\n\t\t\tif i == 0 {\n\t\t\t\t// Either the first byte is invalid UTF-8 or a\n\t\t\t\t// delimiter, or the first rune is non-ASCII.\n\t\t\t\t// Return it as-is.\n\t\t\t\ti = size\n\t\t\t}\n\t\t\treturn seq[:i:i]\n\t\t}\n\t\ti += size\n\t}\n\t// No delimiter found.\n\treturn seq\n}\n\n// isDelim returns true if given byte is a delimiter character.\nfunc isDelim(c byte) bool {\n\treturn !(c == '-' || c == '+' || c == '.' || c == '_' ||\n\t\t('a' <= c && c <= 'z') ||\n\t\t('A' <= c && c <= 'Z') ||\n\t\t('0' <= c && c <= '9'))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage text\n\n// parseNumberValue parses a number from the input and returns a Token object.\nfunc (d *Decoder) parseNumberValue() (Token, bool) {\n\tin := d.in\n\tnum := parseNumber(in)\n\tif num.size == 0 {\n\t\treturn Token{}, false\n\t}\n\tnumAttrs := num.kind\n\tif num.neg {\n\t\tnumAttrs |= isNegative\n\t}\n\ttok := Token{\n\t\tkind:     Scalar,\n\t\tattrs:    numberValue,\n\t\tpos:      len(d.orig) - len(d.in),\n\t\traw:      d.in[:num.size],\n\t\tstr:      num.string(d.in),\n\t\tnumAttrs: numAttrs,\n\t}\n\td.consume(num.size)\n\treturn tok, true\n}\n\nconst (\n\tnumDec uint8 = (1 << iota) / 2\n\tnumHex\n\tnumOct\n\tnumFloat\n)\n\n// number is the result of parsing out a valid number from parseNumber. It\n// contains data for doing float or integer conversion via the strconv package\n// in conjunction with the input bytes.\ntype number struct {\n\tkind uint8\n\tneg  bool\n\tsize int\n\t// if neg, this is the length of whitespace and comments between\n\t// the minus sign and the rest fo the number literal\n\tsep int\n}\n\nfunc (num number) string(data []byte) string {\n\tstrSize := num.size\n\tlast := num.size - 1\n\tif num.kind == numFloat && (data[last] == 'f' || data[last] == 'F') {\n\t\tstrSize = last\n\t}\n\tif num.neg && num.sep > 0 {\n\t\t// strip whitespace/comments between negative sign and the rest\n\t\tstrLen := strSize - num.sep\n\t\tstr := make([]byte, strLen)\n\t\tstr[0] = data[0]\n\t\tcopy(str[1:], data[num.sep+1:strSize])\n\t\treturn string(str)\n\t}\n\treturn string(data[:strSize])\n\n}\n\n// parseNumber constructs a number object from given input. It allows for the\n// following patterns:\n//\n//\tinteger: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*)\n//\tfloat: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?)\n//\n// It also returns the number of parsed bytes for the given number, 0 if it is\n// not a number.\nfunc parseNumber(input []byte) number {\n\tkind := numDec\n\tvar size int\n\tvar neg bool\n\n\ts := input\n\tif len(s) == 0 {\n\t\treturn number{}\n\t}\n\n\t// Optional -\n\tvar sep int\n\tif s[0] == '-' {\n\t\tneg = true\n\t\ts = s[1:]\n\t\tsize++\n\t\t// Consume any whitespace or comments between the\n\t\t// negative sign and the rest of the number\n\t\tlenBefore := len(s)\n\t\ts = consume(s, 0)\n\t\tsep = lenBefore - len(s)\n\t\tsize += sep\n\t\tif len(s) == 0 {\n\t\t\treturn number{}\n\t\t}\n\t}\n\n\tswitch {\n\tcase s[0] == '0':\n\t\tif len(s) > 1 {\n\t\t\tswitch {\n\t\t\tcase s[1] == 'x' || s[1] == 'X':\n\t\t\t\t// Parse as hex number.\n\t\t\t\tkind = numHex\n\t\t\t\tn := 2\n\t\t\t\ts = s[2:]\n\t\t\t\tfor len(s) > 0 && (('0' <= s[0] && s[0] <= '9') ||\n\t\t\t\t\t('a' <= s[0] && s[0] <= 'f') ||\n\t\t\t\t\t('A' <= s[0] && s[0] <= 'F')) {\n\t\t\t\t\ts = s[1:]\n\t\t\t\t\tn++\n\t\t\t\t}\n\t\t\t\tif n == 2 {\n\t\t\t\t\treturn number{}\n\t\t\t\t}\n\t\t\t\tsize += n\n\n\t\t\tcase '0' <= s[1] && s[1] <= '7':\n\t\t\t\t// Parse as octal number.\n\t\t\t\tkind = numOct\n\t\t\t\tn := 2\n\t\t\t\ts = s[2:]\n\t\t\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '7' {\n\t\t\t\t\ts = s[1:]\n\t\t\t\t\tn++\n\t\t\t\t}\n\t\t\t\tsize += n\n\t\t\t}\n\n\t\t\tif kind&(numHex|numOct) > 0 {\n\t\t\t\tif len(s) > 0 && !isDelim(s[0]) {\n\t\t\t\t\treturn number{}\n\t\t\t\t}\n\t\t\t\treturn number{kind: kind, neg: neg, size: size, sep: sep}\n\t\t\t}\n\t\t}\n\t\ts = s[1:]\n\t\tsize++\n\n\tcase '1' <= s[0] && s[0] <= '9':\n\t\tn := 1\n\t\ts = s[1:]\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\tsize += n\n\n\tcase s[0] == '.':\n\t\t// Set kind to numFloat to signify the intent to parse as float. And\n\t\t// that it needs to have other digits after '.'.\n\t\tkind = numFloat\n\n\tdefault:\n\t\treturn number{}\n\t}\n\n\t// . followed by 0 or more digits.\n\tif len(s) > 0 && s[0] == '.' {\n\t\tn := 1\n\t\ts = s[1:]\n\t\t// If decimal point was before any digits, it should be followed by\n\t\t// other digits.\n\t\tif len(s) == 0 && kind == numFloat {\n\t\t\treturn number{}\n\t\t}\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\tsize += n\n\t\tkind = numFloat\n\t}\n\n\t// e or E followed by an optional - or + and 1 or more digits.\n\tif len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {\n\t\tkind = numFloat\n\t\ts = s[1:]\n\t\tn := 1\n\t\tif s[0] == '+' || s[0] == '-' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t\tif len(s) == 0 {\n\t\t\t\treturn number{}\n\t\t\t}\n\t\t}\n\t\tfor len(s) > 0 && '0' <= s[0] && s[0] <= '9' {\n\t\t\ts = s[1:]\n\t\t\tn++\n\t\t}\n\t\tsize += n\n\t}\n\n\t// Optional suffix f or F for floats.\n\tif len(s) > 0 && (s[0] == 'f' || s[0] == 'F') {\n\t\tkind = numFloat\n\t\ts = s[1:]\n\t\tsize++\n\t}\n\n\t// Check that next byte is a delimiter or it is at the end.\n\tif len(s) > 0 && !isDelim(s[0]) {\n\t\treturn number{}\n\t}\n\n\treturn number{kind: kind, neg: neg, size: size, sep: sep}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage text\n\nimport (\n\t\"bytes\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/strs\"\n)\n\n// parseStringValue parses string field token.\n// This differs from parseString since the text format allows\n// multiple back-to-back string literals where they are semantically treated\n// as a single large string with all values concatenated.\n//\n// E.g., `\"foo\" \"bar\" \"baz\"` => \"foobarbaz\"\nfunc (d *Decoder) parseStringValue() (Token, error) {\n\t// Note that the ending quote is sufficient to unambiguously mark the end\n\t// of a string. Thus, the text grammar does not require intervening\n\t// whitespace or control characters in-between strings.\n\t// Thus, the following is valid:\n\t//\t`\"foo\"'bar'\"baz\"` => \"foobarbaz\"\n\tin0 := d.in\n\tvar ss []string\n\tfor len(d.in) > 0 && (d.in[0] == '\"' || d.in[0] == '\\'') {\n\t\ts, err := d.parseString()\n\t\tif err != nil {\n\t\t\treturn Token{}, err\n\t\t}\n\t\tss = append(ss, s)\n\t}\n\t// d.in already points to the end of the value at this point.\n\treturn Token{\n\t\tkind:  Scalar,\n\t\tattrs: stringValue,\n\t\tpos:   len(d.orig) - len(in0),\n\t\traw:   in0[:len(in0)-len(d.in)],\n\t\tstr:   strings.Join(ss, \"\"),\n\t}, nil\n}\n\n// parseString parses a string value enclosed in \" or '.\nfunc (d *Decoder) parseString() (string, error) {\n\tin := d.in\n\tif len(in) == 0 {\n\t\treturn \"\", ErrUnexpectedEOF\n\t}\n\tquote := in[0]\n\tin = in[1:]\n\ti := indexNeedEscapeInBytes(in)\n\tin, out := in[i:], in[:i:i] // set cap to prevent mutations\n\tfor len(in) > 0 {\n\t\tswitch r, n := utf8.DecodeRune(in); {\n\t\tcase r == utf8.RuneError && n == 1:\n\t\t\treturn \"\", d.newSyntaxError(\"invalid UTF-8 detected\")\n\t\tcase r == 0 || r == '\\n':\n\t\t\treturn \"\", d.newSyntaxError(\"invalid character %q in string\", r)\n\t\tcase r == rune(quote):\n\t\t\tin = in[1:]\n\t\t\td.consume(len(d.in) - len(in))\n\t\t\treturn string(out), nil\n\t\tcase r == '\\\\':\n\t\t\tif len(in) < 2 {\n\t\t\t\treturn \"\", ErrUnexpectedEOF\n\t\t\t}\n\t\t\tswitch r := in[1]; r {\n\t\t\tcase '\"', '\\'', '\\\\', '?':\n\t\t\t\tin, out = in[2:], append(out, r)\n\t\t\tcase 'a':\n\t\t\t\tin, out = in[2:], append(out, '\\a')\n\t\t\tcase 'b':\n\t\t\t\tin, out = in[2:], append(out, '\\b')\n\t\t\tcase 'n':\n\t\t\t\tin, out = in[2:], append(out, '\\n')\n\t\t\tcase 'r':\n\t\t\t\tin, out = in[2:], append(out, '\\r')\n\t\t\tcase 't':\n\t\t\t\tin, out = in[2:], append(out, '\\t')\n\t\t\tcase 'v':\n\t\t\t\tin, out = in[2:], append(out, '\\v')\n\t\t\tcase 'f':\n\t\t\t\tin, out = in[2:], append(out, '\\f')\n\t\t\tcase '0', '1', '2', '3', '4', '5', '6', '7':\n\t\t\t\t// One, two, or three octal characters.\n\t\t\t\tn := len(in[1:]) - len(bytes.TrimLeft(in[1:], \"01234567\"))\n\t\t\t\tif n > 3 {\n\t\t\t\t\tn = 3\n\t\t\t\t}\n\t\t\t\tv, err := strconv.ParseUint(string(in[1:1+n]), 8, 8)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", d.newSyntaxError(\"invalid octal escape code %q in string\", in[:1+n])\n\t\t\t\t}\n\t\t\t\tin, out = in[1+n:], append(out, byte(v))\n\t\t\tcase 'x':\n\t\t\t\t// One or two hexadecimal characters.\n\t\t\t\tn := len(in[2:]) - len(bytes.TrimLeft(in[2:], \"0123456789abcdefABCDEF\"))\n\t\t\t\tif n > 2 {\n\t\t\t\t\tn = 2\n\t\t\t\t}\n\t\t\t\tv, err := strconv.ParseUint(string(in[2:2+n]), 16, 8)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", d.newSyntaxError(\"invalid hex escape code %q in string\", in[:2+n])\n\t\t\t\t}\n\t\t\t\tin, out = in[2+n:], append(out, byte(v))\n\t\t\tcase 'u', 'U':\n\t\t\t\t// Four or eight hexadecimal characters\n\t\t\t\tn := 6\n\t\t\t\tif r == 'U' {\n\t\t\t\t\tn = 10\n\t\t\t\t}\n\t\t\t\tif len(in) < n {\n\t\t\t\t\treturn \"\", ErrUnexpectedEOF\n\t\t\t\t}\n\t\t\t\tv, err := strconv.ParseUint(string(in[2:n]), 16, 32)\n\t\t\t\tif utf8.MaxRune < v || err != nil {\n\t\t\t\t\treturn \"\", d.newSyntaxError(\"invalid Unicode escape code %q in string\", in[:n])\n\t\t\t\t}\n\t\t\t\tin = in[n:]\n\n\t\t\t\tr := rune(v)\n\t\t\t\tif utf16.IsSurrogate(r) {\n\t\t\t\t\tif len(in) < 6 {\n\t\t\t\t\t\treturn \"\", ErrUnexpectedEOF\n\t\t\t\t\t}\n\t\t\t\t\tv, err := strconv.ParseUint(string(in[2:6]), 16, 16)\n\t\t\t\t\tr = utf16.DecodeRune(r, rune(v))\n\t\t\t\t\tif in[0] != '\\\\' || in[1] != 'u' || r == unicode.ReplacementChar || err != nil {\n\t\t\t\t\t\treturn \"\", d.newSyntaxError(\"invalid Unicode escape code %q in string\", in[:6])\n\t\t\t\t\t}\n\t\t\t\t\tin = in[6:]\n\t\t\t\t}\n\t\t\t\tout = append(out, string(r)...)\n\t\t\tdefault:\n\t\t\t\treturn \"\", d.newSyntaxError(\"invalid escape code %q in string\", in[:2])\n\t\t\t}\n\t\tdefault:\n\t\t\ti := indexNeedEscapeInBytes(in[n:])\n\t\t\tin, out = in[n+i:], append(out, in[:n+i]...)\n\t\t}\n\t}\n\treturn \"\", ErrUnexpectedEOF\n}\n\n// indexNeedEscapeInString returns the index of the character that needs\n// escaping. If no characters need escaping, this returns the input length.\nfunc indexNeedEscapeInBytes(b []byte) int { return indexNeedEscapeInString(strs.UnsafeString(b)) }\n\n// UnmarshalString returns an unescaped string given a textproto string value.\n// String value needs to contain single or double quotes. This is only used by\n// internal/encoding/defval package for unmarshaling bytes.\nfunc UnmarshalString(s string) (string, error) {\n\td := NewDecoder([]byte(s))\n\treturn d.parseString()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage text\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/internal/flags\"\n)\n\n// Kind represents a token kind expressible in the textproto format.\ntype Kind uint8\n\n// Kind values.\nconst (\n\tInvalid Kind = iota\n\tEOF\n\tName   // Name indicates the field name.\n\tScalar // Scalar are scalar values, e.g. \"string\", 47, ENUM_LITERAL, true.\n\tMessageOpen\n\tMessageClose\n\tListOpen\n\tListClose\n\n\t// comma and semi-colon are only for parsing in between values and should not be exposed.\n\tcomma\n\tsemicolon\n\n\t// bof indicates beginning of file, which is the default token\n\t// kind at the beginning of parsing.\n\tbof = Invalid\n)\n\nfunc (t Kind) String() string {\n\tswitch t {\n\tcase Invalid:\n\t\treturn \"<invalid>\"\n\tcase EOF:\n\t\treturn \"eof\"\n\tcase Scalar:\n\t\treturn \"scalar\"\n\tcase Name:\n\t\treturn \"name\"\n\tcase MessageOpen:\n\t\treturn \"{\"\n\tcase MessageClose:\n\t\treturn \"}\"\n\tcase ListOpen:\n\t\treturn \"[\"\n\tcase ListClose:\n\t\treturn \"]\"\n\tcase comma:\n\t\treturn \",\"\n\tcase semicolon:\n\t\treturn \";\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"<invalid:%v>\", uint8(t))\n\t}\n}\n\n// NameKind represents different types of field names.\ntype NameKind uint8\n\n// NameKind values.\nconst (\n\tIdentName NameKind = iota + 1\n\tTypeName\n\tFieldNumber\n)\n\nfunc (t NameKind) String() string {\n\tswitch t {\n\tcase IdentName:\n\t\treturn \"IdentName\"\n\tcase TypeName:\n\t\treturn \"TypeName\"\n\tcase FieldNumber:\n\t\treturn \"FieldNumber\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"<invalid:%v>\", uint8(t))\n\t}\n}\n\n// Bit mask in Token.attrs to indicate if a Name token is followed by the\n// separator char ':'. The field name separator char is optional for message\n// field or repeated message field, but required for all other types. Decoder\n// simply indicates whether a Name token is followed by separator or not.  It is\n// up to the prototext package to validate.\nconst hasSeparator = 1 << 7\n\n// Scalar value types.\nconst (\n\tnumberValue = iota + 1\n\tstringValue\n\tliteralValue\n)\n\n// Bit mask in Token.numAttrs to indicate that the number is a negative.\nconst isNegative = 1 << 7\n\n// Token provides a parsed token kind and value. Values are provided by the\n// different accessor methods.\ntype Token struct {\n\t// Kind of the Token object.\n\tkind Kind\n\t// attrs contains metadata for the following Kinds:\n\t// Name: hasSeparator bit and one of NameKind.\n\t// Scalar: one of numberValue, stringValue, literalValue.\n\tattrs uint8\n\t// numAttrs contains metadata for numberValue:\n\t// - highest bit is whether negative or positive.\n\t// - lower bits indicate one of numDec, numHex, numOct, numFloat.\n\tnumAttrs uint8\n\t// pos provides the position of the token in the original input.\n\tpos int\n\t// raw bytes of the serialized token.\n\t// This is a subslice into the original input.\n\traw []byte\n\t// str contains parsed string for the following:\n\t// - stringValue of Scalar kind\n\t// - numberValue of Scalar kind\n\t// - TypeName of Name kind\n\tstr string\n}\n\n// Kind returns the token kind.\nfunc (t Token) Kind() Kind {\n\treturn t.kind\n}\n\n// RawString returns the read value in string.\nfunc (t Token) RawString() string {\n\treturn string(t.raw)\n}\n\n// Pos returns the token position from the input.\nfunc (t Token) Pos() int {\n\treturn t.pos\n}\n\n// NameKind returns IdentName, TypeName or FieldNumber.\n// It panics if type is not Name.\nfunc (t Token) NameKind() NameKind {\n\tif t.kind == Name {\n\t\treturn NameKind(t.attrs &^ hasSeparator)\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a Name type: %s\", t.kind))\n}\n\n// HasSeparator returns true if the field name is followed by the separator char\n// ':', else false. It panics if type is not Name.\nfunc (t Token) HasSeparator() bool {\n\tif t.kind == Name {\n\t\treturn t.attrs&hasSeparator != 0\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a Name type: %s\", t.kind))\n}\n\n// IdentName returns the value for IdentName type.\nfunc (t Token) IdentName() string {\n\tif t.kind == Name && t.attrs&uint8(IdentName) != 0 {\n\t\treturn string(t.raw)\n\t}\n\tpanic(fmt.Sprintf(\"Token is not an IdentName: %s:%s\", t.kind, NameKind(t.attrs&^hasSeparator)))\n}\n\n// TypeName returns the value for TypeName type.\nfunc (t Token) TypeName() string {\n\tif t.kind == Name && t.attrs&uint8(TypeName) != 0 {\n\t\treturn t.str\n\t}\n\tpanic(fmt.Sprintf(\"Token is not a TypeName: %s:%s\", t.kind, NameKind(t.attrs&^hasSeparator)))\n}\n\n// FieldNumber returns the value for FieldNumber type. It returns a\n// non-negative int32 value. Caller will still need to validate for the correct\n// field number range.\nfunc (t Token) FieldNumber() int32 {\n\tif t.kind != Name || t.attrs&uint8(FieldNumber) == 0 {\n\t\tpanic(fmt.Sprintf(\"Token is not a FieldNumber: %s:%s\", t.kind, NameKind(t.attrs&^hasSeparator)))\n\t}\n\t// Following should not return an error as it had already been called right\n\t// before this Token was constructed.\n\tnum, _ := strconv.ParseInt(string(t.raw), 10, 32)\n\treturn int32(num)\n}\n\n// String returns the string value for a Scalar type.\nfunc (t Token) String() (string, bool) {\n\tif t.kind != Scalar || t.attrs != stringValue {\n\t\treturn \"\", false\n\t}\n\treturn t.str, true\n}\n\n// Enum returns the literal value for a Scalar type for use as enum literals.\nfunc (t Token) Enum() (string, bool) {\n\tif t.kind != Scalar || t.attrs != literalValue || (len(t.raw) > 0 && t.raw[0] == '-') {\n\t\treturn \"\", false\n\t}\n\treturn string(t.raw), true\n}\n\n// Bool returns the bool value for a Scalar type.\nfunc (t Token) Bool() (bool, bool) {\n\tif t.kind != Scalar {\n\t\treturn false, false\n\t}\n\tswitch t.attrs {\n\tcase literalValue:\n\t\tif b, ok := boolLits[string(t.raw)]; ok {\n\t\t\treturn b, true\n\t\t}\n\tcase numberValue:\n\t\t// Unsigned integer representation of 0 or 1 is permitted: 00, 0x0, 01,\n\t\t// 0x1, etc.\n\t\tn, err := strconv.ParseUint(t.str, 0, 64)\n\t\tif err == nil {\n\t\t\tswitch n {\n\t\t\tcase 0:\n\t\t\t\treturn false, true\n\t\t\tcase 1:\n\t\t\t\treturn true, true\n\t\t\t}\n\t\t}\n\t}\n\treturn false, false\n}\n\n// These exact boolean literals are the ones supported in C++.\nvar boolLits = map[string]bool{\n\t\"t\":     true,\n\t\"true\":  true,\n\t\"True\":  true,\n\t\"f\":     false,\n\t\"false\": false,\n\t\"False\": false,\n}\n\n// Uint64 returns the uint64 value for a Scalar type.\nfunc (t Token) Uint64() (uint64, bool) {\n\tif t.kind != Scalar || t.attrs != numberValue ||\n\t\tt.numAttrs&isNegative > 0 || t.numAttrs&numFloat > 0 {\n\t\treturn 0, false\n\t}\n\tn, err := strconv.ParseUint(t.str, 0, 64)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\treturn n, true\n}\n\n// Uint32 returns the uint32 value for a Scalar type.\nfunc (t Token) Uint32() (uint32, bool) {\n\tif t.kind != Scalar || t.attrs != numberValue ||\n\t\tt.numAttrs&isNegative > 0 || t.numAttrs&numFloat > 0 {\n\t\treturn 0, false\n\t}\n\tn, err := strconv.ParseUint(t.str, 0, 32)\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\treturn uint32(n), true\n}\n\n// Int64 returns the int64 value for a Scalar type.\nfunc (t Token) Int64() (int64, bool) {\n\tif t.kind != Scalar || t.attrs != numberValue || t.numAttrs&numFloat > 0 {\n\t\treturn 0, false\n\t}\n\tif n, err := strconv.ParseInt(t.str, 0, 64); err == nil {\n\t\treturn n, true\n\t}\n\t// C++ accepts large positive hex numbers as negative values.\n\t// This feature is here for proto1 backwards compatibility purposes.\n\tif flags.ProtoLegacy && (t.numAttrs == numHex) {\n\t\tif n, err := strconv.ParseUint(t.str, 0, 64); err == nil {\n\t\t\treturn int64(n), true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// Int32 returns the int32 value for a Scalar type.\nfunc (t Token) Int32() (int32, bool) {\n\tif t.kind != Scalar || t.attrs != numberValue || t.numAttrs&numFloat > 0 {\n\t\treturn 0, false\n\t}\n\tif n, err := strconv.ParseInt(t.str, 0, 32); err == nil {\n\t\treturn int32(n), true\n\t}\n\t// C++ accepts large positive hex numbers as negative values.\n\t// This feature is here for proto1 backwards compatibility purposes.\n\tif flags.ProtoLegacy && (t.numAttrs == numHex) {\n\t\tif n, err := strconv.ParseUint(t.str, 0, 32); err == nil {\n\t\t\treturn int32(n), true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// Float64 returns the float64 value for a Scalar type.\nfunc (t Token) Float64() (float64, bool) {\n\tif t.kind != Scalar {\n\t\treturn 0, false\n\t}\n\tswitch t.attrs {\n\tcase literalValue:\n\t\tif f, ok := floatLits[strings.ToLower(string(t.raw))]; ok {\n\t\t\treturn f, true\n\t\t}\n\tcase numberValue:\n\t\tn, err := strconv.ParseFloat(t.str, 64)\n\t\tif err == nil {\n\t\t\treturn n, true\n\t\t}\n\t\tnerr := err.(*strconv.NumError)\n\t\tif nerr.Err == strconv.ErrRange {\n\t\t\treturn n, true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// Float32 returns the float32 value for a Scalar type.\nfunc (t Token) Float32() (float32, bool) {\n\tif t.kind != Scalar {\n\t\treturn 0, false\n\t}\n\tswitch t.attrs {\n\tcase literalValue:\n\t\tif f, ok := floatLits[strings.ToLower(string(t.raw))]; ok {\n\t\t\treturn float32(f), true\n\t\t}\n\tcase numberValue:\n\t\tn, err := strconv.ParseFloat(t.str, 64)\n\t\tif err == nil {\n\t\t\t// Overflows are treated as (-)infinity.\n\t\t\treturn float32(n), true\n\t\t}\n\t\tnerr := err.(*strconv.NumError)\n\t\tif nerr.Err == strconv.ErrRange {\n\t\t\treturn float32(n), true\n\t\t}\n\t}\n\treturn 0, false\n}\n\n// These are the supported float literals which C++ permits case-insensitive\n// variants of these.\nvar floatLits = map[string]float64{\n\t\"nan\":       math.NaN(),\n\t\"inf\":       math.Inf(1),\n\t\"infinity\":  math.Inf(1),\n\t\"-inf\":      math.Inf(-1),\n\t\"-infinity\": math.Inf(-1),\n}\n\n// TokenEquals returns true if given Tokens are equal, else false.\nfunc TokenEquals(x, y Token) bool {\n\treturn x.kind == y.kind &&\n\t\tx.attrs == y.attrs &&\n\t\tx.numAttrs == y.numAttrs &&\n\t\tx.pos == y.pos &&\n\t\tbytes.Equal(x.raw, y.raw) &&\n\t\tx.str == y.str\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/doc.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package text implements the text format for protocol buffers.\n// This package has no semantic understanding for protocol buffers and is only\n// a parser and composer for the format.\n//\n// There is no formal specification for the protobuf text format, as such the\n// C++ implementation (see google::protobuf::TextFormat) is the reference\n// implementation of the text format.\n//\n// This package is neither a superset nor a subset of the C++ implementation.\n// This implementation permits a more liberal grammar in some cases to be\n// backwards compatible with the historical Go implementation.\n// Future parsings unique to Go should not be added.\n// Some grammars allowed by the C++ implementation are deliberately\n// not implemented here because they are considered a bug by the protobuf team\n// and should not be replicated.\n//\n// The Go implementation should implement a sufficient amount of the C++\n// grammar such that the default text serialization by C++ can be parsed by Go.\n// However, just because the C++ parser accepts some input does not mean that\n// the Go implementation should as well.\n//\n// The text format is almost a superset of JSON except:\n//   - message keys are not quoted strings, but identifiers\n//   - the top-level value must be a message without the delimiters\npackage text\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/encoding/text/encode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage text\n\nimport (\n\t\"math\"\n\t\"math/bits\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/detrand\"\n\t\"google.golang.org/protobuf/internal/errors\"\n)\n\n// encType represents an encoding type.\ntype encType uint8\n\nconst (\n\t_ encType = (1 << iota) / 2\n\tname\n\tscalar\n\tmessageOpen\n\tmessageClose\n)\n\n// Encoder provides methods to write out textproto constructs and values. The user is\n// responsible for producing valid sequences of constructs and values.\ntype Encoder struct {\n\tencoderState\n\n\tindent      string\n\tdelims      [2]byte\n\toutputASCII bool\n}\n\ntype encoderState struct {\n\tlastType encType\n\tindents  []byte\n\tout      []byte\n}\n\n// NewEncoder returns an Encoder.\n//\n// If indent is a non-empty string, it causes every entry in a List or Message\n// to be preceded by the indent and trailed by a newline.\n//\n// If delims is not the zero value, it controls the delimiter characters used\n// for messages (e.g., \"{}\" vs \"<>\").\n//\n// If outputASCII is true, strings will be serialized in such a way that\n// multi-byte UTF-8 sequences are escaped. This property ensures that the\n// overall output is ASCII (as opposed to UTF-8).\nfunc NewEncoder(buf []byte, indent string, delims [2]byte, outputASCII bool) (*Encoder, error) {\n\te := &Encoder{\n\t\tencoderState: encoderState{out: buf},\n\t}\n\tif len(indent) > 0 {\n\t\tif strings.Trim(indent, \" \\t\") != \"\" {\n\t\t\treturn nil, errors.New(\"indent may only be composed of space and tab characters\")\n\t\t}\n\t\te.indent = indent\n\t}\n\tswitch delims {\n\tcase [2]byte{0, 0}:\n\t\te.delims = [2]byte{'{', '}'}\n\tcase [2]byte{'{', '}'}, [2]byte{'<', '>'}:\n\t\te.delims = delims\n\tdefault:\n\t\treturn nil, errors.New(\"delimiters may only be \\\"{}\\\" or \\\"<>\\\"\")\n\t}\n\te.outputASCII = outputASCII\n\n\treturn e, nil\n}\n\n// Bytes returns the content of the written bytes.\nfunc (e *Encoder) Bytes() []byte {\n\treturn e.out\n}\n\n// StartMessage writes out the '{' or '<' symbol.\nfunc (e *Encoder) StartMessage() {\n\te.prepareNext(messageOpen)\n\te.out = append(e.out, e.delims[0])\n}\n\n// EndMessage writes out the '}' or '>' symbol.\nfunc (e *Encoder) EndMessage() {\n\te.prepareNext(messageClose)\n\te.out = append(e.out, e.delims[1])\n}\n\n// WriteName writes out the field name and the separator ':'.\nfunc (e *Encoder) WriteName(s string) {\n\te.prepareNext(name)\n\te.out = append(e.out, s...)\n\te.out = append(e.out, ':')\n}\n\n// WriteBool writes out the given boolean value.\nfunc (e *Encoder) WriteBool(b bool) {\n\tif b {\n\t\te.WriteLiteral(\"true\")\n\t} else {\n\t\te.WriteLiteral(\"false\")\n\t}\n}\n\n// WriteString writes out the given string value.\nfunc (e *Encoder) WriteString(s string) {\n\te.prepareNext(scalar)\n\te.out = appendString(e.out, s, e.outputASCII)\n}\n\nfunc appendString(out []byte, in string, outputASCII bool) []byte {\n\tout = append(out, '\"')\n\ti := indexNeedEscapeInString(in)\n\tin, out = in[i:], append(out, in[:i]...)\n\tfor len(in) > 0 {\n\t\tswitch r, n := utf8.DecodeRuneInString(in); {\n\t\tcase r == utf8.RuneError && n == 1:\n\t\t\t// We do not report invalid UTF-8 because strings in the text format\n\t\t\t// are used to represent both the proto string and bytes type.\n\t\t\tr = rune(in[0])\n\t\t\tfallthrough\n\t\tcase r < ' ' || r == '\"' || r == '\\\\' || r == 0x7f:\n\t\t\tout = append(out, '\\\\')\n\t\t\tswitch r {\n\t\t\tcase '\"', '\\\\':\n\t\t\t\tout = append(out, byte(r))\n\t\t\tcase '\\n':\n\t\t\t\tout = append(out, 'n')\n\t\t\tcase '\\r':\n\t\t\t\tout = append(out, 'r')\n\t\t\tcase '\\t':\n\t\t\t\tout = append(out, 't')\n\t\t\tdefault:\n\t\t\t\tout = append(out, 'x')\n\t\t\t\tout = append(out, \"00\"[1+(bits.Len32(uint32(r))-1)/4:]...)\n\t\t\t\tout = strconv.AppendUint(out, uint64(r), 16)\n\t\t\t}\n\t\t\tin = in[n:]\n\t\tcase r >= utf8.RuneSelf && (outputASCII || r <= 0x009f):\n\t\t\tout = append(out, '\\\\')\n\t\t\tif r <= math.MaxUint16 {\n\t\t\t\tout = append(out, 'u')\n\t\t\t\tout = append(out, \"0000\"[1+(bits.Len32(uint32(r))-1)/4:]...)\n\t\t\t\tout = strconv.AppendUint(out, uint64(r), 16)\n\t\t\t} else {\n\t\t\t\tout = append(out, 'U')\n\t\t\t\tout = append(out, \"00000000\"[1+(bits.Len32(uint32(r))-1)/4:]...)\n\t\t\t\tout = strconv.AppendUint(out, uint64(r), 16)\n\t\t\t}\n\t\t\tin = in[n:]\n\t\tdefault:\n\t\t\ti := indexNeedEscapeInString(in[n:])\n\t\t\tin, out = in[n+i:], append(out, in[:n+i]...)\n\t\t}\n\t}\n\tout = append(out, '\"')\n\treturn out\n}\n\n// indexNeedEscapeInString returns the index of the character that needs\n// escaping. If no characters need escaping, this returns the input length.\nfunc indexNeedEscapeInString(s string) int {\n\tfor i := 0; i < len(s); i++ {\n\t\tif c := s[i]; c < ' ' || c == '\"' || c == '\\'' || c == '\\\\' || c >= 0x7f {\n\t\t\treturn i\n\t\t}\n\t}\n\treturn len(s)\n}\n\n// WriteFloat writes out the given float value for given bitSize.\nfunc (e *Encoder) WriteFloat(n float64, bitSize int) {\n\te.prepareNext(scalar)\n\te.out = appendFloat(e.out, n, bitSize)\n}\n\nfunc appendFloat(out []byte, n float64, bitSize int) []byte {\n\tswitch {\n\tcase math.IsNaN(n):\n\t\treturn append(out, \"nan\"...)\n\tcase math.IsInf(n, +1):\n\t\treturn append(out, \"inf\"...)\n\tcase math.IsInf(n, -1):\n\t\treturn append(out, \"-inf\"...)\n\tdefault:\n\t\treturn strconv.AppendFloat(out, n, 'g', -1, bitSize)\n\t}\n}\n\n// WriteInt writes out the given signed integer value.\nfunc (e *Encoder) WriteInt(n int64) {\n\te.prepareNext(scalar)\n\te.out = strconv.AppendInt(e.out, n, 10)\n}\n\n// WriteUint writes out the given unsigned integer value.\nfunc (e *Encoder) WriteUint(n uint64) {\n\te.prepareNext(scalar)\n\te.out = strconv.AppendUint(e.out, n, 10)\n}\n\n// WriteLiteral writes out the given string as a literal value without quotes.\n// This is used for writing enum literal strings.\nfunc (e *Encoder) WriteLiteral(s string) {\n\te.prepareNext(scalar)\n\te.out = append(e.out, s...)\n}\n\n// prepareNext adds possible space and indentation for the next value based\n// on last encType and indent option. It also updates e.lastType to next.\nfunc (e *Encoder) prepareNext(next encType) {\n\tdefer func() {\n\t\te.lastType = next\n\t}()\n\n\t// Single line.\n\tif len(e.indent) == 0 {\n\t\t// Add space after each field before the next one.\n\t\tif e.lastType&(scalar|messageClose) != 0 && next == name {\n\t\t\te.out = append(e.out, ' ')\n\t\t\t// Add a random extra space to make output unstable.\n\t\t\tif detrand.Bool() {\n\t\t\t\te.out = append(e.out, ' ')\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\t// Multi-line.\n\tswitch {\n\tcase e.lastType == name:\n\t\te.out = append(e.out, ' ')\n\t\t// Add a random extra space after name: to make output unstable.\n\t\tif detrand.Bool() {\n\t\t\te.out = append(e.out, ' ')\n\t\t}\n\n\tcase e.lastType == messageOpen && next != messageClose:\n\t\te.indents = append(e.indents, e.indent...)\n\t\te.out = append(e.out, '\\n')\n\t\te.out = append(e.out, e.indents...)\n\n\tcase e.lastType&(scalar|messageClose) != 0:\n\t\tif next == messageClose {\n\t\t\te.indents = e.indents[:len(e.indents)-len(e.indent)]\n\t\t}\n\t\te.out = append(e.out, '\\n')\n\t\te.out = append(e.out, e.indents...)\n\t}\n}\n\n// Snapshot returns the current snapshot for use in Reset.\nfunc (e *Encoder) Snapshot() encoderState {\n\treturn e.encoderState\n}\n\n// Reset resets the Encoder to the given encoderState from a Snapshot.\nfunc (e *Encoder) Reset(es encoderState) {\n\te.encoderState = es\n}\n\n// AppendString appends the escaped form of the input string to b.\nfunc AppendString(b []byte, s string) []byte {\n\treturn appendString(b, s, false)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/errors/errors.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package errors implements functions to manipulate errors.\npackage errors\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/internal/detrand\"\n)\n\n// Error is a sentinel matching all errors produced by this package.\nvar Error = errors.New(\"protobuf error\")\n\n// New formats a string according to the format specifier and arguments and\n// returns an error that has a \"proto\" prefix.\nfunc New(f string, x ...any) error {\n\treturn &prefixError{s: format(f, x...)}\n}\n\ntype prefixError struct{ s string }\n\nvar prefix = func() string {\n\t// Deliberately introduce instability into the error message string to\n\t// discourage users from performing error string comparisons.\n\tif detrand.Bool() {\n\t\treturn \"proto: \" // use non-breaking spaces (U+00a0)\n\t} else {\n\t\treturn \"proto: \" // use regular spaces (U+0020)\n\t}\n}()\n\nfunc (e *prefixError) Error() string {\n\treturn prefix + e.s\n}\n\nfunc (e *prefixError) Unwrap() error {\n\treturn Error\n}\n\n// Wrap returns an error that has a \"proto\" prefix, the formatted string described\n// by the format specifier and arguments, and a suffix of err. The error wraps err.\nfunc Wrap(err error, f string, x ...any) error {\n\treturn &wrapError{\n\t\ts:   format(f, x...),\n\t\terr: err,\n\t}\n}\n\ntype wrapError struct {\n\ts   string\n\terr error\n}\n\nfunc (e *wrapError) Error() string {\n\treturn format(\"%v%v: %v\", prefix, e.s, e.err)\n}\n\nfunc (e *wrapError) Unwrap() error {\n\treturn e.err\n}\n\nfunc (e *wrapError) Is(target error) bool {\n\treturn target == Error\n}\n\nfunc format(f string, x ...any) string {\n\t// avoid \"proto: \" prefix when chaining\n\tfor i := 0; i < len(x); i++ {\n\t\tswitch e := x[i].(type) {\n\t\tcase *prefixError:\n\t\t\tx[i] = e.s\n\t\tcase *wrapError:\n\t\t\tx[i] = format(\"%v: %v\", e.s, e.err)\n\t\t}\n\t}\n\treturn fmt.Sprintf(f, x...)\n}\n\nfunc InvalidUTF8(name string) error {\n\treturn New(\"field %v contains invalid UTF-8\", name)\n}\n\nfunc RequiredNotSet(name string) error {\n\treturn New(\"required field %v not set\", name)\n}\n\ntype SizeMismatchError struct {\n\tCalculated, Measured int\n}\n\nfunc (e *SizeMismatchError) Error() string {\n\treturn fmt.Sprintf(\"size mismatch (see https://github.com/golang/protobuf/issues/1609): calculated=%d, measured=%d\", e.Calculated, e.Measured)\n}\n\nfunc MismatchedSizeCalculation(calculated, measured int) error {\n\treturn &SizeMismatchError{\n\t\tCalculated: calculated,\n\t\tMeasured:   measured,\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/build.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package filedesc provides functionality for constructing descriptors.\n//\n// The types in this package implement interfaces in the protoreflect package\n// related to protobuf descripriptors.\npackage filedesc\n\nimport (\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\n// Builder construct a protoreflect.FileDescriptor from the raw descriptor.\ntype Builder struct {\n\t// GoPackagePath is the Go package path that is invoking this builder.\n\tGoPackagePath string\n\n\t// RawDescriptor is the wire-encoded bytes of FileDescriptorProto\n\t// and must be populated.\n\tRawDescriptor []byte\n\n\t// NumEnums is the total number of enums declared in the file.\n\tNumEnums int32\n\t// NumMessages is the total number of messages declared in the file.\n\t// It includes the implicit message declarations for map entries.\n\tNumMessages int32\n\t// NumExtensions is the total number of extensions declared in the file.\n\tNumExtensions int32\n\t// NumServices is the total number of services declared in the file.\n\tNumServices int32\n\n\t// TypeResolver resolves extension field types for descriptor options.\n\t// If nil, it uses protoregistry.GlobalTypes.\n\tTypeResolver interface {\n\t\tprotoregistry.ExtensionTypeResolver\n\t}\n\n\t// FileRegistry is use to lookup file, enum, and message dependencies.\n\t// Once constructed, the file descriptor is registered here.\n\t// If nil, it uses protoregistry.GlobalFiles.\n\tFileRegistry interface {\n\t\tFindFileByPath(string) (protoreflect.FileDescriptor, error)\n\t\tFindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)\n\t\tRegisterFile(protoreflect.FileDescriptor) error\n\t}\n}\n\n// resolverByIndex is an interface Builder.FileRegistry may implement.\n// If so, it permits looking up an enum or message dependency based on the\n// sub-list and element index into filetype.Builder.DependencyIndexes.\ntype resolverByIndex interface {\n\tFindEnumByIndex(int32, int32, []Enum, []Message) protoreflect.EnumDescriptor\n\tFindMessageByIndex(int32, int32, []Enum, []Message) protoreflect.MessageDescriptor\n}\n\n// Indexes of each sub-list in filetype.Builder.DependencyIndexes.\nconst (\n\tlistFieldDeps int32 = iota\n\tlistExtTargets\n\tlistExtDeps\n\tlistMethInDeps\n\tlistMethOutDeps\n)\n\n// Out is the output of the Builder.\ntype Out struct {\n\tFile protoreflect.FileDescriptor\n\n\t// Enums is all enum descriptors in \"flattened ordering\".\n\tEnums []Enum\n\t// Messages is all message descriptors in \"flattened ordering\".\n\t// It includes the implicit message declarations for map entries.\n\tMessages []Message\n\t// Extensions is all extension descriptors in \"flattened ordering\".\n\tExtensions []Extension\n\t// Service is all service descriptors in \"flattened ordering\".\n\tServices []Service\n}\n\n// Build constructs a FileDescriptor given the parameters set in Builder.\n// It assumes that the inputs are well-formed and panics if any inconsistencies\n// are encountered.\n//\n// If NumEnums+NumMessages+NumExtensions+NumServices is zero,\n// then Build automatically derives them from the raw descriptor.\nfunc (db Builder) Build() (out Out) {\n\t// Populate the counts if uninitialized.\n\tif db.NumEnums+db.NumMessages+db.NumExtensions+db.NumServices == 0 {\n\t\tdb.unmarshalCounts(db.RawDescriptor, true)\n\t}\n\n\t// Initialize resolvers and registries if unpopulated.\n\tif db.TypeResolver == nil {\n\t\tdb.TypeResolver = protoregistry.GlobalTypes\n\t}\n\tif db.FileRegistry == nil {\n\t\tdb.FileRegistry = protoregistry.GlobalFiles\n\t}\n\n\tfd := newRawFile(db)\n\tout.File = fd\n\tout.Enums = fd.allEnums\n\tout.Messages = fd.allMessages\n\tout.Extensions = fd.allExtensions\n\tout.Services = fd.allServices\n\n\tif err := db.FileRegistry.RegisterFile(fd); err != nil {\n\t\tpanic(err)\n\t}\n\treturn out\n}\n\n// unmarshalCounts counts the number of enum, message, extension, and service\n// declarations in the raw message, which is either a FileDescriptorProto\n// or a MessageDescriptorProto depending on whether isFile is set.\nfunc (db *Builder) unmarshalCounts(b []byte, isFile bool) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tif isFile {\n\t\t\t\tswitch num {\n\t\t\t\tcase genid.FileDescriptorProto_EnumType_field_number:\n\t\t\t\t\tdb.NumEnums++\n\t\t\t\tcase genid.FileDescriptorProto_MessageType_field_number:\n\t\t\t\t\tdb.unmarshalCounts(v, false)\n\t\t\t\t\tdb.NumMessages++\n\t\t\t\tcase genid.FileDescriptorProto_Extension_field_number:\n\t\t\t\t\tdb.NumExtensions++\n\t\t\t\tcase genid.FileDescriptorProto_Service_field_number:\n\t\t\t\t\tdb.NumServices++\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch num {\n\t\t\t\tcase genid.DescriptorProto_EnumType_field_number:\n\t\t\t\t\tdb.NumEnums++\n\t\t\t\tcase genid.DescriptorProto_NestedType_field_number:\n\t\t\t\t\tdb.unmarshalCounts(v, false)\n\t\t\t\t\tdb.NumMessages++\n\t\t\t\tcase genid.DescriptorProto_Extension_field_number:\n\t\t\t\t\tdb.NumExtensions++\n\t\t\t\t}\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/desc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/internal/descfmt\"\n\t\"google.golang.org/protobuf/internal/descopts\"\n\t\"google.golang.org/protobuf/internal/encoding/defval\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// Edition is an Enum for proto2.Edition\ntype Edition int32\n\n// These values align with the value of Enum in descriptor.proto which allows\n// direct conversion between the proto enum and this enum.\nconst (\n\tEditionUnknown     Edition = 0\n\tEditionProto2      Edition = 998\n\tEditionProto3      Edition = 999\n\tEdition2023        Edition = 1000\n\tEdition2024        Edition = 1001\n\tEditionUnstable    Edition = 9999\n\tEditionUnsupported Edition = 100000\n)\n\n// The types in this file may have a suffix:\n//\t• L0: Contains fields common to all descriptors (except File) and\n//\tmust be initialized up front.\n//\t• L1: Contains fields specific to a descriptor and\n//\tmust be initialized up front. If the associated proto uses Editions, the\n//  Editions features must always be resolved. If not explicitly set, the\n//  appropriate default must be resolved and set.\n//\t• L2: Contains fields that are lazily initialized when constructing\n//\tfrom the raw file descriptor. When constructing as a literal, the L2\n//\tfields must be initialized up front.\n//\n// The types are exported so that packages like reflect/protodesc can\n// directly construct descriptors.\n\ntype (\n\tFile struct {\n\t\tfileRaw\n\t\tL1 FileL1\n\n\t\tonce uint32     // atomically set if L2 is valid\n\t\tmu   sync.Mutex // protects L2\n\t\tL2   *FileL2\n\t}\n\tFileL1 struct {\n\t\tSyntax  protoreflect.Syntax\n\t\tEdition Edition // Only used if Syntax == Editions\n\t\tPath    string\n\t\tPackage protoreflect.FullName\n\n\t\tEnums      Enums\n\t\tMessages   Messages\n\t\tExtensions Extensions\n\t\tServices   Services\n\n\t\tEditionFeatures EditionFeatures\n\t}\n\tFileL2 struct {\n\t\tOptions       func() protoreflect.ProtoMessage\n\t\tImports       FileImports\n\t\tOptionImports func() protoreflect.FileImports\n\t\tLocations     SourceLocations\n\t}\n\n\t// EditionFeatures is a frequently-instantiated struct, so please take care\n\t// to minimize padding when adding new fields to this struct (add them in\n\t// the right place/order).\n\tEditionFeatures struct {\n\t\t// StripEnumPrefix determines if the plugin generates enum value\n\t\t// constants as-is, with their prefix stripped, or both variants.\n\t\tStripEnumPrefix int\n\n\t\t// IsFieldPresence is true if field_presence is EXPLICIT\n\t\t// https://protobuf.dev/editions/features/#field_presence\n\t\tIsFieldPresence bool\n\n\t\t// IsFieldPresence is true if field_presence is LEGACY_REQUIRED\n\t\t// https://protobuf.dev/editions/features/#field_presence\n\t\tIsLegacyRequired bool\n\n\t\t// IsOpenEnum is true if enum_type is OPEN\n\t\t// https://protobuf.dev/editions/features/#enum_type\n\t\tIsOpenEnum bool\n\n\t\t// IsPacked is true if repeated_field_encoding is PACKED\n\t\t// https://protobuf.dev/editions/features/#repeated_field_encoding\n\t\tIsPacked bool\n\n\t\t// IsUTF8Validated is true if utf_validation is VERIFY\n\t\t// https://protobuf.dev/editions/features/#utf8_validation\n\t\tIsUTF8Validated bool\n\n\t\t// IsDelimitedEncoded is true if message_encoding is DELIMITED\n\t\t// https://protobuf.dev/editions/features/#message_encoding\n\t\tIsDelimitedEncoded bool\n\n\t\t// IsJSONCompliant is true if json_format is ALLOW\n\t\t// https://protobuf.dev/editions/features/#json_format\n\t\tIsJSONCompliant bool\n\n\t\t// GenerateLegacyUnmarshalJSON determines if the plugin generates the\n\t\t// UnmarshalJSON([]byte) error method for enums.\n\t\tGenerateLegacyUnmarshalJSON bool\n\t\t// APILevel controls which API (Open, Hybrid or Opaque) should be used\n\t\t// for generated code (.pb.go files).\n\t\tAPILevel int\n\t}\n)\n\nfunc (fd *File) ParentFile() protoreflect.FileDescriptor { return fd }\nfunc (fd *File) Parent() protoreflect.Descriptor         { return nil }\nfunc (fd *File) Index() int                              { return 0 }\nfunc (fd *File) Syntax() protoreflect.Syntax             { return fd.L1.Syntax }\nfunc (fd *File) Name() protoreflect.Name                 { return fd.L1.Package.Name() }\nfunc (fd *File) FullName() protoreflect.FullName         { return fd.L1.Package }\nfunc (fd *File) IsPlaceholder() bool                     { return false }\nfunc (fd *File) Options() protoreflect.ProtoMessage {\n\tif f := fd.lazyInit().Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.File\n}\nfunc (fd *File) Path() string                                  { return fd.L1.Path }\nfunc (fd *File) Package() protoreflect.FullName                { return fd.L1.Package }\nfunc (fd *File) Imports() protoreflect.FileImports             { return &fd.lazyInit().Imports }\nfunc (fd *File) Enums() protoreflect.EnumDescriptors           { return &fd.L1.Enums }\nfunc (fd *File) Messages() protoreflect.MessageDescriptors     { return &fd.L1.Messages }\nfunc (fd *File) Extensions() protoreflect.ExtensionDescriptors { return &fd.L1.Extensions }\nfunc (fd *File) Services() protoreflect.ServiceDescriptors     { return &fd.L1.Services }\nfunc (fd *File) SourceLocations() protoreflect.SourceLocations { return &fd.lazyInit().Locations }\nfunc (fd *File) Format(s fmt.State, r rune)                    { descfmt.FormatDesc(s, r, fd) }\nfunc (fd *File) ProtoType(protoreflect.FileDescriptor)         {}\nfunc (fd *File) ProtoInternal(pragma.DoNotImplement)           {}\n\n// The next two are not part of the FileDescriptor interface. They are just used to reconstruct\n// the original FileDescriptor proto.\nfunc (fd *File) Edition() int32 { return int32(fd.L1.Edition) }\nfunc (fd *File) OptionImports() protoreflect.FileImports {\n\tif f := fd.lazyInit().OptionImports; f != nil {\n\t\treturn f()\n\t}\n\treturn emptyFiles\n}\n\nfunc (fd *File) lazyInit() *FileL2 {\n\tif atomic.LoadUint32(&fd.once) == 0 {\n\t\tfd.lazyInitOnce()\n\t}\n\treturn fd.L2\n}\n\nfunc (fd *File) lazyInitOnce() {\n\tfd.mu.Lock()\n\tif fd.L2 == nil {\n\t\tfd.lazyRawInit() // recursively initializes all L2 structures\n\t}\n\tatomic.StoreUint32(&fd.once, 1)\n\tfd.mu.Unlock()\n}\n\n// GoPackagePath is a pseudo-internal API for determining the Go package path\n// that this file descriptor is declared in.\n//\n// WARNING: This method is exempt from the compatibility promise and may be\n// removed in the future without warning.\nfunc (fd *File) GoPackagePath() string {\n\treturn fd.builder.GoPackagePath\n}\n\ntype (\n\tEnum struct {\n\t\tBase\n\t\tL1 EnumL1\n\t\tL2 *EnumL2 // protected by fileDesc.once\n\t}\n\tEnumL1 struct {\n\t\tEditionFeatures EditionFeatures\n\t\tVisibility      int32\n\t\teagerValues     bool // controls whether EnumL2.Values is already populated\n\t}\n\tEnumL2 struct {\n\t\tOptions        func() protoreflect.ProtoMessage\n\t\tValues         EnumValues\n\t\tReservedNames  Names\n\t\tReservedRanges EnumRanges\n\t}\n\n\tEnumValue struct {\n\t\tBase\n\t\tL1 EnumValueL1\n\t}\n\tEnumValueL1 struct {\n\t\tOptions func() protoreflect.ProtoMessage\n\t\tNumber  protoreflect.EnumNumber\n\t}\n)\n\nfunc (ed *Enum) Options() protoreflect.ProtoMessage {\n\tif f := ed.lazyInit().Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Enum\n}\nfunc (ed *Enum) Values() protoreflect.EnumValueDescriptors {\n\tif ed.L1.eagerValues {\n\t\treturn &ed.L2.Values\n\t}\n\treturn &ed.lazyInit().Values\n}\nfunc (ed *Enum) ReservedNames() protoreflect.Names       { return &ed.lazyInit().ReservedNames }\nfunc (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges }\nfunc (ed *Enum) Format(s fmt.State, r rune)              { descfmt.FormatDesc(s, r, ed) }\nfunc (ed *Enum) ProtoType(protoreflect.EnumDescriptor)   {}\n\n// This is not part of the EnumDescriptor interface. It is just used to reconstruct\n// the original FileDescriptor proto.\nfunc (ed *Enum) Visibility() int32 { return ed.L1.Visibility }\n\nfunc (ed *Enum) lazyInit() *EnumL2 {\n\ted.L0.ParentFile.lazyInit() // implicitly initializes L2\n\treturn ed.L2\n}\nfunc (ed *Enum) IsClosed() bool {\n\treturn !ed.L1.EditionFeatures.IsOpenEnum\n}\n\nfunc (ed *EnumValue) Options() protoreflect.ProtoMessage {\n\tif f := ed.L1.Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.EnumValue\n}\nfunc (ed *EnumValue) Number() protoreflect.EnumNumber            { return ed.L1.Number }\nfunc (ed *EnumValue) Format(s fmt.State, r rune)                 { descfmt.FormatDesc(s, r, ed) }\nfunc (ed *EnumValue) ProtoType(protoreflect.EnumValueDescriptor) {}\n\ntype (\n\tMessage struct {\n\t\tBase\n\t\tL1 MessageL1\n\t\tL2 *MessageL2 // protected by fileDesc.once\n\t}\n\tMessageL1 struct {\n\t\tEnums           Enums\n\t\tMessages        Messages\n\t\tExtensions      Extensions\n\t\tEditionFeatures EditionFeatures\n\t\tVisibility      int32\n\t\tIsMapEntry      bool // promoted from google.protobuf.MessageOptions\n\t\tIsMessageSet    bool // promoted from google.protobuf.MessageOptions\n\t}\n\tMessageL2 struct {\n\t\tOptions               func() protoreflect.ProtoMessage\n\t\tFields                Fields\n\t\tOneofs                Oneofs\n\t\tReservedNames         Names\n\t\tReservedRanges        FieldRanges\n\t\tRequiredNumbers       FieldNumbers // must be consistent with Fields.Cardinality\n\t\tExtensionRanges       FieldRanges\n\t\tExtensionRangeOptions []func() protoreflect.ProtoMessage // must be same length as ExtensionRanges\n\t}\n\n\tField struct {\n\t\tBase\n\t\tL1 FieldL1\n\t}\n\tFieldL1 struct {\n\t\tOptions          func() protoreflect.ProtoMessage\n\t\tNumber           protoreflect.FieldNumber\n\t\tCardinality      protoreflect.Cardinality // must be consistent with Message.RequiredNumbers\n\t\tKind             protoreflect.Kind\n\t\tStringName       stringName\n\t\tIsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto\n\t\tIsLazy           bool // promoted from google.protobuf.FieldOptions\n\t\tDefault          defaultValue\n\t\tContainingOneof  protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields\n\t\tEnum             protoreflect.EnumDescriptor\n\t\tMessage          protoreflect.MessageDescriptor\n\n\t\tEditionFeatures EditionFeatures\n\t}\n\n\tOneof struct {\n\t\tBase\n\t\tL1 OneofL1\n\t}\n\tOneofL1 struct {\n\t\tOptions func() protoreflect.ProtoMessage\n\t\tFields  OneofFields // must be consistent with Message.Fields.ContainingOneof\n\n\t\tEditionFeatures EditionFeatures\n\t}\n)\n\nfunc (md *Message) Options() protoreflect.ProtoMessage {\n\tif f := md.lazyInit().Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Message\n}\nfunc (md *Message) IsMapEntry() bool                           { return md.L1.IsMapEntry }\nfunc (md *Message) Fields() protoreflect.FieldDescriptors      { return &md.lazyInit().Fields }\nfunc (md *Message) Oneofs() protoreflect.OneofDescriptors      { return &md.lazyInit().Oneofs }\nfunc (md *Message) ReservedNames() protoreflect.Names          { return &md.lazyInit().ReservedNames }\nfunc (md *Message) ReservedRanges() protoreflect.FieldRanges   { return &md.lazyInit().ReservedRanges }\nfunc (md *Message) RequiredNumbers() protoreflect.FieldNumbers { return &md.lazyInit().RequiredNumbers }\nfunc (md *Message) ExtensionRanges() protoreflect.FieldRanges  { return &md.lazyInit().ExtensionRanges }\nfunc (md *Message) ExtensionRangeOptions(i int) protoreflect.ProtoMessage {\n\tif f := md.lazyInit().ExtensionRangeOptions[i]; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.ExtensionRange\n}\nfunc (md *Message) Enums() protoreflect.EnumDescriptors           { return &md.L1.Enums }\nfunc (md *Message) Messages() protoreflect.MessageDescriptors     { return &md.L1.Messages }\nfunc (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions }\nfunc (md *Message) ProtoType(protoreflect.MessageDescriptor)      {}\nfunc (md *Message) Format(s fmt.State, r rune)                    { descfmt.FormatDesc(s, r, md) }\n\n// This is not part of the MessageDescriptor interface. It is just used to reconstruct\n// the original FileDescriptor proto.\nfunc (md *Message) Visibility() int32 { return md.L1.Visibility }\n\nfunc (md *Message) lazyInit() *MessageL2 {\n\tmd.L0.ParentFile.lazyInit() // implicitly initializes L2\n\treturn md.L2\n}\n\n// IsMessageSet is a pseudo-internal API for checking whether a message\n// should serialize in the proto1 message format.\n//\n// WARNING: This method is exempt from the compatibility promise and may be\n// removed in the future without warning.\nfunc (md *Message) IsMessageSet() bool {\n\treturn md.L1.IsMessageSet\n}\n\nfunc (fd *Field) Options() protoreflect.ProtoMessage {\n\tif f := fd.L1.Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Field\n}\nfunc (fd *Field) Number() protoreflect.FieldNumber      { return fd.L1.Number }\nfunc (fd *Field) Cardinality() protoreflect.Cardinality { return fd.L1.Cardinality }\nfunc (fd *Field) Kind() protoreflect.Kind {\n\treturn fd.L1.Kind\n}\nfunc (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON }\nfunc (fd *Field) JSONName() string  { return fd.L1.StringName.getJSON(fd) }\nfunc (fd *Field) TextName() string  { return fd.L1.StringName.getText(fd) }\nfunc (fd *Field) HasPresence() bool {\n\tif fd.L1.Cardinality == protoreflect.Repeated {\n\t\treturn false\n\t}\n\treturn fd.IsExtension() || fd.L1.EditionFeatures.IsFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil\n}\nfunc (fd *Field) HasOptionalKeyword() bool {\n\treturn (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional\n}\nfunc (fd *Field) IsPacked() bool {\n\tif fd.L1.Cardinality != protoreflect.Repeated {\n\t\treturn false\n\t}\n\tswitch fd.L1.Kind {\n\tcase protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn false\n\t}\n\treturn fd.L1.EditionFeatures.IsPacked\n}\nfunc (fd *Field) IsExtension() bool { return false }\nfunc (fd *Field) IsWeak() bool      { return false }\nfunc (fd *Field) IsLazy() bool      { return fd.L1.IsLazy }\nfunc (fd *Field) IsList() bool      { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() }\nfunc (fd *Field) IsMap() bool       { return fd.Message() != nil && fd.Message().IsMapEntry() }\nfunc (fd *Field) MapKey() protoreflect.FieldDescriptor {\n\tif !fd.IsMap() {\n\t\treturn nil\n\t}\n\treturn fd.Message().Fields().ByNumber(genid.MapEntry_Key_field_number)\n}\nfunc (fd *Field) MapValue() protoreflect.FieldDescriptor {\n\tif !fd.IsMap() {\n\t\treturn nil\n\t}\n\treturn fd.Message().Fields().ByNumber(genid.MapEntry_Value_field_number)\n}\nfunc (fd *Field) HasDefault() bool                                   { return fd.L1.Default.has }\nfunc (fd *Field) Default() protoreflect.Value                        { return fd.L1.Default.get(fd) }\nfunc (fd *Field) DefaultEnumValue() protoreflect.EnumValueDescriptor { return fd.L1.Default.enum }\nfunc (fd *Field) ContainingOneof() protoreflect.OneofDescriptor      { return fd.L1.ContainingOneof }\nfunc (fd *Field) ContainingMessage() protoreflect.MessageDescriptor {\n\treturn fd.L0.Parent.(protoreflect.MessageDescriptor)\n}\nfunc (fd *Field) Enum() protoreflect.EnumDescriptor {\n\treturn fd.L1.Enum\n}\nfunc (fd *Field) Message() protoreflect.MessageDescriptor {\n\treturn fd.L1.Message\n}\nfunc (fd *Field) IsMapEntry() bool {\n\tparent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor)\n\treturn ok && parent.IsMapEntry()\n}\nfunc (fd *Field) Format(s fmt.State, r rune)             { descfmt.FormatDesc(s, r, fd) }\nfunc (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}\n\n// EnforceUTF8 is a pseudo-internal API to determine whether to enforce UTF-8\n// validation for the string field. This exists for Google-internal use only\n// since proto3 did not enforce UTF-8 validity prior to the open-source release.\n// If this method does not exist, the default is to enforce valid UTF-8.\n//\n// WARNING: This method is exempt from the compatibility promise and may be\n// removed in the future without warning.\nfunc (fd *Field) EnforceUTF8() bool {\n\treturn fd.L1.EditionFeatures.IsUTF8Validated\n}\n\nfunc (od *Oneof) IsSynthetic() bool {\n\treturn od.L0.ParentFile.L1.Syntax == protoreflect.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword()\n}\nfunc (od *Oneof) Options() protoreflect.ProtoMessage {\n\tif f := od.L1.Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Oneof\n}\nfunc (od *Oneof) Fields() protoreflect.FieldDescriptors  { return &od.L1.Fields }\nfunc (od *Oneof) Format(s fmt.State, r rune)             { descfmt.FormatDesc(s, r, od) }\nfunc (od *Oneof) ProtoType(protoreflect.OneofDescriptor) {}\n\ntype (\n\tExtension struct {\n\t\tBase\n\t\tL1 ExtensionL1\n\t\tL2 *ExtensionL2 // protected by fileDesc.once\n\t}\n\tExtensionL1 struct {\n\t\tNumber          protoreflect.FieldNumber\n\t\tExtendee        protoreflect.MessageDescriptor\n\t\tCardinality     protoreflect.Cardinality\n\t\tKind            protoreflect.Kind\n\t\tIsLazy          bool\n\t\tEditionFeatures EditionFeatures\n\t}\n\tExtensionL2 struct {\n\t\tOptions          func() protoreflect.ProtoMessage\n\t\tStringName       stringName\n\t\tIsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto\n\t\tDefault          defaultValue\n\t\tEnum             protoreflect.EnumDescriptor\n\t\tMessage          protoreflect.MessageDescriptor\n\t}\n)\n\nfunc (xd *Extension) Options() protoreflect.ProtoMessage {\n\tif f := xd.lazyInit().Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Field\n}\nfunc (xd *Extension) Number() protoreflect.FieldNumber      { return xd.L1.Number }\nfunc (xd *Extension) Cardinality() protoreflect.Cardinality { return xd.L1.Cardinality }\nfunc (xd *Extension) Kind() protoreflect.Kind               { return xd.L1.Kind }\nfunc (xd *Extension) HasJSONName() bool                     { return xd.lazyInit().StringName.hasJSON }\nfunc (xd *Extension) JSONName() string                      { return xd.lazyInit().StringName.getJSON(xd) }\nfunc (xd *Extension) TextName() string                      { return xd.lazyInit().StringName.getText(xd) }\nfunc (xd *Extension) HasPresence() bool                     { return xd.L1.Cardinality != protoreflect.Repeated }\nfunc (xd *Extension) HasOptionalKeyword() bool {\n\treturn (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional\n}\nfunc (xd *Extension) IsPacked() bool {\n\tif xd.L1.Cardinality != protoreflect.Repeated {\n\t\treturn false\n\t}\n\tswitch xd.L1.Kind {\n\tcase protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn false\n\t}\n\treturn xd.L1.EditionFeatures.IsPacked\n}\nfunc (xd *Extension) IsExtension() bool                      { return true }\nfunc (xd *Extension) IsWeak() bool                           { return false }\nfunc (xd *Extension) IsLazy() bool                           { return xd.L1.IsLazy }\nfunc (xd *Extension) IsList() bool                           { return xd.Cardinality() == protoreflect.Repeated }\nfunc (xd *Extension) IsMap() bool                            { return false }\nfunc (xd *Extension) MapKey() protoreflect.FieldDescriptor   { return nil }\nfunc (xd *Extension) MapValue() protoreflect.FieldDescriptor { return nil }\nfunc (xd *Extension) HasDefault() bool                       { return xd.lazyInit().Default.has }\nfunc (xd *Extension) Default() protoreflect.Value            { return xd.lazyInit().Default.get(xd) }\nfunc (xd *Extension) DefaultEnumValue() protoreflect.EnumValueDescriptor {\n\treturn xd.lazyInit().Default.enum\n}\nfunc (xd *Extension) ContainingOneof() protoreflect.OneofDescriptor     { return nil }\nfunc (xd *Extension) ContainingMessage() protoreflect.MessageDescriptor { return xd.L1.Extendee }\nfunc (xd *Extension) Enum() protoreflect.EnumDescriptor                 { return xd.lazyInit().Enum }\nfunc (xd *Extension) Message() protoreflect.MessageDescriptor           { return xd.lazyInit().Message }\nfunc (xd *Extension) Format(s fmt.State, r rune)                        { descfmt.FormatDesc(s, r, xd) }\nfunc (xd *Extension) ProtoType(protoreflect.FieldDescriptor)            {}\nfunc (xd *Extension) ProtoInternal(pragma.DoNotImplement)               {}\nfunc (xd *Extension) lazyInit() *ExtensionL2 {\n\txd.L0.ParentFile.lazyInit() // implicitly initializes L2\n\treturn xd.L2\n}\n\ntype (\n\tService struct {\n\t\tBase\n\t\tL1 ServiceL1\n\t\tL2 *ServiceL2 // protected by fileDesc.once\n\t}\n\tServiceL1 struct{}\n\tServiceL2 struct {\n\t\tOptions func() protoreflect.ProtoMessage\n\t\tMethods Methods\n\t}\n\n\tMethod struct {\n\t\tBase\n\t\tL1 MethodL1\n\t}\n\tMethodL1 struct {\n\t\tOptions           func() protoreflect.ProtoMessage\n\t\tInput             protoreflect.MessageDescriptor\n\t\tOutput            protoreflect.MessageDescriptor\n\t\tIsStreamingClient bool\n\t\tIsStreamingServer bool\n\t}\n)\n\nfunc (sd *Service) Options() protoreflect.ProtoMessage {\n\tif f := sd.lazyInit().Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Service\n}\nfunc (sd *Service) Methods() protoreflect.MethodDescriptors  { return &sd.lazyInit().Methods }\nfunc (sd *Service) Format(s fmt.State, r rune)               { descfmt.FormatDesc(s, r, sd) }\nfunc (sd *Service) ProtoType(protoreflect.ServiceDescriptor) {}\nfunc (sd *Service) ProtoInternal(pragma.DoNotImplement)      {}\nfunc (sd *Service) lazyInit() *ServiceL2 {\n\tsd.L0.ParentFile.lazyInit() // implicitly initializes L2\n\treturn sd.L2\n}\n\nfunc (md *Method) Options() protoreflect.ProtoMessage {\n\tif f := md.L1.Options; f != nil {\n\t\treturn f()\n\t}\n\treturn descopts.Method\n}\nfunc (md *Method) Input() protoreflect.MessageDescriptor   { return md.L1.Input }\nfunc (md *Method) Output() protoreflect.MessageDescriptor  { return md.L1.Output }\nfunc (md *Method) IsStreamingClient() bool                 { return md.L1.IsStreamingClient }\nfunc (md *Method) IsStreamingServer() bool                 { return md.L1.IsStreamingServer }\nfunc (md *Method) Format(s fmt.State, r rune)              { descfmt.FormatDesc(s, r, md) }\nfunc (md *Method) ProtoType(protoreflect.MethodDescriptor) {}\nfunc (md *Method) ProtoInternal(pragma.DoNotImplement)     {}\n\n// Surrogate files are can be used to create standalone descriptors\n// where the syntax is only information derived from the parent file.\nvar (\n\tSurrogateProto2      = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}}\n\tSurrogateProto3      = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}}\n\tSurrogateEdition2023 = &File{L1: FileL1{Syntax: protoreflect.Editions, Edition: Edition2023}, L2: &FileL2{}}\n)\n\ntype (\n\tBase struct {\n\t\tL0 BaseL0\n\t}\n\tBaseL0 struct {\n\t\tFullName   protoreflect.FullName // must be populated\n\t\tParentFile *File                 // must be populated\n\t\tParent     protoreflect.Descriptor\n\t\tIndex      int\n\t}\n)\n\nfunc (d *Base) Name() protoreflect.Name         { return d.L0.FullName.Name() }\nfunc (d *Base) FullName() protoreflect.FullName { return d.L0.FullName }\nfunc (d *Base) ParentFile() protoreflect.FileDescriptor {\n\tif d.L0.ParentFile == SurrogateProto2 || d.L0.ParentFile == SurrogateProto3 {\n\t\treturn nil // surrogate files are not real parents\n\t}\n\treturn d.L0.ParentFile\n}\nfunc (d *Base) Parent() protoreflect.Descriptor     { return d.L0.Parent }\nfunc (d *Base) Index() int                          { return d.L0.Index }\nfunc (d *Base) Syntax() protoreflect.Syntax         { return d.L0.ParentFile.Syntax() }\nfunc (d *Base) IsPlaceholder() bool                 { return false }\nfunc (d *Base) ProtoInternal(pragma.DoNotImplement) {}\n\ntype stringName struct {\n\thasJSON  bool\n\tonce     sync.Once\n\tnameJSON string\n\tnameText string\n}\n\n// InitJSON initializes the name. It is exported for use by other internal packages.\nfunc (s *stringName) InitJSON(name string) {\n\ts.hasJSON = true\n\ts.nameJSON = name\n}\n\n// Returns true if this field is structured like the synthetic field of a proto2\n// group. This allows us to expand our treatment of delimited fields without\n// breaking proto2 files that have been upgraded to editions.\nfunc isGroupLike(fd protoreflect.FieldDescriptor) bool {\n\t// Groups are always group types.\n\tif fd.Kind() != protoreflect.GroupKind {\n\t\treturn false\n\t}\n\n\t// Group fields are always the lowercase type name.\n\tif strings.ToLower(string(fd.Message().Name())) != string(fd.Name()) {\n\t\treturn false\n\t}\n\n\t// Groups could only be defined in the same file they're used.\n\tif fd.Message().ParentFile() != fd.ParentFile() {\n\t\treturn false\n\t}\n\n\t// Group messages are always defined in the same scope as the field.  File\n\t// level extensions will compare NULL == NULL here, which is why the file\n\t// comparison above is necessary to ensure both come from the same file.\n\tif fd.IsExtension() {\n\t\treturn fd.Parent() == fd.Message().Parent()\n\t}\n\treturn fd.ContainingMessage() == fd.Message().Parent()\n}\n\nfunc (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName {\n\ts.once.Do(func() {\n\t\tif fd.IsExtension() {\n\t\t\t// For extensions, JSON and text are formatted the same way.\n\t\t\tvar name string\n\t\t\tif messageset.IsMessageSetExtension(fd) {\n\t\t\t\tname = string(\"[\" + fd.FullName().Parent() + \"]\")\n\t\t\t} else {\n\t\t\t\tname = string(\"[\" + fd.FullName() + \"]\")\n\t\t\t}\n\t\t\ts.nameJSON = name\n\t\t\ts.nameText = name\n\t\t} else {\n\t\t\t// Format the JSON name.\n\t\t\tif !s.hasJSON {\n\t\t\t\ts.nameJSON = strs.JSONCamelCase(string(fd.Name()))\n\t\t\t}\n\n\t\t\t// Format the text name.\n\t\t\ts.nameText = string(fd.Name())\n\t\t\tif isGroupLike(fd) {\n\t\t\t\ts.nameText = string(fd.Message().Name())\n\t\t\t}\n\t\t}\n\t})\n\treturn s\n}\n\nfunc (s *stringName) getJSON(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameJSON }\nfunc (s *stringName) getText(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameText }\n\nfunc DefaultValue(v protoreflect.Value, ev protoreflect.EnumValueDescriptor) defaultValue {\n\tdv := defaultValue{has: v.IsValid(), val: v, enum: ev}\n\tif b, ok := v.Interface().([]byte); ok {\n\t\t// Store a copy of the default bytes, so that we can detect\n\t\t// accidental mutations of the original value.\n\t\tdv.bytes = append([]byte(nil), b...)\n\t}\n\treturn dv\n}\n\nfunc unmarshalDefault(b []byte, k protoreflect.Kind, pf *File, ed protoreflect.EnumDescriptor) defaultValue {\n\tvar evs protoreflect.EnumValueDescriptors\n\tif k == protoreflect.EnumKind {\n\t\t// If the enum is declared within the same file, be careful not to\n\t\t// blindly call the Values method, lest we bind ourselves in a deadlock.\n\t\tif e, ok := ed.(*Enum); ok && e.L0.ParentFile == pf {\n\t\t\tevs = &e.L2.Values\n\t\t} else {\n\t\t\tevs = ed.Values()\n\t\t}\n\n\t\t// If we are unable to resolve the enum dependency, use a placeholder\n\t\t// enum value since we will not be able to parse the default value.\n\t\tif ed.IsPlaceholder() && protoreflect.Name(b).IsValid() {\n\t\t\tv := protoreflect.ValueOfEnum(0)\n\t\t\tev := PlaceholderEnumValue(ed.FullName().Parent().Append(protoreflect.Name(b)))\n\t\t\treturn DefaultValue(v, ev)\n\t\t}\n\t}\n\n\tv, ev, err := defval.Unmarshal(string(b), k, evs, defval.Descriptor)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn DefaultValue(v, ev)\n}\n\ntype defaultValue struct {\n\thas   bool\n\tval   protoreflect.Value\n\tenum  protoreflect.EnumValueDescriptor\n\tbytes []byte\n}\n\nfunc (dv *defaultValue) get(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\t// Return the zero value as the default if unpopulated.\n\tif !dv.has {\n\t\tif fd.Cardinality() == protoreflect.Repeated {\n\t\t\treturn protoreflect.Value{}\n\t\t}\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\treturn protoreflect.ValueOfBool(false)\n\t\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\t\treturn protoreflect.ValueOfInt32(0)\n\t\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\t\treturn protoreflect.ValueOfInt64(0)\n\t\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\t\treturn protoreflect.ValueOfUint32(0)\n\t\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\t\treturn protoreflect.ValueOfUint64(0)\n\t\tcase protoreflect.FloatKind:\n\t\t\treturn protoreflect.ValueOfFloat32(0)\n\t\tcase protoreflect.DoubleKind:\n\t\t\treturn protoreflect.ValueOfFloat64(0)\n\t\tcase protoreflect.StringKind:\n\t\t\treturn protoreflect.ValueOfString(\"\")\n\t\tcase protoreflect.BytesKind:\n\t\t\treturn protoreflect.ValueOfBytes(nil)\n\t\tcase protoreflect.EnumKind:\n\t\t\tif evs := fd.Enum().Values(); evs.Len() > 0 {\n\t\t\t\treturn protoreflect.ValueOfEnum(evs.Get(0).Number())\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfEnum(0)\n\t\t}\n\t}\n\n\tif len(dv.bytes) > 0 && !bytes.Equal(dv.bytes, dv.val.Bytes()) {\n\t\t// TODO: Avoid panic if we're running with the race detector\n\t\t// and instead spawn a goroutine that periodically resets\n\t\t// this value back to the original to induce a race.\n\t\tpanic(fmt.Sprintf(\"detected mutation on the default bytes for %v\", fd.FullName()))\n\t}\n\treturn dv.val\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// fileRaw is a data struct used when initializing a file descriptor from\n// a raw FileDescriptorProto.\ntype fileRaw struct {\n\tbuilder       Builder\n\tallEnums      []Enum\n\tallMessages   []Message\n\tallExtensions []Extension\n\tallServices   []Service\n}\n\nfunc newRawFile(db Builder) *File {\n\tfd := &File{fileRaw: fileRaw{builder: db}}\n\tfd.initDecls(db.NumEnums, db.NumMessages, db.NumExtensions, db.NumServices)\n\tfd.unmarshalSeed(db.RawDescriptor)\n\n\t// Extended message targets are eagerly resolved since registration\n\t// needs this information at program init time.\n\tfor i := range fd.allExtensions {\n\t\txd := &fd.allExtensions[i]\n\t\txd.L1.Extendee = fd.resolveMessageDependency(xd.L1.Extendee, listExtTargets, int32(i))\n\t}\n\n\tfd.checkDecls()\n\treturn fd\n}\n\n// initDecls pre-allocates slices for the exact number of enums, messages\n// (including map entries), extensions, and services declared in the proto file.\n// This is done to avoid regrowing the slice, which would change the address\n// for any previously seen declaration.\n//\n// The alloc methods \"allocates\" slices by pulling from the capacity.\nfunc (fd *File) initDecls(numEnums, numMessages, numExtensions, numServices int32) {\n\tfd.allEnums = make([]Enum, 0, numEnums)\n\tfd.allMessages = make([]Message, 0, numMessages)\n\tfd.allExtensions = make([]Extension, 0, numExtensions)\n\tfd.allServices = make([]Service, 0, numServices)\n}\n\nfunc (fd *File) allocEnums(n int) []Enum {\n\ttotal := len(fd.allEnums)\n\tes := fd.allEnums[total : total+n]\n\tfd.allEnums = fd.allEnums[:total+n]\n\treturn es\n}\nfunc (fd *File) allocMessages(n int) []Message {\n\ttotal := len(fd.allMessages)\n\tms := fd.allMessages[total : total+n]\n\tfd.allMessages = fd.allMessages[:total+n]\n\treturn ms\n}\nfunc (fd *File) allocExtensions(n int) []Extension {\n\ttotal := len(fd.allExtensions)\n\txs := fd.allExtensions[total : total+n]\n\tfd.allExtensions = fd.allExtensions[:total+n]\n\treturn xs\n}\nfunc (fd *File) allocServices(n int) []Service {\n\ttotal := len(fd.allServices)\n\txs := fd.allServices[total : total+n]\n\tfd.allServices = fd.allServices[:total+n]\n\treturn xs\n}\n\n// checkDecls performs a sanity check that the expected number of expected\n// declarations matches the number that were found in the descriptor proto.\nfunc (fd *File) checkDecls() {\n\tswitch {\n\tcase len(fd.allEnums) != cap(fd.allEnums):\n\tcase len(fd.allMessages) != cap(fd.allMessages):\n\tcase len(fd.allExtensions) != cap(fd.allExtensions):\n\tcase len(fd.allServices) != cap(fd.allServices):\n\tdefault:\n\t\treturn\n\t}\n\tpanic(\"mismatching cardinality\")\n}\n\nfunc (fd *File) unmarshalSeed(b []byte) {\n\tsb := getBuilder()\n\tdefer putBuilder(sb)\n\n\tvar prevField protoreflect.FieldNumber\n\tvar numEnums, numMessages, numExtensions, numServices int\n\tvar posEnums, posMessages, posExtensions, posServices int\n\tvar options []byte\n\tb0 := b\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FileDescriptorProto_Syntax_field_number:\n\t\t\t\tswitch string(v) {\n\t\t\t\tcase \"proto2\":\n\t\t\t\t\tfd.L1.Syntax = protoreflect.Proto2\n\t\t\t\t\tfd.L1.Edition = EditionProto2\n\t\t\t\tcase \"proto3\":\n\t\t\t\t\tfd.L1.Syntax = protoreflect.Proto3\n\t\t\t\t\tfd.L1.Edition = EditionProto3\n\t\t\t\tcase \"editions\":\n\t\t\t\t\tfd.L1.Syntax = protoreflect.Editions\n\t\t\t\tdefault:\n\t\t\t\t\tpanic(\"invalid syntax\")\n\t\t\t\t}\n\t\t\tcase genid.FileDescriptorProto_Name_field_number:\n\t\t\t\tfd.L1.Path = sb.MakeString(v)\n\t\t\tcase genid.FileDescriptorProto_Package_field_number:\n\t\t\t\tfd.L1.Package = protoreflect.FullName(sb.MakeString(v))\n\t\t\tcase genid.FileDescriptorProto_Options_field_number:\n\t\t\t\toptions = v\n\t\t\tcase genid.FileDescriptorProto_EnumType_field_number:\n\t\t\t\tif prevField != genid.FileDescriptorProto_EnumType_field_number {\n\t\t\t\t\tif numEnums > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposEnums = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumEnums++\n\t\t\tcase genid.FileDescriptorProto_MessageType_field_number:\n\t\t\t\tif prevField != genid.FileDescriptorProto_MessageType_field_number {\n\t\t\t\t\tif numMessages > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposMessages = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumMessages++\n\t\t\tcase genid.FileDescriptorProto_Extension_field_number:\n\t\t\t\tif prevField != genid.FileDescriptorProto_Extension_field_number {\n\t\t\t\t\tif numExtensions > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposExtensions = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumExtensions++\n\t\t\tcase genid.FileDescriptorProto_Service_field_number:\n\t\t\t\tif prevField != genid.FileDescriptorProto_Service_field_number {\n\t\t\t\t\tif numServices > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposServices = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumServices++\n\t\t\t}\n\t\t\tprevField = num\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FileDescriptorProto_Edition_field_number:\n\t\t\t\tfd.L1.Edition = Edition(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t\tprevField = -1 // ignore known field numbers of unknown wire type\n\t\t}\n\t}\n\n\t// If syntax is missing, it is assumed to be proto2.\n\tif fd.L1.Syntax == 0 {\n\t\tfd.L1.Syntax = protoreflect.Proto2\n\t\tfd.L1.Edition = EditionProto2\n\t}\n\n\tfd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition)\n\n\t// Parse editions features from options if any\n\tif options != nil {\n\t\tfd.unmarshalSeedOptions(options)\n\t}\n\n\t// Must allocate all declarations before parsing each descriptor type\n\t// to ensure we handled all descriptors in \"flattened ordering\".\n\tif numEnums > 0 {\n\t\tfd.L1.Enums.List = fd.allocEnums(numEnums)\n\t}\n\tif numMessages > 0 {\n\t\tfd.L1.Messages.List = fd.allocMessages(numMessages)\n\t}\n\tif numExtensions > 0 {\n\t\tfd.L1.Extensions.List = fd.allocExtensions(numExtensions)\n\t}\n\tif numServices > 0 {\n\t\tfd.L1.Services.List = fd.allocServices(numServices)\n\t}\n\n\tif numEnums > 0 {\n\t\tb := b0[posEnums:]\n\t\tfor i := range fd.L1.Enums.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tfd.L1.Enums.List[i].unmarshalSeed(v, sb, fd, fd, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n\tif numMessages > 0 {\n\t\tb := b0[posMessages:]\n\t\tfor i := range fd.L1.Messages.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tfd.L1.Messages.List[i].unmarshalSeed(v, sb, fd, fd, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n\tif numExtensions > 0 {\n\t\tb := b0[posExtensions:]\n\t\tfor i := range fd.L1.Extensions.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tfd.L1.Extensions.List[i].unmarshalSeed(v, sb, fd, fd, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n\tif numServices > 0 {\n\t\tb := b0[posServices:]\n\t\tfor i := range fd.L1.Services.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tfd.L1.Services.List[i].unmarshalSeed(v, sb, fd, fd, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n}\n\nfunc (fd *File) unmarshalSeedOptions(b []byte) {\n\tfor b := b; len(b) > 0; {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FileOptions_Features_field_number:\n\t\t\t\tif fd.Syntax() != protoreflect.Editions {\n\t\t\t\t\tpanic(fmt.Sprintf(\"invalid descriptor: using edition features in a proto with syntax %s\", fd.Syntax()))\n\t\t\t\t}\n\t\t\t\tfd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nfunc (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\ted.L0.ParentFile = pf\n\ted.L0.Parent = pd\n\ted.L0.Index = i\n\ted.L1.EditionFeatures = featuresFromParentDesc(ed.Parent())\n\n\tvar numValues int\n\tfor b := b; len(b) > 0; {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumDescriptorProto_Name_field_number:\n\t\t\t\ted.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.EnumDescriptorProto_Value_field_number:\n\t\t\t\tnumValues++\n\t\t\t}\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumDescriptorProto_Visibility_field_number:\n\t\t\t\ted.L1.Visibility = int32(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\n\t// Only construct enum value descriptors for top-level enums since\n\t// they are needed for registration.\n\tif pd != pf {\n\t\treturn\n\t}\n\ted.L1.eagerValues = true\n\ted.L2 = new(EnumL2)\n\ted.L2.Values.List = make([]EnumValue, numValues)\n\tfor i := 0; len(b) > 0; {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumDescriptorProto_Value_field_number:\n\t\t\t\ted.L2.Values.List[i].unmarshalFull(v, sb, pf, ed, i)\n\t\t\t\ti++\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nfunc (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tmd.L0.ParentFile = pf\n\tmd.L0.Parent = pd\n\tmd.L0.Index = i\n\tmd.L1.EditionFeatures = featuresFromParentDesc(md.Parent())\n\n\tvar prevField protoreflect.FieldNumber\n\tvar numEnums, numMessages, numExtensions int\n\tvar posEnums, posMessages, posExtensions int\n\tb0 := b\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_Name_field_number:\n\t\t\t\tmd.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.DescriptorProto_EnumType_field_number:\n\t\t\t\tif prevField != genid.DescriptorProto_EnumType_field_number {\n\t\t\t\t\tif numEnums > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposEnums = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumEnums++\n\t\t\tcase genid.DescriptorProto_NestedType_field_number:\n\t\t\t\tif prevField != genid.DescriptorProto_NestedType_field_number {\n\t\t\t\t\tif numMessages > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposMessages = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumMessages++\n\t\t\tcase genid.DescriptorProto_Extension_field_number:\n\t\t\t\tif prevField != genid.DescriptorProto_Extension_field_number {\n\t\t\t\t\tif numExtensions > 0 {\n\t\t\t\t\t\tpanic(\"non-contiguous repeated field\")\n\t\t\t\t\t}\n\t\t\t\t\tposExtensions = len(b0) - len(b) - n - m\n\t\t\t\t}\n\t\t\t\tnumExtensions++\n\t\t\tcase genid.DescriptorProto_Options_field_number:\n\t\t\t\tmd.unmarshalSeedOptions(v)\n\t\t\t}\n\t\t\tprevField = num\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_Visibility_field_number:\n\t\t\t\tmd.L1.Visibility = int32(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t\tprevField = -1 // ignore known field numbers of unknown wire type\n\t\t}\n\t}\n\n\t// Must allocate all declarations before parsing each descriptor type\n\t// to ensure we handled all descriptors in \"flattened ordering\".\n\tif numEnums > 0 {\n\t\tmd.L1.Enums.List = pf.allocEnums(numEnums)\n\t}\n\tif numMessages > 0 {\n\t\tmd.L1.Messages.List = pf.allocMessages(numMessages)\n\t}\n\tif numExtensions > 0 {\n\t\tmd.L1.Extensions.List = pf.allocExtensions(numExtensions)\n\t}\n\n\tif numEnums > 0 {\n\t\tb := b0[posEnums:]\n\t\tfor i := range md.L1.Enums.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tmd.L1.Enums.List[i].unmarshalSeed(v, sb, pf, md, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n\tif numMessages > 0 {\n\t\tb := b0[posMessages:]\n\t\tfor i := range md.L1.Messages.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tmd.L1.Messages.List[i].unmarshalSeed(v, sb, pf, md, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n\tif numExtensions > 0 {\n\t\tb := b0[posExtensions:]\n\t\tfor i := range md.L1.Extensions.List {\n\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\tv, m := protowire.ConsumeBytes(b[n:])\n\t\t\tmd.L1.Extensions.List[i].unmarshalSeed(v, sb, pf, md, i)\n\t\t\tb = b[n+m:]\n\t\t}\n\t}\n}\n\nfunc (md *Message) unmarshalSeedOptions(b []byte) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.MessageOptions_MapEntry_field_number:\n\t\t\t\tmd.L1.IsMapEntry = protowire.DecodeBool(v)\n\t\t\tcase genid.MessageOptions_MessageSetWireFormat_field_number:\n\t\t\t\tmd.L1.IsMessageSet = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.MessageOptions_Features_field_number:\n\t\t\t\tmd.L1.EditionFeatures = unmarshalFeatureSet(v, md.L1.EditionFeatures)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nfunc (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\txd.L0.ParentFile = pf\n\txd.L0.Parent = pd\n\txd.L0.Index = i\n\txd.L1.EditionFeatures = featuresFromParentDesc(pd)\n\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_Number_field_number:\n\t\t\t\txd.L1.Number = protoreflect.FieldNumber(v)\n\t\t\tcase genid.FieldDescriptorProto_Label_field_number:\n\t\t\t\txd.L1.Cardinality = protoreflect.Cardinality(v)\n\t\t\tcase genid.FieldDescriptorProto_Type_field_number:\n\t\t\t\txd.L1.Kind = protoreflect.Kind(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_Name_field_number:\n\t\t\t\txd.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.FieldDescriptorProto_Extendee_field_number:\n\t\t\t\txd.L1.Extendee = PlaceholderMessage(makeFullName(sb, v))\n\t\t\tcase genid.FieldDescriptorProto_Options_field_number:\n\t\t\t\txd.unmarshalOptions(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\n\tif xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded {\n\t\txd.L1.Kind = protoreflect.GroupKind\n\t}\n}\n\nfunc (xd *Extension) unmarshalOptions(b []byte) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldOptions_Packed_field_number:\n\t\t\t\txd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v)\n\t\t\tcase genid.FieldOptions_Lazy_field_number:\n\t\t\t\txd.L1.IsLazy = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldOptions_Features_field_number:\n\t\t\t\txd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nfunc (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tsd.L0.ParentFile = pf\n\tsd.L0.Parent = pd\n\tsd.L0.Index = i\n\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.ServiceDescriptorProto_Name_field_number:\n\t\t\t\tsd.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nvar nameBuilderPool = sync.Pool{\n\tNew: func() any { return new(strs.Builder) },\n}\n\nfunc getBuilder() *strs.Builder {\n\treturn nameBuilderPool.Get().(*strs.Builder)\n}\nfunc putBuilder(b *strs.Builder) {\n\tnameBuilderPool.Put(b)\n}\n\n// makeFullName converts b to a protoreflect.FullName,\n// where b must start with a leading dot.\nfunc makeFullName(sb *strs.Builder, b []byte) protoreflect.FullName {\n\tif len(b) == 0 || b[0] != '.' {\n\t\tpanic(\"name reference must be fully qualified\")\n\t}\n\treturn protoreflect.FullName(sb.MakeString(b[1:]))\n}\n\nfunc appendFullName(sb *strs.Builder, prefix protoreflect.FullName, suffix []byte) protoreflect.FullName {\n\treturn sb.AppendFullName(prefix, protoreflect.Name(strs.UnsafeString(suffix)))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"reflect\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/descopts\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc (fd *File) lazyRawInit() {\n\tfd.unmarshalFull(fd.builder.RawDescriptor)\n\tfd.resolveMessages()\n\tfd.resolveExtensions()\n\tfd.resolveServices()\n}\n\nfunc (file *File) resolveMessages() {\n\tvar depIdx int32\n\tfor i := range file.allMessages {\n\t\tmd := &file.allMessages[i]\n\n\t\t// Resolve message field dependencies.\n\t\tfor j := range md.L2.Fields.List {\n\t\t\tfd := &md.L2.Fields.List[j]\n\n\t\t\t// Resolve message field dependency.\n\t\t\tswitch fd.L1.Kind {\n\t\t\tcase protoreflect.EnumKind:\n\t\t\t\tfd.L1.Enum = file.resolveEnumDependency(fd.L1.Enum, listFieldDeps, depIdx)\n\t\t\t\tdepIdx++\n\t\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\t\tfd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)\n\t\t\t\tdepIdx++\n\t\t\t\tif fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) {\n\t\t\t\t\t// A map field might inherit delimited encoding from a file-wide default feature.\n\t\t\t\t\t// But maps never actually use delimited encoding. (At least for now...)\n\t\t\t\t\tfd.L1.Kind = protoreflect.MessageKind\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Default is resolved here since it depends on Enum being resolved.\n\t\t\tif v := fd.L1.Default.val; v.IsValid() {\n\t\t\t\tfd.L1.Default = unmarshalDefault(v.Bytes(), fd.L1.Kind, file, fd.L1.Enum)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (file *File) resolveExtensions() {\n\tvar depIdx int32\n\tfor i := range file.allExtensions {\n\t\txd := &file.allExtensions[i]\n\n\t\t// Resolve extension field dependency.\n\t\tswitch xd.L1.Kind {\n\t\tcase protoreflect.EnumKind:\n\t\t\txd.L2.Enum = file.resolveEnumDependency(xd.L2.Enum, listExtDeps, depIdx)\n\t\t\tdepIdx++\n\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\txd.L2.Message = file.resolveMessageDependency(xd.L2.Message, listExtDeps, depIdx)\n\t\t\tdepIdx++\n\t\t}\n\n\t\t// Default is resolved here since it depends on Enum being resolved.\n\t\tif v := xd.L2.Default.val; v.IsValid() {\n\t\t\txd.L2.Default = unmarshalDefault(v.Bytes(), xd.L1.Kind, file, xd.L2.Enum)\n\t\t}\n\t}\n}\n\nfunc (file *File) resolveServices() {\n\tvar depIdx int32\n\tfor i := range file.allServices {\n\t\tsd := &file.allServices[i]\n\n\t\t// Resolve method dependencies.\n\t\tfor j := range sd.L2.Methods.List {\n\t\t\tmd := &sd.L2.Methods.List[j]\n\t\t\tmd.L1.Input = file.resolveMessageDependency(md.L1.Input, listMethInDeps, depIdx)\n\t\t\tmd.L1.Output = file.resolveMessageDependency(md.L1.Output, listMethOutDeps, depIdx)\n\t\t\tdepIdx++\n\t\t}\n\t}\n}\n\nfunc (file *File) resolveEnumDependency(ed protoreflect.EnumDescriptor, i, j int32) protoreflect.EnumDescriptor {\n\tr := file.builder.FileRegistry\n\tif r, ok := r.(resolverByIndex); ok {\n\t\tif ed2 := r.FindEnumByIndex(i, j, file.allEnums, file.allMessages); ed2 != nil {\n\t\t\treturn ed2\n\t\t}\n\t}\n\tfor i := range file.allEnums {\n\t\tif ed2 := &file.allEnums[i]; ed2.L0.FullName == ed.FullName() {\n\t\t\treturn ed2\n\t\t}\n\t}\n\tif d, _ := r.FindDescriptorByName(ed.FullName()); d != nil {\n\t\treturn d.(protoreflect.EnumDescriptor)\n\t}\n\treturn ed\n}\n\nfunc (file *File) resolveMessageDependency(md protoreflect.MessageDescriptor, i, j int32) protoreflect.MessageDescriptor {\n\tr := file.builder.FileRegistry\n\tif r, ok := r.(resolverByIndex); ok {\n\t\tif md2 := r.FindMessageByIndex(i, j, file.allEnums, file.allMessages); md2 != nil {\n\t\t\treturn md2\n\t\t}\n\t}\n\tfor i := range file.allMessages {\n\t\tif md2 := &file.allMessages[i]; md2.L0.FullName == md.FullName() {\n\t\t\treturn md2\n\t\t}\n\t}\n\tif d, _ := r.FindDescriptorByName(md.FullName()); d != nil {\n\t\treturn d.(protoreflect.MessageDescriptor)\n\t}\n\treturn md\n}\n\nfunc (fd *File) unmarshalFull(b []byte) {\n\tsb := getBuilder()\n\tdefer putBuilder(sb)\n\n\tvar enumIdx, messageIdx, extensionIdx, serviceIdx int\n\tvar rawOptions []byte\n\tvar optionImports []string\n\tfd.L2 = new(FileL2)\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FileDescriptorProto_PublicDependency_field_number:\n\t\t\t\tfd.L2.Imports[v].IsPublic = true\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FileDescriptorProto_Dependency_field_number:\n\t\t\t\tpath := sb.MakeString(v)\n\t\t\t\timp, _ := fd.builder.FileRegistry.FindFileByPath(path)\n\t\t\t\tif imp == nil {\n\t\t\t\t\timp = PlaceholderFile(path)\n\t\t\t\t}\n\t\t\t\tfd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp})\n\t\t\tcase genid.FileDescriptorProto_OptionDependency_field_number:\n\t\t\t\toptionImports = append(optionImports, sb.MakeString(v))\n\t\t\tcase genid.FileDescriptorProto_EnumType_field_number:\n\t\t\t\tfd.L1.Enums.List[enumIdx].unmarshalFull(v, sb)\n\t\t\t\tenumIdx++\n\t\t\tcase genid.FileDescriptorProto_MessageType_field_number:\n\t\t\t\tfd.L1.Messages.List[messageIdx].unmarshalFull(v, sb)\n\t\t\t\tmessageIdx++\n\t\t\tcase genid.FileDescriptorProto_Extension_field_number:\n\t\t\t\tfd.L1.Extensions.List[extensionIdx].unmarshalFull(v, sb)\n\t\t\t\textensionIdx++\n\t\t\tcase genid.FileDescriptorProto_Service_field_number:\n\t\t\t\tfd.L1.Services.List[serviceIdx].unmarshalFull(v, sb)\n\t\t\t\tserviceIdx++\n\t\t\tcase genid.FileDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tfd.L2.Options = fd.builder.optionsUnmarshaler(&descopts.File, rawOptions)\n\tif len(optionImports) > 0 {\n\t\tvar imps FileImports\n\t\tvar once sync.Once\n\t\tfd.L2.OptionImports = func() protoreflect.FileImports {\n\t\t\tonce.Do(func() {\n\t\t\t\timps = make(FileImports, len(optionImports))\n\t\t\t\tfor i, path := range optionImports {\n\t\t\t\t\timp, _ := fd.builder.FileRegistry.FindFileByPath(path)\n\t\t\t\t\tif imp == nil {\n\t\t\t\t\t\timp = PlaceholderFile(path)\n\t\t\t\t\t}\n\t\t\t\t\timps[i] = protoreflect.FileImport{FileDescriptor: imp}\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn &imps\n\t\t}\n\t}\n}\n\nfunc (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) {\n\tvar rawValues [][]byte\n\tvar rawOptions []byte\n\tif !ed.L1.eagerValues {\n\t\ted.L2 = new(EnumL2)\n\t}\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumDescriptorProto_Value_field_number:\n\t\t\t\trawValues = append(rawValues, v)\n\t\t\tcase genid.EnumDescriptorProto_ReservedName_field_number:\n\t\t\t\ted.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v)))\n\t\t\tcase genid.EnumDescriptorProto_ReservedRange_field_number:\n\t\t\t\ted.L2.ReservedRanges.List = append(ed.L2.ReservedRanges.List, unmarshalEnumReservedRange(v))\n\t\t\tcase genid.EnumDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tif !ed.L1.eagerValues && len(rawValues) > 0 {\n\t\ted.L2.Values.List = make([]EnumValue, len(rawValues))\n\t\tfor i, b := range rawValues {\n\t\t\ted.L2.Values.List[i].unmarshalFull(b, sb, ed.L0.ParentFile, ed, i)\n\t\t}\n\t}\n\ted.L2.Options = ed.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Enum, rawOptions)\n}\n\nfunc unmarshalEnumReservedRange(b []byte) (r [2]protoreflect.EnumNumber) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumDescriptorProto_EnumReservedRange_Start_field_number:\n\t\t\t\tr[0] = protoreflect.EnumNumber(v)\n\t\t\tcase genid.EnumDescriptorProto_EnumReservedRange_End_field_number:\n\t\t\t\tr[1] = protoreflect.EnumNumber(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\treturn r\n}\n\nfunc (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tvd.L0.ParentFile = pf\n\tvd.L0.Parent = pd\n\tvd.L0.Index = i\n\n\tvar rawOptions []byte\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumValueDescriptorProto_Number_field_number:\n\t\t\t\tvd.L1.Number = protoreflect.EnumNumber(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.EnumValueDescriptorProto_Name_field_number:\n\t\t\t\t// NOTE: Enum values are in the same scope as the enum parent.\n\t\t\t\tvd.L0.FullName = appendFullName(sb, pd.Parent().FullName(), v)\n\t\t\tcase genid.EnumValueDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tvd.L1.Options = pf.builder.optionsUnmarshaler(&descopts.EnumValue, rawOptions)\n}\n\nfunc (md *Message) unmarshalFull(b []byte, sb *strs.Builder) {\n\tvar rawFields, rawOneofs [][]byte\n\tvar enumIdx, messageIdx, extensionIdx int\n\tvar rawOptions []byte\n\tmd.L2 = new(MessageL2)\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_Field_field_number:\n\t\t\t\trawFields = append(rawFields, v)\n\t\t\tcase genid.DescriptorProto_OneofDecl_field_number:\n\t\t\t\trawOneofs = append(rawOneofs, v)\n\t\t\tcase genid.DescriptorProto_ReservedName_field_number:\n\t\t\t\tmd.L2.ReservedNames.List = append(md.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v)))\n\t\t\tcase genid.DescriptorProto_ReservedRange_field_number:\n\t\t\t\tmd.L2.ReservedRanges.List = append(md.L2.ReservedRanges.List, unmarshalMessageReservedRange(v))\n\t\t\tcase genid.DescriptorProto_ExtensionRange_field_number:\n\t\t\t\tr, rawOptions := unmarshalMessageExtensionRange(v)\n\t\t\t\topts := md.L0.ParentFile.builder.optionsUnmarshaler(&descopts.ExtensionRange, rawOptions)\n\t\t\t\tmd.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, r)\n\t\t\t\tmd.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, opts)\n\t\t\tcase genid.DescriptorProto_EnumType_field_number:\n\t\t\t\tmd.L1.Enums.List[enumIdx].unmarshalFull(v, sb)\n\t\t\t\tenumIdx++\n\t\t\tcase genid.DescriptorProto_NestedType_field_number:\n\t\t\t\tmd.L1.Messages.List[messageIdx].unmarshalFull(v, sb)\n\t\t\t\tmessageIdx++\n\t\t\tcase genid.DescriptorProto_Extension_field_number:\n\t\t\t\tmd.L1.Extensions.List[extensionIdx].unmarshalFull(v, sb)\n\t\t\t\textensionIdx++\n\t\t\tcase genid.DescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tif len(rawFields) > 0 || len(rawOneofs) > 0 {\n\t\tmd.L2.Fields.List = make([]Field, len(rawFields))\n\t\tmd.L2.Oneofs.List = make([]Oneof, len(rawOneofs))\n\t\tfor i, b := range rawFields {\n\t\t\tfd := &md.L2.Fields.List[i]\n\t\t\tfd.unmarshalFull(b, sb, md.L0.ParentFile, md, i)\n\t\t\tif fd.L1.Cardinality == protoreflect.Required {\n\t\t\t\tmd.L2.RequiredNumbers.List = append(md.L2.RequiredNumbers.List, fd.L1.Number)\n\t\t\t}\n\t\t}\n\t\tfor i, b := range rawOneofs {\n\t\t\tod := &md.L2.Oneofs.List[i]\n\t\t\tod.unmarshalFull(b, sb, md.L0.ParentFile, md, i)\n\t\t}\n\t}\n\tmd.L2.Options = md.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Message, rawOptions)\n}\n\nfunc unmarshalMessageReservedRange(b []byte) (r [2]protoreflect.FieldNumber) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_ReservedRange_Start_field_number:\n\t\t\t\tr[0] = protoreflect.FieldNumber(v)\n\t\t\tcase genid.DescriptorProto_ReservedRange_End_field_number:\n\t\t\t\tr[1] = protoreflect.FieldNumber(v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\treturn r\n}\n\nfunc unmarshalMessageExtensionRange(b []byte) (r [2]protoreflect.FieldNumber, rawOptions []byte) {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_ExtensionRange_Start_field_number:\n\t\t\t\tr[0] = protoreflect.FieldNumber(v)\n\t\t\tcase genid.DescriptorProto_ExtensionRange_End_field_number:\n\t\t\t\tr[1] = protoreflect.FieldNumber(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.DescriptorProto_ExtensionRange_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\treturn r, rawOptions\n}\n\nfunc (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tfd.L0.ParentFile = pf\n\tfd.L0.Parent = pd\n\tfd.L0.Index = i\n\tfd.L1.EditionFeatures = featuresFromParentDesc(fd.Parent())\n\n\tvar rawTypeName []byte\n\tvar rawOptions []byte\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_Number_field_number:\n\t\t\t\tfd.L1.Number = protoreflect.FieldNumber(v)\n\t\t\tcase genid.FieldDescriptorProto_Label_field_number:\n\t\t\t\tfd.L1.Cardinality = protoreflect.Cardinality(v)\n\t\t\tcase genid.FieldDescriptorProto_Type_field_number:\n\t\t\t\tfd.L1.Kind = protoreflect.Kind(v)\n\t\t\tcase genid.FieldDescriptorProto_OneofIndex_field_number:\n\t\t\t\t// In Message.unmarshalFull, we allocate slices for both\n\t\t\t\t// the field and oneof descriptors before unmarshaling either\n\t\t\t\t// of them. This ensures pointers to slice elements are stable.\n\t\t\t\tod := &pd.(*Message).L2.Oneofs.List[v]\n\t\t\t\tod.L1.Fields.List = append(od.L1.Fields.List, fd)\n\t\t\t\tif fd.L1.ContainingOneof != nil {\n\t\t\t\t\tpanic(\"oneof type already set\")\n\t\t\t\t}\n\t\t\t\tfd.L1.ContainingOneof = od\n\t\t\tcase genid.FieldDescriptorProto_Proto3Optional_field_number:\n\t\t\t\tfd.L1.IsProto3Optional = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_Name_field_number:\n\t\t\t\tfd.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.FieldDescriptorProto_JsonName_field_number:\n\t\t\t\tfd.L1.StringName.InitJSON(sb.MakeString(v))\n\t\t\tcase genid.FieldDescriptorProto_DefaultValue_field_number:\n\t\t\t\tfd.L1.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages\n\t\t\tcase genid.FieldDescriptorProto_TypeName_field_number:\n\t\t\t\trawTypeName = v\n\t\t\tcase genid.FieldDescriptorProto_Options_field_number:\n\t\t\t\tfd.unmarshalOptions(v)\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tif fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded {\n\t\tfd.L1.Kind = protoreflect.GroupKind\n\t}\n\tif fd.L1.EditionFeatures.IsLegacyRequired {\n\t\tfd.L1.Cardinality = protoreflect.Required\n\t}\n\tif rawTypeName != nil {\n\t\tname := makeFullName(sb, rawTypeName)\n\t\tswitch fd.L1.Kind {\n\t\tcase protoreflect.EnumKind:\n\t\t\tfd.L1.Enum = PlaceholderEnum(name)\n\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\tfd.L1.Message = PlaceholderMessage(name)\n\t\t}\n\t}\n\tfd.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Field, rawOptions)\n}\n\nfunc (fd *Field) unmarshalOptions(b []byte) {\n\tconst FieldOptions_EnforceUTF8 = 13\n\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldOptions_Packed_field_number:\n\t\t\t\tfd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v)\n\t\t\tcase genid.FieldOptions_Lazy_field_number:\n\t\t\t\tfd.L1.IsLazy = protowire.DecodeBool(v)\n\t\t\tcase FieldOptions_EnforceUTF8:\n\t\t\t\tfd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldOptions_Features_field_number:\n\t\t\t\tfd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n}\n\nfunc (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tod.L0.ParentFile = pf\n\tod.L0.Parent = pd\n\tod.L0.Index = i\n\n\tvar rawOptions []byte\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.OneofDescriptorProto_Name_field_number:\n\t\t\t\tod.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.OneofDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tod.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Oneof, rawOptions)\n}\n\nfunc (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) {\n\tvar rawTypeName []byte\n\tvar rawOptions []byte\n\txd.L2 = new(ExtensionL2)\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_Proto3Optional_field_number:\n\t\t\t\txd.L2.IsProto3Optional = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FieldDescriptorProto_JsonName_field_number:\n\t\t\t\txd.L2.StringName.InitJSON(sb.MakeString(v))\n\t\t\tcase genid.FieldDescriptorProto_DefaultValue_field_number:\n\t\t\t\txd.L2.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions\n\t\t\tcase genid.FieldDescriptorProto_TypeName_field_number:\n\t\t\t\trawTypeName = v\n\t\t\tcase genid.FieldDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tif rawTypeName != nil {\n\t\tname := makeFullName(sb, rawTypeName)\n\t\tswitch xd.L1.Kind {\n\t\tcase protoreflect.EnumKind:\n\t\t\txd.L2.Enum = PlaceholderEnum(name)\n\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\txd.L2.Message = PlaceholderMessage(name)\n\t\t}\n\t}\n\txd.L2.Options = xd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Field, rawOptions)\n}\n\nfunc (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) {\n\tvar rawMethods [][]byte\n\tvar rawOptions []byte\n\tsd.L2 = new(ServiceL2)\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.ServiceDescriptorProto_Method_field_number:\n\t\t\t\trawMethods = append(rawMethods, v)\n\t\t\tcase genid.ServiceDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tif len(rawMethods) > 0 {\n\t\tsd.L2.Methods.List = make([]Method, len(rawMethods))\n\t\tfor i, b := range rawMethods {\n\t\t\tsd.L2.Methods.List[i].unmarshalFull(b, sb, sd.L0.ParentFile, sd, i)\n\t\t}\n\t}\n\tsd.L2.Options = sd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Service, rawOptions)\n}\n\nfunc (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) {\n\tmd.L0.ParentFile = pf\n\tmd.L0.Parent = pd\n\tmd.L0.Index = i\n\n\tvar rawOptions []byte\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.MethodDescriptorProto_ClientStreaming_field_number:\n\t\t\t\tmd.L1.IsStreamingClient = protowire.DecodeBool(v)\n\t\t\tcase genid.MethodDescriptorProto_ServerStreaming_field_number:\n\t\t\t\tmd.L1.IsStreamingServer = protowire.DecodeBool(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.MethodDescriptorProto_Name_field_number:\n\t\t\t\tmd.L0.FullName = appendFullName(sb, pd.FullName(), v)\n\t\t\tcase genid.MethodDescriptorProto_InputType_field_number:\n\t\t\t\tmd.L1.Input = PlaceholderMessage(makeFullName(sb, v))\n\t\t\tcase genid.MethodDescriptorProto_OutputType_field_number:\n\t\t\t\tmd.L1.Output = PlaceholderMessage(makeFullName(sb, v))\n\t\t\tcase genid.MethodDescriptorProto_Options_field_number:\n\t\t\t\trawOptions = appendOptions(rawOptions, v)\n\t\t\t}\n\t\tdefault:\n\t\t\tm := protowire.ConsumeFieldValue(num, typ, b)\n\t\t\tb = b[m:]\n\t\t}\n\t}\n\tmd.L1.Options = pf.builder.optionsUnmarshaler(&descopts.Method, rawOptions)\n}\n\n// appendOptions appends src to dst, where the returned slice is never nil.\n// This is necessary to distinguish between empty and unpopulated options.\nfunc appendOptions(dst, src []byte) []byte {\n\tif dst == nil {\n\t\tdst = []byte{}\n\t}\n\treturn append(dst, src...)\n}\n\n// optionsUnmarshaler constructs a lazy unmarshal function for an options message.\n//\n// The type of message to unmarshal to is passed as a pointer since the\n// vars in descopts may not yet be populated at the time this function is called.\nfunc (db *Builder) optionsUnmarshaler(p *protoreflect.ProtoMessage, b []byte) func() protoreflect.ProtoMessage {\n\tif b == nil {\n\t\treturn nil\n\t}\n\tvar opts protoreflect.ProtoMessage\n\tvar once sync.Once\n\treturn func() protoreflect.ProtoMessage {\n\t\tonce.Do(func() {\n\t\t\tif *p == nil {\n\t\t\t\tpanic(\"Descriptor.Options called without importing the descriptor package\")\n\t\t\t}\n\t\t\topts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(protoreflect.ProtoMessage)\n\t\t\tif err := (proto.UnmarshalOptions{\n\t\t\t\tAllowPartial: true,\n\t\t\t\tResolver:     db.TypeResolver,\n\t\t\t}).Unmarshal(b, opts); err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t})\n\t\treturn opts\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sort\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/genid\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/descfmt\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype FileImports []protoreflect.FileImport\n\nfunc (p *FileImports) Len() int                            { return len(*p) }\nfunc (p *FileImports) Get(i int) protoreflect.FileImport   { return (*p)[i] }\nfunc (p *FileImports) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *FileImports) ProtoInternal(pragma.DoNotImplement) {}\n\ntype Names struct {\n\tList []protoreflect.Name\n\tonce sync.Once\n\thas  map[protoreflect.Name]int // protected by once\n}\n\nfunc (p *Names) Len() int                            { return len(p.List) }\nfunc (p *Names) Get(i int) protoreflect.Name         { return p.List[i] }\nfunc (p *Names) Has(s protoreflect.Name) bool        { return p.lazyInit().has[s] > 0 }\nfunc (p *Names) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *Names) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Names) lazyInit() *Names {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.has = make(map[protoreflect.Name]int, len(p.List))\n\t\t\tfor _, s := range p.List {\n\t\t\t\tp.has[s] = p.has[s] + 1\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\n// CheckValid reports any errors with the set of names with an error message\n// that completes the sentence: \"ranges is invalid because it has ...\"\nfunc (p *Names) CheckValid() error {\n\tfor s, n := range p.lazyInit().has {\n\t\tswitch {\n\t\tcase n > 1:\n\t\t\treturn errors.New(\"duplicate name: %q\", s)\n\t\tcase false && !s.IsValid():\n\t\t\t// NOTE: The C++ implementation does not validate the identifier.\n\t\t\t// See https://github.com/protocolbuffers/protobuf/issues/6335.\n\t\t\treturn errors.New(\"invalid name: %q\", s)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype EnumRanges struct {\n\tList   [][2]protoreflect.EnumNumber // start inclusive; end inclusive\n\tonce   sync.Once\n\tsorted [][2]protoreflect.EnumNumber // protected by once\n}\n\nfunc (p *EnumRanges) Len() int                             { return len(p.List) }\nfunc (p *EnumRanges) Get(i int) [2]protoreflect.EnumNumber { return p.List[i] }\nfunc (p *EnumRanges) Has(n protoreflect.EnumNumber) bool {\n\tfor ls := p.lazyInit().sorted; len(ls) > 0; {\n\t\ti := len(ls) / 2\n\t\tswitch r := enumRange(ls[i]); {\n\t\tcase n < r.Start():\n\t\t\tls = ls[:i] // search lower\n\t\tcase n > r.End():\n\t\t\tls = ls[i+1:] // search upper\n\t\tdefault:\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\nfunc (p *EnumRanges) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *EnumRanges) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *EnumRanges) lazyInit() *EnumRanges {\n\tp.once.Do(func() {\n\t\tp.sorted = append(p.sorted, p.List...)\n\t\tsort.Slice(p.sorted, func(i, j int) bool {\n\t\t\treturn p.sorted[i][0] < p.sorted[j][0]\n\t\t})\n\t})\n\treturn p\n}\n\n// CheckValid reports any errors with the set of names with an error message\n// that completes the sentence: \"ranges is invalid because it has ...\"\nfunc (p *EnumRanges) CheckValid() error {\n\tvar rp enumRange\n\tfor i, r := range p.lazyInit().sorted {\n\t\tr := enumRange(r)\n\t\tswitch {\n\t\tcase !(r.Start() <= r.End()):\n\t\t\treturn errors.New(\"invalid range: %v\", r)\n\t\tcase !(rp.End() < r.Start()) && i > 0:\n\t\t\treturn errors.New(\"overlapping ranges: %v with %v\", rp, r)\n\t\t}\n\t\trp = r\n\t}\n\treturn nil\n}\n\ntype enumRange [2]protoreflect.EnumNumber\n\nfunc (r enumRange) Start() protoreflect.EnumNumber { return r[0] } // inclusive\nfunc (r enumRange) End() protoreflect.EnumNumber   { return r[1] } // inclusive\nfunc (r enumRange) String() string {\n\tif r.Start() == r.End() {\n\t\treturn fmt.Sprintf(\"%d\", r.Start())\n\t}\n\treturn fmt.Sprintf(\"%d to %d\", r.Start(), r.End())\n}\n\ntype FieldRanges struct {\n\tList   [][2]protoreflect.FieldNumber // start inclusive; end exclusive\n\tonce   sync.Once\n\tsorted [][2]protoreflect.FieldNumber // protected by once\n}\n\nfunc (p *FieldRanges) Len() int                              { return len(p.List) }\nfunc (p *FieldRanges) Get(i int) [2]protoreflect.FieldNumber { return p.List[i] }\nfunc (p *FieldRanges) Has(n protoreflect.FieldNumber) bool {\n\tfor ls := p.lazyInit().sorted; len(ls) > 0; {\n\t\ti := len(ls) / 2\n\t\tswitch r := fieldRange(ls[i]); {\n\t\tcase n < r.Start():\n\t\t\tls = ls[:i] // search lower\n\t\tcase n > r.End():\n\t\t\tls = ls[i+1:] // search upper\n\t\tdefault:\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\nfunc (p *FieldRanges) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *FieldRanges) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *FieldRanges) lazyInit() *FieldRanges {\n\tp.once.Do(func() {\n\t\tp.sorted = append(p.sorted, p.List...)\n\t\tsort.Slice(p.sorted, func(i, j int) bool {\n\t\t\treturn p.sorted[i][0] < p.sorted[j][0]\n\t\t})\n\t})\n\treturn p\n}\n\n// CheckValid reports any errors with the set of ranges with an error message\n// that completes the sentence: \"ranges is invalid because it has ...\"\nfunc (p *FieldRanges) CheckValid(isMessageSet bool) error {\n\tvar rp fieldRange\n\tfor i, r := range p.lazyInit().sorted {\n\t\tr := fieldRange(r)\n\t\tswitch {\n\t\tcase !isValidFieldNumber(r.Start(), isMessageSet):\n\t\t\treturn errors.New(\"invalid field number: %d\", r.Start())\n\t\tcase !isValidFieldNumber(r.End(), isMessageSet):\n\t\t\treturn errors.New(\"invalid field number: %d\", r.End())\n\t\tcase !(r.Start() <= r.End()):\n\t\t\treturn errors.New(\"invalid range: %v\", r)\n\t\tcase !(rp.End() < r.Start()) && i > 0:\n\t\t\treturn errors.New(\"overlapping ranges: %v with %v\", rp, r)\n\t\t}\n\t\trp = r\n\t}\n\treturn nil\n}\n\n// isValidFieldNumber reports whether the field number is valid.\n// Unlike the FieldNumber.IsValid method, it allows ranges that cover the\n// reserved number range.\nfunc isValidFieldNumber(n protoreflect.FieldNumber, isMessageSet bool) bool {\n\treturn protowire.MinValidNumber <= n && (n <= protowire.MaxValidNumber || isMessageSet)\n}\n\n// CheckOverlap reports an error if p and q overlap.\nfunc (p *FieldRanges) CheckOverlap(q *FieldRanges) error {\n\trps := p.lazyInit().sorted\n\trqs := q.lazyInit().sorted\n\tfor pi, qi := 0, 0; pi < len(rps) && qi < len(rqs); {\n\t\trp := fieldRange(rps[pi])\n\t\trq := fieldRange(rqs[qi])\n\t\tif !(rp.End() < rq.Start() || rq.End() < rp.Start()) {\n\t\t\treturn errors.New(\"overlapping ranges: %v with %v\", rp, rq)\n\t\t}\n\t\tif rp.Start() < rq.Start() {\n\t\t\tpi++\n\t\t} else {\n\t\t\tqi++\n\t\t}\n\t}\n\treturn nil\n}\n\ntype fieldRange [2]protoreflect.FieldNumber\n\nfunc (r fieldRange) Start() protoreflect.FieldNumber { return r[0] }     // inclusive\nfunc (r fieldRange) End() protoreflect.FieldNumber   { return r[1] - 1 } // inclusive\nfunc (r fieldRange) String() string {\n\tif r.Start() == r.End() {\n\t\treturn fmt.Sprintf(\"%d\", r.Start())\n\t}\n\treturn fmt.Sprintf(\"%d to %d\", r.Start(), r.End())\n}\n\ntype FieldNumbers struct {\n\tList []protoreflect.FieldNumber\n\tonce sync.Once\n\thas  map[protoreflect.FieldNumber]struct{} // protected by once\n}\n\nfunc (p *FieldNumbers) Len() int                           { return len(p.List) }\nfunc (p *FieldNumbers) Get(i int) protoreflect.FieldNumber { return p.List[i] }\nfunc (p *FieldNumbers) Has(n protoreflect.FieldNumber) bool {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.has = make(map[protoreflect.FieldNumber]struct{}, len(p.List))\n\t\t\tfor _, n := range p.List {\n\t\t\t\tp.has[n] = struct{}{}\n\t\t\t}\n\t\t}\n\t})\n\t_, ok := p.has[n]\n\treturn ok\n}\nfunc (p *FieldNumbers) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement) {}\n\ntype OneofFields struct {\n\tList   []protoreflect.FieldDescriptor\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]protoreflect.FieldDescriptor        // protected by once\n\tbyJSON map[string]protoreflect.FieldDescriptor                   // protected by once\n\tbyText map[string]protoreflect.FieldDescriptor                   // protected by once\n\tbyNum  map[protoreflect.FieldNumber]protoreflect.FieldDescriptor // protected by once\n}\n\nfunc (p *OneofFields) Len() int                               { return len(p.List) }\nfunc (p *OneofFields) Get(i int) protoreflect.FieldDescriptor { return p.List[i] }\nfunc (p *OneofFields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor {\n\treturn p.lazyInit().byName[s]\n}\nfunc (p *OneofFields) ByJSONName(s string) protoreflect.FieldDescriptor {\n\treturn p.lazyInit().byJSON[s]\n}\nfunc (p *OneofFields) ByTextName(s string) protoreflect.FieldDescriptor {\n\treturn p.lazyInit().byText[s]\n}\nfunc (p *OneofFields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor {\n\treturn p.lazyInit().byNum[n]\n}\nfunc (p *OneofFields) Format(s fmt.State, r rune)          { descfmt.FormatList(s, r, p) }\nfunc (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {}\n\nfunc (p *OneofFields) lazyInit() *OneofFields {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]protoreflect.FieldDescriptor, len(p.List))\n\t\t\tp.byJSON = make(map[string]protoreflect.FieldDescriptor, len(p.List))\n\t\t\tp.byText = make(map[string]protoreflect.FieldDescriptor, len(p.List))\n\t\t\tp.byNum = make(map[protoreflect.FieldNumber]protoreflect.FieldDescriptor, len(p.List))\n\t\t\tfor _, f := range p.List {\n\t\t\t\t// Field names and numbers are guaranteed to be unique.\n\t\t\t\tp.byName[f.Name()] = f\n\t\t\t\tp.byJSON[f.JSONName()] = f\n\t\t\t\tp.byText[f.TextName()] = f\n\t\t\t\tp.byNum[f.Number()] = f\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype SourceLocations struct {\n\t// List is a list of SourceLocations.\n\t// The SourceLocation.Next field does not need to be populated\n\t// as it will be lazily populated upon first need.\n\tList []protoreflect.SourceLocation\n\n\t// File is the parent file descriptor that these locations are relative to.\n\t// If non-nil, ByDescriptor verifies that the provided descriptor\n\t// is a child of this file descriptor.\n\tFile protoreflect.FileDescriptor\n\n\tonce   sync.Once\n\tbyPath map[pathKey]int\n}\n\nfunc (p *SourceLocations) Len() int                              { return len(p.List) }\nfunc (p *SourceLocations) Get(i int) protoreflect.SourceLocation { return p.lazyInit().List[i] }\nfunc (p *SourceLocations) byKey(k pathKey) protoreflect.SourceLocation {\n\tif i, ok := p.lazyInit().byPath[k]; ok {\n\t\treturn p.List[i]\n\t}\n\treturn protoreflect.SourceLocation{}\n}\nfunc (p *SourceLocations) ByPath(path protoreflect.SourcePath) protoreflect.SourceLocation {\n\treturn p.byKey(newPathKey(path))\n}\nfunc (p *SourceLocations) ByDescriptor(desc protoreflect.Descriptor) protoreflect.SourceLocation {\n\tif p.File != nil && desc != nil && p.File != desc.ParentFile() {\n\t\treturn protoreflect.SourceLocation{} // mismatching parent files\n\t}\n\tvar pathArr [16]int32\n\tpath := pathArr[:0]\n\tfor {\n\t\tswitch desc.(type) {\n\t\tcase protoreflect.FileDescriptor:\n\t\t\t// Reverse the path since it was constructed in reverse.\n\t\t\tfor i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 {\n\t\t\t\tpath[i], path[j] = path[j], path[i]\n\t\t\t}\n\t\t\treturn p.byKey(newPathKey(path))\n\t\tcase protoreflect.MessageDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.FileDescriptor:\n\t\t\t\tpath = append(path, int32(genid.FileDescriptorProto_MessageType_field_number))\n\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\tpath = append(path, int32(genid.DescriptorProto_NestedType_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tcase protoreflect.FieldDescriptor:\n\t\t\tisExtension := desc.(protoreflect.FieldDescriptor).IsExtension()\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tif isExtension {\n\t\t\t\tswitch desc.(type) {\n\t\t\t\tcase protoreflect.FileDescriptor:\n\t\t\t\t\tpath = append(path, int32(genid.FileDescriptorProto_Extension_field_number))\n\t\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\t\tpath = append(path, int32(genid.DescriptorProto_Extension_field_number))\n\t\t\t\tdefault:\n\t\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch desc.(type) {\n\t\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\t\tpath = append(path, int32(genid.DescriptorProto_Field_field_number))\n\t\t\t\tdefault:\n\t\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t\t}\n\t\t\t}\n\t\tcase protoreflect.OneofDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\tpath = append(path, int32(genid.DescriptorProto_OneofDecl_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tcase protoreflect.EnumDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.FileDescriptor:\n\t\t\t\tpath = append(path, int32(genid.FileDescriptorProto_EnumType_field_number))\n\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\tpath = append(path, int32(genid.DescriptorProto_EnumType_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tcase protoreflect.EnumValueDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.EnumDescriptor:\n\t\t\t\tpath = append(path, int32(genid.EnumDescriptorProto_Value_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tcase protoreflect.ServiceDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.FileDescriptor:\n\t\t\t\tpath = append(path, int32(genid.FileDescriptorProto_Service_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tcase protoreflect.MethodDescriptor:\n\t\t\tpath = append(path, int32(desc.Index()))\n\t\t\tdesc = desc.Parent()\n\t\t\tswitch desc.(type) {\n\t\t\tcase protoreflect.ServiceDescriptor:\n\t\t\t\tpath = append(path, int32(genid.ServiceDescriptorProto_Method_field_number))\n\t\t\tdefault:\n\t\t\t\treturn protoreflect.SourceLocation{}\n\t\t\t}\n\t\tdefault:\n\t\t\treturn protoreflect.SourceLocation{}\n\t\t}\n\t}\n}\nfunc (p *SourceLocations) lazyInit() *SourceLocations {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\t// Collect all the indexes for a given path.\n\t\t\tpathIdxs := make(map[pathKey][]int, len(p.List))\n\t\t\tfor i, l := range p.List {\n\t\t\t\tk := newPathKey(l.Path)\n\t\t\t\tpathIdxs[k] = append(pathIdxs[k], i)\n\t\t\t}\n\n\t\t\t// Update the next index for all locations.\n\t\t\tp.byPath = make(map[pathKey]int, len(p.List))\n\t\t\tfor k, idxs := range pathIdxs {\n\t\t\t\tfor i := 0; i < len(idxs)-1; i++ {\n\t\t\t\t\tp.List[idxs[i]].Next = idxs[i+1]\n\t\t\t\t}\n\t\t\t\tp.List[idxs[len(idxs)-1]].Next = 0\n\t\t\t\tp.byPath[k] = idxs[0] // record the first location for this path\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\nfunc (p *SourceLocations) ProtoInternal(pragma.DoNotImplement) {}\n\n// pathKey is a comparable representation of protoreflect.SourcePath.\ntype pathKey struct {\n\tarr [16]uint8 // first n-1 path segments; last element is the length\n\tstr string    // used if the path does not fit in arr\n}\n\nfunc newPathKey(p protoreflect.SourcePath) (k pathKey) {\n\tif len(p) < len(k.arr) {\n\t\tfor i, ps := range p {\n\t\t\tif ps < 0 || math.MaxUint8 <= ps {\n\t\t\t\treturn pathKey{str: p.String()}\n\t\t\t}\n\t\t\tk.arr[i] = uint8(ps)\n\t\t}\n\t\tk.arr[len(k.arr)-1] = uint8(len(p))\n\t\treturn k\n\t}\n\treturn pathKey{str: p.String()}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage filedesc\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/descfmt\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype Enums struct {\n\tList   []Enum\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Enum // protected by once\n}\n\nfunc (p *Enums) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Enums) Get(i int) protoreflect.EnumDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Enums) ByName(s protoreflect.Name) protoreflect.EnumDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Enums) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Enums) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Enums) lazyInit() *Enums {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Enum, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype EnumValues struct {\n\tList   []EnumValue\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*EnumValue       // protected by once\n\tbyNum  map[protoreflect.EnumNumber]*EnumValue // protected by once\n}\n\nfunc (p *EnumValues) Len() int {\n\treturn len(p.List)\n}\nfunc (p *EnumValues) Get(i int) protoreflect.EnumValueDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *EnumValues) ByName(s protoreflect.Name) protoreflect.EnumValueDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *EnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor {\n\tif d := p.lazyInit().byNum[n]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *EnumValues) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *EnumValues) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *EnumValues) lazyInit() *EnumValues {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*EnumValue, len(p.List))\n\t\t\tp.byNum = make(map[protoreflect.EnumNumber]*EnumValue, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t\tif _, ok := p.byNum[d.Number()]; !ok {\n\t\t\t\t\tp.byNum[d.Number()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Messages struct {\n\tList   []Message\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Message // protected by once\n}\n\nfunc (p *Messages) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Messages) Get(i int) protoreflect.MessageDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Messages) ByName(s protoreflect.Name) protoreflect.MessageDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Messages) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Messages) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Messages) lazyInit() *Messages {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Message, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Fields struct {\n\tList   []Field\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Field        // protected by once\n\tbyJSON map[string]*Field                   // protected by once\n\tbyText map[string]*Field                   // protected by once\n\tbyNum  map[protoreflect.FieldNumber]*Field // protected by once\n}\n\nfunc (p *Fields) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Fields) Get(i int) protoreflect.FieldDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Fields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Fields) ByJSONName(s string) protoreflect.FieldDescriptor {\n\tif d := p.lazyInit().byJSON[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Fields) ByTextName(s string) protoreflect.FieldDescriptor {\n\tif d := p.lazyInit().byText[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Fields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor {\n\tif d := p.lazyInit().byNum[n]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Fields) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Fields) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Fields) lazyInit() *Fields {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Field, len(p.List))\n\t\t\tp.byJSON = make(map[string]*Field, len(p.List))\n\t\t\tp.byText = make(map[string]*Field, len(p.List))\n\t\t\tp.byNum = make(map[protoreflect.FieldNumber]*Field, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t\tif _, ok := p.byJSON[d.JSONName()]; !ok {\n\t\t\t\t\tp.byJSON[d.JSONName()] = d\n\t\t\t\t}\n\t\t\t\tif _, ok := p.byText[d.TextName()]; !ok {\n\t\t\t\t\tp.byText[d.TextName()] = d\n\t\t\t\t}\n\t\t\t\tif isGroupLike(d) {\n\t\t\t\t\tlowerJSONName := strings.ToLower(d.JSONName())\n\t\t\t\t\tif _, ok := p.byJSON[lowerJSONName]; !ok {\n\t\t\t\t\t\tp.byJSON[lowerJSONName] = d\n\t\t\t\t\t}\n\t\t\t\t\tlowerTextName := strings.ToLower(d.TextName())\n\t\t\t\t\tif _, ok := p.byText[lowerTextName]; !ok {\n\t\t\t\t\t\tp.byText[lowerTextName] = d\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif _, ok := p.byNum[d.Number()]; !ok {\n\t\t\t\t\tp.byNum[d.Number()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Oneofs struct {\n\tList   []Oneof\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Oneof // protected by once\n}\n\nfunc (p *Oneofs) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Oneofs) Get(i int) protoreflect.OneofDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Oneofs) ByName(s protoreflect.Name) protoreflect.OneofDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Oneofs) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Oneofs) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Oneofs) lazyInit() *Oneofs {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Oneof, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Extensions struct {\n\tList   []Extension\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Extension // protected by once\n}\n\nfunc (p *Extensions) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Extensions) Get(i int) protoreflect.ExtensionDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Extensions) ByName(s protoreflect.Name) protoreflect.ExtensionDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Extensions) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Extensions) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Extensions) lazyInit() *Extensions {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Extension, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Services struct {\n\tList   []Service\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Service // protected by once\n}\n\nfunc (p *Services) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Services) Get(i int) protoreflect.ServiceDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Services) ByName(s protoreflect.Name) protoreflect.ServiceDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Services) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Services) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Services) lazyInit() *Services {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Service, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n\ntype Methods struct {\n\tList   []Method\n\tonce   sync.Once\n\tbyName map[protoreflect.Name]*Method // protected by once\n}\n\nfunc (p *Methods) Len() int {\n\treturn len(p.List)\n}\nfunc (p *Methods) Get(i int) protoreflect.MethodDescriptor {\n\treturn &p.List[i]\n}\nfunc (p *Methods) ByName(s protoreflect.Name) protoreflect.MethodDescriptor {\n\tif d := p.lazyInit().byName[s]; d != nil {\n\t\treturn d\n\t}\n\treturn nil\n}\nfunc (p *Methods) Format(s fmt.State, r rune) {\n\tdescfmt.FormatList(s, r, p)\n}\nfunc (p *Methods) ProtoInternal(pragma.DoNotImplement) {}\nfunc (p *Methods) lazyInit() *Methods {\n\tp.once.Do(func() {\n\t\tif len(p.List) > 0 {\n\t\t\tp.byName = make(map[protoreflect.Name]*Method, len(p.List))\n\t\t\tfor i := range p.List {\n\t\t\t\td := &p.List[i]\n\t\t\t\tif _, ok := p.byName[d.Name()]; !ok {\n\t\t\t\t\tp.byName[d.Name()] = d\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn p\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/editions.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/editiondefaults\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nvar (\n\tdefaultsCache = make(map[Edition]EditionFeatures)\n\tdefaultsKeys  = []Edition{}\n)\n\nfunc init() {\n\tunmarshalEditionDefaults(editiondefaults.Defaults)\n\tSurrogateProto2.L1.EditionFeatures = getFeaturesFor(EditionProto2)\n\tSurrogateProto3.L1.EditionFeatures = getFeaturesFor(EditionProto3)\n\tSurrogateEdition2023.L1.EditionFeatures = getFeaturesFor(Edition2023)\n}\n\nfunc unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {\n\tfor len(b) > 0 {\n\t\tnum, _, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch num {\n\t\tcase genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tparent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v)\n\t\tcase genid.GoFeatures_ApiLevel_field_number:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tparent.APILevel = int(v)\n\t\tcase genid.GoFeatures_StripEnumPrefix_field_number:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tparent.StripEnumPrefix = int(v)\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"unknown field number %d while unmarshalling GoFeatures\", num))\n\t\t}\n\t}\n\treturn parent\n}\n\nfunc unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FeatureSet_FieldPresence_field_number:\n\t\t\t\tparent.IsFieldPresence = v == genid.FeatureSet_EXPLICIT_enum_value || v == genid.FeatureSet_LEGACY_REQUIRED_enum_value\n\t\t\t\tparent.IsLegacyRequired = v == genid.FeatureSet_LEGACY_REQUIRED_enum_value\n\t\t\tcase genid.FeatureSet_EnumType_field_number:\n\t\t\t\tparent.IsOpenEnum = v == genid.FeatureSet_OPEN_enum_value\n\t\t\tcase genid.FeatureSet_RepeatedFieldEncoding_field_number:\n\t\t\t\tparent.IsPacked = v == genid.FeatureSet_PACKED_enum_value\n\t\t\tcase genid.FeatureSet_Utf8Validation_field_number:\n\t\t\t\tparent.IsUTF8Validated = v == genid.FeatureSet_VERIFY_enum_value\n\t\t\tcase genid.FeatureSet_MessageEncoding_field_number:\n\t\t\t\tparent.IsDelimitedEncoded = v == genid.FeatureSet_DELIMITED_enum_value\n\t\t\tcase genid.FeatureSet_JsonFormat_field_number:\n\t\t\t\tparent.IsJSONCompliant = v == genid.FeatureSet_ALLOW_enum_value\n\t\t\tcase genid.FeatureSet_EnforceNamingStyle_field_number:\n\t\t\t\t// EnforceNamingStyle is enforced in protoc, languages other than C++\n\t\t\t\t// are not supposed to do anything with this feature.\n\t\t\tcase genid.FeatureSet_DefaultSymbolVisibility_field_number:\n\t\t\t\t// DefaultSymbolVisibility is enforced in protoc, runtimes should not\n\t\t\t\t// inspect this value.\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"unknown field number %d while unmarshalling FeatureSet\", num))\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FeatureSet_Go_ext_number:\n\t\t\t\tparent = unmarshalGoFeature(v, parent)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn parent\n}\n\nfunc featuresFromParentDesc(parentDesc protoreflect.Descriptor) EditionFeatures {\n\tvar parentFS EditionFeatures\n\tswitch p := parentDesc.(type) {\n\tcase *File:\n\t\tparentFS = p.L1.EditionFeatures\n\tcase *Message:\n\t\tparentFS = p.L1.EditionFeatures\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unknown parent type %T\", parentDesc))\n\t}\n\treturn parentFS\n}\n\nfunc unmarshalEditionDefault(b []byte) {\n\tvar ed Edition\n\tvar fs EditionFeatures\n\tfor len(b) > 0 {\n\t\tnum, typ, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch typ {\n\t\tcase protowire.VarintType:\n\t\t\tv, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number:\n\t\t\t\ted = Edition(v)\n\t\t\t}\n\t\tcase protowire.BytesType:\n\t\t\tv, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tswitch num {\n\t\t\tcase genid.FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number:\n\t\t\t\tfs = unmarshalFeatureSet(v, fs)\n\t\t\tcase genid.FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number:\n\t\t\t\tfs = unmarshalFeatureSet(v, fs)\n\t\t\t}\n\t\t}\n\t}\n\tdefaultsCache[ed] = fs\n\tdefaultsKeys = append(defaultsKeys, ed)\n}\n\nfunc unmarshalEditionDefaults(b []byte) {\n\tfor len(b) > 0 {\n\t\tnum, _, n := protowire.ConsumeTag(b)\n\t\tb = b[n:]\n\t\tswitch num {\n\t\tcase genid.FeatureSetDefaults_Defaults_field_number:\n\t\t\tdef, m := protowire.ConsumeBytes(b)\n\t\t\tb = b[m:]\n\t\t\tunmarshalEditionDefault(def)\n\t\tcase genid.FeatureSetDefaults_MinimumEdition_field_number,\n\t\t\tgenid.FeatureSetDefaults_MaximumEdition_field_number:\n\t\t\t// We don't care about the minimum and maximum editions. If the\n\t\t\t// edition we are looking for later on is not in the cache we know\n\t\t\t// it is outside of the range between minimum and maximum edition.\n\t\t\t_, m := protowire.ConsumeVarint(b)\n\t\t\tb = b[m:]\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"unknown field number %d while unmarshalling EditionDefault\", num))\n\t\t}\n\t}\n}\n\nfunc getFeaturesFor(ed Edition) EditionFeatures {\n\tmatch := EditionUnknown\n\tfor _, key := range defaultsKeys {\n\t\tif key > ed {\n\t\t\tbreak\n\t\t}\n\t\tmatch = key\n\t}\n\tif match == EditionUnknown {\n\t\tpanic(fmt.Sprintf(\"unsupported edition: %v\", ed))\n\t}\n\treturn defaultsCache[match]\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport (\n\t\"google.golang.org/protobuf/internal/descopts\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nvar (\n\temptyNames           = new(Names)\n\temptyEnumRanges      = new(EnumRanges)\n\temptyFieldRanges     = new(FieldRanges)\n\temptyFieldNumbers    = new(FieldNumbers)\n\temptySourceLocations = new(SourceLocations)\n\n\temptyFiles      = new(FileImports)\n\temptyMessages   = new(Messages)\n\temptyFields     = new(Fields)\n\temptyOneofs     = new(Oneofs)\n\temptyEnums      = new(Enums)\n\temptyEnumValues = new(EnumValues)\n\temptyExtensions = new(Extensions)\n\temptyServices   = new(Services)\n)\n\n// PlaceholderFile is a placeholder, representing only the file path.\ntype PlaceholderFile string\n\nfunc (f PlaceholderFile) ParentFile() protoreflect.FileDescriptor       { return f }\nfunc (f PlaceholderFile) Parent() protoreflect.Descriptor               { return nil }\nfunc (f PlaceholderFile) Index() int                                    { return 0 }\nfunc (f PlaceholderFile) Syntax() protoreflect.Syntax                   { return 0 }\nfunc (f PlaceholderFile) Name() protoreflect.Name                       { return \"\" }\nfunc (f PlaceholderFile) FullName() protoreflect.FullName               { return \"\" }\nfunc (f PlaceholderFile) IsPlaceholder() bool                           { return true }\nfunc (f PlaceholderFile) Options() protoreflect.ProtoMessage            { return descopts.File }\nfunc (f PlaceholderFile) Path() string                                  { return string(f) }\nfunc (f PlaceholderFile) Package() protoreflect.FullName                { return \"\" }\nfunc (f PlaceholderFile) Imports() protoreflect.FileImports             { return emptyFiles }\nfunc (f PlaceholderFile) Messages() protoreflect.MessageDescriptors     { return emptyMessages }\nfunc (f PlaceholderFile) Enums() protoreflect.EnumDescriptors           { return emptyEnums }\nfunc (f PlaceholderFile) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions }\nfunc (f PlaceholderFile) Services() protoreflect.ServiceDescriptors     { return emptyServices }\nfunc (f PlaceholderFile) SourceLocations() protoreflect.SourceLocations { return emptySourceLocations }\nfunc (f PlaceholderFile) ProtoType(protoreflect.FileDescriptor)         { return }\nfunc (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement)           { return }\n\n// PlaceholderEnum is a placeholder, representing only the full name.\ntype PlaceholderEnum protoreflect.FullName\n\nfunc (e PlaceholderEnum) ParentFile() protoreflect.FileDescriptor   { return nil }\nfunc (e PlaceholderEnum) Parent() protoreflect.Descriptor           { return nil }\nfunc (e PlaceholderEnum) Index() int                                { return 0 }\nfunc (e PlaceholderEnum) Syntax() protoreflect.Syntax               { return 0 }\nfunc (e PlaceholderEnum) Name() protoreflect.Name                   { return protoreflect.FullName(e).Name() }\nfunc (e PlaceholderEnum) FullName() protoreflect.FullName           { return protoreflect.FullName(e) }\nfunc (e PlaceholderEnum) IsPlaceholder() bool                       { return true }\nfunc (e PlaceholderEnum) Options() protoreflect.ProtoMessage        { return descopts.Enum }\nfunc (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues }\nfunc (e PlaceholderEnum) ReservedNames() protoreflect.Names         { return emptyNames }\nfunc (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges   { return emptyEnumRanges }\nfunc (e PlaceholderEnum) IsClosed() bool                            { return false }\nfunc (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor)     { return }\nfunc (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement)       { return }\n\n// PlaceholderEnumValue is a placeholder, representing only the full name.\ntype PlaceholderEnumValue protoreflect.FullName\n\nfunc (e PlaceholderEnumValue) ParentFile() protoreflect.FileDescriptor    { return nil }\nfunc (e PlaceholderEnumValue) Parent() protoreflect.Descriptor            { return nil }\nfunc (e PlaceholderEnumValue) Index() int                                 { return 0 }\nfunc (e PlaceholderEnumValue) Syntax() protoreflect.Syntax                { return 0 }\nfunc (e PlaceholderEnumValue) Name() protoreflect.Name                    { return protoreflect.FullName(e).Name() }\nfunc (e PlaceholderEnumValue) FullName() protoreflect.FullName            { return protoreflect.FullName(e) }\nfunc (e PlaceholderEnumValue) IsPlaceholder() bool                        { return true }\nfunc (e PlaceholderEnumValue) Options() protoreflect.ProtoMessage         { return descopts.EnumValue }\nfunc (e PlaceholderEnumValue) Number() protoreflect.EnumNumber            { return 0 }\nfunc (e PlaceholderEnumValue) ProtoType(protoreflect.EnumValueDescriptor) { return }\nfunc (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement)        { return }\n\n// PlaceholderMessage is a placeholder, representing only the full name.\ntype PlaceholderMessage protoreflect.FullName\n\nfunc (m PlaceholderMessage) ParentFile() protoreflect.FileDescriptor    { return nil }\nfunc (m PlaceholderMessage) Parent() protoreflect.Descriptor            { return nil }\nfunc (m PlaceholderMessage) Index() int                                 { return 0 }\nfunc (m PlaceholderMessage) Syntax() protoreflect.Syntax                { return 0 }\nfunc (m PlaceholderMessage) Name() protoreflect.Name                    { return protoreflect.FullName(m).Name() }\nfunc (m PlaceholderMessage) FullName() protoreflect.FullName            { return protoreflect.FullName(m) }\nfunc (m PlaceholderMessage) IsPlaceholder() bool                        { return true }\nfunc (m PlaceholderMessage) Options() protoreflect.ProtoMessage         { return descopts.Message }\nfunc (m PlaceholderMessage) IsMapEntry() bool                           { return false }\nfunc (m PlaceholderMessage) Fields() protoreflect.FieldDescriptors      { return emptyFields }\nfunc (m PlaceholderMessage) Oneofs() protoreflect.OneofDescriptors      { return emptyOneofs }\nfunc (m PlaceholderMessage) ReservedNames() protoreflect.Names          { return emptyNames }\nfunc (m PlaceholderMessage) ReservedRanges() protoreflect.FieldRanges   { return emptyFieldRanges }\nfunc (m PlaceholderMessage) RequiredNumbers() protoreflect.FieldNumbers { return emptyFieldNumbers }\nfunc (m PlaceholderMessage) ExtensionRanges() protoreflect.FieldRanges  { return emptyFieldRanges }\nfunc (m PlaceholderMessage) ExtensionRangeOptions(int) protoreflect.ProtoMessage {\n\tpanic(\"index out of range\")\n}\nfunc (m PlaceholderMessage) Messages() protoreflect.MessageDescriptors     { return emptyMessages }\nfunc (m PlaceholderMessage) Enums() protoreflect.EnumDescriptors           { return emptyEnums }\nfunc (m PlaceholderMessage) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions }\nfunc (m PlaceholderMessage) ProtoType(protoreflect.MessageDescriptor)      { return }\nfunc (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement)           { return }\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filedesc/presence.go",
    "content": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage filedesc\n\nimport \"google.golang.org/protobuf/reflect/protoreflect\"\n\n// UsePresenceForField reports whether the presence bitmap should be used for\n// the specified field.\nfunc UsePresenceForField(fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) {\n\tswitch {\n\tcase fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():\n\t\t// Oneof fields never use the presence bitmap.\n\t\t//\n\t\t// Synthetic oneofs are an exception: Those are used to implement proto3\n\t\t// optional fields and hence should follow non-oneof field semantics.\n\t\treturn false, false\n\n\tcase fd.IsMap():\n\t\t// Map-typed fields never use the presence bitmap.\n\t\treturn false, false\n\n\tcase fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:\n\t\t// Lazy fields always use the presence bitmap (only messages can be lazy).\n\t\tisLazy := fd.(interface{ IsLazy() bool }).IsLazy()\n\t\treturn isLazy, isLazy\n\n\tdefault:\n\t\t// If the field has presence, use the presence bitmap.\n\t\treturn fd.HasPresence(), false\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/filetype/build.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package filetype provides functionality for wrapping descriptors\n// with Go type information.\npackage filetype\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/internal/descopts\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\tpimpl \"google.golang.org/protobuf/internal/impl\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\n// Builder constructs type descriptors from a raw file descriptor\n// and associated Go types for each enum and message declaration.\n//\n// # Flattened Ordering\n//\n// The protobuf type system represents declarations as a tree. Certain nodes in\n// the tree require us to either associate it with a concrete Go type or to\n// resolve a dependency, which is information that must be provided separately\n// since it cannot be derived from the file descriptor alone.\n//\n// However, representing a tree as Go literals is difficult to simply do in a\n// space and time efficient way. Thus, we store them as a flattened list of\n// objects where the serialization order from the tree-based form is important.\n//\n// The \"flattened ordering\" is defined as a tree traversal of all enum, message,\n// extension, and service declarations using the following algorithm:\n//\n//\tdef VisitFileDecls(fd):\n//\t\tfor e in fd.Enums:      yield e\n//\t\tfor m in fd.Messages:   yield m\n//\t\tfor x in fd.Extensions: yield x\n//\t\tfor s in fd.Services:   yield s\n//\t\tfor m in fd.Messages:   yield from VisitMessageDecls(m)\n//\n//\tdef VisitMessageDecls(md):\n//\t\tfor e in md.Enums:      yield e\n//\t\tfor m in md.Messages:   yield m\n//\t\tfor x in md.Extensions: yield x\n//\t\tfor m in md.Messages:   yield from VisitMessageDecls(m)\n//\n// The traversal starts at the root file descriptor and yields each direct\n// declaration within each node before traversing into sub-declarations\n// that children themselves may have.\ntype Builder struct {\n\t// File is the underlying file descriptor builder.\n\tFile filedesc.Builder\n\n\t// GoTypes is a unique set of the Go types for all declarations and\n\t// dependencies. Each type is represented as a zero value of the Go type.\n\t//\n\t// Declarations are Go types generated for enums and messages directly\n\t// declared (not publicly imported) in the proto source file.\n\t// Messages for map entries are accounted for, but represented by nil.\n\t// Enum declarations in \"flattened ordering\" come first, followed by\n\t// message declarations in \"flattened ordering\".\n\t//\n\t// Dependencies are Go types for enums or messages referenced by\n\t// message fields, for parent extended messages of\n\t// extension fields, for enums or messages referenced by extension fields,\n\t// and for input and output messages referenced by service methods.\n\t// Dependencies must come after declarations, but the ordering of\n\t// dependencies themselves is unspecified.\n\tGoTypes []any\n\n\t// DependencyIndexes is an ordered list of indexes into GoTypes for the\n\t// dependencies of messages, extensions, or services.\n\t//\n\t// There are 5 sub-lists in \"flattened ordering\" concatenated back-to-back:\n\t//\t0. Message field dependencies: list of the enum or message type\n\t//\treferred to by every message field.\n\t//\t1. Extension field targets: list of the extended parent message of\n\t//\tevery extension.\n\t//\t2. Extension field dependencies: list of the enum or message type\n\t//\treferred to by every extension field.\n\t//\t3. Service method inputs: list of the input message type\n\t//\treferred to by every service method.\n\t//\t4. Service method outputs: list of the output message type\n\t//\treferred to by every service method.\n\t//\n\t// The offset into DependencyIndexes for the start of each sub-list\n\t// is appended to the end in reverse order.\n\tDependencyIndexes []int32\n\n\t// EnumInfos is a list of enum infos in \"flattened ordering\".\n\tEnumInfos []pimpl.EnumInfo\n\n\t// MessageInfos is a list of message infos in \"flattened ordering\".\n\t// If provided, the GoType and PBType for each element is populated.\n\t//\n\t// Requirement: len(MessageInfos) == len(Build.Messages)\n\tMessageInfos []pimpl.MessageInfo\n\n\t// ExtensionInfos is a list of extension infos in \"flattened ordering\".\n\t// Each element is initialized and registered with the protoregistry package.\n\t//\n\t// Requirement: len(LegacyExtensions) == len(Build.Extensions)\n\tExtensionInfos []pimpl.ExtensionInfo\n\n\t// TypeRegistry is the registry to register each type descriptor.\n\t// If nil, it uses protoregistry.GlobalTypes.\n\tTypeRegistry interface {\n\t\tRegisterMessage(protoreflect.MessageType) error\n\t\tRegisterEnum(protoreflect.EnumType) error\n\t\tRegisterExtension(protoreflect.ExtensionType) error\n\t}\n}\n\n// Out is the output of the builder.\ntype Out struct {\n\tFile protoreflect.FileDescriptor\n}\n\nfunc (tb Builder) Build() (out Out) {\n\t// Replace the resolver with one that resolves dependencies by index,\n\t// which is faster and more reliable than relying on the global registry.\n\tif tb.File.FileRegistry == nil {\n\t\ttb.File.FileRegistry = protoregistry.GlobalFiles\n\t}\n\ttb.File.FileRegistry = &resolverByIndex{\n\t\tgoTypes:      tb.GoTypes,\n\t\tdepIdxs:      tb.DependencyIndexes,\n\t\tfileRegistry: tb.File.FileRegistry,\n\t}\n\n\t// Initialize registry if unpopulated.\n\tif tb.TypeRegistry == nil {\n\t\ttb.TypeRegistry = protoregistry.GlobalTypes\n\t}\n\n\tfbOut := tb.File.Build()\n\tout.File = fbOut.File\n\n\t// Process enums.\n\tenumGoTypes := tb.GoTypes[:len(fbOut.Enums)]\n\tif len(tb.EnumInfos) != len(fbOut.Enums) {\n\t\tpanic(\"mismatching enum lengths\")\n\t}\n\tif len(fbOut.Enums) > 0 {\n\t\tfor i := range fbOut.Enums {\n\t\t\ttb.EnumInfos[i] = pimpl.EnumInfo{\n\t\t\t\tGoReflectType: reflect.TypeOf(enumGoTypes[i]),\n\t\t\t\tDesc:          &fbOut.Enums[i],\n\t\t\t}\n\t\t\t// Register enum types.\n\t\t\tif err := tb.TypeRegistry.RegisterEnum(&tb.EnumInfos[i]); err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Process messages.\n\tmessageGoTypes := tb.GoTypes[len(fbOut.Enums):][:len(fbOut.Messages)]\n\tif len(tb.MessageInfos) != len(fbOut.Messages) {\n\t\tpanic(\"mismatching message lengths\")\n\t}\n\tif len(fbOut.Messages) > 0 {\n\t\tfor i := range fbOut.Messages {\n\t\t\tif messageGoTypes[i] == nil {\n\t\t\t\tcontinue // skip map entry\n\t\t\t}\n\n\t\t\ttb.MessageInfos[i].GoReflectType = reflect.TypeOf(messageGoTypes[i])\n\t\t\ttb.MessageInfos[i].Desc = &fbOut.Messages[i]\n\n\t\t\t// Register message types.\n\t\t\tif err := tb.TypeRegistry.RegisterMessage(&tb.MessageInfos[i]); err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\t\t}\n\n\t\t// As a special-case for descriptor.proto,\n\t\t// locally register concrete message type for the options.\n\t\tif out.File.Path() == \"google/protobuf/descriptor.proto\" && out.File.Package() == \"google.protobuf\" {\n\t\t\tfor i := range fbOut.Messages {\n\t\t\t\tswitch fbOut.Messages[i].Name() {\n\t\t\t\tcase \"FileOptions\":\n\t\t\t\t\tdescopts.File = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"EnumOptions\":\n\t\t\t\t\tdescopts.Enum = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"EnumValueOptions\":\n\t\t\t\t\tdescopts.EnumValue = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"MessageOptions\":\n\t\t\t\t\tdescopts.Message = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"FieldOptions\":\n\t\t\t\t\tdescopts.Field = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"OneofOptions\":\n\t\t\t\t\tdescopts.Oneof = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"ExtensionRangeOptions\":\n\t\t\t\t\tdescopts.ExtensionRange = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"ServiceOptions\":\n\t\t\t\t\tdescopts.Service = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\tcase \"MethodOptions\":\n\t\t\t\t\tdescopts.Method = messageGoTypes[i].(protoreflect.ProtoMessage)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Process extensions.\n\tif len(tb.ExtensionInfos) != len(fbOut.Extensions) {\n\t\tpanic(\"mismatching extension lengths\")\n\t}\n\tvar depIdx int32\n\tfor i := range fbOut.Extensions {\n\t\t// For enum and message kinds, determine the referent Go type so\n\t\t// that we can construct their constructors.\n\t\tconst listExtDeps = 2\n\t\tvar goType reflect.Type\n\t\tswitch fbOut.Extensions[i].L1.Kind {\n\t\tcase protoreflect.EnumKind:\n\t\t\tj := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx)\n\t\t\tgoType = reflect.TypeOf(tb.GoTypes[j])\n\t\t\tdepIdx++\n\t\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\t\tj := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx)\n\t\t\tgoType = reflect.TypeOf(tb.GoTypes[j])\n\t\t\tdepIdx++\n\t\tdefault:\n\t\t\tgoType = goTypeForPBKind[fbOut.Extensions[i].L1.Kind]\n\t\t}\n\t\tif fbOut.Extensions[i].IsList() {\n\t\t\tgoType = reflect.SliceOf(goType)\n\t\t}\n\n\t\tpimpl.InitExtensionInfo(&tb.ExtensionInfos[i], &fbOut.Extensions[i], goType)\n\n\t\t// Register extension types.\n\t\tif err := tb.TypeRegistry.RegisterExtension(&tb.ExtensionInfos[i]); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn out\n}\n\nvar goTypeForPBKind = map[protoreflect.Kind]reflect.Type{\n\tprotoreflect.BoolKind:     reflect.TypeOf(bool(false)),\n\tprotoreflect.Int32Kind:    reflect.TypeOf(int32(0)),\n\tprotoreflect.Sint32Kind:   reflect.TypeOf(int32(0)),\n\tprotoreflect.Sfixed32Kind: reflect.TypeOf(int32(0)),\n\tprotoreflect.Int64Kind:    reflect.TypeOf(int64(0)),\n\tprotoreflect.Sint64Kind:   reflect.TypeOf(int64(0)),\n\tprotoreflect.Sfixed64Kind: reflect.TypeOf(int64(0)),\n\tprotoreflect.Uint32Kind:   reflect.TypeOf(uint32(0)),\n\tprotoreflect.Fixed32Kind:  reflect.TypeOf(uint32(0)),\n\tprotoreflect.Uint64Kind:   reflect.TypeOf(uint64(0)),\n\tprotoreflect.Fixed64Kind:  reflect.TypeOf(uint64(0)),\n\tprotoreflect.FloatKind:    reflect.TypeOf(float32(0)),\n\tprotoreflect.DoubleKind:   reflect.TypeOf(float64(0)),\n\tprotoreflect.StringKind:   reflect.TypeOf(string(\"\")),\n\tprotoreflect.BytesKind:    reflect.TypeOf([]byte(nil)),\n}\n\ntype depIdxs []int32\n\n// Get retrieves the jth element of the ith sub-list.\nfunc (x depIdxs) Get(i, j int32) int32 {\n\treturn x[x[int32(len(x))-i-1]+j]\n}\n\ntype (\n\tresolverByIndex struct {\n\t\tgoTypes []any\n\t\tdepIdxs depIdxs\n\t\tfileRegistry\n\t}\n\tfileRegistry interface {\n\t\tFindFileByPath(string) (protoreflect.FileDescriptor, error)\n\t\tFindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)\n\t\tRegisterFile(protoreflect.FileDescriptor) error\n\t}\n)\n\nfunc (r *resolverByIndex) FindEnumByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.EnumDescriptor {\n\tif depIdx := int(r.depIdxs.Get(i, j)); int(depIdx) < len(es)+len(ms) {\n\t\treturn &es[depIdx]\n\t} else {\n\t\treturn pimpl.Export{}.EnumDescriptorOf(r.goTypes[depIdx])\n\t}\n}\n\nfunc (r *resolverByIndex) FindMessageByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.MessageDescriptor {\n\tif depIdx := int(r.depIdxs.Get(i, j)); depIdx < len(es)+len(ms) {\n\t\treturn &ms[depIdx-len(es)]\n\t} else {\n\t\treturn pimpl.Export{}.MessageDescriptorOf(r.goTypes[depIdx])\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/flags/flags.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package flags provides a set of flags controlled by build tags.\npackage flags\n\n// ProtoLegacy specifies whether to enable support for legacy functionality\n// such as MessageSets, and various other obscure behavior\n// that is necessary to maintain backwards compatibility with proto1 or\n// the pre-release variants of proto2 and proto3.\n//\n// This is disabled by default unless built with the \"protolegacy\" tag.\n//\n// WARNING: The compatibility agreement covers nothing provided by this flag.\n// As such, functionality may suddenly be removed or changed at our discretion.\nconst ProtoLegacy = protoLegacy\n\n// LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions.\n//\n// Lazy extension unmarshaling validates the contents of message-valued\n// extension fields at unmarshal time, but defers creating the message\n// structure until the extension is first accessed.\nconst LazyUnmarshalExtensions = ProtoLegacy\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !protolegacy\n// +build !protolegacy\n\npackage flags\n\nconst protoLegacy = false\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build protolegacy\n// +build protolegacy\n\npackage flags\n\nconst protoLegacy = true\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/any_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_any_proto = \"google/protobuf/any.proto\"\n\n// Names for google.protobuf.Any.\nconst (\n\tAny_message_name     protoreflect.Name     = \"Any\"\n\tAny_message_fullname protoreflect.FullName = \"google.protobuf.Any\"\n)\n\n// Field names for google.protobuf.Any.\nconst (\n\tAny_TypeUrl_field_name protoreflect.Name = \"type_url\"\n\tAny_Value_field_name   protoreflect.Name = \"value\"\n\n\tAny_TypeUrl_field_fullname protoreflect.FullName = \"google.protobuf.Any.type_url\"\n\tAny_Value_field_fullname   protoreflect.FullName = \"google.protobuf.Any.value\"\n)\n\n// Field numbers for google.protobuf.Any.\nconst (\n\tAny_TypeUrl_field_number protoreflect.FieldNumber = 1\n\tAny_Value_field_number   protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/api_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_api_proto = \"google/protobuf/api.proto\"\n\n// Names for google.protobuf.Api.\nconst (\n\tApi_message_name     protoreflect.Name     = \"Api\"\n\tApi_message_fullname protoreflect.FullName = \"google.protobuf.Api\"\n)\n\n// Field names for google.protobuf.Api.\nconst (\n\tApi_Name_field_name          protoreflect.Name = \"name\"\n\tApi_Methods_field_name       protoreflect.Name = \"methods\"\n\tApi_Options_field_name       protoreflect.Name = \"options\"\n\tApi_Version_field_name       protoreflect.Name = \"version\"\n\tApi_SourceContext_field_name protoreflect.Name = \"source_context\"\n\tApi_Mixins_field_name        protoreflect.Name = \"mixins\"\n\tApi_Syntax_field_name        protoreflect.Name = \"syntax\"\n\tApi_Edition_field_name       protoreflect.Name = \"edition\"\n\n\tApi_Name_field_fullname          protoreflect.FullName = \"google.protobuf.Api.name\"\n\tApi_Methods_field_fullname       protoreflect.FullName = \"google.protobuf.Api.methods\"\n\tApi_Options_field_fullname       protoreflect.FullName = \"google.protobuf.Api.options\"\n\tApi_Version_field_fullname       protoreflect.FullName = \"google.protobuf.Api.version\"\n\tApi_SourceContext_field_fullname protoreflect.FullName = \"google.protobuf.Api.source_context\"\n\tApi_Mixins_field_fullname        protoreflect.FullName = \"google.protobuf.Api.mixins\"\n\tApi_Syntax_field_fullname        protoreflect.FullName = \"google.protobuf.Api.syntax\"\n\tApi_Edition_field_fullname       protoreflect.FullName = \"google.protobuf.Api.edition\"\n)\n\n// Field numbers for google.protobuf.Api.\nconst (\n\tApi_Name_field_number          protoreflect.FieldNumber = 1\n\tApi_Methods_field_number       protoreflect.FieldNumber = 2\n\tApi_Options_field_number       protoreflect.FieldNumber = 3\n\tApi_Version_field_number       protoreflect.FieldNumber = 4\n\tApi_SourceContext_field_number protoreflect.FieldNumber = 5\n\tApi_Mixins_field_number        protoreflect.FieldNumber = 6\n\tApi_Syntax_field_number        protoreflect.FieldNumber = 7\n\tApi_Edition_field_number       protoreflect.FieldNumber = 8\n)\n\n// Names for google.protobuf.Method.\nconst (\n\tMethod_message_name     protoreflect.Name     = \"Method\"\n\tMethod_message_fullname protoreflect.FullName = \"google.protobuf.Method\"\n)\n\n// Field names for google.protobuf.Method.\nconst (\n\tMethod_Name_field_name              protoreflect.Name = \"name\"\n\tMethod_RequestTypeUrl_field_name    protoreflect.Name = \"request_type_url\"\n\tMethod_RequestStreaming_field_name  protoreflect.Name = \"request_streaming\"\n\tMethod_ResponseTypeUrl_field_name   protoreflect.Name = \"response_type_url\"\n\tMethod_ResponseStreaming_field_name protoreflect.Name = \"response_streaming\"\n\tMethod_Options_field_name           protoreflect.Name = \"options\"\n\tMethod_Syntax_field_name            protoreflect.Name = \"syntax\"\n\tMethod_Edition_field_name           protoreflect.Name = \"edition\"\n\n\tMethod_Name_field_fullname              protoreflect.FullName = \"google.protobuf.Method.name\"\n\tMethod_RequestTypeUrl_field_fullname    protoreflect.FullName = \"google.protobuf.Method.request_type_url\"\n\tMethod_RequestStreaming_field_fullname  protoreflect.FullName = \"google.protobuf.Method.request_streaming\"\n\tMethod_ResponseTypeUrl_field_fullname   protoreflect.FullName = \"google.protobuf.Method.response_type_url\"\n\tMethod_ResponseStreaming_field_fullname protoreflect.FullName = \"google.protobuf.Method.response_streaming\"\n\tMethod_Options_field_fullname           protoreflect.FullName = \"google.protobuf.Method.options\"\n\tMethod_Syntax_field_fullname            protoreflect.FullName = \"google.protobuf.Method.syntax\"\n\tMethod_Edition_field_fullname           protoreflect.FullName = \"google.protobuf.Method.edition\"\n)\n\n// Field numbers for google.protobuf.Method.\nconst (\n\tMethod_Name_field_number              protoreflect.FieldNumber = 1\n\tMethod_RequestTypeUrl_field_number    protoreflect.FieldNumber = 2\n\tMethod_RequestStreaming_field_number  protoreflect.FieldNumber = 3\n\tMethod_ResponseTypeUrl_field_number   protoreflect.FieldNumber = 4\n\tMethod_ResponseStreaming_field_number protoreflect.FieldNumber = 5\n\tMethod_Options_field_number           protoreflect.FieldNumber = 6\n\tMethod_Syntax_field_number            protoreflect.FieldNumber = 7\n\tMethod_Edition_field_number           protoreflect.FieldNumber = 8\n)\n\n// Names for google.protobuf.Mixin.\nconst (\n\tMixin_message_name     protoreflect.Name     = \"Mixin\"\n\tMixin_message_fullname protoreflect.FullName = \"google.protobuf.Mixin\"\n)\n\n// Field names for google.protobuf.Mixin.\nconst (\n\tMixin_Name_field_name protoreflect.Name = \"name\"\n\tMixin_Root_field_name protoreflect.Name = \"root\"\n\n\tMixin_Name_field_fullname protoreflect.FullName = \"google.protobuf.Mixin.name\"\n\tMixin_Root_field_fullname protoreflect.FullName = \"google.protobuf.Mixin.root\"\n)\n\n// Field numbers for google.protobuf.Mixin.\nconst (\n\tMixin_Name_field_number protoreflect.FieldNumber = 1\n\tMixin_Root_field_number protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_descriptor_proto = \"google/protobuf/descriptor.proto\"\n\n// Full and short names for google.protobuf.Edition.\nconst (\n\tEdition_enum_fullname = \"google.protobuf.Edition\"\n\tEdition_enum_name     = \"Edition\"\n)\n\n// Enum values for google.protobuf.Edition.\nconst (\n\tEdition_EDITION_UNKNOWN_enum_value         = 0\n\tEdition_EDITION_LEGACY_enum_value          = 900\n\tEdition_EDITION_PROTO2_enum_value          = 998\n\tEdition_EDITION_PROTO3_enum_value          = 999\n\tEdition_EDITION_2023_enum_value            = 1000\n\tEdition_EDITION_2024_enum_value            = 1001\n\tEdition_EDITION_UNSTABLE_enum_value        = 9999\n\tEdition_EDITION_1_TEST_ONLY_enum_value     = 1\n\tEdition_EDITION_2_TEST_ONLY_enum_value     = 2\n\tEdition_EDITION_99997_TEST_ONLY_enum_value = 99997\n\tEdition_EDITION_99998_TEST_ONLY_enum_value = 99998\n\tEdition_EDITION_99999_TEST_ONLY_enum_value = 99999\n\tEdition_EDITION_MAX_enum_value             = 2147483647\n)\n\n// Full and short names for google.protobuf.SymbolVisibility.\nconst (\n\tSymbolVisibility_enum_fullname = \"google.protobuf.SymbolVisibility\"\n\tSymbolVisibility_enum_name     = \"SymbolVisibility\"\n)\n\n// Enum values for google.protobuf.SymbolVisibility.\nconst (\n\tSymbolVisibility_VISIBILITY_UNSET_enum_value  = 0\n\tSymbolVisibility_VISIBILITY_LOCAL_enum_value  = 1\n\tSymbolVisibility_VISIBILITY_EXPORT_enum_value = 2\n)\n\n// Names for google.protobuf.FileDescriptorSet.\nconst (\n\tFileDescriptorSet_message_name     protoreflect.Name     = \"FileDescriptorSet\"\n\tFileDescriptorSet_message_fullname protoreflect.FullName = \"google.protobuf.FileDescriptorSet\"\n)\n\n// Field names for google.protobuf.FileDescriptorSet.\nconst (\n\tFileDescriptorSet_File_field_name protoreflect.Name = \"file\"\n\n\tFileDescriptorSet_File_field_fullname protoreflect.FullName = \"google.protobuf.FileDescriptorSet.file\"\n)\n\n// Field numbers for google.protobuf.FileDescriptorSet.\nconst (\n\tFileDescriptorSet_File_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.FileDescriptorProto.\nconst (\n\tFileDescriptorProto_message_name     protoreflect.Name     = \"FileDescriptorProto\"\n\tFileDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.FileDescriptorProto\"\n)\n\n// Field names for google.protobuf.FileDescriptorProto.\nconst (\n\tFileDescriptorProto_Name_field_name             protoreflect.Name = \"name\"\n\tFileDescriptorProto_Package_field_name          protoreflect.Name = \"package\"\n\tFileDescriptorProto_Dependency_field_name       protoreflect.Name = \"dependency\"\n\tFileDescriptorProto_PublicDependency_field_name protoreflect.Name = \"public_dependency\"\n\tFileDescriptorProto_WeakDependency_field_name   protoreflect.Name = \"weak_dependency\"\n\tFileDescriptorProto_OptionDependency_field_name protoreflect.Name = \"option_dependency\"\n\tFileDescriptorProto_MessageType_field_name      protoreflect.Name = \"message_type\"\n\tFileDescriptorProto_EnumType_field_name         protoreflect.Name = \"enum_type\"\n\tFileDescriptorProto_Service_field_name          protoreflect.Name = \"service\"\n\tFileDescriptorProto_Extension_field_name        protoreflect.Name = \"extension\"\n\tFileDescriptorProto_Options_field_name          protoreflect.Name = \"options\"\n\tFileDescriptorProto_SourceCodeInfo_field_name   protoreflect.Name = \"source_code_info\"\n\tFileDescriptorProto_Syntax_field_name           protoreflect.Name = \"syntax\"\n\tFileDescriptorProto_Edition_field_name          protoreflect.Name = \"edition\"\n\n\tFileDescriptorProto_Name_field_fullname             protoreflect.FullName = \"google.protobuf.FileDescriptorProto.name\"\n\tFileDescriptorProto_Package_field_fullname          protoreflect.FullName = \"google.protobuf.FileDescriptorProto.package\"\n\tFileDescriptorProto_Dependency_field_fullname       protoreflect.FullName = \"google.protobuf.FileDescriptorProto.dependency\"\n\tFileDescriptorProto_PublicDependency_field_fullname protoreflect.FullName = \"google.protobuf.FileDescriptorProto.public_dependency\"\n\tFileDescriptorProto_WeakDependency_field_fullname   protoreflect.FullName = \"google.protobuf.FileDescriptorProto.weak_dependency\"\n\tFileDescriptorProto_OptionDependency_field_fullname protoreflect.FullName = \"google.protobuf.FileDescriptorProto.option_dependency\"\n\tFileDescriptorProto_MessageType_field_fullname      protoreflect.FullName = \"google.protobuf.FileDescriptorProto.message_type\"\n\tFileDescriptorProto_EnumType_field_fullname         protoreflect.FullName = \"google.protobuf.FileDescriptorProto.enum_type\"\n\tFileDescriptorProto_Service_field_fullname          protoreflect.FullName = \"google.protobuf.FileDescriptorProto.service\"\n\tFileDescriptorProto_Extension_field_fullname        protoreflect.FullName = \"google.protobuf.FileDescriptorProto.extension\"\n\tFileDescriptorProto_Options_field_fullname          protoreflect.FullName = \"google.protobuf.FileDescriptorProto.options\"\n\tFileDescriptorProto_SourceCodeInfo_field_fullname   protoreflect.FullName = \"google.protobuf.FileDescriptorProto.source_code_info\"\n\tFileDescriptorProto_Syntax_field_fullname           protoreflect.FullName = \"google.protobuf.FileDescriptorProto.syntax\"\n\tFileDescriptorProto_Edition_field_fullname          protoreflect.FullName = \"google.protobuf.FileDescriptorProto.edition\"\n)\n\n// Field numbers for google.protobuf.FileDescriptorProto.\nconst (\n\tFileDescriptorProto_Name_field_number             protoreflect.FieldNumber = 1\n\tFileDescriptorProto_Package_field_number          protoreflect.FieldNumber = 2\n\tFileDescriptorProto_Dependency_field_number       protoreflect.FieldNumber = 3\n\tFileDescriptorProto_PublicDependency_field_number protoreflect.FieldNumber = 10\n\tFileDescriptorProto_WeakDependency_field_number   protoreflect.FieldNumber = 11\n\tFileDescriptorProto_OptionDependency_field_number protoreflect.FieldNumber = 15\n\tFileDescriptorProto_MessageType_field_number      protoreflect.FieldNumber = 4\n\tFileDescriptorProto_EnumType_field_number         protoreflect.FieldNumber = 5\n\tFileDescriptorProto_Service_field_number          protoreflect.FieldNumber = 6\n\tFileDescriptorProto_Extension_field_number        protoreflect.FieldNumber = 7\n\tFileDescriptorProto_Options_field_number          protoreflect.FieldNumber = 8\n\tFileDescriptorProto_SourceCodeInfo_field_number   protoreflect.FieldNumber = 9\n\tFileDescriptorProto_Syntax_field_number           protoreflect.FieldNumber = 12\n\tFileDescriptorProto_Edition_field_number          protoreflect.FieldNumber = 14\n)\n\n// Names for google.protobuf.DescriptorProto.\nconst (\n\tDescriptorProto_message_name     protoreflect.Name     = \"DescriptorProto\"\n\tDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto\"\n)\n\n// Field names for google.protobuf.DescriptorProto.\nconst (\n\tDescriptorProto_Name_field_name           protoreflect.Name = \"name\"\n\tDescriptorProto_Field_field_name          protoreflect.Name = \"field\"\n\tDescriptorProto_Extension_field_name      protoreflect.Name = \"extension\"\n\tDescriptorProto_NestedType_field_name     protoreflect.Name = \"nested_type\"\n\tDescriptorProto_EnumType_field_name       protoreflect.Name = \"enum_type\"\n\tDescriptorProto_ExtensionRange_field_name protoreflect.Name = \"extension_range\"\n\tDescriptorProto_OneofDecl_field_name      protoreflect.Name = \"oneof_decl\"\n\tDescriptorProto_Options_field_name        protoreflect.Name = \"options\"\n\tDescriptorProto_ReservedRange_field_name  protoreflect.Name = \"reserved_range\"\n\tDescriptorProto_ReservedName_field_name   protoreflect.Name = \"reserved_name\"\n\tDescriptorProto_Visibility_field_name     protoreflect.Name = \"visibility\"\n\n\tDescriptorProto_Name_field_fullname           protoreflect.FullName = \"google.protobuf.DescriptorProto.name\"\n\tDescriptorProto_Field_field_fullname          protoreflect.FullName = \"google.protobuf.DescriptorProto.field\"\n\tDescriptorProto_Extension_field_fullname      protoreflect.FullName = \"google.protobuf.DescriptorProto.extension\"\n\tDescriptorProto_NestedType_field_fullname     protoreflect.FullName = \"google.protobuf.DescriptorProto.nested_type\"\n\tDescriptorProto_EnumType_field_fullname       protoreflect.FullName = \"google.protobuf.DescriptorProto.enum_type\"\n\tDescriptorProto_ExtensionRange_field_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto.extension_range\"\n\tDescriptorProto_OneofDecl_field_fullname      protoreflect.FullName = \"google.protobuf.DescriptorProto.oneof_decl\"\n\tDescriptorProto_Options_field_fullname        protoreflect.FullName = \"google.protobuf.DescriptorProto.options\"\n\tDescriptorProto_ReservedRange_field_fullname  protoreflect.FullName = \"google.protobuf.DescriptorProto.reserved_range\"\n\tDescriptorProto_ReservedName_field_fullname   protoreflect.FullName = \"google.protobuf.DescriptorProto.reserved_name\"\n\tDescriptorProto_Visibility_field_fullname     protoreflect.FullName = \"google.protobuf.DescriptorProto.visibility\"\n)\n\n// Field numbers for google.protobuf.DescriptorProto.\nconst (\n\tDescriptorProto_Name_field_number           protoreflect.FieldNumber = 1\n\tDescriptorProto_Field_field_number          protoreflect.FieldNumber = 2\n\tDescriptorProto_Extension_field_number      protoreflect.FieldNumber = 6\n\tDescriptorProto_NestedType_field_number     protoreflect.FieldNumber = 3\n\tDescriptorProto_EnumType_field_number       protoreflect.FieldNumber = 4\n\tDescriptorProto_ExtensionRange_field_number protoreflect.FieldNumber = 5\n\tDescriptorProto_OneofDecl_field_number      protoreflect.FieldNumber = 8\n\tDescriptorProto_Options_field_number        protoreflect.FieldNumber = 7\n\tDescriptorProto_ReservedRange_field_number  protoreflect.FieldNumber = 9\n\tDescriptorProto_ReservedName_field_number   protoreflect.FieldNumber = 10\n\tDescriptorProto_Visibility_field_number     protoreflect.FieldNumber = 11\n)\n\n// Names for google.protobuf.DescriptorProto.ExtensionRange.\nconst (\n\tDescriptorProto_ExtensionRange_message_name     protoreflect.Name     = \"ExtensionRange\"\n\tDescriptorProto_ExtensionRange_message_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto.ExtensionRange\"\n)\n\n// Field names for google.protobuf.DescriptorProto.ExtensionRange.\nconst (\n\tDescriptorProto_ExtensionRange_Start_field_name   protoreflect.Name = \"start\"\n\tDescriptorProto_ExtensionRange_End_field_name     protoreflect.Name = \"end\"\n\tDescriptorProto_ExtensionRange_Options_field_name protoreflect.Name = \"options\"\n\n\tDescriptorProto_ExtensionRange_Start_field_fullname   protoreflect.FullName = \"google.protobuf.DescriptorProto.ExtensionRange.start\"\n\tDescriptorProto_ExtensionRange_End_field_fullname     protoreflect.FullName = \"google.protobuf.DescriptorProto.ExtensionRange.end\"\n\tDescriptorProto_ExtensionRange_Options_field_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto.ExtensionRange.options\"\n)\n\n// Field numbers for google.protobuf.DescriptorProto.ExtensionRange.\nconst (\n\tDescriptorProto_ExtensionRange_Start_field_number   protoreflect.FieldNumber = 1\n\tDescriptorProto_ExtensionRange_End_field_number     protoreflect.FieldNumber = 2\n\tDescriptorProto_ExtensionRange_Options_field_number protoreflect.FieldNumber = 3\n)\n\n// Names for google.protobuf.DescriptorProto.ReservedRange.\nconst (\n\tDescriptorProto_ReservedRange_message_name     protoreflect.Name     = \"ReservedRange\"\n\tDescriptorProto_ReservedRange_message_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto.ReservedRange\"\n)\n\n// Field names for google.protobuf.DescriptorProto.ReservedRange.\nconst (\n\tDescriptorProto_ReservedRange_Start_field_name protoreflect.Name = \"start\"\n\tDescriptorProto_ReservedRange_End_field_name   protoreflect.Name = \"end\"\n\n\tDescriptorProto_ReservedRange_Start_field_fullname protoreflect.FullName = \"google.protobuf.DescriptorProto.ReservedRange.start\"\n\tDescriptorProto_ReservedRange_End_field_fullname   protoreflect.FullName = \"google.protobuf.DescriptorProto.ReservedRange.end\"\n)\n\n// Field numbers for google.protobuf.DescriptorProto.ReservedRange.\nconst (\n\tDescriptorProto_ReservedRange_Start_field_number protoreflect.FieldNumber = 1\n\tDescriptorProto_ReservedRange_End_field_number   protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.ExtensionRangeOptions.\nconst (\n\tExtensionRangeOptions_message_name     protoreflect.Name     = \"ExtensionRangeOptions\"\n\tExtensionRangeOptions_message_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions\"\n)\n\n// Field names for google.protobuf.ExtensionRangeOptions.\nconst (\n\tExtensionRangeOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\tExtensionRangeOptions_Declaration_field_name         protoreflect.Name = \"declaration\"\n\tExtensionRangeOptions_Features_field_name            protoreflect.Name = \"features\"\n\tExtensionRangeOptions_Verification_field_name        protoreflect.Name = \"verification\"\n\n\tExtensionRangeOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.uninterpreted_option\"\n\tExtensionRangeOptions_Declaration_field_fullname         protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.declaration\"\n\tExtensionRangeOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.features\"\n\tExtensionRangeOptions_Verification_field_fullname        protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.verification\"\n)\n\n// Field numbers for google.protobuf.ExtensionRangeOptions.\nconst (\n\tExtensionRangeOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n\tExtensionRangeOptions_Declaration_field_number         protoreflect.FieldNumber = 2\n\tExtensionRangeOptions_Features_field_number            protoreflect.FieldNumber = 50\n\tExtensionRangeOptions_Verification_field_number        protoreflect.FieldNumber = 3\n)\n\n// Full and short names for google.protobuf.ExtensionRangeOptions.VerificationState.\nconst (\n\tExtensionRangeOptions_VerificationState_enum_fullname = \"google.protobuf.ExtensionRangeOptions.VerificationState\"\n\tExtensionRangeOptions_VerificationState_enum_name     = \"VerificationState\"\n)\n\n// Enum values for google.protobuf.ExtensionRangeOptions.VerificationState.\nconst (\n\tExtensionRangeOptions_DECLARATION_enum_value = 0\n\tExtensionRangeOptions_UNVERIFIED_enum_value  = 1\n)\n\n// Names for google.protobuf.ExtensionRangeOptions.Declaration.\nconst (\n\tExtensionRangeOptions_Declaration_message_name     protoreflect.Name     = \"Declaration\"\n\tExtensionRangeOptions_Declaration_message_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration\"\n)\n\n// Field names for google.protobuf.ExtensionRangeOptions.Declaration.\nconst (\n\tExtensionRangeOptions_Declaration_Number_field_name   protoreflect.Name = \"number\"\n\tExtensionRangeOptions_Declaration_FullName_field_name protoreflect.Name = \"full_name\"\n\tExtensionRangeOptions_Declaration_Type_field_name     protoreflect.Name = \"type\"\n\tExtensionRangeOptions_Declaration_Reserved_field_name protoreflect.Name = \"reserved\"\n\tExtensionRangeOptions_Declaration_Repeated_field_name protoreflect.Name = \"repeated\"\n\n\tExtensionRangeOptions_Declaration_Number_field_fullname   protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration.number\"\n\tExtensionRangeOptions_Declaration_FullName_field_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration.full_name\"\n\tExtensionRangeOptions_Declaration_Type_field_fullname     protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration.type\"\n\tExtensionRangeOptions_Declaration_Reserved_field_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration.reserved\"\n\tExtensionRangeOptions_Declaration_Repeated_field_fullname protoreflect.FullName = \"google.protobuf.ExtensionRangeOptions.Declaration.repeated\"\n)\n\n// Field numbers for google.protobuf.ExtensionRangeOptions.Declaration.\nconst (\n\tExtensionRangeOptions_Declaration_Number_field_number   protoreflect.FieldNumber = 1\n\tExtensionRangeOptions_Declaration_FullName_field_number protoreflect.FieldNumber = 2\n\tExtensionRangeOptions_Declaration_Type_field_number     protoreflect.FieldNumber = 3\n\tExtensionRangeOptions_Declaration_Reserved_field_number protoreflect.FieldNumber = 5\n\tExtensionRangeOptions_Declaration_Repeated_field_number protoreflect.FieldNumber = 6\n)\n\n// Names for google.protobuf.FieldDescriptorProto.\nconst (\n\tFieldDescriptorProto_message_name     protoreflect.Name     = \"FieldDescriptorProto\"\n\tFieldDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.FieldDescriptorProto\"\n)\n\n// Field names for google.protobuf.FieldDescriptorProto.\nconst (\n\tFieldDescriptorProto_Name_field_name           protoreflect.Name = \"name\"\n\tFieldDescriptorProto_Number_field_name         protoreflect.Name = \"number\"\n\tFieldDescriptorProto_Label_field_name          protoreflect.Name = \"label\"\n\tFieldDescriptorProto_Type_field_name           protoreflect.Name = \"type\"\n\tFieldDescriptorProto_TypeName_field_name       protoreflect.Name = \"type_name\"\n\tFieldDescriptorProto_Extendee_field_name       protoreflect.Name = \"extendee\"\n\tFieldDescriptorProto_DefaultValue_field_name   protoreflect.Name = \"default_value\"\n\tFieldDescriptorProto_OneofIndex_field_name     protoreflect.Name = \"oneof_index\"\n\tFieldDescriptorProto_JsonName_field_name       protoreflect.Name = \"json_name\"\n\tFieldDescriptorProto_Options_field_name        protoreflect.Name = \"options\"\n\tFieldDescriptorProto_Proto3Optional_field_name protoreflect.Name = \"proto3_optional\"\n\n\tFieldDescriptorProto_Name_field_fullname           protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.name\"\n\tFieldDescriptorProto_Number_field_fullname         protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.number\"\n\tFieldDescriptorProto_Label_field_fullname          protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.label\"\n\tFieldDescriptorProto_Type_field_fullname           protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.type\"\n\tFieldDescriptorProto_TypeName_field_fullname       protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.type_name\"\n\tFieldDescriptorProto_Extendee_field_fullname       protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.extendee\"\n\tFieldDescriptorProto_DefaultValue_field_fullname   protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.default_value\"\n\tFieldDescriptorProto_OneofIndex_field_fullname     protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.oneof_index\"\n\tFieldDescriptorProto_JsonName_field_fullname       protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.json_name\"\n\tFieldDescriptorProto_Options_field_fullname        protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.options\"\n\tFieldDescriptorProto_Proto3Optional_field_fullname protoreflect.FullName = \"google.protobuf.FieldDescriptorProto.proto3_optional\"\n)\n\n// Field numbers for google.protobuf.FieldDescriptorProto.\nconst (\n\tFieldDescriptorProto_Name_field_number           protoreflect.FieldNumber = 1\n\tFieldDescriptorProto_Number_field_number         protoreflect.FieldNumber = 3\n\tFieldDescriptorProto_Label_field_number          protoreflect.FieldNumber = 4\n\tFieldDescriptorProto_Type_field_number           protoreflect.FieldNumber = 5\n\tFieldDescriptorProto_TypeName_field_number       protoreflect.FieldNumber = 6\n\tFieldDescriptorProto_Extendee_field_number       protoreflect.FieldNumber = 2\n\tFieldDescriptorProto_DefaultValue_field_number   protoreflect.FieldNumber = 7\n\tFieldDescriptorProto_OneofIndex_field_number     protoreflect.FieldNumber = 9\n\tFieldDescriptorProto_JsonName_field_number       protoreflect.FieldNumber = 10\n\tFieldDescriptorProto_Options_field_number        protoreflect.FieldNumber = 8\n\tFieldDescriptorProto_Proto3Optional_field_number protoreflect.FieldNumber = 17\n)\n\n// Full and short names for google.protobuf.FieldDescriptorProto.Type.\nconst (\n\tFieldDescriptorProto_Type_enum_fullname = \"google.protobuf.FieldDescriptorProto.Type\"\n\tFieldDescriptorProto_Type_enum_name     = \"Type\"\n)\n\n// Enum values for google.protobuf.FieldDescriptorProto.Type.\nconst (\n\tFieldDescriptorProto_TYPE_DOUBLE_enum_value   = 1\n\tFieldDescriptorProto_TYPE_FLOAT_enum_value    = 2\n\tFieldDescriptorProto_TYPE_INT64_enum_value    = 3\n\tFieldDescriptorProto_TYPE_UINT64_enum_value   = 4\n\tFieldDescriptorProto_TYPE_INT32_enum_value    = 5\n\tFieldDescriptorProto_TYPE_FIXED64_enum_value  = 6\n\tFieldDescriptorProto_TYPE_FIXED32_enum_value  = 7\n\tFieldDescriptorProto_TYPE_BOOL_enum_value     = 8\n\tFieldDescriptorProto_TYPE_STRING_enum_value   = 9\n\tFieldDescriptorProto_TYPE_GROUP_enum_value    = 10\n\tFieldDescriptorProto_TYPE_MESSAGE_enum_value  = 11\n\tFieldDescriptorProto_TYPE_BYTES_enum_value    = 12\n\tFieldDescriptorProto_TYPE_UINT32_enum_value   = 13\n\tFieldDescriptorProto_TYPE_ENUM_enum_value     = 14\n\tFieldDescriptorProto_TYPE_SFIXED32_enum_value = 15\n\tFieldDescriptorProto_TYPE_SFIXED64_enum_value = 16\n\tFieldDescriptorProto_TYPE_SINT32_enum_value   = 17\n\tFieldDescriptorProto_TYPE_SINT64_enum_value   = 18\n)\n\n// Full and short names for google.protobuf.FieldDescriptorProto.Label.\nconst (\n\tFieldDescriptorProto_Label_enum_fullname = \"google.protobuf.FieldDescriptorProto.Label\"\n\tFieldDescriptorProto_Label_enum_name     = \"Label\"\n)\n\n// Enum values for google.protobuf.FieldDescriptorProto.Label.\nconst (\n\tFieldDescriptorProto_LABEL_OPTIONAL_enum_value = 1\n\tFieldDescriptorProto_LABEL_REPEATED_enum_value = 3\n\tFieldDescriptorProto_LABEL_REQUIRED_enum_value = 2\n)\n\n// Names for google.protobuf.OneofDescriptorProto.\nconst (\n\tOneofDescriptorProto_message_name     protoreflect.Name     = \"OneofDescriptorProto\"\n\tOneofDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.OneofDescriptorProto\"\n)\n\n// Field names for google.protobuf.OneofDescriptorProto.\nconst (\n\tOneofDescriptorProto_Name_field_name    protoreflect.Name = \"name\"\n\tOneofDescriptorProto_Options_field_name protoreflect.Name = \"options\"\n\n\tOneofDescriptorProto_Name_field_fullname    protoreflect.FullName = \"google.protobuf.OneofDescriptorProto.name\"\n\tOneofDescriptorProto_Options_field_fullname protoreflect.FullName = \"google.protobuf.OneofDescriptorProto.options\"\n)\n\n// Field numbers for google.protobuf.OneofDescriptorProto.\nconst (\n\tOneofDescriptorProto_Name_field_number    protoreflect.FieldNumber = 1\n\tOneofDescriptorProto_Options_field_number protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.EnumDescriptorProto.\nconst (\n\tEnumDescriptorProto_message_name     protoreflect.Name     = \"EnumDescriptorProto\"\n\tEnumDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.EnumDescriptorProto\"\n)\n\n// Field names for google.protobuf.EnumDescriptorProto.\nconst (\n\tEnumDescriptorProto_Name_field_name          protoreflect.Name = \"name\"\n\tEnumDescriptorProto_Value_field_name         protoreflect.Name = \"value\"\n\tEnumDescriptorProto_Options_field_name       protoreflect.Name = \"options\"\n\tEnumDescriptorProto_ReservedRange_field_name protoreflect.Name = \"reserved_range\"\n\tEnumDescriptorProto_ReservedName_field_name  protoreflect.Name = \"reserved_name\"\n\tEnumDescriptorProto_Visibility_field_name    protoreflect.Name = \"visibility\"\n\n\tEnumDescriptorProto_Name_field_fullname          protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.name\"\n\tEnumDescriptorProto_Value_field_fullname         protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.value\"\n\tEnumDescriptorProto_Options_field_fullname       protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.options\"\n\tEnumDescriptorProto_ReservedRange_field_fullname protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.reserved_range\"\n\tEnumDescriptorProto_ReservedName_field_fullname  protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.reserved_name\"\n\tEnumDescriptorProto_Visibility_field_fullname    protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.visibility\"\n)\n\n// Field numbers for google.protobuf.EnumDescriptorProto.\nconst (\n\tEnumDescriptorProto_Name_field_number          protoreflect.FieldNumber = 1\n\tEnumDescriptorProto_Value_field_number         protoreflect.FieldNumber = 2\n\tEnumDescriptorProto_Options_field_number       protoreflect.FieldNumber = 3\n\tEnumDescriptorProto_ReservedRange_field_number protoreflect.FieldNumber = 4\n\tEnumDescriptorProto_ReservedName_field_number  protoreflect.FieldNumber = 5\n\tEnumDescriptorProto_Visibility_field_number    protoreflect.FieldNumber = 6\n)\n\n// Names for google.protobuf.EnumDescriptorProto.EnumReservedRange.\nconst (\n\tEnumDescriptorProto_EnumReservedRange_message_name     protoreflect.Name     = \"EnumReservedRange\"\n\tEnumDescriptorProto_EnumReservedRange_message_fullname protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.EnumReservedRange\"\n)\n\n// Field names for google.protobuf.EnumDescriptorProto.EnumReservedRange.\nconst (\n\tEnumDescriptorProto_EnumReservedRange_Start_field_name protoreflect.Name = \"start\"\n\tEnumDescriptorProto_EnumReservedRange_End_field_name   protoreflect.Name = \"end\"\n\n\tEnumDescriptorProto_EnumReservedRange_Start_field_fullname protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.EnumReservedRange.start\"\n\tEnumDescriptorProto_EnumReservedRange_End_field_fullname   protoreflect.FullName = \"google.protobuf.EnumDescriptorProto.EnumReservedRange.end\"\n)\n\n// Field numbers for google.protobuf.EnumDescriptorProto.EnumReservedRange.\nconst (\n\tEnumDescriptorProto_EnumReservedRange_Start_field_number protoreflect.FieldNumber = 1\n\tEnumDescriptorProto_EnumReservedRange_End_field_number   protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.EnumValueDescriptorProto.\nconst (\n\tEnumValueDescriptorProto_message_name     protoreflect.Name     = \"EnumValueDescriptorProto\"\n\tEnumValueDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.EnumValueDescriptorProto\"\n)\n\n// Field names for google.protobuf.EnumValueDescriptorProto.\nconst (\n\tEnumValueDescriptorProto_Name_field_name    protoreflect.Name = \"name\"\n\tEnumValueDescriptorProto_Number_field_name  protoreflect.Name = \"number\"\n\tEnumValueDescriptorProto_Options_field_name protoreflect.Name = \"options\"\n\n\tEnumValueDescriptorProto_Name_field_fullname    protoreflect.FullName = \"google.protobuf.EnumValueDescriptorProto.name\"\n\tEnumValueDescriptorProto_Number_field_fullname  protoreflect.FullName = \"google.protobuf.EnumValueDescriptorProto.number\"\n\tEnumValueDescriptorProto_Options_field_fullname protoreflect.FullName = \"google.protobuf.EnumValueDescriptorProto.options\"\n)\n\n// Field numbers for google.protobuf.EnumValueDescriptorProto.\nconst (\n\tEnumValueDescriptorProto_Name_field_number    protoreflect.FieldNumber = 1\n\tEnumValueDescriptorProto_Number_field_number  protoreflect.FieldNumber = 2\n\tEnumValueDescriptorProto_Options_field_number protoreflect.FieldNumber = 3\n)\n\n// Names for google.protobuf.ServiceDescriptorProto.\nconst (\n\tServiceDescriptorProto_message_name     protoreflect.Name     = \"ServiceDescriptorProto\"\n\tServiceDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.ServiceDescriptorProto\"\n)\n\n// Field names for google.protobuf.ServiceDescriptorProto.\nconst (\n\tServiceDescriptorProto_Name_field_name    protoreflect.Name = \"name\"\n\tServiceDescriptorProto_Method_field_name  protoreflect.Name = \"method\"\n\tServiceDescriptorProto_Options_field_name protoreflect.Name = \"options\"\n\n\tServiceDescriptorProto_Name_field_fullname    protoreflect.FullName = \"google.protobuf.ServiceDescriptorProto.name\"\n\tServiceDescriptorProto_Method_field_fullname  protoreflect.FullName = \"google.protobuf.ServiceDescriptorProto.method\"\n\tServiceDescriptorProto_Options_field_fullname protoreflect.FullName = \"google.protobuf.ServiceDescriptorProto.options\"\n)\n\n// Field numbers for google.protobuf.ServiceDescriptorProto.\nconst (\n\tServiceDescriptorProto_Name_field_number    protoreflect.FieldNumber = 1\n\tServiceDescriptorProto_Method_field_number  protoreflect.FieldNumber = 2\n\tServiceDescriptorProto_Options_field_number protoreflect.FieldNumber = 3\n)\n\n// Names for google.protobuf.MethodDescriptorProto.\nconst (\n\tMethodDescriptorProto_message_name     protoreflect.Name     = \"MethodDescriptorProto\"\n\tMethodDescriptorProto_message_fullname protoreflect.FullName = \"google.protobuf.MethodDescriptorProto\"\n)\n\n// Field names for google.protobuf.MethodDescriptorProto.\nconst (\n\tMethodDescriptorProto_Name_field_name            protoreflect.Name = \"name\"\n\tMethodDescriptorProto_InputType_field_name       protoreflect.Name = \"input_type\"\n\tMethodDescriptorProto_OutputType_field_name      protoreflect.Name = \"output_type\"\n\tMethodDescriptorProto_Options_field_name         protoreflect.Name = \"options\"\n\tMethodDescriptorProto_ClientStreaming_field_name protoreflect.Name = \"client_streaming\"\n\tMethodDescriptorProto_ServerStreaming_field_name protoreflect.Name = \"server_streaming\"\n\n\tMethodDescriptorProto_Name_field_fullname            protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.name\"\n\tMethodDescriptorProto_InputType_field_fullname       protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.input_type\"\n\tMethodDescriptorProto_OutputType_field_fullname      protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.output_type\"\n\tMethodDescriptorProto_Options_field_fullname         protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.options\"\n\tMethodDescriptorProto_ClientStreaming_field_fullname protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.client_streaming\"\n\tMethodDescriptorProto_ServerStreaming_field_fullname protoreflect.FullName = \"google.protobuf.MethodDescriptorProto.server_streaming\"\n)\n\n// Field numbers for google.protobuf.MethodDescriptorProto.\nconst (\n\tMethodDescriptorProto_Name_field_number            protoreflect.FieldNumber = 1\n\tMethodDescriptorProto_InputType_field_number       protoreflect.FieldNumber = 2\n\tMethodDescriptorProto_OutputType_field_number      protoreflect.FieldNumber = 3\n\tMethodDescriptorProto_Options_field_number         protoreflect.FieldNumber = 4\n\tMethodDescriptorProto_ClientStreaming_field_number protoreflect.FieldNumber = 5\n\tMethodDescriptorProto_ServerStreaming_field_number protoreflect.FieldNumber = 6\n)\n\n// Names for google.protobuf.FileOptions.\nconst (\n\tFileOptions_message_name     protoreflect.Name     = \"FileOptions\"\n\tFileOptions_message_fullname protoreflect.FullName = \"google.protobuf.FileOptions\"\n)\n\n// Field names for google.protobuf.FileOptions.\nconst (\n\tFileOptions_JavaPackage_field_name               protoreflect.Name = \"java_package\"\n\tFileOptions_JavaOuterClassname_field_name        protoreflect.Name = \"java_outer_classname\"\n\tFileOptions_JavaMultipleFiles_field_name         protoreflect.Name = \"java_multiple_files\"\n\tFileOptions_JavaGenerateEqualsAndHash_field_name protoreflect.Name = \"java_generate_equals_and_hash\"\n\tFileOptions_JavaStringCheckUtf8_field_name       protoreflect.Name = \"java_string_check_utf8\"\n\tFileOptions_OptimizeFor_field_name               protoreflect.Name = \"optimize_for\"\n\tFileOptions_GoPackage_field_name                 protoreflect.Name = \"go_package\"\n\tFileOptions_CcGenericServices_field_name         protoreflect.Name = \"cc_generic_services\"\n\tFileOptions_JavaGenericServices_field_name       protoreflect.Name = \"java_generic_services\"\n\tFileOptions_PyGenericServices_field_name         protoreflect.Name = \"py_generic_services\"\n\tFileOptions_Deprecated_field_name                protoreflect.Name = \"deprecated\"\n\tFileOptions_CcEnableArenas_field_name            protoreflect.Name = \"cc_enable_arenas\"\n\tFileOptions_ObjcClassPrefix_field_name           protoreflect.Name = \"objc_class_prefix\"\n\tFileOptions_CsharpNamespace_field_name           protoreflect.Name = \"csharp_namespace\"\n\tFileOptions_SwiftPrefix_field_name               protoreflect.Name = \"swift_prefix\"\n\tFileOptions_PhpClassPrefix_field_name            protoreflect.Name = \"php_class_prefix\"\n\tFileOptions_PhpNamespace_field_name              protoreflect.Name = \"php_namespace\"\n\tFileOptions_PhpMetadataNamespace_field_name      protoreflect.Name = \"php_metadata_namespace\"\n\tFileOptions_RubyPackage_field_name               protoreflect.Name = \"ruby_package\"\n\tFileOptions_Features_field_name                  protoreflect.Name = \"features\"\n\tFileOptions_UninterpretedOption_field_name       protoreflect.Name = \"uninterpreted_option\"\n\n\tFileOptions_JavaPackage_field_fullname               protoreflect.FullName = \"google.protobuf.FileOptions.java_package\"\n\tFileOptions_JavaOuterClassname_field_fullname        protoreflect.FullName = \"google.protobuf.FileOptions.java_outer_classname\"\n\tFileOptions_JavaMultipleFiles_field_fullname         protoreflect.FullName = \"google.protobuf.FileOptions.java_multiple_files\"\n\tFileOptions_JavaGenerateEqualsAndHash_field_fullname protoreflect.FullName = \"google.protobuf.FileOptions.java_generate_equals_and_hash\"\n\tFileOptions_JavaStringCheckUtf8_field_fullname       protoreflect.FullName = \"google.protobuf.FileOptions.java_string_check_utf8\"\n\tFileOptions_OptimizeFor_field_fullname               protoreflect.FullName = \"google.protobuf.FileOptions.optimize_for\"\n\tFileOptions_GoPackage_field_fullname                 protoreflect.FullName = \"google.protobuf.FileOptions.go_package\"\n\tFileOptions_CcGenericServices_field_fullname         protoreflect.FullName = \"google.protobuf.FileOptions.cc_generic_services\"\n\tFileOptions_JavaGenericServices_field_fullname       protoreflect.FullName = \"google.protobuf.FileOptions.java_generic_services\"\n\tFileOptions_PyGenericServices_field_fullname         protoreflect.FullName = \"google.protobuf.FileOptions.py_generic_services\"\n\tFileOptions_Deprecated_field_fullname                protoreflect.FullName = \"google.protobuf.FileOptions.deprecated\"\n\tFileOptions_CcEnableArenas_field_fullname            protoreflect.FullName = \"google.protobuf.FileOptions.cc_enable_arenas\"\n\tFileOptions_ObjcClassPrefix_field_fullname           protoreflect.FullName = \"google.protobuf.FileOptions.objc_class_prefix\"\n\tFileOptions_CsharpNamespace_field_fullname           protoreflect.FullName = \"google.protobuf.FileOptions.csharp_namespace\"\n\tFileOptions_SwiftPrefix_field_fullname               protoreflect.FullName = \"google.protobuf.FileOptions.swift_prefix\"\n\tFileOptions_PhpClassPrefix_field_fullname            protoreflect.FullName = \"google.protobuf.FileOptions.php_class_prefix\"\n\tFileOptions_PhpNamespace_field_fullname              protoreflect.FullName = \"google.protobuf.FileOptions.php_namespace\"\n\tFileOptions_PhpMetadataNamespace_field_fullname      protoreflect.FullName = \"google.protobuf.FileOptions.php_metadata_namespace\"\n\tFileOptions_RubyPackage_field_fullname               protoreflect.FullName = \"google.protobuf.FileOptions.ruby_package\"\n\tFileOptions_Features_field_fullname                  protoreflect.FullName = \"google.protobuf.FileOptions.features\"\n\tFileOptions_UninterpretedOption_field_fullname       protoreflect.FullName = \"google.protobuf.FileOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.FileOptions.\nconst (\n\tFileOptions_JavaPackage_field_number               protoreflect.FieldNumber = 1\n\tFileOptions_JavaOuterClassname_field_number        protoreflect.FieldNumber = 8\n\tFileOptions_JavaMultipleFiles_field_number         protoreflect.FieldNumber = 10\n\tFileOptions_JavaGenerateEqualsAndHash_field_number protoreflect.FieldNumber = 20\n\tFileOptions_JavaStringCheckUtf8_field_number       protoreflect.FieldNumber = 27\n\tFileOptions_OptimizeFor_field_number               protoreflect.FieldNumber = 9\n\tFileOptions_GoPackage_field_number                 protoreflect.FieldNumber = 11\n\tFileOptions_CcGenericServices_field_number         protoreflect.FieldNumber = 16\n\tFileOptions_JavaGenericServices_field_number       protoreflect.FieldNumber = 17\n\tFileOptions_PyGenericServices_field_number         protoreflect.FieldNumber = 18\n\tFileOptions_Deprecated_field_number                protoreflect.FieldNumber = 23\n\tFileOptions_CcEnableArenas_field_number            protoreflect.FieldNumber = 31\n\tFileOptions_ObjcClassPrefix_field_number           protoreflect.FieldNumber = 36\n\tFileOptions_CsharpNamespace_field_number           protoreflect.FieldNumber = 37\n\tFileOptions_SwiftPrefix_field_number               protoreflect.FieldNumber = 39\n\tFileOptions_PhpClassPrefix_field_number            protoreflect.FieldNumber = 40\n\tFileOptions_PhpNamespace_field_number              protoreflect.FieldNumber = 41\n\tFileOptions_PhpMetadataNamespace_field_number      protoreflect.FieldNumber = 44\n\tFileOptions_RubyPackage_field_number               protoreflect.FieldNumber = 45\n\tFileOptions_Features_field_number                  protoreflect.FieldNumber = 50\n\tFileOptions_UninterpretedOption_field_number       protoreflect.FieldNumber = 999\n)\n\n// Full and short names for google.protobuf.FileOptions.OptimizeMode.\nconst (\n\tFileOptions_OptimizeMode_enum_fullname = \"google.protobuf.FileOptions.OptimizeMode\"\n\tFileOptions_OptimizeMode_enum_name     = \"OptimizeMode\"\n)\n\n// Enum values for google.protobuf.FileOptions.OptimizeMode.\nconst (\n\tFileOptions_SPEED_enum_value        = 1\n\tFileOptions_CODE_SIZE_enum_value    = 2\n\tFileOptions_LITE_RUNTIME_enum_value = 3\n)\n\n// Names for google.protobuf.MessageOptions.\nconst (\n\tMessageOptions_message_name     protoreflect.Name     = \"MessageOptions\"\n\tMessageOptions_message_fullname protoreflect.FullName = \"google.protobuf.MessageOptions\"\n)\n\n// Field names for google.protobuf.MessageOptions.\nconst (\n\tMessageOptions_MessageSetWireFormat_field_name               protoreflect.Name = \"message_set_wire_format\"\n\tMessageOptions_NoStandardDescriptorAccessor_field_name       protoreflect.Name = \"no_standard_descriptor_accessor\"\n\tMessageOptions_Deprecated_field_name                         protoreflect.Name = \"deprecated\"\n\tMessageOptions_MapEntry_field_name                           protoreflect.Name = \"map_entry\"\n\tMessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = \"deprecated_legacy_json_field_conflicts\"\n\tMessageOptions_Features_field_name                           protoreflect.Name = \"features\"\n\tMessageOptions_UninterpretedOption_field_name                protoreflect.Name = \"uninterpreted_option\"\n\n\tMessageOptions_MessageSetWireFormat_field_fullname               protoreflect.FullName = \"google.protobuf.MessageOptions.message_set_wire_format\"\n\tMessageOptions_NoStandardDescriptorAccessor_field_fullname       protoreflect.FullName = \"google.protobuf.MessageOptions.no_standard_descriptor_accessor\"\n\tMessageOptions_Deprecated_field_fullname                         protoreflect.FullName = \"google.protobuf.MessageOptions.deprecated\"\n\tMessageOptions_MapEntry_field_fullname                           protoreflect.FullName = \"google.protobuf.MessageOptions.map_entry\"\n\tMessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = \"google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts\"\n\tMessageOptions_Features_field_fullname                           protoreflect.FullName = \"google.protobuf.MessageOptions.features\"\n\tMessageOptions_UninterpretedOption_field_fullname                protoreflect.FullName = \"google.protobuf.MessageOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.MessageOptions.\nconst (\n\tMessageOptions_MessageSetWireFormat_field_number               protoreflect.FieldNumber = 1\n\tMessageOptions_NoStandardDescriptorAccessor_field_number       protoreflect.FieldNumber = 2\n\tMessageOptions_Deprecated_field_number                         protoreflect.FieldNumber = 3\n\tMessageOptions_MapEntry_field_number                           protoreflect.FieldNumber = 7\n\tMessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11\n\tMessageOptions_Features_field_number                           protoreflect.FieldNumber = 12\n\tMessageOptions_UninterpretedOption_field_number                protoreflect.FieldNumber = 999\n)\n\n// Names for google.protobuf.FieldOptions.\nconst (\n\tFieldOptions_message_name     protoreflect.Name     = \"FieldOptions\"\n\tFieldOptions_message_fullname protoreflect.FullName = \"google.protobuf.FieldOptions\"\n)\n\n// Field names for google.protobuf.FieldOptions.\nconst (\n\tFieldOptions_Ctype_field_name               protoreflect.Name = \"ctype\"\n\tFieldOptions_Packed_field_name              protoreflect.Name = \"packed\"\n\tFieldOptions_Jstype_field_name              protoreflect.Name = \"jstype\"\n\tFieldOptions_Lazy_field_name                protoreflect.Name = \"lazy\"\n\tFieldOptions_UnverifiedLazy_field_name      protoreflect.Name = \"unverified_lazy\"\n\tFieldOptions_Deprecated_field_name          protoreflect.Name = \"deprecated\"\n\tFieldOptions_Weak_field_name                protoreflect.Name = \"weak\"\n\tFieldOptions_DebugRedact_field_name         protoreflect.Name = \"debug_redact\"\n\tFieldOptions_Retention_field_name           protoreflect.Name = \"retention\"\n\tFieldOptions_Targets_field_name             protoreflect.Name = \"targets\"\n\tFieldOptions_EditionDefaults_field_name     protoreflect.Name = \"edition_defaults\"\n\tFieldOptions_Features_field_name            protoreflect.Name = \"features\"\n\tFieldOptions_FeatureSupport_field_name      protoreflect.Name = \"feature_support\"\n\tFieldOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\n\tFieldOptions_Ctype_field_fullname               protoreflect.FullName = \"google.protobuf.FieldOptions.ctype\"\n\tFieldOptions_Packed_field_fullname              protoreflect.FullName = \"google.protobuf.FieldOptions.packed\"\n\tFieldOptions_Jstype_field_fullname              protoreflect.FullName = \"google.protobuf.FieldOptions.jstype\"\n\tFieldOptions_Lazy_field_fullname                protoreflect.FullName = \"google.protobuf.FieldOptions.lazy\"\n\tFieldOptions_UnverifiedLazy_field_fullname      protoreflect.FullName = \"google.protobuf.FieldOptions.unverified_lazy\"\n\tFieldOptions_Deprecated_field_fullname          protoreflect.FullName = \"google.protobuf.FieldOptions.deprecated\"\n\tFieldOptions_Weak_field_fullname                protoreflect.FullName = \"google.protobuf.FieldOptions.weak\"\n\tFieldOptions_DebugRedact_field_fullname         protoreflect.FullName = \"google.protobuf.FieldOptions.debug_redact\"\n\tFieldOptions_Retention_field_fullname           protoreflect.FullName = \"google.protobuf.FieldOptions.retention\"\n\tFieldOptions_Targets_field_fullname             protoreflect.FullName = \"google.protobuf.FieldOptions.targets\"\n\tFieldOptions_EditionDefaults_field_fullname     protoreflect.FullName = \"google.protobuf.FieldOptions.edition_defaults\"\n\tFieldOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.FieldOptions.features\"\n\tFieldOptions_FeatureSupport_field_fullname      protoreflect.FullName = \"google.protobuf.FieldOptions.feature_support\"\n\tFieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.FieldOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.FieldOptions.\nconst (\n\tFieldOptions_Ctype_field_number               protoreflect.FieldNumber = 1\n\tFieldOptions_Packed_field_number              protoreflect.FieldNumber = 2\n\tFieldOptions_Jstype_field_number              protoreflect.FieldNumber = 6\n\tFieldOptions_Lazy_field_number                protoreflect.FieldNumber = 5\n\tFieldOptions_UnverifiedLazy_field_number      protoreflect.FieldNumber = 15\n\tFieldOptions_Deprecated_field_number          protoreflect.FieldNumber = 3\n\tFieldOptions_Weak_field_number                protoreflect.FieldNumber = 10\n\tFieldOptions_DebugRedact_field_number         protoreflect.FieldNumber = 16\n\tFieldOptions_Retention_field_number           protoreflect.FieldNumber = 17\n\tFieldOptions_Targets_field_number             protoreflect.FieldNumber = 19\n\tFieldOptions_EditionDefaults_field_number     protoreflect.FieldNumber = 20\n\tFieldOptions_Features_field_number            protoreflect.FieldNumber = 21\n\tFieldOptions_FeatureSupport_field_number      protoreflect.FieldNumber = 22\n\tFieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n)\n\n// Full and short names for google.protobuf.FieldOptions.CType.\nconst (\n\tFieldOptions_CType_enum_fullname = \"google.protobuf.FieldOptions.CType\"\n\tFieldOptions_CType_enum_name     = \"CType\"\n)\n\n// Enum values for google.protobuf.FieldOptions.CType.\nconst (\n\tFieldOptions_STRING_enum_value       = 0\n\tFieldOptions_CORD_enum_value         = 1\n\tFieldOptions_STRING_PIECE_enum_value = 2\n)\n\n// Full and short names for google.protobuf.FieldOptions.JSType.\nconst (\n\tFieldOptions_JSType_enum_fullname = \"google.protobuf.FieldOptions.JSType\"\n\tFieldOptions_JSType_enum_name     = \"JSType\"\n)\n\n// Enum values for google.protobuf.FieldOptions.JSType.\nconst (\n\tFieldOptions_JS_NORMAL_enum_value = 0\n\tFieldOptions_JS_STRING_enum_value = 1\n\tFieldOptions_JS_NUMBER_enum_value = 2\n)\n\n// Full and short names for google.protobuf.FieldOptions.OptionRetention.\nconst (\n\tFieldOptions_OptionRetention_enum_fullname = \"google.protobuf.FieldOptions.OptionRetention\"\n\tFieldOptions_OptionRetention_enum_name     = \"OptionRetention\"\n)\n\n// Enum values for google.protobuf.FieldOptions.OptionRetention.\nconst (\n\tFieldOptions_RETENTION_UNKNOWN_enum_value = 0\n\tFieldOptions_RETENTION_RUNTIME_enum_value = 1\n\tFieldOptions_RETENTION_SOURCE_enum_value  = 2\n)\n\n// Full and short names for google.protobuf.FieldOptions.OptionTargetType.\nconst (\n\tFieldOptions_OptionTargetType_enum_fullname = \"google.protobuf.FieldOptions.OptionTargetType\"\n\tFieldOptions_OptionTargetType_enum_name     = \"OptionTargetType\"\n)\n\n// Enum values for google.protobuf.FieldOptions.OptionTargetType.\nconst (\n\tFieldOptions_TARGET_TYPE_UNKNOWN_enum_value         = 0\n\tFieldOptions_TARGET_TYPE_FILE_enum_value            = 1\n\tFieldOptions_TARGET_TYPE_EXTENSION_RANGE_enum_value = 2\n\tFieldOptions_TARGET_TYPE_MESSAGE_enum_value         = 3\n\tFieldOptions_TARGET_TYPE_FIELD_enum_value           = 4\n\tFieldOptions_TARGET_TYPE_ONEOF_enum_value           = 5\n\tFieldOptions_TARGET_TYPE_ENUM_enum_value            = 6\n\tFieldOptions_TARGET_TYPE_ENUM_ENTRY_enum_value      = 7\n\tFieldOptions_TARGET_TYPE_SERVICE_enum_value         = 8\n\tFieldOptions_TARGET_TYPE_METHOD_enum_value          = 9\n)\n\n// Names for google.protobuf.FieldOptions.EditionDefault.\nconst (\n\tFieldOptions_EditionDefault_message_name     protoreflect.Name     = \"EditionDefault\"\n\tFieldOptions_EditionDefault_message_fullname protoreflect.FullName = \"google.protobuf.FieldOptions.EditionDefault\"\n)\n\n// Field names for google.protobuf.FieldOptions.EditionDefault.\nconst (\n\tFieldOptions_EditionDefault_Edition_field_name protoreflect.Name = \"edition\"\n\tFieldOptions_EditionDefault_Value_field_name   protoreflect.Name = \"value\"\n\n\tFieldOptions_EditionDefault_Edition_field_fullname protoreflect.FullName = \"google.protobuf.FieldOptions.EditionDefault.edition\"\n\tFieldOptions_EditionDefault_Value_field_fullname   protoreflect.FullName = \"google.protobuf.FieldOptions.EditionDefault.value\"\n)\n\n// Field numbers for google.protobuf.FieldOptions.EditionDefault.\nconst (\n\tFieldOptions_EditionDefault_Edition_field_number protoreflect.FieldNumber = 3\n\tFieldOptions_EditionDefault_Value_field_number   protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.FieldOptions.FeatureSupport.\nconst (\n\tFieldOptions_FeatureSupport_message_name     protoreflect.Name     = \"FeatureSupport\"\n\tFieldOptions_FeatureSupport_message_fullname protoreflect.FullName = \"google.protobuf.FieldOptions.FeatureSupport\"\n)\n\n// Field names for google.protobuf.FieldOptions.FeatureSupport.\nconst (\n\tFieldOptions_FeatureSupport_EditionIntroduced_field_name  protoreflect.Name = \"edition_introduced\"\n\tFieldOptions_FeatureSupport_EditionDeprecated_field_name  protoreflect.Name = \"edition_deprecated\"\n\tFieldOptions_FeatureSupport_DeprecationWarning_field_name protoreflect.Name = \"deprecation_warning\"\n\tFieldOptions_FeatureSupport_EditionRemoved_field_name     protoreflect.Name = \"edition_removed\"\n\n\tFieldOptions_FeatureSupport_EditionIntroduced_field_fullname  protoreflect.FullName = \"google.protobuf.FieldOptions.FeatureSupport.edition_introduced\"\n\tFieldOptions_FeatureSupport_EditionDeprecated_field_fullname  protoreflect.FullName = \"google.protobuf.FieldOptions.FeatureSupport.edition_deprecated\"\n\tFieldOptions_FeatureSupport_DeprecationWarning_field_fullname protoreflect.FullName = \"google.protobuf.FieldOptions.FeatureSupport.deprecation_warning\"\n\tFieldOptions_FeatureSupport_EditionRemoved_field_fullname     protoreflect.FullName = \"google.protobuf.FieldOptions.FeatureSupport.edition_removed\"\n)\n\n// Field numbers for google.protobuf.FieldOptions.FeatureSupport.\nconst (\n\tFieldOptions_FeatureSupport_EditionIntroduced_field_number  protoreflect.FieldNumber = 1\n\tFieldOptions_FeatureSupport_EditionDeprecated_field_number  protoreflect.FieldNumber = 2\n\tFieldOptions_FeatureSupport_DeprecationWarning_field_number protoreflect.FieldNumber = 3\n\tFieldOptions_FeatureSupport_EditionRemoved_field_number     protoreflect.FieldNumber = 4\n)\n\n// Names for google.protobuf.OneofOptions.\nconst (\n\tOneofOptions_message_name     protoreflect.Name     = \"OneofOptions\"\n\tOneofOptions_message_fullname protoreflect.FullName = \"google.protobuf.OneofOptions\"\n)\n\n// Field names for google.protobuf.OneofOptions.\nconst (\n\tOneofOptions_Features_field_name            protoreflect.Name = \"features\"\n\tOneofOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\n\tOneofOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.OneofOptions.features\"\n\tOneofOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.OneofOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.OneofOptions.\nconst (\n\tOneofOptions_Features_field_number            protoreflect.FieldNumber = 1\n\tOneofOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n)\n\n// Names for google.protobuf.EnumOptions.\nconst (\n\tEnumOptions_message_name     protoreflect.Name     = \"EnumOptions\"\n\tEnumOptions_message_fullname protoreflect.FullName = \"google.protobuf.EnumOptions\"\n)\n\n// Field names for google.protobuf.EnumOptions.\nconst (\n\tEnumOptions_AllowAlias_field_name                         protoreflect.Name = \"allow_alias\"\n\tEnumOptions_Deprecated_field_name                         protoreflect.Name = \"deprecated\"\n\tEnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = \"deprecated_legacy_json_field_conflicts\"\n\tEnumOptions_Features_field_name                           protoreflect.Name = \"features\"\n\tEnumOptions_UninterpretedOption_field_name                protoreflect.Name = \"uninterpreted_option\"\n\n\tEnumOptions_AllowAlias_field_fullname                         protoreflect.FullName = \"google.protobuf.EnumOptions.allow_alias\"\n\tEnumOptions_Deprecated_field_fullname                         protoreflect.FullName = \"google.protobuf.EnumOptions.deprecated\"\n\tEnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = \"google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts\"\n\tEnumOptions_Features_field_fullname                           protoreflect.FullName = \"google.protobuf.EnumOptions.features\"\n\tEnumOptions_UninterpretedOption_field_fullname                protoreflect.FullName = \"google.protobuf.EnumOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.EnumOptions.\nconst (\n\tEnumOptions_AllowAlias_field_number                         protoreflect.FieldNumber = 2\n\tEnumOptions_Deprecated_field_number                         protoreflect.FieldNumber = 3\n\tEnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6\n\tEnumOptions_Features_field_number                           protoreflect.FieldNumber = 7\n\tEnumOptions_UninterpretedOption_field_number                protoreflect.FieldNumber = 999\n)\n\n// Names for google.protobuf.EnumValueOptions.\nconst (\n\tEnumValueOptions_message_name     protoreflect.Name     = \"EnumValueOptions\"\n\tEnumValueOptions_message_fullname protoreflect.FullName = \"google.protobuf.EnumValueOptions\"\n)\n\n// Field names for google.protobuf.EnumValueOptions.\nconst (\n\tEnumValueOptions_Deprecated_field_name          protoreflect.Name = \"deprecated\"\n\tEnumValueOptions_Features_field_name            protoreflect.Name = \"features\"\n\tEnumValueOptions_DebugRedact_field_name         protoreflect.Name = \"debug_redact\"\n\tEnumValueOptions_FeatureSupport_field_name      protoreflect.Name = \"feature_support\"\n\tEnumValueOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\n\tEnumValueOptions_Deprecated_field_fullname          protoreflect.FullName = \"google.protobuf.EnumValueOptions.deprecated\"\n\tEnumValueOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.EnumValueOptions.features\"\n\tEnumValueOptions_DebugRedact_field_fullname         protoreflect.FullName = \"google.protobuf.EnumValueOptions.debug_redact\"\n\tEnumValueOptions_FeatureSupport_field_fullname      protoreflect.FullName = \"google.protobuf.EnumValueOptions.feature_support\"\n\tEnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.EnumValueOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.EnumValueOptions.\nconst (\n\tEnumValueOptions_Deprecated_field_number          protoreflect.FieldNumber = 1\n\tEnumValueOptions_Features_field_number            protoreflect.FieldNumber = 2\n\tEnumValueOptions_DebugRedact_field_number         protoreflect.FieldNumber = 3\n\tEnumValueOptions_FeatureSupport_field_number      protoreflect.FieldNumber = 4\n\tEnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n)\n\n// Names for google.protobuf.ServiceOptions.\nconst (\n\tServiceOptions_message_name     protoreflect.Name     = \"ServiceOptions\"\n\tServiceOptions_message_fullname protoreflect.FullName = \"google.protobuf.ServiceOptions\"\n)\n\n// Field names for google.protobuf.ServiceOptions.\nconst (\n\tServiceOptions_Features_field_name            protoreflect.Name = \"features\"\n\tServiceOptions_Deprecated_field_name          protoreflect.Name = \"deprecated\"\n\tServiceOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\n\tServiceOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.ServiceOptions.features\"\n\tServiceOptions_Deprecated_field_fullname          protoreflect.FullName = \"google.protobuf.ServiceOptions.deprecated\"\n\tServiceOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.ServiceOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.ServiceOptions.\nconst (\n\tServiceOptions_Features_field_number            protoreflect.FieldNumber = 34\n\tServiceOptions_Deprecated_field_number          protoreflect.FieldNumber = 33\n\tServiceOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n)\n\n// Names for google.protobuf.MethodOptions.\nconst (\n\tMethodOptions_message_name     protoreflect.Name     = \"MethodOptions\"\n\tMethodOptions_message_fullname protoreflect.FullName = \"google.protobuf.MethodOptions\"\n)\n\n// Field names for google.protobuf.MethodOptions.\nconst (\n\tMethodOptions_Deprecated_field_name          protoreflect.Name = \"deprecated\"\n\tMethodOptions_IdempotencyLevel_field_name    protoreflect.Name = \"idempotency_level\"\n\tMethodOptions_Features_field_name            protoreflect.Name = \"features\"\n\tMethodOptions_UninterpretedOption_field_name protoreflect.Name = \"uninterpreted_option\"\n\n\tMethodOptions_Deprecated_field_fullname          protoreflect.FullName = \"google.protobuf.MethodOptions.deprecated\"\n\tMethodOptions_IdempotencyLevel_field_fullname    protoreflect.FullName = \"google.protobuf.MethodOptions.idempotency_level\"\n\tMethodOptions_Features_field_fullname            protoreflect.FullName = \"google.protobuf.MethodOptions.features\"\n\tMethodOptions_UninterpretedOption_field_fullname protoreflect.FullName = \"google.protobuf.MethodOptions.uninterpreted_option\"\n)\n\n// Field numbers for google.protobuf.MethodOptions.\nconst (\n\tMethodOptions_Deprecated_field_number          protoreflect.FieldNumber = 33\n\tMethodOptions_IdempotencyLevel_field_number    protoreflect.FieldNumber = 34\n\tMethodOptions_Features_field_number            protoreflect.FieldNumber = 35\n\tMethodOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999\n)\n\n// Full and short names for google.protobuf.MethodOptions.IdempotencyLevel.\nconst (\n\tMethodOptions_IdempotencyLevel_enum_fullname = \"google.protobuf.MethodOptions.IdempotencyLevel\"\n\tMethodOptions_IdempotencyLevel_enum_name     = \"IdempotencyLevel\"\n)\n\n// Enum values for google.protobuf.MethodOptions.IdempotencyLevel.\nconst (\n\tMethodOptions_IDEMPOTENCY_UNKNOWN_enum_value = 0\n\tMethodOptions_NO_SIDE_EFFECTS_enum_value     = 1\n\tMethodOptions_IDEMPOTENT_enum_value          = 2\n)\n\n// Names for google.protobuf.UninterpretedOption.\nconst (\n\tUninterpretedOption_message_name     protoreflect.Name     = \"UninterpretedOption\"\n\tUninterpretedOption_message_fullname protoreflect.FullName = \"google.protobuf.UninterpretedOption\"\n)\n\n// Field names for google.protobuf.UninterpretedOption.\nconst (\n\tUninterpretedOption_Name_field_name             protoreflect.Name = \"name\"\n\tUninterpretedOption_IdentifierValue_field_name  protoreflect.Name = \"identifier_value\"\n\tUninterpretedOption_PositiveIntValue_field_name protoreflect.Name = \"positive_int_value\"\n\tUninterpretedOption_NegativeIntValue_field_name protoreflect.Name = \"negative_int_value\"\n\tUninterpretedOption_DoubleValue_field_name      protoreflect.Name = \"double_value\"\n\tUninterpretedOption_StringValue_field_name      protoreflect.Name = \"string_value\"\n\tUninterpretedOption_AggregateValue_field_name   protoreflect.Name = \"aggregate_value\"\n\n\tUninterpretedOption_Name_field_fullname             protoreflect.FullName = \"google.protobuf.UninterpretedOption.name\"\n\tUninterpretedOption_IdentifierValue_field_fullname  protoreflect.FullName = \"google.protobuf.UninterpretedOption.identifier_value\"\n\tUninterpretedOption_PositiveIntValue_field_fullname protoreflect.FullName = \"google.protobuf.UninterpretedOption.positive_int_value\"\n\tUninterpretedOption_NegativeIntValue_field_fullname protoreflect.FullName = \"google.protobuf.UninterpretedOption.negative_int_value\"\n\tUninterpretedOption_DoubleValue_field_fullname      protoreflect.FullName = \"google.protobuf.UninterpretedOption.double_value\"\n\tUninterpretedOption_StringValue_field_fullname      protoreflect.FullName = \"google.protobuf.UninterpretedOption.string_value\"\n\tUninterpretedOption_AggregateValue_field_fullname   protoreflect.FullName = \"google.protobuf.UninterpretedOption.aggregate_value\"\n)\n\n// Field numbers for google.protobuf.UninterpretedOption.\nconst (\n\tUninterpretedOption_Name_field_number             protoreflect.FieldNumber = 2\n\tUninterpretedOption_IdentifierValue_field_number  protoreflect.FieldNumber = 3\n\tUninterpretedOption_PositiveIntValue_field_number protoreflect.FieldNumber = 4\n\tUninterpretedOption_NegativeIntValue_field_number protoreflect.FieldNumber = 5\n\tUninterpretedOption_DoubleValue_field_number      protoreflect.FieldNumber = 6\n\tUninterpretedOption_StringValue_field_number      protoreflect.FieldNumber = 7\n\tUninterpretedOption_AggregateValue_field_number   protoreflect.FieldNumber = 8\n)\n\n// Names for google.protobuf.UninterpretedOption.NamePart.\nconst (\n\tUninterpretedOption_NamePart_message_name     protoreflect.Name     = \"NamePart\"\n\tUninterpretedOption_NamePart_message_fullname protoreflect.FullName = \"google.protobuf.UninterpretedOption.NamePart\"\n)\n\n// Field names for google.protobuf.UninterpretedOption.NamePart.\nconst (\n\tUninterpretedOption_NamePart_NamePart_field_name    protoreflect.Name = \"name_part\"\n\tUninterpretedOption_NamePart_IsExtension_field_name protoreflect.Name = \"is_extension\"\n\n\tUninterpretedOption_NamePart_NamePart_field_fullname    protoreflect.FullName = \"google.protobuf.UninterpretedOption.NamePart.name_part\"\n\tUninterpretedOption_NamePart_IsExtension_field_fullname protoreflect.FullName = \"google.protobuf.UninterpretedOption.NamePart.is_extension\"\n)\n\n// Field numbers for google.protobuf.UninterpretedOption.NamePart.\nconst (\n\tUninterpretedOption_NamePart_NamePart_field_number    protoreflect.FieldNumber = 1\n\tUninterpretedOption_NamePart_IsExtension_field_number protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.FeatureSet.\nconst (\n\tFeatureSet_message_name     protoreflect.Name     = \"FeatureSet\"\n\tFeatureSet_message_fullname protoreflect.FullName = \"google.protobuf.FeatureSet\"\n)\n\n// Field names for google.protobuf.FeatureSet.\nconst (\n\tFeatureSet_FieldPresence_field_name           protoreflect.Name = \"field_presence\"\n\tFeatureSet_EnumType_field_name                protoreflect.Name = \"enum_type\"\n\tFeatureSet_RepeatedFieldEncoding_field_name   protoreflect.Name = \"repeated_field_encoding\"\n\tFeatureSet_Utf8Validation_field_name          protoreflect.Name = \"utf8_validation\"\n\tFeatureSet_MessageEncoding_field_name         protoreflect.Name = \"message_encoding\"\n\tFeatureSet_JsonFormat_field_name              protoreflect.Name = \"json_format\"\n\tFeatureSet_EnforceNamingStyle_field_name      protoreflect.Name = \"enforce_naming_style\"\n\tFeatureSet_DefaultSymbolVisibility_field_name protoreflect.Name = \"default_symbol_visibility\"\n\n\tFeatureSet_FieldPresence_field_fullname           protoreflect.FullName = \"google.protobuf.FeatureSet.field_presence\"\n\tFeatureSet_EnumType_field_fullname                protoreflect.FullName = \"google.protobuf.FeatureSet.enum_type\"\n\tFeatureSet_RepeatedFieldEncoding_field_fullname   protoreflect.FullName = \"google.protobuf.FeatureSet.repeated_field_encoding\"\n\tFeatureSet_Utf8Validation_field_fullname          protoreflect.FullName = \"google.protobuf.FeatureSet.utf8_validation\"\n\tFeatureSet_MessageEncoding_field_fullname         protoreflect.FullName = \"google.protobuf.FeatureSet.message_encoding\"\n\tFeatureSet_JsonFormat_field_fullname              protoreflect.FullName = \"google.protobuf.FeatureSet.json_format\"\n\tFeatureSet_EnforceNamingStyle_field_fullname      protoreflect.FullName = \"google.protobuf.FeatureSet.enforce_naming_style\"\n\tFeatureSet_DefaultSymbolVisibility_field_fullname protoreflect.FullName = \"google.protobuf.FeatureSet.default_symbol_visibility\"\n)\n\n// Field numbers for google.protobuf.FeatureSet.\nconst (\n\tFeatureSet_FieldPresence_field_number           protoreflect.FieldNumber = 1\n\tFeatureSet_EnumType_field_number                protoreflect.FieldNumber = 2\n\tFeatureSet_RepeatedFieldEncoding_field_number   protoreflect.FieldNumber = 3\n\tFeatureSet_Utf8Validation_field_number          protoreflect.FieldNumber = 4\n\tFeatureSet_MessageEncoding_field_number         protoreflect.FieldNumber = 5\n\tFeatureSet_JsonFormat_field_number              protoreflect.FieldNumber = 6\n\tFeatureSet_EnforceNamingStyle_field_number      protoreflect.FieldNumber = 7\n\tFeatureSet_DefaultSymbolVisibility_field_number protoreflect.FieldNumber = 8\n)\n\n// Full and short names for google.protobuf.FeatureSet.FieldPresence.\nconst (\n\tFeatureSet_FieldPresence_enum_fullname = \"google.protobuf.FeatureSet.FieldPresence\"\n\tFeatureSet_FieldPresence_enum_name     = \"FieldPresence\"\n)\n\n// Enum values for google.protobuf.FeatureSet.FieldPresence.\nconst (\n\tFeatureSet_FIELD_PRESENCE_UNKNOWN_enum_value = 0\n\tFeatureSet_EXPLICIT_enum_value               = 1\n\tFeatureSet_IMPLICIT_enum_value               = 2\n\tFeatureSet_LEGACY_REQUIRED_enum_value        = 3\n)\n\n// Full and short names for google.protobuf.FeatureSet.EnumType.\nconst (\n\tFeatureSet_EnumType_enum_fullname = \"google.protobuf.FeatureSet.EnumType\"\n\tFeatureSet_EnumType_enum_name     = \"EnumType\"\n)\n\n// Enum values for google.protobuf.FeatureSet.EnumType.\nconst (\n\tFeatureSet_ENUM_TYPE_UNKNOWN_enum_value = 0\n\tFeatureSet_OPEN_enum_value              = 1\n\tFeatureSet_CLOSED_enum_value            = 2\n)\n\n// Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding.\nconst (\n\tFeatureSet_RepeatedFieldEncoding_enum_fullname = \"google.protobuf.FeatureSet.RepeatedFieldEncoding\"\n\tFeatureSet_RepeatedFieldEncoding_enum_name     = \"RepeatedFieldEncoding\"\n)\n\n// Enum values for google.protobuf.FeatureSet.RepeatedFieldEncoding.\nconst (\n\tFeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN_enum_value = 0\n\tFeatureSet_PACKED_enum_value                          = 1\n\tFeatureSet_EXPANDED_enum_value                        = 2\n)\n\n// Full and short names for google.protobuf.FeatureSet.Utf8Validation.\nconst (\n\tFeatureSet_Utf8Validation_enum_fullname = \"google.protobuf.FeatureSet.Utf8Validation\"\n\tFeatureSet_Utf8Validation_enum_name     = \"Utf8Validation\"\n)\n\n// Enum values for google.protobuf.FeatureSet.Utf8Validation.\nconst (\n\tFeatureSet_UTF8_VALIDATION_UNKNOWN_enum_value = 0\n\tFeatureSet_VERIFY_enum_value                  = 2\n\tFeatureSet_NONE_enum_value                    = 3\n)\n\n// Full and short names for google.protobuf.FeatureSet.MessageEncoding.\nconst (\n\tFeatureSet_MessageEncoding_enum_fullname = \"google.protobuf.FeatureSet.MessageEncoding\"\n\tFeatureSet_MessageEncoding_enum_name     = \"MessageEncoding\"\n)\n\n// Enum values for google.protobuf.FeatureSet.MessageEncoding.\nconst (\n\tFeatureSet_MESSAGE_ENCODING_UNKNOWN_enum_value = 0\n\tFeatureSet_LENGTH_PREFIXED_enum_value          = 1\n\tFeatureSet_DELIMITED_enum_value                = 2\n)\n\n// Full and short names for google.protobuf.FeatureSet.JsonFormat.\nconst (\n\tFeatureSet_JsonFormat_enum_fullname = \"google.protobuf.FeatureSet.JsonFormat\"\n\tFeatureSet_JsonFormat_enum_name     = \"JsonFormat\"\n)\n\n// Enum values for google.protobuf.FeatureSet.JsonFormat.\nconst (\n\tFeatureSet_JSON_FORMAT_UNKNOWN_enum_value = 0\n\tFeatureSet_ALLOW_enum_value               = 1\n\tFeatureSet_LEGACY_BEST_EFFORT_enum_value  = 2\n)\n\n// Full and short names for google.protobuf.FeatureSet.EnforceNamingStyle.\nconst (\n\tFeatureSet_EnforceNamingStyle_enum_fullname = \"google.protobuf.FeatureSet.EnforceNamingStyle\"\n\tFeatureSet_EnforceNamingStyle_enum_name     = \"EnforceNamingStyle\"\n)\n\n// Enum values for google.protobuf.FeatureSet.EnforceNamingStyle.\nconst (\n\tFeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN_enum_value = 0\n\tFeatureSet_STYLE2024_enum_value                    = 1\n\tFeatureSet_STYLE_LEGACY_enum_value                 = 2\n)\n\n// Names for google.protobuf.FeatureSet.VisibilityFeature.\nconst (\n\tFeatureSet_VisibilityFeature_message_name     protoreflect.Name     = \"VisibilityFeature\"\n\tFeatureSet_VisibilityFeature_message_fullname protoreflect.FullName = \"google.protobuf.FeatureSet.VisibilityFeature\"\n)\n\n// Full and short names for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.\nconst (\n\tFeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_fullname = \"google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility\"\n\tFeatureSet_VisibilityFeature_DefaultSymbolVisibility_enum_name     = \"DefaultSymbolVisibility\"\n)\n\n// Enum values for google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility.\nconst (\n\tFeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN_enum_value = 0\n\tFeatureSet_VisibilityFeature_EXPORT_ALL_enum_value                        = 1\n\tFeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL_enum_value                  = 2\n\tFeatureSet_VisibilityFeature_LOCAL_ALL_enum_value                         = 3\n\tFeatureSet_VisibilityFeature_STRICT_enum_value                            = 4\n)\n\n// Names for google.protobuf.FeatureSetDefaults.\nconst (\n\tFeatureSetDefaults_message_name     protoreflect.Name     = \"FeatureSetDefaults\"\n\tFeatureSetDefaults_message_fullname protoreflect.FullName = \"google.protobuf.FeatureSetDefaults\"\n)\n\n// Field names for google.protobuf.FeatureSetDefaults.\nconst (\n\tFeatureSetDefaults_Defaults_field_name       protoreflect.Name = \"defaults\"\n\tFeatureSetDefaults_MinimumEdition_field_name protoreflect.Name = \"minimum_edition\"\n\tFeatureSetDefaults_MaximumEdition_field_name protoreflect.Name = \"maximum_edition\"\n\n\tFeatureSetDefaults_Defaults_field_fullname       protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.defaults\"\n\tFeatureSetDefaults_MinimumEdition_field_fullname protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.minimum_edition\"\n\tFeatureSetDefaults_MaximumEdition_field_fullname protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.maximum_edition\"\n)\n\n// Field numbers for google.protobuf.FeatureSetDefaults.\nconst (\n\tFeatureSetDefaults_Defaults_field_number       protoreflect.FieldNumber = 1\n\tFeatureSetDefaults_MinimumEdition_field_number protoreflect.FieldNumber = 4\n\tFeatureSetDefaults_MaximumEdition_field_number protoreflect.FieldNumber = 5\n)\n\n// Names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.\nconst (\n\tFeatureSetDefaults_FeatureSetEditionDefault_message_name     protoreflect.Name     = \"FeatureSetEditionDefault\"\n\tFeatureSetDefaults_FeatureSetEditionDefault_message_fullname protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\"\n)\n\n// Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.\nconst (\n\tFeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name             protoreflect.Name = \"edition\"\n\tFeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_name protoreflect.Name = \"overridable_features\"\n\tFeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_name       protoreflect.Name = \"fixed_features\"\n\n\tFeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname             protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition\"\n\tFeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_fullname protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features\"\n\tFeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_fullname       protoreflect.FullName = \"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features\"\n)\n\n// Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.\nconst (\n\tFeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number             protoreflect.FieldNumber = 3\n\tFeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number protoreflect.FieldNumber = 4\n\tFeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number       protoreflect.FieldNumber = 5\n)\n\n// Names for google.protobuf.SourceCodeInfo.\nconst (\n\tSourceCodeInfo_message_name     protoreflect.Name     = \"SourceCodeInfo\"\n\tSourceCodeInfo_message_fullname protoreflect.FullName = \"google.protobuf.SourceCodeInfo\"\n)\n\n// Field names for google.protobuf.SourceCodeInfo.\nconst (\n\tSourceCodeInfo_Location_field_name protoreflect.Name = \"location\"\n\n\tSourceCodeInfo_Location_field_fullname protoreflect.FullName = \"google.protobuf.SourceCodeInfo.location\"\n)\n\n// Field numbers for google.protobuf.SourceCodeInfo.\nconst (\n\tSourceCodeInfo_Location_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.SourceCodeInfo.Location.\nconst (\n\tSourceCodeInfo_Location_message_name     protoreflect.Name     = \"Location\"\n\tSourceCodeInfo_Location_message_fullname protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location\"\n)\n\n// Field names for google.protobuf.SourceCodeInfo.Location.\nconst (\n\tSourceCodeInfo_Location_Path_field_name                    protoreflect.Name = \"path\"\n\tSourceCodeInfo_Location_Span_field_name                    protoreflect.Name = \"span\"\n\tSourceCodeInfo_Location_LeadingComments_field_name         protoreflect.Name = \"leading_comments\"\n\tSourceCodeInfo_Location_TrailingComments_field_name        protoreflect.Name = \"trailing_comments\"\n\tSourceCodeInfo_Location_LeadingDetachedComments_field_name protoreflect.Name = \"leading_detached_comments\"\n\n\tSourceCodeInfo_Location_Path_field_fullname                    protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location.path\"\n\tSourceCodeInfo_Location_Span_field_fullname                    protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location.span\"\n\tSourceCodeInfo_Location_LeadingComments_field_fullname         protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location.leading_comments\"\n\tSourceCodeInfo_Location_TrailingComments_field_fullname        protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location.trailing_comments\"\n\tSourceCodeInfo_Location_LeadingDetachedComments_field_fullname protoreflect.FullName = \"google.protobuf.SourceCodeInfo.Location.leading_detached_comments\"\n)\n\n// Field numbers for google.protobuf.SourceCodeInfo.Location.\nconst (\n\tSourceCodeInfo_Location_Path_field_number                    protoreflect.FieldNumber = 1\n\tSourceCodeInfo_Location_Span_field_number                    protoreflect.FieldNumber = 2\n\tSourceCodeInfo_Location_LeadingComments_field_number         protoreflect.FieldNumber = 3\n\tSourceCodeInfo_Location_TrailingComments_field_number        protoreflect.FieldNumber = 4\n\tSourceCodeInfo_Location_LeadingDetachedComments_field_number protoreflect.FieldNumber = 6\n)\n\n// Names for google.protobuf.GeneratedCodeInfo.\nconst (\n\tGeneratedCodeInfo_message_name     protoreflect.Name     = \"GeneratedCodeInfo\"\n\tGeneratedCodeInfo_message_fullname protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo\"\n)\n\n// Field names for google.protobuf.GeneratedCodeInfo.\nconst (\n\tGeneratedCodeInfo_Annotation_field_name protoreflect.Name = \"annotation\"\n\n\tGeneratedCodeInfo_Annotation_field_fullname protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.annotation\"\n)\n\n// Field numbers for google.protobuf.GeneratedCodeInfo.\nconst (\n\tGeneratedCodeInfo_Annotation_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.GeneratedCodeInfo.Annotation.\nconst (\n\tGeneratedCodeInfo_Annotation_message_name     protoreflect.Name     = \"Annotation\"\n\tGeneratedCodeInfo_Annotation_message_fullname protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation\"\n)\n\n// Field names for google.protobuf.GeneratedCodeInfo.Annotation.\nconst (\n\tGeneratedCodeInfo_Annotation_Path_field_name       protoreflect.Name = \"path\"\n\tGeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = \"source_file\"\n\tGeneratedCodeInfo_Annotation_Begin_field_name      protoreflect.Name = \"begin\"\n\tGeneratedCodeInfo_Annotation_End_field_name        protoreflect.Name = \"end\"\n\tGeneratedCodeInfo_Annotation_Semantic_field_name   protoreflect.Name = \"semantic\"\n\n\tGeneratedCodeInfo_Annotation_Path_field_fullname       protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation.path\"\n\tGeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation.source_file\"\n\tGeneratedCodeInfo_Annotation_Begin_field_fullname      protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation.begin\"\n\tGeneratedCodeInfo_Annotation_End_field_fullname        protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation.end\"\n\tGeneratedCodeInfo_Annotation_Semantic_field_fullname   protoreflect.FullName = \"google.protobuf.GeneratedCodeInfo.Annotation.semantic\"\n)\n\n// Field numbers for google.protobuf.GeneratedCodeInfo.Annotation.\nconst (\n\tGeneratedCodeInfo_Annotation_Path_field_number       protoreflect.FieldNumber = 1\n\tGeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2\n\tGeneratedCodeInfo_Annotation_Begin_field_number      protoreflect.FieldNumber = 3\n\tGeneratedCodeInfo_Annotation_End_field_number        protoreflect.FieldNumber = 4\n\tGeneratedCodeInfo_Annotation_Semantic_field_number   protoreflect.FieldNumber = 5\n)\n\n// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.\nconst (\n\tGeneratedCodeInfo_Annotation_Semantic_enum_fullname = \"google.protobuf.GeneratedCodeInfo.Annotation.Semantic\"\n\tGeneratedCodeInfo_Annotation_Semantic_enum_name     = \"Semantic\"\n)\n\n// Enum values for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.\nconst (\n\tGeneratedCodeInfo_Annotation_NONE_enum_value  = 0\n\tGeneratedCodeInfo_Annotation_SET_enum_value   = 1\n\tGeneratedCodeInfo_Annotation_ALIAS_enum_value = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/doc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package genid contains constants for declarations in descriptor.proto\n// and the well-known types.\npackage genid\n\nimport \"google.golang.org/protobuf/reflect/protoreflect\"\n\nconst GoogleProtobuf_package protoreflect.FullName = \"google.protobuf\"\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/duration_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_duration_proto = \"google/protobuf/duration.proto\"\n\n// Names for google.protobuf.Duration.\nconst (\n\tDuration_message_name     protoreflect.Name     = \"Duration\"\n\tDuration_message_fullname protoreflect.FullName = \"google.protobuf.Duration\"\n)\n\n// Field names for google.protobuf.Duration.\nconst (\n\tDuration_Seconds_field_name protoreflect.Name = \"seconds\"\n\tDuration_Nanos_field_name   protoreflect.Name = \"nanos\"\n\n\tDuration_Seconds_field_fullname protoreflect.FullName = \"google.protobuf.Duration.seconds\"\n\tDuration_Nanos_field_fullname   protoreflect.FullName = \"google.protobuf.Duration.nanos\"\n)\n\n// Field numbers for google.protobuf.Duration.\nconst (\n\tDuration_Seconds_field_number protoreflect.FieldNumber = 1\n\tDuration_Nanos_field_number   protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/empty_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_empty_proto = \"google/protobuf/empty.proto\"\n\n// Names for google.protobuf.Empty.\nconst (\n\tEmpty_message_name     protoreflect.Name     = \"Empty\"\n\tEmpty_message_fullname protoreflect.FullName = \"google.protobuf.Empty\"\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_field_mask_proto = \"google/protobuf/field_mask.proto\"\n\n// Names for google.protobuf.FieldMask.\nconst (\n\tFieldMask_message_name     protoreflect.Name     = \"FieldMask\"\n\tFieldMask_message_fullname protoreflect.FullName = \"google.protobuf.FieldMask\"\n)\n\n// Field names for google.protobuf.FieldMask.\nconst (\n\tFieldMask_Paths_field_name protoreflect.Name = \"paths\"\n\n\tFieldMask_Paths_field_fullname protoreflect.FullName = \"google.protobuf.FieldMask.paths\"\n)\n\n// Field numbers for google.protobuf.FieldMask.\nconst (\n\tFieldMask_Paths_field_number protoreflect.FieldNumber = 1\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_go_features_proto = \"google/protobuf/go_features.proto\"\n\n// Names for pb.GoFeatures.\nconst (\n\tGoFeatures_message_name     protoreflect.Name     = \"GoFeatures\"\n\tGoFeatures_message_fullname protoreflect.FullName = \"pb.GoFeatures\"\n)\n\n// Field names for pb.GoFeatures.\nconst (\n\tGoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = \"legacy_unmarshal_json_enum\"\n\tGoFeatures_ApiLevel_field_name                protoreflect.Name = \"api_level\"\n\tGoFeatures_StripEnumPrefix_field_name         protoreflect.Name = \"strip_enum_prefix\"\n\n\tGoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = \"pb.GoFeatures.legacy_unmarshal_json_enum\"\n\tGoFeatures_ApiLevel_field_fullname                protoreflect.FullName = \"pb.GoFeatures.api_level\"\n\tGoFeatures_StripEnumPrefix_field_fullname         protoreflect.FullName = \"pb.GoFeatures.strip_enum_prefix\"\n)\n\n// Field numbers for pb.GoFeatures.\nconst (\n\tGoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1\n\tGoFeatures_ApiLevel_field_number                protoreflect.FieldNumber = 2\n\tGoFeatures_StripEnumPrefix_field_number         protoreflect.FieldNumber = 3\n)\n\n// Full and short names for pb.GoFeatures.APILevel.\nconst (\n\tGoFeatures_APILevel_enum_fullname = \"pb.GoFeatures.APILevel\"\n\tGoFeatures_APILevel_enum_name     = \"APILevel\"\n)\n\n// Enum values for pb.GoFeatures.APILevel.\nconst (\n\tGoFeatures_API_LEVEL_UNSPECIFIED_enum_value = 0\n\tGoFeatures_API_OPEN_enum_value              = 1\n\tGoFeatures_API_HYBRID_enum_value            = 2\n\tGoFeatures_API_OPAQUE_enum_value            = 3\n)\n\n// Full and short names for pb.GoFeatures.StripEnumPrefix.\nconst (\n\tGoFeatures_StripEnumPrefix_enum_fullname = \"pb.GoFeatures.StripEnumPrefix\"\n\tGoFeatures_StripEnumPrefix_enum_name     = \"StripEnumPrefix\"\n)\n\n// Enum values for pb.GoFeatures.StripEnumPrefix.\nconst (\n\tGoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED_enum_value   = 0\n\tGoFeatures_STRIP_ENUM_PREFIX_KEEP_enum_value          = 1\n\tGoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH_enum_value = 2\n\tGoFeatures_STRIP_ENUM_PREFIX_STRIP_enum_value         = 3\n)\n\n// Extension numbers\nconst (\n\tFeatureSet_Go_ext_number protoreflect.FieldNumber = 1002\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/goname.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage genid\n\n// Go names of implementation-specific struct fields in generated messages.\nconst (\n\tState_goname = \"state\"\n\n\tSizeCache_goname  = \"sizeCache\"\n\tSizeCacheA_goname = \"XXX_sizecache\"\n\n\tUnknownFields_goname  = \"unknownFields\"\n\tUnknownFieldsA_goname = \"XXX_unrecognized\"\n\n\tExtensionFields_goname  = \"extensionFields\"\n\tExtensionFieldsA_goname = \"XXX_InternalExtensions\"\n\tExtensionFieldsB_goname = \"XXX_extensions\"\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/map_entry.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage genid\n\nimport \"google.golang.org/protobuf/reflect/protoreflect\"\n\n// Generic field names and numbers for synthetic map entry messages.\nconst (\n\tMapEntry_Key_field_name   protoreflect.Name = \"key\"\n\tMapEntry_Value_field_name protoreflect.Name = \"value\"\n\n\tMapEntry_Key_field_number   protoreflect.FieldNumber = 1\n\tMapEntry_Value_field_number protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/name.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage genid\n\nconst (\n\tNoUnkeyedLiteral_goname  = \"noUnkeyedLiteral\"\n\tNoUnkeyedLiteralA_goname = \"XXX_NoUnkeyedLiteral\"\n\n\tBuilderSuffix_goname = \"_builder\"\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_source_context_proto = \"google/protobuf/source_context.proto\"\n\n// Names for google.protobuf.SourceContext.\nconst (\n\tSourceContext_message_name     protoreflect.Name     = \"SourceContext\"\n\tSourceContext_message_fullname protoreflect.FullName = \"google.protobuf.SourceContext\"\n)\n\n// Field names for google.protobuf.SourceContext.\nconst (\n\tSourceContext_FileName_field_name protoreflect.Name = \"file_name\"\n\n\tSourceContext_FileName_field_fullname protoreflect.FullName = \"google.protobuf.SourceContext.file_name\"\n)\n\n// Field numbers for google.protobuf.SourceContext.\nconst (\n\tSourceContext_FileName_field_number protoreflect.FieldNumber = 1\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/struct_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_struct_proto = \"google/protobuf/struct.proto\"\n\n// Full and short names for google.protobuf.NullValue.\nconst (\n\tNullValue_enum_fullname = \"google.protobuf.NullValue\"\n\tNullValue_enum_name     = \"NullValue\"\n)\n\n// Enum values for google.protobuf.NullValue.\nconst (\n\tNullValue_NULL_VALUE_enum_value = 0\n)\n\n// Names for google.protobuf.Struct.\nconst (\n\tStruct_message_name     protoreflect.Name     = \"Struct\"\n\tStruct_message_fullname protoreflect.FullName = \"google.protobuf.Struct\"\n)\n\n// Field names for google.protobuf.Struct.\nconst (\n\tStruct_Fields_field_name protoreflect.Name = \"fields\"\n\n\tStruct_Fields_field_fullname protoreflect.FullName = \"google.protobuf.Struct.fields\"\n)\n\n// Field numbers for google.protobuf.Struct.\nconst (\n\tStruct_Fields_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.Struct.FieldsEntry.\nconst (\n\tStruct_FieldsEntry_message_name     protoreflect.Name     = \"FieldsEntry\"\n\tStruct_FieldsEntry_message_fullname protoreflect.FullName = \"google.protobuf.Struct.FieldsEntry\"\n)\n\n// Field names for google.protobuf.Struct.FieldsEntry.\nconst (\n\tStruct_FieldsEntry_Key_field_name   protoreflect.Name = \"key\"\n\tStruct_FieldsEntry_Value_field_name protoreflect.Name = \"value\"\n\n\tStruct_FieldsEntry_Key_field_fullname   protoreflect.FullName = \"google.protobuf.Struct.FieldsEntry.key\"\n\tStruct_FieldsEntry_Value_field_fullname protoreflect.FullName = \"google.protobuf.Struct.FieldsEntry.value\"\n)\n\n// Field numbers for google.protobuf.Struct.FieldsEntry.\nconst (\n\tStruct_FieldsEntry_Key_field_number   protoreflect.FieldNumber = 1\n\tStruct_FieldsEntry_Value_field_number protoreflect.FieldNumber = 2\n)\n\n// Names for google.protobuf.Value.\nconst (\n\tValue_message_name     protoreflect.Name     = \"Value\"\n\tValue_message_fullname protoreflect.FullName = \"google.protobuf.Value\"\n)\n\n// Field names for google.protobuf.Value.\nconst (\n\tValue_NullValue_field_name   protoreflect.Name = \"null_value\"\n\tValue_NumberValue_field_name protoreflect.Name = \"number_value\"\n\tValue_StringValue_field_name protoreflect.Name = \"string_value\"\n\tValue_BoolValue_field_name   protoreflect.Name = \"bool_value\"\n\tValue_StructValue_field_name protoreflect.Name = \"struct_value\"\n\tValue_ListValue_field_name   protoreflect.Name = \"list_value\"\n\n\tValue_NullValue_field_fullname   protoreflect.FullName = \"google.protobuf.Value.null_value\"\n\tValue_NumberValue_field_fullname protoreflect.FullName = \"google.protobuf.Value.number_value\"\n\tValue_StringValue_field_fullname protoreflect.FullName = \"google.protobuf.Value.string_value\"\n\tValue_BoolValue_field_fullname   protoreflect.FullName = \"google.protobuf.Value.bool_value\"\n\tValue_StructValue_field_fullname protoreflect.FullName = \"google.protobuf.Value.struct_value\"\n\tValue_ListValue_field_fullname   protoreflect.FullName = \"google.protobuf.Value.list_value\"\n)\n\n// Field numbers for google.protobuf.Value.\nconst (\n\tValue_NullValue_field_number   protoreflect.FieldNumber = 1\n\tValue_NumberValue_field_number protoreflect.FieldNumber = 2\n\tValue_StringValue_field_number protoreflect.FieldNumber = 3\n\tValue_BoolValue_field_number   protoreflect.FieldNumber = 4\n\tValue_StructValue_field_number protoreflect.FieldNumber = 5\n\tValue_ListValue_field_number   protoreflect.FieldNumber = 6\n)\n\n// Oneof names for google.protobuf.Value.\nconst (\n\tValue_Kind_oneof_name protoreflect.Name = \"kind\"\n\n\tValue_Kind_oneof_fullname protoreflect.FullName = \"google.protobuf.Value.kind\"\n)\n\n// Names for google.protobuf.ListValue.\nconst (\n\tListValue_message_name     protoreflect.Name     = \"ListValue\"\n\tListValue_message_fullname protoreflect.FullName = \"google.protobuf.ListValue\"\n)\n\n// Field names for google.protobuf.ListValue.\nconst (\n\tListValue_Values_field_name protoreflect.Name = \"values\"\n\n\tListValue_Values_field_fullname protoreflect.FullName = \"google.protobuf.ListValue.values\"\n)\n\n// Field numbers for google.protobuf.ListValue.\nconst (\n\tListValue_Values_field_number protoreflect.FieldNumber = 1\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_timestamp_proto = \"google/protobuf/timestamp.proto\"\n\n// Names for google.protobuf.Timestamp.\nconst (\n\tTimestamp_message_name     protoreflect.Name     = \"Timestamp\"\n\tTimestamp_message_fullname protoreflect.FullName = \"google.protobuf.Timestamp\"\n)\n\n// Field names for google.protobuf.Timestamp.\nconst (\n\tTimestamp_Seconds_field_name protoreflect.Name = \"seconds\"\n\tTimestamp_Nanos_field_name   protoreflect.Name = \"nanos\"\n\n\tTimestamp_Seconds_field_fullname protoreflect.FullName = \"google.protobuf.Timestamp.seconds\"\n\tTimestamp_Nanos_field_fullname   protoreflect.FullName = \"google.protobuf.Timestamp.nanos\"\n)\n\n// Field numbers for google.protobuf.Timestamp.\nconst (\n\tTimestamp_Seconds_field_number protoreflect.FieldNumber = 1\n\tTimestamp_Nanos_field_number   protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/type_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_type_proto = \"google/protobuf/type.proto\"\n\n// Full and short names for google.protobuf.Syntax.\nconst (\n\tSyntax_enum_fullname = \"google.protobuf.Syntax\"\n\tSyntax_enum_name     = \"Syntax\"\n)\n\n// Enum values for google.protobuf.Syntax.\nconst (\n\tSyntax_SYNTAX_PROTO2_enum_value   = 0\n\tSyntax_SYNTAX_PROTO3_enum_value   = 1\n\tSyntax_SYNTAX_EDITIONS_enum_value = 2\n)\n\n// Names for google.protobuf.Type.\nconst (\n\tType_message_name     protoreflect.Name     = \"Type\"\n\tType_message_fullname protoreflect.FullName = \"google.protobuf.Type\"\n)\n\n// Field names for google.protobuf.Type.\nconst (\n\tType_Name_field_name          protoreflect.Name = \"name\"\n\tType_Fields_field_name        protoreflect.Name = \"fields\"\n\tType_Oneofs_field_name        protoreflect.Name = \"oneofs\"\n\tType_Options_field_name       protoreflect.Name = \"options\"\n\tType_SourceContext_field_name protoreflect.Name = \"source_context\"\n\tType_Syntax_field_name        protoreflect.Name = \"syntax\"\n\tType_Edition_field_name       protoreflect.Name = \"edition\"\n\n\tType_Name_field_fullname          protoreflect.FullName = \"google.protobuf.Type.name\"\n\tType_Fields_field_fullname        protoreflect.FullName = \"google.protobuf.Type.fields\"\n\tType_Oneofs_field_fullname        protoreflect.FullName = \"google.protobuf.Type.oneofs\"\n\tType_Options_field_fullname       protoreflect.FullName = \"google.protobuf.Type.options\"\n\tType_SourceContext_field_fullname protoreflect.FullName = \"google.protobuf.Type.source_context\"\n\tType_Syntax_field_fullname        protoreflect.FullName = \"google.protobuf.Type.syntax\"\n\tType_Edition_field_fullname       protoreflect.FullName = \"google.protobuf.Type.edition\"\n)\n\n// Field numbers for google.protobuf.Type.\nconst (\n\tType_Name_field_number          protoreflect.FieldNumber = 1\n\tType_Fields_field_number        protoreflect.FieldNumber = 2\n\tType_Oneofs_field_number        protoreflect.FieldNumber = 3\n\tType_Options_field_number       protoreflect.FieldNumber = 4\n\tType_SourceContext_field_number protoreflect.FieldNumber = 5\n\tType_Syntax_field_number        protoreflect.FieldNumber = 6\n\tType_Edition_field_number       protoreflect.FieldNumber = 7\n)\n\n// Names for google.protobuf.Field.\nconst (\n\tField_message_name     protoreflect.Name     = \"Field\"\n\tField_message_fullname protoreflect.FullName = \"google.protobuf.Field\"\n)\n\n// Field names for google.protobuf.Field.\nconst (\n\tField_Kind_field_name         protoreflect.Name = \"kind\"\n\tField_Cardinality_field_name  protoreflect.Name = \"cardinality\"\n\tField_Number_field_name       protoreflect.Name = \"number\"\n\tField_Name_field_name         protoreflect.Name = \"name\"\n\tField_TypeUrl_field_name      protoreflect.Name = \"type_url\"\n\tField_OneofIndex_field_name   protoreflect.Name = \"oneof_index\"\n\tField_Packed_field_name       protoreflect.Name = \"packed\"\n\tField_Options_field_name      protoreflect.Name = \"options\"\n\tField_JsonName_field_name     protoreflect.Name = \"json_name\"\n\tField_DefaultValue_field_name protoreflect.Name = \"default_value\"\n\n\tField_Kind_field_fullname         protoreflect.FullName = \"google.protobuf.Field.kind\"\n\tField_Cardinality_field_fullname  protoreflect.FullName = \"google.protobuf.Field.cardinality\"\n\tField_Number_field_fullname       protoreflect.FullName = \"google.protobuf.Field.number\"\n\tField_Name_field_fullname         protoreflect.FullName = \"google.protobuf.Field.name\"\n\tField_TypeUrl_field_fullname      protoreflect.FullName = \"google.protobuf.Field.type_url\"\n\tField_OneofIndex_field_fullname   protoreflect.FullName = \"google.protobuf.Field.oneof_index\"\n\tField_Packed_field_fullname       protoreflect.FullName = \"google.protobuf.Field.packed\"\n\tField_Options_field_fullname      protoreflect.FullName = \"google.protobuf.Field.options\"\n\tField_JsonName_field_fullname     protoreflect.FullName = \"google.protobuf.Field.json_name\"\n\tField_DefaultValue_field_fullname protoreflect.FullName = \"google.protobuf.Field.default_value\"\n)\n\n// Field numbers for google.protobuf.Field.\nconst (\n\tField_Kind_field_number         protoreflect.FieldNumber = 1\n\tField_Cardinality_field_number  protoreflect.FieldNumber = 2\n\tField_Number_field_number       protoreflect.FieldNumber = 3\n\tField_Name_field_number         protoreflect.FieldNumber = 4\n\tField_TypeUrl_field_number      protoreflect.FieldNumber = 6\n\tField_OneofIndex_field_number   protoreflect.FieldNumber = 7\n\tField_Packed_field_number       protoreflect.FieldNumber = 8\n\tField_Options_field_number      protoreflect.FieldNumber = 9\n\tField_JsonName_field_number     protoreflect.FieldNumber = 10\n\tField_DefaultValue_field_number protoreflect.FieldNumber = 11\n)\n\n// Full and short names for google.protobuf.Field.Kind.\nconst (\n\tField_Kind_enum_fullname = \"google.protobuf.Field.Kind\"\n\tField_Kind_enum_name     = \"Kind\"\n)\n\n// Enum values for google.protobuf.Field.Kind.\nconst (\n\tField_TYPE_UNKNOWN_enum_value  = 0\n\tField_TYPE_DOUBLE_enum_value   = 1\n\tField_TYPE_FLOAT_enum_value    = 2\n\tField_TYPE_INT64_enum_value    = 3\n\tField_TYPE_UINT64_enum_value   = 4\n\tField_TYPE_INT32_enum_value    = 5\n\tField_TYPE_FIXED64_enum_value  = 6\n\tField_TYPE_FIXED32_enum_value  = 7\n\tField_TYPE_BOOL_enum_value     = 8\n\tField_TYPE_STRING_enum_value   = 9\n\tField_TYPE_GROUP_enum_value    = 10\n\tField_TYPE_MESSAGE_enum_value  = 11\n\tField_TYPE_BYTES_enum_value    = 12\n\tField_TYPE_UINT32_enum_value   = 13\n\tField_TYPE_ENUM_enum_value     = 14\n\tField_TYPE_SFIXED32_enum_value = 15\n\tField_TYPE_SFIXED64_enum_value = 16\n\tField_TYPE_SINT32_enum_value   = 17\n\tField_TYPE_SINT64_enum_value   = 18\n)\n\n// Full and short names for google.protobuf.Field.Cardinality.\nconst (\n\tField_Cardinality_enum_fullname = \"google.protobuf.Field.Cardinality\"\n\tField_Cardinality_enum_name     = \"Cardinality\"\n)\n\n// Enum values for google.protobuf.Field.Cardinality.\nconst (\n\tField_CARDINALITY_UNKNOWN_enum_value  = 0\n\tField_CARDINALITY_OPTIONAL_enum_value = 1\n\tField_CARDINALITY_REQUIRED_enum_value = 2\n\tField_CARDINALITY_REPEATED_enum_value = 3\n)\n\n// Names for google.protobuf.Enum.\nconst (\n\tEnum_message_name     protoreflect.Name     = \"Enum\"\n\tEnum_message_fullname protoreflect.FullName = \"google.protobuf.Enum\"\n)\n\n// Field names for google.protobuf.Enum.\nconst (\n\tEnum_Name_field_name          protoreflect.Name = \"name\"\n\tEnum_Enumvalue_field_name     protoreflect.Name = \"enumvalue\"\n\tEnum_Options_field_name       protoreflect.Name = \"options\"\n\tEnum_SourceContext_field_name protoreflect.Name = \"source_context\"\n\tEnum_Syntax_field_name        protoreflect.Name = \"syntax\"\n\tEnum_Edition_field_name       protoreflect.Name = \"edition\"\n\n\tEnum_Name_field_fullname          protoreflect.FullName = \"google.protobuf.Enum.name\"\n\tEnum_Enumvalue_field_fullname     protoreflect.FullName = \"google.protobuf.Enum.enumvalue\"\n\tEnum_Options_field_fullname       protoreflect.FullName = \"google.protobuf.Enum.options\"\n\tEnum_SourceContext_field_fullname protoreflect.FullName = \"google.protobuf.Enum.source_context\"\n\tEnum_Syntax_field_fullname        protoreflect.FullName = \"google.protobuf.Enum.syntax\"\n\tEnum_Edition_field_fullname       protoreflect.FullName = \"google.protobuf.Enum.edition\"\n)\n\n// Field numbers for google.protobuf.Enum.\nconst (\n\tEnum_Name_field_number          protoreflect.FieldNumber = 1\n\tEnum_Enumvalue_field_number     protoreflect.FieldNumber = 2\n\tEnum_Options_field_number       protoreflect.FieldNumber = 3\n\tEnum_SourceContext_field_number protoreflect.FieldNumber = 4\n\tEnum_Syntax_field_number        protoreflect.FieldNumber = 5\n\tEnum_Edition_field_number       protoreflect.FieldNumber = 6\n)\n\n// Names for google.protobuf.EnumValue.\nconst (\n\tEnumValue_message_name     protoreflect.Name     = \"EnumValue\"\n\tEnumValue_message_fullname protoreflect.FullName = \"google.protobuf.EnumValue\"\n)\n\n// Field names for google.protobuf.EnumValue.\nconst (\n\tEnumValue_Name_field_name    protoreflect.Name = \"name\"\n\tEnumValue_Number_field_name  protoreflect.Name = \"number\"\n\tEnumValue_Options_field_name protoreflect.Name = \"options\"\n\n\tEnumValue_Name_field_fullname    protoreflect.FullName = \"google.protobuf.EnumValue.name\"\n\tEnumValue_Number_field_fullname  protoreflect.FullName = \"google.protobuf.EnumValue.number\"\n\tEnumValue_Options_field_fullname protoreflect.FullName = \"google.protobuf.EnumValue.options\"\n)\n\n// Field numbers for google.protobuf.EnumValue.\nconst (\n\tEnumValue_Name_field_number    protoreflect.FieldNumber = 1\n\tEnumValue_Number_field_number  protoreflect.FieldNumber = 2\n\tEnumValue_Options_field_number protoreflect.FieldNumber = 3\n)\n\n// Names for google.protobuf.Option.\nconst (\n\tOption_message_name     protoreflect.Name     = \"Option\"\n\tOption_message_fullname protoreflect.FullName = \"google.protobuf.Option\"\n)\n\n// Field names for google.protobuf.Option.\nconst (\n\tOption_Name_field_name  protoreflect.Name = \"name\"\n\tOption_Value_field_name protoreflect.Name = \"value\"\n\n\tOption_Name_field_fullname  protoreflect.FullName = \"google.protobuf.Option.name\"\n\tOption_Value_field_fullname protoreflect.FullName = \"google.protobuf.Option.value\"\n)\n\n// Field numbers for google.protobuf.Option.\nconst (\n\tOption_Name_field_number  protoreflect.FieldNumber = 1\n\tOption_Value_field_number protoreflect.FieldNumber = 2\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/wrappers.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage genid\n\nimport \"google.golang.org/protobuf/reflect/protoreflect\"\n\n// Generic field name and number for messages in wrappers.proto.\nconst (\n\tWrapperValue_Value_field_name   protoreflect.Name        = \"value\"\n\tWrapperValue_Value_field_number protoreflect.FieldNumber = 1\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage genid\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nconst File_google_protobuf_wrappers_proto = \"google/protobuf/wrappers.proto\"\n\n// Names for google.protobuf.DoubleValue.\nconst (\n\tDoubleValue_message_name     protoreflect.Name     = \"DoubleValue\"\n\tDoubleValue_message_fullname protoreflect.FullName = \"google.protobuf.DoubleValue\"\n)\n\n// Field names for google.protobuf.DoubleValue.\nconst (\n\tDoubleValue_Value_field_name protoreflect.Name = \"value\"\n\n\tDoubleValue_Value_field_fullname protoreflect.FullName = \"google.protobuf.DoubleValue.value\"\n)\n\n// Field numbers for google.protobuf.DoubleValue.\nconst (\n\tDoubleValue_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.FloatValue.\nconst (\n\tFloatValue_message_name     protoreflect.Name     = \"FloatValue\"\n\tFloatValue_message_fullname protoreflect.FullName = \"google.protobuf.FloatValue\"\n)\n\n// Field names for google.protobuf.FloatValue.\nconst (\n\tFloatValue_Value_field_name protoreflect.Name = \"value\"\n\n\tFloatValue_Value_field_fullname protoreflect.FullName = \"google.protobuf.FloatValue.value\"\n)\n\n// Field numbers for google.protobuf.FloatValue.\nconst (\n\tFloatValue_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.Int64Value.\nconst (\n\tInt64Value_message_name     protoreflect.Name     = \"Int64Value\"\n\tInt64Value_message_fullname protoreflect.FullName = \"google.protobuf.Int64Value\"\n)\n\n// Field names for google.protobuf.Int64Value.\nconst (\n\tInt64Value_Value_field_name protoreflect.Name = \"value\"\n\n\tInt64Value_Value_field_fullname protoreflect.FullName = \"google.protobuf.Int64Value.value\"\n)\n\n// Field numbers for google.protobuf.Int64Value.\nconst (\n\tInt64Value_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.UInt64Value.\nconst (\n\tUInt64Value_message_name     protoreflect.Name     = \"UInt64Value\"\n\tUInt64Value_message_fullname protoreflect.FullName = \"google.protobuf.UInt64Value\"\n)\n\n// Field names for google.protobuf.UInt64Value.\nconst (\n\tUInt64Value_Value_field_name protoreflect.Name = \"value\"\n\n\tUInt64Value_Value_field_fullname protoreflect.FullName = \"google.protobuf.UInt64Value.value\"\n)\n\n// Field numbers for google.protobuf.UInt64Value.\nconst (\n\tUInt64Value_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.Int32Value.\nconst (\n\tInt32Value_message_name     protoreflect.Name     = \"Int32Value\"\n\tInt32Value_message_fullname protoreflect.FullName = \"google.protobuf.Int32Value\"\n)\n\n// Field names for google.protobuf.Int32Value.\nconst (\n\tInt32Value_Value_field_name protoreflect.Name = \"value\"\n\n\tInt32Value_Value_field_fullname protoreflect.FullName = \"google.protobuf.Int32Value.value\"\n)\n\n// Field numbers for google.protobuf.Int32Value.\nconst (\n\tInt32Value_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.UInt32Value.\nconst (\n\tUInt32Value_message_name     protoreflect.Name     = \"UInt32Value\"\n\tUInt32Value_message_fullname protoreflect.FullName = \"google.protobuf.UInt32Value\"\n)\n\n// Field names for google.protobuf.UInt32Value.\nconst (\n\tUInt32Value_Value_field_name protoreflect.Name = \"value\"\n\n\tUInt32Value_Value_field_fullname protoreflect.FullName = \"google.protobuf.UInt32Value.value\"\n)\n\n// Field numbers for google.protobuf.UInt32Value.\nconst (\n\tUInt32Value_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.BoolValue.\nconst (\n\tBoolValue_message_name     protoreflect.Name     = \"BoolValue\"\n\tBoolValue_message_fullname protoreflect.FullName = \"google.protobuf.BoolValue\"\n)\n\n// Field names for google.protobuf.BoolValue.\nconst (\n\tBoolValue_Value_field_name protoreflect.Name = \"value\"\n\n\tBoolValue_Value_field_fullname protoreflect.FullName = \"google.protobuf.BoolValue.value\"\n)\n\n// Field numbers for google.protobuf.BoolValue.\nconst (\n\tBoolValue_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.StringValue.\nconst (\n\tStringValue_message_name     protoreflect.Name     = \"StringValue\"\n\tStringValue_message_fullname protoreflect.FullName = \"google.protobuf.StringValue\"\n)\n\n// Field names for google.protobuf.StringValue.\nconst (\n\tStringValue_Value_field_name protoreflect.Name = \"value\"\n\n\tStringValue_Value_field_fullname protoreflect.FullName = \"google.protobuf.StringValue.value\"\n)\n\n// Field numbers for google.protobuf.StringValue.\nconst (\n\tStringValue_Value_field_number protoreflect.FieldNumber = 1\n)\n\n// Names for google.protobuf.BytesValue.\nconst (\n\tBytesValue_message_name     protoreflect.Name     = \"BytesValue\"\n\tBytesValue_message_fullname protoreflect.FullName = \"google.protobuf.BytesValue\"\n)\n\n// Field names for google.protobuf.BytesValue.\nconst (\n\tBytesValue_Value_field_name protoreflect.Name = \"value\"\n\n\tBytesValue_Value_field_fullname protoreflect.FullName = \"google.protobuf.BytesValue.value\"\n)\n\n// Field numbers for google.protobuf.BytesValue.\nconst (\n\tBytesValue_Value_field_number protoreflect.FieldNumber = 1\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/api_export.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\n\t\"google.golang.org/protobuf/encoding/prototext\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// Export is a zero-length named type that exists only to export a set of\n// functions that we do not want to appear in godoc.\ntype Export struct{}\n\n// NewError formats a string according to the format specifier and arguments and\n// returns an error that has a \"proto\" prefix.\nfunc (Export) NewError(f string, x ...any) error {\n\treturn errors.New(f, x...)\n}\n\n// enum is any enum type generated by protoc-gen-go\n// and must be a named int32 type.\ntype enum = any\n\n// EnumOf returns the protoreflect.Enum interface over e.\n// It returns nil if e is nil.\nfunc (Export) EnumOf(e enum) protoreflect.Enum {\n\tswitch e := e.(type) {\n\tcase nil:\n\t\treturn nil\n\tcase protoreflect.Enum:\n\t\treturn e\n\tdefault:\n\t\treturn legacyWrapEnum(reflect.ValueOf(e))\n\t}\n}\n\n// EnumDescriptorOf returns the protoreflect.EnumDescriptor for e.\n// It returns nil if e is nil.\nfunc (Export) EnumDescriptorOf(e enum) protoreflect.EnumDescriptor {\n\tswitch e := e.(type) {\n\tcase nil:\n\t\treturn nil\n\tcase protoreflect.Enum:\n\t\treturn e.Descriptor()\n\tdefault:\n\t\treturn LegacyLoadEnumDesc(reflect.TypeOf(e))\n\t}\n}\n\n// EnumTypeOf returns the protoreflect.EnumType for e.\n// It returns nil if e is nil.\nfunc (Export) EnumTypeOf(e enum) protoreflect.EnumType {\n\tswitch e := e.(type) {\n\tcase nil:\n\t\treturn nil\n\tcase protoreflect.Enum:\n\t\treturn e.Type()\n\tdefault:\n\t\treturn legacyLoadEnumType(reflect.TypeOf(e))\n\t}\n}\n\n// EnumStringOf returns the enum value as a string, either as the name if\n// the number is resolvable, or the number formatted as a string.\nfunc (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNumber) string {\n\tev := ed.Values().ByNumber(n)\n\tif ev != nil {\n\t\treturn string(ev.Name())\n\t}\n\treturn strconv.Itoa(int(n))\n}\n\n// message is any message type generated by protoc-gen-go\n// and must be a pointer to a named struct type.\ntype message = any\n\n// legacyMessageWrapper wraps a v2 message as a v1 message.\ntype legacyMessageWrapper struct{ m protoreflect.ProtoMessage }\n\nfunc (m legacyMessageWrapper) Reset()         { proto.Reset(m.m) }\nfunc (m legacyMessageWrapper) String() string { return Export{}.MessageStringOf(m.m) }\nfunc (m legacyMessageWrapper) ProtoMessage()  {}\n\n// ProtoMessageV1Of converts either a v1 or v2 message to a v1 message.\n// It returns nil if m is nil.\nfunc (Export) ProtoMessageV1Of(m message) protoiface.MessageV1 {\n\tswitch mv := m.(type) {\n\tcase nil:\n\t\treturn nil\n\tcase protoiface.MessageV1:\n\t\treturn mv\n\tcase unwrapper:\n\t\treturn Export{}.ProtoMessageV1Of(mv.protoUnwrap())\n\tcase protoreflect.ProtoMessage:\n\t\treturn legacyMessageWrapper{mv}\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"message %T is neither a v1 or v2 Message\", m))\n\t}\n}\n\nfunc (Export) protoMessageV2Of(m message) protoreflect.ProtoMessage {\n\tswitch mv := m.(type) {\n\tcase nil:\n\t\treturn nil\n\tcase protoreflect.ProtoMessage:\n\t\treturn mv\n\tcase legacyMessageWrapper:\n\t\treturn mv.m\n\tcase protoiface.MessageV1:\n\t\treturn nil\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"message %T is neither a v1 or v2 Message\", m))\n\t}\n}\n\n// ProtoMessageV2Of converts either a v1 or v2 message to a v2 message.\n// It returns nil if m is nil.\nfunc (Export) ProtoMessageV2Of(m message) protoreflect.ProtoMessage {\n\tif m == nil {\n\t\treturn nil\n\t}\n\tif mv := (Export{}).protoMessageV2Of(m); mv != nil {\n\t\treturn mv\n\t}\n\treturn legacyWrapMessage(reflect.ValueOf(m)).Interface()\n}\n\n// MessageOf returns the protoreflect.Message interface over m.\n// It returns nil if m is nil.\nfunc (Export) MessageOf(m message) protoreflect.Message {\n\tif m == nil {\n\t\treturn nil\n\t}\n\tif mv := (Export{}).protoMessageV2Of(m); mv != nil {\n\t\treturn mv.ProtoReflect()\n\t}\n\treturn legacyWrapMessage(reflect.ValueOf(m))\n}\n\n// MessageDescriptorOf returns the protoreflect.MessageDescriptor for m.\n// It returns nil if m is nil.\nfunc (Export) MessageDescriptorOf(m message) protoreflect.MessageDescriptor {\n\tif m == nil {\n\t\treturn nil\n\t}\n\tif mv := (Export{}).protoMessageV2Of(m); mv != nil {\n\t\treturn mv.ProtoReflect().Descriptor()\n\t}\n\treturn LegacyLoadMessageDesc(reflect.TypeOf(m))\n}\n\n// MessageTypeOf returns the protoreflect.MessageType for m.\n// It returns nil if m is nil.\nfunc (Export) MessageTypeOf(m message) protoreflect.MessageType {\n\tif m == nil {\n\t\treturn nil\n\t}\n\tif mv := (Export{}).protoMessageV2Of(m); mv != nil {\n\t\treturn mv.ProtoReflect().Type()\n\t}\n\treturn legacyLoadMessageType(reflect.TypeOf(m), \"\")\n}\n\n// MessageStringOf returns the message value as a string,\n// which is the message serialized in the protobuf text format.\nfunc (Export) MessageStringOf(m protoreflect.ProtoMessage) string {\n\treturn prototext.MarshalOptions{Multiline: false}.Format(m)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"strconv\"\n\t\"sync/atomic\"\n\t\"unsafe\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc (Export) UnmarshalField(msg any, fieldNum int32) {\n\tUnmarshalField(msg.(protoreflect.ProtoMessage).ProtoReflect(), protoreflect.FieldNumber(fieldNum))\n}\n\n// Present checks the presence set for a certain field number (zero\n// based, ordered by appearance in original proto file). part is\n// a pointer to the correct element in the bitmask array, num is the\n// field number unaltered.  Example (field number 70 -> part =\n// &m.XXX_presence[1], num = 70)\nfunc (Export) Present(part *uint32, num uint32) bool {\n\t// This hook will read an unprotected shadow presence set if\n\t// we're unning under the race detector\n\traceDetectHookPresent(part, num)\n\treturn atomic.LoadUint32(part)&(1<<(num%32)) > 0\n}\n\n// SetPresent adds a field to the presence set. part is a pointer to\n// the relevant element in the array and num is the field number\n// unaltered.  size is the number of fields in the protocol\n// buffer.\nfunc (Export) SetPresent(part *uint32, num uint32, size uint32) {\n\t// This hook will mutate an unprotected shadow presence set if\n\t// we're running under the race detector\n\traceDetectHookSetPresent(part, num, presenceSize(size))\n\tfor {\n\t\told := atomic.LoadUint32(part)\n\t\tif atomic.CompareAndSwapUint32(part, old, old|(1<<(num%32))) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// SetPresentNonAtomic is like SetPresent, but operates non-atomically.\n// It is meant for use by builder methods, where the message is known not\n// to be accessible yet by other goroutines.\nfunc (Export) SetPresentNonAtomic(part *uint32, num uint32, size uint32) {\n\t// This hook will mutate an unprotected shadow presence set if\n\t// we're running under the race detector\n\traceDetectHookSetPresent(part, num, presenceSize(size))\n\t*part |= 1 << (num % 32)\n}\n\n// ClearPresence removes a field from the presence set. part is a\n// pointer to the relevant element in the presence array and num is\n// the field number unaltered.\nfunc (Export) ClearPresent(part *uint32, num uint32) {\n\t// This hook will mutate an unprotected shadow presence set if\n\t// we're running under the race detector\n\traceDetectHookClearPresent(part, num)\n\tfor {\n\t\told := atomic.LoadUint32(part)\n\t\tif atomic.CompareAndSwapUint32(part, old, old&^(1<<(num%32))) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// interfaceToPointer takes a pointer to an empty interface whose value is a\n// pointer type, and converts it into a \"pointer\" that points to the same\n// target\nfunc interfaceToPointer(i *any) pointer {\n\treturn pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}\n}\n\nfunc (p pointer) atomicGetPointer() pointer {\n\treturn pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))}\n}\n\nfunc (p pointer) atomicSetPointer(q pointer) {\n\tatomic.StorePointer((*unsafe.Pointer)(p.p), q.p)\n}\n\n// AtomicCheckPointerIsNil takes an interface (which is a pointer to a\n// pointer) and returns true if the pointed-to pointer is nil (using an\n// atomic load).  This function is inlineable and, on x86, just becomes a\n// simple load and compare.\nfunc (Export) AtomicCheckPointerIsNil(ptr any) bool {\n\treturn interfaceToPointer(&ptr).atomicGetPointer().IsNil()\n}\n\n// AtomicSetPointer takes two interfaces (first is a pointer to a pointer,\n// second is a pointer) and atomically sets the second pointer into location\n// referenced by first pointer.  Unfortunately, atomicSetPointer() does not inline\n// (even on x86), so this does not become a simple store on x86.\nfunc (Export) AtomicSetPointer(dstPtr, valPtr any) {\n\tinterfaceToPointer(&dstPtr).atomicSetPointer(interfaceToPointer(&valPtr))\n}\n\n// AtomicLoadPointer loads the pointer at the location pointed at by src,\n// and stores that pointer value into the location pointed at by dst.\nfunc (Export) AtomicLoadPointer(ptr Pointer, dst Pointer) {\n\t*(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr)))\n}\n\n// AtomicInitializePointer makes ptr and dst point to the same value.\n//\n// If *ptr is a nil pointer, it sets *ptr = *dst.\n//\n// If *ptr is a non-nil pointer, it sets *dst = *ptr.\nfunc (Export) AtomicInitializePointer(ptr Pointer, dst Pointer) {\n\tif !atomic.CompareAndSwapPointer((*unsafe.Pointer)(ptr), unsafe.Pointer(nil), *(*unsafe.Pointer)(dst)) {\n\t\t*(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr)))\n\t}\n}\n\n// MessageFieldStringOf returns the field formatted as a string,\n// either as the field name if resolvable otherwise as a decimal string.\nfunc (Export) MessageFieldStringOf(md protoreflect.MessageDescriptor, n protoreflect.FieldNumber) string {\n\tfd := md.Fields().ByNumber(n)\n\tif fd != nil {\n\t\treturn string(fd.Name())\n\t}\n\treturn strconv.Itoa(int(n))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/bitmap.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build !race\n\npackage impl\n\n// There is no additional data as we're not running under race detector.\ntype RaceDetectHookData struct{}\n\n// Empty stubs for when not using the race detector. Calls to these from index.go should be optimized away.\nfunc (presence) raceDetectHookPresent(num uint32)                       {}\nfunc (presence) raceDetectHookSetPresent(num uint32, size presenceSize) {}\nfunc (presence) raceDetectHookClearPresent(num uint32)                  {}\nfunc (presence) raceDetectHookAllocAndCopy(src presence)                {}\n\n// raceDetectHookPresent is called by the generated file interface\n// (*proto.internalFuncs) Present to optionally read an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookPresent(field *uint32, num uint32) {}\n\n// raceDetectHookSetPresent is called by the generated file interface\n// (*proto.internalFuncs) SetPresent to optionally write an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {}\n\n// raceDetectHookClearPresent is called by the generated file interface\n// (*proto.internalFuncs) ClearPresent to optionally write an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookClearPresent(field *uint32, num uint32) {}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n//go:build race\n\npackage impl\n\n// When running under race detector, we add a presence map of bytes, that we can access\n// in the hook functions so that we trigger the race detection whenever we have concurrent\n// Read-Writes or Write-Writes. The race detector does not otherwise detect invalid concurrent\n// access to lazy fields as all updates of bitmaps and pointers are done using atomic operations.\ntype RaceDetectHookData struct {\n\tshadowPresence *[]byte\n}\n\n// Hooks for presence bitmap operations that allocate, read and write the shadowPresence\n// using non-atomic operations.\nfunc (data *RaceDetectHookData) raceDetectHookAlloc(size presenceSize) {\n\tsp := make([]byte, size)\n\tatomicStoreShadowPresence(&data.shadowPresence, &sp)\n}\n\nfunc (p presence) raceDetectHookPresent(num uint32) {\n\tdata := p.toRaceDetectData()\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp != nil {\n\t\t_ = (*sp)[num]\n\t}\n}\n\nfunc (p presence) raceDetectHookSetPresent(num uint32, size presenceSize) {\n\tdata := p.toRaceDetectData()\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp == nil {\n\t\tdata.raceDetectHookAlloc(size)\n\t\tsp = atomicLoadShadowPresence(&data.shadowPresence)\n\t}\n\t(*sp)[num] = 1\n}\n\nfunc (p presence) raceDetectHookClearPresent(num uint32) {\n\tdata := p.toRaceDetectData()\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp != nil {\n\t\t(*sp)[num] = 0\n\n\t}\n}\n\n// raceDetectHookAllocAndCopy allocates a new shadowPresence slice at lazy and copies\n// shadowPresence bytes from src to lazy.\nfunc (p presence) raceDetectHookAllocAndCopy(q presence) {\n\tsData := q.toRaceDetectData()\n\tdData := p.toRaceDetectData()\n\tif sData == nil {\n\t\treturn\n\t}\n\tsrcSp := atomicLoadShadowPresence(&sData.shadowPresence)\n\tif srcSp == nil {\n\t\tatomicStoreShadowPresence(&dData.shadowPresence, nil)\n\t\treturn\n\t}\n\tn := len(*srcSp)\n\tdSlice := make([]byte, n)\n\tatomicStoreShadowPresence(&dData.shadowPresence, &dSlice)\n\tfor i := 0; i < n; i++ {\n\t\tdSlice[i] = (*srcSp)[i]\n\t}\n}\n\n// raceDetectHookPresent is called by the generated file interface\n// (*proto.internalFuncs) Present to optionally read an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookPresent(field *uint32, num uint32) {\n\tdata := findPointerToRaceDetectData(field, num)\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp != nil {\n\t\t_ = (*sp)[num]\n\t}\n}\n\n// raceDetectHookSetPresent is called by the generated file interface\n// (*proto.internalFuncs) SetPresent to optionally write an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {\n\tdata := findPointerToRaceDetectData(field, num)\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp == nil {\n\t\tdata.raceDetectHookAlloc(size)\n\t\tsp = atomicLoadShadowPresence(&data.shadowPresence)\n\t}\n\t(*sp)[num] = 1\n}\n\n// raceDetectHookClearPresent is called by the generated file interface\n// (*proto.internalFuncs) ClearPresent to optionally write an unprotected\n// shadow bitmap when race detection is enabled. In regular code it is\n// a noop.\nfunc raceDetectHookClearPresent(field *uint32, num uint32) {\n\tdata := findPointerToRaceDetectData(field, num)\n\tif data == nil {\n\t\treturn\n\t}\n\tsp := atomicLoadShadowPresence(&data.shadowPresence)\n\tif sp != nil {\n\t\t(*sp)[num] = 0\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/checkinit.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nfunc (mi *MessageInfo) checkInitialized(in protoiface.CheckInitializedInput) (protoiface.CheckInitializedOutput, error) {\n\tvar p pointer\n\tif ms, ok := in.Message.(*messageState); ok {\n\t\tp = ms.pointer()\n\t} else {\n\t\tp = in.Message.(*messageReflectWrapper).pointer()\n\t}\n\treturn protoiface.CheckInitializedOutput{}, mi.checkInitializedPointer(p)\n}\n\nfunc (mi *MessageInfo) checkInitializedPointer(p pointer) error {\n\tmi.init()\n\tif !mi.needsInitCheck {\n\t\treturn nil\n\t}\n\tif p.IsNil() {\n\t\tfor _, f := range mi.orderedCoderFields {\n\t\t\tif f.isRequired {\n\t\t\t\treturn errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName()))\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tvar presence presence\n\tif mi.presenceOffset.IsValid() {\n\t\tpresence = p.Apply(mi.presenceOffset).PresenceInfo()\n\t}\n\n\tif mi.extensionOffset.IsValid() {\n\t\te := p.Apply(mi.extensionOffset).Extensions()\n\t\tif err := mi.isInitExtensions(e); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tfor _, f := range mi.orderedCoderFields {\n\t\tif !f.isRequired && f.funcs.isInit == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif f.presenceIndex != noPresence {\n\t\t\tif !presence.Present(f.presenceIndex) {\n\t\t\t\tif f.isRequired {\n\t\t\t\t\treturn errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName()))\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif f.funcs.isInit != nil {\n\t\t\t\tf.mi.init()\n\t\t\t\tif f.mi.needsInitCheck {\n\t\t\t\t\tif f.isLazy && p.Apply(f.offset).AtomicGetPointer().IsNil() {\n\t\t\t\t\t\tlazy := *p.Apply(mi.lazyOffset).LazyInfoPtr()\n\t\t\t\t\t\tif !lazy.AllowedPartial() {\n\t\t\t\t\t\t\t// Nothing to see here, it was checked on unmarshal\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmi.lazyUnmarshal(p, f.num)\n\t\t\t\t\t}\n\t\t\t\t\tif err := f.funcs.isInit(p.Apply(f.offset), f); err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tfptr := p.Apply(f.offset)\n\t\tif f.isPointer && fptr.Elem().IsNil() {\n\t\t\tif f.isRequired {\n\t\t\t\treturn errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName()))\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif f.funcs.isInit == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif err := f.funcs.isInit(fptr, f); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error {\n\tif ext == nil {\n\t\treturn nil\n\t}\n\tfor _, x := range *ext {\n\t\tei := getExtensionFieldInfo(x.Type())\n\t\tif ei.funcs.isInit == nil || x.isUnexpandedLazy() {\n\t\t\tcontinue\n\t\t}\n\t\tv := x.Value()\n\t\tif !v.IsValid() {\n\t\t\tcontinue\n\t\t}\n\t\tif err := ei.funcs.isInit(v); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nvar (\n\tneedsInitCheckMu  sync.Mutex\n\tneedsInitCheckMap sync.Map\n)\n\n// needsInitCheck reports whether a message needs to be checked for partial initialization.\n//\n// It returns true if the message transitively includes any required or extension fields.\nfunc needsInitCheck(md protoreflect.MessageDescriptor) bool {\n\tif v, ok := needsInitCheckMap.Load(md); ok {\n\t\tif has, ok := v.(bool); ok {\n\t\t\treturn has\n\t\t}\n\t}\n\tneedsInitCheckMu.Lock()\n\tdefer needsInitCheckMu.Unlock()\n\treturn needsInitCheckLocked(md)\n}\n\nfunc needsInitCheckLocked(md protoreflect.MessageDescriptor) (has bool) {\n\tif v, ok := needsInitCheckMap.Load(md); ok {\n\t\t// If has is true, we've previously determined that this message\n\t\t// needs init checks.\n\t\t//\n\t\t// If has is false, we've previously determined that it can never\n\t\t// be uninitialized.\n\t\t//\n\t\t// If has is not a bool, we've just encountered a cycle in the\n\t\t// message graph. In this case, it is safe to return false: If\n\t\t// the message does have required fields, we'll detect them later\n\t\t// in the graph traversal.\n\t\thas, ok := v.(bool)\n\t\treturn ok && has\n\t}\n\tneedsInitCheckMap.Store(md, struct{}{}) // avoid cycles while descending into this message\n\tdefer func() {\n\t\tneedsInitCheckMap.Store(md, has)\n\t}()\n\tif md.RequiredNumbers().Len() > 0 {\n\t\treturn true\n\t}\n\tif md.ExtensionRanges().Len() > 0 {\n\t\treturn true\n\t}\n\tfor i := 0; i < md.Fields().Len(); i++ {\n\t\tfd := md.Fields().Get(i)\n\t\t// Map keys are never messages, so just consider the map value.\n\t\tif fd.IsMap() {\n\t\t\tfd = fd.MapValue()\n\t\t}\n\t\tfmd := fd.Message()\n\t\tif fmd != nil && needsInitCheckLocked(fmd) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_extension.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype extensionFieldInfo struct {\n\twiretag             uint64\n\ttagsize             int\n\tunmarshalNeedsValue bool\n\tfuncs               valueCoderFuncs\n\tvalidation          validationInfo\n}\n\nfunc getExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo {\n\tif xi, ok := xt.(*ExtensionInfo); ok {\n\t\txi.lazyInit()\n\t\treturn xi.info\n\t}\n\t// Ideally we'd cache the resulting *extensionFieldInfo so we don't have to\n\t// recompute this metadata repeatedly. But without support for something like\n\t// weak references, such a cache would pin temporary values (like dynamic\n\t// extension types, constructed for the duration of a user request) to the\n\t// heap forever, causing memory usage of the cache to grow unbounded.\n\t// See discussion in https://github.com/golang/protobuf/issues/1521.\n\treturn makeExtensionFieldInfo(xt.TypeDescriptor())\n}\n\nfunc makeExtensionFieldInfo(xd protoreflect.ExtensionDescriptor) *extensionFieldInfo {\n\tvar wiretag uint64\n\tif !xd.IsPacked() {\n\t\twiretag = protowire.EncodeTag(xd.Number(), wireTypes[xd.Kind()])\n\t} else {\n\t\twiretag = protowire.EncodeTag(xd.Number(), protowire.BytesType)\n\t}\n\te := &extensionFieldInfo{\n\t\twiretag: wiretag,\n\t\ttagsize: protowire.SizeVarint(wiretag),\n\t\tfuncs:   encoderFuncsForValue(xd),\n\t}\n\t// Does the unmarshal function need a value passed to it?\n\t// This is true for composite types, where we pass in a message, list, or map to fill in,\n\t// and for enums, where we pass in a prototype value to specify the concrete enum type.\n\tswitch xd.Kind() {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind, protoreflect.EnumKind:\n\t\te.unmarshalNeedsValue = true\n\tdefault:\n\t\tif xd.Cardinality() == protoreflect.Repeated {\n\t\t\te.unmarshalNeedsValue = true\n\t\t}\n\t}\n\treturn e\n}\n\ntype lazyExtensionValue struct {\n\tatomicOnce uint32 // atomically set if value is valid\n\tmu         sync.Mutex\n\txi         *extensionFieldInfo\n\tvalue      protoreflect.Value\n\tb          []byte\n}\n\ntype ExtensionField struct {\n\ttyp protoreflect.ExtensionType\n\n\t// value is either the value of GetValue,\n\t// or a *lazyExtensionValue that then returns the value of GetValue.\n\tvalue protoreflect.Value\n\tlazy  *lazyExtensionValue\n}\n\nfunc (f *ExtensionField) appendLazyBytes(xt protoreflect.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) {\n\tif f.lazy == nil {\n\t\tf.lazy = &lazyExtensionValue{xi: xi}\n\t}\n\tf.typ = xt\n\tf.lazy.xi = xi\n\tf.lazy.b = protowire.AppendTag(f.lazy.b, num, wtyp)\n\tf.lazy.b = append(f.lazy.b, b...)\n}\n\nfunc (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool {\n\tif f.typ == nil {\n\t\treturn true\n\t}\n\tif f.typ == xt && f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// isUnexpandedLazy returns true if the ExensionField is lazy and not\n// yet expanded, which means it's present and already checked for\n// initialized required fields.\nfunc (f *ExtensionField) isUnexpandedLazy() bool {\n\treturn f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0\n}\n\n// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded.\n//\n// The returned buffer has to be kept over whatever operation we're planning,\n// as re-retrieving it will fail after the message is lazily decoded.\nfunc (f *ExtensionField) lazyBuffer() []byte {\n\t// This function might be in the critical path, so check the atomic without\n\t// taking a look first, then only take the lock if needed.\n\tif !f.isUnexpandedLazy() {\n\t\treturn nil\n\t}\n\tf.lazy.mu.Lock()\n\tdefer f.lazy.mu.Unlock()\n\treturn f.lazy.b\n}\n\nfunc (f *ExtensionField) lazyInit() {\n\tf.lazy.mu.Lock()\n\tdefer f.lazy.mu.Unlock()\n\tif atomic.LoadUint32(&f.lazy.atomicOnce) == 1 {\n\t\treturn\n\t}\n\tif f.lazy.xi != nil {\n\t\tb := f.lazy.b\n\t\tval := f.typ.New()\n\t\tfor len(b) > 0 {\n\t\t\tvar tag uint64\n\t\t\tif b[0] < 0x80 {\n\t\t\t\ttag = uint64(b[0])\n\t\t\t\tb = b[1:]\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\ttag = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tb = b[2:]\n\t\t\t} else {\n\t\t\t\tvar n int\n\t\t\t\ttag, n = protowire.ConsumeVarint(b)\n\t\t\t\tif n < 0 {\n\t\t\t\t\tpanic(errors.New(\"bad tag in lazy extension decoding\"))\n\t\t\t\t}\n\t\t\t\tb = b[n:]\n\t\t\t}\n\t\t\tnum := protowire.Number(tag >> 3)\n\t\t\twtyp := protowire.Type(tag & 7)\n\t\t\tvar out unmarshalOutput\n\t\t\tvar err error\n\t\t\tval, out, err = f.lazy.xi.funcs.unmarshal(b, val, num, wtyp, lazyUnmarshalOptions)\n\t\t\tif err != nil {\n\t\t\t\tpanic(errors.New(\"decode failure in lazy extension decoding: %v\", err))\n\t\t\t}\n\t\t\tb = b[out.n:]\n\t\t}\n\t\tf.lazy.value = val\n\t} else {\n\t\tpanic(\"No support for lazy fns for ExtensionField\")\n\t}\n\tf.lazy.xi = nil\n\tf.lazy.b = nil\n\tatomic.StoreUint32(&f.lazy.atomicOnce, 1)\n}\n\n// Set sets the type and value of the extension field.\n// This must not be called concurrently.\nfunc (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) {\n\tf.typ = t\n\tf.value = v\n\tf.lazy = nil\n}\n\n// Value returns the value of the extension field.\n// This may be called concurrently.\nfunc (f *ExtensionField) Value() protoreflect.Value {\n\tif f.lazy != nil {\n\t\tif atomic.LoadUint32(&f.lazy.atomicOnce) == 0 {\n\t\t\tf.lazyInit()\n\t\t}\n\t\treturn f.lazy.value\n\t}\n\treturn f.value\n}\n\n// Type returns the type of the extension field.\n// This may be called concurrently.\nfunc (f ExtensionField) Type() protoreflect.ExtensionType {\n\treturn f.typ\n}\n\n// IsSet returns whether the extension field is set.\n// This may be called concurrently.\nfunc (f ExtensionField) IsSet() bool {\n\treturn f.typ != nil\n}\n\n// IsLazy reports whether a field is lazily encoded.\n// It is exported for testing.\nfunc IsLazy(m protoreflect.Message, fd protoreflect.FieldDescriptor) bool {\n\tvar mi *MessageInfo\n\tvar p pointer\n\tswitch m := m.(type) {\n\tcase *messageState:\n\t\tmi = m.messageInfo()\n\t\tp = m.pointer()\n\tcase *messageReflectWrapper:\n\t\tmi = m.messageInfo()\n\t\tp = m.pointer()\n\tdefault:\n\t\treturn false\n\t}\n\txd, ok := fd.(protoreflect.ExtensionTypeDescriptor)\n\tif !ok {\n\t\treturn false\n\t}\n\txt := xd.Type()\n\text := mi.extensionMap(p)\n\tif ext == nil {\n\t\treturn false\n\t}\n\tf, ok := (*ext)[int32(fd.Number())]\n\tif !ok {\n\t\treturn false\n\t}\n\treturn f.typ == xt && f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_field.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\ntype errInvalidUTF8 struct{}\n\nfunc (errInvalidUTF8) Error() string     { return \"string field contains invalid UTF-8\" }\nfunc (errInvalidUTF8) InvalidUTF8() bool { return true }\nfunc (errInvalidUTF8) Unwrap() error     { return errors.Error }\n\n// initOneofFieldCoders initializes the fast-path functions for the fields in a oneof.\n//\n// For size, marshal, and isInit operations, functions are set only on the first field\n// in the oneof. The functions are called when the oneof is non-nil, and will dispatch\n// to the appropriate field-specific function as necessary.\n//\n// The unmarshal function is set on each field individually as usual.\nfunc (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si structInfo) {\n\tfs := si.oneofsByName[od.Name()]\n\tft := fs.Type\n\toneofFields := make(map[reflect.Type]*coderFieldInfo)\n\tneedIsInit := false\n\tfields := od.Fields()\n\tfor i, lim := 0, fields.Len(); i < lim; i++ {\n\t\tfd := od.Fields().Get(i)\n\t\tnum := fd.Number()\n\t\t// Make a copy of the original coderFieldInfo for use in unmarshaling.\n\t\t//\n\t\t// oneofFields[oneofType].funcs.marshal is the field-specific marshal function.\n\t\t//\n\t\t// mi.coderFields[num].marshal is set on only the first field in the oneof,\n\t\t// and dispatches to the field-specific marshaler in oneofFields.\n\t\tcf := *mi.coderFields[num]\n\t\tot := si.oneofWrappersByNumber[num]\n\t\tcf.ft = ot.Field(0).Type\n\t\tcf.mi, cf.funcs = fieldCoder(fd, cf.ft)\n\t\toneofFields[ot] = &cf\n\t\tif cf.funcs.isInit != nil {\n\t\t\tneedIsInit = true\n\t\t}\n\t\tmi.coderFields[num].funcs.unmarshal = func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\tvar vw reflect.Value         // pointer to wrapper type\n\t\t\tvi := p.AsValueOf(ft).Elem() // oneof field value of interface kind\n\t\t\tif !vi.IsNil() && !vi.Elem().IsNil() && vi.Elem().Elem().Type() == ot {\n\t\t\t\tvw = vi.Elem()\n\t\t\t} else {\n\t\t\t\tvw = reflect.New(ot)\n\t\t\t}\n\t\t\tout, err := cf.funcs.unmarshal(b, pointerOfValue(vw).Apply(zeroOffset), wtyp, &cf, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn out, err\n\t\t\t}\n\t\t\tif cf.funcs.isInit == nil {\n\t\t\t\tout.initialized = true\n\t\t\t}\n\t\t\tvi.Set(vw)\n\t\t\treturn out, nil\n\t\t}\n\t}\n\tgetInfo := func(p pointer) (pointer, *coderFieldInfo) {\n\t\tv := p.AsValueOf(ft).Elem()\n\t\tif v.IsNil() {\n\t\t\treturn pointer{}, nil\n\t\t}\n\t\tv = v.Elem() // interface -> *struct\n\t\tif v.IsNil() {\n\t\t\treturn pointer{}, nil\n\t\t}\n\t\treturn pointerOfValue(v).Apply(zeroOffset), oneofFields[v.Elem().Type()]\n\t}\n\tfirst := mi.coderFields[od.Fields().Get(0).Number()]\n\tfirst.funcs.size = func(p pointer, _ *coderFieldInfo, opts marshalOptions) int {\n\t\tp, info := getInfo(p)\n\t\tif info == nil || info.funcs.size == nil {\n\t\t\treturn 0\n\t\t}\n\t\treturn info.funcs.size(p, info, opts)\n\t}\n\tfirst.funcs.marshal = func(b []byte, p pointer, _ *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\tp, info := getInfo(p)\n\t\tif info == nil || info.funcs.marshal == nil {\n\t\t\treturn b, nil\n\t\t}\n\t\treturn info.funcs.marshal(b, p, info, opts)\n\t}\n\tfirst.funcs.merge = func(dst, src pointer, _ *coderFieldInfo, opts mergeOptions) {\n\t\tsrcp, srcinfo := getInfo(src)\n\t\tif srcinfo == nil || srcinfo.funcs.merge == nil {\n\t\t\treturn\n\t\t}\n\t\tdstp, dstinfo := getInfo(dst)\n\t\tif dstinfo != srcinfo {\n\t\t\tdst.AsValueOf(ft).Elem().Set(reflect.New(src.AsValueOf(ft).Elem().Elem().Elem().Type()))\n\t\t\tdstp = pointerOfValue(dst.AsValueOf(ft).Elem().Elem()).Apply(zeroOffset)\n\t\t}\n\t\tsrcinfo.funcs.merge(dstp, srcp, srcinfo, opts)\n\t}\n\tif needIsInit {\n\t\tfirst.funcs.isInit = func(p pointer, _ *coderFieldInfo) error {\n\t\t\tp, info := getInfo(p)\n\t\t\tif info == nil || info.funcs.isInit == nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn info.funcs.isInit(p, info)\n\t\t}\n\t}\n}\n\nfunc makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {\n\tif mi := getMessageInfo(ft); mi != nil {\n\t\tfuncs := pointerCoderFuncs{\n\t\t\tsize:      sizeMessageInfo,\n\t\t\tmarshal:   appendMessageInfo,\n\t\t\tunmarshal: consumeMessageInfo,\n\t\t\tmerge:     mergeMessage,\n\t\t}\n\t\tif needsInitCheck(mi.Desc) {\n\t\t\tfuncs.isInit = isInitMessageInfo\n\t\t}\n\t\treturn funcs\n\t} else {\n\t\treturn pointerCoderFuncs{\n\t\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn sizeMessage(m, f.tagsize, opts)\n\t\t\t},\n\t\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn appendMessage(b, m, f.wiretag, opts)\n\t\t\t},\n\t\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\t\tmp := p.AsValueOf(ft).Elem()\n\t\t\t\tif mp.IsNil() {\n\t\t\t\t\tmp.Set(reflect.New(ft.Elem()))\n\t\t\t\t}\n\t\t\t\treturn consumeMessage(b, asMessage(mp), wtyp, opts)\n\t\t\t},\n\t\t\tisInit: func(p pointer, f *coderFieldInfo) error {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn proto.CheckInitialized(m)\n\t\t\t},\n\t\t\tmerge: mergeMessage,\n\t\t}\n\t}\n}\n\nfunc sizeMessageInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\treturn protowire.SizeBytes(f.mi.sizePointer(p.Elem(), opts)) + f.tagsize\n}\n\nfunc appendMessageInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tcalculatedSize := f.mi.sizePointer(p.Elem(), opts)\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(calculatedSize))\n\tbefore := len(b)\n\tb, err := f.mi.marshalAppendPointer(b, p.Elem(), opts)\n\tif measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil {\n\t\treturn nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize)\n\t}\n\treturn b, err\n}\n\nfunc consumeMessageInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif p.Elem().IsNil() {\n\t\tp.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t}\n\to, err := f.mi.unmarshalPointer(v, p.Elem(), 0, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tout.n = n\n\tout.initialized = o.initialized\n\treturn out, nil\n}\n\nfunc isInitMessageInfo(p pointer, f *coderFieldInfo) error {\n\treturn f.mi.checkInitializedPointer(p.Elem())\n}\n\nfunc sizeMessage(m proto.Message, tagsize int, opts marshalOptions) int {\n\treturn protowire.SizeBytes(opts.Options().Size(m)) + tagsize\n}\n\nfunc appendMessage(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tmopts := opts.Options()\n\tcalculatedSize := mopts.Size(m)\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, uint64(calculatedSize))\n\tbefore := len(b)\n\tb, err := mopts.MarshalAppend(b, m)\n\tif measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil {\n\t\treturn nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize)\n\t}\n\treturn b, err\n}\n\nfunc consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     v,\n\t\tMessage: m.ProtoReflect(),\n\t})\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn out, nil\n}\n\nfunc sizeMessageValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\tm := v.Message().Interface()\n\treturn sizeMessage(m, tagsize, opts)\n}\n\nfunc appendMessageValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tm := v.Message().Interface()\n\treturn appendMessage(b, m, wiretag, opts)\n}\n\nfunc consumeMessageValue(b []byte, v protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) {\n\tm := v.Message().Interface()\n\tout, err := consumeMessage(b, m, wtyp, opts)\n\treturn v, out, err\n}\n\nfunc isInitMessageValue(v protoreflect.Value) error {\n\tm := v.Message().Interface()\n\treturn proto.CheckInitialized(m)\n}\n\nvar coderMessageValue = valueCoderFuncs{\n\tsize:      sizeMessageValue,\n\tmarshal:   appendMessageValue,\n\tunmarshal: consumeMessageValue,\n\tisInit:    isInitMessageValue,\n\tmerge:     mergeMessageValue,\n}\n\nfunc sizeGroupValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\tm := v.Message().Interface()\n\treturn sizeGroup(m, tagsize, opts)\n}\n\nfunc appendGroupValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tm := v.Message().Interface()\n\treturn appendGroup(b, m, wiretag, opts)\n}\n\nfunc consumeGroupValue(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) {\n\tm := v.Message().Interface()\n\tout, err := consumeGroup(b, m, num, wtyp, opts)\n\treturn v, out, err\n}\n\nvar coderGroupValue = valueCoderFuncs{\n\tsize:      sizeGroupValue,\n\tmarshal:   appendGroupValue,\n\tunmarshal: consumeGroupValue,\n\tisInit:    isInitMessageValue,\n\tmerge:     mergeMessageValue,\n}\n\nfunc makeGroupFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {\n\tnum := fd.Number()\n\tif mi := getMessageInfo(ft); mi != nil {\n\t\tfuncs := pointerCoderFuncs{\n\t\t\tsize:      sizeGroupType,\n\t\t\tmarshal:   appendGroupType,\n\t\t\tunmarshal: consumeGroupType,\n\t\t\tmerge:     mergeMessage,\n\t\t}\n\t\tif needsInitCheck(mi.Desc) {\n\t\t\tfuncs.isInit = isInitMessageInfo\n\t\t}\n\t\treturn funcs\n\t} else {\n\t\treturn pointerCoderFuncs{\n\t\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn sizeGroup(m, f.tagsize, opts)\n\t\t\t},\n\t\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn appendGroup(b, m, f.wiretag, opts)\n\t\t\t},\n\t\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\t\tmp := p.AsValueOf(ft).Elem()\n\t\t\t\tif mp.IsNil() {\n\t\t\t\t\tmp.Set(reflect.New(ft.Elem()))\n\t\t\t\t}\n\t\t\t\treturn consumeGroup(b, asMessage(mp), num, wtyp, opts)\n\t\t\t},\n\t\t\tisInit: func(p pointer, f *coderFieldInfo) error {\n\t\t\t\tm := asMessage(p.AsValueOf(ft).Elem())\n\t\t\t\treturn proto.CheckInitialized(m)\n\t\t\t},\n\t\t\tmerge: mergeMessage,\n\t\t}\n\t}\n}\n\nfunc sizeGroupType(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\treturn 2*f.tagsize + f.mi.sizePointer(p.Elem(), opts)\n}\n\nfunc appendGroupType(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, f.wiretag) // start group\n\tb, err := f.mi.marshalAppendPointer(b, p.Elem(), opts)\n\tb = protowire.AppendVarint(b, f.wiretag+1) // end group\n\treturn b, err\n}\n\nfunc consumeGroupType(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn out, errUnknown\n\t}\n\tif p.Elem().IsNil() {\n\t\tp.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t}\n\treturn f.mi.unmarshalPointer(b, p.Elem(), f.num, opts)\n}\n\nfunc sizeGroup(m proto.Message, tagsize int, opts marshalOptions) int {\n\treturn 2*tagsize + opts.Options().Size(m)\n}\n\nfunc appendGroup(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag) // start group\n\tb, err := opts.Options().MarshalAppend(b, m)\n\tb = protowire.AppendVarint(b, wiretag+1) // end group\n\treturn b, err\n}\n\nfunc consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn out, errUnknown\n\t}\n\tb, n := protowire.ConsumeGroup(num, b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     b,\n\t\tMessage: m.ProtoReflect(),\n\t})\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn out, nil\n}\n\nfunc makeMessageSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {\n\tif mi := getMessageInfo(ft); mi != nil {\n\t\tfuncs := pointerCoderFuncs{\n\t\t\tsize:      sizeMessageSliceInfo,\n\t\t\tmarshal:   appendMessageSliceInfo,\n\t\t\tunmarshal: consumeMessageSliceInfo,\n\t\t\tmerge:     mergeMessageSlice,\n\t\t}\n\t\tif needsInitCheck(mi.Desc) {\n\t\t\tfuncs.isInit = isInitMessageSliceInfo\n\t\t}\n\t\treturn funcs\n\t}\n\treturn pointerCoderFuncs{\n\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\treturn sizeMessageSlice(p, ft, f.tagsize, opts)\n\t\t},\n\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\treturn appendMessageSlice(b, p, f.wiretag, ft, opts)\n\t\t},\n\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\treturn consumeMessageSlice(b, p, ft, wtyp, opts)\n\t\t},\n\t\tisInit: func(p pointer, f *coderFieldInfo) error {\n\t\t\treturn isInitMessageSlice(p, ft)\n\t\t},\n\t\tmerge: mergeMessageSlice,\n\t}\n}\n\nfunc sizeMessageSliceInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\ts := p.PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize\n\t}\n\treturn n\n}\n\nfunc appendMessageSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := p.PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tsiz := f.mi.sizePointer(v, opts)\n\t\tb = protowire.AppendVarint(b, uint64(siz))\n\t\tbefore := len(b)\n\t\tb, err = f.mi.marshalAppendPointer(b, v, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tif measuredSize := len(b) - before; siz != measuredSize {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(siz, measuredSize)\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc consumeMessageSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tm := reflect.New(f.mi.GoReflectType.Elem()).Interface()\n\tmp := pointerOfIface(m)\n\to, err := f.mi.unmarshalPointer(v, mp, 0, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tp.AppendPointerSlice(mp)\n\tout.n = n\n\tout.initialized = o.initialized\n\treturn out, nil\n}\n\nfunc isInitMessageSliceInfo(p pointer, f *coderFieldInfo) error {\n\ts := p.PointerSlice()\n\tfor _, v := range s {\n\t\tif err := f.mi.checkInitializedPointer(v); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, opts marshalOptions) int {\n\tmopts := opts.Options()\n\ts := p.PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tm := asMessage(v.AsValueOf(goType.Elem()))\n\t\tn += protowire.SizeBytes(mopts.Size(m)) + tagsize\n\t}\n\treturn n\n}\n\nfunc appendMessageSlice(b []byte, p pointer, wiretag uint64, goType reflect.Type, opts marshalOptions) ([]byte, error) {\n\tmopts := opts.Options()\n\ts := p.PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tm := asMessage(v.AsValueOf(goType.Elem()))\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tsiz := mopts.Size(m)\n\t\tb = protowire.AppendVarint(b, uint64(siz))\n\t\tbefore := len(b)\n\t\tb, err = mopts.MarshalAppend(b, m)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tif measuredSize := len(b) - before; siz != measuredSize {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(siz, measuredSize)\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tmp := reflect.New(goType.Elem())\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     v,\n\t\tMessage: asMessage(mp).ProtoReflect(),\n\t})\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tp.AppendPointerSlice(pointerOfValue(mp))\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn out, nil\n}\n\nfunc isInitMessageSlice(p pointer, goType reflect.Type) error {\n\ts := p.PointerSlice()\n\tfor _, v := range s {\n\t\tm := asMessage(v.AsValueOf(goType.Elem()))\n\t\tif err := proto.CheckInitialized(m); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Slices of messages\n\nfunc sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int {\n\tmopts := opts.Options()\n\tlist := listv.List()\n\tn := 0\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tm := list.Get(i).Message().Interface()\n\t\tn += protowire.SizeBytes(mopts.Size(m)) + tagsize\n\t}\n\treturn n\n}\n\nfunc appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tmopts := opts.Options()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tm := list.Get(i).Message().Interface()\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tsiz := mopts.Size(m)\n\t\tb = protowire.AppendVarint(b, uint64(siz))\n\t\tbefore := len(b)\n\t\tvar err error\n\t\tb, err = mopts.MarshalAppend(b, m)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tif measuredSize := len(b) - before; siz != measuredSize {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(siz, measuredSize)\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc consumeMessageSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tm := list.NewElement()\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     v,\n\t\tMessage: m.Message(),\n\t})\n\tif err != nil {\n\t\treturn protoreflect.Value{}, out, err\n\t}\n\tlist.Append(m)\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn listv, out, nil\n}\n\nfunc isInitMessageSliceValue(listv protoreflect.Value) error {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tm := list.Get(i).Message().Interface()\n\t\tif err := proto.CheckInitialized(m); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nvar coderMessageSliceValue = valueCoderFuncs{\n\tsize:      sizeMessageSliceValue,\n\tmarshal:   appendMessageSliceValue,\n\tunmarshal: consumeMessageSliceValue,\n\tisInit:    isInitMessageSliceValue,\n\tmerge:     mergeMessageListValue,\n}\n\nfunc sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int {\n\tmopts := opts.Options()\n\tlist := listv.List()\n\tn := 0\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tm := list.Get(i).Message().Interface()\n\t\tn += 2*tagsize + mopts.Size(m)\n\t}\n\treturn n\n}\n\nfunc appendGroupSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tmopts := opts.Options()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tm := list.Get(i).Message().Interface()\n\t\tb = protowire.AppendVarint(b, wiretag) // start group\n\t\tvar err error\n\t\tb, err = mopts.MarshalAppend(b, m)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, wiretag+1) // end group\n\t}\n\treturn b, nil\n}\n\nfunc consumeGroupSliceValue(b []byte, listv protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp != protowire.StartGroupType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tb, n := protowire.ConsumeGroup(num, b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tm := list.NewElement()\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     b,\n\t\tMessage: m.Message(),\n\t})\n\tif err != nil {\n\t\treturn protoreflect.Value{}, out, err\n\t}\n\tlist.Append(m)\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn listv, out, nil\n}\n\nvar coderGroupSliceValue = valueCoderFuncs{\n\tsize:      sizeGroupSliceValue,\n\tmarshal:   appendGroupSliceValue,\n\tunmarshal: consumeGroupSliceValue,\n\tisInit:    isInitMessageSliceValue,\n\tmerge:     mergeMessageListValue,\n}\n\nfunc makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {\n\tnum := fd.Number()\n\tif mi := getMessageInfo(ft); mi != nil {\n\t\tfuncs := pointerCoderFuncs{\n\t\t\tsize:      sizeGroupSliceInfo,\n\t\t\tmarshal:   appendGroupSliceInfo,\n\t\t\tunmarshal: consumeGroupSliceInfo,\n\t\t\tmerge:     mergeMessageSlice,\n\t\t}\n\t\tif needsInitCheck(mi.Desc) {\n\t\t\tfuncs.isInit = isInitMessageSliceInfo\n\t\t}\n\t\treturn funcs\n\t}\n\treturn pointerCoderFuncs{\n\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\treturn sizeGroupSlice(p, ft, f.tagsize, opts)\n\t\t},\n\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\treturn appendGroupSlice(b, p, f.wiretag, ft, opts)\n\t\t},\n\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\treturn consumeGroupSlice(b, p, num, wtyp, ft, opts)\n\t\t},\n\t\tisInit: func(p pointer, f *coderFieldInfo) error {\n\t\t\treturn isInitMessageSlice(p, ft)\n\t\t},\n\t\tmerge: mergeMessageSlice,\n\t}\n}\n\nfunc sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, opts marshalOptions) int {\n\tmopts := opts.Options()\n\ts := p.PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tm := asMessage(v.AsValueOf(messageType.Elem()))\n\t\tn += 2*tagsize + mopts.Size(m)\n\t}\n\treturn n\n}\n\nfunc appendGroupSlice(b []byte, p pointer, wiretag uint64, messageType reflect.Type, opts marshalOptions) ([]byte, error) {\n\ts := p.PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tm := asMessage(v.AsValueOf(messageType.Elem()))\n\t\tb = protowire.AppendVarint(b, wiretag) // start group\n\t\tb, err = opts.Options().MarshalAppend(b, m)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, wiretag+1) // end group\n\t}\n\treturn b, nil\n}\n\nfunc consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire.Type, goType reflect.Type, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn out, errUnknown\n\t}\n\tb, n := protowire.ConsumeGroup(num, b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tmp := reflect.New(goType.Elem())\n\to, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{\n\t\tBuf:     b,\n\t\tMessage: asMessage(mp).ProtoReflect(),\n\t})\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tp.AppendPointerSlice(pointerOfValue(mp))\n\tout.n = n\n\tout.initialized = o.Flags&protoiface.UnmarshalInitialized != 0\n\treturn out, nil\n}\n\nfunc sizeGroupSliceInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\ts := p.PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tn += 2*f.tagsize + f.mi.sizePointer(v, opts)\n\t}\n\treturn n\n}\n\nfunc appendGroupSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := p.PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag) // start group\n\t\tb, err = f.mi.marshalAppendPointer(b, v, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, f.wiretag+1) // end group\n\t}\n\treturn b, nil\n}\n\nfunc consumeGroupSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn unmarshalOutput{}, errUnknown\n\t}\n\tm := reflect.New(f.mi.GoReflectType.Elem()).Interface()\n\tmp := pointerOfIface(m)\n\tout, err := f.mi.unmarshalPointer(b, mp, f.num, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tp.AppendPointerSlice(mp)\n\treturn out, nil\n}\n\nfunc asMessage(v reflect.Value) protoreflect.ProtoMessage {\n\tif m, ok := v.Interface().(protoreflect.ProtoMessage); ok {\n\t\treturn m\n\t}\n\treturn legacyWrapMessage(v).Interface()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc makeOpaqueMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) {\n\tmi := getMessageInfo(ft)\n\tif mi == nil {\n\t\tpanic(fmt.Sprintf(\"invalid field: %v: unsupported message type %v\", fd.FullName(), ft))\n\t}\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind:\n\t\treturn mi, pointerCoderFuncs{\n\t\t\tsize:      sizeOpaqueMessage,\n\t\t\tmarshal:   appendOpaqueMessage,\n\t\t\tunmarshal: consumeOpaqueMessage,\n\t\t\tisInit:    isInitOpaqueMessage,\n\t\t\tmerge:     mergeOpaqueMessage,\n\t\t}\n\tcase protoreflect.GroupKind:\n\t\treturn mi, pointerCoderFuncs{\n\t\t\tsize:      sizeOpaqueGroup,\n\t\t\tmarshal:   appendOpaqueGroup,\n\t\t\tunmarshal: consumeOpaqueGroup,\n\t\t\tisInit:    isInitOpaqueMessage,\n\t\t\tmerge:     mergeOpaqueMessage,\n\t\t}\n\t}\n\tpanic(\"unexpected field kind\")\n}\n\nfunc sizeOpaqueMessage(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn protowire.SizeBytes(f.mi.sizePointer(p.AtomicGetPointer(), opts)) + f.tagsize\n}\n\nfunc appendOpaqueMessage(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tmp := p.AtomicGetPointer()\n\tcalculatedSize := f.mi.sizePointer(mp, opts)\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(calculatedSize))\n\tbefore := len(b)\n\tb, err := f.mi.marshalAppendPointer(b, mp, opts)\n\tif measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil {\n\t\treturn nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize)\n\t}\n\treturn b, err\n}\n\nfunc consumeOpaqueMessage(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tmp := p.AtomicGetPointer()\n\tif mp.IsNil() {\n\t\tmp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t}\n\to, err := f.mi.unmarshalPointer(v, mp, 0, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tout.n = n\n\tout.initialized = o.initialized\n\treturn out, nil\n}\n\nfunc isInitOpaqueMessage(p pointer, f *coderFieldInfo) error {\n\tmp := p.AtomicGetPointer()\n\tif mp.IsNil() {\n\t\treturn nil\n\t}\n\treturn f.mi.checkInitializedPointer(mp)\n}\n\nfunc mergeOpaqueMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tdstmp := dst.AtomicGetPointer()\n\tif dstmp.IsNil() {\n\t\tdstmp = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t}\n\tf.mi.mergePointer(dstmp, src.AtomicGetPointer(), opts)\n}\n\nfunc sizeOpaqueGroup(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn 2*f.tagsize + f.mi.sizePointer(p.AtomicGetPointer(), opts)\n}\n\nfunc appendOpaqueGroup(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, f.wiretag) // start group\n\tb, err := f.mi.marshalAppendPointer(b, p.AtomicGetPointer(), opts)\n\tb = protowire.AppendVarint(b, f.wiretag+1) // end group\n\treturn b, err\n}\n\nfunc consumeOpaqueGroup(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn out, errUnknown\n\t}\n\tmp := p.AtomicGetPointer()\n\tif mp.IsNil() {\n\t\tmp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t}\n\to, e := f.mi.unmarshalPointer(b, mp, f.num, opts)\n\treturn o, e\n}\n\nfunc makeOpaqueRepeatedMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) {\n\tif ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {\n\t\tpanic(fmt.Sprintf(\"invalid field: %v: unsupported type for opaque repeated message: %v\", fd.FullName(), ft))\n\t}\n\tmt := ft.Elem().Elem() // *[]*T -> *T\n\tmi := getMessageInfo(mt)\n\tif mi == nil {\n\t\tpanic(fmt.Sprintf(\"invalid field: %v: unsupported message type %v\", fd.FullName(), mt))\n\t}\n\tswitch fd.Kind() {\n\tcase protoreflect.MessageKind:\n\t\treturn mi, pointerCoderFuncs{\n\t\t\tsize:      sizeOpaqueMessageSlice,\n\t\t\tmarshal:   appendOpaqueMessageSlice,\n\t\t\tunmarshal: consumeOpaqueMessageSlice,\n\t\t\tisInit:    isInitOpaqueMessageSlice,\n\t\t\tmerge:     mergeOpaqueMessageSlice,\n\t\t}\n\tcase protoreflect.GroupKind:\n\t\treturn mi, pointerCoderFuncs{\n\t\t\tsize:      sizeOpaqueGroupSlice,\n\t\t\tmarshal:   appendOpaqueGroupSlice,\n\t\t\tunmarshal: consumeOpaqueGroupSlice,\n\t\t\tisInit:    isInitOpaqueMessageSlice,\n\t\t\tmerge:     mergeOpaqueMessageSlice,\n\t\t}\n\t}\n\tpanic(\"unexpected field kind\")\n}\n\nfunc sizeOpaqueMessageSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := p.AtomicGetPointer().PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize\n\t}\n\treturn n\n}\n\nfunc appendOpaqueMessageSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := p.AtomicGetPointer().PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tsiz := f.mi.sizePointer(v, opts)\n\t\tb = protowire.AppendVarint(b, uint64(siz))\n\t\tbefore := len(b)\n\t\tb, err = f.mi.marshalAppendPointer(b, v, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tif measuredSize := len(b) - before; siz != measuredSize {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(siz, measuredSize)\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc consumeOpaqueMessageSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tmp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))\n\to, err := f.mi.unmarshalPointer(v, mp, 0, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tsp := p.AtomicGetPointer()\n\tif sp.IsNil() {\n\t\tsp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem())))\n\t}\n\tsp.AppendPointerSlice(mp)\n\tout.n = n\n\tout.initialized = o.initialized\n\treturn out, nil\n}\n\nfunc isInitOpaqueMessageSlice(p pointer, f *coderFieldInfo) error {\n\tsp := p.AtomicGetPointer()\n\tif sp.IsNil() {\n\t\treturn nil\n\t}\n\ts := sp.PointerSlice()\n\tfor _, v := range s {\n\t\tif err := f.mi.checkInitializedPointer(v); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc mergeOpaqueMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tds := dst.AtomicGetPointer()\n\tif ds.IsNil() {\n\t\tds = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem())))\n\t}\n\tfor _, sp := range src.AtomicGetPointer().PointerSlice() {\n\t\tdm := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))\n\t\tf.mi.mergePointer(dm, sp, opts)\n\t\tds.AppendPointerSlice(dm)\n\t}\n}\n\nfunc sizeOpaqueGroupSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := p.AtomicGetPointer().PointerSlice()\n\tn := 0\n\tfor _, v := range s {\n\t\tn += 2*f.tagsize + f.mi.sizePointer(v, opts)\n\t}\n\treturn n\n}\n\nfunc appendOpaqueGroupSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := p.AtomicGetPointer().PointerSlice()\n\tvar err error\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag) // start group\n\t\tb, err = f.mi.marshalAppendPointer(b, v, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, f.wiretag+1) // end group\n\t}\n\treturn b, nil\n}\n\nfunc consumeOpaqueGroupSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.StartGroupType {\n\t\treturn out, errUnknown\n\t}\n\tmp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))\n\tout, err = f.mi.unmarshalPointer(b, mp, f.num, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tsp := p.AtomicGetPointer()\n\tif sp.IsNil() {\n\t\tsp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem())))\n\t}\n\tsp.AppendPointerSlice(mp)\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage impl\n\nimport (\n\t\"math\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// sizeBool returns the size of wire encoding a bool pointer as a Bool.\nfunc sizeBool(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Bool()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v))\n}\n\n// appendBool wire encodes a bool pointer as a Bool.\nfunc appendBool(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bool()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeBool(v))\n\treturn b, nil\n}\n\n// consumeBool wire decodes a bool pointer as a Bool.\nfunc consumeBool(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Bool() = protowire.DecodeBool(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBool = pointerCoderFuncs{\n\tsize:      sizeBool,\n\tmarshal:   appendBool,\n\tunmarshal: consumeBool,\n\tmerge:     mergeBool,\n}\n\n// sizeBoolNoZero returns the size of wire encoding a bool pointer as a Bool.\n// The zero value is not encoded.\nfunc sizeBoolNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Bool()\n\tif v == false {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v))\n}\n\n// appendBoolNoZero wire encodes a bool pointer as a Bool.\n// The zero value is not encoded.\nfunc appendBoolNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bool()\n\tif v == false {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeBool(v))\n\treturn b, nil\n}\n\nvar coderBoolNoZero = pointerCoderFuncs{\n\tsize:      sizeBoolNoZero,\n\tmarshal:   appendBoolNoZero,\n\tunmarshal: consumeBool,\n\tmerge:     mergeBoolNoZero,\n}\n\n// sizeBoolPtr returns the size of wire encoding a *bool pointer as a Bool.\n// It panics if the pointer is nil.\nfunc sizeBoolPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.BoolPtr()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v))\n}\n\n// appendBoolPtr wire encodes a *bool pointer as a Bool.\n// It panics if the pointer is nil.\nfunc appendBoolPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.BoolPtr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeBool(v))\n\treturn b, nil\n}\n\n// consumeBoolPtr wire decodes a *bool pointer as a Bool.\nfunc consumeBoolPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.BoolPtr()\n\tif *vp == nil {\n\t\t*vp = new(bool)\n\t}\n\t**vp = protowire.DecodeBool(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBoolPtr = pointerCoderFuncs{\n\tsize:      sizeBoolPtr,\n\tmarshal:   appendBoolPtr,\n\tunmarshal: consumeBoolPtr,\n\tmerge:     mergeBoolPtr,\n}\n\n// sizeBoolSlice returns the size of wire encoding a []bool pointer as a repeated Bool.\nfunc sizeBoolSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.BoolSlice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v))\n\t}\n\treturn size\n}\n\n// appendBoolSlice encodes a []bool pointer as a repeated Bool.\nfunc appendBoolSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.BoolSlice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeBool(v))\n\t}\n\treturn b, nil\n}\n\n// consumeBoolSlice wire decodes a []bool pointer as a repeated Bool.\nfunc consumeBoolSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.BoolSlice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growBoolSlice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, protowire.DecodeBool(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, protowire.DecodeBool(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBoolSlice = pointerCoderFuncs{\n\tsize:      sizeBoolSlice,\n\tmarshal:   appendBoolSlice,\n\tunmarshal: consumeBoolSlice,\n\tmerge:     mergeBoolSlice,\n}\n\n// sizeBoolPackedSlice returns the size of wire encoding a []bool pointer as a packed repeated Bool.\nfunc sizeBoolPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.BoolSlice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeBool(v))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendBoolPackedSlice encodes a []bool pointer as a packed repeated Bool.\nfunc appendBoolPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.BoolSlice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeBool(v))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, protowire.EncodeBool(v))\n\t}\n\treturn b, nil\n}\n\nvar coderBoolPackedSlice = pointerCoderFuncs{\n\tsize:      sizeBoolPackedSlice,\n\tmarshal:   appendBoolPackedSlice,\n\tunmarshal: consumeBoolSlice,\n\tmerge:     mergeBoolSlice,\n}\n\n// sizeBoolValue returns the size of wire encoding a bool value as a Bool.\nfunc sizeBoolValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(protowire.EncodeBool(v.Bool()))\n}\n\n// appendBoolValue encodes a bool value as a Bool.\nfunc appendBoolValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool()))\n\treturn b, nil\n}\n\n// consumeBoolValue decodes a bool value as a Bool.\nfunc consumeBoolValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfBool(protowire.DecodeBool(v)), out, nil\n}\n\nvar coderBoolValue = valueCoderFuncs{\n\tsize:      sizeBoolValue,\n\tmarshal:   appendBoolValue,\n\tunmarshal: consumeBoolValue,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeBoolSliceValue returns the size of wire encoding a []bool value as a repeated Bool.\nfunc sizeBoolSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(protowire.EncodeBool(v.Bool()))\n\t}\n\treturn size\n}\n\n// appendBoolSliceValue encodes a []bool value as a repeated Bool.\nfunc appendBoolSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool()))\n\t}\n\treturn b, nil\n}\n\n// consumeBoolSliceValue wire decodes a []bool value as a repeated Bool.\nfunc consumeBoolSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderBoolSliceValue = valueCoderFuncs{\n\tsize:      sizeBoolSliceValue,\n\tmarshal:   appendBoolSliceValue,\n\tunmarshal: consumeBoolSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeBoolPackedSliceValue returns the size of wire encoding a []bool value as a packed repeated Bool.\nfunc sizeBoolPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeBool(v.Bool()))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendBoolPackedSliceValue encodes a []bool value as a packed repeated Bool.\nfunc appendBoolPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeBool(v.Bool()))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool()))\n\t}\n\treturn b, nil\n}\n\nvar coderBoolPackedSliceValue = valueCoderFuncs{\n\tsize:      sizeBoolPackedSliceValue,\n\tmarshal:   appendBoolPackedSliceValue,\n\tunmarshal: consumeBoolSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeEnumValue returns the size of wire encoding a  value as a Enum.\nfunc sizeEnumValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(uint64(v.Enum()))\n}\n\n// appendEnumValue encodes a  value as a Enum.\nfunc appendEnumValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, uint64(v.Enum()))\n\treturn b, nil\n}\n\n// consumeEnumValue decodes a  value as a Enum.\nfunc consumeEnumValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)), out, nil\n}\n\nvar coderEnumValue = valueCoderFuncs{\n\tsize:      sizeEnumValue,\n\tmarshal:   appendEnumValue,\n\tunmarshal: consumeEnumValue,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeEnumSliceValue returns the size of wire encoding a [] value as a repeated Enum.\nfunc sizeEnumSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(uint64(v.Enum()))\n\t}\n\treturn size\n}\n\n// appendEnumSliceValue encodes a [] value as a repeated Enum.\nfunc appendEnumSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(v.Enum()))\n\t}\n\treturn b, nil\n}\n\n// consumeEnumSliceValue wire decodes a [] value as a repeated Enum.\nfunc consumeEnumSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderEnumSliceValue = valueCoderFuncs{\n\tsize:      sizeEnumSliceValue,\n\tmarshal:   appendEnumSliceValue,\n\tunmarshal: consumeEnumSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeEnumPackedSliceValue returns the size of wire encoding a [] value as a packed repeated Enum.\nfunc sizeEnumPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(v.Enum()))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendEnumPackedSliceValue encodes a [] value as a packed repeated Enum.\nfunc appendEnumPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(v.Enum()))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, uint64(v.Enum()))\n\t}\n\treturn b, nil\n}\n\nvar coderEnumPackedSliceValue = valueCoderFuncs{\n\tsize:      sizeEnumPackedSliceValue,\n\tmarshal:   appendEnumPackedSliceValue,\n\tunmarshal: consumeEnumSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeInt32 returns the size of wire encoding a int32 pointer as a Int32.\nfunc sizeInt32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int32()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt32 wire encodes a int32 pointer as a Int32.\nfunc appendInt32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeInt32 wire decodes a int32 pointer as a Int32.\nfunc consumeInt32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int32() = int32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt32 = pointerCoderFuncs{\n\tsize:      sizeInt32,\n\tmarshal:   appendInt32,\n\tunmarshal: consumeInt32,\n\tmerge:     mergeInt32,\n}\n\n// sizeInt32NoZero returns the size of wire encoding a int32 pointer as a Int32.\n// The zero value is not encoded.\nfunc sizeInt32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt32NoZero wire encodes a int32 pointer as a Int32.\n// The zero value is not encoded.\nfunc appendInt32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\nvar coderInt32NoZero = pointerCoderFuncs{\n\tsize:      sizeInt32NoZero,\n\tmarshal:   appendInt32NoZero,\n\tunmarshal: consumeInt32,\n\tmerge:     mergeInt32NoZero,\n}\n\n// sizeInt32Ptr returns the size of wire encoding a *int32 pointer as a Int32.\n// It panics if the pointer is nil.\nfunc sizeInt32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Int32Ptr()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt32Ptr wire encodes a *int32 pointer as a Int32.\n// It panics if the pointer is nil.\nfunc appendInt32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeInt32Ptr wire decodes a *int32 pointer as a Int32.\nfunc consumeInt32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int32)\n\t}\n\t**vp = int32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt32Ptr = pointerCoderFuncs{\n\tsize:      sizeInt32Ptr,\n\tmarshal:   appendInt32Ptr,\n\tunmarshal: consumeInt32Ptr,\n\tmerge:     mergeInt32Ptr,\n}\n\n// sizeInt32Slice returns the size of wire encoding a []int32 pointer as a repeated Int32.\nfunc sizeInt32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(uint64(v))\n\t}\n\treturn size\n}\n\n// appendInt32Slice encodes a []int32 pointer as a repeated Int32.\nfunc appendInt32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\n// consumeInt32Slice wire decodes a []int32 pointer as a repeated Int32.\nfunc consumeInt32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growInt32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, int32(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, int32(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt32Slice = pointerCoderFuncs{\n\tsize:      sizeInt32Slice,\n\tmarshal:   appendInt32Slice,\n\tunmarshal: consumeInt32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeInt32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Int32.\nfunc sizeInt32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendInt32PackedSlice encodes a []int32 pointer as a packed repeated Int32.\nfunc appendInt32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\nvar coderInt32PackedSlice = pointerCoderFuncs{\n\tsize:      sizeInt32PackedSlice,\n\tmarshal:   appendInt32PackedSlice,\n\tunmarshal: consumeInt32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeInt32Value returns the size of wire encoding a int32 value as a Int32.\nfunc sizeInt32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(uint64(int32(v.Int())))\n}\n\n// appendInt32Value encodes a int32 value as a Int32.\nfunc appendInt32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, uint64(int32(v.Int())))\n\treturn b, nil\n}\n\n// consumeInt32Value decodes a int32 value as a Int32.\nfunc consumeInt32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt32(int32(v)), out, nil\n}\n\nvar coderInt32Value = valueCoderFuncs{\n\tsize:      sizeInt32Value,\n\tmarshal:   appendInt32Value,\n\tunmarshal: consumeInt32Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeInt32SliceValue returns the size of wire encoding a []int32 value as a repeated Int32.\nfunc sizeInt32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(uint64(int32(v.Int())))\n\t}\n\treturn size\n}\n\n// appendInt32SliceValue encodes a []int32 value as a repeated Int32.\nfunc appendInt32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(int32(v.Int())))\n\t}\n\treturn b, nil\n}\n\n// consumeInt32SliceValue wire decodes a []int32 value as a repeated Int32.\nfunc consumeInt32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderInt32SliceValue = valueCoderFuncs{\n\tsize:      sizeInt32SliceValue,\n\tmarshal:   appendInt32SliceValue,\n\tunmarshal: consumeInt32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeInt32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Int32.\nfunc sizeInt32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(int32(v.Int())))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendInt32PackedSliceValue encodes a []int32 value as a packed repeated Int32.\nfunc appendInt32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(int32(v.Int())))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, uint64(int32(v.Int())))\n\t}\n\treturn b, nil\n}\n\nvar coderInt32PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeInt32PackedSliceValue,\n\tmarshal:   appendInt32PackedSliceValue,\n\tunmarshal: consumeInt32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSint32 returns the size of wire encoding a int32 pointer as a Sint32.\nfunc sizeSint32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int32()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n}\n\n// appendSint32 wire encodes a int32 pointer as a Sint32.\nfunc appendSint32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v)))\n\treturn b, nil\n}\n\n// consumeSint32 wire decodes a int32 pointer as a Sint32.\nfunc consumeSint32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int32() = int32(protowire.DecodeZigZag(v & math.MaxUint32))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint32 = pointerCoderFuncs{\n\tsize:      sizeSint32,\n\tmarshal:   appendSint32,\n\tunmarshal: consumeSint32,\n\tmerge:     mergeInt32,\n}\n\n// sizeSint32NoZero returns the size of wire encoding a int32 pointer as a Sint32.\n// The zero value is not encoded.\nfunc sizeSint32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n}\n\n// appendSint32NoZero wire encodes a int32 pointer as a Sint32.\n// The zero value is not encoded.\nfunc appendSint32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v)))\n\treturn b, nil\n}\n\nvar coderSint32NoZero = pointerCoderFuncs{\n\tsize:      sizeSint32NoZero,\n\tmarshal:   appendSint32NoZero,\n\tunmarshal: consumeSint32,\n\tmerge:     mergeInt32NoZero,\n}\n\n// sizeSint32Ptr returns the size of wire encoding a *int32 pointer as a Sint32.\n// It panics if the pointer is nil.\nfunc sizeSint32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Int32Ptr()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n}\n\n// appendSint32Ptr wire encodes a *int32 pointer as a Sint32.\n// It panics if the pointer is nil.\nfunc appendSint32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v)))\n\treturn b, nil\n}\n\n// consumeSint32Ptr wire decodes a *int32 pointer as a Sint32.\nfunc consumeSint32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int32)\n\t}\n\t**vp = int32(protowire.DecodeZigZag(v & math.MaxUint32))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint32Ptr = pointerCoderFuncs{\n\tsize:      sizeSint32Ptr,\n\tmarshal:   appendSint32Ptr,\n\tunmarshal: consumeSint32Ptr,\n\tmerge:     mergeInt32Ptr,\n}\n\n// sizeSint32Slice returns the size of wire encoding a []int32 pointer as a repeated Sint32.\nfunc sizeSint32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n\t}\n\treturn size\n}\n\n// appendSint32Slice encodes a []int32 pointer as a repeated Sint32.\nfunc appendSint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v)))\n\t}\n\treturn b, nil\n}\n\n// consumeSint32Slice wire decodes a []int32 pointer as a repeated Sint32.\nfunc consumeSint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growInt32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, int32(protowire.DecodeZigZag(v&math.MaxUint32)))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, int32(protowire.DecodeZigZag(v&math.MaxUint32)))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint32Slice = pointerCoderFuncs{\n\tsize:      sizeSint32Slice,\n\tmarshal:   appendSint32Slice,\n\tunmarshal: consumeSint32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeSint32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Sint32.\nfunc sizeSint32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendSint32PackedSlice encodes a []int32 pointer as a packed repeated Sint32.\nfunc appendSint32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(int64(v)))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(v)))\n\t}\n\treturn b, nil\n}\n\nvar coderSint32PackedSlice = pointerCoderFuncs{\n\tsize:      sizeSint32PackedSlice,\n\tmarshal:   appendSint32PackedSlice,\n\tunmarshal: consumeSint32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeSint32Value returns the size of wire encoding a int32 value as a Sint32.\nfunc sizeSint32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int()))))\n}\n\n// appendSint32Value encodes a int32 value as a Sint32.\nfunc appendSint32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int()))))\n\treturn b, nil\n}\n\n// consumeSint32Value decodes a int32 value as a Sint32.\nfunc consumeSint32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))), out, nil\n}\n\nvar coderSint32Value = valueCoderFuncs{\n\tsize:      sizeSint32Value,\n\tmarshal:   appendSint32Value,\n\tunmarshal: consumeSint32Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeSint32SliceValue returns the size of wire encoding a []int32 value as a repeated Sint32.\nfunc sizeSint32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int()))))\n\t}\n\treturn size\n}\n\n// appendSint32SliceValue encodes a []int32 value as a repeated Sint32.\nfunc appendSint32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int()))))\n\t}\n\treturn b, nil\n}\n\n// consumeSint32SliceValue wire decodes a []int32 value as a repeated Sint32.\nfunc consumeSint32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderSint32SliceValue = valueCoderFuncs{\n\tsize:      sizeSint32SliceValue,\n\tmarshal:   appendSint32SliceValue,\n\tunmarshal: consumeSint32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSint32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Sint32.\nfunc sizeSint32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int()))))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendSint32PackedSliceValue encodes a []int32 value as a packed repeated Sint32.\nfunc appendSint32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int()))))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int()))))\n\t}\n\treturn b, nil\n}\n\nvar coderSint32PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeSint32PackedSliceValue,\n\tmarshal:   appendSint32PackedSliceValue,\n\tunmarshal: consumeSint32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeUint32 returns the size of wire encoding a uint32 pointer as a Uint32.\nfunc sizeUint32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint32()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendUint32 wire encodes a uint32 pointer as a Uint32.\nfunc appendUint32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeUint32 wire decodes a uint32 pointer as a Uint32.\nfunc consumeUint32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Uint32() = uint32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint32 = pointerCoderFuncs{\n\tsize:      sizeUint32,\n\tmarshal:   appendUint32,\n\tunmarshal: consumeUint32,\n\tmerge:     mergeUint32,\n}\n\n// sizeUint32NoZero returns the size of wire encoding a uint32 pointer as a Uint32.\n// The zero value is not encoded.\nfunc sizeUint32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint32()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendUint32NoZero wire encodes a uint32 pointer as a Uint32.\n// The zero value is not encoded.\nfunc appendUint32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint32()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\nvar coderUint32NoZero = pointerCoderFuncs{\n\tsize:      sizeUint32NoZero,\n\tmarshal:   appendUint32NoZero,\n\tunmarshal: consumeUint32,\n\tmerge:     mergeUint32NoZero,\n}\n\n// sizeUint32Ptr returns the size of wire encoding a *uint32 pointer as a Uint32.\n// It panics if the pointer is nil.\nfunc sizeUint32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Uint32Ptr()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendUint32Ptr wire encodes a *uint32 pointer as a Uint32.\n// It panics if the pointer is nil.\nfunc appendUint32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Uint32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeUint32Ptr wire decodes a *uint32 pointer as a Uint32.\nfunc consumeUint32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Uint32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(uint32)\n\t}\n\t**vp = uint32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint32Ptr = pointerCoderFuncs{\n\tsize:      sizeUint32Ptr,\n\tmarshal:   appendUint32Ptr,\n\tunmarshal: consumeUint32Ptr,\n\tmerge:     mergeUint32Ptr,\n}\n\n// sizeUint32Slice returns the size of wire encoding a []uint32 pointer as a repeated Uint32.\nfunc sizeUint32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint32Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(uint64(v))\n\t}\n\treturn size\n}\n\n// appendUint32Slice encodes a []uint32 pointer as a repeated Uint32.\nfunc appendUint32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\n// consumeUint32Slice wire decodes a []uint32 pointer as a repeated Uint32.\nfunc consumeUint32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Uint32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growUint32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, uint32(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, uint32(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint32Slice = pointerCoderFuncs{\n\tsize:      sizeUint32Slice,\n\tmarshal:   appendUint32Slice,\n\tunmarshal: consumeUint32Slice,\n\tmerge:     mergeUint32Slice,\n}\n\n// sizeUint32PackedSlice returns the size of wire encoding a []uint32 pointer as a packed repeated Uint32.\nfunc sizeUint32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendUint32PackedSlice encodes a []uint32 pointer as a packed repeated Uint32.\nfunc appendUint32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\nvar coderUint32PackedSlice = pointerCoderFuncs{\n\tsize:      sizeUint32PackedSlice,\n\tmarshal:   appendUint32PackedSlice,\n\tunmarshal: consumeUint32Slice,\n\tmerge:     mergeUint32Slice,\n}\n\n// sizeUint32Value returns the size of wire encoding a uint32 value as a Uint32.\nfunc sizeUint32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(uint64(uint32(v.Uint())))\n}\n\n// appendUint32Value encodes a uint32 value as a Uint32.\nfunc appendUint32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, uint64(uint32(v.Uint())))\n\treturn b, nil\n}\n\n// consumeUint32Value decodes a uint32 value as a Uint32.\nfunc consumeUint32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfUint32(uint32(v)), out, nil\n}\n\nvar coderUint32Value = valueCoderFuncs{\n\tsize:      sizeUint32Value,\n\tmarshal:   appendUint32Value,\n\tunmarshal: consumeUint32Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeUint32SliceValue returns the size of wire encoding a []uint32 value as a repeated Uint32.\nfunc sizeUint32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(uint64(uint32(v.Uint())))\n\t}\n\treturn size\n}\n\n// appendUint32SliceValue encodes a []uint32 value as a repeated Uint32.\nfunc appendUint32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(uint32(v.Uint())))\n\t}\n\treturn b, nil\n}\n\n// consumeUint32SliceValue wire decodes a []uint32 value as a repeated Uint32.\nfunc consumeUint32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderUint32SliceValue = valueCoderFuncs{\n\tsize:      sizeUint32SliceValue,\n\tmarshal:   appendUint32SliceValue,\n\tunmarshal: consumeUint32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeUint32PackedSliceValue returns the size of wire encoding a []uint32 value as a packed repeated Uint32.\nfunc sizeUint32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(uint32(v.Uint())))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendUint32PackedSliceValue encodes a []uint32 value as a packed repeated Uint32.\nfunc appendUint32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(uint32(v.Uint())))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, uint64(uint32(v.Uint())))\n\t}\n\treturn b, nil\n}\n\nvar coderUint32PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeUint32PackedSliceValue,\n\tmarshal:   appendUint32PackedSliceValue,\n\tunmarshal: consumeUint32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeInt64 returns the size of wire encoding a int64 pointer as a Int64.\nfunc sizeInt64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int64()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt64 wire encodes a int64 pointer as a Int64.\nfunc appendInt64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeInt64 wire decodes a int64 pointer as a Int64.\nfunc consumeInt64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int64() = int64(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt64 = pointerCoderFuncs{\n\tsize:      sizeInt64,\n\tmarshal:   appendInt64,\n\tunmarshal: consumeInt64,\n\tmerge:     mergeInt64,\n}\n\n// sizeInt64NoZero returns the size of wire encoding a int64 pointer as a Int64.\n// The zero value is not encoded.\nfunc sizeInt64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt64NoZero wire encodes a int64 pointer as a Int64.\n// The zero value is not encoded.\nfunc appendInt64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\nvar coderInt64NoZero = pointerCoderFuncs{\n\tsize:      sizeInt64NoZero,\n\tmarshal:   appendInt64NoZero,\n\tunmarshal: consumeInt64,\n\tmerge:     mergeInt64NoZero,\n}\n\n// sizeInt64Ptr returns the size of wire encoding a *int64 pointer as a Int64.\n// It panics if the pointer is nil.\nfunc sizeInt64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Int64Ptr()\n\treturn f.tagsize + protowire.SizeVarint(uint64(v))\n}\n\n// appendInt64Ptr wire encodes a *int64 pointer as a Int64.\n// It panics if the pointer is nil.\nfunc appendInt64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeInt64Ptr wire decodes a *int64 pointer as a Int64.\nfunc consumeInt64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int64)\n\t}\n\t**vp = int64(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt64Ptr = pointerCoderFuncs{\n\tsize:      sizeInt64Ptr,\n\tmarshal:   appendInt64Ptr,\n\tunmarshal: consumeInt64Ptr,\n\tmerge:     mergeInt64Ptr,\n}\n\n// sizeInt64Slice returns the size of wire encoding a []int64 pointer as a repeated Int64.\nfunc sizeInt64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(uint64(v))\n\t}\n\treturn size\n}\n\n// appendInt64Slice encodes a []int64 pointer as a repeated Int64.\nfunc appendInt64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\n// consumeInt64Slice wire decodes a []int64 pointer as a repeated Int64.\nfunc consumeInt64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growInt64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, int64(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, int64(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderInt64Slice = pointerCoderFuncs{\n\tsize:      sizeInt64Slice,\n\tmarshal:   appendInt64Slice,\n\tunmarshal: consumeInt64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeInt64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Int64.\nfunc sizeInt64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendInt64PackedSlice encodes a []int64 pointer as a packed repeated Int64.\nfunc appendInt64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(uint64(v))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\nvar coderInt64PackedSlice = pointerCoderFuncs{\n\tsize:      sizeInt64PackedSlice,\n\tmarshal:   appendInt64PackedSlice,\n\tunmarshal: consumeInt64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeInt64Value returns the size of wire encoding a int64 value as a Int64.\nfunc sizeInt64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(uint64(v.Int()))\n}\n\n// appendInt64Value encodes a int64 value as a Int64.\nfunc appendInt64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, uint64(v.Int()))\n\treturn b, nil\n}\n\n// consumeInt64Value decodes a int64 value as a Int64.\nfunc consumeInt64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt64(int64(v)), out, nil\n}\n\nvar coderInt64Value = valueCoderFuncs{\n\tsize:      sizeInt64Value,\n\tmarshal:   appendInt64Value,\n\tunmarshal: consumeInt64Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeInt64SliceValue returns the size of wire encoding a []int64 value as a repeated Int64.\nfunc sizeInt64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(uint64(v.Int()))\n\t}\n\treturn size\n}\n\n// appendInt64SliceValue encodes a []int64 value as a repeated Int64.\nfunc appendInt64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, uint64(v.Int()))\n\t}\n\treturn b, nil\n}\n\n// consumeInt64SliceValue wire decodes a []int64 value as a repeated Int64.\nfunc consumeInt64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderInt64SliceValue = valueCoderFuncs{\n\tsize:      sizeInt64SliceValue,\n\tmarshal:   appendInt64SliceValue,\n\tunmarshal: consumeInt64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeInt64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Int64.\nfunc sizeInt64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(v.Int()))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendInt64PackedSliceValue encodes a []int64 value as a packed repeated Int64.\nfunc appendInt64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(uint64(v.Int()))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, uint64(v.Int()))\n\t}\n\treturn b, nil\n}\n\nvar coderInt64PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeInt64PackedSliceValue,\n\tmarshal:   appendInt64PackedSliceValue,\n\tunmarshal: consumeInt64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSint64 returns the size of wire encoding a int64 pointer as a Sint64.\nfunc sizeSint64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int64()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v))\n}\n\n// appendSint64 wire encodes a int64 pointer as a Sint64.\nfunc appendSint64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v))\n\treturn b, nil\n}\n\n// consumeSint64 wire decodes a int64 pointer as a Sint64.\nfunc consumeSint64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int64() = protowire.DecodeZigZag(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint64 = pointerCoderFuncs{\n\tsize:      sizeSint64,\n\tmarshal:   appendSint64,\n\tunmarshal: consumeSint64,\n\tmerge:     mergeInt64,\n}\n\n// sizeSint64NoZero returns the size of wire encoding a int64 pointer as a Sint64.\n// The zero value is not encoded.\nfunc sizeSint64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v))\n}\n\n// appendSint64NoZero wire encodes a int64 pointer as a Sint64.\n// The zero value is not encoded.\nfunc appendSint64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v))\n\treturn b, nil\n}\n\nvar coderSint64NoZero = pointerCoderFuncs{\n\tsize:      sizeSint64NoZero,\n\tmarshal:   appendSint64NoZero,\n\tunmarshal: consumeSint64,\n\tmerge:     mergeInt64NoZero,\n}\n\n// sizeSint64Ptr returns the size of wire encoding a *int64 pointer as a Sint64.\n// It panics if the pointer is nil.\nfunc sizeSint64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Int64Ptr()\n\treturn f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v))\n}\n\n// appendSint64Ptr wire encodes a *int64 pointer as a Sint64.\n// It panics if the pointer is nil.\nfunc appendSint64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v))\n\treturn b, nil\n}\n\n// consumeSint64Ptr wire decodes a *int64 pointer as a Sint64.\nfunc consumeSint64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int64)\n\t}\n\t**vp = protowire.DecodeZigZag(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint64Ptr = pointerCoderFuncs{\n\tsize:      sizeSint64Ptr,\n\tmarshal:   appendSint64Ptr,\n\tunmarshal: consumeSint64Ptr,\n\tmerge:     mergeInt64Ptr,\n}\n\n// sizeSint64Slice returns the size of wire encoding a []int64 pointer as a repeated Sint64.\nfunc sizeSint64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v))\n\t}\n\treturn size\n}\n\n// appendSint64Slice encodes a []int64 pointer as a repeated Sint64.\nfunc appendSint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v))\n\t}\n\treturn b, nil\n}\n\n// consumeSint64Slice wire decodes a []int64 pointer as a repeated Sint64.\nfunc consumeSint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growInt64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, protowire.DecodeZigZag(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, protowire.DecodeZigZag(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSint64Slice = pointerCoderFuncs{\n\tsize:      sizeSint64Slice,\n\tmarshal:   appendSint64Slice,\n\tunmarshal: consumeSint64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeSint64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Sint64.\nfunc sizeSint64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(v))\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendSint64PackedSlice encodes a []int64 pointer as a packed repeated Sint64.\nfunc appendSint64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(v))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v))\n\t}\n\treturn b, nil\n}\n\nvar coderSint64PackedSlice = pointerCoderFuncs{\n\tsize:      sizeSint64PackedSlice,\n\tmarshal:   appendSint64PackedSlice,\n\tunmarshal: consumeSint64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeSint64Value returns the size of wire encoding a int64 value as a Sint64.\nfunc sizeSint64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v.Int()))\n}\n\n// appendSint64Value encodes a int64 value as a Sint64.\nfunc appendSint64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int()))\n\treturn b, nil\n}\n\n// consumeSint64Value decodes a int64 value as a Sint64.\nfunc consumeSint64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), out, nil\n}\n\nvar coderSint64Value = valueCoderFuncs{\n\tsize:      sizeSint64Value,\n\tmarshal:   appendSint64Value,\n\tunmarshal: consumeSint64Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeSint64SliceValue returns the size of wire encoding a []int64 value as a repeated Sint64.\nfunc sizeSint64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v.Int()))\n\t}\n\treturn size\n}\n\n// appendSint64SliceValue encodes a []int64 value as a repeated Sint64.\nfunc appendSint64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int()))\n\t}\n\treturn b, nil\n}\n\n// consumeSint64SliceValue wire decodes a []int64 value as a repeated Sint64.\nfunc consumeSint64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderSint64SliceValue = valueCoderFuncs{\n\tsize:      sizeSint64SliceValue,\n\tmarshal:   appendSint64SliceValue,\n\tunmarshal: consumeSint64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSint64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Sint64.\nfunc sizeSint64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(v.Int()))\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendSint64PackedSliceValue encodes a []int64 value as a packed repeated Sint64.\nfunc appendSint64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(protowire.EncodeZigZag(v.Int()))\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int()))\n\t}\n\treturn b, nil\n}\n\nvar coderSint64PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeSint64PackedSliceValue,\n\tmarshal:   appendSint64PackedSliceValue,\n\tunmarshal: consumeSint64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeUint64 returns the size of wire encoding a uint64 pointer as a Uint64.\nfunc sizeUint64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint64()\n\treturn f.tagsize + protowire.SizeVarint(v)\n}\n\n// appendUint64 wire encodes a uint64 pointer as a Uint64.\nfunc appendUint64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, v)\n\treturn b, nil\n}\n\n// consumeUint64 wire decodes a uint64 pointer as a Uint64.\nfunc consumeUint64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Uint64() = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint64 = pointerCoderFuncs{\n\tsize:      sizeUint64,\n\tmarshal:   appendUint64,\n\tunmarshal: consumeUint64,\n\tmerge:     mergeUint64,\n}\n\n// sizeUint64NoZero returns the size of wire encoding a uint64 pointer as a Uint64.\n// The zero value is not encoded.\nfunc sizeUint64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint64()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeVarint(v)\n}\n\n// appendUint64NoZero wire encodes a uint64 pointer as a Uint64.\n// The zero value is not encoded.\nfunc appendUint64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint64()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, v)\n\treturn b, nil\n}\n\nvar coderUint64NoZero = pointerCoderFuncs{\n\tsize:      sizeUint64NoZero,\n\tmarshal:   appendUint64NoZero,\n\tunmarshal: consumeUint64,\n\tmerge:     mergeUint64NoZero,\n}\n\n// sizeUint64Ptr returns the size of wire encoding a *uint64 pointer as a Uint64.\n// It panics if the pointer is nil.\nfunc sizeUint64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.Uint64Ptr()\n\treturn f.tagsize + protowire.SizeVarint(v)\n}\n\n// appendUint64Ptr wire encodes a *uint64 pointer as a Uint64.\n// It panics if the pointer is nil.\nfunc appendUint64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Uint64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendVarint(b, v)\n\treturn b, nil\n}\n\n// consumeUint64Ptr wire decodes a *uint64 pointer as a Uint64.\nfunc consumeUint64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Uint64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(uint64)\n\t}\n\t**vp = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint64Ptr = pointerCoderFuncs{\n\tsize:      sizeUint64Ptr,\n\tmarshal:   appendUint64Ptr,\n\tunmarshal: consumeUint64Ptr,\n\tmerge:     mergeUint64Ptr,\n}\n\n// sizeUint64Slice returns the size of wire encoding a []uint64 pointer as a repeated Uint64.\nfunc sizeUint64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint64Slice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeVarint(v)\n\t}\n\treturn size\n}\n\n// appendUint64Slice encodes a []uint64 pointer as a repeated Uint64.\nfunc appendUint64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendVarint(b, v)\n\t}\n\treturn b, nil\n}\n\n// consumeUint64Slice wire decodes a []uint64 pointer as a repeated Uint64.\nfunc consumeUint64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Uint64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := 0\n\t\tfor _, v := range b {\n\t\t\tif v < 0x80 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t\tif count > 0 {\n\t\t\tp.growUint64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, v)\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderUint64Slice = pointerCoderFuncs{\n\tsize:      sizeUint64Slice,\n\tmarshal:   appendUint64Slice,\n\tunmarshal: consumeUint64Slice,\n\tmerge:     mergeUint64Slice,\n}\n\n// sizeUint64PackedSlice returns the size of wire encoding a []uint64 pointer as a packed repeated Uint64.\nfunc sizeUint64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(v)\n\t}\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendUint64PackedSlice encodes a []uint64 pointer as a packed repeated Uint64.\nfunc appendUint64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := 0\n\tfor _, v := range s {\n\t\tn += protowire.SizeVarint(v)\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, v)\n\t}\n\treturn b, nil\n}\n\nvar coderUint64PackedSlice = pointerCoderFuncs{\n\tsize:      sizeUint64PackedSlice,\n\tmarshal:   appendUint64PackedSlice,\n\tunmarshal: consumeUint64Slice,\n\tmerge:     mergeUint64Slice,\n}\n\n// sizeUint64Value returns the size of wire encoding a uint64 value as a Uint64.\nfunc sizeUint64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeVarint(v.Uint())\n}\n\n// appendUint64Value encodes a uint64 value as a Uint64.\nfunc appendUint64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendVarint(b, v.Uint())\n\treturn b, nil\n}\n\n// consumeUint64Value decodes a uint64 value as a Uint64.\nfunc consumeUint64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfUint64(v), out, nil\n}\n\nvar coderUint64Value = valueCoderFuncs{\n\tsize:      sizeUint64Value,\n\tmarshal:   appendUint64Value,\n\tunmarshal: consumeUint64Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeUint64SliceValue returns the size of wire encoding a []uint64 value as a repeated Uint64.\nfunc sizeUint64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeVarint(v.Uint())\n\t}\n\treturn size\n}\n\n// appendUint64SliceValue encodes a []uint64 value as a repeated Uint64.\nfunc appendUint64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendVarint(b, v.Uint())\n\t}\n\treturn b, nil\n}\n\n// consumeUint64SliceValue wire decodes a []uint64 value as a repeated Uint64.\nfunc consumeUint64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tvar v uint64\n\t\t\tvar n int\n\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\tv = uint64(b[0])\n\t\t\t\tn = 1\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tn = 2\n\t\t\t} else {\n\t\t\t\tv, n = protowire.ConsumeVarint(b)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.VarintType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tvar v uint64\n\tvar n int\n\tif len(b) >= 1 && b[0] < 0x80 {\n\t\tv = uint64(b[0])\n\t\tn = 1\n\t} else if len(b) >= 2 && b[1] < 128 {\n\t\tv = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\tn = 2\n\t} else {\n\t\tv, n = protowire.ConsumeVarint(b)\n\t}\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfUint64(v))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderUint64SliceValue = valueCoderFuncs{\n\tsize:      sizeUint64SliceValue,\n\tmarshal:   appendUint64SliceValue,\n\tunmarshal: consumeUint64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeUint64PackedSliceValue returns the size of wire encoding a []uint64 value as a packed repeated Uint64.\nfunc sizeUint64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\tfor i, llen := 0, llen; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(v.Uint())\n\t}\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendUint64PackedSliceValue encodes a []uint64 value as a packed repeated Uint64.\nfunc appendUint64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := 0\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tn += protowire.SizeVarint(v.Uint())\n\t}\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, v.Uint())\n\t}\n\treturn b, nil\n}\n\nvar coderUint64PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeUint64PackedSliceValue,\n\tmarshal:   appendUint64PackedSliceValue,\n\tunmarshal: consumeUint64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSfixed32 returns the size of wire encoding a int32 pointer as a Sfixed32.\nfunc sizeSfixed32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendSfixed32 wire encodes a int32 pointer as a Sfixed32.\nfunc appendSfixed32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, uint32(v))\n\treturn b, nil\n}\n\n// consumeSfixed32 wire decodes a int32 pointer as a Sfixed32.\nfunc consumeSfixed32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int32() = int32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed32 = pointerCoderFuncs{\n\tsize:      sizeSfixed32,\n\tmarshal:   appendSfixed32,\n\tunmarshal: consumeSfixed32,\n\tmerge:     mergeInt32,\n}\n\n// sizeSfixed32NoZero returns the size of wire encoding a int32 pointer as a Sfixed32.\n// The zero value is not encoded.\nfunc sizeSfixed32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendSfixed32NoZero wire encodes a int32 pointer as a Sfixed32.\n// The zero value is not encoded.\nfunc appendSfixed32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int32()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, uint32(v))\n\treturn b, nil\n}\n\nvar coderSfixed32NoZero = pointerCoderFuncs{\n\tsize:      sizeSfixed32NoZero,\n\tmarshal:   appendSfixed32NoZero,\n\tunmarshal: consumeSfixed32,\n\tmerge:     mergeInt32NoZero,\n}\n\n// sizeSfixed32Ptr returns the size of wire encoding a *int32 pointer as a Sfixed32.\n// It panics if the pointer is nil.\nfunc sizeSfixed32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendSfixed32Ptr wire encodes a *int32 pointer as a Sfixed32.\n// It panics if the pointer is nil.\nfunc appendSfixed32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, uint32(v))\n\treturn b, nil\n}\n\n// consumeSfixed32Ptr wire decodes a *int32 pointer as a Sfixed32.\nfunc consumeSfixed32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int32)\n\t}\n\t**vp = int32(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed32Ptr = pointerCoderFuncs{\n\tsize:      sizeSfixed32Ptr,\n\tmarshal:   appendSfixed32Ptr,\n\tunmarshal: consumeSfixed32Ptr,\n\tmerge:     mergeInt32Ptr,\n}\n\n// sizeSfixed32Slice returns the size of wire encoding a []int32 pointer as a repeated Sfixed32.\nfunc sizeSfixed32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendSfixed32Slice encodes a []int32 pointer as a repeated Sfixed32.\nfunc appendSfixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed32(b, uint32(v))\n\t}\n\treturn b, nil\n}\n\n// consumeSfixed32Slice wire decodes a []int32 pointer as a repeated Sfixed32.\nfunc consumeSfixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed32()\n\t\tif count > 0 {\n\t\t\tp.growInt32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, int32(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, int32(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed32Slice = pointerCoderFuncs{\n\tsize:      sizeSfixed32Slice,\n\tmarshal:   appendSfixed32Slice,\n\tunmarshal: consumeSfixed32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeSfixed32PackedSlice returns the size of wire encoding a []int32 pointer as a packed repeated Sfixed32.\nfunc sizeSfixed32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed32()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendSfixed32PackedSlice encodes a []int32 pointer as a packed repeated Sfixed32.\nfunc appendSfixed32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed32(b, uint32(v))\n\t}\n\treturn b, nil\n}\n\nvar coderSfixed32PackedSlice = pointerCoderFuncs{\n\tsize:      sizeSfixed32PackedSlice,\n\tmarshal:   appendSfixed32PackedSlice,\n\tunmarshal: consumeSfixed32Slice,\n\tmerge:     mergeInt32Slice,\n}\n\n// sizeSfixed32Value returns the size of wire encoding a int32 value as a Sfixed32.\nfunc sizeSfixed32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed32()\n}\n\n// appendSfixed32Value encodes a int32 value as a Sfixed32.\nfunc appendSfixed32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed32(b, uint32(v.Int()))\n\treturn b, nil\n}\n\n// consumeSfixed32Value decodes a int32 value as a Sfixed32.\nfunc consumeSfixed32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt32(int32(v)), out, nil\n}\n\nvar coderSfixed32Value = valueCoderFuncs{\n\tsize:      sizeSfixed32Value,\n\tmarshal:   appendSfixed32Value,\n\tunmarshal: consumeSfixed32Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeSfixed32SliceValue returns the size of wire encoding a []int32 value as a repeated Sfixed32.\nfunc sizeSfixed32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendSfixed32SliceValue encodes a []int32 value as a repeated Sfixed32.\nfunc appendSfixed32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed32(b, uint32(v.Int()))\n\t}\n\treturn b, nil\n}\n\n// consumeSfixed32SliceValue wire decodes a []int32 value as a repeated Sfixed32.\nfunc consumeSfixed32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderSfixed32SliceValue = valueCoderFuncs{\n\tsize:      sizeSfixed32SliceValue,\n\tmarshal:   appendSfixed32SliceValue,\n\tunmarshal: consumeSfixed32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSfixed32PackedSliceValue returns the size of wire encoding a []int32 value as a packed repeated Sfixed32.\nfunc sizeSfixed32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed32()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendSfixed32PackedSliceValue encodes a []int32 value as a packed repeated Sfixed32.\nfunc appendSfixed32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed32(b, uint32(v.Int()))\n\t}\n\treturn b, nil\n}\n\nvar coderSfixed32PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeSfixed32PackedSliceValue,\n\tmarshal:   appendSfixed32PackedSliceValue,\n\tunmarshal: consumeSfixed32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFixed32 returns the size of wire encoding a uint32 pointer as a Fixed32.\nfunc sizeFixed32(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFixed32 wire encodes a uint32 pointer as a Fixed32.\nfunc appendFixed32(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, v)\n\treturn b, nil\n}\n\n// consumeFixed32 wire decodes a uint32 pointer as a Fixed32.\nfunc consumeFixed32(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Uint32() = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed32 = pointerCoderFuncs{\n\tsize:      sizeFixed32,\n\tmarshal:   appendFixed32,\n\tunmarshal: consumeFixed32,\n\tmerge:     mergeUint32,\n}\n\n// sizeFixed32NoZero returns the size of wire encoding a uint32 pointer as a Fixed32.\n// The zero value is not encoded.\nfunc sizeFixed32NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint32()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFixed32NoZero wire encodes a uint32 pointer as a Fixed32.\n// The zero value is not encoded.\nfunc appendFixed32NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint32()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, v)\n\treturn b, nil\n}\n\nvar coderFixed32NoZero = pointerCoderFuncs{\n\tsize:      sizeFixed32NoZero,\n\tmarshal:   appendFixed32NoZero,\n\tunmarshal: consumeFixed32,\n\tmerge:     mergeUint32NoZero,\n}\n\n// sizeFixed32Ptr returns the size of wire encoding a *uint32 pointer as a Fixed32.\n// It panics if the pointer is nil.\nfunc sizeFixed32Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFixed32Ptr wire encodes a *uint32 pointer as a Fixed32.\n// It panics if the pointer is nil.\nfunc appendFixed32Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Uint32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, v)\n\treturn b, nil\n}\n\n// consumeFixed32Ptr wire decodes a *uint32 pointer as a Fixed32.\nfunc consumeFixed32Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Uint32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(uint32)\n\t}\n\t**vp = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed32Ptr = pointerCoderFuncs{\n\tsize:      sizeFixed32Ptr,\n\tmarshal:   appendFixed32Ptr,\n\tunmarshal: consumeFixed32Ptr,\n\tmerge:     mergeUint32Ptr,\n}\n\n// sizeFixed32Slice returns the size of wire encoding a []uint32 pointer as a repeated Fixed32.\nfunc sizeFixed32Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint32Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendFixed32Slice encodes a []uint32 pointer as a repeated Fixed32.\nfunc appendFixed32Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed32(b, v)\n\t}\n\treturn b, nil\n}\n\n// consumeFixed32Slice wire decodes a []uint32 pointer as a repeated Fixed32.\nfunc consumeFixed32Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Uint32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed32()\n\t\tif count > 0 {\n\t\t\tp.growUint32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, v)\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed32Slice = pointerCoderFuncs{\n\tsize:      sizeFixed32Slice,\n\tmarshal:   appendFixed32Slice,\n\tunmarshal: consumeFixed32Slice,\n\tmerge:     mergeUint32Slice,\n}\n\n// sizeFixed32PackedSlice returns the size of wire encoding a []uint32 pointer as a packed repeated Fixed32.\nfunc sizeFixed32PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed32()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendFixed32PackedSlice encodes a []uint32 pointer as a packed repeated Fixed32.\nfunc appendFixed32PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed32(b, v)\n\t}\n\treturn b, nil\n}\n\nvar coderFixed32PackedSlice = pointerCoderFuncs{\n\tsize:      sizeFixed32PackedSlice,\n\tmarshal:   appendFixed32PackedSlice,\n\tunmarshal: consumeFixed32Slice,\n\tmerge:     mergeUint32Slice,\n}\n\n// sizeFixed32Value returns the size of wire encoding a uint32 value as a Fixed32.\nfunc sizeFixed32Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed32()\n}\n\n// appendFixed32Value encodes a uint32 value as a Fixed32.\nfunc appendFixed32Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed32(b, uint32(v.Uint()))\n\treturn b, nil\n}\n\n// consumeFixed32Value decodes a uint32 value as a Fixed32.\nfunc consumeFixed32Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfUint32(uint32(v)), out, nil\n}\n\nvar coderFixed32Value = valueCoderFuncs{\n\tsize:      sizeFixed32Value,\n\tmarshal:   appendFixed32Value,\n\tunmarshal: consumeFixed32Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeFixed32SliceValue returns the size of wire encoding a []uint32 value as a repeated Fixed32.\nfunc sizeFixed32SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendFixed32SliceValue encodes a []uint32 value as a repeated Fixed32.\nfunc appendFixed32SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed32(b, uint32(v.Uint()))\n\t}\n\treturn b, nil\n}\n\n// consumeFixed32SliceValue wire decodes a []uint32 value as a repeated Fixed32.\nfunc consumeFixed32SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderFixed32SliceValue = valueCoderFuncs{\n\tsize:      sizeFixed32SliceValue,\n\tmarshal:   appendFixed32SliceValue,\n\tunmarshal: consumeFixed32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFixed32PackedSliceValue returns the size of wire encoding a []uint32 value as a packed repeated Fixed32.\nfunc sizeFixed32PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed32()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendFixed32PackedSliceValue encodes a []uint32 value as a packed repeated Fixed32.\nfunc appendFixed32PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed32(b, uint32(v.Uint()))\n\t}\n\treturn b, nil\n}\n\nvar coderFixed32PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeFixed32PackedSliceValue,\n\tmarshal:   appendFixed32PackedSliceValue,\n\tunmarshal: consumeFixed32SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFloat returns the size of wire encoding a float32 pointer as a Float.\nfunc sizeFloat(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFloat wire encodes a float32 pointer as a Float.\nfunc appendFloat(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Float32()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, math.Float32bits(v))\n\treturn b, nil\n}\n\n// consumeFloat wire decodes a float32 pointer as a Float.\nfunc consumeFloat(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Float32() = math.Float32frombits(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFloat = pointerCoderFuncs{\n\tsize:      sizeFloat,\n\tmarshal:   appendFloat,\n\tunmarshal: consumeFloat,\n\tmerge:     mergeFloat32,\n}\n\n// sizeFloatNoZero returns the size of wire encoding a float32 pointer as a Float.\n// The zero value is not encoded.\nfunc sizeFloatNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Float32()\n\tif v == 0 && !math.Signbit(float64(v)) {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFloatNoZero wire encodes a float32 pointer as a Float.\n// The zero value is not encoded.\nfunc appendFloatNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Float32()\n\tif v == 0 && !math.Signbit(float64(v)) {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, math.Float32bits(v))\n\treturn b, nil\n}\n\nvar coderFloatNoZero = pointerCoderFuncs{\n\tsize:      sizeFloatNoZero,\n\tmarshal:   appendFloatNoZero,\n\tunmarshal: consumeFloat,\n\tmerge:     mergeFloat32NoZero,\n}\n\n// sizeFloatPtr returns the size of wire encoding a *float32 pointer as a Float.\n// It panics if the pointer is nil.\nfunc sizeFloatPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed32()\n}\n\n// appendFloatPtr wire encodes a *float32 pointer as a Float.\n// It panics if the pointer is nil.\nfunc appendFloatPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Float32Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed32(b, math.Float32bits(v))\n\treturn b, nil\n}\n\n// consumeFloatPtr wire decodes a *float32 pointer as a Float.\nfunc consumeFloatPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Float32Ptr()\n\tif *vp == nil {\n\t\t*vp = new(float32)\n\t}\n\t**vp = math.Float32frombits(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFloatPtr = pointerCoderFuncs{\n\tsize:      sizeFloatPtr,\n\tmarshal:   appendFloatPtr,\n\tunmarshal: consumeFloatPtr,\n\tmerge:     mergeFloat32Ptr,\n}\n\n// sizeFloatSlice returns the size of wire encoding a []float32 pointer as a repeated Float.\nfunc sizeFloatSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Float32Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendFloatSlice encodes a []float32 pointer as a repeated Float.\nfunc appendFloatSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Float32Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed32(b, math.Float32bits(v))\n\t}\n\treturn b, nil\n}\n\n// consumeFloatSlice wire decodes a []float32 pointer as a repeated Float.\nfunc consumeFloatSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Float32Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed32()\n\t\tif count > 0 {\n\t\t\tp.growFloat32Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, math.Float32frombits(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, math.Float32frombits(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFloatSlice = pointerCoderFuncs{\n\tsize:      sizeFloatSlice,\n\tmarshal:   appendFloatSlice,\n\tunmarshal: consumeFloatSlice,\n\tmerge:     mergeFloat32Slice,\n}\n\n// sizeFloatPackedSlice returns the size of wire encoding a []float32 pointer as a packed repeated Float.\nfunc sizeFloatPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Float32Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed32()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendFloatPackedSlice encodes a []float32 pointer as a packed repeated Float.\nfunc appendFloatPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Float32Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed32(b, math.Float32bits(v))\n\t}\n\treturn b, nil\n}\n\nvar coderFloatPackedSlice = pointerCoderFuncs{\n\tsize:      sizeFloatPackedSlice,\n\tmarshal:   appendFloatPackedSlice,\n\tunmarshal: consumeFloatSlice,\n\tmerge:     mergeFloat32Slice,\n}\n\n// sizeFloatValue returns the size of wire encoding a float32 value as a Float.\nfunc sizeFloatValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed32()\n}\n\n// appendFloatValue encodes a float32 value as a Float.\nfunc appendFloatValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float())))\n\treturn b, nil\n}\n\n// consumeFloatValue decodes a float32 value as a Float.\nfunc consumeFloatValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))), out, nil\n}\n\nvar coderFloatValue = valueCoderFuncs{\n\tsize:      sizeFloatValue,\n\tmarshal:   appendFloatValue,\n\tunmarshal: consumeFloatValue,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeFloatSliceValue returns the size of wire encoding a []float32 value as a repeated Float.\nfunc sizeFloatSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed32())\n\treturn size\n}\n\n// appendFloatSliceValue encodes a []float32 value as a repeated Float.\nfunc appendFloatSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float())))\n\t}\n\treturn b, nil\n}\n\n// consumeFloatSliceValue wire decodes a []float32 value as a repeated Float.\nfunc consumeFloatSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed32(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed32Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed32(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderFloatSliceValue = valueCoderFuncs{\n\tsize:      sizeFloatSliceValue,\n\tmarshal:   appendFloatSliceValue,\n\tunmarshal: consumeFloatSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFloatPackedSliceValue returns the size of wire encoding a []float32 value as a packed repeated Float.\nfunc sizeFloatPackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed32()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendFloatPackedSliceValue encodes a []float32 value as a packed repeated Float.\nfunc appendFloatPackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed32()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float())))\n\t}\n\treturn b, nil\n}\n\nvar coderFloatPackedSliceValue = valueCoderFuncs{\n\tsize:      sizeFloatPackedSliceValue,\n\tmarshal:   appendFloatPackedSliceValue,\n\tunmarshal: consumeFloatSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSfixed64 returns the size of wire encoding a int64 pointer as a Sfixed64.\nfunc sizeSfixed64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendSfixed64 wire encodes a int64 pointer as a Sfixed64.\nfunc appendSfixed64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeSfixed64 wire decodes a int64 pointer as a Sfixed64.\nfunc consumeSfixed64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Int64() = int64(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed64 = pointerCoderFuncs{\n\tsize:      sizeSfixed64,\n\tmarshal:   appendSfixed64,\n\tunmarshal: consumeSfixed64,\n\tmerge:     mergeInt64,\n}\n\n// sizeSfixed64NoZero returns the size of wire encoding a int64 pointer as a Sfixed64.\n// The zero value is not encoded.\nfunc sizeSfixed64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendSfixed64NoZero wire encodes a int64 pointer as a Sfixed64.\n// The zero value is not encoded.\nfunc appendSfixed64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Int64()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, uint64(v))\n\treturn b, nil\n}\n\nvar coderSfixed64NoZero = pointerCoderFuncs{\n\tsize:      sizeSfixed64NoZero,\n\tmarshal:   appendSfixed64NoZero,\n\tunmarshal: consumeSfixed64,\n\tmerge:     mergeInt64NoZero,\n}\n\n// sizeSfixed64Ptr returns the size of wire encoding a *int64 pointer as a Sfixed64.\n// It panics if the pointer is nil.\nfunc sizeSfixed64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendSfixed64Ptr wire encodes a *int64 pointer as a Sfixed64.\n// It panics if the pointer is nil.\nfunc appendSfixed64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Int64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, uint64(v))\n\treturn b, nil\n}\n\n// consumeSfixed64Ptr wire decodes a *int64 pointer as a Sfixed64.\nfunc consumeSfixed64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Int64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(int64)\n\t}\n\t**vp = int64(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed64Ptr = pointerCoderFuncs{\n\tsize:      sizeSfixed64Ptr,\n\tmarshal:   appendSfixed64Ptr,\n\tunmarshal: consumeSfixed64Ptr,\n\tmerge:     mergeInt64Ptr,\n}\n\n// sizeSfixed64Slice returns the size of wire encoding a []int64 pointer as a repeated Sfixed64.\nfunc sizeSfixed64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendSfixed64Slice encodes a []int64 pointer as a repeated Sfixed64.\nfunc appendSfixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed64(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\n// consumeSfixed64Slice wire decodes a []int64 pointer as a repeated Sfixed64.\nfunc consumeSfixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Int64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed64()\n\t\tif count > 0 {\n\t\t\tp.growInt64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, int64(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, int64(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderSfixed64Slice = pointerCoderFuncs{\n\tsize:      sizeSfixed64Slice,\n\tmarshal:   appendSfixed64Slice,\n\tunmarshal: consumeSfixed64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeSfixed64PackedSlice returns the size of wire encoding a []int64 pointer as a packed repeated Sfixed64.\nfunc sizeSfixed64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed64()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendSfixed64PackedSlice encodes a []int64 pointer as a packed repeated Sfixed64.\nfunc appendSfixed64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Int64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed64(b, uint64(v))\n\t}\n\treturn b, nil\n}\n\nvar coderSfixed64PackedSlice = pointerCoderFuncs{\n\tsize:      sizeSfixed64PackedSlice,\n\tmarshal:   appendSfixed64PackedSlice,\n\tunmarshal: consumeSfixed64Slice,\n\tmerge:     mergeInt64Slice,\n}\n\n// sizeSfixed64Value returns the size of wire encoding a int64 value as a Sfixed64.\nfunc sizeSfixed64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed64()\n}\n\n// appendSfixed64Value encodes a int64 value as a Sfixed64.\nfunc appendSfixed64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed64(b, uint64(v.Int()))\n\treturn b, nil\n}\n\n// consumeSfixed64Value decodes a int64 value as a Sfixed64.\nfunc consumeSfixed64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfInt64(int64(v)), out, nil\n}\n\nvar coderSfixed64Value = valueCoderFuncs{\n\tsize:      sizeSfixed64Value,\n\tmarshal:   appendSfixed64Value,\n\tunmarshal: consumeSfixed64Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeSfixed64SliceValue returns the size of wire encoding a []int64 value as a repeated Sfixed64.\nfunc sizeSfixed64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendSfixed64SliceValue encodes a []int64 value as a repeated Sfixed64.\nfunc appendSfixed64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed64(b, uint64(v.Int()))\n\t}\n\treturn b, nil\n}\n\n// consumeSfixed64SliceValue wire decodes a []int64 value as a repeated Sfixed64.\nfunc consumeSfixed64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderSfixed64SliceValue = valueCoderFuncs{\n\tsize:      sizeSfixed64SliceValue,\n\tmarshal:   appendSfixed64SliceValue,\n\tunmarshal: consumeSfixed64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeSfixed64PackedSliceValue returns the size of wire encoding a []int64 value as a packed repeated Sfixed64.\nfunc sizeSfixed64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed64()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendSfixed64PackedSliceValue encodes a []int64 value as a packed repeated Sfixed64.\nfunc appendSfixed64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed64(b, uint64(v.Int()))\n\t}\n\treturn b, nil\n}\n\nvar coderSfixed64PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeSfixed64PackedSliceValue,\n\tmarshal:   appendSfixed64PackedSliceValue,\n\tunmarshal: consumeSfixed64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFixed64 returns the size of wire encoding a uint64 pointer as a Fixed64.\nfunc sizeFixed64(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendFixed64 wire encodes a uint64 pointer as a Fixed64.\nfunc appendFixed64(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, v)\n\treturn b, nil\n}\n\n// consumeFixed64 wire decodes a uint64 pointer as a Fixed64.\nfunc consumeFixed64(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Uint64() = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed64 = pointerCoderFuncs{\n\tsize:      sizeFixed64,\n\tmarshal:   appendFixed64,\n\tunmarshal: consumeFixed64,\n\tmerge:     mergeUint64,\n}\n\n// sizeFixed64NoZero returns the size of wire encoding a uint64 pointer as a Fixed64.\n// The zero value is not encoded.\nfunc sizeFixed64NoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Uint64()\n\tif v == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendFixed64NoZero wire encodes a uint64 pointer as a Fixed64.\n// The zero value is not encoded.\nfunc appendFixed64NoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Uint64()\n\tif v == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, v)\n\treturn b, nil\n}\n\nvar coderFixed64NoZero = pointerCoderFuncs{\n\tsize:      sizeFixed64NoZero,\n\tmarshal:   appendFixed64NoZero,\n\tunmarshal: consumeFixed64,\n\tmerge:     mergeUint64NoZero,\n}\n\n// sizeFixed64Ptr returns the size of wire encoding a *uint64 pointer as a Fixed64.\n// It panics if the pointer is nil.\nfunc sizeFixed64Ptr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendFixed64Ptr wire encodes a *uint64 pointer as a Fixed64.\n// It panics if the pointer is nil.\nfunc appendFixed64Ptr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Uint64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, v)\n\treturn b, nil\n}\n\n// consumeFixed64Ptr wire decodes a *uint64 pointer as a Fixed64.\nfunc consumeFixed64Ptr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Uint64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(uint64)\n\t}\n\t**vp = v\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed64Ptr = pointerCoderFuncs{\n\tsize:      sizeFixed64Ptr,\n\tmarshal:   appendFixed64Ptr,\n\tunmarshal: consumeFixed64Ptr,\n\tmerge:     mergeUint64Ptr,\n}\n\n// sizeFixed64Slice returns the size of wire encoding a []uint64 pointer as a repeated Fixed64.\nfunc sizeFixed64Slice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint64Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendFixed64Slice encodes a []uint64 pointer as a repeated Fixed64.\nfunc appendFixed64Slice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed64(b, v)\n\t}\n\treturn b, nil\n}\n\n// consumeFixed64Slice wire decodes a []uint64 pointer as a repeated Fixed64.\nfunc consumeFixed64Slice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Uint64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed64()\n\t\tif count > 0 {\n\t\t\tp.growUint64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, v)\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderFixed64Slice = pointerCoderFuncs{\n\tsize:      sizeFixed64Slice,\n\tmarshal:   appendFixed64Slice,\n\tunmarshal: consumeFixed64Slice,\n\tmerge:     mergeUint64Slice,\n}\n\n// sizeFixed64PackedSlice returns the size of wire encoding a []uint64 pointer as a packed repeated Fixed64.\nfunc sizeFixed64PackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Uint64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed64()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendFixed64PackedSlice encodes a []uint64 pointer as a packed repeated Fixed64.\nfunc appendFixed64PackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Uint64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed64(b, v)\n\t}\n\treturn b, nil\n}\n\nvar coderFixed64PackedSlice = pointerCoderFuncs{\n\tsize:      sizeFixed64PackedSlice,\n\tmarshal:   appendFixed64PackedSlice,\n\tunmarshal: consumeFixed64Slice,\n\tmerge:     mergeUint64Slice,\n}\n\n// sizeFixed64Value returns the size of wire encoding a uint64 value as a Fixed64.\nfunc sizeFixed64Value(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed64()\n}\n\n// appendFixed64Value encodes a uint64 value as a Fixed64.\nfunc appendFixed64Value(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed64(b, v.Uint())\n\treturn b, nil\n}\n\n// consumeFixed64Value decodes a uint64 value as a Fixed64.\nfunc consumeFixed64Value(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfUint64(v), out, nil\n}\n\nvar coderFixed64Value = valueCoderFuncs{\n\tsize:      sizeFixed64Value,\n\tmarshal:   appendFixed64Value,\n\tunmarshal: consumeFixed64Value,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeFixed64SliceValue returns the size of wire encoding a []uint64 value as a repeated Fixed64.\nfunc sizeFixed64SliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendFixed64SliceValue encodes a []uint64 value as a repeated Fixed64.\nfunc appendFixed64SliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed64(b, v.Uint())\n\t}\n\treturn b, nil\n}\n\n// consumeFixed64SliceValue wire decodes a []uint64 value as a repeated Fixed64.\nfunc consumeFixed64SliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfUint64(v))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderFixed64SliceValue = valueCoderFuncs{\n\tsize:      sizeFixed64SliceValue,\n\tmarshal:   appendFixed64SliceValue,\n\tunmarshal: consumeFixed64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeFixed64PackedSliceValue returns the size of wire encoding a []uint64 value as a packed repeated Fixed64.\nfunc sizeFixed64PackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed64()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendFixed64PackedSliceValue encodes a []uint64 value as a packed repeated Fixed64.\nfunc appendFixed64PackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed64(b, v.Uint())\n\t}\n\treturn b, nil\n}\n\nvar coderFixed64PackedSliceValue = valueCoderFuncs{\n\tsize:      sizeFixed64PackedSliceValue,\n\tmarshal:   appendFixed64PackedSliceValue,\n\tunmarshal: consumeFixed64SliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeDouble returns the size of wire encoding a float64 pointer as a Double.\nfunc sizeDouble(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendDouble wire encodes a float64 pointer as a Double.\nfunc appendDouble(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Float64()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, math.Float64bits(v))\n\treturn b, nil\n}\n\n// consumeDouble wire decodes a float64 pointer as a Double.\nfunc consumeDouble(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Float64() = math.Float64frombits(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderDouble = pointerCoderFuncs{\n\tsize:      sizeDouble,\n\tmarshal:   appendDouble,\n\tunmarshal: consumeDouble,\n\tmerge:     mergeFloat64,\n}\n\n// sizeDoubleNoZero returns the size of wire encoding a float64 pointer as a Double.\n// The zero value is not encoded.\nfunc sizeDoubleNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Float64()\n\tif v == 0 && !math.Signbit(float64(v)) {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendDoubleNoZero wire encodes a float64 pointer as a Double.\n// The zero value is not encoded.\nfunc appendDoubleNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Float64()\n\tif v == 0 && !math.Signbit(float64(v)) {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, math.Float64bits(v))\n\treturn b, nil\n}\n\nvar coderDoubleNoZero = pointerCoderFuncs{\n\tsize:      sizeDoubleNoZero,\n\tmarshal:   appendDoubleNoZero,\n\tunmarshal: consumeDouble,\n\tmerge:     mergeFloat64NoZero,\n}\n\n// sizeDoublePtr returns the size of wire encoding a *float64 pointer as a Double.\n// It panics if the pointer is nil.\nfunc sizeDoublePtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\treturn f.tagsize + protowire.SizeFixed64()\n}\n\n// appendDoublePtr wire encodes a *float64 pointer as a Double.\n// It panics if the pointer is nil.\nfunc appendDoublePtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.Float64Ptr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendFixed64(b, math.Float64bits(v))\n\treturn b, nil\n}\n\n// consumeDoublePtr wire decodes a *float64 pointer as a Double.\nfunc consumeDoublePtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.Float64Ptr()\n\tif *vp == nil {\n\t\t*vp = new(float64)\n\t}\n\t**vp = math.Float64frombits(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderDoublePtr = pointerCoderFuncs{\n\tsize:      sizeDoublePtr,\n\tmarshal:   appendDoublePtr,\n\tunmarshal: consumeDoublePtr,\n\tmerge:     mergeFloat64Ptr,\n}\n\n// sizeDoubleSlice returns the size of wire encoding a []float64 pointer as a repeated Double.\nfunc sizeDoubleSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Float64Slice()\n\tsize = len(s) * (f.tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendDoubleSlice encodes a []float64 pointer as a repeated Double.\nfunc appendDoubleSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Float64Slice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendFixed64(b, math.Float64bits(v))\n\t}\n\treturn b, nil\n}\n\n// consumeDoubleSlice wire decodes a []float64 pointer as a repeated Double.\nfunc consumeDoubleSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.Float64Slice()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tcount := len(b) / protowire.SizeFixed64()\n\t\tif count > 0 {\n\t\t\tp.growFloat64Slice(count)\n\t\t}\n\t\ts := *sp\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\ts = append(s, math.Float64frombits(v))\n\t\t\tb = b[n:]\n\t\t}\n\t\t*sp = s\n\t\tout.n = n\n\t\treturn out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, math.Float64frombits(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderDoubleSlice = pointerCoderFuncs{\n\tsize:      sizeDoubleSlice,\n\tmarshal:   appendDoubleSlice,\n\tunmarshal: consumeDoubleSlice,\n\tmerge:     mergeFloat64Slice,\n}\n\n// sizeDoublePackedSlice returns the size of wire encoding a []float64 pointer as a packed repeated Double.\nfunc sizeDoublePackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.Float64Slice()\n\tif len(s) == 0 {\n\t\treturn 0\n\t}\n\tn := len(s) * protowire.SizeFixed64()\n\treturn f.tagsize + protowire.SizeBytes(n)\n}\n\n// appendDoublePackedSlice encodes a []float64 pointer as a packed repeated Double.\nfunc appendDoublePackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.Float64Slice()\n\tif len(s) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tn := len(s) * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor _, v := range s {\n\t\tb = protowire.AppendFixed64(b, math.Float64bits(v))\n\t}\n\treturn b, nil\n}\n\nvar coderDoublePackedSlice = pointerCoderFuncs{\n\tsize:      sizeDoublePackedSlice,\n\tmarshal:   appendDoublePackedSlice,\n\tunmarshal: consumeDoubleSlice,\n\tmerge:     mergeFloat64Slice,\n}\n\n// sizeDoubleValue returns the size of wire encoding a float64 value as a Double.\nfunc sizeDoubleValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeFixed64()\n}\n\n// appendDoubleValue encodes a float64 value as a Double.\nfunc appendDoubleValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendFixed64(b, math.Float64bits(v.Float()))\n\treturn b, nil\n}\n\n// consumeDoubleValue decodes a float64 value as a Double.\nfunc consumeDoubleValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfFloat64(math.Float64frombits(v)), out, nil\n}\n\nvar coderDoubleValue = valueCoderFuncs{\n\tsize:      sizeDoubleValue,\n\tmarshal:   appendDoubleValue,\n\tunmarshal: consumeDoubleValue,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeDoubleSliceValue returns the size of wire encoding a []float64 value as a repeated Double.\nfunc sizeDoubleSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tsize = list.Len() * (tagsize + protowire.SizeFixed64())\n\treturn size\n}\n\n// appendDoubleSliceValue encodes a []float64 value as a repeated Double.\nfunc appendDoubleSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendFixed64(b, math.Float64bits(v.Float()))\n\t}\n\treturn b, nil\n}\n\n// consumeDoubleSliceValue wire decodes a []float64 value as a repeated Double.\nfunc consumeDoubleSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp == protowire.BytesType {\n\t\tb, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t}\n\t\tfor len(b) > 0 {\n\t\t\tv, n := protowire.ConsumeFixed64(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn protoreflect.Value{}, out, errDecode\n\t\t\t}\n\t\t\tlist.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v)))\n\t\t\tb = b[n:]\n\t\t}\n\t\tout.n = n\n\t\treturn listv, out, nil\n\t}\n\tif wtyp != protowire.Fixed64Type {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeFixed64(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderDoubleSliceValue = valueCoderFuncs{\n\tsize:      sizeDoubleSliceValue,\n\tmarshal:   appendDoubleSliceValue,\n\tunmarshal: consumeDoubleSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeDoublePackedSliceValue returns the size of wire encoding a []float64 value as a packed repeated Double.\nfunc sizeDoublePackedSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn 0\n\t}\n\tn := llen * protowire.SizeFixed64()\n\treturn tagsize + protowire.SizeBytes(n)\n}\n\n// appendDoublePackedSliceValue encodes a []float64 value as a packed repeated Double.\nfunc appendDoublePackedSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tllen := list.Len()\n\tif llen == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, wiretag)\n\tn := llen * protowire.SizeFixed64()\n\tb = protowire.AppendVarint(b, uint64(n))\n\tfor i := 0; i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendFixed64(b, math.Float64bits(v.Float()))\n\t}\n\treturn b, nil\n}\n\nvar coderDoublePackedSliceValue = valueCoderFuncs{\n\tsize:      sizeDoublePackedSliceValue,\n\tmarshal:   appendDoublePackedSliceValue,\n\tunmarshal: consumeDoubleSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeString returns the size of wire encoding a string pointer as a String.\nfunc sizeString(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.String()\n\treturn f.tagsize + protowire.SizeBytes(len(v))\n}\n\n// appendString wire encodes a string pointer as a String.\nfunc appendString(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.String()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\treturn b, nil\n}\n\n// consumeString wire decodes a string pointer as a String.\nfunc consumeString(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.String() = string(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderString = pointerCoderFuncs{\n\tsize:      sizeString,\n\tmarshal:   appendString,\n\tunmarshal: consumeString,\n\tmerge:     mergeString,\n}\n\n// appendStringValidateUTF8 wire encodes a string pointer as a String.\nfunc appendStringValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.String()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\tif !utf8.ValidString(v) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\n// consumeStringValidateUTF8 wire decodes a string pointer as a String.\nfunc consumeStringValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\t*p.String() = string(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderStringValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeString,\n\tmarshal:   appendStringValidateUTF8,\n\tunmarshal: consumeStringValidateUTF8,\n\tmerge:     mergeString,\n}\n\n// sizeStringNoZero returns the size of wire encoding a string pointer as a String.\n// The zero value is not encoded.\nfunc sizeStringNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.String()\n\tif len(v) == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeBytes(len(v))\n}\n\n// appendStringNoZero wire encodes a string pointer as a String.\n// The zero value is not encoded.\nfunc appendStringNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.String()\n\tif len(v) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\treturn b, nil\n}\n\nvar coderStringNoZero = pointerCoderFuncs{\n\tsize:      sizeStringNoZero,\n\tmarshal:   appendStringNoZero,\n\tunmarshal: consumeString,\n\tmerge:     mergeStringNoZero,\n}\n\n// appendStringNoZeroValidateUTF8 wire encodes a string pointer as a String.\n// The zero value is not encoded.\nfunc appendStringNoZeroValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.String()\n\tif len(v) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\tif !utf8.ValidString(v) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\nvar coderStringNoZeroValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeStringNoZero,\n\tmarshal:   appendStringNoZeroValidateUTF8,\n\tunmarshal: consumeStringValidateUTF8,\n\tmerge:     mergeStringNoZero,\n}\n\n// sizeStringPtr returns the size of wire encoding a *string pointer as a String.\n// It panics if the pointer is nil.\nfunc sizeStringPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := **p.StringPtr()\n\treturn f.tagsize + protowire.SizeBytes(len(v))\n}\n\n// appendStringPtr wire encodes a *string pointer as a String.\n// It panics if the pointer is nil.\nfunc appendStringPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.StringPtr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\treturn b, nil\n}\n\n// consumeStringPtr wire decodes a *string pointer as a String.\nfunc consumeStringPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvp := p.StringPtr()\n\tif *vp == nil {\n\t\t*vp = new(string)\n\t}\n\t**vp = string(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderStringPtr = pointerCoderFuncs{\n\tsize:      sizeStringPtr,\n\tmarshal:   appendStringPtr,\n\tunmarshal: consumeStringPtr,\n\tmerge:     mergeStringPtr,\n}\n\n// appendStringPtrValidateUTF8 wire encodes a *string pointer as a String.\n// It panics if the pointer is nil.\nfunc appendStringPtrValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := **p.StringPtr()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendString(b, v)\n\tif !utf8.ValidString(v) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\n// consumeStringPtrValidateUTF8 wire decodes a *string pointer as a String.\nfunc consumeStringPtrValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\tvp := p.StringPtr()\n\tif *vp == nil {\n\t\t*vp = new(string)\n\t}\n\t**vp = string(v)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderStringPtrValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeStringPtr,\n\tmarshal:   appendStringPtrValidateUTF8,\n\tunmarshal: consumeStringPtrValidateUTF8,\n\tmerge:     mergeStringPtr,\n}\n\n// sizeStringSlice returns the size of wire encoding a []string pointer as a repeated String.\nfunc sizeStringSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.StringSlice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeBytes(len(v))\n\t}\n\treturn size\n}\n\n// appendStringSlice encodes a []string pointer as a repeated String.\nfunc appendStringSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.StringSlice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendString(b, v)\n\t}\n\treturn b, nil\n}\n\n// consumeStringSlice wire decodes a []string pointer as a repeated String.\nfunc consumeStringSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.StringSlice()\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, string(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderStringSlice = pointerCoderFuncs{\n\tsize:      sizeStringSlice,\n\tmarshal:   appendStringSlice,\n\tunmarshal: consumeStringSlice,\n\tmerge:     mergeStringSlice,\n}\n\n// appendStringSliceValidateUTF8 encodes a []string pointer as a repeated String.\nfunc appendStringSliceValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.StringSlice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendString(b, v)\n\t\tif !utf8.ValidString(v) {\n\t\t\treturn b, errInvalidUTF8{}\n\t\t}\n\t}\n\treturn b, nil\n}\n\n// consumeStringSliceValidateUTF8 wire decodes a []string pointer as a repeated String.\nfunc consumeStringSliceValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\tsp := p.StringSlice()\n\t*sp = append(*sp, string(v))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderStringSliceValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeStringSlice,\n\tmarshal:   appendStringSliceValidateUTF8,\n\tunmarshal: consumeStringSliceValidateUTF8,\n\tmerge:     mergeStringSlice,\n}\n\n// sizeStringValue returns the size of wire encoding a string value as a String.\nfunc sizeStringValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeBytes(len(v.String()))\n}\n\n// appendStringValue encodes a string value as a String.\nfunc appendStringValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendString(b, v.String())\n\treturn b, nil\n}\n\n// consumeStringValue decodes a string value as a String.\nfunc consumeStringValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfString(string(v)), out, nil\n}\n\nvar coderStringValue = valueCoderFuncs{\n\tsize:      sizeStringValue,\n\tmarshal:   appendStringValue,\n\tunmarshal: consumeStringValue,\n\tmerge:     mergeScalarValue,\n}\n\n// appendStringValueValidateUTF8 encodes a string value as a String.\nfunc appendStringValueValidateUTF8(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendString(b, v.String())\n\tif !utf8.ValidString(v.String()) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\n// consumeStringValueValidateUTF8 decodes a string value as a String.\nfunc consumeStringValueValidateUTF8(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn protoreflect.Value{}, out, errInvalidUTF8{}\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfString(string(v)), out, nil\n}\n\nvar coderStringValueValidateUTF8 = valueCoderFuncs{\n\tsize:      sizeStringValue,\n\tmarshal:   appendStringValueValidateUTF8,\n\tunmarshal: consumeStringValueValidateUTF8,\n\tmerge:     mergeScalarValue,\n}\n\n// sizeStringSliceValue returns the size of wire encoding a []string value as a repeated String.\nfunc sizeStringSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeBytes(len(v.String()))\n\t}\n\treturn size\n}\n\n// appendStringSliceValue encodes a []string value as a repeated String.\nfunc appendStringSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendString(b, v.String())\n\t}\n\treturn b, nil\n}\n\n// consumeStringSliceValue wire decodes a []string value as a repeated String.\nfunc consumeStringSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfString(string(v)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderStringSliceValue = valueCoderFuncs{\n\tsize:      sizeStringSliceValue,\n\tmarshal:   appendStringSliceValue,\n\tunmarshal: consumeStringSliceValue,\n\tmerge:     mergeListValue,\n}\n\n// sizeBytes returns the size of wire encoding a []byte pointer as a Bytes.\nfunc sizeBytes(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Bytes()\n\treturn f.tagsize + protowire.SizeBytes(len(v))\n}\n\n// appendBytes wire encodes a []byte pointer as a Bytes.\nfunc appendBytes(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bytes()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendBytes(b, v)\n\treturn b, nil\n}\n\n// consumeBytes wire decodes a []byte pointer as a Bytes.\nfunc consumeBytes(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Bytes() = append(emptyBuf[:], v...)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytes = pointerCoderFuncs{\n\tsize:      sizeBytes,\n\tmarshal:   appendBytes,\n\tunmarshal: consumeBytes,\n\tmerge:     mergeBytes,\n}\n\n// appendBytesValidateUTF8 wire encodes a []byte pointer as a Bytes.\nfunc appendBytesValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bytes()\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendBytes(b, v)\n\tif !utf8.Valid(v) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\n// consumeBytesValidateUTF8 wire decodes a []byte pointer as a Bytes.\nfunc consumeBytesValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\t*p.Bytes() = append(emptyBuf[:], v...)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytesValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeBytes,\n\tmarshal:   appendBytesValidateUTF8,\n\tunmarshal: consumeBytesValidateUTF8,\n\tmerge:     mergeBytes,\n}\n\n// sizeBytesNoZero returns the size of wire encoding a []byte pointer as a Bytes.\n// The zero value is not encoded.\nfunc sizeBytesNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\tv := *p.Bytes()\n\tif len(v) == 0 {\n\t\treturn 0\n\t}\n\treturn f.tagsize + protowire.SizeBytes(len(v))\n}\n\n// appendBytesNoZero wire encodes a []byte pointer as a Bytes.\n// The zero value is not encoded.\nfunc appendBytesNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bytes()\n\tif len(v) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendBytes(b, v)\n\treturn b, nil\n}\n\n// consumeBytesNoZero wire decodes a []byte pointer as a Bytes.\n// The zero value is not decoded.\nfunc consumeBytesNoZero(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*p.Bytes() = append(([]byte)(nil), v...)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytesNoZero = pointerCoderFuncs{\n\tsize:      sizeBytesNoZero,\n\tmarshal:   appendBytesNoZero,\n\tunmarshal: consumeBytesNoZero,\n\tmerge:     mergeBytesNoZero,\n}\n\n// appendBytesNoZeroValidateUTF8 wire encodes a []byte pointer as a Bytes.\n// The zero value is not encoded.\nfunc appendBytesNoZeroValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tv := *p.Bytes()\n\tif len(v) == 0 {\n\t\treturn b, nil\n\t}\n\tb = protowire.AppendVarint(b, f.wiretag)\n\tb = protowire.AppendBytes(b, v)\n\tif !utf8.Valid(v) {\n\t\treturn b, errInvalidUTF8{}\n\t}\n\treturn b, nil\n}\n\n// consumeBytesNoZeroValidateUTF8 wire decodes a []byte pointer as a Bytes.\nfunc consumeBytesNoZeroValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\t*p.Bytes() = append(([]byte)(nil), v...)\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytesNoZeroValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeBytesNoZero,\n\tmarshal:   appendBytesNoZeroValidateUTF8,\n\tunmarshal: consumeBytesNoZeroValidateUTF8,\n\tmerge:     mergeBytesNoZero,\n}\n\n// sizeBytesSlice returns the size of wire encoding a [][]byte pointer as a repeated Bytes.\nfunc sizeBytesSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {\n\ts := *p.BytesSlice()\n\tfor _, v := range s {\n\t\tsize += f.tagsize + protowire.SizeBytes(len(v))\n\t}\n\treturn size\n}\n\n// appendBytesSlice encodes a [][]byte pointer as a repeated Bytes.\nfunc appendBytesSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.BytesSlice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendBytes(b, v)\n\t}\n\treturn b, nil\n}\n\n// consumeBytesSlice wire decodes a [][]byte pointer as a repeated Bytes.\nfunc consumeBytesSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tsp := p.BytesSlice()\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\t*sp = append(*sp, append(emptyBuf[:], v...))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytesSlice = pointerCoderFuncs{\n\tsize:      sizeBytesSlice,\n\tmarshal:   appendBytesSlice,\n\tunmarshal: consumeBytesSlice,\n\tmerge:     mergeBytesSlice,\n}\n\n// appendBytesSliceValidateUTF8 encodes a [][]byte pointer as a repeated Bytes.\nfunc appendBytesSliceValidateUTF8(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\ts := *p.BytesSlice()\n\tfor _, v := range s {\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb = protowire.AppendBytes(b, v)\n\t\tif !utf8.Valid(v) {\n\t\t\treturn b, errInvalidUTF8{}\n\t\t}\n\t}\n\treturn b, nil\n}\n\n// consumeBytesSliceValidateUTF8 wire decodes a [][]byte pointer as a repeated Bytes.\nfunc consumeBytesSliceValidateUTF8(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tif !utf8.Valid(v) {\n\t\treturn out, errInvalidUTF8{}\n\t}\n\tsp := p.BytesSlice()\n\t*sp = append(*sp, append(emptyBuf[:], v...))\n\tout.n = n\n\treturn out, nil\n}\n\nvar coderBytesSliceValidateUTF8 = pointerCoderFuncs{\n\tsize:      sizeBytesSlice,\n\tmarshal:   appendBytesSliceValidateUTF8,\n\tunmarshal: consumeBytesSliceValidateUTF8,\n\tmerge:     mergeBytesSlice,\n}\n\n// sizeBytesValue returns the size of wire encoding a []byte value as a Bytes.\nfunc sizeBytesValue(v protoreflect.Value, tagsize int, opts marshalOptions) int {\n\treturn tagsize + protowire.SizeBytes(len(v.Bytes()))\n}\n\n// appendBytesValue encodes a []byte value as a Bytes.\nfunc appendBytesValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tb = protowire.AppendVarint(b, wiretag)\n\tb = protowire.AppendBytes(b, v.Bytes())\n\treturn b, nil\n}\n\n// consumeBytesValue decodes a []byte value as a Bytes.\nfunc consumeBytesValue(b []byte, _ protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tout.n = n\n\treturn protoreflect.ValueOfBytes(append(emptyBuf[:], v...)), out, nil\n}\n\nvar coderBytesValue = valueCoderFuncs{\n\tsize:      sizeBytesValue,\n\tmarshal:   appendBytesValue,\n\tunmarshal: consumeBytesValue,\n\tmerge:     mergeBytesValue,\n}\n\n// sizeBytesSliceValue returns the size of wire encoding a [][]byte value as a repeated Bytes.\nfunc sizeBytesSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) (size int) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tsize += tagsize + protowire.SizeBytes(len(v.Bytes()))\n\t}\n\treturn size\n}\n\n// appendBytesSliceValue encodes a [][]byte value as a repeated Bytes.\nfunc appendBytesSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) {\n\tlist := listv.List()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tv := list.Get(i)\n\t\tb = protowire.AppendVarint(b, wiretag)\n\t\tb = protowire.AppendBytes(b, v.Bytes())\n\t}\n\treturn b, nil\n}\n\n// consumeBytesSliceValue wire decodes a [][]byte value as a repeated Bytes.\nfunc consumeBytesSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) {\n\tlist := listv.List()\n\tif wtyp != protowire.BytesType {\n\t\treturn protoreflect.Value{}, out, errUnknown\n\t}\n\tv, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn protoreflect.Value{}, out, errDecode\n\t}\n\tlist.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], v...)))\n\tout.n = n\n\treturn listv, out, nil\n}\n\nvar coderBytesSliceValue = valueCoderFuncs{\n\tsize:      sizeBytesSliceValue,\n\tmarshal:   appendBytesSliceValue,\n\tunmarshal: consumeBytesSliceValue,\n\tmerge:     mergeBytesListValue,\n}\n\n// We append to an empty array rather than a nil []byte to get non-nil zero-length byte slices.\nvar emptyBuf [0]byte\n\nvar wireTypes = map[protoreflect.Kind]protowire.Type{\n\tprotoreflect.BoolKind:     protowire.VarintType,\n\tprotoreflect.EnumKind:     protowire.VarintType,\n\tprotoreflect.Int32Kind:    protowire.VarintType,\n\tprotoreflect.Sint32Kind:   protowire.VarintType,\n\tprotoreflect.Uint32Kind:   protowire.VarintType,\n\tprotoreflect.Int64Kind:    protowire.VarintType,\n\tprotoreflect.Sint64Kind:   protowire.VarintType,\n\tprotoreflect.Uint64Kind:   protowire.VarintType,\n\tprotoreflect.Sfixed32Kind: protowire.Fixed32Type,\n\tprotoreflect.Fixed32Kind:  protowire.Fixed32Type,\n\tprotoreflect.FloatKind:    protowire.Fixed32Type,\n\tprotoreflect.Sfixed64Kind: protowire.Fixed64Type,\n\tprotoreflect.Fixed64Kind:  protowire.Fixed64Type,\n\tprotoreflect.DoubleKind:   protowire.Fixed64Type,\n\tprotoreflect.StringKind:   protowire.BytesType,\n\tprotoreflect.BytesKind:    protowire.BytesType,\n\tprotoreflect.MessageKind:  protowire.BytesType,\n\tprotoreflect.GroupKind:    protowire.StartGroupType,\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_map.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\t\"sort\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype mapInfo struct {\n\tgoType     reflect.Type\n\tkeyWiretag uint64\n\tvalWiretag uint64\n\tkeyFuncs   valueCoderFuncs\n\tvalFuncs   valueCoderFuncs\n\tkeyZero    protoreflect.Value\n\tkeyKind    protoreflect.Kind\n\tconv       *mapConverter\n}\n\nfunc encoderFuncsForMap(fd protoreflect.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) {\n\t// TODO: Consider generating specialized map coders.\n\tkeyField := fd.MapKey()\n\tvalField := fd.MapValue()\n\tkeyWiretag := protowire.EncodeTag(1, wireTypes[keyField.Kind()])\n\tvalWiretag := protowire.EncodeTag(2, wireTypes[valField.Kind()])\n\tkeyFuncs := encoderFuncsForValue(keyField)\n\tvalFuncs := encoderFuncsForValue(valField)\n\tconv := newMapConverter(ft, fd)\n\n\tmapi := &mapInfo{\n\t\tgoType:     ft,\n\t\tkeyWiretag: keyWiretag,\n\t\tvalWiretag: valWiretag,\n\t\tkeyFuncs:   keyFuncs,\n\t\tvalFuncs:   valFuncs,\n\t\tkeyZero:    keyField.Default(),\n\t\tkeyKind:    keyField.Kind(),\n\t\tconv:       conv,\n\t}\n\tif valField.Kind() == protoreflect.MessageKind {\n\t\tvalueMessage = getMessageInfo(ft.Elem())\n\t}\n\n\tfuncs = pointerCoderFuncs{\n\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\treturn sizeMap(p.AsValueOf(ft).Elem(), mapi, f, opts)\n\t\t},\n\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\treturn appendMap(b, p.AsValueOf(ft).Elem(), mapi, f, opts)\n\t\t},\n\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\tmp := p.AsValueOf(ft)\n\t\t\tif mp.Elem().IsNil() {\n\t\t\t\tmp.Elem().Set(reflect.MakeMap(mapi.goType))\n\t\t\t}\n\t\t\tif f.mi == nil {\n\t\t\t\treturn consumeMap(b, mp.Elem(), wtyp, mapi, f, opts)\n\t\t\t} else {\n\t\t\t\treturn consumeMapOfMessage(b, mp.Elem(), wtyp, mapi, f, opts)\n\t\t\t}\n\t\t},\n\t}\n\tswitch valField.Kind() {\n\tcase protoreflect.MessageKind:\n\t\tfuncs.merge = mergeMapOfMessage\n\tcase protoreflect.BytesKind:\n\t\tfuncs.merge = mergeMapOfBytes\n\tdefault:\n\t\tfuncs.merge = mergeMap\n\t}\n\tif valFuncs.isInit != nil {\n\t\tfuncs.isInit = func(p pointer, f *coderFieldInfo) error {\n\t\t\treturn isInitMap(p.AsValueOf(ft).Elem(), mapi, f)\n\t\t}\n\t}\n\treturn valueMessage, funcs\n}\n\nconst (\n\tmapKeyTagSize = 1 // field 1, tag size 1.\n\tmapValTagSize = 1 // field 2, tag size 2.\n)\n\nfunc sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) int {\n\tif mapv.Len() == 0 {\n\t\treturn 0\n\t}\n\tn := 0\n\titer := mapv.MapRange()\n\tfor iter.Next() {\n\t\tkey := mapi.conv.keyConv.PBValueOf(iter.Key()).MapKey()\n\t\tkeySize := mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts)\n\t\tvar valSize int\n\t\tvalue := mapi.conv.valConv.PBValueOf(iter.Value())\n\t\tif f.mi == nil {\n\t\t\tvalSize = mapi.valFuncs.size(value, mapValTagSize, opts)\n\t\t} else {\n\t\t\tp := pointerOfValue(iter.Value())\n\t\t\tvalSize += mapValTagSize\n\t\t\tvalSize += protowire.SizeBytes(f.mi.sizePointer(p, opts))\n\t\t}\n\t\tn += f.tagsize + protowire.SizeBytes(keySize+valSize)\n\t}\n\treturn n\n}\n\nfunc consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif opts.depth--; opts.depth < 0 {\n\t\treturn out, errRecursionDepth\n\t}\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tb, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvar (\n\t\tkey = mapi.keyZero\n\t\tval = mapi.conv.valConv.New()\n\t)\n\tfor len(b) > 0 {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tif num > protowire.MaxValidNumber {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tb = b[n:]\n\t\terr := errUnknown\n\t\tswitch num {\n\t\tcase genid.MapEntry_Key_field_number:\n\t\t\tvar v protoreflect.Value\n\t\t\tvar o unmarshalOutput\n\t\t\tv, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tkey = v\n\t\t\tn = o.n\n\t\tcase genid.MapEntry_Value_field_number:\n\t\t\tvar v protoreflect.Value\n\t\t\tvar o unmarshalOutput\n\t\t\tv, o, err = mapi.valFuncs.unmarshal(b, val, num, wtyp, opts)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tval = v\n\t\t\tn = o.n\n\t\t}\n\t\tif err == errUnknown {\n\t\t\tn = protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\treturn out, err\n\t\t}\n\t\tb = b[n:]\n\t}\n\tmapv.SetMapIndex(mapi.conv.keyConv.GoValueOf(key), mapi.conv.valConv.GoValueOf(val))\n\tout.n = n\n\treturn out, nil\n}\n\nfunc consumeMapOfMessage(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif opts.depth--; opts.depth < 0 {\n\t\treturn out, errRecursionDepth\n\t}\n\tif wtyp != protowire.BytesType {\n\t\treturn out, errUnknown\n\t}\n\tb, n := protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn out, errDecode\n\t}\n\tvar (\n\t\tkey = mapi.keyZero\n\t\tval = reflect.New(f.mi.GoReflectType.Elem())\n\t)\n\tfor len(b) > 0 {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tif num > protowire.MaxValidNumber {\n\t\t\treturn out, errDecode\n\t\t}\n\t\tb = b[n:]\n\t\terr := errUnknown\n\t\tswitch num {\n\t\tcase 1:\n\t\t\tvar v protoreflect.Value\n\t\t\tvar o unmarshalOutput\n\t\t\tv, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tkey = v\n\t\t\tn = o.n\n\t\tcase 2:\n\t\t\tif wtyp != protowire.BytesType {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvar v []byte\n\t\t\tv, n = protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tvar o unmarshalOutput\n\t\t\to, err = f.mi.unmarshalPointer(v, pointerOfValue(val), 0, opts)\n\t\t\tif o.initialized {\n\t\t\t\t// Consider this map item initialized so long as we see\n\t\t\t\t// an initialized value.\n\t\t\t\tout.initialized = true\n\t\t\t}\n\t\t}\n\t\tif err == errUnknown {\n\t\t\tn = protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\treturn out, err\n\t\t}\n\t\tb = b[n:]\n\t}\n\tmapv.SetMapIndex(mapi.conv.keyConv.GoValueOf(key), val)\n\tout.n = n\n\treturn out, nil\n}\n\nfunc appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tif f.mi == nil {\n\t\tkey := mapi.conv.keyConv.PBValueOf(keyrv).MapKey()\n\t\tval := mapi.conv.valConv.PBValueOf(valrv)\n\t\tsize := 0\n\t\tsize += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts)\n\t\tsize += mapi.valFuncs.size(val, mapValTagSize, opts)\n\t\tb = protowire.AppendVarint(b, uint64(size))\n\t\tbefore := len(b)\n\t\tb, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tb, err = mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts)\n\t\tif measuredSize := len(b) - before; size != measuredSize && err == nil {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(size, measuredSize)\n\t\t}\n\t\treturn b, err\n\t} else {\n\t\tkey := mapi.conv.keyConv.PBValueOf(keyrv).MapKey()\n\t\tval := pointerOfValue(valrv)\n\t\tvalSize := f.mi.sizePointer(val, opts)\n\t\tsize := 0\n\t\tsize += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts)\n\t\tsize += mapValTagSize + protowire.SizeBytes(valSize)\n\t\tb = protowire.AppendVarint(b, uint64(size))\n\t\tb, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, mapi.valWiretag)\n\t\tb = protowire.AppendVarint(b, uint64(valSize))\n\t\tbefore := len(b)\n\t\tb, err = f.mi.marshalAppendPointer(b, val, opts)\n\t\tif measuredSize := len(b) - before; valSize != measuredSize && err == nil {\n\t\t\treturn nil, errors.MismatchedSizeCalculation(valSize, measuredSize)\n\t\t}\n\t\treturn b, err\n\t}\n}\n\nfunc appendMap(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tif mapv.Len() == 0 {\n\t\treturn b, nil\n\t}\n\tif opts.Deterministic() {\n\t\treturn appendMapDeterministic(b, mapv, mapi, f, opts)\n\t}\n\titer := mapv.MapRange()\n\tfor iter.Next() {\n\t\tvar err error\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb, err = appendMapItem(b, iter.Key(), iter.Value(), mapi, f, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc appendMapDeterministic(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\tkeys := mapv.MapKeys()\n\tsort.Slice(keys, func(i, j int) bool {\n\t\tswitch keys[i].Kind() {\n\t\tcase reflect.Bool:\n\t\t\treturn !keys[i].Bool() && keys[j].Bool()\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\treturn keys[i].Int() < keys[j].Int()\n\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\t\treturn keys[i].Uint() < keys[j].Uint()\n\t\tcase reflect.Float32, reflect.Float64:\n\t\t\treturn keys[i].Float() < keys[j].Float()\n\t\tcase reflect.String:\n\t\t\treturn keys[i].String() < keys[j].String()\n\t\tdefault:\n\t\t\tpanic(\"invalid kind: \" + keys[i].Kind().String())\n\t\t}\n\t})\n\tfor _, key := range keys {\n\t\tvar err error\n\t\tb = protowire.AppendVarint(b, f.wiretag)\n\t\tb, err = appendMapItem(b, key, mapv.MapIndex(key), mapi, f, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error {\n\tif mi := f.mi; mi != nil {\n\t\tmi.init()\n\t\tif !mi.needsInitCheck {\n\t\t\treturn nil\n\t\t}\n\t\titer := mapv.MapRange()\n\t\tfor iter.Next() {\n\t\t\tval := pointerOfValue(iter.Value())\n\t\t\tif err := mi.checkInitializedPointer(val); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else {\n\t\titer := mapv.MapRange()\n\t\tfor iter.Next() {\n\t\t\tval := mapi.conv.valConv.PBValueOf(iter.Value())\n\t\t\tif err := mapi.valFuncs.isInit(val); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc mergeMap(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tdstm := dst.AsValueOf(f.ft).Elem()\n\tsrcm := src.AsValueOf(f.ft).Elem()\n\tif srcm.Len() == 0 {\n\t\treturn\n\t}\n\tif dstm.IsNil() {\n\t\tdstm.Set(reflect.MakeMap(f.ft))\n\t}\n\titer := srcm.MapRange()\n\tfor iter.Next() {\n\t\tdstm.SetMapIndex(iter.Key(), iter.Value())\n\t}\n}\n\nfunc mergeMapOfBytes(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tdstm := dst.AsValueOf(f.ft).Elem()\n\tsrcm := src.AsValueOf(f.ft).Elem()\n\tif srcm.Len() == 0 {\n\t\treturn\n\t}\n\tif dstm.IsNil() {\n\t\tdstm.Set(reflect.MakeMap(f.ft))\n\t}\n\titer := srcm.MapRange()\n\tfor iter.Next() {\n\t\tdstm.SetMapIndex(iter.Key(), reflect.ValueOf(append(emptyBuf[:], iter.Value().Bytes()...)))\n\t}\n}\n\nfunc mergeMapOfMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tdstm := dst.AsValueOf(f.ft).Elem()\n\tsrcm := src.AsValueOf(f.ft).Elem()\n\tif srcm.Len() == 0 {\n\t\treturn\n\t}\n\tif dstm.IsNil() {\n\t\tdstm.Set(reflect.MakeMap(f.ft))\n\t}\n\titer := srcm.MapRange()\n\tfor iter.Next() {\n\t\tval := reflect.New(f.ft.Elem().Elem())\n\t\tif f.mi != nil {\n\t\t\tf.mi.mergePointer(pointerOfValue(val), pointerOfValue(iter.Value()), opts)\n\t\t} else {\n\t\t\topts.Merge(asMessage(val), asMessage(iter.Value()))\n\t\t}\n\t\tdstm.SetMapIndex(iter.Key(), val)\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_message.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"sort\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// coderMessageInfo contains per-message information used by the fast-path functions.\n// This is a different type from MessageInfo to keep MessageInfo as general-purpose as\n// possible.\ntype coderMessageInfo struct {\n\tmethods protoiface.Methods\n\n\torderedCoderFields []*coderFieldInfo\n\tdenseCoderFields   []*coderFieldInfo\n\tcoderFields        map[protowire.Number]*coderFieldInfo\n\tsizecacheOffset    offset\n\tunknownOffset      offset\n\tunknownPtrKind     bool\n\textensionOffset    offset\n\tneedsInitCheck     bool\n\tisMessageSet       bool\n\tnumRequiredFields  uint8\n\n\tlazyOffset     offset\n\tpresenceOffset offset\n\tpresenceSize   presenceSize\n}\n\ntype coderFieldInfo struct {\n\tfuncs      pointerCoderFuncs // fast-path per-field functions\n\tmi         *MessageInfo      // field's message\n\tft         reflect.Type\n\tvalidation validationInfo           // information used by message validation\n\tnum        protoreflect.FieldNumber // field number\n\toffset     offset                   // struct field offset\n\twiretag    uint64                   // field tag (number + wire type)\n\ttagsize    int                      // size of the varint-encoded tag\n\tisPointer  bool                     // true if IsNil may be called on the struct field\n\tisRequired bool                     // true if field is required\n\n\tisLazy        bool\n\tpresenceIndex uint32\n}\n\nconst noPresence = 0xffffffff\n\nfunc (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {\n\tmi.sizecacheOffset = invalidOffset\n\tmi.unknownOffset = invalidOffset\n\tmi.extensionOffset = invalidOffset\n\tmi.lazyOffset = invalidOffset\n\tmi.presenceOffset = si.presenceOffset\n\n\tif si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType {\n\t\tmi.sizecacheOffset = si.sizecacheOffset\n\t}\n\tif si.unknownOffset.IsValid() && (si.unknownType == unknownFieldsAType || si.unknownType == unknownFieldsBType) {\n\t\tmi.unknownOffset = si.unknownOffset\n\t\tmi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr\n\t}\n\tif si.extensionOffset.IsValid() && si.extensionType == extensionFieldsType {\n\t\tmi.extensionOffset = si.extensionOffset\n\t}\n\n\tmi.coderFields = make(map[protowire.Number]*coderFieldInfo)\n\tfields := mi.Desc.Fields()\n\tpreallocFields := make([]coderFieldInfo, fields.Len())\n\tfor i := 0; i < fields.Len(); i++ {\n\t\tfd := fields.Get(i)\n\n\t\tfs := si.fieldsByNumber[fd.Number()]\n\t\tisOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic()\n\t\tif isOneof {\n\t\t\tfs = si.oneofsByName[fd.ContainingOneof().Name()]\n\t\t}\n\t\tft := fs.Type\n\t\tvar wiretag uint64\n\t\tif !fd.IsPacked() {\n\t\t\twiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()])\n\t\t} else {\n\t\t\twiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType)\n\t\t}\n\t\tvar fieldOffset offset\n\t\tvar funcs pointerCoderFuncs\n\t\tvar childMessage *MessageInfo\n\t\tswitch {\n\t\tcase ft == nil:\n\t\t\t// This never occurs for generated message types.\n\t\t\t// It implies that a hand-crafted type has missing Go fields\n\t\t\t// for specific protobuf message fields.\n\t\t\tfuncs = pointerCoderFuncs{\n\t\t\t\tsize: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {\n\t\t\t\t\treturn 0\n\t\t\t\t},\n\t\t\t\tmarshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {\n\t\t\t\t\treturn nil, nil\n\t\t\t\t},\n\t\t\t\tunmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {\n\t\t\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t\t\t},\n\t\t\t\tisInit: func(p pointer, f *coderFieldInfo) error {\n\t\t\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t\t\t},\n\t\t\t\tmerge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\t\t\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t\t\t},\n\t\t\t}\n\t\tcase isOneof:\n\t\t\tfieldOffset = offsetOf(fs)\n\t\tdefault:\n\t\t\tfieldOffset = offsetOf(fs)\n\t\t\tchildMessage, funcs = fieldCoder(fd, ft)\n\t\t}\n\t\tcf := &preallocFields[i]\n\t\t*cf = coderFieldInfo{\n\t\t\tnum:        fd.Number(),\n\t\t\toffset:     fieldOffset,\n\t\t\twiretag:    wiretag,\n\t\t\tft:         ft,\n\t\t\ttagsize:    protowire.SizeVarint(wiretag),\n\t\t\tfuncs:      funcs,\n\t\t\tmi:         childMessage,\n\t\t\tvalidation: newFieldValidationInfo(mi, si, fd, ft),\n\t\t\tisPointer:  fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(),\n\t\t\tisRequired: fd.Cardinality() == protoreflect.Required,\n\n\t\t\tpresenceIndex: noPresence,\n\t\t}\n\t\tmi.orderedCoderFields = append(mi.orderedCoderFields, cf)\n\t\tmi.coderFields[cf.num] = cf\n\t}\n\tfor i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ {\n\t\tif od := oneofs.Get(i); !od.IsSynthetic() {\n\t\t\tmi.initOneofFieldCoders(od, si)\n\t\t}\n\t}\n\tif messageset.IsMessageSet(mi.Desc) {\n\t\tif !mi.extensionOffset.IsValid() {\n\t\t\tpanic(fmt.Sprintf(\"%v: MessageSet with no extensions field\", mi.Desc.FullName()))\n\t\t}\n\t\tif !mi.unknownOffset.IsValid() {\n\t\t\tpanic(fmt.Sprintf(\"%v: MessageSet with no unknown field\", mi.Desc.FullName()))\n\t\t}\n\t\tmi.isMessageSet = true\n\t}\n\tsort.Slice(mi.orderedCoderFields, func(i, j int) bool {\n\t\treturn mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num\n\t})\n\n\tvar maxDense protoreflect.FieldNumber\n\tfor _, cf := range mi.orderedCoderFields {\n\t\tif cf.num >= 16 && cf.num >= 2*maxDense {\n\t\t\tbreak\n\t\t}\n\t\tmaxDense = cf.num\n\t}\n\tmi.denseCoderFields = make([]*coderFieldInfo, maxDense+1)\n\tfor _, cf := range mi.orderedCoderFields {\n\t\tif int(cf.num) >= len(mi.denseCoderFields) {\n\t\t\tbreak\n\t\t}\n\t\tmi.denseCoderFields[cf.num] = cf\n\t}\n\n\t// To preserve compatibility with historic wire output, marshal oneofs last.\n\tif mi.Desc.Oneofs().Len() > 0 {\n\t\tsort.Slice(mi.orderedCoderFields, func(i, j int) bool {\n\t\t\tfi := fields.ByNumber(mi.orderedCoderFields[i].num)\n\t\t\tfj := fields.ByNumber(mi.orderedCoderFields[j].num)\n\t\t\treturn order.LegacyFieldOrder(fi, fj)\n\t\t})\n\t}\n\n\tmi.needsInitCheck = needsInitCheck(mi.Desc)\n\tif mi.methods.Marshal == nil && mi.methods.Size == nil {\n\t\tmi.methods.Flags |= protoiface.SupportMarshalDeterministic\n\t\tmi.methods.Marshal = mi.marshal\n\t\tmi.methods.Size = mi.size\n\t}\n\tif mi.methods.Unmarshal == nil {\n\t\tmi.methods.Flags |= protoiface.SupportUnmarshalDiscardUnknown\n\t\tmi.methods.Unmarshal = mi.unmarshal\n\t}\n\tif mi.methods.CheckInitialized == nil {\n\t\tmi.methods.CheckInitialized = mi.checkInitialized\n\t}\n\tif mi.methods.Merge == nil {\n\t\tmi.methods.Merge = mi.merge\n\t}\n\tif mi.methods.Equal == nil {\n\t\tmi.methods.Equal = equal\n\t}\n}\n\n// getUnknownBytes returns a *[]byte for the unknown fields.\n// It is the caller's responsibility to check whether the pointer is nil.\n// This function is specially designed to be inlineable.\nfunc (mi *MessageInfo) getUnknownBytes(p pointer) *[]byte {\n\tif mi.unknownPtrKind {\n\t\treturn *p.Apply(mi.unknownOffset).BytesPtr()\n\t} else {\n\t\treturn p.Apply(mi.unknownOffset).Bytes()\n\t}\n}\n\n// mutableUnknownBytes returns a *[]byte for the unknown fields.\n// The returned pointer is guaranteed to not be nil.\nfunc (mi *MessageInfo) mutableUnknownBytes(p pointer) *[]byte {\n\tif mi.unknownPtrKind {\n\t\tbp := p.Apply(mi.unknownOffset).BytesPtr()\n\t\tif *bp == nil {\n\t\t\t*bp = new([]byte)\n\t\t}\n\t\treturn *bp\n\t} else {\n\t\treturn p.Apply(mi.unknownOffset).Bytes()\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"sort\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\tpiface \"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nfunc (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInfo) {\n\tmi.sizecacheOffset = si.sizecacheOffset\n\tmi.unknownOffset = si.unknownOffset\n\tmi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr\n\tmi.extensionOffset = si.extensionOffset\n\tmi.lazyOffset = si.lazyOffset\n\tmi.presenceOffset = si.presenceOffset\n\n\tmi.coderFields = make(map[protowire.Number]*coderFieldInfo)\n\tfields := mi.Desc.Fields()\n\tfor i := 0; i < fields.Len(); i++ {\n\t\tfd := fields.Get(i)\n\n\t\tfs := si.fieldsByNumber[fd.Number()]\n\t\tif fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() {\n\t\t\tfs = si.oneofsByName[fd.ContainingOneof().Name()]\n\t\t}\n\t\tft := fs.Type\n\t\tvar wiretag uint64\n\t\tif !fd.IsPacked() {\n\t\t\twiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()])\n\t\t} else {\n\t\t\twiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType)\n\t\t}\n\t\tvar fieldOffset offset\n\t\tvar funcs pointerCoderFuncs\n\t\tvar childMessage *MessageInfo\n\t\tswitch {\n\t\tcase fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():\n\t\t\tfieldOffset = offsetOf(fs)\n\t\tcase fd.Message() != nil && !fd.IsMap():\n\t\t\tfieldOffset = offsetOf(fs)\n\t\t\tif fd.IsList() {\n\t\t\t\tchildMessage, funcs = makeOpaqueRepeatedMessageFieldCoder(fd, ft)\n\t\t\t} else {\n\t\t\t\tchildMessage, funcs = makeOpaqueMessageFieldCoder(fd, ft)\n\t\t\t}\n\t\tdefault:\n\t\t\tfieldOffset = offsetOf(fs)\n\t\t\tchildMessage, funcs = fieldCoder(fd, ft)\n\t\t}\n\t\tcf := &coderFieldInfo{\n\t\t\tnum:        fd.Number(),\n\t\t\toffset:     fieldOffset,\n\t\t\twiretag:    wiretag,\n\t\t\tft:         ft,\n\t\t\ttagsize:    protowire.SizeVarint(wiretag),\n\t\t\tfuncs:      funcs,\n\t\t\tmi:         childMessage,\n\t\t\tvalidation: newFieldValidationInfo(mi, si.structInfo, fd, ft),\n\t\t\tisPointer: (fd.Cardinality() == protoreflect.Repeated ||\n\t\t\t\tfd.Kind() == protoreflect.MessageKind ||\n\t\t\t\tfd.Kind() == protoreflect.GroupKind),\n\t\t\tisRequired:    fd.Cardinality() == protoreflect.Required,\n\t\t\tpresenceIndex: noPresence,\n\t\t}\n\n\t\t// TODO: Use presence for all fields.\n\t\t//\n\t\t// In some cases, such as maps, presence means only \"might be set\" rather\n\t\t// than \"is definitely set\", but every field should have a presence bit to\n\t\t// permit us to skip over definitely-unset fields at marshal time.\n\n\t\tvar hasPresence bool\n\t\thasPresence, cf.isLazy = filedesc.UsePresenceForField(fd)\n\n\t\tif hasPresence {\n\t\t\tcf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd)\n\t\t}\n\n\t\tmi.orderedCoderFields = append(mi.orderedCoderFields, cf)\n\t\tmi.coderFields[cf.num] = cf\n\t}\n\tfor i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ {\n\t\tif od := oneofs.Get(i); !od.IsSynthetic() {\n\t\t\tmi.initOneofFieldCoders(od, si.structInfo)\n\t\t}\n\t}\n\tif messageset.IsMessageSet(mi.Desc) {\n\t\tif !mi.extensionOffset.IsValid() {\n\t\t\tpanic(fmt.Sprintf(\"%v: MessageSet with no extensions field\", mi.Desc.FullName()))\n\t\t}\n\t\tif !mi.unknownOffset.IsValid() {\n\t\t\tpanic(fmt.Sprintf(\"%v: MessageSet with no unknown field\", mi.Desc.FullName()))\n\t\t}\n\t\tmi.isMessageSet = true\n\t}\n\tsort.Slice(mi.orderedCoderFields, func(i, j int) bool {\n\t\treturn mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num\n\t})\n\n\tvar maxDense protoreflect.FieldNumber\n\tfor _, cf := range mi.orderedCoderFields {\n\t\tif cf.num >= 16 && cf.num >= 2*maxDense {\n\t\t\tbreak\n\t\t}\n\t\tmaxDense = cf.num\n\t}\n\tmi.denseCoderFields = make([]*coderFieldInfo, maxDense+1)\n\tfor _, cf := range mi.orderedCoderFields {\n\t\tif int(cf.num) > len(mi.denseCoderFields) {\n\t\t\tbreak\n\t\t}\n\t\tmi.denseCoderFields[cf.num] = cf\n\t}\n\n\t// To preserve compatibility with historic wire output, marshal oneofs last.\n\tif mi.Desc.Oneofs().Len() > 0 {\n\t\tsort.Slice(mi.orderedCoderFields, func(i, j int) bool {\n\t\t\tfi := fields.ByNumber(mi.orderedCoderFields[i].num)\n\t\t\tfj := fields.ByNumber(mi.orderedCoderFields[j].num)\n\t\t\treturn order.LegacyFieldOrder(fi, fj)\n\t\t})\n\t}\n\n\tmi.needsInitCheck = needsInitCheck(mi.Desc)\n\tif mi.methods.Marshal == nil && mi.methods.Size == nil {\n\t\tmi.methods.Flags |= piface.SupportMarshalDeterministic\n\t\tmi.methods.Marshal = mi.marshal\n\t\tmi.methods.Size = mi.size\n\t}\n\tif mi.methods.Unmarshal == nil {\n\t\tmi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown\n\t\tmi.methods.Unmarshal = mi.unmarshal\n\t}\n\tif mi.methods.CheckInitialized == nil {\n\t\tmi.methods.CheckInitialized = mi.checkInitialized\n\t}\n\tif mi.methods.Merge == nil {\n\t\tmi.methods.Merge = mi.merge\n\t}\n\tif mi.methods.Equal == nil {\n\t\tmi.methods.Equal = equal\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"sort\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n)\n\nfunc sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) {\n\tif !flags.ProtoLegacy {\n\t\treturn 0\n\t}\n\n\text := *p.Apply(mi.extensionOffset).Extensions()\n\tfor _, x := range ext {\n\t\txi := getExtensionFieldInfo(x.Type())\n\t\tif xi.funcs.size == nil {\n\t\t\tcontinue\n\t\t}\n\t\tnum, _ := protowire.DecodeTag(xi.wiretag)\n\t\tsize += messageset.SizeField(num)\n\t\tif fullyLazyExtensions(opts) {\n\t\t\t// Don't expand the extension, instead use the buffer to calculate size\n\t\t\tif lb := x.lazyBuffer(); lb != nil {\n\t\t\t\t// We got hold of the buffer, so it's still lazy.\n\t\t\t\t// Don't count the tag size in the extension buffer, it's already added.\n\t\t\t\tsize += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tsize += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts)\n\t}\n\n\tif u := mi.getUnknownBytes(p); u != nil {\n\t\tsize += messageset.SizeUnknown(*u)\n\t}\n\n\treturn size\n}\n\nfunc marshalMessageSet(mi *MessageInfo, b []byte, p pointer, opts marshalOptions) ([]byte, error) {\n\tif !flags.ProtoLegacy {\n\t\treturn b, errors.New(\"no support for message_set_wire_format\")\n\t}\n\n\text := *p.Apply(mi.extensionOffset).Extensions()\n\tswitch len(ext) {\n\tcase 0:\n\tcase 1:\n\t\t// Fast-path for one extension: Don't bother sorting the keys.\n\t\tfor _, x := range ext {\n\t\t\tvar err error\n\t\t\tb, err = marshalMessageSetField(mi, b, x, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn b, err\n\t\t\t}\n\t\t}\n\tdefault:\n\t\t// Sort the keys to provide a deterministic encoding.\n\t\t// Not sure this is required, but the old code does it.\n\t\tkeys := make([]int, 0, len(ext))\n\t\tfor k := range ext {\n\t\t\tkeys = append(keys, int(k))\n\t\t}\n\t\tsort.Ints(keys)\n\t\tfor _, k := range keys {\n\t\t\tvar err error\n\t\t\tb, err = marshalMessageSetField(mi, b, ext[int32(k)], opts)\n\t\t\tif err != nil {\n\t\t\t\treturn b, err\n\t\t\t}\n\t\t}\n\t}\n\n\tif u := mi.getUnknownBytes(p); u != nil {\n\t\tvar err error\n\t\tb, err = messageset.AppendUnknown(b, *u)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\n\treturn b, nil\n}\n\nfunc marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts marshalOptions) ([]byte, error) {\n\txi := getExtensionFieldInfo(x.Type())\n\tnum, _ := protowire.DecodeTag(xi.wiretag)\n\tb = messageset.AppendFieldStart(b, num)\n\n\tif fullyLazyExtensions(opts) {\n\t\t// Don't expand the extension if it's still in wire format, instead use the buffer content.\n\t\tif lb := x.lazyBuffer(); lb != nil {\n\t\t\t// The tag inside the lazy buffer is a different tag (the extension\n\t\t\t// number), but what we need here is the tag for FieldMessage:\n\t\t\tb = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType))\n\t\t\tb = append(b, lb[xi.tagsize:]...)\n\t\t\tb = messageset.AppendFieldEnd(b)\n\t\t\treturn b, nil\n\t\t}\n\t}\n\n\tb, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts)\n\tif err != nil {\n\t\treturn b, err\n\t}\n\tb = messageset.AppendFieldEnd(b)\n\treturn b, nil\n}\n\nfunc unmarshalMessageSet(mi *MessageInfo, b []byte, p pointer, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tif !flags.ProtoLegacy {\n\t\treturn out, errors.New(\"no support for message_set_wire_format\")\n\t}\n\n\tep := p.Apply(mi.extensionOffset).Extensions()\n\tif *ep == nil {\n\t\t*ep = make(map[int32]ExtensionField)\n\t}\n\text := *ep\n\tinitialized := true\n\terr = messageset.Unmarshal(b, true, func(num protowire.Number, v []byte) error {\n\t\to, err := mi.unmarshalExtension(v, num, protowire.BytesType, ext, opts)\n\t\tif err == errUnknown {\n\t\t\tu := mi.mutableUnknownBytes(p)\n\t\t\t*u = protowire.AppendTag(*u, num, protowire.BytesType)\n\t\t\t*u = append(*u, v...)\n\t\t\treturn nil\n\t\t}\n\t\tif !o.initialized {\n\t\t\tinitialized = false\n\t\t}\n\t\treturn err\n\t})\n\tout.n = len(b)\n\tout.initialized = initialized\n\treturn out, err\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_tables.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// pointerCoderFuncs is a set of pointer encoding functions.\ntype pointerCoderFuncs struct {\n\tmi        *MessageInfo\n\tsize      func(p pointer, f *coderFieldInfo, opts marshalOptions) int\n\tmarshal   func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error)\n\tunmarshal func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error)\n\tisInit    func(p pointer, f *coderFieldInfo) error\n\tmerge     func(dst, src pointer, f *coderFieldInfo, opts mergeOptions)\n}\n\n// valueCoderFuncs is a set of protoreflect.Value encoding functions.\ntype valueCoderFuncs struct {\n\tsize      func(v protoreflect.Value, tagsize int, opts marshalOptions) int\n\tmarshal   func(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error)\n\tunmarshal func(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error)\n\tisInit    func(v protoreflect.Value) error\n\tmerge     func(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value\n}\n\n// fieldCoder returns pointer functions for a field, used for operating on\n// struct fields.\nfunc fieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) {\n\tswitch {\n\tcase fd.IsMap():\n\t\treturn encoderFuncsForMap(fd, ft)\n\tcase fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked():\n\t\t// Repeated fields (not packed).\n\t\tif ft.Kind() != reflect.Slice {\n\t\t\tbreak\n\t\t}\n\t\tft := ft.Elem()\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\tif ft.Kind() == reflect.Bool {\n\t\t\t\treturn nil, coderBoolSlice\n\t\t\t}\n\t\tcase protoreflect.EnumKind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderEnumSlice\n\t\t\t}\n\t\tcase protoreflect.Int32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderInt32Slice\n\t\t\t}\n\t\tcase protoreflect.Sint32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSint32Slice\n\t\t\t}\n\t\tcase protoreflect.Uint32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderUint32Slice\n\t\t\t}\n\t\tcase protoreflect.Int64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderInt64Slice\n\t\t\t}\n\t\tcase protoreflect.Sint64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSint64Slice\n\t\t\t}\n\t\tcase protoreflect.Uint64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderUint64Slice\n\t\t\t}\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSfixed32Slice\n\t\t\t}\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderFixed32Slice\n\t\t\t}\n\t\tcase protoreflect.FloatKind:\n\t\t\tif ft.Kind() == reflect.Float32 {\n\t\t\t\treturn nil, coderFloatSlice\n\t\t\t}\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSfixed64Slice\n\t\t\t}\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderFixed64Slice\n\t\t\t}\n\t\tcase protoreflect.DoubleKind:\n\t\t\tif ft.Kind() == reflect.Float64 {\n\t\t\t\treturn nil, coderDoubleSlice\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderStringSliceValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringSlice\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderBytesSliceValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytesSlice\n\t\t\t}\n\t\tcase protoreflect.BytesKind:\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringSlice\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytesSlice\n\t\t\t}\n\t\tcase protoreflect.MessageKind:\n\t\t\treturn getMessageInfo(ft), makeMessageSliceFieldCoder(fd, ft)\n\t\tcase protoreflect.GroupKind:\n\t\t\treturn getMessageInfo(ft), makeGroupSliceFieldCoder(fd, ft)\n\t\t}\n\tcase fd.Cardinality() == protoreflect.Repeated && fd.IsPacked():\n\t\t// Packed repeated fields.\n\t\t//\n\t\t// Only repeated fields of primitive numeric types\n\t\t// (Varint, Fixed32, or Fixed64 wire type) can be packed.\n\t\tif ft.Kind() != reflect.Slice {\n\t\t\tbreak\n\t\t}\n\t\tft := ft.Elem()\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\tif ft.Kind() == reflect.Bool {\n\t\t\t\treturn nil, coderBoolPackedSlice\n\t\t\t}\n\t\tcase protoreflect.EnumKind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderEnumPackedSlice\n\t\t\t}\n\t\tcase protoreflect.Int32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderInt32PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Sint32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSint32PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Uint32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderUint32PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Int64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderInt64PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Sint64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSint64PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Uint64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderUint64PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSfixed32PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderFixed32PackedSlice\n\t\t\t}\n\t\tcase protoreflect.FloatKind:\n\t\t\tif ft.Kind() == reflect.Float32 {\n\t\t\t\treturn nil, coderFloatPackedSlice\n\t\t\t}\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSfixed64PackedSlice\n\t\t\t}\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderFixed64PackedSlice\n\t\t\t}\n\t\tcase protoreflect.DoubleKind:\n\t\t\tif ft.Kind() == reflect.Float64 {\n\t\t\t\treturn nil, coderDoublePackedSlice\n\t\t\t}\n\t\t}\n\tcase fd.Kind() == protoreflect.MessageKind:\n\t\treturn getMessageInfo(ft), makeMessageFieldCoder(fd, ft)\n\tcase fd.Kind() == protoreflect.GroupKind:\n\t\treturn getMessageInfo(ft), makeGroupFieldCoder(fd, ft)\n\tcase !fd.HasPresence() && fd.ContainingOneof() == nil:\n\t\t// Populated oneof fields always encode even if set to the zero value,\n\t\t// which normally are not encoded in proto3.\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\tif ft.Kind() == reflect.Bool {\n\t\t\t\treturn nil, coderBoolNoZero\n\t\t\t}\n\t\tcase protoreflect.EnumKind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderEnumNoZero\n\t\t\t}\n\t\tcase protoreflect.Int32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderInt32NoZero\n\t\t\t}\n\t\tcase protoreflect.Sint32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSint32NoZero\n\t\t\t}\n\t\tcase protoreflect.Uint32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderUint32NoZero\n\t\t\t}\n\t\tcase protoreflect.Int64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderInt64NoZero\n\t\t\t}\n\t\tcase protoreflect.Sint64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSint64NoZero\n\t\t\t}\n\t\tcase protoreflect.Uint64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderUint64NoZero\n\t\t\t}\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSfixed32NoZero\n\t\t\t}\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderFixed32NoZero\n\t\t\t}\n\t\tcase protoreflect.FloatKind:\n\t\t\tif ft.Kind() == reflect.Float32 {\n\t\t\t\treturn nil, coderFloatNoZero\n\t\t\t}\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSfixed64NoZero\n\t\t\t}\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderFixed64NoZero\n\t\t\t}\n\t\tcase protoreflect.DoubleKind:\n\t\t\tif ft.Kind() == reflect.Float64 {\n\t\t\t\treturn nil, coderDoubleNoZero\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderStringNoZeroValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringNoZero\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderBytesNoZeroValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytesNoZero\n\t\t\t}\n\t\tcase protoreflect.BytesKind:\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringNoZero\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytesNoZero\n\t\t\t}\n\t\t}\n\tcase ft.Kind() == reflect.Ptr:\n\t\tft := ft.Elem()\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\tif ft.Kind() == reflect.Bool {\n\t\t\t\treturn nil, coderBoolPtr\n\t\t\t}\n\t\tcase protoreflect.EnumKind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderEnumPtr\n\t\t\t}\n\t\tcase protoreflect.Int32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderInt32Ptr\n\t\t\t}\n\t\tcase protoreflect.Sint32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSint32Ptr\n\t\t\t}\n\t\tcase protoreflect.Uint32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderUint32Ptr\n\t\t\t}\n\t\tcase protoreflect.Int64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderInt64Ptr\n\t\t\t}\n\t\tcase protoreflect.Sint64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSint64Ptr\n\t\t\t}\n\t\tcase protoreflect.Uint64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderUint64Ptr\n\t\t\t}\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSfixed32Ptr\n\t\t\t}\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderFixed32Ptr\n\t\t\t}\n\t\tcase protoreflect.FloatKind:\n\t\t\tif ft.Kind() == reflect.Float32 {\n\t\t\t\treturn nil, coderFloatPtr\n\t\t\t}\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSfixed64Ptr\n\t\t\t}\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderFixed64Ptr\n\t\t\t}\n\t\tcase protoreflect.DoubleKind:\n\t\t\tif ft.Kind() == reflect.Float64 {\n\t\t\t\treturn nil, coderDoublePtr\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderStringPtrValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringPtr\n\t\t\t}\n\t\tcase protoreflect.BytesKind:\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderStringPtr\n\t\t\t}\n\t\t}\n\tdefault:\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\tif ft.Kind() == reflect.Bool {\n\t\t\t\treturn nil, coderBool\n\t\t\t}\n\t\tcase protoreflect.EnumKind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderEnum\n\t\t\t}\n\t\tcase protoreflect.Int32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderInt32\n\t\t\t}\n\t\tcase protoreflect.Sint32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSint32\n\t\t\t}\n\t\tcase protoreflect.Uint32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderUint32\n\t\t\t}\n\t\tcase protoreflect.Int64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderInt64\n\t\t\t}\n\t\tcase protoreflect.Sint64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSint64\n\t\t\t}\n\t\tcase protoreflect.Uint64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderUint64\n\t\t\t}\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\tif ft.Kind() == reflect.Int32 {\n\t\t\t\treturn nil, coderSfixed32\n\t\t\t}\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\tif ft.Kind() == reflect.Uint32 {\n\t\t\t\treturn nil, coderFixed32\n\t\t\t}\n\t\tcase protoreflect.FloatKind:\n\t\t\tif ft.Kind() == reflect.Float32 {\n\t\t\t\treturn nil, coderFloat\n\t\t\t}\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\tif ft.Kind() == reflect.Int64 {\n\t\t\t\treturn nil, coderSfixed64\n\t\t\t}\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\tif ft.Kind() == reflect.Uint64 {\n\t\t\t\treturn nil, coderFixed64\n\t\t\t}\n\t\tcase protoreflect.DoubleKind:\n\t\t\tif ft.Kind() == reflect.Float64 {\n\t\t\t\treturn nil, coderDouble\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif ft.Kind() == reflect.String && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderStringValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderString\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 && strs.EnforceUTF8(fd) {\n\t\t\t\treturn nil, coderBytesValidateUTF8\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytes\n\t\t\t}\n\t\tcase protoreflect.BytesKind:\n\t\t\tif ft.Kind() == reflect.String {\n\t\t\t\treturn nil, coderString\n\t\t\t}\n\t\t\tif ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 {\n\t\t\t\treturn nil, coderBytes\n\t\t\t}\n\t\t}\n\t}\n\tpanic(fmt.Sprintf(\"invalid type: no encoder for %v %v %v/%v\", fd.FullName(), fd.Cardinality(), fd.Kind(), ft))\n}\n\n// encoderFuncsForValue returns value functions for a field, used for\n// extension values and map encoding.\nfunc encoderFuncsForValue(fd protoreflect.FieldDescriptor) valueCoderFuncs {\n\tswitch {\n\tcase fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked():\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\treturn coderBoolSliceValue\n\t\tcase protoreflect.EnumKind:\n\t\t\treturn coderEnumSliceValue\n\t\tcase protoreflect.Int32Kind:\n\t\t\treturn coderInt32SliceValue\n\t\tcase protoreflect.Sint32Kind:\n\t\t\treturn coderSint32SliceValue\n\t\tcase protoreflect.Uint32Kind:\n\t\t\treturn coderUint32SliceValue\n\t\tcase protoreflect.Int64Kind:\n\t\t\treturn coderInt64SliceValue\n\t\tcase protoreflect.Sint64Kind:\n\t\t\treturn coderSint64SliceValue\n\t\tcase protoreflect.Uint64Kind:\n\t\t\treturn coderUint64SliceValue\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\treturn coderSfixed32SliceValue\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\treturn coderFixed32SliceValue\n\t\tcase protoreflect.FloatKind:\n\t\t\treturn coderFloatSliceValue\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\treturn coderSfixed64SliceValue\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\treturn coderFixed64SliceValue\n\t\tcase protoreflect.DoubleKind:\n\t\t\treturn coderDoubleSliceValue\n\t\tcase protoreflect.StringKind:\n\t\t\t// We don't have a UTF-8 validating coder for repeated string fields.\n\t\t\t// Value coders are used for extensions and maps.\n\t\t\t// Extensions are never proto3, and maps never contain lists.\n\t\t\treturn coderStringSliceValue\n\t\tcase protoreflect.BytesKind:\n\t\t\treturn coderBytesSliceValue\n\t\tcase protoreflect.MessageKind:\n\t\t\treturn coderMessageSliceValue\n\t\tcase protoreflect.GroupKind:\n\t\t\treturn coderGroupSliceValue\n\t\t}\n\tcase fd.Cardinality() == protoreflect.Repeated && fd.IsPacked():\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.BoolKind:\n\t\t\treturn coderBoolPackedSliceValue\n\t\tcase protoreflect.EnumKind:\n\t\t\treturn coderEnumPackedSliceValue\n\t\tcase protoreflect.Int32Kind:\n\t\t\treturn coderInt32PackedSliceValue\n\t\tcase protoreflect.Sint32Kind:\n\t\t\treturn coderSint32PackedSliceValue\n\t\tcase protoreflect.Uint32Kind:\n\t\t\treturn coderUint32PackedSliceValue\n\t\tcase protoreflect.Int64Kind:\n\t\t\treturn coderInt64PackedSliceValue\n\t\tcase protoreflect.Sint64Kind:\n\t\t\treturn coderSint64PackedSliceValue\n\t\tcase protoreflect.Uint64Kind:\n\t\t\treturn coderUint64PackedSliceValue\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\treturn coderSfixed32PackedSliceValue\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\treturn coderFixed32PackedSliceValue\n\t\tcase protoreflect.FloatKind:\n\t\t\treturn coderFloatPackedSliceValue\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\treturn coderSfixed64PackedSliceValue\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\treturn coderFixed64PackedSliceValue\n\t\tcase protoreflect.DoubleKind:\n\t\t\treturn coderDoublePackedSliceValue\n\t\t}\n\tdefault:\n\t\tswitch fd.Kind() {\n\t\tdefault:\n\t\tcase protoreflect.BoolKind:\n\t\t\treturn coderBoolValue\n\t\tcase protoreflect.EnumKind:\n\t\t\treturn coderEnumValue\n\t\tcase protoreflect.Int32Kind:\n\t\t\treturn coderInt32Value\n\t\tcase protoreflect.Sint32Kind:\n\t\t\treturn coderSint32Value\n\t\tcase protoreflect.Uint32Kind:\n\t\t\treturn coderUint32Value\n\t\tcase protoreflect.Int64Kind:\n\t\t\treturn coderInt64Value\n\t\tcase protoreflect.Sint64Kind:\n\t\t\treturn coderSint64Value\n\t\tcase protoreflect.Uint64Kind:\n\t\t\treturn coderUint64Value\n\t\tcase protoreflect.Sfixed32Kind:\n\t\t\treturn coderSfixed32Value\n\t\tcase protoreflect.Fixed32Kind:\n\t\t\treturn coderFixed32Value\n\t\tcase protoreflect.FloatKind:\n\t\t\treturn coderFloatValue\n\t\tcase protoreflect.Sfixed64Kind:\n\t\t\treturn coderSfixed64Value\n\t\tcase protoreflect.Fixed64Kind:\n\t\t\treturn coderFixed64Value\n\t\tcase protoreflect.DoubleKind:\n\t\t\treturn coderDoubleValue\n\t\tcase protoreflect.StringKind:\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\treturn coderStringValueValidateUTF8\n\t\t\t}\n\t\t\treturn coderStringValue\n\t\tcase protoreflect.BytesKind:\n\t\t\treturn coderBytesValue\n\t\tcase protoreflect.MessageKind:\n\t\t\treturn coderMessageValue\n\t\tcase protoreflect.GroupKind:\n\t\t\treturn coderGroupValue\n\t\t}\n\t}\n\tpanic(fmt.Sprintf(\"invalid field: no encoder for %v %v %v\", fd.FullName(), fd.Cardinality(), fd.Kind()))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\n// When using unsafe pointers, we can just treat enum values as int32s.\n\nvar (\n\tcoderEnumNoZero      = coderInt32NoZero\n\tcoderEnum            = coderInt32\n\tcoderEnumPtr         = coderInt32Ptr\n\tcoderEnumSlice       = coderInt32Slice\n\tcoderEnumPackedSlice = coderInt32PackedSlice\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/convert.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// unwrapper unwraps the value to the underlying value.\n// This is implemented by List and Map.\ntype unwrapper interface {\n\tprotoUnwrap() any\n}\n\n// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.\ntype Converter interface {\n\t// PBValueOf converts a reflect.Value to a protoreflect.Value.\n\tPBValueOf(reflect.Value) protoreflect.Value\n\n\t// GoValueOf converts a protoreflect.Value to a reflect.Value.\n\tGoValueOf(protoreflect.Value) reflect.Value\n\n\t// IsValidPB returns whether a protoreflect.Value is compatible with this type.\n\tIsValidPB(protoreflect.Value) bool\n\n\t// IsValidGo returns whether a reflect.Value is compatible with this type.\n\tIsValidGo(reflect.Value) bool\n\n\t// New returns a new field value.\n\t// For scalars, it returns the default value of the field.\n\t// For composite types, it returns a new mutable value.\n\tNew() protoreflect.Value\n\n\t// Zero returns a new field value.\n\t// For scalars, it returns the default value of the field.\n\t// For composite types, it returns an immutable, empty value.\n\tZero() protoreflect.Value\n}\n\n// NewConverter matches a Go type with a protobuf field and returns a Converter\n// that converts between the two. Enums must be a named int32 kind that\n// implements protoreflect.Enum, and messages must be pointer to a named\n// struct type that implements protoreflect.ProtoMessage.\n//\n// This matcher deliberately supports a wider range of Go types than what\n// protoc-gen-go historically generated to be able to automatically wrap some\n// v1 messages generated by other forks of protoc-gen-go.\nfunc NewConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {\n\tswitch {\n\tcase fd.IsList():\n\t\treturn newListConverter(t, fd)\n\tcase fd.IsMap():\n\t\treturn newMapConverter(t, fd)\n\tdefault:\n\t\treturn newSingularConverter(t, fd)\n\t}\n}\n\nvar (\n\tboolType    = reflect.TypeOf(bool(false))\n\tint32Type   = reflect.TypeOf(int32(0))\n\tint64Type   = reflect.TypeOf(int64(0))\n\tuint32Type  = reflect.TypeOf(uint32(0))\n\tuint64Type  = reflect.TypeOf(uint64(0))\n\tfloat32Type = reflect.TypeOf(float32(0))\n\tfloat64Type = reflect.TypeOf(float64(0))\n\tstringType  = reflect.TypeOf(string(\"\"))\n\tbytesType   = reflect.TypeOf([]byte(nil))\n\tbyteType    = reflect.TypeOf(byte(0))\n)\n\nvar (\n\tboolZero    = protoreflect.ValueOfBool(false)\n\tint32Zero   = protoreflect.ValueOfInt32(0)\n\tint64Zero   = protoreflect.ValueOfInt64(0)\n\tuint32Zero  = protoreflect.ValueOfUint32(0)\n\tuint64Zero  = protoreflect.ValueOfUint64(0)\n\tfloat32Zero = protoreflect.ValueOfFloat32(0)\n\tfloat64Zero = protoreflect.ValueOfFloat64(0)\n\tstringZero  = protoreflect.ValueOfString(\"\")\n\tbytesZero   = protoreflect.ValueOfBytes(nil)\n)\n\nfunc newSingularConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {\n\tdefVal := func(fd protoreflect.FieldDescriptor, zero protoreflect.Value) protoreflect.Value {\n\t\tif fd.Cardinality() == protoreflect.Repeated {\n\t\t\t// Default isn't defined for repeated fields.\n\t\t\treturn zero\n\t\t}\n\t\treturn fd.Default()\n\t}\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind:\n\t\tif t.Kind() == reflect.Bool {\n\t\t\treturn &boolConverter{t, defVal(fd, boolZero)}\n\t\t}\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:\n\t\tif t.Kind() == reflect.Int32 {\n\t\t\treturn &int32Converter{t, defVal(fd, int32Zero)}\n\t\t}\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:\n\t\tif t.Kind() == reflect.Int64 {\n\t\t\treturn &int64Converter{t, defVal(fd, int64Zero)}\n\t\t}\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind:\n\t\tif t.Kind() == reflect.Uint32 {\n\t\t\treturn &uint32Converter{t, defVal(fd, uint32Zero)}\n\t\t}\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind:\n\t\tif t.Kind() == reflect.Uint64 {\n\t\t\treturn &uint64Converter{t, defVal(fd, uint64Zero)}\n\t\t}\n\tcase protoreflect.FloatKind:\n\t\tif t.Kind() == reflect.Float32 {\n\t\t\treturn &float32Converter{t, defVal(fd, float32Zero)}\n\t\t}\n\tcase protoreflect.DoubleKind:\n\t\tif t.Kind() == reflect.Float64 {\n\t\t\treturn &float64Converter{t, defVal(fd, float64Zero)}\n\t\t}\n\tcase protoreflect.StringKind:\n\t\tif t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {\n\t\t\treturn &stringConverter{t, defVal(fd, stringZero)}\n\t\t}\n\tcase protoreflect.BytesKind:\n\t\tif t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) {\n\t\t\treturn &bytesConverter{t, defVal(fd, bytesZero)}\n\t\t}\n\tcase protoreflect.EnumKind:\n\t\t// Handle enums, which must be a named int32 type.\n\t\tif t.Kind() == reflect.Int32 {\n\t\t\treturn newEnumConverter(t, fd)\n\t\t}\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn newMessageConverter(t)\n\t}\n\tpanic(fmt.Sprintf(\"invalid Go type %v for field %v\", t, fd.FullName()))\n}\n\ntype boolConverter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *boolConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfBool(v.Bool())\n}\nfunc (c *boolConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(v.Bool()).Convert(c.goType)\n}\nfunc (c *boolConverter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(bool)\n\treturn ok\n}\nfunc (c *boolConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *boolConverter) New() protoreflect.Value  { return c.def }\nfunc (c *boolConverter) Zero() protoreflect.Value { return c.def }\n\ntype int32Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *int32Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfInt32(int32(v.Int()))\n}\nfunc (c *int32Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(int32(v.Int())).Convert(c.goType)\n}\nfunc (c *int32Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(int32)\n\treturn ok\n}\nfunc (c *int32Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *int32Converter) New() protoreflect.Value  { return c.def }\nfunc (c *int32Converter) Zero() protoreflect.Value { return c.def }\n\ntype int64Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *int64Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfInt64(int64(v.Int()))\n}\nfunc (c *int64Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(int64(v.Int())).Convert(c.goType)\n}\nfunc (c *int64Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(int64)\n\treturn ok\n}\nfunc (c *int64Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *int64Converter) New() protoreflect.Value  { return c.def }\nfunc (c *int64Converter) Zero() protoreflect.Value { return c.def }\n\ntype uint32Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *uint32Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfUint32(uint32(v.Uint()))\n}\nfunc (c *uint32Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(uint32(v.Uint())).Convert(c.goType)\n}\nfunc (c *uint32Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(uint32)\n\treturn ok\n}\nfunc (c *uint32Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *uint32Converter) New() protoreflect.Value  { return c.def }\nfunc (c *uint32Converter) Zero() protoreflect.Value { return c.def }\n\ntype uint64Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *uint64Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfUint64(uint64(v.Uint()))\n}\nfunc (c *uint64Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(uint64(v.Uint())).Convert(c.goType)\n}\nfunc (c *uint64Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(uint64)\n\treturn ok\n}\nfunc (c *uint64Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *uint64Converter) New() protoreflect.Value  { return c.def }\nfunc (c *uint64Converter) Zero() protoreflect.Value { return c.def }\n\ntype float32Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *float32Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfFloat32(float32(v.Float()))\n}\nfunc (c *float32Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(float32(v.Float())).Convert(c.goType)\n}\nfunc (c *float32Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(float32)\n\treturn ok\n}\nfunc (c *float32Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *float32Converter) New() protoreflect.Value  { return c.def }\nfunc (c *float32Converter) Zero() protoreflect.Value { return c.def }\n\ntype float64Converter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *float64Converter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfFloat64(float64(v.Float()))\n}\nfunc (c *float64Converter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(float64(v.Float())).Convert(c.goType)\n}\nfunc (c *float64Converter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(float64)\n\treturn ok\n}\nfunc (c *float64Converter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *float64Converter) New() protoreflect.Value  { return c.def }\nfunc (c *float64Converter) Zero() protoreflect.Value { return c.def }\n\ntype stringConverter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfString(v.Convert(stringType).String())\n}\nfunc (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\t// protoreflect.Value.String never panics, so we go through an interface\n\t// conversion here to check the type.\n\ts := v.Interface().(string)\n\tif c.goType.Kind() == reflect.Slice && s == \"\" {\n\t\treturn reflect.Zero(c.goType) // ensure empty string is []byte(nil)\n\t}\n\treturn reflect.ValueOf(s).Convert(c.goType)\n}\nfunc (c *stringConverter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(string)\n\treturn ok\n}\nfunc (c *stringConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *stringConverter) New() protoreflect.Value  { return c.def }\nfunc (c *stringConverter) Zero() protoreflect.Value { return c.def }\n\ntype bytesConverter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc (c *bytesConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\tif c.goType.Kind() == reflect.String && v.Len() == 0 {\n\t\treturn protoreflect.ValueOfBytes(nil) // ensure empty string is []byte(nil)\n\t}\n\treturn protoreflect.ValueOfBytes(v.Convert(bytesType).Bytes())\n}\nfunc (c *bytesConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(v.Bytes()).Convert(c.goType)\n}\nfunc (c *bytesConverter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().([]byte)\n\treturn ok\n}\nfunc (c *bytesConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\nfunc (c *bytesConverter) New() protoreflect.Value  { return c.def }\nfunc (c *bytesConverter) Zero() protoreflect.Value { return c.def }\n\ntype enumConverter struct {\n\tgoType reflect.Type\n\tdef    protoreflect.Value\n}\n\nfunc newEnumConverter(goType reflect.Type, fd protoreflect.FieldDescriptor) Converter {\n\tvar def protoreflect.Value\n\tif fd.Cardinality() == protoreflect.Repeated {\n\t\tdef = protoreflect.ValueOfEnum(fd.Enum().Values().Get(0).Number())\n\t} else {\n\t\tdef = fd.Default()\n\t}\n\treturn &enumConverter{goType, def}\n}\n\nfunc (c *enumConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(v.Int()))\n}\n\nfunc (c *enumConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn reflect.ValueOf(v.Enum()).Convert(c.goType)\n}\n\nfunc (c *enumConverter) IsValidPB(v protoreflect.Value) bool {\n\t_, ok := v.Interface().(protoreflect.EnumNumber)\n\treturn ok\n}\n\nfunc (c *enumConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\n\nfunc (c *enumConverter) New() protoreflect.Value {\n\treturn c.def\n}\n\nfunc (c *enumConverter) Zero() protoreflect.Value {\n\treturn c.def\n}\n\ntype messageConverter struct {\n\tgoType reflect.Type\n}\n\nfunc newMessageConverter(goType reflect.Type) Converter {\n\treturn &messageConverter{goType}\n}\n\nfunc (c *messageConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\tif c.isNonPointer() {\n\t\tif v.CanAddr() {\n\t\t\tv = v.Addr() // T => *T\n\t\t} else {\n\t\t\tv = reflect.Zero(reflect.PtrTo(v.Type()))\n\t\t}\n\t}\n\tif m, ok := v.Interface().(protoreflect.ProtoMessage); ok {\n\t\treturn protoreflect.ValueOfMessage(m.ProtoReflect())\n\t}\n\treturn protoreflect.ValueOfMessage(legacyWrapMessage(v))\n}\n\nfunc (c *messageConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\tm := v.Message()\n\tvar rv reflect.Value\n\tif u, ok := m.(unwrapper); ok {\n\t\trv = reflect.ValueOf(u.protoUnwrap())\n\t} else {\n\t\trv = reflect.ValueOf(m.Interface())\n\t}\n\tif c.isNonPointer() {\n\t\tif rv.Type() != reflect.PtrTo(c.goType) {\n\t\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", rv.Type(), reflect.PtrTo(c.goType)))\n\t\t}\n\t\tif !rv.IsNil() {\n\t\t\trv = rv.Elem() // *T => T\n\t\t} else {\n\t\t\trv = reflect.Zero(rv.Type().Elem())\n\t\t}\n\t}\n\tif rv.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", rv.Type(), c.goType))\n\t}\n\treturn rv\n}\n\nfunc (c *messageConverter) IsValidPB(v protoreflect.Value) bool {\n\tm := v.Message()\n\tvar rv reflect.Value\n\tif u, ok := m.(unwrapper); ok {\n\t\trv = reflect.ValueOf(u.protoUnwrap())\n\t} else {\n\t\trv = reflect.ValueOf(m.Interface())\n\t}\n\tif c.isNonPointer() {\n\t\treturn rv.Type() == reflect.PtrTo(c.goType)\n\t}\n\treturn rv.Type() == c.goType\n}\n\nfunc (c *messageConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\n\nfunc (c *messageConverter) New() protoreflect.Value {\n\tif c.isNonPointer() {\n\t\treturn c.PBValueOf(reflect.New(c.goType).Elem())\n\t}\n\treturn c.PBValueOf(reflect.New(c.goType.Elem()))\n}\n\nfunc (c *messageConverter) Zero() protoreflect.Value {\n\treturn c.PBValueOf(reflect.Zero(c.goType))\n}\n\n// isNonPointer reports whether the type is a non-pointer type.\n// This never occurs for generated message types.\nfunc (c *messageConverter) isNonPointer() bool {\n\treturn c.goType.Kind() != reflect.Ptr\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/convert_list.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc newListConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter {\n\tswitch {\n\tcase t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice:\n\t\treturn &listPtrConverter{t, newSingularConverter(t.Elem().Elem(), fd)}\n\tcase t.Kind() == reflect.Slice:\n\t\treturn &listConverter{t, newSingularConverter(t.Elem(), fd)}\n\t}\n\tpanic(fmt.Sprintf(\"invalid Go type %v for field %v\", t, fd.FullName()))\n}\n\ntype listConverter struct {\n\tgoType reflect.Type // []T\n\tc      Converter\n}\n\nfunc (c *listConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\tpv := reflect.New(c.goType)\n\tpv.Elem().Set(v)\n\treturn protoreflect.ValueOfList(&listReflect{pv, c.c})\n}\n\nfunc (c *listConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\trv := v.List().(*listReflect).v\n\tif rv.IsNil() {\n\t\treturn reflect.Zero(c.goType)\n\t}\n\treturn rv.Elem()\n}\n\nfunc (c *listConverter) IsValidPB(v protoreflect.Value) bool {\n\tlist, ok := v.Interface().(*listReflect)\n\tif !ok {\n\t\treturn false\n\t}\n\treturn list.v.Type().Elem() == c.goType\n}\n\nfunc (c *listConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\n\nfunc (c *listConverter) New() protoreflect.Value {\n\treturn protoreflect.ValueOfList(&listReflect{reflect.New(c.goType), c.c})\n}\n\nfunc (c *listConverter) Zero() protoreflect.Value {\n\treturn protoreflect.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c})\n}\n\ntype listPtrConverter struct {\n\tgoType reflect.Type // *[]T\n\tc      Converter\n}\n\nfunc (c *listPtrConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfList(&listReflect{v, c.c})\n}\n\nfunc (c *listPtrConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn v.List().(*listReflect).v\n}\n\nfunc (c *listPtrConverter) IsValidPB(v protoreflect.Value) bool {\n\tlist, ok := v.Interface().(*listReflect)\n\tif !ok {\n\t\treturn false\n\t}\n\treturn list.v.Type() == c.goType\n}\n\nfunc (c *listPtrConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\n\nfunc (c *listPtrConverter) New() protoreflect.Value {\n\treturn c.PBValueOf(reflect.New(c.goType.Elem()))\n}\n\nfunc (c *listPtrConverter) Zero() protoreflect.Value {\n\treturn c.PBValueOf(reflect.Zero(c.goType))\n}\n\ntype listReflect struct {\n\tv    reflect.Value // *[]T\n\tconv Converter\n}\n\nfunc (ls *listReflect) Len() int {\n\tif ls.v.IsNil() {\n\t\treturn 0\n\t}\n\treturn ls.v.Elem().Len()\n}\nfunc (ls *listReflect) Get(i int) protoreflect.Value {\n\treturn ls.conv.PBValueOf(ls.v.Elem().Index(i))\n}\nfunc (ls *listReflect) Set(i int, v protoreflect.Value) {\n\tls.v.Elem().Index(i).Set(ls.conv.GoValueOf(v))\n}\nfunc (ls *listReflect) Append(v protoreflect.Value) {\n\tls.v.Elem().Set(reflect.Append(ls.v.Elem(), ls.conv.GoValueOf(v)))\n}\nfunc (ls *listReflect) AppendMutable() protoreflect.Value {\n\tif _, ok := ls.conv.(*messageConverter); !ok {\n\t\tpanic(\"invalid AppendMutable on list with non-message type\")\n\t}\n\tv := ls.NewElement()\n\tls.Append(v)\n\treturn v\n}\nfunc (ls *listReflect) Truncate(i int) {\n\tls.v.Elem().Set(ls.v.Elem().Slice(0, i))\n}\nfunc (ls *listReflect) NewElement() protoreflect.Value {\n\treturn ls.conv.New()\n}\nfunc (ls *listReflect) IsValid() bool {\n\treturn !ls.v.IsNil()\n}\nfunc (ls *listReflect) protoUnwrap() any {\n\treturn ls.v.Interface()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/convert_map.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype mapConverter struct {\n\tgoType           reflect.Type // map[K]V\n\tkeyConv, valConv Converter\n}\n\nfunc newMapConverter(t reflect.Type, fd protoreflect.FieldDescriptor) *mapConverter {\n\tif t.Kind() != reflect.Map {\n\t\tpanic(fmt.Sprintf(\"invalid Go type %v for field %v\", t, fd.FullName()))\n\t}\n\treturn &mapConverter{\n\t\tgoType:  t,\n\t\tkeyConv: newSingularConverter(t.Key(), fd.MapKey()),\n\t\tvalConv: newSingularConverter(t.Elem(), fd.MapValue()),\n\t}\n}\n\nfunc (c *mapConverter) PBValueOf(v reflect.Value) protoreflect.Value {\n\tif v.Type() != c.goType {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want %v\", v.Type(), c.goType))\n\t}\n\treturn protoreflect.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv})\n}\n\nfunc (c *mapConverter) GoValueOf(v protoreflect.Value) reflect.Value {\n\treturn v.Map().(*mapReflect).v\n}\n\nfunc (c *mapConverter) IsValidPB(v protoreflect.Value) bool {\n\tmapv, ok := v.Interface().(*mapReflect)\n\tif !ok {\n\t\treturn false\n\t}\n\treturn mapv.v.Type() == c.goType\n}\n\nfunc (c *mapConverter) IsValidGo(v reflect.Value) bool {\n\treturn v.IsValid() && v.Type() == c.goType\n}\n\nfunc (c *mapConverter) New() protoreflect.Value {\n\treturn c.PBValueOf(reflect.MakeMap(c.goType))\n}\n\nfunc (c *mapConverter) Zero() protoreflect.Value {\n\treturn c.PBValueOf(reflect.Zero(c.goType))\n}\n\ntype mapReflect struct {\n\tv       reflect.Value // map[K]V\n\tkeyConv Converter\n\tvalConv Converter\n}\n\nfunc (ms *mapReflect) Len() int {\n\treturn ms.v.Len()\n}\nfunc (ms *mapReflect) Has(k protoreflect.MapKey) bool {\n\trk := ms.keyConv.GoValueOf(k.Value())\n\trv := ms.v.MapIndex(rk)\n\treturn rv.IsValid()\n}\nfunc (ms *mapReflect) Get(k protoreflect.MapKey) protoreflect.Value {\n\trk := ms.keyConv.GoValueOf(k.Value())\n\trv := ms.v.MapIndex(rk)\n\tif !rv.IsValid() {\n\t\treturn protoreflect.Value{}\n\t}\n\treturn ms.valConv.PBValueOf(rv)\n}\nfunc (ms *mapReflect) Set(k protoreflect.MapKey, v protoreflect.Value) {\n\trk := ms.keyConv.GoValueOf(k.Value())\n\trv := ms.valConv.GoValueOf(v)\n\tms.v.SetMapIndex(rk, rv)\n}\nfunc (ms *mapReflect) Clear(k protoreflect.MapKey) {\n\trk := ms.keyConv.GoValueOf(k.Value())\n\tms.v.SetMapIndex(rk, reflect.Value{})\n}\nfunc (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value {\n\tif _, ok := ms.valConv.(*messageConverter); !ok {\n\t\tpanic(\"invalid Mutable on map with non-message value type\")\n\t}\n\tv := ms.Get(k)\n\tif !v.IsValid() {\n\t\tv = ms.NewValue()\n\t\tms.Set(k, v)\n\t}\n\treturn v\n}\nfunc (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {\n\titer := ms.v.MapRange()\n\tfor iter.Next() {\n\t\tk := ms.keyConv.PBValueOf(iter.Key()).MapKey()\n\t\tv := ms.valConv.PBValueOf(iter.Value())\n\t\tif !f(k, v) {\n\t\t\treturn\n\t\t}\n\t}\n}\nfunc (ms *mapReflect) NewValue() protoreflect.Value {\n\treturn ms.valConv.New()\n}\nfunc (ms *mapReflect) IsValid() bool {\n\treturn !ms.v.IsNil()\n}\nfunc (ms *mapReflect) protoUnwrap() any {\n\treturn ms.v.Interface()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/decode.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"math/bits\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nvar errDecode = errors.New(\"cannot parse invalid wire-format data\")\nvar errRecursionDepth = errors.New(\"exceeded maximum recursion depth\")\n\ntype unmarshalOptions struct {\n\tflags    protoiface.UnmarshalInputFlags\n\tresolver interface {\n\t\tFindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)\n\t\tFindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)\n\t}\n\tdepth int\n}\n\nfunc (o unmarshalOptions) Options() proto.UnmarshalOptions {\n\treturn proto.UnmarshalOptions{\n\t\tMerge:          true,\n\t\tAllowPartial:   true,\n\t\tDiscardUnknown: o.DiscardUnknown(),\n\t\tResolver:       o.resolver,\n\n\t\tNoLazyDecoding: o.NoLazyDecoding(),\n\t}\n}\n\nfunc (o unmarshalOptions) DiscardUnknown() bool {\n\treturn o.flags&protoiface.UnmarshalDiscardUnknown != 0\n}\n\nfunc (o unmarshalOptions) AliasBuffer() bool { return o.flags&protoiface.UnmarshalAliasBuffer != 0 }\nfunc (o unmarshalOptions) Validated() bool   { return o.flags&protoiface.UnmarshalValidated != 0 }\nfunc (o unmarshalOptions) NoLazyDecoding() bool {\n\treturn o.flags&protoiface.UnmarshalNoLazyDecoding != 0\n}\n\nfunc (o unmarshalOptions) CanBeLazy() bool {\n\tif o.resolver != protoregistry.GlobalTypes {\n\t\treturn false\n\t}\n\t// We ignore the UnmarshalInvalidateSizeCache even though it's not in the default set\n\treturn (o.flags & ^(protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated | protoiface.UnmarshalCheckRequired)) == 0\n}\n\nvar lazyUnmarshalOptions = unmarshalOptions{\n\tresolver: protoregistry.GlobalTypes,\n\n\tflags: protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated,\n\n\tdepth: protowire.DefaultRecursionLimit,\n}\n\ntype unmarshalOutput struct {\n\tn           int // number of bytes consumed\n\tinitialized bool\n}\n\n// unmarshal is protoreflect.Methods.Unmarshal.\nfunc (mi *MessageInfo) unmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {\n\tvar p pointer\n\tif ms, ok := in.Message.(*messageState); ok {\n\t\tp = ms.pointer()\n\t} else {\n\t\tp = in.Message.(*messageReflectWrapper).pointer()\n\t}\n\tout, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{\n\t\tflags:    in.Flags,\n\t\tresolver: in.Resolver,\n\t\tdepth:    in.Depth,\n\t})\n\tvar flags protoiface.UnmarshalOutputFlags\n\tif out.initialized {\n\t\tflags |= protoiface.UnmarshalInitialized\n\t}\n\treturn protoiface.UnmarshalOutput{\n\t\tFlags: flags,\n\t}, err\n}\n\n// errUnknown is returned during unmarshaling to indicate a parse error that\n// should result in a field being placed in the unknown fields section (for example,\n// when the wire type doesn't match) as opposed to the entire unmarshal operation\n// failing (for example, when a field extends past the available input).\n//\n// This is a sentinel error which should never be visible to the user.\nvar errUnknown = errors.New(\"unknown\")\n\nfunc (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tmi.init()\n\tif opts.depth--; opts.depth < 0 {\n\t\treturn out, errRecursionDepth\n\t}\n\tif flags.ProtoLegacy && mi.isMessageSet {\n\t\treturn unmarshalMessageSet(mi, b, p, opts)\n\t}\n\n\tlazyDecoding := LazyEnabled() // default\n\tif opts.NoLazyDecoding() {\n\t\tlazyDecoding = false // explicitly disabled\n\t}\n\tif mi.lazyOffset.IsValid() && lazyDecoding {\n\t\treturn mi.unmarshalPointerLazy(b, p, groupTag, opts)\n\t}\n\treturn mi.unmarshalPointerEager(b, p, groupTag, opts)\n}\n\n// unmarshalPointerEager is the message unmarshalling function for all messages that are not lazy.\n// The corresponding function for Lazy is in google_lazy.go.\nfunc (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\n\tinitialized := true\n\tvar requiredMask uint64\n\tvar exts *map[int32]ExtensionField\n\n\tvar presence presence\n\tif mi.presenceOffset.IsValid() {\n\t\tpresence = p.Apply(mi.presenceOffset).PresenceInfo()\n\t}\n\n\tstart := len(b)\n\tfor len(b) > 0 {\n\t\t// Parse the tag (field number and wire type).\n\t\tvar tag uint64\n\t\tif b[0] < 0x80 {\n\t\t\ttag = uint64(b[0])\n\t\t\tb = b[1:]\n\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\ttag = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\tb = b[2:]\n\t\t} else {\n\t\t\tvar n int\n\t\t\ttag, n = protowire.ConsumeVarint(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t}\n\t\tvar num protowire.Number\n\t\tif n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) {\n\t\t\treturn out, errDecode\n\t\t} else {\n\t\t\tnum = protowire.Number(n)\n\t\t}\n\t\twtyp := protowire.Type(tag & 7)\n\n\t\tif wtyp == protowire.EndGroupType {\n\t\t\tif num != groupTag {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tgroupTag = 0\n\t\t\tbreak\n\t\t}\n\n\t\tvar f *coderFieldInfo\n\t\tif int(num) < len(mi.denseCoderFields) {\n\t\t\tf = mi.denseCoderFields[num]\n\t\t} else {\n\t\t\tf = mi.coderFields[num]\n\t\t}\n\t\tvar n int\n\t\terr := errUnknown\n\t\tswitch {\n\t\tcase f != nil:\n\t\t\tif f.funcs.unmarshal == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvar o unmarshalOutput\n\t\t\to, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts)\n\t\t\tn = o.n\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\trequiredMask |= f.validation.requiredBit\n\t\t\tif f.funcs.isInit != nil && !o.initialized {\n\t\t\t\tinitialized = false\n\t\t\t}\n\n\t\t\tif f.presenceIndex != noPresence {\n\t\t\t\tpresence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)\n\t\t\t}\n\n\t\tdefault:\n\t\t\t// Possible extension.\n\t\t\tif exts == nil && mi.extensionOffset.IsValid() {\n\t\t\t\texts = p.Apply(mi.extensionOffset).Extensions()\n\t\t\t\tif *exts == nil {\n\t\t\t\t\t*exts = make(map[int32]ExtensionField)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif exts == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvar o unmarshalOutput\n\t\t\to, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tn = o.n\n\t\t\tif !o.initialized {\n\t\t\t\tinitialized = false\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tif err != errUnknown {\n\t\t\t\treturn out, err\n\t\t\t}\n\t\t\tn = protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tif !opts.DiscardUnknown() && mi.unknownOffset.IsValid() {\n\t\t\t\tu := mi.mutableUnknownBytes(p)\n\t\t\t\t*u = protowire.AppendTag(*u, num, wtyp)\n\t\t\t\t*u = append(*u, b[:n]...)\n\t\t\t}\n\t\t}\n\t\tb = b[n:]\n\t}\n\tif groupTag != 0 {\n\t\treturn out, errDecode\n\t}\n\tif mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) {\n\t\tinitialized = false\n\t}\n\tif initialized {\n\t\tout.initialized = true\n\t}\n\tout.n = start - len(b)\n\treturn out, nil\n}\n\nfunc (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp protowire.Type, exts map[int32]ExtensionField, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tx := exts[int32(num)]\n\txt := x.Type()\n\tif xt == nil {\n\t\tvar err error\n\t\txt, err = opts.resolver.FindExtensionByNumber(mi.Desc.FullName(), num)\n\t\tif err != nil {\n\t\t\tif err == protoregistry.NotFound {\n\t\t\t\treturn out, errUnknown\n\t\t\t}\n\t\t\treturn out, errors.New(\"%v: unable to resolve extension %v: %v\", mi.Desc.FullName(), num, err)\n\t\t}\n\t}\n\txi := getExtensionFieldInfo(xt)\n\tif xi.funcs.unmarshal == nil {\n\t\treturn out, errUnknown\n\t}\n\tif flags.LazyUnmarshalExtensions {\n\t\tif opts.CanBeLazy() && x.canLazy(xt) {\n\t\t\tout, valid := skipExtension(b, xi, num, wtyp, opts)\n\t\t\tswitch valid {\n\t\t\tcase ValidationValid:\n\t\t\t\tif out.initialized {\n\t\t\t\t\tx.appendLazyBytes(xt, xi, num, wtyp, b[:out.n])\n\t\t\t\t\texts[int32(num)] = x\n\t\t\t\t\treturn out, nil\n\t\t\t\t}\n\t\t\tcase ValidationInvalid:\n\t\t\t\treturn out, errDecode\n\t\t\tcase ValidationUnknown:\n\t\t\t}\n\t\t}\n\t}\n\tival := x.Value()\n\tif !ival.IsValid() && xi.unmarshalNeedsValue {\n\t\t// Create a new message, list, or map value to fill in.\n\t\t// For enums, create a prototype value to let the unmarshal func know the\n\t\t// concrete type.\n\t\tival = xt.New()\n\t}\n\tv, out, err := xi.funcs.unmarshal(b, ival, num, wtyp, opts)\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tif xi.funcs.isInit == nil {\n\t\tout.initialized = true\n\t}\n\tx.Set(xt, v)\n\texts[int32(num)] = x\n\treturn out, nil\n}\n\nfunc skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) {\n\tif xi.validation.mi == nil {\n\t\treturn out, ValidationUnknown\n\t}\n\txi.validation.mi.init()\n\tswitch xi.validation.typ {\n\tcase validationTypeMessage:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\n\t\tif opts.Validated() {\n\t\t\tout.initialized = true\n\t\t\tout.n = n\n\t\t\treturn out, ValidationValid\n\t\t}\n\n\t\tout, st := xi.validation.mi.validate(v, 0, opts)\n\t\tout.n = n\n\t\treturn out, st\n\tcase validationTypeGroup:\n\t\tif wtyp != protowire.StartGroupType {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\t\tout, st := xi.validation.mi.validate(b, num, opts)\n\t\treturn out, st\n\tdefault:\n\t\treturn out, ValidationUnknown\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/encode.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"math\"\n\t\"sort\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/protolazy\"\n\t\"google.golang.org/protobuf/proto\"\n\tpiface \"google.golang.org/protobuf/runtime/protoiface\"\n)\n\ntype marshalOptions struct {\n\tflags piface.MarshalInputFlags\n}\n\nfunc (o marshalOptions) Options() proto.MarshalOptions {\n\treturn proto.MarshalOptions{\n\t\tAllowPartial:  true,\n\t\tDeterministic: o.Deterministic(),\n\t\tUseCachedSize: o.UseCachedSize(),\n\t}\n}\n\nfunc (o marshalOptions) Deterministic() bool { return o.flags&piface.MarshalDeterministic != 0 }\nfunc (o marshalOptions) UseCachedSize() bool { return o.flags&piface.MarshalUseCachedSize != 0 }\n\n// size is protoreflect.Methods.Size.\nfunc (mi *MessageInfo) size(in piface.SizeInput) piface.SizeOutput {\n\tvar p pointer\n\tif ms, ok := in.Message.(*messageState); ok {\n\t\tp = ms.pointer()\n\t} else {\n\t\tp = in.Message.(*messageReflectWrapper).pointer()\n\t}\n\tsize := mi.sizePointer(p, marshalOptions{\n\t\tflags: in.Flags,\n\t})\n\treturn piface.SizeOutput{Size: size}\n}\n\nfunc (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) {\n\tmi.init()\n\tif p.IsNil() {\n\t\treturn 0\n\t}\n\tif opts.UseCachedSize() && mi.sizecacheOffset.IsValid() {\n\t\t// The size cache contains the size + 1, to allow the\n\t\t// zero value to be invalid, while also allowing for a\n\t\t// 0 size to be cached.\n\t\tif size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 {\n\t\t\treturn int(size - 1)\n\t\t}\n\t}\n\treturn mi.sizePointerSlow(p, opts)\n}\n\nfunc (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int) {\n\tif flags.ProtoLegacy && mi.isMessageSet {\n\t\tsize = sizeMessageSet(mi, p, opts)\n\t\tif mi.sizecacheOffset.IsValid() {\n\t\t\tatomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))\n\t\t}\n\t\treturn size\n\t}\n\tif mi.extensionOffset.IsValid() {\n\t\te := p.Apply(mi.extensionOffset).Extensions()\n\t\tsize += mi.sizeExtensions(e, opts)\n\t}\n\n\tvar lazy **protolazy.XXX_lazyUnmarshalInfo\n\tvar presence presence\n\tif mi.presenceOffset.IsValid() {\n\t\tpresence = p.Apply(mi.presenceOffset).PresenceInfo()\n\t\tif mi.lazyOffset.IsValid() {\n\t\t\tlazy = p.Apply(mi.lazyOffset).LazyInfoPtr()\n\t\t}\n\t}\n\n\tfor _, f := range mi.orderedCoderFields {\n\t\tif f.funcs.size == nil {\n\t\t\tcontinue\n\t\t}\n\t\tfptr := p.Apply(f.offset)\n\n\t\tif f.presenceIndex != noPresence {\n\t\t\tif !presence.Present(f.presenceIndex) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif f.isLazy && fptr.AtomicGetPointer().IsNil() {\n\t\t\t\tif lazyFields(opts) {\n\t\t\t\t\tsize += (*lazy).SizeField(uint32(f.num))\n\t\t\t\t\tcontinue\n\t\t\t\t} else {\n\t\t\t\t\tmi.lazyUnmarshal(p, f.num)\n\t\t\t\t}\n\t\t\t}\n\t\t\tsize += f.funcs.size(fptr, f, opts)\n\t\t\tcontinue\n\t\t}\n\n\t\tif f.isPointer && fptr.Elem().IsNil() {\n\t\t\tcontinue\n\t\t}\n\t\tsize += f.funcs.size(fptr, f, opts)\n\t}\n\tif mi.unknownOffset.IsValid() {\n\t\tif u := mi.getUnknownBytes(p); u != nil {\n\t\t\tsize += len(*u)\n\t\t}\n\t}\n\tif mi.sizecacheOffset.IsValid() {\n\t\tif size > (math.MaxInt32 - 1) {\n\t\t\t// The size is too large for the int32 sizecache field.\n\t\t\t// We will need to recompute the size when encoding;\n\t\t\t// unfortunately expensive, but better than invalid output.\n\t\t\tatomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0)\n\t\t} else {\n\t\t\t// The size cache contains the size + 1, to allow the\n\t\t\t// zero value to be invalid, while also allowing for a\n\t\t\t// 0 size to be cached.\n\t\t\tatomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))\n\t\t}\n\t}\n\treturn size\n}\n\n// marshal is protoreflect.Methods.Marshal.\nfunc (mi *MessageInfo) marshal(in piface.MarshalInput) (out piface.MarshalOutput, err error) {\n\tvar p pointer\n\tif ms, ok := in.Message.(*messageState); ok {\n\t\tp = ms.pointer()\n\t} else {\n\t\tp = in.Message.(*messageReflectWrapper).pointer()\n\t}\n\tb, err := mi.marshalAppendPointer(in.Buf, p, marshalOptions{\n\t\tflags: in.Flags,\n\t})\n\treturn piface.MarshalOutput{Buf: b}, err\n}\n\nfunc (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOptions) ([]byte, error) {\n\tmi.init()\n\tif p.IsNil() {\n\t\treturn b, nil\n\t}\n\tif flags.ProtoLegacy && mi.isMessageSet {\n\t\treturn marshalMessageSet(mi, b, p, opts)\n\t}\n\tvar err error\n\t// The old marshaler encodes extensions at beginning.\n\tif mi.extensionOffset.IsValid() {\n\t\te := p.Apply(mi.extensionOffset).Extensions()\n\t\t// TODO: Special handling for MessageSet?\n\t\tb, err = mi.appendExtensions(b, e, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\n\tvar lazy **protolazy.XXX_lazyUnmarshalInfo\n\tvar presence presence\n\tif mi.presenceOffset.IsValid() {\n\t\tpresence = p.Apply(mi.presenceOffset).PresenceInfo()\n\t\tif mi.lazyOffset.IsValid() {\n\t\t\tlazy = p.Apply(mi.lazyOffset).LazyInfoPtr()\n\t\t}\n\t}\n\n\tfor _, f := range mi.orderedCoderFields {\n\t\tif f.funcs.marshal == nil {\n\t\t\tcontinue\n\t\t}\n\t\tfptr := p.Apply(f.offset)\n\n\t\tif f.presenceIndex != noPresence {\n\t\t\tif !presence.Present(f.presenceIndex) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif f.isLazy {\n\t\t\t\t// Be careful, this field needs to be read atomically, like for a get\n\t\t\t\tif f.isPointer && fptr.AtomicGetPointer().IsNil() {\n\t\t\t\t\tif lazyFields(opts) {\n\t\t\t\t\t\tb, _ = (*lazy).AppendField(b, uint32(f.num))\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmi.lazyUnmarshal(p, f.num)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tb, err = f.funcs.marshal(b, fptr, f, opts)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn b, err\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t} else if f.isPointer && fptr.Elem().IsNil() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tb, err = f.funcs.marshal(b, fptr, f, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn b, err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif f.isPointer && fptr.Elem().IsNil() {\n\t\t\tcontinue\n\t\t}\n\t\tb, err = f.funcs.marshal(b, fptr, f, opts)\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\tif mi.unknownOffset.IsValid() && !mi.isMessageSet {\n\t\tif u := mi.getUnknownBytes(p); u != nil {\n\t\t\tb = append(b, (*u)...)\n\t\t}\n\t}\n\treturn b, nil\n}\n\n// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal.\nfunc fullyLazyExtensions(opts marshalOptions) bool {\n\t// When deterministic marshaling is requested, force an unmarshal for lazy\n\t// extensions to produce a deterministic result, instead of passing through\n\t// bytes lazily that may or may not match what Go Protobuf would produce.\n\treturn opts.flags&piface.MarshalDeterministic == 0\n}\n\n// lazyFields returns true if we should attempt to keep fields lazy over size and marshal.\nfunc lazyFields(opts marshalOptions) bool {\n\t// When deterministic marshaling is requested, force an unmarshal for lazy\n\t// fields to produce a deterministic result, instead of passing through\n\t// bytes lazily that may or may not match what Go Protobuf would produce.\n\treturn opts.flags&piface.MarshalDeterministic == 0\n}\n\nfunc (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) {\n\tif ext == nil {\n\t\treturn 0\n\t}\n\tfor _, x := range *ext {\n\t\txi := getExtensionFieldInfo(x.Type())\n\t\tif xi.funcs.size == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif fullyLazyExtensions(opts) {\n\t\t\t// Don't expand the extension, instead use the buffer to calculate size\n\t\t\tif lb := x.lazyBuffer(); lb != nil {\n\t\t\t\t// We got hold of the buffer, so it's still lazy.\n\t\t\t\tn += len(lb)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tn += xi.funcs.size(x.Value(), xi.tagsize, opts)\n\t}\n\treturn n\n}\n\nfunc (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, opts marshalOptions) ([]byte, error) {\n\tif ext == nil {\n\t\treturn b, nil\n\t}\n\n\tswitch len(*ext) {\n\tcase 0:\n\t\treturn b, nil\n\tcase 1:\n\t\t// Fast-path for one extension: Don't bother sorting the keys.\n\t\tvar err error\n\t\tfor _, x := range *ext {\n\t\t\txi := getExtensionFieldInfo(x.Type())\n\t\t\tif fullyLazyExtensions(opts) {\n\t\t\t\t// Don't expand the extension if it's still in wire format, instead use the buffer content.\n\t\t\t\tif lb := x.lazyBuffer(); lb != nil {\n\t\t\t\t\tb = append(b, lb...)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tb, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)\n\t\t}\n\t\treturn b, err\n\tdefault:\n\t\t// Sort the keys to provide a deterministic encoding.\n\t\t// Not sure this is required, but the old code does it.\n\t\tkeys := make([]int, 0, len(*ext))\n\t\tfor k := range *ext {\n\t\t\tkeys = append(keys, int(k))\n\t\t}\n\t\tsort.Ints(keys)\n\t\tvar err error\n\t\tfor _, k := range keys {\n\t\t\tx := (*ext)[int32(k)]\n\t\t\txi := getExtensionFieldInfo(x.Type())\n\t\t\tif fullyLazyExtensions(opts) {\n\t\t\t\t// Don't expand the extension if it's still in wire format, instead use the buffer content.\n\t\t\t\tif lb := x.lazyBuffer(); lb != nil {\n\t\t\t\t\tb = append(b, lb...)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tb, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn b, err\n\t\t\t}\n\t\t}\n\t\treturn b, nil\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/enum.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype EnumInfo struct {\n\tGoReflectType reflect.Type // int32 kind\n\tDesc          protoreflect.EnumDescriptor\n}\n\nfunc (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum {\n\treturn reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum)\n}\nfunc (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc }\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/equal.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"bytes\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nfunc equal(in protoiface.EqualInput) protoiface.EqualOutput {\n\treturn protoiface.EqualOutput{Equal: equalMessage(in.MessageA, in.MessageB)}\n}\n\n// equalMessage is a fast-path variant of protoreflect.equalMessage.\n// It takes advantage of the internal messageState type to avoid\n// unnecessary allocations, type assertions.\nfunc equalMessage(mx, my protoreflect.Message) bool {\n\tif mx == nil || my == nil {\n\t\treturn mx == my\n\t}\n\tif mx.Descriptor() != my.Descriptor() {\n\t\treturn false\n\t}\n\n\tmsx, ok := mx.(*messageState)\n\tif !ok {\n\t\treturn protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))\n\t}\n\tmsy, ok := my.(*messageState)\n\tif !ok {\n\t\treturn protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))\n\t}\n\n\tmi := msx.messageInfo()\n\tmiy := msy.messageInfo()\n\tif mi != miy {\n\t\treturn protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my))\n\t}\n\tmi.init()\n\t// Compares regular fields\n\t// Modified Message.Range code that compares two messages of the same type\n\t// while going over the fields.\n\tfor _, ri := range mi.rangeInfos {\n\t\tvar fd protoreflect.FieldDescriptor\n\t\tvar vx, vy protoreflect.Value\n\n\t\tswitch ri := ri.(type) {\n\t\tcase *fieldInfo:\n\t\t\thx := ri.has(msx.pointer())\n\t\t\thy := ri.has(msy.pointer())\n\t\t\tif hx != hy {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !hx {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfd = ri.fieldDesc\n\t\t\tvx = ri.get(msx.pointer())\n\t\t\tvy = ri.get(msy.pointer())\n\t\tcase *oneofInfo:\n\t\t\tfnx := ri.which(msx.pointer())\n\t\t\tfny := ri.which(msy.pointer())\n\t\t\tif fnx != fny {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif fnx <= 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfi := mi.fields[fnx]\n\t\t\tfd = fi.fieldDesc\n\t\t\tvx = fi.get(msx.pointer())\n\t\t\tvy = fi.get(msy.pointer())\n\t\t}\n\n\t\tif !equalValue(fd, vx, vy) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Compare extensions.\n\t// This is more complicated because mx or my could have empty/nil extension maps,\n\t// however some populated extension map values are equal to nil extension maps.\n\temx := mi.extensionMap(msx.pointer())\n\temy := mi.extensionMap(msy.pointer())\n\tif emx != nil {\n\t\tfor k, x := range *emx {\n\t\t\txd := x.Type().TypeDescriptor()\n\t\t\txv := x.Value()\n\t\t\tvar y ExtensionField\n\t\t\tok := false\n\t\t\tif emy != nil {\n\t\t\t\ty, ok = (*emy)[k]\n\t\t\t}\n\t\t\t// We need to treat empty lists as equal to nil values\n\t\t\tif emy == nil || !ok {\n\t\t\t\tif xd.IsList() && xv.List().Len() == 0 {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif !equalValue(xd, xv, y.Value()) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\tif emy != nil {\n\t\t// emy may have extensions emx does not have, need to check them as well\n\t\tfor k, y := range *emy {\n\t\t\tif emx != nil {\n\t\t\t\t// emx has the field, so we already checked it\n\t\t\t\tif _, ok := (*emx)[k]; ok {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Empty lists are equal to nil\n\t\t\tif y.Type().TypeDescriptor().IsList() && y.Value().List().Len() == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// Cant be equal if the extension is populated\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn equalUnknown(mx.GetUnknown(), my.GetUnknown())\n}\n\nfunc equalValue(fd protoreflect.FieldDescriptor, vx, vy protoreflect.Value) bool {\n\t// slow path\n\tif fd.Kind() != protoreflect.MessageKind {\n\t\treturn vx.Equal(vy)\n\t}\n\n\t// fast path special cases\n\tif fd.IsMap() {\n\t\tif fd.MapValue().Kind() == protoreflect.MessageKind {\n\t\t\treturn equalMessageMap(vx.Map(), vy.Map())\n\t\t}\n\t\treturn vx.Equal(vy)\n\t}\n\n\tif fd.IsList() {\n\t\treturn equalMessageList(vx.List(), vy.List())\n\t}\n\n\treturn equalMessage(vx.Message(), vy.Message())\n}\n\n// Mostly copied from protoreflect.equalMap.\n// This variant only works for messages as map types.\n// All other map types should be handled via Value.Equal.\nfunc equalMessageMap(mx, my protoreflect.Map) bool {\n\tif mx.Len() != my.Len() {\n\t\treturn false\n\t}\n\tequal := true\n\tmx.Range(func(k protoreflect.MapKey, vx protoreflect.Value) bool {\n\t\tif !my.Has(k) {\n\t\t\tequal = false\n\t\t\treturn false\n\t\t}\n\t\tvy := my.Get(k)\n\t\tequal = equalMessage(vx.Message(), vy.Message())\n\t\treturn equal\n\t})\n\treturn equal\n}\n\n// Mostly copied from protoreflect.equalList.\n// The only change is the usage of equalImpl instead of protoreflect.equalValue.\nfunc equalMessageList(lx, ly protoreflect.List) bool {\n\tif lx.Len() != ly.Len() {\n\t\treturn false\n\t}\n\tfor i := 0; i < lx.Len(); i++ {\n\t\t// We only operate on messages here since equalImpl will not call us in any other case.\n\t\tif !equalMessage(lx.Get(i).Message(), ly.Get(i).Message()) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// equalUnknown compares unknown fields by direct comparison on the raw bytes\n// of each individual field number.\n// Copied from protoreflect.equalUnknown.\nfunc equalUnknown(x, y protoreflect.RawFields) bool {\n\tif len(x) != len(y) {\n\t\treturn false\n\t}\n\tif bytes.Equal([]byte(x), []byte(y)) {\n\t\treturn true\n\t}\n\n\tmx := make(map[protoreflect.FieldNumber]protoreflect.RawFields)\n\tmy := make(map[protoreflect.FieldNumber]protoreflect.RawFields)\n\tfor len(x) > 0 {\n\t\tfnum, _, n := protowire.ConsumeField(x)\n\t\tmx[fnum] = append(mx[fnum], x[:n]...)\n\t\tx = x[n:]\n\t}\n\tfor len(y) > 0 {\n\t\tfnum, _, n := protowire.ConsumeField(y)\n\t\tmy[fnum] = append(my[fnum], y[:n]...)\n\t\ty = y[n:]\n\t}\n\tif len(mx) != len(my) {\n\t\treturn false\n\t}\n\n\tfor k, v1 := range mx {\n\t\tif v2, ok := my[k]; !ok || !bytes.Equal([]byte(v1), []byte(v2)) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/extension.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// ExtensionInfo implements ExtensionType.\n//\n// This type contains a number of exported fields for legacy compatibility.\n// The only non-deprecated use of this type is through the methods of the\n// ExtensionType interface.\ntype ExtensionInfo struct {\n\t// An ExtensionInfo may exist in several stages of initialization.\n\t//\n\t// extensionInfoUninitialized: Some or all of the legacy exported\n\t// fields may be set, but none of the unexported fields have been\n\t// initialized. This is the starting state for an ExtensionInfo\n\t// in legacy generated code.\n\t//\n\t// extensionInfoDescInit: The desc field is set, but other unexported fields\n\t// may not be initialized. Legacy exported fields may or may not be set.\n\t// This is the starting state for an ExtensionInfo in newly generated code.\n\t//\n\t// extensionInfoFullInit: The ExtensionInfo is fully initialized.\n\t// This state is only entered after lazy initialization is complete.\n\tinit uint32\n\tmu   sync.Mutex\n\n\tgoType reflect.Type\n\tdesc   extensionTypeDescriptor\n\tconv   Converter\n\tinfo   *extensionFieldInfo // for fast-path method implementations\n\n\t// ExtendedType is a typed nil-pointer to the parent message type that\n\t// is being extended. It is possible for this to be unpopulated in v2\n\t// since the message may no longer implement the MessageV1 interface.\n\t//\n\t// Deprecated: Use the ExtendedType method instead.\n\tExtendedType protoiface.MessageV1\n\n\t// ExtensionType is the zero value of the extension type.\n\t//\n\t// For historical reasons, reflect.TypeOf(ExtensionType) and the\n\t// type returned by InterfaceOf may not be identical.\n\t//\n\t// Deprecated: Use InterfaceOf(xt.Zero()) instead.\n\tExtensionType any\n\n\t// Field is the field number of the extension.\n\t//\n\t// Deprecated: Use the Descriptor().Number method instead.\n\tField int32\n\n\t// Name is the fully qualified name of extension.\n\t//\n\t// Deprecated: Use the Descriptor().FullName method instead.\n\tName string\n\n\t// Tag is the protobuf struct tag used in the v1 API.\n\t//\n\t// Deprecated: Do not use.\n\tTag string\n\n\t// Filename is the proto filename in which the extension is defined.\n\t//\n\t// Deprecated: Use Descriptor().ParentFile().Path() instead.\n\tFilename string\n}\n\n// Stages of initialization: See the ExtensionInfo.init field.\nconst (\n\textensionInfoUninitialized = 0\n\textensionInfoDescInit      = 1\n\textensionInfoFullInit      = 2\n)\n\nfunc InitExtensionInfo(xi *ExtensionInfo, xd protoreflect.ExtensionDescriptor, goType reflect.Type) {\n\txi.goType = goType\n\txi.desc = extensionTypeDescriptor{xd, xi}\n\txi.init = extensionInfoDescInit\n}\n\nfunc (xi *ExtensionInfo) New() protoreflect.Value {\n\treturn xi.lazyInit().New()\n}\nfunc (xi *ExtensionInfo) Zero() protoreflect.Value {\n\treturn xi.lazyInit().Zero()\n}\nfunc (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value {\n\treturn xi.lazyInit().PBValueOf(reflect.ValueOf(v))\n}\nfunc (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any {\n\treturn xi.lazyInit().GoValueOf(v).Interface()\n}\nfunc (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {\n\treturn xi.lazyInit().IsValidPB(v)\n}\nfunc (xi *ExtensionInfo) IsValidInterface(v any) bool {\n\treturn xi.lazyInit().IsValidGo(reflect.ValueOf(v))\n}\nfunc (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {\n\tif atomic.LoadUint32(&xi.init) < extensionInfoDescInit {\n\t\txi.lazyInitSlow()\n\t}\n\treturn &xi.desc\n}\n\nfunc (xi *ExtensionInfo) lazyInit() Converter {\n\tif atomic.LoadUint32(&xi.init) < extensionInfoFullInit {\n\t\txi.lazyInitSlow()\n\t}\n\treturn xi.conv\n}\n\nfunc (xi *ExtensionInfo) lazyInitSlow() {\n\txi.mu.Lock()\n\tdefer xi.mu.Unlock()\n\n\tif xi.init == extensionInfoFullInit {\n\t\treturn\n\t}\n\tdefer atomic.StoreUint32(&xi.init, extensionInfoFullInit)\n\n\tif xi.desc.ExtensionDescriptor == nil {\n\t\txi.initFromLegacy()\n\t}\n\tif !xi.desc.ExtensionDescriptor.IsPlaceholder() {\n\t\tif xi.ExtensionType == nil {\n\t\t\txi.initToLegacy()\n\t\t}\n\t\txi.conv = NewConverter(xi.goType, xi.desc.ExtensionDescriptor)\n\t\txi.info = makeExtensionFieldInfo(xi.desc.ExtensionDescriptor)\n\t\txi.info.validation = newValidationInfo(xi.desc.ExtensionDescriptor, xi.goType)\n\t}\n}\n\ntype extensionTypeDescriptor struct {\n\tprotoreflect.ExtensionDescriptor\n\txi *ExtensionInfo\n}\n\nfunc (xtd *extensionTypeDescriptor) Type() protoreflect.ExtensionType {\n\treturn xtd.xi\n}\nfunc (xtd *extensionTypeDescriptor) Descriptor() protoreflect.ExtensionDescriptor {\n\treturn xtd.ExtensionDescriptor\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/lazy.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"math/bits\"\n\t\"os\"\n\t\"reflect\"\n\t\"sort\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/protolazy\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\tpreg \"google.golang.org/protobuf/reflect/protoregistry\"\n\tpiface \"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nvar enableLazy int32 = func() int32 {\n\tif os.Getenv(\"GOPROTODEBUG\") == \"nolazy\" {\n\t\treturn 0\n\t}\n\treturn 1\n}()\n\n// EnableLazyUnmarshal enables lazy unmarshaling.\nfunc EnableLazyUnmarshal(enable bool) {\n\tif enable {\n\t\tatomic.StoreInt32(&enableLazy, 1)\n\t\treturn\n\t}\n\tatomic.StoreInt32(&enableLazy, 0)\n}\n\n// LazyEnabled reports whether lazy unmarshalling is currently enabled.\nfunc LazyEnabled() bool {\n\treturn atomic.LoadInt32(&enableLazy) != 0\n}\n\n// UnmarshalField unmarshals a field in a message.\nfunc UnmarshalField(m interface{}, num protowire.Number) {\n\tswitch m := m.(type) {\n\tcase *messageState:\n\t\tm.messageInfo().lazyUnmarshal(m.pointer(), num)\n\tcase *messageReflectWrapper:\n\t\tm.messageInfo().lazyUnmarshal(m.pointer(), num)\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unsupported wrapper type %T\", m))\n\t}\n}\n\nfunc (mi *MessageInfo) lazyUnmarshal(p pointer, num protoreflect.FieldNumber) {\n\tvar f *coderFieldInfo\n\tif int(num) < len(mi.denseCoderFields) {\n\t\tf = mi.denseCoderFields[num]\n\t} else {\n\t\tf = mi.coderFields[num]\n\t}\n\tif f == nil {\n\t\tpanic(fmt.Sprintf(\"lazyUnmarshal: field info for %v.%v\", mi.Desc.FullName(), num))\n\t}\n\tlazy := *p.Apply(mi.lazyOffset).LazyInfoPtr()\n\tstart, end, found, _, multipleEntries := lazy.FindFieldInProto(uint32(num))\n\tif !found && multipleEntries == nil {\n\t\tpanic(fmt.Sprintf(\"lazyUnmarshal: can't find field data for %v.%v\", mi.Desc.FullName(), num))\n\t}\n\t// The actual pointer in the message can not be set until the whole struct is filled in, otherwise we will have races.\n\t// Create another pointer and set it atomically, if we won the race and the pointer in the original message is still nil.\n\tfp := pointerOfValue(reflect.New(f.ft))\n\tif multipleEntries != nil {\n\t\tfor _, entry := range multipleEntries {\n\t\t\tmi.unmarshalField(lazy.Buffer()[entry.Start:entry.End], fp, f, lazy, lazy.UnmarshalFlags())\n\t\t}\n\t} else {\n\t\tmi.unmarshalField(lazy.Buffer()[start:end], fp, f, lazy, lazy.UnmarshalFlags())\n\t}\n\tp.Apply(f.offset).AtomicSetPointerIfNil(fp.Elem())\n}\n\nfunc (mi *MessageInfo) unmarshalField(b []byte, p pointer, f *coderFieldInfo, lazyInfo *protolazy.XXX_lazyUnmarshalInfo, flags piface.UnmarshalInputFlags) error {\n\topts := lazyUnmarshalOptions\n\topts.flags |= flags\n\tfor len(b) > 0 {\n\t\t// Parse the tag (field number and wire type).\n\t\tvar tag uint64\n\t\tif b[0] < 0x80 {\n\t\t\ttag = uint64(b[0])\n\t\t\tb = b[1:]\n\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\ttag = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\tb = b[2:]\n\t\t} else {\n\t\t\tvar n int\n\t\t\ttag, n = protowire.ConsumeVarint(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn errors.New(\"invalid wire data\")\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t}\n\t\tvar num protowire.Number\n\t\tif n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) {\n\t\t\treturn errors.New(\"invalid wire data\")\n\t\t} else {\n\t\t\tnum = protowire.Number(n)\n\t\t}\n\t\twtyp := protowire.Type(tag & 7)\n\t\tif num == f.num {\n\t\t\to, err := f.funcs.unmarshal(b, p, wtyp, f, opts)\n\t\t\tif err == nil {\n\t\t\t\tb = b[o.n:]\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif err != errUnknown {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tn := protowire.ConsumeFieldValue(num, wtyp, b)\n\t\tif n < 0 {\n\t\t\treturn errors.New(\"invalid wire data\")\n\t\t}\n\t\tb = b[n:]\n\t}\n\treturn nil\n}\n\nfunc (mi *MessageInfo) skipField(b []byte, f *coderFieldInfo, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) {\n\tfmi := f.validation.mi\n\tif fmi == nil {\n\t\tfd := mi.Desc.Fields().ByNumber(f.num)\n\t\tif fd == nil {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\t\tmessageName := fd.Message().FullName()\n\t\tmessageType, err := preg.GlobalTypes.FindMessageByName(messageName)\n\t\tif err != nil {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\t\tvar ok bool\n\t\tfmi, ok = messageType.(*MessageInfo)\n\t\tif !ok {\n\t\t\treturn out, ValidationUnknown\n\t\t}\n\t}\n\tfmi.init()\n\tswitch f.validation.typ {\n\tcase validationTypeMessage:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn out, ValidationWrongWireType\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn out, ValidationInvalid\n\t\t}\n\t\tout, st := fmi.validate(v, 0, opts)\n\t\tout.n = n\n\t\treturn out, st\n\tcase validationTypeGroup:\n\t\tif wtyp != protowire.StartGroupType {\n\t\t\treturn out, ValidationWrongWireType\n\t\t}\n\t\tout, st := fmi.validate(b, f.num, opts)\n\t\treturn out, st\n\tdefault:\n\t\treturn out, ValidationUnknown\n\t}\n}\n\n// unmarshalPointerLazy is similar to unmarshalPointerEager, but it\n// specifically handles lazy unmarshalling.  it expects lazyOffset and\n// presenceOffset to both be valid.\nfunc (mi *MessageInfo) unmarshalPointerLazy(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {\n\tinitialized := true\n\tvar requiredMask uint64\n\tvar lazy **protolazy.XXX_lazyUnmarshalInfo\n\tvar presence presence\n\tvar lazyIndex []protolazy.IndexEntry\n\tvar lastNum protowire.Number\n\toutOfOrder := false\n\tlazyDecode := false\n\tpresence = p.Apply(mi.presenceOffset).PresenceInfo()\n\tlazy = p.Apply(mi.lazyOffset).LazyInfoPtr()\n\tif !presence.AnyPresent(mi.presenceSize) {\n\t\tif opts.CanBeLazy() {\n\t\t\t// If the message contains existing data, we need to merge into it.\n\t\t\t// Lazy unmarshaling doesn't merge, so only enable it when the\n\t\t\t// message is empty (has no presence bitmap).\n\t\t\tlazyDecode = true\n\t\t\tif *lazy == nil {\n\t\t\t\t*lazy = &protolazy.XXX_lazyUnmarshalInfo{}\n\t\t\t}\n\t\t\t(*lazy).SetUnmarshalFlags(opts.flags)\n\t\t\tif !opts.AliasBuffer() {\n\t\t\t\t// Make a copy of the buffer for lazy unmarshaling.\n\t\t\t\t// Set the AliasBuffer flag so recursive unmarshal\n\t\t\t\t// operations reuse the copy.\n\t\t\t\tb = append([]byte{}, b...)\n\t\t\t\topts.flags |= piface.UnmarshalAliasBuffer\n\t\t\t}\n\t\t\t(*lazy).SetBuffer(b)\n\t\t}\n\t}\n\t// Track special handling of lazy fields.\n\t//\n\t// In the common case, all fields are lazyValidateOnly (and lazyFields remains nil).\n\t// In the event that validation for a field fails, this map tracks handling of the field.\n\ttype lazyAction uint8\n\tconst (\n\t\tlazyValidateOnly   lazyAction = iota // validate the field only\n\t\tlazyUnmarshalNow                     // eagerly unmarshal the field\n\t\tlazyUnmarshalLater                   // unmarshal the field after the message is fully processed\n\t)\n\tvar lazyFields map[*coderFieldInfo]lazyAction\n\tvar exts *map[int32]ExtensionField\n\tstart := len(b)\n\tpos := 0\n\tfor len(b) > 0 {\n\t\t// Parse the tag (field number and wire type).\n\t\tvar tag uint64\n\t\tif b[0] < 0x80 {\n\t\t\ttag = uint64(b[0])\n\t\t\tb = b[1:]\n\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\ttag = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\tb = b[2:]\n\t\t} else {\n\t\t\tvar n int\n\t\t\ttag, n = protowire.ConsumeVarint(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tb = b[n:]\n\t\t}\n\t\tvar num protowire.Number\n\t\tif n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) {\n\t\t\treturn out, errors.New(\"invalid field number\")\n\t\t} else {\n\t\t\tnum = protowire.Number(n)\n\t\t}\n\t\twtyp := protowire.Type(tag & 7)\n\n\t\tif wtyp == protowire.EndGroupType {\n\t\t\tif num != groupTag {\n\t\t\t\treturn out, errors.New(\"mismatching end group marker\")\n\t\t\t}\n\t\t\tgroupTag = 0\n\t\t\tbreak\n\t\t}\n\n\t\tvar f *coderFieldInfo\n\t\tif int(num) < len(mi.denseCoderFields) {\n\t\t\tf = mi.denseCoderFields[num]\n\t\t} else {\n\t\t\tf = mi.coderFields[num]\n\t\t}\n\t\tvar n int\n\t\terr := errUnknown\n\t\tdiscardUnknown := false\n\tField:\n\t\tswitch {\n\t\tcase f != nil:\n\t\t\tif f.funcs.unmarshal == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif f.isLazy && lazyDecode {\n\t\t\t\tswitch {\n\t\t\t\tcase lazyFields == nil || lazyFields[f] == lazyValidateOnly:\n\t\t\t\t\t// Attempt to validate this field and leave it for later lazy unmarshaling.\n\t\t\t\t\to, valid := mi.skipField(b, f, wtyp, opts)\n\t\t\t\t\tswitch valid {\n\t\t\t\t\tcase ValidationValid:\n\t\t\t\t\t\t// Skip over the valid field and continue.\n\t\t\t\t\t\terr = nil\n\t\t\t\t\t\tpresence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)\n\t\t\t\t\t\trequiredMask |= f.validation.requiredBit\n\t\t\t\t\t\tif !o.initialized {\n\t\t\t\t\t\t\tinitialized = false\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn = o.n\n\t\t\t\t\t\tbreak Field\n\t\t\t\t\tcase ValidationInvalid:\n\t\t\t\t\t\treturn out, errors.New(\"invalid proto wire format\")\n\t\t\t\t\tcase ValidationWrongWireType:\n\t\t\t\t\t\tbreak Field\n\t\t\t\t\tcase ValidationUnknown:\n\t\t\t\t\t\tif lazyFields == nil {\n\t\t\t\t\t\t\tlazyFields = make(map[*coderFieldInfo]lazyAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif presence.Present(f.presenceIndex) {\n\t\t\t\t\t\t\t// We were unable to determine if the field is valid or not,\n\t\t\t\t\t\t\t// and we've already skipped over at least one instance of this\n\t\t\t\t\t\t\t// field. Clear the presence bit (so if we stop decoding early,\n\t\t\t\t\t\t\t// we don't leave a partially-initialized field around) and flag\n\t\t\t\t\t\t\t// the field for unmarshaling before we return.\n\t\t\t\t\t\t\tpresence.ClearPresent(f.presenceIndex)\n\t\t\t\t\t\t\tlazyFields[f] = lazyUnmarshalLater\n\t\t\t\t\t\t\tdiscardUnknown = true\n\t\t\t\t\t\t\tbreak Field\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// We were unable to determine if the field is valid or not,\n\t\t\t\t\t\t\t// but this is the first time we've seen it. Flag it as needing\n\t\t\t\t\t\t\t// eager unmarshaling and fall through to the eager unmarshal case below.\n\t\t\t\t\t\t\tlazyFields[f] = lazyUnmarshalNow\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tcase lazyFields[f] == lazyUnmarshalLater:\n\t\t\t\t\t// This field will be unmarshaled in a separate pass below.\n\t\t\t\t\t// Skip over it here.\n\t\t\t\t\tdiscardUnknown = true\n\t\t\t\t\tbreak Field\n\t\t\t\tdefault:\n\t\t\t\t\t// Eagerly unmarshal the field.\n\t\t\t\t}\n\t\t\t}\n\t\t\tif f.isLazy && !lazyDecode && presence.Present(f.presenceIndex) {\n\t\t\t\tif p.Apply(f.offset).AtomicGetPointer().IsNil() {\n\t\t\t\t\tmi.lazyUnmarshal(p, f.num)\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar o unmarshalOutput\n\t\t\to, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts)\n\t\t\tn = o.n\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\trequiredMask |= f.validation.requiredBit\n\t\t\tif f.funcs.isInit != nil && !o.initialized {\n\t\t\t\tinitialized = false\n\t\t\t}\n\t\t\tif f.presenceIndex != noPresence {\n\t\t\t\tpresence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)\n\t\t\t}\n\t\tdefault:\n\t\t\t// Possible extension.\n\t\t\tif exts == nil && mi.extensionOffset.IsValid() {\n\t\t\t\texts = p.Apply(mi.extensionOffset).Extensions()\n\t\t\t\tif *exts == nil {\n\t\t\t\t\t*exts = make(map[int32]ExtensionField)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif exts == nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tvar o unmarshalOutput\n\t\t\to, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tn = o.n\n\t\t\tif !o.initialized {\n\t\t\t\tinitialized = false\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tif err != errUnknown {\n\t\t\t\treturn out, err\n\t\t\t}\n\t\t\tn = protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn out, errDecode\n\t\t\t}\n\t\t\tif !discardUnknown && !opts.DiscardUnknown() && mi.unknownOffset.IsValid() {\n\t\t\t\tu := mi.mutableUnknownBytes(p)\n\t\t\t\t*u = protowire.AppendTag(*u, num, wtyp)\n\t\t\t\t*u = append(*u, b[:n]...)\n\t\t\t}\n\t\t}\n\t\tb = b[n:]\n\t\tend := start - len(b)\n\t\tif lazyDecode && f != nil && f.isLazy {\n\t\t\tif num != lastNum {\n\t\t\t\tlazyIndex = append(lazyIndex, protolazy.IndexEntry{\n\t\t\t\t\tFieldNum: uint32(num),\n\t\t\t\t\tStart:    uint32(pos),\n\t\t\t\t\tEnd:      uint32(end),\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\ti := len(lazyIndex) - 1\n\t\t\t\tlazyIndex[i].End = uint32(end)\n\t\t\t\tlazyIndex[i].MultipleContiguous = true\n\t\t\t}\n\t\t}\n\t\tif num < lastNum {\n\t\t\toutOfOrder = true\n\t\t}\n\t\tpos = end\n\t\tlastNum = num\n\t}\n\tif groupTag != 0 {\n\t\treturn out, errors.New(\"missing end group marker\")\n\t}\n\tif lazyFields != nil {\n\t\t// Some fields failed validation, and now need to be unmarshaled.\n\t\tfor f, action := range lazyFields {\n\t\t\tif action != lazyUnmarshalLater {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tinitialized = false\n\t\t\tif *lazy == nil {\n\t\t\t\t*lazy = &protolazy.XXX_lazyUnmarshalInfo{}\n\t\t\t}\n\t\t\tif err := mi.unmarshalField((*lazy).Buffer(), p.Apply(f.offset), f, *lazy, opts.flags); err != nil {\n\t\t\t\treturn out, err\n\t\t\t}\n\t\t\tpresence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)\n\t\t}\n\t}\n\tif lazyDecode {\n\t\tif outOfOrder {\n\t\t\tsort.Slice(lazyIndex, func(i, j int) bool {\n\t\t\t\treturn lazyIndex[i].FieldNum < lazyIndex[j].FieldNum ||\n\t\t\t\t\t(lazyIndex[i].FieldNum == lazyIndex[j].FieldNum &&\n\t\t\t\t\t\tlazyIndex[i].Start < lazyIndex[j].Start)\n\t\t\t})\n\t\t}\n\t\tif *lazy == nil {\n\t\t\t*lazy = &protolazy.XXX_lazyUnmarshalInfo{}\n\t\t}\n\n\t\t(*lazy).SetIndex(lazyIndex)\n\t}\n\tif mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) {\n\t\tinitialized = false\n\t}\n\tif initialized {\n\t\tout.initialized = true\n\t}\n\tout.n = start - len(b)\n\treturn out, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// legacyEnumName returns the name of enums used in legacy code.\n// It is neither the protobuf full name nor the qualified Go name,\n// but rather an odd hybrid of both.\nfunc legacyEnumName(ed protoreflect.EnumDescriptor) string {\n\tvar protoPkg string\n\tenumName := string(ed.FullName())\n\tif fd := ed.ParentFile(); fd != nil {\n\t\tprotoPkg = string(fd.Package())\n\t\tenumName = strings.TrimPrefix(enumName, protoPkg+\".\")\n\t}\n\tif protoPkg == \"\" {\n\t\treturn strs.GoCamelCase(enumName)\n\t}\n\treturn protoPkg + \".\" + strs.GoCamelCase(enumName)\n}\n\n// legacyWrapEnum wraps v as a protoreflect.Enum,\n// where v must be a int32 kind and not implement the v2 API already.\nfunc legacyWrapEnum(v reflect.Value) protoreflect.Enum {\n\tet := legacyLoadEnumType(v.Type())\n\treturn et.New(protoreflect.EnumNumber(v.Int()))\n}\n\nvar legacyEnumTypeCache sync.Map // map[reflect.Type]protoreflect.EnumType\n\n// legacyLoadEnumType dynamically loads a protoreflect.EnumType for t,\n// where t must be an int32 kind and not implement the v2 API already.\nfunc legacyLoadEnumType(t reflect.Type) protoreflect.EnumType {\n\t// Fast-path: check if a EnumType is cached for this concrete type.\n\tif et, ok := legacyEnumTypeCache.Load(t); ok {\n\t\treturn et.(protoreflect.EnumType)\n\t}\n\n\t// Slow-path: derive enum descriptor and initialize EnumType.\n\tvar et protoreflect.EnumType\n\ted := LegacyLoadEnumDesc(t)\n\tet = &legacyEnumType{\n\t\tdesc:   ed,\n\t\tgoType: t,\n\t}\n\tif et, ok := legacyEnumTypeCache.LoadOrStore(t, et); ok {\n\t\treturn et.(protoreflect.EnumType)\n\t}\n\treturn et\n}\n\ntype legacyEnumType struct {\n\tdesc   protoreflect.EnumDescriptor\n\tgoType reflect.Type\n\tm      sync.Map // map[protoreflect.EnumNumber]proto.Enum\n}\n\nfunc (t *legacyEnumType) New(n protoreflect.EnumNumber) protoreflect.Enum {\n\tif e, ok := t.m.Load(n); ok {\n\t\treturn e.(protoreflect.Enum)\n\t}\n\te := &legacyEnumWrapper{num: n, pbTyp: t, goTyp: t.goType}\n\tt.m.Store(n, e)\n\treturn e\n}\nfunc (t *legacyEnumType) Descriptor() protoreflect.EnumDescriptor {\n\treturn t.desc\n}\n\ntype legacyEnumWrapper struct {\n\tnum   protoreflect.EnumNumber\n\tpbTyp protoreflect.EnumType\n\tgoTyp reflect.Type\n}\n\nfunc (e *legacyEnumWrapper) Descriptor() protoreflect.EnumDescriptor {\n\treturn e.pbTyp.Descriptor()\n}\nfunc (e *legacyEnumWrapper) Type() protoreflect.EnumType {\n\treturn e.pbTyp\n}\nfunc (e *legacyEnumWrapper) Number() protoreflect.EnumNumber {\n\treturn e.num\n}\nfunc (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {\n\treturn e\n}\nfunc (e *legacyEnumWrapper) protoUnwrap() any {\n\tv := reflect.New(e.goTyp).Elem()\n\tv.SetInt(int64(e.num))\n\treturn v.Interface()\n}\n\nvar (\n\t_ protoreflect.Enum = (*legacyEnumWrapper)(nil)\n\t_ unwrapper         = (*legacyEnumWrapper)(nil)\n)\n\nvar legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor\n\n// LegacyLoadEnumDesc returns an EnumDescriptor derived from the Go type,\n// which must be an int32 kind and not implement the v2 API already.\n//\n// This is exported for testing purposes.\nfunc LegacyLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor {\n\t// Fast-path: check if an EnumDescriptor is cached for this concrete type.\n\tif ed, ok := legacyEnumDescCache.Load(t); ok {\n\t\treturn ed.(protoreflect.EnumDescriptor)\n\t}\n\n\t// Slow-path: initialize EnumDescriptor from the raw descriptor.\n\tev := reflect.Zero(t).Interface()\n\tif _, ok := ev.(protoreflect.Enum); ok {\n\t\tpanic(fmt.Sprintf(\"%v already implements proto.Enum\", t))\n\t}\n\tedV1, ok := ev.(enumV1)\n\tif !ok {\n\t\treturn aberrantLoadEnumDesc(t)\n\t}\n\tb, idxs := edV1.EnumDescriptor()\n\n\tvar ed protoreflect.EnumDescriptor\n\tif len(idxs) == 1 {\n\t\ted = legacyLoadFileDesc(b).Enums().Get(idxs[0])\n\t} else {\n\t\tmd := legacyLoadFileDesc(b).Messages().Get(idxs[0])\n\t\tfor _, i := range idxs[1 : len(idxs)-1] {\n\t\t\tmd = md.Messages().Get(i)\n\t\t}\n\t\ted = md.Enums().Get(idxs[len(idxs)-1])\n\t}\n\tif ed, ok := legacyEnumDescCache.LoadOrStore(t, ed); ok {\n\t\treturn ed.(protoreflect.EnumDescriptor)\n\t}\n\treturn ed\n}\n\nvar aberrantEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor\n\n// aberrantLoadEnumDesc returns an EnumDescriptor derived from the Go type,\n// which must not implement protoreflect.Enum or enumV1.\n//\n// If the type does not implement enumV1, then there is no reliable\n// way to derive the original protobuf type information.\n// We are unable to use the global enum registry since it is\n// unfortunately keyed by the protobuf full name, which we also do not know.\n// Thus, this produces some bogus enum descriptor based on the Go type name.\nfunc aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor {\n\t// Fast-path: check if an EnumDescriptor is cached for this concrete type.\n\tif ed, ok := aberrantEnumDescCache.Load(t); ok {\n\t\treturn ed.(protoreflect.EnumDescriptor)\n\t}\n\n\t// Slow-path: construct a bogus, but unique EnumDescriptor.\n\ted := &filedesc.Enum{L2: new(filedesc.EnumL2)}\n\ted.L0.FullName = AberrantDeriveFullName(t) // e.g., github_com.user.repo.MyEnum\n\ted.L0.ParentFile = filedesc.SurrogateProto3\n\ted.L1.EditionFeatures = ed.L0.ParentFile.L1.EditionFeatures\n\ted.L2.Values.List = append(ed.L2.Values.List, filedesc.EnumValue{})\n\n\t// TODO: Use the presence of a UnmarshalJSON method to determine proto2?\n\n\tvd := &ed.L2.Values.List[0]\n\tvd.L0.FullName = ed.L0.FullName + \"_UNKNOWN\" // e.g., github_com.user.repo.MyEnum_UNKNOWN\n\tvd.L0.ParentFile = ed.L0.ParentFile\n\tvd.L0.Parent = ed\n\n\t// TODO: We could use the String method to obtain some enum value names by\n\t// starting at 0 and print the enum until it produces invalid identifiers.\n\t// An exhaustive query is clearly impractical, but can be best-effort.\n\n\tif ed, ok := aberrantEnumDescCache.LoadOrStore(t, ed); ok {\n\t\treturn ed.(protoreflect.EnumDescriptor)\n\t}\n\treturn ed\n}\n\n// AberrantDeriveFullName derives a fully qualified protobuf name for the given Go type\n// The provided name is not guaranteed to be stable nor universally unique.\n// It should be sufficiently unique within a program.\n//\n// This is exported for testing purposes.\nfunc AberrantDeriveFullName(t reflect.Type) protoreflect.FullName {\n\tsanitize := func(r rune) rune {\n\t\tswitch {\n\t\tcase r == '/':\n\t\t\treturn '.'\n\t\tcase 'a' <= r && r <= 'z', 'A' <= r && r <= 'Z', '0' <= r && r <= '9':\n\t\t\treturn r\n\t\tdefault:\n\t\t\treturn '_'\n\t\t}\n\t}\n\tprefix := strings.Map(sanitize, t.PkgPath())\n\tsuffix := strings.Map(sanitize, t.Name())\n\tif suffix == \"\" {\n\t\tsuffix = fmt.Sprintf(\"UnknownX%X\", reflect.ValueOf(t).Pointer())\n\t}\n\n\tss := append(strings.Split(prefix, \".\"), suffix)\n\tfor i, s := range ss {\n\t\tif s == \"\" || ('0' <= s[0] && s[0] <= '9') {\n\t\t\tss[i] = \"x\" + s\n\t\t}\n\t}\n\treturn protoreflect.FullName(strings.Join(ss, \".\"))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/legacy_export.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"encoding/binary\"\n\t\"encoding/json\"\n\t\"hash/crc32\"\n\t\"math\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// These functions exist to support exported APIs in generated protobufs.\n// While these are deprecated, they cannot be removed for compatibility reasons.\n\n// LegacyEnumName returns the name of enums used in legacy code.\nfunc (Export) LegacyEnumName(ed protoreflect.EnumDescriptor) string {\n\treturn legacyEnumName(ed)\n}\n\n// LegacyMessageTypeOf returns the protoreflect.MessageType for m,\n// with name used as the message name if necessary.\nfunc (Export) LegacyMessageTypeOf(m protoiface.MessageV1, name protoreflect.FullName) protoreflect.MessageType {\n\tif mv := (Export{}).protoMessageV2Of(m); mv != nil {\n\t\treturn mv.ProtoReflect().Type()\n\t}\n\treturn legacyLoadMessageType(reflect.TypeOf(m), name)\n}\n\n// UnmarshalJSONEnum unmarshals an enum from a JSON-encoded input.\n// The input can either be a string representing the enum value by name,\n// or a number representing the enum number itself.\nfunc (Export) UnmarshalJSONEnum(ed protoreflect.EnumDescriptor, b []byte) (protoreflect.EnumNumber, error) {\n\tif b[0] == '\"' {\n\t\tvar name protoreflect.Name\n\t\tif err := json.Unmarshal(b, &name); err != nil {\n\t\t\treturn 0, errors.New(\"invalid input for enum %v: %s\", ed.FullName(), b)\n\t\t}\n\t\tev := ed.Values().ByName(name)\n\t\tif ev == nil {\n\t\t\treturn 0, errors.New(\"invalid value for enum %v: %s\", ed.FullName(), name)\n\t\t}\n\t\treturn ev.Number(), nil\n\t} else {\n\t\tvar num protoreflect.EnumNumber\n\t\tif err := json.Unmarshal(b, &num); err != nil {\n\t\t\treturn 0, errors.New(\"invalid input for enum %v: %s\", ed.FullName(), b)\n\t\t}\n\t\treturn num, nil\n\t}\n}\n\n// CompressGZIP compresses the input as a GZIP-encoded file.\n// The current implementation does no compression.\nfunc (Export) CompressGZIP(in []byte) (out []byte) {\n\t// RFC 1952, section 2.3.1.\n\tvar gzipHeader = [10]byte{0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff}\n\n\t// RFC 1951, section 3.2.4.\n\tvar blockHeader [5]byte\n\tconst maxBlockSize = math.MaxUint16\n\tnumBlocks := 1 + len(in)/maxBlockSize\n\n\t// RFC 1952, section 2.3.1.\n\tvar gzipFooter [8]byte\n\tbinary.LittleEndian.PutUint32(gzipFooter[0:4], crc32.ChecksumIEEE(in))\n\tbinary.LittleEndian.PutUint32(gzipFooter[4:8], uint32(len(in)))\n\n\t// Encode the input without compression using raw DEFLATE blocks.\n\tout = make([]byte, 0, len(gzipHeader)+len(blockHeader)*numBlocks+len(in)+len(gzipFooter))\n\tout = append(out, gzipHeader[:]...)\n\tfor blockHeader[0] == 0 {\n\t\tblockSize := maxBlockSize\n\t\tif blockSize > len(in) {\n\t\t\tblockHeader[0] = 0x01 // final bit per RFC 1951, section 3.2.3.\n\t\t\tblockSize = len(in)\n\t\t}\n\t\tbinary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize))\n\t\tbinary.LittleEndian.PutUint16(blockHeader[3:5], ^uint16(blockSize))\n\t\tout = append(out, blockHeader[:]...)\n\t\tout = append(out, in[:blockSize]...)\n\t\tin = in[blockSize:]\n\t}\n\tout = append(out, gzipFooter[:]...)\n\treturn out\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/internal/descopts\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\tptag \"google.golang.org/protobuf/internal/encoding/tag\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nfunc (xi *ExtensionInfo) initToLegacy() {\n\txd := xi.desc\n\tvar parent protoiface.MessageV1\n\tmessageName := xd.ContainingMessage().FullName()\n\tif mt, _ := protoregistry.GlobalTypes.FindMessageByName(messageName); mt != nil {\n\t\t// Create a new parent message and unwrap it if possible.\n\t\tmv := mt.New().Interface()\n\t\tt := reflect.TypeOf(mv)\n\t\tif mv, ok := mv.(unwrapper); ok {\n\t\t\tt = reflect.TypeOf(mv.protoUnwrap())\n\t\t}\n\n\t\t// Check whether the message implements the legacy v1 Message interface.\n\t\tmz := reflect.Zero(t).Interface()\n\t\tif mz, ok := mz.(protoiface.MessageV1); ok {\n\t\t\tparent = mz\n\t\t}\n\t}\n\n\t// Determine the v1 extension type, which is unfortunately not the same as\n\t// the v2 ExtensionType.GoType.\n\textType := xi.goType\n\tswitch extType.Kind() {\n\tcase reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:\n\t\textType = reflect.PtrTo(extType) // T -> *T for singular scalar fields\n\t}\n\n\t// Reconstruct the legacy enum full name.\n\tvar enumName string\n\tif xd.Kind() == protoreflect.EnumKind {\n\t\tenumName = legacyEnumName(xd.Enum())\n\t}\n\n\t// Derive the proto file that the extension was declared within.\n\tvar filename string\n\tif fd := xd.ParentFile(); fd != nil {\n\t\tfilename = fd.Path()\n\t}\n\n\t// For MessageSet extensions, the name used is the parent message.\n\tname := xd.FullName()\n\tif messageset.IsMessageSetExtension(xd) {\n\t\tname = name.Parent()\n\t}\n\n\txi.ExtendedType = parent\n\txi.ExtensionType = reflect.Zero(extType).Interface()\n\txi.Field = int32(xd.Number())\n\txi.Name = string(name)\n\txi.Tag = ptag.Marshal(xd, enumName)\n\txi.Filename = filename\n}\n\n// initFromLegacy initializes an ExtensionInfo from\n// the contents of the deprecated exported fields of the type.\nfunc (xi *ExtensionInfo) initFromLegacy() {\n\t// The v1 API returns \"type incomplete\" descriptors where only the\n\t// field number is specified. In such a case, use a placeholder.\n\tif xi.ExtendedType == nil || xi.ExtensionType == nil {\n\t\txd := placeholderExtension{\n\t\t\tname:   protoreflect.FullName(xi.Name),\n\t\t\tnumber: protoreflect.FieldNumber(xi.Field),\n\t\t}\n\t\txi.desc = extensionTypeDescriptor{xd, xi}\n\t\treturn\n\t}\n\n\t// Resolve enum or message dependencies.\n\tvar ed protoreflect.EnumDescriptor\n\tvar md protoreflect.MessageDescriptor\n\tt := reflect.TypeOf(xi.ExtensionType)\n\tisOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct\n\tisRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8\n\tif isOptional || isRepeated {\n\t\tt = t.Elem()\n\t}\n\tswitch v := reflect.Zero(t).Interface().(type) {\n\tcase protoreflect.Enum:\n\t\ted = v.Descriptor()\n\tcase enumV1:\n\t\ted = LegacyLoadEnumDesc(t)\n\tcase protoreflect.ProtoMessage:\n\t\tmd = v.ProtoReflect().Descriptor()\n\tcase messageV1:\n\t\tmd = LegacyLoadMessageDesc(t)\n\t}\n\n\t// Derive basic field information from the struct tag.\n\tvar evs protoreflect.EnumValueDescriptors\n\tif ed != nil {\n\t\tevs = ed.Values()\n\t}\n\tfd := ptag.Unmarshal(xi.Tag, t, evs).(*filedesc.Field)\n\n\t// Construct a v2 ExtensionType.\n\txd := &filedesc.Extension{L2: new(filedesc.ExtensionL2)}\n\txd.L0.ParentFile = filedesc.SurrogateProto2\n\txd.L0.FullName = protoreflect.FullName(xi.Name)\n\txd.L1.Number = protoreflect.FieldNumber(xi.Field)\n\txd.L1.Cardinality = fd.L1.Cardinality\n\txd.L1.Kind = fd.L1.Kind\n\txd.L1.EditionFeatures = fd.L1.EditionFeatures\n\txd.L2.Default = fd.L1.Default\n\txd.L1.Extendee = Export{}.MessageDescriptorOf(xi.ExtendedType)\n\txd.L2.Enum = ed\n\txd.L2.Message = md\n\n\t// Derive real extension field name for MessageSets.\n\tif messageset.IsMessageSet(xd.L1.Extendee) && md.FullName() == xd.L0.FullName {\n\t\txd.L0.FullName = xd.L0.FullName.Append(messageset.ExtensionName)\n\t}\n\n\ttt := reflect.TypeOf(xi.ExtensionType)\n\tif isOptional {\n\t\ttt = tt.Elem()\n\t}\n\txi.goType = tt\n\txi.desc = extensionTypeDescriptor{xd, xi}\n}\n\ntype placeholderExtension struct {\n\tname   protoreflect.FullName\n\tnumber protoreflect.FieldNumber\n}\n\nfunc (x placeholderExtension) ParentFile() protoreflect.FileDescriptor            { return nil }\nfunc (x placeholderExtension) Parent() protoreflect.Descriptor                    { return nil }\nfunc (x placeholderExtension) Index() int                                         { return 0 }\nfunc (x placeholderExtension) Syntax() protoreflect.Syntax                        { return 0 }\nfunc (x placeholderExtension) Name() protoreflect.Name                            { return x.name.Name() }\nfunc (x placeholderExtension) FullName() protoreflect.FullName                    { return x.name }\nfunc (x placeholderExtension) IsPlaceholder() bool                                { return true }\nfunc (x placeholderExtension) Options() protoreflect.ProtoMessage                 { return descopts.Field }\nfunc (x placeholderExtension) Number() protoreflect.FieldNumber                   { return x.number }\nfunc (x placeholderExtension) Cardinality() protoreflect.Cardinality              { return 0 }\nfunc (x placeholderExtension) Kind() protoreflect.Kind                            { return 0 }\nfunc (x placeholderExtension) HasJSONName() bool                                  { return false }\nfunc (x placeholderExtension) JSONName() string                                   { return \"[\" + string(x.name) + \"]\" }\nfunc (x placeholderExtension) TextName() string                                   { return \"[\" + string(x.name) + \"]\" }\nfunc (x placeholderExtension) HasPresence() bool                                  { return false }\nfunc (x placeholderExtension) HasOptionalKeyword() bool                           { return false }\nfunc (x placeholderExtension) IsExtension() bool                                  { return true }\nfunc (x placeholderExtension) IsWeak() bool                                       { return false }\nfunc (x placeholderExtension) IsLazy() bool                                       { return false }\nfunc (x placeholderExtension) IsPacked() bool                                     { return false }\nfunc (x placeholderExtension) IsList() bool                                       { return false }\nfunc (x placeholderExtension) IsMap() bool                                        { return false }\nfunc (x placeholderExtension) MapKey() protoreflect.FieldDescriptor               { return nil }\nfunc (x placeholderExtension) MapValue() protoreflect.FieldDescriptor             { return nil }\nfunc (x placeholderExtension) HasDefault() bool                                   { return false }\nfunc (x placeholderExtension) Default() protoreflect.Value                        { return protoreflect.Value{} }\nfunc (x placeholderExtension) DefaultEnumValue() protoreflect.EnumValueDescriptor { return nil }\nfunc (x placeholderExtension) ContainingOneof() protoreflect.OneofDescriptor      { return nil }\nfunc (x placeholderExtension) ContainingMessage() protoreflect.MessageDescriptor  { return nil }\nfunc (x placeholderExtension) Enum() protoreflect.EnumDescriptor                  { return nil }\nfunc (x placeholderExtension) Message() protoreflect.MessageDescriptor            { return nil }\nfunc (x placeholderExtension) ProtoType(protoreflect.FieldDescriptor)             { return }\nfunc (x placeholderExtension) ProtoInternal(pragma.DoNotImplement)                { return }\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/legacy_file.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"io\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\n// Every enum and message type generated by protoc-gen-go since commit 2fc053c5\n// on February 25th, 2016 has had a method to get the raw descriptor.\n// Types that were not generated by protoc-gen-go or were generated prior\n// to that version are not supported.\n//\n// The []byte returned is the encoded form of a FileDescriptorProto message\n// compressed using GZIP. The []int is the path from the top-level file\n// to the specific message or enum declaration.\ntype (\n\tenumV1 interface {\n\t\tEnumDescriptor() ([]byte, []int)\n\t}\n\tmessageV1 interface {\n\t\tDescriptor() ([]byte, []int)\n\t}\n)\n\nvar legacyFileDescCache sync.Map // map[*byte]protoreflect.FileDescriptor\n\n// legacyLoadFileDesc unmarshals b as a compressed FileDescriptorProto message.\n//\n// This assumes that b is immutable and that b does not refer to part of a\n// concatenated series of GZIP files (which would require shenanigans that\n// rely on the concatenation properties of both protobufs and GZIP).\n// File descriptors generated by protoc-gen-go do not rely on that property.\nfunc legacyLoadFileDesc(b []byte) protoreflect.FileDescriptor {\n\t// Fast-path: check whether we already have a cached file descriptor.\n\tif fd, ok := legacyFileDescCache.Load(&b[0]); ok {\n\t\treturn fd.(protoreflect.FileDescriptor)\n\t}\n\n\t// Slow-path: decompress and unmarshal the file descriptor proto.\n\tzr, err := gzip.NewReader(bytes.NewReader(b))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tb2, err := io.ReadAll(zr)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfd := filedesc.Builder{\n\t\tRawDescriptor: b2,\n\t\tFileRegistry:  resolverOnly{protoregistry.GlobalFiles}, // do not register back to global registry\n\t}.Build().File\n\tif fd, ok := legacyFileDescCache.LoadOrStore(&b[0], fd); ok {\n\t\treturn fd.(protoreflect.FileDescriptor)\n\t}\n\treturn fd\n}\n\ntype resolverOnly struct {\n\treg *protoregistry.Files\n}\n\nfunc (r resolverOnly) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {\n\treturn r.reg.FindFileByPath(path)\n}\nfunc (r resolverOnly) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {\n\treturn r.reg.FindDescriptorByName(name)\n}\nfunc (resolverOnly) RegisterFile(protoreflect.FileDescriptor) error {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/legacy_message.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/descopts\"\n\tptag \"google.golang.org/protobuf/internal/encoding/tag\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// legacyWrapMessage wraps v as a protoreflect.Message,\n// where v must be a *struct kind and not implement the v2 API already.\nfunc legacyWrapMessage(v reflect.Value) protoreflect.Message {\n\tt := v.Type()\n\tif t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {\n\t\treturn aberrantMessage{v: v}\n\t}\n\tmt := legacyLoadMessageInfo(t, \"\")\n\treturn mt.MessageOf(v.Interface())\n}\n\n// legacyLoadMessageType dynamically loads a protoreflect.Type for t,\n// where t must be not implement the v2 API already.\n// The provided name is used if it cannot be determined from the message.\nfunc legacyLoadMessageType(t reflect.Type, name protoreflect.FullName) protoreflect.MessageType {\n\tif t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {\n\t\treturn aberrantMessageType{t}\n\t}\n\treturn legacyLoadMessageInfo(t, name)\n}\n\nvar legacyMessageTypeCache sync.Map // map[reflect.Type]*MessageInfo\n\n// legacyLoadMessageInfo dynamically loads a *MessageInfo for t,\n// where t must be a *struct kind and not implement the v2 API already.\n// The provided name is used if it cannot be determined from the message.\nfunc legacyLoadMessageInfo(t reflect.Type, name protoreflect.FullName) *MessageInfo {\n\t// Fast-path: check if a MessageInfo is cached for this concrete type.\n\tif mt, ok := legacyMessageTypeCache.Load(t); ok {\n\t\treturn mt.(*MessageInfo)\n\t}\n\n\t// Slow-path: derive message descriptor and initialize MessageInfo.\n\tmi := &MessageInfo{\n\t\tDesc:          legacyLoadMessageDesc(t, name),\n\t\tGoReflectType: t,\n\t}\n\n\tvar hasMarshal, hasUnmarshal bool\n\tv := reflect.Zero(t).Interface()\n\tif _, hasMarshal = v.(legacyMarshaler); hasMarshal {\n\t\tmi.methods.Marshal = legacyMarshal\n\n\t\t// We have no way to tell whether the type's Marshal method\n\t\t// supports deterministic serialization or not, but this\n\t\t// preserves the v1 implementation's behavior of always\n\t\t// calling Marshal methods when present.\n\t\tmi.methods.Flags |= protoiface.SupportMarshalDeterministic\n\t}\n\tif _, hasUnmarshal = v.(legacyUnmarshaler); hasUnmarshal {\n\t\tmi.methods.Unmarshal = legacyUnmarshal\n\t}\n\tif _, hasMerge := v.(legacyMerger); hasMerge || (hasMarshal && hasUnmarshal) {\n\t\tmi.methods.Merge = legacyMerge\n\t}\n\n\tif mi, ok := legacyMessageTypeCache.LoadOrStore(t, mi); ok {\n\t\treturn mi.(*MessageInfo)\n\t}\n\treturn mi\n}\n\nvar legacyMessageDescCache sync.Map // map[reflect.Type]protoreflect.MessageDescriptor\n\n// LegacyLoadMessageDesc returns an MessageDescriptor derived from the Go type,\n// which should be a *struct kind and must not implement the v2 API already.\n//\n// This is exported for testing purposes.\nfunc LegacyLoadMessageDesc(t reflect.Type) protoreflect.MessageDescriptor {\n\treturn legacyLoadMessageDesc(t, \"\")\n}\nfunc legacyLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {\n\t// Fast-path: check if a MessageDescriptor is cached for this concrete type.\n\tif mi, ok := legacyMessageDescCache.Load(t); ok {\n\t\treturn mi.(protoreflect.MessageDescriptor)\n\t}\n\n\t// Slow-path: initialize MessageDescriptor from the raw descriptor.\n\tmv := reflect.Zero(t).Interface()\n\tif _, ok := mv.(protoreflect.ProtoMessage); ok {\n\t\tpanic(fmt.Sprintf(\"%v already implements proto.Message\", t))\n\t}\n\tmdV1, ok := mv.(messageV1)\n\tif !ok {\n\t\treturn aberrantLoadMessageDesc(t, name)\n\t}\n\n\t// If this is a dynamic message type where there isn't a 1-1 mapping between\n\t// Go and protobuf types, calling the Descriptor method on the zero value of\n\t// the message type isn't likely to work. If it panics, swallow the panic and\n\t// continue as if the Descriptor method wasn't present.\n\tb, idxs := func() ([]byte, []int) {\n\t\tdefer func() {\n\t\t\trecover()\n\t\t}()\n\t\treturn mdV1.Descriptor()\n\t}()\n\tif b == nil {\n\t\treturn aberrantLoadMessageDesc(t, name)\n\t}\n\n\t// If the Go type has no fields, then this might be a proto3 empty message\n\t// from before the size cache was added. If there are any fields, check to\n\t// see that at least one of them looks like something we generated.\n\tif t.Elem().Kind() == reflect.Struct {\n\t\tif nfield := t.Elem().NumField(); nfield > 0 {\n\t\t\thasProtoField := false\n\t\t\tfor i := 0; i < nfield; i++ {\n\t\t\t\tf := t.Elem().Field(i)\n\t\t\t\tif f.Tag.Get(\"protobuf\") != \"\" || f.Tag.Get(\"protobuf_oneof\") != \"\" || strings.HasPrefix(f.Name, \"XXX_\") {\n\t\t\t\t\thasProtoField = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !hasProtoField {\n\t\t\t\treturn aberrantLoadMessageDesc(t, name)\n\t\t\t}\n\t\t}\n\t}\n\n\tmd := legacyLoadFileDesc(b).Messages().Get(idxs[0])\n\tfor _, i := range idxs[1:] {\n\t\tmd = md.Messages().Get(i)\n\t}\n\tif name != \"\" && md.FullName() != name {\n\t\tpanic(fmt.Sprintf(\"mismatching message name: got %v, want %v\", md.FullName(), name))\n\t}\n\tif md, ok := legacyMessageDescCache.LoadOrStore(t, md); ok {\n\t\treturn md.(protoreflect.MessageDescriptor)\n\t}\n\treturn md\n}\n\nvar (\n\taberrantMessageDescLock  sync.Mutex\n\taberrantMessageDescCache map[reflect.Type]protoreflect.MessageDescriptor\n)\n\n// aberrantLoadMessageDesc returns an MessageDescriptor derived from the Go type,\n// which must not implement protoreflect.ProtoMessage or messageV1.\n//\n// This is a best-effort derivation of the message descriptor using the protobuf\n// tags on the struct fields.\nfunc aberrantLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {\n\taberrantMessageDescLock.Lock()\n\tdefer aberrantMessageDescLock.Unlock()\n\tif aberrantMessageDescCache == nil {\n\t\taberrantMessageDescCache = make(map[reflect.Type]protoreflect.MessageDescriptor)\n\t}\n\treturn aberrantLoadMessageDescReentrant(t, name)\n}\nfunc aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor {\n\t// Fast-path: check if an MessageDescriptor is cached for this concrete type.\n\tif md, ok := aberrantMessageDescCache[t]; ok {\n\t\treturn md\n\t}\n\n\t// Slow-path: construct a descriptor from the Go struct type (best-effort).\n\t// Cache the MessageDescriptor early on so that we can resolve internal\n\t// cyclic references.\n\tmd := &filedesc.Message{L2: new(filedesc.MessageL2)}\n\tmd.L0.FullName = aberrantDeriveMessageName(t, name)\n\tmd.L0.ParentFile = filedesc.SurrogateProto2\n\taberrantMessageDescCache[t] = md\n\n\tif t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct {\n\t\treturn md\n\t}\n\n\t// Try to determine if the message is using proto3 by checking scalars.\n\tfor i := 0; i < t.Elem().NumField(); i++ {\n\t\tf := t.Elem().Field(i)\n\t\tif tag := f.Tag.Get(\"protobuf\"); tag != \"\" {\n\t\t\tswitch f.Type.Kind() {\n\t\t\tcase reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:\n\t\t\t\tmd.L0.ParentFile = filedesc.SurrogateProto3\n\t\t\t}\n\t\t\tfor _, s := range strings.Split(tag, \",\") {\n\t\t\t\tif s == \"proto3\" {\n\t\t\t\t\tmd.L0.ParentFile = filedesc.SurrogateProto3\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmd.L1.EditionFeatures = md.L0.ParentFile.L1.EditionFeatures\n\t// Obtain a list of oneof wrapper types.\n\tvar oneofWrappers []reflect.Type\n\tmethods := make([]reflect.Method, 0, 2)\n\tif m, ok := t.MethodByName(\"XXX_OneofFuncs\"); ok {\n\t\tmethods = append(methods, m)\n\t}\n\tif m, ok := t.MethodByName(\"XXX_OneofWrappers\"); ok {\n\t\tmethods = append(methods, m)\n\t}\n\tfor _, fn := range methods {\n\t\tfor _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {\n\t\t\tif vs, ok := v.Interface().([]any); ok {\n\t\t\t\tfor _, v := range vs {\n\t\t\t\t\toneofWrappers = append(oneofWrappers, reflect.TypeOf(v))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Obtain a list of the extension ranges.\n\tif fn, ok := t.MethodByName(\"ExtensionRangeArray\"); ok {\n\t\tvs := fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0]\n\t\tfor i := 0; i < vs.Len(); i++ {\n\t\t\tv := vs.Index(i)\n\t\t\tmd.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{\n\t\t\t\tprotoreflect.FieldNumber(v.FieldByName(\"Start\").Int()),\n\t\t\t\tprotoreflect.FieldNumber(v.FieldByName(\"End\").Int() + 1),\n\t\t\t})\n\t\t\tmd.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, nil)\n\t\t}\n\t}\n\n\t// Derive the message fields by inspecting the struct fields.\n\tfor i := 0; i < t.Elem().NumField(); i++ {\n\t\tf := t.Elem().Field(i)\n\t\tif tag := f.Tag.Get(\"protobuf\"); tag != \"\" {\n\t\t\ttagKey := f.Tag.Get(\"protobuf_key\")\n\t\t\ttagVal := f.Tag.Get(\"protobuf_val\")\n\t\t\taberrantAppendField(md, f.Type, tag, tagKey, tagVal)\n\t\t}\n\t\tif tag := f.Tag.Get(\"protobuf_oneof\"); tag != \"\" {\n\t\t\tn := len(md.L2.Oneofs.List)\n\t\t\tmd.L2.Oneofs.List = append(md.L2.Oneofs.List, filedesc.Oneof{})\n\t\t\tod := &md.L2.Oneofs.List[n]\n\t\t\tod.L0.FullName = md.FullName().Append(protoreflect.Name(tag))\n\t\t\tod.L0.ParentFile = md.L0.ParentFile\n\t\t\tod.L1.EditionFeatures = md.L1.EditionFeatures\n\t\t\tod.L0.Parent = md\n\t\t\tod.L0.Index = n\n\n\t\t\tfor _, t := range oneofWrappers {\n\t\t\t\tif t.Implements(f.Type) {\n\t\t\t\t\tf := t.Elem().Field(0)\n\t\t\t\t\tif tag := f.Tag.Get(\"protobuf\"); tag != \"\" {\n\t\t\t\t\t\taberrantAppendField(md, f.Type, tag, \"\", \"\")\n\t\t\t\t\t\tfd := &md.L2.Fields.List[len(md.L2.Fields.List)-1]\n\t\t\t\t\t\tfd.L1.ContainingOneof = od\n\t\t\t\t\t\tfd.L1.EditionFeatures = od.L1.EditionFeatures\n\t\t\t\t\t\tod.L1.Fields.List = append(od.L1.Fields.List, fd)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn md\n}\n\nfunc aberrantDeriveMessageName(t reflect.Type, name protoreflect.FullName) protoreflect.FullName {\n\tif name.IsValid() {\n\t\treturn name\n\t}\n\tfunc() {\n\t\tdefer func() { recover() }() // swallow possible nil panics\n\t\tif m, ok := reflect.Zero(t).Interface().(interface{ XXX_MessageName() string }); ok {\n\t\t\tname = protoreflect.FullName(m.XXX_MessageName())\n\t\t}\n\t}()\n\tif name.IsValid() {\n\t\treturn name\n\t}\n\tif t.Kind() == reflect.Ptr {\n\t\tt = t.Elem()\n\t}\n\treturn AberrantDeriveFullName(t)\n}\n\nfunc aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, tagVal string) {\n\tt := goType\n\tisOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct\n\tisRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8\n\tif isOptional || isRepeated {\n\t\tt = t.Elem()\n\t}\n\tfd := ptag.Unmarshal(tag, t, placeholderEnumValues{}).(*filedesc.Field)\n\n\t// Append field descriptor to the message.\n\tn := len(md.L2.Fields.List)\n\tmd.L2.Fields.List = append(md.L2.Fields.List, *fd)\n\tfd = &md.L2.Fields.List[n]\n\tfd.L0.FullName = md.FullName().Append(fd.Name())\n\tfd.L0.ParentFile = md.L0.ParentFile\n\tfd.L0.Parent = md\n\tfd.L0.Index = n\n\n\tif fd.L1.EditionFeatures.IsPacked {\n\t\tfd.L1.Options = func() protoreflect.ProtoMessage {\n\t\t\topts := descopts.Field.ProtoReflect().New()\n\t\t\tif fd.L1.EditionFeatures.IsPacked {\n\t\t\t\topts.Set(opts.Descriptor().Fields().ByName(\"packed\"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked))\n\t\t\t}\n\t\t\treturn opts.Interface()\n\t\t}\n\t}\n\n\t// Populate Enum and Message.\n\tif fd.Enum() == nil && fd.Kind() == protoreflect.EnumKind {\n\t\tswitch v := reflect.Zero(t).Interface().(type) {\n\t\tcase protoreflect.Enum:\n\t\t\tfd.L1.Enum = v.Descriptor()\n\t\tdefault:\n\t\t\tfd.L1.Enum = LegacyLoadEnumDesc(t)\n\t\t}\n\t}\n\tif fd.Message() == nil && (fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind) {\n\t\tswitch v := reflect.Zero(t).Interface().(type) {\n\t\tcase protoreflect.ProtoMessage:\n\t\t\tfd.L1.Message = v.ProtoReflect().Descriptor()\n\t\tcase messageV1:\n\t\t\tfd.L1.Message = LegacyLoadMessageDesc(t)\n\t\tdefault:\n\t\t\tif t.Kind() == reflect.Map {\n\t\t\t\tn := len(md.L1.Messages.List)\n\t\t\t\tmd.L1.Messages.List = append(md.L1.Messages.List, filedesc.Message{L2: new(filedesc.MessageL2)})\n\t\t\t\tmd2 := &md.L1.Messages.List[n]\n\t\t\t\tmd2.L0.FullName = md.FullName().Append(protoreflect.Name(strs.MapEntryName(string(fd.Name()))))\n\t\t\t\tmd2.L0.ParentFile = md.L0.ParentFile\n\t\t\t\tmd2.L0.Parent = md\n\t\t\t\tmd2.L0.Index = n\n\t\t\t\tmd2.L1.EditionFeatures = md.L1.EditionFeatures\n\n\t\t\t\tmd2.L1.IsMapEntry = true\n\t\t\t\tmd2.L2.Options = func() protoreflect.ProtoMessage {\n\t\t\t\t\topts := descopts.Message.ProtoReflect().New()\n\t\t\t\t\topts.Set(opts.Descriptor().Fields().ByName(\"map_entry\"), protoreflect.ValueOfBool(true))\n\t\t\t\t\treturn opts.Interface()\n\t\t\t\t}\n\n\t\t\t\taberrantAppendField(md2, t.Key(), tagKey, \"\", \"\")\n\t\t\t\taberrantAppendField(md2, t.Elem(), tagVal, \"\", \"\")\n\n\t\t\t\tfd.L1.Message = md2\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tfd.L1.Message = aberrantLoadMessageDescReentrant(t, \"\")\n\t\t}\n\t}\n}\n\ntype placeholderEnumValues struct {\n\tprotoreflect.EnumValueDescriptors\n}\n\nfunc (placeholderEnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor {\n\treturn filedesc.PlaceholderEnumValue(protoreflect.FullName(fmt.Sprintf(\"UNKNOWN_%d\", n)))\n}\n\n// legacyMarshaler is the proto.Marshaler interface superseded by protoiface.Methoder.\ntype legacyMarshaler interface {\n\tMarshal() ([]byte, error)\n}\n\n// legacyUnmarshaler is the proto.Unmarshaler interface superseded by protoiface.Methoder.\ntype legacyUnmarshaler interface {\n\tUnmarshal([]byte) error\n}\n\n// legacyMerger is the proto.Merger interface superseded by protoiface.Methoder.\ntype legacyMerger interface {\n\tMerge(protoiface.MessageV1)\n}\n\nvar aberrantProtoMethods = &protoiface.Methods{\n\tMarshal:   legacyMarshal,\n\tUnmarshal: legacyUnmarshal,\n\tMerge:     legacyMerge,\n\n\t// We have no way to tell whether the type's Marshal method\n\t// supports deterministic serialization or not, but this\n\t// preserves the v1 implementation's behavior of always\n\t// calling Marshal methods when present.\n\tFlags: protoiface.SupportMarshalDeterministic,\n}\n\nfunc legacyMarshal(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {\n\tv := in.Message.(unwrapper).protoUnwrap()\n\tmarshaler, ok := v.(legacyMarshaler)\n\tif !ok {\n\t\treturn protoiface.MarshalOutput{}, errors.New(\"%T does not implement Marshal\", v)\n\t}\n\tout, err := marshaler.Marshal()\n\tif in.Buf != nil {\n\t\tout = append(in.Buf, out...)\n\t}\n\treturn protoiface.MarshalOutput{\n\t\tBuf: out,\n\t}, err\n}\n\nfunc legacyUnmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {\n\tv := in.Message.(unwrapper).protoUnwrap()\n\tunmarshaler, ok := v.(legacyUnmarshaler)\n\tif !ok {\n\t\treturn protoiface.UnmarshalOutput{}, errors.New(\"%T does not implement Unmarshal\", v)\n\t}\n\treturn protoiface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf)\n}\n\nfunc legacyMerge(in protoiface.MergeInput) protoiface.MergeOutput {\n\t// Check whether this supports the legacy merger.\n\tdstv := in.Destination.(unwrapper).protoUnwrap()\n\tmerger, ok := dstv.(legacyMerger)\n\tif ok {\n\t\tmerger.Merge(Export{}.ProtoMessageV1Of(in.Source))\n\t\treturn protoiface.MergeOutput{Flags: protoiface.MergeComplete}\n\t}\n\n\t// If legacy merger is unavailable, implement merge in terms of\n\t// a marshal and unmarshal operation.\n\tsrcv := in.Source.(unwrapper).protoUnwrap()\n\tmarshaler, ok := srcv.(legacyMarshaler)\n\tif !ok {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\tdstv = in.Destination.(unwrapper).protoUnwrap()\n\tunmarshaler, ok := dstv.(legacyUnmarshaler)\n\tif !ok {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\tif !in.Source.IsValid() {\n\t\t// Legacy Marshal methods may not function on nil messages.\n\t\t// Check for a typed nil source only after we confirm that\n\t\t// legacy Marshal/Unmarshal methods are present, for\n\t\t// consistency.\n\t\treturn protoiface.MergeOutput{Flags: protoiface.MergeComplete}\n\t}\n\tb, err := marshaler.Marshal()\n\tif err != nil {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\terr = unmarshaler.Unmarshal(b)\n\tif err != nil {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\treturn protoiface.MergeOutput{Flags: protoiface.MergeComplete}\n}\n\n// aberrantMessageType implements MessageType for all types other than pointer-to-struct.\ntype aberrantMessageType struct {\n\tt reflect.Type\n}\n\nfunc (mt aberrantMessageType) New() protoreflect.Message {\n\tif mt.t.Kind() == reflect.Ptr {\n\t\treturn aberrantMessage{reflect.New(mt.t.Elem())}\n\t}\n\treturn aberrantMessage{reflect.Zero(mt.t)}\n}\nfunc (mt aberrantMessageType) Zero() protoreflect.Message {\n\treturn aberrantMessage{reflect.Zero(mt.t)}\n}\nfunc (mt aberrantMessageType) GoType() reflect.Type {\n\treturn mt.t\n}\nfunc (mt aberrantMessageType) Descriptor() protoreflect.MessageDescriptor {\n\treturn LegacyLoadMessageDesc(mt.t)\n}\n\n// aberrantMessage implements Message for all types other than pointer-to-struct.\n//\n// When the underlying type implements legacyMarshaler or legacyUnmarshaler,\n// the aberrant Message can be marshaled or unmarshaled. Otherwise, there is\n// not much that can be done with values of this type.\ntype aberrantMessage struct {\n\tv reflect.Value\n}\n\n// Reset implements the v1 proto.Message.Reset method.\nfunc (m aberrantMessage) Reset() {\n\tif mr, ok := m.v.Interface().(interface{ Reset() }); ok {\n\t\tmr.Reset()\n\t\treturn\n\t}\n\tif m.v.Kind() == reflect.Ptr && !m.v.IsNil() {\n\t\tm.v.Elem().Set(reflect.Zero(m.v.Type().Elem()))\n\t}\n}\n\nfunc (m aberrantMessage) ProtoReflect() protoreflect.Message {\n\treturn m\n}\n\nfunc (m aberrantMessage) Descriptor() protoreflect.MessageDescriptor {\n\treturn LegacyLoadMessageDesc(m.v.Type())\n}\nfunc (m aberrantMessage) Type() protoreflect.MessageType {\n\treturn aberrantMessageType{m.v.Type()}\n}\nfunc (m aberrantMessage) New() protoreflect.Message {\n\tif m.v.Type().Kind() == reflect.Ptr {\n\t\treturn aberrantMessage{reflect.New(m.v.Type().Elem())}\n\t}\n\treturn aberrantMessage{reflect.Zero(m.v.Type())}\n}\nfunc (m aberrantMessage) Interface() protoreflect.ProtoMessage {\n\treturn m\n}\nfunc (m aberrantMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\treturn\n}\nfunc (m aberrantMessage) Has(protoreflect.FieldDescriptor) bool {\n\treturn false\n}\nfunc (m aberrantMessage) Clear(protoreflect.FieldDescriptor) {\n\tpanic(\"invalid Message.Clear on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tif fd.Default().IsValid() {\n\t\treturn fd.Default()\n\t}\n\tpanic(\"invalid Message.Get on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) Set(protoreflect.FieldDescriptor, protoreflect.Value) {\n\tpanic(\"invalid Message.Set on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) Mutable(protoreflect.FieldDescriptor) protoreflect.Value {\n\tpanic(\"invalid Message.Mutable on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) NewField(protoreflect.FieldDescriptor) protoreflect.Value {\n\tpanic(\"invalid Message.NewField on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) WhichOneof(protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {\n\tpanic(\"invalid Message.WhichOneof descriptor on \" + string(m.Descriptor().FullName()))\n}\nfunc (m aberrantMessage) GetUnknown() protoreflect.RawFields {\n\treturn nil\n}\nfunc (m aberrantMessage) SetUnknown(protoreflect.RawFields) {\n\t// SetUnknown discards its input on messages which don't support unknown field storage.\n}\nfunc (m aberrantMessage) IsValid() bool {\n\tif m.v.Kind() == reflect.Ptr {\n\t\treturn !m.v.IsNil()\n\t}\n\treturn false\n}\nfunc (m aberrantMessage) ProtoMethods() *protoiface.Methods {\n\treturn aberrantProtoMethods\n}\nfunc (m aberrantMessage) protoUnwrap() any {\n\treturn m.v.Interface()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/merge.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\ntype mergeOptions struct{}\n\nfunc (o mergeOptions) Merge(dst, src proto.Message) {\n\tproto.Merge(dst, src)\n}\n\n// merge is protoreflect.Methods.Merge.\nfunc (mi *MessageInfo) merge(in protoiface.MergeInput) protoiface.MergeOutput {\n\tdp, ok := mi.getPointer(in.Destination)\n\tif !ok {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\tsp, ok := mi.getPointer(in.Source)\n\tif !ok {\n\t\treturn protoiface.MergeOutput{}\n\t}\n\tmi.mergePointer(dp, sp, mergeOptions{})\n\treturn protoiface.MergeOutput{Flags: protoiface.MergeComplete}\n}\n\nfunc (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {\n\tmi.init()\n\tif dst.IsNil() {\n\t\tpanic(fmt.Sprintf(\"invalid value: merging into nil message\"))\n\t}\n\tif src.IsNil() {\n\t\treturn\n\t}\n\n\tvar presenceSrc presence\n\tvar presenceDst presence\n\tif mi.presenceOffset.IsValid() {\n\t\tpresenceSrc = src.Apply(mi.presenceOffset).PresenceInfo()\n\t\tpresenceDst = dst.Apply(mi.presenceOffset).PresenceInfo()\n\t}\n\n\tfor _, f := range mi.orderedCoderFields {\n\t\tif f.funcs.merge == nil {\n\t\t\tcontinue\n\t\t}\n\t\tsfptr := src.Apply(f.offset)\n\n\t\tif f.presenceIndex != noPresence {\n\t\t\tif !presenceSrc.Present(f.presenceIndex) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdfptr := dst.Apply(f.offset)\n\t\t\tif f.isLazy {\n\t\t\t\tif sfptr.AtomicGetPointer().IsNil() {\n\t\t\t\t\tmi.lazyUnmarshal(src, f.num)\n\t\t\t\t}\n\t\t\t\tif presenceDst.Present(f.presenceIndex) && dfptr.AtomicGetPointer().IsNil() {\n\t\t\t\t\tmi.lazyUnmarshal(dst, f.num)\n\t\t\t\t}\n\t\t\t}\n\t\t\tf.funcs.merge(dst.Apply(f.offset), sfptr, f, opts)\n\t\t\tpresenceDst.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)\n\t\t\tcontinue\n\t\t}\n\n\t\tif f.isPointer && sfptr.Elem().IsNil() {\n\t\t\tcontinue\n\t\t}\n\t\tf.funcs.merge(dst.Apply(f.offset), sfptr, f, opts)\n\t}\n\tif mi.extensionOffset.IsValid() {\n\t\tsext := src.Apply(mi.extensionOffset).Extensions()\n\t\tdext := dst.Apply(mi.extensionOffset).Extensions()\n\t\tif *dext == nil {\n\t\t\t*dext = make(map[int32]ExtensionField)\n\t\t}\n\t\tfor num, sx := range *sext {\n\t\t\txt := sx.Type()\n\t\t\txi := getExtensionFieldInfo(xt)\n\t\t\tif xi.funcs.merge == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdx := (*dext)[num]\n\t\t\tvar dv protoreflect.Value\n\t\t\tif dx.Type() == sx.Type() {\n\t\t\t\tdv = dx.Value()\n\t\t\t}\n\t\t\tif !dv.IsValid() && xi.unmarshalNeedsValue {\n\t\t\t\tdv = xt.New()\n\t\t\t}\n\t\t\tdv = xi.funcs.merge(dv, sx.Value(), opts)\n\t\t\tdx.Set(sx.Type(), dv)\n\t\t\t(*dext)[num] = dx\n\t\t}\n\t}\n\tif mi.unknownOffset.IsValid() {\n\t\tsu := mi.getUnknownBytes(src)\n\t\tif su != nil && len(*su) > 0 {\n\t\t\tdu := mi.mutableUnknownBytes(dst)\n\t\t\t*du = append(*du, *su...)\n\t\t}\n\t}\n}\n\nfunc mergeScalarValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\treturn src\n}\n\nfunc mergeBytesValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\treturn protoreflect.ValueOfBytes(append(emptyBuf[:], src.Bytes()...))\n}\n\nfunc mergeListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\tdstl := dst.List()\n\tsrcl := src.List()\n\tfor i, llen := 0, srcl.Len(); i < llen; i++ {\n\t\tdstl.Append(srcl.Get(i))\n\t}\n\treturn dst\n}\n\nfunc mergeBytesListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\tdstl := dst.List()\n\tsrcl := src.List()\n\tfor i, llen := 0, srcl.Len(); i < llen; i++ {\n\t\tsb := srcl.Get(i).Bytes()\n\t\tdb := append(emptyBuf[:], sb...)\n\t\tdstl.Append(protoreflect.ValueOfBytes(db))\n\t}\n\treturn dst\n}\n\nfunc mergeMessageListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\tdstl := dst.List()\n\tsrcl := src.List()\n\tfor i, llen := 0, srcl.Len(); i < llen; i++ {\n\t\tsm := srcl.Get(i).Message()\n\t\tdm := proto.Clone(sm.Interface()).ProtoReflect()\n\t\tdstl.Append(protoreflect.ValueOfMessage(dm))\n\t}\n\treturn dst\n}\n\nfunc mergeMessageValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {\n\topts.Merge(dst.Message().Interface(), src.Message().Interface())\n\treturn dst\n}\n\nfunc mergeMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tif f.mi != nil {\n\t\tif dst.Elem().IsNil() {\n\t\t\tdst.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))\n\t\t}\n\t\tf.mi.mergePointer(dst.Elem(), src.Elem(), opts)\n\t} else {\n\t\tdm := dst.AsValueOf(f.ft).Elem()\n\t\tsm := src.AsValueOf(f.ft).Elem()\n\t\tif dm.IsNil() {\n\t\t\tdm.Set(reflect.New(f.ft.Elem()))\n\t\t}\n\t\topts.Merge(asMessage(dm), asMessage(sm))\n\t}\n}\n\nfunc mergeMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {\n\tfor _, sp := range src.PointerSlice() {\n\t\tdm := reflect.New(f.ft.Elem().Elem())\n\t\tif f.mi != nil {\n\t\t\tf.mi.mergePointer(pointerOfValue(dm), sp, opts)\n\t\t} else {\n\t\t\topts.Merge(asMessage(dm), asMessage(sp.AsValueOf(f.ft.Elem().Elem())))\n\t\t}\n\t\tdst.AppendPointerSlice(pointerOfValue(dm))\n\t}\n}\n\nfunc mergeBytes(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Bytes() = append(emptyBuf[:], *src.Bytes()...)\n}\n\nfunc mergeBytesNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Bytes()\n\tif len(v) > 0 {\n\t\t*dst.Bytes() = append(emptyBuf[:], v...)\n\t}\n}\n\nfunc mergeBytesSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.BytesSlice()\n\tfor _, v := range *src.BytesSlice() {\n\t\t*ds = append(*ds, append(emptyBuf[:], v...))\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/merge_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage impl\n\nimport ()\n\nfunc mergeBool(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Bool() = *src.Bool()\n}\n\nfunc mergeBoolNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Bool()\n\tif v != false {\n\t\t*dst.Bool() = v\n\t}\n}\n\nfunc mergeBoolPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.BoolPtr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.BoolPtr() = &v\n\t}\n}\n\nfunc mergeBoolSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.BoolSlice()\n\tss := src.BoolSlice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeInt32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Int32() = *src.Int32()\n}\n\nfunc mergeInt32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Int32()\n\tif v != 0 {\n\t\t*dst.Int32() = v\n\t}\n}\n\nfunc mergeInt32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Int32Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Int32Ptr() = &v\n\t}\n}\n\nfunc mergeInt32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Int32Slice()\n\tss := src.Int32Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeUint32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Uint32() = *src.Uint32()\n}\n\nfunc mergeUint32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Uint32()\n\tif v != 0 {\n\t\t*dst.Uint32() = v\n\t}\n}\n\nfunc mergeUint32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Uint32Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Uint32Ptr() = &v\n\t}\n}\n\nfunc mergeUint32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Uint32Slice()\n\tss := src.Uint32Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeInt64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Int64() = *src.Int64()\n}\n\nfunc mergeInt64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Int64()\n\tif v != 0 {\n\t\t*dst.Int64() = v\n\t}\n}\n\nfunc mergeInt64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Int64Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Int64Ptr() = &v\n\t}\n}\n\nfunc mergeInt64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Int64Slice()\n\tss := src.Int64Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeUint64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Uint64() = *src.Uint64()\n}\n\nfunc mergeUint64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Uint64()\n\tif v != 0 {\n\t\t*dst.Uint64() = v\n\t}\n}\n\nfunc mergeUint64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Uint64Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Uint64Ptr() = &v\n\t}\n}\n\nfunc mergeUint64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Uint64Slice()\n\tss := src.Uint64Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeFloat32(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Float32() = *src.Float32()\n}\n\nfunc mergeFloat32NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Float32()\n\tif v != 0 {\n\t\t*dst.Float32() = v\n\t}\n}\n\nfunc mergeFloat32Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Float32Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Float32Ptr() = &v\n\t}\n}\n\nfunc mergeFloat32Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Float32Slice()\n\tss := src.Float32Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeFloat64(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.Float64() = *src.Float64()\n}\n\nfunc mergeFloat64NoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.Float64()\n\tif v != 0 {\n\t\t*dst.Float64() = v\n\t}\n}\n\nfunc mergeFloat64Ptr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.Float64Ptr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.Float64Ptr() = &v\n\t}\n}\n\nfunc mergeFloat64Slice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.Float64Slice()\n\tss := src.Float64Slice()\n\t*ds = append(*ds, *ss...)\n}\n\nfunc mergeString(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\t*dst.String() = *src.String()\n}\n\nfunc mergeStringNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tv := *src.String()\n\tif v != \"\" {\n\t\t*dst.String() = v\n\t}\n}\n\nfunc mergeStringPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tp := *src.StringPtr()\n\tif p != nil {\n\t\tv := *p\n\t\t*dst.StringPtr() = &v\n\t}\n}\n\nfunc mergeStringSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {\n\tds := dst.StringSlice()\n\tss := src.StringSlice()\n\t*ds = append(*ds, *ss...)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// MessageInfo provides protobuf related functionality for a given Go type\n// that represents a message. A given instance of MessageInfo is tied to\n// exactly one Go type, which must be a pointer to a struct type.\n//\n// The exported fields must be populated before any methods are called\n// and cannot be mutated after set.\ntype MessageInfo struct {\n\t// GoReflectType is the underlying message Go type and must be populated.\n\tGoReflectType reflect.Type // pointer to struct\n\n\t// Desc is the underlying message descriptor type and must be populated.\n\tDesc protoreflect.MessageDescriptor\n\n\t// Deprecated: Exporter will be removed the next time we bump\n\t// protoimpl.GenVersion. See https://github.com/golang/protobuf/issues/1640\n\tExporter exporter\n\n\t// OneofWrappers is list of pointers to oneof wrapper struct types.\n\tOneofWrappers []any\n\n\tinitMu   sync.Mutex // protects all unexported fields\n\tinitDone uint32\n\n\treflectMessageInfo // for reflection implementation\n\tcoderMessageInfo   // for fast-path method implementations\n}\n\n// exporter is a function that returns a reference to the ith field of v,\n// where v is a pointer to a struct. It returns nil if it does not support\n// exporting the requested field (e.g., already exported).\ntype exporter func(v any, i int) any\n\n// getMessageInfo returns the MessageInfo for any message type that\n// is generated by our implementation of protoc-gen-go (for v2 and on).\n// If it is unable to obtain a MessageInfo, it returns nil.\nfunc getMessageInfo(mt reflect.Type) *MessageInfo {\n\tm, ok := reflect.Zero(mt).Interface().(protoreflect.ProtoMessage)\n\tif !ok {\n\t\treturn nil\n\t}\n\tmr, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *MessageInfo })\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn mr.ProtoMessageInfo()\n}\n\nfunc (mi *MessageInfo) init() {\n\t// This function is called in the hot path. Inline the sync.Once logic,\n\t// since allocating a closure for Once.Do is expensive.\n\t// Keep init small to ensure that it can be inlined.\n\tif atomic.LoadUint32(&mi.initDone) == 0 {\n\t\tmi.initOnce()\n\t}\n}\n\nfunc (mi *MessageInfo) initOnce() {\n\tmi.initMu.Lock()\n\tdefer mi.initMu.Unlock()\n\tif mi.initDone == 1 {\n\t\treturn\n\t}\n\tif opaqueInitHook(mi) {\n\t\treturn\n\t}\n\n\tt := mi.GoReflectType\n\tif t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct {\n\t\tpanic(fmt.Sprintf(\"got %v, want *struct kind\", t))\n\t}\n\tt = t.Elem()\n\n\tsi := mi.makeStructInfo(t)\n\tmi.makeReflectFuncs(t, si)\n\tmi.makeCoderMethods(t, si)\n\n\tatomic.StoreUint32(&mi.initDone, 1)\n}\n\n// getPointer returns the pointer for a message, which should be of\n// the type of the MessageInfo. If the message is of a different type,\n// it returns ok==false.\nfunc (mi *MessageInfo) getPointer(m protoreflect.Message) (p pointer, ok bool) {\n\tswitch m := m.(type) {\n\tcase *messageState:\n\t\treturn m.pointer(), m.messageInfo() == mi\n\tcase *messageReflectWrapper:\n\t\treturn m.pointer(), m.messageInfo() == mi\n\t}\n\treturn pointer{}, false\n}\n\ntype (\n\tSizeCache       = int32\n\tWeakFields      = map[int32]protoreflect.ProtoMessage\n\tUnknownFields   = unknownFieldsA // TODO: switch to unknownFieldsB\n\tunknownFieldsA  = []byte\n\tunknownFieldsB  = *[]byte\n\tExtensionFields = map[int32]ExtensionField\n)\n\nvar (\n\tsizecacheType       = reflect.TypeOf(SizeCache(0))\n\tunknownFieldsAType  = reflect.TypeOf(unknownFieldsA(nil))\n\tunknownFieldsBType  = reflect.TypeOf(unknownFieldsB(nil))\n\textensionFieldsType = reflect.TypeOf(ExtensionFields(nil))\n)\n\ntype structInfo struct {\n\tsizecacheOffset offset\n\tsizecacheType   reflect.Type\n\tunknownOffset   offset\n\tunknownType     reflect.Type\n\textensionOffset offset\n\textensionType   reflect.Type\n\n\tlazyOffset     offset\n\tpresenceOffset offset\n\n\tfieldsByNumber        map[protoreflect.FieldNumber]reflect.StructField\n\toneofsByName          map[protoreflect.Name]reflect.StructField\n\toneofWrappersByType   map[reflect.Type]protoreflect.FieldNumber\n\toneofWrappersByNumber map[protoreflect.FieldNumber]reflect.Type\n}\n\nfunc (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {\n\tsi := structInfo{\n\t\tsizecacheOffset: invalidOffset,\n\t\tunknownOffset:   invalidOffset,\n\t\textensionOffset: invalidOffset,\n\t\tlazyOffset:      invalidOffset,\n\t\tpresenceOffset:  invalidOffset,\n\n\t\tfieldsByNumber:        map[protoreflect.FieldNumber]reflect.StructField{},\n\t\toneofsByName:          map[protoreflect.Name]reflect.StructField{},\n\t\toneofWrappersByType:   map[reflect.Type]protoreflect.FieldNumber{},\n\t\toneofWrappersByNumber: map[protoreflect.FieldNumber]reflect.Type{},\n\t}\n\nfieldLoop:\n\tfor i := 0; i < t.NumField(); i++ {\n\t\tswitch f := t.Field(i); f.Name {\n\t\tcase genid.SizeCache_goname, genid.SizeCacheA_goname:\n\t\t\tif f.Type == sizecacheType {\n\t\t\t\tsi.sizecacheOffset = offsetOf(f)\n\t\t\t\tsi.sizecacheType = f.Type\n\t\t\t}\n\t\tcase genid.UnknownFields_goname, genid.UnknownFieldsA_goname:\n\t\t\tif f.Type == unknownFieldsAType || f.Type == unknownFieldsBType {\n\t\t\t\tsi.unknownOffset = offsetOf(f)\n\t\t\t\tsi.unknownType = f.Type\n\t\t\t}\n\t\tcase genid.ExtensionFields_goname, genid.ExtensionFieldsA_goname, genid.ExtensionFieldsB_goname:\n\t\t\tif f.Type == extensionFieldsType {\n\t\t\t\tsi.extensionOffset = offsetOf(f)\n\t\t\t\tsi.extensionType = f.Type\n\t\t\t}\n\t\tcase \"lazyFields\", \"XXX_lazyUnmarshalInfo\":\n\t\t\tsi.lazyOffset = offsetOf(f)\n\t\tcase \"XXX_presence\":\n\t\t\tsi.presenceOffset = offsetOf(f)\n\t\tdefault:\n\t\t\tfor _, s := range strings.Split(f.Tag.Get(\"protobuf\"), \",\") {\n\t\t\t\tif len(s) > 0 && strings.Trim(s, \"0123456789\") == \"\" {\n\t\t\t\t\tn, _ := strconv.ParseUint(s, 10, 64)\n\t\t\t\t\tsi.fieldsByNumber[protoreflect.FieldNumber(n)] = f\n\t\t\t\t\tcontinue fieldLoop\n\t\t\t\t}\n\t\t\t}\n\t\t\tif s := f.Tag.Get(\"protobuf_oneof\"); len(s) > 0 {\n\t\t\t\tsi.oneofsByName[protoreflect.Name(s)] = f\n\t\t\t\tcontinue fieldLoop\n\t\t\t}\n\t\t}\n\t}\n\n\t// Derive a mapping of oneof wrappers to fields.\n\toneofWrappers := mi.OneofWrappers\n\tmethods := make([]reflect.Method, 0, 2)\n\tif m, ok := reflect.PtrTo(t).MethodByName(\"XXX_OneofFuncs\"); ok {\n\t\tmethods = append(methods, m)\n\t}\n\tif m, ok := reflect.PtrTo(t).MethodByName(\"XXX_OneofWrappers\"); ok {\n\t\tmethods = append(methods, m)\n\t}\n\tfor _, fn := range methods {\n\t\tfor _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {\n\t\t\tif vs, ok := v.Interface().([]any); ok {\n\t\t\t\toneofWrappers = vs\n\t\t\t}\n\t\t}\n\t}\n\tfor _, v := range oneofWrappers {\n\t\ttf := reflect.TypeOf(v).Elem()\n\t\tf := tf.Field(0)\n\t\tfor _, s := range strings.Split(f.Tag.Get(\"protobuf\"), \",\") {\n\t\t\tif len(s) > 0 && strings.Trim(s, \"0123456789\") == \"\" {\n\t\t\t\tn, _ := strconv.ParseUint(s, 10, 64)\n\t\t\t\tsi.oneofWrappersByType[tf] = protoreflect.FieldNumber(n)\n\t\t\t\tsi.oneofWrappersByNumber[protoreflect.FieldNumber(n)] = tf\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn si\n}\n\nfunc (mi *MessageInfo) New() protoreflect.Message {\n\tm := reflect.New(mi.GoReflectType.Elem()).Interface()\n\tif r, ok := m.(protoreflect.ProtoMessage); ok {\n\t\treturn r.ProtoReflect()\n\t}\n\treturn mi.MessageOf(m)\n}\nfunc (mi *MessageInfo) Zero() protoreflect.Message {\n\treturn mi.MessageOf(reflect.Zero(mi.GoReflectType).Interface())\n}\nfunc (mi *MessageInfo) Descriptor() protoreflect.MessageDescriptor {\n\treturn mi.Desc\n}\nfunc (mi *MessageInfo) Enum(i int) protoreflect.EnumType {\n\tmi.init()\n\tfd := mi.Desc.Fields().Get(i)\n\treturn Export{}.EnumTypeOf(mi.fieldTypes[fd.Number()])\n}\nfunc (mi *MessageInfo) Message(i int) protoreflect.MessageType {\n\tmi.init()\n\tfd := mi.Desc.Fields().Get(i)\n\tswitch {\n\tcase fd.IsMap():\n\t\treturn mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]}\n\tdefault:\n\t\treturn Export{}.MessageTypeOf(mi.fieldTypes[fd.Number()])\n\t}\n}\n\ntype mapEntryType struct {\n\tdesc    protoreflect.MessageDescriptor\n\tvalType any // zero value of enum or message type\n}\n\nfunc (mt mapEntryType) New() protoreflect.Message {\n\treturn nil\n}\nfunc (mt mapEntryType) Zero() protoreflect.Message {\n\treturn nil\n}\nfunc (mt mapEntryType) Descriptor() protoreflect.MessageDescriptor {\n\treturn mt.desc\n}\nfunc (mt mapEntryType) Enum(i int) protoreflect.EnumType {\n\tfd := mt.desc.Fields().Get(i)\n\tif fd.Enum() == nil {\n\t\treturn nil\n\t}\n\treturn Export{}.EnumTypeOf(mt.valType)\n}\nfunc (mt mapEntryType) Message(i int) protoreflect.MessageType {\n\tfd := mt.desc.Fields().Get(i)\n\tif fd.Message() == nil {\n\t\treturn nil\n\t}\n\treturn Export{}.MessageTypeOf(mt.valType)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_opaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync/atomic\"\n\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype opaqueStructInfo struct {\n\tstructInfo\n}\n\n// isOpaque determines whether a protobuf message type is on the Opaque API.  It\n// checks whether the type is a Go struct that protoc-gen-go would generate.\n//\n// This function only detects newly generated messages from the v2\n// implementation of protoc-gen-go. It is unable to classify generated messages\n// that are too old or those that are generated by a different generator\n// such as protoc-gen-gogo.\nfunc isOpaque(t reflect.Type) bool {\n\t// The current detection mechanism is to simply check the first field\n\t// for a struct tag with the \"protogen\" key.\n\tif t.Kind() == reflect.Struct && t.NumField() > 0 {\n\t\tpgt := t.Field(0).Tag.Get(\"protogen\")\n\t\treturn strings.HasPrefix(pgt, \"opaque.\")\n\t}\n\treturn false\n}\n\nfunc opaqueInitHook(mi *MessageInfo) bool {\n\tmt := mi.GoReflectType.Elem()\n\tsi := opaqueStructInfo{\n\t\tstructInfo: mi.makeStructInfo(mt),\n\t}\n\n\tif !isOpaque(mt) {\n\t\treturn false\n\t}\n\n\tdefer atomic.StoreUint32(&mi.initDone, 1)\n\n\tmi.fields = map[protoreflect.FieldNumber]*fieldInfo{}\n\tfds := mi.Desc.Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tfd := fds.Get(i)\n\t\tfs := si.fieldsByNumber[fd.Number()]\n\t\tvar fi fieldInfo\n\t\tusePresence, _ := filedesc.UsePresenceForField(fd)\n\n\t\tswitch {\n\t\tcase fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():\n\t\t\t// Oneofs are no different for opaque.\n\t\t\tfi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()])\n\t\tcase fd.IsMap():\n\t\t\tfi = mi.fieldInfoForMapOpaque(si, fd, fs)\n\t\tcase fd.IsList() && fd.Message() == nil && usePresence:\n\t\t\tfi = mi.fieldInfoForScalarListOpaque(si, fd, fs)\n\t\tcase fd.IsList() && fd.Message() == nil:\n\t\t\t// Proto3 lists without presence can use same access methods as open\n\t\t\tfi = fieldInfoForList(fd, fs, mi.Exporter)\n\t\tcase fd.IsList() && usePresence:\n\t\t\tfi = mi.fieldInfoForMessageListOpaque(si, fd, fs)\n\t\tcase fd.IsList():\n\t\t\t// Proto3 opaque messages that does not need presence bitmap.\n\t\t\t// Different representation than open struct, but same logic\n\t\t\tfi = mi.fieldInfoForMessageListOpaqueNoPresence(si, fd, fs)\n\t\tcase fd.Message() != nil && usePresence:\n\t\t\tfi = mi.fieldInfoForMessageOpaque(si, fd, fs)\n\t\tcase fd.Message() != nil:\n\t\t\t// Proto3 messages without presence can use same access methods as open\n\t\t\tfi = fieldInfoForMessage(fd, fs, mi.Exporter)\n\t\tdefault:\n\t\t\tfi = mi.fieldInfoForScalarOpaque(si, fd, fs)\n\t\t}\n\t\tmi.fields[fd.Number()] = &fi\n\t}\n\tmi.oneofs = map[protoreflect.Name]*oneofInfo{}\n\tfor i := 0; i < mi.Desc.Oneofs().Len(); i++ {\n\t\tod := mi.Desc.Oneofs().Get(i)\n\t\tmi.oneofs[od.Name()] = makeOneofInfoOpaque(mi, od, si.structInfo, mi.Exporter)\n\t}\n\n\tmi.denseFields = make([]*fieldInfo, fds.Len()*2)\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tif fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) {\n\t\t\tmi.denseFields[fd.Number()] = mi.fields[fd.Number()]\n\t\t}\n\t}\n\n\tfor i := 0; i < fds.Len(); {\n\t\tfd := fds.Get(i)\n\t\tif od := fd.ContainingOneof(); od != nil && !fd.ContainingOneof().IsSynthetic() {\n\t\t\tmi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()])\n\t\t\ti += od.Fields().Len()\n\t\t} else {\n\t\t\tmi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()])\n\t\t\ti++\n\t\t}\n\t}\n\n\tmi.makeExtensionFieldsFunc(mt, si.structInfo)\n\tmi.makeUnknownFieldsFunc(mt, si.structInfo)\n\tmi.makeOpaqueCoderMethods(mt, si)\n\tmi.makeFieldTypes(si.structInfo)\n\n\treturn true\n}\n\nfunc makeOneofInfoOpaque(mi *MessageInfo, od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo {\n\toi := &oneofInfo{oneofDesc: od}\n\tif od.IsSynthetic() {\n\t\tfd := od.Fields().Get(0)\n\t\tindex, _ := presenceIndex(mi.Desc, fd)\n\t\toi.which = func(p pointer) protoreflect.FieldNumber {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\tif !mi.present(p, index) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn od.Fields().Get(0).Number()\n\t\t}\n\t\treturn oi\n\t}\n\t// Dispatch to non-opaque oneof implementation for non-synthetic oneofs.\n\treturn makeOneofInfo(od, si, x)\n}\n\nfunc (mi *MessageInfo) fieldInfoForMapOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Map {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want map kind\", ft))\n\t}\n\tfieldOffset := offsetOf(fs)\n\tconv := NewConverter(ft, fd)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t// Don't bother checking presence bits, since we need to\n\t\t\t// look at the map length even if the presence bit is set.\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn rv.Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\tpv := conv.GoValueOf(v)\n\t\t\tif pv.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"invalid value: setting map field to read-only value\"))\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(pv)\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif v.IsNil() {\n\t\t\t\tv.Set(reflect.MakeMap(fs.Type))\n\t\t\t}\n\t\t\treturn conv.PBValueOf(v)\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc (mi *MessageInfo) fieldInfoForScalarListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Slice {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want slice kind\", ft))\n\t}\n\tconv := NewConverter(reflect.PtrTo(ft), fd)\n\tfieldOffset := offsetOf(fs)\n\tindex, _ := presenceIndex(mi.Desc, fd)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn rv.Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type)\n\t\t\tif rv.Elem().Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\tpv := conv.GoValueOf(v)\n\t\t\tif pv.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"invalid value: setting repeated field to read-only value\"))\n\t\t\t}\n\t\t\tmi.setPresent(p, index)\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(pv.Elem())\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tmi.setPresent(p, index)\n\t\t\treturn conv.PBValueOf(p.Apply(fieldOffset).AsValueOf(fs.Type))\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc (mi *MessageInfo) fieldInfoForMessageListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want slice kind\", ft))\n\t}\n\tconv := NewConverter(ft, fd)\n\tfieldOffset := offsetOf(fs)\n\tindex, _ := presenceIndex(mi.Desc, fd)\n\tfieldNumber := fd.Number()\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !mi.present(p, index) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tsp := p.Apply(fieldOffset).AtomicGetPointer()\n\t\t\tif sp.IsNil() {\n\t\t\t\t// Lazily unmarshal this field.\n\t\t\t\tmi.lazyUnmarshal(p, fieldNumber)\n\t\t\t\tsp = p.Apply(fieldOffset).AtomicGetPointer()\n\t\t\t}\n\t\t\trv := sp.AsValueOf(fs.Type.Elem())\n\t\t\treturn rv.Elem().Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\tfp := p.Apply(fieldOffset)\n\t\t\tsp := fp.AtomicGetPointer()\n\t\t\tif sp.IsNil() {\n\t\t\t\tsp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem())))\n\t\t\t\tmi.setPresent(p, index)\n\t\t\t}\n\t\t\trv := sp.AsValueOf(fs.Type.Elem())\n\t\t\trv.Elem().Set(reflect.Zero(rv.Type().Elem()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tif !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tsp := p.Apply(fieldOffset).AtomicGetPointer()\n\t\t\tif sp.IsNil() {\n\t\t\t\t// Lazily unmarshal this field.\n\t\t\t\tmi.lazyUnmarshal(p, fieldNumber)\n\t\t\t\tsp = p.Apply(fieldOffset).AtomicGetPointer()\n\t\t\t}\n\t\t\trv := sp.AsValueOf(fs.Type.Elem())\n\t\t\tif rv.Elem().Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\tfp := p.Apply(fieldOffset)\n\t\t\tsp := fp.AtomicGetPointer()\n\t\t\tif sp.IsNil() {\n\t\t\t\tsp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem())))\n\t\t\t\tmi.setPresent(p, index)\n\t\t\t}\n\t\t\trv := sp.AsValueOf(fs.Type.Elem())\n\t\t\tval := conv.GoValueOf(v)\n\t\t\tif val.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"invalid value: setting repeated field to read-only value\"))\n\t\t\t} else {\n\t\t\t\trv.Elem().Set(val.Elem())\n\t\t\t}\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tfp := p.Apply(fieldOffset)\n\t\t\tsp := fp.AtomicGetPointer()\n\t\t\tif sp.IsNil() {\n\t\t\t\tif mi.present(p, index) {\n\t\t\t\t\t// Lazily unmarshal this field.\n\t\t\t\t\tmi.lazyUnmarshal(p, fieldNumber)\n\t\t\t\t\tsp = p.Apply(fieldOffset).AtomicGetPointer()\n\t\t\t\t} else {\n\t\t\t\t\tsp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem())))\n\t\t\t\t\tmi.setPresent(p, index)\n\t\t\t\t}\n\t\t\t}\n\t\t\trv := sp.AsValueOf(fs.Type.Elem())\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice {\n\t\tpanic(fmt.Sprintf(\"invalid type: got %v, want slice kind\", ft))\n\t}\n\tconv := NewConverter(ft, fd)\n\tfieldOffset := offsetOf(fs)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn rv.Elem().Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif !rv.IsNil() {\n\t\t\t\trv.Elem().Set(reflect.Zero(rv.Type().Elem()))\n\t\t\t}\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tif rv.Elem().Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\trv.Set(reflect.New(fs.Type.Elem()))\n\t\t\t}\n\t\t\tval := conv.GoValueOf(v)\n\t\t\tif val.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"invalid value: setting repeated field to read-only value\"))\n\t\t\t} else {\n\t\t\t\trv.Elem().Set(val.Elem())\n\t\t\t}\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\trv.Set(reflect.New(fs.Type.Elem()))\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc (mi *MessageInfo) fieldInfoForScalarOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tnullable := fd.HasPresence()\n\tif oneof := fd.ContainingOneof(); oneof != nil && oneof.IsSynthetic() {\n\t\tnullable = true\n\t}\n\tderef := false\n\tif nullable && ft.Kind() == reflect.Ptr {\n\t\tft = ft.Elem()\n\t\tderef = true\n\t}\n\tconv := NewConverter(ft, fd)\n\tfieldOffset := offsetOf(fs)\n\tindex, _ := presenceIndex(mi.Desc, fd)\n\tvar getter func(p pointer) protoreflect.Value\n\tif !nullable {\n\t\tgetter = getterForDirectScalar(fd, fs, conv, fieldOffset)\n\t} else {\n\t\tgetter = getterForOpaqueNullableScalar(mi, index, fd, fs, conv, fieldOffset)\n\t}\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif nullable {\n\t\t\t\treturn mi.present(p, index)\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tswitch rv.Kind() {\n\t\t\tcase reflect.Bool:\n\t\t\t\treturn rv.Bool()\n\t\t\tcase reflect.Int32, reflect.Int64:\n\t\t\t\treturn rv.Int() != 0\n\t\t\tcase reflect.Uint32, reflect.Uint64:\n\t\t\t\treturn rv.Uint() != 0\n\t\t\tcase reflect.Float32, reflect.Float64:\n\t\t\t\treturn rv.Float() != 0 || math.Signbit(rv.Float())\n\t\t\tcase reflect.String, reflect.Slice:\n\t\t\t\treturn rv.Len() > 0\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"invalid type: %v\", rv.Type())) // should never happen\n\t\t\t}\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\tif nullable {\n\t\t\t\tmi.clearPresent(p, index)\n\t\t\t}\n\t\t\t// This is only valuable for bytes and strings, but we do it unconditionally.\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: getter,\n\t\t// TODO: Implement unsafe fast path for set?\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif deref {\n\t\t\t\tif rv.IsNil() {\n\t\t\t\t\trv.Set(reflect.New(ft))\n\t\t\t\t}\n\t\t\t\trv = rv.Elem()\n\t\t\t}\n\n\t\t\trv.Set(conv.GoValueOf(v))\n\t\t\tif nullable && rv.Kind() == reflect.Slice && rv.IsNil() {\n\t\t\t\trv.Set(emptyBytes)\n\t\t\t}\n\t\t\tif nullable {\n\t\t\t\tmi.setPresent(p, index)\n\t\t\t}\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc (mi *MessageInfo) fieldInfoForMessageOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo {\n\tft := fs.Type\n\tconv := NewConverter(ft, fd)\n\tfieldOffset := offsetOf(fs)\n\tindex, _ := presenceIndex(mi.Desc, fd)\n\tfieldNumber := fd.Number()\n\telemType := fs.Type.Elem()\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn mi.present(p, index)\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\tmi.clearPresent(p, index)\n\t\t\tp.Apply(fieldOffset).AtomicSetNilPointer()\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tfp := p.Apply(fieldOffset)\n\t\t\tmp := fp.AtomicGetPointer()\n\t\t\tif mp.IsNil() {\n\t\t\t\t// Lazily unmarshal this field.\n\t\t\t\tmi.lazyUnmarshal(p, fieldNumber)\n\t\t\t\tmp = fp.AtomicGetPointer()\n\t\t\t}\n\t\t\trv := mp.AsValueOf(elemType)\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\tval := pointerOfValue(conv.GoValueOf(v))\n\t\t\tif val.IsNil() {\n\t\t\t\tpanic(\"invalid nil pointer\")\n\t\t\t}\n\t\t\tp.Apply(fieldOffset).AtomicSetPointer(val)\n\t\t\tmi.setPresent(p, index)\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tfp := p.Apply(fieldOffset)\n\t\t\tmp := fp.AtomicGetPointer()\n\t\t\tif mp.IsNil() {\n\t\t\t\tif mi.present(p, index) {\n\t\t\t\t\t// Lazily unmarshal this field.\n\t\t\t\t\tmi.lazyUnmarshal(p, fieldNumber)\n\t\t\t\t\tmp = fp.AtomicGetPointer()\n\t\t\t\t} else {\n\t\t\t\t\tmp = pointerOfValue(conv.GoValueOf(conv.New()))\n\t\t\t\t\tfp.AtomicSetPointer(mp)\n\t\t\t\t\tmi.setPresent(p, index)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn conv.PBValueOf(mp.AsValueOf(fs.Type.Elem()))\n\t\t},\n\t\tnewMessage: func() protoreflect.Message {\n\t\t\treturn conv.New().Message()\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\n// A presenceList wraps a List, updating presence bits as necessary when the\n// list contents change.\ntype presenceList struct {\n\tpvalueList\n\tsetPresence func(bool)\n}\ntype pvalueList interface {\n\tprotoreflect.List\n\t//Unwrapper\n}\n\nfunc (list presenceList) Append(v protoreflect.Value) {\n\tlist.pvalueList.Append(v)\n\tlist.setPresence(true)\n}\nfunc (list presenceList) Truncate(i int) {\n\tlist.pvalueList.Truncate(i)\n\tlist.setPresence(i > 0)\n}\n\n// presenceIndex returns the index to pass to presence functions.\n//\n// TODO: field.Desc.Index() would be simpler, and would give space to record the presence of oneof fields.\nfunc presenceIndex(md protoreflect.MessageDescriptor, fd protoreflect.FieldDescriptor) (uint32, presenceSize) {\n\tfound := false\n\tvar index, numIndices uint32\n\tfor i := 0; i < md.Fields().Len(); i++ {\n\t\tf := md.Fields().Get(i)\n\t\tif f == fd {\n\t\t\tfound = true\n\t\t\tindex = numIndices\n\t\t}\n\t\tif f.ContainingOneof() == nil || isLastOneofField(f) {\n\t\t\tnumIndices++\n\t\t}\n\t}\n\tif !found {\n\t\tpanic(fmt.Sprintf(\"BUG: %v not in %v\", fd.Name(), md.FullName()))\n\t}\n\treturn index, presenceSize(numIndices)\n}\n\nfunc isLastOneofField(fd protoreflect.FieldDescriptor) bool {\n\tfields := fd.ContainingOneof().Fields()\n\treturn fields.Get(fields.Len()-1) == fd\n}\n\nfunc (mi *MessageInfo) setPresent(p pointer, index uint32) {\n\tp.Apply(mi.presenceOffset).PresenceInfo().SetPresent(index, mi.presenceSize)\n}\n\nfunc (mi *MessageInfo) clearPresent(p pointer, index uint32) {\n\tp.Apply(mi.presenceOffset).PresenceInfo().ClearPresent(index)\n}\n\nfunc (mi *MessageInfo) present(p pointer, index uint32) bool {\n\treturn p.Apply(mi.presenceOffset).PresenceInfo().Present(index)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc getterForOpaqueNullableScalar(mi *MessageInfo, index uint32, fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value {\n\tft := fs.Type\n\tif ft.Kind() == reflect.Ptr {\n\t\tft = ft.Elem()\n\t}\n\tif fd.Kind() == protoreflect.EnumKind {\n\t\t// Enums for nullable opaque types.\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn conv.PBValueOf(rv)\n\t\t}\n\t}\n\tswitch ft.Kind() {\n\tcase reflect.Bool:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Bool()\n\t\t\treturn protoreflect.ValueOfBool(*x)\n\t\t}\n\tcase reflect.Int32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int32()\n\t\t\treturn protoreflect.ValueOfInt32(*x)\n\t\t}\n\tcase reflect.Uint32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint32()\n\t\t\treturn protoreflect.ValueOfUint32(*x)\n\t\t}\n\tcase reflect.Int64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int64()\n\t\t\treturn protoreflect.ValueOfInt64(*x)\n\t\t}\n\tcase reflect.Uint64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint64()\n\t\t\treturn protoreflect.ValueOfUint64(*x)\n\t\t}\n\tcase reflect.Float32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float32()\n\t\t\treturn protoreflect.ValueOfFloat32(*x)\n\t\t}\n\tcase reflect.Float64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float64()\n\t\t\treturn protoreflect.ValueOfFloat64(*x)\n\t\t}\n\tcase reflect.String:\n\t\tif fd.Kind() == protoreflect.BytesKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).StringPtr()\n\t\t\t\tif *x == nil {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tif len(**x) == 0 {\n\t\t\t\t\treturn protoreflect.ValueOfBytes(nil)\n\t\t\t\t}\n\t\t\t\treturn protoreflect.ValueOfBytes([]byte(**x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).StringPtr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfString(**x)\n\t\t}\n\tcase reflect.Slice:\n\t\tif fd.Kind() == protoreflect.StringKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\t\treturn protoreflect.ValueOfString(string(*x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() || !mi.present(p, index) {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\treturn protoreflect.ValueOfBytes(*x)\n\t\t}\n\t}\n\tpanic(\"unexpected protobuf kind: \" + ft.Kind().String())\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_reflect.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/internal/detrand\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype reflectMessageInfo struct {\n\tfields map[protoreflect.FieldNumber]*fieldInfo\n\toneofs map[protoreflect.Name]*oneofInfo\n\n\t// fieldTypes contains the zero value of an enum or message field.\n\t// For lists, it contains the element type.\n\t// For maps, it contains the entry value type.\n\tfieldTypes map[protoreflect.FieldNumber]any\n\n\t// denseFields is a subset of fields where:\n\t//\t0 < fieldDesc.Number() < len(denseFields)\n\t// It provides faster access to the fieldInfo, but may be incomplete.\n\tdenseFields []*fieldInfo\n\n\t// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.\n\trangeInfos []any // either *fieldInfo or *oneofInfo\n\n\tgetUnknown   func(pointer) protoreflect.RawFields\n\tsetUnknown   func(pointer, protoreflect.RawFields)\n\textensionMap func(pointer) *extensionMap\n\n\tnilMessage atomicNilMessage\n}\n\n// makeReflectFuncs generates the set of functions to support reflection.\nfunc (mi *MessageInfo) makeReflectFuncs(t reflect.Type, si structInfo) {\n\tmi.makeKnownFieldsFunc(si)\n\tmi.makeUnknownFieldsFunc(t, si)\n\tmi.makeExtensionFieldsFunc(t, si)\n\tmi.makeFieldTypes(si)\n}\n\n// makeKnownFieldsFunc generates functions for operations that can be performed\n// on each protobuf message field. It takes in a reflect.Type representing the\n// Go struct and matches message fields with struct fields.\n//\n// This code assumes that the struct is well-formed and panics if there are\n// any discrepancies.\nfunc (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {\n\tmi.fields = map[protoreflect.FieldNumber]*fieldInfo{}\n\tmd := mi.Desc\n\tfds := md.Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tfd := fds.Get(i)\n\t\tfs := si.fieldsByNumber[fd.Number()]\n\t\tisOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic()\n\t\tif isOneof {\n\t\t\tfs = si.oneofsByName[fd.ContainingOneof().Name()]\n\t\t}\n\t\tvar fi fieldInfo\n\t\tswitch {\n\t\tcase fs.Type == nil:\n\t\t\tfi = fieldInfoForMissing(fd) // never occurs for officially generated message types\n\t\tcase isOneof:\n\t\t\tfi = fieldInfoForOneof(fd, fs, mi.Exporter, si.oneofWrappersByNumber[fd.Number()])\n\t\tcase fd.IsMap():\n\t\t\tfi = fieldInfoForMap(fd, fs, mi.Exporter)\n\t\tcase fd.IsList():\n\t\t\tfi = fieldInfoForList(fd, fs, mi.Exporter)\n\t\tcase fd.Message() != nil:\n\t\t\tfi = fieldInfoForMessage(fd, fs, mi.Exporter)\n\t\tdefault:\n\t\t\tfi = fieldInfoForScalar(fd, fs, mi.Exporter)\n\t\t}\n\t\tmi.fields[fd.Number()] = &fi\n\t}\n\n\tmi.oneofs = map[protoreflect.Name]*oneofInfo{}\n\tfor i := 0; i < md.Oneofs().Len(); i++ {\n\t\tod := md.Oneofs().Get(i)\n\t\tmi.oneofs[od.Name()] = makeOneofInfo(od, si, mi.Exporter)\n\t}\n\n\tmi.denseFields = make([]*fieldInfo, fds.Len()*2)\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tif fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) {\n\t\t\tmi.denseFields[fd.Number()] = mi.fields[fd.Number()]\n\t\t}\n\t}\n\n\tfor i := 0; i < fds.Len(); {\n\t\tfd := fds.Get(i)\n\t\tif od := fd.ContainingOneof(); od != nil && !od.IsSynthetic() {\n\t\t\tmi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()])\n\t\t\ti += od.Fields().Len()\n\t\t} else {\n\t\t\tmi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()])\n\t\t\ti++\n\t\t}\n\t}\n\n\t// Introduce instability to iteration order, but keep it deterministic.\n\tif len(mi.rangeInfos) > 1 && detrand.Bool() {\n\t\ti := detrand.Intn(len(mi.rangeInfos) - 1)\n\t\tmi.rangeInfos[i], mi.rangeInfos[i+1] = mi.rangeInfos[i+1], mi.rangeInfos[i]\n\t}\n}\n\nfunc (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) {\n\tswitch {\n\tcase si.unknownOffset.IsValid() && si.unknownType == unknownFieldsAType:\n\t\t// Handle as []byte.\n\t\tmi.getUnknown = func(p pointer) protoreflect.RawFields {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn *p.Apply(mi.unknownOffset).Bytes()\n\t\t}\n\t\tmi.setUnknown = func(p pointer, b protoreflect.RawFields) {\n\t\t\tif p.IsNil() {\n\t\t\t\tpanic(\"invalid SetUnknown on nil Message\")\n\t\t\t}\n\t\t\t*p.Apply(mi.unknownOffset).Bytes() = b\n\t\t}\n\tcase si.unknownOffset.IsValid() && si.unknownType == unknownFieldsBType:\n\t\t// Handle as *[]byte.\n\t\tmi.getUnknown = func(p pointer) protoreflect.RawFields {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tbp := p.Apply(mi.unknownOffset).BytesPtr()\n\t\t\tif *bp == nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn **bp\n\t\t}\n\t\tmi.setUnknown = func(p pointer, b protoreflect.RawFields) {\n\t\t\tif p.IsNil() {\n\t\t\t\tpanic(\"invalid SetUnknown on nil Message\")\n\t\t\t}\n\t\t\tbp := p.Apply(mi.unknownOffset).BytesPtr()\n\t\t\tif *bp == nil {\n\t\t\t\t*bp = new([]byte)\n\t\t\t}\n\t\t\t**bp = b\n\t\t}\n\tdefault:\n\t\tmi.getUnknown = func(pointer) protoreflect.RawFields {\n\t\t\treturn nil\n\t\t}\n\t\tmi.setUnknown = func(p pointer, _ protoreflect.RawFields) {\n\t\t\tif p.IsNil() {\n\t\t\t\tpanic(\"invalid SetUnknown on nil Message\")\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (mi *MessageInfo) makeExtensionFieldsFunc(t reflect.Type, si structInfo) {\n\tif si.extensionOffset.IsValid() {\n\t\tmi.extensionMap = func(p pointer) *extensionMap {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn (*extensionMap)(nil)\n\t\t\t}\n\t\t\tv := p.Apply(si.extensionOffset).AsValueOf(extensionFieldsType)\n\t\t\treturn (*extensionMap)(v.Interface().(*map[int32]ExtensionField))\n\t\t}\n\t} else {\n\t\tmi.extensionMap = func(pointer) *extensionMap {\n\t\t\treturn (*extensionMap)(nil)\n\t\t}\n\t}\n}\nfunc (mi *MessageInfo) makeFieldTypes(si structInfo) {\n\tmd := mi.Desc\n\tfds := md.Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tvar ft reflect.Type\n\t\tfd := fds.Get(i)\n\t\tfs := si.fieldsByNumber[fd.Number()]\n\t\tisOneof := fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic()\n\t\tif isOneof {\n\t\t\tfs = si.oneofsByName[fd.ContainingOneof().Name()]\n\t\t}\n\t\tvar isMessage bool\n\t\tswitch {\n\t\tcase fs.Type == nil:\n\t\t\tcontinue // never occurs for officially generated message types\n\t\tcase isOneof:\n\t\t\tif fd.Enum() != nil || fd.Message() != nil {\n\t\t\t\tft = si.oneofWrappersByNumber[fd.Number()].Field(0).Type\n\t\t\t}\n\t\tcase fd.IsMap():\n\t\t\tif fd.MapValue().Enum() != nil || fd.MapValue().Message() != nil {\n\t\t\t\tft = fs.Type.Elem()\n\t\t\t}\n\t\t\tisMessage = fd.MapValue().Message() != nil\n\t\tcase fd.IsList():\n\t\t\tif fd.Enum() != nil || fd.Message() != nil {\n\t\t\t\tft = fs.Type.Elem()\n\n\t\t\t\tif ft.Kind() == reflect.Slice {\n\t\t\t\t\tft = ft.Elem()\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tisMessage = fd.Message() != nil\n\t\tcase fd.Enum() != nil:\n\t\t\tft = fs.Type\n\t\t\tif fd.HasPresence() && ft.Kind() == reflect.Ptr {\n\t\t\t\tft = ft.Elem()\n\t\t\t}\n\t\tcase fd.Message() != nil:\n\t\t\tft = fs.Type\n\t\t\tisMessage = true\n\t\t}\n\t\tif isMessage && ft != nil && ft.Kind() != reflect.Ptr {\n\t\t\tft = reflect.PtrTo(ft) // never occurs for officially generated message types\n\t\t}\n\t\tif ft != nil {\n\t\t\tif mi.fieldTypes == nil {\n\t\t\t\tmi.fieldTypes = make(map[protoreflect.FieldNumber]any)\n\t\t\t}\n\t\t\tmi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()\n\t\t}\n\t}\n}\n\ntype extensionMap map[int32]ExtensionField\n\nfunc (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\tif m != nil {\n\t\tfor _, x := range *m {\n\t\t\txd := x.Type().TypeDescriptor()\n\t\t\tv := x.Value()\n\t\t\tif xd.IsList() && v.List().Len() == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !f(xd, v) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\nfunc (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) {\n\tif m == nil {\n\t\treturn false\n\t}\n\tx, ok := (*m)[int32(xd.Number())]\n\tif !ok {\n\t\treturn false\n\t}\n\tif x.isUnexpandedLazy() {\n\t\t// Avoid calling x.Value(), which triggers a lazy unmarshal.\n\t\treturn true\n\t}\n\tswitch {\n\tcase xd.IsList():\n\t\treturn x.Value().List().Len() > 0\n\tcase xd.IsMap():\n\t\treturn x.Value().Map().Len() > 0\n\t}\n\treturn true\n}\nfunc (m *extensionMap) Clear(xd protoreflect.ExtensionTypeDescriptor) {\n\tdelete(*m, int32(xd.Number()))\n}\nfunc (m *extensionMap) Get(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value {\n\tif m != nil {\n\t\tif x, ok := (*m)[int32(xd.Number())]; ok {\n\t\t\treturn x.Value()\n\t\t}\n\t}\n\treturn xd.Type().Zero()\n}\nfunc (m *extensionMap) Set(xd protoreflect.ExtensionTypeDescriptor, v protoreflect.Value) {\n\txt := xd.Type()\n\tisValid := true\n\tswitch {\n\tcase !xt.IsValidValue(v):\n\t\tisValid = false\n\tcase xd.IsList():\n\t\tisValid = v.List().IsValid()\n\tcase xd.IsMap():\n\t\tisValid = v.Map().IsValid()\n\tcase xd.Message() != nil:\n\t\tisValid = v.Message().IsValid()\n\t}\n\tif !isValid {\n\t\tpanic(fmt.Sprintf(\"%v: assigning invalid value\", xd.FullName()))\n\t}\n\n\tif *m == nil {\n\t\t*m = make(map[int32]ExtensionField)\n\t}\n\tvar x ExtensionField\n\tx.Set(xt, v)\n\t(*m)[int32(xd.Number())] = x\n}\nfunc (m *extensionMap) Mutable(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value {\n\tif xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() {\n\t\tpanic(\"invalid Mutable on field with non-composite type\")\n\t}\n\tif x, ok := (*m)[int32(xd.Number())]; ok {\n\t\treturn x.Value()\n\t}\n\tv := xd.Type().New()\n\tm.Set(xd, v)\n\treturn v\n}\n\n// MessageState is a data structure that is nested as the first field in a\n// concrete message. It provides a way to implement the ProtoReflect method\n// in an allocation-free way without needing to have a shadow Go type generated\n// for every message type. This technique only works using unsafe.\n//\n// Example generated code:\n//\n//\ttype M struct {\n//\t\tstate protoimpl.MessageState\n//\n//\t\tField1 int32\n//\t\tField2 string\n//\t\tField3 *BarMessage\n//\t\t...\n//\t}\n//\n//\tfunc (m *M) ProtoReflect() protoreflect.Message {\n//\t\tmi := &file_fizz_buzz_proto_msgInfos[5]\n//\t\tif protoimpl.UnsafeEnabled && m != nil {\n//\t\t\tms := protoimpl.X.MessageStateOf(Pointer(m))\n//\t\t\tif ms.LoadMessageInfo() == nil {\n//\t\t\t\tms.StoreMessageInfo(mi)\n//\t\t\t}\n//\t\t\treturn ms\n//\t\t}\n//\t\treturn mi.MessageOf(m)\n//\t}\n//\n// The MessageState type holds a *MessageInfo, which must be atomically set to\n// the message info associated with a given message instance.\n// By unsafely converting a *M into a *MessageState, the MessageState object\n// has access to all the information needed to implement protobuf reflection.\n// It has access to the message info as its first field, and a pointer to the\n// MessageState is identical to a pointer to the concrete message value.\n//\n// Requirements:\n//   - The type M must implement protoreflect.ProtoMessage.\n//   - The address of m must not be nil.\n//   - The address of m and the address of m.state must be equal,\n//     even though they are different Go types.\ntype MessageState struct {\n\tpragma.NoUnkeyedLiterals\n\tpragma.DoNotCompare\n\tpragma.DoNotCopy\n\n\tatomicMessageInfo *MessageInfo\n}\n\ntype messageState MessageState\n\nvar (\n\t_ protoreflect.Message = (*messageState)(nil)\n\t_ unwrapper            = (*messageState)(nil)\n)\n\n// messageDataType is a tuple of a pointer to the message data and\n// a pointer to the message type. It is a generalized way of providing a\n// reflective view over a message instance. The disadvantage of this approach\n// is the need to allocate this tuple of 16B.\ntype messageDataType struct {\n\tp  pointer\n\tmi *MessageInfo\n}\n\ntype (\n\tmessageReflectWrapper messageDataType\n\tmessageIfaceWrapper   messageDataType\n)\n\nvar (\n\t_ protoreflect.Message      = (*messageReflectWrapper)(nil)\n\t_ unwrapper                 = (*messageReflectWrapper)(nil)\n\t_ protoreflect.ProtoMessage = (*messageIfaceWrapper)(nil)\n\t_ unwrapper                 = (*messageIfaceWrapper)(nil)\n)\n\n// MessageOf returns a reflective view over a message. The input must be a\n// pointer to a named Go struct. If the provided type has a ProtoReflect method,\n// it must be implemented by calling this method.\nfunc (mi *MessageInfo) MessageOf(m any) protoreflect.Message {\n\tif reflect.TypeOf(m) != mi.GoReflectType {\n\t\tpanic(fmt.Sprintf(\"type mismatch: got %T, want %v\", m, mi.GoReflectType))\n\t}\n\tp := pointerOfIface(m)\n\tif p.IsNil() {\n\t\treturn mi.nilMessage.Init(mi)\n\t}\n\treturn &messageReflectWrapper{p, mi}\n}\n\nfunc (m *messageReflectWrapper) pointer() pointer          { return m.p }\nfunc (m *messageReflectWrapper) messageInfo() *MessageInfo { return m.mi }\n\n// Reset implements the v1 proto.Message.Reset method.\nfunc (m *messageIfaceWrapper) Reset() {\n\tif mr, ok := m.protoUnwrap().(interface{ Reset() }); ok {\n\t\tmr.Reset()\n\t\treturn\n\t}\n\trv := reflect.ValueOf(m.protoUnwrap())\n\tif rv.Kind() == reflect.Ptr && !rv.IsNil() {\n\t\trv.Elem().Set(reflect.Zero(rv.Type().Elem()))\n\t}\n}\nfunc (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {\n\treturn (*messageReflectWrapper)(m)\n}\nfunc (m *messageIfaceWrapper) protoUnwrap() any {\n\treturn m.p.AsIfaceOf(m.mi.GoReflectType.Elem())\n}\n\n// checkField verifies that the provided field descriptor is valid.\n// Exactly one of the returned values is populated.\nfunc (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionTypeDescriptor) {\n\tvar fi *fieldInfo\n\tif n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) {\n\t\tfi = mi.denseFields[n]\n\t} else {\n\t\tfi = mi.fields[n]\n\t}\n\tif fi != nil {\n\t\tif fi.fieldDesc != fd {\n\t\t\tif got, want := fd.FullName(), fi.fieldDesc.FullName(); got != want {\n\t\t\t\tpanic(fmt.Sprintf(\"mismatching field: got %v, want %v\", got, want))\n\t\t\t}\n\t\t\tpanic(fmt.Sprintf(\"mismatching field: %v\", fd.FullName()))\n\t\t}\n\t\treturn fi, nil\n\t}\n\n\tif fd.IsExtension() {\n\t\tif got, want := fd.ContainingMessage().FullName(), mi.Desc.FullName(); got != want {\n\t\t\t// TODO: Should this be exact containing message descriptor match?\n\t\t\tpanic(fmt.Sprintf(\"extension %v has mismatching containing message: got %v, want %v\", fd.FullName(), got, want))\n\t\t}\n\t\tif !mi.Desc.ExtensionRanges().Has(fd.Number()) {\n\t\t\tpanic(fmt.Sprintf(\"extension %v extends %v outside the extension range\", fd.FullName(), mi.Desc.FullName()))\n\t\t}\n\t\txtd, ok := fd.(protoreflect.ExtensionTypeDescriptor)\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"extension %v does not implement protoreflect.ExtensionTypeDescriptor\", fd.FullName()))\n\t\t}\n\t\treturn nil, xtd\n\t}\n\tpanic(fmt.Sprintf(\"field %v is invalid\", fd.FullName()))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype fieldInfo struct {\n\tfieldDesc protoreflect.FieldDescriptor\n\n\t// These fields are used for protobuf reflection support.\n\thas        func(pointer) bool\n\tclear      func(pointer)\n\tget        func(pointer) protoreflect.Value\n\tset        func(pointer, protoreflect.Value)\n\tmutable    func(pointer) protoreflect.Value\n\tnewMessage func() protoreflect.Message\n\tnewField   func() protoreflect.Value\n}\n\nfunc fieldInfoForMissing(fd protoreflect.FieldDescriptor) fieldInfo {\n\t// This never occurs for generated message types.\n\t// It implies that a hand-crafted type has missing Go fields\n\t// for specific protobuf message fields.\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\treturn false\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\treturn fd.Default()\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t},\n\t\tnewMessage: func() protoreflect.Message {\n\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\tif v := fd.Default(); v.IsValid() {\n\t\t\t\treturn v\n\t\t\t}\n\t\t\tpanic(\"missing Go struct field for \" + string(fd.FullName()))\n\t\t},\n\t}\n}\n\nfunc fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Interface {\n\t\tpanic(fmt.Sprintf(\"field %v has invalid type: got %v, want interface kind\", fd.FullName(), ft))\n\t}\n\tif ot.Kind() != reflect.Struct {\n\t\tpanic(fmt.Sprintf(\"field %v has invalid type: got %v, want struct kind\", fd.FullName(), ot))\n\t}\n\tif !reflect.PtrTo(ot).Implements(ft) {\n\t\tpanic(fmt.Sprintf(\"field %v has invalid type: %v does not implement %v\", fd.FullName(), ot, ft))\n\t}\n\tconv := NewConverter(ot.Field(0).Type, fd)\n\tisMessage := fd.Message() != nil\n\n\t// TODO: Implement unsafe fast path?\n\tfieldOffset := offsetOf(fs)\n\treturn fieldInfo{\n\t\t// NOTE: The logic below intentionally assumes that oneof fields are\n\t\t// well-formatted. That is, the oneof interface never contains a\n\t\t// typed nil pointer to one of the wrapper structs.\n\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() || rv.Elem().Type().Elem() != ot {\n\t\t\t\t// NOTE: We intentionally don't check for rv.Elem().IsNil()\n\t\t\t\t// so that (*OneofWrapperType)(nil) gets cleared to nil.\n\t\t\t\treturn\n\t\t\t}\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv = rv.Elem().Elem().Field(0)\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() {\n\t\t\t\trv.Set(reflect.New(ot))\n\t\t\t}\n\t\t\trv = rv.Elem().Elem().Field(0)\n\t\t\trv.Set(conv.GoValueOf(v))\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tif !isMessage {\n\t\t\t\tpanic(fmt.Sprintf(\"field %v with invalid Mutable call on field with non-composite type\", fd.FullName()))\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() {\n\t\t\t\trv.Set(reflect.New(ot))\n\t\t\t}\n\t\t\trv = rv.Elem().Elem().Field(0)\n\t\t\tif rv.Kind() == reflect.Ptr && rv.IsNil() {\n\t\t\t\trv.Set(conv.GoValueOf(protoreflect.ValueOfMessage(conv.New().Message())))\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tnewMessage: func() protoreflect.Message {\n\t\t\treturn conv.New().Message()\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Map {\n\t\tpanic(fmt.Sprintf(\"field %v has invalid type: got %v, want map kind\", fd.FullName(), ft))\n\t}\n\tconv := NewConverter(ft, fd)\n\n\t// TODO: Implement unsafe fast path?\n\tfieldOffset := offsetOf(fs)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn rv.Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tpv := conv.GoValueOf(v)\n\t\t\tif pv.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"map field %v cannot be set with read-only value\", fd.FullName()))\n\t\t\t}\n\t\t\trv.Set(pv)\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif v.IsNil() {\n\t\t\t\tv.Set(reflect.MakeMap(fs.Type))\n\t\t\t}\n\t\t\treturn conv.PBValueOf(v)\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {\n\tft := fs.Type\n\tif ft.Kind() != reflect.Slice {\n\t\tpanic(fmt.Sprintf(\"field %v has invalid type: got %v, want slice kind\", fd.FullName(), ft))\n\t}\n\tconv := NewConverter(reflect.PtrTo(ft), fd)\n\n\t// TODO: Implement unsafe fast path?\n\tfieldOffset := offsetOf(fs)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn rv.Len() > 0\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type)\n\t\t\tif rv.Elem().Len() == 0 {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tpv := conv.GoValueOf(v)\n\t\t\tif pv.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"list field %v cannot be set with read-only value\", fd.FullName()))\n\t\t\t}\n\t\t\trv.Set(pv.Elem())\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\tv := p.Apply(fieldOffset).AsValueOf(fs.Type)\n\t\t\treturn conv.PBValueOf(v)\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nvar (\n\tnilBytes   = reflect.ValueOf([]byte(nil))\n\temptyBytes = reflect.ValueOf([]byte{})\n)\n\nfunc fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {\n\tft := fs.Type\n\tnullable := fd.HasPresence()\n\tisBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8\n\tvar getter func(p pointer) protoreflect.Value\n\tif nullable {\n\t\tif ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice {\n\t\t\t// This never occurs for generated message types.\n\t\t\t// Despite the protobuf type system specifying presence,\n\t\t\t// the Go field type cannot represent it.\n\t\t\tnullable = false\n\t\t}\n\t\tif ft.Kind() == reflect.Ptr {\n\t\t\tft = ft.Elem()\n\t\t}\n\t}\n\tconv := NewConverter(ft, fd)\n\tfieldOffset := offsetOf(fs)\n\n\t// Generate specialized getter functions to avoid going through reflect.Value\n\tif nullable {\n\t\tgetter = getterForNullableScalar(fd, fs, conv, fieldOffset)\n\t} else {\n\t\tgetter = getterForDirectScalar(fd, fs, conv, fieldOffset)\n\t}\n\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif nullable {\n\t\t\t\treturn !p.Apply(fieldOffset).Elem().IsNil()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tswitch rv.Kind() {\n\t\t\tcase reflect.Bool:\n\t\t\t\treturn rv.Bool()\n\t\t\tcase reflect.Int32, reflect.Int64:\n\t\t\t\treturn rv.Int() != 0\n\t\t\tcase reflect.Uint32, reflect.Uint64:\n\t\t\t\treturn rv.Uint() != 0\n\t\t\tcase reflect.Float32, reflect.Float64:\n\t\t\t\treturn rv.Float() != 0 || math.Signbit(rv.Float())\n\t\t\tcase reflect.String, reflect.Slice:\n\t\t\t\treturn rv.Len() > 0\n\t\t\tdefault:\n\t\t\t\tpanic(fmt.Sprintf(\"field %v has invalid type: %v\", fd.FullName(), rv.Type())) // should never happen\n\t\t\t}\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: getter,\n\t\t// TODO: Implement unsafe fast path for set?\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif nullable && rv.Kind() == reflect.Ptr {\n\t\t\t\tif rv.IsNil() {\n\t\t\t\t\trv.Set(reflect.New(ft))\n\t\t\t\t}\n\t\t\t\trv = rv.Elem()\n\t\t\t}\n\t\t\trv.Set(conv.GoValueOf(v))\n\t\t\tif isBytes && rv.Len() == 0 {\n\t\t\t\tif nullable {\n\t\t\t\t\trv.Set(emptyBytes) // preserve presence\n\t\t\t\t} else {\n\t\t\t\t\trv.Set(nilBytes) // do not preserve presence\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\nfunc fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {\n\tft := fs.Type\n\tconv := NewConverter(ft, fd)\n\n\t// TODO: Implement unsafe fast path?\n\tfieldOffset := offsetOf(fs)\n\treturn fieldInfo{\n\t\tfieldDesc: fd,\n\t\thas: func(p pointer) bool {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif fs.Type.Kind() != reflect.Ptr {\n\t\t\t\treturn !rv.IsZero()\n\t\t\t}\n\t\t\treturn !rv.IsNil()\n\t\t},\n\t\tclear: func(p pointer) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(reflect.Zero(rv.Type()))\n\t\t},\n\t\tget: func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tset: func(p pointer, v protoreflect.Value) {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\trv.Set(conv.GoValueOf(v))\n\t\t\tif fs.Type.Kind() == reflect.Ptr && rv.IsNil() {\n\t\t\t\tpanic(fmt.Sprintf(\"field %v has invalid nil pointer\", fd.FullName()))\n\t\t\t}\n\t\t},\n\t\tmutable: func(p pointer) protoreflect.Value {\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif fs.Type.Kind() == reflect.Ptr && rv.IsNil() {\n\t\t\t\trv.Set(conv.GoValueOf(conv.New()))\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv)\n\t\t},\n\t\tnewMessage: func() protoreflect.Message {\n\t\t\treturn conv.New().Message()\n\t\t},\n\t\tnewField: func() protoreflect.Value {\n\t\t\treturn conv.New()\n\t\t},\n\t}\n}\n\ntype oneofInfo struct {\n\toneofDesc protoreflect.OneofDescriptor\n\twhich     func(pointer) protoreflect.FieldNumber\n}\n\nfunc makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo {\n\toi := &oneofInfo{oneofDesc: od}\n\tif od.IsSynthetic() {\n\t\tfs := si.fieldsByNumber[od.Fields().Get(0).Number()]\n\t\tfieldOffset := offsetOf(fs)\n\t\toi.which = func(p pointer) protoreflect.FieldNumber {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() { // valid on either *T or []byte\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn od.Fields().Get(0).Number()\n\t\t}\n\t} else {\n\t\tfs := si.oneofsByName[od.Name()]\n\t\tfieldOffset := offsetOf(fs)\n\t\toi.which = func(p pointer) protoreflect.FieldNumber {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\trv = rv.Elem()\n\t\t\tif rv.IsNil() {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn si.oneofWrappersByType[rv.Type().Elem()]\n\t\t}\n\t}\n\treturn oi\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc getterForNullableScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value {\n\tft := fs.Type\n\tif ft.Kind() == reflect.Ptr {\n\t\tft = ft.Elem()\n\t}\n\tif fd.Kind() == protoreflect.EnumKind {\n\t\telemType := fs.Type.Elem()\n\t\t// Enums for nullable types.\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).Elem().AsValueOf(elemType)\n\t\t\tif rv.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn conv.PBValueOf(rv.Elem())\n\t\t}\n\t}\n\tswitch ft.Kind() {\n\tcase reflect.Bool:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).BoolPtr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfBool(**x)\n\t\t}\n\tcase reflect.Int32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int32Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfInt32(**x)\n\t\t}\n\tcase reflect.Uint32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint32Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfUint32(**x)\n\t\t}\n\tcase reflect.Int64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int64Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfInt64(**x)\n\t\t}\n\tcase reflect.Uint64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint64Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfUint64(**x)\n\t\t}\n\tcase reflect.Float32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float32Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfFloat32(**x)\n\t\t}\n\tcase reflect.Float64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float64Ptr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfFloat64(**x)\n\t\t}\n\tcase reflect.String:\n\t\tif fd.Kind() == protoreflect.BytesKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).StringPtr()\n\t\t\t\tif *x == nil {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tif len(**x) == 0 {\n\t\t\t\t\treturn protoreflect.ValueOfBytes(nil)\n\t\t\t\t}\n\t\t\t\treturn protoreflect.ValueOfBytes([]byte(**x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).StringPtr()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfString(**x)\n\t\t}\n\tcase reflect.Slice:\n\t\tif fd.Kind() == protoreflect.StringKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\t\tif len(*x) == 0 {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\treturn protoreflect.ValueOfString(string(*x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\tif *x == nil {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\treturn protoreflect.ValueOfBytes(*x)\n\t\t}\n\t}\n\tpanic(\"unexpected protobuf kind: \" + ft.Kind().String())\n}\n\nfunc getterForDirectScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value {\n\tft := fs.Type\n\tif fd.Kind() == protoreflect.EnumKind {\n\t\t// Enums for non nullable types.\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\trv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem()\n\t\t\treturn conv.PBValueOf(rv)\n\t\t}\n\t}\n\tswitch ft.Kind() {\n\tcase reflect.Bool:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Bool()\n\t\t\treturn protoreflect.ValueOfBool(*x)\n\t\t}\n\tcase reflect.Int32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int32()\n\t\t\treturn protoreflect.ValueOfInt32(*x)\n\t\t}\n\tcase reflect.Uint32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint32()\n\t\t\treturn protoreflect.ValueOfUint32(*x)\n\t\t}\n\tcase reflect.Int64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Int64()\n\t\t\treturn protoreflect.ValueOfInt64(*x)\n\t\t}\n\tcase reflect.Uint64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Uint64()\n\t\t\treturn protoreflect.ValueOfUint64(*x)\n\t\t}\n\tcase reflect.Float32:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float32()\n\t\t\treturn protoreflect.ValueOfFloat32(*x)\n\t\t}\n\tcase reflect.Float64:\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Float64()\n\t\t\treturn protoreflect.ValueOfFloat64(*x)\n\t\t}\n\tcase reflect.String:\n\t\tif fd.Kind() == protoreflect.BytesKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).String()\n\t\t\t\tif len(*x) == 0 {\n\t\t\t\t\treturn protoreflect.ValueOfBytes(nil)\n\t\t\t\t}\n\t\t\t\treturn protoreflect.ValueOfBytes([]byte(*x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).String()\n\t\t\treturn protoreflect.ValueOfString(*x)\n\t\t}\n\tcase reflect.Slice:\n\t\tif fd.Kind() == protoreflect.StringKind {\n\t\t\treturn func(p pointer) protoreflect.Value {\n\t\t\t\tif p.IsNil() {\n\t\t\t\t\treturn conv.Zero()\n\t\t\t\t}\n\t\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\t\treturn protoreflect.ValueOfString(string(*x))\n\t\t\t}\n\t\t}\n\t\treturn func(p pointer) protoreflect.Value {\n\t\t\tif p.IsNil() {\n\t\t\t\treturn conv.Zero()\n\t\t\t}\n\t\t\tx := p.Apply(fieldOffset).Bytes()\n\t\t\treturn protoreflect.ValueOfBytes(*x)\n\t\t}\n\t}\n\tpanic(\"unexpected protobuf kind: \" + ft.Kind().String())\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage impl\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nfunc (m *messageState) Descriptor() protoreflect.MessageDescriptor {\n\treturn m.messageInfo().Desc\n}\nfunc (m *messageState) Type() protoreflect.MessageType {\n\treturn m.messageInfo()\n}\nfunc (m *messageState) New() protoreflect.Message {\n\treturn m.messageInfo().New()\n}\nfunc (m *messageState) Interface() protoreflect.ProtoMessage {\n\treturn m.protoUnwrap().(protoreflect.ProtoMessage)\n}\nfunc (m *messageState) protoUnwrap() any {\n\treturn m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())\n}\nfunc (m *messageState) ProtoMethods() *protoiface.Methods {\n\tmi := m.messageInfo()\n\tmi.init()\n\treturn &mi.methods\n}\n\n// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code\n// to be able to retrieve a v2 MessageInfo struct.\n//\n// WARNING: This method is exempt from the compatibility promise and\n// may be removed in the future without warning.\nfunc (m *messageState) ProtoMessageInfo() *MessageInfo {\n\treturn m.messageInfo()\n}\n\nfunc (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tfor _, ri := range mi.rangeInfos {\n\t\tswitch ri := ri.(type) {\n\t\tcase *fieldInfo:\n\t\t\tif ri.has(m.pointer()) {\n\t\t\t\tif !f(ri.fieldDesc, ri.get(m.pointer())) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\tcase *oneofInfo:\n\t\t\tif n := ri.which(m.pointer()); n > 0 {\n\t\t\t\tfi := mi.fields[n]\n\t\t\t\tif !f(fi.fieldDesc, fi.get(m.pointer())) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tmi.extensionMap(m.pointer()).Range(f)\n}\nfunc (m *messageState) Has(fd protoreflect.FieldDescriptor) bool {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.has(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Has(xd)\n\t}\n}\nfunc (m *messageState) Clear(fd protoreflect.FieldDescriptor) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\tfi.clear(m.pointer())\n\t} else {\n\t\tmi.extensionMap(m.pointer()).Clear(xd)\n\t}\n}\nfunc (m *messageState) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.get(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Get(xd)\n\t}\n}\nfunc (m *messageState) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\tfi.set(m.pointer(), v)\n\t} else {\n\t\tmi.extensionMap(m.pointer()).Set(xd, v)\n\t}\n}\nfunc (m *messageState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.mutable(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Mutable(xd)\n\t}\n}\nfunc (m *messageState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.newField()\n\t} else {\n\t\treturn xd.Type().New()\n\t}\n}\nfunc (m *messageState) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od {\n\t\treturn od.Fields().ByNumber(oi.which(m.pointer()))\n\t}\n\tpanic(\"invalid oneof descriptor \" + string(od.FullName()) + \" for message \" + string(m.Descriptor().FullName()))\n}\nfunc (m *messageState) GetUnknown() protoreflect.RawFields {\n\tmi := m.messageInfo()\n\tmi.init()\n\treturn mi.getUnknown(m.pointer())\n}\nfunc (m *messageState) SetUnknown(b protoreflect.RawFields) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tmi.setUnknown(m.pointer(), b)\n}\nfunc (m *messageState) IsValid() bool {\n\treturn !m.pointer().IsNil()\n}\n\nfunc (m *messageReflectWrapper) Descriptor() protoreflect.MessageDescriptor {\n\treturn m.messageInfo().Desc\n}\nfunc (m *messageReflectWrapper) Type() protoreflect.MessageType {\n\treturn m.messageInfo()\n}\nfunc (m *messageReflectWrapper) New() protoreflect.Message {\n\treturn m.messageInfo().New()\n}\nfunc (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage {\n\tif m, ok := m.protoUnwrap().(protoreflect.ProtoMessage); ok {\n\t\treturn m\n\t}\n\treturn (*messageIfaceWrapper)(m)\n}\nfunc (m *messageReflectWrapper) protoUnwrap() any {\n\treturn m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())\n}\nfunc (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {\n\tmi := m.messageInfo()\n\tmi.init()\n\treturn &mi.methods\n}\n\n// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code\n// to be able to retrieve a v2 MessageInfo struct.\n//\n// WARNING: This method is exempt from the compatibility promise and\n// may be removed in the future without warning.\nfunc (m *messageReflectWrapper) ProtoMessageInfo() *MessageInfo {\n\treturn m.messageInfo()\n}\n\nfunc (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tfor _, ri := range mi.rangeInfos {\n\t\tswitch ri := ri.(type) {\n\t\tcase *fieldInfo:\n\t\t\tif ri.has(m.pointer()) {\n\t\t\t\tif !f(ri.fieldDesc, ri.get(m.pointer())) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\tcase *oneofInfo:\n\t\t\tif n := ri.which(m.pointer()); n > 0 {\n\t\t\t\tfi := mi.fields[n]\n\t\t\t\tif !f(fi.fieldDesc, fi.get(m.pointer())) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tmi.extensionMap(m.pointer()).Range(f)\n}\nfunc (m *messageReflectWrapper) Has(fd protoreflect.FieldDescriptor) bool {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.has(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Has(xd)\n\t}\n}\nfunc (m *messageReflectWrapper) Clear(fd protoreflect.FieldDescriptor) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\tfi.clear(m.pointer())\n\t} else {\n\t\tmi.extensionMap(m.pointer()).Clear(xd)\n\t}\n}\nfunc (m *messageReflectWrapper) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.get(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Get(xd)\n\t}\n}\nfunc (m *messageReflectWrapper) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\tfi.set(m.pointer(), v)\n\t} else {\n\t\tmi.extensionMap(m.pointer()).Set(xd, v)\n\t}\n}\nfunc (m *messageReflectWrapper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.mutable(m.pointer())\n\t} else {\n\t\treturn mi.extensionMap(m.pointer()).Mutable(xd)\n\t}\n}\nfunc (m *messageReflectWrapper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif fi, xd := mi.checkField(fd); fi != nil {\n\t\treturn fi.newField()\n\t} else {\n\t\treturn xd.Type().New()\n\t}\n}\nfunc (m *messageReflectWrapper) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {\n\tmi := m.messageInfo()\n\tmi.init()\n\tif oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od {\n\t\treturn od.Fields().ByNumber(oi.which(m.pointer()))\n\t}\n\tpanic(\"invalid oneof descriptor \" + string(od.FullName()) + \" for message \" + string(m.Descriptor().FullName()))\n}\nfunc (m *messageReflectWrapper) GetUnknown() protoreflect.RawFields {\n\tmi := m.messageInfo()\n\tmi.init()\n\treturn mi.getUnknown(m.pointer())\n}\nfunc (m *messageReflectWrapper) SetUnknown(b protoreflect.RawFields) {\n\tmi := m.messageInfo()\n\tmi.init()\n\tmi.setUnknown(m.pointer(), b)\n}\nfunc (m *messageReflectWrapper) IsValid() bool {\n\treturn !m.pointer().IsNil()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"reflect\"\n\t\"sync/atomic\"\n\t\"unsafe\"\n\n\t\"google.golang.org/protobuf/internal/protolazy\"\n)\n\nconst UnsafeEnabled = true\n\n// Pointer is an opaque pointer type.\ntype Pointer unsafe.Pointer\n\n// offset represents the offset to a struct field, accessible from a pointer.\n// The offset is the byte offset to the field from the start of the struct.\ntype offset uintptr\n\n// offsetOf returns a field offset for the struct field.\nfunc offsetOf(f reflect.StructField) offset {\n\treturn offset(f.Offset)\n}\n\n// IsValid reports whether the offset is valid.\nfunc (f offset) IsValid() bool { return f != invalidOffset }\n\n// invalidOffset is an invalid field offset.\nvar invalidOffset = ^offset(0)\n\n// zeroOffset is a noop when calling pointer.Apply.\nvar zeroOffset = offset(0)\n\n// pointer is a pointer to a message struct or field.\ntype pointer struct{ p unsafe.Pointer }\n\n// pointerOf returns p as a pointer.\nfunc pointerOf(p Pointer) pointer {\n\treturn pointer{p: unsafe.Pointer(p)}\n}\n\n// pointerOfValue returns v as a pointer.\nfunc pointerOfValue(v reflect.Value) pointer {\n\treturn pointer{p: unsafe.Pointer(v.Pointer())}\n}\n\n// pointerOfIface returns the pointer portion of an interface.\nfunc pointerOfIface(v any) pointer {\n\ttype ifaceHeader struct {\n\t\tType unsafe.Pointer\n\t\tData unsafe.Pointer\n\t}\n\treturn pointer{p: (*ifaceHeader)(unsafe.Pointer(&v)).Data}\n}\n\n// IsNil reports whether the pointer is nil.\nfunc (p pointer) IsNil() bool {\n\treturn p.p == nil\n}\n\n// Apply adds an offset to the pointer to derive a new pointer\n// to a specified field. The pointer must be valid and pointing at a struct.\nfunc (p pointer) Apply(f offset) pointer {\n\tif p.IsNil() {\n\t\tpanic(\"invalid nil pointer\")\n\t}\n\treturn pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))}\n}\n\n// AsValueOf treats p as a pointer to an object of type t and returns the value.\n// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t))\nfunc (p pointer) AsValueOf(t reflect.Type) reflect.Value {\n\treturn reflect.NewAt(t, p.p)\n}\n\n// AsIfaceOf treats p as a pointer to an object of type t and returns the value.\n// It is equivalent to p.AsValueOf(t).Interface()\nfunc (p pointer) AsIfaceOf(t reflect.Type) any {\n\t// TODO: Use tricky unsafe magic to directly create ifaceHeader.\n\treturn p.AsValueOf(t).Interface()\n}\n\nfunc (p pointer) Bool() *bool                           { return (*bool)(p.p) }\nfunc (p pointer) BoolPtr() **bool                       { return (**bool)(p.p) }\nfunc (p pointer) BoolSlice() *[]bool                    { return (*[]bool)(p.p) }\nfunc (p pointer) Int32() *int32                         { return (*int32)(p.p) }\nfunc (p pointer) Int32Ptr() **int32                     { return (**int32)(p.p) }\nfunc (p pointer) Int32Slice() *[]int32                  { return (*[]int32)(p.p) }\nfunc (p pointer) Int64() *int64                         { return (*int64)(p.p) }\nfunc (p pointer) Int64Ptr() **int64                     { return (**int64)(p.p) }\nfunc (p pointer) Int64Slice() *[]int64                  { return (*[]int64)(p.p) }\nfunc (p pointer) Uint32() *uint32                       { return (*uint32)(p.p) }\nfunc (p pointer) Uint32Ptr() **uint32                   { return (**uint32)(p.p) }\nfunc (p pointer) Uint32Slice() *[]uint32                { return (*[]uint32)(p.p) }\nfunc (p pointer) Uint64() *uint64                       { return (*uint64)(p.p) }\nfunc (p pointer) Uint64Ptr() **uint64                   { return (**uint64)(p.p) }\nfunc (p pointer) Uint64Slice() *[]uint64                { return (*[]uint64)(p.p) }\nfunc (p pointer) Float32() *float32                     { return (*float32)(p.p) }\nfunc (p pointer) Float32Ptr() **float32                 { return (**float32)(p.p) }\nfunc (p pointer) Float32Slice() *[]float32              { return (*[]float32)(p.p) }\nfunc (p pointer) Float64() *float64                     { return (*float64)(p.p) }\nfunc (p pointer) Float64Ptr() **float64                 { return (**float64)(p.p) }\nfunc (p pointer) Float64Slice() *[]float64              { return (*[]float64)(p.p) }\nfunc (p pointer) String() *string                       { return (*string)(p.p) }\nfunc (p pointer) StringPtr() **string                   { return (**string)(p.p) }\nfunc (p pointer) StringSlice() *[]string                { return (*[]string)(p.p) }\nfunc (p pointer) Bytes() *[]byte                        { return (*[]byte)(p.p) }\nfunc (p pointer) BytesPtr() **[]byte                    { return (**[]byte)(p.p) }\nfunc (p pointer) BytesSlice() *[][]byte                 { return (*[][]byte)(p.p) }\nfunc (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) }\nfunc (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo {\n\treturn (**protolazy.XXX_lazyUnmarshalInfo)(p.p)\n}\n\nfunc (p pointer) PresenceInfo() presence {\n\treturn presence{P: p.p}\n}\n\nfunc (p pointer) Elem() pointer {\n\treturn pointer{p: *(*unsafe.Pointer)(p.p)}\n}\n\n// PointerSlice loads []*T from p as a []pointer.\n// The value returned is aliased with the original slice.\n// This behavior differs from the implementation in pointer_reflect.go.\nfunc (p pointer) PointerSlice() []pointer {\n\t// Super-tricky - p should point to a []*T where T is a\n\t// message type. We load it as []pointer.\n\treturn *(*[]pointer)(p.p)\n}\n\n// AppendPointerSlice appends v to p, which must be a []*T.\nfunc (p pointer) AppendPointerSlice(v pointer) {\n\t*(*[]pointer)(p.p) = append(*(*[]pointer)(p.p), v)\n}\n\n// SetPointer sets *p to v.\nfunc (p pointer) SetPointer(v pointer) {\n\t*(*unsafe.Pointer)(p.p) = (unsafe.Pointer)(v.p)\n}\n\nfunc (p pointer) growBoolSlice(addCap int) {\n\tsp := p.BoolSlice()\n\ts := make([]bool, 0, addCap+len(*sp))\n\ts = s[:len(*sp)]\n\tcopy(s, *sp)\n\t*sp = s\n}\n\nfunc (p pointer) growInt32Slice(addCap int) {\n\tsp := p.Int32Slice()\n\ts := make([]int32, 0, addCap+len(*sp))\n\ts = s[:len(*sp)]\n\tcopy(s, *sp)\n\t*sp = s\n}\n\nfunc (p pointer) growUint32Slice(addCap int) {\n\tp.growInt32Slice(addCap)\n}\n\nfunc (p pointer) growFloat32Slice(addCap int) {\n\tp.growInt32Slice(addCap)\n}\n\nfunc (p pointer) growInt64Slice(addCap int) {\n\tsp := p.Int64Slice()\n\ts := make([]int64, 0, addCap+len(*sp))\n\ts = s[:len(*sp)]\n\tcopy(s, *sp)\n\t*sp = s\n}\n\nfunc (p pointer) growUint64Slice(addCap int) {\n\tp.growInt64Slice(addCap)\n}\n\nfunc (p pointer) growFloat64Slice(addCap int) {\n\tp.growInt64Slice(addCap)\n}\n\n// Static check that MessageState does not exceed the size of a pointer.\nconst _ = uint(unsafe.Sizeof(unsafe.Pointer(nil)) - unsafe.Sizeof(MessageState{}))\n\nfunc (Export) MessageStateOf(p Pointer) *messageState {\n\t// Super-tricky - see documentation on MessageState.\n\treturn (*messageState)(unsafe.Pointer(p))\n}\nfunc (ms *messageState) pointer() pointer {\n\t// Super-tricky - see documentation on MessageState.\n\treturn pointer{p: unsafe.Pointer(ms)}\n}\nfunc (ms *messageState) messageInfo() *MessageInfo {\n\tmi := ms.LoadMessageInfo()\n\tif mi == nil {\n\t\tpanic(\"invalid nil message info; this suggests memory corruption due to a race or shallow copy on the message struct\")\n\t}\n\treturn mi\n}\nfunc (ms *messageState) LoadMessageInfo() *MessageInfo {\n\treturn (*MessageInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&ms.atomicMessageInfo))))\n}\nfunc (ms *messageState) StoreMessageInfo(mi *MessageInfo) {\n\tatomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&ms.atomicMessageInfo)), unsafe.Pointer(mi))\n}\n\ntype atomicNilMessage struct{ p unsafe.Pointer } // p is a *messageReflectWrapper\n\nfunc (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper {\n\tif p := atomic.LoadPointer(&m.p); p != nil {\n\t\treturn (*messageReflectWrapper)(p)\n\t}\n\tw := &messageReflectWrapper{mi: mi}\n\tatomic.CompareAndSwapPointer(&m.p, nil, (unsafe.Pointer)(w))\n\treturn (*messageReflectWrapper)(atomic.LoadPointer(&m.p))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"sync/atomic\"\n\t\"unsafe\"\n)\n\nfunc (p pointer) AtomicGetPointer() pointer {\n\treturn pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))}\n}\n\nfunc (p pointer) AtomicSetPointer(v pointer) {\n\tatomic.StorePointer((*unsafe.Pointer)(p.p), v.p)\n}\n\nfunc (p pointer) AtomicSetNilPointer() {\n\tatomic.StorePointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil))\n}\n\nfunc (p pointer) AtomicSetPointerIfNil(v pointer) pointer {\n\tif atomic.CompareAndSwapPointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil), v.p) {\n\t\treturn v\n\t}\n\treturn pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))}\n}\n\ntype atomicV1MessageInfo struct{ p Pointer }\n\nfunc (mi *atomicV1MessageInfo) Get() Pointer {\n\treturn Pointer(atomic.LoadPointer((*unsafe.Pointer)(&mi.p)))\n}\n\nfunc (mi *atomicV1MessageInfo) SetIfNil(p Pointer) Pointer {\n\tif atomic.CompareAndSwapPointer((*unsafe.Pointer)(&mi.p), nil, unsafe.Pointer(p)) {\n\t\treturn p\n\t}\n\treturn mi.Get()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/presence.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"sync/atomic\"\n\t\"unsafe\"\n)\n\n// presenceSize represents the size of a presence set, which should be the largest index of the set+1\ntype presenceSize uint32\n\n// presence is the internal representation of the bitmap array in a generated protobuf\ntype presence struct {\n\t// This is a pointer to the beginning of an array of uint32\n\tP unsafe.Pointer\n}\n\nfunc (p presence) toElem(num uint32) (ret *uint32) {\n\tconst (\n\t\tbitsPerByte = 8\n\t\tsiz         = unsafe.Sizeof(*ret)\n\t)\n\t// p.P points to an array of uint32, num is the bit in this array that the\n\t// caller wants to check/manipulate. Calculate the index in the array that\n\t// contains this specific bit. E.g.: 76 / 32 = 2 (integer division).\n\toffset := uintptr(num) / (siz * bitsPerByte) * siz\n\treturn (*uint32)(unsafe.Pointer(uintptr(p.P) + offset))\n}\n\n// Present checks for the presence of a specific field number in a presence set.\nfunc (p presence) Present(num uint32) bool {\n\treturn Export{}.Present(p.toElem(num), num)\n}\n\n// SetPresent adds presence for a specific field number in a presence set.\nfunc (p presence) SetPresent(num uint32, size presenceSize) {\n\tExport{}.SetPresent(p.toElem(num), num, uint32(size))\n}\n\n// SetPresentUnatomic adds presence for a specific field number in a presence set without using\n// atomic operations. Only to be called during unmarshaling.\nfunc (p presence) SetPresentUnatomic(num uint32, size presenceSize) {\n\tExport{}.SetPresentNonAtomic(p.toElem(num), num, uint32(size))\n}\n\n// ClearPresent removes presence for a specific field number in a presence set.\nfunc (p presence) ClearPresent(num uint32) {\n\tExport{}.ClearPresent(p.toElem(num), num)\n}\n\n// LoadPresenceCache (together with PresentInCache) allows for a\n// cached version of checking for presence without re-reading the word\n// for every field. It is optimized for efficiency and assumes no\n// simltaneous mutation of the presence set (or at least does not have\n// a problem with simultaneous mutation giving inconsistent results).\nfunc (p presence) LoadPresenceCache() (current uint32) {\n\tif p.P == nil {\n\t\treturn 0\n\t}\n\treturn atomic.LoadUint32((*uint32)(p.P))\n}\n\n// PresentInCache reads presence from a cached word in the presence\n// bitmap. It caches up a new word if the bit is outside the\n// word. This is for really fast iteration through bitmaps in cases\n// where we either know that the bitmap will not be altered, or we\n// don't care about inconsistencies caused by simultaneous writes.\nfunc (p presence) PresentInCache(num uint32, cachedElement *uint32, current *uint32) bool {\n\tif num/32 != *cachedElement {\n\t\to := uintptr(num/32) * unsafe.Sizeof(uint32(0))\n\t\tq := (*uint32)(unsafe.Pointer(uintptr(p.P) + o))\n\t\t*current = atomic.LoadUint32(q)\n\t\t*cachedElement = num / 32\n\t}\n\treturn (*current & (1 << (num % 32))) > 0\n}\n\n// AnyPresent checks if any field is marked as present in the bitmap.\nfunc (p presence) AnyPresent(size presenceSize) bool {\n\tn := uintptr((size + 31) / 32)\n\tfor j := uintptr(0); j < n; j++ {\n\t\to := j * unsafe.Sizeof(uint32(0))\n\t\tq := (*uint32)(unsafe.Pointer(uintptr(p.P) + o))\n\t\tb := atomic.LoadUint32(q)\n\t\tif b > 0 {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// toRaceDetectData finds the preceding RaceDetectHookData in a\n// message by using pointer arithmetic. As the type of the presence\n// set (bitmap) varies with the number of fields in the protobuf, we\n// can not have a struct type containing the array and the\n// RaceDetectHookData.  instead the RaceDetectHookData is placed\n// immediately before the bitmap array, and we find it by walking\n// backwards in the struct.\n//\n// This method is only called from the race-detect version of the code,\n// so RaceDetectHookData is never an empty struct.\nfunc (p presence) toRaceDetectData() *RaceDetectHookData {\n\tvar template struct {\n\t\td RaceDetectHookData\n\t\ta [1]uint32\n\t}\n\to := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d)))\n\treturn (*RaceDetectHookData)(unsafe.Pointer(uintptr(p.P) - o))\n}\n\nfunc atomicLoadShadowPresence(p **[]byte) *[]byte {\n\treturn (*[]byte)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))\n}\nfunc atomicStoreShadowPresence(p **[]byte, v *[]byte) {\n\tatomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(p)), nil, unsafe.Pointer(v))\n}\n\n// findPointerToRaceDetectData finds the preceding RaceDetectHookData\n// in a message by using pointer arithmetic. For the methods called\n// directy from generated code, we don't have a pointer to the\n// beginning of the presence set, but a pointer inside the array. As\n// we know the index of the bit we're manipulating (num), we can\n// calculate which element of the array ptr is pointing to. With that\n// information we find the preceding RaceDetectHookData and can\n// manipulate the shadow bitmap.\n//\n// This method is only called from the race-detect version of the\n// code, so RaceDetectHookData is never an empty struct.\nfunc findPointerToRaceDetectData(ptr *uint32, num uint32) *RaceDetectHookData {\n\tvar template struct {\n\t\td RaceDetectHookData\n\t\ta [1]uint32\n\t}\n\to := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + uintptr(num/32)*unsafe.Sizeof(uint32(0))\n\treturn (*RaceDetectHookData)(unsafe.Pointer(uintptr(unsafe.Pointer(ptr)) - o))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/impl/validate.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage impl\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"math/bits\"\n\t\"reflect\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// ValidationStatus is the result of validating the wire-format encoding of a message.\ntype ValidationStatus int\n\nconst (\n\t// ValidationUnknown indicates that unmarshaling the message might succeed or fail.\n\t// The validator was unable to render a judgement.\n\t//\n\t// The only causes of this status are an aberrant message type appearing somewhere\n\t// in the message or a failure in the extension resolver.\n\tValidationUnknown ValidationStatus = iota + 1\n\n\t// ValidationInvalid indicates that unmarshaling the message will fail.\n\tValidationInvalid\n\n\t// ValidationValid indicates that unmarshaling the message will succeed.\n\tValidationValid\n\n\t// ValidationWrongWireType indicates that a validated field does not have\n\t// the expected wire type.\n\tValidationWrongWireType\n)\n\nfunc (v ValidationStatus) String() string {\n\tswitch v {\n\tcase ValidationUnknown:\n\t\treturn \"ValidationUnknown\"\n\tcase ValidationInvalid:\n\t\treturn \"ValidationInvalid\"\n\tcase ValidationValid:\n\t\treturn \"ValidationValid\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"ValidationStatus(%d)\", int(v))\n\t}\n}\n\n// Validate determines whether the contents of the buffer are a valid wire encoding\n// of the message type.\n//\n// This function is exposed for testing.\nfunc Validate(mt protoreflect.MessageType, in protoiface.UnmarshalInput) (out protoiface.UnmarshalOutput, _ ValidationStatus) {\n\tmi, ok := mt.(*MessageInfo)\n\tif !ok {\n\t\treturn out, ValidationUnknown\n\t}\n\tif in.Resolver == nil {\n\t\tin.Resolver = protoregistry.GlobalTypes\n\t}\n\tif in.Depth == 0 {\n\t\tin.Depth = protowire.DefaultRecursionLimit\n\t}\n\to, st := mi.validate(in.Buf, 0, unmarshalOptions{\n\t\tflags:    in.Flags,\n\t\tresolver: in.Resolver,\n\t\tdepth:    in.Depth,\n\t})\n\tif o.initialized {\n\t\tout.Flags |= protoiface.UnmarshalInitialized\n\t}\n\treturn out, st\n}\n\ntype validationInfo struct {\n\tmi               *MessageInfo\n\ttyp              validationType\n\tkeyType, valType validationType\n\n\t// For non-required fields, requiredBit is 0.\n\t//\n\t// For required fields, requiredBit's nth bit is set, where n is a\n\t// unique index in the range [0, MessageInfo.numRequiredFields).\n\t//\n\t// If there are more than 64 required fields, requiredBit is 0.\n\trequiredBit uint64\n}\n\ntype validationType uint8\n\nconst (\n\tvalidationTypeOther validationType = iota\n\tvalidationTypeMessage\n\tvalidationTypeGroup\n\tvalidationTypeMap\n\tvalidationTypeRepeatedVarint\n\tvalidationTypeRepeatedFixed32\n\tvalidationTypeRepeatedFixed64\n\tvalidationTypeVarint\n\tvalidationTypeFixed32\n\tvalidationTypeFixed64\n\tvalidationTypeBytes\n\tvalidationTypeUTF8String\n\tvalidationTypeMessageSetItem\n)\n\nfunc newFieldValidationInfo(mi *MessageInfo, si structInfo, fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo {\n\tvar vi validationInfo\n\tswitch {\n\tcase fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.MessageKind:\n\t\t\tvi.typ = validationTypeMessage\n\t\t\tif ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok {\n\t\t\t\tvi.mi = getMessageInfo(ot.Field(0).Type)\n\t\t\t}\n\t\tcase protoreflect.GroupKind:\n\t\t\tvi.typ = validationTypeGroup\n\t\t\tif ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok {\n\t\t\t\tvi.mi = getMessageInfo(ot.Field(0).Type)\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\tvi.typ = validationTypeUTF8String\n\t\t\t}\n\t\t}\n\tdefault:\n\t\tvi = newValidationInfo(fd, ft)\n\t}\n\tif fd.Cardinality() == protoreflect.Required {\n\t\t// Avoid overflow. The required field check is done with a 64-bit mask, with\n\t\t// any message containing more than 64 required fields always reported as\n\t\t// potentially uninitialized, so it is not important to get a precise count\n\t\t// of the required fields past 64.\n\t\tif mi.numRequiredFields < math.MaxUint8 {\n\t\t\tmi.numRequiredFields++\n\t\t\tvi.requiredBit = 1 << (mi.numRequiredFields - 1)\n\t\t}\n\t}\n\treturn vi\n}\n\nfunc newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo {\n\tvar vi validationInfo\n\tswitch {\n\tcase fd.IsList():\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.MessageKind:\n\t\t\tvi.typ = validationTypeMessage\n\n\t\t\tif ft.Kind() == reflect.Ptr {\n\t\t\t\t// Repeated opaque message fields are *[]*T.\n\t\t\t\tft = ft.Elem()\n\t\t\t}\n\n\t\t\tif ft.Kind() == reflect.Slice {\n\t\t\t\tvi.mi = getMessageInfo(ft.Elem())\n\t\t\t}\n\t\tcase protoreflect.GroupKind:\n\t\t\tvi.typ = validationTypeGroup\n\n\t\t\tif ft.Kind() == reflect.Ptr {\n\t\t\t\t// Repeated opaque message fields are *[]*T.\n\t\t\t\tft = ft.Elem()\n\t\t\t}\n\n\t\t\tif ft.Kind() == reflect.Slice {\n\t\t\t\tvi.mi = getMessageInfo(ft.Elem())\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tvi.typ = validationTypeBytes\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\tvi.typ = validationTypeUTF8String\n\t\t\t}\n\t\tdefault:\n\t\t\tswitch wireTypes[fd.Kind()] {\n\t\t\tcase protowire.VarintType:\n\t\t\t\tvi.typ = validationTypeRepeatedVarint\n\t\t\tcase protowire.Fixed32Type:\n\t\t\t\tvi.typ = validationTypeRepeatedFixed32\n\t\t\tcase protowire.Fixed64Type:\n\t\t\t\tvi.typ = validationTypeRepeatedFixed64\n\t\t\t}\n\t\t}\n\tcase fd.IsMap():\n\t\tvi.typ = validationTypeMap\n\t\tswitch fd.MapKey().Kind() {\n\t\tcase protoreflect.StringKind:\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\tvi.keyType = validationTypeUTF8String\n\t\t\t}\n\t\t}\n\t\tswitch fd.MapValue().Kind() {\n\t\tcase protoreflect.MessageKind:\n\t\t\tvi.valType = validationTypeMessage\n\t\t\tif ft.Kind() == reflect.Map {\n\t\t\t\tvi.mi = getMessageInfo(ft.Elem())\n\t\t\t}\n\t\tcase protoreflect.StringKind:\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\tvi.valType = validationTypeUTF8String\n\t\t\t}\n\t\t}\n\tdefault:\n\t\tswitch fd.Kind() {\n\t\tcase protoreflect.MessageKind:\n\t\t\tvi.typ = validationTypeMessage\n\t\t\tvi.mi = getMessageInfo(ft)\n\t\tcase protoreflect.GroupKind:\n\t\t\tvi.typ = validationTypeGroup\n\t\t\tvi.mi = getMessageInfo(ft)\n\t\tcase protoreflect.StringKind:\n\t\t\tvi.typ = validationTypeBytes\n\t\t\tif strs.EnforceUTF8(fd) {\n\t\t\t\tvi.typ = validationTypeUTF8String\n\t\t\t}\n\t\tdefault:\n\t\t\tswitch wireTypes[fd.Kind()] {\n\t\t\tcase protowire.VarintType:\n\t\t\t\tvi.typ = validationTypeVarint\n\t\t\tcase protowire.Fixed32Type:\n\t\t\t\tvi.typ = validationTypeFixed32\n\t\t\tcase protowire.Fixed64Type:\n\t\t\t\tvi.typ = validationTypeFixed64\n\t\t\tcase protowire.BytesType:\n\t\t\t\tvi.typ = validationTypeBytes\n\t\t\t}\n\t\t}\n\t}\n\treturn vi\n}\n\nfunc (mi *MessageInfo) validate(b []byte, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, result ValidationStatus) {\n\tmi.init()\n\ttype validationState struct {\n\t\ttyp              validationType\n\t\tkeyType, valType validationType\n\t\tendGroup         protowire.Number\n\t\tmi               *MessageInfo\n\t\ttail             []byte\n\t\trequiredMask     uint64\n\t}\n\n\t// Pre-allocate some slots to avoid repeated slice reallocation.\n\tstates := make([]validationState, 0, 16)\n\tstates = append(states, validationState{\n\t\ttyp: validationTypeMessage,\n\t\tmi:  mi,\n\t})\n\tif groupTag > 0 {\n\t\tstates[0].typ = validationTypeGroup\n\t\tstates[0].endGroup = groupTag\n\t}\n\tif opts.depth--; opts.depth < 0 {\n\t\treturn out, ValidationInvalid\n\t}\n\tinitialized := true\n\tstart := len(b)\nState:\n\tfor len(states) > 0 {\n\t\tst := &states[len(states)-1]\n\t\tfor len(b) > 0 {\n\t\t\t// Parse the tag (field number and wire type).\n\t\t\tvar tag uint64\n\t\t\tif b[0] < 0x80 {\n\t\t\t\ttag = uint64(b[0])\n\t\t\t\tb = b[1:]\n\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\ttag = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\tb = b[2:]\n\t\t\t} else {\n\t\t\t\tvar n int\n\t\t\t\ttag, n = protowire.ConsumeVarint(b)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t}\n\t\t\t\tb = b[n:]\n\t\t\t}\n\t\t\tvar num protowire.Number\n\t\t\tif n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) {\n\t\t\t\treturn out, ValidationInvalid\n\t\t\t} else {\n\t\t\t\tnum = protowire.Number(n)\n\t\t\t}\n\t\t\twtyp := protowire.Type(tag & 7)\n\n\t\t\tif wtyp == protowire.EndGroupType {\n\t\t\t\tif st.endGroup == num {\n\t\t\t\t\tgoto PopState\n\t\t\t\t}\n\t\t\t\treturn out, ValidationInvalid\n\t\t\t}\n\t\t\tvar vi validationInfo\n\t\t\tswitch {\n\t\t\tcase st.typ == validationTypeMap:\n\t\t\t\tswitch num {\n\t\t\t\tcase genid.MapEntry_Key_field_number:\n\t\t\t\t\tvi.typ = st.keyType\n\t\t\t\tcase genid.MapEntry_Value_field_number:\n\t\t\t\t\tvi.typ = st.valType\n\t\t\t\t\tvi.mi = st.mi\n\t\t\t\t\tvi.requiredBit = 1\n\t\t\t\t}\n\t\t\tcase flags.ProtoLegacy && st.mi.isMessageSet:\n\t\t\t\tswitch num {\n\t\t\t\tcase messageset.FieldItem:\n\t\t\t\t\tvi.typ = validationTypeMessageSetItem\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tvar f *coderFieldInfo\n\t\t\t\tif int(num) < len(st.mi.denseCoderFields) {\n\t\t\t\t\tf = st.mi.denseCoderFields[num]\n\t\t\t\t} else {\n\t\t\t\t\tf = st.mi.coderFields[num]\n\t\t\t\t}\n\t\t\t\tif f != nil {\n\t\t\t\t\tvi = f.validation\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// Possible extension field.\n\t\t\t\t//\n\t\t\t\t// TODO: We should return ValidationUnknown when:\n\t\t\t\t//   1. The resolver is not frozen. (More extensions may be added to it.)\n\t\t\t\t//   2. The resolver returns preg.NotFound.\n\t\t\t\t// In this case, a type added to the resolver in the future could cause\n\t\t\t\t// unmarshaling to begin failing. Supporting this requires some way to\n\t\t\t\t// determine if the resolver is frozen.\n\t\t\t\txt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), num)\n\t\t\t\tif err != nil && err != protoregistry.NotFound {\n\t\t\t\t\treturn out, ValidationUnknown\n\t\t\t\t}\n\t\t\t\tif err == nil {\n\t\t\t\t\tvi = getExtensionFieldInfo(xt).validation\n\t\t\t\t}\n\t\t\t}\n\t\t\tif vi.requiredBit != 0 {\n\t\t\t\t// Check that the field has a compatible wire type.\n\t\t\t\t// We only need to consider non-repeated field types,\n\t\t\t\t// since repeated fields (and maps) can never be required.\n\t\t\t\tok := false\n\t\t\t\tswitch vi.typ {\n\t\t\t\tcase validationTypeVarint:\n\t\t\t\t\tok = wtyp == protowire.VarintType\n\t\t\t\tcase validationTypeFixed32:\n\t\t\t\t\tok = wtyp == protowire.Fixed32Type\n\t\t\t\tcase validationTypeFixed64:\n\t\t\t\t\tok = wtyp == protowire.Fixed64Type\n\t\t\t\tcase validationTypeBytes, validationTypeUTF8String, validationTypeMessage:\n\t\t\t\t\tok = wtyp == protowire.BytesType\n\t\t\t\tcase validationTypeGroup:\n\t\t\t\t\tok = wtyp == protowire.StartGroupType\n\t\t\t\t}\n\t\t\t\tif ok {\n\t\t\t\t\tst.requiredMask |= vi.requiredBit\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch wtyp {\n\t\t\tcase protowire.VarintType:\n\t\t\t\tif len(b) >= 10 {\n\t\t\t\t\tswitch {\n\t\t\t\t\tcase b[0] < 0x80:\n\t\t\t\t\t\tb = b[1:]\n\t\t\t\t\tcase b[1] < 0x80:\n\t\t\t\t\t\tb = b[2:]\n\t\t\t\t\tcase b[2] < 0x80:\n\t\t\t\t\t\tb = b[3:]\n\t\t\t\t\tcase b[3] < 0x80:\n\t\t\t\t\t\tb = b[4:]\n\t\t\t\t\tcase b[4] < 0x80:\n\t\t\t\t\t\tb = b[5:]\n\t\t\t\t\tcase b[5] < 0x80:\n\t\t\t\t\t\tb = b[6:]\n\t\t\t\t\tcase b[6] < 0x80:\n\t\t\t\t\t\tb = b[7:]\n\t\t\t\t\tcase b[7] < 0x80:\n\t\t\t\t\t\tb = b[8:]\n\t\t\t\t\tcase b[8] < 0x80:\n\t\t\t\t\t\tb = b[9:]\n\t\t\t\t\tcase b[9] < 0x80 && b[9] < 2:\n\t\t\t\t\t\tb = b[10:]\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch {\n\t\t\t\t\tcase len(b) > 0 && b[0] < 0x80:\n\t\t\t\t\t\tb = b[1:]\n\t\t\t\t\tcase len(b) > 1 && b[1] < 0x80:\n\t\t\t\t\t\tb = b[2:]\n\t\t\t\t\tcase len(b) > 2 && b[2] < 0x80:\n\t\t\t\t\t\tb = b[3:]\n\t\t\t\t\tcase len(b) > 3 && b[3] < 0x80:\n\t\t\t\t\t\tb = b[4:]\n\t\t\t\t\tcase len(b) > 4 && b[4] < 0x80:\n\t\t\t\t\t\tb = b[5:]\n\t\t\t\t\tcase len(b) > 5 && b[5] < 0x80:\n\t\t\t\t\t\tb = b[6:]\n\t\t\t\t\tcase len(b) > 6 && b[6] < 0x80:\n\t\t\t\t\t\tb = b[7:]\n\t\t\t\t\tcase len(b) > 7 && b[7] < 0x80:\n\t\t\t\t\t\tb = b[8:]\n\t\t\t\t\tcase len(b) > 8 && b[8] < 0x80:\n\t\t\t\t\t\tb = b[9:]\n\t\t\t\t\tcase len(b) > 9 && b[9] < 2:\n\t\t\t\t\t\tb = b[10:]\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue State\n\t\t\tcase protowire.BytesType:\n\t\t\t\tvar size uint64\n\t\t\t\tif len(b) >= 1 && b[0] < 0x80 {\n\t\t\t\t\tsize = uint64(b[0])\n\t\t\t\t\tb = b[1:]\n\t\t\t\t} else if len(b) >= 2 && b[1] < 128 {\n\t\t\t\t\tsize = uint64(b[0]&0x7f) + uint64(b[1])<<7\n\t\t\t\t\tb = b[2:]\n\t\t\t\t} else {\n\t\t\t\t\tvar n int\n\t\t\t\t\tsize, n = protowire.ConsumeVarint(b)\n\t\t\t\t\tif n < 0 {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t\tb = b[n:]\n\t\t\t\t}\n\t\t\t\tif size > uint64(len(b)) {\n\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t}\n\t\t\t\tv := b[:size]\n\t\t\t\tb = b[size:]\n\t\t\t\tswitch vi.typ {\n\t\t\t\tcase validationTypeMessage:\n\t\t\t\t\tif vi.mi == nil {\n\t\t\t\t\t\treturn out, ValidationUnknown\n\t\t\t\t\t}\n\t\t\t\t\tvi.mi.init()\n\t\t\t\t\tfallthrough\n\t\t\t\tcase validationTypeMap:\n\t\t\t\t\tif vi.mi != nil {\n\t\t\t\t\t\tvi.mi.init()\n\t\t\t\t\t}\n\t\t\t\t\tstates = append(states, validationState{\n\t\t\t\t\t\ttyp:     vi.typ,\n\t\t\t\t\t\tkeyType: vi.keyType,\n\t\t\t\t\t\tvalType: vi.valType,\n\t\t\t\t\t\tmi:      vi.mi,\n\t\t\t\t\t\ttail:    b,\n\t\t\t\t\t})\n\t\t\t\t\tif vi.typ == validationTypeMessage ||\n\t\t\t\t\t\tvi.typ == validationTypeGroup ||\n\t\t\t\t\t\tvi.typ == validationTypeMap {\n\t\t\t\t\t\tif opts.depth--; opts.depth < 0 {\n\t\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tb = v\n\t\t\t\t\tcontinue State\n\t\t\t\tcase validationTypeRepeatedVarint:\n\t\t\t\t\t// Packed field.\n\t\t\t\t\tfor len(v) > 0 {\n\t\t\t\t\t\t_, n := protowire.ConsumeVarint(v)\n\t\t\t\t\t\tif n < 0 {\n\t\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tv = v[n:]\n\t\t\t\t\t}\n\t\t\t\tcase validationTypeRepeatedFixed32:\n\t\t\t\t\t// Packed field.\n\t\t\t\t\tif len(v)%4 != 0 {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\tcase validationTypeRepeatedFixed64:\n\t\t\t\t\t// Packed field.\n\t\t\t\t\tif len(v)%8 != 0 {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\tcase validationTypeUTF8String:\n\t\t\t\t\tif !utf8.Valid(v) {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase protowire.Fixed32Type:\n\t\t\t\tif len(b) < 4 {\n\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t}\n\t\t\t\tb = b[4:]\n\t\t\tcase protowire.Fixed64Type:\n\t\t\t\tif len(b) < 8 {\n\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t}\n\t\t\t\tb = b[8:]\n\t\t\tcase protowire.StartGroupType:\n\t\t\t\tswitch {\n\t\t\t\tcase vi.typ == validationTypeGroup:\n\t\t\t\t\tif vi.mi == nil {\n\t\t\t\t\t\treturn out, ValidationUnknown\n\t\t\t\t\t}\n\t\t\t\t\tvi.mi.init()\n\t\t\t\t\tstates = append(states, validationState{\n\t\t\t\t\t\ttyp:      validationTypeGroup,\n\t\t\t\t\t\tmi:       vi.mi,\n\t\t\t\t\t\tendGroup: num,\n\t\t\t\t\t})\n\t\t\t\t\tif opts.depth--; opts.depth < 0 {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t\tcontinue State\n\t\t\t\tcase flags.ProtoLegacy && vi.typ == validationTypeMessageSetItem:\n\t\t\t\t\ttypeid, v, n, err := messageset.ConsumeFieldValue(b, false)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t\txt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), typeid)\n\t\t\t\t\tswitch {\n\t\t\t\t\tcase err == protoregistry.NotFound:\n\t\t\t\t\t\tb = b[n:]\n\t\t\t\t\tcase err != nil:\n\t\t\t\t\t\treturn out, ValidationUnknown\n\t\t\t\t\tdefault:\n\t\t\t\t\t\txvi := getExtensionFieldInfo(xt).validation\n\t\t\t\t\t\tif xvi.mi != nil {\n\t\t\t\t\t\t\txvi.mi.init()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstates = append(states, validationState{\n\t\t\t\t\t\t\ttyp:  xvi.typ,\n\t\t\t\t\t\t\tmi:   xvi.mi,\n\t\t\t\t\t\t\ttail: b[n:],\n\t\t\t\t\t\t})\n\t\t\t\t\t\tif xvi.typ == validationTypeMessage ||\n\t\t\t\t\t\t\txvi.typ == validationTypeGroup ||\n\t\t\t\t\t\t\txvi.typ == validationTypeMap {\n\t\t\t\t\t\t\tif opts.depth--; opts.depth < 0 {\n\t\t\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tb = v\n\t\t\t\t\t\tcontinue State\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tn := protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\t\t\tif n < 0 {\n\t\t\t\t\t\treturn out, ValidationInvalid\n\t\t\t\t\t}\n\t\t\t\t\tb = b[n:]\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn out, ValidationInvalid\n\t\t\t}\n\t\t}\n\t\tif st.endGroup != 0 {\n\t\t\treturn out, ValidationInvalid\n\t\t}\n\t\tif len(b) != 0 {\n\t\t\treturn out, ValidationInvalid\n\t\t}\n\t\tb = st.tail\n\tPopState:\n\t\tnumRequiredFields := 0\n\t\tswitch st.typ {\n\t\tcase validationTypeMessage, validationTypeGroup:\n\t\t\tnumRequiredFields = int(st.mi.numRequiredFields)\n\t\t\topts.depth++\n\t\tcase validationTypeMap:\n\t\t\t// If this is a map field with a message value that contains\n\t\t\t// required fields, require that the value be present.\n\t\t\tif st.mi != nil && st.mi.numRequiredFields > 0 {\n\t\t\t\tnumRequiredFields = 1\n\t\t\t}\n\t\t\topts.depth++\n\t\t}\n\t\t// If there are more than 64 required fields, this check will\n\t\t// always fail and we will report that the message is potentially\n\t\t// uninitialized.\n\t\tif numRequiredFields > 0 && bits.OnesCount64(st.requiredMask) != numRequiredFields {\n\t\t\tinitialized = false\n\t\t}\n\t\tstates = states[:len(states)-1]\n\t}\n\tout.n = start - len(b)\n\tif initialized {\n\t\tout.initialized = true\n\t}\n\treturn out, ValidationValid\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/order/order.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage order\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// FieldOrder specifies the ordering to visit message fields.\n// It is a function that reports whether x is ordered before y.\ntype FieldOrder func(x, y protoreflect.FieldDescriptor) bool\n\nvar (\n\t// AnyFieldOrder specifies no specific field ordering.\n\tAnyFieldOrder FieldOrder = nil\n\n\t// LegacyFieldOrder sorts fields in the same ordering as emitted by\n\t// wire serialization in the github.com/golang/protobuf implementation.\n\tLegacyFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {\n\t\tox, oy := x.ContainingOneof(), y.ContainingOneof()\n\t\tinOneof := func(od protoreflect.OneofDescriptor) bool {\n\t\t\treturn od != nil && !od.IsSynthetic()\n\t\t}\n\n\t\t// Extension fields sort before non-extension fields.\n\t\tif x.IsExtension() != y.IsExtension() {\n\t\t\treturn x.IsExtension() && !y.IsExtension()\n\t\t}\n\t\t// Fields not within a oneof sort before those within a oneof.\n\t\tif inOneof(ox) != inOneof(oy) {\n\t\t\treturn !inOneof(ox) && inOneof(oy)\n\t\t}\n\t\t// Fields in disjoint oneof sets are sorted by declaration index.\n\t\tif inOneof(ox) && inOneof(oy) && ox != oy {\n\t\t\treturn ox.Index() < oy.Index()\n\t\t}\n\t\t// Fields sorted by field number.\n\t\treturn x.Number() < y.Number()\n\t}\n\n\t// NumberFieldOrder sorts fields by their field number.\n\tNumberFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {\n\t\treturn x.Number() < y.Number()\n\t}\n\n\t// IndexNameFieldOrder sorts non-extension fields before extension fields.\n\t// Non-extensions are sorted according to their declaration index.\n\t// Extensions are sorted according to their full name.\n\tIndexNameFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool {\n\t\t// Non-extension fields sort before extension fields.\n\t\tif x.IsExtension() != y.IsExtension() {\n\t\t\treturn !x.IsExtension() && y.IsExtension()\n\t\t}\n\t\t// Extensions sorted by fullname.\n\t\tif x.IsExtension() && y.IsExtension() {\n\t\t\treturn x.FullName() < y.FullName()\n\t\t}\n\t\t// Non-extensions sorted by declaration index.\n\t\treturn x.Index() < y.Index()\n\t}\n)\n\n// KeyOrder specifies the ordering to visit map entries.\n// It is a function that reports whether x is ordered before y.\ntype KeyOrder func(x, y protoreflect.MapKey) bool\n\nvar (\n\t// AnyKeyOrder specifies no specific key ordering.\n\tAnyKeyOrder KeyOrder = nil\n\n\t// GenericKeyOrder sorts false before true, numeric keys in ascending order,\n\t// and strings in lexicographical ordering according to UTF-8 codepoints.\n\tGenericKeyOrder KeyOrder = func(x, y protoreflect.MapKey) bool {\n\t\tswitch x.Interface().(type) {\n\t\tcase bool:\n\t\t\treturn !x.Bool() && y.Bool()\n\t\tcase int32, int64:\n\t\t\treturn x.Int() < y.Int()\n\t\tcase uint32, uint64:\n\t\t\treturn x.Uint() < y.Uint()\n\t\tcase string:\n\t\t\treturn x.String() < y.String()\n\t\tdefault:\n\t\t\tpanic(\"invalid map key type\")\n\t\t}\n\t}\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/order/range.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package order provides ordered access to messages and maps.\npackage order\n\nimport (\n\t\"sort\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\ntype messageField struct {\n\tfd protoreflect.FieldDescriptor\n\tv  protoreflect.Value\n}\n\nvar messageFieldPool = sync.Pool{\n\tNew: func() any { return new([]messageField) },\n}\n\ntype (\n\t// FieldRnger is an interface for visiting all fields in a message.\n\t// The protoreflect.Message type implements this interface.\n\tFieldRanger interface{ Range(VisitField) }\n\t// VisitField is called every time a message field is visited.\n\tVisitField = func(protoreflect.FieldDescriptor, protoreflect.Value) bool\n)\n\n// RangeFields iterates over the fields of fs according to the specified order.\nfunc RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) {\n\tif less == nil {\n\t\tfs.Range(fn)\n\t\treturn\n\t}\n\n\t// Obtain a pre-allocated scratch buffer.\n\tp := messageFieldPool.Get().(*[]messageField)\n\tfields := (*p)[:0]\n\tdefer func() {\n\t\tif cap(fields) < 1024 {\n\t\t\t*p = fields\n\t\t\tmessageFieldPool.Put(p)\n\t\t}\n\t}()\n\n\t// Collect all fields in the message and sort them.\n\tfs.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tfields = append(fields, messageField{fd, v})\n\t\treturn true\n\t})\n\tsort.Slice(fields, func(i, j int) bool {\n\t\treturn less(fields[i].fd, fields[j].fd)\n\t})\n\n\t// Visit the fields in the specified ordering.\n\tfor _, f := range fields {\n\t\tif !fn(f.fd, f.v) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\ntype mapEntry struct {\n\tk protoreflect.MapKey\n\tv protoreflect.Value\n}\n\nvar mapEntryPool = sync.Pool{\n\tNew: func() any { return new([]mapEntry) },\n}\n\ntype (\n\t// EntryRanger is an interface for visiting all fields in a message.\n\t// The protoreflect.Map type implements this interface.\n\tEntryRanger interface{ Range(VisitEntry) }\n\t// VisitEntry is called every time a map entry is visited.\n\tVisitEntry = func(protoreflect.MapKey, protoreflect.Value) bool\n)\n\n// RangeEntries iterates over the entries of es according to the specified order.\nfunc RangeEntries(es EntryRanger, less KeyOrder, fn VisitEntry) {\n\tif less == nil {\n\t\tes.Range(fn)\n\t\treturn\n\t}\n\n\t// Obtain a pre-allocated scratch buffer.\n\tp := mapEntryPool.Get().(*[]mapEntry)\n\tentries := (*p)[:0]\n\tdefer func() {\n\t\tif cap(entries) < 1024 {\n\t\t\t*p = entries\n\t\t\tmapEntryPool.Put(p)\n\t\t}\n\t}()\n\n\t// Collect all entries in the map and sort them.\n\tes.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {\n\t\tentries = append(entries, mapEntry{k, v})\n\t\treturn true\n\t})\n\tsort.Slice(entries, func(i, j int) bool {\n\t\treturn less(entries[i].k, entries[j].k)\n\t})\n\n\t// Visit the entries in the specified ordering.\n\tfor _, e := range entries {\n\t\tif !fn(e.k, e.v) {\n\t\t\treturn\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/pragma/pragma.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package pragma provides types that can be embedded into a struct to\n// statically enforce or prevent certain language properties.\npackage pragma\n\nimport \"sync\"\n\n// NoUnkeyedLiterals can be embedded in a struct to prevent unkeyed literals.\ntype NoUnkeyedLiterals struct{}\n\n// DoNotImplement can be embedded in an interface to prevent trivial\n// implementations of the interface.\n//\n// This is useful to prevent unauthorized implementations of an interface\n// so that it can be extended in the future for any protobuf language changes.\ntype DoNotImplement interface{ ProtoInternal(DoNotImplement) }\n\n// DoNotCompare can be embedded in a struct to prevent comparability.\ntype DoNotCompare [0]func()\n\n// DoNotCopy can be embedded in a struct to help prevent shallow copies.\n// This does not rely on a Go language feature, but rather a special case\n// within the vet checker.\n//\n// See https://golang.org/issues/8005.\ntype DoNotCopy [0]sync.Mutex\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Helper code for parsing a protocol buffer\n\npackage protolazy\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n)\n\n// BufferReader is a structure encapsulating a protobuf and a current position\ntype BufferReader struct {\n\tBuf []byte\n\tPos int\n}\n\n// NewBufferReader creates a new BufferRead from a protobuf\nfunc NewBufferReader(buf []byte) BufferReader {\n\treturn BufferReader{Buf: buf, Pos: 0}\n}\n\nvar errOutOfBounds = errors.New(\"protobuf decoding: out of bounds\")\nvar errOverflow = errors.New(\"proto: integer overflow\")\n\nfunc (b *BufferReader) DecodeVarintSlow() (x uint64, err error) {\n\ti := b.Pos\n\tl := len(b.Buf)\n\n\tfor shift := uint(0); shift < 64; shift += 7 {\n\t\tif i >= l {\n\t\t\terr = io.ErrUnexpectedEOF\n\t\t\treturn\n\t\t}\n\t\tv := b.Buf[i]\n\t\ti++\n\t\tx |= (uint64(v) & 0x7F) << shift\n\t\tif v < 0x80 {\n\t\t\tb.Pos = i\n\t\t\treturn\n\t\t}\n\t}\n\n\t// The number is too large to represent in a 64-bit value.\n\terr = errOverflow\n\treturn\n}\n\n// decodeVarint decodes a varint at the current position\nfunc (b *BufferReader) DecodeVarint() (x uint64, err error) {\n\ti := b.Pos\n\tbuf := b.Buf\n\n\tif i >= len(buf) {\n\t\treturn 0, io.ErrUnexpectedEOF\n\t} else if buf[i] < 0x80 {\n\t\tb.Pos++\n\t\treturn uint64(buf[i]), nil\n\t} else if len(buf)-i < 10 {\n\t\treturn b.DecodeVarintSlow()\n\t}\n\n\tvar v uint64\n\t// we already checked the first byte\n\tx = uint64(buf[i]) & 127\n\ti++\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 7\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 14\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 21\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 28\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 35\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 42\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 49\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 56\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint64(buf[i])\n\ti++\n\tx |= (v & 127) << 63\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\treturn 0, errOverflow\n\ndone:\n\tb.Pos = i\n\treturn\n}\n\n// decodeVarint32 decodes a varint32 at the current position\nfunc (b *BufferReader) DecodeVarint32() (x uint32, err error) {\n\ti := b.Pos\n\tbuf := b.Buf\n\n\tif i >= len(buf) {\n\t\treturn 0, io.ErrUnexpectedEOF\n\t} else if buf[i] < 0x80 {\n\t\tb.Pos++\n\t\treturn uint32(buf[i]), nil\n\t} else if len(buf)-i < 5 {\n\t\tv, err := b.DecodeVarintSlow()\n\t\treturn uint32(v), err\n\t}\n\n\tvar v uint32\n\t// we already checked the first byte\n\tx = uint32(buf[i]) & 127\n\ti++\n\n\tv = uint32(buf[i])\n\ti++\n\tx |= (v & 127) << 7\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint32(buf[i])\n\ti++\n\tx |= (v & 127) << 14\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint32(buf[i])\n\ti++\n\tx |= (v & 127) << 21\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\tv = uint32(buf[i])\n\ti++\n\tx |= (v & 127) << 28\n\tif v < 128 {\n\t\tgoto done\n\t}\n\n\treturn 0, errOverflow\n\ndone:\n\tb.Pos = i\n\treturn\n}\n\n// skipValue skips a value in the protobuf, based on the specified tag\nfunc (b *BufferReader) SkipValue(tag uint32) (err error) {\n\twireType := tag & 0x7\n\tswitch protowire.Type(wireType) {\n\tcase protowire.VarintType:\n\t\terr = b.SkipVarint()\n\tcase protowire.Fixed64Type:\n\t\terr = b.SkipFixed64()\n\tcase protowire.BytesType:\n\t\tvar n uint32\n\t\tn, err = b.DecodeVarint32()\n\t\tif err == nil {\n\t\t\terr = b.Skip(int(n))\n\t\t}\n\tcase protowire.StartGroupType:\n\t\terr = b.SkipGroup(tag)\n\tcase protowire.Fixed32Type:\n\t\terr = b.SkipFixed32()\n\tdefault:\n\t\terr = fmt.Errorf(\"Unexpected wire type (%d)\", wireType)\n\t}\n\treturn\n}\n\n// skipGroup skips a group with the specified tag.  It executes efficiently using a tag stack\nfunc (b *BufferReader) SkipGroup(tag uint32) (err error) {\n\ttagStack := make([]uint32, 0, 16)\n\ttagStack = append(tagStack, tag)\n\tvar n uint32\n\tfor len(tagStack) > 0 {\n\t\ttag, err = b.DecodeVarint32()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tswitch protowire.Type(tag & 0x7) {\n\t\tcase protowire.VarintType:\n\t\t\terr = b.SkipVarint()\n\t\tcase protowire.Fixed64Type:\n\t\t\terr = b.Skip(8)\n\t\tcase protowire.BytesType:\n\t\t\tn, err = b.DecodeVarint32()\n\t\t\tif err == nil {\n\t\t\t\terr = b.Skip(int(n))\n\t\t\t}\n\t\tcase protowire.StartGroupType:\n\t\t\ttagStack = append(tagStack, tag)\n\t\tcase protowire.Fixed32Type:\n\t\t\terr = b.SkipFixed32()\n\t\tcase protowire.EndGroupType:\n\t\t\tif protoFieldNumber(tagStack[len(tagStack)-1]) == protoFieldNumber(tag) {\n\t\t\t\ttagStack = tagStack[:len(tagStack)-1]\n\t\t\t} else {\n\t\t\t\terr = fmt.Errorf(\"end group tag %d does not match begin group tag %d at pos %d\",\n\t\t\t\t\tprotoFieldNumber(tag), protoFieldNumber(tagStack[len(tagStack)-1]), b.Pos)\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// skipVarint effiently skips a varint\nfunc (b *BufferReader) SkipVarint() (err error) {\n\ti := b.Pos\n\n\tif len(b.Buf)-i < 10 {\n\t\t// Use DecodeVarintSlow() to check for buffer overflow, but ignore result\n\t\tif _, err := b.DecodeVarintSlow(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\ti++\n\n\tif b.Buf[i] < 0x80 {\n\t\tgoto out\n\t}\n\treturn errOverflow\n\nout:\n\tb.Pos = i + 1\n\treturn nil\n}\n\n// skip skips the specified number of bytes\nfunc (b *BufferReader) Skip(n int) (err error) {\n\tif len(b.Buf) < b.Pos+n {\n\t\treturn io.ErrUnexpectedEOF\n\t}\n\tb.Pos += n\n\treturn\n}\n\n// skipFixed64 skips a fixed64\nfunc (b *BufferReader) SkipFixed64() (err error) {\n\treturn b.Skip(8)\n}\n\n// skipFixed32 skips a fixed32\nfunc (b *BufferReader) SkipFixed32() (err error) {\n\treturn b.Skip(4)\n}\n\n// skipBytes skips a set of bytes\nfunc (b *BufferReader) SkipBytes() (err error) {\n\tn, err := b.DecodeVarint32()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn b.Skip(int(n))\n}\n\n// Done returns whether we are at the end of the protobuf\nfunc (b *BufferReader) Done() bool {\n\treturn b.Pos == len(b.Buf)\n}\n\n// Remaining returns how many bytes remain\nfunc (b *BufferReader) Remaining() int {\n\treturn len(b.Buf) - b.Pos\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/protolazy/lazy.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protolazy contains internal data structures for lazy message decoding.\npackage protolazy\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\tpiface \"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// IndexEntry is the structure for an index of the fields in a message of a\n// proto (not descending to sub-messages)\ntype IndexEntry struct {\n\tFieldNum uint32\n\t// first byte of this tag/field\n\tStart uint32\n\t// first byte after a contiguous sequence of bytes for this tag/field, which could\n\t// include a single encoding of the field, or multiple encodings for the field\n\tEnd uint32\n\t// True if this protobuf segment includes multiple encodings of the field\n\tMultipleContiguous bool\n}\n\n// XXX_lazyUnmarshalInfo has information about a particular lazily decoded message\n//\n// Deprecated: Do not use. This will be deleted in the near future.\ntype XXX_lazyUnmarshalInfo struct {\n\t// Index of fields and their positions in the protobuf for this\n\t// message.  Make index be a pointer to a slice so it can be updated\n\t// atomically.  The index pointer is only set once (lazily when/if\n\t// the index is first needed), and must always be SET and LOADED\n\t// ATOMICALLY.\n\tindex *[]IndexEntry\n\t// The protobuf associated with this lazily decoded message.  It is\n\t// only set during proto.Unmarshal().  It doesn't need to be set and\n\t// loaded atomically, since any simultaneous set (Unmarshal) and read\n\t// (during a get) would already be a race in the app code.\n\tProtobuf []byte\n\t// The flags present when Unmarshal was originally called for this particular message\n\tunmarshalFlags piface.UnmarshalInputFlags\n}\n\n// The Buffer and SetBuffer methods let v2/internal/impl interact with\n// XXX_lazyUnmarshalInfo via an interface, to avoid an import cycle.\n\n// Buffer returns the lazy unmarshal buffer.\n//\n// Deprecated: Do not use. This will be deleted in the near future.\nfunc (lazy *XXX_lazyUnmarshalInfo) Buffer() []byte {\n\treturn lazy.Protobuf\n}\n\n// SetBuffer sets the lazy unmarshal buffer.\n//\n// Deprecated: Do not use. This will be deleted in the near future.\nfunc (lazy *XXX_lazyUnmarshalInfo) SetBuffer(b []byte) {\n\tlazy.Protobuf = b\n}\n\n// SetUnmarshalFlags is called to set a copy of the original unmarshalInputFlags.\n// The flags should reflect how Unmarshal was called.\nfunc (lazy *XXX_lazyUnmarshalInfo) SetUnmarshalFlags(f piface.UnmarshalInputFlags) {\n\tlazy.unmarshalFlags = f\n}\n\n// UnmarshalFlags returns the original unmarshalInputFlags.\nfunc (lazy *XXX_lazyUnmarshalInfo) UnmarshalFlags() piface.UnmarshalInputFlags {\n\treturn lazy.unmarshalFlags\n}\n\n// AllowedPartial returns true if the user originally unmarshalled this message with\n// AllowPartial set to true\nfunc (lazy *XXX_lazyUnmarshalInfo) AllowedPartial() bool {\n\treturn (lazy.unmarshalFlags & piface.UnmarshalCheckRequired) == 0\n}\n\nfunc protoFieldNumber(tag uint32) uint32 {\n\treturn tag >> 3\n}\n\n// buildIndex builds an index of the specified protobuf, return the index\n// array and an error.\nfunc buildIndex(buf []byte) ([]IndexEntry, error) {\n\tindex := make([]IndexEntry, 0, 16)\n\tvar lastProtoFieldNum uint32\n\tvar outOfOrder bool\n\n\tvar r BufferReader = NewBufferReader(buf)\n\n\tfor !r.Done() {\n\t\tvar tag uint32\n\t\tvar err error\n\t\tvar curPos = r.Pos\n\t\t// INLINED: tag, err = r.DecodeVarint32()\n\t\t{\n\t\t\ti := r.Pos\n\t\t\tbuf := r.Buf\n\n\t\t\tif i >= len(buf) {\n\t\t\t\treturn nil, errOutOfBounds\n\t\t\t} else if buf[i] < 0x80 {\n\t\t\t\tr.Pos++\n\t\t\t\ttag = uint32(buf[i])\n\t\t\t} else if r.Remaining() < 5 {\n\t\t\t\tvar v uint64\n\t\t\t\tv, err = r.DecodeVarintSlow()\n\t\t\t\ttag = uint32(v)\n\t\t\t} else {\n\t\t\t\tvar v uint32\n\t\t\t\t// we already checked the first byte\n\t\t\t\ttag = uint32(buf[i]) & 127\n\t\t\t\ti++\n\n\t\t\t\tv = uint32(buf[i])\n\t\t\t\ti++\n\t\t\t\ttag |= (v & 127) << 7\n\t\t\t\tif v < 128 {\n\t\t\t\t\tgoto done\n\t\t\t\t}\n\n\t\t\t\tv = uint32(buf[i])\n\t\t\t\ti++\n\t\t\t\ttag |= (v & 127) << 14\n\t\t\t\tif v < 128 {\n\t\t\t\t\tgoto done\n\t\t\t\t}\n\n\t\t\t\tv = uint32(buf[i])\n\t\t\t\ti++\n\t\t\t\ttag |= (v & 127) << 21\n\t\t\t\tif v < 128 {\n\t\t\t\t\tgoto done\n\t\t\t\t}\n\n\t\t\t\tv = uint32(buf[i])\n\t\t\t\ti++\n\t\t\t\ttag |= (v & 127) << 28\n\t\t\t\tif v < 128 {\n\t\t\t\t\tgoto done\n\t\t\t\t}\n\n\t\t\t\treturn nil, errOutOfBounds\n\n\t\t\tdone:\n\t\t\t\tr.Pos = i\n\t\t\t}\n\t\t}\n\t\t// DONE: tag, err = r.DecodeVarint32()\n\n\t\tfieldNum := protoFieldNumber(tag)\n\t\tif fieldNum < lastProtoFieldNum {\n\t\t\toutOfOrder = true\n\t\t}\n\n\t\t// Skip the current value -- will skip over an entire group as well.\n\t\t// INLINED: err = r.SkipValue(tag)\n\t\twireType := tag & 0x7\n\t\tswitch protowire.Type(wireType) {\n\t\tcase protowire.VarintType:\n\t\t\t// INLINED: err = r.SkipVarint()\n\t\t\ti := r.Pos\n\n\t\t\tif len(r.Buf)-i < 10 {\n\t\t\t\t// Use DecodeVarintSlow() to skip while\n\t\t\t\t// checking for buffer overflow, but ignore result\n\t\t\t\t_, err = r.DecodeVarintSlow()\n\t\t\t\tgoto out2\n\t\t\t}\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\ti++\n\n\t\t\tif r.Buf[i] < 0x80 {\n\t\t\t\tgoto out\n\t\t\t}\n\t\t\treturn nil, errOverflow\n\t\tout:\n\t\t\tr.Pos = i + 1\n\t\t\t// DONE: err = r.SkipVarint()\n\t\tcase protowire.Fixed64Type:\n\t\t\terr = r.SkipFixed64()\n\t\tcase protowire.BytesType:\n\t\t\tvar n uint32\n\t\t\tn, err = r.DecodeVarint32()\n\t\t\tif err == nil {\n\t\t\t\terr = r.Skip(int(n))\n\t\t\t}\n\t\tcase protowire.StartGroupType:\n\t\t\terr = r.SkipGroup(tag)\n\t\tcase protowire.Fixed32Type:\n\t\t\terr = r.SkipFixed32()\n\t\tdefault:\n\t\t\terr = fmt.Errorf(\"Unexpected wire type (%d)\", wireType)\n\t\t}\n\t\t// DONE: err = r.SkipValue(tag)\n\n\tout2:\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif fieldNum != lastProtoFieldNum {\n\t\t\tindex = append(index, IndexEntry{FieldNum: fieldNum,\n\t\t\t\tStart: uint32(curPos),\n\t\t\t\tEnd:   uint32(r.Pos)},\n\t\t\t)\n\t\t} else {\n\t\t\tindex[len(index)-1].End = uint32(r.Pos)\n\t\t\tindex[len(index)-1].MultipleContiguous = true\n\t\t}\n\t\tlastProtoFieldNum = fieldNum\n\t}\n\tif outOfOrder {\n\t\tsort.Slice(index, func(i, j int) bool {\n\t\t\treturn index[i].FieldNum < index[j].FieldNum ||\n\t\t\t\t(index[i].FieldNum == index[j].FieldNum &&\n\t\t\t\t\tindex[i].Start < index[j].Start)\n\t\t})\n\t}\n\treturn index, nil\n}\n\nfunc (lazy *XXX_lazyUnmarshalInfo) SizeField(num uint32) (size int) {\n\tstart, end, found, _, multipleEntries := lazy.FindFieldInProto(num)\n\tif multipleEntries != nil {\n\t\tfor _, entry := range multipleEntries {\n\t\t\tsize += int(entry.End - entry.Start)\n\t\t}\n\t\treturn size\n\t}\n\tif !found {\n\t\treturn 0\n\t}\n\treturn int(end - start)\n}\n\nfunc (lazy *XXX_lazyUnmarshalInfo) AppendField(b []byte, num uint32) ([]byte, bool) {\n\tstart, end, found, _, multipleEntries := lazy.FindFieldInProto(num)\n\tif multipleEntries != nil {\n\t\tfor _, entry := range multipleEntries {\n\t\t\tb = append(b, lazy.Protobuf[entry.Start:entry.End]...)\n\t\t}\n\t\treturn b, true\n\t}\n\tif !found {\n\t\treturn nil, false\n\t}\n\tb = append(b, lazy.Protobuf[start:end]...)\n\treturn b, true\n}\n\nfunc (lazy *XXX_lazyUnmarshalInfo) SetIndex(index []IndexEntry) {\n\tatomicStoreIndex(&lazy.index, &index)\n}\n\n// FindFieldInProto looks for field fieldNum in lazyUnmarshalInfo information\n// (including protobuf), returns startOffset/endOffset/found.\nfunc (lazy *XXX_lazyUnmarshalInfo) FindFieldInProto(fieldNum uint32) (start, end uint32, found, multipleContiguous bool, multipleEntries []IndexEntry) {\n\tif lazy.Protobuf == nil {\n\t\t// There is no backing protobuf for this message -- it was made from a builder\n\t\treturn 0, 0, false, false, nil\n\t}\n\tindex := atomicLoadIndex(&lazy.index)\n\tif index == nil {\n\t\tr, err := buildIndex(lazy.Protobuf)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Sprintf(\"findFieldInfo: error building index when looking for field %d: %v\", fieldNum, err))\n\t\t}\n\t\t// lazy.index is a pointer to the slice returned by BuildIndex\n\t\tindex = &r\n\t\tatomicStoreIndex(&lazy.index, index)\n\t}\n\treturn lookupField(index, fieldNum)\n}\n\n// lookupField returns the offset at which the indicated field starts using\n// the index, offset immediately after field ends (including all instances of\n// a repeated field), and bools indicating if field was found and if there\n// are multiple encodings of the field in the byte range.\n//\n// To hande the uncommon case where there are repeated encodings for the same\n// field which are not consecutive in the protobuf (so we need to returns\n// multiple start/end offsets), we also return a slice multipleEntries.  If\n// multipleEntries is non-nil, then multiple entries were found, and the\n// values in the slice should be used, rather than start/end/found.\nfunc lookupField(indexp *[]IndexEntry, fieldNum uint32) (start, end uint32, found bool, multipleContiguous bool, multipleEntries []IndexEntry) {\n\t// The pointer indexp to the index was already loaded atomically.\n\t// The slice is uniquely associated with the pointer, so it doesn't\n\t// need to be loaded atomically.\n\tindex := *indexp\n\tfor i, entry := range index {\n\t\tif fieldNum == entry.FieldNum {\n\t\t\tif i < len(index)-1 && entry.FieldNum == index[i+1].FieldNum {\n\t\t\t\t// Handle the uncommon case where there are\n\t\t\t\t// repeated entries for the same field which\n\t\t\t\t// are not contiguous in the protobuf.\n\t\t\t\tmultiple := make([]IndexEntry, 1, 2)\n\t\t\t\tmultiple[0] = IndexEntry{fieldNum, entry.Start, entry.End, entry.MultipleContiguous}\n\t\t\t\ti++\n\t\t\t\tfor i < len(index) && index[i].FieldNum == fieldNum {\n\t\t\t\t\tmultiple = append(multiple, IndexEntry{fieldNum, index[i].Start, index[i].End, index[i].MultipleContiguous})\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t\treturn 0, 0, false, false, multiple\n\n\t\t\t}\n\t\t\treturn entry.Start, entry.End, true, entry.MultipleContiguous, nil\n\t\t}\n\t\tif fieldNum < entry.FieldNum {\n\t\t\treturn 0, 0, false, false, nil\n\t\t}\n\t}\n\treturn 0, 0, false, false, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protolazy\n\nimport (\n\t\"sync/atomic\"\n\t\"unsafe\"\n)\n\nfunc atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry {\n\treturn (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))\n}\nfunc atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) {\n\tatomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/set/ints.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package set provides simple set data structures for uint64s.\npackage set\n\nimport \"math/bits\"\n\n// int64s represents a set of integers within the range of 0..63.\ntype int64s uint64\n\nfunc (bs *int64s) Len() int {\n\treturn bits.OnesCount64(uint64(*bs))\n}\nfunc (bs *int64s) Has(n uint64) bool {\n\treturn uint64(*bs)&(uint64(1)<<n) > 0\n}\nfunc (bs *int64s) Set(n uint64) {\n\t*(*uint64)(bs) |= uint64(1) << n\n}\nfunc (bs *int64s) Clear(n uint64) {\n\t*(*uint64)(bs) &^= uint64(1) << n\n}\n\n// Ints represents a set of integers within the range of 0..math.MaxUint64.\ntype Ints struct {\n\tlo int64s\n\thi map[uint64]struct{}\n}\n\nfunc (bs *Ints) Len() int {\n\treturn bs.lo.Len() + len(bs.hi)\n}\nfunc (bs *Ints) Has(n uint64) bool {\n\tif n < 64 {\n\t\treturn bs.lo.Has(n)\n\t}\n\t_, ok := bs.hi[n]\n\treturn ok\n}\nfunc (bs *Ints) Set(n uint64) {\n\tif n < 64 {\n\t\tbs.lo.Set(n)\n\t\treturn\n\t}\n\tif bs.hi == nil {\n\t\tbs.hi = make(map[uint64]struct{})\n\t}\n\tbs.hi[n] = struct{}{}\n}\nfunc (bs *Ints) Clear(n uint64) {\n\tif n < 64 {\n\t\tbs.lo.Clear(n)\n\t\treturn\n\t}\n\tdelete(bs.hi, n)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/strs/strings.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package strs provides string manipulation functionality specific to protobuf.\npackage strs\n\nimport (\n\t\"go/token\"\n\t\"strings\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// EnforceUTF8 reports whether to enforce strict UTF-8 validation.\nfunc EnforceUTF8(fd protoreflect.FieldDescriptor) bool {\n\tif flags.ProtoLegacy || fd.Syntax() == protoreflect.Editions {\n\t\tif fd, ok := fd.(interface{ EnforceUTF8() bool }); ok {\n\t\t\treturn fd.EnforceUTF8()\n\t\t}\n\t}\n\treturn fd.Syntax() == protoreflect.Proto3\n}\n\n// GoCamelCase camel-cases a protobuf name for use as a Go identifier.\n//\n// If there is an interior underscore followed by a lower case letter,\n// drop the underscore and convert the letter to upper case.\nfunc GoCamelCase(s string) string {\n\t// Invariant: if the next letter is lower case, it must be converted\n\t// to upper case.\n\t// That is, we process a word at a time, where words are marked by _ or\n\t// upper case letter. Digits are treated as words.\n\tvar b []byte\n\tfor i := 0; i < len(s); i++ {\n\t\tc := s[i]\n\t\tswitch {\n\t\tcase c == '.' && i+1 < len(s) && isASCIILower(s[i+1]):\n\t\t\t// Skip over '.' in \".{{lowercase}}\".\n\t\tcase c == '.':\n\t\t\tb = append(b, '_') // convert '.' to '_'\n\t\tcase c == '_' && (i == 0 || s[i-1] == '.'):\n\t\t\t// Convert initial '_' to ensure we start with a capital letter.\n\t\t\t// Do the same for '_' after '.' to match historic behavior.\n\t\t\tb = append(b, 'X') // convert '_' to 'X'\n\t\tcase c == '_' && i+1 < len(s) && isASCIILower(s[i+1]):\n\t\t\t// Skip over '_' in \"_{{lowercase}}\".\n\t\tcase isASCIIDigit(c):\n\t\t\tb = append(b, c)\n\t\tdefault:\n\t\t\t// Assume we have a letter now - if not, it's a bogus identifier.\n\t\t\t// The next word is a sequence of characters that must start upper case.\n\t\t\tif isASCIILower(c) {\n\t\t\t\tc -= 'a' - 'A' // convert lowercase to uppercase\n\t\t\t}\n\t\t\tb = append(b, c)\n\n\t\t\t// Accept lower case sequence that follows.\n\t\t\tfor ; i+1 < len(s) && isASCIILower(s[i+1]); i++ {\n\t\t\t\tb = append(b, s[i+1])\n\t\t\t}\n\t\t}\n\t}\n\treturn string(b)\n}\n\n// GoSanitized converts a string to a valid Go identifier.\nfunc GoSanitized(s string) string {\n\t// Sanitize the input to the set of valid characters,\n\t// which must be '_' or be in the Unicode L or N categories.\n\ts = strings.Map(func(r rune) rune {\n\t\tif unicode.IsLetter(r) || unicode.IsDigit(r) {\n\t\t\treturn r\n\t\t}\n\t\treturn '_'\n\t}, s)\n\n\t// Prepend '_' in the event of a Go keyword conflict or if\n\t// the identifier is invalid (does not start in the Unicode L category).\n\tr, _ := utf8.DecodeRuneInString(s)\n\tif token.Lookup(s).IsKeyword() || !unicode.IsLetter(r) {\n\t\treturn \"_\" + s\n\t}\n\treturn s\n}\n\n// JSONCamelCase converts a snake_case identifier to a camelCase identifier,\n// according to the protobuf JSON specification.\nfunc JSONCamelCase(s string) string {\n\tvar b []byte\n\tvar wasUnderscore bool\n\tfor i := 0; i < len(s); i++ { // proto identifiers are always ASCII\n\t\tc := s[i]\n\t\tif c != '_' {\n\t\t\tif wasUnderscore && isASCIILower(c) {\n\t\t\t\tc -= 'a' - 'A' // convert to uppercase\n\t\t\t}\n\t\t\tb = append(b, c)\n\t\t}\n\t\twasUnderscore = c == '_'\n\t}\n\treturn string(b)\n}\n\n// JSONSnakeCase converts a camelCase identifier to a snake_case identifier,\n// according to the protobuf JSON specification.\nfunc JSONSnakeCase(s string) string {\n\tvar b []byte\n\tfor i := 0; i < len(s); i++ { // proto identifiers are always ASCII\n\t\tc := s[i]\n\t\tif isASCIIUpper(c) {\n\t\t\tb = append(b, '_')\n\t\t\tc += 'a' - 'A' // convert to lowercase\n\t\t}\n\t\tb = append(b, c)\n\t}\n\treturn string(b)\n}\n\n// MapEntryName derives the name of the map entry message given the field name.\n// See protoc v3.8.0: src/google/protobuf/descriptor.cc:254-276,6057\nfunc MapEntryName(s string) string {\n\tvar b []byte\n\tupperNext := true\n\tfor _, c := range s {\n\t\tswitch {\n\t\tcase c == '_':\n\t\t\tupperNext = true\n\t\tcase upperNext:\n\t\t\tb = append(b, byte(unicode.ToUpper(c)))\n\t\t\tupperNext = false\n\t\tdefault:\n\t\t\tb = append(b, byte(c))\n\t\t}\n\t}\n\tb = append(b, \"Entry\"...)\n\treturn string(b)\n}\n\n// EnumValueName derives the camel-cased enum value name.\n// See protoc v3.8.0: src/google/protobuf/descriptor.cc:297-313\nfunc EnumValueName(s string) string {\n\tvar b []byte\n\tupperNext := true\n\tfor _, c := range s {\n\t\tswitch {\n\t\tcase c == '_':\n\t\t\tupperNext = true\n\t\tcase upperNext:\n\t\t\tb = append(b, byte(unicode.ToUpper(c)))\n\t\t\tupperNext = false\n\t\tdefault:\n\t\t\tb = append(b, byte(unicode.ToLower(c)))\n\t\t\tupperNext = false\n\t\t}\n\t}\n\treturn string(b)\n}\n\n// TrimEnumPrefix trims the enum name prefix from an enum value name,\n// where the prefix is all lowercase without underscores.\n// See protoc v3.8.0: src/google/protobuf/descriptor.cc:330-375\nfunc TrimEnumPrefix(s, prefix string) string {\n\ts0 := s // original input\n\tfor len(s) > 0 && len(prefix) > 0 {\n\t\tif s[0] == '_' {\n\t\t\ts = s[1:]\n\t\t\tcontinue\n\t\t}\n\t\tif unicode.ToLower(rune(s[0])) != rune(prefix[0]) {\n\t\t\treturn s0 // no prefix match\n\t\t}\n\t\ts, prefix = s[1:], prefix[1:]\n\t}\n\tif len(prefix) > 0 {\n\t\treturn s0 // no prefix match\n\t}\n\ts = strings.TrimLeft(s, \"_\")\n\tif len(s) == 0 {\n\t\treturn s0 // avoid returning empty string\n\t}\n\treturn s\n}\n\nfunc isASCIILower(c byte) bool {\n\treturn 'a' <= c && c <= 'z'\n}\nfunc isASCIIUpper(c byte) bool {\n\treturn 'A' <= c && c <= 'Z'\n}\nfunc isASCIIDigit(c byte) bool {\n\treturn '0' <= c && c <= '9'\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage strs\n\nimport (\n\t\"unsafe\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// UnsafeString returns an unsafe string reference of b.\n// The caller must treat the input slice as immutable.\n//\n// WARNING: Use carefully. The returned result must not leak to the end user\n// unless the input slice is provably immutable.\nfunc UnsafeString(b []byte) string {\n\treturn unsafe.String(unsafe.SliceData(b), len(b))\n}\n\n// UnsafeBytes returns an unsafe bytes slice reference of s.\n// The caller must treat returned slice as immutable.\n//\n// WARNING: Use carefully. The returned result must not leak to the end user.\nfunc UnsafeBytes(s string) []byte {\n\treturn unsafe.Slice(unsafe.StringData(s), len(s))\n}\n\n// Builder builds a set of strings with shared lifetime.\n// This differs from strings.Builder, which is for building a single string.\ntype Builder struct {\n\tbuf []byte\n}\n\n// AppendFullName is equivalent to protoreflect.FullName.Append,\n// but optimized for large batches where each name has a shared lifetime.\nfunc (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName {\n\tn := len(prefix) + len(\".\") + len(name)\n\tif len(prefix) == 0 {\n\t\tn -= len(\".\")\n\t}\n\tsb.grow(n)\n\tsb.buf = append(sb.buf, prefix...)\n\tsb.buf = append(sb.buf, '.')\n\tsb.buf = append(sb.buf, name...)\n\treturn protoreflect.FullName(sb.last(n))\n}\n\n// MakeString is equivalent to string(b), but optimized for large batches\n// with a shared lifetime.\nfunc (sb *Builder) MakeString(b []byte) string {\n\tsb.grow(len(b))\n\tsb.buf = append(sb.buf, b...)\n\treturn sb.last(len(b))\n}\n\nfunc (sb *Builder) grow(n int) {\n\tif cap(sb.buf)-len(sb.buf) >= n {\n\t\treturn\n\t}\n\n\t// Unlike strings.Builder, we do not need to copy over the contents\n\t// of the old buffer since our builder provides no API for\n\t// retrieving previously created strings.\n\tsb.buf = make([]byte, 0, 2*(cap(sb.buf)+n))\n}\n\nfunc (sb *Builder) last(n int) string {\n\treturn UnsafeString(sb.buf[len(sb.buf)-n:])\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/internal/version/version.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package version records versioning information about this module.\npackage version\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// These constants determine the current version of this module.\n//\n// For our release process, we enforce the following rules:\n//   - Tagged releases use a tag that is identical to String.\n//   - Tagged releases never reference a commit where the String\n//     contains \"devel\".\n//   - The set of all commits in this repository where String\n//     does not contain \"devel\" must have a unique String.\n//\n// Steps for tagging a new release:\n//\n//  1. Create a new CL.\n//\n//  2. Update Minor, Patch, and/or PreRelease as necessary.\n//     PreRelease must not contain the string \"devel\".\n//\n//  3. Since the last released minor version, have there been any changes to\n//     generator that relies on new functionality in the runtime?\n//     If yes, then increment RequiredGenerated.\n//\n//  4. Since the last released minor version, have there been any changes to\n//     the runtime that removes support for old .pb.go source code?\n//     If yes, then increment SupportMinimum.\n//\n//  5. Send out the CL for review and submit it.\n//     Note that the next CL in step 8 must be submitted after this CL\n//     without any other CLs in-between.\n//\n//  6. Tag a new version, where the tag is is the current String.\n//\n//  7. Write release notes for all notable changes\n//     between this release and the last release.\n//\n//  8. Create a new CL.\n//\n//  9. Update PreRelease to include the string \"devel\".\n//     For example: \"\" -> \"devel\" or \"rc.1\" -> \"rc.1.devel\"\n//\n//  10. Send out the CL for review and submit it.\nconst (\n\tMajor      = 1\n\tMinor      = 36\n\tPatch      = 11\n\tPreRelease = \"\"\n)\n\n// String formats the version string for this module in semver format.\n//\n// Examples:\n//\n//\tv1.20.1\n//\tv1.21.0-rc.1\nfunc String() string {\n\tv := fmt.Sprintf(\"v%d.%d.%d\", Major, Minor, Patch)\n\tif PreRelease != \"\" {\n\t\tv += \"-\" + PreRelease\n\n\t\t// TODO: Add metadata about the commit or build hash.\n\t\t// See https://golang.org/issue/29814\n\t\t// See https://golang.org/issue/33533\n\t\tvar metadata string\n\t\tif strings.Contains(PreRelease, \"devel\") && metadata != \"\" {\n\t\t\tv += \"+\" + metadata\n\t\t}\n\t}\n\treturn v\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/checkinit.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// CheckInitialized returns an error if any required fields in m are not set.\nfunc CheckInitialized(m Message) error {\n\t// Treat a nil message interface as an \"untyped\" empty message,\n\t// which we assume to have no required fields.\n\tif m == nil {\n\t\treturn nil\n\t}\n\n\treturn checkInitialized(m.ProtoReflect())\n}\n\n// CheckInitialized returns an error if any required fields in m are not set.\nfunc checkInitialized(m protoreflect.Message) error {\n\tif methods := protoMethods(m); methods != nil && methods.CheckInitialized != nil {\n\t\t_, err := methods.CheckInitialized(protoiface.CheckInitializedInput{\n\t\t\tMessage: m,\n\t\t})\n\t\treturn err\n\t}\n\treturn checkInitializedSlow(m)\n}\n\nfunc checkInitializedSlow(m protoreflect.Message) error {\n\tmd := m.Descriptor()\n\tfds := md.Fields()\n\tfor i, nums := 0, md.RequiredNumbers(); i < nums.Len(); i++ {\n\t\tfd := fds.ByNumber(nums.Get(i))\n\t\tif !m.Has(fd) {\n\t\t\treturn errors.RequiredNotSet(string(fd.FullName()))\n\t\t}\n\t}\n\tvar err error\n\tm.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tswitch {\n\t\tcase fd.IsList():\n\t\t\tif fd.Message() == nil {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tfor i, list := 0, v.List(); i < list.Len() && err == nil; i++ {\n\t\t\t\terr = checkInitialized(list.Get(i).Message())\n\t\t\t}\n\t\tcase fd.IsMap():\n\t\t\tif fd.MapValue().Message() == nil {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tv.Map().Range(func(key protoreflect.MapKey, v protoreflect.Value) bool {\n\t\t\t\terr = checkInitialized(v.Message())\n\t\t\t\treturn err == nil\n\t\t\t})\n\t\tdefault:\n\t\t\tif fd.Message() == nil {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\terr = checkInitialized(v.Message())\n\t\t}\n\t\treturn err == nil\n\t})\n\treturn err\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/decode.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// UnmarshalOptions configures the unmarshaler.\n//\n// Example usage:\n//\n//\terr := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m)\ntype UnmarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// Merge merges the input into the destination message.\n\t// The default behavior is to always reset the message before unmarshaling,\n\t// unless Merge is specified.\n\tMerge bool\n\n\t// AllowPartial accepts input for messages that will result in missing\n\t// required fields. If AllowPartial is false (the default), Unmarshal will\n\t// return an error if there are any missing required fields.\n\tAllowPartial bool\n\n\t// If DiscardUnknown is set, unknown fields are ignored.\n\tDiscardUnknown bool\n\n\t// Resolver is used for looking up types when unmarshaling extension fields.\n\t// If nil, this defaults to using protoregistry.GlobalTypes.\n\tResolver interface {\n\t\tFindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)\n\t\tFindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)\n\t}\n\n\t// RecursionLimit limits how deeply messages may be nested.\n\t// If zero, a default limit is applied.\n\tRecursionLimit int\n\n\t//\n\t// NoLazyDecoding turns off lazy decoding, which otherwise is enabled by\n\t// default. Lazy decoding only affects submessages (annotated with [lazy =\n\t// true] in the .proto file) within messages that use the Opaque API.\n\tNoLazyDecoding bool\n}\n\n// Unmarshal parses the wire-format message in b and places the result in m.\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\n//\n// See the [UnmarshalOptions] type if you need more control.\nfunc Unmarshal(b []byte, m Message) error {\n\t_, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect())\n\treturn err\n}\n\n// Unmarshal parses the wire-format message in b and places the result in m.\n// The provided message must be mutable (e.g., a non-nil pointer to a message).\nfunc (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {\n\tif o.RecursionLimit == 0 {\n\t\to.RecursionLimit = protowire.DefaultRecursionLimit\n\t}\n\t_, err := o.unmarshal(b, m.ProtoReflect())\n\treturn err\n}\n\n// UnmarshalState parses a wire-format message and places the result in m.\n//\n// This method permits fine-grained control over the unmarshaler.\n// Most users should use [Unmarshal] instead.\nfunc (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {\n\tif o.RecursionLimit == 0 {\n\t\to.RecursionLimit = protowire.DefaultRecursionLimit\n\t}\n\treturn o.unmarshal(in.Buf, in.Message)\n}\n\n// unmarshal is a centralized function that all unmarshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for unmarshal that do not go through this.\nfunc (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out protoiface.UnmarshalOutput, err error) {\n\tif o.Resolver == nil {\n\t\to.Resolver = protoregistry.GlobalTypes\n\t}\n\tif !o.Merge {\n\t\tReset(m.Interface())\n\t}\n\tallowPartial := o.AllowPartial\n\to.Merge = true\n\to.AllowPartial = true\n\tmethods := protoMethods(m)\n\tif methods != nil && methods.Unmarshal != nil &&\n\t\t!(o.DiscardUnknown && methods.Flags&protoiface.SupportUnmarshalDiscardUnknown == 0) {\n\t\tin := protoiface.UnmarshalInput{\n\t\t\tMessage:  m,\n\t\t\tBuf:      b,\n\t\t\tResolver: o.Resolver,\n\t\t\tDepth:    o.RecursionLimit,\n\t\t}\n\t\tif o.DiscardUnknown {\n\t\t\tin.Flags |= protoiface.UnmarshalDiscardUnknown\n\t\t}\n\n\t\tif !allowPartial {\n\t\t\t// This does not affect how current unmarshal functions work, it just allows them\n\t\t\t// to record this for lazy the decoding case.\n\t\t\tin.Flags |= protoiface.UnmarshalCheckRequired\n\t\t}\n\t\tif o.NoLazyDecoding {\n\t\t\tin.Flags |= protoiface.UnmarshalNoLazyDecoding\n\t\t}\n\n\t\tout, err = methods.Unmarshal(in)\n\t} else {\n\t\tif o.RecursionLimit--; o.RecursionLimit < 0 {\n\t\t\treturn out, errRecursionDepth\n\t\t}\n\t\terr = o.unmarshalMessageSlow(b, m)\n\t}\n\tif err != nil {\n\t\treturn out, err\n\t}\n\tif allowPartial || (out.Flags&protoiface.UnmarshalInitialized != 0) {\n\t\treturn out, nil\n\t}\n\treturn out, checkInitialized(m)\n}\n\nfunc (o UnmarshalOptions) unmarshalMessage(b []byte, m protoreflect.Message) error {\n\t_, err := o.unmarshal(b, m)\n\treturn err\n}\n\nfunc (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) error {\n\tmd := m.Descriptor()\n\tif messageset.IsMessageSet(md) {\n\t\treturn o.unmarshalMessageSet(b, m)\n\t}\n\tfields := md.Fields()\n\tfor len(b) > 0 {\n\t\t// Parse the tag (field number and wire type).\n\t\tnum, wtyp, tagLen := protowire.ConsumeTag(b)\n\t\tif tagLen < 0 {\n\t\t\treturn errDecode\n\t\t}\n\t\tif num > protowire.MaxValidNumber {\n\t\t\treturn errDecode\n\t\t}\n\n\t\t// Find the field descriptor for this field number.\n\t\tfd := fields.ByNumber(num)\n\t\tif fd == nil && md.ExtensionRanges().Has(num) {\n\t\t\textType, err := o.Resolver.FindExtensionByNumber(md.FullName(), num)\n\t\t\tif err != nil && err != protoregistry.NotFound {\n\t\t\t\treturn errors.New(\"%v: unable to resolve extension %v: %v\", md.FullName(), num, err)\n\t\t\t}\n\t\t\tif extType != nil {\n\t\t\t\tfd = extType.TypeDescriptor()\n\t\t\t}\n\t\t}\n\t\tvar err error\n\t\tif fd == nil {\n\t\t\terr = errUnknown\n\t\t}\n\n\t\t// Parse the field value.\n\t\tvar valLen int\n\t\tswitch {\n\t\tcase err != nil:\n\t\tcase fd.IsList():\n\t\t\tvalLen, err = o.unmarshalList(b[tagLen:], wtyp, m.Mutable(fd).List(), fd)\n\t\tcase fd.IsMap():\n\t\t\tvalLen, err = o.unmarshalMap(b[tagLen:], wtyp, m.Mutable(fd).Map(), fd)\n\t\tdefault:\n\t\t\tvalLen, err = o.unmarshalSingular(b[tagLen:], wtyp, m, fd)\n\t\t}\n\t\tif err != nil {\n\t\t\tif err != errUnknown {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvalLen = protowire.ConsumeFieldValue(num, wtyp, b[tagLen:])\n\t\t\tif valLen < 0 {\n\t\t\t\treturn errDecode\n\t\t\t}\n\t\t\tif !o.DiscardUnknown {\n\t\t\t\tm.SetUnknown(append(m.GetUnknown(), b[:tagLen+valLen]...))\n\t\t\t}\n\t\t}\n\t\tb = b[tagLen+valLen:]\n\t}\n\treturn nil\n}\n\nfunc (o UnmarshalOptions) unmarshalSingular(b []byte, wtyp protowire.Type, m protoreflect.Message, fd protoreflect.FieldDescriptor) (n int, err error) {\n\tv, n, err := o.unmarshalScalar(b, wtyp, fd)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tswitch fd.Kind() {\n\tcase protoreflect.GroupKind, protoreflect.MessageKind:\n\t\tm2 := m.Mutable(fd).Message()\n\t\tif err := o.unmarshalMessage(v.Bytes(), m2); err != nil {\n\t\t\treturn n, err\n\t\t}\n\tdefault:\n\t\t// Non-message scalars replace the previous value.\n\t\tm.Set(fd, v)\n\t}\n\treturn n, nil\n}\n\nfunc (o UnmarshalOptions) unmarshalMap(b []byte, wtyp protowire.Type, mapv protoreflect.Map, fd protoreflect.FieldDescriptor) (n int, err error) {\n\tif o.RecursionLimit--; o.RecursionLimit < 0 {\n\t\treturn 0, errRecursionDepth\n\t}\n\tif wtyp != protowire.BytesType {\n\t\treturn 0, errUnknown\n\t}\n\tb, n = protowire.ConsumeBytes(b)\n\tif n < 0 {\n\t\treturn 0, errDecode\n\t}\n\tvar (\n\t\tkeyField = fd.MapKey()\n\t\tvalField = fd.MapValue()\n\t\tkey      protoreflect.Value\n\t\tval      protoreflect.Value\n\t\thaveKey  bool\n\t\thaveVal  bool\n\t)\n\tswitch valField.Kind() {\n\tcase protoreflect.GroupKind, protoreflect.MessageKind:\n\t\tval = mapv.NewValue()\n\t}\n\t// Map entries are represented as a two-element message with fields\n\t// containing the key and value.\n\tfor len(b) > 0 {\n\t\tnum, wtyp, n := protowire.ConsumeTag(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tif num > protowire.MaxValidNumber {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tb = b[n:]\n\t\terr = errUnknown\n\t\tswitch num {\n\t\tcase genid.MapEntry_Key_field_number:\n\t\t\tkey, n, err = o.unmarshalScalar(b, wtyp, keyField)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\thaveKey = true\n\t\tcase genid.MapEntry_Value_field_number:\n\t\t\tvar v protoreflect.Value\n\t\t\tv, n, err = o.unmarshalScalar(b, wtyp, valField)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tswitch valField.Kind() {\n\t\t\tcase protoreflect.GroupKind, protoreflect.MessageKind:\n\t\t\t\tif err := o.unmarshalMessage(v.Bytes(), val.Message()); err != nil {\n\t\t\t\t\treturn 0, err\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tval = v\n\t\t\t}\n\t\t\thaveVal = true\n\t\t}\n\t\tif err == errUnknown {\n\t\t\tn = protowire.ConsumeFieldValue(num, wtyp, b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t} else if err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tb = b[n:]\n\t}\n\t// Every map entry should have entries for key and value, but this is not strictly required.\n\tif !haveKey {\n\t\tkey = keyField.Default()\n\t}\n\tif !haveVal {\n\t\tswitch valField.Kind() {\n\t\tcase protoreflect.GroupKind, protoreflect.MessageKind:\n\t\tdefault:\n\t\t\tval = valField.Default()\n\t\t}\n\t}\n\tmapv.Set(key.MapKey(), val)\n\treturn n, nil\n}\n\n// errUnknown is used internally to indicate fields which should be added\n// to the unknown field set of a message. It is never returned from an exported\n// function.\nvar errUnknown = errors.New(\"BUG: internal error (unknown)\")\n\nvar errDecode = errors.New(\"cannot parse invalid wire-format data\")\n\nvar errRecursionDepth = errors.New(\"exceeded maximum recursion depth\")\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/decode_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage proto\n\nimport (\n\t\"math\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// unmarshalScalar decodes a value of the given kind.\n//\n// Message values are decoded into a []byte which aliases the input data.\nfunc (o UnmarshalOptions) unmarshalScalar(b []byte, wtyp protowire.Type, fd protoreflect.FieldDescriptor) (val protoreflect.Value, n int, err error) {\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfBool(protowire.DecodeBool(v)), n, nil\n\tcase protoreflect.EnumKind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)), n, nil\n\tcase protoreflect.Int32Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt32(int32(v)), n, nil\n\tcase protoreflect.Sint32Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))), n, nil\n\tcase protoreflect.Uint32Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfUint32(uint32(v)), n, nil\n\tcase protoreflect.Int64Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt64(int64(v)), n, nil\n\tcase protoreflect.Sint64Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), n, nil\n\tcase protoreflect.Uint64Kind:\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfUint64(v), n, nil\n\tcase protoreflect.Sfixed32Kind:\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt32(int32(v)), n, nil\n\tcase protoreflect.Fixed32Kind:\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfUint32(uint32(v)), n, nil\n\tcase protoreflect.FloatKind:\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))), n, nil\n\tcase protoreflect.Sfixed64Kind:\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfInt64(int64(v)), n, nil\n\tcase protoreflect.Fixed64Kind:\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfUint64(v), n, nil\n\tcase protoreflect.DoubleKind:\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfFloat64(math.Float64frombits(v)), n, nil\n\tcase protoreflect.StringKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\tif strs.EnforceUTF8(fd) && !utf8.Valid(v) {\n\t\t\treturn protoreflect.Value{}, 0, errors.InvalidUTF8(string(fd.FullName()))\n\t\t}\n\t\treturn protoreflect.ValueOfString(string(v)), n, nil\n\tcase protoreflect.BytesKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfBytes(append(emptyBuf[:], v...)), n, nil\n\tcase protoreflect.MessageKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfBytes(v), n, nil\n\tcase protoreflect.GroupKind:\n\t\tif wtyp != protowire.StartGroupType {\n\t\t\treturn val, 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeGroup(fd.Number(), b)\n\t\tif n < 0 {\n\t\t\treturn val, 0, errDecode\n\t\t}\n\t\treturn protoreflect.ValueOfBytes(v), n, nil\n\tdefault:\n\t\treturn val, 0, errUnknown\n\t}\n}\n\nfunc (o UnmarshalOptions) unmarshalList(b []byte, wtyp protowire.Type, list protoreflect.List, fd protoreflect.FieldDescriptor) (n int, err error) {\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfBool(protowire.DecodeBool(v)))\n\t\treturn n, nil\n\tcase protoreflect.EnumKind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber(v)))\n\t\treturn n, nil\n\tcase protoreflect.Int32Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\treturn n, nil\n\tcase protoreflect.Sint32Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag(v & math.MaxUint32))))\n\t\treturn n, nil\n\tcase protoreflect.Uint32Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\treturn n, nil\n\tcase protoreflect.Int64Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\treturn n, nil\n\tcase protoreflect.Sint64Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)))\n\t\treturn n, nil\n\tcase protoreflect.Uint64Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeVarint(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.VarintType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeVarint(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\treturn n, nil\n\tcase protoreflect.Sfixed32Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed32(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt32(int32(v)))\n\t\treturn n, nil\n\tcase protoreflect.Fixed32Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed32(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfUint32(uint32(v)))\n\t\treturn n, nil\n\tcase protoreflect.FloatKind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed32(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed32Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed32(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32(v))))\n\t\treturn n, nil\n\tcase protoreflect.Sfixed64Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed64(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfInt64(int64(v)))\n\t\treturn n, nil\n\tcase protoreflect.Fixed64Kind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed64(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfUint64(v))\n\t\treturn n, nil\n\tcase protoreflect.DoubleKind:\n\t\tif wtyp == protowire.BytesType {\n\t\t\tbuf, n := protowire.ConsumeBytes(b)\n\t\t\tif n < 0 {\n\t\t\t\treturn 0, errDecode\n\t\t\t}\n\t\t\tfor len(buf) > 0 {\n\t\t\t\tv, n := protowire.ConsumeFixed64(buf)\n\t\t\t\tif n < 0 {\n\t\t\t\t\treturn 0, errDecode\n\t\t\t\t}\n\t\t\t\tbuf = buf[n:]\n\t\t\t\tlist.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v)))\n\t\t\t}\n\t\t\treturn n, nil\n\t\t}\n\t\tif wtyp != protowire.Fixed64Type {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeFixed64(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfFloat64(math.Float64frombits(v)))\n\t\treturn n, nil\n\tcase protoreflect.StringKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tif strs.EnforceUTF8(fd) && !utf8.Valid(v) {\n\t\t\treturn 0, errors.InvalidUTF8(string(fd.FullName()))\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfString(string(v)))\n\t\treturn n, nil\n\tcase protoreflect.BytesKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tlist.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], v...)))\n\t\treturn n, nil\n\tcase protoreflect.MessageKind:\n\t\tif wtyp != protowire.BytesType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeBytes(b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tm := list.NewElement()\n\t\tif err := o.unmarshalMessage(v, m.Message()); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tlist.Append(m)\n\t\treturn n, nil\n\tcase protoreflect.GroupKind:\n\t\tif wtyp != protowire.StartGroupType {\n\t\t\treturn 0, errUnknown\n\t\t}\n\t\tv, n := protowire.ConsumeGroup(fd.Number(), b)\n\t\tif n < 0 {\n\t\t\treturn 0, errDecode\n\t\t}\n\t\tm := list.NewElement()\n\t\tif err := o.unmarshalMessage(v, m.Message()); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tlist.Append(m)\n\t\treturn n, nil\n\tdefault:\n\t\treturn 0, errUnknown\n\t}\n}\n\n// We append to an empty array rather than a nil []byte to get non-nil zero-length byte slices.\nvar emptyBuf [0]byte\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/doc.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package proto provides functions operating on protocol buffer messages.\n//\n// For documentation on protocol buffers in general, see:\n// https://protobuf.dev.\n//\n// For a tutorial on using protocol buffers with Go, see:\n// https://protobuf.dev/getting-started/gotutorial.\n//\n// For a guide to generated Go protocol buffer code, see:\n// https://protobuf.dev/reference/go/go-generated.\n//\n// # Binary serialization\n//\n// This package contains functions to convert to and from the wire format,\n// an efficient binary serialization of protocol buffers.\n//\n//   - [Size] reports the size of a message in the wire format.\n//\n//   - [Marshal] converts a message to the wire format.\n//     The [MarshalOptions] type provides more control over wire marshaling.\n//\n//   - [Unmarshal] converts a message from the wire format.\n//     The [UnmarshalOptions] type provides more control over wire unmarshaling.\n//\n// # Basic message operations\n//\n//   - [Clone] makes a deep copy of a message.\n//\n//   - [Merge] merges the content of a message into another.\n//\n//   - [Equal] compares two messages. For more control over comparisons\n//     and detailed reporting of differences, see package\n//     [google.golang.org/protobuf/testing/protocmp].\n//\n//   - [Reset] clears the content of a message.\n//\n//   - [CheckInitialized] reports whether all required fields in a message are set.\n//\n// # Optional scalar constructors\n//\n// The API for some generated messages represents optional scalar fields\n// as pointers to a value. For example, an optional string field has the\n// Go type *string.\n//\n//   - [Bool], [Int32], [Int64], [Uint32], [Uint64], [Float32], [Float64], and [String]\n//     take a value and return a pointer to a new instance of it,\n//     to simplify construction of optional field values.\n//\n// Generated enum types usually have an Enum method which performs the\n// same operation.\n//\n// Optional scalar fields are only supported in proto2.\n//\n// # Extension accessors\n//\n//   - [HasExtension], [GetExtension], [SetExtension], and [ClearExtension]\n//     access extension field values in a protocol buffer message.\n//\n// Extension fields are only supported in proto2.\n//\n// # Related packages\n//\n//   - Package [google.golang.org/protobuf/encoding/protojson] converts messages to\n//     and from JSON.\n//\n//   - Package [google.golang.org/protobuf/encoding/prototext] converts messages to\n//     and from the text format.\n//\n//   - Package [google.golang.org/protobuf/reflect/protoreflect] provides a\n//     reflection interface for protocol buffer data types.\n//\n//   - Package [google.golang.org/protobuf/testing/protocmp] provides features\n//     to compare protocol buffer messages with the [github.com/google/go-cmp/cmp]\n//     package.\n//\n//   - Package [google.golang.org/protobuf/types/dynamicpb] provides a dynamic\n//     message type, suitable for working with messages where the protocol buffer\n//     type is only known at runtime.\n//\n// This module contains additional packages for more specialized use cases.\n// Consult the individual package documentation for details.\npackage proto\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/encode.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n\n\tprotoerrors \"google.golang.org/protobuf/internal/errors\"\n)\n\n// MarshalOptions configures the marshaler.\n//\n// Example usage:\n//\n//\tb, err := MarshalOptions{Deterministic: true}.Marshal(m)\ntype MarshalOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// AllowPartial allows messages that have missing required fields to marshal\n\t// without returning an error. If AllowPartial is false (the default),\n\t// Marshal will return an error if there are any missing required fields.\n\tAllowPartial bool\n\n\t// Deterministic controls whether the same message will always be\n\t// serialized to the same bytes within the same binary.\n\t//\n\t// Setting this option guarantees that repeated serialization of\n\t// the same message will return the same bytes, and that different\n\t// processes of the same binary (which may be executing on different\n\t// machines) will serialize equal messages to the same bytes.\n\t// It has no effect on the resulting size of the encoded message compared\n\t// to a non-deterministic marshal.\n\t//\n\t// Note that the deterministic serialization is NOT canonical across\n\t// languages. It is not guaranteed to remain stable over time. It is\n\t// unstable across different builds with schema changes due to unknown\n\t// fields. Users who need canonical serialization (e.g., persistent\n\t// storage in a canonical form, fingerprinting, etc.) must define\n\t// their own canonicalization specification and implement their own\n\t// serializer rather than relying on this API.\n\t//\n\t// If deterministic serialization is requested, map entries will be\n\t// sorted by keys in lexographical order. This is an implementation\n\t// detail and subject to change.\n\tDeterministic bool\n\n\t// UseCachedSize indicates that the result of a previous Size call\n\t// may be reused.\n\t//\n\t// Setting this option asserts that:\n\t//\n\t// 1. Size has previously been called on this message with identical\n\t// options (except for UseCachedSize itself).\n\t//\n\t// 2. The message and all its submessages have not changed in any\n\t// way since the Size call. For lazily decoded messages, accessing\n\t// a message results in decoding the message, which is a change.\n\t//\n\t// If either of these invariants is violated,\n\t// the results are undefined and may include panics or corrupted output.\n\t//\n\t// Implementations MAY take this option into account to provide\n\t// better performance, but there is no guarantee that they will do so.\n\t// There is absolutely no guarantee that Size followed by Marshal with\n\t// UseCachedSize set will perform equivalently to Marshal alone.\n\tUseCachedSize bool\n}\n\n// flags turns the specified MarshalOptions (user-facing) into\n// protoiface.MarshalInputFlags (used internally by the marshaler).\n//\n// See impl.marshalOptions.Options for the inverse operation.\nfunc (o MarshalOptions) flags() protoiface.MarshalInputFlags {\n\tvar flags protoiface.MarshalInputFlags\n\n\t// Note: o.AllowPartial is always forced to true by MarshalOptions.marshal,\n\t// which is why it is not a part of MarshalInputFlags.\n\n\tif o.Deterministic {\n\t\tflags |= protoiface.MarshalDeterministic\n\t}\n\n\tif o.UseCachedSize {\n\t\tflags |= protoiface.MarshalUseCachedSize\n\t}\n\n\treturn flags\n}\n\n// Marshal returns the wire-format encoding of m.\n//\n// This is the most common entry point for encoding a Protobuf message.\n//\n// See the [MarshalOptions] type if you need more control.\nfunc Marshal(m Message) ([]byte, error) {\n\t// Treat nil message interface as an empty message; nothing to output.\n\tif m == nil {\n\t\treturn nil, nil\n\t}\n\n\tout, err := MarshalOptions{}.marshal(nil, m.ProtoReflect())\n\tif len(out.Buf) == 0 && err == nil {\n\t\tout.Buf = emptyBytesForMessage(m)\n\t}\n\treturn out.Buf, err\n}\n\n// Marshal returns the wire-format encoding of m.\nfunc (o MarshalOptions) Marshal(m Message) ([]byte, error) {\n\t// Treat nil message interface as an empty message; nothing to output.\n\tif m == nil {\n\t\treturn nil, nil\n\t}\n\n\tout, err := o.marshal(nil, m.ProtoReflect())\n\tif len(out.Buf) == 0 && err == nil {\n\t\tout.Buf = emptyBytesForMessage(m)\n\t}\n\treturn out.Buf, err\n}\n\n// emptyBytesForMessage returns a nil buffer if and only if m is invalid,\n// otherwise it returns a non-nil empty buffer.\n//\n// This is to assist the edge-case where user-code does the following:\n//\n//\tm1.OptionalBytes, _ = proto.Marshal(m2)\n//\n// where they expect the proto2 \"optional_bytes\" field to be populated\n// if any only if m2 is a valid message.\nfunc emptyBytesForMessage(m Message) []byte {\n\tif m == nil || !m.ProtoReflect().IsValid() {\n\t\treturn nil\n\t}\n\treturn emptyBuf[:]\n}\n\n// MarshalAppend appends the wire-format encoding of m to b,\n// returning the result.\n//\n// This is a less common entry point than [Marshal], which is only needed if you\n// need to supply your own buffers for performance reasons.\nfunc (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) {\n\t// Treat nil message interface as an empty message; nothing to append.\n\tif m == nil {\n\t\treturn b, nil\n\t}\n\n\tout, err := o.marshal(b, m.ProtoReflect())\n\treturn out.Buf, err\n}\n\n// MarshalState returns the wire-format encoding of a message.\n//\n// This method permits fine-grained control over the marshaler.\n// Most users should use [Marshal] instead.\nfunc (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {\n\treturn o.marshal(in.Buf, in.Message)\n}\n\n// marshal is a centralized function that all marshal operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for marshal that do not go through this.\nfunc (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoiface.MarshalOutput, err error) {\n\tallowPartial := o.AllowPartial\n\to.AllowPartial = true\n\tif methods := protoMethods(m); methods != nil && methods.Marshal != nil &&\n\t\t!(o.Deterministic && methods.Flags&protoiface.SupportMarshalDeterministic == 0) {\n\t\tin := protoiface.MarshalInput{\n\t\t\tMessage: m,\n\t\t\tBuf:     b,\n\t\t\tFlags:   o.flags(),\n\t\t}\n\t\tif methods.Size != nil {\n\t\t\tsout := methods.Size(protoiface.SizeInput{\n\t\t\t\tMessage: m,\n\t\t\t\tFlags:   in.Flags,\n\t\t\t})\n\t\t\tif cap(b) < len(b)+sout.Size {\n\t\t\t\tin.Buf = make([]byte, len(b), growcap(cap(b), len(b)+sout.Size))\n\t\t\t\tcopy(in.Buf, b)\n\t\t\t}\n\t\t\tin.Flags |= protoiface.MarshalUseCachedSize\n\t\t}\n\t\tout, err = methods.Marshal(in)\n\t} else {\n\t\tout.Buf, err = o.marshalMessageSlow(b, m)\n\t}\n\tif err != nil {\n\t\tvar mismatch *protoerrors.SizeMismatchError\n\t\tif errors.As(err, &mismatch) {\n\t\t\treturn out, fmt.Errorf(\"marshaling %s: %v\", string(m.Descriptor().FullName()), err)\n\t\t}\n\t\treturn out, err\n\t}\n\tif allowPartial {\n\t\treturn out, nil\n\t}\n\treturn out, checkInitialized(m)\n}\n\nfunc (o MarshalOptions) marshalMessage(b []byte, m protoreflect.Message) ([]byte, error) {\n\tout, err := o.marshal(b, m)\n\treturn out.Buf, err\n}\n\n// growcap scales up the capacity of a slice.\n//\n// Given a slice with a current capacity of oldcap and a desired\n// capacity of wantcap, growcap returns a new capacity >= wantcap.\n//\n// The algorithm is mostly identical to the one used by append as of Go 1.14.\nfunc growcap(oldcap, wantcap int) (newcap int) {\n\tif wantcap > oldcap*2 {\n\t\tnewcap = wantcap\n\t} else if oldcap < 1024 {\n\t\t// The Go 1.14 runtime takes this case when len(s) < 1024,\n\t\t// not when cap(s) < 1024. The difference doesn't seem\n\t\t// significant here.\n\t\tnewcap = oldcap * 2\n\t} else {\n\t\tnewcap = oldcap\n\t\tfor 0 < newcap && newcap < wantcap {\n\t\t\tnewcap += newcap / 4\n\t\t}\n\t\tif newcap <= 0 {\n\t\t\tnewcap = wantcap\n\t\t}\n\t}\n\treturn newcap\n}\n\nfunc (o MarshalOptions) marshalMessageSlow(b []byte, m protoreflect.Message) ([]byte, error) {\n\tif messageset.IsMessageSet(m.Descriptor()) {\n\t\treturn o.marshalMessageSet(b, m)\n\t}\n\tfieldOrder := order.AnyFieldOrder\n\tif o.Deterministic {\n\t\t// TODO: This should use a more natural ordering like NumberFieldOrder,\n\t\t// but doing so breaks golden tests that make invalid assumption about\n\t\t// output stability of this implementation.\n\t\tfieldOrder = order.LegacyFieldOrder\n\t}\n\tvar err error\n\torder.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tb, err = o.marshalField(b, fd, v)\n\t\treturn err == nil\n\t})\n\tif err != nil {\n\t\treturn b, err\n\t}\n\tb = append(b, m.GetUnknown()...)\n\treturn b, nil\n}\n\nfunc (o MarshalOptions) marshalField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) {\n\tswitch {\n\tcase fd.IsList():\n\t\treturn o.marshalList(b, fd, value.List())\n\tcase fd.IsMap():\n\t\treturn o.marshalMap(b, fd, value.Map())\n\tdefault:\n\t\tb = protowire.AppendTag(b, fd.Number(), wireTypes[fd.Kind()])\n\t\treturn o.marshalSingular(b, fd, value)\n\t}\n}\n\nfunc (o MarshalOptions) marshalList(b []byte, fd protoreflect.FieldDescriptor, list protoreflect.List) ([]byte, error) {\n\tif fd.IsPacked() && list.Len() > 0 {\n\t\tb = protowire.AppendTag(b, fd.Number(), protowire.BytesType)\n\t\tb, pos := appendSpeculativeLength(b)\n\t\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\t\tvar err error\n\t\t\tb, err = o.marshalSingular(b, fd, list.Get(i))\n\t\t\tif err != nil {\n\t\t\t\treturn b, err\n\t\t\t}\n\t\t}\n\t\tb = finishSpeculativeLength(b, pos)\n\t\treturn b, nil\n\t}\n\n\tkind := fd.Kind()\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tvar err error\n\t\tb = protowire.AppendTag(b, fd.Number(), wireTypes[kind])\n\t\tb, err = o.marshalSingular(b, fd, list.Get(i))\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t}\n\treturn b, nil\n}\n\nfunc (o MarshalOptions) marshalMap(b []byte, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) ([]byte, error) {\n\tkeyf := fd.MapKey()\n\tvalf := fd.MapValue()\n\tkeyOrder := order.AnyKeyOrder\n\tif o.Deterministic {\n\t\tkeyOrder = order.GenericKeyOrder\n\t}\n\tvar err error\n\torder.RangeEntries(mapv, keyOrder, func(key protoreflect.MapKey, value protoreflect.Value) bool {\n\t\tb = protowire.AppendTag(b, fd.Number(), protowire.BytesType)\n\t\tvar pos int\n\t\tb, pos = appendSpeculativeLength(b)\n\n\t\tb, err = o.marshalField(b, keyf, key.Value())\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\t\tb, err = o.marshalField(b, valf, value)\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\t\tb = finishSpeculativeLength(b, pos)\n\t\treturn true\n\t})\n\treturn b, err\n}\n\n// When encoding length-prefixed fields, we speculatively set aside some number of bytes\n// for the length, encode the data, and then encode the length (shifting the data if necessary\n// to make room).\nconst speculativeLength = 1\n\nfunc appendSpeculativeLength(b []byte) ([]byte, int) {\n\tpos := len(b)\n\tb = append(b, \"\\x00\\x00\\x00\\x00\"[:speculativeLength]...)\n\treturn b, pos\n}\n\nfunc finishSpeculativeLength(b []byte, pos int) []byte {\n\tmlen := len(b) - pos - speculativeLength\n\tmsiz := protowire.SizeVarint(uint64(mlen))\n\tif msiz != speculativeLength {\n\t\tfor i := 0; i < msiz-speculativeLength; i++ {\n\t\t\tb = append(b, 0)\n\t\t}\n\t\tcopy(b[pos+msiz:], b[pos+speculativeLength:])\n\t\tb = b[:pos+msiz+mlen]\n\t}\n\tprotowire.AppendVarint(b[:pos], uint64(mlen))\n\treturn b\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/encode_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage proto\n\nimport (\n\t\"math\"\n\t\"unicode/utf8\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nvar wireTypes = map[protoreflect.Kind]protowire.Type{\n\tprotoreflect.BoolKind:     protowire.VarintType,\n\tprotoreflect.EnumKind:     protowire.VarintType,\n\tprotoreflect.Int32Kind:    protowire.VarintType,\n\tprotoreflect.Sint32Kind:   protowire.VarintType,\n\tprotoreflect.Uint32Kind:   protowire.VarintType,\n\tprotoreflect.Int64Kind:    protowire.VarintType,\n\tprotoreflect.Sint64Kind:   protowire.VarintType,\n\tprotoreflect.Uint64Kind:   protowire.VarintType,\n\tprotoreflect.Sfixed32Kind: protowire.Fixed32Type,\n\tprotoreflect.Fixed32Kind:  protowire.Fixed32Type,\n\tprotoreflect.FloatKind:    protowire.Fixed32Type,\n\tprotoreflect.Sfixed64Kind: protowire.Fixed64Type,\n\tprotoreflect.Fixed64Kind:  protowire.Fixed64Type,\n\tprotoreflect.DoubleKind:   protowire.Fixed64Type,\n\tprotoreflect.StringKind:   protowire.BytesType,\n\tprotoreflect.BytesKind:    protowire.BytesType,\n\tprotoreflect.MessageKind:  protowire.BytesType,\n\tprotoreflect.GroupKind:    protowire.StartGroupType,\n}\n\nfunc (o MarshalOptions) marshalSingular(b []byte, fd protoreflect.FieldDescriptor, v protoreflect.Value) ([]byte, error) {\n\tswitch fd.Kind() {\n\tcase protoreflect.BoolKind:\n\t\tb = protowire.AppendVarint(b, protowire.EncodeBool(v.Bool()))\n\tcase protoreflect.EnumKind:\n\t\tb = protowire.AppendVarint(b, uint64(v.Enum()))\n\tcase protoreflect.Int32Kind:\n\t\tb = protowire.AppendVarint(b, uint64(int32(v.Int())))\n\tcase protoreflect.Sint32Kind:\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(int64(int32(v.Int()))))\n\tcase protoreflect.Uint32Kind:\n\t\tb = protowire.AppendVarint(b, uint64(uint32(v.Uint())))\n\tcase protoreflect.Int64Kind:\n\t\tb = protowire.AppendVarint(b, uint64(v.Int()))\n\tcase protoreflect.Sint64Kind:\n\t\tb = protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int()))\n\tcase protoreflect.Uint64Kind:\n\t\tb = protowire.AppendVarint(b, v.Uint())\n\tcase protoreflect.Sfixed32Kind:\n\t\tb = protowire.AppendFixed32(b, uint32(v.Int()))\n\tcase protoreflect.Fixed32Kind:\n\t\tb = protowire.AppendFixed32(b, uint32(v.Uint()))\n\tcase protoreflect.FloatKind:\n\t\tb = protowire.AppendFixed32(b, math.Float32bits(float32(v.Float())))\n\tcase protoreflect.Sfixed64Kind:\n\t\tb = protowire.AppendFixed64(b, uint64(v.Int()))\n\tcase protoreflect.Fixed64Kind:\n\t\tb = protowire.AppendFixed64(b, v.Uint())\n\tcase protoreflect.DoubleKind:\n\t\tb = protowire.AppendFixed64(b, math.Float64bits(v.Float()))\n\tcase protoreflect.StringKind:\n\t\tif strs.EnforceUTF8(fd) && !utf8.ValidString(v.String()) {\n\t\t\treturn b, errors.InvalidUTF8(string(fd.FullName()))\n\t\t}\n\t\tb = protowire.AppendString(b, v.String())\n\tcase protoreflect.BytesKind:\n\t\tb = protowire.AppendBytes(b, v.Bytes())\n\tcase protoreflect.MessageKind:\n\t\tvar pos int\n\t\tvar err error\n\t\tb, pos = appendSpeculativeLength(b)\n\t\tb, err = o.marshalMessage(b, v.Message())\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = finishSpeculativeLength(b, pos)\n\tcase protoreflect.GroupKind:\n\t\tvar err error\n\t\tb, err = o.marshalMessage(b, v.Message())\n\t\tif err != nil {\n\t\t\treturn b, err\n\t\t}\n\t\tb = protowire.AppendVarint(b, protowire.EncodeTag(fd.Number(), protowire.EndGroupType))\n\tdefault:\n\t\treturn b, errors.New(\"invalid kind %v\", fd.Kind())\n\t}\n\treturn b, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/equal.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// Equal reports whether two messages are equal,\n// by recursively comparing the fields of the message.\n//\n//   - Bytes fields are equal if they contain identical bytes.\n//     Empty bytes (regardless of nil-ness) are considered equal.\n//\n//   - Floating-point fields are equal if they contain the same value.\n//     Unlike the == operator, a NaN is equal to another NaN.\n//\n//   - Other scalar fields are equal if they contain the same value.\n//\n//   - Message fields are equal if they have\n//     the same set of populated known and extension field values, and\n//     the same set of unknown fields values.\n//\n//   - Lists are equal if they are the same length and\n//     each corresponding element is equal.\n//\n//   - Maps are equal if they have the same set of keys and\n//     the corresponding value for each key is equal.\n//\n// An invalid message is not equal to a valid message.\n// An invalid message is only equal to another invalid message of the\n// same type. An invalid message often corresponds to a nil pointer\n// of the concrete message type. For example, (*pb.M)(nil) is not equal\n// to &pb.M{}.\n// If two valid messages marshal to the same bytes under deterministic\n// serialization, then Equal is guaranteed to report true.\nfunc Equal(x, y Message) bool {\n\tif x == nil || y == nil {\n\t\treturn x == nil && y == nil\n\t}\n\tif reflect.TypeOf(x).Kind() == reflect.Ptr && x == y {\n\t\t// Avoid an expensive comparison if both inputs are identical pointers.\n\t\treturn true\n\t}\n\tmx := x.ProtoReflect()\n\tmy := y.ProtoReflect()\n\tif mx.IsValid() != my.IsValid() {\n\t\treturn false\n\t}\n\n\t// Only one of the messages needs to implement the fast-path for it to work.\n\tpmx := protoMethods(mx)\n\tpmy := protoMethods(my)\n\tif pmx != nil && pmy != nil && pmx.Equal != nil && pmy.Equal != nil {\n\t\treturn pmx.Equal(protoiface.EqualInput{MessageA: mx, MessageB: my}).Equal\n\t}\n\n\tvx := protoreflect.ValueOfMessage(mx)\n\tvy := protoreflect.ValueOfMessage(my)\n\treturn vx.Equal(vy)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/extension.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// HasExtension reports whether an extension field is populated.\n// It returns false if m is invalid or if xt does not extend m.\nfunc HasExtension(m Message, xt protoreflect.ExtensionType) bool {\n\t// Treat nil message interface or descriptor as an empty message; no populated\n\t// fields.\n\tif m == nil || xt == nil {\n\t\treturn false\n\t}\n\n\t// As a special-case, we reports invalid or mismatching descriptors\n\t// as always not being populated (since they aren't).\n\tmr := m.ProtoReflect()\n\txd := xt.TypeDescriptor()\n\tif mr.Descriptor() != xd.ContainingMessage() {\n\t\treturn false\n\t}\n\n\treturn mr.Has(xd)\n}\n\n// ClearExtension clears an extension field such that subsequent\n// [HasExtension] calls return false.\n// It panics if m is invalid or if xt does not extend m.\nfunc ClearExtension(m Message, xt protoreflect.ExtensionType) {\n\tm.ProtoReflect().Clear(xt.TypeDescriptor())\n}\n\n// GetExtension retrieves the value for an extension field.\n// If the field is unpopulated, it returns the default value for\n// scalars and an immutable, empty value for lists or messages.\n// It panics if xt does not extend m.\n//\n// The type of the value is dependent on the field type of the extension.\n// For extensions generated by protoc-gen-go, the Go type is as follows:\n//\n//\t╔═══════════════════╤═════════════════════════╗\n//\t║ Go type           │ Protobuf kind           ║\n//\t╠═══════════════════╪═════════════════════════╣\n//\t║ bool              │ bool                    ║\n//\t║ int32             │ int32, sint32, sfixed32 ║\n//\t║ int64             │ int64, sint64, sfixed64 ║\n//\t║ uint32            │ uint32, fixed32         ║\n//\t║ uint64            │ uint64, fixed64         ║\n//\t║ float32           │ float                   ║\n//\t║ float64           │ double                  ║\n//\t║ string            │ string                  ║\n//\t║ []byte            │ bytes                   ║\n//\t║ protoreflect.Enum │ enum                    ║\n//\t║ proto.Message     │ message, group          ║\n//\t╚═══════════════════╧═════════════════════════╝\n//\n// The protoreflect.Enum and proto.Message types are the concrete Go type\n// associated with the named enum or message. Repeated fields are represented\n// using a Go slice of the base element type.\n//\n// If a generated extension descriptor variable is directly passed to\n// GetExtension, then the call should be followed immediately by a\n// type assertion to the expected output value. For example:\n//\n//\tmm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage)\n//\n// This pattern enables static analysis tools to verify that the asserted type\n// matches the Go type associated with the extension field and\n// also enables a possible future migration to a type-safe extension API.\n//\n// Since singular messages are the most common extension type, the pattern of\n// calling HasExtension followed by GetExtension may be simplified to:\n//\n//\tif mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage); mm != nil {\n//\t    ... // make use of mm\n//\t}\n//\n// The mm variable is non-nil if and only if HasExtension reports true.\nfunc GetExtension(m Message, xt protoreflect.ExtensionType) any {\n\t// Treat nil message interface as an empty message; return the default.\n\tif m == nil {\n\t\treturn xt.InterfaceOf(xt.Zero())\n\t}\n\n\treturn xt.InterfaceOf(m.ProtoReflect().Get(xt.TypeDescriptor()))\n}\n\n// SetExtension stores the value of an extension field.\n// It panics if m is invalid, xt does not extend m, or if type of v\n// is invalid for the specified extension field.\n//\n// The type of the value is dependent on the field type of the extension.\n// For extensions generated by protoc-gen-go, the Go type is as follows:\n//\n//\t╔═══════════════════╤═════════════════════════╗\n//\t║ Go type           │ Protobuf kind           ║\n//\t╠═══════════════════╪═════════════════════════╣\n//\t║ bool              │ bool                    ║\n//\t║ int32             │ int32, sint32, sfixed32 ║\n//\t║ int64             │ int64, sint64, sfixed64 ║\n//\t║ uint32            │ uint32, fixed32         ║\n//\t║ uint64            │ uint64, fixed64         ║\n//\t║ float32           │ float                   ║\n//\t║ float64           │ double                  ║\n//\t║ string            │ string                  ║\n//\t║ []byte            │ bytes                   ║\n//\t║ protoreflect.Enum │ enum                    ║\n//\t║ proto.Message     │ message, group          ║\n//\t╚═══════════════════╧═════════════════════════╝\n//\n// The protoreflect.Enum and proto.Message types are the concrete Go type\n// associated with the named enum or message. Repeated fields are represented\n// using a Go slice of the base element type.\n//\n// If a generated extension descriptor variable is directly passed to\n// SetExtension (e.g., foopb.E_MyExtension), then the value should be a\n// concrete type that matches the expected Go type for the extension descriptor\n// so that static analysis tools can verify type correctness.\n// This also enables a possible future migration to a type-safe extension API.\nfunc SetExtension(m Message, xt protoreflect.ExtensionType, v any) {\n\txd := xt.TypeDescriptor()\n\tpv := xt.ValueOf(v)\n\n\t// Specially treat an invalid list, map, or message as clear.\n\tisValid := true\n\tswitch {\n\tcase xd.IsList():\n\t\tisValid = pv.List().IsValid()\n\tcase xd.IsMap():\n\t\tisValid = pv.Map().IsValid()\n\tcase xd.Message() != nil:\n\t\tisValid = pv.Message().IsValid()\n\t}\n\tif !isValid {\n\t\tm.ProtoReflect().Clear(xd)\n\t\treturn\n\t}\n\n\tm.ProtoReflect().Set(xd, pv)\n}\n\n// RangeExtensions iterates over every populated extension field in m in an\n// undefined order, calling f for each extension type and value encountered.\n// It returns immediately if f returns false.\n// While iterating, mutating operations may only be performed\n// on the current extension field.\nfunc RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) {\n\t// Treat nil message interface as an empty message; nothing to range over.\n\tif m == nil {\n\t\treturn\n\t}\n\n\tm.ProtoReflect().Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tif fd.IsExtension() {\n\t\t\txt := fd.(protoreflect.ExtensionTypeDescriptor).Type()\n\t\t\tvi := xt.InterfaceOf(v)\n\t\t\treturn f(xt, vi)\n\t\t}\n\t\treturn true\n\t})\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/merge.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// Merge merges src into dst, which must be a message with the same descriptor.\n//\n// Populated scalar fields in src are copied to dst, while populated\n// singular messages in src are merged into dst by recursively calling Merge.\n// The elements of every list field in src is appended to the corresponded\n// list fields in dst. The entries of every map field in src is copied into\n// the corresponding map field in dst, possibly replacing existing entries.\n// The unknown fields of src are appended to the unknown fields of dst.\n//\n// It is semantically equivalent to unmarshaling the encoded form of src\n// into dst with the [UnmarshalOptions.Merge] option specified.\nfunc Merge(dst, src Message) {\n\t// TODO: Should nil src be treated as semantically equivalent to a\n\t// untyped, read-only, empty message? What about a nil dst?\n\n\tdstMsg, srcMsg := dst.ProtoReflect(), src.ProtoReflect()\n\tif dstMsg.Descriptor() != srcMsg.Descriptor() {\n\t\tif got, want := dstMsg.Descriptor().FullName(), srcMsg.Descriptor().FullName(); got != want {\n\t\t\tpanic(fmt.Sprintf(\"descriptor mismatch: %v != %v\", got, want))\n\t\t}\n\t\tpanic(\"descriptor mismatch\")\n\t}\n\tmergeOptions{}.mergeMessage(dstMsg, srcMsg)\n}\n\n// Clone returns a deep copy of m.\n// If the top-level message is invalid, it returns an invalid message as well.\nfunc Clone(m Message) Message {\n\t// NOTE: Most usages of Clone assume the following properties:\n\t//\tt := reflect.TypeOf(m)\n\t//\tt == reflect.TypeOf(m.ProtoReflect().New().Interface())\n\t//\tt == reflect.TypeOf(m.ProtoReflect().Type().Zero().Interface())\n\t//\n\t// Embedding protobuf messages breaks this since the parent type will have\n\t// a forwarded ProtoReflect method, but the Interface method will return\n\t// the underlying embedded message type.\n\tif m == nil {\n\t\treturn nil\n\t}\n\tsrc := m.ProtoReflect()\n\tif !src.IsValid() {\n\t\treturn src.Type().Zero().Interface()\n\t}\n\tdst := src.New()\n\tmergeOptions{}.mergeMessage(dst, src)\n\treturn dst.Interface()\n}\n\n// CloneOf returns a deep copy of m. If the top-level message is invalid,\n// it returns an invalid message as well.\nfunc CloneOf[M Message](m M) M {\n\treturn Clone(m).(M)\n}\n\n// mergeOptions provides a namespace for merge functions, and can be\n// exported in the future if we add user-visible merge options.\ntype mergeOptions struct{}\n\nfunc (o mergeOptions) mergeMessage(dst, src protoreflect.Message) {\n\tmethods := protoMethods(dst)\n\tif methods != nil && methods.Merge != nil {\n\t\tin := protoiface.MergeInput{\n\t\t\tDestination: dst,\n\t\t\tSource:      src,\n\t\t}\n\t\tout := methods.Merge(in)\n\t\tif out.Flags&protoiface.MergeComplete != 0 {\n\t\t\treturn\n\t\t}\n\t}\n\n\tif !dst.IsValid() {\n\t\tpanic(fmt.Sprintf(\"cannot merge into invalid %v message\", dst.Descriptor().FullName()))\n\t}\n\n\tsrc.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tswitch {\n\t\tcase fd.IsList():\n\t\t\to.mergeList(dst.Mutable(fd).List(), v.List(), fd)\n\t\tcase fd.IsMap():\n\t\t\to.mergeMap(dst.Mutable(fd).Map(), v.Map(), fd.MapValue())\n\t\tcase fd.Message() != nil:\n\t\t\to.mergeMessage(dst.Mutable(fd).Message(), v.Message())\n\t\tcase fd.Kind() == protoreflect.BytesKind:\n\t\t\tdst.Set(fd, o.cloneBytes(v))\n\t\tdefault:\n\t\t\tdst.Set(fd, v)\n\t\t}\n\t\treturn true\n\t})\n\n\tif len(src.GetUnknown()) > 0 {\n\t\tdst.SetUnknown(append(dst.GetUnknown(), src.GetUnknown()...))\n\t}\n}\n\nfunc (o mergeOptions) mergeList(dst, src protoreflect.List, fd protoreflect.FieldDescriptor) {\n\t// Merge semantics appends to the end of the existing list.\n\tfor i, n := 0, src.Len(); i < n; i++ {\n\t\tswitch v := src.Get(i); {\n\t\tcase fd.Message() != nil:\n\t\t\tdstv := dst.NewElement()\n\t\t\to.mergeMessage(dstv.Message(), v.Message())\n\t\t\tdst.Append(dstv)\n\t\tcase fd.Kind() == protoreflect.BytesKind:\n\t\t\tdst.Append(o.cloneBytes(v))\n\t\tdefault:\n\t\t\tdst.Append(v)\n\t\t}\n\t}\n}\n\nfunc (o mergeOptions) mergeMap(dst, src protoreflect.Map, fd protoreflect.FieldDescriptor) {\n\t// Merge semantics replaces, rather than merges into existing entries.\n\tsrc.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {\n\t\tswitch {\n\t\tcase fd.Message() != nil:\n\t\t\tdstv := dst.NewValue()\n\t\t\to.mergeMessage(dstv.Message(), v.Message())\n\t\t\tdst.Set(k, dstv)\n\t\tcase fd.Kind() == protoreflect.BytesKind:\n\t\t\tdst.Set(k, o.cloneBytes(v))\n\t\tdefault:\n\t\t\tdst.Set(k, v)\n\t\t}\n\t\treturn true\n\t})\n}\n\nfunc (o mergeOptions) cloneBytes(v protoreflect.Value) protoreflect.Value {\n\treturn protoreflect.ValueOfBytes(append([]byte{}, v.Bytes()...))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/messageset.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/order\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n)\n\nfunc (o MarshalOptions) sizeMessageSet(m protoreflect.Message) (size int) {\n\tm.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tsize += messageset.SizeField(fd.Number())\n\t\tsize += protowire.SizeTag(messageset.FieldMessage)\n\t\tsize += protowire.SizeBytes(o.size(v.Message()))\n\t\treturn true\n\t})\n\tsize += messageset.SizeUnknown(m.GetUnknown())\n\treturn size\n}\n\nfunc (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]byte, error) {\n\tif !flags.ProtoLegacy {\n\t\treturn b, errors.New(\"no support for message_set_wire_format\")\n\t}\n\tfieldOrder := order.AnyFieldOrder\n\tif o.Deterministic {\n\t\tfieldOrder = order.NumberFieldOrder\n\t}\n\tvar err error\n\torder.RangeFields(m, fieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tb, err = o.marshalMessageSetField(b, fd, v)\n\t\treturn err == nil\n\t})\n\tif err != nil {\n\t\treturn b, err\n\t}\n\treturn messageset.AppendUnknown(b, m.GetUnknown())\n}\n\nfunc (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) {\n\tb = messageset.AppendFieldStart(b, fd.Number())\n\tb = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType)\n\tcalculatedSize := o.Size(value.Message().Interface())\n\tb = protowire.AppendVarint(b, uint64(calculatedSize))\n\tbefore := len(b)\n\tb, err := o.marshalMessage(b, value.Message())\n\tif err != nil {\n\t\treturn b, err\n\t}\n\tif measuredSize := len(b) - before; calculatedSize != measuredSize {\n\t\treturn nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize)\n\t}\n\tb = messageset.AppendFieldEnd(b)\n\treturn b, nil\n}\n\nfunc (o UnmarshalOptions) unmarshalMessageSet(b []byte, m protoreflect.Message) error {\n\tif !flags.ProtoLegacy {\n\t\treturn errors.New(\"no support for message_set_wire_format\")\n\t}\n\treturn messageset.Unmarshal(b, false, func(num protowire.Number, v []byte) error {\n\t\terr := o.unmarshalMessageSetField(m, num, v)\n\t\tif err == errUnknown {\n\t\t\tunknown := m.GetUnknown()\n\t\t\tunknown = protowire.AppendTag(unknown, num, protowire.BytesType)\n\t\t\tunknown = protowire.AppendBytes(unknown, v)\n\t\t\tm.SetUnknown(unknown)\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t})\n}\n\nfunc (o UnmarshalOptions) unmarshalMessageSetField(m protoreflect.Message, num protowire.Number, v []byte) error {\n\tmd := m.Descriptor()\n\tif !md.ExtensionRanges().Has(num) {\n\t\treturn errUnknown\n\t}\n\txt, err := o.Resolver.FindExtensionByNumber(md.FullName(), num)\n\tif err == protoregistry.NotFound {\n\t\treturn errUnknown\n\t}\n\tif err != nil {\n\t\treturn errors.New(\"%v: unable to resolve extension %v: %v\", md.FullName(), num, err)\n\t}\n\txd := xt.TypeDescriptor()\n\tif err := o.unmarshalMessage(v, m.Mutable(xd).Message()); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/proto.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// Message is the top-level interface that all messages must implement.\n// It provides access to a reflective view of a message.\n// Any implementation of this interface may be used with all functions in the\n// protobuf module that accept a Message, except where otherwise specified.\n//\n// This is the v2 interface definition for protobuf messages.\n// The v1 interface definition is [github.com/golang/protobuf/proto.Message].\n//\n//   - To convert a v1 message to a v2 message,\n//     use [google.golang.org/protobuf/protoadapt.MessageV2Of].\n//   - To convert a v2 message to a v1 message,\n//     use [google.golang.org/protobuf/protoadapt.MessageV1Of].\ntype Message = protoreflect.ProtoMessage\n\n// Error matches all errors produced by packages in the protobuf module\n// according to [errors.Is].\n//\n// Example usage:\n//\n//\tif errors.Is(err, proto.Error) { ... }\nvar Error error\n\nfunc init() {\n\tError = errors.Error\n}\n\n// MessageName returns the full name of m.\n// If m is nil, it returns an empty string.\nfunc MessageName(m Message) protoreflect.FullName {\n\tif m == nil {\n\t\treturn \"\"\n\t}\n\treturn m.ProtoReflect().Descriptor().FullName()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/proto_methods.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// The protoreflect build tag disables use of fast-path methods.\n//go:build !protoreflect\n// +build !protoreflect\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nconst hasProtoMethods = true\n\nfunc protoMethods(m protoreflect.Message) *protoiface.Methods {\n\treturn m.ProtoMethods()\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/proto_reflect.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// The protoreflect build tag disables use of fast-path methods.\n//go:build protoreflect\n// +build protoreflect\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\nconst hasProtoMethods = false\n\nfunc protoMethods(m protoreflect.Message) *protoiface.Methods {\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/reset.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"fmt\"\n\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// Reset clears every field in the message.\n// The resulting message shares no observable memory with its previous state\n// other than the memory for the message itself.\nfunc Reset(m Message) {\n\tif mr, ok := m.(interface{ Reset() }); ok && hasProtoMethods {\n\t\tmr.Reset()\n\t\treturn\n\t}\n\tresetMessage(m.ProtoReflect())\n}\n\nfunc resetMessage(m protoreflect.Message) {\n\tif !m.IsValid() {\n\t\tpanic(fmt.Sprintf(\"cannot reset invalid %v message\", m.Descriptor().FullName()))\n\t}\n\n\t// Clear all known fields.\n\tfds := m.Descriptor().Fields()\n\tfor i := 0; i < fds.Len(); i++ {\n\t\tm.Clear(fds.Get(i))\n\t}\n\n\t// Clear extension fields.\n\tm.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool {\n\t\tm.Clear(fd)\n\t\treturn true\n\t})\n\n\t// Clear unknown fields.\n\tm.SetUnknown(nil)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/size.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n)\n\n// Size returns the size in bytes of the wire-format encoding of m.\n//\n// Note that Size might return more bytes than Marshal will write in the case of\n// lazily decoded messages that arrive in non-minimal wire format: see\n// https://protobuf.dev/reference/go/size/ for more details.\nfunc Size(m Message) int {\n\treturn MarshalOptions{}.Size(m)\n}\n\n// Size returns the size in bytes of the wire-format encoding of m.\n//\n// Note that Size might return more bytes than Marshal will write in the case of\n// lazily decoded messages that arrive in non-minimal wire format: see\n// https://protobuf.dev/reference/go/size/ for more details.\nfunc (o MarshalOptions) Size(m Message) int {\n\t// Treat a nil message interface as an empty message; nothing to output.\n\tif m == nil {\n\t\treturn 0\n\t}\n\n\treturn o.size(m.ProtoReflect())\n}\n\n// size is a centralized function that all size operations go through.\n// For profiling purposes, avoid changing the name of this function or\n// introducing other code paths for size that do not go through this.\nfunc (o MarshalOptions) size(m protoreflect.Message) (size int) {\n\tmethods := protoMethods(m)\n\tif methods != nil && methods.Size != nil {\n\t\tout := methods.Size(protoiface.SizeInput{\n\t\t\tMessage: m,\n\t\t\tFlags:   o.flags(),\n\t\t})\n\t\treturn out.Size\n\t}\n\tif methods != nil && methods.Marshal != nil {\n\t\t// This is not efficient, but we don't have any choice.\n\t\t// This case is mainly used for legacy types with a Marshal method.\n\t\tout, _ := methods.Marshal(protoiface.MarshalInput{\n\t\t\tMessage: m,\n\t\t\tFlags:   o.flags(),\n\t\t})\n\t\treturn len(out.Buf)\n\t}\n\treturn o.sizeMessageSlow(m)\n}\n\nfunc (o MarshalOptions) sizeMessageSlow(m protoreflect.Message) (size int) {\n\tif messageset.IsMessageSet(m.Descriptor()) {\n\t\treturn o.sizeMessageSet(m)\n\t}\n\tm.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {\n\t\tsize += o.sizeField(fd, v)\n\t\treturn true\n\t})\n\tsize += len(m.GetUnknown())\n\treturn size\n}\n\nfunc (o MarshalOptions) sizeField(fd protoreflect.FieldDescriptor, value protoreflect.Value) (size int) {\n\tnum := fd.Number()\n\tswitch {\n\tcase fd.IsList():\n\t\treturn o.sizeList(num, fd, value.List())\n\tcase fd.IsMap():\n\t\treturn o.sizeMap(num, fd, value.Map())\n\tdefault:\n\t\treturn protowire.SizeTag(num) + o.sizeSingular(num, fd.Kind(), value)\n\t}\n}\n\nfunc (o MarshalOptions) sizeList(num protowire.Number, fd protoreflect.FieldDescriptor, list protoreflect.List) (size int) {\n\tsizeTag := protowire.SizeTag(num)\n\n\tif fd.IsPacked() && list.Len() > 0 {\n\t\tcontent := 0\n\t\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\t\tcontent += o.sizeSingular(num, fd.Kind(), list.Get(i))\n\t\t}\n\t\treturn sizeTag + protowire.SizeBytes(content)\n\t}\n\n\tfor i, llen := 0, list.Len(); i < llen; i++ {\n\t\tsize += sizeTag + o.sizeSingular(num, fd.Kind(), list.Get(i))\n\t}\n\treturn size\n}\n\nfunc (o MarshalOptions) sizeMap(num protowire.Number, fd protoreflect.FieldDescriptor, mapv protoreflect.Map) (size int) {\n\tsizeTag := protowire.SizeTag(num)\n\n\tmapv.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool {\n\t\tsize += sizeTag\n\t\tsize += protowire.SizeBytes(o.sizeField(fd.MapKey(), key.Value()) + o.sizeField(fd.MapValue(), value))\n\t\treturn true\n\t})\n\treturn size\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/size_gen.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-types. DO NOT EDIT.\n\npackage proto\n\nimport (\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\nfunc (o MarshalOptions) sizeSingular(num protowire.Number, kind protoreflect.Kind, v protoreflect.Value) int {\n\tswitch kind {\n\tcase protoreflect.BoolKind:\n\t\treturn protowire.SizeVarint(protowire.EncodeBool(v.Bool()))\n\tcase protoreflect.EnumKind:\n\t\treturn protowire.SizeVarint(uint64(v.Enum()))\n\tcase protoreflect.Int32Kind:\n\t\treturn protowire.SizeVarint(uint64(int32(v.Int())))\n\tcase protoreflect.Sint32Kind:\n\t\treturn protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int()))))\n\tcase protoreflect.Uint32Kind:\n\t\treturn protowire.SizeVarint(uint64(uint32(v.Uint())))\n\tcase protoreflect.Int64Kind:\n\t\treturn protowire.SizeVarint(uint64(v.Int()))\n\tcase protoreflect.Sint64Kind:\n\t\treturn protowire.SizeVarint(protowire.EncodeZigZag(v.Int()))\n\tcase protoreflect.Uint64Kind:\n\t\treturn protowire.SizeVarint(v.Uint())\n\tcase protoreflect.Sfixed32Kind:\n\t\treturn protowire.SizeFixed32()\n\tcase protoreflect.Fixed32Kind:\n\t\treturn protowire.SizeFixed32()\n\tcase protoreflect.FloatKind:\n\t\treturn protowire.SizeFixed32()\n\tcase protoreflect.Sfixed64Kind:\n\t\treturn protowire.SizeFixed64()\n\tcase protoreflect.Fixed64Kind:\n\t\treturn protowire.SizeFixed64()\n\tcase protoreflect.DoubleKind:\n\t\treturn protowire.SizeFixed64()\n\tcase protoreflect.StringKind:\n\t\treturn protowire.SizeBytes(len(v.String()))\n\tcase protoreflect.BytesKind:\n\t\treturn protowire.SizeBytes(len(v.Bytes()))\n\tcase protoreflect.MessageKind:\n\t\treturn protowire.SizeBytes(o.size(v.Message()))\n\tcase protoreflect.GroupKind:\n\t\treturn protowire.SizeGroup(num, o.size(v.Message()))\n\tdefault:\n\t\treturn 0\n\t}\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/wrapperopaque.go",
    "content": "// Copyright 2024 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\n// ValueOrNil returns nil if has is false, or a pointer to a new variable\n// containing the value returned by the specified getter.\n//\n// This function is similar to the wrappers (proto.Int32(), proto.String(),\n// etc.), but is generic (works for any field type) and works with the hasser\n// and getter of a field, as opposed to a value.\n//\n// This is convenient when populating builder fields.\n//\n// Example:\n//\n//\thop := attr.GetDirectHop()\n//\tinjectedRoute := ripb.InjectedRoute_builder{\n//\t  Prefixes: route.GetPrefixes(),\n//\t  NextHop:  proto.ValueOrNil(hop.HasAddress(), hop.GetAddress),\n//\t}\nfunc ValueOrNil[T any](has bool, getter func() T) *T {\n\tif !has {\n\t\treturn nil\n\t}\n\tv := getter()\n\treturn &v\n}\n\n// ValueOrDefault returns the protobuf message val if val is not nil, otherwise\n// it returns a pointer to an empty val message.\n//\n// This function allows for translating code from the old Open Struct API to the\n// new Opaque API.\n//\n// The old Open Struct API represented oneof fields with a wrapper struct:\n//\n//\tvar signedImg *accountpb.SignedImage\n//\tprofile := &accountpb.Profile{\n//\t\t// The Avatar oneof will be set, with an empty SignedImage.\n//\t\tAvatar: &accountpb.Profile_SignedImage{signedImg},\n//\t}\n//\n// The new Opaque API treats oneof fields like regular fields, there are no more\n// wrapper structs:\n//\n//\tvar signedImg *accountpb.SignedImage\n//\tprofile := &accountpb.Profile{}\n//\tprofile.SetSignedImage(signedImg)\n//\n// For convenience, the Opaque API also offers Builders, which allow for a\n// direct translation of struct initialization. However, because Builders use\n// nilness to represent field presence (but there is no non-nil wrapper struct\n// anymore), Builders cannot distinguish between an unset oneof and a set oneof\n// with nil message. The above code would need to be translated with help of the\n// ValueOrDefault function to retain the same behavior:\n//\n//\tvar signedImg *accountpb.SignedImage\n//\treturn &accountpb.Profile_builder{\n//\t\tSignedImage: proto.ValueOrDefault(signedImg),\n//\t}.Build()\nfunc ValueOrDefault[T interface {\n\t*P\n\tMessage\n}, P any](val T) T {\n\tif val == nil {\n\t\treturn T(new(P))\n\t}\n\treturn val\n}\n\n// ValueOrDefaultBytes is like ValueOrDefault but for working with fields of\n// type []byte.\nfunc ValueOrDefaultBytes(val []byte) []byte {\n\tif val == nil {\n\t\treturn []byte{}\n\t}\n\treturn val\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/proto/wrappers.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage proto\n\n// Bool stores v in a new bool value and returns a pointer to it.\nfunc Bool(v bool) *bool { return &v }\n\n// Int32 stores v in a new int32 value and returns a pointer to it.\nfunc Int32(v int32) *int32 { return &v }\n\n// Int64 stores v in a new int64 value and returns a pointer to it.\nfunc Int64(v int64) *int64 { return &v }\n\n// Float32 stores v in a new float32 value and returns a pointer to it.\nfunc Float32(v float32) *float32 { return &v }\n\n// Float64 stores v in a new float64 value and returns a pointer to it.\nfunc Float64(v float64) *float64 { return &v }\n\n// Uint32 stores v in a new uint32 value and returns a pointer to it.\nfunc Uint32(v uint32) *uint32 { return &v }\n\n// Uint64 stores v in a new uint64 value and returns a pointer to it.\nfunc Uint64(v uint64) *uint64 { return &v }\n\n// String stores v in a new string value and returns a pointer to it.\nfunc String(v string) *string { return &v }\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/protoadapt/convert.go",
    "content": "// Copyright 2023 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protoadapt bridges the original and new proto APIs.\npackage protoadapt\n\nimport (\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/runtime/protoiface\"\n\t\"google.golang.org/protobuf/runtime/protoimpl\"\n)\n\n// MessageV1 is the original [github.com/golang/protobuf/proto.Message] type.\ntype MessageV1 = protoiface.MessageV1\n\n// MessageV2 is the [google.golang.org/protobuf/proto.Message] type used by the\n// current [google.golang.org/protobuf] module, adding support for reflection.\ntype MessageV2 = proto.Message\n\n// MessageV1Of converts a v2 message to a v1 message.\n// It returns nil if m is nil.\nfunc MessageV1Of(m MessageV2) MessageV1 {\n\treturn protoimpl.X.ProtoMessageV1Of(m)\n}\n\n// MessageV2Of converts a v1 message to a v2 message.\n// It returns nil if m is nil.\nfunc MessageV2Of(m MessageV1) MessageV2 {\n\treturn protoimpl.X.ProtoMessageV2Of(m)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/desc.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protodesc provides functionality for converting\n// FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values.\n//\n// The google.protobuf.FileDescriptorProto is a protobuf message that describes\n// the type information for a .proto file in a form that is easily serializable.\n// The [protoreflect.FileDescriptor] is a more structured representation of\n// the FileDescriptorProto message where references and remote dependencies\n// can be directly followed.\npackage protodesc\n\nimport (\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/internal/editionssupport\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n// Resolver is the resolver used by [NewFile] to resolve dependencies.\n// The enums and messages provided must belong to some parent file,\n// which is also registered.\n//\n// It is implemented by [protoregistry.Files].\ntype Resolver interface {\n\tFindFileByPath(string) (protoreflect.FileDescriptor, error)\n\tFindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error)\n}\n\n// FileOptions configures the construction of file descriptors.\ntype FileOptions struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// AllowUnresolvable configures New to permissively allow unresolvable\n\t// file, enum, or message dependencies. Unresolved dependencies are replaced\n\t// by placeholder equivalents.\n\t//\n\t// The following dependencies may be left unresolved:\n\t//\t• Resolving an imported file.\n\t//\t• Resolving the type for a message field or extension field.\n\t//\tIf the kind of the field is unknown, then a placeholder is used for both\n\t//\tthe Enum and Message accessors on the protoreflect.FieldDescriptor.\n\t//\t• Resolving an enum value set as the default for an optional enum field.\n\t//\tIf unresolvable, the protoreflect.FieldDescriptor.Default is set to the\n\t//\tfirst value in the associated enum (or zero if the also enum dependency\n\t//\tis also unresolvable). The protoreflect.FieldDescriptor.DefaultEnumValue\n\t//\tis populated with a placeholder.\n\t//\t• Resolving the extended message type for an extension field.\n\t//\t• Resolving the input or output message type for a service method.\n\t//\n\t// If the unresolved dependency uses a relative name,\n\t// then the placeholder will contain an invalid FullName with a \"*.\" prefix,\n\t// indicating that the starting prefix of the full name is unknown.\n\tAllowUnresolvable bool\n}\n\n// NewFile creates a new [protoreflect.FileDescriptor] from the provided\n// file descriptor message. See [FileOptions.New] for more information.\nfunc NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) {\n\treturn FileOptions{}.New(fd, r)\n}\n\n// NewFiles creates a new [protoregistry.Files] from the provided\n// FileDescriptorSet message. See [FileOptions.NewFiles] for more information.\nfunc NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) {\n\treturn FileOptions{}.NewFiles(fd)\n}\n\n// New creates a new [protoreflect.FileDescriptor] from the provided\n// file descriptor message. The file must represent a valid proto file according\n// to protobuf semantics. The returned descriptor is a deep copy of the input.\n//\n// Any imported files, enum types, or message types referenced in the file are\n// resolved using the provided registry. When looking up an import file path,\n// the path must be unique. The newly created file descriptor is not registered\n// back into the provided file registry.\nfunc (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) {\n\tif r == nil {\n\t\tr = (*protoregistry.Files)(nil) // empty resolver\n\t}\n\n\t// Handle the file descriptor content.\n\tf := &filedesc.File{L2: &filedesc.FileL2{}}\n\tswitch fd.GetSyntax() {\n\tcase \"proto2\", \"\":\n\t\tf.L1.Syntax = protoreflect.Proto2\n\t\tf.L1.Edition = filedesc.EditionProto2\n\tcase \"proto3\":\n\t\tf.L1.Syntax = protoreflect.Proto3\n\t\tf.L1.Edition = filedesc.EditionProto3\n\tcase \"editions\":\n\t\tf.L1.Syntax = protoreflect.Editions\n\t\tf.L1.Edition = fromEditionProto(fd.GetEdition())\n\tdefault:\n\t\treturn nil, errors.New(\"invalid syntax: %q\", fd.GetSyntax())\n\t}\n\tf.L1.Path = fd.GetName()\n\tif f.L1.Path == \"\" {\n\t\treturn nil, errors.New(\"file path must be populated\")\n\t}\n\tif f.L1.Syntax == protoreflect.Editions &&\n\t\t(fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) &&\n\t\tfd.GetEdition() != descriptorpb.Edition_EDITION_UNSTABLE {\n\t\t// Allow cmd/protoc-gen-go/testdata to use any edition for easier\n\t\t// testing of upcoming edition features.\n\t\tif !strings.HasPrefix(fd.GetName(), \"cmd/protoc-gen-go/testdata/\") {\n\t\t\treturn nil, errors.New(\"use of edition %v not yet supported by the Go Protobuf runtime\", fd.GetEdition())\n\t\t}\n\t}\n\tf.L1.Package = protoreflect.FullName(fd.GetPackage())\n\tif !f.L1.Package.IsValid() && f.L1.Package != \"\" {\n\t\treturn nil, errors.New(\"invalid package: %q\", f.L1.Package)\n\t}\n\tif opts := fd.GetOptions(); opts != nil {\n\t\topts = proto.Clone(opts).(*descriptorpb.FileOptions)\n\t\tf.L2.Options = func() protoreflect.ProtoMessage { return opts }\n\t}\n\tinitFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures())\n\n\tf.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency()))\n\tfor _, i := range fd.GetPublicDependency() {\n\t\tif !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsPublic {\n\t\t\treturn nil, errors.New(\"invalid or duplicate public import index: %d\", i)\n\t\t}\n\t\tf.L2.Imports[i].IsPublic = true\n\t}\n\timps := importSet{f.Path(): true}\n\tfor i, path := range fd.GetDependency() {\n\t\timp := &f.L2.Imports[i]\n\t\tf, err := r.FindFileByPath(path)\n\t\tif err == protoregistry.NotFound && o.AllowUnresolvable {\n\t\t\tf = filedesc.PlaceholderFile(path)\n\t\t} else if err != nil {\n\t\t\treturn nil, errors.New(\"could not resolve import %q: %v\", path, err)\n\t\t}\n\t\timp.FileDescriptor = f\n\n\t\tif imps[imp.Path()] {\n\t\t\treturn nil, errors.New(\"already imported %q\", path)\n\t\t}\n\t\timps[imp.Path()] = true\n\t}\n\tfor i := range fd.GetDependency() {\n\t\timp := &f.L2.Imports[i]\n\t\timps.importPublic(imp.Imports())\n\t}\n\toptionImps := importSet{f.Path(): true}\n\tif len(fd.GetOptionDependency()) > 0 {\n\t\toptionImports := make(filedesc.FileImports, len(fd.GetOptionDependency()))\n\t\tfor i, path := range fd.GetOptionDependency() {\n\t\t\timp := &optionImports[i]\n\t\t\tf, err := r.FindFileByPath(path)\n\t\t\tif err == protoregistry.NotFound {\n\t\t\t\t// We always allow option imports to be unresolvable.\n\t\t\t\tf = filedesc.PlaceholderFile(path)\n\t\t\t} else if err != nil {\n\t\t\t\treturn nil, errors.New(\"could not resolve import %q: %v\", path, err)\n\t\t\t}\n\t\t\timp.FileDescriptor = f\n\n\t\t\tif imps[imp.Path()] || optionImps[imp.Path()] {\n\t\t\t\treturn nil, errors.New(\"already imported %q\", path)\n\t\t\t}\n\t\t\t// This needs to be a separate map so that we don't recognize non-options\n\t\t\t// symbols coming from option imports.\n\t\t\toptionImps[imp.Path()] = true\n\t\t}\n\t\tf.L2.OptionImports = func() protoreflect.FileImports {\n\t\t\treturn &optionImports\n\t\t}\n\t}\n\n\t// Handle source locations.\n\tf.L2.Locations.File = f\n\tfor _, loc := range fd.GetSourceCodeInfo().GetLocation() {\n\t\tvar l protoreflect.SourceLocation\n\t\t// TODO: Validate that the path points to an actual declaration?\n\t\tl.Path = protoreflect.SourcePath(loc.GetPath())\n\t\ts := loc.GetSpan()\n\t\tswitch len(s) {\n\t\tcase 3:\n\t\t\tl.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[0]), int(s[2])\n\t\tcase 4:\n\t\t\tl.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[2]), int(s[3])\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"invalid span: %v\", s)\n\t\t}\n\t\t// TODO: Validate that the span information is sensible?\n\t\t// See https://github.com/protocolbuffers/protobuf/issues/6378.\n\t\tif false && (l.EndLine < l.StartLine || l.StartLine < 0 || l.StartColumn < 0 || l.EndColumn < 0 ||\n\t\t\t(l.StartLine == l.EndLine && l.EndColumn <= l.StartColumn)) {\n\t\t\treturn nil, errors.New(\"invalid span: %v\", s)\n\t\t}\n\t\tl.LeadingDetachedComments = loc.GetLeadingDetachedComments()\n\t\tl.LeadingComments = loc.GetLeadingComments()\n\t\tl.TrailingComments = loc.GetTrailingComments()\n\t\tf.L2.Locations.List = append(f.L2.Locations.List, l)\n\t}\n\n\t// Step 1: Allocate and derive the names for all declarations.\n\t// This copies all fields from the descriptor proto except:\n\t//\tgoogle.protobuf.FieldDescriptorProto.type_name\n\t//\tgoogle.protobuf.FieldDescriptorProto.default_value\n\t//\tgoogle.protobuf.FieldDescriptorProto.oneof_index\n\t//\tgoogle.protobuf.FieldDescriptorProto.extendee\n\t//\tgoogle.protobuf.MethodDescriptorProto.input\n\t//\tgoogle.protobuf.MethodDescriptorProto.output\n\tvar err error\n\tsb := new(strs.Builder)\n\tr1 := make(descsByName)\n\tif f.L1.Enums.List, err = r1.initEnumDeclarations(fd.GetEnumType(), f, sb); err != nil {\n\t\treturn nil, err\n\t}\n\tif f.L1.Messages.List, err = r1.initMessagesDeclarations(fd.GetMessageType(), f, sb); err != nil {\n\t\treturn nil, err\n\t}\n\tif f.L1.Extensions.List, err = r1.initExtensionDeclarations(fd.GetExtension(), f, sb); err != nil {\n\t\treturn nil, err\n\t}\n\tif f.L1.Services.List, err = r1.initServiceDeclarations(fd.GetService(), f, sb); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Step 2: Resolve every dependency reference not handled by step 1.\n\tr2 := &resolver{local: r1, remote: r, imports: imps, allowUnresolvable: o.AllowUnresolvable}\n\tif err := r2.resolveMessageDependencies(f.L1.Messages.List, fd.GetMessageType()); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := r2.resolveExtensionDependencies(f.L1.Extensions.List, fd.GetExtension()); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := r2.resolveServiceDependencies(f.L1.Services.List, fd.GetService()); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Step 3: Validate every enum, message, and extension declaration.\n\tif err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := validateMessageDeclarations(f, f.L1.Messages.List, fd.GetMessageType()); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := validateExtensionDeclarations(f, f.L1.Extensions.List, fd.GetExtension()); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn f, nil\n}\n\ntype importSet map[string]bool\n\nfunc (is importSet) importPublic(imps protoreflect.FileImports) {\n\tfor i := 0; i < imps.Len(); i++ {\n\t\tif imp := imps.Get(i); imp.IsPublic {\n\t\t\tis[imp.Path()] = true\n\t\t\tis.importPublic(imp.Imports())\n\t\t}\n\t}\n}\n\n// NewFiles creates a new [protoregistry.Files] from the provided\n// FileDescriptorSet message. The descriptor set must include only\n// valid files according to protobuf semantics. The returned descriptors\n// are a deep copy of the input.\nfunc (o FileOptions) NewFiles(fds *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) {\n\tfiles := make(map[string]*descriptorpb.FileDescriptorProto)\n\tfor _, fd := range fds.File {\n\t\tif _, ok := files[fd.GetName()]; ok {\n\t\t\treturn nil, errors.New(\"file appears multiple times: %q\", fd.GetName())\n\t\t}\n\t\tfiles[fd.GetName()] = fd\n\t}\n\tr := &protoregistry.Files{}\n\tfor _, fd := range files {\n\t\tif err := o.addFileDeps(r, fd, files); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn r, nil\n}\nfunc (o FileOptions) addFileDeps(r *protoregistry.Files, fd *descriptorpb.FileDescriptorProto, files map[string]*descriptorpb.FileDescriptorProto) error {\n\t// Set the entry to nil while descending into a file's dependencies to detect cycles.\n\tfiles[fd.GetName()] = nil\n\tfor _, dep := range fd.Dependency {\n\t\tdepfd, ok := files[dep]\n\t\tif depfd == nil {\n\t\t\tif ok {\n\t\t\t\treturn errors.New(\"import cycle in file: %q\", dep)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif err := o.addFileDeps(r, depfd, files); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\t// Delete the entry once dependencies are processed.\n\tdelete(files, fd.GetName())\n\tf, err := o.New(fd, r)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn r.RegisterFile(f)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protodesc\n\nimport (\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\ntype descsByName map[protoreflect.FullName]protoreflect.Descriptor\n\nfunc (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (es []filedesc.Enum, err error) {\n\tes = make([]filedesc.Enum, len(eds)) // allocate up-front to ensure stable pointers\n\tfor i, ed := range eds {\n\t\te := &es[i]\n\t\te.L2 = new(filedesc.EnumL2)\n\t\tif e.L0, err = r.makeBase(e, parent, ed.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif opts := ed.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.EnumOptions)\n\t\t\te.L2.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t}\n\t\te.L1.EditionFeatures = mergeEditionFeatures(parent, ed.GetOptions().GetFeatures())\n\t\te.L1.Visibility = int32(ed.GetVisibility())\n\t\tfor _, s := range ed.GetReservedName() {\n\t\t\te.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s))\n\t\t}\n\t\tfor _, rr := range ed.GetReservedRange() {\n\t\t\te.L2.ReservedRanges.List = append(e.L2.ReservedRanges.List, [2]protoreflect.EnumNumber{\n\t\t\t\tprotoreflect.EnumNumber(rr.GetStart()),\n\t\t\t\tprotoreflect.EnumNumber(rr.GetEnd()),\n\t\t\t})\n\t\t}\n\t\tif e.L2.Values.List, err = r.initEnumValuesFromDescriptorProto(ed.GetValue(), e, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn es, nil\n}\n\nfunc (r descsByName) initEnumValuesFromDescriptorProto(vds []*descriptorpb.EnumValueDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (vs []filedesc.EnumValue, err error) {\n\tvs = make([]filedesc.EnumValue, len(vds)) // allocate up-front to ensure stable pointers\n\tfor i, vd := range vds {\n\t\tv := &vs[i]\n\t\tif v.L0, err = r.makeBase(v, parent, vd.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif opts := vd.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.EnumValueOptions)\n\t\t\tv.L1.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t}\n\t\tv.L1.Number = protoreflect.EnumNumber(vd.GetNumber())\n\t}\n\treturn vs, nil\n}\n\nfunc (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Message, err error) {\n\tms = make([]filedesc.Message, len(mds)) // allocate up-front to ensure stable pointers\n\tfor i, md := range mds {\n\t\tm := &ms[i]\n\t\tm.L2 = new(filedesc.MessageL2)\n\t\tif m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tm.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures())\n\t\tm.L1.Visibility = int32(md.GetVisibility())\n\t\tif opts := md.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.MessageOptions)\n\t\t\tm.L2.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t\tm.L1.IsMapEntry = opts.GetMapEntry()\n\t\t\tm.L1.IsMessageSet = opts.GetMessageSetWireFormat()\n\t\t}\n\t\tfor _, s := range md.GetReservedName() {\n\t\t\tm.L2.ReservedNames.List = append(m.L2.ReservedNames.List, protoreflect.Name(s))\n\t\t}\n\t\tfor _, rr := range md.GetReservedRange() {\n\t\t\tm.L2.ReservedRanges.List = append(m.L2.ReservedRanges.List, [2]protoreflect.FieldNumber{\n\t\t\t\tprotoreflect.FieldNumber(rr.GetStart()),\n\t\t\t\tprotoreflect.FieldNumber(rr.GetEnd()),\n\t\t\t})\n\t\t}\n\t\tfor _, xr := range md.GetExtensionRange() {\n\t\t\tm.L2.ExtensionRanges.List = append(m.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{\n\t\t\t\tprotoreflect.FieldNumber(xr.GetStart()),\n\t\t\t\tprotoreflect.FieldNumber(xr.GetEnd()),\n\t\t\t})\n\t\t\tvar optsFunc func() protoreflect.ProtoMessage\n\t\t\tif opts := xr.GetOptions(); opts != nil {\n\t\t\t\topts = proto.Clone(opts).(*descriptorpb.ExtensionRangeOptions)\n\t\t\t\toptsFunc = func() protoreflect.ProtoMessage { return opts }\n\t\t\t}\n\t\t\tm.L2.ExtensionRangeOptions = append(m.L2.ExtensionRangeOptions, optsFunc)\n\t\t}\n\t\tif m.L2.Fields.List, err = r.initFieldsFromDescriptorProto(md.GetField(), m, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif m.L2.Oneofs.List, err = r.initOneofsFromDescriptorProto(md.GetOneofDecl(), m, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif m.L1.Enums.List, err = r.initEnumDeclarations(md.GetEnumType(), m, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif m.L1.Messages.List, err = r.initMessagesDeclarations(md.GetNestedType(), m, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif m.L1.Extensions.List, err = r.initExtensionDeclarations(md.GetExtension(), m, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn ms, nil\n}\n\n// canBePacked returns whether the field can use packed encoding:\n// https://protobuf.dev/programming-guides/encoding/#packed\nfunc canBePacked(fd *descriptorpb.FieldDescriptorProto) bool {\n\tif fd.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED {\n\t\treturn false // not a repeated field\n\t}\n\n\tswitch protoreflect.Kind(fd.GetType()) {\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn false // not a scalar type field\n\n\tcase protoreflect.StringKind, protoreflect.BytesKind:\n\t\t// string and bytes can explicitly not be declared as packed,\n\t\t// see https://protobuf.dev/programming-guides/encoding/#packed\n\t\treturn false\n\n\tdefault:\n\t\treturn true\n\t}\n}\n\nfunc (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) {\n\tfs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers\n\tfor i, fd := range fds {\n\t\tf := &fs[i]\n\t\tif f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tf.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures())\n\t\tf.L1.IsProto3Optional = fd.GetProto3Optional()\n\t\tif opts := fd.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.FieldOptions)\n\t\t\tf.L1.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t\tf.L1.IsLazy = opts.GetLazy()\n\t\t\tif opts.Packed != nil {\n\t\t\t\tf.L1.EditionFeatures.IsPacked = opts.GetPacked()\n\t\t\t}\n\t\t}\n\t\tf.L1.Number = protoreflect.FieldNumber(fd.GetNumber())\n\t\tf.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel())\n\t\tif fd.Type != nil {\n\t\t\tf.L1.Kind = protoreflect.Kind(fd.GetType())\n\t\t}\n\t\tif fd.JsonName != nil {\n\t\t\tf.L1.StringName.InitJSON(fd.GetJsonName())\n\t\t}\n\n\t\tif f.L1.EditionFeatures.IsLegacyRequired {\n\t\t\tf.L1.Cardinality = protoreflect.Required\n\t\t}\n\n\t\tif f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded {\n\t\t\tf.L1.Kind = protoreflect.GroupKind\n\t\t}\n\t}\n\treturn fs, nil\n}\n\nfunc (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (os []filedesc.Oneof, err error) {\n\tos = make([]filedesc.Oneof, len(ods)) // allocate up-front to ensure stable pointers\n\tfor i, od := range ods {\n\t\to := &os[i]\n\t\tif o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\to.L1.EditionFeatures = mergeEditionFeatures(parent, od.GetOptions().GetFeatures())\n\t\tif opts := od.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.OneofOptions)\n\t\t\to.L1.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t}\n\t}\n\treturn os, nil\n}\n\nfunc (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (xs []filedesc.Extension, err error) {\n\txs = make([]filedesc.Extension, len(xds)) // allocate up-front to ensure stable pointers\n\tfor i, xd := range xds {\n\t\tx := &xs[i]\n\t\tx.L2 = new(filedesc.ExtensionL2)\n\t\tif x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tx.L1.EditionFeatures = mergeEditionFeatures(parent, xd.GetOptions().GetFeatures())\n\t\tif opts := xd.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.FieldOptions)\n\t\t\tx.L2.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t\tif opts.Packed != nil {\n\t\t\t\tx.L1.EditionFeatures.IsPacked = opts.GetPacked()\n\t\t\t}\n\t\t}\n\t\tx.L1.Number = protoreflect.FieldNumber(xd.GetNumber())\n\t\tx.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel())\n\t\tif xd.Type != nil {\n\t\t\tx.L1.Kind = protoreflect.Kind(xd.GetType())\n\t\t}\n\t\tif xd.JsonName != nil {\n\t\t\tx.L2.StringName.InitJSON(xd.GetJsonName())\n\t\t}\n\t\tif x.L1.Kind == protoreflect.MessageKind && x.L1.EditionFeatures.IsDelimitedEncoded {\n\t\t\tx.L1.Kind = protoreflect.GroupKind\n\t\t}\n\t}\n\treturn xs, nil\n}\n\nfunc (r descsByName) initServiceDeclarations(sds []*descriptorpb.ServiceDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ss []filedesc.Service, err error) {\n\tss = make([]filedesc.Service, len(sds)) // allocate up-front to ensure stable pointers\n\tfor i, sd := range sds {\n\t\ts := &ss[i]\n\t\ts.L2 = new(filedesc.ServiceL2)\n\t\tif s.L0, err = r.makeBase(s, parent, sd.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif opts := sd.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.ServiceOptions)\n\t\t\ts.L2.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t}\n\t\tif s.L2.Methods.List, err = r.initMethodsFromDescriptorProto(sd.GetMethod(), s, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn ss, nil\n}\n\nfunc (r descsByName) initMethodsFromDescriptorProto(mds []*descriptorpb.MethodDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Method, err error) {\n\tms = make([]filedesc.Method, len(mds)) // allocate up-front to ensure stable pointers\n\tfor i, md := range mds {\n\t\tm := &ms[i]\n\t\tif m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif opts := md.GetOptions(); opts != nil {\n\t\t\topts = proto.Clone(opts).(*descriptorpb.MethodOptions)\n\t\t\tm.L1.Options = func() protoreflect.ProtoMessage { return opts }\n\t\t}\n\t\tm.L1.IsStreamingClient = md.GetClientStreaming()\n\t\tm.L1.IsStreamingServer = md.GetServerStreaming()\n\t}\n\treturn ms, nil\n}\n\nfunc (r descsByName) makeBase(child, parent protoreflect.Descriptor, name string, idx int, sb *strs.Builder) (filedesc.BaseL0, error) {\n\tif !protoreflect.Name(name).IsValid() {\n\t\treturn filedesc.BaseL0{}, errors.New(\"descriptor %q has an invalid nested name: %q\", parent.FullName(), name)\n\t}\n\n\t// Derive the full name of the child.\n\t// Note that enum values are a sibling to the enum parent in the namespace.\n\tvar fullName protoreflect.FullName\n\tif _, ok := parent.(protoreflect.EnumDescriptor); ok {\n\t\tfullName = sb.AppendFullName(parent.FullName().Parent(), protoreflect.Name(name))\n\t} else {\n\t\tfullName = sb.AppendFullName(parent.FullName(), protoreflect.Name(name))\n\t}\n\tif _, ok := r[fullName]; ok {\n\t\treturn filedesc.BaseL0{}, errors.New(\"descriptor %q already declared\", fullName)\n\t}\n\tr[fullName] = child\n\n\t// TODO: Verify that the full name does not already exist in the resolver?\n\t// This is not as critical since most usages of NewFile will register\n\t// the created file back into the registry, which will perform this check.\n\n\treturn filedesc.BaseL0{\n\t\tFullName:   fullName,\n\t\tParentFile: parent.ParentFile().(*filedesc.File),\n\t\tParent:     parent,\n\t\tIndex:      idx,\n\t}, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protodesc\n\nimport (\n\t\"google.golang.org/protobuf/internal/encoding/defval\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/reflect/protoregistry\"\n\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n// resolver is a wrapper around a local registry of declarations within the file\n// and the remote resolver. The remote resolver is restricted to only return\n// descriptors that have been imported.\ntype resolver struct {\n\tlocal   descsByName\n\tremote  Resolver\n\timports importSet\n\n\tallowUnresolvable bool\n}\n\nfunc (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) (err error) {\n\tfor i, md := range mds {\n\t\tm := &ms[i]\n\t\tfor j, fd := range md.GetField() {\n\t\t\tf := &m.L2.Fields.List[j]\n\t\t\tif f.L1.Cardinality == protoreflect.Required {\n\t\t\t\tm.L2.RequiredNumbers.List = append(m.L2.RequiredNumbers.List, f.L1.Number)\n\t\t\t}\n\t\t\tif fd.OneofIndex != nil {\n\t\t\t\tk := int(fd.GetOneofIndex())\n\t\t\t\tif !(0 <= k && k < len(md.GetOneofDecl())) {\n\t\t\t\t\treturn errors.New(\"message field %q has an invalid oneof index: %d\", f.FullName(), k)\n\t\t\t\t}\n\t\t\t\to := &m.L2.Oneofs.List[k]\n\t\t\t\tf.L1.ContainingOneof = o\n\t\t\t\to.L1.Fields.List = append(o.L1.Fields.List, f)\n\t\t\t}\n\n\t\t\tif f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName())); err != nil {\n\t\t\t\treturn errors.New(\"message field %q cannot resolve type: %v\", f.FullName(), err)\n\t\t\t}\n\t\t\tif f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) {\n\t\t\t\t// A map field might inherit delimited encoding from a file-wide default feature.\n\t\t\t\t// But maps never actually use delimited encoding. (At least for now...)\n\t\t\t\tf.L1.Kind = protoreflect.MessageKind\n\t\t\t}\n\t\t\tif fd.DefaultValue != nil {\n\t\t\t\tv, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.New(\"message field %q has invalid default: %v\", f.FullName(), err)\n\t\t\t\t}\n\t\t\t\tf.L1.Default = filedesc.DefaultValue(v, ev)\n\t\t\t}\n\t\t}\n\n\t\tif err := r.resolveMessageDependencies(m.L1.Messages.List, md.GetNestedType()); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := r.resolveExtensionDependencies(m.L1.Extensions.List, md.GetExtension()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) {\n\tfor i, xd := range xds {\n\t\tx := &xs[i]\n\t\tif x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee())); err != nil {\n\t\t\treturn errors.New(\"extension field %q cannot resolve extendee: %v\", x.FullName(), err)\n\t\t}\n\t\tif x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName())); err != nil {\n\t\t\treturn errors.New(\"extension field %q cannot resolve type: %v\", x.FullName(), err)\n\t\t}\n\t\tif xd.DefaultValue != nil {\n\t\t\tv, ev, err := unmarshalDefault(xd.GetDefaultValue(), x, r.allowUnresolvable)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"extension field %q has invalid default: %v\", x.FullName(), err)\n\t\t\t}\n\t\t\tx.L2.Default = filedesc.DefaultValue(v, ev)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*descriptorpb.ServiceDescriptorProto) (err error) {\n\tfor i, sd := range sds {\n\t\ts := &ss[i]\n\t\tfor j, md := range sd.GetMethod() {\n\t\t\tm := &s.L2.Methods.List[j]\n\t\t\tm.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()))\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"service method %q cannot resolve input: %v\", m.FullName(), err)\n\t\t\t}\n\t\t\tm.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()))\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"service method %q cannot resolve output: %v\", m.FullName(), err)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// findTarget finds an enum or message descriptor if k is an enum, message,\n// group, or unknown. If unknown, and the name could be resolved, the kind\n// returned kind is set based on the type of the resolved descriptor.\nfunc (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) {\n\tswitch k {\n\tcase protoreflect.EnumKind:\n\t\ted, err := r.findEnumDescriptor(scope, ref)\n\t\tif err != nil {\n\t\t\treturn 0, nil, nil, err\n\t\t}\n\t\treturn k, ed, nil, nil\n\tcase protoreflect.MessageKind, protoreflect.GroupKind:\n\t\tmd, err := r.findMessageDescriptor(scope, ref)\n\t\tif err != nil {\n\t\t\treturn 0, nil, nil, err\n\t\t}\n\t\treturn k, nil, md, nil\n\tcase 0:\n\t\t// Handle unspecified kinds (possible with parsers that operate\n\t\t// on a per-file basis without knowledge of dependencies).\n\t\td, err := r.findDescriptor(scope, ref)\n\t\tif err == protoregistry.NotFound && r.allowUnresolvable {\n\t\t\treturn k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil\n\t\t} else if err == protoregistry.NotFound {\n\t\t\treturn 0, nil, nil, errors.New(\"%q not found\", ref.FullName())\n\t\t} else if err != nil {\n\t\t\treturn 0, nil, nil, err\n\t\t}\n\t\tswitch d := d.(type) {\n\t\tcase protoreflect.EnumDescriptor:\n\t\t\treturn protoreflect.EnumKind, d, nil, nil\n\t\tcase protoreflect.MessageDescriptor:\n\t\t\treturn protoreflect.MessageKind, nil, d, nil\n\t\tdefault:\n\t\t\treturn 0, nil, nil, errors.New(\"unknown kind\")\n\t\t}\n\tdefault:\n\t\tif ref != \"\" {\n\t\t\treturn 0, nil, nil, errors.New(\"target name cannot be specified for %v\", k)\n\t\t}\n\t\tif !k.IsValid() {\n\t\t\treturn 0, nil, nil, errors.New(\"invalid kind: %d\", k)\n\t\t}\n\t\treturn k, nil, nil, nil\n\t}\n}\n\n// findDescriptor finds the descriptor by name,\n// which may be a relative name within some scope.\n//\n// Suppose the scope was \"fizz.buzz\" and the reference was \"Foo.Bar\",\n// then the following full names are searched:\n//   - fizz.buzz.Foo.Bar\n//   - fizz.Foo.Bar\n//   - Foo.Bar\nfunc (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) {\n\tif !ref.IsValid() {\n\t\treturn nil, errors.New(\"invalid name reference: %q\", ref)\n\t}\n\tif ref.IsFull() {\n\t\tscope, ref = \"\", ref[1:]\n\t}\n\tvar foundButNotImported protoreflect.Descriptor\n\tfor {\n\t\t// Derive the full name to search.\n\t\ts := protoreflect.FullName(ref)\n\t\tif scope != \"\" {\n\t\t\ts = scope + \".\" + s\n\t\t}\n\n\t\t// Check the current file for the descriptor.\n\t\tif d, ok := r.local[s]; ok {\n\t\t\treturn d, nil\n\t\t}\n\n\t\t// Check the remote registry for the descriptor.\n\t\td, err := r.remote.FindDescriptorByName(s)\n\t\tif err == nil {\n\t\t\t// Only allow descriptors covered by one of the imports.\n\t\t\tif r.imports[d.ParentFile().Path()] {\n\t\t\t\treturn d, nil\n\t\t\t}\n\t\t\tfoundButNotImported = d\n\t\t} else if err != protoregistry.NotFound {\n\t\t\treturn nil, errors.Wrap(err, \"%q\", s)\n\t\t}\n\n\t\t// Continue on at a higher level of scoping.\n\t\tif scope == \"\" {\n\t\t\tif d := foundButNotImported; d != nil {\n\t\t\t\treturn nil, errors.New(\"resolved %q, but %q is not imported\", d.FullName(), d.ParentFile().Path())\n\t\t\t}\n\t\t\treturn nil, protoregistry.NotFound\n\t\t}\n\t\tscope = scope.Parent()\n\t}\n}\n\nfunc (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.EnumDescriptor, error) {\n\td, err := r.findDescriptor(scope, ref)\n\tif err == protoregistry.NotFound && r.allowUnresolvable {\n\t\treturn filedesc.PlaceholderEnum(ref.FullName()), nil\n\t} else if err == protoregistry.NotFound {\n\t\treturn nil, errors.New(\"%q not found\", ref.FullName())\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\ted, ok := d.(protoreflect.EnumDescriptor)\n\tif !ok {\n\t\treturn nil, errors.New(\"resolved %q, but it is not an enum\", d.FullName())\n\t}\n\treturn ed, nil\n}\n\nfunc (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.MessageDescriptor, error) {\n\td, err := r.findDescriptor(scope, ref)\n\tif err == protoregistry.NotFound && r.allowUnresolvable {\n\t\treturn filedesc.PlaceholderMessage(ref.FullName()), nil\n\t} else if err == protoregistry.NotFound {\n\t\treturn nil, errors.New(\"%q not found\", ref.FullName())\n\t} else if err != nil {\n\t\treturn nil, err\n\t}\n\tmd, ok := d.(protoreflect.MessageDescriptor)\n\tif !ok {\n\t\treturn nil, errors.New(\"resolved %q, but it is not an message\", d.FullName())\n\t}\n\treturn md, nil\n}\n\n// partialName is the partial name. A leading dot means that the name is full,\n// otherwise the name is relative to some current scope.\n// See google.protobuf.FieldDescriptorProto.type_name.\ntype partialName string\n\nfunc (s partialName) IsFull() bool {\n\treturn len(s) > 0 && s[0] == '.'\n}\n\nfunc (s partialName) IsValid() bool {\n\tif s.IsFull() {\n\t\treturn protoreflect.FullName(s[1:]).IsValid()\n\t}\n\treturn protoreflect.FullName(s).IsValid()\n}\n\nconst unknownPrefix = \"*.\"\n\n// FullName converts the partial name to a full name on a best-effort basis.\n// If relative, it creates an invalid full name, using a \"*.\" prefix\n// to indicate that the start of the full name is unknown.\nfunc (s partialName) FullName() protoreflect.FullName {\n\tif s.IsFull() {\n\t\treturn protoreflect.FullName(s[1:])\n\t}\n\treturn protoreflect.FullName(unknownPrefix + s)\n}\n\nfunc unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvable bool) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) {\n\tvar evs protoreflect.EnumValueDescriptors\n\tif fd.Enum() != nil {\n\t\tevs = fd.Enum().Values()\n\t}\n\tv, ev, err := defval.Unmarshal(s, fd.Kind(), evs, defval.Descriptor)\n\tif err != nil && allowUnresolvable && evs != nil && protoreflect.Name(s).IsValid() {\n\t\tv = protoreflect.ValueOfEnum(0)\n\t\tif evs.Len() > 0 {\n\t\t\tv = protoreflect.ValueOfEnum(evs.Get(0).Number())\n\t\t}\n\t\tev = filedesc.PlaceholderEnumValue(fd.Enum().FullName().Parent().Append(protoreflect.Name(s)))\n\t} else if err != nil {\n\t\treturn v, ev, err\n\t}\n\tif !fd.HasPresence() {\n\t\treturn v, ev, errors.New(\"cannot be specified with implicit field presence\")\n\t}\n\tif fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated {\n\t\treturn v, ev, errors.New(\"cannot be specified on composite types\")\n\t}\n\treturn v, ev, nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protodesc\n\nimport (\n\t\"strings\"\n\t\"unicode\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\nfunc validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescriptorProto) error {\n\tfor i, ed := range eds {\n\t\te := &es[i]\n\t\tif err := e.L2.ReservedNames.CheckValid(); err != nil {\n\t\t\treturn errors.New(\"enum %q reserved names has %v\", e.FullName(), err)\n\t\t}\n\t\tif err := e.L2.ReservedRanges.CheckValid(); err != nil {\n\t\t\treturn errors.New(\"enum %q reserved ranges has %v\", e.FullName(), err)\n\t\t}\n\t\tif len(ed.GetValue()) == 0 {\n\t\t\treturn errors.New(\"enum %q must contain at least one value declaration\", e.FullName())\n\t\t}\n\t\tallowAlias := ed.GetOptions().GetAllowAlias()\n\t\tfoundAlias := false\n\t\tfor i := 0; i < e.Values().Len(); i++ {\n\t\t\tv1 := e.Values().Get(i)\n\t\t\tif v2 := e.Values().ByNumber(v1.Number()); v1 != v2 {\n\t\t\t\tfoundAlias = true\n\t\t\t\tif !allowAlias {\n\t\t\t\t\treturn errors.New(\"enum %q has conflicting non-aliased values on number %d: %q with %q\", e.FullName(), v1.Number(), v1.Name(), v2.Name())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif allowAlias && !foundAlias {\n\t\t\treturn errors.New(\"enum %q allows aliases, but none were found\", e.FullName())\n\t\t}\n\t\tif !e.IsClosed() {\n\t\t\tif v := e.Values().Get(0); v.Number() != 0 {\n\t\t\t\treturn errors.New(\"enum %q using open semantics must have zero number for the first value\", v.FullName())\n\t\t\t}\n\t\t\t// Verify that value names in open enums do not conflict if the\n\t\t\t// case-insensitive prefix is removed.\n\t\t\t// See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055\n\t\t\tnames := map[string]protoreflect.EnumValueDescriptor{}\n\t\t\tprefix := strings.Replace(strings.ToLower(string(e.Name())), \"_\", \"\", -1)\n\t\t\tfor i := 0; i < e.Values().Len(); i++ {\n\t\t\t\tv1 := e.Values().Get(i)\n\t\t\t\ts := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix))\n\t\t\t\tif v2, ok := names[s]; ok && v1.Number() != v2.Number() {\n\t\t\t\t\treturn errors.New(\"enum %q using open semantics has conflict: %q with %q\", e.FullName(), v1.Name(), v2.Name())\n\t\t\t\t}\n\t\t\t\tnames[s] = v1\n\t\t\t}\n\t\t}\n\n\t\tfor j, vd := range ed.GetValue() {\n\t\t\tv := &e.L2.Values.List[j]\n\t\t\tif vd.Number == nil {\n\t\t\t\treturn errors.New(\"enum value %q must have a specified number\", v.FullName())\n\t\t\t}\n\t\t\tif e.L2.ReservedNames.Has(v.Name()) {\n\t\t\t\treturn errors.New(\"enum value %q must not use reserved name\", v.FullName())\n\t\t\t}\n\t\t\tif e.L2.ReservedRanges.Has(v.Number()) {\n\t\t\t\treturn errors.New(\"enum value %q must not use reserved number %d\", v.FullName(), v.Number())\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error {\n\t// There are a few limited exceptions only for proto3\n\tisProto3 := file.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3)\n\tfor i, md := range mds {\n\t\tm := &ms[i]\n\n\t\t// Handle the message descriptor itself.\n\t\tisMessageSet := md.GetOptions().GetMessageSetWireFormat()\n\t\tif err := m.L2.ReservedNames.CheckValid(); err != nil {\n\t\t\treturn errors.New(\"message %q reserved names has %v\", m.FullName(), err)\n\t\t}\n\t\tif err := m.L2.ReservedRanges.CheckValid(isMessageSet); err != nil {\n\t\t\treturn errors.New(\"message %q reserved ranges has %v\", m.FullName(), err)\n\t\t}\n\t\tif err := m.L2.ExtensionRanges.CheckValid(isMessageSet); err != nil {\n\t\t\treturn errors.New(\"message %q extension ranges has %v\", m.FullName(), err)\n\t\t}\n\t\tif err := (*filedesc.FieldRanges).CheckOverlap(&m.L2.ReservedRanges, &m.L2.ExtensionRanges); err != nil {\n\t\t\treturn errors.New(\"message %q reserved and extension ranges has %v\", m.FullName(), err)\n\t\t}\n\t\tfor i := 0; i < m.Fields().Len(); i++ {\n\t\t\tf1 := m.Fields().Get(i)\n\t\t\tif f2 := m.Fields().ByNumber(f1.Number()); f1 != f2 {\n\t\t\t\treturn errors.New(\"message %q has conflicting fields: %q with %q\", m.FullName(), f1.Name(), f2.Name())\n\t\t\t}\n\t\t}\n\t\tif isMessageSet && !flags.ProtoLegacy {\n\t\t\treturn errors.New(\"message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported\", m.FullName())\n\t\t}\n\t\tif isMessageSet && (isProto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) {\n\t\t\treturn errors.New(\"message %q is an invalid proto1 MessageSet\", m.FullName())\n\t\t}\n\t\tif isProto3 {\n\t\t\tif m.ExtensionRanges().Len() > 0 {\n\t\t\t\treturn errors.New(\"message %q using proto3 semantics cannot have extension ranges\", m.FullName())\n\t\t\t}\n\t\t}\n\n\t\tfor j, fd := range md.GetField() {\n\t\t\tf := &m.L2.Fields.List[j]\n\t\t\tif m.L2.ReservedNames.Has(f.Name()) {\n\t\t\t\treturn errors.New(\"message field %q must not use reserved name\", f.FullName())\n\t\t\t}\n\t\t\tif !f.Number().IsValid() {\n\t\t\t\treturn errors.New(\"message field %q has an invalid number: %d\", f.FullName(), f.Number())\n\t\t\t}\n\t\t\tif !f.Cardinality().IsValid() {\n\t\t\t\treturn errors.New(\"message field %q has an invalid cardinality: %d\", f.FullName(), f.Cardinality())\n\t\t\t}\n\t\t\tif m.L2.ReservedRanges.Has(f.Number()) {\n\t\t\t\treturn errors.New(\"message field %q must not use reserved number %d\", f.FullName(), f.Number())\n\t\t\t}\n\t\t\tif m.L2.ExtensionRanges.Has(f.Number()) {\n\t\t\t\treturn errors.New(\"message field %q with number %d in extension range\", f.FullName(), f.Number())\n\t\t\t}\n\t\t\tif fd.Extendee != nil {\n\t\t\t\treturn errors.New(\"message field %q may not have extendee: %q\", f.FullName(), fd.GetExtendee())\n\t\t\t}\n\t\t\tif f.L1.IsProto3Optional {\n\t\t\t\tif !isProto3 {\n\t\t\t\t\treturn errors.New(\"message field %q under proto3 optional semantics must be specified in the proto3 syntax\", f.FullName())\n\t\t\t\t}\n\t\t\t\tif f.Cardinality() != protoreflect.Optional {\n\t\t\t\t\treturn errors.New(\"message field %q under proto3 optional semantics must have optional cardinality\", f.FullName())\n\t\t\t\t}\n\t\t\t\tif f.ContainingOneof() != nil && f.ContainingOneof().Fields().Len() != 1 {\n\t\t\t\t\treturn errors.New(\"message field %q under proto3 optional semantics must be within a single element oneof\", f.FullName())\n\t\t\t\t}\n\t\t\t}\n\t\t\tif f.IsPacked() && !isPackable(f) {\n\t\t\t\treturn errors.New(\"message field %q is not packable\", f.FullName())\n\t\t\t}\n\t\t\tif err := checkValidGroup(file, f); err != nil {\n\t\t\t\treturn errors.New(\"message field %q is an invalid group: %v\", f.FullName(), err)\n\t\t\t}\n\t\t\tif err := checkValidMap(f); err != nil {\n\t\t\t\treturn errors.New(\"message field %q is an invalid map: %v\", f.FullName(), err)\n\t\t\t}\n\t\t\tif isProto3 {\n\t\t\t\tif f.Cardinality() == protoreflect.Required {\n\t\t\t\t\treturn errors.New(\"message field %q using proto3 semantics cannot be required\", f.FullName())\n\t\t\t\t}\n\t\t\t\tif f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() {\n\t\t\t\t\treturn errors.New(\"message field %q using proto3 semantics may only depend on open enums\", f.FullName())\n\t\t\t\t}\n\t\t\t}\n\t\t\tif f.Cardinality() == protoreflect.Optional && !f.HasPresence() && f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() {\n\t\t\t\treturn errors.New(\"message field %q with implicit presence may only use open enums\", f.FullName())\n\t\t\t}\n\t\t}\n\t\tseenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs\n\t\tfor j := range md.GetOneofDecl() {\n\t\t\to := &m.L2.Oneofs.List[j]\n\t\t\tif o.Fields().Len() == 0 {\n\t\t\t\treturn errors.New(\"message oneof %q must contain at least one field declaration\", o.FullName())\n\t\t\t}\n\t\t\tif n := o.Fields().Len(); n-1 != (o.Fields().Get(n-1).Index() - o.Fields().Get(0).Index()) {\n\t\t\t\treturn errors.New(\"message oneof %q must have consecutively declared fields\", o.FullName())\n\t\t\t}\n\n\t\t\tif o.IsSynthetic() {\n\t\t\t\tseenSynthetic = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !o.IsSynthetic() && seenSynthetic {\n\t\t\t\treturn errors.New(\"message oneof %q must be declared before synthetic oneofs\", o.FullName())\n\t\t\t}\n\n\t\t\tfor i := 0; i < o.Fields().Len(); i++ {\n\t\t\t\tf := o.Fields().Get(i)\n\t\t\t\tif f.Cardinality() != protoreflect.Optional {\n\t\t\t\t\treturn errors.New(\"message field %q belongs in a oneof and must be optional\", f.FullName())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := validateMessageDeclarations(file, m.L1.Messages.List, md.GetNestedType()); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := validateExtensionDeclarations(file, m.L1.Extensions.List, md.GetExtension()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error {\n\tfor i, xd := range xds {\n\t\tx := &xs[i]\n\t\t// NOTE: Avoid using the IsValid method since extensions to MessageSet\n\t\t// may have a field number higher than normal. This check only verifies\n\t\t// that the number is not negative or reserved. We check again later\n\t\t// if we know that the extendee is definitely not a MessageSet.\n\t\tif n := x.Number(); n < 0 || (protowire.FirstReservedNumber <= n && n <= protowire.LastReservedNumber) {\n\t\t\treturn errors.New(\"extension field %q has an invalid number: %d\", x.FullName(), x.Number())\n\t\t}\n\t\tif !x.Cardinality().IsValid() || x.Cardinality() == protoreflect.Required {\n\t\t\treturn errors.New(\"extension field %q has an invalid cardinality: %d\", x.FullName(), x.Cardinality())\n\t\t}\n\t\tif xd.JsonName != nil {\n\t\t\t// A bug in older versions of protoc would always populate the\n\t\t\t// \"json_name\" option for extensions when it is meaningless.\n\t\t\t// When it did so, it would always use the camel-cased field name.\n\t\t\tif xd.GetJsonName() != strs.JSONCamelCase(string(x.Name())) {\n\t\t\t\treturn errors.New(\"extension field %q may not have an explicitly set JSON name: %q\", x.FullName(), xd.GetJsonName())\n\t\t\t}\n\t\t}\n\t\tif xd.OneofIndex != nil {\n\t\t\treturn errors.New(\"extension field %q may not be part of a oneof\", x.FullName())\n\t\t}\n\t\tif md := x.ContainingMessage(); !md.IsPlaceholder() {\n\t\t\tif !md.ExtensionRanges().Has(x.Number()) {\n\t\t\t\treturn errors.New(\"extension field %q extends %q with non-extension field number: %d\", x.FullName(), md.FullName(), x.Number())\n\t\t\t}\n\t\t\tisMessageSet := md.Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat()\n\t\t\tif isMessageSet && !isOptionalMessage(x) {\n\t\t\t\treturn errors.New(\"extension field %q extends MessageSet and must be an optional message\", x.FullName())\n\t\t\t}\n\t\t\tif !isMessageSet && !x.Number().IsValid() {\n\t\t\t\treturn errors.New(\"extension field %q has an invalid number: %d\", x.FullName(), x.Number())\n\t\t\t}\n\t\t}\n\t\tif x.IsPacked() && !isPackable(x) {\n\t\t\treturn errors.New(\"extension field %q is not packable\", x.FullName())\n\t\t}\n\t\tif err := checkValidGroup(f, x); err != nil {\n\t\t\treturn errors.New(\"extension field %q is an invalid group: %v\", x.FullName(), err)\n\t\t}\n\t\tif md := x.Message(); md != nil && md.IsMapEntry() {\n\t\t\treturn errors.New(\"extension field %q cannot be a map entry\", x.FullName())\n\t\t}\n\t\tif f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) {\n\t\t\tswitch x.ContainingMessage().FullName() {\n\t\t\tcase (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.EnumValueOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.MessageOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.FieldOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.OneofOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.ExtensionRangeOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.ServiceOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tcase (*descriptorpb.MethodOptions)(nil).ProtoReflect().Descriptor().FullName():\n\t\t\tdefault:\n\t\t\t\treturn errors.New(\"extension field %q cannot be declared in proto3 unless extended descriptor options\", x.FullName())\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// isOptionalMessage reports whether this is an optional message.\n// If the kind is unknown, it is assumed to be a message.\nfunc isOptionalMessage(fd protoreflect.FieldDescriptor) bool {\n\treturn (fd.Kind() == 0 || fd.Kind() == protoreflect.MessageKind) && fd.Cardinality() == protoreflect.Optional\n}\n\n// isPackable checks whether the pack option can be specified.\nfunc isPackable(fd protoreflect.FieldDescriptor) bool {\n\tswitch fd.Kind() {\n\tcase protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind:\n\t\treturn false\n\t}\n\treturn fd.IsList()\n}\n\n// checkValidGroup reports whether fd is a valid group according to the same\n// rules that protoc imposes.\nfunc checkValidGroup(f *filedesc.File, fd protoreflect.FieldDescriptor) error {\n\tmd := fd.Message()\n\tswitch {\n\tcase fd.Kind() != protoreflect.GroupKind:\n\t\treturn nil\n\tcase f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3):\n\t\treturn errors.New(\"invalid under proto3 semantics\")\n\tcase md == nil || md.IsPlaceholder():\n\t\treturn errors.New(\"message must be resolvable\")\n\t}\n\tif f.L1.Edition < fromEditionProto(descriptorpb.Edition_EDITION_2023) {\n\t\tswitch {\n\t\tcase fd.FullName().Parent() != md.FullName().Parent():\n\t\t\treturn errors.New(\"message and field must be declared in the same scope\")\n\t\tcase !unicode.IsUpper(rune(md.Name()[0])):\n\t\t\treturn errors.New(\"message name must start with an uppercase\")\n\t\tcase fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))):\n\t\t\treturn errors.New(\"field name must be lowercased form of the message name\")\n\t\t}\n\t}\n\treturn nil\n}\n\n// checkValidMap checks whether the field is a valid map according to the same\n// rules that protoc imposes.\n// See protoc v3.8.0: src/google/protobuf/descriptor.cc:6045-6115\nfunc checkValidMap(fd protoreflect.FieldDescriptor) error {\n\tmd := fd.Message()\n\tswitch {\n\tcase md == nil || !md.IsMapEntry():\n\t\treturn nil\n\tcase fd.FullName().Parent() != md.FullName().Parent():\n\t\treturn errors.New(\"message and field must be declared in the same scope\")\n\tcase md.Name() != protoreflect.Name(strs.MapEntryName(string(fd.Name()))):\n\t\treturn errors.New(\"incorrect implicit map entry name\")\n\tcase fd.Cardinality() != protoreflect.Repeated:\n\t\treturn errors.New(\"field must be repeated\")\n\tcase md.Fields().Len() != 2:\n\t\treturn errors.New(\"message must have exactly two fields\")\n\tcase md.ExtensionRanges().Len() > 0:\n\t\treturn errors.New(\"message must not have any extension ranges\")\n\tcase md.Enums().Len()+md.Messages().Len()+md.Extensions().Len() > 0:\n\t\treturn errors.New(\"message must not have any nested declarations\")\n\t}\n\tkf := md.Fields().Get(0)\n\tvf := md.Fields().Get(1)\n\tswitch {\n\tcase kf.Name() != genid.MapEntry_Key_field_name || kf.Number() != genid.MapEntry_Key_field_number || kf.Cardinality() != protoreflect.Optional || kf.ContainingOneof() != nil || kf.HasDefault():\n\t\treturn errors.New(\"invalid key field\")\n\tcase vf.Name() != genid.MapEntry_Value_field_name || vf.Number() != genid.MapEntry_Value_field_number || vf.Cardinality() != protoreflect.Optional || vf.ContainingOneof() != nil || vf.HasDefault():\n\t\treturn errors.New(\"invalid value field\")\n\t}\n\tswitch kf.Kind() {\n\tcase protoreflect.BoolKind: // bool\n\tcase protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: // int32\n\tcase protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: // int64\n\tcase protoreflect.Uint32Kind, protoreflect.Fixed32Kind: // uint32\n\tcase protoreflect.Uint64Kind, protoreflect.Fixed64Kind: // uint64\n\tcase protoreflect.StringKind: // string\n\tdefault:\n\t\treturn errors.New(\"invalid key kind: %v\", kf.Kind())\n\t}\n\tif e := vf.Enum(); e != nil && e.Values().Len() > 0 && e.Values().Get(0).Number() != 0 {\n\t\treturn errors.New(\"map enum value must have zero number for the first value\")\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/editions.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protodesc\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/editiondefaults\"\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/genid\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n\t\"google.golang.org/protobuf/types/gofeaturespb\"\n)\n\nvar defaults = &descriptorpb.FeatureSetDefaults{}\nvar defaultsCacheMu sync.Mutex\nvar defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet)\n\nfunc init() {\n\terr := proto.Unmarshal(editiondefaults.Defaults, defaults)\n\tif err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"unmarshal editions defaults: %v\\n\", err)\n\t\tos.Exit(1)\n\t}\n}\n\nfunc fromEditionProto(epb descriptorpb.Edition) filedesc.Edition {\n\treturn filedesc.Edition(epb)\n}\n\nfunc toEditionProto(ed filedesc.Edition) descriptorpb.Edition {\n\tswitch ed {\n\tcase filedesc.EditionUnknown:\n\t\treturn descriptorpb.Edition_EDITION_UNKNOWN\n\tcase filedesc.EditionProto2:\n\t\treturn descriptorpb.Edition_EDITION_PROTO2\n\tcase filedesc.EditionProto3:\n\t\treturn descriptorpb.Edition_EDITION_PROTO3\n\tcase filedesc.Edition2023:\n\t\treturn descriptorpb.Edition_EDITION_2023\n\tcase filedesc.Edition2024:\n\t\treturn descriptorpb.Edition_EDITION_2024\n\tcase filedesc.EditionUnstable:\n\t\treturn descriptorpb.Edition_EDITION_UNSTABLE\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unknown value for edition: %v\", ed))\n\t}\n}\n\nfunc getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet {\n\tdefaultsCacheMu.Lock()\n\tdefer defaultsCacheMu.Unlock()\n\tif def, ok := defaultsCache[ed]; ok {\n\t\treturn def\n\t}\n\tedpb := toEditionProto(ed)\n\tif (defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb) && edpb != descriptorpb.Edition_EDITION_UNSTABLE {\n\t\t// This should never happen protodesc.(FileOptions).New would fail when\n\t\t// initializing the file descriptor.\n\t\t// This most likely means the embedded defaults were not updated.\n\t\tfmt.Fprintf(os.Stderr, \"internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\\n\", edpb)\n\t\tos.Exit(1)\n\t}\n\tfsed := defaults.GetDefaults()[0]\n\t// Using a linear search for now.\n\t// Editions are guaranteed to be sorted and thus we could use a binary search.\n\t// Given that there are only a handful of editions (with one more per year)\n\t// there is not much reason to use a binary search.\n\tfor _, def := range defaults.GetDefaults() {\n\t\tif def.GetEdition() <= edpb {\n\t\t\tfsed = def\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\tfs := proto.Clone(fsed.GetFixedFeatures()).(*descriptorpb.FeatureSet)\n\tproto.Merge(fs, fsed.GetOverridableFeatures())\n\tdefaultsCache[ed] = fs\n\treturn fs\n}\n\n// mergeEditionFeatures merges the parent and child feature sets. This function\n// should be used when initializing Go descriptors from descriptor protos which\n// is why the parent is a filedesc.EditionsFeatures (Go representation) while\n// the child is a descriptorproto.FeatureSet (protoc representation).\n// Any feature set by the child overwrites what is set by the parent.\nfunc mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorpb.FeatureSet) filedesc.EditionFeatures {\n\tvar parentFS filedesc.EditionFeatures\n\tswitch p := parentDesc.(type) {\n\tcase *filedesc.File:\n\t\tparentFS = p.L1.EditionFeatures\n\tcase *filedesc.Message:\n\t\tparentFS = p.L1.EditionFeatures\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unknown parent type %T\", parentDesc))\n\t}\n\tif child == nil {\n\t\treturn parentFS\n\t}\n\tif fp := child.FieldPresence; fp != nil {\n\t\tparentFS.IsFieldPresence = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED ||\n\t\t\t*fp == descriptorpb.FeatureSet_EXPLICIT\n\t\tparentFS.IsLegacyRequired = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED\n\t}\n\tif et := child.EnumType; et != nil {\n\t\tparentFS.IsOpenEnum = *et == descriptorpb.FeatureSet_OPEN\n\t}\n\n\tif rfe := child.RepeatedFieldEncoding; rfe != nil {\n\t\tparentFS.IsPacked = *rfe == descriptorpb.FeatureSet_PACKED\n\t}\n\n\tif utf8val := child.Utf8Validation; utf8val != nil {\n\t\tparentFS.IsUTF8Validated = *utf8val == descriptorpb.FeatureSet_VERIFY\n\t}\n\n\tif me := child.MessageEncoding; me != nil {\n\t\tparentFS.IsDelimitedEncoded = *me == descriptorpb.FeatureSet_DELIMITED\n\t}\n\n\tif jf := child.JsonFormat; jf != nil {\n\t\tparentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW\n\t}\n\n\t// We must not use proto.GetExtension(child, gofeaturespb.E_Go)\n\t// because that only works for messages we generated, but not for\n\t// dynamicpb messages. See golang/protobuf#1669.\n\t//\n\t// Further, we harden this code against adversarial inputs: a\n\t// service which accepts descriptors from a possibly malicious\n\t// source shouldn't crash.\n\tgoFeatures := child.ProtoReflect().Get(gofeaturespb.E_Go.TypeDescriptor())\n\tif !goFeatures.IsValid() {\n\t\treturn parentFS\n\t}\n\tgf, ok := goFeatures.Interface().(protoreflect.Message)\n\tif !ok {\n\t\treturn parentFS\n\t}\n\t// gf.Interface() could be *dynamicpb.Message or *gofeaturespb.GoFeatures.\n\tfields := gf.Descriptor().Fields()\n\n\tif fd := fields.ByNumber(genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number); fd != nil &&\n\t\t!fd.IsList() &&\n\t\tfd.Kind() == protoreflect.BoolKind &&\n\t\tgf.Has(fd) {\n\t\tparentFS.GenerateLegacyUnmarshalJSON = gf.Get(fd).Bool()\n\t}\n\n\tif fd := fields.ByNumber(genid.GoFeatures_StripEnumPrefix_field_number); fd != nil &&\n\t\t!fd.IsList() &&\n\t\tfd.Kind() == protoreflect.EnumKind &&\n\t\tgf.Has(fd) {\n\t\tparentFS.StripEnumPrefix = int(gf.Get(fd).Enum())\n\t}\n\n\tif fd := fields.ByNumber(genid.GoFeatures_ApiLevel_field_number); fd != nil &&\n\t\t!fd.IsList() &&\n\t\tfd.Kind() == protoreflect.EnumKind &&\n\t\tgf.Has(fd) {\n\t\tparentFS.APILevel = int(gf.Get(fd).Enum())\n\t}\n\n\treturn parentFS\n}\n\n// initFileDescFromFeatureSet initializes editions related fields in fd based\n// on fs. If fs is nil it is assumed to be an empty featureset and all fields\n// will be initialized with the appropriate default. fd.L1.Edition must be set\n// before calling this function.\nfunc initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) {\n\tdfs := getFeatureSetFor(fd.L1.Edition)\n\t// initialize the featureset with the defaults\n\tfd.L1.EditionFeatures = mergeEditionFeatures(fd, dfs)\n\t// overwrite any options explicitly specified\n\tfd.L1.EditionFeatures = mergeEditionFeatures(fd, fs)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protodesc/proto.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protodesc\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/internal/encoding/defval\"\n\t\"google.golang.org/protobuf/internal/strs\"\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n\n\t\"google.golang.org/protobuf/types/descriptorpb\"\n)\n\n// ToFileDescriptorProto copies a [protoreflect.FileDescriptor] into a\n// google.protobuf.FileDescriptorProto message.\nfunc ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto {\n\tp := &descriptorpb.FileDescriptorProto{\n\t\tName:    proto.String(file.Path()),\n\t\tOptions: proto.Clone(file.Options()).(*descriptorpb.FileOptions),\n\t}\n\tif file.Package() != \"\" {\n\t\tp.Package = proto.String(string(file.Package()))\n\t}\n\tfor i, imports := 0, file.Imports(); i < imports.Len(); i++ {\n\t\timp := imports.Get(i)\n\t\tp.Dependency = append(p.Dependency, imp.Path())\n\t\tif imp.IsPublic {\n\t\t\tp.PublicDependency = append(p.PublicDependency, int32(i))\n\t\t}\n\t}\n\tfor i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ {\n\t\tloc := locs.Get(i)\n\t\tl := &descriptorpb.SourceCodeInfo_Location{}\n\t\tl.Path = append(l.Path, loc.Path...)\n\t\tif loc.StartLine == loc.EndLine {\n\t\t\tl.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndColumn)}\n\t\t} else {\n\t\t\tl.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndLine), int32(loc.EndColumn)}\n\t\t}\n\t\tl.LeadingDetachedComments = append([]string(nil), loc.LeadingDetachedComments...)\n\t\tif loc.LeadingComments != \"\" {\n\t\t\tl.LeadingComments = proto.String(loc.LeadingComments)\n\t\t}\n\t\tif loc.TrailingComments != \"\" {\n\t\t\tl.TrailingComments = proto.String(loc.TrailingComments)\n\t\t}\n\t\tif p.SourceCodeInfo == nil {\n\t\t\tp.SourceCodeInfo = &descriptorpb.SourceCodeInfo{}\n\t\t}\n\t\tp.SourceCodeInfo.Location = append(p.SourceCodeInfo.Location, l)\n\n\t}\n\tfor i, messages := 0, file.Messages(); i < messages.Len(); i++ {\n\t\tp.MessageType = append(p.MessageType, ToDescriptorProto(messages.Get(i)))\n\t}\n\tfor i, enums := 0, file.Enums(); i < enums.Len(); i++ {\n\t\tp.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i)))\n\t}\n\tfor i, services := 0, file.Services(); i < services.Len(); i++ {\n\t\tp.Service = append(p.Service, ToServiceDescriptorProto(services.Get(i)))\n\t}\n\tfor i, exts := 0, file.Extensions(); i < exts.Len(); i++ {\n\t\tp.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i)))\n\t}\n\tif syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() {\n\t\tp.Syntax = proto.String(file.Syntax().String())\n\t}\n\tdesc := file\n\tif fileImportDesc, ok := file.(protoreflect.FileImport); ok {\n\t\tdesc = fileImportDesc.FileDescriptor\n\t}\n\tif file.Syntax() == protoreflect.Editions {\n\t\tif editionsInterface, ok := desc.(interface{ Edition() int32 }); ok {\n\t\t\tp.Edition = descriptorpb.Edition(editionsInterface.Edition()).Enum()\n\t\t}\n\t}\n\ttype hasOptionImports interface {\n\t\tOptionImports() protoreflect.FileImports\n\t}\n\tif opts, ok := desc.(hasOptionImports); ok {\n\t\tif optionImports := opts.OptionImports(); optionImports.Len() > 0 {\n\t\t\toptionDeps := make([]string, optionImports.Len())\n\t\t\tfor i := range optionImports.Len() {\n\t\t\t\toptionDeps[i] = optionImports.Get(i).Path()\n\t\t\t}\n\t\t\tp.OptionDependency = optionDeps\n\t\t}\n\t}\n\treturn p\n}\n\n// ToDescriptorProto copies a [protoreflect.MessageDescriptor] into a\n// google.protobuf.DescriptorProto message.\nfunc ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto {\n\tp := &descriptorpb.DescriptorProto{\n\t\tName:    proto.String(string(message.Name())),\n\t\tOptions: proto.Clone(message.Options()).(*descriptorpb.MessageOptions),\n\t}\n\tfor i, fields := 0, message.Fields(); i < fields.Len(); i++ {\n\t\tp.Field = append(p.Field, ToFieldDescriptorProto(fields.Get(i)))\n\t}\n\tfor i, exts := 0, message.Extensions(); i < exts.Len(); i++ {\n\t\tp.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i)))\n\t}\n\tfor i, messages := 0, message.Messages(); i < messages.Len(); i++ {\n\t\tp.NestedType = append(p.NestedType, ToDescriptorProto(messages.Get(i)))\n\t}\n\tfor i, enums := 0, message.Enums(); i < enums.Len(); i++ {\n\t\tp.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i)))\n\t}\n\tfor i, xranges := 0, message.ExtensionRanges(); i < xranges.Len(); i++ {\n\t\txrange := xranges.Get(i)\n\t\tp.ExtensionRange = append(p.ExtensionRange, &descriptorpb.DescriptorProto_ExtensionRange{\n\t\t\tStart:   proto.Int32(int32(xrange[0])),\n\t\t\tEnd:     proto.Int32(int32(xrange[1])),\n\t\t\tOptions: proto.Clone(message.ExtensionRangeOptions(i)).(*descriptorpb.ExtensionRangeOptions),\n\t\t})\n\t}\n\tfor i, oneofs := 0, message.Oneofs(); i < oneofs.Len(); i++ {\n\t\tp.OneofDecl = append(p.OneofDecl, ToOneofDescriptorProto(oneofs.Get(i)))\n\t}\n\tfor i, ranges := 0, message.ReservedRanges(); i < ranges.Len(); i++ {\n\t\trrange := ranges.Get(i)\n\t\tp.ReservedRange = append(p.ReservedRange, &descriptorpb.DescriptorProto_ReservedRange{\n\t\t\tStart: proto.Int32(int32(rrange[0])),\n\t\t\tEnd:   proto.Int32(int32(rrange[1])),\n\t\t})\n\t}\n\tfor i, names := 0, message.ReservedNames(); i < names.Len(); i++ {\n\t\tp.ReservedName = append(p.ReservedName, string(names.Get(i)))\n\t}\n\ttype hasVisibility interface {\n\t\tVisibility() int32\n\t}\n\tif vis, ok := message.(hasVisibility); ok {\n\t\tif visibility := vis.Visibility(); visibility > 0 {\n\t\t\tp.Visibility = descriptorpb.SymbolVisibility(visibility).Enum()\n\t\t}\n\t}\n\treturn p\n}\n\n// ToFieldDescriptorProto copies a [protoreflect.FieldDescriptor] into a\n// google.protobuf.FieldDescriptorProto message.\nfunc ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto {\n\tp := &descriptorpb.FieldDescriptorProto{\n\t\tName:    proto.String(string(field.Name())),\n\t\tNumber:  proto.Int32(int32(field.Number())),\n\t\tLabel:   descriptorpb.FieldDescriptorProto_Label(field.Cardinality()).Enum(),\n\t\tOptions: proto.Clone(field.Options()).(*descriptorpb.FieldOptions),\n\t}\n\tif field.IsExtension() {\n\t\tp.Extendee = fullNameOf(field.ContainingMessage())\n\t}\n\tif field.Kind().IsValid() {\n\t\tp.Type = descriptorpb.FieldDescriptorProto_Type(field.Kind()).Enum()\n\t}\n\tif field.Enum() != nil {\n\t\tp.TypeName = fullNameOf(field.Enum())\n\t}\n\tif field.Message() != nil {\n\t\tp.TypeName = fullNameOf(field.Message())\n\t}\n\tif field.HasJSONName() {\n\t\t// A bug in older versions of protoc would always populate the\n\t\t// \"json_name\" option for extensions when it is meaningless.\n\t\t// When it did so, it would always use the camel-cased field name.\n\t\tif field.IsExtension() {\n\t\t\tp.JsonName = proto.String(strs.JSONCamelCase(string(field.Name())))\n\t\t} else {\n\t\t\tp.JsonName = proto.String(field.JSONName())\n\t\t}\n\t}\n\tif field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() {\n\t\tp.Proto3Optional = proto.Bool(true)\n\t}\n\tif field.Syntax() == protoreflect.Editions {\n\t\t// Editions have no group keyword, this type is only set so that downstream users continue\n\t\t// treating this as delimited encoding.\n\t\tif p.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP {\n\t\t\tp.Type = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum()\n\t\t}\n\t\t// Editions have no required keyword, this label is only set so that downstream users continue\n\t\t// treating it as required.\n\t\tif p.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED {\n\t\t\tp.Label = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()\n\t\t}\n\t}\n\tif field.HasDefault() {\n\t\tdef, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor)\n\t\tif err != nil && field.DefaultEnumValue() != nil {\n\t\t\tdef = string(field.DefaultEnumValue().Name()) // occurs for unresolved enum values\n\t\t} else if err != nil {\n\t\t\tpanic(fmt.Sprintf(\"%v: %v\", field.FullName(), err))\n\t\t}\n\t\tp.DefaultValue = proto.String(def)\n\t}\n\tif oneof := field.ContainingOneof(); oneof != nil {\n\t\tp.OneofIndex = proto.Int32(int32(oneof.Index()))\n\t}\n\treturn p\n}\n\n// ToOneofDescriptorProto copies a [protoreflect.OneofDescriptor] into a\n// google.protobuf.OneofDescriptorProto message.\nfunc ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto {\n\treturn &descriptorpb.OneofDescriptorProto{\n\t\tName:    proto.String(string(oneof.Name())),\n\t\tOptions: proto.Clone(oneof.Options()).(*descriptorpb.OneofOptions),\n\t}\n}\n\n// ToEnumDescriptorProto copies a [protoreflect.EnumDescriptor] into a\n// google.protobuf.EnumDescriptorProto message.\nfunc ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto {\n\tp := &descriptorpb.EnumDescriptorProto{\n\t\tName:    proto.String(string(enum.Name())),\n\t\tOptions: proto.Clone(enum.Options()).(*descriptorpb.EnumOptions),\n\t}\n\tfor i, values := 0, enum.Values(); i < values.Len(); i++ {\n\t\tp.Value = append(p.Value, ToEnumValueDescriptorProto(values.Get(i)))\n\t}\n\tfor i, ranges := 0, enum.ReservedRanges(); i < ranges.Len(); i++ {\n\t\trrange := ranges.Get(i)\n\t\tp.ReservedRange = append(p.ReservedRange, &descriptorpb.EnumDescriptorProto_EnumReservedRange{\n\t\t\tStart: proto.Int32(int32(rrange[0])),\n\t\t\tEnd:   proto.Int32(int32(rrange[1])),\n\t\t})\n\t}\n\tfor i, names := 0, enum.ReservedNames(); i < names.Len(); i++ {\n\t\tp.ReservedName = append(p.ReservedName, string(names.Get(i)))\n\t}\n\ttype hasVisibility interface {\n\t\tVisibility() int32\n\t}\n\tif vis, ok := enum.(hasVisibility); ok {\n\t\tif visibility := vis.Visibility(); visibility > 0 {\n\t\t\tp.Visibility = descriptorpb.SymbolVisibility(visibility).Enum()\n\t\t}\n\t}\n\treturn p\n}\n\n// ToEnumValueDescriptorProto copies a [protoreflect.EnumValueDescriptor] into a\n// google.protobuf.EnumValueDescriptorProto message.\nfunc ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto {\n\treturn &descriptorpb.EnumValueDescriptorProto{\n\t\tName:    proto.String(string(value.Name())),\n\t\tNumber:  proto.Int32(int32(value.Number())),\n\t\tOptions: proto.Clone(value.Options()).(*descriptorpb.EnumValueOptions),\n\t}\n}\n\n// ToServiceDescriptorProto copies a [protoreflect.ServiceDescriptor] into a\n// google.protobuf.ServiceDescriptorProto message.\nfunc ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto {\n\tp := &descriptorpb.ServiceDescriptorProto{\n\t\tName:    proto.String(string(service.Name())),\n\t\tOptions: proto.Clone(service.Options()).(*descriptorpb.ServiceOptions),\n\t}\n\tfor i, methods := 0, service.Methods(); i < methods.Len(); i++ {\n\t\tp.Method = append(p.Method, ToMethodDescriptorProto(methods.Get(i)))\n\t}\n\treturn p\n}\n\n// ToMethodDescriptorProto copies a [protoreflect.MethodDescriptor] into a\n// google.protobuf.MethodDescriptorProto message.\nfunc ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto {\n\tp := &descriptorpb.MethodDescriptorProto{\n\t\tName:       proto.String(string(method.Name())),\n\t\tInputType:  fullNameOf(method.Input()),\n\t\tOutputType: fullNameOf(method.Output()),\n\t\tOptions:    proto.Clone(method.Options()).(*descriptorpb.MethodOptions),\n\t}\n\tif method.IsStreamingClient() {\n\t\tp.ClientStreaming = proto.Bool(true)\n\t}\n\tif method.IsStreamingServer() {\n\t\tp.ServerStreaming = proto.Bool(true)\n\t}\n\treturn p\n}\n\nfunc fullNameOf(d protoreflect.Descriptor) *string {\n\tif d == nil {\n\t\treturn nil\n\t}\n\tif strings.HasPrefix(string(d.FullName()), unknownPrefix) {\n\t\treturn proto.String(string(d.FullName()[len(unknownPrefix):]))\n\t}\n\treturn proto.String(\".\" + string(d.FullName()))\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go",
    "content": "// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport (\n\t\"google.golang.org/protobuf/internal/pragma\"\n)\n\n// The following types are used by the fast-path Message.ProtoMethods method.\n//\n// To avoid polluting the public protoreflect API with types used only by\n// low-level implementations, the canonical definitions of these types are\n// in the runtime/protoiface package. The definitions here and in protoiface\n// must be kept in sync.\ntype (\n\tmethods = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tFlags            supportFlags\n\t\tSize             func(sizeInput) sizeOutput\n\t\tMarshal          func(marshalInput) (marshalOutput, error)\n\t\tUnmarshal        func(unmarshalInput) (unmarshalOutput, error)\n\t\tMerge            func(mergeInput) mergeOutput\n\t\tCheckInitialized func(checkInitializedInput) (checkInitializedOutput, error)\n\t\tEqual            func(equalInput) equalOutput\n\t}\n\tsupportFlags = uint64\n\tsizeInput    = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tMessage Message\n\t\tFlags   uint8\n\t}\n\tsizeOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tSize int\n\t}\n\tmarshalInput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tMessage Message\n\t\tBuf     []byte\n\t\tFlags   uint8\n\t}\n\tmarshalOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tBuf []byte\n\t}\n\tunmarshalInput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tMessage  Message\n\t\tBuf      []byte\n\t\tFlags    uint8\n\t\tResolver interface {\n\t\t\tFindExtensionByName(field FullName) (ExtensionType, error)\n\t\t\tFindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error)\n\t\t}\n\t\tDepth int\n\t}\n\tunmarshalOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tFlags uint8\n\t}\n\tmergeInput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tSource      Message\n\t\tDestination Message\n\t}\n\tmergeOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tFlags uint8\n\t}\n\tcheckInitializedInput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tMessage Message\n\t}\n\tcheckInitializedOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t}\n\tequalInput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tMessageA Message\n\t\tMessageB Message\n\t}\n\tequalOutput = struct {\n\t\tpragma.NoUnkeyedLiterals\n\t\tEqual bool\n\t}\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protoreflect provides interfaces to dynamically manipulate messages.\n//\n// This package includes type descriptors which describe the structure of types\n// defined in proto source files and value interfaces which provide the\n// ability to examine and manipulate the contents of messages.\n//\n// # Protocol Buffer Descriptors\n//\n// Protobuf descriptors (e.g., [EnumDescriptor] or [MessageDescriptor])\n// are immutable objects that represent protobuf type information.\n// They are wrappers around the messages declared in descriptor.proto.\n// Protobuf descriptors alone lack any information regarding Go types.\n//\n// Enums and messages generated by this module implement [Enum] and [ProtoMessage],\n// where the Descriptor and ProtoReflect.Descriptor accessors respectively\n// return the protobuf descriptor for the values.\n//\n// The protobuf descriptor interfaces are not meant to be implemented by\n// user code since they might need to be extended in the future to support\n// additions to the protobuf language.\n// The [google.golang.org/protobuf/reflect/protodesc] package converts between\n// google.protobuf.DescriptorProto messages and protobuf descriptors.\n//\n// # Go Type Descriptors\n//\n// A type descriptor (e.g., [EnumType] or [MessageType]) is a constructor for\n// a concrete Go type that represents the associated protobuf descriptor.\n// There is commonly a one-to-one relationship between protobuf descriptors and\n// Go type descriptors, but it can potentially be a one-to-many relationship.\n//\n// Enums and messages generated by this module implement [Enum] and [ProtoMessage],\n// where the Type and ProtoReflect.Type accessors respectively\n// return the protobuf descriptor for the values.\n//\n// The [google.golang.org/protobuf/types/dynamicpb] package can be used to\n// create Go type descriptors from protobuf descriptors.\n//\n// # Value Interfaces\n//\n// The [Enum] and [Message] interfaces provide a reflective view over an\n// enum or message instance. For enums, it provides the ability to retrieve\n// the enum value number for any concrete enum type. For messages, it provides\n// the ability to access or manipulate fields of the message.\n//\n// To convert a [google.golang.org/protobuf/proto.Message] to a [protoreflect.Message], use the\n// former's ProtoReflect method. Since the ProtoReflect method is new to the\n// v2 message interface, it may not be present on older message implementations.\n// The [github.com/golang/protobuf/proto.MessageReflect] function can be used\n// to obtain a reflective view on older messages.\n//\n// # Relationships\n//\n// The following diagrams demonstrate the relationships between\n// various types declared in this package.\n//\n//\t                       ┌───────────────────────────────────┐\n//\t                       V                                   │\n//\t   ┌────────────── New(n) ─────────────┐                   │\n//\t   │                                   │                   │\n//\t   │      ┌──── Descriptor() ──┐       │  ┌── Number() ──┐ │\n//\t   │      │                    V       V  │              V │\n//\t╔════════════╗  ╔════════════════╗  ╔════════╗  ╔════════════╗\n//\t║  EnumType  ║  ║ EnumDescriptor ║  ║  Enum  ║  ║ EnumNumber ║\n//\t╚════════════╝  ╚════════════════╝  ╚════════╝  ╚════════════╝\n//\t      Λ           Λ                   │ │\n//\t      │           └─── Descriptor() ──┘ │\n//\t      │                                 │\n//\t      └────────────────── Type() ───────┘\n//\n// • An [EnumType] describes a concrete Go enum type.\n// It has an EnumDescriptor and can construct an Enum instance.\n//\n// • An [EnumDescriptor] describes an abstract protobuf enum type.\n//\n// • An [Enum] is a concrete enum instance. Generated enums implement Enum.\n//\n//\t  ┌──────────────── New() ─────────────────┐\n//\t  │                                        │\n//\t  │         ┌─── Descriptor() ─────┐       │   ┌── Interface() ───┐\n//\t  │         │                      V       V   │                  V\n//\t╔═════════════╗  ╔═══════════════════╗  ╔═════════╗  ╔══════════════╗\n//\t║ MessageType ║  ║ MessageDescriptor ║  ║ Message ║  ║ ProtoMessage ║\n//\t╚═════════════╝  ╚═══════════════════╝  ╚═════════╝  ╚══════════════╝\n//\t       Λ           Λ                      │ │  Λ                  │\n//\t       │           └──── Descriptor() ────┘ │  └─ ProtoReflect() ─┘\n//\t       │                                    │\n//\t       └─────────────────── Type() ─────────┘\n//\n// • A [MessageType] describes a concrete Go message type.\n// It has a [MessageDescriptor] and can construct a [Message] instance.\n// Just as how Go's [reflect.Type] is a reflective description of a Go type,\n// a [MessageType] is a reflective description of a Go type for a protobuf message.\n//\n// • A [MessageDescriptor] describes an abstract protobuf message type.\n// It has no understanding of Go types. In order to construct a [MessageType]\n// from just a [MessageDescriptor], you can consider looking up the message type\n// in the global registry using the FindMessageByName method on\n// [google.golang.org/protobuf/reflect/protoregistry.GlobalTypes]\n// or constructing a dynamic [MessageType] using\n// [google.golang.org/protobuf/types/dynamicpb.NewMessageType].\n//\n// • A [Message] is a reflective view over a concrete message instance.\n// Generated messages implement [ProtoMessage], which can convert to a [Message].\n// Just as how Go's [reflect.Value] is a reflective view over a Go value,\n// a [Message] is a reflective view over a concrete protobuf message instance.\n// Using Go reflection as an analogy, the [ProtoMessage.ProtoReflect] method is similar to\n// calling [reflect.ValueOf], and the [Message.Interface] method is similar to\n// calling [reflect.Value.Interface].\n//\n//\t      ┌── TypeDescriptor() ──┐    ┌───── Descriptor() ─────┐\n//\t      │                      V    │                        V\n//\t╔═══════════════╗  ╔═════════════════════════╗  ╔═════════════════════╗\n//\t║ ExtensionType ║  ║ ExtensionTypeDescriptor ║  ║ ExtensionDescriptor ║\n//\t╚═══════════════╝  ╚═════════════════════════╝  ╚═════════════════════╝\n//\t      Λ                      │   │ Λ                      │ Λ\n//\t      └─────── Type() ───────┘   │ └─── may implement ────┘ │\n//\t                                 │                          │\n//\t                                 └────── implements ────────┘\n//\n// • An [ExtensionType] describes a concrete Go implementation of an extension.\n// It has an [ExtensionTypeDescriptor] and can convert to/from\n// an abstract [Value] and a Go value.\n//\n// • An [ExtensionTypeDescriptor] is an [ExtensionDescriptor]\n// which also has an [ExtensionType].\n//\n// • An [ExtensionDescriptor] describes an abstract protobuf extension field and\n// may not always be an [ExtensionTypeDescriptor].\npackage protoreflect\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n\t\"google.golang.org/protobuf/internal/pragma\"\n)\n\ntype doNotImplement pragma.DoNotImplement\n\n// ProtoMessage is the top-level interface that all proto messages implement.\n// This is declared in the protoreflect package to avoid a cyclic dependency;\n// use the [google.golang.org/protobuf/proto.Message] type instead, which aliases this type.\ntype ProtoMessage interface{ ProtoReflect() Message }\n\n// Syntax is the language version of the proto file.\ntype Syntax syntax\n\ntype syntax int8 // keep exact type opaque as the int type may change\n\nconst (\n\tProto2   Syntax = 2\n\tProto3   Syntax = 3\n\tEditions Syntax = 4\n)\n\n// IsValid reports whether the syntax is valid.\nfunc (s Syntax) IsValid() bool {\n\tswitch s {\n\tcase Proto2, Proto3, Editions:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// String returns s as a proto source identifier (e.g., \"proto2\").\nfunc (s Syntax) String() string {\n\tswitch s {\n\tcase Proto2:\n\t\treturn \"proto2\"\n\tcase Proto3:\n\t\treturn \"proto3\"\n\tcase Editions:\n\t\treturn \"editions\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"<unknown:%d>\", s)\n\t}\n}\n\n// GoString returns s as a Go source identifier (e.g., \"Proto2\").\nfunc (s Syntax) GoString() string {\n\tswitch s {\n\tcase Proto2:\n\t\treturn \"Proto2\"\n\tcase Proto3:\n\t\treturn \"Proto3\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"Syntax(%d)\", s)\n\t}\n}\n\n// Cardinality determines whether a field is optional, required, or repeated.\ntype Cardinality cardinality\n\ntype cardinality int8 // keep exact type opaque as the int type may change\n\n// Constants as defined by the google.protobuf.Cardinality enumeration.\nconst (\n\tOptional Cardinality = 1 // appears zero or one times\n\tRequired Cardinality = 2 // appears exactly one time; invalid with Proto3\n\tRepeated Cardinality = 3 // appears zero or more times\n)\n\n// IsValid reports whether the cardinality is valid.\nfunc (c Cardinality) IsValid() bool {\n\tswitch c {\n\tcase Optional, Required, Repeated:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// String returns c as a proto source identifier (e.g., \"optional\").\nfunc (c Cardinality) String() string {\n\tswitch c {\n\tcase Optional:\n\t\treturn \"optional\"\n\tcase Required:\n\t\treturn \"required\"\n\tcase Repeated:\n\t\treturn \"repeated\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"<unknown:%d>\", c)\n\t}\n}\n\n// GoString returns c as a Go source identifier (e.g., \"Optional\").\nfunc (c Cardinality) GoString() string {\n\tswitch c {\n\tcase Optional:\n\t\treturn \"Optional\"\n\tcase Required:\n\t\treturn \"Required\"\n\tcase Repeated:\n\t\treturn \"Repeated\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"Cardinality(%d)\", c)\n\t}\n}\n\n// Kind indicates the basic proto kind of a field.\ntype Kind kind\n\ntype kind int8 // keep exact type opaque as the int type may change\n\n// Constants as defined by the google.protobuf.Field.Kind enumeration.\nconst (\n\tBoolKind     Kind = 8\n\tEnumKind     Kind = 14\n\tInt32Kind    Kind = 5\n\tSint32Kind   Kind = 17\n\tUint32Kind   Kind = 13\n\tInt64Kind    Kind = 3\n\tSint64Kind   Kind = 18\n\tUint64Kind   Kind = 4\n\tSfixed32Kind Kind = 15\n\tFixed32Kind  Kind = 7\n\tFloatKind    Kind = 2\n\tSfixed64Kind Kind = 16\n\tFixed64Kind  Kind = 6\n\tDoubleKind   Kind = 1\n\tStringKind   Kind = 9\n\tBytesKind    Kind = 12\n\tMessageKind  Kind = 11\n\tGroupKind    Kind = 10\n)\n\n// IsValid reports whether the kind is valid.\nfunc (k Kind) IsValid() bool {\n\tswitch k {\n\tcase BoolKind, EnumKind,\n\t\tInt32Kind, Sint32Kind, Uint32Kind,\n\t\tInt64Kind, Sint64Kind, Uint64Kind,\n\t\tSfixed32Kind, Fixed32Kind, FloatKind,\n\t\tSfixed64Kind, Fixed64Kind, DoubleKind,\n\t\tStringKind, BytesKind, MessageKind, GroupKind:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// String returns k as a proto source identifier (e.g., \"bool\").\nfunc (k Kind) String() string {\n\tswitch k {\n\tcase BoolKind:\n\t\treturn \"bool\"\n\tcase EnumKind:\n\t\treturn \"enum\"\n\tcase Int32Kind:\n\t\treturn \"int32\"\n\tcase Sint32Kind:\n\t\treturn \"sint32\"\n\tcase Uint32Kind:\n\t\treturn \"uint32\"\n\tcase Int64Kind:\n\t\treturn \"int64\"\n\tcase Sint64Kind:\n\t\treturn \"sint64\"\n\tcase Uint64Kind:\n\t\treturn \"uint64\"\n\tcase Sfixed32Kind:\n\t\treturn \"sfixed32\"\n\tcase Fixed32Kind:\n\t\treturn \"fixed32\"\n\tcase FloatKind:\n\t\treturn \"float\"\n\tcase Sfixed64Kind:\n\t\treturn \"sfixed64\"\n\tcase Fixed64Kind:\n\t\treturn \"fixed64\"\n\tcase DoubleKind:\n\t\treturn \"double\"\n\tcase StringKind:\n\t\treturn \"string\"\n\tcase BytesKind:\n\t\treturn \"bytes\"\n\tcase MessageKind:\n\t\treturn \"message\"\n\tcase GroupKind:\n\t\treturn \"group\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"<unknown:%d>\", k)\n\t}\n}\n\n// GoString returns k as a Go source identifier (e.g., \"BoolKind\").\nfunc (k Kind) GoString() string {\n\tswitch k {\n\tcase BoolKind:\n\t\treturn \"BoolKind\"\n\tcase EnumKind:\n\t\treturn \"EnumKind\"\n\tcase Int32Kind:\n\t\treturn \"Int32Kind\"\n\tcase Sint32Kind:\n\t\treturn \"Sint32Kind\"\n\tcase Uint32Kind:\n\t\treturn \"Uint32Kind\"\n\tcase Int64Kind:\n\t\treturn \"Int64Kind\"\n\tcase Sint64Kind:\n\t\treturn \"Sint64Kind\"\n\tcase Uint64Kind:\n\t\treturn \"Uint64Kind\"\n\tcase Sfixed32Kind:\n\t\treturn \"Sfixed32Kind\"\n\tcase Fixed32Kind:\n\t\treturn \"Fixed32Kind\"\n\tcase FloatKind:\n\t\treturn \"FloatKind\"\n\tcase Sfixed64Kind:\n\t\treturn \"Sfixed64Kind\"\n\tcase Fixed64Kind:\n\t\treturn \"Fixed64Kind\"\n\tcase DoubleKind:\n\t\treturn \"DoubleKind\"\n\tcase StringKind:\n\t\treturn \"StringKind\"\n\tcase BytesKind:\n\t\treturn \"BytesKind\"\n\tcase MessageKind:\n\t\treturn \"MessageKind\"\n\tcase GroupKind:\n\t\treturn \"GroupKind\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"Kind(%d)\", k)\n\t}\n}\n\n// FieldNumber is the field number in a message.\ntype FieldNumber = protowire.Number\n\n// FieldNumbers represent a list of field numbers.\ntype FieldNumbers interface {\n\t// Len reports the number of fields in the list.\n\tLen() int\n\t// Get returns the ith field number. It panics if out of bounds.\n\tGet(i int) FieldNumber\n\t// Has reports whether n is within the list of fields.\n\tHas(n FieldNumber) bool\n\n\tdoNotImplement\n}\n\n// FieldRanges represent a list of field number ranges.\ntype FieldRanges interface {\n\t// Len reports the number of ranges in the list.\n\tLen() int\n\t// Get returns the ith range. It panics if out of bounds.\n\tGet(i int) [2]FieldNumber // start inclusive; end exclusive\n\t// Has reports whether n is within any of the ranges.\n\tHas(n FieldNumber) bool\n\n\tdoNotImplement\n}\n\n// EnumNumber is the numeric value for an enum.\ntype EnumNumber int32\n\n// EnumRanges represent a list of enum number ranges.\ntype EnumRanges interface {\n\t// Len reports the number of ranges in the list.\n\tLen() int\n\t// Get returns the ith range. It panics if out of bounds.\n\tGet(i int) [2]EnumNumber // start inclusive; end inclusive\n\t// Has reports whether n is within any of the ranges.\n\tHas(n EnumNumber) bool\n\n\tdoNotImplement\n}\n\n// Name is the short name for a proto declaration. This is not the name\n// as used in Go source code, which might not be identical to the proto name.\ntype Name string // e.g., \"Kind\"\n\n// IsValid reports whether s is a syntactically valid name.\n// An empty name is invalid.\nfunc (s Name) IsValid() bool {\n\treturn consumeIdent(string(s)) == len(s)\n}\n\n// Names represent a list of names.\ntype Names interface {\n\t// Len reports the number of names in the list.\n\tLen() int\n\t// Get returns the ith name. It panics if out of bounds.\n\tGet(i int) Name\n\t// Has reports whether s matches any names in the list.\n\tHas(s Name) bool\n\n\tdoNotImplement\n}\n\n// FullName is a qualified name that uniquely identifies a proto declaration.\n// A qualified name is the concatenation of the proto package along with the\n// fully-declared name (i.e., name of parent preceding the name of the child),\n// with a '.' delimiter placed between each [Name].\n//\n// This should not have any leading or trailing dots.\ntype FullName string // e.g., \"google.protobuf.Field.Kind\"\n\n// IsValid reports whether s is a syntactically valid full name.\n// An empty full name is invalid.\nfunc (s FullName) IsValid() bool {\n\ti := consumeIdent(string(s))\n\tif i < 0 {\n\t\treturn false\n\t}\n\tfor len(s) > i {\n\t\tif s[i] != '.' {\n\t\t\treturn false\n\t\t}\n\t\ti++\n\t\tn := consumeIdent(string(s[i:]))\n\t\tif n < 0 {\n\t\t\treturn false\n\t\t}\n\t\ti += n\n\t}\n\treturn true\n}\n\nfunc consumeIdent(s string) (i int) {\n\tif len(s) == 0 || !isLetter(s[i]) {\n\t\treturn -1\n\t}\n\ti++\n\tfor len(s) > i && isLetterDigit(s[i]) {\n\t\ti++\n\t}\n\treturn i\n}\nfunc isLetter(c byte) bool {\n\treturn c == '_' || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')\n}\nfunc isLetterDigit(c byte) bool {\n\treturn isLetter(c) || ('0' <= c && c <= '9')\n}\n\n// Name returns the short name, which is the last identifier segment.\n// A single segment FullName is the [Name] itself.\nfunc (n FullName) Name() Name {\n\tif i := strings.LastIndexByte(string(n), '.'); i >= 0 {\n\t\treturn Name(n[i+1:])\n\t}\n\treturn Name(n)\n}\n\n// Parent returns the full name with the trailing identifier removed.\n// A single segment FullName has no parent.\nfunc (n FullName) Parent() FullName {\n\tif i := strings.LastIndexByte(string(n), '.'); i >= 0 {\n\t\treturn n[:i]\n\t}\n\treturn \"\"\n}\n\n// Append returns the qualified name appended with the provided short name.\n//\n// Invariant: n == n.Parent().Append(n.Name()) // assuming n is valid\nfunc (n FullName) Append(s Name) FullName {\n\tif n == \"\" {\n\t\treturn FullName(s)\n\t}\n\treturn n + \".\" + FullName(s)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/source.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport (\n\t\"strconv\"\n)\n\n// SourceLocations is a list of source locations.\ntype SourceLocations interface {\n\t// Len reports the number of source locations in the proto file.\n\tLen() int\n\t// Get returns the ith SourceLocation. It panics if out of bounds.\n\tGet(int) SourceLocation\n\n\t// ByPath returns the SourceLocation for the given path,\n\t// returning the first location if multiple exist for the same path.\n\t// If multiple locations exist for the same path,\n\t// then SourceLocation.Next index can be used to identify the\n\t// index of the next SourceLocation.\n\t// If no location exists for this path, it returns the zero value.\n\tByPath(path SourcePath) SourceLocation\n\n\t// ByDescriptor returns the SourceLocation for the given descriptor,\n\t// returning the first location if multiple exist for the same path.\n\t// If no location exists for this descriptor, it returns the zero value.\n\tByDescriptor(desc Descriptor) SourceLocation\n\n\tdoNotImplement\n}\n\n// SourceLocation describes a source location and\n// corresponds with the google.protobuf.SourceCodeInfo.Location message.\ntype SourceLocation struct {\n\t// Path is the path to the declaration from the root file descriptor.\n\t// The contents of this slice must not be mutated.\n\tPath SourcePath\n\n\t// StartLine and StartColumn are the zero-indexed starting location\n\t// in the source file for the declaration.\n\tStartLine, StartColumn int\n\t// EndLine and EndColumn are the zero-indexed ending location\n\t// in the source file for the declaration.\n\t// In the descriptor.proto, the end line may be omitted if it is identical\n\t// to the start line. Here, it is always populated.\n\tEndLine, EndColumn int\n\n\t// LeadingDetachedComments are the leading detached comments\n\t// for the declaration. The contents of this slice must not be mutated.\n\tLeadingDetachedComments []string\n\t// LeadingComments is the leading attached comment for the declaration.\n\tLeadingComments string\n\t// TrailingComments is the trailing attached comment for the declaration.\n\tTrailingComments string\n\n\t// Next is an index into SourceLocations for the next source location that\n\t// has the same Path. It is zero if there is no next location.\n\tNext int\n}\n\n// SourcePath identifies part of a file descriptor for a source location.\n// The SourcePath is a sequence of either field numbers or indexes into\n// a repeated field that form a path starting from the root file descriptor.\n//\n// See google.protobuf.SourceCodeInfo.Location.path.\ntype SourcePath []int32\n\n// Equal reports whether p1 equals p2.\nfunc (p1 SourcePath) Equal(p2 SourcePath) bool {\n\tif len(p1) != len(p2) {\n\t\treturn false\n\t}\n\tfor i := range p1 {\n\t\tif p1[i] != p2[i] {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// String formats the path in a humanly readable manner.\n// The output is guaranteed to be deterministic,\n// making it suitable for use as a key into a Go map.\n// It is not guaranteed to be stable as the exact output could change\n// in a future version of this module.\n//\n// Example output:\n//\n//\t.message_type[6].nested_type[15].field[3]\nfunc (p SourcePath) String() string {\n\tb := p.appendFileDescriptorProto(nil)\n\tfor _, i := range p {\n\t\tb = append(b, '.')\n\t\tb = strconv.AppendInt(b, int64(i), 10)\n\t}\n\treturn string(b)\n}\n\ntype appendFunc func(*SourcePath, []byte) []byte\n\nfunc (p *SourcePath) appendSingularField(b []byte, name string, f appendFunc) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tb = append(b, '.')\n\tb = append(b, name...)\n\t*p = (*p)[1:]\n\tif f != nil {\n\t\tb = f(p, b)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendRepeatedField(b []byte, name string, f appendFunc) []byte {\n\tb = p.appendSingularField(b, name, nil)\n\tif len(*p) == 0 || (*p)[0] < 0 {\n\t\treturn b\n\t}\n\tb = append(b, '[')\n\tb = strconv.AppendUint(b, uint64((*p)[0]), 10)\n\tb = append(b, ']')\n\t*p = (*p)[1:]\n\tif f != nil {\n\t\tb = f(p, b)\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Code generated by generate-protos. DO NOT EDIT.\n\npackage protoreflect\n\nfunc (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"package\", nil)\n\tcase 3:\n\t\tb = p.appendRepeatedField(b, \"dependency\", nil)\n\tcase 10:\n\t\tb = p.appendRepeatedField(b, \"public_dependency\", nil)\n\tcase 11:\n\t\tb = p.appendRepeatedField(b, \"weak_dependency\", nil)\n\tcase 15:\n\t\tb = p.appendRepeatedField(b, \"option_dependency\", nil)\n\tcase 4:\n\t\tb = p.appendRepeatedField(b, \"message_type\", (*SourcePath).appendDescriptorProto)\n\tcase 5:\n\t\tb = p.appendRepeatedField(b, \"enum_type\", (*SourcePath).appendEnumDescriptorProto)\n\tcase 6:\n\t\tb = p.appendRepeatedField(b, \"service\", (*SourcePath).appendServiceDescriptorProto)\n\tcase 7:\n\t\tb = p.appendRepeatedField(b, \"extension\", (*SourcePath).appendFieldDescriptorProto)\n\tcase 8:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendFileOptions)\n\tcase 9:\n\t\tb = p.appendSingularField(b, \"source_code_info\", (*SourcePath).appendSourceCodeInfo)\n\tcase 12:\n\t\tb = p.appendSingularField(b, \"syntax\", nil)\n\tcase 14:\n\t\tb = p.appendSingularField(b, \"edition\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"field\", (*SourcePath).appendFieldDescriptorProto)\n\tcase 6:\n\t\tb = p.appendRepeatedField(b, \"extension\", (*SourcePath).appendFieldDescriptorProto)\n\tcase 3:\n\t\tb = p.appendRepeatedField(b, \"nested_type\", (*SourcePath).appendDescriptorProto)\n\tcase 4:\n\t\tb = p.appendRepeatedField(b, \"enum_type\", (*SourcePath).appendEnumDescriptorProto)\n\tcase 5:\n\t\tb = p.appendRepeatedField(b, \"extension_range\", (*SourcePath).appendDescriptorProto_ExtensionRange)\n\tcase 8:\n\t\tb = p.appendRepeatedField(b, \"oneof_decl\", (*SourcePath).appendOneofDescriptorProto)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendMessageOptions)\n\tcase 9:\n\t\tb = p.appendRepeatedField(b, \"reserved_range\", (*SourcePath).appendDescriptorProto_ReservedRange)\n\tcase 10:\n\t\tb = p.appendRepeatedField(b, \"reserved_name\", nil)\n\tcase 11:\n\t\tb = p.appendSingularField(b, \"visibility\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"value\", (*SourcePath).appendEnumValueDescriptorProto)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendEnumOptions)\n\tcase 4:\n\t\tb = p.appendRepeatedField(b, \"reserved_range\", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange)\n\tcase 5:\n\t\tb = p.appendRepeatedField(b, \"reserved_name\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"visibility\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendServiceDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"method\", (*SourcePath).appendMethodDescriptorProto)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendServiceOptions)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFieldDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"number\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"label\", nil)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"type\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"type_name\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"extendee\", nil)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"default_value\", nil)\n\tcase 9:\n\t\tb = p.appendSingularField(b, \"oneof_index\", nil)\n\tcase 10:\n\t\tb = p.appendSingularField(b, \"json_name\", nil)\n\tcase 8:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendFieldOptions)\n\tcase 17:\n\t\tb = p.appendSingularField(b, \"proto3_optional\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFileOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"java_package\", nil)\n\tcase 8:\n\t\tb = p.appendSingularField(b, \"java_outer_classname\", nil)\n\tcase 10:\n\t\tb = p.appendSingularField(b, \"java_multiple_files\", nil)\n\tcase 20:\n\t\tb = p.appendSingularField(b, \"java_generate_equals_and_hash\", nil)\n\tcase 27:\n\t\tb = p.appendSingularField(b, \"java_string_check_utf8\", nil)\n\tcase 9:\n\t\tb = p.appendSingularField(b, \"optimize_for\", nil)\n\tcase 11:\n\t\tb = p.appendSingularField(b, \"go_package\", nil)\n\tcase 16:\n\t\tb = p.appendSingularField(b, \"cc_generic_services\", nil)\n\tcase 17:\n\t\tb = p.appendSingularField(b, \"java_generic_services\", nil)\n\tcase 18:\n\t\tb = p.appendSingularField(b, \"py_generic_services\", nil)\n\tcase 23:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 31:\n\t\tb = p.appendSingularField(b, \"cc_enable_arenas\", nil)\n\tcase 36:\n\t\tb = p.appendSingularField(b, \"objc_class_prefix\", nil)\n\tcase 37:\n\t\tb = p.appendSingularField(b, \"csharp_namespace\", nil)\n\tcase 39:\n\t\tb = p.appendSingularField(b, \"swift_prefix\", nil)\n\tcase 40:\n\t\tb = p.appendSingularField(b, \"php_class_prefix\", nil)\n\tcase 41:\n\t\tb = p.appendSingularField(b, \"php_namespace\", nil)\n\tcase 44:\n\t\tb = p.appendSingularField(b, \"php_metadata_namespace\", nil)\n\tcase 45:\n\t\tb = p.appendSingularField(b, \"ruby_package\", nil)\n\tcase 50:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendSourceCodeInfo(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendRepeatedField(b, \"location\", (*SourcePath).appendSourceCodeInfo_Location)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendDescriptorProto_ExtensionRange(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"start\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"end\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendExtensionRangeOptions)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendOneofDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendOneofOptions)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendMessageOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"message_set_wire_format\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"no_standard_descriptor_accessor\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"map_entry\", nil)\n\tcase 11:\n\t\tb = p.appendSingularField(b, \"deprecated_legacy_json_field_conflicts\", nil)\n\tcase 12:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendDescriptorProto_ReservedRange(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"start\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"end\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendEnumValueDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"number\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendEnumValueOptions)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendEnumOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"allow_alias\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"deprecated_legacy_json_field_conflicts\", nil)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendEnumDescriptorProto_EnumReservedRange(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"start\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"end\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendMethodDescriptorProto(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"input_type\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"output_type\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"options\", (*SourcePath).appendMethodOptions)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"client_streaming\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"server_streaming\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendServiceOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 34:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 33:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFieldOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"ctype\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"packed\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"jstype\", nil)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"lazy\", nil)\n\tcase 15:\n\t\tb = p.appendSingularField(b, \"unverified_lazy\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 10:\n\t\tb = p.appendSingularField(b, \"weak\", nil)\n\tcase 16:\n\t\tb = p.appendSingularField(b, \"debug_redact\", nil)\n\tcase 17:\n\t\tb = p.appendSingularField(b, \"retention\", nil)\n\tcase 19:\n\t\tb = p.appendRepeatedField(b, \"targets\", nil)\n\tcase 20:\n\t\tb = p.appendRepeatedField(b, \"edition_defaults\", (*SourcePath).appendFieldOptions_EditionDefault)\n\tcase 21:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 22:\n\t\tb = p.appendSingularField(b, \"feature_support\", (*SourcePath).appendFieldOptions_FeatureSupport)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFeatureSet(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"field_presence\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"enum_type\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"repeated_field_encoding\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"utf8_validation\", nil)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"message_encoding\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"json_format\", nil)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"enforce_naming_style\", nil)\n\tcase 8:\n\t\tb = p.appendSingularField(b, \"default_symbol_visibility\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendUninterpretedOption(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"name\", (*SourcePath).appendUninterpretedOption_NamePart)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"identifier_value\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"positive_int_value\", nil)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"negative_int_value\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"double_value\", nil)\n\tcase 7:\n\t\tb = p.appendSingularField(b, \"string_value\", nil)\n\tcase 8:\n\t\tb = p.appendSingularField(b, \"aggregate_value\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendSourceCodeInfo_Location(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendRepeatedField(b, \"path\", nil)\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"span\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"leading_comments\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"trailing_comments\", nil)\n\tcase 6:\n\t\tb = p.appendRepeatedField(b, \"leading_detached_comments\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\tcase 2:\n\t\tb = p.appendRepeatedField(b, \"declaration\", (*SourcePath).appendExtensionRangeOptions_Declaration)\n\tcase 50:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"verification\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendOneofOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendEnumValueOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"debug_redact\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"feature_support\", (*SourcePath).appendFieldOptions_FeatureSupport)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendMethodOptions(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 33:\n\t\tb = p.appendSingularField(b, \"deprecated\", nil)\n\tcase 34:\n\t\tb = p.appendSingularField(b, \"idempotency_level\", nil)\n\tcase 35:\n\t\tb = p.appendSingularField(b, \"features\", (*SourcePath).appendFeatureSet)\n\tcase 999:\n\t\tb = p.appendRepeatedField(b, \"uninterpreted_option\", (*SourcePath).appendUninterpretedOption)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"edition\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"value\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendFieldOptions_FeatureSupport(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"edition_introduced\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"edition_deprecated\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"deprecation_warning\", nil)\n\tcase 4:\n\t\tb = p.appendSingularField(b, \"edition_removed\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"name_part\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"is_extension\", nil)\n\t}\n\treturn b\n}\n\nfunc (p *SourcePath) appendExtensionRangeOptions_Declaration(b []byte) []byte {\n\tif len(*p) == 0 {\n\t\treturn b\n\t}\n\tswitch (*p)[0] {\n\tcase 1:\n\t\tb = p.appendSingularField(b, \"number\", nil)\n\tcase 2:\n\t\tb = p.appendSingularField(b, \"full_name\", nil)\n\tcase 3:\n\t\tb = p.appendSingularField(b, \"type\", nil)\n\tcase 5:\n\t\tb = p.appendSingularField(b, \"reserved\", nil)\n\tcase 6:\n\t\tb = p.appendSingularField(b, \"repeated\", nil)\n\t}\n\treturn b\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/type.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\n// Descriptor provides a set of accessors that are common to every descriptor.\n// Each descriptor type wraps the equivalent google.protobuf.XXXDescriptorProto,\n// but provides efficient lookup and immutability.\n//\n// Each descriptor is comparable. Equality implies that the two types are\n// exactly identical. However, it is possible for the same semantically\n// identical proto type to be represented by multiple type descriptors.\n//\n// For example, suppose we have t1 and t2 which are both an [MessageDescriptor].\n// If t1 == t2, then the types are definitely equal and all accessors return\n// the same information. However, if t1 != t2, then it is still possible that\n// they still represent the same proto type (e.g., t1.FullName == t2.FullName).\n// This can occur if a descriptor type is created dynamically, or multiple\n// versions of the same proto type are accidentally linked into the Go binary.\ntype Descriptor interface {\n\t// ParentFile returns the parent file descriptor that this descriptor\n\t// is declared within. The parent file for the file descriptor is itself.\n\t//\n\t// Support for this functionality is optional and may return nil.\n\tParentFile() FileDescriptor\n\n\t// Parent returns the parent containing this descriptor declaration.\n\t// The following shows the mapping from child type to possible parent types:\n\t//\n\t//\t╔═════════════════════╤═══════════════════════════════════╗\n\t//\t║ Child type          │ Possible parent types             ║\n\t//\t╠═════════════════════╪═══════════════════════════════════╣\n\t//\t║ FileDescriptor      │ nil                               ║\n\t//\t║ MessageDescriptor   │ FileDescriptor, MessageDescriptor ║\n\t//\t║ FieldDescriptor     │ FileDescriptor, MessageDescriptor ║\n\t//\t║ OneofDescriptor     │ MessageDescriptor                 ║\n\t//\t║ EnumDescriptor      │ FileDescriptor, MessageDescriptor ║\n\t//\t║ EnumValueDescriptor │ EnumDescriptor                    ║\n\t//\t║ ServiceDescriptor   │ FileDescriptor                    ║\n\t//\t║ MethodDescriptor    │ ServiceDescriptor                 ║\n\t//\t╚═════════════════════╧═══════════════════════════════════╝\n\t//\n\t// Support for this functionality is optional and may return nil.\n\tParent() Descriptor\n\n\t// Index returns the index of this descriptor within its parent.\n\t// It returns 0 if the descriptor does not have a parent or if the parent\n\t// is unknown.\n\tIndex() int\n\n\t// Syntax is the protobuf syntax.\n\tSyntax() Syntax // e.g., Proto2 or Proto3\n\n\t// Name is the short name of the declaration (i.e., FullName.Name).\n\tName() Name // e.g., \"Any\"\n\n\t// FullName is the fully-qualified name of the declaration.\n\t//\n\t// The FullName is a concatenation of the full name of the type that this\n\t// type is declared within and the declaration name. For example,\n\t// field \"foo_field\" in message \"proto.package.MyMessage\" is\n\t// uniquely identified as \"proto.package.MyMessage.foo_field\".\n\t// Enum values are an exception to the rule (see EnumValueDescriptor).\n\tFullName() FullName // e.g., \"google.protobuf.Any\"\n\n\t// IsPlaceholder reports whether type information is missing since a\n\t// dependency is not resolved, in which case only name information is known.\n\t//\n\t// Placeholder types may only be returned by the following accessors\n\t// as a result of unresolved dependencies:\n\t//\n\t//\t╔═══════════════════════════════════╤═════════════════════╗\n\t//\t║ Accessor                          │ Descriptor          ║\n\t//\t╠═══════════════════════════════════╪═════════════════════╣\n\t//\t║ FileImports.FileDescriptor        │ FileDescriptor      ║\n\t//\t║ FieldDescriptor.Enum              │ EnumDescriptor      ║\n\t//\t║ FieldDescriptor.Message           │ MessageDescriptor   ║\n\t//\t║ FieldDescriptor.DefaultEnumValue  │ EnumValueDescriptor ║\n\t//\t║ FieldDescriptor.ContainingMessage │ MessageDescriptor   ║\n\t//\t║ MethodDescriptor.Input            │ MessageDescriptor   ║\n\t//\t║ MethodDescriptor.Output           │ MessageDescriptor   ║\n\t//\t╚═══════════════════════════════════╧═════════════════════╝\n\t//\n\t// If true, only Name and FullName are valid.\n\t// For FileDescriptor, the Path is also valid.\n\tIsPlaceholder() bool\n\n\t// Options returns the descriptor options. The caller must not modify\n\t// the returned value.\n\t//\n\t// To avoid a dependency cycle, this function returns a proto.Message value.\n\t// The proto message type returned for each descriptor type is as follows:\n\t//\t╔═════════════════════╤══════════════════════════════════════════╗\n\t//\t║ Go type             │ Protobuf message type                    ║\n\t//\t╠═════════════════════╪══════════════════════════════════════════╣\n\t//\t║ FileDescriptor      │ google.protobuf.FileOptions              ║\n\t//\t║ EnumDescriptor      │ google.protobuf.EnumOptions              ║\n\t//\t║ EnumValueDescriptor │ google.protobuf.EnumValueOptions         ║\n\t//\t║ MessageDescriptor   │ google.protobuf.MessageOptions           ║\n\t//\t║ FieldDescriptor     │ google.protobuf.FieldOptions             ║\n\t//\t║ OneofDescriptor     │ google.protobuf.OneofOptions             ║\n\t//\t║ ServiceDescriptor   │ google.protobuf.ServiceOptions           ║\n\t//\t║ MethodDescriptor    │ google.protobuf.MethodOptions            ║\n\t//\t╚═════════════════════╧══════════════════════════════════════════╝\n\t//\n\t// This method returns a typed nil-pointer if no options are present.\n\t// The caller must import the descriptorpb package to use this.\n\tOptions() ProtoMessage\n\n\tdoNotImplement\n}\n\n// FileDescriptor describes the types in a complete proto file and\n// corresponds with the google.protobuf.FileDescriptorProto message.\n//\n// Top-level declarations:\n// [EnumDescriptor], [MessageDescriptor], [FieldDescriptor], and/or [ServiceDescriptor].\ntype FileDescriptor interface {\n\tDescriptor // Descriptor.FullName is identical to Package\n\n\t// Path returns the file name, relative to the source tree root.\n\tPath() string // e.g., \"path/to/file.proto\"\n\t// Package returns the protobuf package namespace.\n\tPackage() FullName // e.g., \"google.protobuf\"\n\n\t// Imports is a list of imported proto files.\n\tImports() FileImports\n\n\t// Enums is a list of the top-level enum declarations.\n\tEnums() EnumDescriptors\n\t// Messages is a list of the top-level message declarations.\n\tMessages() MessageDescriptors\n\t// Extensions is a list of the top-level extension declarations.\n\tExtensions() ExtensionDescriptors\n\t// Services is a list of the top-level service declarations.\n\tServices() ServiceDescriptors\n\n\t// SourceLocations is a list of source locations.\n\tSourceLocations() SourceLocations\n\n\tisFileDescriptor\n}\ntype isFileDescriptor interface{ ProtoType(FileDescriptor) }\n\n// FileImports is a list of file imports.\ntype FileImports interface {\n\t// Len reports the number of files imported by this proto file.\n\tLen() int\n\t// Get returns the ith FileImport. It panics if out of bounds.\n\tGet(i int) FileImport\n\n\tdoNotImplement\n}\n\n// FileImport is the declaration for a proto file import.\ntype FileImport struct {\n\t// FileDescriptor is the file type for the given import.\n\t// It is a placeholder descriptor if IsWeak is set or if a dependency has\n\t// not been regenerated to implement the new reflection APIs.\n\tFileDescriptor\n\n\t// IsPublic reports whether this is a public import, which causes this file\n\t// to alias declarations within the imported file. The intended use cases\n\t// for this feature is the ability to move proto files without breaking\n\t// existing dependencies.\n\t//\n\t// The current file and the imported file must be within proto package.\n\tIsPublic bool\n\n\t// Deprecated: support for weak fields has been removed.\n\tIsWeak bool\n}\n\n// MessageDescriptor describes a message and\n// corresponds with the google.protobuf.DescriptorProto message.\n//\n// Nested declarations:\n// [FieldDescriptor], [OneofDescriptor], [FieldDescriptor], [EnumDescriptor],\n// and/or [MessageDescriptor].\ntype MessageDescriptor interface {\n\tDescriptor\n\n\t// IsMapEntry indicates that this is an auto-generated message type to\n\t// represent the entry type for a map field.\n\t//\n\t// Map entry messages have only two fields:\n\t//\t• a \"key\" field with a field number of 1\n\t//\t• a \"value\" field with a field number of 2\n\t// The key and value types are determined by these two fields.\n\t//\n\t// If IsMapEntry is true, it implies that FieldDescriptor.IsMap is true\n\t// for some field with this message type.\n\tIsMapEntry() bool\n\n\t// Fields is a list of nested field declarations.\n\tFields() FieldDescriptors\n\t// Oneofs is a list of nested oneof declarations.\n\tOneofs() OneofDescriptors\n\n\t// ReservedNames is a list of reserved field names.\n\tReservedNames() Names\n\t// ReservedRanges is a list of reserved ranges of field numbers.\n\tReservedRanges() FieldRanges\n\t// RequiredNumbers is a list of required field numbers.\n\t// In Proto3, it is always an empty list.\n\tRequiredNumbers() FieldNumbers\n\t// ExtensionRanges is the field ranges used for extension fields.\n\t// In Proto3, it is always an empty ranges.\n\tExtensionRanges() FieldRanges\n\t// ExtensionRangeOptions returns the ith extension range options.\n\t//\n\t// To avoid a dependency cycle, this method returns a proto.Message] value,\n\t// which always contains a google.protobuf.ExtensionRangeOptions message.\n\t// This method returns a typed nil-pointer if no options are present.\n\t// The caller must import the descriptorpb package to use this.\n\tExtensionRangeOptions(i int) ProtoMessage\n\n\t// Enums is a list of nested enum declarations.\n\tEnums() EnumDescriptors\n\t// Messages is a list of nested message declarations.\n\tMessages() MessageDescriptors\n\t// Extensions is a list of nested extension declarations.\n\tExtensions() ExtensionDescriptors\n\n\tisMessageDescriptor\n}\ntype isMessageDescriptor interface{ ProtoType(MessageDescriptor) }\n\n// MessageType encapsulates a [MessageDescriptor] with a concrete Go implementation.\n// It is recommended that implementations of this interface also implement the\n// [MessageFieldTypes] interface.\ntype MessageType interface {\n\t// New returns a newly allocated empty message.\n\t// It may return nil for synthetic messages representing a map entry.\n\tNew() Message\n\n\t// Zero returns an empty, read-only message.\n\t// It may return nil for synthetic messages representing a map entry.\n\tZero() Message\n\n\t// Descriptor returns the message descriptor.\n\t//\n\t// Invariant: t.Descriptor() == t.New().Descriptor()\n\tDescriptor() MessageDescriptor\n}\n\n// MessageFieldTypes extends a [MessageType] by providing type information\n// regarding enums and messages referenced by the message fields.\ntype MessageFieldTypes interface {\n\tMessageType\n\n\t// Enum returns the EnumType for the ith field in MessageDescriptor.Fields.\n\t// It returns nil if the ith field is not an enum kind.\n\t// It panics if out of bounds.\n\t//\n\t// Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum()\n\tEnum(i int) EnumType\n\n\t// Message returns the MessageType for the ith field in MessageDescriptor.Fields.\n\t// It returns nil if the ith field is not a message or group kind.\n\t// It panics if out of bounds.\n\t//\n\t// Invariant: mt.Message(i).Descriptor() == mt.Descriptor().Fields(i).Message()\n\tMessage(i int) MessageType\n}\n\n// MessageDescriptors is a list of message declarations.\ntype MessageDescriptors interface {\n\t// Len reports the number of messages.\n\tLen() int\n\t// Get returns the ith MessageDescriptor. It panics if out of bounds.\n\tGet(i int) MessageDescriptor\n\t// ByName returns the MessageDescriptor for a message named s.\n\t// It returns nil if not found.\n\tByName(s Name) MessageDescriptor\n\n\tdoNotImplement\n}\n\n// FieldDescriptor describes a field within a message and\n// corresponds with the google.protobuf.FieldDescriptorProto message.\n//\n// It is used for both normal fields defined within the parent message\n// (e.g., [MessageDescriptor.Fields]) and fields that extend some remote message\n// (e.g., [FileDescriptor.Extensions] or [MessageDescriptor.Extensions]).\ntype FieldDescriptor interface {\n\tDescriptor\n\n\t// Number reports the unique number for this field.\n\tNumber() FieldNumber\n\t// Cardinality reports the cardinality for this field.\n\tCardinality() Cardinality\n\t// Kind reports the basic kind for this field.\n\tKind() Kind\n\n\t// HasJSONName reports whether this field has an explicitly set JSON name.\n\tHasJSONName() bool\n\n\t// JSONName reports the name used for JSON serialization.\n\t// It is usually the camel-cased form of the field name.\n\t// Extension fields are represented by the full name surrounded by brackets.\n\tJSONName() string\n\n\t// TextName reports the name used for text serialization.\n\t// It is usually the name of the field, except that groups use the name\n\t// of the inlined message, and extension fields are represented by the\n\t// full name surrounded by brackets.\n\tTextName() string\n\n\t// HasPresence reports whether the field distinguishes between unpopulated\n\t// and default values.\n\tHasPresence() bool\n\n\t// IsExtension reports whether this is an extension field. If false,\n\t// then Parent and ContainingMessage refer to the same message.\n\t// Otherwise, ContainingMessage and Parent likely differ.\n\tIsExtension() bool\n\n\t// HasOptionalKeyword reports whether the \"optional\" keyword was explicitly\n\t// specified in the source .proto file.\n\tHasOptionalKeyword() bool\n\n\t// Deprecated: support for weak fields has been removed.\n\tIsWeak() bool\n\n\t// IsPacked reports whether repeated primitive numeric kinds should be\n\t// serialized using a packed encoding.\n\t// If true, then it implies Cardinality is Repeated.\n\tIsPacked() bool\n\n\t// IsList reports whether this field represents a list,\n\t// where the value type for the associated field is a List.\n\t// It is equivalent to checking whether Cardinality is Repeated and\n\t// that IsMap reports false.\n\tIsList() bool\n\n\t// IsMap reports whether this field represents a map,\n\t// where the value type for the associated field is a Map.\n\t// It is equivalent to checking whether Cardinality is Repeated,\n\t// that the Kind is MessageKind, and that MessageDescriptor.IsMapEntry reports true.\n\tIsMap() bool\n\n\t// MapKey returns the field descriptor for the key in the map entry.\n\t// It returns nil if IsMap reports false.\n\tMapKey() FieldDescriptor\n\n\t// MapValue returns the field descriptor for the value in the map entry.\n\t// It returns nil if IsMap reports false.\n\tMapValue() FieldDescriptor\n\n\t// HasDefault reports whether this field has a default value.\n\tHasDefault() bool\n\n\t// Default returns the default value for scalar fields.\n\t// For proto2, it is the default value as specified in the proto file,\n\t// or the zero value if unspecified.\n\t// For proto3, it is always the zero value of the scalar.\n\t// The Value type is determined by the Kind.\n\tDefault() Value\n\n\t// DefaultEnumValue returns the enum value descriptor for the default value\n\t// of an enum field, and is nil for any other kind of field.\n\tDefaultEnumValue() EnumValueDescriptor\n\n\t// ContainingOneof is the containing oneof that this field belongs to,\n\t// and is nil if this field is not part of a oneof.\n\tContainingOneof() OneofDescriptor\n\n\t// ContainingMessage is the containing message that this field belongs to.\n\t// For extension fields, this may not necessarily be the parent message\n\t// that the field is declared within.\n\tContainingMessage() MessageDescriptor\n\n\t// Enum is the enum descriptor if Kind is EnumKind.\n\t// It returns nil for any other Kind.\n\tEnum() EnumDescriptor\n\n\t// Message is the message descriptor if Kind is\n\t// MessageKind or GroupKind. It returns nil for any other Kind.\n\tMessage() MessageDescriptor\n\n\tisFieldDescriptor\n}\ntype isFieldDescriptor interface{ ProtoType(FieldDescriptor) }\n\n// FieldDescriptors is a list of field declarations.\ntype FieldDescriptors interface {\n\t// Len reports the number of fields.\n\tLen() int\n\t// Get returns the ith FieldDescriptor. It panics if out of bounds.\n\tGet(i int) FieldDescriptor\n\t// ByName returns the FieldDescriptor for a field named s.\n\t// It returns nil if not found.\n\tByName(s Name) FieldDescriptor\n\t// ByJSONName returns the FieldDescriptor for a field with s as the JSON name.\n\t// It returns nil if not found.\n\tByJSONName(s string) FieldDescriptor\n\t// ByTextName returns the FieldDescriptor for a field with s as the text name.\n\t// It returns nil if not found.\n\tByTextName(s string) FieldDescriptor\n\t// ByNumber returns the FieldDescriptor for a field numbered n.\n\t// It returns nil if not found.\n\tByNumber(n FieldNumber) FieldDescriptor\n\n\tdoNotImplement\n}\n\n// OneofDescriptor describes a oneof field set within a given message and\n// corresponds with the google.protobuf.OneofDescriptorProto message.\ntype OneofDescriptor interface {\n\tDescriptor\n\n\t// IsSynthetic reports whether this is a synthetic oneof created to support\n\t// proto3 optional semantics. If true, Fields contains exactly one field\n\t// with FieldDescriptor.HasOptionalKeyword specified.\n\tIsSynthetic() bool\n\n\t// Fields is a list of fields belonging to this oneof.\n\tFields() FieldDescriptors\n\n\tisOneofDescriptor\n}\ntype isOneofDescriptor interface{ ProtoType(OneofDescriptor) }\n\n// OneofDescriptors is a list of oneof declarations.\ntype OneofDescriptors interface {\n\t// Len reports the number of oneof fields.\n\tLen() int\n\t// Get returns the ith OneofDescriptor. It panics if out of bounds.\n\tGet(i int) OneofDescriptor\n\t// ByName returns the OneofDescriptor for a oneof named s.\n\t// It returns nil if not found.\n\tByName(s Name) OneofDescriptor\n\n\tdoNotImplement\n}\n\n// ExtensionDescriptor is an alias of [FieldDescriptor] for documentation.\ntype ExtensionDescriptor = FieldDescriptor\n\n// ExtensionTypeDescriptor is an [ExtensionDescriptor] with an associated [ExtensionType].\ntype ExtensionTypeDescriptor interface {\n\tExtensionDescriptor\n\n\t// Type returns the associated ExtensionType.\n\tType() ExtensionType\n\n\t// Descriptor returns the plain ExtensionDescriptor without the\n\t// associated ExtensionType.\n\tDescriptor() ExtensionDescriptor\n}\n\n// ExtensionDescriptors is a list of field declarations.\ntype ExtensionDescriptors interface {\n\t// Len reports the number of fields.\n\tLen() int\n\t// Get returns the ith ExtensionDescriptor. It panics if out of bounds.\n\tGet(i int) ExtensionDescriptor\n\t// ByName returns the ExtensionDescriptor for a field named s.\n\t// It returns nil if not found.\n\tByName(s Name) ExtensionDescriptor\n\n\tdoNotImplement\n}\n\n// ExtensionType encapsulates an [ExtensionDescriptor] with a concrete\n// Go implementation. The nested field descriptor must be for a extension field.\n//\n// While a normal field is a member of the parent message that it is declared\n// within (see [Descriptor.Parent]), an extension field is a member of some other\n// target message (see [FieldDescriptor.ContainingMessage]) and may have no\n// relationship with the parent. However, the full name of an extension field is\n// relative to the parent that it is declared within.\n//\n// For example:\n//\n//\tsyntax = \"proto2\";\n//\tpackage example;\n//\tmessage FooMessage {\n//\t\textensions 100 to max;\n//\t}\n//\tmessage BarMessage {\n//\t\textends FooMessage { optional BarMessage bar_field = 100; }\n//\t}\n//\n// Field \"bar_field\" is an extension of FooMessage, but its full name is\n// \"example.BarMessage.bar_field\" instead of \"example.FooMessage.bar_field\".\ntype ExtensionType interface {\n\t// New returns a new value for the field.\n\t// For scalars, this returns the default value in native Go form.\n\tNew() Value\n\n\t// Zero returns a new value for the field.\n\t// For scalars, this returns the default value in native Go form.\n\t// For composite types, this returns an empty, read-only message, list, or map.\n\tZero() Value\n\n\t// TypeDescriptor returns the extension type descriptor.\n\tTypeDescriptor() ExtensionTypeDescriptor\n\n\t// ValueOf wraps the input and returns it as a Value.\n\t// ValueOf panics if the input value is invalid or not the appropriate type.\n\t//\n\t// ValueOf is more extensive than protoreflect.ValueOf for a given field's\n\t// value as it has more type information available.\n\tValueOf(any) Value\n\n\t// InterfaceOf completely unwraps the Value to the underlying Go type.\n\t// InterfaceOf panics if the input is nil or does not represent the\n\t// appropriate underlying Go type. For composite types, it panics if the\n\t// value is not mutable.\n\t//\n\t// InterfaceOf is able to unwrap the Value further than Value.Interface\n\t// as it has more type information available.\n\tInterfaceOf(Value) any\n\n\t// IsValidValue reports whether the Value is valid to assign to the field.\n\tIsValidValue(Value) bool\n\n\t// IsValidInterface reports whether the input is valid to assign to the field.\n\tIsValidInterface(any) bool\n}\n\n// EnumDescriptor describes an enum and\n// corresponds with the google.protobuf.EnumDescriptorProto message.\n//\n// Nested declarations:\n// [EnumValueDescriptor].\ntype EnumDescriptor interface {\n\tDescriptor\n\n\t// Values is a list of nested enum value declarations.\n\tValues() EnumValueDescriptors\n\n\t// ReservedNames is a list of reserved enum names.\n\tReservedNames() Names\n\t// ReservedRanges is a list of reserved ranges of enum numbers.\n\tReservedRanges() EnumRanges\n\n\t// IsClosed reports whether this enum uses closed semantics.\n\t// See https://protobuf.dev/programming-guides/enum/#definitions.\n\t// Note: the Go protobuf implementation is not spec compliant and treats\n\t// all enums as open enums.\n\tIsClosed() bool\n\n\tisEnumDescriptor\n}\ntype isEnumDescriptor interface{ ProtoType(EnumDescriptor) }\n\n// EnumType encapsulates an [EnumDescriptor] with a concrete Go implementation.\ntype EnumType interface {\n\t// New returns an instance of this enum type with its value set to n.\n\tNew(n EnumNumber) Enum\n\n\t// Descriptor returns the enum descriptor.\n\t//\n\t// Invariant: t.Descriptor() == t.New(0).Descriptor()\n\tDescriptor() EnumDescriptor\n}\n\n// EnumDescriptors is a list of enum declarations.\ntype EnumDescriptors interface {\n\t// Len reports the number of enum types.\n\tLen() int\n\t// Get returns the ith EnumDescriptor. It panics if out of bounds.\n\tGet(i int) EnumDescriptor\n\t// ByName returns the EnumDescriptor for an enum named s.\n\t// It returns nil if not found.\n\tByName(s Name) EnumDescriptor\n\n\tdoNotImplement\n}\n\n// EnumValueDescriptor describes an enum value and\n// corresponds with the google.protobuf.EnumValueDescriptorProto message.\n//\n// All other proto declarations are in the namespace of the parent.\n// However, enum values do not follow this rule and are within the namespace\n// of the parent's parent (i.e., they are a sibling of the containing enum).\n// Thus, a value named \"FOO_VALUE\" declared within an enum uniquely identified\n// as \"proto.package.MyEnum\" has a full name of \"proto.package.FOO_VALUE\".\ntype EnumValueDescriptor interface {\n\tDescriptor\n\n\t// Number returns the enum value as an integer.\n\tNumber() EnumNumber\n\n\tisEnumValueDescriptor\n}\ntype isEnumValueDescriptor interface{ ProtoType(EnumValueDescriptor) }\n\n// EnumValueDescriptors is a list of enum value declarations.\ntype EnumValueDescriptors interface {\n\t// Len reports the number of enum values.\n\tLen() int\n\t// Get returns the ith EnumValueDescriptor. It panics if out of bounds.\n\tGet(i int) EnumValueDescriptor\n\t// ByName returns the EnumValueDescriptor for the enum value named s.\n\t// It returns nil if not found.\n\tByName(s Name) EnumValueDescriptor\n\t// ByNumber returns the EnumValueDescriptor for the enum value numbered n.\n\t// If multiple have the same number, the first one defined is returned\n\t// It returns nil if not found.\n\tByNumber(n EnumNumber) EnumValueDescriptor\n\n\tdoNotImplement\n}\n\n// ServiceDescriptor describes a service and\n// corresponds with the google.protobuf.ServiceDescriptorProto message.\n//\n// Nested declarations: [MethodDescriptor].\ntype ServiceDescriptor interface {\n\tDescriptor\n\n\t// Methods is a list of nested message declarations.\n\tMethods() MethodDescriptors\n\n\tisServiceDescriptor\n}\ntype isServiceDescriptor interface{ ProtoType(ServiceDescriptor) }\n\n// ServiceDescriptors is a list of service declarations.\ntype ServiceDescriptors interface {\n\t// Len reports the number of services.\n\tLen() int\n\t// Get returns the ith ServiceDescriptor. It panics if out of bounds.\n\tGet(i int) ServiceDescriptor\n\t// ByName returns the ServiceDescriptor for a service named s.\n\t// It returns nil if not found.\n\tByName(s Name) ServiceDescriptor\n\n\tdoNotImplement\n}\n\n// MethodDescriptor describes a method and\n// corresponds with the google.protobuf.MethodDescriptorProto message.\ntype MethodDescriptor interface {\n\tDescriptor\n\n\t// Input is the input message descriptor.\n\tInput() MessageDescriptor\n\t// Output is the output message descriptor.\n\tOutput() MessageDescriptor\n\t// IsStreamingClient reports whether the client streams multiple messages.\n\tIsStreamingClient() bool\n\t// IsStreamingServer reports whether the server streams multiple messages.\n\tIsStreamingServer() bool\n\n\tisMethodDescriptor\n}\ntype isMethodDescriptor interface{ ProtoType(MethodDescriptor) }\n\n// MethodDescriptors is a list of method declarations.\ntype MethodDescriptors interface {\n\t// Len reports the number of methods.\n\tLen() int\n\t// Get returns the ith MethodDescriptor. It panics if out of bounds.\n\tGet(i int) MethodDescriptor\n\t// ByName returns the MethodDescriptor for a service method named s.\n\t// It returns nil if not found.\n\tByName(s Name) MethodDescriptor\n\n\tdoNotImplement\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/value.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport \"google.golang.org/protobuf/encoding/protowire\"\n\n// Enum is a reflection interface for a concrete enum value,\n// which provides type information and a getter for the enum number.\n// Enum does not provide a mutable API since enums are commonly backed by\n// Go constants, which are not addressable.\ntype Enum interface {\n\t// Descriptor returns enum descriptor, which contains only the protobuf\n\t// type information for the enum.\n\tDescriptor() EnumDescriptor\n\n\t// Type returns the enum type, which encapsulates both Go and protobuf\n\t// type information. If the Go type information is not needed,\n\t// it is recommended that the enum descriptor be used instead.\n\tType() EnumType\n\n\t// Number returns the enum value as an integer.\n\tNumber() EnumNumber\n}\n\n// Message is a reflective interface for a concrete message value,\n// encapsulating both type and value information for the message.\n//\n// Accessor/mutators for individual fields are keyed by [FieldDescriptor].\n// For non-extension fields, the descriptor must exactly match the\n// field known by the parent message.\n// For extension fields, the descriptor must implement [ExtensionTypeDescriptor],\n// extend the parent message (i.e., have the same message [FullName]), and\n// be within the parent's extension range.\n//\n// Each field [Value] can be a scalar or a composite type ([Message], [List], or [Map]).\n// See [Value] for the Go types associated with a [FieldDescriptor].\n// Providing a [Value] that is invalid or of an incorrect type panics.\ntype Message interface {\n\t// Descriptor returns message descriptor, which contains only the protobuf\n\t// type information for the message.\n\tDescriptor() MessageDescriptor\n\n\t// Type returns the message type, which encapsulates both Go and protobuf\n\t// type information. If the Go type information is not needed,\n\t// it is recommended that the message descriptor be used instead.\n\tType() MessageType\n\n\t// New returns a newly allocated and mutable empty message.\n\tNew() Message\n\n\t// Interface unwraps the message reflection interface and\n\t// returns the underlying ProtoMessage interface.\n\tInterface() ProtoMessage\n\n\t// Range iterates over every populated field in an undefined order,\n\t// calling f for each field descriptor and value encountered.\n\t// Range returns immediately if f returns false.\n\t// While iterating, mutating operations may only be performed\n\t// on the current field descriptor.\n\tRange(f func(FieldDescriptor, Value) bool)\n\n\t// Has reports whether a field is populated.\n\t//\n\t// Some fields have the property of nullability where it is possible to\n\t// distinguish between the default value of a field and whether the field\n\t// was explicitly populated with the default value. Singular message fields,\n\t// member fields of a oneof, and proto2 scalar fields are nullable. Such\n\t// fields are populated only if explicitly set.\n\t//\n\t// In other cases (aside from the nullable cases above),\n\t// a proto3 scalar field is populated if it contains a non-zero value, and\n\t// a repeated field is populated if it is non-empty.\n\tHas(FieldDescriptor) bool\n\n\t// Clear clears the field such that a subsequent Has call reports false.\n\t//\n\t// Clearing an extension field clears both the extension type and value\n\t// associated with the given field number.\n\t//\n\t// Clear is a mutating operation and unsafe for concurrent use.\n\tClear(FieldDescriptor)\n\n\t// Get retrieves the value for a field.\n\t//\n\t// For unpopulated scalars, it returns the default value, where\n\t// the default value of a bytes scalar is guaranteed to be a copy.\n\t// For unpopulated composite types, it returns an empty, read-only view\n\t// of the value; to obtain a mutable reference, use Mutable.\n\tGet(FieldDescriptor) Value\n\n\t// Set stores the value for a field.\n\t//\n\t// For a field belonging to a oneof, it implicitly clears any other field\n\t// that may be currently set within the same oneof.\n\t// For extension fields, it implicitly stores the provided ExtensionType.\n\t// When setting a composite type, it is unspecified whether the stored value\n\t// aliases the source's memory in any way. If the composite value is an\n\t// empty, read-only value, then it panics.\n\t//\n\t// Set is a mutating operation and unsafe for concurrent use.\n\tSet(FieldDescriptor, Value)\n\n\t// Mutable returns a mutable reference to a composite type.\n\t//\n\t// If the field is unpopulated, it may allocate a composite value.\n\t// For a field belonging to a oneof, it implicitly clears any other field\n\t// that may be currently set within the same oneof.\n\t// For extension fields, it implicitly stores the provided ExtensionType\n\t// if not already stored.\n\t// It panics if the field does not contain a composite type.\n\t//\n\t// Mutable is a mutating operation and unsafe for concurrent use.\n\tMutable(FieldDescriptor) Value\n\n\t// NewField returns a new value that is assignable to the field\n\t// for the given descriptor. For scalars, this returns the default value.\n\t// For lists, maps, and messages, this returns a new, empty, mutable value.\n\tNewField(FieldDescriptor) Value\n\n\t// WhichOneof reports which field within the oneof is populated,\n\t// returning nil if none are populated.\n\t// It panics if the oneof descriptor does not belong to this message.\n\tWhichOneof(OneofDescriptor) FieldDescriptor\n\n\t// GetUnknown retrieves the entire list of unknown fields.\n\t// The caller may only mutate the contents of the RawFields\n\t// if the mutated bytes are stored back into the message with SetUnknown.\n\tGetUnknown() RawFields\n\n\t// SetUnknown stores an entire list of unknown fields.\n\t// The raw fields must be syntactically valid according to the wire format.\n\t// An implementation may panic if this is not the case.\n\t// Once stored, the caller must not mutate the content of the RawFields.\n\t// An empty RawFields may be passed to clear the fields.\n\t//\n\t// SetUnknown is a mutating operation and unsafe for concurrent use.\n\tSetUnknown(RawFields)\n\n\t// IsValid reports whether the message is valid.\n\t//\n\t// An invalid message is an empty, read-only value.\n\t//\n\t// An invalid message often corresponds to a nil pointer of the concrete\n\t// message type, but the details are implementation dependent.\n\t// Validity is not part of the protobuf data model, and may not\n\t// be preserved in marshaling or other operations.\n\tIsValid() bool\n\n\t// ProtoMethods returns optional fast-path implementations of various operations.\n\t// This method may return nil.\n\t//\n\t// The returned methods type is identical to\n\t// [google.golang.org/protobuf/runtime/protoiface.Methods].\n\t// Consult the protoiface package documentation for details.\n\tProtoMethods() *methods\n}\n\n// RawFields is the raw bytes for an ordered sequence of fields.\n// Each field contains both the tag (representing field number and wire type),\n// and also the wire data itself.\ntype RawFields []byte\n\n// IsValid reports whether b is syntactically correct wire format.\nfunc (b RawFields) IsValid() bool {\n\tfor len(b) > 0 {\n\t\t_, _, n := protowire.ConsumeField(b)\n\t\tif n < 0 {\n\t\t\treturn false\n\t\t}\n\t\tb = b[n:]\n\t}\n\treturn true\n}\n\n// List is a zero-indexed, ordered list.\n// The element [Value] type is determined by [FieldDescriptor.Kind].\n// Providing a [Value] that is invalid or of an incorrect type panics.\ntype List interface {\n\t// Len reports the number of entries in the List.\n\t// Get, Set, and Truncate panic with out of bound indexes.\n\tLen() int\n\n\t// Get retrieves the value at the given index.\n\t// It never returns an invalid value.\n\tGet(int) Value\n\n\t// Set stores a value for the given index.\n\t// When setting a composite type, it is unspecified whether the set\n\t// value aliases the source's memory in any way.\n\t//\n\t// Set is a mutating operation and unsafe for concurrent use.\n\tSet(int, Value)\n\n\t// Append appends the provided value to the end of the list.\n\t// When appending a composite type, it is unspecified whether the appended\n\t// value aliases the source's memory in any way.\n\t//\n\t// Append is a mutating operation and unsafe for concurrent use.\n\tAppend(Value)\n\n\t// AppendMutable appends a new, empty, mutable message value to the end\n\t// of the list and returns it.\n\t// It panics if the list does not contain a message type.\n\tAppendMutable() Value\n\n\t// Truncate truncates the list to a smaller length.\n\t//\n\t// Truncate is a mutating operation and unsafe for concurrent use.\n\tTruncate(int)\n\n\t// NewElement returns a new value for a list element.\n\t// For enums, this returns the first enum value.\n\t// For other scalars, this returns the zero value.\n\t// For messages, this returns a new, empty, mutable value.\n\tNewElement() Value\n\n\t// IsValid reports whether the list is valid.\n\t//\n\t// An invalid list is an empty, read-only value.\n\t//\n\t// Validity is not part of the protobuf data model, and may not\n\t// be preserved in marshaling or other operations.\n\tIsValid() bool\n}\n\n// Map is an unordered, associative map.\n// The entry [MapKey] type is determined by [FieldDescriptor.MapKey].Kind.\n// The entry [Value] type is determined by [FieldDescriptor.MapValue].Kind.\n// Providing a [MapKey] or [Value] that is invalid or of an incorrect type panics.\ntype Map interface {\n\t// Len reports the number of elements in the map.\n\tLen() int\n\n\t// Range iterates over every map entry in an undefined order,\n\t// calling f for each key and value encountered.\n\t// Range calls f Len times unless f returns false, which stops iteration.\n\t// While iterating, mutating operations may only be performed\n\t// on the current map key.\n\tRange(f func(MapKey, Value) bool)\n\n\t// Has reports whether an entry with the given key is in the map.\n\tHas(MapKey) bool\n\n\t// Clear clears the entry associated with they given key.\n\t// The operation does nothing if there is no entry associated with the key.\n\t//\n\t// Clear is a mutating operation and unsafe for concurrent use.\n\tClear(MapKey)\n\n\t// Get retrieves the value for an entry with the given key.\n\t// It returns an invalid value for non-existent entries.\n\tGet(MapKey) Value\n\n\t// Set stores the value for an entry with the given key.\n\t// It panics when given a key or value that is invalid or the wrong type.\n\t// When setting a composite type, it is unspecified whether the set\n\t// value aliases the source's memory in any way.\n\t//\n\t// Set is a mutating operation and unsafe for concurrent use.\n\tSet(MapKey, Value)\n\n\t// Mutable retrieves a mutable reference to the entry for the given key.\n\t// If no entry exists for the key, it creates a new, empty, mutable value\n\t// and stores it as the entry for the key.\n\t// It panics if the map value is not a message.\n\tMutable(MapKey) Value\n\n\t// NewValue returns a new value assignable as a map value.\n\t// For enums, this returns the first enum value.\n\t// For other scalars, this returns the zero value.\n\t// For messages, this returns a new, empty, mutable value.\n\tNewValue() Value\n\n\t// IsValid reports whether the map is valid.\n\t//\n\t// An invalid map is an empty, read-only value.\n\t//\n\t// An invalid message often corresponds to a nil Go map value,\n\t// but the details are implementation dependent.\n\t// Validity is not part of the protobuf data model, and may not\n\t// be preserved in marshaling or other operations.\n\tIsValid() bool\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go",
    "content": "// Copyright 2022 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\n\t\"google.golang.org/protobuf/encoding/protowire\"\n)\n\n// Equal reports whether v1 and v2 are recursively equal.\n//\n//   - Values of different types are always unequal.\n//\n//   - Bytes values are equal if they contain identical bytes.\n//     Empty bytes (regardless of nil-ness) are considered equal.\n//\n//   - Floating point values are equal if they contain the same value.\n//     Unlike the == operator, a NaN is equal to another NaN.\n//\n//   - Enums are equal if they contain the same number.\n//     Since [Value] does not contain an enum descriptor,\n//     enum values do not consider the type of the enum.\n//\n//   - Other scalar values are equal if they contain the same value.\n//\n//   - [Message] values are equal if they belong to the same message descriptor,\n//     have the same set of populated known and extension field values,\n//     and the same set of unknown fields values.\n//\n//   - [List] values are equal if they are the same length and\n//     each corresponding element is equal.\n//\n//   - [Map] values are equal if they have the same set of keys and\n//     the corresponding value for each key is equal.\nfunc (v1 Value) Equal(v2 Value) bool {\n\treturn equalValue(v1, v2)\n}\n\nfunc equalValue(x, y Value) bool {\n\teqType := x.typ == y.typ\n\tswitch x.typ {\n\tcase nilType:\n\t\treturn eqType\n\tcase boolType:\n\t\treturn eqType && x.Bool() == y.Bool()\n\tcase int32Type, int64Type:\n\t\treturn eqType && x.Int() == y.Int()\n\tcase uint32Type, uint64Type:\n\t\treturn eqType && x.Uint() == y.Uint()\n\tcase float32Type, float64Type:\n\t\treturn eqType && equalFloat(x.Float(), y.Float())\n\tcase stringType:\n\t\treturn eqType && x.String() == y.String()\n\tcase bytesType:\n\t\treturn eqType && bytes.Equal(x.Bytes(), y.Bytes())\n\tcase enumType:\n\t\treturn eqType && x.Enum() == y.Enum()\n\tdefault:\n\t\tswitch x := x.Interface().(type) {\n\t\tcase Message:\n\t\t\ty, ok := y.Interface().(Message)\n\t\t\treturn ok && equalMessage(x, y)\n\t\tcase List:\n\t\t\ty, ok := y.Interface().(List)\n\t\t\treturn ok && equalList(x, y)\n\t\tcase Map:\n\t\t\ty, ok := y.Interface().(Map)\n\t\t\treturn ok && equalMap(x, y)\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"unknown type: %T\", x))\n\t\t}\n\t}\n}\n\n// equalFloat compares two floats, where NaNs are treated as equal.\nfunc equalFloat(x, y float64) bool {\n\tif math.IsNaN(x) || math.IsNaN(y) {\n\t\treturn math.IsNaN(x) && math.IsNaN(y)\n\t}\n\treturn x == y\n}\n\n// equalMessage compares two messages.\nfunc equalMessage(mx, my Message) bool {\n\tif mx.Descriptor() != my.Descriptor() {\n\t\treturn false\n\t}\n\n\tnx := 0\n\tequal := true\n\tmx.Range(func(fd FieldDescriptor, vx Value) bool {\n\t\tnx++\n\t\tvy := my.Get(fd)\n\t\tequal = my.Has(fd) && equalValue(vx, vy)\n\t\treturn equal\n\t})\n\tif !equal {\n\t\treturn false\n\t}\n\tny := 0\n\tmy.Range(func(fd FieldDescriptor, vx Value) bool {\n\t\tny++\n\t\treturn true\n\t})\n\tif nx != ny {\n\t\treturn false\n\t}\n\n\treturn equalUnknown(mx.GetUnknown(), my.GetUnknown())\n}\n\n// equalList compares two lists.\nfunc equalList(x, y List) bool {\n\tif x.Len() != y.Len() {\n\t\treturn false\n\t}\n\tfor i := x.Len() - 1; i >= 0; i-- {\n\t\tif !equalValue(x.Get(i), y.Get(i)) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// equalMap compares two maps.\nfunc equalMap(x, y Map) bool {\n\tif x.Len() != y.Len() {\n\t\treturn false\n\t}\n\tequal := true\n\tx.Range(func(k MapKey, vx Value) bool {\n\t\tvy := y.Get(k)\n\t\tequal = y.Has(k) && equalValue(vx, vy)\n\t\treturn equal\n\t})\n\treturn equal\n}\n\n// equalUnknown compares unknown fields by direct comparison on the raw bytes\n// of each individual field number.\nfunc equalUnknown(x, y RawFields) bool {\n\tif len(x) != len(y) {\n\t\treturn false\n\t}\n\tif bytes.Equal([]byte(x), []byte(y)) {\n\t\treturn true\n\t}\n\n\tmx := make(map[FieldNumber]RawFields)\n\tmy := make(map[FieldNumber]RawFields)\n\tfor len(x) > 0 {\n\t\tfnum, _, n := protowire.ConsumeField(x)\n\t\tmx[fnum] = append(mx[fnum], x[:n]...)\n\t\tx = x[n:]\n\t}\n\tfor len(y) > 0 {\n\t\tfnum, _, n := protowire.ConsumeField(y)\n\t\tmy[fnum] = append(my[fnum], y[:n]...)\n\t\ty = y[n:]\n\t}\n\treturn reflect.DeepEqual(mx, my)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\n// Value is a union where only one Go type may be set at a time.\n// The Value is used to represent all possible values a field may take.\n// The following shows which Go type is used to represent each proto [Kind]:\n//\n//\t╔════════════╤═════════════════════════════════════╗\n//\t║ Go type    │ Protobuf kind                       ║\n//\t╠════════════╪═════════════════════════════════════╣\n//\t║ bool       │ BoolKind                            ║\n//\t║ int32      │ Int32Kind, Sint32Kind, Sfixed32Kind ║\n//\t║ int64      │ Int64Kind, Sint64Kind, Sfixed64Kind ║\n//\t║ uint32     │ Uint32Kind, Fixed32Kind             ║\n//\t║ uint64     │ Uint64Kind, Fixed64Kind             ║\n//\t║ float32    │ FloatKind                           ║\n//\t║ float64    │ DoubleKind                          ║\n//\t║ string     │ StringKind                          ║\n//\t║ []byte     │ BytesKind                           ║\n//\t║ EnumNumber │ EnumKind                            ║\n//\t║ Message    │ MessageKind, GroupKind              ║\n//\t╚════════════╧═════════════════════════════════════╝\n//\n// Multiple protobuf Kinds may be represented by a single Go type if the type\n// can losslessly represent the information for the proto kind. For example,\n// [Int64Kind], [Sint64Kind], and [Sfixed64Kind] are all represented by int64,\n// but use different integer encoding methods.\n//\n// The [List] or [Map] types are used if the field cardinality is repeated.\n// A field is a [List] if [FieldDescriptor.IsList] reports true.\n// A field is a [Map] if [FieldDescriptor.IsMap] reports true.\n//\n// Converting to/from a Value and a concrete Go value panics on type mismatch.\n// For example, [ValueOf](\"hello\").Int() panics because this attempts to\n// retrieve an int64 from a string.\n//\n// [List], [Map], and [Message] Values are called \"composite\" values.\n//\n// A composite Value may alias (reference) memory at some location,\n// such that changes to the Value updates the that location.\n// A composite value acquired with a Mutable method, such as [Message.Mutable],\n// always references the source object.\n//\n// For example:\n//\n//\t// Append a 0 to a \"repeated int32\" field.\n//\t// Since the Value returned by Mutable is guaranteed to alias\n//\t// the source message, modifying the Value modifies the message.\n//\tmessage.Mutable(fieldDesc).List().Append(protoreflect.ValueOfInt32(0))\n//\n//\t// Assign [0] to a \"repeated int32\" field by creating a new Value,\n//\t// modifying it, and assigning it.\n//\tlist := message.NewField(fieldDesc).List()\n//\tlist.Append(protoreflect.ValueOfInt32(0))\n//\tmessage.Set(fieldDesc, list)\n//\t// ERROR: Since it is not defined whether Set aliases the source,\n//\t// appending to the List here may or may not modify the message.\n//\tlist.Append(protoreflect.ValueOfInt32(0))\n//\n// Some operations, such as [Message.Get], may return an \"empty, read-only\"\n// composite Value. Modifying an empty, read-only value panics.\ntype Value value\n\n// The protoreflect API uses a custom Value union type instead of any\n// to keep the future open for performance optimizations. Using an any\n// always incurs an allocation for primitives (e.g., int64) since it needs to\n// be boxed on the heap (as interfaces can only contain pointers natively).\n// Instead, we represent the Value union as a flat struct that internally keeps\n// track of which type is set. Using unsafe, the Value union can be reduced\n// down to 24B, which is identical in size to a slice.\n//\n// The latest compiler (Go1.11) currently suffers from some limitations:\n//\t• With inlining, the compiler should be able to statically prove that\n//\tonly one of these switch cases are taken and inline one specific case.\n//\tSee https://golang.org/issue/22310.\n\n// ValueOf returns a Value initialized with the concrete value stored in v.\n// This panics if the type does not match one of the allowed types in the\n// Value union.\nfunc ValueOf(v any) Value {\n\tswitch v := v.(type) {\n\tcase nil:\n\t\treturn Value{}\n\tcase bool:\n\t\treturn ValueOfBool(v)\n\tcase int32:\n\t\treturn ValueOfInt32(v)\n\tcase int64:\n\t\treturn ValueOfInt64(v)\n\tcase uint32:\n\t\treturn ValueOfUint32(v)\n\tcase uint64:\n\t\treturn ValueOfUint64(v)\n\tcase float32:\n\t\treturn ValueOfFloat32(v)\n\tcase float64:\n\t\treturn ValueOfFloat64(v)\n\tcase string:\n\t\treturn ValueOfString(v)\n\tcase []byte:\n\t\treturn ValueOfBytes(v)\n\tcase EnumNumber:\n\t\treturn ValueOfEnum(v)\n\tcase Message, List, Map:\n\t\treturn valueOfIface(v)\n\tcase ProtoMessage:\n\t\tpanic(fmt.Sprintf(\"invalid proto.Message(%T) type, expected a protoreflect.Message type\", v))\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"invalid type: %T\", v))\n\t}\n}\n\n// ValueOfBool returns a new boolean value.\nfunc ValueOfBool(v bool) Value {\n\tif v {\n\t\treturn Value{typ: boolType, num: 1}\n\t} else {\n\t\treturn Value{typ: boolType, num: 0}\n\t}\n}\n\n// ValueOfInt32 returns a new int32 value.\nfunc ValueOfInt32(v int32) Value {\n\treturn Value{typ: int32Type, num: uint64(v)}\n}\n\n// ValueOfInt64 returns a new int64 value.\nfunc ValueOfInt64(v int64) Value {\n\treturn Value{typ: int64Type, num: uint64(v)}\n}\n\n// ValueOfUint32 returns a new uint32 value.\nfunc ValueOfUint32(v uint32) Value {\n\treturn Value{typ: uint32Type, num: uint64(v)}\n}\n\n// ValueOfUint64 returns a new uint64 value.\nfunc ValueOfUint64(v uint64) Value {\n\treturn Value{typ: uint64Type, num: v}\n}\n\n// ValueOfFloat32 returns a new float32 value.\nfunc ValueOfFloat32(v float32) Value {\n\treturn Value{typ: float32Type, num: uint64(math.Float64bits(float64(v)))}\n}\n\n// ValueOfFloat64 returns a new float64 value.\nfunc ValueOfFloat64(v float64) Value {\n\treturn Value{typ: float64Type, num: uint64(math.Float64bits(float64(v)))}\n}\n\n// ValueOfString returns a new string value.\nfunc ValueOfString(v string) Value {\n\treturn valueOfString(v)\n}\n\n// ValueOfBytes returns a new bytes value.\nfunc ValueOfBytes(v []byte) Value {\n\treturn valueOfBytes(v[:len(v):len(v)])\n}\n\n// ValueOfEnum returns a new enum value.\nfunc ValueOfEnum(v EnumNumber) Value {\n\treturn Value{typ: enumType, num: uint64(v)}\n}\n\n// ValueOfMessage returns a new Message value.\nfunc ValueOfMessage(v Message) Value {\n\treturn valueOfIface(v)\n}\n\n// ValueOfList returns a new List value.\nfunc ValueOfList(v List) Value {\n\treturn valueOfIface(v)\n}\n\n// ValueOfMap returns a new Map value.\nfunc ValueOfMap(v Map) Value {\n\treturn valueOfIface(v)\n}\n\n// IsValid reports whether v is populated with a value.\nfunc (v Value) IsValid() bool {\n\treturn v.typ != nilType\n}\n\n// Interface returns v as an any.\n//\n// Invariant: v == ValueOf(v).Interface()\nfunc (v Value) Interface() any {\n\tswitch v.typ {\n\tcase nilType:\n\t\treturn nil\n\tcase boolType:\n\t\treturn v.Bool()\n\tcase int32Type:\n\t\treturn int32(v.Int())\n\tcase int64Type:\n\t\treturn int64(v.Int())\n\tcase uint32Type:\n\t\treturn uint32(v.Uint())\n\tcase uint64Type:\n\t\treturn uint64(v.Uint())\n\tcase float32Type:\n\t\treturn float32(v.Float())\n\tcase float64Type:\n\t\treturn float64(v.Float())\n\tcase stringType:\n\t\treturn v.String()\n\tcase bytesType:\n\t\treturn v.Bytes()\n\tcase enumType:\n\t\treturn v.Enum()\n\tdefault:\n\t\treturn v.getIface()\n\t}\n}\n\nfunc (v Value) typeName() string {\n\tswitch v.typ {\n\tcase nilType:\n\t\treturn \"nil\"\n\tcase boolType:\n\t\treturn \"bool\"\n\tcase int32Type:\n\t\treturn \"int32\"\n\tcase int64Type:\n\t\treturn \"int64\"\n\tcase uint32Type:\n\t\treturn \"uint32\"\n\tcase uint64Type:\n\t\treturn \"uint64\"\n\tcase float32Type:\n\t\treturn \"float32\"\n\tcase float64Type:\n\t\treturn \"float64\"\n\tcase stringType:\n\t\treturn \"string\"\n\tcase bytesType:\n\t\treturn \"bytes\"\n\tcase enumType:\n\t\treturn \"enum\"\n\tdefault:\n\t\tswitch v := v.getIface().(type) {\n\t\tcase Message:\n\t\t\treturn \"message\"\n\t\tcase List:\n\t\t\treturn \"list\"\n\t\tcase Map:\n\t\t\treturn \"map\"\n\t\tdefault:\n\t\t\treturn fmt.Sprintf(\"<unknown: %T>\", v)\n\t\t}\n\t}\n}\n\nfunc (v Value) panicMessage(what string) string {\n\treturn fmt.Sprintf(\"type mismatch: cannot convert %v to %s\", v.typeName(), what)\n}\n\n// Bool returns v as a bool and panics if the type is not a bool.\nfunc (v Value) Bool() bool {\n\tswitch v.typ {\n\tcase boolType:\n\t\treturn v.num > 0\n\tdefault:\n\t\tpanic(v.panicMessage(\"bool\"))\n\t}\n}\n\n// Int returns v as a int64 and panics if the type is not a int32 or int64.\nfunc (v Value) Int() int64 {\n\tswitch v.typ {\n\tcase int32Type, int64Type:\n\t\treturn int64(v.num)\n\tdefault:\n\t\tpanic(v.panicMessage(\"int\"))\n\t}\n}\n\n// Uint returns v as a uint64 and panics if the type is not a uint32 or uint64.\nfunc (v Value) Uint() uint64 {\n\tswitch v.typ {\n\tcase uint32Type, uint64Type:\n\t\treturn uint64(v.num)\n\tdefault:\n\t\tpanic(v.panicMessage(\"uint\"))\n\t}\n}\n\n// Float returns v as a float64 and panics if the type is not a float32 or float64.\nfunc (v Value) Float() float64 {\n\tswitch v.typ {\n\tcase float32Type, float64Type:\n\t\treturn math.Float64frombits(uint64(v.num))\n\tdefault:\n\t\tpanic(v.panicMessage(\"float\"))\n\t}\n}\n\n// String returns v as a string. Since this method implements [fmt.Stringer],\n// this returns the formatted string value for any non-string type.\nfunc (v Value) String() string {\n\tswitch v.typ {\n\tcase stringType:\n\t\treturn v.getString()\n\tdefault:\n\t\treturn fmt.Sprint(v.Interface())\n\t}\n}\n\n// Bytes returns v as a []byte and panics if the type is not a []byte.\nfunc (v Value) Bytes() []byte {\n\tswitch v.typ {\n\tcase bytesType:\n\t\treturn v.getBytes()\n\tdefault:\n\t\tpanic(v.panicMessage(\"bytes\"))\n\t}\n}\n\n// Enum returns v as a [EnumNumber] and panics if the type is not a [EnumNumber].\nfunc (v Value) Enum() EnumNumber {\n\tswitch v.typ {\n\tcase enumType:\n\t\treturn EnumNumber(v.num)\n\tdefault:\n\t\tpanic(v.panicMessage(\"enum\"))\n\t}\n}\n\n// Message returns v as a [Message] and panics if the type is not a [Message].\nfunc (v Value) Message() Message {\n\tswitch vi := v.getIface().(type) {\n\tcase Message:\n\t\treturn vi\n\tdefault:\n\t\tpanic(v.panicMessage(\"message\"))\n\t}\n}\n\n// List returns v as a [List] and panics if the type is not a [List].\nfunc (v Value) List() List {\n\tswitch vi := v.getIface().(type) {\n\tcase List:\n\t\treturn vi\n\tdefault:\n\t\tpanic(v.panicMessage(\"list\"))\n\t}\n}\n\n// Map returns v as a [Map] and panics if the type is not a [Map].\nfunc (v Value) Map() Map {\n\tswitch vi := v.getIface().(type) {\n\tcase Map:\n\t\treturn vi\n\tdefault:\n\t\tpanic(v.panicMessage(\"map\"))\n\t}\n}\n\n// MapKey returns v as a [MapKey] and panics for invalid [MapKey] types.\nfunc (v Value) MapKey() MapKey {\n\tswitch v.typ {\n\tcase boolType, int32Type, int64Type, uint32Type, uint64Type, stringType:\n\t\treturn MapKey(v)\n\tdefault:\n\t\tpanic(v.panicMessage(\"map key\"))\n\t}\n}\n\n// MapKey is used to index maps, where the Go type of the MapKey must match\n// the specified key [Kind] (see [MessageDescriptor.IsMapEntry]).\n// The following shows what Go type is used to represent each proto [Kind]:\n//\n//\t╔═════════╤═════════════════════════════════════╗\n//\t║ Go type │ Protobuf kind                       ║\n//\t╠═════════╪═════════════════════════════════════╣\n//\t║ bool    │ BoolKind                            ║\n//\t║ int32   │ Int32Kind, Sint32Kind, Sfixed32Kind ║\n//\t║ int64   │ Int64Kind, Sint64Kind, Sfixed64Kind ║\n//\t║ uint32  │ Uint32Kind, Fixed32Kind             ║\n//\t║ uint64  │ Uint64Kind, Fixed64Kind             ║\n//\t║ string  │ StringKind                          ║\n//\t╚═════════╧═════════════════════════════════════╝\n//\n// A MapKey is constructed and accessed through a [Value]:\n//\n//\tk := ValueOf(\"hash\").MapKey() // convert string to MapKey\n//\ts := k.String()               // convert MapKey to string\n//\n// The MapKey is a strict subset of valid types used in [Value];\n// converting a [Value] to a MapKey with an invalid type panics.\ntype MapKey value\n\n// IsValid reports whether k is populated with a value.\nfunc (k MapKey) IsValid() bool {\n\treturn Value(k).IsValid()\n}\n\n// Interface returns k as an any.\nfunc (k MapKey) Interface() any {\n\treturn Value(k).Interface()\n}\n\n// Bool returns k as a bool and panics if the type is not a bool.\nfunc (k MapKey) Bool() bool {\n\treturn Value(k).Bool()\n}\n\n// Int returns k as a int64 and panics if the type is not a int32 or int64.\nfunc (k MapKey) Int() int64 {\n\treturn Value(k).Int()\n}\n\n// Uint returns k as a uint64 and panics if the type is not a uint32 or uint64.\nfunc (k MapKey) Uint() uint64 {\n\treturn Value(k).Uint()\n}\n\n// String returns k as a string. Since this method implements [fmt.Stringer],\n// this returns the formatted string value for any non-string type.\nfunc (k MapKey) String() string {\n\treturn Value(k).String()\n}\n\n// Value returns k as a [Value].\nfunc (k MapKey) Value() Value {\n\treturn Value(k)\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoreflect\n\nimport (\n\t\"unsafe\"\n\n\t\"google.golang.org/protobuf/internal/pragma\"\n)\n\ntype (\n\tifaceHeader struct {\n\t\t_    [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.\n\t\tType unsafe.Pointer\n\t\tData unsafe.Pointer\n\t}\n)\n\nvar (\n\tnilType     = typeOf(nil)\n\tboolType    = typeOf(*new(bool))\n\tint32Type   = typeOf(*new(int32))\n\tint64Type   = typeOf(*new(int64))\n\tuint32Type  = typeOf(*new(uint32))\n\tuint64Type  = typeOf(*new(uint64))\n\tfloat32Type = typeOf(*new(float32))\n\tfloat64Type = typeOf(*new(float64))\n\tstringType  = typeOf(*new(string))\n\tbytesType   = typeOf(*new([]byte))\n\tenumType    = typeOf(*new(EnumNumber))\n)\n\n// typeOf returns a pointer to the Go type information.\n// The pointer is comparable and equal if and only if the types are identical.\nfunc typeOf(t any) unsafe.Pointer {\n\treturn (*ifaceHeader)(unsafe.Pointer(&t)).Type\n}\n\n// value is a union where only one type can be represented at a time.\n// The struct is 24B large on 64-bit systems and requires the minimum storage\n// necessary to represent each possible type.\n//\n// The Go GC needs to be able to scan variables containing pointers.\n// As such, pointers and non-pointers cannot be intermixed.\ntype value struct {\n\tpragma.DoNotCompare // 0B\n\n\t// typ stores the type of the value as a pointer to the Go type.\n\ttyp unsafe.Pointer // 8B\n\n\t// ptr stores the data pointer for a String, Bytes, or interface value.\n\tptr unsafe.Pointer // 8B\n\n\t// num stores a Bool, Int32, Int64, Uint32, Uint64, Float32, Float64, or\n\t// Enum value as a raw uint64.\n\t//\n\t// It is also used to store the length of a String or Bytes value;\n\t// the capacity is ignored.\n\tnum uint64 // 8B\n}\n\nfunc valueOfString(v string) Value {\n\treturn Value{typ: stringType, ptr: unsafe.Pointer(unsafe.StringData(v)), num: uint64(len(v))}\n}\nfunc valueOfBytes(v []byte) Value {\n\treturn Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}\n}\nfunc valueOfIface(v any) Value {\n\tp := (*ifaceHeader)(unsafe.Pointer(&v))\n\treturn Value{typ: p.Type, ptr: p.Data}\n}\n\nfunc (v Value) getString() string {\n\treturn unsafe.String((*byte)(v.ptr), v.num)\n}\nfunc (v Value) getBytes() []byte {\n\treturn unsafe.Slice((*byte)(v.ptr), v.num)\n}\nfunc (v Value) getIface() (x any) {\n\t*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}\n\treturn x\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protoregistry provides data structures to register and lookup\n// protobuf descriptor types.\n//\n// The [Files] registry contains file descriptors and provides the ability\n// to iterate over the files or lookup a specific descriptor within the files.\n// [Files] only contains protobuf descriptors and has no understanding of Go\n// type information that may be associated with each descriptor.\n//\n// The [Types] registry contains descriptor types for which there is a known\n// Go type associated with that descriptor. It provides the ability to iterate\n// over the registered types or lookup a type by name.\npackage protoregistry\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"google.golang.org/protobuf/internal/encoding/messageset\"\n\t\"google.golang.org/protobuf/internal/errors\"\n\t\"google.golang.org/protobuf/internal/flags\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// conflictPolicy configures the policy for handling registration conflicts.\n//\n// It can be over-written at compile time with a linker-initialized variable:\n//\n//\tgo build -ldflags \"-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn\"\n//\n// It can be over-written at program execution with an environment variable:\n//\n//\tGOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main\n//\n// Neither of the above are covered by the compatibility promise and\n// may be removed in a future release of this module.\nvar conflictPolicy = \"panic\" // \"panic\" | \"warn\" | \"ignore\"\n\n// ignoreConflict reports whether to ignore a registration conflict\n// given the descriptor being registered and the error.\n// It is a variable so that the behavior is easily overridden in another file.\nvar ignoreConflict = func(d protoreflect.Descriptor, err error) bool {\n\tconst env = \"GOLANG_PROTOBUF_REGISTRATION_CONFLICT\"\n\tconst faq = \"https://protobuf.dev/reference/go/faq#namespace-conflict\"\n\tpolicy := conflictPolicy\n\tif v := os.Getenv(env); v != \"\" {\n\t\tpolicy = v\n\t}\n\tswitch policy {\n\tcase \"panic\":\n\t\tpanic(fmt.Sprintf(\"%v\\nSee %v\\n\", err, faq))\n\tcase \"warn\":\n\t\tfmt.Fprintf(os.Stderr, \"WARNING: %v\\nSee %v\\n\\n\", err, faq)\n\t\treturn true\n\tcase \"ignore\":\n\t\treturn true\n\tdefault:\n\t\tpanic(\"invalid \" + env + \" value: \" + os.Getenv(env))\n\t}\n}\n\nvar globalMutex sync.RWMutex\n\n// GlobalFiles is a global registry of file descriptors.\nvar GlobalFiles *Files = new(Files)\n\n// GlobalTypes is the registry used by default for type lookups\n// unless a local registry is provided by the user.\nvar GlobalTypes *Types = new(Types)\n\n// NotFound is a sentinel error value to indicate that the type was not found.\n//\n// Since registry lookup can happen in the critical performance path, resolvers\n// must return this exact error value, not an error wrapping it.\nvar NotFound = errors.New(\"not found\")\n\n// Files is a registry for looking up or iterating over files and the\n// descriptors contained within them.\n// The Find and Range methods are safe for concurrent use.\ntype Files struct {\n\t// The map of descsByName contains:\n\t//\tEnumDescriptor\n\t//\tEnumValueDescriptor\n\t//\tMessageDescriptor\n\t//\tExtensionDescriptor\n\t//\tServiceDescriptor\n\t//\t*packageDescriptor\n\t//\n\t// Note that files are stored as a slice, since a package may contain\n\t// multiple files. Only top-level declarations are registered.\n\t// Note that enum values are in the top-level since that are in the same\n\t// scope as the parent enum.\n\tdescsByName map[protoreflect.FullName]any\n\tfilesByPath map[string][]protoreflect.FileDescriptor\n\tnumFiles    int\n}\n\ntype packageDescriptor struct {\n\tfiles []protoreflect.FileDescriptor\n}\n\n// RegisterFile registers the provided file descriptor.\n//\n// If any descriptor within the file conflicts with the descriptor of any\n// previously registered file (e.g., two enums with the same full name),\n// then the file is not registered and an error is returned.\n//\n// It is permitted for multiple files to have the same file path.\nfunc (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {\n\tif r == GlobalFiles {\n\t\tglobalMutex.Lock()\n\t\tdefer globalMutex.Unlock()\n\t}\n\tif r.descsByName == nil {\n\t\tr.descsByName = map[protoreflect.FullName]any{\n\t\t\t\"\": &packageDescriptor{},\n\t\t}\n\t\tr.filesByPath = make(map[string][]protoreflect.FileDescriptor)\n\t}\n\tpath := file.Path()\n\tif prev := r.filesByPath[path]; len(prev) > 0 {\n\t\tr.checkGenProtoConflict(path)\n\t\terr := errors.New(\"file %q is already registered\", file.Path())\n\t\terr = amendErrorWithCaller(err, prev[0], file)\n\t\tif !(r == GlobalFiles && ignoreConflict(file, err)) {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfor name := file.Package(); name != \"\"; name = name.Parent() {\n\t\tswitch prev := r.descsByName[name]; prev.(type) {\n\t\tcase nil, *packageDescriptor:\n\t\tdefault:\n\t\t\terr := errors.New(\"file %q has a package name conflict over %v\", file.Path(), name)\n\t\t\terr = amendErrorWithCaller(err, prev, file)\n\t\t\tif r == GlobalFiles && ignoreConflict(file, err) {\n\t\t\t\terr = nil\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\tvar err error\n\tvar hasConflict bool\n\trangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) {\n\t\tif prev := r.descsByName[d.FullName()]; prev != nil {\n\t\t\thasConflict = true\n\t\t\terr = errors.New(\"file %q has a name conflict over %v\", file.Path(), d.FullName())\n\t\t\terr = amendErrorWithCaller(err, prev, file)\n\t\t\tif r == GlobalFiles && ignoreConflict(d, err) {\n\t\t\t\terr = nil\n\t\t\t}\n\t\t}\n\t})\n\tif hasConflict {\n\t\treturn err\n\t}\n\n\tfor name := file.Package(); name != \"\"; name = name.Parent() {\n\t\tif r.descsByName[name] == nil {\n\t\t\tr.descsByName[name] = &packageDescriptor{}\n\t\t}\n\t}\n\tp := r.descsByName[file.Package()].(*packageDescriptor)\n\tp.files = append(p.files, file)\n\trangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) {\n\t\tr.descsByName[d.FullName()] = d\n\t})\n\tr.filesByPath[path] = append(r.filesByPath[path], file)\n\tr.numFiles++\n\treturn nil\n}\n\n// Several well-known types were hosted in the google.golang.org/genproto module\n// but were later moved to this module. To avoid a weak dependency on the\n// genproto module (and its relatively large set of transitive dependencies),\n// we rely on a registration conflict to determine whether the genproto version\n// is too old (i.e., does not contain aliases to the new type declarations).\nfunc (r *Files) checkGenProtoConflict(path string) {\n\tif r != GlobalFiles {\n\t\treturn\n\t}\n\tvar prevPath string\n\tconst prevModule = \"google.golang.org/genproto\"\n\tconst prevVersion = \"cb27e3aa (May 26th, 2020)\"\n\tswitch path {\n\tcase \"google/protobuf/field_mask.proto\":\n\t\tprevPath = prevModule + \"/protobuf/field_mask\"\n\tcase \"google/protobuf/api.proto\":\n\t\tprevPath = prevModule + \"/protobuf/api\"\n\tcase \"google/protobuf/type.proto\":\n\t\tprevPath = prevModule + \"/protobuf/ptype\"\n\tcase \"google/protobuf/source_context.proto\":\n\t\tprevPath = prevModule + \"/protobuf/source_context\"\n\tdefault:\n\t\treturn\n\t}\n\tpkgName := strings.TrimSuffix(strings.TrimPrefix(path, \"google/protobuf/\"), \".proto\")\n\tpkgName = strings.Replace(pkgName, \"_\", \"\", -1) + \"pb\" // e.g., \"field_mask\" => \"fieldmaskpb\"\n\tcurrPath := \"google.golang.org/protobuf/types/known/\" + pkgName\n\tpanic(fmt.Sprintf(\"\"+\n\t\t\"duplicate registration of %q\\n\"+\n\t\t\"\\n\"+\n\t\t\"The generated definition for this file has moved:\\n\"+\n\t\t\"\\tfrom: %q\\n\"+\n\t\t\"\\tto:   %q\\n\"+\n\t\t\"A dependency on the %q module must\\n\"+\n\t\t\"be at version %v or higher.\\n\"+\n\t\t\"\\n\"+\n\t\t\"Upgrade the dependency by running:\\n\"+\n\t\t\"\\tgo get -u %v\\n\",\n\t\tpath, prevPath, currPath, prevModule, prevVersion, prevPath))\n}\n\n// FindDescriptorByName looks up a descriptor by the full name.\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tprefix := name\n\tsuffix := nameSuffix(\"\")\n\tfor prefix != \"\" {\n\t\tif d, ok := r.descsByName[prefix]; ok {\n\t\t\tswitch d := d.(type) {\n\t\t\tcase protoreflect.EnumDescriptor:\n\t\t\t\tif d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\tcase protoreflect.EnumValueDescriptor:\n\t\t\t\tif d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\tcase protoreflect.MessageDescriptor:\n\t\t\t\tif d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\t\tif d := findDescriptorInMessage(d, suffix); d != nil && d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\tcase protoreflect.ExtensionDescriptor:\n\t\t\t\tif d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\tcase protoreflect.ServiceDescriptor:\n\t\t\t\tif d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\t\tif d := d.Methods().ByName(suffix.Pop()); d != nil && d.FullName() == name {\n\t\t\t\t\treturn d, nil\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nil, NotFound\n\t\t}\n\t\tprefix = prefix.Parent()\n\t\tsuffix = nameSuffix(name[len(prefix)+len(\".\"):])\n\t}\n\treturn nil, NotFound\n}\n\nfunc findDescriptorInMessage(md protoreflect.MessageDescriptor, suffix nameSuffix) protoreflect.Descriptor {\n\tname := suffix.Pop()\n\tif suffix == \"\" {\n\t\tif ed := md.Enums().ByName(name); ed != nil {\n\t\t\treturn ed\n\t\t}\n\t\tfor i := md.Enums().Len() - 1; i >= 0; i-- {\n\t\t\tif vd := md.Enums().Get(i).Values().ByName(name); vd != nil {\n\t\t\t\treturn vd\n\t\t\t}\n\t\t}\n\t\tif xd := md.Extensions().ByName(name); xd != nil {\n\t\t\treturn xd\n\t\t}\n\t\tif fd := md.Fields().ByName(name); fd != nil {\n\t\t\treturn fd\n\t\t}\n\t\tif od := md.Oneofs().ByName(name); od != nil {\n\t\t\treturn od\n\t\t}\n\t}\n\tif md := md.Messages().ByName(name); md != nil {\n\t\tif suffix == \"\" {\n\t\t\treturn md\n\t\t}\n\t\treturn findDescriptorInMessage(md, suffix)\n\t}\n\treturn nil\n}\n\ntype nameSuffix string\n\nfunc (s *nameSuffix) Pop() (name protoreflect.Name) {\n\tif i := strings.IndexByte(string(*s), '.'); i >= 0 {\n\t\tname, *s = protoreflect.Name((*s)[:i]), (*s)[i+1:]\n\t} else {\n\t\tname, *s = protoreflect.Name((*s)), \"\"\n\t}\n\treturn name\n}\n\n// FindFileByPath looks up a file by the path.\n//\n// This returns (nil, [NotFound]) if not found.\n// This returns an error if multiple files have the same path.\nfunc (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfds := r.filesByPath[path]\n\tswitch len(fds) {\n\tcase 0:\n\t\treturn nil, NotFound\n\tcase 1:\n\t\treturn fds[0], nil\n\tdefault:\n\t\treturn nil, errors.New(\"multiple files named %q\", path)\n\t}\n}\n\n// NumFiles reports the number of registered files,\n// including duplicate files with the same name.\nfunc (r *Files) NumFiles() int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\treturn r.numFiles\n}\n\n// RangeFiles iterates over all registered files while f returns true.\n// If multiple files have the same name, RangeFiles iterates over all of them.\n// The iteration order is undefined.\nfunc (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfor _, files := range r.filesByPath {\n\t\tfor _, file := range files {\n\t\t\tif !f(file) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// NumFilesByPackage reports the number of registered files in a proto package.\nfunc (r *Files) NumFilesByPackage(name protoreflect.FullName) int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tp, ok := r.descsByName[name].(*packageDescriptor)\n\tif !ok {\n\t\treturn 0\n\t}\n\treturn len(p.files)\n}\n\n// RangeFilesByPackage iterates over all registered files in a given proto package\n// while f returns true. The iteration order is undefined.\nfunc (r *Files) RangeFilesByPackage(name protoreflect.FullName, f func(protoreflect.FileDescriptor) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalFiles {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tp, ok := r.descsByName[name].(*packageDescriptor)\n\tif !ok {\n\t\treturn\n\t}\n\tfor _, file := range p.files {\n\t\tif !f(file) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// rangeTopLevelDescriptors iterates over all top-level descriptors in a file\n// which will be directly entered into the registry.\nfunc rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflect.Descriptor)) {\n\teds := fd.Enums()\n\tfor i := eds.Len() - 1; i >= 0; i-- {\n\t\tf(eds.Get(i))\n\t\tvds := eds.Get(i).Values()\n\t\tfor i := vds.Len() - 1; i >= 0; i-- {\n\t\t\tf(vds.Get(i))\n\t\t}\n\t}\n\tmds := fd.Messages()\n\tfor i := mds.Len() - 1; i >= 0; i-- {\n\t\tf(mds.Get(i))\n\t}\n\txds := fd.Extensions()\n\tfor i := xds.Len() - 1; i >= 0; i-- {\n\t\tf(xds.Get(i))\n\t}\n\tsds := fd.Services()\n\tfor i := sds.Len() - 1; i >= 0; i-- {\n\t\tf(sds.Get(i))\n\t}\n}\n\n// MessageTypeResolver is an interface for looking up messages.\n//\n// A compliant implementation must deterministically return the same type\n// if no error is encountered.\n//\n// The [Types] type implements this interface.\ntype MessageTypeResolver interface {\n\t// FindMessageByName looks up a message by its full name.\n\t// E.g., \"google.protobuf.Any\"\n\t//\n\t// This return (nil, NotFound) if not found.\n\tFindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error)\n\n\t// FindMessageByURL looks up a message by a URL identifier.\n\t// See documentation on google.protobuf.Any.type_url for the URL format.\n\t//\n\t// This returns (nil, NotFound) if not found.\n\tFindMessageByURL(url string) (protoreflect.MessageType, error)\n}\n\n// ExtensionTypeResolver is an interface for looking up extensions.\n//\n// A compliant implementation must deterministically return the same type\n// if no error is encountered.\n//\n// The [Types] type implements this interface.\ntype ExtensionTypeResolver interface {\n\t// FindExtensionByName looks up a extension field by the field's full name.\n\t// Note that this is the full name of the field as determined by\n\t// where the extension is declared and is unrelated to the full name of the\n\t// message being extended.\n\t//\n\t// This returns (nil, NotFound) if not found.\n\tFindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)\n\n\t// FindExtensionByNumber looks up a extension field by the field number\n\t// within some parent message, identified by full name.\n\t//\n\t// This returns (nil, NotFound) if not found.\n\tFindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)\n}\n\nvar (\n\t_ MessageTypeResolver   = (*Types)(nil)\n\t_ ExtensionTypeResolver = (*Types)(nil)\n)\n\n// Types is a registry for looking up or iterating over descriptor types.\n// The Find and Range methods are safe for concurrent use.\ntype Types struct {\n\ttypesByName         typesByName\n\textensionsByMessage extensionsByMessage\n\n\tnumEnums      int\n\tnumMessages   int\n\tnumExtensions int\n}\n\ntype (\n\ttypesByName         map[protoreflect.FullName]any\n\textensionsByMessage map[protoreflect.FullName]extensionsByNumber\n\textensionsByNumber  map[protoreflect.FieldNumber]protoreflect.ExtensionType\n)\n\n// RegisterMessage registers the provided message type.\n//\n// If a naming conflict occurs, the type is not registered and an error is returned.\nfunc (r *Types) RegisterMessage(mt protoreflect.MessageType) error {\n\t// Under rare circumstances getting the descriptor might recursively\n\t// examine the registry, so fetch it before locking.\n\tmd := mt.Descriptor()\n\n\tif r == GlobalTypes {\n\t\tglobalMutex.Lock()\n\t\tdefer globalMutex.Unlock()\n\t}\n\n\tif err := r.register(\"message\", md, mt); err != nil {\n\t\treturn err\n\t}\n\tr.numMessages++\n\treturn nil\n}\n\n// RegisterEnum registers the provided enum type.\n//\n// If a naming conflict occurs, the type is not registered and an error is returned.\nfunc (r *Types) RegisterEnum(et protoreflect.EnumType) error {\n\t// Under rare circumstances getting the descriptor might recursively\n\t// examine the registry, so fetch it before locking.\n\ted := et.Descriptor()\n\n\tif r == GlobalTypes {\n\t\tglobalMutex.Lock()\n\t\tdefer globalMutex.Unlock()\n\t}\n\n\tif err := r.register(\"enum\", ed, et); err != nil {\n\t\treturn err\n\t}\n\tr.numEnums++\n\treturn nil\n}\n\n// RegisterExtension registers the provided extension type.\n//\n// If a naming conflict occurs, the type is not registered and an error is returned.\nfunc (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error {\n\t// Under rare circumstances getting the descriptor might recursively\n\t// examine the registry, so fetch it before locking.\n\t//\n\t// A known case where this can happen: Fetching the TypeDescriptor for a\n\t// legacy ExtensionDesc can consult the global registry.\n\txd := xt.TypeDescriptor()\n\n\tif r == GlobalTypes {\n\t\tglobalMutex.Lock()\n\t\tdefer globalMutex.Unlock()\n\t}\n\n\tfield := xd.Number()\n\tmessage := xd.ContainingMessage().FullName()\n\tif prev := r.extensionsByMessage[message][field]; prev != nil {\n\t\terr := errors.New(\"extension number %d is already registered on message %v\", field, message)\n\t\terr = amendErrorWithCaller(err, prev, xt)\n\t\tif !(r == GlobalTypes && ignoreConflict(xd, err)) {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif err := r.register(\"extension\", xd, xt); err != nil {\n\t\treturn err\n\t}\n\tif r.extensionsByMessage == nil {\n\t\tr.extensionsByMessage = make(extensionsByMessage)\n\t}\n\tif r.extensionsByMessage[message] == nil {\n\t\tr.extensionsByMessage[message] = make(extensionsByNumber)\n\t}\n\tr.extensionsByMessage[message][field] = xt\n\tr.numExtensions++\n\treturn nil\n}\n\nfunc (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error {\n\tname := desc.FullName()\n\tprev := r.typesByName[name]\n\tif prev != nil {\n\t\terr := errors.New(\"%v %v is already registered\", kind, name)\n\t\terr = amendErrorWithCaller(err, prev, typ)\n\t\tif !(r == GlobalTypes && ignoreConflict(desc, err)) {\n\t\t\treturn err\n\t\t}\n\t}\n\tif r.typesByName == nil {\n\t\tr.typesByName = make(typesByName)\n\t}\n\tr.typesByName[name] = typ\n\treturn nil\n}\n\n// FindEnumByName looks up an enum by its full name.\n// E.g., \"google.protobuf.Field.Kind\".\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tif v := r.typesByName[enum]; v != nil {\n\t\tif et, _ := v.(protoreflect.EnumType); et != nil {\n\t\t\treturn et, nil\n\t\t}\n\t\treturn nil, errors.New(\"found wrong type: got %v, want enum\", typeName(v))\n\t}\n\treturn nil, NotFound\n}\n\n// FindMessageByName looks up a message by its full name,\n// e.g. \"google.protobuf.Any\".\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tif v := r.typesByName[message]; v != nil {\n\t\tif mt, _ := v.(protoreflect.MessageType); mt != nil {\n\t\t\treturn mt, nil\n\t\t}\n\t\treturn nil, errors.New(\"found wrong type: got %v, want message\", typeName(v))\n\t}\n\treturn nil, NotFound\n}\n\n// FindMessageByURL looks up a message by a URL identifier.\n// See documentation on google.protobuf.Any.type_url for the URL format.\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {\n\t// This function is similar to FindMessageByName but\n\t// truncates anything before and including '/' in the URL.\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tmessage := protoreflect.FullName(url)\n\tif i := strings.LastIndexByte(url, '/'); i >= 0 {\n\t\tmessage = message[i+len(\"/\"):]\n\t}\n\n\tif v := r.typesByName[message]; v != nil {\n\t\tif mt, _ := v.(protoreflect.MessageType); mt != nil {\n\t\t\treturn mt, nil\n\t\t}\n\t\treturn nil, errors.New(\"found wrong type: got %v, want message\", typeName(v))\n\t}\n\treturn nil, NotFound\n}\n\n// FindExtensionByName looks up a extension field by the field's full name.\n// Note that this is the full name of the field as determined by\n// where the extension is declared and is unrelated to the full name of the\n// message being extended.\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tif v := r.typesByName[field]; v != nil {\n\t\tif xt, _ := v.(protoreflect.ExtensionType); xt != nil {\n\t\t\treturn xt, nil\n\t\t}\n\n\t\t// MessageSet extensions are special in that the name of the extension\n\t\t// is the name of the message type used to extend the MessageSet.\n\t\t// This naming scheme is used by text and JSON serialization.\n\t\t//\n\t\t// This feature is protected by the ProtoLegacy flag since MessageSets\n\t\t// are a proto1 feature that is long deprecated.\n\t\tif flags.ProtoLegacy {\n\t\t\tif _, ok := v.(protoreflect.MessageType); ok {\n\t\t\t\tfield := field.Append(messageset.ExtensionName)\n\t\t\t\tif v := r.typesByName[field]; v != nil {\n\t\t\t\t\tif xt, _ := v.(protoreflect.ExtensionType); xt != nil {\n\t\t\t\t\t\tif messageset.IsMessageSetExtension(xt.TypeDescriptor()) {\n\t\t\t\t\t\t\treturn xt, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn nil, errors.New(\"found wrong type: got %v, want extension\", typeName(v))\n\t}\n\treturn nil, NotFound\n}\n\n// FindExtensionByNumber looks up a extension field by the field number\n// within some parent message, identified by full name.\n//\n// This returns (nil, [NotFound]) if not found.\nfunc (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {\n\tif r == nil {\n\t\treturn nil, NotFound\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tif xt, ok := r.extensionsByMessage[message][field]; ok {\n\t\treturn xt, nil\n\t}\n\treturn nil, NotFound\n}\n\n// NumEnums reports the number of registered enums.\nfunc (r *Types) NumEnums() int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\treturn r.numEnums\n}\n\n// RangeEnums iterates over all registered enums while f returns true.\n// Iteration order is undefined.\nfunc (r *Types) RangeEnums(f func(protoreflect.EnumType) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfor _, typ := range r.typesByName {\n\t\tif et, ok := typ.(protoreflect.EnumType); ok {\n\t\t\tif !f(et) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// NumMessages reports the number of registered messages.\nfunc (r *Types) NumMessages() int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\treturn r.numMessages\n}\n\n// RangeMessages iterates over all registered messages while f returns true.\n// Iteration order is undefined.\nfunc (r *Types) RangeMessages(f func(protoreflect.MessageType) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfor _, typ := range r.typesByName {\n\t\tif mt, ok := typ.(protoreflect.MessageType); ok {\n\t\t\tif !f(mt) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// NumExtensions reports the number of registered extensions.\nfunc (r *Types) NumExtensions() int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\treturn r.numExtensions\n}\n\n// RangeExtensions iterates over all registered extensions while f returns true.\n// Iteration order is undefined.\nfunc (r *Types) RangeExtensions(f func(protoreflect.ExtensionType) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfor _, typ := range r.typesByName {\n\t\tif xt, ok := typ.(protoreflect.ExtensionType); ok {\n\t\t\tif !f(xt) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// NumExtensionsByMessage reports the number of registered extensions for\n// a given message type.\nfunc (r *Types) NumExtensionsByMessage(message protoreflect.FullName) int {\n\tif r == nil {\n\t\treturn 0\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\treturn len(r.extensionsByMessage[message])\n}\n\n// RangeExtensionsByMessage iterates over all registered extensions filtered\n// by a given message type while f returns true. Iteration order is undefined.\nfunc (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool) {\n\tif r == nil {\n\t\treturn\n\t}\n\tif r == GlobalTypes {\n\t\tglobalMutex.RLock()\n\t\tdefer globalMutex.RUnlock()\n\t}\n\tfor _, xt := range r.extensionsByMessage[message] {\n\t\tif !f(xt) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc typeName(t any) string {\n\tswitch t.(type) {\n\tcase protoreflect.EnumType:\n\t\treturn \"enum\"\n\tcase protoreflect.MessageType:\n\t\treturn \"message\"\n\tcase protoreflect.ExtensionType:\n\t\treturn \"extension\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"%T\", t)\n\t}\n}\n\nfunc amendErrorWithCaller(err error, prev, curr any) error {\n\tprevPkg := goPackage(prev)\n\tcurrPkg := goPackage(curr)\n\tif prevPkg == \"\" || currPkg == \"\" || prevPkg == currPkg {\n\t\treturn err\n\t}\n\treturn errors.New(\"%s\\n\\tpreviously from: %q\\n\\tcurrently from:  %q\", err, prevPkg, currPkg)\n}\n\nfunc goPackage(v any) string {\n\tswitch d := v.(type) {\n\tcase protoreflect.EnumType:\n\t\tv = d.Descriptor()\n\tcase protoreflect.MessageType:\n\t\tv = d.Descriptor()\n\tcase protoreflect.ExtensionType:\n\t\tv = d.TypeDescriptor()\n\t}\n\tif d, ok := v.(protoreflect.Descriptor); ok {\n\t\tv = d.ParentFile()\n\t}\n\tif d, ok := v.(interface{ GoPackagePath() string }); ok {\n\t\treturn d.GoPackagePath()\n\t}\n\treturn \"\"\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoiface\n\ntype MessageV1 interface {\n\tReset()\n\tString() string\n\tProtoMessage()\n}\n\ntype ExtensionRangeV1 struct {\n\tStart, End int32 // both inclusive\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/runtime/protoiface/methods.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protoiface contains types referenced or implemented by messages.\n//\n// WARNING: This package should only be imported by message implementations.\n// The functionality found in this package should be accessed through\n// higher-level abstractions provided by the proto package.\npackage protoiface\n\nimport (\n\t\"google.golang.org/protobuf/internal/pragma\"\n\t\"google.golang.org/protobuf/reflect/protoreflect\"\n)\n\n// Methods is a set of optional fast-path implementations of various operations.\ntype Methods = struct {\n\tpragma.NoUnkeyedLiterals\n\n\t// Flags indicate support for optional features.\n\tFlags SupportFlags\n\n\t// Size returns the size in bytes of the wire-format encoding of a message.\n\t// Marshal must be provided if a custom Size is provided.\n\tSize func(SizeInput) SizeOutput\n\n\t// Marshal formats a message in the wire-format encoding to the provided buffer.\n\t// Size should be provided if a custom Marshal is provided.\n\t// It must not return an error for a partial message.\n\tMarshal func(MarshalInput) (MarshalOutput, error)\n\n\t// Unmarshal parses the wire-format encoding and merges the result into a message.\n\t// It must not reset the target message or return an error for a partial message.\n\tUnmarshal func(UnmarshalInput) (UnmarshalOutput, error)\n\n\t// Merge merges the contents of a source message into a destination message.\n\tMerge func(MergeInput) MergeOutput\n\n\t// CheckInitialized returns an error if any required fields in the message are not set.\n\tCheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error)\n\n\t// Equal compares two messages and returns EqualOutput.Equal == true if they are equal.\n\tEqual func(EqualInput) EqualOutput\n}\n\n// SupportFlags indicate support for optional features.\ntype SupportFlags = uint64\n\nconst (\n\t// SupportMarshalDeterministic reports whether MarshalOptions.Deterministic is supported.\n\tSupportMarshalDeterministic SupportFlags = 1 << iota\n\n\t// SupportUnmarshalDiscardUnknown reports whether UnmarshalOptions.DiscardUnknown is supported.\n\tSupportUnmarshalDiscardUnknown\n)\n\n// SizeInput is input to the Size method.\ntype SizeInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tMessage protoreflect.Message\n\tFlags   MarshalInputFlags\n}\n\n// SizeOutput is output from the Size method.\ntype SizeOutput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tSize int\n}\n\n// MarshalInput is input to the Marshal method.\ntype MarshalInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tMessage protoreflect.Message\n\tBuf     []byte // output is appended to this buffer\n\tFlags   MarshalInputFlags\n}\n\n// MarshalOutput is output from the Marshal method.\ntype MarshalOutput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tBuf []byte // contains marshaled message\n}\n\n// MarshalInputFlags configure the marshaler.\n// Most flags correspond to fields in proto.MarshalOptions.\ntype MarshalInputFlags = uint8\n\nconst (\n\tMarshalDeterministic MarshalInputFlags = 1 << iota\n\tMarshalUseCachedSize\n)\n\n// UnmarshalInput is input to the Unmarshal method.\ntype UnmarshalInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tMessage  protoreflect.Message\n\tBuf      []byte // input buffer\n\tFlags    UnmarshalInputFlags\n\tResolver interface {\n\t\tFindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)\n\t\tFindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)\n\t}\n\tDepth int\n}\n\n// UnmarshalOutput is output from the Unmarshal method.\ntype UnmarshalOutput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tFlags UnmarshalOutputFlags\n}\n\n// UnmarshalInputFlags configure the unmarshaler.\n// Most flags correspond to fields in proto.UnmarshalOptions.\ntype UnmarshalInputFlags = uint8\n\nconst (\n\tUnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota\n\n\t// UnmarshalAliasBuffer permits unmarshal operations to alias the input buffer.\n\t// The unmarshaller must not modify the contents of the buffer.\n\tUnmarshalAliasBuffer\n\n\t// UnmarshalValidated indicates that validation has already been\n\t// performed on the input buffer.\n\tUnmarshalValidated\n\n\t// UnmarshalCheckRequired is set if this unmarshal operation ultimately will care if required fields are\n\t// initialized.\n\tUnmarshalCheckRequired\n\n\t// UnmarshalNoLazyDecoding is set if this unmarshal operation should not use\n\t// lazy decoding, even when otherwise available.\n\tUnmarshalNoLazyDecoding\n)\n\n// UnmarshalOutputFlags are output from the Unmarshal method.\ntype UnmarshalOutputFlags = uint8\n\nconst (\n\t// UnmarshalInitialized may be set on return if all required fields are known to be set.\n\t// If unset, then it does not necessarily indicate that the message is uninitialized,\n\t// only that its status could not be confirmed.\n\tUnmarshalInitialized UnmarshalOutputFlags = 1 << iota\n)\n\n// MergeInput is input to the Merge method.\ntype MergeInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tSource      protoreflect.Message\n\tDestination protoreflect.Message\n}\n\n// MergeOutput is output from the Merge method.\ntype MergeOutput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tFlags MergeOutputFlags\n}\n\n// MergeOutputFlags are output from the Merge method.\ntype MergeOutputFlags = uint8\n\nconst (\n\t// MergeComplete reports whether the merge was performed.\n\t// If unset, the merger must have made no changes to the destination.\n\tMergeComplete MergeOutputFlags = 1 << iota\n)\n\n// CheckInitializedInput is input to the CheckInitialized method.\ntype CheckInitializedInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tMessage protoreflect.Message\n}\n\n// CheckInitializedOutput is output from the CheckInitialized method.\ntype CheckInitializedOutput = struct {\n\tpragma.NoUnkeyedLiterals\n}\n\n// EqualInput is input to the Equal method.\ntype EqualInput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tMessageA protoreflect.Message\n\tMessageB protoreflect.Message\n}\n\n// EqualOutput is output from the Equal method.\ntype EqualOutput = struct {\n\tpragma.NoUnkeyedLiterals\n\n\tEqual bool\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go",
    "content": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Package protoimpl contains the default implementation for messages\n// generated by protoc-gen-go.\n//\n// WARNING: This package should only ever be imported by generated messages.\n// The compatibility agreement covers nothing except for functionality needed\n// to keep existing generated messages operational. Breakages that occur due\n// to unauthorized usages of this package are not the author's responsibility.\npackage protoimpl\n\nimport (\n\t\"google.golang.org/protobuf/internal/filedesc\"\n\t\"google.golang.org/protobuf/internal/filetype\"\n\t\"google.golang.org/protobuf/internal/impl\"\n\t\"google.golang.org/protobuf/internal/protolazy\"\n)\n\n// UnsafeEnabled specifies whether package unsafe can be used.\nconst UnsafeEnabled = impl.UnsafeEnabled\n\ntype (\n\t// Types used by generated code in init functions.\n\tDescBuilder = filedesc.Builder\n\tTypeBuilder = filetype.Builder\n\n\t// Types used by generated code to implement EnumType, MessageType, and ExtensionType.\n\tEnumInfo      = impl.EnumInfo\n\tMessageInfo   = impl.MessageInfo\n\tExtensionInfo = impl.ExtensionInfo\n\n\t// Types embedded in generated messages.\n\tMessageState     = impl.MessageState\n\tSizeCache        = impl.SizeCache\n\tWeakFields       = impl.WeakFields\n\tUnknownFields    = impl.UnknownFields\n\tExtensionFields  = impl.ExtensionFields\n\tExtensionFieldV1 = impl.ExtensionField\n\n\tPointer = impl.Pointer\n\n\tLazyUnmarshalInfo  = *protolazy.XXX_lazyUnmarshalInfo\n\tRaceDetectHookData = impl.RaceDetectHookData\n)\n\nvar X impl.Export\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/runtime/protoimpl/version.go",
    "content": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage protoimpl\n\nimport (\n\t\"google.golang.org/protobuf/internal/version\"\n)\n\nconst (\n\t// MaxVersion is the maximum supported version for generated .pb.go files.\n\t// It is always the current version of the module.\n\tMaxVersion = version.Minor\n\n\t// GenVersion is the runtime version required by generated .pb.go files.\n\t// This is incremented when generated code relies on new functionality\n\t// in the runtime.\n\tGenVersion = 20\n\n\t// MinVersion is the minimum supported version for generated .pb.go files.\n\t// This is incremented when the runtime drops support for old code.\n\tMinVersion = 0\n)\n\n// EnforceVersion is used by code generated by protoc-gen-go\n// to statically enforce minimum and maximum versions of this package.\n// A compilation failure implies either that:\n//   - the runtime package is too old and needs to be updated OR\n//   - the generated code is too old and needs to be regenerated.\n//\n// The runtime package can be upgraded by running:\n//\n//\tgo get google.golang.org/protobuf\n//\n// The generated code can be regenerated by running:\n//\n//\tprotoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES}\n//\n// Example usage by generated code:\n//\n//\tconst (\n//\t\t// Verify that this generated code is sufficiently up-to-date.\n//\t\t_ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion)\n//\t\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n//\t\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - genVersion)\n//\t)\n//\n// The genVersion is the current minor version used to generated the code.\n// This compile-time check relies on negative integer overflow of a uint\n// being a compilation failure (guaranteed by the Go specification).\ntype EnforceVersion uint\n\n// This enforces the following invariant:\n//\n//\tMinVersion ≤ GenVersion ≤ MaxVersion\nconst (\n\t_ = EnforceVersion(GenVersion - MinVersion)\n\t_ = EnforceVersion(MaxVersion - GenVersion)\n)\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\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// Author: kenton@google.com (Kenton Varda)\n//  Based on original Protocol Buffers design by\n//  Sanjay Ghemawat, Jeff Dean, and others.\n//\n// The messages in this file describe the definitions found in .proto files.\n// A valid .proto file can be translated directly to a FileDescriptorProto\n// without any other information (e.g. without reading its imports).\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/descriptor.proto\n\npackage descriptorpb\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\n// The full set of known editions.\ntype Edition int32\n\nconst (\n\t// A placeholder for an unknown edition value.\n\tEdition_EDITION_UNKNOWN Edition = 0\n\t// A placeholder edition for specifying default behaviors *before* a feature\n\t// was first introduced.  This is effectively an \"infinite past\".\n\tEdition_EDITION_LEGACY Edition = 900\n\t// Legacy syntax \"editions\".  These pre-date editions, but behave much like\n\t// distinct editions.  These can't be used to specify the edition of proto\n\t// files, but feature definitions must supply proto2/proto3 defaults for\n\t// backwards compatibility.\n\tEdition_EDITION_PROTO2 Edition = 998\n\tEdition_EDITION_PROTO3 Edition = 999\n\t// Editions that have been released.  The specific values are arbitrary and\n\t// should not be depended on, but they will always be time-ordered for easy\n\t// comparison.\n\tEdition_EDITION_2023 Edition = 1000\n\tEdition_EDITION_2024 Edition = 1001\n\t// A placeholder edition for developing and testing unscheduled features.\n\tEdition_EDITION_UNSTABLE Edition = 9999\n\t// Placeholder editions for testing feature resolution.  These should not be\n\t// used or relied on outside of tests.\n\tEdition_EDITION_1_TEST_ONLY     Edition = 1\n\tEdition_EDITION_2_TEST_ONLY     Edition = 2\n\tEdition_EDITION_99997_TEST_ONLY Edition = 99997\n\tEdition_EDITION_99998_TEST_ONLY Edition = 99998\n\tEdition_EDITION_99999_TEST_ONLY Edition = 99999\n\t// Placeholder for specifying unbounded edition support.  This should only\n\t// ever be used by plugins that can expect to never require any changes to\n\t// support a new edition.\n\tEdition_EDITION_MAX Edition = 2147483647\n)\n\n// Enum value maps for Edition.\nvar (\n\tEdition_name = map[int32]string{\n\t\t0:          \"EDITION_UNKNOWN\",\n\t\t900:        \"EDITION_LEGACY\",\n\t\t998:        \"EDITION_PROTO2\",\n\t\t999:        \"EDITION_PROTO3\",\n\t\t1000:       \"EDITION_2023\",\n\t\t1001:       \"EDITION_2024\",\n\t\t9999:       \"EDITION_UNSTABLE\",\n\t\t1:          \"EDITION_1_TEST_ONLY\",\n\t\t2:          \"EDITION_2_TEST_ONLY\",\n\t\t99997:      \"EDITION_99997_TEST_ONLY\",\n\t\t99998:      \"EDITION_99998_TEST_ONLY\",\n\t\t99999:      \"EDITION_99999_TEST_ONLY\",\n\t\t2147483647: \"EDITION_MAX\",\n\t}\n\tEdition_value = map[string]int32{\n\t\t\"EDITION_UNKNOWN\":         0,\n\t\t\"EDITION_LEGACY\":          900,\n\t\t\"EDITION_PROTO2\":          998,\n\t\t\"EDITION_PROTO3\":          999,\n\t\t\"EDITION_2023\":            1000,\n\t\t\"EDITION_2024\":            1001,\n\t\t\"EDITION_UNSTABLE\":        9999,\n\t\t\"EDITION_1_TEST_ONLY\":     1,\n\t\t\"EDITION_2_TEST_ONLY\":     2,\n\t\t\"EDITION_99997_TEST_ONLY\": 99997,\n\t\t\"EDITION_99998_TEST_ONLY\": 99998,\n\t\t\"EDITION_99999_TEST_ONLY\": 99999,\n\t\t\"EDITION_MAX\":             2147483647,\n\t}\n)\n\nfunc (x Edition) Enum() *Edition {\n\tp := new(Edition)\n\t*p = x\n\treturn p\n}\n\nfunc (x Edition) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Edition) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor()\n}\n\nfunc (Edition) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[0]\n}\n\nfunc (x Edition) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *Edition) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = Edition(num)\n\treturn nil\n}\n\n// Deprecated: Use Edition.Descriptor instead.\nfunc (Edition) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}\n}\n\n// Describes the 'visibility' of a symbol with respect to the proto import\n// system. Symbols can only be imported when the visibility rules do not prevent\n// it (ex: local symbols cannot be imported).  Visibility modifiers can only set\n// on `message` and `enum` as they are the only types available to be referenced\n// from other files.\ntype SymbolVisibility int32\n\nconst (\n\tSymbolVisibility_VISIBILITY_UNSET  SymbolVisibility = 0\n\tSymbolVisibility_VISIBILITY_LOCAL  SymbolVisibility = 1\n\tSymbolVisibility_VISIBILITY_EXPORT SymbolVisibility = 2\n)\n\n// Enum value maps for SymbolVisibility.\nvar (\n\tSymbolVisibility_name = map[int32]string{\n\t\t0: \"VISIBILITY_UNSET\",\n\t\t1: \"VISIBILITY_LOCAL\",\n\t\t2: \"VISIBILITY_EXPORT\",\n\t}\n\tSymbolVisibility_value = map[string]int32{\n\t\t\"VISIBILITY_UNSET\":  0,\n\t\t\"VISIBILITY_LOCAL\":  1,\n\t\t\"VISIBILITY_EXPORT\": 2,\n\t}\n)\n\nfunc (x SymbolVisibility) Enum() *SymbolVisibility {\n\tp := new(SymbolVisibility)\n\t*p = x\n\treturn p\n}\n\nfunc (x SymbolVisibility) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (SymbolVisibility) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor()\n}\n\nfunc (SymbolVisibility) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[1]\n}\n\nfunc (x SymbolVisibility) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *SymbolVisibility) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = SymbolVisibility(num)\n\treturn nil\n}\n\n// Deprecated: Use SymbolVisibility.Descriptor instead.\nfunc (SymbolVisibility) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1}\n}\n\n// The verification state of the extension range.\ntype ExtensionRangeOptions_VerificationState int32\n\nconst (\n\t// All the extensions of the range must be declared.\n\tExtensionRangeOptions_DECLARATION ExtensionRangeOptions_VerificationState = 0\n\tExtensionRangeOptions_UNVERIFIED  ExtensionRangeOptions_VerificationState = 1\n)\n\n// Enum value maps for ExtensionRangeOptions_VerificationState.\nvar (\n\tExtensionRangeOptions_VerificationState_name = map[int32]string{\n\t\t0: \"DECLARATION\",\n\t\t1: \"UNVERIFIED\",\n\t}\n\tExtensionRangeOptions_VerificationState_value = map[string]int32{\n\t\t\"DECLARATION\": 0,\n\t\t\"UNVERIFIED\":  1,\n\t}\n)\n\nfunc (x ExtensionRangeOptions_VerificationState) Enum() *ExtensionRangeOptions_VerificationState {\n\tp := new(ExtensionRangeOptions_VerificationState)\n\t*p = x\n\treturn p\n}\n\nfunc (x ExtensionRangeOptions_VerificationState) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor()\n}\n\nfunc (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[2]\n}\n\nfunc (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *ExtensionRangeOptions_VerificationState) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = ExtensionRangeOptions_VerificationState(num)\n\treturn nil\n}\n\n// Deprecated: Use ExtensionRangeOptions_VerificationState.Descriptor instead.\nfunc (ExtensionRangeOptions_VerificationState) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0}\n}\n\ntype FieldDescriptorProto_Type int32\n\nconst (\n\t// 0 is reserved for errors.\n\t// Order is weird for historical reasons.\n\tFieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1\n\tFieldDescriptorProto_TYPE_FLOAT  FieldDescriptorProto_Type = 2\n\t// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if\n\t// negative values are likely.\n\tFieldDescriptorProto_TYPE_INT64  FieldDescriptorProto_Type = 3\n\tFieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4\n\t// Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if\n\t// negative values are likely.\n\tFieldDescriptorProto_TYPE_INT32   FieldDescriptorProto_Type = 5\n\tFieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6\n\tFieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7\n\tFieldDescriptorProto_TYPE_BOOL    FieldDescriptorProto_Type = 8\n\tFieldDescriptorProto_TYPE_STRING  FieldDescriptorProto_Type = 9\n\t// Tag-delimited aggregate.\n\t// Group type is deprecated and not supported after google.protobuf. However, Proto3\n\t// implementations should still be able to parse the group wire format and\n\t// treat group fields as unknown fields.  In Editions, the group wire format\n\t// can be enabled via the `message_encoding` feature.\n\tFieldDescriptorProto_TYPE_GROUP   FieldDescriptorProto_Type = 10\n\tFieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate.\n\t// New in version 2.\n\tFieldDescriptorProto_TYPE_BYTES    FieldDescriptorProto_Type = 12\n\tFieldDescriptorProto_TYPE_UINT32   FieldDescriptorProto_Type = 13\n\tFieldDescriptorProto_TYPE_ENUM     FieldDescriptorProto_Type = 14\n\tFieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15\n\tFieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16\n\tFieldDescriptorProto_TYPE_SINT32   FieldDescriptorProto_Type = 17 // Uses ZigZag encoding.\n\tFieldDescriptorProto_TYPE_SINT64   FieldDescriptorProto_Type = 18 // Uses ZigZag encoding.\n)\n\n// Enum value maps for FieldDescriptorProto_Type.\nvar (\n\tFieldDescriptorProto_Type_name = map[int32]string{\n\t\t1:  \"TYPE_DOUBLE\",\n\t\t2:  \"TYPE_FLOAT\",\n\t\t3:  \"TYPE_INT64\",\n\t\t4:  \"TYPE_UINT64\",\n\t\t5:  \"TYPE_INT32\",\n\t\t6:  \"TYPE_FIXED64\",\n\t\t7:  \"TYPE_FIXED32\",\n\t\t8:  \"TYPE_BOOL\",\n\t\t9:  \"TYPE_STRING\",\n\t\t10: \"TYPE_GROUP\",\n\t\t11: \"TYPE_MESSAGE\",\n\t\t12: \"TYPE_BYTES\",\n\t\t13: \"TYPE_UINT32\",\n\t\t14: \"TYPE_ENUM\",\n\t\t15: \"TYPE_SFIXED32\",\n\t\t16: \"TYPE_SFIXED64\",\n\t\t17: \"TYPE_SINT32\",\n\t\t18: \"TYPE_SINT64\",\n\t}\n\tFieldDescriptorProto_Type_value = map[string]int32{\n\t\t\"TYPE_DOUBLE\":   1,\n\t\t\"TYPE_FLOAT\":    2,\n\t\t\"TYPE_INT64\":    3,\n\t\t\"TYPE_UINT64\":   4,\n\t\t\"TYPE_INT32\":    5,\n\t\t\"TYPE_FIXED64\":  6,\n\t\t\"TYPE_FIXED32\":  7,\n\t\t\"TYPE_BOOL\":     8,\n\t\t\"TYPE_STRING\":   9,\n\t\t\"TYPE_GROUP\":    10,\n\t\t\"TYPE_MESSAGE\":  11,\n\t\t\"TYPE_BYTES\":    12,\n\t\t\"TYPE_UINT32\":   13,\n\t\t\"TYPE_ENUM\":     14,\n\t\t\"TYPE_SFIXED32\": 15,\n\t\t\"TYPE_SFIXED64\": 16,\n\t\t\"TYPE_SINT32\":   17,\n\t\t\"TYPE_SINT64\":   18,\n\t}\n)\n\nfunc (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type {\n\tp := new(FieldDescriptorProto_Type)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldDescriptorProto_Type) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor()\n}\n\nfunc (FieldDescriptorProto_Type) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[3]\n}\n\nfunc (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldDescriptorProto_Type) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldDescriptorProto_Type(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldDescriptorProto_Type.Descriptor instead.\nfunc (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 0}\n}\n\ntype FieldDescriptorProto_Label int32\n\nconst (\n\t// 0 is reserved for errors\n\tFieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1\n\tFieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3\n\t// The required label is only allowed in google.protobuf.  In proto3 and Editions\n\t// it's explicitly prohibited.  In Editions, the `field_presence` feature\n\t// can be used to get this behavior.\n\tFieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2\n)\n\n// Enum value maps for FieldDescriptorProto_Label.\nvar (\n\tFieldDescriptorProto_Label_name = map[int32]string{\n\t\t1: \"LABEL_OPTIONAL\",\n\t\t3: \"LABEL_REPEATED\",\n\t\t2: \"LABEL_REQUIRED\",\n\t}\n\tFieldDescriptorProto_Label_value = map[string]int32{\n\t\t\"LABEL_OPTIONAL\": 1,\n\t\t\"LABEL_REPEATED\": 3,\n\t\t\"LABEL_REQUIRED\": 2,\n\t}\n)\n\nfunc (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label {\n\tp := new(FieldDescriptorProto_Label)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldDescriptorProto_Label) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor()\n}\n\nfunc (FieldDescriptorProto_Label) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[4]\n}\n\nfunc (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldDescriptorProto_Label) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldDescriptorProto_Label(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldDescriptorProto_Label.Descriptor instead.\nfunc (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 1}\n}\n\n// Generated classes can be optimized for speed or code size.\ntype FileOptions_OptimizeMode int32\n\nconst (\n\tFileOptions_SPEED FileOptions_OptimizeMode = 1 // Generate complete code for parsing, serialization,\n\t// etc.\n\tFileOptions_CODE_SIZE    FileOptions_OptimizeMode = 2 // Use ReflectionOps to implement these methods.\n\tFileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 // Generate code using MessageLite and the lite runtime.\n)\n\n// Enum value maps for FileOptions_OptimizeMode.\nvar (\n\tFileOptions_OptimizeMode_name = map[int32]string{\n\t\t1: \"SPEED\",\n\t\t2: \"CODE_SIZE\",\n\t\t3: \"LITE_RUNTIME\",\n\t}\n\tFileOptions_OptimizeMode_value = map[string]int32{\n\t\t\"SPEED\":        1,\n\t\t\"CODE_SIZE\":    2,\n\t\t\"LITE_RUNTIME\": 3,\n\t}\n)\n\nfunc (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode {\n\tp := new(FileOptions_OptimizeMode)\n\t*p = x\n\treturn p\n}\n\nfunc (x FileOptions_OptimizeMode) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor()\n}\n\nfunc (FileOptions_OptimizeMode) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[5]\n}\n\nfunc (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FileOptions_OptimizeMode) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FileOptions_OptimizeMode(num)\n\treturn nil\n}\n\n// Deprecated: Use FileOptions_OptimizeMode.Descriptor instead.\nfunc (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10, 0}\n}\n\ntype FieldOptions_CType int32\n\nconst (\n\t// Default mode.\n\tFieldOptions_STRING FieldOptions_CType = 0\n\t// The option [ctype=CORD] may be applied to a non-repeated field of type\n\t// \"bytes\". It indicates that in C++, the data should be stored in a Cord\n\t// instead of a string.  For very large strings, this may reduce memory\n\t// fragmentation. It may also allow better performance when parsing from a\n\t// Cord, or when parsing with aliasing enabled, as the parsed Cord may then\n\t// alias the original buffer.\n\tFieldOptions_CORD         FieldOptions_CType = 1\n\tFieldOptions_STRING_PIECE FieldOptions_CType = 2\n)\n\n// Enum value maps for FieldOptions_CType.\nvar (\n\tFieldOptions_CType_name = map[int32]string{\n\t\t0: \"STRING\",\n\t\t1: \"CORD\",\n\t\t2: \"STRING_PIECE\",\n\t}\n\tFieldOptions_CType_value = map[string]int32{\n\t\t\"STRING\":       0,\n\t\t\"CORD\":         1,\n\t\t\"STRING_PIECE\": 2,\n\t}\n)\n\nfunc (x FieldOptions_CType) Enum() *FieldOptions_CType {\n\tp := new(FieldOptions_CType)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldOptions_CType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor()\n}\n\nfunc (FieldOptions_CType) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[6]\n}\n\nfunc (x FieldOptions_CType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldOptions_CType) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldOptions_CType(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldOptions_CType.Descriptor instead.\nfunc (FieldOptions_CType) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0}\n}\n\ntype FieldOptions_JSType int32\n\nconst (\n\t// Use the default type.\n\tFieldOptions_JS_NORMAL FieldOptions_JSType = 0\n\t// Use JavaScript strings.\n\tFieldOptions_JS_STRING FieldOptions_JSType = 1\n\t// Use JavaScript numbers.\n\tFieldOptions_JS_NUMBER FieldOptions_JSType = 2\n)\n\n// Enum value maps for FieldOptions_JSType.\nvar (\n\tFieldOptions_JSType_name = map[int32]string{\n\t\t0: \"JS_NORMAL\",\n\t\t1: \"JS_STRING\",\n\t\t2: \"JS_NUMBER\",\n\t}\n\tFieldOptions_JSType_value = map[string]int32{\n\t\t\"JS_NORMAL\": 0,\n\t\t\"JS_STRING\": 1,\n\t\t\"JS_NUMBER\": 2,\n\t}\n)\n\nfunc (x FieldOptions_JSType) Enum() *FieldOptions_JSType {\n\tp := new(FieldOptions_JSType)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldOptions_JSType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor()\n}\n\nfunc (FieldOptions_JSType) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[7]\n}\n\nfunc (x FieldOptions_JSType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldOptions_JSType(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldOptions_JSType.Descriptor instead.\nfunc (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1}\n}\n\n// If set to RETENTION_SOURCE, the option will be omitted from the binary.\ntype FieldOptions_OptionRetention int32\n\nconst (\n\tFieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0\n\tFieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1\n\tFieldOptions_RETENTION_SOURCE  FieldOptions_OptionRetention = 2\n)\n\n// Enum value maps for FieldOptions_OptionRetention.\nvar (\n\tFieldOptions_OptionRetention_name = map[int32]string{\n\t\t0: \"RETENTION_UNKNOWN\",\n\t\t1: \"RETENTION_RUNTIME\",\n\t\t2: \"RETENTION_SOURCE\",\n\t}\n\tFieldOptions_OptionRetention_value = map[string]int32{\n\t\t\"RETENTION_UNKNOWN\": 0,\n\t\t\"RETENTION_RUNTIME\": 1,\n\t\t\"RETENTION_SOURCE\":  2,\n\t}\n)\n\nfunc (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention {\n\tp := new(FieldOptions_OptionRetention)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldOptions_OptionRetention) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor()\n}\n\nfunc (FieldOptions_OptionRetention) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[8]\n}\n\nfunc (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldOptions_OptionRetention(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead.\nfunc (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2}\n}\n\n// This indicates the types of entities that the field may apply to when used\n// as an option. If it is unset, then the field may be freely used as an\n// option on any kind of entity.\ntype FieldOptions_OptionTargetType int32\n\nconst (\n\tFieldOptions_TARGET_TYPE_UNKNOWN         FieldOptions_OptionTargetType = 0\n\tFieldOptions_TARGET_TYPE_FILE            FieldOptions_OptionTargetType = 1\n\tFieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2\n\tFieldOptions_TARGET_TYPE_MESSAGE         FieldOptions_OptionTargetType = 3\n\tFieldOptions_TARGET_TYPE_FIELD           FieldOptions_OptionTargetType = 4\n\tFieldOptions_TARGET_TYPE_ONEOF           FieldOptions_OptionTargetType = 5\n\tFieldOptions_TARGET_TYPE_ENUM            FieldOptions_OptionTargetType = 6\n\tFieldOptions_TARGET_TYPE_ENUM_ENTRY      FieldOptions_OptionTargetType = 7\n\tFieldOptions_TARGET_TYPE_SERVICE         FieldOptions_OptionTargetType = 8\n\tFieldOptions_TARGET_TYPE_METHOD          FieldOptions_OptionTargetType = 9\n)\n\n// Enum value maps for FieldOptions_OptionTargetType.\nvar (\n\tFieldOptions_OptionTargetType_name = map[int32]string{\n\t\t0: \"TARGET_TYPE_UNKNOWN\",\n\t\t1: \"TARGET_TYPE_FILE\",\n\t\t2: \"TARGET_TYPE_EXTENSION_RANGE\",\n\t\t3: \"TARGET_TYPE_MESSAGE\",\n\t\t4: \"TARGET_TYPE_FIELD\",\n\t\t5: \"TARGET_TYPE_ONEOF\",\n\t\t6: \"TARGET_TYPE_ENUM\",\n\t\t7: \"TARGET_TYPE_ENUM_ENTRY\",\n\t\t8: \"TARGET_TYPE_SERVICE\",\n\t\t9: \"TARGET_TYPE_METHOD\",\n\t}\n\tFieldOptions_OptionTargetType_value = map[string]int32{\n\t\t\"TARGET_TYPE_UNKNOWN\":         0,\n\t\t\"TARGET_TYPE_FILE\":            1,\n\t\t\"TARGET_TYPE_EXTENSION_RANGE\": 2,\n\t\t\"TARGET_TYPE_MESSAGE\":         3,\n\t\t\"TARGET_TYPE_FIELD\":           4,\n\t\t\"TARGET_TYPE_ONEOF\":           5,\n\t\t\"TARGET_TYPE_ENUM\":            6,\n\t\t\"TARGET_TYPE_ENUM_ENTRY\":      7,\n\t\t\"TARGET_TYPE_SERVICE\":         8,\n\t\t\"TARGET_TYPE_METHOD\":          9,\n\t}\n)\n\nfunc (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType {\n\tp := new(FieldOptions_OptionTargetType)\n\t*p = x\n\treturn p\n}\n\nfunc (x FieldOptions_OptionTargetType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor()\n}\n\nfunc (FieldOptions_OptionTargetType) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[9]\n}\n\nfunc (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FieldOptions_OptionTargetType(num)\n\treturn nil\n}\n\n// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead.\nfunc (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3}\n}\n\n// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,\n// or neither? HTTP based RPC implementation may choose GET verb for safe\n// methods, and PUT verb for idempotent methods instead of the default POST.\ntype MethodOptions_IdempotencyLevel int32\n\nconst (\n\tMethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0\n\tMethodOptions_NO_SIDE_EFFECTS     MethodOptions_IdempotencyLevel = 1 // implies idempotent\n\tMethodOptions_IDEMPOTENT          MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects\n)\n\n// Enum value maps for MethodOptions_IdempotencyLevel.\nvar (\n\tMethodOptions_IdempotencyLevel_name = map[int32]string{\n\t\t0: \"IDEMPOTENCY_UNKNOWN\",\n\t\t1: \"NO_SIDE_EFFECTS\",\n\t\t2: \"IDEMPOTENT\",\n\t}\n\tMethodOptions_IdempotencyLevel_value = map[string]int32{\n\t\t\"IDEMPOTENCY_UNKNOWN\": 0,\n\t\t\"NO_SIDE_EFFECTS\":     1,\n\t\t\"IDEMPOTENT\":          2,\n\t}\n)\n\nfunc (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel {\n\tp := new(MethodOptions_IdempotencyLevel)\n\t*p = x\n\treturn p\n}\n\nfunc (x MethodOptions_IdempotencyLevel) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor()\n}\n\nfunc (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[10]\n}\n\nfunc (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = MethodOptions_IdempotencyLevel(num)\n\treturn nil\n}\n\n// Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead.\nfunc (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0}\n}\n\ntype FeatureSet_FieldPresence int32\n\nconst (\n\tFeatureSet_FIELD_PRESENCE_UNKNOWN FeatureSet_FieldPresence = 0\n\tFeatureSet_EXPLICIT               FeatureSet_FieldPresence = 1\n\tFeatureSet_IMPLICIT               FeatureSet_FieldPresence = 2\n\tFeatureSet_LEGACY_REQUIRED        FeatureSet_FieldPresence = 3\n)\n\n// Enum value maps for FeatureSet_FieldPresence.\nvar (\n\tFeatureSet_FieldPresence_name = map[int32]string{\n\t\t0: \"FIELD_PRESENCE_UNKNOWN\",\n\t\t1: \"EXPLICIT\",\n\t\t2: \"IMPLICIT\",\n\t\t3: \"LEGACY_REQUIRED\",\n\t}\n\tFeatureSet_FieldPresence_value = map[string]int32{\n\t\t\"FIELD_PRESENCE_UNKNOWN\": 0,\n\t\t\"EXPLICIT\":               1,\n\t\t\"IMPLICIT\":               2,\n\t\t\"LEGACY_REQUIRED\":        3,\n\t}\n)\n\nfunc (x FeatureSet_FieldPresence) Enum() *FeatureSet_FieldPresence {\n\tp := new(FeatureSet_FieldPresence)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_FieldPresence) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor()\n}\n\nfunc (FeatureSet_FieldPresence) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[11]\n}\n\nfunc (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_FieldPresence) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_FieldPresence(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_FieldPresence.Descriptor instead.\nfunc (FeatureSet_FieldPresence) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}\n}\n\ntype FeatureSet_EnumType int32\n\nconst (\n\tFeatureSet_ENUM_TYPE_UNKNOWN FeatureSet_EnumType = 0\n\tFeatureSet_OPEN              FeatureSet_EnumType = 1\n\tFeatureSet_CLOSED            FeatureSet_EnumType = 2\n)\n\n// Enum value maps for FeatureSet_EnumType.\nvar (\n\tFeatureSet_EnumType_name = map[int32]string{\n\t\t0: \"ENUM_TYPE_UNKNOWN\",\n\t\t1: \"OPEN\",\n\t\t2: \"CLOSED\",\n\t}\n\tFeatureSet_EnumType_value = map[string]int32{\n\t\t\"ENUM_TYPE_UNKNOWN\": 0,\n\t\t\"OPEN\":              1,\n\t\t\"CLOSED\":            2,\n\t}\n)\n\nfunc (x FeatureSet_EnumType) Enum() *FeatureSet_EnumType {\n\tp := new(FeatureSet_EnumType)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_EnumType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor()\n}\n\nfunc (FeatureSet_EnumType) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[12]\n}\n\nfunc (x FeatureSet_EnumType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_EnumType) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_EnumType(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_EnumType.Descriptor instead.\nfunc (FeatureSet_EnumType) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 1}\n}\n\ntype FeatureSet_RepeatedFieldEncoding int32\n\nconst (\n\tFeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN FeatureSet_RepeatedFieldEncoding = 0\n\tFeatureSet_PACKED                          FeatureSet_RepeatedFieldEncoding = 1\n\tFeatureSet_EXPANDED                        FeatureSet_RepeatedFieldEncoding = 2\n)\n\n// Enum value maps for FeatureSet_RepeatedFieldEncoding.\nvar (\n\tFeatureSet_RepeatedFieldEncoding_name = map[int32]string{\n\t\t0: \"REPEATED_FIELD_ENCODING_UNKNOWN\",\n\t\t1: \"PACKED\",\n\t\t2: \"EXPANDED\",\n\t}\n\tFeatureSet_RepeatedFieldEncoding_value = map[string]int32{\n\t\t\"REPEATED_FIELD_ENCODING_UNKNOWN\": 0,\n\t\t\"PACKED\":                          1,\n\t\t\"EXPANDED\":                        2,\n\t}\n)\n\nfunc (x FeatureSet_RepeatedFieldEncoding) Enum() *FeatureSet_RepeatedFieldEncoding {\n\tp := new(FeatureSet_RepeatedFieldEncoding)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_RepeatedFieldEncoding) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor()\n}\n\nfunc (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[13]\n}\n\nfunc (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_RepeatedFieldEncoding) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_RepeatedFieldEncoding(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_RepeatedFieldEncoding.Descriptor instead.\nfunc (FeatureSet_RepeatedFieldEncoding) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 2}\n}\n\ntype FeatureSet_Utf8Validation int32\n\nconst (\n\tFeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0\n\tFeatureSet_VERIFY                  FeatureSet_Utf8Validation = 2\n\tFeatureSet_NONE                    FeatureSet_Utf8Validation = 3\n)\n\n// Enum value maps for FeatureSet_Utf8Validation.\nvar (\n\tFeatureSet_Utf8Validation_name = map[int32]string{\n\t\t0: \"UTF8_VALIDATION_UNKNOWN\",\n\t\t2: \"VERIFY\",\n\t\t3: \"NONE\",\n\t}\n\tFeatureSet_Utf8Validation_value = map[string]int32{\n\t\t\"UTF8_VALIDATION_UNKNOWN\": 0,\n\t\t\"VERIFY\":                  2,\n\t\t\"NONE\":                    3,\n\t}\n)\n\nfunc (x FeatureSet_Utf8Validation) Enum() *FeatureSet_Utf8Validation {\n\tp := new(FeatureSet_Utf8Validation)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_Utf8Validation) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor()\n}\n\nfunc (FeatureSet_Utf8Validation) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[14]\n}\n\nfunc (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_Utf8Validation) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_Utf8Validation(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_Utf8Validation.Descriptor instead.\nfunc (FeatureSet_Utf8Validation) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 3}\n}\n\ntype FeatureSet_MessageEncoding int32\n\nconst (\n\tFeatureSet_MESSAGE_ENCODING_UNKNOWN FeatureSet_MessageEncoding = 0\n\tFeatureSet_LENGTH_PREFIXED          FeatureSet_MessageEncoding = 1\n\tFeatureSet_DELIMITED                FeatureSet_MessageEncoding = 2\n)\n\n// Enum value maps for FeatureSet_MessageEncoding.\nvar (\n\tFeatureSet_MessageEncoding_name = map[int32]string{\n\t\t0: \"MESSAGE_ENCODING_UNKNOWN\",\n\t\t1: \"LENGTH_PREFIXED\",\n\t\t2: \"DELIMITED\",\n\t}\n\tFeatureSet_MessageEncoding_value = map[string]int32{\n\t\t\"MESSAGE_ENCODING_UNKNOWN\": 0,\n\t\t\"LENGTH_PREFIXED\":          1,\n\t\t\"DELIMITED\":                2,\n\t}\n)\n\nfunc (x FeatureSet_MessageEncoding) Enum() *FeatureSet_MessageEncoding {\n\tp := new(FeatureSet_MessageEncoding)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_MessageEncoding) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor()\n}\n\nfunc (FeatureSet_MessageEncoding) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[15]\n}\n\nfunc (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_MessageEncoding) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_MessageEncoding(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_MessageEncoding.Descriptor instead.\nfunc (FeatureSet_MessageEncoding) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 4}\n}\n\ntype FeatureSet_JsonFormat int32\n\nconst (\n\tFeatureSet_JSON_FORMAT_UNKNOWN FeatureSet_JsonFormat = 0\n\tFeatureSet_ALLOW               FeatureSet_JsonFormat = 1\n\tFeatureSet_LEGACY_BEST_EFFORT  FeatureSet_JsonFormat = 2\n)\n\n// Enum value maps for FeatureSet_JsonFormat.\nvar (\n\tFeatureSet_JsonFormat_name = map[int32]string{\n\t\t0: \"JSON_FORMAT_UNKNOWN\",\n\t\t1: \"ALLOW\",\n\t\t2: \"LEGACY_BEST_EFFORT\",\n\t}\n\tFeatureSet_JsonFormat_value = map[string]int32{\n\t\t\"JSON_FORMAT_UNKNOWN\": 0,\n\t\t\"ALLOW\":               1,\n\t\t\"LEGACY_BEST_EFFORT\":  2,\n\t}\n)\n\nfunc (x FeatureSet_JsonFormat) Enum() *FeatureSet_JsonFormat {\n\tp := new(FeatureSet_JsonFormat)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_JsonFormat) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor()\n}\n\nfunc (FeatureSet_JsonFormat) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[16]\n}\n\nfunc (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_JsonFormat) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_JsonFormat(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_JsonFormat.Descriptor instead.\nfunc (FeatureSet_JsonFormat) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 5}\n}\n\ntype FeatureSet_EnforceNamingStyle int32\n\nconst (\n\tFeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN FeatureSet_EnforceNamingStyle = 0\n\tFeatureSet_STYLE2024                    FeatureSet_EnforceNamingStyle = 1\n\tFeatureSet_STYLE_LEGACY                 FeatureSet_EnforceNamingStyle = 2\n)\n\n// Enum value maps for FeatureSet_EnforceNamingStyle.\nvar (\n\tFeatureSet_EnforceNamingStyle_name = map[int32]string{\n\t\t0: \"ENFORCE_NAMING_STYLE_UNKNOWN\",\n\t\t1: \"STYLE2024\",\n\t\t2: \"STYLE_LEGACY\",\n\t}\n\tFeatureSet_EnforceNamingStyle_value = map[string]int32{\n\t\t\"ENFORCE_NAMING_STYLE_UNKNOWN\": 0,\n\t\t\"STYLE2024\":                    1,\n\t\t\"STYLE_LEGACY\":                 2,\n\t}\n)\n\nfunc (x FeatureSet_EnforceNamingStyle) Enum() *FeatureSet_EnforceNamingStyle {\n\tp := new(FeatureSet_EnforceNamingStyle)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_EnforceNamingStyle) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_EnforceNamingStyle) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[17].Descriptor()\n}\n\nfunc (FeatureSet_EnforceNamingStyle) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[17]\n}\n\nfunc (x FeatureSet_EnforceNamingStyle) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_EnforceNamingStyle) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_EnforceNamingStyle(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_EnforceNamingStyle.Descriptor instead.\nfunc (FeatureSet_EnforceNamingStyle) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 6}\n}\n\ntype FeatureSet_VisibilityFeature_DefaultSymbolVisibility int32\n\nconst (\n\tFeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 0\n\t// Default pre-EDITION_2024, all UNSET visibility are export.\n\tFeatureSet_VisibilityFeature_EXPORT_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 1\n\t// All top-level symbols default to export, nested default to local.\n\tFeatureSet_VisibilityFeature_EXPORT_TOP_LEVEL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 2\n\t// All symbols default to local.\n\tFeatureSet_VisibilityFeature_LOCAL_ALL FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 3\n\t// All symbols local by default. Nested types cannot be exported.\n\t// With special case caveat for message { enum {} reserved 1 to max; }\n\t// This is the recommended setting for new protos.\n\tFeatureSet_VisibilityFeature_STRICT FeatureSet_VisibilityFeature_DefaultSymbolVisibility = 4\n)\n\n// Enum value maps for FeatureSet_VisibilityFeature_DefaultSymbolVisibility.\nvar (\n\tFeatureSet_VisibilityFeature_DefaultSymbolVisibility_name = map[int32]string{\n\t\t0: \"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\",\n\t\t1: \"EXPORT_ALL\",\n\t\t2: \"EXPORT_TOP_LEVEL\",\n\t\t3: \"LOCAL_ALL\",\n\t\t4: \"STRICT\",\n\t}\n\tFeatureSet_VisibilityFeature_DefaultSymbolVisibility_value = map[string]int32{\n\t\t\"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\": 0,\n\t\t\"EXPORT_ALL\":                        1,\n\t\t\"EXPORT_TOP_LEVEL\":                  2,\n\t\t\"LOCAL_ALL\":                         3,\n\t\t\"STRICT\":                            4,\n\t}\n)\n\nfunc (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Enum() *FeatureSet_VisibilityFeature_DefaultSymbolVisibility {\n\tp := new(FeatureSet_VisibilityFeature_DefaultSymbolVisibility)\n\t*p = x\n\treturn p\n}\n\nfunc (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[18].Descriptor()\n}\n\nfunc (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[18]\n}\n\nfunc (x FeatureSet_VisibilityFeature_DefaultSymbolVisibility) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *FeatureSet_VisibilityFeature_DefaultSymbolVisibility) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = FeatureSet_VisibilityFeature_DefaultSymbolVisibility(num)\n\treturn nil\n}\n\n// Deprecated: Use FeatureSet_VisibilityFeature_DefaultSymbolVisibility.Descriptor instead.\nfunc (FeatureSet_VisibilityFeature_DefaultSymbolVisibility) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0, 0}\n}\n\n// Represents the identified object's effect on the element in the original\n// .proto file.\ntype GeneratedCodeInfo_Annotation_Semantic int32\n\nconst (\n\t// There is no effect or the effect is indescribable.\n\tGeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0\n\t// The element is set or otherwise mutated.\n\tGeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1\n\t// An alias to the element is returned.\n\tGeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2\n)\n\n// Enum value maps for GeneratedCodeInfo_Annotation_Semantic.\nvar (\n\tGeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{\n\t\t0: \"NONE\",\n\t\t1: \"SET\",\n\t\t2: \"ALIAS\",\n\t}\n\tGeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{\n\t\t\"NONE\":  0,\n\t\t\"SET\":   1,\n\t\t\"ALIAS\": 2,\n\t}\n)\n\nfunc (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic {\n\tp := new(GeneratedCodeInfo_Annotation_Semantic)\n\t*p = x\n\treturn p\n}\n\nfunc (x GeneratedCodeInfo_Annotation_Semantic) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_descriptor_proto_enumTypes[19].Descriptor()\n}\n\nfunc (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_descriptor_proto_enumTypes[19]\n}\n\nfunc (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = GeneratedCodeInfo_Annotation_Semantic(num)\n\treturn nil\n}\n\n// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead.\nfunc (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0, 0}\n}\n\n// The protocol compiler can output a FileDescriptorSet containing the .proto\n// files it parses.\ntype FileDescriptorSet struct {\n\tstate           protoimpl.MessageState `protogen:\"open.v1\"`\n\tFile            []*FileDescriptorProto `protobuf:\"bytes,1,rep,name=file\" json:\"file,omitempty\"`\n\textensionFields protoimpl.ExtensionFields\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *FileDescriptorSet) Reset() {\n\t*x = FileDescriptorSet{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FileDescriptorSet) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FileDescriptorSet) ProtoMessage() {}\n\nfunc (x *FileDescriptorSet) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FileDescriptorSet.ProtoReflect.Descriptor instead.\nfunc (*FileDescriptorSet) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *FileDescriptorSet) GetFile() []*FileDescriptorProto {\n\tif x != nil {\n\t\treturn x.File\n\t}\n\treturn nil\n}\n\n// Describes a complete .proto file.\ntype FileDescriptorProto struct {\n\tstate   protoimpl.MessageState `protogen:\"open.v1\"`\n\tName    *string                `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`       // file name, relative to root of source tree\n\tPackage *string                `protobuf:\"bytes,2,opt,name=package\" json:\"package,omitempty\"` // e.g. \"foo\", \"foo.bar\", etc.\n\t// Names of files imported by this file.\n\tDependency []string `protobuf:\"bytes,3,rep,name=dependency\" json:\"dependency,omitempty\"`\n\t// Indexes of the public imported files in the dependency list above.\n\tPublicDependency []int32 `protobuf:\"varint,10,rep,name=public_dependency,json=publicDependency\" json:\"public_dependency,omitempty\"`\n\t// Indexes of the weak imported files in the dependency list.\n\t// For Google-internal migration only. Do not use.\n\tWeakDependency []int32 `protobuf:\"varint,11,rep,name=weak_dependency,json=weakDependency\" json:\"weak_dependency,omitempty\"`\n\t// Names of files imported by this file purely for the purpose of providing\n\t// option extensions. These are excluded from the dependency list above.\n\tOptionDependency []string `protobuf:\"bytes,15,rep,name=option_dependency,json=optionDependency\" json:\"option_dependency,omitempty\"`\n\t// All top-level definitions in this file.\n\tMessageType []*DescriptorProto        `protobuf:\"bytes,4,rep,name=message_type,json=messageType\" json:\"message_type,omitempty\"`\n\tEnumType    []*EnumDescriptorProto    `protobuf:\"bytes,5,rep,name=enum_type,json=enumType\" json:\"enum_type,omitempty\"`\n\tService     []*ServiceDescriptorProto `protobuf:\"bytes,6,rep,name=service\" json:\"service,omitempty\"`\n\tExtension   []*FieldDescriptorProto   `protobuf:\"bytes,7,rep,name=extension\" json:\"extension,omitempty\"`\n\tOptions     *FileOptions              `protobuf:\"bytes,8,opt,name=options\" json:\"options,omitempty\"`\n\t// This field contains optional information about the original source code.\n\t// You may safely remove this entire field without harming runtime\n\t// functionality of the descriptors -- the information is needed only by\n\t// development tools.\n\tSourceCodeInfo *SourceCodeInfo `protobuf:\"bytes,9,opt,name=source_code_info,json=sourceCodeInfo\" json:\"source_code_info,omitempty\"`\n\t// The syntax of the proto file.\n\t// The supported values are \"proto2\", \"proto3\", and \"editions\".\n\t//\n\t// If `edition` is present, this value must be \"editions\".\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tSyntax *string `protobuf:\"bytes,12,opt,name=syntax\" json:\"syntax,omitempty\"`\n\t// The edition of the proto file.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tEdition       *Edition `protobuf:\"varint,14,opt,name=edition,enum=google.protobuf.Edition\" json:\"edition,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *FileDescriptorProto) Reset() {\n\t*x = FileDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FileDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FileDescriptorProto) ProtoMessage() {}\n\nfunc (x *FileDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FileDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*FileDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *FileDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileDescriptorProto) GetPackage() string {\n\tif x != nil && x.Package != nil {\n\t\treturn *x.Package\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileDescriptorProto) GetDependency() []string {\n\tif x != nil {\n\t\treturn x.Dependency\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetPublicDependency() []int32 {\n\tif x != nil {\n\t\treturn x.PublicDependency\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetWeakDependency() []int32 {\n\tif x != nil {\n\t\treturn x.WeakDependency\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetOptionDependency() []string {\n\tif x != nil {\n\t\treturn x.OptionDependency\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetMessageType() []*DescriptorProto {\n\tif x != nil {\n\t\treturn x.MessageType\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto {\n\tif x != nil {\n\t\treturn x.EnumType\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetService() []*ServiceDescriptorProto {\n\tif x != nil {\n\t\treturn x.Service\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetExtension() []*FieldDescriptorProto {\n\tif x != nil {\n\t\treturn x.Extension\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetOptions() *FileOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo {\n\tif x != nil {\n\t\treturn x.SourceCodeInfo\n\t}\n\treturn nil\n}\n\nfunc (x *FileDescriptorProto) GetSyntax() string {\n\tif x != nil && x.Syntax != nil {\n\t\treturn *x.Syntax\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileDescriptorProto) GetEdition() Edition {\n\tif x != nil && x.Edition != nil {\n\t\treturn *x.Edition\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\n// Describes a message type.\ntype DescriptorProto struct {\n\tstate          protoimpl.MessageState            `protogen:\"open.v1\"`\n\tName           *string                           `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tField          []*FieldDescriptorProto           `protobuf:\"bytes,2,rep,name=field\" json:\"field,omitempty\"`\n\tExtension      []*FieldDescriptorProto           `protobuf:\"bytes,6,rep,name=extension\" json:\"extension,omitempty\"`\n\tNestedType     []*DescriptorProto                `protobuf:\"bytes,3,rep,name=nested_type,json=nestedType\" json:\"nested_type,omitempty\"`\n\tEnumType       []*EnumDescriptorProto            `protobuf:\"bytes,4,rep,name=enum_type,json=enumType\" json:\"enum_type,omitempty\"`\n\tExtensionRange []*DescriptorProto_ExtensionRange `protobuf:\"bytes,5,rep,name=extension_range,json=extensionRange\" json:\"extension_range,omitempty\"`\n\tOneofDecl      []*OneofDescriptorProto           `protobuf:\"bytes,8,rep,name=oneof_decl,json=oneofDecl\" json:\"oneof_decl,omitempty\"`\n\tOptions        *MessageOptions                   `protobuf:\"bytes,7,opt,name=options\" json:\"options,omitempty\"`\n\tReservedRange  []*DescriptorProto_ReservedRange  `protobuf:\"bytes,9,rep,name=reserved_range,json=reservedRange\" json:\"reserved_range,omitempty\"`\n\t// Reserved field names, which may not be used by fields in the same message.\n\t// A given name may only be reserved once.\n\tReservedName []string `protobuf:\"bytes,10,rep,name=reserved_name,json=reservedName\" json:\"reserved_name,omitempty\"`\n\t// Support for `export` and `local` keywords on enums.\n\tVisibility    *SymbolVisibility `protobuf:\"varint,11,opt,name=visibility,enum=google.protobuf.SymbolVisibility\" json:\"visibility,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *DescriptorProto) Reset() {\n\t*x = DescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DescriptorProto) ProtoMessage() {}\n\nfunc (x *DescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*DescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *DescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *DescriptorProto) GetField() []*FieldDescriptorProto {\n\tif x != nil {\n\t\treturn x.Field\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetExtension() []*FieldDescriptorProto {\n\tif x != nil {\n\t\treturn x.Extension\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetNestedType() []*DescriptorProto {\n\tif x != nil {\n\t\treturn x.NestedType\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetEnumType() []*EnumDescriptorProto {\n\tif x != nil {\n\t\treturn x.EnumType\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange {\n\tif x != nil {\n\t\treturn x.ExtensionRange\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto {\n\tif x != nil {\n\t\treturn x.OneofDecl\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetOptions() *MessageOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange {\n\tif x != nil {\n\t\treturn x.ReservedRange\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetReservedName() []string {\n\tif x != nil {\n\t\treturn x.ReservedName\n\t}\n\treturn nil\n}\n\nfunc (x *DescriptorProto) GetVisibility() SymbolVisibility {\n\tif x != nil && x.Visibility != nil {\n\t\treturn *x.Visibility\n\t}\n\treturn SymbolVisibility_VISIBILITY_UNSET\n}\n\ntype ExtensionRangeOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\t// For external users: DO NOT USE. We are in the process of open sourcing\n\t// extension declaration and executing internal cleanups before it can be\n\t// used externally.\n\tDeclaration []*ExtensionRangeOptions_Declaration `protobuf:\"bytes,2,rep,name=declaration\" json:\"declaration,omitempty\"`\n\t// Any features defined in the specific edition.\n\tFeatures *FeatureSet `protobuf:\"bytes,50,opt,name=features\" json:\"features,omitempty\"`\n\t// The verification state of the range.\n\t// TODO: flip the default to DECLARATION once all empty ranges\n\t// are marked as UNVERIFIED.\n\tVerification    *ExtensionRangeOptions_VerificationState `protobuf:\"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1\" json:\"verification,omitempty\"`\n\textensionFields protoimpl.ExtensionFields\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\n// Default values for ExtensionRangeOptions fields.\nconst (\n\tDefault_ExtensionRangeOptions_Verification = ExtensionRangeOptions_UNVERIFIED\n)\n\nfunc (x *ExtensionRangeOptions) Reset() {\n\t*x = ExtensionRangeOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ExtensionRangeOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ExtensionRangeOptions) ProtoMessage() {}\n\nfunc (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor instead.\nfunc (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\nfunc (x *ExtensionRangeOptions) GetDeclaration() []*ExtensionRangeOptions_Declaration {\n\tif x != nil {\n\t\treturn x.Declaration\n\t}\n\treturn nil\n}\n\nfunc (x *ExtensionRangeOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_VerificationState {\n\tif x != nil && x.Verification != nil {\n\t\treturn *x.Verification\n\t}\n\treturn Default_ExtensionRangeOptions_Verification\n}\n\n// Describes a field within a message.\ntype FieldDescriptorProto struct {\n\tstate  protoimpl.MessageState      `protogen:\"open.v1\"`\n\tName   *string                     `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tNumber *int32                      `protobuf:\"varint,3,opt,name=number\" json:\"number,omitempty\"`\n\tLabel  *FieldDescriptorProto_Label `protobuf:\"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label\" json:\"label,omitempty\"`\n\t// If type_name is set, this need not be set.  If both this and type_name\n\t// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.\n\tType *FieldDescriptorProto_Type `protobuf:\"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type\" json:\"type,omitempty\"`\n\t// For message and enum types, this is the name of the type.  If the name\n\t// starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping\n\t// rules are used to find the type (i.e. first the nested types within this\n\t// message are searched, then within the parent, on up to the root\n\t// namespace).\n\tTypeName *string `protobuf:\"bytes,6,opt,name=type_name,json=typeName\" json:\"type_name,omitempty\"`\n\t// For extensions, this is the name of the type being extended.  It is\n\t// resolved in the same manner as type_name.\n\tExtendee *string `protobuf:\"bytes,2,opt,name=extendee\" json:\"extendee,omitempty\"`\n\t// For numeric types, contains the original text representation of the value.\n\t// For booleans, \"true\" or \"false\".\n\t// For strings, contains the default text contents (not escaped in any way).\n\t// For bytes, contains the C escaped value.  All bytes >= 128 are escaped.\n\tDefaultValue *string `protobuf:\"bytes,7,opt,name=default_value,json=defaultValue\" json:\"default_value,omitempty\"`\n\t// If set, gives the index of a oneof in the containing type's oneof_decl\n\t// list.  This field is a member of that oneof.\n\tOneofIndex *int32 `protobuf:\"varint,9,opt,name=oneof_index,json=oneofIndex\" json:\"oneof_index,omitempty\"`\n\t// JSON name of this field. The value is set by protocol compiler. If the\n\t// user has set a \"json_name\" option on this field, that option's value\n\t// will be used. Otherwise, it's deduced from the field's name by converting\n\t// it to camelCase.\n\tJsonName *string       `protobuf:\"bytes,10,opt,name=json_name,json=jsonName\" json:\"json_name,omitempty\"`\n\tOptions  *FieldOptions `protobuf:\"bytes,8,opt,name=options\" json:\"options,omitempty\"`\n\t// If true, this is a proto3 \"optional\". When a proto3 field is optional, it\n\t// tracks presence regardless of field type.\n\t//\n\t// When proto3_optional is true, this field must belong to a oneof to signal\n\t// to old proto3 clients that presence is tracked for this field. This oneof\n\t// is known as a \"synthetic\" oneof, and this field must be its sole member\n\t// (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs\n\t// exist in the descriptor only, and do not generate any API. Synthetic oneofs\n\t// must be ordered after all \"real\" oneofs.\n\t//\n\t// For message fields, proto3_optional doesn't create any semantic change,\n\t// since non-repeated message fields always track presence. However it still\n\t// indicates the semantic detail of whether the user wrote \"optional\" or not.\n\t// This can be useful for round-tripping the .proto file. For consistency we\n\t// give message fields a synthetic oneof also, even though it is not required\n\t// to track presence. This is especially important because the parser can't\n\t// tell if a field is a message or an enum, so it must always create a\n\t// synthetic oneof.\n\t//\n\t// Proto2 optional fields do not set this flag, because they already indicate\n\t// optional with `LABEL_OPTIONAL`.\n\tProto3Optional *bool `protobuf:\"varint,17,opt,name=proto3_optional,json=proto3Optional\" json:\"proto3_optional,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *FieldDescriptorProto) Reset() {\n\t*x = FieldDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FieldDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FieldDescriptorProto) ProtoMessage() {}\n\nfunc (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FieldDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*FieldDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *FieldDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldDescriptorProto) GetNumber() int32 {\n\tif x != nil && x.Number != nil {\n\t\treturn *x.Number\n\t}\n\treturn 0\n}\n\nfunc (x *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label {\n\tif x != nil && x.Label != nil {\n\t\treturn *x.Label\n\t}\n\treturn FieldDescriptorProto_LABEL_OPTIONAL\n}\n\nfunc (x *FieldDescriptorProto) GetType() FieldDescriptorProto_Type {\n\tif x != nil && x.Type != nil {\n\t\treturn *x.Type\n\t}\n\treturn FieldDescriptorProto_TYPE_DOUBLE\n}\n\nfunc (x *FieldDescriptorProto) GetTypeName() string {\n\tif x != nil && x.TypeName != nil {\n\t\treturn *x.TypeName\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldDescriptorProto) GetExtendee() string {\n\tif x != nil && x.Extendee != nil {\n\t\treturn *x.Extendee\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldDescriptorProto) GetDefaultValue() string {\n\tif x != nil && x.DefaultValue != nil {\n\t\treturn *x.DefaultValue\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldDescriptorProto) GetOneofIndex() int32 {\n\tif x != nil && x.OneofIndex != nil {\n\t\treturn *x.OneofIndex\n\t}\n\treturn 0\n}\n\nfunc (x *FieldDescriptorProto) GetJsonName() string {\n\tif x != nil && x.JsonName != nil {\n\t\treturn *x.JsonName\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldDescriptorProto) GetOptions() *FieldOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\nfunc (x *FieldDescriptorProto) GetProto3Optional() bool {\n\tif x != nil && x.Proto3Optional != nil {\n\t\treturn *x.Proto3Optional\n\t}\n\treturn false\n}\n\n// Describes a oneof.\ntype OneofDescriptorProto struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tName          *string                `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tOptions       *OneofOptions          `protobuf:\"bytes,2,opt,name=options\" json:\"options,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *OneofDescriptorProto) Reset() {\n\t*x = OneofDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *OneofDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*OneofDescriptorProto) ProtoMessage() {}\n\nfunc (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use OneofDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*OneofDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *OneofDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *OneofDescriptorProto) GetOptions() *OneofOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\n// Describes an enum type.\ntype EnumDescriptorProto struct {\n\tstate   protoimpl.MessageState      `protogen:\"open.v1\"`\n\tName    *string                     `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tValue   []*EnumValueDescriptorProto `protobuf:\"bytes,2,rep,name=value\" json:\"value,omitempty\"`\n\tOptions *EnumOptions                `protobuf:\"bytes,3,opt,name=options\" json:\"options,omitempty\"`\n\t// Range of reserved numeric values. Reserved numeric values may not be used\n\t// by enum values in the same enum declaration. Reserved ranges may not\n\t// overlap.\n\tReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:\"bytes,4,rep,name=reserved_range,json=reservedRange\" json:\"reserved_range,omitempty\"`\n\t// Reserved enum value names, which may not be reused. A given name may only\n\t// be reserved once.\n\tReservedName []string `protobuf:\"bytes,5,rep,name=reserved_name,json=reservedName\" json:\"reserved_name,omitempty\"`\n\t// Support for `export` and `local` keywords on enums.\n\tVisibility    *SymbolVisibility `protobuf:\"varint,6,opt,name=visibility,enum=google.protobuf.SymbolVisibility\" json:\"visibility,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *EnumDescriptorProto) Reset() {\n\t*x = EnumDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *EnumDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumDescriptorProto) ProtoMessage() {}\n\nfunc (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*EnumDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *EnumDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn nil\n}\n\nfunc (x *EnumDescriptorProto) GetOptions() *EnumOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\nfunc (x *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange {\n\tif x != nil {\n\t\treturn x.ReservedRange\n\t}\n\treturn nil\n}\n\nfunc (x *EnumDescriptorProto) GetReservedName() []string {\n\tif x != nil {\n\t\treturn x.ReservedName\n\t}\n\treturn nil\n}\n\nfunc (x *EnumDescriptorProto) GetVisibility() SymbolVisibility {\n\tif x != nil && x.Visibility != nil {\n\t\treturn *x.Visibility\n\t}\n\treturn SymbolVisibility_VISIBILITY_UNSET\n}\n\n// Describes a value within an enum.\ntype EnumValueDescriptorProto struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tName          *string                `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tNumber        *int32                 `protobuf:\"varint,2,opt,name=number\" json:\"number,omitempty\"`\n\tOptions       *EnumValueOptions      `protobuf:\"bytes,3,opt,name=options\" json:\"options,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *EnumValueDescriptorProto) Reset() {\n\t*x = EnumValueDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *EnumValueDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumValueDescriptorProto) ProtoMessage() {}\n\nfunc (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumValueDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *EnumValueDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *EnumValueDescriptorProto) GetNumber() int32 {\n\tif x != nil && x.Number != nil {\n\t\treturn *x.Number\n\t}\n\treturn 0\n}\n\nfunc (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\n// Describes a service.\ntype ServiceDescriptorProto struct {\n\tstate         protoimpl.MessageState   `protogen:\"open.v1\"`\n\tName          *string                  `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\tMethod        []*MethodDescriptorProto `protobuf:\"bytes,2,rep,name=method\" json:\"method,omitempty\"`\n\tOptions       *ServiceOptions          `protobuf:\"bytes,3,opt,name=options\" json:\"options,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ServiceDescriptorProto) Reset() {\n\t*x = ServiceDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ServiceDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ServiceDescriptorProto) ProtoMessage() {}\n\nfunc (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ServiceDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*ServiceDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *ServiceDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto {\n\tif x != nil {\n\t\treturn x.Method\n\t}\n\treturn nil\n}\n\nfunc (x *ServiceDescriptorProto) GetOptions() *ServiceOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\n// Describes a method of a service.\ntype MethodDescriptorProto struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\tName  *string                `protobuf:\"bytes,1,opt,name=name\" json:\"name,omitempty\"`\n\t// Input and output type names.  These are resolved in the same way as\n\t// FieldDescriptorProto.type_name, but must refer to a message type.\n\tInputType  *string        `protobuf:\"bytes,2,opt,name=input_type,json=inputType\" json:\"input_type,omitempty\"`\n\tOutputType *string        `protobuf:\"bytes,3,opt,name=output_type,json=outputType\" json:\"output_type,omitempty\"`\n\tOptions    *MethodOptions `protobuf:\"bytes,4,opt,name=options\" json:\"options,omitempty\"`\n\t// Identifies if client streams multiple client messages\n\tClientStreaming *bool `protobuf:\"varint,5,opt,name=client_streaming,json=clientStreaming,def=0\" json:\"client_streaming,omitempty\"`\n\t// Identifies if server streams multiple server messages\n\tServerStreaming *bool `protobuf:\"varint,6,opt,name=server_streaming,json=serverStreaming,def=0\" json:\"server_streaming,omitempty\"`\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\n// Default values for MethodDescriptorProto fields.\nconst (\n\tDefault_MethodDescriptorProto_ClientStreaming = bool(false)\n\tDefault_MethodDescriptorProto_ServerStreaming = bool(false)\n)\n\nfunc (x *MethodDescriptorProto) Reset() {\n\t*x = MethodDescriptorProto{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MethodDescriptorProto) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MethodDescriptorProto) ProtoMessage() {}\n\nfunc (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MethodDescriptorProto.ProtoReflect.Descriptor instead.\nfunc (*MethodDescriptorProto) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *MethodDescriptorProto) GetName() string {\n\tif x != nil && x.Name != nil {\n\t\treturn *x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *MethodDescriptorProto) GetInputType() string {\n\tif x != nil && x.InputType != nil {\n\t\treturn *x.InputType\n\t}\n\treturn \"\"\n}\n\nfunc (x *MethodDescriptorProto) GetOutputType() string {\n\tif x != nil && x.OutputType != nil {\n\t\treturn *x.OutputType\n\t}\n\treturn \"\"\n}\n\nfunc (x *MethodDescriptorProto) GetOptions() *MethodOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\nfunc (x *MethodDescriptorProto) GetClientStreaming() bool {\n\tif x != nil && x.ClientStreaming != nil {\n\t\treturn *x.ClientStreaming\n\t}\n\treturn Default_MethodDescriptorProto_ClientStreaming\n}\n\nfunc (x *MethodDescriptorProto) GetServerStreaming() bool {\n\tif x != nil && x.ServerStreaming != nil {\n\t\treturn *x.ServerStreaming\n\t}\n\treturn Default_MethodDescriptorProto_ServerStreaming\n}\n\ntype FileOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Sets the Java package where classes generated from this .proto will be\n\t// placed.  By default, the proto package is used, but this is often\n\t// inappropriate because proto packages do not normally start with backwards\n\t// domain names.\n\tJavaPackage *string `protobuf:\"bytes,1,opt,name=java_package,json=javaPackage\" json:\"java_package,omitempty\"`\n\t// Controls the name of the wrapper Java class generated for the .proto file.\n\t// That class will always contain the .proto file's getDescriptor() method as\n\t// well as any top-level extensions defined in the .proto file.\n\t// If java_multiple_files is disabled, then all the other classes from the\n\t// .proto file will be nested inside the single wrapper outer class.\n\tJavaOuterClassname *string `protobuf:\"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname\" json:\"java_outer_classname,omitempty\"`\n\t// If enabled, then the Java code generator will generate a separate .java\n\t// file for each top-level message, enum, and service defined in the .proto\n\t// file.  Thus, these types will *not* be nested inside the wrapper class\n\t// named by java_outer_classname.  However, the wrapper class will still be\n\t// generated to contain the file's getDescriptor() method as well as any\n\t// top-level extensions defined in the file.\n\tJavaMultipleFiles *bool `protobuf:\"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0\" json:\"java_multiple_files,omitempty\"`\n\t// This option does nothing.\n\t//\n\t// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\n\tJavaGenerateEqualsAndHash *bool `protobuf:\"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash\" json:\"java_generate_equals_and_hash,omitempty\"`\n\t// A proto2 file can set this to true to opt in to UTF-8 checking for Java,\n\t// which will throw an exception if invalid UTF-8 is parsed from the wire or\n\t// assigned to a string field.\n\t//\n\t// TODO: clarify exactly what kinds of field types this option\n\t// applies to, and update these docs accordingly.\n\t//\n\t// Proto3 files already perform these checks. Setting the option explicitly to\n\t// false has no effect: it cannot be used to opt proto3 files out of UTF-8\n\t// checks.\n\tJavaStringCheckUtf8 *bool                     `protobuf:\"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0\" json:\"java_string_check_utf8,omitempty\"`\n\tOptimizeFor         *FileOptions_OptimizeMode `protobuf:\"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1\" json:\"optimize_for,omitempty\"`\n\t// Sets the Go package where structs generated from this .proto will be\n\t// placed. If omitted, the Go package will be derived from the following:\n\t//   - The basename of the package import path, if provided.\n\t//   - Otherwise, the package statement in the .proto file, if present.\n\t//   - Otherwise, the basename of the .proto file, without extension.\n\tGoPackage *string `protobuf:\"bytes,11,opt,name=go_package,json=goPackage\" json:\"go_package,omitempty\"`\n\t// Should generic services be generated in each language?  \"Generic\" services\n\t// are not specific to any particular RPC system.  They are generated by the\n\t// main code generators in each language (without additional plugins).\n\t// Generic services were the only kind of service generation supported by\n\t// early versions of google.protobuf.\n\t//\n\t// Generic services are now considered deprecated in favor of using plugins\n\t// that generate code specific to your particular RPC system.  Therefore,\n\t// these default to false.  Old code which depends on generic services should\n\t// explicitly set them to true.\n\tCcGenericServices   *bool `protobuf:\"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0\" json:\"cc_generic_services,omitempty\"`\n\tJavaGenericServices *bool `protobuf:\"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0\" json:\"java_generic_services,omitempty\"`\n\tPyGenericServices   *bool `protobuf:\"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0\" json:\"py_generic_services,omitempty\"`\n\t// Is this file deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for everything in the file, or it will be completely ignored; in the very\n\t// least, this is a formalization for deprecating files.\n\tDeprecated *bool `protobuf:\"varint,23,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// Enables the use of arenas for the proto messages in this file. This applies\n\t// only to generated classes for C++.\n\tCcEnableArenas *bool `protobuf:\"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=1\" json:\"cc_enable_arenas,omitempty\"`\n\t// Sets the objective c class prefix which is prepended to all objective c\n\t// generated classes from this .proto. There is no default.\n\tObjcClassPrefix *string `protobuf:\"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix\" json:\"objc_class_prefix,omitempty\"`\n\t// Namespace for generated classes; defaults to the package.\n\tCsharpNamespace *string `protobuf:\"bytes,37,opt,name=csharp_namespace,json=csharpNamespace\" json:\"csharp_namespace,omitempty\"`\n\t// By default Swift generators will take the proto package and CamelCase it\n\t// replacing '.' with underscore and use that to prefix the types/symbols\n\t// defined. When this options is provided, they will use this value instead\n\t// to prefix the types/symbols defined.\n\tSwiftPrefix *string `protobuf:\"bytes,39,opt,name=swift_prefix,json=swiftPrefix\" json:\"swift_prefix,omitempty\"`\n\t// Sets the php class prefix which is prepended to all php generated classes\n\t// from this .proto. Default is empty.\n\tPhpClassPrefix *string `protobuf:\"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix\" json:\"php_class_prefix,omitempty\"`\n\t// Use this option to change the namespace of php generated classes. Default\n\t// is empty. When this option is empty, the package name will be used for\n\t// determining the namespace.\n\tPhpNamespace *string `protobuf:\"bytes,41,opt,name=php_namespace,json=phpNamespace\" json:\"php_namespace,omitempty\"`\n\t// Use this option to change the namespace of php generated metadata classes.\n\t// Default is empty. When this option is empty, the proto file name will be\n\t// used for determining the namespace.\n\tPhpMetadataNamespace *string `protobuf:\"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace\" json:\"php_metadata_namespace,omitempty\"`\n\t// Use this option to change the package of ruby generated classes. Default\n\t// is empty. When this option is not set, the package name will be used for\n\t// determining the ruby package.\n\tRubyPackage *string `protobuf:\"bytes,45,opt,name=ruby_package,json=rubyPackage\" json:\"ruby_package,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,50,opt,name=features\" json:\"features,omitempty\"`\n\t// The parser stores options it doesn't recognize here.\n\t// See the documentation for the \"Options\" section above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for FileOptions fields.\nconst (\n\tDefault_FileOptions_JavaMultipleFiles   = bool(false)\n\tDefault_FileOptions_JavaStringCheckUtf8 = bool(false)\n\tDefault_FileOptions_OptimizeFor         = FileOptions_SPEED\n\tDefault_FileOptions_CcGenericServices   = bool(false)\n\tDefault_FileOptions_JavaGenericServices = bool(false)\n\tDefault_FileOptions_PyGenericServices   = bool(false)\n\tDefault_FileOptions_Deprecated          = bool(false)\n\tDefault_FileOptions_CcEnableArenas      = bool(true)\n)\n\nfunc (x *FileOptions) Reset() {\n\t*x = FileOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FileOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FileOptions) ProtoMessage() {}\n\nfunc (x *FileOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FileOptions.ProtoReflect.Descriptor instead.\nfunc (*FileOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *FileOptions) GetJavaPackage() string {\n\tif x != nil && x.JavaPackage != nil {\n\t\treturn *x.JavaPackage\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetJavaOuterClassname() string {\n\tif x != nil && x.JavaOuterClassname != nil {\n\t\treturn *x.JavaOuterClassname\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetJavaMultipleFiles() bool {\n\tif x != nil && x.JavaMultipleFiles != nil {\n\t\treturn *x.JavaMultipleFiles\n\t}\n\treturn Default_FileOptions_JavaMultipleFiles\n}\n\n// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\nfunc (x *FileOptions) GetJavaGenerateEqualsAndHash() bool {\n\tif x != nil && x.JavaGenerateEqualsAndHash != nil {\n\t\treturn *x.JavaGenerateEqualsAndHash\n\t}\n\treturn false\n}\n\nfunc (x *FileOptions) GetJavaStringCheckUtf8() bool {\n\tif x != nil && x.JavaStringCheckUtf8 != nil {\n\t\treturn *x.JavaStringCheckUtf8\n\t}\n\treturn Default_FileOptions_JavaStringCheckUtf8\n}\n\nfunc (x *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode {\n\tif x != nil && x.OptimizeFor != nil {\n\t\treturn *x.OptimizeFor\n\t}\n\treturn Default_FileOptions_OptimizeFor\n}\n\nfunc (x *FileOptions) GetGoPackage() string {\n\tif x != nil && x.GoPackage != nil {\n\t\treturn *x.GoPackage\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetCcGenericServices() bool {\n\tif x != nil && x.CcGenericServices != nil {\n\t\treturn *x.CcGenericServices\n\t}\n\treturn Default_FileOptions_CcGenericServices\n}\n\nfunc (x *FileOptions) GetJavaGenericServices() bool {\n\tif x != nil && x.JavaGenericServices != nil {\n\t\treturn *x.JavaGenericServices\n\t}\n\treturn Default_FileOptions_JavaGenericServices\n}\n\nfunc (x *FileOptions) GetPyGenericServices() bool {\n\tif x != nil && x.PyGenericServices != nil {\n\t\treturn *x.PyGenericServices\n\t}\n\treturn Default_FileOptions_PyGenericServices\n}\n\nfunc (x *FileOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_FileOptions_Deprecated\n}\n\nfunc (x *FileOptions) GetCcEnableArenas() bool {\n\tif x != nil && x.CcEnableArenas != nil {\n\t\treturn *x.CcEnableArenas\n\t}\n\treturn Default_FileOptions_CcEnableArenas\n}\n\nfunc (x *FileOptions) GetObjcClassPrefix() string {\n\tif x != nil && x.ObjcClassPrefix != nil {\n\t\treturn *x.ObjcClassPrefix\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetCsharpNamespace() string {\n\tif x != nil && x.CsharpNamespace != nil {\n\t\treturn *x.CsharpNamespace\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetSwiftPrefix() string {\n\tif x != nil && x.SwiftPrefix != nil {\n\t\treturn *x.SwiftPrefix\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetPhpClassPrefix() string {\n\tif x != nil && x.PhpClassPrefix != nil {\n\t\treturn *x.PhpClassPrefix\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetPhpNamespace() string {\n\tif x != nil && x.PhpNamespace != nil {\n\t\treturn *x.PhpNamespace\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetPhpMetadataNamespace() string {\n\tif x != nil && x.PhpMetadataNamespace != nil {\n\t\treturn *x.PhpMetadataNamespace\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetRubyPackage() string {\n\tif x != nil && x.RubyPackage != nil {\n\t\treturn *x.RubyPackage\n\t}\n\treturn \"\"\n}\n\nfunc (x *FileOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype MessageOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Set true to use the old proto1 MessageSet wire format for extensions.\n\t// This is provided for backwards-compatibility with the MessageSet wire\n\t// format.  You should not use this for any other reason:  It's less\n\t// efficient, has fewer features, and is more complicated.\n\t//\n\t// The message must be defined exactly as follows:\n\t//\n\t//\tmessage Foo {\n\t//\t  option message_set_wire_format = true;\n\t//\t  extensions 4 to max;\n\t//\t}\n\t//\n\t// Note that the message cannot have any defined fields; MessageSets only\n\t// have extensions.\n\t//\n\t// All extensions of your type must be singular messages; e.g. they cannot\n\t// be int32s, enums, or repeated messages.\n\t//\n\t// Because this is an option, the above two restrictions are not enforced by\n\t// the protocol compiler.\n\tMessageSetWireFormat *bool `protobuf:\"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0\" json:\"message_set_wire_format,omitempty\"`\n\t// Disables the generation of the standard \"descriptor()\" accessor, which can\n\t// conflict with a field of the same name.  This is meant to make migration\n\t// from proto1 easier; new code should avoid fields named \"descriptor\".\n\tNoStandardDescriptorAccessor *bool `protobuf:\"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0\" json:\"no_standard_descriptor_accessor,omitempty\"`\n\t// Is this message deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for the message, or it will be completely ignored; in the very least,\n\t// this is a formalization for deprecating messages.\n\tDeprecated *bool `protobuf:\"varint,3,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// Whether the message is an automatically generated map entry type for the\n\t// maps field.\n\t//\n\t// For maps fields:\n\t//\n\t//\tmap<KeyType, ValueType> map_field = 1;\n\t//\n\t// The parsed descriptor looks like:\n\t//\n\t//\tmessage MapFieldEntry {\n\t//\t    option map_entry = true;\n\t//\t    optional KeyType key = 1;\n\t//\t    optional ValueType value = 2;\n\t//\t}\n\t//\trepeated MapFieldEntry map_field = 1;\n\t//\n\t// Implementations may choose not to generate the map_entry=true message, but\n\t// use a native map in the target language to hold the keys and values.\n\t// The reflection APIs in such implementations still need to work as\n\t// if the field is a repeated message field.\n\t//\n\t// NOTE: Do not set the option in .proto files. Always use the maps syntax\n\t// instead. The option should only be implicitly set by the proto compiler\n\t// parser.\n\tMapEntry *bool `protobuf:\"varint,7,opt,name=map_entry,json=mapEntry\" json:\"map_entry,omitempty\"`\n\t// Enable the legacy handling of JSON field name conflicts.  This lowercases\n\t// and strips underscored from the fields before comparison in proto3 only.\n\t// The new behavior takes `json_name` into account and applies to proto2 as\n\t// well.\n\t//\n\t// This should only be used as a temporary measure against broken builds due\n\t// to the change in behavior for JSON field name conflicts.\n\t//\n\t// TODO This is legacy behavior we plan to remove once downstream\n\t// teams have had time to migrate.\n\t//\n\t// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\n\tDeprecatedLegacyJsonFieldConflicts *bool `protobuf:\"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts\" json:\"deprecated_legacy_json_field_conflicts,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,12,opt,name=features\" json:\"features,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for MessageOptions fields.\nconst (\n\tDefault_MessageOptions_MessageSetWireFormat         = bool(false)\n\tDefault_MessageOptions_NoStandardDescriptorAccessor = bool(false)\n\tDefault_MessageOptions_Deprecated                   = bool(false)\n)\n\nfunc (x *MessageOptions) Reset() {\n\t*x = MessageOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MessageOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MessageOptions) ProtoMessage() {}\n\nfunc (x *MessageOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.\nfunc (*MessageOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *MessageOptions) GetMessageSetWireFormat() bool {\n\tif x != nil && x.MessageSetWireFormat != nil {\n\t\treturn *x.MessageSetWireFormat\n\t}\n\treturn Default_MessageOptions_MessageSetWireFormat\n}\n\nfunc (x *MessageOptions) GetNoStandardDescriptorAccessor() bool {\n\tif x != nil && x.NoStandardDescriptorAccessor != nil {\n\t\treturn *x.NoStandardDescriptorAccessor\n\t}\n\treturn Default_MessageOptions_NoStandardDescriptorAccessor\n}\n\nfunc (x *MessageOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_MessageOptions_Deprecated\n}\n\nfunc (x *MessageOptions) GetMapEntry() bool {\n\tif x != nil && x.MapEntry != nil {\n\t\treturn *x.MapEntry\n\t}\n\treturn false\n}\n\n// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\nfunc (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool {\n\tif x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil {\n\t\treturn *x.DeprecatedLegacyJsonFieldConflicts\n\t}\n\treturn false\n}\n\nfunc (x *MessageOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype FieldOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.\n\t// The ctype option instructs the C++ code generator to use a different\n\t// representation of the field than it normally would.  See the specific\n\t// options below.  This option is only implemented to support use of\n\t// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of\n\t// type \"bytes\" in the open source release.\n\t// TODO: make ctype actually deprecated.\n\tCtype *FieldOptions_CType `protobuf:\"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0\" json:\"ctype,omitempty\"`\n\t// The packed option can be enabled for repeated primitive fields to enable\n\t// a more efficient representation on the wire. Rather than repeatedly\n\t// writing the tag and type for each element, the entire array is encoded as\n\t// a single length-delimited blob. In proto3, only explicit setting it to\n\t// false will avoid using packed encoding.  This option is prohibited in\n\t// Editions, but the `repeated_field_encoding` feature can be used to control\n\t// the behavior.\n\tPacked *bool `protobuf:\"varint,2,opt,name=packed\" json:\"packed,omitempty\"`\n\t// The jstype option determines the JavaScript type used for values of the\n\t// field.  The option is permitted only for 64 bit integral and fixed types\n\t// (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING\n\t// is represented as JavaScript string, which avoids loss of precision that\n\t// can happen when a large value is converted to a floating point JavaScript.\n\t// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to\n\t// use the JavaScript \"number\" type.  The behavior of the default option\n\t// JS_NORMAL is implementation dependent.\n\t//\n\t// This option is an enum to permit additional types to be added, e.g.\n\t// goog.math.Integer.\n\tJstype *FieldOptions_JSType `protobuf:\"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0\" json:\"jstype,omitempty\"`\n\t// Should this field be parsed lazily?  Lazy applies only to message-type\n\t// fields.  It means that when the outer message is initially parsed, the\n\t// inner message's contents will not be parsed but instead stored in encoded\n\t// form.  The inner message will actually be parsed when it is first accessed.\n\t//\n\t// This is only a hint.  Implementations are free to choose whether to use\n\t// eager or lazy parsing regardless of the value of this option.  However,\n\t// setting this option true suggests that the protocol author believes that\n\t// using lazy parsing on this field is worth the additional bookkeeping\n\t// overhead typically needed to implement it.\n\t//\n\t// This option does not affect the public interface of any generated code;\n\t// all method signatures remain the same.  Furthermore, thread-safety of the\n\t// interface is not affected by this option; const methods remain safe to\n\t// call from multiple threads concurrently, while non-const methods continue\n\t// to require exclusive access.\n\t//\n\t// Note that lazy message fields are still eagerly verified to check\n\t// ill-formed wireformat or missing required fields. Calling IsInitialized()\n\t// on the outer message would fail if the inner message has missing required\n\t// fields. Failed verification would result in parsing failure (except when\n\t// uninitialized messages are acceptable).\n\tLazy *bool `protobuf:\"varint,5,opt,name=lazy,def=0\" json:\"lazy,omitempty\"`\n\t// unverified_lazy does no correctness checks on the byte stream. This should\n\t// only be used where lazy with verification is prohibitive for performance\n\t// reasons.\n\tUnverifiedLazy *bool `protobuf:\"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0\" json:\"unverified_lazy,omitempty\"`\n\t// Is this field deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for accessors, or it will be completely ignored; in the very least, this\n\t// is a formalization for deprecating fields.\n\tDeprecated *bool `protobuf:\"varint,3,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// DEPRECATED. DO NOT USE!\n\t// For Google-internal migration only. Do not use.\n\t//\n\t// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\n\tWeak *bool `protobuf:\"varint,10,opt,name=weak,def=0\" json:\"weak,omitempty\"`\n\t// Indicate that the field value should not be printed out when using debug\n\t// formats, e.g. when the field contains sensitive credentials.\n\tDebugRedact     *bool                           `protobuf:\"varint,16,opt,name=debug_redact,json=debugRedact,def=0\" json:\"debug_redact,omitempty\"`\n\tRetention       *FieldOptions_OptionRetention   `protobuf:\"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention\" json:\"retention,omitempty\"`\n\tTargets         []FieldOptions_OptionTargetType `protobuf:\"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType\" json:\"targets,omitempty\"`\n\tEditionDefaults []*FieldOptions_EditionDefault  `protobuf:\"bytes,20,rep,name=edition_defaults,json=editionDefaults\" json:\"edition_defaults,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures       *FeatureSet                  `protobuf:\"bytes,21,opt,name=features\" json:\"features,omitempty\"`\n\tFeatureSupport *FieldOptions_FeatureSupport `protobuf:\"bytes,22,opt,name=feature_support,json=featureSupport\" json:\"feature_support,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for FieldOptions fields.\nconst (\n\tDefault_FieldOptions_Ctype          = FieldOptions_STRING\n\tDefault_FieldOptions_Jstype         = FieldOptions_JS_NORMAL\n\tDefault_FieldOptions_Lazy           = bool(false)\n\tDefault_FieldOptions_UnverifiedLazy = bool(false)\n\tDefault_FieldOptions_Deprecated     = bool(false)\n\tDefault_FieldOptions_Weak           = bool(false)\n\tDefault_FieldOptions_DebugRedact    = bool(false)\n)\n\nfunc (x *FieldOptions) Reset() {\n\t*x = FieldOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FieldOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FieldOptions) ProtoMessage() {}\n\nfunc (x *FieldOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.\nfunc (*FieldOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *FieldOptions) GetCtype() FieldOptions_CType {\n\tif x != nil && x.Ctype != nil {\n\t\treturn *x.Ctype\n\t}\n\treturn Default_FieldOptions_Ctype\n}\n\nfunc (x *FieldOptions) GetPacked() bool {\n\tif x != nil && x.Packed != nil {\n\t\treturn *x.Packed\n\t}\n\treturn false\n}\n\nfunc (x *FieldOptions) GetJstype() FieldOptions_JSType {\n\tif x != nil && x.Jstype != nil {\n\t\treturn *x.Jstype\n\t}\n\treturn Default_FieldOptions_Jstype\n}\n\nfunc (x *FieldOptions) GetLazy() bool {\n\tif x != nil && x.Lazy != nil {\n\t\treturn *x.Lazy\n\t}\n\treturn Default_FieldOptions_Lazy\n}\n\nfunc (x *FieldOptions) GetUnverifiedLazy() bool {\n\tif x != nil && x.UnverifiedLazy != nil {\n\t\treturn *x.UnverifiedLazy\n\t}\n\treturn Default_FieldOptions_UnverifiedLazy\n}\n\nfunc (x *FieldOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_FieldOptions_Deprecated\n}\n\n// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\nfunc (x *FieldOptions) GetWeak() bool {\n\tif x != nil && x.Weak != nil {\n\t\treturn *x.Weak\n\t}\n\treturn Default_FieldOptions_Weak\n}\n\nfunc (x *FieldOptions) GetDebugRedact() bool {\n\tif x != nil && x.DebugRedact != nil {\n\t\treturn *x.DebugRedact\n\t}\n\treturn Default_FieldOptions_DebugRedact\n}\n\nfunc (x *FieldOptions) GetRetention() FieldOptions_OptionRetention {\n\tif x != nil && x.Retention != nil {\n\t\treturn *x.Retention\n\t}\n\treturn FieldOptions_RETENTION_UNKNOWN\n}\n\nfunc (x *FieldOptions) GetTargets() []FieldOptions_OptionTargetType {\n\tif x != nil {\n\t\treturn x.Targets\n\t}\n\treturn nil\n}\n\nfunc (x *FieldOptions) GetEditionDefaults() []*FieldOptions_EditionDefault {\n\tif x != nil {\n\t\treturn x.EditionDefaults\n\t}\n\treturn nil\n}\n\nfunc (x *FieldOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *FieldOptions) GetFeatureSupport() *FieldOptions_FeatureSupport {\n\tif x != nil {\n\t\treturn x.FeatureSupport\n\t}\n\treturn nil\n}\n\nfunc (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype OneofOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,1,opt,name=features\" json:\"features,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\nfunc (x *OneofOptions) Reset() {\n\t*x = OneofOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[13]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *OneofOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*OneofOptions) ProtoMessage() {}\n\nfunc (x *OneofOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[13]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead.\nfunc (*OneofOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *OneofOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype EnumOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Set this option to true to allow mapping different tag names to the same\n\t// value.\n\tAllowAlias *bool `protobuf:\"varint,2,opt,name=allow_alias,json=allowAlias\" json:\"allow_alias,omitempty\"`\n\t// Is this enum deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for the enum, or it will be completely ignored; in the very least, this\n\t// is a formalization for deprecating enums.\n\tDeprecated *bool `protobuf:\"varint,3,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// Enable the legacy handling of JSON field name conflicts.  This lowercases\n\t// and strips underscored from the fields before comparison in proto3 only.\n\t// The new behavior takes `json_name` into account and applies to proto2 as\n\t// well.\n\t// TODO Remove this legacy behavior once downstream teams have\n\t// had time to migrate.\n\t//\n\t// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\n\tDeprecatedLegacyJsonFieldConflicts *bool `protobuf:\"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts\" json:\"deprecated_legacy_json_field_conflicts,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,7,opt,name=features\" json:\"features,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for EnumOptions fields.\nconst (\n\tDefault_EnumOptions_Deprecated = bool(false)\n)\n\nfunc (x *EnumOptions) Reset() {\n\t*x = EnumOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[14]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *EnumOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumOptions) ProtoMessage() {}\n\nfunc (x *EnumOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[14]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead.\nfunc (*EnumOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *EnumOptions) GetAllowAlias() bool {\n\tif x != nil && x.AllowAlias != nil {\n\t\treturn *x.AllowAlias\n\t}\n\treturn false\n}\n\nfunc (x *EnumOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_EnumOptions_Deprecated\n}\n\n// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto.\nfunc (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool {\n\tif x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil {\n\t\treturn *x.DeprecatedLegacyJsonFieldConflicts\n\t}\n\treturn false\n}\n\nfunc (x *EnumOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype EnumValueOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Is this enum value deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for the enum value, or it will be completely ignored; in the very least,\n\t// this is a formalization for deprecating enum values.\n\tDeprecated *bool `protobuf:\"varint,1,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,2,opt,name=features\" json:\"features,omitempty\"`\n\t// Indicate that fields annotated with this enum value should not be printed\n\t// out when using debug formats, e.g. when the field contains sensitive\n\t// credentials.\n\tDebugRedact *bool `protobuf:\"varint,3,opt,name=debug_redact,json=debugRedact,def=0\" json:\"debug_redact,omitempty\"`\n\t// Information about the support window of a feature value.\n\tFeatureSupport *FieldOptions_FeatureSupport `protobuf:\"bytes,4,opt,name=feature_support,json=featureSupport\" json:\"feature_support,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for EnumValueOptions fields.\nconst (\n\tDefault_EnumValueOptions_Deprecated  = bool(false)\n\tDefault_EnumValueOptions_DebugRedact = bool(false)\n)\n\nfunc (x *EnumValueOptions) Reset() {\n\t*x = EnumValueOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[15]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *EnumValueOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumValueOptions) ProtoMessage() {}\n\nfunc (x *EnumValueOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[15]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead.\nfunc (*EnumValueOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (x *EnumValueOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_EnumValueOptions_Deprecated\n}\n\nfunc (x *EnumValueOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *EnumValueOptions) GetDebugRedact() bool {\n\tif x != nil && x.DebugRedact != nil {\n\t\treturn *x.DebugRedact\n\t}\n\treturn Default_EnumValueOptions_DebugRedact\n}\n\nfunc (x *EnumValueOptions) GetFeatureSupport() *FieldOptions_FeatureSupport {\n\tif x != nil {\n\t\treturn x.FeatureSupport\n\t}\n\treturn nil\n}\n\nfunc (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype ServiceOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,34,opt,name=features\" json:\"features,omitempty\"`\n\t// Is this service deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for the service, or it will be completely ignored; in the very least,\n\t// this is a formalization for deprecating services.\n\tDeprecated *bool `protobuf:\"varint,33,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for ServiceOptions fields.\nconst (\n\tDefault_ServiceOptions_Deprecated = bool(false)\n)\n\nfunc (x *ServiceOptions) Reset() {\n\t*x = ServiceOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[16]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ServiceOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ServiceOptions) ProtoMessage() {}\n\nfunc (x *ServiceOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[16]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead.\nfunc (*ServiceOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *ServiceOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *ServiceOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_ServiceOptions_Deprecated\n}\n\nfunc (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\ntype MethodOptions struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Is this method deprecated?\n\t// Depending on the target platform, this can emit Deprecated annotations\n\t// for the method, or it will be completely ignored; in the very least,\n\t// this is a formalization for deprecating methods.\n\tDeprecated       *bool                           `protobuf:\"varint,33,opt,name=deprecated,def=0\" json:\"deprecated,omitempty\"`\n\tIdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:\"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0\" json:\"idempotency_level,omitempty\"`\n\t// Any features defined in the specific edition.\n\t// WARNING: This field should only be used by protobuf plugins or special\n\t// cases like the proto compiler. Other uses are discouraged and\n\t// developers should rely on the protoreflect APIs for their client language.\n\tFeatures *FeatureSet `protobuf:\"bytes,35,opt,name=features\" json:\"features,omitempty\"`\n\t// The parser stores options it doesn't recognize here. See above.\n\tUninterpretedOption []*UninterpretedOption `protobuf:\"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption\" json:\"uninterpreted_option,omitempty\"`\n\textensionFields     protoimpl.ExtensionFields\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\n// Default values for MethodOptions fields.\nconst (\n\tDefault_MethodOptions_Deprecated       = bool(false)\n\tDefault_MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN\n)\n\nfunc (x *MethodOptions) Reset() {\n\t*x = MethodOptions{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[17]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MethodOptions) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MethodOptions) ProtoMessage() {}\n\nfunc (x *MethodOptions) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[17]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead.\nfunc (*MethodOptions) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17}\n}\n\nfunc (x *MethodOptions) GetDeprecated() bool {\n\tif x != nil && x.Deprecated != nil {\n\t\treturn *x.Deprecated\n\t}\n\treturn Default_MethodOptions_Deprecated\n}\n\nfunc (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {\n\tif x != nil && x.IdempotencyLevel != nil {\n\t\treturn *x.IdempotencyLevel\n\t}\n\treturn Default_MethodOptions_IdempotencyLevel\n}\n\nfunc (x *MethodOptions) GetFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.Features\n\t}\n\treturn nil\n}\n\nfunc (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {\n\tif x != nil {\n\t\treturn x.UninterpretedOption\n\t}\n\treturn nil\n}\n\n// A message representing a option the parser does not recognize. This only\n// appears in options protos created by the compiler::Parser class.\n// DescriptorPool resolves these when building Descriptor objects. Therefore,\n// options protos in descriptor objects (e.g. returned by Descriptor::options(),\n// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions\n// in them.\ntype UninterpretedOption struct {\n\tstate protoimpl.MessageState          `protogen:\"open.v1\"`\n\tName  []*UninterpretedOption_NamePart `protobuf:\"bytes,2,rep,name=name\" json:\"name,omitempty\"`\n\t// The value of the uninterpreted option, in whatever type the tokenizer\n\t// identified it as during parsing. Exactly one of these should be set.\n\tIdentifierValue  *string  `protobuf:\"bytes,3,opt,name=identifier_value,json=identifierValue\" json:\"identifier_value,omitempty\"`\n\tPositiveIntValue *uint64  `protobuf:\"varint,4,opt,name=positive_int_value,json=positiveIntValue\" json:\"positive_int_value,omitempty\"`\n\tNegativeIntValue *int64   `protobuf:\"varint,5,opt,name=negative_int_value,json=negativeIntValue\" json:\"negative_int_value,omitempty\"`\n\tDoubleValue      *float64 `protobuf:\"fixed64,6,opt,name=double_value,json=doubleValue\" json:\"double_value,omitempty\"`\n\tStringValue      []byte   `protobuf:\"bytes,7,opt,name=string_value,json=stringValue\" json:\"string_value,omitempty\"`\n\tAggregateValue   *string  `protobuf:\"bytes,8,opt,name=aggregate_value,json=aggregateValue\" json:\"aggregate_value,omitempty\"`\n\tunknownFields    protoimpl.UnknownFields\n\tsizeCache        protoimpl.SizeCache\n}\n\nfunc (x *UninterpretedOption) Reset() {\n\t*x = UninterpretedOption{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[18]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UninterpretedOption) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UninterpretedOption) ProtoMessage() {}\n\nfunc (x *UninterpretedOption) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[18]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UninterpretedOption.ProtoReflect.Descriptor instead.\nfunc (*UninterpretedOption) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn nil\n}\n\nfunc (x *UninterpretedOption) GetIdentifierValue() string {\n\tif x != nil && x.IdentifierValue != nil {\n\t\treturn *x.IdentifierValue\n\t}\n\treturn \"\"\n}\n\nfunc (x *UninterpretedOption) GetPositiveIntValue() uint64 {\n\tif x != nil && x.PositiveIntValue != nil {\n\t\treturn *x.PositiveIntValue\n\t}\n\treturn 0\n}\n\nfunc (x *UninterpretedOption) GetNegativeIntValue() int64 {\n\tif x != nil && x.NegativeIntValue != nil {\n\t\treturn *x.NegativeIntValue\n\t}\n\treturn 0\n}\n\nfunc (x *UninterpretedOption) GetDoubleValue() float64 {\n\tif x != nil && x.DoubleValue != nil {\n\t\treturn *x.DoubleValue\n\t}\n\treturn 0\n}\n\nfunc (x *UninterpretedOption) GetStringValue() []byte {\n\tif x != nil {\n\t\treturn x.StringValue\n\t}\n\treturn nil\n}\n\nfunc (x *UninterpretedOption) GetAggregateValue() string {\n\tif x != nil && x.AggregateValue != nil {\n\t\treturn *x.AggregateValue\n\t}\n\treturn \"\"\n}\n\n// TODO Enums in C++ gencode (and potentially other languages) are\n// not well scoped.  This means that each of the feature enums below can clash\n// with each other.  The short names we've chosen maximize call-site\n// readability, but leave us very open to this scenario.  A future feature will\n// be designed and implemented to handle this, hopefully before we ever hit a\n// conflict here.\ntype FeatureSet struct {\n\tstate                   protoimpl.MessageState                                `protogen:\"open.v1\"`\n\tFieldPresence           *FeatureSet_FieldPresence                             `protobuf:\"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence\" json:\"field_presence,omitempty\"`\n\tEnumType                *FeatureSet_EnumType                                  `protobuf:\"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType\" json:\"enum_type,omitempty\"`\n\tRepeatedFieldEncoding   *FeatureSet_RepeatedFieldEncoding                     `protobuf:\"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding\" json:\"repeated_field_encoding,omitempty\"`\n\tUtf8Validation          *FeatureSet_Utf8Validation                            `protobuf:\"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation\" json:\"utf8_validation,omitempty\"`\n\tMessageEncoding         *FeatureSet_MessageEncoding                           `protobuf:\"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding\" json:\"message_encoding,omitempty\"`\n\tJsonFormat              *FeatureSet_JsonFormat                                `protobuf:\"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat\" json:\"json_format,omitempty\"`\n\tEnforceNamingStyle      *FeatureSet_EnforceNamingStyle                        `protobuf:\"varint,7,opt,name=enforce_naming_style,json=enforceNamingStyle,enum=google.protobuf.FeatureSet_EnforceNamingStyle\" json:\"enforce_naming_style,omitempty\"`\n\tDefaultSymbolVisibility *FeatureSet_VisibilityFeature_DefaultSymbolVisibility `protobuf:\"varint,8,opt,name=default_symbol_visibility,json=defaultSymbolVisibility,enum=google.protobuf.FeatureSet_VisibilityFeature_DefaultSymbolVisibility\" json:\"default_symbol_visibility,omitempty\"`\n\textensionFields         protoimpl.ExtensionFields\n\tunknownFields           protoimpl.UnknownFields\n\tsizeCache               protoimpl.SizeCache\n}\n\nfunc (x *FeatureSet) Reset() {\n\t*x = FeatureSet{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[19]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FeatureSet) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FeatureSet) ProtoMessage() {}\n\nfunc (x *FeatureSet) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[19]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FeatureSet.ProtoReflect.Descriptor instead.\nfunc (*FeatureSet) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19}\n}\n\nfunc (x *FeatureSet) GetFieldPresence() FeatureSet_FieldPresence {\n\tif x != nil && x.FieldPresence != nil {\n\t\treturn *x.FieldPresence\n\t}\n\treturn FeatureSet_FIELD_PRESENCE_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetEnumType() FeatureSet_EnumType {\n\tif x != nil && x.EnumType != nil {\n\t\treturn *x.EnumType\n\t}\n\treturn FeatureSet_ENUM_TYPE_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetRepeatedFieldEncoding() FeatureSet_RepeatedFieldEncoding {\n\tif x != nil && x.RepeatedFieldEncoding != nil {\n\t\treturn *x.RepeatedFieldEncoding\n\t}\n\treturn FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetUtf8Validation() FeatureSet_Utf8Validation {\n\tif x != nil && x.Utf8Validation != nil {\n\t\treturn *x.Utf8Validation\n\t}\n\treturn FeatureSet_UTF8_VALIDATION_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetMessageEncoding() FeatureSet_MessageEncoding {\n\tif x != nil && x.MessageEncoding != nil {\n\t\treturn *x.MessageEncoding\n\t}\n\treturn FeatureSet_MESSAGE_ENCODING_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat {\n\tif x != nil && x.JsonFormat != nil {\n\t\treturn *x.JsonFormat\n\t}\n\treturn FeatureSet_JSON_FORMAT_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetEnforceNamingStyle() FeatureSet_EnforceNamingStyle {\n\tif x != nil && x.EnforceNamingStyle != nil {\n\t\treturn *x.EnforceNamingStyle\n\t}\n\treturn FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN\n}\n\nfunc (x *FeatureSet) GetDefaultSymbolVisibility() FeatureSet_VisibilityFeature_DefaultSymbolVisibility {\n\tif x != nil && x.DefaultSymbolVisibility != nil {\n\t\treturn *x.DefaultSymbolVisibility\n\t}\n\treturn FeatureSet_VisibilityFeature_DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\n}\n\n// A compiled specification for the defaults of a set of features.  These\n// messages are generated from FeatureSet extensions and can be used to seed\n// feature resolution. The resolution with this object becomes a simple search\n// for the closest matching edition, followed by proto merges.\ntype FeatureSetDefaults struct {\n\tstate    protoimpl.MessageState                         `protogen:\"open.v1\"`\n\tDefaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:\"bytes,1,rep,name=defaults\" json:\"defaults,omitempty\"`\n\t// The minimum supported edition (inclusive) when this was constructed.\n\t// Editions before this will not have defaults.\n\tMinimumEdition *Edition `protobuf:\"varint,4,opt,name=minimum_edition,json=minimumEdition,enum=google.protobuf.Edition\" json:\"minimum_edition,omitempty\"`\n\t// The maximum known edition (inclusive) when this was constructed. Editions\n\t// after this will not have reliable defaults.\n\tMaximumEdition *Edition `protobuf:\"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition\" json:\"maximum_edition,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *FeatureSetDefaults) Reset() {\n\t*x = FeatureSetDefaults{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[20]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FeatureSetDefaults) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FeatureSetDefaults) ProtoMessage() {}\n\nfunc (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[20]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FeatureSetDefaults.ProtoReflect.Descriptor instead.\nfunc (*FeatureSetDefaults) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20}\n}\n\nfunc (x *FeatureSetDefaults) GetDefaults() []*FeatureSetDefaults_FeatureSetEditionDefault {\n\tif x != nil {\n\t\treturn x.Defaults\n\t}\n\treturn nil\n}\n\nfunc (x *FeatureSetDefaults) GetMinimumEdition() Edition {\n\tif x != nil && x.MinimumEdition != nil {\n\t\treturn *x.MinimumEdition\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\nfunc (x *FeatureSetDefaults) GetMaximumEdition() Edition {\n\tif x != nil && x.MaximumEdition != nil {\n\t\treturn *x.MaximumEdition\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\n// Encapsulates information about the original source file from which a\n// FileDescriptorProto was generated.\ntype SourceCodeInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// A Location identifies a piece of source code in a .proto file which\n\t// corresponds to a particular definition.  This information is intended\n\t// to be useful to IDEs, code indexers, documentation generators, and similar\n\t// tools.\n\t//\n\t// For example, say we have a file like:\n\t//\n\t//\tmessage Foo {\n\t//\t  optional string foo = 1;\n\t//\t}\n\t//\n\t// Let's look at just the field definition:\n\t//\n\t//\toptional string foo = 1;\n\t//\t^       ^^     ^^  ^  ^^^\n\t//\ta       bc     de  f  ghi\n\t//\n\t// We have the following locations:\n\t//\n\t//\tspan   path               represents\n\t//\t[a,i)  [ 4, 0, 2, 0 ]     The whole field definition.\n\t//\t[a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).\n\t//\t[c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).\n\t//\t[e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).\n\t//\t[g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).\n\t//\n\t// Notes:\n\t//   - A location may refer to a repeated field itself (i.e. not to any\n\t//     particular index within it).  This is used whenever a set of elements are\n\t//     logically enclosed in a single code segment.  For example, an entire\n\t//     extend block (possibly containing multiple extension definitions) will\n\t//     have an outer location whose path refers to the \"extensions\" repeated\n\t//     field without an index.\n\t//   - Multiple locations may have the same path.  This happens when a single\n\t//     logical declaration is spread out across multiple places.  The most\n\t//     obvious example is the \"extend\" block again -- there may be multiple\n\t//     extend blocks in the same scope, each of which will have the same path.\n\t//   - A location's span is not always a subset of its parent's span.  For\n\t//     example, the \"extendee\" of an extension declaration appears at the\n\t//     beginning of the \"extend\" block and is shared by all extensions within\n\t//     the block.\n\t//   - Just because a location's span is a subset of some other location's span\n\t//     does not mean that it is a descendant.  For example, a \"group\" defines\n\t//     both a type and a field in a single declaration.  Thus, the locations\n\t//     corresponding to the type and field and their components will overlap.\n\t//   - Code which tries to interpret locations should probably be designed to\n\t//     ignore those that it doesn't understand, as more types of locations could\n\t//     be recorded in the future.\n\tLocation        []*SourceCodeInfo_Location `protobuf:\"bytes,1,rep,name=location\" json:\"location,omitempty\"`\n\textensionFields protoimpl.ExtensionFields\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *SourceCodeInfo) Reset() {\n\t*x = SourceCodeInfo{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[21]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SourceCodeInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SourceCodeInfo) ProtoMessage() {}\n\nfunc (x *SourceCodeInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[21]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead.\nfunc (*SourceCodeInfo) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21}\n}\n\nfunc (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {\n\tif x != nil {\n\t\treturn x.Location\n\t}\n\treturn nil\n}\n\n// Describes the relationship between generated code and its original source\n// file. A GeneratedCodeInfo message is associated with only one generated\n// source file, but may contain references to different source .proto files.\ntype GeneratedCodeInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// An Annotation connects some span of text in generated code to an element\n\t// of its generating .proto file.\n\tAnnotation    []*GeneratedCodeInfo_Annotation `protobuf:\"bytes,1,rep,name=annotation\" json:\"annotation,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GeneratedCodeInfo) Reset() {\n\t*x = GeneratedCodeInfo{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[22]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GeneratedCodeInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GeneratedCodeInfo) ProtoMessage() {}\n\nfunc (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[22]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead.\nfunc (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22}\n}\n\nfunc (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {\n\tif x != nil {\n\t\treturn x.Annotation\n\t}\n\treturn nil\n}\n\ntype DescriptorProto_ExtensionRange struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tStart         *int32                 `protobuf:\"varint,1,opt,name=start\" json:\"start,omitempty\"` // Inclusive.\n\tEnd           *int32                 `protobuf:\"varint,2,opt,name=end\" json:\"end,omitempty\"`     // Exclusive.\n\tOptions       *ExtensionRangeOptions `protobuf:\"bytes,3,opt,name=options\" json:\"options,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *DescriptorProto_ExtensionRange) Reset() {\n\t*x = DescriptorProto_ExtensionRange{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[23]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DescriptorProto_ExtensionRange) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DescriptorProto_ExtensionRange) ProtoMessage() {}\n\nfunc (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[23]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DescriptorProto_ExtensionRange.ProtoReflect.Descriptor instead.\nfunc (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 0}\n}\n\nfunc (x *DescriptorProto_ExtensionRange) GetStart() int32 {\n\tif x != nil && x.Start != nil {\n\t\treturn *x.Start\n\t}\n\treturn 0\n}\n\nfunc (x *DescriptorProto_ExtensionRange) GetEnd() int32 {\n\tif x != nil && x.End != nil {\n\t\treturn *x.End\n\t}\n\treturn 0\n}\n\nfunc (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {\n\tif x != nil {\n\t\treturn x.Options\n\t}\n\treturn nil\n}\n\n// Range of reserved tag numbers. Reserved tag numbers may not be used by\n// fields or extension ranges in the same message. Reserved ranges may\n// not overlap.\ntype DescriptorProto_ReservedRange struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tStart         *int32                 `protobuf:\"varint,1,opt,name=start\" json:\"start,omitempty\"` // Inclusive.\n\tEnd           *int32                 `protobuf:\"varint,2,opt,name=end\" json:\"end,omitempty\"`     // Exclusive.\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *DescriptorProto_ReservedRange) Reset() {\n\t*x = DescriptorProto_ReservedRange{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[24]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DescriptorProto_ReservedRange) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DescriptorProto_ReservedRange) ProtoMessage() {}\n\nfunc (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[24]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead.\nfunc (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1}\n}\n\nfunc (x *DescriptorProto_ReservedRange) GetStart() int32 {\n\tif x != nil && x.Start != nil {\n\t\treturn *x.Start\n\t}\n\treturn 0\n}\n\nfunc (x *DescriptorProto_ReservedRange) GetEnd() int32 {\n\tif x != nil && x.End != nil {\n\t\treturn *x.End\n\t}\n\treturn 0\n}\n\ntype ExtensionRangeOptions_Declaration struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The extension number declared within the extension range.\n\tNumber *int32 `protobuf:\"varint,1,opt,name=number\" json:\"number,omitempty\"`\n\t// The fully-qualified name of the extension field. There must be a leading\n\t// dot in front of the full name.\n\tFullName *string `protobuf:\"bytes,2,opt,name=full_name,json=fullName\" json:\"full_name,omitempty\"`\n\t// The fully-qualified type name of the extension field. Unlike\n\t// Metadata.type, Declaration.type must have a leading dot for messages\n\t// and enums.\n\tType *string `protobuf:\"bytes,3,opt,name=type\" json:\"type,omitempty\"`\n\t// If true, indicates that the number is reserved in the extension range,\n\t// and any extension field with the number will fail to compile. Set this\n\t// when a declared extension field is deleted.\n\tReserved *bool `protobuf:\"varint,5,opt,name=reserved\" json:\"reserved,omitempty\"`\n\t// If true, indicates that the extension must be defined as repeated.\n\t// Otherwise the extension must be defined as optional.\n\tRepeated      *bool `protobuf:\"varint,6,opt,name=repeated\" json:\"repeated,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) Reset() {\n\t*x = ExtensionRangeOptions_Declaration{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[25]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ExtensionRangeOptions_Declaration) ProtoMessage() {}\n\nfunc (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[25]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ExtensionRangeOptions_Declaration.ProtoReflect.Descriptor instead.\nfunc (*ExtensionRangeOptions_Declaration) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0}\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) GetNumber() int32 {\n\tif x != nil && x.Number != nil {\n\t\treturn *x.Number\n\t}\n\treturn 0\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) GetFullName() string {\n\tif x != nil && x.FullName != nil {\n\t\treturn *x.FullName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) GetType() string {\n\tif x != nil && x.Type != nil {\n\t\treturn *x.Type\n\t}\n\treturn \"\"\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) GetReserved() bool {\n\tif x != nil && x.Reserved != nil {\n\t\treturn *x.Reserved\n\t}\n\treturn false\n}\n\nfunc (x *ExtensionRangeOptions_Declaration) GetRepeated() bool {\n\tif x != nil && x.Repeated != nil {\n\t\treturn *x.Repeated\n\t}\n\treturn false\n}\n\n// Range of reserved numeric values. Reserved values may not be used by\n// entries in the same enum. Reserved ranges may not overlap.\n//\n// Note that this is distinct from DescriptorProto.ReservedRange in that it\n// is inclusive such that it can appropriately represent the entire int32\n// domain.\ntype EnumDescriptorProto_EnumReservedRange struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tStart         *int32                 `protobuf:\"varint,1,opt,name=start\" json:\"start,omitempty\"` // Inclusive.\n\tEnd           *int32                 `protobuf:\"varint,2,opt,name=end\" json:\"end,omitempty\"`     // Inclusive.\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *EnumDescriptorProto_EnumReservedRange) Reset() {\n\t*x = EnumDescriptorProto_EnumReservedRange{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[26]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *EnumDescriptorProto_EnumReservedRange) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}\n\nfunc (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[26]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use EnumDescriptorProto_EnumReservedRange.ProtoReflect.Descriptor instead.\nfunc (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6, 0}\n}\n\nfunc (x *EnumDescriptorProto_EnumReservedRange) GetStart() int32 {\n\tif x != nil && x.Start != nil {\n\t\treturn *x.Start\n\t}\n\treturn 0\n}\n\nfunc (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {\n\tif x != nil && x.End != nil {\n\t\treturn *x.End\n\t}\n\treturn 0\n}\n\ntype FieldOptions_EditionDefault struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tEdition       *Edition               `protobuf:\"varint,3,opt,name=edition,enum=google.protobuf.Edition\" json:\"edition,omitempty\"`\n\tValue         *string                `protobuf:\"bytes,2,opt,name=value\" json:\"value,omitempty\"` // Textproto value.\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *FieldOptions_EditionDefault) Reset() {\n\t*x = FieldOptions_EditionDefault{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[27]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FieldOptions_EditionDefault) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FieldOptions_EditionDefault) ProtoMessage() {}\n\nfunc (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[27]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FieldOptions_EditionDefault.ProtoReflect.Descriptor instead.\nfunc (*FieldOptions_EditionDefault) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0}\n}\n\nfunc (x *FieldOptions_EditionDefault) GetEdition() Edition {\n\tif x != nil && x.Edition != nil {\n\t\treturn *x.Edition\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\nfunc (x *FieldOptions_EditionDefault) GetValue() string {\n\tif x != nil && x.Value != nil {\n\t\treturn *x.Value\n\t}\n\treturn \"\"\n}\n\n// Information about the support window of a feature.\ntype FieldOptions_FeatureSupport struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The edition that this feature was first available in.  In editions\n\t// earlier than this one, the default assigned to EDITION_LEGACY will be\n\t// used, and proto files will not be able to override it.\n\tEditionIntroduced *Edition `protobuf:\"varint,1,opt,name=edition_introduced,json=editionIntroduced,enum=google.protobuf.Edition\" json:\"edition_introduced,omitempty\"`\n\t// The edition this feature becomes deprecated in.  Using this after this\n\t// edition may trigger warnings.\n\tEditionDeprecated *Edition `protobuf:\"varint,2,opt,name=edition_deprecated,json=editionDeprecated,enum=google.protobuf.Edition\" json:\"edition_deprecated,omitempty\"`\n\t// The deprecation warning text if this feature is used after the edition it\n\t// was marked deprecated in.\n\tDeprecationWarning *string `protobuf:\"bytes,3,opt,name=deprecation_warning,json=deprecationWarning\" json:\"deprecation_warning,omitempty\"`\n\t// The edition this feature is no longer available in.  In editions after\n\t// this one, the last default assigned will be used, and proto files will\n\t// not be able to override it.\n\tEditionRemoved *Edition `protobuf:\"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition\" json:\"edition_removed,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *FieldOptions_FeatureSupport) Reset() {\n\t*x = FieldOptions_FeatureSupport{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[28]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FieldOptions_FeatureSupport) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FieldOptions_FeatureSupport) ProtoMessage() {}\n\nfunc (x *FieldOptions_FeatureSupport) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[28]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FieldOptions_FeatureSupport.ProtoReflect.Descriptor instead.\nfunc (*FieldOptions_FeatureSupport) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1}\n}\n\nfunc (x *FieldOptions_FeatureSupport) GetEditionIntroduced() Edition {\n\tif x != nil && x.EditionIntroduced != nil {\n\t\treturn *x.EditionIntroduced\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\nfunc (x *FieldOptions_FeatureSupport) GetEditionDeprecated() Edition {\n\tif x != nil && x.EditionDeprecated != nil {\n\t\treturn *x.EditionDeprecated\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\nfunc (x *FieldOptions_FeatureSupport) GetDeprecationWarning() string {\n\tif x != nil && x.DeprecationWarning != nil {\n\t\treturn *x.DeprecationWarning\n\t}\n\treturn \"\"\n}\n\nfunc (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition {\n\tif x != nil && x.EditionRemoved != nil {\n\t\treturn *x.EditionRemoved\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\n// The name of the uninterpreted option.  Each string represents a segment in\n// a dot-separated name.  is_extension is true iff a segment represents an\n// extension (denoted with parentheses in options specs in .proto files).\n// E.g.,{ [\"foo\", false], [\"bar.baz\", true], [\"moo\", false] } represents\n// \"foo.(bar.baz).moo\".\ntype UninterpretedOption_NamePart struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tNamePart      *string                `protobuf:\"bytes,1,req,name=name_part,json=namePart\" json:\"name_part,omitempty\"`\n\tIsExtension   *bool                  `protobuf:\"varint,2,req,name=is_extension,json=isExtension\" json:\"is_extension,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *UninterpretedOption_NamePart) Reset() {\n\t*x = UninterpretedOption_NamePart{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[29]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UninterpretedOption_NamePart) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UninterpretedOption_NamePart) ProtoMessage() {}\n\nfunc (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[29]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UninterpretedOption_NamePart.ProtoReflect.Descriptor instead.\nfunc (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18, 0}\n}\n\nfunc (x *UninterpretedOption_NamePart) GetNamePart() string {\n\tif x != nil && x.NamePart != nil {\n\t\treturn *x.NamePart\n\t}\n\treturn \"\"\n}\n\nfunc (x *UninterpretedOption_NamePart) GetIsExtension() bool {\n\tif x != nil && x.IsExtension != nil {\n\t\treturn *x.IsExtension\n\t}\n\treturn false\n}\n\ntype FeatureSet_VisibilityFeature struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *FeatureSet_VisibilityFeature) Reset() {\n\t*x = FeatureSet_VisibilityFeature{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[30]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FeatureSet_VisibilityFeature) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FeatureSet_VisibilityFeature) ProtoMessage() {}\n\nfunc (x *FeatureSet_VisibilityFeature) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[30]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FeatureSet_VisibilityFeature.ProtoReflect.Descriptor instead.\nfunc (*FeatureSet_VisibilityFeature) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}\n}\n\n// A map from every known edition with a unique set of defaults to its\n// defaults. Not all editions may be contained here.  For a given edition,\n// the defaults at the closest matching edition ordered at or before it should\n// be used.  This field must be in strict ascending order by edition.\ntype FeatureSetDefaults_FeatureSetEditionDefault struct {\n\tstate   protoimpl.MessageState `protogen:\"open.v1\"`\n\tEdition *Edition               `protobuf:\"varint,3,opt,name=edition,enum=google.protobuf.Edition\" json:\"edition,omitempty\"`\n\t// Defaults of features that can be overridden in this edition.\n\tOverridableFeatures *FeatureSet `protobuf:\"bytes,4,opt,name=overridable_features,json=overridableFeatures\" json:\"overridable_features,omitempty\"`\n\t// Defaults of features that can't be overridden in this edition.\n\tFixedFeatures *FeatureSet `protobuf:\"bytes,5,opt,name=fixed_features,json=fixedFeatures\" json:\"fixed_features,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() {\n\t*x = FeatureSetDefaults_FeatureSetEditionDefault{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[31]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[31]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use FeatureSetDefaults_FeatureSetEditionDefault.ProtoReflect.Descriptor instead.\nfunc (*FeatureSetDefaults_FeatureSetEditionDefault) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0}\n}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition {\n\tif x != nil && x.Edition != nil {\n\t\treturn *x.Edition\n\t}\n\treturn Edition_EDITION_UNKNOWN\n}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) GetOverridableFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.OverridableFeatures\n\t}\n\treturn nil\n}\n\nfunc (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *FeatureSet {\n\tif x != nil {\n\t\treturn x.FixedFeatures\n\t}\n\treturn nil\n}\n\ntype SourceCodeInfo_Location struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Identifies which part of the FileDescriptorProto was defined at this\n\t// location.\n\t//\n\t// Each element is a field number or an index.  They form a path from\n\t// the root FileDescriptorProto to the place where the definition appears.\n\t// For example, this path:\n\t//\n\t//\t[ 4, 3, 2, 7, 1 ]\n\t//\n\t// refers to:\n\t//\n\t//\tfile.message_type(3)  // 4, 3\n\t//\t    .field(7)         // 2, 7\n\t//\t    .name()           // 1\n\t//\n\t// This is because FileDescriptorProto.message_type has field number 4:\n\t//\n\t//\trepeated DescriptorProto message_type = 4;\n\t//\n\t// and DescriptorProto.field has field number 2:\n\t//\n\t//\trepeated FieldDescriptorProto field = 2;\n\t//\n\t// and FieldDescriptorProto.name has field number 1:\n\t//\n\t//\toptional string name = 1;\n\t//\n\t// Thus, the above path gives the location of a field name.  If we removed\n\t// the last element:\n\t//\n\t//\t[ 4, 3, 2, 7 ]\n\t//\n\t// this path refers to the whole field declaration (from the beginning\n\t// of the label to the terminating semicolon).\n\tPath []int32 `protobuf:\"varint,1,rep,packed,name=path\" json:\"path,omitempty\"`\n\t// Always has exactly three or four elements: start line, start column,\n\t// end line (optional, otherwise assumed same as start line), end column.\n\t// These are packed into a single field for efficiency.  Note that line\n\t// and column numbers are zero-based -- typically you will want to add\n\t// 1 to each before displaying to a user.\n\tSpan []int32 `protobuf:\"varint,2,rep,packed,name=span\" json:\"span,omitempty\"`\n\t// If this SourceCodeInfo represents a complete declaration, these are any\n\t// comments appearing before and after the declaration which appear to be\n\t// attached to the declaration.\n\t//\n\t// A series of line comments appearing on consecutive lines, with no other\n\t// tokens appearing on those lines, will be treated as a single comment.\n\t//\n\t// leading_detached_comments will keep paragraphs of comments that appear\n\t// before (but not connected to) the current element. Each paragraph,\n\t// separated by empty lines, will be one comment element in the repeated\n\t// field.\n\t//\n\t// Only the comment content is provided; comment markers (e.g. //) are\n\t// stripped out.  For block comments, leading whitespace and an asterisk\n\t// will be stripped from the beginning of each line other than the first.\n\t// Newlines are included in the output.\n\t//\n\t// Examples:\n\t//\n\t//\toptional int32 foo = 1;  // Comment attached to foo.\n\t//\t// Comment attached to bar.\n\t//\toptional int32 bar = 2;\n\t//\n\t//\toptional string baz = 3;\n\t//\t// Comment attached to baz.\n\t//\t// Another line attached to baz.\n\t//\n\t//\t// Comment attached to moo.\n\t//\t//\n\t//\t// Another line attached to moo.\n\t//\toptional double moo = 4;\n\t//\n\t//\t// Detached comment for corge. This is not leading or trailing comments\n\t//\t// to moo or corge because there are blank lines separating it from\n\t//\t// both.\n\t//\n\t//\t// Detached comment for corge paragraph 2.\n\t//\n\t//\toptional string corge = 5;\n\t//\t/* Block comment attached\n\t//\t * to corge.  Leading asterisks\n\t//\t * will be removed. */\n\t//\t/* Block comment attached to\n\t//\t * grault. */\n\t//\toptional int32 grault = 6;\n\t//\n\t//\t// ignored detached comments.\n\tLeadingComments         *string  `protobuf:\"bytes,3,opt,name=leading_comments,json=leadingComments\" json:\"leading_comments,omitempty\"`\n\tTrailingComments        *string  `protobuf:\"bytes,4,opt,name=trailing_comments,json=trailingComments\" json:\"trailing_comments,omitempty\"`\n\tLeadingDetachedComments []string `protobuf:\"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments\" json:\"leading_detached_comments,omitempty\"`\n\tunknownFields           protoimpl.UnknownFields\n\tsizeCache               protoimpl.SizeCache\n}\n\nfunc (x *SourceCodeInfo_Location) Reset() {\n\t*x = SourceCodeInfo_Location{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[32]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SourceCodeInfo_Location) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SourceCodeInfo_Location) ProtoMessage() {}\n\nfunc (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[32]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead.\nfunc (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21, 0}\n}\n\nfunc (x *SourceCodeInfo_Location) GetPath() []int32 {\n\tif x != nil {\n\t\treturn x.Path\n\t}\n\treturn nil\n}\n\nfunc (x *SourceCodeInfo_Location) GetSpan() []int32 {\n\tif x != nil {\n\t\treturn x.Span\n\t}\n\treturn nil\n}\n\nfunc (x *SourceCodeInfo_Location) GetLeadingComments() string {\n\tif x != nil && x.LeadingComments != nil {\n\t\treturn *x.LeadingComments\n\t}\n\treturn \"\"\n}\n\nfunc (x *SourceCodeInfo_Location) GetTrailingComments() string {\n\tif x != nil && x.TrailingComments != nil {\n\t\treturn *x.TrailingComments\n\t}\n\treturn \"\"\n}\n\nfunc (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {\n\tif x != nil {\n\t\treturn x.LeadingDetachedComments\n\t}\n\treturn nil\n}\n\ntype GeneratedCodeInfo_Annotation struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Identifies the element in the original source .proto file. This field\n\t// is formatted the same as SourceCodeInfo.Location.path.\n\tPath []int32 `protobuf:\"varint,1,rep,packed,name=path\" json:\"path,omitempty\"`\n\t// Identifies the filesystem path to the original source .proto.\n\tSourceFile *string `protobuf:\"bytes,2,opt,name=source_file,json=sourceFile\" json:\"source_file,omitempty\"`\n\t// Identifies the starting offset in bytes in the generated code\n\t// that relates to the identified object.\n\tBegin *int32 `protobuf:\"varint,3,opt,name=begin\" json:\"begin,omitempty\"`\n\t// Identifies the ending offset in bytes in the generated code that\n\t// relates to the identified object. The end offset should be one past\n\t// the last relevant byte (so the length of the text = end - begin).\n\tEnd           *int32                                 `protobuf:\"varint,4,opt,name=end\" json:\"end,omitempty\"`\n\tSemantic      *GeneratedCodeInfo_Annotation_Semantic `protobuf:\"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic\" json:\"semantic,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) Reset() {\n\t*x = GeneratedCodeInfo_Annotation{}\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[33]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GeneratedCodeInfo_Annotation) ProtoMessage() {}\n\nfunc (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_descriptor_proto_msgTypes[33]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead.\nfunc (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0}\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) GetPath() []int32 {\n\tif x != nil {\n\t\treturn x.Path\n\t}\n\treturn nil\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) GetSourceFile() string {\n\tif x != nil && x.SourceFile != nil {\n\t\treturn *x.SourceFile\n\t}\n\treturn \"\"\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) GetBegin() int32 {\n\tif x != nil && x.Begin != nil {\n\t\treturn *x.Begin\n\t}\n\treturn 0\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) GetEnd() int32 {\n\tif x != nil && x.End != nil {\n\t\treturn *x.End\n\t}\n\treturn 0\n}\n\nfunc (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic {\n\tif x != nil && x.Semantic != nil {\n\t\treturn *x.Semantic\n\t}\n\treturn GeneratedCodeInfo_Annotation_NONE\n}\n\nvar File_google_protobuf_descriptor_proto protoreflect.FileDescriptor\n\nconst file_google_protobuf_descriptor_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\" google/protobuf/descriptor.proto\\x12\\x0fgoogle.protobuf\\\"[\\n\" +\n\t\"\\x11FileDescriptorSet\\x128\\n\" +\n\t\"\\x04file\\x18\\x01 \\x03(\\v2$.google.protobuf.FileDescriptorProtoR\\x04file*\\f\\b\\x80\\xec\\xca\\xff\\x01\\x10\\x81\\xec\\xca\\xff\\x01\\\"\\xc5\\x05\\n\" +\n\t\"\\x13FileDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12\\x18\\n\" +\n\t\"\\apackage\\x18\\x02 \\x01(\\tR\\apackage\\x12\\x1e\\n\" +\n\t\"\\n\" +\n\t\"dependency\\x18\\x03 \\x03(\\tR\\n\" +\n\t\"dependency\\x12+\\n\" +\n\t\"\\x11public_dependency\\x18\\n\" +\n\t\" \\x03(\\x05R\\x10publicDependency\\x12'\\n\" +\n\t\"\\x0fweak_dependency\\x18\\v \\x03(\\x05R\\x0eweakDependency\\x12+\\n\" +\n\t\"\\x11option_dependency\\x18\\x0f \\x03(\\tR\\x10optionDependency\\x12C\\n\" +\n\t\"\\fmessage_type\\x18\\x04 \\x03(\\v2 .google.protobuf.DescriptorProtoR\\vmessageType\\x12A\\n\" +\n\t\"\\tenum_type\\x18\\x05 \\x03(\\v2$.google.protobuf.EnumDescriptorProtoR\\benumType\\x12A\\n\" +\n\t\"\\aservice\\x18\\x06 \\x03(\\v2'.google.protobuf.ServiceDescriptorProtoR\\aservice\\x12C\\n\" +\n\t\"\\textension\\x18\\a \\x03(\\v2%.google.protobuf.FieldDescriptorProtoR\\textension\\x126\\n\" +\n\t\"\\aoptions\\x18\\b \\x01(\\v2\\x1c.google.protobuf.FileOptionsR\\aoptions\\x12I\\n\" +\n\t\"\\x10source_code_info\\x18\\t \\x01(\\v2\\x1f.google.protobuf.SourceCodeInfoR\\x0esourceCodeInfo\\x12\\x16\\n\" +\n\t\"\\x06syntax\\x18\\f \\x01(\\tR\\x06syntax\\x122\\n\" +\n\t\"\\aedition\\x18\\x0e \\x01(\\x0e2\\x18.google.protobuf.EditionR\\aedition\\\"\\xfc\\x06\\n\" +\n\t\"\\x0fDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12;\\n\" +\n\t\"\\x05field\\x18\\x02 \\x03(\\v2%.google.protobuf.FieldDescriptorProtoR\\x05field\\x12C\\n\" +\n\t\"\\textension\\x18\\x06 \\x03(\\v2%.google.protobuf.FieldDescriptorProtoR\\textension\\x12A\\n\" +\n\t\"\\vnested_type\\x18\\x03 \\x03(\\v2 .google.protobuf.DescriptorProtoR\\n\" +\n\t\"nestedType\\x12A\\n\" +\n\t\"\\tenum_type\\x18\\x04 \\x03(\\v2$.google.protobuf.EnumDescriptorProtoR\\benumType\\x12X\\n\" +\n\t\"\\x0fextension_range\\x18\\x05 \\x03(\\v2/.google.protobuf.DescriptorProto.ExtensionRangeR\\x0eextensionRange\\x12D\\n\" +\n\t\"\\n\" +\n\t\"oneof_decl\\x18\\b \\x03(\\v2%.google.protobuf.OneofDescriptorProtoR\\toneofDecl\\x129\\n\" +\n\t\"\\aoptions\\x18\\a \\x01(\\v2\\x1f.google.protobuf.MessageOptionsR\\aoptions\\x12U\\n\" +\n\t\"\\x0ereserved_range\\x18\\t \\x03(\\v2..google.protobuf.DescriptorProto.ReservedRangeR\\rreservedRange\\x12#\\n\" +\n\t\"\\rreserved_name\\x18\\n\" +\n\t\" \\x03(\\tR\\freservedName\\x12A\\n\" +\n\t\"\\n\" +\n\t\"visibility\\x18\\v \\x01(\\x0e2!.google.protobuf.SymbolVisibilityR\\n\" +\n\t\"visibility\\x1az\\n\" +\n\t\"\\x0eExtensionRange\\x12\\x14\\n\" +\n\t\"\\x05start\\x18\\x01 \\x01(\\x05R\\x05start\\x12\\x10\\n\" +\n\t\"\\x03end\\x18\\x02 \\x01(\\x05R\\x03end\\x12@\\n\" +\n\t\"\\aoptions\\x18\\x03 \\x01(\\v2&.google.protobuf.ExtensionRangeOptionsR\\aoptions\\x1a7\\n\" +\n\t\"\\rReservedRange\\x12\\x14\\n\" +\n\t\"\\x05start\\x18\\x01 \\x01(\\x05R\\x05start\\x12\\x10\\n\" +\n\t\"\\x03end\\x18\\x02 \\x01(\\x05R\\x03end\\\"\\xcc\\x04\\n\" +\n\t\"\\x15ExtensionRangeOptions\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption\\x12Y\\n\" +\n\t\"\\vdeclaration\\x18\\x02 \\x03(\\v22.google.protobuf.ExtensionRangeOptions.DeclarationB\\x03\\x88\\x01\\x02R\\vdeclaration\\x127\\n\" +\n\t\"\\bfeatures\\x182 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12m\\n\" +\n\t\"\\fverification\\x18\\x03 \\x01(\\x0e28.google.protobuf.ExtensionRangeOptions.VerificationState:\\n\" +\n\t\"UNVERIFIEDB\\x03\\x88\\x01\\x02R\\fverification\\x1a\\x94\\x01\\n\" +\n\t\"\\vDeclaration\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x01 \\x01(\\x05R\\x06number\\x12\\x1b\\n\" +\n\t\"\\tfull_name\\x18\\x02 \\x01(\\tR\\bfullName\\x12\\x12\\n\" +\n\t\"\\x04type\\x18\\x03 \\x01(\\tR\\x04type\\x12\\x1a\\n\" +\n\t\"\\breserved\\x18\\x05 \\x01(\\bR\\breserved\\x12\\x1a\\n\" +\n\t\"\\brepeated\\x18\\x06 \\x01(\\bR\\brepeatedJ\\x04\\b\\x04\\x10\\x05\\\"4\\n\" +\n\t\"\\x11VerificationState\\x12\\x0f\\n\" +\n\t\"\\vDECLARATION\\x10\\x00\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"UNVERIFIED\\x10\\x01*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\xc1\\x06\\n\" +\n\t\"\\x14FieldDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x03 \\x01(\\x05R\\x06number\\x12A\\n\" +\n\t\"\\x05label\\x18\\x04 \\x01(\\x0e2+.google.protobuf.FieldDescriptorProto.LabelR\\x05label\\x12>\\n\" +\n\t\"\\x04type\\x18\\x05 \\x01(\\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\\x04type\\x12\\x1b\\n\" +\n\t\"\\ttype_name\\x18\\x06 \\x01(\\tR\\btypeName\\x12\\x1a\\n\" +\n\t\"\\bextendee\\x18\\x02 \\x01(\\tR\\bextendee\\x12#\\n\" +\n\t\"\\rdefault_value\\x18\\a \\x01(\\tR\\fdefaultValue\\x12\\x1f\\n\" +\n\t\"\\voneof_index\\x18\\t \\x01(\\x05R\\n\" +\n\t\"oneofIndex\\x12\\x1b\\n\" +\n\t\"\\tjson_name\\x18\\n\" +\n\t\" \\x01(\\tR\\bjsonName\\x127\\n\" +\n\t\"\\aoptions\\x18\\b \\x01(\\v2\\x1d.google.protobuf.FieldOptionsR\\aoptions\\x12'\\n\" +\n\t\"\\x0fproto3_optional\\x18\\x11 \\x01(\\bR\\x0eproto3Optional\\\"\\xb6\\x02\\n\" +\n\t\"\\x04Type\\x12\\x0f\\n\" +\n\t\"\\vTYPE_DOUBLE\\x10\\x01\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"TYPE_FLOAT\\x10\\x02\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"TYPE_INT64\\x10\\x03\\x12\\x0f\\n\" +\n\t\"\\vTYPE_UINT64\\x10\\x04\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"TYPE_INT32\\x10\\x05\\x12\\x10\\n\" +\n\t\"\\fTYPE_FIXED64\\x10\\x06\\x12\\x10\\n\" +\n\t\"\\fTYPE_FIXED32\\x10\\a\\x12\\r\\n\" +\n\t\"\\tTYPE_BOOL\\x10\\b\\x12\\x0f\\n\" +\n\t\"\\vTYPE_STRING\\x10\\t\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"TYPE_GROUP\\x10\\n\" +\n\t\"\\x12\\x10\\n\" +\n\t\"\\fTYPE_MESSAGE\\x10\\v\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"TYPE_BYTES\\x10\\f\\x12\\x0f\\n\" +\n\t\"\\vTYPE_UINT32\\x10\\r\\x12\\r\\n\" +\n\t\"\\tTYPE_ENUM\\x10\\x0e\\x12\\x11\\n\" +\n\t\"\\rTYPE_SFIXED32\\x10\\x0f\\x12\\x11\\n\" +\n\t\"\\rTYPE_SFIXED64\\x10\\x10\\x12\\x0f\\n\" +\n\t\"\\vTYPE_SINT32\\x10\\x11\\x12\\x0f\\n\" +\n\t\"\\vTYPE_SINT64\\x10\\x12\\\"C\\n\" +\n\t\"\\x05Label\\x12\\x12\\n\" +\n\t\"\\x0eLABEL_OPTIONAL\\x10\\x01\\x12\\x12\\n\" +\n\t\"\\x0eLABEL_REPEATED\\x10\\x03\\x12\\x12\\n\" +\n\t\"\\x0eLABEL_REQUIRED\\x10\\x02\\\"c\\n\" +\n\t\"\\x14OneofDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x127\\n\" +\n\t\"\\aoptions\\x18\\x02 \\x01(\\v2\\x1d.google.protobuf.OneofOptionsR\\aoptions\\\"\\xa6\\x03\\n\" +\n\t\"\\x13EnumDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12?\\n\" +\n\t\"\\x05value\\x18\\x02 \\x03(\\v2).google.protobuf.EnumValueDescriptorProtoR\\x05value\\x126\\n\" +\n\t\"\\aoptions\\x18\\x03 \\x01(\\v2\\x1c.google.protobuf.EnumOptionsR\\aoptions\\x12]\\n\" +\n\t\"\\x0ereserved_range\\x18\\x04 \\x03(\\v26.google.protobuf.EnumDescriptorProto.EnumReservedRangeR\\rreservedRange\\x12#\\n\" +\n\t\"\\rreserved_name\\x18\\x05 \\x03(\\tR\\freservedName\\x12A\\n\" +\n\t\"\\n\" +\n\t\"visibility\\x18\\x06 \\x01(\\x0e2!.google.protobuf.SymbolVisibilityR\\n\" +\n\t\"visibility\\x1a;\\n\" +\n\t\"\\x11EnumReservedRange\\x12\\x14\\n\" +\n\t\"\\x05start\\x18\\x01 \\x01(\\x05R\\x05start\\x12\\x10\\n\" +\n\t\"\\x03end\\x18\\x02 \\x01(\\x05R\\x03end\\\"\\x83\\x01\\n\" +\n\t\"\\x18EnumValueDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x02 \\x01(\\x05R\\x06number\\x12;\\n\" +\n\t\"\\aoptions\\x18\\x03 \\x01(\\v2!.google.protobuf.EnumValueOptionsR\\aoptions\\\"\\xb5\\x01\\n\" +\n\t\"\\x16ServiceDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12>\\n\" +\n\t\"\\x06method\\x18\\x02 \\x03(\\v2&.google.protobuf.MethodDescriptorProtoR\\x06method\\x129\\n\" +\n\t\"\\aoptions\\x18\\x03 \\x01(\\v2\\x1f.google.protobuf.ServiceOptionsR\\aoptionsJ\\x04\\b\\x04\\x10\\x05R\\x06stream\\\"\\x89\\x02\\n\" +\n\t\"\\x15MethodDescriptorProto\\x12\\x12\\n\" +\n\t\"\\x04name\\x18\\x01 \\x01(\\tR\\x04name\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"input_type\\x18\\x02 \\x01(\\tR\\tinputType\\x12\\x1f\\n\" +\n\t\"\\voutput_type\\x18\\x03 \\x01(\\tR\\n\" +\n\t\"outputType\\x128\\n\" +\n\t\"\\aoptions\\x18\\x04 \\x01(\\v2\\x1e.google.protobuf.MethodOptionsR\\aoptions\\x120\\n\" +\n\t\"\\x10client_streaming\\x18\\x05 \\x01(\\b:\\x05falseR\\x0fclientStreaming\\x120\\n\" +\n\t\"\\x10server_streaming\\x18\\x06 \\x01(\\b:\\x05falseR\\x0fserverStreaming\\\"\\xad\\t\\n\" +\n\t\"\\vFileOptions\\x12!\\n\" +\n\t\"\\fjava_package\\x18\\x01 \\x01(\\tR\\vjavaPackage\\x120\\n\" +\n\t\"\\x14java_outer_classname\\x18\\b \\x01(\\tR\\x12javaOuterClassname\\x125\\n\" +\n\t\"\\x13java_multiple_files\\x18\\n\" +\n\t\" \\x01(\\b:\\x05falseR\\x11javaMultipleFiles\\x12D\\n\" +\n\t\"\\x1djava_generate_equals_and_hash\\x18\\x14 \\x01(\\bB\\x02\\x18\\x01R\\x19javaGenerateEqualsAndHash\\x12:\\n\" +\n\t\"\\x16java_string_check_utf8\\x18\\x1b \\x01(\\b:\\x05falseR\\x13javaStringCheckUtf8\\x12S\\n\" +\n\t\"\\foptimize_for\\x18\\t \\x01(\\x0e2).google.protobuf.FileOptions.OptimizeMode:\\x05SPEEDR\\voptimizeFor\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"go_package\\x18\\v \\x01(\\tR\\tgoPackage\\x125\\n\" +\n\t\"\\x13cc_generic_services\\x18\\x10 \\x01(\\b:\\x05falseR\\x11ccGenericServices\\x129\\n\" +\n\t\"\\x15java_generic_services\\x18\\x11 \\x01(\\b:\\x05falseR\\x13javaGenericServices\\x125\\n\" +\n\t\"\\x13py_generic_services\\x18\\x12 \\x01(\\b:\\x05falseR\\x11pyGenericServices\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18\\x17 \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12.\\n\" +\n\t\"\\x10cc_enable_arenas\\x18\\x1f \\x01(\\b:\\x04trueR\\x0eccEnableArenas\\x12*\\n\" +\n\t\"\\x11objc_class_prefix\\x18$ \\x01(\\tR\\x0fobjcClassPrefix\\x12)\\n\" +\n\t\"\\x10csharp_namespace\\x18% \\x01(\\tR\\x0fcsharpNamespace\\x12!\\n\" +\n\t\"\\fswift_prefix\\x18' \\x01(\\tR\\vswiftPrefix\\x12(\\n\" +\n\t\"\\x10php_class_prefix\\x18( \\x01(\\tR\\x0ephpClassPrefix\\x12#\\n\" +\n\t\"\\rphp_namespace\\x18) \\x01(\\tR\\fphpNamespace\\x124\\n\" +\n\t\"\\x16php_metadata_namespace\\x18, \\x01(\\tR\\x14phpMetadataNamespace\\x12!\\n\" +\n\t\"\\fruby_package\\x18- \\x01(\\tR\\vrubyPackage\\x127\\n\" +\n\t\"\\bfeatures\\x182 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption\\\":\\n\" +\n\t\"\\fOptimizeMode\\x12\\t\\n\" +\n\t\"\\x05SPEED\\x10\\x01\\x12\\r\\n\" +\n\t\"\\tCODE_SIZE\\x10\\x02\\x12\\x10\\n\" +\n\t\"\\fLITE_RUNTIME\\x10\\x03*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02J\\x04\\b*\\x10+J\\x04\\b&\\x10'R\\x14php_generic_services\\\"\\xf4\\x03\\n\" +\n\t\"\\x0eMessageOptions\\x12<\\n\" +\n\t\"\\x17message_set_wire_format\\x18\\x01 \\x01(\\b:\\x05falseR\\x14messageSetWireFormat\\x12L\\n\" +\n\t\"\\x1fno_standard_descriptor_accessor\\x18\\x02 \\x01(\\b:\\x05falseR\\x1cnoStandardDescriptorAccessor\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18\\x03 \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12\\x1b\\n\" +\n\t\"\\tmap_entry\\x18\\a \\x01(\\bR\\bmapEntry\\x12V\\n\" +\n\t\"&deprecated_legacy_json_field_conflicts\\x18\\v \\x01(\\bB\\x02\\x18\\x01R\\\"deprecatedLegacyJsonFieldConflicts\\x127\\n\" +\n\t\"\\bfeatures\\x18\\f \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02J\\x04\\b\\x04\\x10\\x05J\\x04\\b\\x05\\x10\\x06J\\x04\\b\\x06\\x10\\aJ\\x04\\b\\b\\x10\\tJ\\x04\\b\\t\\x10\\n\" +\n\t\"\\\"\\xa1\\r\\n\" +\n\t\"\\fFieldOptions\\x12A\\n\" +\n\t\"\\x05ctype\\x18\\x01 \\x01(\\x0e2#.google.protobuf.FieldOptions.CType:\\x06STRINGR\\x05ctype\\x12\\x16\\n\" +\n\t\"\\x06packed\\x18\\x02 \\x01(\\bR\\x06packed\\x12G\\n\" +\n\t\"\\x06jstype\\x18\\x06 \\x01(\\x0e2$.google.protobuf.FieldOptions.JSType:\\tJS_NORMALR\\x06jstype\\x12\\x19\\n\" +\n\t\"\\x04lazy\\x18\\x05 \\x01(\\b:\\x05falseR\\x04lazy\\x12.\\n\" +\n\t\"\\x0funverified_lazy\\x18\\x0f \\x01(\\b:\\x05falseR\\x0eunverifiedLazy\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18\\x03 \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12\\x1d\\n\" +\n\t\"\\x04weak\\x18\\n\" +\n\t\" \\x01(\\b:\\x05falseB\\x02\\x18\\x01R\\x04weak\\x12(\\n\" +\n\t\"\\fdebug_redact\\x18\\x10 \\x01(\\b:\\x05falseR\\vdebugRedact\\x12K\\n\" +\n\t\"\\tretention\\x18\\x11 \\x01(\\x0e2-.google.protobuf.FieldOptions.OptionRetentionR\\tretention\\x12H\\n\" +\n\t\"\\atargets\\x18\\x13 \\x03(\\x0e2..google.protobuf.FieldOptions.OptionTargetTypeR\\atargets\\x12W\\n\" +\n\t\"\\x10edition_defaults\\x18\\x14 \\x03(\\v2,.google.protobuf.FieldOptions.EditionDefaultR\\x0feditionDefaults\\x127\\n\" +\n\t\"\\bfeatures\\x18\\x15 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12U\\n\" +\n\t\"\\x0ffeature_support\\x18\\x16 \\x01(\\v2,.google.protobuf.FieldOptions.FeatureSupportR\\x0efeatureSupport\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption\\x1aZ\\n\" +\n\t\"\\x0eEditionDefault\\x122\\n\" +\n\t\"\\aedition\\x18\\x03 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\aedition\\x12\\x14\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\tR\\x05value\\x1a\\x96\\x02\\n\" +\n\t\"\\x0eFeatureSupport\\x12G\\n\" +\n\t\"\\x12edition_introduced\\x18\\x01 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\x11editionIntroduced\\x12G\\n\" +\n\t\"\\x12edition_deprecated\\x18\\x02 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\x11editionDeprecated\\x12/\\n\" +\n\t\"\\x13deprecation_warning\\x18\\x03 \\x01(\\tR\\x12deprecationWarning\\x12A\\n\" +\n\t\"\\x0fedition_removed\\x18\\x04 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\x0eeditionRemoved\\\"/\\n\" +\n\t\"\\x05CType\\x12\\n\" +\n\t\"\\n\" +\n\t\"\\x06STRING\\x10\\x00\\x12\\b\\n\" +\n\t\"\\x04CORD\\x10\\x01\\x12\\x10\\n\" +\n\t\"\\fSTRING_PIECE\\x10\\x02\\\"5\\n\" +\n\t\"\\x06JSType\\x12\\r\\n\" +\n\t\"\\tJS_NORMAL\\x10\\x00\\x12\\r\\n\" +\n\t\"\\tJS_STRING\\x10\\x01\\x12\\r\\n\" +\n\t\"\\tJS_NUMBER\\x10\\x02\\\"U\\n\" +\n\t\"\\x0fOptionRetention\\x12\\x15\\n\" +\n\t\"\\x11RETENTION_UNKNOWN\\x10\\x00\\x12\\x15\\n\" +\n\t\"\\x11RETENTION_RUNTIME\\x10\\x01\\x12\\x14\\n\" +\n\t\"\\x10RETENTION_SOURCE\\x10\\x02\\\"\\x8c\\x02\\n\" +\n\t\"\\x10OptionTargetType\\x12\\x17\\n\" +\n\t\"\\x13TARGET_TYPE_UNKNOWN\\x10\\x00\\x12\\x14\\n\" +\n\t\"\\x10TARGET_TYPE_FILE\\x10\\x01\\x12\\x1f\\n\" +\n\t\"\\x1bTARGET_TYPE_EXTENSION_RANGE\\x10\\x02\\x12\\x17\\n\" +\n\t\"\\x13TARGET_TYPE_MESSAGE\\x10\\x03\\x12\\x15\\n\" +\n\t\"\\x11TARGET_TYPE_FIELD\\x10\\x04\\x12\\x15\\n\" +\n\t\"\\x11TARGET_TYPE_ONEOF\\x10\\x05\\x12\\x14\\n\" +\n\t\"\\x10TARGET_TYPE_ENUM\\x10\\x06\\x12\\x1a\\n\" +\n\t\"\\x16TARGET_TYPE_ENUM_ENTRY\\x10\\a\\x12\\x17\\n\" +\n\t\"\\x13TARGET_TYPE_SERVICE\\x10\\b\\x12\\x16\\n\" +\n\t\"\\x12TARGET_TYPE_METHOD\\x10\\t*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02J\\x04\\b\\x04\\x10\\x05J\\x04\\b\\x12\\x10\\x13\\\"\\xac\\x01\\n\" +\n\t\"\\fOneofOptions\\x127\\n\" +\n\t\"\\bfeatures\\x18\\x01 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\xd1\\x02\\n\" +\n\t\"\\vEnumOptions\\x12\\x1f\\n\" +\n\t\"\\vallow_alias\\x18\\x02 \\x01(\\bR\\n\" +\n\t\"allowAlias\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18\\x03 \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12V\\n\" +\n\t\"&deprecated_legacy_json_field_conflicts\\x18\\x06 \\x01(\\bB\\x02\\x18\\x01R\\\"deprecatedLegacyJsonFieldConflicts\\x127\\n\" +\n\t\"\\bfeatures\\x18\\a \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02J\\x04\\b\\x05\\x10\\x06\\\"\\xd8\\x02\\n\" +\n\t\"\\x10EnumValueOptions\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18\\x01 \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x127\\n\" +\n\t\"\\bfeatures\\x18\\x02 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12(\\n\" +\n\t\"\\fdebug_redact\\x18\\x03 \\x01(\\b:\\x05falseR\\vdebugRedact\\x12U\\n\" +\n\t\"\\x0ffeature_support\\x18\\x04 \\x01(\\v2,.google.protobuf.FieldOptions.FeatureSupportR\\x0efeatureSupport\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\xd5\\x01\\n\" +\n\t\"\\x0eServiceOptions\\x127\\n\" +\n\t\"\\bfeatures\\x18\\\" \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18! \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\x99\\x03\\n\" +\n\t\"\\rMethodOptions\\x12%\\n\" +\n\t\"\\n\" +\n\t\"deprecated\\x18! \\x01(\\b:\\x05falseR\\n\" +\n\t\"deprecated\\x12q\\n\" +\n\t\"\\x11idempotency_level\\x18\\\" \\x01(\\x0e2/.google.protobuf.MethodOptions.IdempotencyLevel:\\x13IDEMPOTENCY_UNKNOWNR\\x10idempotencyLevel\\x127\\n\" +\n\t\"\\bfeatures\\x18# \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\bfeatures\\x12X\\n\" +\n\t\"\\x14uninterpreted_option\\x18\\xe7\\a \\x03(\\v2$.google.protobuf.UninterpretedOptionR\\x13uninterpretedOption\\\"P\\n\" +\n\t\"\\x10IdempotencyLevel\\x12\\x17\\n\" +\n\t\"\\x13IDEMPOTENCY_UNKNOWN\\x10\\x00\\x12\\x13\\n\" +\n\t\"\\x0fNO_SIDE_EFFECTS\\x10\\x01\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"IDEMPOTENT\\x10\\x02*\\t\\b\\xe8\\a\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\x9a\\x03\\n\" +\n\t\"\\x13UninterpretedOption\\x12A\\n\" +\n\t\"\\x04name\\x18\\x02 \\x03(\\v2-.google.protobuf.UninterpretedOption.NamePartR\\x04name\\x12)\\n\" +\n\t\"\\x10identifier_value\\x18\\x03 \\x01(\\tR\\x0fidentifierValue\\x12,\\n\" +\n\t\"\\x12positive_int_value\\x18\\x04 \\x01(\\x04R\\x10positiveIntValue\\x12,\\n\" +\n\t\"\\x12negative_int_value\\x18\\x05 \\x01(\\x03R\\x10negativeIntValue\\x12!\\n\" +\n\t\"\\fdouble_value\\x18\\x06 \\x01(\\x01R\\vdoubleValue\\x12!\\n\" +\n\t\"\\fstring_value\\x18\\a \\x01(\\fR\\vstringValue\\x12'\\n\" +\n\t\"\\x0faggregate_value\\x18\\b \\x01(\\tR\\x0eaggregateValue\\x1aJ\\n\" +\n\t\"\\bNamePart\\x12\\x1b\\n\" +\n\t\"\\tname_part\\x18\\x01 \\x02(\\tR\\bnamePart\\x12!\\n\" +\n\t\"\\fis_extension\\x18\\x02 \\x02(\\bR\\visExtension\\\"\\x8e\\x0f\\n\" +\n\t\"\\n\" +\n\t\"FeatureSet\\x12\\x91\\x01\\n\" +\n\t\"\\x0efield_presence\\x18\\x01 \\x01(\\x0e2).google.protobuf.FeatureSet.FieldPresenceB?\\x88\\x01\\x01\\x98\\x01\\x04\\x98\\x01\\x01\\xa2\\x01\\r\\x12\\bEXPLICIT\\x18\\x84\\a\\xa2\\x01\\r\\x12\\bIMPLICIT\\x18\\xe7\\a\\xa2\\x01\\r\\x12\\bEXPLICIT\\x18\\xe8\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\rfieldPresence\\x12l\\n\" +\n\t\"\\tenum_type\\x18\\x02 \\x01(\\x0e2$.google.protobuf.FeatureSet.EnumTypeB)\\x88\\x01\\x01\\x98\\x01\\x06\\x98\\x01\\x01\\xa2\\x01\\v\\x12\\x06CLOSED\\x18\\x84\\a\\xa2\\x01\\t\\x12\\x04OPEN\\x18\\xe7\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\benumType\\x12\\x98\\x01\\n\" +\n\t\"\\x17repeated_field_encoding\\x18\\x03 \\x01(\\x0e21.google.protobuf.FeatureSet.RepeatedFieldEncodingB-\\x88\\x01\\x01\\x98\\x01\\x04\\x98\\x01\\x01\\xa2\\x01\\r\\x12\\bEXPANDED\\x18\\x84\\a\\xa2\\x01\\v\\x12\\x06PACKED\\x18\\xe7\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\x15repeatedFieldEncoding\\x12~\\n\" +\n\t\"\\x0futf8_validation\\x18\\x04 \\x01(\\x0e2*.google.protobuf.FeatureSet.Utf8ValidationB)\\x88\\x01\\x01\\x98\\x01\\x04\\x98\\x01\\x01\\xa2\\x01\\t\\x12\\x04NONE\\x18\\x84\\a\\xa2\\x01\\v\\x12\\x06VERIFY\\x18\\xe7\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\x0eutf8Validation\\x12~\\n\" +\n\t\"\\x10message_encoding\\x18\\x05 \\x01(\\x0e2+.google.protobuf.FeatureSet.MessageEncodingB&\\x88\\x01\\x01\\x98\\x01\\x04\\x98\\x01\\x01\\xa2\\x01\\x14\\x12\\x0fLENGTH_PREFIXED\\x18\\x84\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\x0fmessageEncoding\\x12\\x82\\x01\\n\" +\n\t\"\\vjson_format\\x18\\x06 \\x01(\\x0e2&.google.protobuf.FeatureSet.JsonFormatB9\\x88\\x01\\x01\\x98\\x01\\x03\\x98\\x01\\x06\\x98\\x01\\x01\\xa2\\x01\\x17\\x12\\x12LEGACY_BEST_EFFORT\\x18\\x84\\a\\xa2\\x01\\n\" +\n\t\"\\x12\\x05ALLOW\\x18\\xe7\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\n\" +\n\t\"jsonFormat\\x12\\xab\\x01\\n\" +\n\t\"\\x14enforce_naming_style\\x18\\a \\x01(\\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\\x88\\x01\\x02\\x98\\x01\\x01\\x98\\x01\\x02\\x98\\x01\\x03\\x98\\x01\\x04\\x98\\x01\\x05\\x98\\x01\\x06\\x98\\x01\\a\\x98\\x01\\b\\x98\\x01\\t\\xa2\\x01\\x11\\x12\\fSTYLE_LEGACY\\x18\\x84\\a\\xa2\\x01\\x0e\\x12\\tSTYLE2024\\x18\\xe9\\a\\xb2\\x01\\x03\\b\\xe9\\aR\\x12enforceNamingStyle\\x12\\xb9\\x01\\n\" +\n\t\"\\x19default_symbol_visibility\\x18\\b \\x01(\\x0e2E.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\\x88\\x01\\x02\\x98\\x01\\x01\\xa2\\x01\\x0f\\x12\\n\" +\n\t\"EXPORT_ALL\\x18\\x84\\a\\xa2\\x01\\x15\\x12\\x10EXPORT_TOP_LEVEL\\x18\\xe9\\a\\xb2\\x01\\x03\\b\\xe9\\aR\\x17defaultSymbolVisibility\\x1a\\xa1\\x01\\n\" +\n\t\"\\x11VisibilityFeature\\\"\\x81\\x01\\n\" +\n\t\"\\x17DefaultSymbolVisibility\\x12%\\n\" +\n\t\"!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\\x10\\x00\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"EXPORT_ALL\\x10\\x01\\x12\\x14\\n\" +\n\t\"\\x10EXPORT_TOP_LEVEL\\x10\\x02\\x12\\r\\n\" +\n\t\"\\tLOCAL_ALL\\x10\\x03\\x12\\n\" +\n\t\"\\n\" +\n\t\"\\x06STRICT\\x10\\x04J\\b\\b\\x01\\x10\\x80\\x80\\x80\\x80\\x02\\\"\\\\\\n\" +\n\t\"\\rFieldPresence\\x12\\x1a\\n\" +\n\t\"\\x16FIELD_PRESENCE_UNKNOWN\\x10\\x00\\x12\\f\\n\" +\n\t\"\\bEXPLICIT\\x10\\x01\\x12\\f\\n\" +\n\t\"\\bIMPLICIT\\x10\\x02\\x12\\x13\\n\" +\n\t\"\\x0fLEGACY_REQUIRED\\x10\\x03\\\"7\\n\" +\n\t\"\\bEnumType\\x12\\x15\\n\" +\n\t\"\\x11ENUM_TYPE_UNKNOWN\\x10\\x00\\x12\\b\\n\" +\n\t\"\\x04OPEN\\x10\\x01\\x12\\n\" +\n\t\"\\n\" +\n\t\"\\x06CLOSED\\x10\\x02\\\"V\\n\" +\n\t\"\\x15RepeatedFieldEncoding\\x12#\\n\" +\n\t\"\\x1fREPEATED_FIELD_ENCODING_UNKNOWN\\x10\\x00\\x12\\n\" +\n\t\"\\n\" +\n\t\"\\x06PACKED\\x10\\x01\\x12\\f\\n\" +\n\t\"\\bEXPANDED\\x10\\x02\\\"I\\n\" +\n\t\"\\x0eUtf8Validation\\x12\\x1b\\n\" +\n\t\"\\x17UTF8_VALIDATION_UNKNOWN\\x10\\x00\\x12\\n\" +\n\t\"\\n\" +\n\t\"\\x06VERIFY\\x10\\x02\\x12\\b\\n\" +\n\t\"\\x04NONE\\x10\\x03\\\"\\x04\\b\\x01\\x10\\x01\\\"S\\n\" +\n\t\"\\x0fMessageEncoding\\x12\\x1c\\n\" +\n\t\"\\x18MESSAGE_ENCODING_UNKNOWN\\x10\\x00\\x12\\x13\\n\" +\n\t\"\\x0fLENGTH_PREFIXED\\x10\\x01\\x12\\r\\n\" +\n\t\"\\tDELIMITED\\x10\\x02\\\"H\\n\" +\n\t\"\\n\" +\n\t\"JsonFormat\\x12\\x17\\n\" +\n\t\"\\x13JSON_FORMAT_UNKNOWN\\x10\\x00\\x12\\t\\n\" +\n\t\"\\x05ALLOW\\x10\\x01\\x12\\x16\\n\" +\n\t\"\\x12LEGACY_BEST_EFFORT\\x10\\x02\\\"W\\n\" +\n\t\"\\x12EnforceNamingStyle\\x12 \\n\" +\n\t\"\\x1cENFORCE_NAMING_STYLE_UNKNOWN\\x10\\x00\\x12\\r\\n\" +\n\t\"\\tSTYLE2024\\x10\\x01\\x12\\x10\\n\" +\n\t\"\\fSTYLE_LEGACY\\x10\\x02*\\x06\\b\\xe8\\a\\x10\\x8bN*\\x06\\b\\x8bN\\x10\\x90N*\\x06\\b\\x90N\\x10\\x91NJ\\x06\\b\\xe7\\a\\x10\\xe8\\a\\\"\\xef\\x03\\n\" +\n\t\"\\x12FeatureSetDefaults\\x12X\\n\" +\n\t\"\\bdefaults\\x18\\x01 \\x03(\\v2<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefaultR\\bdefaults\\x12A\\n\" +\n\t\"\\x0fminimum_edition\\x18\\x04 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\x0eminimumEdition\\x12A\\n\" +\n\t\"\\x0fmaximum_edition\\x18\\x05 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\x0emaximumEdition\\x1a\\xf8\\x01\\n\" +\n\t\"\\x18FeatureSetEditionDefault\\x122\\n\" +\n\t\"\\aedition\\x18\\x03 \\x01(\\x0e2\\x18.google.protobuf.EditionR\\aedition\\x12N\\n\" +\n\t\"\\x14overridable_features\\x18\\x04 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\x13overridableFeatures\\x12B\\n\" +\n\t\"\\x0efixed_features\\x18\\x05 \\x01(\\v2\\x1b.google.protobuf.FeatureSetR\\rfixedFeaturesJ\\x04\\b\\x01\\x10\\x02J\\x04\\b\\x02\\x10\\x03R\\bfeatures\\\"\\xb5\\x02\\n\" +\n\t\"\\x0eSourceCodeInfo\\x12D\\n\" +\n\t\"\\blocation\\x18\\x01 \\x03(\\v2(.google.protobuf.SourceCodeInfo.LocationR\\blocation\\x1a\\xce\\x01\\n\" +\n\t\"\\bLocation\\x12\\x16\\n\" +\n\t\"\\x04path\\x18\\x01 \\x03(\\x05B\\x02\\x10\\x01R\\x04path\\x12\\x16\\n\" +\n\t\"\\x04span\\x18\\x02 \\x03(\\x05B\\x02\\x10\\x01R\\x04span\\x12)\\n\" +\n\t\"\\x10leading_comments\\x18\\x03 \\x01(\\tR\\x0fleadingComments\\x12+\\n\" +\n\t\"\\x11trailing_comments\\x18\\x04 \\x01(\\tR\\x10trailingComments\\x12:\\n\" +\n\t\"\\x19leading_detached_comments\\x18\\x06 \\x03(\\tR\\x17leadingDetachedComments*\\f\\b\\x80\\xec\\xca\\xff\\x01\\x10\\x81\\xec\\xca\\xff\\x01\\\"\\xd0\\x02\\n\" +\n\t\"\\x11GeneratedCodeInfo\\x12M\\n\" +\n\t\"\\n\" +\n\t\"annotation\\x18\\x01 \\x03(\\v2-.google.protobuf.GeneratedCodeInfo.AnnotationR\\n\" +\n\t\"annotation\\x1a\\xeb\\x01\\n\" +\n\t\"\\n\" +\n\t\"Annotation\\x12\\x16\\n\" +\n\t\"\\x04path\\x18\\x01 \\x03(\\x05B\\x02\\x10\\x01R\\x04path\\x12\\x1f\\n\" +\n\t\"\\vsource_file\\x18\\x02 \\x01(\\tR\\n\" +\n\t\"sourceFile\\x12\\x14\\n\" +\n\t\"\\x05begin\\x18\\x03 \\x01(\\x05R\\x05begin\\x12\\x10\\n\" +\n\t\"\\x03end\\x18\\x04 \\x01(\\x05R\\x03end\\x12R\\n\" +\n\t\"\\bsemantic\\x18\\x05 \\x01(\\x0e26.google.protobuf.GeneratedCodeInfo.Annotation.SemanticR\\bsemantic\\\"(\\n\" +\n\t\"\\bSemantic\\x12\\b\\n\" +\n\t\"\\x04NONE\\x10\\x00\\x12\\a\\n\" +\n\t\"\\x03SET\\x10\\x01\\x12\\t\\n\" +\n\t\"\\x05ALIAS\\x10\\x02*\\xbe\\x02\\n\" +\n\t\"\\aEdition\\x12\\x13\\n\" +\n\t\"\\x0fEDITION_UNKNOWN\\x10\\x00\\x12\\x13\\n\" +\n\t\"\\x0eEDITION_LEGACY\\x10\\x84\\a\\x12\\x13\\n\" +\n\t\"\\x0eEDITION_PROTO2\\x10\\xe6\\a\\x12\\x13\\n\" +\n\t\"\\x0eEDITION_PROTO3\\x10\\xe7\\a\\x12\\x11\\n\" +\n\t\"\\fEDITION_2023\\x10\\xe8\\a\\x12\\x11\\n\" +\n\t\"\\fEDITION_2024\\x10\\xe9\\a\\x12\\x15\\n\" +\n\t\"\\x10EDITION_UNSTABLE\\x10\\x8fN\\x12\\x17\\n\" +\n\t\"\\x13EDITION_1_TEST_ONLY\\x10\\x01\\x12\\x17\\n\" +\n\t\"\\x13EDITION_2_TEST_ONLY\\x10\\x02\\x12\\x1d\\n\" +\n\t\"\\x17EDITION_99997_TEST_ONLY\\x10\\x9d\\x8d\\x06\\x12\\x1d\\n\" +\n\t\"\\x17EDITION_99998_TEST_ONLY\\x10\\x9e\\x8d\\x06\\x12\\x1d\\n\" +\n\t\"\\x17EDITION_99999_TEST_ONLY\\x10\\x9f\\x8d\\x06\\x12\\x13\\n\" +\n\t\"\\vEDITION_MAX\\x10\\xff\\xff\\xff\\xff\\a*U\\n\" +\n\t\"\\x10SymbolVisibility\\x12\\x14\\n\" +\n\t\"\\x10VISIBILITY_UNSET\\x10\\x00\\x12\\x14\\n\" +\n\t\"\\x10VISIBILITY_LOCAL\\x10\\x01\\x12\\x15\\n\" +\n\t\"\\x11VISIBILITY_EXPORT\\x10\\x02B~\\n\" +\n\t\"\\x13com.google.protobufB\\x10DescriptorProtosH\\x01Z-google.golang.org/protobuf/types/descriptorpb\\xf8\\x01\\x01\\xa2\\x02\\x03GPB\\xaa\\x02\\x1aGoogle.Protobuf.Reflection\"\n\nvar (\n\tfile_google_protobuf_descriptor_proto_rawDescOnce sync.Once\n\tfile_google_protobuf_descriptor_proto_rawDescData []byte\n)\n\nfunc file_google_protobuf_descriptor_proto_rawDescGZIP() []byte {\n\tfile_google_protobuf_descriptor_proto_rawDescOnce.Do(func() {\n\t\tfile_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)))\n\t})\n\treturn file_google_protobuf_descriptor_proto_rawDescData\n}\n\nvar file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 20)\nvar file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 34)\nvar file_google_protobuf_descriptor_proto_goTypes = []any{\n\t(Edition)(0),          // 0: google.protobuf.Edition\n\t(SymbolVisibility)(0), // 1: google.protobuf.SymbolVisibility\n\t(ExtensionRangeOptions_VerificationState)(0),              // 2: google.protobuf.ExtensionRangeOptions.VerificationState\n\t(FieldDescriptorProto_Type)(0),                            // 3: google.protobuf.FieldDescriptorProto.Type\n\t(FieldDescriptorProto_Label)(0),                           // 4: google.protobuf.FieldDescriptorProto.Label\n\t(FileOptions_OptimizeMode)(0),                             // 5: google.protobuf.FileOptions.OptimizeMode\n\t(FieldOptions_CType)(0),                                   // 6: google.protobuf.FieldOptions.CType\n\t(FieldOptions_JSType)(0),                                  // 7: google.protobuf.FieldOptions.JSType\n\t(FieldOptions_OptionRetention)(0),                         // 8: google.protobuf.FieldOptions.OptionRetention\n\t(FieldOptions_OptionTargetType)(0),                        // 9: google.protobuf.FieldOptions.OptionTargetType\n\t(MethodOptions_IdempotencyLevel)(0),                       // 10: google.protobuf.MethodOptions.IdempotencyLevel\n\t(FeatureSet_FieldPresence)(0),                             // 11: google.protobuf.FeatureSet.FieldPresence\n\t(FeatureSet_EnumType)(0),                                  // 12: google.protobuf.FeatureSet.EnumType\n\t(FeatureSet_RepeatedFieldEncoding)(0),                     // 13: google.protobuf.FeatureSet.RepeatedFieldEncoding\n\t(FeatureSet_Utf8Validation)(0),                            // 14: google.protobuf.FeatureSet.Utf8Validation\n\t(FeatureSet_MessageEncoding)(0),                           // 15: google.protobuf.FeatureSet.MessageEncoding\n\t(FeatureSet_JsonFormat)(0),                                // 16: google.protobuf.FeatureSet.JsonFormat\n\t(FeatureSet_EnforceNamingStyle)(0),                        // 17: google.protobuf.FeatureSet.EnforceNamingStyle\n\t(FeatureSet_VisibilityFeature_DefaultSymbolVisibility)(0), // 18: google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility\n\t(GeneratedCodeInfo_Annotation_Semantic)(0),                // 19: google.protobuf.GeneratedCodeInfo.Annotation.Semantic\n\t(*FileDescriptorSet)(nil),                                 // 20: google.protobuf.FileDescriptorSet\n\t(*FileDescriptorProto)(nil),                               // 21: google.protobuf.FileDescriptorProto\n\t(*DescriptorProto)(nil),                                   // 22: google.protobuf.DescriptorProto\n\t(*ExtensionRangeOptions)(nil),                             // 23: google.protobuf.ExtensionRangeOptions\n\t(*FieldDescriptorProto)(nil),                              // 24: google.protobuf.FieldDescriptorProto\n\t(*OneofDescriptorProto)(nil),                              // 25: google.protobuf.OneofDescriptorProto\n\t(*EnumDescriptorProto)(nil),                               // 26: google.protobuf.EnumDescriptorProto\n\t(*EnumValueDescriptorProto)(nil),                          // 27: google.protobuf.EnumValueDescriptorProto\n\t(*ServiceDescriptorProto)(nil),                            // 28: google.protobuf.ServiceDescriptorProto\n\t(*MethodDescriptorProto)(nil),                             // 29: google.protobuf.MethodDescriptorProto\n\t(*FileOptions)(nil),                                       // 30: google.protobuf.FileOptions\n\t(*MessageOptions)(nil),                                    // 31: google.protobuf.MessageOptions\n\t(*FieldOptions)(nil),                                      // 32: google.protobuf.FieldOptions\n\t(*OneofOptions)(nil),                                      // 33: google.protobuf.OneofOptions\n\t(*EnumOptions)(nil),                                       // 34: google.protobuf.EnumOptions\n\t(*EnumValueOptions)(nil),                                  // 35: google.protobuf.EnumValueOptions\n\t(*ServiceOptions)(nil),                                    // 36: google.protobuf.ServiceOptions\n\t(*MethodOptions)(nil),                                     // 37: google.protobuf.MethodOptions\n\t(*UninterpretedOption)(nil),                               // 38: google.protobuf.UninterpretedOption\n\t(*FeatureSet)(nil),                                        // 39: google.protobuf.FeatureSet\n\t(*FeatureSetDefaults)(nil),                                // 40: google.protobuf.FeatureSetDefaults\n\t(*SourceCodeInfo)(nil),                                    // 41: google.protobuf.SourceCodeInfo\n\t(*GeneratedCodeInfo)(nil),                                 // 42: google.protobuf.GeneratedCodeInfo\n\t(*DescriptorProto_ExtensionRange)(nil),                    // 43: google.protobuf.DescriptorProto.ExtensionRange\n\t(*DescriptorProto_ReservedRange)(nil),                     // 44: google.protobuf.DescriptorProto.ReservedRange\n\t(*ExtensionRangeOptions_Declaration)(nil),                 // 45: google.protobuf.ExtensionRangeOptions.Declaration\n\t(*EnumDescriptorProto_EnumReservedRange)(nil),             // 46: google.protobuf.EnumDescriptorProto.EnumReservedRange\n\t(*FieldOptions_EditionDefault)(nil),                       // 47: google.protobuf.FieldOptions.EditionDefault\n\t(*FieldOptions_FeatureSupport)(nil),                       // 48: google.protobuf.FieldOptions.FeatureSupport\n\t(*UninterpretedOption_NamePart)(nil),                      // 49: google.protobuf.UninterpretedOption.NamePart\n\t(*FeatureSet_VisibilityFeature)(nil),                      // 50: google.protobuf.FeatureSet.VisibilityFeature\n\t(*FeatureSetDefaults_FeatureSetEditionDefault)(nil),       // 51: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\n\t(*SourceCodeInfo_Location)(nil),                           // 52: google.protobuf.SourceCodeInfo.Location\n\t(*GeneratedCodeInfo_Annotation)(nil),                      // 53: google.protobuf.GeneratedCodeInfo.Annotation\n}\nvar file_google_protobuf_descriptor_proto_depIdxs = []int32{\n\t21, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto\n\t22, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto\n\t26, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto\n\t28, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto\n\t24, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto\n\t30, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions\n\t41, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo\n\t0,  // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition\n\t24, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto\n\t24, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto\n\t22, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto\n\t26, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto\n\t43, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange\n\t25, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto\n\t31, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions\n\t44, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange\n\t1,  // 16: google.protobuf.DescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility\n\t38, // 17: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t45, // 18: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration\n\t39, // 19: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet\n\t2,  // 20: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState\n\t4,  // 21: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label\n\t3,  // 22: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type\n\t32, // 23: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions\n\t33, // 24: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions\n\t27, // 25: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto\n\t34, // 26: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions\n\t46, // 27: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange\n\t1,  // 28: google.protobuf.EnumDescriptorProto.visibility:type_name -> google.protobuf.SymbolVisibility\n\t35, // 29: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions\n\t29, // 30: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto\n\t36, // 31: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions\n\t37, // 32: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions\n\t5,  // 33: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode\n\t39, // 34: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 35: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t39, // 36: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 37: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t6,  // 38: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType\n\t7,  // 39: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType\n\t8,  // 40: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention\n\t9,  // 41: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType\n\t47, // 42: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault\n\t39, // 43: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet\n\t48, // 44: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport\n\t38, // 45: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t39, // 46: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 47: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t39, // 48: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 49: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t39, // 50: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet\n\t48, // 51: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport\n\t38, // 52: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t39, // 53: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 54: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t10, // 55: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel\n\t39, // 56: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet\n\t38, // 57: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption\n\t49, // 58: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart\n\t11, // 59: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence\n\t12, // 60: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType\n\t13, // 61: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding\n\t14, // 62: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation\n\t15, // 63: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding\n\t16, // 64: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat\n\t17, // 65: google.protobuf.FeatureSet.enforce_naming_style:type_name -> google.protobuf.FeatureSet.EnforceNamingStyle\n\t18, // 66: google.protobuf.FeatureSet.default_symbol_visibility:type_name -> google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility\n\t51, // 67: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\n\t0,  // 68: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition\n\t0,  // 69: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition\n\t52, // 70: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location\n\t53, // 71: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation\n\t23, // 72: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions\n\t0,  // 73: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition\n\t0,  // 74: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition\n\t0,  // 75: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition\n\t0,  // 76: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition\n\t0,  // 77: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition\n\t39, // 78: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet\n\t39, // 79: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet\n\t19, // 80: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic\n\t81, // [81:81] is the sub-list for method output_type\n\t81, // [81:81] is the sub-list for method input_type\n\t81, // [81:81] is the sub-list for extension type_name\n\t81, // [81:81] is the sub-list for extension extendee\n\t0,  // [0:81] is the sub-list for field type_name\n}\n\nfunc init() { file_google_protobuf_descriptor_proto_init() }\nfunc file_google_protobuf_descriptor_proto_init() {\n\tif File_google_protobuf_descriptor_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)),\n\t\t\tNumEnums:      20,\n\t\t\tNumMessages:   34,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_protobuf_descriptor_proto_goTypes,\n\t\tDependencyIndexes: file_google_protobuf_descriptor_proto_depIdxs,\n\t\tEnumInfos:         file_google_protobuf_descriptor_proto_enumTypes,\n\t\tMessageInfos:      file_google_protobuf_descriptor_proto_msgTypes,\n\t}.Build()\n\tFile_google_protobuf_descriptor_proto = out.File\n\tfile_google_protobuf_descriptor_proto_goTypes = nil\n\tfile_google_protobuf_descriptor_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2023 Google Inc.  All rights reserved.\n//\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file or at\n// https://developers.google.com/open-source/licenses/bsd\n\n// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/go_features.proto\n\npackage gofeaturespb\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tdescriptorpb \"google.golang.org/protobuf/types/descriptorpb\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\ntype GoFeatures_APILevel int32\n\nconst (\n\t// API_LEVEL_UNSPECIFIED results in selecting the OPEN API,\n\t// but needs to be a separate value to distinguish between\n\t// an explicitly set api level or a missing api level.\n\tGoFeatures_API_LEVEL_UNSPECIFIED GoFeatures_APILevel = 0\n\tGoFeatures_API_OPEN              GoFeatures_APILevel = 1\n\tGoFeatures_API_HYBRID            GoFeatures_APILevel = 2\n\tGoFeatures_API_OPAQUE            GoFeatures_APILevel = 3\n)\n\n// Enum value maps for GoFeatures_APILevel.\nvar (\n\tGoFeatures_APILevel_name = map[int32]string{\n\t\t0: \"API_LEVEL_UNSPECIFIED\",\n\t\t1: \"API_OPEN\",\n\t\t2: \"API_HYBRID\",\n\t\t3: \"API_OPAQUE\",\n\t}\n\tGoFeatures_APILevel_value = map[string]int32{\n\t\t\"API_LEVEL_UNSPECIFIED\": 0,\n\t\t\"API_OPEN\":              1,\n\t\t\"API_HYBRID\":            2,\n\t\t\"API_OPAQUE\":            3,\n\t}\n)\n\nfunc (x GoFeatures_APILevel) Enum() *GoFeatures_APILevel {\n\tp := new(GoFeatures_APILevel)\n\t*p = x\n\treturn p\n}\n\nfunc (x GoFeatures_APILevel) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (GoFeatures_APILevel) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_go_features_proto_enumTypes[0].Descriptor()\n}\n\nfunc (GoFeatures_APILevel) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_go_features_proto_enumTypes[0]\n}\n\nfunc (x GoFeatures_APILevel) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *GoFeatures_APILevel) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = GoFeatures_APILevel(num)\n\treturn nil\n}\n\n// Deprecated: Use GoFeatures_APILevel.Descriptor instead.\nfunc (GoFeatures_APILevel) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 0}\n}\n\ntype GoFeatures_StripEnumPrefix int32\n\nconst (\n\tGoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED   GoFeatures_StripEnumPrefix = 0\n\tGoFeatures_STRIP_ENUM_PREFIX_KEEP          GoFeatures_StripEnumPrefix = 1\n\tGoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH GoFeatures_StripEnumPrefix = 2\n\tGoFeatures_STRIP_ENUM_PREFIX_STRIP         GoFeatures_StripEnumPrefix = 3\n)\n\n// Enum value maps for GoFeatures_StripEnumPrefix.\nvar (\n\tGoFeatures_StripEnumPrefix_name = map[int32]string{\n\t\t0: \"STRIP_ENUM_PREFIX_UNSPECIFIED\",\n\t\t1: \"STRIP_ENUM_PREFIX_KEEP\",\n\t\t2: \"STRIP_ENUM_PREFIX_GENERATE_BOTH\",\n\t\t3: \"STRIP_ENUM_PREFIX_STRIP\",\n\t}\n\tGoFeatures_StripEnumPrefix_value = map[string]int32{\n\t\t\"STRIP_ENUM_PREFIX_UNSPECIFIED\":   0,\n\t\t\"STRIP_ENUM_PREFIX_KEEP\":          1,\n\t\t\"STRIP_ENUM_PREFIX_GENERATE_BOTH\": 2,\n\t\t\"STRIP_ENUM_PREFIX_STRIP\":         3,\n\t}\n)\n\nfunc (x GoFeatures_StripEnumPrefix) Enum() *GoFeatures_StripEnumPrefix {\n\tp := new(GoFeatures_StripEnumPrefix)\n\t*p = x\n\treturn p\n}\n\nfunc (x GoFeatures_StripEnumPrefix) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (GoFeatures_StripEnumPrefix) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_google_protobuf_go_features_proto_enumTypes[1].Descriptor()\n}\n\nfunc (GoFeatures_StripEnumPrefix) Type() protoreflect.EnumType {\n\treturn &file_google_protobuf_go_features_proto_enumTypes[1]\n}\n\nfunc (x GoFeatures_StripEnumPrefix) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Do not use.\nfunc (x *GoFeatures_StripEnumPrefix) UnmarshalJSON(b []byte) error {\n\tnum, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*x = GoFeatures_StripEnumPrefix(num)\n\treturn nil\n}\n\n// Deprecated: Use GoFeatures_StripEnumPrefix.Descriptor instead.\nfunc (GoFeatures_StripEnumPrefix) EnumDescriptor() ([]byte, []int) {\n\treturn file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0, 1}\n}\n\ntype GoFeatures struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Whether or not to generate the deprecated UnmarshalJSON method for enums.\n\t// Can only be true for proto using the Open Struct api.\n\tLegacyUnmarshalJsonEnum *bool `protobuf:\"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum\" json:\"legacy_unmarshal_json_enum,omitempty\"`\n\t// One of OPEN, HYBRID or OPAQUE.\n\tApiLevel        *GoFeatures_APILevel        `protobuf:\"varint,2,opt,name=api_level,json=apiLevel,enum=pb.GoFeatures_APILevel\" json:\"api_level,omitempty\"`\n\tStripEnumPrefix *GoFeatures_StripEnumPrefix `protobuf:\"varint,3,opt,name=strip_enum_prefix,json=stripEnumPrefix,enum=pb.GoFeatures_StripEnumPrefix\" json:\"strip_enum_prefix,omitempty\"`\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *GoFeatures) Reset() {\n\t*x = GoFeatures{}\n\tmi := &file_google_protobuf_go_features_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GoFeatures) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GoFeatures) ProtoMessage() {}\n\nfunc (x *GoFeatures) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_go_features_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead.\nfunc (*GoFeatures) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool {\n\tif x != nil && x.LegacyUnmarshalJsonEnum != nil {\n\t\treturn *x.LegacyUnmarshalJsonEnum\n\t}\n\treturn false\n}\n\nfunc (x *GoFeatures) GetApiLevel() GoFeatures_APILevel {\n\tif x != nil && x.ApiLevel != nil {\n\t\treturn *x.ApiLevel\n\t}\n\treturn GoFeatures_API_LEVEL_UNSPECIFIED\n}\n\nfunc (x *GoFeatures) GetStripEnumPrefix() GoFeatures_StripEnumPrefix {\n\tif x != nil && x.StripEnumPrefix != nil {\n\t\treturn *x.StripEnumPrefix\n\t}\n\treturn GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED\n}\n\nvar file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{\n\t{\n\t\tExtendedType:  (*descriptorpb.FeatureSet)(nil),\n\t\tExtensionType: (*GoFeatures)(nil),\n\t\tField:         1002,\n\t\tName:          \"pb.go\",\n\t\tTag:           \"bytes,1002,opt,name=go\",\n\t\tFilename:      \"google/protobuf/go_features.proto\",\n\t},\n}\n\n// Extension fields to descriptorpb.FeatureSet.\nvar (\n\t// optional pb.GoFeatures go = 1002;\n\tE_Go = &file_google_protobuf_go_features_proto_extTypes[0]\n)\n\nvar File_google_protobuf_go_features_proto protoreflect.FileDescriptor\n\nconst file_google_protobuf_go_features_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"!google/protobuf/go_features.proto\\x12\\x02pb\\x1a google/protobuf/descriptor.proto\\\"\\xab\\x05\\n\" +\n\t\"\\n\" +\n\t\"GoFeatures\\x12\\xbe\\x01\\n\" +\n\t\"\\x1alegacy_unmarshal_json_enum\\x18\\x01 \\x01(\\bB\\x80\\x01\\x88\\x01\\x01\\x98\\x01\\x06\\x98\\x01\\x01\\xa2\\x01\\t\\x12\\x04true\\x18\\x84\\a\\xa2\\x01\\n\" +\n\t\"\\x12\\x05false\\x18\\xe7\\a\\xb2\\x01[\\b\\xe8\\a\\x10\\xe8\\a\\x1aSThe legacy UnmarshalJSON API is deprecated and will be removed in a future edition.R\\x17legacyUnmarshalJsonEnum\\x12t\\n\" +\n\t\"\\tapi_level\\x18\\x02 \\x01(\\x0e2\\x17.pb.GoFeatures.APILevelB>\\x88\\x01\\x01\\x98\\x01\\x03\\x98\\x01\\x01\\xa2\\x01\\x1a\\x12\\x15API_LEVEL_UNSPECIFIED\\x18\\x84\\a\\xa2\\x01\\x0f\\x12\\n\" +\n\t\"API_OPAQUE\\x18\\xe9\\a\\xb2\\x01\\x03\\b\\xe8\\aR\\bapiLevel\\x12|\\n\" +\n\t\"\\x11strip_enum_prefix\\x18\\x03 \\x01(\\x0e2\\x1e.pb.GoFeatures.StripEnumPrefixB0\\x88\\x01\\x01\\x98\\x01\\x06\\x98\\x01\\a\\x98\\x01\\x01\\xa2\\x01\\x1b\\x12\\x16STRIP_ENUM_PREFIX_KEEP\\x18\\x84\\a\\xb2\\x01\\x03\\b\\xe9\\aR\\x0fstripEnumPrefix\\\"S\\n\" +\n\t\"\\bAPILevel\\x12\\x19\\n\" +\n\t\"\\x15API_LEVEL_UNSPECIFIED\\x10\\x00\\x12\\f\\n\" +\n\t\"\\bAPI_OPEN\\x10\\x01\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"API_HYBRID\\x10\\x02\\x12\\x0e\\n\" +\n\t\"\\n\" +\n\t\"API_OPAQUE\\x10\\x03\\\"\\x92\\x01\\n\" +\n\t\"\\x0fStripEnumPrefix\\x12!\\n\" +\n\t\"\\x1dSTRIP_ENUM_PREFIX_UNSPECIFIED\\x10\\x00\\x12\\x1a\\n\" +\n\t\"\\x16STRIP_ENUM_PREFIX_KEEP\\x10\\x01\\x12#\\n\" +\n\t\"\\x1fSTRIP_ENUM_PREFIX_GENERATE_BOTH\\x10\\x02\\x12\\x1b\\n\" +\n\t\"\\x17STRIP_ENUM_PREFIX_STRIP\\x10\\x03:<\\n\" +\n\t\"\\x02go\\x12\\x1b.google.protobuf.FeatureSet\\x18\\xea\\a \\x01(\\v2\\x0e.pb.GoFeaturesR\\x02goB/Z-google.golang.org/protobuf/types/gofeaturespb\"\n\nvar (\n\tfile_google_protobuf_go_features_proto_rawDescOnce sync.Once\n\tfile_google_protobuf_go_features_proto_rawDescData []byte\n)\n\nfunc file_google_protobuf_go_features_proto_rawDescGZIP() []byte {\n\tfile_google_protobuf_go_features_proto_rawDescOnce.Do(func() {\n\t\tfile_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc)))\n\t})\n\treturn file_google_protobuf_go_features_proto_rawDescData\n}\n\nvar file_google_protobuf_go_features_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_google_protobuf_go_features_proto_goTypes = []any{\n\t(GoFeatures_APILevel)(0),        // 0: pb.GoFeatures.APILevel\n\t(GoFeatures_StripEnumPrefix)(0), // 1: pb.GoFeatures.StripEnumPrefix\n\t(*GoFeatures)(nil),              // 2: pb.GoFeatures\n\t(*descriptorpb.FeatureSet)(nil), // 3: google.protobuf.FeatureSet\n}\nvar file_google_protobuf_go_features_proto_depIdxs = []int32{\n\t0, // 0: pb.GoFeatures.api_level:type_name -> pb.GoFeatures.APILevel\n\t1, // 1: pb.GoFeatures.strip_enum_prefix:type_name -> pb.GoFeatures.StripEnumPrefix\n\t3, // 2: pb.go:extendee -> google.protobuf.FeatureSet\n\t2, // 3: pb.go:type_name -> pb.GoFeatures\n\t4, // [4:4] is the sub-list for method output_type\n\t4, // [4:4] is the sub-list for method input_type\n\t3, // [3:4] is the sub-list for extension type_name\n\t2, // [2:3] is the sub-list for extension extendee\n\t0, // [0:2] is the sub-list for field type_name\n}\n\nfunc init() { file_google_protobuf_go_features_proto_init() }\nfunc file_google_protobuf_go_features_proto_init() {\n\tif File_google_protobuf_go_features_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc)),\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 1,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_protobuf_go_features_proto_goTypes,\n\t\tDependencyIndexes: file_google_protobuf_go_features_proto_depIdxs,\n\t\tEnumInfos:         file_google_protobuf_go_features_proto_enumTypes,\n\t\tMessageInfos:      file_google_protobuf_go_features_proto_msgTypes,\n\t\tExtensionInfos:    file_google_protobuf_go_features_proto_extTypes,\n\t}.Build()\n\tFile_google_protobuf_go_features_proto = out.File\n\tfile_google_protobuf_go_features_proto_goTypes = nil\n\tfile_google_protobuf_go_features_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\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// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/any.proto\n\n// Package anypb contains generated types for google/protobuf/any.proto.\n//\n// The Any message is a dynamic representation of any other message value.\n// It is functionally a tuple of the full name of the remote message type and\n// the serialized bytes of the remote message value.\n//\n// # Constructing an Any\n//\n// An Any message containing another message value is constructed using New:\n//\n//\tany, err := anypb.New(m)\n//\tif err != nil {\n//\t\t... // handle error\n//\t}\n//\t... // make use of any\n//\n// # Unmarshaling an Any\n//\n// With a populated Any message, the underlying message can be serialized into\n// a remote concrete message value in a few ways.\n//\n// If the exact concrete type is known, then a new (or pre-existing) instance\n// of that message can be passed to the UnmarshalTo method:\n//\n//\tm := new(foopb.MyMessage)\n//\tif err := any.UnmarshalTo(m); err != nil {\n//\t\t... // handle error\n//\t}\n//\t... // make use of m\n//\n// If the exact concrete type is not known, then the UnmarshalNew method can be\n// used to unmarshal the contents into a new instance of the remote message type:\n//\n//\tm, err := any.UnmarshalNew()\n//\tif err != nil {\n//\t\t... // handle error\n//\t}\n//\t... // make use of m\n//\n// UnmarshalNew uses the global type registry to resolve the message type and\n// construct a new instance of that message to unmarshal into. In order for a\n// message type to appear in the global registry, the Go type representing that\n// protobuf message type must be linked into the Go binary. For messages\n// generated by protoc-gen-go, this is achieved through an import of the\n// generated Go package representing a .proto file.\n//\n// A common pattern with UnmarshalNew is to use a type switch with the resulting\n// proto.Message value:\n//\n//\tswitch m := m.(type) {\n//\tcase *foopb.MyMessage:\n//\t\t... // make use of m as a *foopb.MyMessage\n//\tcase *barpb.OtherMessage:\n//\t\t... // make use of m as a *barpb.OtherMessage\n//\tcase *bazpb.SomeMessage:\n//\t\t... // make use of m as a *bazpb.SomeMessage\n//\t}\n//\n// This pattern ensures that the generated packages containing the message types\n// listed in the case clauses are linked into the Go binary and therefore also\n// registered in the global registry.\n//\n// # Type checking an Any\n//\n// In order to type check whether an Any message represents some other message,\n// then use the MessageIs method:\n//\n//\tif any.MessageIs((*foopb.MyMessage)(nil)) {\n//\t\t... // make use of any, knowing that it contains a foopb.MyMessage\n//\t}\n//\n// The MessageIs method can also be used with an allocated instance of the target\n// message type if the intention is to unmarshal into it if the type matches:\n//\n//\tm := new(foopb.MyMessage)\n//\tif any.MessageIs(m) {\n//\t\tif err := any.UnmarshalTo(m); err != nil {\n//\t\t\t... // handle error\n//\t\t}\n//\t\t... // make use of m\n//\t}\npackage anypb\n\nimport (\n\tproto \"google.golang.org/protobuf/proto\"\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoregistry \"google.golang.org/protobuf/reflect/protoregistry\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tstrings \"strings\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\n// `Any` contains an arbitrary serialized protocol buffer message along with a\n// URL that describes the type of the serialized message.\n//\n// Protobuf library provides support to pack/unpack Any values in the form\n// of utility functions or additional generated methods of the Any type.\n//\n// Example 1: Pack and unpack a message in C++.\n//\n//\tFoo foo = ...;\n//\tAny any;\n//\tany.PackFrom(foo);\n//\t...\n//\tif (any.UnpackTo(&foo)) {\n//\t  ...\n//\t}\n//\n// Example 2: Pack and unpack a message in Java.\n//\n//\t   Foo foo = ...;\n//\t   Any any = Any.pack(foo);\n//\t   ...\n//\t   if (any.is(Foo.class)) {\n//\t     foo = any.unpack(Foo.class);\n//\t   }\n//\t   // or ...\n//\t   if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n//\t     foo = any.unpack(Foo.getDefaultInstance());\n//\t   }\n//\n//\tExample 3: Pack and unpack a message in Python.\n//\n//\t   foo = Foo(...)\n//\t   any = Any()\n//\t   any.Pack(foo)\n//\t   ...\n//\t   if any.Is(Foo.DESCRIPTOR):\n//\t     any.Unpack(foo)\n//\t     ...\n//\n//\tExample 4: Pack and unpack a message in Go\n//\n//\t    foo := &pb.Foo{...}\n//\t    any, err := anypb.New(foo)\n//\t    if err != nil {\n//\t      ...\n//\t    }\n//\t    ...\n//\t    foo := &pb.Foo{}\n//\t    if err := any.UnmarshalTo(foo); err != nil {\n//\t      ...\n//\t    }\n//\n// The pack methods provided by protobuf library will by default use\n// 'type.googleapis.com/full.type.name' as the type URL and the unpack\n// methods only use the fully qualified type name after the last '/'\n// in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n// name \"y.z\".\n//\n// JSON\n// ====\n// The JSON representation of an `Any` value uses the regular\n// representation of the deserialized, embedded message, with an\n// additional field `@type` which contains the type URL. Example:\n//\n//\tpackage google.profile;\n//\tmessage Person {\n//\t  string first_name = 1;\n//\t  string last_name = 2;\n//\t}\n//\n//\t{\n//\t  \"@type\": \"type.googleapis.com/google.profile.Person\",\n//\t  \"firstName\": <string>,\n//\t  \"lastName\": <string>\n//\t}\n//\n// If the embedded message type is well-known and has a custom JSON\n// representation, that representation will be embedded adding a field\n// `value` which holds the custom JSON in addition to the `@type`\n// field. Example (for message [google.protobuf.Duration][]):\n//\n//\t{\n//\t  \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n//\t  \"value\": \"1.212s\"\n//\t}\ntype Any struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// A URL/resource name that uniquely identifies the type of the serialized\n\t// protocol buffer message. This string must contain at least\n\t// one \"/\" character. The last segment of the URL's path must represent\n\t// the fully qualified name of the type (as in\n\t// `path/google.protobuf.Duration`). The name should be in a canonical form\n\t// (e.g., leading \".\" is not accepted).\n\t//\n\t// In practice, teams usually precompile into the binary all types that they\n\t// expect it to use in the context of Any. However, for URLs which use the\n\t// scheme `http`, `https`, or no scheme, one can optionally set up a type\n\t// server that maps type URLs to message definitions as follows:\n\t//\n\t//   - If no scheme is provided, `https` is assumed.\n\t//   - An HTTP GET on the URL must yield a [google.protobuf.Type][]\n\t//     value in binary format, or produce an error.\n\t//   - Applications are allowed to cache lookup results based on the\n\t//     URL, or have them precompiled into a binary to avoid any\n\t//     lookup. Therefore, binary compatibility needs to be preserved\n\t//     on changes to types. (Use versioned type names to manage\n\t//     breaking changes.)\n\t//\n\t// Note: this functionality is not currently available in the official\n\t// protobuf release, and it is not used for type URLs beginning with\n\t// type.googleapis.com. As of May 2023, there are no widely used type server\n\t// implementations and no plans to implement one.\n\t//\n\t// Schemes other than `http`, `https` (or the empty scheme) might be\n\t// used with implementation specific semantics.\n\tTypeUrl string `protobuf:\"bytes,1,opt,name=type_url,json=typeUrl,proto3\" json:\"type_url,omitempty\"`\n\t// Must be a valid serialized protocol buffer of the above specified type.\n\tValue         []byte `protobuf:\"bytes,2,opt,name=value,proto3\" json:\"value,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\n// New marshals src into a new Any instance.\nfunc New(src proto.Message) (*Any, error) {\n\tdst := new(Any)\n\tif err := dst.MarshalFrom(src); err != nil {\n\t\treturn nil, err\n\t}\n\treturn dst, nil\n}\n\n// MarshalFrom marshals src into dst as the underlying message\n// using the provided marshal options.\n//\n// If no options are specified, call dst.MarshalFrom instead.\nfunc MarshalFrom(dst *Any, src proto.Message, opts proto.MarshalOptions) error {\n\tconst urlPrefix = \"type.googleapis.com/\"\n\tif src == nil {\n\t\treturn protoimpl.X.NewError(\"invalid nil source message\")\n\t}\n\tb, err := opts.Marshal(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdst.TypeUrl = urlPrefix + string(src.ProtoReflect().Descriptor().FullName())\n\tdst.Value = b\n\treturn nil\n}\n\n// UnmarshalTo unmarshals the underlying message from src into dst\n// using the provided unmarshal options.\n// It reports an error if dst is not of the right message type.\n//\n// If no options are specified, call src.UnmarshalTo instead.\nfunc UnmarshalTo(src *Any, dst proto.Message, opts proto.UnmarshalOptions) error {\n\tif src == nil {\n\t\treturn protoimpl.X.NewError(\"invalid nil source message\")\n\t}\n\tif !src.MessageIs(dst) {\n\t\tgot := dst.ProtoReflect().Descriptor().FullName()\n\t\twant := src.MessageName()\n\t\treturn protoimpl.X.NewError(\"mismatched message type: got %q, want %q\", got, want)\n\t}\n\treturn opts.Unmarshal(src.GetValue(), dst)\n}\n\n// UnmarshalNew unmarshals the underlying message from src into dst,\n// which is newly created message using a type resolved from the type URL.\n// The message type is resolved according to opt.Resolver,\n// which should implement protoregistry.MessageTypeResolver.\n// It reports an error if the underlying message type could not be resolved.\n//\n// If no options are specified, call src.UnmarshalNew instead.\nfunc UnmarshalNew(src *Any, opts proto.UnmarshalOptions) (dst proto.Message, err error) {\n\tif src.GetTypeUrl() == \"\" {\n\t\treturn nil, protoimpl.X.NewError(\"invalid empty type URL\")\n\t}\n\tif opts.Resolver == nil {\n\t\topts.Resolver = protoregistry.GlobalTypes\n\t}\n\tr, ok := opts.Resolver.(protoregistry.MessageTypeResolver)\n\tif !ok {\n\t\treturn nil, protoregistry.NotFound\n\t}\n\tmt, err := r.FindMessageByURL(src.GetTypeUrl())\n\tif err != nil {\n\t\tif err == protoregistry.NotFound {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn nil, protoimpl.X.NewError(\"could not resolve %q: %v\", src.GetTypeUrl(), err)\n\t}\n\tdst = mt.New().Interface()\n\treturn dst, opts.Unmarshal(src.GetValue(), dst)\n}\n\n// MessageIs reports whether the underlying message is of the same type as m.\nfunc (x *Any) MessageIs(m proto.Message) bool {\n\tif m == nil {\n\t\treturn false\n\t}\n\turl := x.GetTypeUrl()\n\tname := string(m.ProtoReflect().Descriptor().FullName())\n\tif !strings.HasSuffix(url, name) {\n\t\treturn false\n\t}\n\treturn len(url) == len(name) || url[len(url)-len(name)-1] == '/'\n}\n\n// MessageName reports the full name of the underlying message,\n// returning an empty string if invalid.\nfunc (x *Any) MessageName() protoreflect.FullName {\n\turl := x.GetTypeUrl()\n\tname := protoreflect.FullName(url)\n\tif i := strings.LastIndexByte(url, '/'); i >= 0 {\n\t\tname = name[i+len(\"/\"):]\n\t}\n\tif !name.IsValid() {\n\t\treturn \"\"\n\t}\n\treturn name\n}\n\n// MarshalFrom marshals m into x as the underlying message.\nfunc (x *Any) MarshalFrom(m proto.Message) error {\n\treturn MarshalFrom(x, m, proto.MarshalOptions{})\n}\n\n// UnmarshalTo unmarshals the contents of the underlying message of x into m.\n// It resets m before performing the unmarshal operation.\n// It reports an error if m is not of the right message type.\nfunc (x *Any) UnmarshalTo(m proto.Message) error {\n\treturn UnmarshalTo(x, m, proto.UnmarshalOptions{})\n}\n\n// UnmarshalNew unmarshals the contents of the underlying message of x into\n// a newly allocated message of the specified type.\n// It reports an error if the underlying message type could not be resolved.\nfunc (x *Any) UnmarshalNew() (proto.Message, error) {\n\treturn UnmarshalNew(x, proto.UnmarshalOptions{})\n}\n\nfunc (x *Any) Reset() {\n\t*x = Any{}\n\tmi := &file_google_protobuf_any_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Any) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Any) ProtoMessage() {}\n\nfunc (x *Any) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_any_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Any.ProtoReflect.Descriptor instead.\nfunc (*Any) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_any_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Any) GetTypeUrl() string {\n\tif x != nil {\n\t\treturn x.TypeUrl\n\t}\n\treturn \"\"\n}\n\nfunc (x *Any) GetValue() []byte {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn nil\n}\n\nvar File_google_protobuf_any_proto protoreflect.FileDescriptor\n\nconst file_google_protobuf_any_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x19google/protobuf/any.proto\\x12\\x0fgoogle.protobuf\\\"6\\n\" +\n\t\"\\x03Any\\x12\\x19\\n\" +\n\t\"\\btype_url\\x18\\x01 \\x01(\\tR\\atypeUrl\\x12\\x14\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\fR\\x05valueBv\\n\" +\n\t\"\\x13com.google.protobufB\\bAnyProtoP\\x01Z,google.golang.org/protobuf/types/known/anypb\\xa2\\x02\\x03GPB\\xaa\\x02\\x1eGoogle.Protobuf.WellKnownTypesb\\x06proto3\"\n\nvar (\n\tfile_google_protobuf_any_proto_rawDescOnce sync.Once\n\tfile_google_protobuf_any_proto_rawDescData []byte\n)\n\nfunc file_google_protobuf_any_proto_rawDescGZIP() []byte {\n\tfile_google_protobuf_any_proto_rawDescOnce.Do(func() {\n\t\tfile_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc)))\n\t})\n\treturn file_google_protobuf_any_proto_rawDescData\n}\n\nvar file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_google_protobuf_any_proto_goTypes = []any{\n\t(*Any)(nil), // 0: google.protobuf.Any\n}\nvar file_google_protobuf_any_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_protobuf_any_proto_init() }\nfunc file_google_protobuf_any_proto_init() {\n\tif File_google_protobuf_any_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc)),\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_protobuf_any_proto_goTypes,\n\t\tDependencyIndexes: file_google_protobuf_any_proto_depIdxs,\n\t\tMessageInfos:      file_google_protobuf_any_proto_msgTypes,\n\t}.Build()\n\tFile_google_protobuf_any_proto = out.File\n\tfile_google_protobuf_any_proto_goTypes = nil\n\tfile_google_protobuf_any_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\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// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/duration.proto\n\n// Package durationpb contains generated types for google/protobuf/duration.proto.\n//\n// The Duration message represents a signed span of time.\n//\n// # Conversion to a Go Duration\n//\n// The AsDuration method can be used to convert a Duration message to a\n// standard Go time.Duration value:\n//\n//\td := dur.AsDuration()\n//\t... // make use of d as a time.Duration\n//\n// Converting to a time.Duration is a common operation so that the extensive\n// set of time-based operations provided by the time package can be leveraged.\n// See https://golang.org/pkg/time for more information.\n//\n// The AsDuration method performs the conversion on a best-effort basis.\n// Durations with denormal values (e.g., nanoseconds beyond -99999999 and\n// +99999999, inclusive; or seconds and nanoseconds with opposite signs)\n// are normalized during the conversion to a time.Duration. To manually check for\n// invalid Duration per the documented limitations in duration.proto,\n// additionally call the CheckValid method:\n//\n//\tif err := dur.CheckValid(); err != nil {\n//\t\t... // handle error\n//\t}\n//\n// Note that the documented limitations in duration.proto does not protect a\n// Duration from overflowing the representable range of a time.Duration in Go.\n// The AsDuration method uses saturation arithmetic such that an overflow clamps\n// the resulting value to the closest representable value (e.g., math.MaxInt64\n// for positive overflow and math.MinInt64 for negative overflow).\n//\n// # Conversion from a Go Duration\n//\n// The durationpb.New function can be used to construct a Duration message\n// from a standard Go time.Duration value:\n//\n//\tdur := durationpb.New(d)\n//\t... // make use of d as a *durationpb.Duration\npackage durationpb\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\tmath \"math\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\ttime \"time\"\n\tunsafe \"unsafe\"\n)\n\n// A Duration represents a signed, fixed-length span of time represented\n// as a count of seconds and fractions of seconds at nanosecond\n// resolution. It is independent of any calendar and concepts like \"day\"\n// or \"month\". It is related to Timestamp in that the difference between\n// two Timestamp values is a Duration and it can be added or subtracted\n// from a Timestamp. Range is approximately +-10,000 years.\n//\n// # Examples\n//\n// Example 1: Compute Duration from two Timestamps in pseudo code.\n//\n//\tTimestamp start = ...;\n//\tTimestamp end = ...;\n//\tDuration duration = ...;\n//\n//\tduration.seconds = end.seconds - start.seconds;\n//\tduration.nanos = end.nanos - start.nanos;\n//\n//\tif (duration.seconds < 0 && duration.nanos > 0) {\n//\t  duration.seconds += 1;\n//\t  duration.nanos -= 1000000000;\n//\t} else if (duration.seconds > 0 && duration.nanos < 0) {\n//\t  duration.seconds -= 1;\n//\t  duration.nanos += 1000000000;\n//\t}\n//\n// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n//\n//\tTimestamp start = ...;\n//\tDuration duration = ...;\n//\tTimestamp end = ...;\n//\n//\tend.seconds = start.seconds + duration.seconds;\n//\tend.nanos = start.nanos + duration.nanos;\n//\n//\tif (end.nanos < 0) {\n//\t  end.seconds -= 1;\n//\t  end.nanos += 1000000000;\n//\t} else if (end.nanos >= 1000000000) {\n//\t  end.seconds += 1;\n//\t  end.nanos -= 1000000000;\n//\t}\n//\n// Example 3: Compute Duration from datetime.timedelta in Python.\n//\n//\ttd = datetime.timedelta(days=3, minutes=10)\n//\tduration = Duration()\n//\tduration.FromTimedelta(td)\n//\n// # JSON Mapping\n//\n// In JSON format, the Duration type is encoded as a string rather than an\n// object, where the string ends in the suffix \"s\" (indicating seconds) and\n// is preceded by the number of seconds, with nanoseconds expressed as\n// fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n// encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n// be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n// microsecond should be expressed in JSON format as \"3.000001s\".\ntype Duration struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Signed seconds of the span of time. Must be from -315,576,000,000\n\t// to +315,576,000,000 inclusive. Note: these bounds are computed from:\n\t// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n\tSeconds int64 `protobuf:\"varint,1,opt,name=seconds,proto3\" json:\"seconds,omitempty\"`\n\t// Signed fractions of a second at nanosecond resolution of the span\n\t// of time. Durations less than one second are represented with a 0\n\t// `seconds` field and a positive or negative `nanos` field. For durations\n\t// of one second or more, a non-zero value for the `nanos` field must be\n\t// of the same sign as the `seconds` field. Must be from -999,999,999\n\t// to +999,999,999 inclusive.\n\tNanos         int32 `protobuf:\"varint,2,opt,name=nanos,proto3\" json:\"nanos,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\n// New constructs a new Duration from the provided time.Duration.\nfunc New(d time.Duration) *Duration {\n\tnanos := d.Nanoseconds()\n\tsecs := nanos / 1e9\n\tnanos -= secs * 1e9\n\treturn &Duration{Seconds: int64(secs), Nanos: int32(nanos)}\n}\n\n// AsDuration converts x to a time.Duration,\n// returning the closest duration value in the event of overflow.\nfunc (x *Duration) AsDuration() time.Duration {\n\tsecs := x.GetSeconds()\n\tnanos := x.GetNanos()\n\td := time.Duration(secs) * time.Second\n\toverflow := d/time.Second != time.Duration(secs)\n\td += time.Duration(nanos) * time.Nanosecond\n\toverflow = overflow || (secs < 0 && nanos < 0 && d > 0)\n\toverflow = overflow || (secs > 0 && nanos > 0 && d < 0)\n\tif overflow {\n\t\tswitch {\n\t\tcase secs < 0:\n\t\t\treturn time.Duration(math.MinInt64)\n\t\tcase secs > 0:\n\t\t\treturn time.Duration(math.MaxInt64)\n\t\t}\n\t}\n\treturn d\n}\n\n// IsValid reports whether the duration is valid.\n// It is equivalent to CheckValid == nil.\nfunc (x *Duration) IsValid() bool {\n\treturn x.check() == 0\n}\n\n// CheckValid returns an error if the duration is invalid.\n// In particular, it checks whether the value is within the range of\n// -10000 years to +10000 years inclusive.\n// An error is reported for a nil Duration.\nfunc (x *Duration) CheckValid() error {\n\tswitch x.check() {\n\tcase invalidNil:\n\t\treturn protoimpl.X.NewError(\"invalid nil Duration\")\n\tcase invalidUnderflow:\n\t\treturn protoimpl.X.NewError(\"duration (%v) exceeds -10000 years\", x)\n\tcase invalidOverflow:\n\t\treturn protoimpl.X.NewError(\"duration (%v) exceeds +10000 years\", x)\n\tcase invalidNanosRange:\n\t\treturn protoimpl.X.NewError(\"duration (%v) has out-of-range nanos\", x)\n\tcase invalidNanosSign:\n\t\treturn protoimpl.X.NewError(\"duration (%v) has seconds and nanos with different signs\", x)\n\tdefault:\n\t\treturn nil\n\t}\n}\n\nconst (\n\t_ = iota\n\tinvalidNil\n\tinvalidUnderflow\n\tinvalidOverflow\n\tinvalidNanosRange\n\tinvalidNanosSign\n)\n\nfunc (x *Duration) check() uint {\n\tconst absDuration = 315576000000 // 10000yr * 365.25day/yr * 24hr/day * 60min/hr * 60sec/min\n\tsecs := x.GetSeconds()\n\tnanos := x.GetNanos()\n\tswitch {\n\tcase x == nil:\n\t\treturn invalidNil\n\tcase secs < -absDuration:\n\t\treturn invalidUnderflow\n\tcase secs > +absDuration:\n\t\treturn invalidOverflow\n\tcase nanos <= -1e9 || nanos >= +1e9:\n\t\treturn invalidNanosRange\n\tcase (secs > 0 && nanos < 0) || (secs < 0 && nanos > 0):\n\t\treturn invalidNanosSign\n\tdefault:\n\t\treturn 0\n\t}\n}\n\nfunc (x *Duration) Reset() {\n\t*x = Duration{}\n\tmi := &file_google_protobuf_duration_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Duration) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Duration) ProtoMessage() {}\n\nfunc (x *Duration) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_duration_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Duration.ProtoReflect.Descriptor instead.\nfunc (*Duration) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_duration_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Duration) GetSeconds() int64 {\n\tif x != nil {\n\t\treturn x.Seconds\n\t}\n\treturn 0\n}\n\nfunc (x *Duration) GetNanos() int32 {\n\tif x != nil {\n\t\treturn x.Nanos\n\t}\n\treturn 0\n}\n\nvar File_google_protobuf_duration_proto protoreflect.FileDescriptor\n\nconst file_google_protobuf_duration_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x1egoogle/protobuf/duration.proto\\x12\\x0fgoogle.protobuf\\\":\\n\" +\n\t\"\\bDuration\\x12\\x18\\n\" +\n\t\"\\aseconds\\x18\\x01 \\x01(\\x03R\\aseconds\\x12\\x14\\n\" +\n\t\"\\x05nanos\\x18\\x02 \\x01(\\x05R\\x05nanosB\\x83\\x01\\n\" +\n\t\"\\x13com.google.protobufB\\rDurationProtoP\\x01Z1google.golang.org/protobuf/types/known/durationpb\\xf8\\x01\\x01\\xa2\\x02\\x03GPB\\xaa\\x02\\x1eGoogle.Protobuf.WellKnownTypesb\\x06proto3\"\n\nvar (\n\tfile_google_protobuf_duration_proto_rawDescOnce sync.Once\n\tfile_google_protobuf_duration_proto_rawDescData []byte\n)\n\nfunc file_google_protobuf_duration_proto_rawDescGZIP() []byte {\n\tfile_google_protobuf_duration_proto_rawDescOnce.Do(func() {\n\t\tfile_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc)))\n\t})\n\treturn file_google_protobuf_duration_proto_rawDescData\n}\n\nvar file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_google_protobuf_duration_proto_goTypes = []any{\n\t(*Duration)(nil), // 0: google.protobuf.Duration\n}\nvar file_google_protobuf_duration_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_protobuf_duration_proto_init() }\nfunc file_google_protobuf_duration_proto_init() {\n\tif File_google_protobuf_duration_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc)),\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_protobuf_duration_proto_goTypes,\n\t\tDependencyIndexes: file_google_protobuf_duration_proto_depIdxs,\n\t\tMessageInfos:      file_google_protobuf_duration_proto_msgTypes,\n\t}.Build()\n\tFile_google_protobuf_duration_proto = out.File\n\tfile_google_protobuf_duration_proto_goTypes = nil\n\tfile_google_protobuf_duration_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go",
    "content": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc.  All rights reserved.\n// https://developers.google.com/protocol-buffers/\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// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/timestamp.proto\n\n// Package timestamppb contains generated types for google/protobuf/timestamp.proto.\n//\n// The Timestamp message represents a timestamp,\n// an instant in time since the Unix epoch (January 1st, 1970).\n//\n// # Conversion to a Go Time\n//\n// The AsTime method can be used to convert a Timestamp message to a\n// standard Go time.Time value in UTC:\n//\n//\tt := ts.AsTime()\n//\t... // make use of t as a time.Time\n//\n// Converting to a time.Time is a common operation so that the extensive\n// set of time-based operations provided by the time package can be leveraged.\n// See https://golang.org/pkg/time for more information.\n//\n// The AsTime method performs the conversion on a best-effort basis. Timestamps\n// with denormal values (e.g., nanoseconds beyond 0 and 99999999, inclusive)\n// are normalized during the conversion to a time.Time. To manually check for\n// invalid Timestamps per the documented limitations in timestamp.proto,\n// additionally call the CheckValid method:\n//\n//\tif err := ts.CheckValid(); err != nil {\n//\t\t... // handle error\n//\t}\n//\n// # Conversion from a Go Time\n//\n// The timestamppb.New function can be used to construct a Timestamp message\n// from a standard Go time.Time value:\n//\n//\tts := timestamppb.New(t)\n//\t... // make use of ts as a *timestamppb.Timestamp\n//\n// In order to construct a Timestamp representing the current time, use Now:\n//\n//\tts := timestamppb.Now()\n//\t... // make use of ts as a *timestamppb.Timestamp\npackage timestamppb\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\ttime \"time\"\n\tunsafe \"unsafe\"\n)\n\n// A Timestamp represents a point in time independent of any time zone or local\n// calendar, encoded as a count of seconds and fractions of seconds at\n// nanosecond resolution. The count is relative to an epoch at UTC midnight on\n// January 1, 1970, in the proleptic Gregorian calendar which extends the\n// Gregorian calendar backwards to year one.\n//\n// All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n// second table is needed for interpretation, using a [24-hour linear\n// smear](https://developers.google.com/time/smear).\n//\n// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n// restricting to that range, we ensure that we can convert to and from [RFC\n// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n//\n// # Examples\n//\n// Example 1: Compute Timestamp from POSIX `time()`.\n//\n//\tTimestamp timestamp;\n//\ttimestamp.set_seconds(time(NULL));\n//\ttimestamp.set_nanos(0);\n//\n// Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n//\n//\tstruct timeval tv;\n//\tgettimeofday(&tv, NULL);\n//\n//\tTimestamp timestamp;\n//\ttimestamp.set_seconds(tv.tv_sec);\n//\ttimestamp.set_nanos(tv.tv_usec * 1000);\n//\n// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n//\n//\tFILETIME ft;\n//\tGetSystemTimeAsFileTime(&ft);\n//\tUINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n//\n//\t// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n//\t// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n//\tTimestamp timestamp;\n//\ttimestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n//\ttimestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n//\n// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n//\n//\tlong millis = System.currentTimeMillis();\n//\n//\tTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n//\t    .setNanos((int) ((millis % 1000) * 1000000)).build();\n//\n// Example 5: Compute Timestamp from Java `Instant.now()`.\n//\n//\tInstant now = Instant.now();\n//\n//\tTimestamp timestamp =\n//\t    Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n//\t        .setNanos(now.getNano()).build();\n//\n// Example 6: Compute Timestamp from current time in Python.\n//\n//\ttimestamp = Timestamp()\n//\ttimestamp.GetCurrentTime()\n//\n// # JSON Mapping\n//\n// In JSON format, the Timestamp type is encoded as a string in the\n// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n// format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n// where {year} is always expressed using four digits while {month}, {day},\n// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n// are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n// is required. A proto3 JSON serializer should always use UTC (as indicated by\n// \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n// able to accept both UTC and other timezones (as indicated by an offset).\n//\n// For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n// 01:30 UTC on January 15, 2017.\n//\n// In JavaScript, one can convert a Date object to this format using the\n// standard\n// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n// method. In Python, a standard `datetime.datetime` object can be converted\n// to this format using\n// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n// the Joda Time's [`ISODateTimeFormat.dateTime()`](\n// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n// ) to obtain a formatter capable of generating timestamps in this format.\ntype Timestamp struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must\n\t// be between -315576000000 and 315576000000 inclusive (which corresponds to\n\t// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).\n\tSeconds int64 `protobuf:\"varint,1,opt,name=seconds,proto3\" json:\"seconds,omitempty\"`\n\t// Non-negative fractions of a second at nanosecond resolution. This field is\n\t// the nanosecond portion of the duration, not an alternative to seconds.\n\t// Negative second values with fractions must still have non-negative nanos\n\t// values that count forward in time. Must be between 0 and 999,999,999\n\t// inclusive.\n\tNanos         int32 `protobuf:\"varint,2,opt,name=nanos,proto3\" json:\"nanos,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\n// Now constructs a new Timestamp from the current time.\nfunc Now() *Timestamp {\n\treturn New(time.Now())\n}\n\n// New constructs a new Timestamp from the provided time.Time.\nfunc New(t time.Time) *Timestamp {\n\treturn &Timestamp{Seconds: int64(t.Unix()), Nanos: int32(t.Nanosecond())}\n}\n\n// AsTime converts x to a time.Time.\nfunc (x *Timestamp) AsTime() time.Time {\n\treturn time.Unix(int64(x.GetSeconds()), int64(x.GetNanos())).UTC()\n}\n\n// IsValid reports whether the timestamp is valid.\n// It is equivalent to CheckValid == nil.\nfunc (x *Timestamp) IsValid() bool {\n\treturn x.check() == 0\n}\n\n// CheckValid returns an error if the timestamp is invalid.\n// In particular, it checks whether the value represents a date that is\n// in the range of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\n// An error is reported for a nil Timestamp.\nfunc (x *Timestamp) CheckValid() error {\n\tswitch x.check() {\n\tcase invalidNil:\n\t\treturn protoimpl.X.NewError(\"invalid nil Timestamp\")\n\tcase invalidUnderflow:\n\t\treturn protoimpl.X.NewError(\"timestamp (%v) before 0001-01-01\", x)\n\tcase invalidOverflow:\n\t\treturn protoimpl.X.NewError(\"timestamp (%v) after 9999-12-31\", x)\n\tcase invalidNanos:\n\t\treturn protoimpl.X.NewError(\"timestamp (%v) has out-of-range nanos\", x)\n\tdefault:\n\t\treturn nil\n\t}\n}\n\nconst (\n\t_ = iota\n\tinvalidNil\n\tinvalidUnderflow\n\tinvalidOverflow\n\tinvalidNanos\n)\n\nfunc (x *Timestamp) check() uint {\n\tconst minTimestamp = -62135596800  // Seconds between 1970-01-01T00:00:00Z and 0001-01-01T00:00:00Z, inclusive\n\tconst maxTimestamp = +253402300799 // Seconds between 1970-01-01T00:00:00Z and 9999-12-31T23:59:59Z, inclusive\n\tsecs := x.GetSeconds()\n\tnanos := x.GetNanos()\n\tswitch {\n\tcase x == nil:\n\t\treturn invalidNil\n\tcase secs < minTimestamp:\n\t\treturn invalidUnderflow\n\tcase secs > maxTimestamp:\n\t\treturn invalidOverflow\n\tcase nanos < 0 || nanos >= 1e9:\n\t\treturn invalidNanos\n\tdefault:\n\t\treturn 0\n\t}\n}\n\nfunc (x *Timestamp) Reset() {\n\t*x = Timestamp{}\n\tmi := &file_google_protobuf_timestamp_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Timestamp) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Timestamp) ProtoMessage() {}\n\nfunc (x *Timestamp) ProtoReflect() protoreflect.Message {\n\tmi := &file_google_protobuf_timestamp_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.\nfunc (*Timestamp) Descriptor() ([]byte, []int) {\n\treturn file_google_protobuf_timestamp_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Timestamp) GetSeconds() int64 {\n\tif x != nil {\n\t\treturn x.Seconds\n\t}\n\treturn 0\n}\n\nfunc (x *Timestamp) GetNanos() int32 {\n\tif x != nil {\n\t\treturn x.Nanos\n\t}\n\treturn 0\n}\n\nvar File_google_protobuf_timestamp_proto protoreflect.FileDescriptor\n\nconst file_google_protobuf_timestamp_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x1fgoogle/protobuf/timestamp.proto\\x12\\x0fgoogle.protobuf\\\";\\n\" +\n\t\"\\tTimestamp\\x12\\x18\\n\" +\n\t\"\\aseconds\\x18\\x01 \\x01(\\x03R\\aseconds\\x12\\x14\\n\" +\n\t\"\\x05nanos\\x18\\x02 \\x01(\\x05R\\x05nanosB\\x85\\x01\\n\" +\n\t\"\\x13com.google.protobufB\\x0eTimestampProtoP\\x01Z2google.golang.org/protobuf/types/known/timestamppb\\xf8\\x01\\x01\\xa2\\x02\\x03GPB\\xaa\\x02\\x1eGoogle.Protobuf.WellKnownTypesb\\x06proto3\"\n\nvar (\n\tfile_google_protobuf_timestamp_proto_rawDescOnce sync.Once\n\tfile_google_protobuf_timestamp_proto_rawDescData []byte\n)\n\nfunc file_google_protobuf_timestamp_proto_rawDescGZIP() []byte {\n\tfile_google_protobuf_timestamp_proto_rawDescOnce.Do(func() {\n\t\tfile_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc)))\n\t})\n\treturn file_google_protobuf_timestamp_proto_rawDescData\n}\n\nvar file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_google_protobuf_timestamp_proto_goTypes = []any{\n\t(*Timestamp)(nil), // 0: google.protobuf.Timestamp\n}\nvar file_google_protobuf_timestamp_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_google_protobuf_timestamp_proto_init() }\nfunc file_google_protobuf_timestamp_proto_init() {\n\tif File_google_protobuf_timestamp_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc)),\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_google_protobuf_timestamp_proto_goTypes,\n\t\tDependencyIndexes: file_google_protobuf_timestamp_proto_depIdxs,\n\t\tMessageInfos:      file_google_protobuf_timestamp_proto_msgTypes,\n\t}.Build()\n\tFile_google_protobuf_timestamp_proto = out.File\n\tfile_google_protobuf_timestamp_proto_goTypes = nil\n\tfile_google_protobuf_timestamp_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/LICENSE",
    "content": "\nThis project is covered by two different licenses: MIT and Apache.\n\n#### MIT License ####\n\nThe following files were ported to Go from C files of libyaml, and thus\nare still covered by their original MIT license, with the additional\ncopyright staring in 2011 when the project was ported over:\n\n    apic.go emitterc.go parserc.go readerc.go scannerc.go\n    writerc.go yamlh.go yamlprivateh.go\n\nCopyright (c) 2006-2010 Kirill Simonov\nCopyright (c) 2006-2011 Kirill Simonov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, 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\n### Apache License ###\n\nAll the remaining project files are covered by the Apache license:\n\nCopyright (c) 2011-2019 Canonical Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/NOTICE",
    "content": "Copyright 2011-2016 Canonical Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/README.md",
    "content": "# YAML support for the Go language\n\nIntroduction\n------------\n\nThe yaml package enables Go programs to comfortably encode and decode YAML\nvalues. It was developed within [Canonical](https://www.canonical.com) as\npart of the [juju](https://juju.ubuntu.com) project, and is based on a\npure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML)\nC library to parse and generate YAML data quickly and reliably.\n\nCompatibility\n-------------\n\nThe yaml package supports most of YAML 1.2, but preserves some behavior\nfrom 1.1 for backwards compatibility.\n\nSpecifically, as of v3 of the yaml package:\n\n - YAML 1.1 bools (_yes/no, on/off_) are supported as long as they are being\n   decoded into a typed bool value. Otherwise they behave as a string. Booleans\n   in YAML 1.2 are _true/false_ only.\n - Octals encode and decode as _0777_ per YAML 1.1, rather than _0o777_\n   as specified in YAML 1.2, because most parsers still use the old format.\n   Octals in the  _0o777_ format are supported though, so new files work.\n - Does not support base-60 floats. These are gone from YAML 1.2, and were\n   actually never supported by this package as it's clearly a poor choice.\n\nand offers backwards\ncompatibility with YAML 1.1 in some cases.\n1.2, including support for\nanchors, tags, map merging, etc. Multi-document unmarshalling is not yet\nimplemented, and base-60 floats from YAML 1.1 are purposefully not\nsupported since they're a poor design and are gone in YAML 1.2.\n\nInstallation and usage\n----------------------\n\nThe import path for the package is *gopkg.in/yaml.v3*.\n\nTo install it, run:\n\n    go get gopkg.in/yaml.v3\n\nAPI documentation\n-----------------\n\nIf opened in a browser, the import path itself leads to the API documentation:\n\n  - [https://gopkg.in/yaml.v3](https://gopkg.in/yaml.v3)\n\nAPI stability\n-------------\n\nThe package API for yaml v3 will remain stable as described in [gopkg.in](https://gopkg.in).\n\n\nLicense\n-------\n\nThe yaml package is licensed under the MIT and Apache License 2.0 licenses.\nPlease see the LICENSE file for details.\n\n\nExample\n-------\n\n```Go\npackage main\n\nimport (\n        \"fmt\"\n        \"log\"\n\n        \"gopkg.in/yaml.v3\"\n)\n\nvar data = `\na: Easy!\nb:\n  c: 2\n  d: [3, 4]\n`\n\n// Note: struct fields must be public in order for unmarshal to\n// correctly populate the data.\ntype T struct {\n        A string\n        B struct {\n                RenamedC int   `yaml:\"c\"`\n                D        []int `yaml:\",flow\"`\n        }\n}\n\nfunc main() {\n        t := T{}\n    \n        err := yaml.Unmarshal([]byte(data), &t)\n        if err != nil {\n                log.Fatalf(\"error: %v\", err)\n        }\n        fmt.Printf(\"--- t:\\n%v\\n\\n\", t)\n    \n        d, err := yaml.Marshal(&t)\n        if err != nil {\n                log.Fatalf(\"error: %v\", err)\n        }\n        fmt.Printf(\"--- t dump:\\n%s\\n\\n\", string(d))\n    \n        m := make(map[interface{}]interface{})\n    \n        err = yaml.Unmarshal([]byte(data), &m)\n        if err != nil {\n                log.Fatalf(\"error: %v\", err)\n        }\n        fmt.Printf(\"--- m:\\n%v\\n\\n\", m)\n    \n        d, err = yaml.Marshal(&m)\n        if err != nil {\n                log.Fatalf(\"error: %v\", err)\n        }\n        fmt.Printf(\"--- m dump:\\n%s\\n\\n\", string(d))\n}\n```\n\nThis example will generate the following output:\n\n```\n--- t:\n{Easy! {2 [3 4]}}\n\n--- t dump:\na: Easy!\nb:\n  c: 2\n  d: [3, 4]\n\n\n--- m:\nmap[a:Easy! b:map[c:2 d:[3 4]]]\n\n--- m dump:\na: Easy!\nb:\n  c: 2\n  d:\n  - 3\n  - 4\n```\n\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/apic.go",
    "content": "// \n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"io\"\n)\n\nfunc yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) {\n\t//fmt.Println(\"yaml_insert_token\", \"pos:\", pos, \"typ:\", token.typ, \"head:\", parser.tokens_head, \"len:\", len(parser.tokens))\n\n\t// Check if we can move the queue at the beginning of the buffer.\n\tif parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) {\n\t\tif parser.tokens_head != len(parser.tokens) {\n\t\t\tcopy(parser.tokens, parser.tokens[parser.tokens_head:])\n\t\t}\n\t\tparser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head]\n\t\tparser.tokens_head = 0\n\t}\n\tparser.tokens = append(parser.tokens, *token)\n\tif pos < 0 {\n\t\treturn\n\t}\n\tcopy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:])\n\tparser.tokens[parser.tokens_head+pos] = *token\n}\n\n// Create a new parser object.\nfunc yaml_parser_initialize(parser *yaml_parser_t) bool {\n\t*parser = yaml_parser_t{\n\t\traw_buffer: make([]byte, 0, input_raw_buffer_size),\n\t\tbuffer:     make([]byte, 0, input_buffer_size),\n\t}\n\treturn true\n}\n\n// Destroy a parser object.\nfunc yaml_parser_delete(parser *yaml_parser_t) {\n\t*parser = yaml_parser_t{}\n}\n\n// String read handler.\nfunc yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) {\n\tif parser.input_pos == len(parser.input) {\n\t\treturn 0, io.EOF\n\t}\n\tn = copy(buffer, parser.input[parser.input_pos:])\n\tparser.input_pos += n\n\treturn n, nil\n}\n\n// Reader read handler.\nfunc yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) {\n\treturn parser.input_reader.Read(buffer)\n}\n\n// Set a string input.\nfunc yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) {\n\tif parser.read_handler != nil {\n\t\tpanic(\"must set the input source only once\")\n\t}\n\tparser.read_handler = yaml_string_read_handler\n\tparser.input = input\n\tparser.input_pos = 0\n}\n\n// Set a file input.\nfunc yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) {\n\tif parser.read_handler != nil {\n\t\tpanic(\"must set the input source only once\")\n\t}\n\tparser.read_handler = yaml_reader_read_handler\n\tparser.input_reader = r\n}\n\n// Set the source encoding.\nfunc yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) {\n\tif parser.encoding != yaml_ANY_ENCODING {\n\t\tpanic(\"must set the encoding only once\")\n\t}\n\tparser.encoding = encoding\n}\n\n// Create a new emitter object.\nfunc yaml_emitter_initialize(emitter *yaml_emitter_t) {\n\t*emitter = yaml_emitter_t{\n\t\tbuffer:     make([]byte, output_buffer_size),\n\t\traw_buffer: make([]byte, 0, output_raw_buffer_size),\n\t\tstates:     make([]yaml_emitter_state_t, 0, initial_stack_size),\n\t\tevents:     make([]yaml_event_t, 0, initial_queue_size),\n\t\tbest_width: -1,\n\t}\n}\n\n// Destroy an emitter object.\nfunc yaml_emitter_delete(emitter *yaml_emitter_t) {\n\t*emitter = yaml_emitter_t{}\n}\n\n// String write handler.\nfunc yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error {\n\t*emitter.output_buffer = append(*emitter.output_buffer, buffer...)\n\treturn nil\n}\n\n// yaml_writer_write_handler uses emitter.output_writer to write the\n// emitted text.\nfunc yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error {\n\t_, err := emitter.output_writer.Write(buffer)\n\treturn err\n}\n\n// Set a string output.\nfunc yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) {\n\tif emitter.write_handler != nil {\n\t\tpanic(\"must set the output target only once\")\n\t}\n\temitter.write_handler = yaml_string_write_handler\n\temitter.output_buffer = output_buffer\n}\n\n// Set a file output.\nfunc yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) {\n\tif emitter.write_handler != nil {\n\t\tpanic(\"must set the output target only once\")\n\t}\n\temitter.write_handler = yaml_writer_write_handler\n\temitter.output_writer = w\n}\n\n// Set the output encoding.\nfunc yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) {\n\tif emitter.encoding != yaml_ANY_ENCODING {\n\t\tpanic(\"must set the output encoding only once\")\n\t}\n\temitter.encoding = encoding\n}\n\n// Set the canonical output style.\nfunc yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) {\n\temitter.canonical = canonical\n}\n\n// Set the indentation increment.\nfunc yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) {\n\tif indent < 2 || indent > 9 {\n\t\tindent = 2\n\t}\n\temitter.best_indent = indent\n}\n\n// Set the preferred line width.\nfunc yaml_emitter_set_width(emitter *yaml_emitter_t, width int) {\n\tif width < 0 {\n\t\twidth = -1\n\t}\n\temitter.best_width = width\n}\n\n// Set if unescaped non-ASCII characters are allowed.\nfunc yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) {\n\temitter.unicode = unicode\n}\n\n// Set the preferred line break character.\nfunc yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) {\n\temitter.line_break = line_break\n}\n\n///*\n// * Destroy a token object.\n// */\n//\n//YAML_DECLARE(void)\n//yaml_token_delete(yaml_token_t *token)\n//{\n//    assert(token);  // Non-NULL token object expected.\n//\n//    switch (token.type)\n//    {\n//        case YAML_TAG_DIRECTIVE_TOKEN:\n//            yaml_free(token.data.tag_directive.handle);\n//            yaml_free(token.data.tag_directive.prefix);\n//            break;\n//\n//        case YAML_ALIAS_TOKEN:\n//            yaml_free(token.data.alias.value);\n//            break;\n//\n//        case YAML_ANCHOR_TOKEN:\n//            yaml_free(token.data.anchor.value);\n//            break;\n//\n//        case YAML_TAG_TOKEN:\n//            yaml_free(token.data.tag.handle);\n//            yaml_free(token.data.tag.suffix);\n//            break;\n//\n//        case YAML_SCALAR_TOKEN:\n//            yaml_free(token.data.scalar.value);\n//            break;\n//\n//        default:\n//            break;\n//    }\n//\n//    memset(token, 0, sizeof(yaml_token_t));\n//}\n//\n///*\n// * Check if a string is a valid UTF-8 sequence.\n// *\n// * Check 'reader.c' for more details on UTF-8 encoding.\n// */\n//\n//static int\n//yaml_check_utf8(yaml_char_t *start, size_t length)\n//{\n//    yaml_char_t *end = start+length;\n//    yaml_char_t *pointer = start;\n//\n//    while (pointer < end) {\n//        unsigned char octet;\n//        unsigned int width;\n//        unsigned int value;\n//        size_t k;\n//\n//        octet = pointer[0];\n//        width = (octet & 0x80) == 0x00 ? 1 :\n//                (octet & 0xE0) == 0xC0 ? 2 :\n//                (octet & 0xF0) == 0xE0 ? 3 :\n//                (octet & 0xF8) == 0xF0 ? 4 : 0;\n//        value = (octet & 0x80) == 0x00 ? octet & 0x7F :\n//                (octet & 0xE0) == 0xC0 ? octet & 0x1F :\n//                (octet & 0xF0) == 0xE0 ? octet & 0x0F :\n//                (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;\n//        if (!width) return 0;\n//        if (pointer+width > end) return 0;\n//        for (k = 1; k < width; k ++) {\n//            octet = pointer[k];\n//            if ((octet & 0xC0) != 0x80) return 0;\n//            value = (value << 6) + (octet & 0x3F);\n//        }\n//        if (!((width == 1) ||\n//            (width == 2 && value >= 0x80) ||\n//            (width == 3 && value >= 0x800) ||\n//            (width == 4 && value >= 0x10000))) return 0;\n//\n//        pointer += width;\n//    }\n//\n//    return 1;\n//}\n//\n\n// Create STREAM-START.\nfunc yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) {\n\t*event = yaml_event_t{\n\t\ttyp:      yaml_STREAM_START_EVENT,\n\t\tencoding: encoding,\n\t}\n}\n\n// Create STREAM-END.\nfunc yaml_stream_end_event_initialize(event *yaml_event_t) {\n\t*event = yaml_event_t{\n\t\ttyp: yaml_STREAM_END_EVENT,\n\t}\n}\n\n// Create DOCUMENT-START.\nfunc yaml_document_start_event_initialize(\n\tevent *yaml_event_t,\n\tversion_directive *yaml_version_directive_t,\n\ttag_directives []yaml_tag_directive_t,\n\timplicit bool,\n) {\n\t*event = yaml_event_t{\n\t\ttyp:               yaml_DOCUMENT_START_EVENT,\n\t\tversion_directive: version_directive,\n\t\ttag_directives:    tag_directives,\n\t\timplicit:          implicit,\n\t}\n}\n\n// Create DOCUMENT-END.\nfunc yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) {\n\t*event = yaml_event_t{\n\t\ttyp:      yaml_DOCUMENT_END_EVENT,\n\t\timplicit: implicit,\n\t}\n}\n\n// Create ALIAS.\nfunc yaml_alias_event_initialize(event *yaml_event_t, anchor []byte) bool {\n\t*event = yaml_event_t{\n\t\ttyp:    yaml_ALIAS_EVENT,\n\t\tanchor: anchor,\n\t}\n\treturn true\n}\n\n// Create SCALAR.\nfunc yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool {\n\t*event = yaml_event_t{\n\t\ttyp:             yaml_SCALAR_EVENT,\n\t\tanchor:          anchor,\n\t\ttag:             tag,\n\t\tvalue:           value,\n\t\timplicit:        plain_implicit,\n\t\tquoted_implicit: quoted_implicit,\n\t\tstyle:           yaml_style_t(style),\n\t}\n\treturn true\n}\n\n// Create SEQUENCE-START.\nfunc yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool {\n\t*event = yaml_event_t{\n\t\ttyp:      yaml_SEQUENCE_START_EVENT,\n\t\tanchor:   anchor,\n\t\ttag:      tag,\n\t\timplicit: implicit,\n\t\tstyle:    yaml_style_t(style),\n\t}\n\treturn true\n}\n\n// Create SEQUENCE-END.\nfunc yaml_sequence_end_event_initialize(event *yaml_event_t) bool {\n\t*event = yaml_event_t{\n\t\ttyp: yaml_SEQUENCE_END_EVENT,\n\t}\n\treturn true\n}\n\n// Create MAPPING-START.\nfunc yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) {\n\t*event = yaml_event_t{\n\t\ttyp:      yaml_MAPPING_START_EVENT,\n\t\tanchor:   anchor,\n\t\ttag:      tag,\n\t\timplicit: implicit,\n\t\tstyle:    yaml_style_t(style),\n\t}\n}\n\n// Create MAPPING-END.\nfunc yaml_mapping_end_event_initialize(event *yaml_event_t) {\n\t*event = yaml_event_t{\n\t\ttyp: yaml_MAPPING_END_EVENT,\n\t}\n}\n\n// Destroy an event object.\nfunc yaml_event_delete(event *yaml_event_t) {\n\t*event = yaml_event_t{}\n}\n\n///*\n// * Create a document object.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_initialize(document *yaml_document_t,\n//        version_directive *yaml_version_directive_t,\n//        tag_directives_start *yaml_tag_directive_t,\n//        tag_directives_end *yaml_tag_directive_t,\n//        start_implicit int, end_implicit int)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//    struct {\n//        start *yaml_node_t\n//        end *yaml_node_t\n//        top *yaml_node_t\n//    } nodes = { NULL, NULL, NULL }\n//    version_directive_copy *yaml_version_directive_t = NULL\n//    struct {\n//        start *yaml_tag_directive_t\n//        end *yaml_tag_directive_t\n//        top *yaml_tag_directive_t\n//    } tag_directives_copy = { NULL, NULL, NULL }\n//    value yaml_tag_directive_t = { NULL, NULL }\n//    mark yaml_mark_t = { 0, 0, 0 }\n//\n//    assert(document) // Non-NULL document object is expected.\n//    assert((tag_directives_start && tag_directives_end) ||\n//            (tag_directives_start == tag_directives_end))\n//                            // Valid tag directives are expected.\n//\n//    if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error\n//\n//    if (version_directive) {\n//        version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t))\n//        if (!version_directive_copy) goto error\n//        version_directive_copy.major = version_directive.major\n//        version_directive_copy.minor = version_directive.minor\n//    }\n//\n//    if (tag_directives_start != tag_directives_end) {\n//        tag_directive *yaml_tag_directive_t\n//        if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE))\n//            goto error\n//        for (tag_directive = tag_directives_start\n//                tag_directive != tag_directives_end; tag_directive ++) {\n//            assert(tag_directive.handle)\n//            assert(tag_directive.prefix)\n//            if (!yaml_check_utf8(tag_directive.handle,\n//                        strlen((char *)tag_directive.handle)))\n//                goto error\n//            if (!yaml_check_utf8(tag_directive.prefix,\n//                        strlen((char *)tag_directive.prefix)))\n//                goto error\n//            value.handle = yaml_strdup(tag_directive.handle)\n//            value.prefix = yaml_strdup(tag_directive.prefix)\n//            if (!value.handle || !value.prefix) goto error\n//            if (!PUSH(&context, tag_directives_copy, value))\n//                goto error\n//            value.handle = NULL\n//            value.prefix = NULL\n//        }\n//    }\n//\n//    DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy,\n//            tag_directives_copy.start, tag_directives_copy.top,\n//            start_implicit, end_implicit, mark, mark)\n//\n//    return 1\n//\n//error:\n//    STACK_DEL(&context, nodes)\n//    yaml_free(version_directive_copy)\n//    while (!STACK_EMPTY(&context, tag_directives_copy)) {\n//        value yaml_tag_directive_t = POP(&context, tag_directives_copy)\n//        yaml_free(value.handle)\n//        yaml_free(value.prefix)\n//    }\n//    STACK_DEL(&context, tag_directives_copy)\n//    yaml_free(value.handle)\n//    yaml_free(value.prefix)\n//\n//    return 0\n//}\n//\n///*\n// * Destroy a document object.\n// */\n//\n//YAML_DECLARE(void)\n//yaml_document_delete(document *yaml_document_t)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//    tag_directive *yaml_tag_directive_t\n//\n//    context.error = YAML_NO_ERROR // Eliminate a compiler warning.\n//\n//    assert(document) // Non-NULL document object is expected.\n//\n//    while (!STACK_EMPTY(&context, document.nodes)) {\n//        node yaml_node_t = POP(&context, document.nodes)\n//        yaml_free(node.tag)\n//        switch (node.type) {\n//            case YAML_SCALAR_NODE:\n//                yaml_free(node.data.scalar.value)\n//                break\n//            case YAML_SEQUENCE_NODE:\n//                STACK_DEL(&context, node.data.sequence.items)\n//                break\n//            case YAML_MAPPING_NODE:\n//                STACK_DEL(&context, node.data.mapping.pairs)\n//                break\n//            default:\n//                assert(0) // Should not happen.\n//        }\n//    }\n//    STACK_DEL(&context, document.nodes)\n//\n//    yaml_free(document.version_directive)\n//    for (tag_directive = document.tag_directives.start\n//            tag_directive != document.tag_directives.end\n//            tag_directive++) {\n//        yaml_free(tag_directive.handle)\n//        yaml_free(tag_directive.prefix)\n//    }\n//    yaml_free(document.tag_directives.start)\n//\n//    memset(document, 0, sizeof(yaml_document_t))\n//}\n//\n///**\n// * Get a document node.\n// */\n//\n//YAML_DECLARE(yaml_node_t *)\n//yaml_document_get_node(document *yaml_document_t, index int)\n//{\n//    assert(document) // Non-NULL document object is expected.\n//\n//    if (index > 0 && document.nodes.start + index <= document.nodes.top) {\n//        return document.nodes.start + index - 1\n//    }\n//    return NULL\n//}\n//\n///**\n// * Get the root object.\n// */\n//\n//YAML_DECLARE(yaml_node_t *)\n//yaml_document_get_root_node(document *yaml_document_t)\n//{\n//    assert(document) // Non-NULL document object is expected.\n//\n//    if (document.nodes.top != document.nodes.start) {\n//        return document.nodes.start\n//    }\n//    return NULL\n//}\n//\n///*\n// * Add a scalar node to a document.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_add_scalar(document *yaml_document_t,\n//        tag *yaml_char_t, value *yaml_char_t, length int,\n//        style yaml_scalar_style_t)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//    mark yaml_mark_t = { 0, 0, 0 }\n//    tag_copy *yaml_char_t = NULL\n//    value_copy *yaml_char_t = NULL\n//    node yaml_node_t\n//\n//    assert(document) // Non-NULL document object is expected.\n//    assert(value) // Non-NULL value is expected.\n//\n//    if (!tag) {\n//        tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG\n//    }\n//\n//    if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error\n//    tag_copy = yaml_strdup(tag)\n//    if (!tag_copy) goto error\n//\n//    if (length < 0) {\n//        length = strlen((char *)value)\n//    }\n//\n//    if (!yaml_check_utf8(value, length)) goto error\n//    value_copy = yaml_malloc(length+1)\n//    if (!value_copy) goto error\n//    memcpy(value_copy, value, length)\n//    value_copy[length] = '\\0'\n//\n//    SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark)\n//    if (!PUSH(&context, document.nodes, node)) goto error\n//\n//    return document.nodes.top - document.nodes.start\n//\n//error:\n//    yaml_free(tag_copy)\n//    yaml_free(value_copy)\n//\n//    return 0\n//}\n//\n///*\n// * Add a sequence node to a document.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_add_sequence(document *yaml_document_t,\n//        tag *yaml_char_t, style yaml_sequence_style_t)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//    mark yaml_mark_t = { 0, 0, 0 }\n//    tag_copy *yaml_char_t = NULL\n//    struct {\n//        start *yaml_node_item_t\n//        end *yaml_node_item_t\n//        top *yaml_node_item_t\n//    } items = { NULL, NULL, NULL }\n//    node yaml_node_t\n//\n//    assert(document) // Non-NULL document object is expected.\n//\n//    if (!tag) {\n//        tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG\n//    }\n//\n//    if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error\n//    tag_copy = yaml_strdup(tag)\n//    if (!tag_copy) goto error\n//\n//    if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error\n//\n//    SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end,\n//            style, mark, mark)\n//    if (!PUSH(&context, document.nodes, node)) goto error\n//\n//    return document.nodes.top - document.nodes.start\n//\n//error:\n//    STACK_DEL(&context, items)\n//    yaml_free(tag_copy)\n//\n//    return 0\n//}\n//\n///*\n// * Add a mapping node to a document.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_add_mapping(document *yaml_document_t,\n//        tag *yaml_char_t, style yaml_mapping_style_t)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//    mark yaml_mark_t = { 0, 0, 0 }\n//    tag_copy *yaml_char_t = NULL\n//    struct {\n//        start *yaml_node_pair_t\n//        end *yaml_node_pair_t\n//        top *yaml_node_pair_t\n//    } pairs = { NULL, NULL, NULL }\n//    node yaml_node_t\n//\n//    assert(document) // Non-NULL document object is expected.\n//\n//    if (!tag) {\n//        tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG\n//    }\n//\n//    if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error\n//    tag_copy = yaml_strdup(tag)\n//    if (!tag_copy) goto error\n//\n//    if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error\n//\n//    MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end,\n//            style, mark, mark)\n//    if (!PUSH(&context, document.nodes, node)) goto error\n//\n//    return document.nodes.top - document.nodes.start\n//\n//error:\n//    STACK_DEL(&context, pairs)\n//    yaml_free(tag_copy)\n//\n//    return 0\n//}\n//\n///*\n// * Append an item to a sequence node.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_append_sequence_item(document *yaml_document_t,\n//        sequence int, item int)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//\n//    assert(document) // Non-NULL document is required.\n//    assert(sequence > 0\n//            && document.nodes.start + sequence <= document.nodes.top)\n//                            // Valid sequence id is required.\n//    assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE)\n//                            // A sequence node is required.\n//    assert(item > 0 && document.nodes.start + item <= document.nodes.top)\n//                            // Valid item id is required.\n//\n//    if (!PUSH(&context,\n//                document.nodes.start[sequence-1].data.sequence.items, item))\n//        return 0\n//\n//    return 1\n//}\n//\n///*\n// * Append a pair of a key and a value to a mapping node.\n// */\n//\n//YAML_DECLARE(int)\n//yaml_document_append_mapping_pair(document *yaml_document_t,\n//        mapping int, key int, value int)\n//{\n//    struct {\n//        error yaml_error_type_t\n//    } context\n//\n//    pair yaml_node_pair_t\n//\n//    assert(document) // Non-NULL document is required.\n//    assert(mapping > 0\n//            && document.nodes.start + mapping <= document.nodes.top)\n//                            // Valid mapping id is required.\n//    assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE)\n//                            // A mapping node is required.\n//    assert(key > 0 && document.nodes.start + key <= document.nodes.top)\n//                            // Valid key id is required.\n//    assert(value > 0 && document.nodes.start + value <= document.nodes.top)\n//                            // Valid value id is required.\n//\n//    pair.key = key\n//    pair.value = value\n//\n//    if (!PUSH(&context,\n//                document.nodes.start[mapping-1].data.mapping.pairs, pair))\n//        return 0\n//\n//    return 1\n//}\n//\n//\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/decode.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage yaml\n\nimport (\n\t\"encoding\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"time\"\n)\n\n// ----------------------------------------------------------------------------\n// Parser, produces a node tree out of a libyaml event stream.\n\ntype parser struct {\n\tparser   yaml_parser_t\n\tevent    yaml_event_t\n\tdoc      *Node\n\tanchors  map[string]*Node\n\tdoneInit bool\n\ttextless bool\n}\n\nfunc newParser(b []byte) *parser {\n\tp := parser{}\n\tif !yaml_parser_initialize(&p.parser) {\n\t\tpanic(\"failed to initialize YAML emitter\")\n\t}\n\tif len(b) == 0 {\n\t\tb = []byte{'\\n'}\n\t}\n\tyaml_parser_set_input_string(&p.parser, b)\n\treturn &p\n}\n\nfunc newParserFromReader(r io.Reader) *parser {\n\tp := parser{}\n\tif !yaml_parser_initialize(&p.parser) {\n\t\tpanic(\"failed to initialize YAML emitter\")\n\t}\n\tyaml_parser_set_input_reader(&p.parser, r)\n\treturn &p\n}\n\nfunc (p *parser) init() {\n\tif p.doneInit {\n\t\treturn\n\t}\n\tp.anchors = make(map[string]*Node)\n\tp.expect(yaml_STREAM_START_EVENT)\n\tp.doneInit = true\n}\n\nfunc (p *parser) destroy() {\n\tif p.event.typ != yaml_NO_EVENT {\n\t\tyaml_event_delete(&p.event)\n\t}\n\tyaml_parser_delete(&p.parser)\n}\n\n// expect consumes an event from the event stream and\n// checks that it's of the expected type.\nfunc (p *parser) expect(e yaml_event_type_t) {\n\tif p.event.typ == yaml_NO_EVENT {\n\t\tif !yaml_parser_parse(&p.parser, &p.event) {\n\t\t\tp.fail()\n\t\t}\n\t}\n\tif p.event.typ == yaml_STREAM_END_EVENT {\n\t\tfailf(\"attempted to go past the end of stream; corrupted value?\")\n\t}\n\tif p.event.typ != e {\n\t\tp.parser.problem = fmt.Sprintf(\"expected %s event but got %s\", e, p.event.typ)\n\t\tp.fail()\n\t}\n\tyaml_event_delete(&p.event)\n\tp.event.typ = yaml_NO_EVENT\n}\n\n// peek peeks at the next event in the event stream,\n// puts the results into p.event and returns the event type.\nfunc (p *parser) peek() yaml_event_type_t {\n\tif p.event.typ != yaml_NO_EVENT {\n\t\treturn p.event.typ\n\t}\n\t// It's curious choice from the underlying API to generally return a\n\t// positive result on success, but on this case return true in an error\n\t// scenario. This was the source of bugs in the past (issue #666).\n\tif !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR {\n\t\tp.fail()\n\t}\n\treturn p.event.typ\n}\n\nfunc (p *parser) fail() {\n\tvar where string\n\tvar line int\n\tif p.parser.context_mark.line != 0 {\n\t\tline = p.parser.context_mark.line\n\t\t// Scanner errors don't iterate line before returning error\n\t\tif p.parser.error == yaml_SCANNER_ERROR {\n\t\t\tline++\n\t\t}\n\t} else if p.parser.problem_mark.line != 0 {\n\t\tline = p.parser.problem_mark.line\n\t\t// Scanner errors don't iterate line before returning error\n\t\tif p.parser.error == yaml_SCANNER_ERROR {\n\t\t\tline++\n\t\t}\n\t}\n\tif line != 0 {\n\t\twhere = \"line \" + strconv.Itoa(line) + \": \"\n\t}\n\tvar msg string\n\tif len(p.parser.problem) > 0 {\n\t\tmsg = p.parser.problem\n\t} else {\n\t\tmsg = \"unknown problem parsing YAML content\"\n\t}\n\tfailf(\"%s%s\", where, msg)\n}\n\nfunc (p *parser) anchor(n *Node, anchor []byte) {\n\tif anchor != nil {\n\t\tn.Anchor = string(anchor)\n\t\tp.anchors[n.Anchor] = n\n\t}\n}\n\nfunc (p *parser) parse() *Node {\n\tp.init()\n\tswitch p.peek() {\n\tcase yaml_SCALAR_EVENT:\n\t\treturn p.scalar()\n\tcase yaml_ALIAS_EVENT:\n\t\treturn p.alias()\n\tcase yaml_MAPPING_START_EVENT:\n\t\treturn p.mapping()\n\tcase yaml_SEQUENCE_START_EVENT:\n\t\treturn p.sequence()\n\tcase yaml_DOCUMENT_START_EVENT:\n\t\treturn p.document()\n\tcase yaml_STREAM_END_EVENT:\n\t\t// Happens when attempting to decode an empty buffer.\n\t\treturn nil\n\tcase yaml_TAIL_COMMENT_EVENT:\n\t\tpanic(\"internal error: unexpected tail comment event (please report)\")\n\tdefault:\n\t\tpanic(\"internal error: attempted to parse unknown event (please report): \" + p.event.typ.String())\n\t}\n}\n\nfunc (p *parser) node(kind Kind, defaultTag, tag, value string) *Node {\n\tvar style Style\n\tif tag != \"\" && tag != \"!\" {\n\t\ttag = shortTag(tag)\n\t\tstyle = TaggedStyle\n\t} else if defaultTag != \"\" {\n\t\ttag = defaultTag\n\t} else if kind == ScalarNode {\n\t\ttag, _ = resolve(\"\", value)\n\t}\n\tn := &Node{\n\t\tKind:  kind,\n\t\tTag:   tag,\n\t\tValue: value,\n\t\tStyle: style,\n\t}\n\tif !p.textless {\n\t\tn.Line = p.event.start_mark.line + 1\n\t\tn.Column = p.event.start_mark.column + 1\n\t\tn.HeadComment = string(p.event.head_comment)\n\t\tn.LineComment = string(p.event.line_comment)\n\t\tn.FootComment = string(p.event.foot_comment)\n\t}\n\treturn n\n}\n\nfunc (p *parser) parseChild(parent *Node) *Node {\n\tchild := p.parse()\n\tparent.Content = append(parent.Content, child)\n\treturn child\n}\n\nfunc (p *parser) document() *Node {\n\tn := p.node(DocumentNode, \"\", \"\", \"\")\n\tp.doc = n\n\tp.expect(yaml_DOCUMENT_START_EVENT)\n\tp.parseChild(n)\n\tif p.peek() == yaml_DOCUMENT_END_EVENT {\n\t\tn.FootComment = string(p.event.foot_comment)\n\t}\n\tp.expect(yaml_DOCUMENT_END_EVENT)\n\treturn n\n}\n\nfunc (p *parser) alias() *Node {\n\tn := p.node(AliasNode, \"\", \"\", string(p.event.anchor))\n\tn.Alias = p.anchors[n.Value]\n\tif n.Alias == nil {\n\t\tfailf(\"unknown anchor '%s' referenced\", n.Value)\n\t}\n\tp.expect(yaml_ALIAS_EVENT)\n\treturn n\n}\n\nfunc (p *parser) scalar() *Node {\n\tvar parsedStyle = p.event.scalar_style()\n\tvar nodeStyle Style\n\tswitch {\n\tcase parsedStyle&yaml_DOUBLE_QUOTED_SCALAR_STYLE != 0:\n\t\tnodeStyle = DoubleQuotedStyle\n\tcase parsedStyle&yaml_SINGLE_QUOTED_SCALAR_STYLE != 0:\n\t\tnodeStyle = SingleQuotedStyle\n\tcase parsedStyle&yaml_LITERAL_SCALAR_STYLE != 0:\n\t\tnodeStyle = LiteralStyle\n\tcase parsedStyle&yaml_FOLDED_SCALAR_STYLE != 0:\n\t\tnodeStyle = FoldedStyle\n\t}\n\tvar nodeValue = string(p.event.value)\n\tvar nodeTag = string(p.event.tag)\n\tvar defaultTag string\n\tif nodeStyle == 0 {\n\t\tif nodeValue == \"<<\" {\n\t\t\tdefaultTag = mergeTag\n\t\t}\n\t} else {\n\t\tdefaultTag = strTag\n\t}\n\tn := p.node(ScalarNode, defaultTag, nodeTag, nodeValue)\n\tn.Style |= nodeStyle\n\tp.anchor(n, p.event.anchor)\n\tp.expect(yaml_SCALAR_EVENT)\n\treturn n\n}\n\nfunc (p *parser) sequence() *Node {\n\tn := p.node(SequenceNode, seqTag, string(p.event.tag), \"\")\n\tif p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 {\n\t\tn.Style |= FlowStyle\n\t}\n\tp.anchor(n, p.event.anchor)\n\tp.expect(yaml_SEQUENCE_START_EVENT)\n\tfor p.peek() != yaml_SEQUENCE_END_EVENT {\n\t\tp.parseChild(n)\n\t}\n\tn.LineComment = string(p.event.line_comment)\n\tn.FootComment = string(p.event.foot_comment)\n\tp.expect(yaml_SEQUENCE_END_EVENT)\n\treturn n\n}\n\nfunc (p *parser) mapping() *Node {\n\tn := p.node(MappingNode, mapTag, string(p.event.tag), \"\")\n\tblock := true\n\tif p.event.mapping_style()&yaml_FLOW_MAPPING_STYLE != 0 {\n\t\tblock = false\n\t\tn.Style |= FlowStyle\n\t}\n\tp.anchor(n, p.event.anchor)\n\tp.expect(yaml_MAPPING_START_EVENT)\n\tfor p.peek() != yaml_MAPPING_END_EVENT {\n\t\tk := p.parseChild(n)\n\t\tif block && k.FootComment != \"\" {\n\t\t\t// Must be a foot comment for the prior value when being dedented.\n\t\t\tif len(n.Content) > 2 {\n\t\t\t\tn.Content[len(n.Content)-3].FootComment = k.FootComment\n\t\t\t\tk.FootComment = \"\"\n\t\t\t}\n\t\t}\n\t\tv := p.parseChild(n)\n\t\tif k.FootComment == \"\" && v.FootComment != \"\" {\n\t\t\tk.FootComment = v.FootComment\n\t\t\tv.FootComment = \"\"\n\t\t}\n\t\tif p.peek() == yaml_TAIL_COMMENT_EVENT {\n\t\t\tif k.FootComment == \"\" {\n\t\t\t\tk.FootComment = string(p.event.foot_comment)\n\t\t\t}\n\t\t\tp.expect(yaml_TAIL_COMMENT_EVENT)\n\t\t}\n\t}\n\tn.LineComment = string(p.event.line_comment)\n\tn.FootComment = string(p.event.foot_comment)\n\tif n.Style&FlowStyle == 0 && n.FootComment != \"\" && len(n.Content) > 1 {\n\t\tn.Content[len(n.Content)-2].FootComment = n.FootComment\n\t\tn.FootComment = \"\"\n\t}\n\tp.expect(yaml_MAPPING_END_EVENT)\n\treturn n\n}\n\n// ----------------------------------------------------------------------------\n// Decoder, unmarshals a node into a provided value.\n\ntype decoder struct {\n\tdoc     *Node\n\taliases map[*Node]bool\n\tterrors []string\n\n\tstringMapType  reflect.Type\n\tgeneralMapType reflect.Type\n\n\tknownFields bool\n\tuniqueKeys  bool\n\tdecodeCount int\n\taliasCount  int\n\taliasDepth  int\n\n\tmergedFields map[interface{}]bool\n}\n\nvar (\n\tnodeType       = reflect.TypeOf(Node{})\n\tdurationType   = reflect.TypeOf(time.Duration(0))\n\tstringMapType  = reflect.TypeOf(map[string]interface{}{})\n\tgeneralMapType = reflect.TypeOf(map[interface{}]interface{}{})\n\tifaceType      = generalMapType.Elem()\n\ttimeType       = reflect.TypeOf(time.Time{})\n\tptrTimeType    = reflect.TypeOf(&time.Time{})\n)\n\nfunc newDecoder() *decoder {\n\td := &decoder{\n\t\tstringMapType:  stringMapType,\n\t\tgeneralMapType: generalMapType,\n\t\tuniqueKeys:     true,\n\t}\n\td.aliases = make(map[*Node]bool)\n\treturn d\n}\n\nfunc (d *decoder) terror(n *Node, tag string, out reflect.Value) {\n\tif n.Tag != \"\" {\n\t\ttag = n.Tag\n\t}\n\tvalue := n.Value\n\tif tag != seqTag && tag != mapTag {\n\t\tif len(value) > 10 {\n\t\t\tvalue = \" `\" + value[:7] + \"...`\"\n\t\t} else {\n\t\t\tvalue = \" `\" + value + \"`\"\n\t\t}\n\t}\n\td.terrors = append(d.terrors, fmt.Sprintf(\"line %d: cannot unmarshal %s%s into %s\", n.Line, shortTag(tag), value, out.Type()))\n}\n\nfunc (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) {\n\terr := u.UnmarshalYAML(n)\n\tif e, ok := err.(*TypeError); ok {\n\t\td.terrors = append(d.terrors, e.Errors...)\n\t\treturn false\n\t}\n\tif err != nil {\n\t\tfail(err)\n\t}\n\treturn true\n}\n\nfunc (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (good bool) {\n\tterrlen := len(d.terrors)\n\terr := u.UnmarshalYAML(func(v interface{}) (err error) {\n\t\tdefer handleErr(&err)\n\t\td.unmarshal(n, reflect.ValueOf(v))\n\t\tif len(d.terrors) > terrlen {\n\t\t\tissues := d.terrors[terrlen:]\n\t\t\td.terrors = d.terrors[:terrlen]\n\t\t\treturn &TypeError{issues}\n\t\t}\n\t\treturn nil\n\t})\n\tif e, ok := err.(*TypeError); ok {\n\t\td.terrors = append(d.terrors, e.Errors...)\n\t\treturn false\n\t}\n\tif err != nil {\n\t\tfail(err)\n\t}\n\treturn true\n}\n\n// d.prepare initializes and dereferences pointers and calls UnmarshalYAML\n// if a value is found to implement it.\n// It returns the initialized and dereferenced out value, whether\n// unmarshalling was already done by UnmarshalYAML, and if so whether\n// its types unmarshalled appropriately.\n//\n// If n holds a null value, prepare returns before doing anything.\nfunc (d *decoder) prepare(n *Node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) {\n\tif n.ShortTag() == nullTag {\n\t\treturn out, false, false\n\t}\n\tagain := true\n\tfor again {\n\t\tagain = false\n\t\tif out.Kind() == reflect.Ptr {\n\t\t\tif out.IsNil() {\n\t\t\t\tout.Set(reflect.New(out.Type().Elem()))\n\t\t\t}\n\t\t\tout = out.Elem()\n\t\t\tagain = true\n\t\t}\n\t\tif out.CanAddr() {\n\t\t\touti := out.Addr().Interface()\n\t\t\tif u, ok := outi.(Unmarshaler); ok {\n\t\t\t\tgood = d.callUnmarshaler(n, u)\n\t\t\t\treturn out, true, good\n\t\t\t}\n\t\t\tif u, ok := outi.(obsoleteUnmarshaler); ok {\n\t\t\t\tgood = d.callObsoleteUnmarshaler(n, u)\n\t\t\t\treturn out, true, good\n\t\t\t}\n\t\t}\n\t}\n\treturn out, false, false\n}\n\nfunc (d *decoder) fieldByIndex(n *Node, v reflect.Value, index []int) (field reflect.Value) {\n\tif n.ShortTag() == nullTag {\n\t\treturn reflect.Value{}\n\t}\n\tfor _, num := range index {\n\t\tfor {\n\t\t\tif v.Kind() == reflect.Ptr {\n\t\t\t\tif v.IsNil() {\n\t\t\t\t\tv.Set(reflect.New(v.Type().Elem()))\n\t\t\t\t}\n\t\t\t\tv = v.Elem()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tv = v.Field(num)\n\t}\n\treturn v\n}\n\nconst (\n\t// 400,000 decode operations is ~500kb of dense object declarations, or\n\t// ~5kb of dense object declarations with 10000% alias expansion\n\talias_ratio_range_low = 400000\n\n\t// 4,000,000 decode operations is ~5MB of dense object declarations, or\n\t// ~4.5MB of dense object declarations with 10% alias expansion\n\talias_ratio_range_high = 4000000\n\n\t// alias_ratio_range is the range over which we scale allowed alias ratios\n\talias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low)\n)\n\nfunc allowedAliasRatio(decodeCount int) float64 {\n\tswitch {\n\tcase decodeCount <= alias_ratio_range_low:\n\t\t// allow 99% to come from alias expansion for small-to-medium documents\n\t\treturn 0.99\n\tcase decodeCount >= alias_ratio_range_high:\n\t\t// allow 10% to come from alias expansion for very large documents\n\t\treturn 0.10\n\tdefault:\n\t\t// scale smoothly from 99% down to 10% over the range.\n\t\t// this maps to 396,000 - 400,000 allowed alias-driven decodes over the range.\n\t\t// 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps).\n\t\treturn 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range)\n\t}\n}\n\nfunc (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) {\n\td.decodeCount++\n\tif d.aliasDepth > 0 {\n\t\td.aliasCount++\n\t}\n\tif d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) {\n\t\tfailf(\"document contains excessive aliasing\")\n\t}\n\tif out.Type() == nodeType {\n\t\tout.Set(reflect.ValueOf(n).Elem())\n\t\treturn true\n\t}\n\tswitch n.Kind {\n\tcase DocumentNode:\n\t\treturn d.document(n, out)\n\tcase AliasNode:\n\t\treturn d.alias(n, out)\n\t}\n\tout, unmarshaled, good := d.prepare(n, out)\n\tif unmarshaled {\n\t\treturn good\n\t}\n\tswitch n.Kind {\n\tcase ScalarNode:\n\t\tgood = d.scalar(n, out)\n\tcase MappingNode:\n\t\tgood = d.mapping(n, out)\n\tcase SequenceNode:\n\t\tgood = d.sequence(n, out)\n\tcase 0:\n\t\tif n.IsZero() {\n\t\t\treturn d.null(out)\n\t\t}\n\t\tfallthrough\n\tdefault:\n\t\tfailf(\"cannot decode node with unknown kind %d\", n.Kind)\n\t}\n\treturn good\n}\n\nfunc (d *decoder) document(n *Node, out reflect.Value) (good bool) {\n\tif len(n.Content) == 1 {\n\t\td.doc = n\n\t\td.unmarshal(n.Content[0], out)\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (d *decoder) alias(n *Node, out reflect.Value) (good bool) {\n\tif d.aliases[n] {\n\t\t// TODO this could actually be allowed in some circumstances.\n\t\tfailf(\"anchor '%s' value contains itself\", n.Value)\n\t}\n\td.aliases[n] = true\n\td.aliasDepth++\n\tgood = d.unmarshal(n.Alias, out)\n\td.aliasDepth--\n\tdelete(d.aliases, n)\n\treturn good\n}\n\nvar zeroValue reflect.Value\n\nfunc resetMap(out reflect.Value) {\n\tfor _, k := range out.MapKeys() {\n\t\tout.SetMapIndex(k, zeroValue)\n\t}\n}\n\nfunc (d *decoder) null(out reflect.Value) bool {\n\tif out.CanAddr() {\n\t\tswitch out.Kind() {\n\t\tcase reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:\n\t\t\tout.Set(reflect.Zero(out.Type()))\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (d *decoder) scalar(n *Node, out reflect.Value) bool {\n\tvar tag string\n\tvar resolved interface{}\n\tif n.indicatedString() {\n\t\ttag = strTag\n\t\tresolved = n.Value\n\t} else {\n\t\ttag, resolved = resolve(n.Tag, n.Value)\n\t\tif tag == binaryTag {\n\t\t\tdata, err := base64.StdEncoding.DecodeString(resolved.(string))\n\t\t\tif err != nil {\n\t\t\t\tfailf(\"!!binary value contains invalid base64 data\")\n\t\t\t}\n\t\t\tresolved = string(data)\n\t\t}\n\t}\n\tif resolved == nil {\n\t\treturn d.null(out)\n\t}\n\tif resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() {\n\t\t// We've resolved to exactly the type we want, so use that.\n\t\tout.Set(resolvedv)\n\t\treturn true\n\t}\n\t// Perhaps we can use the value as a TextUnmarshaler to\n\t// set its value.\n\tif out.CanAddr() {\n\t\tu, ok := out.Addr().Interface().(encoding.TextUnmarshaler)\n\t\tif ok {\n\t\t\tvar text []byte\n\t\t\tif tag == binaryTag {\n\t\t\t\ttext = []byte(resolved.(string))\n\t\t\t} else {\n\t\t\t\t// We let any value be unmarshaled into TextUnmarshaler.\n\t\t\t\t// That might be more lax than we'd like, but the\n\t\t\t\t// TextUnmarshaler itself should bowl out any dubious values.\n\t\t\t\ttext = []byte(n.Value)\n\t\t\t}\n\t\t\terr := u.UnmarshalText(text)\n\t\t\tif err != nil {\n\t\t\t\tfail(err)\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t}\n\tswitch out.Kind() {\n\tcase reflect.String:\n\t\tif tag == binaryTag {\n\t\t\tout.SetString(resolved.(string))\n\t\t\treturn true\n\t\t}\n\t\tout.SetString(n.Value)\n\t\treturn true\n\tcase reflect.Interface:\n\t\tout.Set(reflect.ValueOf(resolved))\n\t\treturn true\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t// This used to work in v2, but it's very unfriendly.\n\t\tisDuration := out.Type() == durationType\n\n\t\tswitch resolved := resolved.(type) {\n\t\tcase int:\n\t\t\tif !isDuration && !out.OverflowInt(int64(resolved)) {\n\t\t\t\tout.SetInt(int64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase int64:\n\t\t\tif !isDuration && !out.OverflowInt(resolved) {\n\t\t\t\tout.SetInt(resolved)\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase uint64:\n\t\t\tif !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) {\n\t\t\t\tout.SetInt(int64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase float64:\n\t\t\tif !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) {\n\t\t\t\tout.SetInt(int64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase string:\n\t\t\tif out.Type() == durationType {\n\t\t\t\td, err := time.ParseDuration(resolved)\n\t\t\t\tif err == nil {\n\t\t\t\t\tout.SetInt(int64(d))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\tswitch resolved := resolved.(type) {\n\t\tcase int:\n\t\t\tif resolved >= 0 && !out.OverflowUint(uint64(resolved)) {\n\t\t\t\tout.SetUint(uint64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase int64:\n\t\t\tif resolved >= 0 && !out.OverflowUint(uint64(resolved)) {\n\t\t\t\tout.SetUint(uint64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase uint64:\n\t\t\tif !out.OverflowUint(uint64(resolved)) {\n\t\t\t\tout.SetUint(uint64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\tcase float64:\n\t\t\tif resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) {\n\t\t\t\tout.SetUint(uint64(resolved))\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\tcase reflect.Bool:\n\t\tswitch resolved := resolved.(type) {\n\t\tcase bool:\n\t\t\tout.SetBool(resolved)\n\t\t\treturn true\n\t\tcase string:\n\t\t\t// This offers some compatibility with the 1.1 spec (https://yaml.org/type/bool.html).\n\t\t\t// It only works if explicitly attempting to unmarshal into a typed bool value.\n\t\t\tswitch resolved {\n\t\t\tcase \"y\", \"Y\", \"yes\", \"Yes\", \"YES\", \"on\", \"On\", \"ON\":\n\t\t\t\tout.SetBool(true)\n\t\t\t\treturn true\n\t\t\tcase \"n\", \"N\", \"no\", \"No\", \"NO\", \"off\", \"Off\", \"OFF\":\n\t\t\t\tout.SetBool(false)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\tcase reflect.Float32, reflect.Float64:\n\t\tswitch resolved := resolved.(type) {\n\t\tcase int:\n\t\t\tout.SetFloat(float64(resolved))\n\t\t\treturn true\n\t\tcase int64:\n\t\t\tout.SetFloat(float64(resolved))\n\t\t\treturn true\n\t\tcase uint64:\n\t\t\tout.SetFloat(float64(resolved))\n\t\t\treturn true\n\t\tcase float64:\n\t\t\tout.SetFloat(resolved)\n\t\t\treturn true\n\t\t}\n\tcase reflect.Struct:\n\t\tif resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() {\n\t\t\tout.Set(resolvedv)\n\t\t\treturn true\n\t\t}\n\tcase reflect.Ptr:\n\t\tpanic(\"yaml internal error: please report the issue\")\n\t}\n\td.terror(n, tag, out)\n\treturn false\n}\n\nfunc settableValueOf(i interface{}) reflect.Value {\n\tv := reflect.ValueOf(i)\n\tsv := reflect.New(v.Type()).Elem()\n\tsv.Set(v)\n\treturn sv\n}\n\nfunc (d *decoder) sequence(n *Node, out reflect.Value) (good bool) {\n\tl := len(n.Content)\n\n\tvar iface reflect.Value\n\tswitch out.Kind() {\n\tcase reflect.Slice:\n\t\tout.Set(reflect.MakeSlice(out.Type(), l, l))\n\tcase reflect.Array:\n\t\tif l != out.Len() {\n\t\t\tfailf(\"invalid array: want %d elements but got %d\", out.Len(), l)\n\t\t}\n\tcase reflect.Interface:\n\t\t// No type hints. Will have to use a generic sequence.\n\t\tiface = out\n\t\tout = settableValueOf(make([]interface{}, l))\n\tdefault:\n\t\td.terror(n, seqTag, out)\n\t\treturn false\n\t}\n\tet := out.Type().Elem()\n\n\tj := 0\n\tfor i := 0; i < l; i++ {\n\t\te := reflect.New(et).Elem()\n\t\tif ok := d.unmarshal(n.Content[i], e); ok {\n\t\t\tout.Index(j).Set(e)\n\t\t\tj++\n\t\t}\n\t}\n\tif out.Kind() != reflect.Array {\n\t\tout.Set(out.Slice(0, j))\n\t}\n\tif iface.IsValid() {\n\t\tiface.Set(out)\n\t}\n\treturn true\n}\n\nfunc (d *decoder) mapping(n *Node, out reflect.Value) (good bool) {\n\tl := len(n.Content)\n\tif d.uniqueKeys {\n\t\tnerrs := len(d.terrors)\n\t\tfor i := 0; i < l; i += 2 {\n\t\t\tni := n.Content[i]\n\t\t\tfor j := i + 2; j < l; j += 2 {\n\t\t\t\tnj := n.Content[j]\n\t\t\t\tif ni.Kind == nj.Kind && ni.Value == nj.Value {\n\t\t\t\t\td.terrors = append(d.terrors, fmt.Sprintf(\"line %d: mapping key %#v already defined at line %d\", nj.Line, nj.Value, ni.Line))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif len(d.terrors) > nerrs {\n\t\t\treturn false\n\t\t}\n\t}\n\tswitch out.Kind() {\n\tcase reflect.Struct:\n\t\treturn d.mappingStruct(n, out)\n\tcase reflect.Map:\n\t\t// okay\n\tcase reflect.Interface:\n\t\tiface := out\n\t\tif isStringMap(n) {\n\t\t\tout = reflect.MakeMap(d.stringMapType)\n\t\t} else {\n\t\t\tout = reflect.MakeMap(d.generalMapType)\n\t\t}\n\t\tiface.Set(out)\n\tdefault:\n\t\td.terror(n, mapTag, out)\n\t\treturn false\n\t}\n\n\toutt := out.Type()\n\tkt := outt.Key()\n\tet := outt.Elem()\n\n\tstringMapType := d.stringMapType\n\tgeneralMapType := d.generalMapType\n\tif outt.Elem() == ifaceType {\n\t\tif outt.Key().Kind() == reflect.String {\n\t\t\td.stringMapType = outt\n\t\t} else if outt.Key() == ifaceType {\n\t\t\td.generalMapType = outt\n\t\t}\n\t}\n\n\tmergedFields := d.mergedFields\n\td.mergedFields = nil\n\n\tvar mergeNode *Node\n\n\tmapIsNew := false\n\tif out.IsNil() {\n\t\tout.Set(reflect.MakeMap(outt))\n\t\tmapIsNew = true\n\t}\n\tfor i := 0; i < l; i += 2 {\n\t\tif isMerge(n.Content[i]) {\n\t\t\tmergeNode = n.Content[i+1]\n\t\t\tcontinue\n\t\t}\n\t\tk := reflect.New(kt).Elem()\n\t\tif d.unmarshal(n.Content[i], k) {\n\t\t\tif mergedFields != nil {\n\t\t\t\tki := k.Interface()\n\t\t\t\tif mergedFields[ki] {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tmergedFields[ki] = true\n\t\t\t}\n\t\t\tkkind := k.Kind()\n\t\t\tif kkind == reflect.Interface {\n\t\t\t\tkkind = k.Elem().Kind()\n\t\t\t}\n\t\t\tif kkind == reflect.Map || kkind == reflect.Slice {\n\t\t\t\tfailf(\"invalid map key: %#v\", k.Interface())\n\t\t\t}\n\t\t\te := reflect.New(et).Elem()\n\t\t\tif d.unmarshal(n.Content[i+1], e) || n.Content[i+1].ShortTag() == nullTag && (mapIsNew || !out.MapIndex(k).IsValid()) {\n\t\t\t\tout.SetMapIndex(k, e)\n\t\t\t}\n\t\t}\n\t}\n\n\td.mergedFields = mergedFields\n\tif mergeNode != nil {\n\t\td.merge(n, mergeNode, out)\n\t}\n\n\td.stringMapType = stringMapType\n\td.generalMapType = generalMapType\n\treturn true\n}\n\nfunc isStringMap(n *Node) bool {\n\tif n.Kind != MappingNode {\n\t\treturn false\n\t}\n\tl := len(n.Content)\n\tfor i := 0; i < l; i += 2 {\n\t\tshortTag := n.Content[i].ShortTag()\n\t\tif shortTag != strTag && shortTag != mergeTag {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) {\n\tsinfo, err := getStructInfo(out.Type())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tvar inlineMap reflect.Value\n\tvar elemType reflect.Type\n\tif sinfo.InlineMap != -1 {\n\t\tinlineMap = out.Field(sinfo.InlineMap)\n\t\telemType = inlineMap.Type().Elem()\n\t}\n\n\tfor _, index := range sinfo.InlineUnmarshalers {\n\t\tfield := d.fieldByIndex(n, out, index)\n\t\td.prepare(n, field)\n\t}\n\n\tmergedFields := d.mergedFields\n\td.mergedFields = nil\n\tvar mergeNode *Node\n\tvar doneFields []bool\n\tif d.uniqueKeys {\n\t\tdoneFields = make([]bool, len(sinfo.FieldsList))\n\t}\n\tname := settableValueOf(\"\")\n\tl := len(n.Content)\n\tfor i := 0; i < l; i += 2 {\n\t\tni := n.Content[i]\n\t\tif isMerge(ni) {\n\t\t\tmergeNode = n.Content[i+1]\n\t\t\tcontinue\n\t\t}\n\t\tif !d.unmarshal(ni, name) {\n\t\t\tcontinue\n\t\t}\n\t\tsname := name.String()\n\t\tif mergedFields != nil {\n\t\t\tif mergedFields[sname] {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmergedFields[sname] = true\n\t\t}\n\t\tif info, ok := sinfo.FieldsMap[sname]; ok {\n\t\t\tif d.uniqueKeys {\n\t\t\t\tif doneFields[info.Id] {\n\t\t\t\t\td.terrors = append(d.terrors, fmt.Sprintf(\"line %d: field %s already set in type %s\", ni.Line, name.String(), out.Type()))\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tdoneFields[info.Id] = true\n\t\t\t}\n\t\t\tvar field reflect.Value\n\t\t\tif info.Inline == nil {\n\t\t\t\tfield = out.Field(info.Num)\n\t\t\t} else {\n\t\t\t\tfield = d.fieldByIndex(n, out, info.Inline)\n\t\t\t}\n\t\t\td.unmarshal(n.Content[i+1], field)\n\t\t} else if sinfo.InlineMap != -1 {\n\t\t\tif inlineMap.IsNil() {\n\t\t\t\tinlineMap.Set(reflect.MakeMap(inlineMap.Type()))\n\t\t\t}\n\t\t\tvalue := reflect.New(elemType).Elem()\n\t\t\td.unmarshal(n.Content[i+1], value)\n\t\t\tinlineMap.SetMapIndex(name, value)\n\t\t} else if d.knownFields {\n\t\t\td.terrors = append(d.terrors, fmt.Sprintf(\"line %d: field %s not found in type %s\", ni.Line, name.String(), out.Type()))\n\t\t}\n\t}\n\n\td.mergedFields = mergedFields\n\tif mergeNode != nil {\n\t\td.merge(n, mergeNode, out)\n\t}\n\treturn true\n}\n\nfunc failWantMap() {\n\tfailf(\"map merge requires map or sequence of maps as the value\")\n}\n\nfunc (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) {\n\tmergedFields := d.mergedFields\n\tif mergedFields == nil {\n\t\td.mergedFields = make(map[interface{}]bool)\n\t\tfor i := 0; i < len(parent.Content); i += 2 {\n\t\t\tk := reflect.New(ifaceType).Elem()\n\t\t\tif d.unmarshal(parent.Content[i], k) {\n\t\t\t\td.mergedFields[k.Interface()] = true\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch merge.Kind {\n\tcase MappingNode:\n\t\td.unmarshal(merge, out)\n\tcase AliasNode:\n\t\tif merge.Alias != nil && merge.Alias.Kind != MappingNode {\n\t\t\tfailWantMap()\n\t\t}\n\t\td.unmarshal(merge, out)\n\tcase SequenceNode:\n\t\tfor i := 0; i < len(merge.Content); i++ {\n\t\t\tni := merge.Content[i]\n\t\t\tif ni.Kind == AliasNode {\n\t\t\t\tif ni.Alias != nil && ni.Alias.Kind != MappingNode {\n\t\t\t\t\tfailWantMap()\n\t\t\t\t}\n\t\t\t} else if ni.Kind != MappingNode {\n\t\t\t\tfailWantMap()\n\t\t\t}\n\t\t\td.unmarshal(ni, out)\n\t\t}\n\tdefault:\n\t\tfailWantMap()\n\t}\n\n\td.mergedFields = mergedFields\n}\n\nfunc isMerge(n *Node) bool {\n\treturn n.Kind == ScalarNode && n.Value == \"<<\" && (n.Tag == \"\" || n.Tag == \"!\" || shortTag(n.Tag) == mergeTag)\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/emitterc.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n)\n\n// Flush the buffer if needed.\nfunc flush(emitter *yaml_emitter_t) bool {\n\tif emitter.buffer_pos+5 >= len(emitter.buffer) {\n\t\treturn yaml_emitter_flush(emitter)\n\t}\n\treturn true\n}\n\n// Put a character to the output buffer.\nfunc put(emitter *yaml_emitter_t, value byte) bool {\n\tif emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) {\n\t\treturn false\n\t}\n\temitter.buffer[emitter.buffer_pos] = value\n\temitter.buffer_pos++\n\temitter.column++\n\treturn true\n}\n\n// Put a line break to the output buffer.\nfunc put_break(emitter *yaml_emitter_t) bool {\n\tif emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) {\n\t\treturn false\n\t}\n\tswitch emitter.line_break {\n\tcase yaml_CR_BREAK:\n\t\temitter.buffer[emitter.buffer_pos] = '\\r'\n\t\temitter.buffer_pos += 1\n\tcase yaml_LN_BREAK:\n\t\temitter.buffer[emitter.buffer_pos] = '\\n'\n\t\temitter.buffer_pos += 1\n\tcase yaml_CRLN_BREAK:\n\t\temitter.buffer[emitter.buffer_pos+0] = '\\r'\n\t\temitter.buffer[emitter.buffer_pos+1] = '\\n'\n\t\temitter.buffer_pos += 2\n\tdefault:\n\t\tpanic(\"unknown line break setting\")\n\t}\n\tif emitter.column == 0 {\n\t\temitter.space_above = true\n\t}\n\temitter.column = 0\n\temitter.line++\n\t// [Go] Do this here and below and drop from everywhere else (see commented lines).\n\temitter.indention = true\n\treturn true\n}\n\n// Copy a character from a string into buffer.\nfunc write(emitter *yaml_emitter_t, s []byte, i *int) bool {\n\tif emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) {\n\t\treturn false\n\t}\n\tp := emitter.buffer_pos\n\tw := width(s[*i])\n\tswitch w {\n\tcase 4:\n\t\temitter.buffer[p+3] = s[*i+3]\n\t\tfallthrough\n\tcase 3:\n\t\temitter.buffer[p+2] = s[*i+2]\n\t\tfallthrough\n\tcase 2:\n\t\temitter.buffer[p+1] = s[*i+1]\n\t\tfallthrough\n\tcase 1:\n\t\temitter.buffer[p+0] = s[*i+0]\n\tdefault:\n\t\tpanic(\"unknown character width\")\n\t}\n\temitter.column++\n\temitter.buffer_pos += w\n\t*i += w\n\treturn true\n}\n\n// Write a whole string into buffer.\nfunc write_all(emitter *yaml_emitter_t, s []byte) bool {\n\tfor i := 0; i < len(s); {\n\t\tif !write(emitter, s, &i) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// Copy a line break character from a string into buffer.\nfunc write_break(emitter *yaml_emitter_t, s []byte, i *int) bool {\n\tif s[*i] == '\\n' {\n\t\tif !put_break(emitter) {\n\t\t\treturn false\n\t\t}\n\t\t*i++\n\t} else {\n\t\tif !write(emitter, s, i) {\n\t\t\treturn false\n\t\t}\n\t\tif emitter.column == 0 {\n\t\t\temitter.space_above = true\n\t\t}\n\t\temitter.column = 0\n\t\temitter.line++\n\t\t// [Go] Do this here and above and drop from everywhere else (see commented lines).\n\t\temitter.indention = true\n\t}\n\treturn true\n}\n\n// Set an emitter error and return false.\nfunc yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool {\n\temitter.error = yaml_EMITTER_ERROR\n\temitter.problem = problem\n\treturn false\n}\n\n// Emit an event.\nfunc yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\temitter.events = append(emitter.events, *event)\n\tfor !yaml_emitter_need_more_events(emitter) {\n\t\tevent := &emitter.events[emitter.events_head]\n\t\tif !yaml_emitter_analyze_event(emitter, event) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_state_machine(emitter, event) {\n\t\t\treturn false\n\t\t}\n\t\tyaml_event_delete(event)\n\t\temitter.events_head++\n\t}\n\treturn true\n}\n\n// Check if we need to accumulate more events before emitting.\n//\n// We accumulate extra\n//  - 1 event for DOCUMENT-START\n//  - 2 events for SEQUENCE-START\n//  - 3 events for MAPPING-START\n//\nfunc yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool {\n\tif emitter.events_head == len(emitter.events) {\n\t\treturn true\n\t}\n\tvar accumulate int\n\tswitch emitter.events[emitter.events_head].typ {\n\tcase yaml_DOCUMENT_START_EVENT:\n\t\taccumulate = 1\n\t\tbreak\n\tcase yaml_SEQUENCE_START_EVENT:\n\t\taccumulate = 2\n\t\tbreak\n\tcase yaml_MAPPING_START_EVENT:\n\t\taccumulate = 3\n\t\tbreak\n\tdefault:\n\t\treturn false\n\t}\n\tif len(emitter.events)-emitter.events_head > accumulate {\n\t\treturn false\n\t}\n\tvar level int\n\tfor i := emitter.events_head; i < len(emitter.events); i++ {\n\t\tswitch emitter.events[i].typ {\n\t\tcase yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT:\n\t\t\tlevel++\n\t\tcase yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT:\n\t\t\tlevel--\n\t\t}\n\t\tif level == 0 {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// Append a directive to the directives stack.\nfunc yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool {\n\tfor i := 0; i < len(emitter.tag_directives); i++ {\n\t\tif bytes.Equal(value.handle, emitter.tag_directives[i].handle) {\n\t\t\tif allow_duplicates {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn yaml_emitter_set_emitter_error(emitter, \"duplicate %TAG directive\")\n\t\t}\n\t}\n\n\t// [Go] Do we actually need to copy this given garbage collection\n\t// and the lack of deallocating destructors?\n\ttag_copy := yaml_tag_directive_t{\n\t\thandle: make([]byte, len(value.handle)),\n\t\tprefix: make([]byte, len(value.prefix)),\n\t}\n\tcopy(tag_copy.handle, value.handle)\n\tcopy(tag_copy.prefix, value.prefix)\n\temitter.tag_directives = append(emitter.tag_directives, tag_copy)\n\treturn true\n}\n\n// Increase the indentation level.\nfunc yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool {\n\temitter.indents = append(emitter.indents, emitter.indent)\n\tif emitter.indent < 0 {\n\t\tif flow {\n\t\t\temitter.indent = emitter.best_indent\n\t\t} else {\n\t\t\temitter.indent = 0\n\t\t}\n\t} else if !indentless {\n\t\t// [Go] This was changed so that indentations are more regular.\n\t\tif emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE {\n\t\t\t// The first indent inside a sequence will just skip the \"- \" indicator.\n\t\t\temitter.indent += 2\n\t\t} else {\n\t\t\t// Everything else aligns to the chosen indentation.\n\t\t\temitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent)\n\t\t}\n\t}\n\treturn true\n}\n\n// State dispatcher.\nfunc yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tswitch emitter.state {\n\tdefault:\n\tcase yaml_EMIT_STREAM_START_STATE:\n\t\treturn yaml_emitter_emit_stream_start(emitter, event)\n\n\tcase yaml_EMIT_FIRST_DOCUMENT_START_STATE:\n\t\treturn yaml_emitter_emit_document_start(emitter, event, true)\n\n\tcase yaml_EMIT_DOCUMENT_START_STATE:\n\t\treturn yaml_emitter_emit_document_start(emitter, event, false)\n\n\tcase yaml_EMIT_DOCUMENT_CONTENT_STATE:\n\t\treturn yaml_emitter_emit_document_content(emitter, event)\n\n\tcase yaml_EMIT_DOCUMENT_END_STATE:\n\t\treturn yaml_emitter_emit_document_end(emitter, event)\n\n\tcase yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE:\n\t\treturn yaml_emitter_emit_flow_sequence_item(emitter, event, true, false)\n\n\tcase yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE:\n\t\treturn yaml_emitter_emit_flow_sequence_item(emitter, event, false, true)\n\n\tcase yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE:\n\t\treturn yaml_emitter_emit_flow_sequence_item(emitter, event, false, false)\n\n\tcase yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE:\n\t\treturn yaml_emitter_emit_flow_mapping_key(emitter, event, true, false)\n\n\tcase yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE:\n\t\treturn yaml_emitter_emit_flow_mapping_key(emitter, event, false, true)\n\n\tcase yaml_EMIT_FLOW_MAPPING_KEY_STATE:\n\t\treturn yaml_emitter_emit_flow_mapping_key(emitter, event, false, false)\n\n\tcase yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE:\n\t\treturn yaml_emitter_emit_flow_mapping_value(emitter, event, true)\n\n\tcase yaml_EMIT_FLOW_MAPPING_VALUE_STATE:\n\t\treturn yaml_emitter_emit_flow_mapping_value(emitter, event, false)\n\n\tcase yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE:\n\t\treturn yaml_emitter_emit_block_sequence_item(emitter, event, true)\n\n\tcase yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE:\n\t\treturn yaml_emitter_emit_block_sequence_item(emitter, event, false)\n\n\tcase yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE:\n\t\treturn yaml_emitter_emit_block_mapping_key(emitter, event, true)\n\n\tcase yaml_EMIT_BLOCK_MAPPING_KEY_STATE:\n\t\treturn yaml_emitter_emit_block_mapping_key(emitter, event, false)\n\n\tcase yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE:\n\t\treturn yaml_emitter_emit_block_mapping_value(emitter, event, true)\n\n\tcase yaml_EMIT_BLOCK_MAPPING_VALUE_STATE:\n\t\treturn yaml_emitter_emit_block_mapping_value(emitter, event, false)\n\n\tcase yaml_EMIT_END_STATE:\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"expected nothing after STREAM-END\")\n\t}\n\tpanic(\"invalid emitter state\")\n}\n\n// Expect STREAM-START.\nfunc yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif event.typ != yaml_STREAM_START_EVENT {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"expected STREAM-START\")\n\t}\n\tif emitter.encoding == yaml_ANY_ENCODING {\n\t\temitter.encoding = event.encoding\n\t\tif emitter.encoding == yaml_ANY_ENCODING {\n\t\t\temitter.encoding = yaml_UTF8_ENCODING\n\t\t}\n\t}\n\tif emitter.best_indent < 2 || emitter.best_indent > 9 {\n\t\temitter.best_indent = 2\n\t}\n\tif emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 {\n\t\temitter.best_width = 80\n\t}\n\tif emitter.best_width < 0 {\n\t\temitter.best_width = 1<<31 - 1\n\t}\n\tif emitter.line_break == yaml_ANY_BREAK {\n\t\temitter.line_break = yaml_LN_BREAK\n\t}\n\n\temitter.indent = -1\n\temitter.line = 0\n\temitter.column = 0\n\temitter.whitespace = true\n\temitter.indention = true\n\temitter.space_above = true\n\temitter.foot_indent = -1\n\n\tif emitter.encoding != yaml_UTF8_ENCODING {\n\t\tif !yaml_emitter_write_bom(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\temitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE\n\treturn true\n}\n\n// Expect DOCUMENT-START or STREAM-END.\nfunc yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool {\n\n\tif event.typ == yaml_DOCUMENT_START_EVENT {\n\n\t\tif event.version_directive != nil {\n\t\t\tif !yaml_emitter_analyze_version_directive(emitter, event.version_directive) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tfor i := 0; i < len(event.tag_directives); i++ {\n\t\t\ttag_directive := &event.tag_directives[i]\n\t\t\tif !yaml_emitter_analyze_tag_directive(emitter, tag_directive) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_append_tag_directive(emitter, tag_directive, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tfor i := 0; i < len(default_tag_directives); i++ {\n\t\t\ttag_directive := &default_tag_directives[i]\n\t\t\tif !yaml_emitter_append_tag_directive(emitter, tag_directive, true) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\timplicit := event.implicit\n\t\tif !first || emitter.canonical {\n\t\t\timplicit = false\n\t\t}\n\n\t\tif emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) {\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"...\"), true, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tif event.version_directive != nil {\n\t\t\timplicit = false\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"%YAML\"), true, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"1.1\"), true, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tif len(event.tag_directives) > 0 {\n\t\t\timplicit = false\n\t\t\tfor i := 0; i < len(event.tag_directives); i++ {\n\t\t\t\ttag_directive := &event.tag_directives[i]\n\t\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"%TAG\"), true, false, false) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif yaml_emitter_check_empty_document(emitter) {\n\t\t\timplicit = false\n\t\t}\n\t\tif !implicit {\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"---\"), true, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif emitter.canonical || true {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif len(emitter.head_comment) > 0 {\n\t\t\tif !yaml_emitter_process_head_comment(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !put_break(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\temitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE\n\t\treturn true\n\t}\n\n\tif event.typ == yaml_STREAM_END_EVENT {\n\t\tif emitter.open_ended {\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"...\"), true, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_flush(emitter) {\n\t\t\treturn false\n\t\t}\n\t\temitter.state = yaml_EMIT_END_STATE\n\t\treturn true\n\t}\n\n\treturn yaml_emitter_set_emitter_error(emitter, \"expected DOCUMENT-START or STREAM-END\")\n}\n\n// Expect the root node.\nfunc yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\temitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE)\n\n\tif !yaml_emitter_process_head_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_emit_node(emitter, event, true, false, false, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Expect DOCUMENT-END.\nfunc yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif event.typ != yaml_DOCUMENT_END_EVENT {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"expected DOCUMENT-END\")\n\t}\n\t// [Go] Force document foot separation.\n\temitter.foot_indent = 0\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\temitter.foot_indent = -1\n\tif !yaml_emitter_write_indent(emitter) {\n\t\treturn false\n\t}\n\tif !event.implicit {\n\t\t// [Go] Allocate the slice elsewhere.\n\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"...\"), true, false, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !yaml_emitter_flush(emitter) {\n\t\treturn false\n\t}\n\temitter.state = yaml_EMIT_DOCUMENT_START_STATE\n\temitter.tag_directives = emitter.tag_directives[:0]\n\treturn true\n}\n\n// Expect a flow item node.\nfunc yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool {\n\tif first {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_increase_indent(emitter, true, false) {\n\t\t\treturn false\n\t\t}\n\t\temitter.flow_level++\n\t}\n\n\tif event.typ == yaml_SEQUENCE_END_EVENT {\n\t\tif emitter.canonical && !first && !trail {\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\temitter.flow_level--\n\t\temitter.indent = emitter.indents[len(emitter.indents)-1]\n\t\temitter.indents = emitter.indents[:len(emitter.indents)-1]\n\t\tif emitter.column == 0 || emitter.canonical && !first {\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_process_line_comment(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\t\treturn false\n\t\t}\n\t\temitter.state = emitter.states[len(emitter.states)-1]\n\t\temitter.states = emitter.states[:len(emitter.states)-1]\n\n\t\treturn true\n\t}\n\n\tif !first && !trail {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif !yaml_emitter_process_head_comment(emitter) {\n\t\treturn false\n\t}\n\tif emitter.column == 0 {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif emitter.canonical || emitter.column > emitter.best_width {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 {\n\t\temitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE)\n\t} else {\n\t\temitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE)\n\t}\n\tif !yaml_emitter_emit_node(emitter, event, false, true, false, false) {\n\t\treturn false\n\t}\n\tif len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Expect a flow key node.\nfunc yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool {\n\tif first {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_increase_indent(emitter, true, false) {\n\t\t\treturn false\n\t\t}\n\t\temitter.flow_level++\n\t}\n\n\tif event.typ == yaml_MAPPING_END_EVENT {\n\t\tif (emitter.canonical || len(emitter.head_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0) && !first && !trail {\n\t\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_process_head_comment(emitter) {\n\t\t\treturn false\n\t\t}\n\t\temitter.flow_level--\n\t\temitter.indent = emitter.indents[len(emitter.indents)-1]\n\t\temitter.indents = emitter.indents[:len(emitter.indents)-1]\n\t\tif emitter.canonical && !first {\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_process_line_comment(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\t\treturn false\n\t\t}\n\t\temitter.state = emitter.states[len(emitter.states)-1]\n\t\temitter.states = emitter.states[:len(emitter.states)-1]\n\t\treturn true\n\t}\n\n\tif !first && !trail {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif !yaml_emitter_process_head_comment(emitter) {\n\t\treturn false\n\t}\n\n\tif emitter.column == 0 {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif emitter.canonical || emitter.column > emitter.best_width {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif !emitter.canonical && yaml_emitter_check_simple_key(emitter) {\n\t\temitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE)\n\t\treturn yaml_emitter_emit_node(emitter, event, false, false, true, true)\n\t}\n\tif !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) {\n\t\treturn false\n\t}\n\temitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE)\n\treturn yaml_emitter_emit_node(emitter, event, false, false, true, false)\n}\n\n// Expect a flow value node.\nfunc yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool {\n\tif simple {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t} else {\n\t\tif emitter.canonical || emitter.column > emitter.best_width {\n\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 {\n\t\temitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE)\n\t} else {\n\t\temitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE)\n\t}\n\tif !yaml_emitter_emit_node(emitter, event, false, false, true, false) {\n\t\treturn false\n\t}\n\tif len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Expect a block item node.\nfunc yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\tif !yaml_emitter_increase_indent(emitter, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif event.typ == yaml_SEQUENCE_END_EVENT {\n\t\temitter.indent = emitter.indents[len(emitter.indents)-1]\n\t\temitter.indents = emitter.indents[:len(emitter.indents)-1]\n\t\temitter.state = emitter.states[len(emitter.states)-1]\n\t\temitter.states = emitter.states[:len(emitter.states)-1]\n\t\treturn true\n\t}\n\tif !yaml_emitter_process_head_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_indent(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) {\n\t\treturn false\n\t}\n\temitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE)\n\tif !yaml_emitter_emit_node(emitter, event, false, true, false, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n// Expect a block key node.\nfunc yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\tif !yaml_emitter_increase_indent(emitter, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !yaml_emitter_process_head_comment(emitter) {\n\t\treturn false\n\t}\n\tif event.typ == yaml_MAPPING_END_EVENT {\n\t\temitter.indent = emitter.indents[len(emitter.indents)-1]\n\t\temitter.indents = emitter.indents[:len(emitter.indents)-1]\n\t\temitter.state = emitter.states[len(emitter.states)-1]\n\t\temitter.states = emitter.states[:len(emitter.states)-1]\n\t\treturn true\n\t}\n\tif !yaml_emitter_write_indent(emitter) {\n\t\treturn false\n\t}\n\tif len(emitter.line_comment) > 0 {\n\t\t// [Go] A line comment was provided for the key. That's unusual as the\n\t\t//      scanner associates line comments with the value. Either way,\n\t\t//      save the line comment and render it appropriately later.\n\t\temitter.key_line_comment = emitter.line_comment\n\t\temitter.line_comment = nil\n\t}\n\tif yaml_emitter_check_simple_key(emitter) {\n\t\temitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE)\n\t\treturn yaml_emitter_emit_node(emitter, event, false, false, true, true)\n\t}\n\tif !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) {\n\t\treturn false\n\t}\n\temitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE)\n\treturn yaml_emitter_emit_node(emitter, event, false, false, true, false)\n}\n\n// Expect a block value node.\nfunc yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool {\n\tif simple {\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t} else {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif len(emitter.key_line_comment) > 0 {\n\t\t// [Go] Line comments are generally associated with the value, but when there's\n\t\t//      no value on the same line as a mapping key they end up attached to the\n\t\t//      key itself.\n\t\tif event.typ == yaml_SCALAR_EVENT {\n\t\t\tif len(emitter.line_comment) == 0 {\n\t\t\t\t// A scalar is coming and it has no line comments by itself yet,\n\t\t\t\t// so just let it handle the line comment as usual. If it has a\n\t\t\t\t// line comment, we can't have both so the one from the key is lost.\n\t\t\t\temitter.line_comment = emitter.key_line_comment\n\t\t\t\temitter.key_line_comment = nil\n\t\t\t}\n\t\t} else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) {\n\t\t\t// An indented block follows, so write the comment right now.\n\t\t\temitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment\n\t\t\tif !yaml_emitter_process_line_comment(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\temitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment\n\t\t}\n\t}\n\temitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE)\n\tif !yaml_emitter_emit_node(emitter, event, false, false, true, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_foot_comment(emitter) {\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\treturn event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0\n}\n\n// Expect a node.\nfunc yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t,\n\troot bool, sequence bool, mapping bool, simple_key bool) bool {\n\n\temitter.root_context = root\n\temitter.sequence_context = sequence\n\temitter.mapping_context = mapping\n\temitter.simple_key_context = simple_key\n\n\tswitch event.typ {\n\tcase yaml_ALIAS_EVENT:\n\t\treturn yaml_emitter_emit_alias(emitter, event)\n\tcase yaml_SCALAR_EVENT:\n\t\treturn yaml_emitter_emit_scalar(emitter, event)\n\tcase yaml_SEQUENCE_START_EVENT:\n\t\treturn yaml_emitter_emit_sequence_start(emitter, event)\n\tcase yaml_MAPPING_START_EVENT:\n\t\treturn yaml_emitter_emit_mapping_start(emitter, event)\n\tdefault:\n\t\treturn yaml_emitter_set_emitter_error(emitter,\n\t\t\tfmt.Sprintf(\"expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v\", event.typ))\n\t}\n}\n\n// Expect ALIAS.\nfunc yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif !yaml_emitter_process_anchor(emitter) {\n\t\treturn false\n\t}\n\temitter.state = emitter.states[len(emitter.states)-1]\n\temitter.states = emitter.states[:len(emitter.states)-1]\n\treturn true\n}\n\n// Expect SCALAR.\nfunc yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif !yaml_emitter_select_scalar_style(emitter, event) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_anchor(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_tag(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_increase_indent(emitter, true, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_scalar(emitter) {\n\t\treturn false\n\t}\n\temitter.indent = emitter.indents[len(emitter.indents)-1]\n\temitter.indents = emitter.indents[:len(emitter.indents)-1]\n\temitter.state = emitter.states[len(emitter.states)-1]\n\temitter.states = emitter.states[:len(emitter.states)-1]\n\treturn true\n}\n\n// Expect SEQUENCE-START.\nfunc yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif !yaml_emitter_process_anchor(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_tag(emitter) {\n\t\treturn false\n\t}\n\tif emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE ||\n\t\tyaml_emitter_check_empty_sequence(emitter) {\n\t\temitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE\n\t} else {\n\t\temitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE\n\t}\n\treturn true\n}\n\n// Expect MAPPING-START.\nfunc yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\tif !yaml_emitter_process_anchor(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_tag(emitter) {\n\t\treturn false\n\t}\n\tif emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE ||\n\t\tyaml_emitter_check_empty_mapping(emitter) {\n\t\temitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE\n\t} else {\n\t\temitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE\n\t}\n\treturn true\n}\n\n// Check if the document content is an empty scalar.\nfunc yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool {\n\treturn false // [Go] Huh?\n}\n\n// Check if the next events represent an empty sequence.\nfunc yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool {\n\tif len(emitter.events)-emitter.events_head < 2 {\n\t\treturn false\n\t}\n\treturn emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT &&\n\t\temitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT\n}\n\n// Check if the next events represent an empty mapping.\nfunc yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool {\n\tif len(emitter.events)-emitter.events_head < 2 {\n\t\treturn false\n\t}\n\treturn emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT &&\n\t\temitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT\n}\n\n// Check if the next node can be expressed as a simple key.\nfunc yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool {\n\tlength := 0\n\tswitch emitter.events[emitter.events_head].typ {\n\tcase yaml_ALIAS_EVENT:\n\t\tlength += len(emitter.anchor_data.anchor)\n\tcase yaml_SCALAR_EVENT:\n\t\tif emitter.scalar_data.multiline {\n\t\t\treturn false\n\t\t}\n\t\tlength += len(emitter.anchor_data.anchor) +\n\t\t\tlen(emitter.tag_data.handle) +\n\t\t\tlen(emitter.tag_data.suffix) +\n\t\t\tlen(emitter.scalar_data.value)\n\tcase yaml_SEQUENCE_START_EVENT:\n\t\tif !yaml_emitter_check_empty_sequence(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tlength += len(emitter.anchor_data.anchor) +\n\t\t\tlen(emitter.tag_data.handle) +\n\t\t\tlen(emitter.tag_data.suffix)\n\tcase yaml_MAPPING_START_EVENT:\n\t\tif !yaml_emitter_check_empty_mapping(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tlength += len(emitter.anchor_data.anchor) +\n\t\t\tlen(emitter.tag_data.handle) +\n\t\t\tlen(emitter.tag_data.suffix)\n\tdefault:\n\t\treturn false\n\t}\n\treturn length <= 128\n}\n\n// Determine an acceptable scalar style.\nfunc yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\n\tno_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0\n\tif no_tag && !event.implicit && !event.quoted_implicit {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"neither tag nor implicit flags are specified\")\n\t}\n\n\tstyle := event.scalar_style()\n\tif style == yaml_ANY_SCALAR_STYLE {\n\t\tstyle = yaml_PLAIN_SCALAR_STYLE\n\t}\n\tif emitter.canonical {\n\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t}\n\tif emitter.simple_key_context && emitter.scalar_data.multiline {\n\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t}\n\n\tif style == yaml_PLAIN_SCALAR_STYLE {\n\t\tif emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed ||\n\t\t\temitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed {\n\t\t\tstyle = yaml_SINGLE_QUOTED_SCALAR_STYLE\n\t\t}\n\t\tif len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) {\n\t\t\tstyle = yaml_SINGLE_QUOTED_SCALAR_STYLE\n\t\t}\n\t\tif no_tag && !event.implicit {\n\t\t\tstyle = yaml_SINGLE_QUOTED_SCALAR_STYLE\n\t\t}\n\t}\n\tif style == yaml_SINGLE_QUOTED_SCALAR_STYLE {\n\t\tif !emitter.scalar_data.single_quoted_allowed {\n\t\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t\t}\n\t}\n\tif style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE {\n\t\tif !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context {\n\t\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t\t}\n\t}\n\n\tif no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE {\n\t\temitter.tag_data.handle = []byte{'!'}\n\t}\n\temitter.scalar_data.style = style\n\treturn true\n}\n\n// Write an anchor.\nfunc yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool {\n\tif emitter.anchor_data.anchor == nil {\n\t\treturn true\n\t}\n\tc := []byte{'&'}\n\tif emitter.anchor_data.alias {\n\t\tc[0] = '*'\n\t}\n\tif !yaml_emitter_write_indicator(emitter, c, true, false, false) {\n\t\treturn false\n\t}\n\treturn yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor)\n}\n\n// Write a tag.\nfunc yaml_emitter_process_tag(emitter *yaml_emitter_t) bool {\n\tif len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 {\n\t\treturn true\n\t}\n\tif len(emitter.tag_data.handle) > 0 {\n\t\tif !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) {\n\t\t\treturn false\n\t\t}\n\t\tif len(emitter.tag_data.suffix) > 0 {\n\t\t\tif !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// [Go] Allocate these slices elsewhere.\n\t\tif !yaml_emitter_write_indicator(emitter, []byte(\"!<\"), true, false, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\n// Write a scalar.\nfunc yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool {\n\tswitch emitter.scalar_data.style {\n\tcase yaml_PLAIN_SCALAR_STYLE:\n\t\treturn yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)\n\n\tcase yaml_SINGLE_QUOTED_SCALAR_STYLE:\n\t\treturn yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)\n\n\tcase yaml_DOUBLE_QUOTED_SCALAR_STYLE:\n\t\treturn yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context)\n\n\tcase yaml_LITERAL_SCALAR_STYLE:\n\t\treturn yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value)\n\n\tcase yaml_FOLDED_SCALAR_STYLE:\n\t\treturn yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value)\n\t}\n\tpanic(\"unknown scalar style\")\n}\n\n// Write a head comment.\nfunc yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool {\n\tif len(emitter.tail_comment) > 0 {\n\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\treturn false\n\t\t}\n\t\tif !yaml_emitter_write_comment(emitter, emitter.tail_comment) {\n\t\t\treturn false\n\t\t}\n\t\temitter.tail_comment = emitter.tail_comment[:0]\n\t\temitter.foot_indent = emitter.indent\n\t\tif emitter.foot_indent < 0 {\n\t\t\temitter.foot_indent = 0\n\t\t}\n\t}\n\n\tif len(emitter.head_comment) == 0 {\n\t\treturn true\n\t}\n\tif !yaml_emitter_write_indent(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_comment(emitter, emitter.head_comment) {\n\t\treturn false\n\t}\n\temitter.head_comment = emitter.head_comment[:0]\n\treturn true\n}\n\n// Write an line comment.\nfunc yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool {\n\tif len(emitter.line_comment) == 0 {\n\t\treturn true\n\t}\n\tif !emitter.whitespace {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !yaml_emitter_write_comment(emitter, emitter.line_comment) {\n\t\treturn false\n\t}\n\temitter.line_comment = emitter.line_comment[:0]\n\treturn true\n}\n\n// Write a foot comment.\nfunc yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool {\n\tif len(emitter.foot_comment) == 0 {\n\t\treturn true\n\t}\n\tif !yaml_emitter_write_indent(emitter) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_comment(emitter, emitter.foot_comment) {\n\t\treturn false\n\t}\n\temitter.foot_comment = emitter.foot_comment[:0]\n\temitter.foot_indent = emitter.indent\n\tif emitter.foot_indent < 0 {\n\t\temitter.foot_indent = 0\n\t}\n\treturn true\n}\n\n// Check if a %YAML directive is valid.\nfunc yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool {\n\tif version_directive.major != 1 || version_directive.minor != 1 {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"incompatible %YAML directive\")\n\t}\n\treturn true\n}\n\n// Check if a %TAG directive is valid.\nfunc yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool {\n\thandle := tag_directive.handle\n\tprefix := tag_directive.prefix\n\tif len(handle) == 0 {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag handle must not be empty\")\n\t}\n\tif handle[0] != '!' {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag handle must start with '!'\")\n\t}\n\tif handle[len(handle)-1] != '!' {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag handle must end with '!'\")\n\t}\n\tfor i := 1; i < len(handle)-1; i += width(handle[i]) {\n\t\tif !is_alpha(handle, i) {\n\t\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag handle must contain alphanumerical characters only\")\n\t\t}\n\t}\n\tif len(prefix) == 0 {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag prefix must not be empty\")\n\t}\n\treturn true\n}\n\n// Check if an anchor is valid.\nfunc yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool {\n\tif len(anchor) == 0 {\n\t\tproblem := \"anchor value must not be empty\"\n\t\tif alias {\n\t\t\tproblem = \"alias value must not be empty\"\n\t\t}\n\t\treturn yaml_emitter_set_emitter_error(emitter, problem)\n\t}\n\tfor i := 0; i < len(anchor); i += width(anchor[i]) {\n\t\tif !is_alpha(anchor, i) {\n\t\t\tproblem := \"anchor value must contain alphanumerical characters only\"\n\t\t\tif alias {\n\t\t\t\tproblem = \"alias value must contain alphanumerical characters only\"\n\t\t\t}\n\t\t\treturn yaml_emitter_set_emitter_error(emitter, problem)\n\t\t}\n\t}\n\temitter.anchor_data.anchor = anchor\n\temitter.anchor_data.alias = alias\n\treturn true\n}\n\n// Check if a tag is valid.\nfunc yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool {\n\tif len(tag) == 0 {\n\t\treturn yaml_emitter_set_emitter_error(emitter, \"tag value must not be empty\")\n\t}\n\tfor i := 0; i < len(emitter.tag_directives); i++ {\n\t\ttag_directive := &emitter.tag_directives[i]\n\t\tif bytes.HasPrefix(tag, tag_directive.prefix) {\n\t\t\temitter.tag_data.handle = tag_directive.handle\n\t\t\temitter.tag_data.suffix = tag[len(tag_directive.prefix):]\n\t\t\treturn true\n\t\t}\n\t}\n\temitter.tag_data.suffix = tag\n\treturn true\n}\n\n// Check if a scalar is valid.\nfunc yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool {\n\tvar (\n\t\tblock_indicators   = false\n\t\tflow_indicators    = false\n\t\tline_breaks        = false\n\t\tspecial_characters = false\n\t\ttab_characters     = false\n\n\t\tleading_space  = false\n\t\tleading_break  = false\n\t\ttrailing_space = false\n\t\ttrailing_break = false\n\t\tbreak_space    = false\n\t\tspace_break    = false\n\n\t\tpreceded_by_whitespace = false\n\t\tfollowed_by_whitespace = false\n\t\tprevious_space         = false\n\t\tprevious_break         = false\n\t)\n\n\temitter.scalar_data.value = value\n\n\tif len(value) == 0 {\n\t\temitter.scalar_data.multiline = false\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t\temitter.scalar_data.block_plain_allowed = true\n\t\temitter.scalar_data.single_quoted_allowed = true\n\t\temitter.scalar_data.block_allowed = false\n\t\treturn true\n\t}\n\n\tif len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {\n\t\tblock_indicators = true\n\t\tflow_indicators = true\n\t}\n\n\tpreceded_by_whitespace = true\n\tfor i, w := 0, 0; i < len(value); i += w {\n\t\tw = width(value[i])\n\t\tfollowed_by_whitespace = i+w >= len(value) || is_blank(value, i+w)\n\n\t\tif i == 0 {\n\t\t\tswitch value[i] {\n\t\t\tcase '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\\'', '\"', '%', '@', '`':\n\t\t\t\tflow_indicators = true\n\t\t\t\tblock_indicators = true\n\t\t\tcase '?', ':':\n\t\t\t\tflow_indicators = true\n\t\t\t\tif followed_by_whitespace {\n\t\t\t\t\tblock_indicators = true\n\t\t\t\t}\n\t\t\tcase '-':\n\t\t\t\tif followed_by_whitespace {\n\t\t\t\t\tflow_indicators = true\n\t\t\t\t\tblock_indicators = true\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch value[i] {\n\t\t\tcase ',', '?', '[', ']', '{', '}':\n\t\t\t\tflow_indicators = true\n\t\t\tcase ':':\n\t\t\t\tflow_indicators = true\n\t\t\t\tif followed_by_whitespace {\n\t\t\t\t\tblock_indicators = true\n\t\t\t\t}\n\t\t\tcase '#':\n\t\t\t\tif preceded_by_whitespace {\n\t\t\t\t\tflow_indicators = true\n\t\t\t\t\tblock_indicators = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif value[i] == '\\t' {\n\t\t\ttab_characters = true\n\t\t} else if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode {\n\t\t\tspecial_characters = true\n\t\t}\n\t\tif is_space(value, i) {\n\t\t\tif i == 0 {\n\t\t\t\tleading_space = true\n\t\t\t}\n\t\t\tif i+width(value[i]) == len(value) {\n\t\t\t\ttrailing_space = true\n\t\t\t}\n\t\t\tif previous_break {\n\t\t\t\tbreak_space = true\n\t\t\t}\n\t\t\tprevious_space = true\n\t\t\tprevious_break = false\n\t\t} else if is_break(value, i) {\n\t\t\tline_breaks = true\n\t\t\tif i == 0 {\n\t\t\t\tleading_break = true\n\t\t\t}\n\t\t\tif i+width(value[i]) == len(value) {\n\t\t\t\ttrailing_break = true\n\t\t\t}\n\t\t\tif previous_space {\n\t\t\t\tspace_break = true\n\t\t\t}\n\t\t\tprevious_space = false\n\t\t\tprevious_break = true\n\t\t} else {\n\t\t\tprevious_space = false\n\t\t\tprevious_break = false\n\t\t}\n\n\t\t// [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition.\n\t\tpreceded_by_whitespace = is_blankz(value, i)\n\t}\n\n\temitter.scalar_data.multiline = line_breaks\n\temitter.scalar_data.flow_plain_allowed = true\n\temitter.scalar_data.block_plain_allowed = true\n\temitter.scalar_data.single_quoted_allowed = true\n\temitter.scalar_data.block_allowed = true\n\n\tif leading_space || leading_break || trailing_space || trailing_break {\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t\temitter.scalar_data.block_plain_allowed = false\n\t}\n\tif trailing_space {\n\t\temitter.scalar_data.block_allowed = false\n\t}\n\tif break_space {\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t\temitter.scalar_data.block_plain_allowed = false\n\t\temitter.scalar_data.single_quoted_allowed = false\n\t}\n\tif space_break || tab_characters || special_characters {\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t\temitter.scalar_data.block_plain_allowed = false\n\t\temitter.scalar_data.single_quoted_allowed = false\n\t}\n\tif space_break || special_characters {\n\t\temitter.scalar_data.block_allowed = false\n\t}\n\tif line_breaks {\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t\temitter.scalar_data.block_plain_allowed = false\n\t}\n\tif flow_indicators {\n\t\temitter.scalar_data.flow_plain_allowed = false\n\t}\n\tif block_indicators {\n\t\temitter.scalar_data.block_plain_allowed = false\n\t}\n\treturn true\n}\n\n// Check if the event data is valid.\nfunc yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool {\n\n\temitter.anchor_data.anchor = nil\n\temitter.tag_data.handle = nil\n\temitter.tag_data.suffix = nil\n\temitter.scalar_data.value = nil\n\n\tif len(event.head_comment) > 0 {\n\t\temitter.head_comment = event.head_comment\n\t}\n\tif len(event.line_comment) > 0 {\n\t\temitter.line_comment = event.line_comment\n\t}\n\tif len(event.foot_comment) > 0 {\n\t\temitter.foot_comment = event.foot_comment\n\t}\n\tif len(event.tail_comment) > 0 {\n\t\temitter.tail_comment = event.tail_comment\n\t}\n\n\tswitch event.typ {\n\tcase yaml_ALIAS_EVENT:\n\t\tif !yaml_emitter_analyze_anchor(emitter, event.anchor, true) {\n\t\t\treturn false\n\t\t}\n\n\tcase yaml_SCALAR_EVENT:\n\t\tif len(event.anchor) > 0 {\n\t\t\tif !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) {\n\t\t\tif !yaml_emitter_analyze_tag(emitter, event.tag) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif !yaml_emitter_analyze_scalar(emitter, event.value) {\n\t\t\treturn false\n\t\t}\n\n\tcase yaml_SEQUENCE_START_EVENT:\n\t\tif len(event.anchor) > 0 {\n\t\t\tif !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif len(event.tag) > 0 && (emitter.canonical || !event.implicit) {\n\t\t\tif !yaml_emitter_analyze_tag(emitter, event.tag) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\tcase yaml_MAPPING_START_EVENT:\n\t\tif len(event.anchor) > 0 {\n\t\t\tif !yaml_emitter_analyze_anchor(emitter, event.anchor, false) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif len(event.tag) > 0 && (emitter.canonical || !event.implicit) {\n\t\t\tif !yaml_emitter_analyze_tag(emitter, event.tag) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\treturn true\n}\n\n// Write the BOM character.\nfunc yaml_emitter_write_bom(emitter *yaml_emitter_t) bool {\n\tif !flush(emitter) {\n\t\treturn false\n\t}\n\tpos := emitter.buffer_pos\n\temitter.buffer[pos+0] = '\\xEF'\n\temitter.buffer[pos+1] = '\\xBB'\n\temitter.buffer[pos+2] = '\\xBF'\n\temitter.buffer_pos += 3\n\treturn true\n}\n\nfunc yaml_emitter_write_indent(emitter *yaml_emitter_t) bool {\n\tindent := emitter.indent\n\tif indent < 0 {\n\t\tindent = 0\n\t}\n\tif !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) {\n\t\tif !put_break(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif emitter.foot_indent == indent {\n\t\tif !put_break(emitter) {\n\t\t\treturn false\n\t\t}\n\t}\n\tfor emitter.column < indent {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\temitter.whitespace = true\n\t//emitter.indention = true\n\temitter.space_above = false\n\temitter.foot_indent = -1\n\treturn true\n}\n\nfunc yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool {\n\tif need_whitespace && !emitter.whitespace {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !write_all(emitter, indicator) {\n\t\treturn false\n\t}\n\temitter.whitespace = is_whitespace\n\temitter.indention = (emitter.indention && is_indention)\n\temitter.open_ended = false\n\treturn true\n}\n\nfunc yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool {\n\tif !write_all(emitter, value) {\n\t\treturn false\n\t}\n\temitter.whitespace = false\n\temitter.indention = false\n\treturn true\n}\n\nfunc yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool {\n\tif !emitter.whitespace {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\tif !write_all(emitter, value) {\n\t\treturn false\n\t}\n\temitter.whitespace = false\n\temitter.indention = false\n\treturn true\n}\n\nfunc yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool {\n\tif need_whitespace && !emitter.whitespace {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\tfor i := 0; i < len(value); {\n\t\tvar must_write bool\n\t\tswitch value[i] {\n\t\tcase ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\\'', '(', ')', '[', ']':\n\t\t\tmust_write = true\n\t\tdefault:\n\t\t\tmust_write = is_alpha(value, i)\n\t\t}\n\t\tif must_write {\n\t\t\tif !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\tw := width(value[i])\n\t\t\tfor k := 0; k < w; k++ {\n\t\t\t\toctet := value[i]\n\t\t\t\ti++\n\t\t\t\tif !put(emitter, '%') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tc := octet >> 4\n\t\t\t\tif c < 10 {\n\t\t\t\t\tc += '0'\n\t\t\t\t} else {\n\t\t\t\t\tc += 'A' - 10\n\t\t\t\t}\n\t\t\t\tif !put(emitter, c) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tc = octet & 0x0f\n\t\t\t\tif c < 10 {\n\t\t\t\t\tc += '0'\n\t\t\t\t} else {\n\t\t\t\t\tc += 'A' - 10\n\t\t\t\t}\n\t\t\t\tif !put(emitter, c) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\temitter.whitespace = false\n\temitter.indention = false\n\treturn true\n}\n\nfunc yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool {\n\tif len(value) > 0 && !emitter.whitespace {\n\t\tif !put(emitter, ' ') {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tspaces := false\n\tbreaks := false\n\tfor i := 0; i < len(value); {\n\t\tif is_space(value, i) {\n\t\t\tif allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\ti += width(value[i])\n\t\t\t} else {\n\t\t\t\tif !write(emitter, value, &i) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tspaces = true\n\t\t} else if is_break(value, i) {\n\t\t\tif !breaks && value[i] == '\\n' {\n\t\t\t\tif !put_break(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write_break(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t//emitter.indention = true\n\t\t\tbreaks = true\n\t\t} else {\n\t\t\tif breaks {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\temitter.indention = false\n\t\t\tspaces = false\n\t\t\tbreaks = false\n\t\t}\n\t}\n\n\tif len(value) > 0 {\n\t\temitter.whitespace = false\n\t}\n\temitter.indention = false\n\tif emitter.root_context {\n\t\temitter.open_ended = true\n\t}\n\n\treturn true\n}\n\nfunc yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool {\n\n\tif !yaml_emitter_write_indicator(emitter, []byte{'\\''}, true, false, false) {\n\t\treturn false\n\t}\n\n\tspaces := false\n\tbreaks := false\n\tfor i := 0; i < len(value); {\n\t\tif is_space(value, i) {\n\t\t\tif allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\ti += width(value[i])\n\t\t\t} else {\n\t\t\t\tif !write(emitter, value, &i) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tspaces = true\n\t\t} else if is_break(value, i) {\n\t\t\tif !breaks && value[i] == '\\n' {\n\t\t\t\tif !put_break(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write_break(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t//emitter.indention = true\n\t\t\tbreaks = true\n\t\t} else {\n\t\t\tif breaks {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif value[i] == '\\'' {\n\t\t\t\tif !put(emitter, '\\'') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\temitter.indention = false\n\t\t\tspaces = false\n\t\t\tbreaks = false\n\t\t}\n\t}\n\tif !yaml_emitter_write_indicator(emitter, []byte{'\\''}, false, false, false) {\n\t\treturn false\n\t}\n\temitter.whitespace = false\n\temitter.indention = false\n\treturn true\n}\n\nfunc yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool {\n\tspaces := false\n\tif !yaml_emitter_write_indicator(emitter, []byte{'\"'}, true, false, false) {\n\t\treturn false\n\t}\n\n\tfor i := 0; i < len(value); {\n\t\tif !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) ||\n\t\t\tis_bom(value, i) || is_break(value, i) ||\n\t\t\tvalue[i] == '\"' || value[i] == '\\\\' {\n\n\t\t\toctet := value[i]\n\n\t\t\tvar w int\n\t\t\tvar v rune\n\t\t\tswitch {\n\t\t\tcase octet&0x80 == 0x00:\n\t\t\t\tw, v = 1, rune(octet&0x7F)\n\t\t\tcase octet&0xE0 == 0xC0:\n\t\t\t\tw, v = 2, rune(octet&0x1F)\n\t\t\tcase octet&0xF0 == 0xE0:\n\t\t\t\tw, v = 3, rune(octet&0x0F)\n\t\t\tcase octet&0xF8 == 0xF0:\n\t\t\t\tw, v = 4, rune(octet&0x07)\n\t\t\t}\n\t\t\tfor k := 1; k < w; k++ {\n\t\t\t\toctet = value[i+k]\n\t\t\t\tv = (v << 6) + (rune(octet) & 0x3F)\n\t\t\t}\n\t\t\ti += w\n\n\t\t\tif !put(emitter, '\\\\') {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tvar ok bool\n\t\t\tswitch v {\n\t\t\tcase 0x00:\n\t\t\t\tok = put(emitter, '0')\n\t\t\tcase 0x07:\n\t\t\t\tok = put(emitter, 'a')\n\t\t\tcase 0x08:\n\t\t\t\tok = put(emitter, 'b')\n\t\t\tcase 0x09:\n\t\t\t\tok = put(emitter, 't')\n\t\t\tcase 0x0A:\n\t\t\t\tok = put(emitter, 'n')\n\t\t\tcase 0x0b:\n\t\t\t\tok = put(emitter, 'v')\n\t\t\tcase 0x0c:\n\t\t\t\tok = put(emitter, 'f')\n\t\t\tcase 0x0d:\n\t\t\t\tok = put(emitter, 'r')\n\t\t\tcase 0x1b:\n\t\t\t\tok = put(emitter, 'e')\n\t\t\tcase 0x22:\n\t\t\t\tok = put(emitter, '\"')\n\t\t\tcase 0x5c:\n\t\t\t\tok = put(emitter, '\\\\')\n\t\t\tcase 0x85:\n\t\t\t\tok = put(emitter, 'N')\n\t\t\tcase 0xA0:\n\t\t\t\tok = put(emitter, '_')\n\t\t\tcase 0x2028:\n\t\t\t\tok = put(emitter, 'L')\n\t\t\tcase 0x2029:\n\t\t\t\tok = put(emitter, 'P')\n\t\t\tdefault:\n\t\t\t\tif v <= 0xFF {\n\t\t\t\t\tok = put(emitter, 'x')\n\t\t\t\t\tw = 2\n\t\t\t\t} else if v <= 0xFFFF {\n\t\t\t\t\tok = put(emitter, 'u')\n\t\t\t\t\tw = 4\n\t\t\t\t} else {\n\t\t\t\t\tok = put(emitter, 'U')\n\t\t\t\t\tw = 8\n\t\t\t\t}\n\t\t\t\tfor k := (w - 1) * 4; ok && k >= 0; k -= 4 {\n\t\t\t\t\tdigit := byte((v >> uint(k)) & 0x0F)\n\t\t\t\t\tif digit < 10 {\n\t\t\t\t\t\tok = put(emitter, digit+'0')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tok = put(emitter, digit+'A'-10)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !ok {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tspaces = false\n\t\t} else if is_space(value, i) {\n\t\t\tif allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif is_space(value, i+1) {\n\t\t\t\t\tif !put(emitter, '\\\\') {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti += width(value[i])\n\t\t\t} else if !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tspaces = true\n\t\t} else {\n\t\t\tif !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tspaces = false\n\t\t}\n\t}\n\tif !yaml_emitter_write_indicator(emitter, []byte{'\"'}, false, false, false) {\n\t\treturn false\n\t}\n\temitter.whitespace = false\n\temitter.indention = false\n\treturn true\n}\n\nfunc yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool {\n\tif is_space(value, 0) || is_break(value, 0) {\n\t\tindent_hint := []byte{'0' + byte(emitter.best_indent)}\n\t\tif !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\temitter.open_ended = false\n\n\tvar chomp_hint [1]byte\n\tif len(value) == 0 {\n\t\tchomp_hint[0] = '-'\n\t} else {\n\t\ti := len(value) - 1\n\t\tfor value[i]&0xC0 == 0x80 {\n\t\t\ti--\n\t\t}\n\t\tif !is_break(value, i) {\n\t\t\tchomp_hint[0] = '-'\n\t\t} else if i == 0 {\n\t\t\tchomp_hint[0] = '+'\n\t\t\temitter.open_ended = true\n\t\t} else {\n\t\t\ti--\n\t\t\tfor value[i]&0xC0 == 0x80 {\n\t\t\t\ti--\n\t\t\t}\n\t\t\tif is_break(value, i) {\n\t\t\t\tchomp_hint[0] = '+'\n\t\t\t\temitter.open_ended = true\n\t\t\t}\n\t\t}\n\t}\n\tif chomp_hint[0] != 0 {\n\t\tif !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool {\n\tif !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_block_scalar_hints(emitter, value) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\t//emitter.indention = true\n\temitter.whitespace = true\n\tbreaks := true\n\tfor i := 0; i < len(value); {\n\t\tif is_break(value, i) {\n\t\t\tif !write_break(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t//emitter.indention = true\n\t\t\tbreaks = true\n\t\t} else {\n\t\t\tif breaks {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\temitter.indention = false\n\t\t\tbreaks = false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool {\n\tif !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_write_block_scalar_hints(emitter, value) {\n\t\treturn false\n\t}\n\tif !yaml_emitter_process_line_comment(emitter) {\n\t\treturn false\n\t}\n\n\t//emitter.indention = true\n\temitter.whitespace = true\n\n\tbreaks := true\n\tleading_spaces := true\n\tfor i := 0; i < len(value); {\n\t\tif is_break(value, i) {\n\t\t\tif !breaks && !leading_spaces && value[i] == '\\n' {\n\t\t\t\tk := 0\n\t\t\t\tfor is_break(value, k) {\n\t\t\t\t\tk += width(value[k])\n\t\t\t\t}\n\t\t\t\tif !is_blankz(value, k) {\n\t\t\t\t\tif !put_break(emitter) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !write_break(emitter, value, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t//emitter.indention = true\n\t\t\tbreaks = true\n\t\t} else {\n\t\t\tif breaks {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tleading_spaces = is_blank(value, i)\n\t\t\t}\n\t\t\tif !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width {\n\t\t\t\tif !yaml_emitter_write_indent(emitter) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\ti += width(value[i])\n\t\t\t} else {\n\t\t\t\tif !write(emitter, value, &i) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\temitter.indention = false\n\t\t\tbreaks = false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc yaml_emitter_write_comment(emitter *yaml_emitter_t, comment []byte) bool {\n\tbreaks := false\n\tpound := false\n\tfor i := 0; i < len(comment); {\n\t\tif is_break(comment, i) {\n\t\t\tif !write_break(emitter, comment, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t//emitter.indention = true\n\t\t\tbreaks = true\n\t\t\tpound = false\n\t\t} else {\n\t\t\tif breaks && !yaml_emitter_write_indent(emitter) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif !pound {\n\t\t\t\tif comment[i] != '#' && (!put(emitter, '#') || !put(emitter, ' ')) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tpound = true\n\t\t\t}\n\t\t\tif !write(emitter, comment, &i) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\temitter.indention = false\n\t\t\tbreaks = false\n\t\t}\n\t}\n\tif !breaks && !put_break(emitter) {\n\t\treturn false\n\t}\n\n\temitter.whitespace = true\n\t//emitter.indention = true\n\treturn true\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/encode.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage yaml\n\nimport (\n\t\"encoding\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode/utf8\"\n)\n\ntype encoder struct {\n\temitter  yaml_emitter_t\n\tevent    yaml_event_t\n\tout      []byte\n\tflow     bool\n\tindent   int\n\tdoneInit bool\n}\n\nfunc newEncoder() *encoder {\n\te := &encoder{}\n\tyaml_emitter_initialize(&e.emitter)\n\tyaml_emitter_set_output_string(&e.emitter, &e.out)\n\tyaml_emitter_set_unicode(&e.emitter, true)\n\treturn e\n}\n\nfunc newEncoderWithWriter(w io.Writer) *encoder {\n\te := &encoder{}\n\tyaml_emitter_initialize(&e.emitter)\n\tyaml_emitter_set_output_writer(&e.emitter, w)\n\tyaml_emitter_set_unicode(&e.emitter, true)\n\treturn e\n}\n\nfunc (e *encoder) init() {\n\tif e.doneInit {\n\t\treturn\n\t}\n\tif e.indent == 0 {\n\t\te.indent = 4\n\t}\n\te.emitter.best_indent = e.indent\n\tyaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING)\n\te.emit()\n\te.doneInit = true\n}\n\nfunc (e *encoder) finish() {\n\te.emitter.open_ended = false\n\tyaml_stream_end_event_initialize(&e.event)\n\te.emit()\n}\n\nfunc (e *encoder) destroy() {\n\tyaml_emitter_delete(&e.emitter)\n}\n\nfunc (e *encoder) emit() {\n\t// This will internally delete the e.event value.\n\te.must(yaml_emitter_emit(&e.emitter, &e.event))\n}\n\nfunc (e *encoder) must(ok bool) {\n\tif !ok {\n\t\tmsg := e.emitter.problem\n\t\tif msg == \"\" {\n\t\t\tmsg = \"unknown problem generating YAML content\"\n\t\t}\n\t\tfailf(\"%s\", msg)\n\t}\n}\n\nfunc (e *encoder) marshalDoc(tag string, in reflect.Value) {\n\te.init()\n\tvar node *Node\n\tif in.IsValid() {\n\t\tnode, _ = in.Interface().(*Node)\n\t}\n\tif node != nil && node.Kind == DocumentNode {\n\t\te.nodev(in)\n\t} else {\n\t\tyaml_document_start_event_initialize(&e.event, nil, nil, true)\n\t\te.emit()\n\t\te.marshal(tag, in)\n\t\tyaml_document_end_event_initialize(&e.event, true)\n\t\te.emit()\n\t}\n}\n\nfunc (e *encoder) marshal(tag string, in reflect.Value) {\n\ttag = shortTag(tag)\n\tif !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() {\n\t\te.nilv()\n\t\treturn\n\t}\n\tiface := in.Interface()\n\tswitch value := iface.(type) {\n\tcase *Node:\n\t\te.nodev(in)\n\t\treturn\n\tcase Node:\n\t\tif !in.CanAddr() {\n\t\t\tvar n = reflect.New(in.Type()).Elem()\n\t\t\tn.Set(in)\n\t\t\tin = n\n\t\t}\n\t\te.nodev(in.Addr())\n\t\treturn\n\tcase time.Time:\n\t\te.timev(tag, in)\n\t\treturn\n\tcase *time.Time:\n\t\te.timev(tag, in.Elem())\n\t\treturn\n\tcase time.Duration:\n\t\te.stringv(tag, reflect.ValueOf(value.String()))\n\t\treturn\n\tcase Marshaler:\n\t\tv, err := value.MarshalYAML()\n\t\tif err != nil {\n\t\t\tfail(err)\n\t\t}\n\t\tif v == nil {\n\t\t\te.nilv()\n\t\t\treturn\n\t\t}\n\t\te.marshal(tag, reflect.ValueOf(v))\n\t\treturn\n\tcase encoding.TextMarshaler:\n\t\ttext, err := value.MarshalText()\n\t\tif err != nil {\n\t\t\tfail(err)\n\t\t}\n\t\tin = reflect.ValueOf(string(text))\n\tcase nil:\n\t\te.nilv()\n\t\treturn\n\t}\n\tswitch in.Kind() {\n\tcase reflect.Interface:\n\t\te.marshal(tag, in.Elem())\n\tcase reflect.Map:\n\t\te.mapv(tag, in)\n\tcase reflect.Ptr:\n\t\te.marshal(tag, in.Elem())\n\tcase reflect.Struct:\n\t\te.structv(tag, in)\n\tcase reflect.Slice, reflect.Array:\n\t\te.slicev(tag, in)\n\tcase reflect.String:\n\t\te.stringv(tag, in)\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\te.intv(tag, in)\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\te.uintv(tag, in)\n\tcase reflect.Float32, reflect.Float64:\n\t\te.floatv(tag, in)\n\tcase reflect.Bool:\n\t\te.boolv(tag, in)\n\tdefault:\n\t\tpanic(\"cannot marshal type: \" + in.Type().String())\n\t}\n}\n\nfunc (e *encoder) mapv(tag string, in reflect.Value) {\n\te.mappingv(tag, func() {\n\t\tkeys := keyList(in.MapKeys())\n\t\tsort.Sort(keys)\n\t\tfor _, k := range keys {\n\t\t\te.marshal(\"\", k)\n\t\t\te.marshal(\"\", in.MapIndex(k))\n\t\t}\n\t})\n}\n\nfunc (e *encoder) fieldByIndex(v reflect.Value, index []int) (field reflect.Value) {\n\tfor _, num := range index {\n\t\tfor {\n\t\t\tif v.Kind() == reflect.Ptr {\n\t\t\t\tif v.IsNil() {\n\t\t\t\t\treturn reflect.Value{}\n\t\t\t\t}\n\t\t\t\tv = v.Elem()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t\tv = v.Field(num)\n\t}\n\treturn v\n}\n\nfunc (e *encoder) structv(tag string, in reflect.Value) {\n\tsinfo, err := getStructInfo(in.Type())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\te.mappingv(tag, func() {\n\t\tfor _, info := range sinfo.FieldsList {\n\t\t\tvar value reflect.Value\n\t\t\tif info.Inline == nil {\n\t\t\t\tvalue = in.Field(info.Num)\n\t\t\t} else {\n\t\t\t\tvalue = e.fieldByIndex(in, info.Inline)\n\t\t\t\tif !value.IsValid() {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tif info.OmitEmpty && isZero(value) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\te.marshal(\"\", reflect.ValueOf(info.Key))\n\t\t\te.flow = info.Flow\n\t\t\te.marshal(\"\", value)\n\t\t}\n\t\tif sinfo.InlineMap >= 0 {\n\t\t\tm := in.Field(sinfo.InlineMap)\n\t\t\tif m.Len() > 0 {\n\t\t\t\te.flow = false\n\t\t\t\tkeys := keyList(m.MapKeys())\n\t\t\t\tsort.Sort(keys)\n\t\t\t\tfor _, k := range keys {\n\t\t\t\t\tif _, found := sinfo.FieldsMap[k.String()]; found {\n\t\t\t\t\t\tpanic(fmt.Sprintf(\"cannot have key %q in inlined map: conflicts with struct field\", k.String()))\n\t\t\t\t\t}\n\t\t\t\t\te.marshal(\"\", k)\n\t\t\t\t\te.flow = false\n\t\t\t\t\te.marshal(\"\", m.MapIndex(k))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc (e *encoder) mappingv(tag string, f func()) {\n\timplicit := tag == \"\"\n\tstyle := yaml_BLOCK_MAPPING_STYLE\n\tif e.flow {\n\t\te.flow = false\n\t\tstyle = yaml_FLOW_MAPPING_STYLE\n\t}\n\tyaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)\n\te.emit()\n\tf()\n\tyaml_mapping_end_event_initialize(&e.event)\n\te.emit()\n}\n\nfunc (e *encoder) slicev(tag string, in reflect.Value) {\n\timplicit := tag == \"\"\n\tstyle := yaml_BLOCK_SEQUENCE_STYLE\n\tif e.flow {\n\t\te.flow = false\n\t\tstyle = yaml_FLOW_SEQUENCE_STYLE\n\t}\n\te.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style))\n\te.emit()\n\tn := in.Len()\n\tfor i := 0; i < n; i++ {\n\t\te.marshal(\"\", in.Index(i))\n\t}\n\te.must(yaml_sequence_end_event_initialize(&e.event))\n\te.emit()\n}\n\n// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1.\n//\n// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported\n// in YAML 1.2 and by this package, but these should be marshalled quoted for\n// the time being for compatibility with other parsers.\nfunc isBase60Float(s string) (result bool) {\n\t// Fast path.\n\tif s == \"\" {\n\t\treturn false\n\t}\n\tc := s[0]\n\tif !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 {\n\t\treturn false\n\t}\n\t// Do the full match.\n\treturn base60float.MatchString(s)\n}\n\n// From http://yaml.org/type/float.html, except the regular expression there\n// is bogus. In practice parsers do not enforce the \"\\.[0-9_]*\" suffix.\nvar base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\\.[0-9_]*)?$`)\n\n// isOldBool returns whether s is bool notation as defined in YAML 1.1.\n//\n// We continue to force strings that YAML 1.1 would interpret as booleans to be\n// rendered as quotes strings so that the marshalled output valid for YAML 1.1\n// parsing.\nfunc isOldBool(s string) (result bool) {\n\tswitch s {\n\tcase \"y\", \"Y\", \"yes\", \"Yes\", \"YES\", \"on\", \"On\", \"ON\",\n\t\t\"n\", \"N\", \"no\", \"No\", \"NO\", \"off\", \"Off\", \"OFF\":\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc (e *encoder) stringv(tag string, in reflect.Value) {\n\tvar style yaml_scalar_style_t\n\ts := in.String()\n\tcanUsePlain := true\n\tswitch {\n\tcase !utf8.ValidString(s):\n\t\tif tag == binaryTag {\n\t\t\tfailf(\"explicitly tagged !!binary data must be base64-encoded\")\n\t\t}\n\t\tif tag != \"\" {\n\t\t\tfailf(\"cannot marshal invalid UTF-8 data as %s\", shortTag(tag))\n\t\t}\n\t\t// It can't be encoded directly as YAML so use a binary tag\n\t\t// and encode it as base64.\n\t\ttag = binaryTag\n\t\ts = encodeBase64(s)\n\tcase tag == \"\":\n\t\t// Check to see if it would resolve to a specific\n\t\t// tag when encoded unquoted. If it doesn't,\n\t\t// there's no need to quote it.\n\t\trtag, _ := resolve(\"\", s)\n\t\tcanUsePlain = rtag == strTag && !(isBase60Float(s) || isOldBool(s))\n\t}\n\t// Note: it's possible for user code to emit invalid YAML\n\t// if they explicitly specify a tag and a string containing\n\t// text that's incompatible with that tag.\n\tswitch {\n\tcase strings.Contains(s, \"\\n\"):\n\t\tif e.flow {\n\t\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t\t} else {\n\t\t\tstyle = yaml_LITERAL_SCALAR_STYLE\n\t\t}\n\tcase canUsePlain:\n\t\tstyle = yaml_PLAIN_SCALAR_STYLE\n\tdefault:\n\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t}\n\te.emitScalar(s, \"\", tag, style, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) boolv(tag string, in reflect.Value) {\n\tvar s string\n\tif in.Bool() {\n\t\ts = \"true\"\n\t} else {\n\t\ts = \"false\"\n\t}\n\te.emitScalar(s, \"\", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) intv(tag string, in reflect.Value) {\n\ts := strconv.FormatInt(in.Int(), 10)\n\te.emitScalar(s, \"\", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) uintv(tag string, in reflect.Value) {\n\ts := strconv.FormatUint(in.Uint(), 10)\n\te.emitScalar(s, \"\", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) timev(tag string, in reflect.Value) {\n\tt := in.Interface().(time.Time)\n\ts := t.Format(time.RFC3339Nano)\n\te.emitScalar(s, \"\", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) floatv(tag string, in reflect.Value) {\n\t// Issue #352: When formatting, use the precision of the underlying value\n\tprecision := 64\n\tif in.Kind() == reflect.Float32 {\n\t\tprecision = 32\n\t}\n\n\ts := strconv.FormatFloat(in.Float(), 'g', -1, precision)\n\tswitch s {\n\tcase \"+Inf\":\n\t\ts = \".inf\"\n\tcase \"-Inf\":\n\t\ts = \"-.inf\"\n\tcase \"NaN\":\n\t\ts = \".nan\"\n\t}\n\te.emitScalar(s, \"\", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) nilv() {\n\te.emitScalar(\"null\", \"\", \"\", yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil)\n}\n\nfunc (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) {\n\t// TODO Kill this function. Replace all initialize calls by their underlining Go literals.\n\timplicit := tag == \"\"\n\tif !implicit {\n\t\ttag = longTag(tag)\n\t}\n\te.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style))\n\te.event.head_comment = head\n\te.event.line_comment = line\n\te.event.foot_comment = foot\n\te.event.tail_comment = tail\n\te.emit()\n}\n\nfunc (e *encoder) nodev(in reflect.Value) {\n\te.node(in.Interface().(*Node), \"\")\n}\n\nfunc (e *encoder) node(node *Node, tail string) {\n\t// Zero nodes behave as nil.\n\tif node.Kind == 0 && node.IsZero() {\n\t\te.nilv()\n\t\treturn\n\t}\n\n\t// If the tag was not explicitly requested, and dropping it won't change the\n\t// implicit tag of the value, don't include it in the presentation.\n\tvar tag = node.Tag\n\tvar stag = shortTag(tag)\n\tvar forceQuoting bool\n\tif tag != \"\" && node.Style&TaggedStyle == 0 {\n\t\tif node.Kind == ScalarNode {\n\t\t\tif stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 {\n\t\t\t\ttag = \"\"\n\t\t\t} else {\n\t\t\t\trtag, _ := resolve(\"\", node.Value)\n\t\t\t\tif rtag == stag {\n\t\t\t\t\ttag = \"\"\n\t\t\t\t} else if stag == strTag {\n\t\t\t\t\ttag = \"\"\n\t\t\t\t\tforceQuoting = true\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tvar rtag string\n\t\t\tswitch node.Kind {\n\t\t\tcase MappingNode:\n\t\t\t\trtag = mapTag\n\t\t\tcase SequenceNode:\n\t\t\t\trtag = seqTag\n\t\t\t}\n\t\t\tif rtag == stag {\n\t\t\t\ttag = \"\"\n\t\t\t}\n\t\t}\n\t}\n\n\tswitch node.Kind {\n\tcase DocumentNode:\n\t\tyaml_document_start_event_initialize(&e.event, nil, nil, true)\n\t\te.event.head_comment = []byte(node.HeadComment)\n\t\te.emit()\n\t\tfor _, node := range node.Content {\n\t\t\te.node(node, \"\")\n\t\t}\n\t\tyaml_document_end_event_initialize(&e.event, true)\n\t\te.event.foot_comment = []byte(node.FootComment)\n\t\te.emit()\n\n\tcase SequenceNode:\n\t\tstyle := yaml_BLOCK_SEQUENCE_STYLE\n\t\tif node.Style&FlowStyle != 0 {\n\t\t\tstyle = yaml_FLOW_SEQUENCE_STYLE\n\t\t}\n\t\te.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == \"\", style))\n\t\te.event.head_comment = []byte(node.HeadComment)\n\t\te.emit()\n\t\tfor _, node := range node.Content {\n\t\t\te.node(node, \"\")\n\t\t}\n\t\te.must(yaml_sequence_end_event_initialize(&e.event))\n\t\te.event.line_comment = []byte(node.LineComment)\n\t\te.event.foot_comment = []byte(node.FootComment)\n\t\te.emit()\n\n\tcase MappingNode:\n\t\tstyle := yaml_BLOCK_MAPPING_STYLE\n\t\tif node.Style&FlowStyle != 0 {\n\t\t\tstyle = yaml_FLOW_MAPPING_STYLE\n\t\t}\n\t\tyaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == \"\", style)\n\t\te.event.tail_comment = []byte(tail)\n\t\te.event.head_comment = []byte(node.HeadComment)\n\t\te.emit()\n\n\t\t// The tail logic below moves the foot comment of prior keys to the following key,\n\t\t// since the value for each key may be a nested structure and the foot needs to be\n\t\t// processed only the entirety of the value is streamed. The last tail is processed\n\t\t// with the mapping end event.\n\t\tvar tail string\n\t\tfor i := 0; i+1 < len(node.Content); i += 2 {\n\t\t\tk := node.Content[i]\n\t\t\tfoot := k.FootComment\n\t\t\tif foot != \"\" {\n\t\t\t\tkopy := *k\n\t\t\t\tkopy.FootComment = \"\"\n\t\t\t\tk = &kopy\n\t\t\t}\n\t\t\te.node(k, tail)\n\t\t\ttail = foot\n\n\t\t\tv := node.Content[i+1]\n\t\t\te.node(v, \"\")\n\t\t}\n\n\t\tyaml_mapping_end_event_initialize(&e.event)\n\t\te.event.tail_comment = []byte(tail)\n\t\te.event.line_comment = []byte(node.LineComment)\n\t\te.event.foot_comment = []byte(node.FootComment)\n\t\te.emit()\n\n\tcase AliasNode:\n\t\tyaml_alias_event_initialize(&e.event, []byte(node.Value))\n\t\te.event.head_comment = []byte(node.HeadComment)\n\t\te.event.line_comment = []byte(node.LineComment)\n\t\te.event.foot_comment = []byte(node.FootComment)\n\t\te.emit()\n\n\tcase ScalarNode:\n\t\tvalue := node.Value\n\t\tif !utf8.ValidString(value) {\n\t\t\tif stag == binaryTag {\n\t\t\t\tfailf(\"explicitly tagged !!binary data must be base64-encoded\")\n\t\t\t}\n\t\t\tif stag != \"\" {\n\t\t\t\tfailf(\"cannot marshal invalid UTF-8 data as %s\", stag)\n\t\t\t}\n\t\t\t// It can't be encoded directly as YAML so use a binary tag\n\t\t\t// and encode it as base64.\n\t\t\ttag = binaryTag\n\t\t\tvalue = encodeBase64(value)\n\t\t}\n\n\t\tstyle := yaml_PLAIN_SCALAR_STYLE\n\t\tswitch {\n\t\tcase node.Style&DoubleQuotedStyle != 0:\n\t\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t\tcase node.Style&SingleQuotedStyle != 0:\n\t\t\tstyle = yaml_SINGLE_QUOTED_SCALAR_STYLE\n\t\tcase node.Style&LiteralStyle != 0:\n\t\t\tstyle = yaml_LITERAL_SCALAR_STYLE\n\t\tcase node.Style&FoldedStyle != 0:\n\t\t\tstyle = yaml_FOLDED_SCALAR_STYLE\n\t\tcase strings.Contains(value, \"\\n\"):\n\t\t\tstyle = yaml_LITERAL_SCALAR_STYLE\n\t\tcase forceQuoting:\n\t\t\tstyle = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t\t}\n\n\t\te.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail))\n\tdefault:\n\t\tfailf(\"cannot encode node with unknown kind %d\", node.Kind)\n\t}\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/parserc.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"bytes\"\n)\n\n// The parser implements the following grammar:\n//\n// stream               ::= STREAM-START implicit_document? explicit_document* STREAM-END\n// implicit_document    ::= block_node DOCUMENT-END*\n// explicit_document    ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*\n// block_node_or_indentless_sequence    ::=\n//                          ALIAS\n//                          | properties (block_content | indentless_block_sequence)?\n//                          | block_content\n//                          | indentless_block_sequence\n// block_node           ::= ALIAS\n//                          | properties block_content?\n//                          | block_content\n// flow_node            ::= ALIAS\n//                          | properties flow_content?\n//                          | flow_content\n// properties           ::= TAG ANCHOR? | ANCHOR TAG?\n// block_content        ::= block_collection | flow_collection | SCALAR\n// flow_content         ::= flow_collection | SCALAR\n// block_collection     ::= block_sequence | block_mapping\n// flow_collection      ::= flow_sequence | flow_mapping\n// block_sequence       ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END\n// indentless_sequence  ::= (BLOCK-ENTRY block_node?)+\n// block_mapping        ::= BLOCK-MAPPING_START\n//                          ((KEY block_node_or_indentless_sequence?)?\n//                          (VALUE block_node_or_indentless_sequence?)?)*\n//                          BLOCK-END\n// flow_sequence        ::= FLOW-SEQUENCE-START\n//                          (flow_sequence_entry FLOW-ENTRY)*\n//                          flow_sequence_entry?\n//                          FLOW-SEQUENCE-END\n// flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n// flow_mapping         ::= FLOW-MAPPING-START\n//                          (flow_mapping_entry FLOW-ENTRY)*\n//                          flow_mapping_entry?\n//                          FLOW-MAPPING-END\n// flow_mapping_entry   ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n\n// Peek the next token in the token queue.\nfunc peek_token(parser *yaml_parser_t) *yaml_token_t {\n\tif parser.token_available || yaml_parser_fetch_more_tokens(parser) {\n\t\ttoken := &parser.tokens[parser.tokens_head]\n\t\tyaml_parser_unfold_comments(parser, token)\n\t\treturn token\n\t}\n\treturn nil\n}\n\n// yaml_parser_unfold_comments walks through the comments queue and joins all\n// comments behind the position of the provided token into the respective\n// top-level comment slices in the parser.\nfunc yaml_parser_unfold_comments(parser *yaml_parser_t, token *yaml_token_t) {\n\tfor parser.comments_head < len(parser.comments) && token.start_mark.index >= parser.comments[parser.comments_head].token_mark.index {\n\t\tcomment := &parser.comments[parser.comments_head]\n\t\tif len(comment.head) > 0 {\n\t\t\tif token.typ == yaml_BLOCK_END_TOKEN {\n\t\t\t\t// No heads on ends, so keep comment.head for a follow up token.\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif len(parser.head_comment) > 0 {\n\t\t\t\tparser.head_comment = append(parser.head_comment, '\\n')\n\t\t\t}\n\t\t\tparser.head_comment = append(parser.head_comment, comment.head...)\n\t\t}\n\t\tif len(comment.foot) > 0 {\n\t\t\tif len(parser.foot_comment) > 0 {\n\t\t\t\tparser.foot_comment = append(parser.foot_comment, '\\n')\n\t\t\t}\n\t\t\tparser.foot_comment = append(parser.foot_comment, comment.foot...)\n\t\t}\n\t\tif len(comment.line) > 0 {\n\t\t\tif len(parser.line_comment) > 0 {\n\t\t\t\tparser.line_comment = append(parser.line_comment, '\\n')\n\t\t\t}\n\t\t\tparser.line_comment = append(parser.line_comment, comment.line...)\n\t\t}\n\t\t*comment = yaml_comment_t{}\n\t\tparser.comments_head++\n\t}\n}\n\n// Remove the next token from the queue (must be called after peek_token).\nfunc skip_token(parser *yaml_parser_t) {\n\tparser.token_available = false\n\tparser.tokens_parsed++\n\tparser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN\n\tparser.tokens_head++\n}\n\n// Get the next event.\nfunc yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool {\n\t// Erase the event object.\n\t*event = yaml_event_t{}\n\n\t// No events after the end of the stream or error.\n\tif parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE {\n\t\treturn true\n\t}\n\n\t// Generate the next event.\n\treturn yaml_parser_state_machine(parser, event)\n}\n\n// Set parser error.\nfunc yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool {\n\tparser.error = yaml_PARSER_ERROR\n\tparser.problem = problem\n\tparser.problem_mark = problem_mark\n\treturn false\n}\n\nfunc yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool {\n\tparser.error = yaml_PARSER_ERROR\n\tparser.context = context\n\tparser.context_mark = context_mark\n\tparser.problem = problem\n\tparser.problem_mark = problem_mark\n\treturn false\n}\n\n// State dispatcher.\nfunc yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool {\n\t//trace(\"yaml_parser_state_machine\", \"state:\", parser.state.String())\n\n\tswitch parser.state {\n\tcase yaml_PARSE_STREAM_START_STATE:\n\t\treturn yaml_parser_parse_stream_start(parser, event)\n\n\tcase yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE:\n\t\treturn yaml_parser_parse_document_start(parser, event, true)\n\n\tcase yaml_PARSE_DOCUMENT_START_STATE:\n\t\treturn yaml_parser_parse_document_start(parser, event, false)\n\n\tcase yaml_PARSE_DOCUMENT_CONTENT_STATE:\n\t\treturn yaml_parser_parse_document_content(parser, event)\n\n\tcase yaml_PARSE_DOCUMENT_END_STATE:\n\t\treturn yaml_parser_parse_document_end(parser, event)\n\n\tcase yaml_PARSE_BLOCK_NODE_STATE:\n\t\treturn yaml_parser_parse_node(parser, event, true, false)\n\n\tcase yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE:\n\t\treturn yaml_parser_parse_node(parser, event, true, true)\n\n\tcase yaml_PARSE_FLOW_NODE_STATE:\n\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\n\tcase yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE:\n\t\treturn yaml_parser_parse_block_sequence_entry(parser, event, true)\n\n\tcase yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE:\n\t\treturn yaml_parser_parse_block_sequence_entry(parser, event, false)\n\n\tcase yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE:\n\t\treturn yaml_parser_parse_indentless_sequence_entry(parser, event)\n\n\tcase yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE:\n\t\treturn yaml_parser_parse_block_mapping_key(parser, event, true)\n\n\tcase yaml_PARSE_BLOCK_MAPPING_KEY_STATE:\n\t\treturn yaml_parser_parse_block_mapping_key(parser, event, false)\n\n\tcase yaml_PARSE_BLOCK_MAPPING_VALUE_STATE:\n\t\treturn yaml_parser_parse_block_mapping_value(parser, event)\n\n\tcase yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE:\n\t\treturn yaml_parser_parse_flow_sequence_entry(parser, event, true)\n\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE:\n\t\treturn yaml_parser_parse_flow_sequence_entry(parser, event, false)\n\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE:\n\t\treturn yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event)\n\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE:\n\t\treturn yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event)\n\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE:\n\t\treturn yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event)\n\n\tcase yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE:\n\t\treturn yaml_parser_parse_flow_mapping_key(parser, event, true)\n\n\tcase yaml_PARSE_FLOW_MAPPING_KEY_STATE:\n\t\treturn yaml_parser_parse_flow_mapping_key(parser, event, false)\n\n\tcase yaml_PARSE_FLOW_MAPPING_VALUE_STATE:\n\t\treturn yaml_parser_parse_flow_mapping_value(parser, event, false)\n\n\tcase yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE:\n\t\treturn yaml_parser_parse_flow_mapping_value(parser, event, true)\n\n\tdefault:\n\t\tpanic(\"invalid parser state\")\n\t}\n}\n\n// Parse the production:\n// stream   ::= STREAM-START implicit_document? explicit_document* STREAM-END\n//              ************\nfunc yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif token.typ != yaml_STREAM_START_TOKEN {\n\t\treturn yaml_parser_set_parser_error(parser, \"did not find expected <stream-start>\", token.start_mark)\n\t}\n\tparser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_STREAM_START_EVENT,\n\t\tstart_mark: token.start_mark,\n\t\tend_mark:   token.end_mark,\n\t\tencoding:   token.encoding,\n\t}\n\tskip_token(parser)\n\treturn true\n}\n\n// Parse the productions:\n// implicit_document    ::= block_node DOCUMENT-END*\n//                          *\n// explicit_document    ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*\n//                          *************************\nfunc yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool {\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\t// Parse extra document end indicators.\n\tif !implicit {\n\t\tfor token.typ == yaml_DOCUMENT_END_TOKEN {\n\t\t\tskip_token(parser)\n\t\t\ttoken = peek_token(parser)\n\t\t\tif token == nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\tif implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN &&\n\t\ttoken.typ != yaml_TAG_DIRECTIVE_TOKEN &&\n\t\ttoken.typ != yaml_DOCUMENT_START_TOKEN &&\n\t\ttoken.typ != yaml_STREAM_END_TOKEN {\n\t\t// Parse an implicit document.\n\t\tif !yaml_parser_process_directives(parser, nil, nil) {\n\t\t\treturn false\n\t\t}\n\t\tparser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE)\n\t\tparser.state = yaml_PARSE_BLOCK_NODE_STATE\n\n\t\tvar head_comment []byte\n\t\tif len(parser.head_comment) > 0 {\n\t\t\t// [Go] Scan the header comment backwards, and if an empty line is found, break\n\t\t\t//      the header so the part before the last empty line goes into the\n\t\t\t//      document header, while the bottom of it goes into a follow up event.\n\t\t\tfor i := len(parser.head_comment) - 1; i > 0; i-- {\n\t\t\t\tif parser.head_comment[i] == '\\n' {\n\t\t\t\t\tif i == len(parser.head_comment)-1 {\n\t\t\t\t\t\thead_comment = parser.head_comment[:i]\n\t\t\t\t\t\tparser.head_comment = parser.head_comment[i+1:]\n\t\t\t\t\t\tbreak\n\t\t\t\t\t} else if parser.head_comment[i-1] == '\\n' {\n\t\t\t\t\t\thead_comment = parser.head_comment[:i-1]\n\t\t\t\t\t\tparser.head_comment = parser.head_comment[i+1:]\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_DOCUMENT_START_EVENT,\n\t\t\tstart_mark: token.start_mark,\n\t\t\tend_mark:   token.end_mark,\n\n\t\t\thead_comment: head_comment,\n\t\t}\n\n\t} else if token.typ != yaml_STREAM_END_TOKEN {\n\t\t// Parse an explicit document.\n\t\tvar version_directive *yaml_version_directive_t\n\t\tvar tag_directives []yaml_tag_directive_t\n\t\tstart_mark := token.start_mark\n\t\tif !yaml_parser_process_directives(parser, &version_directive, &tag_directives) {\n\t\t\treturn false\n\t\t}\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_DOCUMENT_START_TOKEN {\n\t\t\tyaml_parser_set_parser_error(parser,\n\t\t\t\t\"did not find expected <document start>\", token.start_mark)\n\t\t\treturn false\n\t\t}\n\t\tparser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE)\n\t\tparser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE\n\t\tend_mark := token.end_mark\n\n\t\t*event = yaml_event_t{\n\t\t\ttyp:               yaml_DOCUMENT_START_EVENT,\n\t\t\tstart_mark:        start_mark,\n\t\t\tend_mark:          end_mark,\n\t\t\tversion_directive: version_directive,\n\t\t\ttag_directives:    tag_directives,\n\t\t\timplicit:          false,\n\t\t}\n\t\tskip_token(parser)\n\n\t} else {\n\t\t// Parse the stream end.\n\t\tparser.state = yaml_PARSE_END_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_STREAM_END_EVENT,\n\t\t\tstart_mark: token.start_mark,\n\t\t\tend_mark:   token.end_mark,\n\t\t}\n\t\tskip_token(parser)\n\t}\n\n\treturn true\n}\n\n// Parse the productions:\n// explicit_document    ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*\n//                                                    ***********\n//\nfunc yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tif token.typ == yaml_VERSION_DIRECTIVE_TOKEN ||\n\t\ttoken.typ == yaml_TAG_DIRECTIVE_TOKEN ||\n\t\ttoken.typ == yaml_DOCUMENT_START_TOKEN ||\n\t\ttoken.typ == yaml_DOCUMENT_END_TOKEN ||\n\t\ttoken.typ == yaml_STREAM_END_TOKEN {\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\t\treturn yaml_parser_process_empty_scalar(parser, event,\n\t\t\ttoken.start_mark)\n\t}\n\treturn yaml_parser_parse_node(parser, event, true, false)\n}\n\n// Parse the productions:\n// implicit_document    ::= block_node DOCUMENT-END*\n//                                     *************\n// explicit_document    ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*\n//\nfunc yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tstart_mark := token.start_mark\n\tend_mark := token.start_mark\n\n\timplicit := true\n\tif token.typ == yaml_DOCUMENT_END_TOKEN {\n\t\tend_mark = token.end_mark\n\t\tskip_token(parser)\n\t\timplicit = false\n\t}\n\n\tparser.tag_directives = parser.tag_directives[:0]\n\n\tparser.state = yaml_PARSE_DOCUMENT_START_STATE\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_DOCUMENT_END_EVENT,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\timplicit:   implicit,\n\t}\n\tyaml_parser_set_event_comments(parser, event)\n\tif len(event.head_comment) > 0 && len(event.foot_comment) == 0 {\n\t\tevent.foot_comment = event.head_comment\n\t\tevent.head_comment = nil\n\t}\n\treturn true\n}\n\nfunc yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) {\n\tevent.head_comment = parser.head_comment\n\tevent.line_comment = parser.line_comment\n\tevent.foot_comment = parser.foot_comment\n\tparser.head_comment = nil\n\tparser.line_comment = nil\n\tparser.foot_comment = nil\n\tparser.tail_comment = nil\n\tparser.stem_comment = nil\n}\n\n// Parse the productions:\n// block_node_or_indentless_sequence    ::=\n//                          ALIAS\n//                          *****\n//                          | properties (block_content | indentless_block_sequence)?\n//                            **********  *\n//                          | block_content | indentless_block_sequence\n//                            *\n// block_node           ::= ALIAS\n//                          *****\n//                          | properties block_content?\n//                            ********** *\n//                          | block_content\n//                            *\n// flow_node            ::= ALIAS\n//                          *****\n//                          | properties flow_content?\n//                            ********** *\n//                          | flow_content\n//                            *\n// properties           ::= TAG ANCHOR? | ANCHOR TAG?\n//                          *************************\n// block_content        ::= block_collection | flow_collection | SCALAR\n//                                                               ******\n// flow_content         ::= flow_collection | SCALAR\n//                                            ******\nfunc yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool {\n\t//defer trace(\"yaml_parser_parse_node\", \"block:\", block, \"indentless_sequence:\", indentless_sequence)()\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tif token.typ == yaml_ALIAS_TOKEN {\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_ALIAS_EVENT,\n\t\t\tstart_mark: token.start_mark,\n\t\t\tend_mark:   token.end_mark,\n\t\t\tanchor:     token.value,\n\t\t}\n\t\tyaml_parser_set_event_comments(parser, event)\n\t\tskip_token(parser)\n\t\treturn true\n\t}\n\n\tstart_mark := token.start_mark\n\tend_mark := token.start_mark\n\n\tvar tag_token bool\n\tvar tag_handle, tag_suffix, anchor []byte\n\tvar tag_mark yaml_mark_t\n\tif token.typ == yaml_ANCHOR_TOKEN {\n\t\tanchor = token.value\n\t\tstart_mark = token.start_mark\n\t\tend_mark = token.end_mark\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ == yaml_TAG_TOKEN {\n\t\t\ttag_token = true\n\t\t\ttag_handle = token.value\n\t\t\ttag_suffix = token.suffix\n\t\t\ttag_mark = token.start_mark\n\t\t\tend_mark = token.end_mark\n\t\t\tskip_token(parser)\n\t\t\ttoken = peek_token(parser)\n\t\t\tif token == nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t} else if token.typ == yaml_TAG_TOKEN {\n\t\ttag_token = true\n\t\ttag_handle = token.value\n\t\ttag_suffix = token.suffix\n\t\tstart_mark = token.start_mark\n\t\ttag_mark = token.start_mark\n\t\tend_mark = token.end_mark\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ == yaml_ANCHOR_TOKEN {\n\t\t\tanchor = token.value\n\t\t\tend_mark = token.end_mark\n\t\t\tskip_token(parser)\n\t\t\ttoken = peek_token(parser)\n\t\t\tif token == nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\tvar tag []byte\n\tif tag_token {\n\t\tif len(tag_handle) == 0 {\n\t\t\ttag = tag_suffix\n\t\t\ttag_suffix = nil\n\t\t} else {\n\t\t\tfor i := range parser.tag_directives {\n\t\t\t\tif bytes.Equal(parser.tag_directives[i].handle, tag_handle) {\n\t\t\t\t\ttag = append([]byte(nil), parser.tag_directives[i].prefix...)\n\t\t\t\t\ttag = append(tag, tag_suffix...)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif len(tag) == 0 {\n\t\t\t\tyaml_parser_set_parser_error_context(parser,\n\t\t\t\t\t\"while parsing a node\", start_mark,\n\t\t\t\t\t\"found undefined tag handle\", tag_mark)\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\timplicit := len(tag) == 0\n\tif indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN {\n\t\tend_mark = token.end_mark\n\t\tparser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_SEQUENCE_START_EVENT,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tanchor:     anchor,\n\t\t\ttag:        tag,\n\t\t\timplicit:   implicit,\n\t\t\tstyle:      yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE),\n\t\t}\n\t\treturn true\n\t}\n\tif token.typ == yaml_SCALAR_TOKEN {\n\t\tvar plain_implicit, quoted_implicit bool\n\t\tend_mark = token.end_mark\n\t\tif (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') {\n\t\t\tplain_implicit = true\n\t\t} else if len(tag) == 0 {\n\t\t\tquoted_implicit = true\n\t\t}\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\n\t\t*event = yaml_event_t{\n\t\t\ttyp:             yaml_SCALAR_EVENT,\n\t\t\tstart_mark:      start_mark,\n\t\t\tend_mark:        end_mark,\n\t\t\tanchor:          anchor,\n\t\t\ttag:             tag,\n\t\t\tvalue:           token.value,\n\t\t\timplicit:        plain_implicit,\n\t\t\tquoted_implicit: quoted_implicit,\n\t\t\tstyle:           yaml_style_t(token.style),\n\t\t}\n\t\tyaml_parser_set_event_comments(parser, event)\n\t\tskip_token(parser)\n\t\treturn true\n\t}\n\tif token.typ == yaml_FLOW_SEQUENCE_START_TOKEN {\n\t\t// [Go] Some of the events below can be merged as they differ only on style.\n\t\tend_mark = token.end_mark\n\t\tparser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_SEQUENCE_START_EVENT,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tanchor:     anchor,\n\t\t\ttag:        tag,\n\t\t\timplicit:   implicit,\n\t\t\tstyle:      yaml_style_t(yaml_FLOW_SEQUENCE_STYLE),\n\t\t}\n\t\tyaml_parser_set_event_comments(parser, event)\n\t\treturn true\n\t}\n\tif token.typ == yaml_FLOW_MAPPING_START_TOKEN {\n\t\tend_mark = token.end_mark\n\t\tparser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_MAPPING_START_EVENT,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tanchor:     anchor,\n\t\t\ttag:        tag,\n\t\t\timplicit:   implicit,\n\t\t\tstyle:      yaml_style_t(yaml_FLOW_MAPPING_STYLE),\n\t\t}\n\t\tyaml_parser_set_event_comments(parser, event)\n\t\treturn true\n\t}\n\tif block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN {\n\t\tend_mark = token.end_mark\n\t\tparser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_SEQUENCE_START_EVENT,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tanchor:     anchor,\n\t\t\ttag:        tag,\n\t\t\timplicit:   implicit,\n\t\t\tstyle:      yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE),\n\t\t}\n\t\tif parser.stem_comment != nil {\n\t\t\tevent.head_comment = parser.stem_comment\n\t\t\tparser.stem_comment = nil\n\t\t}\n\t\treturn true\n\t}\n\tif block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN {\n\t\tend_mark = token.end_mark\n\t\tparser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_MAPPING_START_EVENT,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tanchor:     anchor,\n\t\t\ttag:        tag,\n\t\t\timplicit:   implicit,\n\t\t\tstyle:      yaml_style_t(yaml_BLOCK_MAPPING_STYLE),\n\t\t}\n\t\tif parser.stem_comment != nil {\n\t\t\tevent.head_comment = parser.stem_comment\n\t\t\tparser.stem_comment = nil\n\t\t}\n\t\treturn true\n\t}\n\tif len(anchor) > 0 || len(tag) > 0 {\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\n\t\t*event = yaml_event_t{\n\t\t\ttyp:             yaml_SCALAR_EVENT,\n\t\t\tstart_mark:      start_mark,\n\t\t\tend_mark:        end_mark,\n\t\t\tanchor:          anchor,\n\t\t\ttag:             tag,\n\t\t\timplicit:        implicit,\n\t\t\tquoted_implicit: false,\n\t\t\tstyle:           yaml_style_t(yaml_PLAIN_SCALAR_STYLE),\n\t\t}\n\t\treturn true\n\t}\n\n\tcontext := \"while parsing a flow node\"\n\tif block {\n\t\tcontext = \"while parsing a block node\"\n\t}\n\tyaml_parser_set_parser_error_context(parser, context, start_mark,\n\t\t\"did not find expected node content\", token.start_mark)\n\treturn false\n}\n\n// Parse the productions:\n// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END\n//                    ********************  *********** *             *********\n//\nfunc yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\ttoken := peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tparser.marks = append(parser.marks, token.start_mark)\n\t\tskip_token(parser)\n\t}\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tif token.typ == yaml_BLOCK_ENTRY_TOKEN {\n\t\tmark := token.end_mark\n\t\tprior_head_len := len(parser.head_comment)\n\t\tskip_token(parser)\n\t\tyaml_parser_split_stem_comment(parser, prior_head_len)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, true, false)\n\t\t} else {\n\t\t\tparser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE\n\t\t\treturn yaml_parser_process_empty_scalar(parser, event, mark)\n\t\t}\n\t}\n\tif token.typ == yaml_BLOCK_END_TOKEN {\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\t\tparser.marks = parser.marks[:len(parser.marks)-1]\n\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_SEQUENCE_END_EVENT,\n\t\t\tstart_mark: token.start_mark,\n\t\t\tend_mark:   token.end_mark,\n\t\t}\n\n\t\tskip_token(parser)\n\t\treturn true\n\t}\n\n\tcontext_mark := parser.marks[len(parser.marks)-1]\n\tparser.marks = parser.marks[:len(parser.marks)-1]\n\treturn yaml_parser_set_parser_error_context(parser,\n\t\t\"while parsing a block collection\", context_mark,\n\t\t\"did not find expected '-' indicator\", token.start_mark)\n}\n\n// Parse the productions:\n// indentless_sequence  ::= (BLOCK-ENTRY block_node?)+\n//                           *********** *\nfunc yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tif token.typ == yaml_BLOCK_ENTRY_TOKEN {\n\t\tmark := token.end_mark\n\t\tprior_head_len := len(parser.head_comment)\n\t\tskip_token(parser)\n\t\tyaml_parser_split_stem_comment(parser, prior_head_len)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_BLOCK_ENTRY_TOKEN &&\n\t\t\ttoken.typ != yaml_KEY_TOKEN &&\n\t\t\ttoken.typ != yaml_VALUE_TOKEN &&\n\t\t\ttoken.typ != yaml_BLOCK_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, true, false)\n\t\t}\n\t\tparser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE\n\t\treturn yaml_parser_process_empty_scalar(parser, event, mark)\n\t}\n\tparser.state = parser.states[len(parser.states)-1]\n\tparser.states = parser.states[:len(parser.states)-1]\n\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_SEQUENCE_END_EVENT,\n\t\tstart_mark: token.start_mark,\n\t\tend_mark:   token.start_mark, // [Go] Shouldn't this be token.end_mark?\n\t}\n\treturn true\n}\n\n// Split stem comment from head comment.\n//\n// When a sequence or map is found under a sequence entry, the former head comment\n// is assigned to the underlying sequence or map as a whole, not the individual\n// sequence or map entry as would be expected otherwise. To handle this case the\n// previous head comment is moved aside as the stem comment.\nfunc yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) {\n\tif stem_len == 0 {\n\t\treturn\n\t}\n\n\ttoken := peek_token(parser)\n\tif token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN {\n\t\treturn\n\t}\n\n\tparser.stem_comment = parser.head_comment[:stem_len]\n\tif len(parser.head_comment) == stem_len {\n\t\tparser.head_comment = nil\n\t} else {\n\t\t// Copy suffix to prevent very strange bugs if someone ever appends\n\t\t// further bytes to the prefix in the stem_comment slice above.\n\t\tparser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...)\n\t}\n}\n\n// Parse the productions:\n// block_mapping        ::= BLOCK-MAPPING_START\n//                          *******************\n//                          ((KEY block_node_or_indentless_sequence?)?\n//                            *** *\n//                          (VALUE block_node_or_indentless_sequence?)?)*\n//\n//                          BLOCK-END\n//                          *********\n//\nfunc yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\ttoken := peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tparser.marks = append(parser.marks, token.start_mark)\n\t\tskip_token(parser)\n\t}\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\t// [Go] A tail comment was left from the prior mapping value processed. Emit an event\n\t//      as it needs to be processed with that value and not the following key.\n\tif len(parser.tail_comment) > 0 {\n\t\t*event = yaml_event_t{\n\t\t\ttyp:          yaml_TAIL_COMMENT_EVENT,\n\t\t\tstart_mark:   token.start_mark,\n\t\t\tend_mark:     token.end_mark,\n\t\t\tfoot_comment: parser.tail_comment,\n\t\t}\n\t\tparser.tail_comment = nil\n\t\treturn true\n\t}\n\n\tif token.typ == yaml_KEY_TOKEN {\n\t\tmark := token.end_mark\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_KEY_TOKEN &&\n\t\t\ttoken.typ != yaml_VALUE_TOKEN &&\n\t\t\ttoken.typ != yaml_BLOCK_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, true, true)\n\t\t} else {\n\t\t\tparser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE\n\t\t\treturn yaml_parser_process_empty_scalar(parser, event, mark)\n\t\t}\n\t} else if token.typ == yaml_BLOCK_END_TOKEN {\n\t\tparser.state = parser.states[len(parser.states)-1]\n\t\tparser.states = parser.states[:len(parser.states)-1]\n\t\tparser.marks = parser.marks[:len(parser.marks)-1]\n\t\t*event = yaml_event_t{\n\t\t\ttyp:        yaml_MAPPING_END_EVENT,\n\t\t\tstart_mark: token.start_mark,\n\t\t\tend_mark:   token.end_mark,\n\t\t}\n\t\tyaml_parser_set_event_comments(parser, event)\n\t\tskip_token(parser)\n\t\treturn true\n\t}\n\n\tcontext_mark := parser.marks[len(parser.marks)-1]\n\tparser.marks = parser.marks[:len(parser.marks)-1]\n\treturn yaml_parser_set_parser_error_context(parser,\n\t\t\"while parsing a block mapping\", context_mark,\n\t\t\"did not find expected key\", token.start_mark)\n}\n\n// Parse the productions:\n// block_mapping        ::= BLOCK-MAPPING_START\n//\n//                          ((KEY block_node_or_indentless_sequence?)?\n//\n//                          (VALUE block_node_or_indentless_sequence?)?)*\n//                           ***** *\n//                          BLOCK-END\n//\n//\nfunc yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif token.typ == yaml_VALUE_TOKEN {\n\t\tmark := token.end_mark\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_KEY_TOKEN &&\n\t\t\ttoken.typ != yaml_VALUE_TOKEN &&\n\t\t\ttoken.typ != yaml_BLOCK_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, true, true)\n\t\t}\n\t\tparser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE\n\t\treturn yaml_parser_process_empty_scalar(parser, event, mark)\n\t}\n\tparser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE\n\treturn yaml_parser_process_empty_scalar(parser, event, token.start_mark)\n}\n\n// Parse the productions:\n// flow_sequence        ::= FLOW-SEQUENCE-START\n//                          *******************\n//                          (flow_sequence_entry FLOW-ENTRY)*\n//                           *                   **********\n//                          flow_sequence_entry?\n//                          *\n//                          FLOW-SEQUENCE-END\n//                          *****************\n// flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                          *\n//\nfunc yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\ttoken := peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tparser.marks = append(parser.marks, token.start_mark)\n\t\tskip_token(parser)\n\t}\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif token.typ != yaml_FLOW_SEQUENCE_END_TOKEN {\n\t\tif !first {\n\t\t\tif token.typ == yaml_FLOW_ENTRY_TOKEN {\n\t\t\t\tskip_token(parser)\n\t\t\t\ttoken = peek_token(parser)\n\t\t\t\tif token == nil {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcontext_mark := parser.marks[len(parser.marks)-1]\n\t\t\t\tparser.marks = parser.marks[:len(parser.marks)-1]\n\t\t\t\treturn yaml_parser_set_parser_error_context(parser,\n\t\t\t\t\t\"while parsing a flow sequence\", context_mark,\n\t\t\t\t\t\"did not find expected ',' or ']'\", token.start_mark)\n\t\t\t}\n\t\t}\n\n\t\tif token.typ == yaml_KEY_TOKEN {\n\t\t\tparser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE\n\t\t\t*event = yaml_event_t{\n\t\t\t\ttyp:        yaml_MAPPING_START_EVENT,\n\t\t\t\tstart_mark: token.start_mark,\n\t\t\t\tend_mark:   token.end_mark,\n\t\t\t\timplicit:   true,\n\t\t\t\tstyle:      yaml_style_t(yaml_FLOW_MAPPING_STYLE),\n\t\t\t}\n\t\t\tskip_token(parser)\n\t\t\treturn true\n\t\t} else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t\t}\n\t}\n\n\tparser.state = parser.states[len(parser.states)-1]\n\tparser.states = parser.states[:len(parser.states)-1]\n\tparser.marks = parser.marks[:len(parser.marks)-1]\n\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_SEQUENCE_END_EVENT,\n\t\tstart_mark: token.start_mark,\n\t\tend_mark:   token.end_mark,\n\t}\n\tyaml_parser_set_event_comments(parser, event)\n\n\tskip_token(parser)\n\treturn true\n}\n\n//\n// Parse the productions:\n// flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                                      *** *\n//\nfunc yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif token.typ != yaml_VALUE_TOKEN &&\n\t\ttoken.typ != yaml_FLOW_ENTRY_TOKEN &&\n\t\ttoken.typ != yaml_FLOW_SEQUENCE_END_TOKEN {\n\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE)\n\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t}\n\tmark := token.end_mark\n\tskip_token(parser)\n\tparser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE\n\treturn yaml_parser_process_empty_scalar(parser, event, mark)\n}\n\n// Parse the productions:\n// flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                                                      ***** *\n//\nfunc yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif token.typ == yaml_VALUE_TOKEN {\n\t\tskip_token(parser)\n\t\ttoken := peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t\t}\n\t}\n\tparser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE\n\treturn yaml_parser_process_empty_scalar(parser, event, token.start_mark)\n}\n\n// Parse the productions:\n// flow_sequence_entry  ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                                                                      *\n//\nfunc yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tparser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_MAPPING_END_EVENT,\n\t\tstart_mark: token.start_mark,\n\t\tend_mark:   token.start_mark, // [Go] Shouldn't this be end_mark?\n\t}\n\treturn true\n}\n\n// Parse the productions:\n// flow_mapping         ::= FLOW-MAPPING-START\n//                          ******************\n//                          (flow_mapping_entry FLOW-ENTRY)*\n//                           *                  **********\n//                          flow_mapping_entry?\n//                          ******************\n//                          FLOW-MAPPING-END\n//                          ****************\n// flow_mapping_entry   ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                          *           *** *\n//\nfunc yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool {\n\tif first {\n\t\ttoken := peek_token(parser)\n\t\tparser.marks = append(parser.marks, token.start_mark)\n\t\tskip_token(parser)\n\t}\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tif token.typ != yaml_FLOW_MAPPING_END_TOKEN {\n\t\tif !first {\n\t\t\tif token.typ == yaml_FLOW_ENTRY_TOKEN {\n\t\t\t\tskip_token(parser)\n\t\t\t\ttoken = peek_token(parser)\n\t\t\t\tif token == nil {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcontext_mark := parser.marks[len(parser.marks)-1]\n\t\t\t\tparser.marks = parser.marks[:len(parser.marks)-1]\n\t\t\t\treturn yaml_parser_set_parser_error_context(parser,\n\t\t\t\t\t\"while parsing a flow mapping\", context_mark,\n\t\t\t\t\t\"did not find expected ',' or '}'\", token.start_mark)\n\t\t\t}\n\t\t}\n\n\t\tif token.typ == yaml_KEY_TOKEN {\n\t\t\tskip_token(parser)\n\t\t\ttoken = peek_token(parser)\n\t\t\tif token == nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif token.typ != yaml_VALUE_TOKEN &&\n\t\t\t\ttoken.typ != yaml_FLOW_ENTRY_TOKEN &&\n\t\t\t\ttoken.typ != yaml_FLOW_MAPPING_END_TOKEN {\n\t\t\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE)\n\t\t\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t\t\t} else {\n\t\t\t\tparser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE\n\t\t\t\treturn yaml_parser_process_empty_scalar(parser, event, token.start_mark)\n\t\t\t}\n\t\t} else if token.typ != yaml_FLOW_MAPPING_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t\t}\n\t}\n\n\tparser.state = parser.states[len(parser.states)-1]\n\tparser.states = parser.states[:len(parser.states)-1]\n\tparser.marks = parser.marks[:len(parser.marks)-1]\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_MAPPING_END_EVENT,\n\t\tstart_mark: token.start_mark,\n\t\tend_mark:   token.end_mark,\n\t}\n\tyaml_parser_set_event_comments(parser, event)\n\tskip_token(parser)\n\treturn true\n}\n\n// Parse the productions:\n// flow_mapping_entry   ::= flow_node | KEY flow_node? (VALUE flow_node?)?\n//                                   *                  ***** *\n//\nfunc yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool {\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\tif empty {\n\t\tparser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE\n\t\treturn yaml_parser_process_empty_scalar(parser, event, token.start_mark)\n\t}\n\tif token.typ == yaml_VALUE_TOKEN {\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t\tif token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN {\n\t\t\tparser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE)\n\t\t\treturn yaml_parser_parse_node(parser, event, false, false)\n\t\t}\n\t}\n\tparser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE\n\treturn yaml_parser_process_empty_scalar(parser, event, token.start_mark)\n}\n\n// Generate an empty scalar event.\nfunc yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool {\n\t*event = yaml_event_t{\n\t\ttyp:        yaml_SCALAR_EVENT,\n\t\tstart_mark: mark,\n\t\tend_mark:   mark,\n\t\tvalue:      nil, // Empty\n\t\timplicit:   true,\n\t\tstyle:      yaml_style_t(yaml_PLAIN_SCALAR_STYLE),\n\t}\n\treturn true\n}\n\nvar default_tag_directives = []yaml_tag_directive_t{\n\t{[]byte(\"!\"), []byte(\"!\")},\n\t{[]byte(\"!!\"), []byte(\"tag:yaml.org,2002:\")},\n}\n\n// Parse directives.\nfunc yaml_parser_process_directives(parser *yaml_parser_t,\n\tversion_directive_ref **yaml_version_directive_t,\n\ttag_directives_ref *[]yaml_tag_directive_t) bool {\n\n\tvar version_directive *yaml_version_directive_t\n\tvar tag_directives []yaml_tag_directive_t\n\n\ttoken := peek_token(parser)\n\tif token == nil {\n\t\treturn false\n\t}\n\n\tfor token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN {\n\t\tif token.typ == yaml_VERSION_DIRECTIVE_TOKEN {\n\t\t\tif version_directive != nil {\n\t\t\t\tyaml_parser_set_parser_error(parser,\n\t\t\t\t\t\"found duplicate %YAML directive\", token.start_mark)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif token.major != 1 || token.minor != 1 {\n\t\t\t\tyaml_parser_set_parser_error(parser,\n\t\t\t\t\t\"found incompatible YAML document\", token.start_mark)\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tversion_directive = &yaml_version_directive_t{\n\t\t\t\tmajor: token.major,\n\t\t\t\tminor: token.minor,\n\t\t\t}\n\t\t} else if token.typ == yaml_TAG_DIRECTIVE_TOKEN {\n\t\t\tvalue := yaml_tag_directive_t{\n\t\t\t\thandle: token.value,\n\t\t\t\tprefix: token.prefix,\n\t\t\t}\n\t\t\tif !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\ttag_directives = append(tag_directives, value)\n\t\t}\n\n\t\tskip_token(parser)\n\t\ttoken = peek_token(parser)\n\t\tif token == nil {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tfor i := range default_tag_directives {\n\t\tif !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif version_directive_ref != nil {\n\t\t*version_directive_ref = version_directive\n\t}\n\tif tag_directives_ref != nil {\n\t\t*tag_directives_ref = tag_directives\n\t}\n\treturn true\n}\n\n// Append a tag directive to the directives stack.\nfunc yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool {\n\tfor i := range parser.tag_directives {\n\t\tif bytes.Equal(value.handle, parser.tag_directives[i].handle) {\n\t\t\tif allow_duplicates {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn yaml_parser_set_parser_error(parser, \"found duplicate %TAG directive\", mark)\n\t\t}\n\t}\n\n\t// [Go] I suspect the copy is unnecessary. This was likely done\n\t// because there was no way to track ownership of the data.\n\tvalue_copy := yaml_tag_directive_t{\n\t\thandle: make([]byte, len(value.handle)),\n\t\tprefix: make([]byte, len(value.prefix)),\n\t}\n\tcopy(value_copy.handle, value.handle)\n\tcopy(value_copy.prefix, value.prefix)\n\tparser.tag_directives = append(parser.tag_directives, value_copy)\n\treturn true\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/readerc.go",
    "content": "// \n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"io\"\n)\n\n// Set the reader error and return 0.\nfunc yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool {\n\tparser.error = yaml_READER_ERROR\n\tparser.problem = problem\n\tparser.problem_offset = offset\n\tparser.problem_value = value\n\treturn false\n}\n\n// Byte order marks.\nconst (\n\tbom_UTF8    = \"\\xef\\xbb\\xbf\"\n\tbom_UTF16LE = \"\\xff\\xfe\"\n\tbom_UTF16BE = \"\\xfe\\xff\"\n)\n\n// Determine the input stream encoding by checking the BOM symbol. If no BOM is\n// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure.\nfunc yaml_parser_determine_encoding(parser *yaml_parser_t) bool {\n\t// Ensure that we had enough bytes in the raw buffer.\n\tfor !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 {\n\t\tif !yaml_parser_update_raw_buffer(parser) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Determine the encoding.\n\tbuf := parser.raw_buffer\n\tpos := parser.raw_buffer_pos\n\tavail := len(buf) - pos\n\tif avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] {\n\t\tparser.encoding = yaml_UTF16LE_ENCODING\n\t\tparser.raw_buffer_pos += 2\n\t\tparser.offset += 2\n\t} else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] {\n\t\tparser.encoding = yaml_UTF16BE_ENCODING\n\t\tparser.raw_buffer_pos += 2\n\t\tparser.offset += 2\n\t} else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] {\n\t\tparser.encoding = yaml_UTF8_ENCODING\n\t\tparser.raw_buffer_pos += 3\n\t\tparser.offset += 3\n\t} else {\n\t\tparser.encoding = yaml_UTF8_ENCODING\n\t}\n\treturn true\n}\n\n// Update the raw buffer.\nfunc yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool {\n\tsize_read := 0\n\n\t// Return if the raw buffer is full.\n\tif parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) {\n\t\treturn true\n\t}\n\n\t// Return on EOF.\n\tif parser.eof {\n\t\treturn true\n\t}\n\n\t// Move the remaining bytes in the raw buffer to the beginning.\n\tif parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) {\n\t\tcopy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:])\n\t}\n\tparser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos]\n\tparser.raw_buffer_pos = 0\n\n\t// Call the read handler to fill the buffer.\n\tsize_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)])\n\tparser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read]\n\tif err == io.EOF {\n\t\tparser.eof = true\n\t} else if err != nil {\n\t\treturn yaml_parser_set_reader_error(parser, \"input error: \"+err.Error(), parser.offset, -1)\n\t}\n\treturn true\n}\n\n// Ensure that the buffer contains at least `length` characters.\n// Return true on success, false on failure.\n//\n// The length is supposed to be significantly less that the buffer size.\nfunc yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool {\n\tif parser.read_handler == nil {\n\t\tpanic(\"read handler must be set\")\n\t}\n\n\t// [Go] This function was changed to guarantee the requested length size at EOF.\n\t// The fact we need to do this is pretty awful, but the description above implies\n\t// for that to be the case, and there are tests\n\n\t// If the EOF flag is set and the raw buffer is empty, do nothing.\n\tif parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) {\n\t\t// [Go] ACTUALLY! Read the documentation of this function above.\n\t\t// This is just broken. To return true, we need to have the\n\t\t// given length in the buffer. Not doing that means every single\n\t\t// check that calls this function to make sure the buffer has a\n\t\t// given length is Go) panicking; or C) accessing invalid memory.\n\t\t//return true\n\t}\n\n\t// Return if the buffer contains enough characters.\n\tif parser.unread >= length {\n\t\treturn true\n\t}\n\n\t// Determine the input encoding if it is not known yet.\n\tif parser.encoding == yaml_ANY_ENCODING {\n\t\tif !yaml_parser_determine_encoding(parser) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Move the unread characters to the beginning of the buffer.\n\tbuffer_len := len(parser.buffer)\n\tif parser.buffer_pos > 0 && parser.buffer_pos < buffer_len {\n\t\tcopy(parser.buffer, parser.buffer[parser.buffer_pos:])\n\t\tbuffer_len -= parser.buffer_pos\n\t\tparser.buffer_pos = 0\n\t} else if parser.buffer_pos == buffer_len {\n\t\tbuffer_len = 0\n\t\tparser.buffer_pos = 0\n\t}\n\n\t// Open the whole buffer for writing, and cut it before returning.\n\tparser.buffer = parser.buffer[:cap(parser.buffer)]\n\n\t// Fill the buffer until it has enough characters.\n\tfirst := true\n\tfor parser.unread < length {\n\n\t\t// Fill the raw buffer if necessary.\n\t\tif !first || parser.raw_buffer_pos == len(parser.raw_buffer) {\n\t\t\tif !yaml_parser_update_raw_buffer(parser) {\n\t\t\t\tparser.buffer = parser.buffer[:buffer_len]\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tfirst = false\n\n\t\t// Decode the raw buffer.\n\tinner:\n\t\tfor parser.raw_buffer_pos != len(parser.raw_buffer) {\n\t\t\tvar value rune\n\t\t\tvar width int\n\n\t\t\traw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos\n\n\t\t\t// Decode the next character.\n\t\t\tswitch parser.encoding {\n\t\t\tcase yaml_UTF8_ENCODING:\n\t\t\t\t// Decode a UTF-8 character.  Check RFC 3629\n\t\t\t\t// (http://www.ietf.org/rfc/rfc3629.txt) for more details.\n\t\t\t\t//\n\t\t\t\t// The following table (taken from the RFC) is used for\n\t\t\t\t// decoding.\n\t\t\t\t//\n\t\t\t\t//    Char. number range |        UTF-8 octet sequence\n\t\t\t\t//      (hexadecimal)    |              (binary)\n\t\t\t\t//   --------------------+------------------------------------\n\t\t\t\t//   0000 0000-0000 007F | 0xxxxxxx\n\t\t\t\t//   0000 0080-0000 07FF | 110xxxxx 10xxxxxx\n\t\t\t\t//   0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx\n\t\t\t\t//   0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n\t\t\t\t//\n\t\t\t\t// Additionally, the characters in the range 0xD800-0xDFFF\n\t\t\t\t// are prohibited as they are reserved for use with UTF-16\n\t\t\t\t// surrogate pairs.\n\n\t\t\t\t// Determine the length of the UTF-8 sequence.\n\t\t\t\toctet := parser.raw_buffer[parser.raw_buffer_pos]\n\t\t\t\tswitch {\n\t\t\t\tcase octet&0x80 == 0x00:\n\t\t\t\t\twidth = 1\n\t\t\t\tcase octet&0xE0 == 0xC0:\n\t\t\t\t\twidth = 2\n\t\t\t\tcase octet&0xF0 == 0xE0:\n\t\t\t\t\twidth = 3\n\t\t\t\tcase octet&0xF8 == 0xF0:\n\t\t\t\t\twidth = 4\n\t\t\t\tdefault:\n\t\t\t\t\t// The leading octet is invalid.\n\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\"invalid leading UTF-8 octet\",\n\t\t\t\t\t\tparser.offset, int(octet))\n\t\t\t\t}\n\n\t\t\t\t// Check if the raw buffer contains an incomplete character.\n\t\t\t\tif width > raw_unread {\n\t\t\t\t\tif parser.eof {\n\t\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\t\"incomplete UTF-8 octet sequence\",\n\t\t\t\t\t\t\tparser.offset, -1)\n\t\t\t\t\t}\n\t\t\t\t\tbreak inner\n\t\t\t\t}\n\n\t\t\t\t// Decode the leading octet.\n\t\t\t\tswitch {\n\t\t\t\tcase octet&0x80 == 0x00:\n\t\t\t\t\tvalue = rune(octet & 0x7F)\n\t\t\t\tcase octet&0xE0 == 0xC0:\n\t\t\t\t\tvalue = rune(octet & 0x1F)\n\t\t\t\tcase octet&0xF0 == 0xE0:\n\t\t\t\t\tvalue = rune(octet & 0x0F)\n\t\t\t\tcase octet&0xF8 == 0xF0:\n\t\t\t\t\tvalue = rune(octet & 0x07)\n\t\t\t\tdefault:\n\t\t\t\t\tvalue = 0\n\t\t\t\t}\n\n\t\t\t\t// Check and decode the trailing octets.\n\t\t\t\tfor k := 1; k < width; k++ {\n\t\t\t\t\toctet = parser.raw_buffer[parser.raw_buffer_pos+k]\n\n\t\t\t\t\t// Check if the octet is valid.\n\t\t\t\t\tif (octet & 0xC0) != 0x80 {\n\t\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\t\"invalid trailing UTF-8 octet\",\n\t\t\t\t\t\t\tparser.offset+k, int(octet))\n\t\t\t\t\t}\n\n\t\t\t\t\t// Decode the octet.\n\t\t\t\t\tvalue = (value << 6) + rune(octet&0x3F)\n\t\t\t\t}\n\n\t\t\t\t// Check the length of the sequence against the value.\n\t\t\t\tswitch {\n\t\t\t\tcase width == 1:\n\t\t\t\tcase width == 2 && value >= 0x80:\n\t\t\t\tcase width == 3 && value >= 0x800:\n\t\t\t\tcase width == 4 && value >= 0x10000:\n\t\t\t\tdefault:\n\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\"invalid length of a UTF-8 sequence\",\n\t\t\t\t\t\tparser.offset, -1)\n\t\t\t\t}\n\n\t\t\t\t// Check the range of the value.\n\t\t\t\tif value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF {\n\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\"invalid Unicode character\",\n\t\t\t\t\t\tparser.offset, int(value))\n\t\t\t\t}\n\n\t\t\tcase yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING:\n\t\t\t\tvar low, high int\n\t\t\t\tif parser.encoding == yaml_UTF16LE_ENCODING {\n\t\t\t\t\tlow, high = 0, 1\n\t\t\t\t} else {\n\t\t\t\t\tlow, high = 1, 0\n\t\t\t\t}\n\n\t\t\t\t// The UTF-16 encoding is not as simple as one might\n\t\t\t\t// naively think.  Check RFC 2781\n\t\t\t\t// (http://www.ietf.org/rfc/rfc2781.txt).\n\t\t\t\t//\n\t\t\t\t// Normally, two subsequent bytes describe a Unicode\n\t\t\t\t// character.  However a special technique (called a\n\t\t\t\t// surrogate pair) is used for specifying character\n\t\t\t\t// values larger than 0xFFFF.\n\t\t\t\t//\n\t\t\t\t// A surrogate pair consists of two pseudo-characters:\n\t\t\t\t//      high surrogate area (0xD800-0xDBFF)\n\t\t\t\t//      low surrogate area (0xDC00-0xDFFF)\n\t\t\t\t//\n\t\t\t\t// The following formulas are used for decoding\n\t\t\t\t// and encoding characters using surrogate pairs:\n\t\t\t\t//\n\t\t\t\t//  U  = U' + 0x10000   (0x01 00 00 <= U <= 0x10 FF FF)\n\t\t\t\t//  U' = yyyyyyyyyyxxxxxxxxxx   (0 <= U' <= 0x0F FF FF)\n\t\t\t\t//  W1 = 110110yyyyyyyyyy\n\t\t\t\t//  W2 = 110111xxxxxxxxxx\n\t\t\t\t//\n\t\t\t\t// where U is the character value, W1 is the high surrogate\n\t\t\t\t// area, W2 is the low surrogate area.\n\n\t\t\t\t// Check for incomplete UTF-16 character.\n\t\t\t\tif raw_unread < 2 {\n\t\t\t\t\tif parser.eof {\n\t\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\t\"incomplete UTF-16 character\",\n\t\t\t\t\t\t\tparser.offset, -1)\n\t\t\t\t\t}\n\t\t\t\t\tbreak inner\n\t\t\t\t}\n\n\t\t\t\t// Get the character.\n\t\t\t\tvalue = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) +\n\t\t\t\t\t(rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8)\n\n\t\t\t\t// Check for unexpected low surrogate area.\n\t\t\t\tif value&0xFC00 == 0xDC00 {\n\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\"unexpected low surrogate area\",\n\t\t\t\t\t\tparser.offset, int(value))\n\t\t\t\t}\n\n\t\t\t\t// Check for a high surrogate area.\n\t\t\t\tif value&0xFC00 == 0xD800 {\n\t\t\t\t\twidth = 4\n\n\t\t\t\t\t// Check for incomplete surrogate pair.\n\t\t\t\t\tif raw_unread < 4 {\n\t\t\t\t\t\tif parser.eof {\n\t\t\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\t\t\"incomplete UTF-16 surrogate pair\",\n\t\t\t\t\t\t\t\tparser.offset, -1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak inner\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the next character.\n\t\t\t\t\tvalue2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) +\n\t\t\t\t\t\t(rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8)\n\n\t\t\t\t\t// Check for a low surrogate area.\n\t\t\t\t\tif value2&0xFC00 != 0xDC00 {\n\t\t\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\t\t\"expected low surrogate area\",\n\t\t\t\t\t\t\tparser.offset+2, int(value2))\n\t\t\t\t\t}\n\n\t\t\t\t\t// Generate the value of the surrogate pair.\n\t\t\t\t\tvalue = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF)\n\t\t\t\t} else {\n\t\t\t\t\twidth = 2\n\t\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\tpanic(\"impossible\")\n\t\t\t}\n\n\t\t\t// Check if the character is in the allowed range:\n\t\t\t//      #x9 | #xA | #xD | [#x20-#x7E]               (8 bit)\n\t\t\t//      | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD]    (16 bit)\n\t\t\t//      | [#x10000-#x10FFFF]                        (32 bit)\n\t\t\tswitch {\n\t\t\tcase value == 0x09:\n\t\t\tcase value == 0x0A:\n\t\t\tcase value == 0x0D:\n\t\t\tcase value >= 0x20 && value <= 0x7E:\n\t\t\tcase value == 0x85:\n\t\t\tcase value >= 0xA0 && value <= 0xD7FF:\n\t\t\tcase value >= 0xE000 && value <= 0xFFFD:\n\t\t\tcase value >= 0x10000 && value <= 0x10FFFF:\n\t\t\tdefault:\n\t\t\t\treturn yaml_parser_set_reader_error(parser,\n\t\t\t\t\t\"control characters are not allowed\",\n\t\t\t\t\tparser.offset, int(value))\n\t\t\t}\n\n\t\t\t// Move the raw pointers.\n\t\t\tparser.raw_buffer_pos += width\n\t\t\tparser.offset += width\n\n\t\t\t// Finally put the character into the buffer.\n\t\t\tif value <= 0x7F {\n\t\t\t\t// 0000 0000-0000 007F . 0xxxxxxx\n\t\t\t\tparser.buffer[buffer_len+0] = byte(value)\n\t\t\t\tbuffer_len += 1\n\t\t\t} else if value <= 0x7FF {\n\t\t\t\t// 0000 0080-0000 07FF . 110xxxxx 10xxxxxx\n\t\t\t\tparser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6))\n\t\t\t\tparser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F))\n\t\t\t\tbuffer_len += 2\n\t\t\t} else if value <= 0xFFFF {\n\t\t\t\t// 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx\n\t\t\t\tparser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12))\n\t\t\t\tparser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F))\n\t\t\t\tparser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F))\n\t\t\t\tbuffer_len += 3\n\t\t\t} else {\n\t\t\t\t// 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n\t\t\t\tparser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18))\n\t\t\t\tparser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F))\n\t\t\t\tparser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F))\n\t\t\t\tparser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F))\n\t\t\t\tbuffer_len += 4\n\t\t\t}\n\n\t\t\tparser.unread++\n\t\t}\n\n\t\t// On EOF, put NUL into the buffer and return.\n\t\tif parser.eof {\n\t\t\tparser.buffer[buffer_len] = 0\n\t\t\tbuffer_len++\n\t\t\tparser.unread++\n\t\t\tbreak\n\t\t}\n\t}\n\t// [Go] Read the documentation of this function above. To return true,\n\t// we need to have the given length in the buffer. Not doing that means\n\t// every single check that calls this function to make sure the buffer\n\t// has a given length is Go) panicking; or C) accessing invalid memory.\n\t// This happens here due to the EOF above breaking early.\n\tfor buffer_len < length {\n\t\tparser.buffer[buffer_len] = 0\n\t\tbuffer_len++\n\t}\n\tparser.buffer = parser.buffer[:buffer_len]\n\treturn true\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/resolve.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage yaml\n\nimport (\n\t\"encoding/base64\"\n\t\"math\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype resolveMapItem struct {\n\tvalue interface{}\n\ttag   string\n}\n\nvar resolveTable = make([]byte, 256)\nvar resolveMap = make(map[string]resolveMapItem)\n\nfunc init() {\n\tt := resolveTable\n\tt[int('+')] = 'S' // Sign\n\tt[int('-')] = 'S'\n\tfor _, c := range \"0123456789\" {\n\t\tt[int(c)] = 'D' // Digit\n\t}\n\tfor _, c := range \"yYnNtTfFoO~\" {\n\t\tt[int(c)] = 'M' // In map\n\t}\n\tt[int('.')] = '.' // Float (potentially in map)\n\n\tvar resolveMapList = []struct {\n\t\tv   interface{}\n\t\ttag string\n\t\tl   []string\n\t}{\n\t\t{true, boolTag, []string{\"true\", \"True\", \"TRUE\"}},\n\t\t{false, boolTag, []string{\"false\", \"False\", \"FALSE\"}},\n\t\t{nil, nullTag, []string{\"\", \"~\", \"null\", \"Null\", \"NULL\"}},\n\t\t{math.NaN(), floatTag, []string{\".nan\", \".NaN\", \".NAN\"}},\n\t\t{math.Inf(+1), floatTag, []string{\".inf\", \".Inf\", \".INF\"}},\n\t\t{math.Inf(+1), floatTag, []string{\"+.inf\", \"+.Inf\", \"+.INF\"}},\n\t\t{math.Inf(-1), floatTag, []string{\"-.inf\", \"-.Inf\", \"-.INF\"}},\n\t\t{\"<<\", mergeTag, []string{\"<<\"}},\n\t}\n\n\tm := resolveMap\n\tfor _, item := range resolveMapList {\n\t\tfor _, s := range item.l {\n\t\t\tm[s] = resolveMapItem{item.v, item.tag}\n\t\t}\n\t}\n}\n\nconst (\n\tnullTag      = \"!!null\"\n\tboolTag      = \"!!bool\"\n\tstrTag       = \"!!str\"\n\tintTag       = \"!!int\"\n\tfloatTag     = \"!!float\"\n\ttimestampTag = \"!!timestamp\"\n\tseqTag       = \"!!seq\"\n\tmapTag       = \"!!map\"\n\tbinaryTag    = \"!!binary\"\n\tmergeTag     = \"!!merge\"\n)\n\nvar longTags = make(map[string]string)\nvar shortTags = make(map[string]string)\n\nfunc init() {\n\tfor _, stag := range []string{nullTag, boolTag, strTag, intTag, floatTag, timestampTag, seqTag, mapTag, binaryTag, mergeTag} {\n\t\tltag := longTag(stag)\n\t\tlongTags[stag] = ltag\n\t\tshortTags[ltag] = stag\n\t}\n}\n\nconst longTagPrefix = \"tag:yaml.org,2002:\"\n\nfunc shortTag(tag string) string {\n\tif strings.HasPrefix(tag, longTagPrefix) {\n\t\tif stag, ok := shortTags[tag]; ok {\n\t\t\treturn stag\n\t\t}\n\t\treturn \"!!\" + tag[len(longTagPrefix):]\n\t}\n\treturn tag\n}\n\nfunc longTag(tag string) string {\n\tif strings.HasPrefix(tag, \"!!\") {\n\t\tif ltag, ok := longTags[tag]; ok {\n\t\t\treturn ltag\n\t\t}\n\t\treturn longTagPrefix + tag[2:]\n\t}\n\treturn tag\n}\n\nfunc resolvableTag(tag string) bool {\n\tswitch tag {\n\tcase \"\", strTag, boolTag, intTag, floatTag, nullTag, timestampTag:\n\t\treturn true\n\t}\n\treturn false\n}\n\nvar yamlStyleFloat = regexp.MustCompile(`^[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?$`)\n\nfunc resolve(tag string, in string) (rtag string, out interface{}) {\n\ttag = shortTag(tag)\n\tif !resolvableTag(tag) {\n\t\treturn tag, in\n\t}\n\n\tdefer func() {\n\t\tswitch tag {\n\t\tcase \"\", rtag, strTag, binaryTag:\n\t\t\treturn\n\t\tcase floatTag:\n\t\t\tif rtag == intTag {\n\t\t\t\tswitch v := out.(type) {\n\t\t\t\tcase int64:\n\t\t\t\t\trtag = floatTag\n\t\t\t\t\tout = float64(v)\n\t\t\t\t\treturn\n\t\t\t\tcase int:\n\t\t\t\t\trtag = floatTag\n\t\t\t\t\tout = float64(v)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfailf(\"cannot decode %s `%s` as a %s\", shortTag(rtag), in, shortTag(tag))\n\t}()\n\n\t// Any data is accepted as a !!str or !!binary.\n\t// Otherwise, the prefix is enough of a hint about what it might be.\n\thint := byte('N')\n\tif in != \"\" {\n\t\thint = resolveTable[in[0]]\n\t}\n\tif hint != 0 && tag != strTag && tag != binaryTag {\n\t\t// Handle things we can lookup in a map.\n\t\tif item, ok := resolveMap[in]; ok {\n\t\t\treturn item.tag, item.value\n\t\t}\n\n\t\t// Base 60 floats are a bad idea, were dropped in YAML 1.2, and\n\t\t// are purposefully unsupported here. They're still quoted on\n\t\t// the way out for compatibility with other parser, though.\n\n\t\tswitch hint {\n\t\tcase 'M':\n\t\t\t// We've already checked the map above.\n\n\t\tcase '.':\n\t\t\t// Not in the map, so maybe a normal float.\n\t\t\tfloatv, err := strconv.ParseFloat(in, 64)\n\t\t\tif err == nil {\n\t\t\t\treturn floatTag, floatv\n\t\t\t}\n\n\t\tcase 'D', 'S':\n\t\t\t// Int, float, or timestamp.\n\t\t\t// Only try values as a timestamp if the value is unquoted or there's an explicit\n\t\t\t// !!timestamp tag.\n\t\t\tif tag == \"\" || tag == timestampTag {\n\t\t\t\tt, ok := parseTimestamp(in)\n\t\t\t\tif ok {\n\t\t\t\t\treturn timestampTag, t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tplain := strings.Replace(in, \"_\", \"\", -1)\n\t\t\tintv, err := strconv.ParseInt(plain, 0, 64)\n\t\t\tif err == nil {\n\t\t\t\tif intv == int64(int(intv)) {\n\t\t\t\t\treturn intTag, int(intv)\n\t\t\t\t} else {\n\t\t\t\t\treturn intTag, intv\n\t\t\t\t}\n\t\t\t}\n\t\t\tuintv, err := strconv.ParseUint(plain, 0, 64)\n\t\t\tif err == nil {\n\t\t\t\treturn intTag, uintv\n\t\t\t}\n\t\t\tif yamlStyleFloat.MatchString(plain) {\n\t\t\t\tfloatv, err := strconv.ParseFloat(plain, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\treturn floatTag, floatv\n\t\t\t\t}\n\t\t\t}\n\t\t\tif strings.HasPrefix(plain, \"0b\") {\n\t\t\t\tintv, err := strconv.ParseInt(plain[2:], 2, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\tif intv == int64(int(intv)) {\n\t\t\t\t\t\treturn intTag, int(intv)\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn intTag, intv\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tuintv, err := strconv.ParseUint(plain[2:], 2, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\treturn intTag, uintv\n\t\t\t\t}\n\t\t\t} else if strings.HasPrefix(plain, \"-0b\") {\n\t\t\t\tintv, err := strconv.ParseInt(\"-\"+plain[3:], 2, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\tif true || intv == int64(int(intv)) {\n\t\t\t\t\t\treturn intTag, int(intv)\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn intTag, intv\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Octals as introduced in version 1.2 of the spec.\n\t\t\t// Octals from the 1.1 spec, spelled as 0777, are still\n\t\t\t// decoded by default in v3 as well for compatibility.\n\t\t\t// May be dropped in v4 depending on how usage evolves.\n\t\t\tif strings.HasPrefix(plain, \"0o\") {\n\t\t\t\tintv, err := strconv.ParseInt(plain[2:], 8, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\tif intv == int64(int(intv)) {\n\t\t\t\t\t\treturn intTag, int(intv)\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn intTag, intv\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tuintv, err := strconv.ParseUint(plain[2:], 8, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\treturn intTag, uintv\n\t\t\t\t}\n\t\t\t} else if strings.HasPrefix(plain, \"-0o\") {\n\t\t\t\tintv, err := strconv.ParseInt(\"-\"+plain[3:], 8, 64)\n\t\t\t\tif err == nil {\n\t\t\t\t\tif true || intv == int64(int(intv)) {\n\t\t\t\t\t\treturn intTag, int(intv)\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn intTag, intv\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tdefault:\n\t\t\tpanic(\"internal error: missing handler for resolver table: \" + string(rune(hint)) + \" (with \" + in + \")\")\n\t\t}\n\t}\n\treturn strTag, in\n}\n\n// encodeBase64 encodes s as base64 that is broken up into multiple lines\n// as appropriate for the resulting length.\nfunc encodeBase64(s string) string {\n\tconst lineLen = 70\n\tencLen := base64.StdEncoding.EncodedLen(len(s))\n\tlines := encLen/lineLen + 1\n\tbuf := make([]byte, encLen*2+lines)\n\tin := buf[0:encLen]\n\tout := buf[encLen:]\n\tbase64.StdEncoding.Encode(in, []byte(s))\n\tk := 0\n\tfor i := 0; i < len(in); i += lineLen {\n\t\tj := i + lineLen\n\t\tif j > len(in) {\n\t\t\tj = len(in)\n\t\t}\n\t\tk += copy(out[k:], in[i:j])\n\t\tif lines > 1 {\n\t\t\tout[k] = '\\n'\n\t\t\tk++\n\t\t}\n\t}\n\treturn string(out[:k])\n}\n\n// This is a subset of the formats allowed by the regular expression\n// defined at http://yaml.org/type/timestamp.html.\nvar allowedTimestampFormats = []string{\n\t\"2006-1-2T15:4:5.999999999Z07:00\", // RCF3339Nano with short date fields.\n\t\"2006-1-2t15:4:5.999999999Z07:00\", // RFC3339Nano with short date fields and lower-case \"t\".\n\t\"2006-1-2 15:4:5.999999999\",       // space separated with no time zone\n\t\"2006-1-2\",                        // date only\n\t// Notable exception: time.Parse cannot handle: \"2001-12-14 21:59:43.10 -5\"\n\t// from the set of examples.\n}\n\n// parseTimestamp parses s as a timestamp string and\n// returns the timestamp and reports whether it succeeded.\n// Timestamp formats are defined at http://yaml.org/type/timestamp.html\nfunc parseTimestamp(s string) (time.Time, bool) {\n\t// TODO write code to check all the formats supported by\n\t// http://yaml.org/type/timestamp.html instead of using time.Parse.\n\n\t// Quick check: all date formats start with YYYY-.\n\ti := 0\n\tfor ; i < len(s); i++ {\n\t\tif c := s[i]; c < '0' || c > '9' {\n\t\t\tbreak\n\t\t}\n\t}\n\tif i != 4 || i == len(s) || s[i] != '-' {\n\t\treturn time.Time{}, false\n\t}\n\tfor _, format := range allowedTimestampFormats {\n\t\tif t, err := time.Parse(format, s); err == nil {\n\t\t\treturn t, true\n\t\t}\n\t}\n\treturn time.Time{}, false\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/scannerc.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n)\n\n// Introduction\n// ************\n//\n// The following notes assume that you are familiar with the YAML specification\n// (http://yaml.org/spec/1.2/spec.html).  We mostly follow it, although in\n// some cases we are less restrictive that it requires.\n//\n// The process of transforming a YAML stream into a sequence of events is\n// divided on two steps: Scanning and Parsing.\n//\n// The Scanner transforms the input stream into a sequence of tokens, while the\n// parser transform the sequence of tokens produced by the Scanner into a\n// sequence of parsing events.\n//\n// The Scanner is rather clever and complicated. The Parser, on the contrary,\n// is a straightforward implementation of a recursive-descendant parser (or,\n// LL(1) parser, as it is usually called).\n//\n// Actually there are two issues of Scanning that might be called \"clever\", the\n// rest is quite straightforward.  The issues are \"block collection start\" and\n// \"simple keys\".  Both issues are explained below in details.\n//\n// Here the Scanning step is explained and implemented.  We start with the list\n// of all the tokens produced by the Scanner together with short descriptions.\n//\n// Now, tokens:\n//\n//      STREAM-START(encoding)          # The stream start.\n//      STREAM-END                      # The stream end.\n//      VERSION-DIRECTIVE(major,minor)  # The '%YAML' directive.\n//      TAG-DIRECTIVE(handle,prefix)    # The '%TAG' directive.\n//      DOCUMENT-START                  # '---'\n//      DOCUMENT-END                    # '...'\n//      BLOCK-SEQUENCE-START            # Indentation increase denoting a block\n//      BLOCK-MAPPING-START             # sequence or a block mapping.\n//      BLOCK-END                       # Indentation decrease.\n//      FLOW-SEQUENCE-START             # '['\n//      FLOW-SEQUENCE-END               # ']'\n//      BLOCK-SEQUENCE-START            # '{'\n//      BLOCK-SEQUENCE-END              # '}'\n//      BLOCK-ENTRY                     # '-'\n//      FLOW-ENTRY                      # ','\n//      KEY                             # '?' or nothing (simple keys).\n//      VALUE                           # ':'\n//      ALIAS(anchor)                   # '*anchor'\n//      ANCHOR(anchor)                  # '&anchor'\n//      TAG(handle,suffix)              # '!handle!suffix'\n//      SCALAR(value,style)             # A scalar.\n//\n// The following two tokens are \"virtual\" tokens denoting the beginning and the\n// end of the stream:\n//\n//      STREAM-START(encoding)\n//      STREAM-END\n//\n// We pass the information about the input stream encoding with the\n// STREAM-START token.\n//\n// The next two tokens are responsible for tags:\n//\n//      VERSION-DIRECTIVE(major,minor)\n//      TAG-DIRECTIVE(handle,prefix)\n//\n// Example:\n//\n//      %YAML   1.1\n//      %TAG    !   !foo\n//      %TAG    !yaml!  tag:yaml.org,2002:\n//      ---\n//\n// The correspoding sequence of tokens:\n//\n//      STREAM-START(utf-8)\n//      VERSION-DIRECTIVE(1,1)\n//      TAG-DIRECTIVE(\"!\",\"!foo\")\n//      TAG-DIRECTIVE(\"!yaml\",\"tag:yaml.org,2002:\")\n//      DOCUMENT-START\n//      STREAM-END\n//\n// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole\n// line.\n//\n// The document start and end indicators are represented by:\n//\n//      DOCUMENT-START\n//      DOCUMENT-END\n//\n// Note that if a YAML stream contains an implicit document (without '---'\n// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be\n// produced.\n//\n// In the following examples, we present whole documents together with the\n// produced tokens.\n//\n//      1. An implicit document:\n//\n//          'a scalar'\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          SCALAR(\"a scalar\",single-quoted)\n//          STREAM-END\n//\n//      2. An explicit document:\n//\n//          ---\n//          'a scalar'\n//          ...\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          DOCUMENT-START\n//          SCALAR(\"a scalar\",single-quoted)\n//          DOCUMENT-END\n//          STREAM-END\n//\n//      3. Several documents in a stream:\n//\n//          'a scalar'\n//          ---\n//          'another scalar'\n//          ---\n//          'yet another scalar'\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          SCALAR(\"a scalar\",single-quoted)\n//          DOCUMENT-START\n//          SCALAR(\"another scalar\",single-quoted)\n//          DOCUMENT-START\n//          SCALAR(\"yet another scalar\",single-quoted)\n//          STREAM-END\n//\n// We have already introduced the SCALAR token above.  The following tokens are\n// used to describe aliases, anchors, tag, and scalars:\n//\n//      ALIAS(anchor)\n//      ANCHOR(anchor)\n//      TAG(handle,suffix)\n//      SCALAR(value,style)\n//\n// The following series of examples illustrate the usage of these tokens:\n//\n//      1. A recursive sequence:\n//\n//          &A [ *A ]\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          ANCHOR(\"A\")\n//          FLOW-SEQUENCE-START\n//          ALIAS(\"A\")\n//          FLOW-SEQUENCE-END\n//          STREAM-END\n//\n//      2. A tagged scalar:\n//\n//          !!float \"3.14\"  # A good approximation.\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          TAG(\"!!\",\"float\")\n//          SCALAR(\"3.14\",double-quoted)\n//          STREAM-END\n//\n//      3. Various scalar styles:\n//\n//          --- # Implicit empty plain scalars do not produce tokens.\n//          --- a plain scalar\n//          --- 'a single-quoted scalar'\n//          --- \"a double-quoted scalar\"\n//          --- |-\n//            a literal scalar\n//          --- >-\n//            a folded\n//            scalar\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          DOCUMENT-START\n//          DOCUMENT-START\n//          SCALAR(\"a plain scalar\",plain)\n//          DOCUMENT-START\n//          SCALAR(\"a single-quoted scalar\",single-quoted)\n//          DOCUMENT-START\n//          SCALAR(\"a double-quoted scalar\",double-quoted)\n//          DOCUMENT-START\n//          SCALAR(\"a literal scalar\",literal)\n//          DOCUMENT-START\n//          SCALAR(\"a folded scalar\",folded)\n//          STREAM-END\n//\n// Now it's time to review collection-related tokens. We will start with\n// flow collections:\n//\n//      FLOW-SEQUENCE-START\n//      FLOW-SEQUENCE-END\n//      FLOW-MAPPING-START\n//      FLOW-MAPPING-END\n//      FLOW-ENTRY\n//      KEY\n//      VALUE\n//\n// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and\n// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}'\n// correspondingly.  FLOW-ENTRY represent the ',' indicator.  Finally the\n// indicators '?' and ':', which are used for denoting mapping keys and values,\n// are represented by the KEY and VALUE tokens.\n//\n// The following examples show flow collections:\n//\n//      1. A flow sequence:\n//\n//          [item 1, item 2, item 3]\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          FLOW-SEQUENCE-START\n//          SCALAR(\"item 1\",plain)\n//          FLOW-ENTRY\n//          SCALAR(\"item 2\",plain)\n//          FLOW-ENTRY\n//          SCALAR(\"item 3\",plain)\n//          FLOW-SEQUENCE-END\n//          STREAM-END\n//\n//      2. A flow mapping:\n//\n//          {\n//              a simple key: a value,  # Note that the KEY token is produced.\n//              ? a complex key: another value,\n//          }\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          FLOW-MAPPING-START\n//          KEY\n//          SCALAR(\"a simple key\",plain)\n//          VALUE\n//          SCALAR(\"a value\",plain)\n//          FLOW-ENTRY\n//          KEY\n//          SCALAR(\"a complex key\",plain)\n//          VALUE\n//          SCALAR(\"another value\",plain)\n//          FLOW-ENTRY\n//          FLOW-MAPPING-END\n//          STREAM-END\n//\n// A simple key is a key which is not denoted by the '?' indicator.  Note that\n// the Scanner still produce the KEY token whenever it encounters a simple key.\n//\n// For scanning block collections, the following tokens are used (note that we\n// repeat KEY and VALUE here):\n//\n//      BLOCK-SEQUENCE-START\n//      BLOCK-MAPPING-START\n//      BLOCK-END\n//      BLOCK-ENTRY\n//      KEY\n//      VALUE\n//\n// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation\n// increase that precedes a block collection (cf. the INDENT token in Python).\n// The token BLOCK-END denote indentation decrease that ends a block collection\n// (cf. the DEDENT token in Python).  However YAML has some syntax pecularities\n// that makes detections of these tokens more complex.\n//\n// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators\n// '-', '?', and ':' correspondingly.\n//\n// The following examples show how the tokens BLOCK-SEQUENCE-START,\n// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner:\n//\n//      1. Block sequences:\n//\n//          - item 1\n//          - item 2\n//          -\n//            - item 3.1\n//            - item 3.2\n//          -\n//            key 1: value 1\n//            key 2: value 2\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          SCALAR(\"item 1\",plain)\n//          BLOCK-ENTRY\n//          SCALAR(\"item 2\",plain)\n//          BLOCK-ENTRY\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          SCALAR(\"item 3.1\",plain)\n//          BLOCK-ENTRY\n//          SCALAR(\"item 3.2\",plain)\n//          BLOCK-END\n//          BLOCK-ENTRY\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"key 1\",plain)\n//          VALUE\n//          SCALAR(\"value 1\",plain)\n//          KEY\n//          SCALAR(\"key 2\",plain)\n//          VALUE\n//          SCALAR(\"value 2\",plain)\n//          BLOCK-END\n//          BLOCK-END\n//          STREAM-END\n//\n//      2. Block mappings:\n//\n//          a simple key: a value   # The KEY token is produced here.\n//          ? a complex key\n//          : another value\n//          a mapping:\n//            key 1: value 1\n//            key 2: value 2\n//          a sequence:\n//            - item 1\n//            - item 2\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"a simple key\",plain)\n//          VALUE\n//          SCALAR(\"a value\",plain)\n//          KEY\n//          SCALAR(\"a complex key\",plain)\n//          VALUE\n//          SCALAR(\"another value\",plain)\n//          KEY\n//          SCALAR(\"a mapping\",plain)\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"key 1\",plain)\n//          VALUE\n//          SCALAR(\"value 1\",plain)\n//          KEY\n//          SCALAR(\"key 2\",plain)\n//          VALUE\n//          SCALAR(\"value 2\",plain)\n//          BLOCK-END\n//          KEY\n//          SCALAR(\"a sequence\",plain)\n//          VALUE\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          SCALAR(\"item 1\",plain)\n//          BLOCK-ENTRY\n//          SCALAR(\"item 2\",plain)\n//          BLOCK-END\n//          BLOCK-END\n//          STREAM-END\n//\n// YAML does not always require to start a new block collection from a new\n// line.  If the current line contains only '-', '?', and ':' indicators, a new\n// block collection may start at the current line.  The following examples\n// illustrate this case:\n//\n//      1. Collections in a sequence:\n//\n//          - - item 1\n//            - item 2\n//          - key 1: value 1\n//            key 2: value 2\n//          - ? complex key\n//            : complex value\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          SCALAR(\"item 1\",plain)\n//          BLOCK-ENTRY\n//          SCALAR(\"item 2\",plain)\n//          BLOCK-END\n//          BLOCK-ENTRY\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"key 1\",plain)\n//          VALUE\n//          SCALAR(\"value 1\",plain)\n//          KEY\n//          SCALAR(\"key 2\",plain)\n//          VALUE\n//          SCALAR(\"value 2\",plain)\n//          BLOCK-END\n//          BLOCK-ENTRY\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"complex key\")\n//          VALUE\n//          SCALAR(\"complex value\")\n//          BLOCK-END\n//          BLOCK-END\n//          STREAM-END\n//\n//      2. Collections in a mapping:\n//\n//          ? a sequence\n//          : - item 1\n//            - item 2\n//          ? a mapping\n//          : key 1: value 1\n//            key 2: value 2\n//\n//      Tokens:\n//\n//          STREAM-START(utf-8)\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"a sequence\",plain)\n//          VALUE\n//          BLOCK-SEQUENCE-START\n//          BLOCK-ENTRY\n//          SCALAR(\"item 1\",plain)\n//          BLOCK-ENTRY\n//          SCALAR(\"item 2\",plain)\n//          BLOCK-END\n//          KEY\n//          SCALAR(\"a mapping\",plain)\n//          VALUE\n//          BLOCK-MAPPING-START\n//          KEY\n//          SCALAR(\"key 1\",plain)\n//          VALUE\n//          SCALAR(\"value 1\",plain)\n//          KEY\n//          SCALAR(\"key 2\",plain)\n//          VALUE\n//          SCALAR(\"value 2\",plain)\n//          BLOCK-END\n//          BLOCK-END\n//          STREAM-END\n//\n// YAML also permits non-indented sequences if they are included into a block\n// mapping.  In this case, the token BLOCK-SEQUENCE-START is not produced:\n//\n//      key:\n//      - item 1    # BLOCK-SEQUENCE-START is NOT produced here.\n//      - item 2\n//\n// Tokens:\n//\n//      STREAM-START(utf-8)\n//      BLOCK-MAPPING-START\n//      KEY\n//      SCALAR(\"key\",plain)\n//      VALUE\n//      BLOCK-ENTRY\n//      SCALAR(\"item 1\",plain)\n//      BLOCK-ENTRY\n//      SCALAR(\"item 2\",plain)\n//      BLOCK-END\n//\n\n// Ensure that the buffer contains the required number of characters.\n// Return true on success, false on failure (reader error or memory error).\nfunc cache(parser *yaml_parser_t, length int) bool {\n\t// [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B)\n\treturn parser.unread >= length || yaml_parser_update_buffer(parser, length)\n}\n\n// Advance the buffer pointer.\nfunc skip(parser *yaml_parser_t) {\n\tif !is_blank(parser.buffer, parser.buffer_pos) {\n\t\tparser.newlines = 0\n\t}\n\tparser.mark.index++\n\tparser.mark.column++\n\tparser.unread--\n\tparser.buffer_pos += width(parser.buffer[parser.buffer_pos])\n}\n\nfunc skip_line(parser *yaml_parser_t) {\n\tif is_crlf(parser.buffer, parser.buffer_pos) {\n\t\tparser.mark.index += 2\n\t\tparser.mark.column = 0\n\t\tparser.mark.line++\n\t\tparser.unread -= 2\n\t\tparser.buffer_pos += 2\n\t\tparser.newlines++\n\t} else if is_break(parser.buffer, parser.buffer_pos) {\n\t\tparser.mark.index++\n\t\tparser.mark.column = 0\n\t\tparser.mark.line++\n\t\tparser.unread--\n\t\tparser.buffer_pos += width(parser.buffer[parser.buffer_pos])\n\t\tparser.newlines++\n\t}\n}\n\n// Copy a character to a string buffer and advance pointers.\nfunc read(parser *yaml_parser_t, s []byte) []byte {\n\tif !is_blank(parser.buffer, parser.buffer_pos) {\n\t\tparser.newlines = 0\n\t}\n\tw := width(parser.buffer[parser.buffer_pos])\n\tif w == 0 {\n\t\tpanic(\"invalid character sequence\")\n\t}\n\tif len(s) == 0 {\n\t\ts = make([]byte, 0, 32)\n\t}\n\tif w == 1 && len(s)+w <= cap(s) {\n\t\ts = s[:len(s)+1]\n\t\ts[len(s)-1] = parser.buffer[parser.buffer_pos]\n\t\tparser.buffer_pos++\n\t} else {\n\t\ts = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...)\n\t\tparser.buffer_pos += w\n\t}\n\tparser.mark.index++\n\tparser.mark.column++\n\tparser.unread--\n\treturn s\n}\n\n// Copy a line break character to a string buffer and advance pointers.\nfunc read_line(parser *yaml_parser_t, s []byte) []byte {\n\tbuf := parser.buffer\n\tpos := parser.buffer_pos\n\tswitch {\n\tcase buf[pos] == '\\r' && buf[pos+1] == '\\n':\n\t\t// CR LF . LF\n\t\ts = append(s, '\\n')\n\t\tparser.buffer_pos += 2\n\t\tparser.mark.index++\n\t\tparser.unread--\n\tcase buf[pos] == '\\r' || buf[pos] == '\\n':\n\t\t// CR|LF . LF\n\t\ts = append(s, '\\n')\n\t\tparser.buffer_pos += 1\n\tcase buf[pos] == '\\xC2' && buf[pos+1] == '\\x85':\n\t\t// NEL . LF\n\t\ts = append(s, '\\n')\n\t\tparser.buffer_pos += 2\n\tcase buf[pos] == '\\xE2' && buf[pos+1] == '\\x80' && (buf[pos+2] == '\\xA8' || buf[pos+2] == '\\xA9'):\n\t\t// LS|PS . LS|PS\n\t\ts = append(s, buf[parser.buffer_pos:pos+3]...)\n\t\tparser.buffer_pos += 3\n\tdefault:\n\t\treturn s\n\t}\n\tparser.mark.index++\n\tparser.mark.column = 0\n\tparser.mark.line++\n\tparser.unread--\n\tparser.newlines++\n\treturn s\n}\n\n// Get the next token.\nfunc yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool {\n\t// Erase the token object.\n\t*token = yaml_token_t{} // [Go] Is this necessary?\n\n\t// No tokens after STREAM-END or error.\n\tif parser.stream_end_produced || parser.error != yaml_NO_ERROR {\n\t\treturn true\n\t}\n\n\t// Ensure that the tokens queue contains enough tokens.\n\tif !parser.token_available {\n\t\tif !yaml_parser_fetch_more_tokens(parser) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Fetch the next token from the queue.\n\t*token = parser.tokens[parser.tokens_head]\n\tparser.tokens_head++\n\tparser.tokens_parsed++\n\tparser.token_available = false\n\n\tif token.typ == yaml_STREAM_END_TOKEN {\n\t\tparser.stream_end_produced = true\n\t}\n\treturn true\n}\n\n// Set the scanner error and return false.\nfunc yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool {\n\tparser.error = yaml_SCANNER_ERROR\n\tparser.context = context\n\tparser.context_mark = context_mark\n\tparser.problem = problem\n\tparser.problem_mark = parser.mark\n\treturn false\n}\n\nfunc yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool {\n\tcontext := \"while parsing a tag\"\n\tif directive {\n\t\tcontext = \"while parsing a %TAG directive\"\n\t}\n\treturn yaml_parser_set_scanner_error(parser, context, context_mark, problem)\n}\n\nfunc trace(args ...interface{}) func() {\n\tpargs := append([]interface{}{\"+++\"}, args...)\n\tfmt.Println(pargs...)\n\tpargs = append([]interface{}{\"---\"}, args...)\n\treturn func() { fmt.Println(pargs...) }\n}\n\n// Ensure that the tokens queue contains at least one token which can be\n// returned to the Parser.\nfunc yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool {\n\t// While we need more tokens to fetch, do it.\n\tfor {\n\t\t// [Go] The comment parsing logic requires a lookahead of two tokens\n\t\t// so that foot comments may be parsed in time of associating them\n\t\t// with the tokens that are parsed before them, and also for line\n\t\t// comments to be transformed into head comments in some edge cases.\n\t\tif parser.tokens_head < len(parser.tokens)-2 {\n\t\t\t// If a potential simple key is at the head position, we need to fetch\n\t\t\t// the next token to disambiguate it.\n\t\t\thead_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed]\n\t\t\tif !ok {\n\t\t\t\tbreak\n\t\t\t} else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok {\n\t\t\t\treturn false\n\t\t\t} else if !valid {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Fetch the next token.\n\t\tif !yaml_parser_fetch_next_token(parser) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tparser.token_available = true\n\treturn true\n}\n\n// The dispatcher for token fetchers.\nfunc yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) {\n\t// Ensure that the buffer is initialized.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\t// Check if we just started scanning.  Fetch STREAM-START then.\n\tif !parser.stream_start_produced {\n\t\treturn yaml_parser_fetch_stream_start(parser)\n\t}\n\n\tscan_mark := parser.mark\n\n\t// Eat whitespaces and comments until we reach the next token.\n\tif !yaml_parser_scan_to_next_token(parser) {\n\t\treturn false\n\t}\n\n\t// [Go] While unrolling indents, transform the head comments of prior\n\t// indentation levels observed after scan_start into foot comments at\n\t// the respective indexes.\n\n\t// Check the indentation level against the current column.\n\tif !yaml_parser_unroll_indent(parser, parser.mark.column, scan_mark) {\n\t\treturn false\n\t}\n\n\t// Ensure that the buffer contains at least 4 characters.  4 is the length\n\t// of the longest indicators ('--- ' and '... ').\n\tif parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) {\n\t\treturn false\n\t}\n\n\t// Is it the end of the stream?\n\tif is_z(parser.buffer, parser.buffer_pos) {\n\t\treturn yaml_parser_fetch_stream_end(parser)\n\t}\n\n\t// Is it a directive?\n\tif parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' {\n\t\treturn yaml_parser_fetch_directive(parser)\n\t}\n\n\tbuf := parser.buffer\n\tpos := parser.buffer_pos\n\n\t// Is it the document start indicator?\n\tif parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) {\n\t\treturn yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN)\n\t}\n\n\t// Is it the document end indicator?\n\tif parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) {\n\t\treturn yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN)\n\t}\n\n\tcomment_mark := parser.mark\n\tif len(parser.tokens) > 0 && (parser.flow_level == 0 && buf[pos] == ':' || parser.flow_level > 0 && buf[pos] == ',') {\n\t\t// Associate any following comments with the prior token.\n\t\tcomment_mark = parser.tokens[len(parser.tokens)-1].start_mark\n\t}\n\tdefer func() {\n\t\tif !ok {\n\t\t\treturn\n\t\t}\n\t\tif len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN {\n\t\t\t// Sequence indicators alone have no line comments. It becomes\n\t\t\t// a head comment for whatever follows.\n\t\t\treturn\n\t\t}\n\t\tif !yaml_parser_scan_line_comment(parser, comment_mark) {\n\t\t\tok = false\n\t\t\treturn\n\t\t}\n\t}()\n\n\t// Is it the flow sequence start indicator?\n\tif buf[pos] == '[' {\n\t\treturn yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN)\n\t}\n\n\t// Is it the flow mapping start indicator?\n\tif parser.buffer[parser.buffer_pos] == '{' {\n\t\treturn yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN)\n\t}\n\n\t// Is it the flow sequence end indicator?\n\tif parser.buffer[parser.buffer_pos] == ']' {\n\t\treturn yaml_parser_fetch_flow_collection_end(parser,\n\t\t\tyaml_FLOW_SEQUENCE_END_TOKEN)\n\t}\n\n\t// Is it the flow mapping end indicator?\n\tif parser.buffer[parser.buffer_pos] == '}' {\n\t\treturn yaml_parser_fetch_flow_collection_end(parser,\n\t\t\tyaml_FLOW_MAPPING_END_TOKEN)\n\t}\n\n\t// Is it the flow entry indicator?\n\tif parser.buffer[parser.buffer_pos] == ',' {\n\t\treturn yaml_parser_fetch_flow_entry(parser)\n\t}\n\n\t// Is it the block entry indicator?\n\tif parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) {\n\t\treturn yaml_parser_fetch_block_entry(parser)\n\t}\n\n\t// Is it the key indicator?\n\tif parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) {\n\t\treturn yaml_parser_fetch_key(parser)\n\t}\n\n\t// Is it the value indicator?\n\tif parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) {\n\t\treturn yaml_parser_fetch_value(parser)\n\t}\n\n\t// Is it an alias?\n\tif parser.buffer[parser.buffer_pos] == '*' {\n\t\treturn yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN)\n\t}\n\n\t// Is it an anchor?\n\tif parser.buffer[parser.buffer_pos] == '&' {\n\t\treturn yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN)\n\t}\n\n\t// Is it a tag?\n\tif parser.buffer[parser.buffer_pos] == '!' {\n\t\treturn yaml_parser_fetch_tag(parser)\n\t}\n\n\t// Is it a literal scalar?\n\tif parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 {\n\t\treturn yaml_parser_fetch_block_scalar(parser, true)\n\t}\n\n\t// Is it a folded scalar?\n\tif parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 {\n\t\treturn yaml_parser_fetch_block_scalar(parser, false)\n\t}\n\n\t// Is it a single-quoted scalar?\n\tif parser.buffer[parser.buffer_pos] == '\\'' {\n\t\treturn yaml_parser_fetch_flow_scalar(parser, true)\n\t}\n\n\t// Is it a double-quoted scalar?\n\tif parser.buffer[parser.buffer_pos] == '\"' {\n\t\treturn yaml_parser_fetch_flow_scalar(parser, false)\n\t}\n\n\t// Is it a plain scalar?\n\t//\n\t// A plain scalar may start with any non-blank characters except\n\t//\n\t//      '-', '?', ':', ',', '[', ']', '{', '}',\n\t//      '#', '&', '*', '!', '|', '>', '\\'', '\\\"',\n\t//      '%', '@', '`'.\n\t//\n\t// In the block context (and, for the '-' indicator, in the flow context\n\t// too), it may also start with the characters\n\t//\n\t//      '-', '?', ':'\n\t//\n\t// if it is followed by a non-space character.\n\t//\n\t// The last rule is more restrictive than the specification requires.\n\t// [Go] TODO Make this logic more reasonable.\n\t//switch parser.buffer[parser.buffer_pos] {\n\t//case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '\"', '\\'', '@', '%', '-', '`':\n\t//}\n\tif !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' ||\n\t\tparser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' ||\n\t\tparser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' ||\n\t\tparser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' ||\n\t\tparser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' ||\n\t\tparser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' ||\n\t\tparser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' ||\n\t\tparser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\\'' ||\n\t\tparser.buffer[parser.buffer_pos] == '\"' || parser.buffer[parser.buffer_pos] == '%' ||\n\t\tparser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') ||\n\t\t(parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) ||\n\t\t(parser.flow_level == 0 &&\n\t\t\t(parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') &&\n\t\t\t!is_blankz(parser.buffer, parser.buffer_pos+1)) {\n\t\treturn yaml_parser_fetch_plain_scalar(parser)\n\t}\n\n\t// If we don't determine the token type so far, it is an error.\n\treturn yaml_parser_set_scanner_error(parser,\n\t\t\"while scanning for the next token\", parser.mark,\n\t\t\"found character that cannot start any token\")\n}\n\nfunc yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) {\n\tif !simple_key.possible {\n\t\treturn false, true\n\t}\n\n\t// The 1.2 specification says:\n\t//\n\t//     \"If the ? indicator is omitted, parsing needs to see past the\n\t//     implicit key to recognize it as such. To limit the amount of\n\t//     lookahead required, the “:” indicator must appear at most 1024\n\t//     Unicode characters beyond the start of the key. In addition, the key\n\t//     is restricted to a single line.\"\n\t//\n\tif simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index {\n\t\t// Check if the potential simple key to be removed is required.\n\t\tif simple_key.required {\n\t\t\treturn false, yaml_parser_set_scanner_error(parser,\n\t\t\t\t\"while scanning a simple key\", simple_key.mark,\n\t\t\t\t\"could not find expected ':'\")\n\t\t}\n\t\tsimple_key.possible = false\n\t\treturn false, true\n\t}\n\treturn true, true\n}\n\n// Check if a simple key may start at the current position and add it if\n// needed.\nfunc yaml_parser_save_simple_key(parser *yaml_parser_t) bool {\n\t// A simple key is required at the current position if the scanner is in\n\t// the block context and the current column coincides with the indentation\n\t// level.\n\n\trequired := parser.flow_level == 0 && parser.indent == parser.mark.column\n\n\t//\n\t// If the current position may start a simple key, save it.\n\t//\n\tif parser.simple_key_allowed {\n\t\tsimple_key := yaml_simple_key_t{\n\t\t\tpossible:     true,\n\t\t\trequired:     required,\n\t\t\ttoken_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),\n\t\t\tmark:         parser.mark,\n\t\t}\n\n\t\tif !yaml_parser_remove_simple_key(parser) {\n\t\t\treturn false\n\t\t}\n\t\tparser.simple_keys[len(parser.simple_keys)-1] = simple_key\n\t\tparser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1\n\t}\n\treturn true\n}\n\n// Remove a potential simple key at the current flow level.\nfunc yaml_parser_remove_simple_key(parser *yaml_parser_t) bool {\n\ti := len(parser.simple_keys) - 1\n\tif parser.simple_keys[i].possible {\n\t\t// If the key is required, it is an error.\n\t\tif parser.simple_keys[i].required {\n\t\t\treturn yaml_parser_set_scanner_error(parser,\n\t\t\t\t\"while scanning a simple key\", parser.simple_keys[i].mark,\n\t\t\t\t\"could not find expected ':'\")\n\t\t}\n\t\t// Remove the key from the stack.\n\t\tparser.simple_keys[i].possible = false\n\t\tdelete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number)\n\t}\n\treturn true\n}\n\n// max_flow_level limits the flow_level\nconst max_flow_level = 10000\n\n// Increase the flow level and resize the simple key list if needed.\nfunc yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {\n\t// Reset the simple key on the next level.\n\tparser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{\n\t\tpossible:     false,\n\t\trequired:     false,\n\t\ttoken_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head),\n\t\tmark:         parser.mark,\n\t})\n\n\t// Increase the flow level.\n\tparser.flow_level++\n\tif parser.flow_level > max_flow_level {\n\t\treturn yaml_parser_set_scanner_error(parser,\n\t\t\t\"while increasing flow level\", parser.simple_keys[len(parser.simple_keys)-1].mark,\n\t\t\tfmt.Sprintf(\"exceeded max depth of %d\", max_flow_level))\n\t}\n\treturn true\n}\n\n// Decrease the flow level.\nfunc yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool {\n\tif parser.flow_level > 0 {\n\t\tparser.flow_level--\n\t\tlast := len(parser.simple_keys) - 1\n\t\tdelete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number)\n\t\tparser.simple_keys = parser.simple_keys[:last]\n\t}\n\treturn true\n}\n\n// max_indents limits the indents stack size\nconst max_indents = 10000\n\n// Push the current indentation level to the stack and set the new level\n// the current column is greater than the indentation level.  In this case,\n// append or insert the specified token into the token queue.\nfunc yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool {\n\t// In the flow context, do nothing.\n\tif parser.flow_level > 0 {\n\t\treturn true\n\t}\n\n\tif parser.indent < column {\n\t\t// Push the current indentation level to the stack and set the new\n\t\t// indentation level.\n\t\tparser.indents = append(parser.indents, parser.indent)\n\t\tparser.indent = column\n\t\tif len(parser.indents) > max_indents {\n\t\t\treturn yaml_parser_set_scanner_error(parser,\n\t\t\t\t\"while increasing indent level\", parser.simple_keys[len(parser.simple_keys)-1].mark,\n\t\t\t\tfmt.Sprintf(\"exceeded max depth of %d\", max_indents))\n\t\t}\n\n\t\t// Create a token and insert it into the queue.\n\t\ttoken := yaml_token_t{\n\t\t\ttyp:        typ,\n\t\t\tstart_mark: mark,\n\t\t\tend_mark:   mark,\n\t\t}\n\t\tif number > -1 {\n\t\t\tnumber -= parser.tokens_parsed\n\t\t}\n\t\tyaml_insert_token(parser, number, &token)\n\t}\n\treturn true\n}\n\n// Pop indentation levels from the indents stack until the current level\n// becomes less or equal to the column.  For each indentation level, append\n// the BLOCK-END token.\nfunc yaml_parser_unroll_indent(parser *yaml_parser_t, column int, scan_mark yaml_mark_t) bool {\n\t// In the flow context, do nothing.\n\tif parser.flow_level > 0 {\n\t\treturn true\n\t}\n\n\tblock_mark := scan_mark\n\tblock_mark.index--\n\n\t// Loop through the indentation levels in the stack.\n\tfor parser.indent > column {\n\n\t\t// [Go] Reposition the end token before potential following\n\t\t//      foot comments of parent blocks. For that, search\n\t\t//      backwards for recent comments that were at the same\n\t\t//      indent as the block that is ending now.\n\t\tstop_index := block_mark.index\n\t\tfor i := len(parser.comments) - 1; i >= 0; i-- {\n\t\t\tcomment := &parser.comments[i]\n\n\t\t\tif comment.end_mark.index < stop_index {\n\t\t\t\t// Don't go back beyond the start of the comment/whitespace scan, unless column < 0.\n\t\t\t\t// If requested indent column is < 0, then the document is over and everything else\n\t\t\t\t// is a foot anyway.\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif comment.start_mark.column == parser.indent+1 {\n\t\t\t\t// This is a good match. But maybe there's a former comment\n\t\t\t\t// at that same indent level, so keep searching.\n\t\t\t\tblock_mark = comment.start_mark\n\t\t\t}\n\n\t\t\t// While the end of the former comment matches with\n\t\t\t// the start of the following one, we know there's\n\t\t\t// nothing in between and scanning is still safe.\n\t\t\tstop_index = comment.scan_mark.index\n\t\t}\n\n\t\t// Create a token and append it to the queue.\n\t\ttoken := yaml_token_t{\n\t\t\ttyp:        yaml_BLOCK_END_TOKEN,\n\t\t\tstart_mark: block_mark,\n\t\t\tend_mark:   block_mark,\n\t\t}\n\t\tyaml_insert_token(parser, -1, &token)\n\n\t\t// Pop the indentation level.\n\t\tparser.indent = parser.indents[len(parser.indents)-1]\n\t\tparser.indents = parser.indents[:len(parser.indents)-1]\n\t}\n\treturn true\n}\n\n// Initialize the scanner and produce the STREAM-START token.\nfunc yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool {\n\n\t// Set the initial indentation.\n\tparser.indent = -1\n\n\t// Initialize the simple key stack.\n\tparser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{})\n\n\tparser.simple_keys_by_tok = make(map[int]int)\n\n\t// A simple key is allowed at the beginning of the stream.\n\tparser.simple_key_allowed = true\n\n\t// We have started.\n\tparser.stream_start_produced = true\n\n\t// Create the STREAM-START token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_STREAM_START_TOKEN,\n\t\tstart_mark: parser.mark,\n\t\tend_mark:   parser.mark,\n\t\tencoding:   parser.encoding,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the STREAM-END token and shut down the scanner.\nfunc yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool {\n\n\t// Force new line.\n\tif parser.mark.column != 0 {\n\t\tparser.mark.column = 0\n\t\tparser.mark.line++\n\t}\n\n\t// Reset the indentation level.\n\tif !yaml_parser_unroll_indent(parser, -1, parser.mark) {\n\t\treturn false\n\t}\n\n\t// Reset simple keys.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\tparser.simple_key_allowed = false\n\n\t// Create the STREAM-END token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_STREAM_END_TOKEN,\n\t\tstart_mark: parser.mark,\n\t\tend_mark:   parser.mark,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token.\nfunc yaml_parser_fetch_directive(parser *yaml_parser_t) bool {\n\t// Reset the indentation level.\n\tif !yaml_parser_unroll_indent(parser, -1, parser.mark) {\n\t\treturn false\n\t}\n\n\t// Reset simple keys.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\tparser.simple_key_allowed = false\n\n\t// Create the YAML-DIRECTIVE or TAG-DIRECTIVE token.\n\ttoken := yaml_token_t{}\n\tif !yaml_parser_scan_directive(parser, &token) {\n\t\treturn false\n\t}\n\t// Append the token to the queue.\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the DOCUMENT-START or DOCUMENT-END token.\nfunc yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool {\n\t// Reset the indentation level.\n\tif !yaml_parser_unroll_indent(parser, -1, parser.mark) {\n\t\treturn false\n\t}\n\n\t// Reset simple keys.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\tparser.simple_key_allowed = false\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\n\tskip(parser)\n\tskip(parser)\n\tskip(parser)\n\n\tend_mark := parser.mark\n\n\t// Create the DOCUMENT-START or DOCUMENT-END token.\n\ttoken := yaml_token_t{\n\t\ttyp:        typ,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\t// Append the token to the queue.\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token.\nfunc yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool {\n\n\t// The indicators '[' and '{' may start a simple key.\n\tif !yaml_parser_save_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// Increase the flow level.\n\tif !yaml_parser_increase_flow_level(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key may follow the indicators '[' and '{'.\n\tparser.simple_key_allowed = true\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token.\n\ttoken := yaml_token_t{\n\t\ttyp:        typ,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\t// Append the token to the queue.\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.\nfunc yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool {\n\t// Reset any potential simple key on the current flow level.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// Decrease the flow level.\n\tif !yaml_parser_decrease_flow_level(parser) {\n\t\treturn false\n\t}\n\n\t// No simple keys after the indicators ']' and '}'.\n\tparser.simple_key_allowed = false\n\n\t// Consume the token.\n\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token.\n\ttoken := yaml_token_t{\n\t\ttyp:        typ,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\t// Append the token to the queue.\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the FLOW-ENTRY token.\nfunc yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool {\n\t// Reset any potential simple keys on the current flow level.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// Simple keys are allowed after ','.\n\tparser.simple_key_allowed = true\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the FLOW-ENTRY token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_FLOW_ENTRY_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the BLOCK-ENTRY token.\nfunc yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool {\n\t// Check if the scanner is in the block context.\n\tif parser.flow_level == 0 {\n\t\t// Check if we are allowed to start a new entry.\n\t\tif !parser.simple_key_allowed {\n\t\t\treturn yaml_parser_set_scanner_error(parser, \"\", parser.mark,\n\t\t\t\t\"block sequence entries are not allowed in this context\")\n\t\t}\n\t\t// Add the BLOCK-SEQUENCE-START token if needed.\n\t\tif !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) {\n\t\t\treturn false\n\t\t}\n\t} else {\n\t\t// It is an error for the '-' indicator to occur in the flow context,\n\t\t// but we let the Parser detect and report about it because the Parser\n\t\t// is able to point to the context.\n\t}\n\n\t// Reset any potential simple keys on the current flow level.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// Simple keys are allowed after '-'.\n\tparser.simple_key_allowed = true\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the BLOCK-ENTRY token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_BLOCK_ENTRY_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the KEY token.\nfunc yaml_parser_fetch_key(parser *yaml_parser_t) bool {\n\n\t// In the block context, additional checks are required.\n\tif parser.flow_level == 0 {\n\t\t// Check if we are allowed to start a new key (not nessesary simple).\n\t\tif !parser.simple_key_allowed {\n\t\t\treturn yaml_parser_set_scanner_error(parser, \"\", parser.mark,\n\t\t\t\t\"mapping keys are not allowed in this context\")\n\t\t}\n\t\t// Add the BLOCK-MAPPING-START token if needed.\n\t\tif !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Reset any potential simple keys on the current flow level.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// Simple keys are allowed after '?' in the block context.\n\tparser.simple_key_allowed = parser.flow_level == 0\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the KEY token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_KEY_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the VALUE token.\nfunc yaml_parser_fetch_value(parser *yaml_parser_t) bool {\n\n\tsimple_key := &parser.simple_keys[len(parser.simple_keys)-1]\n\n\t// Have we found a simple key?\n\tif valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok {\n\t\treturn false\n\n\t} else if valid {\n\n\t\t// Create the KEY token and insert it into the queue.\n\t\ttoken := yaml_token_t{\n\t\t\ttyp:        yaml_KEY_TOKEN,\n\t\t\tstart_mark: simple_key.mark,\n\t\t\tend_mark:   simple_key.mark,\n\t\t}\n\t\tyaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token)\n\n\t\t// In the block context, we may need to add the BLOCK-MAPPING-START token.\n\t\tif !yaml_parser_roll_indent(parser, simple_key.mark.column,\n\t\t\tsimple_key.token_number,\n\t\t\tyaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Remove the simple key.\n\t\tsimple_key.possible = false\n\t\tdelete(parser.simple_keys_by_tok, simple_key.token_number)\n\n\t\t// A simple key cannot follow another simple key.\n\t\tparser.simple_key_allowed = false\n\n\t} else {\n\t\t// The ':' indicator follows a complex key.\n\n\t\t// In the block context, extra checks are required.\n\t\tif parser.flow_level == 0 {\n\n\t\t\t// Check if we are allowed to start a complex value.\n\t\t\tif !parser.simple_key_allowed {\n\t\t\t\treturn yaml_parser_set_scanner_error(parser, \"\", parser.mark,\n\t\t\t\t\t\"mapping values are not allowed in this context\")\n\t\t\t}\n\n\t\t\t// Add the BLOCK-MAPPING-START token if needed.\n\t\t\tif !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Simple keys after ':' are allowed in the block context.\n\t\tparser.simple_key_allowed = parser.flow_level == 0\n\t}\n\n\t// Consume the token.\n\tstart_mark := parser.mark\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create the VALUE token and append it to the queue.\n\ttoken := yaml_token_t{\n\t\ttyp:        yaml_VALUE_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the ALIAS or ANCHOR token.\nfunc yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool {\n\t// An anchor or an alias could be a simple key.\n\tif !yaml_parser_save_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key cannot follow an anchor or an alias.\n\tparser.simple_key_allowed = false\n\n\t// Create the ALIAS or ANCHOR token and append it to the queue.\n\tvar token yaml_token_t\n\tif !yaml_parser_scan_anchor(parser, &token, typ) {\n\t\treturn false\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the TAG token.\nfunc yaml_parser_fetch_tag(parser *yaml_parser_t) bool {\n\t// A tag could be a simple key.\n\tif !yaml_parser_save_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key cannot follow a tag.\n\tparser.simple_key_allowed = false\n\n\t// Create the TAG token and append it to the queue.\n\tvar token yaml_token_t\n\tif !yaml_parser_scan_tag(parser, &token) {\n\t\treturn false\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens.\nfunc yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool {\n\t// Remove any potential simple keys.\n\tif !yaml_parser_remove_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key may follow a block scalar.\n\tparser.simple_key_allowed = true\n\n\t// Create the SCALAR token and append it to the queue.\n\tvar token yaml_token_t\n\tif !yaml_parser_scan_block_scalar(parser, &token, literal) {\n\t\treturn false\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens.\nfunc yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool {\n\t// A plain scalar could be a simple key.\n\tif !yaml_parser_save_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key cannot follow a flow scalar.\n\tparser.simple_key_allowed = false\n\n\t// Create the SCALAR token and append it to the queue.\n\tvar token yaml_token_t\n\tif !yaml_parser_scan_flow_scalar(parser, &token, single) {\n\t\treturn false\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Produce the SCALAR(...,plain) token.\nfunc yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool {\n\t// A plain scalar could be a simple key.\n\tif !yaml_parser_save_simple_key(parser) {\n\t\treturn false\n\t}\n\n\t// A simple key cannot follow a flow scalar.\n\tparser.simple_key_allowed = false\n\n\t// Create the SCALAR token and append it to the queue.\n\tvar token yaml_token_t\n\tif !yaml_parser_scan_plain_scalar(parser, &token) {\n\t\treturn false\n\t}\n\tyaml_insert_token(parser, -1, &token)\n\treturn true\n}\n\n// Eat whitespaces and comments until the next token is found.\nfunc yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool {\n\n\tscan_mark := parser.mark\n\n\t// Until the next token is not found.\n\tfor {\n\t\t// Allow the BOM mark to start a line.\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t\tif parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) {\n\t\t\tskip(parser)\n\t\t}\n\n\t\t// Eat whitespaces.\n\t\t// Tabs are allowed:\n\t\t//  - in the flow context\n\t\t//  - in the block context, but not at the beginning of the line or\n\t\t//  after '-', '?', or ':' (complex value).\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\n\t\tfor parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\\t') {\n\t\t\tskip(parser)\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Check if we just had a line comment under a sequence entry that\n\t\t// looks more like a header to the following content. Similar to this:\n\t\t//\n\t\t// - # The comment\n\t\t//   - Some data\n\t\t//\n\t\t// If so, transform the line comment to a head comment and reposition.\n\t\tif len(parser.comments) > 0 && len(parser.tokens) > 1 {\n\t\t\ttokenA := parser.tokens[len(parser.tokens)-2]\n\t\t\ttokenB := parser.tokens[len(parser.tokens)-1]\n\t\t\tcomment := &parser.comments[len(parser.comments)-1]\n\t\t\tif tokenA.typ == yaml_BLOCK_SEQUENCE_START_TOKEN && tokenB.typ == yaml_BLOCK_ENTRY_TOKEN && len(comment.line) > 0 && !is_break(parser.buffer, parser.buffer_pos) {\n\t\t\t\t// If it was in the prior line, reposition so it becomes a\n\t\t\t\t// header of the follow up token. Otherwise, keep it in place\n\t\t\t\t// so it becomes a header of the former.\n\t\t\t\tcomment.head = comment.line\n\t\t\t\tcomment.line = nil\n\t\t\t\tif comment.start_mark.line == parser.mark.line-1 {\n\t\t\t\t\tcomment.token_mark = parser.mark\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Eat a comment until a line break.\n\t\tif parser.buffer[parser.buffer_pos] == '#' {\n\t\t\tif !yaml_parser_scan_comments(parser, scan_mark) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// If it is a line break, eat it.\n\t\tif is_break(parser.buffer, parser.buffer_pos) {\n\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tskip_line(parser)\n\n\t\t\t// In the block context, a new line may start a simple key.\n\t\t\tif parser.flow_level == 0 {\n\t\t\t\tparser.simple_key_allowed = true\n\t\t\t}\n\t\t} else {\n\t\t\tbreak // We have found a token.\n\t\t}\n\t}\n\n\treturn true\n}\n\n// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token.\n//\n// Scope:\n//      %YAML    1.1    # a comment \\n\n//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n//      %TAG    !yaml!  tag:yaml.org,2002:  \\n\n//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n//\nfunc yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool {\n\t// Eat '%'.\n\tstart_mark := parser.mark\n\tskip(parser)\n\n\t// Scan the directive name.\n\tvar name []byte\n\tif !yaml_parser_scan_directive_name(parser, start_mark, &name) {\n\t\treturn false\n\t}\n\n\t// Is it a YAML directive?\n\tif bytes.Equal(name, []byte(\"YAML\")) {\n\t\t// Scan the VERSION directive value.\n\t\tvar major, minor int8\n\t\tif !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) {\n\t\t\treturn false\n\t\t}\n\t\tend_mark := parser.mark\n\n\t\t// Create a VERSION-DIRECTIVE token.\n\t\t*token = yaml_token_t{\n\t\t\ttyp:        yaml_VERSION_DIRECTIVE_TOKEN,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tmajor:      major,\n\t\t\tminor:      minor,\n\t\t}\n\n\t\t// Is it a TAG directive?\n\t} else if bytes.Equal(name, []byte(\"TAG\")) {\n\t\t// Scan the TAG directive value.\n\t\tvar handle, prefix []byte\n\t\tif !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) {\n\t\t\treturn false\n\t\t}\n\t\tend_mark := parser.mark\n\n\t\t// Create a TAG-DIRECTIVE token.\n\t\t*token = yaml_token_t{\n\t\t\ttyp:        yaml_TAG_DIRECTIVE_TOKEN,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   end_mark,\n\t\t\tvalue:      handle,\n\t\t\tprefix:     prefix,\n\t\t}\n\n\t\t// Unknown directive.\n\t} else {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a directive\",\n\t\t\tstart_mark, \"found unknown directive name\")\n\t\treturn false\n\t}\n\n\t// Eat the rest of the line including any comments.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\tfor is_blank(parser.buffer, parser.buffer_pos) {\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tif parser.buffer[parser.buffer_pos] == '#' {\n\t\t// [Go] Discard this inline comment for the time being.\n\t\t//if !yaml_parser_scan_line_comment(parser, start_mark) {\n\t\t//\treturn false\n\t\t//}\n\t\tfor !is_breakz(parser.buffer, parser.buffer_pos) {\n\t\t\tskip(parser)\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check if we are at the end of the line.\n\tif !is_breakz(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a directive\",\n\t\t\tstart_mark, \"did not find expected comment or line break\")\n\t\treturn false\n\t}\n\n\t// Eat a line break.\n\tif is_break(parser.buffer, parser.buffer_pos) {\n\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\treturn false\n\t\t}\n\t\tskip_line(parser)\n\t}\n\n\treturn true\n}\n\n// Scan the directive name.\n//\n// Scope:\n//      %YAML   1.1     # a comment \\n\n//       ^^^^\n//      %TAG    !yaml!  tag:yaml.org,2002:  \\n\n//       ^^^\n//\nfunc yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool {\n\t// Consume the directive name.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\tvar s []byte\n\tfor is_alpha(parser.buffer, parser.buffer_pos) {\n\t\ts = read(parser, s)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Check if the name is empty.\n\tif len(s) == 0 {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a directive\",\n\t\t\tstart_mark, \"could not find expected directive name\")\n\t\treturn false\n\t}\n\n\t// Check for an blank character after the name.\n\tif !is_blankz(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a directive\",\n\t\t\tstart_mark, \"found unexpected non-alphabetical character\")\n\t\treturn false\n\t}\n\t*name = s\n\treturn true\n}\n\n// Scan the value of VERSION-DIRECTIVE.\n//\n// Scope:\n//      %YAML   1.1     # a comment \\n\n//           ^^^^^^\nfunc yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool {\n\t// Eat whitespaces.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tfor is_blank(parser.buffer, parser.buffer_pos) {\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Consume the major version number.\n\tif !yaml_parser_scan_version_directive_number(parser, start_mark, major) {\n\t\treturn false\n\t}\n\n\t// Eat '.'.\n\tif parser.buffer[parser.buffer_pos] != '.' {\n\t\treturn yaml_parser_set_scanner_error(parser, \"while scanning a %YAML directive\",\n\t\t\tstart_mark, \"did not find expected digit or '.' character\")\n\t}\n\n\tskip(parser)\n\n\t// Consume the minor version number.\n\tif !yaml_parser_scan_version_directive_number(parser, start_mark, minor) {\n\t\treturn false\n\t}\n\treturn true\n}\n\nconst max_number_length = 2\n\n// Scan the version number of VERSION-DIRECTIVE.\n//\n// Scope:\n//      %YAML   1.1     # a comment \\n\n//              ^\n//      %YAML   1.1     # a comment \\n\n//                ^\nfunc yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool {\n\n\t// Repeat while the next character is digit.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tvar value, length int8\n\tfor is_digit(parser.buffer, parser.buffer_pos) {\n\t\t// Check if the number is too long.\n\t\tlength++\n\t\tif length > max_number_length {\n\t\t\treturn yaml_parser_set_scanner_error(parser, \"while scanning a %YAML directive\",\n\t\t\t\tstart_mark, \"found extremely long version number\")\n\t\t}\n\t\tvalue = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos))\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Check if the number was present.\n\tif length == 0 {\n\t\treturn yaml_parser_set_scanner_error(parser, \"while scanning a %YAML directive\",\n\t\t\tstart_mark, \"did not find expected version number\")\n\t}\n\t*number = value\n\treturn true\n}\n\n// Scan the value of a TAG-DIRECTIVE token.\n//\n// Scope:\n//      %TAG    !yaml!  tag:yaml.org,2002:  \\n\n//          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n//\nfunc yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool {\n\tvar handle_value, prefix_value []byte\n\n\t// Eat whitespaces.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\tfor is_blank(parser.buffer, parser.buffer_pos) {\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Scan a handle.\n\tif !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) {\n\t\treturn false\n\t}\n\n\t// Expect a whitespace.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tif !is_blank(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a %TAG directive\",\n\t\t\tstart_mark, \"did not find expected whitespace\")\n\t\treturn false\n\t}\n\n\t// Eat whitespaces.\n\tfor is_blank(parser.buffer, parser.buffer_pos) {\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Scan a prefix.\n\tif !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) {\n\t\treturn false\n\t}\n\n\t// Expect a whitespace or line break.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tif !is_blankz(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a %TAG directive\",\n\t\t\tstart_mark, \"did not find expected whitespace or line break\")\n\t\treturn false\n\t}\n\n\t*handle = handle_value\n\t*prefix = prefix_value\n\treturn true\n}\n\nfunc yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool {\n\tvar s []byte\n\n\t// Eat the indicator character.\n\tstart_mark := parser.mark\n\tskip(parser)\n\n\t// Consume the value.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\tfor is_alpha(parser.buffer, parser.buffer_pos) {\n\t\ts = read(parser, s)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tend_mark := parser.mark\n\n\t/*\n\t * Check if length of the anchor is greater than 0 and it is followed by\n\t * a whitespace character or one of the indicators:\n\t *\n\t *      '?', ':', ',', ']', '}', '%', '@', '`'.\n\t */\n\n\tif len(s) == 0 ||\n\t\t!(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' ||\n\t\t\tparser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' ||\n\t\t\tparser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' ||\n\t\t\tparser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' ||\n\t\t\tparser.buffer[parser.buffer_pos] == '`') {\n\t\tcontext := \"while scanning an alias\"\n\t\tif typ == yaml_ANCHOR_TOKEN {\n\t\t\tcontext = \"while scanning an anchor\"\n\t\t}\n\t\tyaml_parser_set_scanner_error(parser, context, start_mark,\n\t\t\t\"did not find expected alphabetic or numeric character\")\n\t\treturn false\n\t}\n\n\t// Create a token.\n\t*token = yaml_token_t{\n\t\ttyp:        typ,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\tvalue:      s,\n\t}\n\n\treturn true\n}\n\n/*\n * Scan a TAG token.\n */\n\nfunc yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool {\n\tvar handle, suffix []byte\n\n\tstart_mark := parser.mark\n\n\t// Check if the tag is in the canonical form.\n\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\treturn false\n\t}\n\n\tif parser.buffer[parser.buffer_pos+1] == '<' {\n\t\t// Keep the handle as ''\n\n\t\t// Eat '!<'\n\t\tskip(parser)\n\t\tskip(parser)\n\n\t\t// Consume the tag value.\n\t\tif !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Check for '>' and eat it.\n\t\tif parser.buffer[parser.buffer_pos] != '>' {\n\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a tag\",\n\t\t\t\tstart_mark, \"did not find the expected '>'\")\n\t\t\treturn false\n\t\t}\n\n\t\tskip(parser)\n\t} else {\n\t\t// The tag has either the '!suffix' or the '!handle!suffix' form.\n\n\t\t// First, try to scan a handle.\n\t\tif !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Check if it is, indeed, handle.\n\t\tif handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' {\n\t\t\t// Scan the suffix now.\n\t\t\tif !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\t// It wasn't a handle after all.  Scan the rest of the tag.\n\t\t\tif !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\t// Set the handle to '!'.\n\t\t\thandle = []byte{'!'}\n\n\t\t\t// A special case: the '!' tag.  Set the handle to '' and the\n\t\t\t// suffix to '!'.\n\t\t\tif len(suffix) == 0 {\n\t\t\t\thandle, suffix = suffix, handle\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check the character which ends the tag.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tif !is_blankz(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a tag\",\n\t\t\tstart_mark, \"did not find expected whitespace or line break\")\n\t\treturn false\n\t}\n\n\tend_mark := parser.mark\n\n\t// Create a token.\n\t*token = yaml_token_t{\n\t\ttyp:        yaml_TAG_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\tvalue:      handle,\n\t\tsuffix:     suffix,\n\t}\n\treturn true\n}\n\n// Scan a tag handle.\nfunc yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool {\n\t// Check the initial '!' character.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tif parser.buffer[parser.buffer_pos] != '!' {\n\t\tyaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\tstart_mark, \"did not find expected '!'\")\n\t\treturn false\n\t}\n\n\tvar s []byte\n\n\t// Copy the '!' character.\n\ts = read(parser, s)\n\n\t// Copy all subsequent alphabetical and numerical characters.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tfor is_alpha(parser.buffer, parser.buffer_pos) {\n\t\ts = read(parser, s)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Check if the trailing character is '!' and copy it.\n\tif parser.buffer[parser.buffer_pos] == '!' {\n\t\ts = read(parser, s)\n\t} else {\n\t\t// It's either the '!' tag or not really a tag handle.  If it's a %TAG\n\t\t// directive, it's an error.  If it's a tag token, it must be a part of URI.\n\t\tif directive && string(s) != \"!\" {\n\t\t\tyaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\t\tstart_mark, \"did not find expected '!'\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\t*handle = s\n\treturn true\n}\n\n// Scan a tag.\nfunc yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool {\n\t//size_t length = head ? strlen((char *)head) : 0\n\tvar s []byte\n\thasTag := len(head) > 0\n\n\t// Copy the head if needed.\n\t//\n\t// Note that we don't copy the leading '!' character.\n\tif len(head) > 1 {\n\t\ts = append(s, head[1:]...)\n\t}\n\n\t// Scan the tag.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\t// The set of characters that may appear in URI is as follows:\n\t//\n\t//      '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&',\n\t//      '=', '+', '$', ',', '.', '!', '~', '*', '\\'', '(', ')', '[', ']',\n\t//      '%'.\n\t// [Go] TODO Convert this into more reasonable logic.\n\tfor is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' ||\n\t\tparser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' ||\n\t\tparser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' ||\n\t\tparser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' ||\n\t\tparser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' ||\n\t\tparser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' ||\n\t\tparser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' ||\n\t\tparser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\\'' ||\n\t\tparser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' ||\n\t\tparser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' ||\n\t\tparser.buffer[parser.buffer_pos] == '%' {\n\t\t// Check if it is a URI-escape sequence.\n\t\tif parser.buffer[parser.buffer_pos] == '%' {\n\t\t\tif !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\ts = read(parser, s)\n\t\t}\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t\thasTag = true\n\t}\n\n\tif !hasTag {\n\t\tyaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\tstart_mark, \"did not find expected tag URI\")\n\t\treturn false\n\t}\n\t*uri = s\n\treturn true\n}\n\n// Decode an URI-escape sequence corresponding to a single UTF-8 character.\nfunc yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool {\n\n\t// Decode the required number of characters.\n\tw := 1024\n\tfor w > 0 {\n\t\t// Check for a URI-escaped octet.\n\t\tif parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) {\n\t\t\treturn false\n\t\t}\n\n\t\tif !(parser.buffer[parser.buffer_pos] == '%' &&\n\t\t\tis_hex(parser.buffer, parser.buffer_pos+1) &&\n\t\t\tis_hex(parser.buffer, parser.buffer_pos+2)) {\n\t\t\treturn yaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\t\tstart_mark, \"did not find URI escaped octet\")\n\t\t}\n\n\t\t// Get the octet.\n\t\toctet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2))\n\n\t\t// If it is the leading octet, determine the length of the UTF-8 sequence.\n\t\tif w == 1024 {\n\t\t\tw = width(octet)\n\t\t\tif w == 0 {\n\t\t\t\treturn yaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\t\t\tstart_mark, \"found an incorrect leading UTF-8 octet\")\n\t\t\t}\n\t\t} else {\n\t\t\t// Check if the trailing octet is correct.\n\t\t\tif octet&0xC0 != 0x80 {\n\t\t\t\treturn yaml_parser_set_scanner_tag_error(parser, directive,\n\t\t\t\t\tstart_mark, \"found an incorrect trailing UTF-8 octet\")\n\t\t\t}\n\t\t}\n\n\t\t// Copy the octet and move the pointers.\n\t\t*s = append(*s, octet)\n\t\tskip(parser)\n\t\tskip(parser)\n\t\tskip(parser)\n\t\tw--\n\t}\n\treturn true\n}\n\n// Scan a block scalar.\nfunc yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool {\n\t// Eat the indicator '|' or '>'.\n\tstart_mark := parser.mark\n\tskip(parser)\n\n\t// Scan the additional block scalar indicators.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\n\t// Check for a chomping indicator.\n\tvar chomping, increment int\n\tif parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' {\n\t\t// Set the chomping method and eat the indicator.\n\t\tif parser.buffer[parser.buffer_pos] == '+' {\n\t\t\tchomping = +1\n\t\t} else {\n\t\t\tchomping = -1\n\t\t}\n\t\tskip(parser)\n\n\t\t// Check for an indentation indicator.\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t\tif is_digit(parser.buffer, parser.buffer_pos) {\n\t\t\t// Check that the indentation is greater than 0.\n\t\t\tif parser.buffer[parser.buffer_pos] == '0' {\n\t\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a block scalar\",\n\t\t\t\t\tstart_mark, \"found an indentation indicator equal to 0\")\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\t// Get the indentation level and eat the indicator.\n\t\t\tincrement = as_digit(parser.buffer, parser.buffer_pos)\n\t\t\tskip(parser)\n\t\t}\n\n\t} else if is_digit(parser.buffer, parser.buffer_pos) {\n\t\t// Do the same as above, but in the opposite order.\n\n\t\tif parser.buffer[parser.buffer_pos] == '0' {\n\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a block scalar\",\n\t\t\t\tstart_mark, \"found an indentation indicator equal to 0\")\n\t\t\treturn false\n\t\t}\n\t\tincrement = as_digit(parser.buffer, parser.buffer_pos)\n\t\tskip(parser)\n\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t\tif parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' {\n\t\t\tif parser.buffer[parser.buffer_pos] == '+' {\n\t\t\t\tchomping = +1\n\t\t\t} else {\n\t\t\t\tchomping = -1\n\t\t\t}\n\t\t\tskip(parser)\n\t\t}\n\t}\n\n\t// Eat whitespaces and comments to the end of the line.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tfor is_blank(parser.buffer, parser.buffer_pos) {\n\t\tskip(parser)\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t}\n\tif parser.buffer[parser.buffer_pos] == '#' {\n\t\tif !yaml_parser_scan_line_comment(parser, start_mark) {\n\t\t\treturn false\n\t\t}\n\t\tfor !is_breakz(parser.buffer, parser.buffer_pos) {\n\t\t\tskip(parser)\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check if we are at the end of the line.\n\tif !is_breakz(parser.buffer, parser.buffer_pos) {\n\t\tyaml_parser_set_scanner_error(parser, \"while scanning a block scalar\",\n\t\t\tstart_mark, \"did not find expected comment or line break\")\n\t\treturn false\n\t}\n\n\t// Eat a line break.\n\tif is_break(parser.buffer, parser.buffer_pos) {\n\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\treturn false\n\t\t}\n\t\tskip_line(parser)\n\t}\n\n\tend_mark := parser.mark\n\n\t// Set the indentation level if it was specified.\n\tvar indent int\n\tif increment > 0 {\n\t\tif parser.indent >= 0 {\n\t\t\tindent = parser.indent + increment\n\t\t} else {\n\t\t\tindent = increment\n\t\t}\n\t}\n\n\t// Scan the leading line breaks and determine the indentation level if needed.\n\tvar s, leading_break, trailing_breaks []byte\n\tif !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) {\n\t\treturn false\n\t}\n\n\t// Scan the block scalar content.\n\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\treturn false\n\t}\n\tvar leading_blank, trailing_blank bool\n\tfor parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) {\n\t\t// We are at the beginning of a non-empty line.\n\n\t\t// Is it a trailing whitespace?\n\t\ttrailing_blank = is_blank(parser.buffer, parser.buffer_pos)\n\n\t\t// Check if we need to fold the leading line break.\n\t\tif !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\\n' {\n\t\t\t// Do we need to join the lines by space?\n\t\t\tif len(trailing_breaks) == 0 {\n\t\t\t\ts = append(s, ' ')\n\t\t\t}\n\t\t} else {\n\t\t\ts = append(s, leading_break...)\n\t\t}\n\t\tleading_break = leading_break[:0]\n\n\t\t// Append the remaining line breaks.\n\t\ts = append(s, trailing_breaks...)\n\t\ttrailing_breaks = trailing_breaks[:0]\n\n\t\t// Is it a leading whitespace?\n\t\tleading_blank = is_blank(parser.buffer, parser.buffer_pos)\n\n\t\t// Consume the current line.\n\t\tfor !is_breakz(parser.buffer, parser.buffer_pos) {\n\t\t\ts = read(parser, s)\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Consume the line break.\n\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\treturn false\n\t\t}\n\n\t\tleading_break = read_line(parser, leading_break)\n\n\t\t// Eat the following indentation spaces and line breaks.\n\t\tif !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// Chomp the tail.\n\tif chomping != -1 {\n\t\ts = append(s, leading_break...)\n\t}\n\tif chomping == 1 {\n\t\ts = append(s, trailing_breaks...)\n\t}\n\n\t// Create a token.\n\t*token = yaml_token_t{\n\t\ttyp:        yaml_SCALAR_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\tvalue:      s,\n\t\tstyle:      yaml_LITERAL_SCALAR_STYLE,\n\t}\n\tif !literal {\n\t\ttoken.style = yaml_FOLDED_SCALAR_STYLE\n\t}\n\treturn true\n}\n\n// Scan indentation spaces and line breaks for a block scalar.  Determine the\n// indentation level if needed.\nfunc yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool {\n\t*end_mark = parser.mark\n\n\t// Eat the indentation spaces and line breaks.\n\tmax_indent := 0\n\tfor {\n\t\t// Eat the indentation spaces.\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\t\tfor (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) {\n\t\t\tskip(parser)\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\tif parser.mark.column > max_indent {\n\t\t\tmax_indent = parser.mark.column\n\t\t}\n\n\t\t// Check for a tab character messing the indentation.\n\t\tif (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) {\n\t\t\treturn yaml_parser_set_scanner_error(parser, \"while scanning a block scalar\",\n\t\t\t\tstart_mark, \"found a tab character where an indentation space is expected\")\n\t\t}\n\n\t\t// Have we found a non-empty line?\n\t\tif !is_break(parser.buffer, parser.buffer_pos) {\n\t\t\tbreak\n\t\t}\n\n\t\t// Consume the line break.\n\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\treturn false\n\t\t}\n\t\t// [Go] Should really be returning breaks instead.\n\t\t*breaks = read_line(parser, *breaks)\n\t\t*end_mark = parser.mark\n\t}\n\n\t// Determine the indentation level if needed.\n\tif *indent == 0 {\n\t\t*indent = max_indent\n\t\tif *indent < parser.indent+1 {\n\t\t\t*indent = parser.indent + 1\n\t\t}\n\t\tif *indent < 1 {\n\t\t\t*indent = 1\n\t\t}\n\t}\n\treturn true\n}\n\n// Scan a quoted scalar.\nfunc yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool {\n\t// Eat the left quote.\n\tstart_mark := parser.mark\n\tskip(parser)\n\n\t// Consume the content of the quoted scalar.\n\tvar s, leading_break, trailing_breaks, whitespaces []byte\n\tfor {\n\t\t// Check that there are no document indicators at the beginning of the line.\n\t\tif parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) {\n\t\t\treturn false\n\t\t}\n\n\t\tif parser.mark.column == 0 &&\n\t\t\t((parser.buffer[parser.buffer_pos+0] == '-' &&\n\t\t\t\tparser.buffer[parser.buffer_pos+1] == '-' &&\n\t\t\t\tparser.buffer[parser.buffer_pos+2] == '-') ||\n\t\t\t\t(parser.buffer[parser.buffer_pos+0] == '.' &&\n\t\t\t\t\tparser.buffer[parser.buffer_pos+1] == '.' &&\n\t\t\t\t\tparser.buffer[parser.buffer_pos+2] == '.')) &&\n\t\t\tis_blankz(parser.buffer, parser.buffer_pos+3) {\n\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a quoted scalar\",\n\t\t\t\tstart_mark, \"found unexpected document indicator\")\n\t\t\treturn false\n\t\t}\n\n\t\t// Check for EOF.\n\t\tif is_z(parser.buffer, parser.buffer_pos) {\n\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a quoted scalar\",\n\t\t\t\tstart_mark, \"found unexpected end of stream\")\n\t\t\treturn false\n\t\t}\n\n\t\t// Consume non-blank characters.\n\t\tleading_blanks := false\n\t\tfor !is_blankz(parser.buffer, parser.buffer_pos) {\n\t\t\tif single && parser.buffer[parser.buffer_pos] == '\\'' && parser.buffer[parser.buffer_pos+1] == '\\'' {\n\t\t\t\t// Is is an escaped single quote.\n\t\t\t\ts = append(s, '\\'')\n\t\t\t\tskip(parser)\n\t\t\t\tskip(parser)\n\n\t\t\t} else if single && parser.buffer[parser.buffer_pos] == '\\'' {\n\t\t\t\t// It is a right single quote.\n\t\t\t\tbreak\n\t\t\t} else if !single && parser.buffer[parser.buffer_pos] == '\"' {\n\t\t\t\t// It is a right double quote.\n\t\t\t\tbreak\n\n\t\t\t} else if !single && parser.buffer[parser.buffer_pos] == '\\\\' && is_break(parser.buffer, parser.buffer_pos+1) {\n\t\t\t\t// It is an escaped line break.\n\t\t\t\tif parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tskip(parser)\n\t\t\t\tskip_line(parser)\n\t\t\t\tleading_blanks = true\n\t\t\t\tbreak\n\n\t\t\t} else if !single && parser.buffer[parser.buffer_pos] == '\\\\' {\n\t\t\t\t// It is an escape sequence.\n\t\t\t\tcode_length := 0\n\n\t\t\t\t// Check the escape character.\n\t\t\t\tswitch parser.buffer[parser.buffer_pos+1] {\n\t\t\t\tcase '0':\n\t\t\t\t\ts = append(s, 0)\n\t\t\t\tcase 'a':\n\t\t\t\t\ts = append(s, '\\x07')\n\t\t\t\tcase 'b':\n\t\t\t\t\ts = append(s, '\\x08')\n\t\t\t\tcase 't', '\\t':\n\t\t\t\t\ts = append(s, '\\x09')\n\t\t\t\tcase 'n':\n\t\t\t\t\ts = append(s, '\\x0A')\n\t\t\t\tcase 'v':\n\t\t\t\t\ts = append(s, '\\x0B')\n\t\t\t\tcase 'f':\n\t\t\t\t\ts = append(s, '\\x0C')\n\t\t\t\tcase 'r':\n\t\t\t\t\ts = append(s, '\\x0D')\n\t\t\t\tcase 'e':\n\t\t\t\t\ts = append(s, '\\x1B')\n\t\t\t\tcase ' ':\n\t\t\t\t\ts = append(s, '\\x20')\n\t\t\t\tcase '\"':\n\t\t\t\t\ts = append(s, '\"')\n\t\t\t\tcase '\\'':\n\t\t\t\t\ts = append(s, '\\'')\n\t\t\t\tcase '\\\\':\n\t\t\t\t\ts = append(s, '\\\\')\n\t\t\t\tcase 'N': // NEL (#x85)\n\t\t\t\t\ts = append(s, '\\xC2')\n\t\t\t\t\ts = append(s, '\\x85')\n\t\t\t\tcase '_': // #xA0\n\t\t\t\t\ts = append(s, '\\xC2')\n\t\t\t\t\ts = append(s, '\\xA0')\n\t\t\t\tcase 'L': // LS (#x2028)\n\t\t\t\t\ts = append(s, '\\xE2')\n\t\t\t\t\ts = append(s, '\\x80')\n\t\t\t\t\ts = append(s, '\\xA8')\n\t\t\t\tcase 'P': // PS (#x2029)\n\t\t\t\t\ts = append(s, '\\xE2')\n\t\t\t\t\ts = append(s, '\\x80')\n\t\t\t\t\ts = append(s, '\\xA9')\n\t\t\t\tcase 'x':\n\t\t\t\t\tcode_length = 2\n\t\t\t\tcase 'u':\n\t\t\t\t\tcode_length = 4\n\t\t\t\tcase 'U':\n\t\t\t\t\tcode_length = 8\n\t\t\t\tdefault:\n\t\t\t\t\tyaml_parser_set_scanner_error(parser, \"while parsing a quoted scalar\",\n\t\t\t\t\t\tstart_mark, \"found unknown escape character\")\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tskip(parser)\n\t\t\t\tskip(parser)\n\n\t\t\t\t// Consume an arbitrary escape code.\n\t\t\t\tif code_length > 0 {\n\t\t\t\t\tvar value int\n\n\t\t\t\t\t// Scan the character value.\n\t\t\t\t\tif parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tfor k := 0; k < code_length; k++ {\n\t\t\t\t\t\tif !is_hex(parser.buffer, parser.buffer_pos+k) {\n\t\t\t\t\t\t\tyaml_parser_set_scanner_error(parser, \"while parsing a quoted scalar\",\n\t\t\t\t\t\t\t\tstart_mark, \"did not find expected hexdecimal number\")\n\t\t\t\t\t\t\treturn false\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check the value and write the character.\n\t\t\t\t\tif (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF {\n\t\t\t\t\t\tyaml_parser_set_scanner_error(parser, \"while parsing a quoted scalar\",\n\t\t\t\t\t\t\tstart_mark, \"found invalid Unicode character escape code\")\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tif value <= 0x7F {\n\t\t\t\t\t\ts = append(s, byte(value))\n\t\t\t\t\t} else if value <= 0x7FF {\n\t\t\t\t\t\ts = append(s, byte(0xC0+(value>>6)))\n\t\t\t\t\t\ts = append(s, byte(0x80+(value&0x3F)))\n\t\t\t\t\t} else if value <= 0xFFFF {\n\t\t\t\t\t\ts = append(s, byte(0xE0+(value>>12)))\n\t\t\t\t\t\ts = append(s, byte(0x80+((value>>6)&0x3F)))\n\t\t\t\t\t\ts = append(s, byte(0x80+(value&0x3F)))\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = append(s, byte(0xF0+(value>>18)))\n\t\t\t\t\t\ts = append(s, byte(0x80+((value>>12)&0x3F)))\n\t\t\t\t\t\ts = append(s, byte(0x80+((value>>6)&0x3F)))\n\t\t\t\t\t\ts = append(s, byte(0x80+(value&0x3F)))\n\t\t\t\t\t}\n\n\t\t\t\t\t// Advance the pointer.\n\t\t\t\t\tfor k := 0; k < code_length; k++ {\n\t\t\t\t\t\tskip(parser)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// It is a non-escaped non-blank character.\n\t\t\t\ts = read(parser, s)\n\t\t\t}\n\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Check if we are at the end of the scalar.\n\t\tif single {\n\t\t\tif parser.buffer[parser.buffer_pos] == '\\'' {\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\tif parser.buffer[parser.buffer_pos] == '\"' {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\t// Consume blank characters.\n\t\tfor is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) {\n\t\t\tif is_blank(parser.buffer, parser.buffer_pos) {\n\t\t\t\t// Consume a space or a tab character.\n\t\t\t\tif !leading_blanks {\n\t\t\t\t\twhitespaces = read(parser, whitespaces)\n\t\t\t\t} else {\n\t\t\t\t\tskip(parser)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Check if it is a first line break.\n\t\t\t\tif !leading_blanks {\n\t\t\t\t\twhitespaces = whitespaces[:0]\n\t\t\t\t\tleading_break = read_line(parser, leading_break)\n\t\t\t\t\tleading_blanks = true\n\t\t\t\t} else {\n\t\t\t\t\ttrailing_breaks = read_line(parser, trailing_breaks)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Join the whitespaces or fold line breaks.\n\t\tif leading_blanks {\n\t\t\t// Do we need to fold line breaks?\n\t\t\tif len(leading_break) > 0 && leading_break[0] == '\\n' {\n\t\t\t\tif len(trailing_breaks) == 0 {\n\t\t\t\t\ts = append(s, ' ')\n\t\t\t\t} else {\n\t\t\t\t\ts = append(s, trailing_breaks...)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ts = append(s, leading_break...)\n\t\t\t\ts = append(s, trailing_breaks...)\n\t\t\t}\n\t\t\ttrailing_breaks = trailing_breaks[:0]\n\t\t\tleading_break = leading_break[:0]\n\t\t} else {\n\t\t\ts = append(s, whitespaces...)\n\t\t\twhitespaces = whitespaces[:0]\n\t\t}\n\t}\n\n\t// Eat the right quote.\n\tskip(parser)\n\tend_mark := parser.mark\n\n\t// Create a token.\n\t*token = yaml_token_t{\n\t\ttyp:        yaml_SCALAR_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\tvalue:      s,\n\t\tstyle:      yaml_SINGLE_QUOTED_SCALAR_STYLE,\n\t}\n\tif !single {\n\t\ttoken.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE\n\t}\n\treturn true\n}\n\n// Scan a plain scalar.\nfunc yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool {\n\n\tvar s, leading_break, trailing_breaks, whitespaces []byte\n\tvar leading_blanks bool\n\tvar indent = parser.indent + 1\n\n\tstart_mark := parser.mark\n\tend_mark := parser.mark\n\n\t// Consume the content of the plain scalar.\n\tfor {\n\t\t// Check for a document indicator.\n\t\tif parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) {\n\t\t\treturn false\n\t\t}\n\t\tif parser.mark.column == 0 &&\n\t\t\t((parser.buffer[parser.buffer_pos+0] == '-' &&\n\t\t\t\tparser.buffer[parser.buffer_pos+1] == '-' &&\n\t\t\t\tparser.buffer[parser.buffer_pos+2] == '-') ||\n\t\t\t\t(parser.buffer[parser.buffer_pos+0] == '.' &&\n\t\t\t\t\tparser.buffer[parser.buffer_pos+1] == '.' &&\n\t\t\t\t\tparser.buffer[parser.buffer_pos+2] == '.')) &&\n\t\t\tis_blankz(parser.buffer, parser.buffer_pos+3) {\n\t\t\tbreak\n\t\t}\n\n\t\t// Check for a comment.\n\t\tif parser.buffer[parser.buffer_pos] == '#' {\n\t\t\tbreak\n\t\t}\n\n\t\t// Consume non-blank characters.\n\t\tfor !is_blankz(parser.buffer, parser.buffer_pos) {\n\n\t\t\t// Check for indicators that may end a plain scalar.\n\t\t\tif (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) ||\n\t\t\t\t(parser.flow_level > 0 &&\n\t\t\t\t\t(parser.buffer[parser.buffer_pos] == ',' ||\n\t\t\t\t\t\tparser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' ||\n\t\t\t\t\t\tparser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' ||\n\t\t\t\t\t\tparser.buffer[parser.buffer_pos] == '}')) {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// Check if we need to join whitespaces and breaks.\n\t\t\tif leading_blanks || len(whitespaces) > 0 {\n\t\t\t\tif leading_blanks {\n\t\t\t\t\t// Do we need to fold line breaks?\n\t\t\t\t\tif leading_break[0] == '\\n' {\n\t\t\t\t\t\tif len(trailing_breaks) == 0 {\n\t\t\t\t\t\t\ts = append(s, ' ')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts = append(s, trailing_breaks...)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = append(s, leading_break...)\n\t\t\t\t\t\ts = append(s, trailing_breaks...)\n\t\t\t\t\t}\n\t\t\t\t\ttrailing_breaks = trailing_breaks[:0]\n\t\t\t\t\tleading_break = leading_break[:0]\n\t\t\t\t\tleading_blanks = false\n\t\t\t\t} else {\n\t\t\t\t\ts = append(s, whitespaces...)\n\t\t\t\t\twhitespaces = whitespaces[:0]\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Copy the character.\n\t\t\ts = read(parser, s)\n\n\t\t\tend_mark = parser.mark\n\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Is it the end?\n\t\tif !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) {\n\t\t\tbreak\n\t\t}\n\n\t\t// Consume blank characters.\n\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\treturn false\n\t\t}\n\n\t\tfor is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) {\n\t\t\tif is_blank(parser.buffer, parser.buffer_pos) {\n\n\t\t\t\t// Check for tab characters that abuse indentation.\n\t\t\t\tif leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) {\n\t\t\t\t\tyaml_parser_set_scanner_error(parser, \"while scanning a plain scalar\",\n\t\t\t\t\t\tstart_mark, \"found a tab character that violates indentation\")\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Consume a space or a tab character.\n\t\t\t\tif !leading_blanks {\n\t\t\t\t\twhitespaces = read(parser, whitespaces)\n\t\t\t\t} else {\n\t\t\t\t\tskip(parser)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Check if it is a first line break.\n\t\t\t\tif !leading_blanks {\n\t\t\t\t\twhitespaces = whitespaces[:0]\n\t\t\t\t\tleading_break = read_line(parser, leading_break)\n\t\t\t\t\tleading_blanks = true\n\t\t\t\t} else {\n\t\t\t\t\ttrailing_breaks = read_line(parser, trailing_breaks)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\t// Check indentation level.\n\t\tif parser.flow_level == 0 && parser.mark.column < indent {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// Create a token.\n\t*token = yaml_token_t{\n\t\ttyp:        yaml_SCALAR_TOKEN,\n\t\tstart_mark: start_mark,\n\t\tend_mark:   end_mark,\n\t\tvalue:      s,\n\t\tstyle:      yaml_PLAIN_SCALAR_STYLE,\n\t}\n\n\t// Note that we change the 'simple_key_allowed' flag.\n\tif leading_blanks {\n\t\tparser.simple_key_allowed = true\n\t}\n\treturn true\n}\n\nfunc yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t) bool {\n\tif parser.newlines > 0 {\n\t\treturn true\n\t}\n\n\tvar start_mark yaml_mark_t\n\tvar text []byte\n\n\tfor peek := 0; peek < 512; peek++ {\n\t\tif parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) {\n\t\t\tbreak\n\t\t}\n\t\tif is_blank(parser.buffer, parser.buffer_pos+peek) {\n\t\t\tcontinue\n\t\t}\n\t\tif parser.buffer[parser.buffer_pos+peek] == '#' {\n\t\t\tseen := parser.mark.index+peek\n\t\t\tfor {\n\t\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif is_breakz(parser.buffer, parser.buffer_pos) {\n\t\t\t\t\tif parser.mark.index >= seen {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tskip_line(parser)\n\t\t\t\t} else if parser.mark.index >= seen {\n\t\t\t\t\tif len(text) == 0 {\n\t\t\t\t\t\tstart_mark = parser.mark\n\t\t\t\t\t}\n\t\t\t\t\ttext = read(parser, text)\n\t\t\t\t} else {\n\t\t\t\t\tskip(parser)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak\n\t}\n\tif len(text) > 0 {\n\t\tparser.comments = append(parser.comments, yaml_comment_t{\n\t\t\ttoken_mark: token_mark,\n\t\t\tstart_mark: start_mark,\n\t\t\tline: text,\n\t\t})\n\t}\n\treturn true\n}\n\nfunc yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) bool {\n\ttoken := parser.tokens[len(parser.tokens)-1]\n\n\tif token.typ == yaml_FLOW_ENTRY_TOKEN && len(parser.tokens) > 1 {\n\t\ttoken = parser.tokens[len(parser.tokens)-2]\n\t}\n\n\tvar token_mark = token.start_mark\n\tvar start_mark yaml_mark_t\n\tvar next_indent = parser.indent\n\tif next_indent < 0 {\n\t\tnext_indent = 0\n\t}\n\n\tvar recent_empty = false\n\tvar first_empty = parser.newlines <= 1\n\n\tvar line = parser.mark.line\n\tvar column = parser.mark.column\n\n\tvar text []byte\n\n\t// The foot line is the place where a comment must start to\n\t// still be considered as a foot of the prior content.\n\t// If there's some content in the currently parsed line, then\n\t// the foot is the line below it.\n\tvar foot_line = -1\n\tif scan_mark.line > 0 {\n\t\tfoot_line = parser.mark.line-parser.newlines+1\n\t\tif parser.newlines == 0 && parser.mark.column > 1 {\n\t\t\tfoot_line++\n\t\t}\n\t}\n\n\tvar peek = 0\n\tfor ; peek < 512; peek++ {\n\t\tif parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) {\n\t\t\tbreak\n\t\t}\n\t\tcolumn++\n\t\tif is_blank(parser.buffer, parser.buffer_pos+peek) {\n\t\t\tcontinue\n\t\t}\n\t\tc := parser.buffer[parser.buffer_pos+peek]\n\t\tvar close_flow = parser.flow_level > 0 && (c == ']' || c == '}')\n\t\tif close_flow || is_breakz(parser.buffer, parser.buffer_pos+peek) {\n\t\t\t// Got line break or terminator.\n\t\t\tif close_flow || !recent_empty {\n\t\t\t\tif close_flow || first_empty && (start_mark.line == foot_line && token.typ != yaml_VALUE_TOKEN || start_mark.column-1 < next_indent) {\n\t\t\t\t\t// This is the first empty line and there were no empty lines before,\n\t\t\t\t\t// so this initial part of the comment is a foot of the prior token\n\t\t\t\t\t// instead of being a head for the following one. Split it up.\n\t\t\t\t\t// Alternatively, this might also be the last comment inside a flow\n\t\t\t\t\t// scope, so it must be a footer.\n\t\t\t\t\tif len(text) > 0 {\n\t\t\t\t\t\tif start_mark.column-1 < next_indent {\n\t\t\t\t\t\t\t// If dedented it's unrelated to the prior token.\n\t\t\t\t\t\t\ttoken_mark = start_mark\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparser.comments = append(parser.comments, yaml_comment_t{\n\t\t\t\t\t\t\tscan_mark:  scan_mark,\n\t\t\t\t\t\t\ttoken_mark: token_mark,\n\t\t\t\t\t\t\tstart_mark: start_mark,\n\t\t\t\t\t\t\tend_mark:   yaml_mark_t{parser.mark.index + peek, line, column},\n\t\t\t\t\t\t\tfoot:       text,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tscan_mark = yaml_mark_t{parser.mark.index + peek, line, column}\n\t\t\t\t\t\ttoken_mark = scan_mark\n\t\t\t\t\t\ttext = nil\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif len(text) > 0 && parser.buffer[parser.buffer_pos+peek] != 0 {\n\t\t\t\t\t\ttext = append(text, '\\n')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif !is_break(parser.buffer, parser.buffer_pos+peek) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tfirst_empty = false\n\t\t\trecent_empty = true\n\t\t\tcolumn = 0\n\t\t\tline++\n\t\t\tcontinue\n\t\t}\n\n\t\tif len(text) > 0 && (close_flow || column-1 < next_indent && column != start_mark.column) {\n\t\t\t// The comment at the different indentation is a foot of the\n\t\t\t// preceding data rather than a head of the upcoming one.\n\t\t\tparser.comments = append(parser.comments, yaml_comment_t{\n\t\t\t\tscan_mark:  scan_mark,\n\t\t\t\ttoken_mark: token_mark,\n\t\t\t\tstart_mark: start_mark,\n\t\t\t\tend_mark:   yaml_mark_t{parser.mark.index + peek, line, column},\n\t\t\t\tfoot:       text,\n\t\t\t})\n\t\t\tscan_mark = yaml_mark_t{parser.mark.index + peek, line, column}\n\t\t\ttoken_mark = scan_mark\n\t\t\ttext = nil\n\t\t}\n\n\t\tif parser.buffer[parser.buffer_pos+peek] != '#' {\n\t\t\tbreak\n\t\t}\n\n\t\tif len(text) == 0 {\n\t\t\tstart_mark = yaml_mark_t{parser.mark.index + peek, line, column}\n\t\t} else {\n\t\t\ttext = append(text, '\\n')\n\t\t}\n\n\t\trecent_empty = false\n\n\t\t// Consume until after the consumed comment line.\n\t\tseen := parser.mark.index+peek\n\t\tfor {\n\t\t\tif parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif is_breakz(parser.buffer, parser.buffer_pos) {\n\t\t\t\tif parser.mark.index >= seen {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tskip_line(parser)\n\t\t\t} else if parser.mark.index >= seen {\n\t\t\t\ttext = read(parser, text)\n\t\t\t} else {\n\t\t\t\tskip(parser)\n\t\t\t}\n\t\t}\n\n\t\tpeek = 0\n\t\tcolumn = 0\n\t\tline = parser.mark.line\n\t\tnext_indent = parser.indent\n\t\tif next_indent < 0 {\n\t\t\tnext_indent = 0\n\t\t}\n\t}\n\n\tif len(text) > 0 {\n\t\tparser.comments = append(parser.comments, yaml_comment_t{\n\t\t\tscan_mark:  scan_mark,\n\t\t\ttoken_mark: start_mark,\n\t\t\tstart_mark: start_mark,\n\t\t\tend_mark:   yaml_mark_t{parser.mark.index + peek - 1, line, column},\n\t\t\thead:       text,\n\t\t})\n\t}\n\treturn true\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/sorter.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage yaml\n\nimport (\n\t\"reflect\"\n\t\"unicode\"\n)\n\ntype keyList []reflect.Value\n\nfunc (l keyList) Len() int      { return len(l) }\nfunc (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }\nfunc (l keyList) Less(i, j int) bool {\n\ta := l[i]\n\tb := l[j]\n\tak := a.Kind()\n\tbk := b.Kind()\n\tfor (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() {\n\t\ta = a.Elem()\n\t\tak = a.Kind()\n\t}\n\tfor (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() {\n\t\tb = b.Elem()\n\t\tbk = b.Kind()\n\t}\n\taf, aok := keyFloat(a)\n\tbf, bok := keyFloat(b)\n\tif aok && bok {\n\t\tif af != bf {\n\t\t\treturn af < bf\n\t\t}\n\t\tif ak != bk {\n\t\t\treturn ak < bk\n\t\t}\n\t\treturn numLess(a, b)\n\t}\n\tif ak != reflect.String || bk != reflect.String {\n\t\treturn ak < bk\n\t}\n\tar, br := []rune(a.String()), []rune(b.String())\n\tdigits := false\n\tfor i := 0; i < len(ar) && i < len(br); i++ {\n\t\tif ar[i] == br[i] {\n\t\t\tdigits = unicode.IsDigit(ar[i])\n\t\t\tcontinue\n\t\t}\n\t\tal := unicode.IsLetter(ar[i])\n\t\tbl := unicode.IsLetter(br[i])\n\t\tif al && bl {\n\t\t\treturn ar[i] < br[i]\n\t\t}\n\t\tif al || bl {\n\t\t\tif digits {\n\t\t\t\treturn al\n\t\t\t} else {\n\t\t\t\treturn bl\n\t\t\t}\n\t\t}\n\t\tvar ai, bi int\n\t\tvar an, bn int64\n\t\tif ar[i] == '0' || br[i] == '0' {\n\t\t\tfor j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- {\n\t\t\t\tif ar[j] != '0' {\n\t\t\t\t\tan = 1\n\t\t\t\t\tbn = 1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ {\n\t\t\tan = an*10 + int64(ar[ai]-'0')\n\t\t}\n\t\tfor bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ {\n\t\t\tbn = bn*10 + int64(br[bi]-'0')\n\t\t}\n\t\tif an != bn {\n\t\t\treturn an < bn\n\t\t}\n\t\tif ai != bi {\n\t\t\treturn ai < bi\n\t\t}\n\t\treturn ar[i] < br[i]\n\t}\n\treturn len(ar) < len(br)\n}\n\n// keyFloat returns a float value for v if it is a number/bool\n// and whether it is a number/bool or not.\nfunc keyFloat(v reflect.Value) (f float64, ok bool) {\n\tswitch v.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn float64(v.Int()), true\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn v.Float(), true\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn float64(v.Uint()), true\n\tcase reflect.Bool:\n\t\tif v.Bool() {\n\t\t\treturn 1, true\n\t\t}\n\t\treturn 0, true\n\t}\n\treturn 0, false\n}\n\n// numLess returns whether a < b.\n// a and b must necessarily have the same kind.\nfunc numLess(a, b reflect.Value) bool {\n\tswitch a.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn a.Int() < b.Int()\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn a.Float() < b.Float()\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn a.Uint() < b.Uint()\n\tcase reflect.Bool:\n\t\treturn !a.Bool() && b.Bool()\n\t}\n\tpanic(\"not a number\")\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/writerc.go",
    "content": "// \n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\n// Set the writer error and return false.\nfunc yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool {\n\temitter.error = yaml_WRITER_ERROR\n\temitter.problem = problem\n\treturn false\n}\n\n// Flush the output buffer.\nfunc yaml_emitter_flush(emitter *yaml_emitter_t) bool {\n\tif emitter.write_handler == nil {\n\t\tpanic(\"write handler not set\")\n\t}\n\n\t// Check if the buffer is empty.\n\tif emitter.buffer_pos == 0 {\n\t\treturn true\n\t}\n\n\tif err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil {\n\t\treturn yaml_emitter_set_writer_error(emitter, \"write error: \"+err.Error())\n\t}\n\temitter.buffer_pos = 0\n\treturn true\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/yaml.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package yaml implements YAML support for the Go language.\n//\n// Source code and other details for the project are available at GitHub:\n//\n//   https://github.com/go-yaml/yaml\n//\npackage yaml\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync\"\n\t\"unicode/utf8\"\n)\n\n// The Unmarshaler interface may be implemented by types to customize their\n// behavior when being unmarshaled from a YAML document.\ntype Unmarshaler interface {\n\tUnmarshalYAML(value *Node) error\n}\n\ntype obsoleteUnmarshaler interface {\n\tUnmarshalYAML(unmarshal func(interface{}) error) error\n}\n\n// The Marshaler interface may be implemented by types to customize their\n// behavior when being marshaled into a YAML document. The returned value\n// is marshaled in place of the original value implementing Marshaler.\n//\n// If an error is returned by MarshalYAML, the marshaling procedure stops\n// and returns with the provided error.\ntype Marshaler interface {\n\tMarshalYAML() (interface{}, error)\n}\n\n// Unmarshal decodes the first document found within the in byte slice\n// and assigns decoded values into the out value.\n//\n// Maps and pointers (to a struct, string, int, etc) are accepted as out\n// values. If an internal pointer within a struct is not initialized,\n// the yaml package will initialize it if necessary for unmarshalling\n// the provided data. The out parameter must not be nil.\n//\n// The type of the decoded values should be compatible with the respective\n// values in out. If one or more values cannot be decoded due to a type\n// mismatches, decoding continues partially until the end of the YAML\n// content, and a *yaml.TypeError is returned with details for all\n// missed values.\n//\n// Struct fields are only unmarshalled if they are exported (have an\n// upper case first letter), and are unmarshalled using the field name\n// lowercased as the default key. Custom keys may be defined via the\n// \"yaml\" name in the field tag: the content preceding the first comma\n// is used as the key, and the following comma-separated options are\n// used to tweak the marshalling process (see Marshal).\n// Conflicting names result in a runtime error.\n//\n// For example:\n//\n//     type T struct {\n//         F int `yaml:\"a,omitempty\"`\n//         B int\n//     }\n//     var t T\n//     yaml.Unmarshal([]byte(\"a: 1\\nb: 2\"), &t)\n//\n// See the documentation of Marshal for the format of tags and a list of\n// supported tag options.\n//\nfunc Unmarshal(in []byte, out interface{}) (err error) {\n\treturn unmarshal(in, out, false)\n}\n\n// A Decoder reads and decodes YAML values from an input stream.\ntype Decoder struct {\n\tparser      *parser\n\tknownFields bool\n}\n\n// NewDecoder returns a new decoder that reads from r.\n//\n// The decoder introduces its own buffering and may read\n// data from r beyond the YAML values requested.\nfunc NewDecoder(r io.Reader) *Decoder {\n\treturn &Decoder{\n\t\tparser: newParserFromReader(r),\n\t}\n}\n\n// KnownFields ensures that the keys in decoded mappings to\n// exist as fields in the struct being decoded into.\nfunc (dec *Decoder) KnownFields(enable bool) {\n\tdec.knownFields = enable\n}\n\n// Decode reads the next YAML-encoded value from its input\n// and stores it in the value pointed to by v.\n//\n// See the documentation for Unmarshal for details about the\n// conversion of YAML into a Go value.\nfunc (dec *Decoder) Decode(v interface{}) (err error) {\n\td := newDecoder()\n\td.knownFields = dec.knownFields\n\tdefer handleErr(&err)\n\tnode := dec.parser.parse()\n\tif node == nil {\n\t\treturn io.EOF\n\t}\n\tout := reflect.ValueOf(v)\n\tif out.Kind() == reflect.Ptr && !out.IsNil() {\n\t\tout = out.Elem()\n\t}\n\td.unmarshal(node, out)\n\tif len(d.terrors) > 0 {\n\t\treturn &TypeError{d.terrors}\n\t}\n\treturn nil\n}\n\n// Decode decodes the node and stores its data into the value pointed to by v.\n//\n// See the documentation for Unmarshal for details about the\n// conversion of YAML into a Go value.\nfunc (n *Node) Decode(v interface{}) (err error) {\n\td := newDecoder()\n\tdefer handleErr(&err)\n\tout := reflect.ValueOf(v)\n\tif out.Kind() == reflect.Ptr && !out.IsNil() {\n\t\tout = out.Elem()\n\t}\n\td.unmarshal(n, out)\n\tif len(d.terrors) > 0 {\n\t\treturn &TypeError{d.terrors}\n\t}\n\treturn nil\n}\n\nfunc unmarshal(in []byte, out interface{}, strict bool) (err error) {\n\tdefer handleErr(&err)\n\td := newDecoder()\n\tp := newParser(in)\n\tdefer p.destroy()\n\tnode := p.parse()\n\tif node != nil {\n\t\tv := reflect.ValueOf(out)\n\t\tif v.Kind() == reflect.Ptr && !v.IsNil() {\n\t\t\tv = v.Elem()\n\t\t}\n\t\td.unmarshal(node, v)\n\t}\n\tif len(d.terrors) > 0 {\n\t\treturn &TypeError{d.terrors}\n\t}\n\treturn nil\n}\n\n// Marshal serializes the value provided into a YAML document. The structure\n// of the generated document will reflect the structure of the value itself.\n// Maps and pointers (to struct, string, int, etc) are accepted as the in value.\n//\n// Struct fields are only marshalled if they are exported (have an upper case\n// first letter), and are marshalled using the field name lowercased as the\n// default key. Custom keys may be defined via the \"yaml\" name in the field\n// tag: the content preceding the first comma is used as the key, and the\n// following comma-separated options are used to tweak the marshalling process.\n// Conflicting names result in a runtime error.\n//\n// The field tag format accepted is:\n//\n//     `(...) yaml:\"[<key>][,<flag1>[,<flag2>]]\" (...)`\n//\n// The following flags are currently supported:\n//\n//     omitempty    Only include the field if it's not set to the zero\n//                  value for the type or to empty slices or maps.\n//                  Zero valued structs will be omitted if all their public\n//                  fields are zero, unless they implement an IsZero\n//                  method (see the IsZeroer interface type), in which\n//                  case the field will be excluded if IsZero returns true.\n//\n//     flow         Marshal using a flow style (useful for structs,\n//                  sequences and maps).\n//\n//     inline       Inline the field, which must be a struct or a map,\n//                  causing all of its fields or keys to be processed as if\n//                  they were part of the outer struct. For maps, keys must\n//                  not conflict with the yaml keys of other struct fields.\n//\n// In addition, if the key is \"-\", the field is ignored.\n//\n// For example:\n//\n//     type T struct {\n//         F int `yaml:\"a,omitempty\"`\n//         B int\n//     }\n//     yaml.Marshal(&T{B: 2}) // Returns \"b: 2\\n\"\n//     yaml.Marshal(&T{F: 1}} // Returns \"a: 1\\nb: 0\\n\"\n//\nfunc Marshal(in interface{}) (out []byte, err error) {\n\tdefer handleErr(&err)\n\te := newEncoder()\n\tdefer e.destroy()\n\te.marshalDoc(\"\", reflect.ValueOf(in))\n\te.finish()\n\tout = e.out\n\treturn\n}\n\n// An Encoder writes YAML values to an output stream.\ntype Encoder struct {\n\tencoder *encoder\n}\n\n// NewEncoder returns a new encoder that writes to w.\n// The Encoder should be closed after use to flush all data\n// to w.\nfunc NewEncoder(w io.Writer) *Encoder {\n\treturn &Encoder{\n\t\tencoder: newEncoderWithWriter(w),\n\t}\n}\n\n// Encode writes the YAML encoding of v to the stream.\n// If multiple items are encoded to the stream, the\n// second and subsequent document will be preceded\n// with a \"---\" document separator, but the first will not.\n//\n// See the documentation for Marshal for details about the conversion of Go\n// values to YAML.\nfunc (e *Encoder) Encode(v interface{}) (err error) {\n\tdefer handleErr(&err)\n\te.encoder.marshalDoc(\"\", reflect.ValueOf(v))\n\treturn nil\n}\n\n// Encode encodes value v and stores its representation in n.\n//\n// See the documentation for Marshal for details about the\n// conversion of Go values into YAML.\nfunc (n *Node) Encode(v interface{}) (err error) {\n\tdefer handleErr(&err)\n\te := newEncoder()\n\tdefer e.destroy()\n\te.marshalDoc(\"\", reflect.ValueOf(v))\n\te.finish()\n\tp := newParser(e.out)\n\tp.textless = true\n\tdefer p.destroy()\n\tdoc := p.parse()\n\t*n = *doc.Content[0]\n\treturn nil\n}\n\n// SetIndent changes the used indentation used when encoding.\nfunc (e *Encoder) SetIndent(spaces int) {\n\tif spaces < 0 {\n\t\tpanic(\"yaml: cannot indent to a negative number of spaces\")\n\t}\n\te.encoder.indent = spaces\n}\n\n// Close closes the encoder by writing any remaining data.\n// It does not write a stream terminating string \"...\".\nfunc (e *Encoder) Close() (err error) {\n\tdefer handleErr(&err)\n\te.encoder.finish()\n\treturn nil\n}\n\nfunc handleErr(err *error) {\n\tif v := recover(); v != nil {\n\t\tif e, ok := v.(yamlError); ok {\n\t\t\t*err = e.err\n\t\t} else {\n\t\t\tpanic(v)\n\t\t}\n\t}\n}\n\ntype yamlError struct {\n\terr error\n}\n\nfunc fail(err error) {\n\tpanic(yamlError{err})\n}\n\nfunc failf(format string, args ...interface{}) {\n\tpanic(yamlError{fmt.Errorf(\"yaml: \"+format, args...)})\n}\n\n// A TypeError is returned by Unmarshal when one or more fields in\n// the YAML document cannot be properly decoded into the requested\n// types. When this error is returned, the value is still\n// unmarshaled partially.\ntype TypeError struct {\n\tErrors []string\n}\n\nfunc (e *TypeError) Error() string {\n\treturn fmt.Sprintf(\"yaml: unmarshal errors:\\n  %s\", strings.Join(e.Errors, \"\\n  \"))\n}\n\ntype Kind uint32\n\nconst (\n\tDocumentNode Kind = 1 << iota\n\tSequenceNode\n\tMappingNode\n\tScalarNode\n\tAliasNode\n)\n\ntype Style uint32\n\nconst (\n\tTaggedStyle Style = 1 << iota\n\tDoubleQuotedStyle\n\tSingleQuotedStyle\n\tLiteralStyle\n\tFoldedStyle\n\tFlowStyle\n)\n\n// Node represents an element in the YAML document hierarchy. While documents\n// are typically encoded and decoded into higher level types, such as structs\n// and maps, Node is an intermediate representation that allows detailed\n// control over the content being decoded or encoded.\n//\n// It's worth noting that although Node offers access into details such as\n// line numbers, colums, and comments, the content when re-encoded will not\n// have its original textual representation preserved. An effort is made to\n// render the data plesantly, and to preserve comments near the data they\n// describe, though.\n//\n// Values that make use of the Node type interact with the yaml package in the\n// same way any other type would do, by encoding and decoding yaml data\n// directly or indirectly into them.\n//\n// For example:\n//\n//     var person struct {\n//             Name    string\n//             Address yaml.Node\n//     }\n//     err := yaml.Unmarshal(data, &person)\n// \n// Or by itself:\n//\n//     var person Node\n//     err := yaml.Unmarshal(data, &person)\n//\ntype Node struct {\n\t// Kind defines whether the node is a document, a mapping, a sequence,\n\t// a scalar value, or an alias to another node. The specific data type of\n\t// scalar nodes may be obtained via the ShortTag and LongTag methods.\n\tKind  Kind\n\n\t// Style allows customizing the apperance of the node in the tree.\n\tStyle Style\n\n\t// Tag holds the YAML tag defining the data type for the value.\n\t// When decoding, this field will always be set to the resolved tag,\n\t// even when it wasn't explicitly provided in the YAML content.\n\t// When encoding, if this field is unset the value type will be\n\t// implied from the node properties, and if it is set, it will only\n\t// be serialized into the representation if TaggedStyle is used or\n\t// the implicit tag diverges from the provided one.\n\tTag string\n\n\t// Value holds the unescaped and unquoted represenation of the value.\n\tValue string\n\n\t// Anchor holds the anchor name for this node, which allows aliases to point to it.\n\tAnchor string\n\n\t// Alias holds the node that this alias points to. Only valid when Kind is AliasNode.\n\tAlias *Node\n\n\t// Content holds contained nodes for documents, mappings, and sequences.\n\tContent []*Node\n\n\t// HeadComment holds any comments in the lines preceding the node and\n\t// not separated by an empty line.\n\tHeadComment string\n\n\t// LineComment holds any comments at the end of the line where the node is in.\n\tLineComment string\n\n\t// FootComment holds any comments following the node and before empty lines.\n\tFootComment string\n\n\t// Line and Column hold the node position in the decoded YAML text.\n\t// These fields are not respected when encoding the node.\n\tLine   int\n\tColumn int\n}\n\n// IsZero returns whether the node has all of its fields unset.\nfunc (n *Node) IsZero() bool {\n\treturn n.Kind == 0 && n.Style == 0 && n.Tag == \"\" && n.Value == \"\" && n.Anchor == \"\" && n.Alias == nil && n.Content == nil &&\n\t\tn.HeadComment == \"\" && n.LineComment == \"\" && n.FootComment == \"\" && n.Line == 0 && n.Column == 0\n}\n\n\n// LongTag returns the long form of the tag that indicates the data type for\n// the node. If the Tag field isn't explicitly defined, one will be computed\n// based on the node properties.\nfunc (n *Node) LongTag() string {\n\treturn longTag(n.ShortTag())\n}\n\n// ShortTag returns the short form of the YAML tag that indicates data type for\n// the node. If the Tag field isn't explicitly defined, one will be computed\n// based on the node properties.\nfunc (n *Node) ShortTag() string {\n\tif n.indicatedString() {\n\t\treturn strTag\n\t}\n\tif n.Tag == \"\" || n.Tag == \"!\" {\n\t\tswitch n.Kind {\n\t\tcase MappingNode:\n\t\t\treturn mapTag\n\t\tcase SequenceNode:\n\t\t\treturn seqTag\n\t\tcase AliasNode:\n\t\t\tif n.Alias != nil {\n\t\t\t\treturn n.Alias.ShortTag()\n\t\t\t}\n\t\tcase ScalarNode:\n\t\t\ttag, _ := resolve(\"\", n.Value)\n\t\t\treturn tag\n\t\tcase 0:\n\t\t\t// Special case to make the zero value convenient.\n\t\t\tif n.IsZero() {\n\t\t\t\treturn nullTag\n\t\t\t}\n\t\t}\n\t\treturn \"\"\n\t}\n\treturn shortTag(n.Tag)\n}\n\nfunc (n *Node) indicatedString() bool {\n\treturn n.Kind == ScalarNode &&\n\t\t(shortTag(n.Tag) == strTag ||\n\t\t\t(n.Tag == \"\" || n.Tag == \"!\") && n.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0)\n}\n\n// SetString is a convenience function that sets the node to a string value\n// and defines its style in a pleasant way depending on its content.\nfunc (n *Node) SetString(s string) {\n\tn.Kind = ScalarNode\n\tif utf8.ValidString(s) {\n\t\tn.Value = s\n\t\tn.Tag = strTag\n\t} else {\n\t\tn.Value = encodeBase64(s)\n\t\tn.Tag = binaryTag\n\t}\n\tif strings.Contains(n.Value, \"\\n\") {\n\t\tn.Style = LiteralStyle\n\t}\n}\n\n// --------------------------------------------------------------------------\n// Maintain a mapping of keys to structure field indexes\n\n// The code in this section was copied from mgo/bson.\n\n// structInfo holds details for the serialization of fields of\n// a given struct.\ntype structInfo struct {\n\tFieldsMap  map[string]fieldInfo\n\tFieldsList []fieldInfo\n\n\t// InlineMap is the number of the field in the struct that\n\t// contains an ,inline map, or -1 if there's none.\n\tInlineMap int\n\n\t// InlineUnmarshalers holds indexes to inlined fields that\n\t// contain unmarshaler values.\n\tInlineUnmarshalers [][]int\n}\n\ntype fieldInfo struct {\n\tKey       string\n\tNum       int\n\tOmitEmpty bool\n\tFlow      bool\n\t// Id holds the unique field identifier, so we can cheaply\n\t// check for field duplicates without maintaining an extra map.\n\tId int\n\n\t// Inline holds the field index if the field is part of an inlined struct.\n\tInline []int\n}\n\nvar structMap = make(map[reflect.Type]*structInfo)\nvar fieldMapMutex sync.RWMutex\nvar unmarshalerType reflect.Type\n\nfunc init() {\n\tvar v Unmarshaler\n\tunmarshalerType = reflect.ValueOf(&v).Elem().Type()\n}\n\nfunc getStructInfo(st reflect.Type) (*structInfo, error) {\n\tfieldMapMutex.RLock()\n\tsinfo, found := structMap[st]\n\tfieldMapMutex.RUnlock()\n\tif found {\n\t\treturn sinfo, nil\n\t}\n\n\tn := st.NumField()\n\tfieldsMap := make(map[string]fieldInfo)\n\tfieldsList := make([]fieldInfo, 0, n)\n\tinlineMap := -1\n\tinlineUnmarshalers := [][]int(nil)\n\tfor i := 0; i != n; i++ {\n\t\tfield := st.Field(i)\n\t\tif field.PkgPath != \"\" && !field.Anonymous {\n\t\t\tcontinue // Private field\n\t\t}\n\n\t\tinfo := fieldInfo{Num: i}\n\n\t\ttag := field.Tag.Get(\"yaml\")\n\t\tif tag == \"\" && strings.Index(string(field.Tag), \":\") < 0 {\n\t\t\ttag = string(field.Tag)\n\t\t}\n\t\tif tag == \"-\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tinline := false\n\t\tfields := strings.Split(tag, \",\")\n\t\tif len(fields) > 1 {\n\t\t\tfor _, flag := range fields[1:] {\n\t\t\t\tswitch flag {\n\t\t\t\tcase \"omitempty\":\n\t\t\t\t\tinfo.OmitEmpty = true\n\t\t\t\tcase \"flow\":\n\t\t\t\t\tinfo.Flow = true\n\t\t\t\tcase \"inline\":\n\t\t\t\t\tinline = true\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, errors.New(fmt.Sprintf(\"unsupported flag %q in tag %q of type %s\", flag, tag, st))\n\t\t\t\t}\n\t\t\t}\n\t\t\ttag = fields[0]\n\t\t}\n\n\t\tif inline {\n\t\t\tswitch field.Type.Kind() {\n\t\t\tcase reflect.Map:\n\t\t\t\tif inlineMap >= 0 {\n\t\t\t\t\treturn nil, errors.New(\"multiple ,inline maps in struct \" + st.String())\n\t\t\t\t}\n\t\t\t\tif field.Type.Key() != reflect.TypeOf(\"\") {\n\t\t\t\t\treturn nil, errors.New(\"option ,inline needs a map with string keys in struct \" + st.String())\n\t\t\t\t}\n\t\t\t\tinlineMap = info.Num\n\t\t\tcase reflect.Struct, reflect.Ptr:\n\t\t\t\tftype := field.Type\n\t\t\t\tfor ftype.Kind() == reflect.Ptr {\n\t\t\t\t\tftype = ftype.Elem()\n\t\t\t\t}\n\t\t\t\tif ftype.Kind() != reflect.Struct {\n\t\t\t\t\treturn nil, errors.New(\"option ,inline may only be used on a struct or map field\")\n\t\t\t\t}\n\t\t\t\tif reflect.PtrTo(ftype).Implements(unmarshalerType) {\n\t\t\t\t\tinlineUnmarshalers = append(inlineUnmarshalers, []int{i})\n\t\t\t\t} else {\n\t\t\t\t\tsinfo, err := getStructInfo(ftype)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tfor _, index := range sinfo.InlineUnmarshalers {\n\t\t\t\t\t\tinlineUnmarshalers = append(inlineUnmarshalers, append([]int{i}, index...))\n\t\t\t\t\t}\n\t\t\t\t\tfor _, finfo := range sinfo.FieldsList {\n\t\t\t\t\t\tif _, found := fieldsMap[finfo.Key]; found {\n\t\t\t\t\t\t\tmsg := \"duplicated key '\" + finfo.Key + \"' in struct \" + st.String()\n\t\t\t\t\t\t\treturn nil, errors.New(msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif finfo.Inline == nil {\n\t\t\t\t\t\t\tfinfo.Inline = []int{i, finfo.Num}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfinfo.Inline = append([]int{i}, finfo.Inline...)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinfo.Id = len(fieldsList)\n\t\t\t\t\t\tfieldsMap[finfo.Key] = finfo\n\t\t\t\t\t\tfieldsList = append(fieldsList, finfo)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn nil, errors.New(\"option ,inline may only be used on a struct or map field\")\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif tag != \"\" {\n\t\t\tinfo.Key = tag\n\t\t} else {\n\t\t\tinfo.Key = strings.ToLower(field.Name)\n\t\t}\n\n\t\tif _, found = fieldsMap[info.Key]; found {\n\t\t\tmsg := \"duplicated key '\" + info.Key + \"' in struct \" + st.String()\n\t\t\treturn nil, errors.New(msg)\n\t\t}\n\n\t\tinfo.Id = len(fieldsList)\n\t\tfieldsList = append(fieldsList, info)\n\t\tfieldsMap[info.Key] = info\n\t}\n\n\tsinfo = &structInfo{\n\t\tFieldsMap:          fieldsMap,\n\t\tFieldsList:         fieldsList,\n\t\tInlineMap:          inlineMap,\n\t\tInlineUnmarshalers: inlineUnmarshalers,\n\t}\n\n\tfieldMapMutex.Lock()\n\tstructMap[st] = sinfo\n\tfieldMapMutex.Unlock()\n\treturn sinfo, nil\n}\n\n// IsZeroer is used to check whether an object is zero to\n// determine whether it should be omitted when marshaling\n// with the omitempty flag. One notable implementation\n// is time.Time.\ntype IsZeroer interface {\n\tIsZero() bool\n}\n\nfunc isZero(v reflect.Value) bool {\n\tkind := v.Kind()\n\tif z, ok := v.Interface().(IsZeroer); ok {\n\t\tif (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() {\n\t\t\treturn true\n\t\t}\n\t\treturn z.IsZero()\n\t}\n\tswitch kind {\n\tcase reflect.String:\n\t\treturn len(v.String()) == 0\n\tcase reflect.Interface, reflect.Ptr:\n\t\treturn v.IsNil()\n\tcase reflect.Slice:\n\t\treturn v.Len() == 0\n\tcase reflect.Map:\n\t\treturn v.Len() == 0\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\treturn v.Int() == 0\n\tcase reflect.Float32, reflect.Float64:\n\t\treturn v.Float() == 0\n\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\treturn v.Uint() == 0\n\tcase reflect.Bool:\n\t\treturn !v.Bool()\n\tcase reflect.Struct:\n\t\tvt := v.Type()\n\t\tfor i := v.NumField() - 1; i >= 0; i-- {\n\t\t\tif vt.Field(i).PkgPath != \"\" {\n\t\t\t\tcontinue // Private field\n\t\t\t}\n\t\t\tif !isZero(v.Field(i)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/yamlh.go",
    "content": "//\n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\n// The version directive data.\ntype yaml_version_directive_t struct {\n\tmajor int8 // The major version number.\n\tminor int8 // The minor version number.\n}\n\n// The tag directive data.\ntype yaml_tag_directive_t struct {\n\thandle []byte // The tag handle.\n\tprefix []byte // The tag prefix.\n}\n\ntype yaml_encoding_t int\n\n// The stream encoding.\nconst (\n\t// Let the parser choose the encoding.\n\tyaml_ANY_ENCODING yaml_encoding_t = iota\n\n\tyaml_UTF8_ENCODING    // The default UTF-8 encoding.\n\tyaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM.\n\tyaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM.\n)\n\ntype yaml_break_t int\n\n// Line break types.\nconst (\n\t// Let the parser choose the break type.\n\tyaml_ANY_BREAK yaml_break_t = iota\n\n\tyaml_CR_BREAK   // Use CR for line breaks (Mac style).\n\tyaml_LN_BREAK   // Use LN for line breaks (Unix style).\n\tyaml_CRLN_BREAK // Use CR LN for line breaks (DOS style).\n)\n\ntype yaml_error_type_t int\n\n// Many bad things could happen with the parser and emitter.\nconst (\n\t// No error is produced.\n\tyaml_NO_ERROR yaml_error_type_t = iota\n\n\tyaml_MEMORY_ERROR   // Cannot allocate or reallocate a block of memory.\n\tyaml_READER_ERROR   // Cannot read or decode the input stream.\n\tyaml_SCANNER_ERROR  // Cannot scan the input stream.\n\tyaml_PARSER_ERROR   // Cannot parse the input stream.\n\tyaml_COMPOSER_ERROR // Cannot compose a YAML document.\n\tyaml_WRITER_ERROR   // Cannot write to the output stream.\n\tyaml_EMITTER_ERROR  // Cannot emit a YAML stream.\n)\n\n// The pointer position.\ntype yaml_mark_t struct {\n\tindex  int // The position index.\n\tline   int // The position line.\n\tcolumn int // The position column.\n}\n\n// Node Styles\n\ntype yaml_style_t int8\n\ntype yaml_scalar_style_t yaml_style_t\n\n// Scalar styles.\nconst (\n\t// Let the emitter choose the style.\n\tyaml_ANY_SCALAR_STYLE yaml_scalar_style_t = 0\n\n\tyaml_PLAIN_SCALAR_STYLE         yaml_scalar_style_t = 1 << iota // The plain scalar style.\n\tyaml_SINGLE_QUOTED_SCALAR_STYLE                                 // The single-quoted scalar style.\n\tyaml_DOUBLE_QUOTED_SCALAR_STYLE                                 // The double-quoted scalar style.\n\tyaml_LITERAL_SCALAR_STYLE                                       // The literal scalar style.\n\tyaml_FOLDED_SCALAR_STYLE                                        // The folded scalar style.\n)\n\ntype yaml_sequence_style_t yaml_style_t\n\n// Sequence styles.\nconst (\n\t// Let the emitter choose the style.\n\tyaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota\n\n\tyaml_BLOCK_SEQUENCE_STYLE // The block sequence style.\n\tyaml_FLOW_SEQUENCE_STYLE  // The flow sequence style.\n)\n\ntype yaml_mapping_style_t yaml_style_t\n\n// Mapping styles.\nconst (\n\t// Let the emitter choose the style.\n\tyaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota\n\n\tyaml_BLOCK_MAPPING_STYLE // The block mapping style.\n\tyaml_FLOW_MAPPING_STYLE  // The flow mapping style.\n)\n\n// Tokens\n\ntype yaml_token_type_t int\n\n// Token types.\nconst (\n\t// An empty token.\n\tyaml_NO_TOKEN yaml_token_type_t = iota\n\n\tyaml_STREAM_START_TOKEN // A STREAM-START token.\n\tyaml_STREAM_END_TOKEN   // A STREAM-END token.\n\n\tyaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token.\n\tyaml_TAG_DIRECTIVE_TOKEN     // A TAG-DIRECTIVE token.\n\tyaml_DOCUMENT_START_TOKEN    // A DOCUMENT-START token.\n\tyaml_DOCUMENT_END_TOKEN      // A DOCUMENT-END token.\n\n\tyaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token.\n\tyaml_BLOCK_MAPPING_START_TOKEN  // A BLOCK-SEQUENCE-END token.\n\tyaml_BLOCK_END_TOKEN            // A BLOCK-END token.\n\n\tyaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token.\n\tyaml_FLOW_SEQUENCE_END_TOKEN   // A FLOW-SEQUENCE-END token.\n\tyaml_FLOW_MAPPING_START_TOKEN  // A FLOW-MAPPING-START token.\n\tyaml_FLOW_MAPPING_END_TOKEN    // A FLOW-MAPPING-END token.\n\n\tyaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token.\n\tyaml_FLOW_ENTRY_TOKEN  // A FLOW-ENTRY token.\n\tyaml_KEY_TOKEN         // A KEY token.\n\tyaml_VALUE_TOKEN       // A VALUE token.\n\n\tyaml_ALIAS_TOKEN  // An ALIAS token.\n\tyaml_ANCHOR_TOKEN // An ANCHOR token.\n\tyaml_TAG_TOKEN    // A TAG token.\n\tyaml_SCALAR_TOKEN // A SCALAR token.\n)\n\nfunc (tt yaml_token_type_t) String() string {\n\tswitch tt {\n\tcase yaml_NO_TOKEN:\n\t\treturn \"yaml_NO_TOKEN\"\n\tcase yaml_STREAM_START_TOKEN:\n\t\treturn \"yaml_STREAM_START_TOKEN\"\n\tcase yaml_STREAM_END_TOKEN:\n\t\treturn \"yaml_STREAM_END_TOKEN\"\n\tcase yaml_VERSION_DIRECTIVE_TOKEN:\n\t\treturn \"yaml_VERSION_DIRECTIVE_TOKEN\"\n\tcase yaml_TAG_DIRECTIVE_TOKEN:\n\t\treturn \"yaml_TAG_DIRECTIVE_TOKEN\"\n\tcase yaml_DOCUMENT_START_TOKEN:\n\t\treturn \"yaml_DOCUMENT_START_TOKEN\"\n\tcase yaml_DOCUMENT_END_TOKEN:\n\t\treturn \"yaml_DOCUMENT_END_TOKEN\"\n\tcase yaml_BLOCK_SEQUENCE_START_TOKEN:\n\t\treturn \"yaml_BLOCK_SEQUENCE_START_TOKEN\"\n\tcase yaml_BLOCK_MAPPING_START_TOKEN:\n\t\treturn \"yaml_BLOCK_MAPPING_START_TOKEN\"\n\tcase yaml_BLOCK_END_TOKEN:\n\t\treturn \"yaml_BLOCK_END_TOKEN\"\n\tcase yaml_FLOW_SEQUENCE_START_TOKEN:\n\t\treturn \"yaml_FLOW_SEQUENCE_START_TOKEN\"\n\tcase yaml_FLOW_SEQUENCE_END_TOKEN:\n\t\treturn \"yaml_FLOW_SEQUENCE_END_TOKEN\"\n\tcase yaml_FLOW_MAPPING_START_TOKEN:\n\t\treturn \"yaml_FLOW_MAPPING_START_TOKEN\"\n\tcase yaml_FLOW_MAPPING_END_TOKEN:\n\t\treturn \"yaml_FLOW_MAPPING_END_TOKEN\"\n\tcase yaml_BLOCK_ENTRY_TOKEN:\n\t\treturn \"yaml_BLOCK_ENTRY_TOKEN\"\n\tcase yaml_FLOW_ENTRY_TOKEN:\n\t\treturn \"yaml_FLOW_ENTRY_TOKEN\"\n\tcase yaml_KEY_TOKEN:\n\t\treturn \"yaml_KEY_TOKEN\"\n\tcase yaml_VALUE_TOKEN:\n\t\treturn \"yaml_VALUE_TOKEN\"\n\tcase yaml_ALIAS_TOKEN:\n\t\treturn \"yaml_ALIAS_TOKEN\"\n\tcase yaml_ANCHOR_TOKEN:\n\t\treturn \"yaml_ANCHOR_TOKEN\"\n\tcase yaml_TAG_TOKEN:\n\t\treturn \"yaml_TAG_TOKEN\"\n\tcase yaml_SCALAR_TOKEN:\n\t\treturn \"yaml_SCALAR_TOKEN\"\n\t}\n\treturn \"<unknown token>\"\n}\n\n// The token structure.\ntype yaml_token_t struct {\n\t// The token type.\n\ttyp yaml_token_type_t\n\n\t// The start/end of the token.\n\tstart_mark, end_mark yaml_mark_t\n\n\t// The stream encoding (for yaml_STREAM_START_TOKEN).\n\tencoding yaml_encoding_t\n\n\t// The alias/anchor/scalar value or tag/tag directive handle\n\t// (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN).\n\tvalue []byte\n\n\t// The tag suffix (for yaml_TAG_TOKEN).\n\tsuffix []byte\n\n\t// The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN).\n\tprefix []byte\n\n\t// The scalar style (for yaml_SCALAR_TOKEN).\n\tstyle yaml_scalar_style_t\n\n\t// The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN).\n\tmajor, minor int8\n}\n\n// Events\n\ntype yaml_event_type_t int8\n\n// Event types.\nconst (\n\t// An empty event.\n\tyaml_NO_EVENT yaml_event_type_t = iota\n\n\tyaml_STREAM_START_EVENT   // A STREAM-START event.\n\tyaml_STREAM_END_EVENT     // A STREAM-END event.\n\tyaml_DOCUMENT_START_EVENT // A DOCUMENT-START event.\n\tyaml_DOCUMENT_END_EVENT   // A DOCUMENT-END event.\n\tyaml_ALIAS_EVENT          // An ALIAS event.\n\tyaml_SCALAR_EVENT         // A SCALAR event.\n\tyaml_SEQUENCE_START_EVENT // A SEQUENCE-START event.\n\tyaml_SEQUENCE_END_EVENT   // A SEQUENCE-END event.\n\tyaml_MAPPING_START_EVENT  // A MAPPING-START event.\n\tyaml_MAPPING_END_EVENT    // A MAPPING-END event.\n\tyaml_TAIL_COMMENT_EVENT\n)\n\nvar eventStrings = []string{\n\tyaml_NO_EVENT:             \"none\",\n\tyaml_STREAM_START_EVENT:   \"stream start\",\n\tyaml_STREAM_END_EVENT:     \"stream end\",\n\tyaml_DOCUMENT_START_EVENT: \"document start\",\n\tyaml_DOCUMENT_END_EVENT:   \"document end\",\n\tyaml_ALIAS_EVENT:          \"alias\",\n\tyaml_SCALAR_EVENT:         \"scalar\",\n\tyaml_SEQUENCE_START_EVENT: \"sequence start\",\n\tyaml_SEQUENCE_END_EVENT:   \"sequence end\",\n\tyaml_MAPPING_START_EVENT:  \"mapping start\",\n\tyaml_MAPPING_END_EVENT:    \"mapping end\",\n\tyaml_TAIL_COMMENT_EVENT:   \"tail comment\",\n}\n\nfunc (e yaml_event_type_t) String() string {\n\tif e < 0 || int(e) >= len(eventStrings) {\n\t\treturn fmt.Sprintf(\"unknown event %d\", e)\n\t}\n\treturn eventStrings[e]\n}\n\n// The event structure.\ntype yaml_event_t struct {\n\n\t// The event type.\n\ttyp yaml_event_type_t\n\n\t// The start and end of the event.\n\tstart_mark, end_mark yaml_mark_t\n\n\t// The document encoding (for yaml_STREAM_START_EVENT).\n\tencoding yaml_encoding_t\n\n\t// The version directive (for yaml_DOCUMENT_START_EVENT).\n\tversion_directive *yaml_version_directive_t\n\n\t// The list of tag directives (for yaml_DOCUMENT_START_EVENT).\n\ttag_directives []yaml_tag_directive_t\n\n\t// The comments\n\thead_comment []byte\n\tline_comment []byte\n\tfoot_comment []byte\n\ttail_comment []byte\n\n\t// The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT).\n\tanchor []byte\n\n\t// The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT).\n\ttag []byte\n\n\t// The scalar value (for yaml_SCALAR_EVENT).\n\tvalue []byte\n\n\t// Is the document start/end indicator implicit, or the tag optional?\n\t// (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT).\n\timplicit bool\n\n\t// Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT).\n\tquoted_implicit bool\n\n\t// The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT).\n\tstyle yaml_style_t\n}\n\nfunc (e *yaml_event_t) scalar_style() yaml_scalar_style_t     { return yaml_scalar_style_t(e.style) }\nfunc (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) }\nfunc (e *yaml_event_t) mapping_style() yaml_mapping_style_t   { return yaml_mapping_style_t(e.style) }\n\n// Nodes\n\nconst (\n\tyaml_NULL_TAG      = \"tag:yaml.org,2002:null\"      // The tag !!null with the only possible value: null.\n\tyaml_BOOL_TAG      = \"tag:yaml.org,2002:bool\"      // The tag !!bool with the values: true and false.\n\tyaml_STR_TAG       = \"tag:yaml.org,2002:str\"       // The tag !!str for string values.\n\tyaml_INT_TAG       = \"tag:yaml.org,2002:int\"       // The tag !!int for integer values.\n\tyaml_FLOAT_TAG     = \"tag:yaml.org,2002:float\"     // The tag !!float for float values.\n\tyaml_TIMESTAMP_TAG = \"tag:yaml.org,2002:timestamp\" // The tag !!timestamp for date and time values.\n\n\tyaml_SEQ_TAG = \"tag:yaml.org,2002:seq\" // The tag !!seq is used to denote sequences.\n\tyaml_MAP_TAG = \"tag:yaml.org,2002:map\" // The tag !!map is used to denote mapping.\n\n\t// Not in original libyaml.\n\tyaml_BINARY_TAG = \"tag:yaml.org,2002:binary\"\n\tyaml_MERGE_TAG  = \"tag:yaml.org,2002:merge\"\n\n\tyaml_DEFAULT_SCALAR_TAG   = yaml_STR_TAG // The default scalar tag is !!str.\n\tyaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq.\n\tyaml_DEFAULT_MAPPING_TAG  = yaml_MAP_TAG // The default mapping tag is !!map.\n)\n\ntype yaml_node_type_t int\n\n// Node types.\nconst (\n\t// An empty node.\n\tyaml_NO_NODE yaml_node_type_t = iota\n\n\tyaml_SCALAR_NODE   // A scalar node.\n\tyaml_SEQUENCE_NODE // A sequence node.\n\tyaml_MAPPING_NODE  // A mapping node.\n)\n\n// An element of a sequence node.\ntype yaml_node_item_t int\n\n// An element of a mapping node.\ntype yaml_node_pair_t struct {\n\tkey   int // The key of the element.\n\tvalue int // The value of the element.\n}\n\n// The node structure.\ntype yaml_node_t struct {\n\ttyp yaml_node_type_t // The node type.\n\ttag []byte           // The node tag.\n\n\t// The node data.\n\n\t// The scalar parameters (for yaml_SCALAR_NODE).\n\tscalar struct {\n\t\tvalue  []byte              // The scalar value.\n\t\tlength int                 // The length of the scalar value.\n\t\tstyle  yaml_scalar_style_t // The scalar style.\n\t}\n\n\t// The sequence parameters (for YAML_SEQUENCE_NODE).\n\tsequence struct {\n\t\titems_data []yaml_node_item_t    // The stack of sequence items.\n\t\tstyle      yaml_sequence_style_t // The sequence style.\n\t}\n\n\t// The mapping parameters (for yaml_MAPPING_NODE).\n\tmapping struct {\n\t\tpairs_data  []yaml_node_pair_t   // The stack of mapping pairs (key, value).\n\t\tpairs_start *yaml_node_pair_t    // The beginning of the stack.\n\t\tpairs_end   *yaml_node_pair_t    // The end of the stack.\n\t\tpairs_top   *yaml_node_pair_t    // The top of the stack.\n\t\tstyle       yaml_mapping_style_t // The mapping style.\n\t}\n\n\tstart_mark yaml_mark_t // The beginning of the node.\n\tend_mark   yaml_mark_t // The end of the node.\n\n}\n\n// The document structure.\ntype yaml_document_t struct {\n\n\t// The document nodes.\n\tnodes []yaml_node_t\n\n\t// The version directive.\n\tversion_directive *yaml_version_directive_t\n\n\t// The list of tag directives.\n\ttag_directives_data  []yaml_tag_directive_t\n\ttag_directives_start int // The beginning of the tag directives list.\n\ttag_directives_end   int // The end of the tag directives list.\n\n\tstart_implicit int // Is the document start indicator implicit?\n\tend_implicit   int // Is the document end indicator implicit?\n\n\t// The start/end of the document.\n\tstart_mark, end_mark yaml_mark_t\n}\n\n// The prototype of a read handler.\n//\n// The read handler is called when the parser needs to read more bytes from the\n// source. The handler should write not more than size bytes to the buffer.\n// The number of written bytes should be set to the size_read variable.\n//\n// [in,out]   data        A pointer to an application data specified by\n//                        yaml_parser_set_input().\n// [out]      buffer      The buffer to write the data from the source.\n// [in]       size        The size of the buffer.\n// [out]      size_read   The actual number of bytes read from the source.\n//\n// On success, the handler should return 1.  If the handler failed,\n// the returned value should be 0. On EOF, the handler should set the\n// size_read to 0 and return 1.\ntype yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error)\n\n// This structure holds information about a potential simple key.\ntype yaml_simple_key_t struct {\n\tpossible     bool        // Is a simple key possible?\n\trequired     bool        // Is a simple key required?\n\ttoken_number int         // The number of the token.\n\tmark         yaml_mark_t // The position mark.\n}\n\n// The states of the parser.\ntype yaml_parser_state_t int\n\nconst (\n\tyaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota\n\n\tyaml_PARSE_IMPLICIT_DOCUMENT_START_STATE           // Expect the beginning of an implicit document.\n\tyaml_PARSE_DOCUMENT_START_STATE                    // Expect DOCUMENT-START.\n\tyaml_PARSE_DOCUMENT_CONTENT_STATE                  // Expect the content of a document.\n\tyaml_PARSE_DOCUMENT_END_STATE                      // Expect DOCUMENT-END.\n\tyaml_PARSE_BLOCK_NODE_STATE                        // Expect a block node.\n\tyaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence.\n\tyaml_PARSE_FLOW_NODE_STATE                         // Expect a flow node.\n\tyaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE        // Expect the first entry of a block sequence.\n\tyaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE              // Expect an entry of a block sequence.\n\tyaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE         // Expect an entry of an indentless sequence.\n\tyaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE           // Expect the first key of a block mapping.\n\tyaml_PARSE_BLOCK_MAPPING_KEY_STATE                 // Expect a block mapping key.\n\tyaml_PARSE_BLOCK_MAPPING_VALUE_STATE               // Expect a block mapping value.\n\tyaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE         // Expect the first entry of a flow sequence.\n\tyaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE               // Expect an entry of a flow sequence.\n\tyaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE   // Expect a key of an ordered mapping.\n\tyaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping.\n\tyaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE   // Expect the and of an ordered mapping entry.\n\tyaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE            // Expect the first key of a flow mapping.\n\tyaml_PARSE_FLOW_MAPPING_KEY_STATE                  // Expect a key of a flow mapping.\n\tyaml_PARSE_FLOW_MAPPING_VALUE_STATE                // Expect a value of a flow mapping.\n\tyaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE          // Expect an empty value of a flow mapping.\n\tyaml_PARSE_END_STATE                               // Expect nothing.\n)\n\nfunc (ps yaml_parser_state_t) String() string {\n\tswitch ps {\n\tcase yaml_PARSE_STREAM_START_STATE:\n\t\treturn \"yaml_PARSE_STREAM_START_STATE\"\n\tcase yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE:\n\t\treturn \"yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE\"\n\tcase yaml_PARSE_DOCUMENT_START_STATE:\n\t\treturn \"yaml_PARSE_DOCUMENT_START_STATE\"\n\tcase yaml_PARSE_DOCUMENT_CONTENT_STATE:\n\t\treturn \"yaml_PARSE_DOCUMENT_CONTENT_STATE\"\n\tcase yaml_PARSE_DOCUMENT_END_STATE:\n\t\treturn \"yaml_PARSE_DOCUMENT_END_STATE\"\n\tcase yaml_PARSE_BLOCK_NODE_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_NODE_STATE\"\n\tcase yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE\"\n\tcase yaml_PARSE_FLOW_NODE_STATE:\n\t\treturn \"yaml_PARSE_FLOW_NODE_STATE\"\n\tcase yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE\"\n\tcase yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE\"\n\tcase yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE:\n\t\treturn \"yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE\"\n\tcase yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE\"\n\tcase yaml_PARSE_BLOCK_MAPPING_KEY_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_MAPPING_KEY_STATE\"\n\tcase yaml_PARSE_BLOCK_MAPPING_VALUE_STATE:\n\t\treturn \"yaml_PARSE_BLOCK_MAPPING_VALUE_STATE\"\n\tcase yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE:\n\t\treturn \"yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE\"\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE:\n\t\treturn \"yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE\"\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE:\n\t\treturn \"yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE\"\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE:\n\t\treturn \"yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE\"\n\tcase yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE:\n\t\treturn \"yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE\"\n\tcase yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE:\n\t\treturn \"yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE\"\n\tcase yaml_PARSE_FLOW_MAPPING_KEY_STATE:\n\t\treturn \"yaml_PARSE_FLOW_MAPPING_KEY_STATE\"\n\tcase yaml_PARSE_FLOW_MAPPING_VALUE_STATE:\n\t\treturn \"yaml_PARSE_FLOW_MAPPING_VALUE_STATE\"\n\tcase yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE:\n\t\treturn \"yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE\"\n\tcase yaml_PARSE_END_STATE:\n\t\treturn \"yaml_PARSE_END_STATE\"\n\t}\n\treturn \"<unknown parser state>\"\n}\n\n// This structure holds aliases data.\ntype yaml_alias_data_t struct {\n\tanchor []byte      // The anchor.\n\tindex  int         // The node id.\n\tmark   yaml_mark_t // The anchor mark.\n}\n\n// The parser structure.\n//\n// All members are internal. Manage the structure using the\n// yaml_parser_ family of functions.\ntype yaml_parser_t struct {\n\n\t// Error handling\n\n\terror yaml_error_type_t // Error type.\n\n\tproblem string // Error description.\n\n\t// The byte about which the problem occurred.\n\tproblem_offset int\n\tproblem_value  int\n\tproblem_mark   yaml_mark_t\n\n\t// The error context.\n\tcontext      string\n\tcontext_mark yaml_mark_t\n\n\t// Reader stuff\n\n\tread_handler yaml_read_handler_t // Read handler.\n\n\tinput_reader io.Reader // File input data.\n\tinput        []byte    // String input data.\n\tinput_pos    int\n\n\teof bool // EOF flag\n\n\tbuffer     []byte // The working buffer.\n\tbuffer_pos int    // The current position of the buffer.\n\n\tunread int // The number of unread characters in the buffer.\n\n\tnewlines int // The number of line breaks since last non-break/non-blank character\n\n\traw_buffer     []byte // The raw buffer.\n\traw_buffer_pos int    // The current position of the buffer.\n\n\tencoding yaml_encoding_t // The input encoding.\n\n\toffset int         // The offset of the current position (in bytes).\n\tmark   yaml_mark_t // The mark of the current position.\n\n\t// Comments\n\n\thead_comment []byte // The current head comments\n\tline_comment []byte // The current line comments\n\tfoot_comment []byte // The current foot comments\n\ttail_comment []byte // Foot comment that happens at the end of a block.\n\tstem_comment []byte // Comment in item preceding a nested structure (list inside list item, etc)\n\n\tcomments      []yaml_comment_t // The folded comments for all parsed tokens\n\tcomments_head int\n\n\t// Scanner stuff\n\n\tstream_start_produced bool // Have we started to scan the input stream?\n\tstream_end_produced   bool // Have we reached the end of the input stream?\n\n\tflow_level int // The number of unclosed '[' and '{' indicators.\n\n\ttokens          []yaml_token_t // The tokens queue.\n\ttokens_head     int            // The head of the tokens queue.\n\ttokens_parsed   int            // The number of tokens fetched from the queue.\n\ttoken_available bool           // Does the tokens queue contain a token ready for dequeueing.\n\n\tindent  int   // The current indentation level.\n\tindents []int // The indentation levels stack.\n\n\tsimple_key_allowed bool                // May a simple key occur at the current position?\n\tsimple_keys        []yaml_simple_key_t // The stack of simple keys.\n\tsimple_keys_by_tok map[int]int         // possible simple_key indexes indexed by token_number\n\n\t// Parser stuff\n\n\tstate          yaml_parser_state_t    // The current parser state.\n\tstates         []yaml_parser_state_t  // The parser states stack.\n\tmarks          []yaml_mark_t          // The stack of marks.\n\ttag_directives []yaml_tag_directive_t // The list of TAG directives.\n\n\t// Dumper stuff\n\n\taliases []yaml_alias_data_t // The alias data.\n\n\tdocument *yaml_document_t // The currently parsed document.\n}\n\ntype yaml_comment_t struct {\n\n\tscan_mark  yaml_mark_t // Position where scanning for comments started\n\ttoken_mark yaml_mark_t // Position after which tokens will be associated with this comment\n\tstart_mark yaml_mark_t // Position of '#' comment mark\n\tend_mark   yaml_mark_t // Position where comment terminated\n\n\thead []byte\n\tline []byte\n\tfoot []byte\n}\n\n// Emitter Definitions\n\n// The prototype of a write handler.\n//\n// The write handler is called when the emitter needs to flush the accumulated\n// characters to the output.  The handler should write @a size bytes of the\n// @a buffer to the output.\n//\n// @param[in,out]   data        A pointer to an application data specified by\n//                              yaml_emitter_set_output().\n// @param[in]       buffer      The buffer with bytes to be written.\n// @param[in]       size        The size of the buffer.\n//\n// @returns On success, the handler should return @c 1.  If the handler failed,\n// the returned value should be @c 0.\n//\ntype yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error\n\ntype yaml_emitter_state_t int\n\n// The emitter states.\nconst (\n\t// Expect STREAM-START.\n\tyaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota\n\n\tyaml_EMIT_FIRST_DOCUMENT_START_STATE       // Expect the first DOCUMENT-START or STREAM-END.\n\tyaml_EMIT_DOCUMENT_START_STATE             // Expect DOCUMENT-START or STREAM-END.\n\tyaml_EMIT_DOCUMENT_CONTENT_STATE           // Expect the content of a document.\n\tyaml_EMIT_DOCUMENT_END_STATE               // Expect DOCUMENT-END.\n\tyaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE   // Expect the first item of a flow sequence.\n\tyaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE   // Expect the next item of a flow sequence, with the comma already written out\n\tyaml_EMIT_FLOW_SEQUENCE_ITEM_STATE         // Expect an item of a flow sequence.\n\tyaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE     // Expect the first key of a flow mapping.\n\tyaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE     // Expect the next key of a flow mapping, with the comma already written out\n\tyaml_EMIT_FLOW_MAPPING_KEY_STATE           // Expect a key of a flow mapping.\n\tyaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE  // Expect a value for a simple key of a flow mapping.\n\tyaml_EMIT_FLOW_MAPPING_VALUE_STATE         // Expect a value of a flow mapping.\n\tyaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE  // Expect the first item of a block sequence.\n\tyaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE        // Expect an item of a block sequence.\n\tyaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE    // Expect the first key of a block mapping.\n\tyaml_EMIT_BLOCK_MAPPING_KEY_STATE          // Expect the key of a block mapping.\n\tyaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping.\n\tyaml_EMIT_BLOCK_MAPPING_VALUE_STATE        // Expect a value of a block mapping.\n\tyaml_EMIT_END_STATE                        // Expect nothing.\n)\n\n// The emitter structure.\n//\n// All members are internal.  Manage the structure using the @c yaml_emitter_\n// family of functions.\ntype yaml_emitter_t struct {\n\n\t// Error handling\n\n\terror   yaml_error_type_t // Error type.\n\tproblem string            // Error description.\n\n\t// Writer stuff\n\n\twrite_handler yaml_write_handler_t // Write handler.\n\n\toutput_buffer *[]byte   // String output data.\n\toutput_writer io.Writer // File output data.\n\n\tbuffer     []byte // The working buffer.\n\tbuffer_pos int    // The current position of the buffer.\n\n\traw_buffer     []byte // The raw buffer.\n\traw_buffer_pos int    // The current position of the buffer.\n\n\tencoding yaml_encoding_t // The stream encoding.\n\n\t// Emitter stuff\n\n\tcanonical   bool         // If the output is in the canonical style?\n\tbest_indent int          // The number of indentation spaces.\n\tbest_width  int          // The preferred width of the output lines.\n\tunicode     bool         // Allow unescaped non-ASCII characters?\n\tline_break  yaml_break_t // The preferred line break.\n\n\tstate  yaml_emitter_state_t   // The current emitter state.\n\tstates []yaml_emitter_state_t // The stack of states.\n\n\tevents      []yaml_event_t // The event queue.\n\tevents_head int            // The head of the event queue.\n\n\tindents []int // The stack of indentation levels.\n\n\ttag_directives []yaml_tag_directive_t // The list of tag directives.\n\n\tindent int // The current indentation level.\n\n\tflow_level int // The current flow level.\n\n\troot_context       bool // Is it the document root context?\n\tsequence_context   bool // Is it a sequence context?\n\tmapping_context    bool // Is it a mapping context?\n\tsimple_key_context bool // Is it a simple mapping key context?\n\n\tline       int  // The current line.\n\tcolumn     int  // The current column.\n\twhitespace bool // If the last character was a whitespace?\n\tindention  bool // If the last character was an indentation character (' ', '-', '?', ':')?\n\topen_ended bool // If an explicit document end is required?\n\n\tspace_above bool // Is there's an empty line above?\n\tfoot_indent int  // The indent used to write the foot comment above, or -1 if none.\n\n\t// Anchor analysis.\n\tanchor_data struct {\n\t\tanchor []byte // The anchor value.\n\t\talias  bool   // Is it an alias?\n\t}\n\n\t// Tag analysis.\n\ttag_data struct {\n\t\thandle []byte // The tag handle.\n\t\tsuffix []byte // The tag suffix.\n\t}\n\n\t// Scalar analysis.\n\tscalar_data struct {\n\t\tvalue                 []byte              // The scalar value.\n\t\tmultiline             bool                // Does the scalar contain line breaks?\n\t\tflow_plain_allowed    bool                // Can the scalar be expessed in the flow plain style?\n\t\tblock_plain_allowed   bool                // Can the scalar be expressed in the block plain style?\n\t\tsingle_quoted_allowed bool                // Can the scalar be expressed in the single quoted style?\n\t\tblock_allowed         bool                // Can the scalar be expressed in the literal or folded styles?\n\t\tstyle                 yaml_scalar_style_t // The output style.\n\t}\n\n\t// Comments\n\thead_comment []byte\n\tline_comment []byte\n\tfoot_comment []byte\n\ttail_comment []byte\n\n\tkey_line_comment []byte\n\n\t// Dumper stuff\n\n\topened bool // If the stream was already opened?\n\tclosed bool // If the stream was already closed?\n\n\t// The information associated with the document nodes.\n\tanchors *struct {\n\t\treferences int  // The number of references.\n\t\tanchor     int  // The anchor id.\n\t\tserialized bool // If the node has been emitted?\n\t}\n\n\tlast_anchor_id int // The last assigned anchor id.\n\n\tdocument *yaml_document_t // The currently emitted document.\n}\n"
  },
  {
    "path": "vendor/gopkg.in/yaml.v3/yamlprivateh.go",
    "content": "// \n// Copyright (c) 2011-2019 Canonical Ltd\n// Copyright (c) 2006-2010 Kirill Simonov\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n// of the Software, and to permit persons to whom the Software is furnished to do\n// 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\npackage yaml\n\nconst (\n\t// The size of the input raw buffer.\n\tinput_raw_buffer_size = 512\n\n\t// The size of the input buffer.\n\t// It should be possible to decode the whole raw buffer.\n\tinput_buffer_size = input_raw_buffer_size * 3\n\n\t// The size of the output buffer.\n\toutput_buffer_size = 128\n\n\t// The size of the output raw buffer.\n\t// It should be possible to encode the whole output buffer.\n\toutput_raw_buffer_size = (output_buffer_size*2 + 2)\n\n\t// The size of other stacks and queues.\n\tinitial_stack_size  = 16\n\tinitial_queue_size  = 16\n\tinitial_string_size = 16\n)\n\n// Check if the character at the specified position is an alphabetical\n// character, a digit, '_', or '-'.\nfunc is_alpha(b []byte, i int) bool {\n\treturn b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-'\n}\n\n// Check if the character at the specified position is a digit.\nfunc is_digit(b []byte, i int) bool {\n\treturn b[i] >= '0' && b[i] <= '9'\n}\n\n// Get the value of a digit.\nfunc as_digit(b []byte, i int) int {\n\treturn int(b[i]) - '0'\n}\n\n// Check if the character at the specified position is a hex-digit.\nfunc is_hex(b []byte, i int) bool {\n\treturn b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f'\n}\n\n// Get the value of a hex-digit.\nfunc as_hex(b []byte, i int) int {\n\tbi := b[i]\n\tif bi >= 'A' && bi <= 'F' {\n\t\treturn int(bi) - 'A' + 10\n\t}\n\tif bi >= 'a' && bi <= 'f' {\n\t\treturn int(bi) - 'a' + 10\n\t}\n\treturn int(bi) - '0'\n}\n\n// Check if the character is ASCII.\nfunc is_ascii(b []byte, i int) bool {\n\treturn b[i] <= 0x7F\n}\n\n// Check if the character at the start of the buffer can be printed unescaped.\nfunc is_printable(b []byte, i int) bool {\n\treturn ((b[i] == 0x0A) || // . == #x0A\n\t\t(b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E\n\t\t(b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF\n\t\t(b[i] > 0xC2 && b[i] < 0xED) ||\n\t\t(b[i] == 0xED && b[i+1] < 0xA0) ||\n\t\t(b[i] == 0xEE) ||\n\t\t(b[i] == 0xEF && // #xE000 <= . <= #xFFFD\n\t\t\t!(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF\n\t\t\t!(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF))))\n}\n\n// Check if the character at the specified position is NUL.\nfunc is_z(b []byte, i int) bool {\n\treturn b[i] == 0x00\n}\n\n// Check if the beginning of the buffer is a BOM.\nfunc is_bom(b []byte, i int) bool {\n\treturn b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF\n}\n\n// Check if the character at the specified position is space.\nfunc is_space(b []byte, i int) bool {\n\treturn b[i] == ' '\n}\n\n// Check if the character at the specified position is tab.\nfunc is_tab(b []byte, i int) bool {\n\treturn b[i] == '\\t'\n}\n\n// Check if the character at the specified position is blank (space or tab).\nfunc is_blank(b []byte, i int) bool {\n\t//return is_space(b, i) || is_tab(b, i)\n\treturn b[i] == ' ' || b[i] == '\\t'\n}\n\n// Check if the character at the specified position is a line break.\nfunc is_break(b []byte, i int) bool {\n\treturn (b[i] == '\\r' || // CR (#xD)\n\t\tb[i] == '\\n' || // LF (#xA)\n\t\tb[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029)\n}\n\nfunc is_crlf(b []byte, i int) bool {\n\treturn b[i] == '\\r' && b[i+1] == '\\n'\n}\n\n// Check if the character is a line break or NUL.\nfunc is_breakz(b []byte, i int) bool {\n\t//return is_break(b, i) || is_z(b, i)\n\treturn (\n\t\t// is_break:\n\t\tb[i] == '\\r' || // CR (#xD)\n\t\tb[i] == '\\n' || // LF (#xA)\n\t\tb[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029)\n\t\t// is_z:\n\t\tb[i] == 0)\n}\n\n// Check if the character is a line break, space, or NUL.\nfunc is_spacez(b []byte, i int) bool {\n\t//return is_space(b, i) || is_breakz(b, i)\n\treturn (\n\t\t// is_space:\n\t\tb[i] == ' ' ||\n\t\t// is_breakz:\n\t\tb[i] == '\\r' || // CR (#xD)\n\t\tb[i] == '\\n' || // LF (#xA)\n\t\tb[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029)\n\t\tb[i] == 0)\n}\n\n// Check if the character is a line break, space, tab, or NUL.\nfunc is_blankz(b []byte, i int) bool {\n\t//return is_blank(b, i) || is_breakz(b, i)\n\treturn (\n\t\t// is_blank:\n\t\tb[i] == ' ' || b[i] == '\\t' ||\n\t\t// is_breakz:\n\t\tb[i] == '\\r' || // CR (#xD)\n\t\tb[i] == '\\n' || // LF (#xA)\n\t\tb[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028)\n\t\tb[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029)\n\t\tb[i] == 0)\n}\n\n// Determine the width of the character.\nfunc width(b byte) int {\n\t// Don't replace these by a switch without first\n\t// confirming that it is being inlined.\n\tif b&0x80 == 0x00 {\n\t\treturn 1\n\t}\n\tif b&0xE0 == 0xC0 {\n\t\treturn 2\n\t}\n\tif b&0xF0 == 0xE0 {\n\t\treturn 3\n\t}\n\tif b&0xF8 == 0xF0 {\n\t\treturn 4\n\t}\n\treturn 0\n\n}\n"
  },
  {
    "path": "vendor/modules.txt",
    "content": "# cyphar.com/go-pathrs v0.2.4\n## explicit; go 1.18\ncyphar.com/go-pathrs\ncyphar.com/go-pathrs/internal/fdutils\ncyphar.com/go-pathrs/internal/libpathrs\ncyphar.com/go-pathrs/procfs\n# dario.cat/mergo v1.0.2\n## explicit; go 1.13\ndario.cat/mergo\n# github.com/BurntSushi/toml v1.6.0\n## explicit; go 1.18\ngithub.com/BurntSushi/toml\ngithub.com/BurntSushi/toml/internal\n# github.com/Masterminds/semver/v3 v3.4.0\n## explicit; go 1.21\ngithub.com/Masterminds/semver/v3\n# github.com/Microsoft/go-winio v0.6.2\n## explicit; go 1.21\ngithub.com/Microsoft/go-winio\ngithub.com/Microsoft/go-winio/internal/fs\ngithub.com/Microsoft/go-winio/internal/socket\ngithub.com/Microsoft/go-winio/internal/stringbuffer\ngithub.com/Microsoft/go-winio/pkg/guid\n# github.com/VividCortex/ewma v1.2.0\n## explicit; go 1.12\ngithub.com/VividCortex/ewma\n# github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d\n## explicit\ngithub.com/acarl005/stripansi\n# github.com/cespare/xxhash/v2 v2.3.0\n## explicit; go 1.11\ngithub.com/cespare/xxhash/v2\n# github.com/clipperhouse/uax29/v2 v2.7.0\n## explicit; go 1.18\ngithub.com/clipperhouse/uax29/v2/graphemes\n# github.com/containerd/errdefs v1.0.0\n## explicit; go 1.20\ngithub.com/containerd/errdefs\n# github.com/containerd/errdefs/pkg v0.3.0\n## explicit; go 1.22\ngithub.com/containerd/errdefs/pkg/errhttp\ngithub.com/containerd/errdefs/pkg/internal/cause\n# github.com/containerd/stargz-snapshotter/estargz v0.18.2\n## explicit; go 1.24.0\ngithub.com/containerd/stargz-snapshotter/estargz\ngithub.com/containerd/stargz-snapshotter/estargz/errorutil\n# github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01\n## explicit\ngithub.com/containers/libtrust\n# github.com/containers/ocicrypt v1.2.1\n## explicit; go 1.22\ngithub.com/containers/ocicrypt\ngithub.com/containers/ocicrypt/blockcipher\ngithub.com/containers/ocicrypt/config\ngithub.com/containers/ocicrypt/config/keyprovider-config\ngithub.com/containers/ocicrypt/config/pkcs11config\ngithub.com/containers/ocicrypt/crypto/pkcs11\ngithub.com/containers/ocicrypt/helpers\ngithub.com/containers/ocicrypt/keywrap\ngithub.com/containers/ocicrypt/keywrap/jwe\ngithub.com/containers/ocicrypt/keywrap/keyprovider\ngithub.com/containers/ocicrypt/keywrap/pgp\ngithub.com/containers/ocicrypt/keywrap/pkcs11\ngithub.com/containers/ocicrypt/keywrap/pkcs7\ngithub.com/containers/ocicrypt/spec\ngithub.com/containers/ocicrypt/utils\ngithub.com/containers/ocicrypt/utils/keyprovider\n# github.com/coreos/go-oidc/v3 v3.17.0\n## explicit; go 1.24.0\ngithub.com/coreos/go-oidc/v3/oidc\n# github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467\n## explicit\ngithub.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer\n# github.com/cyphar/filepath-securejoin v0.6.1\n## explicit; go 1.18\ngithub.com/cyphar/filepath-securejoin\ngithub.com/cyphar/filepath-securejoin/internal/consts\ngithub.com/cyphar/filepath-securejoin/pathrs-lite\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/assert\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/gocompat\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/gopathrs\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/kernelversion\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/linux\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/internal/procfs\ngithub.com/cyphar/filepath-securejoin/pathrs-lite/procfs\n# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc\n## explicit\ngithub.com/davecgh/go-spew/spew\n# github.com/distribution/reference v0.6.0\n## explicit; go 1.20\ngithub.com/distribution/reference\n# github.com/docker/distribution v2.8.3+incompatible\n## explicit\ngithub.com/docker/distribution/registry/api/errcode\ngithub.com/docker/distribution/registry/api/v2\n# github.com/docker/docker-credential-helpers v0.9.5\n## explicit; go 1.21\ngithub.com/docker/docker-credential-helpers/client\ngithub.com/docker/docker-credential-helpers/credentials\n# github.com/docker/go-connections v0.6.0\n## explicit; go 1.18\ngithub.com/docker/go-connections/sockets\ngithub.com/docker/go-connections/tlsconfig\n# github.com/docker/go-units v0.5.0\n## explicit\ngithub.com/docker/go-units\n# github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707\n## explicit; go 1.9\n# github.com/felixge/httpsnoop v1.0.4\n## explicit; go 1.13\ngithub.com/felixge/httpsnoop\n# github.com/go-jose/go-jose/v4 v4.1.3\n## explicit; go 1.24.0\ngithub.com/go-jose/go-jose/v4\ngithub.com/go-jose/go-jose/v4/cipher\ngithub.com/go-jose/go-jose/v4/json\n# github.com/go-logr/logr v1.4.3\n## explicit; go 1.18\ngithub.com/go-logr/logr\ngithub.com/go-logr/logr/funcr\n# github.com/go-logr/stdr v1.2.2\n## explicit; go 1.16\ngithub.com/go-logr/stdr\n# github.com/golang/protobuf v1.5.4\n## explicit; go 1.17\ngithub.com/golang/protobuf/proto\n# github.com/google/go-containerregistry v0.20.7\n## explicit; go 1.24.0\ngithub.com/google/go-containerregistry/pkg/name\ngithub.com/google/go-containerregistry/pkg/v1\ngithub.com/google/go-containerregistry/pkg/v1/types\n# github.com/google/go-intervals v0.0.2\n## explicit; go 1.12\ngithub.com/google/go-intervals/intervalset\n# github.com/google/uuid v1.6.0\n## explicit\ngithub.com/google/uuid\n# github.com/gorilla/mux v1.8.1\n## explicit; go 1.20\ngithub.com/gorilla/mux\n# github.com/hashicorp/go-cleanhttp v0.5.2\n## explicit; go 1.13\ngithub.com/hashicorp/go-cleanhttp\n# github.com/hashicorp/go-multierror v1.1.2-0.20250313123807-1ee6e1a1957a\n## explicit; go 1.13\ngithub.com/hashicorp/go-multierror\n# github.com/hashicorp/go-retryablehttp v0.7.8\n## explicit; go 1.23\ngithub.com/hashicorp/go-retryablehttp\n# github.com/inconshreveable/mousetrap v1.1.0\n## explicit; go 1.18\ngithub.com/inconshreveable/mousetrap\n# github.com/json-iterator/go v1.1.12\n## explicit; go 1.12\ngithub.com/json-iterator/go\n# github.com/klauspost/compress v1.18.4\n## explicit; go 1.23\ngithub.com/klauspost/compress\ngithub.com/klauspost/compress/flate\ngithub.com/klauspost/compress/fse\ngithub.com/klauspost/compress/huff0\ngithub.com/klauspost/compress/internal/cpuinfo\ngithub.com/klauspost/compress/internal/le\ngithub.com/klauspost/compress/internal/snapref\ngithub.com/klauspost/compress/zstd\ngithub.com/klauspost/compress/zstd/internal/xxhash\n# github.com/klauspost/pgzip v1.2.6\n## explicit\ngithub.com/klauspost/pgzip\n# github.com/mattn/go-runewidth v0.0.20\n## explicit; go 1.20\ngithub.com/mattn/go-runewidth\n# github.com/mattn/go-sqlite3 v1.14.34\n## explicit; go 1.19\ngithub.com/mattn/go-sqlite3\n# github.com/miekg/pkcs11 v1.1.1\n## explicit; go 1.12\ngithub.com/miekg/pkcs11\n# github.com/mistifyio/go-zfs/v4 v4.0.0\n## explicit; go 1.14\ngithub.com/mistifyio/go-zfs/v4\n# github.com/moby/docker-image-spec v1.3.1\n## explicit; go 1.18\ngithub.com/moby/docker-image-spec/specs-go/v1\n# github.com/moby/moby/api v1.54.0\n## explicit; go 1.24.0\ngithub.com/moby/moby/api/types\ngithub.com/moby/moby/api/types/blkiodev\ngithub.com/moby/moby/api/types/build\ngithub.com/moby/moby/api/types/checkpoint\ngithub.com/moby/moby/api/types/common\ngithub.com/moby/moby/api/types/container\ngithub.com/moby/moby/api/types/events\ngithub.com/moby/moby/api/types/image\ngithub.com/moby/moby/api/types/jsonstream\ngithub.com/moby/moby/api/types/mount\ngithub.com/moby/moby/api/types/network\ngithub.com/moby/moby/api/types/plugin\ngithub.com/moby/moby/api/types/registry\ngithub.com/moby/moby/api/types/storage\ngithub.com/moby/moby/api/types/swarm\ngithub.com/moby/moby/api/types/system\ngithub.com/moby/moby/api/types/volume\n# github.com/moby/moby/client v0.3.0\n## explicit; go 1.24.0\ngithub.com/moby/moby/client\ngithub.com/moby/moby/client/internal\ngithub.com/moby/moby/client/internal/timestamp\ngithub.com/moby/moby/client/pkg/versions\n# github.com/moby/sys/capability v0.4.0\n## explicit; go 1.21\ngithub.com/moby/sys/capability\n# github.com/moby/sys/mountinfo v0.7.2\n## explicit; go 1.17\ngithub.com/moby/sys/mountinfo\n# github.com/moby/sys/user v0.4.0\n## explicit; go 1.17\ngithub.com/moby/sys/user\n# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd\n## explicit\ngithub.com/modern-go/concurrent\n# github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee\n## explicit; go 1.12\ngithub.com/modern-go/reflect2\n# github.com/opencontainers/go-digest v1.0.0\n## explicit; go 1.13\ngithub.com/opencontainers/go-digest\n# github.com/opencontainers/image-spec v1.1.2-0.20260226102121-a4c6ade7bb82\n## explicit; go 1.18\ngithub.com/opencontainers/image-spec/specs-go\ngithub.com/opencontainers/image-spec/specs-go/v1\n# github.com/opencontainers/image-spec/schema v0.0.0-20250717171153-ab80ff15c2dd\n## explicit; go 1.21\ngithub.com/opencontainers/image-spec/schema\n# github.com/opencontainers/image-tools v1.0.0-rc3\n## explicit\ngithub.com/opencontainers/image-tools/image\n# github.com/opencontainers/runtime-spec v1.3.0\n## explicit\ngithub.com/opencontainers/runtime-spec/specs-go\n# github.com/opencontainers/selinux v1.13.1\n## explicit; go 1.19\ngithub.com/opencontainers/selinux/go-selinux\ngithub.com/opencontainers/selinux/go-selinux/label\ngithub.com/opencontainers/selinux/pkg/pwalkdir\n# github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c\n## explicit; go 1.14\ngithub.com/pkg/browser\n# github.com/pkg/errors v0.9.1\n## explicit\ngithub.com/pkg/errors\n# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2\n## explicit\ngithub.com/pmezard/go-difflib/difflib\n# github.com/proglottis/gpgme v0.1.6\n## explicit; go 1.17\ngithub.com/proglottis/gpgme\n# github.com/santhosh-tekuri/jsonschema/v6 v6.0.2\n## explicit; go 1.21\ngithub.com/santhosh-tekuri/jsonschema/v6\ngithub.com/santhosh-tekuri/jsonschema/v6/kind\n# github.com/secure-systems-lab/go-securesystemslib v0.10.0\n## explicit; go 1.24.0\ngithub.com/secure-systems-lab/go-securesystemslib/encrypted\n# github.com/sigstore/fulcio v1.8.5\n## explicit; go 1.25.0\ngithub.com/sigstore/fulcio/pkg/api\ngithub.com/sigstore/fulcio/pkg/certificate\n# github.com/sigstore/protobuf-specs v0.5.0\n## explicit; go 1.22.0\ngithub.com/sigstore/protobuf-specs/gen/pb-go/common/v1\n# github.com/sigstore/sigstore v1.10.4\n## explicit; go 1.25.0\ngithub.com/sigstore/sigstore/pkg/cryptoutils\ngithub.com/sigstore/sigstore/pkg/oauth\ngithub.com/sigstore/sigstore/pkg/oauthflow\ngithub.com/sigstore/sigstore/pkg/signature\ngithub.com/sigstore/sigstore/pkg/signature/options\ngithub.com/sigstore/sigstore/pkg/signature/payload\n# github.com/sirupsen/logrus v1.9.4\n## explicit; go 1.17\ngithub.com/sirupsen/logrus\n# github.com/smallstep/pkcs7 v0.1.1\n## explicit; go 1.14\ngithub.com/smallstep/pkcs7\ngithub.com/smallstep/pkcs7/internal/legacy/x509\n# github.com/spf13/cobra v1.10.2\n## explicit; go 1.15\ngithub.com/spf13/cobra\n# github.com/spf13/pflag v1.0.10\n## explicit; go 1.12\ngithub.com/spf13/pflag\n# github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6\n## explicit; go 1.19\ngithub.com/stefanberger/go-pkcs11uri\n# github.com/stretchr/testify v1.11.1\n## explicit; go 1.17\ngithub.com/stretchr/testify/assert\ngithub.com/stretchr/testify/assert/yaml\ngithub.com/stretchr/testify/require\ngithub.com/stretchr/testify/suite\n# github.com/sylabs/sif/v2 v2.22.0\n## explicit; go 1.24.0\ngithub.com/sylabs/sif/v2/pkg/sif\n# github.com/tchap/go-patricia/v2 v2.3.3\n## explicit; go 1.16\ngithub.com/tchap/go-patricia/v2/patricia\n# github.com/ulikunitz/xz v0.5.15\n## explicit; go 1.12\ngithub.com/ulikunitz/xz\ngithub.com/ulikunitz/xz/internal/hash\ngithub.com/ulikunitz/xz/internal/xlog\ngithub.com/ulikunitz/xz/lzma\n# github.com/vbatts/tar-split v0.12.2\n## explicit; go 1.17\ngithub.com/vbatts/tar-split/archive/tar\ngithub.com/vbatts/tar-split/tar/asm\ngithub.com/vbatts/tar-split/tar/storage\n# github.com/vbauerster/mpb/v8 v8.12.0\n## explicit; go 1.24.0\ngithub.com/vbauerster/mpb/v8\ngithub.com/vbauerster/mpb/v8/cwriter\ngithub.com/vbauerster/mpb/v8/decor\ngithub.com/vbauerster/mpb/v8/internal\n# go.opentelemetry.io/auto/sdk v1.2.1\n## explicit; go 1.24.0\ngo.opentelemetry.io/auto/sdk\ngo.opentelemetry.io/auto/sdk/internal/telemetry\n# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0\n## explicit; go 1.24.0\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv\n# go.opentelemetry.io/otel v1.40.0\n## explicit; go 1.24.0\ngo.opentelemetry.io/otel\ngo.opentelemetry.io/otel/attribute\ngo.opentelemetry.io/otel/attribute/internal\ngo.opentelemetry.io/otel/attribute/internal/xxhash\ngo.opentelemetry.io/otel/baggage\ngo.opentelemetry.io/otel/codes\ngo.opentelemetry.io/otel/internal/baggage\ngo.opentelemetry.io/otel/internal/global\ngo.opentelemetry.io/otel/propagation\ngo.opentelemetry.io/otel/semconv/v1.37.0\ngo.opentelemetry.io/otel/semconv/v1.39.0\ngo.opentelemetry.io/otel/semconv/v1.39.0/httpconv\n# go.opentelemetry.io/otel/metric v1.40.0\n## explicit; go 1.24.0\ngo.opentelemetry.io/otel/metric\ngo.opentelemetry.io/otel/metric/embedded\ngo.opentelemetry.io/otel/metric/noop\n# go.opentelemetry.io/otel/trace v1.40.0\n## explicit; go 1.24.0\ngo.opentelemetry.io/otel/trace\ngo.opentelemetry.io/otel/trace/embedded\ngo.opentelemetry.io/otel/trace/internal/telemetry\ngo.opentelemetry.io/otel/trace/noop\n# go.podman.io/common v0.67.1-0.20260319154331-44a8de38c431\n## explicit; go 1.25.0\ngo.podman.io/common/pkg/auth\ngo.podman.io/common/pkg/capabilities\ngo.podman.io/common/pkg/completion\ngo.podman.io/common/pkg/flag\ngo.podman.io/common/pkg/json-proxy\ngo.podman.io/common/pkg/password\ngo.podman.io/common/pkg/report\ngo.podman.io/common/pkg/report/camelcase\ngo.podman.io/common/pkg/retry\n# go.podman.io/image/v5 v5.39.2-0.20260313202710-ddaabae34a06\n## explicit; go 1.25.0\ngo.podman.io/image/v5/copy\ngo.podman.io/image/v5/directory\ngo.podman.io/image/v5/directory/explicitfilepath\ngo.podman.io/image/v5/docker\ngo.podman.io/image/v5/docker/archive\ngo.podman.io/image/v5/docker/daemon\ngo.podman.io/image/v5/docker/internal/tarfile\ngo.podman.io/image/v5/docker/policyconfiguration\ngo.podman.io/image/v5/docker/reference\ngo.podman.io/image/v5/image\ngo.podman.io/image/v5/internal/blobinfocache\ngo.podman.io/image/v5/internal/digests\ngo.podman.io/image/v5/internal/image\ngo.podman.io/image/v5/internal/imagedestination\ngo.podman.io/image/v5/internal/imagedestination/impl\ngo.podman.io/image/v5/internal/imagedestination/stubs\ngo.podman.io/image/v5/internal/imagesource\ngo.podman.io/image/v5/internal/imagesource/impl\ngo.podman.io/image/v5/internal/imagesource/stubs\ngo.podman.io/image/v5/internal/iolimits\ngo.podman.io/image/v5/internal/manifest\ngo.podman.io/image/v5/internal/multierr\ngo.podman.io/image/v5/internal/pkg/platform\ngo.podman.io/image/v5/internal/private\ngo.podman.io/image/v5/internal/putblobdigest\ngo.podman.io/image/v5/internal/rootless\ngo.podman.io/image/v5/internal/set\ngo.podman.io/image/v5/internal/signature\ngo.podman.io/image/v5/internal/signer\ngo.podman.io/image/v5/internal/streamdigest\ngo.podman.io/image/v5/internal/tmpdir\ngo.podman.io/image/v5/internal/unparsedimage\ngo.podman.io/image/v5/internal/uploadreader\ngo.podman.io/image/v5/internal/useragent\ngo.podman.io/image/v5/manifest\ngo.podman.io/image/v5/oci/archive\ngo.podman.io/image/v5/oci/internal\ngo.podman.io/image/v5/oci/layout\ngo.podman.io/image/v5/openshift\ngo.podman.io/image/v5/pkg/blobinfocache\ngo.podman.io/image/v5/pkg/blobinfocache/internal/prioritize\ngo.podman.io/image/v5/pkg/blobinfocache/memory\ngo.podman.io/image/v5/pkg/blobinfocache/none\ngo.podman.io/image/v5/pkg/blobinfocache/sqlite\ngo.podman.io/image/v5/pkg/cli\ngo.podman.io/image/v5/pkg/cli/basetls\ngo.podman.io/image/v5/pkg/cli/basetls/tlsdetails\ngo.podman.io/image/v5/pkg/cli/sigstore\ngo.podman.io/image/v5/pkg/cli/sigstore/params\ngo.podman.io/image/v5/pkg/compression\ngo.podman.io/image/v5/pkg/compression/internal\ngo.podman.io/image/v5/pkg/compression/types\ngo.podman.io/image/v5/pkg/docker/config\ngo.podman.io/image/v5/pkg/strslice\ngo.podman.io/image/v5/pkg/sysregistriesv2\ngo.podman.io/image/v5/pkg/tlsclientconfig\ngo.podman.io/image/v5/sif\ngo.podman.io/image/v5/signature\ngo.podman.io/image/v5/signature/internal\ngo.podman.io/image/v5/signature/internal/sequoia\ngo.podman.io/image/v5/signature/signer\ngo.podman.io/image/v5/signature/sigstore\ngo.podman.io/image/v5/signature/sigstore/fulcio\ngo.podman.io/image/v5/signature/sigstore/internal\ngo.podman.io/image/v5/signature/sigstore/rekor\ngo.podman.io/image/v5/signature/simplesequoia\ngo.podman.io/image/v5/signature/simplesigning\ngo.podman.io/image/v5/storage\ngo.podman.io/image/v5/tarball\ngo.podman.io/image/v5/transports\ngo.podman.io/image/v5/transports/alltransports\ngo.podman.io/image/v5/types\ngo.podman.io/image/v5/version\n# go.podman.io/storage v1.62.1-0.20260316152041-ebc34488c338\n## explicit; go 1.25.0\ngo.podman.io/storage\ngo.podman.io/storage/drivers\ngo.podman.io/storage/drivers/btrfs\ngo.podman.io/storage/drivers/copy\ngo.podman.io/storage/drivers/overlay\ngo.podman.io/storage/drivers/overlayutils\ngo.podman.io/storage/drivers/quota\ngo.podman.io/storage/drivers/register\ngo.podman.io/storage/drivers/vfs\ngo.podman.io/storage/drivers/zfs\ngo.podman.io/storage/internal/dedup\ngo.podman.io/storage/internal/rawfilelock\ngo.podman.io/storage/internal/staging_lockfile\ngo.podman.io/storage/internal/tempdir\ngo.podman.io/storage/pkg/archive\ngo.podman.io/storage/pkg/chrootarchive\ngo.podman.io/storage/pkg/chunked\ngo.podman.io/storage/pkg/chunked/compressor\ngo.podman.io/storage/pkg/chunked/dump\ngo.podman.io/storage/pkg/chunked/internal/minimal\ngo.podman.io/storage/pkg/chunked/internal/path\ngo.podman.io/storage/pkg/chunked/toc\ngo.podman.io/storage/pkg/config\ngo.podman.io/storage/pkg/directory\ngo.podman.io/storage/pkg/fileutils\ngo.podman.io/storage/pkg/fsutils\ngo.podman.io/storage/pkg/fsverity\ngo.podman.io/storage/pkg/homedir\ngo.podman.io/storage/pkg/idmap\ngo.podman.io/storage/pkg/idtools\ngo.podman.io/storage/pkg/ioutils\ngo.podman.io/storage/pkg/lockfile\ngo.podman.io/storage/pkg/longpath\ngo.podman.io/storage/pkg/loopback\ngo.podman.io/storage/pkg/mount\ngo.podman.io/storage/pkg/parsers\ngo.podman.io/storage/pkg/pools\ngo.podman.io/storage/pkg/promise\ngo.podman.io/storage/pkg/reexec\ngo.podman.io/storage/pkg/regexp\ngo.podman.io/storage/pkg/stringid\ngo.podman.io/storage/pkg/stringutils\ngo.podman.io/storage/pkg/system\ngo.podman.io/storage/pkg/tarlog\ngo.podman.io/storage/pkg/truncindex\ngo.podman.io/storage/pkg/unshare\ngo.podman.io/storage/types\n# golang.org/x/crypto v0.49.0\n## explicit; go 1.25.0\ngolang.org/x/crypto/cast5\ngolang.org/x/crypto/cryptobyte\ngolang.org/x/crypto/cryptobyte/asn1\ngolang.org/x/crypto/internal/alias\ngolang.org/x/crypto/internal/poly1305\ngolang.org/x/crypto/nacl/secretbox\ngolang.org/x/crypto/openpgp\ngolang.org/x/crypto/openpgp/armor\ngolang.org/x/crypto/openpgp/elgamal\ngolang.org/x/crypto/openpgp/errors\ngolang.org/x/crypto/openpgp/packet\ngolang.org/x/crypto/openpgp/s2k\ngolang.org/x/crypto/pbkdf2\ngolang.org/x/crypto/salsa20/salsa\ngolang.org/x/crypto/scrypt\n# golang.org/x/net v0.51.0\n## explicit; go 1.25.0\ngolang.org/x/net/http/httpguts\ngolang.org/x/net/http2\ngolang.org/x/net/http2/hpack\ngolang.org/x/net/idna\ngolang.org/x/net/internal/httpcommon\ngolang.org/x/net/internal/httpsfv\ngolang.org/x/net/internal/timeseries\ngolang.org/x/net/trace\n# golang.org/x/oauth2 v0.36.0\n## explicit; go 1.25.0\ngolang.org/x/oauth2\ngolang.org/x/oauth2/internal\n# golang.org/x/sync v0.20.0\n## explicit; go 1.25.0\ngolang.org/x/sync/errgroup\ngolang.org/x/sync/semaphore\n# golang.org/x/sys v0.42.0\n## explicit; go 1.25.0\ngolang.org/x/sys/cpu\ngolang.org/x/sys/plan9\ngolang.org/x/sys/unix\ngolang.org/x/sys/windows\n# golang.org/x/term v0.41.0\n## explicit; go 1.25.0\ngolang.org/x/term\n# golang.org/x/text v0.35.0\n## explicit; go 1.25.0\ngolang.org/x/text/feature/plural\ngolang.org/x/text/internal\ngolang.org/x/text/internal/catmsg\ngolang.org/x/text/internal/format\ngolang.org/x/text/internal/language\ngolang.org/x/text/internal/language/compact\ngolang.org/x/text/internal/number\ngolang.org/x/text/internal/stringset\ngolang.org/x/text/internal/tag\ngolang.org/x/text/language\ngolang.org/x/text/message\ngolang.org/x/text/message/catalog\ngolang.org/x/text/secure/bidirule\ngolang.org/x/text/transform\ngolang.org/x/text/unicode/bidi\ngolang.org/x/text/unicode/norm\n# google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409\n## explicit; go 1.24.0\ngoogle.golang.org/genproto/googleapis/api\ngoogle.golang.org/genproto/googleapis/api/annotations\n# google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409\n## explicit; go 1.24.0\ngoogle.golang.org/genproto/googleapis/rpc/status\n# google.golang.org/grpc v1.78.0\n## explicit; go 1.24.0\ngoogle.golang.org/grpc\ngoogle.golang.org/grpc/attributes\ngoogle.golang.org/grpc/backoff\ngoogle.golang.org/grpc/balancer\ngoogle.golang.org/grpc/balancer/base\ngoogle.golang.org/grpc/balancer/endpointsharding\ngoogle.golang.org/grpc/balancer/grpclb/state\ngoogle.golang.org/grpc/balancer/pickfirst\ngoogle.golang.org/grpc/balancer/pickfirst/internal\ngoogle.golang.org/grpc/balancer/roundrobin\ngoogle.golang.org/grpc/binarylog/grpc_binarylog_v1\ngoogle.golang.org/grpc/channelz\ngoogle.golang.org/grpc/codes\ngoogle.golang.org/grpc/connectivity\ngoogle.golang.org/grpc/credentials\ngoogle.golang.org/grpc/credentials/insecure\ngoogle.golang.org/grpc/encoding\ngoogle.golang.org/grpc/encoding/internal\ngoogle.golang.org/grpc/encoding/proto\ngoogle.golang.org/grpc/experimental/stats\ngoogle.golang.org/grpc/grpclog\ngoogle.golang.org/grpc/grpclog/internal\ngoogle.golang.org/grpc/internal\ngoogle.golang.org/grpc/internal/backoff\ngoogle.golang.org/grpc/internal/balancer/gracefulswitch\ngoogle.golang.org/grpc/internal/balancerload\ngoogle.golang.org/grpc/internal/binarylog\ngoogle.golang.org/grpc/internal/buffer\ngoogle.golang.org/grpc/internal/channelz\ngoogle.golang.org/grpc/internal/credentials\ngoogle.golang.org/grpc/internal/envconfig\ngoogle.golang.org/grpc/internal/grpclog\ngoogle.golang.org/grpc/internal/grpcsync\ngoogle.golang.org/grpc/internal/grpcutil\ngoogle.golang.org/grpc/internal/idle\ngoogle.golang.org/grpc/internal/metadata\ngoogle.golang.org/grpc/internal/pretty\ngoogle.golang.org/grpc/internal/proxyattributes\ngoogle.golang.org/grpc/internal/resolver\ngoogle.golang.org/grpc/internal/resolver/delegatingresolver\ngoogle.golang.org/grpc/internal/resolver/dns\ngoogle.golang.org/grpc/internal/resolver/dns/internal\ngoogle.golang.org/grpc/internal/resolver/passthrough\ngoogle.golang.org/grpc/internal/resolver/unix\ngoogle.golang.org/grpc/internal/serviceconfig\ngoogle.golang.org/grpc/internal/stats\ngoogle.golang.org/grpc/internal/status\ngoogle.golang.org/grpc/internal/syscall\ngoogle.golang.org/grpc/internal/transport\ngoogle.golang.org/grpc/internal/transport/networktype\ngoogle.golang.org/grpc/keepalive\ngoogle.golang.org/grpc/mem\ngoogle.golang.org/grpc/metadata\ngoogle.golang.org/grpc/peer\ngoogle.golang.org/grpc/resolver\ngoogle.golang.org/grpc/resolver/dns\ngoogle.golang.org/grpc/serviceconfig\ngoogle.golang.org/grpc/stats\ngoogle.golang.org/grpc/status\ngoogle.golang.org/grpc/tap\n# google.golang.org/protobuf v1.36.11\n## explicit; go 1.23\ngoogle.golang.org/protobuf/encoding/protojson\ngoogle.golang.org/protobuf/encoding/prototext\ngoogle.golang.org/protobuf/encoding/protowire\ngoogle.golang.org/protobuf/internal/descfmt\ngoogle.golang.org/protobuf/internal/descopts\ngoogle.golang.org/protobuf/internal/detrand\ngoogle.golang.org/protobuf/internal/editiondefaults\ngoogle.golang.org/protobuf/internal/editionssupport\ngoogle.golang.org/protobuf/internal/encoding/defval\ngoogle.golang.org/protobuf/internal/encoding/json\ngoogle.golang.org/protobuf/internal/encoding/messageset\ngoogle.golang.org/protobuf/internal/encoding/tag\ngoogle.golang.org/protobuf/internal/encoding/text\ngoogle.golang.org/protobuf/internal/errors\ngoogle.golang.org/protobuf/internal/filedesc\ngoogle.golang.org/protobuf/internal/filetype\ngoogle.golang.org/protobuf/internal/flags\ngoogle.golang.org/protobuf/internal/genid\ngoogle.golang.org/protobuf/internal/impl\ngoogle.golang.org/protobuf/internal/order\ngoogle.golang.org/protobuf/internal/pragma\ngoogle.golang.org/protobuf/internal/protolazy\ngoogle.golang.org/protobuf/internal/set\ngoogle.golang.org/protobuf/internal/strs\ngoogle.golang.org/protobuf/internal/version\ngoogle.golang.org/protobuf/proto\ngoogle.golang.org/protobuf/protoadapt\ngoogle.golang.org/protobuf/reflect/protodesc\ngoogle.golang.org/protobuf/reflect/protoreflect\ngoogle.golang.org/protobuf/reflect/protoregistry\ngoogle.golang.org/protobuf/runtime/protoiface\ngoogle.golang.org/protobuf/runtime/protoimpl\ngoogle.golang.org/protobuf/types/descriptorpb\ngoogle.golang.org/protobuf/types/gofeaturespb\ngoogle.golang.org/protobuf/types/known/anypb\ngoogle.golang.org/protobuf/types/known/durationpb\ngoogle.golang.org/protobuf/types/known/timestamppb\n# gopkg.in/yaml.v3 v3.0.1\n## explicit\ngopkg.in/yaml.v3\n"
  },
  {
    "path": "version/version.go",
    "content": "package version\n\n// Version is the version of the build.\nconst Version = \"1.22.0-dev\"\n"
  }
]